From bb7ee525bf424dbefa1bafd918ed6f8f4ca89823 Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Wed, 9 Sep 2026 11:25:58 -0400 Subject: [PATCH 1/4] update plotly.js to v4.1.0 --- codegen/resources/plot-schema.json | 19 +- js/lib/mimeExtension.js | 258 +++++++++--------- js/package-lock.json | 24 +- js/package.json | 2 +- plotly/graph_objs/layout/_legend.py | 40 +++ plotly/graph_objs/layout/_modebar.py | 7 +- plotly/graph_objs/layout/_xaxis.py | 12 +- plotly/graph_objs/layout/_yaxis.py | 12 +- plotly/labextension/package.json | 4 +- ...9754e73c03c32.js => 0.8a60fe48f4849a5c.js} | 80 +++--- ...662.js => remoteEntry.25fcd7ead727dc9c.js} | 2 +- plotly/offline/_plotlyjs_version.py | 2 +- plotly/package_data/plotly.min.js | 176 ++++++------ plotly/package_data/widgetbundle.js | 214 +++++++-------- plotly/validators/_validators.json | 12 + 15 files changed, 467 insertions(+), 397 deletions(-) rename plotly/labextension/static/{0.e889754e73c03c32.js => 0.8a60fe48f4849a5c.js} (68%) rename plotly/labextension/static/{remoteEntry.6f1030bf65ead662.js => remoteEntry.25fcd7ead727dc9c.js} (99%) diff --git a/codegen/resources/plot-schema.json b/codegen/resources/plot-schema.json index 0412ea47de0..e32cee0231f 100644 --- a/codegen/resources/plot-schema.json +++ b/codegen/resources/plot-schema.json @@ -142,7 +142,7 @@ }, "doubleClickDelay": { "description": "Sets the delay for registering a double-click in ms. This is the time interval (in ms) between first mousedown and 2nd mouseup to constitute a double-click. This setting propagates to all on-subplot double clicks (except for geo and map) and on-legend double clicks.", - "dflt": 300, + "dflt": 500, "min": 0, "valType": "number" }, @@ -244,7 +244,7 @@ "valType": "any" }, "modeBarButtonsToAdd": { - "description": "Add mode bar button using config objects See ./components/modebar/buttons.js for list of arguments. To enable predefined modebar buttons e.g. shape drawing, hover and spikelines, simply provide their string name(s). This could include: *v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*, *drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect* and *eraseshape*. Please note that these predefined buttons will only be shown if they are compatible with all trace types used in a graph.", + "description": "Add mode bar button using config objects See ./components/modebar/buttons.js for list of arguments. To enable predefined modebar buttons e.g. shape drawing, hover and spikelines, simply provide their string name(s). This could include: *v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*, *drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect*, *eraseshape* and *downloadJson*. Please note that these predefined buttons will only be shown if they are compatible with all trace types used in a graph.", "dflt": [], "valType": "any" }, @@ -3312,6 +3312,15 @@ "togglegroup" ] }, + "groupdoubleclick": { + "description": "Determines the behavior on legend group item double-click. *toggleitem* toggles the visibility of the individual item clicked on the graph. *togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph. Defaults to the value of `groupclick`.", + "editType": "legend", + "valType": "enumerated", + "values": [ + "toggleitem", + "togglegroup" + ] + }, "grouptitlefont": { "color": { "editType": "legend", @@ -4167,7 +4176,7 @@ }, "add": { "arrayOk": true, - "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 *v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*, *drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect*, *eraseshape*.", + "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 *v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*, *drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect*, *eraseshape*, *downloadJson*.", "dflt": "", "editType": "modebar", "valType": "string" @@ -13953,7 +13962,7 @@ "valType": "boolean" }, "showspikes": { - "description": "Determines whether or not spikes (aka droplines) are drawn for this axis. Note: This only takes affect when hovermode = closest", + "description": "Determines whether or not spikes (aka droplines) are drawn for this axis. Note that spikes will never be drawn when `hovermode` is *false*.", "dflt": false, "editType": "modebar", "valType": "boolean" @@ -15202,7 +15211,7 @@ "valType": "boolean" }, "showspikes": { - "description": "Determines whether or not spikes (aka droplines) are drawn for this axis. Note: This only takes affect when hovermode = closest", + "description": "Determines whether or not spikes (aka droplines) are drawn for this axis. Note that spikes will never be drawn when `hovermode` is *false*.", "dflt": false, "editType": "modebar", "valType": "boolean" diff --git a/js/lib/mimeExtension.js b/js/lib/mimeExtension.js index ff2ee9a60b9..2abed40f056 100644 --- a/js/lib/mimeExtension.js +++ b/js/lib/mimeExtension.js @@ -1,93 +1,93 @@ -var HF=Object.create;var eA=Object.defineProperty;var GF=Object.getOwnPropertyDescriptor;var WF=Object.getOwnPropertyNames;var YF=Object.getPrototypeOf,XF=Object.prototype.hasOwnProperty;var ab=(xt,be)=>()=>(be||xt((be={exports:{}}).exports,be),be.exports);var $F=(xt,be,st,ft)=>{if(be&&typeof be=="object"||typeof be=="function")for(let Lt of WF(be))!XF.call(xt,Lt)&&Lt!==st&&eA(xt,Lt,{get:()=>be[Lt],enumerable:!(ft=GF(be,Lt))||ft.enumerable});return xt};var sd=(xt,be,st)=>(st=xt!=null?HF(YF(xt)):{},$F(be||!xt||!xt.__esModule?eA(st,"default",{value:xt,enumerable:!0}):st,xt));var yv=ab((cg,tA)=>{(function(xt,be){typeof cg=="object"&&typeof tA<"u"?be(cg):typeof define=="function"&&define.amd?define(["exports"],be):(xt=typeof globalThis<"u"?globalThis:xt||self,be(xt.lumino_algorithm={}))})(cg,function(xt){"use strict";xt.ArrayExt=void 0,function(Ta){function Hn(Ei,Hi,ia=0,Ia=-1){let Ra=Ei.length;if(Ra===0)return-1;ia<0?ia=Math.max(0,ia+Ra):ia=Math.min(ia,Ra-1),Ia<0?Ia=Math.max(0,Ia+Ra):Ia=Math.min(Ia,Ra-1);let no;Ia0;){let Qa=rs>>1,uh=po+Qa;ia(Ei[uh],Hi)<0?(po=uh+1,rs-=Qa+1):rs=Qa}return po}Ta.lowerBound=Qi;function iu(Ei,Hi,ia,Ia=0,Ra=-1){let no=Ei.length;if(no===0)return 0;Ia<0?Ia=Math.max(0,Ia+no):Ia=Math.min(Ia,no-1),Ra<0?Ra=Math.max(0,Ra+no):Ra=Math.min(Ra,no-1);let po=Ia,rs=Ra-Ia+1;for(;rs>0;){let Qa=rs>>1,uh=po+Qa;ia(Ei[uh],Hi)>0?rs=Qa:(po=uh+1,rs-=Qa+1)}return po}Ta.upperBound=iu;function Us(Ei,Hi,ia){if(Ei===Hi)return!0;if(Ei.length!==Hi.length)return!1;for(let Ia=0,Ra=Ei.length;Ia=no&&(ia=Ra<0?no-1:no),Ia===void 0?Ia=Ra<0?-1:no:Ia<0?Ia=Math.max(Ia+no,Ra<0?-1:0):Ia>=no&&(Ia=Ra<0?no-1:no);let po;Ra<0&&Ia>=ia||Ra>0&&ia>=Ia?po=0:Ra<0?po=Math.floor((Ia-ia+1)/Ra+1):po=Math.floor((Ia-ia-1)/Ra+1);let rs=[];for(let Qa=0;Qa=Ia))return;let no=Ia-ia+1;if(Hi>0?Hi=Hi%no:Hi<0&&(Hi=(Hi%no+no)%no),Hi===0)return;let po=ia+Hi;ec(Ei,ia,po-1),ec(Ei,po,Ia),ec(Ei,ia,Ia)}Ta.rotate=Ec;function Jf(Ei,Hi,ia=0,Ia=-1){let Ra=Ei.length;if(Ra===0)return;ia<0?ia=Math.max(0,ia+Ra):ia=Math.min(ia,Ra-1),Ia<0?Ia=Math.max(0,Ia+Ra):Ia=Math.min(Ia,Ra-1);let no;IaHi;--Ra)Ei[Ra]=Ei[Ra-1];Ei[Hi]=ia}Ta.insert=Ag;function lh(Ei,Hi){let ia=Ei.length;if(Hi<0&&(Hi+=ia),Hi<0||Hi>=ia)return;let Ia=Ei[Hi];for(let Ra=Hi+1;Ra=ia&&po<=Ia&&Ei[po]===Hi||Ia=ia)&&Ei[po]===Hi?no++:no>0&&(Ei[po-no]=Ei[po]);return no>0&&(Ei.length=Ra-no),no}Ta.removeAllOf=Vd;function vo(Ei,Hi,ia=0,Ia=-1){let Ra,no=ji(Ei,Hi,ia,Ia);return no!==-1&&(Ra=lh(Ei,no)),{index:no,value:Ra}}Ta.removeFirstWhere=vo;function Xs(Ei,Hi,ia=-1,Ia=0){let Ra,no=ls(Ei,Hi,ia,Ia);return no!==-1&&(Ra=lh(Ei,no)),{index:no,value:Ra}}Ta.removeLastWhere=Xs;function Mv(Ei,Hi,ia=0,Ia=-1){let Ra=Ei.length;if(Ra===0)return 0;ia<0?ia=Math.max(0,ia+Ra):ia=Math.min(ia,Ra-1),Ia<0?Ia=Math.max(0,Ia+Ra):Ia=Math.min(Ia,Ra-1);let no=0;for(let po=0;po=ia&&po<=Ia&&Hi(Ei[po],po)||Ia=ia)&&Hi(Ei[po],po)?no++:no>0&&(Ei[po-no]=Ei[po]);return no>0&&(Ei.length=Ra-no),no}Ta.removeAllWhere=Mv}(xt.ArrayExt||(xt.ArrayExt={}));function*be(...Ta){for(let Hn of Ta)yield*Hn}function*st(){}function*ft(Ta,Hn=0){for(let ki of Ta)yield[Hn++,ki]}function*Lt(Ta,Hn){let ki=0;for(let ji of Ta)Hn(ji,ki++)&&(yield ji)}function Xt(Ta,Hn){let ki=0;for(let ji of Ta)if(Hn(ji,ki++))return ji}function Hr(Ta,Hn){let ki=0;for(let ji of Ta)if(Hn(ji,ki++))return ki-1;return-1}function Cr(Ta,Hn){let ki;for(let ji of Ta){if(ki===void 0){ki=ji;continue}Hn(ji,ki)<0&&(ki=ji)}return ki}function jr(Ta,Hn){let ki;for(let ji of Ta){if(ki===void 0){ki=ji;continue}Hn(ji,ki)>0&&(ki=ji)}return ki}function Jr(Ta,Hn){let ki=!0,ji,ls;for(let Ys of Ta)ki?(ji=Ys,ls=Ys,ki=!1):Hn(Ys,ji)<0?ji=Ys:Hn(Ys,ls)>0&&(ls=Ys);return ki?void 0:[ji,ls]}function zr(Ta){return Array.from(Ta)}function Gr(Ta){let Hn={};for(let[ki,ji]of Ta)Hn[ki]=ji;return Hn}function tn(Ta,Hn){let ki=0;for(let ji of Ta)if(Hn(ji,ki++)===!1)return}function Yr(Ta,Hn){let ki=0;for(let ji of Ta)if(Hn(ji,ki++)===!1)return!1;return!0}function Nr(Ta,Hn){let ki=0;for(let ji of Ta)if(Hn(ji,ki++))return!0;return!1}function*Qr(Ta,Hn){let ki=0;for(let ji of Ta)yield Hn(ji,ki++)}function*En(Ta,Hn,ki){Hn===void 0?(Hn=Ta,Ta=0,ki=1):ki===void 0&&(ki=1);let ji=In.rangeLength(Ta,Hn,ki);for(let ls=0;lsji&&ls>0||ki-1;Hn--)yield Ta[Hn]}function ra(Ta){let Hn=[],ki=new Set,ji=new Map;for(let mi of Ta)ls(mi);for(let[mi]of ji)Ys(mi);return Hn;function ls(mi){let[Qi,iu]=mi,Us=ji.get(iu);Us?Us.push(Qi):ji.set(iu,[Qi])}function Ys(mi){if(ki.has(mi))return;ki.add(mi);let Qi=ji.get(mi);if(Qi)for(let iu of Qi)Ys(iu);Hn.push(mi)}}function*ri(Ta,Hn){let ki=0;for(let ji of Ta)ki++%Hn===0&&(yield ji)}xt.StringExt=void 0,function(Ta){function Hn(mi,Qi,iu=0){let Us=new Array(Qi.length);for(let vs=0,dl=iu,ec=Qi.length;vsQi?1:0}Ta.cmp=Ys}(xt.StringExt||(xt.StringExt={}));function*ni(Ta,Hn){if(Hn<1)return;let ki=Ta[Symbol.iterator](),ji;for(;0ji[Symbol.iterator]()),ki=Hn.map(ji=>ji.next());for(;Yr(ki,ji=>!ji.done);ki=Hn.map(ji=>ji.next()))yield ki.map(ji=>ji.value)}xt.chain=be,xt.each=tn,xt.empty=st,xt.enumerate=ft,xt.every=Yr,xt.filter=Lt,xt.find=Xt,xt.findIndex=Hr,xt.map=Qr,xt.max=jr,xt.min=Cr,xt.minmax=Jr,xt.once=Wn,xt.range=En,xt.reduce=Ee,xt.repeat=yn,xt.retro=Yn,xt.some=Nr,xt.stride=ri,xt.take=ni,xt.toArray=zr,xt.toObject=Gr,xt.topologicSort=ra,xt.zip=qi})});var hg=ab((fg,rA)=>{(function(xt,be){typeof fg=="object"&&typeof rA<"u"?be(fg,yv()):typeof define=="function"&&define.amd?define(["exports","@lumino/algorithm"],be):(xt=typeof globalThis<"u"?globalThis:xt||self,be(xt.lumino_coreutils={},xt.lumino_algorithm))})(fg,function(xt,be){"use strict";xt.JSONExt=void 0,function(Jr){Jr.emptyObject=Object.freeze({}),Jr.emptyArray=Object.freeze([]);function zr(yn){return yn===null||typeof yn=="boolean"||typeof yn=="number"||typeof yn=="string"}Jr.isPrimitive=zr;function Gr(yn){return Array.isArray(yn)}Jr.isArray=Gr;function tn(yn){return!zr(yn)&&!Gr(yn)}Jr.isObject=tn;function Yr(yn,Wn){if(yn===Wn)return!0;if(zr(yn)||zr(Wn))return!1;let Yn=Gr(yn),ra=Gr(Wn);return Yn!==ra?!1:Yn&&ra?Qr(yn,Wn):En(yn,Wn)}Jr.deepEqual=Yr;function Nr(yn){return zr(yn)?yn:Gr(yn)?In(yn):Ee(yn)}Jr.deepCopy=Nr;function Qr(yn,Wn){if(yn===Wn)return!0;if(yn.length!==Wn.length)return!1;for(let Yn=0,ra=yn.length;Yn!0,this._plugins=new Map,this._services=new Map,zr.validatePlugin&&(console.info("Plugins may be rejected by the custom validation plugin method."),this._validatePlugin=zr.validatePlugin)}get application(){return this._application}set application(zr){if(this._application!==null)throw Error("PluginRegistry.application is already set. It cannot be overridden.");this._application=zr}get deferredPlugins(){return Array.from(this._plugins).filter(([zr,Gr])=>Gr.autoStart==="defer").map(([zr,Gr])=>zr)}getPluginDescription(zr){var Gr,tn;return(tn=(Gr=this._plugins.get(zr))===null||Gr===void 0?void 0:Gr.description)!==null&&tn!==void 0?tn:""}hasPlugin(zr){return this._plugins.has(zr)}isPluginActivated(zr){var Gr,tn;return(tn=(Gr=this._plugins.get(zr))===null||Gr===void 0?void 0:Gr.activated)!==null&&tn!==void 0?tn:!1}listPlugins(){return Array.from(this._plugins.keys())}registerPlugin(zr){if(this._plugins.has(zr.id))throw new TypeError(`Plugin '${zr.id}' is already registered.`);if(!this._validatePlugin(zr))throw new Error(`Plugin '${zr.id}' is not valid.`);let Gr=Lt.createPluginData(zr);Lt.ensureNoCycle(Gr,this._plugins,this._services),Gr.provides&&this._services.set(Gr.provides,Gr.id),this._plugins.set(Gr.id,Gr)}registerPlugins(zr){for(let Gr of zr)this.registerPlugin(Gr)}deregisterPlugin(zr,Gr){let tn=this._plugins.get(zr);if(tn){if(tn.activated&&!Gr)throw new Error(`Plugin '${zr}' is still active.`);this._plugins.delete(zr)}}async activatePlugin(zr){let Gr=this._plugins.get(zr);if(!Gr)throw new ReferenceError(`Plugin '${zr}' is not registered.`);if(Gr.activated)return;if(Gr.promise)return Gr.promise;let tn=Gr.requires.map(Nr=>this.resolveRequiredService(Nr)),Yr=Gr.optional.map(Nr=>this.resolveOptionalService(Nr));return Gr.promise=Promise.all([...tn,...Yr]).then(Nr=>Gr.activate.apply(void 0,[this.application,...Nr])).then(Nr=>{Gr.service=Nr,Gr.activated=!0,Gr.promise=null}).catch(Nr=>{throw Gr.promise=null,Nr}),Gr.promise}async activatePlugins(zr,Gr={}){switch(zr){case"defer":{let tn=this.deferredPlugins.filter(Yr=>this._plugins.get(Yr).autoStart).map(Yr=>this.activatePlugin(Yr));await Promise.all(tn);break}case"startUp":{let Yr=Lt.collectStartupPlugins(this._plugins,Gr).map(async Nr=>{try{return await this.activatePlugin(Nr)}catch(Qr){console.error(`Plugin '${Nr}' failed to activate.`,Qr)}});await Promise.all(Yr);break}}}async deactivatePlugin(zr){let Gr=this._plugins.get(zr);if(!Gr)throw new ReferenceError(`Plugin '${zr}' is not registered.`);if(!Gr.activated)return[];if(!Gr.deactivate)throw new TypeError(`Plugin '${zr}'#deactivate() method missing`);let tn=Lt.findDependents(zr,this._plugins,this._services),Yr=tn.map(Nr=>this._plugins.get(Nr));for(let Nr of Yr)if(!Nr.deactivate)throw new TypeError(`Plugin ${Nr.id}#deactivate() method missing (depends on ${zr})`);for(let Nr of Yr){let Qr=[...Nr.requires,...Nr.optional].map(En=>{let In=this._services.get(En);return In?this._plugins.get(In).service:null});await Nr.deactivate(this.application,...Qr),Nr.service=null,Nr.activated=!1}return tn.pop(),tn}async resolveRequiredService(zr){let Gr=this._services.get(zr);if(!Gr)throw new TypeError(`No provider for: ${zr.name}.`);let tn=this._plugins.get(Gr);return tn.activated||await this.activatePlugin(Gr),tn.service}async resolveOptionalService(zr){let Gr=this._services.get(zr);if(!Gr)return null;let tn=this._plugins.get(Gr);if(!tn.activated)try{await this.activatePlugin(Gr)}catch(Yr){return console.error(Yr),null}return tn.service}}var Lt;(function(Jr){class zr{constructor(En){var In,Ee,yn,Wn;this._activated=!1,this._promise=null,this._service=null,this.id=En.id,this.description=(In=En.description)!==null&&In!==void 0?In:"",this.activate=En.activate,this.deactivate=(Ee=En.deactivate)!==null&&Ee!==void 0?Ee:null,this.provides=(yn=En.provides)!==null&&yn!==void 0?yn:null,this.autoStart=(Wn=En.autoStart)!==null&&Wn!==void 0?Wn:!1,this.requires=En.requires?En.requires.slice():[],this.optional=En.optional?En.optional.slice():[]}get activated(){return this._activated}set activated(En){this._activated=En}get service(){return this._service}set service(En){this._service=En}get promise(){return this._promise}set promise(En){this._promise=En}}function Gr(Qr){return new zr(Qr)}Jr.createPluginData=Gr;function tn(Qr,En,In){let Ee=[...Qr.requires,...Qr.optional],yn=Yn=>{if(Yn===Qr.provides)return!0;let ra=In.get(Yn);if(!ra)return!1;let ri=En.get(ra),ni=[...ri.requires,...ri.optional];return ni.length===0?!1:(Wn.push(ra),ni.some(yn)?!0:(Wn.pop(),!1))};if(!Qr.provides||Ee.length===0)return;let Wn=[Qr.id];if(Ee.some(yn))throw new ReferenceError(`Cycle detected: ${Wn.join(" -> ")}.`)}Jr.ensureNoCycle=tn;function Yr(Qr,En,In){let Ee=new Array,yn=ni=>{let qi=En.get(ni),Ta=[...qi.requires,...qi.optional];Ee.push(...Ta.reduce((Hn,ki)=>{let ji=In.get(ki);return ji&&Hn.push([ni,ji]),Hn},[]))};for(let ni of En.keys())yn(ni);let Wn=Ee.filter(ni=>ni[1]===Qr),Yn=0;for(;Wn.length>Yn;){let ni=Wn.length,qi=new Set(Wn.map(Ta=>Ta[0]));for(let Ta of qi)Ee.filter(Hn=>Hn[1]===Ta).forEach(Hn=>{Wn.includes(Hn)||Wn.push(Hn)});Yn=ni}let ra=be.topologicSort(Wn),ri=ra.findIndex(ni=>ni===Qr);return ri===-1?[Qr]:ra.slice(0,ri+1)}Jr.findDependents=Yr;function Nr(Qr,En){let In=new Set;for(let Ee of Qr.keys())Qr.get(Ee).autoStart===!0&&In.add(Ee);if(En.startPlugins)for(let Ee of En.startPlugins)In.add(Ee);if(En.ignorePlugins)for(let Ee of En.ignorePlugins)In.delete(Ee);return Array.from(In)}Jr.collectStartupPlugins=Nr})(Lt||(Lt={}));class Xt{constructor(){this.promise=new Promise((zr,Gr)=>{this._resolve=zr,this._reject=Gr})}resolve(zr){let Gr=this._resolve;Gr(zr)}reject(zr){let Gr=this._reject;Gr(zr)}}class Hr{constructor(zr,Gr){this.name=zr,this.description=Gr??"",this._tokenStructuralPropertyT=null}}function Cr(Jr){let zr=0;for(let Gr=0,tn=Jr.length;Gr>>0),Jr[Gr]=zr&255,zr>>>=8}xt.Random=void 0,function(Jr){Jr.getRandomValues=(()=>{let zr=typeof window<"u"&&(window.crypto||window.msCrypto)||null;return zr&&typeof zr.getRandomValues=="function"?function(tn){return zr.getRandomValues(tn)}:Cr})()}(xt.Random||(xt.Random={}));function jr(Jr){let zr=new Uint8Array(16),Gr=new Array(256);for(let tn=0;tn<16;++tn)Gr[tn]="0"+tn.toString(16);for(let tn=16;tn<256;++tn)Gr[tn]=tn.toString(16);return function(){return Jr(zr),zr[6]=64|zr[6]&15,zr[8]=128|zr[8]&63,Gr[zr[0]]+Gr[zr[1]]+Gr[zr[2]]+Gr[zr[3]]+"-"+Gr[zr[4]]+Gr[zr[5]]+"-"+Gr[zr[6]]+Gr[zr[7]]+"-"+Gr[zr[8]]+Gr[zr[9]]+"-"+Gr[zr[10]]+Gr[zr[11]]+Gr[zr[12]]+Gr[zr[13]]+Gr[zr[14]]+Gr[zr[15]]}}xt.UUID=void 0,function(Jr){Jr.uuid4=jr(xt.Random.getRandomValues)}(xt.UUID||(xt.UUID={})),xt.MimeData=st,xt.PluginRegistry=ft,xt.PromiseDelegate=Xt,xt.Token=Hr})});var fA=ab((cA,Tg)=>{(function(xt,be){typeof Tg=="object"&&Tg.exports?Tg.exports=be():xt.moduleName=be()})(typeof self<"u"?self:cA,()=>{"use strict";var xt=(()=>{var be=Object.create,st=Object.defineProperty,ft=Object.defineProperties,Lt=Object.getOwnPropertyDescriptor,Xt=Object.getOwnPropertyDescriptors,Hr=Object.getOwnPropertyNames,Cr=Object.getOwnPropertySymbols,jr=Object.getPrototypeOf,Jr=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,Gr=(J,V)=>(V=Symbol[J])?V:Symbol.for("Symbol."+J),tn=J=>{throw TypeError(J)},Yr=(J,V,v)=>V in J?st(J,V,{enumerable:!0,configurable:!0,writable:!0,value:v}):J[V]=v,Nr=(J,V)=>{for(var v in V||(V={}))Jr.call(V,v)&&Yr(J,v,V[v]);if(Cr)for(var v of Cr(V))zr.call(V,v)&&Yr(J,v,V[v]);return J},Qr=(J,V)=>ft(J,Xt(V)),En=(J,V)=>{var v={};for(var x in J)Jr.call(J,x)&&V.indexOf(x)<0&&(v[x]=J[x]);if(J!=null&&Cr)for(var x of Cr(J))V.indexOf(x)<0&&zr.call(J,x)&&(v[x]=J[x]);return v},In=(J,V,v)=>function(){if(v)throw v[0];try{return J&&(V=(0,J[Hr(J)[0]])(J=0)),V}catch(E){throw v=[E],E}},Ee=(J,V)=>function(){try{return V||(0,J[Hr(J)[0]])((V={exports:{}}).exports,V),V.exports}catch(x){throw V=0,x}},yn=(J,V)=>{for(var v in V)st(J,v,{get:V[v],enumerable:!0})},Wn=(J,V,v,x)=>{if(V&&typeof V=="object"||typeof V=="function")for(let E of Hr(V))!Jr.call(J,E)&&E!==v&&st(J,E,{get:()=>V[E],enumerable:!(x=Lt(V,E))||x.enumerable});return J},Yn=(J,V,v)=>(v=J!=null?be(jr(J)):{},Wn(V||!J||!J.__esModule?st(v,"default",{value:J,enumerable:!0}):v,J)),ra=J=>Wn(st({},"__esModule",{value:!0}),J),ri=function(J,V){this[0]=J,this[1]=V},ni=J=>{var V=J[Gr("asyncIterator")],v=!1,x,E={};return V==null?(V=J[Gr("iterator")](),x=k=>E[k]=l=>V[k](l)):(V=V.call(J),x=k=>E[k]=l=>{if(v){if(v=!1,k==="throw")throw l;return l}return v=!0,{done:!1,value:new ri(new Promise(e=>{var t=V[k](l);t instanceof Object||tn("Object expected"),e(t)}),1)}}),E[Gr("iterator")]=()=>E,x("next"),"throw"in V?x("throw"):E.throw=k=>{throw k},"return"in V&&x("return"),E},qi=Ee({"src/version.js"(J){"use strict";J.version="4.0.0"}}),Ta=Ee({"node_modules/native-promise-only/lib/npo.src.js"(J,V){(function(x,E,k){E[x]=E[x]||k(),typeof V<"u"&&V.exports&&(V.exports=E[x])})("Promise",typeof window<"u"?window:J,function(){"use strict";var x,E,k,l=Object.prototype.toString,e=typeof setImmediate<"u"?function(w){return setImmediate(w)}:setTimeout;try{Object.defineProperty({},"x",{}),x=function(w,S,M,C){return Object.defineProperty(w,S,{value:M,writable:!0,configurable:C!==!1})}}catch{x=function(S,M,C){return S[M]=C,S}}k=function(){var w,S,M;function C(_,T){this.fn=_,this.self=T,this.next=void 0}return{add:function(T,f){M=new C(T,f),S?S.next=M:w=M,S=M,M=void 0},drain:function(){var T=w;for(w=S=E=void 0;T;)T.fn.call(T.self),T=T.next}}}();function t(i,w){k.add(i,w),E||(E=e(k.drain))}function a(i){var w,S=typeof i;return i!=null&&(S=="object"||S=="function")&&(w=i.then),typeof w=="function"?w:!1}function r(){for(var i=0;i0&&t(r,S))}catch(M){s.call(new m(S),M)}}}function s(i){var w=this;w.triggered||(w.triggered=!0,w.def&&(w=w.def),w.msg=i,w.state=2,w.chain.length>0&&t(r,w))}function c(i,w,S,M){for(var C=0;CSe?1:he>=Se?0:NaN}v.descending=function(he,Se){return Sehe?1:Se>=he?0:NaN},v.min=function(he,Se){var je=-1,Qe=he.length,tt,ut;if(arguments.length===1){for(;++je=ut){tt=ut;break}for(;++jeut&&(tt=ut)}else{for(;++je=ut){tt=ut;break}for(;++jeut&&(tt=ut)}return tt},v.max=function(he,Se){var je=-1,Qe=he.length,tt,ut;if(arguments.length===1){for(;++je=ut){tt=ut;break}for(;++jett&&(tt=ut)}else{for(;++je=ut){tt=ut;break}for(;++jett&&(tt=ut)}return tt},v.extent=function(he,Se){var je=-1,Qe=he.length,tt,ut,jt;if(arguments.length===1){for(;++je=ut){tt=jt=ut;break}for(;++jeut&&(tt=ut),jt=ut){tt=jt=ut;break}for(;++jeut&&(tt=ut),jt1)return jt/(Qt-1)},v.deviation=function(){var he=v.variance.apply(this,arguments);return he&&Math.sqrt(he)};function h(he){return{left:function(Se,je,Qe,tt){for(arguments.length<3&&(Qe=0),arguments.length<4&&(tt=Se.length);Qe>>1;he(Se[ut],je)<0?Qe=ut+1:tt=ut}return Qe},right:function(Se,je,Qe,tt){for(arguments.length<3&&(Qe=0),arguments.length<4&&(tt=Se.length);Qe>>1;he(Se[ut],je)>0?tt=ut:Qe=ut+1}return Qe}}}var p=h(s);v.bisectLeft=p.left,v.bisect=v.bisectRight=p.right,v.bisector=function(he){return h(he.length===1?function(Se,je){return s(he(Se),je)}:he)},v.shuffle=function(he,Se,je){(Qe=arguments.length)<3&&(je=he.length,Qe<2&&(Se=0));for(var Qe=je-Se,tt,ut;Qe;)ut=Math.random()*Qe--|0,tt=he[Qe+Se],he[Qe+Se]=he[ut+Se],he[ut+Se]=tt;return he},v.permute=function(he,Se){for(var je=Se.length,Qe=new Array(je);je--;)Qe[je]=he[Se[je]];return Qe},v.pairs=function(he){for(var Se=0,je=he.length-1,Qe,tt=he[0],ut=new Array(je<0?0:je);Se=0;)for(jt=he[Se],je=jt.length;--je>=0;)ut[--tt]=jt[je];return ut};var i=Math.abs;v.range=function(he,Se,je){if(arguments.length<3&&(je=1,arguments.length<2&&(Se=he,he=0)),(Se-he)/je===1/0)throw new Error("infinite range");var Qe=[],tt=w(i(je)),ut=-1,jt;if(he*=tt,Se*=tt,je*=tt,je<0)for(;(jt=he+je*++ut)>Se;)Qe.push(jt/tt);else for(;(jt=he+je*++ut)=Se.length)return tt?tt.call(he,Qt):Qe?Qt.sort(Qe):Qt;for(var yr=-1,Kr=Qt.length,$r=Se[gr++],bn,Rn,rn,pn=new M,xn;++yr=Se.length)return St;var gr=[],yr=je[Qt++];return St.forEach(function(Kr,$r){gr.push({key:Kr,values:jt($r,Qt)})}),yr?gr.sort(function(Kr,$r){return yr(Kr.key,$r.key)}):gr}return he.map=function(St,Qt){return ut(Qt,St,0)},he.entries=function(St){return jt(ut(v.map,St,0),0)},he.key=function(St){return Se.push(St),he},he.sortKeys=function(St){return je[Se.length-1]=St,he},he.sortValues=function(St){return Qe=St,he},he.rollup=function(St){return tt=St,he},he},v.set=function(he){var Se=new N;if(he)for(var je=0,Qe=he.length;je=0&&(Qe=he.slice(je+1),he=he.slice(0,je)),he)return arguments.length<2?this[he].on(Qe):this[he].on(Qe,Se);if(arguments.length===2){if(Se==null)for(he in this)this.hasOwnProperty(he)&&this[he].on(Qe,null);return this}};function Z(he){var Se=[],je=new M;function Qe(){for(var tt=Se,ut=-1,jt=tt.length,St;++ut=0&&(je=he.slice(0,Se))!=="xmlns"&&(he=he.slice(Se+1)),fe.hasOwnProperty(je)?{space:fe[je],local:he}:he}},q.attr=function(he,Se){if(arguments.length<2){if(typeof he=="string"){var je=this.node();return he=v.ns.qualify(he),he.local?je.getAttributeNS(he.space,he.local):je.getAttribute(he)}for(Se in he)this.each(ye(Se,he[Se]));return this}return this.each(ye(he,Se))};function ye(he,Se){he=v.ns.qualify(he);function je(){this.removeAttribute(he)}function Qe(){this.removeAttributeNS(he.space,he.local)}function tt(){this.setAttribute(he,Se)}function ut(){this.setAttributeNS(he.space,he.local,Se)}function jt(){var Qt=Se.apply(this,arguments);Qt==null?this.removeAttribute(he):this.setAttribute(he,Qt)}function St(){var Qt=Se.apply(this,arguments);Qt==null?this.removeAttributeNS(he.space,he.local):this.setAttributeNS(he.space,he.local,Qt)}return Se==null?he.local?Qe:je:typeof Se=="function"?he.local?St:jt:he.local?ut:tt}function xe(he){return he.trim().replace(/\s+/g," ")}q.classed=function(he,Se){if(arguments.length<2){if(typeof he=="string"){var je=this.node(),Qe=(he=Me(he)).length,tt=-1;if(Se=je.classList){for(;++tt=0;)(ut=je[Qe])&&(tt&&tt!==ut.nextSibling&&tt.parentNode.insertBefore(ut,tt),tt=ut);return this},q.sort=function(he){he=Te.apply(this,arguments);for(var Se=-1,je=this.length;++Se=Se&&(Se=tt+1);!(Qt=jt[Se])&&++Se0&&(he=he.slice(0,tt));var jt=Tt.get(he);jt&&(he=jt,ut=Kt);function St(){var yr=this[Qe];yr&&(this.removeEventListener(he,yr,yr.$),delete this[Qe])}function Qt(){var yr=ut(Se,E(arguments));St.call(this),this.addEventListener(he,this[Qe]=yr,yr.$=je),yr._=Se}function gr(){var yr=new RegExp("^__on([^.]+)"+v.requote(he)+"$"),Kr;for(var $r in this)if(Kr=$r.match(yr)){var bn=this[$r];this.removeEventListener(Kr[1],bn,bn.$),delete this[$r]}}return tt?Se?Qt:St:Se?j:gr}var Tt=v.map({mouseenter:"mouseover",mouseleave:"mouseout"});k&&Tt.forEach(function(he){"on"+he in k&&Tt.remove(he)});function At(he,Se){return function(je){var Qe=v.event;v.event=je,Se[0]=this.__data__;try{he.apply(this,Se)}finally{v.event=Qe}}}function Kt(he,Se){var je=At(he,Se);return function(Qe){var tt=this,ut=Qe.relatedTarget;(!ut||ut!==tt&&!(ut.compareDocumentPosition(tt)&8))&&je.call(tt,Qe)}}var nr,_r=0;function Zt(he){var Se=".dragsuppress-"+ ++_r,je="click"+Se,Qe=v.select(e(he)).on("touchmove"+Se,Q).on("dragstart"+Se,Q).on("selectstart"+Se,Q);if(nr==null&&(nr="onselectstart"in he?!1:F(he.style,"userSelect")),nr){var tt=l(he).style,ut=tt[nr];tt[nr]="none"}return function(jt){if(Qe.on(Se,null),nr&&(tt[nr]=ut),jt){var St=function(){Qe.on(je,null)};Qe.on(je,function(){Q(),St()},!0),setTimeout(St,0)}}}v.mouse=function(he){return Ot(he,re())};var sr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ot(he,Se){Se.changedTouches&&(Se=Se.changedTouches[0]);var je=he.ownerSVGElement||he;if(je.createSVGPoint){var Qe=je.createSVGPoint();if(sr<0){var tt=e(he);if(tt.scrollX||tt.scrollY){je=v.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var ut=je[0][0].getScreenCTM();sr=!(ut.f||ut.e),je.remove()}}return sr?(Qe.x=Se.pageX,Qe.y=Se.pageY):(Qe.x=Se.clientX,Qe.y=Se.clientY),Qe=Qe.matrixTransform(he.getScreenCTM().inverse()),[Qe.x,Qe.y]}var jt=he.getBoundingClientRect();return[Se.clientX-jt.left-he.clientLeft,Se.clientY-jt.top-he.clientTop]}v.touch=function(he,Se,je){if(arguments.length<3&&(je=Se,Se=re().changedTouches),Se){for(var Qe=0,tt=Se.length,ut;Qe0?1:he<0?-1:0}function Dt(he,Se,je){return(Se[0]-he[0])*(je[1]-he[1])-(Se[1]-he[1])*(je[0]-he[0])}function Ct(he){return he>1?0:he<-1?Be:Math.acos(he)}function Vt(he){return he>1?Ze:he<-1?-Ze:Math.asin(he)}function Ht(he){return((he=Math.exp(he))-1/he)/2}function Wt(he){return((he=Math.exp(he))+1/he)/2}function Sr(he){return((he=Math.exp(2*he))-1)/(he+1)}function on(he){return(he=Math.sin(he/2))*he}var $t=Math.SQRT2,It=2,ir=4;v.interpolateZoom=function(he,Se){var je=he[0],Qe=he[1],tt=he[2],ut=Se[0],jt=Se[1],St=Se[2],Qt=ut-je,gr=jt-Qe,yr=Qt*Qt+gr*gr,Kr,$r;if(yr0&&(_e=_e.transition().duration(jt)),_e.call(Fn.event)}function Oi(){pn&&pn.domain(rn.range().map(function(_e){return(_e-he.x)/he.k}).map(rn.invert)),Bn&&Bn.domain(xn.range().map(function(_e){return(_e-he.y)/he.k}).map(xn.invert))}function Pi(_e){St++||_e({type:"zoomstart"})}function ko(_e){Oi(),_e({type:"zoom",scale:he.k,translate:[he.x,he.y]})}function de(_e){--St||(_e({type:"zoomend"}),je=null)}function y(){var _e=this,De=Rn.of(_e,arguments),Ne=0,Ye=v.select(e(_e)).on(gr,Ft).on(yr,Gt),lt=mn(v.mouse(_e)),ct=Zt(_e);bo.call(_e),Pi(De);function Ft(){Ne=1,Ka(v.mouse(_e),lt),ko(De)}function Gt(){Ye.on(gr,null).on(yr,null),ct(Ne),de(De)}}function O(){var _e=this,De=Rn.of(_e,arguments),Ne={},Ye=0,lt,ct=".zoom-"+v.event.changedTouches[0].identifier,Ft="touchmove"+ct,Gt="touchend"+ct,Jt=[],it=v.select(_e),Rt=Zt(_e);or(),Pi(De),it.on(Qt,null).on($r,or);function qt(){var dr=v.touches(_e);return lt=he.k,dr.forEach(function(mr){mr.identifier in Ne&&(Ne[mr.identifier]=mn(mr))}),dr}function or(){var dr=v.event.target;v.select(dr).on(Ft,vr).on(Gt,Ar),Jt.push(dr);for(var mr=v.event.changedTouches,qr=0,Lr=mr.length;qr1){var Dn=cn[0],qn=cn[1],_n=Dn[0]-qn[0],vn=Dn[1]-qn[1];Ye=_n*_n+vn*vn}}function vr(){var dr=v.touches(_e),mr,qr,Lr,cn;bo.call(_e);for(var Nn=0,Dn=dr.length;Nn1?1:Se,je=je<0?0:je>1?1:je,tt=je<=.5?je*(1+Se):je+Se-je*Se,Qe=2*je-tt;function ut(St){return St>360?St-=360:St<0&&(St+=360),St<60?Qe+(tt-Qe)*St/60:St<180?tt:St<240?Qe+(tt-Qe)*(240-St)/60:Qe}function jt(St){return Math.round(ut(St)*255)}return new Kn(jt(he+120),jt(he),jt(he-120))}v.hcl=jn;function jn(he,Se,je){return this instanceof jn?(this.h=+he,this.c=+Se,void(this.l=+je)):arguments.length<2?he instanceof jn?new jn(he.h,he.c,he.l):he instanceof Qn?pa(he.l,he.a,he.b):pa((he=Fr((he=v.rgb(he)).r,he.g,he.b)).l,he.a,he.b):new jn(he,Se,je)}var Aa=jn.prototype=new ln;Aa.brighter=function(he){return new jn(this.h,this.c,Math.min(100,this.l+ei*(arguments.length?he:1)))},Aa.darker=function(he){return new jn(this.h,this.c,Math.max(0,this.l-ei*(arguments.length?he:1)))},Aa.rgb=function(){return ua(this.h,this.c,this.l).rgb()};function ua(he,Se,je){return isNaN(he)&&(he=0),isNaN(Se)&&(Se=0),new Qn(je,Math.cos(he*=Je)*Se,Math.sin(he)*Se)}v.lab=Qn;function Qn(he,Se,je){return this instanceof Qn?(this.l=+he,this.a=+Se,void(this.b=+je)):arguments.length<2?he instanceof Qn?new Qn(he.l,he.a,he.b):he instanceof jn?ua(he.h,he.c,he.l):Fr((he=Kn(he)).r,he.g,he.b):new Qn(he,Se,je)}var ei=18,Fa=.95047,ai=1,Mi=1.08883,ci=Qn.prototype=new ln;ci.brighter=function(he){return new Qn(Math.min(100,this.l+ei*(arguments.length?he:1)),this.a,this.b)},ci.darker=function(he){return new Qn(Math.max(0,this.l-ei*(arguments.length?he:1)),this.a,this.b)},ci.rgb=function(){return ba(this.l,this.a,this.b)};function ba(he,Se,je){var Qe=(he+16)/116,tt=Qe+Se/500,ut=Qe-je/200;return tt=Ii(tt)*Fa,Qe=Ii(Qe)*ai,ut=Ii(ut)*Mi,new Kn(da(3.2404542*tt-1.5371385*Qe-.4985314*ut),da(-.969266*tt+1.8760108*Qe+.041556*ut),da(.0556434*tt-.2040259*Qe+1.0572252*ut))}function pa(he,Se,je){return he>0?new jn(Math.atan2(je,Se)*Mt,Math.sqrt(Se*Se+je*je),he):new jn(NaN,NaN,he)}function Ii(he){return he>.206893034?he*he*he:(he-4/29)/7.787037}function ho(he){return he>.008856?Math.pow(he,1/3):7.787037*he+4/29}function da(he){return Math.round(255*(he<=.00304?12.92*he:1.055*Math.pow(he,1/2.4)-.055))}v.rgb=Kn;function Kn(he,Se,je){return this instanceof Kn?(this.r=~~he,this.g=~~Se,void(this.b=~~je)):arguments.length<2?he instanceof Kn?new Kn(he.r,he.g,he.b):Tr(""+he,Kn,Un):new Kn(he,Se,je)}function ot(he){return new Kn(he>>16,he>>8&255,he&255)}function et(he){return ot(he)+""}var hr=Kn.prototype=new ln;hr.brighter=function(he){he=Math.pow(.7,arguments.length?he:1);var Se=this.r,je=this.g,Qe=this.b,tt=30;return!Se&&!je&&!Qe?new Kn(tt,tt,tt):(Se&&Se>4,Qe=Qe>>4|Qe,tt=Qt&240,tt=tt>>4|tt,ut=Qt&15,ut=ut<<4|ut):he.length===7&&(Qe=(Qt&16711680)>>16,tt=(Qt&65280)>>8,ut=Qt&255)),Se(Qe,tt,ut))}function Rr(he,Se,je){var Qe=Math.min(he/=255,Se/=255,je/=255),tt=Math.max(he,Se,je),ut=tt-Qe,jt,St,Qt=(tt+Qe)/2;return ut?(St=Qt<.5?ut/(tt+Qe):ut/(2-tt-Qe),he==tt?jt=(Se-je)/ut+(Se0&&Qt<1?0:jt),new nn(jt,St,Qt)}function Fr(he,Se,je){he=at(he),Se=at(Se),je=at(je);var Qe=ho((.4124564*he+.3575761*Se+.1804375*je)/Fa),tt=ho((.2126729*he+.7151522*Se+.072175*je)/ai),ut=ho((.0193339*he+.119192*Se+.9503041*je)/Mi);return Qn(116*tt-16,500*(Qe-tt),200*(tt-ut))}function at(he){return(he/=255)<=.04045?he/12.92:Math.pow((he+.055)/1.055,2.4)}function kt(he){var Se=parseFloat(he);return he.charAt(he.length-1)==="%"?Math.round(Se*2.55):Se}var Ut=v.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Ut.forEach(function(he,Se){Ut.set(he,ot(Se))});function ar(he){return typeof he=="function"?he:function(){return he}}v.functor=ar,v.xhr=Er(R);function Er(he){return function(Se,je,Qe){return arguments.length===2&&typeof je=="function"&&(Qe=je,je=null),br(Se,je,he,Qe)}}function br(he,Se,je,Qe){var tt={},ut=v.dispatch("beforesend","progress","load","error"),jt={},St=new XMLHttpRequest,Qt=null;self.XDomainRequest&&!("withCredentials"in St)&&/^(http(s)?:)?\/\//.test(he)&&(St=new XDomainRequest),"onload"in St?St.onload=St.onerror=gr:St.onreadystatechange=function(){St.readyState>3&&gr()};function gr(){var yr=St.status,Kr;if(!yr&&Pr(St)||yr>=200&&yr<300||yr===304){try{Kr=je.call(tt,St)}catch($r){ut.error.call(tt,$r);return}ut.load.call(tt,Kr)}else ut.error.call(tt,St)}return St.onprogress=function(yr){var Kr=v.event;v.event=yr;try{ut.progress.call(tt,St)}finally{v.event=Kr}},tt.header=function(yr,Kr){return yr=(yr+"").toLowerCase(),arguments.length<2?jt[yr]:(Kr==null?delete jt[yr]:jt[yr]=Kr+"",tt)},tt.mimeType=function(yr){return arguments.length?(Se=yr==null?null:yr+"",tt):Se},tt.responseType=function(yr){return arguments.length?(Qt=yr,tt):Qt},tt.response=function(yr){return je=yr,tt},["get","post"].forEach(function(yr){tt[yr]=function(){return tt.send.apply(tt,[yr].concat(E(arguments)))}}),tt.send=function(yr,Kr,$r){if(arguments.length===2&&typeof Kr=="function"&&($r=Kr,Kr=null),St.open(yr,he,!0),Se!=null&&!("accept"in jt)&&(jt.accept=Se+",*/*"),St.setRequestHeader)for(var bn in jt)St.setRequestHeader(bn,jt[bn]);return Se!=null&&St.overrideMimeType&&St.overrideMimeType(Se),Qt!=null&&(St.responseType=Qt),$r!=null&&tt.on("error",$r).on("load",function(Rn){$r(null,Rn)}),ut.beforesend.call(tt,St),St.send(Kr??null),tt},tt.abort=function(){return St.abort(),tt},v.rebind(tt,ut,"on"),Qe==null?tt:tt.get(Or(Qe))}function Or(he){return he.length===1?function(Se,je){he(Se==null?je:null)}:he}function Pr(he){var Se=he.responseType;return Se&&Se!=="text"?he.response:he.responseText}v.dsv=function(he,Se){var je=new RegExp('["'+he+` -]`),Qe=he.charCodeAt(0);function tt(gr,yr,Kr){arguments.length<3&&(Kr=yr,yr=null);var $r=br(gr,Se,yr==null?ut:jt(yr),Kr);return $r.row=function(bn){return arguments.length?$r.response((yr=bn)==null?ut:jt(bn)):yr},$r}function ut(gr){return tt.parse(gr.responseText)}function jt(gr){return function(yr){return tt.parse(yr.responseText,gr)}}tt.parse=function(gr,yr){var Kr;return tt.parseRows(gr,function($r,bn){if(Kr)return Kr($r,bn-1);var Rn=function(rn){for(var pn={},xn=$r.length,Bn=0;Bn=Rn)return $r;if(Bn)return Bn=!1,Kr;var Ea=rn;if(gr.charCodeAt(Ea)===34){for(var Oa=Ea;Oa++()=>(be||xt((be={exports:{}}).exports,be),be.exports);var $F=(xt,be,st,ft)=>{if(be&&typeof be=="object"||typeof be=="function")for(let Lt of WF(be))!XF.call(xt,Lt)&&Lt!==st&&eA(xt,Lt,{get:()=>be[Lt],enumerable:!(ft=GF(be,Lt))||ft.enumerable});return xt};var sd=(xt,be,st)=>(st=xt!=null?HF(YF(xt)):{},$F(be||!xt||!xt.__esModule?eA(st,"default",{value:xt,enumerable:!0}):st,xt));var yv=nb((cg,tA)=>{(function(xt,be){typeof cg=="object"&&typeof tA<"u"?be(cg):typeof define=="function"&&define.amd?define(["exports"],be):(xt=typeof globalThis<"u"?globalThis:xt||self,be(xt.lumino_algorithm={}))})(cg,function(xt){"use strict";xt.ArrayExt=void 0,function(Tn){function Va(Ei,Hi,nn=0,In=-1){let Rn=Ei.length;if(Rn===0)return-1;nn<0?nn=Math.max(0,nn+Rn):nn=Math.min(nn,Rn-1),In<0?In=Math.max(0,In+Rn):In=Math.min(In,Rn-1);let ao;In0;){let Qn=rs>>1,uh=po+Qn;nn(Ei[uh],Hi)<0?(po=uh+1,rs-=Qn+1):rs=Qn}return po}Tn.lowerBound=Qi;function iu(Ei,Hi,nn,In=0,Rn=-1){let ao=Ei.length;if(ao===0)return 0;In<0?In=Math.max(0,In+ao):In=Math.min(In,ao-1),Rn<0?Rn=Math.max(0,Rn+ao):Rn=Math.min(Rn,ao-1);let po=In,rs=Rn-In+1;for(;rs>0;){let Qn=rs>>1,uh=po+Qn;nn(Ei[uh],Hi)>0?rs=Qn:(po=uh+1,rs-=Qn+1)}return po}Tn.upperBound=iu;function Us(Ei,Hi,nn){if(Ei===Hi)return!0;if(Ei.length!==Hi.length)return!1;for(let In=0,Rn=Ei.length;In=ao&&(nn=Rn<0?ao-1:ao),In===void 0?In=Rn<0?-1:ao:In<0?In=Math.max(In+ao,Rn<0?-1:0):In>=ao&&(In=Rn<0?ao-1:ao);let po;Rn<0&&In>=nn||Rn>0&&nn>=In?po=0:Rn<0?po=Math.floor((In-nn+1)/Rn+1):po=Math.floor((In-nn-1)/Rn+1);let rs=[];for(let Qn=0;Qn=In))return;let ao=In-nn+1;if(Hi>0?Hi=Hi%ao:Hi<0&&(Hi=(Hi%ao+ao)%ao),Hi===0)return;let po=nn+Hi;ec(Ei,nn,po-1),ec(Ei,po,In),ec(Ei,nn,In)}Tn.rotate=Ec;function Jf(Ei,Hi,nn=0,In=-1){let Rn=Ei.length;if(Rn===0)return;nn<0?nn=Math.max(0,nn+Rn):nn=Math.min(nn,Rn-1),In<0?In=Math.max(0,In+Rn):In=Math.min(In,Rn-1);let ao;InHi;--Rn)Ei[Rn]=Ei[Rn-1];Ei[Hi]=nn}Tn.insert=Ag;function lh(Ei,Hi){let nn=Ei.length;if(Hi<0&&(Hi+=nn),Hi<0||Hi>=nn)return;let In=Ei[Hi];for(let Rn=Hi+1;Rn=nn&&po<=In&&Ei[po]===Hi||In=nn)&&Ei[po]===Hi?ao++:ao>0&&(Ei[po-ao]=Ei[po]);return ao>0&&(Ei.length=Rn-ao),ao}Tn.removeAllOf=Vd;function vo(Ei,Hi,nn=0,In=-1){let Rn,ao=ji(Ei,Hi,nn,In);return ao!==-1&&(Rn=lh(Ei,ao)),{index:ao,value:Rn}}Tn.removeFirstWhere=vo;function Xs(Ei,Hi,nn=-1,In=0){let Rn,ao=ls(Ei,Hi,nn,In);return ao!==-1&&(Rn=lh(Ei,ao)),{index:ao,value:Rn}}Tn.removeLastWhere=Xs;function Mv(Ei,Hi,nn=0,In=-1){let Rn=Ei.length;if(Rn===0)return 0;nn<0?nn=Math.max(0,nn+Rn):nn=Math.min(nn,Rn-1),In<0?In=Math.max(0,In+Rn):In=Math.min(In,Rn-1);let ao=0;for(let po=0;po=nn&&po<=In&&Hi(Ei[po],po)||In=nn)&&Hi(Ei[po],po)?ao++:ao>0&&(Ei[po-ao]=Ei[po]);return ao>0&&(Ei.length=Rn-ao),ao}Tn.removeAllWhere=Mv}(xt.ArrayExt||(xt.ArrayExt={}));function*be(...Tn){for(let Va of Tn)yield*Va}function*st(){}function*ft(Tn,Va=0){for(let ki of Tn)yield[Va++,ki]}function*Lt(Tn,Va){let ki=0;for(let ji of Tn)Va(ji,ki++)&&(yield ji)}function Xt(Tn,Va){let ki=0;for(let ji of Tn)if(Va(ji,ki++))return ji}function Hr(Tn,Va){let ki=0;for(let ji of Tn)if(Va(ji,ki++))return ki-1;return-1}function Cr(Tn,Va){let ki;for(let ji of Tn){if(ki===void 0){ki=ji;continue}Va(ji,ki)<0&&(ki=ji)}return ki}function jr(Tn,Va){let ki;for(let ji of Tn){if(ki===void 0){ki=ji;continue}Va(ji,ki)>0&&(ki=ji)}return ki}function Jr(Tn,Va){let ki=!0,ji,ls;for(let Ys of Tn)ki?(ji=Ys,ls=Ys,ki=!1):Va(Ys,ji)<0?ji=Ys:Va(Ys,ls)>0&&(ls=Ys);return ki?void 0:[ji,ls]}function zr(Tn){return Array.from(Tn)}function Gr(Tn){let Va={};for(let[ki,ji]of Tn)Va[ki]=ji;return Va}function ta(Tn,Va){let ki=0;for(let ji of Tn)if(Va(ji,ki++)===!1)return}function Yr(Tn,Va){let ki=0;for(let ji of Tn)if(Va(ji,ki++)===!1)return!1;return!0}function Nr(Tn,Va){let ki=0;for(let ji of Tn)if(Va(ji,ki++))return!0;return!1}function*Qr(Tn,Va){let ki=0;for(let ji of Tn)yield Va(ji,ki++)}function*Sa(Tn,Va,ki){Va===void 0?(Va=Tn,Tn=0,ki=1):ki===void 0&&(ki=1);let ji=Da.rangeLength(Tn,Va,ki);for(let ls=0;lsji&&ls>0||ki-1;Va--)yield Tn[Va]}function tn(Tn){let Va=[],ki=new Set,ji=new Map;for(let mi of Tn)ls(mi);for(let[mi]of ji)Ys(mi);return Va;function ls(mi){let[Qi,iu]=mi,Us=ji.get(iu);Us?Us.push(Qi):ji.set(iu,[Qi])}function Ys(mi){if(ki.has(mi))return;ki.add(mi);let Qi=ji.get(mi);if(Qi)for(let iu of Qi)Ys(iu);Va.push(mi)}}function*ri(Tn,Va){let ki=0;for(let ji of Tn)ki++%Va===0&&(yield ji)}xt.StringExt=void 0,function(Tn){function Va(mi,Qi,iu=0){let Us=new Array(Qi.length);for(let vs=0,dl=iu,ec=Qi.length;vsQi?1:0}Tn.cmp=Ys}(xt.StringExt||(xt.StringExt={}));function*ai(Tn,Va){if(Va<1)return;let ki=Tn[Symbol.iterator](),ji;for(;0ji[Symbol.iterator]()),ki=Va.map(ji=>ji.next());for(;Yr(ki,ji=>!ji.done);ki=Va.map(ji=>ji.next()))yield ki.map(ji=>ji.value)}xt.chain=be,xt.each=ta,xt.empty=st,xt.enumerate=ft,xt.every=Yr,xt.filter=Lt,xt.find=Xt,xt.findIndex=Hr,xt.map=Qr,xt.max=jr,xt.min=Cr,xt.minmax=Jr,xt.once=Ga,xt.range=Sa,xt.reduce=Ee,xt.repeat=ga,xt.retro=Wa,xt.some=Nr,xt.stride=ri,xt.take=ai,xt.toArray=zr,xt.toObject=Gr,xt.topologicSort=tn,xt.zip=qi})});var hg=nb((fg,rA)=>{(function(xt,be){typeof fg=="object"&&typeof rA<"u"?be(fg,yv()):typeof define=="function"&&define.amd?define(["exports","@lumino/algorithm"],be):(xt=typeof globalThis<"u"?globalThis:xt||self,be(xt.lumino_coreutils={},xt.lumino_algorithm))})(fg,function(xt,be){"use strict";xt.JSONExt=void 0,function(Jr){Jr.emptyObject=Object.freeze({}),Jr.emptyArray=Object.freeze([]);function zr(ga){return ga===null||typeof ga=="boolean"||typeof ga=="number"||typeof ga=="string"}Jr.isPrimitive=zr;function Gr(ga){return Array.isArray(ga)}Jr.isArray=Gr;function ta(ga){return!zr(ga)&&!Gr(ga)}Jr.isObject=ta;function Yr(ga,Ga){if(ga===Ga)return!0;if(zr(ga)||zr(Ga))return!1;let Wa=Gr(ga),tn=Gr(Ga);return Wa!==tn?!1:Wa&&tn?Qr(ga,Ga):Sa(ga,Ga)}Jr.deepEqual=Yr;function Nr(ga){return zr(ga)?ga:Gr(ga)?Da(ga):Ee(ga)}Jr.deepCopy=Nr;function Qr(ga,Ga){if(ga===Ga)return!0;if(ga.length!==Ga.length)return!1;for(let Wa=0,tn=ga.length;Wa!0,this._plugins=new Map,this._services=new Map,zr.validatePlugin&&(console.info("Plugins may be rejected by the custom validation plugin method."),this._validatePlugin=zr.validatePlugin)}get application(){return this._application}set application(zr){if(this._application!==null)throw Error("PluginRegistry.application is already set. It cannot be overridden.");this._application=zr}get deferredPlugins(){return Array.from(this._plugins).filter(([zr,Gr])=>Gr.autoStart==="defer").map(([zr,Gr])=>zr)}getPluginDescription(zr){var Gr,ta;return(ta=(Gr=this._plugins.get(zr))===null||Gr===void 0?void 0:Gr.description)!==null&&ta!==void 0?ta:""}hasPlugin(zr){return this._plugins.has(zr)}isPluginActivated(zr){var Gr,ta;return(ta=(Gr=this._plugins.get(zr))===null||Gr===void 0?void 0:Gr.activated)!==null&&ta!==void 0?ta:!1}listPlugins(){return Array.from(this._plugins.keys())}registerPlugin(zr){if(this._plugins.has(zr.id))throw new TypeError(`Plugin '${zr.id}' is already registered.`);if(!this._validatePlugin(zr))throw new Error(`Plugin '${zr.id}' is not valid.`);let Gr=Lt.createPluginData(zr);Lt.ensureNoCycle(Gr,this._plugins,this._services),Gr.provides&&this._services.set(Gr.provides,Gr.id),this._plugins.set(Gr.id,Gr)}registerPlugins(zr){for(let Gr of zr)this.registerPlugin(Gr)}deregisterPlugin(zr,Gr){let ta=this._plugins.get(zr);if(ta){if(ta.activated&&!Gr)throw new Error(`Plugin '${zr}' is still active.`);this._plugins.delete(zr)}}async activatePlugin(zr){let Gr=this._plugins.get(zr);if(!Gr)throw new ReferenceError(`Plugin '${zr}' is not registered.`);if(Gr.activated)return;if(Gr.promise)return Gr.promise;let ta=Gr.requires.map(Nr=>this.resolveRequiredService(Nr)),Yr=Gr.optional.map(Nr=>this.resolveOptionalService(Nr));return Gr.promise=Promise.all([...ta,...Yr]).then(Nr=>Gr.activate.apply(void 0,[this.application,...Nr])).then(Nr=>{Gr.service=Nr,Gr.activated=!0,Gr.promise=null}).catch(Nr=>{throw Gr.promise=null,Nr}),Gr.promise}async activatePlugins(zr,Gr={}){switch(zr){case"defer":{let ta=this.deferredPlugins.filter(Yr=>this._plugins.get(Yr).autoStart).map(Yr=>this.activatePlugin(Yr));await Promise.all(ta);break}case"startUp":{let Yr=Lt.collectStartupPlugins(this._plugins,Gr).map(async Nr=>{try{return await this.activatePlugin(Nr)}catch(Qr){console.error(`Plugin '${Nr}' failed to activate.`,Qr)}});await Promise.all(Yr);break}}}async deactivatePlugin(zr){let Gr=this._plugins.get(zr);if(!Gr)throw new ReferenceError(`Plugin '${zr}' is not registered.`);if(!Gr.activated)return[];if(!Gr.deactivate)throw new TypeError(`Plugin '${zr}'#deactivate() method missing`);let ta=Lt.findDependents(zr,this._plugins,this._services),Yr=ta.map(Nr=>this._plugins.get(Nr));for(let Nr of Yr)if(!Nr.deactivate)throw new TypeError(`Plugin ${Nr.id}#deactivate() method missing (depends on ${zr})`);for(let Nr of Yr){let Qr=[...Nr.requires,...Nr.optional].map(Sa=>{let Da=this._services.get(Sa);return Da?this._plugins.get(Da).service:null});await Nr.deactivate(this.application,...Qr),Nr.service=null,Nr.activated=!1}return ta.pop(),ta}async resolveRequiredService(zr){let Gr=this._services.get(zr);if(!Gr)throw new TypeError(`No provider for: ${zr.name}.`);let ta=this._plugins.get(Gr);return ta.activated||await this.activatePlugin(Gr),ta.service}async resolveOptionalService(zr){let Gr=this._services.get(zr);if(!Gr)return null;let ta=this._plugins.get(Gr);if(!ta.activated)try{await this.activatePlugin(Gr)}catch(Yr){return console.error(Yr),null}return ta.service}}var Lt;(function(Jr){class zr{constructor(Sa){var Da,Ee,ga,Ga;this._activated=!1,this._promise=null,this._service=null,this.id=Sa.id,this.description=(Da=Sa.description)!==null&&Da!==void 0?Da:"",this.activate=Sa.activate,this.deactivate=(Ee=Sa.deactivate)!==null&&Ee!==void 0?Ee:null,this.provides=(ga=Sa.provides)!==null&&ga!==void 0?ga:null,this.autoStart=(Ga=Sa.autoStart)!==null&&Ga!==void 0?Ga:!1,this.requires=Sa.requires?Sa.requires.slice():[],this.optional=Sa.optional?Sa.optional.slice():[]}get activated(){return this._activated}set activated(Sa){this._activated=Sa}get service(){return this._service}set service(Sa){this._service=Sa}get promise(){return this._promise}set promise(Sa){this._promise=Sa}}function Gr(Qr){return new zr(Qr)}Jr.createPluginData=Gr;function ta(Qr,Sa,Da){let Ee=[...Qr.requires,...Qr.optional],ga=Wa=>{if(Wa===Qr.provides)return!0;let tn=Da.get(Wa);if(!tn)return!1;let ri=Sa.get(tn),ai=[...ri.requires,...ri.optional];return ai.length===0?!1:(Ga.push(tn),ai.some(ga)?!0:(Ga.pop(),!1))};if(!Qr.provides||Ee.length===0)return;let Ga=[Qr.id];if(Ee.some(ga))throw new ReferenceError(`Cycle detected: ${Ga.join(" -> ")}.`)}Jr.ensureNoCycle=ta;function Yr(Qr,Sa,Da){let Ee=new Array,ga=ai=>{let qi=Sa.get(ai),Tn=[...qi.requires,...qi.optional];Ee.push(...Tn.reduce((Va,ki)=>{let ji=Da.get(ki);return ji&&Va.push([ai,ji]),Va},[]))};for(let ai of Sa.keys())ga(ai);let Ga=Ee.filter(ai=>ai[1]===Qr),Wa=0;for(;Ga.length>Wa;){let ai=Ga.length,qi=new Set(Ga.map(Tn=>Tn[0]));for(let Tn of qi)Ee.filter(Va=>Va[1]===Tn).forEach(Va=>{Ga.includes(Va)||Ga.push(Va)});Wa=ai}let tn=be.topologicSort(Ga),ri=tn.findIndex(ai=>ai===Qr);return ri===-1?[Qr]:tn.slice(0,ri+1)}Jr.findDependents=Yr;function Nr(Qr,Sa){let Da=new Set;for(let Ee of Qr.keys())Qr.get(Ee).autoStart===!0&&Da.add(Ee);if(Sa.startPlugins)for(let Ee of Sa.startPlugins)Da.add(Ee);if(Sa.ignorePlugins)for(let Ee of Sa.ignorePlugins)Da.delete(Ee);return Array.from(Da)}Jr.collectStartupPlugins=Nr})(Lt||(Lt={}));class Xt{constructor(){this.promise=new Promise((zr,Gr)=>{this._resolve=zr,this._reject=Gr})}resolve(zr){let Gr=this._resolve;Gr(zr)}reject(zr){let Gr=this._reject;Gr(zr)}}class Hr{constructor(zr,Gr){this.name=zr,this.description=Gr??"",this._tokenStructuralPropertyT=null}}function Cr(Jr){let zr=0;for(let Gr=0,ta=Jr.length;Gr>>0),Jr[Gr]=zr&255,zr>>>=8}xt.Random=void 0,function(Jr){Jr.getRandomValues=(()=>{let zr=typeof window<"u"&&(window.crypto||window.msCrypto)||null;return zr&&typeof zr.getRandomValues=="function"?function(ta){return zr.getRandomValues(ta)}:Cr})()}(xt.Random||(xt.Random={}));function jr(Jr){let zr=new Uint8Array(16),Gr=new Array(256);for(let ta=0;ta<16;++ta)Gr[ta]="0"+ta.toString(16);for(let ta=16;ta<256;++ta)Gr[ta]=ta.toString(16);return function(){return Jr(zr),zr[6]=64|zr[6]&15,zr[8]=128|zr[8]&63,Gr[zr[0]]+Gr[zr[1]]+Gr[zr[2]]+Gr[zr[3]]+"-"+Gr[zr[4]]+Gr[zr[5]]+"-"+Gr[zr[6]]+Gr[zr[7]]+"-"+Gr[zr[8]]+Gr[zr[9]]+"-"+Gr[zr[10]]+Gr[zr[11]]+Gr[zr[12]]+Gr[zr[13]]+Gr[zr[14]]+Gr[zr[15]]}}xt.UUID=void 0,function(Jr){Jr.uuid4=jr(xt.Random.getRandomValues)}(xt.UUID||(xt.UUID={})),xt.MimeData=st,xt.PluginRegistry=ft,xt.PromiseDelegate=Xt,xt.Token=Hr})});var fA=nb((cA,Tg)=>{(function(xt,be){typeof Tg=="object"&&Tg.exports?Tg.exports=be():xt.moduleName=be()})(typeof self<"u"?self:cA,()=>{"use strict";var xt=(()=>{var be=Object.create,st=Object.defineProperty,ft=Object.defineProperties,Lt=Object.getOwnPropertyDescriptor,Xt=Object.getOwnPropertyDescriptors,Hr=Object.getOwnPropertyNames,Cr=Object.getOwnPropertySymbols,jr=Object.getPrototypeOf,Jr=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,Gr=(J,H)=>(H=Symbol[J])?H:Symbol.for("Symbol."+J),ta=J=>{throw TypeError(J)},Yr=(J,H,v)=>H in J?st(J,H,{enumerable:!0,configurable:!0,writable:!0,value:v}):J[H]=v,Nr=(J,H)=>{for(var v in H||(H={}))Jr.call(H,v)&&Yr(J,v,H[v]);if(Cr)for(var v of Cr(H))zr.call(H,v)&&Yr(J,v,H[v]);return J},Qr=(J,H)=>ft(J,Xt(H)),Sa=(J,H)=>{var v={};for(var x in J)Jr.call(J,x)&&H.indexOf(x)<0&&(v[x]=J[x]);if(J!=null&&Cr)for(var x of Cr(J))H.indexOf(x)<0&&zr.call(J,x)&&(v[x]=J[x]);return v},Da=(J,H,v)=>function(){if(v)throw v[0];try{return J&&(H=(0,J[Hr(J)[0]])(J=0)),H}catch(E){throw v=[E],E}},Ee=(J,H)=>function(){try{return H||(0,J[Hr(J)[0]])((H={exports:{}}).exports,H),H.exports}catch(x){throw H=0,x}},ga=(J,H)=>{for(var v in H)st(J,v,{get:H[v],enumerable:!0})},Ga=(J,H,v,x)=>{if(H&&typeof H=="object"||typeof H=="function")for(let E of Hr(H))!Jr.call(J,E)&&E!==v&&st(J,E,{get:()=>H[E],enumerable:!(x=Lt(H,E))||x.enumerable});return J},Wa=(J,H,v)=>(v=J!=null?be(jr(J)):{},Ga(H||!J||!J.__esModule?st(v,"default",{value:J,enumerable:!0}):v,J)),tn=J=>Ga(st({},"__esModule",{value:!0}),J),ri=function(J,H){this[0]=J,this[1]=H},ai=J=>{var H=J[Gr("asyncIterator")],v=!1,x,E={};return H==null?(H=J[Gr("iterator")](),x=k=>E[k]=l=>H[k](l)):(H=H.call(J),x=k=>E[k]=l=>{if(v){if(v=!1,k==="throw")throw l;return l}return v=!0,{done:!1,value:new ri(new Promise(e=>{var t=H[k](l);t instanceof Object||ta("Object expected"),e(t)}),1)}}),E[Gr("iterator")]=()=>E,x("next"),"throw"in H?x("throw"):E.throw=k=>{throw k},"return"in H&&x("return"),E},qi=Ee({"src/version.js"(J){"use strict";J.version="4.1.0"}}),Tn=Ee({"node_modules/native-promise-only/lib/npo.src.js"(J,H){(function(x,E,k){E[x]=E[x]||k(),typeof H<"u"&&H.exports&&(H.exports=E[x])})("Promise",typeof window<"u"?window:J,function(){"use strict";var x,E,k,l=Object.prototype.toString,e=typeof setImmediate<"u"?function(T){return setImmediate(T)}:setTimeout;try{Object.defineProperty({},"x",{}),x=function(T,S,M,C){return Object.defineProperty(T,S,{value:M,writable:!0,configurable:C!==!1})}}catch{x=function(S,M,C){return S[M]=C,S}}k=function(){var T,S,M;function C(_,w){this.fn=_,this.self=w,this.next=void 0}return{add:function(w,h){M=new C(w,h),S?S.next=M:T=M,S=M,M=void 0},drain:function(){var w=T;for(T=S=E=void 0;w;)w.fn.call(w.self),w=w.next}}}();function t(i,T){k.add(i,T),E||(E=e(k.drain))}function n(i){var T,S=typeof i;return i!=null&&(S=="object"||S=="function")&&(T=i.then),typeof T=="function"?T:!1}function r(){for(var i=0;i0&&t(r,S))}catch(M){s.call(new g(S),M)}}}function s(i){var T=this;T.triggered||(T.triggered=!0,T.def&&(T=T.def),T.msg=i,T.state=2,T.chain.length>0&&t(r,T))}function c(i,T,S,M){for(var C=0;CSe?1:he>=Se?0:NaN}v.descending=function(he,Se){return Sehe?1:Se>=he?0:NaN},v.min=function(he,Se){var Ue=-1,Qe=he.length,tt,ut;if(arguments.length===1){for(;++Ue=ut){tt=ut;break}for(;++Ueut&&(tt=ut)}else{for(;++Ue=ut){tt=ut;break}for(;++Ueut&&(tt=ut)}return tt},v.max=function(he,Se){var Ue=-1,Qe=he.length,tt,ut;if(arguments.length===1){for(;++Ue=ut){tt=ut;break}for(;++Uett&&(tt=ut)}else{for(;++Ue=ut){tt=ut;break}for(;++Uett&&(tt=ut)}return tt},v.extent=function(he,Se){var Ue=-1,Qe=he.length,tt,ut,jt;if(arguments.length===1){for(;++Ue=ut){tt=jt=ut;break}for(;++Ueut&&(tt=ut),jt=ut){tt=jt=ut;break}for(;++Ueut&&(tt=ut),jt1)return jt/(Qt-1)},v.deviation=function(){var he=v.variance.apply(this,arguments);return he&&Math.sqrt(he)};function f(he){return{left:function(Se,Ue,Qe,tt){for(arguments.length<3&&(Qe=0),arguments.length<4&&(tt=Se.length);Qe>>1;he(Se[ut],Ue)<0?Qe=ut+1:tt=ut}return Qe},right:function(Se,Ue,Qe,tt){for(arguments.length<3&&(Qe=0),arguments.length<4&&(tt=Se.length);Qe>>1;he(Se[ut],Ue)>0?tt=ut:Qe=ut+1}return Qe}}}var p=f(s);v.bisectLeft=p.left,v.bisect=v.bisectRight=p.right,v.bisector=function(he){return f(he.length===1?function(Se,Ue){return s(he(Se),Ue)}:he)},v.shuffle=function(he,Se,Ue){(Qe=arguments.length)<3&&(Ue=he.length,Qe<2&&(Se=0));for(var Qe=Ue-Se,tt,ut;Qe;)ut=Math.random()*Qe--|0,tt=he[Qe+Se],he[Qe+Se]=he[ut+Se],he[ut+Se]=tt;return he},v.permute=function(he,Se){for(var Ue=Se.length,Qe=new Array(Ue);Ue--;)Qe[Ue]=he[Se[Ue]];return Qe},v.pairs=function(he){for(var Se=0,Ue=he.length-1,Qe,tt=he[0],ut=new Array(Ue<0?0:Ue);Se=0;)for(jt=he[Se],Ue=jt.length;--Ue>=0;)ut[--tt]=jt[Ue];return ut};var i=Math.abs;v.range=function(he,Se,Ue){if(arguments.length<3&&(Ue=1,arguments.length<2&&(Se=he,he=0)),(Se-he)/Ue===1/0)throw new Error("infinite range");var Qe=[],tt=T(i(Ue)),ut=-1,jt;if(he*=tt,Se*=tt,Ue*=tt,Ue<0)for(;(jt=he+Ue*++ut)>Se;)Qe.push(jt/tt);else for(;(jt=he+Ue*++ut)=Se.length)return tt?tt.call(he,Qt):Qe?Qt.sort(Qe):Qt;for(var yr=-1,Kr=Qt.length,$r=Se[gr++],_a,Ia,ra,va=new M,ba;++yr=Se.length)return St;var gr=[],yr=Ue[Qt++];return St.forEach(function(Kr,$r){gr.push({key:Kr,values:jt($r,Qt)})}),yr?gr.sort(function(Kr,$r){return yr(Kr.key,$r.key)}):gr}return he.map=function(St,Qt){return ut(Qt,St,0)},he.entries=function(St){return jt(ut(v.map,St,0),0)},he.key=function(St){return Se.push(St),he},he.sortKeys=function(St){return Ue[Se.length-1]=St,he},he.sortValues=function(St){return Qe=St,he},he.rollup=function(St){return tt=St,he},he},v.set=function(he){var Se=new N;if(he)for(var Ue=0,Qe=he.length;Ue=0&&(Qe=he.slice(Ue+1),he=he.slice(0,Ue)),he)return arguments.length<2?this[he].on(Qe):this[he].on(Qe,Se);if(arguments.length===2){if(Se==null)for(he in this)this.hasOwnProperty(he)&&this[he].on(Qe,null);return this}};function Z(he){var Se=[],Ue=new M;function Qe(){for(var tt=Se,ut=-1,jt=tt.length,St;++ut=0&&(Ue=he.slice(0,Se))!=="xmlns"&&(he=he.slice(Se+1)),fe.hasOwnProperty(Ue)?{space:fe[Ue],local:he}:he}},q.attr=function(he,Se){if(arguments.length<2){if(typeof he=="string"){var Ue=this.node();return he=v.ns.qualify(he),he.local?Ue.getAttributeNS(he.space,he.local):Ue.getAttribute(he)}for(Se in he)this.each(ye(Se,he[Se]));return this}return this.each(ye(he,Se))};function ye(he,Se){he=v.ns.qualify(he);function Ue(){this.removeAttribute(he)}function Qe(){this.removeAttributeNS(he.space,he.local)}function tt(){this.setAttribute(he,Se)}function ut(){this.setAttributeNS(he.space,he.local,Se)}function jt(){var Qt=Se.apply(this,arguments);Qt==null?this.removeAttribute(he):this.setAttribute(he,Qt)}function St(){var Qt=Se.apply(this,arguments);Qt==null?this.removeAttributeNS(he.space,he.local):this.setAttributeNS(he.space,he.local,Qt)}return Se==null?he.local?Qe:Ue:typeof Se=="function"?he.local?St:jt:he.local?ut:tt}function xe(he){return he.trim().replace(/\s+/g," ")}q.classed=function(he,Se){if(arguments.length<2){if(typeof he=="string"){var Ue=this.node(),Qe=(he=Me(he)).length,tt=-1;if(Se=Ue.classList){for(;++tt=0;)(ut=Ue[Qe])&&(tt&&tt!==ut.nextSibling&&tt.parentNode.insertBefore(ut,tt),tt=ut);return this},q.sort=function(he){he=Te.apply(this,arguments);for(var Se=-1,Ue=this.length;++Se=Se&&(Se=tt+1);!(Qt=jt[Se])&&++Se0&&(he=he.slice(0,tt));var jt=Tt.get(he);jt&&(he=jt,ut=Kt);function St(){var yr=this[Qe];yr&&(this.removeEventListener(he,yr,yr.$),delete this[Qe])}function Qt(){var yr=ut(Se,E(arguments));St.call(this),this.addEventListener(he,this[Qe]=yr,yr.$=Ue),yr._=Se}function gr(){var yr=new RegExp("^__on([^.]+)"+v.requote(he)+"$"),Kr;for(var $r in this)if(Kr=$r.match(yr)){var _a=this[$r];this.removeEventListener(Kr[1],_a,_a.$),delete this[$r]}}return tt?Se?Qt:St:Se?j:gr}var Tt=v.map({mouseenter:"mouseover",mouseleave:"mouseout"});k&&Tt.forEach(function(he){"on"+he in k&&Tt.remove(he)});function At(he,Se){return function(Ue){var Qe=v.event;v.event=Ue,Se[0]=this.__data__;try{he.apply(this,Se)}finally{v.event=Qe}}}function Kt(he,Se){var Ue=At(he,Se);return function(Qe){var tt=this,ut=Qe.relatedTarget;(!ut||ut!==tt&&!(ut.compareDocumentPosition(tt)&8))&&Ue.call(tt,Qe)}}var ar,_r=0;function Zt(he){var Se=".dragsuppress-"+ ++_r,Ue="click"+Se,Qe=v.select(e(he)).on("touchmove"+Se,Q).on("dragstart"+Se,Q).on("selectstart"+Se,Q);if(ar==null&&(ar="onselectstart"in he?!1:F(he.style,"userSelect")),ar){var tt=l(he).style,ut=tt[ar];tt[ar]="none"}return function(jt){if(Qe.on(Se,null),ar&&(tt[ar]=ut),jt){var St=function(){Qe.on(Ue,null)};Qe.on(Ue,function(){Q(),St()},!0),setTimeout(St,0)}}}v.mouse=function(he){return Ot(he,re())};var sr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ot(he,Se){Se.changedTouches&&(Se=Se.changedTouches[0]);var Ue=he.ownerSVGElement||he;if(Ue.createSVGPoint){var Qe=Ue.createSVGPoint();if(sr<0){var tt=e(he);if(tt.scrollX||tt.scrollY){Ue=v.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var ut=Ue[0][0].getScreenCTM();sr=!(ut.f||ut.e),Ue.remove()}}return sr?(Qe.x=Se.pageX,Qe.y=Se.pageY):(Qe.x=Se.clientX,Qe.y=Se.clientY),Qe=Qe.matrixTransform(he.getScreenCTM().inverse()),[Qe.x,Qe.y]}var jt=he.getBoundingClientRect();return[Se.clientX-jt.left-he.clientLeft,Se.clientY-jt.top-he.clientTop]}v.touch=function(he,Se,Ue){if(arguments.length<3&&(Ue=Se,Se=re().changedTouches),Se){for(var Qe=0,tt=Se.length,ut;Qe0?1:he<0?-1:0}function Dt(he,Se,Ue){return(Se[0]-he[0])*(Ue[1]-he[1])-(Se[1]-he[1])*(Ue[0]-he[0])}function Ct(he){return he>1?0:he<-1?Be:Math.acos(he)}function Vt(he){return he>1?Ze:he<-1?-Ze:Math.asin(he)}function Ht(he){return((he=Math.exp(he))-1/he)/2}function Wt(he){return((he=Math.exp(he))+1/he)/2}function Sr(he){return((he=Math.exp(2*he))-1)/(he+1)}function ia(he){return(he=Math.sin(he/2))*he}var $t=Math.SQRT2,It=2,ir=4;v.interpolateZoom=function(he,Se){var Ue=he[0],Qe=he[1],tt=he[2],ut=Se[0],jt=Se[1],St=Se[2],Qt=ut-Ue,gr=jt-Qe,yr=Qt*Qt+gr*gr,Kr,$r;if(yr0&&(_e=_e.transition().duration(jt)),_e.call(Ra.event)}function Oi(){va&&va.domain(ra.range().map(function(_e){return(_e-he.x)/he.k}).map(ra.invert)),za&&za.domain(ba.range().map(function(_e){return(_e-he.y)/he.k}).map(ba.invert))}function Pi(_e){St++||_e({type:"zoomstart"})}function ko(_e){Oi(),_e({type:"zoom",scale:he.k,translate:[he.x,he.y]})}function de(_e){--St||(_e({type:"zoomend"}),Ue=null)}function y(){var _e=this,De=Ia.of(_e,arguments),Ne=0,Ye=v.select(e(_e)).on(gr,Ft).on(yr,Gt),lt=pa(v.mouse(_e)),ct=Zt(_e);bo.call(_e),Pi(De);function Ft(){Ne=1,Kn(v.mouse(_e),lt),ko(De)}function Gt(){Ye.on(gr,null).on(yr,null),ct(Ne),de(De)}}function O(){var _e=this,De=Ia.of(_e,arguments),Ne={},Ye=0,lt,ct=".zoom-"+v.event.changedTouches[0].identifier,Ft="touchmove"+ct,Gt="touchend"+ct,Jt=[],it=v.select(_e),Rt=Zt(_e);or(),Pi(De),it.on(Qt,null).on($r,or);function qt(){var dr=v.touches(_e);return lt=he.k,dr.forEach(function(mr){mr.identifier in Ne&&(Ne[mr.identifier]=pa(mr))}),dr}function or(){var dr=v.event.target;v.select(dr).on(Ft,vr).on(Gt,Ar),Jt.push(dr);for(var mr=v.event.changedTouches,qr=0,Lr=mr.length;qr1){var Pa=ua[0],Ua=ua[1],ya=Pa[0]-Ua[0],da=Pa[1]-Ua[1];Ye=ya*ya+da*da}}function vr(){var dr=v.touches(_e),mr,qr,Lr,ua;bo.call(_e);for(var Ba=0,Pa=dr.length;Ba1?1:Se,Ue=Ue<0?0:Ue>1?1:Ue,tt=Ue<=.5?Ue*(1+Se):Ue+Se-Ue*Se,Qe=2*Ue-tt;function ut(St){return St>360?St-=360:St<0&&(St+=360),St<60?Qe+(tt-Qe)*St/60:St<180?tt:St<240?Qe+(tt-Qe)*(240-St)/60:Qe}function jt(St){return Math.round(ut(St)*255)}return new Za(jt(he+120),jt(he),jt(he-120))}v.hcl=Oa;function Oa(he,Se,Ue){return this instanceof Oa?(this.h=+he,this.c=+Se,void(this.l=+Ue)):arguments.length<2?he instanceof Oa?new Oa(he.h,he.c,he.l):he instanceof Ja?pn(he.l,he.a,he.b):pn((he=Fr((he=v.rgb(he)).r,he.g,he.b)).l,he.a,he.b):new Oa(he,Se,Ue)}var An=Oa.prototype=new sa;An.brighter=function(he){return new Oa(this.h,this.c,Math.min(100,this.l+ei*(arguments.length?he:1)))},An.darker=function(he){return new Oa(this.h,this.c,Math.max(0,this.l-ei*(arguments.length?he:1)))},An.rgb=function(){return un(this.h,this.c,this.l).rgb()};function un(he,Se,Ue){return isNaN(he)&&(he=0),isNaN(Se)&&(Se=0),new Ja(Ue,Math.cos(he*=Je)*Se,Math.sin(he)*Se)}v.lab=Ja;function Ja(he,Se,Ue){return this instanceof Ja?(this.l=+he,this.a=+Se,void(this.b=+Ue)):arguments.length<2?he instanceof Ja?new Ja(he.l,he.a,he.b):he instanceof Oa?un(he.h,he.c,he.l):Fr((he=Za(he)).r,he.g,he.b):new Ja(he,Se,Ue)}var ei=18,Fn=.95047,ni=1,Mi=1.08883,ci=Ja.prototype=new sa;ci.brighter=function(he){return new Ja(Math.min(100,this.l+ei*(arguments.length?he:1)),this.a,this.b)},ci.darker=function(he){return new Ja(Math.max(0,this.l-ei*(arguments.length?he:1)),this.a,this.b)},ci.rgb=function(){return bn(this.l,this.a,this.b)};function bn(he,Se,Ue){var Qe=(he+16)/116,tt=Qe+Se/500,ut=Qe-Ue/200;return tt=Ii(tt)*Fn,Qe=Ii(Qe)*ni,ut=Ii(ut)*Mi,new Za(dn(3.2404542*tt-1.5371385*Qe-.4985314*ut),dn(-.969266*tt+1.8760108*Qe+.041556*ut),dn(.0556434*tt-.2040259*Qe+1.0572252*ut))}function pn(he,Se,Ue){return he>0?new Oa(Math.atan2(Ue,Se)*Mt,Math.sqrt(Se*Se+Ue*Ue),he):new Oa(NaN,NaN,he)}function Ii(he){return he>.206893034?he*he*he:(he-4/29)/7.787037}function ho(he){return he>.008856?Math.pow(he,1/3):7.787037*he+4/29}function dn(he){return Math.round(255*(he<=.00304?12.92*he:1.055*Math.pow(he,1/2.4)-.055))}v.rgb=Za;function Za(he,Se,Ue){return this instanceof Za?(this.r=~~he,this.g=~~Se,void(this.b=~~Ue)):arguments.length<2?he instanceof Za?new Za(he.r,he.g,he.b):Tr(""+he,Za,ja):new Za(he,Se,Ue)}function ot(he){return new Za(he>>16,he>>8&255,he&255)}function et(he){return ot(he)+""}var hr=Za.prototype=new sa;hr.brighter=function(he){he=Math.pow(.7,arguments.length?he:1);var Se=this.r,Ue=this.g,Qe=this.b,tt=30;return!Se&&!Ue&&!Qe?new Za(tt,tt,tt):(Se&&Se>4,Qe=Qe>>4|Qe,tt=Qt&240,tt=tt>>4|tt,ut=Qt&15,ut=ut<<4|ut):he.length===7&&(Qe=(Qt&16711680)>>16,tt=(Qt&65280)>>8,ut=Qt&255)),Se(Qe,tt,ut))}function Rr(he,Se,Ue){var Qe=Math.min(he/=255,Se/=255,Ue/=255),tt=Math.max(he,Se,Ue),ut=tt-Qe,jt,St,Qt=(tt+Qe)/2;return ut?(St=Qt<.5?ut/(tt+Qe):ut/(2-tt-Qe),he==tt?jt=(Se-Ue)/ut+(Se0&&Qt<1?0:jt),new aa(jt,St,Qt)}function Fr(he,Se,Ue){he=nt(he),Se=nt(Se),Ue=nt(Ue);var Qe=ho((.4124564*he+.3575761*Se+.1804375*Ue)/Fn),tt=ho((.2126729*he+.7151522*Se+.072175*Ue)/ni),ut=ho((.0193339*he+.119192*Se+.9503041*Ue)/Mi);return Ja(116*tt-16,500*(Qe-tt),200*(tt-ut))}function nt(he){return(he/=255)<=.04045?he/12.92:Math.pow((he+.055)/1.055,2.4)}function kt(he){var Se=parseFloat(he);return he.charAt(he.length-1)==="%"?Math.round(Se*2.55):Se}var Ut=v.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Ut.forEach(function(he,Se){Ut.set(he,ot(Se))});function nr(he){return typeof he=="function"?he:function(){return he}}v.functor=nr,v.xhr=Er(R);function Er(he){return function(Se,Ue,Qe){return arguments.length===2&&typeof Ue=="function"&&(Qe=Ue,Ue=null),br(Se,Ue,he,Qe)}}function br(he,Se,Ue,Qe){var tt={},ut=v.dispatch("beforesend","progress","load","error"),jt={},St=new XMLHttpRequest,Qt=null;self.XDomainRequest&&!("withCredentials"in St)&&/^(http(s)?:)?\/\//.test(he)&&(St=new XDomainRequest),"onload"in St?St.onload=St.onerror=gr:St.onreadystatechange=function(){St.readyState>3&&gr()};function gr(){var yr=St.status,Kr;if(!yr&&Pr(St)||yr>=200&&yr<300||yr===304){try{Kr=Ue.call(tt,St)}catch($r){ut.error.call(tt,$r);return}ut.load.call(tt,Kr)}else ut.error.call(tt,St)}return St.onprogress=function(yr){var Kr=v.event;v.event=yr;try{ut.progress.call(tt,St)}finally{v.event=Kr}},tt.header=function(yr,Kr){return yr=(yr+"").toLowerCase(),arguments.length<2?jt[yr]:(Kr==null?delete jt[yr]:jt[yr]=Kr+"",tt)},tt.mimeType=function(yr){return arguments.length?(Se=yr==null?null:yr+"",tt):Se},tt.responseType=function(yr){return arguments.length?(Qt=yr,tt):Qt},tt.response=function(yr){return Ue=yr,tt},["get","post"].forEach(function(yr){tt[yr]=function(){return tt.send.apply(tt,[yr].concat(E(arguments)))}}),tt.send=function(yr,Kr,$r){if(arguments.length===2&&typeof Kr=="function"&&($r=Kr,Kr=null),St.open(yr,he,!0),Se!=null&&!("accept"in jt)&&(jt.accept=Se+",*/*"),St.setRequestHeader)for(var _a in jt)St.setRequestHeader(_a,jt[_a]);return Se!=null&&St.overrideMimeType&&St.overrideMimeType(Se),Qt!=null&&(St.responseType=Qt),$r!=null&&tt.on("error",$r).on("load",function(Ia){$r(null,Ia)}),ut.beforesend.call(tt,St),St.send(Kr??null),tt},tt.abort=function(){return St.abort(),tt},v.rebind(tt,ut,"on"),Qe==null?tt:tt.get(Or(Qe))}function Or(he){return he.length===1?function(Se,Ue){he(Se==null?Ue:null)}:he}function Pr(he){var Se=he.responseType;return Se&&Se!=="text"?he.response:he.responseText}v.dsv=function(he,Se){var Ue=new RegExp('["'+he+` +]`),Qe=he.charCodeAt(0);function tt(gr,yr,Kr){arguments.length<3&&(Kr=yr,yr=null);var $r=br(gr,Se,yr==null?ut:jt(yr),Kr);return $r.row=function(_a){return arguments.length?$r.response((yr=_a)==null?ut:jt(_a)):yr},$r}function ut(gr){return tt.parse(gr.responseText)}function jt(gr){return function(yr){return tt.parse(yr.responseText,gr)}}tt.parse=function(gr,yr){var Kr;return tt.parseRows(gr,function($r,_a){if(Kr)return Kr($r,_a-1);var Ia=function(ra){for(var va={},ba=$r.length,za=0;za=Ia)return $r;if(za)return za=!1,Kr;var En=ra;if(gr.charCodeAt(En)===34){for(var On=En;On++24?(isFinite(Se)&&(clearTimeout(Ca),Ca=setTimeout(ga,Se)),Pn=0):(Pn=1,ma(ga))}v.timer.flush=function(){eo(),si()};function eo(){for(var he=Date.now(),Se=hn;Se;)he>=Se.t&&Se.c(he-Se.t)&&(Se.c=null),Se=Se.n;return he}function si(){for(var he,Se=hn,je=1/0;Se;)Se.c?(Se.t=0;--St)rn.push(tt[gr[Kr[St]][2]]);for(St=+bn;St<$r.length-Rn;++St)rn.push(tt[gr[$r[St]][2]]);return rn}return Qe.x=function(tt){return arguments.length?(Se=tt,Qe):Se},Qe.y=function(tt){return arguments.length?(je=tt,Qe):je},Qe};function Sa(he){for(var Se=he.length,je=[0,1],Qe=2,tt=2;tt1&&Dt(he[je[Qe-2]],he[je[Qe-1]],he[tt])<=0;)--Qe;je[Qe++]=tt}return je.slice(0,Qe)}function Gi(he,Se){return he[0]-Se[0]||he[1]-Se[1]}v.geom.polygon=function(he){return H(he,ti),he};var ti=v.geom.polygon.prototype=[];ti.area=function(){for(var he=-1,Se=this.length,je,Qe=this[Se-1],tt=0;++heht)St=St.L;else if(jt=Se-ns(St,je),jt>ht){if(!St.R){Qe=St;break}St=St.R}else{ut>-ht?(Qe=St.P,tt=St):jt>-ht?(Qe=St,tt=St.N):Qe=tt=St;break}var Qt=Io(he);if(So.insert(Qe,Qt),!(!Qe&&!tt)){if(Qe===tt){mo(Qe),tt=Io(Qe.site),So.insert(Qt,tt),Qt.edge=tt.edge=es(Qe.site,Qt.site),Go(Qe),Go(tt);return}if(!tt){Qt.edge=es(Qe.site,Qt.site);return}mo(Qe),mo(tt);var gr=Qe.site,yr=gr.x,Kr=gr.y,$r=he.x-yr,bn=he.y-Kr,Rn=tt.site,rn=Rn.x-yr,pn=Rn.y-Kr,xn=2*($r*pn-bn*rn),Bn=$r*$r+bn*bn,Fn=rn*rn+pn*pn,mn={x:(pn*Bn-bn*Fn)/xn+yr,y:($r*Fn-rn*Bn)/xn+Kr};Ps(tt.edge,gr,Rn,mn),Qt.edge=es(gr,he,null,mn),tt.edge=es(he,Rn,null,mn),Go(Qe),Go(tt)}}function Ko(he,Se){var je=he.site,Qe=je.x,tt=je.y,ut=tt-Se;if(!ut)return Qe;var jt=he.P;if(!jt)return-1/0;je=jt.site;var St=je.x,Qt=je.y,gr=Qt-Se;if(!gr)return St;var yr=St-Qe,Kr=1/ut-1/gr,$r=yr/gr;return Kr?(-$r+Math.sqrt($r*$r-2*Kr*(yr*yr/(-2*gr)-Qt+gr/2+tt-ut/2)))/Kr+Qe:(Qe+St)/2}function ns(he,Se){var je=he.N;if(je)return Ko(je,Se);var Qe=he.site;return Qe.y===Se?Qe.x:1/0}function wo(he){this.site=he,this.edges=[]}wo.prototype.prepare=function(){for(var he=this.edges,Se=he.length,je;Se--;)je=he[Se].edge,(!je.b||!je.a)&&he.splice(Se,1);return he.sort(Di),he.length};function No(he){for(var Se=he[0][0],je=he[1][0],Qe=he[0][1],tt=he[1][1],ut,jt,St,Qt,gr=Mo,yr=gr.length,Kr,$r,bn,Rn,rn,pn;yr--;)if(Kr=gr[yr],!(!Kr||!Kr.prepare()))for(bn=Kr.edges,Rn=bn.length,$r=0;$rht||i(Qt-jt)>ht)&&(bn.splice($r,0,new $o(Zs(Kr.site,pn,i(St-Se)ht?{x:Se,y:i(ut-Se)ht?{x:i(jt-tt)ht?{x:je,y:i(ut-je)ht?{x:i(jt-Qe)=-Re)){var $r=Qt*Qt+gr*gr,bn=yr*yr+pn*pn,Rn=(pn*$r-gr*bn)/Kr,rn=(Qt*bn-yr*$r)/Kr,pn=rn+St,xn=Wi.pop()||new lo;xn.arc=he,xn.site=tt,xn.x=Rn+jt,xn.y=pn+Math.sqrt(Rn*Rn+rn*rn),xn.cy=pn,he.circle=xn;for(var Bn=null,Fn=co._;Fn;)if(xn.y0)){if(rn/=bn,bn<0){if(rn0){if(rn>$r)return;rn>Kr&&(Kr=rn)}if(rn=je-St,!(!bn&&rn<0)){if(rn/=bn,bn<0){if(rn>$r)return;rn>Kr&&(Kr=rn)}else if(bn>0){if(rn0)){if(rn/=Rn,Rn<0){if(rn0){if(rn>$r)return;rn>Kr&&(Kr=rn)}if(rn=Qe-Qt,!(!Rn&&rn<0)){if(rn/=Rn,Rn<0){if(rn>$r)return;rn>Kr&&(Kr=rn)}else if(Rn>0){if(rn0&&(tt.a={x:St+Kr*bn,y:Qt+Kr*Rn}),$r<1&&(tt.b={x:St+$r*bn,y:Qt+$r*Rn}),tt}}}}}}function Jo(he){for(var Se=so,je=us(he[0][0],he[0][1],he[1][0],he[1][1]),Qe=Se.length,tt;Qe--;)tt=Se[Qe],(!zs(tt,he)||!je(tt)||i(tt.a.x-tt.b.x)=ut)return;if(yr>$r){if(!Qe)Qe={x:Rn,y:jt};else if(Qe.y>=St)return;je={x:Rn,y:St}}else{if(!Qe)Qe={x:Rn,y:St};else if(Qe.y1)if(yr>$r){if(!Qe)Qe={x:(jt-xn)/pn,y:jt};else if(Qe.y>=St)return;je={x:(St-xn)/pn,y:St}}else{if(!Qe)Qe={x:(St-xn)/pn,y:St};else if(Qe.y=ut)return;je={x:ut,y:pn*ut+xn}}else{if(!Qe)Qe={x:ut,y:pn*ut+xn};else if(Qe.x=yr&&xn.x<=$r&&xn.y>=Kr&&xn.y<=bn?[[yr,bn],[$r,bn],[$r,Kr],[yr,Kr]]:[];Bn.point=Qt[rn]}),gr}function St(Qt){return Qt.map(function(gr,yr){return{x:Math.round(Qe(gr,yr)/ht)*ht,y:Math.round(tt(gr,yr)/ht)*ht,i:yr}})}return jt.links=function(Qt){return ml(St(Qt)).edges.filter(function(gr){return gr.l&&gr.r}).map(function(gr){return{source:Qt[gr.l.i],target:Qt[gr.r.i]}})},jt.triangles=function(Qt){var gr=[];return ml(St(Qt)).cells.forEach(function(yr,Kr){for(var $r=yr.site,bn=yr.edges.sort(Di),Rn=-1,rn=bn.length,pn,xn,Bn=bn[rn-1].edge,Fn=Bn.l===$r?Bn.r:Bn.l;++RnFn&&(Fn=yr.x),yr.y>mn&&(mn=yr.y),bn.push(yr.x),Rn.push(yr.y);else for(rn=0;rnFn&&(Fn=Ea),Oa>mn&&(mn=Oa),bn.push(Ea),Rn.push(Oa)}var Ka=Fn-xn,di=mn-Bn;Ka>di?mn=Bn+Ka:Fn=xn+di;function Oi(de,y,O,ie,ce,_e,De,Ne){if(!(isNaN(O)||isNaN(ie)))if(de.leaf){var Ye=de.x,lt=de.y;if(Ye!=null)if(i(Ye-O)+i(lt-ie)<.01)Pi(de,y,O,ie,ce,_e,De,Ne);else{var ct=de.point;de.x=de.y=de.point=null,Pi(de,ct,Ye,lt,ce,_e,De,Ne),Pi(de,y,O,ie,ce,_e,De,Ne)}else de.x=O,de.y=ie,de.point=y}else Pi(de,y,O,ie,ce,_e,De,Ne)}function Pi(de,y,O,ie,ce,_e,De,Ne){var Ye=(ce+De)*.5,lt=(_e+Ne)*.5,ct=O>=Ye,Ft=ie>=lt,Gt=Ft<<1|ct;de.leaf=!1,de=de.nodes[Gt]||(de.nodes[Gt]=Bl()),ct?ce=Ye:De=Ye,Ft?_e=lt:Ne=lt,Oi(de,y,O,ie,ce,_e,De,Ne)}var ko=Bl();if(ko.add=function(de){Oi(ko,de,+Kr(de,++rn),+$r(de,rn),xn,Bn,Fn,mn)},ko.visit=function(de){_l(de,ko,xn,Bn,Fn,mn)},ko.find=function(de){return ju(ko,de[0],de[1],xn,Bn,Fn,mn)},rn=-1,Se==null){for(;++rnut||$r>jt||bn=Ea,di=je>=Oa,Oi=di<<1|Ka,Pi=Oi+4;Oije&&(ut=Se.slice(je,ut),St[jt]?St[jt]+=ut:St[++jt]=ut),(Qe=Qe[0])===(tt=tt[0])?St[jt]?St[jt]+=tt:St[++jt]=tt:(St[++jt]=null,Qt.push({i:jt,x:As(Qe,tt)})),je=ol.lastIndex;return je=0&&!(Qe=v.interpolators[je](he,Se)););return Qe}v.interpolators=[function(he,Se){var je=typeof Se;return(je==="string"?Ut.has(Se.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Se)?lu:ms:Se instanceof ln?lu:Array.isArray(Se)?Eu:je==="object"&&isNaN(Se)?il:As)(he,Se)}],v.interpolateArray=Eu;function Eu(he,Se){var je=[],Qe=[],tt=he.length,ut=Se.length,jt=Math.min(he.length,Se.length),St;for(St=0;St=0?he.slice(0,Se):he,Qe=Se>=0?he.slice(Se+1):"in";return je=fc.get(je)||Uu,Qe=th.get(Qe)||R,Cf(Qe(je.apply(null,x.call(arguments,1))))};function Cf(he){return function(Se){return Se<=0?0:Se>=1?1:he(Se)}}function qu(he){return function(Se){return 1-he(1-Se)}}function gs(he){return function(Se){return .5*(Se<.5?he(2*Se):2-he(2-2*Se))}}function Lf(he){return he*he}function hc(he){return he*he*he}function nc(he){if(he<=0)return 0;if(he>=1)return 1;var Se=he*he,je=Se*he;return 4*(he<.5?je:3*(he-Se)+je-.75)}function hf(he){return function(Se){return Math.pow(Se,he)}}function ku(he){return 1-Math.cos(he*Ze)}function dc(he){return Math.pow(2,10*(he-1))}function Cu(he){return 1-Math.sqrt(1-he*he)}function Pc(he,Se){var je;return arguments.length<2&&(Se=.45),arguments.length?je=Se/He*Math.asin(1/he):(he=1,je=Se/4),function(Qe){return 1+he*Math.pow(2,-10*Qe)*Math.sin((Qe-je)*He/Se)}}function $c(he){return he||(he=1.70158),function(Se){return Se*Se*((he+1)*Se-he)}}function Zl(he){return he<1/2.75?7.5625*he*he:he<2/2.75?7.5625*(he-=1.5/2.75)*he+.75:he<2.5/2.75?7.5625*(he-=2.25/2.75)*he+.9375:7.5625*(he-=2.625/2.75)*he+.984375}v.interpolateHcl=df;function df(he,Se){he=v.hcl(he),Se=v.hcl(Se);var je=he.h,Qe=he.c,tt=he.l,ut=Se.h-je,jt=Se.c-Qe,St=Se.l-tt;return isNaN(jt)&&(jt=0,Qe=isNaN(Qe)?Se.c:Qe),isNaN(ut)?(ut=0,je=isNaN(je)?Se.h:je):ut>180?ut-=360:ut<-180&&(ut+=360),function(Qt){return ua(je+ut*Qt,Qe+jt*Qt,tt+St*Qt)+""}}v.interpolateHsl=Dc;function Dc(he,Se){he=v.hsl(he),Se=v.hsl(Se);var je=he.h,Qe=he.s,tt=he.l,ut=Se.h-je,jt=Se.s-Qe,St=Se.l-tt;return isNaN(jt)&&(jt=0,Qe=isNaN(Qe)?Se.s:Qe),isNaN(ut)?(ut=0,je=isNaN(je)?Se.h:je):ut>180?ut-=360:ut<-180&&(ut+=360),function(Qt){return Un(je+ut*Qt,Qe+jt*Qt,tt+St*Qt)+""}}v.interpolateLab=Ic;function Ic(he,Se){he=v.lab(he),Se=v.lab(Se);var je=he.l,Qe=he.a,tt=he.b,ut=Se.l-je,jt=Se.a-Qe,St=Se.b-tt;return function(Qt){return ba(je+ut*Qt,Qe+jt*Qt,tt+St*Qt)+""}}v.interpolateRound=Vu;function Vu(he,Se){return Se-=he,function(je){return Math.round(he+Se*je)}}v.transform=function(he){var Se=k.createElementNS(v.ns.prefix.svg,"g");return(v.transform=function(je){if(je!=null){Se.setAttribute("transform",je);var Qe=Se.transform.baseVal.consolidate()}return new Rc(Qe?Qe.matrix:Fc)})(he)};function Rc(he){var Se=[he.a,he.b],je=[he.c,he.d],Qe=vf(Se),tt=Lu(Se,je),ut=vf(sl(je,Se,-tt))||0;Se[0]*je[1]180?Se+=360:Se-he>180&&(he+=360),Qe.push({i:je.push(Pu(je)+"rotate(",null,")")-2,x:As(he,Se)})):Se&&je.push(Pu(je)+"rotate("+Se+")")}function Hu(he,Se,je,Qe){he!==Se?Qe.push({i:je.push(Pu(je)+"skewX(",null,")")-2,x:As(he,Se)}):Se&&je.push(Pu(je)+"skewX("+Se+")")}function uu(he,Se,je,Qe){if(he[0]!==Se[0]||he[1]!==Se[1]){var tt=je.push(Pu(je)+"scale(",null,",",null,")");Qe.push({i:tt-4,x:As(he[0],Se[0])},{i:tt-2,x:As(he[1],Se[1])})}else(Se[0]!==1||Se[1]!==1)&&je.push(Pu(je)+"scale("+Se+")")}function Gu(he,Se){var je=[],Qe=[];return he=v.transform(he),Se=v.transform(Se),vc(he.translate,Se.translate,je,Qe),zc(he.rotate,Se.rotate,je,Qe),Hu(he.skew,Se.skew,je,Qe),uu(he.scale,Se.scale,je,Qe),he=Se=null,function(tt){for(var ut=-1,jt=Qe.length,St;++ut0?ut=mn:(je.c=null,je.t=NaN,je=null,Se.end({type:"end",alpha:ut=0})):mn>0&&(Se.start({type:"start",alpha:ut=mn}),je=bi(he.tick)),he):ut},he.start=function(){var mn,Ea=bn.length,Oa=Rn.length,Ka=Qe[0],di=Qe[1],Oi,Pi;for(mn=0;mn=0;)ut.push(yr=gr[Qt]),yr.parent=St,yr.depth=St.depth+1;je&&(St.value=0),St.children=gr}else je&&(St.value=+je.call(Qe,St,St.depth)||0),delete St.children;return Ll(tt,function(Kr){var $r,bn;he&&($r=Kr.children)&&$r.sort(he),je&&(bn=Kr.parent)&&(bn.value+=Kr.value)}),jt}return Qe.sort=function(tt){return arguments.length?(he=tt,Qe):he},Qe.children=function(tt){return arguments.length?(Se=tt,Qe):Se},Qe.value=function(tt){return arguments.length?(je=tt,Qe):je},Qe.revalue=function(tt){return je&&(Cl(tt,function(ut){ut.children&&(ut.value=0)}),Ll(tt,function(ut){var jt;ut.children||(ut.value=+je.call(Qe,ut,ut.depth)||0),(jt=ut.parent)&&(jt.value+=ut.value)})),tt},Qe};function cu(he,Se){return v.rebind(he,Se,"sort","children","value"),he.nodes=he,he.links=Tl,he}function Cl(he,Se){for(var je=[he];(he=je.pop())!=null;)if(Se(he),(tt=he.children)&&(Qe=tt.length))for(var Qe,tt;--Qe>=0;)je.push(tt[Qe])}function Ll(he,Se){for(var je=[he],Qe=[];(he=je.pop())!=null;)if(Qe.push(he),(jt=he.children)&&(ut=jt.length))for(var tt=-1,ut,jt;++tttt&&(tt=St),Qe.push(St)}for(jt=0;jtQe&&(je=Se,Qe=tt);return je}function ef(he){return he.reduce(_u,0)}function _u(he,Se){return he+Se[1]}v.layout.histogram=function(){var he=!0,Se=Number,je=Ru,Qe=$u;function tt(ut,$r){for(var St=[],Qt=ut.map(Se,this),gr=je.call(this,Qt,$r),yr=Qe.call(this,gr,Qt,$r),Kr,$r=-1,bn=Qt.length,Rn=yr.length-1,rn=he?1:1/bn,pn;++$r0)for($r=-1;++$r=gr[0]&&pn<=gr[1]&&(Kr=St[v.bisect(yr,pn,1,Rn)-1],Kr.y+=rn,Kr.push(ut[$r]));return St}return tt.value=function(ut){return arguments.length?(Se=ut,tt):Se},tt.range=function(ut){return arguments.length?(je=ar(ut),tt):je},tt.bins=function(ut){return arguments.length?(Qe=typeof ut=="number"?function(jt){return mc(jt,ut)}:ar(ut),tt):Qe},tt.frequency=function(ut){return arguments.length?(he=!!ut,tt):he},tt};function $u(he,Se){return mc(he,Math.ceil(Math.log(Se.length)/Math.LN2+1))}function mc(he,Se){for(var je=-1,Qe=+he[0],tt=(he[1]-Qe)/Se,ut=[];++je<=Se;)ut[je]=tt*je+Qe;return ut}function Ru(he){return[v.min(he),v.max(he)]}v.layout.pack=function(){var he=v.layout.hierarchy().sort(zo),Se=0,je=[1,1],Qe;function tt(ut,jt){var St=he.call(this,ut,jt),Qt=St[0],gr=je[0],yr=je[1],Kr=Qe==null?Math.sqrt:typeof Qe=="function"?Qe:function(){return Qe};if(Qt.x=Qt.y=0,Ll(Qt,function(bn){bn.r=+Kr(bn.value)}),Ll(Qt,tf),Se){var $r=Se*(Qe?1:Math.max(2*Qt.r/gr,2*Qt.r/yr))/2;Ll(Qt,function(bn){bn.r+=$r}),Ll(Qt,tf),Ll(Qt,function(bn){bn.r-=$r})}return yf(Qt,gr/2,yr/2,Qe?1:1/Math.max(2*Qt.r/gr,2*Qt.r/yr)),St}return tt.size=function(ut){return arguments.length?(je=ut,tt):je},tt.radius=function(ut){return arguments.length?(Qe=ut==null||typeof ut=="function"?ut:+ut,tt):Qe},tt.padding=function(ut){return arguments.length?(Se=+ut,tt):Se},cu(tt,he)};function zo(he,Se){return he.value-Se.value}function gc(he,Se){var je=he._pack_next;he._pack_next=Se,Se._pack_prev=he,Se._pack_next=je,je._pack_prev=Se}function Vf(he,Se){he._pack_next=Se,Se._pack_prev=he}function mf(he,Se){var je=Se.x-he.x,Qe=Se.y-he.y,tt=he.r+Se.r;return .999*tt*tt>je*je+Qe*Qe}function tf(he){if(!(Se=he.children)||!($r=Se.length))return;var Se,je=1/0,Qe=-1/0,tt=1/0,ut=-1/0,jt,St,Qt,gr,yr,Kr,$r;function bn(mn){je=Math.min(mn.x-mn.r,je),Qe=Math.max(mn.x+mn.r,Qe),tt=Math.min(mn.y-mn.r,tt),ut=Math.max(mn.y+mn.r,ut)}if(Se.forEach(gf),jt=Se[0],jt.x=-jt.r,jt.y=0,bn(jt),$r>1&&(St=Se[1],St.x=St.r,St.y=0,bn(St),$r>2))for(Qt=Se[2],ul(jt,St,Qt),bn(Qt),gc(jt,Qt),jt._pack_prev=Qt,gc(Qt,St),St=jt._pack_next,gr=3;gr<$r;gr++){ul(jt,St,Qt=Se[gr]);var Rn=0,rn=1,pn=1;for(yr=St._pack_next;yr!==St;yr=yr._pack_next,rn++)if(mf(yr,Qt)){Rn=1;break}if(Rn==1)for(Kr=jt._pack_prev;Kr!==yr._pack_prev&&!mf(Kr,Qt);Kr=Kr._pack_prev,pn++);Rn?(rnpn.x&&(pn=Ea),Ea.depth>xn.depth&&(xn=Ea)});var Bn=Se(rn,pn)/2-rn.x,Fn=je[0]/(pn.x+Se(pn,rn)/2+Bn),mn=je[1]/(xn.depth||1);Cl(bn,function(Ea){Ea.x=(Ea.x+Bn)*Fn,Ea.y=Ea.depth*mn})}return $r}function ut(yr){for(var Kr={A:null,children:[yr]},$r=[Kr],bn;(bn=$r.pop())!=null;)for(var Rn=bn.children,rn,pn=0,xn=Rn.length;pn0&&(bc(zt(rn,yr,$r),yr,Ea),xn+=Ea,Bn+=Ea),Fn+=rn.m,xn+=bn.m,mn+=pn.m,Bn+=Rn.m;rn&&!_c(Rn)&&(Rn.t=rn,Rn.m+=Fn-Bn),bn&&!yc(pn)&&(pn.t=bn,pn.m+=xn-mn,$r=yr)}return $r}function gr(yr){yr.x*=je[0],yr.y=yr.depth*je[1]}return tt.separation=function(yr){return arguments.length?(Se=yr,tt):Se},tt.size=function(yr){return arguments.length?(Qe=(je=yr)==null?gr:null,tt):Qe?null:je},tt.nodeSize=function(yr){return arguments.length?(Qe=(je=yr)==null?null:gr,tt):Qe?je:null},cu(tt,he)};function Pl(he,Se){return he.parent==Se.parent?1:2}function yc(he){var Se=he.children;return Se.length?Se[0]:he.t}function _c(he){var Se=he.children,je;return(je=Se.length)?Se[je-1]:he.t}function bc(he,Se,je){var Qe=je/(Se.i-he.i);Se.c-=Qe,Se.s+=je,he.c+=Qe,Se.z+=je,Se.m+=je}function ac(he){for(var Se=0,je=0,Qe=he.children,tt=Qe.length,ut;--tt>=0;)ut=Qe[tt],ut.z+=Se,ut.m+=Se,Se+=ut.s+(je+=ut.c)}function zt(he,Se,je){return he.a.parent===Se.parent?he.a:je}v.layout.cluster=function(){var he=v.layout.hierarchy().sort(null).value(null),Se=Pl,je=[1,1],Qe=!1;function tt(ut,jt){var St=he.call(this,ut,jt),Qt=St[0],gr,yr=0;Ll(Qt,function(rn){var pn=rn.children;pn&&pn.length?(rn.x=Br(pn),rn.y=rr(pn)):(rn.x=gr?yr+=Se(rn,gr):0,rn.y=0,gr=rn)});var Kr=wr(Qt),$r=un(Qt),bn=Kr.x-Se(Kr,$r)/2,Rn=$r.x+Se($r,Kr)/2;return Ll(Qt,Qe?function(rn){rn.x=(rn.x-Qt.x)*je[0],rn.y=(Qt.y-rn.y)*je[1]}:function(rn){rn.x=(rn.x-bn)/(Rn-bn)*je[0],rn.y=(1-(Qt.y?rn.y/Qt.y:1))*je[1]}),St}return tt.separation=function(ut){return arguments.length?(Se=ut,tt):Se},tt.size=function(ut){return arguments.length?(Qe=(je=ut)==null,tt):Qe?null:je},tt.nodeSize=function(ut){return arguments.length?(Qe=(je=ut)!=null,tt):Qe?je:null},cu(tt,he)};function rr(he){return 1+v.max(he,function(Se){return Se.y})}function Br(he){return he.reduce(function(Se,je){return Se+je.x},0)/he.length}function wr(he){var Se=he.children;return Se&&Se.length?wr(Se[0]):he}function un(he){var Se=he.children,je;return Se&&(je=Se.length)?un(Se[je-1]):he}v.layout.treemap=function(){var he=v.layout.hierarchy(),Se=Math.round,je=[1,1],Qe=null,tt=Ln,ut=!1,jt,St="squarify",Qt=.5*(1+Math.sqrt(5));function gr(rn,pn){for(var xn=-1,Bn=rn.length,Fn,mn;++xn0;)Bn.push(mn=Fn[di-1]),Bn.area+=mn.area,St!=="squarify"||(Oa=$r(Bn,Ka))<=Ea?(Fn.pop(),Ea=Oa):(Bn.area-=Bn.pop().area,bn(Bn,Ka,xn,!1),Ka=Math.min(xn.dx,xn.dy),Bn.length=Bn.area=0,Ea=1/0);Bn.length&&(bn(Bn,Ka,xn,!0),Bn.length=Bn.area=0),pn.forEach(yr)}}function Kr(rn){var pn=rn.children;if(pn&&pn.length){var xn=tt(rn),Bn=pn.slice(),Fn,mn=[];for(gr(Bn,xn.dx*xn.dy/rn.value),mn.area=0;Fn=Bn.pop();)mn.push(Fn),mn.area+=Fn.area,Fn.z!=null&&(bn(mn,Fn.z?xn.dx:xn.dy,xn,!Bn.length),mn.length=mn.area=0);pn.forEach(Kr)}}function $r(rn,pn){for(var xn=rn.area,Bn,Fn=0,mn=1/0,Ea=-1,Oa=rn.length;++EaFn&&(Fn=Bn));return xn*=xn,pn*=pn,xn?Math.max(pn*Fn*Qt/xn,xn/(pn*mn*Qt)):1/0}function bn(rn,pn,xn,Bn){var Fn=-1,mn=rn.length,Ea=xn.x,Oa=xn.y,Ka=pn?Se(rn.area/pn):0,di;if(pn==xn.dx){for((Bn||Ka>xn.dy)&&(Ka=xn.dy);++Fnxn.dx)&&(Ka=xn.dx);++Fn1);return he+Se*Qe*Math.sqrt(-2*Math.log(ut)/ut)}},logNormal:function(){var he=v.random.normal.apply(v,arguments);return function(){return Math.exp(he())}},bates:function(he){var Se=v.random.irwinHall(he);return function(){return Se()/he}},irwinHall:function(he){return function(){for(var Se=0,je=0;je2?La:Pa,gr=Qe?gu:Zc;return tt=Qt(he,Se,gr,je),ut=Qt(Se,he,gr,Su),St}function St(Qt){return tt(Qt)}return St.invert=function(Qt){return ut(Qt)},St.domain=function(Qt){return arguments.length?(he=Qt.map(Number),jt()):he},St.range=function(Qt){return arguments.length?(Se=Qt,jt()):Se},St.rangeRound=function(Qt){return St.range(Qt).interpolate(Vu)},St.clamp=function(Qt){return arguments.length?(Qe=Qt,jt()):Qe},St.interpolate=function(Qt){return arguments.length?(je=Qt,jt()):je},St.ticks=function(Qt){return _i(he,Qt)},St.tickFormat=function(Qt,gr){return d3_scale_linearTickFormat(he,Qt,gr)},St.nice=function(Qt){return Ni(he,Qt),jt()},St.copy=function(){return qa(he,Se,je,Qe)},jt()}function Bi(he,Se){return v.rebind(he,Se,"range","rangeRound","interpolate","clamp")}function Ni(he,Se){return Gn(he,oa(Zi(he,Se)[2])),Gn(he,oa(Zi(he,Se)[2])),he}function Zi(he,Se){Se==null&&(Se=10);var je=Jn(he),Qe=je[1]-je[0],tt=Math.pow(10,Math.floor(Math.log(Qe/Se)/Math.LN10)),ut=Se/Qe*tt;return ut<=.15?tt*=10:ut<=.35?tt*=5:ut<=.75&&(tt*=2),je[0]=Math.ceil(je[0]/tt)*tt,je[1]=Math.floor(je[1]/tt)*tt+tt*.5,je[2]=tt,je}function _i(he,Se){return v.range.apply(v,Zi(he,Se))}var Va={s:1,g:1,p:1,r:1,e:1};function Ga(he){return-Math.floor(Math.log(he)/Math.LN10+.01)}function oo(he,Se){var je=Ga(Se[2]);return he in Va?Math.abs(je-Ga(Math.max(i(Se[0]),i(Se[1]))))+ +(he!=="e"):je-(he==="%")*2}v.scale.log=function(){return go(v.scale.linear().domain([0,1]),10,!0,[1,10])};function go(he,Se,je,Qe){function tt(St){return(je?Math.log(St<0?0:St):-Math.log(St>0?0:-St))/Math.log(Se)}function ut(St){return je?Math.pow(Se,St):-Math.pow(Se,-St)}function jt(St){return he(tt(St))}return jt.invert=function(St){return ut(he.invert(St))},jt.domain=function(St){return arguments.length?(je=St[0]>=0,he.domain((Qe=St.map(Number)).map(tt)),jt):Qe},jt.base=function(St){return arguments.length?(Se=+St,he.domain(Qe.map(tt)),jt):Se},jt.nice=function(){var St=Gn(Qe.map(tt),je?Math:Vo);return he.domain(St),Qe=St.map(ut),jt},jt.ticks=function(){var St=Jn(Qe),Qt=[],gr=St[0],yr=St[1],Kr=Math.floor(tt(gr)),$r=Math.ceil(tt(yr)),bn=Se%1?2:Se;if(isFinite($r-Kr)){if(je){for(;Kr<$r;Kr++)for(var Rn=1;Rn0;Rn--)Qt.push(ut(Kr)*Rn);for(Kr=0;Qt[Kr]yr;$r--);Qt=Qt.slice(Kr,$r)}return Qt},jt.copy=function(){return go(he.copy(),Se,je,Qe)},Bi(jt,he)}var Vo={floor:function(he){return-Math.ceil(-he)},ceil:function(he){return-Math.floor(-he)}};v.scale.pow=function(){return Wo(v.scale.linear(),1,[0,1])};function Wo(he,Se,je){var Qe=Yo(Se),tt=Yo(1/Se);function ut(jt){return he(Qe(jt))}return ut.invert=function(jt){return tt(he.invert(jt))},ut.domain=function(jt){return arguments.length?(he.domain((je=jt.map(Number)).map(Qe)),ut):je},ut.ticks=function(jt){return _i(je,jt)},ut.tickFormat=function(jt,St){return d3_scale_linearTickFormat(je,jt,St)},ut.nice=function(jt){return ut.domain(Ni(je,jt))},ut.exponent=function(jt){return arguments.length?(Qe=Yo(Se=jt),tt=Yo(1/Se),he.domain(je.map(Qe)),ut):Se},ut.copy=function(){return Wo(he.copy(),Se,je)},Bi(ut,he)}function Yo(he){return function(Se){return Se<0?-Math.pow(-Se,he):Math.pow(Se,he)}}v.scale.sqrt=function(){return v.scale.pow().exponent(.5)},v.scale.ordinal=function(){return as([],{t:"range",a:[[]]})};function as(he,Se){var je,Qe,tt;function ut(St){return Qe[((je.get(St)||(Se.t==="range"?je.set(St,he.push(St)):NaN))-1)%Qe.length]}function jt(St,Qt){return v.range(he.length).map(function(gr){return St+Qt*gr})}return ut.domain=function(St){if(!arguments.length)return he;he=[],je=new M;for(var Qt=-1,gr=St.length,yr;++Qt0?je[ut-1]:he[0],ut$r?0:1;if(yr=$e)return Qt(yr,Rn)+(gr?Qt(gr,1-Rn):"")+"Z";var rn,pn,xn,Bn,Fn=0,mn=0,Ea,Oa,Ka,di,Oi,Pi,ko,de,y=[];if((Bn=(+jt.apply(this,arguments)||0)/2)&&(xn=Qe===Nl?Math.sqrt(gr*gr+yr*yr):+Qe.apply(this,arguments),Rn||(mn*=-1),yr&&(mn=Vt(xn/yr*Math.sin(Bn))),gr&&(Fn=Vt(xn/gr*Math.sin(Bn)))),yr){Ea=yr*Math.cos(Kr+mn),Oa=yr*Math.sin(Kr+mn),Ka=yr*Math.cos($r-mn),di=yr*Math.sin($r-mn);var O=Math.abs($r-Kr-2*mn)<=Be?0:1;if(mn&&ic(Ea,Oa,Ka,di)===Rn^O){var ie=(Kr+$r)/2;Ea=yr*Math.cos(ie),Oa=yr*Math.sin(ie),Ka=di=null}}else Ea=Oa=0;if(gr){Oi=gr*Math.cos($r-Fn),Pi=gr*Math.sin($r-Fn),ko=gr*Math.cos(Kr+Fn),de=gr*Math.sin(Kr+Fn);var ce=Math.abs(Kr-$r+2*Fn)<=Be?0:1;if(Fn&&ic(Oi,Pi,ko,de)===1-Rn^ce){var _e=(Kr+$r)/2;Oi=gr*Math.cos(_e),Pi=gr*Math.sin(_e),ko=de=null}}else Oi=Pi=0;if(bn>ht&&(rn=Math.min(Math.abs(yr-gr)/2,+je.apply(this,arguments)))>.001){pn=gr0?0:1}function Oc(he,Se,je,Qe,tt){var ut=he[0]-Se[0],jt=he[1]-Se[1],St=(tt?Qe:-Qe)/Math.sqrt(ut*ut+jt*jt),Qt=St*jt,gr=-St*ut,yr=he[0]+Qt,Kr=he[1]+gr,$r=Se[0]+Qt,bn=Se[1]+gr,Rn=(yr+$r)/2,rn=(Kr+bn)/2,pn=$r-yr,xn=bn-Kr,Bn=pn*pn+xn*xn,Fn=je-Qe,mn=yr*bn-$r*Kr,Ea=(xn<0?-1:1)*Math.sqrt(Math.max(0,Fn*Fn*Bn-mn*mn)),Oa=(mn*xn-pn*Ea)/Bn,Ka=(-mn*pn-xn*Ea)/Bn,di=(mn*xn+pn*Ea)/Bn,Oi=(-mn*pn+xn*Ea)/Bn,Pi=Oa-Rn,ko=Ka-rn,de=di-Rn,y=Oi-rn;return Pi*Pi+ko*ko>de*de+y*y&&(Oa=di,Ka=Oi),[[Oa-Qt,Ka-gr],[Oa*je/Fn,Ka*je/Fn]]}function Zu(){return!0}function hu(he){var Se=Ao,je=ro,Qe=Zu,tt=Ql,ut=tt.key,jt=.7;function St(Qt){var gr=[],yr=[],Kr=-1,$r=Qt.length,bn,Rn=ar(Se),rn=ar(je);function pn(){gr.push("M",tt(he(yr),jt))}for(;++Kr<$r;)Qe.call(this,bn=Qt[Kr],Kr)?yr.push([+Rn.call(this,bn,Kr),+rn.call(this,bn,Kr)]):yr.length&&(pn(),yr=[]);return yr.length&&pn(),gr.length?gr.join(""):null}return St.x=function(Qt){return arguments.length?(Se=Qt,St):Se},St.y=function(Qt){return arguments.length?(je=Qt,St):je},St.defined=function(Qt){return arguments.length?(Qe=Qt,St):Qe},St.interpolate=function(Qt){return arguments.length?(typeof Qt=="function"?ut=tt=Qt:ut=(tt=Jl.get(Qt)||Ql).key,St):ut},St.tension=function(Qt){return arguments.length?(jt=Qt,St):jt},St}v.svg.line=function(){return hu(R)};var Jl=v.map({linear:Ql,"linear-closed":xu,step:rf,"step-before":Ff,"step-after":xc,basis:wu,"basis-open":jl,"basis-closed":Ul,bundle:Ci,cardinal:Bu,"cardinal-open":rl,"cardinal-closed":Ol,monotone:Dr});Jl.forEach(function(he,Se){Se.key=he,Se.closed=/-closed$/.test(he)});function Ql(he){return he.length>1?he.join("L"):he+"Z"}function xu(he){return he.join("L")+"Z"}function rf(he){for(var Se=0,je=he.length,Qe=he[0],tt=[Qe[0],",",Qe[1]];++Se1&&tt.push("H",Qe[0]),tt.join("")}function Ff(he){for(var Se=0,je=he.length,Qe=he[0],tt=[Qe[0],",",Qe[1]];++Se1){St=Se[1],ut=he[Qt],Qt++,Qe+="C"+(tt[0]+jt[0])+","+(tt[1]+jt[1])+","+(ut[0]-St[0])+","+(ut[1]-St[1])+","+ut[0]+","+ut[1];for(var gr=2;gr9&&(ut=je*3/Math.sqrt(ut),jt[St]=ut*Qe,jt[St+1]=ut*tt));for(St=-1;++St<=Qt;)ut=(he[Math.min(Qt,St+1)][0]-he[Math.max(0,St-1)][0])/(6*(1+jt[St]*jt[St])),Se.push([ut||0,jt[St]*ut||0]);return Se}function Dr(he){return he.length<3?Ql(he):he[0]+nf(he,Yt(he))}v.svg.line.radial=function(){var he=hu(Ur);return he.radius=he.x,delete he.x,he.angle=he.y,delete he.y,he};function Ur(he){for(var Se,je=-1,Qe=he.length,tt,ut;++jeBe)+",1 "+Kr}function gr(yr,Kr,$r,bn){return"Q 0,0 "+bn}return ut.radius=function(yr){return arguments.length?(je=ar(yr),ut):je},ut.source=function(yr){return arguments.length?(he=ar(yr),ut):he},ut.target=function(yr){return arguments.length?(Se=ar(yr),ut):Se},ut.startAngle=function(yr){return arguments.length?(Qe=ar(yr),ut):Qe},ut.endAngle=function(yr){return arguments.length?(tt=ar(yr),ut):tt},ut};function gn(he){return he.radius}v.svg.diagonal=function(){var he=Wr,Se=sn,je=Cn;function Qe(tt,ut){var jt=he.call(this,tt,ut),St=Se.call(this,tt,ut),Qt=(jt.y+St.y)/2,gr=[jt,{x:jt.x,y:Qt},{x:St.x,y:Qt},St];return gr=gr.map(je),"M"+gr[0]+"C"+gr[1]+" "+gr[2]+" "+gr[3]}return Qe.source=function(tt){return arguments.length?(he=ar(tt),Qe):he},Qe.target=function(tt){return arguments.length?(Se=ar(tt),Qe):Se},Qe.projection=function(tt){return arguments.length?(je=tt,Qe):je},Qe};function Cn(he){return[he.x,he.y]}v.svg.diagonal.radial=function(){var he=v.svg.diagonal(),Se=Cn,je=he.projection;return he.projection=function(Qe){return arguments.length?je(Zn(Se=Qe)):Se},he};function Zn(he){return function(){var Se=he.apply(this,arguments),je=Se[0],Qe=Se[1]-Ze;return[je*Math.cos(Qe),je*Math.sin(Qe)]}}v.svg.symbol=function(){var he=Na,Se=ya;function je(Qe,tt){return(Yi.get(he.call(this,Qe,tt))||wi)(Se.call(this,Qe,tt))}return je.type=function(Qe){return arguments.length?(he=ar(Qe),je):he},je.size=function(Qe){return arguments.length?(Se=ar(Qe),je):Se},je};function ya(){return 64}function Na(){return"circle"}function wi(he){var Se=Math.sqrt(he/Be);return"M0,"+Se+"A"+Se+","+Se+" 0 1,1 0,"+-Se+"A"+Se+","+Se+" 0 1,1 0,"+Se+"Z"}var Yi=v.map({circle:wi,cross:function(he){var Se=Math.sqrt(he/5)/2;return"M"+-3*Se+","+-Se+"H"+-Se+"V"+-3*Se+"H"+Se+"V"+-Se+"H"+3*Se+"V"+Se+"H"+Se+"V"+3*Se+"H"+-Se+"V"+Se+"H"+-3*Se+"Z"},diamond:function(he){var Se=Math.sqrt(he/(2*_o)),je=Se*_o;return"M0,"+-Se+"L"+je+",0 0,"+Se+" "+-je+",0Z"},square:function(he){var Se=Math.sqrt(he)/2;return"M"+-Se+","+-Se+"L"+Se+","+-Se+" "+Se+","+Se+" "+-Se+","+Se+"Z"},"triangle-down":function(he){var Se=Math.sqrt(he/Ti),je=Se*Ti/2;return"M0,"+je+"L"+Se+","+-je+" "+-Se+","+-je+"Z"},"triangle-up":function(he){var Se=Math.sqrt(he/Ti),je=Se*Ti/2;return"M0,"+-je+"L"+Se+","+je+" "+-Se+","+je+"Z"}});v.svg.symbolTypes=Yi.keys();var Ti=Math.sqrt(3),_o=Math.tan(30*Je);q.transition=function(he){for(var Se=cl||++Es,je=Li(he),Qe=[],tt,ut,jt=ql||{time:Date.now(),ease:nc,delay:0,duration:250},St=-1,Qt=this.length;++St0;)Kr[--Bn].call(he,xn);if(pn>=1)return jt.event&&jt.event.end.call(he,he.__data__,Se),--ut.count?delete ut[Qe]:delete he[je],1}jt||(St=tt.time,Qt=bi($r,0,St),jt=ut[Qe]={tween:new M,time:St,timer:Qt,delay:tt.delay,duration:tt.duration,ease:tt.ease,index:Se},tt=null,++ut.count)}v.svg.axis=function(){var he=v.scale.linear(),Se=fl,je=6,Qe=6,tt=3,ut=[10],jt=null,St;function Qt(gr){gr.each(function(){var yr=v.select(this),Kr=this.__chart__||he,$r=this.__chart__=he.copy(),bn=jt??($r.ticks?$r.ticks.apply($r,ut):$r.domain()),Rn=St??($r.tickFormat?$r.tickFormat.apply($r,ut):R),rn=yr.selectAll(".tick").data(bn,$r),pn=rn.enter().insert("g",".domain").attr("class","tick").style("opacity",ht),xn=v.transition(rn.exit()).style("opacity",ht).remove(),Bn=v.transition(rn.order()).style("opacity",1),Fn=Math.max(je,0)+tt,mn,Ea=ca($r),Oa=yr.selectAll(".domain").data([0]),Ka=(Oa.enter().append("path").attr("class","domain"),v.transition(Oa));pn.append("line"),pn.append("text");var di=pn.select("line"),Oi=Bn.select("line"),Pi=rn.select("text").text(Rn),ko=pn.select("text"),de=Bn.select("text"),y=Se==="top"||Se==="left"?-1:1,O,ie,ce,_e;if(Se==="bottom"||Se==="top"?(mn=tu,O="x",ce="y",ie="x2",_e="y2",Pi.attr("dy",y<0?"0em":".71em").style("text-anchor","middle"),Ka.attr("d","M"+Ea[0]+","+y*Qe+"V0H"+Ea[1]+"V"+y*Qe)):(mn=Bs,O="y",ce="x",ie="y2",_e="x2",Pi.attr("dy",".32em").style("text-anchor",y<0?"end":"start"),Ka.attr("d","M"+y*Qe+","+Ea[0]+"H0V"+Ea[1]+"H"+y*Qe)),di.attr(_e,y*je),ko.attr(ce,y*Fn),Oi.attr(ie,0).attr(_e,y*je),de.attr(O,0).attr(ce,y*Fn),$r.rangeBand){var De=$r,Ne=De.rangeBand()/2;Kr=$r=function(Ye){return De(Ye)+Ne}}else Kr.rangeBand?Kr=$r:xn.call(mn,$r,Kr);pn.call(mn,Kr,$r),Bn.call(mn,$r,$r)})}return Qt.scale=function(gr){return arguments.length?(he=gr,Qt):he},Qt.orient=function(gr){return arguments.length?(Se=gr in Ku?gr+"":fl,Qt):Se},Qt.ticks=function(){return arguments.length?(ut=E(arguments),Qt):ut},Qt.tickValues=function(gr){return arguments.length?(jt=gr,Qt):jt},Qt.tickFormat=function(gr){return arguments.length?(St=gr,Qt):St},Qt.tickSize=function(gr){var yr=arguments.length;return yr?(je=+gr,Qe=+arguments[yr-1],Qt):je},Qt.innerTickSize=function(gr){return arguments.length?(je=+gr,Qt):je},Qt.outerTickSize=function(gr){return arguments.length?(Qe=+gr,Qt):Qe},Qt.tickPadding=function(gr){return arguments.length?(tt=+gr,Qt):tt},Qt.tickSubdivide=function(){return arguments.length&&Qt},Qt};var fl="bottom",Ku={top:1,right:1,bottom:1,left:1};function tu(he,Se,je){he.attr("transform",function(Qe){var tt=Se(Qe);return"translate("+(isFinite(tt)?tt:je(Qe))+",0)"})}function Bs(he,Se,je){he.attr("transform",function(Qe){var tt=Se(Qe);return"translate(0,"+(isFinite(tt)?tt:je(Qe))+")"})}v.svg.brush=function(){var he=ae(yr,"brushstart","brush","brushend"),Se=null,je=null,Qe=[0,0],tt=[0,0],ut,jt,St=!0,Qt=!0,gr=du[0];function yr(rn){rn.each(function(){var pn=v.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Rn).on("touchstart.brush",Rn),xn=pn.selectAll(".background").data([0]);xn.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),pn.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Bn=pn.selectAll(".resize").data(gr,R);Bn.exit().remove(),Bn.enter().append("g").attr("class",function(Oa){return"resize "+Oa}).style("cursor",function(Oa){return oc[Oa]}).append("rect").attr("x",function(Oa){return/[ew]$/.test(Oa)?-3:null}).attr("y",function(Oa){return/^[ns]/.test(Oa)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Bn.style("display",yr.empty()?"none":null);var Fn=v.transition(pn),mn=v.transition(xn),Ea;Se&&(Ea=ca(Se),mn.attr("x",Ea[0]).attr("width",Ea[1]-Ea[0]),$r(Fn)),je&&(Ea=ca(je),mn.attr("y",Ea[0]).attr("height",Ea[1]-Ea[0]),bn(Fn)),Kr(Fn)})}yr.event=function(rn){rn.each(function(){var pn=he.of(this,arguments),xn={x:Qe,y:tt,i:ut,j:jt},Bn=this.__chart__||xn;this.__chart__=xn,cl?v.select(this).transition().each("start.brush",function(){ut=Bn.i,jt=Bn.j,Qe=Bn.x,tt=Bn.y,pn({type:"brushstart"})}).tween("brush:brush",function(){var Fn=Eu(Qe,xn.x),mn=Eu(tt,xn.y);return ut=jt=null,function(Ea){Qe=xn.x=Fn(Ea),tt=xn.y=mn(Ea),pn({type:"brush",mode:"resize"})}}).each("end.brush",function(){ut=xn.i,jt=xn.j,pn({type:"brush",mode:"resize"}),pn({type:"brushend"})}):(pn({type:"brushstart"}),pn({type:"brush",mode:"resize"}),pn({type:"brushend"}))})};function Kr(rn){rn.selectAll(".resize").attr("transform",function(pn){return"translate("+Qe[+/e$/.test(pn)]+","+tt[+/^s/.test(pn)]+")"})}function $r(rn){rn.select(".extent").attr("x",Qe[0]),rn.selectAll(".extent,.n>rect,.s>rect").attr("width",Qe[1]-Qe[0])}function bn(rn){rn.select(".extent").attr("y",tt[0]),rn.selectAll(".extent,.e>rect,.w>rect").attr("height",tt[1]-tt[0])}function Rn(){var rn=this,pn=v.select(v.event.target),xn=he.of(rn,arguments),Bn=v.select(rn),Fn=pn.datum(),mn=!/^(n|s)$/.test(Fn)&&Se,Ea=!/^(e|w)$/.test(Fn)&&je,Oa=pn.classed("extent"),Ka=Zt(rn),di,Oi=v.mouse(rn),Pi,ko=v.select(e(rn)).on("keydown.brush",O).on("keyup.brush",ie);if(v.event.changedTouches?ko.on("touchmove.brush",ce).on("touchend.brush",De):ko.on("mousemove.brush",ce).on("mouseup.brush",De),Bn.interrupt().selectAll("*").interrupt(),Oa)Oi[0]=Qe[0]-Oi[0],Oi[1]=tt[0]-Oi[1];else if(Fn){var de=+/w$/.test(Fn),y=+/^n/.test(Fn);Pi=[Qe[1-de]-Oi[0],tt[1-y]-Oi[1]],Oi[0]=Qe[de],Oi[1]=tt[y]}else v.event.altKey&&(di=Oi.slice());Bn.style("pointer-events","none").selectAll(".resize").style("display",null),v.select("body").style("cursor",pn.style("cursor")),xn({type:"brushstart"}),ce();function O(){v.event.keyCode==32&&(Oa||(di=null,Oi[0]-=Qe[1],Oi[1]-=tt[1],Oa=2),Q())}function ie(){v.event.keyCode==32&&Oa==2&&(Oi[0]+=Qe[1],Oi[1]+=tt[1],Oa=0,Q())}function ce(){var Ne=v.mouse(rn),Ye=!1;Pi&&(Ne[0]+=Pi[0],Ne[1]+=Pi[1]),Oa||(v.event.altKey?(di||(di=[(Qe[0]+Qe[1])/2,(tt[0]+tt[1])/2]),Oi[0]=Qe[+(Ne[0]0))return At;do At.push(Kt=new Date(+gt)),Te(gt,Tt),se(gt);while(Kt=mt)for(;se(mt),!gt(mt);)mt.setTime(mt-1)},function(mt,Tt){if(mt>=mt)if(Tt<0)for(;++Tt<=0;)for(;Te(mt,-1),!gt(mt););else for(;--Tt>=0;)for(;Te(mt,1),!gt(mt););})},Fe&&(Ge.count=function(gt,mt){return x.setTime(+gt),E.setTime(+mt),se(x),se(E),Math.floor(Fe(x,E))},Ge.every=function(gt){return gt=Math.floor(gt),!isFinite(gt)||!(gt>0)?null:gt>1?Ge.filter(We?function(mt){return We(mt)%gt===0}:function(mt){return Ge.count(0,mt)%gt===0}):Ge}),Ge}var l=k(function(){},function(se,Te){se.setTime(+se+Te)},function(se,Te){return Te-se});l.every=function(se){return se=Math.floor(se),!isFinite(se)||!(se>0)?null:se>1?k(function(Te){Te.setTime(Math.floor(Te/se)*se)},function(Te,Fe){Te.setTime(+Te+Fe*se)},function(Te,Fe){return(Fe-Te)/se}):l};var e=l.range,t=1e3,a=6e4,r=36e5,n=864e5,o=6048e5,s=k(function(se){se.setTime(se-se.getMilliseconds())},function(se,Te){se.setTime(+se+Te*t)},function(se,Te){return(Te-se)/t},function(se){return se.getUTCSeconds()}),c=s.range,m=k(function(se){se.setTime(se-se.getMilliseconds()-se.getSeconds()*t)},function(se,Te){se.setTime(+se+Te*a)},function(se,Te){return(Te-se)/a},function(se){return se.getMinutes()}),h=m.range,p=k(function(se){se.setTime(se-se.getMilliseconds()-se.getSeconds()*t-se.getMinutes()*a)},function(se,Te){se.setTime(+se+Te*r)},function(se,Te){return(Te-se)/r},function(se){return se.getHours()}),g=p.range,i=k(function(se){se.setHours(0,0,0,0)},function(se,Te){se.setDate(se.getDate()+Te)},function(se,Te){return(Te-se-(Te.getTimezoneOffset()-se.getTimezoneOffset())*a)/n},function(se){return se.getDate()-1}),w=i.range;function S(se){return k(function(Te){Te.setDate(Te.getDate()-(Te.getDay()+7-se)%7),Te.setHours(0,0,0,0)},function(Te,Fe){Te.setDate(Te.getDate()+Fe*7)},function(Te,Fe){return(Fe-Te-(Fe.getTimezoneOffset()-Te.getTimezoneOffset())*a)/o})}var M=S(0),C=S(1),_=S(2),T=S(3),f=S(4),u=S(5),A=S(6),b=M.range,z=C.range,I=_.range,N=T.range,R=f.range,B=u.range,F=A.range,P=k(function(se){se.setDate(1),se.setHours(0,0,0,0)},function(se,Te){se.setMonth(se.getMonth()+Te)},function(se,Te){return Te.getMonth()-se.getMonth()+(Te.getFullYear()-se.getFullYear())*12},function(se){return se.getMonth()}),j=P.range,U=k(function(se){se.setMonth(0,1),se.setHours(0,0,0,0)},function(se,Te){se.setFullYear(se.getFullYear()+Te)},function(se,Te){return Te.getFullYear()-se.getFullYear()},function(se){return se.getFullYear()});U.every=function(se){return!isFinite(se=Math.floor(se))||!(se>0)?null:k(function(Te){Te.setFullYear(Math.floor(Te.getFullYear()/se)*se),Te.setMonth(0,1),Te.setHours(0,0,0,0)},function(Te,Fe){Te.setFullYear(Te.getFullYear()+Fe*se)})};var Z=U.range,Q=k(function(se){se.setUTCSeconds(0,0)},function(se,Te){se.setTime(+se+Te*a)},function(se,Te){return(Te-se)/a},function(se){return se.getUTCMinutes()}),re=Q.range,ae=k(function(se){se.setUTCMinutes(0,0,0)},function(se,Te){se.setTime(+se+Te*r)},function(se,Te){return(Te-se)/r},function(se){return se.getUTCHours()}),oe=ae.range,H=k(function(se){se.setUTCHours(0,0,0,0)},function(se,Te){se.setUTCDate(se.getUTCDate()+Te)},function(se,Te){return(Te-se)/n},function(se){return se.getUTCDate()-1}),X=H.range;function K(se){return k(function(Te){Te.setUTCDate(Te.getUTCDate()-(Te.getUTCDay()+7-se)%7),Te.setUTCHours(0,0,0,0)},function(Te,Fe){Te.setUTCDate(Te.getUTCDate()+Fe*7)},function(Te,Fe){return(Fe-Te)/o})}var G=K(0),Y=K(1),q=K(2),$=K(3),ee=K(4),ne=K(5),fe=K(6),ye=G.range,xe=Y.range,Ae=q.range,Me=$.range,Ie=ee.range,Ue=ne.range,qe=fe.range,ke=k(function(se){se.setUTCDate(1),se.setUTCHours(0,0,0,0)},function(se,Te){se.setUTCMonth(se.getUTCMonth()+Te)},function(se,Te){return Te.getUTCMonth()-se.getUTCMonth()+(Te.getUTCFullYear()-se.getUTCFullYear())*12},function(se){return se.getUTCMonth()}),ge=ke.range,ue=k(function(se){se.setUTCMonth(0,1),se.setUTCHours(0,0,0,0)},function(se,Te){se.setUTCFullYear(se.getUTCFullYear()+Te)},function(se,Te){return Te.getUTCFullYear()-se.getUTCFullYear()},function(se){return se.getUTCFullYear()});ue.every=function(se){return!isFinite(se=Math.floor(se))||!(se>0)?null:k(function(Te){Te.setUTCFullYear(Math.floor(Te.getUTCFullYear()/se)*se),Te.setUTCMonth(0,1),Te.setUTCHours(0,0,0,0)},function(Te,Fe){Te.setUTCFullYear(Te.getUTCFullYear()+Fe*se)})};var ve=ue.range;v.timeDay=i,v.timeDays=w,v.timeFriday=u,v.timeFridays=B,v.timeHour=p,v.timeHours=g,v.timeInterval=k,v.timeMillisecond=l,v.timeMilliseconds=e,v.timeMinute=m,v.timeMinutes=h,v.timeMonday=C,v.timeMondays=z,v.timeMonth=P,v.timeMonths=j,v.timeSaturday=A,v.timeSaturdays=F,v.timeSecond=s,v.timeSeconds=c,v.timeSunday=M,v.timeSundays=b,v.timeThursday=f,v.timeThursdays=R,v.timeTuesday=_,v.timeTuesdays=I,v.timeWednesday=T,v.timeWednesdays=N,v.timeWeek=M,v.timeWeeks=b,v.timeYear=U,v.timeYears=Z,v.utcDay=H,v.utcDays=X,v.utcFriday=ne,v.utcFridays=Ue,v.utcHour=ae,v.utcHours=oe,v.utcMillisecond=l,v.utcMilliseconds=e,v.utcMinute=Q,v.utcMinutes=re,v.utcMonday=Y,v.utcMondays=xe,v.utcMonth=ke,v.utcMonths=ge,v.utcSaturday=fe,v.utcSaturdays=qe,v.utcSecond=s,v.utcSeconds=c,v.utcSunday=G,v.utcSundays=ye,v.utcThursday=ee,v.utcThursdays=Ie,v.utcTuesday=q,v.utcTuesdays=Ae,v.utcWednesday=$,v.utcWednesdays=Me,v.utcWeek=G,v.utcWeeks=ye,v.utcYear=ue,v.utcYears=ve,Object.defineProperty(v,"__esModule",{value:!0})})}}),ji=Ee({"node_modules/d3-time-format/dist/d3-time-format.js"(J,V){(function(v,x){typeof J=="object"&&typeof V<"u"?x(J,ki()):(v=v||self,x(v.d3=v.d3||{},v.d3))})(J,function(v,x){"use strict";function E(Ze){if(0<=Ze.y&&Ze.y<100){var Je=new Date(-1,Ze.m,Ze.d,Ze.H,Ze.M,Ze.S,Ze.L);return Je.setFullYear(Ze.y),Je}return new Date(Ze.y,Ze.m,Ze.d,Ze.H,Ze.M,Ze.S,Ze.L)}function k(Ze){if(0<=Ze.y&&Ze.y<100){var Je=new Date(Date.UTC(-1,Ze.m,Ze.d,Ze.H,Ze.M,Ze.S,Ze.L));return Je.setUTCFullYear(Ze.y),Je}return new Date(Date.UTC(Ze.y,Ze.m,Ze.d,Ze.H,Ze.M,Ze.S,Ze.L))}function l(Ze,Je,Mt){return{y:Ze,m:Je,d:Mt,H:0,M:0,S:0,L:0}}function e(Ze){var Je=Ze.dateTime,Mt=Ze.date,dt=Ze.time,Dt=Ze.periods,Ct=Ze.days,Vt=Ze.shortDays,Ht=Ze.months,Wt=Ze.shortMonths,Sr=c(Dt),on=m(Dt),$t=c(Ct),It=m(Ct),ir=c(Vt),cr=m(Vt),fr=c(Ht),Ir=m(Ht),ln=c(Wt),nn=m(Wt),wn={a:ho,A:da,b:Kn,B:ot,c:null,d:P,e:P,f:re,g:ne,G:ye,H:j,I:U,j:Z,L:Q,m:ae,M:oe,p:et,q:hr,Q:Zt,s:sr,S:H,u:X,U:K,V:Y,w:q,W:$,x:null,X:null,y:ee,Y:fe,Z:xe,"%":_r},Un={a:ur,A:Tr,b:Rr,B:Fr,c:null,d:Ae,e:Ae,f:ke,g:Tt,G:Kt,H:Me,I:Ie,j:Ue,L:qe,m:ge,M:ue,p:at,q:kt,Q:Zt,s:sr,S:ve,u:se,U:Te,V:We,w:Ge,W:gt,x:null,X:null,y:mt,Y:At,Z:nr,"%":_r},jn={a:Fa,A:ai,b:Mi,B:ci,c:ba,d:f,e:f,f:N,g:M,G:S,H:A,I:A,j:u,L:I,m:T,M:b,p:ei,q:_,Q:B,s:F,S:z,u:p,U:g,V:i,w:h,W:w,x:pa,X:Ii,y:M,Y:S,Z:C,"%":R};wn.x=Aa(Mt,wn),wn.X=Aa(dt,wn),wn.c=Aa(Je,wn),Un.x=Aa(Mt,Un),Un.X=Aa(dt,Un),Un.c=Aa(Je,Un);function Aa(Ut,ar){return function(Er){var br=[],Or=-1,Pr=0,hn=Ut.length,zn,Pn,Ca;for(Er instanceof Date||(Er=new Date(+Er));++Or53)return null;"w"in br||(br.w=1),"Z"in br?(Pr=k(l(br.y,0,1)),hn=Pr.getUTCDay(),Pr=hn>4||hn===0?x.utcMonday.ceil(Pr):x.utcMonday(Pr),Pr=x.utcDay.offset(Pr,(br.V-1)*7),br.y=Pr.getUTCFullYear(),br.m=Pr.getUTCMonth(),br.d=Pr.getUTCDate()+(br.w+6)%7):(Pr=E(l(br.y,0,1)),hn=Pr.getDay(),Pr=hn>4||hn===0?x.timeMonday.ceil(Pr):x.timeMonday(Pr),Pr=x.timeDay.offset(Pr,(br.V-1)*7),br.y=Pr.getFullYear(),br.m=Pr.getMonth(),br.d=Pr.getDate()+(br.w+6)%7)}else("W"in br||"U"in br)&&("w"in br||(br.w="u"in br?br.u%7:"W"in br?1:0),hn="Z"in br?k(l(br.y,0,1)).getUTCDay():E(l(br.y,0,1)).getDay(),br.m=0,br.d="W"in br?(br.w+6)%7+br.W*7-(hn+5)%7:br.w+br.U*7-(hn+6)%7);return"Z"in br?(br.H+=br.Z/100|0,br.M+=br.Z%100,k(br)):E(br)}}function Qn(Ut,ar,Er,br){for(var Or=0,Pr=ar.length,hn=Er.length,zn,Pn;Or=hn)return-1;if(zn=ar.charCodeAt(Or++),zn===37){if(zn=ar.charAt(Or++),Pn=jn[zn in t?ar.charAt(Or++):zn],!Pn||(br=Pn(Ut,Er,br))<0)return-1}else if(zn!=Er.charCodeAt(br++))return-1}return br}function ei(Ut,ar,Er){var br=Sr.exec(ar.slice(Er));return br?(Ut.p=on[br[0].toLowerCase()],Er+br[0].length):-1}function Fa(Ut,ar,Er){var br=ir.exec(ar.slice(Er));return br?(Ut.w=cr[br[0].toLowerCase()],Er+br[0].length):-1}function ai(Ut,ar,Er){var br=$t.exec(ar.slice(Er));return br?(Ut.w=It[br[0].toLowerCase()],Er+br[0].length):-1}function Mi(Ut,ar,Er){var br=ln.exec(ar.slice(Er));return br?(Ut.m=nn[br[0].toLowerCase()],Er+br[0].length):-1}function ci(Ut,ar,Er){var br=fr.exec(ar.slice(Er));return br?(Ut.m=Ir[br[0].toLowerCase()],Er+br[0].length):-1}function ba(Ut,ar,Er){return Qn(Ut,Je,ar,Er)}function pa(Ut,ar,Er){return Qn(Ut,Mt,ar,Er)}function Ii(Ut,ar,Er){return Qn(Ut,dt,ar,Er)}function ho(Ut){return Vt[Ut.getDay()]}function da(Ut){return Ct[Ut.getDay()]}function Kn(Ut){return Wt[Ut.getMonth()]}function ot(Ut){return Ht[Ut.getMonth()]}function et(Ut){return Dt[+(Ut.getHours()>=12)]}function hr(Ut){return 1+~~(Ut.getMonth()/3)}function ur(Ut){return Vt[Ut.getUTCDay()]}function Tr(Ut){return Ct[Ut.getUTCDay()]}function Rr(Ut){return Wt[Ut.getUTCMonth()]}function Fr(Ut){return Ht[Ut.getUTCMonth()]}function at(Ut){return Dt[+(Ut.getUTCHours()>=12)]}function kt(Ut){return 1+~~(Ut.getUTCMonth()/3)}return{format:function(Ut){var ar=Aa(Ut+="",wn);return ar.toString=function(){return Ut},ar},parse:function(Ut){var ar=ua(Ut+="",!1);return ar.toString=function(){return Ut},ar},utcFormat:function(Ut){var ar=Aa(Ut+="",Un);return ar.toString=function(){return Ut},ar},utcParse:function(Ut){var ar=ua(Ut+="",!0);return ar.toString=function(){return Ut},ar}}}var t={"-":"",_:" ",0:"0"},a=/^\s*\d+/,r=/^%/,n=/[\\^$*+?|[\]().{}]/g;function o(Ze,Je,Mt){var dt=Ze<0?"-":"",Dt=(dt?-Ze:Ze)+"",Ct=Dt.length;return dt+(Ct68?1900:2e3),Mt+dt[0].length):-1}function C(Ze,Je,Mt){var dt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Je.slice(Mt,Mt+6));return dt?(Ze.Z=dt[1]?0:-(dt[2]+(dt[3]||"00")),Mt+dt[0].length):-1}function _(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+1));return dt?(Ze.q=dt[0]*3-3,Mt+dt[0].length):-1}function T(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+2));return dt?(Ze.m=dt[0]-1,Mt+dt[0].length):-1}function f(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+2));return dt?(Ze.d=+dt[0],Mt+dt[0].length):-1}function u(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+3));return dt?(Ze.m=0,Ze.d=+dt[0],Mt+dt[0].length):-1}function A(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+2));return dt?(Ze.H=+dt[0],Mt+dt[0].length):-1}function b(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+2));return dt?(Ze.M=+dt[0],Mt+dt[0].length):-1}function z(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+2));return dt?(Ze.S=+dt[0],Mt+dt[0].length):-1}function I(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+3));return dt?(Ze.L=+dt[0],Mt+dt[0].length):-1}function N(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+6));return dt?(Ze.L=Math.floor(dt[0]/1e3),Mt+dt[0].length):-1}function R(Ze,Je,Mt){var dt=r.exec(Je.slice(Mt,Mt+1));return dt?Mt+dt[0].length:-1}function B(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt));return dt?(Ze.Q=+dt[0],Mt+dt[0].length):-1}function F(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt));return dt?(Ze.s=+dt[0],Mt+dt[0].length):-1}function P(Ze,Je){return o(Ze.getDate(),Je,2)}function j(Ze,Je){return o(Ze.getHours(),Je,2)}function U(Ze,Je){return o(Ze.getHours()%12||12,Je,2)}function Z(Ze,Je){return o(1+x.timeDay.count(x.timeYear(Ze),Ze),Je,3)}function Q(Ze,Je){return o(Ze.getMilliseconds(),Je,3)}function re(Ze,Je){return Q(Ze,Je)+"000"}function ae(Ze,Je){return o(Ze.getMonth()+1,Je,2)}function oe(Ze,Je){return o(Ze.getMinutes(),Je,2)}function H(Ze,Je){return o(Ze.getSeconds(),Je,2)}function X(Ze){var Je=Ze.getDay();return Je===0?7:Je}function K(Ze,Je){return o(x.timeSunday.count(x.timeYear(Ze)-1,Ze),Je,2)}function G(Ze){var Je=Ze.getDay();return Je>=4||Je===0?x.timeThursday(Ze):x.timeThursday.ceil(Ze)}function Y(Ze,Je){return Ze=G(Ze),o(x.timeThursday.count(x.timeYear(Ze),Ze)+(x.timeYear(Ze).getDay()===4),Je,2)}function q(Ze){return Ze.getDay()}function $(Ze,Je){return o(x.timeMonday.count(x.timeYear(Ze)-1,Ze),Je,2)}function ee(Ze,Je){return o(Ze.getFullYear()%100,Je,2)}function ne(Ze,Je){return Ze=G(Ze),o(Ze.getFullYear()%100,Je,2)}function fe(Ze,Je){return o(Ze.getFullYear()%1e4,Je,4)}function ye(Ze,Je){var Mt=Ze.getDay();return Ze=Mt>=4||Mt===0?x.timeThursday(Ze):x.timeThursday.ceil(Ze),o(Ze.getFullYear()%1e4,Je,4)}function xe(Ze){var Je=Ze.getTimezoneOffset();return(Je>0?"-":(Je*=-1,"+"))+o(Je/60|0,"0",2)+o(Je%60,"0",2)}function Ae(Ze,Je){return o(Ze.getUTCDate(),Je,2)}function Me(Ze,Je){return o(Ze.getUTCHours(),Je,2)}function Ie(Ze,Je){return o(Ze.getUTCHours()%12||12,Je,2)}function Ue(Ze,Je){return o(1+x.utcDay.count(x.utcYear(Ze),Ze),Je,3)}function qe(Ze,Je){return o(Ze.getUTCMilliseconds(),Je,3)}function ke(Ze,Je){return qe(Ze,Je)+"000"}function ge(Ze,Je){return o(Ze.getUTCMonth()+1,Je,2)}function ue(Ze,Je){return o(Ze.getUTCMinutes(),Je,2)}function ve(Ze,Je){return o(Ze.getUTCSeconds(),Je,2)}function se(Ze){var Je=Ze.getUTCDay();return Je===0?7:Je}function Te(Ze,Je){return o(x.utcSunday.count(x.utcYear(Ze)-1,Ze),Je,2)}function Fe(Ze){var Je=Ze.getUTCDay();return Je>=4||Je===0?x.utcThursday(Ze):x.utcThursday.ceil(Ze)}function We(Ze,Je){return Ze=Fe(Ze),o(x.utcThursday.count(x.utcYear(Ze),Ze)+(x.utcYear(Ze).getUTCDay()===4),Je,2)}function Ge(Ze){return Ze.getUTCDay()}function gt(Ze,Je){return o(x.utcMonday.count(x.utcYear(Ze)-1,Ze),Je,2)}function mt(Ze,Je){return o(Ze.getUTCFullYear()%100,Je,2)}function Tt(Ze,Je){return Ze=Fe(Ze),o(Ze.getUTCFullYear()%100,Je,2)}function At(Ze,Je){return o(Ze.getUTCFullYear()%1e4,Je,4)}function Kt(Ze,Je){var Mt=Ze.getUTCDay();return Ze=Mt>=4||Mt===0?x.utcThursday(Ze):x.utcThursday.ceil(Ze),o(Ze.getUTCFullYear()%1e4,Je,4)}function nr(){return"+0000"}function _r(){return"%"}function Zt(Ze){return+Ze}function sr(Ze){return Math.floor(+Ze/1e3)}var Ot;vt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function vt(Ze){return Ot=e(Ze),v.timeFormat=Ot.format,v.timeParse=Ot.parse,v.utcFormat=Ot.utcFormat,v.utcParse=Ot.utcParse,Ot}var ht="%Y-%m-%dT%H:%M:%S.%LZ";function Re(Ze){return Ze.toISOString()}var Be=Date.prototype.toISOString?Re:v.utcFormat(ht);function He(Ze){var Je=new Date(Ze);return isNaN(Je)?null:Je}var $e=+new Date("2000-01-01T00:00:00.000Z")?He:v.utcParse(ht);v.isoFormat=Be,v.isoParse=$e,v.timeFormatDefaultLocale=vt,v.timeFormatLocale=e,Object.defineProperty(v,"__esModule",{value:!0})})}}),ls=Ee({"node_modules/d3-format/dist/d3-format.js"(J,V){(function(v,x){typeof J=="object"&&typeof V<"u"?x(J):(v=typeof globalThis<"u"?globalThis:v||self,x(v.d3=v.d3||{}))})(J,function(v){"use strict";function x(T){return Math.abs(T=Math.round(T))>=1e21?T.toLocaleString("en").replace(/,/g,""):T.toString(10)}function E(T,f){if((u=(T=f?T.toExponential(f-1):T.toExponential()).indexOf("e"))<0)return null;var u,A=T.slice(0,u);return[A.length>1?A[0]+A.slice(2):A,+T.slice(u+1)]}function k(T){return T=E(Math.abs(T)),T?T[1]:NaN}function l(T,f){return function(u,A){for(var b=u.length,z=[],I=0,N=T[0],R=0;b>0&&N>0&&(R+N+1>A&&(N=Math.max(1,A-R)),z.push(u.substring(b-=N,b+N)),!((R+=N+1)>A));)N=T[I=(I+1)%T.length];return z.reverse().join(f)}}function e(T){return function(f){return f.replace(/[0-9]/g,function(u){return T[+u]})}}var t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(T){if(!(f=t.exec(T)))throw new Error("invalid format: "+T);var f;return new r({fill:f[1],align:f[2],sign:f[3],symbol:f[4],zero:f[5],width:f[6],comma:f[7],precision:f[8]&&f[8].slice(1),trim:f[9],type:f[10]})}a.prototype=r.prototype;function r(T){this.fill=T.fill===void 0?" ":T.fill+"",this.align=T.align===void 0?">":T.align+"",this.sign=T.sign===void 0?"-":T.sign+"",this.symbol=T.symbol===void 0?"":T.symbol+"",this.zero=!!T.zero,this.width=T.width===void 0?void 0:+T.width,this.comma=!!T.comma,this.precision=T.precision===void 0?void 0:+T.precision,this.trim=!!T.trim,this.type=T.type===void 0?"":T.type+""}r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function n(T){e:for(var f=T.length,u=1,A=-1,b;u0&&(A=0);break}return A>0?T.slice(0,A)+T.slice(b+1):T}var o;function s(T,f){var u=E(T,f);if(!u)return T+"";var A=u[0],b=u[1],z=b-(o=Math.max(-8,Math.min(8,Math.floor(b/3)))*3)+1,I=A.length;return z===I?A:z>I?A+new Array(z-I+1).join("0"):z>0?A.slice(0,z)+"."+A.slice(z):"0."+new Array(1-z).join("0")+E(T,Math.max(0,f+z-1))[0]}function c(T,f){var u=E(T,f);if(!u)return T+"";var A=u[0],b=u[1];return b<0?"0."+new Array(-b).join("0")+A:A.length>b+1?A.slice(0,b+1)+"."+A.slice(b+1):A+new Array(b-A.length+2).join("0")}var m={"%":function(T,f){return(T*100).toFixed(f)},b:function(T){return Math.round(T).toString(2)},c:function(T){return T+""},d:x,e:function(T,f){return T.toExponential(f)},f:function(T,f){return T.toFixed(f)},g:function(T,f){return T.toPrecision(f)},o:function(T){return Math.round(T).toString(8)},p:function(T,f){return c(T*100,f)},r:c,s,X:function(T){return Math.round(T).toString(16).toUpperCase()},x:function(T){return Math.round(T).toString(16)}};function h(T){return T}var p=Array.prototype.map,g=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function i(T){var f=T.grouping===void 0||T.thousands===void 0?h:l(p.call(T.grouping,Number),T.thousands+""),u=T.currency===void 0?"":T.currency[0]+"",A=T.currency===void 0?"":T.currency[1]+"",b=T.decimal===void 0?".":T.decimal+"",z=T.numerals===void 0?h:e(p.call(T.numerals,String)),I=T.percent===void 0?"%":T.percent+"",N=T.minus===void 0?"-":T.minus+"",R=T.nan===void 0?"NaN":T.nan+"";function B(P){P=a(P);var j=P.fill,U=P.align,Z=P.sign,Q=P.symbol,re=P.zero,ae=P.width,oe=P.comma,H=P.precision,X=P.trim,K=P.type;K==="n"?(oe=!0,K="g"):m[K]||(H===void 0&&(H=12),X=!0,K="g"),(re||j==="0"&&U==="=")&&(re=!0,j="0",U="=");var G=Q==="$"?u:Q==="#"&&/[boxX]/.test(K)?"0"+K.toLowerCase():"",Y=Q==="$"?A:/[%p]/.test(K)?I:"",q=m[K],$=/[defgprs%]/.test(K);H=H===void 0?6:/[gprs]/.test(K)?Math.max(1,Math.min(21,H)):Math.max(0,Math.min(20,H));function ee(ne){var fe=G,ye=Y,xe,Ae,Me;if(K==="c")ye=q(ne)+ye,ne="";else{ne=+ne;var Ie=ne<0||1/ne<0;if(ne=isNaN(ne)?R:q(Math.abs(ne),H),X&&(ne=n(ne)),Ie&&+ne==0&&Z!=="+"&&(Ie=!1),fe=(Ie?Z==="("?Z:N:Z==="-"||Z==="("?"":Z)+fe,ye=(K==="s"?g[8+o/3]:"")+ye+(Ie&&Z==="("?")":""),$){for(xe=-1,Ae=ne.length;++xeMe||Me>57){ye=(Me===46?b+ne.slice(xe+1):ne.slice(xe))+ye,ne=ne.slice(0,xe);break}}}oe&&!re&&(ne=f(ne,1/0));var Ue=fe.length+ne.length+ye.length,qe=Ue>1)+fe+ne+ye+qe.slice(Ue);break;default:ne=qe+fe+ne+ye;break}return z(ne)}return ee.toString=function(){return P+""},ee}function F(P,j){var U=B((P=a(P),P.type="f",P)),Z=Math.max(-8,Math.min(8,Math.floor(k(j)/3)))*3,Q=Math.pow(10,-Z),re=g[8+Z/3];return function(ae){return U(Q*ae)+re}}return{format:B,formatPrefix:F}}var w;S({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function S(T){return w=i(T),v.format=w.format,v.formatPrefix=w.formatPrefix,w}function M(T){return Math.max(0,-k(Math.abs(T)))}function C(T,f){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(k(f)/3)))*3-k(Math.abs(T)))}function _(T,f){return T=Math.abs(T),f=Math.abs(f)-T,Math.max(0,k(f)-k(T))+1}v.FormatSpecifier=r,v.formatDefaultLocale=S,v.formatLocale=i,v.formatSpecifier=a,v.precisionFixed=M,v.precisionPrefix=C,v.precisionRound=_,Object.defineProperty(v,"__esModule",{value:!0})})}}),Ys=Ee({"node_modules/is-string-blank/index.js"(J,V){"use strict";V.exports=function(v){for(var x=v.length,E,k=0;k13)&&E!==32&&E!==133&&E!==160&&E!==5760&&E!==6158&&(E<8192||E>8205)&&E!==8232&&E!==8233&&E!==8239&&E!==8287&&E!==8288&&E!==12288&&E!==65279)return!1;return!0}}}),mi=Ee({"node_modules/fast-isnumeric/index.js"(J,V){"use strict";var v=Ys();V.exports=function(x){var E=typeof x;if(E==="string"){var k=x;if(x=+x,x===0&&v(k))return!1}else if(E!=="number")return!1;return x-x<1}}}),Qi=Ee({"src/constants/numerical.js"(J,V){"use strict";V.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}}}),iu=Ee({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(J,V){(function(v,x){typeof J=="object"&&typeof V<"u"?x(J):(v=typeof globalThis<"u"?globalThis:v||self,x(v["base64-arraybuffer"]={}))})(J,function(v){"use strict";for(var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=typeof Uint8Array>"u"?[]:new Uint8Array(256),k=0;k>2],o+=x[(a[r]&3)<<4|a[r+1]>>4],o+=x[(a[r+1]&15)<<2|a[r+2]>>6],o+=x[a[r+2]&63];return n%3===2?o=o.substring(0,o.length-1)+"=":n%3===1&&(o=o.substring(0,o.length-2)+"=="),o},e=function(t){var a=t.length*.75,r=t.length,n,o=0,s,c,m,h;t[t.length-1]==="="&&(a--,t[t.length-2]==="="&&a--);var p=new ArrayBuffer(a),g=new Uint8Array(p);for(n=0;n>4,g[o++]=(c&15)<<4|m>>2,g[o++]=(m&3)<<6|h&63;return p};v.decode=e,v.encode=l,Object.defineProperty(v,"__esModule",{value:!0})})}}),Us=Ee({"src/lib/is_plain_object.js"(J,V){"use strict";V.exports=function(x){return window&&window.process&&window.process.versions?Object.prototype.toString.call(x)==="[object Object]":Object.prototype.toString.call(x)==="[object Object]"&&Object.getPrototypeOf(x).hasOwnProperty("hasOwnProperty")}}}),vs=Ee({"src/lib/array.js"(J){"use strict";var V=iu().decode,v=Us(),x=Array.isArray,E=ArrayBuffer,k=DataView;function l(s){return E.isView(s)&&!(s instanceof k)}J.isTypedArray=l;function e(s){return x(s)||l(s)}J.isArrayOrTypedArray=e;function t(s){return!e(s[0])}J.isArray1D=t,J.ensureArray=function(s,c){return x(s)||(s=[]),s.length=c,s};var a={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};a.uint8c=a.u1c,a.uint8=a.u1,a.int8=a.i1,a.uint16=a.u2,a.int16=a.i2,a.uint32=a.u4,a.int32=a.i4,a.float32=a.f4,a.float64=a.f8;function r(s){return s.constructor===ArrayBuffer}J.isArrayBuffer=r,J.decodeTypedArraySpec=function(s){var c=[],m=n(s),h=m.dtype,p=a[h];if(!p)throw new Error('Error in dtype: "'+h+'"');var g=p.BYTES_PER_ELEMENT,i=m.bdata;r(i)||(i=V(i));var w=m.shape===void 0?[i.byteLength/g]:(""+m.shape).split(",");w.reverse();var S=w.length,M,C,_=+w[0],T=g*_,f=0;if(S===1)c=new p(i);else if(S===2)for(M=+w[1],C=0;C2)return p[M]=p[M]|l,w.set(S,null);if(i){for(c=M;c0)return Math.log(E)/Math.LN10;var l=Math.log(Math.min(k[0],k[1]))/Math.LN10;return v(l)||(l=Math.log(Math.max(k[0],k[1]))/Math.LN10-6),l}}}),Ag=Ee({"src/lib/relink_private.js"(J,V){"use strict";var v=vs().isArrayOrTypedArray,x=Us();V.exports=function E(k,l){for(var e in l){var t=l[e],a=k[e];if(a!==t)if(e.charAt(0)==="_"||typeof t=="function"){if(e in k)continue;k[e]=t}else if(v(t)&&v(a)&&x(t[0])){if(e==="customdata"||e==="ids")continue;for(var r=Math.min(t.length,a.length),n=0;nMg,modHalf:()=>Sg});function Mg(J,V){let v=J%V;return v<0?v+V:v}function Sg(J,V){return Math.abs(J)>V/2?J-Math.round(J/V)*V:J}var Vd=In({"src/lib/mod.ts"(){"use strict"}}),vo=Ee({"src/lib/extend.js"(J){"use strict";var V=Us(),v=Array.isArray;function x(k,l){var e,t;for(e=0;e{for(var Ke in Oe)v(Le,Ke,{get:Oe[Ke],enumerable:!0})},e=(Le,Oe,Ke,yt)=>{if(Oe&&typeof Oe=="object"||typeof Oe=="function")for(let wt of E(Oe))!k.call(Le,wt)&&wt!==Ke&&v(Le,wt,{get:()=>Oe[wt],enumerable:!(yt=x(Oe,wt))||yt.enumerable});return Le},t=Le=>e(v({},"__esModule",{value:!0}),Le),a={};l(a,{a98:()=>Uo,average:()=>Tr,averageAngle:()=>et,averageNumber:()=>hr,blend:()=>hl,blerp:()=>Ge,clampChroma:()=>vr,clampGamut:()=>or,clampRgb:()=>qt,colorsNamed:()=>s,convertA98ToXyz65:()=>Ot,convertCubehelixToRgb:()=>ei,convertDlchToLab65:()=>So,convertHsiToRgb:()=>ws,convertHslToRgb:()=>No,convertHsvToRgb:()=>Ps,convertHwbToRgb:()=>Ro,convertItpToXyz65:()=>Ms,convertJabToJch:()=>Lu,convertJabToRgb:()=>Dc,convertJabToXyz65:()=>Pc,convertJchToJab:()=>sl,convertLab65ToDlch:()=>ii,convertLab65ToRgb:()=>ga,convertLab65ToXyz65:()=>ma,convertLabToLch:()=>kt,convertLabToRgb:()=>bl,convertLabToXyz50:()=>Gu,convertLchToLab:()=>ar,convertLchuvToLuv:()=>Iu,convertLrgbToOklab:()=>rr,convertLrgbToRgb:()=>Dt,convertLuvToLchuv:()=>fu,convertLuvToXyz50:()=>gf,convertOkhslToOklab:()=>Ni,convertOkhsvToOklab:()=>Ga,convertOklabToLrgb:()=>Ln,convertOklabToOkhsl:()=>Bi,convertOklabToOkhsv:()=>Va,convertOklabToRgb:()=>Jn,convertP3ToXyz65:()=>Xo,convertProphotoToXyz50:()=>ic,convertRec2020ToXyz65:()=>Bu,convertRgbToCubehelix:()=>ua,convertRgbToHsi:()=>Ko,convertRgbToHsl:()=>Di,convertRgbToHsv:()=>$o,convertRgbToHwb:()=>Ls,convertRgbToJab:()=>Zl,convertRgbToLab:()=>Kc,convertRgbToLab65:()=>Sa,convertRgbToLrgb:()=>$e,convertRgbToOklab:()=>wr,convertRgbToXyb:()=>eu,convertRgbToXyz50:()=>Wu,convertRgbToXyz65:()=>Je,convertRgbToYiq:()=>Zn,convertXybToRgb:()=>pt,convertXyz50ToLab:()=>Yu,convertXyz50ToLuv:()=>Ru,convertXyz50ToProphoto:()=>Al,convertXyz50ToRgb:()=>gu,convertXyz50ToXyz65:()=>Wr,convertXyz65ToA98:()=>Re,convertXyz65ToItp:()=>Eu,convertXyz65ToJab:()=>hc,convertXyz65ToLab65:()=>Ao,convertXyz65ToP3:()=>Ws,convertXyz65ToRec2020:()=>rf,convertXyz65ToRgb:()=>Vt,convertXyz65ToXyz50:()=>Ur,convertYiqToRgb:()=>Na,converter:()=>P,cubehelix:()=>Qs,differenceCie76:()=>ba,differenceCie94:()=>pa,differenceCiede2000:()=>Ii,differenceCmc:()=>ho,differenceEuclidean:()=>ci,differenceHueChroma:()=>Mi,differenceHueNaive:()=>ai,differenceHueSaturation:()=>Fa,differenceHyab:()=>da,differenceItp:()=>ot,differenceKotsarenkoRamos:()=>Kn,displayable:()=>it,dlab:()=>os,dlch:()=>hs,easingGamma:()=>Ne,easingInOutSine:()=>jo,easingMidpoint:()=>Kr,easingSmootherstep:()=>fo,easingSmoothstep:()=>Eo,easingSmoothstepInverse:()=>yi,filterBrightness:()=>Sn,filterContrast:()=>Tn,filterDeficiencyDeuter:()=>pi,filterDeficiencyProt:()=>Xa,filterDeficiencyTrit:()=>Xi,filterGrayscale:()=>Ha,filterHueRotate:()=>Si,filterInvert:()=>$a,filterSaturate:()=>$n,filterSepia:()=>Xn,fixupAlpha:()=>Kt,fixupHueDecreasing:()=>fr,fixupHueIncreasing:()=>cr,fixupHueLonger:()=>ir,fixupHueShorter:()=>It,formatCss:()=>Vi,formatHex:()=>fl,formatHex8:()=>Ku,formatHsl:()=>Bs,formatRgb:()=>tu,getMode:()=>oe,hsi:()=>ss,hsl:()=>ks,hsv:()=>ts,hwb:()=>el,inGamut:()=>Rt,interpolate:()=>pn,interpolateWith:()=>xn,interpolateWithPremultipliedAlpha:()=>Bn,interpolatorLinear:()=>At,interpolatorPiecewise:()=>Tt,interpolatorSplineBasis:()=>Ea,interpolatorSplineBasisClosed:()=>Oa,interpolatorSplineMonotone:()=>ie,interpolatorSplineMonotone2:()=>ce,interpolatorSplineMonotoneClosed:()=>_e,interpolatorSplineNatural:()=>di,interpolatorSplineNaturalClosed:()=>Oi,itp:()=>Il,jab:()=>Do,jch:()=>ru,lab:()=>Ns,lab65:()=>Nu,lch:()=>Vl,lch65:()=>Hl,lchuv:()=>Co,lerp:()=>Fe,lrgb:()=>is,luv:()=>Hs,mapAlphaDivide:()=>ut,mapAlphaMultiply:()=>tt,mapTransferGamma:()=>St,mapTransferLinear:()=>jt,mapper:()=>Qe,modeA98:()=>Wt,modeCubehelix:()=>Fr,modeDlab:()=>Io,modeDlch:()=>Oo,modeHsi:()=>wo,modeHsl:()=>Zs,modeHsv:()=>Ji,modeHwb:()=>yl,modeItp:()=>fc,modeJab:()=>Vu,modeJch:()=>Pu,modeLab:()=>Cl,modeLab65:()=>If,modeLch:()=>ll,modeLch65:()=>Nc,modeLchuv:()=>Pl,modeLrgb:()=>_c,modeLuv:()=>ac,modeOkhsl:()=>_i,modeOkhsv:()=>go,modeOklab:()=>as,modeOklch:()=>ps,modeP3:()=>Nl,modeProphoto:()=>Zu,modeRec2020:()=>jc,modeRgb:()=>_r,modeXyb:()=>Nt,modeXyz50:()=>Yt,modeXyz65:()=>gn,modeYiq:()=>Yi,nearest:()=>mr,okhsl:()=>fn,okhsv:()=>la,oklab:()=>ha,oklch:()=>ao,p3:()=>ds,parse:()=>ge,parseHex:()=>g,parseHsl:()=>Is,parseHslLegacy:()=>Jo,parseHwb:()=>ml,parseLab:()=>Df,parseLch:()=>Bc,parseNamed:()=>m,parseOklab:()=>Wo,parseOklch:()=>Ks,parseRgb:()=>ve,parseRgbLegacy:()=>N,parseTransparent:()=>Te,prophoto:()=>Os,random:()=>je,rec2020:()=>io,removeParser:()=>X,rgb:()=>en,round:()=>bo,samples:()=>lt,serializeHex:()=>ql,serializeHex8:()=>Js,serializeHsl:()=>Li,serializeRgb:()=>Tu,toGamut:()=>Ar,trilerp:()=>gt,unlerp:()=>We,useMode:()=>ae,useParser:()=>H,wcagContrast:()=>Vs,wcagLuminance:()=>qs,xyb:()=>dn,xyz50:()=>An,xyz65:()=>sa,yiq:()=>wa}),V.exports=t(a);var r=(Le,Oe)=>{if(typeof Le=="number"){if(Oe===3)return{mode:"rgb",r:(Le>>8&15|Le>>4&240)/255,g:(Le>>4&15|Le&240)/255,b:(Le&15|Le<<4&240)/255};if(Oe===4)return{mode:"rgb",r:(Le>>12&15|Le>>8&240)/255,g:(Le>>8&15|Le>>4&240)/255,b:(Le>>4&15|Le&240)/255,alpha:(Le&15|Le<<4&240)/255};if(Oe===6)return{mode:"rgb",r:(Le>>16&255)/255,g:(Le>>8&255)/255,b:(Le&255)/255};if(Oe===8)return{mode:"rgb",r:(Le>>24&255)/255,g:(Le>>16&255)/255,b:(Le>>8&255)/255,alpha:(Le&255)/255}}},n=r,o={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},s=o,c=Le=>n(s[Le.toLowerCase()],6),m=c,h=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,p=Le=>{let Oe;return(Oe=Le.match(h))?n(parseInt(Oe[1],16),Oe[1].length):void 0},g=p,i="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",w=`(?:${i}|none)`,S=`${i}%`,M=`(?:${i}%|none)`,C=`(?:${i}%|${i})`,_=`(?:${i}%|${i}|none)`,T=`(?:${i}(deg|grad|rad|turn)|${i})`,f=`(?:${i}(deg|grad|rad|turn)|${i}|none)`,u="\\s*,\\s*",A=new RegExp("^"+_+"$"),b=new RegExp(`^rgba?\\(\\s*${i}${u}${i}${u}${i}\\s*(?:,\\s*${C}\\s*)?\\)$`),z=new RegExp(`^rgba?\\(\\s*${S}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),I=Le=>{let Oe={mode:"rgb"},Ke;if(Ke=Le.match(b))Ke[1]!==void 0&&(Oe.r=Ke[1]/255),Ke[2]!==void 0&&(Oe.g=Ke[2]/255),Ke[3]!==void 0&&(Oe.b=Ke[3]/255);else if(Ke=Le.match(z))Ke[1]!==void 0&&(Oe.r=Ke[1]/100),Ke[2]!==void 0&&(Oe.g=Ke[2]/100),Ke[3]!==void 0&&(Oe.b=Ke[3]/100);else return;return Ke[4]!==void 0?Oe.alpha=Math.max(0,Math.min(1,Ke[4]/100)):Ke[5]!==void 0&&(Oe.alpha=Math.max(0,Math.min(1,+Ke[5]))),Oe},N=I,R=(Le,Oe)=>Le===void 0?void 0:typeof Le!="object"?ge(Le):Le.mode!==void 0?Le:Oe?Qr(Nr({},Le),{mode:Oe}):void 0,B=R,F=(Le="rgb")=>Oe=>(Oe=B(Oe,Le))!==void 0?Oe.mode===Le?Oe:j[Oe.mode][Le]?j[Oe.mode][Le](Oe):Le==="rgb"?j[Oe.mode].rgb(Oe):j.rgb[Le](j[Oe.mode].rgb(Oe)):void 0,P=F,j={},U={},Z=[],Q={},re=Le=>Le,ae=Le=>(j[Le.mode]=Nr(Nr({},j[Le.mode]),Le.toMode),Object.keys(Le.fromMode||{}).forEach(Oe=>{j[Oe]||(j[Oe]={}),j[Oe][Le.mode]=Le.fromMode[Oe]}),Le.ranges||(Le.ranges={}),Le.difference||(Le.difference={}),Le.channels.forEach(Oe=>{if(Le.ranges[Oe]===void 0&&(Le.ranges[Oe]=[0,1]),!Le.interpolate[Oe])throw new Error(`Missing interpolator for: ${Oe}`);typeof Le.interpolate[Oe]=="function"&&(Le.interpolate[Oe]={use:Le.interpolate[Oe]}),Le.interpolate[Oe].fixup||(Le.interpolate[Oe].fixup=re)}),U[Le.mode]=Le,(Le.parse||[]).forEach(Oe=>{H(Oe,Le.mode)}),P(Le.mode)),oe=Le=>U[Le],H=(Le,Oe)=>{if(typeof Le=="string"){if(!Oe)throw new Error("'mode' required when 'parser' is a string");Q[Le]=Oe}else typeof Le=="function"&&Z.indexOf(Le)<0&&Z.push(Le)},X=Le=>{if(typeof Le=="string")delete Q[Le];else if(typeof Le=="function"){let Oe=Z.indexOf(Le);Oe>0&&Z.splice(Oe,1)}},K=/[^\x00-\x7F]|[a-zA-Z_]/,G=/[^\x00-\x7F]|[-\w]/,Y={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},q=0;function $(Le){let Oe=Le[q],Ke=Le[q+1];return Oe==="-"||Oe==="+"?/\d/.test(Ke)||Ke==="."&&/\d/.test(Le[q+2]):Oe==="."?/\d/.test(Ke):/\d/.test(Oe)}function ee(Le){if(q>=Le.length)return!1;let Oe=Le[q];if(K.test(Oe))return!0;if(Oe==="-"){if(Le.length-q<2)return!1;let Ke=Le[q+1];return!!(Ke==="-"||K.test(Ke))}return!1}var ne={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function fe(Le){let Oe="";if((Le[q]==="-"||Le[q]==="+")&&(Oe+=Le[q++]),Oe+=ye(Le),Le[q]==="."&&/\d/.test(Le[q+1])&&(Oe+=Le[q++]+ye(Le)),(Le[q]==="e"||Le[q]==="E")&&((Le[q+1]==="-"||Le[q+1]==="+")&&/\d/.test(Le[q+2])?Oe+=Le[q++]+Le[q++]+ye(Le):/\d/.test(Le[q+1])&&(Oe+=Le[q++]+ye(Le))),ee(Le)){let Ke=xe(Le);return Ke==="deg"||Ke==="rad"||Ke==="turn"||Ke==="grad"?{type:Y.Hue,value:Oe*ne[Ke]}:void 0}return Le[q]==="%"?(q++,{type:Y.Percentage,value:+Oe}):{type:Y.Number,value:+Oe}}function ye(Le){let Oe="";for(;/\d/.test(Le[q]);)Oe+=Le[q++];return Oe}function xe(Le){let Oe="";for(;q24?(isFinite(Se)&&(clearTimeout(Cn),Cn=setTimeout(gn,Se)),La=0):(La=1,mn(gn))}v.timer.flush=function(){eo(),si()};function eo(){for(var he=Date.now(),Se=fa;Se;)he>=Se.t&&Se.c(he-Se.t)&&(Se.c=null),Se=Se.n;return he}function si(){for(var he,Se=fa,Ue=1/0;Se;)Se.c?(Se.t=0;--St)ra.push(tt[gr[Kr[St]][2]]);for(St=+_a;St<$r.length-Ia;++St)ra.push(tt[gr[$r[St]][2]]);return ra}return Qe.x=function(tt){return arguments.length?(Se=tt,Qe):Se},Qe.y=function(tt){return arguments.length?(Ue=tt,Qe):Ue},Qe};function Sn(he){for(var Se=he.length,Ue=[0,1],Qe=2,tt=2;tt1&&Dt(he[Ue[Qe-2]],he[Ue[Qe-1]],he[tt])<=0;)--Qe;Ue[Qe++]=tt}return Ue.slice(0,Qe)}function Gi(he,Se){return he[0]-Se[0]||he[1]-Se[1]}v.geom.polygon=function(he){return V(he,ti),he};var ti=v.geom.polygon.prototype=[];ti.area=function(){for(var he=-1,Se=this.length,Ue,Qe=this[Se-1],tt=0;++heht)St=St.L;else if(jt=Se-as(St,Ue),jt>ht){if(!St.R){Qe=St;break}St=St.R}else{ut>-ht?(Qe=St.P,tt=St):jt>-ht?(Qe=St,tt=St.N):Qe=tt=St;break}var Qt=Io(he);if(So.insert(Qe,Qt),!(!Qe&&!tt)){if(Qe===tt){go(Qe),tt=Io(Qe.site),So.insert(Qt,tt),Qt.edge=tt.edge=es(Qe.site,Qt.site),Go(Qe),Go(tt);return}if(!tt){Qt.edge=es(Qe.site,Qt.site);return}go(Qe),go(tt);var gr=Qe.site,yr=gr.x,Kr=gr.y,$r=he.x-yr,_a=he.y-Kr,Ia=tt.site,ra=Ia.x-yr,va=Ia.y-Kr,ba=2*($r*va-_a*ra),za=$r*$r+_a*_a,Ra=ra*ra+va*va,pa={x:(va*za-_a*Ra)/ba+yr,y:($r*Ra-ra*za)/ba+Kr};Ps(tt.edge,gr,Ia,pa),Qt.edge=es(gr,he,null,pa),tt.edge=es(he,Ia,null,pa),Go(Qe),Go(tt)}}function Ko(he,Se){var Ue=he.site,Qe=Ue.x,tt=Ue.y,ut=tt-Se;if(!ut)return Qe;var jt=he.P;if(!jt)return-1/0;Ue=jt.site;var St=Ue.x,Qt=Ue.y,gr=Qt-Se;if(!gr)return St;var yr=St-Qe,Kr=1/ut-1/gr,$r=yr/gr;return Kr?(-$r+Math.sqrt($r*$r-2*Kr*(yr*yr/(-2*gr)-Qt+gr/2+tt-ut/2)))/Kr+Qe:(Qe+St)/2}function as(he,Se){var Ue=he.N;if(Ue)return Ko(Ue,Se);var Qe=he.site;return Qe.y===Se?Qe.x:1/0}function wo(he){this.site=he,this.edges=[]}wo.prototype.prepare=function(){for(var he=this.edges,Se=he.length,Ue;Se--;)Ue=he[Se].edge,(!Ue.b||!Ue.a)&&he.splice(Se,1);return he.sort(Di),he.length};function No(he){for(var Se=he[0][0],Ue=he[1][0],Qe=he[0][1],tt=he[1][1],ut,jt,St,Qt,gr=Mo,yr=gr.length,Kr,$r,_a,Ia,ra,va;yr--;)if(Kr=gr[yr],!(!Kr||!Kr.prepare()))for(_a=Kr.edges,Ia=_a.length,$r=0;$rht||i(Qt-jt)>ht)&&(_a.splice($r,0,new $o(Zs(Kr.site,va,i(St-Se)ht?{x:Se,y:i(ut-Se)ht?{x:i(jt-tt)ht?{x:Ue,y:i(ut-Ue)ht?{x:i(jt-Qe)=-Re)){var $r=Qt*Qt+gr*gr,_a=yr*yr+va*va,Ia=(va*$r-gr*_a)/Kr,ra=(Qt*_a-yr*$r)/Kr,va=ra+St,ba=Wi.pop()||new lo;ba.arc=he,ba.site=tt,ba.x=Ia+jt,ba.y=va+Math.sqrt(Ia*Ia+ra*ra),ba.cy=va,he.circle=ba;for(var za=null,Ra=co._;Ra;)if(ba.y0)){if(ra/=_a,_a<0){if(ra0){if(ra>$r)return;ra>Kr&&(Kr=ra)}if(ra=Ue-St,!(!_a&&ra<0)){if(ra/=_a,_a<0){if(ra>$r)return;ra>Kr&&(Kr=ra)}else if(_a>0){if(ra0)){if(ra/=Ia,Ia<0){if(ra0){if(ra>$r)return;ra>Kr&&(Kr=ra)}if(ra=Qe-Qt,!(!Ia&&ra<0)){if(ra/=Ia,Ia<0){if(ra>$r)return;ra>Kr&&(Kr=ra)}else if(Ia>0){if(ra0&&(tt.a={x:St+Kr*_a,y:Qt+Kr*Ia}),$r<1&&(tt.b={x:St+$r*_a,y:Qt+$r*Ia}),tt}}}}}}function Jo(he){for(var Se=so,Ue=us(he[0][0],he[0][1],he[1][0],he[1][1]),Qe=Se.length,tt;Qe--;)tt=Se[Qe],(!zs(tt,he)||!Ue(tt)||i(tt.a.x-tt.b.x)=ut)return;if(yr>$r){if(!Qe)Qe={x:Ia,y:jt};else if(Qe.y>=St)return;Ue={x:Ia,y:St}}else{if(!Qe)Qe={x:Ia,y:St};else if(Qe.y1)if(yr>$r){if(!Qe)Qe={x:(jt-ba)/va,y:jt};else if(Qe.y>=St)return;Ue={x:(St-ba)/va,y:St}}else{if(!Qe)Qe={x:(St-ba)/va,y:St};else if(Qe.y=ut)return;Ue={x:ut,y:va*ut+ba}}else{if(!Qe)Qe={x:ut,y:va*ut+ba};else if(Qe.x=yr&&ba.x<=$r&&ba.y>=Kr&&ba.y<=_a?[[yr,_a],[$r,_a],[$r,Kr],[yr,Kr]]:[];za.point=Qt[ra]}),gr}function St(Qt){return Qt.map(function(gr,yr){return{x:Math.round(Qe(gr,yr)/ht)*ht,y:Math.round(tt(gr,yr)/ht)*ht,i:yr}})}return jt.links=function(Qt){return ml(St(Qt)).edges.filter(function(gr){return gr.l&&gr.r}).map(function(gr){return{source:Qt[gr.l.i],target:Qt[gr.r.i]}})},jt.triangles=function(Qt){var gr=[];return ml(St(Qt)).cells.forEach(function(yr,Kr){for(var $r=yr.site,_a=yr.edges.sort(Di),Ia=-1,ra=_a.length,va,ba,za=_a[ra-1].edge,Ra=za.l===$r?za.r:za.l;++IaRa&&(Ra=yr.x),yr.y>pa&&(pa=yr.y),_a.push(yr.x),Ia.push(yr.y);else for(ra=0;raRa&&(Ra=En),On>pa&&(pa=On),_a.push(En),Ia.push(On)}var Kn=Ra-ba,di=pa-za;Kn>di?pa=za+Kn:Ra=ba+di;function Oi(de,y,O,ie,ce,_e,De,Ne){if(!(isNaN(O)||isNaN(ie)))if(de.leaf){var Ye=de.x,lt=de.y;if(Ye!=null)if(i(Ye-O)+i(lt-ie)<.01)Pi(de,y,O,ie,ce,_e,De,Ne);else{var ct=de.point;de.x=de.y=de.point=null,Pi(de,ct,Ye,lt,ce,_e,De,Ne),Pi(de,y,O,ie,ce,_e,De,Ne)}else de.x=O,de.y=ie,de.point=y}else Pi(de,y,O,ie,ce,_e,De,Ne)}function Pi(de,y,O,ie,ce,_e,De,Ne){var Ye=(ce+De)*.5,lt=(_e+Ne)*.5,ct=O>=Ye,Ft=ie>=lt,Gt=Ft<<1|ct;de.leaf=!1,de=de.nodes[Gt]||(de.nodes[Gt]=Bl()),ct?ce=Ye:De=Ye,Ft?_e=lt:Ne=lt,Oi(de,y,O,ie,ce,_e,De,Ne)}var ko=Bl();if(ko.add=function(de){Oi(ko,de,+Kr(de,++ra),+$r(de,ra),ba,za,Ra,pa)},ko.visit=function(de){_l(de,ko,ba,za,Ra,pa)},ko.find=function(de){return ju(ko,de[0],de[1],ba,za,Ra,pa)},ra=-1,Se==null){for(;++raut||$r>jt||_a=En,di=Ue>=On,Oi=di<<1|Kn,Pi=Oi+4;OiUe&&(ut=Se.slice(Ue,ut),St[jt]?St[jt]+=ut:St[++jt]=ut),(Qe=Qe[0])===(tt=tt[0])?St[jt]?St[jt]+=tt:St[++jt]=tt:(St[++jt]=null,Qt.push({i:jt,x:As(Qe,tt)})),Ue=ol.lastIndex;return Ue=0&&!(Qe=v.interpolators[Ue](he,Se)););return Qe}v.interpolators=[function(he,Se){var Ue=typeof Se;return(Ue==="string"?Ut.has(Se.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Se)?lu:ms:Se instanceof sa?lu:Array.isArray(Se)?Eu:Ue==="object"&&isNaN(Se)?il:As)(he,Se)}],v.interpolateArray=Eu;function Eu(he,Se){var Ue=[],Qe=[],tt=he.length,ut=Se.length,jt=Math.min(he.length,Se.length),St;for(St=0;St=0?he.slice(0,Se):he,Qe=Se>=0?he.slice(Se+1):"in";return Ue=fc.get(Ue)||Uu,Qe=th.get(Qe)||R,Cf(Qe(Ue.apply(null,x.call(arguments,1))))};function Cf(he){return function(Se){return Se<=0?0:Se>=1?1:he(Se)}}function qu(he){return function(Se){return 1-he(1-Se)}}function gs(he){return function(Se){return .5*(Se<.5?he(2*Se):2-he(2-2*Se))}}function Lf(he){return he*he}function hc(he){return he*he*he}function ac(he){if(he<=0)return 0;if(he>=1)return 1;var Se=he*he,Ue=Se*he;return 4*(he<.5?Ue:3*(he-Se)+Ue-.75)}function hf(he){return function(Se){return Math.pow(Se,he)}}function ku(he){return 1-Math.cos(he*Ze)}function dc(he){return Math.pow(2,10*(he-1))}function Cu(he){return 1-Math.sqrt(1-he*he)}function Pc(he,Se){var Ue;return arguments.length<2&&(Se=.45),arguments.length?Ue=Se/He*Math.asin(1/he):(he=1,Ue=Se/4),function(Qe){return 1+he*Math.pow(2,-10*Qe)*Math.sin((Qe-Ue)*He/Se)}}function $c(he){return he||(he=1.70158),function(Se){return Se*Se*((he+1)*Se-he)}}function Zl(he){return he<1/2.75?7.5625*he*he:he<2/2.75?7.5625*(he-=1.5/2.75)*he+.75:he<2.5/2.75?7.5625*(he-=2.25/2.75)*he+.9375:7.5625*(he-=2.625/2.75)*he+.984375}v.interpolateHcl=df;function df(he,Se){he=v.hcl(he),Se=v.hcl(Se);var Ue=he.h,Qe=he.c,tt=he.l,ut=Se.h-Ue,jt=Se.c-Qe,St=Se.l-tt;return isNaN(jt)&&(jt=0,Qe=isNaN(Qe)?Se.c:Qe),isNaN(ut)?(ut=0,Ue=isNaN(Ue)?Se.h:Ue):ut>180?ut-=360:ut<-180&&(ut+=360),function(Qt){return un(Ue+ut*Qt,Qe+jt*Qt,tt+St*Qt)+""}}v.interpolateHsl=Dc;function Dc(he,Se){he=v.hsl(he),Se=v.hsl(Se);var Ue=he.h,Qe=he.s,tt=he.l,ut=Se.h-Ue,jt=Se.s-Qe,St=Se.l-tt;return isNaN(jt)&&(jt=0,Qe=isNaN(Qe)?Se.s:Qe),isNaN(ut)?(ut=0,Ue=isNaN(Ue)?Se.h:Ue):ut>180?ut-=360:ut<-180&&(ut+=360),function(Qt){return ja(Ue+ut*Qt,Qe+jt*Qt,tt+St*Qt)+""}}v.interpolateLab=Ic;function Ic(he,Se){he=v.lab(he),Se=v.lab(Se);var Ue=he.l,Qe=he.a,tt=he.b,ut=Se.l-Ue,jt=Se.a-Qe,St=Se.b-tt;return function(Qt){return bn(Ue+ut*Qt,Qe+jt*Qt,tt+St*Qt)+""}}v.interpolateRound=Vu;function Vu(he,Se){return Se-=he,function(Ue){return Math.round(he+Se*Ue)}}v.transform=function(he){var Se=k.createElementNS(v.ns.prefix.svg,"g");return(v.transform=function(Ue){if(Ue!=null){Se.setAttribute("transform",Ue);var Qe=Se.transform.baseVal.consolidate()}return new Rc(Qe?Qe.matrix:Fc)})(he)};function Rc(he){var Se=[he.a,he.b],Ue=[he.c,he.d],Qe=vf(Se),tt=Lu(Se,Ue),ut=vf(sl(Ue,Se,-tt))||0;Se[0]*Ue[1]180?Se+=360:Se-he>180&&(he+=360),Qe.push({i:Ue.push(Pu(Ue)+"rotate(",null,")")-2,x:As(he,Se)})):Se&&Ue.push(Pu(Ue)+"rotate("+Se+")")}function Hu(he,Se,Ue,Qe){he!==Se?Qe.push({i:Ue.push(Pu(Ue)+"skewX(",null,")")-2,x:As(he,Se)}):Se&&Ue.push(Pu(Ue)+"skewX("+Se+")")}function uu(he,Se,Ue,Qe){if(he[0]!==Se[0]||he[1]!==Se[1]){var tt=Ue.push(Pu(Ue)+"scale(",null,",",null,")");Qe.push({i:tt-4,x:As(he[0],Se[0])},{i:tt-2,x:As(he[1],Se[1])})}else(Se[0]!==1||Se[1]!==1)&&Ue.push(Pu(Ue)+"scale("+Se+")")}function Gu(he,Se){var Ue=[],Qe=[];return he=v.transform(he),Se=v.transform(Se),vc(he.translate,Se.translate,Ue,Qe),zc(he.rotate,Se.rotate,Ue,Qe),Hu(he.skew,Se.skew,Ue,Qe),uu(he.scale,Se.scale,Ue,Qe),he=Se=null,function(tt){for(var ut=-1,jt=Qe.length,St;++ut0?ut=pa:(Ue.c=null,Ue.t=NaN,Ue=null,Se.end({type:"end",alpha:ut=0})):pa>0&&(Se.start({type:"start",alpha:ut=pa}),Ue=bi(he.tick)),he):ut},he.start=function(){var pa,En=_a.length,On=Ia.length,Kn=Qe[0],di=Qe[1],Oi,Pi;for(pa=0;pa=0;)ut.push(yr=gr[Qt]),yr.parent=St,yr.depth=St.depth+1;Ue&&(St.value=0),St.children=gr}else Ue&&(St.value=+Ue.call(Qe,St,St.depth)||0),delete St.children;return Ll(tt,function(Kr){var $r,_a;he&&($r=Kr.children)&&$r.sort(he),Ue&&(_a=Kr.parent)&&(_a.value+=Kr.value)}),jt}return Qe.sort=function(tt){return arguments.length?(he=tt,Qe):he},Qe.children=function(tt){return arguments.length?(Se=tt,Qe):Se},Qe.value=function(tt){return arguments.length?(Ue=tt,Qe):Ue},Qe.revalue=function(tt){return Ue&&(Cl(tt,function(ut){ut.children&&(ut.value=0)}),Ll(tt,function(ut){var jt;ut.children||(ut.value=+Ue.call(Qe,ut,ut.depth)||0),(jt=ut.parent)&&(jt.value+=ut.value)})),tt},Qe};function cu(he,Se){return v.rebind(he,Se,"sort","children","value"),he.nodes=he,he.links=Tl,he}function Cl(he,Se){for(var Ue=[he];(he=Ue.pop())!=null;)if(Se(he),(tt=he.children)&&(Qe=tt.length))for(var Qe,tt;--Qe>=0;)Ue.push(tt[Qe])}function Ll(he,Se){for(var Ue=[he],Qe=[];(he=Ue.pop())!=null;)if(Qe.push(he),(jt=he.children)&&(ut=jt.length))for(var tt=-1,ut,jt;++tttt&&(tt=St),Qe.push(St)}for(jt=0;jtQe&&(Ue=Se,Qe=tt);return Ue}function ef(he){return he.reduce(_u,0)}function _u(he,Se){return he+Se[1]}v.layout.histogram=function(){var he=!0,Se=Number,Ue=Ru,Qe=$u;function tt(ut,$r){for(var St=[],Qt=ut.map(Se,this),gr=Ue.call(this,Qt,$r),yr=Qe.call(this,gr,Qt,$r),Kr,$r=-1,_a=Qt.length,Ia=yr.length-1,ra=he?1:1/_a,va;++$r0)for($r=-1;++$r<_a;)va=Qt[$r],va>=gr[0]&&va<=gr[1]&&(Kr=St[v.bisect(yr,va,1,Ia)-1],Kr.y+=ra,Kr.push(ut[$r]));return St}return tt.value=function(ut){return arguments.length?(Se=ut,tt):Se},tt.range=function(ut){return arguments.length?(Ue=nr(ut),tt):Ue},tt.bins=function(ut){return arguments.length?(Qe=typeof ut=="number"?function(jt){return mc(jt,ut)}:nr(ut),tt):Qe},tt.frequency=function(ut){return arguments.length?(he=!!ut,tt):he},tt};function $u(he,Se){return mc(he,Math.ceil(Math.log(Se.length)/Math.LN2+1))}function mc(he,Se){for(var Ue=-1,Qe=+he[0],tt=(he[1]-Qe)/Se,ut=[];++Ue<=Se;)ut[Ue]=tt*Ue+Qe;return ut}function Ru(he){return[v.min(he),v.max(he)]}v.layout.pack=function(){var he=v.layout.hierarchy().sort(zo),Se=0,Ue=[1,1],Qe;function tt(ut,jt){var St=he.call(this,ut,jt),Qt=St[0],gr=Ue[0],yr=Ue[1],Kr=Qe==null?Math.sqrt:typeof Qe=="function"?Qe:function(){return Qe};if(Qt.x=Qt.y=0,Ll(Qt,function(_a){_a.r=+Kr(_a.value)}),Ll(Qt,tf),Se){var $r=Se*(Qe?1:Math.max(2*Qt.r/gr,2*Qt.r/yr))/2;Ll(Qt,function(_a){_a.r+=$r}),Ll(Qt,tf),Ll(Qt,function(_a){_a.r-=$r})}return yf(Qt,gr/2,yr/2,Qe?1:1/Math.max(2*Qt.r/gr,2*Qt.r/yr)),St}return tt.size=function(ut){return arguments.length?(Ue=ut,tt):Ue},tt.radius=function(ut){return arguments.length?(Qe=ut==null||typeof ut=="function"?ut:+ut,tt):Qe},tt.padding=function(ut){return arguments.length?(Se=+ut,tt):Se},cu(tt,he)};function zo(he,Se){return he.value-Se.value}function gc(he,Se){var Ue=he._pack_next;he._pack_next=Se,Se._pack_prev=he,Se._pack_next=Ue,Ue._pack_prev=Se}function Vf(he,Se){he._pack_next=Se,Se._pack_prev=he}function mf(he,Se){var Ue=Se.x-he.x,Qe=Se.y-he.y,tt=he.r+Se.r;return .999*tt*tt>Ue*Ue+Qe*Qe}function tf(he){if(!(Se=he.children)||!($r=Se.length))return;var Se,Ue=1/0,Qe=-1/0,tt=1/0,ut=-1/0,jt,St,Qt,gr,yr,Kr,$r;function _a(pa){Ue=Math.min(pa.x-pa.r,Ue),Qe=Math.max(pa.x+pa.r,Qe),tt=Math.min(pa.y-pa.r,tt),ut=Math.max(pa.y+pa.r,ut)}if(Se.forEach(gf),jt=Se[0],jt.x=-jt.r,jt.y=0,_a(jt),$r>1&&(St=Se[1],St.x=St.r,St.y=0,_a(St),$r>2))for(Qt=Se[2],ul(jt,St,Qt),_a(Qt),gc(jt,Qt),jt._pack_prev=Qt,gc(Qt,St),St=jt._pack_next,gr=3;gr<$r;gr++){ul(jt,St,Qt=Se[gr]);var Ia=0,ra=1,va=1;for(yr=St._pack_next;yr!==St;yr=yr._pack_next,ra++)if(mf(yr,Qt)){Ia=1;break}if(Ia==1)for(Kr=jt._pack_prev;Kr!==yr._pack_prev&&!mf(Kr,Qt);Kr=Kr._pack_prev,va++);Ia?(rava.x&&(va=En),En.depth>ba.depth&&(ba=En)});var za=Se(ra,va)/2-ra.x,Ra=Ue[0]/(va.x+Se(va,ra)/2+za),pa=Ue[1]/(ba.depth||1);Cl(_a,function(En){En.x=(En.x+za)*Ra,En.y=En.depth*pa})}return $r}function ut(yr){for(var Kr={A:null,children:[yr]},$r=[Kr],_a;(_a=$r.pop())!=null;)for(var Ia=_a.children,ra,va=0,ba=Ia.length;va0&&(bc(zt(ra,yr,$r),yr,En),ba+=En,za+=En),Ra+=ra.m,ba+=_a.m,pa+=va.m,za+=Ia.m;ra&&!_c(Ia)&&(Ia.t=ra,Ia.m+=Ra-za),_a&&!yc(va)&&(va.t=_a,va.m+=ba-pa,$r=yr)}return $r}function gr(yr){yr.x*=Ue[0],yr.y=yr.depth*Ue[1]}return tt.separation=function(yr){return arguments.length?(Se=yr,tt):Se},tt.size=function(yr){return arguments.length?(Qe=(Ue=yr)==null?gr:null,tt):Qe?null:Ue},tt.nodeSize=function(yr){return arguments.length?(Qe=(Ue=yr)==null?null:gr,tt):Qe?Ue:null},cu(tt,he)};function Pl(he,Se){return he.parent==Se.parent?1:2}function yc(he){var Se=he.children;return Se.length?Se[0]:he.t}function _c(he){var Se=he.children,Ue;return(Ue=Se.length)?Se[Ue-1]:he.t}function bc(he,Se,Ue){var Qe=Ue/(Se.i-he.i);Se.c-=Qe,Se.s+=Ue,he.c+=Qe,Se.z+=Ue,Se.m+=Ue}function nc(he){for(var Se=0,Ue=0,Qe=he.children,tt=Qe.length,ut;--tt>=0;)ut=Qe[tt],ut.z+=Se,ut.m+=Se,Se+=ut.s+(Ue+=ut.c)}function zt(he,Se,Ue){return he.a.parent===Se.parent?he.a:Ue}v.layout.cluster=function(){var he=v.layout.hierarchy().sort(null).value(null),Se=Pl,Ue=[1,1],Qe=!1;function tt(ut,jt){var St=he.call(this,ut,jt),Qt=St[0],gr,yr=0;Ll(Qt,function(ra){var va=ra.children;va&&va.length?(ra.x=Br(va),ra.y=rr(va)):(ra.x=gr?yr+=Se(ra,gr):0,ra.y=0,gr=ra)});var Kr=wr(Qt),$r=la(Qt),_a=Kr.x-Se(Kr,$r)/2,Ia=$r.x+Se($r,Kr)/2;return Ll(Qt,Qe?function(ra){ra.x=(ra.x-Qt.x)*Ue[0],ra.y=(Qt.y-ra.y)*Ue[1]}:function(ra){ra.x=(ra.x-_a)/(Ia-_a)*Ue[0],ra.y=(1-(Qt.y?ra.y/Qt.y:1))*Ue[1]}),St}return tt.separation=function(ut){return arguments.length?(Se=ut,tt):Se},tt.size=function(ut){return arguments.length?(Qe=(Ue=ut)==null,tt):Qe?null:Ue},tt.nodeSize=function(ut){return arguments.length?(Qe=(Ue=ut)!=null,tt):Qe?Ue:null},cu(tt,he)};function rr(he){return 1+v.max(he,function(Se){return Se.y})}function Br(he){return he.reduce(function(Se,Ue){return Se+Ue.x},0)/he.length}function wr(he){var Se=he.children;return Se&&Se.length?wr(Se[0]):he}function la(he){var Se=he.children,Ue;return Se&&(Ue=Se.length)?la(Se[Ue-1]):he}v.layout.treemap=function(){var he=v.layout.hierarchy(),Se=Math.round,Ue=[1,1],Qe=null,tt=Ca,ut=!1,jt,St="squarify",Qt=.5*(1+Math.sqrt(5));function gr(ra,va){for(var ba=-1,za=ra.length,Ra,pa;++ba0;)za.push(pa=Ra[di-1]),za.area+=pa.area,St!=="squarify"||(On=$r(za,Kn))<=En?(Ra.pop(),En=On):(za.area-=za.pop().area,_a(za,Kn,ba,!1),Kn=Math.min(ba.dx,ba.dy),za.length=za.area=0,En=1/0);za.length&&(_a(za,Kn,ba,!0),za.length=za.area=0),va.forEach(yr)}}function Kr(ra){var va=ra.children;if(va&&va.length){var ba=tt(ra),za=va.slice(),Ra,pa=[];for(gr(za,ba.dx*ba.dy/ra.value),pa.area=0;Ra=za.pop();)pa.push(Ra),pa.area+=Ra.area,Ra.z!=null&&(_a(pa,Ra.z?ba.dx:ba.dy,ba,!za.length),pa.length=pa.area=0);va.forEach(Kr)}}function $r(ra,va){for(var ba=ra.area,za,Ra=0,pa=1/0,En=-1,On=ra.length;++EnRa&&(Ra=za));return ba*=ba,va*=va,ba?Math.max(va*Ra*Qt/ba,ba/(va*pa*Qt)):1/0}function _a(ra,va,ba,za){var Ra=-1,pa=ra.length,En=ba.x,On=ba.y,Kn=va?Se(ra.area/va):0,di;if(va==ba.dx){for((za||Kn>ba.dy)&&(Kn=ba.dy);++Raba.dx)&&(Kn=ba.dx);++Ra1);return he+Se*Qe*Math.sqrt(-2*Math.log(ut)/ut)}},logNormal:function(){var he=v.random.normal.apply(v,arguments);return function(){return Math.exp(he())}},bates:function(he){var Se=v.random.irwinHall(he);return function(){return Se()/he}},irwinHall:function(he){return function(){for(var Se=0,Ue=0;Ue2?Ln:Pn,gr=Qe?gu:Zc;return tt=Qt(he,Se,gr,Ue),ut=Qt(Se,he,gr,Su),St}function St(Qt){return tt(Qt)}return St.invert=function(Qt){return ut(Qt)},St.domain=function(Qt){return arguments.length?(he=Qt.map(Number),jt()):he},St.range=function(Qt){return arguments.length?(Se=Qt,jt()):Se},St.rangeRound=function(Qt){return St.range(Qt).interpolate(Vu)},St.clamp=function(Qt){return arguments.length?(Qe=Qt,jt()):Qe},St.interpolate=function(Qt){return arguments.length?(Ue=Qt,jt()):Ue},St.ticks=function(Qt){return _i(he,Qt)},St.tickFormat=function(Qt,gr){return d3_scale_linearTickFormat(he,Qt,gr)},St.nice=function(Qt){return Ni(he,Qt),jt()},St.copy=function(){return qn(he,Se,Ue,Qe)},jt()}function Bi(he,Se){return v.rebind(he,Se,"range","rangeRound","interpolate","clamp")}function Ni(he,Se){return Ha(he,on(Zi(he,Se)[2])),Ha(he,on(Zi(he,Se)[2])),he}function Zi(he,Se){Se==null&&(Se=10);var Ue=Ka(he),Qe=Ue[1]-Ue[0],tt=Math.pow(10,Math.floor(Math.log(Qe/Se)/Math.LN10)),ut=Se/Qe*tt;return ut<=.15?tt*=10:ut<=.35?tt*=5:ut<=.75&&(tt*=2),Ue[0]=Math.ceil(Ue[0]/tt)*tt,Ue[1]=Math.floor(Ue[1]/tt)*tt+tt*.5,Ue[2]=tt,Ue}function _i(he,Se){return v.range.apply(v,Zi(he,Se))}var Vn={s:1,g:1,p:1,r:1,e:1};function Gn(he){return-Math.floor(Math.log(he)/Math.LN10+.01)}function oo(he,Se){var Ue=Gn(Se[2]);return he in Vn?Math.abs(Ue-Gn(Math.max(i(Se[0]),i(Se[1]))))+ +(he!=="e"):Ue-(he==="%")*2}v.scale.log=function(){return yo(v.scale.linear().domain([0,1]),10,!0,[1,10])};function yo(he,Se,Ue,Qe){function tt(St){return(Ue?Math.log(St<0?0:St):-Math.log(St>0?0:-St))/Math.log(Se)}function ut(St){return Ue?Math.pow(Se,St):-Math.pow(Se,-St)}function jt(St){return he(tt(St))}return jt.invert=function(St){return ut(he.invert(St))},jt.domain=function(St){return arguments.length?(Ue=St[0]>=0,he.domain((Qe=St.map(Number)).map(tt)),jt):Qe},jt.base=function(St){return arguments.length?(Se=+St,he.domain(Qe.map(tt)),jt):Se},jt.nice=function(){var St=Ha(Qe.map(tt),Ue?Math:Vo);return he.domain(St),Qe=St.map(ut),jt},jt.ticks=function(){var St=Ka(Qe),Qt=[],gr=St[0],yr=St[1],Kr=Math.floor(tt(gr)),$r=Math.ceil(tt(yr)),_a=Se%1?2:Se;if(isFinite($r-Kr)){if(Ue){for(;Kr<$r;Kr++)for(var Ia=1;Ia<_a;Ia++)Qt.push(ut(Kr)*Ia);Qt.push(ut(Kr))}else for(Qt.push(ut(Kr));Kr++<$r;)for(var Ia=_a-1;Ia>0;Ia--)Qt.push(ut(Kr)*Ia);for(Kr=0;Qt[Kr]yr;$r--);Qt=Qt.slice(Kr,$r)}return Qt},jt.copy=function(){return yo(he.copy(),Se,Ue,Qe)},Bi(jt,he)}var Vo={floor:function(he){return-Math.ceil(-he)},ceil:function(he){return-Math.floor(-he)}};v.scale.pow=function(){return Wo(v.scale.linear(),1,[0,1])};function Wo(he,Se,Ue){var Qe=Yo(Se),tt=Yo(1/Se);function ut(jt){return he(Qe(jt))}return ut.invert=function(jt){return tt(he.invert(jt))},ut.domain=function(jt){return arguments.length?(he.domain((Ue=jt.map(Number)).map(Qe)),ut):Ue},ut.ticks=function(jt){return _i(Ue,jt)},ut.tickFormat=function(jt,St){return d3_scale_linearTickFormat(Ue,jt,St)},ut.nice=function(jt){return ut.domain(Ni(Ue,jt))},ut.exponent=function(jt){return arguments.length?(Qe=Yo(Se=jt),tt=Yo(1/Se),he.domain(Ue.map(Qe)),ut):Se},ut.copy=function(){return Wo(he.copy(),Se,Ue)},Bi(ut,he)}function Yo(he){return function(Se){return Se<0?-Math.pow(-Se,he):Math.pow(Se,he)}}v.scale.sqrt=function(){return v.scale.pow().exponent(.5)},v.scale.ordinal=function(){return ns([],{t:"range",a:[[]]})};function ns(he,Se){var Ue,Qe,tt;function ut(St){return Qe[((Ue.get(St)||(Se.t==="range"?Ue.set(St,he.push(St)):NaN))-1)%Qe.length]}function jt(St,Qt){return v.range(he.length).map(function(gr){return St+Qt*gr})}return ut.domain=function(St){if(!arguments.length)return he;he=[],Ue=new M;for(var Qt=-1,gr=St.length,yr;++Qt0?Ue[ut-1]:he[0],ut$r?0:1;if(yr=$e)return Qt(yr,Ia)+(gr?Qt(gr,1-Ia):"")+"Z";var ra,va,ba,za,Ra=0,pa=0,En,On,Kn,di,Oi,Pi,ko,de,y=[];if((za=(+jt.apply(this,arguments)||0)/2)&&(ba=Qe===Nl?Math.sqrt(gr*gr+yr*yr):+Qe.apply(this,arguments),Ia||(pa*=-1),yr&&(pa=Vt(ba/yr*Math.sin(za))),gr&&(Ra=Vt(ba/gr*Math.sin(za)))),yr){En=yr*Math.cos(Kr+pa),On=yr*Math.sin(Kr+pa),Kn=yr*Math.cos($r-pa),di=yr*Math.sin($r-pa);var O=Math.abs($r-Kr-2*pa)<=Be?0:1;if(pa&&ic(En,On,Kn,di)===Ia^O){var ie=(Kr+$r)/2;En=yr*Math.cos(ie),On=yr*Math.sin(ie),Kn=di=null}}else En=On=0;if(gr){Oi=gr*Math.cos($r-Ra),Pi=gr*Math.sin($r-Ra),ko=gr*Math.cos(Kr+Ra),de=gr*Math.sin(Kr+Ra);var ce=Math.abs(Kr-$r+2*Ra)<=Be?0:1;if(Ra&&ic(Oi,Pi,ko,de)===1-Ia^ce){var _e=(Kr+$r)/2;Oi=gr*Math.cos(_e),Pi=gr*Math.sin(_e),ko=de=null}}else Oi=Pi=0;if(_a>ht&&(ra=Math.min(Math.abs(yr-gr)/2,+Ue.apply(this,arguments)))>.001){va=gr0?0:1}function Oc(he,Se,Ue,Qe,tt){var ut=he[0]-Se[0],jt=he[1]-Se[1],St=(tt?Qe:-Qe)/Math.sqrt(ut*ut+jt*jt),Qt=St*jt,gr=-St*ut,yr=he[0]+Qt,Kr=he[1]+gr,$r=Se[0]+Qt,_a=Se[1]+gr,Ia=(yr+$r)/2,ra=(Kr+_a)/2,va=$r-yr,ba=_a-Kr,za=va*va+ba*ba,Ra=Ue-Qe,pa=yr*_a-$r*Kr,En=(ba<0?-1:1)*Math.sqrt(Math.max(0,Ra*Ra*za-pa*pa)),On=(pa*ba-va*En)/za,Kn=(-pa*va-ba*En)/za,di=(pa*ba+va*En)/za,Oi=(-pa*va+ba*En)/za,Pi=On-Ia,ko=Kn-ra,de=di-Ia,y=Oi-ra;return Pi*Pi+ko*ko>de*de+y*y&&(On=di,Kn=Oi),[[On-Qt,Kn-gr],[On*Ue/Ra,Kn*Ue/Ra]]}function Zu(){return!0}function hu(he){var Se=Ao,Ue=ro,Qe=Zu,tt=Ql,ut=tt.key,jt=.7;function St(Qt){var gr=[],yr=[],Kr=-1,$r=Qt.length,_a,Ia=nr(Se),ra=nr(Ue);function va(){gr.push("M",tt(he(yr),jt))}for(;++Kr<$r;)Qe.call(this,_a=Qt[Kr],Kr)?yr.push([+Ia.call(this,_a,Kr),+ra.call(this,_a,Kr)]):yr.length&&(va(),yr=[]);return yr.length&&va(),gr.length?gr.join(""):null}return St.x=function(Qt){return arguments.length?(Se=Qt,St):Se},St.y=function(Qt){return arguments.length?(Ue=Qt,St):Ue},St.defined=function(Qt){return arguments.length?(Qe=Qt,St):Qe},St.interpolate=function(Qt){return arguments.length?(typeof Qt=="function"?ut=tt=Qt:ut=(tt=Jl.get(Qt)||Ql).key,St):ut},St.tension=function(Qt){return arguments.length?(jt=Qt,St):jt},St}v.svg.line=function(){return hu(R)};var Jl=v.map({linear:Ql,"linear-closed":xu,step:rf,"step-before":Ff,"step-after":xc,basis:wu,"basis-open":jl,"basis-closed":Ul,bundle:Ci,cardinal:Bu,"cardinal-open":rl,"cardinal-closed":Ol,monotone:Dr});Jl.forEach(function(he,Se){Se.key=he,Se.closed=/-closed$/.test(he)});function Ql(he){return he.length>1?he.join("L"):he+"Z"}function xu(he){return he.join("L")+"Z"}function rf(he){for(var Se=0,Ue=he.length,Qe=he[0],tt=[Qe[0],",",Qe[1]];++Se1&&tt.push("H",Qe[0]),tt.join("")}function Ff(he){for(var Se=0,Ue=he.length,Qe=he[0],tt=[Qe[0],",",Qe[1]];++Se1){St=Se[1],ut=he[Qt],Qt++,Qe+="C"+(tt[0]+jt[0])+","+(tt[1]+jt[1])+","+(ut[0]-St[0])+","+(ut[1]-St[1])+","+ut[0]+","+ut[1];for(var gr=2;gr9&&(ut=Ue*3/Math.sqrt(ut),jt[St]=ut*Qe,jt[St+1]=ut*tt));for(St=-1;++St<=Qt;)ut=(he[Math.min(Qt,St+1)][0]-he[Math.max(0,St-1)][0])/(6*(1+jt[St]*jt[St])),Se.push([ut||0,jt[St]*ut||0]);return Se}function Dr(he){return he.length<3?Ql(he):he[0]+af(he,Yt(he))}v.svg.line.radial=function(){var he=hu(Ur);return he.radius=he.x,delete he.x,he.angle=he.y,delete he.y,he};function Ur(he){for(var Se,Ue=-1,Qe=he.length,tt,ut;++UeBe)+",1 "+Kr}function gr(yr,Kr,$r,_a){return"Q 0,0 "+_a}return ut.radius=function(yr){return arguments.length?(Ue=nr(yr),ut):Ue},ut.source=function(yr){return arguments.length?(he=nr(yr),ut):he},ut.target=function(yr){return arguments.length?(Se=nr(yr),ut):Se},ut.startAngle=function(yr){return arguments.length?(Qe=nr(yr),ut):Qe},ut.endAngle=function(yr){return arguments.length?(tt=nr(yr),ut):tt},ut};function ma(he){return he.radius}v.svg.diagonal=function(){var he=Wr,Se=oa,Ue=ka;function Qe(tt,ut){var jt=he.call(this,tt,ut),St=Se.call(this,tt,ut),Qt=(jt.y+St.y)/2,gr=[jt,{x:jt.x,y:Qt},{x:St.x,y:Qt},St];return gr=gr.map(Ue),"M"+gr[0]+"C"+gr[1]+" "+gr[2]+" "+gr[3]}return Qe.source=function(tt){return arguments.length?(he=nr(tt),Qe):he},Qe.target=function(tt){return arguments.length?(Se=nr(tt),Qe):Se},Qe.projection=function(tt){return arguments.length?(Ue=tt,Qe):Ue},Qe};function ka(he){return[he.x,he.y]}v.svg.diagonal.radial=function(){var he=v.svg.diagonal(),Se=ka,Ue=he.projection;return he.projection=function(Qe){return arguments.length?Ue($a(Se=Qe)):Se},he};function $a(he){return function(){var Se=he.apply(this,arguments),Ue=Se[0],Qe=Se[1]-Ze;return[Ue*Math.cos(Qe),Ue*Math.sin(Qe)]}}v.svg.symbol=function(){var he=Nn,Se=yn;function Ue(Qe,tt){return(Yi.get(he.call(this,Qe,tt))||wi)(Se.call(this,Qe,tt))}return Ue.type=function(Qe){return arguments.length?(he=nr(Qe),Ue):he},Ue.size=function(Qe){return arguments.length?(Se=nr(Qe),Ue):Se},Ue};function yn(){return 64}function Nn(){return"circle"}function wi(he){var Se=Math.sqrt(he/Be);return"M0,"+Se+"A"+Se+","+Se+" 0 1,1 0,"+-Se+"A"+Se+","+Se+" 0 1,1 0,"+Se+"Z"}var Yi=v.map({circle:wi,cross:function(he){var Se=Math.sqrt(he/5)/2;return"M"+-3*Se+","+-Se+"H"+-Se+"V"+-3*Se+"H"+Se+"V"+-Se+"H"+3*Se+"V"+Se+"H"+Se+"V"+3*Se+"H"+-Se+"V"+Se+"H"+-3*Se+"Z"},diamond:function(he){var Se=Math.sqrt(he/(2*_o)),Ue=Se*_o;return"M0,"+-Se+"L"+Ue+",0 0,"+Se+" "+-Ue+",0Z"},square:function(he){var Se=Math.sqrt(he)/2;return"M"+-Se+","+-Se+"L"+Se+","+-Se+" "+Se+","+Se+" "+-Se+","+Se+"Z"},"triangle-down":function(he){var Se=Math.sqrt(he/Ti),Ue=Se*Ti/2;return"M0,"+Ue+"L"+Se+","+-Ue+" "+-Se+","+-Ue+"Z"},"triangle-up":function(he){var Se=Math.sqrt(he/Ti),Ue=Se*Ti/2;return"M0,"+-Ue+"L"+Se+","+Ue+" "+-Se+","+Ue+"Z"}});v.svg.symbolTypes=Yi.keys();var Ti=Math.sqrt(3),_o=Math.tan(30*Je);q.transition=function(he){for(var Se=cl||++Es,Ue=Li(he),Qe=[],tt,ut,jt=ql||{time:Date.now(),ease:ac,delay:0,duration:250},St=-1,Qt=this.length;++St0;)Kr[--za].call(he,ba);if(va>=1)return jt.event&&jt.event.end.call(he,he.__data__,Se),--ut.count?delete ut[Qe]:delete he[Ue],1}jt||(St=tt.time,Qt=bi($r,0,St),jt=ut[Qe]={tween:new M,time:St,timer:Qt,delay:tt.delay,duration:tt.duration,ease:tt.ease,index:Se},tt=null,++ut.count)}v.svg.axis=function(){var he=v.scale.linear(),Se=fl,Ue=6,Qe=6,tt=3,ut=[10],jt=null,St;function Qt(gr){gr.each(function(){var yr=v.select(this),Kr=this.__chart__||he,$r=this.__chart__=he.copy(),_a=jt??($r.ticks?$r.ticks.apply($r,ut):$r.domain()),Ia=St??($r.tickFormat?$r.tickFormat.apply($r,ut):R),ra=yr.selectAll(".tick").data(_a,$r),va=ra.enter().insert("g",".domain").attr("class","tick").style("opacity",ht),ba=v.transition(ra.exit()).style("opacity",ht).remove(),za=v.transition(ra.order()).style("opacity",1),Ra=Math.max(Ue,0)+tt,pa,En=cn($r),On=yr.selectAll(".domain").data([0]),Kn=(On.enter().append("path").attr("class","domain"),v.transition(On));va.append("line"),va.append("text");var di=va.select("line"),Oi=za.select("line"),Pi=ra.select("text").text(Ia),ko=va.select("text"),de=za.select("text"),y=Se==="top"||Se==="left"?-1:1,O,ie,ce,_e;if(Se==="bottom"||Se==="top"?(pa=tu,O="x",ce="y",ie="x2",_e="y2",Pi.attr("dy",y<0?"0em":".71em").style("text-anchor","middle"),Kn.attr("d","M"+En[0]+","+y*Qe+"V0H"+En[1]+"V"+y*Qe)):(pa=Bs,O="y",ce="x",ie="y2",_e="x2",Pi.attr("dy",".32em").style("text-anchor",y<0?"end":"start"),Kn.attr("d","M"+y*Qe+","+En[0]+"H0V"+En[1]+"H"+y*Qe)),di.attr(_e,y*Ue),ko.attr(ce,y*Ra),Oi.attr(ie,0).attr(_e,y*Ue),de.attr(O,0).attr(ce,y*Ra),$r.rangeBand){var De=$r,Ne=De.rangeBand()/2;Kr=$r=function(Ye){return De(Ye)+Ne}}else Kr.rangeBand?Kr=$r:ba.call(pa,$r,Kr);va.call(pa,Kr,$r),za.call(pa,$r,$r)})}return Qt.scale=function(gr){return arguments.length?(he=gr,Qt):he},Qt.orient=function(gr){return arguments.length?(Se=gr in Ku?gr+"":fl,Qt):Se},Qt.ticks=function(){return arguments.length?(ut=E(arguments),Qt):ut},Qt.tickValues=function(gr){return arguments.length?(jt=gr,Qt):jt},Qt.tickFormat=function(gr){return arguments.length?(St=gr,Qt):St},Qt.tickSize=function(gr){var yr=arguments.length;return yr?(Ue=+gr,Qe=+arguments[yr-1],Qt):Ue},Qt.innerTickSize=function(gr){return arguments.length?(Ue=+gr,Qt):Ue},Qt.outerTickSize=function(gr){return arguments.length?(Qe=+gr,Qt):Qe},Qt.tickPadding=function(gr){return arguments.length?(tt=+gr,Qt):tt},Qt.tickSubdivide=function(){return arguments.length&&Qt},Qt};var fl="bottom",Ku={top:1,right:1,bottom:1,left:1};function tu(he,Se,Ue){he.attr("transform",function(Qe){var tt=Se(Qe);return"translate("+(isFinite(tt)?tt:Ue(Qe))+",0)"})}function Bs(he,Se,Ue){he.attr("transform",function(Qe){var tt=Se(Qe);return"translate(0,"+(isFinite(tt)?tt:Ue(Qe))+")"})}v.svg.brush=function(){var he=ne(yr,"brushstart","brush","brushend"),Se=null,Ue=null,Qe=[0,0],tt=[0,0],ut,jt,St=!0,Qt=!0,gr=du[0];function yr(ra){ra.each(function(){var va=v.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Ia).on("touchstart.brush",Ia),ba=va.selectAll(".background").data([0]);ba.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),va.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var za=va.selectAll(".resize").data(gr,R);za.exit().remove(),za.enter().append("g").attr("class",function(On){return"resize "+On}).style("cursor",function(On){return oc[On]}).append("rect").attr("x",function(On){return/[ew]$/.test(On)?-3:null}).attr("y",function(On){return/^[ns]/.test(On)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),za.style("display",yr.empty()?"none":null);var Ra=v.transition(va),pa=v.transition(ba),En;Se&&(En=cn(Se),pa.attr("x",En[0]).attr("width",En[1]-En[0]),$r(Ra)),Ue&&(En=cn(Ue),pa.attr("y",En[0]).attr("height",En[1]-En[0]),_a(Ra)),Kr(Ra)})}yr.event=function(ra){ra.each(function(){var va=he.of(this,arguments),ba={x:Qe,y:tt,i:ut,j:jt},za=this.__chart__||ba;this.__chart__=ba,cl?v.select(this).transition().each("start.brush",function(){ut=za.i,jt=za.j,Qe=za.x,tt=za.y,va({type:"brushstart"})}).tween("brush:brush",function(){var Ra=Eu(Qe,ba.x),pa=Eu(tt,ba.y);return ut=jt=null,function(En){Qe=ba.x=Ra(En),tt=ba.y=pa(En),va({type:"brush",mode:"resize"})}}).each("end.brush",function(){ut=ba.i,jt=ba.j,va({type:"brush",mode:"resize"}),va({type:"brushend"})}):(va({type:"brushstart"}),va({type:"brush",mode:"resize"}),va({type:"brushend"}))})};function Kr(ra){ra.selectAll(".resize").attr("transform",function(va){return"translate("+Qe[+/e$/.test(va)]+","+tt[+/^s/.test(va)]+")"})}function $r(ra){ra.select(".extent").attr("x",Qe[0]),ra.selectAll(".extent,.n>rect,.s>rect").attr("width",Qe[1]-Qe[0])}function _a(ra){ra.select(".extent").attr("y",tt[0]),ra.selectAll(".extent,.e>rect,.w>rect").attr("height",tt[1]-tt[0])}function Ia(){var ra=this,va=v.select(v.event.target),ba=he.of(ra,arguments),za=v.select(ra),Ra=va.datum(),pa=!/^(n|s)$/.test(Ra)&&Se,En=!/^(e|w)$/.test(Ra)&&Ue,On=va.classed("extent"),Kn=Zt(ra),di,Oi=v.mouse(ra),Pi,ko=v.select(e(ra)).on("keydown.brush",O).on("keyup.brush",ie);if(v.event.changedTouches?ko.on("touchmove.brush",ce).on("touchend.brush",De):ko.on("mousemove.brush",ce).on("mouseup.brush",De),za.interrupt().selectAll("*").interrupt(),On)Oi[0]=Qe[0]-Oi[0],Oi[1]=tt[0]-Oi[1];else if(Ra){var de=+/w$/.test(Ra),y=+/^n/.test(Ra);Pi=[Qe[1-de]-Oi[0],tt[1-y]-Oi[1]],Oi[0]=Qe[de],Oi[1]=tt[y]}else v.event.altKey&&(di=Oi.slice());za.style("pointer-events","none").selectAll(".resize").style("display",null),v.select("body").style("cursor",va.style("cursor")),ba({type:"brushstart"}),ce();function O(){v.event.keyCode==32&&(On||(di=null,Oi[0]-=Qe[1],Oi[1]-=tt[1],On=2),Q())}function ie(){v.event.keyCode==32&&On==2&&(Oi[0]+=Qe[1],Oi[1]+=tt[1],On=0,Q())}function ce(){var Ne=v.mouse(ra),Ye=!1;Pi&&(Ne[0]+=Pi[0],Ne[1]+=Pi[1]),On||(v.event.altKey?(di||(di=[(Qe[0]+Qe[1])/2,(tt[0]+tt[1])/2]),Oi[0]=Qe[+(Ne[0]0))return At;do At.push(Kt=new Date(+gt)),Te(gt,Tt),se(gt);while(Kt=mt)for(;se(mt),!gt(mt);)mt.setTime(mt-1)},function(mt,Tt){if(mt>=mt)if(Tt<0)for(;++Tt<=0;)for(;Te(mt,-1),!gt(mt););else for(;--Tt>=0;)for(;Te(mt,1),!gt(mt););})},Fe&&(Ge.count=function(gt,mt){return x.setTime(+gt),E.setTime(+mt),se(x),se(E),Math.floor(Fe(x,E))},Ge.every=function(gt){return gt=Math.floor(gt),!isFinite(gt)||!(gt>0)?null:gt>1?Ge.filter(We?function(mt){return We(mt)%gt===0}:function(mt){return Ge.count(0,mt)%gt===0}):Ge}),Ge}var l=k(function(){},function(se,Te){se.setTime(+se+Te)},function(se,Te){return Te-se});l.every=function(se){return se=Math.floor(se),!isFinite(se)||!(se>0)?null:se>1?k(function(Te){Te.setTime(Math.floor(Te/se)*se)},function(Te,Fe){Te.setTime(+Te+Fe*se)},function(Te,Fe){return(Fe-Te)/se}):l};var e=l.range,t=1e3,n=6e4,r=36e5,a=864e5,o=6048e5,s=k(function(se){se.setTime(se-se.getMilliseconds())},function(se,Te){se.setTime(+se+Te*t)},function(se,Te){return(Te-se)/t},function(se){return se.getUTCSeconds()}),c=s.range,g=k(function(se){se.setTime(se-se.getMilliseconds()-se.getSeconds()*t)},function(se,Te){se.setTime(+se+Te*n)},function(se,Te){return(Te-se)/n},function(se){return se.getMinutes()}),f=g.range,p=k(function(se){se.setTime(se-se.getMilliseconds()-se.getSeconds()*t-se.getMinutes()*n)},function(se,Te){se.setTime(+se+Te*r)},function(se,Te){return(Te-se)/r},function(se){return se.getHours()}),m=p.range,i=k(function(se){se.setHours(0,0,0,0)},function(se,Te){se.setDate(se.getDate()+Te)},function(se,Te){return(Te-se-(Te.getTimezoneOffset()-se.getTimezoneOffset())*n)/a},function(se){return se.getDate()-1}),T=i.range;function S(se){return k(function(Te){Te.setDate(Te.getDate()-(Te.getDay()+7-se)%7),Te.setHours(0,0,0,0)},function(Te,Fe){Te.setDate(Te.getDate()+Fe*7)},function(Te,Fe){return(Fe-Te-(Fe.getTimezoneOffset()-Te.getTimezoneOffset())*n)/o})}var M=S(0),C=S(1),_=S(2),w=S(3),h=S(4),u=S(5),A=S(6),b=M.range,z=C.range,I=_.range,N=w.range,R=h.range,B=u.range,F=A.range,P=k(function(se){se.setDate(1),se.setHours(0,0,0,0)},function(se,Te){se.setMonth(se.getMonth()+Te)},function(se,Te){return Te.getMonth()-se.getMonth()+(Te.getFullYear()-se.getFullYear())*12},function(se){return se.getMonth()}),j=P.range,U=k(function(se){se.setMonth(0,1),se.setHours(0,0,0,0)},function(se,Te){se.setFullYear(se.getFullYear()+Te)},function(se,Te){return Te.getFullYear()-se.getFullYear()},function(se){return se.getFullYear()});U.every=function(se){return!isFinite(se=Math.floor(se))||!(se>0)?null:k(function(Te){Te.setFullYear(Math.floor(Te.getFullYear()/se)*se),Te.setMonth(0,1),Te.setHours(0,0,0,0)},function(Te,Fe){Te.setFullYear(Te.getFullYear()+Fe*se)})};var Z=U.range,Q=k(function(se){se.setUTCSeconds(0,0)},function(se,Te){se.setTime(+se+Te*n)},function(se,Te){return(Te-se)/n},function(se){return se.getUTCMinutes()}),re=Q.range,ne=k(function(se){se.setUTCMinutes(0,0,0)},function(se,Te){se.setTime(+se+Te*r)},function(se,Te){return(Te-se)/r},function(se){return se.getUTCHours()}),oe=ne.range,V=k(function(se){se.setUTCHours(0,0,0,0)},function(se,Te){se.setUTCDate(se.getUTCDate()+Te)},function(se,Te){return(Te-se)/a},function(se){return se.getUTCDate()-1}),$=V.range;function K(se){return k(function(Te){Te.setUTCDate(Te.getUTCDate()-(Te.getUTCDay()+7-se)%7),Te.setUTCHours(0,0,0,0)},function(Te,Fe){Te.setUTCDate(Te.getUTCDate()+Fe*7)},function(Te,Fe){return(Fe-Te)/o})}var G=K(0),X=K(1),q=K(2),W=K(3),ee=K(4),ae=K(5),fe=K(6),ye=G.range,xe=X.range,Ae=q.range,Me=W.range,Ie=ee.range,qe=ae.range,je=fe.range,ke=k(function(se){se.setUTCDate(1),se.setUTCHours(0,0,0,0)},function(se,Te){se.setUTCMonth(se.getUTCMonth()+Te)},function(se,Te){return Te.getUTCMonth()-se.getUTCMonth()+(Te.getUTCFullYear()-se.getUTCFullYear())*12},function(se){return se.getUTCMonth()}),ge=ke.range,le=k(function(se){se.setUTCMonth(0,1),se.setUTCHours(0,0,0,0)},function(se,Te){se.setUTCFullYear(se.getUTCFullYear()+Te)},function(se,Te){return Te.getUTCFullYear()-se.getUTCFullYear()},function(se){return se.getUTCFullYear()});le.every=function(se){return!isFinite(se=Math.floor(se))||!(se>0)?null:k(function(Te){Te.setUTCFullYear(Math.floor(Te.getUTCFullYear()/se)*se),Te.setUTCMonth(0,1),Te.setUTCHours(0,0,0,0)},function(Te,Fe){Te.setUTCFullYear(Te.getUTCFullYear()+Fe*se)})};var ve=le.range;v.timeDay=i,v.timeDays=T,v.timeFriday=u,v.timeFridays=B,v.timeHour=p,v.timeHours=m,v.timeInterval=k,v.timeMillisecond=l,v.timeMilliseconds=e,v.timeMinute=g,v.timeMinutes=f,v.timeMonday=C,v.timeMondays=z,v.timeMonth=P,v.timeMonths=j,v.timeSaturday=A,v.timeSaturdays=F,v.timeSecond=s,v.timeSeconds=c,v.timeSunday=M,v.timeSundays=b,v.timeThursday=h,v.timeThursdays=R,v.timeTuesday=_,v.timeTuesdays=I,v.timeWednesday=w,v.timeWednesdays=N,v.timeWeek=M,v.timeWeeks=b,v.timeYear=U,v.timeYears=Z,v.utcDay=V,v.utcDays=$,v.utcFriday=ae,v.utcFridays=qe,v.utcHour=ne,v.utcHours=oe,v.utcMillisecond=l,v.utcMilliseconds=e,v.utcMinute=Q,v.utcMinutes=re,v.utcMonday=X,v.utcMondays=xe,v.utcMonth=ke,v.utcMonths=ge,v.utcSaturday=fe,v.utcSaturdays=je,v.utcSecond=s,v.utcSeconds=c,v.utcSunday=G,v.utcSundays=ye,v.utcThursday=ee,v.utcThursdays=Ie,v.utcTuesday=q,v.utcTuesdays=Ae,v.utcWednesday=W,v.utcWednesdays=Me,v.utcWeek=G,v.utcWeeks=ye,v.utcYear=le,v.utcYears=ve,Object.defineProperty(v,"__esModule",{value:!0})})}}),ji=Ee({"node_modules/d3-time-format/dist/d3-time-format.js"(J,H){(function(v,x){typeof J=="object"&&typeof H<"u"?x(J,ki()):(v=v||self,x(v.d3=v.d3||{},v.d3))})(J,function(v,x){"use strict";function E(Ze){if(0<=Ze.y&&Ze.y<100){var Je=new Date(-1,Ze.m,Ze.d,Ze.H,Ze.M,Ze.S,Ze.L);return Je.setFullYear(Ze.y),Je}return new Date(Ze.y,Ze.m,Ze.d,Ze.H,Ze.M,Ze.S,Ze.L)}function k(Ze){if(0<=Ze.y&&Ze.y<100){var Je=new Date(Date.UTC(-1,Ze.m,Ze.d,Ze.H,Ze.M,Ze.S,Ze.L));return Je.setUTCFullYear(Ze.y),Je}return new Date(Date.UTC(Ze.y,Ze.m,Ze.d,Ze.H,Ze.M,Ze.S,Ze.L))}function l(Ze,Je,Mt){return{y:Ze,m:Je,d:Mt,H:0,M:0,S:0,L:0}}function e(Ze){var Je=Ze.dateTime,Mt=Ze.date,dt=Ze.time,Dt=Ze.periods,Ct=Ze.days,Vt=Ze.shortDays,Ht=Ze.months,Wt=Ze.shortMonths,Sr=c(Dt),ia=g(Dt),$t=c(Ct),It=g(Ct),ir=c(Vt),cr=g(Vt),fr=c(Ht),Ir=g(Ht),sa=c(Wt),aa=g(Wt),xa={a:ho,A:dn,b:Za,B:ot,c:null,d:P,e:P,f:re,g:ae,G:ye,H:j,I:U,j:Z,L:Q,m:ne,M:oe,p:et,q:hr,Q:Zt,s:sr,S:V,u:$,U:K,V:X,w:q,W,x:null,X:null,y:ee,Y:fe,Z:xe,"%":_r},ja={a:ur,A:Tr,b:Rr,B:Fr,c:null,d:Ae,e:Ae,f:ke,g:Tt,G:Kt,H:Me,I:Ie,j:qe,L:je,m:ge,M:le,p:nt,q:kt,Q:Zt,s:sr,S:ve,u:se,U:Te,V:We,w:Ge,W:gt,x:null,X:null,y:mt,Y:At,Z:ar,"%":_r},Oa={a:Fn,A:ni,b:Mi,B:ci,c:bn,d:h,e:h,f:N,g:M,G:S,H:A,I:A,j:u,L:I,m:w,M:b,p:ei,q:_,Q:B,s:F,S:z,u:p,U:m,V:i,w:f,W:T,x:pn,X:Ii,y:M,Y:S,Z:C,"%":R};xa.x=An(Mt,xa),xa.X=An(dt,xa),xa.c=An(Je,xa),ja.x=An(Mt,ja),ja.X=An(dt,ja),ja.c=An(Je,ja);function An(Ut,nr){return function(Er){var br=[],Or=-1,Pr=0,fa=Ut.length,Fa,La,Cn;for(Er instanceof Date||(Er=new Date(+Er));++Or53)return null;"w"in br||(br.w=1),"Z"in br?(Pr=k(l(br.y,0,1)),fa=Pr.getUTCDay(),Pr=fa>4||fa===0?x.utcMonday.ceil(Pr):x.utcMonday(Pr),Pr=x.utcDay.offset(Pr,(br.V-1)*7),br.y=Pr.getUTCFullYear(),br.m=Pr.getUTCMonth(),br.d=Pr.getUTCDate()+(br.w+6)%7):(Pr=E(l(br.y,0,1)),fa=Pr.getDay(),Pr=fa>4||fa===0?x.timeMonday.ceil(Pr):x.timeMonday(Pr),Pr=x.timeDay.offset(Pr,(br.V-1)*7),br.y=Pr.getFullYear(),br.m=Pr.getMonth(),br.d=Pr.getDate()+(br.w+6)%7)}else("W"in br||"U"in br)&&("w"in br||(br.w="u"in br?br.u%7:"W"in br?1:0),fa="Z"in br?k(l(br.y,0,1)).getUTCDay():E(l(br.y,0,1)).getDay(),br.m=0,br.d="W"in br?(br.w+6)%7+br.W*7-(fa+5)%7:br.w+br.U*7-(fa+6)%7);return"Z"in br?(br.H+=br.Z/100|0,br.M+=br.Z%100,k(br)):E(br)}}function Ja(Ut,nr,Er,br){for(var Or=0,Pr=nr.length,fa=Er.length,Fa,La;Or=fa)return-1;if(Fa=nr.charCodeAt(Or++),Fa===37){if(Fa=nr.charAt(Or++),La=Oa[Fa in t?nr.charAt(Or++):Fa],!La||(br=La(Ut,Er,br))<0)return-1}else if(Fa!=Er.charCodeAt(br++))return-1}return br}function ei(Ut,nr,Er){var br=Sr.exec(nr.slice(Er));return br?(Ut.p=ia[br[0].toLowerCase()],Er+br[0].length):-1}function Fn(Ut,nr,Er){var br=ir.exec(nr.slice(Er));return br?(Ut.w=cr[br[0].toLowerCase()],Er+br[0].length):-1}function ni(Ut,nr,Er){var br=$t.exec(nr.slice(Er));return br?(Ut.w=It[br[0].toLowerCase()],Er+br[0].length):-1}function Mi(Ut,nr,Er){var br=sa.exec(nr.slice(Er));return br?(Ut.m=aa[br[0].toLowerCase()],Er+br[0].length):-1}function ci(Ut,nr,Er){var br=fr.exec(nr.slice(Er));return br?(Ut.m=Ir[br[0].toLowerCase()],Er+br[0].length):-1}function bn(Ut,nr,Er){return Ja(Ut,Je,nr,Er)}function pn(Ut,nr,Er){return Ja(Ut,Mt,nr,Er)}function Ii(Ut,nr,Er){return Ja(Ut,dt,nr,Er)}function ho(Ut){return Vt[Ut.getDay()]}function dn(Ut){return Ct[Ut.getDay()]}function Za(Ut){return Wt[Ut.getMonth()]}function ot(Ut){return Ht[Ut.getMonth()]}function et(Ut){return Dt[+(Ut.getHours()>=12)]}function hr(Ut){return 1+~~(Ut.getMonth()/3)}function ur(Ut){return Vt[Ut.getUTCDay()]}function Tr(Ut){return Ct[Ut.getUTCDay()]}function Rr(Ut){return Wt[Ut.getUTCMonth()]}function Fr(Ut){return Ht[Ut.getUTCMonth()]}function nt(Ut){return Dt[+(Ut.getUTCHours()>=12)]}function kt(Ut){return 1+~~(Ut.getUTCMonth()/3)}return{format:function(Ut){var nr=An(Ut+="",xa);return nr.toString=function(){return Ut},nr},parse:function(Ut){var nr=un(Ut+="",!1);return nr.toString=function(){return Ut},nr},utcFormat:function(Ut){var nr=An(Ut+="",ja);return nr.toString=function(){return Ut},nr},utcParse:function(Ut){var nr=un(Ut+="",!0);return nr.toString=function(){return Ut},nr}}}var t={"-":"",_:" ",0:"0"},n=/^\s*\d+/,r=/^%/,a=/[\\^$*+?|[\]().{}]/g;function o(Ze,Je,Mt){var dt=Ze<0?"-":"",Dt=(dt?-Ze:Ze)+"",Ct=Dt.length;return dt+(Ct68?1900:2e3),Mt+dt[0].length):-1}function C(Ze,Je,Mt){var dt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Je.slice(Mt,Mt+6));return dt?(Ze.Z=dt[1]?0:-(dt[2]+(dt[3]||"00")),Mt+dt[0].length):-1}function _(Ze,Je,Mt){var dt=n.exec(Je.slice(Mt,Mt+1));return dt?(Ze.q=dt[0]*3-3,Mt+dt[0].length):-1}function w(Ze,Je,Mt){var dt=n.exec(Je.slice(Mt,Mt+2));return dt?(Ze.m=dt[0]-1,Mt+dt[0].length):-1}function h(Ze,Je,Mt){var dt=n.exec(Je.slice(Mt,Mt+2));return dt?(Ze.d=+dt[0],Mt+dt[0].length):-1}function u(Ze,Je,Mt){var dt=n.exec(Je.slice(Mt,Mt+3));return dt?(Ze.m=0,Ze.d=+dt[0],Mt+dt[0].length):-1}function A(Ze,Je,Mt){var dt=n.exec(Je.slice(Mt,Mt+2));return dt?(Ze.H=+dt[0],Mt+dt[0].length):-1}function b(Ze,Je,Mt){var dt=n.exec(Je.slice(Mt,Mt+2));return dt?(Ze.M=+dt[0],Mt+dt[0].length):-1}function z(Ze,Je,Mt){var dt=n.exec(Je.slice(Mt,Mt+2));return dt?(Ze.S=+dt[0],Mt+dt[0].length):-1}function I(Ze,Je,Mt){var dt=n.exec(Je.slice(Mt,Mt+3));return dt?(Ze.L=+dt[0],Mt+dt[0].length):-1}function N(Ze,Je,Mt){var dt=n.exec(Je.slice(Mt,Mt+6));return dt?(Ze.L=Math.floor(dt[0]/1e3),Mt+dt[0].length):-1}function R(Ze,Je,Mt){var dt=r.exec(Je.slice(Mt,Mt+1));return dt?Mt+dt[0].length:-1}function B(Ze,Je,Mt){var dt=n.exec(Je.slice(Mt));return dt?(Ze.Q=+dt[0],Mt+dt[0].length):-1}function F(Ze,Je,Mt){var dt=n.exec(Je.slice(Mt));return dt?(Ze.s=+dt[0],Mt+dt[0].length):-1}function P(Ze,Je){return o(Ze.getDate(),Je,2)}function j(Ze,Je){return o(Ze.getHours(),Je,2)}function U(Ze,Je){return o(Ze.getHours()%12||12,Je,2)}function Z(Ze,Je){return o(1+x.timeDay.count(x.timeYear(Ze),Ze),Je,3)}function Q(Ze,Je){return o(Ze.getMilliseconds(),Je,3)}function re(Ze,Je){return Q(Ze,Je)+"000"}function ne(Ze,Je){return o(Ze.getMonth()+1,Je,2)}function oe(Ze,Je){return o(Ze.getMinutes(),Je,2)}function V(Ze,Je){return o(Ze.getSeconds(),Je,2)}function $(Ze){var Je=Ze.getDay();return Je===0?7:Je}function K(Ze,Je){return o(x.timeSunday.count(x.timeYear(Ze)-1,Ze),Je,2)}function G(Ze){var Je=Ze.getDay();return Je>=4||Je===0?x.timeThursday(Ze):x.timeThursday.ceil(Ze)}function X(Ze,Je){return Ze=G(Ze),o(x.timeThursday.count(x.timeYear(Ze),Ze)+(x.timeYear(Ze).getDay()===4),Je,2)}function q(Ze){return Ze.getDay()}function W(Ze,Je){return o(x.timeMonday.count(x.timeYear(Ze)-1,Ze),Je,2)}function ee(Ze,Je){return o(Ze.getFullYear()%100,Je,2)}function ae(Ze,Je){return Ze=G(Ze),o(Ze.getFullYear()%100,Je,2)}function fe(Ze,Je){return o(Ze.getFullYear()%1e4,Je,4)}function ye(Ze,Je){var Mt=Ze.getDay();return Ze=Mt>=4||Mt===0?x.timeThursday(Ze):x.timeThursday.ceil(Ze),o(Ze.getFullYear()%1e4,Je,4)}function xe(Ze){var Je=Ze.getTimezoneOffset();return(Je>0?"-":(Je*=-1,"+"))+o(Je/60|0,"0",2)+o(Je%60,"0",2)}function Ae(Ze,Je){return o(Ze.getUTCDate(),Je,2)}function Me(Ze,Je){return o(Ze.getUTCHours(),Je,2)}function Ie(Ze,Je){return o(Ze.getUTCHours()%12||12,Je,2)}function qe(Ze,Je){return o(1+x.utcDay.count(x.utcYear(Ze),Ze),Je,3)}function je(Ze,Je){return o(Ze.getUTCMilliseconds(),Je,3)}function ke(Ze,Je){return je(Ze,Je)+"000"}function ge(Ze,Je){return o(Ze.getUTCMonth()+1,Je,2)}function le(Ze,Je){return o(Ze.getUTCMinutes(),Je,2)}function ve(Ze,Je){return o(Ze.getUTCSeconds(),Je,2)}function se(Ze){var Je=Ze.getUTCDay();return Je===0?7:Je}function Te(Ze,Je){return o(x.utcSunday.count(x.utcYear(Ze)-1,Ze),Je,2)}function Fe(Ze){var Je=Ze.getUTCDay();return Je>=4||Je===0?x.utcThursday(Ze):x.utcThursday.ceil(Ze)}function We(Ze,Je){return Ze=Fe(Ze),o(x.utcThursday.count(x.utcYear(Ze),Ze)+(x.utcYear(Ze).getUTCDay()===4),Je,2)}function Ge(Ze){return Ze.getUTCDay()}function gt(Ze,Je){return o(x.utcMonday.count(x.utcYear(Ze)-1,Ze),Je,2)}function mt(Ze,Je){return o(Ze.getUTCFullYear()%100,Je,2)}function Tt(Ze,Je){return Ze=Fe(Ze),o(Ze.getUTCFullYear()%100,Je,2)}function At(Ze,Je){return o(Ze.getUTCFullYear()%1e4,Je,4)}function Kt(Ze,Je){var Mt=Ze.getUTCDay();return Ze=Mt>=4||Mt===0?x.utcThursday(Ze):x.utcThursday.ceil(Ze),o(Ze.getUTCFullYear()%1e4,Je,4)}function ar(){return"+0000"}function _r(){return"%"}function Zt(Ze){return+Ze}function sr(Ze){return Math.floor(+Ze/1e3)}var Ot;vt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function vt(Ze){return Ot=e(Ze),v.timeFormat=Ot.format,v.timeParse=Ot.parse,v.utcFormat=Ot.utcFormat,v.utcParse=Ot.utcParse,Ot}var ht="%Y-%m-%dT%H:%M:%S.%LZ";function Re(Ze){return Ze.toISOString()}var Be=Date.prototype.toISOString?Re:v.utcFormat(ht);function He(Ze){var Je=new Date(Ze);return isNaN(Je)?null:Je}var $e=+new Date("2000-01-01T00:00:00.000Z")?He:v.utcParse(ht);v.isoFormat=Be,v.isoParse=$e,v.timeFormatDefaultLocale=vt,v.timeFormatLocale=e,Object.defineProperty(v,"__esModule",{value:!0})})}}),ls=Ee({"node_modules/d3-format/dist/d3-format.js"(J,H){(function(v,x){typeof J=="object"&&typeof H<"u"?x(J):(v=typeof globalThis<"u"?globalThis:v||self,x(v.d3=v.d3||{}))})(J,function(v){"use strict";function x(w){return Math.abs(w=Math.round(w))>=1e21?w.toLocaleString("en").replace(/,/g,""):w.toString(10)}function E(w,h){if((u=(w=h?w.toExponential(h-1):w.toExponential()).indexOf("e"))<0)return null;var u,A=w.slice(0,u);return[A.length>1?A[0]+A.slice(2):A,+w.slice(u+1)]}function k(w){return w=E(Math.abs(w)),w?w[1]:NaN}function l(w,h){return function(u,A){for(var b=u.length,z=[],I=0,N=w[0],R=0;b>0&&N>0&&(R+N+1>A&&(N=Math.max(1,A-R)),z.push(u.substring(b-=N,b+N)),!((R+=N+1)>A));)N=w[I=(I+1)%w.length];return z.reverse().join(h)}}function e(w){return function(h){return h.replace(/[0-9]/g,function(u){return w[+u]})}}var t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function n(w){if(!(h=t.exec(w)))throw new Error("invalid format: "+w);var h;return new r({fill:h[1],align:h[2],sign:h[3],symbol:h[4],zero:h[5],width:h[6],comma:h[7],precision:h[8]&&h[8].slice(1),trim:h[9],type:h[10]})}n.prototype=r.prototype;function r(w){this.fill=w.fill===void 0?" ":w.fill+"",this.align=w.align===void 0?">":w.align+"",this.sign=w.sign===void 0?"-":w.sign+"",this.symbol=w.symbol===void 0?"":w.symbol+"",this.zero=!!w.zero,this.width=w.width===void 0?void 0:+w.width,this.comma=!!w.comma,this.precision=w.precision===void 0?void 0:+w.precision,this.trim=!!w.trim,this.type=w.type===void 0?"":w.type+""}r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function a(w){e:for(var h=w.length,u=1,A=-1,b;u0&&(A=0);break}return A>0?w.slice(0,A)+w.slice(b+1):w}var o;function s(w,h){var u=E(w,h);if(!u)return w+"";var A=u[0],b=u[1],z=b-(o=Math.max(-8,Math.min(8,Math.floor(b/3)))*3)+1,I=A.length;return z===I?A:z>I?A+new Array(z-I+1).join("0"):z>0?A.slice(0,z)+"."+A.slice(z):"0."+new Array(1-z).join("0")+E(w,Math.max(0,h+z-1))[0]}function c(w,h){var u=E(w,h);if(!u)return w+"";var A=u[0],b=u[1];return b<0?"0."+new Array(-b).join("0")+A:A.length>b+1?A.slice(0,b+1)+"."+A.slice(b+1):A+new Array(b-A.length+2).join("0")}var g={"%":function(w,h){return(w*100).toFixed(h)},b:function(w){return Math.round(w).toString(2)},c:function(w){return w+""},d:x,e:function(w,h){return w.toExponential(h)},f:function(w,h){return w.toFixed(h)},g:function(w,h){return w.toPrecision(h)},o:function(w){return Math.round(w).toString(8)},p:function(w,h){return c(w*100,h)},r:c,s,X:function(w){return Math.round(w).toString(16).toUpperCase()},x:function(w){return Math.round(w).toString(16)}};function f(w){return w}var p=Array.prototype.map,m=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function i(w){var h=w.grouping===void 0||w.thousands===void 0?f:l(p.call(w.grouping,Number),w.thousands+""),u=w.currency===void 0?"":w.currency[0]+"",A=w.currency===void 0?"":w.currency[1]+"",b=w.decimal===void 0?".":w.decimal+"",z=w.numerals===void 0?f:e(p.call(w.numerals,String)),I=w.percent===void 0?"%":w.percent+"",N=w.minus===void 0?"-":w.minus+"",R=w.nan===void 0?"NaN":w.nan+"";function B(P){P=n(P);var j=P.fill,U=P.align,Z=P.sign,Q=P.symbol,re=P.zero,ne=P.width,oe=P.comma,V=P.precision,$=P.trim,K=P.type;K==="n"?(oe=!0,K="g"):g[K]||(V===void 0&&(V=12),$=!0,K="g"),(re||j==="0"&&U==="=")&&(re=!0,j="0",U="=");var G=Q==="$"?u:Q==="#"&&/[boxX]/.test(K)?"0"+K.toLowerCase():"",X=Q==="$"?A:/[%p]/.test(K)?I:"",q=g[K],W=/[defgprs%]/.test(K);V=V===void 0?6:/[gprs]/.test(K)?Math.max(1,Math.min(21,V)):Math.max(0,Math.min(20,V));function ee(ae){var fe=G,ye=X,xe,Ae,Me;if(K==="c")ye=q(ae)+ye,ae="";else{ae=+ae;var Ie=ae<0||1/ae<0;if(ae=isNaN(ae)?R:q(Math.abs(ae),V),$&&(ae=a(ae)),Ie&&+ae==0&&Z!=="+"&&(Ie=!1),fe=(Ie?Z==="("?Z:N:Z==="-"||Z==="("?"":Z)+fe,ye=(K==="s"?m[8+o/3]:"")+ye+(Ie&&Z==="("?")":""),W){for(xe=-1,Ae=ae.length;++xeMe||Me>57){ye=(Me===46?b+ae.slice(xe+1):ae.slice(xe))+ye,ae=ae.slice(0,xe);break}}}oe&&!re&&(ae=h(ae,1/0));var qe=fe.length+ae.length+ye.length,je=qe>1)+fe+ae+ye+je.slice(qe);break;default:ae=je+fe+ae+ye;break}return z(ae)}return ee.toString=function(){return P+""},ee}function F(P,j){var U=B((P=n(P),P.type="f",P)),Z=Math.max(-8,Math.min(8,Math.floor(k(j)/3)))*3,Q=Math.pow(10,-Z),re=m[8+Z/3];return function(ne){return U(Q*ne)+re}}return{format:B,formatPrefix:F}}var T;S({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function S(w){return T=i(w),v.format=T.format,v.formatPrefix=T.formatPrefix,T}function M(w){return Math.max(0,-k(Math.abs(w)))}function C(w,h){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(k(h)/3)))*3-k(Math.abs(w)))}function _(w,h){return w=Math.abs(w),h=Math.abs(h)-w,Math.max(0,k(h)-k(w))+1}v.FormatSpecifier=r,v.formatDefaultLocale=S,v.formatLocale=i,v.formatSpecifier=n,v.precisionFixed=M,v.precisionPrefix=C,v.precisionRound=_,Object.defineProperty(v,"__esModule",{value:!0})})}}),Ys=Ee({"node_modules/is-string-blank/index.js"(J,H){"use strict";H.exports=function(v){for(var x=v.length,E,k=0;k13)&&E!==32&&E!==133&&E!==160&&E!==5760&&E!==6158&&(E<8192||E>8205)&&E!==8232&&E!==8233&&E!==8239&&E!==8287&&E!==8288&&E!==12288&&E!==65279)return!1;return!0}}}),mi=Ee({"node_modules/fast-isnumeric/index.js"(J,H){"use strict";var v=Ys();H.exports=function(x){var E=typeof x;if(E==="string"){var k=x;if(x=+x,x===0&&v(k))return!1}else if(E!=="number")return!1;return x-x<1}}}),Qi=Ee({"src/constants/numerical.js"(J,H){"use strict";H.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"}}}),iu=Ee({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(J,H){(function(v,x){typeof J=="object"&&typeof H<"u"?x(J):(v=typeof globalThis<"u"?globalThis:v||self,x(v["base64-arraybuffer"]={}))})(J,function(v){"use strict";for(var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=typeof Uint8Array>"u"?[]:new Uint8Array(256),k=0;k>2],o+=x[(n[r]&3)<<4|n[r+1]>>4],o+=x[(n[r+1]&15)<<2|n[r+2]>>6],o+=x[n[r+2]&63];return a%3===2?o=o.substring(0,o.length-1)+"=":a%3===1&&(o=o.substring(0,o.length-2)+"=="),o},e=function(t){var n=t.length*.75,r=t.length,a,o=0,s,c,g,f;t[t.length-1]==="="&&(n--,t[t.length-2]==="="&&n--);var p=new ArrayBuffer(n),m=new Uint8Array(p);for(a=0;a>4,m[o++]=(c&15)<<4|g>>2,m[o++]=(g&3)<<6|f&63;return p};v.decode=e,v.encode=l,Object.defineProperty(v,"__esModule",{value:!0})})}}),Us=Ee({"src/lib/is_plain_object.js"(J,H){"use strict";H.exports=function(x){return window&&window.process&&window.process.versions?Object.prototype.toString.call(x)==="[object Object]":Object.prototype.toString.call(x)==="[object Object]"&&Object.getPrototypeOf(x).hasOwnProperty("hasOwnProperty")}}}),vs=Ee({"src/lib/array.js"(J){"use strict";var H=iu().decode,v=Us(),x=Array.isArray,E=ArrayBuffer,k=DataView;function l(s){return E.isView(s)&&!(s instanceof k)}J.isTypedArray=l;function e(s){return x(s)||l(s)}J.isArrayOrTypedArray=e;function t(s){return!e(s[0])}J.isArray1D=t,J.ensureArray=function(s,c){return x(s)||(s=[]),s.length=c,s};var n={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};n.uint8c=n.u1c,n.uint8=n.u1,n.int8=n.i1,n.uint16=n.u2,n.int16=n.i2,n.uint32=n.u4,n.int32=n.i4,n.float32=n.f4,n.float64=n.f8;function r(s){return s.constructor===ArrayBuffer}J.isArrayBuffer=r,J.decodeTypedArraySpec=function(s){var c=[],g=a(s),f=g.dtype,p=n[f];if(!p)throw new Error('Error in dtype: "'+f+'"');var m=p.BYTES_PER_ELEMENT,i=g.bdata;r(i)||(i=H(i));var T=g.shape===void 0?[i.byteLength/m]:(""+g.shape).split(",");T.reverse();var S=T.length,M,C,_=+T[0],w=m*_,h=0;if(S===1)c=new p(i);else if(S===2)for(M=+T[1],C=0;C2)return p[M]=p[M]|l,T.set(S,null);if(i){for(c=M;c0)return Math.log(E)/Math.LN10;var l=Math.log(Math.min(k[0],k[1]))/Math.LN10;return v(l)||(l=Math.log(Math.max(k[0],k[1]))/Math.LN10-6),l}}}),Ag=Ee({"src/lib/relink_private.js"(J,H){"use strict";var v=vs().isArrayOrTypedArray,x=Us();H.exports=function E(k,l){for(var e in l){var t=l[e],n=k[e];if(n!==t)if(e.charAt(0)==="_"||typeof t=="function"){if(e in k)continue;k[e]=t}else if(v(t)&&v(n)&&x(t[0])){if(e==="customdata"||e==="ids")continue;for(var r=Math.min(t.length,n.length),a=0;aMg,modHalf:()=>Sg});function Mg(J,H){let v=J%H;return v<0?v+H:v}function Sg(J,H){return Math.abs(J)>H/2?J-Math.round(J/H)*H:J}var Vd=Da({"src/lib/mod.ts"(){"use strict"}}),vo=Ee({"src/lib/extend.js"(J){"use strict";var H=Us(),v=Array.isArray;function x(k,l){var e,t;for(e=0;e{for(var Ke in Oe)v(Le,Ke,{get:Oe[Ke],enumerable:!0})},e=(Le,Oe,Ke,yt)=>{if(Oe&&typeof Oe=="object"||typeof Oe=="function")for(let wt of E(Oe))!k.call(Le,wt)&&wt!==Ke&&v(Le,wt,{get:()=>Oe[wt],enumerable:!(yt=x(Oe,wt))||yt.enumerable});return Le},t=Le=>e(v({},"__esModule",{value:!0}),Le),n={};l(n,{a98:()=>Uo,average:()=>Tr,averageAngle:()=>et,averageNumber:()=>hr,blend:()=>hl,blerp:()=>Ge,clampChroma:()=>vr,clampGamut:()=>or,clampRgb:()=>qt,colorsNamed:()=>s,convertA98ToXyz65:()=>Ot,convertCubehelixToRgb:()=>ei,convertDlchToLab65:()=>So,convertHsiToRgb:()=>ws,convertHslToRgb:()=>No,convertHsvToRgb:()=>Ps,convertHwbToRgb:()=>Ro,convertItpToXyz65:()=>Ms,convertJabToJch:()=>Lu,convertJabToRgb:()=>Dc,convertJabToXyz65:()=>Pc,convertJchToJab:()=>sl,convertLab65ToDlch:()=>ii,convertLab65ToRgb:()=>gn,convertLab65ToXyz65:()=>mn,convertLabToLch:()=>kt,convertLabToRgb:()=>bl,convertLabToXyz50:()=>Gu,convertLchToLab:()=>nr,convertLchuvToLuv:()=>Iu,convertLrgbToOklab:()=>rr,convertLrgbToRgb:()=>Dt,convertLuvToLchuv:()=>fu,convertLuvToXyz50:()=>gf,convertOkhslToOklab:()=>Ni,convertOkhsvToOklab:()=>Gn,convertOklabToLrgb:()=>Ca,convertOklabToOkhsl:()=>Bi,convertOklabToOkhsv:()=>Vn,convertOklabToRgb:()=>Ka,convertP3ToXyz65:()=>Xo,convertProphotoToXyz50:()=>ic,convertRec2020ToXyz65:()=>Bu,convertRgbToCubehelix:()=>un,convertRgbToHsi:()=>Ko,convertRgbToHsl:()=>Di,convertRgbToHsv:()=>$o,convertRgbToHwb:()=>Ls,convertRgbToJab:()=>Zl,convertRgbToLab:()=>Kc,convertRgbToLab65:()=>Sn,convertRgbToLrgb:()=>$e,convertRgbToOklab:()=>wr,convertRgbToXyb:()=>eu,convertRgbToXyz50:()=>Wu,convertRgbToXyz65:()=>Je,convertRgbToYiq:()=>$a,convertXybToRgb:()=>pt,convertXyz50ToLab:()=>Yu,convertXyz50ToLuv:()=>Ru,convertXyz50ToProphoto:()=>Al,convertXyz50ToRgb:()=>gu,convertXyz50ToXyz65:()=>Wr,convertXyz65ToA98:()=>Re,convertXyz65ToItp:()=>Eu,convertXyz65ToJab:()=>hc,convertXyz65ToLab65:()=>Ao,convertXyz65ToP3:()=>Ws,convertXyz65ToRec2020:()=>rf,convertXyz65ToRgb:()=>Vt,convertXyz65ToXyz50:()=>Ur,convertYiqToRgb:()=>Nn,converter:()=>P,cubehelix:()=>Qs,differenceCie76:()=>bn,differenceCie94:()=>pn,differenceCiede2000:()=>Ii,differenceCmc:()=>ho,differenceEuclidean:()=>ci,differenceHueChroma:()=>Mi,differenceHueNaive:()=>ni,differenceHueSaturation:()=>Fn,differenceHyab:()=>dn,differenceItp:()=>ot,differenceKotsarenkoRamos:()=>Za,displayable:()=>it,dlab:()=>os,dlch:()=>hs,easingGamma:()=>Ne,easingInOutSine:()=>jo,easingMidpoint:()=>Kr,easingSmootherstep:()=>fo,easingSmoothstep:()=>Eo,easingSmoothstepInverse:()=>yi,filterBrightness:()=>Ma,filterContrast:()=>wa,filterDeficiencyDeuter:()=>pi,filterDeficiencyProt:()=>Xn,filterDeficiencyTrit:()=>Xi,filterGrayscale:()=>Hn,filterHueRotate:()=>Si,filterInvert:()=>$n,filterSaturate:()=>Xa,filterSepia:()=>Ya,fixupAlpha:()=>Kt,fixupHueDecreasing:()=>fr,fixupHueIncreasing:()=>cr,fixupHueLonger:()=>ir,fixupHueShorter:()=>It,formatCss:()=>Vi,formatHex:()=>fl,formatHex8:()=>Ku,formatHsl:()=>Bs,formatRgb:()=>tu,getMode:()=>oe,hsi:()=>ss,hsl:()=>ks,hsv:()=>ts,hwb:()=>el,inGamut:()=>Rt,interpolate:()=>va,interpolateWith:()=>ba,interpolateWithPremultipliedAlpha:()=>za,interpolatorLinear:()=>At,interpolatorPiecewise:()=>Tt,interpolatorSplineBasis:()=>En,interpolatorSplineBasisClosed:()=>On,interpolatorSplineMonotone:()=>ie,interpolatorSplineMonotone2:()=>ce,interpolatorSplineMonotoneClosed:()=>_e,interpolatorSplineNatural:()=>di,interpolatorSplineNaturalClosed:()=>Oi,itp:()=>Il,jab:()=>Do,jch:()=>ru,lab:()=>Ns,lab65:()=>Nu,lch:()=>Vl,lch65:()=>Hl,lchuv:()=>Co,lerp:()=>Fe,lrgb:()=>is,luv:()=>Hs,mapAlphaDivide:()=>ut,mapAlphaMultiply:()=>tt,mapTransferGamma:()=>St,mapTransferLinear:()=>jt,mapper:()=>Qe,modeA98:()=>Wt,modeCubehelix:()=>Fr,modeDlab:()=>Io,modeDlch:()=>Oo,modeHsi:()=>wo,modeHsl:()=>Zs,modeHsv:()=>Ji,modeHwb:()=>yl,modeItp:()=>fc,modeJab:()=>Vu,modeJch:()=>Pu,modeLab:()=>Cl,modeLab65:()=>If,modeLch:()=>ll,modeLch65:()=>Nc,modeLchuv:()=>Pl,modeLrgb:()=>_c,modeLuv:()=>nc,modeOkhsl:()=>_i,modeOkhsv:()=>yo,modeOklab:()=>ns,modeOklch:()=>ps,modeP3:()=>Nl,modeProphoto:()=>Zu,modeRec2020:()=>jc,modeRgb:()=>_r,modeXyb:()=>Nt,modeXyz50:()=>Yt,modeXyz65:()=>ma,modeYiq:()=>Yi,nearest:()=>mr,okhsl:()=>ca,okhsv:()=>ln,oklab:()=>hn,oklch:()=>no,p3:()=>ds,parse:()=>ge,parseHex:()=>m,parseHsl:()=>Is,parseHslLegacy:()=>Jo,parseHwb:()=>ml,parseLab:()=>Df,parseLch:()=>Bc,parseNamed:()=>g,parseOklab:()=>Wo,parseOklch:()=>Ks,parseRgb:()=>ve,parseRgbLegacy:()=>N,parseTransparent:()=>Te,prophoto:()=>Os,random:()=>Ue,rec2020:()=>io,removeParser:()=>$,rgb:()=>ea,round:()=>bo,samples:()=>lt,serializeHex:()=>ql,serializeHex8:()=>Js,serializeHsl:()=>Li,serializeRgb:()=>Tu,toGamut:()=>Ar,trilerp:()=>gt,unlerp:()=>We,useMode:()=>ne,useParser:()=>V,wcagContrast:()=>Vs,wcagLuminance:()=>qs,xyb:()=>ha,xyz50:()=>Ta,xyz65:()=>sn,yiq:()=>wn}),H.exports=t(n);var r=(Le,Oe)=>{if(typeof Le=="number"){if(Oe===3)return{mode:"rgb",r:(Le>>8&15|Le>>4&240)/255,g:(Le>>4&15|Le&240)/255,b:(Le&15|Le<<4&240)/255};if(Oe===4)return{mode:"rgb",r:(Le>>12&15|Le>>8&240)/255,g:(Le>>8&15|Le>>4&240)/255,b:(Le>>4&15|Le&240)/255,alpha:(Le&15|Le<<4&240)/255};if(Oe===6)return{mode:"rgb",r:(Le>>16&255)/255,g:(Le>>8&255)/255,b:(Le&255)/255};if(Oe===8)return{mode:"rgb",r:(Le>>24&255)/255,g:(Le>>16&255)/255,b:(Le>>8&255)/255,alpha:(Le&255)/255}}},a=r,o={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},s=o,c=Le=>a(s[Le.toLowerCase()],6),g=c,f=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,p=Le=>{let Oe;return(Oe=Le.match(f))?a(parseInt(Oe[1],16),Oe[1].length):void 0},m=p,i="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",T=`(?:${i}|none)`,S=`${i}%`,M=`(?:${i}%|none)`,C=`(?:${i}%|${i})`,_=`(?:${i}%|${i}|none)`,w=`(?:${i}(deg|grad|rad|turn)|${i})`,h=`(?:${i}(deg|grad|rad|turn)|${i}|none)`,u="\\s*,\\s*",A=new RegExp("^"+_+"$"),b=new RegExp(`^rgba?\\(\\s*${i}${u}${i}${u}${i}\\s*(?:,\\s*${C}\\s*)?\\)$`),z=new RegExp(`^rgba?\\(\\s*${S}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),I=Le=>{let Oe={mode:"rgb"},Ke;if(Ke=Le.match(b))Ke[1]!==void 0&&(Oe.r=Ke[1]/255),Ke[2]!==void 0&&(Oe.g=Ke[2]/255),Ke[3]!==void 0&&(Oe.b=Ke[3]/255);else if(Ke=Le.match(z))Ke[1]!==void 0&&(Oe.r=Ke[1]/100),Ke[2]!==void 0&&(Oe.g=Ke[2]/100),Ke[3]!==void 0&&(Oe.b=Ke[3]/100);else return;return Ke[4]!==void 0?Oe.alpha=Math.max(0,Math.min(1,Ke[4]/100)):Ke[5]!==void 0&&(Oe.alpha=Math.max(0,Math.min(1,+Ke[5]))),Oe},N=I,R=(Le,Oe)=>Le===void 0?void 0:typeof Le!="object"?ge(Le):Le.mode!==void 0?Le:Oe?Qr(Nr({},Le),{mode:Oe}):void 0,B=R,F=(Le="rgb")=>Oe=>(Oe=B(Oe,Le))!==void 0?Oe.mode===Le?Oe:j[Oe.mode][Le]?j[Oe.mode][Le](Oe):Le==="rgb"?j[Oe.mode].rgb(Oe):j.rgb[Le](j[Oe.mode].rgb(Oe)):void 0,P=F,j={},U={},Z=[],Q={},re=Le=>Le,ne=Le=>(j[Le.mode]=Nr(Nr({},j[Le.mode]),Le.toMode),Object.keys(Le.fromMode||{}).forEach(Oe=>{j[Oe]||(j[Oe]={}),j[Oe][Le.mode]=Le.fromMode[Oe]}),Le.ranges||(Le.ranges={}),Le.difference||(Le.difference={}),Le.channels.forEach(Oe=>{if(Le.ranges[Oe]===void 0&&(Le.ranges[Oe]=[0,1]),!Le.interpolate[Oe])throw new Error(`Missing interpolator for: ${Oe}`);typeof Le.interpolate[Oe]=="function"&&(Le.interpolate[Oe]={use:Le.interpolate[Oe]}),Le.interpolate[Oe].fixup||(Le.interpolate[Oe].fixup=re)}),U[Le.mode]=Le,(Le.parse||[]).forEach(Oe=>{V(Oe,Le.mode)}),P(Le.mode)),oe=Le=>U[Le],V=(Le,Oe)=>{if(typeof Le=="string"){if(!Oe)throw new Error("'mode' required when 'parser' is a string");Q[Le]=Oe}else typeof Le=="function"&&Z.indexOf(Le)<0&&Z.push(Le)},$=Le=>{if(typeof Le=="string")delete Q[Le];else if(typeof Le=="function"){let Oe=Z.indexOf(Le);Oe>0&&Z.splice(Oe,1)}},K=/[^\x00-\x7F]|[a-zA-Z_]/,G=/[^\x00-\x7F]|[-\w]/,X={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},q=0;function W(Le){let Oe=Le[q],Ke=Le[q+1];return Oe==="-"||Oe==="+"?/\d/.test(Ke)||Ke==="."&&/\d/.test(Le[q+2]):Oe==="."?/\d/.test(Ke):/\d/.test(Oe)}function ee(Le){if(q>=Le.length)return!1;let Oe=Le[q];if(K.test(Oe))return!0;if(Oe==="-"){if(Le.length-q<2)return!1;let Ke=Le[q+1];return!!(Ke==="-"||K.test(Ke))}return!1}var ae={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function fe(Le){let Oe="";if((Le[q]==="-"||Le[q]==="+")&&(Oe+=Le[q++]),Oe+=ye(Le),Le[q]==="."&&/\d/.test(Le[q+1])&&(Oe+=Le[q++]+ye(Le)),(Le[q]==="e"||Le[q]==="E")&&((Le[q+1]==="-"||Le[q+1]==="+")&&/\d/.test(Le[q+2])?Oe+=Le[q++]+Le[q++]+ye(Le):/\d/.test(Le[q+1])&&(Oe+=Le[q++]+ye(Le))),ee(Le)){let Ke=xe(Le);return Ke==="deg"||Ke==="rad"||Ke==="turn"||Ke==="grad"?{type:X.Hue,value:Oe*ae[Ke]}:void 0}return Le[q]==="%"?(q++,{type:X.Percentage,value:+Oe}):{type:X.Number,value:+Oe}}function ye(Le){let Oe="";for(;/\d/.test(Le[q]);)Oe+=Le[q++];return Oe}function xe(Le){let Oe="";for(;q4)){if(Ke.length===4){if(Ke[3].type!==Y.Alpha)return;Ke[3]=Ke[3].value}return Ke.length===3&&Ke.push({type:Y.None,value:void 0}),Ke.every(wt=>wt.type!==Y.Alpha)?Ke:void 0}}function qe(Le,Oe){Le._i=0;let Ke=Le[Le._i++];if(!Ke||Ke.type!==Y.Function)return;let yt=Ue(Le,Oe);if(yt)return yt.unshift(Ke.value),yt}var ke=Le=>{if(typeof Le!="string")return;let Oe=Me(Le),Ke=Oe?qe(Oe,!0):void 0,yt,wt=0,Pt=Z.length;for(;wtLe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Te=se,Fe=(Le,Oe,Ke)=>Le+Ke*(Oe-Le),We=(Le,Oe,Ke)=>(Ke-Le)/(Oe-Le),Ge=(Le,Oe,Ke,yt,wt,Pt)=>Fe(Fe(Le,Oe,wt),Fe(Ke,yt,wt),Pt),gt=(Le,Oe,Ke,yt,wt,Pt,pr,Zr,Mn,va,aa)=>Fe(Ge(Le,Oe,Ke,yt,Mn,va),Ge(wt,Pt,pr,Zr,Mn,va),aa),mt=Le=>{let Oe=[];for(let Ke=0;KeOe=>{let Ke=mt(Oe);return yt=>{let wt=yt*Ke.length,Pt=yt>=1?Ke.length-1:Math.max(Math.floor(wt),0),pr=Ke[Pt];return pr===void 0?void 0:Le(pr[0],pr[1],wt-Pt)}},At=Tt(Fe),Kt=Le=>{let Oe=!1,Ke=Le.map(yt=>yt!==void 0?(Oe=!0,yt):1);return Oe?Ke:Le},nr={mode:"rgb",channels:["r","g","b","alpha"],parse:[ve,g,N,m,Te,"srgb"],serialize:"srgb",interpolate:{r:At,g:At,b:At,alpha:{use:At,fixup:Kt}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},_r=nr,Zt=(Le=0)=>Math.pow(Math.abs(Le),563/256)*Math.sign(Le),sr=Le=>{let Oe=Zt(Le.r),Ke=Zt(Le.g),yt=Zt(Le.b),wt={mode:"xyz65",x:.5766690429101305*Oe+.1855582379065463*Ke+.1882286462349947*yt,y:.297344975250536*Oe+.6273635662554661*Ke+.0752914584939979*yt,z:.0270313613864123*Oe+.0706888525358272*Ke+.9913375368376386*yt};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Ot=sr,vt=Le=>Math.pow(Math.abs(Le),256/563)*Math.sign(Le),ht=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"a98",r:vt(Le*2.0415879038107465-Oe*.5650069742788597-.3447313507783297*Ke),g:vt(Le*-.9692436362808798+Oe*1.8759675015077206+.0415550574071756*Ke),b:vt(Le*.0134442806320312-Oe*.1183623922310184+1.0151749943912058*Ke)};return yt!==void 0&&(wt.alpha=yt),wt},Re=ht,Be=(Le=0)=>{let Oe=Math.abs(Le);return Oe<=.04045?Le/12.92:(Math.sign(Le)||1)*Math.pow((Oe+.055)/1.055,2.4)},He=({r:Le,g:Oe,b:Ke,alpha:yt})=>{let wt={mode:"lrgb",r:Be(Le),g:Be(Oe),b:Be(Ke)};return yt!==void 0&&(wt.alpha=yt),wt},$e=He,Ze=Le=>{let{r:Oe,g:Ke,b:yt,alpha:wt}=$e(Le),Pt={mode:"xyz65",x:.4123907992659593*Oe+.357584339383878*Ke+.1804807884018343*yt,y:.2126390058715102*Oe+.715168678767756*Ke+.0721923153607337*yt,z:.0193308187155918*Oe+.119194779794626*Ke+.9505321522496607*yt};return wt!==void 0&&(Pt.alpha=wt),Pt},Je=Ze,Mt=(Le=0)=>{let Oe=Math.abs(Le);return Oe>.0031308?(Math.sign(Le)||1)*(1.055*Math.pow(Oe,1/2.4)-.055):Le*12.92},dt=({r:Le,g:Oe,b:Ke,alpha:yt},wt="rgb")=>{let Pt={mode:wt,r:Mt(Le),g:Mt(Oe),b:Mt(Ke)};return yt!==void 0&&(Pt.alpha=yt),Pt},Dt=dt,Ct=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Dt({r:Le*3.2409699419045226-Oe*1.537383177570094-.4986107602930034*Ke,g:Le*-.9692436362808796+Oe*1.8759675015077204+.0415550574071756*Ke,b:Le*.0556300796969936-Oe*.2039769588889765+1.0569715142428784*Ke});return yt!==void 0&&(wt.alpha=yt),wt},Vt=Ct,Ht=Qr(Nr({},_r),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:Le=>Re(Je(Le)),xyz65:Re},toMode:{rgb:Le=>Vt(Ot(Le)),xyz65:Ot}}),Wt=Ht,Sr=Le=>(Le=Le%360)<0?Le+360:Le,on=Sr,$t=(Le,Oe)=>Le.map((Ke,yt,wt)=>{if(Ke===void 0)return Ke;let Pt=on(Ke);return yt===0||Le[yt-1]===void 0?Pt:Oe(Pt-on(wt[yt-1]))}).reduce((Ke,yt)=>!Ke.length||yt===void 0||Ke[Ke.length-1]===void 0?(Ke.push(yt),Ke):(Ke.push(yt+Ke[Ke.length-1]),Ke),[]),It=Le=>$t(Le,Oe=>Math.abs(Oe)<=180?Oe:Oe-360*Math.sign(Oe)),ir=Le=>$t(Le,Oe=>Math.abs(Oe)>=180||Oe===0?Oe:Oe-360*Math.sign(Oe)),cr=Le=>$t(Le,Oe=>Oe>=0?Oe:Oe+360),fr=Le=>$t(Le,Oe=>Oe<=0?Oe:Oe-360),Ir=[-.14861,1.78277,-.29227,-.90649,1.97294,0],ln=Math.PI/180,nn=180/Math.PI,wn=Ir[3]*Ir[4],Un=Ir[1]*Ir[4],jn=Ir[1]*Ir[2]-Ir[0]*Ir[3],Aa=({r:Le,g:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=(jn*Ke+Le*wn-Oe*Un)/(jn+wn-Un),Pt=Ke-wt,pr=(Ir[4]*(Oe-wt)-Ir[2]*Pt)/Ir[3],Zr={mode:"cubehelix",l:wt,s:wt===0||wt===1?void 0:Math.sqrt(Pt*Pt+pr*pr)/(Ir[4]*wt*(1-wt))};return Zr.s&&(Zr.h=Math.atan2(pr,Pt)*nn-120),yt!==void 0&&(Zr.alpha=yt),Zr},ua=Aa,Qn=({h:Le,s:Oe,l:Ke,alpha:yt})=>{let wt={mode:"rgb"};Le=(Le===void 0?0:Le+120)*ln,Ke===void 0&&(Ke=0);let Pt=Oe===void 0?0:Oe*Ke*(1-Ke),pr=Math.cos(Le),Zr=Math.sin(Le);return wt.r=Ke+Pt*(Ir[0]*pr+Ir[1]*Zr),wt.g=Ke+Pt*(Ir[2]*pr+Ir[3]*Zr),wt.b=Ke+Pt*(Ir[4]*pr+Ir[5]*Zr),yt!==void 0&&(wt.alpha=yt),wt},ei=Qn,Fa=(Le,Oe)=>{if(Le.h===void 0||Oe.h===void 0||!Le.s||!Oe.s)return 0;let Ke=on(Le.h),yt=on(Oe.h),wt=Math.sin((yt-Ke+360)/2*Math.PI/180);return 2*Math.sqrt(Le.s*Oe.s)*wt},ai=(Le,Oe)=>{if(Le.h===void 0||Oe.h===void 0)return 0;let Ke=on(Le.h),yt=on(Oe.h);return Math.abs(yt-Ke)>180?Ke-(yt-360*Math.sign(yt-Ke)):yt-Ke},Mi=(Le,Oe)=>{if(Le.h===void 0||Oe.h===void 0||!Le.c||!Oe.c)return 0;let Ke=on(Le.h),yt=on(Oe.h),wt=Math.sin((yt-Ke+360)/2*Math.PI/180);return 2*Math.sqrt(Le.c*Oe.c)*wt},ci=(Le="rgb",Oe=[1,1,1,0])=>{let Ke=oe(Le),yt=Ke.channels,wt=Ke.difference,Pt=P(Le);return(pr,Zr)=>{let Mn=Pt(pr),va=Pt(Zr);return Math.sqrt(yt.reduce((aa,ea,ja)=>{let ka=wt[ea]?wt[ea](Mn,va):Mn[ea]-va[ea];return aa+(Oe[ja]||0)*Math.pow(isNaN(ka)?0:ka,2)},0))}},ba=()=>ci("lab65"),pa=(Le=1,Oe=.045,Ke=.015)=>{let yt=P("lab65");return(wt,Pt)=>{let pr=yt(wt),Zr=yt(Pt),Mn=pr.l,va=pr.a,aa=pr.b,ea=Math.sqrt(va*va+aa*aa),ja=Zr.l,ka=Zr.a,za=Zr.b,Ua=Math.sqrt(ka*ka+za*za),Ja=Math.pow(Mn-ja,2),hi=Math.pow(ea-Ua,2),Ki=Math.pow(va-ka,2)+Math.pow(aa-za,2)-hi;return Math.sqrt(Ja/Math.pow(Le,2)+hi/Math.pow(1+Oe*ea,2)+Ki/Math.pow(1+Ke*ea,2))}},Ii=(Le=1,Oe=1,Ke=1)=>{let yt=P("lab65");return(wt,Pt)=>{let pr=yt(wt),Zr=yt(Pt),Mn=pr.l,va=pr.a,aa=pr.b,ea=Math.sqrt(va*va+aa*aa),ja=Zr.l,ka=Zr.a,za=Zr.b,Ua=Math.sqrt(ka*ka+za*za),Ja=(ea+Ua)/2,hi=.5*(1-Math.sqrt(Math.pow(Ja,7)/(Math.pow(Ja,7)+Math.pow(25,7)))),Ki=va*(1+hi),Qo=ka*(1+hi),Ds=Math.sqrt(Ki*Ki+aa*aa),ys=Math.sqrt(Qo*Qo+za*za),Gl=Math.abs(Ki)+Math.abs(aa)===0?0:Math.atan2(aa,Ki);Gl+=(Gl<0)*2*Math.PI;let nu=Math.abs(Qo)+Math.abs(za)===0?0:Math.atan2(za,Qo);nu+=(nu<0)*2*Math.PI;let Au=ja-Mn,zf=ys-Ds,Gf=Ds*ys===0?0:nu-Gl;Gf-=(Gf>Math.PI)*2*Math.PI,Gf+=(Gf<-Math.PI)*2*Math.PI;let dh=2*Math.sqrt(Ds*ys)*Math.sin(Gf/2),ed=(Mn+ja)/2,Oh=(Ds+ys)/2,Bf;Ds*ys===0?Bf=Gl+nu:(Bf=(Gl+nu)/2,Bf-=(Math.abs(Gl-nu)>Math.PI)*Math.PI,Bf+=(Bf<0)*2*Math.PI);let fv=Math.pow(ed-50,2),kd=1-.17*Math.cos(Bf-Math.PI/6)+.24*Math.cos(2*Bf)+.32*Math.cos(3*Bf+Math.PI/30)-.2*Math.cos(4*Bf-63*Math.PI/180),Cd=1+.015*fv/Math.sqrt(20+fv),Ld=1+.045*Oh,Pd=1+.015*Oh*kd,f0=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*Bf-275)/25,2)),rp=2*Math.sqrt(Math.pow(Oh,7)/(Math.pow(Oh,7)+Math.pow(25,7))),jh=-1*Math.sin(2*f0)*rp;return Math.sqrt(Math.pow(Au/(Le*Cd),2)+Math.pow(zf/(Oe*Ld),2)+Math.pow(dh/(Ke*Pd),2)+jh*zf/(Oe*Ld)*dh/(Ke*Pd))}},ho=(Le=1,Oe=1)=>{let Ke=P("lab65");return(yt,wt)=>{let Pt=Ke(yt),pr=Pt.l,Zr=Pt.a,Mn=Pt.b,va=Math.sqrt(Zr*Zr+Mn*Mn),aa=Math.atan2(Mn,Zr);aa=aa+2*Math.PI*(aa<0);let ea=Ke(wt),ja=ea.l,ka=ea.a,za=ea.b,Ua=Math.sqrt(ka*ka+za*za),Ja=Math.pow(pr-ja,2),hi=Math.pow(va-Ua,2),Ki=Math.pow(Zr-ka,2)+Math.pow(Mn-za,2)-hi,Qo=Math.sqrt(Math.pow(va,4)/(Math.pow(va,4)+1900)),Ds=aa>=164/180*Math.PI&&aa<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(aa+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(aa+35/180*Math.PI)),ys=pr<16?.511:.040975*pr/(1+.01765*pr),Gl=.0638*va/(1+.0131*va)+.638,nu=Gl*(Qo*Ds+1-Qo);return Math.sqrt(Ja/Math.pow(Le*ys,2)+hi/Math.pow(Oe*Gl,2)+Ki/Math.pow(nu,2))}},da=()=>{let Le=P("lab65");return(Oe,Ke)=>{let yt=Le(Oe),wt=Le(Ke),Pt=yt.l-wt.l,pr=yt.a-wt.a,Zr=yt.b-wt.b;return Math.abs(Pt)+Math.sqrt(pr*pr+Zr*Zr)}},Kn=()=>ci("yiq",[.5053,.299,.1957]),ot=()=>ci("itp",[518400,129600,518400]),et=Le=>{let Oe=Le.reduce((yt,wt)=>{if(wt!==void 0){let Pt=wt*Math.PI/180;yt.sin+=Math.sin(Pt),yt.cos+=Math.cos(Pt)}return yt},{sin:0,cos:0}),Ke=Math.atan2(Oe.sin,Oe.cos)*180/Math.PI;return Ke<0?360+Ke:Ke},hr=Le=>{let Oe=Le.filter(Ke=>Ke!==void 0);return Oe.length?Oe.reduce((Ke,yt)=>Ke+yt,0)/Oe.length:void 0},ur=Le=>typeof Le=="function";function Tr(Le,Oe="rgb",Ke){let yt=oe(Oe),wt=Le.map(P(Oe));return yt.channels.reduce((Pt,pr)=>{let Zr=wt.map(Mn=>Mn[pr]).filter(Mn=>Mn!==void 0);if(Zr.length){let Mn;ur(Ke)?Mn=Ke:Ke&&ur(Ke[pr])?Mn=Ke[pr]:yt.average&&ur(yt.average[pr])?Mn=yt.average[pr]:Mn=hr,Pt[pr]=Mn(Zr,pr)}return Pt},{mode:Oe})}var Rr={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:ua},toMode:{rgb:ei},interpolate:{h:{use:At,fixup:It},s:At,l:At,alpha:{use:At,fixup:Kt}},difference:{h:Fa},average:{h:et}},Fr=Rr,at=({l:Le,a:Oe,b:Ke,alpha:yt},wt="lch")=>{Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let Pt=Math.sqrt(Oe*Oe+Ke*Ke),pr={mode:wt,l:Le,c:Pt};return Pt&&(pr.h=on(Math.atan2(Ke,Oe)*180/Math.PI)),yt!==void 0&&(pr.alpha=yt),pr},kt=at,Ut=({l:Le,c:Oe,h:Ke,alpha:yt},wt="lab")=>{Ke===void 0&&(Ke=0);let Pt={mode:wt,l:Le,a:Oe?Oe*Math.cos(Ke/180*Math.PI):0,b:Oe?Oe*Math.sin(Ke/180*Math.PI):0};return yt!==void 0&&(Pt.alpha=yt),Pt},ar=Ut,Er=Math.pow(29,3)/Math.pow(3,3),br=Math.pow(6,3)/Math.pow(29,3),Or={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Pr={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},hn=Math.pow(29,3)/Math.pow(3,3),zn=Math.pow(6,3)/Math.pow(29,3),Pn=Le=>Math.pow(Le,3)>br?Math.pow(Le,3):(116*Le-16)/Er,Ca=({l:Le,a:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=(Le+16)/116,Pt=Oe/500+wt,pr=wt-Ke/200,Zr={mode:"xyz65",x:Pn(Pt)*Pr.X,y:Pn(wt)*Pr.Y,z:Pn(pr)*Pr.Z};return yt!==void 0&&(Zr.alpha=yt),Zr},ma=Ca,bi=Le=>Vt(ma(Le)),ga=bi,eo=Le=>Le>br?Math.cbrt(Le):(Er*Le+16)/116,si=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=eo(Le/Pr.X),Pt=eo(Oe/Pr.Y),pr=eo(Ke/Pr.Z),Zr={mode:"lab65",l:116*Pt-16,a:500*(wt-Pt),b:200*(Pt-pr)};return yt!==void 0&&(Zr.alpha=yt),Zr},Ao=si,ro=Le=>{let Oe=Ao(Je(Le));return Le.r===Le.b&&Le.b===Le.g&&(Oe.a=Oe.b=0),Oe},Sa=ro,Gi=1,ti=1,fi=26/180*Math.PI,xo=Math.cos(fi),zi=Math.sin(fi),so=100/Math.log(139/100),Mo=({l:Le,c:Oe,h:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"lab65",l:(Math.exp(Le*Gi/so)-1)/.0039},Pt=(Math.exp(.0435*Oe*ti*Gi)-1)/.075,pr=Pt*Math.cos(Ke/180*Math.PI-fi),Zr=Pt*Math.sin(Ke/180*Math.PI-fi);return wt.a=pr*xo-Zr/.83*zi,wt.b=pr*zi+Zr/.83*xo,yt!==void 0&&(wt.alpha=yt),wt},So=Mo,oi=({l:Le,a:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Oe*xo+Ke*zi,Pt=.83*(Ke*xo-Oe*zi),pr=Math.sqrt(wt*wt+Pt*Pt),Zr={mode:"dlch",l:so/Gi*Math.log(1+.0039*Le),c:Math.log(1+.075*pr)/(.0435*ti*Gi)};return Zr.c&&(Zr.h=on((Math.atan2(Pt,wt)+fi)/Math.PI*180)),yt!==void 0&&(Zr.alpha=yt),Zr},ii=oi,co=Le=>So(kt(Le,"dlch")),Wi=Le=>ar(ii(Le),"dlab"),Ho={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:co,rgb:Le=>ga(co(Le))},fromMode:{lab65:Wi,rgb:Le=>Wi(Sa(Le))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:Kt}}},Io=Ho,qo={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:So,dlab:Le=>ar(Le,"dlab"),rgb:Le=>ga(So(Le))},fromMode:{lab65:ii,dlab:Le=>kt(Le,"dlch"),rgb:Le=>ii(Sa(Le))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:At,c:At,h:{use:At,fixup:It},alpha:{use:At,fixup:Kt}},difference:{h:Mi},average:{h:et}},Oo=qo;function ws({h:Le,s:Oe,i:Ke,alpha:yt}){Le=on(Le!==void 0?Le:0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.abs(Le/60%2-1),Pt;switch(Math.floor(Le/60)){case 0:Pt={r:Ke*(1+Oe*(3/(2-wt)-1)),g:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1)),b:Ke*(1-Oe)};break;case 1:Pt={r:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1)),g:Ke*(1+Oe*(3/(2-wt)-1)),b:Ke*(1-Oe)};break;case 2:Pt={r:Ke*(1-Oe),g:Ke*(1+Oe*(3/(2-wt)-1)),b:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1))};break;case 3:Pt={r:Ke*(1-Oe),g:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1)),b:Ke*(1+Oe*(3/(2-wt)-1))};break;case 4:Pt={r:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1)),g:Ke*(1-Oe),b:Ke*(1+Oe*(3/(2-wt)-1))};break;case 5:Pt={r:Ke*(1+Oe*(3/(2-wt)-1)),g:Ke*(1-Oe),b:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1))};break;default:Pt={r:Ke*(1-Oe),g:Ke*(1-Oe),b:Ke*(1-Oe)}}return Pt.mode="rgb",yt!==void 0&&(Pt.alpha=yt),Pt}function Ko({r:Le,g:Oe,b:Ke,alpha:yt}){Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.max(Le,Oe,Ke),Pt=Math.min(Le,Oe,Ke),pr={mode:"hsi",s:Le+Oe+Ke===0?0:1-3*Pt/(Le+Oe+Ke),i:(Le+Oe+Ke)/3};return wt-Pt!==0&&(pr.h=(wt===Le?(Oe-Ke)/(wt-Pt)+(Oe{switch(Oe){case"deg":return+Le;case"rad":return Le/Math.PI*180;case"grad":return Le/10*9;case"turn":return Le*360}},Go=lo,mo=new RegExp(`^hsla?\\(\\s*${T}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),us=Le=>{let Oe=Le.match(mo);if(!Oe)return;let Ke={mode:"hsl"};return Oe[3]!==void 0?Ke.h=+Oe[3]:Oe[1]!==void 0&&Oe[2]!==void 0&&(Ke.h=Go(Oe[1],Oe[2])),Oe[4]!==void 0&&(Ke.s=Math.min(Math.max(0,Oe[4]/100),1)),Oe[5]!==void 0&&(Ke.l=Math.min(Math.max(0,Oe[5]/100),1)),Oe[6]!==void 0?Ke.alpha=Math.max(0,Math.min(1,Oe[6]/100)):Oe[7]!==void 0&&(Ke.alpha=Math.max(0,Math.min(1,+Oe[7]))),Ke},Jo=us;function zs(Le,Oe){if(!Oe||Oe[0]!=="hsl"&&Oe[0]!=="hsla")return;let Ke={mode:"hsl"},[,yt,wt,Pt,pr]=Oe;if(yt.type!==Y.None){if(yt.type===Y.Percentage)return;Ke.h=yt.value}if(wt.type!==Y.None){if(wt.type===Y.Hue)return;Ke.s=wt.value/100}if(Pt.type!==Y.None){if(Pt.type===Y.Hue)return;Ke.l=Pt.value/100}return pr.type!==Y.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Ke}var Is=zs,es={mode:"hsl",toMode:{rgb:No},fromMode:{rgb:Di},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Is,Jo],serialize:Le=>`hsl(${Le.h!==void 0?Le.h:"none"} ${Le.s!==void 0?Le.s*100+"%":"none"} ${Le.l!==void 0?Le.l*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:It},s:At,l:At,alpha:{use:At,fixup:Kt}},difference:{h:Fa},average:{h:et}},Zs=es;function Ps({h:Le,s:Oe,v:Ke,alpha:yt}){Le=on(Le!==void 0?Le:0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.abs(Le/60%2-1),Pt;switch(Math.floor(Le/60)){case 0:Pt={r:Ke,g:Ke*(1-Oe*wt),b:Ke*(1-Oe)};break;case 1:Pt={r:Ke*(1-Oe*wt),g:Ke,b:Ke*(1-Oe)};break;case 2:Pt={r:Ke*(1-Oe),g:Ke,b:Ke*(1-Oe*wt)};break;case 3:Pt={r:Ke*(1-Oe),g:Ke*(1-Oe*wt),b:Ke};break;case 4:Pt={r:Ke*(1-Oe*wt),g:Ke*(1-Oe),b:Ke};break;case 5:Pt={r:Ke,g:Ke*(1-Oe),b:Ke*(1-Oe*wt)};break;default:Pt={r:Ke*(1-Oe),g:Ke*(1-Oe),b:Ke*(1-Oe)}}return Pt.mode="rgb",yt!==void 0&&(Pt.alpha=yt),Pt}function $o({r:Le,g:Oe,b:Ke,alpha:yt}){Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.max(Le,Oe,Ke),Pt=Math.min(Le,Oe,Ke),pr={mode:"hsv",s:wt===0?0:1-Pt/wt,v:wt};return wt-Pt!==0&&(pr.h=(wt===Le?(Oe-Ke)/(wt-Pt)+(Oe1){let wt=Oe+Ke;Oe/=wt,Ke/=wt}return Ps({h:Le,s:Ke===1?1:1-Oe/(1-Ke),v:1-Ke,alpha:yt})}function Ls(Le){let Oe=$o(Le);if(Oe===void 0)return;let Ke=Oe.s!==void 0?Oe.s:0,yt=Oe.v!==void 0?Oe.v:0,wt={mode:"hwb",w:(1-Ke)*yt,b:1-yt};return Oe.h!==void 0&&(wt.h=Oe.h),Oe.alpha!==void 0&&(wt.alpha=Oe.alpha),wt}function zl(Le,Oe){if(!Oe||Oe[0]!=="hwb")return;let Ke={mode:"hwb"},[,yt,wt,Pt,pr]=Oe;if(yt.type!==Y.None){if(yt.type===Y.Percentage)return;Ke.h=yt.value}if(wt.type!==Y.None){if(wt.type===Y.Hue)return;Ke.w=wt.value/100}if(Pt.type!==Y.None){if(Pt.type===Y.Hue)return;Ke.b=Pt.value/100}return pr.type!==Y.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Ke}var ml=zl,Ts={mode:"hwb",toMode:{rgb:Ro},fromMode:{rgb:Ls},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[ml],serialize:Le=>`hwb(${Le.h!==void 0?Le.h:"none"} ${Le.w!==void 0?Le.w*100+"%":"none"} ${Le.b!==void 0?Le.b*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:It},w:At,b:At,alpha:{use:At,fixup:Kt}},difference:{h:ai},average:{h:et}},yl=Ts,mu=203,su=.1593017578125,cc=78.84375,Bl=.8359375,_l=18.8515625,ju=18.6875;function lu(Le){if(Le<0)return 0;let Oe=Math.pow(Le,1/cc);return 1e4*Math.pow(Math.max(0,Oe-Bl)/(_l-ju*Oe),1/su)}function il(Le){if(Le<0)return 0;let Oe=Math.pow(Le/1e4,su);return Math.pow((Bl+_l*Oe)/(1+ju*Oe),cc)}var As=Le=>Math.max(Le/mu,0),ms=({i:Le,t:Oe,p:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=lu(Le+.008609037037932761*Oe+.11102962500302593*Ke),Pt=lu(Le-.00860903703793275*Oe-.11102962500302599*Ke),pr=lu(Le+.5600313357106791*Oe-.32062717498731885*Ke),Zr={mode:"xyz65",x:As(2.070152218389422*wt-1.3263473389671556*Pt+.2066510476294051*pr),y:As(.3647385209748074*wt+.680566024947227*Pt-.0453045459220346*pr),z:As(-.049747207535812*wt-.0492609666966138*Pt+1.1880659249923042*pr)};return yt!==void 0&&(Zr.alpha=yt),Zr},Ms=ms,ol=(Le=0)=>Math.max(Le*mu,0),Su=({x:Le,y:Oe,z:Ke,alpha:yt})=>{let wt=ol(Le),Pt=ol(Oe),pr=ol(Ke),Zr=il(.3592832590121217*wt+.6976051147779502*Pt-.0358915932320289*pr),Mn=il(-.1920808463704995*wt+1.1004767970374323*Pt+.0753748658519118*pr),va=il(.0070797844607477*wt+.0748396662186366*Pt+.8433265453898765*pr),aa=.5*Zr+.5*Mn,ea=1.61376953125*Zr-3.323486328125*Mn+1.709716796875*va,ja=4.378173828125*Zr-4.24560546875*Mn-.132568359375*va,ka={mode:"itp",i:aa,t:ea,p:ja};return yt!==void 0&&(ka.alpha=yt),ka},Eu=Su,Uu={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Ms,rgb:Le=>Vt(Ms(Le))},fromMode:{xyz65:Eu,rgb:Le=>Eu(Je(Le))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:At,t:At,p:At,alpha:{use:At,fixup:Kt}}},fc=Uu,th=134.03437499999998,Cf=16295499532821565e-27,qu=Le=>{if(Le<0)return 0;let Oe=Math.pow(Le/1e4,su);return Math.pow((Bl+_l*Oe)/(1+ju*Oe),th)},gs=(Le=0)=>Math.max(Le*203,0),Lf=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le=gs(Le),Oe=gs(Oe),Ke=gs(Ke);let wt=1.15*Le-.15*Ke,Pt=.66*Oe+.34*Le,pr=qu(.41478972*wt+.579999*Pt+.014648*Ke),Zr=qu(-.20151*wt+1.120649*Pt+.0531008*Ke),Mn=qu(-.0166008*wt+.2648*Pt+.6684799*Ke),va=(pr+Zr)/2,aa={mode:"jab",j:.44*va/(1-.56*va)-Cf,a:3.524*pr-4.066708*Zr+.542708*Mn,b:.199076*pr+1.096799*Zr-1.295875*Mn};return yt!==void 0&&(aa.alpha=yt),aa},hc=Lf,nc=134.03437499999998,hf=16295499532821565e-27,ku=Le=>{if(Le<0)return 0;let Oe=Math.pow(Le,1/nc);return 1e4*Math.pow((Bl-Oe)/(ju*Oe-_l),1/su)},dc=Le=>Le/203,Cu=({j:Le,a:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=(Le+hf)/(.44+.56*(Le+hf)),Pt=ku(wt+.13860504*Oe+.058047316*Ke),pr=ku(wt-.13860504*Oe-.058047316*Ke),Zr=ku(wt-.096019242*Oe-.8118919*Ke),Mn={mode:"xyz65",x:dc(1.661373024652174*Pt-.914523081304348*pr+.23136208173913045*Zr),y:dc(-.3250758611844533*Pt+1.571847026732543*pr-.21825383453227928*Zr),z:dc(-.090982811*Pt-.31272829*pr+1.5227666*Zr)};return yt!==void 0&&(Mn.alpha=yt),Mn},Pc=Cu,$c=Le=>{let Oe=hc(Je(Le));return Le.r===Le.b&&Le.b===Le.g&&(Oe.a=Oe.b=0),Oe},Zl=$c,df=Le=>Vt(Pc(Le)),Dc=df,Ic={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Zl,xyz65:hc},toMode:{rgb:Dc,xyz65:Pc},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:At,a:At,b:At,alpha:{use:At,fixup:Kt}}},Vu=Ic,Rc=({j:Le,a:Oe,b:Ke,alpha:yt})=>{Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.sqrt(Oe*Oe+Ke*Ke),Pt={mode:"jch",j:Le,c:wt};return wt&&(Pt.h=on(Math.atan2(Ke,Oe)*180/Math.PI)),yt!==void 0&&(Pt.alpha=yt),Pt},Lu=Rc,vf=({j:Le,c:Oe,h:Ke,alpha:yt})=>{Ke===void 0&&(Ke=0);let wt={mode:"jab",j:Le,a:Oe?Oe*Math.cos(Ke/180*Math.PI):0,b:Oe?Oe*Math.sin(Ke/180*Math.PI):0};return yt!==void 0&&(wt.alpha=yt),wt},sl=vf,Fc={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:sl,rgb:Le=>Dc(sl(Le))},fromMode:{rgb:Le=>Lu(Zl(Le)),jab:Lu},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:At,fixup:It},c:At,j:At,alpha:{use:At,fixup:Kt}},difference:{h:Mi},average:{h:et}},Pu=Fc,vc=Math.pow(29,3)/Math.pow(3,3),zc=Math.pow(6,3)/Math.pow(29,3),Hu=Le=>Math.pow(Le,3)>zc?Math.pow(Le,3):(116*Le-16)/vc,uu=({l:Le,a:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=(Le+16)/116,Pt=Oe/500+wt,pr=wt-Ke/200,Zr={mode:"xyz50",x:Hu(Pt)*Or.X,y:Hu(wt)*Or.Y,z:Hu(pr)*Or.Z};return yt!==void 0&&(Zr.alpha=yt),Zr},Gu=uu,Zc=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Dt({r:Le*3.1341359569958707-Oe*1.6173863321612538-.4906619460083532*Ke,g:Le*-.978795502912089+Oe*1.916254567259524+.03344273116131949*Ke,b:Le*.07195537988411677-Oe*.2289768264158322+1.405386058324125*Ke});return yt!==void 0&&(wt.alpha=yt),wt},gu=Zc,Pf=Le=>gu(Gu(Le)),bl=Pf,xl=Le=>{let{r:Oe,g:Ke,b:yt,alpha:wt}=$e(Le),Pt={mode:"xyz50",x:.436065742824811*Oe+.3851514688337912*Ke+.14307845442264197*yt,y:.22249319175623702*Oe+.7168870538238823*Ke+.06061979053616537*yt,z:.013923904500943465*Oe+.09708128566574634*Ke+.7140993584005155*yt};return wt!==void 0&&(Pt.alpha=wt),Pt},Wu=xl,wl=Le=>Le>zc?Math.cbrt(Le):(vc*Le+16)/116,pf=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=wl(Le/Or.X),Pt=wl(Oe/Or.Y),pr=wl(Ke/Or.Z),Zr={mode:"lab",l:116*Pt-16,a:500*(wt-Pt),b:200*(Pt-pr)};return yt!==void 0&&(Zr.alpha=yt),Zr},Yu=pf,pc=Le=>{let Oe=Yu(Wu(Le));return Le.r===Le.b&&Le.b===Le.g&&(Oe.a=Oe.b=0),Oe},Kc=pc;function cs(Le,Oe){if(!Oe||Oe[0]!=="lab")return;let Ke={mode:"lab"},[,yt,wt,Pt,pr]=Oe;if(!(yt.type===Y.Hue||wt.type===Y.Hue||Pt.type===Y.Hue))return yt.type!==Y.None&&(Ke.l=Math.min(Math.max(0,yt.value),100)),wt.type!==Y.None&&(Ke.a=wt.type===Y.Number?wt.value:wt.value*125/100),Pt.type!==Y.None&&(Ke.b=Pt.type===Y.Number?Pt.value:Pt.value*125/100),pr.type!==Y.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Ke}var Df=cs,cu={mode:"lab",toMode:{xyz50:Gu,rgb:bl},fromMode:{xyz50:Yu,rgb:Kc},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Df],serialize:Le=>`lab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:Kt}}},Cl=cu,Ll=Qr(Nr({},Cl),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:ma,rgb:ga},fromMode:{xyz65:Ao,rgb:Sa},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),If=Ll;function yu(Le,Oe){if(!Oe||Oe[0]!=="lch")return;let Ke={mode:"lch"},[,yt,wt,Pt,pr]=Oe;if(yt.type!==Y.None){if(yt.type===Y.Hue)return;Ke.l=Math.min(Math.max(0,yt.value),100)}if(wt.type!==Y.None&&(Ke.c=Math.max(0,wt.type===Y.Number?wt.value:wt.value*150/100)),Pt.type!==Y.None){if(Pt.type===Y.Percentage)return;Ke.h=Pt.value}return pr.type!==Y.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Ke}var Bc=yu,Tl={mode:"lch",toMode:{lab:ar,rgb:Le=>bl(ar(Le))},fromMode:{rgb:Le=>kt(Kc(Le)),lab:kt},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Bc],serialize:Le=>`lch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:It},c:At,l:At,alpha:{use:At,fixup:Kt}},difference:{h:Mi},average:{h:et}},ll=Tl,Jc=Qr(Nr({},ll),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:Le=>ar(Le,"lab65"),rgb:Le=>ga(ar(Le,"lab65"))},fromMode:{rgb:Le=>kt(Sa(Le),"lch65"),lab65:Le=>kt(Le,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Nc=Jc,Rf=({l:Le,u:Oe,v:Ke,alpha:yt})=>{Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.sqrt(Oe*Oe+Ke*Ke),Pt={mode:"lchuv",l:Le,c:wt};return wt&&(Pt.h=on(Math.atan2(Ke,Oe)*180/Math.PI)),yt!==void 0&&(Pt.alpha=yt),Pt},fu=Rf,Du=({l:Le,c:Oe,h:Ke,alpha:yt})=>{Ke===void 0&&(Ke=0);let wt={mode:"luv",l:Le,u:Oe?Oe*Math.cos(Ke/180*Math.PI):0,v:Oe?Oe*Math.sin(Ke/180*Math.PI):0};return yt!==void 0&&(wt.alpha=yt),wt},Iu=Du,Xu=(Le,Oe,Ke)=>4*Le/(Le+15*Oe+3*Ke),Qc=(Le,Oe,Ke)=>9*Oe/(Le+15*Oe+3*Ke),ef=Xu(Or.X,Or.Y,Or.Z),_u=Qc(Or.X,Or.Y,Or.Z),$u=Le=>Le<=zc?vc*Le:116*Math.cbrt(Le)-16,mc=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=$u(Oe/Or.Y),Pt=Xu(Le,Oe,Ke),pr=Qc(Le,Oe,Ke);!isFinite(Pt)||!isFinite(pr)?wt=Pt=pr=0:(Pt=13*wt*(Pt-ef),pr=13*wt*(pr-_u));let Zr={mode:"luv",l:wt,u:Pt,v:pr};return yt!==void 0&&(Zr.alpha=yt),Zr},Ru=mc,zo=(Le,Oe,Ke)=>4*Le/(Le+15*Oe+3*Ke),gc=(Le,Oe,Ke)=>9*Oe/(Le+15*Oe+3*Ke),Vf=zo(Or.X,Or.Y,Or.Z),mf=gc(Or.X,Or.Y,Or.Z),tf=({l:Le,u:Oe,v:Ke,alpha:yt})=>{if(Le===void 0&&(Le=0),Le===0)return{mode:"xyz50",x:0,y:0,z:0};Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Oe/(13*Le)+Vf,Pt=Ke/(13*Le)+mf,pr=Or.Y*(Le<=8?Le/vc:Math.pow((Le+16)/116,3)),Zr=pr*(9*wt)/(4*Pt),Mn=pr*(12-3*wt-20*Pt)/(4*Pt),va={mode:"xyz50",x:Zr,y:pr,z:Mn};return yt!==void 0&&(va.alpha=yt),va},gf=tf,Hf=Le=>fu(Ru(Wu(Le))),yf=Le=>gu(gf(Iu(Le))),ul={mode:"lchuv",toMode:{luv:Iu,rgb:yf},fromMode:{rgb:Hf,luv:fu},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:At,fixup:It},c:At,l:At,alpha:{use:At,fixup:Kt}},difference:{h:Mi},average:{h:et}},Pl=ul,yc=Qr(Nr({},_r),{mode:"lrgb",toMode:{rgb:Dt},fromMode:{rgb:$e},parse:["srgb-linear"],serialize:"srgb-linear"}),_c=yc,bc={mode:"luv",toMode:{xyz50:gf,rgb:Le=>gu(gf(Le))},fromMode:{xyz50:Ru,rgb:Le=>Ru(Wu(Le))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:At,u:At,v:At,alpha:{use:At,fixup:Kt}}},ac=bc,zt=({r:Le,g:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.cbrt(.412221469470763*Le+.5363325372617348*Oe+.0514459932675022*Ke),Pt=Math.cbrt(.2119034958178252*Le+.6806995506452344*Oe+.1073969535369406*Ke),pr=Math.cbrt(.0883024591900564*Le+.2817188391361215*Oe+.6299787016738222*Ke),Zr={mode:"oklab",l:.210454268309314*wt+.7936177747023054*Pt-.0040720430116193*pr,a:1.9779985324311684*wt-2.42859224204858*Pt+.450593709617411*pr,b:.0259040424655478*wt+.7827717124575296*Pt-.8086757549230774*pr};return yt!==void 0&&(Zr.alpha=yt),Zr},rr=zt,Br=Le=>{let Oe=rr($e(Le));return Le.r===Le.b&&Le.b===Le.g&&(Oe.a=Oe.b=0),Oe},wr=Br,un=({l:Le,a:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.pow(Le+.3963377773761749*Oe+.2158037573099136*Ke,3),Pt=Math.pow(Le-.1055613458156586*Oe-.0638541728258133*Ke,3),pr=Math.pow(Le-.0894841775298119*Oe-1.2914855480194092*Ke,3),Zr={mode:"lrgb",r:4.076741636075957*wt-3.3077115392580616*Pt+.2309699031821044*pr,g:-1.2684379732850317*wt+2.6097573492876887*Pt-.3413193760026573*pr,b:-.0041960761386756*wt-.7034186179359362*Pt+1.7076146940746117*pr};return yt!==void 0&&(Zr.alpha=yt),Zr},Ln=un,Vn=Le=>Dt(Ln(Le)),Jn=Vn;function ca(Le){let yt=1.170873786407767;return .5*(yt*Le-.206+Math.sqrt((yt*Le-.206)*(yt*Le-.206)+4*.03*yt*Le))}function Pa(Le){return(Le*Le+.206*Le)/(1.170873786407767*(Le+.03))}function Gn(Le,Oe){let Ke,yt,wt,Pt,pr,Zr,Mn,va;-1.88170328*Le-.80936493*Oe>1?(Ke=1.19086277,yt=1.76576728,wt=.59662641,Pt=.75515197,pr=.56771245,Zr=4.0767416621,Mn=-3.3077115913,va=.2309699292):1.81444104*Le-1.19445276*Oe>1?(Ke=.73956515,yt=-.45954404,wt=.08285427,Pt=.1254107,pr=.14503204,Zr=-1.2684380046,Mn=2.6097574011,va=-.3413193965):(Ke=1.35733652,yt=-.00915799,wt=-1.1513021,Pt=-.50559606,pr=.00692167,Zr=-.0041960863,Mn=-.7034186147,va=1.707614701);let aa=Ke+yt*Le+wt*Oe+Pt*Le*Le+pr*Le*Oe,ea=.3963377774*Le+.2158037573*Oe,ja=-.1055613458*Le-.0638541728*Oe,ka=-.0894841775*Le-1.291485548*Oe;{let za=1+aa*ea,Ua=1+aa*ja,Ja=1+aa*ka,hi=za*za*za,Ki=Ua*Ua*Ua,Qo=Ja*Ja*Ja,Ds=3*ea*za*za,ys=3*ja*Ua*Ua,Gl=3*ka*Ja*Ja,nu=6*ea*ea*za,Au=6*ja*ja*Ua,zf=6*ka*ka*Ja,Gf=Zr*hi+Mn*Ki+va*Qo,dh=Zr*Ds+Mn*ys+va*Gl,ed=Zr*nu+Mn*Au+va*zf;aa=aa-Gf*dh/(dh*dh-.5*Gf*ed)}return aa}function oa(Le,Oe){let Ke=Gn(Le,Oe),yt=Ln({l:1,a:Ke*Le,b:Ke*Oe}),wt=Math.cbrt(1/Math.max(yt.r,yt.g,yt.b)),Pt=wt*Ke;return[wt,Pt]}function fa(Le,Oe,Ke,yt,wt,Pt=null){Pt||(Pt=oa(Le,Oe));let pr;if((Ke-wt)*Pt[1]-(Pt[0]-wt)*yt<=0)pr=Pt[1]*wt/(yt*Pt[0]+Pt[1]*(wt-Ke));else{pr=Pt[1]*(wt-1)/(yt*(Pt[0]-1)+Pt[1]*(wt-Ke));{let Zr=Ke-wt,Mn=yt,va=.3963377774*Le+.2158037573*Oe,aa=-.1055613458*Le-.0638541728*Oe,ea=-.0894841775*Le-1.291485548*Oe,ja=Zr+Mn*va,ka=Zr+Mn*aa,za=Zr+Mn*ea;{let Ua=wt*(1-pr)+pr*Ke,Ja=pr*yt,hi=Ua+Ja*va,Ki=Ua+Ja*aa,Qo=Ua+Ja*ea,Ds=hi*hi*hi,ys=Ki*Ki*Ki,Gl=Qo*Qo*Qo,nu=3*ja*hi*hi,Au=3*ka*Ki*Ki,zf=3*za*Qo*Qo,Gf=6*ja*ja*hi,dh=6*ka*ka*Ki,ed=6*za*za*Qo,Oh=4.0767416621*Ds-3.3077115913*ys+.2309699292*Gl-1,Bf=4.0767416621*nu-3.3077115913*Au+.2309699292*zf,fv=4.0767416621*Gf-3.3077115913*dh+.2309699292*ed,kd=Bf/(Bf*Bf-.5*Oh*fv),Cd=-Oh*kd,Ld=-1.2684380046*Ds+2.6097574011*ys-.3413193965*Gl-1,Pd=-1.2684380046*nu+2.6097574011*Au-.3413193965*zf,f0=-1.2684380046*Gf+2.6097574011*dh-.3413193965*ed,rp=Pd/(Pd*Pd-.5*Ld*f0),jh=-Ld*rp,np=-.0041960863*Ds-.7034186147*ys+1.707614701*Gl-1,ap=-.0041960863*nu-.7034186147*Au+1.707614701*zf,td=-.0041960863*Gf-.7034186147*dh+1.707614701*ed,Dd=ap/(ap*ap-.5*np*td),h0=-np*Dd;Cd=kd>=0?Cd:1e6,jh=rp>=0?jh:1e6,h0=Dd>=0?h0:1e6,pr+=Math.min(Cd,Math.min(jh,h0))}}}return pr}function La(Le,Oe,Ke=null){Ke||(Ke=oa(Le,Oe));let yt=Ke[0],wt=Ke[1];return[wt/yt,wt/(1-yt)]}function qa(Le,Oe,Ke){let yt=oa(Oe,Ke),wt=fa(Oe,Ke,Le,1,Le,yt),Pt=La(Oe,Ke,yt),pr=.11516993+1/(7.4477897+4.1590124*Ke+Oe*(-2.19557347+1.75198401*Ke+Oe*(-2.13704948-10.02301043*Ke+Oe*(-4.24894561+5.38770819*Ke+4.69891013*Oe)))),Zr=.11239642+1/(1.6132032-.68124379*Ke+Oe*(.40370612+.90148123*Ke+Oe*(-.27087943+.6122399*Ke+Oe*(.00299215-.45399568*Ke-.14661872*Oe)))),Mn=wt/Math.min(Le*Pt[0],(1-Le)*Pt[1]),va=Le*pr,aa=(1-Le)*Zr,ea=.9*Mn*Math.sqrt(Math.sqrt(1/(1/(va*va*va*va)+1/(aa*aa*aa*aa))));return va=Le*.4,aa=(1-Le)*.8,[Math.sqrt(1/(1/(va*va)+1/(aa*aa))),ea,wt]}function Bi(Le){let Oe=Le.l!==void 0?Le.l:0,Ke=Le.a!==void 0?Le.a:0,yt=Le.b!==void 0?Le.b:0,wt={mode:"okhsl",l:ca(Oe)};Le.alpha!==void 0&&(wt.alpha=Le.alpha);let Pt=Math.sqrt(Ke*Ke+yt*yt);if(!Pt)return wt.s=0,wt;let[pr,Zr,Mn]=qa(Oe,Ke/Pt,yt/Pt),va;if(PtBi(wr(Le))},toMode:{oklab:Ni,rgb:Le=>Jn(Ni(Le))}}),_i=Zi;function Va(Le){let Oe=Le.l!==void 0?Le.l:0,Ke=Le.a!==void 0?Le.a:0,yt=Le.b!==void 0?Le.b:0,wt=Math.sqrt(Ke*Ke+yt*yt),Pt=wt?Ke/wt:1,pr=wt?yt/wt:1,[Zr,Mn]=La(Pt,pr),va=.5,aa=1-va/Zr,ea=Mn/(wt+Oe*Mn),ja=ea*Oe,ka=ea*wt,za=Pa(ja),Ua=ka*za/ja,Ja=Ln({l:za,a:Pt*Ua,b:pr*Ua}),hi=Math.cbrt(1/Math.max(Ja.r,Ja.g,Ja.b,0));Oe=Oe/hi,wt=wt/hi*ca(Oe)/Oe,Oe=ca(Oe);let Ki={mode:"okhsv",s:wt?(va+Mn)*ka/(Mn*va+Mn*aa*ka):0,v:Oe?Oe/ja:0};return Ki.s&&(Ki.h=on(Math.atan2(yt,Ke)*180/Math.PI)),Le.alpha!==void 0&&(Ki.alpha=Le.alpha),Ki}function Ga(Le){let Oe={mode:"oklab"};Le.alpha!==void 0&&(Oe.alpha=Le.alpha);let Ke=Le.h!==void 0?Le.h:0,yt=Le.s!==void 0?Le.s:0,wt=Le.v!==void 0?Le.v:0,Pt=Math.cos(Ke/180*Math.PI),pr=Math.sin(Ke/180*Math.PI),[Zr,Mn]=La(Pt,pr),va=.5,aa=1-va/Zr,ea=1-yt*va/(va+Mn-Mn*aa*yt),ja=yt*Mn*va/(va+Mn-Mn*aa*yt),ka=Pa(ea),za=ja*ka/ea,Ua=Ln({l:ka,a:Pt*za,b:pr*za}),Ja=Math.cbrt(1/Math.max(Ua.r,Ua.g,Ua.b,0)),hi=Pa(wt*ea),Ki=ja*hi/ea;return Oe.l=hi*Ja,Oe.a=Ki*Pt*Ja,Oe.b=Ki*pr*Ja,Oe}var oo=Qr(Nr({},Ji),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Va,rgb:Le=>Va(wr(Le))},toMode:{oklab:Ga,rgb:Le=>Jn(Ga(Le))}}),go=oo;function Vo(Le,Oe){if(!Oe||Oe[0]!=="oklab")return;let Ke={mode:"oklab"},[,yt,wt,Pt,pr]=Oe;if(!(yt.type===Y.Hue||wt.type===Y.Hue||Pt.type===Y.Hue))return yt.type!==Y.None&&(Ke.l=Math.min(Math.max(0,yt.type===Y.Number?yt.value:yt.value/100),1)),wt.type!==Y.None&&(Ke.a=wt.type===Y.Number?wt.value:wt.value*.4/100),Pt.type!==Y.None&&(Ke.b=Pt.type===Y.Number?Pt.value:Pt.value*.4/100),pr.type!==Y.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Ke}var Wo=Vo,Yo=Qr(Nr({},Cl),{mode:"oklab",toMode:{lrgb:Ln,rgb:Jn},fromMode:{lrgb:rr,rgb:wr},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Wo],serialize:Le=>`oklab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`}),as=Yo;function Bo(Le,Oe){if(!Oe||Oe[0]!=="oklch")return;let Ke={mode:"oklch"},[,yt,wt,Pt,pr]=Oe;if(yt.type!==Y.None){if(yt.type===Y.Hue)return;Ke.l=Math.min(Math.max(0,yt.type===Y.Number?yt.value:yt.value/100),1)}if(wt.type!==Y.None&&(Ke.c=Math.max(0,wt.type===Y.Number?wt.value:wt.value*.4/100)),Pt.type!==Y.None){if(Pt.type===Y.Percentage)return;Ke.h=Pt.value}return pr.type!==Y.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Ke}var Ks=Bo,Rs=Qr(Nr({},ll),{mode:"oklch",toMode:{oklab:Le=>ar(Le,"oklab"),rgb:Le=>Jn(ar(Le,"oklab"))},fromMode:{rgb:Le=>kt(wr(Le),"oklch"),oklab:Le=>kt(Le,"oklch")},parse:[Ks],serialize:Le=>`oklch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),ps=Rs,vi=Le=>{let{r:Oe,g:Ke,b:yt,alpha:wt}=$e(Le),Pt={mode:"xyz65",x:.486570948648216*Oe+.265667693169093*Ke+.1982172852343625*yt,y:.2289745640697487*Oe+.6917385218365062*Ke+.079286914093745*yt,z:0*Oe+.0451133818589026*Ke+1.043944368900976*yt};return wt!==void 0&&(Pt.alpha=wt),Pt},Xo=vi,Ss=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Dt({r:Le*2.4934969119414263-Oe*.9313836179191242-.402710784450717*Ke,g:Le*-.8294889695615749+Oe*1.7626640603183465+.0236246858419436*Ke,b:Le*.0358458302437845-Oe*.0761723892680418+.9568845240076871*Ke},"p3");return yt!==void 0&&(wt.alpha=yt),wt},Ws=Ss,Dl=Qr(Nr({},_r),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:Le=>Ws(Je(Le)),xyz65:Ws},toMode:{rgb:Le=>Vt(Xo(Le)),xyz65:Xo}}),Nl=Dl,Kl=Le=>{let Oe=Math.abs(Le);return Oe>=1/512?Math.sign(Le)*Math.pow(Oe,1/1.8):16*Le},Fu=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"prophoto",r:Kl(Le*1.3457868816471585-Oe*.2555720873797946-.0511018649755453*Ke),g:Kl(Le*-.5446307051249019+Oe*1.5082477428451466+.0205274474364214*Ke),b:Kl(Le*0+Oe*0+1.2119675456389452*Ke)};return yt!==void 0&&(wt.alpha=yt),wt},Al=Fu,zu=(Le=0)=>{let Oe=Math.abs(Le);return Oe>=16/512?Math.sign(Le)*Math.pow(Oe,1.8):Le/16},bu=Le=>{let Oe=zu(Le.r),Ke=zu(Le.g),yt=zu(Le.b),wt={mode:"xyz50",x:.7977666449006423*Oe+.1351812974005331*Ke+.0313477341283922*yt,y:.2880748288194013*Oe+.7118352342418731*Ke+899369387256e-16*yt,z:0*Oe+0*Ke+.8251046025104602*yt};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},ic=bu,Oc=Qr(Nr({},_r),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:Al,rgb:Le=>Al(Wu(Le))},toMode:{xyz50:ic,rgb:Le=>gu(ic(Le))}}),Zu=Oc,hu=1.09929682680944,Jl=.018053968510807,Ql=Le=>{let Oe=Math.abs(Le);return Oe>Jl?(Math.sign(Le)||1)*(hu*Math.pow(Oe,.45)-(hu-1)):4.5*Le},xu=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"rec2020",r:Ql(Le*1.7166511879712683-Oe*.3556707837763925-.2533662813736599*Ke),g:Ql(Le*-.6666843518324893+Oe*1.6164812366349395+.0157685458139111*Ke),b:Ql(Le*.0176398574453108-Oe*.0427706132578085+.9421031212354739*Ke)};return yt!==void 0&&(wt.alpha=yt),wt},rf=xu,Ff=1.09929682680944,xc=.018053968510807,rl=(Le=0)=>{let Oe=Math.abs(Le);return Oe{let Oe=rl(Le.r),Ke=rl(Le.g),yt=rl(Le.b),wt={mode:"xyz65",x:.6369580483012911*Oe+.1446169035862083*Ke+.1688809751641721*yt,y:.262700212011267*Oe+.6779980715188708*Ke+.059301716469862*yt,z:0*Oe+.0280726930490874*Ke+1.0609850577107909*yt};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Bu=Ol,nf=Qr(Nr({},_r),{mode:"rec2020",fromMode:{xyz65:rf,rgb:Le=>rf(Je(Le))},toMode:{xyz65:Bu,rgb:Le=>Vt(Bu(Le))},parse:["rec2020"],serialize:"rec2020"}),jc=nf,wu=.0037930732552754493,jl=Math.cbrt(wu),Ul=Le=>Math.cbrt(Le)-jl,Ci=Le=>{let{r:Oe,g:Ke,b:yt,alpha:wt}=$e(Le),Pt=Ul(.3*Oe+.622*Ke+.078*yt+wu),pr=Ul(.23*Oe+.692*Ke+.078*yt+wu),Zr=Ul(.2434226892454782*Oe+.2047674442449682*Ke+.5518098665095535*yt+wu),Mn={mode:"xyb",x:(Pt-pr)/2,y:(Pt+pr)/2,b:Zr-(Pt+pr)/2};return wt!==void 0&&(Mn.alpha=wt),Mn},eu=Ci,Xe=Le=>Math.pow(Le+jl,3),rt=({x:Le,y:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Xe(Le+Oe)-wu,Pt=Xe(Oe-Le)-wu,pr=Xe(Ke+Oe)-wu,Zr=Dt({r:11.031566904639861*wt-9.866943908131562*Pt-.16462299650829934*pr,g:-3.2541473810744237*wt+4.418770377582723*Pt-.16462299650829934*pr,b:-3.6588512867136815*wt+2.7129230459360922*Pt+1.9459282407775895*pr});return yt!==void 0&&(Zr.alpha=yt),Zr},pt=rt,_t={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:pt},fromMode:{rgb:eu},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:At,y:At,b:At,alpha:{use:At,fixup:Kt}}},Nt=_t,Bt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:gu,lab:Yu},fromMode:{rgb:Wu,lab:Gu},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:Kt}}},Yt=Bt,Dr=Le=>{let{x:Oe,y:Ke,z:yt,alpha:wt}=Le;Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0),yt===void 0&&(yt=0);let Pt={mode:"xyz50",x:1.0479298208405488*Oe+.0229467933410191*Ke-.0501922295431356*yt,y:.0296278156881593*Oe+.990434484573249*Ke-.0170738250293851*yt,z:-.0092430581525912*Oe+.0150551448965779*Ke+.7518742899580008*yt};return wt!==void 0&&(Pt.alpha=wt),Pt},Ur=Dr,kr=Le=>{let{x:Oe,y:Ke,z:yt,alpha:wt}=Le;Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0),yt===void 0&&(yt=0);let Pt={mode:"xyz65",x:.9554734527042182*Oe-.0230985368742614*Ke+.0632593086610217*yt,y:-.0283697069632081*Oe+1.0099954580058226*Ke+.021041398966943*yt,z:.0123140016883199*Oe-.0205076964334779*Ke+1.3303659366080753*yt};return wt!==void 0&&(Pt.alpha=wt),Pt},Wr=kr,sn={mode:"xyz65",toMode:{rgb:Vt,xyz50:Ur},fromMode:{rgb:Je,xyz50:Wr},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:Kt}}},gn=sn,Cn=({r:Le,g:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"yiq",y:.29889531*Le+.58662247*Oe+.11448223*Ke,i:.59597799*Le-.2741761*Oe-.32180189*Ke,q:.21147017*Le-.52261711*Oe+.31114694*Ke};return yt!==void 0&&(wt.alpha=yt),wt},Zn=Cn,ya=({y:Le,i:Oe,q:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"rgb",r:Le+.95608445*Oe+.6208885*Ke,g:Le-.27137664*Oe-.6486059*Ke,b:Le-1.10561724*Oe+1.70250126*Ke};return yt!==void 0&&(wt.alpha=yt),wt},Na=ya,wi={mode:"yiq",toMode:{rgb:Na},fromMode:{rgb:Zn},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:At,i:At,q:At,alpha:{use:At,fixup:Kt}}},Yi=wi,Ti=(Le,Oe)=>Math.round(Le*(Oe=Math.pow(10,Oe)))/Oe,_o=(Le=4)=>Oe=>typeof Oe=="number"?Ti(Oe,Le):Oe,bo=_o,Zo=bo(2),fs=Le=>Math.max(0,Math.min(1,Le||0)),Po=Le=>Math.round(fs(Le)*255),Es=P("rgb"),cl=P("hsl"),ql=Le=>{if(Le===void 0)return;let Oe=Po(Le.r),Ke=Po(Le.g),yt=Po(Le.b);return"#"+(1<<24|Oe<<16|Ke<<8|yt).toString(16).slice(1)},Js=Le=>{if(Le===void 0)return;let Oe=Po(Le.alpha!==void 0?Le.alpha:1);return ql(Le)+(256|Oe).toString(16).slice(1)},Tu=Le=>{if(Le===void 0)return;let Oe=Po(Le.r),Ke=Po(Le.g),yt=Po(Le.b);return Le.alpha===void 0||Le.alpha===1?`rgb(${Oe}, ${Ke}, ${yt})`:`rgba(${Oe}, ${Ke}, ${yt}, ${Zo(fs(Le.alpha))})`},Li=Le=>{if(Le===void 0)return;let Oe=Zo(Le.h||0),Ke=Zo(fs(Le.s)*100)+"%",yt=Zo(fs(Le.l)*100)+"%";return Le.alpha===void 0||Le.alpha===1?`hsl(${Oe}, ${Ke}, ${yt})`:`hsla(${Oe}, ${Ke}, ${yt}, ${Zo(fs(Le.alpha))})`},Vi=Le=>{let Oe=B(Le);if(!Oe)return;let Ke=oe(Oe.mode);if(!Ke.serialize||typeof Ke.serialize=="string"){let yt=`color(${Ke.serialize||`--${Oe.mode}`} `;return Ke.channels.forEach((wt,Pt)=>{wt!=="alpha"&&(yt+=(Pt?" ":"")+(Oe[wt]!==void 0?Oe[wt]:"none"))}),Oe.alpha!==void 0&&Oe.alpha<1&&(yt+=` / ${Oe.alpha}`),yt+")"}if(typeof Ke.serialize=="function")return Ke.serialize(Oe)},fl=Le=>ql(Es(Le)),Ku=Le=>Js(Es(Le)),tu=Le=>Tu(Es(Le)),Bs=Le=>Li(cl(Le)),oc={normal:(Le,Oe)=>Oe,multiply:(Le,Oe)=>Le*Oe,screen:(Le,Oe)=>Le+Oe-Le*Oe,"hard-light":(Le,Oe)=>Oe<.5?Le*2*Oe:2*Oe*(1-Le)-1,overlay:(Le,Oe)=>Le<.5?Oe*2*Le:2*Le*(1-Oe)-1,darken:(Le,Oe)=>Math.min(Le,Oe),lighten:(Le,Oe)=>Math.max(Le,Oe),"color-dodge":(Le,Oe)=>Le===0?0:Oe===1?1:Math.min(1,Le/(1-Oe)),"color-burn":(Le,Oe)=>Le===1?1:Oe===0?0:1-Math.min(1,(1-Le)/Oe),"soft-light":(Le,Oe)=>Oe<.5?Le-(1-2*Oe)*Le*(1-Le):Le+(2*Oe-1)*((Le<.25?((16*Le-12)*Le+4)*Le:Math.sqrt(Le))-Le),difference:(Le,Oe)=>Math.abs(Le-Oe),exclusion:(Le,Oe)=>Le+Oe-2*Le*Oe},du=(Le,Oe="normal",Ke="rgb")=>{let yt=typeof Oe=="function"?Oe:oc[Oe],wt=P(Ke),Pt=oe(Ke).channels;return Le.map(Zr=>{let Mn=wt(Zr);return Mn.alpha===void 0&&(Mn.alpha=1),Mn}).reduce((Zr,Mn)=>{if(Zr===void 0)return Mn;let va=Mn.alpha+Zr.alpha*(1-Mn.alpha);return Pt.reduce((aa,ea)=>(ea!=="alpha"&&(va===0?aa[ea]=0:(aa[ea]=Mn.alpha*(1-Zr.alpha)*Mn[ea]+Mn.alpha*Zr.alpha*yt(Zr[ea],Mn[ea])+(1-Mn.alpha)*Zr.alpha*Zr[ea],aa[ea]=Math.max(0,Math.min(1,aa[ea]/va)))),aa),{mode:Ke,alpha:va})})},hl=du,Uc=([Le,Oe])=>Le+Math.random()*(Oe-Le),he=Le=>Object.keys(Le).reduce((Oe,Ke)=>{let yt=Le[Ke];return Oe[Ke]=Array.isArray(yt)?yt:[yt,yt],Oe},{}),Se=(Le="rgb",Oe={})=>{let Ke=oe(Le),yt=he(Oe);return Ke.channels.reduce((wt,Pt)=>((yt.alpha||Pt!=="alpha")&&(wt[Pt]=Uc(yt[Pt]||Ke.ranges[Pt])),wt),{mode:Le})},je=Se,Qe=(Le,Oe="rgb",Ke=!1)=>{let yt=Oe?oe(Oe).channels:null,wt=Oe?P(Oe):B;return Pt=>{let pr=wt(Pt);if(!pr)return;let Zr=(yt||oe(pr.mode).channels).reduce((va,aa)=>{let ea=Le(pr[aa],aa,pr,Oe);return ea!==void 0&&!isNaN(ea)&&(va[aa]=ea),va},{mode:pr.mode});if(!Ke)return Zr;let Mn=B(Pt);return Mn&&Mn.mode!==Zr.mode?P(Mn.mode)(Zr):Zr}},tt=(Le,Oe,Ke)=>Oe!=="alpha"?(Le||0)*(Ke.alpha!==void 0?Ke.alpha:1):Le,ut=(Le,Oe,Ke)=>Oe!=="alpha"&&Ke.alpha!==0?(Le||0)/(Ke.alpha!==void 0?Ke.alpha:1):Le,jt=(Le=1,Oe=0)=>(Ke,yt)=>yt!=="alpha"?Ke*Le+Oe:Ke,St=(Le=1,Oe=1,Ke=0)=>(yt,wt)=>wt!=="alpha"?Le*Math.pow(yt,Oe)+Ke:yt,Qt=Le=>{Le[0]===void 0&&(Le[0]=0),Le[Le.length-1]===void 0&&(Le[Le.length-1]=1);let Oe=1,Ke,yt,wt,Pt;for(;OeOe=>Le<=0?1:Le>=1?0:Math.pow(Oe,Math.log(.5)/Math.log(Le)),Kr=yr,$r=Le=>typeof Le=="function",bn=Le=>Le&&typeof Le=="object",Rn=Le=>typeof Le=="number",rn=(Le,Oe="rgb",Ke,yt)=>{let wt=oe(Oe),Pt=P(Oe),pr=[],Zr=[],Mn={};Le.forEach(ja=>{Array.isArray(ja)?(pr.push(Pt(ja[0])),Zr.push(ja[1])):Rn(ja)||$r(ja)?Mn[Zr.length]=ja:(pr.push(Pt(ja)),Zr.push(void 0))}),gr(Zr);let va=wt.channels.reduce((ja,ka)=>{let za;return bn(Ke)&&bn(Ke[ka])&&Ke[ka].fixup?za=Ke[ka].fixup:bn(wt.interpolate[ka])&&wt.interpolate[ka].fixup?za=wt.interpolate[ka].fixup:za=Ua=>Ua,ja[ka]=za(pr.map(Ua=>Ua[ka])),ja},{});if(yt){let ja=pr.map((ka,za)=>wt.channels.reduce((Ua,Ja)=>(Ua[Ja]=va[Ja][za],Ua),{mode:Oe}));va=wt.channels.reduce((ka,za)=>(ka[za]=ja.map(Ua=>{let Ja=yt(Ua[za],za,Ua,Oe);return isNaN(Ja)?void 0:Ja}),ka),{})}let aa=wt.channels.reduce((ja,ka)=>{let za;return $r(Ke)?za=Ke:bn(Ke)&&$r(Ke[ka])?za=Ke[ka]:bn(Ke)&&bn(Ke[ka])&&Ke[ka].use?za=Ke[ka].use:$r(wt.interpolate[ka])?za=wt.interpolate[ka]:bn(wt.interpolate[ka])&&(za=wt.interpolate[ka].use),ja[ka]=za(va[ka]),ja},{}),ea=pr.length-1;return ja=>{if(ja=Math.min(Math.max(0,ja),1),ja<=Zr[0])return pr[0];if(ja>Zr[ea])return pr[ea];let ka=0;for(;Zr[ka]{let ys=aa[Ds](Ki);return ys!==void 0&&(Qo[Ds]=ys),Qo},{mode:Oe})}},pn=(Le,Oe="rgb",Ke)=>rn(Le,Oe,Ke),xn=(Le,Oe)=>(Ke,yt="rgb",wt)=>{let Pt=Oe?Qe(Oe,yt):void 0,pr=rn(Ke,yt,wt,Le);return Pt?Zr=>Pt(pr(Zr)):pr},Bn=xn(tt,ut),Fn=(Le,Oe)=>(Le+Oe)%Oe,mn=(Le,Oe,Ke,yt,wt)=>{let Pt=wt*wt,pr=Pt*wt;return((1-3*wt+3*Pt-pr)*Le+(4-6*Pt+3*pr)*Oe+(1+3*wt+3*Pt-3*pr)*Ke+pr*yt)/6},Ea=Le=>Oe=>{let Ke=Le.length-1,yt=Oe>=1?Ke-1:Math.max(0,Math.floor(Oe*Ke));return mn(yt>0?Le[yt-1]:2*Le[yt]-Le[yt+1],Le[yt],Le[yt+1],ytOe=>{let Ke=Le.length-1,yt=Math.floor(Oe*Ke);return mn(Le[Fn(yt-1,Le.length)],Le[Fn(yt,Le.length)],Le[Fn(yt+1,Le.length)],Le[Fn(yt+2,Le.length)],(Oe-yt/Ke)*Ke)},Ka=Le=>{let Oe,Ke=Le.length-1,yt=new Array(Ke),wt=new Array(Ke),Pt=new Array(Ke);for(yt[1]=1/4,wt[1]=(6*Le[1]-Le[0])/4,Oe=2;Oe0&&(Pt[Ke-1]=wt[Ke-1]),Oe=Ke-2;Oe>0;--Oe)Pt[Oe]=wt[Oe]-yt[Oe]*Pt[Oe+1];return Pt},di=Le=>Ea(Ka(Le)),Oi=Le=>Oa(Ka(Le)),Pi=Math.sign,ko=Math.min,de=Math.abs,y=Le=>{let Oe=Le.length-1,Ke=[],yt=[],wt=[];for(let Pt=0;Pt0?.5*(Le[Pt+1]-Le[Pt-1])*Oe:void 0),wt.push(Pt>0?(Pi(Ke[Pt-1])+Pi(Ke[Pt]))*ko(de(Ke[Pt-1]),de(Ke[Pt]),.5*de(yt[Pt])):void 0);return[Ke,yt,wt]},O=(Le,Oe,Ke)=>{let yt=Le.length-1,wt=yt*yt;return Pt=>{let pr;Pt>=1?pr=yt-1:pr=Math.max(0,Math.floor(Pt*yt));let Zr=Pt-pr/yt,Mn=Zr*Zr,va=Mn*Zr;return(Oe[pr]+Oe[pr+1]-2*Ke[pr])*wt*va+(3*Ke[pr]-2*Oe[pr]-Oe[pr+1])*yt*Mn+Oe[pr]*Zr+Le[pr]}},ie=Le=>{if(Le.length<3)return At(Le);let Oe=Le.length-1,[Ke,,yt]=y(Le);return yt[0]=Ke[0],yt[Oe]=Ke[Oe-1],O(Le,yt,Ke)},ce=Le=>{if(Le.length<3)return At(Le);let Oe=Le.length-1,[Ke,yt,wt]=y(Le);return yt[0]=(Le[1]*2-Le[0]*1.5-Le[2]*.5)*Oe,yt[Oe]=(Le[Oe]*1.5-Le[Oe-1]*2+Le[Oe-2]*.5)*Oe,wt[0]=yt[0]*Ke[0]<=0?0:de(yt[0])>2*de(Ke[0])?2*Ke[0]:yt[0],wt[Oe]=yt[Oe]*Ke[Oe-1]<=0?0:de(yt[Oe])>2*de(Ke[Oe-1])?2*Ke[Oe-1]:yt[Oe],O(Le,wt,Ke)},_e=Le=>{let Oe=Le.length-1,[Ke,yt,wt]=y(Le);yt[0]=.5*(Le[1]-Le[Oe])*Oe,yt[Oe]=.5*(Le[0]-Le[Oe-1])*Oe;let Pt=(Le[0]-Le[Oe])*Oe,pr=Pt;return wt[0]=(Pi(Pt)+Pi(Ke[0]))*ko(de(Pt),de(Ke[0]),.5*de(yt[0])),wt[Oe]=(Pi(Ke[Oe-1])+Pi(pr))*ko(de(Ke[Oe-1]),de(pr),.5*de(yt[Oe])),O(Le,wt,Ke)},De=(Le=1)=>Le===1?Oe=>Oe:Oe=>Math.pow(Oe,Le),Ne=De,Ye=(Le=2,Oe=1)=>{let Ke=Ne(Oe);if(Le<2)return Le<1?[]:[Ke(.5)];let yt=[];for(let wt=0;wt{let Oe={mode:Le.mode,r:Math.max(0,Math.min(Le.r!==void 0?Le.r:0,1)),g:Math.max(0,Math.min(Le.g!==void 0?Le.g:0,1)),b:Math.max(0,Math.min(Le.b!==void 0?Le.b:0,1))};return Le.alpha!==void 0&&(Oe.alpha=Le.alpha),Oe},Gt=Le=>Ft(ct(Le)),Jt=Le=>Le!==void 0&&(Le.r===void 0||Le.r>=0&&Le.r<=1)&&(Le.g===void 0||Le.g>=0&&Le.g<=1)&&(Le.b===void 0||Le.b>=0&&Le.b<=1);function it(Le){return Jt(ct(Le))}function Rt(Le="rgb"){let{gamut:Oe}=oe(Le);if(!Oe)return yt=>!0;let Ke=P(typeof Oe=="string"?Oe:Le);return yt=>Jt(Ke(yt))}function qt(Le){return Le=B(Le),Le===void 0||it(Le)?Le:P(Le.mode)(Gt(Le))}function or(Le="rgb"){let{gamut:Oe}=oe(Le);if(!Oe)return Pt=>B(Pt);let Ke=typeof Oe=="string"?Oe:Le,yt=P(Ke),wt=Rt(Ke);return Pt=>{let pr=B(Pt);if(!pr)return;let Zr=yt(pr);if(wt(Zr))return pr;let Mn=Ft(Zr);return pr.mode===Mn.mode?Mn:P(pr.mode)(Mn)}}function vr(Le,Oe="lch",Ke="rgb"){Le=B(Le);let yt=Ke==="rgb"?it:Rt(Ke),wt=Ke==="rgb"?Gt:or(Ke);if(Le===void 0||yt(Le))return Le;let Pt=P(Le.mode);Le=P(Oe)(Le);let pr=Qr(Nr({},Le),{c:0});if(!yt(pr))return Pt(wt(pr));let Zr=0,Mn=Le.c!==void 0?Le.c:0,va=oe(Oe).ranges.c,aa=(va[1]-va[0])/Math.pow(2,13),ea=pr.c;for(;Mn-Zr>aa;)pr.c=Zr+(Mn-Zr)*.5,yt(pr)?(ea=pr.c,Zr=pr.c):Mn=pr.c;return Pt(yt(pr)?pr:Qr(Nr({},pr),{c:ea}))}function Ar(Le="rgb",Oe="oklch",Ke=ci("oklch"),yt=.02){let wt=P(Le),Pt=oe(Le);if(!Pt.gamut)return aa=>wt(aa);let pr=Rt(Le),Zr=or(Le),Mn=P(Oe),{ranges:va}=oe(Oe);if(!va.l||!va.c)throw new Error("LCH-like space expected");return aa=>{if(aa=B(aa),aa===void 0)return;let ea=Nr({},Mn(aa));if(ea.l===void 0&&(ea.l=0),ea.c===void 0&&(ea.c=0),ea.l>=va.l[1]){let Ja=Qr(Nr({},Pt.white),{mode:Le});return aa.alpha!==void 0&&(Ja.alpha=aa.alpha),Ja}if(ea.l<=va.l[0]){let Ja=Qr(Nr({},Pt.black),{mode:Le});return aa.alpha!==void 0&&(Ja.alpha=aa.alpha),Ja}if(pr(ea))return wt(ea);let ja=0,ka=ea.c,za=(va.c[1]-va.c[0])/4e3,Ua=Zr(ea);for(;ka-ja>za;)ea.c=(ja+ka)*.5,Ua=Zr(ea),pr(ea)||Ke&&yt>0&&Ke(ea,Ua)<=yt?ja=ea.c:ka=ea.c;return wt(pr(ea)?ea:Ua)}}var dr=(Le,Oe=ci(),Ke=yt=>yt)=>{let yt=Le.map((wt,Pt)=>({color:Ke(wt),i:Pt}));return(wt,Pt=1,pr=1/0)=>(isFinite(Pt)&&(Pt=Math.max(1,Math.min(Pt,yt.length-1))),yt.forEach(Zr=>{Zr.d=Oe(wt,Zr.color)}),yt.sort((Zr,Mn)=>Zr.d-Mn.d).slice(0,Pt).filter(Zr=>Zr.dLe[Zr.i]))},mr=dr,qr=Le=>Math.max(Le,0),Lr=Le=>Math.max(Math.min(Le,1),0),cn=(Le,Oe,Ke)=>Le===void 0||Oe===void 0?void 0:Le+Ke*(Oe-Le),Nn=Le=>{let Oe=1-Lr(Le);return[.393+.607*Oe,.769-.769*Oe,.189-.189*Oe,0,.349-.349*Oe,.686+.314*Oe,.168-.168*Oe,0,.272-.272*Oe,.534-.534*Oe,.131+.869*Oe,0,0,0,0,1]},Dn=Le=>{let Oe=qr(Le);return[.213+.787*Oe,.715-.715*Oe,.072-.072*Oe,0,.213-.213*Oe,.715+.285*Oe,.072-.072*Oe,0,.213-.213*Oe,.715-.715*Oe,.072+.928*Oe,0,0,0,0,1]},qn=Le=>{let Oe=1-Lr(Le);return[.2126+.7874*Oe,.7152-.7152*Oe,.0722-.0722*Oe,0,.2126-.2126*Oe,.7152+.2848*Oe,.0722-.0722*Oe,0,.2126-.2126*Oe,.7152-.7152*Oe,.0722+.9278*Oe,0,0,0,0,1]},_n=Le=>{let Oe=Math.PI*Le/180,Ke=Math.cos(Oe),yt=Math.sin(Oe);return[.213+Ke*.787-yt*.213,.715-Ke*.715-yt*.715,.072-Ke*.072+yt*.928,0,.213-Ke*.213+yt*.143,.715+Ke*.285+yt*.14,.072-Ke*.072-yt*.283,0,.213-Ke*.213-yt*.787,.715-Ke*.715+yt*.715,.072+Ke*.928+yt*.072,0,0,0,0,1]},vn=(Le,Oe,Ke=!1)=>{let yt=P(Oe),wt=oe(Oe).channels;return Pt=>{let pr=yt(Pt);if(!pr)return;let Zr={mode:Oe},Mn,va=wt.length;for(let ea=0;ea{let Ke=qr(Le);return Qe(jt(Ke),Oe,!0)},Tn=(Le=1,Oe="rgb")=>{let Ke=qr(Le);return Qe(jt(Ke,(1-Ke)/2),Oe,!0)},Xn=(Le=1,Oe="rgb")=>vn(Nn(Le),Oe,!0),$n=(Le=1,Oe="rgb")=>vn(Dn(Le),Oe,!0),Ha=(Le=1,Oe="rgb")=>vn(qn(Le),Oe,!0),$a=(Le=1,Oe="rgb")=>{let Ke=Lr(Le);return Qe((yt,wt)=>wt==="alpha"?yt:cn(Ke,1-Ke,yt),Oe,!0)},Si=(Le=0,Oe="rgb")=>vn(_n(Le),Oe,!0),Ma=P("rgb"),xa=[[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]],gi=[[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]],Wa=[[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]],Ya=(Le,Oe)=>{let Ke=Math.max(0,Math.min(1,Oe)),yt=Math.round(Ke/.1),wt=Math.round(Ke%.1),Pt=Le[yt];if(wt>0&&ytFe(Pt[Mn],pr[Mn],wt))}return pr=>{let Zr=B(pr);if(Zr===void 0)return;let{r:Mn,g:va,b:aa}=Ma(Zr),ea={mode:"rgb",r:Pt[0]*Mn+Pt[1]*va+Pt[2]*aa,g:Pt[3]*Mn+Pt[4]*va+Pt[5]*aa,b:Pt[6]*Mn+Pt[7]*va+Pt[8]*aa};return Zr.alpha!==void 0&&(ea.alpha=Zr.alpha),P(Zr.mode)(ea)}},Xa=(Le=1)=>Ya(xa,Le),pi=(Le=1)=>Ya(gi,Le),Xi=(Le=1)=>Ya(Wa,Le),Eo=Le=>Le*Le*(3-2*Le),yi=Le=>.5-Math.sin(Math.asin(1-2*Le)/3),Ui=Le=>Le*Le*Le*(Le*(Le*6-15)+10),fo=Ui,To=Le=>(1-Math.cos(Le*Math.PI))/2,jo=To;function qs(Le){let Oe=P("lrgb")(Le);return .2126*Oe.r+.7152*Oe.g+.0722*Oe.b}function Vs(Le,Oe){let Ke=qs(Le),yt=qs(Oe);return(Math.max(Ke,yt)+.05)/(Math.min(Ke,yt)+.05)}var Uo=ae(Wt),Qs=ae(Fr),os=ae(Io),hs=ae(Oo),ss=ae(wo),ks=ae(Zs),ts=ae(Ji),el=ae(yl),Il=ae(fc),Do=ae(Vu),ru=ae(Pu),Ns=ae(Cl),Nu=ae(If),Vl=ae(ll),Hl=ae(Nc),Co=ae(Pl),is=ae(_c),Hs=ae(ac),fn=ae(_i),la=ae(go),ha=ae(as),ao=ae(ps),ds=ae(Nl),Os=ae(Zu),io=ae(jc),en=ae(_r),dn=ae(Nt),An=ae(Yt),sa=ae(gn),wa=ae(Yi)}}),Ra=Ee({"src/plot_api/plot_config.js"(J,V){"use strict";var v={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},x={};function E(k,l){for(var e in k){var t=k[e];t.valType?l[e]=t.dflt:(l[e]||(l[e]={}),E(t,l[e]))}}E(v,x),V.exports={configAttributes:v,dfltConfig:x}}}),no=Ee({"src/lib/notifier.js"(J,V){"use strict";var v=Hn(),x=mi(),E=[];V.exports=function(k,l,e){var t;if(((t=e?._context)==null?void 0:t.displayNotifier)===!1||E.indexOf(k)!==-1)return;E.push(k);var a=1e3;x(l)?a=l:l==="long"&&(a=3e3);var r=v.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var n=r.selectAll(".notifier-note").data(E);function o(s){s.duration(700).style("opacity",0).each("end",function(c){var m=E.indexOf(c);m!==-1&&E.splice(m,1),v.select(this).remove()})}n.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var c=v.select(this);c.append("button").classed("notifier-close",!0).html("×").on("click",function(){c.transition().call(o)});for(var m=c.append("p"),h=s.split(//g),p=0;p1){var l=["LOG:"];for(k=0;k1){var e=[];for(k=0;k"),"long")}},E.warn=function(){var k;if(v.logging>0){var l=["WARN:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}},E.error=function(){var k;if(v.logging>0){var l=["ERROR:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}}}}),rs=Ee({"src/components/color/attributes.js"(J){"use strict";J.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],J.defaultLine="#444",J.lightLine="#eee",J.background="#fff",J.borderLine="#BEC8D9",J.lightFraction=100*10/11}}),Qa=Ee({"src/components/color/index.js"(J,V){"use strict";var{converter:v,formatHex:x,formatRgb:E,wcagContrast:k,wcagLuminance:l}=Ia(),{isArrayOrTypedArray:e}=vs(),{warn:t}=po(),{background:a,defaultLine:r,defaults:n,lightLine:o}=rs(),s=v("rgb"),c=v("hsl"),m=q=>{if(typeof q!="string")return;let $=q.trim().toLowerCase();if(!/^[0-9a-f]+$/.test($))try{return s($)}catch{return}},h=q=>q>0?q>1?1:q:0,p={mode:"rgb",r:0,g:0,b:0,alpha:1},g=q=>Math.round(q*255e6)/255e6,i=q=>Qr(Nr({},q),{r:g(q.r),g:g(q.g),b:g(q.b)}),w=q=>E(i(q)),S=q=>x(i(q)),M=(q,$)=>{var ee;let ne=m(q);return ne?((ee=ne.alpha)!=null||(ne.alpha=1),ne):(!$&&q!=null&&t(`Invalid color specifier: "${q}". Defaulting to "#000"`),p)},C=q=>w(Qr(Nr({},M(q)),{alpha:1})),_=q=>q?M(q).alpha:0,T=q=>e(q)&&q.length>2&&Number.isFinite(q[0])&&Number.isFinite(q[1])&&Number.isFinite(q[2]),f=q=>{let[$,ee,ne,fe]=q,ye=Math.max($,ee,ne)>1?1/255:1,xe=fe??1;return{mode:"rgb",r:$*ye,g:ee*ye,b:ne*ye,alpha:xe>1?xe/255:xe}},u=(q,$)=>{let ee=T(q)?f(q):M(q,!0),ne=[h(ee.r),h(ee.g),h(ee.b),h(ee.alpha)];return $==="uint8"||$==="uint8_clamped"?Uint8Array.from(ne,fe=>Math.round(fe*255)):$==="float32"?Float32Array.from(ne):$==="float64"?Float64Array.from(ne):ne},A=(q,$)=>w(Qr(Nr({},M(q)),{alpha:h($)})),b=(q,$)=>{let ee=M(q),ne=ee.alpha;if(ne===1)return w(ee);let fe=M($||a),ye=fe.alpha,xe=(Ae,Me)=>(ye===1?Me:1-ye+Me*ye)*(1-ne)+Ae*ne;return w({mode:"rgb",r:xe(ee.r,fe.r),g:xe(ee.g,fe.g),b:xe(ee.b,fe.b)})},z=(q,$,ee)=>{let ne=M(q),fe=M($),ye=(xe,Ae)=>ee*xe+(1-ee)*Ae;return w({mode:"rgb",r:ye(ne.r,fe.r),g:ye(ne.g,fe.g),b:ye(ne.b,fe.b)})},I=(q,$)=>{let ee=M(q),ne=c(ee)||{mode:"hsl",h:0,s:0,l:0};return w(s(Qr(Nr({},ne),{l:h((ne.l*100+$)/100),alpha:ee.alpha})))},N=(q,$)=>k(M(q),M($)),R=q=>N(q,a)>N(q,r),B=w(M(a)),F=w(M(r)),P=(q,$,ee)=>(M(q).alpha!==1&&(q=b(q,a)),R(q)?$?I(q,$):B:ee?I(q,-ee):F),j=(q,$)=>{q.style({stroke:C($),"stroke-opacity":M($).alpha})},U=(q,$)=>{q.style({fill:C($),"fill-opacity":M($).alpha})},Z=(q,$)=>!!(q&&$&&C(q)===C($)),Q=q=>m(q)!==void 0,re=(q,$)=>{$=$===0?0:$||10;let ee=M(q),ne=$/100;return w(Qr(Nr({},ee),{r:h(ee.r+ne),g:h(ee.g+ne),b:h(ee.b+ne)}))},ae=(q,$,ee)=>{let ne=M(q),fe=M($),ye=ee/100,xe=fe.alpha-ne.alpha,Ae=2*ye-1,Me=((Ae*xe===-1?Ae:(Ae+xe)/(1+Ae*xe))+1)/2,Ie=1-Me,Ue=(qe,ke)=>Ie*qe+Me*ke;return w({mode:"rgb",r:Ue(ne.r,fe.r),g:Ue(ne.g,fe.g),b:Ue(ne.b,fe.b),alpha:ne.alpha*(1-ye)+fe.alpha*ye})},oe=(q,$=["#000","#fff"])=>{let ee,ne=-1/0;for(let fe of $){let ye=N(q,fe);ye>ne&&(ne=ye,ee=w(M(fe)))}return ee},H=q=>w(M(q)),X=q=>S(M(q)).toUpperCase(),K=q=>{let $=M(q);return[h($.r)*255,h($.g)*255,h($.b)*255,h($.alpha)]},G=([q,$,ee,ne])=>w({mode:"rgb",r:q/255,g:$/255,b:ee/255,alpha:ne}),Y=q=>{let $=M(q);return l({mode:"rgb",r:h($.r),g:h($.g),b:h($.b)})};V.exports={addOpacity:A,adjustLightness:I,background:a,brighten:re,combine:b,contrast:P,defaultLine:r,defaults:n,equals:Z,fill:U,hexString:X,interpolate:z,isChannelArray:T,isDark:R,isValid:Q,lightLine:o,luminosity:Y,mix:ae,mostReadable:oe,normalize:u,opacity:_,parse:M,rgb:C,rgbaArray:K,rgbaArrayToString:G,rgbaString:H,stroke:j,wcagContrast:N}}}),uh=Ee({"src/components/colorscale/scales.js"(J,V){"use strict";var v=Qa(),x={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},E=x.RdBu;function k(t,a){if(a||(a=E),!t)return a;function r(){try{t=x[t]||JSON.parse(t)}catch{t=a}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),l(t)?t:a}function l(t){var a=0;if(!Array.isArray(t)||t.length<2||!t[0]||!t[t.length-1]||+t[0][0]!=0||+t[t.length-1][0]!=1)return!1;for(var r=0;rdA});function dA(J,V="",v,x){let E=V+(v?"":"$"),k=x===!1?"":"^";return J==="xy"?new RegExp(k+"x"+B0+"y"+B0+E):new RegExp(k+J+B0+E)}var B0,Rp=In({"src/lib/regex.ts"(){"use strict";B0="([2-9]|[1-9][0-9]+)?"}}),vA=Ee({"src/lib/coerce.js"(J){"use strict";var V=mi(),v=vo().extendFlat,x=ia(),E=uh(),k=Qa(),l=gd().DESELECTDIM,e=dl(),t=(Rp(),ra(Sv)).counter,a=(Vd(),ra(lh)).modHalf,r=vs().isArrayOrTypedArray,n=vs().isTypedArraySpec,o=vs().decodeTypedArraySpec;J.valObjectMeta={data_array:{coerceFunction:function(c,m,h){m.set(r(c)?c:n(c)?o(c):h)}},enumerated:{coerceFunction:function(c,m,h,p){p.coerceNumber&&(c=+c),p.values.indexOf(c)===-1?m.set(h):m.set(c)},validateFunction:function(c,m){m.coerceNumber&&(c=+c);for(var h=m.values,p=0;pi===!0||i===!1;g(c)||p.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(g)?m.set(c):m.set(h)}},number:{coerceFunction:function(c,m,h,p){n(c)&&(c=o(c)),!V(c)||p.min!==void 0&&cp.max?m.set(h):m.set(+c)}},integer:{coerceFunction:function(c,m,h,p){if((p.extras||[]).indexOf(c)!==-1){m.set(c);return}n(c)&&(c=o(c)),c%1||!V(c)||p.min!==void 0&&cp.max?m.set(h):m.set(+c)}},string:{coerceFunction:function(c,m,h,p){if(typeof c!="string"){var g=typeof c=="number";p.strict===!0||!g?m.set(h):m.set(String(c))}else p.noBlank&&!c?m.set(h):m.set(c)}},color:{coerceFunction:function(c,m,h){n(c)&&(c=o(c)),k.isValid(c)?m.set(c):m.set(h)}},colorlist:{coerceFunction:function(c,m,h){!Array.isArray(c)||!c.length?m.set(h):c.every(p=>k.isValid(p))?m.set(c):m.set(h)}},colorscale:{coerceFunction:function(c,m,h){m.set(E.get(c,h))}},angle:{coerceFunction:function(c,m,h){n(c)&&(c=o(c)),c==="auto"?m.set("auto"):V(c)?m.set(a(+c,360)):m.set(h)}},subplotid:{coerceFunction:function(c,m,h,p){var g=p.regex||t(h);let i=w=>typeof w=="string"&&g.test(w);i(c)||p.arrayOk&&r(c)&&c.length>0&&c.every(i)?m.set(c):m.set(h)},validateFunction:function(c,m){var h=m.dflt;return c===h?!0:typeof c!="string"?!1:!!t(h).test(c)}},flaglist:{coerceFunction:function(c,m,h,p){if((p.extras||[]).indexOf(c)!==-1){m.set(c);return}if(typeof c!="string"){m.set(h);return}for(var g=c.split("+"),i=0;iNr({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.texttemplateAttrs=({editType:k="calc",arrayOk:l}={},e={})=>Nr({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.shapeTexttemplateAttrs=({editType:k="arraydraw",newshape:l}={},e={})=>({valType:"string",dflt:"",editType:k}),J.templatefallbackAttrs=({editType:k="none"}={})=>({valType:"any",dflt:"-",editType:k})}}),Cg=Ee({"src/components/shapes/label_texttemplate.js"(J,V){"use strict";function v(M,C){return C?C.d2l(M):M}function x(M,C){return C?C.l2d(M):M}function E(M){return M.x0}function k(M){return M.x1}function l(M){return M.y0}function e(M){return M.y1}function t(M){return M.x0shift||0}function a(M){return M.x1shift||0}function r(M){return M.y0shift||0}function n(M){return M.y1shift||0}function o(M,C){return v(M.x1,C)+a(M)-v(M.x0,C)-t(M)}function s(M,C,_){return v(M.y1,_)+n(M)-v(M.y0,_)-r(M)}function c(M,C){return Math.abs(o(M,C))}function m(M,C,_){return Math.abs(s(M,C,_))}function h(M,C,_){return M.type!=="line"?void 0:Math.sqrt(Math.pow(o(M,C),2)+Math.pow(s(M,C,_),2))}function p(M,C){return x((v(M.x1,C)+a(M)+v(M.x0,C)+t(M))/2,C)}function g(M,C,_){return x((v(M.y1,_)+n(M)+v(M.y0,_)+r(M))/2,_)}function i(M,C,_){return M.type!=="line"?void 0:s(M,C,_)/o(M,C)}var w=["x0","x1","y0","y1","dy","height","ycenter"],S=["x0","x1","y0","y1","dx","width","xcenter"];V.exports={x0:E,x1:k,y0:l,y1:e,slope:i,dx:o,dy:s,width:c,height:m,length:h,xcenter:p,ycenter:g,simpleXVariables:w,simpleYVariables:S}}}),VA=Ee({"src/components/shapes/draw_newshape/attributes.js"(J,V){"use strict";var v=El().overrideAll,x=ia(),E=Xs(),k=kc().dash,l=vo().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:t}=Cs(),a=Cg();V.exports=v({newshape:{visible:l({},x.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:l({},x.legend,{}),legendgroup:l({},x.legendgroup,{}),legendgrouptitle:{text:l({},x.legendgrouptitle.text,{}),font:E({})},legendrank:l({},x.legendrank,{}),legendwidth:l({},x.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:l({},k,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:l({},x.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(a)}),texttemplatefallback:t({editType:"arraydraw"}),font:E({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),HA=Ee({"src/components/selections/draw_newselection/attributes.js"(J,V){"use strict";var v=kc().dash,x=vo().extendFlat;V.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:x({},v,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),Lg=Ee({"src/plots/pad_attributes.js"(J,V){"use strict";V.exports=function(v){var x=v.editType;return{t:{valType:"number",dflt:0,editType:x},r:{valType:"number",dflt:0,editType:x},b:{valType:"number",dflt:0,editType:x},l:{valType:"number",dflt:0,editType:x},editType:x}}}}),Fp=Ee({"src/plots/layout_attributes.js"(J,V){"use strict";var v=Xs(),x=O0(),E=rs(),k=VA(),l=HA(),e=Lg(),t=vo().extendFlat,a=v({editType:"calc"});a.family.dflt='"Open Sans", verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=E.defaultLine,V.exports={font:a,title:{text:{valType:"string",editType:"layoutstyle"},font:v({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:v({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:t(e({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:E.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:E.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:E.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:k.newshape,activeshape:k.activeshape,newselection:l.newselection,activeselection:l.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:t({},x.transition,{editType:"none"})}}}),GA=Ee({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var J=document.createElement("style");J.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",J.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(J)}})()}}),Ri=Ee({"src/registry.js"(J){"use strict";var V=po(),v=Eg(),x=vb(),E=N0().addStyleRule,k=vo(),l=ia(),e=Fp(),t=k.extendFlat,a=k.extendDeepAll;J.modules={},J.allCategories={},J.allTypes=[],J.subplotsRegistry={},J.componentsRegistry={},J.layoutArrayContainers=[],J.layoutArrayRegexes=[],J.traceLayoutAttributes={},J.localeRegistry={},J.apiMethodRegistry={},J.collectableSubplotTypes=null,J.register=function(i){if(J.collectableSubplotTypes=null,i)i&&!Array.isArray(i)&&(i=[i]);else throw new Error("No argument passed to Plotly.register.");for(var w=0;w=i&&R<=w?R:l}if(typeof R!="string"&&typeof R!="number")return l;R=String(R);var U=p(B),Z=R.charAt(0);U&&(Z==="G"||Z==="g")&&(R=R.slice(1),B="");var Q=U&&B.slice(0,7)==="chinese",re=R.match(Q?m:c);if(!re)return l;var ae=re[1],oe=re[3]||"1",H=Number(re[5]||1),X=Number(re[7]||0),K=Number(re[9]||0),G=Number(re[11]||0);if(U){if(ae.length===2)return l;ae=Number(ae);var Y;try{var q=o.getComponentMethod("calendars","getCal")(B);if(Q){var $=oe.charAt(oe.length-1)==="i";oe=parseInt(oe,10),Y=q.newDate(ae,q.toMonthIndex(ae,oe,$),H)}else Y=q.newDate(ae,Number(oe),H)}catch{return l}return Y?(Y.toJD()-n)*e+X*t+K*a+G*r:l}ae.length===2?ae=(Number(ae)+2e3-h)%100+h:ae=Number(ae),oe-=1;var ee=new Date(Date.UTC(2e3,oe,H,X,K));return ee.setUTCFullYear(ae),ee.getUTCMonth()!==oe||ee.getUTCDate()!==H?l:ee.getTime()+G*r},i=J.MIN_MS=J.dateTime2ms("-9999"),w=J.MAX_MS=J.dateTime2ms("9999-12-31 23:59:59.9999"),J.isDateTime=function(R,B){return J.dateTime2ms(R,B)!==l};function S(R,B){return String(R+Math.pow(10,B)).slice(1)}var M=90*e,C=3*t,_=5*a;J.ms2DateTime=function(R,B,F){if(typeof R!="number"||!(R>=i&&R<=w))return l;B||(B=0);var P=Math.floor(E(R+.05,1)*10),j=Math.round(R-P/10),U,Z,Q,re,ae,oe;if(p(F)){var H=Math.floor(j/e)+n,X=Math.floor(E(R,e));try{U=o.getComponentMethod("calendars","getCal")(F).fromJD(H).formatDate("yyyy-mm-dd")}catch{U=s("G%Y-%m-%d")(new Date(j))}if(U.charAt(0)==="-")for(;U.length<11;)U="-0"+U.slice(1);else for(;U.length<10;)U="0"+U;Z=B=i+e&&R<=w-e))return l;var B=Math.floor(E(R+.05,1)*10),F=new Date(Math.round(R-B/10)),P=V("%Y-%m-%d")(F),j=F.getHours(),U=F.getMinutes(),Z=F.getSeconds(),Q=F.getUTCMilliseconds()*10+B;return T(P,j,U,Z,Q)};function T(R,B,F,P,j){if((B||F||P||j)&&(R+=" "+S(B,2)+":"+S(F,2),(P||j)&&(R+=":"+S(P,2),j))){for(var U=4;j%10===0;)U-=1,j/=10;R+="."+S(j,U)}return R}J.cleanDate=function(R,B,F){if(R===l)return B;if(J.isJSDate(R)||typeof R=="number"&&isFinite(R)){if(p(F))return x.error("JS Dates and milliseconds are incompatible with world calendars",R),B;if(R=J.ms2DateTimeLocal(+R),!R&&B!==void 0)return B}else if(!J.isDateTime(R,F))return x.error("unrecognized date",R),B;return R};var f=/%\d?f/g,u=/%h/g,A={1:"1",2:"1",3:"2",4:"2"};function b(R,B,F,P){R=R.replace(f,function(U){var Z=Math.min(+U.charAt(1)||6,6),Q=(B/1e3%1+2).toFixed(Z).slice(2).replace(/0+$/,"")||"0";return Q});var j=new Date(Math.floor(B+.05));if(R=R.replace(u,function(){return A[F("%q")(j)]}),p(P))try{R=o.getComponentMethod("calendars","worldCalFmt")(R,B,P)}catch{return"Invalid"}return F(R)(j)}var z=[59,59.9,59.99,59.999,59.9999];function I(R,B){var F=E(R+.05,e),P=S(Math.floor(F/t),2)+":"+S(E(Math.floor(F/a),60),2);if(B!=="M"){v(B)||(B=0);var j=Math.min(E(R/r,60),z[B]),U=(100+j).toFixed(B).slice(1);B>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),P+=":"+U}return P}J.formatDate=function(R,B,F,P,j,U){if(j=p(j)&&j,!B)if(F==="y")B=U.year;else if(F==="m")B=U.month;else if(F==="d")B=U.dayMonth+` +`||Oe[q]===" "||Oe[q]===" ");)q++;continue}if(yt===",")return;if(yt===")"){Ke.push({type:X.ParenClose});continue}if(yt==="+"){if(q--,W(Oe)){Ke.push(fe(Oe));continue}return}if(yt==="-"){if(q--,W(Oe)){Ke.push(fe(Oe));continue}if(ee(Oe)){Ke.push({type:X.Ident,value:xe(Oe)});continue}return}if(yt==="."){if(q--,W(Oe)){Ke.push(fe(Oe));continue}return}if(yt==="/"){for(;q4)){if(Ke.length===4){if(Ke[3].type!==X.Alpha)return;Ke[3]=Ke[3].value}return Ke.length===3&&Ke.push({type:X.None,value:void 0}),Ke.every(wt=>wt.type!==X.Alpha)?Ke:void 0}}function je(Le,Oe){Le._i=0;let Ke=Le[Le._i++];if(!Ke||Ke.type!==X.Function)return;let yt=qe(Le,Oe);if(yt)return yt.unshift(Ke.value),yt}var ke=Le=>{if(typeof Le!="string")return;let Oe=Me(Le),Ke=Oe?je(Oe,!0):void 0,yt,wt=0,Pt=Z.length;for(;wtLe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Te=se,Fe=(Le,Oe,Ke)=>Le+Ke*(Oe-Le),We=(Le,Oe,Ke)=>(Ke-Le)/(Oe-Le),Ge=(Le,Oe,Ke,yt,wt,Pt)=>Fe(Fe(Le,Oe,wt),Fe(Ke,yt,wt),Pt),gt=(Le,Oe,Ke,yt,wt,Pt,pr,Zr,Aa,vn,an)=>Fe(Ge(Le,Oe,Ke,yt,Aa,vn),Ge(wt,Pt,pr,Zr,Aa,vn),an),mt=Le=>{let Oe=[];for(let Ke=0;KeOe=>{let Ke=mt(Oe);return yt=>{let wt=yt*Ke.length,Pt=yt>=1?Ke.length-1:Math.max(Math.floor(wt),0),pr=Ke[Pt];return pr===void 0?void 0:Le(pr[0],pr[1],wt-Pt)}},At=Tt(Fe),Kt=Le=>{let Oe=!1,Ke=Le.map(yt=>yt!==void 0?(Oe=!0,yt):1);return Oe?Ke:Le},ar={mode:"rgb",channels:["r","g","b","alpha"],parse:[ve,m,N,g,Te,"srgb"],serialize:"srgb",interpolate:{r:At,g:At,b:At,alpha:{use:At,fixup:Kt}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},_r=ar,Zt=(Le=0)=>Math.pow(Math.abs(Le),563/256)*Math.sign(Le),sr=Le=>{let Oe=Zt(Le.r),Ke=Zt(Le.g),yt=Zt(Le.b),wt={mode:"xyz65",x:.5766690429101305*Oe+.1855582379065463*Ke+.1882286462349947*yt,y:.297344975250536*Oe+.6273635662554661*Ke+.0752914584939979*yt,z:.0270313613864123*Oe+.0706888525358272*Ke+.9913375368376386*yt};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Ot=sr,vt=Le=>Math.pow(Math.abs(Le),256/563)*Math.sign(Le),ht=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"a98",r:vt(Le*2.0415879038107465-Oe*.5650069742788597-.3447313507783297*Ke),g:vt(Le*-.9692436362808798+Oe*1.8759675015077206+.0415550574071756*Ke),b:vt(Le*.0134442806320312-Oe*.1183623922310184+1.0151749943912058*Ke)};return yt!==void 0&&(wt.alpha=yt),wt},Re=ht,Be=(Le=0)=>{let Oe=Math.abs(Le);return Oe<=.04045?Le/12.92:(Math.sign(Le)||1)*Math.pow((Oe+.055)/1.055,2.4)},He=({r:Le,g:Oe,b:Ke,alpha:yt})=>{let wt={mode:"lrgb",r:Be(Le),g:Be(Oe),b:Be(Ke)};return yt!==void 0&&(wt.alpha=yt),wt},$e=He,Ze=Le=>{let{r:Oe,g:Ke,b:yt,alpha:wt}=$e(Le),Pt={mode:"xyz65",x:.4123907992659593*Oe+.357584339383878*Ke+.1804807884018343*yt,y:.2126390058715102*Oe+.715168678767756*Ke+.0721923153607337*yt,z:.0193308187155918*Oe+.119194779794626*Ke+.9505321522496607*yt};return wt!==void 0&&(Pt.alpha=wt),Pt},Je=Ze,Mt=(Le=0)=>{let Oe=Math.abs(Le);return Oe>.0031308?(Math.sign(Le)||1)*(1.055*Math.pow(Oe,1/2.4)-.055):Le*12.92},dt=({r:Le,g:Oe,b:Ke,alpha:yt},wt="rgb")=>{let Pt={mode:wt,r:Mt(Le),g:Mt(Oe),b:Mt(Ke)};return yt!==void 0&&(Pt.alpha=yt),Pt},Dt=dt,Ct=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Dt({r:Le*3.2409699419045226-Oe*1.537383177570094-.4986107602930034*Ke,g:Le*-.9692436362808796+Oe*1.8759675015077204+.0415550574071756*Ke,b:Le*.0556300796969936-Oe*.2039769588889765+1.0569715142428784*Ke});return yt!==void 0&&(wt.alpha=yt),wt},Vt=Ct,Ht=Qr(Nr({},_r),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:Le=>Re(Je(Le)),xyz65:Re},toMode:{rgb:Le=>Vt(Ot(Le)),xyz65:Ot}}),Wt=Ht,Sr=Le=>(Le=Le%360)<0?Le+360:Le,ia=Sr,$t=(Le,Oe)=>Le.map((Ke,yt,wt)=>{if(Ke===void 0)return Ke;let Pt=ia(Ke);return yt===0||Le[yt-1]===void 0?Pt:Oe(Pt-ia(wt[yt-1]))}).reduce((Ke,yt)=>!Ke.length||yt===void 0||Ke[Ke.length-1]===void 0?(Ke.push(yt),Ke):(Ke.push(yt+Ke[Ke.length-1]),Ke),[]),It=Le=>$t(Le,Oe=>Math.abs(Oe)<=180?Oe:Oe-360*Math.sign(Oe)),ir=Le=>$t(Le,Oe=>Math.abs(Oe)>=180||Oe===0?Oe:Oe-360*Math.sign(Oe)),cr=Le=>$t(Le,Oe=>Oe>=0?Oe:Oe+360),fr=Le=>$t(Le,Oe=>Oe<=0?Oe:Oe-360),Ir=[-.14861,1.78277,-.29227,-.90649,1.97294,0],sa=Math.PI/180,aa=180/Math.PI,xa=Ir[3]*Ir[4],ja=Ir[1]*Ir[4],Oa=Ir[1]*Ir[2]-Ir[0]*Ir[3],An=({r:Le,g:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=(Oa*Ke+Le*xa-Oe*ja)/(Oa+xa-ja),Pt=Ke-wt,pr=(Ir[4]*(Oe-wt)-Ir[2]*Pt)/Ir[3],Zr={mode:"cubehelix",l:wt,s:wt===0||wt===1?void 0:Math.sqrt(Pt*Pt+pr*pr)/(Ir[4]*wt*(1-wt))};return Zr.s&&(Zr.h=Math.atan2(pr,Pt)*aa-120),yt!==void 0&&(Zr.alpha=yt),Zr},un=An,Ja=({h:Le,s:Oe,l:Ke,alpha:yt})=>{let wt={mode:"rgb"};Le=(Le===void 0?0:Le+120)*sa,Ke===void 0&&(Ke=0);let Pt=Oe===void 0?0:Oe*Ke*(1-Ke),pr=Math.cos(Le),Zr=Math.sin(Le);return wt.r=Ke+Pt*(Ir[0]*pr+Ir[1]*Zr),wt.g=Ke+Pt*(Ir[2]*pr+Ir[3]*Zr),wt.b=Ke+Pt*(Ir[4]*pr+Ir[5]*Zr),yt!==void 0&&(wt.alpha=yt),wt},ei=Ja,Fn=(Le,Oe)=>{if(Le.h===void 0||Oe.h===void 0||!Le.s||!Oe.s)return 0;let Ke=ia(Le.h),yt=ia(Oe.h),wt=Math.sin((yt-Ke+360)/2*Math.PI/180);return 2*Math.sqrt(Le.s*Oe.s)*wt},ni=(Le,Oe)=>{if(Le.h===void 0||Oe.h===void 0)return 0;let Ke=ia(Le.h),yt=ia(Oe.h);return Math.abs(yt-Ke)>180?Ke-(yt-360*Math.sign(yt-Ke)):yt-Ke},Mi=(Le,Oe)=>{if(Le.h===void 0||Oe.h===void 0||!Le.c||!Oe.c)return 0;let Ke=ia(Le.h),yt=ia(Oe.h),wt=Math.sin((yt-Ke+360)/2*Math.PI/180);return 2*Math.sqrt(Le.c*Oe.c)*wt},ci=(Le="rgb",Oe=[1,1,1,0])=>{let Ke=oe(Le),yt=Ke.channels,wt=Ke.difference,Pt=P(Le);return(pr,Zr)=>{let Aa=Pt(pr),vn=Pt(Zr);return Math.sqrt(yt.reduce((an,Qa,jn)=>{let kn=wt[Qa]?wt[Qa](Aa,vn):Aa[Qa]-vn[Qa];return an+(Oe[jn]||0)*Math.pow(isNaN(kn)?0:kn,2)},0))}},bn=()=>ci("lab65"),pn=(Le=1,Oe=.045,Ke=.015)=>{let yt=P("lab65");return(wt,Pt)=>{let pr=yt(wt),Zr=yt(Pt),Aa=pr.l,vn=pr.a,an=pr.b,Qa=Math.sqrt(vn*vn+an*an),jn=Zr.l,kn=Zr.a,zn=Zr.b,Un=Math.sqrt(kn*kn+zn*zn),Jn=Math.pow(Aa-jn,2),hi=Math.pow(Qa-Un,2),Ki=Math.pow(vn-kn,2)+Math.pow(an-zn,2)-hi;return Math.sqrt(Jn/Math.pow(Le,2)+hi/Math.pow(1+Oe*Qa,2)+Ki/Math.pow(1+Ke*Qa,2))}},Ii=(Le=1,Oe=1,Ke=1)=>{let yt=P("lab65");return(wt,Pt)=>{let pr=yt(wt),Zr=yt(Pt),Aa=pr.l,vn=pr.a,an=pr.b,Qa=Math.sqrt(vn*vn+an*an),jn=Zr.l,kn=Zr.a,zn=Zr.b,Un=Math.sqrt(kn*kn+zn*zn),Jn=(Qa+Un)/2,hi=.5*(1-Math.sqrt(Math.pow(Jn,7)/(Math.pow(Jn,7)+Math.pow(25,7)))),Ki=vn*(1+hi),Qo=kn*(1+hi),Ds=Math.sqrt(Ki*Ki+an*an),ys=Math.sqrt(Qo*Qo+zn*zn),Gl=Math.abs(Ki)+Math.abs(an)===0?0:Math.atan2(an,Ki);Gl+=(Gl<0)*2*Math.PI;let au=Math.abs(Qo)+Math.abs(zn)===0?0:Math.atan2(zn,Qo);au+=(au<0)*2*Math.PI;let Au=jn-Aa,zf=ys-Ds,Gf=Ds*ys===0?0:au-Gl;Gf-=(Gf>Math.PI)*2*Math.PI,Gf+=(Gf<-Math.PI)*2*Math.PI;let dh=2*Math.sqrt(Ds*ys)*Math.sin(Gf/2),ed=(Aa+jn)/2,Oh=(Ds+ys)/2,Bf;Ds*ys===0?Bf=Gl+au:(Bf=(Gl+au)/2,Bf-=(Math.abs(Gl-au)>Math.PI)*Math.PI,Bf+=(Bf<0)*2*Math.PI);let fv=Math.pow(ed-50,2),kd=1-.17*Math.cos(Bf-Math.PI/6)+.24*Math.cos(2*Bf)+.32*Math.cos(3*Bf+Math.PI/30)-.2*Math.cos(4*Bf-63*Math.PI/180),Cd=1+.015*fv/Math.sqrt(20+fv),Ld=1+.045*Oh,Pd=1+.015*Oh*kd,f0=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*Bf-275)/25,2)),rp=2*Math.sqrt(Math.pow(Oh,7)/(Math.pow(Oh,7)+Math.pow(25,7))),jh=-1*Math.sin(2*f0)*rp;return Math.sqrt(Math.pow(Au/(Le*Cd),2)+Math.pow(zf/(Oe*Ld),2)+Math.pow(dh/(Ke*Pd),2)+jh*zf/(Oe*Ld)*dh/(Ke*Pd))}},ho=(Le=1,Oe=1)=>{let Ke=P("lab65");return(yt,wt)=>{let Pt=Ke(yt),pr=Pt.l,Zr=Pt.a,Aa=Pt.b,vn=Math.sqrt(Zr*Zr+Aa*Aa),an=Math.atan2(Aa,Zr);an=an+2*Math.PI*(an<0);let Qa=Ke(wt),jn=Qa.l,kn=Qa.a,zn=Qa.b,Un=Math.sqrt(kn*kn+zn*zn),Jn=Math.pow(pr-jn,2),hi=Math.pow(vn-Un,2),Ki=Math.pow(Zr-kn,2)+Math.pow(Aa-zn,2)-hi,Qo=Math.sqrt(Math.pow(vn,4)/(Math.pow(vn,4)+1900)),Ds=an>=164/180*Math.PI&&an<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(an+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(an+35/180*Math.PI)),ys=pr<16?.511:.040975*pr/(1+.01765*pr),Gl=.0638*vn/(1+.0131*vn)+.638,au=Gl*(Qo*Ds+1-Qo);return Math.sqrt(Jn/Math.pow(Le*ys,2)+hi/Math.pow(Oe*Gl,2)+Ki/Math.pow(au,2))}},dn=()=>{let Le=P("lab65");return(Oe,Ke)=>{let yt=Le(Oe),wt=Le(Ke),Pt=yt.l-wt.l,pr=yt.a-wt.a,Zr=yt.b-wt.b;return Math.abs(Pt)+Math.sqrt(pr*pr+Zr*Zr)}},Za=()=>ci("yiq",[.5053,.299,.1957]),ot=()=>ci("itp",[518400,129600,518400]),et=Le=>{let Oe=Le.reduce((yt,wt)=>{if(wt!==void 0){let Pt=wt*Math.PI/180;yt.sin+=Math.sin(Pt),yt.cos+=Math.cos(Pt)}return yt},{sin:0,cos:0}),Ke=Math.atan2(Oe.sin,Oe.cos)*180/Math.PI;return Ke<0?360+Ke:Ke},hr=Le=>{let Oe=Le.filter(Ke=>Ke!==void 0);return Oe.length?Oe.reduce((Ke,yt)=>Ke+yt,0)/Oe.length:void 0},ur=Le=>typeof Le=="function";function Tr(Le,Oe="rgb",Ke){let yt=oe(Oe),wt=Le.map(P(Oe));return yt.channels.reduce((Pt,pr)=>{let Zr=wt.map(Aa=>Aa[pr]).filter(Aa=>Aa!==void 0);if(Zr.length){let Aa;ur(Ke)?Aa=Ke:Ke&&ur(Ke[pr])?Aa=Ke[pr]:yt.average&&ur(yt.average[pr])?Aa=yt.average[pr]:Aa=hr,Pt[pr]=Aa(Zr,pr)}return Pt},{mode:Oe})}var Rr={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:un},toMode:{rgb:ei},interpolate:{h:{use:At,fixup:It},s:At,l:At,alpha:{use:At,fixup:Kt}},difference:{h:Fn},average:{h:et}},Fr=Rr,nt=({l:Le,a:Oe,b:Ke,alpha:yt},wt="lch")=>{Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let Pt=Math.sqrt(Oe*Oe+Ke*Ke),pr={mode:wt,l:Le,c:Pt};return Pt&&(pr.h=ia(Math.atan2(Ke,Oe)*180/Math.PI)),yt!==void 0&&(pr.alpha=yt),pr},kt=nt,Ut=({l:Le,c:Oe,h:Ke,alpha:yt},wt="lab")=>{Ke===void 0&&(Ke=0);let Pt={mode:wt,l:Le,a:Oe?Oe*Math.cos(Ke/180*Math.PI):0,b:Oe?Oe*Math.sin(Ke/180*Math.PI):0};return yt!==void 0&&(Pt.alpha=yt),Pt},nr=Ut,Er=Math.pow(29,3)/Math.pow(3,3),br=Math.pow(6,3)/Math.pow(29,3),Or={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Pr={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},fa=Math.pow(29,3)/Math.pow(3,3),Fa=Math.pow(6,3)/Math.pow(29,3),La=Le=>Math.pow(Le,3)>br?Math.pow(Le,3):(116*Le-16)/Er,Cn=({l:Le,a:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=(Le+16)/116,Pt=Oe/500+wt,pr=wt-Ke/200,Zr={mode:"xyz65",x:La(Pt)*Pr.X,y:La(wt)*Pr.Y,z:La(pr)*Pr.Z};return yt!==void 0&&(Zr.alpha=yt),Zr},mn=Cn,bi=Le=>Vt(mn(Le)),gn=bi,eo=Le=>Le>br?Math.cbrt(Le):(Er*Le+16)/116,si=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=eo(Le/Pr.X),Pt=eo(Oe/Pr.Y),pr=eo(Ke/Pr.Z),Zr={mode:"lab65",l:116*Pt-16,a:500*(wt-Pt),b:200*(Pt-pr)};return yt!==void 0&&(Zr.alpha=yt),Zr},Ao=si,ro=Le=>{let Oe=Ao(Je(Le));return Le.r===Le.b&&Le.b===Le.g&&(Oe.a=Oe.b=0),Oe},Sn=ro,Gi=1,ti=1,fi=26/180*Math.PI,xo=Math.cos(fi),zi=Math.sin(fi),so=100/Math.log(139/100),Mo=({l:Le,c:Oe,h:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"lab65",l:(Math.exp(Le*Gi/so)-1)/.0039},Pt=(Math.exp(.0435*Oe*ti*Gi)-1)/.075,pr=Pt*Math.cos(Ke/180*Math.PI-fi),Zr=Pt*Math.sin(Ke/180*Math.PI-fi);return wt.a=pr*xo-Zr/.83*zi,wt.b=pr*zi+Zr/.83*xo,yt!==void 0&&(wt.alpha=yt),wt},So=Mo,oi=({l:Le,a:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Oe*xo+Ke*zi,Pt=.83*(Ke*xo-Oe*zi),pr=Math.sqrt(wt*wt+Pt*Pt),Zr={mode:"dlch",l:so/Gi*Math.log(1+.0039*Le),c:Math.log(1+.075*pr)/(.0435*ti*Gi)};return Zr.c&&(Zr.h=ia((Math.atan2(Pt,wt)+fi)/Math.PI*180)),yt!==void 0&&(Zr.alpha=yt),Zr},ii=oi,co=Le=>So(kt(Le,"dlch")),Wi=Le=>nr(ii(Le),"dlab"),Ho={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:co,rgb:Le=>gn(co(Le))},fromMode:{lab65:Wi,rgb:Le=>Wi(Sn(Le))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:Kt}}},Io=Ho,qo={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:So,dlab:Le=>nr(Le,"dlab"),rgb:Le=>gn(So(Le))},fromMode:{lab65:ii,dlab:Le=>kt(Le,"dlch"),rgb:Le=>ii(Sn(Le))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:At,c:At,h:{use:At,fixup:It},alpha:{use:At,fixup:Kt}},difference:{h:Mi},average:{h:et}},Oo=qo;function ws({h:Le,s:Oe,i:Ke,alpha:yt}){Le=ia(Le!==void 0?Le:0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.abs(Le/60%2-1),Pt;switch(Math.floor(Le/60)){case 0:Pt={r:Ke*(1+Oe*(3/(2-wt)-1)),g:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1)),b:Ke*(1-Oe)};break;case 1:Pt={r:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1)),g:Ke*(1+Oe*(3/(2-wt)-1)),b:Ke*(1-Oe)};break;case 2:Pt={r:Ke*(1-Oe),g:Ke*(1+Oe*(3/(2-wt)-1)),b:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1))};break;case 3:Pt={r:Ke*(1-Oe),g:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1)),b:Ke*(1+Oe*(3/(2-wt)-1))};break;case 4:Pt={r:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1)),g:Ke*(1-Oe),b:Ke*(1+Oe*(3/(2-wt)-1))};break;case 5:Pt={r:Ke*(1+Oe*(3/(2-wt)-1)),g:Ke*(1-Oe),b:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1))};break;default:Pt={r:Ke*(1-Oe),g:Ke*(1-Oe),b:Ke*(1-Oe)}}return Pt.mode="rgb",yt!==void 0&&(Pt.alpha=yt),Pt}function Ko({r:Le,g:Oe,b:Ke,alpha:yt}){Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.max(Le,Oe,Ke),Pt=Math.min(Le,Oe,Ke),pr={mode:"hsi",s:Le+Oe+Ke===0?0:1-3*Pt/(Le+Oe+Ke),i:(Le+Oe+Ke)/3};return wt-Pt!==0&&(pr.h=(wt===Le?(Oe-Ke)/(wt-Pt)+(Oe{switch(Oe){case"deg":return+Le;case"rad":return Le/Math.PI*180;case"grad":return Le/10*9;case"turn":return Le*360}},Go=lo,go=new RegExp(`^hsla?\\(\\s*${w}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),us=Le=>{let Oe=Le.match(go);if(!Oe)return;let Ke={mode:"hsl"};return Oe[3]!==void 0?Ke.h=+Oe[3]:Oe[1]!==void 0&&Oe[2]!==void 0&&(Ke.h=Go(Oe[1],Oe[2])),Oe[4]!==void 0&&(Ke.s=Math.min(Math.max(0,Oe[4]/100),1)),Oe[5]!==void 0&&(Ke.l=Math.min(Math.max(0,Oe[5]/100),1)),Oe[6]!==void 0?Ke.alpha=Math.max(0,Math.min(1,Oe[6]/100)):Oe[7]!==void 0&&(Ke.alpha=Math.max(0,Math.min(1,+Oe[7]))),Ke},Jo=us;function zs(Le,Oe){if(!Oe||Oe[0]!=="hsl"&&Oe[0]!=="hsla")return;let Ke={mode:"hsl"},[,yt,wt,Pt,pr]=Oe;if(yt.type!==X.None){if(yt.type===X.Percentage)return;Ke.h=yt.value}if(wt.type!==X.None){if(wt.type===X.Hue)return;Ke.s=wt.value/100}if(Pt.type!==X.None){if(Pt.type===X.Hue)return;Ke.l=Pt.value/100}return pr.type!==X.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===X.Number?pr.value:pr.value/100))),Ke}var Is=zs,es={mode:"hsl",toMode:{rgb:No},fromMode:{rgb:Di},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Is,Jo],serialize:Le=>`hsl(${Le.h!==void 0?Le.h:"none"} ${Le.s!==void 0?Le.s*100+"%":"none"} ${Le.l!==void 0?Le.l*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:It},s:At,l:At,alpha:{use:At,fixup:Kt}},difference:{h:Fn},average:{h:et}},Zs=es;function Ps({h:Le,s:Oe,v:Ke,alpha:yt}){Le=ia(Le!==void 0?Le:0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.abs(Le/60%2-1),Pt;switch(Math.floor(Le/60)){case 0:Pt={r:Ke,g:Ke*(1-Oe*wt),b:Ke*(1-Oe)};break;case 1:Pt={r:Ke*(1-Oe*wt),g:Ke,b:Ke*(1-Oe)};break;case 2:Pt={r:Ke*(1-Oe),g:Ke,b:Ke*(1-Oe*wt)};break;case 3:Pt={r:Ke*(1-Oe),g:Ke*(1-Oe*wt),b:Ke};break;case 4:Pt={r:Ke*(1-Oe*wt),g:Ke*(1-Oe),b:Ke};break;case 5:Pt={r:Ke,g:Ke*(1-Oe),b:Ke*(1-Oe*wt)};break;default:Pt={r:Ke*(1-Oe),g:Ke*(1-Oe),b:Ke*(1-Oe)}}return Pt.mode="rgb",yt!==void 0&&(Pt.alpha=yt),Pt}function $o({r:Le,g:Oe,b:Ke,alpha:yt}){Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.max(Le,Oe,Ke),Pt=Math.min(Le,Oe,Ke),pr={mode:"hsv",s:wt===0?0:1-Pt/wt,v:wt};return wt-Pt!==0&&(pr.h=(wt===Le?(Oe-Ke)/(wt-Pt)+(Oe1){let wt=Oe+Ke;Oe/=wt,Ke/=wt}return Ps({h:Le,s:Ke===1?1:1-Oe/(1-Ke),v:1-Ke,alpha:yt})}function Ls(Le){let Oe=$o(Le);if(Oe===void 0)return;let Ke=Oe.s!==void 0?Oe.s:0,yt=Oe.v!==void 0?Oe.v:0,wt={mode:"hwb",w:(1-Ke)*yt,b:1-yt};return Oe.h!==void 0&&(wt.h=Oe.h),Oe.alpha!==void 0&&(wt.alpha=Oe.alpha),wt}function zl(Le,Oe){if(!Oe||Oe[0]!=="hwb")return;let Ke={mode:"hwb"},[,yt,wt,Pt,pr]=Oe;if(yt.type!==X.None){if(yt.type===X.Percentage)return;Ke.h=yt.value}if(wt.type!==X.None){if(wt.type===X.Hue)return;Ke.w=wt.value/100}if(Pt.type!==X.None){if(Pt.type===X.Hue)return;Ke.b=Pt.value/100}return pr.type!==X.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===X.Number?pr.value:pr.value/100))),Ke}var ml=zl,Ts={mode:"hwb",toMode:{rgb:Ro},fromMode:{rgb:Ls},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[ml],serialize:Le=>`hwb(${Le.h!==void 0?Le.h:"none"} ${Le.w!==void 0?Le.w*100+"%":"none"} ${Le.b!==void 0?Le.b*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:It},w:At,b:At,alpha:{use:At,fixup:Kt}},difference:{h:ni},average:{h:et}},yl=Ts,mu=203,su=.1593017578125,cc=78.84375,Bl=.8359375,_l=18.8515625,ju=18.6875;function lu(Le){if(Le<0)return 0;let Oe=Math.pow(Le,1/cc);return 1e4*Math.pow(Math.max(0,Oe-Bl)/(_l-ju*Oe),1/su)}function il(Le){if(Le<0)return 0;let Oe=Math.pow(Le/1e4,su);return Math.pow((Bl+_l*Oe)/(1+ju*Oe),cc)}var As=Le=>Math.max(Le/mu,0),ms=({i:Le,t:Oe,p:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=lu(Le+.008609037037932761*Oe+.11102962500302593*Ke),Pt=lu(Le-.00860903703793275*Oe-.11102962500302599*Ke),pr=lu(Le+.5600313357106791*Oe-.32062717498731885*Ke),Zr={mode:"xyz65",x:As(2.070152218389422*wt-1.3263473389671556*Pt+.2066510476294051*pr),y:As(.3647385209748074*wt+.680566024947227*Pt-.0453045459220346*pr),z:As(-.049747207535812*wt-.0492609666966138*Pt+1.1880659249923042*pr)};return yt!==void 0&&(Zr.alpha=yt),Zr},Ms=ms,ol=(Le=0)=>Math.max(Le*mu,0),Su=({x:Le,y:Oe,z:Ke,alpha:yt})=>{let wt=ol(Le),Pt=ol(Oe),pr=ol(Ke),Zr=il(.3592832590121217*wt+.6976051147779502*Pt-.0358915932320289*pr),Aa=il(-.1920808463704995*wt+1.1004767970374323*Pt+.0753748658519118*pr),vn=il(.0070797844607477*wt+.0748396662186366*Pt+.8433265453898765*pr),an=.5*Zr+.5*Aa,Qa=1.61376953125*Zr-3.323486328125*Aa+1.709716796875*vn,jn=4.378173828125*Zr-4.24560546875*Aa-.132568359375*vn,kn={mode:"itp",i:an,t:Qa,p:jn};return yt!==void 0&&(kn.alpha=yt),kn},Eu=Su,Uu={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Ms,rgb:Le=>Vt(Ms(Le))},fromMode:{xyz65:Eu,rgb:Le=>Eu(Je(Le))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:At,t:At,p:At,alpha:{use:At,fixup:Kt}}},fc=Uu,th=134.03437499999998,Cf=16295499532821565e-27,qu=Le=>{if(Le<0)return 0;let Oe=Math.pow(Le/1e4,su);return Math.pow((Bl+_l*Oe)/(1+ju*Oe),th)},gs=(Le=0)=>Math.max(Le*203,0),Lf=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le=gs(Le),Oe=gs(Oe),Ke=gs(Ke);let wt=1.15*Le-.15*Ke,Pt=.66*Oe+.34*Le,pr=qu(.41478972*wt+.579999*Pt+.014648*Ke),Zr=qu(-.20151*wt+1.120649*Pt+.0531008*Ke),Aa=qu(-.0166008*wt+.2648*Pt+.6684799*Ke),vn=(pr+Zr)/2,an={mode:"jab",j:.44*vn/(1-.56*vn)-Cf,a:3.524*pr-4.066708*Zr+.542708*Aa,b:.199076*pr+1.096799*Zr-1.295875*Aa};return yt!==void 0&&(an.alpha=yt),an},hc=Lf,ac=134.03437499999998,hf=16295499532821565e-27,ku=Le=>{if(Le<0)return 0;let Oe=Math.pow(Le,1/ac);return 1e4*Math.pow((Bl-Oe)/(ju*Oe-_l),1/su)},dc=Le=>Le/203,Cu=({j:Le,a:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=(Le+hf)/(.44+.56*(Le+hf)),Pt=ku(wt+.13860504*Oe+.058047316*Ke),pr=ku(wt-.13860504*Oe-.058047316*Ke),Zr=ku(wt-.096019242*Oe-.8118919*Ke),Aa={mode:"xyz65",x:dc(1.661373024652174*Pt-.914523081304348*pr+.23136208173913045*Zr),y:dc(-.3250758611844533*Pt+1.571847026732543*pr-.21825383453227928*Zr),z:dc(-.090982811*Pt-.31272829*pr+1.5227666*Zr)};return yt!==void 0&&(Aa.alpha=yt),Aa},Pc=Cu,$c=Le=>{let Oe=hc(Je(Le));return Le.r===Le.b&&Le.b===Le.g&&(Oe.a=Oe.b=0),Oe},Zl=$c,df=Le=>Vt(Pc(Le)),Dc=df,Ic={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Zl,xyz65:hc},toMode:{rgb:Dc,xyz65:Pc},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:At,a:At,b:At,alpha:{use:At,fixup:Kt}}},Vu=Ic,Rc=({j:Le,a:Oe,b:Ke,alpha:yt})=>{Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.sqrt(Oe*Oe+Ke*Ke),Pt={mode:"jch",j:Le,c:wt};return wt&&(Pt.h=ia(Math.atan2(Ke,Oe)*180/Math.PI)),yt!==void 0&&(Pt.alpha=yt),Pt},Lu=Rc,vf=({j:Le,c:Oe,h:Ke,alpha:yt})=>{Ke===void 0&&(Ke=0);let wt={mode:"jab",j:Le,a:Oe?Oe*Math.cos(Ke/180*Math.PI):0,b:Oe?Oe*Math.sin(Ke/180*Math.PI):0};return yt!==void 0&&(wt.alpha=yt),wt},sl=vf,Fc={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:sl,rgb:Le=>Dc(sl(Le))},fromMode:{rgb:Le=>Lu(Zl(Le)),jab:Lu},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:At,fixup:It},c:At,j:At,alpha:{use:At,fixup:Kt}},difference:{h:Mi},average:{h:et}},Pu=Fc,vc=Math.pow(29,3)/Math.pow(3,3),zc=Math.pow(6,3)/Math.pow(29,3),Hu=Le=>Math.pow(Le,3)>zc?Math.pow(Le,3):(116*Le-16)/vc,uu=({l:Le,a:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=(Le+16)/116,Pt=Oe/500+wt,pr=wt-Ke/200,Zr={mode:"xyz50",x:Hu(Pt)*Or.X,y:Hu(wt)*Or.Y,z:Hu(pr)*Or.Z};return yt!==void 0&&(Zr.alpha=yt),Zr},Gu=uu,Zc=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Dt({r:Le*3.1341359569958707-Oe*1.6173863321612538-.4906619460083532*Ke,g:Le*-.978795502912089+Oe*1.916254567259524+.03344273116131949*Ke,b:Le*.07195537988411677-Oe*.2289768264158322+1.405386058324125*Ke});return yt!==void 0&&(wt.alpha=yt),wt},gu=Zc,Pf=Le=>gu(Gu(Le)),bl=Pf,xl=Le=>{let{r:Oe,g:Ke,b:yt,alpha:wt}=$e(Le),Pt={mode:"xyz50",x:.436065742824811*Oe+.3851514688337912*Ke+.14307845442264197*yt,y:.22249319175623702*Oe+.7168870538238823*Ke+.06061979053616537*yt,z:.013923904500943465*Oe+.09708128566574634*Ke+.7140993584005155*yt};return wt!==void 0&&(Pt.alpha=wt),Pt},Wu=xl,wl=Le=>Le>zc?Math.cbrt(Le):(vc*Le+16)/116,pf=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=wl(Le/Or.X),Pt=wl(Oe/Or.Y),pr=wl(Ke/Or.Z),Zr={mode:"lab",l:116*Pt-16,a:500*(wt-Pt),b:200*(Pt-pr)};return yt!==void 0&&(Zr.alpha=yt),Zr},Yu=pf,pc=Le=>{let Oe=Yu(Wu(Le));return Le.r===Le.b&&Le.b===Le.g&&(Oe.a=Oe.b=0),Oe},Kc=pc;function cs(Le,Oe){if(!Oe||Oe[0]!=="lab")return;let Ke={mode:"lab"},[,yt,wt,Pt,pr]=Oe;if(!(yt.type===X.Hue||wt.type===X.Hue||Pt.type===X.Hue))return yt.type!==X.None&&(Ke.l=Math.min(Math.max(0,yt.value),100)),wt.type!==X.None&&(Ke.a=wt.type===X.Number?wt.value:wt.value*125/100),Pt.type!==X.None&&(Ke.b=Pt.type===X.Number?Pt.value:Pt.value*125/100),pr.type!==X.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===X.Number?pr.value:pr.value/100))),Ke}var Df=cs,cu={mode:"lab",toMode:{xyz50:Gu,rgb:bl},fromMode:{xyz50:Yu,rgb:Kc},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Df],serialize:Le=>`lab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:Kt}}},Cl=cu,Ll=Qr(Nr({},Cl),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:mn,rgb:gn},fromMode:{xyz65:Ao,rgb:Sn},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),If=Ll;function yu(Le,Oe){if(!Oe||Oe[0]!=="lch")return;let Ke={mode:"lch"},[,yt,wt,Pt,pr]=Oe;if(yt.type!==X.None){if(yt.type===X.Hue)return;Ke.l=Math.min(Math.max(0,yt.value),100)}if(wt.type!==X.None&&(Ke.c=Math.max(0,wt.type===X.Number?wt.value:wt.value*150/100)),Pt.type!==X.None){if(Pt.type===X.Percentage)return;Ke.h=Pt.value}return pr.type!==X.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===X.Number?pr.value:pr.value/100))),Ke}var Bc=yu,Tl={mode:"lch",toMode:{lab:nr,rgb:Le=>bl(nr(Le))},fromMode:{rgb:Le=>kt(Kc(Le)),lab:kt},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Bc],serialize:Le=>`lch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:It},c:At,l:At,alpha:{use:At,fixup:Kt}},difference:{h:Mi},average:{h:et}},ll=Tl,Jc=Qr(Nr({},ll),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:Le=>nr(Le,"lab65"),rgb:Le=>gn(nr(Le,"lab65"))},fromMode:{rgb:Le=>kt(Sn(Le),"lch65"),lab65:Le=>kt(Le,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Nc=Jc,Rf=({l:Le,u:Oe,v:Ke,alpha:yt})=>{Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.sqrt(Oe*Oe+Ke*Ke),Pt={mode:"lchuv",l:Le,c:wt};return wt&&(Pt.h=ia(Math.atan2(Ke,Oe)*180/Math.PI)),yt!==void 0&&(Pt.alpha=yt),Pt},fu=Rf,Du=({l:Le,c:Oe,h:Ke,alpha:yt})=>{Ke===void 0&&(Ke=0);let wt={mode:"luv",l:Le,u:Oe?Oe*Math.cos(Ke/180*Math.PI):0,v:Oe?Oe*Math.sin(Ke/180*Math.PI):0};return yt!==void 0&&(wt.alpha=yt),wt},Iu=Du,Xu=(Le,Oe,Ke)=>4*Le/(Le+15*Oe+3*Ke),Qc=(Le,Oe,Ke)=>9*Oe/(Le+15*Oe+3*Ke),ef=Xu(Or.X,Or.Y,Or.Z),_u=Qc(Or.X,Or.Y,Or.Z),$u=Le=>Le<=zc?vc*Le:116*Math.cbrt(Le)-16,mc=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=$u(Oe/Or.Y),Pt=Xu(Le,Oe,Ke),pr=Qc(Le,Oe,Ke);!isFinite(Pt)||!isFinite(pr)?wt=Pt=pr=0:(Pt=13*wt*(Pt-ef),pr=13*wt*(pr-_u));let Zr={mode:"luv",l:wt,u:Pt,v:pr};return yt!==void 0&&(Zr.alpha=yt),Zr},Ru=mc,zo=(Le,Oe,Ke)=>4*Le/(Le+15*Oe+3*Ke),gc=(Le,Oe,Ke)=>9*Oe/(Le+15*Oe+3*Ke),Vf=zo(Or.X,Or.Y,Or.Z),mf=gc(Or.X,Or.Y,Or.Z),tf=({l:Le,u:Oe,v:Ke,alpha:yt})=>{if(Le===void 0&&(Le=0),Le===0)return{mode:"xyz50",x:0,y:0,z:0};Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Oe/(13*Le)+Vf,Pt=Ke/(13*Le)+mf,pr=Or.Y*(Le<=8?Le/vc:Math.pow((Le+16)/116,3)),Zr=pr*(9*wt)/(4*Pt),Aa=pr*(12-3*wt-20*Pt)/(4*Pt),vn={mode:"xyz50",x:Zr,y:pr,z:Aa};return yt!==void 0&&(vn.alpha=yt),vn},gf=tf,Hf=Le=>fu(Ru(Wu(Le))),yf=Le=>gu(gf(Iu(Le))),ul={mode:"lchuv",toMode:{luv:Iu,rgb:yf},fromMode:{rgb:Hf,luv:fu},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:At,fixup:It},c:At,l:At,alpha:{use:At,fixup:Kt}},difference:{h:Mi},average:{h:et}},Pl=ul,yc=Qr(Nr({},_r),{mode:"lrgb",toMode:{rgb:Dt},fromMode:{rgb:$e},parse:["srgb-linear"],serialize:"srgb-linear"}),_c=yc,bc={mode:"luv",toMode:{xyz50:gf,rgb:Le=>gu(gf(Le))},fromMode:{xyz50:Ru,rgb:Le=>Ru(Wu(Le))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:At,u:At,v:At,alpha:{use:At,fixup:Kt}}},nc=bc,zt=({r:Le,g:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.cbrt(.412221469470763*Le+.5363325372617348*Oe+.0514459932675022*Ke),Pt=Math.cbrt(.2119034958178252*Le+.6806995506452344*Oe+.1073969535369406*Ke),pr=Math.cbrt(.0883024591900564*Le+.2817188391361215*Oe+.6299787016738222*Ke),Zr={mode:"oklab",l:.210454268309314*wt+.7936177747023054*Pt-.0040720430116193*pr,a:1.9779985324311684*wt-2.42859224204858*Pt+.450593709617411*pr,b:.0259040424655478*wt+.7827717124575296*Pt-.8086757549230774*pr};return yt!==void 0&&(Zr.alpha=yt),Zr},rr=zt,Br=Le=>{let Oe=rr($e(Le));return Le.r===Le.b&&Le.b===Le.g&&(Oe.a=Oe.b=0),Oe},wr=Br,la=({l:Le,a:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.pow(Le+.3963377773761749*Oe+.2158037573099136*Ke,3),Pt=Math.pow(Le-.1055613458156586*Oe-.0638541728258133*Ke,3),pr=Math.pow(Le-.0894841775298119*Oe-1.2914855480194092*Ke,3),Zr={mode:"lrgb",r:4.076741636075957*wt-3.3077115392580616*Pt+.2309699031821044*pr,g:-1.2684379732850317*wt+2.6097573492876887*Pt-.3413193760026573*pr,b:-.0041960761386756*wt-.7034186179359362*Pt+1.7076146940746117*pr};return yt!==void 0&&(Zr.alpha=yt),Zr},Ca=la,qa=Le=>Dt(Ca(Le)),Ka=qa;function cn(Le){let yt=1.170873786407767;return .5*(yt*Le-.206+Math.sqrt((yt*Le-.206)*(yt*Le-.206)+4*.03*yt*Le))}function Pn(Le){return(Le*Le+.206*Le)/(1.170873786407767*(Le+.03))}function Ha(Le,Oe){let Ke,yt,wt,Pt,pr,Zr,Aa,vn;-1.88170328*Le-.80936493*Oe>1?(Ke=1.19086277,yt=1.76576728,wt=.59662641,Pt=.75515197,pr=.56771245,Zr=4.0767416621,Aa=-3.3077115913,vn=.2309699292):1.81444104*Le-1.19445276*Oe>1?(Ke=.73956515,yt=-.45954404,wt=.08285427,Pt=.1254107,pr=.14503204,Zr=-1.2684380046,Aa=2.6097574011,vn=-.3413193965):(Ke=1.35733652,yt=-.00915799,wt=-1.1513021,Pt=-.50559606,pr=.00692167,Zr=-.0041960863,Aa=-.7034186147,vn=1.707614701);let an=Ke+yt*Le+wt*Oe+Pt*Le*Le+pr*Le*Oe,Qa=.3963377774*Le+.2158037573*Oe,jn=-.1055613458*Le-.0638541728*Oe,kn=-.0894841775*Le-1.291485548*Oe;{let zn=1+an*Qa,Un=1+an*jn,Jn=1+an*kn,hi=zn*zn*zn,Ki=Un*Un*Un,Qo=Jn*Jn*Jn,Ds=3*Qa*zn*zn,ys=3*jn*Un*Un,Gl=3*kn*Jn*Jn,au=6*Qa*Qa*zn,Au=6*jn*jn*Un,zf=6*kn*kn*Jn,Gf=Zr*hi+Aa*Ki+vn*Qo,dh=Zr*Ds+Aa*ys+vn*Gl,ed=Zr*au+Aa*Au+vn*zf;an=an-Gf*dh/(dh*dh-.5*Gf*ed)}return an}function on(Le,Oe){let Ke=Ha(Le,Oe),yt=Ca({l:1,a:Ke*Le,b:Ke*Oe}),wt=Math.cbrt(1/Math.max(yt.r,yt.g,yt.b)),Pt=wt*Ke;return[wt,Pt]}function fn(Le,Oe,Ke,yt,wt,Pt=null){Pt||(Pt=on(Le,Oe));let pr;if((Ke-wt)*Pt[1]-(Pt[0]-wt)*yt<=0)pr=Pt[1]*wt/(yt*Pt[0]+Pt[1]*(wt-Ke));else{pr=Pt[1]*(wt-1)/(yt*(Pt[0]-1)+Pt[1]*(wt-Ke));{let Zr=Ke-wt,Aa=yt,vn=.3963377774*Le+.2158037573*Oe,an=-.1055613458*Le-.0638541728*Oe,Qa=-.0894841775*Le-1.291485548*Oe,jn=Zr+Aa*vn,kn=Zr+Aa*an,zn=Zr+Aa*Qa;{let Un=wt*(1-pr)+pr*Ke,Jn=pr*yt,hi=Un+Jn*vn,Ki=Un+Jn*an,Qo=Un+Jn*Qa,Ds=hi*hi*hi,ys=Ki*Ki*Ki,Gl=Qo*Qo*Qo,au=3*jn*hi*hi,Au=3*kn*Ki*Ki,zf=3*zn*Qo*Qo,Gf=6*jn*jn*hi,dh=6*kn*kn*Ki,ed=6*zn*zn*Qo,Oh=4.0767416621*Ds-3.3077115913*ys+.2309699292*Gl-1,Bf=4.0767416621*au-3.3077115913*Au+.2309699292*zf,fv=4.0767416621*Gf-3.3077115913*dh+.2309699292*ed,kd=Bf/(Bf*Bf-.5*Oh*fv),Cd=-Oh*kd,Ld=-1.2684380046*Ds+2.6097574011*ys-.3413193965*Gl-1,Pd=-1.2684380046*au+2.6097574011*Au-.3413193965*zf,f0=-1.2684380046*Gf+2.6097574011*dh-.3413193965*ed,rp=Pd/(Pd*Pd-.5*Ld*f0),jh=-Ld*rp,ap=-.0041960863*Ds-.7034186147*ys+1.707614701*Gl-1,np=-.0041960863*au-.7034186147*Au+1.707614701*zf,td=-.0041960863*Gf-.7034186147*dh+1.707614701*ed,Dd=np/(np*np-.5*ap*td),h0=-ap*Dd;Cd=kd>=0?Cd:1e6,jh=rp>=0?jh:1e6,h0=Dd>=0?h0:1e6,pr+=Math.min(Cd,Math.min(jh,h0))}}}return pr}function Ln(Le,Oe,Ke=null){Ke||(Ke=on(Le,Oe));let yt=Ke[0],wt=Ke[1];return[wt/yt,wt/(1-yt)]}function qn(Le,Oe,Ke){let yt=on(Oe,Ke),wt=fn(Oe,Ke,Le,1,Le,yt),Pt=Ln(Oe,Ke,yt),pr=.11516993+1/(7.4477897+4.1590124*Ke+Oe*(-2.19557347+1.75198401*Ke+Oe*(-2.13704948-10.02301043*Ke+Oe*(-4.24894561+5.38770819*Ke+4.69891013*Oe)))),Zr=.11239642+1/(1.6132032-.68124379*Ke+Oe*(.40370612+.90148123*Ke+Oe*(-.27087943+.6122399*Ke+Oe*(.00299215-.45399568*Ke-.14661872*Oe)))),Aa=wt/Math.min(Le*Pt[0],(1-Le)*Pt[1]),vn=Le*pr,an=(1-Le)*Zr,Qa=.9*Aa*Math.sqrt(Math.sqrt(1/(1/(vn*vn*vn*vn)+1/(an*an*an*an))));return vn=Le*.4,an=(1-Le)*.8,[Math.sqrt(1/(1/(vn*vn)+1/(an*an))),Qa,wt]}function Bi(Le){let Oe=Le.l!==void 0?Le.l:0,Ke=Le.a!==void 0?Le.a:0,yt=Le.b!==void 0?Le.b:0,wt={mode:"okhsl",l:cn(Oe)};Le.alpha!==void 0&&(wt.alpha=Le.alpha);let Pt=Math.sqrt(Ke*Ke+yt*yt);if(!Pt)return wt.s=0,wt;let[pr,Zr,Aa]=qn(Oe,Ke/Pt,yt/Pt),vn;if(PtBi(wr(Le))},toMode:{oklab:Ni,rgb:Le=>Ka(Ni(Le))}}),_i=Zi;function Vn(Le){let Oe=Le.l!==void 0?Le.l:0,Ke=Le.a!==void 0?Le.a:0,yt=Le.b!==void 0?Le.b:0,wt=Math.sqrt(Ke*Ke+yt*yt),Pt=wt?Ke/wt:1,pr=wt?yt/wt:1,[Zr,Aa]=Ln(Pt,pr),vn=.5,an=1-vn/Zr,Qa=Aa/(wt+Oe*Aa),jn=Qa*Oe,kn=Qa*wt,zn=Pn(jn),Un=kn*zn/jn,Jn=Ca({l:zn,a:Pt*Un,b:pr*Un}),hi=Math.cbrt(1/Math.max(Jn.r,Jn.g,Jn.b,0));Oe=Oe/hi,wt=wt/hi*cn(Oe)/Oe,Oe=cn(Oe);let Ki={mode:"okhsv",s:wt?(vn+Aa)*kn/(Aa*vn+Aa*an*kn):0,v:Oe?Oe/jn:0};return Ki.s&&(Ki.h=ia(Math.atan2(yt,Ke)*180/Math.PI)),Le.alpha!==void 0&&(Ki.alpha=Le.alpha),Ki}function Gn(Le){let Oe={mode:"oklab"};Le.alpha!==void 0&&(Oe.alpha=Le.alpha);let Ke=Le.h!==void 0?Le.h:0,yt=Le.s!==void 0?Le.s:0,wt=Le.v!==void 0?Le.v:0,Pt=Math.cos(Ke/180*Math.PI),pr=Math.sin(Ke/180*Math.PI),[Zr,Aa]=Ln(Pt,pr),vn=.5,an=1-vn/Zr,Qa=1-yt*vn/(vn+Aa-Aa*an*yt),jn=yt*Aa*vn/(vn+Aa-Aa*an*yt),kn=Pn(Qa),zn=jn*kn/Qa,Un=Ca({l:kn,a:Pt*zn,b:pr*zn}),Jn=Math.cbrt(1/Math.max(Un.r,Un.g,Un.b,0)),hi=Pn(wt*Qa),Ki=jn*hi/Qa;return Oe.l=hi*Jn,Oe.a=Ki*Pt*Jn,Oe.b=Ki*pr*Jn,Oe}var oo=Qr(Nr({},Ji),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Vn,rgb:Le=>Vn(wr(Le))},toMode:{oklab:Gn,rgb:Le=>Ka(Gn(Le))}}),yo=oo;function Vo(Le,Oe){if(!Oe||Oe[0]!=="oklab")return;let Ke={mode:"oklab"},[,yt,wt,Pt,pr]=Oe;if(!(yt.type===X.Hue||wt.type===X.Hue||Pt.type===X.Hue))return yt.type!==X.None&&(Ke.l=Math.min(Math.max(0,yt.type===X.Number?yt.value:yt.value/100),1)),wt.type!==X.None&&(Ke.a=wt.type===X.Number?wt.value:wt.value*.4/100),Pt.type!==X.None&&(Ke.b=Pt.type===X.Number?Pt.value:Pt.value*.4/100),pr.type!==X.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===X.Number?pr.value:pr.value/100))),Ke}var Wo=Vo,Yo=Qr(Nr({},Cl),{mode:"oklab",toMode:{lrgb:Ca,rgb:Ka},fromMode:{lrgb:rr,rgb:wr},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Wo],serialize:Le=>`oklab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`}),ns=Yo;function Bo(Le,Oe){if(!Oe||Oe[0]!=="oklch")return;let Ke={mode:"oklch"},[,yt,wt,Pt,pr]=Oe;if(yt.type!==X.None){if(yt.type===X.Hue)return;Ke.l=Math.min(Math.max(0,yt.type===X.Number?yt.value:yt.value/100),1)}if(wt.type!==X.None&&(Ke.c=Math.max(0,wt.type===X.Number?wt.value:wt.value*.4/100)),Pt.type!==X.None){if(Pt.type===X.Percentage)return;Ke.h=Pt.value}return pr.type!==X.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===X.Number?pr.value:pr.value/100))),Ke}var Ks=Bo,Rs=Qr(Nr({},ll),{mode:"oklch",toMode:{oklab:Le=>nr(Le,"oklab"),rgb:Le=>Ka(nr(Le,"oklab"))},fromMode:{rgb:Le=>kt(wr(Le),"oklch"),oklab:Le=>kt(Le,"oklch")},parse:[Ks],serialize:Le=>`oklch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),ps=Rs,vi=Le=>{let{r:Oe,g:Ke,b:yt,alpha:wt}=$e(Le),Pt={mode:"xyz65",x:.486570948648216*Oe+.265667693169093*Ke+.1982172852343625*yt,y:.2289745640697487*Oe+.6917385218365062*Ke+.079286914093745*yt,z:0*Oe+.0451133818589026*Ke+1.043944368900976*yt};return wt!==void 0&&(Pt.alpha=wt),Pt},Xo=vi,Ss=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Dt({r:Le*2.4934969119414263-Oe*.9313836179191242-.402710784450717*Ke,g:Le*-.8294889695615749+Oe*1.7626640603183465+.0236246858419436*Ke,b:Le*.0358458302437845-Oe*.0761723892680418+.9568845240076871*Ke},"p3");return yt!==void 0&&(wt.alpha=yt),wt},Ws=Ss,Dl=Qr(Nr({},_r),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:Le=>Ws(Je(Le)),xyz65:Ws},toMode:{rgb:Le=>Vt(Xo(Le)),xyz65:Xo}}),Nl=Dl,Kl=Le=>{let Oe=Math.abs(Le);return Oe>=1/512?Math.sign(Le)*Math.pow(Oe,1/1.8):16*Le},Fu=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"prophoto",r:Kl(Le*1.3457868816471585-Oe*.2555720873797946-.0511018649755453*Ke),g:Kl(Le*-.5446307051249019+Oe*1.5082477428451466+.0205274474364214*Ke),b:Kl(Le*0+Oe*0+1.2119675456389452*Ke)};return yt!==void 0&&(wt.alpha=yt),wt},Al=Fu,zu=(Le=0)=>{let Oe=Math.abs(Le);return Oe>=16/512?Math.sign(Le)*Math.pow(Oe,1.8):Le/16},bu=Le=>{let Oe=zu(Le.r),Ke=zu(Le.g),yt=zu(Le.b),wt={mode:"xyz50",x:.7977666449006423*Oe+.1351812974005331*Ke+.0313477341283922*yt,y:.2880748288194013*Oe+.7118352342418731*Ke+899369387256e-16*yt,z:0*Oe+0*Ke+.8251046025104602*yt};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},ic=bu,Oc=Qr(Nr({},_r),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:Al,rgb:Le=>Al(Wu(Le))},toMode:{xyz50:ic,rgb:Le=>gu(ic(Le))}}),Zu=Oc,hu=1.09929682680944,Jl=.018053968510807,Ql=Le=>{let Oe=Math.abs(Le);return Oe>Jl?(Math.sign(Le)||1)*(hu*Math.pow(Oe,.45)-(hu-1)):4.5*Le},xu=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"rec2020",r:Ql(Le*1.7166511879712683-Oe*.3556707837763925-.2533662813736599*Ke),g:Ql(Le*-.6666843518324893+Oe*1.6164812366349395+.0157685458139111*Ke),b:Ql(Le*.0176398574453108-Oe*.0427706132578085+.9421031212354739*Ke)};return yt!==void 0&&(wt.alpha=yt),wt},rf=xu,Ff=1.09929682680944,xc=.018053968510807,rl=(Le=0)=>{let Oe=Math.abs(Le);return Oe{let Oe=rl(Le.r),Ke=rl(Le.g),yt=rl(Le.b),wt={mode:"xyz65",x:.6369580483012911*Oe+.1446169035862083*Ke+.1688809751641721*yt,y:.262700212011267*Oe+.6779980715188708*Ke+.059301716469862*yt,z:0*Oe+.0280726930490874*Ke+1.0609850577107909*yt};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Bu=Ol,af=Qr(Nr({},_r),{mode:"rec2020",fromMode:{xyz65:rf,rgb:Le=>rf(Je(Le))},toMode:{xyz65:Bu,rgb:Le=>Vt(Bu(Le))},parse:["rec2020"],serialize:"rec2020"}),jc=af,wu=.0037930732552754493,jl=Math.cbrt(wu),Ul=Le=>Math.cbrt(Le)-jl,Ci=Le=>{let{r:Oe,g:Ke,b:yt,alpha:wt}=$e(Le),Pt=Ul(.3*Oe+.622*Ke+.078*yt+wu),pr=Ul(.23*Oe+.692*Ke+.078*yt+wu),Zr=Ul(.2434226892454782*Oe+.2047674442449682*Ke+.5518098665095535*yt+wu),Aa={mode:"xyb",x:(Pt-pr)/2,y:(Pt+pr)/2,b:Zr-(Pt+pr)/2};return wt!==void 0&&(Aa.alpha=wt),Aa},eu=Ci,Xe=Le=>Math.pow(Le+jl,3),rt=({x:Le,y:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Xe(Le+Oe)-wu,Pt=Xe(Oe-Le)-wu,pr=Xe(Ke+Oe)-wu,Zr=Dt({r:11.031566904639861*wt-9.866943908131562*Pt-.16462299650829934*pr,g:-3.2541473810744237*wt+4.418770377582723*Pt-.16462299650829934*pr,b:-3.6588512867136815*wt+2.7129230459360922*Pt+1.9459282407775895*pr});return yt!==void 0&&(Zr.alpha=yt),Zr},pt=rt,_t={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:pt},fromMode:{rgb:eu},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:At,y:At,b:At,alpha:{use:At,fixup:Kt}}},Nt=_t,Bt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:gu,lab:Yu},fromMode:{rgb:Wu,lab:Gu},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:Kt}}},Yt=Bt,Dr=Le=>{let{x:Oe,y:Ke,z:yt,alpha:wt}=Le;Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0),yt===void 0&&(yt=0);let Pt={mode:"xyz50",x:1.0479298208405488*Oe+.0229467933410191*Ke-.0501922295431356*yt,y:.0296278156881593*Oe+.990434484573249*Ke-.0170738250293851*yt,z:-.0092430581525912*Oe+.0150551448965779*Ke+.7518742899580008*yt};return wt!==void 0&&(Pt.alpha=wt),Pt},Ur=Dr,kr=Le=>{let{x:Oe,y:Ke,z:yt,alpha:wt}=Le;Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0),yt===void 0&&(yt=0);let Pt={mode:"xyz65",x:.9554734527042182*Oe-.0230985368742614*Ke+.0632593086610217*yt,y:-.0283697069632081*Oe+1.0099954580058226*Ke+.021041398966943*yt,z:.0123140016883199*Oe-.0205076964334779*Ke+1.3303659366080753*yt};return wt!==void 0&&(Pt.alpha=wt),Pt},Wr=kr,oa={mode:"xyz65",toMode:{rgb:Vt,xyz50:Ur},fromMode:{rgb:Je,xyz50:Wr},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:Kt}}},ma=oa,ka=({r:Le,g:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"yiq",y:.29889531*Le+.58662247*Oe+.11448223*Ke,i:.59597799*Le-.2741761*Oe-.32180189*Ke,q:.21147017*Le-.52261711*Oe+.31114694*Ke};return yt!==void 0&&(wt.alpha=yt),wt},$a=ka,yn=({y:Le,i:Oe,q:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"rgb",r:Le+.95608445*Oe+.6208885*Ke,g:Le-.27137664*Oe-.6486059*Ke,b:Le-1.10561724*Oe+1.70250126*Ke};return yt!==void 0&&(wt.alpha=yt),wt},Nn=yn,wi={mode:"yiq",toMode:{rgb:Nn},fromMode:{rgb:$a},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:At,i:At,q:At,alpha:{use:At,fixup:Kt}}},Yi=wi,Ti=(Le,Oe)=>Math.round(Le*(Oe=Math.pow(10,Oe)))/Oe,_o=(Le=4)=>Oe=>typeof Oe=="number"?Ti(Oe,Le):Oe,bo=_o,Zo=bo(2),fs=Le=>Math.max(0,Math.min(1,Le||0)),Po=Le=>Math.round(fs(Le)*255),Es=P("rgb"),cl=P("hsl"),ql=Le=>{if(Le===void 0)return;let Oe=Po(Le.r),Ke=Po(Le.g),yt=Po(Le.b);return"#"+(1<<24|Oe<<16|Ke<<8|yt).toString(16).slice(1)},Js=Le=>{if(Le===void 0)return;let Oe=Po(Le.alpha!==void 0?Le.alpha:1);return ql(Le)+(256|Oe).toString(16).slice(1)},Tu=Le=>{if(Le===void 0)return;let Oe=Po(Le.r),Ke=Po(Le.g),yt=Po(Le.b);return Le.alpha===void 0||Le.alpha===1?`rgb(${Oe}, ${Ke}, ${yt})`:`rgba(${Oe}, ${Ke}, ${yt}, ${Zo(fs(Le.alpha))})`},Li=Le=>{if(Le===void 0)return;let Oe=Zo(Le.h||0),Ke=Zo(fs(Le.s)*100)+"%",yt=Zo(fs(Le.l)*100)+"%";return Le.alpha===void 0||Le.alpha===1?`hsl(${Oe}, ${Ke}, ${yt})`:`hsla(${Oe}, ${Ke}, ${yt}, ${Zo(fs(Le.alpha))})`},Vi=Le=>{let Oe=B(Le);if(!Oe)return;let Ke=oe(Oe.mode);if(!Ke.serialize||typeof Ke.serialize=="string"){let yt=`color(${Ke.serialize||`--${Oe.mode}`} `;return Ke.channels.forEach((wt,Pt)=>{wt!=="alpha"&&(yt+=(Pt?" ":"")+(Oe[wt]!==void 0?Oe[wt]:"none"))}),Oe.alpha!==void 0&&Oe.alpha<1&&(yt+=` / ${Oe.alpha}`),yt+")"}if(typeof Ke.serialize=="function")return Ke.serialize(Oe)},fl=Le=>ql(Es(Le)),Ku=Le=>Js(Es(Le)),tu=Le=>Tu(Es(Le)),Bs=Le=>Li(cl(Le)),oc={normal:(Le,Oe)=>Oe,multiply:(Le,Oe)=>Le*Oe,screen:(Le,Oe)=>Le+Oe-Le*Oe,"hard-light":(Le,Oe)=>Oe<.5?Le*2*Oe:2*Oe*(1-Le)-1,overlay:(Le,Oe)=>Le<.5?Oe*2*Le:2*Le*(1-Oe)-1,darken:(Le,Oe)=>Math.min(Le,Oe),lighten:(Le,Oe)=>Math.max(Le,Oe),"color-dodge":(Le,Oe)=>Le===0?0:Oe===1?1:Math.min(1,Le/(1-Oe)),"color-burn":(Le,Oe)=>Le===1?1:Oe===0?0:1-Math.min(1,(1-Le)/Oe),"soft-light":(Le,Oe)=>Oe<.5?Le-(1-2*Oe)*Le*(1-Le):Le+(2*Oe-1)*((Le<.25?((16*Le-12)*Le+4)*Le:Math.sqrt(Le))-Le),difference:(Le,Oe)=>Math.abs(Le-Oe),exclusion:(Le,Oe)=>Le+Oe-2*Le*Oe},du=(Le,Oe="normal",Ke="rgb")=>{let yt=typeof Oe=="function"?Oe:oc[Oe],wt=P(Ke),Pt=oe(Ke).channels;return Le.map(Zr=>{let Aa=wt(Zr);return Aa.alpha===void 0&&(Aa.alpha=1),Aa}).reduce((Zr,Aa)=>{if(Zr===void 0)return Aa;let vn=Aa.alpha+Zr.alpha*(1-Aa.alpha);return Pt.reduce((an,Qa)=>(Qa!=="alpha"&&(vn===0?an[Qa]=0:(an[Qa]=Aa.alpha*(1-Zr.alpha)*Aa[Qa]+Aa.alpha*Zr.alpha*yt(Zr[Qa],Aa[Qa])+(1-Aa.alpha)*Zr.alpha*Zr[Qa],an[Qa]=Math.max(0,Math.min(1,an[Qa]/vn)))),an),{mode:Ke,alpha:vn})})},hl=du,Uc=([Le,Oe])=>Le+Math.random()*(Oe-Le),he=Le=>Object.keys(Le).reduce((Oe,Ke)=>{let yt=Le[Ke];return Oe[Ke]=Array.isArray(yt)?yt:[yt,yt],Oe},{}),Se=(Le="rgb",Oe={})=>{let Ke=oe(Le),yt=he(Oe);return Ke.channels.reduce((wt,Pt)=>((yt.alpha||Pt!=="alpha")&&(wt[Pt]=Uc(yt[Pt]||Ke.ranges[Pt])),wt),{mode:Le})},Ue=Se,Qe=(Le,Oe="rgb",Ke=!1)=>{let yt=Oe?oe(Oe).channels:null,wt=Oe?P(Oe):B;return Pt=>{let pr=wt(Pt);if(!pr)return;let Zr=(yt||oe(pr.mode).channels).reduce((vn,an)=>{let Qa=Le(pr[an],an,pr,Oe);return Qa!==void 0&&!isNaN(Qa)&&(vn[an]=Qa),vn},{mode:pr.mode});if(!Ke)return Zr;let Aa=B(Pt);return Aa&&Aa.mode!==Zr.mode?P(Aa.mode)(Zr):Zr}},tt=(Le,Oe,Ke)=>Oe!=="alpha"?(Le||0)*(Ke.alpha!==void 0?Ke.alpha:1):Le,ut=(Le,Oe,Ke)=>Oe!=="alpha"&&Ke.alpha!==0?(Le||0)/(Ke.alpha!==void 0?Ke.alpha:1):Le,jt=(Le=1,Oe=0)=>(Ke,yt)=>yt!=="alpha"?Ke*Le+Oe:Ke,St=(Le=1,Oe=1,Ke=0)=>(yt,wt)=>wt!=="alpha"?Le*Math.pow(yt,Oe)+Ke:yt,Qt=Le=>{Le[0]===void 0&&(Le[0]=0),Le[Le.length-1]===void 0&&(Le[Le.length-1]=1);let Oe=1,Ke,yt,wt,Pt;for(;OeOe=>Le<=0?1:Le>=1?0:Math.pow(Oe,Math.log(.5)/Math.log(Le)),Kr=yr,$r=Le=>typeof Le=="function",_a=Le=>Le&&typeof Le=="object",Ia=Le=>typeof Le=="number",ra=(Le,Oe="rgb",Ke,yt)=>{let wt=oe(Oe),Pt=P(Oe),pr=[],Zr=[],Aa={};Le.forEach(jn=>{Array.isArray(jn)?(pr.push(Pt(jn[0])),Zr.push(jn[1])):Ia(jn)||$r(jn)?Aa[Zr.length]=jn:(pr.push(Pt(jn)),Zr.push(void 0))}),gr(Zr);let vn=wt.channels.reduce((jn,kn)=>{let zn;return _a(Ke)&&_a(Ke[kn])&&Ke[kn].fixup?zn=Ke[kn].fixup:_a(wt.interpolate[kn])&&wt.interpolate[kn].fixup?zn=wt.interpolate[kn].fixup:zn=Un=>Un,jn[kn]=zn(pr.map(Un=>Un[kn])),jn},{});if(yt){let jn=pr.map((kn,zn)=>wt.channels.reduce((Un,Jn)=>(Un[Jn]=vn[Jn][zn],Un),{mode:Oe}));vn=wt.channels.reduce((kn,zn)=>(kn[zn]=jn.map(Un=>{let Jn=yt(Un[zn],zn,Un,Oe);return isNaN(Jn)?void 0:Jn}),kn),{})}let an=wt.channels.reduce((jn,kn)=>{let zn;return $r(Ke)?zn=Ke:_a(Ke)&&$r(Ke[kn])?zn=Ke[kn]:_a(Ke)&&_a(Ke[kn])&&Ke[kn].use?zn=Ke[kn].use:$r(wt.interpolate[kn])?zn=wt.interpolate[kn]:_a(wt.interpolate[kn])&&(zn=wt.interpolate[kn].use),jn[kn]=zn(vn[kn]),jn},{}),Qa=pr.length-1;return jn=>{if(jn=Math.min(Math.max(0,jn),1),jn<=Zr[0])return pr[0];if(jn>Zr[Qa])return pr[Qa];let kn=0;for(;Zr[kn]{let ys=an[Ds](Ki);return ys!==void 0&&(Qo[Ds]=ys),Qo},{mode:Oe})}},va=(Le,Oe="rgb",Ke)=>ra(Le,Oe,Ke),ba=(Le,Oe)=>(Ke,yt="rgb",wt)=>{let Pt=Oe?Qe(Oe,yt):void 0,pr=ra(Ke,yt,wt,Le);return Pt?Zr=>Pt(pr(Zr)):pr},za=ba(tt,ut),Ra=(Le,Oe)=>(Le+Oe)%Oe,pa=(Le,Oe,Ke,yt,wt)=>{let Pt=wt*wt,pr=Pt*wt;return((1-3*wt+3*Pt-pr)*Le+(4-6*Pt+3*pr)*Oe+(1+3*wt+3*Pt-3*pr)*Ke+pr*yt)/6},En=Le=>Oe=>{let Ke=Le.length-1,yt=Oe>=1?Ke-1:Math.max(0,Math.floor(Oe*Ke));return pa(yt>0?Le[yt-1]:2*Le[yt]-Le[yt+1],Le[yt],Le[yt+1],ytOe=>{let Ke=Le.length-1,yt=Math.floor(Oe*Ke);return pa(Le[Ra(yt-1,Le.length)],Le[Ra(yt,Le.length)],Le[Ra(yt+1,Le.length)],Le[Ra(yt+2,Le.length)],(Oe-yt/Ke)*Ke)},Kn=Le=>{let Oe,Ke=Le.length-1,yt=new Array(Ke),wt=new Array(Ke),Pt=new Array(Ke);for(yt[1]=1/4,wt[1]=(6*Le[1]-Le[0])/4,Oe=2;Oe0&&(Pt[Ke-1]=wt[Ke-1]),Oe=Ke-2;Oe>0;--Oe)Pt[Oe]=wt[Oe]-yt[Oe]*Pt[Oe+1];return Pt},di=Le=>En(Kn(Le)),Oi=Le=>On(Kn(Le)),Pi=Math.sign,ko=Math.min,de=Math.abs,y=Le=>{let Oe=Le.length-1,Ke=[],yt=[],wt=[];for(let Pt=0;Pt0?.5*(Le[Pt+1]-Le[Pt-1])*Oe:void 0),wt.push(Pt>0?(Pi(Ke[Pt-1])+Pi(Ke[Pt]))*ko(de(Ke[Pt-1]),de(Ke[Pt]),.5*de(yt[Pt])):void 0);return[Ke,yt,wt]},O=(Le,Oe,Ke)=>{let yt=Le.length-1,wt=yt*yt;return Pt=>{let pr;Pt>=1?pr=yt-1:pr=Math.max(0,Math.floor(Pt*yt));let Zr=Pt-pr/yt,Aa=Zr*Zr,vn=Aa*Zr;return(Oe[pr]+Oe[pr+1]-2*Ke[pr])*wt*vn+(3*Ke[pr]-2*Oe[pr]-Oe[pr+1])*yt*Aa+Oe[pr]*Zr+Le[pr]}},ie=Le=>{if(Le.length<3)return At(Le);let Oe=Le.length-1,[Ke,,yt]=y(Le);return yt[0]=Ke[0],yt[Oe]=Ke[Oe-1],O(Le,yt,Ke)},ce=Le=>{if(Le.length<3)return At(Le);let Oe=Le.length-1,[Ke,yt,wt]=y(Le);return yt[0]=(Le[1]*2-Le[0]*1.5-Le[2]*.5)*Oe,yt[Oe]=(Le[Oe]*1.5-Le[Oe-1]*2+Le[Oe-2]*.5)*Oe,wt[0]=yt[0]*Ke[0]<=0?0:de(yt[0])>2*de(Ke[0])?2*Ke[0]:yt[0],wt[Oe]=yt[Oe]*Ke[Oe-1]<=0?0:de(yt[Oe])>2*de(Ke[Oe-1])?2*Ke[Oe-1]:yt[Oe],O(Le,wt,Ke)},_e=Le=>{let Oe=Le.length-1,[Ke,yt,wt]=y(Le);yt[0]=.5*(Le[1]-Le[Oe])*Oe,yt[Oe]=.5*(Le[0]-Le[Oe-1])*Oe;let Pt=(Le[0]-Le[Oe])*Oe,pr=Pt;return wt[0]=(Pi(Pt)+Pi(Ke[0]))*ko(de(Pt),de(Ke[0]),.5*de(yt[0])),wt[Oe]=(Pi(Ke[Oe-1])+Pi(pr))*ko(de(Ke[Oe-1]),de(pr),.5*de(yt[Oe])),O(Le,wt,Ke)},De=(Le=1)=>Le===1?Oe=>Oe:Oe=>Math.pow(Oe,Le),Ne=De,Ye=(Le=2,Oe=1)=>{let Ke=Ne(Oe);if(Le<2)return Le<1?[]:[Ke(.5)];let yt=[];for(let wt=0;wt{let Oe={mode:Le.mode,r:Math.max(0,Math.min(Le.r!==void 0?Le.r:0,1)),g:Math.max(0,Math.min(Le.g!==void 0?Le.g:0,1)),b:Math.max(0,Math.min(Le.b!==void 0?Le.b:0,1))};return Le.alpha!==void 0&&(Oe.alpha=Le.alpha),Oe},Gt=Le=>Ft(ct(Le)),Jt=Le=>Le!==void 0&&(Le.r===void 0||Le.r>=0&&Le.r<=1)&&(Le.g===void 0||Le.g>=0&&Le.g<=1)&&(Le.b===void 0||Le.b>=0&&Le.b<=1);function it(Le){return Jt(ct(Le))}function Rt(Le="rgb"){let{gamut:Oe}=oe(Le);if(!Oe)return yt=>!0;let Ke=P(typeof Oe=="string"?Oe:Le);return yt=>Jt(Ke(yt))}function qt(Le){return Le=B(Le),Le===void 0||it(Le)?Le:P(Le.mode)(Gt(Le))}function or(Le="rgb"){let{gamut:Oe}=oe(Le);if(!Oe)return Pt=>B(Pt);let Ke=typeof Oe=="string"?Oe:Le,yt=P(Ke),wt=Rt(Ke);return Pt=>{let pr=B(Pt);if(!pr)return;let Zr=yt(pr);if(wt(Zr))return pr;let Aa=Ft(Zr);return pr.mode===Aa.mode?Aa:P(pr.mode)(Aa)}}function vr(Le,Oe="lch",Ke="rgb"){Le=B(Le);let yt=Ke==="rgb"?it:Rt(Ke),wt=Ke==="rgb"?Gt:or(Ke);if(Le===void 0||yt(Le))return Le;let Pt=P(Le.mode);Le=P(Oe)(Le);let pr=Qr(Nr({},Le),{c:0});if(!yt(pr))return Pt(wt(pr));let Zr=0,Aa=Le.c!==void 0?Le.c:0,vn=oe(Oe).ranges.c,an=(vn[1]-vn[0])/Math.pow(2,13),Qa=pr.c;for(;Aa-Zr>an;)pr.c=Zr+(Aa-Zr)*.5,yt(pr)?(Qa=pr.c,Zr=pr.c):Aa=pr.c;return Pt(yt(pr)?pr:Qr(Nr({},pr),{c:Qa}))}function Ar(Le="rgb",Oe="oklch",Ke=ci("oklch"),yt=.02){let wt=P(Le),Pt=oe(Le);if(!Pt.gamut)return an=>wt(an);let pr=Rt(Le),Zr=or(Le),Aa=P(Oe),{ranges:vn}=oe(Oe);if(!vn.l||!vn.c)throw new Error("LCH-like space expected");return an=>{if(an=B(an),an===void 0)return;let Qa=Nr({},Aa(an));if(Qa.l===void 0&&(Qa.l=0),Qa.c===void 0&&(Qa.c=0),Qa.l>=vn.l[1]){let Jn=Qr(Nr({},Pt.white),{mode:Le});return an.alpha!==void 0&&(Jn.alpha=an.alpha),Jn}if(Qa.l<=vn.l[0]){let Jn=Qr(Nr({},Pt.black),{mode:Le});return an.alpha!==void 0&&(Jn.alpha=an.alpha),Jn}if(pr(Qa))return wt(Qa);let jn=0,kn=Qa.c,zn=(vn.c[1]-vn.c[0])/4e3,Un=Zr(Qa);for(;kn-jn>zn;)Qa.c=(jn+kn)*.5,Un=Zr(Qa),pr(Qa)||Ke&&yt>0&&Ke(Qa,Un)<=yt?jn=Qa.c:kn=Qa.c;return wt(pr(Qa)?Qa:Un)}}var dr=(Le,Oe=ci(),Ke=yt=>yt)=>{let yt=Le.map((wt,Pt)=>({color:Ke(wt),i:Pt}));return(wt,Pt=1,pr=1/0)=>(isFinite(Pt)&&(Pt=Math.max(1,Math.min(Pt,yt.length-1))),yt.forEach(Zr=>{Zr.d=Oe(wt,Zr.color)}),yt.sort((Zr,Aa)=>Zr.d-Aa.d).slice(0,Pt).filter(Zr=>Zr.dLe[Zr.i]))},mr=dr,qr=Le=>Math.max(Le,0),Lr=Le=>Math.max(Math.min(Le,1),0),ua=(Le,Oe,Ke)=>Le===void 0||Oe===void 0?void 0:Le+Ke*(Oe-Le),Ba=Le=>{let Oe=1-Lr(Le);return[.393+.607*Oe,.769-.769*Oe,.189-.189*Oe,0,.349-.349*Oe,.686+.314*Oe,.168-.168*Oe,0,.272-.272*Oe,.534-.534*Oe,.131+.869*Oe,0,0,0,0,1]},Pa=Le=>{let Oe=qr(Le);return[.213+.787*Oe,.715-.715*Oe,.072-.072*Oe,0,.213-.213*Oe,.715+.285*Oe,.072-.072*Oe,0,.213-.213*Oe,.715-.715*Oe,.072+.928*Oe,0,0,0,0,1]},Ua=Le=>{let Oe=1-Lr(Le);return[.2126+.7874*Oe,.7152-.7152*Oe,.0722-.0722*Oe,0,.2126-.2126*Oe,.7152+.2848*Oe,.0722-.0722*Oe,0,.2126-.2126*Oe,.7152-.7152*Oe,.0722+.9278*Oe,0,0,0,0,1]},ya=Le=>{let Oe=Math.PI*Le/180,Ke=Math.cos(Oe),yt=Math.sin(Oe);return[.213+Ke*.787-yt*.213,.715-Ke*.715-yt*.715,.072-Ke*.072+yt*.928,0,.213-Ke*.213+yt*.143,.715+Ke*.285+yt*.14,.072-Ke*.072-yt*.283,0,.213-Ke*.213-yt*.787,.715-Ke*.715+yt*.715,.072+Ke*.928+yt*.072,0,0,0,0,1]},da=(Le,Oe,Ke=!1)=>{let yt=P(Oe),wt=oe(Oe).channels;return Pt=>{let pr=yt(Pt);if(!pr)return;let Zr={mode:Oe},Aa,vn=wt.length;for(let Qa=0;Qa{let Ke=qr(Le);return Qe(jt(Ke),Oe,!0)},wa=(Le=1,Oe="rgb")=>{let Ke=qr(Le);return Qe(jt(Ke,(1-Ke)/2),Oe,!0)},Ya=(Le=1,Oe="rgb")=>da(Ba(Le),Oe,!0),Xa=(Le=1,Oe="rgb")=>da(Pa(Le),Oe,!0),Hn=(Le=1,Oe="rgb")=>da(Ua(Le),Oe,!0),$n=(Le=1,Oe="rgb")=>{let Ke=Lr(Le);return Qe((yt,wt)=>wt==="alpha"?yt:ua(Ke,1-Ke,yt),Oe,!0)},Si=(Le=0,Oe="rgb")=>da(ya(Le),Oe,!0),Mn=P("rgb"),xn=[[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]],gi=[[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]],Wn=[[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]],Yn=(Le,Oe)=>{let Ke=Math.max(0,Math.min(1,Oe)),yt=Math.round(Ke/.1),wt=Math.round(Ke%.1),Pt=Le[yt];if(wt>0&&ytFe(Pt[Aa],pr[Aa],wt))}return pr=>{let Zr=B(pr);if(Zr===void 0)return;let{r:Aa,g:vn,b:an}=Mn(Zr),Qa={mode:"rgb",r:Pt[0]*Aa+Pt[1]*vn+Pt[2]*an,g:Pt[3]*Aa+Pt[4]*vn+Pt[5]*an,b:Pt[6]*Aa+Pt[7]*vn+Pt[8]*an};return Zr.alpha!==void 0&&(Qa.alpha=Zr.alpha),P(Zr.mode)(Qa)}},Xn=(Le=1)=>Yn(xn,Le),pi=(Le=1)=>Yn(gi,Le),Xi=(Le=1)=>Yn(Wn,Le),Eo=Le=>Le*Le*(3-2*Le),yi=Le=>.5-Math.sin(Math.asin(1-2*Le)/3),Ui=Le=>Le*Le*Le*(Le*(Le*6-15)+10),fo=Ui,To=Le=>(1-Math.cos(Le*Math.PI))/2,jo=To;function qs(Le){let Oe=P("lrgb")(Le);return .2126*Oe.r+.7152*Oe.g+.0722*Oe.b}function Vs(Le,Oe){let Ke=qs(Le),yt=qs(Oe);return(Math.max(Ke,yt)+.05)/(Math.min(Ke,yt)+.05)}var Uo=ne(Wt),Qs=ne(Fr),os=ne(Io),hs=ne(Oo),ss=ne(wo),ks=ne(Zs),ts=ne(Ji),el=ne(yl),Il=ne(fc),Do=ne(Vu),ru=ne(Pu),Ns=ne(Cl),Nu=ne(If),Vl=ne(ll),Hl=ne(Nc),Co=ne(Pl),is=ne(_c),Hs=ne(nc),ca=ne(_i),ln=ne(yo),hn=ne(ns),no=ne(ps),ds=ne(Nl),Os=ne(Zu),io=ne(jc),ea=ne(_r),ha=ne(Nt),Ta=ne(Yt),sn=ne(ma),wn=ne(Yi)}}),Rn=Ee({"src/plot_api/plot_config.js"(J,H){"use strict";var v={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:{}}},x={};function E(k,l){for(var e in k){var t=k[e];t.valType?l[e]=t.dflt:(l[e]||(l[e]={}),E(t,l[e]))}}E(v,x),H.exports={configAttributes:v,dfltConfig:x}}}),ao=Ee({"src/lib/notifier.js"(J,H){"use strict";var v=Va(),x=mi(),E=[];H.exports=function(k,l,e){var t;if(((t=e?._context)==null?void 0:t.displayNotifier)===!1||E.indexOf(k)!==-1)return;E.push(k);var n=1e3;x(l)?n=l:l==="long"&&(n=3e3);var r=v.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var a=r.selectAll(".notifier-note").data(E);function o(s){s.duration(700).style("opacity",0).each("end",function(c){var g=E.indexOf(c);g!==-1&&E.splice(g,1),v.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var c=v.select(this);c.append("button").classed("notifier-close",!0).html("×").on("click",function(){c.transition().call(o)});for(var g=c.append("p"),f=s.split(//g),p=0;p1){var l=["LOG:"];for(k=0;k1){var e=[];for(k=0;k"),"long")}},E.warn=function(){var k;if(v.logging>0){var l=["WARN:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}},E.error=function(){var k;if(v.logging>0){var l=["ERROR:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}}}}),rs=Ee({"src/components/color/attributes.js"(J){"use strict";J.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],J.defaultLine="#444",J.lightLine="#eee",J.background="#fff",J.borderLine="#BEC8D9",J.lightFraction=100*10/11}}),Qn=Ee({"src/components/color/index.js"(J,H){"use strict";var{converter:v,formatHex:x,formatRgb:E,wcagContrast:k,wcagLuminance:l}=In(),{isArrayOrTypedArray:e}=vs(),{warn:t}=po(),{background:n,defaultLine:r,defaults:a,lightLine:o}=rs(),s=v("rgb"),c=v("hsl"),g=W=>{if(typeof W!="string")return;let ee=W.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(ee))try{return s(ee)}catch{return}},f=W=>W>0?W>1?1:W:0,p={mode:"rgb",r:0,g:0,b:0,alpha:1},m=W=>Math.round(W*255e6)/255e6,i=W=>Qr(Nr({},W),{r:m(W.r),g:m(W.g),b:m(W.b)}),T=W=>E(i(W)),S=W=>x(i(W)),M=W=>{var ee,ae,fe,ye;return typeof W=="string"?`"${W}"`:e(W)?`${(ae=(ee=W.constructor)==null?void 0:ee.name)!=null?ae:"Array"}(${W.length})`:typeof W=="object"?(ye=(fe=W.constructor)==null?void 0:fe.name)!=null?ye:"Object":`${typeof W} ${W}`},C=(W,ee)=>{var ae;let fe=g(W);return fe?((ae=fe.alpha)!=null||(fe.alpha=1),fe):(!ee&&W!=null&&t(`Invalid color specifier: ${M(W)}. Defaulting to "#000"`),p)},_=W=>T(Qr(Nr({},C(W)),{alpha:1})),w=W=>W?C(W).alpha:0,h=W=>e(W)&&W.length>2&&Number.isFinite(W[0])&&Number.isFinite(W[1])&&Number.isFinite(W[2]),u=W=>{let[ee,ae,fe,ye]=W,xe=Math.max(ee,ae,fe)>1?1/255:1,Ae=ye??1;return{mode:"rgb",r:ee*xe,g:ae*xe,b:fe*xe,alpha:Ae>1?Ae/255:Ae}},A=(W,ee)=>{let ae=h(W)?u(W):C(W,!0),fe=[f(ae.r),f(ae.g),f(ae.b),f(ae.alpha)];return ee==="uint8"||ee==="uint8_clamped"?Uint8Array.from(fe,ye=>Math.round(ye*255)):ee==="float32"?Float32Array.from(fe):ee==="float64"?Float64Array.from(fe):fe},b=(W,ee)=>T(Qr(Nr({},C(W)),{alpha:f(ee)})),z=(W,ee)=>{let ae=C(W),fe=ae.alpha;if(fe===1)return T(ae);let ye=C(ee||n),xe=ye.alpha,Ae=(Me,Ie)=>(xe===1?Ie:1-xe+Ie*xe)*(1-fe)+Me*fe;return T({mode:"rgb",r:Ae(ae.r,ye.r),g:Ae(ae.g,ye.g),b:Ae(ae.b,ye.b)})},I=(W,ee,ae)=>{let fe=C(W),ye=C(ee),xe=(Ae,Me)=>ae*Ae+(1-ae)*Me;return T({mode:"rgb",r:xe(fe.r,ye.r),g:xe(fe.g,ye.g),b:xe(fe.b,ye.b)})},N=(W,ee)=>{let ae=C(W),fe=c(ae)||{mode:"hsl",h:0,s:0,l:0};return T(s(Qr(Nr({},fe),{l:f((fe.l*100+ee)/100),alpha:ae.alpha})))},R=(W,ee)=>k(C(W),C(ee)),B=W=>R(W,n)>R(W,r),F=T(C(n)),P=T(C(r)),j=(W,ee,ae)=>(C(W).alpha!==1&&(W=z(W,n)),B(W)?ee?N(W,ee):F:ae?N(W,-ae):P),U=(W,ee)=>{W.style({stroke:_(ee),"stroke-opacity":C(ee).alpha})},Z=(W,ee)=>{W.style({fill:_(ee),"fill-opacity":C(ee).alpha})},Q=(W,ee)=>!!(W&&ee&&_(W)===_(ee)),re=W=>g(W)!==void 0,ne=(W,ee)=>{ee=ee===0?0:ee||10;let ae=C(W),fe=ee/100;return T(Qr(Nr({},ae),{r:f(ae.r+fe),g:f(ae.g+fe),b:f(ae.b+fe)}))},oe=(W,ee,ae)=>{let fe=C(W),ye=C(ee),xe=ae/100,Ae=ye.alpha-fe.alpha,Me=2*xe-1,Ie=((Me*Ae===-1?Me:(Me+Ae)/(1+Me*Ae))+1)/2,qe=1-Ie,je=(ke,ge)=>qe*ke+Ie*ge;return T({mode:"rgb",r:je(fe.r,ye.r),g:je(fe.g,ye.g),b:je(fe.b,ye.b),alpha:fe.alpha*(1-xe)+ye.alpha*xe})},V=(W,ee=["#000","#fff"])=>{let ae,fe=-1/0;for(let ye of ee){let xe=R(W,ye);xe>fe&&(fe=xe,ae=T(C(ye)))}return ae},$=W=>T(C(W)),K=W=>S(C(W)).toUpperCase(),G=W=>{let ee=C(W);return[f(ee.r)*255,f(ee.g)*255,f(ee.b)*255,f(ee.alpha)]},X=([W,ee,ae,fe])=>T({mode:"rgb",r:W/255,g:ee/255,b:ae/255,alpha:fe}),q=W=>{let ee=C(W);return l({mode:"rgb",r:f(ee.r),g:f(ee.g),b:f(ee.b)})};H.exports={addOpacity:b,adjustLightness:N,background:n,brighten:ne,combine:z,contrast:j,defaultLine:r,defaults:a,equals:Q,fill:Z,hexString:K,interpolate:I,isChannelArray:h,isDark:B,isValid:re,lightLine:o,luminosity:q,mix:oe,mostReadable:V,normalize:A,opacity:w,parse:C,rgb:_,rgbaArray:G,rgbaArrayToString:X,rgbaString:$,stroke:U,wcagContrast:R}}}),uh=Ee({"src/components/colorscale/scales.js"(J,H){"use strict";var v=Qn(),x={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},E=x.RdBu;function k(t,n){if(n||(n=E),!t)return n;function r(){try{t=x[t]||JSON.parse(t)}catch{t=n}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),l(t)?t:n}function l(t){var n=0;if(!Array.isArray(t)||t.length<2||!t[0]||!t[t.length-1]||+t[0][0]!=0||+t[t.length-1][0]!=1)return!1;for(var r=0;rdA});function dA(J,H="",v,x){let E=H+(v?"":"$"),k=x===!1?"":"^";return J==="xy"?new RegExp(k+"x"+B0+"y"+B0+E):new RegExp(k+J+B0+E)}var B0,Rp=Da({"src/lib/regex.ts"(){"use strict";B0="([2-9]|[1-9][0-9]+)?"}}),vA=Ee({"src/lib/coerce.js"(J){"use strict";var H=mi(),v=vo().extendFlat,x=nn(),E=uh(),k=Qn(),l=gd().DESELECTDIM,e=dl(),t=(Rp(),tn(Sv)).counter,n=(Vd(),tn(lh)).modHalf,r=vs().isArrayOrTypedArray,a=vs().isTypedArraySpec,o=vs().decodeTypedArraySpec;J.valObjectMeta={data_array:{coerceFunction:function(c,g,f){g.set(r(c)?c:a(c)?o(c):f)}},enumerated:{coerceFunction:function(c,g,f,p){p.coerceNumber&&(c=+c),p.values.indexOf(c)===-1?g.set(f):g.set(c)},validateFunction:function(c,g){g.coerceNumber&&(c=+c);for(var f=g.values,p=0;pi===!0||i===!1;m(c)||p.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(m)?g.set(c):g.set(f)}},number:{coerceFunction:function(c,g,f,p){a(c)&&(c=o(c)),!H(c)||p.min!==void 0&&cp.max?g.set(f):g.set(+c)}},integer:{coerceFunction:function(c,g,f,p){if((p.extras||[]).indexOf(c)!==-1){g.set(c);return}a(c)&&(c=o(c)),c%1||!H(c)||p.min!==void 0&&cp.max?g.set(f):g.set(+c)}},string:{coerceFunction:function(c,g,f,p){if(typeof c!="string"){var m=typeof c=="number";p.strict===!0||!m?g.set(f):g.set(String(c))}else p.noBlank&&!c?g.set(f):g.set(c)}},color:{coerceFunction:function(c,g,f){a(c)&&(c=o(c)),k.isValid(c)?g.set(c):g.set(f)}},colorlist:{coerceFunction:function(c,g,f){!Array.isArray(c)||!c.length?g.set(f):c.every(p=>k.isValid(p))?g.set(c):g.set(f)}},colorscale:{coerceFunction:function(c,g,f){g.set(E.get(c,f))}},angle:{coerceFunction:function(c,g,f){a(c)&&(c=o(c)),c==="auto"?g.set("auto"):H(c)?g.set(n(+c,360)):g.set(f)}},subplotid:{coerceFunction:function(c,g,f,p){var m=p.regex||t(f);let i=T=>typeof T=="string"&&m.test(T);i(c)||p.arrayOk&&r(c)&&c.length>0&&c.every(i)?g.set(c):g.set(f)},validateFunction:function(c,g){var f=g.dflt;return c===f?!0:typeof c!="string"?!1:!!t(f).test(c)}},flaglist:{coerceFunction:function(c,g,f,p){if((p.extras||[]).indexOf(c)!==-1){g.set(c);return}if(typeof c!="string"){g.set(f);return}for(var m=c.split("+"),i=0;iNr({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.texttemplateAttrs=({editType:k="calc",arrayOk:l}={},e={})=>Nr({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.shapeTexttemplateAttrs=({editType:k="arraydraw",newshape:l}={},e={})=>({valType:"string",dflt:"",editType:k}),J.templatefallbackAttrs=({editType:k="none"}={})=>({valType:"any",dflt:"-",editType:k})}}),Cg=Ee({"src/components/shapes/label_texttemplate.js"(J,H){"use strict";function v(M,C){return C?C.d2l(M):M}function x(M,C){return C?C.l2d(M):M}function E(M){return M.x0}function k(M){return M.x1}function l(M){return M.y0}function e(M){return M.y1}function t(M){return M.x0shift||0}function n(M){return M.x1shift||0}function r(M){return M.y0shift||0}function a(M){return M.y1shift||0}function o(M,C){return v(M.x1,C)+n(M)-v(M.x0,C)-t(M)}function s(M,C,_){return v(M.y1,_)+a(M)-v(M.y0,_)-r(M)}function c(M,C){return Math.abs(o(M,C))}function g(M,C,_){return Math.abs(s(M,C,_))}function f(M,C,_){return M.type!=="line"?void 0:Math.sqrt(Math.pow(o(M,C),2)+Math.pow(s(M,C,_),2))}function p(M,C){return x((v(M.x1,C)+n(M)+v(M.x0,C)+t(M))/2,C)}function m(M,C,_){return x((v(M.y1,_)+a(M)+v(M.y0,_)+r(M))/2,_)}function i(M,C,_){return M.type!=="line"?void 0:s(M,C,_)/o(M,C)}var T=["x0","x1","y0","y1","dy","height","ycenter"],S=["x0","x1","y0","y1","dx","width","xcenter"];H.exports={x0:E,x1:k,y0:l,y1:e,slope:i,dx:o,dy:s,width:c,height:g,length:f,xcenter:p,ycenter:m,simpleXVariables:T,simpleYVariables:S}}}),VA=Ee({"src/components/shapes/draw_newshape/attributes.js"(J,H){"use strict";var v=El().overrideAll,x=nn(),E=Xs(),k=kc().dash,l=vo().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:t}=Cs(),n=Cg();H.exports=v({newshape:{visible:l({},x.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:l({},x.legend,{}),legendgroup:l({},x.legendgroup,{}),legendgrouptitle:{text:l({},x.legendgrouptitle.text,{}),font:E({})},legendrank:l({},x.legendrank,{}),legendwidth:l({},x.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:l({},k,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:l({},x.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(n)}),texttemplatefallback:t({editType:"arraydraw"}),font:E({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),HA=Ee({"src/components/selections/draw_newselection/attributes.js"(J,H){"use strict";var v=kc().dash,x=vo().extendFlat;H.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:x({},v,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),Lg=Ee({"src/plots/pad_attributes.js"(J,H){"use strict";H.exports=function(v){var x=v.editType;return{t:{valType:"number",dflt:0,editType:x},r:{valType:"number",dflt:0,editType:x},b:{valType:"number",dflt:0,editType:x},l:{valType:"number",dflt:0,editType:x},editType:x}}}}),Fp=Ee({"src/plots/layout_attributes.js"(J,H){"use strict";var v=Xs(),x=O0(),E=rs(),k=VA(),l=HA(),e=Lg(),t=vo().extendFlat,n=v({editType:"calc"});n.family.dflt='"Open Sans", verdana, arial, sans-serif',n.size.dflt=12,n.color.dflt=E.defaultLine,H.exports={font:n,title:{text:{valType:"string",editType:"layoutstyle"},font:v({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:v({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:t(e({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:E.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:E.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:E.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:k.newshape,activeshape:k.activeshape,newselection:l.newselection,activeselection:l.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:t({},x.transition,{editType:"none"})}}}),GA=Ee({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var J=document.createElement("style");J.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",J.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(J)}})()}}),Ri=Ee({"src/registry.js"(J){"use strict";var H=po(),v=Eg(),x=vb(),E=N0().addStyleRule,k=vo(),l=nn(),e=Fp(),t=k.extendFlat,n=k.extendDeepAll;J.modules={},J.allCategories={},J.allTypes=[],J.subplotsRegistry={},J.componentsRegistry={},J.layoutArrayContainers=[],J.layoutArrayRegexes=[],J.traceLayoutAttributes={},J.localeRegistry={},J.apiMethodRegistry={},J.collectableSubplotTypes=null,J.register=function(i){if(J.collectableSubplotTypes=null,i)i&&!Array.isArray(i)&&(i=[i]);else throw new Error("No argument passed to Plotly.register.");for(var T=0;T=i&&R<=T?R:l}if(typeof R!="string"&&typeof R!="number")return l;R=String(R);var U=p(B),Z=R.charAt(0);U&&(Z==="G"||Z==="g")&&(R=R.slice(1),B="");var Q=U&&B.slice(0,7)==="chinese",re=R.match(Q?g:c);if(!re)return l;var ne=re[1],oe=re[3]||"1",V=Number(re[5]||1),$=Number(re[7]||0),K=Number(re[9]||0),G=Number(re[11]||0);if(U){if(ne.length===2)return l;ne=Number(ne);var X;try{var q=o.getComponentMethod("calendars","getCal")(B);if(Q){var W=oe.charAt(oe.length-1)==="i";oe=parseInt(oe,10),X=q.newDate(ne,q.toMonthIndex(ne,oe,W),V)}else X=q.newDate(ne,Number(oe),V)}catch{return l}return X?(X.toJD()-a)*e+$*t+K*n+G*r:l}ne.length===2?ne=(Number(ne)+2e3-f)%100+f:ne=Number(ne),oe-=1;var ee=new Date(Date.UTC(2e3,oe,V,$,K));return ee.setUTCFullYear(ne),ee.getUTCMonth()!==oe||ee.getUTCDate()!==V?l:ee.getTime()+G*r},i=J.MIN_MS=J.dateTime2ms("-9999"),T=J.MAX_MS=J.dateTime2ms("9999-12-31 23:59:59.9999"),J.isDateTime=function(R,B){return J.dateTime2ms(R,B)!==l};function S(R,B){return String(R+Math.pow(10,B)).slice(1)}var M=90*e,C=3*t,_=5*n;J.ms2DateTime=function(R,B,F){if(typeof R!="number"||!(R>=i&&R<=T))return l;B||(B=0);var P=Math.floor(E(R+.05,1)*10),j=Math.round(R-P/10),U,Z,Q,re,ne,oe;if(p(F)){var V=Math.floor(j/e)+a,$=Math.floor(E(R,e));try{U=o.getComponentMethod("calendars","getCal")(F).fromJD(V).formatDate("yyyy-mm-dd")}catch{U=s("G%Y-%m-%d")(new Date(j))}if(U.charAt(0)==="-")for(;U.length<11;)U="-0"+U.slice(1);else for(;U.length<10;)U="0"+U;Z=B=i+e&&R<=T-e))return l;var B=Math.floor(E(R+.05,1)*10),F=new Date(Math.round(R-B/10)),P=H("%Y-%m-%d")(F),j=F.getHours(),U=F.getMinutes(),Z=F.getSeconds(),Q=F.getUTCMilliseconds()*10+B;return w(P,j,U,Z,Q)};function w(R,B,F,P,j){if((B||F||P||j)&&(R+=" "+S(B,2)+":"+S(F,2),(P||j)&&(R+=":"+S(P,2),j))){for(var U=4;j%10===0;)U-=1,j/=10;R+="."+S(j,U)}return R}J.cleanDate=function(R,B,F){if(R===l)return B;if(J.isJSDate(R)||typeof R=="number"&&isFinite(R)){if(p(F))return x.error("JS Dates and milliseconds are incompatible with world calendars",R),B;if(R=J.ms2DateTimeLocal(+R),!R&&B!==void 0)return B}else if(!J.isDateTime(R,F))return x.error("unrecognized date",R),B;return R};var h=/%\d?f/g,u=/%h/g,A={1:"1",2:"1",3:"2",4:"2"};function b(R,B,F,P){R=R.replace(h,function(U){var Z=Math.min(+U.charAt(1)||6,6),Q=(B/1e3%1+2).toFixed(Z).slice(2).replace(/0+$/,"")||"0";return Q});var j=new Date(Math.floor(B+.05));if(R=R.replace(u,function(){return A[F("%q")(j)]}),p(P))try{R=o.getComponentMethod("calendars","worldCalFmt")(R,B,P)}catch{return"Invalid"}return F(R)(j)}var z=[59,59.9,59.99,59.999,59.9999];function I(R,B){var F=E(R+.05,e),P=S(Math.floor(F/t),2)+":"+S(E(Math.floor(F/n),60),2);if(B!=="M"){v(B)||(B=0);var j=Math.min(E(R/r,60),z[B]),U=(100+j).toFixed(B).slice(1);B>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),P+=":"+U}return P}J.formatDate=function(R,B,F,P,j,U){if(j=p(j)&&j,!B)if(F==="y")B=U.year;else if(F==="m")B=U.month;else if(F==="d")B=U.dayMonth+` `+U.year;else return I(R,F)+` -`+b(U.dayMonthYear,R,P,j);return b(B,R,P,j)};var N=3*e;J.incrementMonth=function(R,B,F){F=p(F)&&F;var P=E(R,e);if(R=Math.round(R-P),F)try{var j=Math.round(R/e)+n,U=o.getComponentMethod("calendars","getCal")(F),Z=U.fromJD(j);return B%12?U.add(Z,B,"m"):U.add(Z,B/12,"y"),(Z.toJD()-n)*e+P}catch{x.error("invalid ms "+R+" in calendar "+F)}var Q=new Date(R+N);return Q.setUTCMonth(Q.getUTCMonth()+B)+P-N},J.findExactDates=function(R,B){for(var F=0,P=0,j=0,U=0,Z,Q,re=p(B)&&o.getComponentMethod("calendars","getCal")(B),ae=0;ae1?(n[c-1]-n[0])/(c-1):1,p,g;for(h>=0?g=o?l:e:g=o?a:t,r+=h*k*(o?-1:1)*(h>=0?1:-1);s90&&v.log("Long binary search..."),s-1};function l(r,n){return rn}function a(r,n){return r>=n}J.sorterAsc=function(r,n){return r-n},J.sorterDes=function(r,n){return n-r},J.distinctVals=function(r){var n=r.slice();n.sort(J.sorterAsc);var o;for(o=n.length-1;o>-1&&n[o]===E;o--);for(var s=n[o]-n[0]||1,c=s/(o||1)/1e4,m=[],h,p=0;p<=o;p++){var g=n[p],i=g-h;h===void 0?(m.push(g),h=g):i>c&&(s=Math.min(s,i),m.push(g),h=g)}return{vals:m,minDiff:s}},J.roundUp=function(r,n,o){for(var s=0,c=n.length-1,m,h=0,p=o?0:1,g=o?1:0,i=o?Math.ceil:Math.floor;s0&&(s=1),o&&s)return r.sort(n)}return s?r:r.reverse()},J.findIndexOfMin=function(r,n){n=n||x;for(var o=1/0,s,c=0;cyb});function YA(J){return Object.keys(J).sort()}var yb,Ev=In({"src/lib/sort_object_keys.ts"(){"use strict";yb=YA}}),XA=Ee({"src/lib/stats.js"(J){"use strict";var V=mi(),v=vs().isArrayOrTypedArray;J.aggNums=function(x,E,k,l){var e,t;if((!l||l>k.length)&&(l=k.length),V(E)||(E=!1),v(k[0])){for(t=new Array(l),e=0;ex.length-1)return x[x.length-1];var k=E%1;return k*x[Math.ceil(E)]+(1-k)*x[Math.floor(E)]}}}),$A=Ee({"src/lib/angles.js"(J,V){"use strict";var v=(Vd(),ra(lh)),x=v.mod,E=v.modHalf,k=Math.PI,l=2*k;function e(g){return g/180*k}function t(g){return g/k*180}function a(g){return Math.abs(g[1]-g[0])>l-1e-14}function r(g,i){return E(i-g,l)}function n(g,i){return Math.abs(r(g,i))}function o(g,i){if(a(i))return!0;var w,S;i[0]S&&(S+=l);var M=x(g,l),C=M+l;return M>=w&&M<=S||C>=w&&C<=S}function s(g,i,w,S){if(!o(i,S))return!1;var M,C;return w[0]=M&&g<=C}function c(g,i,w,S,M,C,_){M=M||0,C=C||0;var T=a([w,S]),f,u,A,b,z;T?(f=0,u=k,A=l):w1/3&&v.x<2/3},J.isRightAnchor=function(v){return v.xanchor==="right"||v.xanchor==="auto"&&v.x>=2/3},J.isTopAnchor=function(v){return v.yanchor==="top"||v.yanchor==="auto"&&v.y>=2/3},J.isMiddleAnchor=function(v){return v.yanchor==="middle"||v.yanchor==="auto"&&v.y>1/3&&v.y<2/3},J.isBottomAnchor=function(v){return v.yanchor==="bottom"||v.yanchor==="auto"&&v.y<=1/3}}}),KA=Ee({"src/lib/geometry2d.js"(J){"use strict";var V=(Vd(),ra(lh)).mod;J.segmentsIntersect=v;function v(e,t,a,r,n,o,s,c){var m=a-e,h=n-e,p=s-n,g=r-t,i=o-t,w=c-o,S=m*w-p*g;if(S===0)return null;var M=(h*w-p*i)/S,C=(h*g-m*i)/S;return C<0||C>1||M<0||M>1?null:{x:e+m*M,y:t+g*M}}J.segmentDistance=function(t,a,r,n,o,s,c,m){if(v(t,a,r,n,o,s,c,m))return 0;var h=r-t,p=n-a,g=c-o,i=m-s,w=h*h+p*p,S=g*g+i*i,M=Math.min(x(h,p,w,o-t,s-a),x(h,p,w,c-t,m-a),x(g,i,S,t-o,a-s),x(g,i,S,r-o,n-s));return Math.sqrt(M)};function x(e,t,a,r,n){var o=r*e+n*t;if(o<0)return r*r+n*n;if(o>a){var s=r-e,c=n-t;return s*s+c*c}else{var m=r*t-n*e;return m*m/a}}var E,k,l;J.getTextLocation=function(t,a,r,n){if((t!==k||n!==l)&&(E={},k=t,l=n),E[r])return E[r];var o=t.getPointAtLength(V(r-n/2,a)),s=t.getPointAtLength(V(r+n/2,a)),c=Math.atan((s.y-o.y)/(s.x-o.x)),m=t.getPointAtLength(V(r,a)),h=(m.x*4+o.x+s.x)/6,p=(m.y*4+o.y+s.y)/6,g={x:h,y:p,theta:c};return E[r]=g,g},J.clearLocationCache=function(){k=null},J.getVisibleSegment=function(t,a,r){var n=a.left,o=a.right,s=a.top,c=a.bottom,m=0,h=t.getTotalLength(),p=h,g,i;function w(M){var C=t.getPointAtLength(M);M===0?g=C:M===h&&(i=C);var _=C.xo?C.x-o:0,T=C.yc?C.y-c:0;return Math.sqrt(_*_+T*T)}for(var S=w(m);S;){if(m+=S+r,m>p)return;S=w(m)}for(S=w(p);S;){if(p-=S+r,m>p)return;S=w(p)}return{min:m,max:p,len:p-m,total:h,isClosed:m===0&&p===h&&Math.abs(g.x-i.x)<.1&&Math.abs(g.y-i.y)<.1}},J.findPointOnPath=function(t,a,r,n){n=n||{};for(var o=n.pathLength||t.getTotalLength(),s=n.tolerance||.001,c=n.iterationLimit||30,m=t.getPointAtLength(0)[r]>t.getPointAtLength(o)[r]?-1:1,h=0,p=0,g=o,i,w,S;h0?g=i:p=i,h++}return w}}}),Dg=Ee({"src/lib/throttle.js"(J){"use strict";var V={};J.throttle=function(E,k,l){var e=V[E],t=Date.now();if(!e){for(var a in V)V[a].tse.ts+k){r();return}e.timer=setTimeout(function(){r(),e.timer=null},k)},J.done=function(x){var E=V[x];return!E||!E.timer?Promise.resolve():new Promise(function(k){var l=E.onDone;E.onDone=function(){l&&l(),k(),E.onDone=null}})},J.clear=function(x){if(x)v(V[x]),delete V[x];else for(var E in V)J.clear(E)};function v(x){x&&x.timer!==null&&(clearTimeout(x.timer),x.timer=null)}}}),JA=Ee({"src/lib/clear_responsive.js"(J,V){"use strict";V.exports=function(x){x._responsiveChartHandler&&(window.removeEventListener("resize",x._responsiveChartHandler),delete x._responsiveChartHandler)}}}),QA=Ee({"node_modules/is-mobile/index.js"(J,V){"use strict";V.exports=k,V.exports.isMobile=k,V.exports.default=k;var v=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,x=/CrOS/,E=/android|ipad|playbook|silk/i;function k(l){l||(l={});let e=l.ua;if(!e&&typeof navigator<"u"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;let t=v.test(e)&&!x.test(e)||!!l.tablet&&E.test(e);return!t&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(t=!0),t}}}),eM=Ee({"src/lib/preserve_drawing_buffer.js"(J,V){"use strict";var v=mi(),x=QA();V.exports=function(l){var e;if(l&&l.hasOwnProperty("userAgent")?e=l.userAgent:e=E(),typeof e!="string")return!0;var t=x({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!t)for(var a=e.split(" "),r=1;r-1;o--){var s=a[o];if(s.slice(0,8)==="Version/"){var c=s.slice(8).split(".")[0];if(v(c)&&(c=+c),c>=13)return!0}}}return t};function E(){var k;return typeof navigator<"u"&&(k=navigator.userAgent),k&&k.headers&&typeof k.headers["user-agent"]=="string"&&(k=k.headers["user-agent"]),k}}}),tM=Ee({"src/lib/make_trace_groups.js"(J,V){"use strict";var v=Hn();V.exports=function(E,k,l){var e=E.selectAll("g."+l.replace(/\s/g,".")).data(k,function(a){return a[0].trace.uid});e.exit().remove(),e.enter().append("g").attr("class",l),e.order();var t=E.classed("rangeplot")?"nodeRangePlot3":"node3";return e.each(function(a){a[0][t]=v.select(this)}),e}}}),rM=Ee({"src/lib/localize.js"(J,V){"use strict";var v=Ri();V.exports=function(E,k){for(var l=E._context.locale,e=0;e<2;e++){for(var t=E._context.locales,a=0;a<2;a++){var r=(t[l]||{}).dictionary;if(r){var n=r[k];if(n)return n}t=v.localeRegistry}var o=l.split("-")[0];if(o===l)break;l=o}return k}}}),_b=Ee({"src/lib/filter_unique.js"(J,V){"use strict";V.exports=function(x){for(var E={},k=[],l=0,e=0;e1?(k*x+k*E)/k:x+E,e=String(l).length;if(e>16){var t=String(E).length,a=String(x).length;if(e>=a+t){var r=parseFloat(l).toPrecision(12);r.indexOf("e+")===-1&&(l=+r)}}return l}}}),bb={};yn(bb,{default:()=>Ab});function iM(J){return typeof J=="string"&&(J=J.replace(Tb,"")),(0,xb.default)(J)?Number(J):wb.BADNUM}var xb,wb,Tb,Ab,oM=In({"src/lib/clean_number.ts"(){"use strict";xb=Yn(mi()),wb=Yn(Qi()),Tb=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,Ab=iM}}),sM=Ee({"src/lib/slugify.js"(J,V){"use strict";var v=/<[^>]*>/g,x=/[\p{S}\p{P}]/gu,E=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,k=/�/g,l=/\s+/g,e="-",t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(t+"{3,}","g"),r=new RegExp(t+"$","g"),n=60;function o(s){return typeof s.toWellFormed=="function"?s.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(s))}V.exports=function(c,m=n){var h=o(c??"").replace(k,"").replace(v," ").replace(x,p=>p===e?p:"").toLowerCase().trim().replace(l,e).replace(E,"").replace(a,e);return h.length<=m?h:Array.from(h).slice(0,m).join("").replace(r,"")}}}),Vr=Ee({"src/lib/index.js"(J,V){"use strict";var v=Hn(),x=ji().utcFormat,E=ls().format,k=mi(),l=Qi(),e=l.FP_SAFE,t=-e,a=l.BADNUM,r=V.exports={};r.adjustFormat=function(q){if(!q||/^\d[.]\df/.test(q)||/[.]\d%/.test(q))return q;if(q==="0.f")return"~f";if(/^\d%/.test(q))return"~%";if(/^\ds/.test(q))return"~s";var $=(q.match(/^[+\-( ]?/)||[""])[0],ee=q.slice($.length);return!/^[~,.0$#]/.test(ee)&&/[&fps]/.test(ee)?$+"~"+ee:q};var n={};r.warnBadFormat=function(Y){var q=String(Y);n[q]||(n[q]=1,r.warn('encountered bad format: "'+q+'"'))},r.noFormat=function(Y){return String(Y)},r.numberFormat=function(Y){var q;try{q=E(r.adjustFormat(Y))}catch{return r.warnBadFormat(Y),r.noFormat}return q},r.nestedProperty=dl(),r.keyedContainer=ec(),r.relativeAttr=Ec(),r.isPlainObject=Us(),r.toLogRange=Jf(),r.relinkPrivateKeys=Ag();var o=vs();r.isArrayBuffer=o.isArrayBuffer,r.isTypedArray=o.isTypedArray,r.isArrayOrTypedArray=o.isArrayOrTypedArray,r.isArray1D=o.isArray1D,r.ensureArray=o.ensureArray,r.concat=o.concat,r.maxRowLength=o.maxRowLength,r.minRowLength=o.minRowLength;var s=(Vd(),ra(lh));r.mod=s.mod,r.modHalf=s.modHalf;var c=vA();r.valObjectMeta=c.valObjectMeta,r.coerce=c.coerce,r.coerce2=c.coerce2,r.coerceFont=c.coerceFont,r.coercePattern=c.coercePattern,r.coerceHoverinfo=c.coerceHoverinfo,r.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,r.validate=c.validate;var m=WA();r.dateTime2ms=m.dateTime2ms,r.isDateTime=m.isDateTime,r.ms2DateTime=m.ms2DateTime,r.ms2DateTimeLocal=m.ms2DateTimeLocal,r.cleanDate=m.cleanDate,r.isJSDate=m.isJSDate,r.formatDate=m.formatDate,r.incrementMonth=m.incrementMonth,r.dateTick0=m.dateTick0,r.dfltRange=m.dfltRange,r.findExactDates=m.findExactDates,r.MIN_MS=m.MIN_MS,r.MAX_MS=m.MAX_MS;var h=Pg();r.findBin=h.findBin,r.sorterAsc=h.sorterAsc,r.sorterDes=h.sorterDes,r.distinctVals=h.distinctVals,r.roundUp=h.roundUp,r.sort=h.sort,r.findIndexOfMin=h.findIndexOfMin,r.sortObjectKeys=(Ev(),ra(Hd)).default;var p=XA();r.aggNums=p.aggNums,r.len=p.len,r.mean=p.mean,r.geometricMean=p.geometricMean,r.median=p.median,r.midRange=p.midRange,r.variance=p.variance,r.stdev=p.stdev,r.interp=p.interp;var g=kg();r.init2dArray=g.init2dArray,r.transposeRagged=g.transposeRagged,r.dot=g.dot,r.translationMatrix=g.translationMatrix,r.rotationMatrix=g.rotationMatrix,r.rotationXYMatrix=g.rotationXYMatrix,r.apply3DTransform=g.apply3DTransform,r.apply2DTransform=g.apply2DTransform,r.apply2DTransform2=g.apply2DTransform2,r.convertCssMatrix=g.convertCssMatrix,r.inverseTransformMatrix=g.inverseTransformMatrix;var i=$A();r.deg2rad=i.deg2rad,r.rad2deg=i.rad2deg,r.angleDelta=i.angleDelta,r.angleDist=i.angleDist,r.isFullCircle=i.isFullCircle,r.isAngleInsideSector=i.isAngleInsideSector,r.isPtInsideSector=i.isPtInsideSector,r.pathArc=i.pathArc,r.pathSector=i.pathSector,r.pathAnnulus=i.pathAnnulus;var w=ZA();r.isLeftAnchor=w.isLeftAnchor,r.isCenterAnchor=w.isCenterAnchor,r.isRightAnchor=w.isRightAnchor,r.isTopAnchor=w.isTopAnchor,r.isMiddleAnchor=w.isMiddleAnchor,r.isBottomAnchor=w.isBottomAnchor;var S=KA();r.segmentsIntersect=S.segmentsIntersect,r.segmentDistance=S.segmentDistance,r.getTextLocation=S.getTextLocation,r.clearLocationCache=S.clearLocationCache,r.getVisibleSegment=S.getVisibleSegment,r.findPointOnPath=S.findPointOnPath;var M=vo();r.extendFlat=M.extendFlat,r.extendDeep=M.extendDeep,r.extendDeepAll=M.extendDeepAll,r.extendDeepNoArrays=M.extendDeepNoArrays;var C=po();r.log=C.log,r.warn=C.warn,r.error=C.error;var _=(Rp(),ra(Sv));r.counterRegex=_.counter;var T=Dg();r.throttle=T.throttle,r.throttleDone=T.done,r.clearThrottle=T.clear;var f=N0();r.getGraphDiv=f.getGraphDiv,r.isPlotDiv=f.isPlotDiv,r.removeElement=f.removeElement,r.addStyleRule=f.addStyleRule,r.addRelatedStyleRule=f.addRelatedStyleRule,r.deleteRelatedStyleRule=f.deleteRelatedStyleRule,r.setStyleOnHover=f.setStyleOnHover,r.getFullTransformMatrix=f.getFullTransformMatrix,r.getElementTransformMatrix=f.getElementTransformMatrix,r.getElementAndAncestors=f.getElementAndAncestors,r.equalDomRects=f.equalDomRects,r.clearResponsive=JA(),r.preserveDrawingBuffer=eM(),r.makeTraceGroups=tM(),r._=rM(),r.notifier=no(),r.filterUnique=_b(),r.filterVisible=nM(),r.pushUnique=vb(),r.increment=aM(),r.cleanNumber=(oM(),ra(bb)).default,r.slugify=sM(),r.ensureNumber=function(q){return k(q)?(q=Number(q),q>e||q=q?!1:k(Y)&&Y>=0&&Y%1===0},r.noop=Eg(),r.identity=j0(),r.repeat=function(Y,q){for(var $=new Array(q),ee=0;ee$?Math.max($,Math.min(q,Y)):Math.max(q,Math.min($,Y))},r.bBoxIntersect=function(Y,q,$){return $=$||0,Y.left<=q.right+$&&q.left<=Y.right+$&&Y.top<=q.bottom+$&&q.top<=Y.bottom+$},r.simpleMap=function(Y,q,$,ee,ne){for(var fe=Y.length,ye=new Array(fe),xe=0;xe=Math.pow(2,$)?ne>10?(r.warn("randstr failed uniqueness"),ye):Y(q,$,ee,(ne||0)+1):ye},r.OptionControl=function(Y,q){Y||(Y={}),q||(q="opt");var $={};return $.optionList=[],$._newoption=function(ee){ee[q]=Y,$[ee.name]=ee,$.optionList.push(ee)},$["_"+q]=Y,$},r.smooth=function(Y,q){if(q=Math.round(q)||0,q<2)return Y;var $=Y.length,ee=2*$,ne=2*q-1,fe=new Array(ne),ye=new Array($),xe,Ae,Me,Ie;for(xe=0;xe=ee&&(Me-=ee*Math.floor(Me/ee)),Me<0?Me=-1-Me:Me>=$&&(Me=ee-1-Me),Ie+=Y[Me]*fe[Ae];ye[xe]=Ie}return ye},r.syncOrAsync=function(Y,q,$){var ee,ne;function fe(){return r.syncOrAsync(Y,q,$)}for(;Y.length;)if(ne=Y.splice(0,1)[0],ee=ne(q),ee&&ee.then)return ee.then(fe);return $&&$(q)},r.stripTrailingSlash=function(Y){return Y.slice(-1)==="/"?Y.slice(0,-1):Y},r.noneOrAll=function(Y,q,$){if(Y){var ee=!1,ne=!0,fe,ye;for(fe=0;fe<$.length;fe++)ye=Y[$[fe]],ye!=null?ee=!0:ne=!1;if(ee&&!ne)for(fe=0;fe<$.length;fe++)Y[$[fe]]=q[$[fe]]}},r.mergeArray=function(Y,q,$,ee){var ne=typeof ee=="function";if(r.isArrayOrTypedArray(Y))for(var fe=Math.min(Y.length,q.length),ye=0;ye0?ne:0})},r.fillArray=function(Y,q,$,ee){if(ee=ee||r.identity,r.isArrayOrTypedArray(Y))for(var ne=0;nez.test(window.navigator.userAgent);var I=/Firefox\/(\d+)\.\d+/;r.getFirefoxVersion=function(){var Y=I.exec(window.navigator.userAgent);if(Y&&Y.length===2){var q=parseInt(Y[1]);if(!isNaN(q))return q}return null},r.isD3Selection=function(Y){return Y instanceof v.selection},r.ensureSingle=function(Y,q,$,ee){var ne=Y.select(q+($?"."+$:""));if(ne.size())return ne;var fe=Y.append(q);return $&&fe.classed($,!0),ee&&fe.call(ee),fe},r.ensureSingleById=function(Y,q,$,ee){var ne=Y.select(q+"#"+$);if(ne.size())return ne;var fe=Y.append(q).attr("id",$);return ee&&fe.call(ee),fe},r.objectFromPath=function(Y,q){for(var $=Y.split("."),ee,ne=ee={},fe=0;fe<$.length;fe++){var ye=$[fe],xe=null,Ae=$[fe].match(/(.*)\[([0-9]+)\]/);Ae?(ye=Ae[1],xe=Ae[2],ee=ee[ye]=[],fe===$.length-1?ee[xe]=q:ee[xe]={},ee=ee[xe]):(fe===$.length-1?ee[ye]=q:ee[ye]={},ee=ee[ye])}return ne};var N=/^([^\[\.]+)\.(.+)?/,R=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function B(Y){return Y.slice(0,2)==="__"}r.expandObjectPaths=function(Y){var q,$,ee,ne,fe,ye,xe;if(typeof Y=="object"&&!Array.isArray(Y)){for($ in Y)if(Y.hasOwnProperty($))if(q=$.match(N)){if(ne=Y[$],ee=q[1],B(ee))continue;delete Y[$],Y[ee]=r.extendDeepNoArrays(Y[ee]||{},r.objectFromPath($,r.expandObjectPaths(ne))[ee])}else if(q=$.match(R)){if(ne=Y[$],ee=q[1],B(ee))continue;if(fe=parseInt(q[2]),delete Y[$],Y[ee]=Y[ee]||[],q[3]===".")xe=q[4],ye=Y[ee][fe]=Y[ee][fe]||{},r.extendDeepNoArrays(ye,r.objectFromPath(xe,r.expandObjectPaths(ne)));else{if(B(ee))continue;Y[ee][fe]=r.expandObjectPaths(ne)}}else{if(B($))continue;Y[$]=r.expandObjectPaths(Y[$])}}return Y},r.numSeparate=function(Y,q,$){if($||($=!1),typeof q!="string"||q.length===0)throw new Error("Separator string required for formatting!");typeof Y=="number"&&(Y=String(Y));var ee=/(\d+)(\d{3})/,ne=q.charAt(0),fe=q.charAt(1),ye=Y.split("."),xe=ye[0],Ae=ye.length>1?ne+ye[1]:"";if(fe&&(ye.length>1||xe.length>4||$))for(;ee.test(xe);)xe=xe.replace(ee,"$1"+fe+"$2");return xe+Ae},r.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var F=/^\w*$/;r.templateString=function(Y,q){var $={};return Y.replace(r.TEMPLATE_STRING_REGEX,function(ee,ne){var fe;return F.test(ne)?fe=q[ne]:($[ne]=$[ne]||r.nestedProperty(q,ne).get,fe=$[ne](!0)),fe!==void 0?fe:""})};var P={max:10,count:0,name:"hovertemplate"};r.hovertemplateString=Y=>ae(Qr(Nr({},Y),{opts:P}));var j={max:10,count:0,name:"texttemplate"};r.texttemplateString=Y=>ae(Qr(Nr({},Y),{opts:j}));var U=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Z(Y){var q=Y.match(U);return q?{key:q[1],op:q[2],number:Number(q[3])}:{key:Y,op:null,number:null}}var Q={max:10,count:0,name:"texttemplate",parseMultDiv:!0};r.texttemplateStringForShapes=Y=>ae(Qr(Nr({},Y),{opts:Q}));var re=/^[:|\|]/;function ae({data:Y=[],locale:q,fallback:$,labels:ee={},opts:ne,template:fe}){return fe.replace(r.TEMPLATE_STRING_REGEX,(ye,xe,Ae)=>{let Me=["xother","yother"].includes(xe),Ie=["_xother","_yother"].includes(xe),Ue=["_xother_","_yother_"].includes(xe),qe=["xother_","yother_"].includes(xe),ke=Me||Ie||qe||Ue;(Ie||Ue)&&(xe=xe.substring(1)),(qe||Ue)&&(xe=xe.substring(0,xe.length-1));let ge=null,ue=null;if(ne.parseMultDiv){var ve=Z(xe);xe=ve.key,ge=ve.op,ue=ve.number}let se;if(ke){if(ee[xe]===void 0)return"";se=ee[xe]}else for(let Ge of Y)if(Ge){if(Ge.hasOwnProperty(xe)){se=Ge[xe];break}if(F.test(xe)||(se=r.nestedProperty(Ge,xe).get(!0)),se!==void 0)break}if(se===void 0){let{count:Ge,max:gt,name:mt}=ne,Tt=$===!1?ye:$;return Ge=oe&&ye<=H,Me=xe>=oe&&xe<=H;if(Ae&&(ee=10*ee+ye-oe),Me&&(ne=10*ne+xe-oe),!Ae||!Me){if(ee!==ne)return ee-ne;if(ye!==xe)return ye-xe}}return ne-ee};var X=2e9;r.seedPseudoRandom=function(){X=2e9},r.pseudoRandom=function(){var Y=X;return X=(69069*X+1)%4294967296,Math.abs(X-Y)<429496729?r.pseudoRandom():X/4294967296},r.fillText=function(Y,q,$){var ee=Array.isArray($)?function(ye){$.push(ye)}:function(ye){$.text=ye},ne=r.extractOption(Y,q,"htx","hovertext");if(r.isValidTextValue(ne))return ee(ne);var fe=r.extractOption(Y,q,"tx","text");if(r.isValidTextValue(fe))return ee(fe)},r.isValidTextValue=function(Y){return Y||Y===0},r.formatPercent=function(Y,q){q=q||0;for(var $=(Math.round(100*Y*Math.pow(10,q))*Math.pow(.1,q)).toFixed(q)+"%",ee=0;ee1&&(Me=1):Me=0,r.strTranslate(ne-Me*($+ye),fe-Me*(ee+xe))+r.strScale(Me)+(Ae?"rotate("+Ae+(q?"":" "+$+" "+ee)+")":"")},r.setTransormAndDisplay=function(Y,q){Y.attr("transform",r.getTextTransform(q)),Y.style("display",q.scale?null:"none")},r.ensureUniformFontSize=function(Y,q){var $=r.extendFlat({},q);return $.size=Math.max(q.size,Y._fullLayout.uniformtext.minsize||0),$},r.join2=function(Y,q,$){var ee=Y.length;return ee>1?Y.slice(0,-1).join(q)+$+Y[ee-1]:Y.join(q)},r.bigFont=function(Y){return Math.round(1.2*Y)};var K=r.getFirefoxVersion(),G=K!==null&&K<86;r.getPositionFromD3Event=function(){return G?[v.event.layerX,v.event.layerY]:[v.event.offsetX,v.event.offsetY]}}}),lM=Ee({"build/plotcss.js"(){"use strict";var J=Vr(),V={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;text-decoration:underline;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--account":"margin-top:16px;padding:8px;border-radius:3px;font-size:.9em;background-color:#edf1f8;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(x in V)v=x.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),J.addStyleRule(v,V[x]);var v,x}}),Mb=Ee({"node_modules/is-browser/client.js"(J,V){V.exports=!0}}),Sb=Ee({"node_modules/has-hover/index.js"(J,V){"use strict";var v=Mb(),x;typeof window.matchMedia=="function"?x=!window.matchMedia("(hover: none)").matches:x=v,V.exports=x}}),kv=Ee({"node_modules/events/events.js"(J,V){"use strict";var v=typeof Reflect=="object"?Reflect:null,x=v&&typeof v.apply=="function"?v.apply:function(C,_,T){return Function.prototype.apply.call(C,_,T)},E;v&&typeof v.ownKeys=="function"?E=v.ownKeys:Object.getOwnPropertySymbols?E=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:E=function(C){return Object.getOwnPropertyNames(C)};function k(M){console&&console.warn&&console.warn(M)}var l=Number.isNaN||function(C){return C!==C};function e(){e.init.call(this)}V.exports=e,V.exports.once=i,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var t=10;function a(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return t},set:function(M){if(typeof M!="number"||M<0||l(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");t=M}}),e.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},e.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||l(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function r(M){return M._maxListeners===void 0?e.defaultMaxListeners:M._maxListeners}e.prototype.getMaxListeners=function(){return r(this)},e.prototype.emit=function(C){for(var _=[],T=1;T0&&(A=_[0]),A instanceof Error)throw A;var b=new Error("Unhandled error."+(A?" ("+A.message+")":""));throw b.context=A,b}var z=u[C];if(z===void 0)return!1;if(typeof z=="function")x(z,this,_);else for(var I=z.length,N=h(z,I),T=0;T0&&A.length>f&&!A.warned){A.warned=!0;var b=new Error("Possible EventEmitter memory leak detected. "+A.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");b.name="MaxListenersExceededWarning",b.emitter=M,b.type=C,b.count=A.length,k(b)}return M}e.prototype.addListener=function(C,_){return n(this,C,_,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(C,_){return n(this,C,_,!0)};function o(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(M,C,_){var T={fired:!1,wrapFn:void 0,target:M,type:C,listener:_},f=o.bind(T);return f.listener=_,T.wrapFn=f,f}e.prototype.once=function(C,_){return a(_),this.on(C,s(this,C,_)),this},e.prototype.prependOnceListener=function(C,_){return a(_),this.prependListener(C,s(this,C,_)),this},e.prototype.removeListener=function(C,_){var T,f,u,A,b;if(a(_),f=this._events,f===void 0)return this;if(T=f[C],T===void 0)return this;if(T===_||T.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete f[C],f.removeListener&&this.emit("removeListener",C,T.listener||_));else if(typeof T!="function"){for(u=-1,A=T.length-1;A>=0;A--)if(T[A]===_||T[A].listener===_){b=T[A].listener,u=A;break}if(u<0)return this;u===0?T.shift():p(T,u),T.length===1&&(f[C]=T[0]),f.removeListener!==void 0&&this.emit("removeListener",C,b||_)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(C){var _,T,f;if(T=this._events,T===void 0)return this;if(T.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):T[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete T[C]),this;if(arguments.length===0){var u=Object.keys(T),A;for(f=0;f=0;f--)this.removeListener(C,_[f]);return this};function c(M,C,_){var T=M._events;if(T===void 0)return[];var f=T[C];return f===void 0?[]:typeof f=="function"?_?[f.listener||f]:[f]:_?g(f):h(f,f.length)}e.prototype.listeners=function(C){return c(this,C,!0)},e.prototype.rawListeners=function(C){return c(this,C,!1)},e.listenerCount=function(M,C){return typeof M.listenerCount=="function"?M.listenerCount(C):m.call(M,C)},e.prototype.listenerCount=m;function m(M){var C=this._events;if(C!==void 0){var _=C[M];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}e.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]};function h(M,C){for(var _=new Array(C),T=0;T{},{passive:!0}),E},triggerHandler:function(E,k,l){var e,t=E._ev;if(!t)return;var a=t._events[k];if(!a)return;function r(o){if(o.listener){if(t.removeListener(k,o.listener),!o.fired)return o.fired=!0,o.listener.apply(t,[l])}else return o.apply(t,[l])}a=Array.isArray(a)?a:[a];var n;for(n=0;nx.queueLength&&(l.undoQueue.queue.shift(),l.undoQueue.index--)},k.startSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!0,l.undoQueue.beginSequence=!0},k.stopSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!1,l.undoQueue.beginSequence=!1},k.undo=function(e){var t,a;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,a=0;a=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,a=0;a=P.length)return!1;if(I.dimensions===2){if(R++,N.length===R)return I;var j=N[R];if(!S(j))return!1;I=P[F][j]}else I=P[F]}else I=P}}return I}function S(I){return I===Math.round(I)&&I>=0}function M(I){var N,R;N=V.modules[I]._module,R=N.basePlotModule;var B={};B.type=null;var F=a({},x),P=a({},N.attributes);J.crawl(P,function(Z,Q,re,ae,oe){o(F,oe).set(void 0),Z===void 0&&o(P,oe).set(void 0)}),a(B,F),V.traceIs(I,"noOpacity")&&delete B.opacity,V.traceIs(I,"showLegend")||(delete B.showlegend,delete B.legendgroup),V.traceIs(I,"noHover")&&(delete B.hoverinfo,delete B.hoverlabel),N.selectPoints||delete B.selectedpoints,a(B,P),R.attributes&&a(B,R.attributes),B.type=I;var j={meta:N.meta||{},categories:N.categories||{},animatable:!!N.animatable,type:I,attributes:T(B)};if(N.layoutAttributes){var U={};a(U,N.layoutAttributes),j.layoutAttributes=T(U)}return N.animatable||J.crawl(j,function(Z){J.isValObject(Z)&&"anim"in Z&&delete Z.anim}),j}function C(){var I={},N,R;a(I,E);for(N in V.subplotsRegistry)if(R=V.subplotsRegistry[N],!!R.layoutAttributes)if(Array.isArray(R.attr))for(var B=0;B=r&&(a._input||{})._templateitemname;o&&(n=r);var s=t+"["+n+"]",c;function m(){c={},o&&(c[s]={},c[s][x]=o)}m();function h(w,S){c[w]=S}function p(w,S){o?V.nestedProperty(c[s],w).set(S):c[s+"."+w]=S}function g(){var w=c;return m(),w}function i(w,S){w&&p(w,S);var M=g();for(var C in M)V.nestedProperty(e,C).set(M[C])}return{modifyBase:h,modifyItem:p,getUpdateObj:g,applyUpdate:i}}}}),tc=Ee({"src/plots/cartesian/constants.js"(J,V){"use strict";var v=(Rp(),ra(Sv)).counter;V.exports={idRegex:{x:v("x","( domain)?"),y:v("y","( domain)?")},attrRegex:v("[xy]axis"),xAxisMatch:v("xaxis"),yAxisMatch:v("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}}),Xl=Ee({"src/plots/cartesian/axis_ids.js"(J){"use strict";var V=Ri(),v=tc();J.id2name=function(k){if(!(typeof k!="string"||!k.match(v.AX_ID_PATTERN))){var l=k.split(" ")[0].slice(1);return l==="1"&&(l=""),k.charAt(0)+"axis"+l}},J.name2id=function(k){if(k.match(v.AX_NAME_PATTERN)){var l=k.slice(5);return l==="1"&&(l=""),k.charAt(0)+l}},J.cleanId=function(k,l,e){var t=/( domain)$/.test(k);if(!(typeof k!="string"||!k.match(v.AX_ID_PATTERN))&&!(l&&k.charAt(0)!==l)&&!(t&&!e)){var a=k.split(" ")[0].slice(1).replace(/^0+/,"");return a==="1"&&(a=""),k.charAt(0)+a+(t&&e?" domain":"")}},J.list=function(E,k,l){var e=E._fullLayout;if(!e)return[];var t=J.listIds(E,k),a=new Array(t.length),r;for(r=0;re?1:-1:+(E.slice(1)||1)-+(k.slice(1)||1)},J.ref2id=function(E){return/^[xyz]/.test(E)?E.split(" ")[0]:!1};function x(E,k){if(k&&k.length){for(var l=0;l0?".":"")+o;v.isPlainObject(s)?e(s,a,c,n+1):a(c,o,s)}})}}}),vl=Ee({"src/plots/plots.js"(J,V){"use strict";var v=Hn(),x=ji().timeFormatLocale,E=ls().formatLocale,k=mi(),l=iu(),e=qi().version,t=Ri(),a=Bp(),r=xs(),n=Vr(),o=Qa(),s=Qi().BADNUM,c=Xl(),m=Gd().clearOutline,h=Ig(),p=O0(),g=Eb(),i=uf().getModuleCalcData,w=n.relinkPrivateKeys,S=n._,M=V.exports={};n.extendFlat(M,t),M.attributes=ia(),M.attributes.type.values=M.allTypes,M.fontAttrs=Xs(),M.layoutAttributes=Fp();var C=cM();M.executeAPICommand=C.executeAPICommand,M.computeAPICommandBindings=C.computeAPICommandBindings,M.manageCommandObserver=C.manageCommandObserver,M.hasSimpleAPICommandBindings=C.hasSimpleAPICommandBindings,M.redrawText=function(H){return H=n.getGraphDiv(H),new Promise(function(X){setTimeout(function(){H._fullLayout&&(t.getComponentMethod("annotations","draw")(H),t.getComponentMethod("legend","draw")(H),t.getComponentMethod("colorbar","draw")(H),X(M.previousPromises(H)))},300)})},M.resize=function(H){H=n.getGraphDiv(H);var X,K=new Promise(function(G,Y){(!H||n.isHidden(H))&&Y(new Error("Resize must be passed a displayed plot div element.")),H._redrawTimer&&clearTimeout(H._redrawTimer),H._resolveResize&&(X=H._resolveResize),H._resolveResize=G,H._redrawTimer=setTimeout(function(){if(!H.layout||H.layout.width&&H.layout.height||n.isHidden(H)){G(H);return}delete H.layout.width,delete H.layout.height;var q=H.changed;H.autoplay=!0,t.call("relayout",H,{autosize:!0}).then(function(){H.changed=q,H._resolveResize===G&&(delete H._resolveResize,G(H))})},100)});return X&&X(K),K},M.previousPromises=function(H){if((H._promises||[]).length)return Promise.all(H._promises).then(function(){H._promises=[]})},M.sendDataToCloud=function(H,X){H.emit("plotly_beforeexport");let K=new URL(X).origin;var G=M.graphJson(H,!1,"object");G.version=e;var Y=new URL(X);Y.searchParams.set("origin",window.location.origin);var q=window.open(Y.href,"_blank");if(!q){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),H.emit("plotly_exportfail");return}var $=function(ee){ee.origin===K&&ee.data&&ee.data.type==="CHART_AUTH_SUCCESS"&&(q.postMessage({type:"chart",chart:G},K),window.removeEventListener("message",$),H.emit("plotly_afterexport"))};return window.addEventListener("message",$),!1};var _=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],T=["year","month","dayMonth","dayMonthYear"];M.supplyDefaults=function(H,X){var K=X&&X.skipUpdateCalc,G=H._fullLayout||{};if(G._skipDefaults){delete G._skipDefaults;return}var Y=H._fullLayout={},q=H.layout||{},$=H._fullData||[],ee=H._fullData=[],ne=H.data||[],fe=H.calcdata||[],ye=H._context||{},xe;H._transitionData||M.createTransitionData(H),Y._dfltTitle={plot:S(H,"Click to enter Plot title"),subtitle:S(H,"Click to enter Plot subtitle"),x:S(H,"Click to enter X axis title"),y:S(H,"Click to enter Y axis title"),colorbar:S(H,"Click to enter Colorscale title"),annotation:S(H,"new text")},Y._traceWord=S(H,"trace");var Ae=A(H,_);if(G._initialAutoSizeIsDone){var Me=G.width,Ie=G.height;M.supplyLayoutGlobalDefaults(q,Y,Ae),q.width||(Y.width=Me),q.height||(Y.height=Ie),M.sanitizeMargins(Y)}else{M.supplyLayoutGlobalDefaults(q,Y,Ae);var Ue=!q.width||!q.height,qe=Y.autosize,ke=ye.autosizable,ge=Ue&&(qe||ke);ge?M.plotAutoSize(H,q,Y):Ue&&M.sanitizeMargins(Y),!qe&&Ue&&(q.width=Y.width,q.height=Y.height)}Y._d3locale=b(Ae,Y.separators),Y._extraFormat=A(H,T),Y._initialAutoSizeIsDone=!0,Y._dataLength=ne.length,Y._modules=[],Y._visibleModules=[],Y._basePlotModules=[];var ue=Y._subplots=u(),ve=Y._splomAxes={x:{},y:{}},se=Y._splomSubplots={};Y._splomGridDflt={},Y._scatterStackOpts={},Y._firstScatter={},Y._alignmentOpts={},Y._colorAxes={},Y._requestRangeslider={},Y._traceUids=f($,ne),M.supplyDataDefaults(ne,ee,q,Y);var Te=Object.keys(ve.x),Fe=Object.keys(ve.y);if(Te.length>1&&Fe.length>1){for(t.getComponentMethod("grid","sizeDefaults")(q,Y),xe=0;xe15&&Fe.length>15&&Y.shapes.length===0&&Y.images.length===0,M.linkSubplots(ee,Y,$,G),M.cleanPlot(ee,Y,$,G);var Tt=!!(G._has&&G._has("cartesian")),At=!!(Y._has&&Y._has("cartesian")),Kt=Tt,nr=At;Kt&&!nr?G._bgLayer.remove():nr&&!Kt&&(Y._shouldCreateBgLayer=!0),G._zoomlayer&&!H._dragging&&m({_fullLayout:G}),z(ee,Y),w(Y,G),t.getComponentMethod("colorscale","crossTraceDefaults")(ee,Y),Y._preGUI||(Y._preGUI={}),Y._tracePreGUI||(Y._tracePreGUI={});var _r=Y._tracePreGUI,Zt={},sr;for(sr in _r)Zt[sr]="old";for(xe=0;xe0){var ye=1-2*q;$=Math.round(ye*$),ee=Math.round(ye*ee)}}var xe=M.layoutAttributes.width.min,Ae=M.layoutAttributes.height.min;$1,Ie=!K.height&&Math.abs(G.height-ee)>1;(Ie||Me)&&(Me&&(G.width=$),Ie&&(G.height=ee)),X._initialAutoSize||(X._initialAutoSize={width:$,height:ee}),M.sanitizeMargins(G)},M.supplyLayoutModuleDefaults=function(H,X,K,G){var Y=t.componentsRegistry,q=X._basePlotModules,$,ee,ne,fe=t.subplotsRegistry.cartesian;for($ in Y)ne=Y[$],ne.includeBasePlot&&ne.includeBasePlot(H,X);q.length||q.push(fe),X._has("cartesian")&&(t.getComponentMethod("grid","contentDefaults")(H,X),fe.finalizeSubplots(H,X));for(var ye in X._subplots)X._subplots[ye].sort(n.subplotSort);for(ee=0;ee1&&(K.l/=qe,K.r/=qe)}if(Ae){var ke=(K.t+K.b)/Ae;ke>1&&(K.t/=ke,K.b/=ke)}var ge=K.xl!==void 0?K.xl:K.x,ue=K.xr!==void 0?K.xr:K.x,ve=K.yt!==void 0?K.yt:K.y,se=K.yb!==void 0?K.yb:K.y;Me[X]={l:{val:ge,size:K.l+Ue},r:{val:ue,size:K.r+Ue},b:{val:se,size:K.b+Ue},t:{val:ve,size:K.t+Ue}},Ie[X]=1}if(!G._replotting)return M.doAutoMargin(H)}};function P(H){if("_redrawFromAutoMarginCount"in H._fullLayout)return!1;var X=c.list(H,"",!0);for(var K in X)if(X[K].autoshift||X[K].shift)return!0;return!1}M.doAutoMargin=function(H){var X=H._fullLayout,K=X.width,G=X.height;X._size||(X._size={}),R(X);var Y=X._size,q=X.margin,$={t:0,b:0,l:0,r:0},ee=n.extendFlat({},Y),ne=q.l,fe=q.r,ye=q.t,xe=q.b,Ae=X._pushmargin,Me=X._pushmarginIds,Ie=X.minreducedwidth,Ue=X.minreducedheight;if(q.autoexpand!==!1){for(var qe in Ae)Me[qe]||delete Ae[qe];var ke=H._fullLayout._reservedMargin;for(var ge in ke)for(var ue in ke[ge]){var ve=ke[ge][ue];$[ue]=Math.max($[ue],ve)}Ae.base={l:{val:0,size:ne},r:{val:1,size:fe},t:{val:1,size:ye},b:{val:0,size:xe}};for(var se in $){var Te=0;for(var Fe in Ae)Fe!=="base"&&k(Ae[Fe][se].size)&&(Te=Ae[Fe][se].size>Te?Ae[Fe][se].size:Te);var We=Math.max(0,q[se]-Te);$[se]=Math.max(0,$[se]-We)}for(var Ge in Ae){var gt=Ae[Ge].l||{},mt=Ae[Ge].b||{},Tt=gt.val,At=gt.size,Kt=mt.val,nr=mt.size,_r=K-$.r-$.l,Zt=G-$.t-$.b;for(var sr in Ae){if(k(At)&&Ae[sr].r){var Ot=Ae[sr].r.val,vt=Ae[sr].r.size;if(Ot>Tt){var ht=(At*Ot+(vt-_r)*Tt)/(Ot-Tt),Re=(vt*(1-Tt)+(At-_r)*(1-Ot))/(Ot-Tt);ht+Re>ne+fe&&(ne=ht,fe=Re)}}if(k(nr)&&Ae[sr].t){var Be=Ae[sr].t.val,He=Ae[sr].t.size;if(Be>Kt){var $e=(nr*Be+(He-Zt)*Kt)/(Be-Kt),Ze=(He*(1-Kt)+(nr-Zt)*(1-Be))/(Be-Kt);$e+Ze>xe+ye&&(xe=$e,ye=Ze)}}}}}var Je=n.constrain(K-q.l-q.r,B,Ie),Mt=n.constrain(G-q.t-q.b,F,Ue),dt=Math.max(0,K-Je),Dt=Math.max(0,G-Mt);if(dt){var Ct=(ne+fe)/dt;Ct>1&&(ne/=Ct,fe/=Ct)}if(Dt){var Vt=(xe+ye)/Dt;Vt>1&&(xe/=Vt,ye/=Vt)}if(Y.l=Math.round(ne)+$.l,Y.r=Math.round(fe)+$.r,Y.t=Math.round(ye)+$.t,Y.b=Math.round(xe)+$.b,Y.p=Math.round(q.pad),Y.w=Math.round(K)-Y.l-Y.r,Y.h=Math.round(G)-Y.t-Y.b,!X._replotting&&(M.didMarginChange(ee,Y)||P(H))){"_redrawFromAutoMarginCount"in X?X._redrawFromAutoMarginCount++:X._redrawFromAutoMarginCount=1;var Ht=3*(1+Object.keys(Me).length);if(X._redrawFromAutoMarginCount1)return!0}return!1},M.graphJson=function(H,X=!1,K="json",G=!1,Y=!1){(G&&X&&!H._fullData||G&&!X&&!H._fullLayout)&&M.supplyDefaults(H);var q=G?H._fullData:H.data,$=G?H._fullLayout:H.layout,ee=(H._transitionData||{})._frames;function ne(xe,Ae){if(typeof xe=="function")return Ae?"_function_":null;if(n.isPlainObject(xe)){var Me={};return Object.keys(xe).sort().forEach(function(ke){if(["_","["].indexOf(ke.charAt(0))===-1){if(typeof xe[ke]=="function"){Ae&&(Me[ke]="_function");return}Me[ke]=ne(xe[ke],Ae)}}),Me}var Ie=Array.isArray(xe),Ue=n.isTypedArray(xe);if((Ie||Ue)&&xe.dtype&&xe.shape){var qe=xe.bdata;return ne({dtype:xe.dtype,shape:xe.shape,bdata:n.isArrayBuffer(qe)?l.encode(qe):qe},Ae)}return Ie?xe.map(function(ke){return ne(ke,Ae)}):Ue?n.simpleMap(xe,n.identity):n.isJSDate(xe)?n.ms2DateTimeLocal(+xe):xe}var fe={data:(q||[]).map(function(xe){var Ae=ne(xe);return X&&delete Ae.fit,Ae})};if(!X&&(fe.layout=ne($),G)){var ye=$._size;fe.layout.computed={margin:{b:ye.b,l:ye.l,r:ye.r,t:ye.t}}}return ee&&(fe.frames=ne(ee)),Y&&(fe.config=ne(H._context,!0)),K==="object"?fe:JSON.stringify(fe)},M.modifyFrames=function(H,X){var K,G,Y,q=H._transitionData._frames,$=H._transitionData._frameHash;for(K=0;K0&&(H._transitioningWithDuration=!0),H._transitionData._interruptCallbacks.push(function(){G=!0}),K.redraw&&H._transitionData._interruptCallbacks.push(function(){return t.call("redraw",H)}),H._transitionData._interruptCallbacks.push(function(){H.emit("plotly_transitioninterrupted",[])});var Ae=0,Me=0;function Ie(){return Ae++,function(){Me++,!G&&Me===Ae&&ee(xe)}}K.runFn(Ie),setTimeout(Ie())})}function ee(xe){if(H._transitionData)return q(H._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(K.redraw)return t.call("redraw",H)}).then(function(){H._transitioning=!1,H._transitioningWithDuration=!1,H.emit("plotly_transitioned",[])}).then(xe)}function ne(){if(H._transitionData)return H._transitioning=!1,Y(H._transitionData._interruptCallbacks)}var fe=[M.previousPromises,ne,K.prepareFn,M.rehover,M.reselect,$],ye=n.syncOrAsync(fe,H);return(!ye||!ye.then)&&(ye=Promise.resolve()),ye.then(function(){return H})}M.doCalcdata=function(H,X){var K=c.list(H),G=H._fullData,Y=H._fullLayout,q,$,ee,ne=new Array(G.length),fe=(H.calcdata||[]).slice();for(H.calcdata=ne,Y._numBoxes=0,Y._numViolins=0,Y._violinScaleGroupStats={},H._hmpixcount=0,H._hmlumcount=0,Y._piecolormap={},Y._sunburstcolormap={},Y._treemapcolormap={},Y._iciclecolormap={},Y._funnelareacolormap={},ee=0;eeQ?Q.match(l):null;J.matchTex=e,J.convertToTspans=function(Q,re,ae){var oe=Q.text(),H=!Q.attr("data-notex")&&re&&re._context.typesetMath&&e(oe);H&&!m()&&(H=null);var X=V.select(Q.node().parentNode);if(X.empty())return;var K=Q.attr("class")?Q.attr("class").split(" ")[0]:"text";K+="-math",X.selectAll("svg."+K).remove(),X.selectAll("g."+K+"-group").remove(),Q.style("display",null).attr({"data-unformatted":oe,"data-math":"N"});function G(){X.empty()||(K=Q.attr("class")+"-math",X.select("svg."+K).remove()),Q.text("").style("white-space","pre");var Y=P(Q.node(),oe);Y&&Q.style("pointer-events","all"),J.positionText(Q),ae&&ae.call(Q)}return H?(re&&re._promises||[]).push(new Promise(function(Y){Q.style("display","none");var q=parseInt(Q.node().style.fontSize,10),$={fontSize:q},ee=Q.attr("text-anchor");h(H[2],$,function(ne,fe,ye){X.selectAll("svg."+K).remove(),X.selectAll("g."+K+"-group").remove();var xe=ne&&ne.select("svg");if(!xe||!xe.node()){G(),Y();return}Q.style("display","none");var Ae=X.append("g").classed(K+"-group",!0).attr({"pointer-events":"none","data-unformatted":oe,"data-math":"Y"});Ae.node().appendChild(xe.node()),fe&&fe.node()&&xe.node().insertBefore(fe.node().cloneNode(!0),xe.node().firstChild);var Me=ye.width,Ie=ye.height;xe.attr({class:K,height:Ie,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":$.fontSize+"px"});var Ue=Q.node().style.fill||"black",qe=xe.select("g");qe.attr({fill:Ue,stroke:Ue});var ke=qe.node().getBoundingClientRect(),ge=ke.width,ue=ke.height;(ge>Me||ue>Ie)&&(xe.style("overflow","hidden"),ke=xe.node().getBoundingClientRect(),ge=ke.width,ue=ke.height);var ve=+Q.attr("x"),se=+Q.attr("y"),Te=q||Q.node().getBoundingClientRect().height,Fe=-Te/4;K[0]==="y"?Ae.attr({transform:"rotate("+[-90,ve,se]+")"+x(-ge/2,Fe-ue/2)}):K[0]==="l"?se=Fe-ue/2:K[0]==="a"&&K.indexOf("atitle")!==0?(ve=0,se=Fe):(ve=ve-ge*(ee==="middle"?.5:ee==="end"?1:0),se=se+Fe-ue/2),xe.attr({x:ve,y:se}),ae&&ae.call(Q,Ae),Y(Ae)})})):G(),Q};var t=/(<|<|<)/g,a=/(>|>|>)/g;function r(Q){return Q.replace(t,"\\lt ").replace(a,"\\gt ")}var n=null,o=()=>typeof MathJax<"u"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,s=!1,c=!1;function m(){let Q=o();return Q===3||Q===4?!0:(Q===null?s||(s=!0,v.warn("MathJax is not loaded. Math equations will not be rendered.")):c||(c=!0,v.warn("Unsupported MathJax version:",MathJax.version)),!1)}function h(Q,re,ae){let oe=o();var H;let X=function(){if(!n){let q=MathJax._.output.svg_ts.SVG,$=v.extendFlat({},MathJax.config.svg,{fontCache:"local"});oe===4&&($.linebreaks=v.extendFlat({},$.linebreaks,{inline:!1})),n=MathJax._.mathjax.mathjax.document(document,v.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new q($)}))}let G="math-output-"+v.randstr({},64);H=V.select("body").append("div").attr({id:G}).style({visibility:"hidden",position:"absolute","font-size":re.fontSize+"px"});let Y=r(Q).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return n.convert(Y,{display:!1})}).then(function(q){H.node().appendChild(q)})},K=function(){let G=H.select(".MathJax"),Y=!G.empty()&&H.select("svg").node();if(!Y)v.log("There was an error in the tex syntax.",Q),ae();else{let q=Y.getBoundingClientRect(),$=G.select("defs");ae(G,$,q)}H.remove()};Promise.resolve().then(X).then(K).catch(G=>{v.log("MathJax typesetting failed.",Q,G),H&&H.remove(),ae()})}var p={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},g={sub:"0.3em",sup:"-0.6em"},i={sub:"-0.21em",sup:"0.42em"},w="\u200B",S=["http:","https:","mailto:","",void 0,":"],M=J.NEWLINES=/(\r\n?|\n)/g,C=/(<[^<>]*>)/,_=/<(\/?)([^ >]*)(\s+(.*))?>/i,T=//i;J.BR_TAG_ALL=//gi;var f=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,u=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,A=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,b=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function z(Q,re){if(!Q)return null;var ae=Q.match(re),oe=ae&&(ae[3]||ae[4]);return oe&&B(oe)}var I=/(^|;)\s*color:/;J.plainText=function(Q,re){re=re||{};for(var ae=re.len!==void 0&&re.len!==-1?re.len:1/0,oe=re.allowedTags!==void 0?re.allowedTags:["br"],H="...",X=H.length,K=Q.split(C),G=[],Y="",q=0,$=0;$X?G.push(ee.slice(0,Math.max(0,xe-X))+H):G.push(ee.slice(0,xe));break}Y=""}}return G.join("")};var N={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},R=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function B(Q){return Q.replace(R,function(re,ae){var oe;return ae.charAt(0)==="#"?oe=F(ae.charAt(1)==="x"?parseInt(ae.slice(2),16):parseInt(ae.slice(1),10)):oe=N[ae],oe||re})}J.convertEntities=B;function F(Q){if(!(Q>1114111)){var re=String.fromCodePoint;if(re)return re(Q);var ae=String.fromCharCode;return Q<=65535?ae(Q):ae((Q>>10)+55232,Q%1024+56320)}}function P(Q,re){re=re.replace(M," ");var ae=!1,oe=[],H,X=-1;function K(){X++;var ge=document.createElementNS(E.svg,"tspan");V.select(ge).attr({class:"line",dy:X*k+"em"}),Q.appendChild(ge),H=ge;var ue=oe;if(oe=[{node:ge}],ue.length>1)for(var ve=1;ve.",re);return}var ue=oe.pop();ge!==ue.type&&v.log("Start tag <"+ue.type+"> doesnt match end tag <"+ge+">. Pretending it did match.",re),H=oe[oe.length-1].node}var $=T.test(re);$?K():(H=Q,oe=[{node:Q}]);for(var ee=re.split(C),ne=0;ne=0;g--,i++){var w=m[g];p[i]=[1-w[0],w[1]]}return p}function s(m,h){h=h||{};for(var p=m.domain,g=m.range,i=g.length,w=new Array(i),S=0;Sp-m?m=p-(h-p):h-p=0?w=a.colorscale.sequential:w=a.colorscale.sequentialminus,s._sync("colorscale",w)}}}}),pl=Ee({"src/components/colorscale/index.js"(J,V){"use strict";var v=uh(),x=cf();V.exports={moduleType:"component",name:"colorscale",attributes:$s(),layoutAttributes:kb(),supplyLayoutDefaults:fM(),handleDefaults:Cc(),crossTraceDefaults:hM(),calc:Sf(),scales:v.scales,defaultScale:v.defaultScale,getScale:v.get,isValidScale:v.isValid,hasColorscale:x.hasColorscale,extractOpts:x.extractOpts,extractScale:x.extractScale,flipScale:x.flipScale,makeColorScaleFunc:x.makeColorScaleFunc,makeColorScaleFuncFromTrace:x.makeColorScaleFuncFromTrace}}}),al=Ee({"src/traces/scatter/subtypes.js"(J,V){"use strict";var v=Vr(),x=vs().isTypedArraySpec;V.exports={hasLines:function(E){return E.visible&&E.mode&&E.mode.indexOf("lines")!==-1},hasMarkers:function(E){return E.visible&&(E.mode&&E.mode.indexOf("markers")!==-1||E.type==="splom")},hasText:function(E){return E.visible&&E.mode&&E.mode.indexOf("text")!==-1},isBubble:function(E){var k=E.marker;return v.isPlainObject(k)&&(v.isArrayOrTypedArray(k.size)||x(k.size))}}}}),U0=Ee({"src/traces/scatter/make_bubble_size_func.js"(J,V){"use strict";var v=mi();V.exports=function(E,k){k||(k=2);var l=E.marker,e=l.sizeref||1,t=l.sizemin||0,a=l.sizemode==="area"?function(r){return Math.sqrt(r/e)}:function(r){return r/e};return function(r){var n=a(r/k);return v(n)&&n>0?Math.max(n,t):0}}}}),Qf=Ee({"src/components/fx/helpers.js"(J){"use strict";var V=Vr();J.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},J.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var a=e.xaxes||[],r=e.yaxes||[],n=0;n=0&&a.index{let o=r.toLowerCase(),s=r,c=l(n);for(o==="m"&&c.length>2&&(t.push([s,...c.splice(0,2)]),o="l",s=s==="m"?"l":"L");;){if(c.length===v[o])return t.push([s,...c]),"";if(c.length0&&(ue=100,ge=ge.replace("-open","")),ge.indexOf("-dot")>0&&(ue+=200,ge=ge.replace("-dot","")),ge=g.symbolNames.indexOf(ge),ge>=0&&(ge+=ue)}return ge%100>=T||ge>=400?0:Math.floor(Math.max(ge,0))};function u(ge,ue,ve,se){var Te=ge%100;return g.symbolFuncs[Te](ue,ve,se)+(ge>=200?f:"")}var A=E("~f"),b={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};g.gradient=function(ge,ue,ve,se,Te,Fe){var We=b[se];return z(ge,ue,ve,We.type,Te,Fe,We.start,We.stop,!1,We.reversed)};function z(ge,ue,ve,se,Te,Fe,We,Ge,gt,mt){var Tt=Te.length,At;se==="linear"?At={node:"linearGradient",attrs:{x1:We.x,y1:We.y,x2:Ge.x,y2:Ge.y,gradientUnits:gt?"userSpaceOnUse":"objectBoundingBox"},reversed:mt}:se==="radial"&&(At={node:"radialGradient",reversed:mt});for(var Kt=new Array(Tt),nr=0;nr=0&&ge.i===void 0&&(ge.i=Fe.i),ue.style("opacity",se.selectedOpacityFn?se.selectedOpacityFn(ge):ge.mo===void 0?We.opacity:ge.mo),se.ms2mrc){var gt;ge.ms==="various"||We.size==="various"?gt=3:gt=se.ms2mrc(ge.ms),ge.mrc=gt,se.selectedSizeFn&&(gt=ge.mrc=se.selectedSizeFn(ge));var mt=g.symbolNumber(ge.mx||We.symbol)||0;ge.om=mt%200>=100;var Tt=ke(ge,ve),At=$(ge,ve);ue.attr("d",u(mt,gt,Tt,At))}var Kt=!1,nr,_r,Zt;if(ge.so)Zt=Ge.outlierwidth,_r=Ge.outliercolor,nr=We.outliercolor;else{var sr=(Ge||{}).width;Zt=(ge.mlw+1||sr+1||(ge.trace?(ge.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in ge?_r=ge.mlcc=se.lineScale(ge.mlc):x.isArrayOrTypedArray(Ge.color)?_r=e.defaultLine:_r=Ge.color,x.isArrayOrTypedArray(We.color)&&(nr=e.defaultLine,Kt=!0),"mc"in ge?nr=ge.mcc=se.markerScale(ge.mc):nr=We.color||We.colors||"rgba(0,0,0,0)",se.selectedColorFn&&(nr=se.selectedColorFn(ge))}let Ot=ge.mld||(Ge||{}).dash;if(Ot&&g.dashLine(ue,Ot,Zt),ge.om)ue.call(e.stroke,nr).style({"stroke-width":(Zt||1)+"px",fill:"none"});else{ue.style("stroke-width",(ge.isBlank?0:Zt)+"px");var vt=We.gradient,ht=ge.mgt;ht?Kt=!0:ht=vt&&vt.type,x.isArrayOrTypedArray(ht)&&(ht=ht[0],b[ht]||(ht=0));var Re=We.pattern,Be=g.getPatternAttr,He=Re&&(Be(Re.shape,ge.i,"")||Be(Re.path,ge.i,""));if(ht&&ht!=="none"){var $e=ge.mgc;$e?Kt=!0:$e=vt.color;var Ze=ve.uid;Kt&&(Ze+="-"+ge.i),g.gradient(ue,Te,Ze,ht,[[0,$e],[1,nr]],"fill")}else if(He){var Je=!1,Mt=Re.fgcolor;!Mt&&Fe&&Fe.color&&(Mt=Fe.color,Je=!0);var dt=Be(Mt,ge.i,Fe&&Fe.color||null),Dt=Be(Re.bgcolor,ge.i,null),Ct=Re.fgopacity,Vt=Be(Re.size,ge.i,8),Ht=Be(Re.solidity,ge.i,.3);Je=Je||ge.mcc||x.isArrayOrTypedArray(Re.shape)||x.isArrayOrTypedArray(Re.path)||x.isArrayOrTypedArray(Re.bgcolor)||x.isArrayOrTypedArray(Re.fgcolor)||x.isArrayOrTypedArray(Re.size)||x.isArrayOrTypedArray(Re.solidity);var Wt=ve.uid;Je&&(Wt+="-"+ge.i),g.pattern(ue,"point",Te,Wt,He,Vt,Ht,ge.mcc,Re.fillmode,Dt,dt,Ct)}else x.isArrayOrTypedArray(nr)?e.fill(ue,nr[ge.i]):e.fill(ue,nr);Zt&&e.stroke(ue,_r)}},g.makePointStyleFns=function(ge){var ue={},ve=ge.marker;return ue.markerScale=g.tryColorscale(ve,""),ue.lineScale=g.tryColorscale(ve,"line"),l.traceIs(ge,"symbols")&&(ue.ms2mrc=m.isBubble(ge)?h(ge):function(){return(ve.size||6)/2}),ge.selectedpoints&&x.extendFlat(ue,g.makeSelectedPointStyleFns(ge)),ue},g.makeSelectedPointStyleFns=function(ge){var ue={},ve=ge.selected||{},se=ge.unselected||{},Te=ge.marker||{},Fe=ve.marker||{},We=se.marker||{},Ge=Te.opacity,gt=Fe.opacity,mt=We.opacity,Tt=gt!==void 0,At=mt!==void 0;(x.isArrayOrTypedArray(Ge)||Tt||At)&&(ue.selectedOpacityFn=function(Re){var Be=Re.mo===void 0?Te.opacity:Re.mo;return Re.selected?Tt?gt:Be:At?mt:c*Be});var Kt=Te.color,nr=Fe.color,_r=We.color;(nr||_r)&&(ue.selectedColorFn=function(Re){var Be=Re.mcc||Kt;return Re.selected?nr||Be:_r||Be});var Zt=Te.size,sr=Fe.size,Ot=We.size,vt=sr!==void 0,ht=Ot!==void 0;return l.traceIs(ge,"symbols")&&(vt||ht)&&(ue.selectedSizeFn=function(Re){var Be=Re.mrc||Zt/2;return Re.selected?vt?sr/2:Be:ht?Ot/2:Be}),ue},g.makeSelectedTextStyleFns=function(ge){var ue={},ve=ge.selected||{},se=ge.unselected||{},Te=ge.textfont||{},Fe=ve.textfont||{},We=se.textfont||{},Ge=Te.color,gt=Fe.color,mt=We.color;return ue.selectedTextColorFn=function(Tt){var At=Tt.tc||Ge;return Tt.selected?gt||At:mt||(gt?At:e.addOpacity(At,c))},ue},g.selectedPointStyle=function(ge,ue){if(!(!ge.size()||!ue.selectedpoints)){var ve=g.makeSelectedPointStyleFns(ue),se=ue.marker||{},Te=[];ve.selectedOpacityFn&&Te.push(function(Fe,We){Fe.style("opacity",ve.selectedOpacityFn(We))}),ve.selectedColorFn&&Te.push(function(Fe,We){e.fill(Fe,ve.selectedColorFn(We))}),ve.selectedSizeFn&&Te.push(function(Fe,We){var Ge=We.mx||se.symbol||0,gt=ve.selectedSizeFn(We);Fe.attr("d",u(g.symbolNumber(Ge),gt,ke(We,ue),$(We,ue))),We.mrc2=gt}),Te.length&&ge.each(function(Fe){for(var We=v.select(this),Ge=0;Ge0?ve:0}g.textPointStyle=function(ge,ue,ve){if(ge.size()){var se;if(ue.selectedpoints){var Te=g.makeSelectedTextStyleFns(ue);se=Te.selectedTextColorFn}var Fe=ue.texttemplate,We=ve._fullLayout;ge.each(function(Ge){var gt=v.select(this),mt=Fe?x.extractOption(Ge,ue,"txt","texttemplate"):x.extractOption(Ge,ue,"tx","text");if(!mt&&mt!==0){gt.remove();return}if(Fe){var Tt=ue._module.formatLabels,At=Tt?Tt(Ge,ue,We):{},Kt={};p(Kt,ue,Ge.i),mt=x.texttemplateString({data:[Kt,Ge,ue._meta],fallback:ue.texttemplatefallback,labels:At,locale:We._d3locale,template:mt})}var nr=Ge.tp||ue.textposition,_r=R(Ge,ue),Zt=se?se(Ge):Ge.tc||ue.textfont.color;gt.call(g.font,{family:Ge.tf||ue.textfont.family,weight:Ge.tw||ue.textfont.weight,style:Ge.ty||ue.textfont.style,variant:Ge.tv||ue.textfont.variant,textcase:Ge.tC||ue.textfont.textcase,lineposition:Ge.tE||ue.textfont.lineposition,shadow:Ge.tS||ue.textfont.shadow,size:_r,color:Zt}).text(mt).call(r.convertToTspans,ve).call(N,nr,_r,Ge.mrc)})}},g.selectedTextStyle=function(ge,ue){if(!(!ge.size()||!ue.selectedpoints)){var ve=g.makeSelectedTextStyleFns(ue);ge.each(function(se){var Te=v.select(this),Fe=ve.selectedTextColorFn(se),We=se.tp||ue.textposition,Ge=R(se,ue);e.fill(Te,Fe);var gt=l.traceIs(ue,"bar-like");N(Te,We,Ge,se.mrc2||se.mrc,gt)})}};var B=.5;g.smoothopen=function(ge,ue){if(ge.length<3)return"M"+ge.join("L");var ve="M"+ge[0],se=[],Te;for(Te=1;Te=gt||Re>=Tt&&Re<=gt)&&(Be<=At&&Be>=mt||Be>=At&&Be<=mt)&&(ge=[Re,Be])}return ge}g.applyBackoff=oe,g.makeTester=function(){var ge=x.ensureSingleById(v.select("body"),"svg","js-plotly-tester",function(ve){ve.attr(n.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),ue=x.ensureSingle(ge,"path","js-reference-point",function(ve){ve.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});g.tester=ge,g.testref=ue},g.savedBBoxes={};var H=0,X=1e4;g.bBox=function(ge,ue,ve){ve||(ve=K(ge));var se;if(ve){if(se=g.savedBBoxes[ve],se)return x.extendFlat({},se)}else if(ge.childNodes.length===1){var Te=ge.childNodes[0];if(ve=K(Te),ve){var Fe=+Te.getAttribute("x")||0,We=+Te.getAttribute("y")||0,Ge=Te.getAttribute("transform");if(!Ge){var gt=g.bBox(Te,!1,ve);return Fe&&(gt.left+=Fe,gt.right+=Fe),We&&(gt.top+=We,gt.bottom+=We),gt}if(ve+="~"+Fe+"~"+We+"~"+Ge,se=g.savedBBoxes[ve],se)return x.extendFlat({},se)}}var mt,Tt;ue?mt=ge:(Tt=g.tester.node(),mt=ge.cloneNode(!0),Tt.appendChild(mt)),v.select(mt).attr("transform",null).call(r.positionText,0,0);var At=mt.getBoundingClientRect(),Kt=g.testref.node().getBoundingClientRect();ue||Tt.removeChild(mt);var nr={height:At.height,width:At.width,left:At.left-Kt.left,top:At.top-Kt.top,right:At.right-Kt.left,bottom:At.bottom-Kt.top};return H>=X&&(g.savedBBoxes={},H=0),ve&&(g.savedBBoxes[ve]=nr),H++,x.extendFlat({},nr)};function K(ge){var ue=ge.getAttribute("data-unformatted");if(ue!==null)return ue+ge.getAttribute("data-math")+ge.getAttribute("text-anchor")+ge.getAttribute("style")}g.setClipUrl=function(ge,ue,ve){ge.attr("clip-path",G(ue,ve))};function G(ge,ue){if(!ge)return null;var ve=ue._context,se=ve._exportedPlot?"":ve._baseUrl||"";return se?"url('"+se+"#"+ge+"')":"url(#"+ge+")"}g.getTranslate=function(ge){var ue=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ve=ge.attr?"attr":"getAttribute",se=ge[ve]("transform")||"",Te=se.replace(ue,function(Fe,We,Ge){return[We,Ge].join(" ")}).split(" ");return{x:+Te[0]||0,y:+Te[1]||0}},g.setTranslate=function(ge,ue,ve){var se=/(\btranslate\(.*?\);?)/,Te=ge.attr?"attr":"getAttribute",Fe=ge.attr?"attr":"setAttribute",We=ge[Te]("transform")||"";return ue=ue||0,ve=ve||0,We=We.replace(se,"").trim(),We+=a(ue,ve),We=We.trim(),ge[Fe]("transform",We),We},g.getScale=function(ge){var ue=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ve=ge.attr?"attr":"getAttribute",se=ge[ve]("transform")||"",Te=se.replace(ue,function(Fe,We,Ge){return[We,Ge].join(" ")}).split(" ");return{x:+Te[0]||1,y:+Te[1]||1}},g.setScale=function(ge,ue,ve){var se=/(\bscale\(.*?\);?)/,Te=ge.attr?"attr":"getAttribute",Fe=ge.attr?"attr":"setAttribute",We=ge[Te]("transform")||"";return ue=ue||1,ve=ve||1,We=We.replace(se,"").trim(),We+="scale("+ue+","+ve+")",We=We.trim(),ge[Fe]("transform",We),We};var Y=/\s*sc.*/;g.setPointGroupScale=function(ge,ue,ve){if(ue=ue||1,ve=ve||1,!!ge){var se=ue===1&&ve===1?"":"scale("+ue+","+ve+")";ge.each(function(){var Te=(this.getAttribute("transform")||"").replace(Y,"");Te+=se,Te=Te.trim(),this.setAttribute("transform",Te)})}};var q=/translate\([^)]*\)\s*$/;g.setTextPointsScale=function(ge,ue,ve){ge&&ge.each(function(){var se,Te=v.select(this),Fe=Te.select("text");if(Fe.node()){var We=parseFloat(Fe.attr("x")||0),Ge=parseFloat(Fe.attr("y")||0),gt=(Te.attr("transform")||"").match(q);ue===1&&ve===1?se=[]:se=[a(We,Ge),"scale("+ue+","+ve+")",a(-We,-Ge)],gt&&se.push(gt),Te.attr("transform",se.join(""))}})};function $(ge,ue){var ve;return ge&&(ve=ge.mf),ve===void 0&&(ve=ue.marker&&ue.marker.standoff||0),!ue._geo&&!ue._xA?-ve:ve}g.getMarkerStandoff=$;var ee=Math.atan2,ne=Math.cos,fe=Math.sin;function ye(ge,ue){var ve=ue[0],se=ue[1];return[ve*ne(ge)-se*fe(ge),ve*fe(ge)+se*ne(ge)]}var xe,Ae,Me,Ie,Ue,qe;function ke(ge,ue){var ve=ge.ma;ve===void 0&&(ve=ue.marker.angle,(!k(ve)||x.isArrayOrTypedArray(ve))&&(ve=0));var se,Te,Fe=ue.marker.angleref;if(Fe==="previous"||Fe==="north"){if(ue._geo){var We=ue._geo.project(ge.lonlat);se=We[0],Te=We[1]}else{var Ge=ue._xA,gt=ue._yA;if(Ge&>)se=Ge.c2p(ge.x),Te=gt.c2p(ge.y);else return 90}if(ue._geo){var mt=ge.lonlat[0],Tt=ge.lonlat[1],At=ue._geo.project([mt,Tt+1e-5]),Kt=ue._geo.project([mt+1e-5,Tt]),nr=ee(Kt[1]-Te,Kt[0]-se),_r=ee(At[1]-Te,At[0]-se),Zt;if(Fe==="north")Zt=ve/180*Math.PI;else if(Fe==="previous"){var sr=mt/180*Math.PI,Ot=Tt/180*Math.PI,vt=xe/180*Math.PI,ht=Ae/180*Math.PI,Re=vt-sr,Be=ne(ht)*fe(Re),He=fe(ht)*ne(Ot)-ne(ht)*fe(Ot)*ne(Re);Zt=-ee(Be,He)-Math.PI,xe=mt,Ae=Tt}var $e=ye(nr,[ne(Zt),0]),Ze=ye(_r,[fe(Zt),0]);ve=ee($e[1]+Ze[1],$e[0]+Ze[0])/Math.PI*180,Fe==="previous"&&!(qe===ue.uid&&ge.i===Ue+1)&&(ve=null)}if(Fe==="previous"&&!ue._geo)if(qe===ue.uid&&ge.i===Ue+1&&k(se)&&k(Te)){var Je=se-Me,Mt=Te-Ie,dt=ue.line&&ue.line.shape||"",Dt=dt.slice(dt.length-1);Dt==="h"&&(Mt=0),Dt==="v"&&(Je=0),ve+=ee(Mt,Je)/Math.PI*180+90}else ve=null}return Me=se,Ie=Te,Ue=ge.i,qe=ue.uid,ve}g.getMarkerAngle=ke}}),Lv=Ee({"src/components/titles/index.js"(J,V){"use strict";var v=Hn(),x=mi(),E=vl(),k=Ri(),l=Vr(),e=l.strTranslate,t=yo(),a=Qa(),r=Fs(),n=gd(),o=rc().OPPOSITE_SIDE,s=/ [XY][0-9]* /,c=1.6,m=1.6;function h(p,g,i){var w=p._fullLayout,S=i.propContainer,M=i.propName,C=i.placeholder,_=i.traceIndex,T=i.avoid||{},f=i.attributes,u=i.transform,A=i.containerGroup,b=1,z=S.title,I=(z&&z.text?z.text:"").trim(),N=!1,R=z&&z.font?z.font:{},B=R.family,F=R.size,P=R.color,j=R.weight,U=R.style,Z=R.variant,Q=R.textcase,re=R.lineposition,ae=R.shadow,oe=i.subtitlePropName,H=!!oe,X=i.subtitlePlaceholder,K=(S.title||{}).subtitle||{text:"",font:{}},G=(K.text||"").trim(),Y=!1,q=1,$=K.font,ee=$.family,ne=$.size,fe=$.color,ye=$.weight,xe=$.style,Ae=$.variant,Me=$.textcase,Ie=$.lineposition,Ue=$.shadow,qe;M==="title.text"?qe="titleText":M.indexOf("axis")!==-1?qe="axisTitleText":M.indexOf("colorbar")!==-1&&(qe="colorbarTitleText");var ke=p._context.edits[qe];function ge(nr,_r){return nr===void 0||_r===void 0?!1:nr.replace(s," % ")===_r.replace(s," % ")}I===""?b=0:ge(I,C)&&(ke||(I=""),b=.2,N=!0),H&&(G===""?q=0:ge(G,X)&&(ke||(G=""),q=.2,Y=!0)),i._meta?I=l.templateString(I,i._meta):w._meta&&(I=l.templateString(I,w._meta));var ue=I||G||ke,ve;A||(A=l.ensureSingle(w._infolayer,"g","g-"+g),ve=w._hColorbarMoveTitle);var se=A.selectAll("text."+g).data(ue?[0]:[]);se.enter().append("text"),se.text(I).attr("class",g),se.exit().remove();var Te=null,Fe=g+"-subtitle",We=G||ke;if(H&&(Te=A.selectAll("text."+Fe).data(We?[0]:[]),Te.enter().append("text"),Te.text(G).attr("class",Fe),Te.exit().remove()),!ue)return A;function Ge(nr,_r){l.syncOrAsync([gt,mt],{title:nr,subtitle:_r})}function gt(nr){var _r=nr.title,Zt=nr.subtitle,sr;!u&&ve&&(u={}),u?(sr="",u.rotate&&(sr+="rotate("+[u.rotate,f.x,f.y]+")"),(u.offset||ve)&&(sr+=e(0,(u.offset||0)-(ve||0)))):sr=null,_r.attr("transform",sr);function Ot($e){if($e){var Ze=v.select($e.node().parentNode).select("."+Fe);if(!Ze.empty()){var Je=$e.node().getBBox();if(Je.height){var Mt=Je.y+Je.height+c*ne;Ze.attr("y",Mt)}}}}if(_r.style("opacity",b*a.opacity(P)).call(t.font,{color:a.rgb(P),size:v.round(F,2),family:B,weight:j,style:U,variant:Z,textcase:Q,shadow:ae,lineposition:re}).attr(f).call(r.convertToTspans,p,Ot),Zt&&!Zt.empty()){var vt=A.select("."+g+"-math-group"),ht=_r.node().getBBox(),Re=vt.node()?vt.node().getBBox():void 0,Be=Re?Re.y+Re.height+c*ne:ht.y+ht.height+m*ne,He=l.extendFlat({},f,{y:Be});Zt.attr("transform",sr),Zt.style("opacity",q*a.opacity(fe)).call(t.font,{color:a.rgb(fe),size:v.round(ne,2),family:ee,weight:ye,style:xe,variant:Ae,textcase:Me,shadow:Ue,lineposition:Ie}).attr(He).call(r.convertToTspans,p)}return E.previousPromises(p)}function mt(nr){var _r=nr.title,Zt=v.select(_r.node().parentNode);if(T&&T.selection&&T.side&&I){Zt.attr("transform",null);var sr=o[T.side],Ot=T.side==="left"||T.side==="top"?-1:1,vt=x(T.pad)?T.pad:2,ht=t.bBox(Zt.node()),Re={t:0,b:0,l:0,r:0},Be=p._fullLayout._reservedMargin;for(var He in Be)for(var $e in Be[He]){var Ze=Be[He][$e];Re[$e]=Math.max(Re[$e],Ze)}var Je={left:Re.l,top:Re.t,right:w.width-Re.r,bottom:w.height-Re.b},Mt=T.maxShift||Ot*(Je[T.side]-ht[T.side]),dt=0;if(Mt<0)dt=Mt;else{var Dt=T.offsetLeft||0,Ct=T.offsetTop||0;ht.left-=Dt,ht.right-=Dt,ht.top-=Ct,ht.bottom-=Ct,T.selection.each(function(){var Ht=t.bBox(this);l.bBoxIntersect(ht,Ht,vt)&&(dt=Math.max(dt,Ot*(Ht[T.side]-ht[sr])+vt))}),dt=Math.min(Mt,dt),S._titleScoot=Math.abs(dt)}if(dt>0||Mt<0){var Vt={left:[-dt,0],right:[dt,0],top:[0,-dt],bottom:[0,dt]}[T.side];Zt.attr("transform",e(Vt[0],Vt[1]))}}}se.call(Ge,Te);function Tt(nr,_r){nr.text(_r).on("mouseover.opacity",function(){v.select(this).transition().duration(n.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){v.select(this).transition().duration(n.HIDE_PLACEHOLDER).style("opacity",0)})}if(ke&&(I?se.on(".opacity",null):(Tt(se,C),N=!0),se.call(r.makeEditable,{gd:p}).on("edit",function(nr){_!==void 0?k.call("_guiRestyle",p,M,nr,_):k.call("_guiRelayout",p,M,nr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ge)}).on("input",function(nr){this.text(nr||" ").call(r.positionText,f.x,f.y)}),H)){if(H&&!I){var At=se.node().getBBox(),Kt=At.y+At.height+m*ne;Te.attr("y",Kt)}G?Te.on(".opacity",null):(Tt(Te,X),Y=!0),Te.call(r.makeEditable,{gd:p}).on("edit",function(nr){k.call("_guiRelayout",p,"title.subtitle.text",nr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ge)}).on("input",function(nr){this.text(nr||" ").call(r.positionText,Te.attr("x"),Te.attr("y"))})}return se.classed("js-placeholder",N),Te&&!Te.empty()&&Te.classed("js-placeholder",Y),A}V.exports={draw:h,SUBTITLE_PADDING_EM:m,SUBTITLE_PADDING_MATHJAX_EM:c}}}),Hh=Ee({"src/plots/cartesian/set_convert.js"(J,V){"use strict";var v=Hn(),x=ji().utcFormat,E=Vr(),k=E.numberFormat,l=mi(),e=E.cleanNumber,t=E.ms2DateTime,a=E.dateTime2ms,r=E.ensureNumber,n=E.isArrayOrTypedArray,o=Qi(),s=o.FP_SAFE,c=o.BADNUM,m=o.LOG_CLIP,h=o.ONEWEEK,p=o.ONEDAY,g=o.ONEHOUR,i=o.ONEMIN,w=o.ONESEC,S=Xl(),M=tc(),C=M.HOUR_PATTERN,_=M.WEEKDAY_PATTERN;function T(u){return Math.pow(10,u)}function f(u){return u!=null}V.exports=function(A,b){b=b||{};var z=A._id||"x",I=z.charAt(0);function N(G,Y){if(G>0)return Math.log(G)/Math.LN10;if(G<=0&&Y&&A.range&&A.range.length===2){var q=A.range[0],$=A.range[1];return .5*(q+$-2*m*Math.abs(q-$))}else return c}function R(G,Y,q,$){if(($||{}).msUTC&&l(G))return+G;var ee=a(G,q||A.calendar);if(ee===c)if(l(G)){G=+G;var ne=Math.floor(E.mod(G+.05,1)*10),fe=Math.round(G-ne/10);ee=a(new Date(fe))+ne/10}else return c;return ee}function B(G,Y,q){return t(G,Y,q||A.calendar)}function F(G){return A._categories[Math.round(G)]}function P(G){if(f(G)){if(A._categoriesMap===void 0&&(A._categoriesMap={}),A._categoriesMap[G]!==void 0)return A._categoriesMap[G];A._categories.push(typeof G=="number"?String(G):G);var Y=A._categories.length-1;return A._categoriesMap[G]=Y,Y}return c}function j(G,Y){for(var q=new Array(Y),$=0;$A.range[1]&&(q=!q);for(var $=q?-1:1,ee=$*G,ne=0,fe=0;fexe)ne=fe+1;else{ne=ee<(ye+xe)/2?fe:fe+1;break}}var Ae=A._B[ne]||0;return isFinite(Ae)?re(G,A._m2,Ae):0},H=function(G){var Y=A._rangebreaks.length;if(!Y)return ae(G,A._m,A._b);for(var q=0,$=0;$A._rangebreaks[$].pmax&&(q=$+1);return ae(G,A._m2,A._B[q])}}A.c2l=A.type==="log"?N:r,A.l2c=A.type==="log"?T:r,A.l2p=oe,A.p2l=H,A.c2p=A.type==="log"?function(G,Y){return oe(N(G,Y))}:oe,A.p2c=A.type==="log"?function(G){return T(H(G))}:H,["linear","-"].indexOf(A.type)!==-1?(A.d2r=A.r2d=A.d2c=A.r2c=A.d2l=A.r2l=e,A.c2d=A.c2r=A.l2d=A.l2r=r,A.d2p=A.r2p=function(G){return A.l2p(e(G))},A.p2d=A.p2r=H,A.cleanPos=r):A.type==="log"?(A.d2r=A.d2l=function(G,Y){return N(e(G),Y)},A.r2d=A.r2c=function(G){return T(e(G))},A.d2c=A.r2l=e,A.c2d=A.l2r=r,A.c2r=N,A.l2d=T,A.d2p=function(G,Y){return A.l2p(A.d2r(G,Y))},A.p2d=function(G){return T(H(G))},A.r2p=function(G){return A.l2p(e(G))},A.p2r=H,A.cleanPos=r):A.type==="date"?(A.d2r=A.r2d=E.identity,A.d2c=A.r2c=A.d2l=A.r2l=R,A.c2d=A.c2r=A.l2d=A.l2r=B,A.d2p=A.r2p=function(G,Y,q){return A.l2p(R(G,0,q))},A.p2d=A.p2r=function(G,Y,q){return B(H(G),Y,q)},A.cleanPos=function(G){return E.cleanDate(G,c,A.calendar)}):A.type==="category"?(A.d2c=A.d2l=P,A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=Z,A.r2c=function(G){var Y=Q(G);return Y!==void 0?Y:A.fraction2r(.5)},A.l2r=A.c2r=r,A.r2l=Q,A.d2p=function(G){return A.l2p(A.r2c(G))},A.p2d=function(G){return F(H(G))},A.r2p=A.d2p,A.p2r=H,A.cleanPos=function(G){return typeof G=="string"&&G!==""?G:r(G)}):A.type==="multicategory"&&(A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=Z,A.r2c=function(G){var Y=Z(G);return Y!==void 0?Y:A.fraction2r(.5)},A.r2c_just_indices=U,A.l2r=A.c2r=r,A.r2l=Z,A.d2p=function(G){return A.l2p(A.r2c(G))},A.p2d=function(G){return F(H(G))},A.r2p=A.d2p,A.p2r=H,A.cleanPos=function(G){return Array.isArray(G)||typeof G=="string"&&G!==""?G:r(G)},A.setupMultiCategory=function(G){var Y=A._traceIndices,q,$,ee=A._matchGroup;if(ee&&A._categories.length===0){for(var ne in ee)if(ne!==z){var fe=b[S.id2name(ne)];Y=Y.concat(fe._traceIndices)}}var ye=[[0,{}],[0,{}]],xe=[];for(q=0;qfe[1]&&($[ne?0:1]=q,ee[1]=fe[1]),ee[0]>=ee[1])if(Y!==void 0){var ye=fe[0]+1;q!==void 0&&(ye=Math.min(ye,fe[1])),$[ne?0:1]=A.l2r(ye)}else q!==void 0&&($[ne?1:0]=A.l2r(fe[1]-1))}},A.cleanRange=function(G,Y){A._cleanRange(G,Y),A.limitRange(G)},A._cleanRange=function(G,Y){Y||(Y={}),G||(G="range");var q=E.nestedProperty(A,G).get(),$,ee;if(A.type==="date"?ee=E.dfltRange(A.calendar):I==="y"?ee=M.DFLTRANGEY:A._name==="realaxis"?ee=[0,1]:ee=Y.dfltRange||M.DFLTRANGEX,ee=ee.slice(),(A.rangemode==="tozero"||A.rangemode==="nonnegative")&&(ee[0]=0),!q||q.length!==2){E.nestedProperty(A,G).set(ee);return}var ne=q[0]===null,fe=q[1]===null;for(A.type==="date"&&!A.autorange&&(q[0]=E.cleanDate(q[0],c,A.calendar),q[1]=E.cleanDate(q[1],c,A.calendar)),$=0;$<2;$++)if(A.type==="date"){if(!E.isDateTime(q[$],A.calendar)){A[G]=ee;break}if(A.r2l(q[0])===A.r2l(q[1])){var ye=E.constrain(A.r2l(q[0]),E.MIN_MS+1e3,E.MAX_MS-1e3);q[0]=A.l2r(ye-1e3),q[1]=A.l2r(ye+1e3);break}}else{if(!l(q[$]))if(!(ne||fe)&&l(q[1-$]))q[$]=q[1-$]*($?10:.1);else{A[G]=ee;break}if(q[$]<-s?q[$]=-s:q[$]>s&&(q[$]=s),q[0]===q[1]){var xe=Math.max(1,Math.abs(q[0]*1e-6));q[0]-=xe,q[1]+=xe}}},A.setScale=function(G){var Y=b._size;if(A.overlaying){var q=S.getFromId({_fullLayout:b},A.overlaying);A.domain=q.domain}var $=G&&A._r?"_r":"range",ee=A.calendar;A.cleanRange($);var ne=A.r2l(A[$][0],ee),fe=A.r2l(A[$][1],ee),ye=I==="y";if(ye?(A._offset=Y.t+(1-A.domain[1])*Y.h,A._length=Y.h*(A.domain[1]-A.domain[0]),A._m=A._length/(ne-fe),A._b=-A._m*fe):(A._offset=Y.l+A.domain[0]*Y.w,A._length=Y.w*(A.domain[1]-A.domain[0]),A._m=A._length/(fe-ne),A._b=-A._m*ne),A._rangebreaks=[],A._lBreaks=0,A._m2=0,A._B=[],A.rangebreaks){var xe,Ae;if(A._rangebreaks=A.locateBreaks(Math.min(ne,fe),Math.max(ne,fe)),A._rangebreaks.length){for(xe=0;xefe&&(Me=!Me),Me&&A._rangebreaks.reverse();var Ie=Me?-1:1;for(A._m2=Ie*A._length/(Math.abs(fe-ne)-A._lBreaks),A._B.push(-A._m2*(ye?fe:ne)),xe=0;xeee&&(ee+=7,ne<$&&(ne+=7));break;case C:fe=new Date(G);var Me=fe.getUTCHours(),Ie=fe.getUTCMinutes(),Ue=fe.getUTCSeconds(),qe=fe.getUTCMilliseconds();ne=Me+(Ie/60+Ue/3600+qe/36e5),$>ee&&(ee+=24,ne<$&&(ne+=24));break;case"":ne=G;break}if(ne>=$&&ne=$&&G=Ge.min&&(seGe.max&&(Ge.max=Te),Fe=!1)}Fe&&fe.push({min:se,max:Te})}};for(q=0;qw*2}function o(m){return Math.max(1,(m-1)/1e3)}function s(m,h){for(var p=m.length,g=o(p),i=0,w=0,S={},M=0;Mi*2}function c(m){return k(m[0])&&k(m[1])}}}),Ph=Ee({"src/plots/cartesian/autorange.js"(J,V){"use strict";var v=Hn(),x=mi(),E=Vr(),k=Qi().FP_SAFE,l=Ri(),e=yo(),t=Xl(),a=t.getFromId,r=t.isLinked;V.exports={applyAutorangeOptions:A,getAutoRange:n,makePadFn:s,doAutoRange:p,findExtremes:g,concatExtremes:h};function n(b,z){var I,N,R=[],B=b._fullLayout,F=s(B,z,0),P=s(B,z,1),j=h(b,z),U=j.min,Z=j.max;if(U.length===0||Z.length===0)return E.simpleMap(z.range,z.r2l);var Q=U[0].val,re=Z[0].val;for(I=1;I0&&(xe=Y-F(ee)-P(ne),xe>q?Ae/xe>$&&(fe=ee,ye=ne,$=Ae/xe):Ae/Y>$&&(fe={val:ee.val,nopad:1},ye={val:ne.val,nopad:1},$=Ae/Y));function Me(ge,ue){return Math.max(ge,P(ue))}if(Q===re){var Ie=Q-1,Ue=Q+1;if(K)if(Q===0)R=[0,1];else{var qe=(Q>0?Z:U).reduce(Me,0),ke=Q/(1-Math.min(.5,qe/Y));R=Q>0?[0,ke]:[ke,0]}else G?R=[Math.max(0,Ie),Math.max(1,Ue)]:R=[Ie,Ue]}else K?(fe.val>=0&&(fe={val:0,nopad:1}),ye.val<=0&&(ye={val:0,nopad:1})):G&&(fe.val-$*F(fe)<0&&(fe={val:0,nopad:1}),ye.val<=0&&(ye={val:1,nopad:1})),$=(ye.val-fe.val-o(z,ee.val,ne.val))/(Y-F(fe)-P(ye)),R=[fe.val-$*F(fe),ye.val+$*P(ye)];return R=A(R,z),z.limitRange&&z.limitRange(),oe&&R.reverse(),E.simpleMap(R,z.l2r||Number)}function o(b,z,I){var N=0;if(b.rangebreaks)for(var R=b.locateBreaks(z,I),B=0;B0?I.ppadplus:I.ppadminus)||I.ppad||0),ee=q((b._m>0?I.ppadminus:I.ppadplus)||I.ppad||0),ne=q(I.vpadplus||I.vpad),fe=q(I.vpadminus||I.vpad);if(!U){if(G=1/0,Y=-1/0,j)for(Q=0;Q0&&(G=re),re>Y&&re-k&&(G=re),re>Y&&re=Ae;Q--)xe(Q);return{min:N,max:R,opts:I}}function i(b,z,I,N){S(b,z,I,N,C)}function w(b,z,I,N){S(b,z,I,N,_)}function S(b,z,I,N,R){for(var B=N.tozero,F=N.extrapad,P=!0,j=0;j=I&&(U.extrapad||!F)){P=!1;break}else R(z,U.val)&&U.pad<=I&&(F||!U.extrapad)&&(b.splice(j,1),j--)}if(P){var Z=B&&z===0;b.push({val:z,pad:Z?0:I,extrapad:Z?!1:F})}}function M(b){return x(b)&&Math.abs(b)=z}function T(b,z){var I=z.autorangeoptions;return I&&I.minallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.minallowed:I&&I.clipmin!==void 0&&u(z,I.clipmin,I.clipmax)?Math.max(b,z.d2l(I.clipmin)):b}function f(b,z){var I=z.autorangeoptions;return I&&I.maxallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.maxallowed:I&&I.clipmax!==void 0&&u(z,I.clipmin,I.clipmax)?Math.min(b,z.d2l(I.clipmax)):b}function u(b,z,I){return z!==void 0&&I!==void 0?(z=b.d2l(z),I=b.d2l(I),z=j&&(B=j,I=j),F<=j&&(F=j,N=j)}}return I=T(I,z),N=f(N,z),[I,N]}}}),uo=Ee({"src/plots/cartesian/axes.js"(J,V){"use strict";var v=Hn(),x=mi(),E=vl(),k=Ri(),l=Vr(),e=l.strTranslate,t=Fs(),a=Lv(),r=Qa(),n=yo(),o=Gc(),s=Lb(),c=tc(),m=Qi(),h=m.ONEMAXYEAR,p=m.ONEAVGYEAR,g=m.ONEMINYEAR,i=m.ONEMAXQUARTER,w=m.ONEAVGQUARTER,S=m.ONEMINQUARTER,M=m.ONEMAXMONTH,C=m.ONEAVGMONTH,_=m.ONEMINMONTH,T=m.ONEWEEK,f=m.ONEDAY,u=f/2,A=m.ONEHOUR,b=m.ONEMIN,z=m.ONESEC,I=m.ONEMILLI,N=m.ONEMICROSEC,R=m.MINUS_SIGN,B=m.BADNUM,F={K:"zeroline"},P={K:"gridline",L:"path"},j={K:"minor-gridline",L:"path"},U={K:"tick",L:"path"},Z={K:"tick",L:"text"},Q={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},re=rc(),ae=re.MID_SHIFT,oe=re.CAP_SHIFT,H=re.LINE_SPACING,X=re.OPPOSITE_SIDE,K=3,G=V.exports={};G.setConvert=Hh();var Y=Op(),q=Xl(),$=q.idSort,ee=q.isLinked;G.id2name=q.id2name,G.name2id=q.name2id,G.cleanId=q.cleanId,G.list=q.list,G.listIds=q.listIds,G.getFromId=q.getFromId,G.getFromTrace=q.getFromTrace;var ne=Ph();G.getAutoRange=ne.getAutoRange,G.findExtremes=ne.findExtremes;var fe=1e-4;function ye(ot){var et=(ot[1]-ot[0])*fe;return[ot[0]-et,ot[1]+et]}function xe(ot,et,hr){if(![hr,ot,et].every(x)||hr===0)return ot;let ur=Math.round((ot-et)/hr),Tr=et+ur*hr;return ot!==Tr&&Math.abs(ot-Tr)br+" domain")),kt=kt.concat(Rr||[]),ar.length>Fr?(l.warn("Array attribute "+Ut+" has more entries than expected, truncating to "+Fr),ar=ar.slice(0,Fr)):ar.length2e-6||((hr-ot._forceTick0)/ot._minDtick%1+1.000001)%1>2e-6)&&(ot._minDtick=0))},G.saveRangeInitial=function(ot,et){for(var hr=G.list(ot,"",!0),ur=!1,Tr=0;TrEr*.3||Ut(ur)||Ut(Tr))){var br=hr.dtick/2;ot+=ot+brFr){var at=Number(hr.slice(1));Rr.exactYears>Fr&&at%12===0?ot=G.tickIncrement(ot,"M6","reverse")+f*1.5:Rr.exactMonths>Fr?ot=G.tickIncrement(ot,"M1","reverse")+f*15.5:ot-=u;var kt=G.tickIncrement(ot,hr);if(kt<=ur)return kt}return ot}G.prepMinorTicks=function(ot,et,hr){var ur,Tr;if(!((ur=et.minor)!=null&&ur.dtick)){delete ot.dtick;var Rr=et.dtick&&x(et._tmin),Fr;if(Rr){var at=G.tickIncrement(et._tmin,et.dtick,!0);Fr=[et._tmin,at*.99+et._tmin*.01]}else{var kt=l.simpleMap(et.range,et.r2l);Fr=[kt[0],.8*kt[0]+.2*kt[1]]}if(ot.range=l.simpleMap(Fr,et.l2r),ot._isMinor=!0,G.prepTicks(ot,hr),Rr){var Ut=x(et.dtick),ar=x(ot.dtick),Er=Ut?et.dtick:+et.dtick.substring(1),br=ar?ot.dtick:+ot.dtick.substring(1);Ut&&ar?ke(Er,br)?Er===2*T&&br===2*f&&(ot.dtick=T):Er===2*T&&br===3*f?ot.dtick=T:Er===T&&!(et._input.minor||{}).nticks?ot.dtick=f:ge(Er/br,2.5)?ot.dtick=Er/2:ot.dtick=Er:String(et.dtick).charAt(0)==="M"?ar?ot.dtick="M1":ke(Er,br)?Er>=12&&br===2&&(ot.dtick="M3"):ot.dtick=et.dtick:String(ot.dtick).charAt(0)==="L"?String(et.dtick).charAt(0)==="L"?ke(Er,br)||(ot.dtick=ge(Er/br,2.5)?et.dtick/2:et.dtick):ot.dtick="D1":ot.dtick==="D2"&&+et.dtick>1&&(ot.dtick=1)}ot.range=et.range}((Tr=et.minor)==null?void 0:Tr._tick0Init)===void 0&&(ot.tick0=et.tick0)};function ke(ot,et){return Math.abs((ot/et+.5)%1-.5)<.001}function ge(ot,et){return Math.abs(ot/et-1)<.001}G.prepTicks=function(ot,et){var hr=l.simpleMap(ot.range,ot.r2l,void 0,void 0,et);if(ot.tickmode==="auto"||!ot.dtick){var ur=ot.nticks,Tr;ur||(ot.type==="category"||ot.type==="multicategory"?(Tr=ot.tickfont?l.bigFont(ot.tickfont.size||12):15,ur=ot._length/Tr):(Tr=ot._id.charAt(0)==="y"?40:80,ur=l.constrain(ot._length/Tr,4,9)+1),ot._name==="radialaxis"&&(ur*=2)),ot.minor&&ot.minor.tickmode!=="array"||ot.tickmode==="array"&&(ur*=100),ot._roughDTick=Math.abs(hr[1]-hr[0])/ur,G.autoTicks(ot,ot._roughDTick),ot._minDtick>0&&ot.dtick0?(Rr=ur-1,Fr=ur):(Rr=ur,Fr=ur);var at=ot[Rr].value,kt=ot[Fr].value,Ut=Math.abs(kt-at),ar=hr||Ut,Er=0;ar>=g?Ut>=g&&Ut<=h?Er=Ut:Er=p:hr===w&&ar>=S?Ut>=S&&Ut<=i?Er=Ut:Er=w:ar>=_?Ut>=_&&Ut<=M?Er=Ut:Er=C:hr===T&&ar>=T?Er=T:ar>=f?Er=f:hr===u&&ar>=u?Er=u:hr===A&&ar>=A&&(Er=A);var br;Er>=Ut&&(Er=Ut,br=!0);var Or=Tr+Er;if(et.rangebreaks&&Er>0){for(var Pr=84,hn=0,zn=0;znT&&(Er=Ut)}(Er>0||ur===0)&&(ot[ur].periodX=Tr+Er/2)}}G.calcTicks=function(et,hr){for(var ur=et.type,Tr=et.calendar,Rr=et.ticklabelstep,Fr=et.ticklabelmode==="period",at=et.range[0]>et.range[1],kt=!et.ticklabelindex||l.isArrayOrTypedArray(et.ticklabelindex)?et.ticklabelindex:[et.ticklabelindex],Ut=l.simpleMap(et.range,et.r2l,void 0,void 0,hr),ar=Ut[1]=(bi?0:1);ga--){var eo=!ga;ga?(et._dtickInit=et.dtick,et._tick0Init=et.tick0):bi&&(et.minor._dtickInit=et.minor.dtick,et.minor._tick0Init=et.minor.tick0);var si=ga?et:l.extendFlat({},et,bi?et.minor:{minor:{}});if(eo?G.prepMinorTicks(si,et,hr):G.prepTicks(si,hr),si.tickmode==="array"){ga?(zn=[],Pr=We(et,!eo)):(Pn=[],hn=We(et,!eo));continue}if(si.tickmode==="sync"){zn=[],Pr=Fe(et);continue}var Ao=ye(Ut),ro=Ao[0],Sa=Ao[1],Gi=x(si.dtick),ti=ur==="log"&&!(Gi||si.dtick.charAt(0)==="L"),fi=G.tickFirst(si,hr);if(ga){if(et._tmin=fi,fi=Sa:zi<=Sa;zi=G.tickIncrement(zi,So,ar,Tr)){if(ga&&so++,si.rangebreaks&&!ar){if(zi=br)break}if(zn.length>Or||zi===xo)break;xo=zi;var ii={value:xe(zi,oi,So)};ga?(zi===fi&&(ii.first=!0),ti&&zi!==(zi|0)&&(ii.simpleLabel=!0),Rr>1&&so%Rr&&(ii.skipLabel=!0),zn.push(ii)):(ii.minor=!0,Pn.push(ii))}}if(!Pn||Pn.length<3)kt=!1;else{var co=(Pn[2].value-Pn[1].value)*(at?-1:1);Kn(co,et.tickformat)||(kt=!1,Pn=Pn.slice(1))}if(!kt)Ca=zn;else{var Wi=zn.concat(Pn);Fr&&zn.length&&(Wi=Wi.slice(1)),Wi=Wi.sort(function($o,Fo){return $o.value-Fo.value}).filter(function($o,Fo,Ji){return Fo===0||$o.value!==Ji[Fo-1].value});var Ho=Wi.map(function($o,Fo){return $o.minor===void 0&&!$o.skipLabel?Fo:null}).filter(function($o){return $o!==null});Ho.forEach(function($o){kt.map(function(Fo){var Ji=$o+Fo;Ji>=0&&Ji-1;Di--){if(zn[Di].drop){zn.splice(Di,1);continue}zn[Di].value=ba(zn[Di].value,et);var us=et.c2p(zn[Di].value);(lo?mo>us-Go:mobr||Robr&&(Ji.periodX=br),RoTr&&PrTr&&znp)et/=p,ur=Tr(10),ot.dtick="M"+12*_r(et,ur,Ge);else if(Rr>C)et/=C,ot.dtick="M"+_r(et,1,gt);else if(Rr>f){if(ot.dtick=_r(et,f,ot._hasDayOfWeekBreaks?[1,2,7,14]:Tt),!hr){var Fr=G.getTickFormat(ot),at=ot.ticklabelmode==="period";at&&(ot._rawTick0=ot.tick0),/%[uVW]/.test(Fr)?ot.tick0=l.dateTick0(ot.calendar,2):ot.tick0=l.dateTick0(ot.calendar,1),at&&(ot._dowTick0=ot.tick0)}}else Rr>A?ot.dtick=_r(et,A,gt):Rr>b?ot.dtick=_r(et,b,mt):Rr>z?ot.dtick=_r(et,z,mt):(ur=Tr(10),ot.dtick=_r(et,ur,Ge))}else if(ot.type==="log"){ot.tick0=0;var kt=l.simpleMap(ot.range,ot.r2l);if(ot._isMinor&&(et*=1.5),et>.7)ot.dtick=Math.ceil(et);else if(Math.abs(kt[1]-kt[0])<1){var Ut=1.5*Math.abs((kt[1]-kt[0])/et);et=Math.abs(Math.pow(10,kt[1])-Math.pow(10,kt[0]))/Ut,ur=Tr(10),ot.dtick="L"+_r(et,ur,Ge)}else ot.dtick=et>.3?"D2":"D1"}else ot.type==="category"||ot.type==="multicategory"?(ot.tick0=0,ot.dtick=Math.ceil(Math.max(et,1))):ci(ot)?(ot.tick0=0,ur=1,ot.dtick=_r(et,ur,nr)):(ot.tick0=0,ur=Tr(10),ot.dtick=_r(et,ur,Ge));if(ot.dtick===0&&(ot.dtick=1),!x(ot.dtick)&&typeof ot.dtick!="string"){var ar=ot.dtick;throw ot.dtick=1,"ax.dtick error: "+String(ar)}};function Zt(ot){var et=ot.dtick;if(ot._tickexponent=0,!x(et)&&typeof et!="string"&&(et=1),(ot.type==="category"||ot.type==="multicategory")&&(ot._tickround=null),ot.type==="date"){var hr=ot.r2l(ot.tick0),ur=ot.l2r(hr).replace(/(^-|i)/g,""),Tr=ur.length;if(String(et).charAt(0)==="M")Tr>10||ur.slice(5)!=="01-01"?ot._tickround="d":ot._tickround=+et.slice(1)%12===0?"y":"m";else if(et>=f&&Tr<=10||et>=f*15)ot._tickround="d";else if(et>=b&&Tr<=16||et>=A)ot._tickround="M";else if(et>=z&&Tr<=19||et>=b)ot._tickround="S";else{var Rr=ot.l2r(hr+et).replace(/^-/,"").length;ot._tickround=Math.max(Tr,Rr)-20,ot._tickround<0&&(ot._tickround=4)}}else if(x(et)||et.charAt(0)==="L"){var Fr=ot.range.map(ot.r2d||Number);x(et)||(et=Number(et.slice(1))),ot._tickround=2-Math.floor(Math.log(et)/Math.LN10+.01);var at=Math.max(Math.abs(Fr[0]),Math.abs(Fr[1])),kt=Math.floor(Math.log(at)/Math.LN10+.01),Ut=ot.minexponent===void 0?3:ot.minexponent;Math.abs(kt)>Ut&&(Mt(ot.exponentformat)&&ot.exponentformat!=="SI extended"&&!dt(kt)||Mt(ot.exponentformat)&&ot.exponentformat==="SI extended"&&!Dt(kt)?ot._tickexponent=3*Math.round((kt-1)/3):ot._tickexponent=kt)}else ot._tickround=null}G.tickIncrement=function(ot,et,hr,ur){var Tr=hr?-1:1;if(x(et))return l.increment(ot,Tr*et);var Rr=et.charAt(0),Fr=Tr*Number(et.slice(1));if(Rr==="M")return l.incrementMonth(ot,Fr,ur);if(Rr==="L")return Math.log(Math.pow(10,ot)+Fr)/Math.LN10;if(Rr==="D"){var at=et==="D2"?Kt:At,kt=ot+Tr*.01,Ut=l.roundUp(l.mod(kt,1),at,hr);return Math.floor(kt)+Math.log(v.round(Math.pow(10,Ut),1))/Math.LN10}throw"unrecognized dtick "+String(et)},G.tickFirst=function(ot,et){var hr=ot.r2l||Number,ur=l.simpleMap(ot.range,hr,void 0,void 0,et),Tr=ur[1]=0&&bi<=ot._length?ma:null};if(kt&&l.isArrayOrTypedArray(ot.ticktext)){var Pr=l.simpleMap(ot.range,ot.r2l),hn=(Math.abs(Pr[1]-Pr[0])-(ot._lBreaks||0))/1e4;for(br=0;br"+at;else{var Ut=pa(ot),ar=ot._trueSide||ot.side;(!Ut&&ar==="top"||Ut&&ar==="bottom")&&(Fr+="
")}et.text=Fr}function vt(ot,et,hr,ur,Tr){var Rr=ot.dtick,Fr=et.x,at=ot.tickformat,kt=typeof Rr=="string"&&Rr.charAt(0);if(Tr==="never"&&(Tr=""),ur&&kt!=="L"&&(Rr="L3",kt="L"),at||kt==="L")et.text=Vt(Math.pow(10,Fr),ot,Tr,ur);else if(x(Rr)||kt==="D"&&(ot.minorloglabels==="complete"||l.mod(Fr+.01,1)<.1)){var Ut;ot.minorloglabels==="complete"&&!(l.mod(Fr+.01,1)<.1)&&(Ut=!0,et.fontSize*=.75);var ar=Math.pow(10,Fr).toExponential(0),Er=ar.split("e"),br=+Er[1],Or=Math.abs(br),Pr=ot.exponentformat;Pr==="power"||Mt(Pr)&&Pr!=="SI extended"&&dt(br)||Mt(Pr)&&Pr==="SI extended"&&Dt(br)?(et.text=Er[0],Or>0&&(et.text+="x10"),et.text==="1x10"&&(et.text="10"),br!==0&&br!==1&&(et.text+=""+(br>0?"":R)+Or+""),et.fontSize*=1.25):(Pr==="e"||Pr==="E")&&Or>2?et.text=Er[0]+Pr+(br>0?"+":R)+Or:(et.text=Vt(Math.pow(10,Fr),ot,"","fakehover"),Rr==="D1"&&ot._id.charAt(0)==="y"&&(et.dy-=et.fontSize/6))}else if(kt==="D")et.text=ot.minorloglabels==="none"?"":String(Math.round(Math.pow(10,l.mod(Fr,1)))),et.fontSize*=.75;else throw"unrecognized dtick "+String(Rr);if(ot.dtick==="D1"){var hn=String(et.text).charAt(0);(hn==="0"||hn==="1")&&(ot._id.charAt(0)==="y"?et.dx-=et.fontSize/4:(et.dy+=et.fontSize/2,et.dx+=(ot.range[1]>ot.range[0]?1:-1)*et.fontSize*(Fr<0?.5:.25)))}}function ht(ot,et){var hr=ot._categories[Math.round(et.x)];hr===void 0&&(hr=""),et.text=String(hr)}function Re(ot,et,hr){var ur=Math.round(et.x),Tr=ot._categories[ur]||[],Rr=Tr[1]===void 0?"":String(Tr[1]),Fr=Tr[0]===void 0?"":String(Tr[0]);hr?et.text=Fr+" - "+Rr:(et.text=Rr,et.text2=Fr)}function Be(ot,et,hr,ur,Tr){Tr==="never"?Tr="":ot.showexponent==="all"&&Math.abs(et.x/ot.dtick)<1e-6&&(Tr="hide"),et.text=Vt(et.x,ot,Tr,ur)}function He(ot,et,hr,ur,Tr){if(ot.thetaunit==="radians"&&!hr){var Rr=et.x/180;if(Rr===0)et.text="0";else{var Fr=$e(Rr);if(Fr[1]>=100)et.text=Vt(l.deg2rad(et.x),ot,Tr,ur);else{var at=et.x<0;Fr[1]===1?Fr[0]===1?et.text="\u03C0":et.text=Fr[0]+"\u03C0":et.text=["",Fr[0],"","\u2044","",Fr[1],"","\u03C0"].join(""),at&&(et.text=R+et.text)}}}else et.text=Vt(et.x,ot,Tr,ur)}function $e(ot){function et(at,kt){return Math.abs(at-kt)<=1e-6}function hr(at,kt){return et(kt,0)?at:hr(kt,at%kt)}function ur(at){for(var kt=1;!et(Math.round(at*kt)/kt,at);)kt*=10;return kt}var Tr=ur(ot),Rr=ot*Tr,Fr=Math.abs(hr(Rr,Tr));return[Math.round(Rr/Fr),Math.round(Tr/Fr)]}var Ze=["f","p","n","\u03BC","m","","k","M","G","T"],Je=["q","r","y","z","a",...Ze,"P","E","Z","Y","R","Q"],Mt=ot=>["SI","SI extended","B"].includes(ot);function dt(ot){return ot>14||ot<-15}function Dt(ot){return ot>32||ot<-30}function Ct(ot,et){return Mt(et)?!!(et==="SI extended"&&Dt(ot)||et!=="SI extended"&&dt(ot)):!1}function Vt(ot,et,hr,ur){var Tr=ot<0,Rr=et._tickround,Fr=hr||et.exponentformat||"B",at=et._tickexponent,kt=G.getTickFormat(et),Ut=et.separatethousands;if(ur){var ar={exponentformat:Fr,minexponent:et.minexponent,dtick:et.showexponent==="none"?et.dtick:x(ot)&&Math.abs(ot)||1,range:et.showexponent==="none"?et.range.map(et.r2d):[0,ot||1]};Zt(ar),Rr=(Number(ar._tickround)||0)+4,at=ar._tickexponent,et.hoverformat&&(kt=et.hoverformat)}if(kt)return et._numFormat(kt)(ot).replace(/-/g,R);Fr==="none"&&(at=0),ot=Math.abs(ot);let Er=Math.pow(10,-Rr)/2;if(ot"+br+"":Fr==="B"&&at===9?ot+="B":Mt(Fr)&&(ot+=Fr==="SI extended"?Je[at/3+10]:Ze[at/3+5])}return Tr?R+ot:ot}G.getTickFormat=function(ot){var et;function hr(kt){return typeof kt!="string"?kt:Number(kt.replace("M",""))*C}function ur(kt,Ut){var ar=["L","D"];if(typeof kt==typeof Ut){if(typeof kt=="number")return kt-Ut;var Er=ar.indexOf(kt.charAt(0)),br=ar.indexOf(Ut.charAt(0));return Er===br?Number(kt.replace(/(L|D)/g,""))-Number(Ut.replace(/(L|D)/g,"")):Er-br}else return typeof kt=="number"?1:-1}function Tr(kt,Ut,ar){var Er=ar||function(Pr){return Pr},br=Ut[0],Or=Ut[1];return(!br&&typeof br!="number"||Er(br)<=Er(kt))&&(!Or&&typeof Or!="number"||Er(Or)>=Er(kt))}function Rr(kt,Ut){var ar=Ut[0]===null,Er=Ut[1]===null,br=ur(kt,Ut[0])>=0,Or=ur(kt,Ut[1])<=0;return(ar||br)&&(Er||Or)}var Fr,at;if(ot.tickformatstops&&ot.tickformatstops.length>0)switch(ot.type){case"date":case"linear":{for(et=0;et=0&&Tr.unshift(Tr.splice(ar,1).shift())}});var at={false:{left:0,right:0}};return l.syncOrAsync(Tr.map(function(kt){return function(){if(kt){var Ut=G.getFromId(ot,kt);hr||(hr={}),hr.axShifts=at,hr.overlayingShiftedAx=Fr;var ar=G.drawOne(ot,Ut,hr);return Ut._shiftPusher&&ho(Ut,Ut._fullDepth||0,at,!0),Ut._r=Ut.range.slice(),Ut._rl=l.simpleMap(Ut._r,Ut.r2l),ar}}}))},G.drawOne=function(ot,et,hr){hr=hr||{};var ur=hr.axShifts||{},Tr=hr.overlayingShiftedAx||[],Rr,Fr,at;et.setScale();var kt=ot._fullLayout,Ut=et._id,ar=Ut.charAt(0),Er=G.counterLetter(Ut),br=kt._plots[et._mainSubplot],Or=et.zerolinelayer==="above traces";if(!br)return;if(et._shiftPusher=et.autoshift||Tr.indexOf(et._id)!==-1||Tr.indexOf(et.overlaying)!==-1,et._shiftPusher&et.anchor==="free"){var Pr=et.linewidth/2||0;et.ticks==="inside"&&(Pr+=et.ticklen),ho(et,Pr,ur,!0),ho(et,et.shift||0,ur,!1)}(hr.skipTitle!==!0||et._shift===void 0)&&(et._shift=da(et,ur));var hn=br[ar+"axislayer"],zn=et._mainLinePosition,Pn=zn+=et._shift,Ca=et._mainMirrorPosition,ma=et._vals=G.calcTicks(et),bi=[et.mirror,Pn,Ca].join("_");for(Rr=0;Rr0?Fo.bottom-Ps:0,$o))));var zl=0,ml=0;if(et._shiftPusher&&(zl=Math.max($o,Fo.height>0?es==="l"?Ps-Fo.left:Fo.right-Ps:0),et.title.text!==kt._dfltTitle[ar]&&(ml=(et._titleStandoff||0)+(et._titleScoot||0),es==="l"&&(ml+=Ir(et))),et._fullDepth=Math.max(zl,ml)),et.automargin){Ji={x:0,y:0,r:0,l:0,t:0,b:0};var Ts=[0,1],yl=typeof et._shift=="number"?et._shift:0;if(ar==="x"){if(es==="b"?Ji[es]=et._depth:(Ji[es]=et._depth=Math.max(Fo.width>0?Ps-Fo.top:0,$o),Ts.reverse()),Fo.width>0){var mu=Fo.right-(et._offset+et._length);mu>0&&(Ji.xr=1,Ji.r=mu);var su=et._offset-Fo.left;su>0&&(Ji.xl=0,Ji.l=su)}}else if(es==="l"?(et._depth=Math.max(Fo.height>0?Ps-Fo.left:0,$o),Ji[es]=et._depth-yl):(et._depth=Math.max(Fo.height>0?Fo.right-Ps:0,$o),Ji[es]=et._depth+yl,Ts.reverse()),Fo.height>0){var cc=Fo.bottom-(et._offset+et._length);cc>0&&(Ji.yb=0,Ji.b=cc);var Bl=et._offset-Fo.top;Bl>0&&(Ji.yt=1,Ji.t=Bl)}Ji[Er]=et.anchor==="free"?et.position:et._anchorAxis.domain[Ts[0]],et.title.text!==kt._dfltTitle[ar]&&(Ji[es]+=Ir(et)+(et.title.standoff||0)),et.mirror&&et.anchor!=="free"&&(Ro={x:0,y:0,r:0,l:0,t:0,b:0},Ro[Zs]=et.linewidth,et.mirror&&et.mirror!==!0&&(Ro[Zs]+=$o),et.mirror===!0||et.mirror==="ticks"?Ro[Er]=et._anchorAxis.domain[Ts[1]]:(et.mirror==="all"||et.mirror==="allticks")&&(Ro[Er]=[et._counterDomainMin,et._counterDomainMax][Ts[1]]))}Is&&(Ls=k.getComponentMethod("rangeslider","autoMarginOpts")(ot,et)),typeof et.automargin=="string"&&(Ht(Ji,et.automargin),Ht(Ro,et.automargin)),E.autoMargin(ot,Aa(et),Ji),E.autoMargin(ot,ua(et),Ro),E.autoMargin(ot,Qn(et),Ls)}),l.syncOrAsync(Jo)}};function Ht(ot,et){if(ot){var hr=Object.keys(Q).reduce(function(ur,Tr){return et.indexOf(Tr)!==-1&&Q[Tr].forEach(function(Rr){ur[Rr]=1}),ur},{});Object.keys(ot).forEach(function(ur){hr[ur]||(ur.length===1?ot[ur]=0:delete ot[ur])})}}function Wt(ot,et){var hr=[],ur,Tr=function(Rr,Fr){var at=Rr.xbnd[Fr];at!==null&&hr.push(l.extendFlat({},Rr,{x:at}))};if(et.length){for(ur=0;urot.range[1],at=ot.ticklabelposition&&ot.ticklabelposition.indexOf("inside")!==-1,kt=!at;if(hr){var Ut=Fr?-1:1;hr=hr*Ut}if(ur){var ar=ot.side,Er=at&&(ar==="top"||ar==="left")||kt&&(ar==="bottom"||ar==="right")?1:-1;ur=ur*Er}return ot._id.charAt(0)==="x"?function(br){return e(Tr+ot._offset+ot.l2p(It(br))+hr,Rr+ur)}:function(br){return e(Rr+ur,Tr+ot._offset+ot.l2p(It(br))+hr)}};function It(ot){return ot.periodX!==void 0?ot.periodX:ot.x}function ir(ot){var et=ot.ticklabelposition||"",hr=ot.tickson||"",ur=function(Pr){return et.indexOf(Pr)!==-1},Tr=ur("top"),Rr=ur("left"),Fr=ur("right"),at=ur("bottom"),kt=ur("inside"),Ut=hr!=="boundaries"&&(at||Rr||Tr||Fr);if(!Ut&&!kt)return[0,0];var ar=ot.side,Er=Ut?(ot.tickwidth||0)/2:0,br=K,Or=ot.tickfont?ot.tickfont.size:12;return(at||Tr)&&(Er+=Or*oe,br+=(ot.linewidth||0)/2),(Rr||Fr)&&(Er+=(ot.linewidth||0)/2,br+=K),kt&&ar==="top"&&(br-=Or*(1-oe)),(Rr||Tr)&&(Er=-Er),(ar==="bottom"||ar==="right")&&(br=-br),[Ut?Er:0,kt?br:0]}G.makeTickPath=function(ot,et,hr,ur){ur||(ur={});var Tr=ur.minor;if(Tr&&!ot.minor)return"";var Rr=ur.len!==void 0?ur.len:Tr?ot.minor.ticklen:ot.ticklen,Fr=ot._id.charAt(0),at=(ot.linewidth||1)/2;return Fr==="x"?"M0,"+(et+at*hr)+"v"+Rr*hr:"M"+(et+at*hr)+",0h"+Rr*hr},G.makeLabelFns=function(ot,et,hr){var ur=ot.ticklabelposition||"",Tr=ot.tickson||"",Rr=function(fi){return ur.indexOf(fi)!==-1},Fr=Rr("top"),at=Rr("left"),kt=Rr("right"),Ut=Rr("bottom"),ar=Tr!=="boundaries"&&(Ut||at||Fr||kt),Er=Rr("inside"),br=ur==="inside"&&ot.ticks==="inside"||!Er&&ot.ticks==="outside"&&Tr!=="boundaries",Or=0,Pr=0,hn=br?ot.ticklen:0;if(Er?hn*=-1:ar&&(hn=0),br&&(Or+=hn,hr)){var zn=l.deg2rad(hr);Or=hn*Math.cos(zn)+1,Pr=hn*Math.sin(zn)}ot.showticklabels&&(br||ot.showline)&&(Or+=.2*ot.tickfont.size),Or+=(ot.linewidth||1)/2*(Er?-1:1);var Pn={labelStandoff:Or,labelShift:Pr},Ca,ma,bi,ga,eo=0,si=ot.side,Ao=ot._id.charAt(0),ro=ot.tickangle,Sa;if(Ao==="x")Sa=!Er&&si==="bottom"||Er&&si==="top",ga=Sa?1:-1,Er&&(ga*=-1),Ca=Pr*ga,ma=et+Or*ga,bi=Sa?1:-.2,Math.abs(ro)===90&&(Er?bi+=ae:ro===-90&&si==="bottom"?bi=oe:ro===90&&si==="top"?bi=ae:bi=.5,eo=ae/2*(ro/90)),Pn.xFn=function(fi){return fi.dx+Ca+eo*fi.fontSize},Pn.yFn=function(fi){return fi.dy+ma+fi.fontSize*bi},Pn.anchorFn=function(fi,xo){if(ar){if(at)return"end";if(kt)return"start"}return!x(xo)||xo===0||xo===180?"middle":xo*ga<0!==Er?"end":"start"},Pn.heightFn=function(fi,xo,zi){return xo<-60||xo>60?-.5*zi:ot.side==="top"!==Er?-zi:0};else if(Ao==="y"){if(Sa=!Er&&si==="left"||Er&&si==="right",ga=Sa?1:-1,Er&&(ga*=-1),Ca=Or,ma=Pr*ga,bi=0,!Er&&Math.abs(ro)===90&&(ro===-90&&si==="left"||ro===90&&si==="right"?bi=oe:bi=.5),Er){var Gi=x(ro)?+ro:0;if(Gi!==0){var ti=l.deg2rad(Gi);eo=Math.abs(Math.sin(ti))*oe*ga,bi=0}}Pn.xFn=function(fi){return fi.dx+et-(Ca+fi.fontSize*bi)*ga+eo*fi.fontSize},Pn.yFn=function(fi){return fi.dy+ma+fi.fontSize*ae},Pn.anchorFn=function(fi,xo){return x(xo)&&Math.abs(xo)===90?"middle":Sa?"end":"start"},Pn.heightFn=function(fi,xo,zi){return ot.side==="right"&&(xo*=-1),xo<-30?-zi:xo<30?-.5*zi:0}}return Pn};function cr(ot){return[ot.text,ot.x,ot.axInfo,ot.font,ot.fontSize,ot.fontColor].join("_")}G.drawTicks=function(ot,et,hr){hr=hr||{};var ur=et._id+"tick",Tr=[].concat(et.minor&&et.minor.ticks?hr.vals.filter(function(Fr){return Fr.minor&&!Fr.noTick}):[]).concat(et.ticks?hr.vals.filter(function(Fr){return!Fr.minor&&!Fr.noTick}):[]),Rr=hr.layer.selectAll("path."+ur).data(Tr,cr);Rr.exit().remove(),Rr.enter().append("path").classed(ur,1).classed("ticks",1).classed("crisp",hr.crisp!==!1).each(function(Fr){return r.stroke(v.select(this),Fr.minor?et.minor.tickcolor:et.tickcolor)}).style("stroke-width",function(Fr){return n.crispRound(ot,Fr.minor?et.minor.tickwidth:et.tickwidth,1)+"px"}).attr("d",hr.path).style("display",null),Ii(et,[U]),Rr.attr("transform",hr.transFn)},G.drawGrid=function(ot,et,hr){if(hr=hr||{},et.tickmode!=="sync"){var ur=et._id+"grid",Tr=et.minor&&et.minor.showgrid,Rr=Tr?hr.vals.filter(function(Pn){return Pn.minor}):[],Fr=et.showgrid?hr.vals.filter(function(Pn){return!Pn.minor}):[],at=hr.counterAxis;if(at&&G.shouldShowZeroLine(ot,et,at))for(var kt=et.tickmode==="array",Ut=0;Ut=0;Pr--){var hn=Pr?br:Or;if(hn){var zn=hn.selectAll("path."+ur).data(Pr?Fr:Rr,cr);zn.exit().remove(),zn.enter().append("path").classed(ur,1).classed("crisp",hr.crisp!==!1),zn.attr("transform",hr.transFn).attr("d",hr.path).each(function(Pn){return r.stroke(v.select(this),Pn.minor?et.minor.gridcolor:et.gridcolor||"#ddd")}).style("stroke-dasharray",function(Pn){return n.dashStyle(Pn.minor?et.minor.griddash:et.griddash,Pn.minor?et.minor.gridwidth:et.gridwidth)}).style("stroke-width",function(Pn){return(Pn.minor?Er:et._gw)+"px"}).style("display",null),typeof hr.path=="function"&&zn.attr("d",hr.path)}}Ii(et,[P,j])}},G.drawZeroLine=function(ot,et,hr){hr=hr||hr;var ur=et._id+"zl",Tr=G.shouldShowZeroLine(ot,et,hr.counterAxis),Rr=hr.layer.selectAll("path."+ur).data(Tr?[{x:0,id:et._id}]:[]);Rr.exit().remove(),Rr.enter().append("path").classed(ur,1).classed("zl",1).classed("crisp",hr.crisp!==!1).each(function(){hr.layer.selectAll("path").sort(function(Fr,at){return $(Fr.id,at.id)})}),Rr.attr("transform",hr.transFn).attr("d",hr.path).call(r.stroke,et.zerolinecolor||r.defaultLine).style("stroke-width",n.crispRound(ot,et.zerolinewidth,et._gw||1)+"px").style("display",null),Ii(et,[F])},G.drawLabels=function(ot,et,hr){hr=hr||{};var ur=ot._fullLayout,Tr=et._id,Rr=et.zerolinelayer==="above traces",Fr=hr.cls||Tr+"tick",at=hr.vals.filter(function(oi){return oi.text}),kt=hr.labelFns,Ut=hr.secondary?0:et.tickangle,ar=(et._prevTickAngles||{})[Fr],Er=hr.layer.selectAll("g."+Fr).data(et.showticklabels?at:[],cr),br=[];Er.enter().append("g").classed(Fr,1).append("text").attr("text-anchor","middle").each(function(oi){var ii=v.select(this),co=ot._promises.length;ii.call(t.positionText,kt.xFn(oi),kt.yFn(oi)).call(n.font,{family:oi.font,size:oi.fontSize,color:oi.fontColor,weight:oi.fontWeight,style:oi.fontStyle,variant:oi.fontVariant,textcase:oi.fontTextcase,lineposition:oi.fontLineposition,shadow:oi.fontShadow}).text(oi.text).call(t.convertToTspans,ot),ot._promises[co]?br.push(ot._promises.pop().then(function(){Or(ii,Ut)})):Or(ii,Ut)}),Ii(et,[Z]),Er.exit().remove(),hr.repositionOnUpdate&&Er.each(function(oi){v.select(this).select("text").call(t.positionText,kt.xFn(oi),kt.yFn(oi))});function Or(oi,ii){oi.each(function(co){var Wi=v.select(this),Ho=Wi.select(".text-math-group"),Io=kt.anchorFn(co,ii),qo=hr.transFn.call(Wi.node(),co)+(x(ii)&&+ii!=0?" rotate("+ii+","+kt.xFn(co)+","+(kt.yFn(co)-co.fontSize/2)+")":""),Oo=t.lineCount(Wi),ws=H*co.fontSize,Ko=kt.heightFn(co,x(ii)?+ii:0,(Oo-1)*ws);if(Ko&&(qo+=e(0,Ko)),Ho.empty()){var ns=Wi.select("text");ns.attr({transform:qo,"text-anchor":Io}),ns.style("display",null),et._adjustTickLabelsOverflow&&et._adjustTickLabelsOverflow()}else{var wo=n.bBox(Ho.node()).width,No=wo*{end:-.5,start:.5}[Io];Ho.attr("transform",qo+e(No,0))}})}et._adjustTickLabelsOverflow=function(){var oi=et.ticklabeloverflow;if(!(!oi||oi==="allow")){var ii=oi.indexOf("hide")!==-1,co=et._id.charAt(0)==="x",Wi=0,Ho=co?ot._fullLayout.width:ot._fullLayout.height;if(oi.indexOf("domain")!==-1){var Io=l.simpleMap(et.range,et.r2l);Wi=et.l2p(Io[0])+et._offset,Ho=et.l2p(Io[1])+et._offset}var qo=Math.min(Wi,Ho),Oo=Math.max(Wi,Ho),ws=et.side,Ko=1/0,ns=-1/0;Er.each(function(lo){var Go=v.select(this),mo=Go.select(".text-math-group");if(mo.empty()){var us=n.bBox(Go.node()),Jo=0;co?(us.right>Oo||us.leftOo||us.top+(et.tickangle?0:lo.fontSize/4)et["_visibleLabelMin_"+Io._id]?Go.style("display","none"):Oo.K==="tick"&&!qo&&Go.node().style.display!=="none"&&Go.style("display",null)})})})})},Or(Er,ar+1?ar:Ut);function Pr(){return br.length&&Promise.all(br)}var hn=null;function zn(){if(Or(Er,Ut),at.length&&et.autotickangles&&(et.type!=="log"||String(et.dtick).charAt(0)!=="D")){hn=et.autotickangles[0];var oi=0,ii=[],co,Wi=1;Er.each(function(Ji){oi=Math.max(oi,Ji.fontSize);var Ro=et.l2p(Ji.x),Ls=jn(this),zl=n.bBox(Ls.node());Wi=Math.max(Wi,t.lineCount(Ls)),ii.push({top:0,bottom:10,height:10,left:Ro-zl.width/2,right:Ro+zl.width/2+2,width:zl.width+2})});var Ho=(et.tickson==="boundaries"||et.showdividers)&&!hr.secondary,Io=at.length,qo=Math.abs((at[Io-1].x-at[0].x)*et._m)/(Io-1),Oo=Ho?qo/2:qo,ws=Ho?et.ticklen:oi*1.25*Wi,Ko=Math.sqrt(Math.pow(Oo,2)+Math.pow(ws,2)),ns=Oo/Ko,wo=et.autotickangles.map(function(Ji){return Ji*Math.PI/180}),No=wo.find(function(Ji){return Math.abs(Math.cos(Ji))<=ns});No===void 0&&(No=wo.reduce(function(Ji,Ro){return Math.abs(Math.cos(Ji))so*zi&&(ti=zi,ro[Ao]=Sa[Ao]=fi[Ao])}var Mo=Math.abs(ti-Gi);Mo-ga>0?(Mo-=ga,ga*=1+ga/Mo):ga=0,et._id.charAt(0)!=="y"&&(ga=-ga),ro[si]=ma.p2r(ma.r2p(Sa[si])+eo*ga),ma.autorange==="min"||ma.autorange==="max reversed"?(ro[0]=null,ma._rangeInitial0=void 0,ma._rangeInitial1=void 0):(ma.autorange==="max"||ma.autorange==="min reversed")&&(ro[1]=null,ma._rangeInitial0=void 0,ma._rangeInitial1=void 0),ur._insideTickLabelsUpdaterange[ma._name+".range"]=ro}var So=l.syncOrAsync(Pn);return So&&So.then&&ot._promises.push(So),So};function fr(ot,et,hr){var ur=et._id+"divider",Tr=hr.vals,Rr=hr.layer.selectAll("path."+ur).data(Tr,cr);Rr.exit().remove(),Rr.enter().insert("path",":first-child").classed(ur,1).classed("crisp",1).call(r.stroke,et.dividercolor).style("stroke-width",n.crispRound(ot,et.dividerwidth,1)+"px"),Rr.attr("transform",hr.transFn).attr("d",hr.path)}G.getPxPosition=function(ot,et){var hr=ot._fullLayout._size,ur=et._id.charAt(0),Tr=et.side,Rr;if(et.anchor!=="free"?Rr=et._anchorAxis:ur==="x"?Rr={_offset:hr.t+(1-(et.position||0))*hr.h,_length:0}:ur==="y"&&(Rr={_offset:hr.l+(et.position||0)*hr.w+et._shift,_length:0}),Tr==="top"||Tr==="left")return Rr._offset;if(Tr==="bottom"||Tr==="right")return Rr._offset+Rr._length};function Ir(ot){var et=ot.title.font.size,hr=(ot.title.text.match(t.BR_TAG_ALL)||[]).length;return ot.title.hasOwnProperty("standoff")?et*(oe+hr*H):hr?et*(hr+1)*H:et}function ln(ot,et){var hr=ot._fullLayout,ur=et._id,Tr=ur.charAt(0),Rr=et.title.font.size,Fr,at=(et.title.text.match(t.BR_TAG_ALL)||[]).length;if(et.title.hasOwnProperty("standoff"))et.side==="bottom"||et.side==="right"?Fr=et._depth+et.title.standoff+Rr*oe:(et.side==="top"||et.side==="left")&&(Fr=et._depth+et.title.standoff+Rr*(ae+at*H));else{var kt=pa(et);if(et.type==="multicategory")Fr=et._depth;else{var Ut=1.5*Rr;kt&&(Ut=.5*Rr,et.ticks==="outside"&&(Ut+=et.ticklen)),Fr=10+Ut+(et.linewidth?et.linewidth-1:0)}kt||(Tr==="x"?Fr+=et.side==="top"?Rr*(et.showticklabels?1:0):Rr*(et.showticklabels?1.5:.5):Fr+=et.side==="right"?Rr*(et.showticklabels?1:.5):Rr*(et.showticklabels?.5:0))}var ar=G.getPxPosition(ot,et),Er,br,Or;Tr==="x"?(br=et._offset+et._length/2,Or=et.side==="top"?ar-Fr:ar+Fr):(Or=et._offset+et._length/2,br=et.side==="right"?ar+Fr:ar-Fr,Er={rotate:"-90",offset:0});var Pr;if(et.type!=="multicategory"){var hn=et._selections[et._id+"tick"];if(Pr={selection:hn,side:et.side},hn&&hn.node()&&hn.node().parentNode){var zn=n.getTranslate(hn.node().parentNode);Pr.offsetLeft=zn.x,Pr.offsetTop=zn.y}et.title.hasOwnProperty("standoff")&&(Pr.pad=0)}return et._titleStandoff=Fr,a.draw(ot,ur+"title",{propContainer:et,propName:et._name+".title.text",placeholder:hr._dfltTitle[Tr],avoid:Pr,transform:Er,attributes:{x:br,y:Or,"text-anchor":"middle"}})}G.shouldShowZeroLine=function(ot,et,hr){var ur=l.simpleMap(et.range,et.r2l);return ur[0]*ur[1]<=0&&et.zeroline&&(et.type==="linear"||et.type==="-")&&!(et.rangebreaks&&et.maskBreaks(0)===B)&&(nn(et,0)||!wn(ot,et,hr,ur)||Un(ot,et))},G.clipEnds=function(ot,et){return et.filter(function(hr){return nn(ot,hr.x)})};function nn(ot,et){var hr=ot.l2p(et);return hr>1&&hr1)for(Tr=1;Tr=Tr.min&&ot=N:/%L/.test(et)?ot>=I:/%[SX]/.test(et)?ot>=z:/%M/.test(et)?ot>=b:/%[HI]/.test(et)?ot>=A:/%p/.test(et)?ot>=u:/%[Aadejuwx]/.test(et)?ot>=f:/%[UVW]/.test(et)?ot>=T:/%[Bbm]/.test(et)?ot>=_:/%[q]/.test(et)?ot>=S:/%[Yy]/.test(et)?ot>=g:!0}}}),Rb=Ee({"src/plots/cartesian/autorange_options_defaults.js"(J,V){"use strict";V.exports=function(x,E,k){var l,e;if(k){var t=E==="reversed"||E==="min reversed"||E==="max reversed";l=k[t?1:0],e=k[t?0:1]}var a=x("autorangeoptions.minallowed",e===null?l:void 0),r=x("autorangeoptions.maxallowed",l===null?e:void 0);a===void 0&&x("autorangeoptions.clipmin"),r===void 0&&x("autorangeoptions.clipmax"),x("autorangeoptions.include")}}}),Fb=Ee({"src/plots/cartesian/range_defaults.js"(J,V){"use strict";var v=Rb();V.exports=function(E,k,l,e){var t=k._template||{},a=k.type||t.type||"-";l("minallowed"),l("maxallowed");var r=l("range");if(!r){var n;!e.noInsiderange&&a!=="log"&&(n=l("insiderange"),n&&(n[0]===null||n[1]===null)&&(k.insiderange=!1,n=void 0),n&&(r=l("range",n)))}var o=k.getAutorangeDflt(r,e),s=l("autorange",o),c;r&&(r[0]===null&&r[1]===null||(r[0]===null||r[1]===null)&&(s==="reversed"||s===!0)||r[0]!==null&&(s==="min"||s==="max reversed")||r[1]!==null&&(s==="max"||s==="min reversed"))&&(r=void 0,delete k.range,k.autorange=!0,c=!0),c||(o=k.getAutorangeDflt(r,e),s=l("autorange",o)),s&&(v(l,s,r),(a==="linear"||a==="-")&&l("rangemode")),k.cleanRange()}}}),vM=Ee({"node_modules/mouse-event-offset/index.js"(J,V){var v={left:0,top:0};V.exports=x;function x(k,l,e){l=l||k.currentTarget||k.srcElement,Array.isArray(e)||(e=[0,0]);var t=k.clientX||0,a=k.clientY||0,r=E(l);return e[0]=t-r.left,e[1]=a-r.top,e}function E(k){return k===window||k===document||k===document.body?v:k.getBoundingClientRect()}}}),Fg=Ee({"node_modules/has-passive-events/index.js"(J,V){"use strict";var v=Mb();function x(){var E=!1;try{var k=Object.defineProperty({},"passive",{get:function(){E=!0}});window.addEventListener("test",null,k),window.removeEventListener("test",null,k)}catch{E=!1}return E}V.exports=v&&x()}}),pM=Ee({"src/components/dragelement/align.js"(J,V){"use strict";V.exports=function(x,E,k,l,e){var t=(x-k)/(l-k),a=t+E/(l-k),r=(t+a)/2;return e==="left"||e==="bottom"?t:e==="center"||e==="middle"?r:e==="right"||e==="top"?a:t<2/3-r?t:a>4/3-r?a:r}}}),mM=Ee({"src/components/dragelement/cursor.js"(J,V){"use strict";var v=Vr(),x=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];V.exports=function(k,l,e,t){return e==="left"?k=0:e==="center"?k=1:e==="right"?k=2:k=v.constrain(Math.floor(k*3),0,2),t==="bottom"?l=0:t==="middle"?l=1:t==="top"?l=2:l=v.constrain(Math.floor(l*3),0,2),x[l][k]}}}),gM=Ee({"src/components/dragelement/unhover.js"(J,V){"use strict";var v=zp(),x=Dg(),E=N0().getGraphDiv,k=Mv(),l=V.exports={};l.wrapped=function(e,t,a){var r;e=E(e),e._fullLayout&&x.clear(e._fullLayout._uid+k.HOVERID);let n=e._hoverdata;l.raw(e,t,a)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,(r=e._fullLayout)!=null&&r.hoveranywhere&&t?.target&&!n&&e.emit("plotly_unhover",{event:t,points:[]}))},l.raw=function(t,a){var r=t._fullLayout,n=t._hoverdata;return a||(a={}),a.target&&!t._dragged&&v.triggerHandler(t,"plotly_beforehover",a)===!1?!1:(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,a.target&&n&&t.emit("plotly_unhover",{event:a,points:n}),!0)}}}),qf=Ee({"src/components/dragelement/index.js"(J,V){"use strict";var v=vM(),x=Sb(),E=Fg(),k=Vr().removeElement,l=tc(),e=V.exports={};e.align=pM(),e.getCursor=mM();var t=gM();e.unhover=t.wrapped,e.unhoverRaw=t.raw,e.init=function(o){var s=o.gd,c=1,m=s._context.doubleClickDelay,h=o.element,p,g,i,w,S,M,C,_;s._mouseDownTime||(s._mouseDownTime=0),h.style.pointerEvents="all",h.onmousedown=u,E?(h._ontouchstart&&h.removeEventListener("touchstart",h._ontouchstart),h._ontouchstart=u,h.addEventListener("touchstart",u,{passive:!1})):h.ontouchstart=u;function T(z,I,N){return Math.abs(z)"u"&&typeof z.clientY>"u"&&(z.clientX=p,z.clientY=g),i=new Date().getTime(),i-s._mouseDownTimem&&(c=Math.max(c-1,1)),s._dragged)o.doneFn&&o.doneFn();else{var I;M.target===C?I=M:(I={target:C,srcElement:C,toElement:C},Object.keys(M).concat(Object.keys(M.__proto__)).forEach(N=>{var R=M[N];!I[N]&&typeof R!="function"&&(I[N]=R)})),o.clickFn&&o.clickFn(c,I),_||C.dispatchEvent(new MouseEvent("click",z))}s._dragging=!1,s._dragged=!1}};function a(){var n=document.createElement("div");n.className="dragcover";var o=n.style;return o.position="fixed",o.left=0,o.right=0,o.top=0,o.bottom=0,o.zIndex=999999999,o.background="none",document.body.appendChild(n),n}e.coverSlip=a;function r(n){return v(n.changedTouches?n.changedTouches[0]:n,document.body)}}}),Dh=Ee({"src/lib/setcursor.js"(J,V){"use strict";V.exports=function(x,E){(x.attr("class")||"").split(" ").forEach(function(k){k.indexOf("cursor-")===0&&x.classed(k,!1)}),E&&x.classed("cursor-"+E,!0)}}}),yM=Ee({"src/lib/override_cursor.js"(J,V){"use strict";var v=Dh(),x="data-savedcursor",E="!!";V.exports=function(l,e){var t=l.attr(x);if(e){if(!t){for(var a=(l.attr("class")||"").split(" "),r=0;rX.legend.length)for(var Y=X.legend.length;Y(r==="legend"?1:0));if(N===!1&&(o[r]=void 0),!(N===!1&&!m.uirevision)&&(p("uirevision",o.uirevision),N!==!1)){p("borderwidth");var R=p("orientation"),B=p("yref"),F=p("xref"),P=R==="h",j=B==="paper",U=F==="paper",Z,Q,re,ae="left";P?(Z=0,v.getComponentMethod("rangeslider","isVisible")(n.xaxis)?j?(Q=1.1,re="bottom"):(Q=1,re="top"):j?(Q=-.1,re="top"):(Q=0,re="bottom")):(Q=1,re="auto",U?Z=1.02:(Z=1,ae="right")),x.coerce(m,h,{x:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:Z}},"x"),x.coerce(m,h,{y:{valType:"number",editType:"legend",min:j?-2:0,max:j?3:1,dflt:Q}},"y"),p("traceorder",f),t.isGrouped(o[r])&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("indentation"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("xanchor",ae),p("yanchor",re),p("maxheight"),p("valign"),x.noneOrAll(m,h,["x","y"]);var oe=p("title.text");if(oe){p("title.side",P?"left":"top");var H=x.extendFlat({},g,{size:x.bigFont(g.size)});x.coerceFont(p,"title.font",H);let X=c>1;p("titleclick",X?"toggle":!1),p("titledoubleclick",X?"toggleothers":!1)}}}V.exports=function(n,o,s){var c,m=s.slice(),h=o.shapes;if(h)for(c=0;cUe.showlegend||Ue.legendgroup);var g=h.concat(p),i=o.trace;i._isShape&&(i=n.shapes[i.index]);var w=i.legendgroup,S,M,C,_,T,f,u={},A=[],b=[],z=[];function I(Ue,qe){var ke=A.indexOf(Ue),ge=u.visible;return ge||(ge=u.visible=[]),A.indexOf(Ue)===-1&&(A.push(Ue),ke=A.length-1),ge[ke]=qe,ke}var N=(n.shapes||[]).map(function(Ue){return Ue._input}),R=!1;function B(Ue,qe){N[Ue].visible=qe,R=!0}function F(Ue,qe){if(!(o.groupTitle&&!c)){var ke=Ue._isShape,ge=Ue.index;ge===void 0&&(ge=Ue._index);var ue=Ue.visible===!1?!1:qe;ke?B(ge,ue):I(ge,ue)}}var P=i.legend;if(!i._isShape&&V.traceIs(i,"pie-like")){var j=o.label,U=m.indexOf(j);if(r==="toggle")U===-1?m.push(j):m.splice(U,1);else if(r==="toggleothers"){var Z=U!==-1,Q=[];for(S=0;SC.showlegend||C.legendgroup),c=n.concat(s);function m(C){return(C.legend||"legend")===o}var h,p;if(a==="toggle")h=!c.some(function(_){return m(_)&&_.visible===!0}),p=!1;else{let C=c.some(function(_){return!m(_)&&_.visible===!0&&_.showlegend!==!1});h=!0,p=!C}let g={visible:[]},i=[],w=(r.shapes||[]).map(function(C){return C._input});for(var S=!1,M=0;MB&&(N=B)}z[g][0]._groupMinRank=N,z[g][0]._preGroupSort=g}var F=function(re,ae){return re[0]._groupMinRank-ae[0]._groupMinRank||re[0]._preGroupSort-ae[0]._preGroupSort},P=function(re,ae){var oe=v(re.trace.legendrank)?re.trace.legendrank[re.i]:re.trace.legendrank,H=v(ae.trace.legendrank)?ae.trace.legendrank[ae.i]:ae.trace.legendrank;return oe-H||re._preSort-ae._preSort};for(z.forEach(function(re,ae){re[0]._preGroupSort=ae}),z.sort(F),g=0;g0)Y=X.width;else return 0;return f?G:Math.min(Y,K)};M.each(function(H){var X=v.select(this),K=E.ensureSingle(X,"g","layers");K.style("opacity",H[0].trace.opacity);var G=_.indentation,Y=_.valign,q=H[0].lineHeight,$=H[0].height;if(Y==="middle"&&G===0||!q||!$)K.attr("transform",null);else{var ee={top:1,bottom:-1}[Y],ne=ee*(.5*(q-$+3))||0,fe=_.indentation;K.attr("transform",k(fe,ne))}var ye=K.selectAll("g.legendfill").data([H]);ye.enter().append("g").classed("legendfill",!0);var xe=K.selectAll("g.legendlines").data([H]);xe.enter().append("g").classed("legendlines",!0);var Ae=K.selectAll("g.legendsymbols").data([H]);Ae.enter().append("g").classed("legendsymbols",!0),Ae.selectAll("g.legendpoints").data([H]).enter().append("g").classed("legendpoints",!0)}).each(oe).each(R).each(F).each(B).each(j).each(re).each(Q).each(I).each(N).each(U).each(Z);function I(H){var X=i(H),K=X.showFill,G=X.showLine,Y=X.showGradientLine,q=X.showGradientFill,$=X.anyFill,ee=X.anyLine,ne=H[0],fe=ne.trace,ye,xe,Ae=t(fe),Me=Ae.colorscale,Ie=Ae.reversescale,Ue=function(Te){if(Te.size())if(K)l.fillGroupStyle(Te,C,!0);else{var Fe="legendfill-"+fe.uid;l.gradient(Te,C,Fe,g(Ie),Me,"fill")}},qe=function(Te){if(Te.size()){var Fe="legendline-"+fe.uid;l.lineGroupStyle(Te),l.gradient(Te,C,Fe,g(Ie),Me,"stroke")}},ke=a.hasMarkers(fe)||!$?"M5,0":ee?"M5,-2":"M5,-3",ge=v.select(this),ue=ge.select(".legendfill").selectAll("path").data(K||q?[H]:[]);if(ue.enter().append("path").classed("js-fill",!0),ue.exit().remove(),ue.attr("d",ke+"h"+u+"v6h-"+u+"z").call(Ue),G||Y){var ve=z(void 0,fe.line,h,c);xe=E.minExtend(fe,{line:{width:ve}}),ye=[E.minExtend(ne,{trace:xe})]}var se=ge.select(".legendlines").selectAll("path").data(G||Y?[ye]:[]);se.enter().append("path").classed("js-line",!0),se.exit().remove(),se.attr("d",ke+(Y?"l"+u+",0.0001":"h"+u)).call(G?l.lineGroupStyle:qe)}function N(H){var X=i(H),K=X.anyFill,G=X.anyLine,Y=X.showLine,q=X.showMarker,$=H[0],ee=$.trace,ne=!q&&!G&&!K&&a.hasText(ee),fe,ye;function xe(ve,se,Te,Fe){var We=E.nestedProperty(ee,ve).get(),Ge=E.isArrayOrTypedArray(We)&&se?se(We):We;if(f&&Ge&&Fe!==void 0&&(Ge=Fe),Te){if(GeTe[1])return Te[1]}return Ge}function Ae(ve){return $._distinct&&$.index&&ve[$.index]?ve[$.index]:ve[0]}if(q||ne||Y){var Me={},Ie={};if(q){Me.mc=xe("marker.color",Ae);var Ue=ee.type==="scattermap";Me.mx=Ue?"circle":xe("marker.symbol",Ae),Me.mo=xe("marker.opacity",E.mean,[.2,1]),Me.mlc=xe("marker.line.color",Ae),Me.mlw=xe("marker.line.width",E.mean,[0,5],m),Me.mld=xe("marker.line.dash",Ae),Ie.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var qe=xe("marker.size",E.mean,[2,16],s);Me.ms=qe,Ie.marker.size=qe}Y&&(Ie.line={width:xe("line.width",Ae,[0,10],c)}),ne&&(Me.tx="Aa",Me.tp=xe("textposition",Ae),Me.ts=10,Me.tc=xe("textfont.color",Ae),Me.tf=xe("textfont.family",Ae),Me.tw=xe("textfont.weight",Ae),Me.ty=xe("textfont.style",Ae),Me.tv=xe("textfont.variant",Ae),Me.tC=xe("textfont.textcase",Ae),Me.tE=xe("textfont.lineposition",Ae),Me.tS=xe("textfont.shadow",Ae)),fe=[E.minExtend($,Me)],ye=E.minExtend(ee,Ie),ye.selectedpoints=null,ye.texttemplate=null}var ke=v.select(this).select("g.legendpoints"),ge=ke.selectAll("path.scatterpts").data(q?fe:[]);ge.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",b),ge.exit().remove(),ge.call(l.pointStyle,ye,C),q&&(fe[0].mrc=3);var ue=ke.selectAll("g.pointtext").data(ne?fe:[]);ue.enter().append("g").classed("pointtext",!0).append("text").attr("transform",b),ue.exit().remove(),ue.selectAll("text").call(l.textPointStyle,ye,C)}function R(H){var X=H[0].trace,K=X.type==="waterfall";if(H[0]._distinct&&K){var G=H[0].trace[H[0].dir].marker;return H[0].mc=G.color,H[0].mlw=G.line.width,H[0].mlc=G.line.color,P(H,this,"waterfall")}var Y=[];X.visible&&K&&(Y=H[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var q=v.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(Y);q.enter().append("path").classed("legendwaterfall",!0).attr("transform",b).style("stroke-miterlimit",1),q.exit().remove(),q.each(function($){var ee=v.select(this),ne=X[$[0]].marker,fe=z(void 0,ne.line,p,m);ee.attr("d",$[1]).style("stroke-width",fe+"px").call(e.fill,ne.color),fe&&ee.call(e.stroke,ne.line.color)})}function B(H){P(H,this)}function F(H){P(H,this,"funnel")}function P(H,X,K){var G=H[0].trace,Y=G.marker||{},q=Y.line||{},$=Y.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",ee=K?G.visible&&G.type===K:x.traceIs(G,"bar"),ne=v.select(X).select("g.legendpoints").selectAll("path.legend"+K).data(ee?[H]:[]);ne.enter().append("path").classed("legend"+K,!0).attr("d",$).attr("transform",b),ne.exit().remove(),ne.each(function(fe){var ye=v.select(this),xe=fe[0],Ae=z(xe.mlw,Y.line,p,m);ye.style("stroke-width",Ae+"px");var Me=xe.mcc;if(!_._inHover&&"mc"in xe){var Ie=t(Y),Ue=Ie.mid;Ue===void 0&&(Ue=(Ie.max+Ie.min)/2),Me=l.tryColorscale(Y,"")(Ue)}var qe=Me||xe.mc||Y.color,ke=Y.pattern,ge=l.getPatternAttr,ue=ke&&(ge(ke.shape,0,"")||ge(ke.path,0,""));if(ue){var ve=ge(ke.bgcolor,0,null),se=ge(ke.fgcolor,0,null),Te=ke.fgopacity,Fe=w(ke.size,8,10),We=w(ke.solidity,.5,1),Ge="legend-"+G.uid;ye.call(l.pattern,"legend",C,Ge,ue,Fe,We,Me,ke.fillmode,ve,se,Te)}else ye.call(e.fill,qe);Ae&&e.stroke(ye,xe.mlc||q.color)})}function j(H){var X=H[0].trace,K=v.select(this).select("g.legendpoints").selectAll("path.legendbox").data(X.visible&&x.traceIs(X,"box-violin")?[H]:[]);K.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),K.exit().remove(),K.each(function(){var G=v.select(this);if((X.boxpoints==="all"||X.points==="all")&&e.opacity(X.fillcolor)===0&&e.opacity((X.line||{}).color)===0){var Y=E.minExtend(X,{marker:{size:f?s:E.constrain(X.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});K.call(l.pointStyle,Y,C)}else{var q=z(void 0,X.line,p,m);G.style("stroke-width",q+"px").call(e.fill,X.fillcolor),q&&e.stroke(G,X.line.color)}})}function U(H){var X=H[0].trace,K=v.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(X.visible&&X.type==="candlestick"?[H,H]:[]);K.enter().append("path").classed("legendcandle",!0).attr("d",function(G,Y){return Y?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",b).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(G,Y){var q=v.select(this),$=X[Y?"increasing":"decreasing"],ee=z(void 0,$.line,p,m);q.style("stroke-width",ee+"px").call(e.fill,$.fillcolor),ee&&e.stroke(q,$.line.color)})}function Z(H){var X=H[0].trace,K=v.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(X.visible&&X.type==="ohlc"?[H,H]:[]);K.enter().append("path").classed("legendohlc",!0).attr("d",function(G,Y){return Y?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",b).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(G,Y){var q=v.select(this),$=X[Y?"increasing":"decreasing"],ee=z(void 0,$.line,p,m);q.style("fill","none").call(l.dashLine,$.line.dash,ee),ee&&e.stroke(q,$.line.color)})}function Q(H){ae(H,this,"pie")}function re(H){ae(H,this,"funnelarea")}function ae(H,X,K){var G=H[0],Y=G.trace,q=K?Y.visible&&Y.type===K:x.traceIs(Y,K),$=v.select(X).select("g.legendpoints").selectAll("path.legend"+K).data(q?[H]:[]);if($.enter().append("path").classed("legend"+K,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),$.exit().remove(),$.size()){var ee=Y.marker||{},ne=z(n(ee.line.width,G.pts),ee.line,p,m),fe="pieLike",ye=E.minExtend(Y,{marker:{line:{width:ne}}},fe),xe=E.minExtend(G,{trace:ye},fe);r($,xe,ye,C)}}function oe(H){var X=H[0].trace,K,G=[];if(X.visible)switch(X.type){case"histogram2d":case"heatmap":G=[["M-15,-2V4H15V-2Z"]],K=!0;break;case"choropleth":case"choroplethmap":G=[["M-6,-6V6H6V-6Z"]],K=!0;break;case"densitymap":G=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],K="radial";break;case"cone":G=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],K=!1;break;case"streamtube":G=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],K=!1;break;case"surface":G=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],K=!0;break;case"mesh3d":G=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!1;break;case"volume":G=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!0;break;case"isosurface":G=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],K=!1;break}var Y=v.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(G);Y.enter().append("path").classed("legend3dandfriends",!0).attr("transform",b).style("stroke-miterlimit",1),Y.exit().remove(),Y.each(function(q,$){var ee=v.select(this),ne=t(X),fe=ne.colorscale,ye=ne.reversescale,xe=function(Ue){if(Ue.size()){var qe="legendfill-"+X.uid;l.gradient(Ue,C,qe,g(ye,K==="radial"),fe,"fill")}},Ae;if(fe){if(!K){var Ie=fe.length;Ae=$===0?fe[ye?Ie-1:0][1]:$===1?fe[ye?0:Ie-1][1]:fe[Math.floor((Ie-1)/2)][1]}}else{var Me=X.vertexcolor||X.facecolor||X.color;Ae=E.isArrayOrTypedArray(Me)?Me[$]||Me[0]:Me}ee.attr("d",q[0]),Ae?ee.call(e.fill,Ae):ee.call(xe)})}};function g(S,M){var C=M?"radial":"horizontal";return C+(S?"":"reversed")}function i(S){var M=S[0].trace,C=M.contours,_=a.hasLines(M)||M.visible&&M.type==="quiver",T=a.hasMarkers(M),f=M.visible&&M.fill&&M.fill!=="none",u=!1,A=!1;if(C){var b=C.coloring;b==="lines"?u=!0:_=b==="none"||b==="heatmap"||C.showlines,C.type==="constraint"?f=C._operation!=="=":(b==="fill"||b==="heatmap")&&(A=!0)}return{showMarker:T,showLine:_,showFill:f,showGradientLine:u,showGradientFill:A,anyLine:_||u,anyFill:f||A}}function w(S,M,C){return S&&E.isArrayOrTypedArray(S)?M:S>C?C:S}}}),Ub=Ee({"src/components/legend/draw.js"(J,V){"use strict";var v=Hn(),x=Vr(),E=vl(),k=Ri(),l=zp(),e=qf(),t=yo(),a=Qa(),r=Fs(),n=Nb().handleItemClick,o=Nb().handleTitleClick,s=Ob(),c=rc(),m=c.LINE_SPACING,h=c.FROM_TL,p=c.FROM_BR,g=_M(),i=jb(),w=q0(),S=1,M=/^legend[0-9]*$/;V.exports=function(Z,Q){if(Q)_(Z,Q);else{var re=Z._fullLayout,ae=re._legends,oe=re._infolayer.selectAll('[class^="legend"]');oe.each(function(){var G=v.select(this),Y=G.attr("class"),q=Y.split(" ")[0];q.match(M)&&ae.indexOf(q)===-1&&G.remove()});for(var H=0;H1)}var ne=re.hiddenlabels||[];if(!X&&(!re.showlegend||!K.length))return H.selectAll("."+ae).remove(),re._topdefs.select("#"+oe).remove(),E.autoMargin(U,ae);var fe=x.ensureSingle(H,"g",ae,function(ge){X||ge.attr("pointer-events","all")}),ye=x.ensureSingleById(re._topdefs,"clipPath",oe,function(ge){ge.append("rect")}),xe=x.ensureSingle(fe,"rect","bg",function(ge){ge.attr("shape-rendering","crispEdges")});xe.call(a.stroke,Q.bordercolor).call(a.fill,Q.bgcolor).style("stroke-width",Q.borderwidth+"px");var Ae=x.ensureSingle(fe,"g","scrollbox"),Me=Q.title;Q._titleWidth=0,Q._titleHeight=0;var Ie;Me.text?(Ie=x.ensureSingle(Ae,"text",ae+"titletext"),Ie.attr("text-anchor","start").call(t.font,Me.font).text(Me.text),I(Ie,Ae,U,Q,S),!X&&(Q.titleclick||Q.titledoubleclick)&&z(Ae,U,Q,ae)):(Ae.selectAll("."+ae+"titletext").remove(),Ae.selectAll("."+ae+"titletoggle").remove());var Ue=x.ensureSingle(fe,"rect","scrollbar",function(ge){ge.attr(s.scrollBarEnterAttrs).call(a.fill,s.scrollBarColor)}),qe=Ae.selectAll("g.groups").data(K);qe.enter().append("g").attr("class","groups"),qe.exit().remove();var ke=qe.selectAll("g.traces").data(x.identity);ke.enter().append("g").attr("class","traces"),ke.exit().remove(),ke.style("opacity",function(ge){let ue=ge[0],ve=ue.trace;if(ue.groupTitle){let se=ve.legendgroup,Te=(re.shapes||[]).filter(function(We){return We.showlegend});return U._fullData.concat(Te).some(function(We){return We.legendgroup===se&&(We.legend||"legend")===ae&&We.visible===!0})?1:.5}return k.traceIs(ve,"pie-like")?ne.indexOf(ge[0].label)!==-1?.5:1:ve.visible==="legendonly"?.5:1}).each(function(){v.select(this).call(u,U,Q)}).call(i,U,Q).each(function(ge){X||ge[0].groupTitle&&Q.groupclick==="toggleitem"||v.select(this).call(b,U,ae)}),x.syncOrAsync([E.previousPromises,function(){return B(U,qe,ke,Q,Ae)},function(){var ge=re._size,ue=Q.borderwidth,ve=Q.xref==="paper",se=Q.yref==="paper";if(Me.text){let dt=(re.shapes||[]).filter(function(Ct){return Ct.showlegend}),Dt=U._fullData.concat(dt).some(function(Ct){let Vt=Ct.legend||"legend";var Ht=Array.isArray(Vt)?Vt.includes(ae):Vt===ae;return Ht&&Ct.visible===!0});Ie.style("opacity",Dt?1:.5)}if(!X){var Te,Fe;ve?Te=ge.l+ge.w*Q.x-h[P(Q)]*Q._width:Te=re.width*Q.x-h[P(Q)]*Q._width,se?Fe=ge.t+ge.h*(1-Q.y)-h[j(Q)]*Q._effHeight:Fe=re.height*(1-Q.y)-h[j(Q)]*Q._effHeight;var We=F(U,ae,Te,Fe);if(We)return;if(re.margin.autoexpand){var Ge=Te,gt=Fe;Te=ve?x.constrain(Te,0,re.width-Q._width):Ge,Fe=se?x.constrain(Fe,0,re.height-Q._effHeight):gt,Te!==Ge&&x.log("Constrain "+ae+".x to make legend fit inside graph"),Fe!==gt&&x.log("Constrain "+ae+".y to make legend fit inside graph")}t.setTranslate(fe,Te,Fe)}if(Ue.on(".drag",null),fe.on("wheel",null),X||Q._height<=Q._maxHeight||U._context.staticPlot){var mt=Q._effHeight;X&&(mt=Q._height),xe.attr({width:Q._width-ue,height:mt-ue,x:ue/2,y:ue/2}),t.setTranslate(Ae,0,0),ye.select("rect").attr({width:Q._width-2*ue,height:mt-2*ue,x:ue,y:ue}),t.setClipUrl(Ae,oe,U),t.setRect(Ue,0,0,0,0),delete Q._scrollY}else{var Tt=Math.max(s.scrollBarMinHeight,Q._effHeight*Q._effHeight/Q._height),At=Q._effHeight-Tt-2*s.scrollBarMargin,Kt=Q._height-Q._effHeight,nr=At/Kt,_r=Math.min(Q._scrollY||0,Kt);xe.attr({width:Q._width-2*ue+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-ue,x:ue/2,y:ue/2}),ye.select("rect").attr({width:Q._width-2*ue+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-2*ue,x:ue,y:ue+_r}),t.setClipUrl(Ae,oe,U),He(_r,Tt,nr),fe.on("wheel",function(){_r=x.constrain(Q._scrollY+v.event.deltaY/Kt*At,0,Kt),He(_r,Tt,nr),_r!==0&&_r!==Kt&&v.event.preventDefault()});var Zt,sr,Ot,vt=function(dt,Dt,Ct){var Vt=(Ct-Dt)/nr+dt;return x.constrain(Vt,0,Kt)},ht=function(dt,Dt,Ct){var Vt=(Dt-Ct)/nr+dt;return x.constrain(Vt,0,Kt)},Re=v.behavior.drag().on("dragstart",function(){var dt=v.event.sourceEvent;dt.type==="touchstart"?Zt=dt.changedTouches[0].clientY:Zt=dt.clientY,Ot=_r}).on("drag",function(){var dt=v.event.sourceEvent;dt.buttons===2||dt.ctrlKey||(dt.type==="touchmove"?sr=dt.changedTouches[0].clientY:sr=dt.clientY,_r=vt(Ot,Zt,sr),He(_r,Tt,nr))});Ue.call(Re);var Be=v.behavior.drag().on("dragstart",function(){var dt=v.event.sourceEvent;dt.type==="touchstart"&&(Zt=dt.changedTouches[0].clientY,Ot=_r)}).on("drag",function(){var dt=v.event.sourceEvent;dt.type==="touchmove"&&(sr=dt.changedTouches[0].clientY,_r=ht(Ot,Zt,sr),He(_r,Tt,nr))});Ae.call(Be)}function He(dt,Dt,Ct){Q._scrollY=U._fullLayout[ae]._scrollY=dt,t.setTranslate(Ae,0,-dt),t.setRect(Ue,Q._width,s.scrollBarMargin+dt*Ct,s.scrollBarWidth,Dt),ye.select("rect").attr("y",ue+dt)}if(U._context.edits.legendPosition){var $e,Ze,Je,Mt;fe.classed("cursor-move",!0),e.init({element:fe.node(),gd:U,prepFn:function(dt){if(dt.target!==Ue.node()){var Dt=t.getTranslate(fe);Je=Dt.x,Mt=Dt.y}},moveFn:function(dt,Dt){if(Je!==void 0&&Mt!==void 0){var Ct=Je+dt,Vt=Mt+Dt;t.setTranslate(fe,Ct,Vt),$e=e.align(Ct,Q._width,ge.l,ge.l+ge.w,Q.xanchor),Ze=e.align(Vt+Q._height,-Q._height,ge.t+ge.h,ge.t,Q.yanchor)}},doneFn:function(){if($e!==void 0&&Ze!==void 0){var dt={};dt[ae+".x"]=$e,dt[ae+".y"]=Ze,k.call("_guiRelayout",U,dt)}},clickFn:function(dt,Dt){var Ct=H.selectAll("g.traces").filter(function(){var Vt=this.getBoundingClientRect();return Dt.clientX>=Vt.left&&Dt.clientX<=Vt.right&&Dt.clientY>=Vt.top&&Dt.clientY<=Vt.bottom});Ct.size()>0&&f(U,Q,Ct,dt,Dt)}})}}],U)}}function T(U,Z,Q){var re=U[0],ae=re.width,oe=Z.entrywidthmode,H=re.trace.legendwidth||Z.entrywidth;return oe==="fraction"?Z._maxWidth*H:Q+(H||ae)}function f(U,Z,Q,re,ae){var oe=U._fullLayout,H=Q.data()[0][0].trace,X=Z.itemclick,K=Z.itemdoubleclick,G={event:ae,node:Q.node(),curveNumber:H.index,expandedIndex:H.index,data:U.data,layout:U.layout,frames:U._transitionData._frames,config:U._context,fullData:U._fullData,fullLayout:oe};H._group&&(G.group=H._group),k.traceIs(H,"pie-like")&&(G.label=Q.datum()[0].label);var Y=l.triggerHandler(U,"plotly_legendclick",G);if(re===1){if(Y===!1)return;Z._clickTimeout=setTimeout(function(){U._fullLayout&&X&&n(Q,U,Z,X)},U._context.doubleClickDelay)}else if(re===2){Z._clickTimeout&&clearTimeout(Z._clickTimeout),U._legendMouseDownTime=0;var q=l.triggerHandler(U,"plotly_legenddoubleclick",G);q!==!1&&Y!==!1&&K&&n(Q,U,Z,K)}}function u(U,Z,Q){var re=w.getId(Q),ae=U.data()[0][0],oe=ae.trace,H=k.traceIs(oe,"pie-like"),X=!Q._inHover&&Z._context.edits.legendText&&!H,K=Q._maxNameLength,G,Y;ae.groupTitle?(G=ae.groupTitle.text,Y=ae.groupTitle.font):(Y=Q.font,Q.entries?G=ae.text:(G=H?ae.label:oe.name,oe._meta&&(G=x.templateString(G,oe._meta))));var q=x.ensureSingle(U,"text",re+"text");q.attr("text-anchor","start").call(t.font,Y).text(X?A(G,K):G);var $=Q.indentation+Q.itemwidth+s.itemGap*2;r.positionText(q,$,0),X?q.call(r.makeEditable,{gd:Z,text:G}).call(I,U,Z,Q).on("edit",function(ee){this.text(A(ee,K)).call(I,U,Z,Q);var ne={};return ne.name=ee,ae.trace._isShape?k.call("_guiRelayout",Z,"shapes["+oe.index+"].name",ne.name):k.call("_guiRestyle",Z,ne,oe.index)}):I(q,U,Z,Q)}function A(U,Z){var Q=Math.max(4,Z);if(U&&U.trim().length>=Q/2)return U;U=U||"";for(var re=Q-U.length;re>0;re--)U+=" ";return U}function b(U,Z,Q){var re=Z._context.doubleClickDelay,ae,oe=1,H=x.ensureSingle(U,"rect",Q+"toggle",function(X){Z._context.staticPlot||X.style("cursor","pointer").attr("pointer-events","all"),X.call(a.fill,"rgba(0,0,0,0)")});Z._context.staticPlot||(H.on("mousedown",function(){ae=new Date().getTime(),ae-Z._legendMouseDownTimere&&(oe=Math.max(oe-1,1)),f(Z,X,U,oe,v.event)}}))}function z(U,Z,Q,re){if(Z._fullData.some(function(G){let Y=G.legend||"legend";return(Array.isArray(Y)?Y.includes(re):Y===re)&&k.traceIs(G,"pie-like")}))return;let oe=Z._context.doubleClickDelay;var H,X=1;let K=x.ensureSingle(U,"rect",re+"titletoggle",function(G){Z._context.staticPlot||G.style("cursor","pointer").attr("pointer-events","all"),G.call(a.fill,"rgba(0,0,0,0)")});Z._context.staticPlot||(K.on("mousedown",function(){H=new Date().getTime(),H-Z._legendMouseDownTimeoe&&(X=Math.max(X-1,1));let G={event:v.event,legendId:re,data:Z.data,layout:Z.layout,fullData:Z._fullData,fullLayout:Z._fullLayout};if(X===1&&Q.titleclick){if(l.triggerHandler(Z,"plotly_legendtitleclick",G)===!1)return;Q._titleClickTimeout=setTimeout(function(){Z._fullLayout&&o(Z,Q,Q.titleclick)},oe)}else X===2&&(Q._titleClickTimeout&&clearTimeout(Q._titleClickTimeout),Z._legendMouseDownTime=0,l.triggerHandler(Z,"plotly_legendtitledoubleclick",G)!==!1&&Q.titledoubleclick&&o(Z,Q,Q.titledoubleclick))}))}function I(U,Z,Q,re,ae){re._inHover&&U.attr("data-notex",!0),r.convertToTspans(U,Q,function(){N(Z,Q,re,ae)})}function N(U,Z,Q,re){var ae=U.data()[0][0],oe=ae&&ae.trace.showlegend;if(Array.isArray(oe)&&(oe=oe[ae.i]!==!1),!Q._inHover&&ae&&!oe){U.remove();return}var H=U.select("g[class*=math-group]"),X=H.node(),K=w.getId(Q);Q||(Q=Z._fullLayout[K]);var G=Q.borderwidth,Y;re===S?Y=Q.title.font:ae.groupTitle?Y=ae.groupTitle.font:Y=Q.font;var q=Y.size*m,$,ee;if(X){var ne=t.bBox(X);$=ne.height,ee=ne.width,re===S?t.setTranslate(H,G,G+$*.75):t.setTranslate(H,0,$*.25)}else{var fe="."+K+(re===S?"title":"")+"text",ye=U.select(fe),xe=r.lineCount(ye),Ae=ye.node();if($=q*xe,ee=Ae?t.bBox(Ae).width:0,re===S)Q.title.side==="left"&&(ee+=s.itemGap*2),r.positionText(ye,G+s.titlePad,G+q);else{var Me=s.itemGap*2+Q.indentation+Q.itemwidth;ae.groupTitle&&(Me=s.itemGap,ee-=Q.indentation+Q.itemwidth),r.positionText(ye,Me,-q*((xe-1)/2-.3))}}re===S?(Q._titleWidth=ee,Q._titleHeight=$):(ae.lineHeight=q,ae.height=Math.max($,16)+3,ae.width=ee)}function R(U){var Z=0,Q=0,re=U.title.side;return re&&(re.indexOf("left")!==-1&&(Z=U._titleWidth),re.indexOf("top")!==-1&&(Q=U._titleHeight)),[Z,Q]}function B(U,Z,Q,re,ae){var oe=U._fullLayout,H=w.getId(re);re||(re=oe[H]);var X=oe._size,K=w.isVertical(re),G=w.isGrouped(re),Y=re.entrywidthmode==="fraction",q=re.borderwidth,$=2*q,ee=s.itemGap,ne=re.indentation+re.itemwidth+ee*2,fe=2*(q+ee),ye=j(re),xe=re.y<0||re.y===0&&ye==="top",Ae=re.y>1||re.y===1&&ye==="bottom",Me=re.tracegroupgap,Ie={};let{orientation:Ue,yref:qe}=re,{maxheight:ke}=re,ge=xe||Ae||Ue!=="v"||qe!=="paper";ke||(ke=ge?.5:1);let ue=ge?oe.height:X.h;re._maxHeight=Math.max(ke>1?ke:ke*ue,30);var ve=0;re._width=0,re._height=0;var se=R(re);if(K)Q.each(function(dt){var Dt=dt[0].height;t.setTranslate(this,q+se[0],q+se[1]+re._height+Dt/2+ee),re._height+=Dt,re._width=Math.max(re._width,dt[0].width)}),ve=ne+re._width,re._width+=ee+ne+$,re._height+=fe,G&&(Z.each(function(dt,Dt){t.setTranslate(this,0,Dt*re.tracegroupgap)}),re._height+=(re._lgroupsLength-1)*re.tracegroupgap);else{var Te=P(re),Fe=re.x<0||re.x===0&&Te==="right",We=re.x>1||re.x===1&&Te==="left",Ge=Ae||xe,gt=oe.width/2;re._maxWidth=Math.max(Fe?Ge&&Te==="left"?X.l+X.w:gt:We?Ge&&Te==="right"?X.r+X.w:gt:X.w,2*ne);var mt=0,Tt=0;Q.each(function(dt){var Dt=T(dt,re,ne);mt=Math.max(mt,Dt),Tt+=Dt}),ve=null;var At=0;if(G){var Kt=0,nr=0,_r=0;Z.each(function(){var dt=0,Dt=0;v.select(this).selectAll("g.traces").each(function(Vt){var Ht=T(Vt,re,ne),Wt=Vt[0].height;t.setTranslate(this,se[0],se[1]+q+ee+Wt/2+Dt),Dt+=Wt,dt=Math.max(dt,Ht),Ie[Vt[0].trace.legendgroup]=dt});var Ct=dt+ee;nr>0&&Ct+q+nr>re._maxWidth?(At=Math.max(At,nr),nr=0,_r+=Kt+Me,Kt=Dt):Kt=Math.max(Kt,Dt),t.setTranslate(this,nr,_r),nr+=Ct}),re._width=Math.max(At,nr)+q,re._height=_r+Kt+fe}else{var Zt=Q.size(),sr=Tt+$+(Zt-1)*ee=re._maxWidth&&(At=Math.max(At,Re),vt=0,ht+=Ot,re._height+=Ot,Ot=0),t.setTranslate(this,se[0]+q+vt,se[1]+q+ht+Dt/2+ee),Re=vt+Ct+ee,vt+=Vt,Ot=Math.max(Ot,Dt)}),sr?(re._width=vt+$,re._height=Ot+fe):(re._width=Math.max(At,Re)+$,re._height+=Ot+fe)}}re._width=Math.ceil(Math.max(re._width+se[0],re._titleWidth+2*(q+s.titlePad))),re._height=Math.ceil(Math.max(re._height+se[1],re._titleHeight+2*(q+s.itemGap))),re._effHeight=Math.min(re._height,re._maxHeight);var Be=U._context.edits,He=Be.legendText||Be.legendPosition;Q.each(function(dt){var Dt=v.select(this).select("."+H+"toggle"),Ct=dt[0].height,Vt=dt[0].trace.legendgroup,Ht=T(dt,re,ne);G&&Vt!==""&&(Ht=Ie[Vt]);var Wt=He?ne:ve||Ht;!K&&!Y&&(Wt+=ee/2),t.setRect(Dt,0,-Ct/2,Wt,Ct)});var $e=ae.select("."+H+"titletext");$e.node()&&C($e,re,q);var Ze=ae.select("."+H+"titletoggle");if(Ze.size()&&$e.node()){var Je=$e.attr("x")||0,Mt=s.titlePad;t.setRect(Ze,Je-Mt,q,re._titleWidth+2*Mt,re._titleHeight+2*Mt)}}function F(U,Z,Q,re){var ae=U._fullLayout,oe=ae[Z],H=P(oe),X=j(oe),K=oe.xref==="paper",G=oe.yref==="paper";U._fullLayout._reservedMargin[Z]={};var Y=oe.y<.5?"b":"t",q=oe.x<.5?"l":"r",$={r:ae.width-Q,l:Q+oe._width,b:ae.height-re,t:re+oe._effHeight};if(K&&G)return E.autoMargin(U,Z,{x:oe.x,y:oe.y,l:oe._width*h[H],r:oe._width*p[H],b:oe._effHeight*p[X],t:oe._effHeight*h[X]});K?U._fullLayout._reservedMargin[Z][Y]=$[Y]:G||oe.orientation==="v"?U._fullLayout._reservedMargin[Z][q]=$[q]:U._fullLayout._reservedMargin[Z][Y]=$[Y]}function P(U){return x.isRightAnchor(U)?"right":x.isCenterAnchor(U)?"center":"left"}function j(U){return x.isBottomAnchor(U)?"bottom":x.isMiddleAnchor(U)?"middle":"top"}}}),qb=Ee({"src/components/fx/hover.js"(J){"use strict";var V=Hn(),v=mi(),x=Vr(),E=x.pushUnique,k=x.strTranslate,l=x.strRotate,e=zp(),t=Fs(),a=yM(),r=yo(),n=Qa(),o=qf(),s=uo(),c=tc().zindexSeparator,m=Ri(),h=Qf(),p=Mv(),g=Bb(),i=Ub(),w=p.YANGLE,S=Math.PI*w/180,M=1/Math.sin(S),C=Math.cos(S),_=Math.sin(S),T=p.HOVERARROWSIZE,f=p.HOVERTEXTPAD,u={box:!0,ohlc:!0,violin:!0,candlestick:!0},A={scatter:!0,scattergl:!0,splom:!0};function b(q,$){return q.distance-$.distance}J.hover=function($,ee,ne,fe){$=x.getGraphDiv($);var ye=ee.target;x.throttle($._fullLayout._uid+p.HOVERID,p.HOVERMINTIME,function(){z($,ee,ne,fe,ye)})},J.loneHover=function($,ee){var ne=!0;Array.isArray($)||(ne=!1,$=[$]);var fe=ee.gd,ye=K(fe),xe=G(fe),Ae=$.map(function(se){var Te=se._x0||se.x0||se.x||0,Fe=se._x1||se.x1||se.x||0,We=se._y0||se.y0||se.y||0,Ge=se._y1||se.y1||se.y||0,gt=se.eventData;if(gt){var mt=Math.min(Te,Fe),Tt=Math.max(Te,Fe),At=Math.min(We,Ge),Kt=Math.max(We,Ge),nr=se.trace;if(m.traceIs(nr,"gl3d")){var _r=fe._fullLayout[nr.scene]._scene.container,Zt=_r.offsetLeft,sr=_r.offsetTop;mt+=Zt,Tt+=Zt,At+=sr,Kt+=sr}gt.bbox={x0:mt+xe,x1:Tt+xe,y0:At+ye,y1:Kt+ye},gt.xPixel=(Te+Fe)/2,gt.yPixel=(We+Ge)/2,ee.inOut_bbox&&ee.inOut_bbox.push(gt.bbox)}else gt=!1;return{color:se.color||n.defaultLine,x0:se.x0||se.x||0,x1:se.x1||se.x||0,y0:se.y0||se.y||0,y1:se.y1||se.y||0,xLabel:se.xLabel,yLabel:se.yLabel,zLabel:se.zLabel,text:se.text,name:se.name,idealAlign:se.idealAlign,borderColor:se.borderColor,fontFamily:se.fontFamily,fontSize:se.fontSize,fontColor:se.fontColor,fontWeight:se.fontWeight,fontStyle:se.fontStyle,fontVariant:se.fontVariant,nameLength:se.nameLength,textAlign:se.textAlign,trace:se.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:se.hovertemplate||!1,hovertemplateLabels:se.hovertemplateLabels||!1,eventData:gt}}),Me=!1,Ie=R(Ae,{gd:fe,hovermode:"closest",rotateLabels:Me,bgColor:ee.bgColor||n.background,container:V.select(ee.container),outerContainer:ee.outerContainer||ee.container}),Ue=Ie.hoverLabels,qe=5,ke=0,ge=0;Ue.sort(function(se,Te){return se.y0-Te.y0}).each(function(se,Te){var Fe=se.y0-se.by/2;Fe-qeTt[0]._length||ir<0||ir>At[0]._length)return o.unhoverRaw(q,$)}if($.pointerX=It+Tt[0]._offset,$.pointerY=ir+At[0]._offset,"xval"in $?ht=h.flat(ye,$.xval):ht=h.p2c(Tt,It),"yval"in $?Re=h.flat(ye,$.yval):Re=h.p2c(At,ir),q._hoverPointerX=$.pointerX,q._hoverPointerY=$.pointerY,!v(ht[0])||!v(Re[0]))return x.warn("Fx.hover failed",$,q),o.unhoverRaw(q,$)}Ae.clickanywhere&&(q._hoverXVals=ht,q._hoverYVals=Re,q._hoverXAxes=Tt,q._hoverYAxes=At);var Ir=1/0;function ln(Sa,Gi){for(He=0;HeHt&&(Ot.splice(0,Ht),Ir=Ot[0].distance),qe&&sr!==0&&Ot.length===0){Vt.distance=sr,Vt.index=!1;var so=Ze._module.hoverPoints(Vt,Dt,Ct,"closest",{hoverLayer:Ae._hoverlayer});if(so&&(so=so.filter(function(Wi){return Wi.spikeDistance<=sr})),so&&so.length){var Mo,So=so.filter(function(Wi){return Wi.xa.showspikes&&Wi.xa.spikesnap!=="hovered data"});if(So.length){var oi=So[0];v(oi.x0)&&v(oi.y0)&&(Mo=wn(oi),(!Wt.vLinePoint||Wt.vLinePoint.spikeDistance>Mo.spikeDistance)&&(Wt.vLinePoint=Mo))}var ii=so.filter(function(Wi){return Wi.ya.showspikes&&Wi.ya.spikesnap!=="hovered data"});if(ii.length){var co=ii[0];v(co.x0)&&v(co.y0)&&(Mo=wn(co),(!Wt.hLinePoint||Wt.hLinePoint.spikeDistance>Mo.spikeDistance)&&(Wt.hLinePoint=Mo))}}}}}ln();function nn(Sa,Gi,ti){for(var fi=null,xo=1/0,zi,so=0;soSa.trace.index===Ii.trace.index):Ot=[Ii];var ho=Ot.length,da=X("x",Ii,Ae),Kn=X("y",Ii,Ae);ln(da,Kn);var ot=[],et={},hr=0,ur=function(Sa){var Gi=u[Sa.trace.type]?I(Sa):Sa.trace.index;if(!et[Gi])hr++,et[Gi]=hr,ot.push(Sa);else{var ti=et[Gi]-1,fi=ot[ti];ti>0&&Math.abs(Sa.distance)ho-1;Tr--)ur(Ot[Tr]);Ot=ot,ua()}var Rr=q._hoverdata,Fr=[],at=K(q),kt=G(q);for(let Sa of Ot){var Ut=h.makeEventData(Sa,Sa.trace,Sa.cd);if(Sa.hovertemplate!==!1){var ar=!1;Sa.cd[Sa.index]&&Sa.cd[Sa.index].ht&&(ar=Sa.cd[Sa.index].ht),Sa.hovertemplate=ar||Sa.trace.hovertemplate||!1}if(Sa.xa&&Sa.ya){var Er=Sa.x0+Sa.xa._offset,br=Sa.x1+Sa.xa._offset,Or=Sa.y0+Sa.ya._offset,Pr=Sa.y1+Sa.ya._offset,hn=Math.min(Er,br),zn=Math.max(Er,br),Pn=Math.min(Or,Pr),Ca=Math.max(Or,Pr);Ut.bbox={x0:hn+kt,x1:zn+kt,y0:Pn+at,y1:Ca+at},Ut.xPixel=(Er+br)/2,Ut.yPixel=(Or+Pr)/2}Sa.eventData=[Ut],Fr.push(Ut)}q._hoverdata=Fr;var ma=ke==="y"&&(vt.length>1||Ot.length>1)||ke==="closest"&&Sr&&Ot.length>1,bi=n.combine(Ae.plot_bgcolor||n.background,Ae.paper_bgcolor),ga=R(Ot,{gd:q,hovermode:ke,rotateLabels:ma,bgColor:bi,container:Ae._hoverlayer,outerContainer:Ae._paper.node(),commonLabelOpts:Ae.hoverlabel,hoverdistance:Ae.hoverdistance}),eo=ga.hoverLabels;if(h.isUnifiedHover(ke)||(F(eo,ma,Ae,ga.commonLabelBoundingBox),U(eo,ma,Ae._invScaleX,Ae._invScaleY)),fe&&fe.tagName){var si=m.getComponentMethod("annotations","hasClickToShow")(q,Fr);a(V.select(fe),si?"pointer":"")}var Ao=re(q,$,Rr);if(!fe||ne||!Ao&&!Ae.hoveranywhere)return;Rr&&Ao&&q.emit("plotly_unhover",{event:$,points:Rr}),ro(q._hoverdata);function ro(Sa){q.emit("plotly_hover",{event:$,points:Sa,xaxes:Tt,yaxes:At,xvals:h.c2dApply(Tt,ht),yvals:h.c2dApply(At,Re),xPixel:$.pointerX,yPixel:$.pointerY})}}function I(q){return[q.trace.index,q.index,q.x0,q.y0,q.name,q.attr,q.xa?q.xa._id:"",q.ya?q.ya._id:""].join(",")}var N=/([\s\S]*)<\/extra>/;function R(q,$){var ee=$.gd,ne=ee._fullLayout,fe=$.hovermode,ye=$.rotateLabels,xe=$.bgColor,Ae=$.container,Me=$.outerContainer,Ie=$.commonLabelOpts||{};if(q.length===0)return[[]];var Ue=$.fontFamily||p.HOVERFONT,qe=$.fontSize||p.HOVERFONTSIZE,ke=$.fontWeight||ne.font.weight,ge=$.fontStyle||ne.font.style,ue=$.fontVariant||ne.font.variant,ve=$.fontTextcase||ne.font.textcase,se=$.fontLineposition||ne.font.lineposition,Te=$.fontShadow||ne.font.shadow,Fe=q[0],We=Fe.xa,Ge=Fe.ya,gt=fe.charAt(0),mt=gt+"Label",Tt=Fe[mt];if(Tt===void 0&&We.type==="multicategory")for(var At=0;Atne.width-Fr&&(at=ne.width-Fr),pa.attr("d","M"+(ur-at)+",0L"+(ur-at+T)+","+Rr+T+"H"+Fr+"v"+Rr+(f*2+hr.height)+"H"+-Fr+"V"+Rr+T+"H"+(ur-at-T)+"Z"),ur=at,He.minX=ur-Fr,He.maxX=ur+Fr,We.side==="top"?(He.minY=Tr-(f*2+hr.height),He.maxY=Tr-f):(He.minY=Tr+f,He.maxY=Tr+(f*2+hr.height))}else{var kt,Ut,ar;Ge.side==="right"?(kt="start",Ut=1,ar="",ur=We._offset+We._length):(kt="end",Ut=-1,ar="-",ur=We._offset),Tr=Ge._offset+(Fe.y0+Fe.y1)/2,Ii.attr("text-anchor",kt),pa.attr("d","M0,0L"+ar+T+","+T+"V"+(f+hr.height/2)+"h"+ar+(f*2+hr.width)+"V-"+(f+hr.height/2)+"H"+ar+T+"V-"+T+"Z"),He.minY=Tr-(f+hr.height/2),He.maxY=Tr+(f+hr.height/2),Ge.side==="right"?(He.minX=ur+T,He.maxX=ur+T+(f*2+hr.width)):(He.minX=ur-T-(f*2+hr.width),He.maxX=ur-T);var Er=hr.height/2,br=nr-hr.top-Er,Or="clip"+ne._uid+"commonlabel"+Ge._id,Pr;if(urpa.hoverinfo!=="none");if(ba.length===0)return[];var $e=ne.hoverlabel,Ze=$e.font,Je=ba[0],Mt=((fe==="x unified"?Je.xa:Je.ya).unifiedhovertitle||{}).text,dt=Mt?x.hovertemplateString({data:fe==="x unified"?[{xa:Je.xa,x:Je.xVal}]:[{ya:Je.ya,y:Je.yVal}],fallback:Je.trace.hovertemplatefallback,locale:ne._d3locale,template:Mt}):Tt,Dt={showlegend:!0,legend:{title:{text:dt,font:Ze},font:Ze,bgcolor:$e.bgcolor,bordercolor:$e.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:ne.legend?ne.legend.traceorder:void 0,orientation:"v"}},Ct={font:Ze};g(Dt,Ct,ee._fullData);var Vt=Ct.legend;Vt.entries=[];for(var Ht=0;Ht=0?ai=ua:Qn+fr<_r&&Qn>=0?ai=Qn:ei+fr<_r?ai=ei:ua-nn=0?Mi=jn:Aa+Ir=0?Mi=Aa:Fa+Ir=0,(ba.idealAlign==="top"||!Pn)&&Ca?(ar-=br/2,ba.anchor="end"):Pn?(ar+=br/2,ba.anchor="start"):ba.anchor="middle",ba.crossPos=ar;else{if(ba.pos=ar,Pn=Ut+Er/2+zn<=_r,Ca=Ut-Er/2-zn>=0,(ba.idealAlign==="left"||!Pn)&&Ca)Ut-=Er/2,ba.anchor="end";else if(Pn)Ut+=Er/2,ba.anchor="start";else{ba.anchor="middle";var ma=zn/2,bi=Ut+ma-_r,ga=Ut-ma;bi>0&&(Ut-=bi),ga<0&&(Ut+=-ga)}ba.crossPos=Ut}Tr.attr("text-anchor",ba.anchor),Fr&&Rr.attr("text-anchor",ba.anchor),pa.attr("transform",k(Ut,ar)+(ye?l(w):""))}),{hoverLabels:ci,commonLabelBoundingBox:He}}function B(q,$,ee,ne,fe,ye){var xe,Ae,Me="",Ie="";q.nameOverride!==void 0&&(q.name=q.nameOverride),q.name&&(q.trace._meta&&(q.name=x.templateString(q.name,q.trace._meta)),Me=oe(q.name,q.nameLength));var Ue=ee.charAt(0),qe=Ue==="x"?"y":"x";q.zLabel!==void 0?(q.xLabel!==void 0&&(Ie+="x: "+q.xLabel+"
"),q.yLabel!==void 0&&(Ie+="y: "+q.yLabel+"
"),q.trace.type!=="choropleth"&&q.trace.type!=="choroplethmap"&&(Ie+=(Ie?"z: ":"")+q.zLabel)):$&&q[Ue+"Label"]===fe?Ie=q[qe+"Label"]||"":q.xLabel===void 0?q.yLabel!==void 0&&q.trace.type!=="scattercarpet"&&(Ie=q.yLabel):q.yLabel===void 0?Ie=q.xLabel:Ie="("+q.xLabel+", "+q.yLabel+")",(q.text||q.text===0)&&!Array.isArray(q.text)&&(Ie+=(Ie?"
":"")+q.text),q.extraText!==void 0&&(Ie+=(Ie?"
":"")+q.extraText),ye&&Ie===""&&!q.hovertemplate&&(Me===""&&ye.remove(),Ie=Me),(Ae=(xe=q.trace)==null?void 0:xe.hoverlabel)!=null&&Ae.split&&(q.hovertemplate="");let{hovertemplate:ke=!1}=q;if(ke){let ge=q.hovertemplateLabels||q;q[Ue+"Label"]!==fe&&(ge[Ue+"other"]=ge[Ue+"Val"],ge[Ue+"otherLabel"]=ge[Ue+"Label"]),Ie=x.hovertemplateString({data:[q.eventData[0]||{},q.trace._meta],fallback:q.trace.hovertemplatefallback,labels:ge,locale:ne._d3locale,template:ke}),Ie=Ie.replace(N,(ue,ve)=>(Me=oe(ve,q.nameLength),""))}return[Ie,Me]}function F(q,$,ee,ne){var fe=$?"xa":"ya",ye=$?"ya":"xa",xe=0,Ae=1,Me=q.size(),Ie=new Array(Me),Ue=0,qe=ne.minX,ke=ne.maxX,ge=ne.minY,ue=ne.maxY,ve=function(ht){return ht*ee._invScaleX},se=function(ht){return ht*ee._invScaleY};q.each(function(ht){var Re=ht[fe],Be=ht[ye],He=Re._id.charAt(0)==="x",$e=Re.range;Ue===0&&$e&&$e[0]>$e[1]!==He&&(Ae=-1);var Ze=0,Je=He?ee.width:ee.height;if(ee.hovermode==="x"||ee.hovermode==="y"){var Mt=P(ht,$),dt=ht.anchor,Dt=dt==="end"?-1:1,Ct,Vt;if(dt==="middle")Ct=ht.crossPos+(He?se(Mt.y-ht.by/2):ve(ht.bx/2+ht.tx2width/2)),Vt=Ct+(He?se(ht.by):ve(ht.bx));else if(He)Ct=ht.crossPos+se(T+Mt.y)-se(ht.by/2-T),Vt=Ct+se(ht.by);else{var Ht=ve(Dt*T+Mt.x),Wt=Ht+ve(Dt*ht.bx);Ct=ht.crossPos+Math.min(Ht,Wt),Vt=ht.crossPos+Math.max(Ht,Wt)}He?ge!==void 0&&ue!==void 0&&Math.min(Vt,ue)-Math.max(Ct,ge)>1&&(Be.side==="left"?(Ze=Be._mainLinePosition,Je=ee.width):Je=Be._mainLinePosition):qe!==void 0&&ke!==void 0&&Math.min(Vt,ke)-Math.max(Ct,qe)>1&&(Be.side==="top"?(Ze=Be._mainLinePosition,Je=ee.height):Je=Be._mainLinePosition)}Ie[Ue++]=[{datum:ht,traceIndex:ht.trace.index,dp:0,pos:ht.pos,posref:ht.posref,size:ht.by*(He?M:1)/2,pmin:Ze,pmax:Je}]}),Ie.sort(function(ht,Re){return ht[0].posref-Re[0].posref||Ae*(Re[0].traceIndex-ht[0].traceIndex)});var Te,Fe,We,Ge,gt,mt,Tt;function At(ht){var Re=ht[0],Be=ht[ht.length-1];if(Fe=Re.pmin-Re.pos-Re.dp+Re.size,We=Be.pos+Be.dp+Be.size-Re.pmax,Fe>.01){for(gt=ht.length-1;gt>=0;gt--)ht[gt].dp+=Fe;Te=!1}if(!(We<.01)){if(Fe<-.01){for(gt=ht.length-1;gt>=0;gt--)ht[gt].dp-=We;Te=!1}if(Te){var He=0;for(Ge=0;GeRe.pmax&&He++;for(Ge=ht.length-1;Ge>=0&&!(He<=0);Ge--)mt=ht[Ge],mt.pos>Re.pmax-1&&(mt.del=!0,He--);for(Ge=0;Ge=0;gt--)ht[gt].dp-=We;for(Ge=ht.length-1;Ge>=0&&!(He<=0);Ge--)mt=ht[Ge],mt.pos+mt.dp+mt.size>Re.pmax&&(mt.del=!0,He--)}}}for(;!Te&&xe<=Me;){for(xe++,Te=!0,Ge=0;Ge.01){for(gt=nr.length-1;gt>=0;gt--)nr[gt].dp+=Fe;for(Kt.push.apply(Kt,nr),Ie.splice(Ge+1,1),Tt=0,gt=Kt.length-1;gt>=0;gt--)Tt+=Kt[gt].dp;for(We=Tt/Kt.length,gt=Kt.length-1;gt>=0;gt--)Kt[gt].dp-=We;Te=!1}else Ge++}Ie.forEach(At)}for(Ge=Ie.length-1;Ge>=0;Ge--){var sr=Ie[Ge];for(gt=sr.length-1;gt>=0;gt--){var Ot=sr[gt],vt=Ot.datum;vt.offset=Ot.dp,vt.del=Ot.del}}}function P(q,$){var ee=0,ne=q.offset;return $&&(ne*=-_,ee=q.offset*C),{x:ee,y:ne}}function j(q){var $={start:1,end:-1,middle:0}[q.anchor],ee=$*(T+f),ne=ee+$*(q.txwidth+f),fe=q.anchor==="middle";return fe&&(ee-=q.tx2width/2,ne+=q.txwidth/2+f),{alignShift:$,textShiftX:ee,text2ShiftX:ne}}function U(q,$,ee,ne){var fe=function(xe){return xe*ee},ye=function(xe){return xe*ne};q.each(function(xe){var Ae=V.select(this);if(xe.del)return Ae.remove();var Me=Ae.select("text.nums"),Ie=xe.anchor,Ue=Ie==="end"?-1:1,qe=j(xe),ke=P(xe,$),ge=ke.x,ue=ke.y,ve=Ie==="middle",se="hoverlabel"in xe.trace?xe.trace.hoverlabel.showarrow:!0,Te;ve?Te="M-"+fe(xe.bx/2+xe.tx2width/2)+","+ye(ue-xe.by/2)+"h"+fe(xe.bx)+"v"+ye(xe.by)+"h-"+fe(xe.bx)+"Z":se?Te="M0,0L"+fe(Ue*T+ge)+","+ye(T+ue)+"v"+ye(xe.by/2-T)+"h"+fe(Ue*xe.bx)+"v-"+ye(xe.by)+"H"+fe(Ue*T+ge)+"V"+ye(ue-T)+"Z":Te="M"+fe(Ue*T+ge)+","+ye(ue-xe.by/2)+"h"+fe(Ue*xe.bx)+"v"+ye(xe.by)+"h"+fe(-Ue*xe.bx)+"Z",Ae.select("path").attr("d",Te);var Fe=ge+qe.textShiftX,We=ue+xe.ty0-xe.by/2+f,Ge=xe.textAlign||"auto";Ge!=="auto"&&(Ge==="left"&&Ie!=="start"?(Me.attr("text-anchor","start"),Fe=ve?-xe.bx/2-xe.tx2width/2+f:-xe.bx-f):Ge==="right"&&Ie!=="end"&&(Me.attr("text-anchor","end"),Fe=ve?xe.bx/2-xe.tx2width/2-f:xe.bx+f)),Me.call(t.positionText,fe(Fe),ye(We)),xe.tx2width&&(Ae.select("text.name").call(t.positionText,fe(qe.text2ShiftX+qe.alignShift*f+ge),ye(ue+xe.ty0-xe.by/2+f)),Ae.select("rect").call(r.setRect,fe(qe.text2ShiftX+(qe.alignShift-1)*xe.tx2width/2+ge),ye(ue-xe.by/2-1),fe(xe.tx2width),ye(xe.by+2)))})}function Z(q,$){var ee=q.index,ne=q.trace||{},fe=q.cd[0],ye=q.cd[ee]||{};function xe(ke){return ke||v(ke)&&ke===0}var Ae=Array.isArray(ee)?function(ke,ge){var ue=x.castOption(fe,ee,ke);return xe(ue)?ue:x.extractOption({},ne,"",ge)}:function(ke,ge){return x.extractOption(ye,ne,ke,ge)};function Me(ke,ge,ue){var ve=Ae(ge,ue);xe(ve)&&(q[ke]=ve)}if(Me("hoverinfo","hi","hoverinfo"),Me("bgcolor","hbg","hoverlabel.bgcolor"),Me("borderColor","hbc","hoverlabel.bordercolor"),Me("fontFamily","htf","hoverlabel.font.family"),Me("fontSize","hts","hoverlabel.font.size"),Me("fontColor","htc","hoverlabel.font.color"),Me("fontWeight","htw","hoverlabel.font.weight"),Me("fontStyle","hty","hoverlabel.font.style"),Me("fontVariant","htv","hoverlabel.font.variant"),Me("nameLength","hnl","hoverlabel.namelength"),Me("textAlign","hta","hoverlabel.align"),q.posref=$==="y"||$==="closest"&&ne.orientation==="h"?q.xa._offset+(q.x0+q.x1)/2:q.ya._offset+(q.y0+q.y1)/2,q.x0=x.constrain(q.x0,0,q.xa._length),q.x1=x.constrain(q.x1,0,q.xa._length),q.y0=x.constrain(q.y0,0,q.ya._length),q.y1=x.constrain(q.y1,0,q.ya._length),q.xLabelVal!==void 0&&(q.xLabel="xLabel"in q?q.xLabel:s.hoverLabelText(q.xa,q.xLabelVal,ne.xhoverformat),q.xVal=q.xa.c2d(q.xLabelVal)),q.yLabelVal!==void 0&&(q.yLabel="yLabel"in q?q.yLabel:s.hoverLabelText(q.ya,q.yLabelVal,ne.yhoverformat),q.yVal=q.ya.c2d(q.yLabelVal)),q.zLabelVal!==void 0&&q.zLabel===void 0&&(q.zLabel=String(q.zLabelVal)),!isNaN(q.xerr)&&!(q.xa.type==="log"&&q.xerr<=0)){var Ie=s.tickText(q.xa,q.xa.c2l(q.xerr),"hover").text;q.xerrneg!==void 0?q.xLabel+=" +"+Ie+" / -"+s.tickText(q.xa,q.xa.c2l(q.xerrneg),"hover").text:q.xLabel+=" \xB1 "+Ie,$==="x"&&(q.distance+=1)}if(!isNaN(q.yerr)&&!(q.ya.type==="log"&&q.yerr<=0)){var Ue=s.tickText(q.ya,q.ya.c2l(q.yerr),"hover").text;q.yerrneg!==void 0?q.yLabel+=" +"+Ue+" / -"+s.tickText(q.ya,q.ya.c2l(q.yerrneg),"hover").text:q.yLabel+=" \xB1 "+Ue,$==="y"&&(q.distance+=1)}var qe=q.hoverinfo||q.trace.hoverinfo;return qe&&qe!=="all"&&(qe=Array.isArray(qe)?qe:qe.split("+"),qe.indexOf("x")===-1&&(q.xLabel=void 0),qe.indexOf("y")===-1&&(q.yLabel=void 0),qe.indexOf("z")===-1&&(q.zLabel=void 0),qe.indexOf("text")===-1&&(q.text=void 0),qe.indexOf("name")===-1&&(q.name=void 0)),q}function Q(q,$,ee){var ne=ee.container,fe=ee.fullLayout,ye=fe._size,xe=ee.event,Ae=!!$.hLinePoint,Me=!!$.vLinePoint,Ie,Ue;if(ne.selectAll(".spikeline").remove(),!!(Me||Ae)){var qe=n.combine(fe.plot_bgcolor,fe.paper_bgcolor);if(Ae){var ke=$.hLinePoint,ge,ue;Ie=ke&&ke.xa,Ue=ke&&ke.ya;var ve=Ue.spikesnap;ve==="cursor"?(ge=xe.pointerX,ue=xe.pointerY):(ge=Ie._offset+ke.x,ue=Ue._offset+ke.y);var se=n.wcagContrast(ke.color,qe)<1.5?n.contrast(qe):ke.color,Te=Ue.spikemode,Fe=Ue.spikethickness,We=Ue.spikecolor||se,Ge=s.getPxPosition(q,Ue),gt,mt;if(Te.indexOf("toaxis")!==-1||Te.indexOf("across")!==-1){if(Te.indexOf("toaxis")!==-1&&(gt=Ge,mt=ge),Te.indexOf("across")!==-1){var Tt=Ue._counterDomainMin,At=Ue._counterDomainMax;Ue.anchor==="free"&&(Tt=Math.min(Tt,Ue.position),At=Math.max(At,Ue.position)),gt=ye.l+Tt*ye.w,mt=ye.l+At*ye.w}ne.insert("line",":first-child").attr({x1:gt,x2:mt,y1:ue,y2:ue,"stroke-width":Fe,stroke:We,"stroke-dasharray":r.dashStyle(Ue.spikedash,Fe)}).classed("spikeline",!0).classed("crisp",!0),ne.insert("line",":first-child").attr({x1:gt,x2:mt,y1:ue,y2:ue,"stroke-width":Fe+2,stroke:qe}).classed("spikeline",!0).classed("crisp",!0)}Te.indexOf("marker")!==-1&&ne.insert("circle",":first-child").attr({cx:Ge+(Ue.side!=="right"?Fe:-Fe),cy:ue,r:Fe,fill:We}).classed("spikeline",!0)}if(Me){var Kt=$.vLinePoint,nr,_r;Ie=Kt&&Kt.xa,Ue=Kt&&Kt.ya;var Zt=Ie.spikesnap;Zt==="cursor"?(nr=xe.pointerX,_r=xe.pointerY):(nr=Ie._offset+Kt.x,_r=Ue._offset+Kt.y);var sr=n.wcagContrast(Kt.color,qe)<1.5?n.contrast(qe):Kt.color,Ot=Ie.spikemode,vt=Ie.spikethickness,ht=Ie.spikecolor||sr,Re=s.getPxPosition(q,Ie),Be,He;if(Ot.indexOf("toaxis")!==-1||Ot.indexOf("across")!==-1){if(Ot.indexOf("toaxis")!==-1&&(Be=Re,He=_r),Ot.indexOf("across")!==-1){var $e=Ie._counterDomainMin,Ze=Ie._counterDomainMax;Ie.anchor==="free"&&($e=Math.min($e,Ie.position),Ze=Math.max(Ze,Ie.position)),Be=ye.t+(1-Ze)*ye.h,He=ye.t+(1-$e)*ye.h}ne.insert("line",":first-child").attr({x1:nr,x2:nr,y1:Be,y2:He,"stroke-width":vt,stroke:ht,"stroke-dasharray":r.dashStyle(Ie.spikedash,vt)}).classed("spikeline",!0).classed("crisp",!0),ne.insert("line",":first-child").attr({x1:nr,x2:nr,y1:Be,y2:He,"stroke-width":vt+2,stroke:qe}).classed("spikeline",!0).classed("crisp",!0)}Ot.indexOf("marker")!==-1&&ne.insert("circle",":first-child").attr({cx:nr,cy:Re-(Ie.side!=="top"?vt:-vt),r:vt,fill:ht}).classed("spikeline",!0)}}}function re(q,$,ee){if(!ee||ee.length!==q._hoverdata.length)return!0;for(var ne=ee.length-1;ne>=0;ne--){var fe=ee[ne],ye=q._hoverdata[ne];if(fe.curveNumber!==ye.curveNumber||String(fe.pointNumber)!==String(ye.pointNumber)||String(fe.pointNumbers)!==String(ye.pointNumbers)||fe.binNumber!==ye.binNumber)return!0}return!1}function ae(q,$){return!$||$.vLinePoint!==q._spikepoints.vLinePoint||$.hLinePoint!==q._spikepoints.hLinePoint}function oe(q,$){return t.plainText(q||"",{len:$,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function H(q,$){for(var ee=$.charAt(0),ne=[],fe=[],ye=[],xe=0;xeq.offsetTop+q.clientTop,G=q=>q.offsetLeft+q.clientLeft;function Y(q,$){var ee=q._fullLayout,ne=$.getBoundingClientRect(),fe=ne.left,ye=ne.top,xe=fe+ne.width,Ae=ye+ne.height,Me=x.apply3DTransform(ee._invTransform)(fe,ye),Ie=x.apply3DTransform(ee._invTransform)(xe,Ae),Ue=Me[0],qe=Me[1],ke=Ie[0],ge=Ie[1];return{x:Ue,y:qe,width:ke-Ue,height:ge-qe,top:Math.min(qe,ge),left:Math.min(Ue,ke),right:Math.max(Ue,ke),bottom:Math.max(qe,ge)}}}}),V0=Ee({"src/components/fx/hoverlabel_defaults.js"(J,V){"use strict";var v=Vr(),x=Qa(),E=Qf().isUnifiedHover;V.exports=function(l,e,t,a){a=a||{};var r=e.legend;function n(o){a.font[o]||(a.font[o]=r?e.legend.font[o]:e.font[o])}e&&E(e.hovermode)&&(a.font||(a.font={}),n("size"),n("family"),n("color"),n("weight"),n("style"),n("variant"),r?(a.bgcolor||(a.bgcolor=x.combine(e.legend.bgcolor,e.paper_bgcolor)),a.bordercolor||(a.bordercolor=e.legend.bordercolor)):a.bgcolor||(a.bgcolor=e.paper_bgcolor)),t("hoverlabel.bgcolor",a.bgcolor),t("hoverlabel.bordercolor",a.bordercolor),t("hoverlabel.namelength",a.namelength),t("hoverlabel.showarrow",a.showarrow),v.coerceFont(t,"hoverlabel.font",a.font),t("hoverlabel.align",a.align)}}}),xM=Ee({"src/components/fx/layout_global_defaults.js"(J,V){"use strict";var v=Vr(),x=V0(),E=Ei();V.exports=function(l,e){function t(a,r){return v.coerce(l,e,E,a,r)}x(l,e,t)}}}),wM=Ee({"src/components/fx/defaults.js"(J,V){"use strict";var v=Vr(),x=Hi(),E=V0();V.exports=function(l,e,t,a){function r(o,s){return v.coerce(l,e,x,o,s)}var n=v.extendFlat({},a.hoverlabel);e.hovertemplate&&(n.namelength=-1),E(l,e,r,n)}}}),Vb=Ee({"src/components/fx/hovermode_defaults.js"(J,V){"use strict";var v=Vr(),x=Ei();V.exports=function(k,l){function e(t,a){return l[t]!==void 0?l[t]:v.coerce(k,l,x,t,a)}return e("clickmode"),e("hoversubplots"),e("hoveranywhere"),e("clickanywhere"),e("hovermode")}}}),TM=Ee({"src/components/fx/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=Ei(),E=Vb(),k=V0();V.exports=function(e,t){function a(m,h){return v.coerce(e,t,x,m,h)}var r=E(e,t);r&&(a("hoverdistance"),a("spikedistance"),r.indexOf("unified")!==-1&&a("hoversort"));var n=a("dragmode");n==="select"&&a("selectdirection");var o=t._has("map"),s=t._has("geo"),c=t._basePlotModules.length;t.dragmode==="zoom"&&((o||s)&&c===1||o&&s&&c===2)&&(t.dragmode="pan"),k(e,t,a),v.coerceFont(a,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),AM=Ee({"src/components/fx/calc.js"(J,V){"use strict";var v=Vr(),x=Ri();V.exports=function(l){var e=l.calcdata,t=l._fullLayout;function a(c){return function(m){return v.coerceHoverinfo({hoverinfo:m},{_module:c._module},t)}}for(var r=0;r"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),Bg=Ee({"src/components/shapes/draw_newshape/constants.js"(J,V){"use strict";var v=32;V.exports={CIRCLE_SIDES:v,i000:0,i090:v/4,i180:v/2,i270:v/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),Ng=Ee({"src/components/selections/helpers.js"(J,V){"use strict";var v=Vr().strTranslate;function x(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function E(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function k(e){var t=e._id.charAt(0)==="y"?1:0;return function(a){return x(e,a[t])}}function l(e){return v(e.xaxis._offset,e.yaxis._offset)}V.exports={p2r:x,r2p:E,axValue:k,getTransform:l}}}),$d=Ee({"src/components/shapes/draw_newshape/helpers.js"(J){"use strict";var V=Ib(),v=Bg(),x=v.CIRCLE_SIDES,E=v.SQRT2,k=Ng(),l=k.p2r,e=k.r2p,t=[0,3,4,5,6,1,2],a=[0,3,4,1,2];J.writePaths=function(o){var s=o.length;if(!s)return"M0,0Z";for(var c="",m=0;m0&&w{let s=o.charAt(0),c=r[s].drawn!==void 0;return n+(c?1:0)},0)},J.getDataToPixel=function(l,e,t,a,r){var n=l._fullLayout._size,o;if(e)if(r==="domain")o=function(c){return e._length*(a?1-c:c)+e._offset};else{var s=J.shapePositionToRange(e);o=function(c){var m=k(e,t);return e._offset+e.r2p(s(c,!0))+m},e.type==="date"&&(o=J.decodeDate(o))}else a?o=function(c){return n.t+n.h*(1-c)}:o=function(c){return n.l+n.w*c};return o},J.getPixelToData=function(l,e,t,a){var r=l._fullLayout._size,n;if(e)if(a==="domain")n=function(s){var c=(s-e._offset)/e._length;return t?1-c:c};else{var o=J.rangeToShapePosition(e);n=function(s){return o(e.p2r(s-e._offset))}}else t?n=function(s){return 1-(s-r.t)/r.h}:n=function(s){return(s-r.l)/r.w};return n},J.roundPositionForSharpStrokeRendering=function(l,e){var t=Math.round(e%2)===1,a=Math.round(l);return t?a+.5:a},J.makeShapesOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.shapes[e]||{},a=l._fullLayout._plots[t.xref+t.yref],r=!!a;return r?a._hadPlotinfo=!0:(a={},t.xref&&t.xref!=="paper"&&(a.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&t.yref!=="paper"&&(a.yaxis=l._fullLayout[t.yref+"axis"])),a.xsizemode=t.xsizemode,a.ysizemode=t.ysizemode,a.xanchor=t.xanchor,a.yanchor=t.yanchor,{options:t,plotinfo:a}},J.makeSelectionsOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.selections[e]||{},a=l._fullLayout._plots[t.xref+t.yref],r=!!a;return r?a._hadPlotinfo=!0:(a={},t.xref&&(a.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&(a.yaxis=l._fullLayout[t.yref+"axis"])),{options:t,plotinfo:a}},J.getPathString=function(l,e){let t=e.type,a=x.getRefType(e.xref),r=x.getRefType(e.yref),n=l._fullLayout._size;var o,s,c,m,h,p,g,i,w,S,M,C;function _(N,R,B,F){var P;if(N)if(R==="domain")F?P=function(j){return N._offset+N._length*(1-j)}:P=function(j){return N._offset+N._length*j};else{let j=J.shapePositionToRange(N);P=function(U){return N._offset+N.r2p(j(U,!0))},B==="path"&&N.type==="date"&&(P=J.decodeDate(P))}else F?P=function(j){return n.t+n.h*(1-j)}:P=function(j){return n.l+n.w*j};return P}if(a==="array"?(g=[],o=e.xref.map(function(N){return x.getFromId(l,N)}),g=e.xref.map(function(N,R){return _(o[R],x.getRefType(N),t,!1)})):(o=x.getFromId(l,e.xref),g=_(o,a,t,!1)),r==="array"?(i=[],s=e.yref.map(function(N){return x.getFromId(l,N)}),i=e.yref.map(function(N,R){return _(s[R],x.getRefType(N),t,!0)})):(s=x.getFromId(l,e.yref),i=_(s,r,t,!0)),t==="path")return E(e,g,i);if(a==="array")c=k(o[0],e.x0shift),m=k(o[1],e.x1shift),w=g[0](e.x0)+c,S=g[1](e.x1)+m;else if(c=k(o,e.x0shift),m=k(o,e.x1shift),e.xsizemode==="pixel"){let N=g(e.xanchor);w=N+e.x0+c,S=N+e.x1+m}else w=g(e.x0)+c,S=g(e.x1)+m;if(r==="array")h=k(s[0],e.y0shift),p=k(s[1],e.y1shift),M=i[0](e.y0)+h,C=i[1](e.y1)+p;else if(h=k(s,e.y0shift),p=k(s,e.y1shift),e.ysizemode==="pixel"){let N=i(e.yanchor);M=N-e.y0+h,C=N-e.y1+p}else M=i(e.y0)+h,C=i(e.y1)+p;if(t==="line")return"M"+w+","+M+"L"+S+","+C;if(t==="rect")return"M"+w+","+M+"H"+S+"V"+C+"H"+w+"Z";var T=(w+S)/2,f=(M+C)/2,u=Math.abs(T-w),A=Math.abs(f-M),b="A"+u+","+A,z=T+u+","+f,I=T+","+(f-A);return"M"+z+b+" 0 1,1 "+I+b+" 0 0,1 "+z+"Z"};function E(l,e,t){let a=l.path,r=l.xsizemode,n=l.ysizemode,o=l.xanchor,s=l.yanchor,c=Array.isArray(l.xref),m=Array.isArray(l.yref);var h=0,p=0;return a.replace(V.segmentRE,function(g){var i=0,w=g.charAt(0),S=V.paramIsX[w],M=V.paramIsY[w],C=V.numParams[w];let _=S.drawn!==void 0,T=M.drawn!==void 0,f=c?e[h]:e,u=m?t[p]:t;var A=g.slice(1).replace(V.paramRE,function(b){return S[i]?r==="pixel"?b=f(o)+Number(b):b=f(b):M[i]&&(n==="pixel"?b=u(s)-Number(b):b=u(b)),i++,i>C&&(b="X"),b});return i>C&&(A=A.replace(/[\s,]*X.*/,""),v.log("Ignoring extra params in segment "+g)),_&&h++,T&&p++,w+A})}J.getPixelShift=k;function k(l,e){e=e||0;var t=0;return e&&l&&(l.type==="category"||l.type==="multicategory")&&(t=(l.r2p(1)-l.r2p(0))*e),t}}}),Gb=Ee({"src/components/shapes/display_labels.js"(J,V){"use strict";var v=Vr(),x=uo(),E=Fs(),k=yo(),l=$d().readPaths,e=Zd(),t=e.getPathString,a=Cg(),r=rc().FROM_TL;V.exports=function(c,m,h,p){if(p.selectAll(".shape-label").remove(),!!(h.label.text||h.label.texttemplate)){var g;if(h.label.texttemplate){var i={};if(h.type!=="path"){var w=x.getFromId(c,h.xref),S=x.getFromId(c,h.yref);let $=Array.isArray(h.xref),ee=Array.isArray(h.yref);for(var M in a){var C=typeof a[M]=="function",_=!$||a.simpleXVariables.includes(M),T=!ee||a.simpleYVariables.includes(M);if(C&&_&&T){var f=a[M](h,w,S);f!==void 0&&(i[M]=f)}}}g=v.texttemplateStringForShapes({data:[i],fallback:h.label.texttemplatefallback,locale:c._fullLayout._d3locale,template:h.label.texttemplate})}else g=h.label.text;var u={"data-index":m},A=h.label.font,b={"data-notex":1},z=p.append("g").attr(u).classed("shape-label",!0),I=z.append("text").attr(b).classed("shape-label-text",!0).text(g),N,R,B,F;if(h.path){var P=t(c,h),j=l(P,c);N=1/0,B=1/0,R=-1/0,F=-1/0;for(var U=0;Ue.getDataToPixel(c,ve,ue,!1,se)(ge),ke=(ge,ue,ve,se)=>e.getDataToPixel(c,ve,ue,!0,se)(ge);if(h.xsizemode==="pixel"){let ge=qe(h.xanchor,void 0,ne,Ae),ue=e.getPixelShift(ne,h.x0shift),ve=e.getPixelShift(ne,h.x1shift);N=ge+h.x0+ue,R=ge+h.x1+ve}else N=qe(h.x0,h.x0shift,ne,Ae),R=qe(h.x1,h.x1shift,fe,Me);if(h.ysizemode==="pixel"){let ge=ke(h.yanchor,void 0,ye,Ie),ue=e.getPixelShift(ye,h.y0shift),ve=e.getPixelShift(ye,h.y1shift);B=ge-h.y0+ue,F=ge-h.y1+ve}else B=ke(h.y0,h.y0shift,ye,Ie),F=ke(h.y1,h.y1shift,xe,Ue)}var H=h.label.textangle;H==="auto"&&(h.type==="line"?H=n(N,B,R,F):H=0),I.call(function($){return $.call(k.font,A).attr({}),E.convertToTspans($,c),$});var X=k.bBox(I.node()),K=o(N,B,R,F,h,H,X),G=K.textx,Y=K.texty,q=K.xanchor;I.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[q],y:Y,x:G,transform:"rotate("+H+","+G+","+Y+")"}).call(E.positionText,G,Y)}};function n(s,c,m,h){var p,g;return g=Math.abs(m-s),m>=s?p=c-h:p=h-c,-180/Math.PI*Math.atan2(p,g)}function o(s,c,m,h,p,g,i){var w=p.label.textposition,S=p.label.textangle,M=p.label.padding,C=p.type,_=Math.PI/180*g,T=Math.sin(_),f=Math.cos(_),u=p.label.xanchor,A=p.label.yanchor,b,z,I,N;if(C==="line"){w==="start"?(b=s,z=c):w==="end"?(b=m,z=h):(b=(s+m)/2,z=(c+h)/2),u==="auto"&&(w==="start"?S==="auto"?m>s?u="left":ms?u="right":ms?u="right":ms?u="left":m1&&!(ke.length===2&&ke[1][0]==="Z")&&(H===0&&(ke[0][0]="M"),b[oe]=ke,B(),F())}}function fe(ke,ge){if(ke===2){oe=+ge.srcElement.getAttribute("data-i"),H=+ge.srcElement.getAttribute("data-j");var ue=b[oe];!g(ue)&&!i(ue)&&ne()}}function ye(ke){re=[];for(var ge=0;ge{if(!I._dragging&&I._fullLayout.hoveranywhere){let j=F(P);j&&c.hover(I,j,R.id)}}),B.addEventListener("click",P=>{if(!I._dragged&&I._fullLayout.clickanywhere){let j=F(P);j&&c.click(I,j,R.id)}})}function _(I,N,R){let B=R.xref,F=R.yref;if(Array.isArray(B)||Array.isArray(F)){let P="clip"+N._fullLayout._uid+"shape"+R._index,j=T(N,B,F);E.ensureSingleById(N._fullLayout._clips,"clipPath",P,function(U){U.append("rect")}).select("rect").attr(j),n.setClipUrl(I,P,N)}else{let P=(B+F).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");n.setClipUrl(I,P?"clip"+N._fullLayout._uid+P:null,N)}}function T(I,N,R){let B=I._fullLayout._size;function F(U,Z){let Q=(Array.isArray(U)?U:[U]).map(oe=>k.getFromId(I,oe)).filter(Boolean);if(!Q.length)return Z?[B.t,B.t+B.h]:[B.l,B.l+B.w];let re=Q.map(function(oe){return oe._offset}),ae=Q.map(function(oe){return oe._offset+oe._length});return[Math.min(...re),Math.max(...ae)]}let P=F(N,!1),j=F(R,!0);return{x:P[0],y:j[0],width:P[1]-P[0],height:j[1]-j[0]}}function f(I,N,R,B,F,P){var j=10,U=10,Z=R.xsizemode==="pixel",Q=R.ysizemode==="pixel",re=R.type==="line",ae=R.type==="path",oe=P.modifyItem,H,X,K,G,Y,q,$,ee,ne,fe,ye,xe,Ae,Me,Ie,Ue=v.select(N.node().parentNode),qe=k.getFromId(I,R.xref),ke=k.getRefType(R.xref),ge=k.getFromId(I,R.yref),ue=k.getRefType(R.yref),ve=R.x0shift,se=R.x1shift,Te=R.y0shift,Fe=R.y1shift,We=function(Ze,Je){var Mt=p.getDataToPixel(I,qe,Je,!1,ke);return Mt(Ze)},Ge=function(Ze,Je){var Mt=p.getDataToPixel(I,ge,Je,!0,ue);return Mt(Ze)},gt=p.getPixelToData(I,qe,!1,ke),mt=p.getPixelToData(I,ge,!0,ue),Tt=nr(),At={element:Tt.node(),gd:I,prepFn:sr,doneFn:Ot,clickFn:vt},Kt;s.init(At),Tt.node().onmousemove=Zt;function nr(){return re?_r():N}function _r(){var Ze=10,Je=Math.max(R.line.width,Ze),Mt=F.append("g").attr("data-index",B).attr("drag-helper",!0);Mt.append("path").attr("d",N.attr("d")).style({cursor:"move","stroke-width":Je,"stroke-opacity":"0"});var dt={"fill-opacity":"0"},Dt=Math.max(Je/2,Ze);return Mt.append("circle").attr({"data-line-point":"start-point",cx:Z?We(R.xanchor)+R.x0:We(R.x0,ve),cy:Q?Ge(R.yanchor)-R.y0:Ge(R.y0,Te),r:Dt}).style(dt).classed("cursor-grab",!0),Mt.append("circle").attr({"data-line-point":"end-point",cx:Z?We(R.xanchor)+R.x1:We(R.x1,se),cy:Q?Ge(R.yanchor)-R.y1:Ge(R.y1,Fe),r:Dt}).style(dt).classed("cursor-grab",!0),Mt}function Zt(Ze){if(w(I)){Kt=null;return}if(re)Ze.target.tagName==="path"?Kt="move":Kt=Ze.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Je=At.element.getBoundingClientRect(),Mt=Je.right-Je.left,dt=Je.bottom-Je.top,Dt=Ze.clientX-Je.left,Ct=Ze.clientY-Je.top,Vt=!ae&&Mt>j&&dt>U&&!Ze.shiftKey?s.getCursor(Dt/Mt,1-Ct/dt):"move";m(N,Vt),Kt=Vt.split("-")[0]}}function sr(Ze){w(I)||(Z&&(Y=We(R.xanchor)),Q&&(q=Ge(R.yanchor)),R.type==="path"?Ie=R.path:(H=Z?R.x0:We(R.x0),X=Q?R.y0:Ge(R.y0),K=Z?R.x1:We(R.x1),G=Q?R.y1:Ge(R.y1)),HG?($=X,ye="y0",ee=G,xe="y1"):($=G,ye="y1",ee=X,xe="y0"),Zt(Ze),Be(F,R),$e(N,R,I),At.moveFn=Kt==="move"?ht:Re,At.altKey=Ze.altKey)}function Ot(){w(I)||(m(N),He(F),_(N,I,R),x.call("_guiRelayout",I,P.getUpdateObj()))}function vt(){w(I)||He(F)}function ht(Ze,Je){if(R.type==="path"){var Mt=function(Ct){return Ct},dt=Mt,Dt=Mt;Z?oe("xanchor",R.xanchor=gt(Y+Ze)):(dt=function(Vt){return gt(We(Vt)+Ze)},qe&&qe.type==="date"&&(dt=p.encodeDate(dt))),Q?oe("yanchor",R.yanchor=mt(q+Je)):(Dt=function(Vt){return mt(Ge(Vt)+Je)},ge&&ge.type==="date"&&(Dt=p.encodeDate(Dt))),oe("path",R.path=u(Ie,dt,Dt))}else Z?oe("xanchor",R.xanchor=gt(Y+Ze)):(oe("x0",R.x0=gt(H+Ze)),oe("x1",R.x1=gt(K+Ze))),Q?oe("yanchor",R.yanchor=mt(q+Je)):(oe("y0",R.y0=mt(X+Je)),oe("y1",R.y1=mt(G+Je)));N.attr("d",g(I,R)),Be(F,R),t(I,B,R,Ue)}function Re(Ze,Je){if(ae){var Mt=function(nn){return nn},dt=Mt,Dt=Mt;Z?oe("xanchor",R.xanchor=gt(Y+Ze)):(dt=function(wn){return gt(We(wn)+Ze)},qe&&qe.type==="date"&&(dt=p.encodeDate(dt))),Q?oe("yanchor",R.yanchor=mt(q+Je)):(Dt=function(wn){return mt(Ge(wn)+Je)},ge&&ge.type==="date"&&(Dt=p.encodeDate(Dt))),oe("path",R.path=u(Ie,dt,Dt))}else if(re){if(Kt==="resize-over-start-point"){var Ct=H+Ze,Vt=Q?X-Je:X+Je;oe("x0",R.x0=Z?Ct:gt(Ct)),oe("y0",R.y0=Q?Vt:mt(Vt))}else if(Kt==="resize-over-end-point"){var Ht=K+Ze,Wt=Q?G-Je:G+Je;oe("x1",R.x1=Z?Ht:gt(Ht)),oe("y1",R.y1=Q?Wt:mt(Wt))}}else{var Sr=function(nn){return Kt.indexOf(nn)!==-1},on=Sr("n"),$t=Sr("s"),It=Sr("w"),ir=Sr("e"),cr=on?$+Je:$,fr=$t?ee+Je:ee,Ir=It?ne+Ze:ne,ln=ir?fe+Ze:fe;Q&&(on&&(cr=$-Je),$t&&(fr=ee-Je)),(!Q&&fr-cr>U||Q&&cr-fr>U)&&(oe(ye,R[ye]=Q?cr:mt(cr)),oe(xe,R[xe]=Q?fr:mt(fr))),ln-Ir>j&&(oe(Ae,R[Ae]=Z?Ir:gt(Ir)),oe(Me,R[Me]=Z?ln:gt(ln)))}N.attr("d",g(I,R)),Be(F,R),t(I,B,R,Ue)}function Be(Ze,Je){(Z||Q)&&Mt();function Mt(){var dt=Je.type!=="path",Dt=Ze.selectAll(".visual-cue").data([0]),Ct=1;Dt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ct}).classed("visual-cue",!0);var Vt=We(Z?Je.xanchor:E.midRange(dt?[Je.x0,Je.x1]:p.extractPathCoords(Je.path,h.paramIsX))),Ht=Ge(Q?Je.yanchor:E.midRange(dt?[Je.y0,Je.y1]:p.extractPathCoords(Je.path,h.paramIsY)));if(Vt=p.roundPositionForSharpStrokeRendering(Vt,Ct),Ht=p.roundPositionForSharpStrokeRendering(Ht,Ct),Z&&Q){var Wt="M"+(Vt-1-Ct)+","+(Ht-1-Ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Dt.attr("d",Wt)}else if(Z){var Sr="M"+(Vt-1-Ct)+","+(Ht-9-Ct)+"v18 h2 v-18 Z";Dt.attr("d",Sr)}else{var on="M"+(Vt-9-Ct)+","+(Ht-1-Ct)+"h18 v2 h-18 Z";Dt.attr("d",on)}}}function He(Ze){Ze.selectAll(".visual-cue").remove()}function $e(Ze,Je,Mt){var dt=Je.xref,Dt=Je.yref,Ct=k.getFromId(Mt,dt),Vt=k.getFromId(Mt,Dt),Ht="";dt!=="paper"&&!Ct.autorange&&(Ht+=dt),Dt!=="paper"&&!Vt.autorange&&(Ht+=Dt),n.setClipUrl(Ze,Ht?"clip"+Mt._fullLayout._uid+Ht:null,Mt)}}function u(I,N,R){return I.replace(h.segmentRE,function(B){var F=0,P=B.charAt(0),j=h.paramIsX[P],U=h.paramIsY[P],Z=h.numParams[P],Q=B.slice(1).replace(h.paramRE,function(re){return F>=Z||(j[F]?re=N(re):U[F]&&(re=R(re)),F++),re});return P+Q})}function A(I,N){if(S(I)){var R=N.node(),B=+R.getAttribute("data-index");if(B>=0){if(B===I._fullLayout._activeShapeIndex){b(I);return}I._fullLayout._activeShapeIndex=B,I._fullLayout._deactivateShape=b,i(I)}}}function b(I){if(S(I)){var N=I._fullLayout._activeShapeIndex;N>=0&&(a(I),delete I._fullLayout._activeShapeIndex,i(I))}}function z(I){if(S(I)){a(I);var N=I._fullLayout._activeShapeIndex,R=(I.layout||{}).shapes||[];if(N{let o=E(e),s=t.append("div").classed("plotly-cloud-dialog-box",!0);if(s.append("div").classed("plotly-cloud-dialog-title",!0).text(o.DIALOG_TITLE),a===x.plotlyServerURL){let m=s.append("div").classed("plotly-cloud-dialog-message",!0),h=new URL(a).origin,p=o.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),g=p[0],i=p[2],w=p[4];m.append("span").text(g),m.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",h).attr("target","_blank").text(i),m.append("span").text(w),m.append("div").classed("plotly-cloud-dialog-message--account",!0).text(o.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let m=new URL(a),h=m.hostname,p=m.origin,g=o.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),i=g[0],w=g[4],S=s.append("div").classed("plotly-cloud-dialog-message",!0);S.append("span").text(i),S.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",p).attr("target","_blank").text(h),S.append("span").text(w)}let c=s.append("div").classed("plotly-cloud-dialog-buttons",!0);c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(o.DIALOG_CANCEL).on("click",n),c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(o.DIALOG_CONFIRM).on("click",r)},l=(e,t,a)=>{let r=v.select(e._fullLayout._paperdiv.node());r.selectAll(".plotly-cloud-dialog").remove();let n=r.append("div").classed("plotly-cloud-dialog",!0),o=()=>{n.remove(),document.removeEventListener("keydown",s)},s=c=>{(c.key==="Escape"||c.keyCode===27)&&o()};document.addEventListener("keydown",s),n.on("click",()=>{v.event.target===n.node()&&o()}),k(e,n,t,()=>{o(),a()},o)};V.exports=l}}),Wb=Ee({"src/components/modebar/buttons.js"(J,V){"use strict";var v=Ri(),x=vl(),E=Xl(),k=zg(),l=Ug().eraseActiveShape,e=EM(),t=Vr(),a=t._,r=V.exports={};r.toImage={name:"toImage",title:function(_){var T=_._context.toImageButtonOptions||{},f=T.format||"png";return f==="png"?a(_,"Download plot as a PNG"):a(_,"Download plot")},icon:k.camera,click:function(_){var T=_._context.toImageButtonOptions,f={format:T.format||"png"};t.notifier(a(_,"Preparing image - this may take a few seconds"),"long",_),["filename","width","height","scale"].forEach(function(u){u in T&&(f[u]=T[u])}),v.call("downloadImage",_,f).then(function(u){t.notifier(a(_,"Image download succeeded")+" - "+u,"long",_)}).catch(function(){t.notifier(a(_,"Sorry, there was a problem downloading your image!"),"long",_)})}},r.sendChartToCloud={name:"sendChartToCloud",title:function(_){return a(_,"Share chart...")},icon:k.cloudupload,click:function(_){var T=(window.PLOTLYENV||{}).BASE_URL||_._context.plotlyServerURL;if(!T){console.error("No destination URL provided (plotlyServerURL is empty)");return}var f;try{f=new URL(T)}catch{console.error("Invalid plotlyServerURL: "+T);return}let u=["http:","https:"];if(!u.includes(f.protocol)){console.error(`Invalid protocol '${f.protocol}' in plotlyServerURL '${T}'. Must be one of: ${u.join(", ")}`);return}e(_,T,function(){x.sendDataToCloud(_,T)})}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(_){return a(_,"Zoom")},attr:"dragmode",val:"zoom",icon:k.zoombox,click:n},r.pan2d={name:"pan2d",_cat:"pan",title:function(_){return a(_,"Pan")},attr:"dragmode",val:"pan",icon:k.pan,click:n},r.select2d={name:"select2d",_cat:"select",title:function(_){return a(_,"Box Select")},attr:"dragmode",val:"select",icon:k.selectbox,click:n},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(_){return a(_,"Lasso Select")},attr:"dragmode",val:"lasso",icon:k.lasso,click:n},r.drawclosedpath={name:"drawclosedpath",title:function(_){return a(_,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:k.drawclosedpath,click:n},r.drawopenpath={name:"drawopenpath",title:function(_){return a(_,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:k.drawopenpath,click:n},r.drawline={name:"drawline",title:function(_){return a(_,"Draw line")},attr:"dragmode",val:"drawline",icon:k.drawline,click:n},r.drawrect={name:"drawrect",title:function(_){return a(_,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:k.drawrect,click:n},r.drawcircle={name:"drawcircle",title:function(_){return a(_,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:k.drawcircle,click:n},r.eraseshape={name:"eraseshape",title:function(_){return a(_,"Erase active shape")},icon:k.eraseshape,click:l},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(_){return a(_,"Zoom in")},attr:"zoom",val:"in",icon:k.zoom_plus,click:n},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(_){return a(_,"Zoom out")},attr:"zoom",val:"out",icon:k.zoom_minus,click:n},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(_){return a(_,"Autoscale")},attr:"zoom",val:"auto",icon:k.autoscale,click:n},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(_){return a(_,"Reset axes")},attr:"zoom",val:"reset",icon:k.home,click:n},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(_){return a(_,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:k.tooltip_basic,gravity:"ne",click:n},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(_){return a(_,"Compare data on hover")},attr:"hovermode",val:function(_){return _._fullLayout._isHoriz?"y":"x"},icon:k.tooltip_compare,gravity:"ne",click:n};function n(_,T){var f=T.currentTarget,u=f.getAttribute("data-attr"),A=f.getAttribute("data-val")||!0,b=_._fullLayout,z={},I=E.list(_,null,!0),N=b._cartesianSpikesEnabled,R,B;if(u==="zoom"){var F=A==="in"?.5:2,P=(1+F)/2,j=(1-F)/2,U,Z;for(B=0;B-K),[Z,Q]=F.invert(B.midPt),{minscale:re}=R.projection,ae=(f=R.projection.maxscale)!=null?f:1/0,oe=Math.min(re,ae),H=Math.max(re,ae),X=b==="in"?h*P:1/h*P;X>H?X=H:X$b});var Vg,Xb,$b,Zb=In({"src/components/modebar/attributes.ts"(){"use strict";Vg=Yn(Yb()),Xb={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 *${Vg.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 *${Vg.default.foreButtons.join("*, *")}*.`].join(" ")}},$b=Xb}}),kM=Ee({"src/components/modebar/defaults.js"(J,V){"use strict";var v=Vr(),x=Qa(),E=xs(),k=(Zb(),ra(qg)).default;V.exports=function(e,t){var a=e.modebar||{},r=E.newContainer(t,"modebar");function n(s,c){return v.coerce(a,r,k,s,c)}n("orientation"),n("bgcolor",x.addOpacity(t.paper_bgcolor,.5));var o=x.contrast(x.rgb(t.modebar.bgcolor));n("color",x.addOpacity(o,.3)),n("activecolor",x.addOpacity(o,.7)),n("uirevision",t.uirevision),n("add"),n("remove")}}}),CM=Ee({"src/components/modebar/modebar.js"(J,V){"use strict";var v=Hn(),x=mi(),E=Vr(),k=zg(),l=qi().version,e=new DOMParser;function t(o){this.container=o.container,this.element=document.createElement("div"),this.update(o.graphInfo,o.buttons),this.container.appendChild(this.element)}var a=t.prototype;a.update=function(o,s){this.graphInfo=o;var c=this.graphInfo._context,m=this.graphInfo._fullLayout,h="modebar-"+m._uid;this.element.setAttribute("id",h),this.element.setAttribute("role","toolbar"),this._uid=h,this.element.className="modebar modebar--custom",c.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),m.modebar.orientation==="v"&&(this.element.className+=" vertical",s=s.reverse());var p=m.modebar,g="#"+h+" .modebar-group";document.querySelectorAll(g).forEach(function(C){C.style.backgroundColor=p.bgcolor});var i=!this.hasButtons(s),w=this.hasLogo!==c.displaylogo,S=this.locale!==c.locale;if(this.locale=c.locale,(i||w||S)&&(this.removeAllButtons(),this.updateButtons(s),c.watermark||c.displaylogo)){var M=this.getLogo();c.watermark&&(M.className=M.className+" watermark"),m.modebar.orientation==="v"?this.element.insertBefore(M,this.element.childNodes[0]):this.element.appendChild(M),this.hasLogo=!0}this.updateActiveButton(),E.setStyleOnHover("#"+h+" .modebar-btn",".active",".icon path","fill: "+p.activecolor,"fill: "+p.color,this.element)},a.updateButtons=function(o){var s=this;this.buttons=o,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(c){var m=s.createGroup();c.forEach(function(h){var p=h.name;if(!p)throw new Error("must provide button 'name' in button config");if(s.buttonsNames.indexOf(p)!==-1)throw new Error("button name '"+p+"' is taken");s.buttonsNames.push(p);var g=s.createButton(h);s.buttonElements.push(g),m.appendChild(g)}),s.element.appendChild(m)})},a.createGroup=function(){var o=document.createElement("div");o.className="modebar-group";var s=this.graphInfo._fullLayout.modebar;return o.style.backgroundColor=s.bgcolor,o},a.createButton=function(o){var s=this,c=document.createElement("button");c.setAttribute("type","button"),c.setAttribute("rel","tooltip"),c.className="modebar-btn";var m=o.title;m===void 0?m=o.name:typeof m=="function"&&(m=m(this.graphInfo)),(m||m===0)&&(c.setAttribute("data-title",m),c.setAttribute("aria-label",m)),o.attr!==void 0&&c.setAttribute("data-attr",o.attr);var h=o.val;h!==void 0&&(typeof h=="function"&&(h=h(this.graphInfo)),c.setAttribute("data-val",h));var p=o.click;if(typeof p!="function")throw new Error("must provide button 'click' function in button config");c.addEventListener("click",function(i){o.click(s.graphInfo,i),s.updateActiveButton(i.currentTarget)}),c.setAttribute("data-toggle",o.toggle||!1),o.toggle&&v.select(c).classed("active",!0);var g=o.icon;return typeof g=="function"?c.appendChild(g()):c.appendChild(this.createIcon(g||k.question)),c.setAttribute("data-gravity",o.gravity||"n"),c},a.createIcon=function(o){var s=x(o.height)?Number(o.height):o.ascent-o.descent,c="http://www.w3.org/2000/svg",m;if(o.path){m=document.createElementNS(c,"svg"),m.setAttribute("viewBox",[0,0,o.width,s].join(" ")),m.setAttribute("class","icon");var h=document.createElementNS(c,"path");h.setAttribute("d",o.path),o.transform?h.setAttribute("transform",o.transform):o.ascent!==void 0&&h.setAttribute("transform","matrix(1 0 0 -1 0 "+o.ascent+")"),m.appendChild(h)}if(o.svg){var p=e.parseFromString(o.svg,"application/xml");m=p.childNodes[0]}return m.setAttribute("height","1em"),m.setAttribute("width","1em"),m},a.updateActiveButton=function(o){var s=this.graphInfo._fullLayout,c=o!==void 0?o.getAttribute("data-attr"):null;this.buttonElements.forEach(function(m){var h=m.getAttribute("data-val")||!0,p=m.getAttribute("data-attr"),g=m.getAttribute("data-toggle")==="true",i=v.select(m),w=function(C,_){var T=s.modebar,f=C.querySelector(".icon path");f&&(_||C.matches(":hover")?f.style.fill=T.activecolor:f.style.fill=T.color)};if(g){if(p===c){var S=!i.classed("active");i.classed("active",S),w(m,S)}}else{var M=p===null?p:E.nestedProperty(s,p).get();i.classed("active",M===h),w(m,M===h)}})},a.hasButtons=function(o){var s=this.buttons;if(!s||o.length!==s.length)return!1;for(var c=0;c1?(re=["toggleHover"],ae=["resetViews"]):u?(Q=["zoomInGeo","zoomOutGeo"],re=["hoverClosestGeo"],ae=["resetGeo"]):f?(re=["hoverClosest3d"],ae=["resetCameraDefault3d","resetCameraLastSave3d"]):I?(Q=["zoomInMap","zoomOutMap"],re=["toggleHover"],ae=["resetViewMap"]):A?re=["hoverClosestPie"]:B?(re=["hoverClosestCartesian","hoverCompareCartesian"],ae=["resetViewSankey"]):re=["toggleHover"],T&&re.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(g)||P)&&(re=[]),T&&!F&&(Q=["zoomIn2d","zoomOut2d","autoScale2d"],ae[0]!=="resetViews"&&(ae=["resetScale2d"])),f?oe=["zoom3d","pan3d","orbitRotation","tableRotation"]:T&&!F||z?oe=["zoom2d","pan2d"]:I||u?oe=["pan2d"]:N&&(oe=["zoom2d"]),o(g)&&oe.push("select2d","lasso2d");var H=[],X=function(q){H.indexOf(q)===-1&&re.indexOf(q)!==-1&&H.push(q)};if(Array.isArray(C)){for(var K=[],G=0;GS?g.slice(S):i.slice(w))+M}function c(h,p){for(var g=p._size,i=g.h/g.w,w={},S=Object.keys(h),M=0;Me*z&&!B)){for(S=0;SH&&neae&&(ae=ne);var ye=(ae-re)/(2*oe);u/=ye,re=_.l2r(re),ae=_.l2r(ae),_.range=_._input.range=U=F[1]||Z[1]<=F[0])&&Q[0]P[0])return!0}return!1}function M(F){var P=F._fullLayout,j=P._size,U=j.p,Z=n.list(F,"",!0),Q,re,ae,oe,H,X;if(P._paperdiv.style({width:F._context.responsive&&P.autosize&&!F._context._hasZeroWidth&&!F.layout.width?"100%":P.width+"px",height:F._context.responsive&&P.autosize&&!F._context._hasZeroHeight&&!F.layout.height?"100%":P.height+"px"}).selectAll(".main-svg").call(t.setSize,P.width,P.height),F._context.setBackground(F,P.paper_bgcolor),J.drawMainTitle(F),r.manage(F),!P._has("cartesian"))return x.previousPromises(F);function K(Re,Be,He){var $e=Re._lw/2;if(Re._id.charAt(0)==="x"){if(Be){if(He==="top")return Be._offset-U-$e}else return j.t+j.h*(1-(Re.position||0))+$e%1;return Be._offset+Be._length+U+$e}if(Be){if(He==="right")return Be._offset+Be._length+U+$e}else return j.l+j.w*(Re.position||0)+$e%1;return Be._offset-U-$e}for(Q=0;Q0){b(F,Q,H,oe),ae.attr({x:re,y:Q,"text-anchor":U,dy:N(P.yanchor)}).call(k.positionText,re,Q);var X=(P.text.match(k.BR_TAG_ALL)||[]).length;if(X){var K=o.LINE_SPACING*X+o.MID_SHIFT;P.y===0&&(K=-K),ae.selectAll(".line").each(function(){var ee=+this.getAttribute("dy").slice(0,-2)-K+"em";this.setAttribute("dy",ee)})}var G=V.select(F).selectAll(".gtitle-subtitle");if(G.node()){var Y=ae.node().getBBox(),q=Y.y+Y.height,$=q+a.SUBTITLE_PADDING_EM*P.subtitle.font.size;G.attr({x:re,y:$,"text-anchor":U,dy:N(P.yanchor)}).call(k.positionText,re,$)}}}};function f(F,P,j,U,Z){var Q=P.yref==="paper"?F._fullLayout._size.h:F._fullLayout.height,re=E.isTopAnchor(P)?U:U-Z,ae=j==="b"?Q-re:re;return E.isTopAnchor(P)&&j==="t"||E.isBottomAnchor(P)&&j==="b"?!1:ae.5?"t":"b",re=F._fullLayout.margin[Q],ae=0;return P.yref==="paper"?ae=j+P.pad.t+P.pad.b:P.yref==="container"&&(ae=u(Q,U,Z,F._fullLayout.height,j)+P.pad.t+P.pad.b),ae>re?ae:0}function b(F,P,j,U){var Z="title.automargin",Q=F._fullLayout.title,re=Q.y>.5?"t":"b",ae={x:Q.x,y:Q.y,t:0,b:0},oe={};Q.yref==="paper"&&f(F,Q,re,P,U)?ae[re]=j:Q.yref==="container"&&(oe[re]=j,F._fullLayout._reservedMargin[Z]=oe),x.allowAutoMargin(F,Z),x.autoMargin(F,Z,ae)}function z(F,P){var j=F.title,U=F._size,Z=0;switch(P===p?Z=j.pad.l:P===i&&(Z=-j.pad.r),j.xref){case"paper":return U.l+U.w*j.x+Z;case"container":default:return F.width*j.x+Z}}function I(F,P){var j=F.title,U=F._size,Z=0;if(P==="0em"||!P?Z=-j.pad.b:P===o.CAP_SHIFT+"em"&&(Z=j.pad.t),j.y==="auto")return U.t/2;switch(j.yref){case"paper":return U.t+U.h-U.h*j.y+Z;case"container":default:return F.height-F.height*j.y+Z}}function N(F){return F==="top"?o.CAP_SHIFT+.3+"em":F==="bottom"?"-0.3em":o.MID_SHIFT+"em"}function R(F){var P=F.title,j=g;return E.isRightAnchor(P)?j=i:E.isLeftAnchor(P)&&(j=p),j}function B(F){var P=F.title,j="0em";return E.isTopAnchor(P)?j=o.CAP_SHIFT+"em":E.isMiddleAnchor(P)&&(j=o.MID_SHIFT+"em"),j}J.doTraceStyle=function(F){var P=F.calcdata,j=[],U;for(U=0;U=0;R--){var B=C.append("path").attr(T).style("opacity",R?.1:f).call(k.stroke,A).call(k.fill,u).call(l.dashLine,R?"solid":z,R?4+b:b);if(s(B,p,w),I){var F=e(p.layout,"selections",w);B.style({cursor:"move"});var P={element:B.node(),plotinfo:S,gd:p,editHelpers:F,isActiveSelection:!0},j=v(_,p);x(j,B,P)}else B.style("pointer-events",R?"all":"none");N[R]=B}var U=N[0],Z=N[1];Z.node().addEventListener("click",function(){return c(p,U)})}}function s(p,g,i){var w=i.xref+i.yref;l.setClipUrl(p,"clip"+g._fullLayout._uid+w,g)}function c(p,g){if(n(p)){var i=g.node(),w=+i.getAttribute("data-index");if(w>=0){if(w===p._fullLayout._activeSelectionIndex){h(p);return}p._fullLayout._activeSelectionIndex=w,p._fullLayout._deactivateSelection=h,r(p)}}}function m(p){if(n(p)){var g=p._fullLayout.selections.length-1;p._fullLayout._activeSelectionIndex=g,p._fullLayout._deactivateSelection=h,r(p)}}function h(p){if(n(p)){var g=p._fullLayout._activeSelectionIndex;g>=0&&(E(p),delete p._fullLayout._activeSelectionIndex,r(p))}}}}),PM=Ee({"node_modules/polybooljs/lib/build-log.js"(J,V){function v(){var x,E=0,k=!1;function l(e,t){return x.list.push({type:e,data:t?JSON.parse(JSON.stringify(t)):void 0}),x}return x={list:[],segmentId:function(){return E++},checkIntersection:function(e,t){return l("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return l("div_seg",{seg:e,pt:t}),l("chop",{seg:e,pt:t})},statusRemove:function(e){return l("pop_seg",{seg:e})},segmentUpdate:function(e){return l("seg_update",{seg:e})},segmentNew:function(e,t){return l("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return l("rem_seg",{seg:e})},tempStatus:function(e,t,a){return l("temp_status",{seg:e,above:t,below:a})},rewind:function(e){return l("rewind",{seg:e})},status:function(e,t,a){return l("status",{seg:e,above:t,below:a})},vert:function(e){return e===k?x:(k=e,l("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),l("log",{txt:e})},reset:function(){return l("reset")},selected:function(e){return l("selected",{segs:e})},chainStart:function(e){return l("chain_start",{seg:e})},chainRemoveHead:function(e,t){return l("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return l("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return l("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return l("chain_match",{index:e})},chainClose:function(e){return l("chain_close",{index:e})},chainAddHead:function(e,t){return l("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return l("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return l("chain_con",{index1:e,index2:t})},chainReverse:function(e){return l("chain_rev",{index:e})},chainJoin:function(e,t){return l("chain_join",{index1:e,index2:t})},done:function(){return l("done")}},x}V.exports=v}}),DM=Ee({"node_modules/polybooljs/lib/epsilon.js"(J,V){function v(x){typeof x!="number"&&(x=1e-10);var E={epsilon:function(k){return typeof k=="number"&&(x=k),x},pointAboveOrOnLine:function(k,l,e){var t=l[0],a=l[1],r=e[0],n=e[1],o=k[0],s=k[1];return(r-t)*(s-a)-(n-a)*(o-t)>=-x},pointBetween:function(k,l,e){var t=k[1]-l[1],a=e[0]-l[0],r=k[0]-l[0],n=e[1]-l[1],o=r*a+t*n;if(o-x)},pointsSameX:function(k,l){return Math.abs(k[0]-l[0])x!=r-t>x&&(a-s)*(t-c)/(r-c)+s-e>x&&(n=!n),a=s,r=c}return n}};return E}V.exports=v}}),IM=Ee({"node_modules/polybooljs/lib/linked-list.js"(J,V){var v={create:function(){var x={root:{root:!0,next:null},exists:function(E){return!(E===null||E===x.root)},isEmpty:function(){return x.root.next===null},getHead:function(){return x.root.next},insertBefore:function(E,k){for(var l=x.root,e=x.root.next;e!==null;){if(k(e)){E.prev=e.prev,E.next=e,e.prev.next=E,e.prev=E;return}l=e,e=e.next}l.next=E,E.prev=l,E.next=null},findTransition:function(E){for(var k=x.root,l=x.root.next;l!==null&&!E(l);)k=l,l=l.next;return{before:k===x.root?null:k,after:l,insert:function(e){return e.prev=k,e.next=l,k.next=e,l!==null&&(l.prev=e),e}}}};return x},node:function(x){return x.prev=null,x.next=null,x.remove=function(){x.prev.next=x.next,x.next&&(x.next.prev=x.prev),x.prev=null,x.next=null},x}};V.exports=v}}),RM=Ee({"node_modules/polybooljs/lib/intersecter.js"(J,V){var v=IM();function x(E,k,l){function e(g,i){return{id:l?l.segmentId():-1,start:g,end:i,myFill:{above:null,below:null},otherFill:null}}function t(g,i,w){return{id:l?l.segmentId():-1,start:g,end:i,myFill:{above:w.myFill.above,below:w.myFill.below},otherFill:null}}var a=v.create();function r(g,i,w,S,M,C){var _=k.pointsCompare(i,M);return _!==0?_:k.pointsSame(w,C)?0:g!==S?g?1:-1:k.pointAboveOrOnLine(w,S?M:C,S?C:M)?1:-1}function n(g,i){a.insertBefore(g,function(w){var S=r(g.isStart,g.pt,i,w.isStart,w.pt,w.other.pt);return S<0})}function o(g,i){var w=v.node({isStart:!0,pt:g.start,seg:g,primary:i,other:null,status:null});return n(w,g.end),w}function s(g,i,w){var S=v.node({isStart:!1,pt:i.end,seg:i,primary:w,other:g,status:null});g.other=S,n(S,g.pt)}function c(g,i){var w=o(g,i);return s(w,g,i),w}function m(g,i){l&&l.segmentChop(g.seg,i),g.other.remove(),g.seg.end=i,g.other.pt=i,n(g.other,g.pt)}function h(g,i){var w=t(i,g.seg.end,g.seg);return m(g,i),c(w,g.primary)}function p(g,i){var w=v.create();function S(F,P){var j=F.seg.start,U=F.seg.end,Z=P.seg.start,Q=P.seg.end;return k.pointsCollinear(j,Z,Q)?k.pointsCollinear(U,Z,Q)||k.pointAboveOrOnLine(U,Z,Q)?1:-1:k.pointAboveOrOnLine(j,Z,Q)?1:-1}function M(F){return w.findTransition(function(P){var j=S(F,P.ev);return j>0})}function C(F,P){var j=F.seg,U=P.seg,Z=j.start,Q=j.end,re=U.start,ae=U.end;l&&l.checkIntersection(j,U);var oe=k.linesIntersect(Z,Q,re,ae);if(oe===!1){if(!k.pointsCollinear(Z,Q,re)||k.pointsSame(Z,ae)||k.pointsSame(Q,re))return!1;var H=k.pointsSame(Z,re),X=k.pointsSame(Q,ae);if(H&&X)return P;var K=!H&&k.pointBetween(Z,re,ae),G=!X&&k.pointBetween(Q,re,ae);if(H)return G?h(P,Q):h(F,ae),P;K&&(X||(G?h(P,Q):h(F,ae)),h(P,Z))}else oe.alongA===0&&(oe.alongB===-1?h(F,re):oe.alongB===0?h(F,oe.pt):oe.alongB===1&&h(F,ae)),oe.alongB===0&&(oe.alongA===-1?h(P,Z):oe.alongA===0?h(P,oe.pt):oe.alongA===1&&h(P,Q));return!1}for(var _=[];!a.isEmpty();){var T=a.getHead();if(l&&l.vert(T.pt[0]),T.isStart){let F=function(){if(A){var P=C(T,A);if(P)return P}return b?C(T,b):!1};var f=F;l&&l.segmentNew(T.seg,T.primary);var u=M(T),A=u.before?u.before.ev:null,b=u.after?u.after.ev:null;l&&l.tempStatus(T.seg,A?A.seg:!1,b?b.seg:!1);var z=F();if(z){if(E){var I;T.seg.myFill.below===null?I=!0:I=T.seg.myFill.above!==T.seg.myFill.below,I&&(z.seg.myFill.above=!z.seg.myFill.above)}else z.seg.otherFill=T.seg.myFill;l&&l.segmentUpdate(z.seg),T.other.remove(),T.remove()}if(a.getHead()!==T){l&&l.rewind(T.seg);continue}if(E){var I;T.seg.myFill.below===null?I=!0:I=T.seg.myFill.above!==T.seg.myFill.below,b?T.seg.myFill.below=b.seg.myFill.above:T.seg.myFill.below=g,I?T.seg.myFill.above=!T.seg.myFill.below:T.seg.myFill.above=T.seg.myFill.below}else if(T.seg.otherFill===null){var N;b?T.primary===b.primary?N=b.seg.otherFill.above:N=b.seg.myFill.above:N=T.primary?i:g,T.seg.otherFill={above:N,below:N}}l&&l.status(T.seg,A?A.seg:!1,b?b.seg:!1),T.other.status=u.insert(v.node({ev:T}))}else{var R=T.status;if(R===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(w.exists(R.prev)&&w.exists(R.next)&&C(R.prev.ev,R.next.ev),l&&l.statusRemove(R.ev.seg),R.remove(),!T.primary){var B=T.seg.myFill;T.seg.myFill=T.seg.otherFill,T.seg.otherFill=B}_.push(T.seg)}a.getHead().remove()}return l&&l.done(),_}return E?{addRegion:function(g){for(var i,w=g[g.length-1],S=0;St!=h>t&&e<(m-s)*(t-c)/(h-c)+s;p&&(a=!a)}return a}}}),Y0=Ee({"src/lib/polygon.js"(J,V){"use strict";var v=kg().dot,x=Qi().BADNUM,E=V.exports={};E.tester=function(l){var e=l.slice(),t=e[0][0],a=t,r=e[0][1],n=r,o;for((e[e.length-1][0]!==e[0][0]||e[e.length-1][1]!==e[0][1])&&e.push(e[0]),o=1;oa||M===x||Mn||w&&c(i))}function h(i,w){var S=i[0],M=i[1];if(S===x||Sa||M===x||Mn)return!1;var C=e.length,_=e[0][0],T=e[0][1],f=0,u,A,b,z,I;for(u=1;uMath.max(A,_)||M>Math.max(b,T)))if(Mo||Math.abs(v(h,c))>a)return!0;return!1},E.filter=function(l,e){var t=[l[0]],a=0,r=0;function n(s){l.push(s);var c=t.length,m=a;t.splice(r+1);for(var h=m+1;h1){var o=l.pop();n(o)}return{addPt:n,raw:l,filtered:t}}}}),jM=Ee({"src/components/selections/constants.js"(J,V){"use strict";V.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),UM=Ee({"src/components/selections/select.js"(J,V){"use strict";var v=NM(),x=OM(),E=Ri(),k=yo().dashStyle,l=Qa(),e=$l(),t=Qf().makeEventData,a=Gh(),r=a.freeMode,n=a.rectMode,o=a.drawMode,s=a.openMode,c=a.selectMode,m=Zd(),h=G0(),p=jg(),g=Gd().clearOutline,i=$d(),w=i.handleEllipse,S=i.readPaths,M=Og().newShapes,C=Hb(),_=Qb().activateLastSelection,T=Vr(),f=T.sorterAsc,u=Y0(),A=Dg(),b=Xl().getFromId,z=H0(),I=W0().redrawReglTraces,N=jM(),R=N.MINSELECT,B=u.filter,F=u.tester,P=Ng(),j=P.p2r,U=P.axValue,Z=P.getTransform;function Q(vt){return vt.subplot!==void 0}function re(vt,ht,Re,Be,He){var $e=!Q(Be),Ze=r(He),Je=n(He),Mt=s(He),dt=o(He),Dt=c(He),Ct=He==="drawline",Vt=He==="drawcircle",Ht=Ct||Vt,Wt=Be.gd,Sr=Wt._fullLayout,on=Dt&&Sr.newselection.mode==="immediate"&&$e,$t=Sr._zoomlayer,It=Be.element.getBoundingClientRect(),ir=Be.plotinfo,cr=Z(ir),fr=ht-It.left,Ir=Re-It.top;Sr._calcInverseTransform(Wt);var ln=T.apply3DTransform(Sr._invTransform)(fr,Ir);fr=ln[0],Ir=ln[1];var nn=Sr._invScaleX,wn=Sr._invScaleY,Un=fr,jn=Ir,Aa="M"+fr+","+Ir,ua=Be.xaxes[0],Qn=Be.yaxes[0],ei=ua._length,Fa=Qn._length,ai=vt.altKey&&!(o(He)&&Mt),Mi,ci,ba,pa,Ii,ho,da;G(vt,Wt,Be),Ze&&(Mi=B([[fr,Ir]],N.BENDPX));var Kn=$t.selectAll("path.select-outline-"+ir.id).data([1]),ot=dt?Sr.newshape:Sr.newselection;dt&&(Be.hasText=ot.label.text||ot.label.texttemplate);var et=dt&&!Mt?ot.fillcolor:"rgba(0,0,0,0)",hr=ot.line.color||($e?l.contrast(Wt._fullLayout.plot_bgcolor):"#7f7f7f");Kn.enter().append("path").attr("class","select-outline select-outline-"+ir.id).style({opacity:dt?ot.opacity/2:1,"stroke-dasharray":k(ot.line.dash,ot.line.width),"stroke-width":ot.line.width+"px","shape-rendering":"crispEdges"}).call(l.stroke,hr).call(l.fill,et).attr("fill-rule","evenodd").classed("cursor-move",!!dt).attr("transform",cr).attr("d",Aa+"Z");var ur=$t.append("path").attr("class","zoombox-corners").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1}).attr("transform",cr).attr("d","M0,0Z");if(dt&&Be.hasText){var Tr=$t.select(".label-temp");Tr.empty()&&(Tr=$t.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Rr=Sr._uid+N.SELECTID,Fr=[],at=ne(Wt,Be.xaxes,Be.yaxes,Be.subplot);on&&!vt.shiftKey&&(Be._clearSubplotSelections=function(){if($e){var Ut=ua._id,ar=Qn._id;We(Wt,Ut,ar,at);for(var Er=(Wt.layout||{}).selections||[],br=[],Or=!1,Pr=0;Pr=0){Wt._fullLayout._deactivateShape(Wt);return}if(!dt){var Er=Sr.clickmode;A.done(Rr).then(function(){if(A.clear(Rr),Ut===2){for(Kn.remove(),Ii=0;Ii-1&&ae(ar,Wt,Be.xaxes,Be.yaxes,Be.subplot,Be,Kn),Er==="event"&&sr(Wt,void 0);e.click(Wt,ar,ir.id)}).catch(T.error)}},Be.doneFn=function(){ur.remove(),A.done(Rr).then(function(){A.clear(Rr),!on&&pa&&Be.selectionDefs&&(pa.subtract=ai,Be.selectionDefs.push(pa),Be.mergedPolygons.length=0,[].push.apply(Be.mergedPolygons,ba)),(on||dt)&&$(Be,on),Be.doneFnCompleted&&Be.doneFnCompleted(Fr),Dt&&sr(Wt,da)}).catch(T.error)}}function ae(vt,ht,Re,Be,He,$e,Ze){var Je=ht._hoverdata,Mt=ht._fullLayout,dt=Mt.clickmode,Dt=dt.indexOf("event")>-1,Ct=[],Vt,Ht,Wt,Sr,on,$t,It,ir,cr,fr;if(ye(Je)){G(vt,ht,$e),Vt=ne(ht,Re,Be,He);var Ir=xe(Je,Vt),ln=Ir.pointNumbers.length>0;if(ln?Me(Vt,Ir):Ie(Vt)&&(It=Ae(Ir))){for(Ze&&Ze.remove(),fr=0;fr=0}function q(vt){return vt._fullLayout._activeSelectionIndex>=0}function $(vt,ht){var Re=vt.dragmode,Be=vt.plotinfo,He=vt.gd;Y(He)&&He._fullLayout._deactivateShape(He),q(He)&&He._fullLayout._deactivateSelection(He);var $e=He._fullLayout,Ze=$e._zoomlayer,Je=o(Re),Mt=c(Re);if(Je||Mt){var dt=Ze.selectAll(".select-outline-"+Be.id);if(dt&&He._fullLayout._outlining){var Dt;Je&&(Dt=M(dt,vt)),Dt&&E.call("_guiRelayout",He,{shapes:Dt});var Ct;Mt&&!Q(vt)&&(Ct=C(dt,vt)),Ct&&(He._fullLayout._noEmitSelectedAtStart=!0,E.call("_guiRelayout",He,{selections:Ct}).then(function(){ht&&_(He)})),He._fullLayout._outlining=!1}}Be.selection={},Be.selection.selectionDefs=vt.selectionDefs=[],Be.selection.mergedPolygons=vt.mergedPolygons=[]}function ee(vt){return vt._id}function ne(vt,ht,Re,Be){if(!vt.calcdata)return[];var He=[],$e=ht.map(ee),Ze=Re.map(ee),Je,Mt,dt;for(dt=0;dt0,$e=He?Be[0]:Re;return ht.selectedpoints?ht.selectedpoints.indexOf($e)>-1:!1}function Me(vt,ht){var Re=[],Be,He,$e,Ze;for(Ze=0;Ze0&&Re.push(Be);if(Re.length===1&&($e=Re[0]===ht.searchInfo,$e&&(He=ht.searchInfo.cd[0].trace,He.selectedpoints.length===ht.pointNumbers.length))){for(Ze=0;Ze1||(ht+=Be.selectedpoints.length,ht>1)))return!1;return ht===1}function Ue(vt,ht,Re){var Be,He;for(Be=0;Be-1&&ht;if(!Ze&&ht){var Ut=gt(vt,!0);if(Ut.length){var ar=Ut[0].xref,Er=Ut[0].yref;if(ar&&Er){var br=At(Ut),Or=nr([b(vt,ar,"x"),b(vt,Er,"y")]);Or(Fr,br)}}vt._fullLayout._noEmitSelectedAtStart?vt._fullLayout._noEmitSelectedAtStart=!1:kt&&sr(vt,Fr),Vt._reselect=!1}if(!Ze&&Vt._deselect){var Pr=Vt._deselect;Je=Pr.xref,Mt=Pr.yref,Fe(Je,Mt,Dt)||We(vt,Je,Mt,Be),kt&&(Fr.points.length?sr(vt,Fr):Ot(vt)),Vt._deselect=!1}return{eventData:Fr,selectionTesters:Re}}function Te(vt){var ht=vt.calcdata;if(ht)for(var Re=0;Re=0){ot._fullLayout._deactivateShape(ot);return}var et=ot._fullLayout.clickmode;if(H(ot),da===2&&!ge&&Mi(),ke)et.indexOf("select")>-1&&T(Kn,ot,Fe,We,fe.id,dt),et.indexOf("event")>-1&&n.click(ot,Kn,fe.id);else if(da===1&&ge){var hr=Ie?ve:ue,ur=Ie==="s"||Ue==="w"?0:1,Tr=hr._name+".range["+ur+"]",Rr=F(hr,ur),Fr="left",at="middle";if(hr.fixedrange)return;Ie?(at=Ie==="n"?"top":"bottom",hr.side==="right"&&(Fr="right")):Ue==="e"&&(Fr="right"),ot._context.showAxisRangeEntryBoxes&&v.select(Mt).call(t.makeEditable,{gd:ot,immediate:!0,background:ot._fullLayout.paper_bgcolor,text:String(Rr),fill:hr.tickfont?hr.tickfont.color:"#444",horizontalAlign:Fr,verticalAlign:at}).on("edit",function(kt){var Ut=hr.d2r(kt);Ut!==void 0&&l.call("_guiRelayout",ot,Tr,Ut)})}}c.init(dt);var Vt,Ht,Wt,Sr,on,$t,It,ir,cr,fr;function Ir(da,Kn,ot){var et=Mt.getBoundingClientRect();Vt=Kn-et.left,Ht=ot-et.top,ne._fullLayout._calcInverseTransform(ne);var hr=x.apply3DTransform(ne._fullLayout._invTransform)(Vt,Ht);Vt=hr[0],Ht=hr[1],Wt={l:Vt,r:Vt,w:0,t:Ht,b:Ht,h:0},Sr=ne._hmpixcount?ne._hmlumcount/ne._hmpixcount:a.luminosity(ne._fullLayout.plot_bgcolor),on="M0,0H"+mt+"V"+Tt+"H0V0",$t=!1,It="xy",fr=!1,ir=Q(qe,Sr,Ge,gt,on),cr=re(qe,Ge,gt)}function ln(da,Kn){if(ne._transitioningWithDuration)return!1;var ot=Math.max(0,Math.min(mt,He*da+Vt)),et=Math.max(0,Math.min(Tt,$e*Kn+Ht)),hr=Math.abs(ot-Vt),ur=Math.abs(et-Ht);Wt.l=Math.min(Vt,ot),Wt.r=Math.max(Vt,ot),Wt.t=Math.min(Ht,et),Wt.b=Math.max(Ht,et);function Tr(){It="",Wt.r=Wt.l,Wt.t=Wt.b,cr.attr("d","M0,0Z")}if(At.isSubplotConstrained)hr>b||ur>b?(It="xy",hr/mt>ur/Tt?(ur=hr*Tt/mt,Ht>et?Wt.t=Ht-ur:Wt.b=Ht+ur):(hr=ur*mt/Tt,Vt>ot?Wt.l=Vt-hr:Wt.r=Vt+hr),cr.attr("d",Y(Wt))):Tr();else if(Kt.isSubplotConstrained)if(hr>b||ur>b){It="xy";var Rr=Math.min(Wt.l/mt,(Tt-Wt.b)/Tt),Fr=Math.max(Wt.r/mt,(Tt-Wt.t)/Tt);Wt.l=Rr*mt,Wt.r=Fr*mt,Wt.b=(1-Rr)*Tt,Wt.t=(1-Fr)*Tt,cr.attr("d",Y(Wt))}else Tr();else!_r||ur0){var kt;if(Kt.isSubplotConstrained||!nr&&_r.length===1){for(kt=0;kt1&&(Tr.maxallowed!==void 0&&sr===(Tr.range[0]1&&(Rr.maxallowed!==void 0&&Ot===(Rr.range[0]=0?Math.min(ne,.9):1/(1/Math.max(ne,-.3)+3.222))}function Z(ne,fe,ye){return ne?ne==="nsew"?ye?"":fe==="pan"?"move":"crosshair":ne.toLowerCase()+"-resize":"pointer"}function Q(ne,fe,ye,xe,Ae){return ne.append("path").attr("class","zoombox").style({fill:fe>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",e(ye,xe)).attr("d",Ae+"Z")}function re(ne,fe,ye){return ne.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1,opacity:0}).attr("transform",e(fe,ye)).attr("d","M0,0Z")}function ae(ne,fe,ye,xe,Ae,Me){ne.attr("d",xe+"M"+ye.l+","+ye.t+"v"+ye.h+"h"+ye.w+"v-"+ye.h+"h-"+ye.w+"Z"),oe(ne,fe,Ae,Me)}function oe(ne,fe,ye,xe){ye||(ne.transition().style("fill",xe>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),fe.transition().style("opacity",1).duration(200))}function H(ne){v.select(ne).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function X(ne){z&&ne.data&&ne._context.showTips&&(x.notifier(x._(ne,"Double-click to zoom back out"),"long",ne),z=!1)}function K(ne,fe){return"M"+(ne.l-.5)+","+(fe-b-.5)+"h-3v"+(2*b+1)+"h3ZM"+(ne.r+.5)+","+(fe-b-.5)+"h3v"+(2*b+1)+"h-3Z"}function G(ne,fe){return"M"+(fe-b-.5)+","+(ne.t-.5)+"v-3h"+(2*b+1)+"v3ZM"+(fe-b-.5)+","+(ne.b+.5)+"v3h"+(2*b+1)+"v-3Z"}function Y(ne){var fe=Math.floor(Math.min(ne.b-ne.t,ne.r-ne.l,b)/2);return"M"+(ne.l-3.5)+","+(ne.t-.5+fe)+"h3v"+-fe+"h"+fe+"v-3h-"+(fe+3)+"ZM"+(ne.r+3.5)+","+(ne.t-.5+fe)+"h-3v"+-fe+"h"+-fe+"v-3h"+(fe+3)+"ZM"+(ne.r+3.5)+","+(ne.b+.5-fe)+"h-3v"+fe+"h"+-fe+"v3h"+(fe+3)+"ZM"+(ne.l-3.5)+","+(ne.b+.5-fe)+"h3v"+fe+"h"+fe+"v3h-"+(fe+3)+"Z"}function q(ne,fe,ye,xe,Ae){for(var Me=!1,Ie={},Ue={},qe,ke,ge,ue,ve=(Ae||{}).xaHash,se=(Ae||{}).yaHash,Te=0;Te1&&x.warn("Full array edits are incompatible with other edits",c);var S=n[""][""];if(e(S))r.set(null);else if(Array.isArray(S))r.set(S);else return x.warn("Unrecognized full array edit value",c,S),!0;return g?!1:(m(i,w),h(a),!0)}var M=Object.keys(n).map(Number).sort(E),C=r.get(),_=C||[],T=s(w,c).get(),f=[],u=-1,A=_.length,b,z,I,N,R,B,F,P;for(b=0;b_.length-(F?0:1)){x.warn("index out of range",c,I);continue}if(B!==void 0)R.length>1&&x.warn("Insertion & removal are incompatible with edits to the same index.",c,I),e(B)?f.push(I):F?(B==="add"&&(B={}),_.splice(I,0,B),T&&T.splice(I,0,{})):x.warn("Unrecognized full object edit value",c,I,B),u===-1&&(u=I);else for(z=0;z=0;b--)_.splice(f[b],1),T&&T.splice(f[b],1);if(_.length?C||r.set(_):r.set(null),g)return!1;if(m(i,w),p!==v){var j;if(u===-1)j=M;else{for(A=Math.max(_.length,A),j=[],b=0;b=u));b++)j.push(I);for(b=u;b0&&x.log("Clearing previous rejected promises from queue."),g._promises=[]},J.cleanLayout=function(g){var i,w;g||(g={}),g.xaxis1&&(g.xaxis||(g.xaxis=g.xaxis1),delete g.xaxis1),g.yaxis1&&(g.yaxis||(g.yaxis=g.yaxis1),delete g.yaxis1),g.scene1&&(g.scene||(g.scene=g.scene1),delete g.scene1);var S=(E.subplotsRegistry.cartesian||{}).attrRegex,M=(E.subplotsRegistry.polar||{}).attrRegex,C=(E.subplotsRegistry.ternary||{}).attrRegex,_=(E.subplotsRegistry.gl3d||{}).attrRegex,T=Object.keys(g);for(i=0;i3?(B.x=1.02,B.xanchor="left"):B.x<-2&&(B.x=-.02,B.xanchor="right"),B.y>3?(B.y=1.02,B.yanchor="bottom"):B.y<-2&&(B.y=-.02,B.yanchor="top")),g.dragmode==="rotate"&&(g.dragmode="orbit"),g.template&&g.template.layout&&J.cleanLayout(g.template.layout),g};function r(g,i,w=!1){var S=g[i],M=i.charAt(0);w&&Array.isArray(S)||S&&S!=="paper"&&(g[i]=l(S,M,!0))}J.cleanData=function(g){for(var i=0;i0)return g.slice(0,i)}J.hasParent=function(g,i){for(var w=h(i);w;){if(w in g)return!0;w=h(w)}return!1},J.clearAxisTypes=function(g,i,w){for(var S=0;S{let w=(...S)=>S.every(M=>x.isPlainObject(M))||S.every(M=>Array.isArray(M));if([g,i].every(S=>Array.isArray(S))){if(g.length!==i.length)return!1;for(let S=0;Sx.isPlainObject(S))){if(Object.keys(g).length!==Object.keys(i).length)return!1;for(let S in g){if(S.startsWith("_"))continue;let M=g[S],C=i[S];if(M!==C&&!(w(M,C)?p(M,C):!1))return!1}return!0}return!1};J.collectionsAreEqual=p}}),Hg=Ee({"src/plot_api/plot_api.js"(J){"use strict";var V=Hn(),v=mi(),x=Sb(),E=Vr(),k=E.nestedProperty,l=zp(),e=uM(),t=Ri(),a=Bp(),r=vl(),n=uo(),o=Fb(),s=Gc(),c=yo(),m=Qa(),h=nx().initInteractions,p=mh(),g=uc().clearOutline,i=Ra().dfltConfig,w=GM(),S=WM(),M=W0(),C=El(),_=tc().AX_NAME_PATTERN,T=0,f=5;function u(Re,Be,He,$e){var Ze;if(Re=E.getGraphDiv(Re),l.init(Re),E.isPlainObject(Be)){var Je=Be;Be=Je.data,He=Je.layout,$e=Je.config,Ze=Je.frames}var Mt=l.triggerHandler(Re,"plotly_beforeplot",[Be,He,$e]);if(Mt===!1)return Promise.reject();!Be&&!He&&!E.isPlotDiv(Re)&&E.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",Re);function dt(){if(Ze)return J.addFrames(Re,Ze)}N(Re,$e),He||(He={}),V.select(Re).classed("js-plotly-plot",!0),c.makeTester(),Array.isArray(Re._promises)||(Re._promises=[]);var Dt=(Re.data||[]).length===0&&Array.isArray(Be);Array.isArray(Be)&&(S.cleanData(Be),Dt?Re.data=Be:Re.data.push.apply(Re.data,Be),Re.empty=!1),(!Re.layout||Dt)&&(Re.layout=S.cleanLayout(He)),r.supplyDefaults(Re);var Ct=Re._fullLayout,Vt=Ct._has("cartesian");Ct._replotting=!0,(Dt||Ct._shouldCreateBgLayer)&&(ht(Re),Ct._shouldCreateBgLayer&&delete Ct._shouldCreateBgLayer),c.initGradients(Re),c.initPatterns(Re),Dt&&n.saveShowSpikeInitial(Re);var Ht=!Re.calcdata||Re.calcdata.length!==(Re._fullData||[]).length;Ht&&r.doCalcdata(Re);for(var Wt=0;Wt=Re.data.length||Ze<-Re.data.length)throw new Error(He+" must be valid indices for gd.data.");if(Be.indexOf(Ze,$e+1)>-1||Ze>=0&&Be.indexOf(-Re.data.length+Ze)>-1||Ze<0&&Be.indexOf(Re.data.length+Ze)>-1)throw new Error("each index in "+He+" must be unique.")}}function j(Re,Be,He){if(!Array.isArray(Re.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]),P(Re,Be,"currentIndices"),typeof He<"u"&&!Array.isArray(He)&&(He=[He]),typeof He<"u"&&P(Re,He,"newIndices"),typeof He<"u"&&Be.length!==He.length)throw new Error("current and new indices must be of equal length.")}function U(Re,Be,He){var $e,Ze;if(!Array.isArray(Re.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]),$e=0;$e"u")throw new Error("indices must be an integer or array of integers");P(Re,He,"indices");for(var Je in Be){if(!Array.isArray(Be[Je])||Be[Je].length!==He.length)throw new Error("attribute "+Je+" must be an array of length equal to indices array length");if(Ze&&(!(Je in $e)||!Array.isArray($e[Je])||$e[Je].length!==Be[Je].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}function Q(Re,Be,He,$e){var Ze=E.isPlainObject($e),Je=[],Mt,dt,Dt,Ct,Vt;Array.isArray(He)||(He=[He]),He=F(He,Re.data.length-1);for(var Ht in Be)for(var Wt=0;Wt=0&&Vt=0&&Vt"u")return Ct=J.redraw(Re),e.add(Re,Ze,Mt,Je,dt),Ct;Array.isArray(He)||(He=[He]);try{j(Re,$e,He)}catch(Vt){throw Re.data.splice(Re.data.length-Be.length,Be.length),Vt}return e.startSequence(Re),e.add(Re,Ze,Mt,Je,dt),Ct=J.moveTraces(Re,$e,He),e.stopSequence(Re),Ct}function K(Re,Be){Re=E.getGraphDiv(Re);var He=[],$e=J.addTraces,Ze=K,Je=[Re,He,Be],Mt=[Re,Be],dt,Dt;if(typeof Be>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Be)||(Be=[Be]),P(Re,Be,"indices"),Be=F(Be,Re.data.length-1),Be.sort(E.sorterDes),dt=0;dt"u")for(He=[],Ct=0;Ct0&&typeof Un.parts[ua]!="string";)ua--;var Qn=Un.parts[ua],ei=Un.parts[ua-1]+"."+Qn,Fa=Un.parts.slice(0,ua).join("."),ai=k(Re.layout,Fa).get(),Mi=k($e,Fa).get(),ci=Un.get();if(jn!==void 0){ir[wn]=jn,cr[wn]=Qn==="reverse"?jn:q(ci);var ba=a.getLayoutValObject($e,Un.parts);if(ba&&ba.impliedEdits&&jn!==null)for(var pa in ba.impliedEdits)fr(E.relativeAttr(wn,pa),ba.impliedEdits[pa]);if(["width","height"].indexOf(wn)!==-1)if(jn){fr("autosize",null);var Ii=wn==="height"?"width":"height";fr(Ii,$e[Ii])}else $e[wn]=Re._initialAutoSize[wn];else if(wn==="autosize")fr("width",jn?null:$e.width),fr("height",jn?null:$e.height);else if(ei.match(Me))nn(ei),k($e,Fa+"._inputRange").set(null);else if(ei.match(Ie)){nn(ei),k($e,Fa+"._inputRange").set(null);var ho=k($e,Fa).get();ho._inputDomain&&(ho._input.domain=ho._inputDomain.slice())}else ei.match(Ue)&&k($e,Fa+"._inputDomain").set(null);if(Qn==="type"){ln=ai;var da=Mi.type==="linear"&&jn==="log",Kn=Mi.type==="log"&&jn==="linear";if(da||Kn){if(!ln||!ln.range)fr(Fa+".autorange",!0);else if(Mi.autorange)da&&(ln.range=ln.range[1]>ln.range[0]?[1,2]:[2,1]);else{var ot=ln.range[0],et=ln.range[1];da?(ot<=0&&et<=0&&fr(Fa+".autorange",!0),ot<=0?ot=et/1e6:et<=0&&(et=ot/1e6),fr(Fa+".range[0]",Math.log(ot)/Math.LN10),fr(Fa+".range[1]",Math.log(et)/Math.LN10)):(fr(Fa+".range[0]",Math.pow(10,ot)),fr(Fa+".range[1]",Math.pow(10,et)))}Array.isArray($e._subplots.polar)&&$e._subplots.polar.length&&$e[Un.parts[0]]&&Un.parts[1]==="radialaxis"&&delete $e[Un.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(Re,Mi,jn,fr),t.getComponentMethod("images","convertCoords")(Re,Mi,jn,fr)}else fr(Fa+".autorange",!0),fr(Fa+".range",null);k($e,Fa+"._inputRange").set(null)}else if(Qn.match(_)){var hr=k($e,wn).get(),ur=(jn||{}).type;(!ur||ur==="-")&&(ur="linear"),t.getComponentMethod("annotations","convertCoords")(Re,hr,ur,fr),t.getComponentMethod("images","convertCoords")(Re,hr,ur,fr)}var Tr=w.containerArrayMatch(wn);if(Tr){Vt=Tr.array,Ht=Tr.index;var Rr=Tr.property,Fr=ba||{editType:"calc"};Ht!==""&&Rr===""&&(w.isAddVal(jn)?cr[wn]=null:w.isRemoveVal(jn)?cr[wn]=(k(He,Vt).get()||[])[Ht]:E.warn("unrecognized full object value",Be)),C.update(It,Fr),Ct[Vt]||(Ct[Vt]={});var at=Ct[Vt][Ht];at||(at=Ct[Vt][Ht]={}),at[Rr]=jn,delete Be[wn]}else Qn==="reverse"?(ai.range?ai.range.reverse():(fr(Fa+".autorange",!0),ai.range=[1,0]),Mi.autorange?It.calc=!0:It.plot=!0):(wn==="dragmode"&&(jn===!1&&ci!==!1||jn!==!1&&ci===!1)||$e._has("scatter-like")&&$e._has("regl")&&wn==="dragmode"&&(jn==="lasso"||jn==="select")&&!(ci==="lasso"||ci==="select")?It.plot=!0:ba?C.update(It,ba):It.calc=!0,Un.set(jn))}}for(Vt in Ct){var kt=w.applyContainerArrayChanges(Re,Je(He,Vt),Ct[Vt],It,Je);kt||(It.plot=!0)}for(var Ut in Ir){ln=n.getFromId(Re,Ut);var ar=ln&&ln._constraintGroup;if(ar){It.calc=!0;for(var Er in ar)Ir[Er]||(n.getFromId(Re,Er)._constraintShrinkable=!0)}}(ke(Re)||Be.height||Be.width)&&(It.plot=!0);var br=$e.shapes;for(Ht=0;Ht1;)if($e.pop(),He=k(Be,$e.join(".")+".uirevision").get(),He!==void 0)return He;return Be.uirevision}function We(Re,Be){for(var He=0;He[Fa,Re._ev.listeners(Fa)]);Je=J.newPlot(Re,Be,He,$e).then(()=>{for(let[Fa,ai]of ei)ai.forEach(Mi=>Re.on(Fa,Mi));return J.react(Re,Be,He,$e)})}else{Re.data=Be||[],S.cleanData(Re.data),Re.layout=He||{},S.cleanLayout(Re.layout),mt(Re.data,Re.layout,dt,Dt),r.supplyDefaults(Re,{skipUpdateCalc:!0});var Ht=Re._fullData,Wt=Re._fullLayout,Sr=Wt.datarevision===void 0,on=Wt.transition,$t=Kt(Re,Dt,Wt,Sr,on),It=$t.newDataRevision,ir=At(Re,dt,Ht,Sr,on,It);if(ke(Re)&&($t.layoutReplot=!0),ir.calc||$t.calc){Re.calcdata=void 0;for(var cr=Object.getOwnPropertyNames(Wt),fr=0;fr(Vt||Re.emit("plotly_react",{config:$e,data:Be,layout:He}),Re))}function At(Re,Be,He,$e,Ze,Je){var Mt=Be.length===He.length;if(!Ze&&!Mt)return{fullReplot:!0,calc:!0};var dt=C.traceFlags();dt.arrays={},dt.nChanges=0,dt.nChangesAnim=0;var Dt,Ct;function Vt(Sr){var on=a.getTraceValObject(Ct,Sr);return!Ct._module.animatable&&on.anim&&(on.anim=!1),on}var Ht={getValObject:Vt,flags:dt,immutable:$e,transition:Ze,newDataRevision:Je,gd:Re},Wt={};for(Dt=0;Dt=Ze.length?Ze[0]:Ze[Ct]:Ze}function dt(Ct){return Array.isArray(Je)?Ct>=Je.length?Je[0]:Je[Ct]:Je}function Dt(Ct,Vt){var Ht=0;return function(){if(Ct&&++Ht===Vt)return Ct()}}return new Promise(function(Ct,Vt){function Ht(){if($e._frameQueue.length!==0){for(;$e._frameQueue.length;){var Qn=$e._frameQueue.pop();Qn.onInterrupt&&Qn.onInterrupt()}Re.emit("plotly_animationinterrupted",[])}}function Wt(Qn){if(Qn.length!==0){for(var ei=0;ei$e._timeToNext&&on()};Qn()}var It=0;function ir(Qn){return Array.isArray(Ze)?It>=Ze.length?Qn.transitionOpts=Ze[It]:Qn.transitionOpts=Ze[0]:Qn.transitionOpts=Ze,It++,Qn}var cr,fr,Ir=[],ln=Be==null,nn=Array.isArray(Be),wn=!ln&&!nn&&E.isPlainObject(Be);if(wn)Ir.push({type:"object",data:ir(E.extendFlat({},Be))});else if(ln||["string","number"].indexOf(typeof Be)!==-1)for(cr=0;cr<$e._frames.length;cr++)fr=$e._frames[cr],fr&&(ln||String(fr.group)===String(Be))&&Ir.push({type:"byname",name:String(fr.name),data:ir({name:fr.name})});else if(nn)for(cr=0;cr0&&AaAa)&&ua.push(fr);Ir=ua}}Ir.length>0?Wt(Ir):(Re.emit("plotly_animated"),Ct())})}function Zt(Re,Be,He){if(Re=E.getGraphDiv(Re),Be==null)return Promise.resolve();if(!E.isPlotDiv(Re))throw new Error("This element is not a Plotly plot: "+Re+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var $e,Ze,Je,Mt,dt=Re._transitionData._frames,Dt=Re._transitionData._frameHash;if(!Array.isArray(Be))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Be);var Ct=dt.length+Be.length*2,Vt=[],Ht={};for($e=Be.length-1;$e>=0;$e--)if(E.isPlainObject(Be[$e])){var Wt=Be[$e].name,Sr=(Dt[Wt]||Ht[Wt]||{}).name,on=Be[$e].name,$t=Dt[Sr]||Ht[Sr];Sr&&on&&typeof on=="number"&&$t&&TUn.index?-1:wn.index=0;$e--){if(Ze=Vt[$e].frame,typeof Ze.name=="number"&&E.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Ze.name)for(;Dt[Ze.name="frame "+Re._transitionData._counter++];);if(Dt[Ze.name]){for(Je=0;Je=0;He--)$e=Be[He],Je.push({type:"delete",index:$e}),Mt.unshift({type:"insert",index:$e,value:Ze[$e]});var dt=r.modifyFrames,Dt=r.modifyFrames,Ct=[Re,Mt],Vt=[Re,Je];return e&&e.add(Re,dt,Ct,Dt,Vt),r.modifyFrames(Re,Je)}function Ot(Re){Re=E.getGraphDiv(Re);var Be=Re._fullLayout||{},He=Re._fullData||[];return r.cleanPlot([],{},He,Be),r.purge(Re),l.purge(Re),Be._container&&Be._container.remove(),delete Re._context,Re}function vt(Re){var Be=Re._fullLayout,He=Re.getBoundingClientRect();if(!E.equalDomRects(He,Be._lastBBox)){var $e=Be._invTransform=E.inverseTransformMatrix(E.getFullTransformMatrix(Re));Be._invScaleX=Math.sqrt($e[0][0]*$e[0][0]+$e[0][1]*$e[0][1]+$e[0][2]*$e[0][2]),Be._invScaleY=Math.sqrt($e[1][0]*$e[1][0]+$e[1][1]*$e[1][1]+$e[1][2]*$e[1][2]),Be._lastBBox=He}}function ht(Re){var Be=V.select(Re),He=Re._fullLayout;if(He._calcInverseTransform=vt,He._calcInverseTransform(Re),He._container=Be.selectAll(".plot-container").data([0]),He._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),He._paperdiv=He._container.selectAll(".svg-container").data([0]),He._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),He._glcontainer=He._paperdiv.selectAll(".gl-container").data([{}]),He._glcontainer.enter().append("div").classed("gl-container",!0),He._paperdiv.selectAll(".main-svg").remove(),He._paperdiv.select(".modebar-container").remove(),He._paper=He._paperdiv.insert("svg",":first-child").classed("main-svg",!0),He._toppaper=He._paperdiv.append("svg").classed("main-svg",!0),He._modebardiv=He._paperdiv.append("div"),delete He._modeBar,He._hoverpaper=He._paperdiv.append("svg").classed("main-svg",!0),!He._uid){var $e={};V.selectAll("defs").each(function(){this.id&&($e[this.id.split("-")[1]]=1)}),He._uid=E.randstr($e)}He._paperdiv.selectAll(".main-svg").attr(p.svgAttrs),He._defs=He._paper.append("defs").attr("id","defs-"+He._uid),He._clips=He._defs.append("g").classed("clips",!0),He._topdefs=He._toppaper.append("defs").attr("id","topdefs-"+He._uid),He._topclips=He._topdefs.append("g").classed("clips",!0),He._bgLayer=He._paper.append("g").classed("bglayer",!0),He._draggers=He._paper.append("g").classed("draglayer",!0);var Ze=He._paper.append("g").classed("layer-below",!0);He._imageLowerLayer=Ze.append("g").classed("imagelayer",!0),He._shapeLowerLayer=Ze.append("g").classed("shapelayer",!0),He._cartesianlayer=He._paper.append("g").classed("cartesianlayer",!0),He._polarlayer=He._paper.append("g").classed("polarlayer",!0),He._smithlayer=He._paper.append("g").classed("smithlayer",!0),He._ternarylayer=He._paper.append("g").classed("ternarylayer",!0),He._geolayer=He._paper.append("g").classed("geolayer",!0),He._funnelarealayer=He._paper.append("g").classed("funnelarealayer",!0),He._pielayer=He._paper.append("g").classed("pielayer",!0),He._iciclelayer=He._paper.append("g").classed("iciclelayer",!0),He._treemaplayer=He._paper.append("g").classed("treemaplayer",!0),He._sunburstlayer=He._paper.append("g").classed("sunburstlayer",!0),He._indicatorlayer=He._toppaper.append("g").classed("indicatorlayer",!0),He._glimages=He._paper.append("g").classed("glimages",!0);var Je=He._toppaper.append("g").classed("layer-above",!0);He._imageUpperLayer=Je.append("g").classed("imagelayer",!0),He._shapeUpperLayer=Je.append("g").classed("shapelayer",!0),He._selectionLayer=He._toppaper.append("g").classed("selectionlayer",!0),He._infolayer=He._toppaper.append("g").classed("infolayer",!0),He._menulayer=He._toppaper.append("g").classed("menulayer",!0),He._zoomlayer=He._toppaper.append("g").classed("zoomlayer",!0),He._hoverlayer=He._hoverpaper.append("g").classed("hoverlayer",!0),He._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Re.emit("plotly_framework")}J.animate=_r,J.addFrames=Zt,J.deleteFrames=sr,J.addTraces=X,J.deleteTraces=K,J.extendTraces=oe,J.moveTraces=G,J.prependTraces=H,J.newPlot=B,J._doPlot=u,J.purge=Ot,J.react=Tt,J.redraw=R,J.relayout=ye,J.restyle=Y,J.setPlotConfig=b,J.update=ge,J._guiRelayout=ue(ye),J._guiRestyle=ue(Y),J._guiUpdate=ue(ge),J._storeDirectGUIEdit=ne}}),yd=Ee({"src/snapshot/helpers.js"(J){"use strict";var V=Ri();J.getDelay=function(E){return E._has&&(E._has("gl3d")||E._has("map"))?500:0},J.getRedrawFunc=function(E){return function(){V.getComponentMethod("colorbar","draw")(E)}},J.encodeSVG=function(E){return"data:image/svg+xml,"+encodeURIComponent(E)},J.encodeJSON=function(E){return"data:application/json,"+encodeURIComponent(E)};var v=window.URL||window.webkitURL;J.createObjectURL=function(E){return v.createObjectURL(E)},J.revokeObjectURL=function(E){return v.revokeObjectURL(E)},J.createBlob=function(E,k){if(k==="svg")return new window.Blob([E],{type:"image/svg+xml;charset=utf-8"});if(k==="full-json")return new window.Blob([E],{type:"application/json;charset=utf-8"});var l=x(window.atob(E));return new window.Blob([l],{type:"image/"+k})},J.octetStream=function(E){document.location.href="data:application/octet-stream"+E},J.getPlotTitle=function(E){var k,l,e,t,a=E._fullLayout;if(a){var r=(k=a.title)==null?void 0:k.text;return r===((l=a._dfltTitle)==null?void 0:l.plot)?void 0:r}return(t=(e=E.layout)==null?void 0:e.title)==null?void 0:t.text},J.getPlotSubtitle=function(E){var k,l,e,t,a,r,n=E._fullLayout;if(n){var o=(l=(k=n.title)==null?void 0:k.subtitle)==null?void 0:l.text;return o===((e=n._dfltTitle)==null?void 0:e.subtitle)?void 0:o}return(r=(a=(t=E.layout)==null?void 0:t.title)==null?void 0:a.subtitle)==null?void 0:r.text};function x(E){for(var k=E.length,l=new ArrayBuffer(k),e=new Uint8Array(l),t=0;t{let i=g.toLowerCase();return r.includes(i)?g:n.includes(i)?"<":o.includes(i)?">":g.includes("<")||g.includes(">")?"":h.html(g).text()});return h.remove(),p}function c(m){return m.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}V.exports=function(h,p,g){var i=h._fullLayout,w=i._paper,S=i._toppaper,M=i.width,C=i.height,_;w.insert("rect",":first-child").call(E.setRect,0,0,M,C).call(k.fill,i.paper_bgcolor);var T=i._basePlotModules||[];for(_=0;_1&&C.push(s("object","layout"))),x.supplyDefaults(_);for(var u=_._fullData,A=T.length,b=0;bz.length&&M.push(s("unused",C,A.concat(z.length)));var P=z.length,j=Array.isArray(F);j&&(P=Math.min(P,F.length));var U,Z,Q,re,ae;if(I.dimensions===2)for(Z=0;Zz[Z].length&&M.push(s("unused",C,A.concat(Z,z[Z].length)));var oe=z[Z].length;for(U=0;U<(j?Math.min(oe,F[Z].length):oe);U++)Q=j?F[Z][U]:F,re=b[Z][U],ae=z[Z][U],v.validate(re,Q)?ae!==re&&ae!==+re&&M.push(s("dynamic",C,A.concat(Z,U),re,ae)):M.push(s("value",C,A.concat(Z,U),re))}else M.push(s("array",C,A.concat(Z),b[Z]));else for(Z=0;ZR?M.push({code:"unused",traceType:b,templateCount:N,dataCount:R}):R>N&&M.push({code:"reused",traceType:b,templateCount:N,dataCount:R})}}function B(F,P){for(var j in F)if(j.charAt(0)!=="_"){var U=F[j],Z=s(F,j,P);v(U)?(Array.isArray(F)&&U._template===!1&&U.templateitemname&&M.push({code:"missing",path:Z,templateitemname:U.templateitemname}),B(U,Z)):Array.isArray(U)&&c(U)&&B(U,Z)}}if(B({data:_,layout:C},""),M.length)return M.map(m)};function c(h){for(var p=0;p=0;m--){var h=l[m];if(h.type==="scatter"&&h.xaxis===s.xaxis&&h.yaxis===s.yaxis){h.opacity=void 0;break}}}}}}}),QM=Ee({"src/traces/scatter/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=Ig();V.exports=function(E,k){function l(t,a){return v.coerce(E,k,x,t,a)}var e=k.barmode==="group";k.scattermode==="group"&&l("scattergap",e?k.bargap:.2)}}}),zh=Ee({"src/plots/cartesian/align_period.js"(J,V){"use strict";var v=mi(),x=Vr(),E=x.dateTime2ms,k=x.incrementMonth,l=Qi(),e=l.ONEAVGMONTH;V.exports=function(a,r,n,o){if(r.type!=="date")return{vals:o};var s=a[n+"periodalignment"];if(!s)return{vals:o};var c=a[n+"period"],m;if(v(c)){if(c=+c,c<=0)return{vals:o}}else if(typeof c=="string"&&c.charAt(0)==="M"){var h=+c.substring(1);if(h>0&&Math.round(h)===h)m=h;else return{vals:o}}for(var p=r.calendar,g=s==="start",i=s==="end",w=a[n+"period0"],S=E(w,p)||0,M=[],C=[],_=[],T=o.length,f=0;fu;)z=k(z,-m,p);for(;z<=u;)z=k(z,m,p);b=k(z,-m,p)}else{for(A=Math.round((u-S)/c),z=S+A*c;z>u;)z-=c;for(;z<=u;)z+=c;b=z-c}M[f]=g?b:i?z:(b+z)/2,C[f]=b,_[f]=z}return{vals:M,starts:C,ends:_}}}}),yh=Ee({"src/traces/scatter/colorscale_calc.js"(J,V){"use strict";var v=cf().hasColorscale,x=Sf(),E=al();V.exports=function(l,e){E.hasLines(e)&&v(e,"line")&&x(l,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),E.hasMarkers(e)&&(v(e,"marker")&&x(l,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),v(e,"marker.line")&&x(l,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),$h=Ee({"src/traces/scatter/arrays_to_calcdata.js"(J,V){"use strict";var v=Vr();V.exports=function(E,k){for(var l=0;lB&&b[P].gap;)P--;for(U=b[P].s,F=b.length-1;F>P;F--)b[F].s=U;for(;Bre+Z||!v(Q))}for(var oe=0;oeP(U))):P(R.text);let j=R.outsidetextfont.size*r*F+a;return{ppadplus:B.some(U=>U.s<0)?j:0,ppadminus:B.some(U=>U.s>=0)?j:0}}return{ppadplus:void 0,ppadminus:void 0}}function z(R,B,F,P){for(var j=N(P),U=0;UN[p]&&p0?l:e)/(p._m*w*(p._m>0?l:e)))),Ct*=1e3}if(Vt===E){if(i&&(Vt=p.c2p(Dt.y,!0)),Vt===E)return!1;Vt*=1e3}return[Ct,Vt]}function ee(dt,Dt,Ct,Vt){var Ht=Ct-dt,Wt=Vt-Dt,Sr=.5-dt,on=.5-Dt,$t=Ht*Ht+Wt*Wt,It=Ht*Sr+Wt*on;if(It>0&&It<$t){var ir=Sr*Wt-on*Ht;if(ir*ir<$t)return!0}}var ne,fe;function ye(dt,Dt){var Ct=dt[0]/w,Vt=dt[1]/S,Ht=Math.max(0,-Ct,Ct-1,-Vt,Vt-1);return Ht&&ne!==void 0&&ee(Ct,Vt,ne,fe)&&(Ht=0),Ht&&Dt&&ee(Ct,Vt,Dt[0]/w,Dt[1]/S)&&(Ht=0),(1+n.toleranceGrowth*Ht)*T}function xe(dt,Dt){var Ct=dt[0]-Dt[0],Vt=dt[1]-Dt[1];return Math.sqrt(Ct*Ct+Vt*Vt)}var Ae=n.maxScreensAway,Me=-w*Ae,Ie=w*(1+Ae),Ue=-S*Ae,qe=S*(1+Ae),ke=[[Me,Ue,Ie,Ue],[Ie,Ue,Ie,qe],[Ie,qe,Me,qe],[Me,qe,Me,Ue]],ge,ue,ve,se,Te,Fe;function We(dt,Dt){for(var Ct=[],Vt=0,Ht=0;Ht<4;Ht++){var Wt=ke[Ht],Sr=a(dt[0],dt[1],Dt[0],Dt[1],Wt[0],Wt[1],Wt[2],Wt[3]);Sr&&(!Vt||Math.abs(Sr.x-Ct[0][0])>1||Math.abs(Sr.y-Ct[0][1])>1)&&(Sr=[Sr.x,Sr.y],Vt&&xe(Sr,dt)Ie||dt[1]qe)return[r(dt[0],Me,Ie),r(dt[1],Ue,qe)]}function gt(dt,Dt){if(dt[0]===Dt[0]&&(dt[0]===Me||dt[0]===Ie)||dt[1]===Dt[1]&&(dt[1]===Ue||dt[1]===qe))return!0}function mt(dt,Dt){var Ct=[],Vt=Ge(dt),Ht=Ge(Dt);return Vt&&Ht&>(Vt,Ht)||(Vt&&Ct.push(Vt),Ht&&Ct.push(Ht)),Ct}function Tt(dt,Dt,Ct){return function(Vt,Ht){var Wt=Ge(Vt),Sr=Ge(Ht),on=[];if(Wt&&Sr&>(Wt,Sr))return on;Wt&&on.push(Wt),Sr&&on.push(Sr);var $t=2*t.constrain((Vt[dt]+Ht[dt])/2,Dt,Ct)-((Wt||Vt)[dt]+(Sr||Ht)[dt]);if($t){var It;Wt&&Sr?It=$t>0==Wt[dt]>Sr[dt]?Wt:Sr:It=Wt||Sr,It[dt]+=$t}return on}}var At;f==="linear"||f==="spline"?At=We:f==="hv"||f==="vh"?At=mt:f==="hvh"?At=Tt(0,Me,Ie):f==="vhv"&&(At=Tt(1,Ue,qe));function Kt(dt,Dt){var Ct=Dt[0]-dt[0],Vt=(Dt[1]-dt[1])/Ct,Ht=(dt[1]*Dt[0]-Dt[1]*dt[0])/Ct;return Ht>0?[Vt>0?Me:Ie,qe]:[Vt>0?Ie:Me,Ue]}function nr(dt){var Dt=dt[0],Ct=dt[1],Vt=Dt===N[R-1][0],Ht=Ct===N[R-1][1];if(!(Vt&&Ht))if(R>1){var Wt=Dt===N[R-2][0],Sr=Ct===N[R-2][1];Vt&&(Dt===Me||Dt===Ie)&&Wt?Sr?R--:N[R-1]=dt:Ht&&(Ct===Ue||Ct===qe)&&Sr?Wt?R--:N[R-1]=dt:N[R++]=dt}else N[R++]=dt}function _r(dt){N[R-1][0]!==dt[0]&&N[R-1][1]!==dt[1]&&nr([ve,se]),nr(dt),Te=null,ve=se=0}var Zt=t.isArrayOrTypedArray(C);function sr(dt){if(dt&&M&&(dt.i=B,dt.d=s,dt.trace=m,dt.marker=Zt?C[dt.i]:C,dt.backoff=M),ne=dt[0]/w,fe=dt[1]/S,ge=dt[0]Ie?Ie:0,ue=dt[1]qe?qe:0,ge||ue){if(!R)N[R++]=[ge||dt[0],ue||dt[1]];else if(Te){var Dt=At(Te,dt);Dt.length>1&&(_r(Dt[0]),N[R++]=Dt[1])}else Fe=At(N[R-1],dt)[0],N[R++]=Fe;var Ct=N[R-1];ge&&ue&&(Ct[0]!==ge||Ct[1]!==ue)?(Te&&(ve!==ge&&se!==ue?nr(ve&&se?Kt(Te,dt):[ve||ge,se||ue]):ve&&se&&nr([ve,se])),nr([ge,ue])):ve-ge&&se-ue&&nr([ge||ve,ue||se]),Te=dt,ve=ge,se=ue}else Te&&_r(At(Te,dt)[0]),N[R++]=dt}for(B=0;Bye(Z,Ot))break;P=Z,K=ae[0]*re[0]+ae[1]*re[1],K>H?(H=K,j=Z,Q=!1):K=s.length||!Z)break;sr(Z),F=Z}}Te&&nr([ve||Te[0],se||Te[1]]),b.push(N.slice(0,R))}var vt=f.slice(f.length-1);if(M&&vt!=="h"&&vt!=="v"){for(var ht=!1,Re=-1,Be=[],He=0;He=0?n=h:(n=h=m,m++),n0,f=r(h,p,g);if(M=i.selectAll("g.trace").data(f,function(A){return A[0].trace.uid}),M.enter().append("g").attr("class",function(A){return"trace scatter trace"+A[0].trace.uid}).style("stroke-miterlimit",2),M.order(),o(h,M,p),T){S&&(C=S());var u=v.transition().duration(w.duration).ease(w.easing).each("end",function(){C&&C()}).each("interrupt",function(){C&&C()});u.each(function(){i.selectAll("g.trace").each(function(A,b){s(h,b,p,A,f,this,w)})})}else M.each(function(A,b){s(h,b,p,A,f,this,w)});_&&M.exit().remove(),i.selectAll("path:not([d])").remove()};function o(m,h,p){h.each(function(g){var i=k(v.select(this),"g","fills");e.setClipUrl(i,p.layerClipId,m);var w=g[0].trace;w._ownFill=null,w._nextFill=null;var S=[];w._ownfill&&S.push("_ownFill"),w._nexttrace&&S.push("_nextFill");var M=i.selectAll("g").data(S,l);M.enter().append("g"),M.exit().remove(),M.order().each(function(C){w[C]=k(v.select(this),"path","js-fill")})})}function s(m,h,p,g,i,w,S){var M=m._context.staticPlot,C;c(m,h,p,g,i);var _=!!S&&S.duration>0;function T(nr){return _?nr.transition():nr}var f=p.xaxis,u=p.yaxis,A=g[0].trace,b=A.line,z=v.select(w),I=k(z,"g","errorbars"),N=k(z,"g","lines"),R=k(z,"g","points"),B=k(z,"g","text");if(x.getComponentMethod("errorbars","plot")(m,I,p,S),A.visible!==!0)return;T(z).style("opacity",A.opacity);var F,P,j=A.fill.charAt(A.fill.length-1);j!=="x"&&j!=="y"&&(j="");var U,Z;j==="y"?(U=1,Z=u.c2p(0,!0)):j==="x"&&(U=0,Z=f.c2p(0,!0)),g[0][p.isRangePlot?"nodeRangePlot3":"node3"]=z;var Q="",re=[],ae=A._prevtrace,oe=null,H=null;ae&&(Q=ae._prevRevpath||"",P=ae._nextFill,re=ae._ownPolygons,oe=ae._fillsegments,H=ae._fillElement);var X,K,G="",Y="",q,$,ee,ne,fe,ye,xe=[];A._polygons=[];var Ae=[],Me=[],Ie=E.noop;if(F=A._ownFill,t.hasLines(A)||A.fill!=="none"){P&&P.datum(g),["hv","vh","hvh","vhv"].indexOf(b.shape)!==-1?(q=e.steps(b.shape),$=e.steps(b.shape.split("").reverse().join(""))):b.shape==="spline"?q=$=function(nr){var _r=nr[nr.length-1];return nr.length>1&&nr[0][0]===_r[0]&&nr[0][1]===_r[1]?e.smoothclosed(nr.slice(1),b.smoothing):e.smoothopen(nr,b.smoothing)}:q=$=function(nr){return"M"+nr.join("L")},ee=function(nr){return $(nr.reverse())},Me=a(g,{xaxis:f,yaxis:u,trace:A,connectGaps:A.connectgaps,baseTolerance:Math.max(b.width||1,3)/4,shape:b.shape,backoff:b.backoff,simplify:b.simplify,fill:A.fill}),Ae=new Array(Me.length);var Ue=0;for(C=0;C=M[0]&&z.x<=M[1]&&z.y>=C[0]&&z.y<=C[1]}),u=Math.ceil(f.length/T),A=0;i.forEach(function(z,I){var N=z[0].trace;t.hasMarkers(N)&&N.marker.maxdisplayed>0&&I=Math.min(ae,oe)&&p<=Math.max(ae,oe)?0:1/0}var H=Math.max(3,re.mrc||0),X=1-1/H,K=Math.abs(m.c2p(re.x)-p);return K=Math.min(ae,oe)&&g<=Math.max(ae,oe)?0:1/0}var H=Math.max(3,re.mrc||0),X=1-1/H,K=Math.abs(h.c2p(re.y)-g);return KY!=Ae>=Y&&(fe=ee[$-1][0],ye=ee[$][0],Ae-xe&&(ne=fe+(ye-fe)*(Y-xe)/(Ae-xe),H=Math.min(H,ne),X=Math.max(X,ne)));return H=Math.max(H,0),X=Math.min(X,m._length),{x0:H,x1:X,y0:Y,y1:Y}}if(w.indexOf("fills")!==-1&&c._fillElement){var U=P(c._fillElement)&&!P(c._fillExclusionElement);if(U){var Z=j(c._polygons);Z===null&&(Z={x0:i[0],x1:i[0],y0:i[1],y1:i[1]});var Q=l.defaultLine;return l.opacity(c.fillcolor)?Q=c.fillcolor:l.opacity((c.line||{}).color)&&(Q=c.line.color),v.extendFlat(a,{distance:a.maxHoverDistance,x0:Z.x0,x1:Z.x1,y0:Z.y0,y1:Z.y1,color:Q,hovertemplate:!1}),delete a.index,c.text&&!v.isArrayOrTypedArray(c.text)?a.text=String(c.text):a.text=c.name,[a]}}}}}),Fv=Ee({"src/traces/scatter/select.js"(J,V){"use strict";var v=al();V.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,a=[],r=l[0].trace,n,o,s,c,m=r.mode&&!v.hasMarkers(r)&&!v.hasText(r);if(m)return[];if(k===!1)for(n=0;n0&&(o["_"+r+"axes"]||{})[a])return o;if((o[r+"axis"]||r)===a){if(e(o,r))return o;if((o[r]||[]).length||o[r+"0"])return o}}}function l(t){return{v:"x",h:"y"}[t.orientation||"v"]}function e(t,a){var r=l(t),n=v(t,"box-violin");return n&&a===r&&t[r]===void 0&&t[r+"0"]===void 0}}}),Xg=Ee({"src/plots/cartesian/category_order_defaults.js"(J,V){"use strict";var v=vs().isTypedArraySpec;function x(E,k){var l=k.dataAttr||E._id.charAt(0),e={},t,a,r;if(k.axData)t=k.axData;else for(t=[],a=0;a0||v(a),n;r&&(n="array");var o=e("categoryorder",n),s;o==="array"&&(s=e("categoryarray")),!r&&o==="array"&&(o=l.categoryorder="trace"),o==="trace"?l._initialCategories=[]:o==="array"?l._initialCategories=s.slice():(s=x(l,t).sort(),o==="category ascending"?l._initialCategories=s:o==="category descending"&&(l._initialCategories=s.reverse()))}}}}),Z0=Ee({"src/plots/cartesian/line_grid_defaults.js"(J,V){"use strict";var v=Qa(),x=rs(),E=Vr();V.exports=function(l,e,t,a){a=a||{};var r=a.dfltColor;function n(b,z){return E.coerce2(l,e,a.attributes,b,z)}var o=n("linecolor",r),s=n("linewidth"),c=t("showline",a.showLine||!!o||!!s);c||(delete e.linecolor,delete e.linewidth);var m=v.mix(r,a.bgColor,a.blend||x.lightFraction),h=n("gridcolor",m),p=n("gridwidth"),g=n("griddash"),i=t("showgrid",a.showGrid||!!h||!!p||!!g);if(i||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),a.hasMinor){var w=v.mix(e.gridcolor,a.bgColor,67),S=n("minor.gridcolor",w),M=n("minor.gridwidth",e.gridwidth||1),C=n("minor.griddash",e.griddash||"solid"),_=t("minor.showgrid",!!S||!!M||!!C);_||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!a.noZeroLine){var T=n("zerolinelayer"),f=n("zerolinecolor",r),u=n("zerolinewidth"),A=t("zeroline",a.showGrid||!!f||!!u);A||(delete e.zerolinelayer,delete e.zerolinecolor,delete e.zerolinewidth)}}}}),K0=Ee({"src/plots/cartesian/axis_defaults.js"(J,V){"use strict";var v=mi(),x=Ri(),E=Vr(),k=xs(),l=Mf(),e=Gc(),t=Cv(),a=Np(),r=Wd(),n=Yd(),o=Xg(),s=Z0(),c=Fb(),m=Hh(),h=tc().WEEKDAY_PATTERN,p=tc().HOUR_PATTERN;V.exports=function(M,C,_,T,f){var u=T.letter,A=T.font||{},b=T.splomStash||{},z=_("visible",!T.visibleDflt),I=C._template||{},N=C.type||I.type||"-",R;if(N==="date"){var B=x.getComponentMethod("calendars","handleDefaults");B(M,C,"calendar",T.calendar),T.noTicklabelmode||(R=_("ticklabelmode"))}!T.noTicklabelindex&&(N==="date"||N==="linear")&&_("ticklabelindex");var F="";(!T.noTicklabelposition||N==="multicategory")&&(F=E.coerce(M,C,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:R==="period"?["outside","inside"]:u==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),T.noTicklabeloverflow||_("ticklabeloverflow",F.indexOf("inside")!==-1?"hide past domain":N==="category"||N==="multicategory"?"allow":"hide past div"),m(C,f),c(M,C,_,T),o(M,C,_,T),T.noHover||(N!=="category"&&_("hoverformat"),T.noUnifiedhovertitle||_("unifiedhovertitle.text"));var P=_("color"),j=P!==e.color.dflt?P:A.color,U=b.label||f._dfltTitle[u];if(n(M,C,_,N,T),!z)return C;_("title.text",U),E.coerceFont(_,"title.font",A,{overrideDflt:{size:E.bigFont(A.size),color:j}}),t(M,C,_,N);var Z=T.hasMinor;if(Z&&(k.newContainer(C,"minor"),t(M,C,_,N,{isMinor:!0})),r(M,C,_,N,T),a(M,C,_,T),Z){var Q=T.isMinor;T.isMinor=!0,a(M,C,_,T),T.isMinor=Q}s(M,C,_,{dfltColor:P,bgColor:T.bgColor,showGrid:T.showGrid,hasMinor:Z,attributes:e}),Z&&C.ticklabelindex==null&&!C.minor.ticks&&!C.minor.showgrid&&delete C.minor,(C.showline||C.ticks)&&_("mirror");var re=N==="multicategory";if(!T.noTickson&&(N==="category"||re)&&(C.ticks||C.showgrid)&&(re?(_("tickson","boundaries"),delete C.ticklabelposition):_("tickson")),re){var ae=_("showdividers");ae&&(_("dividercolor"),_("dividerwidth"))}if(N==="date")if(l(M,C,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:g}),!C.rangebreaks.length)delete C.rangebreaks;else{for(var oe=0;oe=2){var u="",A,b;if(f.length===2){for(A=0;A<2;A++)if(b=w(f[A]),b){u=h;break}}var z=_("pattern",u);if(z===h)for(A=0;A<2;A++)b=w(f[A]),b&&(M.bounds[A]=f[A]=b-1);if(z)for(A=0;A<2;A++)switch(b=f[A],z){case h:if(!v(b)){M.enabled=!1;return}if(b=+b,b!==Math.floor(b)||b<0||b>=7){M.enabled=!1;return}M.bounds[A]=f[A]=b;break;case p:if(!v(b)){M.enabled=!1;return}if(b=+b,b<0||b>24){M.enabled=!1;return}M.bounds[A]=f[A]=b;break}if(C.autorange===!1){var I=C.range;if(I[0]I[1]){M.enabled=!1;return}}else if(f[0]>I[0]&&f[1]_[1]-1/4096&&(l.domain=m),x.noneOrAll(k.domain,l.domain,m),l.tickmode==="sync"&&(l.tickmode="auto")}return e("layer"),l}}}),n4=Ee({"src/plots/cartesian/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=Qa(),E=Qf().isUnifiedHover,k=Vb(),l=xs(),e=Fp(),t=Gc(),a=ux(),r=K0(),n=Pv(),o=$g(),s=Xl(),c=s.id2name,m=s.name2id,h=tc().AX_ID_PATTERN,p=Ri(),g=p.traceIs,i=p.getComponentMethod;function w(S,M,C){Array.isArray(S[M])?S[M].push(C):S[M]=[C]}V.exports=function(M,C,_){var T=C.autotypenumbers,f={},u={},A={},b={},z={},I={},N={},R={},B={},F={},P,j;for(P=0;P<_.length;P++){var U=_[P];if(g(U,"cartesian")){var Z;if(U.xaxis)Z=c(U.xaxis),w(f,Z,U);else if(U.xaxes)for(j=0;j rect").call(k.setTranslate,0,0).call(k.setScale,1,1),C.plot.call(k.setTranslate,_._offset,T._offset).call(k.setScale,1,1);var f=C.plot.selectAll(".scatterlayer .trace");f.selectAll(".point").call(k.setPointGroupScale,1,1),f.selectAll(".textpoint").call(k.setTextPointsScale,1,1),f.call(k.hideOutsideRangePoints,C)}function c(C,_){var T=C.plotinfo,f=T.xaxis,u=T.yaxis,A=f._length,b=u._length,z=!!C.xr1,I=!!C.yr1,N=[];if(z){var R=E.simpleMap(C.xr0,f.r2l),B=E.simpleMap(C.xr1,f.r2l),F=R[1]-R[0],P=B[1]-B[0];N[0]=(R[0]*(1-_)+_*B[0]-R[0])/(R[1]-R[0])*A,N[2]=A*(1-_+_*P/F),f.range[0]=f.l2r(R[0]*(1-_)+_*B[0]),f.range[1]=f.l2r(R[1]*(1-_)+_*B[1])}else N[0]=0,N[2]=A;if(I){var j=E.simpleMap(C.yr0,u.r2l),U=E.simpleMap(C.yr1,u.r2l),Z=j[1]-j[0],Q=U[1]-U[0];N[1]=(j[1]*(1-_)+_*U[1]-j[1])/(j[0]-j[1])*b,N[3]=b*(1-_+_*Q/Z),u.range[0]=f.l2r(j[0]*(1-_)+_*U[0]),u.range[1]=u.l2r(j[1]*(1-_)+_*U[1])}else N[1]=0,N[3]=b;l.drawOne(t,f,{skipTitle:!0}),l.drawOne(t,u,{skipTitle:!0}),l.redrawComponents(t,[f._id,u._id]);var re=z?A/N[2]:1,ae=I?b/N[3]:1,oe=z?N[0]:0,H=I?N[1]:0,X=z?N[0]/N[2]*A:0,K=I?N[1]/N[3]*b:0,G=f._offset-X,Y=u._offset-K;T.clipRect.call(k.setTranslate,oe,H).call(k.setScale,1/re,1/ae),T.plot.call(k.setTranslate,G,Y).call(k.setScale,re,ae),k.setPointGroupScale(T.zoomScalePts,1/re,1/ae),k.setTextPointsScale(T.zoomScaleTxt,1/re,1/ae)}var m;n&&(m=n());function h(){for(var C={},_=0;_r.duration?(h(),w=window.cancelAnimationFrame(M)):w=window.requestAnimationFrame(M)}return g=Date.now(),w=window.requestAnimationFrame(M),Promise.resolve()}}}),Mu=Ee({"src/plots/cartesian/index.js"(J){"use strict";var V=Hn(),v=Ri(),x=Vr(),E=vl(),k=yo(),l=uf().getModuleCalcData,e=Xl(),t=tc(),a=mh(),r=x.ensureSingle;function n(g,i,w){return x.ensureSingle(g,i,w,function(S){S.datum(w)})}var o=t.zindexSeparator;J.name="cartesian",J.attr=["xaxis","yaxis"],J.idRoot=["x","y"],J.idRegex=t.idRegex,J.attrRegex=t.attrRegex,J.attributes=r4(),J.layoutAttributes=Gc(),J.supplyLayoutDefaults=n4(),J.transitionAxes=a4(),J.finalizeSubplots=function(g,i){var w=i._subplots,S=w.xaxis,M=w.yaxis,C=w.cartesian,_=C,T={},f={},u,A,b;for(u=0;u<_.length;u++){var z=_[u].split("y");T[z[0]]=1,f["y"+z[1]]=1}for(u=0;u0){var I=z.id;if(I.indexOf(o)!==-1)continue;I+=o+(u+1),z=x.extendFlat({},z,{id:I,plot:M._cartesianlayer.selectAll(".subplot").select("."+I)})}for(var N=[],R,B=0;B<_.length;B++){var F=_[B],P=F[0].trace;A===(P.zorder||0)&&P.xaxis+P.yaxis===b&&((i.indexOf(P.index)!==-1||P.carpet)&&(R&&R[0].trace.xaxis+R[0].trace.yaxis===b&&["tonextx","tonexty","tonext"].indexOf(P.fill)!==-1&&N.indexOf(R)===-1&&N.push(R),N.push(F)),R=F)}s(g,z,N,w,S)}}};function s(g,i,w,S,M){for(var C=t.traceLayerClasses,_=g._fullLayout,T=_._zindices,f=_._modules,u,A,b,z=[],I=[],N=0;N1&&(Z+=o+U),j.push(T+Z),_=0;_1,b=i.mainplotinfo;if(!i.mainplot||A)if(u)i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.xaxislayer=r(S,"g","xaxislayer-above"),i.yaxislayer=r(S,"g","yaxislayer-above");else{if(!_){var z=r(S,"g","layer-subplot");i.shapelayer=r(z,"g","shapelayer"),i.imagelayer=r(z,"g","imagelayer"),b&&A?(i.minorGridlayer=b.minorGridlayer,i.gridlayer=b.gridlayer,i.zerolinelayer=b.zerolinelayer):(i.minorGridlayer=r(S,"g","minor-gridlayer"),i.gridlayer=r(S,"g","gridlayer"),i.zerolinelayer=r(S,"g","zerolinelayer"));var I=r(S,"g","layer-between");i.shapelayerBetween=r(I,"g","shapelayer"),i.imagelayerBetween=r(I,"g","imagelayer"),r(S,"path","xlines-below"),r(S,"path","ylines-below"),i.overlinesBelow=r(S,"g","overlines-below"),r(S,"g","xaxislayer-below"),r(S,"g","yaxislayer-below"),i.overaxesBelow=r(S,"g","overaxes-below")}i.overplot=r(S,"g","overplot"),i.plot=r(i.overplot,"g",M),b&&A?i.zerolinelayerAbove=b.zerolinelayerAbove:i.zerolinelayerAbove=r(S,"g","zerolinelayer-above"),_||(i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.overlinesAbove=r(S,"g","overlines-above"),r(S,"g","xaxislayer-above"),r(S,"g","yaxislayer-above"),i.overaxesAbove=r(S,"g","overaxes-above"),i.xlines=S.select(".xlines-"+T),i.ylines=S.select(".ylines-"+f),i.xaxislayer=S.select(".xaxislayer-"+T),i.yaxislayer=S.select(".yaxislayer-"+f))}else{var N=b.plotgroup,R=M+"-x",B=M+"-y";i.minorGridlayer=b.minorGridlayer,i.gridlayer=b.gridlayer,i.zerolinelayer=b.zerolinelayer,i.zerolinelayerAbove=b.zerolinelayerAbove,r(b.overlinesBelow,"path",R),r(b.overlinesBelow,"path",B),r(b.overaxesBelow,"g",R),r(b.overaxesBelow,"g",B),i.plot=r(b.overplot,"g",M),r(b.overlinesAbove,"path",R),r(b.overlinesAbove,"path",B),r(b.overaxesAbove,"g",R),r(b.overaxesAbove,"g",B),i.xlines=N.select(".overlines-"+T).select("."+R),i.ylines=N.select(".overlines-"+f).select("."+B),i.xaxislayer=N.select(".overaxes-"+T).select("."+R),i.yaxislayer=N.select(".overaxes-"+f).select("."+B)}_||(u||(n(i.minorGridlayer,"g",i.xaxis._id),n(i.minorGridlayer,"g",i.yaxis._id),i.minorGridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort),n(i.gridlayer,"g",i.xaxis._id),n(i.gridlayer,"g",i.yaxis._id),i.gridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort)),i.xlines.style("fill","none").classed("crisp",!0),i.ylines.style("fill","none").classed("crisp",!0))}function h(g,i){if(g){var w={};g.each(function(f){var u=f[0],A=V.select(this);A.remove(),p(u,i),w[u]=!0});for(var S in i._plots)for(var M=i._plots[S],C=M.overlays||[],_=0;_=0,i=n.indexOf("end")>=0,w=c.backoff*h+o.standoff,S=m.backoff*p+o.startstandoff,M,C,_,T;if(s.nodeName==="line"){M={x:+r.attr("x1"),y:+r.attr("y1")},C={x:+r.attr("x2"),y:+r.attr("y2")};var f=M.x-C.x,u=M.y-C.y;if(_=Math.atan2(u,f),T=_+Math.PI,w&&S&&w+S>Math.sqrt(f*f+u*u)){Z();return}if(w){if(w*w>f*f+u*u){Z();return}var A=w*Math.cos(_),b=w*Math.sin(_);C.x+=A,C.y+=b,r.attr({x2:C.x,y2:C.y})}if(S){if(S*S>f*f+u*u){Z();return}var z=S*Math.cos(_),I=S*Math.sin(_);M.x-=z,M.y-=I,r.attr({x1:M.x,y1:M.y})}}else if(s.nodeName==="path"){var N=s.getTotalLength(),R="";if(N2/3?fr="right":fr="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[fr]}for(var Fe=!1,We=["x","y"],Ge=0;Ge1)&&(Tt===mt?(Je=At.r2fraction(S["a"+gt]),(Je<0||Je>1)&&(Fe=!0)):Fe=!0),ht=At._offset+At.r2p(S[gt]),He=.5}else{var Mt=Ze==="domain";gt==="x"?(Be=S[gt],ht=Mt?At._offset+At._length*Be:ht=u.l+u.w*Be):(Be=1-S[gt],ht=Mt?At._offset+At._length*Be:ht=u.t+u.h*Be),He=S.showarrow?.5:Be}if(S.showarrow){vt.head=ht;var dt=S["a"+gt];if($e=nr*Te(.5,S.xanchor)-_r*Te(.5,S.yanchor),Tt===mt){var Dt=e.getRefType(Tt);Dt==="domain"?(gt==="y"&&(dt=1-dt),vt.tail=At._offset+At._length*dt):Dt==="paper"?gt==="y"?(dt=1-dt,vt.tail=u.t+u.h*dt):vt.tail=u.l+u.w*dt:vt.tail=At._offset+At.r2p(dt),Re=$e}else vt.tail=ht+dt,Re=$e+dt;vt.text=vt.tail+$e;var Ct=f[gt==="x"?"width":"height"];if(mt==="paper"&&(vt.head=k.constrain(vt.head,1,Ct-1)),Tt==="pixel"){var Vt=-Math.max(vt.tail-3,vt.text),Ht=Math.min(vt.tail+3,vt.text)-Ct;Vt>0?(vt.tail+=Vt,vt.text+=Vt):Ht>0&&(vt.tail-=Ht,vt.text-=Ht)}vt.tail+=Ot,vt.head+=Ot}else $e=Zt*Te(He,sr),Re=$e,vt.text=ht+$e;vt.text+=Ot,$e+=Ot,Re+=Ot,S["_"+gt+"padplus"]=Zt/2+Re,S["_"+gt+"padminus"]=Zt/2-Re,S["_"+gt+"size"]=Zt,S["_"+gt+"shift"]=$e}if(Fe){oe.remove();return}var Wt=0,Sr=0;if(S.align!=="left"&&(Wt=(ge-qe)*(S.align==="center"?.5:1)),S.valign!=="top"&&(Sr=(ue-ke)*(S.valign==="middle"?.5:1)),Ie)Me.select("svg").attr({x:K+Wt-1,y:K+Sr}).call(a.setClipUrl,Y?F:null,w);else{var on=K+Sr-Ue.top,$t=K+Wt-Ue.left;ne.call(n.positionText,$t,on).call(a.setClipUrl,Y?F:null,w)}q.select("rect").call(a.setRect,K,K,ge,ue),G.call(a.setRect,H/2,H/2,ve-H,se-H),oe.call(a.setTranslate,Math.round(P.x.text-ve/2),Math.round(P.y.text-se/2)),Z.attr({transform:"rotate("+j+","+P.x.text+","+P.y.text+")"});var It=function(cr,fr){U.selectAll(".annotation-arrow-g").remove();var Ir=P.x.head,ln=P.y.head,nn=P.x.tail+cr,wn=P.y.tail+fr,Un=P.x.text+cr,jn=P.y.text+fr,Aa=k.rotationXYMatrix(j,Un,jn),ua=k.apply2DTransform(Aa),Qn=k.apply2DTransform2(Aa),ei=+G.attr("width"),Fa=+G.attr("height"),ai=Un-.5*ei,Mi=ai+ei,ci=jn-.5*Fa,ba=ci+Fa,pa=[[ai,ci,ai,ba],[ai,ba,Mi,ba],[Mi,ba,Mi,ci],[Mi,ci,ai,ci]].map(Qn);if(!pa.reduce(function(at,kt){return at^!!k.segmentsIntersect(Ir,ln,Ir+1e6,ln+1e6,kt[0],kt[1],kt[2],kt[3])},!1)){pa.forEach(function(at){var kt=k.segmentsIntersect(nn,wn,Ir,ln,at[0],at[1],at[2],at[3]);kt&&(nn=kt.x,wn=kt.y)});var Ii=S.arrowwidth,ho=S.arrowcolor,da=S.arrowside,Kn=U.append("g").style({opacity:t.opacity(ho)}).classed("annotation-arrow-g",!0),ot=Kn.append("path").attr("d","M"+nn+","+wn+"L"+Ir+","+ln).style("stroke-width",Ii+"px").call(t.stroke,t.rgb(ho));if(m(ot,da,S),A.annotationPosition&&ot.node().parentNode&&!C){var et=Ir,hr=ln;if(S.standoff){var ur=Math.sqrt(Math.pow(Ir-nn,2)+Math.pow(ln-wn,2));et+=S.standoff*(nn-Ir)/ur,hr+=S.standoff*(wn-ln)/ur}var Tr=Kn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(nn-et)+","+(wn-hr),transform:l(et,hr)}).style("stroke-width",Ii+6+"px").call(t.stroke,"rgba(0,0,0,0)").call(t.fill,"rgba(0,0,0,0)"),Rr,Fr;s.init({element:Tr.node(),gd:w,prepFn:function(){var at=a.getTranslate(oe);Rr=at.x,Fr=at.y,_&&_.autorange&&N(_._name+".autorange",!0),T&&T.autorange&&N(T._name+".autorange",!0)},moveFn:function(at,kt){var Ut=ua(Rr,Fr),ar=Ut[0]+at,Er=Ut[1]+kt;oe.call(a.setTranslate,ar,Er),R("x",g(_,at,"x",u,S)),R("y",g(T,kt,"y",u,S)),S.axref===S.xref&&R("ax",g(_,at,"ax",u,S)),S.ayref===S.yref&&R("ay",g(T,kt,"ay",u,S)),Kn.attr("transform",l(at,kt)),Z.attr({transform:"rotate("+j+","+ar+","+Er+")"})},doneFn:function(){x.call("_guiRelayout",w,B());var at=document.querySelector(".js-notes-box-panel");at&&at.redraw(at.selectedObj)}})}}};if(S.showarrow&&It(0,0),Q){var ir;s.init({element:oe.node(),gd:w,prepFn:function(){ir=Z.attr("transform")},moveFn:function(cr,fr){var Ir="pointer";if(S.showarrow)S.axref===S.xref?R("ax",g(_,cr,"ax",u,S)):R("ax",S.ax+cr),S.ayref===S.yref?R("ay",g(T,fr,"ay",u.w,S)):R("ay",S.ay+fr),It(cr,fr);else{if(C)return;var ln,nn;if(_)ln=g(_,cr,"x",u,S);else{var wn=S._xsize/u.w,Un=S.x+(S._xshift-S.xshift)/u.w-wn/2;ln=s.align(Un+cr/u.w,wn,0,1,S.xanchor)}if(T)nn=g(T,fr,"y",u,S);else{var jn=S._ysize/u.h,Aa=S.y-(S._yshift+S.yshift)/u.h-jn/2;nn=s.align(Aa-fr/u.h,jn,0,1,S.yanchor)}R("x",ln),R("y",nn),(!_||!T)&&(Ir=s.getCursor(_?.5:ln,T?.5:nn,S.xanchor,S.yanchor))}Z.attr({transform:l(cr,fr)+ir}),o(oe,Ir)},clickFn:function(cr,fr){S.captureevents&&w.emit("plotly_clickannotation",ae(fr))},doneFn:function(){o(oe),x.call("_guiRelayout",w,B());var cr=document.querySelector(".js-notes-box-panel");cr&&cr.redraw(cr.selectedObj)}})}}A.annotationText?ne.call(n.makeEditable,{delegate:oe,gd:w}).call(fe).on("edit",function(xe){S.text=xe,this.call(fe),R("text",xe),_&&_.autorange&&N(_._name+".autorange",!0),T&&T.autorange&&N(T._name+".autorange",!0),x.call("_guiRelayout",w,B())}):ne.call(fe)}}}),s4=Ee({"src/components/annotations/click.js"(J,V){"use strict";var v=Vr(),x=Ri(),E=xs().arrayEditor;V.exports={hasClickToShow:k,onClick:l};function k(a,r){var n=e(a,r);return n.on.length>0||n.explicitOff.length>0}function l(a,r){var n=e(a,r),o=n.on,s=n.off.concat(n.explicitOff),c={},m=a._fullLayout.annotations,h,p;if(o.length||s.length){for(h=0;h1){o=!0;break}}o?l.fullLayout._infolayer.select(".annotation-"+l.id+'[data-index="'+r+'"]').remove():(n._pdata=x(l.glplot.cameraParams,[e.xaxis.r2l(n.x)*t[0],e.yaxis.r2l(n.y)*t[1],e.zaxis.r2l(n.z)*t[2]]),v(l.graphDiv,n,r,l.id,n._xa,n._ya))}}}}),p4=Ee({"src/components/annotations3d/index.js"(J,V){"use strict";var v=Ri(),x=Vr();V.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:Kg()}}},layoutAttributes:Kg(),handleDefaults:h4(),includeBasePlot:E,convert:d4(),draw:v4()};function E(k,l){var e=v.subplotsRegistry.gl3d;if(e)for(var t=e.attrRegex,a=Object.keys(k),r=0;r{var b=A+"anchor",z=A==="x"?w:S,I={_fullLayout:n},N,R,B,F;let P=A+"ref",j=a[P];if(Array.isArray(j)&&j.length>0){let U=l.countDefiningCoords(p,m,A);F=x.coerceRefArray(a,r,I,A,void 0,"paper",U),r["_"+A+"refArray"]=!0}else F=x.coerceRef(a,r,I,A,void 0,"paper");if(Array.isArray(F))F.forEach(function(U){x.getRefType(U)==="range"&&(N=x.getFromId(I,U),N&&N._shapeIndices.indexOf(r._index)===-1&&N._shapeIndices.push(r._index))}),g&&[0,1].forEach(function(U){let Z=F[U];x.getRefType(Z)==="range"?(N=x.getFromId(I,Z),R=l.shapePositionToRange(N),B=l.rangeToShapePosition(N),(N.type==="category"||N.type==="multicategory")&&o(A+U+"shift")):R=B=v.identity;let re=A+U,ae=a[re];if(a[re]=R(a[re],!0),z==="pixel"?o(re,C[U]):x.coercePosition(r,I,o,Z,re,M[U]),r[re]=B(r[re]),a[re]=ae,U===0&&z==="pixel"){let oe=a[b];a[b]=R(a[b],!0),x.coercePosition(r,I,o,Z,b,.25),r[b]=B(r[b]),a[b]=oe}});else{if(x.getRefType(F)==="range"?(N=x.getFromId(I,F),N._shapeIndices.push(r._index),B=l.rangeToShapePosition(N),R=l.shapePositionToRange(N),g&&(N.type==="category"||N.type==="multicategory")&&(o(A+"0shift"),o(A+"1shift"))):R=B=v.identity,g){let Z=A+"0",Q=A+"1",re=a[Z],ae=a[Q];a[Z]=R(a[Z],!0),a[Q]=R(a[Q],!0),z==="pixel"?(o(Z,C[0]),o(Q,C[1])):(x.coercePosition(r,I,o,F,Z,M[0]),x.coercePosition(r,I,o,F,Q,M[1])),r[Z]=B(r[Z]),r[Q]=B(r[Q]),a[Z]=re,a[Q]=ae}if(z==="pixel"){let Z=a[b];a[b]=R(a[b],!0),x.coercePosition(r,I,o,F,b,.25),r[b]=B(r[b]),a[b]=Z}}}),g&&v.noneOrAll(a,r,["x0","x1","y0","y1"]);var _=p==="line",T,f;if(g&&(T=o("label.texttemplate"),o("label.texttemplatefallback")),T||(f=o("label.text")),f||T){o("label.textangle");var u=o("label.textposition",_?"middle":"middle center");o("label.xanchor"),o("label.yanchor",e(_,u)),o("label.padding"),v.coerceFont(o,"label.font",n.font)}}}}),g4=Ee({"src/components/shapes/draw_newshape/defaults.js"(J,V){"use strict";var v=Qa(),x=Vr();function E(k,l){return k?"bottom":l.indexOf("top")!==-1?"top":l.indexOf("bottom")!==-1?"bottom":"middle"}V.exports=function(l,e,t){t("newshape.visible"),t("newshape.name"),t("newshape.showlegend"),t("newshape.legend"),t("newshape.legendwidth"),t("newshape.legendgroup"),t("newshape.legendgrouptitle.text"),x.coerceFont(t,"newshape.legendgrouptitle.font"),t("newshape.legendrank"),t("newshape.drawdirection"),t("newshape.layer"),t("newshape.fillcolor"),t("newshape.fillrule"),t("newshape.opacity");var a=t("newshape.line.width");if(a){var r=(l||{}).plot_bgcolor||"#FFF";t("newshape.line.color",v.contrast(r)),t("newshape.line.dash")}var n=l.dragmode==="drawline",o=t("newshape.label.text"),s=t("newshape.label.texttemplate");if(t("newshape.label.texttemplatefallback"),o||s){t("newshape.label.textangle");var c=t("newshape.label.textposition",n?"middle":"middle center");t("newshape.label.xanchor"),t("newshape.label.yanchor",E(n,c)),t("newshape.label.padding"),x.coerceFont(t,"newshape.label.font",e.font)}t("activeshape.fillcolor"),t("activeshape.opacity")}}}),y4=Ee({"src/components/shapes/calc_autorange.js"(J,V){"use strict";var v=Vr(),x=uo(),E=G0(),k=Zd();V.exports=function(o){var s=o._fullLayout,c=v.filterVisible(s.shapes);if(!(!c.length||!o._fullData.length))for(var m=0;m{p=x.getFromId(o,M),h._extremes[p._id]=x.findExtremes(p,C,e(h))})}else h.xref!=="paper"&&i!=="domain"&&(p=x.getFromId(o,h.xref),g=r(p,h,E.paramIsX),g&&(h._extremes[p._id]=x.findExtremes(p,g,e(h))));if(w==="array"){let S=l(o,h,"y");Object.entries(S).forEach(([M,C])=>{p=x.getFromId(o,M),h._extremes[p._id]=x.findExtremes(p,C,t(h))})}else h.yref!=="paper"&&w!=="domain"&&(p=x.getFromId(o,h.yref),g=r(p,h,E.paramIsY),g&&(h._extremes[p._id]=x.findExtremes(p,g,t(h))))}};function l(n,o,s){let c=o[s+"ref"],m=s==="x"?E.paramIsX:E.paramIsY;function h(M,C){M==="paper"||x.getRefType(M)==="domain"||(p[M]||(p[M]=[]),p[M].push(C))}let p={};if(o.type==="path"&&o.path){let M=o.path.match(E.segmentRE)||[];for(var g=0,i=0;iT&&(h(c[g],f[T]),g++)}}else h(c[0],o[s+"0"]),h(c[1],o[s+"1"]);let w={};for(let M in p){let C=x.getFromId(n,M);if(C){var S=C.type==="category"||C.type==="multicategory"?C.r2c:C.d2c;C.type==="date"&&(S=k.decodeDate(S)),w[C._id]=p[M].map(S)}}return w}function e(n){return a(n.line.width,n.xsizemode,n.x0,n.x1,n.path,!1)}function t(n){return a(n.line.width,n.ysizemode,n.y0,n.y1,n.path,!0)}function a(n,o,s,c,m,h){var p=n/2,g=h;if(o==="pixel"){var i=m?k.extractPathCoords(m,h?E.paramIsY:E.paramIsX):[s,c],w=v.aggNums(Math.max,null,i),S=v.aggNums(Math.min,null,i),M=S<0?Math.abs(S)+p:p,C=w>0?w+p:p;return{ppad:p,ppadplus:g?M:C,ppadminus:g?C:M}}else return{ppad:p}}function r(n,o,s){var c=n._id.charAt(0)==="x"?"x":"y",m=n.type==="category"||n.type==="multicategory",h,p,g=0,i=0,w=m?n.r2c:n.d2c,S=o[c+"sizemode"]==="scaled";if(S?(h=o[c+"0"],p=o[c+"1"],m&&(g=o[c+"0shift"],i=o[c+"1shift"])):(h=o[c+"anchor"],p=o[c+"anchor"]),h!==void 0)return[w(h)+g,w(p)+i];if(o.path){var M=1/0,C=-1/0,_=o.path.match(E.segmentRE),T,f,u,A,b;for(n.type==="date"&&(w=k.decodeDate(w)),T=0;T<_.length;T++)f=_[T],u=s[f.charAt(0)].drawn,u!==void 0&&(A=_[T].slice(1).match(E.paramRE),!(!A||A.lengthC&&(C=b)));if(C>=M)return[M,C]}}}}),_4=Ee({"src/components/shapes/index.js"(J,V){"use strict";var v=Ug();V.exports={moduleType:"component",name:"shapes",layoutAttributes:hx(),supplyLayoutDefaults:m4(),supplyDrawNewShapeDefaults:g4(),includeBasePlot:$0()("shapes"),calcAutorange:y4(),draw:v.draw,drawOne:v.drawOne}}}),dx=Ee({"src/components/images/attributes.js"(J,V){"use strict";var v=tc(),x=xs().templatedArray,E=X0();V.exports=x("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",v.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",v.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),b4=Ee({"src/components/images/defaults.js"(J,V){"use strict";var v=Vr(),x=uo(),E=Mf(),k=dx(),l="images";V.exports=function(a,r){var n={name:l,handleItemDefaults:e};E(a,r,n)};function e(t,a,r){function n(w,S){return v.coerce(t,a,k,w,S)}var o=n("source"),s=n("visible",!!o);if(!s)return a;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var c={_fullLayout:r},m=["x","y"],h=0;h<2;h++){var p=m[h],g=x.coerceRef(t,a,c,p,"paper",void 0);if(g!=="paper"){var i=x.getFromId(c,g);i._imgIndices.push(a._index)}x.coercePosition(a,c,n,g,p,0)}return a}}}),x4=Ee({"src/components/images/draw.js"(J,V){"use strict";var v=Hn(),x=yo(),E=uo(),k=Xl(),l=mh();V.exports=function(t){var a=t._fullLayout,r=[],n={},o=[],s,c;for(c=0;c0);m&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),v.noneOrAll(r,n,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),v.coerceFont(s,"font",o.font),s("bgcolor",o.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function a(r,n){function o(c,m){return v.coerce(r,n,e,c,m)}var s=o("visible",r.method==="skip"||Array.isArray(r.args));s&&(o("method"),o("args"),o("args2"),o("label"),o("execute"))}}}),M4=Ee({"src/components/updatemenus/scrollbox.js"(J,V){"use strict";V.exports=l;var v=Hn(),x=Qa(),E=yo(),k=Vr();function l(e,t,a){this.gd=e,this.container=t,this.id=a,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}l.barWidth=2,l.barLength=20,l.barRadius=2,l.barPad=1,l.barColor="#808BA4",l.prototype.enable=function(t,a,r){var n=this.gd._fullLayout,o=n.width,s=n.height;this.position=t;var c=this.position.l,m=this.position.w,h=this.position.t,p=this.position.h,g=this.position.direction,i=g==="down",w=g==="left",S=g==="right",M=g==="up",C=m,_=p,T,f,u,A;!i&&!w&&!S&&!M&&(this.position.direction="down",i=!0);var b=i||M;b?(T=c,f=T+C,i?(u=h,A=Math.min(u+_,s),_=A-u):(A=h+_,u=Math.max(A-_,0),_=A-u)):(u=h,A=u+_,w?(f=c+C,T=Math.max(f-C,0),C=f-T):(T=c,f=Math.min(T+C,o),C=f-T)),this._box={l:T,t:u,w:C,h:_};var z=m>C,I=l.barLength+2*l.barPad,N=l.barWidth+2*l.barPad,R=c,B=h+p;B+N>s&&(B=s-N);var F=this.container.selectAll("rect.scrollbar-horizontal").data(z?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-horizontal",!0).call(x.fill,l.barColor),z?(this.hbar=F.attr({rx:l.barRadius,ry:l.barRadius,x:R,y:B,width:I,height:N}),this._hbarXMin=R+I/2,this._hbarTranslateMax=C-I):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var P=p>_,j=l.barWidth+2*l.barPad,U=l.barLength+2*l.barPad,Z=c+m,Q=h;Z+j>o&&(Z=o-j);var re=this.container.selectAll("rect.scrollbar-vertical").data(P?[0]:[]);re.exit().on(".drag",null).remove(),re.enter().append("rect").classed("scrollbar-vertical",!0).call(x.fill,l.barColor),P?(this.vbar=re.attr({rx:l.barRadius,ry:l.barRadius,x:Z,y:Q,width:j,height:U}),this._vbarYMin=Q+U/2,this._vbarTranslateMax=_-U):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ae=this.id,oe=T-.5,H=P?f+j+.5:f+.5,X=u-.5,K=z?A+N+.5:A+.5,G=n._topdefs.selectAll("#"+ae).data(z||P?[0]:[]);if(G.exit().remove(),G.enter().append("clipPath").attr("id",ae).append("rect"),z||P?(this._clipRect=G.select("rect").attr({x:Math.floor(oe),y:Math.floor(X),width:Math.ceil(H)-Math.floor(oe),height:Math.ceil(K)-Math.floor(X)}),this.container.call(E.setClipUrl,ae,this.gd),this.bg.attr({x:c,y:h,width:m,height:p})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.setClipUrl,null),delete this._clipRect),z||P){var Y=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Y);var q=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault(),v.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));z&&this.hbar.on(".drag",null).call(q),P&&this.vbar.on(".drag",null).call(q)}this.setTranslate(a,r)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},l.prototype._onBoxDrag=function(){var t=this.translateX,a=this.translateY;this.hbar&&(t-=v.event.dx),this.vbar&&(a-=v.event.dy),this.setTranslate(t,a)},l.prototype._onBoxWheel=function(){var t=this.translateX,a=this.translateY;this.hbar&&(t+=v.event.deltaY),this.vbar&&(a+=v.event.deltaY),this.setTranslate(t,a)},l.prototype._onBarDrag=function(){var t=this.translateX,a=this.translateY;if(this.hbar){var r=t+this._hbarXMin,n=r+this._hbarTranslateMax,o=k.constrain(v.event.x,r,n),s=(o-r)/(n-r),c=this.position.w-this._box.w;t=s*c}if(this.vbar){var m=a+this._vbarYMin,h=m+this._vbarTranslateMax,p=k.constrain(v.event.y,m,h),g=(p-m)/(h-m),i=this.position.h-this._box.h;a=g*i}this.setTranslate(t,a)},l.prototype.setTranslate=function(t,a){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=k.constrain(t||0,0,r),a=k.constrain(a||0,0,n),this.translateX=t,this.translateY=a,this.container.call(E.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-a),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+a-.5)}),this.hbar){var o=t/r;this.hbar.call(E.setTranslate,t+o*this._hbarTranslateMax,a)}if(this.vbar){var s=a/n;this.vbar.call(E.setTranslate,t,a+s*this._vbarTranslateMax)}}}}),S4=Ee({"src/components/updatemenus/draw.js"(J,V){"use strict";var v=Hn(),x=vl(),E=Qa(),k=yo(),l=Vr(),e=Fs(),t=xs().arrayEditor,a=rc().LINE_SPACING,r=Jg(),n=M4();V.exports=function(I){var N=I._fullLayout,R=l.filterVisible(N[r.name]);function B(ae){x.autoMargin(I,u(ae))}var F=N._menulayer.selectAll("g."+r.containerClassName).data(R.length>0?[0]:[]);if(F.enter().append("g").classed(r.containerClassName,!0).style("cursor","pointer"),F.exit().each(function(){v.select(this).selectAll("g."+r.headerGroupClassName).each(B)}).remove(),R.length!==0){var P=F.selectAll("g."+r.headerGroupClassName).data(R,o);P.enter().append("g").classed(r.headerGroupClassName,!0);for(var j=l.ensureSingle(F,"g",r.dropdownButtonGroupClassName,function(ae){ae.style("pointer-events","all")}),U=0;U0?[0]:[]);Z.enter().append("g").classed(r.containerClassName,!0).style("cursor",P?null:"ew-resize");function Q(H){H._commandObserver&&(H._commandObserver.remove(),delete H._commandObserver),x.autoMargin(F,m(H))}if(Z.exit().each(function(){v.select(this).selectAll("g."+r.groupClassName).each(Q)}).remove(),U.length!==0){var re=Z.selectAll("g."+r.groupClassName).data(U,p);re.enter().append("g").classed(r.groupClassName,!0),re.exit().each(Q).remove();for(var ae=0;ae0&&(re=re.transition().duration(F.transition.duration).ease(F.transition.easing)),re.attr("transform",e(Q-r.gripWidth*.5,F._dims.currentValueTotalHeight))}}function z(B,F){var P=B._dims;return P.inputAreaStart+r.stepInset+(P.inputAreaLength-2*r.stepInset)*Math.min(1,Math.max(0,F))}function I(B,F){var P=B._dims;return Math.min(1,Math.max(0,(F-r.stepInset-P.inputAreaStart)/(P.inputAreaLength-2*r.stepInset-2*P.inputAreaStart)))}function N(B,F,P){var j=P._dims,U=l.ensureSingle(B,"rect",r.railTouchRectClass,function(Z){Z.call(f,F,B,P).style("pointer-events","all")});U.attr({width:j.inputAreaLength,height:Math.max(j.inputAreaWidth,r.tickOffset+P.ticklen+j.labelHeight)}).call(E.fill,P.bgcolor).attr("opacity",0),k.setTranslate(U,0,j.currentValueTotalHeight)}function R(B,F){var P=F._dims,j=P.inputAreaLength-r.railInset*2,U=l.ensureSingle(B,"rect",r.railRectClass);U.attr({width:j,height:r.railWidth,rx:r.railRadius,ry:r.railRadius,"shape-rendering":"crispEdges"}).call(E.stroke,F.bordercolor).call(E.fill,F.bgcolor).style("stroke-width",F.borderwidth+"px"),k.setTranslate(U,r.railInset,(P.inputAreaWidth-r.railWidth)*.5+P.currentValueTotalHeight)}}}),L4=Ee({"src/components/sliders/index.js"(J,V){"use strict";var v=J0();V.exports={moduleType:"component",name:v.name,layoutAttributes:px(),supplyLayoutDefaults:k4(),draw:C4()}}}),Qg=Ee({"src/components/rangeslider/attributes.js"(J,V){"use strict";var v=rs();V.exports={bgcolor:{valType:"color",dflt:v.background,editType:"plot"},bordercolor:{valType:"color",dflt:v.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}}}),mx=Ee({"src/components/rangeslider/oppaxis_attributes.js"(J,V){"use strict";V.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}}}),e1=Ee({"src/components/rangeslider/constants.js"(J,V){"use strict";V.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}}}),P4=Ee({"src/components/rangeslider/helpers.js"(J){"use strict";var V=Xl(),v=Fs(),x=e1(),E=rc().LINE_SPACING,k=x.name;function l(e){var t=e&&e[k];return t&&t.visible}J.isVisible=l,J.makeData=function(e){for(var t=V.list({_fullLayout:e},"x",!0),a=e.margin,r=[],n=0;n=qe.max)Ie=fe[Ue+1];else if(Me=qe.pmax)Ie=fe[Ue+1];else if(Me0?f.touches[0].clientX:0}function h(f,u,A,b){if(u._context.staticPlot)return;var z=f.select("rect."+c.slideBoxClassName).node(),I=f.select("rect."+c.grabAreaMinClassName).node(),N=f.select("rect."+c.grabAreaMaxClassName).node();function R(){var B=v.event,F=B.target,P=m(B),j=P-f.node().getBoundingClientRect().left,U=b.d2p(A._rl[0]),Z=b.d2p(A._rl[1]),Q=o.coverSlip();this.addEventListener("touchmove",re),this.addEventListener("touchend",ae),Q.addEventListener("mousemove",re),Q.addEventListener("mouseup",ae);function re(oe){var H=m(oe),X=+H-P,K,G,Y;switch(F){case z:if(Y="ew-resize",U+X>A._length||Z+X<0)return;K=U+X,G=Z+X;break;case I:if(Y="col-resize",U+X>A._length)return;K=U+X,G=Z;break;case N:if(Y="col-resize",Z+X<0)return;K=U,G=Z+X;break;default:Y="ew-resize",K=j,G=j+X;break}if(G0);if(w){var S=a(o,s,c);g("x",S[0]),g("y",S[1]),v.noneOrAll(n,o,["x","y"]),g("xanchor"),g("yanchor"),v.coerceFont(g,"font",s.font);var M=g("bgcolor");g("activecolor",x.contrast(M,e.lightAmount,e.darkAmount)),g("bordercolor"),g("borderwidth")}};function t(r,n,o,s){var c=s.calendar;function m(g,i){return v.coerce(r,n,l.buttons,g,i)}var h=m("visible");if(h){var p=m("step");p!=="all"&&(c&&c!=="gregorian"&&(p==="month"||p==="year")?n.stepmode="backward":m("stepmode"),m("count")),m("label")}}function a(r,n,o){for(var s=o.filter(function(p){return n[p].anchor===r._id}),c=0,m=0;m1)){delete c.grid;return}if(!g&&!i&&!w){var A=T("pattern")==="independent";A&&(g=!0)}_._hasSubplotGrid=g;var b=T("roworder"),z=b==="top to bottom",I=g?.2:.1,N=g?.3:.1,R,B;S&&c._splomGridDflt&&(R=c._splomGridDflt.xside,B=c._splomGridDflt.yside),_._domains={x:r("x",T,I,R,u),y:r("y",T,N,B,f,z)}}function r(s,c,m,h,p,g){var i=c(s+"gap",m),w=c("domain."+s);c(s+"side",h);for(var S=new Array(p),M=w[0],C=(w[1]-M)/(p-i),_=C*(1-i),T=0;T0,h=t._context.staticPlot;a.each(function(p){var g=p[0].trace,i=g.error_x||{},w=g.error_y||{},S;g.ids&&(S=function(T){return T.id});var M=k.hasMarkers(g)&&g.marker.maxdisplayed>0;!w.visible&&!i.visible&&(p=[]);var C=v.select(this).selectAll("g.errorbar").data(p,S);if(C.exit().remove(),!!p.length){i.visible||C.selectAll("path.xerror").remove(),w.visible||C.selectAll("path.yerror").remove(),C.style("opacity",1);var _=C.enter().append("g").classed("errorbar",!0);m&&_.style("opacity",0).transition().duration(n.duration).style("opacity",1),E.setClipUrl(C,r.layerClipId,t),C.each(function(T){var f=v.select(this),u=l(T,s,c);if(!(M&&!T.vis)){var A,b=f.select("path.yerror");if(w.visible&&x(u.x)&&x(u.yh)&&x(u.ys)){var z=w.width;A="M"+(u.x-z)+","+u.yh+"h"+2*z+"m-"+z+",0V"+u.ys,u.noYS||(A+="m-"+z+",0h"+2*z),o=!b.size(),o?b=f.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0):m&&(b=b.transition().duration(n.duration).ease(n.easing)),b.attr("d",A)}else b.remove();var I=f.select("path.xerror");if(i.visible&&x(u.y)&&x(u.xh)&&x(u.xs)){var N=(i.copy_ystyle?w:i).width;A="M"+u.xh+","+(u.y-N)+"v"+2*N+"m0,-"+N+"H"+u.xs,u.noXS||(A+="m0,-"+N+"v"+2*N),o=!I.size(),o?I=f.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0):m&&(I=I.transition().duration(n.duration).ease(n.easing)),I.attr("d",A)}else I.remove()}})}})};function l(e,t,a){var r={x:t.c2p(e.x),y:a.c2p(e.y)};return e.yh!==void 0&&(r.yh=a.c2p(e.yh),r.ys=a.c2p(e.ys),x(r.ys)||(r.noYS=!0,r.ys=a.c2p(e.ys,!0))),e.xh!==void 0&&(r.xh=t.c2p(e.xh),r.xs=t.c2p(e.xs),x(r.xs)||(r.noXS=!0,r.xs=t.c2p(e.xs,!0))),r}}}),V4=Ee({"src/components/errorbars/style.js"(J,V){"use strict";var v=Hn(),x=Qa();V.exports=function(k){k.each(function(l){var e=l[0].trace,t=e.error_y||{},a=e.error_x||{},r=v.select(this);r.selectAll("path.yerror").style("stroke-width",t.thickness+"px").call(x.stroke,t.color),a.copy_ystyle&&(a=t),r.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(x.stroke,a.color)})}}}),H4=Ee({"src/components/errorbars/index.js"(J,V){"use strict";var v=Vr(),x=El().overrideAll,E=_x(),k={error_x:v.extendFlat({},E),error_y:v.extendFlat({},E)};delete k.error_x.copy_zstyle,delete k.error_y.copy_zstyle,delete k.error_y.copy_ystyle;var l={error_x:v.extendFlat({},E),error_y:v.extendFlat({},E),error_z:v.extendFlat({},E)};delete l.error_x.copy_ystyle,delete l.error_y.copy_ystyle,delete l.error_z.copy_ystyle,delete l.error_z.copy_zstyle,V.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:k,bar:k,histogram:k,scatter3d:x(l,"calc","nested"),scattergl:x(k,"calc","nested")}},supplyDefaults:j4(),calc:U4(),makeComputeError:bx(),plot:q4(),style:V4(),hoverInfo:e};function e(t,a,r){(a.error_y||{}).visible&&(r.yerr=t.yh-t.y,a.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(a.error_x||{}).visible&&(r.xerr=t.xh-t.x,a.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}}),G4=Ee({"src/components/colorbar/constants.js"(J,V){"use strict";V.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}}),W4=Ee({"src/components/colorbar/draw.js"(J,V){"use strict";var v=Hn(),x=vl(),E=Ri(),k=uo(),l=qf(),e=Vr(),t=e.strTranslate,a=vo().extendFlat,r=Dh(),n=yo(),o=Qa(),s=Lv(),c=Fs(),m=cf().flipScale,h=K0(),p=$g(),g=Gc(),i=rc(),w=i.LINE_SPACING,S=i.FROM_TL,M=i.FROM_BR,C=G4().cn;function _(N){var R=N._fullLayout,B=R._infolayer.selectAll("g."+C.colorbar).data(T(N),function(F){return F._id});B.enter().append("g").attr("class",function(F){return F._id}).classed(C.colorbar,!0),B.each(function(F){var P=v.select(this);e.ensureSingle(P,"rect",C.cbbg),e.ensureSingle(P,"g",C.cbfills),e.ensureSingle(P,"g",C.cblines),e.ensureSingle(P,"g",C.cbaxis,function(U){U.classed(C.crisp,!0)}),e.ensureSingle(P,"g",C.cbtitleunshift,function(U){U.append("g").classed(C.cbtitle,!0)}),e.ensureSingle(P,"rect",C.cboutline);var j=A(P,F,N);j&&j.then&&(N._promises||[]).push(j),N._context.edits.colorbarPosition&&b(P,F,N)}),B.exit().each(function(F){x.autoMargin(N,F._id)}).remove(),B.order()}function T(N){var R=N._fullLayout,B=N.calcdata,F=[],P,j,U,Z;function Q(ee){return a(ee,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function re(){typeof Z.calc=="function"?Z.calc(N,U,P):(P._fillgradient=j.reversescale?m(j.colorscale):j.colorscale,P._zrange=[j[Z.min],j[Z.max]])}for(var ae=0;ae[Math.min(N[0]+R,N[1]),N[1]],u=(N,R)=>[N[0],Math.max(N[1]-R,N[0])];function A(N,R,B){var F=R.orientation==="v",P=R.len,j=R.lenmode,U=R.thickness,Z=R.thicknessmode,Q=R.outlinewidth,re=R.borderwidth,ae=R.bgcolor,oe=R.xanchor,H=R.yanchor,X=R.xpad,K=R.ypad,G=R.x,Y=F?R.y:1-R.y,q=R.yref==="paper",$=R.xref==="paper",ee=B._fullLayout,ne=ee._size,fe=R._fillcolor,ye=R._line,xe=R.title,Ae=xe.side,Me=R._zrange||v.extent((typeof fe=="function"?fe:ye.color).domain()),Ie=typeof ye.color=="function"?ye.color:function(){return ye.color},Ue=typeof fe=="function"?fe:function(){return fe},qe=R._levels,ke=z(B,R,Me),ge=ke.fill,ue=ke.line,ve=Math.round(U*(Z==="fraction"?F?ne.w:ne.h:1)),se=ve/(F?ne.w:ne.h),Te=Math.round(P*(j==="fraction"?F?ne.h:ne.w:1)),Fe=Te/(F?ne.h:ne.w),We=$?ne.w:B._fullLayout.width,Ge=q?ne.h:B._fullLayout.height,gt=Math.round(F?G*We+X:Y*Ge+K),mt={center:.5,right:1}[oe]||0,Tt={top:1,middle:.5}[H]||0,At=F?G-mt*se:Y-Tt*se,Kt=F?Y-Tt*Fe:G-mt*Fe,nr=Math.round(F?Ge*(1-Kt):We*Kt);R._lenFrac=Fe,R._thickFrac=se,R._uFrac=At,R._vFrac=Kt;var _r=R._axis=I(B,R,Me);_r.position=se+(F?G+X/ne.w:Y+K/ne.h);var Zt=["top","bottom"].indexOf(Ae)!==-1;if(F&&Zt&&(_r.title.side=Ae,_r.titlex=G+X/ne.w,_r.titley=Kt+(xe.side==="top"?Fe-K/ne.h:K/ne.h)),!F&&!Zt&&(_r.title.side=Ae,_r.titley=Y+K/ne.h,_r.titlex=Kt+X/ne.w),ye.color&&R.tickmode==="auto"){_r.tickmode="linear",_r.tick0=qe.start;var sr=qe.size,Ot=e.constrain(Te/50,4,15)+1,vt=(Me[1]-Me[0])/((R.nticks||Ot)*sr);if(vt>1){var ht=Math.pow(10,Math.floor(Math.log(vt)/Math.LN10));sr*=ht*e.roundUp(vt/ht,[2,5,10]),(Math.abs(qe.start)/qe.size+1e-6)%1<2e-6&&(_r.tick0=0)}_r.dtick=sr}var Re=F?K/ne.h:X/ne.w;_r.domain=u(f([Kt,Kt+Fe],Re),Re),_r.setScale(),N.attr("transform",t(Math.round(ne.l),Math.round(ne.t)));var Be=N.select("."+C.cbtitleunshift).attr("transform",t(-Math.round(ne.l),-Math.round(ne.t))),He=_r.ticklabelposition,$e=_r.title.font.size,Ze=N.select("."+C.cbaxis),Je,Mt=0,dt=0;function Dt(Sr,on){var $t={propContainer:_r,propName:R._propPrefix+"title.text",traceIndex:R._traceIndex,_meta:R._meta,placeholder:ee._dfltTitle.colorbar,containerGroup:N.select("."+C.cbtitle)},It=Sr.charAt(0)==="h"?Sr.slice(1):"h"+Sr;N.selectAll("."+It+",."+It+"-math-group").remove(),s.draw(B,Sr,a($t,on||{}))}function Ct(){if(F&&Zt||!F&&!Zt){var Sr,on;Ae==="top"&&(Sr=X+ne.l+We*G,on=K+ne.t+Ge*(1-Kt-Fe)+3+$e*.75),Ae==="bottom"&&(Sr=X+ne.l+We*G,on=K+ne.t+Ge*(1-Kt)-3-$e*.25),Ae==="right"&&(on=K+ne.t+Ge*Y+3+$e*.75,Sr=X+ne.l+We*Kt),Dt(_r._id+"title",{attributes:{x:Sr,y:on,"text-anchor":F?"start":"middle"}})}}function Vt(){if(F&&!Zt||!F&&Zt){var Sr=_r.position||0,on=_r._offset+_r._length/2,$t,It;if(Ae==="right")It=on,$t=ne.l+We*Sr+10+$e*(_r.showticklabels?1:.5);else if($t=on,Ae==="bottom"&&(It=ne.t+Ge*Sr+10+(He.indexOf("inside")===-1?_r.tickfont.size:0)+(_r.ticks!=="inside"&&R.ticklen||0)),Ae==="top"){var ir=xe.text.split("
").length;It=ne.t+Ge*Sr+10-ve-w*$e*ir}Dt((F?"h":"v")+_r._id+"title",{avoid:{selection:v.select(B).selectAll("g."+_r._id+"tick"),side:Ae,offsetTop:F?0:ne.t,offsetLeft:F?ne.l:0,maxShift:F?ee.width:ee.height},attributes:{x:$t,y:It,"text-anchor":"middle"},transform:{rotate:F?-90:0,offset:0}})}}function Ht(){if(!F&&!Zt||F&&Zt){var Sr=N.select("."+C.cbtitle),on=Sr.select("text"),$t=[-Q/2,Q/2],It=Sr.select(".h"+_r._id+"title-math-group").node(),ir=15.6;on.node()&&(ir=parseInt(on.node().style.fontSize,10)*w);var cr;if(It?(cr=n.bBox(It),dt=cr.width,Mt=cr.height,Mt>ir&&($t[1]-=(Mt-ir)/2)):on.node()&&!on.classed(C.jsPlaceholder)&&(cr=n.bBox(on.node()),dt=cr.width,Mt=cr.height),F){if(Mt){if(Mt+=5,Ae==="top")_r.domain=u(_r.domain,Mt/ne.h),$t[1]*=-1;else{_r.domain=f(_r.domain,Mt/ne.h);var fr=c.lineCount(on);$t[1]+=(1-fr)*ir}Sr.attr("transform",t($t[0],$t[1])),_r.setScale()}}else dt&&(Ae==="right"&&(_r.domain=f(_r.domain,(dt+$e/2)/ne.w)),Sr.attr("transform",t($t[0],$t[1])),_r.setScale())}N.selectAll("."+C.cbfills+",."+C.cblines).attr("transform",F?t(0,Math.round(ne.h*(1-_r.domain[1]))):t(Math.round(ne.w*_r.domain[0]),0)),Ze.attr("transform",F?t(0,Math.round(-ne.t)):t(Math.round(-ne.l),0));var Ir=N.select("."+C.cbfills).selectAll("rect."+C.cbfill).attr("style","").data(ge);Ir.enter().append("rect").classed(C.cbfill,!0).attr("style",""),Ir.exit().remove();var ln=Me.map(_r.c2p).map(Math.round).sort(function(Aa,ua){return Aa-ua});Ir.each(function(Aa,ua){var Qn=[ua===0?Me[0]:(ge[ua]+ge[ua-1])/2,ua===ge.length-1?Me[1]:(ge[ua]+ge[ua+1])/2].map(_r.c2p).map(Math.round);F&&(Qn[1]=e.constrain(Qn[1]+(Qn[1]>Qn[0])?1:-1,ln[0],ln[1]));var ei=v.select(this).attr(F?"x":"y",gt).attr(F?"y":"x",v.min(Qn)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(v.max(Qn)-v.min(Qn),2));if(R._fillgradient)n.gradient(ei,B,R._id,F?"vertical":"horizontalreversed",R._fillgradient,"fill");else{var Fa=Ue(Aa).replace("e-","");ei.attr("fill",o.hexString(Fa))}});var nn=N.select("."+C.cblines).selectAll("path."+C.cbline).data(ye.color&&ye.width?ue:[]);nn.enter().append("path").classed(C.cbline,!0),nn.exit().remove(),nn.each(function(Aa){var ua=gt,Qn=Math.round(_r.c2p(Aa))+ye.width/2%1;v.select(this).attr("d","M"+(F?ua+","+Qn:Qn+","+ua)+(F?"h":"v")+ve).call(n.lineGroupStyle,ye.width,Ie(Aa),ye.dash)}),Ze.selectAll("g."+_r._id+"tick,path").remove();var wn=gt+ve+(Q||0)/2-(R.ticks==="outside"?1:0),Un=k.calcTicks(_r),jn=k.getTickSigns(_r)[2];return k.drawTicks(B,_r,{vals:_r.ticks==="inside"?k.clipEnds(_r,Un):Un,layer:Ze,path:k.makeTickPath(_r,wn,jn),transFn:k.makeTransTickFn(_r)}),k.drawLabels(B,_r,{vals:Un,layer:Ze,transFn:k.makeTransTickLabelFn(_r),labelFns:k.makeLabelFns(_r,wn)})}function Wt(){var Sr,on=ve+Q/2;He.indexOf("inside")===-1&&(Sr=n.bBox(Ze.node()),on+=F?Sr.width:Sr.height),Je=Be.select("text");var $t=0,It=F&&Ae==="top",ir=!F&&Ae==="right",cr=0;if(Je.node()&&!Je.classed(C.jsPlaceholder)){var fr,Ir=Be.select(".h"+_r._id+"title-math-group").node();Ir&&(F&&Zt||!F&&!Zt)?(Sr=n.bBox(Ir),$t=Sr.width,fr=Sr.height):(Sr=n.bBox(Be.node()),$t=Sr.right-ne.l-(F?gt:nr),fr=Sr.bottom-ne.t-(F?nr:gt),!F&&Ae==="top"&&(on+=Sr.height,cr=Sr.height)),ir&&(Je.attr("transform",t($t/2+$e/2,0)),$t*=2),on=Math.max(on,F?$t:fr)}var ln=(F?X:K)*2+on+re+Q/2,nn=0;!F&&xe.text&&H==="bottom"&&Y<=0&&(nn=ln/2,ln+=nn,cr+=nn),ee._hColorbarMoveTitle=nn,ee._hColorbarMoveCBTitle=cr;var wn=re+Q,Un=(F?gt:nr)-wn/2-(F?X:0),jn=(F?nr:gt)-(F?Te:K+cr-nn);N.select("."+C.cbbg).attr("x",Un).attr("y",jn).attr(F?"width":"height",Math.max(ln-nn,2)).attr(F?"height":"width",Math.max(Te+wn,2)).call(o.fill,ae).call(o.stroke,R.bordercolor).style("stroke-width",re);var Aa=ir?Math.max($t-10,0):0;N.selectAll("."+C.cboutline).attr("x",(F?gt:nr+X)+Aa).attr("y",(F?nr+K-Te:gt)+(It?Mt:0)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(Te-(F?2*K+Mt:2*X+Aa),2)).call(o.stroke,R.outlinecolor).style({fill:"none","stroke-width":Q});var ua=F?mt*ln:0,Qn=F?0:(1-Tt)*ln-cr;if(ua=$?ne.l-ua:-ua,Qn=q?ne.t-Qn:-Qn,N.attr("transform",t(ua,Qn)),!F&&(re||o.opacity(ae)&&!o.equals(ee.paper_bgcolor,ae))){var ei=Ze.selectAll("text"),Fa=ei[0].length,ai=N.select("."+C.cbbg).node(),Mi=n.bBox(ai),ci=n.getTranslate(N),ba=2;ei.each(function(Tr,Rr){var Fr=0,at=Fa-1;if(Rr===Fr||Rr===at){var kt=n.bBox(this),Ut=n.getTranslate(this),ar;if(Rr===at){var Er=kt.right+Ut.x,br=Mi.right+ci.x+nr-re-ba+G;ar=br-Er,ar>0&&(ar=0)}else if(Rr===Fr){var Or=kt.left+Ut.x,Pr=Mi.left+ci.x+nr+re+ba;ar=Pr-Or,ar<0&&(ar=0)}ar&&(Fa<3?this.setAttribute("transform","translate("+ar+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var pa={},Ii=S[oe],ho=M[oe],da=S[H],Kn=M[H],ot=ln-ve;F?(j==="pixels"?(pa.y=Y,pa.t=Te*da,pa.b=Te*Kn):(pa.t=pa.b=0,pa.yt=Y+P*da,pa.yb=Y-P*Kn),Z==="pixels"?(pa.x=G,pa.l=ln*Ii,pa.r=ln*ho):(pa.l=ot*Ii,pa.r=ot*ho,pa.xl=G-U*Ii,pa.xr=G+U*ho)):(j==="pixels"?(pa.x=G,pa.l=Te*Ii,pa.r=Te*ho):(pa.l=pa.r=0,pa.xl=G+P*Ii,pa.xr=G-P*ho),Z==="pixels"?(pa.y=1-Y,pa.t=ln*da,pa.b=ln*Kn):(pa.t=ot*da,pa.b=ot*Kn,pa.yt=Y-U*da,pa.yb=Y+U*Kn));var et=R.y<.5?"b":"t",hr=R.x<.5?"l":"r";B._fullLayout._reservedMargin[R._id]={};var ur={r:ee.width-Un-ua,l:Un+pa.r,b:ee.height-jn-Qn,t:jn+pa.b};$&&q?x.autoMargin(B,R._id,pa):$?B._fullLayout._reservedMargin[R._id][et]=ur[et]:q||F?B._fullLayout._reservedMargin[R._id][hr]=ur[hr]:B._fullLayout._reservedMargin[R._id][et]=ur[et]}return e.syncOrAsync([x.previousPromises,Ct,Ht,Vt,x.previousPromises,Wt],B)}function b(N,R,B){var F=R.orientation==="v",P=B._fullLayout,j=P._size,U,Z,Q;l.init({element:N.node(),gd:B,prepFn:function(){U=N.attr("transform"),r(N)},moveFn:function(re,ae){N.attr("transform",U+t(re,ae)),Z=l.align((F?R._uFrac:R._vFrac)+re/j.w,F?R._thickFrac:R._lenFrac,0,1,R.xanchor),Q=l.align((F?R._vFrac:1-R._uFrac)-ae/j.h,F?R._lenFrac:R._thickFrac,0,1,R.yanchor);var oe=l.getCursor(Z,Q,R.xanchor,R.yanchor);r(N,oe)},doneFn:function(){if(r(N),Z!==void 0&&Q!==void 0){var re={};re[R._propPrefix+"x"]=Z,re[R._propPrefix+"y"]=Q,R._traceIndex!==void 0?E.call("_guiRestyle",B,re,R._traceIndex):E.call("_guiRelayout",B,re)}}})}function z(N,R,B){var F=R._levels,P=[],j=[],U,Z,Q=F.end+F.size/100,re=F.size,ae=1.001*B[0]-.001*B[1],oe=1.001*B[1]-.001*B[0];for(Z=0;Z<1e5&&(U=F.start+Z*re,!(re>0?U>=Q:U<=Q));Z++)U>ae&&U0?U>=Q:U<=Q));Z++)U>B[0]&&U-1}V.exports=function(a,r){var n,o=a.data,s=a.layout,c=k([],o),m=k({},s,l(r.tileClass)),h=a._context||{};if(r.width&&(m.width=r.width),r.height&&(m.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){m.annotations=[];var p=Object.keys(m);for(n=0;n=0)return h}else if(typeof h=="string"&&(h=h.trim(),h.slice(-1)==="%"&&v(h.slice(0,-1))&&(h=+h.slice(0,-1),h>=0)))return h+"%"}function m(h,p,g,i,w,S){S=S||{};var M=S.moduleHasSelected!==!1,C=S.moduleHasUnselected!==!1,_=S.moduleHasConstrain!==!1,T=S.moduleHasCliponaxis!==!1,f=S.moduleHasTextangle!==!1,u=S.moduleHasInsideanchor!==!1,A=!!S.hasPathbar,b=Array.isArray(w)||w==="auto",z=b||w==="inside",I=b||w==="outside";if(z||I){var N=n(i,"textfont",g.font),R=x.extendFlat({},N),B=h.textfont&&h.textfont.color,F=!B;if(F&&delete R.color,n(i,"insidetextfont",R),A){var P=x.extendFlat({},N);F&&delete P.color,n(i,"pathbar.textfont",P)}I&&n(i,"outsidetextfont",N),M&&i("selected.textfont.color"),C&&i("unselected.textfont.color"),_&&i("constraintext"),T&&i("cliponaxis"),f&&i("textangle"),i("texttemplate"),i("texttemplatefallback")}z&&u&&i("insidetextanchor")}V.exports={supplyDefaults:o,crossTraceDefaults:s,handleText:m,validateCornerradius:c}}}),wx=Ee({"src/traces/bar/layout_defaults.js"(J,V){"use strict";var v=Ri(),x=uo(),E=Vr(),k=r1(),l=fh().validateCornerradius;V.exports=function(e,t,a){function r(M,C){return E.coerce(e,t,k,M,C)}for(var n=!1,o=!1,s=!1,c={},m=r("barmode"),h=m==="group",p=0;p0&&!c[i]&&(s=!0),c[i]=!0),g.visible&&g.type==="histogram"){var w=x.getFromId({_fullLayout:t},g[g.orientation==="v"?"xaxis":"yaxis"]);w.type!=="category"&&(o=!0)}}if(!n){delete t.barmode;return}m!=="overlay"&&r("barnorm"),r("bargap",o&&!s?0:.2),r("bargroupgap");var S=r("barcornerradius");t.barcornerradius=l(S)}}}),Q0=Ee({"src/traces/bar/arrays_to_calcdata.js"(J,V){"use strict";var v=Vr();V.exports=function(E,k){for(var l=0;lt;if(!a)return k}return l!==void 0?l:E.dflt},J.coerceColor=function(E,k,l){return V.isValid(k)?k:l!==void 0?l:E.dflt},J.coerceEnumerated=function(E,k,l){return E.coerceNumber&&(k=+k),E.values.indexOf(k)!==-1?k:l!==void 0?l:E.dflt},J.getValue=function(E,k){var l;return x(E)?k1||A.bargap===0&&A.bargroupgap===0&&!b[0].trace.marker.line.width)&&v.select(this).attr("shape-rendering","crispEdges")}),f.selectAll("g.points").each(function(b){var z=v.select(this),I=b[0].trace;c(z,I,T)}),l.getComponentMethod("errorbars","style")(f)}function c(T,f,u){E.pointStyle(T.selectAll("path"),f,u),m(T,f,u)}function m(T,f,u){T.selectAll("text").each(function(A){var b=v.select(this),z=k.ensureUniformFontSize(u,i(b,A,f,u));E.font(b,z)})}function h(T,f,u){var A=f[0].trace;A.selectedpoints?p(u,A,T):(c(u,A,T),l.getComponentMethod("errorbars","style")(u))}function p(T,f,u){E.selectedPointStyle(T.selectAll("path"),f),g(T.selectAll("text"),f,u)}function g(T,f,u){T.each(function(A){var b=v.select(this),z;if(A.selected){z=k.ensureUniformFontSize(u,i(b,A,f,u));var I=f.selected.textfont&&f.selected.textfont.color;I&&(z.color=I),E.font(b,z)}else E.selectedTextStyle(b,f)})}function i(T,f,u,A){var b=A._fullLayout.font,z=u.textfont;if(T.classed("bartext-inside")){var I=_(f,u);z=S(u,f.i,b,I)}else T.classed("bartext-outside")&&(z=M(u,f.i,b));return z}function w(T,f,u){return C(a,T.textfont,f,u)}function S(T,f,u,A){var b=w(T,f,u),z=T._input.textfont===void 0||T._input.textfont.color===void 0||Array.isArray(T.textfont.color)&&T.textfont.color[f]===void 0;return z&&(b={color:x.contrast(A),family:b.family,size:b.size,weight:b.weight,style:b.style,variant:b.variant,textcase:b.textcase,lineposition:b.lineposition,shadow:b.shadow}),C(r,T.insidetextfont,f,b)}function M(T,f,u){var A=w(T,f,u);return C(n,T.outsidetextfont,f,A)}function C(T,f,u,A){f=f||{};var b=o.getValue(f.family,u),z=o.getValue(f.size,u),I=o.getValue(f.color,u),N=o.getValue(f.weight,u),R=o.getValue(f.style,u),B=o.getValue(f.variant,u),F=o.getValue(f.textcase,u),P=o.getValue(f.lineposition,u),j=o.getValue(f.shadow,u);return{family:o.coerceString(T.family,b,A.family),size:o.coerceNumber(T.size,z,A.size),color:o.coerceColor(T.color,I,A.color),weight:o.coerceString(T.weight,N,A.weight),style:o.coerceString(T.style,R,A.style),variant:o.coerceString(T.variant,B,A.variant),textcase:o.coerceString(T.variant,F,A.textcase),lineposition:o.coerceString(T.variant,P,A.lineposition),shadow:o.coerceString(T.variant,j,A.shadow)}}function _(T,f){return f.type==="waterfall"?f[T.dir].marker.color:T.mcc||T.mc||f.marker.color}V.exports={style:s,styleTextPoints:m,styleOnSelect:h,getInsideTextFont:S,getOutsideTextFont:M,getBarColor:_,resizeText:e}}}),zv=Ee({"src/traces/bar/plot.js"(J,V){"use strict";var v=Hn(),x=mi(),E=Vr(),k=Fs(),l=Qa(),e=yo(),t=Ri(),a=uo().tickText,r=Ef(),n=r.recordMinTextSize,o=r.clearMinTextSize,s=bh(),c=a1(),m=Jd(),h=Zh(),p=h.text,g=h.textposition,i=Qf().appendArrayPointValue,w=m.TEXTPAD;function S(re){return re.id}function M(re){if(re.ids)return S}function C(re){return(re>0)-(re<0)}function _(re,ae){return re0}function A(re,ae,oe,H,X,K){var G=ae.xaxis,Y=ae.yaxis,q=re._fullLayout,$=re._context.staticPlot;X||(X={mode:q.barmode,norm:q.barmode,gap:q.bargap,groupgap:q.bargroupgap},o("bar",q));var ee=E.makeTraceGroups(H,oe,"trace bars").each(function(ne){var fe=v.select(this),ye=ne[0].trace,xe=ne[0].t,Ae=ye.type==="waterfall",Me=ye.type==="funnel",Ie=ye.type==="histogram",Ue=ye.type==="bar",qe=Ue||Me,ke=0;Ae&&ye.connector.visible&&ye.connector.mode==="between"&&(ke=ye.connector.line.width/2);var ge=ye.orientation==="h",ue=u(X),ve=E.ensureSingle(fe,"g","points"),se=M(ye),Te=ve.selectAll("g.point").data(E.identity,se);Te.enter().append("g").classed("point",!0),Te.exit().remove(),Te.each(function(We,Ge){var gt=v.select(this),mt=T(We,G,Y,ge),Tt=mt[0][0],At=mt[0][1],Kt=mt[1][0],nr=mt[1][1],_r=(ge?At-Tt:nr-Kt)===0;_r&&qe&&c.getLineWidth(ye,We)&&(_r=!1),_r||(_r=!x(Tt)||!x(At)||!x(Kt)||!x(nr)),We.isBlank=_r,_r&&(ge?At=Tt:nr=Kt),ke&&!_r&&(ge?(Tt-=_(Tt,At)*ke,At+=_(Tt,At)*ke):(Kt-=_(Kt,nr)*ke,nr+=_(Kt,nr)*ke));var Zt,sr;if(ye.type==="waterfall"){if(!_r){var Ot=ye[We.dir].marker;Zt=Ot.line.width,sr=Ot.color}}else Zt=c.getLineWidth(ye,We),sr=We.mc||ye.marker.color;function vt(nn){var wn=v.round(Zt/2%1,2);return X.gap===0&&X.groupgap===0?v.round(Math.round(nn)-wn,2):nn}function ht(nn,wn,Un){return Un&&nn===wn?nn:Math.abs(nn-wn)>=2?vt(nn):nn>wn?Math.ceil(nn):Math.floor(nn)}var Re=l.opacity(sr),Be=Re<1||Zt>.01?vt:ht;re._context.staticPlot||(Tt=Be(Tt,At,ge),At=Be(At,Tt,ge),Kt=Be(Kt,nr,!ge),nr=Be(nr,Kt,!ge));var He=ge?G.c2p:Y.c2p,$e;We.s0>0?$e=We._sMax:We.s0<0?$e=We._sMin:$e=We.s1>0?We._sMax:We._sMin;function Ze(nn,wn){if(!nn)return 0;var Un=Math.abs(ge?nr-Kt:At-Tt),jn=Math.abs(ge?At-Tt:nr-Kt),Aa=Be(Math.abs(He($e,!0)-He(0,!0))),ua=We.hasB?Math.min(Un/2,jn/2):Math.min(Un/2,Aa),Qn;if(wn==="%"){var ei=Math.min(50,nn);Qn=Un*(ei/100)}else Qn=nn;return Be(Math.max(Math.min(Qn,ua),0))}var Je=Ue||Ie?Ze(xe.cornerradiusvalue,xe.cornerradiusform):0,Mt,dt,Dt="M"+Tt+","+Kt+"V"+nr+"H"+At+"V"+Kt+"Z",Ct=0;if(Je&&We.s){var Vt=C(We.s0)===0||C(We.s)===C(We.s0)?We.s1:We.s0;if(Ct=Be(We.hasB?0:Math.abs(He($e,!0)-He(Vt,!0))),Ct0?Math.sqrt(Ct*(2*Je-Ct)):0,It=Ht>0?Math.max:Math.min;Mt="M"+Tt+","+Kt+"V"+(nr-on*Wt)+"H"+It(At-(Je-Ct)*Ht,Tt)+"A "+Je+","+Je+" 0 0 "+Sr+" "+At+","+(nr-Je*Wt-$t)+"V"+(Kt+Je*Wt+$t)+"A "+Je+","+Je+" 0 0 "+Sr+" "+It(At-(Je-Ct)*Ht,Tt)+","+(Kt+on*Wt)+"Z"}else if(We.hasB)Mt="M"+(Tt+Je*Ht)+","+Kt+"A "+Je+","+Je+" 0 0 "+Sr+" "+Tt+","+(Kt+Je*Wt)+"V"+(nr-Je*Wt)+"A "+Je+","+Je+" 0 0 "+Sr+" "+(Tt+Je*Ht)+","+nr+"H"+(At-Je*Ht)+"A "+Je+","+Je+" 0 0 "+Sr+" "+At+","+(nr-Je*Wt)+"V"+(Kt+Je*Wt)+"A "+Je+","+Je+" 0 0 "+Sr+" "+(At-Je*Ht)+","+Kt+"Z";else{dt=Math.abs(nr-Kt)+Ct;var ir=dt0?Math.sqrt(Ct*(2*Je-Ct)):0,fr=Wt>0?Math.max:Math.min;Mt="M"+(Tt+ir*Ht)+","+Kt+"V"+fr(nr-(Je-Ct)*Wt,Kt)+"A "+Je+","+Je+" 0 0 "+Sr+" "+(Tt+Je*Ht-cr)+","+nr+"H"+(At-Je*Ht+cr)+"A "+Je+","+Je+" 0 0 "+Sr+" "+(At-ir*Ht)+","+fr(nr-(Je-Ct)*Wt,Kt)+"V"+Kt+"Z"}}else Mt=Dt}else Mt=Dt;var Ir=f(E.ensureSingle(gt,"path"),q,X,K);if(Ir.style("vector-effect",$?"none":"non-scaling-stroke").attr("d",isNaN((At-Tt)*(nr-Kt))||_r&&re._context.staticPlot?"M0,0Z":Mt).call(e.setClipUrl,ae.layerClipId,re),!q.uniformtext.mode&&ue){var ln=e.makePointStyleFns(ye);e.singlePointStyle(We,Ir,ye,ln,re)}b(re,ae,gt,ne,Ge,Tt,At,Kt,nr,Je,Ct,X,K),ae.layerClipId&&e.hideOutsideRangePoint(We,gt.select("text"),G,Y,ye.xcalendar,ye.ycalendar)});var Fe=ye.cliponaxis===!1;e.setClipUrl(fe,Fe?null:ae.layerClipId,re)});t.getComponentMethod("errorbars","plot")(re,ee,ae,X)}function b(re,ae,oe,H,X,K,G,Y,q,$,ee,ne,fe){var ye=ae.xaxis,xe=ae.yaxis,Ae=re._fullLayout,Me;function Ie(Dt,Ct,Vt){var Ht=E.ensureSingle(Dt,"text").text(Ct).attr({class:"bartext bartext-"+Me,"text-anchor":"middle","data-notex":1}).call(e.font,Vt).call(k.convertToTspans,re);return Ht}var Ue=H[0].trace,qe=Ue.orientation==="h",ke=U(H,qe,ye,xe),ge=P(Ae,H,X,ye,xe);Me=j(Ue,X);var ue=ne.mode==="stack"||ne.mode==="relative",ve=H[X],se=!ue||ve._outmost,Te=ve.hasB,Fe=$&&$-ee>w;if(!ge||Me==="none"||(ve.isBlank||K===G||Y===q)&&(Me==="auto"||Me==="inside")){oe.select("text").remove();return}var We=Ae.font,Ge=s.getBarColor(H[X],Ue),gt=s.getInsideTextFont(Ue,X,We,Ge),mt=s.getOutsideTextFont(Ue,X,We),Tt=Ue.insidetextanchor||"end",At=oe.datum();qe?ye.type==="log"&&At.s0<=0&&(ye.range[0]0&&ht>0,He;Fe?Te?He=z(_r-2*$,Zt,vt,ht,qe)||z(_r,Zt-2*$,vt,ht,qe):qe?He=z(_r-($-ee),Zt,vt,ht,qe)||z(_r,Zt-2*($-ee),vt,ht,qe):He=z(_r,Zt-($-ee),vt,ht,qe)||z(_r-2*($-ee),Zt,vt,ht,qe):He=z(_r,Zt,vt,ht,qe),Be&&He?Me="inside":(Me="outside",sr.remove(),sr=null)}else Me="inside";if(!sr){Re=E.ensureUniformFontSize(re,Me==="outside"?mt:gt),sr=Ie(oe,ge,Re);var $e=sr.attr("transform");if(sr.attr("transform",""),Ot=e.bBox(sr.node()),vt=Ot.width,ht=Ot.height,sr.attr("transform",$e),vt<=0||ht<=0){sr.remove();return}}var Ze=Ue.textangle,Je,Mt;Me==="outside"?(Mt=Ue.constraintext==="both"||Ue.constraintext==="outside",Je=F(K,G,Y,q,Ot,{isHorizontal:qe,constrained:Mt,angle:Ze,zeroBarDir:ke})):(Mt=Ue.constraintext==="both"||Ue.constraintext==="inside",Je=R(K,G,Y,q,Ot,{isHorizontal:qe,constrained:Mt,angle:Ze,anchor:Tt,hasB:Te,r:$,overhead:ee})),Je.fontSize=Re.size,n(Ue.type==="histogram"?"bar":Ue.type,Je,Ae),ve.transform=Je;var dt=f(sr,Ae,ne,fe);E.setTransormAndDisplay(dt,Je)}function z(re,ae,oe,H,X){if(re<0||ae<0)return!1;var K=oe<=re&&H<=ae,G=oe<=ae&&H<=re,Y=X?re>=oe*(ae/H):ae>=H*(re/oe);return K||G||Y}function I(re){return re==="auto"?0:re}function N(re,ae){var oe=Math.PI/180*ae,H=Math.abs(Math.sin(oe)),X=Math.abs(Math.cos(oe));return{x:re.width*X+re.height*H,y:re.width*H+re.height*X}}function R(re,ae,oe,H,X,K){var G=!!K.isHorizontal,Y=!!K.constrained,q=K.angle||0,$=K.anchor,ee=$==="end",ne=$==="start",fe=K.leftToRight||0,ye=(fe+1)/2,xe=1-ye,Ae=K.hasB,Me=K.r,Ie=K.overhead,Ue=X.width,qe=X.height,ke=Math.abs(ae-re),ge=Math.abs(H-oe),ue=ke>2*w&&ge>2*w?w:0;ke-=2*ue,ge-=2*ue;var ve=I(q);q==="auto"&&!(Ue<=ke&&qe<=ge)&&(Ue>ke||qe>ge)&&(!(Ue>ge||qe>ke)||Uew){var We=B(re,ae,oe,H,se,Me,Ie,G,Ae);Te=We.scale,Fe=We.pad}else Te=1,Y&&(Te=Math.min(1,ke/se.x,ge/se.y)),Fe=0;var Ge=X.left*xe+X.right*ye,gt=(X.top+X.bottom)/2,mt=(re+w)*xe+(ae-w)*ye,Tt=(oe+H)/2,At=0,Kt=0;if(ne||ee){var nr=(G?se.x:se.y)/2;Me&&(ee||Ae)&&(ue+=Fe);var _r=G?_(re,ae):_(oe,H);G?ne?(mt=re+_r*ue,At=-_r*nr):(mt=ae-_r*ue,At=_r*nr):ne?(Tt=oe+_r*ue,Kt=-_r*nr):(Tt=H-_r*ue,Kt=_r*nr)}return{textX:Ge,textY:gt,targetX:mt,targetY:Tt,anchorX:At,anchorY:Kt,scale:Te,rotate:ve}}function B(re,ae,oe,H,X,K,G,Y,q){var $=Math.max(0,Math.abs(ae-re)-2*w),ee=Math.max(0,Math.abs(H-oe)-2*w),ne=K-w,fe=G?ne-Math.sqrt(ne*ne-(ne-G)*(ne-G)):ne,ye=q?ne*2:Y?ne-G:2*fe,xe=q?ne*2:Y?2*fe:ne-G,Ae,Me,Ie,Ue,qe;return X.y/X.x>=ee/($-ye)?Ue=ee/X.y:X.y/X.x<=(ee-xe)/$?Ue=$/X.x:!q&&Y?(Ae=X.x*X.x+X.y*X.y/4,Me=-2*X.x*($-ne)-X.y*(ee/2-ne),Ie=($-ne)*($-ne)+(ee/2-ne)*(ee/2-ne)-ne*ne,Ue=(-Me+Math.sqrt(Me*Me-4*Ae*Ie))/(2*Ae)):q?(Ae=(X.x*X.x+X.y*X.y)/4,Me=-X.x*($/2-ne)-X.y*(ee/2-ne),Ie=($/2-ne)*($/2-ne)+(ee/2-ne)*(ee/2-ne)-ne*ne,Ue=(-Me+Math.sqrt(Me*Me-4*Ae*Ie))/(2*Ae)):(Ae=X.x*X.x/4+X.y*X.y,Me=-X.x*($/2-ne)-2*X.y*(ee-ne),Ie=($/2-ne)*($/2-ne)+(ee-ne)*(ee-ne)-ne*ne,Ue=(-Me+Math.sqrt(Me*Me-4*Ae*Ie))/(2*Ae)),Ue=Math.min(1,Ue),Y?qe=Math.max(0,ne-Math.sqrt(Math.max(0,ne*ne-(ne-(ee-X.y*Ue)/2)*(ne-(ee-X.y*Ue)/2)))-G):qe=Math.max(0,ne-Math.sqrt(Math.max(0,ne*ne-(ne-($-X.x*Ue)/2)*(ne-($-X.x*Ue)/2)))-G),{scale:Ue,pad:qe}}function F(re,ae,oe,H,X,K){var G=!!K.isHorizontal,Y=!!K.constrained,q=K.angle||0,$=X.width,ee=X.height,ne=Math.abs(ae-re),fe=Math.abs(H-oe),ye;G?ye=fe>2*w?w:0:ye=ne>2*w?w:0;var xe=1;Y&&(xe=G?Math.min(1,fe/ee):Math.min(1,ne/$));var Ae=I(q),Me=N(X,Ae),Ie=(G?Me.x:Me.y)/2,Ue=(X.left+X.right)/2,qe=(X.top+X.bottom)/2,ke=(re+ae)/2,ge=(oe+H)/2,ue=0,ve=0,se;return(G?re===ae:oe===H)&&K.zeroBarDir?se=K.zeroBarDir:se=G?_(ae,re):_(oe,H),G?(ke=ae-se*ye,ue=se*Ie):(ge=H+se*ye,ve=-se*Ie),{textX:Ue,textY:qe,targetX:ke,targetY:ge,anchorX:ue,anchorY:ve,scale:xe,rotate:Ae}}function P(re,ae,oe,H,X){var K=ae[0].trace,G=K.texttemplate,Y;return G?Y=Z(re,ae,oe,H,X):K.textinfo?Y=Q(ae,oe,H,X):Y=c.getValue(K.text,oe),c.coerceString(p,Y)}function j(re,ae){var oe=c.getValue(re.textposition,ae);return c.coerceEnumerated(g,oe)}function U(re,ae,oe,H){for(var X=!1,K=!1,G=0;G0?X=!0:Y<0&&(K=!0),X&&K)return 0}var q=ae?oe:H,$=-_(q.range[0],q.range[1]);return K?X?0:-$:$}function Z(re,ae,oe,H,X){var K=ae[0].trace,G=E.castOption(K,oe,"texttemplate");if(!G)return"";var Y=K.type==="histogram",q=K.type==="waterfall",$=K.type==="funnel",ee=K.orientation==="h",ne,fe,ye,xe;ee?(ne="y",fe=X,ye="x",xe=H):(ne="x",fe=H,ye="y",xe=X);function Ae(ue){return a(fe,fe.c2l(ue),!0).text}function Me(ue){return a(xe,xe.c2l(ue),!0).text}var Ie=ae[oe],Ue={};Ue.label=Ie.p,Ue.labelLabel=Ue[ne+"Label"]=Ae(Ie.p);var qe=E.castOption(K,Ie.i,"text");(qe===0||qe)&&(Ue.text=qe),Ue.value=Ie.s,Ue.valueLabel=Ue[ye+"Label"]=Me(Ie.s);var ke={};i(ke,K,Ie.i),(Y||ke.x===void 0)&&(ke.x=ee?Ue.value:Ue.label),(Y||ke.y===void 0)&&(ke.y=ee?Ue.label:Ue.value),(Y||ke.xLabel===void 0)&&(ke.xLabel=ee?Ue.valueLabel:Ue.labelLabel),(Y||ke.yLabel===void 0)&&(ke.yLabel=ee?Ue.labelLabel:Ue.valueLabel),q&&(Ue.delta=+Ie.rawS||Ie.s,Ue.deltaLabel=Me(Ue.delta),Ue.final=Ie.v,Ue.finalLabel=Me(Ue.final),Ue.initial=Ue.final-Ue.delta,Ue.initialLabel=Me(Ue.initial)),$&&(Ue.value=Ie.s,Ue.valueLabel=Me(Ue.value),Ue.percentInitial=Ie.begR,Ue.percentInitialLabel=E.formatPercent(Ie.begR),Ue.percentPrevious=Ie.difR,Ue.percentPreviousLabel=E.formatPercent(Ie.difR),Ue.percentTotal=Ie.sumR,Ue.percenTotalLabel=E.formatPercent(Ie.sumR));var ge=E.castOption(K,Ie.i,"customdata");return ge&&(Ue.customdata=ge),E.texttemplateString({data:[ke,Ue,K._meta],fallback:K.texttemplatefallback,labels:Ue,locale:re._d3locale,template:G})}function Q(re,ae,oe,H){var X=re[0].trace,K=X.orientation==="h",G=X.type==="waterfall",Y=X.type==="funnel";function q(ge){var ue=K?H:oe;return a(ue,ge,!0).text}function $(ge){var ue=K?oe:H;return a(ue,+ge,!0).text}var ee=X.textinfo,ne=re[ae],fe=ee.split("+"),ye=[],xe,Ae=function(ge){return fe.indexOf(ge)!==-1};if(Ae("label")&&ye.push(q(re[ae].p)),Ae("text")&&(xe=E.castOption(X,ne.i,"text"),(xe===0||xe)&&ye.push(xe)),G){var Me=+ne.rawS||ne.s,Ie=ne.v,Ue=Ie-Me;Ae("initial")&&ye.push($(Ue)),Ae("delta")&&ye.push($(Me)),Ae("final")&&ye.push($(Ie))}if(Y){Ae("value")&&ye.push($(ne.s));var qe=0;Ae("percent initial")&&qe++,Ae("percent previous")&&qe++,Ae("percent total")&&qe++;var ke=qe>1;Ae("percent initial")&&(xe=E.formatPercent(ne.begR),ke&&(xe+=" of initial"),ye.push(xe)),Ae("percent previous")&&(xe=E.formatPercent(ne.difR),ke&&(xe+=" of previous"),ye.push(xe)),Ae("percent total")&&(xe=E.formatPercent(ne.sumR),ke&&(xe+=" of total"),ye.push(xe))}return ye.join("
")}V.exports={plot:A,toMoveInsideBar:R}}}),Gp=Ee({"src/traces/bar/hover.js"(J,V){"use strict";var v=$l(),x=Ri(),E=Qa(),k=Vr().fillText,l=a1().getLineWidth,e=uo().hoverLabelText,t=Qi().BADNUM;function a(o,s,c,m,h){var p=r(o,s,c,m,h);if(p){var g=p.cd,i=g[0].trace,w=g[p.index];return p.color=n(i,w),x.getComponentMethod("errorbars","hoverInfo")(w,i,p),[p]}}function r(o,s,c,m,h){var p=o.cd,g=p[0].trace,i=p[0].t,w=m==="closest",S=g.type==="waterfall",M=o.maxHoverDistance,C=o.maxSpikeDistance,_,T,f,u,A,b,z;g.orientation==="h"?(_=c,T=s,f="y",u="x",A=oe,b=Q):(_=s,T=c,f="x",u="y",b=oe,A=Q);var I=g[f+"period"],N=w||I;function R(ye){return F(ye,-1)}function B(ye){return F(ye,1)}function F(ye,xe){var Ae=ye.w;return ye[f]+xe*Ae/2}function P(ye){return ye[f+"End"]-ye[f+"Start"]}var j=w?R:I?function(ye){return ye.p-P(ye)/2}:function(ye){return Math.min(R(ye),ye.p-i.bardelta/2)},U=w?B:I?function(ye){return ye.p+P(ye)/2}:function(ye){return Math.max(B(ye),ye.p+i.bardelta/2)};function Z(ye,xe,Ae){return h.finiteRange&&(Ae=0),v.inbox(ye-_,xe-_,Ae+Math.min(1,Math.abs(xe-ye)/z)-1)}function Q(ye){return Z(j(ye),U(ye),M)}function re(ye){return Z(R(ye),B(ye),C)}function ae(ye){var xe=ye[u];if(S){var Ae=Math.abs(ye.rawS)||0;T>0?xe+=Ae:T<0&&(xe-=Ae)}return xe}function oe(ye){var xe=T,Ae=ye.b,Me=ae(ye);return v.inbox(Ae-xe,Me-xe,M+(Me-xe)/(Me-Ae)-1)}function H(ye){var xe=T,Ae=ye.b,Me=ae(ye);return v.inbox(Ae-xe,Me-xe,C+(Me-xe)/(Me-Ae)-1)}var X=o[f+"a"],K=o[u+"a"];z=Math.abs(X.r2c(X.range[1])-X.r2c(X.range[0]));function G(ye){return(A(ye)+b(ye))/2}var Y=v.getDistanceFunction(m,A,b,G);if(v.getClosest(p,Y,o),o.index!==!1&&p[o.index].p!==t){N||(j=function(ye){return Math.min(R(ye),ye.p-i.bargroupwidth/2)},U=function(ye){return Math.max(B(ye),ye.p+i.bargroupwidth/2)});var q=o.index,$=p[q],ee=g.base?$.b+$.s:$.s;o[u+"0"]=o[u+"1"]=K.c2p($[u],!0),o[u+"LabelVal"]=ee;var ne=i.extents[i.extents.round($.p)];o[f+"0"]=X.c2p(w?j($):ne[0],!0),o[f+"1"]=X.c2p(w?U($):ne[1],!0);var fe=$.orig_p!==void 0;return o[f+"LabelVal"]=fe?$.orig_p:$.p,o.labelLabel=e(X,o[f+"LabelVal"],g[f+"hoverformat"]),o.valueLabel=e(K,o[u+"LabelVal"],g[u+"hoverformat"]),o.baseLabel=e(K,$.b,g[u+"hoverformat"]),o.spikeDistance=(H($)+re($))/2,o[f+"Spike"]=X.c2p($.p,!0),k($,g,o),o.hovertemplate=g.hovertemplate,o}}function n(o,s){var c=s.mcc||o.marker.color,m=s.mlcc||o.marker.line.color,h=l(o,s);if(E.opacity(c))return c;if(E.opacity(m)&&h)return m}V.exports={hoverPoints:a,hoverOnBars:r,getTraceColor:n}}}),rS=Ee({"src/traces/bar/event_data.js"(J,V){"use strict";V.exports=function(x,E,k){return x.x="xVal"in E?E.xVal:E.x,x.y="yVal"in E?E.yVal:E.y,E.xa&&(x.xaxis=E.xa),E.ya&&(x.yaxis=E.ya),k.orientation==="h"?(x.label=x.y,x.value=x.x):(x.label=x.x,x.value=x.y),x}}}),Wp=Ee({"src/traces/bar/select.js"(J,V){"use strict";V.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,a=l[0].trace,r=a.type==="funnel",n=a.orientation==="h",o=[],s;if(k===!1)for(s=0;s0?(I="v",f>0?N=Math.min(A,u):N=Math.min(u)):f>0?(I="h",N=Math.min(A)):N=0;if(!N){c.visible=!1;return}c._length=N;var j=m("orientation",I);c._hasPreCompStats?j==="v"&&f===0?(m("x0",0),m("dx",1)):j==="h"&&T===0&&(m("y0",0),m("dy",1)):j==="v"&&f===0?m("x0"):j==="h"&&T===0&&m("y0");var U=x.getComponentMethod("calendars","handleTraceDefaults");U(s,c,["x","y"],h)}function n(s,c,m,h){var p=h.prefix,g=v.coerce2(s,c,t,"marker.outliercolor"),i=m("marker.line.outliercolor"),w="outliers";c._hasPreCompStats?w="all":(g||i)&&(w="suspectedoutliers");var S=m(p+"points",w);S?(m("jitter",S==="all"?.3:0),m("pointpos",S==="all"?-1.5:0),m("marker.symbol"),m("marker.opacity"),m("marker.size"),m("marker.angle"),m("marker.color",c.line.color),m("marker.line.color"),m("marker.line.width"),S==="suspectedoutliers"&&(m("marker.line.outliercolor",c.marker.color),m("marker.line.outlierwidth")),m("selected.marker.color"),m("unselected.marker.color"),m("selected.marker.size"),m("unselected.marker.size"),m("text"),m("hovertext")):delete c.marker;var M=m("hoveron");(M==="all"||M.indexOf("points")!==-1)&&(m("hovertemplate"),m("hovertemplatefallback")),v.coerceSelectionMarkerOpacity(c,m)}function o(s,c){var m,h;function p(S){return v.coerce(h._input,h,t,S)}for(var g=0;gae.uf};if(C._hasPreCompStats){var q=C[N],$=function(nr){return I.d2c((C[nr]||[])[b])},ee=1/0,ne=-1/0;for(b=0;b=ae.q1&&ae.q3>=ae.med){var ye=$("lowerfence");ae.lf=ye!==l&&ye<=ae.q1?ye:h(ae,H,X);var xe=$("upperfence");ae.uf=xe!==l&&xe>=ae.q3?xe:p(ae,H,X);var Ae=$("mean");ae.mean=Ae!==l?Ae:X?k.mean(H,X):(ae.q1+ae.q3)/2;var Me=$("sd");ae.sd=Ae!==l&&Me>=0?Me:X?k.stdev(H,X,ae.mean):ae.q3-ae.q1,ae.lo=g(ae),ae.uo=i(ae);var Ie=$("notchspan");Ie=Ie!==l&&Ie>0?Ie:w(ae,X),ae.ln=ae.med-Ie,ae.un=ae.med+Ie;var Ue=ae.lf,qe=ae.uf;C.boxpoints&&H.length&&(Ue=Math.min(Ue,H[0]),qe=Math.max(qe,H[X-1])),C.notched&&(Ue=Math.min(Ue,ae.ln),qe=Math.max(qe,ae.un)),ae.min=Ue,ae.max=qe}else{k.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+ae.q1,"median = "+ae.med,"q3 = "+ae.q3].join(` -`));var ke;ae.med!==l?ke=ae.med:ae.q1!==l?ae.q3!==l?ke=(ae.q1+ae.q3)/2:ke=ae.q1:ae.q3!==l?ke=ae.q3:ke=0,ae.med=ke,ae.q1=ae.q3=ke,ae.lf=ae.uf=ke,ae.mean=ae.sd=ke,ae.ln=ae.un=ke,ae.min=ae.max=ke}ee=Math.min(ee,ae.min),ne=Math.max(ne,ae.max),ae.pts2=oe.filter(Y),u.push(ae)}}C._extremes[I._id]=x.findExtremes(I,[ee,ne],{padded:!0})}else{var ge=I.makeCalcdata(C,N),ue=a(Q,re),ve=Q.length,se=r(ve);for(b=0;b=0&&Te0){if(ae={},ae.pos=ae[B]=Q[b],oe=ae.pts=se[b].sort(c),H=ae[N]=oe.map(m),X=H.length,ae.min=H[0],ae.max=H[X-1],ae.mean=k.mean(H,X),ae.sd=k.stdev(H,X,ae.mean)*C.sdmultiple,ae.med=k.interp(H,.5),X%2&&(gt||mt)){var Tt,At;gt?(Tt=H.slice(0,X/2),At=H.slice(X/2+1)):mt&&(Tt=H.slice(0,X/2+1),At=H.slice(X/2)),ae.q1=k.interp(Tt,.5),ae.q3=k.interp(At,.5)}else ae.q1=k.interp(H,.25),ae.q3=k.interp(H,.75);ae.lf=h(ae,H,X),ae.uf=p(ae,H,X),ae.lo=g(ae),ae.uo=i(ae);var Kt=w(ae,X);ae.ln=ae.med-Kt,ae.un=ae.med+Kt,Fe=Math.min(Fe,ae.ln),We=Math.max(We,ae.un),ae.pts2=oe.filter(Y),u.push(ae)}C.notched&&k.isTypedArray(ge)&&(ge=Array.from(ge)),C._extremes[I._id]=x.findExtremes(I,C.notched?ge.concat([Fe,We]):ge,{padded:!0})}return s(u,C),u.length>0?(u[0].t={num:_[A],dPos:re,posLetter:B,valLetter:N,labels:{med:e(M,"median:"),min:e(M,"min:"),q1:e(M,"q1:"),q3:e(M,"q3:"),max:e(M,"max:"),mean:C.boxmean==="sd"||C.sizemode==="sd"?e(M,"mean \xB1 \u03C3:").replace("\u03C3",C.sdmultiple===1?"\u03C3":C.sdmultiple+"\u03C3"):e(M,"mean:"),lf:e(M,"lower fence:"),uf:e(M,"upper fence:")}},_[A]++,u):[{t:{empty:!0}}]};function t(S,M,C,_){var T=M in S,f=M+"0"in S,u="d"+M in S;if(T||f&&u){var A=C.makeCalcdata(S,M),b=E(S,C,M,A).vals;return[b,A]}var z;f?z=S[M+"0"]:"name"in S&&(C.type==="category"||v(S.name)&&["linear","log"].indexOf(C.type)!==-1||k.isDateTime(S.name)&&C.type==="date")?z=S.name:z=_;for(var I=C.type==="multicategory"?C.r2c_just_indices(z):C.d2c(z,0,S[M+"calendar"]),N=S._length,R=new Array(N),B=0;B1,f=1-s[t+"gap"],u=1-s[t+"groupgap"];for(h=0;h0;if(I==="positive"?(ae=N*(z?1:.5),X=H,oe=X=B):I==="negative"?(ae=X=B,oe=N*(z?1:.5),K=H):(ae=oe=N,X=K=H),ne){var fe=A.pointpos,ye=A.jitter,xe=A.marker.size/2,Ae=0;fe+ye>=0&&(Ae=H*(fe+ye),Ae>ae?(ee=!0,q=xe,G=Ae):Ae>X&&(q=xe,G=ae)),Ae<=ae&&(G=ae);var Me=0;fe-ye<=0&&(Me=-H*(fe-ye),Me>oe?(ee=!0,$=xe,Y=Me):Me>K&&($=xe,Y=oe)),Me<=oe&&(Y=oe)}else G=ae,Y=oe;var Ie=new Array(g.length);for(p=0;pC.lo&&(j.so=!0)}return T});M.enter().append("path").classed("point",!0),M.exit().remove(),M.call(E.translatePoints,m,h)}function r(n,o,s,c){var m=o.val,h=o.pos,p=!!h.rangebreaks,g=c.bPos,i=c.bPosPxOffset||0,w=s.boxmean||(s.meanline||{}).visible,S,M;Array.isArray(c.bdPos)?(S=c.bdPos[0],M=c.bdPos[1]):(S=c.bdPos,M=c.bdPos);var C=n.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?x.identity:[]);C.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),C.exit().remove(),C.each(function(_){var T=h.c2l(_.pos+g,!0),f=h.l2p(T-S)+i,u=h.l2p(T+M)+i,A=p?(f+u)/2:h.l2p(T)+i,b=m.c2p(_.mean,!0),z=m.c2p(_.mean-_.sd,!0),I=m.c2p(_.mean+_.sd,!0);s.orientation==="h"?v.select(this).attr("d","M"+b+","+f+"V"+u+(w==="sd"?"m0,0L"+z+","+A+"L"+b+","+f+"L"+I+","+A+"Z":"")):v.select(this).attr("d","M"+f+","+b+"H"+u+(w==="sd"?"m0,0L"+A+","+z+"L"+f+","+b+"L"+A+","+I+"Z":""))})}V.exports={plot:e,plotBoxAndWhiskers:t,plotPoints:a,plotBoxMean:r}}}),l1=Ee({"src/traces/box/style.js"(J,V){"use strict";var v=Hn(),x=Qa(),E=yo();function k(e,t,a){var r=a||v.select(e).selectAll("g.trace.boxes");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var o=v.select(this),s=n[0].trace,c=s.line.width;function m(g,i,w,S){g.style("stroke-width",i+"px").call(x.stroke,w).call(x.fill,S)}var h=o.selectAll("path.box");if(s.type==="candlestick")h.each(function(g){if(!g.empty){var i=v.select(this),w=s[g.dir];m(i,w.line.width,w.line.color,w.fillcolor),i.style("opacity",s.selectedpoints&&!g.selected?.3:1)}});else{m(h,c,s.line.color,s.fillcolor),o.selectAll("path.mean").style({"stroke-width":c,"stroke-dasharray":2*c+"px,"+c+"px"}).call(x.stroke,s.line.color);var p=o.selectAll("path.point");E.pointStyle(p,s,e)}})}function l(e,t,a){var r=t[0].trace,n=a.selectAll("path.point");r.selectedpoints?E.selectedPointStyle(n,r):E.pointStyle(n,r,e)}V.exports={style:k,styleOnSelect:l}}}),Ax=Ee({"src/traces/box/hover.js"(J,V){"use strict";var v=uo(),x=Vr(),E=$l(),k=Qa(),l=x.fillText;function e(r,n,o,s){var c=r.cd,m=c[0].trace,h=m.hoveron,p=[],g;return h.indexOf("boxes")!==-1&&(p=p.concat(t(r,n,o,s))),h.indexOf("points")!==-1&&(g=a(r,n,o)),s==="closest"?g?[g]:p:(g&&p.push(g),p)}function t(r,n,o,s){var c=r.cd,m=r.xa,h=r.ya,p=c[0].trace,g=c[0].t,i=p.type==="violin",w,S,M,C,_,T,f,u,A,b,z,I=g.bdPos,N,R,B=g.wHover,F=function(Me){return M.c2l(Me.pos)+g.bPos-M.c2l(T)};i&&p.side!=="both"?(p.side==="positive"&&(A=function(Me){var Ie=F(Me);return E.inbox(Ie,Ie+B,b)},N=I,R=0),p.side==="negative"&&(A=function(Me){var Ie=F(Me);return E.inbox(Ie-B,Ie,b)},N=0,R=I)):(A=function(Me){var Ie=F(Me);return E.inbox(Ie-B,Ie+B,b)},N=R=I);var P;i?P=function(Me){return E.inbox(Me.span[0]-_,Me.span[1]-_,b)}:P=function(Me){return E.inbox(Me.min-_,Me.max-_,b)},p.orientation==="h"?(_=n,T=o,f=P,u=A,w="y",M=h,S="x",C=m):(_=o,T=n,f=A,u=P,w="x",M=m,S="y",C=h);var j=Math.min(1,I/Math.abs(M.r2c(M.range[1])-M.r2c(M.range[0])));b=r.maxHoverDistance-j,z=r.maxSpikeDistance-j;function U(Me){return(f(Me)+u(Me))/2}var Z=E.getDistanceFunction(s,f,u,U);if(E.getClosest(c,Z,r),r.index===!1)return[];var Q=c[r.index],re=p.line.color,ae=(p.marker||{}).color;k.opacity(re)&&p.line.width?r.color=re:k.opacity(ae)&&p.boxpoints?r.color=ae:r.color=p.fillcolor,r[w+"0"]=M.c2p(Q.pos+g.bPos-R,!0),r[w+"1"]=M.c2p(Q.pos+g.bPos+N,!0),r[w+"LabelVal"]=Q.orig_p!==void 0?Q.orig_p:Q.pos;var oe=w+"Spike";r.spikeDistance=U(Q)*z/b,r[oe]=M.c2p(Q.pos,!0);var H=p.boxmean||p.sizemode==="sd"||(p.meanline||{}).visible,X=p.boxpoints||p.points,K=X&&H?["max","uf","q3","med","mean","q1","lf","min"]:X&&!H?["max","uf","q3","med","q1","lf","min"]:!X&&H?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],G=C.range[1]0&&(a=!0);for(var s=0;se){var t=e-k[x];return k[x]=e,t}}else return k[x]=e,e;return 0},max:function(x,E,k,l){var e=l[E];if(v(e))if(e=Number(e),v(k[x])){if(k[x]f&&fk){var b=u===x?1:6,z=u===x?"M12":"M1";return function(I,N){var R=g.c2d(I,x,i),B=R.indexOf("-",b);B>0&&(R=R.slice(0,B));var F=g.d2c(R,0,i);if(Ft?c>k?c>x*1.1?x:c>E*1.1?E:k:c>l?l:c>e?e:t:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function o(c,m,h,p,g,i){if(p&&c>k){var w=s(m,g,i),S=s(h,g,i),M=c===x?0:1;return w[M]!==S[M]}return Math.floor(h/c)-Math.floor(m/c)>.1}function s(c,m,h){var p=m.c2d(c,x,h).split("-");return p[0]===""&&(p.unshift(),p[0]="-"+p[0]),p}}}),Px=Ee({"src/traces/histogram/calc.js"(J,V){"use strict";var v=mi(),x=Vr(),E=Ri(),k=uo(),{hasColorscale:l}=cf(),e=Sf(),t=Q0(),a=Ex(),r=kx(),n=Cx(),o=Lx();function s(g,i){var w=[],S=[],M=i.orientation==="h",C=k.getFromId(g,M?i.yaxis:i.xaxis),_=M?"y":"x",T={x:"y",y:"x"}[_],f=i[_+"calendar"],u=i.cumulative,A,b=c(g,i,C,_),z=b[0],I=b[1],N=typeof z.size=="string",R=[],B=N?R:z,F=[],P=[],j=[],U=0,Z=i.histnorm,Q=i.histfunc,re=Z.indexOf("density")!==-1,ae,oe,H;u.enabled&&re&&(Z=Z.replace(/ ?density$/,""),re=!1);var X=Q==="max"||Q==="min",K=X?null:0,G=a.count,Y=r[Z],q=!1,$=function(Te){return C.r2c(Te,0,f)},ee;for(x.isArrayOrTypedArray(i[T])&&Q!=="count"&&(ee=i[T],q=Q==="avg",G=a[Q]),A=$(z.start),oe=$(z.end)+(A-k.tickIncrement(A,z.size,!1,f))/1e6;A=0&&H=ue;A--)if(S[A]){ve=A;break}for(A=ue;A<=ve;A++)if(v(w[A])&&v(S[A])){var se={p:w[A],s:S[A],b:0};u.enabled||(se.pts=j[A],xe?se.ph0=se.ph1=j[A].length?I[j[A][0]]:w[A]:(i._computePh=!0,se.ph0=qe(R[A]),se.ph1=qe(R[A+1],!0))),ge.push(se)}return ge.length===1&&(ge[0].width1=k.tickIncrement(ge[0].p,z.size,!1,f)-ge[0].p),l(i,"marker")&&e(g,i,{vals:i.marker.color,containerStr:"marker",cLetter:"c"}),l(i,"marker.line")&&e(g,i,{vals:i.marker.line.color,containerStr:"marker.line",cLetter:"c"}),t(ge,i),x.isArrayOrTypedArray(i.selectedpoints)&&x.tagSelected(ge,i,Ie),ge}function c(g,i,w,S,M){var C,_=S+"bins",T=g._fullLayout,f=i["_"+S+"bingroup"],u=T._histogramBinOpts[f],A=T.barmode==="overlay",b,z,I,N,R,B,F,P=function(qe){return w.r2c(qe,0,N)},j=function(qe){return w.c2r(qe,0,N)},U=w.type==="date"?function(qe){return qe||qe===0?x.cleanDate(qe,null,N):null}:function(qe){return v(qe)?Number(qe):null};function Z(qe,ke,ge){ke[qe+"Found"]?(ke[qe]=U(ke[qe]),ke[qe]===null&&(ke[qe]=ge[qe])):(B[qe]=ke[qe]=ge[qe],x.nestedProperty(z[0],_+"."+qe).set(ge[qe]))}if(i["_"+S+"autoBinFinished"])delete i["_"+S+"autoBinFinished"];else{z=u.traces;var Q=[],re=!0,ae=!1,oe=!1;for(b=0;bw.r2l(ne)&&(ye=k.tickIncrement(ye,u.size,!0,N)),Y.start=w.l2r(ye),ee||x.nestedProperty(i,_+".start").set(Y.start)}var xe=u.end,Ae=w.r2l(G.end),Me=Ae!==void 0;if((u.endFound||Me)&&Ae!==w.r2l(xe)){var Ie=Me?Ae:x.aggNums(Math.max,null,R);Y.end=w.l2r(Ie),Me||x.nestedProperty(i,_+".start").set(Y.end)}var Ue="autobin"+S;return i._input[Ue]===!1&&(i._input[_]=x.extendFlat({},i[_]||{}),delete i._input[Ue],delete i[Ue]),[Y,R]}function m(g,i,w,S,M){var C=g._fullLayout,_=h(g,i),T=!1,f=1/0,u=[i],A,b,z;for(A=0;A<_.length;A++)if(b=_[A],b===i)T=!0;else if(!T)z=C._histogramBinOpts[b["_"+S+"bingroup"]],f=Math.min(f,z.size||b[M].size);else{var I=c(g,b,w,S,!0),N=I[0],R=I[2];b["_"+S+"autoBinFinished"]=1,b["_"+S+"pos0"]=I[1],R?u.push(b):f=Math.min(f,N.size)}var B=new Array(u.length);for(A=0;A=0;S--)T(S);else if(i==="increasing"){for(S=1;S=0;S--)g[S]+=g[S+1];w==="exclude"&&(g.push(0),g.shift())}}V.exports={calc:s,calcAllAutoBins:c}}}),uS=Ee({"src/traces/histogram2d/calc.js"(J,V){"use strict";var v=Vr(),x=uo(),E=Ex(),k=kx(),l=Cx(),e=Lx(),t=Px().calcAllAutoBins;V.exports=function(s,c){var m=x.getFromId(s,c.xaxis),h=x.getFromId(s,c.yaxis),p=c.xcalendar,g=c.ycalendar,i=function(vt){return m.r2c(vt,0,p)},w=function(vt){return h.r2c(vt,0,g)},S=function(vt){return m.c2r(vt,0,p)},M=function(vt){return h.c2r(vt,0,g)},C,_,T,f,u=t(s,c,m,"x"),A=u[0],b=u[1],z=t(s,c,h,"y"),I=z[0],N=z[1],R=c._length;b.length>R&&b.splice(R,b.length-R),N.length>R&&N.splice(R,N.length-R);var B=[],F=[],P=[],j=typeof A.size=="string",U=typeof I.size=="string",Z=[],Q=[],re=j?Z:A,ae=U?Q:I,oe=0,H=[],X=[],K=c.histnorm,G=c.histfunc,Y=K.indexOf("density")!==-1,q=G==="max"||G==="min",$=q?null:0,ee=E.count,ne=k[K],fe=!1,ye=[],xe=[],Ae="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";Ae&&G!=="count"&&(fe=G==="avg",ee=E[G]);var Me=A.size,Ie=i(A.start),Ue=i(A.end)+(Ie-x.tickIncrement(Ie,Me,!1,p))/1e6;for(C=Ie;C=0&&T=0&&fx;n++)r=l(t,a,k(r));return r>x&&v.log("interp2d didn't converge quickly",r),t};function l(e,t,a){var r=0,n,o,s,c,m,h,p,g,i,w,S,M,C;for(c=0;cM&&(r=Math.max(r,Math.abs(e[o][s]-S)/(C-M))))}return r}}}),d1=Ee({"src/traces/heatmap/find_empties.js"(J,V){"use strict";var v=Vr().maxRowLength;V.exports=function(E){var k=[],l={},e=[],t=E[0],a=[],r=[0,0,0],n=v(E),o,s,c,m,h,p,g,i;for(s=0;s=0;h--)m=e[h],s=m[0],c=m[1],p=((l[[s-1,c]]||r)[2]+(l[[s+1,c]]||r)[2]+(l[[s,c-1]]||r)[2]+(l[[s,c+1]]||r)[2])/20,p&&(g[m]=[s,c,p],e.splice(h,1),i=!0);if(!i)throw"findEmpties iterated with no new neighbors";for(m in g)l[m]=g[m],k.push(g[m])}return k.sort(function(w,S){return S[2]-w[2]})}}}),Dx=Ee({"src/traces/heatmap/make_bound_array.js"(J,V){"use strict";var v=Ri(),x=Vr().isArrayOrTypedArray;V.exports=function(k,l,e,t,a,r){var n=[],o=v.traceIs(k,"contour"),s=v.traceIs(k,"histogram"),c,m,h,p=x(l)&&l.length>1;if(p&&!s&&r.type!=="category"){var g=l.length;if(g<=a){if(o)n=Array.from(l).slice(0,a);else if(a===1)r.type==="log"?n=[.5*l[0],2*l[0]]:n=[l[0]-.5,l[0]+.5];else if(r.type==="log"){for(n=[Math.pow(l[0],1.5)/Math.pow(l[1],.5)],h=1;h1){var K=(X[X.length-1]-X[0])/(X.length-1),G=Math.abs(K/100);for(R=0;RG)return!1}return!0}g._islinear=!1,i.type==="log"||w.type==="log"?C==="fast"&&P("log axis found"):j(_)?j(A)?g._islinear=!0:C==="fast"&&P("y scale is not linear"):C==="fast"&&P("x scale is not linear");var U=x.maxRowLength(N),Z=g.xtype==="scaled"?"":_,Q=o(g,Z,T,f,U,i),re=g.ytype==="scaled"?"":A,ae=o(g,re,b,z,N.length,w);g._extremes[i._id]=E.findExtremes(i,Q),g._extremes[w._id]=E.findExtremes(w,ae);var oe={x:Q,y:ae,z:N,text:g._text||g.text,hovertext:g._hovertext||g.hovertext};if(g.xperiodalignment&&u&&(oe.orig_x=u),g.yperiodalignment&&I&&(oe.orig_y=I),Z&&Z.length===Q.length-1&&(oe.xCenter=Z),re&&re.length===ae.length-1&&(oe.yCenter=re),M&&(oe.xRanges=B.xRanges,oe.yRanges=B.yRanges,oe.pts=B.pts),S||e(p,g,{vals:N,cLetter:"z"}),S&&g.contours&&g.contours.coloring==="heatmap"){var H={type:g.type==="contour"?"heatmap":"histogram2d",xcalendar:g.xcalendar,ycalendar:g.ycalendar};oe.xfill=o(H,Z,T,f,U,i),oe.yfill=o(H,re,b,z,N.length,w)}return[oe]};function c(h){for(var p=[],g=h.length,i=0;i0;)G=u.c2p(P[ee]),ee--;for(G0;)$=A.c2p(j[ee]),ee--;$=u._length||G<=0||q>=A._length||$<=0;if(Ie){var Ue=z.selectAll("image").data([]);Ue.exit().remove(),i(z);return}var qe,ke;ye==="fast"?(qe=oe,ke=ae):(qe=Ae,ke=Me);var ge=document.createElement("canvas");ge.width=qe,ge.height=ke;var ue=ge.getContext("2d",{willReadFrequently:!0}),ve=n(N,{noNumericCheck:!0,returnArray:!0}),se,Te;ye==="fast"?(se=H?function(Or){return oe-1-Or}:l.identity,Te=X?function(Or){return ae-1-Or}:l.identity):(se=function(Or){return l.constrain(Math.round(u.c2p(P[Or])-K),0,Ae)},Te=function(Or){return l.constrain(Math.round(A.c2p(j[Or])-q),0,Me)});var Fe=Te(0),We=[Fe,Fe],Ge=H?0:1,gt=X?0:1,mt=0,Tt=0,At=0,Kt=0,nr,_r,Zt,sr,Ot;function vt(Or,Pr=0){if(Or===void 0)return[0,0,0,0];var hn=ve(Or);return hn[0]=Math.round(hn[0]),hn[1]=Math.round(hn[1]),hn[2]=Math.round(hn[2]),mt+=Pr,Tt+=hn[0]*Pr,At+=hn[1]*Pr,Kt+=hn[2]*Pr,hn}function ht(Or,Pr,hn,zn){var Pn=Or[hn.bin0];if(Pn===void 0)return vt(void 0,1);var Ca=Or[hn.bin1],ma=Pr[hn.bin0],bi=Pr[hn.bin1],ga=Ca-Pn||0,eo=ma-Pn||0,si;return Ca===void 0?bi===void 0?si=0:ma===void 0?si=2*(bi-Pn):si=(2*bi-ma-Pn)*2/3:bi===void 0?ma===void 0?si=0:si=(2*Pn-Ca-ma)*2/3:ma===void 0?si=(2*bi-Ca-Pn)*2/3:si=bi+Pn-Ca-ma,vt(Pn+hn.frac*ga+zn.frac*(eo+hn.frac*si))}if(ye!=="default"){var Re=0,Be;try{Be=new Uint8Array(qe*ke*4)}catch{Be=new Array(qe*ke*4)}if(ye==="smooth"){var He=U||P,$e=Z||j,Ze=new Array(He.length),Je=new Array($e.length),Mt=new Array(Ae),dt=U?S:w,Dt=Z?S:w,Ct,Vt,Ht;for(ee=0;eeei||ei>A._length))for(ne=jn;neai||ai>u._length)){var Mi=t({x:Fa,y:Qn},N,C._fullLayout);Mi.x=Fa,Mi.y=Qn;var ci=I.z[ee][ne];ci===void 0?(Mi.z="",Mi.zLabel=""):(Mi.z=ci,Mi.zLabel=k.tickText(Ir,ci,"hover").text);var ba=I.text&&I.text[ee]&&I.text[ee][ne];(ba===void 0||ba===!1)&&(ba=""),Mi.text=ba;var pa=l.texttemplateString({data:[Mi,N._meta],fallback:N.texttemplatefallback,labels:Mi,locale:C._fullLayout._d3locale,template:cr});if(pa){var Ii=pa.split("
"),ho=Ii.length,da=0;for(fe=0;fe=w[0].length||z<0||z>w.length)return}else{if(v.inbox(a-g[0],a-g[g.length-1],0)>0||v.inbox(r-i[0],r-i[i.length-1],0)>0)return;if(s){var I;for(T=[2*g[0]-g[1]],I=1;I=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),am=Ee({"src/traces/contour/attributes.js"(J,V){"use strict";var v=Yp(),x=ou(),E=Fl(),k=E.axisHoverFormat,l=E.descriptionOnlyNumbers,e=$s(),t=kc().dash,a=Xs(),r=vo().extendFlat,n=w1(),o=n.COMPARISON_OPS2,s=n.INTERVAL_OPS,c=x.line;V.exports=r({z:v.z,x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:x.xperiod0,yperiod0:x.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,text:v.text,hovertext:v.hovertext,transpose:v.transpose,xtype:v.xtype,ytype:v.ytype,xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:r({},v.texttemplate,{}),texttemplatefallback:v.texttemplatefallback,textfont:r({},v.textfont,{}),hoverongaps:v.hoverongaps,connectgaps:r({},v.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:a({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:l("contour label")},operation:{valType:"enumerated",values:[].concat(o).concat(s),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:r({},c.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:t,smoothing:r({},c.smoothing,{}),editType:"plot"},zorder:x.zorder},e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),Bx=Ee({"src/traces/histogram2dcontour/attributes.js"(J,V){"use strict";var v=x1(),x=am(),E=$s(),k=Fl().axisHoverFormat,l=vo().extendFlat;V.exports=l({x:v.x,y:v.y,z:v.z,marker:v.marker,histnorm:v.histnorm,histfunc:v.histfunc,nbinsx:v.nbinsx,xbins:v.xbins,nbinsy:v.nbinsy,ybins:v.ybins,autobinx:v.autobinx,autobiny:v.autobiny,bingroup:v.bingroup,xbingroup:v.xbingroup,ybingroup:v.ybingroup,autocontour:x.autocontour,ncontours:x.ncontours,contours:x.contours,line:{color:x.line.color,width:l({},x.line.width,{dflt:.5}),dash:x.line.dash,smoothing:x.line.smoothing,editType:"plot"},xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:x.texttemplate,texttemplatefallback:x.texttemplatefallback,textfont:x.textfont},E("",{cLetter:"z",editTypeOverride:"calc"}))}}),T1=Ee({"src/traces/contour/contours_defaults.js"(J,V){"use strict";V.exports=function(x,E,k,l){var e=l("contours.start"),t=l("contours.end"),a=e===!1||t===!1,r=k("contours.size"),n;a?n=E.autocontour=!0:n=k("autocontour",!1),(n||!r)&&k("ncontours")}}}),Nx=Ee({"src/traces/contour/label_defaults.js"(J,V){"use strict";var v=Vr();V.exports=function(E,k,l,e){e||(e={});var t=E("contours.showlabels");if(t){var a=k.font;v.coerceFont(E,"contours.labelfont",a,{overrideDflt:{color:l}}),E("contours.labelformat")}e.hasHover!==!1&&E("zhoverformat")}}}),A1=Ee({"src/traces/contour/style_defaults.js"(J,V){"use strict";var v=Cc(),x=Nx();V.exports=function(k,l,e,t,a){var r=e("contours.coloring"),n,o="";r==="fill"&&(n=e("contours.showlines")),n!==!1&&(r!=="lines"&&(o=e("line.color","#000")),e("line.width",.5),e("line.dash")),r!=="none"&&(k.showlegend!==!0&&(l.showlegend=!1),l._dfltShowLegend=!1,v(k,l,t,e,{prefix:"",cLetter:"z"})),e("line.smoothing"),x(e,t,o,a)}}}),xS=Ee({"src/traces/histogram2dcontour/defaults.js"(J,V){"use strict";var v=Vr(),x=zx(),E=T1(),k=A1(),l=nm(),e=Bx();V.exports=function(a,r,n,o){function s(m,h){return v.coerce(a,r,e,m,h)}function c(m){return v.coerce2(a,r,e,m)}x(a,r,s,o),r.visible!==!1&&(E(a,r,s,c),k(a,r,s,o),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&l(s,o))}}}),Ox=Ee({"src/traces/contour/set_contours.js"(J,V){"use strict";var v=uo(),x=Vr();V.exports=function(l,e){var t=l.contours;if(l.autocontour){var a=l.zmin,r=l.zmax;(l.zauto||a===void 0)&&(a=x.aggNums(Math.min,null,e)),(l.zauto||r===void 0)&&(r=x.aggNums(Math.max,null,e));var n=E(a,r,l.ncontours);t.size=n.dtick,t.start=v.tickFirst(n),n.range.reverse(),t.end=v.tickFirst(n),t.start===a&&(t.start+=t.size),t.end===r&&(t.end-=t.size),t.start>t.end&&(t.start=t.end=(t.start+t.end)/2),l._input.contours||(l._input.contours={}),x.extendFlat(l._input.contours,{start:t.start,end:t.end,size:t.size}),l._input.autocontour=!0}else if(t.type!=="constraint"){var o=t.start,s=t.end,c=l._input.contours;if(o>s&&(t.start=c.start=s,s=t.end=c.end=o,o=t.start),!(t.size>0)){var m;o===s?m=1:m=E(o,s,l.ncontours).dtick,c.size=t.size=m}}};function E(k,l,e){var t={type:"linear",range:[k,l]};return v.autoTicks(t,(l-k)/(e||15)),t}}}),im=Ee({"src/traces/contour/end_plus.js"(J,V){"use strict";V.exports=function(x){return x.end+x.size/1e6}}}),jx=Ee({"src/traces/contour/calc.js"(J,V){"use strict";var v=pl(),x=v1(),E=Ox(),k=im();V.exports=function(e,t){var a=x(e,t),r=a[0].z;E(t,r);var n=t.contours,o=v.extractOpts(t),s;if(n.coloring==="heatmap"&&o.auto&&t.autocontour===!1){var c=n.start,m=k(n),h=n.size||1,p=Math.floor((m-c)/h)+1;isFinite(h)||(h=1,p=1);var g=c-h/2,i=g+p*h;s=[g,i]}else s=r;return v.calc(e,t,{vals:s,cLetter:"z"}),a}}}),om=Ee({"src/traces/contour/constants.js"(J,V){"use strict";V.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}}}),Ux=Ee({"src/traces/contour/make_crossings.js"(J,V){"use strict";var v=om();V.exports=function(k){var l=k[0].z,e=l.length,t=l[0].length,a=e===2||t===2,r,n,o,s,c,m,h,p,g;for(n=0;nE?0:1)+(k[0][1]>E?0:2)+(k[1][1]>E?0:4)+(k[1][0]>E?0:8);if(l===5||l===10){var e=(k[0][0]+k[0][1]+k[1][0]+k[1][1])/4;return E>e?l===5?713:1114:l===5?104:208}return l===15?0:l}}}),qx=Ee({"src/traces/contour/find_all_paths.js"(J,V){"use strict";var v=Vr(),x=om();V.exports=function(r,n,o){var s,c,m,h,p;for(n=n||.01,o=o||.01,m=0;m20?(m=x.CHOOSESADDLE[m][(h[0]||h[1])<0?0:1],a.crossings[c]=x.SADDLEREMAINDER[m]):delete a.crossings[c],h=x.NEWDELTA[m],!h){v.log("Found bad marching index:",m,r,a.level);break}p.push(t(a,r,h)),r[0]+=h[0],r[1]+=h[1],c=r.join(","),E(p[p.length-1],p[p.length-2],o,s)&&p.pop();var C=h[0]&&(r[0]<0||r[0]>i-2)||h[1]&&(r[1]<0||r[1]>g-2),_=r[0]===w[0]&&r[1]===w[1]&&h[0]===S[0]&&h[1]===S[1];if(_||n&&C)break;m=a.crossings[c]}M===1e4&&v.log("Infinite loop in contour?");var T=E(p[0],p[p.length-1],o,s),f=0,u=.2*a.smoothing,A=[],b=0,z,I,N,R,B,F,P,j,U,Z,Q;for(M=1;M=b;M--)if(z=A[M],z=b&&z+A[I]j&&U--,a.edgepaths[U]=Q.concat(p,Z));break}H||(a.edgepaths[j]=p.concat(Z))}for(j=0;j20&&r?a===208||a===1114?o=n[0]===0?1:-1:s=n[1]===0?1:-1:x.BOTTOMSTART.indexOf(a)!==-1?s=1:x.LEFTSTART.indexOf(a)!==-1?o=1:x.TOPSTART.indexOf(a)!==-1?s=-1:o=-1,[o,s]}function t(a,r,n){var o=r[0]+Math.max(n[0],0),s=r[1]+Math.max(n[1],0),c=a.z[s][o],m=a.xaxis,h=a.yaxis;if(n[1]){var p=(a.level-c)/(a.z[s][o+1]-c),g=(p!==1?(1-p)*m.c2l(a.x[o]):0)+(p!==0?p*m.c2l(a.x[o+1]):0);return[m.c2p(m.l2c(g),!0),h.c2p(a.y[s],!0),o+p,s]}else{var i=(a.level-c)/(a.z[s+1][o]-c),w=(i!==1?(1-i)*h.c2l(a.y[s]):0)+(i!==0?i*h.c2l(a.y[s+1]):0);return[m.c2p(a.x[o],!0),h.c2p(h.l2c(w),!0),o,s+i]}}}}),wS=Ee({"src/traces/contour/constraint_mapping.js"(J,V){"use strict";var v=w1(),x=mi();V.exports={"[]":k("[]"),"][":k("]["),">":l(">"),"<":l("<"),"=":l("=")};function E(e,t){var a=Array.isArray(t),r;function n(o){return x(o)?+o:null}return v.COMPARISON_OPS2.indexOf(e)!==-1?r=n(a?t[0]:t):v.INTERVAL_OPS.indexOf(e)!==-1?r=a?[n(t[0]),n(t[1])]:[n(t),n(t)]:v.SET_OPS.indexOf(e)!==-1&&(r=a?t.map(n):[n(t)]),r}function k(e){return function(t){t=E(e,t);var a=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return{start:a,end:r,size:r-a}}}function l(e){return function(t){return t=E(e,t),{start:t,end:1/0,size:1/0}}}}}),Vx=Ee({"src/traces/contour/empty_pathinfo.js"(J,V){"use strict";var v=Vr(),x=wS(),E=im();V.exports=function(l,e,t){for(var a=l.type==="constraint"?x[l._operation](l.value):l,r=a.size,n=[],o=E(a),s=t.trace._carpetTrace,c=s?{xaxis:s.aaxis,yaxis:s.baxis,x:t.a,y:t.b}:{xaxis:e.xaxis,yaxis:e.yaxis,x:t.x,y:t.y},m=a.start;m1e3){v.warn("Too many contours, clipping at 1000",l);break}return n}}}),Hx=Ee({"src/traces/contour/convert_to_constraints.js"(J,V){"use strict";var v=Vr();V.exports=function(E,k){var l,e,t,a=function(o){return o.reverse()},r=function(o){return o};switch(k){case"=":case"<":return E;case">":for(E.length!==1&&v.warn("Contour data invalid for the specified inequality operation."),e=E[0],l=0;lt.level||t.starts.length&&e===t.level)}break;case"constraint":if(E.prefixBoundary=!1,E.edgepaths.length)return;var a=E.x.length,r=E.y.length,n=-1/0,o=1/0;for(l=0;l":s>n&&(E.prefixBoundary=!0);break;case"<":(sn||E.starts.length&&m===o)&&(E.prefixBoundary=!0);break;case"][":c=Math.min(s[0],s[1]),m=Math.max(s[0],s[1]),cn&&(E.prefixBoundary=!0);break}break}}}}),M1=Ee({"src/traces/contour/plot.js"(J){"use strict";var V=Hn(),v=Vr(),x=yo(),E=pl(),k=Fs(),l=uo(),e=Hh(),t=m1(),a=Ux(),r=qx(),n=Vx(),o=Hx(),s=Gx(),c=om(),m=c.LABELOPTIMIZER;J.plot=function(_,T,f,u){var A=T.xaxis,b=T.yaxis;v.makeTraceGroups(u,f,"contour").each(function(z){var I=V.select(this),N=z[0],R=N.trace,B=N.x,F=N.y,P=R.contours,j=n(P,T,N),U=v.ensureSingle(I,"g","heatmapcoloring"),Z=[];P.coloring==="heatmap"&&(Z=[z]),t(_,T,Z,U),a(j),r(j);var Q=A.c2p(B[0],!0),re=A.c2p(B[B.length-1],!0),ae=b.c2p(F[0],!0),oe=b.c2p(F[F.length-1],!0),H=[[Q,oe],[re,oe],[re,ae],[Q,ae]],X=j;P.type==="constraint"&&(X=o(j,P._operation)),h(I,H,P),p(I,X,H,P),i(I,j,_,N,P),S(I,T,_,N,H)})};function h(C,_,T){var f=v.ensureSingle(C,"g","contourbg"),u=f.selectAll("path").data(T.coloring==="fill"?[0]:[]);u.enter().append("path"),u.exit().remove(),u.attr("d","M"+_.join("L")+"Z").style("stroke","none")}function p(C,_,T,f){var u=f.coloring==="fill"||f.type==="constraint"&&f._operation!=="=",A="M"+T.join("L")+"Z";u&&s(_,f);var b=v.ensureSingle(C,"g","contourfill"),z=b.selectAll("path").data(u?_:[]);z.enter().append("path"),z.exit().remove(),z.each(function(I){var N=(I.prefixBoundary?A:"")+g(I,T);N?V.select(this).attr("d",N).style("stroke","none"):V.select(this).remove()})}function g(C,_){var T="",f=0,u=C.edgepaths.map(function(Q,re){return re}),A=!0,b,z,I,N,R,B;function F(Q){return Math.abs(Q[1]-_[0][1])<.01}function P(Q){return Math.abs(Q[1]-_[2][1])<.01}function j(Q){return Math.abs(Q[0]-_[0][0])<.01}function U(Q){return Math.abs(Q[0]-_[2][0])<.01}for(;u.length;){for(B=x.smoothopen(C.edgepaths[f],C.smoothing),T+=A?B:B.replace(/^M/,"L"),u.splice(u.indexOf(f),1),b=C.edgepaths[f][C.edgepaths[f].length-1],N=-1,I=0;I<4;I++){if(!b){v.log("Missing end?",f,C);break}for(F(b)&&!U(b)?z=_[1]:j(b)?z=_[0]:P(b)?z=_[3]:U(b)&&(z=_[2]),R=0;R=0&&(z=Z,N=R):Math.abs(b[1]-z[1])<.01?Math.abs(b[1]-Z[1])<.01&&(Z[0]-b[0])*(z[0]-Z[0])>=0&&(z=Z,N=R):v.log("endpt to newendpt is not vert. or horz.",b,z,Z)}if(b=z,N>=0)break;T+="L"+z}if(N===C.edgepaths.length){v.log("unclosed perimeter path");break}f=N,A=u.indexOf(f)===-1,A&&(f=u[0],T+="Z")}for(f=0;fm.MAXCOST*2)break;F&&(z/=2),b=N-z/2,I=b+z*1.5}if(B<=m.MAXCOST)return R};function w(C,_,T,f){var u=_.width/2,A=_.height/2,b=C.x,z=C.y,I=C.theta,N=Math.cos(I)*u,R=Math.sin(I)*u,B=(b>f.center?f.right-b:b-f.left)/(N+Math.abs(Math.sin(I)*A)),F=(z>f.middle?f.bottom-z:z-f.top)/(Math.abs(R)+Math.cos(I)*A);if(B<1||F<1)return 1/0;var P=m.EDGECOST*(1/(B-1)+1/(F-1));P+=m.ANGLECOST*I*I;for(var j=b-N,U=z-R,Z=b+N,Q=z+R,re=0;re=S)&&(t<=w&&(t=w),a>=S&&(a=S),n=Math.floor((a-t)/r)+1,o=0),i=0;iw&&(h.unshift(w),p.unshift(p[0])),h[h.length-1]2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(c=parseFloat(s.value[0]),s.value=[c,c+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:v(s.value)&&(c=parseFloat(s.value),s.value=[c,c+1])):(o("contours.value",0),v(s.value)||(t(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),MS=Ee({"src/traces/contour/defaults.js"(J,V){"use strict";var v=Vr(),x=u1(),E=Ih(),k=Xx(),l=T1(),e=A1(),t=nm(),a=am();V.exports=function(n,o,s,c){function m(i,w){return v.coerce(n,o,a,i,w)}function h(i){return v.coerce2(n,o,a,i)}var p=x(n,o,m,c);if(!p){o.visible=!1;return}E(n,o,c,m),m("xhoverformat"),m("yhoverformat"),m("text"),m("hovertext"),m("hoverongaps"),m("hovertemplate"),m("hovertemplatefallback");var g=m("contours.type")==="constraint";m("connectgaps",v.isArray1D(o.z)),g?k(n,o,m,c,s):(l(n,o,m,h),e(n,o,m,c)),o.contours&&o.contours.coloring==="heatmap"&&t(m,c),m("zorder")}}}),SS=Ee({"src/traces/contour/index.js"(J,V){"use strict";V.exports={attributes:am(),supplyDefaults:MS(),calc:jx(),plot:M1().plot,style:S1(),colorbar:E1(),hoverPoints:Yx(),moduleType:"trace",name:"contour",basePlotModule:Mu(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),ES=Ee({"lib/contour.js"(J,V){"use strict";V.exports=SS()}}),$x=Ee({"src/traces/scatterternary/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:E}=Cs(),k=Yh(),l=ou(),e=ia(),t=$s(),a=kc().dash,r=vo().extendFlat,n=l.marker,o=l.line,s=n.line;V.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:r({},l.mode,{dflt:"markers"}),text:r({},l.text,{}),texttemplate:x({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:r({},l.hovertext,{}),line:{color:o.color,width:o.width,dash:a,backoff:o.backoff,shape:r({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:l.connectgaps,cliponaxis:l.cliponaxis,fill:r({},l.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:k(),marker:r({symbol:n.symbol,opacity:n.opacity,angle:n.angle,angleref:n.angleref,standoff:n.standoff,maxdisplayed:n.maxdisplayed,size:n.size,sizeref:n.sizeref,sizemin:n.sizemin,sizemode:n.sizemode,line:r({width:s.width,dash:s.dash,editType:"calc"},t("marker.line")),gradient:n.gradient,editType:"calc"},t("marker")),textfont:l.textfont,textposition:l.textposition,selected:l.selected,unselected:l.unselected,hoverinfo:r({},e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:l.hoveron,hovertemplate:v(),hovertemplatefallback:E()}}}),kS=Ee({"src/traces/scatterternary/defaults.js"(J,V){"use strict";var v=Vr(),x=Wh(),E=al(),k=gh(),l=Rh(),e=Up(),t=Fh(),a=Xh(),r=$x();V.exports=function(o,s,c,m){function h(C,_){return v.coerce(o,s,r,C,_)}var p=h("a"),g=h("b"),i=h("c"),w;if(p?(w=p.length,g?(w=Math.min(w,g.length),i&&(w=Math.min(w,i.length))):i?w=Math.min(w,i.length):w=0):g&&i&&(w=Math.min(g.length,i.length)),!w){s.visible=!1;return}s._length=w,h("sum"),h("text"),h("hovertext"),s.hoveron!=="fills"&&(h("hovertemplate"),h("hovertemplatefallback"));var S=w"),a.hovertemplate=m.hovertemplate,t}}}),IS=Ee({"src/traces/scatterternary/event_data.js"(J,V){"use strict";V.exports=function(x,E,k,l,e){if(E.xa&&(x.xaxis=E.xa),E.ya&&(x.yaxis=E.ya),l[e]){var t=l[e];x.a=t.a,x.b=t.b,x.c=t.c}else x.a=E.a,x.b=E.b,x.c=E.c;return x}}}),RS=Ee({"src/plots/ternary/ternary.js"(J,V){"use strict";var v=Hn(),x=Ri(),E=Vr(),k=E.strTranslate,l=E._,e=Qa(),t=yo(),a=Hh(),r=vo().extendFlat,n=vl(),o=uo(),s=qf(),c=$l(),m=Gh(),h=m.freeMode,p=m.rectMode,g=Lv(),i=uc().prepSelect,w=uc().selectOnClick,S=uc().clearOutline,M=uc().clearSelectionsCache,C=tc();function _(F,P){this.id=F.id,this.graphDiv=F.graphDiv,this.init(P),this.makeFramework(P),this.updateFx(P),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}V.exports=_;var T=_.prototype;T.init=function(F){this.container=F._ternarylayer,this.defs=F._defs,this.layoutId=F._uid,this.traceHash={},this.layers={}},T.plot=function(F,P){var j=this,U=P[j.id],Z=P._size;j._hasClipOnAxisFalse=!1;for(var Q=0;Qf*H?(ne=H,ee=ne*f):(ee=oe,ne=ee/f),fe=re*ee/oe,ye=ae*ne/H,q=P.l+P.w*Z-ee/2,$=P.t+P.h*(1-Q)-ne/2,j.x0=q,j.y0=$,j.w=ee,j.h=ne,j.sum=X,j.xaxis={type:"linear",range:[K+2*Y-X,X-K-2*G],domain:[Z-fe/2,Z+fe/2],_id:"x"},a(j.xaxis,j.graphDiv._fullLayout),j.xaxis.setScale(),j.xaxis.isPtWithinRange=function(se){return se.a>=j.aaxis.range[0]&&se.a<=j.aaxis.range[1]&&se.b>=j.baxis.range[1]&&se.b<=j.baxis.range[0]&&se.c>=j.caxis.range[1]&&se.c<=j.caxis.range[0]},j.yaxis={type:"linear",range:[K,X-G-Y],domain:[Q-ye/2,Q+ye/2],_id:"y"},a(j.yaxis,j.graphDiv._fullLayout),j.yaxis.setScale(),j.yaxis.isPtWithinRange=function(){return!0};var xe=j.yaxis.domain[0],Ae=j.aaxis=r({},F.aaxis,{range:[K,X-G-Y],side:"left",tickangle:(+F.aaxis.tickangle||0)-30,domain:[xe,xe+ye*f],anchor:"free",position:0,_id:"y",_length:ee});a(Ae,j.graphDiv._fullLayout),Ae.setScale();var Me=j.baxis=r({},F.baxis,{range:[X-K-Y,G],side:"bottom",domain:j.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ee});a(Me,j.graphDiv._fullLayout),Me.setScale();var Ie=j.caxis=r({},F.caxis,{range:[X-K-G,Y],side:"right",tickangle:(+F.caxis.tickangle||0)+30,domain:[xe,xe+ye*f],anchor:"free",position:0,_id:"y",_length:ee});a(Ie,j.graphDiv._fullLayout),Ie.setScale();var Ue="M"+q+","+($+ne)+"h"+ee+"l-"+ee/2+",-"+ne+"Z";j.clipDef.select("path").attr("d",Ue),j.layers.plotbg.select("path").attr("d",Ue);var qe="M0,"+ne+"h"+ee+"l-"+ee/2+",-"+ne+"Z";j.clipDefRelative.select("path").attr("d",qe);var ke=k(q,$);j.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",ke),j.clipDefRelative.select("path").attr("transform",null);var ge=k(q-Me._offset,$+ne);j.layers.baxis.attr("transform",ge),j.layers.bgrid.attr("transform",ge);var ue=k(q+ee/2,$)+"rotate(30)"+k(0,-Ae._offset);j.layers.aaxis.attr("transform",ue),j.layers.agrid.attr("transform",ue);var ve=k(q+ee/2,$)+"rotate(-30)"+k(0,-Ie._offset);j.layers.caxis.attr("transform",ve),j.layers.cgrid.attr("transform",ve),j.drawAxes(!0),j.layers.aline.select("path").attr("d",Ae.showline?"M"+q+","+($+ne)+"l"+ee/2+",-"+ne:"M0,0").call(e.stroke,Ae.linecolor||"#000").style("stroke-width",(Ae.linewidth||0)+"px"),j.layers.bline.select("path").attr("d",Me.showline?"M"+q+","+($+ne)+"h"+ee:"M0,0").call(e.stroke,Me.linecolor||"#000").style("stroke-width",(Me.linewidth||0)+"px"),j.layers.cline.select("path").attr("d",Ie.showline?"M"+(q+ee/2)+","+$+"l"+ee/2+","+ne:"M0,0").call(e.stroke,Ie.linecolor||"#000").style("stroke-width",(Ie.linewidth||0)+"px"),j.graphDiv._context.staticPlot||j.initInteractions(),t.setClipUrl(j.layers.frontplot,j._hasClipOnAxisFalse?null:j.clipId,j.graphDiv)},T.drawAxes=function(F){var P=this,j=P.graphDiv,U=P.id.slice(7)+"title",Z=P.layers,Q=P.aaxis,re=P.baxis,ae=P.caxis;if(P.drawAx(Q),P.drawAx(re),P.drawAx(ae),F){var oe=Math.max(Q.showticklabels?Q.tickfont.size/2:0,(ae.showticklabels?ae.tickfont.size*.75:0)+(ae.ticks==="outside"?ae.ticklen*.87:0)),H=(re.showticklabels?re.tickfont.size:0)+(re.ticks==="outside"?re.ticklen:0)+3;Z["a-title"]=g.draw(j,"a"+U,{propContainer:Q,propName:P.id+".aaxis.title.text",placeholder:l(j,"Click to enter Component A title"),attributes:{x:P.x0+P.w/2,y:P.y0-Q.title.font.size/3-oe,"text-anchor":"middle"}}),Z["b-title"]=g.draw(j,"b"+U,{propContainer:re,propName:P.id+".baxis.title.text",placeholder:l(j,"Click to enter Component B title"),attributes:{x:P.x0-H,y:P.y0+P.h+re.title.font.size*.83+H,"text-anchor":"middle"}}),Z["c-title"]=g.draw(j,"c"+U,{propContainer:ae,propName:P.id+".caxis.title.text",placeholder:l(j,"Click to enter Component C title"),attributes:{x:P.x0+P.w+H,y:P.y0+P.h+ae.title.font.size*.83+H,"text-anchor":"middle"}})}},T.drawAx=function(F){var P=this,j=P.graphDiv,U=F._name,Z=U.charAt(0),Q=F._id,re=P.layers[U],ae=30,oe=Z+"tickLayout",H=u(F);P[oe]!==H&&(re.selectAll("."+Q+"tick").remove(),P[oe]=H),F.setScale();var X=o.calcTicks(F),K=o.clipEnds(F,X),G=o.makeTransTickFn(F),Y=o.getTickSigns(F)[2],q=E.deg2rad(ae),$=Y*(F.linewidth||1)/2,ee=Y*F.ticklen,ne=P.w,fe=P.h,ye=Z==="b"?"M0,"+$+"l"+Math.sin(q)*ee+","+Math.cos(q)*ee:"M"+$+",0l"+Math.cos(q)*ee+","+-Math.sin(q)*ee,xe={a:"M0,0l"+fe+",-"+ne/2,b:"M0,0l-"+ne/2+",-"+fe,c:"M0,0l-"+fe+","+ne/2}[Z];o.drawTicks(j,F,{vals:F.ticks==="inside"?K:X,layer:re,path:ye,transFn:G,crisp:!1}),o.drawGrid(j,F,{vals:K,layer:P.layers[Z+"grid"],path:xe,transFn:G,crisp:!1}),o.drawLabels(j,F,{vals:X,layer:re,transFn:G,labelFns:o.makeLabelFns(F,0,ae)})};function u(F){return F.ticks+String(F.ticklen)+String(F.showticklabels)}var A=C.MINZOOM/2+.87,b="m-0.87,.5h"+A+"v3h-"+(A+5.2)+"l"+(A/2+2.6)+",-"+(A*.87+4.5)+"l2.6,1.5l-"+A/2+","+A*.87+"Z",z="m0.87,.5h-"+A+"v3h"+(A+5.2)+"l-"+(A/2+2.6)+",-"+(A*.87+4.5)+"l-2.6,1.5l"+A/2+","+A*.87+"Z",I="m0,1l"+A/2+","+A*.87+"l2.6,-1.5l-"+(A/2+2.6)+",-"+(A*.87+4.5)+"l-"+(A/2+2.6)+","+(A*.87+4.5)+"l2.6,1.5l"+A/2+",-"+A*.87+"Z",N="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",R=!0;T.clearOutline=function(){M(this.dragOptions),S(this.dragOptions.gd)},T.initInteractions=function(){var F=this,P=F.layers.plotbg.select("path").node(),j=F.graphDiv,U=j._fullLayout._zoomlayer,Z,Q;this.dragOptions={element:P,gd:j,plotinfo:{id:F.id,domain:j._fullLayout[F.id].domain,xaxis:F.xaxis,yaxis:F.yaxis},subplot:F.id,prepFn:function(ge,ue,ve){F.dragOptions.xaxes=[F.xaxis],F.dragOptions.yaxes=[F.yaxis],Z=j._fullLayout._invScaleX,Q=j._fullLayout._invScaleY;var se=F.dragOptions.dragmode=j._fullLayout.dragmode;h(se)?F.dragOptions.minDrag=1:F.dragOptions.minDrag=void 0,se==="zoom"?(F.dragOptions.moveFn=Me,F.dragOptions.clickFn=ne,F.dragOptions.doneFn=Ie,fe(ge,ue,ve)):se==="pan"?(F.dragOptions.moveFn=qe,F.dragOptions.clickFn=ne,F.dragOptions.doneFn=ke,Ue(),F.clearOutline(j)):(p(se)||h(se))&&i(ge,ue,ve,F.dragOptions,se)}};var re,ae,oe,H,X,K,G,Y,q,$;function ee(ge){var ue={};return ue[F.id+".aaxis.min"]=ge.a,ue[F.id+".baxis.min"]=ge.b,ue[F.id+".caxis.min"]=ge.c,ue}function ne(ge,ue){var ve=j._fullLayout.clickmode;B(j),ge===2&&(j.emit("plotly_doubleclick",null),x.call("_guiRelayout",j,ee({a:0,b:0,c:0}))),ve.indexOf("select")>-1&&ge===1&&w(ue,j,[F.xaxis],[F.yaxis],F.id,F.dragOptions),ve.indexOf("event")>-1&&c.click(j,ue,F.id)}function fe(ge,ue,ve){var se=P.getBoundingClientRect();re=ue-se.left,ae=ve-se.top,j._fullLayout._calcInverseTransform(j);var Te=j._fullLayout._invTransform,Fe=E.apply3DTransform(Te)(re,ae);re=Fe[0],ae=Fe[1],oe={a:F.aaxis.range[0],b:F.baxis.range[1],c:F.caxis.range[1]},X=oe,H=F.aaxis.range[1]-oe.a,K=e.luminosity(F.graphDiv._fullLayout[F.id].bgcolor),G="M0,"+F.h+"L"+F.w/2+", 0L"+F.w+","+F.h+"Z",Y=!1,q=U.append("path").attr("class","zoombox").attr("transform",k(F.x0,F.y0)).style({fill:K>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",G),$=U.append("path").attr("class","zoombox-corners").attr("transform",k(F.x0,F.y0)).style({fill:e.background,stroke:e.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),F.clearOutline(j)}function ye(ge,ue){return 1-ue/F.h}function xe(ge,ue){return 1-(ge+(F.h-ue)/Math.sqrt(3))/F.w}function Ae(ge,ue){return(ge-(F.h-ue)/Math.sqrt(3))/F.w}function Me(ge,ue){var ve=re+ge*Z,se=ae+ue*Q,Te=Math.max(0,Math.min(1,ye(re,ae),ye(ve,se))),Fe=Math.max(0,Math.min(1,xe(re,ae),xe(ve,se))),We=Math.max(0,Math.min(1,Ae(re,ae),Ae(ve,se))),Ge=(Te/2+We)*F.w,gt=(1-Te/2-Fe)*F.w,mt=(Ge+gt)/2,Tt=gt-Ge,At=(1-Te)*F.h,Kt=At-Tt/f;Tt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),$.transition().style("opacity",1).duration(200),Y=!0),j.emit("plotly_relayouting",ee(X))}function Ie(){B(j),X!==oe&&(x.call("_guiRelayout",j,ee(X)),R&&j.data&&j._context.showTips&&(E.notifier(l(j,"Double-click to zoom back out"),"long",j),R=!1))}function Ue(){oe={a:F.aaxis.range[0],b:F.baxis.range[1],c:F.caxis.range[1]},X=oe}function qe(ge,ue){var ve=ge/F.xaxis._m,se=ue/F.yaxis._m;X={a:oe.a-se,b:oe.b+(ve+se)/2,c:oe.c-(ve-se)/2};var Te=[X.a,X.b,X.c].sort(E.sorterAsc),Fe={a:Te.indexOf(X.a),b:Te.indexOf(X.b),c:Te.indexOf(X.c)};Te[0]<0&&(Te[1]+Te[0]/2<0?(Te[2]+=Te[0]+Te[1],Te[0]=Te[1]=0):(Te[2]+=Te[0]/2,Te[1]+=Te[0]/2,Te[0]=0),X={a:Te[Fe.a],b:Te[Fe.b],c:Te[Fe.c]},ue=(oe.a-X.a)*F.yaxis._m,ge=(oe.c-X.c-oe.b+X.b)*F.xaxis._m);var We=k(F.x0+ge,F.y0+ue);F.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",We);var Ge=k(-ge,-ue);F.clipDefRelative.select("path").attr("transform",Ge),F.aaxis.range=[X.a,F.sum-X.b-X.c],F.baxis.range=[F.sum-X.a-X.c,X.b],F.caxis.range=[F.sum-X.a-X.b,X.c],F.drawAxes(!1),F._hasClipOnAxisFalse&&F.plotContainer.select(".scatterlayer").selectAll(".trace").call(t.hideOutsideRangePoints,F),j.emit("plotly_relayouting",ee(X))}function ke(){x.call("_guiRelayout",j,ee(X))}P.onmousemove=function(ge){c.hover(j,ge,F.id),j._fullLayout._lasthover=P,j._fullLayout._hoversubplot=F.id},P.onmouseout=function(ge){j._dragging||s.unhover(j,ge)},s.init(this.dragOptions)};function B(F){v.select(F).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),Zx=Ee({"src/plots/ternary/layout_attributes.js"(J,V){"use strict";var v=rs(),x=kl().attributes,E=Gc(),k=El().overrideAll,l=vo().extendFlat,e={title:{text:E.title.text,font:E.title.font},color:E.color,tickmode:E.minor.tickmode,nticks:l({},E.nticks,{dflt:6,min:1}),tick0:E.tick0,dtick:E.dtick,tickvals:E.tickvals,ticktext:E.ticktext,ticks:E.ticks,ticklen:E.ticklen,tickwidth:E.tickwidth,tickcolor:E.tickcolor,ticklabelstep:E.ticklabelstep,showticklabels:E.showticklabels,labelalias:E.labelalias,showtickprefix:E.showtickprefix,tickprefix:E.tickprefix,showticksuffix:E.showticksuffix,ticksuffix:E.ticksuffix,showexponent:E.showexponent,exponentformat:E.exponentformat,minexponent:E.minexponent,separatethousands:E.separatethousands,tickfont:E.tickfont,tickangle:E.tickangle,tickformat:E.tickformat,tickformatstops:E.tickformatstops,hoverformat:E.hoverformat,showline:l({},E.showline,{dflt:!0}),linecolor:E.linecolor,linewidth:E.linewidth,showgrid:l({},E.showgrid,{dflt:!0}),gridcolor:E.gridcolor,gridwidth:E.gridwidth,griddash:E.griddash,layer:E.layer,min:{valType:"number",dflt:0,min:0}},t=V.exports=k({domain:x({name:"ternary"}),bgcolor:{valType:"color",dflt:v.background},sum:{valType:"number",dflt:1,min:0},aaxis:e,baxis:e,caxis:e},"plot","from-root");t.uirevision={valType:"any",editType:"none"},t.aaxis.uirevision=t.baxis.uirevision=t.caxis.uirevision={valType:"any",editType:"none"}}}),Bv=Ee({"src/plots/subplot_defaults.js"(J,V){"use strict";var v=Vr(),x=xs(),E=kl().defaults;V.exports=function(l,e,t,a){var r=a.type,n=a.attributes,o=a.handleDefaults,s=a.partition||"x",c=e._subplots[r],m=c.length,h=m&&c[0].replace(/\d+$/,""),p,g;function i(C,_){return v.coerce(p,g,n,C,_)}for(var w=0;w=w&&(T.min=0,f.min=0,u.min=0,m.aaxis&&delete m.aaxis.min,m.baxis&&delete m.baxis.min,m.caxis&&delete m.caxis.min)}function c(m,h,p,g){var i=n[h._name];function w(A,b){return E.coerce(m,h,i,A,b)}w("uirevision",g.uirevision),h.type="linear";var S=w("color"),M=S!==i.color.dflt?S:p.font.color,C=h._name,_=C.charAt(0).toUpperCase(),T="Component "+_,f=w("title.text",T);h._hovertitle=f===T?f:_,E.coerceFont(w,"title.font",p.font,{overrideDflt:{size:E.bigFont(p.font.size),color:M}}),w("min"),a(m,h,w,"linear"),e(m,h,w,"linear"),l(m,h,w,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),t(m,h,w,{outerTicks:!0});var u=w("showticklabels");u&&(E.coerceFont(w,"tickfont",p.font,{overrideDflt:{color:M}}),w("tickangle"),w("tickformat")),r(m,h,w,{dfltColor:S,bgColor:p.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),w("hoverformat"),w("layer")}}}),zS=Ee({"src/plots/ternary/index.js"(J){"use strict";var V=RS(),v=uf().getSubplotCalcData,x=Vr().counterRegex,E="ternary";J.name=E;var k=J.attr="subplot";J.idRoot=E,J.idRegex=J.attrRegex=x(E);var l=J.attributes={};l[k]={valType:"subplotid",dflt:"ternary",editType:"calc"},J.layoutAttributes=Zx(),J.supplyLayoutDefaults=FS(),J.plot=function(t){for(var a=t._fullLayout,r=t.calcdata,n=a._subplots[E],o=0;o0){var C=t.xa,_=t.ya,T,f,u,A,b;m.orientation==="h"?(b=a,T="y",u=_,f="x",A=C):(b=r,T="x",u=C,f="y",A=_);var z=c[t.index];if(b>=z.span[0]&&b<=z.span[1]){var I=x.extendFlat({},t),N=A.c2p(b,!0),R=l.getKdeValue(z,m,b),B=l.getPositionOnKdePath(z,m,N),F=u._offset,P=u._length;I[T+"0"]=B[0],I[T+"1"]=B[1],I[f+"0"]=I[f+"1"]=N,I[f+"Label"]=f+": "+E.hoverLabelText(A,b,m[f+"hoverformat"])+", "+c[0].t.labels.kde+" "+R.toFixed(3);for(var j=0,U=0;U path").each(function(p){if(!p.isBlank){var g=h.marker;v.select(this).call(E.fill,p.mc||g.color).call(E.stroke,p.mlc||g.line.color).call(x.dashLine,g.line.dash,p.mlw||g.line.width).style("opacity",h.selectedpoints&&!p.selected?k:1)}}),t(m,h,r),m.selectAll(".regions").each(function(){v.select(this).selectAll("path").style("stroke-width",0).call(E.fill,h.connector.fillcolor)}),m.selectAll(".lines").each(function(){var p=h.connector.line;x.lineGroupStyle(v.select(this).selectAll("path"),p.width,p.color,p.dash)})})}V.exports={style:a}}}),tE=Ee({"src/traces/funnel/hover.js"(J,V){"use strict";var v=Qa().opacity,x=Gp().hoverOnBars,E=Vr().formatPercent;V.exports=function(e,t,a,r,n){var o=x(e,t,a,r,n);if(o){var s=o.cd,c=s[0].trace,m=c.orientation==="h",h=o.index,p=s[h],g=m?"x":"y";o[g+"LabelVal"]=p.s,o.percentInitial=p.begR,o.percentInitialLabel=E(p.begR,1),o.percentPrevious=p.difR,o.percentPreviousLabel=E(p.difR,1),o.percentTotal=p.sumR,o.percentTotalLabel=E(p.sumR,1);var i=p.hi||c.hoverinfo,w=[];if(i&&i!=="none"&&i!=="skip"){var S=i==="all",M=i.split("+"),C=function(_){return S||M.indexOf(_)!==-1};C("percent initial")&&w.push(o.percentInitialLabel+" of initial"),C("percent previous")&&w.push(o.percentPreviousLabel+" of previous"),C("percent total")&&w.push(o.percentTotalLabel+" of total")}return o.extraText=w.join("
"),o.color=k(c,p),[o]}};function k(l,e){var t=l.marker,a=e.mc||t.color,r=e.mlc||t.line.color,n=e.mlw||t.line.width;if(v(a))return a;if(v(r)&&n)return r}}}),rE=Ee({"src/traces/funnel/event_data.js"(J,V){"use strict";V.exports=function(x,E){return x.x="xVal"in E?E.xVal:E.x,x.y="yVal"in E?E.yVal:E.y,"percentInitial"in E&&(x.percentInitial=E.percentInitial),"percentPrevious"in E&&(x.percentPrevious=E.percentPrevious),"percentTotal"in E&&(x.percentTotal=E.percentTotal),E.xa&&(x.xaxis=E.xa),E.ya&&(x.yaxis=E.ya),x}}}),nE=Ee({"src/traces/funnel/index.js"(J,V){"use strict";V.exports={attributes:Qx(),layoutAttributes:e2(),supplyDefaults:t2().supplyDefaults,crossTraceDefaults:t2().crossTraceDefaults,supplyLayoutDefaults:$S(),calc:KS(),crossTraceCalc:JS(),plot:QS(),style:eE().style,hoverPoints:tE(),eventData:rE(),selectPoints:Wp(),moduleType:"trace",name:"funnel",basePlotModule:Mu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),aE=Ee({"lib/funnel.js"(J,V){"use strict";V.exports=nE()}}),iE=Ee({"src/traces/waterfall/constants.js"(J,V){"use strict";V.exports={eventDataKeys:["initial","delta","final"]}}}),r2=Ee({"src/traces/waterfall/attributes.js"(J,V){"use strict";var v=Zh(),x=ou().line,E=ia(),k=Fl().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=Cs(),a=iE(),r=vo().extendFlat,n=Qa();function o(s){return{marker:{color:r({},v.marker.color,{arrayOk:!1,editType:"style"}),line:{color:r({},v.marker.line.color,{arrayOk:!1,editType:"style"}),width:r({},v.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}V.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,xhoverformat:k("x"),yhoverformat:k("y"),hovertext:v.hovertext,hovertemplate:l({},{keys:a.eventDataKeys}),hovertemplatefallback:t(),hoverinfo:r({},E.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:e({editType:"plot"},{keys:a.eventDataKeys.concat(["label"])}),texttemplatefallback:t({editType:"plot"}),text:v.text,textposition:v.textposition,insidetextanchor:v.insidetextanchor,textangle:v.textangle,textfont:v.textfont,insidetextfont:v.insidetextfont,outsidetextfont:v.outsidetextfont,constraintext:v.constraintext,cliponaxis:v.cliponaxis,orientation:v.orientation,offset:v.offset,width:v.width,increasing:o("increasing"),decreasing:o("decreasing"),totals:o("intermediate sums and total"),connector:{line:{color:r({},x.color,{dflt:n.defaultLine}),width:r({},x.width,{editType:"plot"}),dash:x.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,zorder:v.zorder}}}),n2=Ee({"src/traces/waterfall/layout_attributes.js"(J,V){"use strict";V.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}}}),$p=Ee({"src/constants/delta.js"(J,V){"use strict";V.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),a2=Ee({"src/traces/waterfall/defaults.js"(J,V){"use strict";var v=Vr(),x=Iv(),E=fh().handleText,k=Dv(),l=Ih(),e=r2(),t=Qa(),a=$p(),r=a.INCREASING.COLOR,n=a.DECREASING.COLOR,o="#4499FF";function s(h,p,g){h(p+".marker.color",g),h(p+".marker.line.color",t.defaultLine),h(p+".marker.line.width")}function c(h,p,g,i){function w(T,f){return v.coerce(h,p,e,T,f)}var S=k(h,p,i,w);if(!S){p.visible=!1;return}l(h,p,i,w),w("xhoverformat"),w("yhoverformat"),w("measure"),w("orientation",p.x&&!p.y?"h":"v"),w("base"),w("offset"),w("width"),w("text"),w("hovertext"),w("hovertemplate"),w("hovertemplatefallback");var M=w("textposition");E(h,p,i,w,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),p.textposition!=="none"&&(w("texttemplate"),w("texttemplatefallback"),p.texttemplate||w("textinfo")),s(w,"increasing",r),s(w,"decreasing",n),s(w,"totals",o);var C=w("connector.visible");if(C){w("connector.mode");var _=w("connector.line.width");_&&(w("connector.line.color"),w("connector.line.dash"))}w("zorder")}function m(h,p){var g,i;function w(M){return v.coerce(i._input,i,e,M)}if(p.waterfallmode==="group")for(var S=0;S0&&(w?b+="M"+u[0]+","+A[1]+"V"+A[0]:b+="M"+u[1]+","+A[0]+"H"+u[0]),S!=="between"&&(_.isSum||T path").each(function(p){if(!p.isBlank){var g=h[p.dir].marker;v.select(this).call(E.fill,g.color).call(E.stroke,g.line.color).call(x.dashLine,g.line.dash,g.line.width).style("opacity",h.selectedpoints&&!p.selected?k:1)}}),t(m,h,r),m.selectAll(".lines").each(function(){var p=h.connector.line;x.lineGroupStyle(v.select(this).selectAll("path"),p.width,p.color,p.dash)})})}V.exports={style:a}}}),fE=Ee({"src/traces/waterfall/hover.js"(J,V){"use strict";var v=uo().hoverLabelText,x=Qa().opacity,E=Gp().hoverOnBars,k=$p(),l={increasing:k.INCREASING.SYMBOL,decreasing:k.DECREASING.SYMBOL};V.exports=function(a,r,n,o,s){var c=E(a,r,n,o,s);if(!c)return;var m=c.cd,h=m[0].trace,p=h.orientation==="h",g=p?"x":"y",i=p?a.xa:a.ya;function w(z){return v(i,z,h[g+"hoverformat"])}var S=c.index,M=m[S],C=M.isSum?M.b+M.s:M.rawS;c.initial=M.b+M.s-C,c.delta=C,c.final=c.initial+c.delta;var _=w(Math.abs(c.delta));c.deltaLabel=C<0?"("+_+")":_,c.finalLabel=w(c.final),c.initialLabel=w(c.initial);var T=M.hi||h.hoverinfo,f=[];if(T&&T!=="none"&&T!=="skip"){var u=T==="all",A=T.split("+"),b=function(z){return u||A.indexOf(z)!==-1};M.isSum||(b("final")&&(p?!b("x"):!b("y"))&&f.push(c.finalLabel),b("delta")&&(C<0?f.push(c.deltaLabel+" "+l.decreasing):f.push(c.deltaLabel+" "+l.increasing)),b("initial")&&f.push("Initial: "+c.initialLabel))}return f.length&&(c.extraText=f.join("
")),c.color=e(h,M),[c]};function e(t,a){var r=t[a.dir].marker,n=r.color,o=r.line.color,s=r.line.width;if(x(n))return n;if(x(o)&&s)return o}}}),hE=Ee({"src/traces/waterfall/event_data.js"(J,V){"use strict";V.exports=function(x,E){return x.x="xVal"in E?E.xVal:E.x,x.y="yVal"in E?E.yVal:E.y,"initial"in E&&(x.initial=E.initial),"delta"in E&&(x.delta=E.delta),"final"in E&&(x.final=E.final),E.xa&&(x.xaxis=E.xa),E.ya&&(x.yaxis=E.ya),x}}}),dE=Ee({"src/traces/waterfall/index.js"(J,V){"use strict";V.exports={attributes:r2(),layoutAttributes:n2(),supplyDefaults:a2().supplyDefaults,crossTraceDefaults:a2().crossTraceDefaults,supplyLayoutDefaults:oE(),calc:sE(),crossTraceCalc:lE(),plot:uE(),style:cE().style,hoverPoints:fE(),eventData:hE(),selectPoints:Wp(),moduleType:"trace",name:"waterfall",basePlotModule:Mu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),vE=Ee({"lib/waterfall.js"(J,V){"use strict";V.exports=dE()}}),Zp=Ee({"src/traces/image/constants.js"(J,V){"use strict";V.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(v){return v.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(v){return v.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(v){return v.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(v){var x=v.slice(0,3);return x[1]=x[1]+"%",x[2]=x[2]+"%",x},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(v){var x=v.slice(0,4);return x[1]=x[1]+"%",x[2]=x[2]+"%",x},suffix:["\xB0","%","%",""]}}}}}),C1={};yn(C1,{default:()=>c2});var i2,o2,L1,s2,l2,P1,D1,I1,u2,c2,f2=In({"src/traces/image/attributes.ts"(){"use strict";i2=Yn(vo()),o2=Yn(ia()),L1=Yn(Cs()),s2=Yn(ou()),l2=Yn(Zp()),P1=["rgb","rgba","rgba256","hsl","hsla"],D1=[],I1=[];for(let J of P1){let V=l2.colormodel[J];D1.push(`For the \`${J}\` colormodel, it is [${(V.zminDflt||V.min).join(", ")}].`),I1.push(`For the \`${J}\` colormodel, it is [${(V.zmaxDflt||V.max).join(", ")}].`)}u2={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:P1,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.",D1.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.",I1.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,i2.extendFlat)({},o2.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,L1.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,L1.templatefallbackAttrs)(),zorder:s2.zorder},c2=u2}}),pE=Ee({"src/traces/image/defaults.js"(J,V){"use strict";var v=Vr(),x=(f2(),ra(C1)).default,E=Zp(),k=yd().IMAGE_URL_PREFIX;V.exports=function(e,t){function a(o,s){return v.coerce(e,t,x,o,s)}a("source"),t.source&&!t.source.match(k)&&delete t.source,t._hasSource=!!t.source;var r=a("z");if(t._hasZ=!(r===void 0||!r.length||!r[0]||!r[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}a("x0"),a("y0"),a("dx"),a("dy");var n;t._hasZ?(a("colormodel","rgb"),n=E.colormodel[t.colormodel],a("zmin",n.zminDflt||n.min),a("zmax",n.zmaxDflt||n.max)):t._hasSource&&(t.colormodel="rgba256",n=E.colormodel[t.colormodel],t.zmin=n.zminDflt,t.zmax=n.zmaxDflt),a("zsmooth"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),t._length=null,a("zorder")}}}),_d=Ee({"node_modules/inherits/inherits_browser.js"(J,V){typeof Object.create=="function"?V.exports=function(x,E){E&&(x.super_=E,x.prototype=Object.create(E.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}))}:V.exports=function(x,E){if(E){x.super_=E;var k=function(){};k.prototype=E.prototype,x.prototype=new k,x.prototype.constructor=x}}}}),h2=Ee({"node_modules/readable-stream/lib/internal/streams/stream-browser.js"(J,V){V.exports=kv().EventEmitter}}),mE=Ee({"node_modules/base64-js/index.js"(J){"use strict";J.byteLength=t,J.toByteArray=r,J.fromByteArray=s;var V=[],v=[],x=typeof Uint8Array<"u"?Uint8Array:Array,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(k=0,l=E.length;k0)throw new Error("Invalid string. Length must be a multiple of 4");var h=c.indexOf("=");h===-1&&(h=m);var p=h===m?0:4-h%4;return[h,p]}function t(c){var m=e(c),h=m[0],p=m[1];return(h+p)*3/4-p}function a(c,m,h){return(m+h)*3/4-h}function r(c){var m,h=e(c),p=h[0],g=h[1],i=new x(a(c,p,g)),w=0,S=g>0?p-4:p,M;for(M=0;M>16&255,i[w++]=m>>8&255,i[w++]=m&255;return g===2&&(m=v[c.charCodeAt(M)]<<2|v[c.charCodeAt(M+1)]>>4,i[w++]=m&255),g===1&&(m=v[c.charCodeAt(M)]<<10|v[c.charCodeAt(M+1)]<<4|v[c.charCodeAt(M+2)]>>2,i[w++]=m>>8&255,i[w++]=m&255),i}function n(c){return V[c>>18&63]+V[c>>12&63]+V[c>>6&63]+V[c&63]}function o(c,m,h){for(var p,g=[],i=m;iS?S:w+i));return p===1?(m=c[h-1],g.push(V[m>>2]+V[m<<4&63]+"==")):p===2&&(m=(c[h-2]<<8)+c[h-1],g.push(V[m>>10]+V[m>>4&63]+V[m<<2&63]+"=")),g.join("")}}}),gE=Ee({"node_modules/ieee754/index.js"(J){J.read=function(V,v,x,E,k){var l,e,t=k*8-E-1,a=(1<>1,n=-7,o=x?k-1:0,s=x?-1:1,c=V[v+o];for(o+=s,l=c&(1<<-n)-1,c>>=-n,n+=t;n>0;l=l*256+V[v+o],o+=s,n-=8);for(e=l&(1<<-n)-1,l>>=-n,n+=E;n>0;e=e*256+V[v+o],o+=s,n-=8);if(l===0)l=1-r;else{if(l===a)return e?NaN:(c?-1:1)*(1/0);e=e+Math.pow(2,E),l=l-r}return(c?-1:1)*e*Math.pow(2,l-E)},J.write=function(V,v,x,E,k,l){var e,t,a,r=l*8-k-1,n=(1<>1,s=k===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=E?0:l-1,m=E?1:-1,h=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===1/0?(t=isNaN(v)?1:0,e=n):(e=Math.floor(Math.log(v)/Math.LN2),v*(a=Math.pow(2,-e))<1&&(e--,a*=2),e+o>=1?v+=s/a:v+=s*Math.pow(2,1-o),v*a>=2&&(e++,a/=2),e+o>=n?(t=0,e=n):e+o>=1?(t=(v*a-1)*Math.pow(2,k),e=e+o):(t=v*Math.pow(2,o-1)*Math.pow(2,k),e=0));k>=8;V[x+c]=t&255,c+=m,t/=256,k-=8);for(e=e<0;V[x+c]=e&255,c+=m,e/=256,r-=8);V[x+c-m]|=h*128}}}),Nv=Ee({"node_modules/buffer/index.js"(J){"use strict";var V=mE(),v=gE(),x=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;J.Buffer=e,J.SlowBuffer=g,J.INSPECT_MAX_BYTES=50;var E=2147483647;J.kMaxLength=E,e.TYPED_ARRAY_SUPPORT=k(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function k(){try{let ue=new Uint8Array(1),ve={foo:function(){return 42}};return Object.setPrototypeOf(ve,Uint8Array.prototype),Object.setPrototypeOf(ue,ve),ue.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function l(ue){if(ue>E)throw new RangeError('The value "'+ue+'" is invalid for option "size"');let ve=new Uint8Array(ue);return Object.setPrototypeOf(ve,e.prototype),ve}function e(ue,ve,se){if(typeof ue=="number"){if(typeof ve=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return n(ue)}return t(ue,ve,se)}e.poolSize=8192;function t(ue,ve,se){if(typeof ue=="string")return o(ue,ve);if(ArrayBuffer.isView(ue))return c(ue);if(ue==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ue);if(Ie(ue,ArrayBuffer)||ue&&Ie(ue.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(ue,SharedArrayBuffer)||ue&&Ie(ue.buffer,SharedArrayBuffer)))return m(ue,ve,se);if(typeof ue=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Te=ue.valueOf&&ue.valueOf();if(Te!=null&&Te!==ue)return e.from(Te,ve,se);let Fe=h(ue);if(Fe)return Fe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ue[Symbol.toPrimitive]=="function")return e.from(ue[Symbol.toPrimitive]("string"),ve,se);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ue)}e.from=function(ue,ve,se){return t(ue,ve,se)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function a(ue){if(typeof ue!="number")throw new TypeError('"size" argument must be of type number');if(ue<0)throw new RangeError('The value "'+ue+'" is invalid for option "size"')}function r(ue,ve,se){return a(ue),ue<=0?l(ue):ve!==void 0?typeof se=="string"?l(ue).fill(ve,se):l(ue).fill(ve):l(ue)}e.alloc=function(ue,ve,se){return r(ue,ve,se)};function n(ue){return a(ue),l(ue<0?0:p(ue)|0)}e.allocUnsafe=function(ue){return n(ue)},e.allocUnsafeSlow=function(ue){return n(ue)};function o(ue,ve){if((typeof ve!="string"||ve==="")&&(ve="utf8"),!e.isEncoding(ve))throw new TypeError("Unknown encoding: "+ve);let se=i(ue,ve)|0,Te=l(se),Fe=Te.write(ue,ve);return Fe!==se&&(Te=Te.slice(0,Fe)),Te}function s(ue){let ve=ue.length<0?0:p(ue.length)|0,se=l(ve);for(let Te=0;Te=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return ue|0}function g(ue){return+ue!=ue&&(ue=0),e.alloc(+ue)}e.isBuffer=function(ve){return ve!=null&&ve._isBuffer===!0&&ve!==e.prototype},e.compare=function(ve,se){if(Ie(ve,Uint8Array)&&(ve=e.from(ve,ve.offset,ve.byteLength)),Ie(se,Uint8Array)&&(se=e.from(se,se.offset,se.byteLength)),!e.isBuffer(ve)||!e.isBuffer(se))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ve===se)return 0;let Te=ve.length,Fe=se.length;for(let We=0,Ge=Math.min(Te,Fe);WeFe.length?(e.isBuffer(Ge)||(Ge=e.from(Ge)),Ge.copy(Fe,We)):Uint8Array.prototype.set.call(Fe,Ge,We);else if(e.isBuffer(Ge))Ge.copy(Fe,We);else throw new TypeError('"list" argument must be an Array of Buffers');We+=Ge.length}return Fe};function i(ue,ve){if(e.isBuffer(ue))return ue.length;if(ArrayBuffer.isView(ue)||Ie(ue,ArrayBuffer))return ue.byteLength;if(typeof ue!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ue);let se=ue.length,Te=arguments.length>2&&arguments[2]===!0;if(!Te&&se===0)return 0;let Fe=!1;for(;;)switch(ve){case"ascii":case"latin1":case"binary":return se;case"utf8":case"utf-8":return fe(ue).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return se*2;case"hex":return se>>>1;case"base64":return Ae(ue).length;default:if(Fe)return Te?-1:fe(ue).length;ve=(""+ve).toLowerCase(),Fe=!0}}e.byteLength=i;function w(ue,ve,se){let Te=!1;if((ve===void 0||ve<0)&&(ve=0),ve>this.length||((se===void 0||se>this.length)&&(se=this.length),se<=0)||(se>>>=0,ve>>>=0,se<=ve))return"";for(ue||(ue="utf8");;)switch(ue){case"hex":return F(this,ve,se);case"utf8":case"utf-8":return z(this,ve,se);case"ascii":return R(this,ve,se);case"latin1":case"binary":return B(this,ve,se);case"base64":return b(this,ve,se);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,ve,se);default:if(Te)throw new TypeError("Unknown encoding: "+ue);ue=(ue+"").toLowerCase(),Te=!0}}e.prototype._isBuffer=!0;function S(ue,ve,se){let Te=ue[ve];ue[ve]=ue[se],ue[se]=Te}e.prototype.swap16=function(){let ve=this.length;if(ve%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let se=0;sese&&(ve+=" ... "),""},x&&(e.prototype[x]=e.prototype.inspect),e.prototype.compare=function(ve,se,Te,Fe,We){if(Ie(ve,Uint8Array)&&(ve=e.from(ve,ve.offset,ve.byteLength)),!e.isBuffer(ve))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ve);if(se===void 0&&(se=0),Te===void 0&&(Te=ve?ve.length:0),Fe===void 0&&(Fe=0),We===void 0&&(We=this.length),se<0||Te>ve.length||Fe<0||We>this.length)throw new RangeError("out of range index");if(Fe>=We&&se>=Te)return 0;if(Fe>=We)return-1;if(se>=Te)return 1;if(se>>>=0,Te>>>=0,Fe>>>=0,We>>>=0,this===ve)return 0;let Ge=We-Fe,gt=Te-se,mt=Math.min(Ge,gt),Tt=this.slice(Fe,We),At=ve.slice(se,Te);for(let Kt=0;Kt2147483647?se=2147483647:se<-2147483648&&(se=-2147483648),se=+se,Ue(se)&&(se=Fe?0:ue.length-1),se<0&&(se=ue.length+se),se>=ue.length){if(Fe)return-1;se=ue.length-1}else if(se<0)if(Fe)se=0;else return-1;if(typeof ve=="string"&&(ve=e.from(ve,Te)),e.isBuffer(ve))return ve.length===0?-1:C(ue,ve,se,Te,Fe);if(typeof ve=="number")return ve=ve&255,typeof Uint8Array.prototype.indexOf=="function"?Fe?Uint8Array.prototype.indexOf.call(ue,ve,se):Uint8Array.prototype.lastIndexOf.call(ue,ve,se):C(ue,[ve],se,Te,Fe);throw new TypeError("val must be string, number or Buffer")}function C(ue,ve,se,Te,Fe){let We=1,Ge=ue.length,gt=ve.length;if(Te!==void 0&&(Te=String(Te).toLowerCase(),Te==="ucs2"||Te==="ucs-2"||Te==="utf16le"||Te==="utf-16le")){if(ue.length<2||ve.length<2)return-1;We=2,Ge/=2,gt/=2,se/=2}function mt(At,Kt){return We===1?At[Kt]:At.readUInt16BE(Kt*We)}let Tt;if(Fe){let At=-1;for(Tt=se;TtGe&&(se=Ge-gt),Tt=se;Tt>=0;Tt--){let At=!0;for(let Kt=0;KtFe&&(Te=Fe)):Te=Fe;let We=ve.length;Te>We/2&&(Te=We/2);let Ge;for(Ge=0;Ge>>0,isFinite(Te)?(Te=Te>>>0,Fe===void 0&&(Fe="utf8")):(Fe=Te,Te=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let We=this.length-se;if((Te===void 0||Te>We)&&(Te=We),ve.length>0&&(Te<0||se<0)||se>this.length)throw new RangeError("Attempt to write outside buffer bounds");Fe||(Fe="utf8");let Ge=!1;for(;;)switch(Fe){case"hex":return _(this,ve,se,Te);case"utf8":case"utf-8":return T(this,ve,se,Te);case"ascii":case"latin1":case"binary":return f(this,ve,se,Te);case"base64":return u(this,ve,se,Te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,ve,se,Te);default:if(Ge)throw new TypeError("Unknown encoding: "+Fe);Fe=(""+Fe).toLowerCase(),Ge=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function b(ue,ve,se){return ve===0&&se===ue.length?V.fromByteArray(ue):V.fromByteArray(ue.slice(ve,se))}function z(ue,ve,se){se=Math.min(ue.length,se);let Te=[],Fe=ve;for(;Fe239?4:We>223?3:We>191?2:1;if(Fe+gt<=se){let mt,Tt,At,Kt;switch(gt){case 1:We<128&&(Ge=We);break;case 2:mt=ue[Fe+1],(mt&192)===128&&(Kt=(We&31)<<6|mt&63,Kt>127&&(Ge=Kt));break;case 3:mt=ue[Fe+1],Tt=ue[Fe+2],(mt&192)===128&&(Tt&192)===128&&(Kt=(We&15)<<12|(mt&63)<<6|Tt&63,Kt>2047&&(Kt<55296||Kt>57343)&&(Ge=Kt));break;case 4:mt=ue[Fe+1],Tt=ue[Fe+2],At=ue[Fe+3],(mt&192)===128&&(Tt&192)===128&&(At&192)===128&&(Kt=(We&15)<<18|(mt&63)<<12|(Tt&63)<<6|At&63,Kt>65535&&Kt<1114112&&(Ge=Kt))}}Ge===null?(Ge=65533,gt=1):Ge>65535&&(Ge-=65536,Te.push(Ge>>>10&1023|55296),Ge=56320|Ge&1023),Te.push(Ge),Fe+=gt}return N(Te)}var I=4096;function N(ue){let ve=ue.length;if(ve<=I)return String.fromCharCode.apply(String,ue);let se="",Te=0;for(;TeTe)&&(se=Te);let Fe="";for(let We=ve;WeTe&&(ve=Te),se<0?(se+=Te,se<0&&(se=0)):se>Te&&(se=Te),sese)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(ve,se,Te){ve=ve>>>0,se=se>>>0,Te||j(ve,se,this.length);let Fe=this[ve],We=1,Ge=0;for(;++Ge>>0,se=se>>>0,Te||j(ve,se,this.length);let Fe=this[ve+--se],We=1;for(;se>0&&(We*=256);)Fe+=this[ve+--se]*We;return Fe},e.prototype.readUint8=e.prototype.readUInt8=function(ve,se){return ve=ve>>>0,se||j(ve,1,this.length),this[ve]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(ve,se){return ve=ve>>>0,se||j(ve,2,this.length),this[ve]|this[ve+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(ve,se){return ve=ve>>>0,se||j(ve,2,this.length),this[ve]<<8|this[ve+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(ve,se){return ve=ve>>>0,se||j(ve,4,this.length),(this[ve]|this[ve+1]<<8|this[ve+2]<<16)+this[ve+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(ve,se){return ve=ve>>>0,se||j(ve,4,this.length),this[ve]*16777216+(this[ve+1]<<16|this[ve+2]<<8|this[ve+3])},e.prototype.readBigUInt64LE=ke(function(ve){ve=ve>>>0,q(ve,"offset");let se=this[ve],Te=this[ve+7];(se===void 0||Te===void 0)&&$(ve,this.length-8);let Fe=se+this[++ve]*2**8+this[++ve]*2**16+this[++ve]*2**24,We=this[++ve]+this[++ve]*2**8+this[++ve]*2**16+Te*2**24;return BigInt(Fe)+(BigInt(We)<>>0,q(ve,"offset");let se=this[ve],Te=this[ve+7];(se===void 0||Te===void 0)&&$(ve,this.length-8);let Fe=se*2**24+this[++ve]*2**16+this[++ve]*2**8+this[++ve],We=this[++ve]*2**24+this[++ve]*2**16+this[++ve]*2**8+Te;return(BigInt(Fe)<>>0,se=se>>>0,Te||j(ve,se,this.length);let Fe=this[ve],We=1,Ge=0;for(;++Ge=We&&(Fe-=Math.pow(2,8*se)),Fe},e.prototype.readIntBE=function(ve,se,Te){ve=ve>>>0,se=se>>>0,Te||j(ve,se,this.length);let Fe=se,We=1,Ge=this[ve+--Fe];for(;Fe>0&&(We*=256);)Ge+=this[ve+--Fe]*We;return We*=128,Ge>=We&&(Ge-=Math.pow(2,8*se)),Ge},e.prototype.readInt8=function(ve,se){return ve=ve>>>0,se||j(ve,1,this.length),this[ve]&128?(255-this[ve]+1)*-1:this[ve]},e.prototype.readInt16LE=function(ve,se){ve=ve>>>0,se||j(ve,2,this.length);let Te=this[ve]|this[ve+1]<<8;return Te&32768?Te|4294901760:Te},e.prototype.readInt16BE=function(ve,se){ve=ve>>>0,se||j(ve,2,this.length);let Te=this[ve+1]|this[ve]<<8;return Te&32768?Te|4294901760:Te},e.prototype.readInt32LE=function(ve,se){return ve=ve>>>0,se||j(ve,4,this.length),this[ve]|this[ve+1]<<8|this[ve+2]<<16|this[ve+3]<<24},e.prototype.readInt32BE=function(ve,se){return ve=ve>>>0,se||j(ve,4,this.length),this[ve]<<24|this[ve+1]<<16|this[ve+2]<<8|this[ve+3]},e.prototype.readBigInt64LE=ke(function(ve){ve=ve>>>0,q(ve,"offset");let se=this[ve],Te=this[ve+7];(se===void 0||Te===void 0)&&$(ve,this.length-8);let Fe=this[ve+4]+this[ve+5]*2**8+this[ve+6]*2**16+(Te<<24);return(BigInt(Fe)<>>0,q(ve,"offset");let se=this[ve],Te=this[ve+7];(se===void 0||Te===void 0)&&$(ve,this.length-8);let Fe=(se<<24)+this[++ve]*2**16+this[++ve]*2**8+this[++ve];return(BigInt(Fe)<>>0,se||j(ve,4,this.length),v.read(this,ve,!0,23,4)},e.prototype.readFloatBE=function(ve,se){return ve=ve>>>0,se||j(ve,4,this.length),v.read(this,ve,!1,23,4)},e.prototype.readDoubleLE=function(ve,se){return ve=ve>>>0,se||j(ve,8,this.length),v.read(this,ve,!0,52,8)},e.prototype.readDoubleBE=function(ve,se){return ve=ve>>>0,se||j(ve,8,this.length),v.read(this,ve,!1,52,8)};function U(ue,ve,se,Te,Fe,We){if(!e.isBuffer(ue))throw new TypeError('"buffer" argument must be a Buffer instance');if(ve>Fe||veue.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(ve,se,Te,Fe){if(ve=+ve,se=se>>>0,Te=Te>>>0,!Fe){let gt=Math.pow(2,8*Te)-1;U(this,ve,se,Te,gt,0)}let We=1,Ge=0;for(this[se]=ve&255;++Ge>>0,Te=Te>>>0,!Fe){let gt=Math.pow(2,8*Te)-1;U(this,ve,se,Te,gt,0)}let We=Te-1,Ge=1;for(this[se+We]=ve&255;--We>=0&&(Ge*=256);)this[se+We]=ve/Ge&255;return se+Te},e.prototype.writeUint8=e.prototype.writeUInt8=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,1,255,0),this[se]=ve&255,se+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,2,65535,0),this[se]=ve&255,this[se+1]=ve>>>8,se+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,2,65535,0),this[se]=ve>>>8,this[se+1]=ve&255,se+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,4,4294967295,0),this[se+3]=ve>>>24,this[se+2]=ve>>>16,this[se+1]=ve>>>8,this[se]=ve&255,se+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,4,4294967295,0),this[se]=ve>>>24,this[se+1]=ve>>>16,this[se+2]=ve>>>8,this[se+3]=ve&255,se+4};function Z(ue,ve,se,Te,Fe){Y(ve,Te,Fe,ue,se,7);let We=Number(ve&BigInt(4294967295));ue[se++]=We,We=We>>8,ue[se++]=We,We=We>>8,ue[se++]=We,We=We>>8,ue[se++]=We;let Ge=Number(ve>>BigInt(32)&BigInt(4294967295));return ue[se++]=Ge,Ge=Ge>>8,ue[se++]=Ge,Ge=Ge>>8,ue[se++]=Ge,Ge=Ge>>8,ue[se++]=Ge,se}function Q(ue,ve,se,Te,Fe){Y(ve,Te,Fe,ue,se,7);let We=Number(ve&BigInt(4294967295));ue[se+7]=We,We=We>>8,ue[se+6]=We,We=We>>8,ue[se+5]=We,We=We>>8,ue[se+4]=We;let Ge=Number(ve>>BigInt(32)&BigInt(4294967295));return ue[se+3]=Ge,Ge=Ge>>8,ue[se+2]=Ge,Ge=Ge>>8,ue[se+1]=Ge,Ge=Ge>>8,ue[se]=Ge,se+8}e.prototype.writeBigUInt64LE=ke(function(ve,se=0){return Z(this,ve,se,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=ke(function(ve,se=0){return Q(this,ve,se,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(ve,se,Te,Fe){if(ve=+ve,se=se>>>0,!Fe){let mt=Math.pow(2,8*Te-1);U(this,ve,se,Te,mt-1,-mt)}let We=0,Ge=1,gt=0;for(this[se]=ve&255;++We>0)-gt&255;return se+Te},e.prototype.writeIntBE=function(ve,se,Te,Fe){if(ve=+ve,se=se>>>0,!Fe){let mt=Math.pow(2,8*Te-1);U(this,ve,se,Te,mt-1,-mt)}let We=Te-1,Ge=1,gt=0;for(this[se+We]=ve&255;--We>=0&&(Ge*=256);)ve<0&>===0&&this[se+We+1]!==0&&(gt=1),this[se+We]=(ve/Ge>>0)-gt&255;return se+Te},e.prototype.writeInt8=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,1,127,-128),ve<0&&(ve=255+ve+1),this[se]=ve&255,se+1},e.prototype.writeInt16LE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,2,32767,-32768),this[se]=ve&255,this[se+1]=ve>>>8,se+2},e.prototype.writeInt16BE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,2,32767,-32768),this[se]=ve>>>8,this[se+1]=ve&255,se+2},e.prototype.writeInt32LE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,4,2147483647,-2147483648),this[se]=ve&255,this[se+1]=ve>>>8,this[se+2]=ve>>>16,this[se+3]=ve>>>24,se+4},e.prototype.writeInt32BE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,4,2147483647,-2147483648),ve<0&&(ve=4294967295+ve+1),this[se]=ve>>>24,this[se+1]=ve>>>16,this[se+2]=ve>>>8,this[se+3]=ve&255,se+4},e.prototype.writeBigInt64LE=ke(function(ve,se=0){return Z(this,ve,se,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=ke(function(ve,se=0){return Q(this,ve,se,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function re(ue,ve,se,Te,Fe,We){if(se+Te>ue.length)throw new RangeError("Index out of range");if(se<0)throw new RangeError("Index out of range")}function ae(ue,ve,se,Te,Fe){return ve=+ve,se=se>>>0,Fe||re(ue,ve,se,4,34028234663852886e22,-34028234663852886e22),v.write(ue,ve,se,Te,23,4),se+4}e.prototype.writeFloatLE=function(ve,se,Te){return ae(this,ve,se,!0,Te)},e.prototype.writeFloatBE=function(ve,se,Te){return ae(this,ve,se,!1,Te)};function oe(ue,ve,se,Te,Fe){return ve=+ve,se=se>>>0,Fe||re(ue,ve,se,8,17976931348623157e292,-17976931348623157e292),v.write(ue,ve,se,Te,52,8),se+8}e.prototype.writeDoubleLE=function(ve,se,Te){return oe(this,ve,se,!0,Te)},e.prototype.writeDoubleBE=function(ve,se,Te){return oe(this,ve,se,!1,Te)},e.prototype.copy=function(ve,se,Te,Fe){if(!e.isBuffer(ve))throw new TypeError("argument should be a Buffer");if(Te||(Te=0),!Fe&&Fe!==0&&(Fe=this.length),se>=ve.length&&(se=ve.length),se||(se=0),Fe>0&&Fe=this.length)throw new RangeError("Index out of range");if(Fe<0)throw new RangeError("sourceEnd out of bounds");Fe>this.length&&(Fe=this.length),ve.length-se>>0,Te=Te===void 0?this.length:Te>>>0,ve||(ve=0);let We;if(typeof ve=="number")for(We=se;We2**32?Fe=K(String(se)):typeof se=="bigint"&&(Fe=String(se),(se>BigInt(2)**BigInt(32)||se<-(BigInt(2)**BigInt(32)))&&(Fe=K(Fe)),Fe+="n"),Te+=` It must be ${ve}. Received ${Fe}`,Te},RangeError);function K(ue){let ve="",se=ue.length,Te=ue[0]==="-"?1:0;for(;se>=Te+4;se-=3)ve=`_${ue.slice(se-3,se)}${ve}`;return`${ue.slice(0,se)}${ve}`}function G(ue,ve,se){q(ve,"offset"),(ue[ve]===void 0||ue[ve+se]===void 0)&&$(ve,ue.length-(se+1))}function Y(ue,ve,se,Te,Fe,We){if(ue>se||ue3?ve===0||ve===BigInt(0)?gt=`>= 0${Ge} and < 2${Ge} ** ${(We+1)*8}${Ge}`:gt=`>= -(2${Ge} ** ${(We+1)*8-1}${Ge}) and < 2 ** ${(We+1)*8-1}${Ge}`:gt=`>= ${ve}${Ge} and <= ${se}${Ge}`,new H.ERR_OUT_OF_RANGE("value",gt,ue)}G(Te,Fe,We)}function q(ue,ve){if(typeof ue!="number")throw new H.ERR_INVALID_ARG_TYPE(ve,"number",ue)}function $(ue,ve,se){throw Math.floor(ue)!==ue?(q(ue,se),new H.ERR_OUT_OF_RANGE(se||"offset","an integer",ue)):ve<0?new H.ERR_BUFFER_OUT_OF_BOUNDS:new H.ERR_OUT_OF_RANGE(se||"offset",`>= ${se?1:0} and <= ${ve}`,ue)}var ee=/[^+/0-9A-Za-z-_]/g;function ne(ue){if(ue=ue.split("=")[0],ue=ue.trim().replace(ee,""),ue.length<2)return"";for(;ue.length%4!==0;)ue=ue+"=";return ue}function fe(ue,ve){ve=ve||1/0;let se,Te=ue.length,Fe=null,We=[];for(let Ge=0;Ge55295&&se<57344){if(!Fe){if(se>56319){(ve-=3)>-1&&We.push(239,191,189);continue}else if(Ge+1===Te){(ve-=3)>-1&&We.push(239,191,189);continue}Fe=se;continue}if(se<56320){(ve-=3)>-1&&We.push(239,191,189),Fe=se;continue}se=(Fe-55296<<10|se-56320)+65536}else Fe&&(ve-=3)>-1&&We.push(239,191,189);if(Fe=null,se<128){if((ve-=1)<0)break;We.push(se)}else if(se<2048){if((ve-=2)<0)break;We.push(se>>6|192,se&63|128)}else if(se<65536){if((ve-=3)<0)break;We.push(se>>12|224,se>>6&63|128,se&63|128)}else if(se<1114112){if((ve-=4)<0)break;We.push(se>>18|240,se>>12&63|128,se>>6&63|128,se&63|128)}else throw new Error("Invalid code point")}return We}function ye(ue){let ve=[];for(let se=0;se>8,Fe=se%256,We.push(Fe),We.push(Te);return We}function Ae(ue){return V.toByteArray(ne(ue))}function Me(ue,ve,se,Te){let Fe;for(Fe=0;Fe=ve.length||Fe>=ue.length);++Fe)ve[Fe+se]=ue[Fe];return Fe}function Ie(ue,ve){return ue instanceof ve||ue!=null&&ue.constructor!=null&&ue.constructor.name!=null&&ue.constructor.name===ve.name}function Ue(ue){return ue!==ue}var qe=function(){let ue="0123456789abcdef",ve=new Array(256);for(let se=0;se<16;++se){let Te=se*16;for(let Fe=0;Fe<16;++Fe)ve[Te+Fe]=ue[se]+ue[Fe]}return ve}();function ke(ue){return typeof BigInt>"u"?ge:ue}function ge(){throw new Error("BigInt not supported")}}}),R1=Ee({"node_modules/has-symbols/shams.js"(J,V){"use strict";V.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var x={},E=Symbol("test"),k=Object(E);if(typeof E=="string"||Object.prototype.toString.call(E)!=="[object Symbol]"||Object.prototype.toString.call(k)!=="[object Symbol]")return!1;var l=42;x[E]=l;for(var e in x)return!1;if(typeof Object.keys=="function"&&Object.keys(x).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(x).length!==0)return!1;var t=Object.getOwnPropertySymbols(x);if(t.length!==1||t[0]!==E||!Object.prototype.propertyIsEnumerable.call(x,E))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(x,E);if(a.value!==l||a.enumerable!==!0)return!1}return!0}}}),sm=Ee({"node_modules/has-tostringtag/shams.js"(J,V){"use strict";var v=R1();V.exports=function(){return v()&&!!Symbol.toStringTag}}}),F1=Ee({"node_modules/es-object-atoms/index.js"(J,V){"use strict";V.exports=Object}}),yE=Ee({"node_modules/es-errors/index.js"(J,V){"use strict";V.exports=Error}}),_E=Ee({"node_modules/es-errors/eval.js"(J,V){"use strict";V.exports=EvalError}}),bE=Ee({"node_modules/es-errors/range.js"(J,V){"use strict";V.exports=RangeError}}),xE=Ee({"node_modules/es-errors/ref.js"(J,V){"use strict";V.exports=ReferenceError}}),d2=Ee({"node_modules/es-errors/syntax.js"(J,V){"use strict";V.exports=SyntaxError}}),Kp=Ee({"node_modules/es-errors/type.js"(J,V){"use strict";V.exports=TypeError}}),wE=Ee({"node_modules/es-errors/uri.js"(J,V){"use strict";V.exports=URIError}}),TE=Ee({"node_modules/math-intrinsics/abs.js"(J,V){"use strict";V.exports=Math.abs}}),AE=Ee({"node_modules/math-intrinsics/floor.js"(J,V){"use strict";V.exports=Math.floor}}),ME=Ee({"node_modules/math-intrinsics/max.js"(J,V){"use strict";V.exports=Math.max}}),SE=Ee({"node_modules/math-intrinsics/min.js"(J,V){"use strict";V.exports=Math.min}}),EE=Ee({"node_modules/math-intrinsics/pow.js"(J,V){"use strict";V.exports=Math.pow}}),kE=Ee({"node_modules/math-intrinsics/round.js"(J,V){"use strict";V.exports=Math.round}}),CE=Ee({"node_modules/math-intrinsics/isNaN.js"(J,V){"use strict";V.exports=Number.isNaN||function(x){return x!==x}}}),LE=Ee({"node_modules/math-intrinsics/sign.js"(J,V){"use strict";var v=CE();V.exports=function(E){return v(E)||E===0?E:E<0?-1:1}}}),PE=Ee({"node_modules/gopd/gOPD.js"(J,V){"use strict";V.exports=Object.getOwnPropertyDescriptor}}),Ov=Ee({"node_modules/gopd/index.js"(J,V){"use strict";var v=PE();if(v)try{v([],"length")}catch{v=null}V.exports=v}}),lm=Ee({"node_modules/es-define-property/index.js"(J,V){"use strict";var v=Object.defineProperty||!1;if(v)try{v({},"a",{value:1})}catch{v=!1}V.exports=v}}),DE=Ee({"node_modules/has-symbols/index.js"(J,V){"use strict";var v=typeof Symbol<"u"&&Symbol,x=R1();V.exports=function(){return typeof v!="function"||typeof Symbol!="function"||typeof v("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:x()}}}),v2=Ee({"node_modules/get-proto/Reflect.getPrototypeOf.js"(J,V){"use strict";V.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),p2=Ee({"node_modules/get-proto/Object.getPrototypeOf.js"(J,V){"use strict";var v=F1();V.exports=v.getPrototypeOf||null}}),IE=Ee({"node_modules/function-bind/implementation.js"(J,V){"use strict";var v="Function.prototype.bind called on incompatible ",x=Object.prototype.toString,E=Math.max,k="[object Function]",l=function(r,n){for(var o=[],s=0;s"u"||!T?v:T(Uint8Array),N={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":_&&T?T([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":z,"%AsyncGenerator%":z,"%AsyncGeneratorFunction%":z,"%AsyncIteratorPrototype%":z,"%Atomics%":typeof Atomics>"u"?v:Atomics,"%BigInt%":typeof BigInt>"u"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":E,"%eval%":eval,"%EvalError%":k,"%Float16Array%":typeof Float16Array>"u"?v:Float16Array,"%Float32Array%":typeof Float32Array>"u"?v:Float32Array,"%Float64Array%":typeof Float64Array>"u"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?v:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":z,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&T?T(T([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map>"u"||!_||!T?v:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":x,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":l,"%ReferenceError%":e,"%Reflect%":typeof Reflect>"u"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?v:Set,"%SetIteratorPrototype%":typeof Set>"u"||!_||!T?v:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&T?T(""[Symbol.iterator]()):v,"%Symbol%":_?Symbol:v,"%SyntaxError%":t,"%ThrowTypeError%":C,"%TypedArray%":I,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?v:Uint32Array,"%URIError%":r,"%WeakMap%":typeof WeakMap>"u"?v:WeakMap,"%WeakRef%":typeof WeakRef>"u"?v:WeakRef,"%WeakSet%":typeof WeakSet>"u"?v:WeakSet,"%Function.prototype.call%":b,"%Function.prototype.apply%":A,"%Object.defineProperty%":S,"%Object.getPrototypeOf%":f,"%Math.abs%":n,"%Math.floor%":o,"%Math.max%":s,"%Math.min%":c,"%Math.pow%":m,"%Math.round%":h,"%Math.sign%":p,"%Reflect.getPrototypeOf%":u};if(T)try{null.error}catch(G){R=T(T(G)),N["%Error.prototype%"]=R}var R,B=function G(Y){var q;if(Y==="%AsyncFunction%")q=i("async function () {}");else if(Y==="%GeneratorFunction%")q=i("function* () {}");else if(Y==="%AsyncGeneratorFunction%")q=i("async function* () {}");else if(Y==="%AsyncGenerator%"){var $=G("%AsyncGeneratorFunction%");$&&(q=$.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var ee=G("%AsyncGenerator%");ee&&T&&(q=T(ee.prototype))}return N[Y]=q,q},F={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=Jp(),j=g2(),U=P.call(b,Array.prototype.concat),Z=P.call(A,Array.prototype.splice),Q=P.call(b,String.prototype.replace),re=P.call(b,String.prototype.slice),ae=P.call(b,RegExp.prototype.exec),oe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,X=function(Y){var q=re(Y,0,1),$=re(Y,-1);if(q==="%"&&$!=="%")throw new t("invalid intrinsic syntax, expected closing `%`");if($==="%"&&q!=="%")throw new t("invalid intrinsic syntax, expected opening `%`");var ee=[];return Q(Y,oe,function(ne,fe,ye,xe){ee[ee.length]=ye?Q(xe,H,"$1"):fe||ne}),ee},K=function(Y,q){var $=Y,ee;if(j(F,$)&&(ee=F[$],$="%"+ee[0]+"%"),j(N,$)){var ne=N[$];if(ne===z&&(ne=B($)),typeof ne>"u"&&!q)throw new a("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:ee,name:$,value:ne}}throw new t("intrinsic "+Y+" does not exist!")};V.exports=function(Y,q){if(typeof Y!="string"||Y.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof q!="boolean")throw new a('"allowMissing" argument must be a boolean');if(ae(/^%?[^%]*%?$/,Y)===null)throw new t("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var $=X(Y),ee=$.length>0?$[0]:"",ne=K("%"+ee+"%",q),fe=ne.name,ye=ne.value,xe=!1,Ae=ne.alias;Ae&&(ee=Ae[0],Z($,U([0,1],Ae)));for(var Me=1,Ie=!0;Me<$.length;Me+=1){var Ue=$[Me],qe=re(Ue,0,1),ke=re(Ue,-1);if((qe==='"'||qe==="'"||qe==="`"||ke==='"'||ke==="'"||ke==="`")&&qe!==ke)throw new t("property names with quotes must have matching quotes");if((Ue==="constructor"||!Ie)&&(xe=!0),ee+="."+Ue,fe="%"+ee+"%",j(N,fe))ye=N[fe];else if(ye!=null){if(!(Ue in ye)){if(!q)throw new a("base intrinsic for "+Y+" exists, but the property is not available.");return}if(w&&Me+1>=$.length){var ge=w(ye,Ue);Ie=!!ge,Ie&&"get"in ge&&!("originalValue"in ge.get)?ye=ge.get:ye=ye[Ue]}else Ie=j(ye,Ue),ye=ye[Ue];Ie&&!xe&&(N[fe]=ye)}}return ye}}}),jv=Ee({"node_modules/call-bound/index.js"(J,V){"use strict";var v=j1(),x=N1(),E=x([v("%String.prototype.indexOf%")]);V.exports=function(l,e){var t=v(l,!!e);return typeof t=="function"&&E(l,".prototype.")>-1?x([t]):t}}}),zE=Ee({"node_modules/is-arguments/index.js"(J,V){"use strict";var v=sm()(),x=jv(),E=x("Object.prototype.toString"),k=function(a){return v&&a&&typeof a=="object"&&Symbol.toStringTag in a?!1:E(a)==="[object Arguments]"},l=function(a){return k(a)?!0:a!==null&&typeof a=="object"&&"length"in a&&typeof a.length=="number"&&a.length>=0&&E(a)!=="[object Array]"&&"callee"in a&&E(a.callee)==="[object Function]"},e=function(){return k(arguments)}();k.isLegacyArguments=l,V.exports=e?k:l}}),BE=Ee({"node_modules/is-regex/index.js"(J,V){"use strict";var v=jv(),x=sm()(),E=g2(),k=Ov(),l;x?(e=v("RegExp.prototype.exec"),t={},a=function(){throw t},r={toString:a,valueOf:a},typeof Symbol.toPrimitive=="symbol"&&(r[Symbol.toPrimitive]=a),l=function(c){if(!c||typeof c!="object")return!1;var m=k(c,"lastIndex"),h=m&&E(m,"value");if(!h)return!1;try{e(c,r)}catch(p){return p===t}}):(n=v("Object.prototype.toString"),o="[object RegExp]",l=function(c){return!c||typeof c!="object"&&typeof c!="function"?!1:n(c)===o});var e,t,a,r,n,o;V.exports=l}}),NE=Ee({"node_modules/safe-regex-test/index.js"(J,V){"use strict";var v=jv(),x=BE(),E=v("RegExp.prototype.exec"),k=Kp();V.exports=function(e){if(!x(e))throw new k("`regex` must be a RegExp");return function(a){return E(e,a)!==null}}}}),OE=Ee({"node_modules/generator-function/index.js"(J,V){"use strict";var v=function*(){}.constructor;V.exports=()=>v}}),jE=Ee({"node_modules/is-generator-function/index.js"(J,V){"use strict";var v=jv(),x=NE(),E=x(/^\s*(?:function)?\*/),k=sm()(),l=O1(),e=v("Object.prototype.toString"),t=v("Function.prototype.toString"),a=OE();V.exports=function(n){if(typeof n!="function")return!1;if(E(t(n)))return!0;if(!k){var o=e(n);return o==="[object GeneratorFunction]"}if(!l)return!1;var s=a();return s&&l(n)===s.prototype}}}),UE=Ee({"node_modules/is-callable/index.js"(J,V){"use strict";var v=Function.prototype.toString,x=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,E,k;if(typeof x=="function"&&typeof Object.defineProperty=="function")try{E=Object.defineProperty({},"length",{get:function(){throw k}}),k={},x(function(){throw 42},null,E)}catch(w){w!==k&&(x=null)}else x=null;var l=/^\s*class\b/,e=function(S){try{var M=v.call(S);return l.test(M)}catch{return!1}},t=function(S){try{return e(S)?!1:(v.call(S),!0)}catch{return!1}},a=Object.prototype.toString,r="[object Object]",n="[object Function]",o="[object GeneratorFunction]",s="[object HTMLAllCollection]",c="[object HTML document.all class]",m="[object HTMLCollection]",h=typeof Symbol=="function"&&!!Symbol.toStringTag,p=!(0 in[,]),g=function(){return!1};typeof document=="object"&&(i=document.all,a.call(i)===a.call(document.all)&&(g=function(S){if((p||!S)&&(typeof S>"u"||typeof S=="object"))try{var M=a.call(S);return(M===s||M===c||M===m||M===r)&&S("")==null}catch{}return!1}));var i;V.exports=x?function(S){if(g(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;try{x(S,null,E)}catch(M){if(M!==k)return!1}return!e(S)&&t(S)}:function(S){if(g(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;if(h)return t(S);if(e(S))return!1;var M=a.call(S);return M!==n&&M!==o&&!/^\[object HTML/.test(M)?!1:t(S)}}}),qE=Ee({"node_modules/for-each/index.js"(J,V){"use strict";var v=UE(),x=Object.prototype.toString,E=Object.prototype.hasOwnProperty,k=function(r,n,o){for(var s=0,c=r.length;s=3&&(s=o),t(r)?k(r,n,s):typeof r=="string"?l(r,n,s):e(r,n,s)}}}),VE=Ee({"node_modules/possible-typed-array-names/index.js"(J,V){"use strict";V.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}}),HE=Ee({"node_modules/available-typed-arrays/index.js"(J,V){"use strict";var v=VE(),x=typeof globalThis>"u"?window:globalThis;V.exports=function(){for(var k=[],l=0;l3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new E("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new E("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new E("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new E("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,c=!!k&&k(e,t);if(v)v(e,t,{configurable:o===null&&c?c.configurable:!o,enumerable:r===null&&c?c.enumerable:!r,value:a,writable:n===null&&c?c.writable:!n});else if(s||!r&&!n&&!o)e[t]=a;else throw new x("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),_2=Ee({"node_modules/has-property-descriptors/index.js"(J,V){"use strict";var v=lm(),x=function(){return!!v};x.hasArrayLengthDefineBug=function(){if(!v)return null;try{return v([],"length",{value:1}).length!==1}catch{return!0}},V.exports=x}}),GE=Ee({"node_modules/set-function-length/index.js"(J,V){"use strict";var v=j1(),x=y2(),E=_2()(),k=Ov(),l=Kp(),e=v("%Math.floor%");V.exports=function(a,r){if(typeof a!="function")throw new l("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||e(r)!==r)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in a&&k){var c=k(a,"length");c&&!c.configurable&&(o=!1),c&&!c.writable&&(s=!1)}return(o||s||!n)&&(E?x(a,"length",r,!0,!0):x(a,"length",r)),a}}}),WE=Ee({"node_modules/call-bind-apply-helpers/applyBind.js"(J,V){"use strict";var v=Jp(),x=B1(),E=m2();V.exports=function(){return E(v,x,arguments)}}}),um=Ee({"node_modules/call-bind/index.js"(J,V){"use strict";var v=GE(),x=lm(),E=N1(),k=WE();V.exports=function(e){var t=E(arguments),a=1+e.length-(arguments.length-1);return v(t,a>0?a:0,!0)},x?x(V.exports,"apply",{value:k}):V.exports.apply=k}}),b2=Ee({"node_modules/which-typed-array/index.js"(J,V){"use strict";var v=qE(),x=HE(),E=um(),k=jv(),l=Ov(),e=O1(),t=k("Object.prototype.toString"),a=sm()(),r=typeof globalThis>"u"?window:globalThis,n=x(),o=k("String.prototype.slice"),s=k("Array.prototype.indexOf",!0)||function(i,w){for(var S=0;S-1}V.exports=function(i){if(!i||typeof i!="object")return!1;if(!a){var w=o(t(i),8,-1);return p(w)?w:w!=="Object"?!1:h(i)}return l?m(i):null}}}),YE=Ee({"node_modules/is-typed-array/index.js"(J,V){"use strict";var v=b2();V.exports=function(E){return!!v(E)}}}),x2=Ee({"node_modules/util/support/types.js"(J){"use strict";var V=zE(),v=jE(),x=b2(),E=YE();function k(xe){return xe.call.bind(xe)}var l=typeof BigInt<"u",e=typeof Symbol<"u",t=k(Object.prototype.toString),a=k(Number.prototype.valueOf),r=k(String.prototype.valueOf),n=k(Boolean.prototype.valueOf);l&&(o=k(BigInt.prototype.valueOf));var o;e&&(s=k(Symbol.prototype.valueOf));var s;function c(xe,Ae){if(typeof xe!="object")return!1;try{return Ae(xe),!0}catch{return!1}}J.isArgumentsObject=V,J.isGeneratorFunction=v,J.isTypedArray=E;function m(xe){return typeof Promise<"u"&&xe instanceof Promise||xe!==null&&typeof xe=="object"&&typeof xe.then=="function"&&typeof xe.catch=="function"}J.isPromise=m;function h(xe){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(xe):E(xe)||Z(xe)}J.isArrayBufferView=h;function p(xe){return x(xe)==="Uint8Array"}J.isUint8Array=p;function g(xe){return x(xe)==="Uint8ClampedArray"}J.isUint8ClampedArray=g;function i(xe){return x(xe)==="Uint16Array"}J.isUint16Array=i;function w(xe){return x(xe)==="Uint32Array"}J.isUint32Array=w;function S(xe){return x(xe)==="Int8Array"}J.isInt8Array=S;function M(xe){return x(xe)==="Int16Array"}J.isInt16Array=M;function C(xe){return x(xe)==="Int32Array"}J.isInt32Array=C;function _(xe){return x(xe)==="Float32Array"}J.isFloat32Array=_;function T(xe){return x(xe)==="Float64Array"}J.isFloat64Array=T;function f(xe){return x(xe)==="BigInt64Array"}J.isBigInt64Array=f;function u(xe){return x(xe)==="BigUint64Array"}J.isBigUint64Array=u;function A(xe){return t(xe)==="[object Map]"}A.working=typeof Map<"u"&&A(new Map);function b(xe){return typeof Map>"u"?!1:A.working?A(xe):xe instanceof Map}J.isMap=b;function z(xe){return t(xe)==="[object Set]"}z.working=typeof Set<"u"&&z(new Set);function I(xe){return typeof Set>"u"?!1:z.working?z(xe):xe instanceof Set}J.isSet=I;function N(xe){return t(xe)==="[object WeakMap]"}N.working=typeof WeakMap<"u"&&N(new WeakMap);function R(xe){return typeof WeakMap>"u"?!1:N.working?N(xe):xe instanceof WeakMap}J.isWeakMap=R;function B(xe){return t(xe)==="[object WeakSet]"}B.working=typeof WeakSet<"u"&&B(new WeakSet);function F(xe){return B(xe)}J.isWeakSet=F;function P(xe){return t(xe)==="[object ArrayBuffer]"}P.working=typeof ArrayBuffer<"u"&&P(new ArrayBuffer);function j(xe){return typeof ArrayBuffer>"u"?!1:P.working?P(xe):xe instanceof ArrayBuffer}J.isArrayBuffer=j;function U(xe){return t(xe)==="[object DataView]"}U.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&U(new DataView(new ArrayBuffer(1),0,1));function Z(xe){return typeof DataView>"u"?!1:U.working?U(xe):xe instanceof DataView}J.isDataView=Z;var Q=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function re(xe){return t(xe)==="[object SharedArrayBuffer]"}function ae(xe){return typeof Q>"u"?!1:(typeof re.working>"u"&&(re.working=re(new Q)),re.working?re(xe):xe instanceof Q)}J.isSharedArrayBuffer=ae;function oe(xe){return t(xe)==="[object AsyncFunction]"}J.isAsyncFunction=oe;function H(xe){return t(xe)==="[object Map Iterator]"}J.isMapIterator=H;function X(xe){return t(xe)==="[object Set Iterator]"}J.isSetIterator=X;function K(xe){return t(xe)==="[object Generator]"}J.isGeneratorObject=K;function G(xe){return t(xe)==="[object WebAssembly.Module]"}J.isWebAssemblyCompiledModule=G;function Y(xe){return c(xe,a)}J.isNumberObject=Y;function q(xe){return c(xe,r)}J.isStringObject=q;function $(xe){return c(xe,n)}J.isBooleanObject=$;function ee(xe){return l&&c(xe,o)}J.isBigIntObject=ee;function ne(xe){return e&&c(xe,s)}J.isSymbolObject=ne;function fe(xe){return Y(xe)||q(xe)||$(xe)||ee(xe)||ne(xe)}J.isBoxedPrimitive=fe;function ye(xe){return typeof Uint8Array<"u"&&(j(xe)||ae(xe))}J.isAnyArrayBuffer=ye,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(xe){Object.defineProperty(J,xe,{enumerable:!1,value:function(){throw new Error(xe+" is not supported in userland")}})})}}),w2=Ee({"node_modules/util/support/isBufferBrowser.js"(J,V){V.exports=function(x){return x&&typeof x=="object"&&typeof x.copy=="function"&&typeof x.fill=="function"&&typeof x.readUInt8=="function"}}}),T2=Ee({"(disabled):node_modules/util/util.js"(J){var V=Object.getOwnPropertyDescriptors||function(Z){for(var Q=Object.keys(Z),re={},ae=0;ae=ae)return X;switch(X){case"%s":return String(re[Q++]);case"%d":return Number(re[Q++]);case"%j":try{return JSON.stringify(re[Q++])}catch{return"[Circular]"}default:return X}}),H=re[Q];Q"u")return function(){return J.deprecate(U,Z).apply(this,arguments)};var Q=!1;function re(){if(!Q){if(process.throwDeprecation)throw new Error(Z);process.traceDeprecation?console.trace(Z):console.error(Z),Q=!0}return U.apply(this,arguments)}return re};var x={},E=/^$/;k="false",k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i");var k;J.debuglog=function(U){if(U=U.toUpperCase(),!x[U])if(E.test(U)){var Z=process.pid;x[U]=function(){var Q=J.format.apply(J,arguments);console.error("%s %d: %s",U,Z,Q)}}else x[U]=function(){};return x[U]};function l(U,Z){var Q={seen:[],stylize:t};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),p(Z)?Q.showHidden=Z:Z&&J._extend(Q,Z),C(Q.showHidden)&&(Q.showHidden=!1),C(Q.depth)&&(Q.depth=2),C(Q.colors)&&(Q.colors=!1),C(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=e),r(Q,U,Q.depth)}J.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(U,Z){var Q=l.styles[Z];return Q?"\x1B["+l.colors[Q][0]+"m"+U+"\x1B["+l.colors[Q][1]+"m":U}function t(U,Z){return U}function a(U){var Z={};return U.forEach(function(Q,re){Z[Q]=!0}),Z}function r(U,Z,Q){if(U.customInspect&&Z&&A(Z.inspect)&&Z.inspect!==J.inspect&&!(Z.constructor&&Z.constructor.prototype===Z)){var re=Z.inspect(Q,U);return S(re)||(re=r(U,re,Q)),re}var ae=n(U,Z);if(ae)return ae;var oe=Object.keys(Z),H=a(oe);if(U.showHidden&&(oe=Object.getOwnPropertyNames(Z)),u(Z)&&(oe.indexOf("message")>=0||oe.indexOf("description")>=0))return o(Z);if(oe.length===0){if(A(Z)){var X=Z.name?": "+Z.name:"";return U.stylize("[Function"+X+"]","special")}if(_(Z))return U.stylize(RegExp.prototype.toString.call(Z),"regexp");if(f(Z))return U.stylize(Date.prototype.toString.call(Z),"date");if(u(Z))return o(Z)}var K="",G=!1,Y=["{","}"];if(h(Z)&&(G=!0,Y=["[","]"]),A(Z)){var q=Z.name?": "+Z.name:"";K=" [Function"+q+"]"}if(_(Z)&&(K=" "+RegExp.prototype.toString.call(Z)),f(Z)&&(K=" "+Date.prototype.toUTCString.call(Z)),u(Z)&&(K=" "+o(Z)),oe.length===0&&(!G||Z.length==0))return Y[0]+K+Y[1];if(Q<0)return _(Z)?U.stylize(RegExp.prototype.toString.call(Z),"regexp"):U.stylize("[Object]","special");U.seen.push(Z);var $;return G?$=s(U,Z,Q,H,oe):$=oe.map(function(ee){return c(U,Z,Q,H,ee,G)}),U.seen.pop(),m($,K,Y)}function n(U,Z){if(C(Z))return U.stylize("undefined","undefined");if(S(Z)){var Q="'"+JSON.stringify(Z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(w(Z))return U.stylize(""+Z,"number");if(p(Z))return U.stylize(""+Z,"boolean");if(g(Z))return U.stylize("null","null")}function o(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,Z,Q,re,ae){for(var oe=[],H=0,X=Z.length;H-1&&(oe?X=X.split(` +`+b(U.dayMonthYear,R,P,j);return b(B,R,P,j)};var N=3*e;J.incrementMonth=function(R,B,F){F=p(F)&&F;var P=E(R,e);if(R=Math.round(R-P),F)try{var j=Math.round(R/e)+a,U=o.getComponentMethod("calendars","getCal")(F),Z=U.fromJD(j);return B%12?U.add(Z,B,"m"):U.add(Z,B/12,"y"),(Z.toJD()-a)*e+P}catch{x.error("invalid ms "+R+" in calendar "+F)}var Q=new Date(R+N);return Q.setUTCMonth(Q.getUTCMonth()+B)+P-N},J.findExactDates=function(R,B){for(var F=0,P=0,j=0,U=0,Z,Q,re=p(B)&&o.getComponentMethod("calendars","getCal")(B),ne=0;ne1?(a[c-1]-a[0])/(c-1):1,p,m;for(f>=0?m=o?l:e:m=o?n:t,r+=f*k*(o?-1:1)*(f>=0?1:-1);s90&&v.log("Long binary search..."),s-1};function l(r,a){return ra}function n(r,a){return r>=a}J.sorterAsc=function(r,a){return r-a},J.sorterDes=function(r,a){return a-r},J.distinctVals=function(r){var a=r.slice();a.sort(J.sorterAsc);var o;for(o=a.length-1;o>-1&&a[o]===E;o--);for(var s=a[o]-a[0]||1,c=s/(o||1)/1e4,g=[],f,p=0;p<=o;p++){var m=a[p],i=m-f;f===void 0?(g.push(m),f=m):i>c&&(s=Math.min(s,i),g.push(m),f=m)}return{vals:g,minDiff:s}},J.roundUp=function(r,a,o){for(var s=0,c=a.length-1,g,f=0,p=o?0:1,m=o?1:0,i=o?Math.ceil:Math.floor;s0&&(s=1),o&&s)return r.sort(a)}return s?r:r.reverse()},J.findIndexOfMin=function(r,a){a=a||x;for(var o=1/0,s,c=0;cyb});function YA(J){return Object.keys(J).sort()}var yb,Ev=Da({"src/lib/sort_object_keys.ts"(){"use strict";yb=YA}}),XA=Ee({"src/lib/stats.js"(J){"use strict";var H=mi(),v=vs().isArrayOrTypedArray;J.aggNums=function(x,E,k,l){var e,t;if((!l||l>k.length)&&(l=k.length),H(E)||(E=!1),v(k[0])){for(t=new Array(l),e=0;ex.length-1)return x[x.length-1];var k=E%1;return k*x[Math.ceil(E)]+(1-k)*x[Math.floor(E)]}}}),$A=Ee({"src/lib/angles.js"(J,H){"use strict";var v=(Vd(),tn(lh)),x=v.mod,E=v.modHalf,k=Math.PI,l=2*k;function e(m){return m/180*k}function t(m){return m/k*180}function n(m){return Math.abs(m[1]-m[0])>l-1e-14}function r(m,i){return E(i-m,l)}function a(m,i){return Math.abs(r(m,i))}function o(m,i){if(n(i))return!0;var T,S;i[0]S&&(S+=l);var M=x(m,l),C=M+l;return M>=T&&M<=S||C>=T&&C<=S}function s(m,i,T,S){if(!o(i,S))return!1;var M,C;return T[0]=M&&m<=C}function c(m,i,T,S,M,C,_){M=M||0,C=C||0;var w=n([T,S]),h,u,A,b,z;w?(h=0,u=k,A=l):T1/3&&v.x<2/3},J.isRightAnchor=function(v){return v.xanchor==="right"||v.xanchor==="auto"&&v.x>=2/3},J.isTopAnchor=function(v){return v.yanchor==="top"||v.yanchor==="auto"&&v.y>=2/3},J.isMiddleAnchor=function(v){return v.yanchor==="middle"||v.yanchor==="auto"&&v.y>1/3&&v.y<2/3},J.isBottomAnchor=function(v){return v.yanchor==="bottom"||v.yanchor==="auto"&&v.y<=1/3}}}),KA=Ee({"src/lib/geometry2d.js"(J){"use strict";var H=(Vd(),tn(lh)).mod;J.segmentsIntersect=v;function v(e,t,n,r,a,o,s,c){var g=n-e,f=a-e,p=s-a,m=r-t,i=o-t,T=c-o,S=g*T-p*m;if(S===0)return null;var M=(f*T-p*i)/S,C=(f*m-g*i)/S;return C<0||C>1||M<0||M>1?null:{x:e+g*M,y:t+m*M}}J.segmentDistance=function(t,n,r,a,o,s,c,g){if(v(t,n,r,a,o,s,c,g))return 0;var f=r-t,p=a-n,m=c-o,i=g-s,T=f*f+p*p,S=m*m+i*i,M=Math.min(x(f,p,T,o-t,s-n),x(f,p,T,c-t,g-n),x(m,i,S,t-o,n-s),x(m,i,S,r-o,a-s));return Math.sqrt(M)};function x(e,t,n,r,a){var o=r*e+a*t;if(o<0)return r*r+a*a;if(o>n){var s=r-e,c=a-t;return s*s+c*c}else{var g=r*t-a*e;return g*g/n}}var E,k,l;J.getTextLocation=function(t,n,r,a){if((t!==k||a!==l)&&(E={},k=t,l=a),E[r])return E[r];var o=t.getPointAtLength(H(r-a/2,n)),s=t.getPointAtLength(H(r+a/2,n)),c=Math.atan((s.y-o.y)/(s.x-o.x)),g=t.getPointAtLength(H(r,n)),f=(g.x*4+o.x+s.x)/6,p=(g.y*4+o.y+s.y)/6,m={x:f,y:p,theta:c};return E[r]=m,m},J.clearLocationCache=function(){k=null},J.getVisibleSegment=function(t,n,r){var a=n.left,o=n.right,s=n.top,c=n.bottom,g=0,f=t.getTotalLength(),p=f,m,i;function T(M){var C=t.getPointAtLength(M);M===0?m=C:M===f&&(i=C);var _=C.xo?C.x-o:0,w=C.yc?C.y-c:0;return Math.sqrt(_*_+w*w)}for(var S=T(g);S;){if(g+=S+r,g>p)return;S=T(g)}for(S=T(p);S;){if(p-=S+r,g>p)return;S=T(p)}return{min:g,max:p,len:p-g,total:f,isClosed:g===0&&p===f&&Math.abs(m.x-i.x)<.1&&Math.abs(m.y-i.y)<.1}},J.findPointOnPath=function(t,n,r,a){a=a||{};for(var o=a.pathLength||t.getTotalLength(),s=a.tolerance||.001,c=a.iterationLimit||30,g=t.getPointAtLength(0)[r]>t.getPointAtLength(o)[r]?-1:1,f=0,p=0,m=o,i,T,S;f0?m=i:p=i,f++}return T}}}),Dg=Ee({"src/lib/throttle.js"(J){"use strict";var H={};J.throttle=function(E,k,l){var e=H[E],t=Date.now();if(!e){for(var n in H)H[n].tse.ts+k){r();return}e.timer=setTimeout(function(){r(),e.timer=null},k)},J.done=function(x){var E=H[x];return!E||!E.timer?Promise.resolve():new Promise(function(k){var l=E.onDone;E.onDone=function(){l&&l(),k(),E.onDone=null}})},J.clear=function(x){if(x)v(H[x]),delete H[x];else for(var E in H)J.clear(E)};function v(x){x&&x.timer!==null&&(clearTimeout(x.timer),x.timer=null)}}}),JA=Ee({"src/lib/clear_responsive.js"(J,H){"use strict";H.exports=function(x){x._responsiveChartHandler&&(window.removeEventListener("resize",x._responsiveChartHandler),delete x._responsiveChartHandler)}}}),QA=Ee({"node_modules/is-mobile/index.js"(J,H){"use strict";H.exports=k,H.exports.isMobile=k,H.exports.default=k;var v=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,x=/CrOS/,E=/android|ipad|playbook|silk/i;function k(l){l||(l={});let e=l.ua;if(!e&&typeof navigator<"u"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;let t=v.test(e)&&!x.test(e)||!!l.tablet&&E.test(e);return!t&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(t=!0),t}}}),eM=Ee({"src/lib/preserve_drawing_buffer.js"(J,H){"use strict";var v=mi(),x=QA();H.exports=function(l){var e;if(l&&l.hasOwnProperty("userAgent")?e=l.userAgent:e=E(),typeof e!="string")return!0;var t=x({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!t)for(var n=e.split(" "),r=1;r-1;o--){var s=n[o];if(s.slice(0,8)==="Version/"){var c=s.slice(8).split(".")[0];if(v(c)&&(c=+c),c>=13)return!0}}}return t};function E(){var k;return typeof navigator<"u"&&(k=navigator.userAgent),k&&k.headers&&typeof k.headers["user-agent"]=="string"&&(k=k.headers["user-agent"]),k}}}),tM=Ee({"src/lib/make_trace_groups.js"(J,H){"use strict";var v=Va();H.exports=function(E,k,l){var e=E.selectAll("g."+l.replace(/\s/g,".")).data(k,function(n){return n[0].trace.uid});e.exit().remove(),e.enter().append("g").attr("class",l),e.order();var t=E.classed("rangeplot")?"nodeRangePlot3":"node3";return e.each(function(n){n[0][t]=v.select(this)}),e}}}),rM=Ee({"src/lib/localize.js"(J,H){"use strict";var v=Ri();H.exports=function(E,k){for(var l=E._context.locale,e=0;e<2;e++){for(var t=E._context.locales,n=0;n<2;n++){var r=(t[l]||{}).dictionary;if(r){var a=r[k];if(a)return a}t=v.localeRegistry}var o=l.split("-")[0];if(o===l)break;l=o}return k}}}),_b=Ee({"src/lib/filter_unique.js"(J,H){"use strict";H.exports=function(x){for(var E={},k=[],l=0,e=0;e1?(k*x+k*E)/k:x+E,e=String(l).length;if(e>16){var t=String(E).length,n=String(x).length;if(e>=n+t){var r=parseFloat(l).toPrecision(12);r.indexOf("e+")===-1&&(l=+r)}}return l}}}),bb={};ga(bb,{default:()=>Ab});function iM(J){return typeof J=="string"&&(J=J.replace(Tb,"")),(0,xb.default)(J)?Number(J):wb.BADNUM}var xb,wb,Tb,Ab,oM=Da({"src/lib/clean_number.ts"(){"use strict";xb=Wa(mi()),wb=Wa(Qi()),Tb=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,Ab=iM}}),sM=Ee({"src/lib/slugify.js"(J,H){"use strict";var v=/<[^>]*>/g,x=/[\p{S}\p{P}]/gu,E=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,k=/�/g,l=/\s+/g,e="-",t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(t+"{3,}","g"),r=new RegExp(t+"$","g"),a=60;function o(s){return typeof s.toWellFormed=="function"?s.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(s))}H.exports=function(c,g=a){var f=o(c??"").replace(k,"").replace(v," ").replace(x,p=>p===e?p:"").toLowerCase().trim().replace(l,e).replace(E,"").replace(n,e);return f.length<=g?f:Array.from(f).slice(0,g).join("").replace(r,"")}}}),Vr=Ee({"src/lib/index.js"(J,H){"use strict";var v=Va(),x=ji().utcFormat,E=ls().format,k=mi(),l=Qi(),e=l.FP_SAFE,t=-e,n=l.BADNUM,r=H.exports={};r.adjustFormat=function(q){if(!q||/^\d[.]\df/.test(q)||/[.]\d%/.test(q))return q;if(q==="0.f")return"~f";if(/^\d%/.test(q))return"~%";if(/^\ds/.test(q))return"~s";var W=(q.match(/^[+\-( ]?/)||[""])[0],ee=q.slice(W.length);return!/^[~,.0$#]/.test(ee)&&/[&fps]/.test(ee)?W+"~"+ee:q};var a={};r.warnBadFormat=function(X){var q=String(X);a[q]||(a[q]=1,r.warn('encountered bad format: "'+q+'"'))},r.noFormat=function(X){return String(X)},r.numberFormat=function(X){var q;try{q=E(r.adjustFormat(X))}catch{return r.warnBadFormat(X),r.noFormat}return q},r.nestedProperty=dl(),r.keyedContainer=ec(),r.relativeAttr=Ec(),r.isPlainObject=Us(),r.toLogRange=Jf(),r.relinkPrivateKeys=Ag();var o=vs();r.isArrayBuffer=o.isArrayBuffer,r.isTypedArray=o.isTypedArray,r.isArrayOrTypedArray=o.isArrayOrTypedArray,r.isArray1D=o.isArray1D,r.ensureArray=o.ensureArray,r.concat=o.concat,r.maxRowLength=o.maxRowLength,r.minRowLength=o.minRowLength;var s=(Vd(),tn(lh));r.mod=s.mod,r.modHalf=s.modHalf;var c=vA();r.valObjectMeta=c.valObjectMeta,r.coerce=c.coerce,r.coerce2=c.coerce2,r.coerceFont=c.coerceFont,r.coercePattern=c.coercePattern,r.coerceHoverinfo=c.coerceHoverinfo,r.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,r.validate=c.validate;var g=WA();r.dateTime2ms=g.dateTime2ms,r.isDateTime=g.isDateTime,r.ms2DateTime=g.ms2DateTime,r.ms2DateTimeLocal=g.ms2DateTimeLocal,r.cleanDate=g.cleanDate,r.isJSDate=g.isJSDate,r.formatDate=g.formatDate,r.incrementMonth=g.incrementMonth,r.dateTick0=g.dateTick0,r.dfltRange=g.dfltRange,r.findExactDates=g.findExactDates,r.MIN_MS=g.MIN_MS,r.MAX_MS=g.MAX_MS;var f=Pg();r.findBin=f.findBin,r.sorterAsc=f.sorterAsc,r.sorterDes=f.sorterDes,r.distinctVals=f.distinctVals,r.roundUp=f.roundUp,r.sort=f.sort,r.findIndexOfMin=f.findIndexOfMin,r.sortObjectKeys=(Ev(),tn(Hd)).default;var p=XA();r.aggNums=p.aggNums,r.len=p.len,r.mean=p.mean,r.geometricMean=p.geometricMean,r.median=p.median,r.midRange=p.midRange,r.variance=p.variance,r.stdev=p.stdev,r.interp=p.interp;var m=kg();r.init2dArray=m.init2dArray,r.transposeRagged=m.transposeRagged,r.dot=m.dot,r.translationMatrix=m.translationMatrix,r.rotationMatrix=m.rotationMatrix,r.rotationXYMatrix=m.rotationXYMatrix,r.apply3DTransform=m.apply3DTransform,r.apply2DTransform=m.apply2DTransform,r.apply2DTransform2=m.apply2DTransform2,r.convertCssMatrix=m.convertCssMatrix,r.inverseTransformMatrix=m.inverseTransformMatrix;var i=$A();r.deg2rad=i.deg2rad,r.rad2deg=i.rad2deg,r.angleDelta=i.angleDelta,r.angleDist=i.angleDist,r.isFullCircle=i.isFullCircle,r.isAngleInsideSector=i.isAngleInsideSector,r.isPtInsideSector=i.isPtInsideSector,r.pathArc=i.pathArc,r.pathSector=i.pathSector,r.pathAnnulus=i.pathAnnulus;var T=ZA();r.isLeftAnchor=T.isLeftAnchor,r.isCenterAnchor=T.isCenterAnchor,r.isRightAnchor=T.isRightAnchor,r.isTopAnchor=T.isTopAnchor,r.isMiddleAnchor=T.isMiddleAnchor,r.isBottomAnchor=T.isBottomAnchor;var S=KA();r.segmentsIntersect=S.segmentsIntersect,r.segmentDistance=S.segmentDistance,r.getTextLocation=S.getTextLocation,r.clearLocationCache=S.clearLocationCache,r.getVisibleSegment=S.getVisibleSegment,r.findPointOnPath=S.findPointOnPath;var M=vo();r.extendFlat=M.extendFlat,r.extendDeep=M.extendDeep,r.extendDeepAll=M.extendDeepAll,r.extendDeepNoArrays=M.extendDeepNoArrays;var C=po();r.log=C.log,r.warn=C.warn,r.error=C.error;var _=(Rp(),tn(Sv));r.counterRegex=_.counter;var w=Dg();r.throttle=w.throttle,r.throttleDone=w.done,r.clearThrottle=w.clear;var h=N0();r.getGraphDiv=h.getGraphDiv,r.isPlotDiv=h.isPlotDiv,r.removeElement=h.removeElement,r.addStyleRule=h.addStyleRule,r.addRelatedStyleRule=h.addRelatedStyleRule,r.deleteRelatedStyleRule=h.deleteRelatedStyleRule,r.setStyleOnHover=h.setStyleOnHover,r.getFullTransformMatrix=h.getFullTransformMatrix,r.getElementTransformMatrix=h.getElementTransformMatrix,r.getElementAndAncestors=h.getElementAndAncestors,r.equalDomRects=h.equalDomRects,r.clearResponsive=JA(),r.preserveDrawingBuffer=eM(),r.makeTraceGroups=tM(),r._=rM(),r.notifier=ao(),r.filterUnique=_b(),r.filterVisible=aM(),r.pushUnique=vb(),r.increment=nM(),r.cleanNumber=(oM(),tn(bb)).default,r.slugify=sM(),r.ensureNumber=function(q){return k(q)?(q=Number(q),q>e||q=q?!1:k(X)&&X>=0&&X%1===0},r.noop=Eg(),r.identity=j0(),r.repeat=function(X,q){for(var W=new Array(q),ee=0;eeW?Math.max(W,Math.min(q,X)):Math.max(q,Math.min(W,X))},r.bBoxIntersect=function(X,q,W){return W=W||0,X.left<=q.right+W&&q.left<=X.right+W&&X.top<=q.bottom+W&&q.top<=X.bottom+W},r.simpleMap=function(X,q,W,ee,ae){for(var fe=X.length,ye=new Array(fe),xe=0;xe=Math.pow(2,W)?ae>10?(r.warn("randstr failed uniqueness"),ye):X(q,W,ee,(ae||0)+1):ye},r.OptionControl=function(X,q){X||(X={}),q||(q="opt");var W={};return W.optionList=[],W._newoption=function(ee){ee[q]=X,W[ee.name]=ee,W.optionList.push(ee)},W["_"+q]=X,W},r.smooth=function(X,q){if(q=Math.round(q)||0,q<2)return X;var W=X.length,ee=2*W,ae=2*q-1,fe=new Array(ae),ye=new Array(W),xe,Ae,Me,Ie;for(xe=0;xe=ee&&(Me-=ee*Math.floor(Me/ee)),Me<0?Me=-1-Me:Me>=W&&(Me=ee-1-Me),Ie+=X[Me]*fe[Ae];ye[xe]=Ie}return ye},r.syncOrAsync=function(X,q,W){var ee,ae;function fe(){return r.syncOrAsync(X,q,W)}for(;X.length;)if(ae=X.splice(0,1)[0],ee=ae(q),ee&&ee.then)return ee.then(fe);return W&&W(q)},r.stripTrailingSlash=function(X){return X.slice(-1)==="/"?X.slice(0,-1):X},r.noneOrAll=function(X,q,W){if(X){var ee=!1,ae=!0,fe,ye;for(fe=0;fe0?ae:0})},r.fillArray=function(X,q,W,ee){if(ee=ee||r.identity,r.isArrayOrTypedArray(X))for(var ae=0;aez.test(window.navigator.userAgent);var I=/Firefox\/(\d+)\.\d+/;r.getFirefoxVersion=function(){var X=I.exec(window.navigator.userAgent);if(X&&X.length===2){var q=parseInt(X[1]);if(!isNaN(q))return q}return null},r.isD3Selection=function(X){return X instanceof v.selection},r.ensureSingle=function(X,q,W,ee){var ae=X.select(q+(W?"."+W:""));if(ae.size())return ae;var fe=X.append(q);return W&&fe.classed(W,!0),ee&&fe.call(ee),fe},r.ensureSingleById=function(X,q,W,ee){var ae=X.select(q+"#"+W);if(ae.size())return ae;var fe=X.append(q).attr("id",W);return ee&&fe.call(ee),fe},r.objectFromPath=function(X,q){for(var W=X.split("."),ee,ae=ee={},fe=0;fe1?ae+ye[1]:"";if(fe&&(ye.length>1||xe.length>4||W))for(;ee.test(xe);)xe=xe.replace(ee,"$1"+fe+"$2");return xe+Ae},r.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var F=/^\w*$/;r.templateString=function(X,q){var W={};return X.replace(r.TEMPLATE_STRING_REGEX,function(ee,ae){var fe;return F.test(ae)?fe=q[ae]:(W[ae]=W[ae]||r.nestedProperty(q,ae).get,fe=W[ae](!0)),fe!==void 0?fe:""})};var P={max:10,count:0,name:"hovertemplate"};r.hovertemplateString=X=>ne(Qr(Nr({},X),{opts:P}));var j={max:10,count:0,name:"texttemplate"};r.texttemplateString=X=>ne(Qr(Nr({},X),{opts:j}));var U=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Z(X){var q=X.match(U);return q?{key:q[1],op:q[2],number:Number(q[3])}:{key:X,op:null,number:null}}var Q={max:10,count:0,name:"texttemplate",parseMultDiv:!0};r.texttemplateStringForShapes=X=>ne(Qr(Nr({},X),{opts:Q}));var re=/^[:|\|]/;function ne({data:X=[],locale:q,fallback:W,labels:ee={},opts:ae,template:fe}){return fe.replace(r.TEMPLATE_STRING_REGEX,(ye,xe,Ae)=>{let Me=["xother","yother"].includes(xe),Ie=["_xother","_yother"].includes(xe),qe=["_xother_","_yother_"].includes(xe),je=["xother_","yother_"].includes(xe),ke=Me||Ie||je||qe;(Ie||qe)&&(xe=xe.substring(1)),(je||qe)&&(xe=xe.substring(0,xe.length-1));let ge=null,le=null;if(ae.parseMultDiv){var ve=Z(xe);xe=ve.key,ge=ve.op,le=ve.number}let se;if(ke){if(ee[xe]===void 0)return"";se=ee[xe]}else for(let Ge of X)if(Ge){if(Ge.hasOwnProperty(xe)){se=Ge[xe];break}if(F.test(xe)||(se=r.nestedProperty(Ge,xe).get(!0)),se!==void 0)break}if(se===void 0){let{count:Ge,max:gt,name:mt}=ae,Tt=W===!1?ye:W;return Ge=oe&&ye<=V,Me=xe>=oe&&xe<=V;if(Ae&&(ee=10*ee+ye-oe),Me&&(ae=10*ae+xe-oe),!Ae||!Me){if(ee!==ae)return ee-ae;if(ye!==xe)return ye-xe}}return ae-ee};var $=2e9;r.seedPseudoRandom=function(){$=2e9},r.pseudoRandom=function(){var X=$;return $=(69069*$+1)%4294967296,Math.abs($-X)<429496729?r.pseudoRandom():$/4294967296},r.fillText=function(X,q,W){var ee=Array.isArray(W)?function(ye){W.push(ye)}:function(ye){W.text=ye},ae=r.extractOption(X,q,"htx","hovertext");if(r.isValidTextValue(ae))return ee(ae);var fe=r.extractOption(X,q,"tx","text");if(r.isValidTextValue(fe))return ee(fe)},r.isValidTextValue=function(X){return X||X===0},r.formatPercent=function(X,q){q=q||0;for(var W=(Math.round(100*X*Math.pow(10,q))*Math.pow(.1,q)).toFixed(q)+"%",ee=0;ee1&&(Me=1):Me=0,r.strTranslate(ae-Me*(W+ye),fe-Me*(ee+xe))+r.strScale(Me)+(Ae?"rotate("+Ae+(q?"":" "+W+" "+ee)+")":"")},r.setTransormAndDisplay=function(X,q){X.attr("transform",r.getTextTransform(q)),X.style("display",q.scale?null:"none")},r.ensureUniformFontSize=function(X,q){var W=r.extendFlat({},q);return W.size=Math.max(q.size,X._fullLayout.uniformtext.minsize||0),W},r.join2=function(X,q,W){var ee=X.length;return ee>1?X.slice(0,-1).join(q)+W+X[ee-1]:X.join(q)},r.bigFont=function(X){return Math.round(1.2*X)};var K=r.getFirefoxVersion(),G=K!==null&&K<86;r.getPositionFromD3Event=function(){return G?[v.event.layerX,v.event.layerY]:[v.event.offsetX,v.event.offsetY]}}}),lM=Ee({"build/plotcss.js"(){"use strict";var J=Vr(),H={"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(x in H)v=x.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),J.addStyleRule(v,H[x]);var v,x}}),Mb=Ee({"node_modules/is-browser/client.js"(J,H){H.exports=!0}}),Sb=Ee({"node_modules/has-hover/index.js"(J,H){"use strict";var v=Mb(),x;typeof window.matchMedia=="function"?x=!window.matchMedia("(hover: none)").matches:x=v,H.exports=x}}),kv=Ee({"node_modules/events/events.js"(J,H){"use strict";var v=typeof Reflect=="object"?Reflect:null,x=v&&typeof v.apply=="function"?v.apply:function(C,_,w){return Function.prototype.apply.call(C,_,w)},E;v&&typeof v.ownKeys=="function"?E=v.ownKeys:Object.getOwnPropertySymbols?E=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:E=function(C){return Object.getOwnPropertyNames(C)};function k(M){console&&console.warn&&console.warn(M)}var l=Number.isNaN||function(C){return C!==C};function e(){e.init.call(this)}H.exports=e,H.exports.once=i,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var t=10;function n(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return t},set:function(M){if(typeof M!="number"||M<0||l(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");t=M}}),e.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},e.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||l(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function r(M){return M._maxListeners===void 0?e.defaultMaxListeners:M._maxListeners}e.prototype.getMaxListeners=function(){return r(this)},e.prototype.emit=function(C){for(var _=[],w=1;w0&&(A=_[0]),A instanceof Error)throw A;var b=new Error("Unhandled error."+(A?" ("+A.message+")":""));throw b.context=A,b}var z=u[C];if(z===void 0)return!1;if(typeof z=="function")x(z,this,_);else for(var I=z.length,N=f(z,I),w=0;w0&&A.length>h&&!A.warned){A.warned=!0;var b=new Error("Possible EventEmitter memory leak detected. "+A.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");b.name="MaxListenersExceededWarning",b.emitter=M,b.type=C,b.count=A.length,k(b)}return M}e.prototype.addListener=function(C,_){return a(this,C,_,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(C,_){return a(this,C,_,!0)};function o(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(M,C,_){var w={fired:!1,wrapFn:void 0,target:M,type:C,listener:_},h=o.bind(w);return h.listener=_,w.wrapFn=h,h}e.prototype.once=function(C,_){return n(_),this.on(C,s(this,C,_)),this},e.prototype.prependOnceListener=function(C,_){return n(_),this.prependListener(C,s(this,C,_)),this},e.prototype.removeListener=function(C,_){var w,h,u,A,b;if(n(_),h=this._events,h===void 0)return this;if(w=h[C],w===void 0)return this;if(w===_||w.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete h[C],h.removeListener&&this.emit("removeListener",C,w.listener||_));else if(typeof w!="function"){for(u=-1,A=w.length-1;A>=0;A--)if(w[A]===_||w[A].listener===_){b=w[A].listener,u=A;break}if(u<0)return this;u===0?w.shift():p(w,u),w.length===1&&(h[C]=w[0]),h.removeListener!==void 0&&this.emit("removeListener",C,b||_)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(C){var _,w,h;if(w=this._events,w===void 0)return this;if(w.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):w[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete w[C]),this;if(arguments.length===0){var u=Object.keys(w),A;for(h=0;h=0;h--)this.removeListener(C,_[h]);return this};function c(M,C,_){var w=M._events;if(w===void 0)return[];var h=w[C];return h===void 0?[]:typeof h=="function"?_?[h.listener||h]:[h]:_?m(h):f(h,h.length)}e.prototype.listeners=function(C){return c(this,C,!0)},e.prototype.rawListeners=function(C){return c(this,C,!1)},e.listenerCount=function(M,C){return typeof M.listenerCount=="function"?M.listenerCount(C):g.call(M,C)},e.prototype.listenerCount=g;function g(M){var C=this._events;if(C!==void 0){var _=C[M];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}e.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]};function f(M,C){for(var _=new Array(C),w=0;w{},{passive:!0}),E},triggerHandler:function(E,k,l){var e,t=E._ev;if(!t)return;var n=t._events[k];if(!n)return;function r(o){if(o.listener){if(t.removeListener(k,o.listener),!o.fired)return o.fired=!0,o.listener.apply(t,[l])}else return o.apply(t,[l])}n=Array.isArray(n)?n:[n];var a;for(a=0;ax.queueLength&&(l.undoQueue.queue.shift(),l.undoQueue.index--)},k.startSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!0,l.undoQueue.beginSequence=!0},k.stopSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!1,l.undoQueue.beginSequence=!1},k.undo=function(e){var t,n;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=P.length)return!1;if(I.dimensions===2){if(R++,N.length===R)return I;var j=N[R];if(!S(j))return!1;I=P[F][j]}else I=P[F]}else I=P}}return I}function S(I){return I===Math.round(I)&&I>=0}function M(I){var N,R;N=H.modules[I]._module,R=N.basePlotModule;var B={};B.type=null;var F=n({},x),P=n({},N.attributes);J.crawl(P,function(Z,Q,re,ne,oe){o(F,oe).set(void 0),Z===void 0&&o(P,oe).set(void 0)}),n(B,F),H.traceIs(I,"noOpacity")&&delete B.opacity,H.traceIs(I,"showLegend")||(delete B.showlegend,delete B.legendgroup),H.traceIs(I,"noHover")&&(delete B.hoverinfo,delete B.hoverlabel),N.selectPoints||delete B.selectedpoints,n(B,P),R.attributes&&n(B,R.attributes),B.type=I;var j={meta:N.meta||{},categories:N.categories||{},animatable:!!N.animatable,type:I,attributes:w(B)};if(N.layoutAttributes){var U={};n(U,N.layoutAttributes),j.layoutAttributes=w(U)}return N.animatable||J.crawl(j,function(Z){J.isValObject(Z)&&"anim"in Z&&delete Z.anim}),j}function C(){var I={},N,R;n(I,E);for(N in H.subplotsRegistry)if(R=H.subplotsRegistry[N],!!R.layoutAttributes)if(Array.isArray(R.attr))for(var B=0;B=r&&(n._input||{})._templateitemname;o&&(a=r);var s=t+"["+a+"]",c;function g(){c={},o&&(c[s]={},c[s][x]=o)}g();function f(T,S){c[T]=S}function p(T,S){o?H.nestedProperty(c[s],T).set(S):c[s+"."+T]=S}function m(){var T=c;return g(),T}function i(T,S){T&&p(T,S);var M=m();for(var C in M)H.nestedProperty(e,C).set(M[C])}return{modifyBase:f,modifyItem:p,getUpdateObj:m,applyUpdate:i}}}}),tc=Ee({"src/plots/cartesian/constants.js"(J,H){"use strict";var v=(Rp(),tn(Sv)).counter;H.exports={idRegex:{x:v("x","( domain)?"),y:v("y","( domain)?")},attrRegex:v("[xy]axis"),xAxisMatch:v("xaxis"),yAxisMatch:v("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}}),Xl=Ee({"src/plots/cartesian/axis_ids.js"(J){"use strict";var H=Ri(),v=tc();J.id2name=function(k){if(!(typeof k!="string"||!k.match(v.AX_ID_PATTERN))){var l=k.split(" ")[0].slice(1);return l==="1"&&(l=""),k.charAt(0)+"axis"+l}},J.name2id=function(k){if(k.match(v.AX_NAME_PATTERN)){var l=k.slice(5);return l==="1"&&(l=""),k.charAt(0)+l}},J.cleanId=function(k,l,e){var t=/( domain)$/.test(k);if(!(typeof k!="string"||!k.match(v.AX_ID_PATTERN))&&!(l&&k.charAt(0)!==l)&&!(t&&!e)){var n=k.split(" ")[0].slice(1).replace(/^0+/,"");return n==="1"&&(n=""),k.charAt(0)+n+(t&&e?" domain":"")}},J.list=function(E,k,l){var e=E._fullLayout;if(!e)return[];var t=J.listIds(E,k),n=new Array(t.length),r;for(r=0;re?1:-1:+(E.slice(1)||1)-+(k.slice(1)||1)},J.ref2id=function(E){return/^[xyz]/.test(E)?E.split(" ")[0]:!1};function x(E,k){if(k&&k.length){for(var l=0;l0?".":"")+o;v.isPlainObject(s)?e(s,n,c,a+1):n(c,o,s)}})}}}),vl=Ee({"src/plots/plots.js"(J,H){"use strict";var v=Va(),x=ji().timeFormatLocale,E=ls().formatLocale,k=mi(),l=iu(),e=qi().version,t=Ri(),n=Bp(),r=xs(),a=Vr(),o=Qn(),s=Qi().BADNUM,c=Xl(),g=Gd().clearOutline,f=Ig(),p=O0(),m=Eb(),i=uf().getModuleCalcData,T=a.relinkPrivateKeys,S=a._,M=H.exports={};a.extendFlat(M,t),M.attributes=nn(),M.attributes.type.values=M.allTypes,M.fontAttrs=Xs(),M.layoutAttributes=Fp();var C=cM();M.executeAPICommand=C.executeAPICommand,M.computeAPICommandBindings=C.computeAPICommandBindings,M.manageCommandObserver=C.manageCommandObserver,M.hasSimpleAPICommandBindings=C.hasSimpleAPICommandBindings,M.redrawText=function(V){return V=a.getGraphDiv(V),new Promise(function($){setTimeout(function(){V._fullLayout&&(t.getComponentMethod("annotations","draw")(V),t.getComponentMethod("legend","draw")(V),t.getComponentMethod("colorbar","draw")(V),$(M.previousPromises(V)))},300)})},M.resize=function(V){V=a.getGraphDiv(V);var $,K=new Promise(function(G,X){(!V||a.isHidden(V))&&X(new Error("Resize must be passed a displayed plot div element.")),V._redrawTimer&&clearTimeout(V._redrawTimer),V._resolveResize&&($=V._resolveResize),V._resolveResize=G,V._redrawTimer=setTimeout(function(){if(!V.layout||V.layout.width&&V.layout.height||a.isHidden(V)){G(V);return}delete V.layout.width,delete V.layout.height;var q=V.changed;V.autoplay=!0,t.call("relayout",V,{autosize:!0}).then(function(){V.changed=q,V._resolveResize===G&&(delete V._resolveResize,G(V))})},100)});return $&&$(K),K},M.previousPromises=function(V){if((V._promises||[]).length)return Promise.all(V._promises).then(function(){V._promises=[]})},M.sendDataToCloud=function(V,$){V.emit("plotly_beforeexport");let K=new URL($).origin;var G=M.graphJson(V,!1,"object");G.version=e;var X=new URL($);X.searchParams.set("origin",window.location.origin);var q=window.open(X.href,"_blank");if(!q){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),V.emit("plotly_exportfail");return}var W=function(ee){ee.origin===K&&ee.data&&ee.data.type==="CHART_AUTH_SUCCESS"&&(q.postMessage({type:"chart",chart:G},K),window.removeEventListener("message",W),V.emit("plotly_afterexport"))};return window.addEventListener("message",W),!1};var _=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],w=["year","month","dayMonth","dayMonthYear"];M.supplyDefaults=function(V,$){var K=$&&$.skipUpdateCalc,G=V._fullLayout||{};if(G._skipDefaults){delete G._skipDefaults;return}var X=V._fullLayout={},q=V.layout||{},W=V._fullData||[],ee=V._fullData=[],ae=V.data||[],fe=V.calcdata||[],ye=V._context||{},xe;V._transitionData||M.createTransitionData(V),X._dfltTitle={plot:S(V,"Click to enter Plot title"),subtitle:S(V,"Click to enter Plot subtitle"),x:S(V,"Click to enter X axis title"),y:S(V,"Click to enter Y axis title"),colorbar:S(V,"Click to enter Colorscale title"),annotation:S(V,"new text")},X._traceWord=S(V,"trace");var Ae=A(V,_);if(G._initialAutoSizeIsDone){var Me=G.width,Ie=G.height;M.supplyLayoutGlobalDefaults(q,X,Ae),q.width||(X.width=Me),q.height||(X.height=Ie),M.sanitizeMargins(X)}else{M.supplyLayoutGlobalDefaults(q,X,Ae);var qe=!q.width||!q.height,je=X.autosize,ke=ye.autosizable,ge=qe&&(je||ke);ge?M.plotAutoSize(V,q,X):qe&&M.sanitizeMargins(X),!je&&qe&&(q.width=X.width,q.height=X.height)}X._d3locale=b(Ae,X.separators),X._extraFormat=A(V,w),X._initialAutoSizeIsDone=!0,X._dataLength=ae.length,X._modules=[],X._visibleModules=[],X._basePlotModules=[];var le=X._subplots=u(),ve=X._splomAxes={x:{},y:{}},se=X._splomSubplots={};X._splomGridDflt={},X._scatterStackOpts={},X._firstScatter={},X._alignmentOpts={},X._colorAxes={},X._requestRangeslider={},X._traceUids=h(W,ae),M.supplyDataDefaults(ae,ee,q,X);var Te=Object.keys(ve.x),Fe=Object.keys(ve.y);if(Te.length>1&&Fe.length>1){for(t.getComponentMethod("grid","sizeDefaults")(q,X),xe=0;xe15&&Fe.length>15&&X.shapes.length===0&&X.images.length===0,M.linkSubplots(ee,X,W,G),M.cleanPlot(ee,X,W,G);var Tt=!!(G._has&&G._has("cartesian")),At=!!(X._has&&X._has("cartesian")),Kt=Tt,ar=At;Kt&&!ar?G._bgLayer.remove():ar&&!Kt&&(X._shouldCreateBgLayer=!0),G._zoomlayer&&!V._dragging&&g({_fullLayout:G}),z(ee,X),T(X,G),t.getComponentMethod("colorscale","crossTraceDefaults")(ee,X),X._preGUI||(X._preGUI={}),X._tracePreGUI||(X._tracePreGUI={});var _r=X._tracePreGUI,Zt={},sr;for(sr in _r)Zt[sr]="old";for(xe=0;xe0){var ye=1-2*q;W=Math.round(ye*W),ee=Math.round(ye*ee)}}var xe=M.layoutAttributes.width.min,Ae=M.layoutAttributes.height.min;W1,Ie=!K.height&&Math.abs(G.height-ee)>1;(Ie||Me)&&(Me&&(G.width=W),Ie&&(G.height=ee)),$._initialAutoSize||($._initialAutoSize={width:W,height:ee}),M.sanitizeMargins(G)},M.supplyLayoutModuleDefaults=function(V,$,K,G){var X=t.componentsRegistry,q=$._basePlotModules,W,ee,ae,fe=t.subplotsRegistry.cartesian;for(W in X)ae=X[W],ae.includeBasePlot&&ae.includeBasePlot(V,$);q.length||q.push(fe),$._has("cartesian")&&(t.getComponentMethod("grid","contentDefaults")(V,$),fe.finalizeSubplots(V,$));for(var ye in $._subplots)$._subplots[ye].sort(a.subplotSort);for(ee=0;ee1&&(K.l/=je,K.r/=je)}if(Ae){var ke=(K.t+K.b)/Ae;ke>1&&(K.t/=ke,K.b/=ke)}var ge=K.xl!==void 0?K.xl:K.x,le=K.xr!==void 0?K.xr:K.x,ve=K.yt!==void 0?K.yt:K.y,se=K.yb!==void 0?K.yb:K.y;Me[$]={l:{val:ge,size:K.l+qe},r:{val:le,size:K.r+qe},b:{val:se,size:K.b+qe},t:{val:ve,size:K.t+qe}},Ie[$]=1}if(!G._replotting)return M.doAutoMargin(V)}};function P(V){if("_redrawFromAutoMarginCount"in V._fullLayout)return!1;var $=c.list(V,"",!0);for(var K in $)if($[K].autoshift||$[K].shift)return!0;return!1}M.doAutoMargin=function(V){var $=V._fullLayout,K=$.width,G=$.height;$._size||($._size={}),R($);var X=$._size,q=$.margin,W={t:0,b:0,l:0,r:0},ee=a.extendFlat({},X),ae=q.l,fe=q.r,ye=q.t,xe=q.b,Ae=$._pushmargin,Me=$._pushmarginIds,Ie=$.minreducedwidth,qe=$.minreducedheight;if(q.autoexpand!==!1){for(var je in Ae)Me[je]||delete Ae[je];var ke=V._fullLayout._reservedMargin;for(var ge in ke)for(var le in ke[ge]){var ve=ke[ge][le];W[le]=Math.max(W[le],ve)}Ae.base={l:{val:0,size:ae},r:{val:1,size:fe},t:{val:1,size:ye},b:{val:0,size:xe}};for(var se in W){var Te=0;for(var Fe in Ae)Fe!=="base"&&k(Ae[Fe][se].size)&&(Te=Ae[Fe][se].size>Te?Ae[Fe][se].size:Te);var We=Math.max(0,q[se]-Te);W[se]=Math.max(0,W[se]-We)}for(var Ge in Ae){var gt=Ae[Ge].l||{},mt=Ae[Ge].b||{},Tt=gt.val,At=gt.size,Kt=mt.val,ar=mt.size,_r=K-W.r-W.l,Zt=G-W.t-W.b;for(var sr in Ae){if(k(At)&&Ae[sr].r){var Ot=Ae[sr].r.val,vt=Ae[sr].r.size;if(Ot>Tt){var ht=(At*Ot+(vt-_r)*Tt)/(Ot-Tt),Re=(vt*(1-Tt)+(At-_r)*(1-Ot))/(Ot-Tt);ht+Re>ae+fe&&(ae=ht,fe=Re)}}if(k(ar)&&Ae[sr].t){var Be=Ae[sr].t.val,He=Ae[sr].t.size;if(Be>Kt){var $e=(ar*Be+(He-Zt)*Kt)/(Be-Kt),Ze=(He*(1-Kt)+(ar-Zt)*(1-Be))/(Be-Kt);$e+Ze>xe+ye&&(xe=$e,ye=Ze)}}}}}var Je=a.constrain(K-q.l-q.r,B,Ie),Mt=a.constrain(G-q.t-q.b,F,qe),dt=Math.max(0,K-Je),Dt=Math.max(0,G-Mt);if(dt){var Ct=(ae+fe)/dt;Ct>1&&(ae/=Ct,fe/=Ct)}if(Dt){var Vt=(xe+ye)/Dt;Vt>1&&(xe/=Vt,ye/=Vt)}if(X.l=Math.round(ae)+W.l,X.r=Math.round(fe)+W.r,X.t=Math.round(ye)+W.t,X.b=Math.round(xe)+W.b,X.p=Math.round(q.pad),X.w=Math.round(K)-X.l-X.r,X.h=Math.round(G)-X.t-X.b,!$._replotting&&(M.didMarginChange(ee,X)||P(V))){"_redrawFromAutoMarginCount"in $?$._redrawFromAutoMarginCount++:$._redrawFromAutoMarginCount=1;var Ht=3*(1+Object.keys(Me).length);if($._redrawFromAutoMarginCount1)return!0}return!1},M.graphJson=function(V,$=!1,K="json",G=!1,X=!1){(G&&$&&!V._fullData||G&&!$&&!V._fullLayout)&&M.supplyDefaults(V);var q=G?V._fullData:V.data,W=G?V._fullLayout:V.layout,ee=(V._transitionData||{})._frames;function ae(xe,Ae){if(typeof xe=="function")return Ae?"_function_":null;if(a.isPlainObject(xe)){var Me={};return Object.keys(xe).sort().forEach(function(ke){if(["_","["].indexOf(ke.charAt(0))===-1){if(typeof xe[ke]=="function"){Ae&&(Me[ke]="_function");return}Me[ke]=ae(xe[ke],Ae)}}),Me}var Ie=Array.isArray(xe),qe=a.isTypedArray(xe);if((Ie||qe)&&xe.dtype&&xe.shape){var je=xe.bdata;return ae({dtype:xe.dtype,shape:xe.shape,bdata:a.isArrayBuffer(je)?l.encode(je):je},Ae)}return Ie?xe.map(function(ke){return ae(ke,Ae)}):qe?a.simpleMap(xe,a.identity):a.isJSDate(xe)?a.ms2DateTimeLocal(+xe):xe}var fe={data:(q||[]).map(function(xe){var Ae=ae(xe);return $&&delete Ae.fit,Ae})};if(!$&&(fe.layout=ae(W),G)){var ye=W._size;fe.layout.computed={margin:{b:ye.b,l:ye.l,r:ye.r,t:ye.t}}}return ee&&(fe.frames=ae(ee)),X&&(fe.config=ae(V._context,!0)),K==="object"?fe:JSON.stringify(fe)},M.modifyFrames=function(V,$){var K,G,X,q=V._transitionData._frames,W=V._transitionData._frameHash;for(K=0;K<$.length;K++)switch(G=$[K],G.type){case"replace":X=G.value;var ee=(q[G.index]||{}).name,ae=X.name;q[G.index]=W[ae]=X,ae!==ee&&(delete W[ee],W[ae]=X);break;case"insert":X=G.value,W[X.name]=X,q.splice(G.index,0,X);break;case"delete":X=q[G.index],delete W[X.name],q.splice(G.index,1);break}return Promise.resolve()},M.computeFrame=function(V,$){var K=V._transitionData._frameHash,G,X,q,W;if(!$)throw new Error("computeFrame must be given a string frame name");var ee=K[$.toString()];if(!ee)return!1;for(var ae=[ee],fe=[ee.name];ee.baseframe&&(ee=K[ee.baseframe.toString()])&&fe.indexOf(ee.name)===-1;)ae.push(ee),fe.push(ee.name);for(var ye={};ee=ae.pop();)if(ee.layout&&(ye.layout=M.extendLayout(ye.layout,ee.layout)),ee.data){if(ye.data||(ye.data=[]),X=ee.traces,!X)for(X=[],G=0;G0&&(V._transitioningWithDuration=!0),V._transitionData._interruptCallbacks.push(function(){G=!0}),K.redraw&&V._transitionData._interruptCallbacks.push(function(){return t.call("redraw",V)}),V._transitionData._interruptCallbacks.push(function(){V.emit("plotly_transitioninterrupted",[])});var Ae=0,Me=0;function Ie(){return Ae++,function(){Me++,!G&&Me===Ae&&ee(xe)}}K.runFn(Ie),setTimeout(Ie())})}function ee(xe){if(V._transitionData)return q(V._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(K.redraw)return t.call("redraw",V)}).then(function(){V._transitioning=!1,V._transitioningWithDuration=!1,V.emit("plotly_transitioned",[])}).then(xe)}function ae(){if(V._transitionData)return V._transitioning=!1,X(V._transitionData._interruptCallbacks)}var fe=[M.previousPromises,ae,K.prepareFn,M.rehover,M.reselect,W],ye=a.syncOrAsync(fe,V);return(!ye||!ye.then)&&(ye=Promise.resolve()),ye.then(function(){return V})}M.doCalcdata=function(V,$){var K=c.list(V),G=V._fullData,X=V._fullLayout,q,W,ee,ae=new Array(G.length),fe=(V.calcdata||[]).slice();for(V.calcdata=ae,X._numBoxes=0,X._numViolins=0,X._violinScaleGroupStats={},V._hmpixcount=0,V._hmlumcount=0,X._piecolormap={},X._sunburstcolormap={},X._treemapcolormap={},X._iciclecolormap={},X._funnelareacolormap={},ee=0;eeQ?Q.match(l):null;J.matchTex=e,J.convertToTspans=function(Q,re,ne){var oe=Q.text(),V=!Q.attr("data-notex")&&re&&re._context.typesetMath&&e(oe);V&&!g()&&(V=null);var $=H.select(Q.node().parentNode);if($.empty())return;var K=Q.attr("class")?Q.attr("class").split(" ")[0]:"text";K+="-math",$.selectAll("svg."+K).remove(),$.selectAll("g."+K+"-group").remove(),Q.style("display",null).attr({"data-unformatted":oe,"data-math":"N"});function G(){$.empty()||(K=Q.attr("class")+"-math",$.select("svg."+K).remove()),Q.text("").style("white-space","pre");var X=P(Q.node(),oe);X&&Q.style("pointer-events","all"),J.positionText(Q),ne&&ne.call(Q)}return V?(re&&re._promises||[]).push(new Promise(function(X){Q.style("display","none");var q=parseInt(Q.node().style.fontSize,10),W={fontSize:q},ee=Q.attr("text-anchor");f(V[2],W,function(ae,fe,ye){$.selectAll("svg."+K).remove(),$.selectAll("g."+K+"-group").remove();var xe=ae&&ae.select("svg");if(!xe||!xe.node()){G(),X();return}Q.style("display","none");var Ae=$.append("g").classed(K+"-group",!0).attr({"pointer-events":"none","data-unformatted":oe,"data-math":"Y"});Ae.node().appendChild(xe.node()),fe&&fe.node()&&xe.node().insertBefore(fe.node().cloneNode(!0),xe.node().firstChild);var Me=ye.width,Ie=ye.height;xe.attr({class:K,height:Ie,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":W.fontSize+"px"});var qe=Q.node().style.fill||"black",je=xe.select("g");je.attr({fill:qe,stroke:qe});var ke=je.node().getBoundingClientRect(),ge=ke.width,le=ke.height;(ge>Me||le>Ie)&&(xe.style("overflow","hidden"),ke=xe.node().getBoundingClientRect(),ge=ke.width,le=ke.height);var ve=+Q.attr("x"),se=+Q.attr("y"),Te=q||Q.node().getBoundingClientRect().height,Fe=-Te/4;K[0]==="y"?Ae.attr({transform:"rotate("+[-90,ve,se]+")"+x(-ge/2,Fe-le/2)}):K[0]==="l"?se=Fe-le/2:K[0]==="a"&&K.indexOf("atitle")!==0?(ve=0,se=Fe):(ve=ve-ge*(ee==="middle"?.5:ee==="end"?1:0),se=se+Fe-le/2),xe.attr({x:ve,y:se}),ne&&ne.call(Q,Ae),X(Ae)})})):G(),Q};var t=/(<|<|<)/g,n=/(>|>|>)/g;function r(Q){return Q.replace(t,"\\lt ").replace(n,"\\gt ")}var a=null,o=()=>typeof MathJax<"u"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,s=!1,c=!1;function g(){let Q=o();return Q===3||Q===4?!0:(Q===null?s||(s=!0,v.warn("MathJax is not loaded. Math equations will not be rendered.")):c||(c=!0,v.warn("Unsupported MathJax version:",MathJax.version)),!1)}function f(Q,re,ne){let oe=o();var V;let $=function(){if(!a){let q=MathJax._.output.svg_ts.SVG,W=v.extendFlat({},MathJax.config.svg,{fontCache:"local"});oe===4&&(W.linebreaks=v.extendFlat({},W.linebreaks,{inline:!1})),a=MathJax._.mathjax.mathjax.document(document,v.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new q(W)}))}let G="math-output-"+v.randstr({},64);V=H.select("body").append("div").attr({id:G}).style({visibility:"hidden",position:"absolute","font-size":re.fontSize+"px"});let X=r(Q).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return a.convert(X,{display:!1})}).then(function(q){V.node().appendChild(q)})},K=function(){let G=V.select(".MathJax"),X=!G.empty()&&V.select("svg").node();if(!X)v.log("There was an error in the tex syntax.",Q),ne();else{let q=X.getBoundingClientRect(),W=G.select("defs");ne(G,W,q)}V.remove()};Promise.resolve().then($).then(K).catch(G=>{v.log("MathJax typesetting failed.",Q,G),V&&V.remove(),ne()})}var p={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"},m={sub:"0.3em",sup:"-0.6em"},i={sub:"-0.21em",sup:"0.42em"},T="\u200B",S=["http:","https:","mailto:","",void 0,":"],M=J.NEWLINES=/(\r\n?|\n)/g,C=/(<[^<>]*>)/,_=/<(\/?)([^ >]*)(\s+(.*))?>/i,w=//i;J.BR_TAG_ALL=//gi;var h=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,u=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,A=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,b=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function z(Q,re){if(!Q)return null;var ne=Q.match(re),oe=ne&&(ne[3]||ne[4]);return oe&&B(oe)}var I=/(^|;)\s*color:/;J.plainText=function(Q,re){re=re||{};for(var ne=re.len!==void 0&&re.len!==-1?re.len:1/0,oe=re.allowedTags!==void 0?re.allowedTags:["br"],V="...",$=V.length,K=Q.split(C),G=[],X="",q=0,W=0;W$?G.push(ee.slice(0,Math.max(0,xe-$))+V):G.push(ee.slice(0,xe));break}X=""}}return G.join("")};var N={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},R=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function B(Q){return Q.replace(R,function(re,ne){var oe;return ne.charAt(0)==="#"?oe=F(ne.charAt(1)==="x"?parseInt(ne.slice(2),16):parseInt(ne.slice(1),10)):oe=N[ne],oe||re})}J.convertEntities=B;function F(Q){if(!(Q>1114111)){var re=String.fromCodePoint;if(re)return re(Q);var ne=String.fromCharCode;return Q<=65535?ne(Q):ne((Q>>10)+55232,Q%1024+56320)}}function P(Q,re){re=re.replace(M," ");var ne=!1,oe=[],V,$=-1;function K(){$++;var ge=document.createElementNS(E.svg,"tspan");H.select(ge).attr({class:"line",dy:$*k+"em"}),Q.appendChild(ge),V=ge;var le=oe;if(oe=[{node:ge}],le.length>1)for(var ve=1;ve.",re);return}var le=oe.pop();ge!==le.type&&v.log("Start tag <"+le.type+"> doesnt match end tag <"+ge+">. Pretending it did match.",re),V=oe[oe.length-1].node}var W=w.test(re);W?K():(V=Q,oe=[{node:Q}]);for(var ee=re.split(C),ae=0;ae=0;m--,i++){var T=g[m];p[i]=[1-T[0],T[1]]}return p}function s(g,f){f=f||{};for(var p=g.domain,m=g.range,i=m.length,T=new Array(i),S=0;Sp-g?g=p-(f-p):f-p=0?T=n.colorscale.sequential:T=n.colorscale.sequentialminus,s._sync("colorscale",T)}}}}),pl=Ee({"src/components/colorscale/index.js"(J,H){"use strict";var v=uh(),x=cf();H.exports={moduleType:"component",name:"colorscale",attributes:$s(),layoutAttributes:kb(),supplyLayoutDefaults:fM(),handleDefaults:Cc(),crossTraceDefaults:hM(),calc:Sf(),scales:v.scales,defaultScale:v.defaultScale,getScale:v.get,isValidScale:v.isValid,hasColorscale:x.hasColorscale,extractOpts:x.extractOpts,extractScale:x.extractScale,flipScale:x.flipScale,makeColorScaleFunc:x.makeColorScaleFunc,makeColorScaleFuncFromTrace:x.makeColorScaleFuncFromTrace}}}),nl=Ee({"src/traces/scatter/subtypes.js"(J,H){"use strict";var v=Vr(),x=vs().isTypedArraySpec;H.exports={hasLines:function(E){return E.visible&&E.mode&&E.mode.indexOf("lines")!==-1},hasMarkers:function(E){return E.visible&&(E.mode&&E.mode.indexOf("markers")!==-1||E.type==="splom")},hasText:function(E){return E.visible&&E.mode&&E.mode.indexOf("text")!==-1},isBubble:function(E){var k=E.marker;return v.isPlainObject(k)&&(v.isArrayOrTypedArray(k.size)||x(k.size))}}}}),U0=Ee({"src/traces/scatter/make_bubble_size_func.js"(J,H){"use strict";var v=mi();H.exports=function(E,k){k||(k=2);var l=E.marker,e=l.sizeref||1,t=l.sizemin||0,n=l.sizemode==="area"?function(r){return Math.sqrt(r/e)}:function(r){return r/e};return function(r){var a=n(r/k);return v(a)&&a>0?Math.max(a,t):0}}}}),Qf=Ee({"src/components/fx/helpers.js"(J){"use strict";var H=Vr();J.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},J.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var n=e.xaxes||[],r=e.yaxes||[],a=0;a=0&&n.index{let o=r.toLowerCase(),s=r,c=l(a);for(o==="m"&&c.length>2&&(t.push([s,...c.splice(0,2)]),o="l",s=s==="m"?"l":"L");;){if(c.length===v[o])return t.push([s,...c]),"";if(c.length0&&(le=100,ge=ge.replace("-open","")),ge.indexOf("-dot")>0&&(le+=200,ge=ge.replace("-dot","")),ge=m.symbolNames.indexOf(ge),ge>=0&&(ge+=le)}return ge%100>=w||ge>=400?0:Math.floor(Math.max(ge,0))};function u(ge,le,ve,se){var Te=ge%100;return m.symbolFuncs[Te](le,ve,se)+(ge>=200?h:"")}var A=E("~f"),b={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}};m.gradient=function(ge,le,ve,se,Te,Fe){var We=b[se];return z(ge,le,ve,We.type,Te,Fe,We.start,We.stop,!1,We.reversed)};function z(ge,le,ve,se,Te,Fe,We,Ge,gt,mt){var Tt=Te.length,At;se==="linear"?At={node:"linearGradient",attrs:{x1:We.x,y1:We.y,x2:Ge.x,y2:Ge.y,gradientUnits:gt?"userSpaceOnUse":"objectBoundingBox"},reversed:mt}:se==="radial"&&(At={node:"radialGradient",reversed:mt});for(var Kt=new Array(Tt),ar=0;ar=0&&ge.i===void 0&&(ge.i=Fe.i),le.style("opacity",se.selectedOpacityFn?se.selectedOpacityFn(ge):ge.mo===void 0?We.opacity:ge.mo),se.ms2mrc){var gt;ge.ms==="various"||We.size==="various"?gt=3:gt=se.ms2mrc(ge.ms),ge.mrc=gt,se.selectedSizeFn&&(gt=ge.mrc=se.selectedSizeFn(ge));var mt=m.symbolNumber(ge.mx||We.symbol)||0;ge.om=mt%200>=100;var Tt=ke(ge,ve),At=W(ge,ve);le.attr("d",u(mt,gt,Tt,At))}var Kt=!1,ar,_r,Zt;if(ge.so)Zt=Ge.outlierwidth,_r=Ge.outliercolor,ar=We.outliercolor;else{var sr=(Ge||{}).width;Zt=(ge.mlw+1||sr+1||(ge.trace?(ge.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in ge?_r=ge.mlcc=se.lineScale(ge.mlc):x.isArrayOrTypedArray(Ge.color)?_r=e.defaultLine:_r=Ge.color,x.isArrayOrTypedArray(We.color)&&(ar=e.defaultLine,Kt=!0),"mc"in ge?ar=ge.mcc=se.markerScale(ge.mc):ar=We.color||We.colors||"rgba(0,0,0,0)",se.selectedColorFn&&(ar=se.selectedColorFn(ge))}let Ot=ge.mld||(Ge||{}).dash;if(Ot&&m.dashLine(le,Ot,Zt),ge.om)le.call(e.stroke,ar).style({"stroke-width":(Zt||1)+"px",fill:"none"});else{le.style("stroke-width",(ge.isBlank?0:Zt)+"px");var vt=We.gradient,ht=ge.mgt;ht?Kt=!0:ht=vt&&vt.type,x.isArrayOrTypedArray(ht)&&(ht=ht[0],b[ht]||(ht=0));var Re=We.pattern,Be=m.getPatternAttr,He=Re&&(Be(Re.shape,ge.i,"")||Be(Re.path,ge.i,""));if(ht&&ht!=="none"){var $e=ge.mgc;$e?Kt=!0:$e=vt.color;var Ze=ve.uid;Kt&&(Ze+="-"+ge.i),m.gradient(le,Te,Ze,ht,[[0,$e],[1,ar]],"fill")}else if(He){var Je=!1,Mt=Re.fgcolor;!Mt&&Fe&&Fe.color&&(Mt=Fe.color,Je=!0);var dt=Be(Mt,ge.i,Fe&&Fe.color||null),Dt=Be(Re.bgcolor,ge.i,null),Ct=Re.fgopacity,Vt=Be(Re.size,ge.i,8),Ht=Be(Re.solidity,ge.i,.3);Je=Je||ge.mcc||x.isArrayOrTypedArray(Re.shape)||x.isArrayOrTypedArray(Re.path)||x.isArrayOrTypedArray(Re.bgcolor)||x.isArrayOrTypedArray(Re.fgcolor)||x.isArrayOrTypedArray(Re.size)||x.isArrayOrTypedArray(Re.solidity);var Wt=ve.uid;Je&&(Wt+="-"+ge.i),m.pattern(le,"point",Te,Wt,He,Vt,Ht,ge.mcc,Re.fillmode,Dt,dt,Ct)}else x.isArrayOrTypedArray(ar)?e.fill(le,ar[ge.i]):e.fill(le,ar);Zt&&e.stroke(le,_r)}},m.makePointStyleFns=function(ge){var le={},ve=ge.marker;return le.markerScale=m.tryColorscale(ve,""),le.lineScale=m.tryColorscale(ve,"line"),l.traceIs(ge,"symbols")&&(le.ms2mrc=g.isBubble(ge)?f(ge):function(){return(ve.size||6)/2}),ge.selectedpoints&&x.extendFlat(le,m.makeSelectedPointStyleFns(ge)),le},m.makeSelectedPointStyleFns=function(ge){var le={},ve=ge.selected||{},se=ge.unselected||{},Te=ge.marker||{},Fe=ve.marker||{},We=se.marker||{},Ge=Te.opacity,gt=Fe.opacity,mt=We.opacity,Tt=gt!==void 0,At=mt!==void 0;(x.isArrayOrTypedArray(Ge)||Tt||At)&&(le.selectedOpacityFn=function(Re){var Be=Re.mo===void 0?Te.opacity:Re.mo;return Re.selected?Tt?gt:Be:At?mt:c*Be});var Kt=Te.color,ar=Fe.color,_r=We.color;(ar||_r)&&(le.selectedColorFn=function(Re){var Be=Re.mcc||Kt;return Re.selected?ar||Be:_r||Be});var Zt=Te.size,sr=Fe.size,Ot=We.size,vt=sr!==void 0,ht=Ot!==void 0;return l.traceIs(ge,"symbols")&&(vt||ht)&&(le.selectedSizeFn=function(Re){var Be=Re.mrc||Zt/2;return Re.selected?vt?sr/2:Be:ht?Ot/2:Be}),le},m.makeSelectedTextStyleFns=function(ge){var le={},ve=ge.selected||{},se=ge.unselected||{},Te=ge.textfont||{},Fe=ve.textfont||{},We=se.textfont||{},Ge=Te.color,gt=Fe.color,mt=We.color;return le.selectedTextColorFn=function(Tt){var At=Tt.tc||Ge;return Tt.selected?gt||At:mt||(gt?At:e.addOpacity(At,c))},le},m.selectedPointStyle=function(ge,le){if(!(!ge.size()||!le.selectedpoints)){var ve=m.makeSelectedPointStyleFns(le),se=le.marker||{},Te=[];ve.selectedOpacityFn&&Te.push(function(Fe,We){Fe.style("opacity",ve.selectedOpacityFn(We))}),ve.selectedColorFn&&Te.push(function(Fe,We){e.fill(Fe,ve.selectedColorFn(We))}),ve.selectedSizeFn&&Te.push(function(Fe,We){var Ge=We.mx||se.symbol||0,gt=ve.selectedSizeFn(We);Fe.attr("d",u(m.symbolNumber(Ge),gt,ke(We,le),W(We,le))),We.mrc2=gt}),Te.length&&ge.each(function(Fe){for(var We=v.select(this),Ge=0;Ge0?ve:0}m.textPointStyle=function(ge,le,ve){if(ge.size()){var se;if(le.selectedpoints){var Te=m.makeSelectedTextStyleFns(le);se=Te.selectedTextColorFn}var Fe=le.texttemplate,We=ve._fullLayout;ge.each(function(Ge){var gt=v.select(this),mt=Fe?x.extractOption(Ge,le,"txt","texttemplate"):x.extractOption(Ge,le,"tx","text");if(!mt&&mt!==0){gt.remove();return}if(Fe){var Tt=le._module.formatLabels,At=Tt?Tt(Ge,le,We):{},Kt={};p(Kt,le,Ge.i),mt=x.texttemplateString({data:[Kt,Ge,le._meta],fallback:le.texttemplatefallback,labels:At,locale:We._d3locale,template:mt})}var ar=Ge.tp||le.textposition,_r=R(Ge,le),Zt=se?se(Ge):Ge.tc||le.textfont.color;gt.call(m.font,{family:Ge.tf||le.textfont.family,weight:Ge.tw||le.textfont.weight,style:Ge.ty||le.textfont.style,variant:Ge.tv||le.textfont.variant,textcase:Ge.tC||le.textfont.textcase,lineposition:Ge.tE||le.textfont.lineposition,shadow:Ge.tS||le.textfont.shadow,size:_r,color:Zt}).text(mt).call(r.convertToTspans,ve).call(N,ar,_r,Ge.mrc)})}},m.selectedTextStyle=function(ge,le){if(!(!ge.size()||!le.selectedpoints)){var ve=m.makeSelectedTextStyleFns(le);ge.each(function(se){var Te=v.select(this),Fe=ve.selectedTextColorFn(se),We=se.tp||le.textposition,Ge=R(se,le);e.fill(Te,Fe);var gt=l.traceIs(le,"bar-like");N(Te,We,Ge,se.mrc2||se.mrc,gt)})}};var B=.5;m.smoothopen=function(ge,le){if(ge.length<3)return"M"+ge.join("L");var ve="M"+ge[0],se=[],Te;for(Te=1;Te=gt||Re>=Tt&&Re<=gt)&&(Be<=At&&Be>=mt||Be>=At&&Be<=mt)&&(ge=[Re,Be])}return ge}m.applyBackoff=oe,m.makeTester=function(){var ge=x.ensureSingleById(v.select("body"),"svg","js-plotly-tester",function(ve){ve.attr(a.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),le=x.ensureSingle(ge,"path","js-reference-point",function(ve){ve.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});m.tester=ge,m.testref=le},m.savedBBoxes={};var V=0,$=1e4;m.bBox=function(ge,le,ve){ve||(ve=K(ge));var se;if(ve){if(se=m.savedBBoxes[ve],se)return x.extendFlat({},se)}else if(ge.childNodes.length===1){var Te=ge.childNodes[0];if(ve=K(Te),ve){var Fe=+Te.getAttribute("x")||0,We=+Te.getAttribute("y")||0,Ge=Te.getAttribute("transform");if(!Ge){var gt=m.bBox(Te,!1,ve);return Fe&&(gt.left+=Fe,gt.right+=Fe),We&&(gt.top+=We,gt.bottom+=We),gt}if(ve+="~"+Fe+"~"+We+"~"+Ge,se=m.savedBBoxes[ve],se)return x.extendFlat({},se)}}var mt,Tt;le?mt=ge:(Tt=m.tester.node(),mt=ge.cloneNode(!0),Tt.appendChild(mt)),v.select(mt).attr("transform",null).call(r.positionText,0,0);var At=mt.getBoundingClientRect(),Kt=m.testref.node().getBoundingClientRect();le||Tt.removeChild(mt);var ar={height:At.height,width:At.width,left:At.left-Kt.left,top:At.top-Kt.top,right:At.right-Kt.left,bottom:At.bottom-Kt.top};return V>=$&&(m.savedBBoxes={},V=0),ve&&(m.savedBBoxes[ve]=ar),V++,x.extendFlat({},ar)};function K(ge){var le=ge.getAttribute("data-unformatted");if(le!==null)return le+ge.getAttribute("data-math")+ge.getAttribute("text-anchor")+ge.getAttribute("style")}m.setClipUrl=function(ge,le,ve){ge.attr("clip-path",G(le,ve))};function G(ge,le){if(!ge)return null;var ve=le._context,se=ve._exportedPlot?"":ve._baseUrl||"";return se?"url('"+se+"#"+ge+"')":"url(#"+ge+")"}m.getTranslate=function(ge){var le=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ve=ge.attr?"attr":"getAttribute",se=ge[ve]("transform")||"",Te=se.replace(le,function(Fe,We,Ge){return[We,Ge].join(" ")}).split(" ");return{x:+Te[0]||0,y:+Te[1]||0}},m.setTranslate=function(ge,le,ve){var se=/(\btranslate\(.*?\);?)/,Te=ge.attr?"attr":"getAttribute",Fe=ge.attr?"attr":"setAttribute",We=ge[Te]("transform")||"";return le=le||0,ve=ve||0,We=We.replace(se,"").trim(),We+=n(le,ve),We=We.trim(),ge[Fe]("transform",We),We},m.getScale=function(ge){var le=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ve=ge.attr?"attr":"getAttribute",se=ge[ve]("transform")||"",Te=se.replace(le,function(Fe,We,Ge){return[We,Ge].join(" ")}).split(" ");return{x:+Te[0]||1,y:+Te[1]||1}},m.setScale=function(ge,le,ve){var se=/(\bscale\(.*?\);?)/,Te=ge.attr?"attr":"getAttribute",Fe=ge.attr?"attr":"setAttribute",We=ge[Te]("transform")||"";return le=le||1,ve=ve||1,We=We.replace(se,"").trim(),We+="scale("+le+","+ve+")",We=We.trim(),ge[Fe]("transform",We),We};var X=/\s*sc.*/;m.setPointGroupScale=function(ge,le,ve){if(le=le||1,ve=ve||1,!!ge){var se=le===1&&ve===1?"":"scale("+le+","+ve+")";ge.each(function(){var Te=(this.getAttribute("transform")||"").replace(X,"");Te+=se,Te=Te.trim(),this.setAttribute("transform",Te)})}};var q=/translate\([^)]*\)\s*$/;m.setTextPointsScale=function(ge,le,ve){ge&&ge.each(function(){var se,Te=v.select(this),Fe=Te.select("text");if(Fe.node()){var We=parseFloat(Fe.attr("x")||0),Ge=parseFloat(Fe.attr("y")||0),gt=(Te.attr("transform")||"").match(q);le===1&&ve===1?se=[]:se=[n(We,Ge),"scale("+le+","+ve+")",n(-We,-Ge)],gt&&se.push(gt),Te.attr("transform",se.join(""))}})};function W(ge,le){var ve;return ge&&(ve=ge.mf),ve===void 0&&(ve=le.marker&&le.marker.standoff||0),!le._geo&&!le._xA?-ve:ve}m.getMarkerStandoff=W;var ee=Math.atan2,ae=Math.cos,fe=Math.sin;function ye(ge,le){var ve=le[0],se=le[1];return[ve*ae(ge)-se*fe(ge),ve*fe(ge)+se*ae(ge)]}var xe,Ae,Me,Ie,qe,je;function ke(ge,le){var ve=ge.ma;ve===void 0&&(ve=le.marker.angle,(!k(ve)||x.isArrayOrTypedArray(ve))&&(ve=0));var se,Te,Fe=le.marker.angleref;if(Fe==="previous"||Fe==="north"){if(le._geo){var We=le._geo.project(ge.lonlat);se=We[0],Te=We[1]}else{var Ge=le._xA,gt=le._yA;if(Ge&>)se=Ge.c2p(ge.x),Te=gt.c2p(ge.y);else return 90}if(le._geo){var mt=ge.lonlat[0],Tt=ge.lonlat[1],At=le._geo.project([mt,Tt+1e-5]),Kt=le._geo.project([mt+1e-5,Tt]),ar=ee(Kt[1]-Te,Kt[0]-se),_r=ee(At[1]-Te,At[0]-se),Zt;if(Fe==="north")Zt=ve/180*Math.PI;else if(Fe==="previous"){var sr=mt/180*Math.PI,Ot=Tt/180*Math.PI,vt=xe/180*Math.PI,ht=Ae/180*Math.PI,Re=vt-sr,Be=ae(ht)*fe(Re),He=fe(ht)*ae(Ot)-ae(ht)*fe(Ot)*ae(Re);Zt=-ee(Be,He)-Math.PI,xe=mt,Ae=Tt}var $e=ye(ar,[ae(Zt),0]),Ze=ye(_r,[fe(Zt),0]);ve=ee($e[1]+Ze[1],$e[0]+Ze[0])/Math.PI*180,Fe==="previous"&&!(je===le.uid&&ge.i===qe+1)&&(ve=null)}if(Fe==="previous"&&!le._geo)if(je===le.uid&&ge.i===qe+1&&k(se)&&k(Te)){var Je=se-Me,Mt=Te-Ie,dt=le.line&&le.line.shape||"",Dt=dt.slice(dt.length-1);Dt==="h"&&(Mt=0),Dt==="v"&&(Je=0),ve+=ee(Mt,Je)/Math.PI*180+90}else ve=null}return Me=se,Ie=Te,qe=ge.i,je=le.uid,ve}m.getMarkerAngle=ke}}),Lv=Ee({"src/components/titles/index.js"(J,H){"use strict";var v=Va(),x=mi(),E=vl(),k=Ri(),l=Vr(),e=l.strTranslate,t=mo(),n=Qn(),r=Fs(),a=gd(),o=rc().OPPOSITE_SIDE,s=/ [XY][0-9]* /,c=1.6,g=1.6;function f(p,m,i){var T=p._fullLayout,S=i.propContainer,M=i.propName,C=i.placeholder,_=i.traceIndex,w=i.avoid||{},h=i.attributes,u=i.transform,A=i.containerGroup,b=1,z=S.title,I=(z&&z.text?z.text:"").trim(),N=!1,R=z&&z.font?z.font:{},B=R.family,F=R.size,P=R.color,j=R.weight,U=R.style,Z=R.variant,Q=R.textcase,re=R.lineposition,ne=R.shadow,oe=i.subtitlePropName,V=!!oe,$=i.subtitlePlaceholder,K=(S.title||{}).subtitle||{text:"",font:{}},G=(K.text||"").trim(),X=!1,q=1,W=K.font,ee=W.family,ae=W.size,fe=W.color,ye=W.weight,xe=W.style,Ae=W.variant,Me=W.textcase,Ie=W.lineposition,qe=W.shadow,je;M==="title.text"?je="titleText":M.indexOf("axis")!==-1?je="axisTitleText":M.indexOf("colorbar")!==-1&&(je="colorbarTitleText");var ke=p._context.edits[je];function ge(ar,_r){return ar===void 0||_r===void 0?!1:ar.replace(s," % ")===_r.replace(s," % ")}I===""?b=0:ge(I,C)&&(ke||(I=""),b=.2,N=!0),V&&(G===""?q=0:ge(G,$)&&(ke||(G=""),q=.2,X=!0)),i._meta?I=l.templateString(I,i._meta):T._meta&&(I=l.templateString(I,T._meta));var le=I||G||ke,ve;A||(A=l.ensureSingle(T._infolayer,"g","g-"+m),ve=T._hColorbarMoveTitle);var se=A.selectAll("text."+m).data(le?[0]:[]);se.enter().append("text"),se.text(I).attr("class",m),se.exit().remove();var Te=null,Fe=m+"-subtitle",We=G||ke;if(V&&(Te=A.selectAll("text."+Fe).data(We?[0]:[]),Te.enter().append("text"),Te.text(G).attr("class",Fe),Te.exit().remove()),!le)return A;function Ge(ar,_r){l.syncOrAsync([gt,mt],{title:ar,subtitle:_r})}function gt(ar){var _r=ar.title,Zt=ar.subtitle,sr;!u&&ve&&(u={}),u?(sr="",u.rotate&&(sr+="rotate("+[u.rotate,h.x,h.y]+")"),(u.offset||ve)&&(sr+=e(0,(u.offset||0)-(ve||0)))):sr=null,_r.attr("transform",sr);function Ot($e){if($e){var Ze=v.select($e.node().parentNode).select("."+Fe);if(!Ze.empty()){var Je=$e.node().getBBox();if(Je.height){var Mt=Je.y+Je.height+c*ae;Ze.attr("y",Mt)}}}}if(_r.style("opacity",b*n.opacity(P)).call(t.font,{color:n.rgb(P),size:v.round(F,2),family:B,weight:j,style:U,variant:Z,textcase:Q,shadow:ne,lineposition:re}).attr(h).call(r.convertToTspans,p,Ot),Zt&&!Zt.empty()){var vt=A.select("."+m+"-math-group"),ht=_r.node().getBBox(),Re=vt.node()?vt.node().getBBox():void 0,Be=Re?Re.y+Re.height+c*ae:ht.y+ht.height+g*ae,He=l.extendFlat({},h,{y:Be});Zt.attr("transform",sr),Zt.style("opacity",q*n.opacity(fe)).call(t.font,{color:n.rgb(fe),size:v.round(ae,2),family:ee,weight:ye,style:xe,variant:Ae,textcase:Me,shadow:qe,lineposition:Ie}).attr(He).call(r.convertToTspans,p)}return E.previousPromises(p)}function mt(ar){var _r=ar.title,Zt=v.select(_r.node().parentNode);if(w&&w.selection&&w.side&&I){Zt.attr("transform",null);var sr=o[w.side],Ot=w.side==="left"||w.side==="top"?-1:1,vt=x(w.pad)?w.pad:2,ht=t.bBox(Zt.node()),Re={t:0,b:0,l:0,r:0},Be=p._fullLayout._reservedMargin;for(var He in Be)for(var $e in Be[He]){var Ze=Be[He][$e];Re[$e]=Math.max(Re[$e],Ze)}var Je={left:Re.l,top:Re.t,right:T.width-Re.r,bottom:T.height-Re.b},Mt=w.maxShift||Ot*(Je[w.side]-ht[w.side]),dt=0;if(Mt<0)dt=Mt;else{var Dt=w.offsetLeft||0,Ct=w.offsetTop||0;ht.left-=Dt,ht.right-=Dt,ht.top-=Ct,ht.bottom-=Ct,w.selection.each(function(){var Ht=t.bBox(this);l.bBoxIntersect(ht,Ht,vt)&&(dt=Math.max(dt,Ot*(Ht[w.side]-ht[sr])+vt))}),dt=Math.min(Mt,dt),S._titleScoot=Math.abs(dt)}if(dt>0||Mt<0){var Vt={left:[-dt,0],right:[dt,0],top:[0,-dt],bottom:[0,dt]}[w.side];Zt.attr("transform",e(Vt[0],Vt[1]))}}}se.call(Ge,Te);function Tt(ar,_r){ar.text(_r).on("mouseover.opacity",function(){v.select(this).transition().duration(a.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){v.select(this).transition().duration(a.HIDE_PLACEHOLDER).style("opacity",0)})}if(ke&&(I?se.on(".opacity",null):(Tt(se,C),N=!0),se.call(r.makeEditable,{gd:p}).on("edit",function(ar){_!==void 0?k.call("_guiRestyle",p,M,ar,_):k.call("_guiRelayout",p,M,ar)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ge)}).on("input",function(ar){this.text(ar||" ").call(r.positionText,h.x,h.y)}),V)){if(V&&!I){var At=se.node().getBBox(),Kt=At.y+At.height+g*ae;Te.attr("y",Kt)}G?Te.on(".opacity",null):(Tt(Te,$),X=!0),Te.call(r.makeEditable,{gd:p}).on("edit",function(ar){k.call("_guiRelayout",p,"title.subtitle.text",ar)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ge)}).on("input",function(ar){this.text(ar||" ").call(r.positionText,Te.attr("x"),Te.attr("y"))})}return se.classed("js-placeholder",N),Te&&!Te.empty()&&Te.classed("js-placeholder",X),A}H.exports={draw:f,SUBTITLE_PADDING_EM:g,SUBTITLE_PADDING_MATHJAX_EM:c}}}),Hh=Ee({"src/plots/cartesian/set_convert.js"(J,H){"use strict";var v=Va(),x=ji().utcFormat,E=Vr(),k=E.numberFormat,l=mi(),e=E.cleanNumber,t=E.ms2DateTime,n=E.dateTime2ms,r=E.ensureNumber,a=E.isArrayOrTypedArray,o=Qi(),s=o.FP_SAFE,c=o.BADNUM,g=o.LOG_CLIP,f=o.ONEWEEK,p=o.ONEDAY,m=o.ONEHOUR,i=o.ONEMIN,T=o.ONESEC,S=Xl(),M=tc(),C=M.HOUR_PATTERN,_=M.WEEKDAY_PATTERN;function w(u){return Math.pow(10,u)}function h(u){return u!=null}H.exports=function(A,b){b=b||{};var z=A._id||"x",I=z.charAt(0);function N(G,X){if(G>0)return Math.log(G)/Math.LN10;if(G<=0&&X&&A.range&&A.range.length===2){var q=A.range[0],W=A.range[1];return .5*(q+W-2*g*Math.abs(q-W))}else return c}function R(G,X,q,W){if((W||{}).msUTC&&l(G))return+G;var ee=n(G,q||A.calendar);if(ee===c)if(l(G)){G=+G;var ae=Math.floor(E.mod(G+.05,1)*10),fe=Math.round(G-ae/10);ee=n(new Date(fe))+ae/10}else return c;return ee}function B(G,X,q){return t(G,X,q||A.calendar)}function F(G){return A._categories[Math.round(G)]}function P(G){if(h(G)){if(A._categoriesMap===void 0&&(A._categoriesMap={}),A._categoriesMap[G]!==void 0)return A._categoriesMap[G];A._categories.push(typeof G=="number"?String(G):G);var X=A._categories.length-1;return A._categoriesMap[G]=X,X}return c}function j(G,X){for(var q=new Array(X),W=0;WA.range[1]&&(q=!q);for(var W=q?-1:1,ee=W*G,ae=0,fe=0;fexe)ae=fe+1;else{ae=ee<(ye+xe)/2?fe:fe+1;break}}var Ae=A._B[ae]||0;return isFinite(Ae)?re(G,A._m2,Ae):0},V=function(G){var X=A._rangebreaks.length;if(!X)return ne(G,A._m,A._b);for(var q=0,W=0;WA._rangebreaks[W].pmax&&(q=W+1);return ne(G,A._m2,A._B[q])}}A.c2l=A.type==="log"?N:r,A.l2c=A.type==="log"?w:r,A.l2p=oe,A.p2l=V,A.c2p=A.type==="log"?function(G,X){return oe(N(G,X))}:oe,A.p2c=A.type==="log"?function(G){return w(V(G))}:V,["linear","-"].indexOf(A.type)!==-1?(A.d2r=A.r2d=A.d2c=A.r2c=A.d2l=A.r2l=e,A.c2d=A.c2r=A.l2d=A.l2r=r,A.d2p=A.r2p=function(G){return A.l2p(e(G))},A.p2d=A.p2r=V,A.cleanPos=r):A.type==="log"?(A.d2r=A.d2l=function(G,X){return N(e(G),X)},A.r2d=A.r2c=function(G){return w(e(G))},A.d2c=A.r2l=e,A.c2d=A.l2r=r,A.c2r=N,A.l2d=w,A.d2p=function(G,X){return A.l2p(A.d2r(G,X))},A.p2d=function(G){return w(V(G))},A.r2p=function(G){return A.l2p(e(G))},A.p2r=V,A.cleanPos=r):A.type==="date"?(A.d2r=A.r2d=E.identity,A.d2c=A.r2c=A.d2l=A.r2l=R,A.c2d=A.c2r=A.l2d=A.l2r=B,A.d2p=A.r2p=function(G,X,q){return A.l2p(R(G,0,q))},A.p2d=A.p2r=function(G,X,q){return B(V(G),X,q)},A.cleanPos=function(G){return E.cleanDate(G,c,A.calendar)}):A.type==="category"?(A.d2c=A.d2l=P,A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=Z,A.r2c=function(G){var X=Q(G);return X!==void 0?X:A.fraction2r(.5)},A.l2r=A.c2r=r,A.r2l=Q,A.d2p=function(G){return A.l2p(A.r2c(G))},A.p2d=function(G){return F(V(G))},A.r2p=A.d2p,A.p2r=V,A.cleanPos=function(G){return typeof G=="string"&&G!==""?G:r(G)}):A.type==="multicategory"&&(A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=Z,A.r2c=function(G){var X=Z(G);return X!==void 0?X:A.fraction2r(.5)},A.r2c_just_indices=U,A.l2r=A.c2r=r,A.r2l=Z,A.d2p=function(G){return A.l2p(A.r2c(G))},A.p2d=function(G){return F(V(G))},A.r2p=A.d2p,A.p2r=V,A.cleanPos=function(G){return Array.isArray(G)||typeof G=="string"&&G!==""?G:r(G)},A.setupMultiCategory=function(G){var X=A._traceIndices,q,W,ee=A._matchGroup;if(ee&&A._categories.length===0){for(var ae in ee)if(ae!==z){var fe=b[S.id2name(ae)];X=X.concat(fe._traceIndices)}}var ye=[[0,{}],[0,{}]],xe=[];for(q=0;qfe[1]&&(W[ae?0:1]=q,ee[1]=fe[1]),ee[0]>=ee[1])if(X!==void 0){var ye=fe[0]+1;q!==void 0&&(ye=Math.min(ye,fe[1])),W[ae?0:1]=A.l2r(ye)}else q!==void 0&&(W[ae?1:0]=A.l2r(fe[1]-1))}},A.cleanRange=function(G,X){A._cleanRange(G,X),A.limitRange(G)},A._cleanRange=function(G,X){X||(X={}),G||(G="range");var q=E.nestedProperty(A,G).get(),W,ee;if(A.type==="date"?ee=E.dfltRange(A.calendar):I==="y"?ee=M.DFLTRANGEY:A._name==="realaxis"?ee=[0,1]:ee=X.dfltRange||M.DFLTRANGEX,ee=ee.slice(),(A.rangemode==="tozero"||A.rangemode==="nonnegative")&&(ee[0]=0),!q||q.length!==2){E.nestedProperty(A,G).set(ee);return}var ae=q[0]===null,fe=q[1]===null;for(A.type==="date"&&!A.autorange&&(q[0]=E.cleanDate(q[0],c,A.calendar),q[1]=E.cleanDate(q[1],c,A.calendar)),W=0;W<2;W++)if(A.type==="date"){if(!E.isDateTime(q[W],A.calendar)){A[G]=ee;break}if(A.r2l(q[0])===A.r2l(q[1])){var ye=E.constrain(A.r2l(q[0]),E.MIN_MS+1e3,E.MAX_MS-1e3);q[0]=A.l2r(ye-1e3),q[1]=A.l2r(ye+1e3);break}}else{if(!l(q[W]))if(!(ae||fe)&&l(q[1-W]))q[W]=q[1-W]*(W?10:.1);else{A[G]=ee;break}if(q[W]<-s?q[W]=-s:q[W]>s&&(q[W]=s),q[0]===q[1]){var xe=Math.max(1,Math.abs(q[0]*1e-6));q[0]-=xe,q[1]+=xe}}},A.setScale=function(G){var X=b._size;if(A.overlaying){var q=S.getFromId({_fullLayout:b},A.overlaying);A.domain=q.domain}var W=G&&A._r?"_r":"range",ee=A.calendar;A.cleanRange(W);var ae=A.r2l(A[W][0],ee),fe=A.r2l(A[W][1],ee),ye=I==="y";if(ye?(A._offset=X.t+(1-A.domain[1])*X.h,A._length=X.h*(A.domain[1]-A.domain[0]),A._m=A._length/(ae-fe),A._b=-A._m*fe):(A._offset=X.l+A.domain[0]*X.w,A._length=X.w*(A.domain[1]-A.domain[0]),A._m=A._length/(fe-ae),A._b=-A._m*ae),A._rangebreaks=[],A._lBreaks=0,A._m2=0,A._B=[],A.rangebreaks){var xe,Ae;if(A._rangebreaks=A.locateBreaks(Math.min(ae,fe),Math.max(ae,fe)),A._rangebreaks.length){for(xe=0;xefe&&(Me=!Me),Me&&A._rangebreaks.reverse();var Ie=Me?-1:1;for(A._m2=Ie*A._length/(Math.abs(fe-ae)-A._lBreaks),A._B.push(-A._m2*(ye?fe:ae)),xe=0;xeee&&(ee+=7,aeee&&(ee+=24,ae=W&&ae=W&&G=Ge.min&&(seGe.max&&(Ge.max=Te),Fe=!1)}Fe&&fe.push({min:se,max:Te})}};for(q=0;qT*2}function o(g){return Math.max(1,(g-1)/1e3)}function s(g,f){for(var p=g.length,m=o(p),i=0,T=0,S={},M=0;Mi*2}function c(g){return k(g[0])&&k(g[1])}}}),Ph=Ee({"src/plots/cartesian/autorange.js"(J,H){"use strict";var v=Va(),x=mi(),E=Vr(),k=Qi().FP_SAFE,l=Ri(),e=mo(),t=Xl(),n=t.getFromId,r=t.isLinked;H.exports={applyAutorangeOptions:A,getAutoRange:a,makePadFn:s,doAutoRange:p,findExtremes:m,concatExtremes:f};function a(b,z){var I,N,R=[],B=b._fullLayout,F=s(B,z,0),P=s(B,z,1),j=f(b,z),U=j.min,Z=j.max;if(U.length===0||Z.length===0)return E.simpleMap(z.range,z.r2l);var Q=U[0].val,re=Z[0].val;for(I=1;I0&&(xe=X-F(ee)-P(ae),xe>q?Ae/xe>W&&(fe=ee,ye=ae,W=Ae/xe):Ae/X>W&&(fe={val:ee.val,nopad:1},ye={val:ae.val,nopad:1},W=Ae/X));function Me(ge,le){return Math.max(ge,P(le))}if(Q===re){var Ie=Q-1,qe=Q+1;if(K)if(Q===0)R=[0,1];else{var je=(Q>0?Z:U).reduce(Me,0),ke=Q/(1-Math.min(.5,je/X));R=Q>0?[0,ke]:[ke,0]}else G?R=[Math.max(0,Ie),Math.max(1,qe)]:R=[Ie,qe]}else K?(fe.val>=0&&(fe={val:0,nopad:1}),ye.val<=0&&(ye={val:0,nopad:1})):G&&(fe.val-W*F(fe)<0&&(fe={val:0,nopad:1}),ye.val<=0&&(ye={val:1,nopad:1})),W=(ye.val-fe.val-o(z,ee.val,ae.val))/(X-F(fe)-P(ye)),R=[fe.val-W*F(fe),ye.val+W*P(ye)];return R=A(R,z),z.limitRange&&z.limitRange(),oe&&R.reverse(),E.simpleMap(R,z.l2r||Number)}function o(b,z,I){var N=0;if(b.rangebreaks)for(var R=b.locateBreaks(z,I),B=0;B0?I.ppadplus:I.ppadminus)||I.ppad||0),ee=q((b._m>0?I.ppadminus:I.ppadplus)||I.ppad||0),ae=q(I.vpadplus||I.vpad),fe=q(I.vpadminus||I.vpad);if(!U){if(G=1/0,X=-1/0,j)for(Q=0;Q0&&(G=re),re>X&&re-k&&(G=re),re>X&&re=Ae;Q--)xe(Q);return{min:N,max:R,opts:I}}function i(b,z,I,N){S(b,z,I,N,C)}function T(b,z,I,N){S(b,z,I,N,_)}function S(b,z,I,N,R){for(var B=N.tozero,F=N.extrapad,P=!0,j=0;j=I&&(U.extrapad||!F)){P=!1;break}else R(z,U.val)&&U.pad<=I&&(F||!U.extrapad)&&(b.splice(j,1),j--)}if(P){var Z=B&&z===0;b.push({val:z,pad:Z?0:I,extrapad:Z?!1:F})}}function M(b){return x(b)&&Math.abs(b)=z}function w(b,z){var I=z.autorangeoptions;return I&&I.minallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.minallowed:I&&I.clipmin!==void 0&&u(z,I.clipmin,I.clipmax)?Math.max(b,z.d2l(I.clipmin)):b}function h(b,z){var I=z.autorangeoptions;return I&&I.maxallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.maxallowed:I&&I.clipmax!==void 0&&u(z,I.clipmin,I.clipmax)?Math.min(b,z.d2l(I.clipmax)):b}function u(b,z,I){return z!==void 0&&I!==void 0?(z=b.d2l(z),I=b.d2l(I),z=j&&(B=j,I=j),F<=j&&(F=j,N=j)}}return I=w(I,z),N=h(N,z),[I,N]}}}),uo=Ee({"src/plots/cartesian/axes.js"(J,H){"use strict";var v=Va(),x=mi(),E=vl(),k=Ri(),l=Vr(),e=l.strTranslate,t=Fs(),n=Lv(),r=Qn(),a=mo(),o=Gc(),s=Lb(),c=tc(),g=Qi(),f=g.ONEMAXYEAR,p=g.ONEAVGYEAR,m=g.ONEMINYEAR,i=g.ONEMAXQUARTER,T=g.ONEAVGQUARTER,S=g.ONEMINQUARTER,M=g.ONEMAXMONTH,C=g.ONEAVGMONTH,_=g.ONEMINMONTH,w=g.ONEWEEK,h=g.ONEDAY,u=h/2,A=g.ONEHOUR,b=g.ONEMIN,z=g.ONESEC,I=g.ONEMILLI,N=g.ONEMICROSEC,R=g.MINUS_SIGN,B=g.BADNUM,F={K:"zeroline"},P={K:"gridline",L:"path"},j={K:"minor-gridline",L:"path"},U={K:"tick",L:"path"},Z={K:"tick",L:"text"},Q={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},re=rc(),ne=re.MID_SHIFT,oe=re.CAP_SHIFT,V=re.LINE_SPACING,$=re.OPPOSITE_SIDE,K=3,G=H.exports={};G.setConvert=Hh();var X=Op(),q=Xl(),W=q.idSort,ee=q.isLinked;G.id2name=q.id2name,G.name2id=q.name2id,G.cleanId=q.cleanId,G.list=q.list,G.listIds=q.listIds,G.getFromId=q.getFromId,G.getFromTrace=q.getFromTrace;var ae=Ph();G.getAutoRange=ae.getAutoRange,G.findExtremes=ae.findExtremes;var fe=1e-4;function ye(ot){var et=(ot[1]-ot[0])*fe;return[ot[0]-et,ot[1]+et]}function xe(ot,et,hr){if(![hr,ot,et].every(x)||hr===0)return ot;let ur=Math.round((ot-et)/hr),Tr=et+ur*hr;return ot!==Tr&&Math.abs(ot-Tr)br+" domain")),kt=kt.concat(Rr||[]),nr.length>Fr?(l.warn("Array attribute "+Ut+" has more entries than expected, truncating to "+Fr),nr=nr.slice(0,Fr)):nr.length2e-6||((hr-ot._forceTick0)/ot._minDtick%1+1.000001)%1>2e-6)&&(ot._minDtick=0))},G.saveRangeInitial=function(ot,et){for(var hr=G.list(ot,"",!0),ur=!1,Tr=0;TrEr*.3||Ut(ur)||Ut(Tr))){var br=hr.dtick/2;ot+=ot+brFr){var nt=Number(hr.slice(1));Rr.exactYears>Fr&&nt%12===0?ot=G.tickIncrement(ot,"M6","reverse")+h*1.5:Rr.exactMonths>Fr?ot=G.tickIncrement(ot,"M1","reverse")+h*15.5:ot-=u;var kt=G.tickIncrement(ot,hr);if(kt<=ur)return kt}return ot}G.prepMinorTicks=function(ot,et,hr){var ur,Tr;if(!((ur=et.minor)!=null&&ur.dtick)){delete ot.dtick;var Rr=et.dtick&&x(et._tmin),Fr;if(Rr){var nt=G.tickIncrement(et._tmin,et.dtick,!0);Fr=[et._tmin,nt*.99+et._tmin*.01]}else{var kt=l.simpleMap(et.range,et.r2l);Fr=[kt[0],.8*kt[0]+.2*kt[1]]}if(ot.range=l.simpleMap(Fr,et.l2r),ot._isMinor=!0,G.prepTicks(ot,hr),Rr){var Ut=x(et.dtick),nr=x(ot.dtick),Er=Ut?et.dtick:+et.dtick.substring(1),br=nr?ot.dtick:+ot.dtick.substring(1);Ut&&nr?ke(Er,br)?Er===2*w&&br===2*h&&(ot.dtick=w):Er===2*w&&br===3*h?ot.dtick=w:Er===w&&!(et._input.minor||{}).nticks?ot.dtick=h:ge(Er/br,2.5)?ot.dtick=Er/2:ot.dtick=Er:String(et.dtick).charAt(0)==="M"?nr?ot.dtick="M1":ke(Er,br)?Er>=12&&br===2&&(ot.dtick="M3"):ot.dtick=et.dtick:String(ot.dtick).charAt(0)==="L"?String(et.dtick).charAt(0)==="L"?ke(Er,br)||(ot.dtick=ge(Er/br,2.5)?et.dtick/2:et.dtick):ot.dtick="D1":ot.dtick==="D2"&&+et.dtick>1&&(ot.dtick=1)}ot.range=et.range}((Tr=et.minor)==null?void 0:Tr._tick0Init)===void 0&&(ot.tick0=et.tick0)};function ke(ot,et){return Math.abs((ot/et+.5)%1-.5)<.001}function ge(ot,et){return Math.abs(ot/et-1)<.001}G.prepTicks=function(ot,et){var hr=l.simpleMap(ot.range,ot.r2l,void 0,void 0,et);if(ot.tickmode==="auto"||!ot.dtick){var ur=ot.nticks,Tr;ur||(ot.type==="category"||ot.type==="multicategory"?(Tr=ot.tickfont?l.bigFont(ot.tickfont.size||12):15,ur=ot._length/Tr):(Tr=ot._id.charAt(0)==="y"?40:80,ur=l.constrain(ot._length/Tr,4,9)+1),ot._name==="radialaxis"&&(ur*=2)),ot.minor&&ot.minor.tickmode!=="array"||ot.tickmode==="array"&&(ur*=100),ot._roughDTick=Math.abs(hr[1]-hr[0])/ur,G.autoTicks(ot,ot._roughDTick),ot._minDtick>0&&ot.dtick0?(Rr=ur-1,Fr=ur):(Rr=ur,Fr=ur);var nt=ot[Rr].value,kt=ot[Fr].value,Ut=Math.abs(kt-nt),nr=hr||Ut,Er=0;nr>=m?Ut>=m&&Ut<=f?Er=Ut:Er=p:hr===T&&nr>=S?Ut>=S&&Ut<=i?Er=Ut:Er=T:nr>=_?Ut>=_&&Ut<=M?Er=Ut:Er=C:hr===w&&nr>=w?Er=w:nr>=h?Er=h:hr===u&&nr>=u?Er=u:hr===A&&nr>=A&&(Er=A);var br;Er>=Ut&&(Er=Ut,br=!0);var Or=Tr+Er;if(et.rangebreaks&&Er>0){for(var Pr=84,fa=0,Fa=0;Faw&&(Er=Ut)}(Er>0||ur===0)&&(ot[ur].periodX=Tr+Er/2)}}G.calcTicks=function(et,hr){for(var ur=et.type,Tr=et.calendar,Rr=et.ticklabelstep,Fr=et.ticklabelmode==="period",nt=et.range[0]>et.range[1],kt=!et.ticklabelindex||l.isArrayOrTypedArray(et.ticklabelindex)?et.ticklabelindex:[et.ticklabelindex],Ut=l.simpleMap(et.range,et.r2l,void 0,void 0,hr),nr=Ut[1]=(bi?0:1);gn--){var eo=!gn;gn?(et._dtickInit=et.dtick,et._tick0Init=et.tick0):bi&&(et.minor._dtickInit=et.minor.dtick,et.minor._tick0Init=et.minor.tick0);var si=gn?et:l.extendFlat({},et,bi?et.minor:{minor:{}});if(eo?G.prepMinorTicks(si,et,hr):G.prepTicks(si,hr),si.tickmode==="array"){gn?(Fa=[],Pr=We(et,!eo)):(La=[],fa=We(et,!eo));continue}if(si.tickmode==="sync"){Fa=[],Pr=Fe(et);continue}var Ao=ye(Ut),ro=Ao[0],Sn=Ao[1],Gi=x(si.dtick),ti=ur==="log"&&!(Gi||si.dtick.charAt(0)==="L"),fi=G.tickFirst(si,hr);if(gn){if(et._tmin=fi,fi=Sn:zi<=Sn;zi=G.tickIncrement(zi,So,nr,Tr)){if(gn&&so++,si.rangebreaks&&!nr){if(zi=br)break}if(Fa.length>Or||zi===xo)break;xo=zi;var ii={value:xe(zi,oi,So)};gn?(zi===fi&&(ii.first=!0),ti&&zi!==(zi|0)&&(ii.simpleLabel=!0),Rr>1&&so%Rr&&(ii.skipLabel=!0),Fa.push(ii)):(ii.minor=!0,La.push(ii))}}if(!La||La.length<3)kt=!1;else{var co=(La[2].value-La[1].value)*(nt?-1:1);Za(co,et.tickformat)||(kt=!1,La=La.slice(1))}if(!kt)Cn=Fa;else{var Wi=Fa.concat(La);Fr&&Fa.length&&(Wi=Wi.slice(1)),Wi=Wi.sort(function($o,Fo){return $o.value-Fo.value}).filter(function($o,Fo,Ji){return Fo===0||$o.value!==Ji[Fo-1].value});var Ho=Wi.map(function($o,Fo){return $o.minor===void 0&&!$o.skipLabel?Fo:null}).filter(function($o){return $o!==null});Ho.forEach(function($o){kt.map(function(Fo){var Ji=$o+Fo;Ji>=0&&Ji-1;Di--){if(Fa[Di].drop){Fa.splice(Di,1);continue}Fa[Di].value=bn(Fa[Di].value,et);var us=et.c2p(Fa[Di].value);(lo?go>us-Go:gobr||Robr&&(Ji.periodX=br),RoTr&&PrTr&&Fap)et/=p,ur=Tr(10),ot.dtick="M"+12*_r(et,ur,Ge);else if(Rr>C)et/=C,ot.dtick="M"+_r(et,1,gt);else if(Rr>h){if(ot.dtick=_r(et,h,ot._hasDayOfWeekBreaks?[1,2,7,14]:Tt),!hr){var Fr=G.getTickFormat(ot),nt=ot.ticklabelmode==="period";nt&&(ot._rawTick0=ot.tick0),/%[uVW]/.test(Fr)?ot.tick0=l.dateTick0(ot.calendar,2):ot.tick0=l.dateTick0(ot.calendar,1),nt&&(ot._dowTick0=ot.tick0)}}else Rr>A?ot.dtick=_r(et,A,gt):Rr>b?ot.dtick=_r(et,b,mt):Rr>z?ot.dtick=_r(et,z,mt):(ur=Tr(10),ot.dtick=_r(et,ur,Ge))}else if(ot.type==="log"){ot.tick0=0;var kt=l.simpleMap(ot.range,ot.r2l);if(ot._isMinor&&(et*=1.5),et>.7)ot.dtick=Math.ceil(et);else if(Math.abs(kt[1]-kt[0])<1){var Ut=1.5*Math.abs((kt[1]-kt[0])/et);et=Math.abs(Math.pow(10,kt[1])-Math.pow(10,kt[0]))/Ut,ur=Tr(10),ot.dtick="L"+_r(et,ur,Ge)}else ot.dtick=et>.3?"D2":"D1"}else ot.type==="category"||ot.type==="multicategory"?(ot.tick0=0,ot.dtick=Math.ceil(Math.max(et,1))):ci(ot)?(ot.tick0=0,ur=1,ot.dtick=_r(et,ur,ar)):(ot.tick0=0,ur=Tr(10),ot.dtick=_r(et,ur,Ge));if(ot.dtick===0&&(ot.dtick=1),!x(ot.dtick)&&typeof ot.dtick!="string"){var nr=ot.dtick;throw ot.dtick=1,"ax.dtick error: "+String(nr)}};function Zt(ot){var et=ot.dtick;if(ot._tickexponent=0,!x(et)&&typeof et!="string"&&(et=1),(ot.type==="category"||ot.type==="multicategory")&&(ot._tickround=null),ot.type==="date"){var hr=ot.r2l(ot.tick0),ur=ot.l2r(hr).replace(/(^-|i)/g,""),Tr=ur.length;if(String(et).charAt(0)==="M")Tr>10||ur.slice(5)!=="01-01"?ot._tickround="d":ot._tickround=+et.slice(1)%12===0?"y":"m";else if(et>=h&&Tr<=10||et>=h*15)ot._tickround="d";else if(et>=b&&Tr<=16||et>=A)ot._tickround="M";else if(et>=z&&Tr<=19||et>=b)ot._tickround="S";else{var Rr=ot.l2r(hr+et).replace(/^-/,"").length;ot._tickround=Math.max(Tr,Rr)-20,ot._tickround<0&&(ot._tickround=4)}}else if(x(et)||et.charAt(0)==="L"){var Fr=ot.range.map(ot.r2d||Number);x(et)||(et=Number(et.slice(1))),ot._tickround=2-Math.floor(Math.log(et)/Math.LN10+.01);var nt=Math.max(Math.abs(Fr[0]),Math.abs(Fr[1])),kt=Math.floor(Math.log(nt)/Math.LN10+.01),Ut=ot.minexponent===void 0?3:ot.minexponent;Math.abs(kt)>Ut&&(Mt(ot.exponentformat)&&ot.exponentformat!=="SI extended"&&!dt(kt)||Mt(ot.exponentformat)&&ot.exponentformat==="SI extended"&&!Dt(kt)?ot._tickexponent=3*Math.round((kt-1)/3):ot._tickexponent=kt)}else ot._tickround=null}G.tickIncrement=function(ot,et,hr,ur){var Tr=hr?-1:1;if(x(et))return l.increment(ot,Tr*et);var Rr=et.charAt(0),Fr=Tr*Number(et.slice(1));if(Rr==="M")return l.incrementMonth(ot,Fr,ur);if(Rr==="L")return Math.log(Math.pow(10,ot)+Fr)/Math.LN10;if(Rr==="D"){var nt=et==="D2"?Kt:At,kt=ot+Tr*.01,Ut=l.roundUp(l.mod(kt,1),nt,hr);return Math.floor(kt)+Math.log(v.round(Math.pow(10,Ut),1))/Math.LN10}throw"unrecognized dtick "+String(et)},G.tickFirst=function(ot,et){var hr=ot.r2l||Number,ur=l.simpleMap(ot.range,hr,void 0,void 0,et),Tr=ur[1]=0&&bi<=ot._length?mn:null};if(kt&&l.isArrayOrTypedArray(ot.ticktext)){var Pr=l.simpleMap(ot.range,ot.r2l),fa=(Math.abs(Pr[1]-Pr[0])-(ot._lBreaks||0))/1e4;for(br=0;br"+nt;else{var Ut=pn(ot),nr=ot._trueSide||ot.side;(!Ut&&nr==="top"||Ut&&nr==="bottom")&&(Fr+="
")}et.text=Fr}function vt(ot,et,hr,ur,Tr){var Rr=ot.dtick,Fr=et.x,nt=ot.tickformat,kt=typeof Rr=="string"&&Rr.charAt(0);if(Tr==="never"&&(Tr=""),ur&&kt!=="L"&&(Rr="L3",kt="L"),nt||kt==="L")et.text=Vt(Math.pow(10,Fr),ot,Tr,ur);else if(x(Rr)||kt==="D"&&(ot.minorloglabels==="complete"||l.mod(Fr+.01,1)<.1)){var Ut;ot.minorloglabels==="complete"&&!(l.mod(Fr+.01,1)<.1)&&(Ut=!0,et.fontSize*=.75);var nr=Math.pow(10,Fr).toExponential(0),Er=nr.split("e"),br=+Er[1],Or=Math.abs(br),Pr=ot.exponentformat;Pr==="power"||Mt(Pr)&&Pr!=="SI extended"&&dt(br)||Mt(Pr)&&Pr==="SI extended"&&Dt(br)?(et.text=Er[0],Or>0&&(et.text+="x10"),et.text==="1x10"&&(et.text="10"),br!==0&&br!==1&&(et.text+=""+(br>0?"":R)+Or+""),et.fontSize*=1.25):(Pr==="e"||Pr==="E")&&Or>2?et.text=Er[0]+Pr+(br>0?"+":R)+Or:(et.text=Vt(Math.pow(10,Fr),ot,"","fakehover"),Rr==="D1"&&ot._id.charAt(0)==="y"&&(et.dy-=et.fontSize/6))}else if(kt==="D")et.text=ot.minorloglabels==="none"?"":String(Math.round(Math.pow(10,l.mod(Fr,1)))),et.fontSize*=.75;else throw"unrecognized dtick "+String(Rr);if(ot.dtick==="D1"){var fa=String(et.text).charAt(0);(fa==="0"||fa==="1")&&(ot._id.charAt(0)==="y"?et.dx-=et.fontSize/4:(et.dy+=et.fontSize/2,et.dx+=(ot.range[1]>ot.range[0]?1:-1)*et.fontSize*(Fr<0?.5:.25)))}}function ht(ot,et){var hr=ot._categories[Math.round(et.x)];hr===void 0&&(hr=""),et.text=String(hr)}function Re(ot,et,hr){var ur=Math.round(et.x),Tr=ot._categories[ur]||[],Rr=Tr[1]===void 0?"":String(Tr[1]),Fr=Tr[0]===void 0?"":String(Tr[0]);hr?et.text=Fr+" - "+Rr:(et.text=Rr,et.text2=Fr)}function Be(ot,et,hr,ur,Tr){Tr==="never"?Tr="":ot.showexponent==="all"&&Math.abs(et.x/ot.dtick)<1e-6&&(Tr="hide"),et.text=Vt(et.x,ot,Tr,ur)}function He(ot,et,hr,ur,Tr){if(ot.thetaunit==="radians"&&!hr){var Rr=et.x/180;if(Rr===0)et.text="0";else{var Fr=$e(Rr);if(Fr[1]>=100)et.text=Vt(l.deg2rad(et.x),ot,Tr,ur);else{var nt=et.x<0;Fr[1]===1?Fr[0]===1?et.text="\u03C0":et.text=Fr[0]+"\u03C0":et.text=["",Fr[0],"","\u2044","",Fr[1],"","\u03C0"].join(""),nt&&(et.text=R+et.text)}}}else et.text=Vt(et.x,ot,Tr,ur)}function $e(ot){function et(nt,kt){return Math.abs(nt-kt)<=1e-6}function hr(nt,kt){return et(kt,0)?nt:hr(kt,nt%kt)}function ur(nt){for(var kt=1;!et(Math.round(nt*kt)/kt,nt);)kt*=10;return kt}var Tr=ur(ot),Rr=ot*Tr,Fr=Math.abs(hr(Rr,Tr));return[Math.round(Rr/Fr),Math.round(Tr/Fr)]}var Ze=["f","p","n","\u03BC","m","","k","M","G","T"],Je=["q","r","y","z","a",...Ze,"P","E","Z","Y","R","Q"],Mt=ot=>["SI","SI extended","B"].includes(ot);function dt(ot){return ot>14||ot<-15}function Dt(ot){return ot>32||ot<-30}function Ct(ot,et){return Mt(et)?!!(et==="SI extended"&&Dt(ot)||et!=="SI extended"&&dt(ot)):!1}function Vt(ot,et,hr,ur){var Tr=ot<0,Rr=et._tickround,Fr=hr||et.exponentformat||"B",nt=et._tickexponent,kt=G.getTickFormat(et),Ut=et.separatethousands;if(ur){var nr={exponentformat:Fr,minexponent:et.minexponent,dtick:et.showexponent==="none"?et.dtick:x(ot)&&Math.abs(ot)||1,range:et.showexponent==="none"?et.range.map(et.r2d):[0,ot||1]};Zt(nr),Rr=(Number(nr._tickround)||0)+4,nt=nr._tickexponent,et.hoverformat&&(kt=et.hoverformat)}if(kt)return et._numFormat(kt)(ot).replace(/-/g,R);Fr==="none"&&(nt=0),ot=Math.abs(ot);let Er=Math.pow(10,-Rr)/2;if(ot"+br+"":Fr==="B"&&nt===9?ot+="B":Mt(Fr)&&(ot+=Fr==="SI extended"?Je[nt/3+10]:Ze[nt/3+5])}return Tr?R+ot:ot}G.getTickFormat=function(ot){var et;function hr(kt){return typeof kt!="string"?kt:Number(kt.replace("M",""))*C}function ur(kt,Ut){var nr=["L","D"];if(typeof kt==typeof Ut){if(typeof kt=="number")return kt-Ut;var Er=nr.indexOf(kt.charAt(0)),br=nr.indexOf(Ut.charAt(0));return Er===br?Number(kt.replace(/(L|D)/g,""))-Number(Ut.replace(/(L|D)/g,"")):Er-br}else return typeof kt=="number"?1:-1}function Tr(kt,Ut,nr){var Er=nr||function(Pr){return Pr},br=Ut[0],Or=Ut[1];return(!br&&typeof br!="number"||Er(br)<=Er(kt))&&(!Or&&typeof Or!="number"||Er(Or)>=Er(kt))}function Rr(kt,Ut){var nr=Ut[0]===null,Er=Ut[1]===null,br=ur(kt,Ut[0])>=0,Or=ur(kt,Ut[1])<=0;return(nr||br)&&(Er||Or)}var Fr,nt;if(ot.tickformatstops&&ot.tickformatstops.length>0)switch(ot.type){case"date":case"linear":{for(et=0;et=0&&Tr.unshift(Tr.splice(nr,1).shift())}});var nt={false:{left:0,right:0}};return l.syncOrAsync(Tr.map(function(kt){return function(){if(kt){var Ut=G.getFromId(ot,kt);hr||(hr={}),hr.axShifts=nt,hr.overlayingShiftedAx=Fr;var nr=G.drawOne(ot,Ut,hr);return Ut._shiftPusher&&ho(Ut,Ut._fullDepth||0,nt,!0),Ut._r=Ut.range.slice(),Ut._rl=l.simpleMap(Ut._r,Ut.r2l),nr}}}))},G.drawOne=function(ot,et,hr){hr=hr||{};var ur=hr.axShifts||{},Tr=hr.overlayingShiftedAx||[],Rr,Fr,nt;et.setScale();var kt=ot._fullLayout,Ut=et._id,nr=Ut.charAt(0),Er=G.counterLetter(Ut),br=kt._plots[et._mainSubplot],Or=et.zerolinelayer==="above traces";if(!br)return;if(et._shiftPusher=et.autoshift||Tr.indexOf(et._id)!==-1||Tr.indexOf(et.overlaying)!==-1,et._shiftPusher&et.anchor==="free"){var Pr=et.linewidth/2||0;et.ticks==="inside"&&(Pr+=et.ticklen),ho(et,Pr,ur,!0),ho(et,et.shift||0,ur,!1)}(hr.skipTitle!==!0||et._shift===void 0)&&(et._shift=dn(et,ur));var fa=br[nr+"axislayer"],Fa=et._mainLinePosition,La=Fa+=et._shift,Cn=et._mainMirrorPosition,mn=et._vals=G.calcTicks(et),bi=[et.mirror,La,Cn].join("_");for(Rr=0;Rr0?Fo.bottom-Ps:0,$o))));var zl=0,ml=0;if(et._shiftPusher&&(zl=Math.max($o,Fo.height>0?es==="l"?Ps-Fo.left:Fo.right-Ps:0),et.title.text!==kt._dfltTitle[nr]&&(ml=(et._titleStandoff||0)+(et._titleScoot||0),es==="l"&&(ml+=Ir(et))),et._fullDepth=Math.max(zl,ml)),et.automargin){Ji={x:0,y:0,r:0,l:0,t:0,b:0};var Ts=[0,1],yl=typeof et._shift=="number"?et._shift:0;if(nr==="x"){if(es==="b"?Ji[es]=et._depth:(Ji[es]=et._depth=Math.max(Fo.width>0?Ps-Fo.top:0,$o),Ts.reverse()),Fo.width>0){var mu=Fo.right-(et._offset+et._length);mu>0&&(Ji.xr=1,Ji.r=mu);var su=et._offset-Fo.left;su>0&&(Ji.xl=0,Ji.l=su)}}else if(es==="l"?(et._depth=Math.max(Fo.height>0?Ps-Fo.left:0,$o),Ji[es]=et._depth-yl):(et._depth=Math.max(Fo.height>0?Fo.right-Ps:0,$o),Ji[es]=et._depth+yl,Ts.reverse()),Fo.height>0){var cc=Fo.bottom-(et._offset+et._length);cc>0&&(Ji.yb=0,Ji.b=cc);var Bl=et._offset-Fo.top;Bl>0&&(Ji.yt=1,Ji.t=Bl)}Ji[Er]=et.anchor==="free"?et.position:et._anchorAxis.domain[Ts[0]],et.title.text!==kt._dfltTitle[nr]&&(Ji[es]+=Ir(et)+(et.title.standoff||0)),et.mirror&&et.anchor!=="free"&&(Ro={x:0,y:0,r:0,l:0,t:0,b:0},Ro[Zs]=et.linewidth,et.mirror&&et.mirror!==!0&&(Ro[Zs]+=$o),et.mirror===!0||et.mirror==="ticks"?Ro[Er]=et._anchorAxis.domain[Ts[1]]:(et.mirror==="all"||et.mirror==="allticks")&&(Ro[Er]=[et._counterDomainMin,et._counterDomainMax][Ts[1]]))}Is&&(Ls=k.getComponentMethod("rangeslider","autoMarginOpts")(ot,et)),typeof et.automargin=="string"&&(Ht(Ji,et.automargin),Ht(Ro,et.automargin)),E.autoMargin(ot,An(et),Ji),E.autoMargin(ot,un(et),Ro),E.autoMargin(ot,Ja(et),Ls)}),l.syncOrAsync(Jo)}};function Ht(ot,et){if(ot){var hr=Object.keys(Q).reduce(function(ur,Tr){return et.indexOf(Tr)!==-1&&Q[Tr].forEach(function(Rr){ur[Rr]=1}),ur},{});Object.keys(ot).forEach(function(ur){hr[ur]||(ur.length===1?ot[ur]=0:delete ot[ur])})}}function Wt(ot,et){var hr=[],ur,Tr=function(Rr,Fr){var nt=Rr.xbnd[Fr];nt!==null&&hr.push(l.extendFlat({},Rr,{x:nt}))};if(et.length){for(ur=0;urot.range[1],nt=ot.ticklabelposition&&ot.ticklabelposition.indexOf("inside")!==-1,kt=!nt;if(hr){var Ut=Fr?-1:1;hr=hr*Ut}if(ur){var nr=ot.side,Er=nt&&(nr==="top"||nr==="left")||kt&&(nr==="bottom"||nr==="right")?1:-1;ur=ur*Er}return ot._id.charAt(0)==="x"?function(br){return e(Tr+ot._offset+ot.l2p(It(br))+hr,Rr+ur)}:function(br){return e(Rr+ur,Tr+ot._offset+ot.l2p(It(br))+hr)}};function It(ot){return ot.periodX!==void 0?ot.periodX:ot.x}function ir(ot){var et=ot.ticklabelposition||"",hr=ot.tickson||"",ur=function(Pr){return et.indexOf(Pr)!==-1},Tr=ur("top"),Rr=ur("left"),Fr=ur("right"),nt=ur("bottom"),kt=ur("inside"),Ut=hr!=="boundaries"&&(nt||Rr||Tr||Fr);if(!Ut&&!kt)return[0,0];var nr=ot.side,Er=Ut?(ot.tickwidth||0)/2:0,br=K,Or=ot.tickfont?ot.tickfont.size:12;return(nt||Tr)&&(Er+=Or*oe,br+=(ot.linewidth||0)/2),(Rr||Fr)&&(Er+=(ot.linewidth||0)/2,br+=K),kt&&nr==="top"&&(br-=Or*(1-oe)),(Rr||Tr)&&(Er=-Er),(nr==="bottom"||nr==="right")&&(br=-br),[Ut?Er:0,kt?br:0]}G.makeTickPath=function(ot,et,hr,ur){ur||(ur={});var Tr=ur.minor;if(Tr&&!ot.minor)return"";var Rr=ur.len!==void 0?ur.len:Tr?ot.minor.ticklen:ot.ticklen,Fr=ot._id.charAt(0),nt=(ot.linewidth||1)/2;return Fr==="x"?"M0,"+(et+nt*hr)+"v"+Rr*hr:"M"+(et+nt*hr)+",0h"+Rr*hr},G.makeLabelFns=function(ot,et,hr){var ur=ot.ticklabelposition||"",Tr=ot.tickson||"",Rr=function(fi){return ur.indexOf(fi)!==-1},Fr=Rr("top"),nt=Rr("left"),kt=Rr("right"),Ut=Rr("bottom"),nr=Tr!=="boundaries"&&(Ut||nt||Fr||kt),Er=Rr("inside"),br=ur==="inside"&&ot.ticks==="inside"||!Er&&ot.ticks==="outside"&&Tr!=="boundaries",Or=0,Pr=0,fa=br?ot.ticklen:0;if(Er?fa*=-1:nr&&(fa=0),br&&(Or+=fa,hr)){var Fa=l.deg2rad(hr);Or=fa*Math.cos(Fa)+1,Pr=fa*Math.sin(Fa)}ot.showticklabels&&(br||ot.showline)&&(Or+=.2*ot.tickfont.size),Or+=(ot.linewidth||1)/2*(Er?-1:1);var La={labelStandoff:Or,labelShift:Pr},Cn,mn,bi,gn,eo=0,si=ot.side,Ao=ot._id.charAt(0),ro=ot.tickangle,Sn;if(Ao==="x")Sn=!Er&&si==="bottom"||Er&&si==="top",gn=Sn?1:-1,Er&&(gn*=-1),Cn=Pr*gn,mn=et+Or*gn,bi=Sn?1:-.2,Math.abs(ro)===90&&(Er?bi+=ne:ro===-90&&si==="bottom"?bi=oe:ro===90&&si==="top"?bi=ne:bi=.5,eo=ne/2*(ro/90)),La.xFn=function(fi){return fi.dx+Cn+eo*fi.fontSize},La.yFn=function(fi){return fi.dy+mn+fi.fontSize*bi},La.anchorFn=function(fi,xo){if(nr){if(nt)return"end";if(kt)return"start"}return!x(xo)||xo===0||xo===180?"middle":xo*gn<0!==Er?"end":"start"},La.heightFn=function(fi,xo,zi){return xo<-60||xo>60?-.5*zi:ot.side==="top"!==Er?-zi:0};else if(Ao==="y"){if(Sn=!Er&&si==="left"||Er&&si==="right",gn=Sn?1:-1,Er&&(gn*=-1),Cn=Or,mn=Pr*gn,bi=0,!Er&&Math.abs(ro)===90&&(ro===-90&&si==="left"||ro===90&&si==="right"?bi=oe:bi=.5),Er){var Gi=x(ro)?+ro:0;if(Gi!==0){var ti=l.deg2rad(Gi);eo=Math.abs(Math.sin(ti))*oe*gn,bi=0}}La.xFn=function(fi){return fi.dx+et-(Cn+fi.fontSize*bi)*gn+eo*fi.fontSize},La.yFn=function(fi){return fi.dy+mn+fi.fontSize*ne},La.anchorFn=function(fi,xo){return x(xo)&&Math.abs(xo)===90?"middle":Sn?"end":"start"},La.heightFn=function(fi,xo,zi){return ot.side==="right"&&(xo*=-1),xo<-30?-zi:xo<30?-.5*zi:0}}return La};function cr(ot){return[ot.text,ot.x,ot.axInfo,ot.font,ot.fontSize,ot.fontColor].join("_")}G.drawTicks=function(ot,et,hr){hr=hr||{};var ur=et._id+"tick",Tr=[].concat(et.minor&&et.minor.ticks?hr.vals.filter(function(Fr){return Fr.minor&&!Fr.noTick}):[]).concat(et.ticks?hr.vals.filter(function(Fr){return!Fr.minor&&!Fr.noTick}):[]),Rr=hr.layer.selectAll("path."+ur).data(Tr,cr);Rr.exit().remove(),Rr.enter().append("path").classed(ur,1).classed("ticks",1).classed("crisp",hr.crisp!==!1).each(function(Fr){return r.stroke(v.select(this),Fr.minor?et.minor.tickcolor:et.tickcolor)}).style("stroke-width",function(Fr){return a.crispRound(ot,Fr.minor?et.minor.tickwidth:et.tickwidth,1)+"px"}).attr("d",hr.path).style("display",null),Ii(et,[U]),Rr.attr("transform",hr.transFn)},G.drawGrid=function(ot,et,hr){if(hr=hr||{},et.tickmode!=="sync"){var ur=et._id+"grid",Tr=et.minor&&et.minor.showgrid,Rr=Tr?hr.vals.filter(function(La){return La.minor}):[],Fr=et.showgrid?hr.vals.filter(function(La){return!La.minor}):[],nt=hr.counterAxis;if(nt&&G.shouldShowZeroLine(ot,et,nt))for(var kt=et.tickmode==="array",Ut=0;Ut=0;Pr--){var fa=Pr?br:Or;if(fa){var Fa=fa.selectAll("path."+ur).data(Pr?Fr:Rr,cr);Fa.exit().remove(),Fa.enter().append("path").classed(ur,1).classed("crisp",hr.crisp!==!1),Fa.attr("transform",hr.transFn).attr("d",hr.path).each(function(La){return r.stroke(v.select(this),La.minor?et.minor.gridcolor:et.gridcolor||"#ddd")}).style("stroke-dasharray",function(La){return a.dashStyle(La.minor?et.minor.griddash:et.griddash,La.minor?et.minor.gridwidth:et.gridwidth)}).style("stroke-width",function(La){return(La.minor?Er:et._gw)+"px"}).style("display",null),typeof hr.path=="function"&&Fa.attr("d",hr.path)}}Ii(et,[P,j])}},G.drawZeroLine=function(ot,et,hr){hr=hr||hr;var ur=et._id+"zl",Tr=G.shouldShowZeroLine(ot,et,hr.counterAxis),Rr=hr.layer.selectAll("path."+ur).data(Tr?[{x:0,id:et._id}]:[]);Rr.exit().remove(),Rr.enter().append("path").classed(ur,1).classed("zl",1).classed("crisp",hr.crisp!==!1).each(function(){hr.layer.selectAll("path").sort(function(Fr,nt){return W(Fr.id,nt.id)})}),Rr.attr("transform",hr.transFn).attr("d",hr.path).call(r.stroke,et.zerolinecolor||r.defaultLine).style("stroke-width",a.crispRound(ot,et.zerolinewidth,et._gw||1)+"px").style("display",null),Ii(et,[F])},G.drawLabels=function(ot,et,hr){hr=hr||{};var ur=ot._fullLayout,Tr=et._id,Rr=et.zerolinelayer==="above traces",Fr=hr.cls||Tr+"tick",nt=hr.vals.filter(function(oi){return oi.text}),kt=hr.labelFns,Ut=hr.secondary?0:et.tickangle,nr=(et._prevTickAngles||{})[Fr],Er=hr.layer.selectAll("g."+Fr).data(et.showticklabels?nt:[],cr),br=[];Er.enter().append("g").classed(Fr,1).append("text").attr("text-anchor","middle").each(function(oi){var ii=v.select(this),co=ot._promises.length;ii.call(t.positionText,kt.xFn(oi),kt.yFn(oi)).call(a.font,{family:oi.font,size:oi.fontSize,color:oi.fontColor,weight:oi.fontWeight,style:oi.fontStyle,variant:oi.fontVariant,textcase:oi.fontTextcase,lineposition:oi.fontLineposition,shadow:oi.fontShadow}).text(oi.text).call(t.convertToTspans,ot),ot._promises[co]?br.push(ot._promises.pop().then(function(){Or(ii,Ut)})):Or(ii,Ut)}),Ii(et,[Z]),Er.exit().remove(),hr.repositionOnUpdate&&Er.each(function(oi){v.select(this).select("text").call(t.positionText,kt.xFn(oi),kt.yFn(oi))});function Or(oi,ii){oi.each(function(co){var Wi=v.select(this),Ho=Wi.select(".text-math-group"),Io=kt.anchorFn(co,ii),qo=hr.transFn.call(Wi.node(),co)+(x(ii)&&+ii!=0?" rotate("+ii+","+kt.xFn(co)+","+(kt.yFn(co)-co.fontSize/2)+")":""),Oo=t.lineCount(Wi),ws=V*co.fontSize,Ko=kt.heightFn(co,x(ii)?+ii:0,(Oo-1)*ws);if(Ko&&(qo+=e(0,Ko)),Ho.empty()){var as=Wi.select("text");as.attr({transform:qo,"text-anchor":Io}),as.style("display",null),et._adjustTickLabelsOverflow&&et._adjustTickLabelsOverflow()}else{var wo=a.bBox(Ho.node()).width,No=wo*{end:-.5,start:.5}[Io];Ho.attr("transform",qo+e(No,0))}})}et._adjustTickLabelsOverflow=function(){var oi=et.ticklabeloverflow;if(!(!oi||oi==="allow")){var ii=oi.indexOf("hide")!==-1,co=et._id.charAt(0)==="x",Wi=0,Ho=co?ot._fullLayout.width:ot._fullLayout.height;if(oi.indexOf("domain")!==-1){var Io=l.simpleMap(et.range,et.r2l);Wi=et.l2p(Io[0])+et._offset,Ho=et.l2p(Io[1])+et._offset}var qo=Math.min(Wi,Ho),Oo=Math.max(Wi,Ho),ws=et.side,Ko=1/0,as=-1/0;Er.each(function(lo){var Go=v.select(this),go=Go.select(".text-math-group");if(go.empty()){var us=a.bBox(Go.node()),Jo=0;co?(us.right>Oo||us.leftOo||us.top+(et.tickangle?0:lo.fontSize/4)et["_visibleLabelMin_"+Io._id]?Go.style("display","none"):Oo.K==="tick"&&!qo&&Go.node().style.display!=="none"&&Go.style("display",null)})})})})},Or(Er,nr+1?nr:Ut);function Pr(){return br.length&&Promise.all(br)}var fa=null;function Fa(){if(Or(Er,Ut),nt.length&&et.autotickangles&&(et.type!=="log"||String(et.dtick).charAt(0)!=="D")){fa=et.autotickangles[0];var oi=0,ii=[],co,Wi=1;Er.each(function(Ji){oi=Math.max(oi,Ji.fontSize);var Ro=et.l2p(Ji.x),Ls=Oa(this),zl=a.bBox(Ls.node());Wi=Math.max(Wi,t.lineCount(Ls)),ii.push({top:0,bottom:10,height:10,left:Ro-zl.width/2,right:Ro+zl.width/2+2,width:zl.width+2})});var Ho=(et.tickson==="boundaries"||et.showdividers)&&!hr.secondary,Io=nt.length,qo=Math.abs((nt[Io-1].x-nt[0].x)*et._m)/(Io-1),Oo=Ho?qo/2:qo,ws=Ho?et.ticklen:oi*1.25*Wi,Ko=Math.sqrt(Math.pow(Oo,2)+Math.pow(ws,2)),as=Oo/Ko,wo=et.autotickangles.map(function(Ji){return Ji*Math.PI/180}),No=wo.find(function(Ji){return Math.abs(Math.cos(Ji))<=as});No===void 0&&(No=wo.reduce(function(Ji,Ro){return Math.abs(Math.cos(Ji))so*zi&&(ti=zi,ro[Ao]=Sn[Ao]=fi[Ao])}var Mo=Math.abs(ti-Gi);Mo-gn>0?(Mo-=gn,gn*=1+gn/Mo):gn=0,et._id.charAt(0)!=="y"&&(gn=-gn),ro[si]=mn.p2r(mn.r2p(Sn[si])+eo*gn),mn.autorange==="min"||mn.autorange==="max reversed"?(ro[0]=null,mn._rangeInitial0=void 0,mn._rangeInitial1=void 0):(mn.autorange==="max"||mn.autorange==="min reversed")&&(ro[1]=null,mn._rangeInitial0=void 0,mn._rangeInitial1=void 0),ur._insideTickLabelsUpdaterange[mn._name+".range"]=ro}var So=l.syncOrAsync(La);return So&&So.then&&ot._promises.push(So),So};function fr(ot,et,hr){var ur=et._id+"divider",Tr=hr.vals,Rr=hr.layer.selectAll("path."+ur).data(Tr,cr);Rr.exit().remove(),Rr.enter().insert("path",":first-child").classed(ur,1).classed("crisp",1).call(r.stroke,et.dividercolor).style("stroke-width",a.crispRound(ot,et.dividerwidth,1)+"px"),Rr.attr("transform",hr.transFn).attr("d",hr.path)}G.getPxPosition=function(ot,et){var hr=ot._fullLayout._size,ur=et._id.charAt(0),Tr=et.side,Rr;if(et.anchor!=="free"?Rr=et._anchorAxis:ur==="x"?Rr={_offset:hr.t+(1-(et.position||0))*hr.h,_length:0}:ur==="y"&&(Rr={_offset:hr.l+(et.position||0)*hr.w+et._shift,_length:0}),Tr==="top"||Tr==="left")return Rr._offset;if(Tr==="bottom"||Tr==="right")return Rr._offset+Rr._length};function Ir(ot){var et=ot.title.font.size,hr=(ot.title.text.match(t.BR_TAG_ALL)||[]).length;return ot.title.hasOwnProperty("standoff")?et*(oe+hr*V):hr?et*(hr+1)*V:et}function sa(ot,et){var hr=ot._fullLayout,ur=et._id,Tr=ur.charAt(0),Rr=et.title.font.size,Fr,nt=(et.title.text.match(t.BR_TAG_ALL)||[]).length;if(et.title.hasOwnProperty("standoff"))et.side==="bottom"||et.side==="right"?Fr=et._depth+et.title.standoff+Rr*oe:(et.side==="top"||et.side==="left")&&(Fr=et._depth+et.title.standoff+Rr*(ne+nt*V));else{var kt=pn(et);if(et.type==="multicategory")Fr=et._depth;else{var Ut=1.5*Rr;kt&&(Ut=.5*Rr,et.ticks==="outside"&&(Ut+=et.ticklen)),Fr=10+Ut+(et.linewidth?et.linewidth-1:0)}kt||(Tr==="x"?Fr+=et.side==="top"?Rr*(et.showticklabels?1:0):Rr*(et.showticklabels?1.5:.5):Fr+=et.side==="right"?Rr*(et.showticklabels?1:.5):Rr*(et.showticklabels?.5:0))}var nr=G.getPxPosition(ot,et),Er,br,Or;Tr==="x"?(br=et._offset+et._length/2,Or=et.side==="top"?nr-Fr:nr+Fr):(Or=et._offset+et._length/2,br=et.side==="right"?nr+Fr:nr-Fr,Er={rotate:"-90",offset:0});var Pr;if(et.type!=="multicategory"){var fa=et._selections[et._id+"tick"];if(Pr={selection:fa,side:et.side},fa&&fa.node()&&fa.node().parentNode){var Fa=a.getTranslate(fa.node().parentNode);Pr.offsetLeft=Fa.x,Pr.offsetTop=Fa.y}et.title.hasOwnProperty("standoff")&&(Pr.pad=0)}return et._titleStandoff=Fr,n.draw(ot,ur+"title",{propContainer:et,propName:et._name+".title.text",placeholder:hr._dfltTitle[Tr],avoid:Pr,transform:Er,attributes:{x:br,y:Or,"text-anchor":"middle"}})}G.shouldShowZeroLine=function(ot,et,hr){var ur=l.simpleMap(et.range,et.r2l);return ur[0]*ur[1]<=0&&et.zeroline&&(et.type==="linear"||et.type==="-")&&!(et.rangebreaks&&et.maskBreaks(0)===B)&&(aa(et,0)||!xa(ot,et,hr,ur)||ja(ot,et))},G.clipEnds=function(ot,et){return et.filter(function(hr){return aa(ot,hr.x)})};function aa(ot,et){var hr=ot.l2p(et);return hr>1&&hr1)for(Tr=1;Tr=Tr.min&&ot=N:/%L/.test(et)?ot>=I:/%[SX]/.test(et)?ot>=z:/%M/.test(et)?ot>=b:/%[HI]/.test(et)?ot>=A:/%p/.test(et)?ot>=u:/%[Aadejuwx]/.test(et)?ot>=h:/%[UVW]/.test(et)?ot>=w:/%[Bbm]/.test(et)?ot>=_:/%[q]/.test(et)?ot>=S:/%[Yy]/.test(et)?ot>=m:!0}}}),Rb=Ee({"src/plots/cartesian/autorange_options_defaults.js"(J,H){"use strict";H.exports=function(x,E,k){var l,e;if(k){var t=E==="reversed"||E==="min reversed"||E==="max reversed";l=k[t?1:0],e=k[t?0:1]}var n=x("autorangeoptions.minallowed",e===null?l:void 0),r=x("autorangeoptions.maxallowed",l===null?e:void 0);n===void 0&&x("autorangeoptions.clipmin"),r===void 0&&x("autorangeoptions.clipmax"),x("autorangeoptions.include")}}}),Fb=Ee({"src/plots/cartesian/range_defaults.js"(J,H){"use strict";var v=Rb();H.exports=function(E,k,l,e){var t=k._template||{},n=k.type||t.type||"-";l("minallowed"),l("maxallowed");var r=l("range");if(!r){var a;!e.noInsiderange&&n!=="log"&&(a=l("insiderange"),a&&(a[0]===null||a[1]===null)&&(k.insiderange=!1,a=void 0),a&&(r=l("range",a)))}var o=k.getAutorangeDflt(r,e),s=l("autorange",o),c;r&&(r[0]===null&&r[1]===null||(r[0]===null||r[1]===null)&&(s==="reversed"||s===!0)||r[0]!==null&&(s==="min"||s==="max reversed")||r[1]!==null&&(s==="max"||s==="min reversed"))&&(r=void 0,delete k.range,k.autorange=!0,c=!0),c||(o=k.getAutorangeDflt(r,e),s=l("autorange",o)),s&&(v(l,s,r),(n==="linear"||n==="-")&&l("rangemode")),k.cleanRange()}}}),vM=Ee({"node_modules/mouse-event-offset/index.js"(J,H){var v={left:0,top:0};H.exports=x;function x(k,l,e){l=l||k.currentTarget||k.srcElement,Array.isArray(e)||(e=[0,0]);var t=k.clientX||0,n=k.clientY||0,r=E(l);return e[0]=t-r.left,e[1]=n-r.top,e}function E(k){return k===window||k===document||k===document.body?v:k.getBoundingClientRect()}}}),Fg=Ee({"node_modules/has-passive-events/index.js"(J,H){"use strict";var v=Mb();function x(){var E=!1;try{var k=Object.defineProperty({},"passive",{get:function(){E=!0}});window.addEventListener("test",null,k),window.removeEventListener("test",null,k)}catch{E=!1}return E}H.exports=v&&x()}}),pM=Ee({"src/components/dragelement/align.js"(J,H){"use strict";H.exports=function(x,E,k,l,e){var t=(x-k)/(l-k),n=t+E/(l-k),r=(t+n)/2;return e==="left"||e==="bottom"?t:e==="center"||e==="middle"?r:e==="right"||e==="top"?n:t<2/3-r?t:n>4/3-r?n:r}}}),mM=Ee({"src/components/dragelement/cursor.js"(J,H){"use strict";var v=Vr(),x=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];H.exports=function(k,l,e,t){return e==="left"?k=0:e==="center"?k=1:e==="right"?k=2:k=v.constrain(Math.floor(k*3),0,2),t==="bottom"?l=0:t==="middle"?l=1:t==="top"?l=2:l=v.constrain(Math.floor(l*3),0,2),x[l][k]}}}),gM=Ee({"src/components/dragelement/unhover.js"(J,H){"use strict";var v=zp(),x=Dg(),E=N0().getGraphDiv,k=Mv(),l=H.exports={};l.wrapped=function(e,t,n){var r;e=E(e),e._fullLayout&&x.clear(e._fullLayout._uid+k.HOVERID);let a=e._hoverdata;l.raw(e,t,n)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,(r=e._fullLayout)!=null&&r.hoveranywhere&&t?.target&&!a&&e.emit("plotly_unhover",{event:t,points:[]}))},l.raw=function(t,n){var r=t._fullLayout,a=t._hoverdata;return n||(n={}),n.target&&!t._dragged&&v.triggerHandler(t,"plotly_beforehover",n)===!1?!1:(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,n.target&&a&&t.emit("plotly_unhover",{event:n,points:a}),!0)}}}),qf=Ee({"src/components/dragelement/index.js"(J,H){"use strict";var v=vM(),x=Sb(),E=Fg(),k=Vr().removeElement,l=tc(),e=H.exports={};e.align=pM(),e.getCursor=mM();var t=gM();e.unhover=t.wrapped,e.unhoverRaw=t.raw,e.init=function(o){var s=o.gd,c=1,g=s._context.doubleClickDelay,f=o.element,p,m,i,T,S,M,C,_;s._mouseDownTime||(s._mouseDownTime=0),f.style.pointerEvents="all",f.onmousedown=u,E?(f._ontouchstart&&f.removeEventListener("touchstart",f._ontouchstart),f._ontouchstart=u,f.addEventListener("touchstart",u,{passive:!1})):f.ontouchstart=u;function w(z,I,N){return Math.abs(z)"u"&&typeof z.clientY>"u"&&(z.clientX=p,z.clientY=m),i=new Date().getTime(),i-s._mouseDownTimeg&&(c=Math.max(c-1,1)),s._dragged)o.doneFn&&o.doneFn();else{var I;M.target===C?I=M:(I={target:C,srcElement:C,toElement:C},Object.keys(M).concat(Object.keys(M.__proto__)).forEach(N=>{var R=M[N];!I[N]&&typeof R!="function"&&(I[N]=R)})),o.clickFn&&o.clickFn(c,I),_||C.dispatchEvent(new MouseEvent("click",z))}s._dragging=!1,s._dragged=!1}};function n(){var a=document.createElement("div");a.className="dragcover";var o=a.style;return o.position="fixed",o.left=0,o.right=0,o.top=0,o.bottom=0,o.zIndex=999999999,o.background="none",document.body.appendChild(a),a}e.coverSlip=n;function r(a){return v(a.changedTouches?a.changedTouches[0]:a,document.body)}}}),Dh=Ee({"src/lib/setcursor.js"(J,H){"use strict";H.exports=function(x,E){(x.attr("class")||"").split(" ").forEach(function(k){k.indexOf("cursor-")===0&&x.classed(k,!1)}),E&&x.classed("cursor-"+E,!0)}}}),yM=Ee({"src/lib/override_cursor.js"(J,H){"use strict";var v=Dh(),x="data-savedcursor",E="!!";H.exports=function(l,e){var t=l.attr(x);if(e){if(!t){for(var n=(l.attr("class")||"").split(" "),r=0;rK.legend.length)for(var q=K.legend.length;q(r==="legend"?1:0));if(N===!1&&(o[r]=void 0),N===!1&&!g.uirevision||(p("uirevision",o.uirevision),N===!1))return;p("borderwidth");var R=p("orientation"),B=p("yref"),F=p("xref"),P=R==="h",j=B==="paper",U=F==="paper",Z,Q,re,ne="left";P?(Z=0,v.getComponentMethod("rangeslider","isVisible")(a.xaxis)?j?(Q=1.1,re="bottom"):(Q=1,re="top"):j?(Q=-.1,re="top"):(Q=0,re="bottom")):(Q=1,re="auto",U?Z=1.02:(Z=1,ne="right")),x.coerce(g,f,{x:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:Z}},"x"),x.coerce(g,f,{y:{valType:"number",editType:"legend",min:j?-2:0,max:j?3:1,dflt:Q}},"y"),p("traceorder",h),t.isGrouped(o[r])&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("indentation"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick");let oe=p("groupclick");p("groupdoubleclick",oe),p("xanchor",ne),p("yanchor",re),p("maxheight"),p("valign"),x.noneOrAll(g,f,["x","y"]);var V=p("title.text");if(V){p("title.side",P?"left":"top");var $=x.extendFlat({},m,{size:x.bigFont(m.size)});x.coerceFont(p,"title.font",$);let K=c>1;p("titleclick",K?"toggle":!1),p("titledoubleclick",K?"toggleothers":!1)}}H.exports=function(a,o,s){var c,g=s.slice(),f=o.shapes;if(f)for(c=0;cje.showlegend||je.legendgroup);var i=p.concat(m),T=s.trace;T._isShape&&(T=o.shapes[T.index]);var S=T.legendgroup,M,C,_,w,h,u,A={},b=[],z=[],I=[];function N(je,ke){var ge=b.indexOf(je),le=A.visible;return le||(le=A.visible=[]),b.indexOf(je)===-1&&(b.push(je),ge=b.length-1),le[ge]=ke,ge}var R=(o.shapes||[]).map(function(je){return je._input}),B=!1;function F(je,ke){R[je].visible=ke,B=!0}function P(je,ke){if(!(s.groupTitle&&!g)){var ge=je._isShape,le=je.index;le===void 0&&(le=je._index);var ve=je.visible===!1?!1:ke;ge?F(le,ve):N(le,ve)}}var j=T.legend;if(!T._isShape&&H.traceIs(T,"pie-like")){var U=s.label,Z=f.indexOf(U);if(r==="toggle")Z===-1?f.push(U):f.splice(Z,1);else if(r==="toggleothers"){var Q=Z!==-1,re=[];for(M=0;MC.showlegend||C.legendgroup),c=a.concat(s);function g(C){return(C.legend||"legend")===o}var f,p;if(n==="toggle")f=!c.some(function(_){return g(_)&&_.visible===!0}),p=!1;else{let C=c.some(function(_){return!g(_)&&_.visible===!0&&_.showlegend!==!1});f=!0,p=!C}let m={visible:[]},i=[],T=(r.shapes||[]).map(function(C){return C._input});for(var S=!1,M=0;MB&&(N=B)}z[m][0]._groupMinRank=N,z[m][0]._preGroupSort=m}var F=function(re,ne){return re[0]._groupMinRank-ne[0]._groupMinRank||re[0]._preGroupSort-ne[0]._preGroupSort},P=function(re,ne){var oe=v(re.trace.legendrank)?re.trace.legendrank[re.i]:re.trace.legendrank,V=v(ne.trace.legendrank)?ne.trace.legendrank[ne.i]:ne.trace.legendrank;return oe-V||re._preSort-ne._preSort};for(z.forEach(function(re,ne){re[0]._preGroupSort=ne}),z.sort(F),m=0;m0)X=$.width;else return 0;return h?G:Math.min(X,K)};M.each(function(V){var $=v.select(this),K=E.ensureSingle($,"g","layers");K.style("opacity",V[0].trace.opacity);var G=_.indentation,X=_.valign,q=V[0].lineHeight,W=V[0].height;if(X==="middle"&&G===0||!q||!W)K.attr("transform",null);else{var ee={top:1,bottom:-1}[X],ae=ee*(.5*(q-W+3))||0,fe=_.indentation;K.attr("transform",k(fe,ae))}var ye=K.selectAll("g.legendfill").data([V]);ye.enter().append("g").classed("legendfill",!0);var xe=K.selectAll("g.legendlines").data([V]);xe.enter().append("g").classed("legendlines",!0);var Ae=K.selectAll("g.legendsymbols").data([V]);Ae.enter().append("g").classed("legendsymbols",!0),Ae.selectAll("g.legendpoints").data([V]).enter().append("g").classed("legendpoints",!0)}).each(oe).each(R).each(F).each(B).each(j).each(re).each(Q).each(I).each(N).each(U).each(Z);function I(V){var $=i(V),K=$.showFill,G=$.showLine,X=$.showGradientLine,q=$.showGradientFill,W=$.anyFill,ee=$.anyLine,ae=V[0],fe=ae.trace,ye,xe,Ae=t(fe),Me=Ae.colorscale,Ie=Ae.reversescale,qe=function(Te){if(Te.size())if(K)l.fillGroupStyle(Te,C,!0);else{var Fe="legendfill-"+fe.uid;l.gradient(Te,C,Fe,m(Ie),Me,"fill")}},je=function(Te){if(Te.size()){var Fe="legendline-"+fe.uid;l.lineGroupStyle(Te),l.gradient(Te,C,Fe,m(Ie),Me,"stroke")}},ke=n.hasMarkers(fe)||!W?"M5,0":ee?"M5,-2":"M5,-3",ge=v.select(this),le=ge.select(".legendfill").selectAll("path").data(K||q?[V]:[]);if(le.enter().append("path").classed("js-fill",!0),le.exit().remove(),le.attr("d",ke+"h"+u+"v6h-"+u+"z").call(qe),G||X){var ve=z(void 0,fe.line,f,c);xe=E.minExtend(fe,{line:{width:ve}}),ye=[E.minExtend(ae,{trace:xe})]}var se=ge.select(".legendlines").selectAll("path").data(G||X?[ye]:[]);se.enter().append("path").classed("js-line",!0),se.exit().remove(),se.attr("d",ke+(X?"l"+u+",0.0001":"h"+u)).call(G?l.lineGroupStyle:je)}function N(V){var $=i(V),K=$.anyFill,G=$.anyLine,X=$.showLine,q=$.showMarker,W=V[0],ee=W.trace,ae=!q&&!G&&!K&&n.hasText(ee),fe,ye;function xe(ve,se,Te,Fe){var We=E.nestedProperty(ee,ve).get(),Ge=E.isArrayOrTypedArray(We)&&se?se(We):We;if(h&&Ge&&Fe!==void 0&&(Ge=Fe),Te){if(GeTe[1])return Te[1]}return Ge}function Ae(ve){return W._distinct&&W.index&&ve[W.index]?ve[W.index]:ve[0]}if(q||ae||X){var Me={},Ie={};if(q){Me.mc=xe("marker.color",Ae);var qe=ee.type==="scattermap";Me.mx=qe?"circle":xe("marker.symbol",Ae),Me.mo=xe("marker.opacity",E.mean,[.2,1]),Me.mlc=xe("marker.line.color",Ae),Me.mlw=xe("marker.line.width",E.mean,[0,5],g),Me.mld=xe("marker.line.dash",Ae),Ie.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var je=xe("marker.size",E.mean,[2,16],s);Me.ms=je,Ie.marker.size=je}X&&(Ie.line={width:xe("line.width",Ae,[0,10],c)}),ae&&(Me.tx="Aa",Me.tp=xe("textposition",Ae),Me.ts=10,Me.tc=xe("textfont.color",Ae),Me.tf=xe("textfont.family",Ae),Me.tw=xe("textfont.weight",Ae),Me.ty=xe("textfont.style",Ae),Me.tv=xe("textfont.variant",Ae),Me.tC=xe("textfont.textcase",Ae),Me.tE=xe("textfont.lineposition",Ae),Me.tS=xe("textfont.shadow",Ae)),fe=[E.minExtend(W,Me)],ye=E.minExtend(ee,Ie),ye.selectedpoints=null,ye.texttemplate=null}var ke=v.select(this).select("g.legendpoints"),ge=ke.selectAll("path.scatterpts").data(q?fe:[]);ge.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",b),ge.exit().remove(),ge.call(l.pointStyle,ye,C),q&&(fe[0].mrc=3);var le=ke.selectAll("g.pointtext").data(ae?fe:[]);le.enter().append("g").classed("pointtext",!0).append("text").attr("transform",b),le.exit().remove(),le.selectAll("text").call(l.textPointStyle,ye,C)}function R(V){var $=V[0].trace,K=$.type==="waterfall";if(V[0]._distinct&&K){var G=V[0].trace[V[0].dir].marker;return V[0].mc=G.color,V[0].mlw=G.line.width,V[0].mlc=G.line.color,P(V,this,"waterfall")}var X=[];$.visible&&K&&(X=V[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var q=v.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(X);q.enter().append("path").classed("legendwaterfall",!0).attr("transform",b).style("stroke-miterlimit",1),q.exit().remove(),q.each(function(W){var ee=v.select(this),ae=$[W[0]].marker,fe=z(void 0,ae.line,p,g);ee.attr("d",W[1]).style("stroke-width",fe+"px").call(e.fill,ae.color),fe&&ee.call(e.stroke,ae.line.color)})}function B(V){P(V,this)}function F(V){P(V,this,"funnel")}function P(V,$,K){var G=V[0].trace,X=G.marker||{},q=X.line||{},W=X.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",ee=K?G.visible&&G.type===K:x.traceIs(G,"bar"),ae=v.select($).select("g.legendpoints").selectAll("path.legend"+K).data(ee?[V]:[]);ae.enter().append("path").classed("legend"+K,!0).attr("d",W).attr("transform",b),ae.exit().remove(),ae.each(function(fe){var ye=v.select(this),xe=fe[0],Ae=z(xe.mlw,X.line,p,g);ye.style("stroke-width",Ae+"px");var Me=xe.mcc;if(!_._inHover&&"mc"in xe){var Ie=t(X),qe=Ie.mid;qe===void 0&&(qe=(Ie.max+Ie.min)/2),Me=l.tryColorscale(X,"")(qe)}var je=Me||xe.mc||X.color,ke=X.pattern,ge=l.getPatternAttr,le=ke&&(ge(ke.shape,0,"")||ge(ke.path,0,""));if(le){var ve=ge(ke.bgcolor,0,null),se=ge(ke.fgcolor,0,null),Te=ke.fgopacity,Fe=T(ke.size,8,10),We=T(ke.solidity,.5,1),Ge="legend-"+G.uid;ye.call(l.pattern,"legend",C,Ge,le,Fe,We,Me,ke.fillmode,ve,se,Te)}else ye.call(e.fill,je);Ae&&e.stroke(ye,xe.mlc||q.color)})}function j(V){var $=V[0].trace,K=v.select(this).select("g.legendpoints").selectAll("path.legendbox").data($.visible&&x.traceIs($,"box-violin")?[V]:[]);K.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),K.exit().remove(),K.each(function(){var G=v.select(this);if(($.boxpoints==="all"||$.points==="all")&&e.opacity($.fillcolor)===0&&e.opacity(($.line||{}).color)===0){var X=E.minExtend($,{marker:{size:h?s:E.constrain($.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});K.call(l.pointStyle,X,C)}else{var q=z(void 0,$.line,p,g);G.style("stroke-width",q+"px").call(e.fill,$.fillcolor),q&&e.stroke(G,$.line.color)}})}function U(V){var $=V[0].trace,K=v.select(this).select("g.legendpoints").selectAll("path.legendcandle").data($.visible&&$.type==="candlestick"?[V,V]:[]);K.enter().append("path").classed("legendcandle",!0).attr("d",function(G,X){return X?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",b).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(G,X){var q=v.select(this),W=$[X?"increasing":"decreasing"],ee=z(void 0,W.line,p,g);q.style("stroke-width",ee+"px").call(e.fill,W.fillcolor),ee&&e.stroke(q,W.line.color)})}function Z(V){var $=V[0].trace,K=v.select(this).select("g.legendpoints").selectAll("path.legendohlc").data($.visible&&$.type==="ohlc"?[V,V]:[]);K.enter().append("path").classed("legendohlc",!0).attr("d",function(G,X){return X?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",b).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(G,X){var q=v.select(this),W=$[X?"increasing":"decreasing"],ee=z(void 0,W.line,p,g);q.style("fill","none").call(l.dashLine,W.line.dash,ee),ee&&e.stroke(q,W.line.color)})}function Q(V){ne(V,this,"pie")}function re(V){ne(V,this,"funnelarea")}function ne(V,$,K){var G=V[0],X=G.trace,q=K?X.visible&&X.type===K:x.traceIs(X,K),W=v.select($).select("g.legendpoints").selectAll("path.legend"+K).data(q?[V]:[]);if(W.enter().append("path").classed("legend"+K,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),W.exit().remove(),W.size()){var ee=X.marker||{},ae=z(a(ee.line.width,G.pts),ee.line,p,g),fe="pieLike",ye=E.minExtend(X,{marker:{line:{width:ae}}},fe),xe=E.minExtend(G,{trace:ye},fe);r(W,xe,ye,C)}}function oe(V){var $=V[0].trace,K,G=[];if($.visible)switch($.type){case"histogram2d":case"heatmap":G=[["M-15,-2V4H15V-2Z"]],K=!0;break;case"choropleth":case"choroplethmap":G=[["M-6,-6V6H6V-6Z"]],K=!0;break;case"densitymap":G=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],K="radial";break;case"cone":G=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],K=!1;break;case"streamtube":G=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],K=!1;break;case"surface":G=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],K=!0;break;case"mesh3d":G=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!1;break;case"volume":G=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!0;break;case"isosurface":G=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],K=!1;break}var X=v.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(G);X.enter().append("path").classed("legend3dandfriends",!0).attr("transform",b).style("stroke-miterlimit",1),X.exit().remove(),X.each(function(q,W){var ee=v.select(this),ae=t($),fe=ae.colorscale,ye=ae.reversescale,xe=function(qe){if(qe.size()){var je="legendfill-"+$.uid;l.gradient(qe,C,je,m(ye,K==="radial"),fe,"fill")}},Ae;if(fe){if(!K){var Ie=fe.length;Ae=W===0?fe[ye?Ie-1:0][1]:W===1?fe[ye?0:Ie-1][1]:fe[Math.floor((Ie-1)/2)][1]}}else{var Me=$.vertexcolor||$.facecolor||$.color;Ae=E.isArrayOrTypedArray(Me)?Me[W]||Me[0]:Me}ee.attr("d",q[0]),Ae?ee.call(e.fill,Ae):ee.call(xe)})}};function m(S,M){var C=M?"radial":"horizontal";return C+(S?"":"reversed")}function i(S){var M=S[0].trace,C=M.contours,_=n.hasLines(M)||M.visible&&M.type==="quiver",w=n.hasMarkers(M),h=M.visible&&M.fill&&M.fill!=="none",u=!1,A=!1;if(C){var b=C.coloring;b==="lines"?u=!0:_=b==="none"||b==="heatmap"||C.showlines,C.type==="constraint"?h=C._operation!=="=":(b==="fill"||b==="heatmap")&&(A=!0)}return{showMarker:w,showLine:_,showFill:h,showGradientLine:u,showGradientFill:A,anyLine:_||u,anyFill:h||A}}function T(S,M,C){return S&&E.isArrayOrTypedArray(S)?M:S>C?C:S}}}),Ub=Ee({"src/components/legend/draw.js"(J,H){"use strict";var v=Va(),x=Vr(),E=vl(),k=Ri(),l=zp(),e=qf(),t=mo(),n=Qn(),r=Fs(),a=Nb().handleItemClick,o=Nb().handleTitleClick,s=Ob(),c=rc(),g=c.LINE_SPACING,f=c.FROM_TL,p=c.FROM_BR,m=_M(),i=jb(),T=q0(),S=1,M=/^legend[0-9]*$/;H.exports=function(Z,Q){if(Q)_(Z,Q);else{var re=Z._fullLayout,ne=re._legends,oe=re._infolayer.selectAll('[class^="legend"]');oe.each(function(){var G=v.select(this),X=G.attr("class"),q=X.split(" ")[0];q.match(M)&&ne.indexOf(q)===-1&&G.remove()});for(var V=0;V1)}var ae=re.hiddenlabels||[];if(!$&&(!re.showlegend||!K.length))return V.selectAll("."+ne).remove(),re._topdefs.select("#"+oe).remove(),E.autoMargin(U,ne);var fe=x.ensureSingle(V,"g",ne,function(ge){$||ge.attr("pointer-events","all")}),ye=x.ensureSingleById(re._topdefs,"clipPath",oe,function(ge){ge.append("rect")}),xe=x.ensureSingle(fe,"rect","bg",function(ge){ge.attr("shape-rendering","crispEdges")});xe.call(n.stroke,Q.bordercolor).call(n.fill,Q.bgcolor).style("stroke-width",Q.borderwidth+"px");var Ae=x.ensureSingle(fe,"g","scrollbox"),Me=Q.title;Q._titleWidth=0,Q._titleHeight=0;var Ie;Me.text?(Ie=x.ensureSingle(Ae,"text",ne+"titletext"),Ie.attr("text-anchor","start").call(t.font,Me.font).text(Me.text),I(Ie,Ae,U,Q,S),!$&&(Q.titleclick||Q.titledoubleclick)&&z(Ae,U,Q,ne)):(Ae.selectAll("."+ne+"titletext").remove(),Ae.selectAll("."+ne+"titletoggle").remove());var qe=x.ensureSingle(fe,"rect","scrollbar",function(ge){ge.attr(s.scrollBarEnterAttrs).call(n.fill,s.scrollBarColor)}),je=Ae.selectAll("g.groups").data(K);je.enter().append("g").attr("class","groups"),je.exit().remove();var ke=je.selectAll("g.traces").data(x.identity);ke.enter().append("g").attr("class","traces"),ke.exit().remove(),ke.style("opacity",function(ge){let le=ge[0],ve=le.trace;if(le.groupTitle){let se=ve.legendgroup,Te=(re.shapes||[]).filter(function(We){return We.showlegend});return U._fullData.concat(Te).some(function(We){return We.legendgroup===se&&(We.legend||"legend")===ne&&We.visible===!0})?1:.5}return k.traceIs(ve,"pie-like")?ae.indexOf(ge[0].label)!==-1?.5:1:ve.visible==="legendonly"?.5:1}).each(function(){v.select(this).call(u,U,Q)}).call(i,U,Q).each(function(ge){$||ge[0].groupTitle&&Q.groupclick==="toggleitem"||v.select(this).call(b,U,ne)}),x.syncOrAsync([E.previousPromises,function(){return B(U,je,ke,Q,Ae)},function(){var ge=re._size,le=Q.borderwidth,ve=Q.xref==="paper",se=Q.yref==="paper";if(Me.text){let dt=(re.shapes||[]).filter(function(Ct){return Ct.showlegend}),Dt=U._fullData.concat(dt).some(function(Ct){let Vt=Ct.legend||"legend";var Ht=Array.isArray(Vt)?Vt.includes(ne):Vt===ne;return Ht&&Ct.visible===!0});Ie.style("opacity",Dt?1:.5)}if(!$){var Te,Fe;ve?Te=ge.l+ge.w*Q.x-f[P(Q)]*Q._width:Te=re.width*Q.x-f[P(Q)]*Q._width,se?Fe=ge.t+ge.h*(1-Q.y)-f[j(Q)]*Q._effHeight:Fe=re.height*(1-Q.y)-f[j(Q)]*Q._effHeight;var We=F(U,ne,Te,Fe);if(We)return;if(re.margin.autoexpand){var Ge=Te,gt=Fe;Te=ve?x.constrain(Te,0,re.width-Q._width):Ge,Fe=se?x.constrain(Fe,0,re.height-Q._effHeight):gt,Te!==Ge&&x.log("Constrain "+ne+".x to make legend fit inside graph"),Fe!==gt&&x.log("Constrain "+ne+".y to make legend fit inside graph")}t.setTranslate(fe,Te,Fe)}if(qe.on(".drag",null),fe.on("wheel",null),$||Q._height<=Q._maxHeight||U._context.staticPlot){var mt=Q._effHeight;$&&(mt=Q._height),xe.attr({width:Q._width-le,height:mt-le,x:le/2,y:le/2}),t.setTranslate(Ae,0,0),ye.select("rect").attr({width:Q._width-2*le,height:mt-2*le,x:le,y:le}),t.setClipUrl(Ae,oe,U),t.setRect(qe,0,0,0,0),delete Q._scrollY}else{var Tt=Math.max(s.scrollBarMinHeight,Q._effHeight*Q._effHeight/Q._height),At=Q._effHeight-Tt-2*s.scrollBarMargin,Kt=Q._height-Q._effHeight,ar=At/Kt,_r=Math.min(Q._scrollY||0,Kt);xe.attr({width:Q._width-2*le+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-le,x:le/2,y:le/2}),ye.select("rect").attr({width:Q._width-2*le+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-2*le,x:le,y:le+_r}),t.setClipUrl(Ae,oe,U),He(_r,Tt,ar),fe.on("wheel",function(){_r=x.constrain(Q._scrollY+v.event.deltaY/Kt*At,0,Kt),He(_r,Tt,ar),_r!==0&&_r!==Kt&&v.event.preventDefault()});var Zt,sr,Ot,vt=function(dt,Dt,Ct){var Vt=(Ct-Dt)/ar+dt;return x.constrain(Vt,0,Kt)},ht=function(dt,Dt,Ct){var Vt=(Dt-Ct)/ar+dt;return x.constrain(Vt,0,Kt)},Re=v.behavior.drag().on("dragstart",function(){var dt=v.event.sourceEvent;dt.type==="touchstart"?Zt=dt.changedTouches[0].clientY:Zt=dt.clientY,Ot=_r}).on("drag",function(){var dt=v.event.sourceEvent;dt.buttons===2||dt.ctrlKey||(dt.type==="touchmove"?sr=dt.changedTouches[0].clientY:sr=dt.clientY,_r=vt(Ot,Zt,sr),He(_r,Tt,ar))});qe.call(Re);var Be=v.behavior.drag().on("dragstart",function(){var dt=v.event.sourceEvent;dt.type==="touchstart"&&(Zt=dt.changedTouches[0].clientY,Ot=_r)}).on("drag",function(){var dt=v.event.sourceEvent;dt.type==="touchmove"&&(sr=dt.changedTouches[0].clientY,_r=ht(Ot,Zt,sr),He(_r,Tt,ar))});Ae.call(Be)}function He(dt,Dt,Ct){Q._scrollY=U._fullLayout[ne]._scrollY=dt,t.setTranslate(Ae,0,-dt),t.setRect(qe,Q._width,s.scrollBarMargin+dt*Ct,s.scrollBarWidth,Dt),ye.select("rect").attr("y",le+dt)}if(U._context.edits.legendPosition){var $e,Ze,Je,Mt;fe.classed("cursor-move",!0),e.init({element:fe.node(),gd:U,prepFn:function(dt){if(dt.target!==qe.node()){var Dt=t.getTranslate(fe);Je=Dt.x,Mt=Dt.y}},moveFn:function(dt,Dt){if(Je!==void 0&&Mt!==void 0){var Ct=Je+dt,Vt=Mt+Dt;t.setTranslate(fe,Ct,Vt),$e=e.align(Ct,Q._width,ge.l,ge.l+ge.w,Q.xanchor),Ze=e.align(Vt+Q._height,-Q._height,ge.t+ge.h,ge.t,Q.yanchor)}},doneFn:function(){if($e!==void 0&&Ze!==void 0){var dt={};dt[ne+".x"]=$e,dt[ne+".y"]=Ze,k.call("_guiRelayout",U,dt)}},clickFn:function(dt,Dt){var Ct=V.selectAll("g.traces").filter(function(){var Vt=this.getBoundingClientRect();return Dt.clientX>=Vt.left&&Dt.clientX<=Vt.right&&Dt.clientY>=Vt.top&&Dt.clientY<=Vt.bottom});Ct.size()>0&&h(U,Q,Ct,dt,Dt)}})}}],U)}}function w(U,Z,Q){var re=U[0],ne=re.width,oe=Z.entrywidthmode,V=re.trace.legendwidth||Z.entrywidth;return oe==="fraction"?Z._maxWidth*V:Q+(V||ne)}function h(U,Z,Q,re,ne){var oe=U._fullLayout,V=Q.data()[0][0].trace,$=Z.itemclick,K=Z.itemdoubleclick,G={event:ne,node:Q.node(),curveNumber:V.index,expandedIndex:V.index,data:U.data,layout:U.layout,frames:U._transitionData._frames,config:U._context,fullData:U._fullData,fullLayout:oe};V._group&&(G.group=V._group),k.traceIs(V,"pie-like")&&(G.label=Q.datum()[0].label);var X=l.triggerHandler(U,"plotly_legendclick",G);if(re===1){if(X===!1)return;Z._clickTimeout=setTimeout(function(){U._fullLayout&&$&&a(Q,U,Z,$,re)},U._context.doubleClickDelay)}else if(re===2){Z._clickTimeout&&clearTimeout(Z._clickTimeout),U._legendMouseDownTime=0;var q=l.triggerHandler(U,"plotly_legenddoubleclick",G);q!==!1&&X!==!1&&K&&a(Q,U,Z,K,re)}}function u(U,Z,Q){var re=T.getId(Q),ne=U.data()[0][0],oe=ne.trace,V=k.traceIs(oe,"pie-like"),$=!Q._inHover&&Z._context.edits.legendText&&!V,K=Q._maxNameLength,G,X;ne.groupTitle?(G=ne.groupTitle.text,X=ne.groupTitle.font):(X=Q.font,Q.entries?G=ne.text:(G=V?ne.label:oe.name,oe._meta&&(G=x.templateString(G,oe._meta))));var q=x.ensureSingle(U,"text",re+"text");q.attr("text-anchor","start").call(t.font,X).text($?A(G,K):G);var W=Q.indentation+Q.itemwidth+s.itemGap*2;r.positionText(q,W,0),$?q.call(r.makeEditable,{gd:Z,text:G}).call(I,U,Z,Q).on("edit",function(ee){this.text(A(ee,K)).call(I,U,Z,Q);var ae={};return ae.name=ee,ne.trace._isShape?k.call("_guiRelayout",Z,"shapes["+oe.index+"].name",ae.name):k.call("_guiRestyle",Z,ae,oe.index)}):I(q,U,Z,Q)}function A(U,Z){var Q=Math.max(4,Z);if(U&&U.trim().length>=Q/2)return U;U=U||"";for(var re=Q-U.length;re>0;re--)U+=" ";return U}function b(U,Z,Q){var re=Z._context.doubleClickDelay,ne,oe=1,V=x.ensureSingle(U,"rect",Q+"toggle",function($){Z._context.staticPlot||$.style("cursor","pointer").attr("pointer-events","all"),$.call(n.fill,"rgba(0,0,0,0)")});Z._context.staticPlot||(V.on("mousedown",function(){ne=new Date().getTime(),ne-Z._legendMouseDownTimere&&(oe=Math.max(oe-1,1)),h(Z,$,U,oe,v.event)}}))}function z(U,Z,Q,re){if(Z._fullData.some(function(G){let X=G.legend||"legend";return(Array.isArray(X)?X.includes(re):X===re)&&k.traceIs(G,"pie-like")}))return;let oe=Z._context.doubleClickDelay;var V,$=1;let K=x.ensureSingle(U,"rect",re+"titletoggle",function(G){Z._context.staticPlot||G.style("cursor","pointer").attr("pointer-events","all"),G.call(n.fill,"rgba(0,0,0,0)")});Z._context.staticPlot||(K.on("mousedown",function(){V=new Date().getTime(),V-Z._legendMouseDownTimeoe&&($=Math.max($-1,1));let G={event:v.event,legendId:re,data:Z.data,layout:Z.layout,fullData:Z._fullData,fullLayout:Z._fullLayout};if($===1&&Q.titleclick){if(l.triggerHandler(Z,"plotly_legendtitleclick",G)===!1)return;Q._titleClickTimeout=setTimeout(function(){Z._fullLayout&&o(Z,Q,Q.titleclick)},oe)}else $===2&&(Q._titleClickTimeout&&clearTimeout(Q._titleClickTimeout),Z._legendMouseDownTime=0,l.triggerHandler(Z,"plotly_legendtitledoubleclick",G)!==!1&&Q.titledoubleclick&&o(Z,Q,Q.titledoubleclick))}))}function I(U,Z,Q,re,ne){re._inHover&&U.attr("data-notex",!0),r.convertToTspans(U,Q,function(){N(Z,Q,re,ne)})}function N(U,Z,Q,re){var ne=U.data()[0][0],oe=ne&&ne.trace.showlegend;if(Array.isArray(oe)&&(oe=oe[ne.i]!==!1),!Q._inHover&&ne&&!oe){U.remove();return}var V=U.select("g[class*=math-group]"),$=V.node(),K=T.getId(Q);Q||(Q=Z._fullLayout[K]);var G=Q.borderwidth,X;re===S?X=Q.title.font:ne.groupTitle?X=ne.groupTitle.font:X=Q.font;var q=X.size*g,W,ee;if($){var ae=t.bBox($);W=ae.height,ee=ae.width,re===S?t.setTranslate(V,G,G+W*.75):t.setTranslate(V,0,W*.25)}else{var fe="."+K+(re===S?"title":"")+"text",ye=U.select(fe),xe=r.lineCount(ye),Ae=ye.node();if(W=q*xe,ee=Ae?t.bBox(Ae).width:0,re===S)Q.title.side==="left"&&(ee+=s.itemGap*2),r.positionText(ye,G+s.titlePad,G+q);else{var Me=s.itemGap*2+Q.indentation+Q.itemwidth;ne.groupTitle&&(Me=s.itemGap,ee-=Q.indentation+Q.itemwidth),r.positionText(ye,Me,-q*((xe-1)/2-.3))}}re===S?(Q._titleWidth=ee,Q._titleHeight=W):(ne.lineHeight=q,ne.height=Math.max(W,16)+3,ne.width=ee)}function R(U){var Z=0,Q=0,re=U.title.side;return re&&(re.indexOf("left")!==-1&&(Z=U._titleWidth),re.indexOf("top")!==-1&&(Q=U._titleHeight)),[Z,Q]}function B(U,Z,Q,re,ne){var oe=U._fullLayout,V=T.getId(re);re||(re=oe[V]);var $=oe._size,K=T.isVertical(re),G=T.isGrouped(re),X=re.entrywidthmode==="fraction",q=re.borderwidth,W=2*q,ee=s.itemGap,ae=re.indentation+re.itemwidth+ee*2,fe=2*(q+ee),ye=j(re),xe=re.y<0||re.y===0&&ye==="top",Ae=re.y>1||re.y===1&&ye==="bottom",Me=re.tracegroupgap,Ie={};let{orientation:qe,yref:je}=re,{maxheight:ke}=re,ge=xe||Ae||qe!=="v"||je!=="paper";ke||(ke=ge?.5:1);let le=ge?oe.height:$.h;re._maxHeight=Math.max(ke>1?ke:ke*le,30);var ve=0;re._width=0,re._height=0;var se=R(re);if(K)Q.each(function(dt){var Dt=dt[0].height;t.setTranslate(this,q+se[0],q+se[1]+re._height+Dt/2+ee),re._height+=Dt,re._width=Math.max(re._width,dt[0].width)}),ve=ae+re._width,re._width+=ee+ae+W,re._height+=fe,G&&(Z.each(function(dt,Dt){t.setTranslate(this,0,Dt*re.tracegroupgap)}),re._height+=(re._lgroupsLength-1)*re.tracegroupgap);else{var Te=P(re),Fe=re.x<0||re.x===0&&Te==="right",We=re.x>1||re.x===1&&Te==="left",Ge=Ae||xe,gt=oe.width/2;re._maxWidth=Math.max(Fe?Ge&&Te==="left"?$.l+$.w:gt:We?Ge&&Te==="right"?$.r+$.w:gt:$.w,2*ae);var mt=0,Tt=0;Q.each(function(dt){var Dt=w(dt,re,ae);mt=Math.max(mt,Dt),Tt+=Dt}),ve=null;var At=0;if(G){var Kt=0,ar=0,_r=0;Z.each(function(){var dt=0,Dt=0;v.select(this).selectAll("g.traces").each(function(Vt){var Ht=w(Vt,re,ae),Wt=Vt[0].height;t.setTranslate(this,se[0],se[1]+q+ee+Wt/2+Dt),Dt+=Wt,dt=Math.max(dt,Ht),Ie[Vt[0].trace.legendgroup]=dt});var Ct=dt+ee;ar>0&&Ct+q+ar>re._maxWidth?(At=Math.max(At,ar),ar=0,_r+=Kt+Me,Kt=Dt):Kt=Math.max(Kt,Dt),t.setTranslate(this,ar,_r),ar+=Ct}),re._width=Math.max(At,ar)+q,re._height=_r+Kt+fe}else{var Zt=Q.size(),sr=Tt+W+(Zt-1)*ee=re._maxWidth&&(At=Math.max(At,Re),vt=0,ht+=Ot,re._height+=Ot,Ot=0),t.setTranslate(this,se[0]+q+vt,se[1]+q+ht+Dt/2+ee),Re=vt+Ct+ee,vt+=Vt,Ot=Math.max(Ot,Dt)}),sr?(re._width=vt+W,re._height=Ot+fe):(re._width=Math.max(At,Re)+W,re._height+=Ot+fe)}}re._width=Math.ceil(Math.max(re._width+se[0],re._titleWidth+2*(q+s.titlePad))),re._height=Math.ceil(Math.max(re._height+se[1],re._titleHeight+2*(q+s.itemGap))),re._effHeight=Math.min(re._height,re._maxHeight);var Be=U._context.edits,He=Be.legendText||Be.legendPosition;Q.each(function(dt){var Dt=v.select(this).select("."+V+"toggle"),Ct=dt[0].height,Vt=dt[0].trace.legendgroup,Ht=w(dt,re,ae);G&&Vt!==""&&(Ht=Ie[Vt]);var Wt=He?ae:ve||Ht;!K&&!X&&(Wt+=ee/2),t.setRect(Dt,0,-Ct/2,Wt,Ct)});var $e=ne.select("."+V+"titletext");$e.node()&&C($e,re,q);var Ze=ne.select("."+V+"titletoggle");if(Ze.size()&&$e.node()){var Je=$e.attr("x")||0,Mt=s.titlePad;t.setRect(Ze,Je-Mt,q,re._titleWidth+2*Mt,re._titleHeight+2*Mt)}}function F(U,Z,Q,re){var ne=U._fullLayout,oe=ne[Z],V=P(oe),$=j(oe),K=oe.xref==="paper",G=oe.yref==="paper";U._fullLayout._reservedMargin[Z]={};var X=oe.y<.5?"b":"t",q=oe.x<.5?"l":"r",W={r:ne.width-Q,l:Q+oe._width,b:ne.height-re,t:re+oe._effHeight};if(K&&G)return E.autoMargin(U,Z,{x:oe.x,y:oe.y,l:oe._width*f[V],r:oe._width*p[V],b:oe._effHeight*p[$],t:oe._effHeight*f[$]});K?U._fullLayout._reservedMargin[Z][X]=W[X]:G||oe.orientation==="v"?U._fullLayout._reservedMargin[Z][q]=W[q]:U._fullLayout._reservedMargin[Z][X]=W[X]}function P(U){return x.isRightAnchor(U)?"right":x.isCenterAnchor(U)?"center":"left"}function j(U){return x.isBottomAnchor(U)?"bottom":x.isMiddleAnchor(U)?"middle":"top"}}}),qb=Ee({"src/components/fx/hover.js"(J){"use strict";var H=Va(),v=mi(),x=Vr(),E=x.pushUnique,k=x.strTranslate,l=x.strRotate,e=zp(),t=Fs(),n=yM(),r=mo(),a=Qn(),o=qf(),s=uo(),c=tc().zindexSeparator,g=Ri(),f=Qf(),p=Mv(),m=Bb(),i=Ub(),T=p.YANGLE,S=Math.PI*T/180,M=1/Math.sin(S),C=Math.cos(S),_=Math.sin(S),w=p.HOVERARROWSIZE,h=p.HOVERTEXTPAD,u={box:!0,ohlc:!0,violin:!0,candlestick:!0},A={scatter:!0,scattergl:!0,splom:!0};function b(q,W){return q.distance-W.distance}J.hover=function(W,ee,ae,fe){W=x.getGraphDiv(W);var ye=ee.target;x.throttle(W._fullLayout._uid+p.HOVERID,p.HOVERMINTIME,function(){z(W,ee,ae,fe,ye)})},J.loneHover=function(W,ee){var ae=!0;Array.isArray(W)||(ae=!1,W=[W]);var fe=ee.gd,ye=K(fe),xe=G(fe),Ae=W.map(function(se){var Te=se._x0||se.x0||se.x||0,Fe=se._x1||se.x1||se.x||0,We=se._y0||se.y0||se.y||0,Ge=se._y1||se.y1||se.y||0,gt=se.eventData;if(gt){var mt=Math.min(Te,Fe),Tt=Math.max(Te,Fe),At=Math.min(We,Ge),Kt=Math.max(We,Ge),ar=se.trace;if(g.traceIs(ar,"gl3d")){var _r=fe._fullLayout[ar.scene]._scene.container,Zt=_r.offsetLeft,sr=_r.offsetTop;mt+=Zt,Tt+=Zt,At+=sr,Kt+=sr}gt.bbox={x0:mt+xe,x1:Tt+xe,y0:At+ye,y1:Kt+ye},gt.xPixel=(Te+Fe)/2,gt.yPixel=(We+Ge)/2,ee.inOut_bbox&&ee.inOut_bbox.push(gt.bbox)}else gt=!1;return{color:se.color||a.defaultLine,x0:se.x0||se.x||0,x1:se.x1||se.x||0,y0:se.y0||se.y||0,y1:se.y1||se.y||0,xLabel:se.xLabel,yLabel:se.yLabel,zLabel:se.zLabel,text:se.text,name:se.name,idealAlign:se.idealAlign,borderColor:se.borderColor,fontFamily:se.fontFamily,fontSize:se.fontSize,fontColor:se.fontColor,fontWeight:se.fontWeight,fontStyle:se.fontStyle,fontVariant:se.fontVariant,nameLength:se.nameLength,textAlign:se.textAlign,trace:se.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:se.hovertemplate||!1,hovertemplateLabels:se.hovertemplateLabels||!1,eventData:gt}}),Me=!1,Ie=R(Ae,{gd:fe,hovermode:"closest",rotateLabels:Me,bgColor:ee.bgColor||a.background,container:H.select(ee.container),outerContainer:ee.outerContainer||ee.container}),qe=Ie.hoverLabels,je=5,ke=0,ge=0;qe.sort(function(se,Te){return se.y0-Te.y0}).each(function(se,Te){var Fe=se.y0-se.by/2;Fe-jeTt[0]._length||ir<0||ir>At[0]._length)return o.unhoverRaw(q,W)}if(W.pointerX=It+Tt[0]._offset,W.pointerY=ir+At[0]._offset,"xval"in W?ht=f.flat(ye,W.xval):ht=f.p2c(Tt,It),"yval"in W?Re=f.flat(ye,W.yval):Re=f.p2c(At,ir),q._hoverPointerX=W.pointerX,q._hoverPointerY=W.pointerY,!v(ht[0])||!v(Re[0]))return x.warn("Fx.hover failed",W,q),o.unhoverRaw(q,W)}Ae.clickanywhere&&(q._hoverXVals=ht,q._hoverYVals=Re,q._hoverXAxes=Tt,q._hoverYAxes=At);var Ir=1/0;function sa(Sn,Gi){for(He=0;HeHt&&(Ot.splice(0,Ht),Ir=Ot[0].distance),je&&sr!==0&&Ot.length===0){Vt.distance=sr,Vt.index=!1;var so=Ze._module.hoverPoints(Vt,Dt,Ct,"closest",{hoverLayer:Ae._hoverlayer});if(so&&(so=so.filter(function(Wi){return Wi.spikeDistance<=sr})),so&&so.length){var Mo,So=so.filter(function(Wi){return Wi.xa.showspikes&&Wi.xa.spikesnap!=="hovered data"});if(So.length){var oi=So[0];v(oi.x0)&&v(oi.y0)&&(Mo=xa(oi),(!Wt.vLinePoint||Wt.vLinePoint.spikeDistance>Mo.spikeDistance)&&(Wt.vLinePoint=Mo))}var ii=so.filter(function(Wi){return Wi.ya.showspikes&&Wi.ya.spikesnap!=="hovered data"});if(ii.length){var co=ii[0];v(co.x0)&&v(co.y0)&&(Mo=xa(co),(!Wt.hLinePoint||Wt.hLinePoint.spikeDistance>Mo.spikeDistance)&&(Wt.hLinePoint=Mo))}}}}}sa();function aa(Sn,Gi,ti){for(var fi=null,xo=1/0,zi,so=0;soSn.trace.index===Ii.trace.index):Ot=[Ii];var ho=Ot.length,dn=$("x",Ii,Ae),Za=$("y",Ii,Ae);sa(dn,Za);var ot=[],et={},hr=0,ur=function(Sn){var Gi=u[Sn.trace.type]?I(Sn):Sn.trace.index;if(!et[Gi])hr++,et[Gi]=hr,ot.push(Sn);else{var ti=et[Gi]-1,fi=ot[ti];ti>0&&Math.abs(Sn.distance)ho-1;Tr--)ur(Ot[Tr]);Ot=ot,un()}var Rr=q._hoverdata,Fr=[],nt=K(q),kt=G(q);for(let Sn of Ot){var Ut=f.makeEventData(Sn,Sn.trace,Sn.cd);if(Sn.hovertemplate!==!1){var nr=!1;Sn.cd[Sn.index]&&Sn.cd[Sn.index].ht&&(nr=Sn.cd[Sn.index].ht),Sn.hovertemplate=nr||Sn.trace.hovertemplate||!1}if(Sn.xa&&Sn.ya){var Er=Sn.x0+Sn.xa._offset,br=Sn.x1+Sn.xa._offset,Or=Sn.y0+Sn.ya._offset,Pr=Sn.y1+Sn.ya._offset,fa=Math.min(Er,br),Fa=Math.max(Er,br),La=Math.min(Or,Pr),Cn=Math.max(Or,Pr);Ut.bbox={x0:fa+kt,x1:Fa+kt,y0:La+nt,y1:Cn+nt},Ut.xPixel=(Er+br)/2,Ut.yPixel=(Or+Pr)/2}Sn.eventData=[Ut],Fr.push(Ut)}q._hoverdata=Fr;var mn=ke==="y"&&(vt.length>1||Ot.length>1)||ke==="closest"&&Sr&&Ot.length>1,bi=a.combine(Ae.plot_bgcolor||a.background,Ae.paper_bgcolor),gn=R(Ot,{gd:q,hovermode:ke,rotateLabels:mn,bgColor:bi,container:Ae._hoverlayer,outerContainer:Ae._paper.node(),commonLabelOpts:Ae.hoverlabel,hoverdistance:Ae.hoverdistance}),eo=gn.hoverLabels;if(f.isUnifiedHover(ke)||(F(eo,mn,Ae,gn.commonLabelBoundingBox),U(eo,mn,Ae._invScaleX,Ae._invScaleY)),fe&&fe.tagName){var si=g.getComponentMethod("annotations","hasClickToShow")(q,Fr);n(H.select(fe),si?"pointer":"")}var Ao=re(q,W,Rr);if(!fe||ae||!Ao&&!Ae.hoveranywhere)return;Rr&&Ao&&q.emit("plotly_unhover",{event:W,points:Rr}),ro(q._hoverdata);function ro(Sn){q.emit("plotly_hover",{event:W,points:Sn,xaxes:Tt,yaxes:At,xvals:f.c2dApply(Tt,ht),yvals:f.c2dApply(At,Re),xPixel:W.pointerX,yPixel:W.pointerY})}}function I(q){return[q.trace.index,q.index,q.x0,q.y0,q.name,q.attr,q.xa?q.xa._id:"",q.ya?q.ya._id:""].join(",")}var N=/([\s\S]*)<\/extra>/;function R(q,W){var ee=W.gd,ae=ee._fullLayout,fe=W.hovermode,ye=W.rotateLabels,xe=W.bgColor,Ae=W.container,Me=W.outerContainer,Ie=W.commonLabelOpts||{};if(q.length===0)return[[]];var qe=W.fontFamily||p.HOVERFONT,je=W.fontSize||p.HOVERFONTSIZE,ke=W.fontWeight||ae.font.weight,ge=W.fontStyle||ae.font.style,le=W.fontVariant||ae.font.variant,ve=W.fontTextcase||ae.font.textcase,se=W.fontLineposition||ae.font.lineposition,Te=W.fontShadow||ae.font.shadow,Fe=q[0],We=Fe.xa,Ge=Fe.ya,gt=fe.charAt(0),mt=gt+"Label",Tt=Fe[mt];if(Tt===void 0&&We.type==="multicategory")for(var At=0;Atae.width-Fr&&(nt=ae.width-Fr),pn.attr("d","M"+(ur-nt)+",0L"+(ur-nt+w)+","+Rr+w+"H"+Fr+"v"+Rr+(h*2+hr.height)+"H"+-Fr+"V"+Rr+w+"H"+(ur-nt-w)+"Z"),ur=nt,He.minX=ur-Fr,He.maxX=ur+Fr,We.side==="top"?(He.minY=Tr-(h*2+hr.height),He.maxY=Tr-h):(He.minY=Tr+h,He.maxY=Tr+(h*2+hr.height))}else{var kt,Ut,nr;Ge.side==="right"?(kt="start",Ut=1,nr="",ur=We._offset+We._length):(kt="end",Ut=-1,nr="-",ur=We._offset),Tr=Ge._offset+(Fe.y0+Fe.y1)/2,Ii.attr("text-anchor",kt),pn.attr("d","M0,0L"+nr+w+","+w+"V"+(h+hr.height/2)+"h"+nr+(h*2+hr.width)+"V-"+(h+hr.height/2)+"H"+nr+w+"V-"+w+"Z"),He.minY=Tr-(h+hr.height/2),He.maxY=Tr+(h+hr.height/2),Ge.side==="right"?(He.minX=ur+w,He.maxX=ur+w+(h*2+hr.width)):(He.minX=ur-w-(h*2+hr.width),He.maxX=ur-w);var Er=hr.height/2,br=ar-hr.top-Er,Or="clip"+ae._uid+"commonlabel"+Ge._id,Pr;if(urpn.hoverinfo!=="none");if(bn.length===0)return[];var $e=ae.hoverlabel,Ze=$e.font,Je=bn[0],Mt=((fe==="x unified"?Je.xa:Je.ya).unifiedhovertitle||{}).text,dt=Mt?x.hovertemplateString({data:fe==="x unified"?[{xa:Je.xa,x:Je.xVal}]:[{ya:Je.ya,y:Je.yVal}],fallback:Je.trace.hovertemplatefallback,locale:ae._d3locale,template:Mt}):Tt,Dt={showlegend:!0,legend:{title:{text:dt,font:Ze},font:Ze,bgcolor:$e.bgcolor,bordercolor:$e.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:ae.legend?ae.legend.traceorder:void 0,orientation:"v"}},Ct={font:Ze};m(Dt,Ct,ee._fullData);var Vt=Ct.legend;Vt.entries=[];for(var Ht=0;Ht=0?ni=un:Ja+fr<_r&&Ja>=0?ni=Ja:ei+fr<_r?ni=ei:un-aa=0?Mi=Oa:An+Ir=0?Mi=An:Fn+Ir=0,(bn.idealAlign==="top"||!La)&&Cn?(nr-=br/2,bn.anchor="end"):La?(nr+=br/2,bn.anchor="start"):bn.anchor="middle",bn.crossPos=nr;else{if(bn.pos=nr,La=Ut+Er/2+Fa<=_r,Cn=Ut-Er/2-Fa>=0,(bn.idealAlign==="left"||!La)&&Cn)Ut-=Er/2,bn.anchor="end";else if(La)Ut+=Er/2,bn.anchor="start";else{bn.anchor="middle";var mn=Fa/2,bi=Ut+mn-_r,gn=Ut-mn;bi>0&&(Ut-=bi),gn<0&&(Ut+=-gn)}bn.crossPos=Ut}Tr.attr("text-anchor",bn.anchor),Fr&&Rr.attr("text-anchor",bn.anchor),pn.attr("transform",k(Ut,nr)+(ye?l(T):""))}),{hoverLabels:ci,commonLabelBoundingBox:He}}function B(q,W,ee,ae,fe,ye){var xe,Ae,Me="",Ie="";q.nameOverride!==void 0&&(q.name=q.nameOverride),q.name&&(q.trace._meta&&(q.name=x.templateString(q.name,q.trace._meta)),Me=oe(q.name,q.nameLength));var qe=ee.charAt(0),je=qe==="x"?"y":"x";q.zLabel!==void 0?(q.xLabel!==void 0&&(Ie+="x: "+q.xLabel+"
"),q.yLabel!==void 0&&(Ie+="y: "+q.yLabel+"
"),q.trace.type!=="choropleth"&&q.trace.type!=="choroplethmap"&&(Ie+=(Ie?"z: ":"")+q.zLabel)):W&&q[qe+"Label"]===fe?Ie=q[je+"Label"]||"":q.xLabel===void 0?q.yLabel!==void 0&&q.trace.type!=="scattercarpet"&&(Ie=q.yLabel):q.yLabel===void 0?Ie=q.xLabel:Ie="("+q.xLabel+", "+q.yLabel+")",(q.text||q.text===0)&&!Array.isArray(q.text)&&(Ie+=(Ie?"
":"")+q.text),q.extraText!==void 0&&(Ie+=(Ie?"
":"")+q.extraText),ye&&Ie===""&&!q.hovertemplate&&(Me===""&&ye.remove(),Ie=Me),(Ae=(xe=q.trace)==null?void 0:xe.hoverlabel)!=null&&Ae.split&&(q.hovertemplate="");let{hovertemplate:ke=!1}=q;if(ke){let ge=q.hovertemplateLabels||q;q[qe+"Label"]!==fe&&(ge[qe+"other"]=ge[qe+"Val"],ge[qe+"otherLabel"]=ge[qe+"Label"]),Ie=x.hovertemplateString({data:[q.eventData[0]||{},q.trace._meta],fallback:q.trace.hovertemplatefallback,labels:ge,locale:ae._d3locale,template:ke}),Ie=Ie.replace(N,(le,ve)=>(Me=oe(ve,q.nameLength),""))}return[Ie,Me]}function F(q,W,ee,ae){var fe=W?"xa":"ya",ye=W?"ya":"xa",xe=0,Ae=1,Me=q.size(),Ie=new Array(Me),qe=0,je=ae.minX,ke=ae.maxX,ge=ae.minY,le=ae.maxY,ve=function(ht){return ht*ee._invScaleX},se=function(ht){return ht*ee._invScaleY};q.each(function(ht){var Re=ht[fe],Be=ht[ye],He=Re._id.charAt(0)==="x",$e=Re.range;qe===0&&$e&&$e[0]>$e[1]!==He&&(Ae=-1);var Ze=0,Je=He?ee.width:ee.height;if(ee.hovermode==="x"||ee.hovermode==="y"){var Mt=P(ht,W),dt=ht.anchor,Dt=dt==="end"?-1:1,Ct,Vt;if(dt==="middle")Ct=ht.crossPos+(He?se(Mt.y-ht.by/2):ve(ht.bx/2+ht.tx2width/2)),Vt=Ct+(He?se(ht.by):ve(ht.bx));else if(He)Ct=ht.crossPos+se(w+Mt.y)-se(ht.by/2-w),Vt=Ct+se(ht.by);else{var Ht=ve(Dt*w+Mt.x),Wt=Ht+ve(Dt*ht.bx);Ct=ht.crossPos+Math.min(Ht,Wt),Vt=ht.crossPos+Math.max(Ht,Wt)}He?ge!==void 0&&le!==void 0&&Math.min(Vt,le)-Math.max(Ct,ge)>1&&(Be.side==="left"?(Ze=Be._mainLinePosition,Je=ee.width):Je=Be._mainLinePosition):je!==void 0&&ke!==void 0&&Math.min(Vt,ke)-Math.max(Ct,je)>1&&(Be.side==="top"?(Ze=Be._mainLinePosition,Je=ee.height):Je=Be._mainLinePosition)}Ie[qe++]=[{datum:ht,traceIndex:ht.trace.index,dp:0,pos:ht.pos,posref:ht.posref,size:ht.by*(He?M:1)/2,pmin:Ze,pmax:Je}]}),Ie.sort(function(ht,Re){return ht[0].posref-Re[0].posref||Ae*(Re[0].traceIndex-ht[0].traceIndex)});var Te,Fe,We,Ge,gt,mt,Tt;function At(ht){var Re=ht[0],Be=ht[ht.length-1];if(Fe=Re.pmin-Re.pos-Re.dp+Re.size,We=Be.pos+Be.dp+Be.size-Re.pmax,Fe>.01){for(gt=ht.length-1;gt>=0;gt--)ht[gt].dp+=Fe;Te=!1}if(!(We<.01)){if(Fe<-.01){for(gt=ht.length-1;gt>=0;gt--)ht[gt].dp-=We;Te=!1}if(Te){var He=0;for(Ge=0;GeRe.pmax&&He++;for(Ge=ht.length-1;Ge>=0&&!(He<=0);Ge--)mt=ht[Ge],mt.pos>Re.pmax-1&&(mt.del=!0,He--);for(Ge=0;Ge=0;gt--)ht[gt].dp-=We;for(Ge=ht.length-1;Ge>=0&&!(He<=0);Ge--)mt=ht[Ge],mt.pos+mt.dp+mt.size>Re.pmax&&(mt.del=!0,He--)}}}for(;!Te&&xe<=Me;){for(xe++,Te=!0,Ge=0;Ge.01){for(gt=ar.length-1;gt>=0;gt--)ar[gt].dp+=Fe;for(Kt.push.apply(Kt,ar),Ie.splice(Ge+1,1),Tt=0,gt=Kt.length-1;gt>=0;gt--)Tt+=Kt[gt].dp;for(We=Tt/Kt.length,gt=Kt.length-1;gt>=0;gt--)Kt[gt].dp-=We;Te=!1}else Ge++}Ie.forEach(At)}for(Ge=Ie.length-1;Ge>=0;Ge--){var sr=Ie[Ge];for(gt=sr.length-1;gt>=0;gt--){var Ot=sr[gt],vt=Ot.datum;vt.offset=Ot.dp,vt.del=Ot.del}}}function P(q,W){var ee=0,ae=q.offset;return W&&(ae*=-_,ee=q.offset*C),{x:ee,y:ae}}function j(q){var W={start:1,end:-1,middle:0}[q.anchor],ee=W*(w+h),ae=ee+W*(q.txwidth+h),fe=q.anchor==="middle";return fe&&(ee-=q.tx2width/2,ae+=q.txwidth/2+h),{alignShift:W,textShiftX:ee,text2ShiftX:ae}}function U(q,W,ee,ae){var fe=function(xe){return xe*ee},ye=function(xe){return xe*ae};q.each(function(xe){var Ae=H.select(this);if(xe.del)return Ae.remove();var Me=Ae.select("text.nums"),Ie=xe.anchor,qe=Ie==="end"?-1:1,je=j(xe),ke=P(xe,W),ge=ke.x,le=ke.y,ve=Ie==="middle",se="hoverlabel"in xe.trace?xe.trace.hoverlabel.showarrow:!0,Te;ve?Te="M-"+fe(xe.bx/2+xe.tx2width/2)+","+ye(le-xe.by/2)+"h"+fe(xe.bx)+"v"+ye(xe.by)+"h-"+fe(xe.bx)+"Z":se?Te="M0,0L"+fe(qe*w+ge)+","+ye(w+le)+"v"+ye(xe.by/2-w)+"h"+fe(qe*xe.bx)+"v-"+ye(xe.by)+"H"+fe(qe*w+ge)+"V"+ye(le-w)+"Z":Te="M"+fe(qe*w+ge)+","+ye(le-xe.by/2)+"h"+fe(qe*xe.bx)+"v"+ye(xe.by)+"h"+fe(-qe*xe.bx)+"Z",Ae.select("path").attr("d",Te);var Fe=ge+je.textShiftX,We=le+xe.ty0-xe.by/2+h,Ge=xe.textAlign||"auto";Ge!=="auto"&&(Ge==="left"&&Ie!=="start"?(Me.attr("text-anchor","start"),Fe=ve?-xe.bx/2-xe.tx2width/2+h:-xe.bx-h):Ge==="right"&&Ie!=="end"&&(Me.attr("text-anchor","end"),Fe=ve?xe.bx/2-xe.tx2width/2-h:xe.bx+h)),Me.call(t.positionText,fe(Fe),ye(We)),xe.tx2width&&(Ae.select("text.name").call(t.positionText,fe(je.text2ShiftX+je.alignShift*h+ge),ye(le+xe.ty0-xe.by/2+h)),Ae.select("rect").call(r.setRect,fe(je.text2ShiftX+(je.alignShift-1)*xe.tx2width/2+ge),ye(le-xe.by/2-1),fe(xe.tx2width),ye(xe.by+2)))})}function Z(q,W){var ee=q.index,ae=q.trace||{},fe=q.cd[0],ye=q.cd[ee]||{};function xe(ke){return ke||v(ke)&&ke===0}var Ae=Array.isArray(ee)?function(ke,ge){var le=x.castOption(fe,ee,ke);return xe(le)?le:x.extractOption({},ae,"",ge)}:function(ke,ge){return x.extractOption(ye,ae,ke,ge)};function Me(ke,ge,le){var ve=Ae(ge,le);xe(ve)&&(q[ke]=ve)}if(Me("hoverinfo","hi","hoverinfo"),Me("bgcolor","hbg","hoverlabel.bgcolor"),Me("borderColor","hbc","hoverlabel.bordercolor"),Me("fontFamily","htf","hoverlabel.font.family"),Me("fontSize","hts","hoverlabel.font.size"),Me("fontColor","htc","hoverlabel.font.color"),Me("fontWeight","htw","hoverlabel.font.weight"),Me("fontStyle","hty","hoverlabel.font.style"),Me("fontVariant","htv","hoverlabel.font.variant"),Me("nameLength","hnl","hoverlabel.namelength"),Me("textAlign","hta","hoverlabel.align"),q.posref=W==="y"||W==="closest"&&ae.orientation==="h"?q.xa._offset+(q.x0+q.x1)/2:q.ya._offset+(q.y0+q.y1)/2,q.x0=x.constrain(q.x0,0,q.xa._length),q.x1=x.constrain(q.x1,0,q.xa._length),q.y0=x.constrain(q.y0,0,q.ya._length),q.y1=x.constrain(q.y1,0,q.ya._length),q.xLabelVal!==void 0&&(q.xLabel="xLabel"in q?q.xLabel:s.hoverLabelText(q.xa,q.xLabelVal,ae.xhoverformat),q.xVal=q.xa.c2d(q.xLabelVal)),q.yLabelVal!==void 0&&(q.yLabel="yLabel"in q?q.yLabel:s.hoverLabelText(q.ya,q.yLabelVal,ae.yhoverformat),q.yVal=q.ya.c2d(q.yLabelVal)),q.zLabelVal!==void 0&&q.zLabel===void 0&&(q.zLabel=String(q.zLabelVal)),!isNaN(q.xerr)&&!(q.xa.type==="log"&&q.xerr<=0)){var Ie=s.tickText(q.xa,q.xa.c2l(q.xerr),"hover").text;q.xerrneg!==void 0?q.xLabel+=" +"+Ie+" / -"+s.tickText(q.xa,q.xa.c2l(q.xerrneg),"hover").text:q.xLabel+=" \xB1 "+Ie,W==="x"&&(q.distance+=1)}if(!isNaN(q.yerr)&&!(q.ya.type==="log"&&q.yerr<=0)){var qe=s.tickText(q.ya,q.ya.c2l(q.yerr),"hover").text;q.yerrneg!==void 0?q.yLabel+=" +"+qe+" / -"+s.tickText(q.ya,q.ya.c2l(q.yerrneg),"hover").text:q.yLabel+=" \xB1 "+qe,W==="y"&&(q.distance+=1)}var je=q.hoverinfo||q.trace.hoverinfo;return je&&je!=="all"&&(je=Array.isArray(je)?je:je.split("+"),je.indexOf("x")===-1&&(q.xLabel=void 0),je.indexOf("y")===-1&&(q.yLabel=void 0),je.indexOf("z")===-1&&(q.zLabel=void 0),je.indexOf("text")===-1&&(q.text=void 0),je.indexOf("name")===-1&&(q.name=void 0)),q}function Q(q,W,ee){var ae=ee.container,fe=ee.fullLayout,ye=fe._size,xe=ee.event,Ae=!!W.hLinePoint,Me=!!W.vLinePoint,Ie,qe;if(ae.selectAll(".spikeline").remove(),!!(Me||Ae)){var je=a.combine(fe.plot_bgcolor,fe.paper_bgcolor);if(Ae){var ke=W.hLinePoint,ge,le;Ie=ke&&ke.xa,qe=ke&&ke.ya;var ve=qe.spikesnap;ve==="cursor"?(ge=xe.pointerX,le=xe.pointerY):(ge=Ie._offset+ke.x,le=qe._offset+ke.y);var se=a.wcagContrast(ke.color,je)<1.5?a.contrast(je):ke.color,Te=qe.spikemode,Fe=qe.spikethickness,We=qe.spikecolor||se,Ge=s.getPxPosition(q,qe),gt,mt;if(Te.indexOf("toaxis")!==-1||Te.indexOf("across")!==-1){if(Te.indexOf("toaxis")!==-1&&(gt=Ge,mt=ge),Te.indexOf("across")!==-1){var Tt=qe._counterDomainMin,At=qe._counterDomainMax;qe.anchor==="free"&&(Tt=Math.min(Tt,qe.position),At=Math.max(At,qe.position)),gt=ye.l+Tt*ye.w,mt=ye.l+At*ye.w}ae.insert("line",":first-child").attr({x1:gt,x2:mt,y1:le,y2:le,"stroke-width":Fe,stroke:We,"stroke-dasharray":r.dashStyle(qe.spikedash,Fe)}).classed("spikeline",!0).classed("crisp",!0),ae.insert("line",":first-child").attr({x1:gt,x2:mt,y1:le,y2:le,"stroke-width":Fe+2,stroke:je}).classed("spikeline",!0).classed("crisp",!0)}Te.indexOf("marker")!==-1&&ae.insert("circle",":first-child").attr({cx:Ge+(qe.side!=="right"?Fe:-Fe),cy:le,r:Fe,fill:We}).classed("spikeline",!0)}if(Me){var Kt=W.vLinePoint,ar,_r;Ie=Kt&&Kt.xa,qe=Kt&&Kt.ya;var Zt=Ie.spikesnap;Zt==="cursor"?(ar=xe.pointerX,_r=xe.pointerY):(ar=Ie._offset+Kt.x,_r=qe._offset+Kt.y);var sr=a.wcagContrast(Kt.color,je)<1.5?a.contrast(je):Kt.color,Ot=Ie.spikemode,vt=Ie.spikethickness,ht=Ie.spikecolor||sr,Re=s.getPxPosition(q,Ie),Be,He;if(Ot.indexOf("toaxis")!==-1||Ot.indexOf("across")!==-1){if(Ot.indexOf("toaxis")!==-1&&(Be=Re,He=_r),Ot.indexOf("across")!==-1){var $e=Ie._counterDomainMin,Ze=Ie._counterDomainMax;Ie.anchor==="free"&&($e=Math.min($e,Ie.position),Ze=Math.max(Ze,Ie.position)),Be=ye.t+(1-Ze)*ye.h,He=ye.t+(1-$e)*ye.h}ae.insert("line",":first-child").attr({x1:ar,x2:ar,y1:Be,y2:He,"stroke-width":vt,stroke:ht,"stroke-dasharray":r.dashStyle(Ie.spikedash,vt)}).classed("spikeline",!0).classed("crisp",!0),ae.insert("line",":first-child").attr({x1:ar,x2:ar,y1:Be,y2:He,"stroke-width":vt+2,stroke:je}).classed("spikeline",!0).classed("crisp",!0)}Ot.indexOf("marker")!==-1&&ae.insert("circle",":first-child").attr({cx:ar,cy:Re-(Ie.side!=="top"?vt:-vt),r:vt,fill:ht}).classed("spikeline",!0)}}}function re(q,W,ee){if(!ee||ee.length!==q._hoverdata.length)return!0;for(var ae=ee.length-1;ae>=0;ae--){var fe=ee[ae],ye=q._hoverdata[ae];if(fe.curveNumber!==ye.curveNumber||String(fe.pointNumber)!==String(ye.pointNumber)||String(fe.pointNumbers)!==String(ye.pointNumbers)||fe.binNumber!==ye.binNumber)return!0}return!1}function ne(q,W){return!W||W.vLinePoint!==q._spikepoints.vLinePoint||W.hLinePoint!==q._spikepoints.hLinePoint}function oe(q,W){return t.plainText(q||"",{len:W,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function V(q,W){for(var ee=W.charAt(0),ae=[],fe=[],ye=[],xe=0;xeq.offsetTop+q.clientTop,G=q=>q.offsetLeft+q.clientLeft;function X(q,W){var ee=q._fullLayout,ae=W.getBoundingClientRect(),fe=ae.left,ye=ae.top,xe=fe+ae.width,Ae=ye+ae.height,Me=x.apply3DTransform(ee._invTransform)(fe,ye),Ie=x.apply3DTransform(ee._invTransform)(xe,Ae),qe=Me[0],je=Me[1],ke=Ie[0],ge=Ie[1];return{x:qe,y:je,width:ke-qe,height:ge-je,top:Math.min(je,ge),left:Math.min(qe,ke),right:Math.max(qe,ke),bottom:Math.max(je,ge)}}}}),V0=Ee({"src/components/fx/hoverlabel_defaults.js"(J,H){"use strict";var v=Vr(),x=Qn(),E=Qf().isUnifiedHover;H.exports=function(l,e,t,n){n=n||{};var r=e.legend;function a(o){n.font[o]||(n.font[o]=r?e.legend.font[o]:e.font[o])}e&&E(e.hovermode)&&(n.font||(n.font={}),a("size"),a("family"),a("color"),a("weight"),a("style"),a("variant"),r?(n.bgcolor||(n.bgcolor=x.combine(e.legend.bgcolor,e.paper_bgcolor)),n.bordercolor||(n.bordercolor=e.legend.bordercolor)):n.bgcolor||(n.bgcolor=e.paper_bgcolor)),t("hoverlabel.bgcolor",n.bgcolor),t("hoverlabel.bordercolor",n.bordercolor),t("hoverlabel.namelength",n.namelength),t("hoverlabel.showarrow",n.showarrow),v.coerceFont(t,"hoverlabel.font",n.font),t("hoverlabel.align",n.align)}}}),xM=Ee({"src/components/fx/layout_global_defaults.js"(J,H){"use strict";var v=Vr(),x=V0(),E=Ei();H.exports=function(l,e){function t(n,r){return v.coerce(l,e,E,n,r)}x(l,e,t)}}}),wM=Ee({"src/components/fx/defaults.js"(J,H){"use strict";var v=Vr(),x=Hi(),E=V0();H.exports=function(l,e,t,n){function r(o,s){return v.coerce(l,e,x,o,s)}var a=v.extendFlat({},n.hoverlabel);e.hovertemplate&&(a.namelength=-1),E(l,e,r,a)}}}),Vb=Ee({"src/components/fx/hovermode_defaults.js"(J,H){"use strict";var v=Vr(),x=Ei();H.exports=function(k,l){function e(t,n){return l[t]!==void 0?l[t]:v.coerce(k,l,x,t,n)}return e("clickmode"),e("hoversubplots"),e("hoveranywhere"),e("clickanywhere"),e("hovermode")}}}),TM=Ee({"src/components/fx/layout_defaults.js"(J,H){"use strict";var v=Vr(),x=Ei(),E=Vb(),k=V0();H.exports=function(e,t){function n(g,f){return v.coerce(e,t,x,g,f)}var r=E(e,t);r&&(n("hoverdistance"),n("spikedistance"),r.indexOf("unified")!==-1&&n("hoversort"));var a=n("dragmode");a==="select"&&n("selectdirection");var o=t._has("map"),s=t._has("geo"),c=t._basePlotModules.length;t.dragmode==="zoom"&&((o||s)&&c===1||o&&s&&c===2)&&(t.dragmode="pan"),k(e,t,n),v.coerceFont(n,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),AM=Ee({"src/components/fx/calc.js"(J,H){"use strict";var v=Vr(),x=Ri();H.exports=function(l){var e=l.calcdata,t=l._fullLayout;function n(c){return function(g){return v.coerceHoverinfo({hoverinfo:g},{_module:c._module},t)}}for(var r=0;r"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),Bg=Ee({"src/components/shapes/draw_newshape/constants.js"(J,H){"use strict";var v=32;H.exports={CIRCLE_SIDES:v,i000:0,i090:v/4,i180:v/2,i270:v/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),Ng=Ee({"src/components/selections/helpers.js"(J,H){"use strict";var v=Vr().strTranslate;function x(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function E(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function k(e){var t=e._id.charAt(0)==="y"?1:0;return function(n){return x(e,n[t])}}function l(e){return v(e.xaxis._offset,e.yaxis._offset)}H.exports={p2r:x,r2p:E,axValue:k,getTransform:l}}}),$d=Ee({"src/components/shapes/draw_newshape/helpers.js"(J){"use strict";var H=Ib(),v=Bg(),x=v.CIRCLE_SIDES,E=v.SQRT2,k=Ng(),l=k.p2r,e=k.r2p,t=[0,3,4,5,6,1,2],n=[0,3,4,1,2];J.writePaths=function(o){var s=o.length;if(!s)return"M0,0Z";for(var c="",g=0;g0&&T{let s=o.charAt(0),c=r[s].drawn!==void 0;return a+(c?1:0)},0)},J.getDataToPixel=function(l,e,t,n,r){var a=l._fullLayout._size,o;if(e)if(r==="domain")o=function(c){return e._length*(n?1-c:c)+e._offset};else{var s=J.shapePositionToRange(e);o=function(c){var g=k(e,t);return e._offset+e.r2p(s(c,!0))+g},e.type==="date"&&(o=J.decodeDate(o))}else n?o=function(c){return a.t+a.h*(1-c)}:o=function(c){return a.l+a.w*c};return o},J.getPixelToData=function(l,e,t,n){var r=l._fullLayout._size,a;if(e)if(n==="domain")a=function(s){var c=(s-e._offset)/e._length;return t?1-c:c};else{var o=J.rangeToShapePosition(e);a=function(s){return o(e.p2r(s-e._offset))}}else t?a=function(s){return 1-(s-r.t)/r.h}:a=function(s){return(s-r.l)/r.w};return a},J.roundPositionForSharpStrokeRendering=function(l,e){var t=Math.round(e%2)===1,n=Math.round(l);return t?n+.5:n},J.makeShapesOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.shapes[e]||{},n=l._fullLayout._plots[t.xref+t.yref],r=!!n;return r?n._hadPlotinfo=!0:(n={},t.xref&&t.xref!=="paper"&&(n.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&t.yref!=="paper"&&(n.yaxis=l._fullLayout[t.yref+"axis"])),n.xsizemode=t.xsizemode,n.ysizemode=t.ysizemode,n.xanchor=t.xanchor,n.yanchor=t.yanchor,{options:t,plotinfo:n}},J.makeSelectionsOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.selections[e]||{},n=l._fullLayout._plots[t.xref+t.yref],r=!!n;return r?n._hadPlotinfo=!0:(n={},t.xref&&(n.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&(n.yaxis=l._fullLayout[t.yref+"axis"])),{options:t,plotinfo:n}},J.getPathString=function(l,e){let t=e.type,n=x.getRefType(e.xref),r=x.getRefType(e.yref),a=l._fullLayout._size;var o,s,c,g,f,p,m,i,T,S,M,C;function _(N,R,B,F){var P;if(N)if(R==="domain")F?P=function(j){return N._offset+N._length*(1-j)}:P=function(j){return N._offset+N._length*j};else{let j=J.shapePositionToRange(N);P=function(U){return N._offset+N.r2p(j(U,!0))},B==="path"&&N.type==="date"&&(P=J.decodeDate(P))}else F?P=function(j){return a.t+a.h*(1-j)}:P=function(j){return a.l+a.w*j};return P}if(n==="array"?(m=[],o=e.xref.map(function(N){return x.getFromId(l,N)}),m=e.xref.map(function(N,R){return _(o[R],x.getRefType(N),t,!1)})):(o=x.getFromId(l,e.xref),m=_(o,n,t,!1)),r==="array"?(i=[],s=e.yref.map(function(N){return x.getFromId(l,N)}),i=e.yref.map(function(N,R){return _(s[R],x.getRefType(N),t,!0)})):(s=x.getFromId(l,e.yref),i=_(s,r,t,!0)),t==="path")return E(e,m,i);if(n==="array")c=k(o[0],e.x0shift),g=k(o[1],e.x1shift),T=m[0](e.x0)+c,S=m[1](e.x1)+g;else if(c=k(o,e.x0shift),g=k(o,e.x1shift),e.xsizemode==="pixel"){let N=m(e.xanchor);T=N+e.x0+c,S=N+e.x1+g}else T=m(e.x0)+c,S=m(e.x1)+g;if(r==="array")f=k(s[0],e.y0shift),p=k(s[1],e.y1shift),M=i[0](e.y0)+f,C=i[1](e.y1)+p;else if(f=k(s,e.y0shift),p=k(s,e.y1shift),e.ysizemode==="pixel"){let N=i(e.yanchor);M=N-e.y0+f,C=N-e.y1+p}else M=i(e.y0)+f,C=i(e.y1)+p;if(t==="line")return"M"+T+","+M+"L"+S+","+C;if(t==="rect")return"M"+T+","+M+"H"+S+"V"+C+"H"+T+"Z";var w=(T+S)/2,h=(M+C)/2,u=Math.abs(w-T),A=Math.abs(h-M),b="A"+u+","+A,z=w+u+","+h,I=w+","+(h-A);return"M"+z+b+" 0 1,1 "+I+b+" 0 0,1 "+z+"Z"};function E(l,e,t){let n=l.path,r=l.xsizemode,a=l.ysizemode,o=l.xanchor,s=l.yanchor,c=Array.isArray(l.xref),g=Array.isArray(l.yref);var f=0,p=0;return n.replace(H.segmentRE,function(m){var i=0,T=m.charAt(0),S=H.paramIsX[T],M=H.paramIsY[T],C=H.numParams[T];let _=S.drawn!==void 0,w=M.drawn!==void 0,h=c?e[f]:e,u=g?t[p]:t;var A=m.slice(1).replace(H.paramRE,function(b){return S[i]?r==="pixel"?b=h(o)+Number(b):b=h(b):M[i]&&(a==="pixel"?b=u(s)-Number(b):b=u(b)),i++,i>C&&(b="X"),b});return i>C&&(A=A.replace(/[\s,]*X.*/,""),v.log("Ignoring extra params in segment "+m)),_&&f++,w&&p++,T+A})}J.getPixelShift=k;function k(l,e){e=e||0;var t=0;return e&&l&&(l.type==="category"||l.type==="multicategory")&&(t=(l.r2p(1)-l.r2p(0))*e),t}}}),Gb=Ee({"src/components/shapes/display_labels.js"(J,H){"use strict";var v=Vr(),x=uo(),E=Fs(),k=mo(),l=$d().readPaths,e=Zd(),t=e.getPathString,n=Cg(),r=rc().FROM_TL;H.exports=function(c,g,f,p){if(p.selectAll(".shape-label").remove(),!!(f.label.text||f.label.texttemplate)){var m;if(f.label.texttemplate){var i={};if(f.type!=="path"){var T=x.getFromId(c,f.xref),S=x.getFromId(c,f.yref);let W=Array.isArray(f.xref),ee=Array.isArray(f.yref);for(var M in n){var C=typeof n[M]=="function",_=!W||n.simpleXVariables.includes(M),w=!ee||n.simpleYVariables.includes(M);if(C&&_&&w){var h=n[M](f,T,S);h!==void 0&&(i[M]=h)}}}m=v.texttemplateStringForShapes({data:[i],fallback:f.label.texttemplatefallback,locale:c._fullLayout._d3locale,template:f.label.texttemplate})}else m=f.label.text;var u={"data-index":g},A=f.label.font,b={"data-notex":1},z=p.append("g").attr(u).classed("shape-label",!0),I=z.append("text").attr(b).classed("shape-label-text",!0).text(m),N,R,B,F;if(f.path){var P=t(c,f),j=l(P,c);N=1/0,B=1/0,R=-1/0,F=-1/0;for(var U=0;Ue.getDataToPixel(c,ve,le,!1,se)(ge),ke=(ge,le,ve,se)=>e.getDataToPixel(c,ve,le,!0,se)(ge);if(f.xsizemode==="pixel"){let ge=je(f.xanchor,void 0,ae,Ae),le=e.getPixelShift(ae,f.x0shift),ve=e.getPixelShift(ae,f.x1shift);N=ge+f.x0+le,R=ge+f.x1+ve}else N=je(f.x0,f.x0shift,ae,Ae),R=je(f.x1,f.x1shift,fe,Me);if(f.ysizemode==="pixel"){let ge=ke(f.yanchor,void 0,ye,Ie),le=e.getPixelShift(ye,f.y0shift),ve=e.getPixelShift(ye,f.y1shift);B=ge-f.y0+le,F=ge-f.y1+ve}else B=ke(f.y0,f.y0shift,ye,Ie),F=ke(f.y1,f.y1shift,xe,qe)}var V=f.label.textangle;V==="auto"&&(f.type==="line"?V=a(N,B,R,F):V=0),I.call(function(W){return W.call(k.font,A).attr({}),E.convertToTspans(W,c),W});var $=k.bBox(I.node()),K=o(N,B,R,F,f,V,$),G=K.textx,X=K.texty,q=K.xanchor;I.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[q],y:X,x:G,transform:"rotate("+V+","+G+","+X+")"}).call(E.positionText,G,X)}};function a(s,c,g,f){var p,m;return m=Math.abs(g-s),g>=s?p=c-f:p=f-c,-180/Math.PI*Math.atan2(p,m)}function o(s,c,g,f,p,m,i){var T=p.label.textposition,S=p.label.textangle,M=p.label.padding,C=p.type,_=Math.PI/180*m,w=Math.sin(_),h=Math.cos(_),u=p.label.xanchor,A=p.label.yanchor,b,z,I,N;if(C==="line"){T==="start"?(b=s,z=c):T==="end"?(b=g,z=f):(b=(s+g)/2,z=(c+f)/2),u==="auto"&&(T==="start"?S==="auto"?g>s?u="left":gs?u="right":gs?u="right":gs?u="left":g1&&!(ke.length===2&&ke[1][0]==="Z")&&(V===0&&(ke[0][0]="M"),b[oe]=ke,B(),F())}}function fe(ke,ge){if(ke===2){oe=+ge.srcElement.getAttribute("data-i"),V=+ge.srcElement.getAttribute("data-j");var le=b[oe];!m(le)&&!i(le)&&ae()}}function ye(ke){re=[];for(var ge=0;ge{if(!I._dragging&&I._fullLayout.hoveranywhere){let j=F(P);j&&c.hover(I,j,R.id)}}),B.addEventListener("click",P=>{if(!I._dragged&&I._fullLayout.clickanywhere){let j=F(P);j&&c.click(I,j,R.id)}})}function _(I,N,R){let B=R.xref,F=R.yref;if(Array.isArray(B)||Array.isArray(F)){let P="clip"+N._fullLayout._uid+"shape"+R._index,j=w(N,B,F);E.ensureSingleById(N._fullLayout._clips,"clipPath",P,function(U){U.append("rect")}).select("rect").attr(j),a.setClipUrl(I,P,N)}else{let P=(B+F).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");a.setClipUrl(I,P?"clip"+N._fullLayout._uid+P:null,N)}}function w(I,N,R){let B=I._fullLayout._size;function F(U,Z){let Q=(Array.isArray(U)?U:[U]).map(oe=>k.getFromId(I,oe)).filter(Boolean);if(!Q.length)return Z?[B.t,B.t+B.h]:[B.l,B.l+B.w];let re=Q.map(function(oe){return oe._offset}),ne=Q.map(function(oe){return oe._offset+oe._length});return[Math.min(...re),Math.max(...ne)]}let P=F(N,!1),j=F(R,!0);return{x:P[0],y:j[0],width:P[1]-P[0],height:j[1]-j[0]}}function h(I,N,R,B,F,P){var j=10,U=10,Z=R.xsizemode==="pixel",Q=R.ysizemode==="pixel",re=R.type==="line",ne=R.type==="path",oe=P.modifyItem,V,$,K,G,X,q,W,ee,ae,fe,ye,xe,Ae,Me,Ie,qe=v.select(N.node().parentNode),je=k.getFromId(I,R.xref),ke=k.getRefType(R.xref),ge=k.getFromId(I,R.yref),le=k.getRefType(R.yref),ve=R.x0shift,se=R.x1shift,Te=R.y0shift,Fe=R.y1shift,We=function(Ze,Je){var Mt=p.getDataToPixel(I,je,Je,!1,ke);return Mt(Ze)},Ge=function(Ze,Je){var Mt=p.getDataToPixel(I,ge,Je,!0,le);return Mt(Ze)},gt=p.getPixelToData(I,je,!1,ke),mt=p.getPixelToData(I,ge,!0,le),Tt=ar(),At={element:Tt.node(),gd:I,prepFn:sr,doneFn:Ot,clickFn:vt},Kt;s.init(At),Tt.node().onmousemove=Zt;function ar(){return re?_r():N}function _r(){var Ze=10,Je=Math.max(R.line.width,Ze),Mt=F.append("g").attr("data-index",B).attr("drag-helper",!0);Mt.append("path").attr("d",N.attr("d")).style({cursor:"move","stroke-width":Je,"stroke-opacity":"0"});var dt={"fill-opacity":"0"},Dt=Math.max(Je/2,Ze);return Mt.append("circle").attr({"data-line-point":"start-point",cx:Z?We(R.xanchor)+R.x0:We(R.x0,ve),cy:Q?Ge(R.yanchor)-R.y0:Ge(R.y0,Te),r:Dt}).style(dt).classed("cursor-grab",!0),Mt.append("circle").attr({"data-line-point":"end-point",cx:Z?We(R.xanchor)+R.x1:We(R.x1,se),cy:Q?Ge(R.yanchor)-R.y1:Ge(R.y1,Fe),r:Dt}).style(dt).classed("cursor-grab",!0),Mt}function Zt(Ze){if(T(I)){Kt=null;return}if(re)Ze.target.tagName==="path"?Kt="move":Kt=Ze.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Je=At.element.getBoundingClientRect(),Mt=Je.right-Je.left,dt=Je.bottom-Je.top,Dt=Ze.clientX-Je.left,Ct=Ze.clientY-Je.top,Vt=!ne&&Mt>j&&dt>U&&!Ze.shiftKey?s.getCursor(Dt/Mt,1-Ct/dt):"move";g(N,Vt),Kt=Vt.split("-")[0]}}function sr(Ze){T(I)||(Z&&(X=We(R.xanchor)),Q&&(q=Ge(R.yanchor)),R.type==="path"?Ie=R.path:(V=Z?R.x0:We(R.x0),$=Q?R.y0:Ge(R.y0),K=Z?R.x1:We(R.x1),G=Q?R.y1:Ge(R.y1)),VG?(W=$,ye="y0",ee=G,xe="y1"):(W=G,ye="y1",ee=$,xe="y0"),Zt(Ze),Be(F,R),$e(N,R,I),At.moveFn=Kt==="move"?ht:Re,At.altKey=Ze.altKey)}function Ot(){T(I)||(g(N),He(F),_(N,I,R),x.call("_guiRelayout",I,P.getUpdateObj()))}function vt(){T(I)||He(F)}function ht(Ze,Je){if(R.type==="path"){var Mt=function(Ct){return Ct},dt=Mt,Dt=Mt;Z?oe("xanchor",R.xanchor=gt(X+Ze)):(dt=function(Vt){return gt(We(Vt)+Ze)},je&&je.type==="date"&&(dt=p.encodeDate(dt))),Q?oe("yanchor",R.yanchor=mt(q+Je)):(Dt=function(Vt){return mt(Ge(Vt)+Je)},ge&&ge.type==="date"&&(Dt=p.encodeDate(Dt))),oe("path",R.path=u(Ie,dt,Dt))}else Z?oe("xanchor",R.xanchor=gt(X+Ze)):(oe("x0",R.x0=gt(V+Ze)),oe("x1",R.x1=gt(K+Ze))),Q?oe("yanchor",R.yanchor=mt(q+Je)):(oe("y0",R.y0=mt($+Je)),oe("y1",R.y1=mt(G+Je)));N.attr("d",m(I,R)),Be(F,R),t(I,B,R,qe)}function Re(Ze,Je){if(ne){var Mt=function(aa){return aa},dt=Mt,Dt=Mt;Z?oe("xanchor",R.xanchor=gt(X+Ze)):(dt=function(xa){return gt(We(xa)+Ze)},je&&je.type==="date"&&(dt=p.encodeDate(dt))),Q?oe("yanchor",R.yanchor=mt(q+Je)):(Dt=function(xa){return mt(Ge(xa)+Je)},ge&&ge.type==="date"&&(Dt=p.encodeDate(Dt))),oe("path",R.path=u(Ie,dt,Dt))}else if(re){if(Kt==="resize-over-start-point"){var Ct=V+Ze,Vt=Q?$-Je:$+Je;oe("x0",R.x0=Z?Ct:gt(Ct)),oe("y0",R.y0=Q?Vt:mt(Vt))}else if(Kt==="resize-over-end-point"){var Ht=K+Ze,Wt=Q?G-Je:G+Je;oe("x1",R.x1=Z?Ht:gt(Ht)),oe("y1",R.y1=Q?Wt:mt(Wt))}}else{var Sr=function(aa){return Kt.indexOf(aa)!==-1},ia=Sr("n"),$t=Sr("s"),It=Sr("w"),ir=Sr("e"),cr=ia?W+Je:W,fr=$t?ee+Je:ee,Ir=It?ae+Ze:ae,sa=ir?fe+Ze:fe;Q&&(ia&&(cr=W-Je),$t&&(fr=ee-Je)),(!Q&&fr-cr>U||Q&&cr-fr>U)&&(oe(ye,R[ye]=Q?cr:mt(cr)),oe(xe,R[xe]=Q?fr:mt(fr))),sa-Ir>j&&(oe(Ae,R[Ae]=Z?Ir:gt(Ir)),oe(Me,R[Me]=Z?sa:gt(sa)))}N.attr("d",m(I,R)),Be(F,R),t(I,B,R,qe)}function Be(Ze,Je){(Z||Q)&&Mt();function Mt(){var dt=Je.type!=="path",Dt=Ze.selectAll(".visual-cue").data([0]),Ct=1;Dt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ct}).classed("visual-cue",!0);var Vt=We(Z?Je.xanchor:E.midRange(dt?[Je.x0,Je.x1]:p.extractPathCoords(Je.path,f.paramIsX))),Ht=Ge(Q?Je.yanchor:E.midRange(dt?[Je.y0,Je.y1]:p.extractPathCoords(Je.path,f.paramIsY)));if(Vt=p.roundPositionForSharpStrokeRendering(Vt,Ct),Ht=p.roundPositionForSharpStrokeRendering(Ht,Ct),Z&&Q){var Wt="M"+(Vt-1-Ct)+","+(Ht-1-Ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Dt.attr("d",Wt)}else if(Z){var Sr="M"+(Vt-1-Ct)+","+(Ht-9-Ct)+"v18 h2 v-18 Z";Dt.attr("d",Sr)}else{var ia="M"+(Vt-9-Ct)+","+(Ht-1-Ct)+"h18 v2 h-18 Z";Dt.attr("d",ia)}}}function He(Ze){Ze.selectAll(".visual-cue").remove()}function $e(Ze,Je,Mt){var dt=Je.xref,Dt=Je.yref,Ct=k.getFromId(Mt,dt),Vt=k.getFromId(Mt,Dt),Ht="";dt!=="paper"&&!Ct.autorange&&(Ht+=dt),Dt!=="paper"&&!Vt.autorange&&(Ht+=Dt),a.setClipUrl(Ze,Ht?"clip"+Mt._fullLayout._uid+Ht:null,Mt)}}function u(I,N,R){return I.replace(f.segmentRE,function(B){var F=0,P=B.charAt(0),j=f.paramIsX[P],U=f.paramIsY[P],Z=f.numParams[P],Q=B.slice(1).replace(f.paramRE,function(re){return F>=Z||(j[F]?re=N(re):U[F]&&(re=R(re)),F++),re});return P+Q})}function A(I,N){if(S(I)){var R=N.node(),B=+R.getAttribute("data-index");if(B>=0){if(B===I._fullLayout._activeShapeIndex){b(I);return}I._fullLayout._activeShapeIndex=B,I._fullLayout._deactivateShape=b,i(I)}}}function b(I){if(S(I)){var N=I._fullLayout._activeShapeIndex;N>=0&&(n(I),delete I._fullLayout._activeShapeIndex,i(I))}}function z(I){if(S(I)){n(I);var N=I._fullLayout._activeShapeIndex,R=(I.layout||{}).shapes||[];if(N{let o=E(e),s=t.append("div").classed("plotly-cloud-dialog-box",!0);if(s.append("div").classed("plotly-cloud-dialog-title",!0).text(o.DIALOG_TITLE),n===x.plotlyServerURL){let g=s.append("div").classed("plotly-cloud-dialog-message",!0),f=new URL(n).origin,p=o.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),m=p[0],i=p[2],T=p[4];g.append("span").text(m),g.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",f).attr("target","_blank").text(i),g.append("span").text(T),g.append("div").classed("plotly-cloud-dialog-message--account",!0).text(o.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let g=new URL(n),f=g.hostname,p=g.origin,m=o.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),i=m[0],T=m[4],S=s.append("div").classed("plotly-cloud-dialog-message",!0);S.append("span").text(i),S.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",p).attr("target","_blank").text(f),S.append("span").text(T)}let c=s.append("div").classed("plotly-cloud-dialog-buttons",!0);c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(o.DIALOG_CANCEL).on("click",a),c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(o.DIALOG_CONFIRM).on("click",r)},l=(e,t,n)=>{let r=v.select(e._fullLayout._paperdiv.node());r.selectAll(".plotly-cloud-dialog").remove();let a=r.append("div").classed("plotly-cloud-dialog",!0),o=()=>{a.remove(),document.removeEventListener("keydown",s)},s=c=>{(c.key==="Escape"||c.keyCode===27)&&o()};document.addEventListener("keydown",s),a.on("click",()=>{v.event.target===a.node()&&o()}),k(e,a,t,()=>{o(),n()},o)};H.exports=l}}),Wb=Ee({"src/components/modebar/buttons.js"(J,H){"use strict";var v=Ri(),x=vl(),E=Xl(),k=zg(),l=Ug().eraseActiveShape,e=EM(),t=Vr(),n=t._,r=H.exports={};r.toImage={name:"toImage",title:function(_){var w=_._context.toImageButtonOptions||{},h=w.format||"png";return h==="png"?n(_,"Download plot as a PNG"):n(_,"Download plot")},icon:k.camera,click:function(_){var w=_._context.toImageButtonOptions,h={format:w.format||"png"};t.notifier(n(_,"Preparing image - this may take a few seconds"),"long",_),["filename","width","height","scale"].forEach(function(u){u in w&&(h[u]=w[u])}),v.call("downloadImage",_,h).then(function(u){t.notifier(n(_,"Image download succeeded")+" - "+u,"long",_)}).catch(function(){t.notifier(n(_,"Sorry, there was a problem downloading your image!"),"long",_)})}},r.downloadJson={name:"downloadJson",title:function(_){return n(_,"Download plot as JSON")},icon:k.curlybraces,click:function(_){v.call("downloadImage",_,{format:"full-json"}).then(function(w){t.notifier(n(_,"JSON download succeeded")+" - "+w,"long",_)}).catch(function(){t.notifier(n(_,"Sorry, there was a problem downloading your JSON file!"),"long",_)})}},r.sendChartToCloud={name:"sendChartToCloud",title:function(_){return n(_,"Share chart...")},icon:k.cloudupload,click:function(_){var w=(window.PLOTLYENV||{}).BASE_URL||_._context.plotlyServerURL;if(!w){console.error("No destination URL provided (plotlyServerURL is empty)");return}var h;try{h=new URL(w)}catch{console.error("Invalid plotlyServerURL: "+w);return}let u=["http:","https:"];if(!u.includes(h.protocol)){console.error(`Invalid protocol '${h.protocol}' in plotlyServerURL '${w}'. Must be one of: ${u.join(", ")}`);return}e(_,w,function(){x.sendDataToCloud(_,w)})}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(_){return n(_,"Zoom")},attr:"dragmode",val:"zoom",icon:k.zoombox,click:a},r.pan2d={name:"pan2d",_cat:"pan",title:function(_){return n(_,"Pan")},attr:"dragmode",val:"pan",icon:k.pan,click:a},r.select2d={name:"select2d",_cat:"select",title:function(_){return n(_,"Box Select")},attr:"dragmode",val:"select",icon:k.selectbox,click:a},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(_){return n(_,"Lasso Select")},attr:"dragmode",val:"lasso",icon:k.lasso,click:a},r.drawclosedpath={name:"drawclosedpath",title:function(_){return n(_,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:k.drawclosedpath,click:a},r.drawopenpath={name:"drawopenpath",title:function(_){return n(_,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:k.drawopenpath,click:a},r.drawline={name:"drawline",title:function(_){return n(_,"Draw line")},attr:"dragmode",val:"drawline",icon:k.drawline,click:a},r.drawrect={name:"drawrect",title:function(_){return n(_,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:k.drawrect,click:a},r.drawcircle={name:"drawcircle",title:function(_){return n(_,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:k.drawcircle,click:a},r.eraseshape={name:"eraseshape",title:function(_){return n(_,"Erase active shape")},icon:k.eraseshape,click:l},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(_){return n(_,"Zoom in")},attr:"zoom",val:"in",icon:k.zoom_plus,click:a},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(_){return n(_,"Zoom out")},attr:"zoom",val:"out",icon:k.zoom_minus,click:a},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(_){return n(_,"Autoscale")},attr:"zoom",val:"auto",icon:k.autoscale,click:a},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(_){return n(_,"Reset axes")},attr:"zoom",val:"reset",icon:k.home,click:a},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(_){return n(_,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:k.tooltip_basic,gravity:"ne",click:a},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(_){return n(_,"Compare data on hover")},attr:"hovermode",val:function(_){return _._fullLayout._isHoriz?"y":"x"},icon:k.tooltip_compare,gravity:"ne",click:a};function a(_,w){var h=w.currentTarget,u=h.getAttribute("data-attr"),A=h.getAttribute("data-val")||!0,b=_._fullLayout,z={},I=E.list(_,null,!0),N=b._cartesianSpikesEnabled,R,B;if(u==="zoom"){var F=A==="in"?.5:2,P=(1+F)/2,j=(1-F)/2,U,Z;for(B=0;B-K),[Z,Q]=F.invert(B.midPt),{minscale:re}=R.projection,ne=(h=R.projection.maxscale)!=null?h:1/0,oe=Math.min(re,ne),V=Math.max(re,ne),$=b==="in"?f*P:1/f*P;$>V?$=V:$$b});var Vg,Xb,$b,Zb=Da({"src/components/modebar/attributes.ts"(){"use strict";Vg=Wa(Yb()),Xb={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 *${Vg.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 *${Vg.default.foreButtons.join("*, *")}*.`].join(" ")}},$b=Xb}}),kM=Ee({"src/components/modebar/defaults.js"(J,H){"use strict";var v=Vr(),x=Qn(),E=xs(),k=(Zb(),tn(qg)).default;H.exports=function(e,t){var n=e.modebar||{},r=E.newContainer(t,"modebar");function a(s,c){return v.coerce(n,r,k,s,c)}a("orientation"),a("bgcolor",x.addOpacity(t.paper_bgcolor,.5));var o=x.contrast(x.rgb(t.modebar.bgcolor));a("color",x.addOpacity(o,.3)),a("activecolor",x.addOpacity(o,.7)),a("uirevision",t.uirevision),a("add"),a("remove")}}}),CM=Ee({"src/components/modebar/modebar.js"(J,H){"use strict";var v=Va(),x=mi(),E=Vr(),k=zg(),l=qi().version,e=new DOMParser;function t(o){this.container=o.container,this.element=document.createElement("div"),this.update(o.graphInfo,o.buttons),this.container.appendChild(this.element)}var n=t.prototype;n.update=function(o,s){this.graphInfo=o;var c=this.graphInfo._context,g=this.graphInfo._fullLayout,f="modebar-"+g._uid;this.element.setAttribute("id",f),this.element.setAttribute("role","toolbar"),this._uid=f,this.element.className="modebar modebar--custom",c.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),g.modebar.orientation==="v"&&(this.element.className+=" vertical",s=s.reverse());var p=g.modebar,m="#"+f+" .modebar-group";document.querySelectorAll(m).forEach(function(C){C.style.backgroundColor=p.bgcolor});var i=!this.hasButtons(s),T=this.hasLogo!==c.displaylogo,S=this.locale!==c.locale;if(this.locale=c.locale,(i||T||S)&&(this.removeAllButtons(),this.updateButtons(s),c.watermark||c.displaylogo)){var M=this.getLogo();c.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(),E.setStyleOnHover("#"+f+" .modebar-btn",".active",".icon path","fill: "+p.activecolor,"fill: "+p.color,this.element)},n.updateButtons=function(o){var s=this;this.buttons=o,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(c){var g=s.createGroup();c.forEach(function(f){var p=f.name;if(!p)throw new Error("must provide button 'name' in button config");if(s.buttonsNames.indexOf(p)!==-1)throw new Error("button name '"+p+"' is taken");s.buttonsNames.push(p);var m=s.createButton(f);s.buttonElements.push(m),g.appendChild(m)}),s.element.appendChild(g)})},n.createGroup=function(){var o=document.createElement("div");o.className="modebar-group";var s=this.graphInfo._fullLayout.modebar;return o.style.backgroundColor=s.bgcolor,o},n.createButton=function(o){var s=this,c=document.createElement("button");c.setAttribute("type","button"),c.setAttribute("rel","tooltip"),c.className="modebar-btn";var g=o.title;g===void 0?g=o.name:typeof g=="function"&&(g=g(this.graphInfo)),(g||g===0)&&(c.setAttribute("data-title",g),c.setAttribute("aria-label",g)),o.attr!==void 0&&c.setAttribute("data-attr",o.attr);var f=o.val;f!==void 0&&(typeof f=="function"&&(f=f(this.graphInfo)),c.setAttribute("data-val",f));var p=o.click;if(typeof p!="function")throw new Error("must provide button 'click' function in button config");c.addEventListener("click",function(i){o.click(s.graphInfo,i),s.updateActiveButton(i.currentTarget)}),c.setAttribute("data-toggle",o.toggle||!1),o.toggle&&v.select(c).classed("active",!0);var m=o.icon;return typeof m=="function"?c.appendChild(m()):c.appendChild(this.createIcon(m||k.question)),c.setAttribute("data-gravity",o.gravity||"n"),c},n.createIcon=function(o){var s=x(o.height)?Number(o.height):o.ascent-o.descent,c="http://www.w3.org/2000/svg",g;if(o.path){g=document.createElementNS(c,"svg"),g.setAttribute("viewBox",[0,0,o.width,s].join(" ")),g.setAttribute("class","icon");var f=document.createElementNS(c,"path");f.setAttribute("d",o.path),o.transform?f.setAttribute("transform",o.transform):o.ascent!==void 0&&f.setAttribute("transform","matrix(1 0 0 -1 0 "+o.ascent+")"),g.appendChild(f)}if(o.svg){var p=e.parseFromString(o.svg,"application/xml");g=p.childNodes[0]}return g.setAttribute("height","1em"),g.setAttribute("width","1em"),g},n.updateActiveButton=function(o){var s=this.graphInfo._fullLayout,c=o!==void 0?o.getAttribute("data-attr"):null;this.buttonElements.forEach(function(g){var f=g.getAttribute("data-val")||!0,p=g.getAttribute("data-attr"),m=g.getAttribute("data-toggle")==="true",i=v.select(g),T=function(C,_){var w=s.modebar,h=C.querySelector(".icon path");h&&(_||C.matches(":hover")?h.style.fill=w.activecolor:h.style.fill=w.color)};if(m){if(p===c){var S=!i.classed("active");i.classed("active",S),T(g,S)}}else{var M=p===null?p:E.nestedProperty(s,p).get();i.classed("active",M===f),T(g,M===f)}})},n.hasButtons=function(o){var s=this.buttons;if(!s||o.length!==s.length)return!1;for(var c=0;c1?(re=["toggleHover"],ne=["resetViews"]):u?(Q=["zoomInGeo","zoomOutGeo"],re=["hoverClosestGeo"],ne=["resetGeo"]):h?(re=["hoverClosest3d"],ne=["resetCameraDefault3d","resetCameraLastSave3d"]):I?(Q=["zoomInMap","zoomOutMap"],re=["toggleHover"],ne=["resetViewMap"]):A?re=["hoverClosestPie"]:B?(re=["hoverClosestCartesian","hoverCompareCartesian"],ne=["resetViewSankey"]):re=["toggleHover"],w&&re.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(m)||P)&&(re=[]),w&&!F&&(Q=["zoomIn2d","zoomOut2d","autoScale2d"],ne[0]!=="resetViews"&&(ne=["resetScale2d"])),h?oe=["zoom3d","pan3d","orbitRotation","tableRotation"]:w&&!F||z?oe=["zoom2d","pan2d"]:I||u?oe=["pan2d"]:N&&(oe=["zoom2d"]),o(m)&&oe.push("select2d","lasso2d");var V=[],$=function(W){V.indexOf(W)===-1&&re.indexOf(W)!==-1&&V.push(W)};if(Array.isArray(C)){for(var K=[],G=0;GS?m.slice(S):i.slice(T))+M}function c(f,p){for(var m=p._size,i=m.h/m.w,T={},S=Object.keys(f),M=0;Me*z&&!B)){for(S=0;SV&&aene&&(ne=ae);var ye=(ne-re)/(2*oe);u/=ye,re=_.l2r(re),ne=_.l2r(ne),_.range=_._input.range=U=F[1]||Z[1]<=F[0])&&Q[0]P[0])return!0}return!1}function M(F){var P=F._fullLayout,j=P._size,U=j.p,Z=a.list(F,"",!0),Q,re,ne,oe,V,$;if(P._paperdiv.style({width:F._context.responsive&&P.autosize&&!F._context._hasZeroWidth&&!F.layout.width?"100%":P.width+"px",height:F._context.responsive&&P.autosize&&!F._context._hasZeroHeight&&!F.layout.height?"100%":P.height+"px"}).selectAll(".main-svg").call(t.setSize,P.width,P.height),F._context.setBackground(F,P.paper_bgcolor),J.drawMainTitle(F),r.manage(F),!P._has("cartesian"))return x.previousPromises(F);function K(Re,Be,He){var $e=Re._lw/2;if(Re._id.charAt(0)==="x"){if(Be){if(He==="top")return Be._offset-U-$e}else return j.t+j.h*(1-(Re.position||0))+$e%1;return Be._offset+Be._length+U+$e}if(Be){if(He==="right")return Be._offset+Be._length+U+$e}else return j.l+j.w*(Re.position||0)+$e%1;return Be._offset-U-$e}for(Q=0;Q0){b(F,Q,V,oe),ne.attr({x:re,y:Q,"text-anchor":U,dy:N(P.yanchor)}).call(k.positionText,re,Q);var $=(P.text.match(k.BR_TAG_ALL)||[]).length;if($){var K=o.LINE_SPACING*$+o.MID_SHIFT;P.y===0&&(K=-K),ne.selectAll(".line").each(function(){var ee=+this.getAttribute("dy").slice(0,-2)-K+"em";this.setAttribute("dy",ee)})}var G=H.select(F).selectAll(".gtitle-subtitle");if(G.node()){var X=ne.node().getBBox(),q=X.y+X.height,W=q+n.SUBTITLE_PADDING_EM*P.subtitle.font.size;G.attr({x:re,y:W,"text-anchor":U,dy:N(P.yanchor)}).call(k.positionText,re,W)}}}};function h(F,P,j,U,Z){var Q=P.yref==="paper"?F._fullLayout._size.h:F._fullLayout.height,re=E.isTopAnchor(P)?U:U-Z,ne=j==="b"?Q-re:re;return E.isTopAnchor(P)&&j==="t"||E.isBottomAnchor(P)&&j==="b"?!1:ne.5?"t":"b",re=F._fullLayout.margin[Q],ne=0;return P.yref==="paper"?ne=j+P.pad.t+P.pad.b:P.yref==="container"&&(ne=u(Q,U,Z,F._fullLayout.height,j)+P.pad.t+P.pad.b),ne>re?ne:0}function b(F,P,j,U){var Z="title.automargin",Q=F._fullLayout.title,re=Q.y>.5?"t":"b",ne={x:Q.x,y:Q.y,t:0,b:0},oe={};Q.yref==="paper"&&h(F,Q,re,P,U)?ne[re]=j:Q.yref==="container"&&(oe[re]=j,F._fullLayout._reservedMargin[Z]=oe),x.allowAutoMargin(F,Z),x.autoMargin(F,Z,ne)}function z(F,P){var j=F.title,U=F._size,Z=0;switch(P===p?Z=j.pad.l:P===i&&(Z=-j.pad.r),j.xref){case"paper":return U.l+U.w*j.x+Z;case"container":default:return F.width*j.x+Z}}function I(F,P){var j=F.title,U=F._size,Z=0;if(P==="0em"||!P?Z=-j.pad.b:P===o.CAP_SHIFT+"em"&&(Z=j.pad.t),j.y==="auto")return U.t/2;switch(j.yref){case"paper":return U.t+U.h-U.h*j.y+Z;case"container":default:return F.height-F.height*j.y+Z}}function N(F){return F==="top"?o.CAP_SHIFT+.3+"em":F==="bottom"?"-0.3em":o.MID_SHIFT+"em"}function R(F){var P=F.title,j=m;return E.isRightAnchor(P)?j=i:E.isLeftAnchor(P)&&(j=p),j}function B(F){var P=F.title,j="0em";return E.isTopAnchor(P)?j=o.CAP_SHIFT+"em":E.isMiddleAnchor(P)&&(j=o.MID_SHIFT+"em"),j}J.doTraceStyle=function(F){var P=F.calcdata,j=[],U;for(U=0;U=0;R--){var B=C.append("path").attr(w).style("opacity",R?.1:h).call(k.stroke,A).call(k.fill,u).call(l.dashLine,R?"solid":z,R?4+b:b);if(s(B,p,T),I){var F=e(p.layout,"selections",T);B.style({cursor:"move"});var P={element:B.node(),plotinfo:S,gd:p,editHelpers:F,isActiveSelection:!0},j=v(_,p);x(j,B,P)}else B.style("pointer-events",R?"all":"none");N[R]=B}var U=N[0],Z=N[1];Z.node().addEventListener("click",function(){return c(p,U)})}}function s(p,m,i){var T=i.xref+i.yref;l.setClipUrl(p,"clip"+m._fullLayout._uid+T,m)}function c(p,m){if(a(p)){var i=m.node(),T=+i.getAttribute("data-index");if(T>=0){if(T===p._fullLayout._activeSelectionIndex){f(p);return}p._fullLayout._activeSelectionIndex=T,p._fullLayout._deactivateSelection=f,r(p)}}}function g(p){if(a(p)){var m=p._fullLayout.selections.length-1;p._fullLayout._activeSelectionIndex=m,p._fullLayout._deactivateSelection=f,r(p)}}function f(p){if(a(p)){var m=p._fullLayout._activeSelectionIndex;m>=0&&(E(p),delete p._fullLayout._activeSelectionIndex,r(p))}}}}),PM=Ee({"node_modules/polybooljs/lib/build-log.js"(J,H){function v(){var x,E=0,k=!1;function l(e,t){return x.list.push({type:e,data:t?JSON.parse(JSON.stringify(t)):void 0}),x}return x={list:[],segmentId:function(){return E++},checkIntersection:function(e,t){return l("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return l("div_seg",{seg:e,pt:t}),l("chop",{seg:e,pt:t})},statusRemove:function(e){return l("pop_seg",{seg:e})},segmentUpdate:function(e){return l("seg_update",{seg:e})},segmentNew:function(e,t){return l("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return l("rem_seg",{seg:e})},tempStatus:function(e,t,n){return l("temp_status",{seg:e,above:t,below:n})},rewind:function(e){return l("rewind",{seg:e})},status:function(e,t,n){return l("status",{seg:e,above:t,below:n})},vert:function(e){return e===k?x:(k=e,l("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),l("log",{txt:e})},reset:function(){return l("reset")},selected:function(e){return l("selected",{segs:e})},chainStart:function(e){return l("chain_start",{seg:e})},chainRemoveHead:function(e,t){return l("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return l("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return l("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return l("chain_match",{index:e})},chainClose:function(e){return l("chain_close",{index:e})},chainAddHead:function(e,t){return l("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return l("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return l("chain_con",{index1:e,index2:t})},chainReverse:function(e){return l("chain_rev",{index:e})},chainJoin:function(e,t){return l("chain_join",{index1:e,index2:t})},done:function(){return l("done")}},x}H.exports=v}}),DM=Ee({"node_modules/polybooljs/lib/epsilon.js"(J,H){function v(x){typeof x!="number"&&(x=1e-10);var E={epsilon:function(k){return typeof k=="number"&&(x=k),x},pointAboveOrOnLine:function(k,l,e){var t=l[0],n=l[1],r=e[0],a=e[1],o=k[0],s=k[1];return(r-t)*(s-n)-(a-n)*(o-t)>=-x},pointBetween:function(k,l,e){var t=k[1]-l[1],n=e[0]-l[0],r=k[0]-l[0],a=e[1]-l[1],o=r*n+t*a;if(o-x)},pointsSameX:function(k,l){return Math.abs(k[0]-l[0])x!=r-t>x&&(n-s)*(t-c)/(r-c)+s-e>x&&(a=!a),n=s,r=c}return a}};return E}H.exports=v}}),IM=Ee({"node_modules/polybooljs/lib/linked-list.js"(J,H){var v={create:function(){var x={root:{root:!0,next:null},exists:function(E){return!(E===null||E===x.root)},isEmpty:function(){return x.root.next===null},getHead:function(){return x.root.next},insertBefore:function(E,k){for(var l=x.root,e=x.root.next;e!==null;){if(k(e)){E.prev=e.prev,E.next=e,e.prev.next=E,e.prev=E;return}l=e,e=e.next}l.next=E,E.prev=l,E.next=null},findTransition:function(E){for(var k=x.root,l=x.root.next;l!==null&&!E(l);)k=l,l=l.next;return{before:k===x.root?null:k,after:l,insert:function(e){return e.prev=k,e.next=l,k.next=e,l!==null&&(l.prev=e),e}}}};return x},node:function(x){return x.prev=null,x.next=null,x.remove=function(){x.prev.next=x.next,x.next&&(x.next.prev=x.prev),x.prev=null,x.next=null},x}};H.exports=v}}),RM=Ee({"node_modules/polybooljs/lib/intersecter.js"(J,H){var v=IM();function x(E,k,l){function e(m,i){return{id:l?l.segmentId():-1,start:m,end:i,myFill:{above:null,below:null},otherFill:null}}function t(m,i,T){return{id:l?l.segmentId():-1,start:m,end:i,myFill:{above:T.myFill.above,below:T.myFill.below},otherFill:null}}var n=v.create();function r(m,i,T,S,M,C){var _=k.pointsCompare(i,M);return _!==0?_:k.pointsSame(T,C)?0:m!==S?m?1:-1:k.pointAboveOrOnLine(T,S?M:C,S?C:M)?1:-1}function a(m,i){n.insertBefore(m,function(T){var S=r(m.isStart,m.pt,i,T.isStart,T.pt,T.other.pt);return S<0})}function o(m,i){var T=v.node({isStart:!0,pt:m.start,seg:m,primary:i,other:null,status:null});return a(T,m.end),T}function s(m,i,T){var S=v.node({isStart:!1,pt:i.end,seg:i,primary:T,other:m,status:null});m.other=S,a(S,m.pt)}function c(m,i){var T=o(m,i);return s(T,m,i),T}function g(m,i){l&&l.segmentChop(m.seg,i),m.other.remove(),m.seg.end=i,m.other.pt=i,a(m.other,m.pt)}function f(m,i){var T=t(i,m.seg.end,m.seg);return g(m,i),c(T,m.primary)}function p(m,i){var T=v.create();function S(F,P){var j=F.seg.start,U=F.seg.end,Z=P.seg.start,Q=P.seg.end;return k.pointsCollinear(j,Z,Q)?k.pointsCollinear(U,Z,Q)||k.pointAboveOrOnLine(U,Z,Q)?1:-1:k.pointAboveOrOnLine(j,Z,Q)?1:-1}function M(F){return T.findTransition(function(P){var j=S(F,P.ev);return j>0})}function C(F,P){var j=F.seg,U=P.seg,Z=j.start,Q=j.end,re=U.start,ne=U.end;l&&l.checkIntersection(j,U);var oe=k.linesIntersect(Z,Q,re,ne);if(oe===!1){if(!k.pointsCollinear(Z,Q,re)||k.pointsSame(Z,ne)||k.pointsSame(Q,re))return!1;var V=k.pointsSame(Z,re),$=k.pointsSame(Q,ne);if(V&&$)return P;var K=!V&&k.pointBetween(Z,re,ne),G=!$&&k.pointBetween(Q,re,ne);if(V)return G?f(P,Q):f(F,ne),P;K&&($||(G?f(P,Q):f(F,ne)),f(P,Z))}else oe.alongA===0&&(oe.alongB===-1?f(F,re):oe.alongB===0?f(F,oe.pt):oe.alongB===1&&f(F,ne)),oe.alongB===0&&(oe.alongA===-1?f(P,Z):oe.alongA===0?f(P,oe.pt):oe.alongA===1&&f(P,Q));return!1}for(var _=[];!n.isEmpty();){var w=n.getHead();if(l&&l.vert(w.pt[0]),w.isStart){let F=function(){if(A){var P=C(w,A);if(P)return P}return b?C(w,b):!1};var h=F;l&&l.segmentNew(w.seg,w.primary);var u=M(w),A=u.before?u.before.ev:null,b=u.after?u.after.ev:null;l&&l.tempStatus(w.seg,A?A.seg:!1,b?b.seg:!1);var z=F();if(z){if(E){var I;w.seg.myFill.below===null?I=!0:I=w.seg.myFill.above!==w.seg.myFill.below,I&&(z.seg.myFill.above=!z.seg.myFill.above)}else z.seg.otherFill=w.seg.myFill;l&&l.segmentUpdate(z.seg),w.other.remove(),w.remove()}if(n.getHead()!==w){l&&l.rewind(w.seg);continue}if(E){var I;w.seg.myFill.below===null?I=!0:I=w.seg.myFill.above!==w.seg.myFill.below,b?w.seg.myFill.below=b.seg.myFill.above:w.seg.myFill.below=m,I?w.seg.myFill.above=!w.seg.myFill.below:w.seg.myFill.above=w.seg.myFill.below}else if(w.seg.otherFill===null){var N;b?w.primary===b.primary?N=b.seg.otherFill.above:N=b.seg.myFill.above:N=w.primary?i:m,w.seg.otherFill={above:N,below:N}}l&&l.status(w.seg,A?A.seg:!1,b?b.seg:!1),w.other.status=u.insert(v.node({ev:w}))}else{var R=w.status;if(R===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(T.exists(R.prev)&&T.exists(R.next)&&C(R.prev.ev,R.next.ev),l&&l.statusRemove(R.ev.seg),R.remove(),!w.primary){var B=w.seg.myFill;w.seg.myFill=w.seg.otherFill,w.seg.otherFill=B}_.push(w.seg)}n.getHead().remove()}return l&&l.done(),_}return E?{addRegion:function(m){for(var i,T=m[m.length-1],S=0;St!=f>t&&e<(g-s)*(t-c)/(f-c)+s;p&&(n=!n)}return n}}}),Y0=Ee({"src/lib/polygon.js"(J,H){"use strict";var v=kg().dot,x=Qi().BADNUM,E=H.exports={};E.tester=function(l){var e=l.slice(),t=e[0][0],n=t,r=e[0][1],a=r,o;for((e[e.length-1][0]!==e[0][0]||e[e.length-1][1]!==e[0][1])&&e.push(e[0]),o=1;on||M===x||Ma||T&&c(i))}function f(i,T){var S=i[0],M=i[1];if(S===x||Sn||M===x||Ma)return!1;var C=e.length,_=e[0][0],w=e[0][1],h=0,u,A,b,z,I;for(u=1;uMath.max(A,_)||M>Math.max(b,w)))if(Mo||Math.abs(v(f,c))>n)return!0;return!1},E.filter=function(l,e){var t=[l[0]],n=0,r=0;function a(s){l.push(s);var c=t.length,g=n;t.splice(r+1);for(var f=g+1;f1){var o=l.pop();a(o)}return{addPt:a,raw:l,filtered:t}}}}),jM=Ee({"src/components/selections/constants.js"(J,H){"use strict";H.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),UM=Ee({"src/components/selections/select.js"(J,H){"use strict";var v=NM(),x=OM(),E=Ri(),k=mo().dashStyle,l=Qn(),e=$l(),t=Qf().makeEventData,n=Gh(),r=n.freeMode,a=n.rectMode,o=n.drawMode,s=n.openMode,c=n.selectMode,g=Zd(),f=G0(),p=jg(),m=Gd().clearOutline,i=$d(),T=i.handleEllipse,S=i.readPaths,M=Og().newShapes,C=Hb(),_=Qb().activateLastSelection,w=Vr(),h=w.sorterAsc,u=Y0(),A=Dg(),b=Xl().getFromId,z=H0(),I=W0().redrawReglTraces,N=jM(),R=N.MINSELECT,B=u.filter,F=u.tester,P=Ng(),j=P.p2r,U=P.axValue,Z=P.getTransform;function Q(vt){return vt.subplot!==void 0}function re(vt,ht,Re,Be,He){var $e=!Q(Be),Ze=r(He),Je=a(He),Mt=s(He),dt=o(He),Dt=c(He),Ct=He==="drawline",Vt=He==="drawcircle",Ht=Ct||Vt,Wt=Be.gd,Sr=Wt._fullLayout,ia=Dt&&Sr.newselection.mode==="immediate"&&$e,$t=Sr._zoomlayer,It=Be.element.getBoundingClientRect(),ir=Be.plotinfo,cr=Z(ir),fr=ht-It.left,Ir=Re-It.top;Sr._calcInverseTransform(Wt);var sa=w.apply3DTransform(Sr._invTransform)(fr,Ir);fr=sa[0],Ir=sa[1];var aa=Sr._invScaleX,xa=Sr._invScaleY,ja=fr,Oa=Ir,An="M"+fr+","+Ir,un=Be.xaxes[0],Ja=Be.yaxes[0],ei=un._length,Fn=Ja._length,ni=vt.altKey&&!(o(He)&&Mt),Mi,ci,bn,pn,Ii,ho,dn;G(vt,Wt,Be),Ze&&(Mi=B([[fr,Ir]],N.BENDPX));var Za=$t.selectAll("path.select-outline-"+ir.id).data([1]),ot=dt?Sr.newshape:Sr.newselection;dt&&(Be.hasText=ot.label.text||ot.label.texttemplate);var et=dt&&!Mt?ot.fillcolor:"rgba(0,0,0,0)",hr=ot.line.color||($e?l.contrast(Wt._fullLayout.plot_bgcolor):"#7f7f7f");Za.enter().append("path").attr("class","select-outline select-outline-"+ir.id).style({opacity:dt?ot.opacity/2:1,"stroke-dasharray":k(ot.line.dash,ot.line.width),"stroke-width":ot.line.width+"px","shape-rendering":"crispEdges"}).call(l.stroke,hr).call(l.fill,et).attr("fill-rule","evenodd").classed("cursor-move",!!dt).attr("transform",cr).attr("d",An+"Z");var ur=$t.append("path").attr("class","zoombox-corners").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1}).attr("transform",cr).attr("d","M0,0Z");if(dt&&Be.hasText){var Tr=$t.select(".label-temp");Tr.empty()&&(Tr=$t.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Rr=Sr._uid+N.SELECTID,Fr=[],nt=ae(Wt,Be.xaxes,Be.yaxes,Be.subplot);ia&&!vt.shiftKey&&(Be._clearSubplotSelections=function(){if($e){var Ut=un._id,nr=Ja._id;We(Wt,Ut,nr,nt);for(var Er=(Wt.layout||{}).selections||[],br=[],Or=!1,Pr=0;Pr=0){Wt._fullLayout._deactivateShape(Wt);return}if(!dt){var Er=Sr.clickmode;A.done(Rr).then(function(){if(A.clear(Rr),Ut===2){for(Za.remove(),Ii=0;Ii-1&&ne(nr,Wt,Be.xaxes,Be.yaxes,Be.subplot,Be,Za),Er==="event"&&sr(Wt,void 0);e.click(Wt,nr,ir.id)}).catch(w.error)}},Be.doneFn=function(){ur.remove(),A.done(Rr).then(function(){A.clear(Rr),!ia&&pn&&Be.selectionDefs&&(pn.subtract=ni,Be.selectionDefs.push(pn),Be.mergedPolygons.length=0,[].push.apply(Be.mergedPolygons,bn)),(ia||dt)&&W(Be,ia),Be.doneFnCompleted&&Be.doneFnCompleted(Fr),Dt&&sr(Wt,dn)}).catch(w.error)}}function ne(vt,ht,Re,Be,He,$e,Ze){var Je=ht._hoverdata,Mt=ht._fullLayout,dt=Mt.clickmode,Dt=dt.indexOf("event")>-1,Ct=[],Vt,Ht,Wt,Sr,ia,$t,It,ir,cr,fr;if(ye(Je)){G(vt,ht,$e),Vt=ae(ht,Re,Be,He);var Ir=xe(Je,Vt),sa=Ir.pointNumbers.length>0;if(sa?Me(Vt,Ir):Ie(Vt)&&(It=Ae(Ir))){for(Ze&&Ze.remove(),fr=0;fr=0}function q(vt){return vt._fullLayout._activeSelectionIndex>=0}function W(vt,ht){var Re=vt.dragmode,Be=vt.plotinfo,He=vt.gd;X(He)&&He._fullLayout._deactivateShape(He),q(He)&&He._fullLayout._deactivateSelection(He);var $e=He._fullLayout,Ze=$e._zoomlayer,Je=o(Re),Mt=c(Re);if(Je||Mt){var dt=Ze.selectAll(".select-outline-"+Be.id);if(dt&&He._fullLayout._outlining){var Dt;Je&&(Dt=M(dt,vt)),Dt&&E.call("_guiRelayout",He,{shapes:Dt});var Ct;Mt&&!Q(vt)&&(Ct=C(dt,vt)),Ct&&(He._fullLayout._noEmitSelectedAtStart=!0,E.call("_guiRelayout",He,{selections:Ct}).then(function(){ht&&_(He)})),He._fullLayout._outlining=!1}}Be.selection={},Be.selection.selectionDefs=vt.selectionDefs=[],Be.selection.mergedPolygons=vt.mergedPolygons=[]}function ee(vt){return vt._id}function ae(vt,ht,Re,Be){if(!vt.calcdata)return[];var He=[],$e=ht.map(ee),Ze=Re.map(ee),Je,Mt,dt;for(dt=0;dt0,$e=He?Be[0]:Re;return ht.selectedpoints?ht.selectedpoints.indexOf($e)>-1:!1}function Me(vt,ht){var Re=[],Be,He,$e,Ze;for(Ze=0;Ze0&&Re.push(Be);if(Re.length===1&&($e=Re[0]===ht.searchInfo,$e&&(He=ht.searchInfo.cd[0].trace,He.selectedpoints.length===ht.pointNumbers.length))){for(Ze=0;Ze1||(ht+=Be.selectedpoints.length,ht>1)))return!1;return ht===1}function qe(vt,ht,Re){var Be,He;for(Be=0;Be-1&&ht;if(!Ze&&ht){var Ut=gt(vt,!0);if(Ut.length){var nr=Ut[0].xref,Er=Ut[0].yref;if(nr&&Er){var br=At(Ut),Or=ar([b(vt,nr,"x"),b(vt,Er,"y")]);Or(Fr,br)}}vt._fullLayout._noEmitSelectedAtStart?vt._fullLayout._noEmitSelectedAtStart=!1:kt&&sr(vt,Fr),Vt._reselect=!1}if(!Ze&&Vt._deselect){var Pr=Vt._deselect;Je=Pr.xref,Mt=Pr.yref,Fe(Je,Mt,Dt)||We(vt,Je,Mt,Be),kt&&(Fr.points.length?sr(vt,Fr):Ot(vt)),Vt._deselect=!1}return{eventData:Fr,selectionTesters:Re}}function Te(vt){var ht=vt.calcdata;if(ht)for(var Re=0;Re=0){ot._fullLayout._deactivateShape(ot);return}var et=ot._fullLayout.clickmode;if(V(ot),dn===2&&!ge&&Mi(),ke)et.indexOf("select")>-1&&w(Za,ot,Fe,We,fe.id,dt),et.indexOf("event")>-1&&a.click(ot,Za,fe.id);else if(dn===1&&ge){var hr=Ie?ve:le,ur=Ie==="s"||qe==="w"?0:1,Tr=hr._name+".range["+ur+"]",Rr=F(hr,ur),Fr="left",nt="middle";if(hr.fixedrange)return;Ie?(nt=Ie==="n"?"top":"bottom",hr.side==="right"&&(Fr="right")):qe==="e"&&(Fr="right"),ot._context.showAxisRangeEntryBoxes&&v.select(Mt).call(t.makeEditable,{gd:ot,immediate:!0,background:ot._fullLayout.paper_bgcolor,text:String(Rr),fill:hr.tickfont?hr.tickfont.color:"#444",horizontalAlign:Fr,verticalAlign:nt}).on("edit",function(kt){var Ut=hr.d2r(kt);Ut!==void 0&&l.call("_guiRelayout",ot,Tr,Ut)})}}c.init(dt);var Vt,Ht,Wt,Sr,ia,$t,It,ir,cr,fr;function Ir(dn,Za,ot){var et=Mt.getBoundingClientRect();Vt=Za-et.left,Ht=ot-et.top,ae._fullLayout._calcInverseTransform(ae);var hr=x.apply3DTransform(ae._fullLayout._invTransform)(Vt,Ht);Vt=hr[0],Ht=hr[1],Wt={l:Vt,r:Vt,w:0,t:Ht,b:Ht,h:0},Sr=ae._hmpixcount?ae._hmlumcount/ae._hmpixcount:n.luminosity(ae._fullLayout.plot_bgcolor),ia="M0,0H"+mt+"V"+Tt+"H0V0",$t=!1,It="xy",fr=!1,ir=Q(je,Sr,Ge,gt,ia),cr=re(je,Ge,gt)}function sa(dn,Za){if(ae._transitioningWithDuration)return!1;var ot=Math.max(0,Math.min(mt,He*dn+Vt)),et=Math.max(0,Math.min(Tt,$e*Za+Ht)),hr=Math.abs(ot-Vt),ur=Math.abs(et-Ht);Wt.l=Math.min(Vt,ot),Wt.r=Math.max(Vt,ot),Wt.t=Math.min(Ht,et),Wt.b=Math.max(Ht,et);function Tr(){It="",Wt.r=Wt.l,Wt.t=Wt.b,cr.attr("d","M0,0Z")}if(At.isSubplotConstrained)hr>b||ur>b?(It="xy",hr/mt>ur/Tt?(ur=hr*Tt/mt,Ht>et?Wt.t=Ht-ur:Wt.b=Ht+ur):(hr=ur*mt/Tt,Vt>ot?Wt.l=Vt-hr:Wt.r=Vt+hr),cr.attr("d",X(Wt))):Tr();else if(Kt.isSubplotConstrained)if(hr>b||ur>b){It="xy";var Rr=Math.min(Wt.l/mt,(Tt-Wt.b)/Tt),Fr=Math.max(Wt.r/mt,(Tt-Wt.t)/Tt);Wt.l=Rr*mt,Wt.r=Fr*mt,Wt.b=(1-Rr)*Tt,Wt.t=(1-Fr)*Tt,cr.attr("d",X(Wt))}else Tr();else!_r||ur0){var kt;if(Kt.isSubplotConstrained||!ar&&_r.length===1){for(kt=0;kt1&&(Tr.maxallowed!==void 0&&sr===(Tr.range[0]1&&(Rr.maxallowed!==void 0&&Ot===(Rr.range[0]=0?Math.min(ae,.9):1/(1/Math.max(ae,-.3)+3.222))}function Z(ae,fe,ye){return ae?ae==="nsew"?ye?"":fe==="pan"?"move":"crosshair":ae.toLowerCase()+"-resize":"pointer"}function Q(ae,fe,ye,xe,Ae){return ae.append("path").attr("class","zoombox").style({fill:fe>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",e(ye,xe)).attr("d",Ae+"Z")}function re(ae,fe,ye){return ae.append("path").attr("class","zoombox-corners").style({fill:n.background,stroke:n.defaultLine,"stroke-width":1,opacity:0}).attr("transform",e(fe,ye)).attr("d","M0,0Z")}function ne(ae,fe,ye,xe,Ae,Me){ae.attr("d",xe+"M"+ye.l+","+ye.t+"v"+ye.h+"h"+ye.w+"v-"+ye.h+"h-"+ye.w+"Z"),oe(ae,fe,Ae,Me)}function oe(ae,fe,ye,xe){ye||(ae.transition().style("fill",xe>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),fe.transition().style("opacity",1).duration(200))}function V(ae){v.select(ae).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function $(ae){z&&ae.data&&ae._context.showTips&&(x.notifier(x._(ae,"Double-click to zoom back out"),"long",ae),z=!1)}function K(ae,fe){return"M"+(ae.l-.5)+","+(fe-b-.5)+"h-3v"+(2*b+1)+"h3ZM"+(ae.r+.5)+","+(fe-b-.5)+"h3v"+(2*b+1)+"h-3Z"}function G(ae,fe){return"M"+(fe-b-.5)+","+(ae.t-.5)+"v-3h"+(2*b+1)+"v3ZM"+(fe-b-.5)+","+(ae.b+.5)+"v3h"+(2*b+1)+"v-3Z"}function X(ae){var fe=Math.floor(Math.min(ae.b-ae.t,ae.r-ae.l,b)/2);return"M"+(ae.l-3.5)+","+(ae.t-.5+fe)+"h3v"+-fe+"h"+fe+"v-3h-"+(fe+3)+"ZM"+(ae.r+3.5)+","+(ae.t-.5+fe)+"h-3v"+-fe+"h"+-fe+"v-3h"+(fe+3)+"ZM"+(ae.r+3.5)+","+(ae.b+.5-fe)+"h-3v"+fe+"h"+-fe+"v3h"+(fe+3)+"ZM"+(ae.l-3.5)+","+(ae.b+.5-fe)+"h3v"+fe+"h"+fe+"v3h-"+(fe+3)+"Z"}function q(ae,fe,ye,xe,Ae){for(var Me=!1,Ie={},qe={},je,ke,ge,le,ve=(Ae||{}).xaHash,se=(Ae||{}).yaHash,Te=0;Te1&&x.warn("Full array edits are incompatible with other edits",c);var S=a[""][""];if(e(S))r.set(null);else if(Array.isArray(S))r.set(S);else return x.warn("Unrecognized full array edit value",c,S),!0;return m?!1:(g(i,T),f(n),!0)}var M=Object.keys(a).map(Number).sort(E),C=r.get(),_=C||[],w=s(T,c).get(),h=[],u=-1,A=_.length,b,z,I,N,R,B,F,P;for(b=0;b_.length-(F?0:1)){x.warn("index out of range",c,I);continue}if(B!==void 0)R.length>1&&x.warn("Insertion & removal are incompatible with edits to the same index.",c,I),e(B)?h.push(I):F?(B==="add"&&(B={}),_.splice(I,0,B),w&&w.splice(I,0,{})):x.warn("Unrecognized full object edit value",c,I,B),u===-1&&(u=I);else for(z=0;z=0;b--)_.splice(h[b],1),w&&w.splice(h[b],1);if(_.length?C||r.set(_):r.set(null),m)return!1;if(g(i,T),p!==v){var j;if(u===-1)j=M;else{for(A=Math.max(_.length,A),j=[],b=0;b=u));b++)j.push(I);for(b=u;b0&&x.log("Clearing previous rejected promises from queue."),m._promises=[]},J.cleanLayout=function(m){var i,T;m||(m={}),m.xaxis1&&(m.xaxis||(m.xaxis=m.xaxis1),delete m.xaxis1),m.yaxis1&&(m.yaxis||(m.yaxis=m.yaxis1),delete m.yaxis1),m.scene1&&(m.scene||(m.scene=m.scene1),delete m.scene1);var S=(E.subplotsRegistry.cartesian||{}).attrRegex,M=(E.subplotsRegistry.polar||{}).attrRegex,C=(E.subplotsRegistry.ternary||{}).attrRegex,_=(E.subplotsRegistry.gl3d||{}).attrRegex,w=Object.keys(m);for(i=0;i3?(B.x=1.02,B.xanchor="left"):B.x<-2&&(B.x=-.02,B.xanchor="right"),B.y>3?(B.y=1.02,B.yanchor="bottom"):B.y<-2&&(B.y=-.02,B.yanchor="top")),m.dragmode==="rotate"&&(m.dragmode="orbit"),m.template&&m.template.layout&&J.cleanLayout(m.template.layout),m};function r(m,i,T=!1){var S=m[i],M=i.charAt(0);T&&Array.isArray(S)||S&&S!=="paper"&&(m[i]=l(S,M,!0))}J.cleanData=function(m){for(var i=0;i0)return m.slice(0,i)}J.hasParent=function(m,i){for(var T=f(i);T;){if(T in m)return!0;T=f(T)}return!1},J.clearAxisTypes=function(m,i,T){for(var S=0;S{let T=(...S)=>S.every(M=>x.isPlainObject(M))||S.every(M=>Array.isArray(M));if([m,i].every(S=>Array.isArray(S))){if(m.length!==i.length)return!1;for(let S=0;Sx.isPlainObject(S))){if(Object.keys(m).length!==Object.keys(i).length)return!1;for(let S in m){if(S.startsWith("_"))continue;let M=m[S],C=i[S];if(M!==C&&!(T(M,C)?p(M,C):!1))return!1}return!0}return!1};J.collectionsAreEqual=p}}),Hg=Ee({"src/plot_api/plot_api.js"(J){"use strict";var H=Va(),v=mi(),x=Sb(),E=Vr(),k=E.nestedProperty,l=zp(),e=uM(),t=Ri(),n=Bp(),r=vl(),a=uo(),o=Fb(),s=Gc(),c=mo(),g=Qn(),f=ax().initInteractions,p=mh(),m=uc().clearOutline,i=Rn().dfltConfig,T=GM(),S=WM(),M=W0(),C=El(),_=tc().AX_NAME_PATTERN,w=0,h=5;function u(Re,Be,He,$e){var Ze;if(Re=E.getGraphDiv(Re),l.init(Re),E.isPlainObject(Be)){var Je=Be;Be=Je.data,He=Je.layout,$e=Je.config,Ze=Je.frames}var Mt=l.triggerHandler(Re,"plotly_beforeplot",[Be,He,$e]);if(Mt===!1)return Promise.reject();!Be&&!He&&!E.isPlotDiv(Re)&&E.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",Re);function dt(){if(Ze)return J.addFrames(Re,Ze)}N(Re,$e),He||(He={}),H.select(Re).classed("js-plotly-plot",!0),c.makeTester(),Array.isArray(Re._promises)||(Re._promises=[]);var Dt=(Re.data||[]).length===0&&Array.isArray(Be);Array.isArray(Be)&&(S.cleanData(Be),Dt?Re.data=Be:Re.data.push.apply(Re.data,Be),Re.empty=!1),(!Re.layout||Dt)&&(Re.layout=S.cleanLayout(He)),r.supplyDefaults(Re);var Ct=Re._fullLayout,Vt=Ct._has("cartesian");Ct._replotting=!0,(Dt||Ct._shouldCreateBgLayer)&&(ht(Re),Ct._shouldCreateBgLayer&&delete Ct._shouldCreateBgLayer),c.initGradients(Re),c.initPatterns(Re),Dt&&a.saveShowSpikeInitial(Re);var Ht=!Re.calcdata||Re.calcdata.length!==(Re._fullData||[]).length;Ht&&r.doCalcdata(Re);for(var Wt=0;Wt=Re.data.length||Ze<-Re.data.length)throw new Error(He+" must be valid indices for gd.data.");if(Be.indexOf(Ze,$e+1)>-1||Ze>=0&&Be.indexOf(-Re.data.length+Ze)>-1||Ze<0&&Be.indexOf(Re.data.length+Ze)>-1)throw new Error("each index in "+He+" must be unique.")}}function j(Re,Be,He){if(!Array.isArray(Re.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]),P(Re,Be,"currentIndices"),typeof He<"u"&&!Array.isArray(He)&&(He=[He]),typeof He<"u"&&P(Re,He,"newIndices"),typeof He<"u"&&Be.length!==He.length)throw new Error("current and new indices must be of equal length.")}function U(Re,Be,He){var $e,Ze;if(!Array.isArray(Re.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]),$e=0;$e"u")throw new Error("indices must be an integer or array of integers");P(Re,He,"indices");for(var Je in Be){if(!Array.isArray(Be[Je])||Be[Je].length!==He.length)throw new Error("attribute "+Je+" must be an array of length equal to indices array length");if(Ze&&(!(Je in $e)||!Array.isArray($e[Je])||$e[Je].length!==Be[Je].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}function Q(Re,Be,He,$e){var Ze=E.isPlainObject($e),Je=[],Mt,dt,Dt,Ct,Vt;Array.isArray(He)||(He=[He]),He=F(He,Re.data.length-1);for(var Ht in Be)for(var Wt=0;Wt=0&&Vt=0&&Vt"u")return Ct=J.redraw(Re),e.add(Re,Ze,Mt,Je,dt),Ct;Array.isArray(He)||(He=[He]);try{j(Re,$e,He)}catch(Vt){throw Re.data.splice(Re.data.length-Be.length,Be.length),Vt}return e.startSequence(Re),e.add(Re,Ze,Mt,Je,dt),Ct=J.moveTraces(Re,$e,He),e.stopSequence(Re),Ct}function K(Re,Be){Re=E.getGraphDiv(Re);var He=[],$e=J.addTraces,Ze=K,Je=[Re,He,Be],Mt=[Re,Be],dt,Dt;if(typeof Be>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Be)||(Be=[Be]),P(Re,Be,"indices"),Be=F(Be,Re.data.length-1),Be.sort(E.sorterDes),dt=0;dt"u")for(He=[],Ct=0;Ct0&&typeof ja.parts[un]!="string";)un--;var Ja=ja.parts[un],ei=ja.parts[un-1]+"."+Ja,Fn=ja.parts.slice(0,un).join("."),ni=k(Re.layout,Fn).get(),Mi=k($e,Fn).get(),ci=ja.get();if(Oa!==void 0){ir[xa]=Oa,cr[xa]=Ja==="reverse"?Oa:q(ci);var bn=n.getLayoutValObject($e,ja.parts);if(bn&&bn.impliedEdits&&Oa!==null)for(var pn in bn.impliedEdits)fr(E.relativeAttr(xa,pn),bn.impliedEdits[pn]);if(["width","height"].indexOf(xa)!==-1)if(Oa){fr("autosize",null);var Ii=xa==="height"?"width":"height";fr(Ii,$e[Ii])}else $e[xa]=Re._initialAutoSize[xa];else if(xa==="autosize")fr("width",Oa?null:$e.width),fr("height",Oa?null:$e.height);else if(ei.match(Me))aa(ei),k($e,Fn+"._inputRange").set(null);else if(ei.match(Ie)){aa(ei),k($e,Fn+"._inputRange").set(null);var ho=k($e,Fn).get();ho._inputDomain&&(ho._input.domain=ho._inputDomain.slice())}else ei.match(qe)&&k($e,Fn+"._inputDomain").set(null);if(Ja==="type"){sa=ni;var dn=Mi.type==="linear"&&Oa==="log",Za=Mi.type==="log"&&Oa==="linear";if(dn||Za){if(!sa||!sa.range)fr(Fn+".autorange",!0);else if(Mi.autorange)dn&&(sa.range=sa.range[1]>sa.range[0]?[1,2]:[2,1]);else{var ot=sa.range[0],et=sa.range[1];dn?(ot<=0&&et<=0&&fr(Fn+".autorange",!0),ot<=0?ot=et/1e6:et<=0&&(et=ot/1e6),fr(Fn+".range[0]",Math.log(ot)/Math.LN10),fr(Fn+".range[1]",Math.log(et)/Math.LN10)):(fr(Fn+".range[0]",Math.pow(10,ot)),fr(Fn+".range[1]",Math.pow(10,et)))}Array.isArray($e._subplots.polar)&&$e._subplots.polar.length&&$e[ja.parts[0]]&&ja.parts[1]==="radialaxis"&&delete $e[ja.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(Re,Mi,Oa,fr),t.getComponentMethod("images","convertCoords")(Re,Mi,Oa,fr)}else fr(Fn+".autorange",!0),fr(Fn+".range",null);k($e,Fn+"._inputRange").set(null)}else if(Ja.match(_)){var hr=k($e,xa).get(),ur=(Oa||{}).type;(!ur||ur==="-")&&(ur="linear"),t.getComponentMethod("annotations","convertCoords")(Re,hr,ur,fr),t.getComponentMethod("images","convertCoords")(Re,hr,ur,fr)}var Tr=T.containerArrayMatch(xa);if(Tr){Vt=Tr.array,Ht=Tr.index;var Rr=Tr.property,Fr=bn||{editType:"calc"};Ht!==""&&Rr===""&&(T.isAddVal(Oa)?cr[xa]=null:T.isRemoveVal(Oa)?cr[xa]=(k(He,Vt).get()||[])[Ht]:E.warn("unrecognized full object value",Be)),C.update(It,Fr),Ct[Vt]||(Ct[Vt]={});var nt=Ct[Vt][Ht];nt||(nt=Ct[Vt][Ht]={}),nt[Rr]=Oa,delete Be[xa]}else Ja==="reverse"?(ni.range?ni.range.reverse():(fr(Fn+".autorange",!0),ni.range=[1,0]),Mi.autorange?It.calc=!0:It.plot=!0):(xa==="dragmode"&&(Oa===!1&&ci!==!1||Oa!==!1&&ci===!1)||$e._has("scatter-like")&&$e._has("regl")&&xa==="dragmode"&&(Oa==="lasso"||Oa==="select")&&!(ci==="lasso"||ci==="select")?It.plot=!0:bn?C.update(It,bn):It.calc=!0,ja.set(Oa))}}for(Vt in Ct){var kt=T.applyContainerArrayChanges(Re,Je(He,Vt),Ct[Vt],It,Je);kt||(It.plot=!0)}for(var Ut in Ir){sa=a.getFromId(Re,Ut);var nr=sa&&sa._constraintGroup;if(nr){It.calc=!0;for(var Er in nr)Ir[Er]||(a.getFromId(Re,Er)._constraintShrinkable=!0)}}(ke(Re)||Be.height||Be.width)&&(It.plot=!0);var br=$e.shapes;for(Ht=0;Ht1;)if($e.pop(),He=k(Be,$e.join(".")+".uirevision").get(),He!==void 0)return He;return Be.uirevision}function We(Re,Be){for(var He=0;He[Fn,Re._ev.listeners(Fn)]);Je=J.newPlot(Re,Be,He,$e).then(()=>{for(let[Fn,ni]of ei)ni.forEach(Mi=>Re.on(Fn,Mi));return J.react(Re,Be,He,$e)})}else{Re.data=Be||[],S.cleanData(Re.data),Re.layout=He||{},S.cleanLayout(Re.layout),mt(Re.data,Re.layout,dt,Dt),r.supplyDefaults(Re,{skipUpdateCalc:!0});var Ht=Re._fullData,Wt=Re._fullLayout,Sr=Wt.datarevision===void 0,ia=Wt.transition,$t=Kt(Re,Dt,Wt,Sr,ia),It=$t.newDataRevision,ir=At(Re,dt,Ht,Sr,ia,It);if(ke(Re)&&($t.layoutReplot=!0),ir.calc||$t.calc){Re.calcdata=void 0;for(var cr=Object.getOwnPropertyNames(Wt),fr=0;fr(Vt||Re.emit("plotly_react",{config:$e,data:Be,layout:He}),Re))}function At(Re,Be,He,$e,Ze,Je){var Mt=Be.length===He.length;if(!Ze&&!Mt)return{fullReplot:!0,calc:!0};var dt=C.traceFlags();dt.arrays={},dt.nChanges=0,dt.nChangesAnim=0;var Dt,Ct;function Vt(Sr){var ia=n.getTraceValObject(Ct,Sr);return!Ct._module.animatable&&ia.anim&&(ia.anim=!1),ia}var Ht={getValObject:Vt,flags:dt,immutable:$e,transition:Ze,newDataRevision:Je,gd:Re},Wt={};for(Dt=0;Dt=Ze.length?Ze[0]:Ze[Ct]:Ze}function dt(Ct){return Array.isArray(Je)?Ct>=Je.length?Je[0]:Je[Ct]:Je}function Dt(Ct,Vt){var Ht=0;return function(){if(Ct&&++Ht===Vt)return Ct()}}return new Promise(function(Ct,Vt){function Ht(){if($e._frameQueue.length!==0){for(;$e._frameQueue.length;){var Ja=$e._frameQueue.pop();Ja.onInterrupt&&Ja.onInterrupt()}Re.emit("plotly_animationinterrupted",[])}}function Wt(Ja){if(Ja.length!==0){for(var ei=0;ei$e._timeToNext&&ia()};Ja()}var It=0;function ir(Ja){return Array.isArray(Ze)?It>=Ze.length?Ja.transitionOpts=Ze[It]:Ja.transitionOpts=Ze[0]:Ja.transitionOpts=Ze,It++,Ja}var cr,fr,Ir=[],sa=Be==null,aa=Array.isArray(Be),xa=!sa&&!aa&&E.isPlainObject(Be);if(xa)Ir.push({type:"object",data:ir(E.extendFlat({},Be))});else if(sa||["string","number"].indexOf(typeof Be)!==-1)for(cr=0;cr<$e._frames.length;cr++)fr=$e._frames[cr],fr&&(sa||String(fr.group)===String(Be))&&Ir.push({type:"byname",name:String(fr.name),data:ir({name:fr.name})});else if(aa)for(cr=0;cr0&&AnAn)&&un.push(fr);Ir=un}}Ir.length>0?Wt(Ir):(Re.emit("plotly_animated"),Ct())})}function Zt(Re,Be,He){if(Re=E.getGraphDiv(Re),Be==null)return Promise.resolve();if(!E.isPlotDiv(Re))throw new Error("This element is not a Plotly plot: "+Re+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var $e,Ze,Je,Mt,dt=Re._transitionData._frames,Dt=Re._transitionData._frameHash;if(!Array.isArray(Be))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Be);var Ct=dt.length+Be.length*2,Vt=[],Ht={};for($e=Be.length-1;$e>=0;$e--)if(E.isPlainObject(Be[$e])){var Wt=Be[$e].name,Sr=(Dt[Wt]||Ht[Wt]||{}).name,ia=Be[$e].name,$t=Dt[Sr]||Ht[Sr];Sr&&ia&&typeof ia=="number"&&$t&&wja.index?-1:xa.index=0;$e--){if(Ze=Vt[$e].frame,typeof Ze.name=="number"&&E.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Ze.name)for(;Dt[Ze.name="frame "+Re._transitionData._counter++];);if(Dt[Ze.name]){for(Je=0;Je=0;He--)$e=Be[He],Je.push({type:"delete",index:$e}),Mt.unshift({type:"insert",index:$e,value:Ze[$e]});var dt=r.modifyFrames,Dt=r.modifyFrames,Ct=[Re,Mt],Vt=[Re,Je];return e&&e.add(Re,dt,Ct,Dt,Vt),r.modifyFrames(Re,Je)}function Ot(Re){Re=E.getGraphDiv(Re);var Be=Re._fullLayout||{},He=Re._fullData||[];return r.cleanPlot([],{},He,Be),r.purge(Re),l.purge(Re),Be._container&&Be._container.remove(),delete Re._context,Re}function vt(Re){var Be=Re._fullLayout,He=Re.getBoundingClientRect();if(!E.equalDomRects(He,Be._lastBBox)){var $e=Be._invTransform=E.inverseTransformMatrix(E.getFullTransformMatrix(Re));Be._invScaleX=Math.sqrt($e[0][0]*$e[0][0]+$e[0][1]*$e[0][1]+$e[0][2]*$e[0][2]),Be._invScaleY=Math.sqrt($e[1][0]*$e[1][0]+$e[1][1]*$e[1][1]+$e[1][2]*$e[1][2]),Be._lastBBox=He}}function ht(Re){var Be=H.select(Re),He=Re._fullLayout;if(He._calcInverseTransform=vt,He._calcInverseTransform(Re),He._container=Be.selectAll(".plot-container").data([0]),He._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),He._paperdiv=He._container.selectAll(".svg-container").data([0]),He._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),He._glcontainer=He._paperdiv.selectAll(".gl-container").data([{}]),He._glcontainer.enter().append("div").classed("gl-container",!0),He._paperdiv.selectAll(".main-svg").remove(),He._paperdiv.select(".modebar-container").remove(),He._paper=He._paperdiv.insert("svg",":first-child").classed("main-svg",!0),He._toppaper=He._paperdiv.append("svg").classed("main-svg",!0),He._modebardiv=He._paperdiv.append("div"),delete He._modeBar,He._hoverpaper=He._paperdiv.append("svg").classed("main-svg",!0),!He._uid){var $e={};H.selectAll("defs").each(function(){this.id&&($e[this.id.split("-")[1]]=1)}),He._uid=E.randstr($e)}He._paperdiv.selectAll(".main-svg").attr(p.svgAttrs),He._defs=He._paper.append("defs").attr("id","defs-"+He._uid),He._clips=He._defs.append("g").classed("clips",!0),He._topdefs=He._toppaper.append("defs").attr("id","topdefs-"+He._uid),He._topclips=He._topdefs.append("g").classed("clips",!0),He._bgLayer=He._paper.append("g").classed("bglayer",!0),He._draggers=He._paper.append("g").classed("draglayer",!0);var Ze=He._paper.append("g").classed("layer-below",!0);He._imageLowerLayer=Ze.append("g").classed("imagelayer",!0),He._shapeLowerLayer=Ze.append("g").classed("shapelayer",!0),He._cartesianlayer=He._paper.append("g").classed("cartesianlayer",!0),He._polarlayer=He._paper.append("g").classed("polarlayer",!0),He._smithlayer=He._paper.append("g").classed("smithlayer",!0),He._ternarylayer=He._paper.append("g").classed("ternarylayer",!0),He._geolayer=He._paper.append("g").classed("geolayer",!0),He._funnelarealayer=He._paper.append("g").classed("funnelarealayer",!0),He._pielayer=He._paper.append("g").classed("pielayer",!0),He._iciclelayer=He._paper.append("g").classed("iciclelayer",!0),He._treemaplayer=He._paper.append("g").classed("treemaplayer",!0),He._sunburstlayer=He._paper.append("g").classed("sunburstlayer",!0),He._indicatorlayer=He._toppaper.append("g").classed("indicatorlayer",!0),He._glimages=He._paper.append("g").classed("glimages",!0);var Je=He._toppaper.append("g").classed("layer-above",!0);He._imageUpperLayer=Je.append("g").classed("imagelayer",!0),He._shapeUpperLayer=Je.append("g").classed("shapelayer",!0),He._selectionLayer=He._toppaper.append("g").classed("selectionlayer",!0),He._infolayer=He._toppaper.append("g").classed("infolayer",!0),He._menulayer=He._toppaper.append("g").classed("menulayer",!0),He._zoomlayer=He._toppaper.append("g").classed("zoomlayer",!0),He._hoverlayer=He._hoverpaper.append("g").classed("hoverlayer",!0),He._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Re.emit("plotly_framework")}J.animate=_r,J.addFrames=Zt,J.deleteFrames=sr,J.addTraces=$,J.deleteTraces=K,J.extendTraces=oe,J.moveTraces=G,J.prependTraces=V,J.newPlot=B,J._doPlot=u,J.purge=Ot,J.react=Tt,J.redraw=R,J.relayout=ye,J.restyle=X,J.setPlotConfig=b,J.update=ge,J._guiRelayout=le(ye),J._guiRestyle=le(X),J._guiUpdate=le(ge),J._storeDirectGUIEdit=ae}}),yd=Ee({"src/snapshot/helpers.js"(J){"use strict";var H=Ri();J.getDelay=function(E){return E._has&&(E._has("gl3d")||E._has("map"))?500:0},J.getRedrawFunc=function(E){return function(){H.getComponentMethod("colorbar","draw")(E)}},J.encodeSVG=function(E){return"data:image/svg+xml,"+encodeURIComponent(E)},J.encodeJSON=function(E){return"data:application/json,"+encodeURIComponent(E)};var v=window.URL||window.webkitURL;J.createObjectURL=function(E){return v.createObjectURL(E)},J.revokeObjectURL=function(E){return v.revokeObjectURL(E)},J.createBlob=function(E,k){if(k==="svg")return new window.Blob([E],{type:"image/svg+xml;charset=utf-8"});if(k==="full-json")return new window.Blob([E],{type:"application/json;charset=utf-8"});var l=x(window.atob(E));return new window.Blob([l],{type:"image/"+k})},J.octetStream=function(E){document.location.href="data:application/octet-stream"+E},J.getPlotTitle=function(E){var k,l,e,t,n=E._fullLayout;if(n){var r=(k=n.title)==null?void 0:k.text;return r===((l=n._dfltTitle)==null?void 0:l.plot)?void 0:r}return(t=(e=E.layout)==null?void 0:e.title)==null?void 0:t.text},J.getPlotSubtitle=function(E){var k,l,e,t,n,r,a=E._fullLayout;if(a){var o=(l=(k=a.title)==null?void 0:k.subtitle)==null?void 0:l.text;return o===((e=a._dfltTitle)==null?void 0:e.subtitle)?void 0:o}return(r=(n=(t=E.layout)==null?void 0:t.title)==null?void 0:n.subtitle)==null?void 0:r.text};function x(E){for(var k=E.length,l=new ArrayBuffer(k),e=new Uint8Array(l),t=0;t{let i=m.toLowerCase();return r.includes(i)?m:a.includes(i)?"<":o.includes(i)?">":m.includes("<")||m.includes(">")?"":f.html(m).text()});return f.remove(),p}function c(g){return g.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}H.exports=function(f,p,m){var i=f._fullLayout,T=i._paper,S=i._toppaper,M=i.width,C=i.height,_;T.insert("rect",":first-child").call(E.setRect,0,0,M,C).call(k.fill,i.paper_bgcolor);var w=i._basePlotModules||[];for(_=0;_1&&C.push(s("object","layout"))),x.supplyDefaults(_);for(var u=_._fullData,A=w.length,b=0;bz.length&&M.push(s("unused",C,A.concat(z.length)));var P=z.length,j=Array.isArray(F);j&&(P=Math.min(P,F.length));var U,Z,Q,re,ne;if(I.dimensions===2)for(Z=0;Zz[Z].length&&M.push(s("unused",C,A.concat(Z,z[Z].length)));var oe=z[Z].length;for(U=0;U<(j?Math.min(oe,F[Z].length):oe);U++)Q=j?F[Z][U]:F,re=b[Z][U],ne=z[Z][U],v.validate(re,Q)?ne!==re&&ne!==+re&&M.push(s("dynamic",C,A.concat(Z,U),re,ne)):M.push(s("value",C,A.concat(Z,U),re))}else M.push(s("array",C,A.concat(Z),b[Z]));else for(Z=0;ZR?M.push({code:"unused",traceType:b,templateCount:N,dataCount:R}):R>N&&M.push({code:"reused",traceType:b,templateCount:N,dataCount:R})}}function B(F,P){for(var j in F)if(j.charAt(0)!=="_"){var U=F[j],Z=s(F,j,P);v(U)?(Array.isArray(F)&&U._template===!1&&U.templateitemname&&M.push({code:"missing",path:Z,templateitemname:U.templateitemname}),B(U,Z)):Array.isArray(U)&&c(U)&&B(U,Z)}}if(B({data:_,layout:C},""),M.length)return M.map(g)};function c(f){for(var p=0;p=0;g--){var f=l[g];if(f.type==="scatter"&&f.xaxis===s.xaxis&&f.yaxis===s.yaxis){f.opacity=void 0;break}}}}}}}),QM=Ee({"src/traces/scatter/layout_defaults.js"(J,H){"use strict";var v=Vr(),x=Ig();H.exports=function(E,k){function l(t,n){return v.coerce(E,k,x,t,n)}var e=k.barmode==="group";k.scattermode==="group"&&l("scattergap",e?k.bargap:.2)}}}),zh=Ee({"src/plots/cartesian/align_period.js"(J,H){"use strict";var v=mi(),x=Vr(),E=x.dateTime2ms,k=x.incrementMonth,l=Qi(),e=l.ONEAVGMONTH;H.exports=function(n,r,a,o){if(r.type!=="date")return{vals:o};var s=n[a+"periodalignment"];if(!s)return{vals:o};var c=n[a+"period"],g;if(v(c)){if(c=+c,c<=0)return{vals:o}}else if(typeof c=="string"&&c.charAt(0)==="M"){var f=+c.substring(1);if(f>0&&Math.round(f)===f)g=f;else return{vals:o}}for(var p=r.calendar,m=s==="start",i=s==="end",T=n[a+"period0"],S=E(T,p)||0,M=[],C=[],_=[],w=o.length,h=0;hu;)z=k(z,-g,p);for(;z<=u;)z=k(z,g,p);b=k(z,-g,p)}else{for(A=Math.round((u-S)/c),z=S+A*c;z>u;)z-=c;for(;z<=u;)z+=c;b=z-c}M[h]=m?b:i?z:(b+z)/2,C[h]=b,_[h]=z}return{vals:M,starts:C,ends:_}}}}),yh=Ee({"src/traces/scatter/colorscale_calc.js"(J,H){"use strict";var v=cf().hasColorscale,x=Sf(),E=nl();H.exports=function(l,e){E.hasLines(e)&&v(e,"line")&&x(l,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),E.hasMarkers(e)&&(v(e,"marker")&&x(l,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),v(e,"marker.line")&&x(l,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),$h=Ee({"src/traces/scatter/arrays_to_calcdata.js"(J,H){"use strict";var v=Vr();H.exports=function(E,k){for(var l=0;lB&&b[P].gap;)P--;for(U=b[P].s,F=b.length-1;F>P;F--)b[F].s=U;for(;Bre+Z||!v(Q))}for(var oe=0;oeP(U))):P(R.text);let j=R.outsidetextfont.size*r*F+n;return{ppadplus:B.some(U=>U.s<0)?j:0,ppadminus:B.some(U=>U.s>=0)?j:0}}return{ppadplus:void 0,ppadminus:void 0}}function z(R,B,F,P){for(var j=N(P),U=0;UN[p]&&p0?l:e)/(p._m*T*(p._m>0?l:e)))),Ct*=1e3}if(Vt===E){if(i&&(Vt=p.c2p(Dt.y,!0)),Vt===E)return!1;Vt*=1e3}return[Ct,Vt]}function ee(dt,Dt,Ct,Vt){var Ht=Ct-dt,Wt=Vt-Dt,Sr=.5-dt,ia=.5-Dt,$t=Ht*Ht+Wt*Wt,It=Ht*Sr+Wt*ia;if(It>0&&It<$t){var ir=Sr*Wt-ia*Ht;if(ir*ir<$t)return!0}}var ae,fe;function ye(dt,Dt){var Ct=dt[0]/T,Vt=dt[1]/S,Ht=Math.max(0,-Ct,Ct-1,-Vt,Vt-1);return Ht&&ae!==void 0&&ee(Ct,Vt,ae,fe)&&(Ht=0),Ht&&Dt&&ee(Ct,Vt,Dt[0]/T,Dt[1]/S)&&(Ht=0),(1+a.toleranceGrowth*Ht)*w}function xe(dt,Dt){var Ct=dt[0]-Dt[0],Vt=dt[1]-Dt[1];return Math.sqrt(Ct*Ct+Vt*Vt)}var Ae=a.maxScreensAway,Me=-T*Ae,Ie=T*(1+Ae),qe=-S*Ae,je=S*(1+Ae),ke=[[Me,qe,Ie,qe],[Ie,qe,Ie,je],[Ie,je,Me,je],[Me,je,Me,qe]],ge,le,ve,se,Te,Fe;function We(dt,Dt){for(var Ct=[],Vt=0,Ht=0;Ht<4;Ht++){var Wt=ke[Ht],Sr=n(dt[0],dt[1],Dt[0],Dt[1],Wt[0],Wt[1],Wt[2],Wt[3]);Sr&&(!Vt||Math.abs(Sr.x-Ct[0][0])>1||Math.abs(Sr.y-Ct[0][1])>1)&&(Sr=[Sr.x,Sr.y],Vt&&xe(Sr,dt)Ie||dt[1]je)return[r(dt[0],Me,Ie),r(dt[1],qe,je)]}function gt(dt,Dt){if(dt[0]===Dt[0]&&(dt[0]===Me||dt[0]===Ie)||dt[1]===Dt[1]&&(dt[1]===qe||dt[1]===je))return!0}function mt(dt,Dt){var Ct=[],Vt=Ge(dt),Ht=Ge(Dt);return Vt&&Ht&>(Vt,Ht)||(Vt&&Ct.push(Vt),Ht&&Ct.push(Ht)),Ct}function Tt(dt,Dt,Ct){return function(Vt,Ht){var Wt=Ge(Vt),Sr=Ge(Ht),ia=[];if(Wt&&Sr&>(Wt,Sr))return ia;Wt&&ia.push(Wt),Sr&&ia.push(Sr);var $t=2*t.constrain((Vt[dt]+Ht[dt])/2,Dt,Ct)-((Wt||Vt)[dt]+(Sr||Ht)[dt]);if($t){var It;Wt&&Sr?It=$t>0==Wt[dt]>Sr[dt]?Wt:Sr:It=Wt||Sr,It[dt]+=$t}return ia}}var At;h==="linear"||h==="spline"?At=We:h==="hv"||h==="vh"?At=mt:h==="hvh"?At=Tt(0,Me,Ie):h==="vhv"&&(At=Tt(1,qe,je));function Kt(dt,Dt){var Ct=Dt[0]-dt[0],Vt=(Dt[1]-dt[1])/Ct,Ht=(dt[1]*Dt[0]-Dt[1]*dt[0])/Ct;return Ht>0?[Vt>0?Me:Ie,je]:[Vt>0?Ie:Me,qe]}function ar(dt){var Dt=dt[0],Ct=dt[1],Vt=Dt===N[R-1][0],Ht=Ct===N[R-1][1];if(!(Vt&&Ht))if(R>1){var Wt=Dt===N[R-2][0],Sr=Ct===N[R-2][1];Vt&&(Dt===Me||Dt===Ie)&&Wt?Sr?R--:N[R-1]=dt:Ht&&(Ct===qe||Ct===je)&&Sr?Wt?R--:N[R-1]=dt:N[R++]=dt}else N[R++]=dt}function _r(dt){N[R-1][0]!==dt[0]&&N[R-1][1]!==dt[1]&&ar([ve,se]),ar(dt),Te=null,ve=se=0}var Zt=t.isArrayOrTypedArray(C);function sr(dt){if(dt&&M&&(dt.i=B,dt.d=s,dt.trace=g,dt.marker=Zt?C[dt.i]:C,dt.backoff=M),ae=dt[0]/T,fe=dt[1]/S,ge=dt[0]Ie?Ie:0,le=dt[1]je?je:0,ge||le){if(!R)N[R++]=[ge||dt[0],le||dt[1]];else if(Te){var Dt=At(Te,dt);Dt.length>1&&(_r(Dt[0]),N[R++]=Dt[1])}else Fe=At(N[R-1],dt)[0],N[R++]=Fe;var Ct=N[R-1];ge&&le&&(Ct[0]!==ge||Ct[1]!==le)?(Te&&(ve!==ge&&se!==le?ar(ve&&se?Kt(Te,dt):[ve||ge,se||le]):ve&&se&&ar([ve,se])),ar([ge,le])):ve-ge&&se-le&&ar([ge||ve,le||se]),Te=dt,ve=ge,se=le}else Te&&_r(At(Te,dt)[0]),N[R++]=dt}for(B=0;Bye(Z,Ot))break;P=Z,K=ne[0]*re[0]+ne[1]*re[1],K>V?(V=K,j=Z,Q=!1):K<$&&($=K,U=Z,Q=!0)}if(Q?(sr(j),P!==U&&sr(U)):(U!==F&&sr(U),P!==j&&sr(j)),sr(P),B>=s.length||!Z)break;sr(Z),F=Z}}Te&&ar([ve||Te[0],se||Te[1]]),b.push(N.slice(0,R))}var vt=h.slice(h.length-1);if(M&&vt!=="h"&&vt!=="v"){for(var ht=!1,Re=-1,Be=[],He=0;He=0?a=f:(a=f=g,g++),a0,h=r(f,p,m);if(M=i.selectAll("g.trace").data(h,function(A){return A[0].trace.uid}),M.enter().append("g").attr("class",function(A){return"trace scatter trace"+A[0].trace.uid}).style("stroke-miterlimit",2),M.order(),o(f,M,p),w){S&&(C=S());var u=v.transition().duration(T.duration).ease(T.easing).each("end",function(){C&&C()}).each("interrupt",function(){C&&C()});u.each(function(){i.selectAll("g.trace").each(function(A,b){s(f,b,p,A,h,this,T)})})}else M.each(function(A,b){s(f,b,p,A,h,this,T)});_&&M.exit().remove(),i.selectAll("path:not([d])").remove()};function o(g,f,p){f.each(function(m){var i=k(v.select(this),"g","fills");e.setClipUrl(i,p.layerClipId,g);var T=m[0].trace;T._ownFill=null,T._nextFill=null;var S=[];T._ownfill&&S.push("_ownFill"),T._nexttrace&&S.push("_nextFill");var M=i.selectAll("g").data(S,l);M.enter().append("g"),M.exit().remove(),M.order().each(function(C){T[C]=k(v.select(this),"path","js-fill")})})}function s(g,f,p,m,i,T,S){var M=g._context.staticPlot,C;c(g,f,p,m,i);var _=!!S&&S.duration>0;function w(ar){return _?ar.transition():ar}var h=p.xaxis,u=p.yaxis,A=m[0].trace,b=A.line,z=v.select(T),I=k(z,"g","errorbars"),N=k(z,"g","lines"),R=k(z,"g","points"),B=k(z,"g","text");if(x.getComponentMethod("errorbars","plot")(g,I,p,S),A.visible!==!0)return;w(z).style("opacity",A.opacity);var F,P,j=A.fill.charAt(A.fill.length-1);j!=="x"&&j!=="y"&&(j="");var U,Z;j==="y"?(U=1,Z=u.c2p(0,!0)):j==="x"&&(U=0,Z=h.c2p(0,!0)),m[0][p.isRangePlot?"nodeRangePlot3":"node3"]=z;var Q="",re=[],ne=A._prevtrace,oe=null,V=null;ne&&(Q=ne._prevRevpath||"",P=ne._nextFill,re=ne._ownPolygons,oe=ne._fillsegments,V=ne._fillElement);var $,K,G="",X="",q,W,ee,ae,fe,ye,xe=[];A._polygons=[];var Ae=[],Me=[],Ie=E.noop;if(F=A._ownFill,t.hasLines(A)||A.fill!=="none"){P&&P.datum(m),["hv","vh","hvh","vhv"].indexOf(b.shape)!==-1?(q=e.steps(b.shape),W=e.steps(b.shape.split("").reverse().join(""))):b.shape==="spline"?q=W=function(ar){var _r=ar[ar.length-1];return ar.length>1&&ar[0][0]===_r[0]&&ar[0][1]===_r[1]?e.smoothclosed(ar.slice(1),b.smoothing):e.smoothopen(ar,b.smoothing)}:q=W=function(ar){return"M"+ar.join("L")},ee=function(ar){return W(ar.reverse())},Me=n(m,{xaxis:h,yaxis:u,trace:A,connectGaps:A.connectgaps,baseTolerance:Math.max(b.width||1,3)/4,shape:b.shape,backoff:b.backoff,simplify:b.simplify,fill:A.fill}),Ae=new Array(Me.length);var qe=0;for(C=0;C=M[0]&&z.x<=M[1]&&z.y>=C[0]&&z.y<=C[1]}),u=Math.ceil(h.length/w),A=0;i.forEach(function(z,I){var N=z[0].trace;t.hasMarkers(N)&&N.marker.maxdisplayed>0&&I=Math.min(ne,oe)&&p<=Math.max(ne,oe)?0:1/0}var V=Math.max(3,re.mrc||0),$=1-1/V,K=Math.abs(g.c2p(re.x)-p);return K=Math.min(ne,oe)&&m<=Math.max(ne,oe)?0:1/0}var V=Math.max(3,re.mrc||0),$=1-1/V,K=Math.abs(f.c2p(re.y)-m);return KX!=Ae>=X&&(fe=ee[W-1][0],ye=ee[W][0],Ae-xe&&(ae=fe+(ye-fe)*(X-xe)/(Ae-xe),V=Math.min(V,ae),$=Math.max($,ae)));return V=Math.max(V,0),$=Math.min($,g._length),{x0:V,x1:$,y0:X,y1:X}}if(T.indexOf("fills")!==-1&&c._fillElement){var U=P(c._fillElement)&&!P(c._fillExclusionElement);if(U){var Z=j(c._polygons);Z===null&&(Z={x0:i[0],x1:i[0],y0:i[1],y1:i[1]});var Q=l.defaultLine;return l.opacity(c.fillcolor)?Q=c.fillcolor:l.opacity((c.line||{}).color)&&(Q=c.line.color),v.extendFlat(n,{distance:n.maxHoverDistance,x0:Z.x0,x1:Z.x1,y0:Z.y0,y1:Z.y1,color:Q,hovertemplate:!1}),delete n.index,c.text&&!v.isArrayOrTypedArray(c.text)?n.text=String(c.text):n.text=c.name,[n]}}}}}),Fv=Ee({"src/traces/scatter/select.js"(J,H){"use strict";var v=nl();H.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,n=[],r=l[0].trace,a,o,s,c,g=r.mode&&!v.hasMarkers(r)&&!v.hasText(r);if(g)return[];if(k===!1)for(a=0;a0&&(o["_"+r+"axes"]||{})[n])return o;if((o[r+"axis"]||r)===n){if(e(o,r))return o;if((o[r]||[]).length||o[r+"0"])return o}}}function l(t){return{v:"x",h:"y"}[t.orientation||"v"]}function e(t,n){var r=l(t),a=v(t,"box-violin");return a&&n===r&&t[r]===void 0&&t[r+"0"]===void 0}}}),Xg=Ee({"src/plots/cartesian/category_order_defaults.js"(J,H){"use strict";var v=vs().isTypedArraySpec;function x(E,k){var l=k.dataAttr||E._id.charAt(0),e={},t,n,r;if(k.axData)t=k.axData;else for(t=[],n=0;n0||v(n),a;r&&(a="array");var o=e("categoryorder",a),s;o==="array"&&(s=e("categoryarray")),!r&&o==="array"&&(o=l.categoryorder="trace"),o==="trace"?l._initialCategories=[]:o==="array"?l._initialCategories=s.slice():(s=x(l,t).sort(),o==="category ascending"?l._initialCategories=s:o==="category descending"&&(l._initialCategories=s.reverse()))}}}}),Z0=Ee({"src/plots/cartesian/line_grid_defaults.js"(J,H){"use strict";var v=Qn(),x=rs(),E=Vr();H.exports=function(l,e,t,n){n=n||{};var r=n.dfltColor;function a(b,z){return E.coerce2(l,e,n.attributes,b,z)}var o=a("linecolor",r),s=a("linewidth"),c=t("showline",n.showLine||!!o||!!s);c||(delete e.linecolor,delete e.linewidth);var g=v.mix(r,n.bgColor,n.blend||x.lightFraction),f=a("gridcolor",g),p=a("gridwidth"),m=a("griddash"),i=t("showgrid",n.showGrid||!!f||!!p||!!m);if(i||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),n.hasMinor){var T=v.mix(e.gridcolor,n.bgColor,67),S=a("minor.gridcolor",T),M=a("minor.gridwidth",e.gridwidth||1),C=a("minor.griddash",e.griddash||"solid"),_=t("minor.showgrid",!!S||!!M||!!C);_||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!n.noZeroLine){var w=a("zerolinelayer"),h=a("zerolinecolor",r),u=a("zerolinewidth"),A=t("zeroline",n.showGrid||!!h||!!u);A||(delete e.zerolinelayer,delete e.zerolinecolor,delete e.zerolinewidth)}}}}),K0=Ee({"src/plots/cartesian/axis_defaults.js"(J,H){"use strict";var v=mi(),x=Ri(),E=Vr(),k=xs(),l=Mf(),e=Gc(),t=Cv(),n=Np(),r=Wd(),a=Yd(),o=Xg(),s=Z0(),c=Fb(),g=Hh(),f=tc().WEEKDAY_PATTERN,p=tc().HOUR_PATTERN;H.exports=function(M,C,_,w,h){var u=w.letter,A=w.font||{},b=w.splomStash||{},z=_("visible",!w.visibleDflt),I=C._template||{},N=C.type||I.type||"-",R;if(N==="date"){var B=x.getComponentMethod("calendars","handleDefaults");B(M,C,"calendar",w.calendar),w.noTicklabelmode||(R=_("ticklabelmode"))}!w.noTicklabelindex&&(N==="date"||N==="linear")&&_("ticklabelindex");var F="";(!w.noTicklabelposition||N==="multicategory")&&(F=E.coerce(M,C,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:R==="period"?["outside","inside"]:u==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),w.noTicklabeloverflow||_("ticklabeloverflow",F.indexOf("inside")!==-1?"hide past domain":N==="category"||N==="multicategory"?"allow":"hide past div"),g(C,h),c(M,C,_,w),o(M,C,_,w),w.noHover||(N!=="category"&&_("hoverformat"),w.noUnifiedhovertitle||_("unifiedhovertitle.text"));var P=_("color"),j=P!==e.color.dflt?P:A.color,U=b.label||h._dfltTitle[u];if(a(M,C,_,N,w),!z)return C;_("title.text",U),E.coerceFont(_,"title.font",A,{overrideDflt:{size:E.bigFont(A.size),color:j}}),t(M,C,_,N);var Z=w.hasMinor;if(Z&&(k.newContainer(C,"minor"),t(M,C,_,N,{isMinor:!0})),r(M,C,_,N,w),n(M,C,_,w),Z){var Q=w.isMinor;w.isMinor=!0,n(M,C,_,w),w.isMinor=Q}s(M,C,_,{dfltColor:P,bgColor:w.bgColor,showGrid:w.showGrid,hasMinor:Z,attributes:e}),Z&&C.ticklabelindex==null&&!C.minor.ticks&&!C.minor.showgrid&&delete C.minor,(C.showline||C.ticks)&&_("mirror");var re=N==="multicategory";if(!w.noTickson&&(N==="category"||re)&&(C.ticks||C.showgrid)&&(re?(_("tickson","boundaries"),delete C.ticklabelposition):_("tickson")),re){var ne=_("showdividers");ne&&(_("dividercolor"),_("dividerwidth"))}if(N==="date")if(l(M,C,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:m}),!C.rangebreaks.length)delete C.rangebreaks;else{for(var oe=0;oe=2){var u="",A,b;if(h.length===2){for(A=0;A<2;A++)if(b=T(h[A]),b){u=f;break}}var z=_("pattern",u);if(z===f)for(A=0;A<2;A++)b=T(h[A]),b&&(M.bounds[A]=h[A]=b-1);if(z)for(A=0;A<2;A++)switch(b=h[A],z){case f:if(!v(b)){M.enabled=!1;return}if(b=+b,b!==Math.floor(b)||b<0||b>=7){M.enabled=!1;return}M.bounds[A]=h[A]=b;break;case p:if(!v(b)){M.enabled=!1;return}if(b=+b,b<0||b>24){M.enabled=!1;return}M.bounds[A]=h[A]=b;break}if(C.autorange===!1){var I=C.range;if(I[0]I[1]){M.enabled=!1;return}}else if(h[0]>I[0]&&h[1]_[1]-1/4096&&(l.domain=g),x.noneOrAll(k.domain,l.domain,g),l.tickmode==="sync"&&(l.tickmode="auto")}return e("layer"),l}}}),a4=Ee({"src/plots/cartesian/layout_defaults.js"(J,H){"use strict";var v=Vr(),x=Qn(),E=Qf().isUnifiedHover,k=Vb(),l=xs(),e=Fp(),t=Gc(),n=ux(),r=K0(),a=Pv(),o=$g(),s=Xl(),c=s.id2name,g=s.name2id,f=tc().AX_ID_PATTERN,p=Ri(),m=p.traceIs,i=p.getComponentMethod;function T(S,M,C){Array.isArray(S[M])?S[M].push(C):S[M]=[C]}H.exports=function(M,C,_){var w=C.autotypenumbers,h={},u={},A={},b={},z={},I={},N={},R={},B={},F={},P,j;for(P=0;P<_.length;P++){var U=_[P];if(m(U,"cartesian")){var Z;if(U.xaxis)Z=c(U.xaxis),T(h,Z,U);else if(U.xaxes)for(j=0;j rect").call(k.setTranslate,0,0).call(k.setScale,1,1),C.plot.call(k.setTranslate,_._offset,w._offset).call(k.setScale,1,1);var h=C.plot.selectAll(".scatterlayer .trace");h.selectAll(".point").call(k.setPointGroupScale,1,1),h.selectAll(".textpoint").call(k.setTextPointsScale,1,1),h.call(k.hideOutsideRangePoints,C)}function c(C,_){var w=C.plotinfo,h=w.xaxis,u=w.yaxis,A=h._length,b=u._length,z=!!C.xr1,I=!!C.yr1,N=[];if(z){var R=E.simpleMap(C.xr0,h.r2l),B=E.simpleMap(C.xr1,h.r2l),F=R[1]-R[0],P=B[1]-B[0];N[0]=(R[0]*(1-_)+_*B[0]-R[0])/(R[1]-R[0])*A,N[2]=A*(1-_+_*P/F),h.range[0]=h.l2r(R[0]*(1-_)+_*B[0]),h.range[1]=h.l2r(R[1]*(1-_)+_*B[1])}else N[0]=0,N[2]=A;if(I){var j=E.simpleMap(C.yr0,u.r2l),U=E.simpleMap(C.yr1,u.r2l),Z=j[1]-j[0],Q=U[1]-U[0];N[1]=(j[1]*(1-_)+_*U[1]-j[1])/(j[0]-j[1])*b,N[3]=b*(1-_+_*Q/Z),u.range[0]=h.l2r(j[0]*(1-_)+_*U[0]),u.range[1]=u.l2r(j[1]*(1-_)+_*U[1])}else N[1]=0,N[3]=b;l.drawOne(t,h,{skipTitle:!0}),l.drawOne(t,u,{skipTitle:!0}),l.redrawComponents(t,[h._id,u._id]);var re=z?A/N[2]:1,ne=I?b/N[3]:1,oe=z?N[0]:0,V=I?N[1]:0,$=z?N[0]/N[2]*A:0,K=I?N[1]/N[3]*b:0,G=h._offset-$,X=u._offset-K;w.clipRect.call(k.setTranslate,oe,V).call(k.setScale,1/re,1/ne),w.plot.call(k.setTranslate,G,X).call(k.setScale,re,ne),k.setPointGroupScale(w.zoomScalePts,1/re,1/ne),k.setTextPointsScale(w.zoomScaleTxt,1/re,1/ne)}var g;a&&(g=a());function f(){for(var C={},_=0;_r.duration?(f(),T=window.cancelAnimationFrame(M)):T=window.requestAnimationFrame(M)}return m=Date.now(),T=window.requestAnimationFrame(M),Promise.resolve()}}}),Mu=Ee({"src/plots/cartesian/index.js"(J){"use strict";var H=Va(),v=Ri(),x=Vr(),E=vl(),k=mo(),l=uf().getModuleCalcData,e=Xl(),t=tc(),n=mh(),r=x.ensureSingle;function a(m,i,T){return x.ensureSingle(m,i,T,function(S){S.datum(T)})}var o=t.zindexSeparator;J.name="cartesian",J.attr=["xaxis","yaxis"],J.idRoot=["x","y"],J.idRegex=t.idRegex,J.attrRegex=t.attrRegex,J.attributes=r4(),J.layoutAttributes=Gc(),J.supplyLayoutDefaults=a4(),J.transitionAxes=n4(),J.finalizeSubplots=function(m,i){var T=i._subplots,S=T.xaxis,M=T.yaxis,C=T.cartesian,_=C,w={},h={},u,A,b;for(u=0;u<_.length;u++){var z=_[u].split("y");w[z[0]]=1,h["y"+z[1]]=1}for(u=0;u0){var I=z.id;if(I.indexOf(o)!==-1)continue;I+=o+(u+1),z=x.extendFlat({},z,{id:I,plot:M._cartesianlayer.selectAll(".subplot").select("."+I)})}for(var N=[],R,B=0;B<_.length;B++){var F=_[B],P=F[0].trace;A===(P.zorder||0)&&P.xaxis+P.yaxis===b&&((i.indexOf(P.index)!==-1||P.carpet)&&(R&&R[0].trace.xaxis+R[0].trace.yaxis===b&&["tonextx","tonexty","tonext"].indexOf(P.fill)!==-1&&N.indexOf(R)===-1&&N.push(R),N.push(F)),R=F)}s(m,z,N,T,S)}}};function s(m,i,T,S,M){for(var C=t.traceLayerClasses,_=m._fullLayout,w=_._zindices,h=_._modules,u,A,b,z=[],I=[],N=0;N1&&(Z+=o+U),j.push(w+Z),_=0;_1,b=i.mainplotinfo;if(!i.mainplot||A)if(u)i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.xaxislayer=r(S,"g","xaxislayer-above"),i.yaxislayer=r(S,"g","yaxislayer-above");else{if(!_){var z=r(S,"g","layer-subplot");i.shapelayer=r(z,"g","shapelayer"),i.imagelayer=r(z,"g","imagelayer"),b&&A?(i.minorGridlayer=b.minorGridlayer,i.gridlayer=b.gridlayer,i.zerolinelayer=b.zerolinelayer):(i.minorGridlayer=r(S,"g","minor-gridlayer"),i.gridlayer=r(S,"g","gridlayer"),i.zerolinelayer=r(S,"g","zerolinelayer"));var I=r(S,"g","layer-between");i.shapelayerBetween=r(I,"g","shapelayer"),i.imagelayerBetween=r(I,"g","imagelayer"),r(S,"path","xlines-below"),r(S,"path","ylines-below"),i.overlinesBelow=r(S,"g","overlines-below"),r(S,"g","xaxislayer-below"),r(S,"g","yaxislayer-below"),i.overaxesBelow=r(S,"g","overaxes-below")}i.overplot=r(S,"g","overplot"),i.plot=r(i.overplot,"g",M),b&&A?i.zerolinelayerAbove=b.zerolinelayerAbove:i.zerolinelayerAbove=r(S,"g","zerolinelayer-above"),_||(i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.overlinesAbove=r(S,"g","overlines-above"),r(S,"g","xaxislayer-above"),r(S,"g","yaxislayer-above"),i.overaxesAbove=r(S,"g","overaxes-above"),i.xlines=S.select(".xlines-"+w),i.ylines=S.select(".ylines-"+h),i.xaxislayer=S.select(".xaxislayer-"+w),i.yaxislayer=S.select(".yaxislayer-"+h))}else{var N=b.plotgroup,R=M+"-x",B=M+"-y";i.minorGridlayer=b.minorGridlayer,i.gridlayer=b.gridlayer,i.zerolinelayer=b.zerolinelayer,i.zerolinelayerAbove=b.zerolinelayerAbove,r(b.overlinesBelow,"path",R),r(b.overlinesBelow,"path",B),r(b.overaxesBelow,"g",R),r(b.overaxesBelow,"g",B),i.plot=r(b.overplot,"g",M),r(b.overlinesAbove,"path",R),r(b.overlinesAbove,"path",B),r(b.overaxesAbove,"g",R),r(b.overaxesAbove,"g",B),i.xlines=N.select(".overlines-"+w).select("."+R),i.ylines=N.select(".overlines-"+h).select("."+B),i.xaxislayer=N.select(".overaxes-"+w).select("."+R),i.yaxislayer=N.select(".overaxes-"+h).select("."+B)}_||(u||(a(i.minorGridlayer,"g",i.xaxis._id),a(i.minorGridlayer,"g",i.yaxis._id),i.minorGridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort),a(i.gridlayer,"g",i.xaxis._id),a(i.gridlayer,"g",i.yaxis._id),i.gridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort)),i.xlines.style("fill","none").classed("crisp",!0),i.ylines.style("fill","none").classed("crisp",!0))}function f(m,i){if(m){var T={};m.each(function(h){var u=h[0],A=H.select(this);A.remove(),p(u,i),T[u]=!0});for(var S in i._plots)for(var M=i._plots[S],C=M.overlays||[],_=0;_=0,i=a.indexOf("end")>=0,T=c.backoff*f+o.standoff,S=g.backoff*p+o.startstandoff,M,C,_,w;if(s.nodeName==="line"){M={x:+r.attr("x1"),y:+r.attr("y1")},C={x:+r.attr("x2"),y:+r.attr("y2")};var h=M.x-C.x,u=M.y-C.y;if(_=Math.atan2(u,h),w=_+Math.PI,T&&S&&T+S>Math.sqrt(h*h+u*u)){Z();return}if(T){if(T*T>h*h+u*u){Z();return}var A=T*Math.cos(_),b=T*Math.sin(_);C.x+=A,C.y+=b,r.attr({x2:C.x,y2:C.y})}if(S){if(S*S>h*h+u*u){Z();return}var z=S*Math.cos(_),I=S*Math.sin(_);M.x-=z,M.y-=I,r.attr({x1:M.x,y1:M.y})}}else if(s.nodeName==="path"){var N=s.getTotalLength(),R="";if(N2/3?fr="right":fr="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[fr]}for(var Fe=!1,We=["x","y"],Ge=0;Ge1)&&(Tt===mt?(Je=At.r2fraction(S["a"+gt]),(Je<0||Je>1)&&(Fe=!0)):Fe=!0),ht=At._offset+At.r2p(S[gt]),He=.5}else{var Mt=Ze==="domain";gt==="x"?(Be=S[gt],ht=Mt?At._offset+At._length*Be:ht=u.l+u.w*Be):(Be=1-S[gt],ht=Mt?At._offset+At._length*Be:ht=u.t+u.h*Be),He=S.showarrow?.5:Be}if(S.showarrow){vt.head=ht;var dt=S["a"+gt];if($e=ar*Te(.5,S.xanchor)-_r*Te(.5,S.yanchor),Tt===mt){var Dt=e.getRefType(Tt);Dt==="domain"?(gt==="y"&&(dt=1-dt),vt.tail=At._offset+At._length*dt):Dt==="paper"?gt==="y"?(dt=1-dt,vt.tail=u.t+u.h*dt):vt.tail=u.l+u.w*dt:vt.tail=At._offset+At.r2p(dt),Re=$e}else vt.tail=ht+dt,Re=$e+dt;vt.text=vt.tail+$e;var Ct=h[gt==="x"?"width":"height"];if(mt==="paper"&&(vt.head=k.constrain(vt.head,1,Ct-1)),Tt==="pixel"){var Vt=-Math.max(vt.tail-3,vt.text),Ht=Math.min(vt.tail+3,vt.text)-Ct;Vt>0?(vt.tail+=Vt,vt.text+=Vt):Ht>0&&(vt.tail-=Ht,vt.text-=Ht)}vt.tail+=Ot,vt.head+=Ot}else $e=Zt*Te(He,sr),Re=$e,vt.text=ht+$e;vt.text+=Ot,$e+=Ot,Re+=Ot,S["_"+gt+"padplus"]=Zt/2+Re,S["_"+gt+"padminus"]=Zt/2-Re,S["_"+gt+"size"]=Zt,S["_"+gt+"shift"]=$e}if(Fe){oe.remove();return}var Wt=0,Sr=0;if(S.align!=="left"&&(Wt=(ge-je)*(S.align==="center"?.5:1)),S.valign!=="top"&&(Sr=(le-ke)*(S.valign==="middle"?.5:1)),Ie)Me.select("svg").attr({x:K+Wt-1,y:K+Sr}).call(n.setClipUrl,X?F:null,T);else{var ia=K+Sr-qe.top,$t=K+Wt-qe.left;ae.call(a.positionText,$t,ia).call(n.setClipUrl,X?F:null,T)}q.select("rect").call(n.setRect,K,K,ge,le),G.call(n.setRect,V/2,V/2,ve-V,se-V),oe.call(n.setTranslate,Math.round(P.x.text-ve/2),Math.round(P.y.text-se/2)),Z.attr({transform:"rotate("+j+","+P.x.text+","+P.y.text+")"});var It=function(cr,fr){U.selectAll(".annotation-arrow-g").remove();var Ir=P.x.head,sa=P.y.head,aa=P.x.tail+cr,xa=P.y.tail+fr,ja=P.x.text+cr,Oa=P.y.text+fr,An=k.rotationXYMatrix(j,ja,Oa),un=k.apply2DTransform(An),Ja=k.apply2DTransform2(An),ei=+G.attr("width"),Fn=+G.attr("height"),ni=ja-.5*ei,Mi=ni+ei,ci=Oa-.5*Fn,bn=ci+Fn,pn=[[ni,ci,ni,bn],[ni,bn,Mi,bn],[Mi,bn,Mi,ci],[Mi,ci,ni,ci]].map(Ja);if(!pn.reduce(function(nt,kt){return nt^!!k.segmentsIntersect(Ir,sa,Ir+1e6,sa+1e6,kt[0],kt[1],kt[2],kt[3])},!1)){pn.forEach(function(nt){var kt=k.segmentsIntersect(aa,xa,Ir,sa,nt[0],nt[1],nt[2],nt[3]);kt&&(aa=kt.x,xa=kt.y)});var Ii=S.arrowwidth,ho=S.arrowcolor,dn=S.arrowside,Za=U.append("g").style({opacity:t.opacity(ho)}).classed("annotation-arrow-g",!0),ot=Za.append("path").attr("d","M"+aa+","+xa+"L"+Ir+","+sa).style("stroke-width",Ii+"px").call(t.stroke,t.rgb(ho));if(g(ot,dn,S),A.annotationPosition&&ot.node().parentNode&&!C){var et=Ir,hr=sa;if(S.standoff){var ur=Math.sqrt(Math.pow(Ir-aa,2)+Math.pow(sa-xa,2));et+=S.standoff*(aa-Ir)/ur,hr+=S.standoff*(xa-sa)/ur}var Tr=Za.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(aa-et)+","+(xa-hr),transform:l(et,hr)}).style("stroke-width",Ii+6+"px").call(t.stroke,"rgba(0,0,0,0)").call(t.fill,"rgba(0,0,0,0)"),Rr,Fr;s.init({element:Tr.node(),gd:T,prepFn:function(){var nt=n.getTranslate(oe);Rr=nt.x,Fr=nt.y,_&&_.autorange&&N(_._name+".autorange",!0),w&&w.autorange&&N(w._name+".autorange",!0)},moveFn:function(nt,kt){var Ut=un(Rr,Fr),nr=Ut[0]+nt,Er=Ut[1]+kt;oe.call(n.setTranslate,nr,Er),R("x",m(_,nt,"x",u,S)),R("y",m(w,kt,"y",u,S)),S.axref===S.xref&&R("ax",m(_,nt,"ax",u,S)),S.ayref===S.yref&&R("ay",m(w,kt,"ay",u,S)),Za.attr("transform",l(nt,kt)),Z.attr({transform:"rotate("+j+","+nr+","+Er+")"})},doneFn:function(){x.call("_guiRelayout",T,B());var nt=document.querySelector(".js-notes-box-panel");nt&&nt.redraw(nt.selectedObj)}})}}};if(S.showarrow&&It(0,0),Q){var ir;s.init({element:oe.node(),gd:T,prepFn:function(){ir=Z.attr("transform")},moveFn:function(cr,fr){var Ir="pointer";if(S.showarrow)S.axref===S.xref?R("ax",m(_,cr,"ax",u,S)):R("ax",S.ax+cr),S.ayref===S.yref?R("ay",m(w,fr,"ay",u.w,S)):R("ay",S.ay+fr),It(cr,fr);else{if(C)return;var sa,aa;if(_)sa=m(_,cr,"x",u,S);else{var xa=S._xsize/u.w,ja=S.x+(S._xshift-S.xshift)/u.w-xa/2;sa=s.align(ja+cr/u.w,xa,0,1,S.xanchor)}if(w)aa=m(w,fr,"y",u,S);else{var Oa=S._ysize/u.h,An=S.y-(S._yshift+S.yshift)/u.h-Oa/2;aa=s.align(An-fr/u.h,Oa,0,1,S.yanchor)}R("x",sa),R("y",aa),(!_||!w)&&(Ir=s.getCursor(_?.5:sa,w?.5:aa,S.xanchor,S.yanchor))}Z.attr({transform:l(cr,fr)+ir}),o(oe,Ir)},clickFn:function(cr,fr){S.captureevents&&T.emit("plotly_clickannotation",ne(fr))},doneFn:function(){o(oe),x.call("_guiRelayout",T,B());var cr=document.querySelector(".js-notes-box-panel");cr&&cr.redraw(cr.selectedObj)}})}}A.annotationText?ae.call(a.makeEditable,{delegate:oe,gd:T}).call(fe).on("edit",function(xe){S.text=xe,this.call(fe),R("text",xe),_&&_.autorange&&N(_._name+".autorange",!0),w&&w.autorange&&N(w._name+".autorange",!0),x.call("_guiRelayout",T,B())}):ae.call(fe)}}}),s4=Ee({"src/components/annotations/click.js"(J,H){"use strict";var v=Vr(),x=Ri(),E=xs().arrayEditor;H.exports={hasClickToShow:k,onClick:l};function k(n,r){var a=e(n,r);return a.on.length>0||a.explicitOff.length>0}function l(n,r){var a=e(n,r),o=a.on,s=a.off.concat(a.explicitOff),c={},g=n._fullLayout.annotations,f,p;if(o.length||s.length){for(f=0;f1){o=!0;break}}o?l.fullLayout._infolayer.select(".annotation-"+l.id+'[data-index="'+r+'"]').remove():(a._pdata=x(l.glplot.cameraParams,[e.xaxis.r2l(a.x)*t[0],e.yaxis.r2l(a.y)*t[1],e.zaxis.r2l(a.z)*t[2]]),v(l.graphDiv,a,r,l.id,a._xa,a._ya))}}}}),p4=Ee({"src/components/annotations3d/index.js"(J,H){"use strict";var v=Ri(),x=Vr();H.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:Kg()}}},layoutAttributes:Kg(),handleDefaults:h4(),includeBasePlot:E,convert:d4(),draw:v4()};function E(k,l){var e=v.subplotsRegistry.gl3d;if(e)for(var t=e.attrRegex,n=Object.keys(k),r=0;r{var b=A+"anchor",z=A==="x"?T:S,I={_fullLayout:a},N,R,B,F;let P=A+"ref",j=n[P];if(Array.isArray(j)&&j.length>0){let U=l.countDefiningCoords(p,g,A);F=x.coerceRefArray(n,r,I,A,void 0,"paper",U),r["_"+A+"refArray"]=!0}else F=x.coerceRef(n,r,I,A,void 0,"paper");if(Array.isArray(F))F.forEach(function(U){x.getRefType(U)==="range"&&(N=x.getFromId(I,U),N&&N._shapeIndices.indexOf(r._index)===-1&&N._shapeIndices.push(r._index))}),m&&[0,1].forEach(function(U){let Z=F[U];x.getRefType(Z)==="range"?(N=x.getFromId(I,Z),R=l.shapePositionToRange(N),B=l.rangeToShapePosition(N),(N.type==="category"||N.type==="multicategory")&&o(A+U+"shift")):R=B=v.identity;let re=A+U,ne=n[re];if(n[re]=R(n[re],!0),z==="pixel"?o(re,C[U]):x.coercePosition(r,I,o,Z,re,M[U]),r[re]=B(r[re]),n[re]=ne,U===0&&z==="pixel"){let oe=n[b];n[b]=R(n[b],!0),x.coercePosition(r,I,o,Z,b,.25),r[b]=B(r[b]),n[b]=oe}});else{if(x.getRefType(F)==="range"?(N=x.getFromId(I,F),N._shapeIndices.push(r._index),B=l.rangeToShapePosition(N),R=l.shapePositionToRange(N),m&&(N.type==="category"||N.type==="multicategory")&&(o(A+"0shift"),o(A+"1shift"))):R=B=v.identity,m){let Z=A+"0",Q=A+"1",re=n[Z],ne=n[Q];n[Z]=R(n[Z],!0),n[Q]=R(n[Q],!0),z==="pixel"?(o(Z,C[0]),o(Q,C[1])):(x.coercePosition(r,I,o,F,Z,M[0]),x.coercePosition(r,I,o,F,Q,M[1])),r[Z]=B(r[Z]),r[Q]=B(r[Q]),n[Z]=re,n[Q]=ne}if(z==="pixel"){let Z=n[b];n[b]=R(n[b],!0),x.coercePosition(r,I,o,F,b,.25),r[b]=B(r[b]),n[b]=Z}}}),m&&v.noneOrAll(n,r,["x0","x1","y0","y1"]);var _=p==="line",w,h;if(m&&(w=o("label.texttemplate"),o("label.texttemplatefallback")),w||(h=o("label.text")),h||w){o("label.textangle");var u=o("label.textposition",_?"middle":"middle center");o("label.xanchor"),o("label.yanchor",e(_,u)),o("label.padding"),v.coerceFont(o,"label.font",a.font)}}}}),g4=Ee({"src/components/shapes/draw_newshape/defaults.js"(J,H){"use strict";var v=Qn(),x=Vr();function E(k,l){return k?"bottom":l.indexOf("top")!==-1?"top":l.indexOf("bottom")!==-1?"bottom":"middle"}H.exports=function(l,e,t){t("newshape.visible"),t("newshape.name"),t("newshape.showlegend"),t("newshape.legend"),t("newshape.legendwidth"),t("newshape.legendgroup"),t("newshape.legendgrouptitle.text"),x.coerceFont(t,"newshape.legendgrouptitle.font"),t("newshape.legendrank"),t("newshape.drawdirection"),t("newshape.layer"),t("newshape.fillcolor"),t("newshape.fillrule"),t("newshape.opacity");var n=t("newshape.line.width");if(n){var r=(l||{}).plot_bgcolor||"#FFF";t("newshape.line.color",v.contrast(r)),t("newshape.line.dash")}var a=l.dragmode==="drawline",o=t("newshape.label.text"),s=t("newshape.label.texttemplate");if(t("newshape.label.texttemplatefallback"),o||s){t("newshape.label.textangle");var c=t("newshape.label.textposition",a?"middle":"middle center");t("newshape.label.xanchor"),t("newshape.label.yanchor",E(a,c)),t("newshape.label.padding"),x.coerceFont(t,"newshape.label.font",e.font)}t("activeshape.fillcolor"),t("activeshape.opacity")}}}),y4=Ee({"src/components/shapes/calc_autorange.js"(J,H){"use strict";var v=Vr(),x=uo(),E=G0(),k=Zd();H.exports=function(o){var s=o._fullLayout,c=v.filterVisible(s.shapes);if(!(!c.length||!o._fullData.length))for(var g=0;g{p=x.getFromId(o,M),f._extremes[p._id]=x.findExtremes(p,C,e(f))})}else f.xref!=="paper"&&i!=="domain"&&(p=x.getFromId(o,f.xref),m=r(p,f,E.paramIsX),m&&(f._extremes[p._id]=x.findExtremes(p,m,e(f))));if(T==="array"){let S=l(o,f,"y");Object.entries(S).forEach(([M,C])=>{p=x.getFromId(o,M),f._extremes[p._id]=x.findExtremes(p,C,t(f))})}else f.yref!=="paper"&&T!=="domain"&&(p=x.getFromId(o,f.yref),m=r(p,f,E.paramIsY),m&&(f._extremes[p._id]=x.findExtremes(p,m,t(f))))}};function l(a,o,s){let c=o[s+"ref"],g=s==="x"?E.paramIsX:E.paramIsY;function f(M,C){M==="paper"||x.getRefType(M)==="domain"||(p[M]||(p[M]=[]),p[M].push(C))}let p={};if(o.type==="path"&&o.path){let M=o.path.match(E.segmentRE)||[];for(var m=0,i=0;iw&&(f(c[m],h[w]),m++)}}else f(c[0],o[s+"0"]),f(c[1],o[s+"1"]);let T={};for(let M in p){let C=x.getFromId(a,M);if(C){var S=C.type==="category"||C.type==="multicategory"?C.r2c:C.d2c;C.type==="date"&&(S=k.decodeDate(S)),T[C._id]=p[M].map(S)}}return T}function e(a){return n(a.line.width,a.xsizemode,a.x0,a.x1,a.path,!1)}function t(a){return n(a.line.width,a.ysizemode,a.y0,a.y1,a.path,!0)}function n(a,o,s,c,g,f){var p=a/2,m=f;if(o==="pixel"){var i=g?k.extractPathCoords(g,f?E.paramIsY:E.paramIsX):[s,c],T=v.aggNums(Math.max,null,i),S=v.aggNums(Math.min,null,i),M=S<0?Math.abs(S)+p:p,C=T>0?T+p:p;return{ppad:p,ppadplus:m?M:C,ppadminus:m?C:M}}else return{ppad:p}}function r(a,o,s){var c=a._id.charAt(0)==="x"?"x":"y",g=a.type==="category"||a.type==="multicategory",f,p,m=0,i=0,T=g?a.r2c:a.d2c,S=o[c+"sizemode"]==="scaled";if(S?(f=o[c+"0"],p=o[c+"1"],g&&(m=o[c+"0shift"],i=o[c+"1shift"])):(f=o[c+"anchor"],p=o[c+"anchor"]),f!==void 0)return[T(f)+m,T(p)+i];if(o.path){var M=1/0,C=-1/0,_=o.path.match(E.segmentRE),w,h,u,A,b;for(a.type==="date"&&(T=k.decodeDate(T)),w=0;w<_.length;w++)h=_[w],u=s[h.charAt(0)].drawn,u!==void 0&&(A=_[w].slice(1).match(E.paramRE),!(!A||A.lengthC&&(C=b)));if(C>=M)return[M,C]}}}}),_4=Ee({"src/components/shapes/index.js"(J,H){"use strict";var v=Ug();H.exports={moduleType:"component",name:"shapes",layoutAttributes:hx(),supplyLayoutDefaults:m4(),supplyDrawNewShapeDefaults:g4(),includeBasePlot:$0()("shapes"),calcAutorange:y4(),draw:v.draw,drawOne:v.drawOne}}}),dx=Ee({"src/components/images/attributes.js"(J,H){"use strict";var v=tc(),x=xs().templatedArray,E=X0();H.exports=x("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",v.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",v.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),b4=Ee({"src/components/images/defaults.js"(J,H){"use strict";var v=Vr(),x=uo(),E=Mf(),k=dx(),l="images";H.exports=function(n,r){var a={name:l,handleItemDefaults:e};E(n,r,a)};function e(t,n,r){function a(T,S){return v.coerce(t,n,k,T,S)}var o=a("source"),s=a("visible",!!o);if(!s)return n;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var c={_fullLayout:r},g=["x","y"],f=0;f<2;f++){var p=g[f],m=x.coerceRef(t,n,c,p,"paper",void 0);if(m!=="paper"){var i=x.getFromId(c,m);i._imgIndices.push(n._index)}x.coercePosition(n,c,a,m,p,0)}return n}}}),x4=Ee({"src/components/images/draw.js"(J,H){"use strict";var v=Va(),x=mo(),E=uo(),k=Xl(),l=mh();H.exports=function(t){var n=t._fullLayout,r=[],a={},o=[],s,c;for(c=0;c0);g&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),v.noneOrAll(r,a,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),v.coerceFont(s,"font",o.font),s("bgcolor",o.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function n(r,a){function o(c,g){return v.coerce(r,a,e,c,g)}var s=o("visible",r.method==="skip"||Array.isArray(r.args));s&&(o("method"),o("args"),o("args2"),o("label"),o("execute"))}}}),M4=Ee({"src/components/updatemenus/scrollbox.js"(J,H){"use strict";H.exports=l;var v=Va(),x=Qn(),E=mo(),k=Vr();function l(e,t,n){this.gd=e,this.container=t,this.id=n,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}l.barWidth=2,l.barLength=20,l.barRadius=2,l.barPad=1,l.barColor="#808BA4",l.prototype.enable=function(t,n,r){var a=this.gd._fullLayout,o=a.width,s=a.height;this.position=t;var c=this.position.l,g=this.position.w,f=this.position.t,p=this.position.h,m=this.position.direction,i=m==="down",T=m==="left",S=m==="right",M=m==="up",C=g,_=p,w,h,u,A;!i&&!T&&!S&&!M&&(this.position.direction="down",i=!0);var b=i||M;b?(w=c,h=w+C,i?(u=f,A=Math.min(u+_,s),_=A-u):(A=f+_,u=Math.max(A-_,0),_=A-u)):(u=f,A=u+_,T?(h=c+C,w=Math.max(h-C,0),C=h-w):(w=c,h=Math.min(w+C,o),C=h-w)),this._box={l:w,t:u,w:C,h:_};var z=g>C,I=l.barLength+2*l.barPad,N=l.barWidth+2*l.barPad,R=c,B=f+p;B+N>s&&(B=s-N);var F=this.container.selectAll("rect.scrollbar-horizontal").data(z?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-horizontal",!0).call(x.fill,l.barColor),z?(this.hbar=F.attr({rx:l.barRadius,ry:l.barRadius,x:R,y:B,width:I,height:N}),this._hbarXMin=R+I/2,this._hbarTranslateMax=C-I):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var P=p>_,j=l.barWidth+2*l.barPad,U=l.barLength+2*l.barPad,Z=c+g,Q=f;Z+j>o&&(Z=o-j);var re=this.container.selectAll("rect.scrollbar-vertical").data(P?[0]:[]);re.exit().on(".drag",null).remove(),re.enter().append("rect").classed("scrollbar-vertical",!0).call(x.fill,l.barColor),P?(this.vbar=re.attr({rx:l.barRadius,ry:l.barRadius,x:Z,y:Q,width:j,height:U}),this._vbarYMin=Q+U/2,this._vbarTranslateMax=_-U):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ne=this.id,oe=w-.5,V=P?h+j+.5:h+.5,$=u-.5,K=z?A+N+.5:A+.5,G=a._topdefs.selectAll("#"+ne).data(z||P?[0]:[]);if(G.exit().remove(),G.enter().append("clipPath").attr("id",ne).append("rect"),z||P?(this._clipRect=G.select("rect").attr({x:Math.floor(oe),y:Math.floor($),width:Math.ceil(V)-Math.floor(oe),height:Math.ceil(K)-Math.floor($)}),this.container.call(E.setClipUrl,ne,this.gd),this.bg.attr({x:c,y:f,width:g,height:p})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.setClipUrl,null),delete this._clipRect),z||P){var X=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(X);var q=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault(),v.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));z&&this.hbar.on(".drag",null).call(q),P&&this.vbar.on(".drag",null).call(q)}this.setTranslate(n,r)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},l.prototype._onBoxDrag=function(){var t=this.translateX,n=this.translateY;this.hbar&&(t-=v.event.dx),this.vbar&&(n-=v.event.dy),this.setTranslate(t,n)},l.prototype._onBoxWheel=function(){var t=this.translateX,n=this.translateY;this.hbar&&(t+=v.event.deltaY),this.vbar&&(n+=v.event.deltaY),this.setTranslate(t,n)},l.prototype._onBarDrag=function(){var t=this.translateX,n=this.translateY;if(this.hbar){var r=t+this._hbarXMin,a=r+this._hbarTranslateMax,o=k.constrain(v.event.x,r,a),s=(o-r)/(a-r),c=this.position.w-this._box.w;t=s*c}if(this.vbar){var g=n+this._vbarYMin,f=g+this._vbarTranslateMax,p=k.constrain(v.event.y,g,f),m=(p-g)/(f-g),i=this.position.h-this._box.h;n=m*i}this.setTranslate(t,n)},l.prototype.setTranslate=function(t,n){var r=this.position.w-this._box.w,a=this.position.h-this._box.h;if(t=k.constrain(t||0,0,r),n=k.constrain(n||0,0,a),this.translateX=t,this.translateY=n,this.container.call(E.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-n),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+n-.5)}),this.hbar){var o=t/r;this.hbar.call(E.setTranslate,t+o*this._hbarTranslateMax,n)}if(this.vbar){var s=n/a;this.vbar.call(E.setTranslate,t,n+s*this._vbarTranslateMax)}}}}),S4=Ee({"src/components/updatemenus/draw.js"(J,H){"use strict";var v=Va(),x=vl(),E=Qn(),k=mo(),l=Vr(),e=Fs(),t=xs().arrayEditor,n=rc().LINE_SPACING,r=Jg(),a=M4();H.exports=function(I){var N=I._fullLayout,R=l.filterVisible(N[r.name]);function B(ne){x.autoMargin(I,u(ne))}var F=N._menulayer.selectAll("g."+r.containerClassName).data(R.length>0?[0]:[]);if(F.enter().append("g").classed(r.containerClassName,!0).style("cursor","pointer"),F.exit().each(function(){v.select(this).selectAll("g."+r.headerGroupClassName).each(B)}).remove(),R.length!==0){var P=F.selectAll("g."+r.headerGroupClassName).data(R,o);P.enter().append("g").classed(r.headerGroupClassName,!0);for(var j=l.ensureSingle(F,"g",r.dropdownButtonGroupClassName,function(ne){ne.style("pointer-events","all")}),U=0;U0?[0]:[]);Z.enter().append("g").classed(r.containerClassName,!0).style("cursor",P?null:"ew-resize");function Q(V){V._commandObserver&&(V._commandObserver.remove(),delete V._commandObserver),x.autoMargin(F,g(V))}if(Z.exit().each(function(){v.select(this).selectAll("g."+r.groupClassName).each(Q)}).remove(),U.length!==0){var re=Z.selectAll("g."+r.groupClassName).data(U,p);re.enter().append("g").classed(r.groupClassName,!0),re.exit().each(Q).remove();for(var ne=0;ne0&&(re=re.transition().duration(F.transition.duration).ease(F.transition.easing)),re.attr("transform",e(Q-r.gripWidth*.5,F._dims.currentValueTotalHeight))}}function z(B,F){var P=B._dims;return P.inputAreaStart+r.stepInset+(P.inputAreaLength-2*r.stepInset)*Math.min(1,Math.max(0,F))}function I(B,F){var P=B._dims;return Math.min(1,Math.max(0,(F-r.stepInset-P.inputAreaStart)/(P.inputAreaLength-2*r.stepInset-2*P.inputAreaStart)))}function N(B,F,P){var j=P._dims,U=l.ensureSingle(B,"rect",r.railTouchRectClass,function(Z){Z.call(h,F,B,P).style("pointer-events","all")});U.attr({width:j.inputAreaLength,height:Math.max(j.inputAreaWidth,r.tickOffset+P.ticklen+j.labelHeight)}).call(E.fill,P.bgcolor).attr("opacity",0),k.setTranslate(U,0,j.currentValueTotalHeight)}function R(B,F){var P=F._dims,j=P.inputAreaLength-r.railInset*2,U=l.ensureSingle(B,"rect",r.railRectClass);U.attr({width:j,height:r.railWidth,rx:r.railRadius,ry:r.railRadius,"shape-rendering":"crispEdges"}).call(E.stroke,F.bordercolor).call(E.fill,F.bgcolor).style("stroke-width",F.borderwidth+"px"),k.setTranslate(U,r.railInset,(P.inputAreaWidth-r.railWidth)*.5+P.currentValueTotalHeight)}}}),L4=Ee({"src/components/sliders/index.js"(J,H){"use strict";var v=J0();H.exports={moduleType:"component",name:v.name,layoutAttributes:px(),supplyLayoutDefaults:k4(),draw:C4()}}}),Qg=Ee({"src/components/rangeslider/attributes.js"(J,H){"use strict";var v=rs();H.exports={bgcolor:{valType:"color",dflt:v.background,editType:"plot"},bordercolor:{valType:"color",dflt:v.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}}}),mx=Ee({"src/components/rangeslider/oppaxis_attributes.js"(J,H){"use strict";H.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"}}}),e1=Ee({"src/components/rangeslider/constants.js"(J,H){"use strict";H.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}}}),P4=Ee({"src/components/rangeslider/helpers.js"(J){"use strict";var H=Xl(),v=Fs(),x=e1(),E=rc().LINE_SPACING,k=x.name;function l(e){var t=e&&e[k];return t&&t.visible}J.isVisible=l,J.makeData=function(e){for(var t=H.list({_fullLayout:e},"x",!0),n=e.margin,r=[],a=0;a=je.max)Ie=fe[qe+1];else if(Me=je.pmax)Ie=fe[qe+1];else if(Me0?h.touches[0].clientX:0}function f(h,u,A,b){if(u._context.staticPlot)return;var z=h.select("rect."+c.slideBoxClassName).node(),I=h.select("rect."+c.grabAreaMinClassName).node(),N=h.select("rect."+c.grabAreaMaxClassName).node();function R(){var B=v.event,F=B.target,P=g(B),j=P-h.node().getBoundingClientRect().left,U=b.d2p(A._rl[0]),Z=b.d2p(A._rl[1]),Q=o.coverSlip();this.addEventListener("touchmove",re),this.addEventListener("touchend",ne),Q.addEventListener("mousemove",re),Q.addEventListener("mouseup",ne);function re(oe){var V=g(oe),$=+V-P,K,G,X;switch(F){case z:if(X="ew-resize",U+$>A._length||Z+$<0)return;K=U+$,G=Z+$;break;case I:if(X="col-resize",U+$>A._length)return;K=U+$,G=Z;break;case N:if(X="col-resize",Z+$<0)return;K=U,G=Z+$;break;default:X="ew-resize",K=j,G=j+$;break}if(G0);if(T){var S=n(o,s,c);m("x",S[0]),m("y",S[1]),v.noneOrAll(a,o,["x","y"]),m("xanchor"),m("yanchor"),v.coerceFont(m,"font",s.font);var M=m("bgcolor");m("activecolor",x.contrast(M,e.lightAmount,e.darkAmount)),m("bordercolor"),m("borderwidth")}};function t(r,a,o,s){var c=s.calendar;function g(m,i){return v.coerce(r,a,l.buttons,m,i)}var f=g("visible");if(f){var p=g("step");p!=="all"&&(c&&c!=="gregorian"&&(p==="month"||p==="year")?a.stepmode="backward":g("stepmode"),g("count")),g("label")}}function n(r,a,o){for(var s=o.filter(function(p){return a[p].anchor===r._id}),c=0,g=0;g1)){delete c.grid;return}if(!m&&!i&&!T){var A=w("pattern")==="independent";A&&(m=!0)}_._hasSubplotGrid=m;var b=w("roworder"),z=b==="top to bottom",I=m?.2:.1,N=m?.3:.1,R,B;S&&c._splomGridDflt&&(R=c._splomGridDflt.xside,B=c._splomGridDflt.yside),_._domains={x:r("x",w,I,R,u),y:r("y",w,N,B,h,z)}}function r(s,c,g,f,p,m){var i=c(s+"gap",g),T=c("domain."+s);c(s+"side",f);for(var S=new Array(p),M=T[0],C=(T[1]-M)/(p-i),_=C*(1-i),w=0;w0,f=t._context.staticPlot;n.each(function(p){var m=p[0].trace,i=m.error_x||{},T=m.error_y||{},S;m.ids&&(S=function(w){return w.id});var M=k.hasMarkers(m)&&m.marker.maxdisplayed>0;!T.visible&&!i.visible&&(p=[]);var C=v.select(this).selectAll("g.errorbar").data(p,S);if(C.exit().remove(),!!p.length){i.visible||C.selectAll("path.xerror").remove(),T.visible||C.selectAll("path.yerror").remove(),C.style("opacity",1);var _=C.enter().append("g").classed("errorbar",!0);g&&_.style("opacity",0).transition().duration(a.duration).style("opacity",1),E.setClipUrl(C,r.layerClipId,t),C.each(function(w){var h=v.select(this),u=l(w,s,c);if(!(M&&!w.vis)){var A,b=h.select("path.yerror");if(T.visible&&x(u.x)&&x(u.yh)&&x(u.ys)){var z=T.width;A="M"+(u.x-z)+","+u.yh+"h"+2*z+"m-"+z+",0V"+u.ys,u.noYS||(A+="m-"+z+",0h"+2*z),o=!b.size(),o?b=h.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("yerror",!0):g&&(b=b.transition().duration(a.duration).ease(a.easing)),b.attr("d",A)}else b.remove();var I=h.select("path.xerror");if(i.visible&&x(u.y)&&x(u.xh)&&x(u.xs)){var N=(i.copy_ystyle?T:i).width;A="M"+u.xh+","+(u.y-N)+"v"+2*N+"m0,-"+N+"H"+u.xs,u.noXS||(A+="m0,-"+N+"v"+2*N),o=!I.size(),o?I=h.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("xerror",!0):g&&(I=I.transition().duration(a.duration).ease(a.easing)),I.attr("d",A)}else I.remove()}})}})};function l(e,t,n){var r={x:t.c2p(e.x),y:n.c2p(e.y)};return e.yh!==void 0&&(r.yh=n.c2p(e.yh),r.ys=n.c2p(e.ys),x(r.ys)||(r.noYS=!0,r.ys=n.c2p(e.ys,!0))),e.xh!==void 0&&(r.xh=t.c2p(e.xh),r.xs=t.c2p(e.xs),x(r.xs)||(r.noXS=!0,r.xs=t.c2p(e.xs,!0))),r}}}),V4=Ee({"src/components/errorbars/style.js"(J,H){"use strict";var v=Va(),x=Qn();H.exports=function(k){k.each(function(l){var e=l[0].trace,t=e.error_y||{},n=e.error_x||{},r=v.select(this);r.selectAll("path.yerror").style("stroke-width",t.thickness+"px").call(x.stroke,t.color),n.copy_ystyle&&(n=t),r.selectAll("path.xerror").style("stroke-width",n.thickness+"px").call(x.stroke,n.color)})}}}),H4=Ee({"src/components/errorbars/index.js"(J,H){"use strict";var v=Vr(),x=El().overrideAll,E=_x(),k={error_x:v.extendFlat({},E),error_y:v.extendFlat({},E)};delete k.error_x.copy_zstyle,delete k.error_y.copy_zstyle,delete k.error_y.copy_ystyle;var l={error_x:v.extendFlat({},E),error_y:v.extendFlat({},E),error_z:v.extendFlat({},E)};delete l.error_x.copy_ystyle,delete l.error_y.copy_ystyle,delete l.error_z.copy_ystyle,delete l.error_z.copy_zstyle,H.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:k,bar:k,histogram:k,scatter3d:x(l,"calc","nested"),scattergl:x(k,"calc","nested")}},supplyDefaults:j4(),calc:U4(),makeComputeError:bx(),plot:q4(),style:V4(),hoverInfo:e};function e(t,n,r){(n.error_y||{}).visible&&(r.yerr=t.yh-t.y,n.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(n.error_x||{}).visible&&(r.xerr=t.xh-t.x,n.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}}),G4=Ee({"src/components/colorbar/constants.js"(J,H){"use strict";H.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"}}}}),W4=Ee({"src/components/colorbar/draw.js"(J,H){"use strict";var v=Va(),x=vl(),E=Ri(),k=uo(),l=qf(),e=Vr(),t=e.strTranslate,n=vo().extendFlat,r=Dh(),a=mo(),o=Qn(),s=Lv(),c=Fs(),g=cf().flipScale,f=K0(),p=$g(),m=Gc(),i=rc(),T=i.LINE_SPACING,S=i.FROM_TL,M=i.FROM_BR,C=G4().cn;function _(N){var R=N._fullLayout,B=R._infolayer.selectAll("g."+C.colorbar).data(w(N),function(F){return F._id});B.enter().append("g").attr("class",function(F){return F._id}).classed(C.colorbar,!0),B.each(function(F){var P=v.select(this);e.ensureSingle(P,"rect",C.cbbg),e.ensureSingle(P,"g",C.cbfills),e.ensureSingle(P,"g",C.cblines),e.ensureSingle(P,"g",C.cbaxis,function(U){U.classed(C.crisp,!0)}),e.ensureSingle(P,"g",C.cbtitleunshift,function(U){U.append("g").classed(C.cbtitle,!0)}),e.ensureSingle(P,"rect",C.cboutline);var j=A(P,F,N);j&&j.then&&(N._promises||[]).push(j),N._context.edits.colorbarPosition&&b(P,F,N)}),B.exit().each(function(F){x.autoMargin(N,F._id)}).remove(),B.order()}function w(N){var R=N._fullLayout,B=N.calcdata,F=[],P,j,U,Z;function Q(ee){return n(ee,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function re(){typeof Z.calc=="function"?Z.calc(N,U,P):(P._fillgradient=j.reversescale?g(j.colorscale):j.colorscale,P._zrange=[j[Z.min],j[Z.max]])}for(var ne=0;ne[Math.min(N[0]+R,N[1]),N[1]],u=(N,R)=>[N[0],Math.max(N[1]-R,N[0])];function A(N,R,B){var F=R.orientation==="v",P=R.len,j=R.lenmode,U=R.thickness,Z=R.thicknessmode,Q=R.outlinewidth,re=R.borderwidth,ne=R.bgcolor,oe=R.xanchor,V=R.yanchor,$=R.xpad,K=R.ypad,G=R.x,X=F?R.y:1-R.y,q=R.yref==="paper",W=R.xref==="paper",ee=B._fullLayout,ae=ee._size,fe=R._fillcolor,ye=R._line,xe=R.title,Ae=xe.side,Me=R._zrange||v.extent((typeof fe=="function"?fe:ye.color).domain()),Ie=typeof ye.color=="function"?ye.color:function(){return ye.color},qe=typeof fe=="function"?fe:function(){return fe},je=R._levels,ke=z(B,R,Me),ge=ke.fill,le=ke.line,ve=Math.round(U*(Z==="fraction"?F?ae.w:ae.h:1)),se=ve/(F?ae.w:ae.h),Te=Math.round(P*(j==="fraction"?F?ae.h:ae.w:1)),Fe=Te/(F?ae.h:ae.w),We=W?ae.w:B._fullLayout.width,Ge=q?ae.h:B._fullLayout.height,gt=Math.round(F?G*We+$:X*Ge+K),mt={center:.5,right:1}[oe]||0,Tt={top:1,middle:.5}[V]||0,At=F?G-mt*se:X-Tt*se,Kt=F?X-Tt*Fe:G-mt*Fe,ar=Math.round(F?Ge*(1-Kt):We*Kt);R._lenFrac=Fe,R._thickFrac=se,R._uFrac=At,R._vFrac=Kt;var _r=R._axis=I(B,R,Me);_r.position=se+(F?G+$/ae.w:X+K/ae.h);var Zt=["top","bottom"].indexOf(Ae)!==-1;if(F&&Zt&&(_r.title.side=Ae,_r.titlex=G+$/ae.w,_r.titley=Kt+(xe.side==="top"?Fe-K/ae.h:K/ae.h)),!F&&!Zt&&(_r.title.side=Ae,_r.titley=X+K/ae.h,_r.titlex=Kt+$/ae.w),ye.color&&R.tickmode==="auto"){_r.tickmode="linear",_r.tick0=je.start;var sr=je.size,Ot=e.constrain(Te/50,4,15)+1,vt=(Me[1]-Me[0])/((R.nticks||Ot)*sr);if(vt>1){var ht=Math.pow(10,Math.floor(Math.log(vt)/Math.LN10));sr*=ht*e.roundUp(vt/ht,[2,5,10]),(Math.abs(je.start)/je.size+1e-6)%1<2e-6&&(_r.tick0=0)}_r.dtick=sr}var Re=F?K/ae.h:$/ae.w;_r.domain=u(h([Kt,Kt+Fe],Re),Re),_r.setScale(),N.attr("transform",t(Math.round(ae.l),Math.round(ae.t)));var Be=N.select("."+C.cbtitleunshift).attr("transform",t(-Math.round(ae.l),-Math.round(ae.t))),He=_r.ticklabelposition,$e=_r.title.font.size,Ze=N.select("."+C.cbaxis),Je,Mt=0,dt=0;function Dt(Sr,ia){var $t={propContainer:_r,propName:R._propPrefix+"title.text",traceIndex:R._traceIndex,_meta:R._meta,placeholder:ee._dfltTitle.colorbar,containerGroup:N.select("."+C.cbtitle)},It=Sr.charAt(0)==="h"?Sr.slice(1):"h"+Sr;N.selectAll("."+It+",."+It+"-math-group").remove(),s.draw(B,Sr,n($t,ia||{}))}function Ct(){if(F&&Zt||!F&&!Zt){var Sr,ia;Ae==="top"&&(Sr=$+ae.l+We*G,ia=K+ae.t+Ge*(1-Kt-Fe)+3+$e*.75),Ae==="bottom"&&(Sr=$+ae.l+We*G,ia=K+ae.t+Ge*(1-Kt)-3-$e*.25),Ae==="right"&&(ia=K+ae.t+Ge*X+3+$e*.75,Sr=$+ae.l+We*Kt),Dt(_r._id+"title",{attributes:{x:Sr,y:ia,"text-anchor":F?"start":"middle"}})}}function Vt(){if(F&&!Zt||!F&&Zt){var Sr=_r.position||0,ia=_r._offset+_r._length/2,$t,It;if(Ae==="right")It=ia,$t=ae.l+We*Sr+10+$e*(_r.showticklabels?1:.5);else if($t=ia,Ae==="bottom"&&(It=ae.t+Ge*Sr+10+(He.indexOf("inside")===-1?_r.tickfont.size:0)+(_r.ticks!=="inside"&&R.ticklen||0)),Ae==="top"){var ir=xe.text.split("
").length;It=ae.t+Ge*Sr+10-ve-T*$e*ir}Dt((F?"h":"v")+_r._id+"title",{avoid:{selection:v.select(B).selectAll("g."+_r._id+"tick"),side:Ae,offsetTop:F?0:ae.t,offsetLeft:F?ae.l:0,maxShift:F?ee.width:ee.height},attributes:{x:$t,y:It,"text-anchor":"middle"},transform:{rotate:F?-90:0,offset:0}})}}function Ht(){if(!F&&!Zt||F&&Zt){var Sr=N.select("."+C.cbtitle),ia=Sr.select("text"),$t=[-Q/2,Q/2],It=Sr.select(".h"+_r._id+"title-math-group").node(),ir=15.6;ia.node()&&(ir=parseInt(ia.node().style.fontSize,10)*T);var cr;if(It?(cr=a.bBox(It),dt=cr.width,Mt=cr.height,Mt>ir&&($t[1]-=(Mt-ir)/2)):ia.node()&&!ia.classed(C.jsPlaceholder)&&(cr=a.bBox(ia.node()),dt=cr.width,Mt=cr.height),F){if(Mt){if(Mt+=5,Ae==="top")_r.domain=u(_r.domain,Mt/ae.h),$t[1]*=-1;else{_r.domain=h(_r.domain,Mt/ae.h);var fr=c.lineCount(ia);$t[1]+=(1-fr)*ir}Sr.attr("transform",t($t[0],$t[1])),_r.setScale()}}else dt&&(Ae==="right"&&(_r.domain=h(_r.domain,(dt+$e/2)/ae.w)),Sr.attr("transform",t($t[0],$t[1])),_r.setScale())}N.selectAll("."+C.cbfills+",."+C.cblines).attr("transform",F?t(0,Math.round(ae.h*(1-_r.domain[1]))):t(Math.round(ae.w*_r.domain[0]),0)),Ze.attr("transform",F?t(0,Math.round(-ae.t)):t(Math.round(-ae.l),0));var Ir=N.select("."+C.cbfills).selectAll("rect."+C.cbfill).attr("style","").data(ge);Ir.enter().append("rect").classed(C.cbfill,!0).attr("style",""),Ir.exit().remove();var sa=Me.map(_r.c2p).map(Math.round).sort(function(An,un){return An-un});Ir.each(function(An,un){var Ja=[un===0?Me[0]:(ge[un]+ge[un-1])/2,un===ge.length-1?Me[1]:(ge[un]+ge[un+1])/2].map(_r.c2p).map(Math.round);F&&(Ja[1]=e.constrain(Ja[1]+(Ja[1]>Ja[0])?1:-1,sa[0],sa[1]));var ei=v.select(this).attr(F?"x":"y",gt).attr(F?"y":"x",v.min(Ja)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(v.max(Ja)-v.min(Ja),2));if(R._fillgradient)a.gradient(ei,B,R._id,F?"vertical":"horizontalreversed",R._fillgradient,"fill");else{var Fn=qe(An).replace("e-","");ei.attr("fill",o.hexString(Fn))}});var aa=N.select("."+C.cblines).selectAll("path."+C.cbline).data(ye.color&&ye.width?le:[]);aa.enter().append("path").classed(C.cbline,!0),aa.exit().remove(),aa.each(function(An){var un=gt,Ja=Math.round(_r.c2p(An))+ye.width/2%1;v.select(this).attr("d","M"+(F?un+","+Ja:Ja+","+un)+(F?"h":"v")+ve).call(a.lineGroupStyle,ye.width,Ie(An),ye.dash)}),Ze.selectAll("g."+_r._id+"tick,path").remove();var xa=gt+ve+(Q||0)/2-(R.ticks==="outside"?1:0),ja=k.calcTicks(_r),Oa=k.getTickSigns(_r)[2];return k.drawTicks(B,_r,{vals:_r.ticks==="inside"?k.clipEnds(_r,ja):ja,layer:Ze,path:k.makeTickPath(_r,xa,Oa),transFn:k.makeTransTickFn(_r)}),k.drawLabels(B,_r,{vals:ja,layer:Ze,transFn:k.makeTransTickLabelFn(_r),labelFns:k.makeLabelFns(_r,xa)})}function Wt(){var Sr,ia=ve+Q/2;He.indexOf("inside")===-1&&(Sr=a.bBox(Ze.node()),ia+=F?Sr.width:Sr.height),Je=Be.select("text");var $t=0,It=F&&Ae==="top",ir=!F&&Ae==="right",cr=0;if(Je.node()&&!Je.classed(C.jsPlaceholder)){var fr,Ir=Be.select(".h"+_r._id+"title-math-group").node();Ir&&(F&&Zt||!F&&!Zt)?(Sr=a.bBox(Ir),$t=Sr.width,fr=Sr.height):(Sr=a.bBox(Be.node()),$t=Sr.right-ae.l-(F?gt:ar),fr=Sr.bottom-ae.t-(F?ar:gt),!F&&Ae==="top"&&(ia+=Sr.height,cr=Sr.height)),ir&&(Je.attr("transform",t($t/2+$e/2,0)),$t*=2),ia=Math.max(ia,F?$t:fr)}var sa=(F?$:K)*2+ia+re+Q/2,aa=0;!F&&xe.text&&V==="bottom"&&X<=0&&(aa=sa/2,sa+=aa,cr+=aa),ee._hColorbarMoveTitle=aa,ee._hColorbarMoveCBTitle=cr;var xa=re+Q,ja=(F?gt:ar)-xa/2-(F?$:0),Oa=(F?ar:gt)-(F?Te:K+cr-aa);N.select("."+C.cbbg).attr("x",ja).attr("y",Oa).attr(F?"width":"height",Math.max(sa-aa,2)).attr(F?"height":"width",Math.max(Te+xa,2)).call(o.fill,ne).call(o.stroke,R.bordercolor).style("stroke-width",re);var An=ir?Math.max($t-10,0):0;N.selectAll("."+C.cboutline).attr("x",(F?gt:ar+$)+An).attr("y",(F?ar+K-Te:gt)+(It?Mt:0)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(Te-(F?2*K+Mt:2*$+An),2)).call(o.stroke,R.outlinecolor).style({fill:"none","stroke-width":Q});var un=F?mt*sa:0,Ja=F?0:(1-Tt)*sa-cr;if(un=W?ae.l-un:-un,Ja=q?ae.t-Ja:-Ja,N.attr("transform",t(un,Ja)),!F&&(re||o.opacity(ne)&&!o.equals(ee.paper_bgcolor,ne))){var ei=Ze.selectAll("text"),Fn=ei[0].length,ni=N.select("."+C.cbbg).node(),Mi=a.bBox(ni),ci=a.getTranslate(N),bn=2;ei.each(function(Tr,Rr){var Fr=0,nt=Fn-1;if(Rr===Fr||Rr===nt){var kt=a.bBox(this),Ut=a.getTranslate(this),nr;if(Rr===nt){var Er=kt.right+Ut.x,br=Mi.right+ci.x+ar-re-bn+G;nr=br-Er,nr>0&&(nr=0)}else if(Rr===Fr){var Or=kt.left+Ut.x,Pr=Mi.left+ci.x+ar+re+bn;nr=Pr-Or,nr<0&&(nr=0)}nr&&(Fn<3?this.setAttribute("transform","translate("+nr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var pn={},Ii=S[oe],ho=M[oe],dn=S[V],Za=M[V],ot=sa-ve;F?(j==="pixels"?(pn.y=X,pn.t=Te*dn,pn.b=Te*Za):(pn.t=pn.b=0,pn.yt=X+P*dn,pn.yb=X-P*Za),Z==="pixels"?(pn.x=G,pn.l=sa*Ii,pn.r=sa*ho):(pn.l=ot*Ii,pn.r=ot*ho,pn.xl=G-U*Ii,pn.xr=G+U*ho)):(j==="pixels"?(pn.x=G,pn.l=Te*Ii,pn.r=Te*ho):(pn.l=pn.r=0,pn.xl=G+P*Ii,pn.xr=G-P*ho),Z==="pixels"?(pn.y=1-X,pn.t=sa*dn,pn.b=sa*Za):(pn.t=ot*dn,pn.b=ot*Za,pn.yt=X-U*dn,pn.yb=X+U*Za));var et=R.y<.5?"b":"t",hr=R.x<.5?"l":"r";B._fullLayout._reservedMargin[R._id]={};var ur={r:ee.width-ja-un,l:ja+pn.r,b:ee.height-Oa-Ja,t:Oa+pn.b};W&&q?x.autoMargin(B,R._id,pn):W?B._fullLayout._reservedMargin[R._id][et]=ur[et]:q||F?B._fullLayout._reservedMargin[R._id][hr]=ur[hr]:B._fullLayout._reservedMargin[R._id][et]=ur[et]}return e.syncOrAsync([x.previousPromises,Ct,Ht,Vt,x.previousPromises,Wt],B)}function b(N,R,B){var F=R.orientation==="v",P=B._fullLayout,j=P._size,U,Z,Q;l.init({element:N.node(),gd:B,prepFn:function(){U=N.attr("transform"),r(N)},moveFn:function(re,ne){N.attr("transform",U+t(re,ne)),Z=l.align((F?R._uFrac:R._vFrac)+re/j.w,F?R._thickFrac:R._lenFrac,0,1,R.xanchor),Q=l.align((F?R._vFrac:1-R._uFrac)-ne/j.h,F?R._lenFrac:R._thickFrac,0,1,R.yanchor);var oe=l.getCursor(Z,Q,R.xanchor,R.yanchor);r(N,oe)},doneFn:function(){if(r(N),Z!==void 0&&Q!==void 0){var re={};re[R._propPrefix+"x"]=Z,re[R._propPrefix+"y"]=Q,R._traceIndex!==void 0?E.call("_guiRestyle",B,re,R._traceIndex):E.call("_guiRelayout",B,re)}}})}function z(N,R,B){var F=R._levels,P=[],j=[],U,Z,Q=F.end+F.size/100,re=F.size,ne=1.001*B[0]-.001*B[1],oe=1.001*B[1]-.001*B[0];for(Z=0;Z<1e5&&(U=F.start+Z*re,!(re>0?U>=Q:U<=Q));Z++)U>ne&&U0?U>=Q:U<=Q));Z++)U>B[0]&&U-1}H.exports=function(n,r){var a,o=n.data,s=n.layout,c=k([],o),g=k({},s,l(r.tileClass)),f=n._context||{};if(r.width&&(g.width=r.width),r.height&&(g.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){g.annotations=[];var p=Object.keys(g);for(a=0;a=0)return f}else if(typeof f=="string"&&(f=f.trim(),f.slice(-1)==="%"&&v(f.slice(0,-1))&&(f=+f.slice(0,-1),f>=0)))return f+"%"}function g(f,p,m,i,T,S){S=S||{};var M=S.moduleHasSelected!==!1,C=S.moduleHasUnselected!==!1,_=S.moduleHasConstrain!==!1,w=S.moduleHasCliponaxis!==!1,h=S.moduleHasTextangle!==!1,u=S.moduleHasInsideanchor!==!1,A=!!S.hasPathbar,b=Array.isArray(T)||T==="auto",z=b||T==="inside",I=b||T==="outside";if(z||I){var N=a(i,"textfont",m.font),R=x.extendFlat({},N),B=f.textfont&&f.textfont.color,F=!B;if(F&&delete R.color,a(i,"insidetextfont",R),A){var P=x.extendFlat({},N);F&&delete P.color,a(i,"pathbar.textfont",P)}I&&a(i,"outsidetextfont",N),M&&i("selected.textfont.color"),C&&i("unselected.textfont.color"),_&&i("constraintext"),w&&i("cliponaxis"),h&&i("textangle"),i("texttemplate"),i("texttemplatefallback")}z&&u&&i("insidetextanchor")}H.exports={supplyDefaults:o,crossTraceDefaults:s,handleText:g,validateCornerradius:c}}}),wx=Ee({"src/traces/bar/layout_defaults.js"(J,H){"use strict";var v=Ri(),x=uo(),E=Vr(),k=r1(),l=fh().validateCornerradius;H.exports=function(e,t,n){function r(M,C){return E.coerce(e,t,k,M,C)}for(var a=!1,o=!1,s=!1,c={},g=r("barmode"),f=g==="group",p=0;p0&&!c[i]&&(s=!0),c[i]=!0),m.visible&&m.type==="histogram"){var T=x.getFromId({_fullLayout:t},m[m.orientation==="v"?"xaxis":"yaxis"]);T.type!=="category"&&(o=!0)}}if(!a){delete t.barmode;return}g!=="overlay"&&r("barnorm"),r("bargap",o&&!s?0:.2),r("bargroupgap");var S=r("barcornerradius");t.barcornerradius=l(S)}}}),Q0=Ee({"src/traces/bar/arrays_to_calcdata.js"(J,H){"use strict";var v=Vr();H.exports=function(E,k){for(var l=0;lt;if(!n)return k}return l!==void 0?l:E.dflt},J.coerceColor=function(E,k,l){return H.isValid(k)?k:l!==void 0?l:E.dflt},J.coerceEnumerated=function(E,k,l){return E.coerceNumber&&(k=+k),E.values.indexOf(k)!==-1?k:l!==void 0?l:E.dflt},J.getValue=function(E,k){var l;return x(E)?k1||A.bargap===0&&A.bargroupgap===0&&!b[0].trace.marker.line.width)&&v.select(this).attr("shape-rendering","crispEdges")}),h.selectAll("g.points").each(function(b){var z=v.select(this),I=b[0].trace;c(z,I,w)}),l.getComponentMethod("errorbars","style")(h)}function c(w,h,u){E.pointStyle(w.selectAll("path"),h,u),g(w,h,u)}function g(w,h,u){w.selectAll("text").each(function(A){var b=v.select(this),z=k.ensureUniformFontSize(u,i(b,A,h,u));E.font(b,z)})}function f(w,h,u){var A=h[0].trace;A.selectedpoints?p(u,A,w):(c(u,A,w),l.getComponentMethod("errorbars","style")(u))}function p(w,h,u){E.selectedPointStyle(w.selectAll("path"),h),m(w.selectAll("text"),h,u)}function m(w,h,u){w.each(function(A){var b=v.select(this),z;if(A.selected){z=k.ensureUniformFontSize(u,i(b,A,h,u));var I=h.selected.textfont&&h.selected.textfont.color;I&&(z.color=I),E.font(b,z)}else E.selectedTextStyle(b,h)})}function i(w,h,u,A){var b=A._fullLayout.font,z=u.textfont;if(w.classed("bartext-inside")){var I=_(h,u);z=S(u,h.i,b,I)}else w.classed("bartext-outside")&&(z=M(u,h.i,b));return z}function T(w,h,u){return C(n,w.textfont,h,u)}function S(w,h,u,A){var b=T(w,h,u),z=w._input.textfont===void 0||w._input.textfont.color===void 0||Array.isArray(w.textfont.color)&&w.textfont.color[h]===void 0;return z&&(b={color:x.contrast(A),family:b.family,size:b.size,weight:b.weight,style:b.style,variant:b.variant,textcase:b.textcase,lineposition:b.lineposition,shadow:b.shadow}),C(r,w.insidetextfont,h,b)}function M(w,h,u){var A=T(w,h,u);return C(a,w.outsidetextfont,h,A)}function C(w,h,u,A){h=h||{};var b=o.getValue(h.family,u),z=o.getValue(h.size,u),I=o.getValue(h.color,u),N=o.getValue(h.weight,u),R=o.getValue(h.style,u),B=o.getValue(h.variant,u),F=o.getValue(h.textcase,u),P=o.getValue(h.lineposition,u),j=o.getValue(h.shadow,u);return{family:o.coerceString(w.family,b,A.family),size:o.coerceNumber(w.size,z,A.size),color:o.coerceColor(w.color,I,A.color),weight:o.coerceString(w.weight,N,A.weight),style:o.coerceString(w.style,R,A.style),variant:o.coerceString(w.variant,B,A.variant),textcase:o.coerceString(w.variant,F,A.textcase),lineposition:o.coerceString(w.variant,P,A.lineposition),shadow:o.coerceString(w.variant,j,A.shadow)}}function _(w,h){return h.type==="waterfall"?h[w.dir].marker.color:w.mcc||w.mc||h.marker.color}H.exports={style:s,styleTextPoints:g,styleOnSelect:f,getInsideTextFont:S,getOutsideTextFont:M,getBarColor:_,resizeText:e}}}),zv=Ee({"src/traces/bar/plot.js"(J,H){"use strict";var v=Va(),x=mi(),E=Vr(),k=Fs(),l=Qn(),e=mo(),t=Ri(),n=uo().tickText,r=Ef(),a=r.recordMinTextSize,o=r.clearMinTextSize,s=bh(),c=n1(),g=Jd(),f=Zh(),p=f.text,m=f.textposition,i=Qf().appendArrayPointValue,T=g.TEXTPAD;function S(re){return re.id}function M(re){if(re.ids)return S}function C(re){return(re>0)-(re<0)}function _(re,ne){return re0}function A(re,ne,oe,V,$,K){var G=ne.xaxis,X=ne.yaxis,q=re._fullLayout,W=re._context.staticPlot;$||($={mode:q.barmode,norm:q.barmode,gap:q.bargap,groupgap:q.bargroupgap},o("bar",q));var ee=E.makeTraceGroups(V,oe,"trace bars").each(function(ae){var fe=v.select(this),ye=ae[0].trace,xe=ae[0].t,Ae=ye.type==="waterfall",Me=ye.type==="funnel",Ie=ye.type==="histogram",qe=ye.type==="bar",je=qe||Me,ke=0;Ae&&ye.connector.visible&&ye.connector.mode==="between"&&(ke=ye.connector.line.width/2);var ge=ye.orientation==="h",le=u($),ve=E.ensureSingle(fe,"g","points"),se=M(ye),Te=ve.selectAll("g.point").data(E.identity,se);Te.enter().append("g").classed("point",!0),Te.exit().remove(),Te.each(function(We,Ge){var gt=v.select(this),mt=w(We,G,X,ge),Tt=mt[0][0],At=mt[0][1],Kt=mt[1][0],ar=mt[1][1],_r=(ge?At-Tt:ar-Kt)===0;_r&&je&&c.getLineWidth(ye,We)&&(_r=!1),_r||(_r=!x(Tt)||!x(At)||!x(Kt)||!x(ar)),We.isBlank=_r,_r&&(ge?At=Tt:ar=Kt),ke&&!_r&&(ge?(Tt-=_(Tt,At)*ke,At+=_(Tt,At)*ke):(Kt-=_(Kt,ar)*ke,ar+=_(Kt,ar)*ke));var Zt,sr;if(ye.type==="waterfall"){if(!_r){var Ot=ye[We.dir].marker;Zt=Ot.line.width,sr=Ot.color}}else Zt=c.getLineWidth(ye,We),sr=We.mc||ye.marker.color;function vt(aa){var xa=v.round(Zt/2%1,2);return $.gap===0&&$.groupgap===0?v.round(Math.round(aa)-xa,2):aa}function ht(aa,xa,ja){return ja&&aa===xa?aa:Math.abs(aa-xa)>=2?vt(aa):aa>xa?Math.ceil(aa):Math.floor(aa)}var Re=l.opacity(sr),Be=Re<1||Zt>.01?vt:ht;re._context.staticPlot||(Tt=Be(Tt,At,ge),At=Be(At,Tt,ge),Kt=Be(Kt,ar,!ge),ar=Be(ar,Kt,!ge));var He=ge?G.c2p:X.c2p,$e;We.s0>0?$e=We._sMax:We.s0<0?$e=We._sMin:$e=We.s1>0?We._sMax:We._sMin;function Ze(aa,xa){if(!aa)return 0;var ja=Math.abs(ge?ar-Kt:At-Tt),Oa=Math.abs(ge?At-Tt:ar-Kt),An=Be(Math.abs(He($e,!0)-He(0,!0))),un=We.hasB?Math.min(ja/2,Oa/2):Math.min(ja/2,An),Ja;if(xa==="%"){var ei=Math.min(50,aa);Ja=ja*(ei/100)}else Ja=aa;return Be(Math.max(Math.min(Ja,un),0))}var Je=qe||Ie?Ze(xe.cornerradiusvalue,xe.cornerradiusform):0,Mt,dt,Dt="M"+Tt+","+Kt+"V"+ar+"H"+At+"V"+Kt+"Z",Ct=0;if(Je&&We.s){var Vt=C(We.s0)===0||C(We.s)===C(We.s0)?We.s1:We.s0;if(Ct=Be(We.hasB?0:Math.abs(He($e,!0)-He(Vt,!0))),Ct0?Math.sqrt(Ct*(2*Je-Ct)):0,It=Ht>0?Math.max:Math.min;Mt="M"+Tt+","+Kt+"V"+(ar-ia*Wt)+"H"+It(At-(Je-Ct)*Ht,Tt)+"A "+Je+","+Je+" 0 0 "+Sr+" "+At+","+(ar-Je*Wt-$t)+"V"+(Kt+Je*Wt+$t)+"A "+Je+","+Je+" 0 0 "+Sr+" "+It(At-(Je-Ct)*Ht,Tt)+","+(Kt+ia*Wt)+"Z"}else if(We.hasB)Mt="M"+(Tt+Je*Ht)+","+Kt+"A "+Je+","+Je+" 0 0 "+Sr+" "+Tt+","+(Kt+Je*Wt)+"V"+(ar-Je*Wt)+"A "+Je+","+Je+" 0 0 "+Sr+" "+(Tt+Je*Ht)+","+ar+"H"+(At-Je*Ht)+"A "+Je+","+Je+" 0 0 "+Sr+" "+At+","+(ar-Je*Wt)+"V"+(Kt+Je*Wt)+"A "+Je+","+Je+" 0 0 "+Sr+" "+(At-Je*Ht)+","+Kt+"Z";else{dt=Math.abs(ar-Kt)+Ct;var ir=dt0?Math.sqrt(Ct*(2*Je-Ct)):0,fr=Wt>0?Math.max:Math.min;Mt="M"+(Tt+ir*Ht)+","+Kt+"V"+fr(ar-(Je-Ct)*Wt,Kt)+"A "+Je+","+Je+" 0 0 "+Sr+" "+(Tt+Je*Ht-cr)+","+ar+"H"+(At-Je*Ht+cr)+"A "+Je+","+Je+" 0 0 "+Sr+" "+(At-ir*Ht)+","+fr(ar-(Je-Ct)*Wt,Kt)+"V"+Kt+"Z"}}else Mt=Dt}else Mt=Dt;var Ir=h(E.ensureSingle(gt,"path"),q,$,K);if(Ir.style("vector-effect",W?"none":"non-scaling-stroke").attr("d",isNaN((At-Tt)*(ar-Kt))||_r&&re._context.staticPlot?"M0,0Z":Mt).call(e.setClipUrl,ne.layerClipId,re),!q.uniformtext.mode&&le){var sa=e.makePointStyleFns(ye);e.singlePointStyle(We,Ir,ye,sa,re)}b(re,ne,gt,ae,Ge,Tt,At,Kt,ar,Je,Ct,$,K),ne.layerClipId&&e.hideOutsideRangePoint(We,gt.select("text"),G,X,ye.xcalendar,ye.ycalendar)});var Fe=ye.cliponaxis===!1;e.setClipUrl(fe,Fe?null:ne.layerClipId,re)});t.getComponentMethod("errorbars","plot")(re,ee,ne,$)}function b(re,ne,oe,V,$,K,G,X,q,W,ee,ae,fe){var ye=ne.xaxis,xe=ne.yaxis,Ae=re._fullLayout,Me;function Ie(Dt,Ct,Vt){var Ht=E.ensureSingle(Dt,"text").text(Ct).attr({class:"bartext bartext-"+Me,"text-anchor":"middle","data-notex":1}).call(e.font,Vt).call(k.convertToTspans,re);return Ht}var qe=V[0].trace,je=qe.orientation==="h",ke=U(V,je,ye,xe),ge=P(Ae,V,$,ye,xe);Me=j(qe,$);var le=ae.mode==="stack"||ae.mode==="relative",ve=V[$],se=!le||ve._outmost,Te=ve.hasB,Fe=W&&W-ee>T;if(!ge||Me==="none"||(ve.isBlank||K===G||X===q)&&(Me==="auto"||Me==="inside")){oe.select("text").remove();return}var We=Ae.font,Ge=s.getBarColor(V[$],qe),gt=s.getInsideTextFont(qe,$,We,Ge),mt=s.getOutsideTextFont(qe,$,We),Tt=qe.insidetextanchor||"end",At=oe.datum();je?ye.type==="log"&&At.s0<=0&&(ye.range[0]0&&ht>0,He;Fe?Te?He=z(_r-2*W,Zt,vt,ht,je)||z(_r,Zt-2*W,vt,ht,je):je?He=z(_r-(W-ee),Zt,vt,ht,je)||z(_r,Zt-2*(W-ee),vt,ht,je):He=z(_r,Zt-(W-ee),vt,ht,je)||z(_r-2*(W-ee),Zt,vt,ht,je):He=z(_r,Zt,vt,ht,je),Be&&He?Me="inside":(Me="outside",sr.remove(),sr=null)}else Me="inside";if(!sr){Re=E.ensureUniformFontSize(re,Me==="outside"?mt:gt),sr=Ie(oe,ge,Re);var $e=sr.attr("transform");if(sr.attr("transform",""),Ot=e.bBox(sr.node()),vt=Ot.width,ht=Ot.height,sr.attr("transform",$e),vt<=0||ht<=0){sr.remove();return}}var Ze=qe.textangle,Je,Mt;Me==="outside"?(Mt=qe.constraintext==="both"||qe.constraintext==="outside",Je=F(K,G,X,q,Ot,{isHorizontal:je,constrained:Mt,angle:Ze,zeroBarDir:ke})):(Mt=qe.constraintext==="both"||qe.constraintext==="inside",Je=R(K,G,X,q,Ot,{isHorizontal:je,constrained:Mt,angle:Ze,anchor:Tt,hasB:Te,r:W,overhead:ee})),Je.fontSize=Re.size,a(qe.type==="histogram"?"bar":qe.type,Je,Ae),ve.transform=Je;var dt=h(sr,Ae,ae,fe);E.setTransormAndDisplay(dt,Je)}function z(re,ne,oe,V,$){if(re<0||ne<0)return!1;var K=oe<=re&&V<=ne,G=oe<=ne&&V<=re,X=$?re>=oe*(ne/V):ne>=V*(re/oe);return K||G||X}function I(re){return re==="auto"?0:re}function N(re,ne){var oe=Math.PI/180*ne,V=Math.abs(Math.sin(oe)),$=Math.abs(Math.cos(oe));return{x:re.width*$+re.height*V,y:re.width*V+re.height*$}}function R(re,ne,oe,V,$,K){var G=!!K.isHorizontal,X=!!K.constrained,q=K.angle||0,W=K.anchor,ee=W==="end",ae=W==="start",fe=K.leftToRight||0,ye=(fe+1)/2,xe=1-ye,Ae=K.hasB,Me=K.r,Ie=K.overhead,qe=$.width,je=$.height,ke=Math.abs(ne-re),ge=Math.abs(V-oe),le=ke>2*T&&ge>2*T?T:0;ke-=2*le,ge-=2*le;var ve=I(q);q==="auto"&&!(qe<=ke&&je<=ge)&&(qe>ke||je>ge)&&(!(qe>ge||je>ke)||qeT){var We=B(re,ne,oe,V,se,Me,Ie,G,Ae);Te=We.scale,Fe=We.pad}else Te=1,X&&(Te=Math.min(1,ke/se.x,ge/se.y)),Fe=0;var Ge=$.left*xe+$.right*ye,gt=($.top+$.bottom)/2,mt=(re+T)*xe+(ne-T)*ye,Tt=(oe+V)/2,At=0,Kt=0;if(ae||ee){var ar=(G?se.x:se.y)/2;Me&&(ee||Ae)&&(le+=Fe);var _r=G?_(re,ne):_(oe,V);G?ae?(mt=re+_r*le,At=-_r*ar):(mt=ne-_r*le,At=_r*ar):ae?(Tt=oe+_r*le,Kt=-_r*ar):(Tt=V-_r*le,Kt=_r*ar)}return{textX:Ge,textY:gt,targetX:mt,targetY:Tt,anchorX:At,anchorY:Kt,scale:Te,rotate:ve}}function B(re,ne,oe,V,$,K,G,X,q){var W=Math.max(0,Math.abs(ne-re)-2*T),ee=Math.max(0,Math.abs(V-oe)-2*T),ae=K-T,fe=G?ae-Math.sqrt(ae*ae-(ae-G)*(ae-G)):ae,ye=q?ae*2:X?ae-G:2*fe,xe=q?ae*2:X?2*fe:ae-G,Ae,Me,Ie,qe,je;return $.y/$.x>=ee/(W-ye)?qe=ee/$.y:$.y/$.x<=(ee-xe)/W?qe=W/$.x:!q&&X?(Ae=$.x*$.x+$.y*$.y/4,Me=-2*$.x*(W-ae)-$.y*(ee/2-ae),Ie=(W-ae)*(W-ae)+(ee/2-ae)*(ee/2-ae)-ae*ae,qe=(-Me+Math.sqrt(Me*Me-4*Ae*Ie))/(2*Ae)):q?(Ae=($.x*$.x+$.y*$.y)/4,Me=-$.x*(W/2-ae)-$.y*(ee/2-ae),Ie=(W/2-ae)*(W/2-ae)+(ee/2-ae)*(ee/2-ae)-ae*ae,qe=(-Me+Math.sqrt(Me*Me-4*Ae*Ie))/(2*Ae)):(Ae=$.x*$.x/4+$.y*$.y,Me=-$.x*(W/2-ae)-2*$.y*(ee-ae),Ie=(W/2-ae)*(W/2-ae)+(ee-ae)*(ee-ae)-ae*ae,qe=(-Me+Math.sqrt(Me*Me-4*Ae*Ie))/(2*Ae)),qe=Math.min(1,qe),X?je=Math.max(0,ae-Math.sqrt(Math.max(0,ae*ae-(ae-(ee-$.y*qe)/2)*(ae-(ee-$.y*qe)/2)))-G):je=Math.max(0,ae-Math.sqrt(Math.max(0,ae*ae-(ae-(W-$.x*qe)/2)*(ae-(W-$.x*qe)/2)))-G),{scale:qe,pad:je}}function F(re,ne,oe,V,$,K){var G=!!K.isHorizontal,X=!!K.constrained,q=K.angle||0,W=$.width,ee=$.height,ae=Math.abs(ne-re),fe=Math.abs(V-oe),ye;G?ye=fe>2*T?T:0:ye=ae>2*T?T:0;var xe=1;X&&(xe=G?Math.min(1,fe/ee):Math.min(1,ae/W));var Ae=I(q),Me=N($,Ae),Ie=(G?Me.x:Me.y)/2,qe=($.left+$.right)/2,je=($.top+$.bottom)/2,ke=(re+ne)/2,ge=(oe+V)/2,le=0,ve=0,se;return(G?re===ne:oe===V)&&K.zeroBarDir?se=K.zeroBarDir:se=G?_(ne,re):_(oe,V),G?(ke=ne-se*ye,le=se*Ie):(ge=V+se*ye,ve=-se*Ie),{textX:qe,textY:je,targetX:ke,targetY:ge,anchorX:le,anchorY:ve,scale:xe,rotate:Ae}}function P(re,ne,oe,V,$){var K=ne[0].trace,G=K.texttemplate,X;return G?X=Z(re,ne,oe,V,$):K.textinfo?X=Q(ne,oe,V,$):X=c.getValue(K.text,oe),c.coerceString(p,X)}function j(re,ne){var oe=c.getValue(re.textposition,ne);return c.coerceEnumerated(m,oe)}function U(re,ne,oe,V){for(var $=!1,K=!1,G=0;G0?$=!0:X<0&&(K=!0),$&&K)return 0}var q=ne?oe:V,W=-_(q.range[0],q.range[1]);return K?$?0:-W:W}function Z(re,ne,oe,V,$){var K=ne[0].trace,G=E.castOption(K,oe,"texttemplate");if(!G)return"";var X=K.type==="histogram",q=K.type==="waterfall",W=K.type==="funnel",ee=K.orientation==="h",ae,fe,ye,xe;ee?(ae="y",fe=$,ye="x",xe=V):(ae="x",fe=V,ye="y",xe=$);function Ae(le){return n(fe,fe.c2l(le),!0).text}function Me(le){return n(xe,xe.c2l(le),!0).text}var Ie=ne[oe],qe={};qe.label=Ie.p,qe.labelLabel=qe[ae+"Label"]=Ae(Ie.p);var je=E.castOption(K,Ie.i,"text");(je===0||je)&&(qe.text=je),qe.value=Ie.s,qe.valueLabel=qe[ye+"Label"]=Me(Ie.s);var ke={};i(ke,K,Ie.i),(X||ke.x===void 0)&&(ke.x=ee?qe.value:qe.label),(X||ke.y===void 0)&&(ke.y=ee?qe.label:qe.value),(X||ke.xLabel===void 0)&&(ke.xLabel=ee?qe.valueLabel:qe.labelLabel),(X||ke.yLabel===void 0)&&(ke.yLabel=ee?qe.labelLabel:qe.valueLabel),q&&(qe.delta=+Ie.rawS||Ie.s,qe.deltaLabel=Me(qe.delta),qe.final=Ie.v,qe.finalLabel=Me(qe.final),qe.initial=qe.final-qe.delta,qe.initialLabel=Me(qe.initial)),W&&(qe.value=Ie.s,qe.valueLabel=Me(qe.value),qe.percentInitial=Ie.begR,qe.percentInitialLabel=E.formatPercent(Ie.begR),qe.percentPrevious=Ie.difR,qe.percentPreviousLabel=E.formatPercent(Ie.difR),qe.percentTotal=Ie.sumR,qe.percenTotalLabel=E.formatPercent(Ie.sumR));var ge=E.castOption(K,Ie.i,"customdata");return ge&&(qe.customdata=ge),E.texttemplateString({data:[ke,qe,K._meta],fallback:K.texttemplatefallback,labels:qe,locale:re._d3locale,template:G})}function Q(re,ne,oe,V){var $=re[0].trace,K=$.orientation==="h",G=$.type==="waterfall",X=$.type==="funnel";function q(ge){var le=K?V:oe;return n(le,ge,!0).text}function W(ge){var le=K?oe:V;return n(le,+ge,!0).text}var ee=$.textinfo,ae=re[ne],fe=ee.split("+"),ye=[],xe,Ae=function(ge){return fe.indexOf(ge)!==-1};if(Ae("label")&&ye.push(q(re[ne].p)),Ae("text")&&(xe=E.castOption($,ae.i,"text"),(xe===0||xe)&&ye.push(xe)),G){var Me=+ae.rawS||ae.s,Ie=ae.v,qe=Ie-Me;Ae("initial")&&ye.push(W(qe)),Ae("delta")&&ye.push(W(Me)),Ae("final")&&ye.push(W(Ie))}if(X){Ae("value")&&ye.push(W(ae.s));var je=0;Ae("percent initial")&&je++,Ae("percent previous")&&je++,Ae("percent total")&&je++;var ke=je>1;Ae("percent initial")&&(xe=E.formatPercent(ae.begR),ke&&(xe+=" of initial"),ye.push(xe)),Ae("percent previous")&&(xe=E.formatPercent(ae.difR),ke&&(xe+=" of previous"),ye.push(xe)),Ae("percent total")&&(xe=E.formatPercent(ae.sumR),ke&&(xe+=" of total"),ye.push(xe))}return ye.join("
")}H.exports={plot:A,toMoveInsideBar:R}}}),Gp=Ee({"src/traces/bar/hover.js"(J,H){"use strict";var v=$l(),x=Ri(),E=Qn(),k=Vr().fillText,l=n1().getLineWidth,e=uo().hoverLabelText,t=Qi().BADNUM;function n(o,s,c,g,f){var p=r(o,s,c,g,f);if(p){var m=p.cd,i=m[0].trace,T=m[p.index];return p.color=a(i,T),x.getComponentMethod("errorbars","hoverInfo")(T,i,p),[p]}}function r(o,s,c,g,f){var p=o.cd,m=p[0].trace,i=p[0].t,T=g==="closest",S=m.type==="waterfall",M=o.maxHoverDistance,C=o.maxSpikeDistance,_,w,h,u,A,b,z;m.orientation==="h"?(_=c,w=s,h="y",u="x",A=oe,b=Q):(_=s,w=c,h="x",u="y",b=oe,A=Q);var I=m[h+"period"],N=T||I;function R(ye){return F(ye,-1)}function B(ye){return F(ye,1)}function F(ye,xe){var Ae=ye.w;return ye[h]+xe*Ae/2}function P(ye){return ye[h+"End"]-ye[h+"Start"]}var j=T?R:I?function(ye){return ye.p-P(ye)/2}:function(ye){return Math.min(R(ye),ye.p-i.bardelta/2)},U=T?B:I?function(ye){return ye.p+P(ye)/2}:function(ye){return Math.max(B(ye),ye.p+i.bardelta/2)};function Z(ye,xe,Ae){return f.finiteRange&&(Ae=0),v.inbox(ye-_,xe-_,Ae+Math.min(1,Math.abs(xe-ye)/z)-1)}function Q(ye){return Z(j(ye),U(ye),M)}function re(ye){return Z(R(ye),B(ye),C)}function ne(ye){var xe=ye[u];if(S){var Ae=Math.abs(ye.rawS)||0;w>0?xe+=Ae:w<0&&(xe-=Ae)}return xe}function oe(ye){var xe=w,Ae=ye.b,Me=ne(ye);return v.inbox(Ae-xe,Me-xe,M+(Me-xe)/(Me-Ae)-1)}function V(ye){var xe=w,Ae=ye.b,Me=ne(ye);return v.inbox(Ae-xe,Me-xe,C+(Me-xe)/(Me-Ae)-1)}var $=o[h+"a"],K=o[u+"a"];z=Math.abs($.r2c($.range[1])-$.r2c($.range[0]));function G(ye){return(A(ye)+b(ye))/2}var X=v.getDistanceFunction(g,A,b,G);if(v.getClosest(p,X,o),o.index!==!1&&p[o.index].p!==t){N||(j=function(ye){return Math.min(R(ye),ye.p-i.bargroupwidth/2)},U=function(ye){return Math.max(B(ye),ye.p+i.bargroupwidth/2)});var q=o.index,W=p[q],ee=m.base?W.b+W.s:W.s;o[u+"0"]=o[u+"1"]=K.c2p(W[u],!0),o[u+"LabelVal"]=ee;var ae=i.extents[i.extents.round(W.p)];o[h+"0"]=$.c2p(T?j(W):ae[0],!0),o[h+"1"]=$.c2p(T?U(W):ae[1],!0);var fe=W.orig_p!==void 0;return o[h+"LabelVal"]=fe?W.orig_p:W.p,o.labelLabel=e($,o[h+"LabelVal"],m[h+"hoverformat"]),o.valueLabel=e(K,o[u+"LabelVal"],m[u+"hoverformat"]),o.baseLabel=e(K,W.b,m[u+"hoverformat"]),o.spikeDistance=(V(W)+re(W))/2,o[h+"Spike"]=$.c2p(W.p,!0),k(W,m,o),o.hovertemplate=m.hovertemplate,o}}function a(o,s){var c=s.mcc||o.marker.color,g=s.mlcc||o.marker.line.color,f=l(o,s);if(E.opacity(c))return c;if(E.opacity(g)&&f)return g}H.exports={hoverPoints:n,hoverOnBars:r,getTraceColor:a}}}),rS=Ee({"src/traces/bar/event_data.js"(J,H){"use strict";H.exports=function(x,E,k){return x.x="xVal"in E?E.xVal:E.x,x.y="yVal"in E?E.yVal:E.y,E.xa&&(x.xaxis=E.xa),E.ya&&(x.yaxis=E.ya),k.orientation==="h"?(x.label=x.y,x.value=x.x):(x.label=x.x,x.value=x.y),x}}}),Wp=Ee({"src/traces/bar/select.js"(J,H){"use strict";H.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,n=l[0].trace,r=n.type==="funnel",a=n.orientation==="h",o=[],s;if(k===!1)for(s=0;s0?(I="v",h>0?N=Math.min(A,u):N=Math.min(u)):h>0?(I="h",N=Math.min(A)):N=0;if(!N){c.visible=!1;return}c._length=N;var j=g("orientation",I);c._hasPreCompStats?j==="v"&&h===0?(g("x0",0),g("dx",1)):j==="h"&&w===0&&(g("y0",0),g("dy",1)):j==="v"&&h===0?g("x0"):j==="h"&&w===0&&g("y0");var U=x.getComponentMethod("calendars","handleTraceDefaults");U(s,c,["x","y"],f)}function a(s,c,g,f){var p=f.prefix,m=v.coerce2(s,c,t,"marker.outliercolor"),i=g("marker.line.outliercolor"),T="outliers";c._hasPreCompStats?T="all":(m||i)&&(T="suspectedoutliers");var S=g(p+"points",T);S?(g("jitter",S==="all"?.3:0),g("pointpos",S==="all"?-1.5:0),g("marker.symbol"),g("marker.opacity"),g("marker.size"),g("marker.angle"),g("marker.color",c.line.color),g("marker.line.color"),g("marker.line.width"),S==="suspectedoutliers"&&(g("marker.line.outliercolor",c.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 c.marker;var M=g("hoveron");(M==="all"||M.indexOf("points")!==-1)&&(g("hovertemplate"),g("hovertemplatefallback")),v.coerceSelectionMarkerOpacity(c,g)}function o(s,c){var g,f;function p(S){return v.coerce(f._input,f,t,S)}for(var m=0;mne.uf};if(C._hasPreCompStats){var q=C[N],W=function(ar){return I.d2c((C[ar]||[])[b])},ee=1/0,ae=-1/0;for(b=0;b=ne.q1&&ne.q3>=ne.med){var ye=W("lowerfence");ne.lf=ye!==l&&ye<=ne.q1?ye:f(ne,V,$);var xe=W("upperfence");ne.uf=xe!==l&&xe>=ne.q3?xe:p(ne,V,$);var Ae=W("mean");ne.mean=Ae!==l?Ae:$?k.mean(V,$):(ne.q1+ne.q3)/2;var Me=W("sd");ne.sd=Ae!==l&&Me>=0?Me:$?k.stdev(V,$,ne.mean):ne.q3-ne.q1,ne.lo=m(ne),ne.uo=i(ne);var Ie=W("notchspan");Ie=Ie!==l&&Ie>0?Ie:T(ne,$),ne.ln=ne.med-Ie,ne.un=ne.med+Ie;var qe=ne.lf,je=ne.uf;C.boxpoints&&V.length&&(qe=Math.min(qe,V[0]),je=Math.max(je,V[$-1])),C.notched&&(qe=Math.min(qe,ne.ln),je=Math.max(je,ne.un)),ne.min=qe,ne.max=je}else{k.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+ne.q1,"median = "+ne.med,"q3 = "+ne.q3].join(` +`));var ke;ne.med!==l?ke=ne.med:ne.q1!==l?ne.q3!==l?ke=(ne.q1+ne.q3)/2:ke=ne.q1:ne.q3!==l?ke=ne.q3:ke=0,ne.med=ke,ne.q1=ne.q3=ke,ne.lf=ne.uf=ke,ne.mean=ne.sd=ke,ne.ln=ne.un=ke,ne.min=ne.max=ke}ee=Math.min(ee,ne.min),ae=Math.max(ae,ne.max),ne.pts2=oe.filter(X),u.push(ne)}}C._extremes[I._id]=x.findExtremes(I,[ee,ae],{padded:!0})}else{var ge=I.makeCalcdata(C,N),le=n(Q,re),ve=Q.length,se=r(ve);for(b=0;b=0&&Te0){if(ne={},ne.pos=ne[B]=Q[b],oe=ne.pts=se[b].sort(c),V=ne[N]=oe.map(g),$=V.length,ne.min=V[0],ne.max=V[$-1],ne.mean=k.mean(V,$),ne.sd=k.stdev(V,$,ne.mean)*C.sdmultiple,ne.med=k.interp(V,.5),$%2&&(gt||mt)){var Tt,At;gt?(Tt=V.slice(0,$/2),At=V.slice($/2+1)):mt&&(Tt=V.slice(0,$/2+1),At=V.slice($/2)),ne.q1=k.interp(Tt,.5),ne.q3=k.interp(At,.5)}else ne.q1=k.interp(V,.25),ne.q3=k.interp(V,.75);ne.lf=f(ne,V,$),ne.uf=p(ne,V,$),ne.lo=m(ne),ne.uo=i(ne);var Kt=T(ne,$);ne.ln=ne.med-Kt,ne.un=ne.med+Kt,Fe=Math.min(Fe,ne.ln),We=Math.max(We,ne.un),ne.pts2=oe.filter(X),u.push(ne)}C.notched&&k.isTypedArray(ge)&&(ge=Array.from(ge)),C._extremes[I._id]=x.findExtremes(I,C.notched?ge.concat([Fe,We]):ge,{padded:!0})}return s(u,C),u.length>0?(u[0].t={num:_[A],dPos:re,posLetter:B,valLetter:N,labels:{med:e(M,"median:"),min:e(M,"min:"),q1:e(M,"q1:"),q3:e(M,"q3:"),max:e(M,"max:"),mean:C.boxmean==="sd"||C.sizemode==="sd"?e(M,"mean \xB1 \u03C3:").replace("\u03C3",C.sdmultiple===1?"\u03C3":C.sdmultiple+"\u03C3"):e(M,"mean:"),lf:e(M,"lower fence:"),uf:e(M,"upper fence:")}},_[A]++,u):[{t:{empty:!0}}]};function t(S,M,C,_){var w=M in S,h=M+"0"in S,u="d"+M in S;if(w||h&&u){var A=C.makeCalcdata(S,M),b=E(S,C,M,A).vals;return[b,A]}var z;h?z=S[M+"0"]:"name"in S&&(C.type==="category"||v(S.name)&&["linear","log"].indexOf(C.type)!==-1||k.isDateTime(S.name)&&C.type==="date")?z=S.name:z=_;for(var I=C.type==="multicategory"?C.r2c_just_indices(z):C.d2c(z,0,S[M+"calendar"]),N=S._length,R=new Array(N),B=0;B1,h=1-s[t+"gap"],u=1-s[t+"groupgap"];for(f=0;f0;if(I==="positive"?(ne=N*(z?1:.5),$=V,oe=$=B):I==="negative"?(ne=$=B,oe=N*(z?1:.5),K=V):(ne=oe=N,$=K=V),ae){var fe=A.pointpos,ye=A.jitter,xe=A.marker.size/2,Ae=0;fe+ye>=0&&(Ae=V*(fe+ye),Ae>ne?(ee=!0,q=xe,G=Ae):Ae>$&&(q=xe,G=ne)),Ae<=ne&&(G=ne);var Me=0;fe-ye<=0&&(Me=-V*(fe-ye),Me>oe?(ee=!0,W=xe,X=Me):Me>K&&(W=xe,X=oe)),Me<=oe&&(X=oe)}else G=ne,X=oe;var Ie=new Array(m.length);for(p=0;pC.lo&&(j.so=!0)}return w});M.enter().append("path").classed("point",!0),M.exit().remove(),M.call(E.translatePoints,g,f)}function r(a,o,s,c){var g=o.val,f=o.pos,p=!!f.rangebreaks,m=c.bPos,i=c.bPosPxOffset||0,T=s.boxmean||(s.meanline||{}).visible,S,M;Array.isArray(c.bdPos)?(S=c.bdPos[0],M=c.bdPos[1]):(S=c.bdPos,M=c.bdPos);var C=a.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?x.identity:[]);C.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),C.exit().remove(),C.each(function(_){var w=f.c2l(_.pos+m,!0),h=f.l2p(w-S)+i,u=f.l2p(w+M)+i,A=p?(h+u)/2:f.l2p(w)+i,b=g.c2p(_.mean,!0),z=g.c2p(_.mean-_.sd,!0),I=g.c2p(_.mean+_.sd,!0);s.orientation==="h"?v.select(this).attr("d","M"+b+","+h+"V"+u+(T==="sd"?"m0,0L"+z+","+A+"L"+b+","+h+"L"+I+","+A+"Z":"")):v.select(this).attr("d","M"+h+","+b+"H"+u+(T==="sd"?"m0,0L"+A+","+z+"L"+h+","+b+"L"+A+","+I+"Z":""))})}H.exports={plot:e,plotBoxAndWhiskers:t,plotPoints:n,plotBoxMean:r}}}),l1=Ee({"src/traces/box/style.js"(J,H){"use strict";var v=Va(),x=Qn(),E=mo();function k(e,t,n){var r=n||v.select(e).selectAll("g.trace.boxes");r.style("opacity",function(a){return a[0].trace.opacity}),r.each(function(a){var o=v.select(this),s=a[0].trace,c=s.line.width;function g(m,i,T,S){m.style("stroke-width",i+"px").call(x.stroke,T).call(x.fill,S)}var f=o.selectAll("path.box");if(s.type==="candlestick")f.each(function(m){if(!m.empty){var i=v.select(this),T=s[m.dir];g(i,T.line.width,T.line.color,T.fillcolor),i.style("opacity",s.selectedpoints&&!m.selected?.3:1)}});else{g(f,c,s.line.color,s.fillcolor),o.selectAll("path.mean").style({"stroke-width":c,"stroke-dasharray":2*c+"px,"+c+"px"}).call(x.stroke,s.line.color);var p=o.selectAll("path.point");E.pointStyle(p,s,e)}})}function l(e,t,n){var r=t[0].trace,a=n.selectAll("path.point");r.selectedpoints?E.selectedPointStyle(a,r):E.pointStyle(a,r,e)}H.exports={style:k,styleOnSelect:l}}}),Ax=Ee({"src/traces/box/hover.js"(J,H){"use strict";var v=uo(),x=Vr(),E=$l(),k=Qn(),l=x.fillText;function e(r,a,o,s){var c=r.cd,g=c[0].trace,f=g.hoveron,p=[],m;return f.indexOf("boxes")!==-1&&(p=p.concat(t(r,a,o,s))),f.indexOf("points")!==-1&&(m=n(r,a,o)),s==="closest"?m?[m]:p:(m&&p.push(m),p)}function t(r,a,o,s){var c=r.cd,g=r.xa,f=r.ya,p=c[0].trace,m=c[0].t,i=p.type==="violin",T,S,M,C,_,w,h,u,A,b,z,I=m.bdPos,N,R,B=m.wHover,F=function(Me){return M.c2l(Me.pos)+m.bPos-M.c2l(w)};i&&p.side!=="both"?(p.side==="positive"&&(A=function(Me){var Ie=F(Me);return E.inbox(Ie,Ie+B,b)},N=I,R=0),p.side==="negative"&&(A=function(Me){var Ie=F(Me);return E.inbox(Ie-B,Ie,b)},N=0,R=I)):(A=function(Me){var Ie=F(Me);return E.inbox(Ie-B,Ie+B,b)},N=R=I);var P;i?P=function(Me){return E.inbox(Me.span[0]-_,Me.span[1]-_,b)}:P=function(Me){return E.inbox(Me.min-_,Me.max-_,b)},p.orientation==="h"?(_=a,w=o,h=P,u=A,T="y",M=f,S="x",C=g):(_=o,w=a,h=A,u=P,T="x",M=g,S="y",C=f);var j=Math.min(1,I/Math.abs(M.r2c(M.range[1])-M.r2c(M.range[0])));b=r.maxHoverDistance-j,z=r.maxSpikeDistance-j;function U(Me){return(h(Me)+u(Me))/2}var Z=E.getDistanceFunction(s,h,u,U);if(E.getClosest(c,Z,r),r.index===!1)return[];var Q=c[r.index],re=p.line.color,ne=(p.marker||{}).color;k.opacity(re)&&p.line.width?r.color=re:k.opacity(ne)&&p.boxpoints?r.color=ne:r.color=p.fillcolor,r[T+"0"]=M.c2p(Q.pos+m.bPos-R,!0),r[T+"1"]=M.c2p(Q.pos+m.bPos+N,!0),r[T+"LabelVal"]=Q.orig_p!==void 0?Q.orig_p:Q.pos;var oe=T+"Spike";r.spikeDistance=U(Q)*z/b,r[oe]=M.c2p(Q.pos,!0);var V=p.boxmean||p.sizemode==="sd"||(p.meanline||{}).visible,$=p.boxpoints||p.points,K=$&&V?["max","uf","q3","med","mean","q1","lf","min"]:$&&!V?["max","uf","q3","med","q1","lf","min"]:!$&&V?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],G=C.range[1]0&&(n=!0);for(var s=0;se){var t=e-k[x];return k[x]=e,t}}else return k[x]=e,e;return 0},max:function(x,E,k,l){var e=l[E];if(v(e))if(e=Number(e),v(k[x])){if(k[x]h&&hk){var b=u===x?1:6,z=u===x?"M12":"M1";return function(I,N){var R=m.c2d(I,x,i),B=R.indexOf("-",b);B>0&&(R=R.slice(0,B));var F=m.d2c(R,0,i);if(Ft?c>k?c>x*1.1?x:c>E*1.1?E:k:c>l?l:c>e?e:t:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function o(c,g,f,p,m,i){if(p&&c>k){var T=s(g,m,i),S=s(f,m,i),M=c===x?0:1;return T[M]!==S[M]}return Math.floor(f/c)-Math.floor(g/c)>.1}function s(c,g,f){var p=g.c2d(c,x,f).split("-");return p[0]===""&&(p.unshift(),p[0]="-"+p[0]),p}}}),Px=Ee({"src/traces/histogram/calc.js"(J,H){"use strict";var v=mi(),x=Vr(),E=Ri(),k=uo(),{hasColorscale:l}=cf(),e=Sf(),t=Q0(),n=Ex(),r=kx(),a=Cx(),o=Lx();function s(m,i){var T=[],S=[],M=i.orientation==="h",C=k.getFromId(m,M?i.yaxis:i.xaxis),_=M?"y":"x",w={x:"y",y:"x"}[_],h=i[_+"calendar"],u=i.cumulative,A,b=c(m,i,C,_),z=b[0],I=b[1],N=typeof z.size=="string",R=[],B=N?R:z,F=[],P=[],j=[],U=0,Z=i.histnorm,Q=i.histfunc,re=Z.indexOf("density")!==-1,ne,oe,V;u.enabled&&re&&(Z=Z.replace(/ ?density$/,""),re=!1);var $=Q==="max"||Q==="min",K=$?null:0,G=n.count,X=r[Z],q=!1,W=function(Te){return C.r2c(Te,0,h)},ee;for(x.isArrayOrTypedArray(i[w])&&Q!=="count"&&(ee=i[w],q=Q==="avg",G=n[Q]),A=W(z.start),oe=W(z.end)+(A-k.tickIncrement(A,z.size,!1,h))/1e6;A=0&&V=le;A--)if(S[A]){ve=A;break}for(A=le;A<=ve;A++)if(v(T[A])&&v(S[A])){var se={p:T[A],s:S[A],b:0};u.enabled||(se.pts=j[A],xe?se.ph0=se.ph1=j[A].length?I[j[A][0]]:T[A]:(i._computePh=!0,se.ph0=je(R[A]),se.ph1=je(R[A+1],!0))),ge.push(se)}return ge.length===1&&(ge[0].width1=k.tickIncrement(ge[0].p,z.size,!1,h)-ge[0].p),l(i,"marker")&&e(m,i,{vals:i.marker.color,containerStr:"marker",cLetter:"c"}),l(i,"marker.line")&&e(m,i,{vals:i.marker.line.color,containerStr:"marker.line",cLetter:"c"}),t(ge,i),x.isArrayOrTypedArray(i.selectedpoints)&&x.tagSelected(ge,i,Ie),ge}function c(m,i,T,S,M){var C,_=S+"bins",w=m._fullLayout,h=i["_"+S+"bingroup"],u=w._histogramBinOpts[h],A=w.barmode==="overlay",b,z,I,N,R,B,F,P=function(je){return T.r2c(je,0,N)},j=function(je){return T.c2r(je,0,N)},U=T.type==="date"?function(je){return je||je===0?x.cleanDate(je,null,N):null}:function(je){return v(je)?Number(je):null};function Z(je,ke,ge){ke[je+"Found"]?(ke[je]=U(ke[je]),ke[je]===null&&(ke[je]=ge[je])):(B[je]=ke[je]=ge[je],x.nestedProperty(z[0],_+"."+je).set(ge[je]))}if(i["_"+S+"autoBinFinished"])delete i["_"+S+"autoBinFinished"];else{z=u.traces;var Q=[],re=!0,ne=!1,oe=!1;for(b=0;bT.r2l(ae)&&(ye=k.tickIncrement(ye,u.size,!0,N)),X.start=T.l2r(ye),ee||x.nestedProperty(i,_+".start").set(X.start)}var xe=u.end,Ae=T.r2l(G.end),Me=Ae!==void 0;if((u.endFound||Me)&&Ae!==T.r2l(xe)){var Ie=Me?Ae:x.aggNums(Math.max,null,R);X.end=T.l2r(Ie),Me||x.nestedProperty(i,_+".start").set(X.end)}var qe="autobin"+S;return i._input[qe]===!1&&(i._input[_]=x.extendFlat({},i[_]||{}),delete i._input[qe],delete i[qe]),[X,R]}function g(m,i,T,S,M){var C=m._fullLayout,_=f(m,i),w=!1,h=1/0,u=[i],A,b,z;for(A=0;A<_.length;A++)if(b=_[A],b===i)w=!0;else if(!w)z=C._histogramBinOpts[b["_"+S+"bingroup"]],h=Math.min(h,z.size||b[M].size);else{var I=c(m,b,T,S,!0),N=I[0],R=I[2];b["_"+S+"autoBinFinished"]=1,b["_"+S+"pos0"]=I[1],R?u.push(b):h=Math.min(h,N.size)}var B=new Array(u.length);for(A=0;A=0;S--)w(S);else if(i==="increasing"){for(S=1;S=0;S--)m[S]+=m[S+1];T==="exclude"&&(m.push(0),m.shift())}}H.exports={calc:s,calcAllAutoBins:c}}}),uS=Ee({"src/traces/histogram2d/calc.js"(J,H){"use strict";var v=Vr(),x=uo(),E=Ex(),k=kx(),l=Cx(),e=Lx(),t=Px().calcAllAutoBins;H.exports=function(s,c){var g=x.getFromId(s,c.xaxis),f=x.getFromId(s,c.yaxis),p=c.xcalendar,m=c.ycalendar,i=function(vt){return g.r2c(vt,0,p)},T=function(vt){return f.r2c(vt,0,m)},S=function(vt){return g.c2r(vt,0,p)},M=function(vt){return f.c2r(vt,0,m)},C,_,w,h,u=t(s,c,g,"x"),A=u[0],b=u[1],z=t(s,c,f,"y"),I=z[0],N=z[1],R=c._length;b.length>R&&b.splice(R,b.length-R),N.length>R&&N.splice(R,N.length-R);var B=[],F=[],P=[],j=typeof A.size=="string",U=typeof I.size=="string",Z=[],Q=[],re=j?Z:A,ne=U?Q:I,oe=0,V=[],$=[],K=c.histnorm,G=c.histfunc,X=K.indexOf("density")!==-1,q=G==="max"||G==="min",W=q?null:0,ee=E.count,ae=k[K],fe=!1,ye=[],xe=[],Ae="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";Ae&&G!=="count"&&(fe=G==="avg",ee=E[G]);var Me=A.size,Ie=i(A.start),qe=i(A.end)+(Ie-x.tickIncrement(Ie,Me,!1,p))/1e6;for(C=Ie;C=0&&w=0&&hx;a++)r=l(t,n,k(r));return r>x&&v.log("interp2d didn't converge quickly",r),t};function l(e,t,n){var r=0,a,o,s,c,g,f,p,m,i,T,S,M,C;for(c=0;cM&&(r=Math.max(r,Math.abs(e[o][s]-S)/(C-M))))}return r}}}),d1=Ee({"src/traces/heatmap/find_empties.js"(J,H){"use strict";var v=Vr().maxRowLength;H.exports=function(E){var k=[],l={},e=[],t=E[0],n=[],r=[0,0,0],a=v(E),o,s,c,g,f,p,m,i;for(s=0;s=0;f--)g=e[f],s=g[0],c=g[1],p=((l[[s-1,c]]||r)[2]+(l[[s+1,c]]||r)[2]+(l[[s,c-1]]||r)[2]+(l[[s,c+1]]||r)[2])/20,p&&(m[g]=[s,c,p],e.splice(f,1),i=!0);if(!i)throw"findEmpties iterated with no new neighbors";for(g in m)l[g]=m[g],k.push(m[g])}return k.sort(function(T,S){return S[2]-T[2]})}}}),Dx=Ee({"src/traces/heatmap/make_bound_array.js"(J,H){"use strict";var v=Ri(),x=Vr().isArrayOrTypedArray;H.exports=function(k,l,e,t,n,r){var a=[],o=v.traceIs(k,"contour"),s=v.traceIs(k,"histogram"),c,g,f,p=x(l)&&l.length>1;if(p&&!s&&r.type!=="category"){var m=l.length;if(m<=n){if(o)a=Array.from(l).slice(0,n);else if(n===1)r.type==="log"?a=[.5*l[0],2*l[0]]:a=[l[0]-.5,l[0]+.5];else if(r.type==="log"){for(a=[Math.pow(l[0],1.5)/Math.pow(l[1],.5)],f=1;f1){var K=($[$.length-1]-$[0])/($.length-1),G=Math.abs(K/100);for(R=0;R<$.length-1;R++)if(Math.abs($[R+1]-$[R]-K)>G)return!1}return!0}m._islinear=!1,i.type==="log"||T.type==="log"?C==="fast"&&P("log axis found"):j(_)?j(A)?m._islinear=!0:C==="fast"&&P("y scale is not linear"):C==="fast"&&P("x scale is not linear");var U=x.maxRowLength(N),Z=m.xtype==="scaled"?"":_,Q=o(m,Z,w,h,U,i),re=m.ytype==="scaled"?"":A,ne=o(m,re,b,z,N.length,T);m._extremes[i._id]=E.findExtremes(i,Q),m._extremes[T._id]=E.findExtremes(T,ne);var oe={x:Q,y:ne,z:N,text:m._text||m.text,hovertext:m._hovertext||m.hovertext};if(m.xperiodalignment&&u&&(oe.orig_x=u),m.yperiodalignment&&I&&(oe.orig_y=I),Z&&Z.length===Q.length-1&&(oe.xCenter=Z),re&&re.length===ne.length-1&&(oe.yCenter=re),M&&(oe.xRanges=B.xRanges,oe.yRanges=B.yRanges,oe.pts=B.pts),S||e(p,m,{vals:N,cLetter:"z"}),S&&m.contours&&m.contours.coloring==="heatmap"){var V={type:m.type==="contour"?"heatmap":"histogram2d",xcalendar:m.xcalendar,ycalendar:m.ycalendar};oe.xfill=o(V,Z,w,h,U,i),oe.yfill=o(V,re,b,z,N.length,T)}return[oe]};function c(f){for(var p=[],m=f.length,i=0;i0;)G=u.c2p(P[ee]),ee--;for(G0;)W=A.c2p(j[ee]),ee--;W=u._length||G<=0||q>=A._length||W<=0;if(Ie){var qe=z.selectAll("image").data([]);qe.exit().remove(),i(z);return}var je,ke;ye==="fast"?(je=oe,ke=ne):(je=Ae,ke=Me);var ge=document.createElement("canvas");ge.width=je,ge.height=ke;var le=ge.getContext("2d",{willReadFrequently:!0}),ve=a(N,{noNumericCheck:!0,returnArray:!0}),se,Te;ye==="fast"?(se=V?function(Or){return oe-1-Or}:l.identity,Te=$?function(Or){return ne-1-Or}:l.identity):(se=function(Or){return l.constrain(Math.round(u.c2p(P[Or])-K),0,Ae)},Te=function(Or){return l.constrain(Math.round(A.c2p(j[Or])-q),0,Me)});var Fe=Te(0),We=[Fe,Fe],Ge=V?0:1,gt=$?0:1,mt=0,Tt=0,At=0,Kt=0,ar,_r,Zt,sr,Ot;function vt(Or,Pr=0){if(Or===void 0)return[0,0,0,0];var fa=ve(Or);return fa[0]=Math.round(fa[0]),fa[1]=Math.round(fa[1]),fa[2]=Math.round(fa[2]),mt+=Pr,Tt+=fa[0]*Pr,At+=fa[1]*Pr,Kt+=fa[2]*Pr,fa}function ht(Or,Pr,fa,Fa){var La=Or[fa.bin0];if(La===void 0)return vt(void 0,1);var Cn=Or[fa.bin1],mn=Pr[fa.bin0],bi=Pr[fa.bin1],gn=Cn-La||0,eo=mn-La||0,si;return Cn===void 0?bi===void 0?si=0:mn===void 0?si=2*(bi-La):si=(2*bi-mn-La)*2/3:bi===void 0?mn===void 0?si=0:si=(2*La-Cn-mn)*2/3:mn===void 0?si=(2*bi-Cn-La)*2/3:si=bi+La-Cn-mn,vt(La+fa.frac*gn+Fa.frac*(eo+fa.frac*si))}if(ye!=="default"){var Re=0,Be;try{Be=new Uint8Array(je*ke*4)}catch{Be=new Array(je*ke*4)}if(ye==="smooth"){var He=U||P,$e=Z||j,Ze=new Array(He.length),Je=new Array($e.length),Mt=new Array(Ae),dt=U?S:T,Dt=Z?S:T,Ct,Vt,Ht;for(ee=0;eeei||ei>A._length))for(ae=Oa;aeni||ni>u._length)){var Mi=t({x:Fn,y:Ja},N,C._fullLayout);Mi.x=Fn,Mi.y=Ja;var ci=I.z[ee][ae];ci===void 0?(Mi.z="",Mi.zLabel=""):(Mi.z=ci,Mi.zLabel=k.tickText(Ir,ci,"hover").text);var bn=I.text&&I.text[ee]&&I.text[ee][ae];(bn===void 0||bn===!1)&&(bn=""),Mi.text=bn;var pn=l.texttemplateString({data:[Mi,N._meta],fallback:N.texttemplatefallback,labels:Mi,locale:C._fullLayout._d3locale,template:cr});if(pn){var Ii=pn.split("
"),ho=Ii.length,dn=0;for(fe=0;fe=T[0].length||z<0||z>T.length)return}else{if(v.inbox(n-m[0],n-m[m.length-1],0)>0||v.inbox(r-i[0],r-i[i.length-1],0)>0)return;if(s){var I;for(w=[2*m[0]-m[1]],I=1;I=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),nm=Ee({"src/traces/contour/attributes.js"(J,H){"use strict";var v=Yp(),x=ou(),E=Fl(),k=E.axisHoverFormat,l=E.descriptionOnlyNumbers,e=$s(),t=kc().dash,n=Xs(),r=vo().extendFlat,a=w1(),o=a.COMPARISON_OPS2,s=a.INTERVAL_OPS,c=x.line;H.exports=r({z:v.z,x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:x.xperiod0,yperiod0:x.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,text:v.text,hovertext:v.hovertext,transpose:v.transpose,xtype:v.xtype,ytype:v.ytype,xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:r({},v.texttemplate,{}),texttemplatefallback:v.texttemplatefallback,textfont:r({},v.textfont,{}),hoverongaps:v.hoverongaps,connectgaps:r({},v.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:n({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:l("contour label")},operation:{valType:"enumerated",values:[].concat(o).concat(s),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:r({},c.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:t,smoothing:r({},c.smoothing,{}),editType:"plot"},zorder:x.zorder},e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),Bx=Ee({"src/traces/histogram2dcontour/attributes.js"(J,H){"use strict";var v=x1(),x=nm(),E=$s(),k=Fl().axisHoverFormat,l=vo().extendFlat;H.exports=l({x:v.x,y:v.y,z:v.z,marker:v.marker,histnorm:v.histnorm,histfunc:v.histfunc,nbinsx:v.nbinsx,xbins:v.xbins,nbinsy:v.nbinsy,ybins:v.ybins,autobinx:v.autobinx,autobiny:v.autobiny,bingroup:v.bingroup,xbingroup:v.xbingroup,ybingroup:v.ybingroup,autocontour:x.autocontour,ncontours:x.ncontours,contours:x.contours,line:{color:x.line.color,width:l({},x.line.width,{dflt:.5}),dash:x.line.dash,smoothing:x.line.smoothing,editType:"plot"},xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:x.texttemplate,texttemplatefallback:x.texttemplatefallback,textfont:x.textfont},E("",{cLetter:"z",editTypeOverride:"calc"}))}}),T1=Ee({"src/traces/contour/contours_defaults.js"(J,H){"use strict";H.exports=function(x,E,k,l){var e=l("contours.start"),t=l("contours.end"),n=e===!1||t===!1,r=k("contours.size"),a;n?a=E.autocontour=!0:a=k("autocontour",!1),(a||!r)&&k("ncontours")}}}),Nx=Ee({"src/traces/contour/label_defaults.js"(J,H){"use strict";var v=Vr();H.exports=function(E,k,l,e){e||(e={});var t=E("contours.showlabels");if(t){var n=k.font;v.coerceFont(E,"contours.labelfont",n,{overrideDflt:{color:l}}),E("contours.labelformat")}e.hasHover!==!1&&E("zhoverformat")}}}),A1=Ee({"src/traces/contour/style_defaults.js"(J,H){"use strict";var v=Cc(),x=Nx();H.exports=function(k,l,e,t,n){var r=e("contours.coloring"),a,o="";r==="fill"&&(a=e("contours.showlines")),a!==!1&&(r!=="lines"&&(o=e("line.color","#000")),e("line.width",.5),e("line.dash")),r!=="none"&&(k.showlegend!==!0&&(l.showlegend=!1),l._dfltShowLegend=!1,v(k,l,t,e,{prefix:"",cLetter:"z"})),e("line.smoothing"),x(e,t,o,n)}}}),xS=Ee({"src/traces/histogram2dcontour/defaults.js"(J,H){"use strict";var v=Vr(),x=zx(),E=T1(),k=A1(),l=am(),e=Bx();H.exports=function(n,r,a,o){function s(g,f){return v.coerce(n,r,e,g,f)}function c(g){return v.coerce2(n,r,e,g)}x(n,r,s,o),r.visible!==!1&&(E(n,r,s,c),k(n,r,s,o),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&l(s,o))}}}),Ox=Ee({"src/traces/contour/set_contours.js"(J,H){"use strict";var v=uo(),x=Vr();H.exports=function(l,e){var t=l.contours;if(l.autocontour){var n=l.zmin,r=l.zmax;(l.zauto||n===void 0)&&(n=x.aggNums(Math.min,null,e)),(l.zauto||r===void 0)&&(r=x.aggNums(Math.max,null,e));var a=E(n,r,l.ncontours);t.size=a.dtick,t.start=v.tickFirst(a),a.range.reverse(),t.end=v.tickFirst(a),t.start===n&&(t.start+=t.size),t.end===r&&(t.end-=t.size),t.start>t.end&&(t.start=t.end=(t.start+t.end)/2),l._input.contours||(l._input.contours={}),x.extendFlat(l._input.contours,{start:t.start,end:t.end,size:t.size}),l._input.autocontour=!0}else if(t.type!=="constraint"){var o=t.start,s=t.end,c=l._input.contours;if(o>s&&(t.start=c.start=s,s=t.end=c.end=o,o=t.start),!(t.size>0)){var g;o===s?g=1:g=E(o,s,l.ncontours).dtick,c.size=t.size=g}}};function E(k,l,e){var t={type:"linear",range:[k,l]};return v.autoTicks(t,(l-k)/(e||15)),t}}}),im=Ee({"src/traces/contour/end_plus.js"(J,H){"use strict";H.exports=function(x){return x.end+x.size/1e6}}}),jx=Ee({"src/traces/contour/calc.js"(J,H){"use strict";var v=pl(),x=v1(),E=Ox(),k=im();H.exports=function(e,t){var n=x(e,t),r=n[0].z;E(t,r);var a=t.contours,o=v.extractOpts(t),s;if(a.coloring==="heatmap"&&o.auto&&t.autocontour===!1){var c=a.start,g=k(a),f=a.size||1,p=Math.floor((g-c)/f)+1;isFinite(f)||(f=1,p=1);var m=c-f/2,i=m+p*f;s=[m,i]}else s=r;return v.calc(e,t,{vals:s,cLetter:"z"}),n}}}),om=Ee({"src/traces/contour/constants.js"(J,H){"use strict";H.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}}}}),Ux=Ee({"src/traces/contour/make_crossings.js"(J,H){"use strict";var v=om();H.exports=function(k){var l=k[0].z,e=l.length,t=l[0].length,n=e===2||t===2,r,a,o,s,c,g,f,p,m;for(a=0;aE?0:1)+(k[0][1]>E?0:2)+(k[1][1]>E?0:4)+(k[1][0]>E?0:8);if(l===5||l===10){var e=(k[0][0]+k[0][1]+k[1][0]+k[1][1])/4;return E>e?l===5?713:1114:l===5?104:208}return l===15?0:l}}}),qx=Ee({"src/traces/contour/find_all_paths.js"(J,H){"use strict";var v=Vr(),x=om();H.exports=function(r,a,o){var s,c,g,f,p;for(a=a||.01,o=o||.01,g=0;g20?(g=x.CHOOSESADDLE[g][(f[0]||f[1])<0?0:1],n.crossings[c]=x.SADDLEREMAINDER[g]):delete n.crossings[c],f=x.NEWDELTA[g],!f){v.log("Found bad marching index:",g,r,n.level);break}p.push(t(n,r,f)),r[0]+=f[0],r[1]+=f[1],c=r.join(","),E(p[p.length-1],p[p.length-2],o,s)&&p.pop();var C=f[0]&&(r[0]<0||r[0]>i-2)||f[1]&&(r[1]<0||r[1]>m-2),_=r[0]===T[0]&&r[1]===T[1]&&f[0]===S[0]&&f[1]===S[1];if(_||a&&C)break;g=n.crossings[c]}M===1e4&&v.log("Infinite loop in contour?");var w=E(p[0],p[p.length-1],o,s),h=0,u=.2*n.smoothing,A=[],b=0,z,I,N,R,B,F,P,j,U,Z,Q;for(M=1;M=b;M--)if(z=A[M],z=b&&z+A[I]j&&U--,n.edgepaths[U]=Q.concat(p,Z));break}V||(n.edgepaths[j]=p.concat(Z))}for(j=0;j20&&r?n===208||n===1114?o=a[0]===0?1:-1:s=a[1]===0?1:-1:x.BOTTOMSTART.indexOf(n)!==-1?s=1:x.LEFTSTART.indexOf(n)!==-1?o=1:x.TOPSTART.indexOf(n)!==-1?s=-1:o=-1,[o,s]}function t(n,r,a){var o=r[0]+Math.max(a[0],0),s=r[1]+Math.max(a[1],0),c=n.z[s][o],g=n.xaxis,f=n.yaxis;if(a[1]){var p=(n.level-c)/(n.z[s][o+1]-c),m=(p!==1?(1-p)*g.c2l(n.x[o]):0)+(p!==0?p*g.c2l(n.x[o+1]):0);return[g.c2p(g.l2c(m),!0),f.c2p(n.y[s],!0),o+p,s]}else{var i=(n.level-c)/(n.z[s+1][o]-c),T=(i!==1?(1-i)*f.c2l(n.y[s]):0)+(i!==0?i*f.c2l(n.y[s+1]):0);return[g.c2p(n.x[o],!0),f.c2p(f.l2c(T),!0),o,s+i]}}}}),wS=Ee({"src/traces/contour/constraint_mapping.js"(J,H){"use strict";var v=w1(),x=mi();H.exports={"[]":k("[]"),"][":k("]["),">":l(">"),"<":l("<"),"=":l("=")};function E(e,t){var n=Array.isArray(t),r;function a(o){return x(o)?+o:null}return v.COMPARISON_OPS2.indexOf(e)!==-1?r=a(n?t[0]:t):v.INTERVAL_OPS.indexOf(e)!==-1?r=n?[a(t[0]),a(t[1])]:[a(t),a(t)]:v.SET_OPS.indexOf(e)!==-1&&(r=n?t.map(a):[a(t)]),r}function k(e){return function(t){t=E(e,t);var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return{start:n,end:r,size:r-n}}}function l(e){return function(t){return t=E(e,t),{start:t,end:1/0,size:1/0}}}}}),Vx=Ee({"src/traces/contour/empty_pathinfo.js"(J,H){"use strict";var v=Vr(),x=wS(),E=im();H.exports=function(l,e,t){for(var n=l.type==="constraint"?x[l._operation](l.value):l,r=n.size,a=[],o=E(n),s=t.trace._carpetTrace,c=s?{xaxis:s.aaxis,yaxis:s.baxis,x:t.a,y:t.b}:{xaxis:e.xaxis,yaxis:e.yaxis,x:t.x,y:t.y},g=n.start;g1e3){v.warn("Too many contours, clipping at 1000",l);break}return a}}}),Hx=Ee({"src/traces/contour/convert_to_constraints.js"(J,H){"use strict";var v=Vr();H.exports=function(E,k){var l,e,t,n=function(o){return o.reverse()},r=function(o){return o};switch(k){case"=":case"<":return E;case">":for(E.length!==1&&v.warn("Contour data invalid for the specified inequality operation."),e=E[0],l=0;lt.level||t.starts.length&&e===t.level)}break;case"constraint":if(E.prefixBoundary=!1,E.edgepaths.length)return;var n=E.x.length,r=E.y.length,a=-1/0,o=1/0;for(l=0;l":s>a&&(E.prefixBoundary=!0);break;case"<":(sa||E.starts.length&&g===o)&&(E.prefixBoundary=!0);break;case"][":c=Math.min(s[0],s[1]),g=Math.max(s[0],s[1]),ca&&(E.prefixBoundary=!0);break}break}}}}),M1=Ee({"src/traces/contour/plot.js"(J){"use strict";var H=Va(),v=Vr(),x=mo(),E=pl(),k=Fs(),l=uo(),e=Hh(),t=m1(),n=Ux(),r=qx(),a=Vx(),o=Hx(),s=Gx(),c=om(),g=c.LABELOPTIMIZER;J.plot=function(_,w,h,u){var A=w.xaxis,b=w.yaxis;v.makeTraceGroups(u,h,"contour").each(function(z){var I=H.select(this),N=z[0],R=N.trace,B=N.x,F=N.y,P=R.contours,j=a(P,w,N),U=v.ensureSingle(I,"g","heatmapcoloring"),Z=[];P.coloring==="heatmap"&&(Z=[z]),t(_,w,Z,U),n(j),r(j);var Q=A.c2p(B[0],!0),re=A.c2p(B[B.length-1],!0),ne=b.c2p(F[0],!0),oe=b.c2p(F[F.length-1],!0),V=[[Q,oe],[re,oe],[re,ne],[Q,ne]],$=j;P.type==="constraint"&&($=o(j,P._operation)),f(I,V,P),p(I,$,V,P),i(I,j,_,N,P),S(I,w,_,N,V)})};function f(C,_,w){var h=v.ensureSingle(C,"g","contourbg"),u=h.selectAll("path").data(w.coloring==="fill"?[0]:[]);u.enter().append("path"),u.exit().remove(),u.attr("d","M"+_.join("L")+"Z").style("stroke","none")}function p(C,_,w,h){var u=h.coloring==="fill"||h.type==="constraint"&&h._operation!=="=",A="M"+w.join("L")+"Z";u&&s(_,h);var b=v.ensureSingle(C,"g","contourfill"),z=b.selectAll("path").data(u?_:[]);z.enter().append("path"),z.exit().remove(),z.each(function(I){var N=(I.prefixBoundary?A:"")+m(I,w);N?H.select(this).attr("d",N).style("stroke","none"):H.select(this).remove()})}function m(C,_){var w="",h=0,u=C.edgepaths.map(function(Q,re){return re}),A=!0,b,z,I,N,R,B;function F(Q){return Math.abs(Q[1]-_[0][1])<.01}function P(Q){return Math.abs(Q[1]-_[2][1])<.01}function j(Q){return Math.abs(Q[0]-_[0][0])<.01}function U(Q){return Math.abs(Q[0]-_[2][0])<.01}for(;u.length;){for(B=x.smoothopen(C.edgepaths[h],C.smoothing),w+=A?B:B.replace(/^M/,"L"),u.splice(u.indexOf(h),1),b=C.edgepaths[h][C.edgepaths[h].length-1],N=-1,I=0;I<4;I++){if(!b){v.log("Missing end?",h,C);break}for(F(b)&&!U(b)?z=_[1]:j(b)?z=_[0]:P(b)?z=_[3]:U(b)&&(z=_[2]),R=0;R=0&&(z=Z,N=R):Math.abs(b[1]-z[1])<.01?Math.abs(b[1]-Z[1])<.01&&(Z[0]-b[0])*(z[0]-Z[0])>=0&&(z=Z,N=R):v.log("endpt to newendpt is not vert. or horz.",b,z,Z)}if(b=z,N>=0)break;w+="L"+z}if(N===C.edgepaths.length){v.log("unclosed perimeter path");break}h=N,A=u.indexOf(h)===-1,A&&(h=u[0],w+="Z")}for(h=0;hg.MAXCOST*2)break;F&&(z/=2),b=N-z/2,I=b+z*1.5}if(B<=g.MAXCOST)return R};function T(C,_,w,h){var u=_.width/2,A=_.height/2,b=C.x,z=C.y,I=C.theta,N=Math.cos(I)*u,R=Math.sin(I)*u,B=(b>h.center?h.right-b:b-h.left)/(N+Math.abs(Math.sin(I)*A)),F=(z>h.middle?h.bottom-z:z-h.top)/(Math.abs(R)+Math.cos(I)*A);if(B<1||F<1)return 1/0;var P=g.EDGECOST*(1/(B-1)+1/(F-1));P+=g.ANGLECOST*I*I;for(var j=b-N,U=z-R,Z=b+N,Q=z+R,re=0;re=S)&&(t<=T&&(t=T),n>=S&&(n=S),a=Math.floor((n-t)/r)+1,o=0),i=0;iT&&(f.unshift(T),p.unshift(p[0])),f[f.length-1]2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(c=parseFloat(s.value[0]),s.value=[c,c+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:v(s.value)&&(c=parseFloat(s.value),s.value=[c,c+1])):(o("contours.value",0),v(s.value)||(t(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),MS=Ee({"src/traces/contour/defaults.js"(J,H){"use strict";var v=Vr(),x=u1(),E=Ih(),k=Xx(),l=T1(),e=A1(),t=am(),n=nm();H.exports=function(a,o,s,c){function g(i,T){return v.coerce(a,o,n,i,T)}function f(i){return v.coerce2(a,o,n,i)}var p=x(a,o,g,c);if(!p){o.visible=!1;return}E(a,o,c,g),g("xhoverformat"),g("yhoverformat"),g("text"),g("hovertext"),g("hoverongaps"),g("hovertemplate"),g("hovertemplatefallback");var m=g("contours.type")==="constraint";g("connectgaps",v.isArray1D(o.z)),m?k(a,o,g,c,s):(l(a,o,g,f),e(a,o,g,c)),o.contours&&o.contours.coloring==="heatmap"&&t(g,c),g("zorder")}}}),SS=Ee({"src/traces/contour/index.js"(J,H){"use strict";H.exports={attributes:nm(),supplyDefaults:MS(),calc:jx(),plot:M1().plot,style:S1(),colorbar:E1(),hoverPoints:Yx(),moduleType:"trace",name:"contour",basePlotModule:Mu(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),ES=Ee({"lib/contour.js"(J,H){"use strict";H.exports=SS()}}),$x=Ee({"src/traces/scatterternary/attributes.js"(J,H){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:E}=Cs(),k=Yh(),l=ou(),e=nn(),t=$s(),n=kc().dash,r=vo().extendFlat,a=l.marker,o=l.line,s=a.line;H.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:r({},l.mode,{dflt:"markers"}),text:r({},l.text,{}),texttemplate:x({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:r({},l.hovertext,{}),line:{color:o.color,width:o.width,dash:n,backoff:o.backoff,shape:r({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:l.connectgaps,cliponaxis:l.cliponaxis,fill:r({},l.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:k(),marker:r({symbol:a.symbol,opacity:a.opacity,angle:a.angle,angleref:a.angleref,standoff:a.standoff,maxdisplayed:a.maxdisplayed,size:a.size,sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,line:r({width:s.width,dash:s.dash,editType:"calc"},t("marker.line")),gradient:a.gradient,editType:"calc"},t("marker")),textfont:l.textfont,textposition:l.textposition,selected:l.selected,unselected:l.unselected,hoverinfo:r({},e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:l.hoveron,hovertemplate:v(),hovertemplatefallback:E()}}}),kS=Ee({"src/traces/scatterternary/defaults.js"(J,H){"use strict";var v=Vr(),x=Wh(),E=nl(),k=gh(),l=Rh(),e=Up(),t=Fh(),n=Xh(),r=$x();H.exports=function(o,s,c,g){function f(C,_){return v.coerce(o,s,r,C,_)}var p=f("a"),m=f("b"),i=f("c"),T;if(p?(T=p.length,m?(T=Math.min(T,m.length),i&&(T=Math.min(T,i.length))):i?T=Math.min(T,i.length):T=0):m&&i&&(T=Math.min(m.length,i.length)),!T){s.visible=!1;return}s._length=T,f("sum"),f("text"),f("hovertext"),s.hoveron!=="fills"&&(f("hovertemplate"),f("hovertemplatefallback"));var S=T"),n.hovertemplate=g.hovertemplate,t}}}),IS=Ee({"src/traces/scatterternary/event_data.js"(J,H){"use strict";H.exports=function(x,E,k,l,e){if(E.xa&&(x.xaxis=E.xa),E.ya&&(x.yaxis=E.ya),l[e]){var t=l[e];x.a=t.a,x.b=t.b,x.c=t.c}else x.a=E.a,x.b=E.b,x.c=E.c;return x}}}),RS=Ee({"src/plots/ternary/ternary.js"(J,H){"use strict";var v=Va(),x=Ri(),E=Vr(),k=E.strTranslate,l=E._,e=Qn(),t=mo(),n=Hh(),r=vo().extendFlat,a=vl(),o=uo(),s=qf(),c=$l(),g=Gh(),f=g.freeMode,p=g.rectMode,m=Lv(),i=uc().prepSelect,T=uc().selectOnClick,S=uc().clearOutline,M=uc().clearSelectionsCache,C=tc();function _(F,P){this.id=F.id,this.graphDiv=F.graphDiv,this.init(P),this.makeFramework(P),this.updateFx(P),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}H.exports=_;var w=_.prototype;w.init=function(F){this.container=F._ternarylayer,this.defs=F._defs,this.layoutId=F._uid,this.traceHash={},this.layers={}},w.plot=function(F,P){var j=this,U=P[j.id],Z=P._size;j._hasClipOnAxisFalse=!1;for(var Q=0;Qh*V?(ae=V,ee=ae*h):(ee=oe,ae=ee/h),fe=re*ee/oe,ye=ne*ae/V,q=P.l+P.w*Z-ee/2,W=P.t+P.h*(1-Q)-ae/2,j.x0=q,j.y0=W,j.w=ee,j.h=ae,j.sum=$,j.xaxis={type:"linear",range:[K+2*X-$,$-K-2*G],domain:[Z-fe/2,Z+fe/2],_id:"x"},n(j.xaxis,j.graphDiv._fullLayout),j.xaxis.setScale(),j.xaxis.isPtWithinRange=function(se){return se.a>=j.aaxis.range[0]&&se.a<=j.aaxis.range[1]&&se.b>=j.baxis.range[1]&&se.b<=j.baxis.range[0]&&se.c>=j.caxis.range[1]&&se.c<=j.caxis.range[0]},j.yaxis={type:"linear",range:[K,$-G-X],domain:[Q-ye/2,Q+ye/2],_id:"y"},n(j.yaxis,j.graphDiv._fullLayout),j.yaxis.setScale(),j.yaxis.isPtWithinRange=function(){return!0};var xe=j.yaxis.domain[0],Ae=j.aaxis=r({},F.aaxis,{range:[K,$-G-X],side:"left",tickangle:(+F.aaxis.tickangle||0)-30,domain:[xe,xe+ye*h],anchor:"free",position:0,_id:"y",_length:ee});n(Ae,j.graphDiv._fullLayout),Ae.setScale();var Me=j.baxis=r({},F.baxis,{range:[$-K-X,G],side:"bottom",domain:j.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ee});n(Me,j.graphDiv._fullLayout),Me.setScale();var Ie=j.caxis=r({},F.caxis,{range:[$-K-G,X],side:"right",tickangle:(+F.caxis.tickangle||0)+30,domain:[xe,xe+ye*h],anchor:"free",position:0,_id:"y",_length:ee});n(Ie,j.graphDiv._fullLayout),Ie.setScale();var qe="M"+q+","+(W+ae)+"h"+ee+"l-"+ee/2+",-"+ae+"Z";j.clipDef.select("path").attr("d",qe),j.layers.plotbg.select("path").attr("d",qe);var je="M0,"+ae+"h"+ee+"l-"+ee/2+",-"+ae+"Z";j.clipDefRelative.select("path").attr("d",je);var ke=k(q,W);j.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",ke),j.clipDefRelative.select("path").attr("transform",null);var ge=k(q-Me._offset,W+ae);j.layers.baxis.attr("transform",ge),j.layers.bgrid.attr("transform",ge);var le=k(q+ee/2,W)+"rotate(30)"+k(0,-Ae._offset);j.layers.aaxis.attr("transform",le),j.layers.agrid.attr("transform",le);var ve=k(q+ee/2,W)+"rotate(-30)"+k(0,-Ie._offset);j.layers.caxis.attr("transform",ve),j.layers.cgrid.attr("transform",ve),j.drawAxes(!0),j.layers.aline.select("path").attr("d",Ae.showline?"M"+q+","+(W+ae)+"l"+ee/2+",-"+ae:"M0,0").call(e.stroke,Ae.linecolor||"#000").style("stroke-width",(Ae.linewidth||0)+"px"),j.layers.bline.select("path").attr("d",Me.showline?"M"+q+","+(W+ae)+"h"+ee:"M0,0").call(e.stroke,Me.linecolor||"#000").style("stroke-width",(Me.linewidth||0)+"px"),j.layers.cline.select("path").attr("d",Ie.showline?"M"+(q+ee/2)+","+W+"l"+ee/2+","+ae:"M0,0").call(e.stroke,Ie.linecolor||"#000").style("stroke-width",(Ie.linewidth||0)+"px"),j.graphDiv._context.staticPlot||j.initInteractions(),t.setClipUrl(j.layers.frontplot,j._hasClipOnAxisFalse?null:j.clipId,j.graphDiv)},w.drawAxes=function(F){var P=this,j=P.graphDiv,U=P.id.slice(7)+"title",Z=P.layers,Q=P.aaxis,re=P.baxis,ne=P.caxis;if(P.drawAx(Q),P.drawAx(re),P.drawAx(ne),F){var oe=Math.max(Q.showticklabels?Q.tickfont.size/2:0,(ne.showticklabels?ne.tickfont.size*.75:0)+(ne.ticks==="outside"?ne.ticklen*.87:0)),V=(re.showticklabels?re.tickfont.size:0)+(re.ticks==="outside"?re.ticklen:0)+3;Z["a-title"]=m.draw(j,"a"+U,{propContainer:Q,propName:P.id+".aaxis.title.text",placeholder:l(j,"Click to enter Component A title"),attributes:{x:P.x0+P.w/2,y:P.y0-Q.title.font.size/3-oe,"text-anchor":"middle"}}),Z["b-title"]=m.draw(j,"b"+U,{propContainer:re,propName:P.id+".baxis.title.text",placeholder:l(j,"Click to enter Component B title"),attributes:{x:P.x0-V,y:P.y0+P.h+re.title.font.size*.83+V,"text-anchor":"middle"}}),Z["c-title"]=m.draw(j,"c"+U,{propContainer:ne,propName:P.id+".caxis.title.text",placeholder:l(j,"Click to enter Component C title"),attributes:{x:P.x0+P.w+V,y:P.y0+P.h+ne.title.font.size*.83+V,"text-anchor":"middle"}})}},w.drawAx=function(F){var P=this,j=P.graphDiv,U=F._name,Z=U.charAt(0),Q=F._id,re=P.layers[U],ne=30,oe=Z+"tickLayout",V=u(F);P[oe]!==V&&(re.selectAll("."+Q+"tick").remove(),P[oe]=V),F.setScale();var $=o.calcTicks(F),K=o.clipEnds(F,$),G=o.makeTransTickFn(F),X=o.getTickSigns(F)[2],q=E.deg2rad(ne),W=X*(F.linewidth||1)/2,ee=X*F.ticklen,ae=P.w,fe=P.h,ye=Z==="b"?"M0,"+W+"l"+Math.sin(q)*ee+","+Math.cos(q)*ee:"M"+W+",0l"+Math.cos(q)*ee+","+-Math.sin(q)*ee,xe={a:"M0,0l"+fe+",-"+ae/2,b:"M0,0l-"+ae/2+",-"+fe,c:"M0,0l-"+fe+","+ae/2}[Z];o.drawTicks(j,F,{vals:F.ticks==="inside"?K:$,layer:re,path:ye,transFn:G,crisp:!1}),o.drawGrid(j,F,{vals:K,layer:P.layers[Z+"grid"],path:xe,transFn:G,crisp:!1}),o.drawLabels(j,F,{vals:$,layer:re,transFn:G,labelFns:o.makeLabelFns(F,0,ne)})};function u(F){return F.ticks+String(F.ticklen)+String(F.showticklabels)}var A=C.MINZOOM/2+.87,b="m-0.87,.5h"+A+"v3h-"+(A+5.2)+"l"+(A/2+2.6)+",-"+(A*.87+4.5)+"l2.6,1.5l-"+A/2+","+A*.87+"Z",z="m0.87,.5h-"+A+"v3h"+(A+5.2)+"l-"+(A/2+2.6)+",-"+(A*.87+4.5)+"l-2.6,1.5l"+A/2+","+A*.87+"Z",I="m0,1l"+A/2+","+A*.87+"l2.6,-1.5l-"+(A/2+2.6)+",-"+(A*.87+4.5)+"l-"+(A/2+2.6)+","+(A*.87+4.5)+"l2.6,1.5l"+A/2+",-"+A*.87+"Z",N="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",R=!0;w.clearOutline=function(){M(this.dragOptions),S(this.dragOptions.gd)},w.initInteractions=function(){var F=this,P=F.layers.plotbg.select("path").node(),j=F.graphDiv,U=j._fullLayout._zoomlayer,Z,Q;this.dragOptions={element:P,gd:j,plotinfo:{id:F.id,domain:j._fullLayout[F.id].domain,xaxis:F.xaxis,yaxis:F.yaxis},subplot:F.id,prepFn:function(ge,le,ve){F.dragOptions.xaxes=[F.xaxis],F.dragOptions.yaxes=[F.yaxis],Z=j._fullLayout._invScaleX,Q=j._fullLayout._invScaleY;var se=F.dragOptions.dragmode=j._fullLayout.dragmode;f(se)?F.dragOptions.minDrag=1:F.dragOptions.minDrag=void 0,se==="zoom"?(F.dragOptions.moveFn=Me,F.dragOptions.clickFn=ae,F.dragOptions.doneFn=Ie,fe(ge,le,ve)):se==="pan"?(F.dragOptions.moveFn=je,F.dragOptions.clickFn=ae,F.dragOptions.doneFn=ke,qe(),F.clearOutline(j)):(p(se)||f(se))&&i(ge,le,ve,F.dragOptions,se)}};var re,ne,oe,V,$,K,G,X,q,W;function ee(ge){var le={};return le[F.id+".aaxis.min"]=ge.a,le[F.id+".baxis.min"]=ge.b,le[F.id+".caxis.min"]=ge.c,le}function ae(ge,le){var ve=j._fullLayout.clickmode;B(j),ge===2&&(j.emit("plotly_doubleclick",null),x.call("_guiRelayout",j,ee({a:0,b:0,c:0}))),ve.indexOf("select")>-1&&ge===1&&T(le,j,[F.xaxis],[F.yaxis],F.id,F.dragOptions),ve.indexOf("event")>-1&&c.click(j,le,F.id)}function fe(ge,le,ve){var se=P.getBoundingClientRect();re=le-se.left,ne=ve-se.top,j._fullLayout._calcInverseTransform(j);var Te=j._fullLayout._invTransform,Fe=E.apply3DTransform(Te)(re,ne);re=Fe[0],ne=Fe[1],oe={a:F.aaxis.range[0],b:F.baxis.range[1],c:F.caxis.range[1]},$=oe,V=F.aaxis.range[1]-oe.a,K=e.luminosity(F.graphDiv._fullLayout[F.id].bgcolor),G="M0,"+F.h+"L"+F.w/2+", 0L"+F.w+","+F.h+"Z",X=!1,q=U.append("path").attr("class","zoombox").attr("transform",k(F.x0,F.y0)).style({fill:K>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",G),W=U.append("path").attr("class","zoombox-corners").attr("transform",k(F.x0,F.y0)).style({fill:e.background,stroke:e.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),F.clearOutline(j)}function ye(ge,le){return 1-le/F.h}function xe(ge,le){return 1-(ge+(F.h-le)/Math.sqrt(3))/F.w}function Ae(ge,le){return(ge-(F.h-le)/Math.sqrt(3))/F.w}function Me(ge,le){var ve=re+ge*Z,se=ne+le*Q,Te=Math.max(0,Math.min(1,ye(re,ne),ye(ve,se))),Fe=Math.max(0,Math.min(1,xe(re,ne),xe(ve,se))),We=Math.max(0,Math.min(1,Ae(re,ne),Ae(ve,se))),Ge=(Te/2+We)*F.w,gt=(1-Te/2-Fe)*F.w,mt=(Ge+gt)/2,Tt=gt-Ge,At=(1-Te)*F.h,Kt=At-Tt/h;Tt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),W.transition().style("opacity",1).duration(200),X=!0),j.emit("plotly_relayouting",ee($))}function Ie(){B(j),$!==oe&&(x.call("_guiRelayout",j,ee($)),R&&j.data&&j._context.showTips&&(E.notifier(l(j,"Double-click to zoom back out"),"long",j),R=!1))}function qe(){oe={a:F.aaxis.range[0],b:F.baxis.range[1],c:F.caxis.range[1]},$=oe}function je(ge,le){var ve=ge/F.xaxis._m,se=le/F.yaxis._m;$={a:oe.a-se,b:oe.b+(ve+se)/2,c:oe.c-(ve-se)/2};var Te=[$.a,$.b,$.c].sort(E.sorterAsc),Fe={a:Te.indexOf($.a),b:Te.indexOf($.b),c:Te.indexOf($.c)};Te[0]<0&&(Te[1]+Te[0]/2<0?(Te[2]+=Te[0]+Te[1],Te[0]=Te[1]=0):(Te[2]+=Te[0]/2,Te[1]+=Te[0]/2,Te[0]=0),$={a:Te[Fe.a],b:Te[Fe.b],c:Te[Fe.c]},le=(oe.a-$.a)*F.yaxis._m,ge=(oe.c-$.c-oe.b+$.b)*F.xaxis._m);var We=k(F.x0+ge,F.y0+le);F.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",We);var Ge=k(-ge,-le);F.clipDefRelative.select("path").attr("transform",Ge),F.aaxis.range=[$.a,F.sum-$.b-$.c],F.baxis.range=[F.sum-$.a-$.c,$.b],F.caxis.range=[F.sum-$.a-$.b,$.c],F.drawAxes(!1),F._hasClipOnAxisFalse&&F.plotContainer.select(".scatterlayer").selectAll(".trace").call(t.hideOutsideRangePoints,F),j.emit("plotly_relayouting",ee($))}function ke(){x.call("_guiRelayout",j,ee($))}P.onmousemove=function(ge){c.hover(j,ge,F.id),j._fullLayout._lasthover=P,j._fullLayout._hoversubplot=F.id},P.onmouseout=function(ge){j._dragging||s.unhover(j,ge)},s.init(this.dragOptions)};function B(F){v.select(F).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),Zx=Ee({"src/plots/ternary/layout_attributes.js"(J,H){"use strict";var v=rs(),x=kl().attributes,E=Gc(),k=El().overrideAll,l=vo().extendFlat,e={title:{text:E.title.text,font:E.title.font},color:E.color,tickmode:E.minor.tickmode,nticks:l({},E.nticks,{dflt:6,min:1}),tick0:E.tick0,dtick:E.dtick,tickvals:E.tickvals,ticktext:E.ticktext,ticks:E.ticks,ticklen:E.ticklen,tickwidth:E.tickwidth,tickcolor:E.tickcolor,ticklabelstep:E.ticklabelstep,showticklabels:E.showticklabels,labelalias:E.labelalias,showtickprefix:E.showtickprefix,tickprefix:E.tickprefix,showticksuffix:E.showticksuffix,ticksuffix:E.ticksuffix,showexponent:E.showexponent,exponentformat:E.exponentformat,minexponent:E.minexponent,separatethousands:E.separatethousands,tickfont:E.tickfont,tickangle:E.tickangle,tickformat:E.tickformat,tickformatstops:E.tickformatstops,hoverformat:E.hoverformat,showline:l({},E.showline,{dflt:!0}),linecolor:E.linecolor,linewidth:E.linewidth,showgrid:l({},E.showgrid,{dflt:!0}),gridcolor:E.gridcolor,gridwidth:E.gridwidth,griddash:E.griddash,layer:E.layer,min:{valType:"number",dflt:0,min:0}},t=H.exports=k({domain:x({name:"ternary"}),bgcolor:{valType:"color",dflt:v.background},sum:{valType:"number",dflt:1,min:0},aaxis:e,baxis:e,caxis:e},"plot","from-root");t.uirevision={valType:"any",editType:"none"},t.aaxis.uirevision=t.baxis.uirevision=t.caxis.uirevision={valType:"any",editType:"none"}}}),Bv=Ee({"src/plots/subplot_defaults.js"(J,H){"use strict";var v=Vr(),x=xs(),E=kl().defaults;H.exports=function(l,e,t,n){var r=n.type,a=n.attributes,o=n.handleDefaults,s=n.partition||"x",c=e._subplots[r],g=c.length,f=g&&c[0].replace(/\d+$/,""),p,m;function i(C,_){return v.coerce(p,m,a,C,_)}for(var T=0;T=T&&(w.min=0,h.min=0,u.min=0,g.aaxis&&delete g.aaxis.min,g.baxis&&delete g.baxis.min,g.caxis&&delete g.caxis.min)}function c(g,f,p,m){var i=a[f._name];function T(A,b){return E.coerce(g,f,i,A,b)}T("uirevision",m.uirevision),f.type="linear";var S=T("color"),M=S!==i.color.dflt?S:p.font.color,C=f._name,_=C.charAt(0).toUpperCase(),w="Component "+_,h=T("title.text",w);f._hovertitle=h===w?h:_,E.coerceFont(T,"title.font",p.font,{overrideDflt:{size:E.bigFont(p.font.size),color:M}}),T("min"),n(g,f,T,"linear"),e(g,f,T,"linear"),l(g,f,T,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),t(g,f,T,{outerTicks:!0});var u=T("showticklabels");u&&(E.coerceFont(T,"tickfont",p.font,{overrideDflt:{color:M}}),T("tickangle"),T("tickformat")),r(g,f,T,{dfltColor:S,bgColor:p.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),T("hoverformat"),T("layer")}}}),zS=Ee({"src/plots/ternary/index.js"(J){"use strict";var H=RS(),v=uf().getSubplotCalcData,x=Vr().counterRegex,E="ternary";J.name=E;var k=J.attr="subplot";J.idRoot=E,J.idRegex=J.attrRegex=x(E);var l=J.attributes={};l[k]={valType:"subplotid",dflt:"ternary",editType:"calc"},J.layoutAttributes=Zx(),J.supplyLayoutDefaults=FS(),J.plot=function(t){for(var n=t._fullLayout,r=t.calcdata,a=n._subplots[E],o=0;o0){var C=t.xa,_=t.ya,w,h,u,A,b;g.orientation==="h"?(b=n,w="y",u=_,h="x",A=C):(b=r,w="x",u=C,h="y",A=_);var z=c[t.index];if(b>=z.span[0]&&b<=z.span[1]){var I=x.extendFlat({},t),N=A.c2p(b,!0),R=l.getKdeValue(z,g,b),B=l.getPositionOnKdePath(z,g,N),F=u._offset,P=u._length;I[w+"0"]=B[0],I[w+"1"]=B[1],I[h+"0"]=I[h+"1"]=N,I[h+"Label"]=h+": "+E.hoverLabelText(A,b,g[h+"hoverformat"])+", "+c[0].t.labels.kde+" "+R.toFixed(3);for(var j=0,U=0;U path").each(function(p){if(!p.isBlank){var m=f.marker;v.select(this).call(E.fill,p.mc||m.color).call(E.stroke,p.mlc||m.line.color).call(x.dashLine,m.line.dash,p.mlw||m.line.width).style("opacity",f.selectedpoints&&!p.selected?k:1)}}),t(g,f,r),g.selectAll(".regions").each(function(){v.select(this).selectAll("path").style("stroke-width",0).call(E.fill,f.connector.fillcolor)}),g.selectAll(".lines").each(function(){var p=f.connector.line;x.lineGroupStyle(v.select(this).selectAll("path"),p.width,p.color,p.dash)})})}H.exports={style:n}}}),tE=Ee({"src/traces/funnel/hover.js"(J,H){"use strict";var v=Qn().opacity,x=Gp().hoverOnBars,E=Vr().formatPercent;H.exports=function(e,t,n,r,a){var o=x(e,t,n,r,a);if(o){var s=o.cd,c=s[0].trace,g=c.orientation==="h",f=o.index,p=s[f],m=g?"x":"y";o[m+"LabelVal"]=p.s,o.percentInitial=p.begR,o.percentInitialLabel=E(p.begR,1),o.percentPrevious=p.difR,o.percentPreviousLabel=E(p.difR,1),o.percentTotal=p.sumR,o.percentTotalLabel=E(p.sumR,1);var i=p.hi||c.hoverinfo,T=[];if(i&&i!=="none"&&i!=="skip"){var S=i==="all",M=i.split("+"),C=function(_){return S||M.indexOf(_)!==-1};C("percent initial")&&T.push(o.percentInitialLabel+" of initial"),C("percent previous")&&T.push(o.percentPreviousLabel+" of previous"),C("percent total")&&T.push(o.percentTotalLabel+" of total")}return o.extraText=T.join("
"),o.color=k(c,p),[o]}};function k(l,e){var t=l.marker,n=e.mc||t.color,r=e.mlc||t.line.color,a=e.mlw||t.line.width;if(v(n))return n;if(v(r)&&a)return r}}}),rE=Ee({"src/traces/funnel/event_data.js"(J,H){"use strict";H.exports=function(x,E){return x.x="xVal"in E?E.xVal:E.x,x.y="yVal"in E?E.yVal:E.y,"percentInitial"in E&&(x.percentInitial=E.percentInitial),"percentPrevious"in E&&(x.percentPrevious=E.percentPrevious),"percentTotal"in E&&(x.percentTotal=E.percentTotal),E.xa&&(x.xaxis=E.xa),E.ya&&(x.yaxis=E.ya),x}}}),aE=Ee({"src/traces/funnel/index.js"(J,H){"use strict";H.exports={attributes:Qx(),layoutAttributes:e2(),supplyDefaults:t2().supplyDefaults,crossTraceDefaults:t2().crossTraceDefaults,supplyLayoutDefaults:$S(),calc:KS(),crossTraceCalc:JS(),plot:QS(),style:eE().style,hoverPoints:tE(),eventData:rE(),selectPoints:Wp(),moduleType:"trace",name:"funnel",basePlotModule:Mu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),nE=Ee({"lib/funnel.js"(J,H){"use strict";H.exports=aE()}}),iE=Ee({"src/traces/waterfall/constants.js"(J,H){"use strict";H.exports={eventDataKeys:["initial","delta","final"]}}}),r2=Ee({"src/traces/waterfall/attributes.js"(J,H){"use strict";var v=Zh(),x=ou().line,E=nn(),k=Fl().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=Cs(),n=iE(),r=vo().extendFlat,a=Qn();function o(s){return{marker:{color:r({},v.marker.color,{arrayOk:!1,editType:"style"}),line:{color:r({},v.marker.line.color,{arrayOk:!1,editType:"style"}),width:r({},v.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}H.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,xhoverformat:k("x"),yhoverformat:k("y"),hovertext:v.hovertext,hovertemplate:l({},{keys:n.eventDataKeys}),hovertemplatefallback:t(),hoverinfo:r({},E.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:e({editType:"plot"},{keys:n.eventDataKeys.concat(["label"])}),texttemplatefallback:t({editType:"plot"}),text:v.text,textposition:v.textposition,insidetextanchor:v.insidetextanchor,textangle:v.textangle,textfont:v.textfont,insidetextfont:v.insidetextfont,outsidetextfont:v.outsidetextfont,constraintext:v.constraintext,cliponaxis:v.cliponaxis,orientation:v.orientation,offset:v.offset,width:v.width,increasing:o("increasing"),decreasing:o("decreasing"),totals:o("intermediate sums and total"),connector:{line:{color:r({},x.color,{dflt:a.defaultLine}),width:r({},x.width,{editType:"plot"}),dash:x.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,zorder:v.zorder}}}),a2=Ee({"src/traces/waterfall/layout_attributes.js"(J,H){"use strict";H.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"}}}}),$p=Ee({"src/constants/delta.js"(J,H){"use strict";H.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),n2=Ee({"src/traces/waterfall/defaults.js"(J,H){"use strict";var v=Vr(),x=Iv(),E=fh().handleText,k=Dv(),l=Ih(),e=r2(),t=Qn(),n=$p(),r=n.INCREASING.COLOR,a=n.DECREASING.COLOR,o="#4499FF";function s(f,p,m){f(p+".marker.color",m),f(p+".marker.line.color",t.defaultLine),f(p+".marker.line.width")}function c(f,p,m,i){function T(w,h){return v.coerce(f,p,e,w,h)}var S=k(f,p,i,T);if(!S){p.visible=!1;return}l(f,p,i,T),T("xhoverformat"),T("yhoverformat"),T("measure"),T("orientation",p.x&&!p.y?"h":"v"),T("base"),T("offset"),T("width"),T("text"),T("hovertext"),T("hovertemplate"),T("hovertemplatefallback");var M=T("textposition");E(f,p,i,T,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),p.textposition!=="none"&&(T("texttemplate"),T("texttemplatefallback"),p.texttemplate||T("textinfo")),s(T,"increasing",r),s(T,"decreasing",a),s(T,"totals",o);var C=T("connector.visible");if(C){T("connector.mode");var _=T("connector.line.width");_&&(T("connector.line.color"),T("connector.line.dash"))}T("zorder")}function g(f,p){var m,i;function T(M){return v.coerce(i._input,i,e,M)}if(p.waterfallmode==="group")for(var S=0;S0&&(T?b+="M"+u[0]+","+A[1]+"V"+A[0]:b+="M"+u[1]+","+A[0]+"H"+u[0]),S!=="between"&&(_.isSum||w path").each(function(p){if(!p.isBlank){var m=f[p.dir].marker;v.select(this).call(E.fill,m.color).call(E.stroke,m.line.color).call(x.dashLine,m.line.dash,m.line.width).style("opacity",f.selectedpoints&&!p.selected?k:1)}}),t(g,f,r),g.selectAll(".lines").each(function(){var p=f.connector.line;x.lineGroupStyle(v.select(this).selectAll("path"),p.width,p.color,p.dash)})})}H.exports={style:n}}}),fE=Ee({"src/traces/waterfall/hover.js"(J,H){"use strict";var v=uo().hoverLabelText,x=Qn().opacity,E=Gp().hoverOnBars,k=$p(),l={increasing:k.INCREASING.SYMBOL,decreasing:k.DECREASING.SYMBOL};H.exports=function(n,r,a,o,s){var c=E(n,r,a,o,s);if(!c)return;var g=c.cd,f=g[0].trace,p=f.orientation==="h",m=p?"x":"y",i=p?n.xa:n.ya;function T(z){return v(i,z,f[m+"hoverformat"])}var S=c.index,M=g[S],C=M.isSum?M.b+M.s:M.rawS;c.initial=M.b+M.s-C,c.delta=C,c.final=c.initial+c.delta;var _=T(Math.abs(c.delta));c.deltaLabel=C<0?"("+_+")":_,c.finalLabel=T(c.final),c.initialLabel=T(c.initial);var w=M.hi||f.hoverinfo,h=[];if(w&&w!=="none"&&w!=="skip"){var u=w==="all",A=w.split("+"),b=function(z){return u||A.indexOf(z)!==-1};M.isSum||(b("final")&&(p?!b("x"):!b("y"))&&h.push(c.finalLabel),b("delta")&&(C<0?h.push(c.deltaLabel+" "+l.decreasing):h.push(c.deltaLabel+" "+l.increasing)),b("initial")&&h.push("Initial: "+c.initialLabel))}return h.length&&(c.extraText=h.join("
")),c.color=e(f,M),[c]};function e(t,n){var r=t[n.dir].marker,a=r.color,o=r.line.color,s=r.line.width;if(x(a))return a;if(x(o)&&s)return o}}}),hE=Ee({"src/traces/waterfall/event_data.js"(J,H){"use strict";H.exports=function(x,E){return x.x="xVal"in E?E.xVal:E.x,x.y="yVal"in E?E.yVal:E.y,"initial"in E&&(x.initial=E.initial),"delta"in E&&(x.delta=E.delta),"final"in E&&(x.final=E.final),E.xa&&(x.xaxis=E.xa),E.ya&&(x.yaxis=E.ya),x}}}),dE=Ee({"src/traces/waterfall/index.js"(J,H){"use strict";H.exports={attributes:r2(),layoutAttributes:a2(),supplyDefaults:n2().supplyDefaults,crossTraceDefaults:n2().crossTraceDefaults,supplyLayoutDefaults:oE(),calc:sE(),crossTraceCalc:lE(),plot:uE(),style:cE().style,hoverPoints:fE(),eventData:hE(),selectPoints:Wp(),moduleType:"trace",name:"waterfall",basePlotModule:Mu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),vE=Ee({"lib/waterfall.js"(J,H){"use strict";H.exports=dE()}}),Zp=Ee({"src/traces/image/constants.js"(J,H){"use strict";H.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(v){return v.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(v){return v.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(v){return v.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(v){var x=v.slice(0,3);return x[1]=x[1]+"%",x[2]=x[2]+"%",x},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(v){var x=v.slice(0,4);return x[1]=x[1]+"%",x[2]=x[2]+"%",x},suffix:["\xB0","%","%",""]}}}}}),C1={};ga(C1,{default:()=>c2});var i2,o2,L1,s2,l2,P1,D1,I1,u2,c2,f2=Da({"src/traces/image/attributes.ts"(){"use strict";i2=Wa(vo()),o2=Wa(nn()),L1=Wa(Cs()),s2=Wa(ou()),l2=Wa(Zp()),P1=["rgb","rgba","rgba256","hsl","hsla"],D1=[],I1=[];for(let J of P1){let H=l2.colormodel[J];D1.push(`For the \`${J}\` colormodel, it is [${(H.zminDflt||H.min).join(", ")}].`),I1.push(`For the \`${J}\` colormodel, it is [${(H.zmaxDflt||H.max).join(", ")}].`)}u2={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:P1,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.",D1.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.",I1.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,i2.extendFlat)({},o2.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,L1.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,L1.templatefallbackAttrs)(),zorder:s2.zorder},c2=u2}}),pE=Ee({"src/traces/image/defaults.js"(J,H){"use strict";var v=Vr(),x=(f2(),tn(C1)).default,E=Zp(),k=yd().IMAGE_URL_PREFIX;H.exports=function(e,t){function n(o,s){return v.coerce(e,t,x,o,s)}n("source"),t.source&&!t.source.match(k)&&delete t.source,t._hasSource=!!t.source;var r=n("z");if(t._hasZ=!(r===void 0||!r.length||!r[0]||!r[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}n("x0"),n("y0"),n("dx"),n("dy");var a;t._hasZ?(n("colormodel","rgb"),a=E.colormodel[t.colormodel],n("zmin",a.zminDflt||a.min),n("zmax",a.zmaxDflt||a.max)):t._hasSource&&(t.colormodel="rgba256",a=E.colormodel[t.colormodel],t.zmin=a.zminDflt,t.zmax=a.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),t._length=null,n("zorder")}}}),_d=Ee({"node_modules/inherits/inherits_browser.js"(J,H){typeof Object.create=="function"?H.exports=function(x,E){E&&(x.super_=E,x.prototype=Object.create(E.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}))}:H.exports=function(x,E){if(E){x.super_=E;var k=function(){};k.prototype=E.prototype,x.prototype=new k,x.prototype.constructor=x}}}}),h2=Ee({"node_modules/readable-stream/lib/internal/streams/stream-browser.js"(J,H){H.exports=kv().EventEmitter}}),mE=Ee({"node_modules/base64-js/index.js"(J){"use strict";J.byteLength=t,J.toByteArray=r,J.fromByteArray=s;var H=[],v=[],x=typeof Uint8Array<"u"?Uint8Array:Array,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(k=0,l=E.length;k0)throw new Error("Invalid string. Length must be a multiple of 4");var f=c.indexOf("=");f===-1&&(f=g);var p=f===g?0:4-f%4;return[f,p]}function t(c){var g=e(c),f=g[0],p=g[1];return(f+p)*3/4-p}function n(c,g,f){return(g+f)*3/4-f}function r(c){var g,f=e(c),p=f[0],m=f[1],i=new x(n(c,p,m)),T=0,S=m>0?p-4:p,M;for(M=0;M>16&255,i[T++]=g>>8&255,i[T++]=g&255;return m===2&&(g=v[c.charCodeAt(M)]<<2|v[c.charCodeAt(M+1)]>>4,i[T++]=g&255),m===1&&(g=v[c.charCodeAt(M)]<<10|v[c.charCodeAt(M+1)]<<4|v[c.charCodeAt(M+2)]>>2,i[T++]=g>>8&255,i[T++]=g&255),i}function a(c){return H[c>>18&63]+H[c>>12&63]+H[c>>6&63]+H[c&63]}function o(c,g,f){for(var p,m=[],i=g;iS?S:T+i));return p===1?(g=c[f-1],m.push(H[g>>2]+H[g<<4&63]+"==")):p===2&&(g=(c[f-2]<<8)+c[f-1],m.push(H[g>>10]+H[g>>4&63]+H[g<<2&63]+"=")),m.join("")}}}),gE=Ee({"node_modules/ieee754/index.js"(J){J.read=function(H,v,x,E,k){var l,e,t=k*8-E-1,n=(1<>1,a=-7,o=x?k-1:0,s=x?-1:1,c=H[v+o];for(o+=s,l=c&(1<<-a)-1,c>>=-a,a+=t;a>0;l=l*256+H[v+o],o+=s,a-=8);for(e=l&(1<<-a)-1,l>>=-a,a+=E;a>0;e=e*256+H[v+o],o+=s,a-=8);if(l===0)l=1-r;else{if(l===n)return e?NaN:(c?-1:1)*(1/0);e=e+Math.pow(2,E),l=l-r}return(c?-1:1)*e*Math.pow(2,l-E)},J.write=function(H,v,x,E,k,l){var e,t,n,r=l*8-k-1,a=(1<>1,s=k===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=E?0:l-1,g=E?1:-1,f=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===1/0?(t=isNaN(v)?1:0,e=a):(e=Math.floor(Math.log(v)/Math.LN2),v*(n=Math.pow(2,-e))<1&&(e--,n*=2),e+o>=1?v+=s/n:v+=s*Math.pow(2,1-o),v*n>=2&&(e++,n/=2),e+o>=a?(t=0,e=a):e+o>=1?(t=(v*n-1)*Math.pow(2,k),e=e+o):(t=v*Math.pow(2,o-1)*Math.pow(2,k),e=0));k>=8;H[x+c]=t&255,c+=g,t/=256,k-=8);for(e=e<0;H[x+c]=e&255,c+=g,e/=256,r-=8);H[x+c-g]|=f*128}}}),Nv=Ee({"node_modules/buffer/index.js"(J){"use strict";var H=mE(),v=gE(),x=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;J.Buffer=e,J.SlowBuffer=m,J.INSPECT_MAX_BYTES=50;var E=2147483647;J.kMaxLength=E,e.TYPED_ARRAY_SUPPORT=k(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function k(){try{let le=new Uint8Array(1),ve={foo:function(){return 42}};return Object.setPrototypeOf(ve,Uint8Array.prototype),Object.setPrototypeOf(le,ve),le.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function l(le){if(le>E)throw new RangeError('The value "'+le+'" is invalid for option "size"');let ve=new Uint8Array(le);return Object.setPrototypeOf(ve,e.prototype),ve}function e(le,ve,se){if(typeof le=="number"){if(typeof ve=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return a(le)}return t(le,ve,se)}e.poolSize=8192;function t(le,ve,se){if(typeof le=="string")return o(le,ve);if(ArrayBuffer.isView(le))return c(le);if(le==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof le);if(Ie(le,ArrayBuffer)||le&&Ie(le.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(le,SharedArrayBuffer)||le&&Ie(le.buffer,SharedArrayBuffer)))return g(le,ve,se);if(typeof le=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Te=le.valueOf&&le.valueOf();if(Te!=null&&Te!==le)return e.from(Te,ve,se);let Fe=f(le);if(Fe)return Fe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof le[Symbol.toPrimitive]=="function")return e.from(le[Symbol.toPrimitive]("string"),ve,se);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof le)}e.from=function(le,ve,se){return t(le,ve,se)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function n(le){if(typeof le!="number")throw new TypeError('"size" argument must be of type number');if(le<0)throw new RangeError('The value "'+le+'" is invalid for option "size"')}function r(le,ve,se){return n(le),le<=0?l(le):ve!==void 0?typeof se=="string"?l(le).fill(ve,se):l(le).fill(ve):l(le)}e.alloc=function(le,ve,se){return r(le,ve,se)};function a(le){return n(le),l(le<0?0:p(le)|0)}e.allocUnsafe=function(le){return a(le)},e.allocUnsafeSlow=function(le){return a(le)};function o(le,ve){if((typeof ve!="string"||ve==="")&&(ve="utf8"),!e.isEncoding(ve))throw new TypeError("Unknown encoding: "+ve);let se=i(le,ve)|0,Te=l(se),Fe=Te.write(le,ve);return Fe!==se&&(Te=Te.slice(0,Fe)),Te}function s(le){let ve=le.length<0?0:p(le.length)|0,se=l(ve);for(let Te=0;Te=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return le|0}function m(le){return+le!=le&&(le=0),e.alloc(+le)}e.isBuffer=function(ve){return ve!=null&&ve._isBuffer===!0&&ve!==e.prototype},e.compare=function(ve,se){if(Ie(ve,Uint8Array)&&(ve=e.from(ve,ve.offset,ve.byteLength)),Ie(se,Uint8Array)&&(se=e.from(se,se.offset,se.byteLength)),!e.isBuffer(ve)||!e.isBuffer(se))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ve===se)return 0;let Te=ve.length,Fe=se.length;for(let We=0,Ge=Math.min(Te,Fe);WeFe.length?(e.isBuffer(Ge)||(Ge=e.from(Ge)),Ge.copy(Fe,We)):Uint8Array.prototype.set.call(Fe,Ge,We);else if(e.isBuffer(Ge))Ge.copy(Fe,We);else throw new TypeError('"list" argument must be an Array of Buffers');We+=Ge.length}return Fe};function i(le,ve){if(e.isBuffer(le))return le.length;if(ArrayBuffer.isView(le)||Ie(le,ArrayBuffer))return le.byteLength;if(typeof le!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof le);let se=le.length,Te=arguments.length>2&&arguments[2]===!0;if(!Te&&se===0)return 0;let Fe=!1;for(;;)switch(ve){case"ascii":case"latin1":case"binary":return se;case"utf8":case"utf-8":return fe(le).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return se*2;case"hex":return se>>>1;case"base64":return Ae(le).length;default:if(Fe)return Te?-1:fe(le).length;ve=(""+ve).toLowerCase(),Fe=!0}}e.byteLength=i;function T(le,ve,se){let Te=!1;if((ve===void 0||ve<0)&&(ve=0),ve>this.length||((se===void 0||se>this.length)&&(se=this.length),se<=0)||(se>>>=0,ve>>>=0,se<=ve))return"";for(le||(le="utf8");;)switch(le){case"hex":return F(this,ve,se);case"utf8":case"utf-8":return z(this,ve,se);case"ascii":return R(this,ve,se);case"latin1":case"binary":return B(this,ve,se);case"base64":return b(this,ve,se);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,ve,se);default:if(Te)throw new TypeError("Unknown encoding: "+le);le=(le+"").toLowerCase(),Te=!0}}e.prototype._isBuffer=!0;function S(le,ve,se){let Te=le[ve];le[ve]=le[se],le[se]=Te}e.prototype.swap16=function(){let ve=this.length;if(ve%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let se=0;sese&&(ve+=" ... "),""},x&&(e.prototype[x]=e.prototype.inspect),e.prototype.compare=function(ve,se,Te,Fe,We){if(Ie(ve,Uint8Array)&&(ve=e.from(ve,ve.offset,ve.byteLength)),!e.isBuffer(ve))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ve);if(se===void 0&&(se=0),Te===void 0&&(Te=ve?ve.length:0),Fe===void 0&&(Fe=0),We===void 0&&(We=this.length),se<0||Te>ve.length||Fe<0||We>this.length)throw new RangeError("out of range index");if(Fe>=We&&se>=Te)return 0;if(Fe>=We)return-1;if(se>=Te)return 1;if(se>>>=0,Te>>>=0,Fe>>>=0,We>>>=0,this===ve)return 0;let Ge=We-Fe,gt=Te-se,mt=Math.min(Ge,gt),Tt=this.slice(Fe,We),At=ve.slice(se,Te);for(let Kt=0;Kt2147483647?se=2147483647:se<-2147483648&&(se=-2147483648),se=+se,qe(se)&&(se=Fe?0:le.length-1),se<0&&(se=le.length+se),se>=le.length){if(Fe)return-1;se=le.length-1}else if(se<0)if(Fe)se=0;else return-1;if(typeof ve=="string"&&(ve=e.from(ve,Te)),e.isBuffer(ve))return ve.length===0?-1:C(le,ve,se,Te,Fe);if(typeof ve=="number")return ve=ve&255,typeof Uint8Array.prototype.indexOf=="function"?Fe?Uint8Array.prototype.indexOf.call(le,ve,se):Uint8Array.prototype.lastIndexOf.call(le,ve,se):C(le,[ve],se,Te,Fe);throw new TypeError("val must be string, number or Buffer")}function C(le,ve,se,Te,Fe){let We=1,Ge=le.length,gt=ve.length;if(Te!==void 0&&(Te=String(Te).toLowerCase(),Te==="ucs2"||Te==="ucs-2"||Te==="utf16le"||Te==="utf-16le")){if(le.length<2||ve.length<2)return-1;We=2,Ge/=2,gt/=2,se/=2}function mt(At,Kt){return We===1?At[Kt]:At.readUInt16BE(Kt*We)}let Tt;if(Fe){let At=-1;for(Tt=se;TtGe&&(se=Ge-gt),Tt=se;Tt>=0;Tt--){let At=!0;for(let Kt=0;KtFe&&(Te=Fe)):Te=Fe;let We=ve.length;Te>We/2&&(Te=We/2);let Ge;for(Ge=0;Ge>>0,isFinite(Te)?(Te=Te>>>0,Fe===void 0&&(Fe="utf8")):(Fe=Te,Te=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let We=this.length-se;if((Te===void 0||Te>We)&&(Te=We),ve.length>0&&(Te<0||se<0)||se>this.length)throw new RangeError("Attempt to write outside buffer bounds");Fe||(Fe="utf8");let Ge=!1;for(;;)switch(Fe){case"hex":return _(this,ve,se,Te);case"utf8":case"utf-8":return w(this,ve,se,Te);case"ascii":case"latin1":case"binary":return h(this,ve,se,Te);case"base64":return u(this,ve,se,Te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,ve,se,Te);default:if(Ge)throw new TypeError("Unknown encoding: "+Fe);Fe=(""+Fe).toLowerCase(),Ge=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function b(le,ve,se){return ve===0&&se===le.length?H.fromByteArray(le):H.fromByteArray(le.slice(ve,se))}function z(le,ve,se){se=Math.min(le.length,se);let Te=[],Fe=ve;for(;Fe239?4:We>223?3:We>191?2:1;if(Fe+gt<=se){let mt,Tt,At,Kt;switch(gt){case 1:We<128&&(Ge=We);break;case 2:mt=le[Fe+1],(mt&192)===128&&(Kt=(We&31)<<6|mt&63,Kt>127&&(Ge=Kt));break;case 3:mt=le[Fe+1],Tt=le[Fe+2],(mt&192)===128&&(Tt&192)===128&&(Kt=(We&15)<<12|(mt&63)<<6|Tt&63,Kt>2047&&(Kt<55296||Kt>57343)&&(Ge=Kt));break;case 4:mt=le[Fe+1],Tt=le[Fe+2],At=le[Fe+3],(mt&192)===128&&(Tt&192)===128&&(At&192)===128&&(Kt=(We&15)<<18|(mt&63)<<12|(Tt&63)<<6|At&63,Kt>65535&&Kt<1114112&&(Ge=Kt))}}Ge===null?(Ge=65533,gt=1):Ge>65535&&(Ge-=65536,Te.push(Ge>>>10&1023|55296),Ge=56320|Ge&1023),Te.push(Ge),Fe+=gt}return N(Te)}var I=4096;function N(le){let ve=le.length;if(ve<=I)return String.fromCharCode.apply(String,le);let se="",Te=0;for(;TeTe)&&(se=Te);let Fe="";for(let We=ve;WeTe&&(ve=Te),se<0?(se+=Te,se<0&&(se=0)):se>Te&&(se=Te),sese)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(ve,se,Te){ve=ve>>>0,se=se>>>0,Te||j(ve,se,this.length);let Fe=this[ve],We=1,Ge=0;for(;++Ge>>0,se=se>>>0,Te||j(ve,se,this.length);let Fe=this[ve+--se],We=1;for(;se>0&&(We*=256);)Fe+=this[ve+--se]*We;return Fe},e.prototype.readUint8=e.prototype.readUInt8=function(ve,se){return ve=ve>>>0,se||j(ve,1,this.length),this[ve]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(ve,se){return ve=ve>>>0,se||j(ve,2,this.length),this[ve]|this[ve+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(ve,se){return ve=ve>>>0,se||j(ve,2,this.length),this[ve]<<8|this[ve+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(ve,se){return ve=ve>>>0,se||j(ve,4,this.length),(this[ve]|this[ve+1]<<8|this[ve+2]<<16)+this[ve+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(ve,se){return ve=ve>>>0,se||j(ve,4,this.length),this[ve]*16777216+(this[ve+1]<<16|this[ve+2]<<8|this[ve+3])},e.prototype.readBigUInt64LE=ke(function(ve){ve=ve>>>0,q(ve,"offset");let se=this[ve],Te=this[ve+7];(se===void 0||Te===void 0)&&W(ve,this.length-8);let Fe=se+this[++ve]*2**8+this[++ve]*2**16+this[++ve]*2**24,We=this[++ve]+this[++ve]*2**8+this[++ve]*2**16+Te*2**24;return BigInt(Fe)+(BigInt(We)<>>0,q(ve,"offset");let se=this[ve],Te=this[ve+7];(se===void 0||Te===void 0)&&W(ve,this.length-8);let Fe=se*2**24+this[++ve]*2**16+this[++ve]*2**8+this[++ve],We=this[++ve]*2**24+this[++ve]*2**16+this[++ve]*2**8+Te;return(BigInt(Fe)<>>0,se=se>>>0,Te||j(ve,se,this.length);let Fe=this[ve],We=1,Ge=0;for(;++Ge=We&&(Fe-=Math.pow(2,8*se)),Fe},e.prototype.readIntBE=function(ve,se,Te){ve=ve>>>0,se=se>>>0,Te||j(ve,se,this.length);let Fe=se,We=1,Ge=this[ve+--Fe];for(;Fe>0&&(We*=256);)Ge+=this[ve+--Fe]*We;return We*=128,Ge>=We&&(Ge-=Math.pow(2,8*se)),Ge},e.prototype.readInt8=function(ve,se){return ve=ve>>>0,se||j(ve,1,this.length),this[ve]&128?(255-this[ve]+1)*-1:this[ve]},e.prototype.readInt16LE=function(ve,se){ve=ve>>>0,se||j(ve,2,this.length);let Te=this[ve]|this[ve+1]<<8;return Te&32768?Te|4294901760:Te},e.prototype.readInt16BE=function(ve,se){ve=ve>>>0,se||j(ve,2,this.length);let Te=this[ve+1]|this[ve]<<8;return Te&32768?Te|4294901760:Te},e.prototype.readInt32LE=function(ve,se){return ve=ve>>>0,se||j(ve,4,this.length),this[ve]|this[ve+1]<<8|this[ve+2]<<16|this[ve+3]<<24},e.prototype.readInt32BE=function(ve,se){return ve=ve>>>0,se||j(ve,4,this.length),this[ve]<<24|this[ve+1]<<16|this[ve+2]<<8|this[ve+3]},e.prototype.readBigInt64LE=ke(function(ve){ve=ve>>>0,q(ve,"offset");let se=this[ve],Te=this[ve+7];(se===void 0||Te===void 0)&&W(ve,this.length-8);let Fe=this[ve+4]+this[ve+5]*2**8+this[ve+6]*2**16+(Te<<24);return(BigInt(Fe)<>>0,q(ve,"offset");let se=this[ve],Te=this[ve+7];(se===void 0||Te===void 0)&&W(ve,this.length-8);let Fe=(se<<24)+this[++ve]*2**16+this[++ve]*2**8+this[++ve];return(BigInt(Fe)<>>0,se||j(ve,4,this.length),v.read(this,ve,!0,23,4)},e.prototype.readFloatBE=function(ve,se){return ve=ve>>>0,se||j(ve,4,this.length),v.read(this,ve,!1,23,4)},e.prototype.readDoubleLE=function(ve,se){return ve=ve>>>0,se||j(ve,8,this.length),v.read(this,ve,!0,52,8)},e.prototype.readDoubleBE=function(ve,se){return ve=ve>>>0,se||j(ve,8,this.length),v.read(this,ve,!1,52,8)};function U(le,ve,se,Te,Fe,We){if(!e.isBuffer(le))throw new TypeError('"buffer" argument must be a Buffer instance');if(ve>Fe||vele.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(ve,se,Te,Fe){if(ve=+ve,se=se>>>0,Te=Te>>>0,!Fe){let gt=Math.pow(2,8*Te)-1;U(this,ve,se,Te,gt,0)}let We=1,Ge=0;for(this[se]=ve&255;++Ge>>0,Te=Te>>>0,!Fe){let gt=Math.pow(2,8*Te)-1;U(this,ve,se,Te,gt,0)}let We=Te-1,Ge=1;for(this[se+We]=ve&255;--We>=0&&(Ge*=256);)this[se+We]=ve/Ge&255;return se+Te},e.prototype.writeUint8=e.prototype.writeUInt8=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,1,255,0),this[se]=ve&255,se+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,2,65535,0),this[se]=ve&255,this[se+1]=ve>>>8,se+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,2,65535,0),this[se]=ve>>>8,this[se+1]=ve&255,se+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,4,4294967295,0),this[se+3]=ve>>>24,this[se+2]=ve>>>16,this[se+1]=ve>>>8,this[se]=ve&255,se+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,4,4294967295,0),this[se]=ve>>>24,this[se+1]=ve>>>16,this[se+2]=ve>>>8,this[se+3]=ve&255,se+4};function Z(le,ve,se,Te,Fe){X(ve,Te,Fe,le,se,7);let We=Number(ve&BigInt(4294967295));le[se++]=We,We=We>>8,le[se++]=We,We=We>>8,le[se++]=We,We=We>>8,le[se++]=We;let Ge=Number(ve>>BigInt(32)&BigInt(4294967295));return le[se++]=Ge,Ge=Ge>>8,le[se++]=Ge,Ge=Ge>>8,le[se++]=Ge,Ge=Ge>>8,le[se++]=Ge,se}function Q(le,ve,se,Te,Fe){X(ve,Te,Fe,le,se,7);let We=Number(ve&BigInt(4294967295));le[se+7]=We,We=We>>8,le[se+6]=We,We=We>>8,le[se+5]=We,We=We>>8,le[se+4]=We;let Ge=Number(ve>>BigInt(32)&BigInt(4294967295));return le[se+3]=Ge,Ge=Ge>>8,le[se+2]=Ge,Ge=Ge>>8,le[se+1]=Ge,Ge=Ge>>8,le[se]=Ge,se+8}e.prototype.writeBigUInt64LE=ke(function(ve,se=0){return Z(this,ve,se,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=ke(function(ve,se=0){return Q(this,ve,se,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(ve,se,Te,Fe){if(ve=+ve,se=se>>>0,!Fe){let mt=Math.pow(2,8*Te-1);U(this,ve,se,Te,mt-1,-mt)}let We=0,Ge=1,gt=0;for(this[se]=ve&255;++We>0)-gt&255;return se+Te},e.prototype.writeIntBE=function(ve,se,Te,Fe){if(ve=+ve,se=se>>>0,!Fe){let mt=Math.pow(2,8*Te-1);U(this,ve,se,Te,mt-1,-mt)}let We=Te-1,Ge=1,gt=0;for(this[se+We]=ve&255;--We>=0&&(Ge*=256);)ve<0&>===0&&this[se+We+1]!==0&&(gt=1),this[se+We]=(ve/Ge>>0)-gt&255;return se+Te},e.prototype.writeInt8=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,1,127,-128),ve<0&&(ve=255+ve+1),this[se]=ve&255,se+1},e.prototype.writeInt16LE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,2,32767,-32768),this[se]=ve&255,this[se+1]=ve>>>8,se+2},e.prototype.writeInt16BE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,2,32767,-32768),this[se]=ve>>>8,this[se+1]=ve&255,se+2},e.prototype.writeInt32LE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,4,2147483647,-2147483648),this[se]=ve&255,this[se+1]=ve>>>8,this[se+2]=ve>>>16,this[se+3]=ve>>>24,se+4},e.prototype.writeInt32BE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,4,2147483647,-2147483648),ve<0&&(ve=4294967295+ve+1),this[se]=ve>>>24,this[se+1]=ve>>>16,this[se+2]=ve>>>8,this[se+3]=ve&255,se+4},e.prototype.writeBigInt64LE=ke(function(ve,se=0){return Z(this,ve,se,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=ke(function(ve,se=0){return Q(this,ve,se,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function re(le,ve,se,Te,Fe,We){if(se+Te>le.length)throw new RangeError("Index out of range");if(se<0)throw new RangeError("Index out of range")}function ne(le,ve,se,Te,Fe){return ve=+ve,se=se>>>0,Fe||re(le,ve,se,4,34028234663852886e22,-34028234663852886e22),v.write(le,ve,se,Te,23,4),se+4}e.prototype.writeFloatLE=function(ve,se,Te){return ne(this,ve,se,!0,Te)},e.prototype.writeFloatBE=function(ve,se,Te){return ne(this,ve,se,!1,Te)};function oe(le,ve,se,Te,Fe){return ve=+ve,se=se>>>0,Fe||re(le,ve,se,8,17976931348623157e292,-17976931348623157e292),v.write(le,ve,se,Te,52,8),se+8}e.prototype.writeDoubleLE=function(ve,se,Te){return oe(this,ve,se,!0,Te)},e.prototype.writeDoubleBE=function(ve,se,Te){return oe(this,ve,se,!1,Te)},e.prototype.copy=function(ve,se,Te,Fe){if(!e.isBuffer(ve))throw new TypeError("argument should be a Buffer");if(Te||(Te=0),!Fe&&Fe!==0&&(Fe=this.length),se>=ve.length&&(se=ve.length),se||(se=0),Fe>0&&Fe=this.length)throw new RangeError("Index out of range");if(Fe<0)throw new RangeError("sourceEnd out of bounds");Fe>this.length&&(Fe=this.length),ve.length-se>>0,Te=Te===void 0?this.length:Te>>>0,ve||(ve=0);let We;if(typeof ve=="number")for(We=se;We2**32?Fe=K(String(se)):typeof se=="bigint"&&(Fe=String(se),(se>BigInt(2)**BigInt(32)||se<-(BigInt(2)**BigInt(32)))&&(Fe=K(Fe)),Fe+="n"),Te+=` It must be ${ve}. Received ${Fe}`,Te},RangeError);function K(le){let ve="",se=le.length,Te=le[0]==="-"?1:0;for(;se>=Te+4;se-=3)ve=`_${le.slice(se-3,se)}${ve}`;return`${le.slice(0,se)}${ve}`}function G(le,ve,se){q(ve,"offset"),(le[ve]===void 0||le[ve+se]===void 0)&&W(ve,le.length-(se+1))}function X(le,ve,se,Te,Fe,We){if(le>se||le3?ve===0||ve===BigInt(0)?gt=`>= 0${Ge} and < 2${Ge} ** ${(We+1)*8}${Ge}`:gt=`>= -(2${Ge} ** ${(We+1)*8-1}${Ge}) and < 2 ** ${(We+1)*8-1}${Ge}`:gt=`>= ${ve}${Ge} and <= ${se}${Ge}`,new V.ERR_OUT_OF_RANGE("value",gt,le)}G(Te,Fe,We)}function q(le,ve){if(typeof le!="number")throw new V.ERR_INVALID_ARG_TYPE(ve,"number",le)}function W(le,ve,se){throw Math.floor(le)!==le?(q(le,se),new V.ERR_OUT_OF_RANGE(se||"offset","an integer",le)):ve<0?new V.ERR_BUFFER_OUT_OF_BOUNDS:new V.ERR_OUT_OF_RANGE(se||"offset",`>= ${se?1:0} and <= ${ve}`,le)}var ee=/[^+/0-9A-Za-z-_]/g;function ae(le){if(le=le.split("=")[0],le=le.trim().replace(ee,""),le.length<2)return"";for(;le.length%4!==0;)le=le+"=";return le}function fe(le,ve){ve=ve||1/0;let se,Te=le.length,Fe=null,We=[];for(let Ge=0;Ge55295&&se<57344){if(!Fe){if(se>56319){(ve-=3)>-1&&We.push(239,191,189);continue}else if(Ge+1===Te){(ve-=3)>-1&&We.push(239,191,189);continue}Fe=se;continue}if(se<56320){(ve-=3)>-1&&We.push(239,191,189),Fe=se;continue}se=(Fe-55296<<10|se-56320)+65536}else Fe&&(ve-=3)>-1&&We.push(239,191,189);if(Fe=null,se<128){if((ve-=1)<0)break;We.push(se)}else if(se<2048){if((ve-=2)<0)break;We.push(se>>6|192,se&63|128)}else if(se<65536){if((ve-=3)<0)break;We.push(se>>12|224,se>>6&63|128,se&63|128)}else if(se<1114112){if((ve-=4)<0)break;We.push(se>>18|240,se>>12&63|128,se>>6&63|128,se&63|128)}else throw new Error("Invalid code point")}return We}function ye(le){let ve=[];for(let se=0;se>8,Fe=se%256,We.push(Fe),We.push(Te);return We}function Ae(le){return H.toByteArray(ae(le))}function Me(le,ve,se,Te){let Fe;for(Fe=0;Fe=ve.length||Fe>=le.length);++Fe)ve[Fe+se]=le[Fe];return Fe}function Ie(le,ve){return le instanceof ve||le!=null&&le.constructor!=null&&le.constructor.name!=null&&le.constructor.name===ve.name}function qe(le){return le!==le}var je=function(){let le="0123456789abcdef",ve=new Array(256);for(let se=0;se<16;++se){let Te=se*16;for(let Fe=0;Fe<16;++Fe)ve[Te+Fe]=le[se]+le[Fe]}return ve}();function ke(le){return typeof BigInt>"u"?ge:le}function ge(){throw new Error("BigInt not supported")}}}),R1=Ee({"node_modules/has-symbols/shams.js"(J,H){"use strict";H.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var x={},E=Symbol("test"),k=Object(E);if(typeof E=="string"||Object.prototype.toString.call(E)!=="[object Symbol]"||Object.prototype.toString.call(k)!=="[object Symbol]")return!1;var l=42;x[E]=l;for(var e in x)return!1;if(typeof Object.keys=="function"&&Object.keys(x).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(x).length!==0)return!1;var t=Object.getOwnPropertySymbols(x);if(t.length!==1||t[0]!==E||!Object.prototype.propertyIsEnumerable.call(x,E))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var n=Object.getOwnPropertyDescriptor(x,E);if(n.value!==l||n.enumerable!==!0)return!1}return!0}}}),sm=Ee({"node_modules/has-tostringtag/shams.js"(J,H){"use strict";var v=R1();H.exports=function(){return v()&&!!Symbol.toStringTag}}}),F1=Ee({"node_modules/es-object-atoms/index.js"(J,H){"use strict";H.exports=Object}}),yE=Ee({"node_modules/es-errors/index.js"(J,H){"use strict";H.exports=Error}}),_E=Ee({"node_modules/es-errors/eval.js"(J,H){"use strict";H.exports=EvalError}}),bE=Ee({"node_modules/es-errors/range.js"(J,H){"use strict";H.exports=RangeError}}),xE=Ee({"node_modules/es-errors/ref.js"(J,H){"use strict";H.exports=ReferenceError}}),d2=Ee({"node_modules/es-errors/syntax.js"(J,H){"use strict";H.exports=SyntaxError}}),Kp=Ee({"node_modules/es-errors/type.js"(J,H){"use strict";H.exports=TypeError}}),wE=Ee({"node_modules/es-errors/uri.js"(J,H){"use strict";H.exports=URIError}}),TE=Ee({"node_modules/math-intrinsics/abs.js"(J,H){"use strict";H.exports=Math.abs}}),AE=Ee({"node_modules/math-intrinsics/floor.js"(J,H){"use strict";H.exports=Math.floor}}),ME=Ee({"node_modules/math-intrinsics/max.js"(J,H){"use strict";H.exports=Math.max}}),SE=Ee({"node_modules/math-intrinsics/min.js"(J,H){"use strict";H.exports=Math.min}}),EE=Ee({"node_modules/math-intrinsics/pow.js"(J,H){"use strict";H.exports=Math.pow}}),kE=Ee({"node_modules/math-intrinsics/round.js"(J,H){"use strict";H.exports=Math.round}}),CE=Ee({"node_modules/math-intrinsics/isNaN.js"(J,H){"use strict";H.exports=Number.isNaN||function(x){return x!==x}}}),LE=Ee({"node_modules/math-intrinsics/sign.js"(J,H){"use strict";var v=CE();H.exports=function(E){return v(E)||E===0?E:E<0?-1:1}}}),PE=Ee({"node_modules/gopd/gOPD.js"(J,H){"use strict";H.exports=Object.getOwnPropertyDescriptor}}),Ov=Ee({"node_modules/gopd/index.js"(J,H){"use strict";var v=PE();if(v)try{v([],"length")}catch{v=null}H.exports=v}}),lm=Ee({"node_modules/es-define-property/index.js"(J,H){"use strict";var v=Object.defineProperty||!1;if(v)try{v({},"a",{value:1})}catch{v=!1}H.exports=v}}),DE=Ee({"node_modules/has-symbols/index.js"(J,H){"use strict";var v=typeof Symbol<"u"&&Symbol,x=R1();H.exports=function(){return typeof v!="function"||typeof Symbol!="function"||typeof v("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:x()}}}),v2=Ee({"node_modules/get-proto/Reflect.getPrototypeOf.js"(J,H){"use strict";H.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),p2=Ee({"node_modules/get-proto/Object.getPrototypeOf.js"(J,H){"use strict";var v=F1();H.exports=v.getPrototypeOf||null}}),IE=Ee({"node_modules/function-bind/implementation.js"(J,H){"use strict";var v="Function.prototype.bind called on incompatible ",x=Object.prototype.toString,E=Math.max,k="[object Function]",l=function(r,a){for(var o=[],s=0;s"u"||!w?v:w(Uint8Array),N={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":_&&w?w([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":z,"%AsyncGenerator%":z,"%AsyncGeneratorFunction%":z,"%AsyncIteratorPrototype%":z,"%Atomics%":typeof Atomics>"u"?v:Atomics,"%BigInt%":typeof BigInt>"u"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":E,"%eval%":eval,"%EvalError%":k,"%Float16Array%":typeof Float16Array>"u"?v:Float16Array,"%Float32Array%":typeof Float32Array>"u"?v:Float32Array,"%Float64Array%":typeof Float64Array>"u"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?v:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":z,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&w?w(w([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map>"u"||!_||!w?v:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":x,"%Object.getOwnPropertyDescriptor%":T,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":l,"%ReferenceError%":e,"%Reflect%":typeof Reflect>"u"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?v:Set,"%SetIteratorPrototype%":typeof Set>"u"||!_||!w?v:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&w?w(""[Symbol.iterator]()):v,"%Symbol%":_?Symbol:v,"%SyntaxError%":t,"%ThrowTypeError%":C,"%TypedArray%":I,"%TypeError%":n,"%Uint8Array%":typeof Uint8Array>"u"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?v:Uint32Array,"%URIError%":r,"%WeakMap%":typeof WeakMap>"u"?v:WeakMap,"%WeakRef%":typeof WeakRef>"u"?v:WeakRef,"%WeakSet%":typeof WeakSet>"u"?v:WeakSet,"%Function.prototype.call%":b,"%Function.prototype.apply%":A,"%Object.defineProperty%":S,"%Object.getPrototypeOf%":h,"%Math.abs%":a,"%Math.floor%":o,"%Math.max%":s,"%Math.min%":c,"%Math.pow%":g,"%Math.round%":f,"%Math.sign%":p,"%Reflect.getPrototypeOf%":u};if(w)try{null.error}catch(G){R=w(w(G)),N["%Error.prototype%"]=R}var R,B=function G(X){var q;if(X==="%AsyncFunction%")q=i("async function () {}");else if(X==="%GeneratorFunction%")q=i("function* () {}");else if(X==="%AsyncGeneratorFunction%")q=i("async function* () {}");else if(X==="%AsyncGenerator%"){var W=G("%AsyncGeneratorFunction%");W&&(q=W.prototype)}else if(X==="%AsyncIteratorPrototype%"){var ee=G("%AsyncGenerator%");ee&&w&&(q=w(ee.prototype))}return N[X]=q,q},F={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=Jp(),j=g2(),U=P.call(b,Array.prototype.concat),Z=P.call(A,Array.prototype.splice),Q=P.call(b,String.prototype.replace),re=P.call(b,String.prototype.slice),ne=P.call(b,RegExp.prototype.exec),oe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V=/\\(\\)?/g,$=function(X){var q=re(X,0,1),W=re(X,-1);if(q==="%"&&W!=="%")throw new t("invalid intrinsic syntax, expected closing `%`");if(W==="%"&&q!=="%")throw new t("invalid intrinsic syntax, expected opening `%`");var ee=[];return Q(X,oe,function(ae,fe,ye,xe){ee[ee.length]=ye?Q(xe,V,"$1"):fe||ae}),ee},K=function(X,q){var W=X,ee;if(j(F,W)&&(ee=F[W],W="%"+ee[0]+"%"),j(N,W)){var ae=N[W];if(ae===z&&(ae=B(W)),typeof ae>"u"&&!q)throw new n("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:ee,name:W,value:ae}}throw new t("intrinsic "+X+" does not exist!")};H.exports=function(X,q){if(typeof X!="string"||X.length===0)throw new n("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof q!="boolean")throw new n('"allowMissing" argument must be a boolean');if(ne(/^%?[^%]*%?$/,X)===null)throw new t("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var W=$(X),ee=W.length>0?W[0]:"",ae=K("%"+ee+"%",q),fe=ae.name,ye=ae.value,xe=!1,Ae=ae.alias;Ae&&(ee=Ae[0],Z(W,U([0,1],Ae)));for(var Me=1,Ie=!0;Me=W.length){var ge=T(ye,qe);Ie=!!ge,Ie&&"get"in ge&&!("originalValue"in ge.get)?ye=ge.get:ye=ye[qe]}else Ie=j(ye,qe),ye=ye[qe];Ie&&!xe&&(N[fe]=ye)}}return ye}}}),jv=Ee({"node_modules/call-bound/index.js"(J,H){"use strict";var v=j1(),x=N1(),E=x([v("%String.prototype.indexOf%")]);H.exports=function(l,e){var t=v(l,!!e);return typeof t=="function"&&E(l,".prototype.")>-1?x([t]):t}}}),zE=Ee({"node_modules/is-arguments/index.js"(J,H){"use strict";var v=sm()(),x=jv(),E=x("Object.prototype.toString"),k=function(n){return v&&n&&typeof n=="object"&&Symbol.toStringTag in n?!1:E(n)==="[object Arguments]"},l=function(n){return k(n)?!0:n!==null&&typeof n=="object"&&"length"in n&&typeof n.length=="number"&&n.length>=0&&E(n)!=="[object Array]"&&"callee"in n&&E(n.callee)==="[object Function]"},e=function(){return k(arguments)}();k.isLegacyArguments=l,H.exports=e?k:l}}),BE=Ee({"node_modules/is-regex/index.js"(J,H){"use strict";var v=jv(),x=sm()(),E=g2(),k=Ov(),l;x?(e=v("RegExp.prototype.exec"),t={},n=function(){throw t},r={toString:n,valueOf:n},typeof Symbol.toPrimitive=="symbol"&&(r[Symbol.toPrimitive]=n),l=function(c){if(!c||typeof c!="object")return!1;var g=k(c,"lastIndex"),f=g&&E(g,"value");if(!f)return!1;try{e(c,r)}catch(p){return p===t}}):(a=v("Object.prototype.toString"),o="[object RegExp]",l=function(c){return!c||typeof c!="object"&&typeof c!="function"?!1:a(c)===o});var e,t,n,r,a,o;H.exports=l}}),NE=Ee({"node_modules/safe-regex-test/index.js"(J,H){"use strict";var v=jv(),x=BE(),E=v("RegExp.prototype.exec"),k=Kp();H.exports=function(e){if(!x(e))throw new k("`regex` must be a RegExp");return function(n){return E(e,n)!==null}}}}),OE=Ee({"node_modules/generator-function/index.js"(J,H){"use strict";var v=function*(){}.constructor;H.exports=()=>v}}),jE=Ee({"node_modules/is-generator-function/index.js"(J,H){"use strict";var v=jv(),x=NE(),E=x(/^\s*(?:function)?\*/),k=sm()(),l=O1(),e=v("Object.prototype.toString"),t=v("Function.prototype.toString"),n=OE();H.exports=function(a){if(typeof a!="function")return!1;if(E(t(a)))return!0;if(!k){var o=e(a);return o==="[object GeneratorFunction]"}if(!l)return!1;var s=n();return s&&l(a)===s.prototype}}}),UE=Ee({"node_modules/is-callable/index.js"(J,H){"use strict";var v=Function.prototype.toString,x=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,E,k;if(typeof x=="function"&&typeof Object.defineProperty=="function")try{E=Object.defineProperty({},"length",{get:function(){throw k}}),k={},x(function(){throw 42},null,E)}catch(T){T!==k&&(x=null)}else x=null;var l=/^\s*class\b/,e=function(S){try{var M=v.call(S);return l.test(M)}catch{return!1}},t=function(S){try{return e(S)?!1:(v.call(S),!0)}catch{return!1}},n=Object.prototype.toString,r="[object Object]",a="[object Function]",o="[object GeneratorFunction]",s="[object HTMLAllCollection]",c="[object HTML document.all class]",g="[object HTMLCollection]",f=typeof Symbol=="function"&&!!Symbol.toStringTag,p=!(0 in[,]),m=function(){return!1};typeof document=="object"&&(i=document.all,n.call(i)===n.call(document.all)&&(m=function(S){if((p||!S)&&(typeof S>"u"||typeof S=="object"))try{var M=n.call(S);return(M===s||M===c||M===g||M===r)&&S("")==null}catch{}return!1}));var i;H.exports=x?function(S){if(m(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;try{x(S,null,E)}catch(M){if(M!==k)return!1}return!e(S)&&t(S)}:function(S){if(m(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;if(f)return t(S);if(e(S))return!1;var M=n.call(S);return M!==a&&M!==o&&!/^\[object HTML/.test(M)?!1:t(S)}}}),qE=Ee({"node_modules/for-each/index.js"(J,H){"use strict";var v=UE(),x=Object.prototype.toString,E=Object.prototype.hasOwnProperty,k=function(r,a,o){for(var s=0,c=r.length;s=3&&(s=o),t(r)?k(r,a,s):typeof r=="string"?l(r,a,s):e(r,a,s)}}}),VE=Ee({"node_modules/possible-typed-array-names/index.js"(J,H){"use strict";H.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}}),HE=Ee({"node_modules/available-typed-arrays/index.js"(J,H){"use strict";var v=VE(),x=typeof globalThis>"u"?window:globalThis;H.exports=function(){for(var k=[],l=0;l3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new E("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new E("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new E("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new E("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,c=!!k&&k(e,t);if(v)v(e,t,{configurable:o===null&&c?c.configurable:!o,enumerable:r===null&&c?c.enumerable:!r,value:n,writable:a===null&&c?c.writable:!a});else if(s||!r&&!a&&!o)e[t]=n;else throw new x("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),_2=Ee({"node_modules/has-property-descriptors/index.js"(J,H){"use strict";var v=lm(),x=function(){return!!v};x.hasArrayLengthDefineBug=function(){if(!v)return null;try{return v([],"length",{value:1}).length!==1}catch{return!0}},H.exports=x}}),GE=Ee({"node_modules/set-function-length/index.js"(J,H){"use strict";var v=j1(),x=y2(),E=_2()(),k=Ov(),l=Kp(),e=v("%Math.floor%");H.exports=function(n,r){if(typeof n!="function")throw new l("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||e(r)!==r)throw new l("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in n&&k){var c=k(n,"length");c&&!c.configurable&&(o=!1),c&&!c.writable&&(s=!1)}return(o||s||!a)&&(E?x(n,"length",r,!0,!0):x(n,"length",r)),n}}}),WE=Ee({"node_modules/call-bind-apply-helpers/applyBind.js"(J,H){"use strict";var v=Jp(),x=B1(),E=m2();H.exports=function(){return E(v,x,arguments)}}}),um=Ee({"node_modules/call-bind/index.js"(J,H){"use strict";var v=GE(),x=lm(),E=N1(),k=WE();H.exports=function(e){var t=E(arguments),n=1+e.length-(arguments.length-1);return v(t,n>0?n:0,!0)},x?x(H.exports,"apply",{value:k}):H.exports.apply=k}}),b2=Ee({"node_modules/which-typed-array/index.js"(J,H){"use strict";var v=qE(),x=HE(),E=um(),k=jv(),l=Ov(),e=O1(),t=k("Object.prototype.toString"),n=sm()(),r=typeof globalThis>"u"?window:globalThis,a=x(),o=k("String.prototype.slice"),s=k("Array.prototype.indexOf",!0)||function(i,T){for(var S=0;S-1}H.exports=function(i){if(!i||typeof i!="object")return!1;if(!n){var T=o(t(i),8,-1);return p(T)?T:T!=="Object"?!1:f(i)}return l?g(i):null}}}),YE=Ee({"node_modules/is-typed-array/index.js"(J,H){"use strict";var v=b2();H.exports=function(E){return!!v(E)}}}),x2=Ee({"node_modules/util/support/types.js"(J){"use strict";var H=zE(),v=jE(),x=b2(),E=YE();function k(xe){return xe.call.bind(xe)}var l=typeof BigInt<"u",e=typeof Symbol<"u",t=k(Object.prototype.toString),n=k(Number.prototype.valueOf),r=k(String.prototype.valueOf),a=k(Boolean.prototype.valueOf);l&&(o=k(BigInt.prototype.valueOf));var o;e&&(s=k(Symbol.prototype.valueOf));var s;function c(xe,Ae){if(typeof xe!="object")return!1;try{return Ae(xe),!0}catch{return!1}}J.isArgumentsObject=H,J.isGeneratorFunction=v,J.isTypedArray=E;function g(xe){return typeof Promise<"u"&&xe instanceof Promise||xe!==null&&typeof xe=="object"&&typeof xe.then=="function"&&typeof xe.catch=="function"}J.isPromise=g;function f(xe){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(xe):E(xe)||Z(xe)}J.isArrayBufferView=f;function p(xe){return x(xe)==="Uint8Array"}J.isUint8Array=p;function m(xe){return x(xe)==="Uint8ClampedArray"}J.isUint8ClampedArray=m;function i(xe){return x(xe)==="Uint16Array"}J.isUint16Array=i;function T(xe){return x(xe)==="Uint32Array"}J.isUint32Array=T;function S(xe){return x(xe)==="Int8Array"}J.isInt8Array=S;function M(xe){return x(xe)==="Int16Array"}J.isInt16Array=M;function C(xe){return x(xe)==="Int32Array"}J.isInt32Array=C;function _(xe){return x(xe)==="Float32Array"}J.isFloat32Array=_;function w(xe){return x(xe)==="Float64Array"}J.isFloat64Array=w;function h(xe){return x(xe)==="BigInt64Array"}J.isBigInt64Array=h;function u(xe){return x(xe)==="BigUint64Array"}J.isBigUint64Array=u;function A(xe){return t(xe)==="[object Map]"}A.working=typeof Map<"u"&&A(new Map);function b(xe){return typeof Map>"u"?!1:A.working?A(xe):xe instanceof Map}J.isMap=b;function z(xe){return t(xe)==="[object Set]"}z.working=typeof Set<"u"&&z(new Set);function I(xe){return typeof Set>"u"?!1:z.working?z(xe):xe instanceof Set}J.isSet=I;function N(xe){return t(xe)==="[object WeakMap]"}N.working=typeof WeakMap<"u"&&N(new WeakMap);function R(xe){return typeof WeakMap>"u"?!1:N.working?N(xe):xe instanceof WeakMap}J.isWeakMap=R;function B(xe){return t(xe)==="[object WeakSet]"}B.working=typeof WeakSet<"u"&&B(new WeakSet);function F(xe){return B(xe)}J.isWeakSet=F;function P(xe){return t(xe)==="[object ArrayBuffer]"}P.working=typeof ArrayBuffer<"u"&&P(new ArrayBuffer);function j(xe){return typeof ArrayBuffer>"u"?!1:P.working?P(xe):xe instanceof ArrayBuffer}J.isArrayBuffer=j;function U(xe){return t(xe)==="[object DataView]"}U.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&U(new DataView(new ArrayBuffer(1),0,1));function Z(xe){return typeof DataView>"u"?!1:U.working?U(xe):xe instanceof DataView}J.isDataView=Z;var Q=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function re(xe){return t(xe)==="[object SharedArrayBuffer]"}function ne(xe){return typeof Q>"u"?!1:(typeof re.working>"u"&&(re.working=re(new Q)),re.working?re(xe):xe instanceof Q)}J.isSharedArrayBuffer=ne;function oe(xe){return t(xe)==="[object AsyncFunction]"}J.isAsyncFunction=oe;function V(xe){return t(xe)==="[object Map Iterator]"}J.isMapIterator=V;function $(xe){return t(xe)==="[object Set Iterator]"}J.isSetIterator=$;function K(xe){return t(xe)==="[object Generator]"}J.isGeneratorObject=K;function G(xe){return t(xe)==="[object WebAssembly.Module]"}J.isWebAssemblyCompiledModule=G;function X(xe){return c(xe,n)}J.isNumberObject=X;function q(xe){return c(xe,r)}J.isStringObject=q;function W(xe){return c(xe,a)}J.isBooleanObject=W;function ee(xe){return l&&c(xe,o)}J.isBigIntObject=ee;function ae(xe){return e&&c(xe,s)}J.isSymbolObject=ae;function fe(xe){return X(xe)||q(xe)||W(xe)||ee(xe)||ae(xe)}J.isBoxedPrimitive=fe;function ye(xe){return typeof Uint8Array<"u"&&(j(xe)||ne(xe))}J.isAnyArrayBuffer=ye,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(xe){Object.defineProperty(J,xe,{enumerable:!1,value:function(){throw new Error(xe+" is not supported in userland")}})})}}),w2=Ee({"node_modules/util/support/isBufferBrowser.js"(J,H){H.exports=function(x){return x&&typeof x=="object"&&typeof x.copy=="function"&&typeof x.fill=="function"&&typeof x.readUInt8=="function"}}}),T2=Ee({"(disabled):node_modules/util/util.js"(J){var H=Object.getOwnPropertyDescriptors||function(Z){for(var Q=Object.keys(Z),re={},ne=0;ne=ne)return $;switch($){case"%s":return String(re[Q++]);case"%d":return Number(re[Q++]);case"%j":try{return JSON.stringify(re[Q++])}catch{return"[Circular]"}default:return $}}),V=re[Q];Q"u")return function(){return J.deprecate(U,Z).apply(this,arguments)};var Q=!1;function re(){if(!Q){if(process.throwDeprecation)throw new Error(Z);process.traceDeprecation?console.trace(Z):console.error(Z),Q=!0}return U.apply(this,arguments)}return re};var x={},E=/^$/;k="false",k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i");var k;J.debuglog=function(U){if(U=U.toUpperCase(),!x[U])if(E.test(U)){var Z=process.pid;x[U]=function(){var Q=J.format.apply(J,arguments);console.error("%s %d: %s",U,Z,Q)}}else x[U]=function(){};return x[U]};function l(U,Z){var Q={seen:[],stylize:t};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),p(Z)?Q.showHidden=Z:Z&&J._extend(Q,Z),C(Q.showHidden)&&(Q.showHidden=!1),C(Q.depth)&&(Q.depth=2),C(Q.colors)&&(Q.colors=!1),C(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=e),r(Q,U,Q.depth)}J.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(U,Z){var Q=l.styles[Z];return Q?"\x1B["+l.colors[Q][0]+"m"+U+"\x1B["+l.colors[Q][1]+"m":U}function t(U,Z){return U}function n(U){var Z={};return U.forEach(function(Q,re){Z[Q]=!0}),Z}function r(U,Z,Q){if(U.customInspect&&Z&&A(Z.inspect)&&Z.inspect!==J.inspect&&!(Z.constructor&&Z.constructor.prototype===Z)){var re=Z.inspect(Q,U);return S(re)||(re=r(U,re,Q)),re}var ne=a(U,Z);if(ne)return ne;var oe=Object.keys(Z),V=n(oe);if(U.showHidden&&(oe=Object.getOwnPropertyNames(Z)),u(Z)&&(oe.indexOf("message")>=0||oe.indexOf("description")>=0))return o(Z);if(oe.length===0){if(A(Z)){var $=Z.name?": "+Z.name:"";return U.stylize("[Function"+$+"]","special")}if(_(Z))return U.stylize(RegExp.prototype.toString.call(Z),"regexp");if(h(Z))return U.stylize(Date.prototype.toString.call(Z),"date");if(u(Z))return o(Z)}var K="",G=!1,X=["{","}"];if(f(Z)&&(G=!0,X=["[","]"]),A(Z)){var q=Z.name?": "+Z.name:"";K=" [Function"+q+"]"}if(_(Z)&&(K=" "+RegExp.prototype.toString.call(Z)),h(Z)&&(K=" "+Date.prototype.toUTCString.call(Z)),u(Z)&&(K=" "+o(Z)),oe.length===0&&(!G||Z.length==0))return X[0]+K+X[1];if(Q<0)return _(Z)?U.stylize(RegExp.prototype.toString.call(Z),"regexp"):U.stylize("[Object]","special");U.seen.push(Z);var W;return G?W=s(U,Z,Q,V,oe):W=oe.map(function(ee){return c(U,Z,Q,V,ee,G)}),U.seen.pop(),g(W,K,X)}function a(U,Z){if(C(Z))return U.stylize("undefined","undefined");if(S(Z)){var Q="'"+JSON.stringify(Z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(T(Z))return U.stylize(""+Z,"number");if(p(Z))return U.stylize(""+Z,"boolean");if(m(Z))return U.stylize("null","null")}function o(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,Z,Q,re,ne){for(var oe=[],V=0,$=Z.length;V<$;++V)B(Z,String(V))?oe.push(c(U,Z,Q,re,String(V),!0)):oe.push("");return ne.forEach(function(K){K.match(/^\d+$/)||oe.push(c(U,Z,Q,re,K,!0))}),oe}function c(U,Z,Q,re,ne,oe){var V,$,K;if(K=Object.getOwnPropertyDescriptor(Z,ne)||{value:Z[ne]},K.get?K.set?$=U.stylize("[Getter/Setter]","special"):$=U.stylize("[Getter]","special"):K.set&&($=U.stylize("[Setter]","special")),B(re,ne)||(V="["+ne+"]"),$||(U.seen.indexOf(K.value)<0?(m(Q)?$=r(U,K.value,null):$=r(U,K.value,Q-1),$.indexOf(` +`)>-1&&(oe?$=$.split(` `).map(function(G){return" "+G}).join(` -`).slice(2):X=` -`+X.split(` +`).slice(2):$=` +`+$.split(` `).map(function(G){return" "+G}).join(` -`))):X=U.stylize("[Circular]","special")),C(H)){if(oe&&ae.match(/^\d+$/))return X;H=JSON.stringify(""+ae),H.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(H=H.slice(1,-1),H=U.stylize(H,"name")):(H=H.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),H=U.stylize(H,"string"))}return H+": "+X}function m(U,Z,Q){var re=0,ae=U.reduce(function(oe,H){return re++,H.indexOf(` -`)>=0&&re++,oe+H.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ae>60?Q[0]+(Z===""?"":Z+` +`))):$=U.stylize("[Circular]","special")),C(V)){if(oe&&ne.match(/^\d+$/))return $;V=JSON.stringify(""+ne),V.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.slice(1,-1),V=U.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=U.stylize(V,"string"))}return V+": "+$}function g(U,Z,Q){var re=0,ne=U.reduce(function(oe,V){return re++,V.indexOf(` +`)>=0&&re++,oe+V.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ne>60?Q[0]+(Z===""?"":Z+` `)+" "+U.join(`, - `)+" "+Q[1]:Q[0]+Z+" "+U.join(", ")+" "+Q[1]}J.types=x2();function h(U){return Array.isArray(U)}J.isArray=h;function p(U){return typeof U=="boolean"}J.isBoolean=p;function g(U){return U===null}J.isNull=g;function i(U){return U==null}J.isNullOrUndefined=i;function w(U){return typeof U=="number"}J.isNumber=w;function S(U){return typeof U=="string"}J.isString=S;function M(U){return typeof U=="symbol"}J.isSymbol=M;function C(U){return U===void 0}J.isUndefined=C;function _(U){return T(U)&&z(U)==="[object RegExp]"}J.isRegExp=_,J.types.isRegExp=_;function T(U){return typeof U=="object"&&U!==null}J.isObject=T;function f(U){return T(U)&&z(U)==="[object Date]"}J.isDate=f,J.types.isDate=f;function u(U){return T(U)&&(z(U)==="[object Error]"||U instanceof Error)}J.isError=u,J.types.isNativeError=u;function A(U){return typeof U=="function"}J.isFunction=A;function b(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}J.isPrimitive=b,J.isBuffer=w2();function z(U){return Object.prototype.toString.call(U)}function I(U){return U<10?"0"+U.toString(10):U.toString(10)}var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(){var U=new Date,Z=[I(U.getHours()),I(U.getMinutes()),I(U.getSeconds())].join(":");return[U.getDate(),N[U.getMonth()],Z].join(" ")}J.log=function(){console.log("%s - %s",R(),J.format.apply(J,arguments))},J.inherits=_d(),J._extend=function(U,Z){if(!Z||!T(Z))return U;for(var Q=Object.keys(Z),re=Q.length;re--;)U[Q[re]]=Z[Q[re]];return U};function B(U,Z){return Object.prototype.hasOwnProperty.call(U,Z)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function(Z){if(typeof Z!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&Z[F]){var Q=Z[F];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,F,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var re,ae,oe=new Promise(function(K,G){re=K,ae=G}),H=[],X=0;X0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(g){var i={data:g,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(this.length===0)return"";for(var i=this.head,w=""+i.data;i=i.next;)w+=g+i.data;return w}},{key:"concat",value:function(g){if(this.length===0)return n.alloc(0);for(var i=n.allocUnsafe(g>>>0),w=this.head,S=0;w;)m(w.data,i,S),S+=w.data.length,w=w.next;return i}},{key:"consume",value:function(g,i){var w;return gM.length?M.length:g;if(C===M.length?S+=M:S+=M.slice(0,g),g-=C,g===0){C===M.length?(++w,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=M.slice(C));break}++w}return this.length-=w,S}},{key:"_getBuffer",value:function(g){var i=n.allocUnsafe(g),w=this.head,S=1;for(w.data.copy(i),g-=w.data.length;w=w.next;){var M=w.data,C=g>M.length?M.length:g;if(M.copy(i,i.length-g,0,C),g-=C,g===0){C===M.length?(++S,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=M.slice(C));break}++S}return this.length-=S,i}},{key:c,value:function(g,i){return s(this,x(x({},i),{},{depth:0,customInspect:!1}))}}]),h}()}}),A2=Ee({"node_modules/readable-stream/lib/internal/streams/destroy.js"(J,V){"use strict";function v(t,a){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(a?a(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(l,this,t)):process.nextTick(l,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!a&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(E,r):(r._writableState.errorEmitted=!0,process.nextTick(x,r,s)):process.nextTick(x,r,s):a?(process.nextTick(E,r),a(s)):process.nextTick(E,r)}),this)}function x(t,a){l(t,a),E(t)}function E(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function k(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(t,a){t.emit("error",a)}function e(t,a){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(a):t.emit("error",a)}V.exports={destroy:v,undestroy:k,errorOrDestroy:e}}}),Uv=Ee({"node_modules/readable-stream/errors-browser.js"(J,V){"use strict";function v(a,r){a.prototype=Object.create(r.prototype),a.prototype.constructor=a,a.__proto__=r}var x={};function E(a,r,n){n||(n=Error);function o(c,m,h){return typeof r=="string"?r:r(c,m,h)}var s=function(c){v(m,c);function m(h,p,g){return c.call(this,o(h,p,g))||this}return m}(n);s.prototype.name=n.name,s.prototype.code=a,x[a]=s}function k(a,r){if(Array.isArray(a)){var n=a.length;return a=a.map(function(o){return String(o)}),n>2?"one of ".concat(r," ").concat(a.slice(0,n-1).join(", "),", or ")+a[n-1]:n===2?"one of ".concat(r," ").concat(a[0]," or ").concat(a[1]):"of ".concat(r," ").concat(a[0])}else return"of ".concat(r," ").concat(String(a))}function l(a,r,n){return a.substr(!n||n<0?0:+n,r.length)===r}function e(a,r,n){return(n===void 0||n>a.length)&&(n=a.length),a.substring(n-r.length,n)===r}function t(a,r,n){return typeof n!="number"&&(n=0),n+r.length>a.length?!1:a.indexOf(r,n)!==-1}E("ERR_INVALID_OPT_VALUE",function(a,r){return'The value "'+r+'" is invalid for option "'+a+'"'},TypeError),E("ERR_INVALID_ARG_TYPE",function(a,r,n){var o;typeof r=="string"&&l(r,"not ")?(o="must not be",r=r.replace(/^not /,"")):o="must be";var s;if(e(a," argument"))s="The ".concat(a," ").concat(o," ").concat(k(r,"type"));else{var c=t(a,".")?"property":"argument";s='The "'.concat(a,'" ').concat(c," ").concat(o," ").concat(k(r,"type"))}return s+=". Received type ".concat(typeof n),s},TypeError),E("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),E("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),E("ERR_STREAM_PREMATURE_CLOSE","Premature close"),E("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),E("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),E("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),E("ERR_STREAM_WRITE_AFTER_END","write after end"),E("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),E("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),E("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),V.exports.codes=x}}),M2=Ee({"node_modules/readable-stream/lib/internal/streams/state.js"(J,V){"use strict";var v=Uv().codes.ERR_INVALID_OPT_VALUE;function x(k,l,e){return k.highWaterMark!=null?k.highWaterMark:l?k[e]:null}function E(k,l,e,t){var a=x(l,t,e);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var r=t?e:"highWaterMark";throw new v(r,a)}return Math.floor(a)}return k.objectMode?16:16*1024}V.exports={getHighWaterMark:E}}}),$E=Ee({"node_modules/util-deprecate/browser.js"(J,V){V.exports=v;function v(E,k){if(x("noDeprecation"))return E;var l=!1;function e(){if(!l){if(x("throwDeprecation"))throw new Error(k);x("traceDeprecation")?console.trace(k):console.warn(k),l=!0}return E.apply(this,arguments)}return e}function x(E){try{if(!window.localStorage)return!1}catch{return!1}var k=window.localStorage[E];return k==null?!1:String(k).toLowerCase()==="true"}}}),S2=Ee({"node_modules/readable-stream/lib/_stream_writable.js"(J,V){"use strict";V.exports=f;function v(H){var X=this;this.next=null,this.entry=null,this.finish=function(){oe(X,H)}}var x;f.WritableState=_;var E={deprecate:$E()},k=h2(),l=Nv().Buffer,e=(typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function t(H){return l.from(H)}function a(H){return l.isBuffer(H)||H instanceof e}var r=A2(),n=M2(),o=n.getHighWaterMark,s=Uv().codes,c=s.ERR_INVALID_ARG_TYPE,m=s.ERR_METHOD_NOT_IMPLEMENTED,h=s.ERR_MULTIPLE_CALLBACK,p=s.ERR_STREAM_CANNOT_PIPE,g=s.ERR_STREAM_DESTROYED,i=s.ERR_STREAM_NULL_VALUES,w=s.ERR_STREAM_WRITE_AFTER_END,S=s.ERR_UNKNOWN_ENCODING,M=r.errorOrDestroy;_d()(f,k);function C(){}function _(H,X,K){x=x||qv(),H=H||{},typeof K!="boolean"&&(K=X instanceof x),this.objectMode=!!H.objectMode,K&&(this.objectMode=this.objectMode||!!H.writableObjectMode),this.highWaterMark=o(this,H,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var G=H.decodeStrings===!1;this.decodeStrings=!G,this.defaultEncoding=H.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){B(X,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=H.emitClose!==!1,this.autoDestroy=!!H.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new v(this)}_.prototype.getBuffer=function(){for(var X=this.bufferedRequest,K=[];X;)K.push(X),X=X.next;return K},function(){try{Object.defineProperty(_.prototype,"buffer",{get:E.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var T;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(f,Symbol.hasInstance,{value:function(X){return T.call(this,X)?!0:this!==f?!1:X&&X._writableState instanceof _}})):T=function(X){return X instanceof this};function f(H){x=x||qv();var X=this instanceof x;if(!X&&!T.call(f,this))return new f(H);this._writableState=new _(H,this,X),this.writable=!0,H&&(typeof H.write=="function"&&(this._write=H.write),typeof H.writev=="function"&&(this._writev=H.writev),typeof H.destroy=="function"&&(this._destroy=H.destroy),typeof H.final=="function"&&(this._final=H.final)),k.call(this)}f.prototype.pipe=function(){M(this,new p)};function u(H,X){var K=new w;M(H,K),process.nextTick(X,K)}function A(H,X,K,G){var Y;return K===null?Y=new i:typeof K!="string"&&!X.objectMode&&(Y=new c("chunk",["string","Buffer"],K)),Y?(M(H,Y),process.nextTick(G,Y),!1):!0}f.prototype.write=function(H,X,K){var G=this._writableState,Y=!1,q=!G.objectMode&&a(H);return q&&!l.isBuffer(H)&&(H=t(H)),typeof X=="function"&&(K=X,X=null),q?X="buffer":X||(X=G.defaultEncoding),typeof K!="function"&&(K=C),G.ending?u(this,K):(q||A(this,G,H,K))&&(G.pendingcb++,Y=z(this,G,q,H,X,K)),Y},f.prototype.cork=function(){this._writableState.corked++},f.prototype.uncork=function(){var H=this._writableState;H.corked&&(H.corked--,!H.writing&&!H.corked&&!H.bufferProcessing&&H.bufferedRequest&&j(this,H))},f.prototype.setDefaultEncoding=function(X){if(typeof X=="string"&&(X=X.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((X+"").toLowerCase())>-1))throw new S(X);return this._writableState.defaultEncoding=X,this},Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function b(H,X,K){return!H.objectMode&&H.decodeStrings!==!1&&typeof X=="string"&&(X=l.from(X,K)),X}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(H,X,K,G,Y,q){if(!K){var $=b(X,G,Y);G!==$&&(K=!0,Y="buffer",G=$)}var ee=X.objectMode?1:G.length;X.length+=ee;var ne=X.length>5===6?2:g>>4===14?3:g>>3===30?4:g>>6===2?-1:-2}function e(g,i,w){var S=i.length-1;if(S=0?(M>0&&(g.lastNeed=M-1),M):--S=0?(M>0&&(g.lastNeed=M-2),M):--S=0?(M>0&&(M===2?M=0:g.lastNeed=M-3),M):0))}function t(g,i,w){if((i[0]&192)!==128)return g.lastNeed=0,"\uFFFD";if(g.lastNeed>1&&i.length>1){if((i[1]&192)!==128)return g.lastNeed=1,"\uFFFD";if(g.lastNeed>2&&i.length>2&&(i[2]&192)!==128)return g.lastNeed=2,"\uFFFD"}}function a(g){var i=this.lastTotal-this.lastNeed,w=t(this,g,i);if(w!==void 0)return w;if(this.lastNeed<=g.length)return g.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,i,0,g.length),this.lastNeed-=g.length}function r(g,i){var w=e(this,g,i);if(!this.lastNeed)return g.toString("utf8",i);this.lastTotal=w;var S=g.length-(w-this.lastNeed);return g.copy(this.lastChar,0,S),g.toString("utf8",i,S)}function n(g){var i=g&&g.length?this.write(g):"";return this.lastNeed?i+"\uFFFD":i}function o(g,i){if((g.length-i)%2===0){var w=g.toString("utf16le",i);if(w){var S=w.charCodeAt(w.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",i,g.length-1)}function s(g){var i=g&&g.length?this.write(g):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return i+this.lastChar.toString("utf16le",0,w)}return i}function c(g,i){var w=(g.length-i)%3;return w===0?g.toString("base64",i):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",i,g.length-w))}function m(g){var i=g&&g.length?this.write(g):"";return this.lastNeed?i+this.lastChar.toString("base64",0,3-this.lastNeed):i}function h(g){return g.toString(this.encoding)}function p(g){return g&&g.length?this.write(g):""}}}),U1=Ee({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(J,V){"use strict";var v=Uv().codes.ERR_STREAM_PREMATURE_CLOSE;function x(e){var t=!1;return function(){if(!t){t=!0;for(var a=arguments.length,r=new Array(a),n=0;n0)if(typeof ee!="string"&&!xe.objectMode&&Object.getPrototypeOf(ee)!==l.prototype&&(ee=t(ee)),fe)xe.endEmitted?_($,new w):z($,xe,ee,!0);else if(xe.ended)_($,new g);else{if(xe.destroyed)return!1;xe.reading=!1,xe.decoder&&!ne?(ee=xe.decoder.write(ee),xe.objectMode||ee.length!==0?z($,xe,ee,!1):U($,xe)):z($,xe,ee,!1)}else fe||(xe.reading=!1,U($,xe))}return!xe.ended&&(xe.length=N?$=N:($--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++),$}function B($,ee){return $<=0||ee.length===0&&ee.ended?0:ee.objectMode?1:$!==$?ee.flowing&&ee.length?ee.buffer.head.data.length:ee.length:($>ee.highWaterMark&&(ee.highWaterMark=R($)),$<=ee.length?$:ee.ended?ee.length:(ee.needReadable=!0,0))}A.prototype.read=function($){n("read",$),$=parseInt($,10);var ee=this._readableState,ne=$;if($!==0&&(ee.emittedReadable=!1),$===0&&ee.needReadable&&((ee.highWaterMark!==0?ee.length>=ee.highWaterMark:ee.length>0)||ee.ended))return n("read: emitReadable",ee.length,ee.ended),ee.length===0&&ee.ended?G(this):P(this),null;if($=B($,ee),$===0&&ee.ended)return ee.length===0&&G(this),null;var fe=ee.needReadable;n("need readable",fe),(ee.length===0||ee.length-$0?ye=K($,ee):ye=null,ye===null?(ee.needReadable=ee.length<=ee.highWaterMark,$=0):(ee.length-=$,ee.awaitDrain=0),ee.length===0&&(ee.ended||(ee.needReadable=!0),ne!==$&&ee.ended&&G(this)),ye!==null&&this.emit("data",ye),ye};function F($,ee){if(n("onEofChunk"),!ee.ended){if(ee.decoder){var ne=ee.decoder.end();ne&&ne.length&&(ee.buffer.push(ne),ee.length+=ee.objectMode?1:ne.length)}ee.ended=!0,ee.sync?P($):(ee.needReadable=!1,ee.emittedReadable||(ee.emittedReadable=!0,j($)))}}function P($){var ee=$._readableState;n("emitReadable",ee.needReadable,ee.emittedReadable),ee.needReadable=!1,ee.emittedReadable||(n("emitReadable",ee.flowing),ee.emittedReadable=!0,process.nextTick(j,$))}function j($){var ee=$._readableState;n("emitReadable_",ee.destroyed,ee.length,ee.ended),!ee.destroyed&&(ee.length||ee.ended)&&($.emit("readable"),ee.emittedReadable=!1),ee.needReadable=!ee.flowing&&!ee.ended&&ee.length<=ee.highWaterMark,X($)}function U($,ee){ee.readingMore||(ee.readingMore=!0,process.nextTick(Z,$,ee))}function Z($,ee){for(;!ee.reading&&!ee.ended&&(ee.length1&&q(fe.pipes,$)!==-1)&&!Ue&&(n("false write response, pause",fe.awaitDrain),fe.awaitDrain++),ne.pause())}function ge(Te){n("onerror",Te),se(),$.removeListener("error",ge),E($,"error")===0&&_($,Te)}f($,"error",ge);function ue(){$.removeListener("finish",ve),se()}$.once("close",ue);function ve(){n("onfinish"),$.removeListener("close",ue),se()}$.once("finish",ve);function se(){n("unpipe"),ne.unpipe($)}return $.emit("pipe",ne),fe.flowing||(n("pipe resume"),ne.resume()),$};function Q($){return function(){var ne=$._readableState;n("pipeOnDrain",ne.awaitDrain),ne.awaitDrain&&ne.awaitDrain--,ne.awaitDrain===0&&E($,"data")&&(ne.flowing=!0,X($))}}A.prototype.unpipe=function($){var ee=this._readableState,ne={hasUnpiped:!1};if(ee.pipesCount===0)return this;if(ee.pipesCount===1)return $&&$!==ee.pipes?this:($||($=ee.pipes),ee.pipes=null,ee.pipesCount=0,ee.flowing=!1,$&&$.emit("unpipe",this,ne),this);if(!$){var fe=ee.pipes,ye=ee.pipesCount;ee.pipes=null,ee.pipesCount=0,ee.flowing=!1;for(var xe=0;xe0,fe.flowing!==!1&&this.resume()):$==="readable"&&!fe.endEmitted&&!fe.readableListening&&(fe.readableListening=fe.needReadable=!0,fe.flowing=!1,fe.emittedReadable=!1,n("on readable",fe.length,fe.reading),fe.length?P(this):fe.reading||process.nextTick(ae,this)),ne},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function($,ee){var ne=k.prototype.removeListener.call(this,$,ee);return $==="readable"&&process.nextTick(re,this),ne},A.prototype.removeAllListeners=function($){var ee=k.prototype.removeAllListeners.apply(this,arguments);return($==="readable"||$===void 0)&&process.nextTick(re,this),ee};function re($){var ee=$._readableState;ee.readableListening=$.listenerCount("readable")>0,ee.resumeScheduled&&!ee.paused?ee.flowing=!0:$.listenerCount("data")>0&&$.resume()}function ae($){n("readable nexttick read 0"),$.read(0)}A.prototype.resume=function(){var $=this._readableState;return $.flowing||(n("resume"),$.flowing=!$.readableListening,oe(this,$)),$.paused=!1,this};function oe($,ee){ee.resumeScheduled||(ee.resumeScheduled=!0,process.nextTick(H,$,ee))}function H($,ee){n("resume",ee.reading),ee.reading||$.read(0),ee.resumeScheduled=!1,$.emit("resume"),X($),ee.flowing&&!ee.reading&&$.read(0)}A.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function X($){var ee=$._readableState;for(n("flow",ee.flowing);ee.flowing&&$.read()!==null;);}A.prototype.wrap=function($){var ee=this,ne=this._readableState,fe=!1;$.on("end",function(){if(n("wrapped end"),ne.decoder&&!ne.ended){var Ae=ne.decoder.end();Ae&&Ae.length&&ee.push(Ae)}ee.push(null)}),$.on("data",function(Ae){if(n("wrapped data"),ne.decoder&&(Ae=ne.decoder.write(Ae)),!(ne.objectMode&&Ae==null)&&!(!ne.objectMode&&(!Ae||!Ae.length))){var Me=ee.push(Ae);Me||(fe=!0,$.pause())}});for(var ye in $)this[ye]===void 0&&typeof $[ye]=="function"&&(this[ye]=function(Me){return function(){return $[Me].apply($,arguments)}}(ye));for(var xe=0;xe=ee.length?(ee.decoder?ne=ee.buffer.join(""):ee.buffer.length===1?ne=ee.buffer.first():ne=ee.buffer.concat(ee.length),ee.buffer.clear()):ne=ee.buffer.consume($,ee.decoder),ne}function G($){var ee=$._readableState;n("endReadable",ee.endEmitted),ee.endEmitted||(ee.ended=!0,process.nextTick(Y,ee,$))}function Y($,ee){if(n("endReadableNT",$.endEmitted,$.length),!$.endEmitted&&$.length===0&&($.endEmitted=!0,ee.readable=!1,ee.emit("end"),$.autoDestroy)){var ne=ee._writableState;(!ne||ne.autoDestroy&&ne.finished)&&ee.destroy()}}typeof Symbol=="function"&&(A.from=function($,ee){return C===void 0&&(C=JE()),C(A,$,ee)});function q($,ee){for(var ne=0,fe=$.length;ne0;return a(w,M,C,function(_){g||(g=_),_&&i.forEach(r),!M&&(i.forEach(r),p(g))})});return m.reduce(n)}V.exports=s}}),tk=Ee({"node_modules/stream-browserify/index.js"(J,V){V.exports=E;var v=kv().EventEmitter,x=_d();x(E,v),E.Readable=k2(),E.Writable=S2(),E.Duplex=qv(),E.Transform=C2(),E.PassThrough=QE(),E.finished=U1(),E.pipeline=ek(),E.Stream=E;function E(){v.call(this)}E.prototype.pipe=function(k,l){var e=this;function t(m){k.writable&&k.write(m)===!1&&e.pause&&e.pause()}e.on("data",t);function a(){e.readable&&e.resume&&e.resume()}k.on("drain",a),!k._isStdio&&(!l||l.end!==!1)&&(e.on("end",n),e.on("close",o));var r=!1;function n(){r||(r=!0,k.end())}function o(){r||(r=!0,typeof k.destroy=="function"&&k.destroy())}function s(m){if(c(),v.listenerCount(this,"error")===0)throw m}e.on("error",s),k.on("error",s);function c(){e.removeListener("data",t),k.removeListener("drain",a),e.removeListener("end",n),e.removeListener("close",o),e.removeListener("error",s),k.removeListener("error",s),e.removeListener("end",c),e.removeListener("close",c),k.removeListener("close",c)}return e.on("end",c),e.on("close",c),k.on("close",c),k.emit("pipe",e),k}}}),Qp=Ee({"node_modules/util/util.js"(J){var V=Object.getOwnPropertyDescriptors||function(Z){for(var Q=Object.keys(Z),re={},ae=0;ae=ae)return X;switch(X){case"%s":return String(re[Q++]);case"%d":return Number(re[Q++]);case"%j":try{return JSON.stringify(re[Q++])}catch{return"[Circular]"}default:return X}}),H=re[Q];Q"u")return function(){return J.deprecate(U,Z).apply(this,arguments)};var Q=!1;function re(){if(!Q){if(process.throwDeprecation)throw new Error(Z);process.traceDeprecation?console.trace(Z):console.error(Z),Q=!0}return U.apply(this,arguments)}return re};var x={},E=/^$/;k="false",k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i");var k;J.debuglog=function(U){if(U=U.toUpperCase(),!x[U])if(E.test(U)){var Z=process.pid;x[U]=function(){var Q=J.format.apply(J,arguments);console.error("%s %d: %s",U,Z,Q)}}else x[U]=function(){};return x[U]};function l(U,Z){var Q={seen:[],stylize:t};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),p(Z)?Q.showHidden=Z:Z&&J._extend(Q,Z),C(Q.showHidden)&&(Q.showHidden=!1),C(Q.depth)&&(Q.depth=2),C(Q.colors)&&(Q.colors=!1),C(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=e),r(Q,U,Q.depth)}J.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(U,Z){var Q=l.styles[Z];return Q?"\x1B["+l.colors[Q][0]+"m"+U+"\x1B["+l.colors[Q][1]+"m":U}function t(U,Z){return U}function a(U){var Z={};return U.forEach(function(Q,re){Z[Q]=!0}),Z}function r(U,Z,Q){if(U.customInspect&&Z&&A(Z.inspect)&&Z.inspect!==J.inspect&&!(Z.constructor&&Z.constructor.prototype===Z)){var re=Z.inspect(Q,U);return S(re)||(re=r(U,re,Q)),re}var ae=n(U,Z);if(ae)return ae;var oe=Object.keys(Z),H=a(oe);if(U.showHidden&&(oe=Object.getOwnPropertyNames(Z)),u(Z)&&(oe.indexOf("message")>=0||oe.indexOf("description")>=0))return o(Z);if(oe.length===0){if(A(Z)){var X=Z.name?": "+Z.name:"";return U.stylize("[Function"+X+"]","special")}if(_(Z))return U.stylize(RegExp.prototype.toString.call(Z),"regexp");if(f(Z))return U.stylize(Date.prototype.toString.call(Z),"date");if(u(Z))return o(Z)}var K="",G=!1,Y=["{","}"];if(h(Z)&&(G=!0,Y=["[","]"]),A(Z)){var q=Z.name?": "+Z.name:"";K=" [Function"+q+"]"}if(_(Z)&&(K=" "+RegExp.prototype.toString.call(Z)),f(Z)&&(K=" "+Date.prototype.toUTCString.call(Z)),u(Z)&&(K=" "+o(Z)),oe.length===0&&(!G||Z.length==0))return Y[0]+K+Y[1];if(Q<0)return _(Z)?U.stylize(RegExp.prototype.toString.call(Z),"regexp"):U.stylize("[Object]","special");U.seen.push(Z);var $;return G?$=s(U,Z,Q,H,oe):$=oe.map(function(ee){return c(U,Z,Q,H,ee,G)}),U.seen.pop(),m($,K,Y)}function n(U,Z){if(C(Z))return U.stylize("undefined","undefined");if(S(Z)){var Q="'"+JSON.stringify(Z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(w(Z))return U.stylize(""+Z,"number");if(p(Z))return U.stylize(""+Z,"boolean");if(g(Z))return U.stylize("null","null")}function o(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,Z,Q,re,ae){for(var oe=[],H=0,X=Z.length;H-1&&(oe?X=X.split(` + `)+" "+Q[1]:Q[0]+Z+" "+U.join(", ")+" "+Q[1]}J.types=x2();function f(U){return Array.isArray(U)}J.isArray=f;function p(U){return typeof U=="boolean"}J.isBoolean=p;function m(U){return U===null}J.isNull=m;function i(U){return U==null}J.isNullOrUndefined=i;function T(U){return typeof U=="number"}J.isNumber=T;function S(U){return typeof U=="string"}J.isString=S;function M(U){return typeof U=="symbol"}J.isSymbol=M;function C(U){return U===void 0}J.isUndefined=C;function _(U){return w(U)&&z(U)==="[object RegExp]"}J.isRegExp=_,J.types.isRegExp=_;function w(U){return typeof U=="object"&&U!==null}J.isObject=w;function h(U){return w(U)&&z(U)==="[object Date]"}J.isDate=h,J.types.isDate=h;function u(U){return w(U)&&(z(U)==="[object Error]"||U instanceof Error)}J.isError=u,J.types.isNativeError=u;function A(U){return typeof U=="function"}J.isFunction=A;function b(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}J.isPrimitive=b,J.isBuffer=w2();function z(U){return Object.prototype.toString.call(U)}function I(U){return U<10?"0"+U.toString(10):U.toString(10)}var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(){var U=new Date,Z=[I(U.getHours()),I(U.getMinutes()),I(U.getSeconds())].join(":");return[U.getDate(),N[U.getMonth()],Z].join(" ")}J.log=function(){console.log("%s - %s",R(),J.format.apply(J,arguments))},J.inherits=_d(),J._extend=function(U,Z){if(!Z||!w(Z))return U;for(var Q=Object.keys(Z),re=Q.length;re--;)U[Q[re]]=Z[Q[re]];return U};function B(U,Z){return Object.prototype.hasOwnProperty.call(U,Z)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function(Z){if(typeof Z!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&Z[F]){var Q=Z[F];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,F,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var re,ne,oe=new Promise(function(K,G){re=K,ne=G}),V=[],$=0;$0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(m){var i={data:m,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(this.length===0)return"";for(var i=this.head,T=""+i.data;i=i.next;)T+=m+i.data;return T}},{key:"concat",value:function(m){if(this.length===0)return a.alloc(0);for(var i=a.allocUnsafe(m>>>0),T=this.head,S=0;T;)g(T.data,i,S),S+=T.data.length,T=T.next;return i}},{key:"consume",value:function(m,i){var T;return mM.length?M.length:m;if(C===M.length?S+=M:S+=M.slice(0,m),m-=C,m===0){C===M.length?(++T,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=M.slice(C));break}++T}return this.length-=T,S}},{key:"_getBuffer",value:function(m){var i=a.allocUnsafe(m),T=this.head,S=1;for(T.data.copy(i),m-=T.data.length;T=T.next;){var M=T.data,C=m>M.length?M.length:m;if(M.copy(i,i.length-m,0,C),m-=C,m===0){C===M.length?(++S,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=M.slice(C));break}++S}return this.length-=S,i}},{key:c,value:function(m,i){return s(this,x(x({},i),{},{depth:0,customInspect:!1}))}}]),f}()}}),A2=Ee({"node_modules/readable-stream/lib/internal/streams/destroy.js"(J,H){"use strict";function v(t,n){var r=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(n?n(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(l,this,t)):process.nextTick(l,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!n&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(E,r):(r._writableState.errorEmitted=!0,process.nextTick(x,r,s)):process.nextTick(x,r,s):n?(process.nextTick(E,r),n(s)):process.nextTick(E,r)}),this)}function x(t,n){l(t,n),E(t)}function E(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function k(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(t,n){t.emit("error",n)}function e(t,n){var r=t._readableState,a=t._writableState;r&&r.autoDestroy||a&&a.autoDestroy?t.destroy(n):t.emit("error",n)}H.exports={destroy:v,undestroy:k,errorOrDestroy:e}}}),Uv=Ee({"node_modules/readable-stream/errors-browser.js"(J,H){"use strict";function v(n,r){n.prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r}var x={};function E(n,r,a){a||(a=Error);function o(c,g,f){return typeof r=="string"?r:r(c,g,f)}var s=function(c){v(g,c);function g(f,p,m){return c.call(this,o(f,p,m))||this}return g}(a);s.prototype.name=a.name,s.prototype.code=n,x[n]=s}function k(n,r){if(Array.isArray(n)){var a=n.length;return n=n.map(function(o){return String(o)}),a>2?"one of ".concat(r," ").concat(n.slice(0,a-1).join(", "),", or ")+n[a-1]:a===2?"one of ".concat(r," ").concat(n[0]," or ").concat(n[1]):"of ".concat(r," ").concat(n[0])}else return"of ".concat(r," ").concat(String(n))}function l(n,r,a){return n.substr(!a||a<0?0:+a,r.length)===r}function e(n,r,a){return(a===void 0||a>n.length)&&(a=n.length),n.substring(a-r.length,a)===r}function t(n,r,a){return typeof a!="number"&&(a=0),a+r.length>n.length?!1:n.indexOf(r,a)!==-1}E("ERR_INVALID_OPT_VALUE",function(n,r){return'The value "'+r+'" is invalid for option "'+n+'"'},TypeError),E("ERR_INVALID_ARG_TYPE",function(n,r,a){var o;typeof r=="string"&&l(r,"not ")?(o="must not be",r=r.replace(/^not /,"")):o="must be";var s;if(e(n," argument"))s="The ".concat(n," ").concat(o," ").concat(k(r,"type"));else{var c=t(n,".")?"property":"argument";s='The "'.concat(n,'" ').concat(c," ").concat(o," ").concat(k(r,"type"))}return s+=". Received type ".concat(typeof a),s},TypeError),E("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),E("ERR_METHOD_NOT_IMPLEMENTED",function(n){return"The "+n+" method is not implemented"}),E("ERR_STREAM_PREMATURE_CLOSE","Premature close"),E("ERR_STREAM_DESTROYED",function(n){return"Cannot call "+n+" after a stream was destroyed"}),E("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),E("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),E("ERR_STREAM_WRITE_AFTER_END","write after end"),E("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),E("ERR_UNKNOWN_ENCODING",function(n){return"Unknown encoding: "+n},TypeError),E("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),H.exports.codes=x}}),M2=Ee({"node_modules/readable-stream/lib/internal/streams/state.js"(J,H){"use strict";var v=Uv().codes.ERR_INVALID_OPT_VALUE;function x(k,l,e){return k.highWaterMark!=null?k.highWaterMark:l?k[e]:null}function E(k,l,e,t){var n=x(l,t,e);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var r=t?e:"highWaterMark";throw new v(r,n)}return Math.floor(n)}return k.objectMode?16:16*1024}H.exports={getHighWaterMark:E}}}),$E=Ee({"node_modules/util-deprecate/browser.js"(J,H){H.exports=v;function v(E,k){if(x("noDeprecation"))return E;var l=!1;function e(){if(!l){if(x("throwDeprecation"))throw new Error(k);x("traceDeprecation")?console.trace(k):console.warn(k),l=!0}return E.apply(this,arguments)}return e}function x(E){try{if(!window.localStorage)return!1}catch{return!1}var k=window.localStorage[E];return k==null?!1:String(k).toLowerCase()==="true"}}}),S2=Ee({"node_modules/readable-stream/lib/_stream_writable.js"(J,H){"use strict";H.exports=h;function v(V){var $=this;this.next=null,this.entry=null,this.finish=function(){oe($,V)}}var x;h.WritableState=_;var E={deprecate:$E()},k=h2(),l=Nv().Buffer,e=(typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function t(V){return l.from(V)}function n(V){return l.isBuffer(V)||V instanceof e}var r=A2(),a=M2(),o=a.getHighWaterMark,s=Uv().codes,c=s.ERR_INVALID_ARG_TYPE,g=s.ERR_METHOD_NOT_IMPLEMENTED,f=s.ERR_MULTIPLE_CALLBACK,p=s.ERR_STREAM_CANNOT_PIPE,m=s.ERR_STREAM_DESTROYED,i=s.ERR_STREAM_NULL_VALUES,T=s.ERR_STREAM_WRITE_AFTER_END,S=s.ERR_UNKNOWN_ENCODING,M=r.errorOrDestroy;_d()(h,k);function C(){}function _(V,$,K){x=x||qv(),V=V||{},typeof K!="boolean"&&(K=$ instanceof x),this.objectMode=!!V.objectMode,K&&(this.objectMode=this.objectMode||!!V.writableObjectMode),this.highWaterMark=o(this,V,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var G=V.decodeStrings===!1;this.decodeStrings=!G,this.defaultEncoding=V.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X){B($,X)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=V.emitClose!==!1,this.autoDestroy=!!V.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new v(this)}_.prototype.getBuffer=function(){for(var $=this.bufferedRequest,K=[];$;)K.push($),$=$.next;return K},function(){try{Object.defineProperty(_.prototype,"buffer",{get:E.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var w;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(w=Function.prototype[Symbol.hasInstance],Object.defineProperty(h,Symbol.hasInstance,{value:function($){return w.call(this,$)?!0:this!==h?!1:$&&$._writableState instanceof _}})):w=function($){return $ instanceof this};function h(V){x=x||qv();var $=this instanceof x;if(!$&&!w.call(h,this))return new h(V);this._writableState=new _(V,this,$),this.writable=!0,V&&(typeof V.write=="function"&&(this._write=V.write),typeof V.writev=="function"&&(this._writev=V.writev),typeof V.destroy=="function"&&(this._destroy=V.destroy),typeof V.final=="function"&&(this._final=V.final)),k.call(this)}h.prototype.pipe=function(){M(this,new p)};function u(V,$){var K=new T;M(V,K),process.nextTick($,K)}function A(V,$,K,G){var X;return K===null?X=new i:typeof K!="string"&&!$.objectMode&&(X=new c("chunk",["string","Buffer"],K)),X?(M(V,X),process.nextTick(G,X),!1):!0}h.prototype.write=function(V,$,K){var G=this._writableState,X=!1,q=!G.objectMode&&n(V);return q&&!l.isBuffer(V)&&(V=t(V)),typeof $=="function"&&(K=$,$=null),q?$="buffer":$||($=G.defaultEncoding),typeof K!="function"&&(K=C),G.ending?u(this,K):(q||A(this,G,V,K))&&(G.pendingcb++,X=z(this,G,q,V,$,K)),X},h.prototype.cork=function(){this._writableState.corked++},h.prototype.uncork=function(){var V=this._writableState;V.corked&&(V.corked--,!V.writing&&!V.corked&&!V.bufferProcessing&&V.bufferedRequest&&j(this,V))},h.prototype.setDefaultEncoding=function($){if(typeof $=="string"&&($=$.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf(($+"").toLowerCase())>-1))throw new S($);return this._writableState.defaultEncoding=$,this},Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function b(V,$,K){return!V.objectMode&&V.decodeStrings!==!1&&typeof $=="string"&&($=l.from($,K)),$}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(V,$,K,G,X,q){if(!K){var W=b($,G,X);G!==W&&(K=!0,X="buffer",G=W)}var ee=$.objectMode?1:G.length;$.length+=ee;var ae=$.length<$.highWaterMark;if(ae||($.needDrain=!0),$.writing||$.corked){var fe=$.lastBufferedRequest;$.lastBufferedRequest={chunk:G,encoding:X,isBuf:K,callback:q,next:null},fe?fe.next=$.lastBufferedRequest:$.bufferedRequest=$.lastBufferedRequest,$.bufferedRequestCount+=1}else I(V,$,!1,ee,G,X,q);return ae}function I(V,$,K,G,X,q,W){$.writelen=G,$.writecb=W,$.writing=!0,$.sync=!0,$.destroyed?$.onwrite(new m("write")):K?V._writev(X,$.onwrite):V._write(X,q,$.onwrite),$.sync=!1}function N(V,$,K,G,X){--$.pendingcb,K?(process.nextTick(X,G),process.nextTick(re,V,$),V._writableState.errorEmitted=!0,M(V,G)):(X(G),V._writableState.errorEmitted=!0,M(V,G),re(V,$))}function R(V){V.writing=!1,V.writecb=null,V.length-=V.writelen,V.writelen=0}function B(V,$){var K=V._writableState,G=K.sync,X=K.writecb;if(typeof X!="function")throw new f;if(R(K),$)N(V,K,G,$,X);else{var q=U(K)||V.destroyed;!q&&!K.corked&&!K.bufferProcessing&&K.bufferedRequest&&j(V,K),G?process.nextTick(F,V,K,q,X):F(V,K,q,X)}}function F(V,$,K,G){K||P(V,$),$.pendingcb--,G(),re(V,$)}function P(V,$){$.length===0&&$.needDrain&&($.needDrain=!1,V.emit("drain"))}function j(V,$){$.bufferProcessing=!0;var K=$.bufferedRequest;if(V._writev&&K&&K.next){var G=$.bufferedRequestCount,X=new Array(G),q=$.corkedRequestsFree;q.entry=K;for(var W=0,ee=!0;K;)X[W]=K,K.isBuf||(ee=!1),K=K.next,W+=1;X.allBuffers=ee,I(V,$,!0,$.length,X,"",q.finish),$.pendingcb++,$.lastBufferedRequest=null,q.next?($.corkedRequestsFree=q.next,q.next=null):$.corkedRequestsFree=new v($),$.bufferedRequestCount=0}else{for(;K;){var ae=K.chunk,fe=K.encoding,ye=K.callback,xe=$.objectMode?1:ae.length;if(I(V,$,!1,xe,ae,fe,ye),K=K.next,$.bufferedRequestCount--,$.writing)break}K===null&&($.lastBufferedRequest=null)}$.bufferedRequest=K,$.bufferProcessing=!1}h.prototype._write=function(V,$,K){K(new g("_write()"))},h.prototype._writev=null,h.prototype.end=function(V,$,K){var G=this._writableState;return typeof V=="function"?(K=V,V=null,$=null):typeof $=="function"&&(K=$,$=null),V!=null&&this.write(V,$),G.corked&&(G.corked=1,this.uncork()),G.ending||ne(this,G,K),this},Object.defineProperty(h.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function U(V){return V.ending&&V.length===0&&V.bufferedRequest===null&&!V.finished&&!V.writing}function Z(V,$){V._final(function(K){$.pendingcb--,K&&M(V,K),$.prefinished=!0,V.emit("prefinish"),re(V,$)})}function Q(V,$){!$.prefinished&&!$.finalCalled&&(typeof V._final=="function"&&!$.destroyed?($.pendingcb++,$.finalCalled=!0,process.nextTick(Z,V,$)):($.prefinished=!0,V.emit("prefinish")))}function re(V,$){var K=U($);if(K&&(Q(V,$),$.pendingcb===0&&($.finished=!0,V.emit("finish"),$.autoDestroy))){var G=V._readableState;(!G||G.autoDestroy&&G.endEmitted)&&V.destroy()}return K}function ne(V,$,K){$.ending=!0,re(V,$),K&&($.finished?process.nextTick(K):V.once("finish",K)),$.ended=!0,V.writable=!1}function oe(V,$,K){var G=V.entry;for(V.entry=null;G;){var X=G.callback;$.pendingcb--,X(K),G=G.next}$.corkedRequestsFree.next=V}Object.defineProperty(h.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function($){this._writableState&&(this._writableState.destroyed=$)}}),h.prototype.destroy=r.destroy,h.prototype._undestroy=r.undestroy,h.prototype._destroy=function(V,$){$(V)}}}),qv=Ee({"node_modules/readable-stream/lib/_stream_duplex.js"(J,H){"use strict";var v=Object.keys||function(a){var o=[];for(var s in a)o.push(s);return o};H.exports=t;var x=k2(),E=S2();for(_d()(t,x),k=v(E.prototype),e=0;e>5===6?2:m>>4===14?3:m>>3===30?4:m>>6===2?-1:-2}function e(m,i,T){var S=i.length-1;if(S=0?(M>0&&(m.lastNeed=M-1),M):--S=0?(M>0&&(m.lastNeed=M-2),M):--S=0?(M>0&&(M===2?M=0:m.lastNeed=M-3),M):0))}function t(m,i,T){if((i[0]&192)!==128)return m.lastNeed=0,"\uFFFD";if(m.lastNeed>1&&i.length>1){if((i[1]&192)!==128)return m.lastNeed=1,"\uFFFD";if(m.lastNeed>2&&i.length>2&&(i[2]&192)!==128)return m.lastNeed=2,"\uFFFD"}}function n(m){var i=this.lastTotal-this.lastNeed,T=t(this,m,i);if(T!==void 0)return T;if(this.lastNeed<=m.length)return m.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,i,0,m.length),this.lastNeed-=m.length}function r(m,i){var T=e(this,m,i);if(!this.lastNeed)return m.toString("utf8",i);this.lastTotal=T;var S=m.length-(T-this.lastNeed);return m.copy(this.lastChar,0,S),m.toString("utf8",i,S)}function a(m){var i=m&&m.length?this.write(m):"";return this.lastNeed?i+"\uFFFD":i}function o(m,i){if((m.length-i)%2===0){var T=m.toString("utf16le",i);if(T){var S=T.charCodeAt(T.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1],T.slice(0,-1)}return T}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=m[m.length-1],m.toString("utf16le",i,m.length-1)}function s(m){var i=m&&m.length?this.write(m):"";if(this.lastNeed){var T=this.lastTotal-this.lastNeed;return i+this.lastChar.toString("utf16le",0,T)}return i}function c(m,i){var T=(m.length-i)%3;return T===0?m.toString("base64",i):(this.lastNeed=3-T,this.lastTotal=3,T===1?this.lastChar[0]=m[m.length-1]:(this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1]),m.toString("base64",i,m.length-T))}function g(m){var i=m&&m.length?this.write(m):"";return this.lastNeed?i+this.lastChar.toString("base64",0,3-this.lastNeed):i}function f(m){return m.toString(this.encoding)}function p(m){return m&&m.length?this.write(m):""}}}),U1=Ee({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(J,H){"use strict";var v=Uv().codes.ERR_STREAM_PREMATURE_CLOSE;function x(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),a=0;a0)if(typeof ee!="string"&&!xe.objectMode&&Object.getPrototypeOf(ee)!==l.prototype&&(ee=t(ee)),fe)xe.endEmitted?_(W,new T):z(W,xe,ee,!0);else if(xe.ended)_(W,new m);else{if(xe.destroyed)return!1;xe.reading=!1,xe.decoder&&!ae?(ee=xe.decoder.write(ee),xe.objectMode||ee.length!==0?z(W,xe,ee,!1):U(W,xe)):z(W,xe,ee,!1)}else fe||(xe.reading=!1,U(W,xe))}return!xe.ended&&(xe.length=N?W=N:(W--,W|=W>>>1,W|=W>>>2,W|=W>>>4,W|=W>>>8,W|=W>>>16,W++),W}function B(W,ee){return W<=0||ee.length===0&&ee.ended?0:ee.objectMode?1:W!==W?ee.flowing&&ee.length?ee.buffer.head.data.length:ee.length:(W>ee.highWaterMark&&(ee.highWaterMark=R(W)),W<=ee.length?W:ee.ended?ee.length:(ee.needReadable=!0,0))}A.prototype.read=function(W){a("read",W),W=parseInt(W,10);var ee=this._readableState,ae=W;if(W!==0&&(ee.emittedReadable=!1),W===0&&ee.needReadable&&((ee.highWaterMark!==0?ee.length>=ee.highWaterMark:ee.length>0)||ee.ended))return a("read: emitReadable",ee.length,ee.ended),ee.length===0&&ee.ended?G(this):P(this),null;if(W=B(W,ee),W===0&&ee.ended)return ee.length===0&&G(this),null;var fe=ee.needReadable;a("need readable",fe),(ee.length===0||ee.length-W0?ye=K(W,ee):ye=null,ye===null?(ee.needReadable=ee.length<=ee.highWaterMark,W=0):(ee.length-=W,ee.awaitDrain=0),ee.length===0&&(ee.ended||(ee.needReadable=!0),ae!==W&&ee.ended&&G(this)),ye!==null&&this.emit("data",ye),ye};function F(W,ee){if(a("onEofChunk"),!ee.ended){if(ee.decoder){var ae=ee.decoder.end();ae&&ae.length&&(ee.buffer.push(ae),ee.length+=ee.objectMode?1:ae.length)}ee.ended=!0,ee.sync?P(W):(ee.needReadable=!1,ee.emittedReadable||(ee.emittedReadable=!0,j(W)))}}function P(W){var ee=W._readableState;a("emitReadable",ee.needReadable,ee.emittedReadable),ee.needReadable=!1,ee.emittedReadable||(a("emitReadable",ee.flowing),ee.emittedReadable=!0,process.nextTick(j,W))}function j(W){var ee=W._readableState;a("emitReadable_",ee.destroyed,ee.length,ee.ended),!ee.destroyed&&(ee.length||ee.ended)&&(W.emit("readable"),ee.emittedReadable=!1),ee.needReadable=!ee.flowing&&!ee.ended&&ee.length<=ee.highWaterMark,$(W)}function U(W,ee){ee.readingMore||(ee.readingMore=!0,process.nextTick(Z,W,ee))}function Z(W,ee){for(;!ee.reading&&!ee.ended&&(ee.length1&&q(fe.pipes,W)!==-1)&&!qe&&(a("false write response, pause",fe.awaitDrain),fe.awaitDrain++),ae.pause())}function ge(Te){a("onerror",Te),se(),W.removeListener("error",ge),E(W,"error")===0&&_(W,Te)}h(W,"error",ge);function le(){W.removeListener("finish",ve),se()}W.once("close",le);function ve(){a("onfinish"),W.removeListener("close",le),se()}W.once("finish",ve);function se(){a("unpipe"),ae.unpipe(W)}return W.emit("pipe",ae),fe.flowing||(a("pipe resume"),ae.resume()),W};function Q(W){return function(){var ae=W._readableState;a("pipeOnDrain",ae.awaitDrain),ae.awaitDrain&&ae.awaitDrain--,ae.awaitDrain===0&&E(W,"data")&&(ae.flowing=!0,$(W))}}A.prototype.unpipe=function(W){var ee=this._readableState,ae={hasUnpiped:!1};if(ee.pipesCount===0)return this;if(ee.pipesCount===1)return W&&W!==ee.pipes?this:(W||(W=ee.pipes),ee.pipes=null,ee.pipesCount=0,ee.flowing=!1,W&&W.emit("unpipe",this,ae),this);if(!W){var fe=ee.pipes,ye=ee.pipesCount;ee.pipes=null,ee.pipesCount=0,ee.flowing=!1;for(var xe=0;xe0,fe.flowing!==!1&&this.resume()):W==="readable"&&!fe.endEmitted&&!fe.readableListening&&(fe.readableListening=fe.needReadable=!0,fe.flowing=!1,fe.emittedReadable=!1,a("on readable",fe.length,fe.reading),fe.length?P(this):fe.reading||process.nextTick(ne,this)),ae},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(W,ee){var ae=k.prototype.removeListener.call(this,W,ee);return W==="readable"&&process.nextTick(re,this),ae},A.prototype.removeAllListeners=function(W){var ee=k.prototype.removeAllListeners.apply(this,arguments);return(W==="readable"||W===void 0)&&process.nextTick(re,this),ee};function re(W){var ee=W._readableState;ee.readableListening=W.listenerCount("readable")>0,ee.resumeScheduled&&!ee.paused?ee.flowing=!0:W.listenerCount("data")>0&&W.resume()}function ne(W){a("readable nexttick read 0"),W.read(0)}A.prototype.resume=function(){var W=this._readableState;return W.flowing||(a("resume"),W.flowing=!W.readableListening,oe(this,W)),W.paused=!1,this};function oe(W,ee){ee.resumeScheduled||(ee.resumeScheduled=!0,process.nextTick(V,W,ee))}function V(W,ee){a("resume",ee.reading),ee.reading||W.read(0),ee.resumeScheduled=!1,W.emit("resume"),$(W),ee.flowing&&!ee.reading&&W.read(0)}A.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function $(W){var ee=W._readableState;for(a("flow",ee.flowing);ee.flowing&&W.read()!==null;);}A.prototype.wrap=function(W){var ee=this,ae=this._readableState,fe=!1;W.on("end",function(){if(a("wrapped end"),ae.decoder&&!ae.ended){var Ae=ae.decoder.end();Ae&&Ae.length&&ee.push(Ae)}ee.push(null)}),W.on("data",function(Ae){if(a("wrapped data"),ae.decoder&&(Ae=ae.decoder.write(Ae)),!(ae.objectMode&&Ae==null)&&!(!ae.objectMode&&(!Ae||!Ae.length))){var Me=ee.push(Ae);Me||(fe=!0,W.pause())}});for(var ye in W)this[ye]===void 0&&typeof W[ye]=="function"&&(this[ye]=function(Me){return function(){return W[Me].apply(W,arguments)}}(ye));for(var xe=0;xe=ee.length?(ee.decoder?ae=ee.buffer.join(""):ee.buffer.length===1?ae=ee.buffer.first():ae=ee.buffer.concat(ee.length),ee.buffer.clear()):ae=ee.buffer.consume(W,ee.decoder),ae}function G(W){var ee=W._readableState;a("endReadable",ee.endEmitted),ee.endEmitted||(ee.ended=!0,process.nextTick(X,ee,W))}function X(W,ee){if(a("endReadableNT",W.endEmitted,W.length),!W.endEmitted&&W.length===0&&(W.endEmitted=!0,ee.readable=!1,ee.emit("end"),W.autoDestroy)){var ae=ee._writableState;(!ae||ae.autoDestroy&&ae.finished)&&ee.destroy()}}typeof Symbol=="function"&&(A.from=function(W,ee){return C===void 0&&(C=JE()),C(A,W,ee)});function q(W,ee){for(var ae=0,fe=W.length;ae0;return n(T,M,C,function(_){m||(m=_),_&&i.forEach(r),!M&&(i.forEach(r),p(m))})});return g.reduce(a)}H.exports=s}}),tk=Ee({"node_modules/stream-browserify/index.js"(J,H){H.exports=E;var v=kv().EventEmitter,x=_d();x(E,v),E.Readable=k2(),E.Writable=S2(),E.Duplex=qv(),E.Transform=C2(),E.PassThrough=QE(),E.finished=U1(),E.pipeline=ek(),E.Stream=E;function E(){v.call(this)}E.prototype.pipe=function(k,l){var e=this;function t(g){k.writable&&k.write(g)===!1&&e.pause&&e.pause()}e.on("data",t);function n(){e.readable&&e.resume&&e.resume()}k.on("drain",n),!k._isStdio&&(!l||l.end!==!1)&&(e.on("end",a),e.on("close",o));var r=!1;function a(){r||(r=!0,k.end())}function o(){r||(r=!0,typeof k.destroy=="function"&&k.destroy())}function s(g){if(c(),v.listenerCount(this,"error")===0)throw g}e.on("error",s),k.on("error",s);function c(){e.removeListener("data",t),k.removeListener("drain",n),e.removeListener("end",a),e.removeListener("close",o),e.removeListener("error",s),k.removeListener("error",s),e.removeListener("end",c),e.removeListener("close",c),k.removeListener("close",c)}return e.on("end",c),e.on("close",c),k.on("close",c),k.emit("pipe",e),k}}}),Qp=Ee({"node_modules/util/util.js"(J){var H=Object.getOwnPropertyDescriptors||function(Z){for(var Q=Object.keys(Z),re={},ne=0;ne=ne)return $;switch($){case"%s":return String(re[Q++]);case"%d":return Number(re[Q++]);case"%j":try{return JSON.stringify(re[Q++])}catch{return"[Circular]"}default:return $}}),V=re[Q];Q"u")return function(){return J.deprecate(U,Z).apply(this,arguments)};var Q=!1;function re(){if(!Q){if(process.throwDeprecation)throw new Error(Z);process.traceDeprecation?console.trace(Z):console.error(Z),Q=!0}return U.apply(this,arguments)}return re};var x={},E=/^$/;k="false",k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i");var k;J.debuglog=function(U){if(U=U.toUpperCase(),!x[U])if(E.test(U)){var Z=process.pid;x[U]=function(){var Q=J.format.apply(J,arguments);console.error("%s %d: %s",U,Z,Q)}}else x[U]=function(){};return x[U]};function l(U,Z){var Q={seen:[],stylize:t};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),p(Z)?Q.showHidden=Z:Z&&J._extend(Q,Z),C(Q.showHidden)&&(Q.showHidden=!1),C(Q.depth)&&(Q.depth=2),C(Q.colors)&&(Q.colors=!1),C(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=e),r(Q,U,Q.depth)}J.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(U,Z){var Q=l.styles[Z];return Q?"\x1B["+l.colors[Q][0]+"m"+U+"\x1B["+l.colors[Q][1]+"m":U}function t(U,Z){return U}function n(U){var Z={};return U.forEach(function(Q,re){Z[Q]=!0}),Z}function r(U,Z,Q){if(U.customInspect&&Z&&A(Z.inspect)&&Z.inspect!==J.inspect&&!(Z.constructor&&Z.constructor.prototype===Z)){var re=Z.inspect(Q,U);return S(re)||(re=r(U,re,Q)),re}var ne=a(U,Z);if(ne)return ne;var oe=Object.keys(Z),V=n(oe);if(U.showHidden&&(oe=Object.getOwnPropertyNames(Z)),u(Z)&&(oe.indexOf("message")>=0||oe.indexOf("description")>=0))return o(Z);if(oe.length===0){if(A(Z)){var $=Z.name?": "+Z.name:"";return U.stylize("[Function"+$+"]","special")}if(_(Z))return U.stylize(RegExp.prototype.toString.call(Z),"regexp");if(h(Z))return U.stylize(Date.prototype.toString.call(Z),"date");if(u(Z))return o(Z)}var K="",G=!1,X=["{","}"];if(f(Z)&&(G=!0,X=["[","]"]),A(Z)){var q=Z.name?": "+Z.name:"";K=" [Function"+q+"]"}if(_(Z)&&(K=" "+RegExp.prototype.toString.call(Z)),h(Z)&&(K=" "+Date.prototype.toUTCString.call(Z)),u(Z)&&(K=" "+o(Z)),oe.length===0&&(!G||Z.length==0))return X[0]+K+X[1];if(Q<0)return _(Z)?U.stylize(RegExp.prototype.toString.call(Z),"regexp"):U.stylize("[Object]","special");U.seen.push(Z);var W;return G?W=s(U,Z,Q,V,oe):W=oe.map(function(ee){return c(U,Z,Q,V,ee,G)}),U.seen.pop(),g(W,K,X)}function a(U,Z){if(C(Z))return U.stylize("undefined","undefined");if(S(Z)){var Q="'"+JSON.stringify(Z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(T(Z))return U.stylize(""+Z,"number");if(p(Z))return U.stylize(""+Z,"boolean");if(m(Z))return U.stylize("null","null")}function o(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,Z,Q,re,ne){for(var oe=[],V=0,$=Z.length;V<$;++V)B(Z,String(V))?oe.push(c(U,Z,Q,re,String(V),!0)):oe.push("");return ne.forEach(function(K){K.match(/^\d+$/)||oe.push(c(U,Z,Q,re,K,!0))}),oe}function c(U,Z,Q,re,ne,oe){var V,$,K;if(K=Object.getOwnPropertyDescriptor(Z,ne)||{value:Z[ne]},K.get?K.set?$=U.stylize("[Getter/Setter]","special"):$=U.stylize("[Getter]","special"):K.set&&($=U.stylize("[Setter]","special")),B(re,ne)||(V="["+ne+"]"),$||(U.seen.indexOf(K.value)<0?(m(Q)?$=r(U,K.value,null):$=r(U,K.value,Q-1),$.indexOf(` +`)>-1&&(oe?$=$.split(` `).map(function(G){return" "+G}).join(` -`).slice(2):X=` -`+X.split(` +`).slice(2):$=` +`+$.split(` `).map(function(G){return" "+G}).join(` -`))):X=U.stylize("[Circular]","special")),C(H)){if(oe&&ae.match(/^\d+$/))return X;H=JSON.stringify(""+ae),H.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(H=H.slice(1,-1),H=U.stylize(H,"name")):(H=H.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),H=U.stylize(H,"string"))}return H+": "+X}function m(U,Z,Q){var re=0,ae=U.reduce(function(oe,H){return re++,H.indexOf(` -`)>=0&&re++,oe+H.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ae>60?Q[0]+(Z===""?"":Z+` +`))):$=U.stylize("[Circular]","special")),C(V)){if(oe&&ne.match(/^\d+$/))return $;V=JSON.stringify(""+ne),V.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.slice(1,-1),V=U.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=U.stylize(V,"string"))}return V+": "+$}function g(U,Z,Q){var re=0,ne=U.reduce(function(oe,V){return re++,V.indexOf(` +`)>=0&&re++,oe+V.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ne>60?Q[0]+(Z===""?"":Z+` `)+" "+U.join(`, - `)+" "+Q[1]:Q[0]+Z+" "+U.join(", ")+" "+Q[1]}J.types=x2();function h(U){return Array.isArray(U)}J.isArray=h;function p(U){return typeof U=="boolean"}J.isBoolean=p;function g(U){return U===null}J.isNull=g;function i(U){return U==null}J.isNullOrUndefined=i;function w(U){return typeof U=="number"}J.isNumber=w;function S(U){return typeof U=="string"}J.isString=S;function M(U){return typeof U=="symbol"}J.isSymbol=M;function C(U){return U===void 0}J.isUndefined=C;function _(U){return T(U)&&z(U)==="[object RegExp]"}J.isRegExp=_,J.types.isRegExp=_;function T(U){return typeof U=="object"&&U!==null}J.isObject=T;function f(U){return T(U)&&z(U)==="[object Date]"}J.isDate=f,J.types.isDate=f;function u(U){return T(U)&&(z(U)==="[object Error]"||U instanceof Error)}J.isError=u,J.types.isNativeError=u;function A(U){return typeof U=="function"}J.isFunction=A;function b(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}J.isPrimitive=b,J.isBuffer=w2();function z(U){return Object.prototype.toString.call(U)}function I(U){return U<10?"0"+U.toString(10):U.toString(10)}var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(){var U=new Date,Z=[I(U.getHours()),I(U.getMinutes()),I(U.getSeconds())].join(":");return[U.getDate(),N[U.getMonth()],Z].join(" ")}J.log=function(){console.log("%s - %s",R(),J.format.apply(J,arguments))},J.inherits=_d(),J._extend=function(U,Z){if(!Z||!T(Z))return U;for(var Q=Object.keys(Z),re=Q.length;re--;)U[Q[re]]=Z[Q[re]];return U};function B(U,Z){return Object.prototype.hasOwnProperty.call(U,Z)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function(Z){if(typeof Z!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&Z[F]){var Q=Z[F];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,F,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var re,ae,oe=new Promise(function(K,G){re=K,ae=G}),H=[],X=0;X"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c(C){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(T){return T.__proto__||Object.getPrototypeOf(T)},c(C)}var m={},h,p;function g(C,_,T){T||(T=Error);function f(A,b,z){return typeof _=="string"?_:_(A,b,z)}var u=function(A){t(z,A);var b=r(z);function z(I,N,R){var B;return e(this,z),B=b.call(this,f(I,N,R)),B.code=C,B}return E(z)}(T);m[C]=u}function i(C,_){if(Array.isArray(C)){var T=C.length;return C=C.map(function(f){return String(f)}),T>2?"one of ".concat(_," ").concat(C.slice(0,T-1).join(", "),", or ")+C[T-1]:T===2?"one of ".concat(_," ").concat(C[0]," or ").concat(C[1]):"of ".concat(_," ").concat(C[0])}else return"of ".concat(_," ").concat(String(C))}function w(C,_,T){return C.substr(!T||T<0?0:+T,_.length)===_}function S(C,_,T){return(T===void 0||T>C.length)&&(T=C.length),C.substring(T-_.length,T)===_}function M(C,_,T){return typeof T!="number"&&(T=0),T+_.length>C.length?!1:C.indexOf(_,T)!==-1}g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",function(C,_,T){h===void 0&&(h=V1()),h(typeof C=="string","'name' must be a string");var f;typeof _=="string"&&w(_,"not ")?(f="must not be",_=_.replace(/^not /,"")):f="must be";var u;if(S(C," argument"))u="The ".concat(C," ").concat(f," ").concat(i(_,"type"));else{var A=M(C,".")?"property":"argument";u='The "'.concat(C,'" ').concat(A," ").concat(f," ").concat(i(_,"type"))}return u+=". Received type ".concat(v(T)),u},TypeError),g("ERR_INVALID_ARG_VALUE",function(C,_){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=Qp());var f=p.inspect(_);return f.length>128&&(f="".concat(f.slice(0,128),"...")),"The argument '".concat(C,"' ").concat(T,". Received ").concat(f)},TypeError,RangeError),g("ERR_INVALID_RETURN_VALUE",function(C,_,T){var f;return T&&T.constructor&&T.constructor.name?f="instance of ".concat(T.constructor.name):f="type ".concat(v(T)),"Expected ".concat(C,' to be returned from the "').concat(_,'"')+" function but got ".concat(f,".")},TypeError),g("ERR_MISSING_ARGS",function(){for(var C=arguments.length,_=new Array(C),T=0;T0,"At least one arg needs to be specified");var f="The ",u=_.length;switch(_=_.map(function(A){return'"'.concat(A,'"')}),u){case 1:f+="".concat(_[0]," argument");break;case 2:f+="".concat(_[0]," and ").concat(_[1]," arguments");break;default:f+=_.slice(0,u-1).join(", "),f+=", and ".concat(_[u-1]," arguments");break}return"".concat(f," must be specified")},TypeError),V.exports.codes=m}}),rk=Ee({"node_modules/assert/build/internal/assert/assertion_error.js"(J,V){"use strict";function v(j,U){var Z=Object.keys(j);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(j);U&&(Q=Q.filter(function(re){return Object.getOwnPropertyDescriptor(j,re).enumerable})),Z.push.apply(Z,Q)}return Z}function x(j){for(var U=1;U"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function p(j){return Function.toString.call(j).indexOf("[native code]")!==-1}function g(j,U){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Q,re){return Q.__proto__=re,Q},g(j,U)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},i(j)}function w(j){"@babel/helpers - typeof";return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},w(j)}var S=Qp(),M=S.inspect,C=L2(),_=C.codes.ERR_INVALID_ARG_TYPE;function T(j,U,Z){return(Z===void 0||Z>j.length)&&(Z=j.length),j.substring(Z-U.length,Z)===U}function f(j,U){if(U=Math.floor(U),j.length==0||U==0)return"";var Z=j.length*U;for(U=Math.floor(Math.log(U)/Math.log(2));U;)j+=j,U--;return j+=j.substring(0,Z-j.length),j}var u="",A="",b="",z="",I={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},N=10;function R(j){var U=Object.keys(j),Z=Object.create(Object.getPrototypeOf(j));return U.forEach(function(Q){Z[Q]=j[Q]}),Object.defineProperty(Z,"message",{value:j.message}),Z}function B(j){return M(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function F(j,U,Z){var Q="",re="",ae=0,oe="",H=!1,X=B(j),K=X.split(` + `)+" "+Q[1]:Q[0]+Z+" "+U.join(", ")+" "+Q[1]}J.types=x2();function f(U){return Array.isArray(U)}J.isArray=f;function p(U){return typeof U=="boolean"}J.isBoolean=p;function m(U){return U===null}J.isNull=m;function i(U){return U==null}J.isNullOrUndefined=i;function T(U){return typeof U=="number"}J.isNumber=T;function S(U){return typeof U=="string"}J.isString=S;function M(U){return typeof U=="symbol"}J.isSymbol=M;function C(U){return U===void 0}J.isUndefined=C;function _(U){return w(U)&&z(U)==="[object RegExp]"}J.isRegExp=_,J.types.isRegExp=_;function w(U){return typeof U=="object"&&U!==null}J.isObject=w;function h(U){return w(U)&&z(U)==="[object Date]"}J.isDate=h,J.types.isDate=h;function u(U){return w(U)&&(z(U)==="[object Error]"||U instanceof Error)}J.isError=u,J.types.isNativeError=u;function A(U){return typeof U=="function"}J.isFunction=A;function b(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}J.isPrimitive=b,J.isBuffer=w2();function z(U){return Object.prototype.toString.call(U)}function I(U){return U<10?"0"+U.toString(10):U.toString(10)}var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(){var U=new Date,Z=[I(U.getHours()),I(U.getMinutes()),I(U.getSeconds())].join(":");return[U.getDate(),N[U.getMonth()],Z].join(" ")}J.log=function(){console.log("%s - %s",R(),J.format.apply(J,arguments))},J.inherits=_d(),J._extend=function(U,Z){if(!Z||!w(Z))return U;for(var Q=Object.keys(Z),re=Q.length;re--;)U[Q[re]]=Z[Q[re]];return U};function B(U,Z){return Object.prototype.hasOwnProperty.call(U,Z)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function(Z){if(typeof Z!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&Z[F]){var Q=Z[F];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,F,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var re,ne,oe=new Promise(function(K,G){re=K,ne=G}),V=[],$=0;$"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c(C){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(w){return w.__proto__||Object.getPrototypeOf(w)},c(C)}var g={},f,p;function m(C,_,w){w||(w=Error);function h(A,b,z){return typeof _=="string"?_:_(A,b,z)}var u=function(A){t(z,A);var b=r(z);function z(I,N,R){var B;return e(this,z),B=b.call(this,h(I,N,R)),B.code=C,B}return E(z)}(w);g[C]=u}function i(C,_){if(Array.isArray(C)){var w=C.length;return C=C.map(function(h){return String(h)}),w>2?"one of ".concat(_," ").concat(C.slice(0,w-1).join(", "),", or ")+C[w-1]:w===2?"one of ".concat(_," ").concat(C[0]," or ").concat(C[1]):"of ".concat(_," ").concat(C[0])}else return"of ".concat(_," ").concat(String(C))}function T(C,_,w){return C.substr(!w||w<0?0:+w,_.length)===_}function S(C,_,w){return(w===void 0||w>C.length)&&(w=C.length),C.substring(w-_.length,w)===_}function M(C,_,w){return typeof w!="number"&&(w=0),w+_.length>C.length?!1:C.indexOf(_,w)!==-1}m("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),m("ERR_INVALID_ARG_TYPE",function(C,_,w){f===void 0&&(f=V1()),f(typeof C=="string","'name' must be a string");var h;typeof _=="string"&&T(_,"not ")?(h="must not be",_=_.replace(/^not /,"")):h="must be";var u;if(S(C," argument"))u="The ".concat(C," ").concat(h," ").concat(i(_,"type"));else{var A=M(C,".")?"property":"argument";u='The "'.concat(C,'" ').concat(A," ").concat(h," ").concat(i(_,"type"))}return u+=". Received type ".concat(v(w)),u},TypeError),m("ERR_INVALID_ARG_VALUE",function(C,_){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=Qp());var h=p.inspect(_);return h.length>128&&(h="".concat(h.slice(0,128),"...")),"The argument '".concat(C,"' ").concat(w,". Received ").concat(h)},TypeError,RangeError),m("ERR_INVALID_RETURN_VALUE",function(C,_,w){var h;return w&&w.constructor&&w.constructor.name?h="instance of ".concat(w.constructor.name):h="type ".concat(v(w)),"Expected ".concat(C,' to be returned from the "').concat(_,'"')+" function but got ".concat(h,".")},TypeError),m("ERR_MISSING_ARGS",function(){for(var C=arguments.length,_=new Array(C),w=0;w0,"At least one arg needs to be specified");var h="The ",u=_.length;switch(_=_.map(function(A){return'"'.concat(A,'"')}),u){case 1:h+="".concat(_[0]," argument");break;case 2:h+="".concat(_[0]," and ").concat(_[1]," arguments");break;default:h+=_.slice(0,u-1).join(", "),h+=", and ".concat(_[u-1]," arguments");break}return"".concat(h," must be specified")},TypeError),H.exports.codes=g}}),rk=Ee({"node_modules/assert/build/internal/assert/assertion_error.js"(J,H){"use strict";function v(j,U){var Z=Object.keys(j);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(j);U&&(Q=Q.filter(function(re){return Object.getOwnPropertyDescriptor(j,re).enumerable})),Z.push.apply(Z,Q)}return Z}function x(j){for(var U=1;U"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function p(j){return Function.toString.call(j).indexOf("[native code]")!==-1}function m(j,U){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Q,re){return Q.__proto__=re,Q},m(j,U)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},i(j)}function T(j){"@babel/helpers - typeof";return T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},T(j)}var S=Qp(),M=S.inspect,C=L2(),_=C.codes.ERR_INVALID_ARG_TYPE;function w(j,U,Z){return(Z===void 0||Z>j.length)&&(Z=j.length),j.substring(Z-U.length,Z)===U}function h(j,U){if(U=Math.floor(U),j.length==0||U==0)return"";var Z=j.length*U;for(U=Math.floor(Math.log(U)/Math.log(2));U;)j+=j,U--;return j+=j.substring(0,Z-j.length),j}var u="",A="",b="",z="",I={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},N=10;function R(j){var U=Object.keys(j),Z=Object.create(Object.getPrototypeOf(j));return U.forEach(function(Q){Z[Q]=j[Q]}),Object.defineProperty(Z,"message",{value:j.message}),Z}function B(j){return M(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function F(j,U,Z){var Q="",re="",ne=0,oe="",V=!1,$=B(j),K=$.split(` `),G=B(U).split(` -`),Y=0,q="";if(Z==="strictEqual"&&w(j)==="object"&&w(U)==="object"&&j!==null&&U!==null&&(Z="strictEqualObject"),K.length===1&&G.length===1&&K[0]!==G[0]){var $=K[0].length+G[0].length;if($<=N){if((w(j)!=="object"||j===null)&&(w(U)!=="object"||U===null)&&(j!==0||U!==0))return"".concat(I[Z],` +`),X=0,q="";if(Z==="strictEqual"&&T(j)==="object"&&T(U)==="object"&&j!==null&&U!==null&&(Z="strictEqualObject"),K.length===1&&G.length===1&&K[0]!==G[0]){var W=K[0].length+G[0].length;if(W<=N){if((T(j)!=="object"||j===null)&&(T(U)!=="object"||U===null)&&(j!==0||U!==0))return"".concat(I[Z],` `)+"".concat(K[0]," !== ").concat(G[0],` -`)}else if(Z!=="strictEqualObject"){var ee=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if($2&&(q=` - `.concat(f(" ",Y),"^"),Y=0)}}}for(var ne=K[K.length-1],fe=G[G.length-1];ne===fe&&(Y++<2?oe=` - `.concat(ne).concat(oe):Q=ne,K.pop(),G.pop(),!(K.length===0||G.length===0));)ne=K[K.length-1],fe=G[G.length-1];var ye=Math.max(K.length,G.length);if(ye===0){var xe=X.split(` +`)}else if(Z!=="strictEqualObject"){var ee=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(W2&&(q=` + `.concat(h(" ",X),"^"),X=0)}}}for(var ae=K[K.length-1],fe=G[G.length-1];ae===fe&&(X++<2?oe=` + `.concat(ae).concat(oe):Q=ae,K.pop(),G.pop(),!(K.length===0||G.length===0));)ae=K[K.length-1],fe=G[G.length-1];var ye=Math.max(K.length,G.length);if(ye===0){var xe=$.split(` `);if(xe.length>30)for(xe[26]="".concat(u,"...").concat(z);xe.length>27;)xe.pop();return"".concat(I.notIdentical,` `).concat(xe.join(` `),` -`)}Y>3&&(oe=` -`.concat(u,"...").concat(z).concat(oe),H=!0),Q!==""&&(oe=` +`)}X>3&&(oe=` +`.concat(u,"...").concat(z).concat(oe),V=!0),Q!==""&&(oe=` `.concat(Q).concat(oe),Q="");var Ae=0,Me=I[Z]+` -`.concat(A,"+ actual").concat(z," ").concat(b,"- expected").concat(z),Ie=" ".concat(u,"...").concat(z," Lines skipped");for(Y=0;Y1&&Y>2&&(Ue>4?(re+=` -`.concat(u,"...").concat(z),H=!0):Ue>3&&(re+=` - `.concat(G[Y-2]),Ae++),re+=` - `.concat(G[Y-1]),Ae++),ae=Y,Q+=` -`.concat(b,"-").concat(z," ").concat(G[Y]),Ae++;else if(G.length1&&Y>2&&(Ue>4?(re+=` -`.concat(u,"...").concat(z),H=!0):Ue>3&&(re+=` - `.concat(K[Y-2]),Ae++),re+=` - `.concat(K[Y-1]),Ae++),ae=Y,re+=` -`.concat(A,"+").concat(z," ").concat(K[Y]),Ae++;else{var qe=G[Y],ke=K[Y],ge=ke!==qe&&(!T(ke,",")||ke.slice(0,-1)!==qe);ge&&T(qe,",")&&qe.slice(0,-1)===ke&&(ge=!1,ke+=","),ge?(Ue>1&&Y>2&&(Ue>4?(re+=` -`.concat(u,"...").concat(z),H=!0):Ue>3&&(re+=` - `.concat(K[Y-2]),Ae++),re+=` - `.concat(K[Y-1]),Ae++),ae=Y,re+=` +`.concat(A,"+ actual").concat(z," ").concat(b,"- expected").concat(z),Ie=" ".concat(u,"...").concat(z," Lines skipped");for(X=0;X1&&X>2&&(qe>4?(re+=` +`.concat(u,"...").concat(z),V=!0):qe>3&&(re+=` + `.concat(G[X-2]),Ae++),re+=` + `.concat(G[X-1]),Ae++),ne=X,Q+=` +`.concat(b,"-").concat(z," ").concat(G[X]),Ae++;else if(G.length1&&X>2&&(qe>4?(re+=` +`.concat(u,"...").concat(z),V=!0):qe>3&&(re+=` + `.concat(K[X-2]),Ae++),re+=` + `.concat(K[X-1]),Ae++),ne=X,re+=` +`.concat(A,"+").concat(z," ").concat(K[X]),Ae++;else{var je=G[X],ke=K[X],ge=ke!==je&&(!w(ke,",")||ke.slice(0,-1)!==je);ge&&w(je,",")&&je.slice(0,-1)===ke&&(ge=!1,ke+=","),ge?(qe>1&&X>2&&(qe>4?(re+=` +`.concat(u,"...").concat(z),V=!0):qe>3&&(re+=` + `.concat(K[X-2]),Ae++),re+=` + `.concat(K[X-1]),Ae++),ne=X,re+=` `.concat(A,"+").concat(z," ").concat(ke),Q+=` -`.concat(b,"-").concat(z," ").concat(qe),Ae+=2):(re+=Q,Q="",(Ue===1||Y===0)&&(re+=` - `.concat(ke),Ae++))}if(Ae>20&&Y20&&X30)for($[26]="".concat(u,"...").concat(z);$.length>27;)$.pop();$.length===1?ae=Z.call(this,"".concat(q," ").concat($[0])):ae=Z.call(this,"".concat(q,` +`)+"".concat(u,"...").concat(z)}return"".concat(Me).concat(V?Ie:"",` +`).concat(re).concat(Q).concat(oe).concat(q)}var P=function(j,U){r(Q,j);var Z=a(Q);function Q(re){var ne;if(k(this,Q),T(re)!=="object"||re===null)throw new _("options","Object",re);var oe=re.message,V=re.operator,$=re.stackStartFn,K=re.actual,G=re.expected,X=Error.stackTraceLimit;if(Error.stackTraceLimit=0,oe!=null)ne=Z.call(this,String(oe));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(u="\x1B[34m",A="\x1B[32m",z="\x1B[39m",b="\x1B[31m"):(u="",A="",z="",b="")),T(K)==="object"&&K!==null&&T(G)==="object"&&G!==null&&"stack"in K&&K instanceof Error&&"stack"in G&&G instanceof Error&&(K=R(K),G=R(G)),V==="deepStrictEqual"||V==="strictEqual")ne=Z.call(this,F(K,G,V));else if(V==="notDeepStrictEqual"||V==="notStrictEqual"){var q=I[V],W=B(K).split(` +`);if(V==="notStrictEqual"&&T(K)==="object"&&K!==null&&(q=I.notStrictEqualObject),W.length>30)for(W[26]="".concat(u,"...").concat(z);W.length>27;)W.pop();W.length===1?ne=Z.call(this,"".concat(q," ").concat(W[0])):ne=Z.call(this,"".concat(q,` -`).concat($.join(` +`).concat(W.join(` `),` -`))}else{var ee=B(K),ne="",fe=I[H];H==="notDeepEqual"||H==="notEqual"?(ee="".concat(I[H],` +`))}else{var ee=B(K),ae="",fe=I[V];V==="notDeepEqual"||V==="notEqual"?(ee="".concat(I[V],` -`).concat(ee),ee.length>1024&&(ee="".concat(ee.slice(0,1021),"..."))):(ne="".concat(B(G)),ee.length>512&&(ee="".concat(ee.slice(0,509),"...")),ne.length>512&&(ne="".concat(ne.slice(0,509),"...")),H==="deepEqual"||H==="equal"?ee="".concat(fe,` +`).concat(ee),ee.length>1024&&(ee="".concat(ee.slice(0,1021),"..."))):(ae="".concat(B(G)),ee.length>512&&(ee="".concat(ee.slice(0,509),"...")),ae.length>512&&(ae="".concat(ae.slice(0,509),"...")),V==="deepEqual"||V==="equal"?ee="".concat(fe,` `).concat(ee,` should equal -`):ne=" ".concat(H," ").concat(ne)),ae=Z.call(this,"".concat(ee).concat(ne))}return Error.stackTraceLimit=Y,ae.generatedMessage=!oe,Object.defineProperty(s(ae),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),ae.code="ERR_ASSERTION",ae.actual=K,ae.expected=G,ae.operator=H,Error.captureStackTrace&&Error.captureStackTrace(s(ae),X),ae.stack,ae.name="AssertionError",o(ae)}return e(Q,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:U,value:function(ae,oe){return M(this,x(x({},oe),{},{customInspect:!1,depth:0}))}}]),Q}(c(Error),M.custom);V.exports=P}}),P2=Ee({"node_modules/object-keys/isArguments.js"(J,V){"use strict";var v=Object.prototype.toString;V.exports=function(E){var k=v.call(E),l=k==="[object Arguments]";return l||(l=k!=="[object Array]"&&E!==null&&typeof E=="object"&&typeof E.length=="number"&&E.length>=0&&v.call(E.callee)==="[object Function]"),l}}}),nk=Ee({"node_modules/object-keys/implementation.js"(J,V){"use strict";var v;Object.keys||(x=Object.prototype.hasOwnProperty,E=Object.prototype.toString,k=P2(),l=Object.prototype.propertyIsEnumerable,e=!l.call({toString:null},"toString"),t=l.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=function(c){var m=c.constructor;return m&&m.prototype===c},n={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},o=function(){if(typeof window>"u")return!1;for(var c in window)try{if(!n["$"+c]&&x.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{r(window[c])}catch{return!0}}catch{return!0}return!1}(),s=function(c){if(typeof window>"u"||!o)return r(c);try{return r(c)}catch{return!1}},v=function(m){var h=m!==null&&typeof m=="object",p=E.call(m)==="[object Function]",g=k(m),i=h&&E.call(m)==="[object String]",w=[];if(!h&&!p&&!g)throw new TypeError("Object.keys called on a non-object");var S=t&&p;if(i&&m.length>0&&!x.call(m,0))for(var M=0;M0)for(var C=0;C-1?x(t):t}}}),cm=Ee({"node_modules/define-properties/index.js"(J,V){"use strict";var v=D2(),x=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",E=Object.prototype.toString,k=Array.prototype.concat,l=y2(),e=function(n){return typeof n=="function"&&E.call(n)==="[object Function]"},t=_2()(),a=function(n,o,s,c){if(o in n){if(c===!0){if(n[o]===s)return}else if(!e(c)||!c())return}t?l(n,o,s,!0):l(n,o,s)},r=function(n,o){var s=arguments.length>2?arguments[2]:{},c=v(o);x&&(c=k.call(c,Object.getOwnPropertySymbols(o)));for(var m=0;mue.length)&&(ve=ue.length);for(var se=0,Te=new Array(ve);se10)return!0;for(var ve=0;ve57)return!0}return ue.length===10&&ue>=Math.pow(2,32)}function P(ue){return Object.keys(ue).filter(F).concat(s(ue).filter(Object.prototype.propertyIsEnumerable.bind(ue)))}function j(ue,ve){if(ue===ve)return 0;for(var se=ue.length,Te=ve.length,Fe=0,We=Math.min(se,Te);Fe1?G-1:0),q=1;q1?G-1:0),q=1;q1?G-1:0),q=1;q1?G-1:0),q=1;q=0&&v.call(E.callee)==="[object Function]"),l}}}),ak=Ee({"node_modules/object-keys/implementation.js"(J,H){"use strict";var v;Object.keys||(x=Object.prototype.hasOwnProperty,E=Object.prototype.toString,k=P2(),l=Object.prototype.propertyIsEnumerable,e=!l.call({toString:null},"toString"),t=l.call(function(){},"prototype"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=function(c){var g=c.constructor;return g&&g.prototype===c},a={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},o=function(){if(typeof window>"u")return!1;for(var c in window)try{if(!a["$"+c]&&x.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{r(window[c])}catch{return!0}}catch{return!0}return!1}(),s=function(c){if(typeof window>"u"||!o)return r(c);try{return r(c)}catch{return!1}},v=function(g){var f=g!==null&&typeof g=="object",p=E.call(g)==="[object Function]",m=k(g),i=f&&E.call(g)==="[object String]",T=[];if(!f&&!p&&!m)throw new TypeError("Object.keys called on a non-object");var S=t&&p;if(i&&g.length>0&&!x.call(g,0))for(var M=0;M0)for(var C=0;C-1?x(t):t}}}),cm=Ee({"node_modules/define-properties/index.js"(J,H){"use strict";var v=D2(),x=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",E=Object.prototype.toString,k=Array.prototype.concat,l=y2(),e=function(a){return typeof a=="function"&&E.call(a)==="[object Function]"},t=_2()(),n=function(a,o,s,c){if(o in a){if(c===!0){if(a[o]===s)return}else if(!e(c)||!c())return}t?l(a,o,s,!0):l(a,o,s)},r=function(a,o){var s=arguments.length>2?arguments[2]:{},c=v(o);x&&(c=k.call(c,Object.getOwnPropertySymbols(o)));for(var g=0;gle.length)&&(ve=le.length);for(var se=0,Te=new Array(ve);se10)return!0;for(var ve=0;ve57)return!0}return le.length===10&&le>=Math.pow(2,32)}function P(le){return Object.keys(le).filter(F).concat(s(le).filter(Object.prototype.propertyIsEnumerable.bind(le)))}function j(le,ve){if(le===ve)return 0;for(var se=le.length,Te=ve.length,Fe=0,We=Math.min(se,Te);Fe1?G-1:0),q=1;q1?G-1:0),q=1;q1?G-1:0),q=1;q1?G-1:0),q=1;q0)return e(n);if(s==="number"&&isNaN(n)===!1)return o.long?a(n):t(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function e(n){if(n=String(n),!(n.length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(n);if(o){var s=parseFloat(o[1]),c=(o[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return s*l;case"days":case"day":case"d":return s*k;case"hours":case"hour":case"hrs":case"hr":case"h":return s*E;case"minutes":case"minute":case"mins":case"min":case"m":return s*x;case"seconds":case"second":case"secs":case"sec":case"s":return s*v;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function t(n){return n>=k?Math.round(n/k)+"d":n>=E?Math.round(n/E)+"h":n>=x?Math.round(n/x)+"m":n>=v?Math.round(n/v)+"s":n+"ms"}function a(n){return r(n,k,"day")||r(n,E,"hour")||r(n,x,"minute")||r(n,v,"second")||n+" ms"}function r(n,o,s){if(!(n=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}J.formatters.j=function(t){try{return JSON.stringify(t)}catch(a){return"[UnexpectedJSONParseError]: "+a.message}};function x(t){var a=this.useColors;if(t[0]=(a?"%c":"")+this.namespace+(a?" %c":" ")+t[0]+(a?"%c ":" ")+"+"+J.humanize(this.diff),!!a){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(n++,s==="%c"&&(o=n))}),t.splice(o,0,r)}}function E(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function k(t){try{t==null?J.storage.removeItem("debug"):J.storage.debug=t}catch{}}function l(){var t;try{t=J.storage.debug}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}J.enable(l());function e(){try{return window.localStorage}catch{}}}}),pk=Ee({"node_modules/stream-parser/index.js"(J,V){var v=V1(),x=vk()("stream-parser");V.exports=t;var E=-1,k=0,l=1,e=2;function t(i){var w=i&&typeof i._transform=="function",S=i&&typeof i._write=="function";if(!w&&!S)throw new Error("must pass a Writable or Transform stream in");x("extending Parser into stream"),i._bytes=r,i._skipBytes=n,w&&(i._passthrough=o),w?i._transform=c:i._write=s}function a(i){x("initializing parser stream"),i._parserBytesLeft=0,i._parserBuffers=[],i._parserBuffered=0,i._parserState=E,i._parserCallback=null,typeof i.push=="function"&&(i._parserOutput=i.push.bind(i)),i._parserInit=!0}function r(i,w){v(!this._parserCallback,'there is already a "callback" set!'),v(isFinite(i)&&i>0,'can only buffer a finite number of bytes > 0, got "'+i+'"'),this._parserInit||a(this),x("buffering %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=k}function n(i,w){v(!this._parserCallback,'there is already a "callback" set!'),v(i>0,'can only skip > 0 bytes, got "'+i+'"'),this._parserInit||a(this),x("skipping %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=l}function o(i,w){v(!this._parserCallback,'There is already a "callback" set!'),v(i>0,'can only pass through > 0 bytes, got "'+i+'"'),this._parserInit||a(this),x("passing through %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=e}function s(i,w,S){this._parserInit||a(this),x("write(%o bytes)",i.length),typeof w=="function"&&(S=w),p(this,i,null,S)}function c(i,w,S){this._parserInit||a(this),x("transform(%o bytes)",i.length),typeof w!="function"&&(w=this._parserOutput),p(this,i,w,S)}function m(i,w,S,M){return i._parserBytesLeft<=0?M(new Error("got data but not currently parsing anything")):w.length<=i._parserBytesLeft?function(){return h(i,w,S,M)}:function(){var C=w.slice(0,i._parserBytesLeft);return h(i,C,S,function(_){if(_)return M(_);if(w.length>C.length)return function(){return m(i,w.slice(C.length),S,M)}})}}function h(i,w,S,M){if(i._parserBytesLeft-=w.length,x("%o bytes left for stream piece",i._parserBytesLeft),i._parserState===k?(i._parserBuffers.push(w),i._parserBuffered+=w.length):i._parserState===e&&S(w),i._parserBytesLeft===0){var C=i._parserCallback;if(C&&i._parserState===k&&i._parserBuffers.length>1&&(w=Buffer.concat(i._parserBuffers,i._parserBuffered)),i._parserState!==k&&(w=null),i._parserCallback=null,i._parserBuffered=0,i._parserState=E,i._parserBuffers.splice(0),C){var _=[];w&&_.push(w),S&&_.push(S);var T=C.length>_.length;T&&_.push(g(M));var f=C.apply(i,_);if(!T||M===f)return M}}else return M}var p=g(m);function g(i){return function(){for(var w=i.apply(this,arguments);typeof w=="function";)w=w();return w}}}}),Gs=Ee({"node_modules/probe-image-size/lib/common.js"(J){"use strict";var V=tk().Transform,v=pk();function x(){V.call(this,{readableObjectMode:!0})}x.prototype=Object.create(V.prototype),x.prototype.constructor=x,v(x.prototype),J.ParserStream=x,J.sliceEq=function(k,l,e){for(var t=l,a=0;a>16},J.readInt16BE=function(k,l){return J.readUInt16BE(k,l)<<16>>16},J.readUInt32LE=function(k,l){return(k[l]|k[l+1]<<8|k[l+2]<<16)+k[l+3]*16777216},J.readUInt32BE=function(k,l){return k[l]*16777216+(k[l+1]<<16|k[l+2]<<8|k[l+3])},J.readInt32LE=function(k,l){return J.readUInt32LE(k,l)|0},J.readInt32BE=function(k,l){return J.readUInt32BE(k,l)|0};function E(k,l,e){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=k,l&&(this.code=l),e&&(this.statusCode=e)}E.prototype=Object.create(Error.prototype),E.prototype.constructor=E,J.ProbeError=E}}),mk=Ee({"node_modules/probe-image-size/lib/miaf_utils.js"(J,V){"use strict";var v=Gs().readUInt16BE,x=Gs().readUInt32BE;function E(o,s){if(o.length<4+s)return null;var c=x(o,s);return o.length>4&15,m=o[4]&15,h=o[5]>>4&15,p=v(o,6),g=8,i=0;ip.width||h.width===p.width&&h.height>p.height?h:p}),c=o.reduce(function(h,p){return h.height>p.height||h.height===p.height&&h.width>p.width?h:p}),m;return s.width>c.height||s.width===c.height&&s.height>c.width?m=s:m=c,m}V.exports.readSizeFromMeta=function(o){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(r(o,s),!!s.sizes.length){var c=n(s.sizes),m=1;s.transforms.forEach(function(p){var g={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},i={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(p.type==="imir"&&(p.value===0?m=i[m]:(m=i[m],m=g[m],m=g[m])),p.type==="irot")for(var w=0;w0&&!this.aborted;){var e=this.ifds_to_read.shift();e.offset&&this.scan_ifd(e.id,e.offset,k)}},E.prototype.read_uint16=function(k){var l=this.input;if(k+2>l.length)throw v("unexpected EOF","EBADDATA");return this.big_endian?l[k]*256+l[k+1]:l[k]+l[k+1]*256},E.prototype.read_uint32=function(k){var l=this.input;if(k+4>l.length)throw v("unexpected EOF","EBADDATA");return this.big_endian?l[k]*16777216+l[k+1]*65536+l[k+2]*256+l[k+3]:l[k]+l[k+1]*256+l[k+2]*65536+l[k+3]*16777216},E.prototype.is_subifd_link=function(k,l){return k===0&&l===34665||k===0&&l===34853||k===34665&&l===40965},E.prototype.exif_format_length=function(k){switch(k){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},E.prototype.exif_format_read=function(k,l){var e;switch(k){case 1:case 2:return e=this.input[l],e;case 6:return e=this.input[l],e|(e&128)*33554430;case 3:return e=this.read_uint16(l),e;case 8:return e=this.read_uint16(l),e|(e&32768)*131070;case 4:return e=this.read_uint32(l),e;case 9:return e=this.read_uint32(l),e|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},E.prototype.scan_ifd=function(k,l,e){var t=this.read_uint16(l);l+=2;for(var a=0;athis.input.length)throw v("unexpected EOF","EBADDATA");for(var p=[],g=m,i=0;i0&&(this.ifds_to_read.push({id:r,offset:p[0]}),h=!0);var S={is_big_endian:this.big_endian,ifd:k,tag:r,format:n,count:o,entry_offset:l+this.start,data_length:c,data_offset:m+this.start,value:p,is_subifd_link:h};if(e(S)===!1){this.aborted=!0;return}l+=12}k===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(l)})},V.exports.ExifParser=E,V.exports.get_orientation=function(k){var l=0;try{return new E(k,0,k.length).each(function(e){if(e.ifd===0&&e.tag===274&&Array.isArray(e.value))return l=e.value[0],!1}),l}catch{return-1}}}}),gk=Ee({"node_modules/probe-image-size/lib/parse_sync/avif.js"(J,V){"use strict";var v=Gs().str2arr,x=Gs().sliceEq,E=Gs().readUInt32BE,k=mk(),l=H1(),e=v("ftyp");V.exports=function(t){if(x(t,4,e)){var a=k.unbox(t,0);if(a){var r=k.getMimeType(a.data);if(r){for(var n,o=a.end;;){var s=k.unbox(t,o);if(!s)break;if(o=s.end,s.boxtype==="mdat")return;if(s.boxtype==="meta"){n=s.data;break}}if(n){var c=k.readSizeFromMeta(n);if(c){var m={width:c.width,height:c.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(c.variants.length>1&&(m.variants=c.variants),c.orientation&&(m.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=t.length){var h=E(t,c.exif_location.offset),p=t.slice(c.exif_location.offset+h+4,c.exif_location.offset+c.exif_location.length),g=l.get_orientation(p);g>0&&(m.orientation=g)}return m}}}}}}}}),yk=Ee({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(J,V){"use strict";var v=Gs().str2arr,x=Gs().sliceEq,E=Gs().readInt16LE,k=Gs().readInt32LE,l=Gs().readUInt32LE,e=v("BM");V.exports=function(t){if(!(t.length<26)&&x(t,0,e)){var a,r,n=l(t,14);if(n===12)r=E(t,18),a=E(t,20);else if(n>12)r=k(t,18),a=k(t,22);else return;return{width:r,height:Math.abs(a),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}}),_k=Ee({"node_modules/probe-image-size/lib/parse_sync/gif.js"(J,V){"use strict";var v=Gs().str2arr,x=Gs().sliceEq,E=Gs().readUInt16LE,k=v("GIF87a"),l=v("GIF89a");V.exports=function(e){if(!(e.length<10)&&!(!x(e,0,k)&&!x(e,0,l)))return{width:E(e,6),height:E(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),bk=Ee({"node_modules/probe-image-size/lib/parse_sync/ico.js"(J,V){"use strict";var v=Gs().readUInt16LE,x=0,E=1,k=16;V.exports=function(l){var e=v(l,0),t=v(l,2),a=v(l,4);if(!(e!==x||t!==E||!a)&&!(l.length<6+a*k)){for(var r=[],n={width:0,height:0},o=0;on.width||c>n.height)&&(n=m)}return{width:n.width,height:n.height,variants:r,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),xk=Ee({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(J,V){"use strict";var v=Gs().readUInt16BE,x=Gs().str2arr,E=Gs().sliceEq,k=H1(),l=x("Exif\0\0");V.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var a=e[t++],r;a===255;)a=e[t++];if(a>=208&&a<=217||a===1)r=0;else if(a>=192&&a<=254){if(e.length-t<2)return;r=v(e,t)-2,t+=2}else return;if(a===217||a===218)return;var n;if(a===225&&r>=10&&E(e,t,l)&&(n=k.get_orientation(e.slice(t+6,t+r))),r>=5&&a>=192&&a<=207&&a!==196&&a!==200&&a!==204){if(e.length-t0&&(o.orientation=n),o}t+=r}}}}),wk=Ee({"node_modules/probe-image-size/lib/parse_sync/png.js"(J,V){"use strict";var v=Gs().str2arr,x=Gs().sliceEq,E=Gs().readUInt32BE,k=v(`\x89PNG\r +`).concat(p($),` +`));var ae=new g({actual:$,expected:K,message:G,operator:q,stackStartFn:X});throw ae.generatedMessage=ee,ae}}A.match=function $(K,G,X){oe(K,G,X,$,"match")},A.doesNotMatch=function $(K,G,X){oe(K,G,X,$,"doesNotMatch")};function V(){for(var $=arguments.length,K=new Array($),G=0;G<$;G++)K[G]=arguments[G];N.apply(void 0,[V,K.length].concat(K))}A.strict=S(V,A,{equal:A.strictEqual,deepEqual:A.deepStrictEqual,notEqual:A.notStrictEqual,notDeepEqual:A.notDeepStrictEqual}),A.strict.strict=A.strict}}),hk=Ee({"node_modules/ms/index.js"(J,H){var v=1e3,x=v*60,E=x*60,k=E*24,l=k*365.25;H.exports=function(a,o){o=o||{};var s=typeof a;if(s==="string"&&a.length>0)return e(a);if(s==="number"&&isNaN(a)===!1)return o.long?n(a):t(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))};function e(a){if(a=String(a),!(a.length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);if(o){var s=parseFloat(o[1]),c=(o[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return s*l;case"days":case"day":case"d":return s*k;case"hours":case"hour":case"hrs":case"hr":case"h":return s*E;case"minutes":case"minute":case"mins":case"min":case"m":return s*x;case"seconds":case"second":case"secs":case"sec":case"s":return s*v;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function t(a){return a>=k?Math.round(a/k)+"d":a>=E?Math.round(a/E)+"h":a>=x?Math.round(a/x)+"m":a>=v?Math.round(a/v)+"s":a+"ms"}function n(a){return r(a,k,"day")||r(a,E,"hour")||r(a,x,"minute")||r(a,v,"second")||a+" ms"}function r(a,o,s){if(!(a=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}J.formatters.j=function(t){try{return JSON.stringify(t)}catch(n){return"[UnexpectedJSONParseError]: "+n.message}};function x(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+J.humanize(this.diff),!!n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var a=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(a++,s==="%c"&&(o=a))}),t.splice(o,0,r)}}function E(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function k(t){try{t==null?J.storage.removeItem("debug"):J.storage.debug=t}catch{}}function l(){var t;try{t=J.storage.debug}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}J.enable(l());function e(){try{return window.localStorage}catch{}}}}),pk=Ee({"node_modules/stream-parser/index.js"(J,H){var v=V1(),x=vk()("stream-parser");H.exports=t;var E=-1,k=0,l=1,e=2;function t(i){var T=i&&typeof i._transform=="function",S=i&&typeof i._write=="function";if(!T&&!S)throw new Error("must pass a Writable or Transform stream in");x("extending Parser into stream"),i._bytes=r,i._skipBytes=a,T&&(i._passthrough=o),T?i._transform=c:i._write=s}function n(i){x("initializing parser stream"),i._parserBytesLeft=0,i._parserBuffers=[],i._parserBuffered=0,i._parserState=E,i._parserCallback=null,typeof i.push=="function"&&(i._parserOutput=i.push.bind(i)),i._parserInit=!0}function r(i,T){v(!this._parserCallback,'there is already a "callback" set!'),v(isFinite(i)&&i>0,'can only buffer a finite number of bytes > 0, got "'+i+'"'),this._parserInit||n(this),x("buffering %o bytes",i),this._parserBytesLeft=i,this._parserCallback=T,this._parserState=k}function a(i,T){v(!this._parserCallback,'there is already a "callback" set!'),v(i>0,'can only skip > 0 bytes, got "'+i+'"'),this._parserInit||n(this),x("skipping %o bytes",i),this._parserBytesLeft=i,this._parserCallback=T,this._parserState=l}function o(i,T){v(!this._parserCallback,'There is already a "callback" set!'),v(i>0,'can only pass through > 0 bytes, got "'+i+'"'),this._parserInit||n(this),x("passing through %o bytes",i),this._parserBytesLeft=i,this._parserCallback=T,this._parserState=e}function s(i,T,S){this._parserInit||n(this),x("write(%o bytes)",i.length),typeof T=="function"&&(S=T),p(this,i,null,S)}function c(i,T,S){this._parserInit||n(this),x("transform(%o bytes)",i.length),typeof T!="function"&&(T=this._parserOutput),p(this,i,T,S)}function g(i,T,S,M){return i._parserBytesLeft<=0?M(new Error("got data but not currently parsing anything")):T.length<=i._parserBytesLeft?function(){return f(i,T,S,M)}:function(){var C=T.slice(0,i._parserBytesLeft);return f(i,C,S,function(_){if(_)return M(_);if(T.length>C.length)return function(){return g(i,T.slice(C.length),S,M)}})}}function f(i,T,S,M){if(i._parserBytesLeft-=T.length,x("%o bytes left for stream piece",i._parserBytesLeft),i._parserState===k?(i._parserBuffers.push(T),i._parserBuffered+=T.length):i._parserState===e&&S(T),i._parserBytesLeft===0){var C=i._parserCallback;if(C&&i._parserState===k&&i._parserBuffers.length>1&&(T=Buffer.concat(i._parserBuffers,i._parserBuffered)),i._parserState!==k&&(T=null),i._parserCallback=null,i._parserBuffered=0,i._parserState=E,i._parserBuffers.splice(0),C){var _=[];T&&_.push(T),S&&_.push(S);var w=C.length>_.length;w&&_.push(m(M));var h=C.apply(i,_);if(!w||M===h)return M}}else return M}var p=m(g);function m(i){return function(){for(var T=i.apply(this,arguments);typeof T=="function";)T=T();return T}}}}),Gs=Ee({"node_modules/probe-image-size/lib/common.js"(J){"use strict";var H=tk().Transform,v=pk();function x(){H.call(this,{readableObjectMode:!0})}x.prototype=Object.create(H.prototype),x.prototype.constructor=x,v(x.prototype),J.ParserStream=x,J.sliceEq=function(k,l,e){for(var t=l,n=0;n>16},J.readInt16BE=function(k,l){return J.readUInt16BE(k,l)<<16>>16},J.readUInt32LE=function(k,l){return(k[l]|k[l+1]<<8|k[l+2]<<16)+k[l+3]*16777216},J.readUInt32BE=function(k,l){return k[l]*16777216+(k[l+1]<<16|k[l+2]<<8|k[l+3])},J.readInt32LE=function(k,l){return J.readUInt32LE(k,l)|0},J.readInt32BE=function(k,l){return J.readUInt32BE(k,l)|0};function E(k,l,e){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=k,l&&(this.code=l),e&&(this.statusCode=e)}E.prototype=Object.create(Error.prototype),E.prototype.constructor=E,J.ProbeError=E}}),mk=Ee({"node_modules/probe-image-size/lib/miaf_utils.js"(J,H){"use strict";var v=Gs().readUInt16BE,x=Gs().readUInt32BE;function E(o,s){if(o.length<4+s)return null;var c=x(o,s);return o.length>4&15,g=o[4]&15,f=o[5]>>4&15,p=v(o,6),m=8,i=0;ip.width||f.width===p.width&&f.height>p.height?f:p}),c=o.reduce(function(f,p){return f.height>p.height||f.height===p.height&&f.width>p.width?f:p}),g;return s.width>c.height||s.width===c.height&&s.height>c.width?g=s:g=c,g}H.exports.readSizeFromMeta=function(o){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(r(o,s),!!s.sizes.length){var c=a(s.sizes),g=1;s.transforms.forEach(function(p){var m={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},i={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(p.type==="imir"&&(p.value===0?g=i[g]:(g=i[g],g=m[g],g=m[g])),p.type==="irot")for(var T=0;T0&&!this.aborted;){var e=this.ifds_to_read.shift();e.offset&&this.scan_ifd(e.id,e.offset,k)}},E.prototype.read_uint16=function(k){var l=this.input;if(k+2>l.length)throw v("unexpected EOF","EBADDATA");return this.big_endian?l[k]*256+l[k+1]:l[k]+l[k+1]*256},E.prototype.read_uint32=function(k){var l=this.input;if(k+4>l.length)throw v("unexpected EOF","EBADDATA");return this.big_endian?l[k]*16777216+l[k+1]*65536+l[k+2]*256+l[k+3]:l[k]+l[k+1]*256+l[k+2]*65536+l[k+3]*16777216},E.prototype.is_subifd_link=function(k,l){return k===0&&l===34665||k===0&&l===34853||k===34665&&l===40965},E.prototype.exif_format_length=function(k){switch(k){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},E.prototype.exif_format_read=function(k,l){var e;switch(k){case 1:case 2:return e=this.input[l],e;case 6:return e=this.input[l],e|(e&128)*33554430;case 3:return e=this.read_uint16(l),e;case 8:return e=this.read_uint16(l),e|(e&32768)*131070;case 4:return e=this.read_uint32(l),e;case 9:return e=this.read_uint32(l),e|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},E.prototype.scan_ifd=function(k,l,e){var t=this.read_uint16(l);l+=2;for(var n=0;nthis.input.length)throw v("unexpected EOF","EBADDATA");for(var p=[],m=g,i=0;i0&&(this.ifds_to_read.push({id:r,offset:p[0]}),f=!0);var S={is_big_endian:this.big_endian,ifd:k,tag:r,format:a,count:o,entry_offset:l+this.start,data_length:c,data_offset:g+this.start,value:p,is_subifd_link:f};if(e(S)===!1){this.aborted=!0;return}l+=12}k===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(l)})},H.exports.ExifParser=E,H.exports.get_orientation=function(k){var l=0;try{return new E(k,0,k.length).each(function(e){if(e.ifd===0&&e.tag===274&&Array.isArray(e.value))return l=e.value[0],!1}),l}catch{return-1}}}}),gk=Ee({"node_modules/probe-image-size/lib/parse_sync/avif.js"(J,H){"use strict";var v=Gs().str2arr,x=Gs().sliceEq,E=Gs().readUInt32BE,k=mk(),l=H1(),e=v("ftyp");H.exports=function(t){if(x(t,4,e)){var n=k.unbox(t,0);if(n){var r=k.getMimeType(n.data);if(r){for(var a,o=n.end;;){var s=k.unbox(t,o);if(!s)break;if(o=s.end,s.boxtype==="mdat")return;if(s.boxtype==="meta"){a=s.data;break}}if(a){var c=k.readSizeFromMeta(a);if(c){var g={width:c.width,height:c.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(c.variants.length>1&&(g.variants=c.variants),c.orientation&&(g.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=t.length){var f=E(t,c.exif_location.offset),p=t.slice(c.exif_location.offset+f+4,c.exif_location.offset+c.exif_location.length),m=l.get_orientation(p);m>0&&(g.orientation=m)}return g}}}}}}}}),yk=Ee({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(J,H){"use strict";var v=Gs().str2arr,x=Gs().sliceEq,E=Gs().readInt16LE,k=Gs().readInt32LE,l=Gs().readUInt32LE,e=v("BM");H.exports=function(t){if(!(t.length<26)&&x(t,0,e)){var n,r,a=l(t,14);if(a===12)r=E(t,18),n=E(t,20);else if(a>12)r=k(t,18),n=k(t,22);else return;return{width:r,height:Math.abs(n),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}}),_k=Ee({"node_modules/probe-image-size/lib/parse_sync/gif.js"(J,H){"use strict";var v=Gs().str2arr,x=Gs().sliceEq,E=Gs().readUInt16LE,k=v("GIF87a"),l=v("GIF89a");H.exports=function(e){if(!(e.length<10)&&!(!x(e,0,k)&&!x(e,0,l)))return{width:E(e,6),height:E(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),bk=Ee({"node_modules/probe-image-size/lib/parse_sync/ico.js"(J,H){"use strict";var v=Gs().readUInt16LE,x=0,E=1,k=16;H.exports=function(l){var e=v(l,0),t=v(l,2),n=v(l,4);if(!(e!==x||t!==E||!n)&&!(l.length<6+n*k)){for(var r=[],a={width:0,height:0},o=0;oa.width||c>a.height)&&(a=g)}return{width:a.width,height:a.height,variants:r,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),xk=Ee({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(J,H){"use strict";var v=Gs().readUInt16BE,x=Gs().str2arr,E=Gs().sliceEq,k=H1(),l=x("Exif\0\0");H.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var n=e[t++],r;n===255;)n=e[t++];if(n>=208&&n<=217||n===1)r=0;else if(n>=192&&n<=254){if(e.length-t<2)return;r=v(e,t)-2,t+=2}else return;if(n===217||n===218)return;var a;if(n===225&&r>=10&&E(e,t,l)&&(a=k.get_orientation(e.slice(t+6,t+r))),r>=5&&n>=192&&n<=207&&n!==196&&n!==200&&n!==204){if(e.length-t0&&(o.orientation=a),o}t+=r}}}}),wk=Ee({"node_modules/probe-image-size/lib/parse_sync/png.js"(J,H){"use strict";var v=Gs().str2arr,x=Gs().sliceEq,E=Gs().readUInt32BE,k=v(`\x89PNG\r  -`),l=v("IHDR");V.exports=function(e){if(!(e.length<24)&&x(e,0,k)&&x(e,12,l))return{width:E(e,16),height:E(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),Tk=Ee({"node_modules/probe-image-size/lib/parse_sync/psd.js"(J,V){"use strict";var v=Gs().str2arr,x=Gs().sliceEq,E=Gs().readUInt32BE,k=v("8BPS\0");V.exports=function(l){if(!(l.length<22)&&x(l,0,k))return{width:E(l,18),height:E(l,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),Ak=Ee({"node_modules/probe-image-size/lib/parse_sync/svg.js"(J,V){"use strict";function v(s){return s===32||s===9||s===13||s===10}function x(s){return typeof s=="number"&&isFinite(s)&&s>0}function E(s){var c=0,m=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(c=3);c]*>/,l=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,e=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,a=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,r=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function n(s){var c=s.match(e),m=s.match(t),h=s.match(a);return{width:c&&(c[1]||c[2]),height:m&&(m[1]||m[2]),viewbox:h&&(h[1]||h[2])}}function o(s){return r.test(s)?s.match(r)[0]:"px"}V.exports=function(s){if(E(s)){for(var c="",m=0;m>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function n(o,s){return{width:(o[s+6]<<16|o[s+5]<<8|o[s+4])+1,height:(o[s+9]<<16|o[s+8]<<8|o[s+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}V.exports=function(o){if(!(o.length<16)&&!(!x(o,0,e)||!x(o,8,t))){var s=12,c=null,m=0,h=k(o,4)+8;if(!(h>o.length)){for(;s+8=10?c=c||a(o,s+8):p==="VP8L"&&g>=5?c=c||r(o,s+8):p==="VP8X"&&g>=10?c=c||n(o,s+8):p==="EXIF"&&(m=l.get_orientation(o.slice(s+8,s+8+g)),s=1/0),s+=8+g}if(c)return m>0&&(c.orientation=m),c}}}}}),Ek=Ee({"node_modules/probe-image-size/lib/parsers_sync.js"(J,V){"use strict";V.exports={avif:gk(),bmp:yk(),gif:_k(),ico:bk(),jpeg:xk(),png:wk(),psd:Tk(),svg:Ak(),tiff:Mk(),webp:Sk()}}}),kk=Ee({"node_modules/probe-image-size/sync.js"(J,V){"use strict";var v=Ek();function x(E){for(var k=Object.keys(v),l=0;l0&&e.height>0?e:null}return null}V.exports=function(k){return x(k)},V.exports.parsers=v}}),Ck=Ee({"src/traces/image/helpers.js"(J){"use strict";var V=kk(),v=yd().IMAGE_URL_PREFIX,x=Nv().Buffer;J.getImageSize=function(E){var k=E.replace(v,""),l=new x(k,"base64");return V(l)}}}),Lk=Ee({"src/traces/image/calc.js"(J,V){"use strict";var v=Vr(),x=Zp(),E=mi(),k=uo(),l=Vr().maxRowLength,e=Ck().getImageSize;V.exports=function(o,s){var c,m;if(s._hasZ)c=s.z.length,m=l(s.z);else if(s._hasSource){var h=e(s.source);c=h.height,m=h.width}var p=k.getFromId(o,s.xaxis||"x"),g=k.getFromId(o,s.yaxis||"y"),i=p.d2c(s.x0)-s.dx/2,w=g.d2c(s.y0)-s.dy/2,S,M=[i,i+m*s.dx],C=[w,w+c*s.dy];if(p&&p.type==="log")for(S=0;S0;)z=c.c2p(C+B*u),B--;for(B=0;N===void 0&&B0;)R=m.c2p(_+B*A),B--;if(zH[0];if(X||K){var G=b+P/2,Y=N+j/2;ae+="transform:"+E(G+"px",Y+"px")+"scale("+(X?-1:1)+","+(K?-1:1)+")"+E(-G+"px",-Y+"px")+";"}}re.attr("style",ae);var q=new Promise(function($){if(w._hasZ)$();else if(w._hasSource)if(w._canvas&&w._canvas.el.width===T&&w._canvas.el.height===f&&w._canvas.source===w.source)$();else{var ee=document.createElement("canvas");ee.width=T,ee.height=f;var ne=ee.getContext("2d",{willReadFrequently:!0});w._image=w._image||new Image;var fe=w._image;fe.onload=function(){ne.drawImage(fe,0,0),w._canvas={el:ee,source:w.source},$()},fe.setAttribute("src",w.source)}}).then(function(){var $,ee;if(w._hasZ)ee=Q(function(ye,xe){var Ae=M[xe][ye];return x.isTypedArray(Ae)&&(Ae=Array.from(Ae)),Ae}),$=ee.toDataURL("image/png");else if(w._hasSource)if(S)$=w.source;else{var ne=w._canvas.el.getContext("2d",{willReadFrequently:!0}),fe=ne.getImageData(0,0,T,f).data;ee=Q(function(ye,xe){var Ae=4*(xe*T+ye);return[fe[Ae],fe[Ae+1],fe[Ae+2],fe[Ae+3]]}),$=ee.toDataURL("image/png")}re.attr({"xlink:href":$,height:j,width:P,x:b,y:N})});r._promises.push(q)})}}}),Dk=Ee({"src/traces/image/style.js"(J,V){"use strict";var v=Hn();V.exports=function(E){v.select(E).selectAll(".im image").style("opacity",function(k){return k[0].trace.opacity})}}}),Ik=Ee({"src/traces/image/hover.js"(J,V){"use strict";var v=$l(),x=Vr(),E=x.isArrayOrTypedArray,k=Zp();V.exports=function(e,t,a){var r=e.cd[0],n=r.trace,o=e.xa,s=e.ya;if(!(v.inbox(t-r.x0,t-(r.x0+r.w*n.dx),0)>0||v.inbox(a-r.y0,a-(r.y0+r.h*n.dy),0)>0)){var c=Math.floor((t-r.x0)/n.dx),m=Math.floor(Math.abs(a-r.y0)/n.dy),h;if(n._hasZ?h=r.z[m][c]:n._hasSource&&(h=n._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(c,m,1,1).data),!!h){var p=r.hi||n.hoverinfo,g;if(p){var i=p.split("+");i.indexOf("all")!==-1&&(i=["color"]),i.indexOf("color")!==-1&&(g=!0)}var w=k.colormodel[n.colormodel],S=w.colormodel||n.colormodel,M=S.length,C=n._scaler(h),_=w.suffix,T=[];(n.hovertemplate||g)&&(T.push("["+[C[0]+_[0],C[1]+_[1],C[2]+_[2]].join(", ")),M===4&&T.push(", "+C[3]+_[3]),T.push("]"),T=T.join(""),e.extraText=S.toUpperCase()+": "+T);var f;E(n.hovertext)&&E(n.hovertext[m])?f=n.hovertext[m][c]:E(n.text)&&E(n.text[m])&&(f=n.text[m][c]);var u=s.c2p(r.y0+(m+.5)*n.dy),A=r.x0+(c+.5)*n.dx,b=r.y0+(m+.5)*n.dy,z="["+h.slice(0,n.colormodel.length).join(", ")+"]";return[x.extendFlat(e,{index:[m,c],x0:o.c2p(r.x0+c*n.dx),x1:o.c2p(r.x0+(c+1)*n.dx),y0:u,y1:u,color:C,xVal:A,xLabelVal:A,yVal:b,yLabelVal:b,zLabelVal:z,text:f,hovertemplateLabels:{zLabel:z,colorLabel:T,"color[0]Label":C[0]+_[0],"color[1]Label":C[1]+_[1],"color[2]Label":C[2]+_[2],"color[3]Label":C[3]+_[3]}})]}}}}}),Rk=Ee({"src/traces/image/event_data.js"(J,V){"use strict";V.exports=function(x,E){return"xVal"in E&&(x.x=E.xVal),"yVal"in E&&(x.y=E.yVal),E.xa&&(x.xaxis=E.xa),E.ya&&(x.yaxis=E.ya),x.color=E.color,x.colormodel=E.trace.colormodel,x.z||(x.z=E.color),x}}}),Fk=Ee({"src/traces/image/index.js"(J,V){"use strict";V.exports={attributes:(f2(),ra(C1)).default,supplyDefaults:pE(),calc:Lk(),plot:Pk(),style:Dk(),hoverPoints:Ik(),eventData:Rk(),moduleType:"trace",name:"image",basePlotModule:Mu(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),zk=Ee({"lib/image.js"(J,V){"use strict";V.exports=Fk()}}),Vv=Ee({"src/traces/pie/attributes.js"(J,V){"use strict";var v=ia(),x=kl().attributes,E=Xs(),k=rs(),{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=Cs(),a=vo().extendFlat,r=kc().pattern,n=E({editType:"plot",arrayOk:!0,colorEditType:"plot"});V.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:k.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:r,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:a({},v.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:l({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:t(),texttemplate:e({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:t({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:a({},n,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:a({},n,{}),outsidetextfont:a({},n,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:a({},v.showlegend,{arrayOk:!0}),legend:a({},v.legend,{arrayOk:!0}),legendrank:a({},v.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:a({},n,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:x({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}}),Hv=Ee({"src/traces/pie/defaults.js"(J,V){"use strict";var v=mi(),x=Vr(),E=Vv(),k=kl().defaults,l=fh().handleText,e=Vr().coercePattern;function t(n,o){var s=x.isArrayOrTypedArray(n),c=x.isArrayOrTypedArray(o),m=Math.min(s?n.length:1/0,c?o.length:1/0);if(isFinite(m)||(m=0),m&&c){for(var h,p=0;p0){h=!0;break}}h||(m=0)}return{hasLabels:s,hasValues:c,len:m}}function a(n,o,s,c,m){var h=c("marker.line.width");h&&c("marker.line.color",m?void 0:s.paper_bgcolor);var p=c("marker.colors");e(c,"marker.pattern",p),n.marker&&!o.marker.pattern.fgcolor&&(o.marker.pattern.fgcolor=n.marker.colors),o.marker.pattern.bgcolor||(o.marker.pattern.bgcolor=s.paper_bgcolor)}function r(n,o,s,c){function m(b,z){return x.coerce(n,o,E,b,z)}var h=m("labels"),p=m("values"),g=t(h,p),i=g.len;if(o._hasLabels=g.hasLabels,o._hasValues=g.hasValues,!o._hasLabels&&o._hasValues&&(m("label0"),m("dlabel")),!i){o.visible=!1;return}o._length=i,a(n,o,c,m,!0),m("scalegroup");var w=m("text"),S=m("texttemplate");m("texttemplatefallback");var M;if(S||(M=m("textinfo",x.isArrayOrTypedArray(w)?"text+percent":"percent")),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),S||M&&M!=="none"){var C=m("textposition");l(n,o,c,m,C,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var _=Array.isArray(C)||C==="auto",T=_||C==="outside";T&&m("automargin"),(C==="inside"||C==="auto"||Array.isArray(C))&&m("insidetextorientation")}else M==="none"&&m("textposition","none");k(o,c,m);var f=m("hole"),u=m("title.text");if(u){var A=m("title.position",f?"middle center":"top center");!f&&A==="middle center"&&(o.title.position="top center"),x.coerceFont(m,"title.font",c.font)}m("sort"),m("direction"),m("rotation"),m("pull")}V.exports={handleLabelsAndValues:t,handleMarkerDefaults:a,supplyDefaults:r}}}),G1=Ee({"src/traces/pie/layout_attributes.js"(J,V){"use strict";V.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Bk=Ee({"src/traces/pie/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=G1();V.exports=function(k,l){function e(t,a){return v.coerce(k,l,x,t,a)}e("hiddenlabels"),e("piecolorway",l.colorway),e("extendpiecolors")}}}),e0=Ee({"src/traces/pie/calc.js"(J,V){"use strict";var v=mi(),x=Qa(),E={};function k(a,r){var n=[],o=a._fullLayout,s=o.hiddenlabels||[],c=r.labels,m=r.marker.colors||[],h=r.values,p=r._length,g=r._hasValues&&p,i,w;if(r.dlabel)for(c=new Array(p),i=0;i=0});var b=r.type==="funnelarea"?_:r.sort;return b&&n.sort(function(z,I){return I.v-z.v}),n[0]&&(n[0].vTotal=C),n}function l(a){return function(n,o){if(!n||!x.isValid(n))return!1;let s=x.rgbaString(n);return a[o]||(a[o]=s),s}}function e(a,r){var n=(r||{}).type;n||(n="pie");var o=a._fullLayout,s=a.calcdata,c=o[n+"colorway"],m=o["_"+n+"colormap"];o["extend"+n+"colors"]&&(c=t(c,E));for(var h=0,p=0;p0&&(Fe+=mt*se.pxmid[0],We+=mt*se.pxmid[1])}se.cxFinal=Fe,se.cyFinal=We;function Tt(Ot,vt,ht,Re){var Be=Re*(vt[0]-Ot[0]),He=Re*(vt[1]-Ot[1]);return"a"+Re*fe.r+","+Re*fe.r+" 0 "+se.largeArc+(ht?" 1 ":" 0 ")+Be+","+He}var At=ye.hole;if(se.v===fe.vTotal){var Kt="M"+(Fe+se.px0[0])+","+(We+se.px0[1])+Tt(se.px0,se.pxmid,!0,1)+Tt(se.pxmid,se.px0,!0,1)+"Z";At?gt.attr("d","M"+(Fe+At*se.px0[0])+","+(We+At*se.px0[1])+Tt(se.px0,se.pxmid,!1,At)+Tt(se.pxmid,se.px0,!1,At)+"Z"+Kt):gt.attr("d",Kt)}else{var nr=Tt(se.px0,se.px1,!0,1);if(At){var _r=1-At;gt.attr("d","M"+(Fe+At*se.px1[0])+","+(We+At*se.px1[1])+Tt(se.px1,se.px0,!1,At)+"l"+_r*se.px0[0]+","+_r*se.px0[1]+nr+"Z")}else gt.attr("d","M"+Fe+","+We+"l"+se.px0[0]+","+se.px0[1]+nr+"Z")}oe(X,se,fe);var Zt=m.castOption(ye.textposition,se.pts),sr=Ge.selectAll("g.slicetext").data(se.text&&Zt!=="none"?[0]:[]);sr.enter().append("g").classed("slicetext",!0),sr.exit().remove(),sr.each(function(){var Ot=e.ensureSingle(v.select(this),"text","",function(Je){Je.attr("data-notex",1)}),vt=e.ensureUniformFontSize(X,Zt==="outside"?S(ye,se,Y.font):M(ye,se,Y.font));Ot.text(se.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,vt).call(r.convertToTspans,X);var ht=l.bBox(Ot.node()),Re;if(Zt==="outside")Re=N(ht,se);else if(Re=_(ht,se,fe),Zt==="auto"&&Re.scale<1){var Be=e.ensureUniformFontSize(X,ye.outsidetextfont);Ot.call(l.font,Be),ht=l.bBox(Ot.node()),Re=N(ht,se)}var He=Re.textPosAngle,$e=He===void 0?se.pxmid:ae(fe.r,He);if(Re.targetX=Fe+$e[0]*Re.rCenter+(Re.x||0),Re.targetY=We+$e[1]*Re.rCenter+(Re.y||0),H(Re,ht),Re.outside){var Ze=Re.targetY;se.yLabelMin=Ze-ht.height/2,se.yLabelMid=Ze,se.yLabelMax=Ze+ht.height/2,se.labelExtraX=0,se.labelExtraY=0,Me=!0}Re.fontSize=vt.size,o(ye.type,Re,Y),ee[Te].transform=Re,e.setTransormAndDisplay(Ot,Re)})});var Ie=v.select(this).selectAll("g.titletext").data(ye.title.text?[0]:[]);if(Ie.enter().append("g").classed("titletext",!0),Ie.exit().remove(),Ie.each(function(){var se=e.ensureSingle(v.select(this),"text","",function(We){We.attr("data-notex",1)}),Te=ye.title.text;ye._meta&&(Te=e.templateString(Te,ye._meta)),se.text(Te).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,ye.title.font).call(r.convertToTspans,X);var Fe;ye.title.position==="middle center"?Fe=R(fe):Fe=B(fe,q),se.attr("transform",a(Fe.x,Fe.y)+t(Math.min(1,Fe.scale))+a(Fe.tx,Fe.ty))}),Me&&U(Ae,ye),i(xe,ye),Me&&ye.automargin){var Ue=l.bBox(ne.node()),qe=ye.domain,ke=q.w*(qe.x[1]-qe.x[0]),ge=q.h*(qe.y[1]-qe.y[0]),ue=(.5*ke-fe.r)/q.w,ve=(.5*ge-fe.r)/q.h;x.autoMargin(X,"pie."+ye.uid+".automargin",{xl:qe.x[0]-ue,xr:qe.x[1]+ue,yb:qe.y[0]-ve,yt:qe.y[1]+ve,l:Math.max(fe.cx-fe.r-Ue.left,0),r:Math.max(Ue.right-(fe.cx+fe.r),0),b:Math.max(Ue.bottom-(fe.cy+fe.r),0),t:Math.max(fe.cy-fe.r-Ue.top,0),pad:5})}})});setTimeout(function(){$.selectAll("tspan").each(function(){var ee=v.select(this);ee.attr("dy")&&ee.attr("dy",ee.attr("dy"))})},0)}function i(X,K){X.each(function(G){var Y=v.select(this);if(!G.labelExtraX&&!G.labelExtraY){Y.select("path.textline").remove();return}var q=Y.select("g.slicetext text");G.transform.targetX+=G.labelExtraX,G.transform.targetY+=G.labelExtraY,e.setTransormAndDisplay(q,G.transform);var $=G.cxFinal+G.pxmid[0],ee=G.cyFinal+G.pxmid[1],ne="M"+$+","+ee,fe=(G.yLabelMax-G.yLabelMin)*(G.pxmid[0]<0?-1:1)/4;if(G.labelExtraX){var ye=G.labelExtraX*G.pxmid[1]/G.pxmid[0],xe=G.yLabelMid+G.labelExtraY-(G.cyFinal+G.pxmid[1]);Math.abs(ye)>Math.abs(xe)?ne+="l"+xe*G.pxmid[0]/G.pxmid[1]+","+xe+"H"+($+G.labelExtraX+fe):ne+="l"+G.labelExtraX+","+ye+"v"+(xe-ye)+"h"+fe}else ne+="V"+(G.yLabelMid+G.labelExtraY)+"h"+fe;e.ensureSingle(Y,"path","textline").call(k.stroke,K.outsidetextfont.color).attr({"stroke-width":Math.min(2,K.outsidetextfont.size/8),d:ne,fill:"none"})})}function w(X,K,G){var Y=G[0],q=Y.cx,$=Y.cy,ee=Y.trace,ne=ee.type==="funnelarea";"_hasHoverLabel"in ee||(ee._hasHoverLabel=!1),"_hasHoverEvent"in ee||(ee._hasHoverEvent=!1),X.on("mouseover",function(fe){var ye=K._fullLayout,xe=K._fullData[ee.index];if(!(K._dragging||ye.hovermode===!1)){var Ae=xe.hoverinfo;if(Array.isArray(Ae)&&(Ae=E.castHoverinfo({hoverinfo:[m.castOption(Ae,fe.pts)],_module:ee._module},ye,0)),Ae==="all"&&(Ae="label+text+value+percent+name"),xe.hovertemplate||Ae!=="none"&&Ae!=="skip"&&Ae){var Me=fe.rInscribed||0,Ie=q+fe.pxmid[0]*(1-Me),Ue=$+fe.pxmid[1]*(1-Me),qe=ye.separators,ke=[];if(Ae&&Ae.indexOf("label")!==-1&&ke.push(fe.label),fe.text=m.castOption(xe.hovertext||xe.text,fe.pts),Ae&&Ae.indexOf("text")!==-1){var ge=fe.text;e.isValidTextValue(ge)&&ke.push(ge)}fe.value=fe.v,fe.valueLabel=m.formatPieValue(fe.v,qe),Ae&&Ae.indexOf("value")!==-1&&ke.push(fe.valueLabel),fe.percent=fe.v/Y.vTotal,fe.percentLabel=m.formatPiePercent(fe.percent,qe),Ae&&Ae.indexOf("percent")!==-1&&ke.push(fe.percentLabel);var ue=xe.hoverlabel,ve=ue.font,se=[];E.loneHover({trace:ee,x0:Ie-Me*Y.r,x1:Ie+Me*Y.r,y:Ue,_x0:ne?q+fe.TL[0]:Ie-Me*Y.r,_x1:ne?q+fe.TR[0]:Ie+Me*Y.r,_y0:ne?$+fe.TL[1]:Ue-Me*Y.r,_y1:ne?$+fe.BL[1]:Ue+Me*Y.r,text:ke.join("
"),name:xe.hovertemplate||Ae.indexOf("name")!==-1?xe.name:void 0,idealAlign:fe.pxmid[0]<0?"left":"right",color:m.castOption(ue.bgcolor,fe.pts)||fe.color,borderColor:m.castOption(ue.bordercolor,fe.pts),fontFamily:m.castOption(ve.family,fe.pts),fontSize:m.castOption(ve.size,fe.pts),fontColor:m.castOption(ve.color,fe.pts),nameLength:m.castOption(ue.namelength,fe.pts),textAlign:m.castOption(ue.align,fe.pts),hovertemplate:m.castOption(xe.hovertemplate,fe.pts),hovertemplateLabels:fe,eventData:[h(fe,xe)]},{container:ye._hoverlayer.node(),outerContainer:ye._paper.node(),gd:K,inOut_bbox:se}),fe.bbox=se[0],ee._hasHoverLabel=!0}ee._hasHoverEvent=!0,K.emit("plotly_hover",{points:[h(fe,xe)],event:v.event})}}),X.on("mouseout",function(fe){var ye=K._fullLayout,xe=K._fullData[ee.index],Ae=v.select(this).datum();ee._hasHoverEvent&&(fe.originalEvent=v.event,K.emit("plotly_unhover",{points:[h(Ae,xe)],event:v.event}),ee._hasHoverEvent=!1),ee._hasHoverLabel&&(E.loneUnhover(ye._hoverlayer.node()),ee._hasHoverLabel=!1)}),X.on("click",function(fe){var ye=K._fullLayout,xe=K._fullData[ee.index];K._dragging||ye.hovermode===!1||(K._hoverdata=[h(fe,xe)],E.click(K,v.event))})}function S(X,K,G){var Y=m.castOption(X.outsidetextfont.color,K.pts)||m.castOption(X.textfont.color,K.pts)||G.color,q=m.castOption(X.outsidetextfont.family,K.pts)||m.castOption(X.textfont.family,K.pts)||G.family,$=m.castOption(X.outsidetextfont.size,K.pts)||m.castOption(X.textfont.size,K.pts)||G.size,ee=m.castOption(X.outsidetextfont.weight,K.pts)||m.castOption(X.textfont.weight,K.pts)||G.weight,ne=m.castOption(X.outsidetextfont.style,K.pts)||m.castOption(X.textfont.style,K.pts)||G.style,fe=m.castOption(X.outsidetextfont.variant,K.pts)||m.castOption(X.textfont.variant,K.pts)||G.variant,ye=m.castOption(X.outsidetextfont.textcase,K.pts)||m.castOption(X.textfont.textcase,K.pts)||G.textcase,xe=m.castOption(X.outsidetextfont.lineposition,K.pts)||m.castOption(X.textfont.lineposition,K.pts)||G.lineposition,Ae=m.castOption(X.outsidetextfont.shadow,K.pts)||m.castOption(X.textfont.shadow,K.pts)||G.shadow;return{color:Y,family:q,size:$,weight:ee,style:ne,variant:fe,textcase:ye,lineposition:xe,shadow:Ae}}function M(X,K,G){var Y=m.castOption(X.insidetextfont.color,K.pts);!Y&&X._input.textfont&&(Y=m.castOption(X._input.textfont.color,K.pts));var q=m.castOption(X.insidetextfont.family,K.pts)||m.castOption(X.textfont.family,K.pts)||G.family,$=m.castOption(X.insidetextfont.size,K.pts)||m.castOption(X.textfont.size,K.pts)||G.size,ee=m.castOption(X.insidetextfont.weight,K.pts)||m.castOption(X.textfont.weight,K.pts)||G.weight,ne=m.castOption(X.insidetextfont.style,K.pts)||m.castOption(X.textfont.style,K.pts)||G.style,fe=m.castOption(X.insidetextfont.variant,K.pts)||m.castOption(X.textfont.variant,K.pts)||G.variant,ye=m.castOption(X.insidetextfont.textcase,K.pts)||m.castOption(X.textfont.textcase,K.pts)||G.textcase,xe=m.castOption(X.insidetextfont.lineposition,K.pts)||m.castOption(X.textfont.lineposition,K.pts)||G.lineposition,Ae=m.castOption(X.insidetextfont.shadow,K.pts)||m.castOption(X.textfont.shadow,K.pts)||G.shadow;return{color:Y||k.contrast(K.color),family:q,size:$,weight:ee,style:ne,variant:fe,textcase:ye,lineposition:xe,shadow:Ae}}function C(X,K){for(var G,Y,q=0;q=-4;ue-=2)ge(Math.PI*ue,"tan");for(ue=4;ue>=-4;ue-=2)ge(Math.PI*(ue+1),"tan")}if(Ae||Ie){for(ue=4;ue>=-4;ue-=2)ge(Math.PI*(ue+1.5),"rad");for(ue=4;ue>=-4;ue-=2)ge(Math.PI*(ue+.5),"rad")}}if(ne||Ue||Ae){var ve=Math.sqrt(X.width*X.width+X.height*X.height);if(ke={scale:q*Y*2/ve,rCenter:1-q,rotate:0},ke.textPosAngle=(K.startangle+K.stopangle)/2,ke.scale>=1)return ke;qe.push(ke)}(Ue||Ie)&&(ke=f(X,Y,ee,fe,ye),ke.textPosAngle=(K.startangle+K.stopangle)/2,qe.push(ke)),(Ue||Me)&&(ke=u(X,Y,ee,fe,ye),ke.textPosAngle=(K.startangle+K.stopangle)/2,qe.push(ke));for(var se=0,Te=0,Fe=0;Fe=1)break}return qe[se]}function T(X,K){var G=X.startangle,Y=X.stopangle;return G>K&&K>Y||G0?1:-1)/2,y:$/(1+G*G/(Y*Y)),outside:!0}}function R(X){var K=Math.sqrt(X.titleBox.width*X.titleBox.width+X.titleBox.height*X.titleBox.height);return{x:X.cx,y:X.cy,scale:X.trace.hole*X.r*2/K,tx:0,ty:-X.titleBox.height/2+X.trace.title.font.size}}function B(X,K){var G=1,Y=1,q,$=X.trace,ee={x:X.cx,y:X.cy},ne={tx:0,ty:0};ne.ty+=$.title.font.size,q=j($),$.title.position.indexOf("top")!==-1?(ee.y-=(1+q)*X.r,ne.ty-=X.titleBox.height):$.title.position.indexOf("bottom")!==-1&&(ee.y+=(1+q)*X.r);var fe=F(X.r,X.trace.aspectratio),ye=K.w*($.domain.x[1]-$.domain.x[0])/2;return $.title.position.indexOf("left")!==-1?(ye=ye+fe,ee.x-=(1+q)*fe,ne.tx+=X.titleBox.width/2):$.title.position.indexOf("center")!==-1?ye*=2:$.title.position.indexOf("right")!==-1&&(ye=ye+fe,ee.x+=(1+q)*fe,ne.tx-=X.titleBox.width/2),G=ye/X.titleBox.width,Y=P(X,K)/X.titleBox.height,{x:ee.x,y:ee.y,scale:Math.min(G,Y),tx:ne.tx,ty:ne.ty}}function F(X,K){return X/(K===void 0?1:K)}function P(X,K){var G=X.trace,Y=K.h*(G.domain.y[1]-G.domain.y[0]);return Math.min(X.titleBox.height,Y/2)}function j(X){var K=X.pull;if(!K)return 0;var G;if(e.isArrayOrTypedArray(K))for(K=0,G=0;GK&&(K=X.pull[G]);return K}function U(X,K){var G,Y,q,$,ee,ne,fe,ye,xe,Ae,Me,Ie,Ue;function qe(ve,se){return ve.pxmid[1]-se.pxmid[1]}function ke(ve,se){return se.pxmid[1]-ve.pxmid[1]}function ge(ve,se){se||(se={});var Te=se.labelExtraY+(Y?se.yLabelMax:se.yLabelMin),Fe=Y?ve.yLabelMin:ve.yLabelMax,We=Y?ve.yLabelMax:ve.yLabelMin,Ge=ve.cyFinal+ee(ve.px0[1],ve.px1[1]),gt=Te-Fe,mt,Tt,At,Kt,nr,_r;if(gt*fe>0&&(ve.labelExtraY=gt),!!e.isArrayOrTypedArray(K.pull))for(Tt=0;Tt=(m.castOption(K.pull,At.pts)||0))&&((ve.pxmid[1]-At.pxmid[1])*fe>0?(Kt=At.cyFinal+ee(At.px0[1],At.px1[1]),gt=Kt-Fe-ve.labelExtraY,gt*fe>0&&(ve.labelExtraY+=gt)):(We+ve.labelExtraY-Ge)*fe>0&&(mt=3*ne*Math.abs(Tt-Ae.indexOf(ve)),nr=At.cxFinal+$(At.px0[0],At.px1[0]),_r=nr+mt-(ve.cxFinal+ve.pxmid[0])-ve.labelExtraX,_r*ne>0&&(ve.labelExtraX+=_r)))}for(Y=0;Y<2;Y++)for(q=Y?qe:ke,ee=Y?Math.max:Math.min,fe=Y?1:-1,G=0;G<2;G++){for($=G?Math.max:Math.min,ne=G?1:-1,ye=X[Y][G],ye.sort(q),xe=X[1-Y][G],Ae=xe.concat(ye),Ie=[],Me=0;Me1?(ye=G.r,xe=ye/q.aspectratio):(xe=G.r,ye=xe*q.aspectratio),ye*=(1+q.baseratio)/2,fe=ye*xe}ee=Math.min(ee,fe/G.vTotal)}for(Y=0;YK.vTotal/2?1:0,ye.halfangle=Math.PI*Math.min(ye.v/K.vTotal,.5),ye.ring=1-Y.hole,ye.rInscribed=I(ye,K))}function ae(X,K){return[X*Math.sin(K),-X*Math.cos(K)]}function oe(X,K,G){var Y=X._fullLayout,q=G.trace,$=q.texttemplate,ee=q.textinfo;if(!$&&ee&&ee!=="none"){var ne=ee.split("+"),fe=function(se){return ne.indexOf(se)!==-1},ye=fe("label"),xe=fe("text"),Ae=fe("value"),Me=fe("percent"),Ie=Y.separators,Ue;if(Ue=ye?[K.label]:[],xe){var qe=m.getFirstFilled(q.text,K.pts);p(qe)&&Ue.push(qe)}Ae&&Ue.push(m.formatPieValue(K.v,Ie)),Me&&Ue.push(m.formatPiePercent(K.v/G.vTotal,Ie)),K.text=Ue.join("
")}function ke(se){return{label:se.label,value:se.v,valueLabel:m.formatPieValue(se.v,Y.separators),percent:se.v/G.vTotal,percentLabel:m.formatPiePercent(se.v/G.vTotal,Y.separators),color:se.color,text:se.text,customdata:e.castOption(q,se.i,"customdata")}}if($){var ge=e.castOption(q,K.i,"texttemplate");if(!ge)K.text="";else{var ue=ke(K),ve=m.getFirstFilled(q.text,K.pts);(p(ve)||ve==="")&&(ue.text=ve),K.text=e.texttemplateString({data:[ue,q._meta],fallback:q.texttemplatefallback,labels:ue,locale:X._fullLayout._d3locale,template:ge})}}}function H(X,K){var G=X.rotate*Math.PI/180,Y=Math.cos(G),q=Math.sin(G),$=(K.left+K.right)/2,ee=(K.top+K.bottom)/2;X.textX=$*Y-ee*q,X.textY=$*q+ee*Y,X.noCenter=!0}V.exports={plot:g,formatSliceLabel:oe,transformInsideText:_,determineInsideTextFont:M,positionTitleOutside:B,prerenderTitles:C,layoutAreas:Z,attachFxHandlers:w,computeTransform:H}}}),Ok=Ee({"src/traces/pie/style.js"(J,V){"use strict";var v=Hn(),x=jp(),E=Ef().resizeText;V.exports=function(l){var e=l._fullLayout._pielayer.selectAll(".trace");E(l,e,"pie"),e.each(function(t){var a=t[0],r=a.trace,n=v.select(this);n.style({opacity:r.opacity}),n.selectAll("path.surface").each(function(o){v.select(this).call(x,o,r,l)})})}}}),jk=Ee({"src/traces/pie/base_plot.js"(J){"use strict";var V=vl();J.name="pie",J.plot=function(v,x,E,k){V.plotBasePlot(J.name,v,x,E,k)},J.clean=function(v,x,E,k){V.cleanBasePlot(J.name,v,x,E,k)}}}),Uk=Ee({"src/traces/pie/index.js"(J,V){"use strict";V.exports={attributes:Vv(),supplyDefaults:Hv().supplyDefaults,supplyLayoutDefaults:Bk(),layoutAttributes:G1(),calc:e0().calc,crossTraceCalc:e0().crossTraceCalc,plot:W1().plot,style:Ok(),styleOne:jp(),moduleType:"trace",name:"pie",basePlotModule:jk(),categories:["pie-like","pie","showLegend"],meta:{}}}}),qk=Ee({"lib/pie.js"(J,V){"use strict";V.exports=Uk()}}),Vk=Ee({"src/traces/sunburst/base_plot.js"(J){"use strict";var V=vl();J.name="sunburst",J.plot=function(v,x,E,k){V.plotBasePlot(J.name,v,x,E,k)},J.clean=function(v,x,E,k){V.cleanBasePlot(J.name,v,x,E,k)}}}),z2=Ee({"src/traces/sunburst/constants.js"(J,V){"use strict";V.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),fm=Ee({"src/traces/sunburst/attributes.js"(J,V){"use strict";var v=ia(),{hovertemplateAttrs:x,texttemplateAttrs:E,templatefallbackAttrs:k}=Cs(),l=$s(),e=kl().attributes,t=Vv(),a=z2(),r=vo().extendFlat,n=kc().pattern;V.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:r({colors:{valType:"data_array",editType:"calc"},line:{color:r({},t.marker.line.color,{dflt:null}),width:r({},t.marker.line.width,{dflt:1}),editType:"calc"},pattern:n,editType:"calc"},l("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:t.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:E({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:k({editType:"plot"}),hovertext:t.hovertext,hoverinfo:r({},v.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:x({},{keys:a.eventDataKeys}),hovertemplatefallback:k(),textfont:t.textfont,insidetextorientation:t.insidetextorientation,insidetextfont:t.insidetextfont,outsidetextfont:r({},t.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:t.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}}}),B2=Ee({"src/traces/sunburst/layout_attributes.js"(J,V){"use strict";V.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Hk=Ee({"src/traces/sunburst/defaults.js"(J,V){"use strict";var v=Vr(),x=fm(),E=kl().defaults,k=fh().handleText,l=Hv().handleMarkerDefaults,e=pl(),t=e.hasColorscale,a=e.handleDefaults;V.exports=function(n,o,s,c){function m(M,C){return v.coerce(n,o,x,M,C)}var h=m("labels"),p=m("parents");if(!h||!h.length||!p||!p.length){o.visible=!1;return}var g=m("values");g&&g.length?m("branchvalues"):m("count"),m("level"),m("maxdepth"),l(n,o,c,m);var i=o._hasColorscale=t(n,"marker","colors")||(n.marker||{}).coloraxis;i&&a(n,o,c,m,{prefix:"marker.",cLetter:"c"}),m("leaf.opacity",i?1:.7);var w=m("text");m("texttemplate"),m("texttemplatefallback"),o.texttemplate||m("textinfo",v.isArrayOrTypedArray(w)?"text+label":"label"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback");var S="auto";k(n,o,c,m,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),m("insidetextorientation"),m("sort"),m("rotation"),m("root.color"),E(o,c,m),o._length=null}}}),Gk=Ee({"src/traces/sunburst/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=B2();V.exports=function(k,l){function e(t,a){return v.coerce(k,l,x,t,a)}e("sunburstcolorway",l.colorway),e("extendsunburstcolors")}}}),hm=Ee({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(J,V){(function(v,x){typeof J=="object"&&typeof V<"u"?x(J):(v=v||self,x(v.d3=v.d3||{}))})(J,function(v){"use strict";function x(Re,Be){return Re.parent===Be.parent?1:2}function E(Re){return Re.reduce(k,0)/Re.length}function k(Re,Be){return Re+Be.x}function l(Re){return 1+Re.reduce(e,0)}function e(Re,Be){return Math.max(Re,Be.y)}function t(Re){for(var Be;Be=Re.children;)Re=Be[0];return Re}function a(Re){for(var Be;Be=Re.children;)Re=Be[Be.length-1];return Re}function r(){var Re=x,Be=1,He=1,$e=!1;function Ze(Je){var Mt,dt=0;Je.eachAfter(function(Wt){var Sr=Wt.children;Sr?(Wt.x=E(Sr),Wt.y=l(Sr)):(Wt.x=Mt?dt+=Re(Wt,Mt):0,Wt.y=0,Mt=Wt)});var Dt=t(Je),Ct=a(Je),Vt=Dt.x-Re(Dt,Ct)/2,Ht=Ct.x+Re(Ct,Dt)/2;return Je.eachAfter($e?function(Wt){Wt.x=(Wt.x-Je.x)*Be,Wt.y=(Je.y-Wt.y)*He}:function(Wt){Wt.x=(Wt.x-Vt)/(Ht-Vt)*Be,Wt.y=(1-(Je.y?Wt.y/Je.y:1))*He})}return Ze.separation=function(Je){return arguments.length?(Re=Je,Ze):Re},Ze.size=function(Je){return arguments.length?($e=!1,Be=+Je[0],He=+Je[1],Ze):$e?null:[Be,He]},Ze.nodeSize=function(Je){return arguments.length?($e=!0,Be=+Je[0],He=+Je[1],Ze):$e?[Be,He]:null},Ze}function n(Re){var Be=0,He=Re.children,$e=He&&He.length;if(!$e)Be=1;else for(;--$e>=0;)Be+=He[$e].value;Re.value=Be}function o(){return this.eachAfter(n)}function s(Re){var Be=this,He,$e=[Be],Ze,Je,Mt;do for(He=$e.reverse(),$e=[];Be=He.pop();)if(Re(Be),Ze=Be.children,Ze)for(Je=0,Mt=Ze.length;Je=0;--Ze)He.push($e[Ze]);return this}function m(Re){for(var Be=this,He=[Be],$e=[],Ze,Je,Mt;Be=He.pop();)if($e.push(Be),Ze=Be.children,Ze)for(Je=0,Mt=Ze.length;Je=0;)He+=$e[Ze].value;Be.value=He})}function p(Re){return this.eachBefore(function(Be){Be.children&&Be.children.sort(Re)})}function g(Re){for(var Be=this,He=i(Be,Re),$e=[Be];Be!==He;)Be=Be.parent,$e.push(Be);for(var Ze=$e.length;Re!==He;)$e.splice(Ze,0,Re),Re=Re.parent;return $e}function i(Re,Be){if(Re===Be)return Re;var He=Re.ancestors(),$e=Be.ancestors(),Ze=null;for(Re=He.pop(),Be=$e.pop();Re===Be;)Ze=Re,Re=He.pop(),Be=$e.pop();return Ze}function w(){for(var Re=this,Be=[Re];Re=Re.parent;)Be.push(Re);return Be}function S(){var Re=[];return this.each(function(Be){Re.push(Be)}),Re}function M(){var Re=[];return this.eachBefore(function(Be){Be.children||Re.push(Be)}),Re}function C(){var Re=this,Be=[];return Re.each(function(He){He!==Re&&Be.push({source:He.parent,target:He})}),Be}function _(Re,Be){var He=new b(Re),$e=+Re.value&&(He.value=Re.value),Ze,Je=[He],Mt,dt,Dt,Ct;for(Be==null&&(Be=f);Ze=Je.pop();)if($e&&(Ze.value=+Ze.data.value),(dt=Be(Ze.data))&&(Ct=dt.length))for(Ze.children=new Array(Ct),Dt=Ct-1;Dt>=0;--Dt)Je.push(Mt=Ze.children[Dt]=new b(dt[Dt])),Mt.parent=Ze,Mt.depth=Ze.depth+1;return He.eachBefore(A)}function T(){return _(this).eachBefore(u)}function f(Re){return Re.children}function u(Re){Re.data=Re.data.data}function A(Re){var Be=0;do Re.height=Be;while((Re=Re.parent)&&Re.height<++Be)}function b(Re){this.data=Re,this.depth=this.height=0,this.parent=null}b.prototype=_.prototype={constructor:b,count:o,each:s,eachAfter:m,eachBefore:c,sum:h,sort:p,path:g,ancestors:w,descendants:S,leaves:M,links:C,copy:T};var z=Array.prototype.slice;function I(Re){for(var Be=Re.length,He,$e;Be;)$e=Math.random()*Be--|0,He=Re[Be],Re[Be]=Re[$e],Re[$e]=He;return Re}function N(Re){for(var Be=0,He=(Re=I(z.call(Re))).length,$e=[],Ze,Je;Be0&&He*He>$e*$e+Ze*Ze}function P(Re,Be){for(var He=0;HeDt?(Ze=(Ct+Dt-Je)/(2*Ct),dt=Math.sqrt(Math.max(0,Dt/Ct-Ze*Ze)),He.x=Re.x-Ze*$e-dt*Mt,He.y=Re.y-Ze*Mt+dt*$e):(Ze=(Ct+Je-Dt)/(2*Ct),dt=Math.sqrt(Math.max(0,Je/Ct-Ze*Ze)),He.x=Be.x+Ze*$e-dt*Mt,He.y=Be.y+Ze*Mt+dt*$e)):(He.x=Be.x+He.r,He.y=Be.y)}function ae(Re,Be){var He=Re.r+Be.r-1e-6,$e=Be.x-Re.x,Ze=Be.y-Re.y;return He>0&&He*He>$e*$e+Ze*Ze}function oe(Re){var Be=Re._,He=Re.next._,$e=Be.r+He.r,Ze=(Be.x*He.r+He.x*Be.r)/$e,Je=(Be.y*He.r+He.y*Be.r)/$e;return Ze*Ze+Je*Je}function H(Re){this._=Re,this.next=null,this.previous=null}function X(Re){if(!(Ze=Re.length))return 0;var Be,He,$e,Ze,Je,Mt,dt,Dt,Ct,Vt,Ht;if(Be=Re[0],Be.x=0,Be.y=0,!(Ze>1))return Be.r;if(He=Re[1],Be.x=-He.r,He.x=Be.r,He.y=0,!(Ze>2))return Be.r+He.r;re(He,Be,$e=Re[2]),Be=new H(Be),He=new H(He),$e=new H($e),Be.next=$e.previous=He,He.next=Be.previous=$e,$e.next=He.previous=Be;e:for(dt=3;dt0)throw new Error("cycle");return dt}return He.id=function($e){return arguments.length?(Re=Y($e),He):Re},He.parentId=function($e){return arguments.length?(Be=Y($e),He):Be},He}function se(Re,Be){return Re.parent===Be.parent?1:2}function Te(Re){var Be=Re.children;return Be?Be[0]:Re.t}function Fe(Re){var Be=Re.children;return Be?Be[Be.length-1]:Re.t}function We(Re,Be,He){var $e=He/(Be.i-Re.i);Be.c-=$e,Be.s+=He,Re.c+=$e,Be.z+=He,Be.m+=He}function Ge(Re){for(var Be=0,He=0,$e=Re.children,Ze=$e.length,Je;--Ze>=0;)Je=$e[Ze],Je.z+=Be,Je.m+=Be,Be+=Je.s+(He+=Je.c)}function gt(Re,Be,He){return Re.a.parent===Be.parent?Re.a:He}function mt(Re,Be){this._=Re,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}mt.prototype=Object.create(b.prototype);function Tt(Re){for(var Be=new mt(Re,0),He,$e=[Be],Ze,Je,Mt,dt;He=$e.pop();)if(Je=He._.children)for(He.children=new Array(dt=Je.length),Mt=dt-1;Mt>=0;--Mt)$e.push(Ze=He.children[Mt]=new mt(Je[Mt],Mt)),Ze.parent=He;return(Be.parent=new mt(null,0)).children=[Be],Be}function At(){var Re=se,Be=1,He=1,$e=null;function Ze(Ct){var Vt=Tt(Ct);if(Vt.eachAfter(Je),Vt.parent.m=-Vt.z,Vt.eachBefore(Mt),$e)Ct.eachBefore(Dt);else{var Ht=Ct,Wt=Ct,Sr=Ct;Ct.eachBefore(function(cr){cr.xWt.x&&(Wt=cr),cr.depth>Sr.depth&&(Sr=cr)});var on=Ht===Wt?1:Re(Ht,Wt)/2,$t=on-Ht.x,It=Be/(Wt.x+on+$t),ir=He/(Sr.depth||1);Ct.eachBefore(function(cr){cr.x=(cr.x+$t)*It,cr.y=cr.depth*ir})}return Ct}function Je(Ct){var Vt=Ct.children,Ht=Ct.parent.children,Wt=Ct.i?Ht[Ct.i-1]:null;if(Vt){Ge(Ct);var Sr=(Vt[0].z+Vt[Vt.length-1].z)/2;Wt?(Ct.z=Wt.z+Re(Ct._,Wt._),Ct.m=Ct.z-Sr):Ct.z=Sr}else Wt&&(Ct.z=Wt.z+Re(Ct._,Wt._));Ct.parent.A=dt(Ct,Wt,Ct.parent.A||Ht[0])}function Mt(Ct){Ct._.x=Ct.z+Ct.parent.m,Ct.m+=Ct.parent.m}function dt(Ct,Vt,Ht){if(Vt){for(var Wt=Ct,Sr=Ct,on=Vt,$t=Wt.parent.children[0],It=Wt.m,ir=Sr.m,cr=on.m,fr=$t.m,Ir;on=Fe(on),Wt=Te(Wt),on&&Wt;)$t=Te($t),Sr=Fe(Sr),Sr.a=Ct,Ir=on.z+cr-Wt.z-It+Re(on._,Wt._),Ir>0&&(We(gt(on,Ct,Ht),Ct,Ir),It+=Ir,ir+=Ir),cr+=on.m,It+=Wt.m,fr+=$t.m,ir+=Sr.m;on&&!Fe(Sr)&&(Sr.t=on,Sr.m+=cr-ir),Wt&&!Te($t)&&($t.t=Wt,$t.m+=It-fr,Ht=Ct)}return Ht}function Dt(Ct){Ct.x*=Be,Ct.y=Ct.depth*He}return Ze.separation=function(Ct){return arguments.length?(Re=Ct,Ze):Re},Ze.size=function(Ct){return arguments.length?($e=!1,Be=+Ct[0],He=+Ct[1],Ze):$e?null:[Be,He]},Ze.nodeSize=function(Ct){return arguments.length?($e=!0,Be=+Ct[0],He=+Ct[1],Ze):$e?[Be,He]:null},Ze}function Kt(Re,Be,He,$e,Ze){for(var Je=Re.children,Mt,dt=-1,Dt=Je.length,Ct=Re.value&&(Ze-He)/Re.value;++dtcr&&(cr=Ct),nn=It*It*ln,fr=Math.max(cr/nn,nn/ir),fr>Ir){It-=Ct;break}Ir=fr}Mt.push(Dt={value:It,dice:Sr1?$e:1)},He}(nr);function sr(){var Re=Zt,Be=!1,He=1,$e=1,Ze=[0],Je=q,Mt=q,dt=q,Dt=q,Ct=q;function Vt(Wt){return Wt.x0=Wt.y0=0,Wt.x1=He,Wt.y1=$e,Wt.eachBefore(Ht),Ze=[0],Be&&Wt.eachBefore(Ae),Wt}function Ht(Wt){var Sr=Ze[Wt.depth],on=Wt.x0+Sr,$t=Wt.y0+Sr,It=Wt.x1-Sr,ir=Wt.y1-Sr;It=Wt-1){var cr=Je[Ht];cr.x0=on,cr.y0=$t,cr.x1=It,cr.y1=ir;return}for(var fr=Ct[Ht],Ir=Sr/2+fr,ln=Ht+1,nn=Wt-1;ln>>1;Ct[wn]ir-$t){var Aa=(on*jn+It*Un)/Sr;Vt(Ht,ln,Un,on,$t,Aa,ir),Vt(ln,Wt,jn,Aa,$t,It,ir)}else{var ua=($t*jn+ir*Un)/Sr;Vt(Ht,ln,Un,on,$t,It,ua),Vt(ln,Wt,jn,on,ua,It,ir)}}}function vt(Re,Be,He,$e,Ze){(Re.depth&1?Kt:Me)(Re,Be,He,$e,Ze)}var ht=function Re(Be){function He($e,Ze,Je,Mt,dt){if((Dt=$e._squarify)&&Dt.ratio===Be)for(var Dt,Ct,Vt,Ht,Wt=-1,Sr,on=Dt.length,$t=$e.value;++Wt1?$e:1)},He}(nr);v.cluster=r,v.hierarchy=_,v.pack=ne,v.packEnclose=N,v.packSiblings=K,v.partition=Ie,v.stratify=ve,v.tree=At,v.treemap=sr,v.treemapBinary=Ot,v.treemapDice=Me,v.treemapResquarify=ht,v.treemapSlice=Kt,v.treemapSliceDice=vt,v.treemapSquarify=Zt,Object.defineProperty(v,"__esModule",{value:!0})})}}),dm=Ee({"src/traces/sunburst/calc.js"(J){"use strict";var V=hm(),v=mi(),x=Vr(),E=pl().makeColorScaleFuncFromTrace,k=e0().makePullColorFn,l=e0().generateExtendedColors,e=pl().calc,t=Qi().ALMOST_EQUAL,a={},r={},n={};J.calc=function(s,c){var m=s._fullLayout,h=c.ids,p=x.isArrayOrTypedArray(h),g=c.labels,i=c.parents,w=c.values,S=x.isArrayOrTypedArray(w),M=[],C={},_={},T=function(K,G){C[K]?C[K].push(G):C[K]=[G],_[G]=1},f=function(K){return K||typeof K=="number"},u=function(K){return!S||v(w[K])&&w[K]>=0},A,b,z;p?(A=Math.min(h.length,i.length),b=function(K){return f(h[K])&&u(K)},z=function(K){return String(h[K])}):(A=Math.min(g.length,i.length),b=function(K){return f(g[K])&&u(K)},z=function(K){return String(g[K])}),S&&(A=Math.min(A,w.length));for(var I=0;I1){for(var j=x.randstr(),U=0;U>8&15|V>>4&240,V>>4&15|V&240,(V&15)<<4|V&15,1):v===8?vm(V>>24&255,V>>16&255,V>>8&255,(V&255)/255):v===4?vm(V>>12&15|V>>8&240,V>>8&15|V>>4&240,V>>4&15|V&240,((V&15)<<4|V&15)/255):null):(V=Y2.exec(J))?new Wc(V[1],V[2],V[3],1):(V=X2.exec(J))?new Wc(V[1]*255/100,V[2]*255/100,V[3]*255/100,1):(V=$2.exec(J))?vm(V[1],V[2],V[3],V[4]):(V=Z2.exec(J))?vm(V[1]*255/100,V[2]*255/100,V[3]*255/100,V[4]):(V=K2.exec(J))?V2(V[1],V[2]/100,V[3]/100,1):(V=J2.exec(J))?V2(V[1],V[2]/100,V[3]/100,V[4]):K1.hasOwnProperty(J)?j2(K1[J]):J==="transparent"?new Wc(NaN,NaN,NaN,0):null}function j2(J){return new Wc(J>>16&255,J>>8&255,J&255,1)}function vm(J,V,v,x){return x<=0&&(J=V=v=NaN),new Wc(J,V,v,x)}function X1(J){return J instanceof bd||(J=r0(J)),J?(J=J.rgb(),new Wc(J.r,J.g,J.b,J.opacity)):new Wc}function pm(J,V,v,x){return arguments.length===1?X1(J):new Wc(J,V,v,x??1)}function Wc(J,V,v,x){this.r=+J,this.g=+V,this.b=+v,this.opacity=+x}function U2(){return`#${ev(this.r)}${ev(this.g)}${ev(this.b)}`}function Xk(){return`#${ev(this.r)}${ev(this.g)}${ev(this.b)}${ev((isNaN(this.opacity)?1:this.opacity)*255)}`}function q2(){let J=mm(this.opacity);return`${J===1?"rgb(":"rgba("}${Qd(this.r)}, ${Qd(this.g)}, ${Qd(this.b)}${J===1?")":`, ${J})`}`}function mm(J){return isNaN(J)?1:Math.max(0,Math.min(1,J))}function Qd(J){return Math.max(0,Math.min(255,Math.round(J)||0))}function ev(J){return J=Qd(J),(J<16?"0":"")+J.toString(16)}function V2(J,V,v,x){return x<=0?J=V=v=NaN:v<=0||v>=1?J=V=NaN:V<=0&&(J=NaN),new xh(J,V,v,x)}function H2(J){if(J instanceof xh)return new xh(J.h,J.s,J.l,J.opacity);if(J instanceof bd||(J=r0(J)),!J)return new xh;if(J instanceof xh)return J;J=J.rgb();var V=J.r/255,v=J.g/255,x=J.b/255,E=Math.min(V,v,x),k=Math.max(V,v,x),l=NaN,e=k-E,t=(k+E)/2;return e?(V===k?l=(v-x)/e+(v0&&t<1?0:l,new xh(l,e,t,J.opacity)}function $1(J,V,v,x){return arguments.length===1?H2(J):new xh(J,V,v,x??1)}function xh(J,V,v,x){this.h=+J,this.s=+V,this.l=+v,this.opacity=+x}function G2(J){return J=(J||0)%360,J<0?J+360:J}function gm(J){return Math.max(0,Math.min(1,J||0))}function Z1(J,V,v){return(J<60?V+(v-V)*J/60:J<180?v:J<240?V+(v-V)*(240-J)/60:V)*255}var xd,tv,rv,Wv,wh,W2,Y2,X2,$2,Z2,K2,J2,K1,J1=In({"node_modules/d3-color/src/color.js"(){Y1(),xd=.7,tv=1/xd,rv="\\s*([+-]?\\d+)\\s*",Wv="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",W2=/^#([0-9a-f]{3,8})$/,Y2=new RegExp(`^rgb\\(${rv},${rv},${rv}\\)$`),X2=new RegExp(`^rgb\\(${wh},${wh},${wh}\\)$`),$2=new RegExp(`^rgba\\(${rv},${rv},${rv},${Wv}\\)$`),Z2=new RegExp(`^rgba\\(${wh},${wh},${wh},${Wv}\\)$`),K2=new RegExp(`^hsl\\(${Wv},${wh},${wh}\\)$`),J2=new RegExp(`^hsla\\(${Wv},${wh},${wh},${Wv}\\)$`),K1={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},Gv(bd,r0,{copy(J){return Object.assign(new this.constructor,this,J)},displayable(){return this.rgb().displayable()},hex:N2,formatHex:N2,formatHex8:Wk,formatHsl:Yk,formatRgb:O2,toString:O2}),Gv(Wc,pm,t0(bd,{brighter(J){return J=J==null?tv:Math.pow(tv,J),new Wc(this.r*J,this.g*J,this.b*J,this.opacity)},darker(J){return J=J==null?xd:Math.pow(xd,J),new Wc(this.r*J,this.g*J,this.b*J,this.opacity)},rgb(){return this},clamp(){return new Wc(Qd(this.r),Qd(this.g),Qd(this.b),mm(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:U2,formatHex:U2,formatHex8:Xk,formatRgb:q2,toString:q2})),Gv(xh,$1,t0(bd,{brighter(J){return J=J==null?tv:Math.pow(tv,J),new xh(this.h,this.s,this.l*J,this.opacity)},darker(J){return J=J==null?xd:Math.pow(xd,J),new xh(this.h,this.s,this.l*J,this.opacity)},rgb(){var J=this.h%360+(this.h<0)*360,V=isNaN(J)||isNaN(this.s)?0:this.s,v=this.l,x=v+(v<.5?v:1-v)*V,E=2*v-x;return new Wc(Z1(J>=240?J-240:J+120,E,x),Z1(J,E,x),Z1(J<120?J+240:J-120,E,x),this.opacity)},clamp(){return new xh(G2(this.h),gm(this.s),gm(this.l),mm(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let J=mm(this.opacity);return`${J===1?"hsl(":"hsla("}${G2(this.h)}, ${gm(this.s)*100}%, ${gm(this.l)*100}%${J===1?")":`, ${J})`}`}}))}}),Q1,ey,Q2=In({"node_modules/d3-color/src/math.js"(){Q1=Math.PI/180,ey=180/Math.PI}});function e3(J){if(J instanceof Bh)return new Bh(J.l,J.a,J.b,J.opacity);if(J instanceof Kh)return t3(J);J instanceof Wc||(J=X1(J));var V=iy(J.r),v=iy(J.g),x=iy(J.b),E=ry((.2225045*V+.7168786*v+.0606169*x)/ly),k,l;return V===v&&v===x?k=l=E:(k=ry((.4360747*V+.3850649*v+.1430804*x)/sy),l=ry((.0139322*V+.0971045*v+.7141733*x)/uy)),new Bh(116*E-16,500*(k-E),200*(E-l),J.opacity)}function ty(J,V,v,x){return arguments.length===1?e3(J):new Bh(J,V,v,x??1)}function Bh(J,V,v,x){this.l=+J,this.a=+V,this.b=+v,this.opacity=+x}function ry(J){return J>r3?Math.pow(J,.3333333333333333):J/fy+cy}function ny(J){return J>nv?J*J*J:fy*(J-cy)}function ay(J){return 255*(J<=.0031308?12.92*J:1.055*Math.pow(J,.4166666666666667)-.055)}function iy(J){return(J/=255)<=.04045?J/12.92:Math.pow((J+.055)/1.055,2.4)}function $k(J){if(J instanceof Kh)return new Kh(J.h,J.c,J.l,J.opacity);if(J instanceof Bh||(J=e3(J)),J.a===0&&J.b===0)return new Kh(NaN,0=1?(v=1,V-1):Math.floor(v*V),E=J[x],k=J[x+1],l=x>0?J[x-1]:2*E-k,e=x()=>J}});function l3(J,V){return function(v){return J+v*V}}function Qk(J,V,v){return J=Math.pow(J,v),V=Math.pow(V,v)-J,v=1/v,function(x){return Math.pow(J+x*V,v)}}function bm(J,V){var v=V-J;return v?l3(J,v>180||v<-180?v-360*Math.round(v/360):v):i0(isNaN(J)?V:J)}function eC(J){return(J=+J)==1?Yc:function(V,v){return v-V?Qk(V,v,J):i0(isNaN(V)?v:V)}}function Yc(J,V){var v=V-J;return v?l3(J,v):i0(isNaN(J)?V:J)}var $v=In({"node_modules/d3-interpolate/src/color.js"(){s3()}});function u3(J){return function(V){var v=V.length,x=new Array(v),E=new Array(v),k=new Array(v),l,e;for(l=0;lv&&(k=V.slice(v,k),e[l]?e[l]+=k:e[++l]=k),(x=x[0])===(E=E[0])?e[l]?e[l]+=E:e[++l]=E:(e[++l]=null,t.push({i:l,x:Nh(x,E)})),v=Am.lastIndex;return v180?r+=360:r-a>180&&(a+=360),o.push({i:n.push(E(n)+"rotate(",null,x)-2,x:Nh(a,r)})):r&&n.push(E(n)+"rotate("+r+x)}function e(a,r,n,o){a!==r?o.push({i:n.push(E(n)+"skewX(",null,x)-2,x:Nh(a,r)}):r&&n.push(E(n)+"skewX("+r+x)}function t(a,r,n,o,s,c){if(a!==n||r!==o){var m=s.push(E(s)+"scale(",null,",",null,")");c.push({i:m-4,x:Nh(a,n)},{i:m-2,x:Nh(r,o)})}else(n!==1||o!==1)&&s.push(E(s)+"scale("+n+","+o+")")}return function(a,r){var n=[],o=[];return a=J(a),r=J(r),k(a.translateX,a.translateY,r.translateX,r.translateY,n,o),l(a.rotate,r.rotate,n,o),e(a.skewX,r.skewX,n,o),t(a.scaleX,a.scaleY,r.scaleX,r.scaleY,n,o),a=r=null,function(s){for(var c=-1,m=o.length,h;++cMm,interpolateArray:()=>tC,interpolateBasis:()=>a3,interpolateBasisClosed:()=>i3,interpolateCubehelix:()=>z3,interpolateCubehelixLong:()=>B3,interpolateDate:()=>m3,interpolateDiscrete:()=>aC,interpolateHcl:()=>I3,interpolateHclLong:()=>R3,interpolateHsl:()=>L3,interpolateHslLong:()=>P3,interpolateHue:()=>oC,interpolateLab:()=>_C,interpolateNumber:()=>Nh,interpolateNumberArray:()=>yy,interpolateObject:()=>y3,interpolateRgb:()=>xm,interpolateRgbBasis:()=>c3,interpolateRgbBasisClosed:()=>f3,interpolateRound:()=>lC,interpolateString:()=>b3,interpolateTransformCss:()=>A3,interpolateTransformSvg:()=>M3,interpolateZoom:()=>k3,piecewise:()=>TC,quantize:()=>MC});var Zv=In({"node_modules/d3-interpolate/src/index.js"(){Sm(),p3(),gy(),o3(),g3(),iC(),sC(),wm(),_y(),_3(),uC(),x3(),vC(),gC(),h3(),yC(),bC(),xC(),wC(),AC(),SC()}}),xy=Ee({"src/traces/sunburst/fill_one.js"(J,V){"use strict";var v=yo(),x=Qa();V.exports=function(k,l,e,t,a){var r=l.data.data,n=r.i,o=a||r.color;if(n>=0){l.i=r.i;var s=e.marker;s.pattern?(!s.colors||!s.pattern.shape)&&(s.color=o,l.color=o):(s.color=o,l.color=o),v.pointStyle(k,e,t,l)}else x.fill(k,o)}}}),N3=Ee({"src/traces/sunburst/style.js"(J,V){"use strict";var v=Hn(),x=Qa(),E=Vr(),k=Ef().resizeText,l=xy();function e(a){var r=a._fullLayout._sunburstlayer.selectAll(".trace");k(a,r,"sunburst"),r.each(function(n){var o=v.select(this),s=n[0],c=s.trace;o.style("opacity",c.opacity),o.selectAll("path.surface").each(function(m){v.select(this).call(t,m,c,a)})})}function t(a,r,n,o){var s=r.data.data,c=!r.children,m=s.i,h=E.castOption(n,m,"marker.line.color")||x.defaultLine,p=E.castOption(n,m,"marker.line.width")||0;a.call(l,r,n,o).style("stroke-width",p).call(x.stroke,h).style("opacity",c?n.leaf.opacity:null)}V.exports={style:e,styleOne:t}}}),wd=Ee({"src/traces/sunburst/helpers.js"(J){"use strict";var V=Vr(),v=Qa(),x=Dh(),E=Xd();J.findEntryWithLevel=function(t,a){var r;return a&&t.eachAfter(function(n){if(J.getPtId(n)===a)return r=n.copy()}),r||t},J.findEntryWithChild=function(t,a){var r;return t.eachAfter(function(n){for(var o=n.children||[],s=0;s0)},J.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},J.isHeader=function(t,a){return!(J.isLeaf(t)||t.depth===a._maxDepth-1)};function e(t){return t.data.data.pid}J.getParent=function(t,a){return J.findEntryWithLevel(t,e(a))},J.listPath=function(t,a){var r=t.parent;if(!r)return[];var n=a?[r.data[a]]:[r];return J.listPath(r,a).concat(n)},J.getPath=function(t){return J.listPath(t,"label").join("/")+"/"},J.formatValue=E.formatPieValue,J.formatPercent=function(t,a){var r=V.formatPercent(t,0);return r==="0%"&&(r=E.formatPiePercent(t,a)),r}}}),Cm=Ee({"src/traces/sunburst/fx.js"(J,V){"use strict";var v=Hn(),x=Ri(),E=Qf().appendArrayPointValue,k=$l(),l=Vr(),e=zp(),t=wd(),a=Xd(),r=a.formatPieValue;V.exports=function(s,c,m,h,p){var g=h[0],i=g.trace,w=g.hierarchy,S=i.type==="sunburst",M=i.type==="treemap"||i.type==="icicle";"_hasHoverLabel"in i||(i._hasHoverLabel=!1),"_hasHoverEvent"in i||(i._hasHoverEvent=!1);var C=function(f){var u=m._fullLayout;if(!(m._dragging||u.hovermode===!1)){var A=m._fullData[i.index],b=f.data.data,z=b.i,I=t.isHierarchyRoot(f),N=t.getParent(w,f),R=t.getValue(f),B=function(ee){return l.castOption(A,z,ee)},F=B("hovertemplate"),P=k.castHoverinfo(A,u,z),j=u.separators,U;if(F||P&&P!=="none"&&P!=="skip"){var Z,Q;S&&(Z=g.cx+f.pxmid[0]*(1-f.rInscribed),Q=g.cy+f.pxmid[1]*(1-f.rInscribed)),M&&(Z=f._hoverX,Q=f._hoverY);var re={},ae=[],oe=[],H=function(ee){return ae.indexOf(ee)!==-1};P&&(ae=P==="all"?A._module.attributes.hoverinfo.flags:P.split("+")),re.label=b.label,H("label")&&re.label&&oe.push(re.label),b.hasOwnProperty("v")&&(re.value=b.v,re.valueLabel=r(re.value,j),H("value")&&oe.push(re.valueLabel)),re.currentPath=f.currentPath=t.getPath(f.data),H("current path")&&!I&&oe.push(re.currentPath);var X,K=[],G=function(){K.indexOf(X)===-1&&(oe.push(X),K.push(X))};re.percentParent=f.percentParent=R/t.getValue(N),re.parent=f.parentString=t.getPtLabel(N),H("percent parent")&&(X=t.formatPercent(re.percentParent,j)+" of "+re.parent,G()),re.percentEntry=f.percentEntry=R/t.getValue(c),re.entry=f.entry=t.getPtLabel(c),H("percent entry")&&!I&&!f.onPathbar&&(X=t.formatPercent(re.percentEntry,j)+" of "+re.entry,G()),re.percentRoot=f.percentRoot=R/t.getValue(w),re.root=f.root=t.getPtLabel(w),H("percent root")&&!I&&(X=t.formatPercent(re.percentRoot,j)+" of "+re.root,G()),re.text=B("hovertext")||B("text"),H("text")&&(X=re.text,l.isValidTextValue(X)&&oe.push(X)),U=[n(f,A,p.eventDataKeys)];var Y={trace:A,y:Q,_x0:f._x0,_x1:f._x1,_y0:f._y0,_y1:f._y1,text:oe.join("
"),name:F||H("name")?A.name:void 0,color:B("hoverlabel.bgcolor")||b.color,borderColor:B("hoverlabel.bordercolor"),fontFamily:B("hoverlabel.font.family"),fontSize:B("hoverlabel.font.size"),fontColor:B("hoverlabel.font.color"),fontWeight:B("hoverlabel.font.weight"),fontStyle:B("hoverlabel.font.style"),fontVariant:B("hoverlabel.font.variant"),nameLength:B("hoverlabel.namelength"),textAlign:B("hoverlabel.align"),hovertemplate:F,hovertemplateLabels:re,eventData:U};S&&(Y.x0=Z-f.rInscribed*f.rpx1,Y.x1=Z+f.rInscribed*f.rpx1,Y.idealAlign=f.pxmid[0]<0?"left":"right"),M&&(Y.x=Z,Y.idealAlign=Z<0?"left":"right");var q=[];k.loneHover(Y,{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:m,inOut_bbox:q}),U[0].bbox=q[0],i._hasHoverLabel=!0}if(M){var $=s.select("path.surface");p.styleOne($,f,A,m,{hovered:!0})}i._hasHoverEvent=!0,m.emit("plotly_hover",{points:U||[n(f,A,p.eventDataKeys)],event:v.event})}},_=function(f){var u=m._fullLayout,A=m._fullData[i.index],b=v.select(this).datum();if(i._hasHoverEvent&&(f.originalEvent=v.event,m.emit("plotly_unhover",{points:[n(b,A,p.eventDataKeys)],event:v.event}),i._hasHoverEvent=!1),i._hasHoverLabel&&(k.loneUnhover(u._hoverlayer.node()),i._hasHoverLabel=!1),M){var z=s.select("path.surface");p.styleOne(z,b,A,m,{hovered:!1})}},T=function(f){var u=m._fullLayout,A=m._fullData[i.index],b=S&&(t.isHierarchyRoot(f)||t.isLeaf(f)),z=t.getPtId(f),I=t.isEntry(f)?t.findEntryWithChild(w,z):t.findEntryWithLevel(w,z),N=t.getPtId(I),R={points:[n(f,A,p.eventDataKeys)],event:v.event};b||(R.nextLevel=N);var B=e.triggerHandler(m,"plotly_"+i.type+"click",R);if(B!==!1&&u.hovermode&&(m._hoverdata=[n(f,A,p.eventDataKeys)],k.click(m,v.event)),!b&&B!==!1&&!m._dragging&&!m._transitioning){x.call("_storeDirectGUIEdit",A,u._tracePreGUI[A.uid],{level:A.level});var F={data:[{level:N}],traces:[i.index]},P={frame:{redraw:!1,duration:p.transitionTime},transition:{duration:p.transitionTime,easing:p.transitionEasing},mode:"immediate",fromcurrent:!0};k.loneUnhover(u._hoverlayer.node()),x.call("animate",m,F,P)}};s.on("mouseover",C),s.on("mouseout",_),s.on("click",T)};function n(o,s,c){for(var m=o.data.data,h={curveNumber:s.index,pointNumber:m.i,data:s._input,fullData:s},p=0;pWe.x1?2*Math.PI:0)+ee;Ge=se.rpx1Ie?2*Math.PI:0)+ee;Fe={x0:Ge,x1:Ge}}else Fe={rpx0:ae,rpx1:ae},k.extendFlat(Fe,ve(se));else Fe={rpx0:0,rpx1:0};else Fe={x0:ee,x1:ee};return x(Fe,We)}function ue(se){var Te=K[g.getPtId(se)],Fe,We=se.transform;if(Te)Fe=Te;else if(Fe={rpx1:se.rpx1,transform:{textPosAngle:We.textPosAngle,scale:0,rotate:We.rotate,rCenter:We.rCenter,x:We.x,y:We.y}},X)if(se.parent)if(Ie){var Ge=se.x1>Ie?2*Math.PI:0;Fe.x0=Fe.x1=Ge}else k.extendFlat(Fe,ve(se));else Fe.x0=Fe.x1=ee;else Fe.x0=Fe.x1=ee;var gt=x(Fe.transform.textPosAngle,se.transform.textPosAngle),mt=x(Fe.rpx1,se.rpx1),Tt=x(Fe.x0,se.x0),At=x(Fe.x1,se.x1),Kt=x(Fe.transform.scale,We.scale),nr=x(Fe.transform.rotate,We.rotate),_r=We.rCenter===0?3:Fe.transform.rCenter===0?1/3:1,Zt=x(Fe.transform.rCenter,We.rCenter),sr=function(Ot){return Zt(Math.pow(Ot,_r))};return function(Ot){var vt=mt(Ot),ht=Tt(Ot),Re=At(Ot),Be=sr(Ot),He=ye(vt,(ht+Re)/2),$e=gt(Ot),Ze={pxmid:He,rpx1:vt,transform:{textPosAngle:$e,rCenter:Be,x:We.x,y:We.y}};return t(B.type,We,b),{transform:{targetX:Ae(Ze),targetY:Me(Ze),scale:Kt(Ot),rotate:nr(Ot),rCenter:Be}}}}function ve(se){var Te=se.parent,Fe=K[g.getPtId(Te)],We={};if(Fe){var Ge=Te.children,gt=Ge.indexOf(se),mt=Ge.length,Tt=x(Fe.x0,Fe.x1);We.x0=Tt(gt/mt),We.x1=Tt(gt/mt)}else We.x0=We.x1=0;return We}}function w(_){return v.partition().size([2*Math.PI,_.height+1])(_)}J.formatSliceLabel=function(_,T,f,u,A){var b=f.texttemplate,z=f.textinfo;if(!b&&(!z||z==="none"))return"";var I=A.separators,N=u[0],R=_.data.data,B=N.hierarchy,F=g.isHierarchyRoot(_),P=g.getParent(B,_),j=g.getValue(_);if(!b){var U=z.split("+"),Z=function(q){return U.indexOf(q)!==-1},Q=[],re;if(Z("label")&&R.label&&Q.push(R.label),R.hasOwnProperty("v")&&Z("value")&&Q.push(g.formatValue(R.v,I)),!F){Z("current path")&&Q.push(g.getPath(_.data));var ae=0;Z("percent parent")&&ae++,Z("percent entry")&&ae++,Z("percent root")&&ae++;var oe=ae>1;if(ae){var H,X=function(q){re=g.formatPercent(H,I),oe&&(re+=" of "+q),Q.push(re)};Z("percent parent")&&!F&&(H=j/g.getValue(P),X("parent")),Z("percent entry")&&(H=j/g.getValue(T),X("entry")),Z("percent root")&&(H=j/g.getValue(B),X("root"))}}return Z("text")&&(re=k.castOption(f,R.i,"text"),k.isValidTextValue(re)&&Q.push(re)),Q.join("
")}var K=k.castOption(f,R.i,"texttemplate");if(!K)return"";var G={};R.label&&(G.label=R.label),R.hasOwnProperty("v")&&(G.value=R.v,G.valueLabel=g.formatValue(R.v,I)),G.currentPath=g.getPath(_.data),F||(G.percentParent=j/g.getValue(P),G.percentParentLabel=g.formatPercent(G.percentParent,I),G.parent=g.getPtLabel(P)),G.percentEntry=j/g.getValue(T),G.percentEntryLabel=g.formatPercent(G.percentEntry,I),G.entry=g.getPtLabel(T),G.percentRoot=j/g.getValue(B),G.percentRootLabel=g.formatPercent(G.percentRoot,I),G.root=g.getPtLabel(B),R.hasOwnProperty("color")&&(G.color=R.color);var Y=k.castOption(f,R.i,"text");return(k.isValidTextValue(Y)||Y==="")&&(G.text=Y),G.customdata=k.castOption(f,R.i,"customdata"),k.texttemplateString({data:[G,f._meta],fallback:f.texttemplatefallback,labels:G,locale:A._d3locale,template:K})};function S(_){return _.rpx0===0&&k.isFullCircle([_.x0,_.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(_.halfangle)),_.ring/2))}function M(_){return C(_.rpx1,_.transform.textPosAngle)}function C(_,T){return[_*Math.sin(T),-_*Math.cos(T)]}}}),EC=Ee({"src/traces/sunburst/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"sunburst",basePlotModule:Vk(),categories:[],animatable:!0,attributes:fm(),layoutAttributes:B2(),supplyDefaults:Hk(),supplyLayoutDefaults:Gk(),calc:dm().calc,crossTraceCalc:dm().crossTraceCalc,plot:wy().plot,style:N3().style,colorbar:ff(),meta:{}}}}),kC=Ee({"lib/sunburst.js"(J,V){"use strict";V.exports=EC()}}),CC=Ee({"src/traces/treemap/base_plot.js"(J){"use strict";var V=vl();J.name="treemap",J.plot=function(v,x,E,k){V.plotBasePlot(J.name,v,x,E,k)},J.clean=function(v,x,E,k){V.cleanBasePlot(J.name,v,x,E,k)}}}),Kv=Ee({"src/traces/treemap/constants.js"(J,V){"use strict";V.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),Ty=Ee({"src/traces/treemap/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:E}=Cs(),k=$s(),l=kl().attributes,e=Vv(),t=fm(),a=Kv(),r=vo().extendFlat,n=kc().pattern;V.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:r({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:t.marker.colors,pattern:n,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:t.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},k("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:r({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:t.textinfo,texttemplate:x({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:v({},{keys:a.eventDataKeys}),hovertemplatefallback:E(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:r({},e.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:e.sort,root:t.root,domain:l({name:"treemap",trace:!0,editType:"calc"})}}}),O3=Ee({"src/traces/treemap/layout_attributes.js"(J,V){"use strict";V.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),LC=Ee({"src/traces/treemap/defaults.js"(J,V){"use strict";var v=Vr(),x=Ty(),E=Qa(),k=kl().defaults,l=fh().handleText,e=Jd().TEXTPAD,t=Hv().handleMarkerDefaults,a=pl(),r=a.hasColorscale,n=a.handleDefaults;V.exports=function(s,c,m,h){function p(A,b){return v.coerce(s,c,x,A,b)}var g=p("labels"),i=p("parents");if(!g||!g.length||!i||!i.length){c.visible=!1;return}var w=p("values");w&&w.length?p("branchvalues"):p("count"),p("level"),p("maxdepth");var S=p("tiling.packing");S==="squarify"&&p("tiling.squarifyratio"),p("tiling.flip"),p("tiling.pad");var M=p("text");p("texttemplate"),p("texttemplatefallback"),c.texttemplate||p("textinfo",v.isArrayOrTypedArray(M)?"text+label":"label"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback");var C=p("pathbar.visible"),_="auto";l(s,c,h,p,_,{hasPathbar:C,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition");var T=c.textposition.indexOf("bottom")!==-1;t(s,c,h,p);var f=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;f?n(s,c,h,p,{prefix:"marker.",cLetter:"c"}):p("marker.depthfade",!(c.marker.colors||[]).length);var u=c.textfont.size*2;p("marker.pad.t",T?u/4:u),p("marker.pad.l",u/4),p("marker.pad.r",u/4),p("marker.pad.b",T?u:u/4),p("marker.cornerradius"),c._hovered={marker:{line:{width:2,color:E.contrast(h.paper_bgcolor)}}},C&&(p("pathbar.thickness",c.pathbar.textfont.size+2*e),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),k(c,h,p),c._length=null}}}),PC=Ee({"src/traces/treemap/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=O3();V.exports=function(k,l){function e(t,a){return v.coerce(k,l,x,t,a)}e("treemapcolorway",l.colorway),e("extendtreemapcolors")}}}),j3=Ee({"src/traces/treemap/calc.js"(J){"use strict";var V=dm();J.calc=function(v,x){return V.calc(v,x)},J.crossTraceCalc=function(v){return V._runCrossTraceCalc("treemap",v)}}}),U3=Ee({"src/traces/treemap/flip_tree.js"(J,V){"use strict";V.exports=function v(x,E,k){var l;k.swapXY&&(l=x.x0,x.x0=x.y0,x.y0=l,l=x.x1,x.x1=x.y1,x.y1=l),k.flipX&&(l=x.x0,x.x0=E[0]-x.x1,x.x1=E[0]-l),k.flipY&&(l=x.y0,x.y0=E[1]-x.y1,x.y1=E[1]-l);var e=x.children;if(e)for(var t=0;t0)for(var u=0;u").join(" ")||"";var oe=x.ensureSingle(re,"g","slicetext"),H=x.ensureSingle(oe,"text","",function(K){K.attr("data-notex",1)}),X=x.ensureUniformFontSize(s,a.determineTextFont(B,Q,N.font,{onPathbar:!0}));H.text(Q._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(E.font,X).call(k.convertToTspans,s),Q.textBB=E.bBox(H.node()),Q.transform=_(Q,{fontSize:X.size,onPathbar:!0}),Q.transform.fontSize=X.size,f?H.transition().attrTween("transform",function(K){var G=b(K,n,z,[i,w]);return function(Y){return T(G(Y))}}):H.attr("transform",T(Q))})}}}),IC=Ee({"src/traces/treemap/plot_one.js"(J,V){"use strict";var v=Hn(),x=(Zv(),ra(iv)).interpolate,E=wd(),k=Vr(),l=Jd().TEXTPAD,e=zv(),t=e.toMoveInsideBar,a=Ef(),r=a.recordMinTextSize,n=Kv(),o=DC();function s(c){return E.isHierarchyRoot(c)?"":E.getPtId(c)}V.exports=function(m,h,p,g,i){var w=m._fullLayout,S=h[0],M=S.trace,C=M.type,_=C==="icicle",T=S.hierarchy,f=E.findEntryWithLevel(T,M.level),u=v.select(p),A=u.selectAll("g.pathbar"),b=u.selectAll("g.slice");if(!f){A.remove(),b.remove();return}var z=E.isHierarchyRoot(f),I=!w.uniformtext.mode&&E.hasTransition(g),N=E.getMaxDepth(M),R=function(Zt){return Zt.data.depth-f.data.depth-1?j+Q:-(Z+Q):0,ae={x0:U,x1:U,y0:re,y1:re+Z},oe=function(Zt,sr,Ot){var vt=M.tiling.pad,ht=function($e){return $e-vt<=sr.x0},Re=function($e){return $e+vt>=sr.x1},Be=function($e){return $e-vt<=sr.y0},He=function($e){return $e+vt>=sr.y1};return Zt.x0===sr.x0&&Zt.x1===sr.x1&&Zt.y0===sr.y0&&Zt.y1===sr.y1?{x0:Zt.x0,x1:Zt.x1,y0:Zt.y0,y1:Zt.y1}:{x0:ht(Zt.x0-vt)?0:Re(Zt.x0-vt)?Ot[0]:Zt.x0,x1:ht(Zt.x1+vt)?0:Re(Zt.x1+vt)?Ot[0]:Zt.x1,y0:Be(Zt.y0-vt)?0:He(Zt.y0-vt)?Ot[1]:Zt.y0,y1:Be(Zt.y1+vt)?0:He(Zt.y1+vt)?Ot[1]:Zt.y1}},H=null,X={},K={},G=null,Y=function(Zt,sr){return sr?X[s(Zt)]:K[s(Zt)]},q=function(Zt,sr,Ot,vt){if(sr)return X[s(T)]||ae;var ht=K[M.level]||Ot;return R(Zt)?oe(Zt,ht,vt):{}};S.hasMultipleRoots&&z&&N++,M._maxDepth=N,M._backgroundColor=w.paper_bgcolor,M._entryDepth=f.data.depth,M._atRootLevel=z;var $=-P/2+B.l+B.w*(F.x[1]+F.x[0])/2,ee=-j/2+B.t+B.h*(1-(F.y[1]+F.y[0])/2),ne=function(Zt){return $+Zt},fe=function(Zt){return ee+Zt},ye=fe(0),xe=ne(0),Ae=function(Zt){return xe+Zt},Me=function(Zt){return ye+Zt};function Ie(Zt,sr){return Zt+","+sr}var Ue=Ae(0),qe=function(Zt){Zt.x=Math.max(Ue,Zt.x)},ke=M.pathbar.edgeshape,ge=function(Zt){var sr=Ae(Math.max(Math.min(Zt.x0,Zt.x0),0)),Ot=Ae(Math.min(Math.max(Zt.x1,Zt.x1),U)),vt=Me(Zt.y0),ht=Me(Zt.y1),Re=Z/2,Be={},He={};Be.x=sr,He.x=Ot,Be.y=He.y=(vt+ht)/2;var $e={x:sr,y:vt},Ze={x:Ot,y:vt},Je={x:Ot,y:ht},Mt={x:sr,y:ht};return ke===">"?($e.x-=Re,Ze.x-=Re,Je.x-=Re,Mt.x-=Re):ke==="/"?(Je.x-=Re,Mt.x-=Re,Be.x-=Re/2,He.x-=Re/2):ke==="\\"?($e.x-=Re,Ze.x-=Re,Be.x-=Re/2,He.x-=Re/2):ke==="<"&&(Be.x-=Re,He.x-=Re),qe($e),qe(Mt),qe(Be),qe(Ze),qe(Je),qe(He),"M"+Ie($e.x,$e.y)+"L"+Ie(Ze.x,Ze.y)+"L"+Ie(He.x,He.y)+"L"+Ie(Je.x,Je.y)+"L"+Ie(Mt.x,Mt.y)+"L"+Ie(Be.x,Be.y)+"Z"},ue=M[_?"tiling":"marker"].pad,ve=function(Zt){return M.textposition.indexOf(Zt)!==-1},se=ve("top"),Te=ve("left"),Fe=ve("right"),We=ve("bottom"),Ge=function(Zt){var sr=ne(Zt.x0),Ot=ne(Zt.x1),vt=fe(Zt.y0),ht=fe(Zt.y1),Re=Ot-sr,Be=ht-vt;if(!Re||!Be)return"";var He=M.marker.cornerradius||0,$e=Math.min(He,Re/2,Be/2);$e&&Zt.data&&Zt.data.data&&Zt.data.data.label&&(se&&($e=Math.min($e,ue.t)),Te&&($e=Math.min($e,ue.l)),Fe&&($e=Math.min($e,ue.r)),We&&($e=Math.min($e,ue.b)));var Ze=function(Je,Mt){return $e?"a"+Ie($e,$e)+" 0 0 1 "+Ie(Je,Mt):""};return"M"+Ie(sr,vt+$e)+Ze($e,-$e)+"L"+Ie(Ot-$e,vt)+Ze($e,$e)+"L"+Ie(Ot,ht-$e)+Ze(-$e,$e)+"L"+Ie(sr+$e,ht)+Ze(-$e,-$e)+"Z"},gt=function(Zt,sr){var Ot=Zt.x0,vt=Zt.x1,ht=Zt.y0,Re=Zt.y1,Be=Zt.textBB,He=se||sr.isHeader&&!We,$e=He?"start":We?"end":"middle",Ze=ve("right"),Je=ve("left")||sr.onPathbar,Mt=Je?-1:Ze?1:0;if(sr.isHeader){if(Ot+=(_?ue:ue.l)-l,vt-=(_?ue:ue.r)-l,Ot>=vt){var dt=(Ot+vt)/2;Ot=dt,vt=dt}var Dt;We?(Dt=Re-(_?ue:ue.b),ht-1,flipY:F.tiling.flip.indexOf("y")>-1,pad:{inner:F.tiling.pad,top:F.marker.pad.t,left:F.marker.pad.l,right:F.marker.pad.r,bottom:F.marker.pad.b}}),re=Q.descendants(),ae=1/0,oe=-1/0;re.forEach(function(Y){var q=Y.depth;q>=F._maxDepth?(Y.x0=Y.x1=(Y.x0+Y.x1)/2,Y.y0=Y.y1=(Y.y0+Y.y1)/2):(ae=Math.min(ae,q),oe=Math.max(oe,q))}),p=p.data(re,a.getPtId),F._maxVisibleLayers=isFinite(oe)?oe-ae+1:0,p.enter().append("g").classed("slice",!0),u(p,o,I,[i,w],C),p.order();var H=null;if(f&&z){var X=a.getPtId(z);p.each(function(Y){H===null&&a.getPtId(Y)===X&&(H={x0:Y.x0,x1:Y.x1,y0:Y.y0,y1:Y.y1})})}var K=function(){return H||{x0:0,x1:i,y0:0,y1:w}},G=p;return f&&(G=G.transition().each("end",function(){var Y=v.select(this);a.setSliceCursor(Y,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),G.each(function(Y){var q=a.isHeader(Y,F);Y._x0=S(Y.x0),Y._x1=S(Y.x1),Y._y0=M(Y.y0),Y._y1=M(Y.y1),Y._hoverX=S(Y.x1-F.marker.pad.r),Y._hoverY=M(U?Y.y1-F.marker.pad.b/2:Y.y0+F.marker.pad.t/2);var $=v.select(this),ee=x.ensureSingle($,"path","surface",function(Me){Me.style("pointer-events",N?"none":"all")});f?ee.transition().attrTween("d",function(Me){var Ie=A(Me,o,K(),[i,w]);return function(Ue){return C(Ie(Ue))}}):ee.attr("d",C),$.call(r,h,c,m,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,c,{isTransitioning:c._transitioning}),ee.call(e,Y,F,c,{hovered:!1}),Y.x0===Y.x1||Y.y0===Y.y1?Y._text="":q?Y._text=Z?"":a.getPtLabel(Y)||"":Y._text=n(Y,h,F,m,R)||"";var ne=x.ensureSingle($,"g","slicetext"),fe=x.ensureSingle(ne,"text","",function(Me){Me.attr("data-notex",1)}),ye=x.ensureUniformFontSize(c,a.determineTextFont(F,Y,R.font)),xe=Y._text||" ",Ae=q&&xe.indexOf("
")===-1;fe.text(xe).classed("slicetext",!0).attr("text-anchor",j?"end":P||Ae?"start":"middle").call(E.font,ye).call(k.convertToTspans,c),Y.textBB=E.bBox(fe.node()),Y.transform=_(Y,{fontSize:ye.size,isHeader:q}),Y.transform.fontSize=ye.size,f?fe.transition().attrTween("transform",function(Me){var Ie=b(Me,o,K(),[i,w]);return function(Ue){return T(Ie(Ue))}}):fe.attr("transform",T(Y))}),H}}}),FC=Ee({"src/traces/treemap/plot.js"(J,V){"use strict";var v=V3(),x=RC();V.exports=function(k,l,e,t){return v(k,l,e,t,{type:"treemap",drawDescendants:x})}}}),zC=Ee({"src/traces/treemap/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"treemap",basePlotModule:CC(),categories:[],animatable:!0,attributes:Ty(),layoutAttributes:O3(),supplyDefaults:LC(),supplyLayoutDefaults:PC(),calc:j3().calc,crossTraceCalc:j3().crossTraceCalc,plot:FC(),style:Ay().style,colorbar:ff(),meta:{}}}}),BC=Ee({"lib/treemap.js"(J,V){"use strict";V.exports=zC()}}),NC=Ee({"src/traces/icicle/base_plot.js"(J){"use strict";var V=vl();J.name="icicle",J.plot=function(v,x,E,k){V.plotBasePlot(J.name,v,x,E,k)},J.clean=function(v,x,E,k){V.cleanBasePlot(J.name,v,x,E,k)}}}),H3=Ee({"src/traces/icicle/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:E}=Cs(),k=$s(),l=kl().attributes,e=Vv(),t=fm(),a=Ty(),r=Kv(),n=vo().extendFlat,o=kc().pattern;V.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:a.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:n({colors:t.marker.colors,line:t.marker.line,pattern:o,editType:"calc"},k("marker",{colorAttr:"colors",anim:!1})),leaf:t.leaf,pathbar:a.pathbar,text:e.text,textinfo:t.textinfo,texttemplate:x({editType:"plot"},{keys:r.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:v({},{keys:r.eventDataKeys}),hovertemplatefallback:E(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:a.outsidetextfont,textposition:a.textposition,sort:e.sort,root:t.root,domain:l({name:"icicle",trace:!0,editType:"calc"})}}}),G3=Ee({"src/traces/icicle/layout_attributes.js"(J,V){"use strict";V.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),OC=Ee({"src/traces/icicle/defaults.js"(J,V){"use strict";var v=Vr(),x=H3(),E=Qa(),k=kl().defaults,l=fh().handleText,e=Jd().TEXTPAD,t=Hv().handleMarkerDefaults,a=pl(),r=a.hasColorscale,n=a.handleDefaults;V.exports=function(s,c,m,h){function p(T,f){return v.coerce(s,c,x,T,f)}var g=p("labels"),i=p("parents");if(!g||!g.length||!i||!i.length){c.visible=!1;return}var w=p("values");w&&w.length?p("branchvalues"):p("count"),p("level"),p("maxdepth"),p("tiling.orientation"),p("tiling.flip"),p("tiling.pad");var S=p("text");p("texttemplate"),p("texttemplatefallback"),c.texttemplate||p("textinfo",v.isArrayOrTypedArray(S)?"text+label":"label"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback");var M=p("pathbar.visible"),C="auto";l(s,c,h,p,C,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition"),t(s,c,h,p);var _=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;_&&n(s,c,h,p,{prefix:"marker.",cLetter:"c"}),p("leaf.opacity",_?1:.7),c._hovered={marker:{line:{width:2,color:E.contrast(h.paper_bgcolor)}}},M&&(p("pathbar.thickness",c.pathbar.textfont.size+2*e),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),k(c,h,p),c._length=null}}}),jC=Ee({"src/traces/icicle/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=G3();V.exports=function(k,l){function e(t,a){return v.coerce(k,l,x,t,a)}e("iciclecolorway",l.colorway),e("extendiciclecolors")}}}),W3=Ee({"src/traces/icicle/calc.js"(J){"use strict";var V=dm();J.calc=function(v,x){return V.calc(v,x)},J.crossTraceCalc=function(v){return V._runCrossTraceCalc("icicle",v)}}}),UC=Ee({"src/traces/icicle/partition.js"(J,V){"use strict";var v=hm(),x=U3();V.exports=function(k,l,e){var t=e.flipX,a=e.flipY,r=e.orientation==="h",n=e.maxDepth,o=l[0],s=l[1];n&&(o=(k.height+1)*l[0]/Math.min(k.height+1,n),s=(k.height+1)*l[1]/Math.min(k.height+1,n));var c=v.partition().padding(e.pad.inner).size(r?[l[1],o]:[l[0],s])(k);return(r||t||a)&&x(c,l,{swapXY:r,flipX:t,flipY:a}),c}}}),Y3=Ee({"src/traces/icicle/style.js"(J,V){"use strict";var v=Hn(),x=Qa(),E=Vr(),k=Ef().resizeText,l=xy();function e(a){var r=a._fullLayout._iciclelayer.selectAll(".trace");k(a,r,"icicle"),r.each(function(n){var o=v.select(this),s=n[0],c=s.trace;o.style("opacity",c.opacity),o.selectAll("path.surface").each(function(m){v.select(this).call(t,m,c,a)})})}function t(a,r,n,o){var s=r.data.data,c=!r.children,m=s.i,h=E.castOption(n,m,"marker.line.color")||x.defaultLine,p=E.castOption(n,m,"marker.line.width")||0;a.call(l,r,n,o).style("stroke-width",p).call(x.stroke,h).style("opacity",c?n.leaf.opacity:null)}V.exports={style:e,styleOne:t}}}),qC=Ee({"src/traces/icicle/draw_descendants.js"(J,V){"use strict";var v=Hn(),x=Vr(),E=yo(),k=Fs(),l=UC(),e=Y3().styleOne,t=Kv(),a=wd(),r=Cm(),n=wy().formatSliceLabel,o=!1;V.exports=function(c,m,h,p,g){var i=g.width,w=g.height,S=g.viewX,M=g.viewY,C=g.pathSlice,_=g.toMoveInsideSlice,T=g.strTransform,f=g.hasTransition,u=g.handleSlicesExit,A=g.makeUpdateSliceInterpolator,b=g.makeUpdateTextInterpolator,z=g.prevEntry,I={},N=c._context.staticPlot,R=c._fullLayout,B=m[0],F=B.trace,P=F.textposition.indexOf("left")!==-1,j=F.textposition.indexOf("right")!==-1,U=F.textposition.indexOf("bottom")!==-1,Z=l(h,[i,w],{flipX:F.tiling.flip.indexOf("x")>-1,flipY:F.tiling.flip.indexOf("y")>-1,orientation:F.tiling.orientation,pad:{inner:F.tiling.pad},maxDepth:F._maxDepth}),Q=Z.descendants(),re=1/0,ae=-1/0;Q.forEach(function(G){var Y=G.depth;Y>=F._maxDepth?(G.x0=G.x1=(G.x0+G.x1)/2,G.y0=G.y1=(G.y0+G.y1)/2):(re=Math.min(re,Y),ae=Math.max(ae,Y))}),p=p.data(Q,a.getPtId),F._maxVisibleLayers=isFinite(ae)?ae-re+1:0,p.enter().append("g").classed("slice",!0),u(p,o,I,[i,w],C),p.order();var oe=null;if(f&&z){var H=a.getPtId(z);p.each(function(G){oe===null&&a.getPtId(G)===H&&(oe={x0:G.x0,x1:G.x1,y0:G.y0,y1:G.y1})})}var X=function(){return oe||{x0:0,x1:i,y0:0,y1:w}},K=p;return f&&(K=K.transition().each("end",function(){var G=v.select(this);a.setSliceCursor(G,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),K.each(function(G){G._x0=S(G.x0),G._x1=S(G.x1),G._y0=M(G.y0),G._y1=M(G.y1),G._hoverX=S(G.x1-F.tiling.pad),G._hoverY=M(U?G.y1-F.tiling.pad/2:G.y0+F.tiling.pad/2);var Y=v.select(this),q=x.ensureSingle(Y,"path","surface",function(fe){fe.style("pointer-events",N?"none":"all")});f?q.transition().attrTween("d",function(fe){var ye=A(fe,o,X(),[i,w],{orientation:F.tiling.orientation,flipX:F.tiling.flip.indexOf("x")>-1,flipY:F.tiling.flip.indexOf("y")>-1});return function(xe){return C(ye(xe))}}):q.attr("d",C),Y.call(r,h,c,m,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,c,{isTransitioning:c._transitioning}),q.call(e,G,F,c,{hovered:!1}),G.x0===G.x1||G.y0===G.y1?G._text="":G._text=n(G,h,F,m,R)||"";var $=x.ensureSingle(Y,"g","slicetext"),ee=x.ensureSingle($,"text","",function(fe){fe.attr("data-notex",1)}),ne=x.ensureUniformFontSize(c,a.determineTextFont(F,G,R.font));ee.text(G._text||" ").classed("slicetext",!0).attr("text-anchor",j?"end":P?"start":"middle").call(E.font,ne).call(k.convertToTspans,c),G.textBB=E.bBox(ee.node()),G.transform=_(G,{fontSize:ne.size}),G.transform.fontSize=ne.size,f?ee.transition().attrTween("transform",function(fe){var ye=b(fe,o,X(),[i,w]);return function(xe){return T(ye(xe))}}):ee.attr("transform",T(G))}),oe}}}),VC=Ee({"src/traces/icicle/plot.js"(J,V){"use strict";var v=V3(),x=qC();V.exports=function(k,l,e,t){return v(k,l,e,t,{type:"icicle",drawDescendants:x})}}}),HC=Ee({"src/traces/icicle/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"icicle",basePlotModule:NC(),categories:[],animatable:!0,attributes:H3(),layoutAttributes:G3(),supplyDefaults:OC(),supplyLayoutDefaults:jC(),calc:W3().calc,crossTraceCalc:W3().crossTraceCalc,plot:VC(),style:Y3().style,colorbar:ff(),meta:{}}}}),GC=Ee({"lib/icicle.js"(J,V){"use strict";V.exports=HC()}}),WC=Ee({"src/traces/funnelarea/base_plot.js"(J){"use strict";var V=vl();J.name="funnelarea",J.plot=function(v,x,E,k){V.plotBasePlot(J.name,v,x,E,k)},J.clean=function(v,x,E,k){V.cleanBasePlot(J.name,v,x,E,k)}}}),X3=Ee({"src/traces/funnelarea/attributes.js"(J,V){"use strict";var v=Vv(),x=ia(),E=kl().attributes,{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=Cs(),t=vo().extendFlat;V.exports={labels:v.labels,label0:v.label0,dlabel:v.dlabel,values:v.values,marker:{colors:v.marker.colors,line:{color:t({},v.marker.line.color,{dflt:null}),width:t({},v.marker.line.width,{dflt:1}),editType:"calc"},pattern:v.marker.pattern,editType:"calc"},text:v.text,hovertext:v.hovertext,scalegroup:t({},v.scalegroup,{}),textinfo:t({},v.textinfo,{flags:["label","text","value","percent"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:e({editType:"plot"}),hoverinfo:t({},x.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:k({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:e(),textposition:t({},v.textposition,{values:["inside","none"],dflt:"inside"}),textfont:v.textfont,insidetextfont:v.insidetextfont,title:{text:v.title.text,font:v.title.font,position:t({},v.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:E({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}}}),$3=Ee({"src/traces/funnelarea/layout_attributes.js"(J,V){"use strict";var v=G1().hiddenlabels;V.exports={hiddenlabels:v,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),YC=Ee({"src/traces/funnelarea/defaults.js"(J,V){"use strict";var v=Vr(),x=X3(),E=kl().defaults,k=fh().handleText,l=Hv().handleLabelsAndValues,e=Hv().handleMarkerDefaults;V.exports=function(a,r,n,o){function s(C,_){return v.coerce(a,r,x,C,_)}var c=s("labels"),m=s("values"),h=l(c,m),p=h.len;if(r._hasLabels=h.hasLabels,r._hasValues=h.hasValues,!r._hasLabels&&r._hasValues&&(s("label0"),s("dlabel")),!p){r.visible=!1;return}r._length=p,e(a,r,o,s),s("scalegroup");var g=s("text"),i=s("texttemplate");s("texttemplatefallback");var w;if(i||(w=s("textinfo",Array.isArray(g)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),i||w&&w!=="none"){var S=s("textposition");k(a,r,o,s,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else w==="none"&&s("textposition","none");E(r,o,s);var M=s("title.text");M&&(s("title.position"),v.coerceFont(s,"title.font",o.font)),s("aspectratio"),s("baseratio")}}}),XC=Ee({"src/traces/funnelarea/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=$3();V.exports=function(k,l){function e(t,a){return v.coerce(k,l,x,t,a)}e("hiddenlabels"),e("funnelareacolorway",l.colorway),e("extendfunnelareacolors")}}}),Z3=Ee({"src/traces/funnelarea/calc.js"(J,V){"use strict";var v=e0();function x(k,l){return v.calc(k,l)}function E(k){v.crossTraceCalc(k,{type:"funnelarea"})}V.exports={calc:x,crossTraceCalc:E}}}),$C=Ee({"src/traces/funnelarea/plot.js"(J,V){"use strict";var v=Hn(),x=yo(),E=Vr(),k=E.strScale,l=E.strTranslate,e=Fs(),t=zv(),a=t.toMoveInsideBar,r=Ef(),n=r.recordMinTextSize,o=r.clearMinTextSize,s=Xd(),c=W1(),m=c.attachFxHandlers,h=c.determineInsideTextFont,p=c.layoutAreas,g=c.prerenderTitles,i=c.positionTitleOutside,w=c.formatSliceLabel;V.exports=function(T,f){var u=T._context.staticPlot,A=T._fullLayout;o("funnelarea",A),g(f,T),p(f,A._size),E.makeTraceGroups(A._funnelarealayer,f,"trace").each(function(b){var z=v.select(this),I=b[0],N=I.trace;C(b),z.each(function(){var R=v.select(this).selectAll("g.slice").data(b);R.enter().append("g").classed("slice",!0),R.exit().remove(),R.each(function(F,P){if(F.hidden){v.select(this).selectAll("path,g").remove();return}F.pointNumber=F.i,F.curveNumber=N.index;var j=I.cx,U=I.cy,Z=v.select(this),Q=Z.selectAll("path.surface").data([F]);Q.enter().append("path").classed("surface",!0).style({"pointer-events":u?"none":"all"}),Z.call(m,T,b);var re="M"+(j+F.TR[0])+","+(U+F.TR[1])+S(F.TR,F.BR)+S(F.BR,F.BL)+S(F.BL,F.TL)+"Z";Q.attr("d",re),w(T,F,I);var ae=s.castOption(N.textposition,F.pts),oe=Z.selectAll("g.slicetext").data(F.text&&ae!=="none"?[0]:[]);oe.enter().append("g").classed("slicetext",!0),oe.exit().remove(),oe.each(function(){var H=E.ensureSingle(v.select(this),"text","",function(ne){ne.attr("data-notex",1)}),X=E.ensureUniformFontSize(T,h(N,F,A.font));H.text(F.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(x.font,X).call(e.convertToTspans,T);var K=x.bBox(H.node()),G,Y,q,$=Math.min(F.BL[1],F.BR[1])+U,ee=Math.max(F.TL[1],F.TR[1])+U;Y=Math.max(F.TL[0],F.BL[0])+j,q=Math.min(F.TR[0],F.BR[0])+j,G=a(Y,q,$,ee,K,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),G.fontSize=X.size,n(N.type,G,A),b[P].transform=G,E.setTransormAndDisplay(H,G)})});var B=v.select(this).selectAll("g.titletext").data(N.title.text?[0]:[]);B.enter().append("g").classed("titletext",!0),B.exit().remove(),B.each(function(){var F=E.ensureSingle(v.select(this),"text","",function(U){U.attr("data-notex",1)}),P=N.title.text;N._meta&&(P=E.templateString(P,N._meta)),F.text(P).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(x.font,N.title.font).call(e.convertToTspans,T);var j=i(I,A._size);F.attr("transform",l(j.x,j.y)+k(Math.min(1,j.scale))+l(j.tx,j.ty))})})})};function S(_,T){var f=T[0]-_[0],u=T[1]-_[1];return"l"+f+","+u}function M(_,T){return[.5*(_[0]+T[0]),.5*(_[1]+T[1])]}function C(_){if(!_.length)return;var T=_[0],f=T.trace,u=f.aspectratio,A=f.baseratio;A>.999&&(A=.999);var b=Math.pow(A,2),z=T.vTotal,I=z*b/(1-b),N=z,R=I/z;function B(){var fe=Math.sqrt(R);return{x:fe,y:-fe}}function F(){var fe=B();return[fe.x,fe.y]}var P,j=[];j.push(F());var U,Z;for(U=_.length-1;U>-1;U--)if(Z=_[U],!Z.hidden){var Q=Z.v/N;R+=Q,j.push(F())}var re=1/0,ae=-1/0;for(U=0;U-1;U--)if(Z=_[U],!Z.hidden){$+=1;var ee=j[$][0],ne=j[$][1];Z.TL=[-ee,ne],Z.TR=[ee,ne],Z.BL=Y,Z.BR=q,Z.pxmid=M(Z.TR,Z.BR),Y=Z.TL,q=Z.TR}}}}),ZC=Ee({"src/traces/funnelarea/style.js"(J,V){"use strict";var v=Hn(),x=jp(),E=Ef().resizeText;V.exports=function(l){var e=l._fullLayout._funnelarealayer.selectAll(".trace");E(l,e,"funnelarea"),e.each(function(t){var a=t[0],r=a.trace,n=v.select(this);n.style({opacity:r.opacity}),n.selectAll("path.surface").each(function(o){v.select(this).call(x,o,r,l)})})}}}),KC=Ee({"src/traces/funnelarea/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"funnelarea",basePlotModule:WC(),categories:["pie-like","funnelarea","showLegend"],attributes:X3(),layoutAttributes:$3(),supplyDefaults:YC(),supplyLayoutDefaults:XC(),calc:Z3().calc,crossTraceCalc:Z3().crossTraceCalc,plot:$C(),style:ZC(),styleOne:jp(),meta:{}}}}),JC=Ee({"lib/funnelarea.js"(J,V){"use strict";V.exports=KC()}}),Xc=Ee({"stackgl_modules/index.js"(J,V){"use strict";(function(){var v={1964:function(l,e,t){l.exports={alpha_shape:t(3502),convex_hull:t(7352),delaunay_triangulate:t(7642),gl_cone3d:t(6405),gl_error3d:t(9165),gl_line3d:t(5714),gl_mesh3d:t(7201),gl_plot3d:t(4100),gl_scatter3d:t(8418),gl_streamtube3d:t(7815),gl_surface3d:t(9499),ndarray:t(9618),ndarray_linear_interpolate:t(4317)}},4793:function(l,e,t){"use strict";var a,r=t(7507),n=t(3778),o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=h,a=u,e.IS=50;var s=2147483647;a=s,h.TYPED_ARRAY_SUPPORT=c(),!h.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{var ke=new Uint8Array(1),ge={foo:function(){return 42}};return Object.setPrototypeOf(ge,Uint8Array.prototype),Object.setPrototypeOf(ke,ge),ke.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function m(ke){if(ke>s)throw new RangeError('The value "'+ke+'" is invalid for option "size"');var ge=new Uint8Array(ke);return Object.setPrototypeOf(ge,h.prototype),ge}function h(ke,ge,ue){if(typeof ke=="number"){if(typeof ge=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(ke)}return p(ke,ge,ue)}h.poolSize=8192;function p(ke,ge,ue){if(typeof ke=="string")return S(ke,ge);if(ArrayBuffer.isView(ke))return C(ke);if(ke==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke);if(Ie(ke,ArrayBuffer)||ke&&Ie(ke.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(ke,SharedArrayBuffer)||ke&&Ie(ke.buffer,SharedArrayBuffer)))return _(ke,ge,ue);if(typeof ke=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ve=ke.valueOf&&ke.valueOf();if(ve!=null&&ve!==ke)return h.from(ve,ge,ue);var se=T(ke);if(se)return se;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ke[Symbol.toPrimitive]=="function")return h.from(ke[Symbol.toPrimitive]("string"),ge,ue);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke)}h.from=function(ke,ge,ue){return p(ke,ge,ue)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array);function g(ke){if(typeof ke!="number")throw new TypeError('"size" argument must be of type number');if(ke<0)throw new RangeError('The value "'+ke+'" is invalid for option "size"')}function i(ke,ge,ue){return g(ke),ke<=0?m(ke):ge!==void 0?typeof ue=="string"?m(ke).fill(ge,ue):m(ke).fill(ge):m(ke)}h.alloc=function(ke,ge,ue){return i(ke,ge,ue)};function w(ke){return g(ke),m(ke<0?0:f(ke)|0)}h.allocUnsafe=function(ke){return w(ke)},h.allocUnsafeSlow=function(ke){return w(ke)};function S(ke,ge){if((typeof ge!="string"||ge==="")&&(ge="utf8"),!h.isEncoding(ge))throw new TypeError("Unknown encoding: "+ge);var ue=A(ke,ge)|0,ve=m(ue),se=ve.write(ke,ge);return se!==ue&&(ve=ve.slice(0,se)),ve}function M(ke){for(var ge=ke.length<0?0:f(ke.length)|0,ue=m(ge),ve=0;ve=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return ke|0}function u(ke){return+ke!=ke&&(ke=0),h.alloc(+ke)}h.isBuffer=function(ge){return ge!=null&&ge._isBuffer===!0&&ge!==h.prototype},h.compare=function(ge,ue){if(Ie(ge,Uint8Array)&&(ge=h.from(ge,ge.offset,ge.byteLength)),Ie(ue,Uint8Array)&&(ue=h.from(ue,ue.offset,ue.byteLength)),!h.isBuffer(ge)||!h.isBuffer(ue))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ge===ue)return 0;for(var ve=ge.length,se=ue.length,Te=0,Fe=Math.min(ve,se);Tese.length?h.from(Fe).copy(se,Te):Uint8Array.prototype.set.call(se,Fe,Te);else if(h.isBuffer(Fe))Fe.copy(se,Te);else throw new TypeError('"list" argument must be an Array of Buffers');Te+=Fe.length}return se};function A(ke,ge){if(h.isBuffer(ke))return ke.length;if(ArrayBuffer.isView(ke)||Ie(ke,ArrayBuffer))return ke.byteLength;if(typeof ke!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ke);var ue=ke.length,ve=arguments.length>2&&arguments[2]===!0;if(!ve&&ue===0)return 0;for(var se=!1;;)switch(ge){case"ascii":case"latin1":case"binary":return ue;case"utf8":case"utf-8":return fe(ke).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue*2;case"hex":return ue>>>1;case"base64":return Ae(ke).length;default:if(se)return ve?-1:fe(ke).length;ge=(""+ge).toLowerCase(),se=!0}}h.byteLength=A;function b(ke,ge,ue){var ve=!1;if((ge===void 0||ge<0)&&(ge=0),ge>this.length||((ue===void 0||ue>this.length)&&(ue=this.length),ue<=0)||(ue>>>=0,ge>>>=0,ue<=ge))return"";for(ke||(ke="utf8");;)switch(ke){case"hex":return H(this,ge,ue);case"utf8":case"utf-8":return Z(this,ge,ue);case"ascii":return ae(this,ge,ue);case"latin1":case"binary":return oe(this,ge,ue);case"base64":return U(this,ge,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,ge,ue);default:if(ve)throw new TypeError("Unknown encoding: "+ke);ke=(ke+"").toLowerCase(),ve=!0}}h.prototype._isBuffer=!0;function z(ke,ge,ue){var ve=ke[ge];ke[ge]=ke[ue],ke[ue]=ve}h.prototype.swap16=function(){var ge=this.length;if(ge%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ue=0;ueue&&(ge+=" ... "),""},o&&(h.prototype[o]=h.prototype.inspect),h.prototype.compare=function(ge,ue,ve,se,Te){if(Ie(ge,Uint8Array)&&(ge=h.from(ge,ge.offset,ge.byteLength)),!h.isBuffer(ge))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ge);if(ue===void 0&&(ue=0),ve===void 0&&(ve=ge?ge.length:0),se===void 0&&(se=0),Te===void 0&&(Te=this.length),ue<0||ve>ge.length||se<0||Te>this.length)throw new RangeError("out of range index");if(se>=Te&&ue>=ve)return 0;if(se>=Te)return-1;if(ue>=ve)return 1;if(ue>>>=0,ve>>>=0,se>>>=0,Te>>>=0,this===ge)return 0;for(var Fe=Te-se,We=ve-ue,Ge=Math.min(Fe,We),gt=this.slice(se,Te),mt=ge.slice(ue,ve),Tt=0;Tt2147483647?ue=2147483647:ue<-2147483648&&(ue=-2147483648),ue=+ue,Ue(ue)&&(ue=se?0:ke.length-1),ue<0&&(ue=ke.length+ue),ue>=ke.length){if(se)return-1;ue=ke.length-1}else if(ue<0)if(se)ue=0;else return-1;if(typeof ge=="string"&&(ge=h.from(ge,ve)),h.isBuffer(ge))return ge.length===0?-1:N(ke,ge,ue,ve,se);if(typeof ge=="number")return ge=ge&255,typeof Uint8Array.prototype.indexOf=="function"?se?Uint8Array.prototype.indexOf.call(ke,ge,ue):Uint8Array.prototype.lastIndexOf.call(ke,ge,ue):N(ke,[ge],ue,ve,se);throw new TypeError("val must be string, number or Buffer")}function N(ke,ge,ue,ve,se){var Te=1,Fe=ke.length,We=ge.length;if(ve!==void 0&&(ve=String(ve).toLowerCase(),ve==="ucs2"||ve==="ucs-2"||ve==="utf16le"||ve==="utf-16le")){if(ke.length<2||ge.length<2)return-1;Te=2,Fe/=2,We/=2,ue/=2}function Ge(Kt,nr){return Te===1?Kt[nr]:Kt.readUInt16BE(nr*Te)}var gt;if(se){var mt=-1;for(gt=ue;gtFe&&(ue=Fe-We),gt=ue;gt>=0;gt--){for(var Tt=!0,At=0;Atse&&(ve=se)):ve=se;var Te=ge.length;ve>Te/2&&(ve=Te/2);for(var Fe=0;Fe>>0,isFinite(ve)?(ve=ve>>>0,se===void 0&&(se="utf8")):(se=ve,ve=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Te=this.length-ue;if((ve===void 0||ve>Te)&&(ve=Te),ge.length>0&&(ve<0||ue<0)||ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");se||(se="utf8");for(var Fe=!1;;)switch(se){case"hex":return R(this,ge,ue,ve);case"utf8":case"utf-8":return B(this,ge,ue,ve);case"ascii":case"latin1":case"binary":return F(this,ge,ue,ve);case"base64":return P(this,ge,ue,ve);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,ge,ue,ve);default:if(Fe)throw new TypeError("Unknown encoding: "+se);se=(""+se).toLowerCase(),Fe=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(ke,ge,ue){return ge===0&&ue===ke.length?r.fromByteArray(ke):r.fromByteArray(ke.slice(ge,ue))}function Z(ke,ge,ue){ue=Math.min(ke.length,ue);for(var ve=[],se=ge;se239?4:Te>223?3:Te>191?2:1;if(se+We<=ue){var Ge,gt,mt,Tt;switch(We){case 1:Te<128&&(Fe=Te);break;case 2:Ge=ke[se+1],(Ge&192)===128&&(Tt=(Te&31)<<6|Ge&63,Tt>127&&(Fe=Tt));break;case 3:Ge=ke[se+1],gt=ke[se+2],(Ge&192)===128&&(gt&192)===128&&(Tt=(Te&15)<<12|(Ge&63)<<6|gt&63,Tt>2047&&(Tt<55296||Tt>57343)&&(Fe=Tt));break;case 4:Ge=ke[se+1],gt=ke[se+2],mt=ke[se+3],(Ge&192)===128&&(gt&192)===128&&(mt&192)===128&&(Tt=(Te&15)<<18|(Ge&63)<<12|(gt&63)<<6|mt&63,Tt>65535&&Tt<1114112&&(Fe=Tt))}}Fe===null?(Fe=65533,We=1):Fe>65535&&(Fe-=65536,ve.push(Fe>>>10&1023|55296),Fe=56320|Fe&1023),ve.push(Fe),se+=We}return re(ve)}var Q=4096;function re(ke){var ge=ke.length;if(ge<=Q)return String.fromCharCode.apply(String,ke);for(var ue="",ve=0;veve)&&(ue=ve);for(var se="",Te=ge;Teve&&(ge=ve),ue<0?(ue+=ve,ue<0&&(ue=0)):ue>ve&&(ue=ve),ueue)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(ge,ue,ve){ge=ge>>>0,ue=ue>>>0,ve||K(ge,ue,this.length);for(var se=this[ge],Te=1,Fe=0;++Fe>>0,ue=ue>>>0,ve||K(ge,ue,this.length);for(var se=this[ge+--ue],Te=1;ue>0&&(Te*=256);)se+=this[ge+--ue]*Te;return se},h.prototype.readUint8=h.prototype.readUInt8=function(ge,ue){return ge=ge>>>0,ue||K(ge,1,this.length),this[ge]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(ge,ue){return ge=ge>>>0,ue||K(ge,2,this.length),this[ge]|this[ge+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(ge,ue){return ge=ge>>>0,ue||K(ge,2,this.length),this[ge]<<8|this[ge+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(ge,ue){return ge=ge>>>0,ue||K(ge,4,this.length),(this[ge]|this[ge+1]<<8|this[ge+2]<<16)+this[ge+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(ge,ue){return ge=ge>>>0,ue||K(ge,4,this.length),this[ge]*16777216+(this[ge+1]<<16|this[ge+2]<<8|this[ge+3])},h.prototype.readIntLE=function(ge,ue,ve){ge=ge>>>0,ue=ue>>>0,ve||K(ge,ue,this.length);for(var se=this[ge],Te=1,Fe=0;++Fe=Te&&(se-=Math.pow(2,8*ue)),se},h.prototype.readIntBE=function(ge,ue,ve){ge=ge>>>0,ue=ue>>>0,ve||K(ge,ue,this.length);for(var se=ue,Te=1,Fe=this[ge+--se];se>0&&(Te*=256);)Fe+=this[ge+--se]*Te;return Te*=128,Fe>=Te&&(Fe-=Math.pow(2,8*ue)),Fe},h.prototype.readInt8=function(ge,ue){return ge=ge>>>0,ue||K(ge,1,this.length),this[ge]&128?(255-this[ge]+1)*-1:this[ge]},h.prototype.readInt16LE=function(ge,ue){ge=ge>>>0,ue||K(ge,2,this.length);var ve=this[ge]|this[ge+1]<<8;return ve&32768?ve|4294901760:ve},h.prototype.readInt16BE=function(ge,ue){ge=ge>>>0,ue||K(ge,2,this.length);var ve=this[ge+1]|this[ge]<<8;return ve&32768?ve|4294901760:ve},h.prototype.readInt32LE=function(ge,ue){return ge=ge>>>0,ue||K(ge,4,this.length),this[ge]|this[ge+1]<<8|this[ge+2]<<16|this[ge+3]<<24},h.prototype.readInt32BE=function(ge,ue){return ge=ge>>>0,ue||K(ge,4,this.length),this[ge]<<24|this[ge+1]<<16|this[ge+2]<<8|this[ge+3]},h.prototype.readFloatLE=function(ge,ue){return ge=ge>>>0,ue||K(ge,4,this.length),n.read(this,ge,!0,23,4)},h.prototype.readFloatBE=function(ge,ue){return ge=ge>>>0,ue||K(ge,4,this.length),n.read(this,ge,!1,23,4)},h.prototype.readDoubleLE=function(ge,ue){return ge=ge>>>0,ue||K(ge,8,this.length),n.read(this,ge,!0,52,8)},h.prototype.readDoubleBE=function(ge,ue){return ge=ge>>>0,ue||K(ge,8,this.length),n.read(this,ge,!1,52,8)};function G(ke,ge,ue,ve,se,Te){if(!h.isBuffer(ke))throw new TypeError('"buffer" argument must be a Buffer instance');if(ge>se||geke.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(ge,ue,ve,se){if(ge=+ge,ue=ue>>>0,ve=ve>>>0,!se){var Te=Math.pow(2,8*ve)-1;G(this,ge,ue,ve,Te,0)}var Fe=1,We=0;for(this[ue]=ge&255;++We>>0,ve=ve>>>0,!se){var Te=Math.pow(2,8*ve)-1;G(this,ge,ue,ve,Te,0)}var Fe=ve-1,We=1;for(this[ue+Fe]=ge&255;--Fe>=0&&(We*=256);)this[ue+Fe]=ge/We&255;return ue+ve},h.prototype.writeUint8=h.prototype.writeUInt8=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,1,255,0),this[ue]=ge&255,ue+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,2,65535,0),this[ue]=ge&255,this[ue+1]=ge>>>8,ue+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,2,65535,0),this[ue]=ge>>>8,this[ue+1]=ge&255,ue+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,4,4294967295,0),this[ue+3]=ge>>>24,this[ue+2]=ge>>>16,this[ue+1]=ge>>>8,this[ue]=ge&255,ue+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,4,4294967295,0),this[ue]=ge>>>24,this[ue+1]=ge>>>16,this[ue+2]=ge>>>8,this[ue+3]=ge&255,ue+4},h.prototype.writeIntLE=function(ge,ue,ve,se){if(ge=+ge,ue=ue>>>0,!se){var Te=Math.pow(2,8*ve-1);G(this,ge,ue,ve,Te-1,-Te)}var Fe=0,We=1,Ge=0;for(this[ue]=ge&255;++Fe>0)-Ge&255;return ue+ve},h.prototype.writeIntBE=function(ge,ue,ve,se){if(ge=+ge,ue=ue>>>0,!se){var Te=Math.pow(2,8*ve-1);G(this,ge,ue,ve,Te-1,-Te)}var Fe=ve-1,We=1,Ge=0;for(this[ue+Fe]=ge&255;--Fe>=0&&(We*=256);)ge<0&&Ge===0&&this[ue+Fe+1]!==0&&(Ge=1),this[ue+Fe]=(ge/We>>0)-Ge&255;return ue+ve},h.prototype.writeInt8=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,1,127,-128),ge<0&&(ge=255+ge+1),this[ue]=ge&255,ue+1},h.prototype.writeInt16LE=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,2,32767,-32768),this[ue]=ge&255,this[ue+1]=ge>>>8,ue+2},h.prototype.writeInt16BE=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,2,32767,-32768),this[ue]=ge>>>8,this[ue+1]=ge&255,ue+2},h.prototype.writeInt32LE=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,4,2147483647,-2147483648),this[ue]=ge&255,this[ue+1]=ge>>>8,this[ue+2]=ge>>>16,this[ue+3]=ge>>>24,ue+4},h.prototype.writeInt32BE=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,4,2147483647,-2147483648),ge<0&&(ge=4294967295+ge+1),this[ue]=ge>>>24,this[ue+1]=ge>>>16,this[ue+2]=ge>>>8,this[ue+3]=ge&255,ue+4};function Y(ke,ge,ue,ve,se,Te){if(ue+ve>ke.length)throw new RangeError("Index out of range");if(ue<0)throw new RangeError("Index out of range")}function q(ke,ge,ue,ve,se){return ge=+ge,ue=ue>>>0,se||Y(ke,ge,ue,4,34028234663852886e22,-34028234663852886e22),n.write(ke,ge,ue,ve,23,4),ue+4}h.prototype.writeFloatLE=function(ge,ue,ve){return q(this,ge,ue,!0,ve)},h.prototype.writeFloatBE=function(ge,ue,ve){return q(this,ge,ue,!1,ve)};function $(ke,ge,ue,ve,se){return ge=+ge,ue=ue>>>0,se||Y(ke,ge,ue,8,17976931348623157e292,-17976931348623157e292),n.write(ke,ge,ue,ve,52,8),ue+8}h.prototype.writeDoubleLE=function(ge,ue,ve){return $(this,ge,ue,!0,ve)},h.prototype.writeDoubleBE=function(ge,ue,ve){return $(this,ge,ue,!1,ve)},h.prototype.copy=function(ge,ue,ve,se){if(!h.isBuffer(ge))throw new TypeError("argument should be a Buffer");if(ve||(ve=0),!se&&se!==0&&(se=this.length),ue>=ge.length&&(ue=ge.length),ue||(ue=0),se>0&&se=this.length)throw new RangeError("Index out of range");if(se<0)throw new RangeError("sourceEnd out of bounds");se>this.length&&(se=this.length),ge.length-ue>>0,ve=ve===void 0?this.length:ve>>>0,ge||(ge=0);var Fe;if(typeof ge=="number")for(Fe=ue;Fe55295&&ue<57344){if(!se){if(ue>56319){(ge-=3)>-1&&Te.push(239,191,189);continue}else if(Fe+1===ve){(ge-=3)>-1&&Te.push(239,191,189);continue}se=ue;continue}if(ue<56320){(ge-=3)>-1&&Te.push(239,191,189),se=ue;continue}ue=(se-55296<<10|ue-56320)+65536}else se&&(ge-=3)>-1&&Te.push(239,191,189);if(se=null,ue<128){if((ge-=1)<0)break;Te.push(ue)}else if(ue<2048){if((ge-=2)<0)break;Te.push(ue>>6|192,ue&63|128)}else if(ue<65536){if((ge-=3)<0)break;Te.push(ue>>12|224,ue>>6&63|128,ue&63|128)}else if(ue<1114112){if((ge-=4)<0)break;Te.push(ue>>18|240,ue>>12&63|128,ue>>6&63|128,ue&63|128)}else throw new Error("Invalid code point")}return Te}function ye(ke){for(var ge=[],ue=0;ue>8,se=ue%256,Te.push(se),Te.push(ve);return Te}function Ae(ke){return r.toByteArray(ne(ke))}function Me(ke,ge,ue,ve){for(var se=0;se=ge.length||se>=ke.length);++se)ge[se+ue]=ke[se];return se}function Ie(ke,ge){return ke instanceof ge||ke!=null&&ke.constructor!=null&&ke.constructor.name!=null&&ke.constructor.name===ge.name}function Ue(ke){return ke!==ke}var qe=function(){for(var ke="0123456789abcdef",ge=new Array(256),ue=0;ue<16;++ue)for(var ve=ue*16,se=0;se<16;++se)ge[ve+se]=ke[ue]+ke[se];return ge}()},9216:function(l){"use strict";l.exports=r,l.exports.isMobile=r,l.exports.default=r;let e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,a=/android|ipad|playbook|silk/i;function r(n){n||(n={});let o=n.ua;if(!o&&typeof navigator<"u"&&(o=navigator.userAgent),o&&o.headers&&typeof o.headers["user-agent"]=="string"&&(o=o.headers["user-agent"]),typeof o!="string")return!1;let s=e.test(o)&&!t.test(o)||!!n.tablet&&a.test(o);return!s&&n.tablet&&n.featureDetect&&navigator&&navigator.maxTouchPoints>1&&o.indexOf("Macintosh")!==-1&&o.indexOf("Safari")!==-1&&(s=!0),s}},6296:function(l,e,t){"use strict";l.exports=c;var a=t(7261),r=t(9977),n=t(1811);function o(m,h){this._controllerNames=Object.keys(m),this._controllerList=this._controllerNames.map(function(p){return m[p]}),this._mode=h,this._active=m[h],this._active||(this._mode="turntable",this._active=m.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;s.flush=function(m){for(var h=this._controllerList,p=0;p"u"?t(1538):WeakMap,r=t(2762),n=t(8116),o=new a;function s(c){var m=o.get(c),h=m&&(m._triangleBuffer.handle||m._triangleBuffer.buffer);if(!h||!c.isBuffer(h)){var p=r(c,new Float32Array([-1,-1,-1,4,4,-1]));m=n(c,[{buffer:p,type:c.FLOAT,size:2}]),m._triangleBuffer=p,o.set(c,m)}m.bind(),c.drawArrays(c.TRIANGLES,0,3),m.unbind()}l.exports=s},1085:function(l,e,t){var a=t(1371);l.exports=r;function r(n,o,s){o=typeof o=="number"?o:1,s=s||": ";var c=n.split(/\r?\n/),m=String(c.length+o-1).length;return c.map(function(h,p){var g=p+o,i=String(g).length,w=a(g,m-i);return w+s+h}).join(` -`)}},3952:function(l,e,t){"use strict";l.exports=n;var a=t(3250);function r(o,s){for(var c=new Array(s+1),m=0;m0)throw new Error("Invalid string. Length must be a multiple of 4");var C=S.indexOf("=");C===-1&&(C=M);var _=C===M?0:4-C%4;return[C,_]}function m(S){var M=c(S),C=M[0],_=M[1];return(C+_)*3/4-_}function h(S,M,C){return(M+C)*3/4-C}function p(S){var M,C=c(S),_=C[0],T=C[1],f=new r(h(S,_,T)),u=0,A=T>0?_-4:_,b;for(b=0;b>16&255,f[u++]=M>>8&255,f[u++]=M&255;return T===2&&(M=a[S.charCodeAt(b)]<<2|a[S.charCodeAt(b+1)]>>4,f[u++]=M&255),T===1&&(M=a[S.charCodeAt(b)]<<10|a[S.charCodeAt(b+1)]<<4|a[S.charCodeAt(b+2)]>>2,f[u++]=M>>8&255,f[u++]=M&255),f}function g(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function i(S,M,C){for(var _,T=[],f=M;fA?A:u+f));return _===1?(M=S[C-1],T.push(t[M>>2]+t[M<<4&63]+"==")):_===2&&(M=(S[C-2]<<8)+S[C-1],T.push(t[M>>10]+t[M>>4&63]+t[M<<2&63]+"=")),T.join("")}},3865:function(l,e,t){"use strict";var a=t(869);l.exports=r;function r(n,o){return a(n[0].mul(o[1]).add(o[0].mul(n[1])),n[1].mul(o[1]))}},1318:function(l){"use strict";l.exports=e;function e(t,a){return t[0].mul(a[1]).cmp(a[0].mul(t[1]))}},8697:function(l,e,t){"use strict";var a=t(869);l.exports=r;function r(n,o){return a(n[0].mul(o[1]),n[1].mul(o[0]))}},7842:function(l,e,t){"use strict";var a=t(6330),r=t(1533),n=t(2651),o=t(6768),s=t(869),c=t(8697);l.exports=m;function m(h,p){if(a(h))return p?c(h,m(p)):[h[0].clone(),h[1].clone()];var g=0,i,w;if(r(h))i=h.clone();else if(typeof h=="string")i=o(h);else{if(h===0)return[n(0),n(1)];if(h===Math.floor(h))i=n(h);else{for(;h!==Math.floor(h);)h=h*Math.pow(2,256),g-=256;i=n(h)}}if(a(p))i.mul(p[1]),w=p[0].clone();else if(r(p))w=p.clone();else if(typeof p=="string")w=o(p);else if(!p)w=n(1);else if(p===Math.floor(p))w=n(p);else{for(;p!==Math.floor(p);)p=p*Math.pow(2,256),g+=256;w=n(p)}return g>0?i=i.ushln(g):g<0&&(w=w.ushln(-g)),s(i,w)}},6330:function(l,e,t){"use strict";var a=t(1533);l.exports=r;function r(n){return Array.isArray(n)&&n.length===2&&a(n[0])&&a(n[1])}},5716:function(l,e,t){"use strict";var a=t(6859);l.exports=r;function r(n){return n.cmp(new a(0))}},1369:function(l,e,t){"use strict";var a=t(5716);l.exports=r;function r(n){var o=n.length,s=n.words,c=0;if(o===1)c=s[0];else if(o===2)c=s[0]+s[1]*67108864;else for(var m=0;m20?52:c+32}},1533:function(l,e,t){"use strict";var a=t(6859);l.exports=r;function r(n){return n&&typeof n=="object"&&!!n.words}},2651:function(l,e,t){"use strict";var a=t(6859),r=t(2361);l.exports=n;function n(o){var s=r.exponent(o);return s<52?new a(o):new a(o*Math.pow(2,52-s)).ushln(s-52)}},869:function(l,e,t){"use strict";var a=t(2651),r=t(5716);l.exports=n;function n(o,s){var c=r(o),m=r(s);if(c===0)return[a(0),a(1)];if(m===0)return[a(0),a(0)];m<0&&(o=o.neg(),s=s.neg());var h=o.gcd(s);return h.cmpn(1)?[o.div(h),s.div(h)]:[o,s]}},6768:function(l,e,t){"use strict";var a=t(6859);l.exports=r;function r(n){return new a(n)}},6504:function(l,e,t){"use strict";var a=t(869);l.exports=r;function r(n,o){return a(n[0].mul(o[0]),n[1].mul(o[1]))}},7721:function(l,e,t){"use strict";var a=t(5716);l.exports=r;function r(n){return a(n[0])*a(n[1])}},5572:function(l,e,t){"use strict";var a=t(869);l.exports=r;function r(n,o){return a(n[0].mul(o[1]).sub(n[1].mul(o[0])),n[1].mul(o[1]))}},946:function(l,e,t){"use strict";var a=t(1369),r=t(4025);l.exports=n;function n(o){var s=o[0],c=o[1];if(s.cmpn(0)===0)return 0;var m=s.abs().divmod(c.abs()),h=m.div,p=a(h),g=m.mod,i=s.negative!==c.negative?-1:1;if(g.cmpn(0)===0)return i*p;if(p){var w=r(p)+4,S=a(g.ushln(w).divRound(c));return i*(p+S*Math.pow(2,-w))}else{var M=c.bitLength()-g.bitLength()+53,S=a(g.ushln(M).divRound(c));return M<1023?i*S*Math.pow(2,-M):(S*=Math.pow(2,-1023),i*S*Math.pow(2,1023-M))}}},2478:function(l){"use strict";function e(s,c,m,h,p){for(var g=p+1;h<=p;){var i=h+p>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S>=0?(g=i,p=i-1):h=i+1}return g}function t(s,c,m,h,p){for(var g=p+1;h<=p;){var i=h+p>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S>0?(g=i,p=i-1):h=i+1}return g}function a(s,c,m,h,p){for(var g=h-1;h<=p;){var i=h+p>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S<0?(g=i,h=i+1):p=i-1}return g}function r(s,c,m,h,p){for(var g=h-1;h<=p;){var i=h+p>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S<=0?(g=i,h=i+1):p=i-1}return g}function n(s,c,m,h,p){for(;h<=p;){var g=h+p>>>1,i=s[g],w=m!==void 0?m(i,c):i-c;if(w===0)return g;w<=0?h=g+1:p=g-1}return-1}function o(s,c,m,h,p,g){return typeof m=="function"?g(s,c,m,h===void 0?0:h|0,p===void 0?s.length-1:p|0):g(s,c,void 0,m===void 0?0:m|0,h===void 0?s.length-1:h|0)}l.exports={ge:function(s,c,m,h,p){return o(s,c,m,h,p,e)},gt:function(s,c,m,h,p){return o(s,c,m,h,p,t)},lt:function(s,c,m,h,p){return o(s,c,m,h,p,a)},le:function(s,c,m,h,p){return o(s,c,m,h,p,r)},eq:function(s,c,m,h,p){return o(s,c,m,h,p,n)}}},8828:function(l,e){"use strict";"use restrict";var t=32;e.INT_BITS=t,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(n<0)},e.abs=function(n){var o=n>>t-1;return(n^o)-o},e.min=function(n,o){return o^(n^o)&-(n65535)<<4,n>>>=o,s=(n>255)<<3,n>>>=s,o|=s,s=(n>15)<<2,n>>>=s,o|=s,s=(n>3)<<1,n>>>=s,o|=s,o|n>>1},e.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},e.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function a(n){var o=32;return n&=-n,n&&o--,n&65535&&(o-=16),n&16711935&&(o-=8),n&252645135&&(o-=4),n&858993459&&(o-=2),n&1431655765&&(o-=1),o}e.countTrailingZeros=a,e.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},e.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},e.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var r=new Array(256);(function(n){for(var o=0;o<256;++o){var s=o,c=o,m=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--m;n[o]=c<>>8&255]<<16|r[n>>>16&255]<<8|r[n>>>24&255]},e.interleave2=function(n,o){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,n|o<<1},e.deinterleave2=function(n,o){return n=n>>>o&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},e.interleave3=function(n,o,s){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,n|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,n|s<<2},e.deinterleave3=function(n,o){return n=n>>>o&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},e.nextCombination=function(n){var o=n|n-1;return o+1|(~o&-~o)-1>>>a(n)+1}},6859:function(l,e,t){l=t.nmd(l),function(a,r){"use strict";function n(F,P){if(!F)throw new Error(P||"Assertion failed")}function o(F,P){F.super_=P;var j=function(){};j.prototype=P.prototype,F.prototype=new j,F.prototype.constructor=F}function s(F,P,j){if(s.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((P==="le"||P==="be")&&(j=P,P=10),this._init(F||0,P||10,j||"be"))}typeof a=="object"?a.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var c;try{typeof window<"u"&&typeof window.Buffer<"u"?c=window.Buffer:c=t(7790).Buffer}catch{}s.isBN=function(P){return P instanceof s?!0:P!==null&&typeof P=="object"&&P.constructor.wordSize===s.wordSize&&Array.isArray(P.words)},s.max=function(P,j){return P.cmp(j)>0?P:j},s.min=function(P,j){return P.cmp(j)<0?P:j},s.prototype._init=function(P,j,U){if(typeof P=="number")return this._initNumber(P,j,U);if(typeof P=="object")return this._initArray(P,j,U);j==="hex"&&(j=16),n(j===(j|0)&&j>=2&&j<=36),P=P.toString().replace(/\s+/g,"");var Z=0;P[0]==="-"&&(Z++,this.negative=1),Z=0;Z-=3)re=P[Z]|P[Z-1]<<8|P[Z-2]<<16,this.words[Q]|=re<>>26-ae&67108863,ae+=24,ae>=26&&(ae-=26,Q++);else if(U==="le")for(Z=0,Q=0;Z>>26-ae&67108863,ae+=24,ae>=26&&(ae-=26,Q++);return this.strip()};function m(F,P){var j=F.charCodeAt(P);return j>=65&&j<=70?j-55:j>=97&&j<=102?j-87:j-48&15}function h(F,P,j){var U=m(F,j);return j-1>=P&&(U|=m(F,j-1)<<4),U}s.prototype._parseHex=function(P,j,U){this.length=Math.ceil((P.length-j)/6),this.words=new Array(this.length);for(var Z=0;Z=j;Z-=2)ae=h(P,j,Z)<=18?(Q-=18,re+=1,this.words[re]|=ae>>>26):Q+=8;else{var oe=P.length-j;for(Z=oe%2===0?j+1:j;Z=18?(Q-=18,re+=1,this.words[re]|=ae>>>26):Q+=8}this.strip()};function p(F,P,j,U){for(var Z=0,Q=Math.min(F.length,j),re=P;re=49?Z+=ae-49+10:ae>=17?Z+=ae-17+10:Z+=ae}return Z}s.prototype._parseBase=function(P,j,U){this.words=[0],this.length=1;for(var Z=0,Q=1;Q<=67108863;Q*=j)Z++;Z--,Q=Q/j|0;for(var re=P.length-U,ae=re%Z,oe=Math.min(re,re-ae)+U,H=0,X=U;X1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var g=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],i=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],w=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(P,j){P=P||10,j=j|0||1;var U;if(P===16||P==="hex"){U="";for(var Z=0,Q=0,re=0;re>>24-Z&16777215,Z+=2,Z>=26&&(Z-=26,re--),Q!==0||re!==this.length-1?U=g[6-oe.length]+oe+U:U=oe+U}for(Q!==0&&(U=Q.toString(16)+U);U.length%j!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}if(P===(P|0)&&P>=2&&P<=36){var H=i[P],X=w[P];U="";var K=this.clone();for(K.negative=0;!K.isZero();){var G=K.modn(X).toString(P);K=K.idivn(X),K.isZero()?U=G+U:U=g[H-G.length]+G+U}for(this.isZero()&&(U="0"+U);U.length%j!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var P=this.words[0];return this.length===2?P+=this.words[1]*67108864:this.length===3&&this.words[2]===1?P+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-P:P},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(P,j){return n(typeof c<"u"),this.toArrayLike(c,P,j)},s.prototype.toArray=function(P,j){return this.toArrayLike(Array,P,j)},s.prototype.toArrayLike=function(P,j,U){var Z=this.byteLength(),Q=U||Math.max(1,Z);n(Z<=Q,"byte array longer than desired length"),n(Q>0,"Requested array length <= 0"),this.strip();var re=j==="le",ae=new P(Q),oe,H,X=this.clone();if(re){for(H=0;!X.isZero();H++)oe=X.andln(255),X.iushrn(8),ae[H]=oe;for(;H=4096&&(U+=13,j>>>=13),j>=64&&(U+=7,j>>>=7),j>=8&&(U+=4,j>>>=4),j>=2&&(U+=2,j>>>=2),U+j},s.prototype._zeroBits=function(P){if(P===0)return 26;var j=P,U=0;return j&8191||(U+=13,j>>>=13),j&127||(U+=7,j>>>=7),j&15||(U+=4,j>>>=4),j&3||(U+=2,j>>>=2),j&1||U++,U},s.prototype.bitLength=function(){var P=this.words[this.length-1],j=this._countBits(P);return(this.length-1)*26+j};function S(F){for(var P=new Array(F.bitLength()),j=0;j>>Z}return P}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var P=0,j=0;jP.length?this.clone().ior(P):P.clone().ior(this)},s.prototype.uor=function(P){return this.length>P.length?this.clone().iuor(P):P.clone().iuor(this)},s.prototype.iuand=function(P){var j;this.length>P.length?j=P:j=this;for(var U=0;UP.length?this.clone().iand(P):P.clone().iand(this)},s.prototype.uand=function(P){return this.length>P.length?this.clone().iuand(P):P.clone().iuand(this)},s.prototype.iuxor=function(P){var j,U;this.length>P.length?(j=this,U=P):(j=P,U=this);for(var Z=0;ZP.length?this.clone().ixor(P):P.clone().ixor(this)},s.prototype.uxor=function(P){return this.length>P.length?this.clone().iuxor(P):P.clone().iuxor(this)},s.prototype.inotn=function(P){n(typeof P=="number"&&P>=0);var j=Math.ceil(P/26)|0,U=P%26;this._expand(j),U>0&&j--;for(var Z=0;Z0&&(this.words[Z]=~this.words[Z]&67108863>>26-U),this.strip()},s.prototype.notn=function(P){return this.clone().inotn(P)},s.prototype.setn=function(P,j){n(typeof P=="number"&&P>=0);var U=P/26|0,Z=P%26;return this._expand(U+1),j?this.words[U]=this.words[U]|1<P.length?(U=this,Z=P):(U=P,Z=this);for(var Q=0,re=0;re>>26;for(;Q!==0&&re>>26;if(this.length=U.length,Q!==0)this.words[this.length]=Q,this.length++;else if(U!==this)for(;reP.length?this.clone().iadd(P):P.clone().iadd(this)},s.prototype.isub=function(P){if(P.negative!==0){P.negative=0;var j=this.iadd(P);return P.negative=1,j._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(P),this.negative=1,this._normSign();var U=this.cmp(P);if(U===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Z,Q;U>0?(Z=this,Q=P):(Z=P,Q=this);for(var re=0,ae=0;ae>26,this.words[ae]=j&67108863;for(;re!==0&&ae>26,this.words[ae]=j&67108863;if(re===0&&ae>>26,K=oe&67108863,G=Math.min(H,P.length-1),Y=Math.max(0,H-F.length+1);Y<=G;Y++){var q=H-Y|0;Z=F.words[q]|0,Q=P.words[Y]|0,re=Z*Q+K,X+=re/67108864|0,K=re&67108863}j.words[H]=K|0,oe=X|0}return oe!==0?j.words[H]=oe|0:j.length--,j.strip()}var C=function(P,j,U){var Z=P.words,Q=j.words,re=U.words,ae=0,oe,H,X,K=Z[0]|0,G=K&8191,Y=K>>>13,q=Z[1]|0,$=q&8191,ee=q>>>13,ne=Z[2]|0,fe=ne&8191,ye=ne>>>13,xe=Z[3]|0,Ae=xe&8191,Me=xe>>>13,Ie=Z[4]|0,Ue=Ie&8191,qe=Ie>>>13,ke=Z[5]|0,ge=ke&8191,ue=ke>>>13,ve=Z[6]|0,se=ve&8191,Te=ve>>>13,Fe=Z[7]|0,We=Fe&8191,Ge=Fe>>>13,gt=Z[8]|0,mt=gt&8191,Tt=gt>>>13,At=Z[9]|0,Kt=At&8191,nr=At>>>13,_r=Q[0]|0,Zt=_r&8191,sr=_r>>>13,Ot=Q[1]|0,vt=Ot&8191,ht=Ot>>>13,Re=Q[2]|0,Be=Re&8191,He=Re>>>13,$e=Q[3]|0,Ze=$e&8191,Je=$e>>>13,Mt=Q[4]|0,dt=Mt&8191,Dt=Mt>>>13,Ct=Q[5]|0,Vt=Ct&8191,Ht=Ct>>>13,Wt=Q[6]|0,Sr=Wt&8191,on=Wt>>>13,$t=Q[7]|0,It=$t&8191,ir=$t>>>13,cr=Q[8]|0,fr=cr&8191,Ir=cr>>>13,ln=Q[9]|0,nn=ln&8191,wn=ln>>>13;U.negative=P.negative^j.negative,U.length=19,oe=Math.imul(G,Zt),H=Math.imul(G,sr),H=H+Math.imul(Y,Zt)|0,X=Math.imul(Y,sr);var Un=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(Un>>>26)|0,Un&=67108863,oe=Math.imul($,Zt),H=Math.imul($,sr),H=H+Math.imul(ee,Zt)|0,X=Math.imul(ee,sr),oe=oe+Math.imul(G,vt)|0,H=H+Math.imul(G,ht)|0,H=H+Math.imul(Y,vt)|0,X=X+Math.imul(Y,ht)|0;var jn=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(jn>>>26)|0,jn&=67108863,oe=Math.imul(fe,Zt),H=Math.imul(fe,sr),H=H+Math.imul(ye,Zt)|0,X=Math.imul(ye,sr),oe=oe+Math.imul($,vt)|0,H=H+Math.imul($,ht)|0,H=H+Math.imul(ee,vt)|0,X=X+Math.imul(ee,ht)|0,oe=oe+Math.imul(G,Be)|0,H=H+Math.imul(G,He)|0,H=H+Math.imul(Y,Be)|0,X=X+Math.imul(Y,He)|0;var Aa=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(Aa>>>26)|0,Aa&=67108863,oe=Math.imul(Ae,Zt),H=Math.imul(Ae,sr),H=H+Math.imul(Me,Zt)|0,X=Math.imul(Me,sr),oe=oe+Math.imul(fe,vt)|0,H=H+Math.imul(fe,ht)|0,H=H+Math.imul(ye,vt)|0,X=X+Math.imul(ye,ht)|0,oe=oe+Math.imul($,Be)|0,H=H+Math.imul($,He)|0,H=H+Math.imul(ee,Be)|0,X=X+Math.imul(ee,He)|0,oe=oe+Math.imul(G,Ze)|0,H=H+Math.imul(G,Je)|0,H=H+Math.imul(Y,Ze)|0,X=X+Math.imul(Y,Je)|0;var ua=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(ua>>>26)|0,ua&=67108863,oe=Math.imul(Ue,Zt),H=Math.imul(Ue,sr),H=H+Math.imul(qe,Zt)|0,X=Math.imul(qe,sr),oe=oe+Math.imul(Ae,vt)|0,H=H+Math.imul(Ae,ht)|0,H=H+Math.imul(Me,vt)|0,X=X+Math.imul(Me,ht)|0,oe=oe+Math.imul(fe,Be)|0,H=H+Math.imul(fe,He)|0,H=H+Math.imul(ye,Be)|0,X=X+Math.imul(ye,He)|0,oe=oe+Math.imul($,Ze)|0,H=H+Math.imul($,Je)|0,H=H+Math.imul(ee,Ze)|0,X=X+Math.imul(ee,Je)|0,oe=oe+Math.imul(G,dt)|0,H=H+Math.imul(G,Dt)|0,H=H+Math.imul(Y,dt)|0,X=X+Math.imul(Y,Dt)|0;var Qn=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(Qn>>>26)|0,Qn&=67108863,oe=Math.imul(ge,Zt),H=Math.imul(ge,sr),H=H+Math.imul(ue,Zt)|0,X=Math.imul(ue,sr),oe=oe+Math.imul(Ue,vt)|0,H=H+Math.imul(Ue,ht)|0,H=H+Math.imul(qe,vt)|0,X=X+Math.imul(qe,ht)|0,oe=oe+Math.imul(Ae,Be)|0,H=H+Math.imul(Ae,He)|0,H=H+Math.imul(Me,Be)|0,X=X+Math.imul(Me,He)|0,oe=oe+Math.imul(fe,Ze)|0,H=H+Math.imul(fe,Je)|0,H=H+Math.imul(ye,Ze)|0,X=X+Math.imul(ye,Je)|0,oe=oe+Math.imul($,dt)|0,H=H+Math.imul($,Dt)|0,H=H+Math.imul(ee,dt)|0,X=X+Math.imul(ee,Dt)|0,oe=oe+Math.imul(G,Vt)|0,H=H+Math.imul(G,Ht)|0,H=H+Math.imul(Y,Vt)|0,X=X+Math.imul(Y,Ht)|0;var ei=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(ei>>>26)|0,ei&=67108863,oe=Math.imul(se,Zt),H=Math.imul(se,sr),H=H+Math.imul(Te,Zt)|0,X=Math.imul(Te,sr),oe=oe+Math.imul(ge,vt)|0,H=H+Math.imul(ge,ht)|0,H=H+Math.imul(ue,vt)|0,X=X+Math.imul(ue,ht)|0,oe=oe+Math.imul(Ue,Be)|0,H=H+Math.imul(Ue,He)|0,H=H+Math.imul(qe,Be)|0,X=X+Math.imul(qe,He)|0,oe=oe+Math.imul(Ae,Ze)|0,H=H+Math.imul(Ae,Je)|0,H=H+Math.imul(Me,Ze)|0,X=X+Math.imul(Me,Je)|0,oe=oe+Math.imul(fe,dt)|0,H=H+Math.imul(fe,Dt)|0,H=H+Math.imul(ye,dt)|0,X=X+Math.imul(ye,Dt)|0,oe=oe+Math.imul($,Vt)|0,H=H+Math.imul($,Ht)|0,H=H+Math.imul(ee,Vt)|0,X=X+Math.imul(ee,Ht)|0,oe=oe+Math.imul(G,Sr)|0,H=H+Math.imul(G,on)|0,H=H+Math.imul(Y,Sr)|0,X=X+Math.imul(Y,on)|0;var Fa=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,oe=Math.imul(We,Zt),H=Math.imul(We,sr),H=H+Math.imul(Ge,Zt)|0,X=Math.imul(Ge,sr),oe=oe+Math.imul(se,vt)|0,H=H+Math.imul(se,ht)|0,H=H+Math.imul(Te,vt)|0,X=X+Math.imul(Te,ht)|0,oe=oe+Math.imul(ge,Be)|0,H=H+Math.imul(ge,He)|0,H=H+Math.imul(ue,Be)|0,X=X+Math.imul(ue,He)|0,oe=oe+Math.imul(Ue,Ze)|0,H=H+Math.imul(Ue,Je)|0,H=H+Math.imul(qe,Ze)|0,X=X+Math.imul(qe,Je)|0,oe=oe+Math.imul(Ae,dt)|0,H=H+Math.imul(Ae,Dt)|0,H=H+Math.imul(Me,dt)|0,X=X+Math.imul(Me,Dt)|0,oe=oe+Math.imul(fe,Vt)|0,H=H+Math.imul(fe,Ht)|0,H=H+Math.imul(ye,Vt)|0,X=X+Math.imul(ye,Ht)|0,oe=oe+Math.imul($,Sr)|0,H=H+Math.imul($,on)|0,H=H+Math.imul(ee,Sr)|0,X=X+Math.imul(ee,on)|0,oe=oe+Math.imul(G,It)|0,H=H+Math.imul(G,ir)|0,H=H+Math.imul(Y,It)|0,X=X+Math.imul(Y,ir)|0;var ai=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(ai>>>26)|0,ai&=67108863,oe=Math.imul(mt,Zt),H=Math.imul(mt,sr),H=H+Math.imul(Tt,Zt)|0,X=Math.imul(Tt,sr),oe=oe+Math.imul(We,vt)|0,H=H+Math.imul(We,ht)|0,H=H+Math.imul(Ge,vt)|0,X=X+Math.imul(Ge,ht)|0,oe=oe+Math.imul(se,Be)|0,H=H+Math.imul(se,He)|0,H=H+Math.imul(Te,Be)|0,X=X+Math.imul(Te,He)|0,oe=oe+Math.imul(ge,Ze)|0,H=H+Math.imul(ge,Je)|0,H=H+Math.imul(ue,Ze)|0,X=X+Math.imul(ue,Je)|0,oe=oe+Math.imul(Ue,dt)|0,H=H+Math.imul(Ue,Dt)|0,H=H+Math.imul(qe,dt)|0,X=X+Math.imul(qe,Dt)|0,oe=oe+Math.imul(Ae,Vt)|0,H=H+Math.imul(Ae,Ht)|0,H=H+Math.imul(Me,Vt)|0,X=X+Math.imul(Me,Ht)|0,oe=oe+Math.imul(fe,Sr)|0,H=H+Math.imul(fe,on)|0,H=H+Math.imul(ye,Sr)|0,X=X+Math.imul(ye,on)|0,oe=oe+Math.imul($,It)|0,H=H+Math.imul($,ir)|0,H=H+Math.imul(ee,It)|0,X=X+Math.imul(ee,ir)|0,oe=oe+Math.imul(G,fr)|0,H=H+Math.imul(G,Ir)|0,H=H+Math.imul(Y,fr)|0,X=X+Math.imul(Y,Ir)|0;var Mi=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,oe=Math.imul(Kt,Zt),H=Math.imul(Kt,sr),H=H+Math.imul(nr,Zt)|0,X=Math.imul(nr,sr),oe=oe+Math.imul(mt,vt)|0,H=H+Math.imul(mt,ht)|0,H=H+Math.imul(Tt,vt)|0,X=X+Math.imul(Tt,ht)|0,oe=oe+Math.imul(We,Be)|0,H=H+Math.imul(We,He)|0,H=H+Math.imul(Ge,Be)|0,X=X+Math.imul(Ge,He)|0,oe=oe+Math.imul(se,Ze)|0,H=H+Math.imul(se,Je)|0,H=H+Math.imul(Te,Ze)|0,X=X+Math.imul(Te,Je)|0,oe=oe+Math.imul(ge,dt)|0,H=H+Math.imul(ge,Dt)|0,H=H+Math.imul(ue,dt)|0,X=X+Math.imul(ue,Dt)|0,oe=oe+Math.imul(Ue,Vt)|0,H=H+Math.imul(Ue,Ht)|0,H=H+Math.imul(qe,Vt)|0,X=X+Math.imul(qe,Ht)|0,oe=oe+Math.imul(Ae,Sr)|0,H=H+Math.imul(Ae,on)|0,H=H+Math.imul(Me,Sr)|0,X=X+Math.imul(Me,on)|0,oe=oe+Math.imul(fe,It)|0,H=H+Math.imul(fe,ir)|0,H=H+Math.imul(ye,It)|0,X=X+Math.imul(ye,ir)|0,oe=oe+Math.imul($,fr)|0,H=H+Math.imul($,Ir)|0,H=H+Math.imul(ee,fr)|0,X=X+Math.imul(ee,Ir)|0,oe=oe+Math.imul(G,nn)|0,H=H+Math.imul(G,wn)|0,H=H+Math.imul(Y,nn)|0,X=X+Math.imul(Y,wn)|0;var ci=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(ci>>>26)|0,ci&=67108863,oe=Math.imul(Kt,vt),H=Math.imul(Kt,ht),H=H+Math.imul(nr,vt)|0,X=Math.imul(nr,ht),oe=oe+Math.imul(mt,Be)|0,H=H+Math.imul(mt,He)|0,H=H+Math.imul(Tt,Be)|0,X=X+Math.imul(Tt,He)|0,oe=oe+Math.imul(We,Ze)|0,H=H+Math.imul(We,Je)|0,H=H+Math.imul(Ge,Ze)|0,X=X+Math.imul(Ge,Je)|0,oe=oe+Math.imul(se,dt)|0,H=H+Math.imul(se,Dt)|0,H=H+Math.imul(Te,dt)|0,X=X+Math.imul(Te,Dt)|0,oe=oe+Math.imul(ge,Vt)|0,H=H+Math.imul(ge,Ht)|0,H=H+Math.imul(ue,Vt)|0,X=X+Math.imul(ue,Ht)|0,oe=oe+Math.imul(Ue,Sr)|0,H=H+Math.imul(Ue,on)|0,H=H+Math.imul(qe,Sr)|0,X=X+Math.imul(qe,on)|0,oe=oe+Math.imul(Ae,It)|0,H=H+Math.imul(Ae,ir)|0,H=H+Math.imul(Me,It)|0,X=X+Math.imul(Me,ir)|0,oe=oe+Math.imul(fe,fr)|0,H=H+Math.imul(fe,Ir)|0,H=H+Math.imul(ye,fr)|0,X=X+Math.imul(ye,Ir)|0,oe=oe+Math.imul($,nn)|0,H=H+Math.imul($,wn)|0,H=H+Math.imul(ee,nn)|0,X=X+Math.imul(ee,wn)|0;var ba=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(ba>>>26)|0,ba&=67108863,oe=Math.imul(Kt,Be),H=Math.imul(Kt,He),H=H+Math.imul(nr,Be)|0,X=Math.imul(nr,He),oe=oe+Math.imul(mt,Ze)|0,H=H+Math.imul(mt,Je)|0,H=H+Math.imul(Tt,Ze)|0,X=X+Math.imul(Tt,Je)|0,oe=oe+Math.imul(We,dt)|0,H=H+Math.imul(We,Dt)|0,H=H+Math.imul(Ge,dt)|0,X=X+Math.imul(Ge,Dt)|0,oe=oe+Math.imul(se,Vt)|0,H=H+Math.imul(se,Ht)|0,H=H+Math.imul(Te,Vt)|0,X=X+Math.imul(Te,Ht)|0,oe=oe+Math.imul(ge,Sr)|0,H=H+Math.imul(ge,on)|0,H=H+Math.imul(ue,Sr)|0,X=X+Math.imul(ue,on)|0,oe=oe+Math.imul(Ue,It)|0,H=H+Math.imul(Ue,ir)|0,H=H+Math.imul(qe,It)|0,X=X+Math.imul(qe,ir)|0,oe=oe+Math.imul(Ae,fr)|0,H=H+Math.imul(Ae,Ir)|0,H=H+Math.imul(Me,fr)|0,X=X+Math.imul(Me,Ir)|0,oe=oe+Math.imul(fe,nn)|0,H=H+Math.imul(fe,wn)|0,H=H+Math.imul(ye,nn)|0,X=X+Math.imul(ye,wn)|0;var pa=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(pa>>>26)|0,pa&=67108863,oe=Math.imul(Kt,Ze),H=Math.imul(Kt,Je),H=H+Math.imul(nr,Ze)|0,X=Math.imul(nr,Je),oe=oe+Math.imul(mt,dt)|0,H=H+Math.imul(mt,Dt)|0,H=H+Math.imul(Tt,dt)|0,X=X+Math.imul(Tt,Dt)|0,oe=oe+Math.imul(We,Vt)|0,H=H+Math.imul(We,Ht)|0,H=H+Math.imul(Ge,Vt)|0,X=X+Math.imul(Ge,Ht)|0,oe=oe+Math.imul(se,Sr)|0,H=H+Math.imul(se,on)|0,H=H+Math.imul(Te,Sr)|0,X=X+Math.imul(Te,on)|0,oe=oe+Math.imul(ge,It)|0,H=H+Math.imul(ge,ir)|0,H=H+Math.imul(ue,It)|0,X=X+Math.imul(ue,ir)|0,oe=oe+Math.imul(Ue,fr)|0,H=H+Math.imul(Ue,Ir)|0,H=H+Math.imul(qe,fr)|0,X=X+Math.imul(qe,Ir)|0,oe=oe+Math.imul(Ae,nn)|0,H=H+Math.imul(Ae,wn)|0,H=H+Math.imul(Me,nn)|0,X=X+Math.imul(Me,wn)|0;var Ii=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,oe=Math.imul(Kt,dt),H=Math.imul(Kt,Dt),H=H+Math.imul(nr,dt)|0,X=Math.imul(nr,Dt),oe=oe+Math.imul(mt,Vt)|0,H=H+Math.imul(mt,Ht)|0,H=H+Math.imul(Tt,Vt)|0,X=X+Math.imul(Tt,Ht)|0,oe=oe+Math.imul(We,Sr)|0,H=H+Math.imul(We,on)|0,H=H+Math.imul(Ge,Sr)|0,X=X+Math.imul(Ge,on)|0,oe=oe+Math.imul(se,It)|0,H=H+Math.imul(se,ir)|0,H=H+Math.imul(Te,It)|0,X=X+Math.imul(Te,ir)|0,oe=oe+Math.imul(ge,fr)|0,H=H+Math.imul(ge,Ir)|0,H=H+Math.imul(ue,fr)|0,X=X+Math.imul(ue,Ir)|0,oe=oe+Math.imul(Ue,nn)|0,H=H+Math.imul(Ue,wn)|0,H=H+Math.imul(qe,nn)|0,X=X+Math.imul(qe,wn)|0;var ho=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(ho>>>26)|0,ho&=67108863,oe=Math.imul(Kt,Vt),H=Math.imul(Kt,Ht),H=H+Math.imul(nr,Vt)|0,X=Math.imul(nr,Ht),oe=oe+Math.imul(mt,Sr)|0,H=H+Math.imul(mt,on)|0,H=H+Math.imul(Tt,Sr)|0,X=X+Math.imul(Tt,on)|0,oe=oe+Math.imul(We,It)|0,H=H+Math.imul(We,ir)|0,H=H+Math.imul(Ge,It)|0,X=X+Math.imul(Ge,ir)|0,oe=oe+Math.imul(se,fr)|0,H=H+Math.imul(se,Ir)|0,H=H+Math.imul(Te,fr)|0,X=X+Math.imul(Te,Ir)|0,oe=oe+Math.imul(ge,nn)|0,H=H+Math.imul(ge,wn)|0,H=H+Math.imul(ue,nn)|0,X=X+Math.imul(ue,wn)|0;var da=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(da>>>26)|0,da&=67108863,oe=Math.imul(Kt,Sr),H=Math.imul(Kt,on),H=H+Math.imul(nr,Sr)|0,X=Math.imul(nr,on),oe=oe+Math.imul(mt,It)|0,H=H+Math.imul(mt,ir)|0,H=H+Math.imul(Tt,It)|0,X=X+Math.imul(Tt,ir)|0,oe=oe+Math.imul(We,fr)|0,H=H+Math.imul(We,Ir)|0,H=H+Math.imul(Ge,fr)|0,X=X+Math.imul(Ge,Ir)|0,oe=oe+Math.imul(se,nn)|0,H=H+Math.imul(se,wn)|0,H=H+Math.imul(Te,nn)|0,X=X+Math.imul(Te,wn)|0;var Kn=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(Kn>>>26)|0,Kn&=67108863,oe=Math.imul(Kt,It),H=Math.imul(Kt,ir),H=H+Math.imul(nr,It)|0,X=Math.imul(nr,ir),oe=oe+Math.imul(mt,fr)|0,H=H+Math.imul(mt,Ir)|0,H=H+Math.imul(Tt,fr)|0,X=X+Math.imul(Tt,Ir)|0,oe=oe+Math.imul(We,nn)|0,H=H+Math.imul(We,wn)|0,H=H+Math.imul(Ge,nn)|0,X=X+Math.imul(Ge,wn)|0;var ot=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(ot>>>26)|0,ot&=67108863,oe=Math.imul(Kt,fr),H=Math.imul(Kt,Ir),H=H+Math.imul(nr,fr)|0,X=Math.imul(nr,Ir),oe=oe+Math.imul(mt,nn)|0,H=H+Math.imul(mt,wn)|0,H=H+Math.imul(Tt,nn)|0,X=X+Math.imul(Tt,wn)|0;var et=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(et>>>26)|0,et&=67108863,oe=Math.imul(Kt,nn),H=Math.imul(Kt,wn),H=H+Math.imul(nr,nn)|0,X=Math.imul(nr,wn);var hr=(ae+oe|0)+((H&8191)<<13)|0;return ae=(X+(H>>>13)|0)+(hr>>>26)|0,hr&=67108863,re[0]=Un,re[1]=jn,re[2]=Aa,re[3]=ua,re[4]=Qn,re[5]=ei,re[6]=Fa,re[7]=ai,re[8]=Mi,re[9]=ci,re[10]=ba,re[11]=pa,re[12]=Ii,re[13]=ho,re[14]=da,re[15]=Kn,re[16]=ot,re[17]=et,re[18]=hr,ae!==0&&(re[19]=ae,U.length++),U};Math.imul||(C=M);function _(F,P,j){j.negative=P.negative^F.negative,j.length=F.length+P.length;for(var U=0,Z=0,Q=0;Q>>26)|0,Z+=re>>>26,re&=67108863}j.words[Q]=ae,U=re,re=Z}return U!==0?j.words[Q]=U:j.length--,j.strip()}function T(F,P,j){var U=new f;return U.mulp(F,P,j)}s.prototype.mulTo=function(P,j){var U,Z=this.length+P.length;return this.length===10&&P.length===10?U=C(this,P,j):Z<63?U=M(this,P,j):Z<1024?U=_(this,P,j):U=T(this,P,j),U};function f(F,P){this.x=F,this.y=P}f.prototype.makeRBT=function(P){for(var j=new Array(P),U=s.prototype._countBits(P)-1,Z=0;Z>=1;return Z},f.prototype.permute=function(P,j,U,Z,Q,re){for(var ae=0;ae>>1)Q++;return 1<>>13,U[2*re+1]=Q&8191,Q=Q>>>13;for(re=2*j;re>=26,j+=Z/67108864|0,j+=Q>>>26,this.words[U]=Q&67108863}return j!==0&&(this.words[U]=j,this.length++),this.length=P===0?1:this.length,this},s.prototype.muln=function(P){return this.clone().imuln(P)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(P){var j=S(P);if(j.length===0)return new s(1);for(var U=this,Z=0;Z=0);var j=P%26,U=(P-j)/26,Z=67108863>>>26-j<<26-j,Q;if(j!==0){var re=0;for(Q=0;Q>>26-j}re&&(this.words[Q]=re,this.length++)}if(U!==0){for(Q=this.length-1;Q>=0;Q--)this.words[Q+U]=this.words[Q];for(Q=0;Q=0);var Z;j?Z=(j-j%26)/26:Z=0;var Q=P%26,re=Math.min((P-Q)/26,this.length),ae=67108863^67108863>>>Q<re)for(this.length-=re,H=0;H=0&&(X!==0||H>=Z);H--){var K=this.words[H]|0;this.words[H]=X<<26-Q|K>>>Q,X=K&ae}return oe&&X!==0&&(oe.words[oe.length++]=X),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(P,j,U){return n(this.negative===0),this.iushrn(P,j,U)},s.prototype.shln=function(P){return this.clone().ishln(P)},s.prototype.ushln=function(P){return this.clone().iushln(P)},s.prototype.shrn=function(P){return this.clone().ishrn(P)},s.prototype.ushrn=function(P){return this.clone().iushrn(P)},s.prototype.testn=function(P){n(typeof P=="number"&&P>=0);var j=P%26,U=(P-j)/26,Z=1<=0);var j=P%26,U=(P-j)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=U)return this;if(j!==0&&U++,this.length=Math.min(U,this.length),j!==0){var Z=67108863^67108863>>>j<=67108864;j++)this.words[j]-=67108864,j===this.length-1?this.words[j+1]=1:this.words[j+1]++;return this.length=Math.max(this.length,j+1),this},s.prototype.isubn=function(P){if(n(typeof P=="number"),n(P<67108864),P<0)return this.iaddn(-P);if(this.negative!==0)return this.negative=0,this.iaddn(P),this.negative=1,this;if(this.words[0]-=P,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var j=0;j>26)-(oe/67108864|0),this.words[Q+U]=re&67108863}for(;Q>26,this.words[Q+U]=re&67108863;if(ae===0)return this.strip();for(n(ae===-1),ae=0,Q=0;Q>26,this.words[Q]=re&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(P,j){var U=this.length-P.length,Z=this.clone(),Q=P,re=Q.words[Q.length-1]|0,ae=this._countBits(re);U=26-ae,U!==0&&(Q=Q.ushln(U),Z.iushln(U),re=Q.words[Q.length-1]|0);var oe=Z.length-Q.length,H;if(j!=="mod"){H=new s(null),H.length=oe+1,H.words=new Array(H.length);for(var X=0;X=0;G--){var Y=(Z.words[Q.length+G]|0)*67108864+(Z.words[Q.length+G-1]|0);for(Y=Math.min(Y/re|0,67108863),Z._ishlnsubmul(Q,Y,G);Z.negative!==0;)Y--,Z.negative=0,Z._ishlnsubmul(Q,1,G),Z.isZero()||(Z.negative^=1);H&&(H.words[G]=Y)}return H&&H.strip(),Z.strip(),j!=="div"&&U!==0&&Z.iushrn(U),{div:H||null,mod:Z}},s.prototype.divmod=function(P,j,U){if(n(!P.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var Z,Q,re;return this.negative!==0&&P.negative===0?(re=this.neg().divmod(P,j),j!=="mod"&&(Z=re.div.neg()),j!=="div"&&(Q=re.mod.neg(),U&&Q.negative!==0&&Q.iadd(P)),{div:Z,mod:Q}):this.negative===0&&P.negative!==0?(re=this.divmod(P.neg(),j),j!=="mod"&&(Z=re.div.neg()),{div:Z,mod:re.mod}):this.negative&P.negative?(re=this.neg().divmod(P.neg(),j),j!=="div"&&(Q=re.mod.neg(),U&&Q.negative!==0&&Q.isub(P)),{div:re.div,mod:Q}):P.length>this.length||this.cmp(P)<0?{div:new s(0),mod:this}:P.length===1?j==="div"?{div:this.divn(P.words[0]),mod:null}:j==="mod"?{div:null,mod:new s(this.modn(P.words[0]))}:{div:this.divn(P.words[0]),mod:new s(this.modn(P.words[0]))}:this._wordDiv(P,j)},s.prototype.div=function(P){return this.divmod(P,"div",!1).div},s.prototype.mod=function(P){return this.divmod(P,"mod",!1).mod},s.prototype.umod=function(P){return this.divmod(P,"mod",!0).mod},s.prototype.divRound=function(P){var j=this.divmod(P);if(j.mod.isZero())return j.div;var U=j.div.negative!==0?j.mod.isub(P):j.mod,Z=P.ushrn(1),Q=P.andln(1),re=U.cmp(Z);return re<0||Q===1&&re===0?j.div:j.div.negative!==0?j.div.isubn(1):j.div.iaddn(1)},s.prototype.modn=function(P){n(P<=67108863);for(var j=(1<<26)%P,U=0,Z=this.length-1;Z>=0;Z--)U=(j*U+(this.words[Z]|0))%P;return U},s.prototype.idivn=function(P){n(P<=67108863);for(var j=0,U=this.length-1;U>=0;U--){var Z=(this.words[U]|0)+j*67108864;this.words[U]=Z/P|0,j=Z%P}return this.strip()},s.prototype.divn=function(P){return this.clone().idivn(P)},s.prototype.egcd=function(P){n(P.negative===0),n(!P.isZero());var j=this,U=P.clone();j.negative!==0?j=j.umod(P):j=j.clone();for(var Z=new s(1),Q=new s(0),re=new s(0),ae=new s(1),oe=0;j.isEven()&&U.isEven();)j.iushrn(1),U.iushrn(1),++oe;for(var H=U.clone(),X=j.clone();!j.isZero();){for(var K=0,G=1;!(j.words[0]&G)&&K<26;++K,G<<=1);if(K>0)for(j.iushrn(K);K-- >0;)(Z.isOdd()||Q.isOdd())&&(Z.iadd(H),Q.isub(X)),Z.iushrn(1),Q.iushrn(1);for(var Y=0,q=1;!(U.words[0]&q)&&Y<26;++Y,q<<=1);if(Y>0)for(U.iushrn(Y);Y-- >0;)(re.isOdd()||ae.isOdd())&&(re.iadd(H),ae.isub(X)),re.iushrn(1),ae.iushrn(1);j.cmp(U)>=0?(j.isub(U),Z.isub(re),Q.isub(ae)):(U.isub(j),re.isub(Z),ae.isub(Q))}return{a:re,b:ae,gcd:U.iushln(oe)}},s.prototype._invmp=function(P){n(P.negative===0),n(!P.isZero());var j=this,U=P.clone();j.negative!==0?j=j.umod(P):j=j.clone();for(var Z=new s(1),Q=new s(0),re=U.clone();j.cmpn(1)>0&&U.cmpn(1)>0;){for(var ae=0,oe=1;!(j.words[0]&oe)&&ae<26;++ae,oe<<=1);if(ae>0)for(j.iushrn(ae);ae-- >0;)Z.isOdd()&&Z.iadd(re),Z.iushrn(1);for(var H=0,X=1;!(U.words[0]&X)&&H<26;++H,X<<=1);if(H>0)for(U.iushrn(H);H-- >0;)Q.isOdd()&&Q.iadd(re),Q.iushrn(1);j.cmp(U)>=0?(j.isub(U),Z.isub(Q)):(U.isub(j),Q.isub(Z))}var K;return j.cmpn(1)===0?K=Z:K=Q,K.cmpn(0)<0&&K.iadd(P),K},s.prototype.gcd=function(P){if(this.isZero())return P.abs();if(P.isZero())return this.abs();var j=this.clone(),U=P.clone();j.negative=0,U.negative=0;for(var Z=0;j.isEven()&&U.isEven();Z++)j.iushrn(1),U.iushrn(1);do{for(;j.isEven();)j.iushrn(1);for(;U.isEven();)U.iushrn(1);var Q=j.cmp(U);if(Q<0){var re=j;j=U,U=re}else if(Q===0||U.cmpn(1)===0)break;j.isub(U)}while(!0);return U.iushln(Z)},s.prototype.invm=function(P){return this.egcd(P).a.umod(P)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(P){return this.words[0]&P},s.prototype.bincn=function(P){n(typeof P=="number");var j=P%26,U=(P-j)/26,Z=1<>>26,ae&=67108863,this.words[re]=ae}return Q!==0&&(this.words[re]=Q,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(P){var j=P<0;if(this.negative!==0&&!j)return-1;if(this.negative===0&&j)return 1;this.strip();var U;if(this.length>1)U=1;else{j&&(P=-P),n(P<=67108863,"Number is too big");var Z=this.words[0]|0;U=Z===P?0:ZP.length)return 1;if(this.length=0;U--){var Z=this.words[U]|0,Q=P.words[U]|0;if(Z!==Q){ZQ&&(j=1);break}}return j},s.prototype.gtn=function(P){return this.cmpn(P)===1},s.prototype.gt=function(P){return this.cmp(P)===1},s.prototype.gten=function(P){return this.cmpn(P)>=0},s.prototype.gte=function(P){return this.cmp(P)>=0},s.prototype.ltn=function(P){return this.cmpn(P)===-1},s.prototype.lt=function(P){return this.cmp(P)===-1},s.prototype.lten=function(P){return this.cmpn(P)<=0},s.prototype.lte=function(P){return this.cmp(P)<=0},s.prototype.eqn=function(P){return this.cmpn(P)===0},s.prototype.eq=function(P){return this.cmp(P)===0},s.red=function(P){return new R(P)},s.prototype.toRed=function(P){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),P.convertTo(this)._forceRed(P)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(P){return this.red=P,this},s.prototype.forceRed=function(P){return n(!this.red,"Already a number in reduction context"),this._forceRed(P)},s.prototype.redAdd=function(P){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,P)},s.prototype.redIAdd=function(P){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,P)},s.prototype.redSub=function(P){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,P)},s.prototype.redISub=function(P){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,P)},s.prototype.redShl=function(P){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,P)},s.prototype.redMul=function(P){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.mul(this,P)},s.prototype.redIMul=function(P){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.imul(this,P)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(P){return n(this.red&&!P.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,P)};var u={k256:null,p224:null,p192:null,p25519:null};function A(F,P){this.name=F,this.p=new s(P,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}A.prototype._tmp=function(){var P=new s(null);return P.words=new Array(Math.ceil(this.n/13)),P},A.prototype.ireduce=function(P){var j=P,U;do this.split(j,this.tmp),j=this.imulK(j),j=j.iadd(this.tmp),U=j.bitLength();while(U>this.n);var Z=U0?j.isub(this.p):j.strip!==void 0?j.strip():j._strip(),j},A.prototype.split=function(P,j){P.iushrn(this.n,0,j)},A.prototype.imulK=function(P){return P.imul(this.k)};function b(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(b,A),b.prototype.split=function(P,j){for(var U=4194303,Z=Math.min(P.length,9),Q=0;Q>>22,re=ae}re>>>=22,P.words[Q-10]=re,re===0&&P.length>10?P.length-=10:P.length-=9},b.prototype.imulK=function(P){P.words[P.length]=0,P.words[P.length+1]=0,P.length+=2;for(var j=0,U=0;U>>=26,P.words[U]=Q,j=Z}return j!==0&&(P.words[P.length++]=j),P},s._prime=function(P){if(u[P])return u[P];var j;if(P==="k256")j=new b;else if(P==="p224")j=new z;else if(P==="p192")j=new I;else if(P==="p25519")j=new N;else throw new Error("Unknown prime "+P);return u[P]=j,j};function R(F){if(typeof F=="string"){var P=s._prime(F);this.m=P.p,this.prime=P}else n(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}R.prototype._verify1=function(P){n(P.negative===0,"red works only with positives"),n(P.red,"red works only with red numbers")},R.prototype._verify2=function(P,j){n((P.negative|j.negative)===0,"red works only with positives"),n(P.red&&P.red===j.red,"red works only with red numbers")},R.prototype.imod=function(P){return this.prime?this.prime.ireduce(P)._forceRed(this):P.umod(this.m)._forceRed(this)},R.prototype.neg=function(P){return P.isZero()?P.clone():this.m.sub(P)._forceRed(this)},R.prototype.add=function(P,j){this._verify2(P,j);var U=P.add(j);return U.cmp(this.m)>=0&&U.isub(this.m),U._forceRed(this)},R.prototype.iadd=function(P,j){this._verify2(P,j);var U=P.iadd(j);return U.cmp(this.m)>=0&&U.isub(this.m),U},R.prototype.sub=function(P,j){this._verify2(P,j);var U=P.sub(j);return U.cmpn(0)<0&&U.iadd(this.m),U._forceRed(this)},R.prototype.isub=function(P,j){this._verify2(P,j);var U=P.isub(j);return U.cmpn(0)<0&&U.iadd(this.m),U},R.prototype.shl=function(P,j){return this._verify1(P),this.imod(P.ushln(j))},R.prototype.imul=function(P,j){return this._verify2(P,j),this.imod(P.imul(j))},R.prototype.mul=function(P,j){return this._verify2(P,j),this.imod(P.mul(j))},R.prototype.isqr=function(P){return this.imul(P,P.clone())},R.prototype.sqr=function(P){return this.mul(P,P)},R.prototype.sqrt=function(P){if(P.isZero())return P.clone();var j=this.m.andln(3);if(n(j%2===1),j===3){var U=this.m.add(new s(1)).iushrn(2);return this.pow(P,U)}for(var Z=this.m.subn(1),Q=0;!Z.isZero()&&Z.andln(1)===0;)Q++,Z.iushrn(1);n(!Z.isZero());var re=new s(1).toRed(this),ae=re.redNeg(),oe=this.m.subn(1).iushrn(1),H=this.m.bitLength();for(H=new s(2*H*H).toRed(this);this.pow(H,oe).cmp(ae)!==0;)H.redIAdd(ae);for(var X=this.pow(H,Z),K=this.pow(P,Z.addn(1).iushrn(1)),G=this.pow(P,Z),Y=Q;G.cmp(re)!==0;){for(var q=G,$=0;q.cmp(re)!==0;$++)q=q.redSqr();n($=0;Q--){for(var X=j.words[Q],K=H-1;K>=0;K--){var G=X>>K&1;if(re!==Z[0]&&(re=this.sqr(re)),G===0&&ae===0){oe=0;continue}ae<<=1,ae|=G,oe++,!(oe!==U&&(Q!==0||K!==0))&&(re=this.mul(re,Z[ae]),oe=0,ae=0)}H=26}return re},R.prototype.convertTo=function(P){var j=P.umod(this.m);return j===P?j.clone():j},R.prototype.convertFrom=function(P){var j=P.clone();return j.red=null,j},s.mont=function(P){return new B(P)};function B(F){R.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}o(B,R),B.prototype.convertTo=function(P){return this.imod(P.ushln(this.shift))},B.prototype.convertFrom=function(P){var j=this.imod(P.mul(this.rinv));return j.red=null,j},B.prototype.imul=function(P,j){if(P.isZero()||j.isZero())return P.words[0]=0,P.length=1,P;var U=P.imul(j),Z=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub(Z).iushrn(this.shift),re=Q;return Q.cmp(this.m)>=0?re=Q.isub(this.m):Q.cmpn(0)<0&&(re=Q.iadd(this.m)),re._forceRed(this)},B.prototype.mul=function(P,j){if(P.isZero()||j.isZero())return new s(0)._forceRed(this);var U=P.mul(j),Z=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub(Z).iushrn(this.shift),re=Q;return Q.cmp(this.m)>=0?re=Q.isub(this.m):Q.cmpn(0)<0&&(re=Q.iadd(this.m)),re._forceRed(this)},B.prototype.invm=function(P){var j=this.imod(P._invmp(this.m).mul(this.r2));return j._forceRed(this)}}(l,this)},6204:function(l){"use strict";l.exports=e;function e(t){var a,r,n,o=t.length,s=0;for(a=0;a>>1;if(!(f<=0)){var u,A=a.mallocDouble(2*f*_),b=a.mallocInt32(_);if(_=s(w,f,A,b),_>0){if(f===1&&C)r.init(_),u=r.sweepComplete(f,M,0,_,A,b,0,_,A,b);else{var z=a.mallocDouble(2*f*T),I=a.mallocInt32(T);T=s(S,f,z,I),T>0&&(r.init(_+T),f===1?u=r.sweepBipartite(f,M,0,_,A,b,0,T,z,I):u=n(f,M,C,_,A,b,T,z,I),a.free(z),a.free(I))}a.free(A),a.free(b)}return u}}}var m;function h(w,S){m.push([w,S])}function p(w){return m=[],c(w,w,h,!0),m}function g(w,S){return m=[],c(w,S,h,!1),m}function i(w,S,M){switch(arguments.length){case 1:return p(w);case 2:return typeof S=="function"?c(w,w,S,!0):g(w,S);case 3:return c(w,S,M,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(l,e){"use strict";function t(){function n(c,m,h,p,g,i,w,S,M,C,_){for(var T=2*c,f=p,u=T*p;fM-S?n(c,m,h,p,g,i,w,S,M,C,_):o(c,m,h,p,g,i,w,S,M,C,_)}return s}function a(){function n(h,p,g,i,w,S,M,C,_,T,f){for(var u=2*h,A=i,b=u*i;AT-_?i?n(h,p,g,w,S,M,C,_,T,f,u):o(h,p,g,w,S,M,C,_,T,f,u):i?s(h,p,g,w,S,M,C,_,T,f,u):c(h,p,g,w,S,M,C,_,T,f,u)}return m}function r(n){return n?t():a()}e.partial=r(!1),e.full=r(!0)},7150:function(l,e,t){"use strict";l.exports=F;var a=t(1888),r=t(8828),n=t(2455),o=n.partial,s=n.full,c=t(855),m=t(3545),h=t(8105),p=128,g=1<<22,i=1<<22,w=h("!(lo>=p0)&&!(p1>=hi)"),S=h("lo===p0"),M=h("lo0;){X-=1;var Y=X*f,q=b[Y],$=b[Y+1],ee=b[Y+2],ne=b[Y+3],fe=b[Y+4],ye=b[Y+5],xe=X*u,Ae=z[xe],Me=z[xe+1],Ie=ye&1,Ue=!!(ye&16),qe=Q,ke=re,ge=oe,ue=H;if(Ie&&(qe=oe,ke=H,ge=Q,ue=re),!(ye&2&&(ee=M(P,q,$,ee,qe,ke,Me),$>=ee))&&!(ye&4&&($=C(P,q,$,ee,qe,ke,Ae),$>=ee))){var ve=ee-$,se=fe-ne;if(Ue){if(P*ve*(ve+se)h&&g[T+m]>C;--_,T-=w){for(var f=T,u=T+w,A=0;A>>1,C=2*c,_=M,T=g[C*M+m];w=z?(_=b,T=z):A>=N?(_=u,T=A):(_=I,T=N):z>=N?(_=b,T=z):N>=A?(_=u,T=A):(_=I,T=N);for(var F=C*(S-1),P=C*_,R=0;R=p0)&&!(p1>=hi)":m};function t(h){return e[h]}function a(h,p,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=p,A=h+p,b=g;i>b;++b,_+=C){var z=w[_+u];if(z===M)if(f===b)f+=1,T+=C;else{for(var I=0;C>I;++I){var N=w[_+I];w[_+I]=w[T],w[T++]=N}var R=S[b];S[b]=S[f],S[f++]=R}}return f}function r(h,p,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=p,A=h+p,b=g;i>b;++b,_+=C){var z=w[_+u];if(zI;++I){var N=w[_+I];w[_+I]=w[T],w[T++]=N}var R=S[b];S[b]=S[f],S[f++]=R}}return f}function n(h,p,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=p,A=h+p,b=g;i>b;++b,_+=C){var z=w[_+A];if(z<=M)if(f===b)f+=1,T+=C;else{for(var I=0;C>I;++I){var N=w[_+I];w[_+I]=w[T],w[T++]=N}var R=S[b];S[b]=S[f],S[f++]=R}}return f}function o(h,p,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=p,A=h+p,b=g;i>b;++b,_+=C){var z=w[_+A];if(z<=M)if(f===b)f+=1,T+=C;else{for(var I=0;C>I;++I){var N=w[_+I];w[_+I]=w[T],w[T++]=N}var R=S[b];S[b]=S[f],S[f++]=R}}return f}function s(h,p,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=p,A=h+p,b=g;i>b;++b,_+=C){var z=w[_+u],I=w[_+A];if(z<=M&&M<=I)if(f===b)f+=1,T+=C;else{for(var N=0;C>N;++N){var R=w[_+N];w[_+N]=w[T],w[T++]=R}var B=S[b];S[b]=S[f],S[f++]=B}}return f}function c(h,p,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=p,A=h+p,b=g;i>b;++b,_+=C){var z=w[_+u],I=w[_+A];if(zN;++N){var R=w[_+N];w[_+N]=w[T],w[T++]=R}var B=S[b];S[b]=S[f],S[f++]=B}}return f}function m(h,p,g,i,w,S,M,C){for(var _=2*h,T=_*g,f=T,u=g,A=p,b=h+p,z=g;i>z;++z,T+=_){var I=w[T+A],N=w[T+b];if(!(I>=M)&&!(C>=N))if(u===z)u+=1,f+=_;else{for(var R=0;_>R;++R){var B=w[T+R];w[T+R]=w[f],w[f++]=B}var F=S[z];S[z]=S[u],S[u++]=F}}return u}},4192:function(l){"use strict";l.exports=t;var e=32;function t(p,g){g<=4*e?a(0,g-1,p):h(0,g-1,p)}function a(p,g,i){for(var w=2*(p+1),S=p+1;S<=g;++S){for(var M=i[w++],C=i[w++],_=S,T=w-2;_-- >p;){var f=i[T-2],u=i[T-1];if(fi[g+1]:!0}function m(p,g,i,w){p*=2;var S=w[p];return S>1,_=C-w,T=C+w,f=S,u=_,A=C,b=T,z=M,I=p+1,N=g-1,R=0;c(f,u,i)&&(R=f,f=u,u=R),c(b,z,i)&&(R=b,b=z,z=R),c(f,A,i)&&(R=f,f=A,A=R),c(u,A,i)&&(R=u,u=A,A=R),c(f,b,i)&&(R=f,f=b,b=R),c(A,b,i)&&(R=A,A=b,b=R),c(u,z,i)&&(R=u,u=z,z=R),c(u,A,i)&&(R=u,u=A,A=R),c(b,z,i)&&(R=b,b=z,z=R);for(var B=i[2*u],F=i[2*u+1],P=i[2*b],j=i[2*b+1],U=2*f,Z=2*A,Q=2*z,re=2*S,ae=2*C,oe=2*M,H=0;H<2;++H){var X=i[U+H],K=i[Z+H],G=i[Q+H];i[re+H]=X,i[ae+H]=K,i[oe+H]=G}n(_,p,i),n(T,g,i);for(var Y=I;Y<=N;++Y)if(m(Y,B,F,i))Y!==I&&r(Y,I,i),++I;else if(!m(Y,P,j,i))for(;;)if(m(N,P,j,i)){m(N,B,F,i)?(o(Y,I,N,i),++I,--N):(r(Y,N,i),--N);break}else{if(--N>>1;n(w,K);for(var G=0,Y=0,ae=0;ae=o)q=q-o|0,M(h,p,Y--,q);else if(q>=0)M(c,m,G--,q);else if(q<=-o){q=-q-o|0;for(var $=0;$>>1;n(w,K);for(var G=0,Y=0,q=0,ae=0;ae>1===w[2*ae+3]>>1&&(ee=2,ae+=1),$<0){for(var ne=-($>>1)-1,fe=0;fe>1)-1;ee===0?M(c,m,G--,ne):ee===1?M(h,p,Y--,ne):ee===2&&M(g,i,q--,ne)}}}function f(A,b,z,I,N,R,B,F,P,j,U,Z){var Q=0,re=2*A,ae=b,oe=b+A,H=1,X=1;I?X=o:H=o;for(var K=N;K>>1;n(w,$);for(var ee=0,K=0;K<$;++K){var ne=w[2*K+1]|0;if(ne<0){var G=-ne,fe=!1;if(G>=o?(fe=!I,G-=o):(fe=!!I,G-=1),fe)C(c,m,ee++,G);else{var ye=Z[G],xe=re*G,Ae=U[xe+b+1],Me=U[xe+b+1+A];e:for(var Ie=0;Ie>>1;n(w,G);for(var Y=0,oe=0;oe=o)c[Y++]=H-o;else{H-=1;var $=U[H],ee=Q*H,ne=j[ee+b+1],fe=j[ee+b+1+A];e:for(var ye=0;ye=0;--ye)if(c[ye]===H){for(var Ie=ye+1;Ie0;){for(var S=m.pop(),g=m.pop(),M=-1,C=-1,i=p[g],T=1;T=0||(c.flip(g,S),n(s,c,m,M,g,C),n(s,c,m,g,C,M),n(s,c,m,C,S,M),n(s,c,m,S,M,C))}}},5023:function(l,e,t){"use strict";var a=t(2478);l.exports=m;function r(h,p,g,i,w,S,M){this.cells=h,this.neighbor=p,this.flags=i,this.constraint=g,this.active=w,this.next=S,this.boundary=M}var n=r.prototype;function o(h,p){return h[0]-p[0]||h[1]-p[1]||h[2]-p[2]}n.locate=function(){var h=[0,0,0];return function(p,g,i){var w=p,S=g,M=i;return g0||M.length>0;){for(;S.length>0;){var u=S.pop();if(C[u]!==-w){C[u]=w;for(var A=_[u],b=0;b<3;++b){var z=f[3*u+b];z>=0&&C[z]===0&&(T[3*u+b]?M.push(z):(S.push(z),C[z]=w))}}}var I=M;M=S,S=I,M.length=0,w=-w}var N=c(_,C,p);return g?N.concat(i.boundary):N}},8902:function(l,e,t){"use strict";var a=t(2478),r=t(3250)[3],n=0,o=1,s=2;l.exports=M;function c(C,_,T,f,u){this.a=C,this.b=_,this.idx=T,this.lowerIds=f,this.upperIds=u}function m(C,_,T,f){this.a=C,this.b=_,this.type=T,this.idx=f}function h(C,_){var T=C.a[0]-_.a[0]||C.a[1]-_.a[1]||C.type-_.type;return T||C.type!==n&&(T=r(C.a,C.b,_.b),T)?T:C.idx-_.idx}function p(C,_){return r(C.a,C.b,_)}function g(C,_,T,f,u){for(var A=a.lt(_,f,p),b=a.gt(_,f,p),z=A;z1&&r(T[N[B-2]],T[N[B-1]],f)>0;)C.push([N[B-1],N[B-2],u]),B-=1;N.length=B,N.push(u);for(var R=I.upperIds,B=R.length;B>1&&r(T[R[B-2]],T[R[B-1]],f)<0;)C.push([R[B-2],R[B-1],u]),B-=1;R.length=B,R.push(u)}}function i(C,_){var T;return C.a[0]<_.a[0]?T=r(C.a,C.b,_.a):T=r(_.b,_.a,C.a),T||(_.b[0]I[0]&&u.push(new m(I,z,s,A),new m(z,I,o,A))}u.sort(h);for(var N=u[0].a[0]-(1+Math.abs(u[0].a[0]))*Math.pow(2,-52),R=[new c([N,1],[N,0],-1,[],[],[],[])],B=[],A=0,F=u.length;A=0}}(),n.removeTriangle=function(c,m,h){var p=this.stars;o(p[c],m,h),o(p[m],h,c),o(p[h],c,m)},n.addTriangle=function(c,m,h){var p=this.stars;p[c].push(m,h),p[m].push(h,c),p[h].push(c,m)},n.opposite=function(c,m){for(var h=this.stars[m],p=1,g=h.length;p=0;--P){var X=B[P];j=X[0];var K=N[j],G=K[0],Y=K[1],q=I[G],$=I[Y];if((q[0]-$[0]||q[1]-$[1])<0){var ee=G;G=Y,Y=ee}K[0]=G;var ne=K[1]=X[1],fe;for(F&&(fe=K[2]);P>0&&B[P-1][0]===j;){var X=B[--P],ye=X[1];F?N.push([ne,ye,fe]):N.push([ne,ye]),ne=ye}F?N.push([ne,Y,fe]):N.push([ne,Y])}return U}function _(I,N,R){for(var B=N.length,F=new a(B),P=[],j=0;jN[2]?1:0)}function u(I,N,R){if(I.length!==0){if(N)for(var B=0;B0||j.length>0}function z(I,N,R){var B;if(R){B=N;for(var F=new Array(N.length),P=0;PC+1)throw new Error(S+" map requires nshades to be at least size "+w.length);Array.isArray(m.alpha)?m.alpha.length!==2?_=[1,1]:_=m.alpha.slice():typeof m.alpha=="number"?_=[m.alpha,m.alpha]:_=[1,1],h=w.map(function(z){return Math.round(z.index*C)}),_[0]=Math.min(Math.max(_[0],0),1),_[1]=Math.min(Math.max(_[1],0),1);var f=w.map(function(z,I){var N=w[I].index,R=w[I].rgb.slice();return R.length===4&&R[3]>=0&&R[3]<=1||(R[3]=_[0]+(_[1]-_[0])*N),R}),u=[];for(T=0;T=0}function m(h,p,g,i){var w=a(p,g,i);if(w===0){var S=r(a(h,p,g)),M=r(a(h,p,i));if(S===M){if(S===0){var C=c(h,p,g),_=c(h,p,i);return C===_?0:C?1:-1}return 0}else{if(M===0)return S>0||c(h,p,i)?-1:1;if(S===0)return M>0||c(h,p,g)?1:-1}return r(M-S)}var T=a(h,p,g);if(T>0)return w>0&&a(h,p,i)>0?1:-1;if(T<0)return w>0||a(h,p,i)>0?1:-1;var f=a(h,p,i);return f>0||c(h,p,g)?1:-1}},8572:function(l){"use strict";l.exports=function(t){return t<0?-1:t>0?1:0}},8507:function(l){l.exports=a;var e=Math.min;function t(r,n){return r-n}function a(r,n){var o=r.length,s=r.length-n.length;if(s)return s;switch(o){case 0:return 0;case 1:return r[0]-n[0];case 2:return r[0]+r[1]-n[0]-n[1]||e(r[0],r[1])-e(n[0],n[1]);case 3:var c=r[0]+r[1],m=n[0]+n[1];if(s=c+r[2]-(m+n[2]),s)return s;var h=e(r[0],r[1]),p=e(n[0],n[1]);return e(h,r[2])-e(p,n[2])||e(h+r[2],c)-e(p+n[2],m);case 4:var g=r[0],i=r[1],w=r[2],S=r[3],M=n[0],C=n[1],_=n[2],T=n[3];return g+i+w+S-(M+C+_+T)||e(g,i,w,S)-e(M,C,_,T,M)||e(g+i,g+w,g+S,i+w,i+S,w+S)-e(M+C,M+_,M+T,C+_,C+T,_+T)||e(g+i+w,g+i+S,g+w+S,i+w+S)-e(M+C+_,M+C+T,M+_+T,C+_+T);default:for(var f=r.slice().sort(t),u=n.slice().sort(t),A=0;At[r][0]&&(r=n);return ar?[[r],[a]]:[[a]]}},4750:function(l,e,t){"use strict";l.exports=r;var a=t(3090);function r(n){var o=a(n),s=o.length;if(s<=2)return[];for(var c=new Array(s),m=o[s-1],h=0;h=m[M]&&(S+=1);i[w]=S}}return c}function s(c,m){try{return a(c,!0)}catch{var h=r(c);if(h.length<=m)return[];var p=n(c,h),g=a(p,!0);return o(g,h)}}},4769:function(l){"use strict";function e(a,r,n,o,s,c){var m=6*s*s-6*s,h=3*s*s-4*s+1,p=-6*s*s+6*s,g=3*s*s-2*s;if(a.length){c||(c=new Array(a.length));for(var i=a.length-1;i>=0;--i)c[i]=m*a[i]+h*r[i]+p*n[i]+g*o[i];return c}return m*a+h*r+p*n[i]+g*o}function t(a,r,n,o,s,c){var m=s-1,h=s*s,p=m*m,g=(1+2*s)*p,i=s*p,w=h*(3-2*s),S=h*m;if(a.length){c||(c=new Array(a.length));for(var M=a.length-1;M>=0;--M)c[M]=g*a[M]+i*r[M]+w*n[M]+S*o[M];return c}return g*a+i*r+w*n+S*o}l.exports=t,l.exports.derivative=e},7642:function(l,e,t){"use strict";var a=t(8954),r=t(1682);l.exports=c;function n(m,h){this.point=m,this.index=h}function o(m,h){for(var p=m.point,g=h.point,i=p.length,w=0;w=2)return!1;R[F]=P}return!0}):N=N.filter(function(R){for(var B=0;B<=g;++B){var F=A[R[B]];if(F<0)return!1;R[B]=F}return!0}),g&1)for(var S=0;S>>31},l.exports.exponent=function(w){var S=l.exports.hi(w);return(S<<1>>>21)-1023},l.exports.fraction=function(w){var S=l.exports.lo(w),M=l.exports.hi(w),C=M&(1<<20)-1;return M&2146435072&&(C+=1048576),[S,C]},l.exports.denormalized=function(w){var S=l.exports.hi(w);return!(S&2146435072)}},1338:function(l){"use strict";function e(r,n,o){var s=r[o]|0;if(s<=0)return[];var c=new Array(s),m;if(o===r.length-1)for(m=0;m"u"&&(n=0),typeof r){case"number":if(r>0)return t(r|0,n);break;case"object":if(typeof r.length=="number")return e(r,n,0);break}return[]}l.exports=a},3134:function(l,e,t){"use strict";l.exports=r;var a=t(1682);function r(n,o){var s=n.length;if(typeof o!="number"){o=0;for(var c=0;c=g-1)for(var T=S.length-1,u=h-p[g-1],f=0;f=g-1)for(var _=S.length-1,T=h-p[g-1],f=0;f=0;--g)if(h[--p])return!1;return!0},s.jump=function(h){var p=this.lastT(),g=this.dimension;if(!(h0;--f)i.push(n(C[f-1],_[f-1],arguments[f])),w.push(0)}},s.push=function(h){var p=this.lastT(),g=this.dimension;if(!(h1e-6?1/M:0;this._time.push(h);for(var u=g;u>0;--u){var A=n(_[u-1],T[u-1],arguments[u]);i.push(A),w.push((A-i[S++])*f)}}},s.set=function(h){var p=this.dimension;if(!(h0;--C)g.push(n(S[C-1],M[C-1],arguments[C])),i.push(0)}},s.move=function(h){var p=this.lastT(),g=this.dimension;if(!(h<=p||arguments.length!==g+1)){var i=this._state,w=this._velocity,S=i.length-this.dimension,M=this.bounds,C=M[0],_=M[1],T=h-p,f=T>1e-6?1/T:0;this._time.push(h);for(var u=g;u>0;--u){var A=arguments[u];i.push(n(C[u-1],_[u-1],i[S++]+A)),w.push(A*f)}}},s.idle=function(h){var p=this.lastT();if(!(h=0;--f)i.push(n(C[f],_[f],i[S]+T*w[S])),w.push(0),S+=1}};function c(h){for(var p=new Array(h),g=0;g=0;--I){var u=A[I];b[I]<=0?A[I]=new a(u._color,u.key,u.value,A[I+1],u.right,u._count+1):A[I]=new a(u._color,u.key,u.value,u.left,A[I+1],u._count+1)}for(var I=A.length-1;I>1;--I){var N=A[I-1],u=A[I];if(N._color===t||u._color===t)break;var R=A[I-2];if(R.left===N)if(N.left===u){var B=R.right;if(B&&B._color===e)N._color=t,R.right=n(t,B),R._color=e,I-=1;else{if(R._color=e,R.left=N.right,N._color=t,N.right=R,A[I-2]=N,A[I-1]=u,o(R),o(N),I>=3){var F=A[I-3];F.left===R?F.left=N:F.right=N}break}}else{var B=R.right;if(B&&B._color===e)N._color=t,R.right=n(t,B),R._color=e,I-=1;else{if(N.right=u.left,R._color=e,R.left=u.right,u._color=t,u.left=N,u.right=R,A[I-2]=u,A[I-1]=N,o(R),o(N),o(u),I>=3){var F=A[I-3];F.left===R?F.left=u:F.right=u}break}}else if(N.right===u){var B=R.left;if(B&&B._color===e)N._color=t,R.left=n(t,B),R._color=e,I-=1;else{if(R._color=e,R.right=N.left,N._color=t,N.left=R,A[I-2]=N,A[I-1]=u,o(R),o(N),I>=3){var F=A[I-3];F.right===R?F.right=N:F.left=N}break}}else{var B=R.left;if(B&&B._color===e)N._color=t,R.left=n(t,B),R._color=e,I-=1;else{if(N.left=u.right,R._color=e,R.right=u.left,u._color=t,u.right=N,u.left=R,A[I-2]=u,A[I-1]=N,o(R),o(N),o(u),I>=3){var F=A[I-3];F.right===R?F.right=u:F.left=u}break}}}return A[0]._color=t,new s(f,A[0])};function m(_,T){if(T.left){var f=m(_,T.left);if(f)return f}var f=_(T.key,T.value);if(f)return f;if(T.right)return m(_,T.right)}function h(_,T,f,u){var A=T(_,u.key);if(A<=0){if(u.left){var b=h(_,T,f,u.left);if(b)return b}var b=f(u.key,u.value);if(b)return b}if(u.right)return h(_,T,f,u.right)}function p(_,T,f,u,A){var b=f(_,A.key),z=f(T,A.key),I;if(b<=0&&(A.left&&(I=p(_,T,f,u,A.left),I)||z>0&&(I=u(A.key,A.value),I)))return I;if(z>0&&A.right)return p(_,T,f,u,A.right)}c.forEach=function(T,f,u){if(this.root)switch(arguments.length){case 1:return m(T,this.root);case 2:return h(f,this._compare,T,this.root);case 3:return this._compare(f,u)>=0?void 0:p(f,u,this._compare,T,this.root)}},Object.defineProperty(c,"begin",{get:function(){for(var _=[],T=this.root;T;)_.push(T),T=T.left;return new g(this,_)}}),Object.defineProperty(c,"end",{get:function(){for(var _=[],T=this.root;T;)_.push(T),T=T.right;return new g(this,_)}}),c.at=function(_){if(_<0)return new g(this,[]);for(var T=this.root,f=[];;){if(f.push(T),T.left){if(_=T.right._count)break;T=T.right}else break}return new g(this,[])},c.ge=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var b=T(_,f.key);u.push(f),b<=0&&(A=u.length),b<=0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.gt=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var b=T(_,f.key);u.push(f),b<0&&(A=u.length),b<0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.lt=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var b=T(_,f.key);u.push(f),b>0&&(A=u.length),b<=0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.le=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var b=T(_,f.key);u.push(f),b>=0&&(A=u.length),b<0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.find=function(_){for(var T=this._compare,f=this.root,u=[];f;){var A=T(_,f.key);if(u.push(f),A===0)return new g(this,u);A<=0?f=f.left:f=f.right}return new g(this,[])},c.remove=function(_){var T=this.find(_);return T?T.remove():this},c.get=function(_){for(var T=this._compare,f=this.root;f;){var u=T(_,f.key);if(u===0)return f.value;u<=0?f=f.left:f=f.right}};function g(_,T){this.tree=_,this._stack=T}var i=g.prototype;Object.defineProperty(i,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(i,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),i.clone=function(){return new g(this.tree,this._stack.slice())};function w(_,T){_.key=T.key,_.value=T.value,_.left=T.left,_.right=T.right,_._color=T._color,_._count=T._count}function S(_){for(var T,f,u,A,b=_.length-1;b>=0;--b){if(T=_[b],b===0){T._color=t;return}if(f=_[b-1],f.left===T){if(u=f.right,u.right&&u.right._color===e){if(u=f.right=r(u),A=u.right=r(u.right),f.right=u.left,u.left=f,u.right=A,u._color=f._color,T._color=t,f._color=t,A._color=t,o(f),o(u),b>1){var z=_[b-2];z.left===f?z.left=u:z.right=u}_[b-1]=u;return}else if(u.left&&u.left._color===e){if(u=f.right=r(u),A=u.left=r(u.left),f.right=A.left,u.left=A.right,A.left=f,A.right=u,A._color=f._color,f._color=t,u._color=t,T._color=t,o(f),o(u),o(A),b>1){var z=_[b-2];z.left===f?z.left=A:z.right=A}_[b-1]=A;return}if(u._color===t)if(f._color===e){f._color=t,f.right=n(e,u);return}else{f.right=n(e,u);continue}else{if(u=r(u),f.right=u.left,u.left=f,u._color=f._color,f._color=e,o(f),o(u),b>1){var z=_[b-2];z.left===f?z.left=u:z.right=u}_[b-1]=u,_[b]=f,b+1<_.length?_[b+1]=T:_.push(T),b=b+2}}else{if(u=f.left,u.left&&u.left._color===e){if(u=f.left=r(u),A=u.left=r(u.left),f.left=u.right,u.right=f,u.left=A,u._color=f._color,T._color=t,f._color=t,A._color=t,o(f),o(u),b>1){var z=_[b-2];z.right===f?z.right=u:z.left=u}_[b-1]=u;return}else if(u.right&&u.right._color===e){if(u=f.left=r(u),A=u.right=r(u.right),f.left=A.right,u.right=A.left,A.right=f,A.left=u,A._color=f._color,f._color=t,u._color=t,T._color=t,o(f),o(u),o(A),b>1){var z=_[b-2];z.right===f?z.right=A:z.left=A}_[b-1]=A;return}if(u._color===t)if(f._color===e){f._color=t,f.left=n(e,u);return}else{f.left=n(e,u);continue}else{if(u=r(u),f.left=u.right,u.right=f,u._color=f._color,f._color=e,o(f),o(u),b>1){var z=_[b-2];z.right===f?z.right=u:z.left=u}_[b-1]=u,_[b]=f,b+1<_.length?_[b+1]=T:_.push(T),b=b+2}}}}i.remove=function(){var _=this._stack;if(_.length===0)return this.tree;var T=new Array(_.length),f=_[_.length-1];T[T.length-1]=new a(f._color,f.key,f.value,f.left,f.right,f._count);for(var u=_.length-2;u>=0;--u){var f=_[u];f.left===_[u+1]?T[u]=new a(f._color,f.key,f.value,T[u+1],f.right,f._count):T[u]=new a(f._color,f.key,f.value,f.left,T[u+1],f._count)}if(f=T[T.length-1],f.left&&f.right){var A=T.length;for(f=f.left;f.right;)T.push(f),f=f.right;var b=T[A-1];T.push(new a(f._color,b.key,b.value,f.left,f.right,f._count)),T[A-1].key=f.key,T[A-1].value=f.value;for(var u=T.length-2;u>=A;--u)f=T[u],T[u]=new a(f._color,f.key,f.value,f.left,T[u+1],f._count);T[A-1].left=T[A]}if(f=T[T.length-1],f._color===e){var z=T[T.length-2];z.left===f?z.left=null:z.right===f&&(z.right=null),T.pop();for(var u=0;u0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(i,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(i,"index",{get:function(){var _=0,T=this._stack;if(T.length===0){var f=this.tree.root;return f?f._count:0}else T[T.length-1].left&&(_=T[T.length-1].left._count);for(var u=T.length-2;u>=0;--u)T[u+1]===T[u].right&&(++_,T[u].left&&(_+=T[u].left._count));return _},enumerable:!0}),i.next=function(){var _=this._stack;if(_.length!==0){var T=_[_.length-1];if(T.right)for(T=T.right;T;)_.push(T),T=T.left;else for(_.pop();_.length>0&&_[_.length-1].right===T;)T=_[_.length-1],_.pop()}},Object.defineProperty(i,"hasNext",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].right)return!0;for(var T=_.length-1;T>0;--T)if(_[T-1].left===_[T])return!0;return!1}}),i.update=function(_){var T=this._stack;if(T.length===0)throw new Error("Can't update empty node!");var f=new Array(T.length),u=T[T.length-1];f[f.length-1]=new a(u._color,u.key,_,u.left,u.right,u._count);for(var A=T.length-2;A>=0;--A)u=T[A],u.left===T[A+1]?f[A]=new a(u._color,u.key,u.value,f[A+1],u.right,u._count):f[A]=new a(u._color,u.key,u.value,u.left,f[A+1],u._count);return new s(this.tree._compare,f[0])},i.prev=function(){var _=this._stack;if(_.length!==0){var T=_[_.length-1];if(T.left)for(T=T.left;T;)_.push(T),T=T.right;else for(_.pop();_.length>0&&_[_.length-1].left===T;)T=_[_.length-1],_.pop()}},Object.defineProperty(i,"hasPrev",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].left)return!0;for(var T=_.length-1;T>0;--T)if(_[T-1].right===_[T])return!0;return!1}});function M(_,T){return _T?1:0}function C(_){return new s(_||M,null)}},3837:function(l,e,t){"use strict";l.exports=I;var a=t(4935),r=t(501),n=t(5304),o=t(6429),s=t(6444),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),m=ArrayBuffer,h=DataView;function p(N){return m.isView(N)&&!(N instanceof h)}function g(N){return Array.isArray(N)||p(N)}function i(N,R){return N[0]=R[0],N[1]=R[1],N[2]=R[2],N}function w(N){this.gl=N,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=n(N)}var S=w.prototype;S.update=function(N){N=N||{};function R(G,Y,q){if(q in N){var $=N[q],ee=this[q],ne;(G?g($)&&g($[0]):g($))?this[q]=ne=[Y($[0]),Y($[1]),Y($[2])]:this[q]=ne=[Y($),Y($),Y($)];for(var fe=0;fe<3;++fe)if(ne[fe]!==ee[fe])return!0}return!1}var B=R.bind(this,!1,Number),F=R.bind(this,!1,Boolean),P=R.bind(this,!1,String),j=R.bind(this,!0,function(G){if(g(G)){if(G.length===3)return[+G[0],+G[1],+G[2],1];if(G.length===4)return[+G[0],+G[1],+G[2],+G[3]]}return[0,0,0,1]}),U,Z=!1,Q=!1;if("bounds"in N)for(var re=N.bounds,ae=0;ae<2;++ae)for(var oe=0;oe<3;++oe)re[ae][oe]!==this.bounds[ae][oe]&&(Q=!0),this.bounds[ae][oe]=re[ae][oe];if("ticks"in N){U=N.ticks,Z=!0,this.autoTicks=!1;for(var ae=0;ae<3;++ae)this.tickSpacing[ae]=0}else B("tickSpacing")&&(this.autoTicks=!0,Q=!0);if(this._firstInit&&("ticks"in N||"tickSpacing"in N||(this.autoTicks=!0),Q=!0,Z=!0,this._firstInit=!1),Q&&this.autoTicks&&(U=s.create(this.bounds,this.tickSpacing),Z=!0),Z){for(var ae=0;ae<3;++ae)U[ae].sort(function(Y,q){return Y.x-q.x});s.equal(U,this.ticks)?Z=!1:this.ticks=U}F("tickEnable"),P("tickFont")&&(Z=!0),P("tickFontStyle")&&(Z=!0),P("tickFontWeight")&&(Z=!0),P("tickFontVariant")&&(Z=!0),B("tickSize"),B("tickAngle"),B("tickPad"),j("tickColor");var H=P("labels");P("labelFont")&&(H=!0),P("labelFontStyle")&&(H=!0),P("labelFontWeight")&&(H=!0),P("labelFontVariant")&&(H=!0),F("labelEnable"),B("labelSize"),B("labelPad"),j("labelColor"),F("lineEnable"),F("lineMirror"),B("lineWidth"),j("lineColor"),F("lineTickEnable"),F("lineTickMirror"),B("lineTickLength"),B("lineTickWidth"),j("lineTickColor"),F("gridEnable"),B("gridWidth"),j("gridColor"),F("zeroEnable"),j("zeroLineColor"),B("zeroLineWidth"),F("backgroundEnable"),j("backgroundColor");var X=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],K=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(H||Z)&&this._text.update(this.bounds,this.labels,X,this.ticks,K):this._text=a(this.gl,this.bounds,this.labels,X,this.ticks,K),this._lines&&Z&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=r(this.gl,this.bounds,this.ticks))};function M(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var C=[new M,new M,new M];function _(N,R,B,F,P){for(var j=N.primalOffset,U=N.primalMinor,Z=N.mirrorOffset,Q=N.mirrorMinor,re=F[R],ae=0;ae<3;++ae)if(R!==ae){var oe=j,H=Z,X=U,K=Q;re&1<0?(X[ae]=-1,K[ae]=0):(X[ae]=0,K[ae]=1)}}var T=[0,0,0],f={model:c,view:c,projection:c,_ortho:!1};S.isOpaque=function(){return!0},S.isTransparent=function(){return!1},S.drawTransparent=function(N){};var u=0,A=[0,0,0],b=[0,0,0],z=[0,0,0];S.draw=function(N){N=N||f;for(var q=this.gl,R=N.model||c,B=N.view||c,F=N.projection||c,P=this.bounds,j=N._ortho||!1,U=o(R,B,F,P,j),Z=U.cubeEdges,Q=U.axis,re=B[12],ae=B[13],oe=B[14],H=B[15],X=j?2:1,K=X*this.pixelRatio*(F[3]*re+F[7]*ae+F[11]*oe+F[15]*H)/q.drawingBufferHeight,G=0;G<3;++G)this.lastCubeProps.cubeEdges[G]=Z[G],this.lastCubeProps.axis[G]=Q[G];for(var Y=C,G=0;G<3;++G)_(C[G],G,this.bounds,Z,Q);for(var q=this.gl,$=T,G=0;G<3;++G)this.backgroundEnable[G]?$[G]=Q[G]:$[G]=0;this._background.draw(R,B,F,P,$,this.backgroundColor),this._lines.bind(R,B,F,this);for(var G=0;G<3;++G){var ee=[0,0,0];Q[G]>0?ee[G]=P[1][G]:ee[G]=P[0][G];for(var ne=0;ne<2;++ne){var fe=(G+1+ne)%3,ye=(G+1+(ne^1))%3;this.gridEnable[fe]&&this._lines.drawGrid(fe,ye,this.bounds,ee,this.gridColor[fe],this.gridWidth[fe]*this.pixelRatio)}for(var ne=0;ne<2;++ne){var fe=(G+1+ne)%3,ye=(G+1+(ne^1))%3;this.zeroEnable[ye]&&Math.min(P[0][ye],P[1][ye])<=0&&Math.max(P[0][ye],P[1][ye])>=0&&this._lines.drawZero(fe,ye,this.bounds,ee,this.zeroLineColor[ye],this.zeroLineWidth[ye]*this.pixelRatio)}}for(var G=0;G<3;++G){this.lineEnable[G]&&this._lines.drawAxisLine(G,this.bounds,Y[G].primalOffset,this.lineColor[G],this.lineWidth[G]*this.pixelRatio),this.lineMirror[G]&&this._lines.drawAxisLine(G,this.bounds,Y[G].mirrorOffset,this.lineColor[G],this.lineWidth[G]*this.pixelRatio);for(var xe=i(A,Y[G].primalMinor),Ae=i(b,Y[G].mirrorMinor),Me=this.lineTickLength,ne=0;ne<3;++ne){var Ie=K/R[5*ne];xe[ne]*=Me[ne]*Ie,Ae[ne]*=Me[ne]*Ie}this.lineTickEnable[G]&&this._lines.drawAxisTicks(G,Y[G].primalOffset,xe,this.lineTickColor[G],this.lineTickWidth[G]*this.pixelRatio),this.lineTickMirror[G]&&this._lines.drawAxisTicks(G,Y[G].mirrorOffset,Ae,this.lineTickColor[G],this.lineTickWidth[G]*this.pixelRatio)}this._lines.unbind(),this._text.bind(R,B,F,this.pixelRatio);var Ue,qe=.5,ke,ge;function ue(Ge){ge=[0,0,0],ge[Ge]=1}function ve(Ge,gt,mt){var Tt=(Ge+1)%3,At=(Ge+2)%3,Kt=gt[Tt],nr=gt[At],_r=mt[Tt],Zt=mt[At];if(Kt>0&&Zt>0){ue(Tt);return}else if(Kt>0&&Zt<0){ue(Tt);return}else if(Kt<0&&Zt>0){ue(Tt);return}else if(Kt<0&&Zt<0){ue(Tt);return}else if(nr>0&&_r>0){ue(At);return}else if(nr>0&&_r<0){ue(At);return}else if(nr<0&&_r>0){ue(At);return}else if(nr<0&&_r<0){ue(At);return}}for(var G=0;G<3;++G){for(var se=Y[G].primalMinor,Te=Y[G].mirrorMinor,Fe=i(z,Y[G].primalOffset),ne=0;ne<3;++ne)this.lineTickEnable[G]&&(Fe[ne]+=K*se[ne]*Math.max(this.lineTickLength[ne],0)/R[5*ne]);var We=[0,0,0];if(We[G]=1,this.tickEnable[G]){this.tickAngle[G]===-3600?(this.tickAngle[G]=0,this.tickAlign[G]="auto"):this.tickAlign[G]=-1,ke=1,Ue=[this.tickAlign[G],qe,ke],Ue[0]==="auto"?Ue[0]=u:Ue[0]=parseInt(""+Ue[0]),ge=[0,0,0],ve(G,se,Te);for(var ne=0;ne<3;++ne)Fe[ne]+=K*se[ne]*this.tickPad[ne]/R[5*ne];this._text.drawTicks(G,this.tickSize[G],this.tickAngle[G],Fe,this.tickColor[G],We,ge,Ue)}if(this.labelEnable[G]){ke=0,ge=[0,0,0],this.labels[G].length>4&&(ue(G),ke=1),Ue=[this.labelAlign[G],qe,ke],Ue[0]==="auto"?Ue[0]=u:Ue[0]=parseInt(""+Ue[0]);for(var ne=0;ne<3;++ne)Fe[ne]+=K*se[ne]*this.labelPad[ne]/R[5*ne];Fe[G]+=.5*(P[0][G]+P[1][G]),this._text.drawLabel(G,this.labelSize[G],this.labelAngle[G],Fe,this.labelColor[G],[0,0,0],ge,Ue)}}this._text.unbind()},S.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function I(N,R){var B=new w(N);return B.update(R),B}},5304:function(l,e,t){"use strict";l.exports=c;var a=t(2762),r=t(8116),n=t(1879).bg;function o(m,h,p,g){this.gl=m,this.buffer=h,this.vao=p,this.shader=g}var s=o.prototype;s.draw=function(m,h,p,g,i,w){for(var S=!1,M=0;M<3;++M)S=S||i[M];if(S){var C=this.gl;C.enable(C.POLYGON_OFFSET_FILL),C.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:m,view:h,projection:p,bounds:g,enable:i,colors:w},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),C.disable(C.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function c(m){for(var h=[],p=[],g=0,i=0;i<3;++i)for(var w=(i+1)%3,S=(i+2)%3,M=[0,0,0],C=[0,0,0],_=-1;_<=1;_+=2){p.push(g,g+2,g+1,g+1,g+2,g+3),M[i]=_,C[i]=_;for(var T=-1;T<=1;T+=2){M[w]=T;for(var f=-1;f<=1;f+=2)M[S]=f,h.push(M[0],M[1],M[2],C[0],C[1],C[2]),g+=1}var u=w;w=S,S=u}var A=a(m,new Float32Array(h)),b=a(m,new Uint16Array(p),m.ELEMENT_ARRAY_BUFFER),z=r(m,[{buffer:A,type:m.FLOAT,size:3,offset:0,stride:24},{buffer:A,type:m.FLOAT,size:3,offset:12,stride:24}],b),I=n(m);return I.attributes.position.location=0,I.attributes.normal.location=1,new o(m,A,z,I)}},6429:function(l,e,t){"use strict";l.exports=_;var a=t(8828),r=t(6760),n=t(5202),o=t(3250),s=new Array(16),c=new Array(8),m=new Array(8),h=new Array(3),p=[0,0,0];(function(){for(var T=0;T<8;++T)c[T]=[1,1,1,1],m[T]=[1,1,1]})();function g(T,f,u){for(var A=0;A<4;++A){T[A]=u[12+A];for(var b=0;b<3;++b)T[A]+=f[b]*u[4*b+A]}}var i=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function w(T){for(var f=0;fQ&&(B|=1<Q){B|=1<m[I][1])&&(Y=I);for(var q=-1,I=0;I<3;++I){var $=Y^1<m[ee][0]&&(ee=$)}}var ne=S;ne[0]=ne[1]=ne[2]=0,ne[a.log2(q^Y)]=Y&q,ne[a.log2(Y^ee)]=Yⅇvar fe=ee^7;fe===B||fe===G?(fe=q^7,ne[a.log2(ee^fe)]=fe&ee):ne[a.log2(q^fe)]=fe&q;for(var ye=M,xe=B,j=0;j<3;++j)xe&1<0}function E(s){var c=0,g=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(c=3);c]*>/,l=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,e=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,n=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,r=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function a(s){var c=s.match(e),g=s.match(t),f=s.match(n);return{width:c&&(c[1]||c[2]),height:g&&(g[1]||g[2]),viewbox:f&&(f[1]||f[2])}}function o(s){return r.test(s)?s.match(r)[0]:"px"}H.exports=function(s){if(E(s)){for(var c="",g=0;g>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function a(o,s){return{width:(o[s+6]<<16|o[s+5]<<8|o[s+4])+1,height:(o[s+9]<<16|o[s+8]<<8|o[s+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}H.exports=function(o){if(!(o.length<16)&&!(!x(o,0,e)||!x(o,8,t))){var s=12,c=null,g=0,f=k(o,4)+8;if(!(f>o.length)){for(;s+8=10?c=c||n(o,s+8):p==="VP8L"&&m>=5?c=c||r(o,s+8):p==="VP8X"&&m>=10?c=c||a(o,s+8):p==="EXIF"&&(g=l.get_orientation(o.slice(s+8,s+8+m)),s=1/0),s+=8+m}if(c)return g>0&&(c.orientation=g),c}}}}}),Ek=Ee({"node_modules/probe-image-size/lib/parsers_sync.js"(J,H){"use strict";H.exports={avif:gk(),bmp:yk(),gif:_k(),ico:bk(),jpeg:xk(),png:wk(),psd:Tk(),svg:Ak(),tiff:Mk(),webp:Sk()}}}),kk=Ee({"node_modules/probe-image-size/sync.js"(J,H){"use strict";var v=Ek();function x(E){for(var k=Object.keys(v),l=0;l0&&e.height>0?e:null}return null}H.exports=function(k){return x(k)},H.exports.parsers=v}}),Ck=Ee({"src/traces/image/helpers.js"(J){"use strict";var H=kk(),v=yd().IMAGE_URL_PREFIX,x=Nv().Buffer;J.getImageSize=function(E){var k=E.replace(v,""),l=new x(k,"base64");return H(l)}}}),Lk=Ee({"src/traces/image/calc.js"(J,H){"use strict";var v=Vr(),x=Zp(),E=mi(),k=uo(),l=Vr().maxRowLength,e=Ck().getImageSize;H.exports=function(o,s){var c,g;if(s._hasZ)c=s.z.length,g=l(s.z);else if(s._hasSource){var f=e(s.source);c=f.height,g=f.width}var p=k.getFromId(o,s.xaxis||"x"),m=k.getFromId(o,s.yaxis||"y"),i=p.d2c(s.x0)-s.dx/2,T=m.d2c(s.y0)-s.dy/2,S,M=[i,i+g*s.dx],C=[T,T+c*s.dy];if(p&&p.type==="log")for(S=0;S0;)z=c.c2p(C+B*u),B--;for(B=0;N===void 0&&B0;)R=g.c2p(_+B*A),B--;if(zV[0];if($||K){var G=b+P/2,X=N+j/2;ne+="transform:"+E(G+"px",X+"px")+"scale("+($?-1:1)+","+(K?-1:1)+")"+E(-G+"px",-X+"px")+";"}}re.attr("style",ne);var q=new Promise(function(W){if(T._hasZ)W();else if(T._hasSource)if(T._canvas&&T._canvas.el.width===w&&T._canvas.el.height===h&&T._canvas.source===T.source)W();else{var ee=document.createElement("canvas");ee.width=w,ee.height=h;var ae=ee.getContext("2d",{willReadFrequently:!0});T._image=T._image||new Image;var fe=T._image;fe.onload=function(){ae.drawImage(fe,0,0),T._canvas={el:ee,source:T.source},W()},fe.setAttribute("src",T.source)}}).then(function(){var W,ee;if(T._hasZ)ee=Q(function(ye,xe){var Ae=M[xe][ye];return x.isTypedArray(Ae)&&(Ae=Array.from(Ae)),Ae}),W=ee.toDataURL("image/png");else if(T._hasSource)if(S)W=T.source;else{var ae=T._canvas.el.getContext("2d",{willReadFrequently:!0}),fe=ae.getImageData(0,0,w,h).data;ee=Q(function(ye,xe){var Ae=4*(xe*w+ye);return[fe[Ae],fe[Ae+1],fe[Ae+2],fe[Ae+3]]}),W=ee.toDataURL("image/png")}re.attr({"xlink:href":W,height:j,width:P,x:b,y:N})});r._promises.push(q)})}}}),Dk=Ee({"src/traces/image/style.js"(J,H){"use strict";var v=Va();H.exports=function(E){v.select(E).selectAll(".im image").style("opacity",function(k){return k[0].trace.opacity})}}}),Ik=Ee({"src/traces/image/hover.js"(J,H){"use strict";var v=$l(),x=Vr(),E=x.isArrayOrTypedArray,k=Zp();H.exports=function(e,t,n){var r=e.cd[0],a=r.trace,o=e.xa,s=e.ya;if(!(v.inbox(t-r.x0,t-(r.x0+r.w*a.dx),0)>0||v.inbox(n-r.y0,n-(r.y0+r.h*a.dy),0)>0)){var c=Math.floor((t-r.x0)/a.dx),g=Math.floor(Math.abs(n-r.y0)/a.dy),f;if(a._hasZ?f=r.z[g][c]:a._hasSource&&(f=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(c,g,1,1).data),!!f){var p=r.hi||a.hoverinfo,m;if(p){var i=p.split("+");i.indexOf("all")!==-1&&(i=["color"]),i.indexOf("color")!==-1&&(m=!0)}var T=k.colormodel[a.colormodel],S=T.colormodel||a.colormodel,M=S.length,C=a._scaler(f),_=T.suffix,w=[];(a.hovertemplate||m)&&(w.push("["+[C[0]+_[0],C[1]+_[1],C[2]+_[2]].join(", ")),M===4&&w.push(", "+C[3]+_[3]),w.push("]"),w=w.join(""),e.extraText=S.toUpperCase()+": "+w);var h;E(a.hovertext)&&E(a.hovertext[g])?h=a.hovertext[g][c]:E(a.text)&&E(a.text[g])&&(h=a.text[g][c]);var u=s.c2p(r.y0+(g+.5)*a.dy),A=r.x0+(c+.5)*a.dx,b=r.y0+(g+.5)*a.dy,z="["+f.slice(0,a.colormodel.length).join(", ")+"]";return[x.extendFlat(e,{index:[g,c],x0:o.c2p(r.x0+c*a.dx),x1:o.c2p(r.x0+(c+1)*a.dx),y0:u,y1:u,color:C,xVal:A,xLabelVal:A,yVal:b,yLabelVal:b,zLabelVal:z,text:h,hovertemplateLabels:{zLabel:z,colorLabel:w,"color[0]Label":C[0]+_[0],"color[1]Label":C[1]+_[1],"color[2]Label":C[2]+_[2],"color[3]Label":C[3]+_[3]}})]}}}}}),Rk=Ee({"src/traces/image/event_data.js"(J,H){"use strict";H.exports=function(x,E){return"xVal"in E&&(x.x=E.xVal),"yVal"in E&&(x.y=E.yVal),E.xa&&(x.xaxis=E.xa),E.ya&&(x.yaxis=E.ya),x.color=E.color,x.colormodel=E.trace.colormodel,x.z||(x.z=E.color),x}}}),Fk=Ee({"src/traces/image/index.js"(J,H){"use strict";H.exports={attributes:(f2(),tn(C1)).default,supplyDefaults:pE(),calc:Lk(),plot:Pk(),style:Dk(),hoverPoints:Ik(),eventData:Rk(),moduleType:"trace",name:"image",basePlotModule:Mu(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),zk=Ee({"lib/image.js"(J,H){"use strict";H.exports=Fk()}}),Vv=Ee({"src/traces/pie/attributes.js"(J,H){"use strict";var v=nn(),x=kl().attributes,E=Xs(),k=rs(),{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=Cs(),n=vo().extendFlat,r=kc().pattern,a=E({editType:"plot",arrayOk:!0,colorEditType:"plot"});H.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:k.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:r,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:n({},v.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:l({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:t(),texttemplate:e({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:t({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:n({},a,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:n({},a,{}),outsidetextfont:n({},a,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:n({},v.showlegend,{arrayOk:!0}),legend:n({},v.legend,{arrayOk:!0}),legendrank:n({},v.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:n({},a,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:x({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}}),Hv=Ee({"src/traces/pie/defaults.js"(J,H){"use strict";var v=mi(),x=Vr(),E=Vv(),k=kl().defaults,l=fh().handleText,e=Vr().coercePattern;function t(a,o){var s=x.isArrayOrTypedArray(a),c=x.isArrayOrTypedArray(o),g=Math.min(s?a.length:1/0,c?o.length:1/0);if(isFinite(g)||(g=0),g&&c){for(var f,p=0;p0){f=!0;break}}f||(g=0)}return{hasLabels:s,hasValues:c,len:g}}function n(a,o,s,c,g){var f=c("marker.line.width");f&&c("marker.line.color",g?void 0:s.paper_bgcolor);var p=c("marker.colors");e(c,"marker.pattern",p),a.marker&&!o.marker.pattern.fgcolor&&(o.marker.pattern.fgcolor=a.marker.colors),o.marker.pattern.bgcolor||(o.marker.pattern.bgcolor=s.paper_bgcolor)}function r(a,o,s,c){function g(b,z){return x.coerce(a,o,E,b,z)}var f=g("labels"),p=g("values"),m=t(f,p),i=m.len;if(o._hasLabels=m.hasLabels,o._hasValues=m.hasValues,!o._hasLabels&&o._hasValues&&(g("label0"),g("dlabel")),!i){o.visible=!1;return}o._length=i,n(a,o,c,g,!0),g("scalegroup");var T=g("text"),S=g("texttemplate");g("texttemplatefallback");var M;if(S||(M=g("textinfo",x.isArrayOrTypedArray(T)?"text+percent":"percent")),g("hovertext"),g("hovertemplate"),g("hovertemplatefallback"),S||M&&M!=="none"){var C=g("textposition");l(a,o,c,g,C,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var _=Array.isArray(C)||C==="auto",w=_||C==="outside";w&&g("automargin"),(C==="inside"||C==="auto"||Array.isArray(C))&&g("insidetextorientation")}else M==="none"&&g("textposition","none");k(o,c,g);var h=g("hole"),u=g("title.text");if(u){var A=g("title.position",h?"middle center":"top center");!h&&A==="middle center"&&(o.title.position="top center"),x.coerceFont(g,"title.font",c.font)}g("sort"),g("direction"),g("rotation"),g("pull")}H.exports={handleLabelsAndValues:t,handleMarkerDefaults:n,supplyDefaults:r}}}),G1=Ee({"src/traces/pie/layout_attributes.js"(J,H){"use strict";H.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Bk=Ee({"src/traces/pie/layout_defaults.js"(J,H){"use strict";var v=Vr(),x=G1();H.exports=function(k,l){function e(t,n){return v.coerce(k,l,x,t,n)}e("hiddenlabels"),e("piecolorway",l.colorway),e("extendpiecolors")}}}),e0=Ee({"src/traces/pie/calc.js"(J,H){"use strict";var v=mi(),x=Qn(),E={};function k(n,r){var a=[],o=n._fullLayout,s=o.hiddenlabels||[],c=r.labels,g=r.marker.colors||[],f=r.values,p=r._length,m=r._hasValues&&p,i,T;if(r.dlabel)for(c=new Array(p),i=0;i=0});var b=r.type==="funnelarea"?_:r.sort;return b&&a.sort(function(z,I){return I.v-z.v}),a[0]&&(a[0].vTotal=C),a}function l(n){return function(a,o){if(!a||!x.isValid(a))return!1;let s=x.rgbaString(a);return n[o]||(n[o]=s),s}}function e(n,r){var a=(r||{}).type;a||(a="pie");var o=n._fullLayout,s=n.calcdata,c=o[a+"colorway"],g=o["_"+a+"colormap"];o["extend"+a+"colors"]&&(c=t(c,E));for(var f=0,p=0;p0&&(Fe+=mt*se.pxmid[0],We+=mt*se.pxmid[1])}se.cxFinal=Fe,se.cyFinal=We;function Tt(Ot,vt,ht,Re){var Be=Re*(vt[0]-Ot[0]),He=Re*(vt[1]-Ot[1]);return"a"+Re*fe.r+","+Re*fe.r+" 0 "+se.largeArc+(ht?" 1 ":" 0 ")+Be+","+He}var At=ye.hole;if(se.v===fe.vTotal){var Kt="M"+(Fe+se.px0[0])+","+(We+se.px0[1])+Tt(se.px0,se.pxmid,!0,1)+Tt(se.pxmid,se.px0,!0,1)+"Z";At?gt.attr("d","M"+(Fe+At*se.px0[0])+","+(We+At*se.px0[1])+Tt(se.px0,se.pxmid,!1,At)+Tt(se.pxmid,se.px0,!1,At)+"Z"+Kt):gt.attr("d",Kt)}else{var ar=Tt(se.px0,se.px1,!0,1);if(At){var _r=1-At;gt.attr("d","M"+(Fe+At*se.px1[0])+","+(We+At*se.px1[1])+Tt(se.px1,se.px0,!1,At)+"l"+_r*se.px0[0]+","+_r*se.px0[1]+ar+"Z")}else gt.attr("d","M"+Fe+","+We+"l"+se.px0[0]+","+se.px0[1]+ar+"Z")}oe($,se,fe);var Zt=g.castOption(ye.textposition,se.pts),sr=Ge.selectAll("g.slicetext").data(se.text&&Zt!=="none"?[0]:[]);sr.enter().append("g").classed("slicetext",!0),sr.exit().remove(),sr.each(function(){var Ot=e.ensureSingle(v.select(this),"text","",function(Je){Je.attr("data-notex",1)}),vt=e.ensureUniformFontSize($,Zt==="outside"?S(ye,se,X.font):M(ye,se,X.font));Ot.text(se.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,vt).call(r.convertToTspans,$);var ht=l.bBox(Ot.node()),Re;if(Zt==="outside")Re=N(ht,se);else if(Re=_(ht,se,fe),Zt==="auto"&&Re.scale<1){var Be=e.ensureUniformFontSize($,ye.outsidetextfont);Ot.call(l.font,Be),ht=l.bBox(Ot.node()),Re=N(ht,se)}var He=Re.textPosAngle,$e=He===void 0?se.pxmid:ne(fe.r,He);if(Re.targetX=Fe+$e[0]*Re.rCenter+(Re.x||0),Re.targetY=We+$e[1]*Re.rCenter+(Re.y||0),V(Re,ht),Re.outside){var Ze=Re.targetY;se.yLabelMin=Ze-ht.height/2,se.yLabelMid=Ze,se.yLabelMax=Ze+ht.height/2,se.labelExtraX=0,se.labelExtraY=0,Me=!0}Re.fontSize=vt.size,o(ye.type,Re,X),ee[Te].transform=Re,e.setTransormAndDisplay(Ot,Re)})});var Ie=v.select(this).selectAll("g.titletext").data(ye.title.text?[0]:[]);if(Ie.enter().append("g").classed("titletext",!0),Ie.exit().remove(),Ie.each(function(){var se=e.ensureSingle(v.select(this),"text","",function(We){We.attr("data-notex",1)}),Te=ye.title.text;ye._meta&&(Te=e.templateString(Te,ye._meta)),se.text(Te).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,ye.title.font).call(r.convertToTspans,$);var Fe;ye.title.position==="middle center"?Fe=R(fe):Fe=B(fe,q),se.attr("transform",n(Fe.x,Fe.y)+t(Math.min(1,Fe.scale))+n(Fe.tx,Fe.ty))}),Me&&U(Ae,ye),i(xe,ye),Me&&ye.automargin){var qe=l.bBox(ae.node()),je=ye.domain,ke=q.w*(je.x[1]-je.x[0]),ge=q.h*(je.y[1]-je.y[0]),le=(.5*ke-fe.r)/q.w,ve=(.5*ge-fe.r)/q.h;x.autoMargin($,"pie."+ye.uid+".automargin",{xl:je.x[0]-le,xr:je.x[1]+le,yb:je.y[0]-ve,yt:je.y[1]+ve,l:Math.max(fe.cx-fe.r-qe.left,0),r:Math.max(qe.right-(fe.cx+fe.r),0),b:Math.max(qe.bottom-(fe.cy+fe.r),0),t:Math.max(fe.cy-fe.r-qe.top,0),pad:5})}})});setTimeout(function(){W.selectAll("tspan").each(function(){var ee=v.select(this);ee.attr("dy")&&ee.attr("dy",ee.attr("dy"))})},0)}function i($,K){$.each(function(G){var X=v.select(this);if(!G.labelExtraX&&!G.labelExtraY){X.select("path.textline").remove();return}var q=X.select("g.slicetext text");G.transform.targetX+=G.labelExtraX,G.transform.targetY+=G.labelExtraY,e.setTransormAndDisplay(q,G.transform);var W=G.cxFinal+G.pxmid[0],ee=G.cyFinal+G.pxmid[1],ae="M"+W+","+ee,fe=(G.yLabelMax-G.yLabelMin)*(G.pxmid[0]<0?-1:1)/4;if(G.labelExtraX){var ye=G.labelExtraX*G.pxmid[1]/G.pxmid[0],xe=G.yLabelMid+G.labelExtraY-(G.cyFinal+G.pxmid[1]);Math.abs(ye)>Math.abs(xe)?ae+="l"+xe*G.pxmid[0]/G.pxmid[1]+","+xe+"H"+(W+G.labelExtraX+fe):ae+="l"+G.labelExtraX+","+ye+"v"+(xe-ye)+"h"+fe}else ae+="V"+(G.yLabelMid+G.labelExtraY)+"h"+fe;e.ensureSingle(X,"path","textline").call(k.stroke,K.outsidetextfont.color).attr({"stroke-width":Math.min(2,K.outsidetextfont.size/8),d:ae,fill:"none"})})}function T($,K,G){var X=G[0],q=X.cx,W=X.cy,ee=X.trace,ae=ee.type==="funnelarea";"_hasHoverLabel"in ee||(ee._hasHoverLabel=!1),"_hasHoverEvent"in ee||(ee._hasHoverEvent=!1),$.on("mouseover",function(fe){var ye=K._fullLayout,xe=K._fullData[ee.index];if(!(K._dragging||ye.hovermode===!1)){var Ae=xe.hoverinfo;if(Array.isArray(Ae)&&(Ae=E.castHoverinfo({hoverinfo:[g.castOption(Ae,fe.pts)],_module:ee._module},ye,0)),Ae==="all"&&(Ae="label+text+value+percent+name"),xe.hovertemplate||Ae!=="none"&&Ae!=="skip"&&Ae){var Me=fe.rInscribed||0,Ie=q+fe.pxmid[0]*(1-Me),qe=W+fe.pxmid[1]*(1-Me),je=ye.separators,ke=[];if(Ae&&Ae.indexOf("label")!==-1&&ke.push(fe.label),fe.text=g.castOption(xe.hovertext||xe.text,fe.pts),Ae&&Ae.indexOf("text")!==-1){var ge=fe.text;e.isValidTextValue(ge)&&ke.push(ge)}fe.value=fe.v,fe.valueLabel=g.formatPieValue(fe.v,je),Ae&&Ae.indexOf("value")!==-1&&ke.push(fe.valueLabel),fe.percent=fe.v/X.vTotal,fe.percentLabel=g.formatPiePercent(fe.percent,je),Ae&&Ae.indexOf("percent")!==-1&&ke.push(fe.percentLabel);var le=xe.hoverlabel,ve=le.font,se=[];E.loneHover({trace:ee,x0:Ie-Me*X.r,x1:Ie+Me*X.r,y:qe,_x0:ae?q+fe.TL[0]:Ie-Me*X.r,_x1:ae?q+fe.TR[0]:Ie+Me*X.r,_y0:ae?W+fe.TL[1]:qe-Me*X.r,_y1:ae?W+fe.BL[1]:qe+Me*X.r,text:ke.join("
"),name:xe.hovertemplate||Ae.indexOf("name")!==-1?xe.name:void 0,idealAlign:fe.pxmid[0]<0?"left":"right",color:g.castOption(le.bgcolor,fe.pts)||fe.color,borderColor:g.castOption(le.bordercolor,fe.pts),fontFamily:g.castOption(ve.family,fe.pts),fontSize:g.castOption(ve.size,fe.pts),fontColor:g.castOption(ve.color,fe.pts),nameLength:g.castOption(le.namelength,fe.pts),textAlign:g.castOption(le.align,fe.pts),hovertemplate:g.castOption(xe.hovertemplate,fe.pts),hovertemplateLabels:fe,eventData:[f(fe,xe)]},{container:ye._hoverlayer.node(),outerContainer:ye._paper.node(),gd:K,inOut_bbox:se}),fe.bbox=se[0],ee._hasHoverLabel=!0}ee._hasHoverEvent=!0,K.emit("plotly_hover",{points:[f(fe,xe)],event:v.event})}}),$.on("mouseout",function(fe){var ye=K._fullLayout,xe=K._fullData[ee.index],Ae=v.select(this).datum();ee._hasHoverEvent&&(fe.originalEvent=v.event,K.emit("plotly_unhover",{points:[f(Ae,xe)],event:v.event}),ee._hasHoverEvent=!1),ee._hasHoverLabel&&(E.loneUnhover(ye._hoverlayer.node()),ee._hasHoverLabel=!1)}),$.on("click",function(fe){var ye=K._fullLayout,xe=K._fullData[ee.index];K._dragging||ye.hovermode===!1||(K._hoverdata=[f(fe,xe)],E.click(K,v.event))})}function S($,K,G){var X=g.castOption($.outsidetextfont.color,K.pts)||g.castOption($.textfont.color,K.pts)||G.color,q=g.castOption($.outsidetextfont.family,K.pts)||g.castOption($.textfont.family,K.pts)||G.family,W=g.castOption($.outsidetextfont.size,K.pts)||g.castOption($.textfont.size,K.pts)||G.size,ee=g.castOption($.outsidetextfont.weight,K.pts)||g.castOption($.textfont.weight,K.pts)||G.weight,ae=g.castOption($.outsidetextfont.style,K.pts)||g.castOption($.textfont.style,K.pts)||G.style,fe=g.castOption($.outsidetextfont.variant,K.pts)||g.castOption($.textfont.variant,K.pts)||G.variant,ye=g.castOption($.outsidetextfont.textcase,K.pts)||g.castOption($.textfont.textcase,K.pts)||G.textcase,xe=g.castOption($.outsidetextfont.lineposition,K.pts)||g.castOption($.textfont.lineposition,K.pts)||G.lineposition,Ae=g.castOption($.outsidetextfont.shadow,K.pts)||g.castOption($.textfont.shadow,K.pts)||G.shadow;return{color:X,family:q,size:W,weight:ee,style:ae,variant:fe,textcase:ye,lineposition:xe,shadow:Ae}}function M($,K,G){var X=g.castOption($.insidetextfont.color,K.pts);!X&&$._input.textfont&&(X=g.castOption($._input.textfont.color,K.pts));var q=g.castOption($.insidetextfont.family,K.pts)||g.castOption($.textfont.family,K.pts)||G.family,W=g.castOption($.insidetextfont.size,K.pts)||g.castOption($.textfont.size,K.pts)||G.size,ee=g.castOption($.insidetextfont.weight,K.pts)||g.castOption($.textfont.weight,K.pts)||G.weight,ae=g.castOption($.insidetextfont.style,K.pts)||g.castOption($.textfont.style,K.pts)||G.style,fe=g.castOption($.insidetextfont.variant,K.pts)||g.castOption($.textfont.variant,K.pts)||G.variant,ye=g.castOption($.insidetextfont.textcase,K.pts)||g.castOption($.textfont.textcase,K.pts)||G.textcase,xe=g.castOption($.insidetextfont.lineposition,K.pts)||g.castOption($.textfont.lineposition,K.pts)||G.lineposition,Ae=g.castOption($.insidetextfont.shadow,K.pts)||g.castOption($.textfont.shadow,K.pts)||G.shadow;return{color:X||k.contrast(K.color),family:q,size:W,weight:ee,style:ae,variant:fe,textcase:ye,lineposition:xe,shadow:Ae}}function C($,K){for(var G,X,q=0;q<$.length;q++)if(G=$[q][0],X=G.trace,X.title.text){var W=X.title.text;X._meta&&(W=e.templateString(W,X._meta));var ee=l.tester.append("text").attr("data-notex",1).text(W).call(l.font,X.title.font).call(r.convertToTspans,K),ae=l.bBox(ee.node(),!0);G.titleBox={width:ae.width,height:ae.height},ee.remove()}}function _($,K,G){var X=G.r||K.rpx1,q=K.rInscribed,W=K.startangle===K.stopangle;if(W)return{rCenter:1-q,scale:0,rotate:0,textPosAngle:0};var ee=K.ring,ae=ee===1&&Math.abs(K.startangle-K.stopangle)===Math.PI*2,fe=K.halfangle,ye=K.midangle,xe=G.trace.insidetextorientation,Ae=xe==="horizontal",Me=xe==="tangential",Ie=xe==="radial",qe=xe==="auto",je=[],ke;if(!qe){var ge=function(Ge,gt){if(w(K,Ge)){var mt=Math.abs(Ge-K.startangle),Tt=Math.abs(Ge-K.stopangle),At=mt=-4;le-=2)ge(Math.PI*le,"tan");for(le=4;le>=-4;le-=2)ge(Math.PI*(le+1),"tan")}if(Ae||Ie){for(le=4;le>=-4;le-=2)ge(Math.PI*(le+1.5),"rad");for(le=4;le>=-4;le-=2)ge(Math.PI*(le+.5),"rad")}}if(ae||qe||Ae){var ve=Math.sqrt($.width*$.width+$.height*$.height);if(ke={scale:q*X*2/ve,rCenter:1-q,rotate:0},ke.textPosAngle=(K.startangle+K.stopangle)/2,ke.scale>=1)return ke;je.push(ke)}(qe||Ie)&&(ke=h($,X,ee,fe,ye),ke.textPosAngle=(K.startangle+K.stopangle)/2,je.push(ke)),(qe||Me)&&(ke=u($,X,ee,fe,ye),ke.textPosAngle=(K.startangle+K.stopangle)/2,je.push(ke));for(var se=0,Te=0,Fe=0;Fe=1)break}return je[se]}function w($,K){var G=$.startangle,X=$.stopangle;return G>K&&K>X||G0?1:-1)/2,y:W/(1+G*G/(X*X)),outside:!0}}function R($){var K=Math.sqrt($.titleBox.width*$.titleBox.width+$.titleBox.height*$.titleBox.height);return{x:$.cx,y:$.cy,scale:$.trace.hole*$.r*2/K,tx:0,ty:-$.titleBox.height/2+$.trace.title.font.size}}function B($,K){var G=1,X=1,q,W=$.trace,ee={x:$.cx,y:$.cy},ae={tx:0,ty:0};ae.ty+=W.title.font.size,q=j(W),W.title.position.indexOf("top")!==-1?(ee.y-=(1+q)*$.r,ae.ty-=$.titleBox.height):W.title.position.indexOf("bottom")!==-1&&(ee.y+=(1+q)*$.r);var fe=F($.r,$.trace.aspectratio),ye=K.w*(W.domain.x[1]-W.domain.x[0])/2;return W.title.position.indexOf("left")!==-1?(ye=ye+fe,ee.x-=(1+q)*fe,ae.tx+=$.titleBox.width/2):W.title.position.indexOf("center")!==-1?ye*=2:W.title.position.indexOf("right")!==-1&&(ye=ye+fe,ee.x+=(1+q)*fe,ae.tx-=$.titleBox.width/2),G=ye/$.titleBox.width,X=P($,K)/$.titleBox.height,{x:ee.x,y:ee.y,scale:Math.min(G,X),tx:ae.tx,ty:ae.ty}}function F($,K){return $/(K===void 0?1:K)}function P($,K){var G=$.trace,X=K.h*(G.domain.y[1]-G.domain.y[0]);return Math.min($.titleBox.height,X/2)}function j($){var K=$.pull;if(!K)return 0;var G;if(e.isArrayOrTypedArray(K))for(K=0,G=0;G<$.pull.length;G++)$.pull[G]>K&&(K=$.pull[G]);return K}function U($,K){var G,X,q,W,ee,ae,fe,ye,xe,Ae,Me,Ie,qe;function je(ve,se){return ve.pxmid[1]-se.pxmid[1]}function ke(ve,se){return se.pxmid[1]-ve.pxmid[1]}function ge(ve,se){se||(se={});var Te=se.labelExtraY+(X?se.yLabelMax:se.yLabelMin),Fe=X?ve.yLabelMin:ve.yLabelMax,We=X?ve.yLabelMax:ve.yLabelMin,Ge=ve.cyFinal+ee(ve.px0[1],ve.px1[1]),gt=Te-Fe,mt,Tt,At,Kt,ar,_r;if(gt*fe>0&&(ve.labelExtraY=gt),!!e.isArrayOrTypedArray(K.pull))for(Tt=0;Tt=(g.castOption(K.pull,At.pts)||0))&&((ve.pxmid[1]-At.pxmid[1])*fe>0?(Kt=At.cyFinal+ee(At.px0[1],At.px1[1]),gt=Kt-Fe-ve.labelExtraY,gt*fe>0&&(ve.labelExtraY+=gt)):(We+ve.labelExtraY-Ge)*fe>0&&(mt=3*ae*Math.abs(Tt-Ae.indexOf(ve)),ar=At.cxFinal+W(At.px0[0],At.px1[0]),_r=ar+mt-(ve.cxFinal+ve.pxmid[0])-ve.labelExtraX,_r*ae>0&&(ve.labelExtraX+=_r)))}for(X=0;X<2;X++)for(q=X?je:ke,ee=X?Math.max:Math.min,fe=X?1:-1,G=0;G<2;G++){for(W=G?Math.max:Math.min,ae=G?1:-1,ye=$[X][G],ye.sort(q),xe=$[1-X][G],Ae=xe.concat(ye),Ie=[],Me=0;Me1?(ye=G.r,xe=ye/q.aspectratio):(xe=G.r,ye=xe*q.aspectratio),ye*=(1+q.baseratio)/2,fe=ye*xe}ee=Math.min(ee,fe/G.vTotal)}for(X=0;X<$.length;X++)if(G=$[X][0],q=G.trace,q.scalegroup===ae){var Ae=ee*G.vTotal;q.type==="funnelarea"&&(Ae/=(1+q.baseratio)/2,Ae/=q.aspectratio),G.r=Math.sqrt(Ae)}}}function re($){var K=$[0],G=K.r,X=K.trace,q=g.getRotationAngle(X.rotation),W=2*Math.PI/K.vTotal,ee="px0",ae="px1",fe,ye,xe;if(X.direction==="counterclockwise"){for(fe=0;fe<$.length&&$[fe].hidden;fe++);if(fe===$.length)return;q+=W*$[fe].v,W*=-1,ee="px1",ae="px0"}for(xe=ne(G,q),fe=0;fe<$.length;fe++)ye=$[fe],!ye.hidden&&(ye[ee]=xe,ye.startangle=q,q+=W*ye.v/2,ye.pxmid=ne(G,q),ye.midangle=q,q+=W*ye.v/2,xe=ne(G,q),ye.stopangle=q,ye[ae]=xe,ye.largeArc=ye.v>K.vTotal/2?1:0,ye.halfangle=Math.PI*Math.min(ye.v/K.vTotal,.5),ye.ring=1-X.hole,ye.rInscribed=I(ye,K))}function ne($,K){return[$*Math.sin(K),-$*Math.cos(K)]}function oe($,K,G){var X=$._fullLayout,q=G.trace,W=q.texttemplate,ee=q.textinfo;if(!W&&ee&&ee!=="none"){var ae=ee.split("+"),fe=function(se){return ae.indexOf(se)!==-1},ye=fe("label"),xe=fe("text"),Ae=fe("value"),Me=fe("percent"),Ie=X.separators,qe;if(qe=ye?[K.label]:[],xe){var je=g.getFirstFilled(q.text,K.pts);p(je)&&qe.push(je)}Ae&&qe.push(g.formatPieValue(K.v,Ie)),Me&&qe.push(g.formatPiePercent(K.v/G.vTotal,Ie)),K.text=qe.join("
")}function ke(se){return{label:se.label,value:se.v,valueLabel:g.formatPieValue(se.v,X.separators),percent:se.v/G.vTotal,percentLabel:g.formatPiePercent(se.v/G.vTotal,X.separators),color:se.color,text:se.text,customdata:e.castOption(q,se.i,"customdata")}}if(W){var ge=e.castOption(q,K.i,"texttemplate");if(!ge)K.text="";else{var le=ke(K),ve=g.getFirstFilled(q.text,K.pts);(p(ve)||ve==="")&&(le.text=ve),K.text=e.texttemplateString({data:[le,q._meta],fallback:q.texttemplatefallback,labels:le,locale:$._fullLayout._d3locale,template:ge})}}}function V($,K){var G=$.rotate*Math.PI/180,X=Math.cos(G),q=Math.sin(G),W=(K.left+K.right)/2,ee=(K.top+K.bottom)/2;$.textX=W*X-ee*q,$.textY=W*q+ee*X,$.noCenter=!0}H.exports={plot:m,formatSliceLabel:oe,transformInsideText:_,determineInsideTextFont:M,positionTitleOutside:B,prerenderTitles:C,layoutAreas:Z,attachFxHandlers:T,computeTransform:V}}}),Ok=Ee({"src/traces/pie/style.js"(J,H){"use strict";var v=Va(),x=jp(),E=Ef().resizeText;H.exports=function(l){var e=l._fullLayout._pielayer.selectAll(".trace");E(l,e,"pie"),e.each(function(t){var n=t[0],r=n.trace,a=v.select(this);a.style({opacity:r.opacity}),a.selectAll("path.surface").each(function(o){v.select(this).call(x,o,r,l)})})}}}),jk=Ee({"src/traces/pie/base_plot.js"(J){"use strict";var H=vl();J.name="pie",J.plot=function(v,x,E,k){H.plotBasePlot(J.name,v,x,E,k)},J.clean=function(v,x,E,k){H.cleanBasePlot(J.name,v,x,E,k)}}}),Uk=Ee({"src/traces/pie/index.js"(J,H){"use strict";H.exports={attributes:Vv(),supplyDefaults:Hv().supplyDefaults,supplyLayoutDefaults:Bk(),layoutAttributes:G1(),calc:e0().calc,crossTraceCalc:e0().crossTraceCalc,plot:W1().plot,style:Ok(),styleOne:jp(),moduleType:"trace",name:"pie",basePlotModule:jk(),categories:["pie-like","pie","showLegend"],meta:{}}}}),qk=Ee({"lib/pie.js"(J,H){"use strict";H.exports=Uk()}}),Vk=Ee({"src/traces/sunburst/base_plot.js"(J){"use strict";var H=vl();J.name="sunburst",J.plot=function(v,x,E,k){H.plotBasePlot(J.name,v,x,E,k)},J.clean=function(v,x,E,k){H.cleanBasePlot(J.name,v,x,E,k)}}}),z2=Ee({"src/traces/sunburst/constants.js"(J,H){"use strict";H.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),fm=Ee({"src/traces/sunburst/attributes.js"(J,H){"use strict";var v=nn(),{hovertemplateAttrs:x,texttemplateAttrs:E,templatefallbackAttrs:k}=Cs(),l=$s(),e=kl().attributes,t=Vv(),n=z2(),r=vo().extendFlat,a=kc().pattern;H.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:r({colors:{valType:"data_array",editType:"calc"},line:{color:r({},t.marker.line.color,{dflt:null}),width:r({},t.marker.line.width,{dflt:1}),editType:"calc"},pattern:a,editType:"calc"},l("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:t.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:E({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:k({editType:"plot"}),hovertext:t.hovertext,hoverinfo:r({},v.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:x({},{keys:n.eventDataKeys}),hovertemplatefallback:k(),textfont:t.textfont,insidetextorientation:t.insidetextorientation,insidetextfont:t.insidetextfont,outsidetextfont:r({},t.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:t.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}}}),B2=Ee({"src/traces/sunburst/layout_attributes.js"(J,H){"use strict";H.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Hk=Ee({"src/traces/sunburst/defaults.js"(J,H){"use strict";var v=Vr(),x=fm(),E=kl().defaults,k=fh().handleText,l=Hv().handleMarkerDefaults,e=pl(),t=e.hasColorscale,n=e.handleDefaults;H.exports=function(a,o,s,c){function g(M,C){return v.coerce(a,o,x,M,C)}var f=g("labels"),p=g("parents");if(!f||!f.length||!p||!p.length){o.visible=!1;return}var m=g("values");m&&m.length?g("branchvalues"):g("count"),g("level"),g("maxdepth"),l(a,o,c,g);var i=o._hasColorscale=t(a,"marker","colors")||(a.marker||{}).coloraxis;i&&n(a,o,c,g,{prefix:"marker.",cLetter:"c"}),g("leaf.opacity",i?1:.7);var T=g("text");g("texttemplate"),g("texttemplatefallback"),o.texttemplate||g("textinfo",v.isArrayOrTypedArray(T)?"text+label":"label"),g("hovertext"),g("hovertemplate"),g("hovertemplatefallback");var S="auto";k(a,o,c,g,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),g("insidetextorientation"),g("sort"),g("rotation"),g("root.color"),E(o,c,g),o._length=null}}}),Gk=Ee({"src/traces/sunburst/layout_defaults.js"(J,H){"use strict";var v=Vr(),x=B2();H.exports=function(k,l){function e(t,n){return v.coerce(k,l,x,t,n)}e("sunburstcolorway",l.colorway),e("extendsunburstcolors")}}}),hm=Ee({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(J,H){(function(v,x){typeof J=="object"&&typeof H<"u"?x(J):(v=v||self,x(v.d3=v.d3||{}))})(J,function(v){"use strict";function x(Re,Be){return Re.parent===Be.parent?1:2}function E(Re){return Re.reduce(k,0)/Re.length}function k(Re,Be){return Re+Be.x}function l(Re){return 1+Re.reduce(e,0)}function e(Re,Be){return Math.max(Re,Be.y)}function t(Re){for(var Be;Be=Re.children;)Re=Be[0];return Re}function n(Re){for(var Be;Be=Re.children;)Re=Be[Be.length-1];return Re}function r(){var Re=x,Be=1,He=1,$e=!1;function Ze(Je){var Mt,dt=0;Je.eachAfter(function(Wt){var Sr=Wt.children;Sr?(Wt.x=E(Sr),Wt.y=l(Sr)):(Wt.x=Mt?dt+=Re(Wt,Mt):0,Wt.y=0,Mt=Wt)});var Dt=t(Je),Ct=n(Je),Vt=Dt.x-Re(Dt,Ct)/2,Ht=Ct.x+Re(Ct,Dt)/2;return Je.eachAfter($e?function(Wt){Wt.x=(Wt.x-Je.x)*Be,Wt.y=(Je.y-Wt.y)*He}:function(Wt){Wt.x=(Wt.x-Vt)/(Ht-Vt)*Be,Wt.y=(1-(Je.y?Wt.y/Je.y:1))*He})}return Ze.separation=function(Je){return arguments.length?(Re=Je,Ze):Re},Ze.size=function(Je){return arguments.length?($e=!1,Be=+Je[0],He=+Je[1],Ze):$e?null:[Be,He]},Ze.nodeSize=function(Je){return arguments.length?($e=!0,Be=+Je[0],He=+Je[1],Ze):$e?[Be,He]:null},Ze}function a(Re){var Be=0,He=Re.children,$e=He&&He.length;if(!$e)Be=1;else for(;--$e>=0;)Be+=He[$e].value;Re.value=Be}function o(){return this.eachAfter(a)}function s(Re){var Be=this,He,$e=[Be],Ze,Je,Mt;do for(He=$e.reverse(),$e=[];Be=He.pop();)if(Re(Be),Ze=Be.children,Ze)for(Je=0,Mt=Ze.length;Je=0;--Ze)He.push($e[Ze]);return this}function g(Re){for(var Be=this,He=[Be],$e=[],Ze,Je,Mt;Be=He.pop();)if($e.push(Be),Ze=Be.children,Ze)for(Je=0,Mt=Ze.length;Je=0;)He+=$e[Ze].value;Be.value=He})}function p(Re){return this.eachBefore(function(Be){Be.children&&Be.children.sort(Re)})}function m(Re){for(var Be=this,He=i(Be,Re),$e=[Be];Be!==He;)Be=Be.parent,$e.push(Be);for(var Ze=$e.length;Re!==He;)$e.splice(Ze,0,Re),Re=Re.parent;return $e}function i(Re,Be){if(Re===Be)return Re;var He=Re.ancestors(),$e=Be.ancestors(),Ze=null;for(Re=He.pop(),Be=$e.pop();Re===Be;)Ze=Re,Re=He.pop(),Be=$e.pop();return Ze}function T(){for(var Re=this,Be=[Re];Re=Re.parent;)Be.push(Re);return Be}function S(){var Re=[];return this.each(function(Be){Re.push(Be)}),Re}function M(){var Re=[];return this.eachBefore(function(Be){Be.children||Re.push(Be)}),Re}function C(){var Re=this,Be=[];return Re.each(function(He){He!==Re&&Be.push({source:He.parent,target:He})}),Be}function _(Re,Be){var He=new b(Re),$e=+Re.value&&(He.value=Re.value),Ze,Je=[He],Mt,dt,Dt,Ct;for(Be==null&&(Be=h);Ze=Je.pop();)if($e&&(Ze.value=+Ze.data.value),(dt=Be(Ze.data))&&(Ct=dt.length))for(Ze.children=new Array(Ct),Dt=Ct-1;Dt>=0;--Dt)Je.push(Mt=Ze.children[Dt]=new b(dt[Dt])),Mt.parent=Ze,Mt.depth=Ze.depth+1;return He.eachBefore(A)}function w(){return _(this).eachBefore(u)}function h(Re){return Re.children}function u(Re){Re.data=Re.data.data}function A(Re){var Be=0;do Re.height=Be;while((Re=Re.parent)&&Re.height<++Be)}function b(Re){this.data=Re,this.depth=this.height=0,this.parent=null}b.prototype=_.prototype={constructor:b,count:o,each:s,eachAfter:g,eachBefore:c,sum:f,sort:p,path:m,ancestors:T,descendants:S,leaves:M,links:C,copy:w};var z=Array.prototype.slice;function I(Re){for(var Be=Re.length,He,$e;Be;)$e=Math.random()*Be--|0,He=Re[Be],Re[Be]=Re[$e],Re[$e]=He;return Re}function N(Re){for(var Be=0,He=(Re=I(z.call(Re))).length,$e=[],Ze,Je;Be0&&He*He>$e*$e+Ze*Ze}function P(Re,Be){for(var He=0;HeDt?(Ze=(Ct+Dt-Je)/(2*Ct),dt=Math.sqrt(Math.max(0,Dt/Ct-Ze*Ze)),He.x=Re.x-Ze*$e-dt*Mt,He.y=Re.y-Ze*Mt+dt*$e):(Ze=(Ct+Je-Dt)/(2*Ct),dt=Math.sqrt(Math.max(0,Je/Ct-Ze*Ze)),He.x=Be.x+Ze*$e-dt*Mt,He.y=Be.y+Ze*Mt+dt*$e)):(He.x=Be.x+He.r,He.y=Be.y)}function ne(Re,Be){var He=Re.r+Be.r-1e-6,$e=Be.x-Re.x,Ze=Be.y-Re.y;return He>0&&He*He>$e*$e+Ze*Ze}function oe(Re){var Be=Re._,He=Re.next._,$e=Be.r+He.r,Ze=(Be.x*He.r+He.x*Be.r)/$e,Je=(Be.y*He.r+He.y*Be.r)/$e;return Ze*Ze+Je*Je}function V(Re){this._=Re,this.next=null,this.previous=null}function $(Re){if(!(Ze=Re.length))return 0;var Be,He,$e,Ze,Je,Mt,dt,Dt,Ct,Vt,Ht;if(Be=Re[0],Be.x=0,Be.y=0,!(Ze>1))return Be.r;if(He=Re[1],Be.x=-He.r,He.x=Be.r,He.y=0,!(Ze>2))return Be.r+He.r;re(He,Be,$e=Re[2]),Be=new V(Be),He=new V(He),$e=new V($e),Be.next=$e.previous=He,He.next=Be.previous=$e,$e.next=He.previous=Be;e:for(dt=3;dt0)throw new Error("cycle");return dt}return He.id=function($e){return arguments.length?(Re=X($e),He):Re},He.parentId=function($e){return arguments.length?(Be=X($e),He):Be},He}function se(Re,Be){return Re.parent===Be.parent?1:2}function Te(Re){var Be=Re.children;return Be?Be[0]:Re.t}function Fe(Re){var Be=Re.children;return Be?Be[Be.length-1]:Re.t}function We(Re,Be,He){var $e=He/(Be.i-Re.i);Be.c-=$e,Be.s+=He,Re.c+=$e,Be.z+=He,Be.m+=He}function Ge(Re){for(var Be=0,He=0,$e=Re.children,Ze=$e.length,Je;--Ze>=0;)Je=$e[Ze],Je.z+=Be,Je.m+=Be,Be+=Je.s+(He+=Je.c)}function gt(Re,Be,He){return Re.a.parent===Be.parent?Re.a:He}function mt(Re,Be){this._=Re,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}mt.prototype=Object.create(b.prototype);function Tt(Re){for(var Be=new mt(Re,0),He,$e=[Be],Ze,Je,Mt,dt;He=$e.pop();)if(Je=He._.children)for(He.children=new Array(dt=Je.length),Mt=dt-1;Mt>=0;--Mt)$e.push(Ze=He.children[Mt]=new mt(Je[Mt],Mt)),Ze.parent=He;return(Be.parent=new mt(null,0)).children=[Be],Be}function At(){var Re=se,Be=1,He=1,$e=null;function Ze(Ct){var Vt=Tt(Ct);if(Vt.eachAfter(Je),Vt.parent.m=-Vt.z,Vt.eachBefore(Mt),$e)Ct.eachBefore(Dt);else{var Ht=Ct,Wt=Ct,Sr=Ct;Ct.eachBefore(function(cr){cr.xWt.x&&(Wt=cr),cr.depth>Sr.depth&&(Sr=cr)});var ia=Ht===Wt?1:Re(Ht,Wt)/2,$t=ia-Ht.x,It=Be/(Wt.x+ia+$t),ir=He/(Sr.depth||1);Ct.eachBefore(function(cr){cr.x=(cr.x+$t)*It,cr.y=cr.depth*ir})}return Ct}function Je(Ct){var Vt=Ct.children,Ht=Ct.parent.children,Wt=Ct.i?Ht[Ct.i-1]:null;if(Vt){Ge(Ct);var Sr=(Vt[0].z+Vt[Vt.length-1].z)/2;Wt?(Ct.z=Wt.z+Re(Ct._,Wt._),Ct.m=Ct.z-Sr):Ct.z=Sr}else Wt&&(Ct.z=Wt.z+Re(Ct._,Wt._));Ct.parent.A=dt(Ct,Wt,Ct.parent.A||Ht[0])}function Mt(Ct){Ct._.x=Ct.z+Ct.parent.m,Ct.m+=Ct.parent.m}function dt(Ct,Vt,Ht){if(Vt){for(var Wt=Ct,Sr=Ct,ia=Vt,$t=Wt.parent.children[0],It=Wt.m,ir=Sr.m,cr=ia.m,fr=$t.m,Ir;ia=Fe(ia),Wt=Te(Wt),ia&&Wt;)$t=Te($t),Sr=Fe(Sr),Sr.a=Ct,Ir=ia.z+cr-Wt.z-It+Re(ia._,Wt._),Ir>0&&(We(gt(ia,Ct,Ht),Ct,Ir),It+=Ir,ir+=Ir),cr+=ia.m,It+=Wt.m,fr+=$t.m,ir+=Sr.m;ia&&!Fe(Sr)&&(Sr.t=ia,Sr.m+=cr-ir),Wt&&!Te($t)&&($t.t=Wt,$t.m+=It-fr,Ht=Ct)}return Ht}function Dt(Ct){Ct.x*=Be,Ct.y=Ct.depth*He}return Ze.separation=function(Ct){return arguments.length?(Re=Ct,Ze):Re},Ze.size=function(Ct){return arguments.length?($e=!1,Be=+Ct[0],He=+Ct[1],Ze):$e?null:[Be,He]},Ze.nodeSize=function(Ct){return arguments.length?($e=!0,Be=+Ct[0],He=+Ct[1],Ze):$e?[Be,He]:null},Ze}function Kt(Re,Be,He,$e,Ze){for(var Je=Re.children,Mt,dt=-1,Dt=Je.length,Ct=Re.value&&(Ze-He)/Re.value;++dtcr&&(cr=Ct),aa=It*It*sa,fr=Math.max(cr/aa,aa/ir),fr>Ir){It-=Ct;break}Ir=fr}Mt.push(Dt={value:It,dice:Sr1?$e:1)},He}(ar);function sr(){var Re=Zt,Be=!1,He=1,$e=1,Ze=[0],Je=q,Mt=q,dt=q,Dt=q,Ct=q;function Vt(Wt){return Wt.x0=Wt.y0=0,Wt.x1=He,Wt.y1=$e,Wt.eachBefore(Ht),Ze=[0],Be&&Wt.eachBefore(Ae),Wt}function Ht(Wt){var Sr=Ze[Wt.depth],ia=Wt.x0+Sr,$t=Wt.y0+Sr,It=Wt.x1-Sr,ir=Wt.y1-Sr;It=Wt-1){var cr=Je[Ht];cr.x0=ia,cr.y0=$t,cr.x1=It,cr.y1=ir;return}for(var fr=Ct[Ht],Ir=Sr/2+fr,sa=Ht+1,aa=Wt-1;sa>>1;Ct[xa]ir-$t){var An=(ia*Oa+It*ja)/Sr;Vt(Ht,sa,ja,ia,$t,An,ir),Vt(sa,Wt,Oa,An,$t,It,ir)}else{var un=($t*Oa+ir*ja)/Sr;Vt(Ht,sa,ja,ia,$t,It,un),Vt(sa,Wt,Oa,ia,un,It,ir)}}}function vt(Re,Be,He,$e,Ze){(Re.depth&1?Kt:Me)(Re,Be,He,$e,Ze)}var ht=function Re(Be){function He($e,Ze,Je,Mt,dt){if((Dt=$e._squarify)&&Dt.ratio===Be)for(var Dt,Ct,Vt,Ht,Wt=-1,Sr,ia=Dt.length,$t=$e.value;++Wt1?$e:1)},He}(ar);v.cluster=r,v.hierarchy=_,v.pack=ae,v.packEnclose=N,v.packSiblings=K,v.partition=Ie,v.stratify=ve,v.tree=At,v.treemap=sr,v.treemapBinary=Ot,v.treemapDice=Me,v.treemapResquarify=ht,v.treemapSlice=Kt,v.treemapSliceDice=vt,v.treemapSquarify=Zt,Object.defineProperty(v,"__esModule",{value:!0})})}}),dm=Ee({"src/traces/sunburst/calc.js"(J){"use strict";var H=hm(),v=mi(),x=Vr(),E=pl().makeColorScaleFuncFromTrace,k=e0().makePullColorFn,l=e0().generateExtendedColors,e=pl().calc,t=Qi().ALMOST_EQUAL,n={},r={},a={};J.calc=function(s,c){var g=s._fullLayout,f=c.ids,p=x.isArrayOrTypedArray(f),m=c.labels,i=c.parents,T=c.values,S=x.isArrayOrTypedArray(T),M=[],C={},_={},w=function(K,G){C[K]?C[K].push(G):C[K]=[G],_[G]=1},h=function(K){return K||typeof K=="number"},u=function(K){return!S||v(T[K])&&T[K]>=0},A,b,z;p?(A=Math.min(f.length,i.length),b=function(K){return h(f[K])&&u(K)},z=function(K){return String(f[K])}):(A=Math.min(m.length,i.length),b=function(K){return h(m[K])&&u(K)},z=function(K){return String(m[K])}),S&&(A=Math.min(A,T.length));for(var I=0;I1){for(var j=x.randstr(),U=0;U>8&15|H>>4&240,H>>4&15|H&240,(H&15)<<4|H&15,1):v===8?vm(H>>24&255,H>>16&255,H>>8&255,(H&255)/255):v===4?vm(H>>12&15|H>>8&240,H>>8&15|H>>4&240,H>>4&15|H&240,((H&15)<<4|H&15)/255):null):(H=Y2.exec(J))?new Wc(H[1],H[2],H[3],1):(H=X2.exec(J))?new Wc(H[1]*255/100,H[2]*255/100,H[3]*255/100,1):(H=$2.exec(J))?vm(H[1],H[2],H[3],H[4]):(H=Z2.exec(J))?vm(H[1]*255/100,H[2]*255/100,H[3]*255/100,H[4]):(H=K2.exec(J))?V2(H[1],H[2]/100,H[3]/100,1):(H=J2.exec(J))?V2(H[1],H[2]/100,H[3]/100,H[4]):K1.hasOwnProperty(J)?j2(K1[J]):J==="transparent"?new Wc(NaN,NaN,NaN,0):null}function j2(J){return new Wc(J>>16&255,J>>8&255,J&255,1)}function vm(J,H,v,x){return x<=0&&(J=H=v=NaN),new Wc(J,H,v,x)}function X1(J){return J instanceof bd||(J=r0(J)),J?(J=J.rgb(),new Wc(J.r,J.g,J.b,J.opacity)):new Wc}function pm(J,H,v,x){return arguments.length===1?X1(J):new Wc(J,H,v,x??1)}function Wc(J,H,v,x){this.r=+J,this.g=+H,this.b=+v,this.opacity=+x}function U2(){return`#${ev(this.r)}${ev(this.g)}${ev(this.b)}`}function Xk(){return`#${ev(this.r)}${ev(this.g)}${ev(this.b)}${ev((isNaN(this.opacity)?1:this.opacity)*255)}`}function q2(){let J=mm(this.opacity);return`${J===1?"rgb(":"rgba("}${Qd(this.r)}, ${Qd(this.g)}, ${Qd(this.b)}${J===1?")":`, ${J})`}`}function mm(J){return isNaN(J)?1:Math.max(0,Math.min(1,J))}function Qd(J){return Math.max(0,Math.min(255,Math.round(J)||0))}function ev(J){return J=Qd(J),(J<16?"0":"")+J.toString(16)}function V2(J,H,v,x){return x<=0?J=H=v=NaN:v<=0||v>=1?J=H=NaN:H<=0&&(J=NaN),new xh(J,H,v,x)}function H2(J){if(J instanceof xh)return new xh(J.h,J.s,J.l,J.opacity);if(J instanceof bd||(J=r0(J)),!J)return new xh;if(J instanceof xh)return J;J=J.rgb();var H=J.r/255,v=J.g/255,x=J.b/255,E=Math.min(H,v,x),k=Math.max(H,v,x),l=NaN,e=k-E,t=(k+E)/2;return e?(H===k?l=(v-x)/e+(v0&&t<1?0:l,new xh(l,e,t,J.opacity)}function $1(J,H,v,x){return arguments.length===1?H2(J):new xh(J,H,v,x??1)}function xh(J,H,v,x){this.h=+J,this.s=+H,this.l=+v,this.opacity=+x}function G2(J){return J=(J||0)%360,J<0?J+360:J}function gm(J){return Math.max(0,Math.min(1,J||0))}function Z1(J,H,v){return(J<60?H+(v-H)*J/60:J<180?v:J<240?H+(v-H)*(240-J)/60:H)*255}var xd,tv,rv,Wv,wh,W2,Y2,X2,$2,Z2,K2,J2,K1,J1=Da({"node_modules/d3-color/src/color.js"(){Y1(),xd=.7,tv=1/xd,rv="\\s*([+-]?\\d+)\\s*",Wv="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",W2=/^#([0-9a-f]{3,8})$/,Y2=new RegExp(`^rgb\\(${rv},${rv},${rv}\\)$`),X2=new RegExp(`^rgb\\(${wh},${wh},${wh}\\)$`),$2=new RegExp(`^rgba\\(${rv},${rv},${rv},${Wv}\\)$`),Z2=new RegExp(`^rgba\\(${wh},${wh},${wh},${Wv}\\)$`),K2=new RegExp(`^hsl\\(${Wv},${wh},${wh}\\)$`),J2=new RegExp(`^hsla\\(${Wv},${wh},${wh},${Wv}\\)$`),K1={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},Gv(bd,r0,{copy(J){return Object.assign(new this.constructor,this,J)},displayable(){return this.rgb().displayable()},hex:N2,formatHex:N2,formatHex8:Wk,formatHsl:Yk,formatRgb:O2,toString:O2}),Gv(Wc,pm,t0(bd,{brighter(J){return J=J==null?tv:Math.pow(tv,J),new Wc(this.r*J,this.g*J,this.b*J,this.opacity)},darker(J){return J=J==null?xd:Math.pow(xd,J),new Wc(this.r*J,this.g*J,this.b*J,this.opacity)},rgb(){return this},clamp(){return new Wc(Qd(this.r),Qd(this.g),Qd(this.b),mm(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:U2,formatHex:U2,formatHex8:Xk,formatRgb:q2,toString:q2})),Gv(xh,$1,t0(bd,{brighter(J){return J=J==null?tv:Math.pow(tv,J),new xh(this.h,this.s,this.l*J,this.opacity)},darker(J){return J=J==null?xd:Math.pow(xd,J),new xh(this.h,this.s,this.l*J,this.opacity)},rgb(){var J=this.h%360+(this.h<0)*360,H=isNaN(J)||isNaN(this.s)?0:this.s,v=this.l,x=v+(v<.5?v:1-v)*H,E=2*v-x;return new Wc(Z1(J>=240?J-240:J+120,E,x),Z1(J,E,x),Z1(J<120?J+240:J-120,E,x),this.opacity)},clamp(){return new xh(G2(this.h),gm(this.s),gm(this.l),mm(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let J=mm(this.opacity);return`${J===1?"hsl(":"hsla("}${G2(this.h)}, ${gm(this.s)*100}%, ${gm(this.l)*100}%${J===1?")":`, ${J})`}`}}))}}),Q1,ey,Q2=Da({"node_modules/d3-color/src/math.js"(){Q1=Math.PI/180,ey=180/Math.PI}});function e3(J){if(J instanceof Bh)return new Bh(J.l,J.a,J.b,J.opacity);if(J instanceof Kh)return t3(J);J instanceof Wc||(J=X1(J));var H=iy(J.r),v=iy(J.g),x=iy(J.b),E=ry((.2225045*H+.7168786*v+.0606169*x)/ly),k,l;return H===v&&v===x?k=l=E:(k=ry((.4360747*H+.3850649*v+.1430804*x)/sy),l=ry((.0139322*H+.0971045*v+.7141733*x)/uy)),new Bh(116*E-16,500*(k-E),200*(E-l),J.opacity)}function ty(J,H,v,x){return arguments.length===1?e3(J):new Bh(J,H,v,x??1)}function Bh(J,H,v,x){this.l=+J,this.a=+H,this.b=+v,this.opacity=+x}function ry(J){return J>r3?Math.pow(J,.3333333333333333):J/fy+cy}function ay(J){return J>av?J*J*J:fy*(J-cy)}function ny(J){return 255*(J<=.0031308?12.92*J:1.055*Math.pow(J,.4166666666666667)-.055)}function iy(J){return(J/=255)<=.04045?J/12.92:Math.pow((J+.055)/1.055,2.4)}function $k(J){if(J instanceof Kh)return new Kh(J.h,J.c,J.l,J.opacity);if(J instanceof Bh||(J=e3(J)),J.a===0&&J.b===0)return new Kh(NaN,0=1?(v=1,H-1):Math.floor(v*H),E=J[x],k=J[x+1],l=x>0?J[x-1]:2*E-k,e=x()=>J}});function l3(J,H){return function(v){return J+v*H}}function Qk(J,H,v){return J=Math.pow(J,v),H=Math.pow(H,v)-J,v=1/v,function(x){return Math.pow(J+x*H,v)}}function bm(J,H){var v=H-J;return v?l3(J,v>180||v<-180?v-360*Math.round(v/360):v):i0(isNaN(J)?H:J)}function eC(J){return(J=+J)==1?Yc:function(H,v){return v-H?Qk(H,v,J):i0(isNaN(H)?v:H)}}function Yc(J,H){var v=H-J;return v?l3(J,v):i0(isNaN(J)?H:J)}var $v=Da({"node_modules/d3-interpolate/src/color.js"(){s3()}});function u3(J){return function(H){var v=H.length,x=new Array(v),E=new Array(v),k=new Array(v),l,e;for(l=0;lv&&(k=H.slice(v,k),e[l]?e[l]+=k:e[++l]=k),(x=x[0])===(E=E[0])?e[l]?e[l]+=E:e[++l]=E:(e[++l]=null,t.push({i:l,x:Nh(x,E)})),v=Am.lastIndex;return v180?r+=360:r-n>180&&(n+=360),o.push({i:a.push(E(a)+"rotate(",null,x)-2,x:Nh(n,r)})):r&&a.push(E(a)+"rotate("+r+x)}function e(n,r,a,o){n!==r?o.push({i:a.push(E(a)+"skewX(",null,x)-2,x:Nh(n,r)}):r&&a.push(E(a)+"skewX("+r+x)}function t(n,r,a,o,s,c){if(n!==a||r!==o){var g=s.push(E(s)+"scale(",null,",",null,")");c.push({i:g-4,x:Nh(n,a)},{i:g-2,x:Nh(r,o)})}else(a!==1||o!==1)&&s.push(E(s)+"scale("+a+","+o+")")}return function(n,r){var a=[],o=[];return n=J(n),r=J(r),k(n.translateX,n.translateY,r.translateX,r.translateY,a,o),l(n.rotate,r.rotate,a,o),e(n.skewX,r.skewX,a,o),t(n.scaleX,n.scaleY,r.scaleX,r.scaleY,a,o),n=r=null,function(s){for(var c=-1,g=o.length,f;++cMm,interpolateArray:()=>tC,interpolateBasis:()=>n3,interpolateBasisClosed:()=>i3,interpolateCubehelix:()=>z3,interpolateCubehelixLong:()=>B3,interpolateDate:()=>m3,interpolateDiscrete:()=>nC,interpolateHcl:()=>I3,interpolateHclLong:()=>R3,interpolateHsl:()=>L3,interpolateHslLong:()=>P3,interpolateHue:()=>oC,interpolateLab:()=>_C,interpolateNumber:()=>Nh,interpolateNumberArray:()=>yy,interpolateObject:()=>y3,interpolateRgb:()=>xm,interpolateRgbBasis:()=>c3,interpolateRgbBasisClosed:()=>f3,interpolateRound:()=>lC,interpolateString:()=>b3,interpolateTransformCss:()=>A3,interpolateTransformSvg:()=>M3,interpolateZoom:()=>k3,piecewise:()=>TC,quantize:()=>MC});var Zv=Da({"node_modules/d3-interpolate/src/index.js"(){Sm(),p3(),gy(),o3(),g3(),iC(),sC(),wm(),_y(),_3(),uC(),x3(),vC(),gC(),h3(),yC(),bC(),xC(),wC(),AC(),SC()}}),xy=Ee({"src/traces/sunburst/fill_one.js"(J,H){"use strict";var v=mo(),x=Qn();H.exports=function(k,l,e,t,n){var r=l.data.data,a=r.i,o=n||r.color;if(a>=0){l.i=r.i;var s=e.marker;s.pattern?(!s.colors||!s.pattern.shape)&&(s.color=o,l.color=o):(s.color=o,l.color=o),v.pointStyle(k,e,t,l)}else x.fill(k,o)}}}),N3=Ee({"src/traces/sunburst/style.js"(J,H){"use strict";var v=Va(),x=Qn(),E=Vr(),k=Ef().resizeText,l=xy();function e(n){var r=n._fullLayout._sunburstlayer.selectAll(".trace");k(n,r,"sunburst"),r.each(function(a){var o=v.select(this),s=a[0],c=s.trace;o.style("opacity",c.opacity),o.selectAll("path.surface").each(function(g){v.select(this).call(t,g,c,n)})})}function t(n,r,a,o){var s=r.data.data,c=!r.children,g=s.i,f=E.castOption(a,g,"marker.line.color")||x.defaultLine,p=E.castOption(a,g,"marker.line.width")||0;n.call(l,r,a,o).style("stroke-width",p).call(x.stroke,f).style("opacity",c?a.leaf.opacity:null)}H.exports={style:e,styleOne:t}}}),wd=Ee({"src/traces/sunburst/helpers.js"(J){"use strict";var H=Vr(),v=Qn(),x=Dh(),E=Xd();J.findEntryWithLevel=function(t,n){var r;return n&&t.eachAfter(function(a){if(J.getPtId(a)===n)return r=a.copy()}),r||t},J.findEntryWithChild=function(t,n){var r;return t.eachAfter(function(a){for(var o=a.children||[],s=0;s0)},J.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},J.isHeader=function(t,n){return!(J.isLeaf(t)||t.depth===n._maxDepth-1)};function e(t){return t.data.data.pid}J.getParent=function(t,n){return J.findEntryWithLevel(t,e(n))},J.listPath=function(t,n){var r=t.parent;if(!r)return[];var a=n?[r.data[n]]:[r];return J.listPath(r,n).concat(a)},J.getPath=function(t){return J.listPath(t,"label").join("/")+"/"},J.formatValue=E.formatPieValue,J.formatPercent=function(t,n){var r=H.formatPercent(t,0);return r==="0%"&&(r=E.formatPiePercent(t,n)),r}}}),Cm=Ee({"src/traces/sunburst/fx.js"(J,H){"use strict";var v=Va(),x=Ri(),E=Qf().appendArrayPointValue,k=$l(),l=Vr(),e=zp(),t=wd(),n=Xd(),r=n.formatPieValue;H.exports=function(s,c,g,f,p){var m=f[0],i=m.trace,T=m.hierarchy,S=i.type==="sunburst",M=i.type==="treemap"||i.type==="icicle";"_hasHoverLabel"in i||(i._hasHoverLabel=!1),"_hasHoverEvent"in i||(i._hasHoverEvent=!1);var C=function(h){var u=g._fullLayout;if(!(g._dragging||u.hovermode===!1)){var A=g._fullData[i.index],b=h.data.data,z=b.i,I=t.isHierarchyRoot(h),N=t.getParent(T,h),R=t.getValue(h),B=function(ee){return l.castOption(A,z,ee)},F=B("hovertemplate"),P=k.castHoverinfo(A,u,z),j=u.separators,U;if(F||P&&P!=="none"&&P!=="skip"){var Z,Q;S&&(Z=m.cx+h.pxmid[0]*(1-h.rInscribed),Q=m.cy+h.pxmid[1]*(1-h.rInscribed)),M&&(Z=h._hoverX,Q=h._hoverY);var re={},ne=[],oe=[],V=function(ee){return ne.indexOf(ee)!==-1};P&&(ne=P==="all"?A._module.attributes.hoverinfo.flags:P.split("+")),re.label=b.label,V("label")&&re.label&&oe.push(re.label),b.hasOwnProperty("v")&&(re.value=b.v,re.valueLabel=r(re.value,j),V("value")&&oe.push(re.valueLabel)),re.currentPath=h.currentPath=t.getPath(h.data),V("current path")&&!I&&oe.push(re.currentPath);var $,K=[],G=function(){K.indexOf($)===-1&&(oe.push($),K.push($))};re.percentParent=h.percentParent=R/t.getValue(N),re.parent=h.parentString=t.getPtLabel(N),V("percent parent")&&($=t.formatPercent(re.percentParent,j)+" of "+re.parent,G()),re.percentEntry=h.percentEntry=R/t.getValue(c),re.entry=h.entry=t.getPtLabel(c),V("percent entry")&&!I&&!h.onPathbar&&($=t.formatPercent(re.percentEntry,j)+" of "+re.entry,G()),re.percentRoot=h.percentRoot=R/t.getValue(T),re.root=h.root=t.getPtLabel(T),V("percent root")&&!I&&($=t.formatPercent(re.percentRoot,j)+" of "+re.root,G()),re.text=B("hovertext")||B("text"),V("text")&&($=re.text,l.isValidTextValue($)&&oe.push($)),U=[a(h,A,p.eventDataKeys)];var X={trace:A,y:Q,_x0:h._x0,_x1:h._x1,_y0:h._y0,_y1:h._y1,text:oe.join("
"),name:F||V("name")?A.name:void 0,color:B("hoverlabel.bgcolor")||b.color,borderColor:B("hoverlabel.bordercolor"),fontFamily:B("hoverlabel.font.family"),fontSize:B("hoverlabel.font.size"),fontColor:B("hoverlabel.font.color"),fontWeight:B("hoverlabel.font.weight"),fontStyle:B("hoverlabel.font.style"),fontVariant:B("hoverlabel.font.variant"),nameLength:B("hoverlabel.namelength"),textAlign:B("hoverlabel.align"),hovertemplate:F,hovertemplateLabels:re,eventData:U};S&&(X.x0=Z-h.rInscribed*h.rpx1,X.x1=Z+h.rInscribed*h.rpx1,X.idealAlign=h.pxmid[0]<0?"left":"right"),M&&(X.x=Z,X.idealAlign=Z<0?"left":"right");var q=[];k.loneHover(X,{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:g,inOut_bbox:q}),U[0].bbox=q[0],i._hasHoverLabel=!0}if(M){var W=s.select("path.surface");p.styleOne(W,h,A,g,{hovered:!0})}i._hasHoverEvent=!0,g.emit("plotly_hover",{points:U||[a(h,A,p.eventDataKeys)],event:v.event})}},_=function(h){var u=g._fullLayout,A=g._fullData[i.index],b=v.select(this).datum();if(i._hasHoverEvent&&(h.originalEvent=v.event,g.emit("plotly_unhover",{points:[a(b,A,p.eventDataKeys)],event:v.event}),i._hasHoverEvent=!1),i._hasHoverLabel&&(k.loneUnhover(u._hoverlayer.node()),i._hasHoverLabel=!1),M){var z=s.select("path.surface");p.styleOne(z,b,A,g,{hovered:!1})}},w=function(h){var u=g._fullLayout,A=g._fullData[i.index],b=S&&(t.isHierarchyRoot(h)||t.isLeaf(h)),z=t.getPtId(h),I=t.isEntry(h)?t.findEntryWithChild(T,z):t.findEntryWithLevel(T,z),N=t.getPtId(I),R={points:[a(h,A,p.eventDataKeys)],event:v.event};b||(R.nextLevel=N);var B=e.triggerHandler(g,"plotly_"+i.type+"click",R);if(B!==!1&&u.hovermode&&(g._hoverdata=[a(h,A,p.eventDataKeys)],k.click(g,v.event)),!b&&B!==!1&&!g._dragging&&!g._transitioning){x.call("_storeDirectGUIEdit",A,u._tracePreGUI[A.uid],{level:A.level});var F={data:[{level:N}],traces:[i.index]},P={frame:{redraw:!1,duration:p.transitionTime},transition:{duration:p.transitionTime,easing:p.transitionEasing},mode:"immediate",fromcurrent:!0};k.loneUnhover(u._hoverlayer.node()),x.call("animate",g,F,P)}};s.on("mouseover",C),s.on("mouseout",_),s.on("click",w)};function a(o,s,c){for(var g=o.data.data,f={curveNumber:s.index,pointNumber:g.i,data:s._input,fullData:s},p=0;pWe.x1?2*Math.PI:0)+ee;Ge=se.rpx1Ie?2*Math.PI:0)+ee;Fe={x0:Ge,x1:Ge}}else Fe={rpx0:ne,rpx1:ne},k.extendFlat(Fe,ve(se));else Fe={rpx0:0,rpx1:0};else Fe={x0:ee,x1:ee};return x(Fe,We)}function le(se){var Te=K[m.getPtId(se)],Fe,We=se.transform;if(Te)Fe=Te;else if(Fe={rpx1:se.rpx1,transform:{textPosAngle:We.textPosAngle,scale:0,rotate:We.rotate,rCenter:We.rCenter,x:We.x,y:We.y}},$)if(se.parent)if(Ie){var Ge=se.x1>Ie?2*Math.PI:0;Fe.x0=Fe.x1=Ge}else k.extendFlat(Fe,ve(se));else Fe.x0=Fe.x1=ee;else Fe.x0=Fe.x1=ee;var gt=x(Fe.transform.textPosAngle,se.transform.textPosAngle),mt=x(Fe.rpx1,se.rpx1),Tt=x(Fe.x0,se.x0),At=x(Fe.x1,se.x1),Kt=x(Fe.transform.scale,We.scale),ar=x(Fe.transform.rotate,We.rotate),_r=We.rCenter===0?3:Fe.transform.rCenter===0?1/3:1,Zt=x(Fe.transform.rCenter,We.rCenter),sr=function(Ot){return Zt(Math.pow(Ot,_r))};return function(Ot){var vt=mt(Ot),ht=Tt(Ot),Re=At(Ot),Be=sr(Ot),He=ye(vt,(ht+Re)/2),$e=gt(Ot),Ze={pxmid:He,rpx1:vt,transform:{textPosAngle:$e,rCenter:Be,x:We.x,y:We.y}};return t(B.type,We,b),{transform:{targetX:Ae(Ze),targetY:Me(Ze),scale:Kt(Ot),rotate:ar(Ot),rCenter:Be}}}}function ve(se){var Te=se.parent,Fe=K[m.getPtId(Te)],We={};if(Fe){var Ge=Te.children,gt=Ge.indexOf(se),mt=Ge.length,Tt=x(Fe.x0,Fe.x1);We.x0=Tt(gt/mt),We.x1=Tt(gt/mt)}else We.x0=We.x1=0;return We}}function T(_){return v.partition().size([2*Math.PI,_.height+1])(_)}J.formatSliceLabel=function(_,w,h,u,A){var b=h.texttemplate,z=h.textinfo;if(!b&&(!z||z==="none"))return"";var I=A.separators,N=u[0],R=_.data.data,B=N.hierarchy,F=m.isHierarchyRoot(_),P=m.getParent(B,_),j=m.getValue(_);if(!b){var U=z.split("+"),Z=function(q){return U.indexOf(q)!==-1},Q=[],re;if(Z("label")&&R.label&&Q.push(R.label),R.hasOwnProperty("v")&&Z("value")&&Q.push(m.formatValue(R.v,I)),!F){Z("current path")&&Q.push(m.getPath(_.data));var ne=0;Z("percent parent")&&ne++,Z("percent entry")&&ne++,Z("percent root")&&ne++;var oe=ne>1;if(ne){var V,$=function(q){re=m.formatPercent(V,I),oe&&(re+=" of "+q),Q.push(re)};Z("percent parent")&&!F&&(V=j/m.getValue(P),$("parent")),Z("percent entry")&&(V=j/m.getValue(w),$("entry")),Z("percent root")&&(V=j/m.getValue(B),$("root"))}}return Z("text")&&(re=k.castOption(h,R.i,"text"),k.isValidTextValue(re)&&Q.push(re)),Q.join("
")}var K=k.castOption(h,R.i,"texttemplate");if(!K)return"";var G={};R.label&&(G.label=R.label),R.hasOwnProperty("v")&&(G.value=R.v,G.valueLabel=m.formatValue(R.v,I)),G.currentPath=m.getPath(_.data),F||(G.percentParent=j/m.getValue(P),G.percentParentLabel=m.formatPercent(G.percentParent,I),G.parent=m.getPtLabel(P)),G.percentEntry=j/m.getValue(w),G.percentEntryLabel=m.formatPercent(G.percentEntry,I),G.entry=m.getPtLabel(w),G.percentRoot=j/m.getValue(B),G.percentRootLabel=m.formatPercent(G.percentRoot,I),G.root=m.getPtLabel(B),R.hasOwnProperty("color")&&(G.color=R.color);var X=k.castOption(h,R.i,"text");return(k.isValidTextValue(X)||X==="")&&(G.text=X),G.customdata=k.castOption(h,R.i,"customdata"),k.texttemplateString({data:[G,h._meta],fallback:h.texttemplatefallback,labels:G,locale:A._d3locale,template:K})};function S(_){return _.rpx0===0&&k.isFullCircle([_.x0,_.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(_.halfangle)),_.ring/2))}function M(_){return C(_.rpx1,_.transform.textPosAngle)}function C(_,w){return[_*Math.sin(w),-_*Math.cos(w)]}}}),EC=Ee({"src/traces/sunburst/index.js"(J,H){"use strict";H.exports={moduleType:"trace",name:"sunburst",basePlotModule:Vk(),categories:[],animatable:!0,attributes:fm(),layoutAttributes:B2(),supplyDefaults:Hk(),supplyLayoutDefaults:Gk(),calc:dm().calc,crossTraceCalc:dm().crossTraceCalc,plot:wy().plot,style:N3().style,colorbar:ff(),meta:{}}}}),kC=Ee({"lib/sunburst.js"(J,H){"use strict";H.exports=EC()}}),CC=Ee({"src/traces/treemap/base_plot.js"(J){"use strict";var H=vl();J.name="treemap",J.plot=function(v,x,E,k){H.plotBasePlot(J.name,v,x,E,k)},J.clean=function(v,x,E,k){H.cleanBasePlot(J.name,v,x,E,k)}}}),Kv=Ee({"src/traces/treemap/constants.js"(J,H){"use strict";H.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),Ty=Ee({"src/traces/treemap/attributes.js"(J,H){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:E}=Cs(),k=$s(),l=kl().attributes,e=Vv(),t=fm(),n=Kv(),r=vo().extendFlat,a=kc().pattern;H.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:r({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:t.marker.colors,pattern:a,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:t.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},k("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:r({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:t.textinfo,texttemplate:x({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:v({},{keys:n.eventDataKeys}),hovertemplatefallback:E(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:r({},e.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:e.sort,root:t.root,domain:l({name:"treemap",trace:!0,editType:"calc"})}}}),O3=Ee({"src/traces/treemap/layout_attributes.js"(J,H){"use strict";H.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),LC=Ee({"src/traces/treemap/defaults.js"(J,H){"use strict";var v=Vr(),x=Ty(),E=Qn(),k=kl().defaults,l=fh().handleText,e=Jd().TEXTPAD,t=Hv().handleMarkerDefaults,n=pl(),r=n.hasColorscale,a=n.handleDefaults;H.exports=function(s,c,g,f){function p(A,b){return v.coerce(s,c,x,A,b)}var m=p("labels"),i=p("parents");if(!m||!m.length||!i||!i.length){c.visible=!1;return}var T=p("values");T&&T.length?p("branchvalues"):p("count"),p("level"),p("maxdepth");var S=p("tiling.packing");S==="squarify"&&p("tiling.squarifyratio"),p("tiling.flip"),p("tiling.pad");var M=p("text");p("texttemplate"),p("texttemplatefallback"),c.texttemplate||p("textinfo",v.isArrayOrTypedArray(M)?"text+label":"label"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback");var C=p("pathbar.visible"),_="auto";l(s,c,f,p,_,{hasPathbar:C,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition");var w=c.textposition.indexOf("bottom")!==-1;t(s,c,f,p);var h=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;h?a(s,c,f,p,{prefix:"marker.",cLetter:"c"}):p("marker.depthfade",!(c.marker.colors||[]).length);var u=c.textfont.size*2;p("marker.pad.t",w?u/4:u),p("marker.pad.l",u/4),p("marker.pad.r",u/4),p("marker.pad.b",w?u:u/4),p("marker.cornerradius"),c._hovered={marker:{line:{width:2,color:E.contrast(f.paper_bgcolor)}}},C&&(p("pathbar.thickness",c.pathbar.textfont.size+2*e),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),k(c,f,p),c._length=null}}}),PC=Ee({"src/traces/treemap/layout_defaults.js"(J,H){"use strict";var v=Vr(),x=O3();H.exports=function(k,l){function e(t,n){return v.coerce(k,l,x,t,n)}e("treemapcolorway",l.colorway),e("extendtreemapcolors")}}}),j3=Ee({"src/traces/treemap/calc.js"(J){"use strict";var H=dm();J.calc=function(v,x){return H.calc(v,x)},J.crossTraceCalc=function(v){return H._runCrossTraceCalc("treemap",v)}}}),U3=Ee({"src/traces/treemap/flip_tree.js"(J,H){"use strict";H.exports=function v(x,E,k){var l;k.swapXY&&(l=x.x0,x.x0=x.y0,x.y0=l,l=x.x1,x.x1=x.y1,x.y1=l),k.flipX&&(l=x.x0,x.x0=E[0]-x.x1,x.x1=E[0]-l),k.flipY&&(l=x.y0,x.y0=E[1]-x.y1,x.y1=E[1]-l);var e=x.children;if(e)for(var t=0;t0)for(var u=0;u").join(" ")||"";var oe=x.ensureSingle(re,"g","slicetext"),V=x.ensureSingle(oe,"text","",function(K){K.attr("data-notex",1)}),$=x.ensureUniformFontSize(s,n.determineTextFont(B,Q,N.font,{onPathbar:!0}));V.text(Q._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(E.font,$).call(k.convertToTspans,s),Q.textBB=E.bBox(V.node()),Q.transform=_(Q,{fontSize:$.size,onPathbar:!0}),Q.transform.fontSize=$.size,h?V.transition().attrTween("transform",function(K){var G=b(K,a,z,[i,T]);return function(X){return w(G(X))}}):V.attr("transform",w(Q))})}}}),IC=Ee({"src/traces/treemap/plot_one.js"(J,H){"use strict";var v=Va(),x=(Zv(),tn(iv)).interpolate,E=wd(),k=Vr(),l=Jd().TEXTPAD,e=zv(),t=e.toMoveInsideBar,n=Ef(),r=n.recordMinTextSize,a=Kv(),o=DC();function s(c){return E.isHierarchyRoot(c)?"":E.getPtId(c)}H.exports=function(g,f,p,m,i){var T=g._fullLayout,S=f[0],M=S.trace,C=M.type,_=C==="icicle",w=S.hierarchy,h=E.findEntryWithLevel(w,M.level),u=v.select(p),A=u.selectAll("g.pathbar"),b=u.selectAll("g.slice");if(!h){A.remove(),b.remove();return}var z=E.isHierarchyRoot(h),I=!T.uniformtext.mode&&E.hasTransition(m),N=E.getMaxDepth(M),R=function(Zt){return Zt.data.depth-h.data.depth-1?j+Q:-(Z+Q):0,ne={x0:U,x1:U,y0:re,y1:re+Z},oe=function(Zt,sr,Ot){var vt=M.tiling.pad,ht=function($e){return $e-vt<=sr.x0},Re=function($e){return $e+vt>=sr.x1},Be=function($e){return $e-vt<=sr.y0},He=function($e){return $e+vt>=sr.y1};return Zt.x0===sr.x0&&Zt.x1===sr.x1&&Zt.y0===sr.y0&&Zt.y1===sr.y1?{x0:Zt.x0,x1:Zt.x1,y0:Zt.y0,y1:Zt.y1}:{x0:ht(Zt.x0-vt)?0:Re(Zt.x0-vt)?Ot[0]:Zt.x0,x1:ht(Zt.x1+vt)?0:Re(Zt.x1+vt)?Ot[0]:Zt.x1,y0:Be(Zt.y0-vt)?0:He(Zt.y0-vt)?Ot[1]:Zt.y0,y1:Be(Zt.y1+vt)?0:He(Zt.y1+vt)?Ot[1]:Zt.y1}},V=null,$={},K={},G=null,X=function(Zt,sr){return sr?$[s(Zt)]:K[s(Zt)]},q=function(Zt,sr,Ot,vt){if(sr)return $[s(w)]||ne;var ht=K[M.level]||Ot;return R(Zt)?oe(Zt,ht,vt):{}};S.hasMultipleRoots&&z&&N++,M._maxDepth=N,M._backgroundColor=T.paper_bgcolor,M._entryDepth=h.data.depth,M._atRootLevel=z;var W=-P/2+B.l+B.w*(F.x[1]+F.x[0])/2,ee=-j/2+B.t+B.h*(1-(F.y[1]+F.y[0])/2),ae=function(Zt){return W+Zt},fe=function(Zt){return ee+Zt},ye=fe(0),xe=ae(0),Ae=function(Zt){return xe+Zt},Me=function(Zt){return ye+Zt};function Ie(Zt,sr){return Zt+","+sr}var qe=Ae(0),je=function(Zt){Zt.x=Math.max(qe,Zt.x)},ke=M.pathbar.edgeshape,ge=function(Zt){var sr=Ae(Math.max(Math.min(Zt.x0,Zt.x0),0)),Ot=Ae(Math.min(Math.max(Zt.x1,Zt.x1),U)),vt=Me(Zt.y0),ht=Me(Zt.y1),Re=Z/2,Be={},He={};Be.x=sr,He.x=Ot,Be.y=He.y=(vt+ht)/2;var $e={x:sr,y:vt},Ze={x:Ot,y:vt},Je={x:Ot,y:ht},Mt={x:sr,y:ht};return ke===">"?($e.x-=Re,Ze.x-=Re,Je.x-=Re,Mt.x-=Re):ke==="/"?(Je.x-=Re,Mt.x-=Re,Be.x-=Re/2,He.x-=Re/2):ke==="\\"?($e.x-=Re,Ze.x-=Re,Be.x-=Re/2,He.x-=Re/2):ke==="<"&&(Be.x-=Re,He.x-=Re),je($e),je(Mt),je(Be),je(Ze),je(Je),je(He),"M"+Ie($e.x,$e.y)+"L"+Ie(Ze.x,Ze.y)+"L"+Ie(He.x,He.y)+"L"+Ie(Je.x,Je.y)+"L"+Ie(Mt.x,Mt.y)+"L"+Ie(Be.x,Be.y)+"Z"},le=M[_?"tiling":"marker"].pad,ve=function(Zt){return M.textposition.indexOf(Zt)!==-1},se=ve("top"),Te=ve("left"),Fe=ve("right"),We=ve("bottom"),Ge=function(Zt){var sr=ae(Zt.x0),Ot=ae(Zt.x1),vt=fe(Zt.y0),ht=fe(Zt.y1),Re=Ot-sr,Be=ht-vt;if(!Re||!Be)return"";var He=M.marker.cornerradius||0,$e=Math.min(He,Re/2,Be/2);$e&&Zt.data&&Zt.data.data&&Zt.data.data.label&&(se&&($e=Math.min($e,le.t)),Te&&($e=Math.min($e,le.l)),Fe&&($e=Math.min($e,le.r)),We&&($e=Math.min($e,le.b)));var Ze=function(Je,Mt){return $e?"a"+Ie($e,$e)+" 0 0 1 "+Ie(Je,Mt):""};return"M"+Ie(sr,vt+$e)+Ze($e,-$e)+"L"+Ie(Ot-$e,vt)+Ze($e,$e)+"L"+Ie(Ot,ht-$e)+Ze(-$e,$e)+"L"+Ie(sr+$e,ht)+Ze(-$e,-$e)+"Z"},gt=function(Zt,sr){var Ot=Zt.x0,vt=Zt.x1,ht=Zt.y0,Re=Zt.y1,Be=Zt.textBB,He=se||sr.isHeader&&!We,$e=He?"start":We?"end":"middle",Ze=ve("right"),Je=ve("left")||sr.onPathbar,Mt=Je?-1:Ze?1:0;if(sr.isHeader){if(Ot+=(_?le:le.l)-l,vt-=(_?le:le.r)-l,Ot>=vt){var dt=(Ot+vt)/2;Ot=dt,vt=dt}var Dt;We?(Dt=Re-(_?le:le.b),ht-1,flipY:F.tiling.flip.indexOf("y")>-1,pad:{inner:F.tiling.pad,top:F.marker.pad.t,left:F.marker.pad.l,right:F.marker.pad.r,bottom:F.marker.pad.b}}),re=Q.descendants(),ne=1/0,oe=-1/0;re.forEach(function(X){var q=X.depth;q>=F._maxDepth?(X.x0=X.x1=(X.x0+X.x1)/2,X.y0=X.y1=(X.y0+X.y1)/2):(ne=Math.min(ne,q),oe=Math.max(oe,q))}),p=p.data(re,n.getPtId),F._maxVisibleLayers=isFinite(oe)?oe-ne+1:0,p.enter().append("g").classed("slice",!0),u(p,o,I,[i,T],C),p.order();var V=null;if(h&&z){var $=n.getPtId(z);p.each(function(X){V===null&&n.getPtId(X)===$&&(V={x0:X.x0,x1:X.x1,y0:X.y0,y1:X.y1})})}var K=function(){return V||{x0:0,x1:i,y0:0,y1:T}},G=p;return h&&(G=G.transition().each("end",function(){var X=v.select(this);n.setSliceCursor(X,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),G.each(function(X){var q=n.isHeader(X,F);X._x0=S(X.x0),X._x1=S(X.x1),X._y0=M(X.y0),X._y1=M(X.y1),X._hoverX=S(X.x1-F.marker.pad.r),X._hoverY=M(U?X.y1-F.marker.pad.b/2:X.y0+F.marker.pad.t/2);var W=v.select(this),ee=x.ensureSingle(W,"path","surface",function(Me){Me.style("pointer-events",N?"none":"all")});h?ee.transition().attrTween("d",function(Me){var Ie=A(Me,o,K(),[i,T]);return function(qe){return C(Ie(qe))}}):ee.attr("d",C),W.call(r,f,c,g,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(n.setSliceCursor,c,{isTransitioning:c._transitioning}),ee.call(e,X,F,c,{hovered:!1}),X.x0===X.x1||X.y0===X.y1?X._text="":q?X._text=Z?"":n.getPtLabel(X)||"":X._text=a(X,f,F,g,R)||"";var ae=x.ensureSingle(W,"g","slicetext"),fe=x.ensureSingle(ae,"text","",function(Me){Me.attr("data-notex",1)}),ye=x.ensureUniformFontSize(c,n.determineTextFont(F,X,R.font)),xe=X._text||" ",Ae=q&&xe.indexOf("
")===-1;fe.text(xe).classed("slicetext",!0).attr("text-anchor",j?"end":P||Ae?"start":"middle").call(E.font,ye).call(k.convertToTspans,c),X.textBB=E.bBox(fe.node()),X.transform=_(X,{fontSize:ye.size,isHeader:q}),X.transform.fontSize=ye.size,h?fe.transition().attrTween("transform",function(Me){var Ie=b(Me,o,K(),[i,T]);return function(qe){return w(Ie(qe))}}):fe.attr("transform",w(X))}),V}}}),FC=Ee({"src/traces/treemap/plot.js"(J,H){"use strict";var v=V3(),x=RC();H.exports=function(k,l,e,t){return v(k,l,e,t,{type:"treemap",drawDescendants:x})}}}),zC=Ee({"src/traces/treemap/index.js"(J,H){"use strict";H.exports={moduleType:"trace",name:"treemap",basePlotModule:CC(),categories:[],animatable:!0,attributes:Ty(),layoutAttributes:O3(),supplyDefaults:LC(),supplyLayoutDefaults:PC(),calc:j3().calc,crossTraceCalc:j3().crossTraceCalc,plot:FC(),style:Ay().style,colorbar:ff(),meta:{}}}}),BC=Ee({"lib/treemap.js"(J,H){"use strict";H.exports=zC()}}),NC=Ee({"src/traces/icicle/base_plot.js"(J){"use strict";var H=vl();J.name="icicle",J.plot=function(v,x,E,k){H.plotBasePlot(J.name,v,x,E,k)},J.clean=function(v,x,E,k){H.cleanBasePlot(J.name,v,x,E,k)}}}),H3=Ee({"src/traces/icicle/attributes.js"(J,H){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:E}=Cs(),k=$s(),l=kl().attributes,e=Vv(),t=fm(),n=Ty(),r=Kv(),a=vo().extendFlat,o=kc().pattern;H.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:n.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:a({colors:t.marker.colors,line:t.marker.line,pattern:o,editType:"calc"},k("marker",{colorAttr:"colors",anim:!1})),leaf:t.leaf,pathbar:n.pathbar,text:e.text,textinfo:t.textinfo,texttemplate:x({editType:"plot"},{keys:r.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:v({},{keys:r.eventDataKeys}),hovertemplatefallback:E(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:n.outsidetextfont,textposition:n.textposition,sort:e.sort,root:t.root,domain:l({name:"icicle",trace:!0,editType:"calc"})}}}),G3=Ee({"src/traces/icicle/layout_attributes.js"(J,H){"use strict";H.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),OC=Ee({"src/traces/icicle/defaults.js"(J,H){"use strict";var v=Vr(),x=H3(),E=Qn(),k=kl().defaults,l=fh().handleText,e=Jd().TEXTPAD,t=Hv().handleMarkerDefaults,n=pl(),r=n.hasColorscale,a=n.handleDefaults;H.exports=function(s,c,g,f){function p(w,h){return v.coerce(s,c,x,w,h)}var m=p("labels"),i=p("parents");if(!m||!m.length||!i||!i.length){c.visible=!1;return}var T=p("values");T&&T.length?p("branchvalues"):p("count"),p("level"),p("maxdepth"),p("tiling.orientation"),p("tiling.flip"),p("tiling.pad");var S=p("text");p("texttemplate"),p("texttemplatefallback"),c.texttemplate||p("textinfo",v.isArrayOrTypedArray(S)?"text+label":"label"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback");var M=p("pathbar.visible"),C="auto";l(s,c,f,p,C,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition"),t(s,c,f,p);var _=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;_&&a(s,c,f,p,{prefix:"marker.",cLetter:"c"}),p("leaf.opacity",_?1:.7),c._hovered={marker:{line:{width:2,color:E.contrast(f.paper_bgcolor)}}},M&&(p("pathbar.thickness",c.pathbar.textfont.size+2*e),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),k(c,f,p),c._length=null}}}),jC=Ee({"src/traces/icicle/layout_defaults.js"(J,H){"use strict";var v=Vr(),x=G3();H.exports=function(k,l){function e(t,n){return v.coerce(k,l,x,t,n)}e("iciclecolorway",l.colorway),e("extendiciclecolors")}}}),W3=Ee({"src/traces/icicle/calc.js"(J){"use strict";var H=dm();J.calc=function(v,x){return H.calc(v,x)},J.crossTraceCalc=function(v){return H._runCrossTraceCalc("icicle",v)}}}),UC=Ee({"src/traces/icicle/partition.js"(J,H){"use strict";var v=hm(),x=U3();H.exports=function(k,l,e){var t=e.flipX,n=e.flipY,r=e.orientation==="h",a=e.maxDepth,o=l[0],s=l[1];a&&(o=(k.height+1)*l[0]/Math.min(k.height+1,a),s=(k.height+1)*l[1]/Math.min(k.height+1,a));var c=v.partition().padding(e.pad.inner).size(r?[l[1],o]:[l[0],s])(k);return(r||t||n)&&x(c,l,{swapXY:r,flipX:t,flipY:n}),c}}}),Y3=Ee({"src/traces/icicle/style.js"(J,H){"use strict";var v=Va(),x=Qn(),E=Vr(),k=Ef().resizeText,l=xy();function e(n){var r=n._fullLayout._iciclelayer.selectAll(".trace");k(n,r,"icicle"),r.each(function(a){var o=v.select(this),s=a[0],c=s.trace;o.style("opacity",c.opacity),o.selectAll("path.surface").each(function(g){v.select(this).call(t,g,c,n)})})}function t(n,r,a,o){var s=r.data.data,c=!r.children,g=s.i,f=E.castOption(a,g,"marker.line.color")||x.defaultLine,p=E.castOption(a,g,"marker.line.width")||0;n.call(l,r,a,o).style("stroke-width",p).call(x.stroke,f).style("opacity",c?a.leaf.opacity:null)}H.exports={style:e,styleOne:t}}}),qC=Ee({"src/traces/icicle/draw_descendants.js"(J,H){"use strict";var v=Va(),x=Vr(),E=mo(),k=Fs(),l=UC(),e=Y3().styleOne,t=Kv(),n=wd(),r=Cm(),a=wy().formatSliceLabel,o=!1;H.exports=function(c,g,f,p,m){var i=m.width,T=m.height,S=m.viewX,M=m.viewY,C=m.pathSlice,_=m.toMoveInsideSlice,w=m.strTransform,h=m.hasTransition,u=m.handleSlicesExit,A=m.makeUpdateSliceInterpolator,b=m.makeUpdateTextInterpolator,z=m.prevEntry,I={},N=c._context.staticPlot,R=c._fullLayout,B=g[0],F=B.trace,P=F.textposition.indexOf("left")!==-1,j=F.textposition.indexOf("right")!==-1,U=F.textposition.indexOf("bottom")!==-1,Z=l(f,[i,T],{flipX:F.tiling.flip.indexOf("x")>-1,flipY:F.tiling.flip.indexOf("y")>-1,orientation:F.tiling.orientation,pad:{inner:F.tiling.pad},maxDepth:F._maxDepth}),Q=Z.descendants(),re=1/0,ne=-1/0;Q.forEach(function(G){var X=G.depth;X>=F._maxDepth?(G.x0=G.x1=(G.x0+G.x1)/2,G.y0=G.y1=(G.y0+G.y1)/2):(re=Math.min(re,X),ne=Math.max(ne,X))}),p=p.data(Q,n.getPtId),F._maxVisibleLayers=isFinite(ne)?ne-re+1:0,p.enter().append("g").classed("slice",!0),u(p,o,I,[i,T],C),p.order();var oe=null;if(h&&z){var V=n.getPtId(z);p.each(function(G){oe===null&&n.getPtId(G)===V&&(oe={x0:G.x0,x1:G.x1,y0:G.y0,y1:G.y1})})}var $=function(){return oe||{x0:0,x1:i,y0:0,y1:T}},K=p;return h&&(K=K.transition().each("end",function(){var G=v.select(this);n.setSliceCursor(G,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),K.each(function(G){G._x0=S(G.x0),G._x1=S(G.x1),G._y0=M(G.y0),G._y1=M(G.y1),G._hoverX=S(G.x1-F.tiling.pad),G._hoverY=M(U?G.y1-F.tiling.pad/2:G.y0+F.tiling.pad/2);var X=v.select(this),q=x.ensureSingle(X,"path","surface",function(fe){fe.style("pointer-events",N?"none":"all")});h?q.transition().attrTween("d",function(fe){var ye=A(fe,o,$(),[i,T],{orientation:F.tiling.orientation,flipX:F.tiling.flip.indexOf("x")>-1,flipY:F.tiling.flip.indexOf("y")>-1});return function(xe){return C(ye(xe))}}):q.attr("d",C),X.call(r,f,c,g,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(n.setSliceCursor,c,{isTransitioning:c._transitioning}),q.call(e,G,F,c,{hovered:!1}),G.x0===G.x1||G.y0===G.y1?G._text="":G._text=a(G,f,F,g,R)||"";var W=x.ensureSingle(X,"g","slicetext"),ee=x.ensureSingle(W,"text","",function(fe){fe.attr("data-notex",1)}),ae=x.ensureUniformFontSize(c,n.determineTextFont(F,G,R.font));ee.text(G._text||" ").classed("slicetext",!0).attr("text-anchor",j?"end":P?"start":"middle").call(E.font,ae).call(k.convertToTspans,c),G.textBB=E.bBox(ee.node()),G.transform=_(G,{fontSize:ae.size}),G.transform.fontSize=ae.size,h?ee.transition().attrTween("transform",function(fe){var ye=b(fe,o,$(),[i,T]);return function(xe){return w(ye(xe))}}):ee.attr("transform",w(G))}),oe}}}),VC=Ee({"src/traces/icicle/plot.js"(J,H){"use strict";var v=V3(),x=qC();H.exports=function(k,l,e,t){return v(k,l,e,t,{type:"icicle",drawDescendants:x})}}}),HC=Ee({"src/traces/icicle/index.js"(J,H){"use strict";H.exports={moduleType:"trace",name:"icicle",basePlotModule:NC(),categories:[],animatable:!0,attributes:H3(),layoutAttributes:G3(),supplyDefaults:OC(),supplyLayoutDefaults:jC(),calc:W3().calc,crossTraceCalc:W3().crossTraceCalc,plot:VC(),style:Y3().style,colorbar:ff(),meta:{}}}}),GC=Ee({"lib/icicle.js"(J,H){"use strict";H.exports=HC()}}),WC=Ee({"src/traces/funnelarea/base_plot.js"(J){"use strict";var H=vl();J.name="funnelarea",J.plot=function(v,x,E,k){H.plotBasePlot(J.name,v,x,E,k)},J.clean=function(v,x,E,k){H.cleanBasePlot(J.name,v,x,E,k)}}}),X3=Ee({"src/traces/funnelarea/attributes.js"(J,H){"use strict";var v=Vv(),x=nn(),E=kl().attributes,{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=Cs(),t=vo().extendFlat;H.exports={labels:v.labels,label0:v.label0,dlabel:v.dlabel,values:v.values,marker:{colors:v.marker.colors,line:{color:t({},v.marker.line.color,{dflt:null}),width:t({},v.marker.line.width,{dflt:1}),editType:"calc"},pattern:v.marker.pattern,editType:"calc"},text:v.text,hovertext:v.hovertext,scalegroup:t({},v.scalegroup,{}),textinfo:t({},v.textinfo,{flags:["label","text","value","percent"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:e({editType:"plot"}),hoverinfo:t({},x.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:k({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:e(),textposition:t({},v.textposition,{values:["inside","none"],dflt:"inside"}),textfont:v.textfont,insidetextfont:v.insidetextfont,title:{text:v.title.text,font:v.title.font,position:t({},v.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:E({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}}}),$3=Ee({"src/traces/funnelarea/layout_attributes.js"(J,H){"use strict";var v=G1().hiddenlabels;H.exports={hiddenlabels:v,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),YC=Ee({"src/traces/funnelarea/defaults.js"(J,H){"use strict";var v=Vr(),x=X3(),E=kl().defaults,k=fh().handleText,l=Hv().handleLabelsAndValues,e=Hv().handleMarkerDefaults;H.exports=function(n,r,a,o){function s(C,_){return v.coerce(n,r,x,C,_)}var c=s("labels"),g=s("values"),f=l(c,g),p=f.len;if(r._hasLabels=f.hasLabels,r._hasValues=f.hasValues,!r._hasLabels&&r._hasValues&&(s("label0"),s("dlabel")),!p){r.visible=!1;return}r._length=p,e(n,r,o,s),s("scalegroup");var m=s("text"),i=s("texttemplate");s("texttemplatefallback");var T;if(i||(T=s("textinfo",Array.isArray(m)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),i||T&&T!=="none"){var S=s("textposition");k(n,r,o,s,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else T==="none"&&s("textposition","none");E(r,o,s);var M=s("title.text");M&&(s("title.position"),v.coerceFont(s,"title.font",o.font)),s("aspectratio"),s("baseratio")}}}),XC=Ee({"src/traces/funnelarea/layout_defaults.js"(J,H){"use strict";var v=Vr(),x=$3();H.exports=function(k,l){function e(t,n){return v.coerce(k,l,x,t,n)}e("hiddenlabels"),e("funnelareacolorway",l.colorway),e("extendfunnelareacolors")}}}),Z3=Ee({"src/traces/funnelarea/calc.js"(J,H){"use strict";var v=e0();function x(k,l){return v.calc(k,l)}function E(k){v.crossTraceCalc(k,{type:"funnelarea"})}H.exports={calc:x,crossTraceCalc:E}}}),$C=Ee({"src/traces/funnelarea/plot.js"(J,H){"use strict";var v=Va(),x=mo(),E=Vr(),k=E.strScale,l=E.strTranslate,e=Fs(),t=zv(),n=t.toMoveInsideBar,r=Ef(),a=r.recordMinTextSize,o=r.clearMinTextSize,s=Xd(),c=W1(),g=c.attachFxHandlers,f=c.determineInsideTextFont,p=c.layoutAreas,m=c.prerenderTitles,i=c.positionTitleOutside,T=c.formatSliceLabel;H.exports=function(w,h){var u=w._context.staticPlot,A=w._fullLayout;o("funnelarea",A),m(h,w),p(h,A._size),E.makeTraceGroups(A._funnelarealayer,h,"trace").each(function(b){var z=v.select(this),I=b[0],N=I.trace;C(b),z.each(function(){var R=v.select(this).selectAll("g.slice").data(b);R.enter().append("g").classed("slice",!0),R.exit().remove(),R.each(function(F,P){if(F.hidden){v.select(this).selectAll("path,g").remove();return}F.pointNumber=F.i,F.curveNumber=N.index;var j=I.cx,U=I.cy,Z=v.select(this),Q=Z.selectAll("path.surface").data([F]);Q.enter().append("path").classed("surface",!0).style({"pointer-events":u?"none":"all"}),Z.call(g,w,b);var re="M"+(j+F.TR[0])+","+(U+F.TR[1])+S(F.TR,F.BR)+S(F.BR,F.BL)+S(F.BL,F.TL)+"Z";Q.attr("d",re),T(w,F,I);var ne=s.castOption(N.textposition,F.pts),oe=Z.selectAll("g.slicetext").data(F.text&&ne!=="none"?[0]:[]);oe.enter().append("g").classed("slicetext",!0),oe.exit().remove(),oe.each(function(){var V=E.ensureSingle(v.select(this),"text","",function(ae){ae.attr("data-notex",1)}),$=E.ensureUniformFontSize(w,f(N,F,A.font));V.text(F.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(x.font,$).call(e.convertToTspans,w);var K=x.bBox(V.node()),G,X,q,W=Math.min(F.BL[1],F.BR[1])+U,ee=Math.max(F.TL[1],F.TR[1])+U;X=Math.max(F.TL[0],F.BL[0])+j,q=Math.min(F.TR[0],F.BR[0])+j,G=n(X,q,W,ee,K,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),G.fontSize=$.size,a(N.type,G,A),b[P].transform=G,E.setTransormAndDisplay(V,G)})});var B=v.select(this).selectAll("g.titletext").data(N.title.text?[0]:[]);B.enter().append("g").classed("titletext",!0),B.exit().remove(),B.each(function(){var F=E.ensureSingle(v.select(this),"text","",function(U){U.attr("data-notex",1)}),P=N.title.text;N._meta&&(P=E.templateString(P,N._meta)),F.text(P).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(x.font,N.title.font).call(e.convertToTspans,w);var j=i(I,A._size);F.attr("transform",l(j.x,j.y)+k(Math.min(1,j.scale))+l(j.tx,j.ty))})})})};function S(_,w){var h=w[0]-_[0],u=w[1]-_[1];return"l"+h+","+u}function M(_,w){return[.5*(_[0]+w[0]),.5*(_[1]+w[1])]}function C(_){if(!_.length)return;var w=_[0],h=w.trace,u=h.aspectratio,A=h.baseratio;A>.999&&(A=.999);var b=Math.pow(A,2),z=w.vTotal,I=z*b/(1-b),N=z,R=I/z;function B(){var fe=Math.sqrt(R);return{x:fe,y:-fe}}function F(){var fe=B();return[fe.x,fe.y]}var P,j=[];j.push(F());var U,Z;for(U=_.length-1;U>-1;U--)if(Z=_[U],!Z.hidden){var Q=Z.v/N;R+=Q,j.push(F())}var re=1/0,ne=-1/0;for(U=0;U-1;U--)if(Z=_[U],!Z.hidden){W+=1;var ee=j[W][0],ae=j[W][1];Z.TL=[-ee,ae],Z.TR=[ee,ae],Z.BL=X,Z.BR=q,Z.pxmid=M(Z.TR,Z.BR),X=Z.TL,q=Z.TR}}}}),ZC=Ee({"src/traces/funnelarea/style.js"(J,H){"use strict";var v=Va(),x=jp(),E=Ef().resizeText;H.exports=function(l){var e=l._fullLayout._funnelarealayer.selectAll(".trace");E(l,e,"funnelarea"),e.each(function(t){var n=t[0],r=n.trace,a=v.select(this);a.style({opacity:r.opacity}),a.selectAll("path.surface").each(function(o){v.select(this).call(x,o,r,l)})})}}}),KC=Ee({"src/traces/funnelarea/index.js"(J,H){"use strict";H.exports={moduleType:"trace",name:"funnelarea",basePlotModule:WC(),categories:["pie-like","funnelarea","showLegend"],attributes:X3(),layoutAttributes:$3(),supplyDefaults:YC(),supplyLayoutDefaults:XC(),calc:Z3().calc,crossTraceCalc:Z3().crossTraceCalc,plot:$C(),style:ZC(),styleOne:jp(),meta:{}}}}),JC=Ee({"lib/funnelarea.js"(J,H){"use strict";H.exports=KC()}}),Xc=Ee({"stackgl_modules/index.js"(J,H){"use strict";(()=>{var v={3065(l,e,t){l.exports={alpha_shape:t(3502),convex_hull:t(7352),delaunay_triangulate:t(7642),gl_cone3d:t(6405),gl_error3d:t(9165),gl_line3d:t(5714),gl_mesh3d:t(7201),gl_plot3d:t(4100),gl_scatter3d:t(8418),gl_streamtube3d:t(7815),gl_surface3d:t(9499),ndarray:t(9618),ndarray_linear_interpolate:t(4317)}},6296(l,e,t){"use strict";l.exports=c;var n=t(7261),r=t(9977),a=t(1811);function o(g,f){this._controllerNames=Object.keys(g),this._controllerList=this._controllerNames.map(function(p){return g[p]}),this._mode=f,this._active=g[f],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 s=o.prototype;s.flush=function(g){for(var f=this._controllerList,p=0;p"u"?t(1538):WeakMap,r=t(2762),a=t(8116),o=new n;function s(c){var g=o.get(c),f=g&&(g._triangleBuffer.handle||g._triangleBuffer.buffer);if(!f||!c.isBuffer(f)){var p=r(c,new Float32Array([-1,-1,-1,4,4,-1]));g=a(c,[{buffer:p,type:c.FLOAT,size:2}]),g._triangleBuffer=p,o.set(c,g)}g.bind(),c.drawArrays(c.TRIANGLES,0,3),g.unbind()}l.exports=s},1085(l,e,t){var n=t(1371);l.exports=r;function r(a,o,s){o=typeof o=="number"?o:1,s=s||": ";var c=a.split(/\r?\n/),g=String(c.length+o-1).length;return c.map(function(f,p){var m=p+o,i=String(m).length,T=n(m,g-i);return T+s+f}).join(` +`)}},3952(l,e,t){"use strict";l.exports=a;var n=t(3250);function r(o,s){for(var c=new Array(s+1),g=0;g0)throw new Error("Invalid string. Length must be a multiple of 4");var C=S.indexOf("=");C===-1&&(C=M);var _=C===M?0:4-C%4;return[C,_]}function g(S){var M=c(S),C=M[0],_=M[1];return(C+_)*3/4-_}function f(S,M,C){return(M+C)*3/4-C}function p(S){var M,C=c(S),_=C[0],w=C[1],h=new r(f(S,_,w)),u=0,A=w>0?_-4:_,b;for(b=0;b>16&255,h[u++]=M>>8&255,h[u++]=M&255;return w===2&&(M=n[S.charCodeAt(b)]<<2|n[S.charCodeAt(b+1)]>>4,h[u++]=M&255),w===1&&(M=n[S.charCodeAt(b)]<<10|n[S.charCodeAt(b+1)]<<4|n[S.charCodeAt(b+2)]>>2,h[u++]=M>>8&255,h[u++]=M&255),h}function m(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function i(S,M,C){for(var _,w=[],h=M;hA?A:u+h));return _===1?(M=S[C-1],w.push(t[M>>2]+t[M<<4&63]+"==")):_===2&&(M=(S[C-2]<<8)+S[C-1],w.push(t[M>>10]+t[M>>4&63]+t[M<<2&63]+"=")),w.join("")}},3865(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]).add(o[0].mul(a[1])),a[1].mul(o[1]))}},1318(l){"use strict";l.exports=e;function e(t,n){return t[0].mul(n[1]).cmp(n[0].mul(t[1]))}},8697(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]),a[1].mul(o[0]))}},7842(l,e,t){"use strict";var n=t(6330),r=t(1533),a=t(2651),o=t(6768),s=t(869),c=t(8697);l.exports=g;function g(f,p){if(n(f))return p?c(f,g(p)):[f[0].clone(),f[1].clone()];var m=0,i,T;if(r(f))i=f.clone();else if(typeof f=="string")i=o(f);else{if(f===0)return[a(0),a(1)];if(f===Math.floor(f))i=a(f);else{for(;f!==Math.floor(f);)f=f*Math.pow(2,256),m-=256;i=a(f)}}if(n(p))i.mul(p[1]),T=p[0].clone();else if(r(p))T=p.clone();else if(typeof p=="string")T=o(p);else if(!p)T=a(1);else if(p===Math.floor(p))T=a(p);else{for(;p!==Math.floor(p);)p=p*Math.pow(2,256),m+=256;T=a(p)}return m>0?i=i.ushln(m):m<0&&(T=T.ushln(-m)),s(i,T)}},6330(l,e,t){"use strict";var n=t(1533);l.exports=r;function r(a){return Array.isArray(a)&&a.length===2&&n(a[0])&&n(a[1])}},5716(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return a.cmp(new n(0))}},1369(l,e,t){"use strict";var n=t(5716);l.exports=r;function r(a){var o=a.length,s=a.words,c=0;if(o===1)c=s[0];else if(o===2)c=s[0]+s[1]*67108864;else for(var g=0;g20?52:c+32}},1533(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return a&&typeof a=="object"&&!!a.words}},2651(l,e,t){"use strict";var n=t(6859),r=t(2361);l.exports=a;function a(o){var s=r.exponent(o);return s<52?new n(o):new n(o*Math.pow(2,52-s)).ushln(s-52)}},869(l,e,t){"use strict";var n=t(2651),r=t(5716);l.exports=a;function a(o,s){var c=r(o),g=r(s);if(c===0)return[n(0),n(1)];if(g===0)return[n(0),n(0)];g<0&&(o=o.neg(),s=s.neg());var f=o.gcd(s);return f.cmpn(1)?[o.div(f),s.div(f)]:[o,s]}},6768(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return new n(a)}},6504(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[0]),a[1].mul(o[1]))}},7721(l,e,t){"use strict";var n=t(5716);l.exports=r;function r(a){return n(a[0])*n(a[1])}},5572(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]).sub(a[1].mul(o[0])),a[1].mul(o[1]))}},946(l,e,t){"use strict";var n=t(1369),r=t(4025);l.exports=a;function a(o){var s=o[0],c=o[1];if(s.cmpn(0)===0)return 0;var g=s.abs().divmod(c.abs()),f=g.div,p=n(f),m=g.mod,i=s.negative!==c.negative?-1:1;if(m.cmpn(0)===0)return i*p;if(p){var T=r(p)+4,S=n(m.ushln(T).divRound(c));return i*(p+S*Math.pow(2,-T))}else{var M=c.bitLength()-m.bitLength()+53,S=n(m.ushln(M).divRound(c));return M<1023?i*S*Math.pow(2,-M):(S*=Math.pow(2,-1023),i*S*Math.pow(2,1023-M))}}},2478(l){"use strict";function e(s,c,g,f,p){for(var m=p+1;f<=p;){var i=f+p>>>1,T=s[i],S=g!==void 0?g(T,c):T-c;S>=0?(m=i,p=i-1):f=i+1}return m}function t(s,c,g,f,p){for(var m=p+1;f<=p;){var i=f+p>>>1,T=s[i],S=g!==void 0?g(T,c):T-c;S>0?(m=i,p=i-1):f=i+1}return m}function n(s,c,g,f,p){for(var m=f-1;f<=p;){var i=f+p>>>1,T=s[i],S=g!==void 0?g(T,c):T-c;S<0?(m=i,f=i+1):p=i-1}return m}function r(s,c,g,f,p){for(var m=f-1;f<=p;){var i=f+p>>>1,T=s[i],S=g!==void 0?g(T,c):T-c;S<=0?(m=i,f=i+1):p=i-1}return m}function a(s,c,g,f,p){for(;f<=p;){var m=f+p>>>1,i=s[m],T=g!==void 0?g(i,c):i-c;if(T===0)return m;T<=0?f=m+1:p=m-1}return-1}function o(s,c,g,f,p,m){return typeof g=="function"?m(s,c,g,f===void 0?0:f|0,p===void 0?s.length-1:p|0):m(s,c,void 0,g===void 0?0:g|0,f===void 0?s.length-1:f|0)}l.exports={ge:function(s,c,g,f,p){return o(s,c,g,f,p,e)},gt:function(s,c,g,f,p){return o(s,c,g,f,p,t)},lt:function(s,c,g,f,p){return o(s,c,g,f,p,n)},le:function(s,c,g,f,p){return o(s,c,g,f,p,r)},eq:function(s,c,g,f,p){return o(s,c,g,f,p,a)}}},8828(l,e){"use strict";"use restrict";var t=32;e.INT_BITS=t,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(a<0)},e.abs=function(a){var o=a>>t-1;return(a^o)-o},e.min=function(a,o){return o^(a^o)&-(a65535)<<4,a>>>=o,s=(a>255)<<3,a>>>=s,o|=s,s=(a>15)<<2,a>>>=s,o|=s,s=(a>3)<<1,a>>>=s,o|=s,o|a>>1},e.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},e.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function n(a){var o=32;return a&=-a,a&&o--,a&65535&&(o-=16),a&16711935&&(o-=8),a&252645135&&(o-=4),a&858993459&&(o-=2),a&1431655765&&(o-=1),o}e.countTrailingZeros=n,e.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},e.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},e.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var r=new Array(256);(function(a){for(var o=0;o<256;++o){var s=o,c=o,g=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--g;a[o]=c<>>8&255]<<16|r[a>>>16&255]<<8|r[a>>>24&255]},e.interleave2=function(a,o){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,a|o<<1},e.deinterleave2=function(a,o){return a=a>>>o&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},e.interleave3=function(a,o,s){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,a|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,a|s<<2},e.deinterleave3=function(a,o){return a=a>>>o&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},e.nextCombination=function(a){var o=a|a-1;return o+1|(~o&-~o)-1>>>n(a)+1}},6859(l,e,t){l=t.nmd(l),function(n,r){"use strict";function a(F,P){if(!F)throw new Error(P||"Assertion failed")}function o(F,P){F.super_=P;var j=function(){};j.prototype=P.prototype,F.prototype=new j,F.prototype.constructor=F}function s(F,P,j){if(s.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((P==="le"||P==="be")&&(j=P,P=10),this._init(F||0,P||10,j||"be"))}typeof n=="object"?n.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var c;try{typeof window<"u"&&typeof window.Buffer<"u"?c=window.Buffer:c=t(7790).Buffer}catch{}s.isBN=function(P){return P instanceof s?!0:P!==null&&typeof P=="object"&&P.constructor.wordSize===s.wordSize&&Array.isArray(P.words)},s.max=function(P,j){return P.cmp(j)>0?P:j},s.min=function(P,j){return P.cmp(j)<0?P:j},s.prototype._init=function(P,j,U){if(typeof P=="number")return this._initNumber(P,j,U);if(typeof P=="object")return this._initArray(P,j,U);j==="hex"&&(j=16),a(j===(j|0)&&j>=2&&j<=36),P=P.toString().replace(/\s+/g,"");var Z=0;P[0]==="-"&&(Z++,this.negative=1),Z=0;Z-=3)re=P[Z]|P[Z-1]<<8|P[Z-2]<<16,this.words[Q]|=re<>>26-ne&67108863,ne+=24,ne>=26&&(ne-=26,Q++);else if(U==="le")for(Z=0,Q=0;Z>>26-ne&67108863,ne+=24,ne>=26&&(ne-=26,Q++);return this.strip()};function g(F,P){var j=F.charCodeAt(P);return j>=65&&j<=70?j-55:j>=97&&j<=102?j-87:j-48&15}function f(F,P,j){var U=g(F,j);return j-1>=P&&(U|=g(F,j-1)<<4),U}s.prototype._parseHex=function(P,j,U){this.length=Math.ceil((P.length-j)/6),this.words=new Array(this.length);for(var Z=0;Z=j;Z-=2)ne=f(P,j,Z)<=18?(Q-=18,re+=1,this.words[re]|=ne>>>26):Q+=8;else{var oe=P.length-j;for(Z=oe%2===0?j+1:j;Z=18?(Q-=18,re+=1,this.words[re]|=ne>>>26):Q+=8}this.strip()};function p(F,P,j,U){for(var Z=0,Q=Math.min(F.length,j),re=P;re=49?Z+=ne-49+10:ne>=17?Z+=ne-17+10:Z+=ne}return Z}s.prototype._parseBase=function(P,j,U){this.words=[0],this.length=1;for(var Z=0,Q=1;Q<=67108863;Q*=j)Z++;Z--,Q=Q/j|0;for(var re=P.length-U,ne=re%Z,oe=Math.min(re,re-ne)+U,V=0,$=U;$1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var m=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],i=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(P,j){P=P||10,j=j|0||1;var U;if(P===16||P==="hex"){U="";for(var Z=0,Q=0,re=0;re>>24-Z&16777215,Z+=2,Z>=26&&(Z-=26,re--),Q!==0||re!==this.length-1?U=m[6-oe.length]+oe+U:U=oe+U}for(Q!==0&&(U=Q.toString(16)+U);U.length%j!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}if(P===(P|0)&&P>=2&&P<=36){var V=i[P],$=T[P];U="";var K=this.clone();for(K.negative=0;!K.isZero();){var G=K.modn($).toString(P);K=K.idivn($),K.isZero()?U=G+U:U=m[V-G.length]+G+U}for(this.isZero()&&(U="0"+U);U.length%j!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}a(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var P=this.words[0];return this.length===2?P+=this.words[1]*67108864:this.length===3&&this.words[2]===1?P+=4503599627370496+this.words[1]*67108864:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-P:P},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(P,j){return a(typeof c<"u"),this.toArrayLike(c,P,j)},s.prototype.toArray=function(P,j){return this.toArrayLike(Array,P,j)},s.prototype.toArrayLike=function(P,j,U){var Z=this.byteLength(),Q=U||Math.max(1,Z);a(Z<=Q,"byte array longer than desired length"),a(Q>0,"Requested array length <= 0"),this.strip();var re=j==="le",ne=new P(Q),oe,V,$=this.clone();if(re){for(V=0;!$.isZero();V++)oe=$.andln(255),$.iushrn(8),ne[V]=oe;for(;V=4096&&(U+=13,j>>>=13),j>=64&&(U+=7,j>>>=7),j>=8&&(U+=4,j>>>=4),j>=2&&(U+=2,j>>>=2),U+j},s.prototype._zeroBits=function(P){if(P===0)return 26;var j=P,U=0;return j&8191||(U+=13,j>>>=13),j&127||(U+=7,j>>>=7),j&15||(U+=4,j>>>=4),j&3||(U+=2,j>>>=2),j&1||U++,U},s.prototype.bitLength=function(){var P=this.words[this.length-1],j=this._countBits(P);return(this.length-1)*26+j};function S(F){for(var P=new Array(F.bitLength()),j=0;j>>Z}return P}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var P=0,j=0;jP.length?this.clone().ior(P):P.clone().ior(this)},s.prototype.uor=function(P){return this.length>P.length?this.clone().iuor(P):P.clone().iuor(this)},s.prototype.iuand=function(P){var j;this.length>P.length?j=P:j=this;for(var U=0;UP.length?this.clone().iand(P):P.clone().iand(this)},s.prototype.uand=function(P){return this.length>P.length?this.clone().iuand(P):P.clone().iuand(this)},s.prototype.iuxor=function(P){var j,U;this.length>P.length?(j=this,U=P):(j=P,U=this);for(var Z=0;ZP.length?this.clone().ixor(P):P.clone().ixor(this)},s.prototype.uxor=function(P){return this.length>P.length?this.clone().iuxor(P):P.clone().iuxor(this)},s.prototype.inotn=function(P){a(typeof P=="number"&&P>=0);var j=Math.ceil(P/26)|0,U=P%26;this._expand(j),U>0&&j--;for(var Z=0;Z0&&(this.words[Z]=~this.words[Z]&67108863>>26-U,Z++);Z=0);var U=P/26|0,Z=P%26;return this._expand(U+1),j?this.words[U]=this.words[U]|1<P.length?(U=this,Z=P):(U=P,Z=this);for(var Q=0,re=0;re>>26;for(;Q!==0&&re>>26;if(this.length=U.length,Q!==0)this.words[this.length]=Q,this.length++;else if(U!==this)for(;reP.length?this.clone().iadd(P):P.clone().iadd(this)},s.prototype.isub=function(P){if(P.negative!==0){P.negative=0;var j=this.iadd(P);return P.negative=1,j._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(P),this.negative=1,this._normSign();var U=this.cmp(P);if(U===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Z,Q;U>0?(Z=this,Q=P):(Z=P,Q=this);for(var re=0,ne=0;ne>26,this.words[ne]=j&67108863;for(;re!==0&&ne>26,this.words[ne]=j&67108863;if(re===0&&ne>>26,K=oe&67108863,G=Math.min(V,P.length-1),X=Math.max(0,V-F.length+1);X<=G;X++){var q=V-X|0;Z=F.words[q]|0,Q=P.words[X]|0,re=Z*Q+K,$+=re/67108864|0,K=re&67108863}j.words[V]=K|0,oe=$|0}return oe!==0?j.words[V]=oe|0:j.length--,j.strip()}var C=function(P,j,U){var Z=P.words,Q=j.words,re=U.words,ne=0,oe,V,$,K=Z[0]|0,G=K&8191,X=K>>>13,q=Z[1]|0,W=q&8191,ee=q>>>13,ae=Z[2]|0,fe=ae&8191,ye=ae>>>13,xe=Z[3]|0,Ae=xe&8191,Me=xe>>>13,Ie=Z[4]|0,qe=Ie&8191,je=Ie>>>13,ke=Z[5]|0,ge=ke&8191,le=ke>>>13,ve=Z[6]|0,se=ve&8191,Te=ve>>>13,Fe=Z[7]|0,We=Fe&8191,Ge=Fe>>>13,gt=Z[8]|0,mt=gt&8191,Tt=gt>>>13,At=Z[9]|0,Kt=At&8191,ar=At>>>13,_r=Q[0]|0,Zt=_r&8191,sr=_r>>>13,Ot=Q[1]|0,vt=Ot&8191,ht=Ot>>>13,Re=Q[2]|0,Be=Re&8191,He=Re>>>13,$e=Q[3]|0,Ze=$e&8191,Je=$e>>>13,Mt=Q[4]|0,dt=Mt&8191,Dt=Mt>>>13,Ct=Q[5]|0,Vt=Ct&8191,Ht=Ct>>>13,Wt=Q[6]|0,Sr=Wt&8191,ia=Wt>>>13,$t=Q[7]|0,It=$t&8191,ir=$t>>>13,cr=Q[8]|0,fr=cr&8191,Ir=cr>>>13,sa=Q[9]|0,aa=sa&8191,xa=sa>>>13;U.negative=P.negative^j.negative,U.length=19,oe=Math.imul(G,Zt),V=Math.imul(G,sr),V=V+Math.imul(X,Zt)|0,$=Math.imul(X,sr);var ja=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(ja>>>26)|0,ja&=67108863,oe=Math.imul(W,Zt),V=Math.imul(W,sr),V=V+Math.imul(ee,Zt)|0,$=Math.imul(ee,sr),oe=oe+Math.imul(G,vt)|0,V=V+Math.imul(G,ht)|0,V=V+Math.imul(X,vt)|0,$=$+Math.imul(X,ht)|0;var Oa=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(Oa>>>26)|0,Oa&=67108863,oe=Math.imul(fe,Zt),V=Math.imul(fe,sr),V=V+Math.imul(ye,Zt)|0,$=Math.imul(ye,sr),oe=oe+Math.imul(W,vt)|0,V=V+Math.imul(W,ht)|0,V=V+Math.imul(ee,vt)|0,$=$+Math.imul(ee,ht)|0,oe=oe+Math.imul(G,Be)|0,V=V+Math.imul(G,He)|0,V=V+Math.imul(X,Be)|0,$=$+Math.imul(X,He)|0;var An=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(An>>>26)|0,An&=67108863,oe=Math.imul(Ae,Zt),V=Math.imul(Ae,sr),V=V+Math.imul(Me,Zt)|0,$=Math.imul(Me,sr),oe=oe+Math.imul(fe,vt)|0,V=V+Math.imul(fe,ht)|0,V=V+Math.imul(ye,vt)|0,$=$+Math.imul(ye,ht)|0,oe=oe+Math.imul(W,Be)|0,V=V+Math.imul(W,He)|0,V=V+Math.imul(ee,Be)|0,$=$+Math.imul(ee,He)|0,oe=oe+Math.imul(G,Ze)|0,V=V+Math.imul(G,Je)|0,V=V+Math.imul(X,Ze)|0,$=$+Math.imul(X,Je)|0;var un=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(un>>>26)|0,un&=67108863,oe=Math.imul(qe,Zt),V=Math.imul(qe,sr),V=V+Math.imul(je,Zt)|0,$=Math.imul(je,sr),oe=oe+Math.imul(Ae,vt)|0,V=V+Math.imul(Ae,ht)|0,V=V+Math.imul(Me,vt)|0,$=$+Math.imul(Me,ht)|0,oe=oe+Math.imul(fe,Be)|0,V=V+Math.imul(fe,He)|0,V=V+Math.imul(ye,Be)|0,$=$+Math.imul(ye,He)|0,oe=oe+Math.imul(W,Ze)|0,V=V+Math.imul(W,Je)|0,V=V+Math.imul(ee,Ze)|0,$=$+Math.imul(ee,Je)|0,oe=oe+Math.imul(G,dt)|0,V=V+Math.imul(G,Dt)|0,V=V+Math.imul(X,dt)|0,$=$+Math.imul(X,Dt)|0;var Ja=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(Ja>>>26)|0,Ja&=67108863,oe=Math.imul(ge,Zt),V=Math.imul(ge,sr),V=V+Math.imul(le,Zt)|0,$=Math.imul(le,sr),oe=oe+Math.imul(qe,vt)|0,V=V+Math.imul(qe,ht)|0,V=V+Math.imul(je,vt)|0,$=$+Math.imul(je,ht)|0,oe=oe+Math.imul(Ae,Be)|0,V=V+Math.imul(Ae,He)|0,V=V+Math.imul(Me,Be)|0,$=$+Math.imul(Me,He)|0,oe=oe+Math.imul(fe,Ze)|0,V=V+Math.imul(fe,Je)|0,V=V+Math.imul(ye,Ze)|0,$=$+Math.imul(ye,Je)|0,oe=oe+Math.imul(W,dt)|0,V=V+Math.imul(W,Dt)|0,V=V+Math.imul(ee,dt)|0,$=$+Math.imul(ee,Dt)|0,oe=oe+Math.imul(G,Vt)|0,V=V+Math.imul(G,Ht)|0,V=V+Math.imul(X,Vt)|0,$=$+Math.imul(X,Ht)|0;var ei=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(ei>>>26)|0,ei&=67108863,oe=Math.imul(se,Zt),V=Math.imul(se,sr),V=V+Math.imul(Te,Zt)|0,$=Math.imul(Te,sr),oe=oe+Math.imul(ge,vt)|0,V=V+Math.imul(ge,ht)|0,V=V+Math.imul(le,vt)|0,$=$+Math.imul(le,ht)|0,oe=oe+Math.imul(qe,Be)|0,V=V+Math.imul(qe,He)|0,V=V+Math.imul(je,Be)|0,$=$+Math.imul(je,He)|0,oe=oe+Math.imul(Ae,Ze)|0,V=V+Math.imul(Ae,Je)|0,V=V+Math.imul(Me,Ze)|0,$=$+Math.imul(Me,Je)|0,oe=oe+Math.imul(fe,dt)|0,V=V+Math.imul(fe,Dt)|0,V=V+Math.imul(ye,dt)|0,$=$+Math.imul(ye,Dt)|0,oe=oe+Math.imul(W,Vt)|0,V=V+Math.imul(W,Ht)|0,V=V+Math.imul(ee,Vt)|0,$=$+Math.imul(ee,Ht)|0,oe=oe+Math.imul(G,Sr)|0,V=V+Math.imul(G,ia)|0,V=V+Math.imul(X,Sr)|0,$=$+Math.imul(X,ia)|0;var Fn=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(Fn>>>26)|0,Fn&=67108863,oe=Math.imul(We,Zt),V=Math.imul(We,sr),V=V+Math.imul(Ge,Zt)|0,$=Math.imul(Ge,sr),oe=oe+Math.imul(se,vt)|0,V=V+Math.imul(se,ht)|0,V=V+Math.imul(Te,vt)|0,$=$+Math.imul(Te,ht)|0,oe=oe+Math.imul(ge,Be)|0,V=V+Math.imul(ge,He)|0,V=V+Math.imul(le,Be)|0,$=$+Math.imul(le,He)|0,oe=oe+Math.imul(qe,Ze)|0,V=V+Math.imul(qe,Je)|0,V=V+Math.imul(je,Ze)|0,$=$+Math.imul(je,Je)|0,oe=oe+Math.imul(Ae,dt)|0,V=V+Math.imul(Ae,Dt)|0,V=V+Math.imul(Me,dt)|0,$=$+Math.imul(Me,Dt)|0,oe=oe+Math.imul(fe,Vt)|0,V=V+Math.imul(fe,Ht)|0,V=V+Math.imul(ye,Vt)|0,$=$+Math.imul(ye,Ht)|0,oe=oe+Math.imul(W,Sr)|0,V=V+Math.imul(W,ia)|0,V=V+Math.imul(ee,Sr)|0,$=$+Math.imul(ee,ia)|0,oe=oe+Math.imul(G,It)|0,V=V+Math.imul(G,ir)|0,V=V+Math.imul(X,It)|0,$=$+Math.imul(X,ir)|0;var ni=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(ni>>>26)|0,ni&=67108863,oe=Math.imul(mt,Zt),V=Math.imul(mt,sr),V=V+Math.imul(Tt,Zt)|0,$=Math.imul(Tt,sr),oe=oe+Math.imul(We,vt)|0,V=V+Math.imul(We,ht)|0,V=V+Math.imul(Ge,vt)|0,$=$+Math.imul(Ge,ht)|0,oe=oe+Math.imul(se,Be)|0,V=V+Math.imul(se,He)|0,V=V+Math.imul(Te,Be)|0,$=$+Math.imul(Te,He)|0,oe=oe+Math.imul(ge,Ze)|0,V=V+Math.imul(ge,Je)|0,V=V+Math.imul(le,Ze)|0,$=$+Math.imul(le,Je)|0,oe=oe+Math.imul(qe,dt)|0,V=V+Math.imul(qe,Dt)|0,V=V+Math.imul(je,dt)|0,$=$+Math.imul(je,Dt)|0,oe=oe+Math.imul(Ae,Vt)|0,V=V+Math.imul(Ae,Ht)|0,V=V+Math.imul(Me,Vt)|0,$=$+Math.imul(Me,Ht)|0,oe=oe+Math.imul(fe,Sr)|0,V=V+Math.imul(fe,ia)|0,V=V+Math.imul(ye,Sr)|0,$=$+Math.imul(ye,ia)|0,oe=oe+Math.imul(W,It)|0,V=V+Math.imul(W,ir)|0,V=V+Math.imul(ee,It)|0,$=$+Math.imul(ee,ir)|0,oe=oe+Math.imul(G,fr)|0,V=V+Math.imul(G,Ir)|0,V=V+Math.imul(X,fr)|0,$=$+Math.imul(X,Ir)|0;var Mi=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,oe=Math.imul(Kt,Zt),V=Math.imul(Kt,sr),V=V+Math.imul(ar,Zt)|0,$=Math.imul(ar,sr),oe=oe+Math.imul(mt,vt)|0,V=V+Math.imul(mt,ht)|0,V=V+Math.imul(Tt,vt)|0,$=$+Math.imul(Tt,ht)|0,oe=oe+Math.imul(We,Be)|0,V=V+Math.imul(We,He)|0,V=V+Math.imul(Ge,Be)|0,$=$+Math.imul(Ge,He)|0,oe=oe+Math.imul(se,Ze)|0,V=V+Math.imul(se,Je)|0,V=V+Math.imul(Te,Ze)|0,$=$+Math.imul(Te,Je)|0,oe=oe+Math.imul(ge,dt)|0,V=V+Math.imul(ge,Dt)|0,V=V+Math.imul(le,dt)|0,$=$+Math.imul(le,Dt)|0,oe=oe+Math.imul(qe,Vt)|0,V=V+Math.imul(qe,Ht)|0,V=V+Math.imul(je,Vt)|0,$=$+Math.imul(je,Ht)|0,oe=oe+Math.imul(Ae,Sr)|0,V=V+Math.imul(Ae,ia)|0,V=V+Math.imul(Me,Sr)|0,$=$+Math.imul(Me,ia)|0,oe=oe+Math.imul(fe,It)|0,V=V+Math.imul(fe,ir)|0,V=V+Math.imul(ye,It)|0,$=$+Math.imul(ye,ir)|0,oe=oe+Math.imul(W,fr)|0,V=V+Math.imul(W,Ir)|0,V=V+Math.imul(ee,fr)|0,$=$+Math.imul(ee,Ir)|0,oe=oe+Math.imul(G,aa)|0,V=V+Math.imul(G,xa)|0,V=V+Math.imul(X,aa)|0,$=$+Math.imul(X,xa)|0;var ci=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(ci>>>26)|0,ci&=67108863,oe=Math.imul(Kt,vt),V=Math.imul(Kt,ht),V=V+Math.imul(ar,vt)|0,$=Math.imul(ar,ht),oe=oe+Math.imul(mt,Be)|0,V=V+Math.imul(mt,He)|0,V=V+Math.imul(Tt,Be)|0,$=$+Math.imul(Tt,He)|0,oe=oe+Math.imul(We,Ze)|0,V=V+Math.imul(We,Je)|0,V=V+Math.imul(Ge,Ze)|0,$=$+Math.imul(Ge,Je)|0,oe=oe+Math.imul(se,dt)|0,V=V+Math.imul(se,Dt)|0,V=V+Math.imul(Te,dt)|0,$=$+Math.imul(Te,Dt)|0,oe=oe+Math.imul(ge,Vt)|0,V=V+Math.imul(ge,Ht)|0,V=V+Math.imul(le,Vt)|0,$=$+Math.imul(le,Ht)|0,oe=oe+Math.imul(qe,Sr)|0,V=V+Math.imul(qe,ia)|0,V=V+Math.imul(je,Sr)|0,$=$+Math.imul(je,ia)|0,oe=oe+Math.imul(Ae,It)|0,V=V+Math.imul(Ae,ir)|0,V=V+Math.imul(Me,It)|0,$=$+Math.imul(Me,ir)|0,oe=oe+Math.imul(fe,fr)|0,V=V+Math.imul(fe,Ir)|0,V=V+Math.imul(ye,fr)|0,$=$+Math.imul(ye,Ir)|0,oe=oe+Math.imul(W,aa)|0,V=V+Math.imul(W,xa)|0,V=V+Math.imul(ee,aa)|0,$=$+Math.imul(ee,xa)|0;var bn=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(bn>>>26)|0,bn&=67108863,oe=Math.imul(Kt,Be),V=Math.imul(Kt,He),V=V+Math.imul(ar,Be)|0,$=Math.imul(ar,He),oe=oe+Math.imul(mt,Ze)|0,V=V+Math.imul(mt,Je)|0,V=V+Math.imul(Tt,Ze)|0,$=$+Math.imul(Tt,Je)|0,oe=oe+Math.imul(We,dt)|0,V=V+Math.imul(We,Dt)|0,V=V+Math.imul(Ge,dt)|0,$=$+Math.imul(Ge,Dt)|0,oe=oe+Math.imul(se,Vt)|0,V=V+Math.imul(se,Ht)|0,V=V+Math.imul(Te,Vt)|0,$=$+Math.imul(Te,Ht)|0,oe=oe+Math.imul(ge,Sr)|0,V=V+Math.imul(ge,ia)|0,V=V+Math.imul(le,Sr)|0,$=$+Math.imul(le,ia)|0,oe=oe+Math.imul(qe,It)|0,V=V+Math.imul(qe,ir)|0,V=V+Math.imul(je,It)|0,$=$+Math.imul(je,ir)|0,oe=oe+Math.imul(Ae,fr)|0,V=V+Math.imul(Ae,Ir)|0,V=V+Math.imul(Me,fr)|0,$=$+Math.imul(Me,Ir)|0,oe=oe+Math.imul(fe,aa)|0,V=V+Math.imul(fe,xa)|0,V=V+Math.imul(ye,aa)|0,$=$+Math.imul(ye,xa)|0;var pn=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(pn>>>26)|0,pn&=67108863,oe=Math.imul(Kt,Ze),V=Math.imul(Kt,Je),V=V+Math.imul(ar,Ze)|0,$=Math.imul(ar,Je),oe=oe+Math.imul(mt,dt)|0,V=V+Math.imul(mt,Dt)|0,V=V+Math.imul(Tt,dt)|0,$=$+Math.imul(Tt,Dt)|0,oe=oe+Math.imul(We,Vt)|0,V=V+Math.imul(We,Ht)|0,V=V+Math.imul(Ge,Vt)|0,$=$+Math.imul(Ge,Ht)|0,oe=oe+Math.imul(se,Sr)|0,V=V+Math.imul(se,ia)|0,V=V+Math.imul(Te,Sr)|0,$=$+Math.imul(Te,ia)|0,oe=oe+Math.imul(ge,It)|0,V=V+Math.imul(ge,ir)|0,V=V+Math.imul(le,It)|0,$=$+Math.imul(le,ir)|0,oe=oe+Math.imul(qe,fr)|0,V=V+Math.imul(qe,Ir)|0,V=V+Math.imul(je,fr)|0,$=$+Math.imul(je,Ir)|0,oe=oe+Math.imul(Ae,aa)|0,V=V+Math.imul(Ae,xa)|0,V=V+Math.imul(Me,aa)|0,$=$+Math.imul(Me,xa)|0;var Ii=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,oe=Math.imul(Kt,dt),V=Math.imul(Kt,Dt),V=V+Math.imul(ar,dt)|0,$=Math.imul(ar,Dt),oe=oe+Math.imul(mt,Vt)|0,V=V+Math.imul(mt,Ht)|0,V=V+Math.imul(Tt,Vt)|0,$=$+Math.imul(Tt,Ht)|0,oe=oe+Math.imul(We,Sr)|0,V=V+Math.imul(We,ia)|0,V=V+Math.imul(Ge,Sr)|0,$=$+Math.imul(Ge,ia)|0,oe=oe+Math.imul(se,It)|0,V=V+Math.imul(se,ir)|0,V=V+Math.imul(Te,It)|0,$=$+Math.imul(Te,ir)|0,oe=oe+Math.imul(ge,fr)|0,V=V+Math.imul(ge,Ir)|0,V=V+Math.imul(le,fr)|0,$=$+Math.imul(le,Ir)|0,oe=oe+Math.imul(qe,aa)|0,V=V+Math.imul(qe,xa)|0,V=V+Math.imul(je,aa)|0,$=$+Math.imul(je,xa)|0;var ho=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(ho>>>26)|0,ho&=67108863,oe=Math.imul(Kt,Vt),V=Math.imul(Kt,Ht),V=V+Math.imul(ar,Vt)|0,$=Math.imul(ar,Ht),oe=oe+Math.imul(mt,Sr)|0,V=V+Math.imul(mt,ia)|0,V=V+Math.imul(Tt,Sr)|0,$=$+Math.imul(Tt,ia)|0,oe=oe+Math.imul(We,It)|0,V=V+Math.imul(We,ir)|0,V=V+Math.imul(Ge,It)|0,$=$+Math.imul(Ge,ir)|0,oe=oe+Math.imul(se,fr)|0,V=V+Math.imul(se,Ir)|0,V=V+Math.imul(Te,fr)|0,$=$+Math.imul(Te,Ir)|0,oe=oe+Math.imul(ge,aa)|0,V=V+Math.imul(ge,xa)|0,V=V+Math.imul(le,aa)|0,$=$+Math.imul(le,xa)|0;var dn=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(dn>>>26)|0,dn&=67108863,oe=Math.imul(Kt,Sr),V=Math.imul(Kt,ia),V=V+Math.imul(ar,Sr)|0,$=Math.imul(ar,ia),oe=oe+Math.imul(mt,It)|0,V=V+Math.imul(mt,ir)|0,V=V+Math.imul(Tt,It)|0,$=$+Math.imul(Tt,ir)|0,oe=oe+Math.imul(We,fr)|0,V=V+Math.imul(We,Ir)|0,V=V+Math.imul(Ge,fr)|0,$=$+Math.imul(Ge,Ir)|0,oe=oe+Math.imul(se,aa)|0,V=V+Math.imul(se,xa)|0,V=V+Math.imul(Te,aa)|0,$=$+Math.imul(Te,xa)|0;var Za=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(Za>>>26)|0,Za&=67108863,oe=Math.imul(Kt,It),V=Math.imul(Kt,ir),V=V+Math.imul(ar,It)|0,$=Math.imul(ar,ir),oe=oe+Math.imul(mt,fr)|0,V=V+Math.imul(mt,Ir)|0,V=V+Math.imul(Tt,fr)|0,$=$+Math.imul(Tt,Ir)|0,oe=oe+Math.imul(We,aa)|0,V=V+Math.imul(We,xa)|0,V=V+Math.imul(Ge,aa)|0,$=$+Math.imul(Ge,xa)|0;var ot=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(ot>>>26)|0,ot&=67108863,oe=Math.imul(Kt,fr),V=Math.imul(Kt,Ir),V=V+Math.imul(ar,fr)|0,$=Math.imul(ar,Ir),oe=oe+Math.imul(mt,aa)|0,V=V+Math.imul(mt,xa)|0,V=V+Math.imul(Tt,aa)|0,$=$+Math.imul(Tt,xa)|0;var et=(ne+oe|0)+((V&8191)<<13)|0;ne=($+(V>>>13)|0)+(et>>>26)|0,et&=67108863,oe=Math.imul(Kt,aa),V=Math.imul(Kt,xa),V=V+Math.imul(ar,aa)|0,$=Math.imul(ar,xa);var hr=(ne+oe|0)+((V&8191)<<13)|0;return ne=($+(V>>>13)|0)+(hr>>>26)|0,hr&=67108863,re[0]=ja,re[1]=Oa,re[2]=An,re[3]=un,re[4]=Ja,re[5]=ei,re[6]=Fn,re[7]=ni,re[8]=Mi,re[9]=ci,re[10]=bn,re[11]=pn,re[12]=Ii,re[13]=ho,re[14]=dn,re[15]=Za,re[16]=ot,re[17]=et,re[18]=hr,ne!==0&&(re[19]=ne,U.length++),U};Math.imul||(C=M);function _(F,P,j){j.negative=P.negative^F.negative,j.length=F.length+P.length;for(var U=0,Z=0,Q=0;Q>>26)|0,Z+=re>>>26,re&=67108863}j.words[Q]=ne,U=re,re=Z}return U!==0?j.words[Q]=U:j.length--,j.strip()}function w(F,P,j){var U=new h;return U.mulp(F,P,j)}s.prototype.mulTo=function(P,j){var U,Z=this.length+P.length;return this.length===10&&P.length===10?U=C(this,P,j):Z<63?U=M(this,P,j):Z<1024?U=_(this,P,j):U=w(this,P,j),U};function h(F,P){this.x=F,this.y=P}h.prototype.makeRBT=function(P){for(var j=new Array(P),U=s.prototype._countBits(P)-1,Z=0;Z>=1;return Z},h.prototype.permute=function(P,j,U,Z,Q,re){for(var ne=0;ne>>1)Q++;return 1<>>13,U[2*re+1]=Q&8191,Q=Q>>>13;for(re=2*j;re>=26,j+=Z/67108864|0,j+=Q>>>26,this.words[U]=Q&67108863}return j!==0&&(this.words[U]=j,this.length++),P===0&&(this.length=1,this._normSign()),this},s.prototype.muln=function(P){return this.clone().imuln(P)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(P){var j=S(P);if(j.length===0)return new s(1);for(var U=this,Z=0;Z=0);var j=P%26,U=(P-j)/26,Z=67108863>>>26-j<<26-j,Q;if(j!==0){var re=0;for(Q=0;Q>>26-j}re&&(this.words[Q]=re,this.length++)}if(U!==0){for(Q=this.length-1;Q>=0;Q--)this.words[Q+U]=this.words[Q];for(Q=0;Q=0);var Z;j?Z=(j-j%26)/26:Z=0;var Q=P%26,re=Math.min((P-Q)/26,this.length),ne=67108863^67108863>>>Q<re)for(this.length-=re,V=0;V=0&&($!==0||V>=Z);V--){var K=this.words[V]|0;this.words[V]=$<<26-Q|K>>>Q,$=K&ne}return oe&&$!==0&&(oe.words[oe.length++]=$),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(P,j,U){return a(this.negative===0),this.iushrn(P,j,U)},s.prototype.shln=function(P){return this.clone().ishln(P)},s.prototype.ushln=function(P){return this.clone().iushln(P)},s.prototype.shrn=function(P){return this.clone().ishrn(P)},s.prototype.ushrn=function(P){return this.clone().iushrn(P)},s.prototype.testn=function(P){a(typeof P=="number"&&P>=0);var j=P%26,U=(P-j)/26,Z=1<=0);var j=P%26,U=(P-j)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=U)return this;if(j!==0&&U++,this.length=Math.min(U,this.length),j!==0){var Z=67108863^67108863>>>j<=67108864;j++)this.words[j]-=67108864,j===this.length-1?this.words[j+1]=1:this.words[j+1]++;return this.length=Math.max(this.length,j+1),this},s.prototype.isubn=function(P){if(a(typeof P=="number"),a(P<67108864),P<0)return this.iaddn(-P);if(this.negative!==0)return this.negative=0,this.iaddn(P),this.negative=1,this;if(this.words[0]-=P,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var j=0;j>26)-(oe/67108864|0),this.words[Q+U]=re&67108863}for(;Q>26,this.words[Q+U]=re&67108863;if(ne===0)return this.strip();for(a(ne===-1),ne=0,Q=0;Q>26,this.words[Q]=re&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(P,j){var U=this.length-P.length,Z=this.clone(),Q=P,re=Q.words[Q.length-1]|0,ne=this._countBits(re);U=26-ne,U!==0&&(Q=Q.ushln(U),Z.iushln(U),re=Q.words[Q.length-1]|0);var oe=Z.length-Q.length,V;if(j!=="mod"){V=new s(null),V.length=oe+1,V.words=new Array(V.length);for(var $=0;$=0;G--){var X=(Z.words[Q.length+G]|0)*67108864+(Z.words[Q.length+G-1]|0);for(X=Math.min(X/re|0,67108863),Z._ishlnsubmul(Q,X,G);Z.negative!==0;)X--,Z.negative=0,Z._ishlnsubmul(Q,1,G),Z.isZero()||(Z.negative^=1);V&&(V.words[G]=X)}return V&&V.strip(),Z.strip(),j!=="div"&&U!==0&&Z.iushrn(U),{div:V||null,mod:Z}},s.prototype.divmod=function(P,j,U){if(a(!P.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var Z,Q,re;return this.negative!==0&&P.negative===0?(re=this.neg().divmod(P,j),j!=="mod"&&(Z=re.div.neg()),j!=="div"&&(Q=re.mod.neg(),U&&Q.negative!==0&&Q.iadd(P)),{div:Z,mod:Q}):this.negative===0&&P.negative!==0?(re=this.divmod(P.neg(),j),j!=="mod"&&(Z=re.div.neg()),{div:Z,mod:re.mod}):this.negative&P.negative?(re=this.neg().divmod(P.neg(),j),j!=="div"&&(Q=re.mod.neg(),U&&Q.negative!==0&&Q.isub(P)),{div:re.div,mod:Q}):P.length>this.length||this.cmp(P)<0?{div:new s(0),mod:this}:P.length===1?j==="div"?{div:this.divn(P.words[0]),mod:null}:j==="mod"?{div:null,mod:new s(this.modn(P.words[0]))}:{div:this.divn(P.words[0]),mod:new s(this.modn(P.words[0]))}:this._wordDiv(P,j)},s.prototype.div=function(P){return this.divmod(P,"div",!1).div},s.prototype.mod=function(P){return this.divmod(P,"mod",!1).mod},s.prototype.umod=function(P){return this.divmod(P,"mod",!0).mod},s.prototype.divRound=function(P){var j=this.divmod(P);if(j.mod.isZero())return j.div;var U=j.mod.abs(),Z=P.abs().iushrn(1),Q=P.words[0]&1,re=U.cmp(Z);if(re<0||Q===1&&re===0)return j.div;var ne=new s(1);return ne.negative=this.negative^P.negative,j.div.iadd(ne)},s.prototype.modn=function(P){a(P<=67108863);for(var j=(1<<26)%P,U=0,Z=this.length-1;Z>=0;Z--)U=(j*U+(this.words[Z]|0))%P;return U},s.prototype.idivn=function(P){a(P<=67108863);for(var j=0,U=this.length-1;U>=0;U--){var Z=(this.words[U]|0)+j*67108864;this.words[U]=Z/P|0,j=Z%P}return this.strip()},s.prototype.divn=function(P){return this.clone().idivn(P)},s.prototype.egcd=function(P){a(P.negative===0),a(!P.isZero());var j=this,U=P.clone();j.negative!==0?j=j.umod(P):j=j.clone();for(var Z=new s(1),Q=new s(0),re=new s(0),ne=new s(1),oe=0;j.isEven()&&U.isEven();)j.iushrn(1),U.iushrn(1),++oe;for(var V=U.clone(),$=j.clone();!j.isZero();){for(var K=0,G=1;!(j.words[0]&G)&&K<26;++K,G<<=1);if(K>0)for(j.iushrn(K);K-- >0;)(Z.isOdd()||Q.isOdd())&&(Z.iadd(V),Q.isub($)),Z.iushrn(1),Q.iushrn(1);for(var X=0,q=1;!(U.words[0]&q)&&X<26;++X,q<<=1);if(X>0)for(U.iushrn(X);X-- >0;)(re.isOdd()||ne.isOdd())&&(re.iadd(V),ne.isub($)),re.iushrn(1),ne.iushrn(1);j.cmp(U)>=0?(j.isub(U),Z.isub(re),Q.isub(ne)):(U.isub(j),re.isub(Z),ne.isub(Q))}return{a:re,b:ne,gcd:U.iushln(oe)}},s.prototype._invmp=function(P){a(P.negative===0),a(!P.isZero());var j=this,U=P.clone();j.negative!==0?j=j.umod(P):j=j.clone();for(var Z=new s(1),Q=new s(0),re=U.clone();j.cmpn(1)>0&&U.cmpn(1)>0;){for(var ne=0,oe=1;!(j.words[0]&oe)&&ne<26;++ne,oe<<=1);if(ne>0)for(j.iushrn(ne);ne-- >0;)Z.isOdd()&&Z.iadd(re),Z.iushrn(1);for(var V=0,$=1;!(U.words[0]&$)&&V<26;++V,$<<=1);if(V>0)for(U.iushrn(V);V-- >0;)Q.isOdd()&&Q.iadd(re),Q.iushrn(1);j.cmp(U)>=0?(j.isub(U),Z.isub(Q)):(U.isub(j),Q.isub(Z))}var K;return j.cmpn(1)===0?K=Z:K=Q,K.cmpn(0)<0&&K.iadd(P),K},s.prototype.gcd=function(P){if(this.isZero())return P.abs();if(P.isZero())return this.abs();var j=this.clone(),U=P.clone();j.negative=0,U.negative=0;for(var Z=0;j.isEven()&&U.isEven();Z++)j.iushrn(1),U.iushrn(1);do{for(;j.isEven();)j.iushrn(1);for(;U.isEven();)U.iushrn(1);var Q=j.cmp(U);if(Q<0){var re=j;j=U,U=re}else if(Q===0||U.cmpn(1)===0)break;j.isub(U)}while(!0);return U.iushln(Z)},s.prototype.invm=function(P){return this.egcd(P).a.umod(P)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(P){return this.words[0]&P},s.prototype.bincn=function(P){a(typeof P=="number");var j=P%26,U=(P-j)/26,Z=1<>>26,ne&=67108863,this.words[re]=ne}return Q!==0&&(this.words[re]=Q,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(P){var j=P<0;if(this.negative!==0&&!j)return-1;if(this.negative===0&&j)return 1;this.strip();var U;if(this.length>1)U=1;else{j&&(P=-P),a(P<=67108863,"Number is too big");var Z=this.words[0]|0;U=Z===P?0:ZP.length)return 1;if(this.length=0;U--){var Z=this.words[U]|0,Q=P.words[U]|0;if(Z!==Q){ZQ&&(j=1);break}}return j},s.prototype.gtn=function(P){return this.cmpn(P)===1},s.prototype.gt=function(P){return this.cmp(P)===1},s.prototype.gten=function(P){return this.cmpn(P)>=0},s.prototype.gte=function(P){return this.cmp(P)>=0},s.prototype.ltn=function(P){return this.cmpn(P)===-1},s.prototype.lt=function(P){return this.cmp(P)===-1},s.prototype.lten=function(P){return this.cmpn(P)<=0},s.prototype.lte=function(P){return this.cmp(P)<=0},s.prototype.eqn=function(P){return this.cmpn(P)===0},s.prototype.eq=function(P){return this.cmp(P)===0},s.red=function(P){return new R(P)},s.prototype.toRed=function(P){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),P.convertTo(this)._forceRed(P)},s.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(P){return this.red=P,this},s.prototype.forceRed=function(P){return a(!this.red,"Already a number in reduction context"),this._forceRed(P)},s.prototype.redAdd=function(P){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,P)},s.prototype.redIAdd=function(P){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,P)},s.prototype.redSub=function(P){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,P)},s.prototype.redISub=function(P){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,P)},s.prototype.redShl=function(P){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,P)},s.prototype.redMul=function(P){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.mul(this,P)},s.prototype.redIMul=function(P){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.imul(this,P)},s.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(P){return a(this.red&&!P.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,P)};var u={k256:null,p224:null,p192:null,p25519:null};function A(F,P){this.name=F,this.p=new s(P,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}A.prototype._tmp=function(){var P=new s(null);return P.words=new Array(Math.ceil(this.n/13)),P},A.prototype.ireduce=function(P){var j=P,U;do this.split(j,this.tmp),j=this.imulK(j),j=j.iadd(this.tmp),U=j.bitLength();while(U>this.n);var Z=U0?j.isub(this.p):j.strip!==void 0?j.strip():j._strip(),j},A.prototype.split=function(P,j){P.iushrn(this.n,0,j)},A.prototype.imulK=function(P){return P.imul(this.k)};function b(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(b,A),b.prototype.split=function(P,j){for(var U=4194303,Z=Math.min(P.length,9),Q=0;Q>>22,re=ne}re>>>=22,P.words[Q-10]=re,re===0&&P.length>10?P.length-=10:P.length-=9},b.prototype.imulK=function(P){P.words[P.length]=0,P.words[P.length+1]=0,P.length+=2;for(var j=0,U=0;U>>=26,P.words[U]=Q,j=Z}return j!==0&&(P.words[P.length++]=j),P},s._prime=function(P){if(u[P])return u[P];var j;if(P==="k256")j=new b;else if(P==="p224")j=new z;else if(P==="p192")j=new I;else if(P==="p25519")j=new N;else throw new Error("Unknown prime "+P);return u[P]=j,j};function R(F){if(typeof F=="string"){var P=s._prime(F);this.m=P.p,this.prime=P}else a(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}R.prototype._verify1=function(P){a(P.negative===0,"red works only with positives"),a(P.red,"red works only with red numbers")},R.prototype._verify2=function(P,j){a((P.negative|j.negative)===0,"red works only with positives"),a(P.red&&P.red===j.red,"red works only with red numbers")},R.prototype.imod=function(P){return this.prime?this.prime.ireduce(P)._forceRed(this):P.umod(this.m)._forceRed(this)},R.prototype.neg=function(P){return P.isZero()?P.clone():this.m.sub(P)._forceRed(this)},R.prototype.add=function(P,j){this._verify2(P,j);var U=P.add(j);return U.cmp(this.m)>=0&&U.isub(this.m),U._forceRed(this)},R.prototype.iadd=function(P,j){this._verify2(P,j);var U=P.iadd(j);return U.cmp(this.m)>=0&&U.isub(this.m),U},R.prototype.sub=function(P,j){this._verify2(P,j);var U=P.sub(j);return U.cmpn(0)<0&&U.iadd(this.m),U._forceRed(this)},R.prototype.isub=function(P,j){this._verify2(P,j);var U=P.isub(j);return U.cmpn(0)<0&&U.iadd(this.m),U},R.prototype.shl=function(P,j){return this._verify1(P),this.imod(P.ushln(j))},R.prototype.imul=function(P,j){return this._verify2(P,j),this.imod(P.imul(j))},R.prototype.mul=function(P,j){return this._verify2(P,j),this.imod(P.mul(j))},R.prototype.isqr=function(P){return this.imul(P,P.clone())},R.prototype.sqr=function(P){return this.mul(P,P)},R.prototype.sqrt=function(P){if(P.isZero())return P.clone();var j=this.m.andln(3);if(a(j%2===1),j===3){var U=this.m.add(new s(1)).iushrn(2);return this.pow(P,U)}for(var Z=this.m.subn(1),Q=0;!Z.isZero()&&Z.andln(1)===0;)Q++,Z.iushrn(1);a(!Z.isZero());var re=new s(1).toRed(this),ne=re.redNeg(),oe=this.m.subn(1).iushrn(1),V=this.m.bitLength();for(V=new s(2*V*V).toRed(this);this.pow(V,oe).cmp(ne)!==0;)V.redIAdd(ne);for(var $=this.pow(V,Z),K=this.pow(P,Z.addn(1).iushrn(1)),G=this.pow(P,Z),X=Q;G.cmp(re)!==0;){for(var q=G,W=0;q.cmp(re)!==0;W++)q=q.redSqr();a(W=0;Q--){for(var $=j.words[Q],K=V-1;K>=0;K--){var G=$>>K&1;if(re!==Z[0]&&(re=this.sqr(re)),G===0&&ne===0){oe=0;continue}ne<<=1,ne|=G,oe++,!(oe!==U&&(Q!==0||K!==0))&&(re=this.mul(re,Z[ne]),oe=0,ne=0)}V=26}return re},R.prototype.convertTo=function(P){var j=P.umod(this.m);return j===P?j.clone():j},R.prototype.convertFrom=function(P){var j=P.clone();return j.red=null,j},s.mont=function(P){return new B(P)};function B(F){R.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}o(B,R),B.prototype.convertTo=function(P){return this.imod(P.ushln(this.shift))},B.prototype.convertFrom=function(P){var j=this.imod(P.mul(this.rinv));return j.red=null,j},B.prototype.imul=function(P,j){if(P.isZero()||j.isZero())return P.words[0]=0,P.length=1,P;var U=P.imul(j),Z=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub(Z).iushrn(this.shift),re=Q;return Q.cmp(this.m)>=0?re=Q.isub(this.m):Q.cmpn(0)<0&&(re=Q.iadd(this.m)),re._forceRed(this)},B.prototype.mul=function(P,j){if(P.isZero()||j.isZero())return new s(0)._forceRed(this);var U=P.mul(j),Z=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub(Z).iushrn(this.shift),re=Q;return Q.cmp(this.m)>=0?re=Q.isub(this.m):Q.cmpn(0)<0&&(re=Q.iadd(this.m)),re._forceRed(this)},B.prototype.invm=function(P){var j=this.imod(P._invmp(this.m).mul(this.r2));return j._forceRed(this)}}(l,this)},6204(l){"use strict";l.exports=e;function e(t){var n,r,a,o=t.length,s=0;for(n=0;n>>1;if(!(h<=0)){var u,A=n.mallocDouble(2*h*_),b=n.mallocInt32(_);if(_=s(T,h,A,b),_>0){if(h===1&&C)r.init(_),u=r.sweepComplete(h,M,0,_,A,b,0,_,A,b);else{var z=n.mallocDouble(2*h*w),I=n.mallocInt32(w);w=s(S,h,z,I),w>0&&(r.init(_+w),h===1?u=r.sweepBipartite(h,M,0,_,A,b,0,w,z,I):u=a(h,M,C,_,A,b,w,z,I),n.free(z),n.free(I))}n.free(A),n.free(b)}return u}}}var g;function f(T,S){g.push([T,S])}function p(T){return g=[],c(T,T,f,!0),g}function m(T,S){return g=[],c(T,S,f,!1),g}function i(T,S,M){switch(arguments.length){case 1:return p(T);case 2:return typeof S=="function"?c(T,T,S,!0):m(T,S);case 3:return c(T,S,M,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455(l,e){"use strict";function t(){function a(c,g,f,p,m,i,T,S,M,C,_){for(var w=2*c,h=p,u=w*p;hM-S?a(c,g,f,p,m,i,T,S,M,C,_):o(c,g,f,p,m,i,T,S,M,C,_)}return s}function n(){function a(f,p,m,i,T,S,M,C,_,w,h){for(var u=2*f,A=i,b=u*i;Aw-_?i?a(f,p,m,T,S,M,C,_,w,h,u):o(f,p,m,T,S,M,C,_,w,h,u):i?s(f,p,m,T,S,M,C,_,w,h,u):c(f,p,m,T,S,M,C,_,w,h,u)}return g}function r(a){return a?t():n()}e.partial=r(!1),e.full=r(!0)},7150(l,e,t){"use strict";l.exports=F;var n=t(1888),r=t(8828),a=t(2455),o=a.partial,s=a.full,c=t(855),g=t(3545),f=t(8105),p=128,m=1<<22,i=1<<22,T=f("!(lo>=p0)&&!(p1>=hi)"),S=f("lo===p0"),M=f("lo0;){$-=1;var X=$*h,q=b[X],W=b[X+1],ee=b[X+2],ae=b[X+3],fe=b[X+4],ye=b[X+5],xe=$*u,Ae=z[xe],Me=z[xe+1],Ie=ye&1,qe=!!(ye&16),je=Q,ke=re,ge=oe,le=V;if(Ie&&(je=oe,ke=V,ge=Q,le=re),!(ye&2&&(ee=M(P,q,W,ee,je,ke,Me),W>=ee))&&!(ye&4&&(W=C(P,q,W,ee,je,ke,Ae),W>=ee))){var ve=ee-W,se=fe-ae;if(qe){if(P*ve*(ve+se)f&&m[w+g]>C;--_,w-=T){for(var h=w,u=w+T,A=0;A>>1,C=2*c,_=M,w=m[C*M+g];T=z?(_=b,w=z):A>=N?(_=u,w=A):(_=I,w=N):z>=N?(_=b,w=z):N>=A?(_=u,w=A):(_=I,w=N);for(var F=C*(S-1),P=C*_,R=0;R=p0)&&!(p1>=hi)":g};function t(f){return e[f]}function n(f,p,m,i,T,S,M){for(var C=2*f,_=C*m,w=_,h=m,u=p,A=f+p,b=m;i>b;++b,_+=C){var z=T[_+u];if(z===M)if(h===b)h+=1,w+=C;else{for(var I=0;C>I;++I){var N=T[_+I];T[_+I]=T[w],T[w++]=N}var R=S[b];S[b]=S[h],S[h++]=R}}return h}function r(f,p,m,i,T,S,M){for(var C=2*f,_=C*m,w=_,h=m,u=p,A=f+p,b=m;i>b;++b,_+=C){var z=T[_+u];if(zI;++I){var N=T[_+I];T[_+I]=T[w],T[w++]=N}var R=S[b];S[b]=S[h],S[h++]=R}}return h}function a(f,p,m,i,T,S,M){for(var C=2*f,_=C*m,w=_,h=m,u=p,A=f+p,b=m;i>b;++b,_+=C){var z=T[_+A];if(z<=M)if(h===b)h+=1,w+=C;else{for(var I=0;C>I;++I){var N=T[_+I];T[_+I]=T[w],T[w++]=N}var R=S[b];S[b]=S[h],S[h++]=R}}return h}function o(f,p,m,i,T,S,M){for(var C=2*f,_=C*m,w=_,h=m,u=p,A=f+p,b=m;i>b;++b,_+=C){var z=T[_+A];if(z<=M)if(h===b)h+=1,w+=C;else{for(var I=0;C>I;++I){var N=T[_+I];T[_+I]=T[w],T[w++]=N}var R=S[b];S[b]=S[h],S[h++]=R}}return h}function s(f,p,m,i,T,S,M){for(var C=2*f,_=C*m,w=_,h=m,u=p,A=f+p,b=m;i>b;++b,_+=C){var z=T[_+u],I=T[_+A];if(z<=M&&M<=I)if(h===b)h+=1,w+=C;else{for(var N=0;C>N;++N){var R=T[_+N];T[_+N]=T[w],T[w++]=R}var B=S[b];S[b]=S[h],S[h++]=B}}return h}function c(f,p,m,i,T,S,M){for(var C=2*f,_=C*m,w=_,h=m,u=p,A=f+p,b=m;i>b;++b,_+=C){var z=T[_+u],I=T[_+A];if(zN;++N){var R=T[_+N];T[_+N]=T[w],T[w++]=R}var B=S[b];S[b]=S[h],S[h++]=B}}return h}function g(f,p,m,i,T,S,M,C){for(var _=2*f,w=_*m,h=w,u=m,A=p,b=f+p,z=m;i>z;++z,w+=_){var I=T[w+A],N=T[w+b];if(!(I>=M)&&!(C>=N))if(u===z)u+=1,h+=_;else{for(var R=0;_>R;++R){var B=T[w+R];T[w+R]=T[h],T[h++]=B}var F=S[z];S[z]=S[u],S[u++]=F}}return u}},4192(l){"use strict";l.exports=t;var e=32;function t(p,m){m<=4*e?n(0,m-1,p):f(0,m-1,p)}function n(p,m,i){for(var T=2*(p+1),S=p+1;S<=m;++S){for(var M=i[T++],C=i[T++],_=S,w=T-2;_-- >p;){var h=i[w-2],u=i[w-1];if(hi[m+1]:!0}function g(p,m,i,T){p*=2;var S=T[p];return S>1,_=C-T,w=C+T,h=S,u=_,A=C,b=w,z=M,I=p+1,N=m-1,R=0;c(h,u,i)&&(R=h,h=u,u=R),c(b,z,i)&&(R=b,b=z,z=R),c(h,A,i)&&(R=h,h=A,A=R),c(u,A,i)&&(R=u,u=A,A=R),c(h,b,i)&&(R=h,h=b,b=R),c(A,b,i)&&(R=A,A=b,b=R),c(u,z,i)&&(R=u,u=z,z=R),c(u,A,i)&&(R=u,u=A,A=R),c(b,z,i)&&(R=b,b=z,z=R);for(var B=i[2*u],F=i[2*u+1],P=i[2*b],j=i[2*b+1],U=2*h,Z=2*A,Q=2*z,re=2*S,ne=2*C,oe=2*M,V=0;V<2;++V){var $=i[U+V],K=i[Z+V],G=i[Q+V];i[re+V]=$,i[ne+V]=K,i[oe+V]=G}a(_,p,i),a(w,m,i);for(var X=I;X<=N;++X)if(g(X,B,F,i))X!==I&&r(X,I,i),++I;else if(!g(X,P,j,i))for(;;)if(g(N,P,j,i)){g(N,B,F,i)?(o(X,I,N,i),++I,--N):(r(X,N,i),--N);break}else{if(--N>>1;a(T,K);for(var G=0,X=0,ne=0;ne=o)q=q-o|0,M(f,p,X--,q);else if(q>=0)M(c,g,G--,q);else if(q<=-o){q=-q-o|0;for(var W=0;W>>1;a(T,K);for(var G=0,X=0,q=0,ne=0;ne>1===T[2*ne+3]>>1&&(ee=2,ne+=1),W<0){for(var ae=-(W>>1)-1,fe=0;fe>1)-1;ee===0?M(c,g,G--,ae):ee===1?M(f,p,X--,ae):ee===2&&M(m,i,q--,ae)}}}function h(A,b,z,I,N,R,B,F,P,j,U,Z){var Q=0,re=2*A,ne=b,oe=b+A,V=1,$=1;I?$=o:V=o;for(var K=N;K>>1;a(T,W);for(var ee=0,K=0;K=o?(fe=!I,G-=o):(fe=!!I,G-=1),fe)C(c,g,ee++,G);else{var ye=Z[G],xe=re*G,Ae=U[xe+b+1],Me=U[xe+b+1+A];e:for(var Ie=0;Ie>>1;a(T,G);for(var X=0,oe=0;oe=o)c[X++]=V-o;else{V-=1;var W=U[V],ee=Q*V,ae=j[ee+b+1],fe=j[ee+b+1+A];e:for(var ye=0;ye=0;--ye)if(c[ye]===V){for(var Ie=ye+1;Ies)throw new RangeError('The value "'+ke+'" is invalid for option "size"');var ge=new Uint8Array(ke);return Object.setPrototypeOf(ge,f.prototype),ge}function f(ke,ge,le){if(typeof ke=="number"){if(typeof ge=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return T(ke)}return p(ke,ge,le)}f.poolSize=8192;function p(ke,ge,le){if(typeof ke=="string")return S(ke,ge);if(ArrayBuffer.isView(ke))return C(ke);if(ke==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke);if(Ie(ke,ArrayBuffer)||ke&&Ie(ke.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(ke,SharedArrayBuffer)||ke&&Ie(ke.buffer,SharedArrayBuffer)))return _(ke,ge,le);if(typeof ke=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ve=ke.valueOf&&ke.valueOf();if(ve!=null&&ve!==ke)return f.from(ve,ge,le);var se=w(ke);if(se)return se;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ke[Symbol.toPrimitive]=="function")return f.from(ke[Symbol.toPrimitive]("string"),ge,le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke)}f.from=function(ke,ge,le){return p(ke,ge,le)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array);function m(ke){if(typeof ke!="number")throw new TypeError('"size" argument must be of type number');if(ke<0)throw new RangeError('The value "'+ke+'" is invalid for option "size"')}function i(ke,ge,le){return m(ke),ke<=0?g(ke):ge!==void 0?typeof le=="string"?g(ke).fill(ge,le):g(ke).fill(ge):g(ke)}f.alloc=function(ke,ge,le){return i(ke,ge,le)};function T(ke){return m(ke),g(ke<0?0:h(ke)|0)}f.allocUnsafe=function(ke){return T(ke)},f.allocUnsafeSlow=function(ke){return T(ke)};function S(ke,ge){if((typeof ge!="string"||ge==="")&&(ge="utf8"),!f.isEncoding(ge))throw new TypeError("Unknown encoding: "+ge);var le=A(ke,ge)|0,ve=g(le),se=ve.write(ke,ge);return se!==le&&(ve=ve.slice(0,se)),ve}function M(ke){for(var ge=ke.length<0?0:h(ke.length)|0,le=g(ge),ve=0;ve=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return ke|0}function u(ke){return+ke!=ke&&(ke=0),f.alloc(+ke)}f.isBuffer=function(ge){return ge!=null&&ge._isBuffer===!0&&ge!==f.prototype},f.compare=function(ge,le){if(Ie(ge,Uint8Array)&&(ge=f.from(ge,ge.offset,ge.byteLength)),Ie(le,Uint8Array)&&(le=f.from(le,le.offset,le.byteLength)),!f.isBuffer(ge)||!f.isBuffer(le))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ge===le)return 0;for(var ve=ge.length,se=le.length,Te=0,Fe=Math.min(ve,se);Tese.length?f.from(Fe).copy(se,Te):Uint8Array.prototype.set.call(se,Fe,Te);else if(f.isBuffer(Fe))Fe.copy(se,Te);else throw new TypeError('"list" argument must be an Array of Buffers');Te+=Fe.length}return se};function A(ke,ge){if(f.isBuffer(ke))return ke.length;if(ArrayBuffer.isView(ke)||Ie(ke,ArrayBuffer))return ke.byteLength;if(typeof ke!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ke);var le=ke.length,ve=arguments.length>2&&arguments[2]===!0;if(!ve&&le===0)return 0;for(var se=!1;;)switch(ge){case"ascii":case"latin1":case"binary":return le;case"utf8":case"utf-8":return fe(ke).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le*2;case"hex":return le>>>1;case"base64":return Ae(ke).length;default:if(se)return ve?-1:fe(ke).length;ge=(""+ge).toLowerCase(),se=!0}}f.byteLength=A;function b(ke,ge,le){var ve=!1;if((ge===void 0||ge<0)&&(ge=0),ge>this.length||((le===void 0||le>this.length)&&(le=this.length),le<=0)||(le>>>=0,ge>>>=0,le<=ge))return"";for(ke||(ke="utf8");;)switch(ke){case"hex":return V(this,ge,le);case"utf8":case"utf-8":return Z(this,ge,le);case"ascii":return ne(this,ge,le);case"latin1":case"binary":return oe(this,ge,le);case"base64":return U(this,ge,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,ge,le);default:if(ve)throw new TypeError("Unknown encoding: "+ke);ke=(ke+"").toLowerCase(),ve=!0}}f.prototype._isBuffer=!0;function z(ke,ge,le){var ve=ke[ge];ke[ge]=ke[le],ke[le]=ve}f.prototype.swap16=function(){var ge=this.length;if(ge%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var le=0;lele&&(ge+=" ... "),""},o&&(f.prototype[o]=f.prototype.inspect),f.prototype.compare=function(ge,le,ve,se,Te){if(Ie(ge,Uint8Array)&&(ge=f.from(ge,ge.offset,ge.byteLength)),!f.isBuffer(ge))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ge);if(le===void 0&&(le=0),ve===void 0&&(ve=ge?ge.length:0),se===void 0&&(se=0),Te===void 0&&(Te=this.length),le<0||ve>ge.length||se<0||Te>this.length)throw new RangeError("out of range index");if(se>=Te&&le>=ve)return 0;if(se>=Te)return-1;if(le>=ve)return 1;if(le>>>=0,ve>>>=0,se>>>=0,Te>>>=0,this===ge)return 0;for(var Fe=Te-se,We=ve-le,Ge=Math.min(Fe,We),gt=this.slice(se,Te),mt=ge.slice(le,ve),Tt=0;Tt2147483647?le=2147483647:le<-2147483648&&(le=-2147483648),le=+le,qe(le)&&(le=se?0:ke.length-1),le<0&&(le=ke.length+le),le>=ke.length){if(se)return-1;le=ke.length-1}else if(le<0)if(se)le=0;else return-1;if(typeof ge=="string"&&(ge=f.from(ge,ve)),f.isBuffer(ge))return ge.length===0?-1:N(ke,ge,le,ve,se);if(typeof ge=="number")return ge=ge&255,typeof Uint8Array.prototype.indexOf=="function"?se?Uint8Array.prototype.indexOf.call(ke,ge,le):Uint8Array.prototype.lastIndexOf.call(ke,ge,le):N(ke,[ge],le,ve,se);throw new TypeError("val must be string, number or Buffer")}function N(ke,ge,le,ve,se){var Te=1,Fe=ke.length,We=ge.length;if(ve!==void 0&&(ve=String(ve).toLowerCase(),ve==="ucs2"||ve==="ucs-2"||ve==="utf16le"||ve==="utf-16le")){if(ke.length<2||ge.length<2)return-1;Te=2,Fe/=2,We/=2,le/=2}function Ge(Kt,ar){return Te===1?Kt[ar]:Kt.readUInt16BE(ar*Te)}var gt;if(se){var mt=-1;for(gt=le;gtFe&&(le=Fe-We),gt=le;gt>=0;gt--){for(var Tt=!0,At=0;Atse&&(ve=se)):ve=se;var Te=ge.length;ve>Te/2&&(ve=Te/2);for(var Fe=0;Fe>>0,isFinite(ve)?(ve=ve>>>0,se===void 0&&(se="utf8")):(se=ve,ve=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Te=this.length-le;if((ve===void 0||ve>Te)&&(ve=Te),ge.length>0&&(ve<0||le<0)||le>this.length)throw new RangeError("Attempt to write outside buffer bounds");se||(se="utf8");for(var Fe=!1;;)switch(se){case"hex":return R(this,ge,le,ve);case"utf8":case"utf-8":return B(this,ge,le,ve);case"ascii":case"latin1":case"binary":return F(this,ge,le,ve);case"base64":return P(this,ge,le,ve);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,ge,le,ve);default:if(Fe)throw new TypeError("Unknown encoding: "+se);se=(""+se).toLowerCase(),Fe=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(ke,ge,le){return ge===0&&le===ke.length?r.fromByteArray(ke):r.fromByteArray(ke.slice(ge,le))}function Z(ke,ge,le){le=Math.min(ke.length,le);for(var ve=[],se=ge;se239?4:Te>223?3:Te>191?2:1;if(se+We<=le){var Ge,gt,mt,Tt;switch(We){case 1:Te<128&&(Fe=Te);break;case 2:Ge=ke[se+1],(Ge&192)===128&&(Tt=(Te&31)<<6|Ge&63,Tt>127&&(Fe=Tt));break;case 3:Ge=ke[se+1],gt=ke[se+2],(Ge&192)===128&&(gt&192)===128&&(Tt=(Te&15)<<12|(Ge&63)<<6|gt&63,Tt>2047&&(Tt<55296||Tt>57343)&&(Fe=Tt));break;case 4:Ge=ke[se+1],gt=ke[se+2],mt=ke[se+3],(Ge&192)===128&&(gt&192)===128&&(mt&192)===128&&(Tt=(Te&15)<<18|(Ge&63)<<12|(gt&63)<<6|mt&63,Tt>65535&&Tt<1114112&&(Fe=Tt))}}Fe===null?(Fe=65533,We=1):Fe>65535&&(Fe-=65536,ve.push(Fe>>>10&1023|55296),Fe=56320|Fe&1023),ve.push(Fe),se+=We}return re(ve)}var Q=4096;function re(ke){var ge=ke.length;if(ge<=Q)return String.fromCharCode.apply(String,ke);for(var le="",ve=0;veve)&&(le=ve);for(var se="",Te=ge;Teve&&(ge=ve),le<0?(le+=ve,le<0&&(le=0)):le>ve&&(le=ve),lele)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(ge,le,ve){ge=ge>>>0,le=le>>>0,ve||K(ge,le,this.length);for(var se=this[ge],Te=1,Fe=0;++Fe>>0,le=le>>>0,ve||K(ge,le,this.length);for(var se=this[ge+--le],Te=1;le>0&&(Te*=256);)se+=this[ge+--le]*Te;return se},f.prototype.readUint8=f.prototype.readUInt8=function(ge,le){return ge=ge>>>0,le||K(ge,1,this.length),this[ge]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(ge,le){return ge=ge>>>0,le||K(ge,2,this.length),this[ge]|this[ge+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(ge,le){return ge=ge>>>0,le||K(ge,2,this.length),this[ge]<<8|this[ge+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(ge,le){return ge=ge>>>0,le||K(ge,4,this.length),(this[ge]|this[ge+1]<<8|this[ge+2]<<16)+this[ge+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(ge,le){return ge=ge>>>0,le||K(ge,4,this.length),this[ge]*16777216+(this[ge+1]<<16|this[ge+2]<<8|this[ge+3])},f.prototype.readIntLE=function(ge,le,ve){ge=ge>>>0,le=le>>>0,ve||K(ge,le,this.length);for(var se=this[ge],Te=1,Fe=0;++Fe=Te&&(se-=Math.pow(2,8*le)),se},f.prototype.readIntBE=function(ge,le,ve){ge=ge>>>0,le=le>>>0,ve||K(ge,le,this.length);for(var se=le,Te=1,Fe=this[ge+--se];se>0&&(Te*=256);)Fe+=this[ge+--se]*Te;return Te*=128,Fe>=Te&&(Fe-=Math.pow(2,8*le)),Fe},f.prototype.readInt8=function(ge,le){return ge=ge>>>0,le||K(ge,1,this.length),this[ge]&128?(255-this[ge]+1)*-1:this[ge]},f.prototype.readInt16LE=function(ge,le){ge=ge>>>0,le||K(ge,2,this.length);var ve=this[ge]|this[ge+1]<<8;return ve&32768?ve|4294901760:ve},f.prototype.readInt16BE=function(ge,le){ge=ge>>>0,le||K(ge,2,this.length);var ve=this[ge+1]|this[ge]<<8;return ve&32768?ve|4294901760:ve},f.prototype.readInt32LE=function(ge,le){return ge=ge>>>0,le||K(ge,4,this.length),this[ge]|this[ge+1]<<8|this[ge+2]<<16|this[ge+3]<<24},f.prototype.readInt32BE=function(ge,le){return ge=ge>>>0,le||K(ge,4,this.length),this[ge]<<24|this[ge+1]<<16|this[ge+2]<<8|this[ge+3]},f.prototype.readFloatLE=function(ge,le){return ge=ge>>>0,le||K(ge,4,this.length),a.read(this,ge,!0,23,4)},f.prototype.readFloatBE=function(ge,le){return ge=ge>>>0,le||K(ge,4,this.length),a.read(this,ge,!1,23,4)},f.prototype.readDoubleLE=function(ge,le){return ge=ge>>>0,le||K(ge,8,this.length),a.read(this,ge,!0,52,8)},f.prototype.readDoubleBE=function(ge,le){return ge=ge>>>0,le||K(ge,8,this.length),a.read(this,ge,!1,52,8)};function G(ke,ge,le,ve,se,Te){if(!f.isBuffer(ke))throw new TypeError('"buffer" argument must be a Buffer instance');if(ge>se||geke.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(ge,le,ve,se){if(ge=+ge,le=le>>>0,ve=ve>>>0,!se){var Te=Math.pow(2,8*ve)-1;G(this,ge,le,ve,Te,0)}var Fe=1,We=0;for(this[le]=ge&255;++We>>0,ve=ve>>>0,!se){var Te=Math.pow(2,8*ve)-1;G(this,ge,le,ve,Te,0)}var Fe=ve-1,We=1;for(this[le+Fe]=ge&255;--Fe>=0&&(We*=256);)this[le+Fe]=ge/We&255;return le+ve},f.prototype.writeUint8=f.prototype.writeUInt8=function(ge,le,ve){return ge=+ge,le=le>>>0,ve||G(this,ge,le,1,255,0),this[le]=ge&255,le+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(ge,le,ve){return ge=+ge,le=le>>>0,ve||G(this,ge,le,2,65535,0),this[le]=ge&255,this[le+1]=ge>>>8,le+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(ge,le,ve){return ge=+ge,le=le>>>0,ve||G(this,ge,le,2,65535,0),this[le]=ge>>>8,this[le+1]=ge&255,le+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(ge,le,ve){return ge=+ge,le=le>>>0,ve||G(this,ge,le,4,4294967295,0),this[le+3]=ge>>>24,this[le+2]=ge>>>16,this[le+1]=ge>>>8,this[le]=ge&255,le+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(ge,le,ve){return ge=+ge,le=le>>>0,ve||G(this,ge,le,4,4294967295,0),this[le]=ge>>>24,this[le+1]=ge>>>16,this[le+2]=ge>>>8,this[le+3]=ge&255,le+4},f.prototype.writeIntLE=function(ge,le,ve,se){if(ge=+ge,le=le>>>0,!se){var Te=Math.pow(2,8*ve-1);G(this,ge,le,ve,Te-1,-Te)}var Fe=0,We=1,Ge=0;for(this[le]=ge&255;++Fe>0)-Ge&255;return le+ve},f.prototype.writeIntBE=function(ge,le,ve,se){if(ge=+ge,le=le>>>0,!se){var Te=Math.pow(2,8*ve-1);G(this,ge,le,ve,Te-1,-Te)}var Fe=ve-1,We=1,Ge=0;for(this[le+Fe]=ge&255;--Fe>=0&&(We*=256);)ge<0&&Ge===0&&this[le+Fe+1]!==0&&(Ge=1),this[le+Fe]=(ge/We>>0)-Ge&255;return le+ve},f.prototype.writeInt8=function(ge,le,ve){return ge=+ge,le=le>>>0,ve||G(this,ge,le,1,127,-128),ge<0&&(ge=255+ge+1),this[le]=ge&255,le+1},f.prototype.writeInt16LE=function(ge,le,ve){return ge=+ge,le=le>>>0,ve||G(this,ge,le,2,32767,-32768),this[le]=ge&255,this[le+1]=ge>>>8,le+2},f.prototype.writeInt16BE=function(ge,le,ve){return ge=+ge,le=le>>>0,ve||G(this,ge,le,2,32767,-32768),this[le]=ge>>>8,this[le+1]=ge&255,le+2},f.prototype.writeInt32LE=function(ge,le,ve){return ge=+ge,le=le>>>0,ve||G(this,ge,le,4,2147483647,-2147483648),this[le]=ge&255,this[le+1]=ge>>>8,this[le+2]=ge>>>16,this[le+3]=ge>>>24,le+4},f.prototype.writeInt32BE=function(ge,le,ve){return ge=+ge,le=le>>>0,ve||G(this,ge,le,4,2147483647,-2147483648),ge<0&&(ge=4294967295+ge+1),this[le]=ge>>>24,this[le+1]=ge>>>16,this[le+2]=ge>>>8,this[le+3]=ge&255,le+4};function X(ke,ge,le,ve,se,Te){if(le+ve>ke.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("Index out of range")}function q(ke,ge,le,ve,se){return ge=+ge,le=le>>>0,se||X(ke,ge,le,4,34028234663852886e22,-34028234663852886e22),a.write(ke,ge,le,ve,23,4),le+4}f.prototype.writeFloatLE=function(ge,le,ve){return q(this,ge,le,!0,ve)},f.prototype.writeFloatBE=function(ge,le,ve){return q(this,ge,le,!1,ve)};function W(ke,ge,le,ve,se){return ge=+ge,le=le>>>0,se||X(ke,ge,le,8,17976931348623157e292,-17976931348623157e292),a.write(ke,ge,le,ve,52,8),le+8}f.prototype.writeDoubleLE=function(ge,le,ve){return W(this,ge,le,!0,ve)},f.prototype.writeDoubleBE=function(ge,le,ve){return W(this,ge,le,!1,ve)},f.prototype.copy=function(ge,le,ve,se){if(!f.isBuffer(ge))throw new TypeError("argument should be a Buffer");if(ve||(ve=0),!se&&se!==0&&(se=this.length),le>=ge.length&&(le=ge.length),le||(le=0),se>0&&se=this.length)throw new RangeError("Index out of range");if(se<0)throw new RangeError("sourceEnd out of bounds");se>this.length&&(se=this.length),ge.length-le>>0,ve=ve===void 0?this.length:ve>>>0,ge||(ge=0);var Fe;if(typeof ge=="number")for(Fe=le;Fe55295&&le<57344){if(!se){if(le>56319){(ge-=3)>-1&&Te.push(239,191,189);continue}else if(Fe+1===ve){(ge-=3)>-1&&Te.push(239,191,189);continue}se=le;continue}if(le<56320){(ge-=3)>-1&&Te.push(239,191,189),se=le;continue}le=(se-55296<<10|le-56320)+65536}else se&&(ge-=3)>-1&&Te.push(239,191,189);if(se=null,le<128){if((ge-=1)<0)break;Te.push(le)}else if(le<2048){if((ge-=2)<0)break;Te.push(le>>6|192,le&63|128)}else if(le<65536){if((ge-=3)<0)break;Te.push(le>>12|224,le>>6&63|128,le&63|128)}else if(le<1114112){if((ge-=4)<0)break;Te.push(le>>18|240,le>>12&63|128,le>>6&63|128,le&63|128)}else throw new Error("Invalid code point")}return Te}function ye(ke){for(var ge=[],le=0;le>8,se=le%256,Te.push(se),Te.push(ve);return Te}function Ae(ke){return r.toByteArray(ae(ke))}function Me(ke,ge,le,ve){for(var se=0;se=ge.length||se>=ke.length);++se)ge[se+le]=ke[se];return se}function Ie(ke,ge){return ke instanceof ge||ke!=null&&ke.constructor!=null&&ke.constructor.name!=null&&ke.constructor.name===ge.name}function qe(ke){return ke!==ke}var je=function(){for(var ke="0123456789abcdef",ge=new Array(256),le=0;le<16;++le)for(var ve=le*16,se=0;se<16;++se)ge[ve+se]=ke[le]+ke[se];return ge}()},2538(l,e,t){"use strict";var n=t(8902),r=t(5542),a=t(2272),o=t(5023);l.exports=p;function s(m){return[Math.min(m[0],m[1]),Math.max(m[0],m[1])]}function c(m,i){return m[0]-i[0]||m[1]-i[1]}function g(m){return m.map(s).sort(c)}function f(m,i,T){return i in m?m[i]:T}function p(m,i,T){Array.isArray(i)?(T=T||{},i=i||[]):(T=i||{},i=[]);var S=!!f(T,"delaunay",!0),M=!!f(T,"interior",!0),C=!!f(T,"exterior",!0),_=!!f(T,"infinity",!1);if(!M&&!C||m.length===0)return[];var w=n(m,i);if(S||M!==C||_){for(var h=r(m.length,g(i)),u=0;u0;){for(var S=g.pop(),m=g.pop(),M=-1,C=-1,i=p[m],w=1;w=0||(c.flip(m,S),a(s,c,g,M,m,C),a(s,c,g,m,C,M),a(s,c,g,C,S,M),a(s,c,g,S,M,C))}}},5023(l,e,t){"use strict";var n=t(2478);l.exports=g;function r(f,p,m,i,T,S,M){this.cells=f,this.neighbor=p,this.flags=i,this.constraint=m,this.active=T,this.next=S,this.boundary=M}var a=r.prototype;function o(f,p){return f[0]-p[0]||f[1]-p[1]||f[2]-p[2]}a.locate=function(){var f=[0,0,0];return function(p,m,i){var T=p,S=m,M=i;return m0||M.length>0;){for(;S.length>0;){var u=S.pop();if(C[u]!==-T){C[u]=T;for(var A=_[u],b=0;b<3;++b){var z=h[3*u+b];z>=0&&C[z]===0&&(w[3*u+b]?M.push(z):(S.push(z),C[z]=T))}}}var I=M;M=S,S=I,M.length=0,T=-T}var N=c(_,C,p);return m?N.concat(i.boundary):N}},8902(l,e,t){"use strict";var n=t(2478),r=t(3250)[3],a=0,o=1,s=2;l.exports=M;function c(C,_,w,h,u){this.a=C,this.b=_,this.idx=w,this.lowerIds=h,this.upperIds=u}function g(C,_,w,h){this.a=C,this.b=_,this.type=w,this.idx=h}function f(C,_){var w=C.a[0]-_.a[0]||C.a[1]-_.a[1]||C.type-_.type;return w||C.type!==a&&(w=r(C.a,C.b,_.b),w)?w:C.idx-_.idx}function p(C,_){return r(C.a,C.b,_)}function m(C,_,w,h,u){for(var A=n.lt(_,h,p),b=n.gt(_,h,p),z=A;z1&&r(w[N[B-2]],w[N[B-1]],h)>0;)C.push([N[B-1],N[B-2],u]),B-=1;N.length=B,N.push(u);for(var R=I.upperIds,B=R.length;B>1&&r(w[R[B-2]],w[R[B-1]],h)<0;)C.push([R[B-2],R[B-1],u]),B-=1;R.length=B,R.push(u)}}function i(C,_){var w;return C.a[0]<_.a[0]?w=r(C.a,C.b,_.a):w=r(_.b,_.a,C.a),w||(_.b[0]I[0]&&u.push(new g(I,z,s,A),new g(z,I,o,A))}u.sort(f);for(var N=u[0].a[0]-(1+Math.abs(u[0].a[0]))*Math.pow(2,-52),R=[new c([N,1],[N,0],-1,[],[],[],[])],B=[],A=0,F=u.length;A=0}}(),a.removeTriangle=function(c,g,f){var p=this.stars;o(p[c],g,f),o(p[g],f,c),o(p[f],c,g)},a.addTriangle=function(c,g,f){var p=this.stars;p[c].push(g,f),p[g].push(f,c),p[f].push(c,g)},a.opposite=function(c,g){for(var f=this.stars[g],p=1,m=f.length;p=0;--P){var $=B[P];j=$[0];var K=N[j],G=K[0],X=K[1],q=I[G],W=I[X];if((q[0]-W[0]||q[1]-W[1])<0){var ee=G;G=X,X=ee}K[0]=G;var ae=K[1]=$[1],fe;for(F&&(fe=K[2]);P>0&&B[P-1][0]===j;){var $=B[--P],ye=$[1];F?N.push([ae,ye,fe]):N.push([ae,ye]),ae=ye}F?N.push([ae,X,fe]):N.push([ae,X])}return U}function _(I,N,R){for(var B=N.length,F=new n(B),P=[],j=0;jN[2]?1:0)}function u(I,N,R){if(I.length!==0){if(N)for(var B=0;B0||j.length>0}function z(I,N,R){var B;if(R){B=N;for(var F=new Array(N.length),P=0;PC+1)throw new Error(S+" map requires nshades to be at least size "+T.length);Array.isArray(g.alpha)?g.alpha.length!==2?_=[1,1]:_=g.alpha.slice():typeof g.alpha=="number"?_=[g.alpha,g.alpha]:_=[1,1],f=T.map(function(z){return Math.round(z.index*C)}),_[0]=Math.min(Math.max(_[0],0),1),_[1]=Math.min(Math.max(_[1],0),1);var h=T.map(function(z,I){var N=T[I].index,R=T[I].rgb.slice();return R.length===4&&R[3]>=0&&R[3]<=1||(R[3]=_[0]+(_[1]-_[0])*N),R}),u=[];for(w=0;w=0}function g(f,p,m,i){var T=n(p,m,i);if(T===0){var S=r(n(f,p,m)),M=r(n(f,p,i));if(S===M){if(S===0){var C=c(f,p,m),_=c(f,p,i);return C===_?0:C?1:-1}return 0}else{if(M===0)return S>0||c(f,p,i)?-1:1;if(S===0)return M>0||c(f,p,m)?1:-1}return r(M-S)}var w=n(f,p,m);if(w>0)return T>0&&n(f,p,i)>0?1:-1;if(w<0)return T>0||n(f,p,i)>0?1:-1;var h=n(f,p,i);return h>0||c(f,p,m)?1:-1}},8572(l){"use strict";l.exports=function(t){return t<0?-1:t>0?1:0}},8507(l){l.exports=n;var e=Math.min;function t(r,a){return r-a}function n(r,a){var o=r.length,s=r.length-a.length;if(s)return s;switch(o){case 0:return 0;case 1:return r[0]-a[0];case 2:return r[0]+r[1]-a[0]-a[1]||e(r[0],r[1])-e(a[0],a[1]);case 3:var c=r[0]+r[1],g=a[0]+a[1];if(s=c+r[2]-(g+a[2]),s)return s;var f=e(r[0],r[1]),p=e(a[0],a[1]);return e(f,r[2])-e(p,a[2])||e(f+r[2],c)-e(p+a[2],g);case 4:var m=r[0],i=r[1],T=r[2],S=r[3],M=a[0],C=a[1],_=a[2],w=a[3];return m+i+T+S-(M+C+_+w)||e(m,i,T,S)-e(M,C,_,w,M)||e(m+i,m+T,m+S,i+T,i+S,T+S)-e(M+C,M+_,M+w,C+_,C+w,_+w)||e(m+i+T,m+i+S,m+T+S,i+T+S)-e(M+C+_,M+C+w,M+_+w,C+_+w);default:for(var h=r.slice().sort(t),u=a.slice().sort(t),A=0;At[r][0]&&(r=a);return nr?[[r],[n]]:[[n]]}},4750(l,e,t){"use strict";l.exports=r;var n=t(3090);function r(a){var o=n(a),s=o.length;if(s<=2)return[];for(var c=new Array(s),g=o[s-1],f=0;f=g[M]&&(S+=1);i[T]=S}}return c}function s(c,g){try{return n(c,!0)}catch{var f=r(c);if(f.length<=g)return[];var p=a(c,f),m=n(p,!0);return o(m,f)}}},4769(l){"use strict";function e(n,r,a,o,s,c){var g=6*s*s-6*s,f=3*s*s-4*s+1,p=-6*s*s+6*s,m=3*s*s-2*s;if(n.length){c||(c=new Array(n.length));for(var i=n.length-1;i>=0;--i)c[i]=g*n[i]+f*r[i]+p*a[i]+m*o[i];return c}return g*n+f*r+p*a[i]+m*o}function t(n,r,a,o,s,c){var g=s-1,f=s*s,p=g*g,m=(1+2*s)*p,i=s*p,T=f*(3-2*s),S=f*g;if(n.length){c||(c=new Array(n.length));for(var M=n.length-1;M>=0;--M)c[M]=m*n[M]+i*r[M]+T*a[M]+S*o[M];return c}return m*n+i*r+T*a+S*o}l.exports=t,l.exports.derivative=e},7642(l,e,t){"use strict";var n=t(8954),r=t(1682);l.exports=c;function a(g,f){this.point=g,this.index=f}function o(g,f){for(var p=g.point,m=f.point,i=p.length,T=0;T=2)return!1;R[F]=P}return!0}):N=N.filter(function(R){for(var B=0;B<=m;++B){var F=A[R[B]];if(F<0)return!1;R[B]=F}return!0}),m&1)for(var S=0;S>>31},l.exports.exponent=function(T){var S=l.exports.hi(T);return(S<<1>>>21)-1023},l.exports.fraction=function(T){var S=l.exports.lo(T),M=l.exports.hi(T),C=M&(1<<20)-1;return M&2146435072&&(C+=1048576),[S,C]},l.exports.denormalized=function(T){var S=l.exports.hi(T);return!(S&2146435072)}},1338(l){"use strict";function e(r,a,o){var s=r[o]|0;if(s<=0)return[];var c=new Array(s),g;if(o===r.length-1)for(g=0;g"u"&&(a=0),typeof r){case"number":if(r>0)return t(r|0,a);break;case"object":if(typeof r.length=="number")return e(r,a,0);break}return[]}l.exports=n},3134(l,e,t){"use strict";l.exports=r;var n=t(1682);function r(a,o){var s=a.length;if(typeof o!="number"){o=0;for(var c=0;c=m-1)for(var w=S.length-1,u=f-p[m-1],h=0;h=m-1)for(var _=S.length-1,w=f-p[m-1],h=0;h=0;--m)if(f[--p])return!1;return!0},s.jump=function(f){var p=this.lastT(),m=this.dimension;if(!(f0;--h)i.push(a(C[h-1],_[h-1],arguments[h])),T.push(0)}},s.push=function(f){var p=this.lastT(),m=this.dimension;if(!(f1e-6?1/M:0;this._time.push(f);for(var u=m;u>0;--u){var A=a(_[u-1],w[u-1],arguments[u]);i.push(A),T.push((A-i[S++])*h)}}},s.set=function(f){var p=this.dimension;if(!(f0;--C)m.push(a(S[C-1],M[C-1],arguments[C])),i.push(0)}},s.move=function(f){var p=this.lastT(),m=this.dimension;if(!(f<=p||arguments.length!==m+1)){var i=this._state,T=this._velocity,S=i.length-this.dimension,M=this.bounds,C=M[0],_=M[1],w=f-p,h=w>1e-6?1/w:0;this._time.push(f);for(var u=m;u>0;--u){var A=arguments[u];i.push(a(C[u-1],_[u-1],i[S++]+A)),T.push(A*h)}}},s.idle=function(f){var p=this.lastT();if(!(f=0;--h)i.push(a(C[h],_[h],i[S]+w*T[S])),T.push(0),S+=1}};function c(f){for(var p=new Array(f),m=0;m=0;--I){var u=A[I];b[I]<=0?A[I]=new n(u._color,u.key,u.value,A[I+1],u.right,u._count+1):A[I]=new n(u._color,u.key,u.value,u.left,A[I+1],u._count+1)}for(var I=A.length-1;I>1;--I){var N=A[I-1],u=A[I];if(N._color===t||u._color===t)break;var R=A[I-2];if(R.left===N)if(N.left===u){var B=R.right;if(B&&B._color===e)N._color=t,R.right=a(t,B),R._color=e,I-=1;else{if(R._color=e,R.left=N.right,N._color=t,N.right=R,A[I-2]=N,A[I-1]=u,o(R),o(N),I>=3){var F=A[I-3];F.left===R?F.left=N:F.right=N}break}}else{var B=R.right;if(B&&B._color===e)N._color=t,R.right=a(t,B),R._color=e,I-=1;else{if(N.right=u.left,R._color=e,R.left=u.right,u._color=t,u.left=N,u.right=R,A[I-2]=u,A[I-1]=N,o(R),o(N),o(u),I>=3){var F=A[I-3];F.left===R?F.left=u:F.right=u}break}}else if(N.right===u){var B=R.left;if(B&&B._color===e)N._color=t,R.left=a(t,B),R._color=e,I-=1;else{if(R._color=e,R.right=N.left,N._color=t,N.left=R,A[I-2]=N,A[I-1]=u,o(R),o(N),I>=3){var F=A[I-3];F.right===R?F.right=N:F.left=N}break}}else{var B=R.left;if(B&&B._color===e)N._color=t,R.left=a(t,B),R._color=e,I-=1;else{if(N.left=u.right,R._color=e,R.right=u.left,u._color=t,u.right=N,u.left=R,A[I-2]=u,A[I-1]=N,o(R),o(N),o(u),I>=3){var F=A[I-3];F.right===R?F.right=u:F.left=u}break}}}return A[0]._color=t,new s(h,A[0])};function g(_,w){if(w.left){var h=g(_,w.left);if(h)return h}var h=_(w.key,w.value);if(h)return h;if(w.right)return g(_,w.right)}function f(_,w,h,u){var A=w(_,u.key);if(A<=0){if(u.left){var b=f(_,w,h,u.left);if(b)return b}var b=h(u.key,u.value);if(b)return b}if(u.right)return f(_,w,h,u.right)}function p(_,w,h,u,A){var b=h(_,A.key),z=h(w,A.key),I;if(b<=0&&(A.left&&(I=p(_,w,h,u,A.left),I)||z>0&&(I=u(A.key,A.value),I)))return I;if(z>0&&A.right)return p(_,w,h,u,A.right)}c.forEach=function(w,h,u){if(this.root)switch(arguments.length){case 1:return g(w,this.root);case 2:return f(h,this._compare,w,this.root);case 3:return this._compare(h,u)>=0?void 0:p(h,u,this._compare,w,this.root)}},Object.defineProperty(c,"begin",{get:function(){for(var _=[],w=this.root;w;)_.push(w),w=w.left;return new m(this,_)}}),Object.defineProperty(c,"end",{get:function(){for(var _=[],w=this.root;w;)_.push(w),w=w.right;return new m(this,_)}}),c.at=function(_){if(_<0)return new m(this,[]);for(var w=this.root,h=[];;){if(h.push(w),w.left){if(_=w.right._count)break;w=w.right}else break}return new m(this,[])},c.ge=function(_){for(var w=this._compare,h=this.root,u=[],A=0;h;){var b=w(_,h.key);u.push(h),b<=0&&(A=u.length),b<=0?h=h.left:h=h.right}return u.length=A,new m(this,u)},c.gt=function(_){for(var w=this._compare,h=this.root,u=[],A=0;h;){var b=w(_,h.key);u.push(h),b<0&&(A=u.length),b<0?h=h.left:h=h.right}return u.length=A,new m(this,u)},c.lt=function(_){for(var w=this._compare,h=this.root,u=[],A=0;h;){var b=w(_,h.key);u.push(h),b>0&&(A=u.length),b<=0?h=h.left:h=h.right}return u.length=A,new m(this,u)},c.le=function(_){for(var w=this._compare,h=this.root,u=[],A=0;h;){var b=w(_,h.key);u.push(h),b>=0&&(A=u.length),b<0?h=h.left:h=h.right}return u.length=A,new m(this,u)},c.find=function(_){for(var w=this._compare,h=this.root,u=[];h;){var A=w(_,h.key);if(u.push(h),A===0)return new m(this,u);A<=0?h=h.left:h=h.right}return new m(this,[])},c.remove=function(_){var w=this.find(_);return w?w.remove():this},c.get=function(_){for(var w=this._compare,h=this.root;h;){var u=w(_,h.key);if(u===0)return h.value;u<=0?h=h.left:h=h.right}};function m(_,w){this.tree=_,this._stack=w}var i=m.prototype;Object.defineProperty(i,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(i,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),i.clone=function(){return new m(this.tree,this._stack.slice())};function T(_,w){_.key=w.key,_.value=w.value,_.left=w.left,_.right=w.right,_._color=w._color,_._count=w._count}function S(_){for(var w,h,u,A,b=_.length-1;b>=0;--b){if(w=_[b],b===0){w._color=t;return}if(h=_[b-1],h.left===w){if(u=h.right,u.right&&u.right._color===e){if(u=h.right=r(u),A=u.right=r(u.right),h.right=u.left,u.left=h,u.right=A,u._color=h._color,w._color=t,h._color=t,A._color=t,o(h),o(u),b>1){var z=_[b-2];z.left===h?z.left=u:z.right=u}_[b-1]=u;return}else if(u.left&&u.left._color===e){if(u=h.right=r(u),A=u.left=r(u.left),h.right=A.left,u.left=A.right,A.left=h,A.right=u,A._color=h._color,h._color=t,u._color=t,w._color=t,o(h),o(u),o(A),b>1){var z=_[b-2];z.left===h?z.left=A:z.right=A}_[b-1]=A;return}if(u._color===t)if(h._color===e){h._color=t,h.right=a(e,u);return}else{h.right=a(e,u);continue}else{if(u=r(u),h.right=u.left,u.left=h,u._color=h._color,h._color=e,o(h),o(u),b>1){var z=_[b-2];z.left===h?z.left=u:z.right=u}_[b-1]=u,_[b]=h,b+1<_.length?_[b+1]=w:_.push(w),b=b+2}}else{if(u=h.left,u.left&&u.left._color===e){if(u=h.left=r(u),A=u.left=r(u.left),h.left=u.right,u.right=h,u.left=A,u._color=h._color,w._color=t,h._color=t,A._color=t,o(h),o(u),b>1){var z=_[b-2];z.right===h?z.right=u:z.left=u}_[b-1]=u;return}else if(u.right&&u.right._color===e){if(u=h.left=r(u),A=u.right=r(u.right),h.left=A.right,u.right=A.left,A.right=h,A.left=u,A._color=h._color,h._color=t,u._color=t,w._color=t,o(h),o(u),o(A),b>1){var z=_[b-2];z.right===h?z.right=A:z.left=A}_[b-1]=A;return}if(u._color===t)if(h._color===e){h._color=t,h.left=a(e,u);return}else{h.left=a(e,u);continue}else{if(u=r(u),h.left=u.right,u.right=h,u._color=h._color,h._color=e,o(h),o(u),b>1){var z=_[b-2];z.right===h?z.right=u:z.left=u}_[b-1]=u,_[b]=h,b+1<_.length?_[b+1]=w:_.push(w),b=b+2}}}}i.remove=function(){var _=this._stack;if(_.length===0)return this.tree;var w=new Array(_.length),h=_[_.length-1];w[w.length-1]=new n(h._color,h.key,h.value,h.left,h.right,h._count);for(var u=_.length-2;u>=0;--u){var h=_[u];h.left===_[u+1]?w[u]=new n(h._color,h.key,h.value,w[u+1],h.right,h._count):w[u]=new n(h._color,h.key,h.value,h.left,w[u+1],h._count)}if(h=w[w.length-1],h.left&&h.right){var A=w.length;for(h=h.left;h.right;)w.push(h),h=h.right;var b=w[A-1];w.push(new n(h._color,b.key,b.value,h.left,h.right,h._count)),w[A-1].key=h.key,w[A-1].value=h.value;for(var u=w.length-2;u>=A;--u)h=w[u],w[u]=new n(h._color,h.key,h.value,h.left,w[u+1],h._count);w[A-1].left=w[A]}if(h=w[w.length-1],h._color===e){var z=w[w.length-2];z.left===h?z.left=null:z.right===h&&(z.right=null),w.pop();for(var u=0;u0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(i,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(i,"index",{get:function(){var _=0,w=this._stack;if(w.length===0){var h=this.tree.root;return h?h._count:0}else w[w.length-1].left&&(_=w[w.length-1].left._count);for(var u=w.length-2;u>=0;--u)w[u+1]===w[u].right&&(++_,w[u].left&&(_+=w[u].left._count));return _},enumerable:!0}),i.next=function(){var _=this._stack;if(_.length!==0){var w=_[_.length-1];if(w.right)for(w=w.right;w;)_.push(w),w=w.left;else for(_.pop();_.length>0&&_[_.length-1].right===w;)w=_[_.length-1],_.pop()}},Object.defineProperty(i,"hasNext",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].right)return!0;for(var w=_.length-1;w>0;--w)if(_[w-1].left===_[w])return!0;return!1}}),i.update=function(_){var w=this._stack;if(w.length===0)throw new Error("Can't update empty node!");var h=new Array(w.length),u=w[w.length-1];h[h.length-1]=new n(u._color,u.key,_,u.left,u.right,u._count);for(var A=w.length-2;A>=0;--A)u=w[A],u.left===w[A+1]?h[A]=new n(u._color,u.key,u.value,h[A+1],u.right,u._count):h[A]=new n(u._color,u.key,u.value,u.left,h[A+1],u._count);return new s(this.tree._compare,h[0])},i.prev=function(){var _=this._stack;if(_.length!==0){var w=_[_.length-1];if(w.left)for(w=w.left;w;)_.push(w),w=w.right;else for(_.pop();_.length>0&&_[_.length-1].left===w;)w=_[_.length-1],_.pop()}},Object.defineProperty(i,"hasPrev",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].left)return!0;for(var w=_.length-1;w>0;--w)if(_[w-1].right===_[w])return!0;return!1}});function M(_,w){return _w?1:0}function C(_){return new s(_||M,null)}},3837(l,e,t){"use strict";l.exports=I;var n=t(4935),r=t(501),a=t(5304),o=t(6429),s=t(6444),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),g=ArrayBuffer,f=DataView;function p(N){return g.isView(N)&&!(N instanceof f)}function m(N){return Array.isArray(N)||p(N)}function i(N,R){return N[0]=R[0],N[1]=R[1],N[2]=R[2],N}function T(N){this.gl=N,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(N)}var S=T.prototype;S.update=function(N){N=N||{};function R(G,X,q){if(q in N){var W=N[q],ee=this[q],ae;(G?m(W)&&m(W[0]):m(W))?this[q]=ae=[X(W[0]),X(W[1]),X(W[2])]:this[q]=ae=[X(W),X(W),X(W)];for(var fe=0;fe<3;++fe)if(ae[fe]!==ee[fe])return!0}return!1}var B=R.bind(this,!1,Number),F=R.bind(this,!1,Boolean),P=R.bind(this,!1,String),j=R.bind(this,!0,function(G){if(m(G)){if(G.length===3)return[+G[0],+G[1],+G[2],1];if(G.length===4)return[+G[0],+G[1],+G[2],+G[3]]}return[0,0,0,1]}),U,Z=!1,Q=!1;if("bounds"in N)for(var re=N.bounds,ne=0;ne<2;++ne)for(var oe=0;oe<3;++oe)re[ne][oe]!==this.bounds[ne][oe]&&(Q=!0),this.bounds[ne][oe]=re[ne][oe];if("ticks"in N){U=N.ticks,Z=!0,this.autoTicks=!1;for(var ne=0;ne<3;++ne)this.tickSpacing[ne]=0}else B("tickSpacing")&&(this.autoTicks=!0,Q=!0);if(this._firstInit&&("ticks"in N||"tickSpacing"in N||(this.autoTicks=!0),Q=!0,Z=!0,this._firstInit=!1),Q&&this.autoTicks&&(U=s.create(this.bounds,this.tickSpacing),Z=!0),Z){for(var ne=0;ne<3;++ne)U[ne].sort(function(X,q){return X.x-q.x});s.equal(U,this.ticks)?Z=!1:this.ticks=U}F("tickEnable"),P("tickFont")&&(Z=!0),P("tickFontStyle")&&(Z=!0),P("tickFontWeight")&&(Z=!0),P("tickFontVariant")&&(Z=!0),B("tickSize"),B("tickAngle"),B("tickPad"),j("tickColor");var V=P("labels");P("labelFont")&&(V=!0),P("labelFontStyle")&&(V=!0),P("labelFontWeight")&&(V=!0),P("labelFontVariant")&&(V=!0),F("labelEnable"),B("labelSize"),B("labelPad"),j("labelColor"),F("lineEnable"),F("lineMirror"),B("lineWidth"),j("lineColor"),F("lineTickEnable"),F("lineTickMirror"),B("lineTickLength"),B("lineTickWidth"),j("lineTickColor"),F("gridEnable"),B("gridWidth"),j("gridColor"),F("zeroEnable"),j("zeroLineColor"),B("zeroLineWidth"),F("backgroundEnable"),j("backgroundColor");var $=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],K=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(V||Z)&&this._text.update(this.bounds,this.labels,$,this.ticks,K):this._text=n(this.gl,this.bounds,this.labels,$,this.ticks,K),this._lines&&Z&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=r(this.gl,this.bounds,this.ticks))};function M(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var C=[new M,new M,new M];function _(N,R,B,F,P){for(var j=N.primalOffset,U=N.primalMinor,Z=N.mirrorOffset,Q=N.mirrorMinor,re=F[R],ne=0;ne<3;++ne)if(R!==ne){var oe=j,V=Z,$=U,K=Q;re&1<0?($[ne]=-1,K[ne]=0):($[ne]=0,K[ne]=1)}}var w=[0,0,0],h={model:c,view:c,projection:c,_ortho:!1};S.isOpaque=function(){return!0},S.isTransparent=function(){return!1},S.drawTransparent=function(N){};var u=0,A=[0,0,0],b=[0,0,0],z=[0,0,0];S.draw=function(N){N=N||h;for(var q=this.gl,R=N.model||c,B=N.view||c,F=N.projection||c,P=this.bounds,j=N._ortho||!1,U=o(R,B,F,P,j),Z=U.cubeEdges,Q=U.axis,re=B[12],ne=B[13],oe=B[14],V=B[15],$=j?2:1,K=$*this.pixelRatio*(F[3]*re+F[7]*ne+F[11]*oe+F[15]*V)/q.drawingBufferHeight,G=0;G<3;++G)this.lastCubeProps.cubeEdges[G]=Z[G],this.lastCubeProps.axis[G]=Q[G];for(var X=C,G=0;G<3;++G)_(C[G],G,this.bounds,Z,Q);for(var q=this.gl,W=w,G=0;G<3;++G)this.backgroundEnable[G]?W[G]=Q[G]:W[G]=0;this._background.draw(R,B,F,P,W,this.backgroundColor),this._lines.bind(R,B,F,this);for(var G=0;G<3;++G){var ee=[0,0,0];Q[G]>0?ee[G]=P[1][G]:ee[G]=P[0][G];for(var ae=0;ae<2;++ae){var fe=(G+1+ae)%3,ye=(G+1+(ae^1))%3;this.gridEnable[fe]&&this._lines.drawGrid(fe,ye,this.bounds,ee,this.gridColor[fe],this.gridWidth[fe]*this.pixelRatio)}for(var ae=0;ae<2;++ae){var fe=(G+1+ae)%3,ye=(G+1+(ae^1))%3;this.zeroEnable[ye]&&Math.min(P[0][ye],P[1][ye])<=0&&Math.max(P[0][ye],P[1][ye])>=0&&this._lines.drawZero(fe,ye,this.bounds,ee,this.zeroLineColor[ye],this.zeroLineWidth[ye]*this.pixelRatio)}}for(var G=0;G<3;++G){this.lineEnable[G]&&this._lines.drawAxisLine(G,this.bounds,X[G].primalOffset,this.lineColor[G],this.lineWidth[G]*this.pixelRatio),this.lineMirror[G]&&this._lines.drawAxisLine(G,this.bounds,X[G].mirrorOffset,this.lineColor[G],this.lineWidth[G]*this.pixelRatio);for(var xe=i(A,X[G].primalMinor),Ae=i(b,X[G].mirrorMinor),Me=this.lineTickLength,ae=0;ae<3;++ae){var Ie=K/R[5*ae];xe[ae]*=Me[ae]*Ie,Ae[ae]*=Me[ae]*Ie}this.lineTickEnable[G]&&this._lines.drawAxisTicks(G,X[G].primalOffset,xe,this.lineTickColor[G],this.lineTickWidth[G]*this.pixelRatio),this.lineTickMirror[G]&&this._lines.drawAxisTicks(G,X[G].mirrorOffset,Ae,this.lineTickColor[G],this.lineTickWidth[G]*this.pixelRatio)}this._lines.unbind(),this._text.bind(R,B,F,this.pixelRatio);var qe,je=.5,ke,ge;function le(Ge){ge=[0,0,0],ge[Ge]=1}function ve(Ge,gt,mt){var Tt=(Ge+1)%3,At=(Ge+2)%3,Kt=gt[Tt],ar=gt[At],_r=mt[Tt],Zt=mt[At];if(Kt>0&&Zt>0){le(Tt);return}else if(Kt>0&&Zt<0){le(Tt);return}else if(Kt<0&&Zt>0){le(Tt);return}else if(Kt<0&&Zt<0){le(Tt);return}else if(ar>0&&_r>0){le(At);return}else if(ar>0&&_r<0){le(At);return}else if(ar<0&&_r>0){le(At);return}else if(ar<0&&_r<0){le(At);return}}for(var G=0;G<3;++G){for(var se=X[G].primalMinor,Te=X[G].mirrorMinor,Fe=i(z,X[G].primalOffset),ae=0;ae<3;++ae)this.lineTickEnable[G]&&(Fe[ae]+=K*se[ae]*Math.max(this.lineTickLength[ae],0)/R[5*ae]);var We=[0,0,0];if(We[G]=1,this.tickEnable[G]){this.tickAngle[G]===-3600?(this.tickAngle[G]=0,this.tickAlign[G]="auto"):this.tickAlign[G]=-1,ke=1,qe=[this.tickAlign[G],je,ke],qe[0]==="auto"?qe[0]=u:qe[0]=parseInt(""+qe[0]),ge=[0,0,0],ve(G,se,Te);for(var ae=0;ae<3;++ae)Fe[ae]+=K*se[ae]*this.tickPad[ae]/R[5*ae];this._text.drawTicks(G,this.tickSize[G],this.tickAngle[G],Fe,this.tickColor[G],We,ge,qe)}if(this.labelEnable[G]){ke=0,ge=[0,0,0],this.labels[G].length>4&&(le(G),ke=1),qe=[this.labelAlign[G],je,ke],qe[0]==="auto"?qe[0]=u:qe[0]=parseInt(""+qe[0]);for(var ae=0;ae<3;++ae)Fe[ae]+=K*se[ae]*this.labelPad[ae]/R[5*ae];Fe[G]+=.5*(P[0][G]+P[1][G]),this._text.drawLabel(G,this.labelSize[G],this.labelAngle[G],Fe,this.labelColor[G],[0,0,0],ge,qe)}}this._text.unbind()},S.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function I(N,R){var B=new T(N);return B.update(R),B}},5304(l,e,t){"use strict";l.exports=c;var n=t(2762),r=t(8116),a=t(1879).bg;function o(g,f,p,m){this.gl=g,this.buffer=f,this.vao=p,this.shader=m}var s=o.prototype;s.draw=function(g,f,p,m,i,T){for(var S=!1,M=0;M<3;++M)S=S||i[M];if(S){var C=this.gl;C.enable(C.POLYGON_OFFSET_FILL),C.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:g,view:f,projection:p,bounds:m,enable:i,colors:T},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),C.disable(C.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function c(g){for(var f=[],p=[],m=0,i=0;i<3;++i)for(var T=(i+1)%3,S=(i+2)%3,M=[0,0,0],C=[0,0,0],_=-1;_<=1;_+=2){p.push(m,m+2,m+1,m+1,m+2,m+3),M[i]=_,C[i]=_;for(var w=-1;w<=1;w+=2){M[T]=w;for(var h=-1;h<=1;h+=2)M[S]=h,f.push(M[0],M[1],M[2],C[0],C[1],C[2]),m+=1}var u=T;T=S,S=u}var A=n(g,new Float32Array(f)),b=n(g,new Uint16Array(p),g.ELEMENT_ARRAY_BUFFER),z=r(g,[{buffer:A,type:g.FLOAT,size:3,offset:0,stride:24},{buffer:A,type:g.FLOAT,size:3,offset:12,stride:24}],b),I=a(g);return I.attributes.position.location=0,I.attributes.normal.location=1,new o(g,A,z,I)}},6429(l,e,t){"use strict";l.exports=_;var n=t(8828),r=t(6760),a=t(5202),o=t(3250),s=new Array(16),c=new Array(8),g=new Array(8),f=new Array(3),p=[0,0,0];(function(){for(var w=0;w<8;++w)c[w]=[1,1,1,1],g[w]=[1,1,1]})();function m(w,h,u){for(var A=0;A<4;++A){w[A]=u[12+A];for(var b=0;b<3;++b)w[A]+=h[b]*u[4*b+A]}}var i=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function T(w){for(var h=0;hQ&&(B|=1<Q){B|=1<g[I][1])&&(X=I);for(var q=-1,I=0;I<3;++I){var W=X^1<g[ee][0]&&(ee=W)}}var ae=S;ae[0]=ae[1]=ae[2]=0,ae[n.log2(q^X)]=X&q,ae[n.log2(X^ee)]=Xⅇvar fe=ee^7;fe===B||fe===G?(fe=q^7,ae[n.log2(ee^fe)]=fe&ee):ae[n.log2(q^fe)]=fe&q;for(var ye=M,xe=B,j=0;j<3;++j)xe&1<=0;--ne){var fe=G[ee[ne]];f.push(K*fe[0],-K*fe[1],j)}}for(var A=[0,0,0],b=[0,0,0],z=[0,0,0],I=[0,0,0],N=1.25,R={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},B=0;B<3;++B){z[B]=f.length/m|0,u(.5*(S[0][B]+S[1][B]),M[B],C[B],12,N,R),I[B]=(f.length/m|0)-z[B],A[B]=f.length/m|0;for(var F=0;F<_[B].length;++F)if(_[B][F].text){var P={family:_[B][F].font||T[B].family,style:T[B].fontStyle||T[B].style,weight:T[B].fontWeight||T[B].weight,variant:T[B].fontVariant||T[B].variant};u(_[B][F].x,_[B][F].text,P,_[B][F].fontSize||12,N,R)}b[B]=(f.length/m|0)-A[B]}this.buffer.update(f),this.tickOffset=A,this.tickCount=b,this.labelOffset=z,this.labelCount=I},p.drawTicks=function(S,M,C,_,T,f,u,A){this.tickCount[S]&&(this.shader.uniforms.axis=f,this.shader.uniforms.color=T,this.shader.uniforms.angle=C,this.shader.uniforms.scale=M,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=A,this.vao.draw(this.gl.TRIANGLES,this.tickCount[S],this.tickOffset[S]))},p.drawLabel=function(S,M,C,_,T,f,u,A){this.labelCount[S]&&(this.shader.uniforms.axis=f,this.shader.uniforms.color=T,this.shader.uniforms.angle=C,this.shader.uniforms.scale=M,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=A,this.vao.draw(this.gl.TRIANGLES,this.labelCount[S],this.labelOffset[S]))},p.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function i(S,M){try{return n(S,M)}catch(C){return console.warn('error vectorizing text:"'+S+'" error:',C),{cells:[],positions:[]}}}function w(S,M,C,_,T,f){var u=a(S),A=r(S,[{buffer:u,size:3}]),b=o(S);b.attributes.position.location=0;var z=new h(S,b,u,A);return z.update(M,C,_,T,f),z}},6444:function(l,e){"use strict";e.create=a,e.equal=r;function t(n,o){var s=n+"",c=s.indexOf("."),m=0;c>=0&&(m=s.length-c-1);var h=Math.pow(10,m),p=Math.round(n*o*h),g=p+"";if(g.indexOf("e")>=0)return g;var i=p/h,w=p%h;p<0?(i=-Math.ceil(i)|0,w=-w|0):(i=Math.floor(i)|0,w=w|0);var S=""+i;if(p<0&&(S="-"+S),m){for(var M=""+w;M.length=n[0][c];--p)m.push({x:p*o[c],text:t(o[c],p)});s.push(m)}return s}function r(n,o){for(var s=0;s<3;++s){if(n[s].length!==o[s].length)return!1;for(var c=0;cS)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return i.bufferSubData(w,_,C),S}function h(i,w){for(var S=a.malloc(i.length,w),M=i.length,C=0;C=0;--M){if(w[M]!==S)return!1;S*=i[M]}return!0}c.update=function(i,w){if(typeof w!="number"&&(w=-1),this.bind(),typeof i=="object"&&typeof i.shape<"u"){var S=i.dtype;if(o.indexOf(S)<0&&(S="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var M=gl.getExtension("OES_element_index_uint");M&&S!=="uint16"?S="uint32":S="uint16"}if(S===i.dtype&&p(i.shape,i.stride))i.offset===0&&i.data.length===i.shape[0]?this.length=m(this.gl,this.type,this.length,this.usage,i.data,w):this.length=m(this.gl,this.type,this.length,this.usage,i.data.subarray(i.offset,i.shape[0]),w);else{var C=a.malloc(i.size,S),_=n(C,i.shape);r.assign(_,i),w<0?this.length=m(this.gl,this.type,this.length,this.usage,C,w):this.length=m(this.gl,this.type,this.length,this.usage,C.subarray(0,i.size),w),a.free(C)}}else if(Array.isArray(i)){var T;this.type===this.gl.ELEMENT_ARRAY_BUFFER?T=h(i,"uint16"):T=h(i,"float32"),w<0?this.length=m(this.gl,this.type,this.length,this.usage,T,w):this.length=m(this.gl,this.type,this.length,this.usage,T.subarray(0,i.length),w),a.free(T)}else if(typeof i=="object"&&typeof i.length=="number")this.length=m(this.gl,this.type,this.length,this.usage,i,w);else if(typeof i=="number"||i===void 0){if(w>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");i=i|0,i<=0&&(i=1),this.gl.bufferData(this.type,i|0,this.usage),this.length=i}else throw new Error("gl-buffer: Invalid data type")};function g(i,w,S,M){if(S=S||i.ARRAY_BUFFER,M=M||i.DYNAMIC_DRAW,S!==i.ARRAY_BUFFER&&S!==i.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(M!==i.DYNAMIC_DRAW&&M!==i.STATIC_DRAW&&M!==i.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var C=i.createBuffer(),_=new s(i,S,C,0,M);return _.update(w),_}l.exports=g},6405:function(l,e,t){"use strict";var a=t(2931);l.exports=function(n,o){var s=n.positions,c=n.vectors,m={positions:[],vertexIntensity:[],vertexIntensityBounds:n.vertexIntensityBounds,vectors:[],cells:[],coneOffset:n.coneOffset,colormap:n.colormap};if(n.positions.length===0)return o&&(o[0]=[0,0,0],o[1]=[0,0,0]),m;for(var h=0,p=1/0,g=-1/0,i=1/0,w=-1/0,S=1/0,M=-1/0,C=null,_=null,T=[],f=1/0,u=!1,A=n.coneSizemode==="raw",b=0;bh&&(h=a.length(I)),b&&!A){var N=2*a.distance(C,z)/(a.length(_)+a.length(I));N?(f=Math.min(f,N),u=!1):u=!0}u||(C=z,_=I),T.push(I)}var R=[p,i,S],B=[g,w,M];o&&(o[0]=R,o[1]=B),h===0&&(h=1);var F=1/h;isFinite(f)||(f=1),m.vectorScale=f;var P=n.coneSize||(A?1:.5);n.absoluteConeSize&&(P=n.absoluteConeSize*F),m.coneScale=P;for(var b=0,j=0;b=1},i.isTransparent=function(){return this.opacity<1},i.pickSlots=1,i.setPickBase=function(T){this.pickId=T};function w(T){for(var f=h({colormap:T,nshades:256,format:"rgba"}),u=new Uint8Array(256*4),A=0;A<256;++A){for(var b=f[A],z=0;z<3;++z)u[4*A+z]=b[z];u[4*A+3]=b[3]*255}return m(u,[256,256,4],[4,0,1])}function S(T){for(var f=T.length,u=new Array(f),A=0;A0){var j=this.triShader;j.bind(),j.uniforms=N,this.triangleVAO.bind(),f.drawArrays(f.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},i.drawPick=function(T){T=T||{};for(var f=this.gl,u=T.model||p,A=T.view||p,b=T.projection||p,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],I=0;I<3;++I)z[0][I]=Math.max(z[0][I],this.clipBounds[0][I]),z[1][I]=Math.min(z[1][I],this.clipBounds[1][I]);this._model=[].slice.call(u),this._view=[].slice.call(A),this._projection=[].slice.call(b),this._resolution=[f.drawingBufferWidth,f.drawingBufferHeight];var N={model:u,view:A,projection:b,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},R=this.pickShader;R.bind(),R.uniforms=N,this.triangleCount>0&&(this.triangleVAO.bind(),f.drawArrays(f.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},i.pick=function(T){if(!T||T.id!==this.pickId)return null;var f=T.value[0]+256*T.value[1]+65536*T.value[2],u=this.cells[f],A=this.positions[u[1]].slice(0,3),b={position:A,dataCoordinate:A,index:Math.floor(u[1]/48)};return this.traceType==="cone"?b.index=Math.floor(u[1]/48):this.traceType==="streamtube"&&(b.intensity=this.intensity[u[1]],b.velocity=this.vectors[u[1]].slice(0,3),b.divergence=this.vectors[u[1]][3],b.index=f),b},i.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function M(T,f){var u=a(T,f.meshShader.vertex,f.meshShader.fragment,null,f.meshShader.attributes);return u.attributes.position.location=0,u.attributes.color.location=2,u.attributes.uv.location=3,u.attributes.vector.location=4,u}function C(T,f){var u=a(T,f.pickShader.vertex,f.pickShader.fragment,null,f.pickShader.attributes);return u.attributes.position.location=0,u.attributes.id.location=1,u.attributes.vector.location=4,u}function _(T,f,u){var A=u.shaders;arguments.length===1&&(f=T,T=f.gl);var b=M(T,A),z=C(T,A),I=o(T,m(new Uint8Array([255,255,255,255]),[1,1,4]));I.generateMipmap(),I.minFilter=T.LINEAR_MIPMAP_LINEAR,I.magFilter=T.LINEAR;var N=r(T),R=r(T),B=r(T),F=r(T),P=r(T),j=n(T,[{buffer:N,type:T.FLOAT,size:4},{buffer:P,type:T.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:B,type:T.FLOAT,size:4},{buffer:F,type:T.FLOAT,size:2},{buffer:R,type:T.FLOAT,size:4}]),U=new g(T,I,b,z,N,R,P,B,F,j,u.traceType||"cone");return U.update(f),U}l.exports=_},614:function(l,e,t){var a=t(3236),r=a([`precision highp float; +}`]);e.bg=function(p){return r(p,g,f,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935(l,e,t){"use strict";l.exports=T;var n=t(2762),r=t(8116),a=t(4359),o=t(1879).Q,s=window||process.global||{},c=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};var g=3;function f(S,M,C,_){this.gl=S,this.shader=M,this.buffer=C,this.vao=_,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var p=f.prototype,m=[0,0];p.bind=function(S,M,C,_){this.vao.bind(),this.shader.bind();var w=this.shader.uniforms;w.model=S,w.view=M,w.projection=C,w.pixelScale=_,m[0]=this.gl.drawingBufferWidth,m[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=m},p.unbind=function(){this.vao.unbind()},p.update=function(S,M,C,_,w){var h=[];function u(j,U,Z,Q,re,ne){var oe=[Z.style,Z.weight,Z.variant,Z.family].join("_"),V=c[oe];V||(V=c[oe]={});var $=V[U];$||($=V[U]=i(U,{triangles:!0,font:Z.family,fontStyle:Z.style,fontWeight:Z.weight,fontVariant:Z.variant,textAlign:"center",textBaseline:"middle",lineSpacing:re,styletags:ne}));for(var K=(Q||12)/12,G=$.positions,X=$.cells,q=0,W=X.length;q=0;--ae){var fe=G[ee[ae]];h.push(K*fe[0],-K*fe[1],j)}}for(var A=[0,0,0],b=[0,0,0],z=[0,0,0],I=[0,0,0],N=1.25,R={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},B=0;B<3;++B){z[B]=h.length/g|0,u(.5*(S[0][B]+S[1][B]),M[B],C[B],12,N,R),I[B]=(h.length/g|0)-z[B],A[B]=h.length/g|0;for(var F=0;F<_[B].length;++F)if(_[B][F].text){var P={family:_[B][F].font||w[B].family,style:w[B].fontStyle||w[B].style,weight:w[B].fontWeight||w[B].weight,variant:w[B].fontVariant||w[B].variant};u(_[B][F].x,_[B][F].text,P,_[B][F].fontSize||12,N,R)}b[B]=(h.length/g|0)-A[B]}this.buffer.update(h),this.tickOffset=A,this.tickCount=b,this.labelOffset=z,this.labelCount=I},p.drawTicks=function(S,M,C,_,w,h,u,A){this.tickCount[S]&&(this.shader.uniforms.axis=h,this.shader.uniforms.color=w,this.shader.uniforms.angle=C,this.shader.uniforms.scale=M,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=A,this.vao.draw(this.gl.TRIANGLES,this.tickCount[S],this.tickOffset[S]))},p.drawLabel=function(S,M,C,_,w,h,u,A){this.labelCount[S]&&(this.shader.uniforms.axis=h,this.shader.uniforms.color=w,this.shader.uniforms.angle=C,this.shader.uniforms.scale=M,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=A,this.vao.draw(this.gl.TRIANGLES,this.labelCount[S],this.labelOffset[S]))},p.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function i(S,M){try{return a(S,M)}catch(C){return console.warn('error vectorizing text:"'+S+'" error:',C),{cells:[],positions:[]}}}function T(S,M,C,_,w,h){var u=n(S),A=r(S,[{buffer:u,size:3}]),b=o(S);b.attributes.position.location=0;var z=new f(S,b,u,A);return z.update(M,C,_,w,h),z}},6444(l,e){"use strict";e.create=n,e.equal=r;function t(a,o){var s=a+"",c=s.indexOf("."),g=0;c>=0&&(g=s.length-c-1);var f=Math.pow(10,g),p=Math.round(a*o*f),m=p+"";if(m.indexOf("e")>=0)return m;var i=p/f,T=p%f;p<0?(i=-Math.ceil(i)|0,T=-T|0):(i=Math.floor(i)|0,T=T|0);var S=""+i;if(p<0&&(S="-"+S),g){for(var M=""+T;M.length=a[0][c];--p)g.push({x:p*o[c],text:t(o[c],p)});s.push(g)}return s}function r(a,o){for(var s=0;s<3;++s){if(a[s].length!==o[s].length)return!1;for(var c=0;cS)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return i.bufferSubData(T,_,C),S}function f(i,T){for(var S=n.malloc(i.length,T),M=i.length,C=0;C=0;--M){if(T[M]!==S)return!1;S*=i[M]}return!0}c.update=function(i,T){if(typeof T!="number"&&(T=-1),this.bind(),typeof i=="object"&&typeof i.shape<"u"){var S=i.dtype;if(o.indexOf(S)<0&&(S="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var M=gl.getExtension("OES_element_index_uint");M&&S!=="uint16"?S="uint32":S="uint16"}if(S===i.dtype&&p(i.shape,i.stride))i.offset===0&&i.data.length===i.shape[0]?this.length=g(this.gl,this.type,this.length,this.usage,i.data,T):this.length=g(this.gl,this.type,this.length,this.usage,i.data.subarray(i.offset,i.shape[0]),T);else{var C=n.malloc(i.size,S),_=a(C,i.shape);r.assign(_,i),T<0?this.length=g(this.gl,this.type,this.length,this.usage,C,T):this.length=g(this.gl,this.type,this.length,this.usage,C.subarray(0,i.size),T),n.free(C)}}else if(Array.isArray(i)){var w;this.type===this.gl.ELEMENT_ARRAY_BUFFER?w=f(i,"uint16"):w=f(i,"float32"),T<0?this.length=g(this.gl,this.type,this.length,this.usage,w,T):this.length=g(this.gl,this.type,this.length,this.usage,w.subarray(0,i.length),T),n.free(w)}else if(typeof i=="object"&&typeof i.length=="number")this.length=g(this.gl,this.type,this.length,this.usage,i,T);else if(typeof i=="number"||i===void 0){if(T>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");i=i|0,i<=0&&(i=1),this.gl.bufferData(this.type,i|0,this.usage),this.length=i}else throw new Error("gl-buffer: Invalid data type")};function m(i,T,S,M){if(S=S||i.ARRAY_BUFFER,M=M||i.DYNAMIC_DRAW,S!==i.ARRAY_BUFFER&&S!==i.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(M!==i.DYNAMIC_DRAW&&M!==i.STATIC_DRAW&&M!==i.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var C=i.createBuffer(),_=new s(i,S,C,0,M);return _.update(T),_}l.exports=m},6405(l,e,t){"use strict";var n=t(2931);l.exports=function(a,o){var s=a.positions,c=a.vectors,g={positions:[],vertexIntensity:[],vertexIntensityBounds:a.vertexIntensityBounds,vectors:[],cells:[],coneOffset:a.coneOffset,colormap:a.colormap};if(a.positions.length===0)return o&&(o[0]=[0,0,0],o[1]=[0,0,0]),g;for(var f=0,p=1/0,m=-1/0,i=1/0,T=-1/0,S=1/0,M=-1/0,C=null,_=null,w=[],h=1/0,u=!1,A=a.coneSizemode==="raw",b=0;bf&&(f=n.length(I)),b&&!A){var N=2*n.distance(C,z)/(n.length(_)+n.length(I));N?(h=Math.min(h,N),u=!1):u=!0}u||(C=z,_=I),w.push(I)}var R=[p,i,S],B=[m,T,M];o&&(o[0]=R,o[1]=B),f===0&&(f=1);var F=1/f;isFinite(h)||(h=1),g.vectorScale=h;var P=a.coneSize||(A?1:.5);a.absoluteConeSize&&(P=a.absoluteConeSize*F),g.coneScale=P;for(var b=0,j=0;b=1},i.isTransparent=function(){return this.opacity<1},i.pickSlots=1,i.setPickBase=function(w){this.pickId=w};function T(w){for(var h=f({colormap:w,nshades:256,format:"rgba"}),u=new Uint8Array(256*4),A=0;A<256;++A){for(var b=h[A],z=0;z<3;++z)u[4*A+z]=b[z];u[4*A+3]=b[3]*255}return g(u,[256,256,4],[4,0,1])}function S(w){for(var h=w.length,u=new Array(h),A=0;A0){var j=this.triShader;j.bind(),j.uniforms=N,this.triangleVAO.bind(),h.drawArrays(h.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},i.drawPick=function(w){w=w||{};for(var h=this.gl,u=w.model||p,A=w.view||p,b=w.projection||p,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],I=0;I<3;++I)z[0][I]=Math.max(z[0][I],this.clipBounds[0][I]),z[1][I]=Math.min(z[1][I],this.clipBounds[1][I]);this._model=[].slice.call(u),this._view=[].slice.call(A),this._projection=[].slice.call(b),this._resolution=[h.drawingBufferWidth,h.drawingBufferHeight];var N={model:u,view:A,projection:b,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},R=this.pickShader;R.bind(),R.uniforms=N,this.triangleCount>0&&(this.triangleVAO.bind(),h.drawArrays(h.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},i.pick=function(w){if(!w||w.id!==this.pickId)return null;var h=w.value[0]+256*w.value[1]+65536*w.value[2],u=this.cells[h],A=this.positions[u[1]].slice(0,3),b={position:A,dataCoordinate:A,index:Math.floor(u[1]/48)};return this.traceType==="cone"?b.index=Math.floor(u[1]/48):this.traceType==="streamtube"&&(b.intensity=this.intensity[u[1]],b.velocity=this.vectors[u[1]].slice(0,3),b.divergence=this.vectors[u[1]][3],b.index=h),b},i.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function M(w,h){var u=n(w,h.meshShader.vertex,h.meshShader.fragment,null,h.meshShader.attributes);return u.attributes.position.location=0,u.attributes.color.location=2,u.attributes.uv.location=3,u.attributes.vector.location=4,u}function C(w,h){var u=n(w,h.pickShader.vertex,h.pickShader.fragment,null,h.pickShader.attributes);return u.attributes.position.location=0,u.attributes.id.location=1,u.attributes.vector.location=4,u}function _(w,h,u){var A=u.shaders;arguments.length===1&&(h=w,w=h.gl);var b=M(w,A),z=C(w,A),I=o(w,g(new Uint8Array([255,255,255,255]),[1,1,4]));I.generateMipmap(),I.minFilter=w.LINEAR_MIPMAP_LINEAR,I.magFilter=w.LINEAR;var N=r(w),R=r(w),B=r(w),F=r(w),P=r(w),j=a(w,[{buffer:N,type:w.FLOAT,size:4},{buffer:P,type:w.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:B,type:w.FLOAT,size:4},{buffer:F,type:w.FLOAT,size:2},{buffer:R,type:w.FLOAT,size:4}]),U=new m(w,I,b,z,N,R,P,B,F,j,u.traceType||"cone");return U.update(h),U}l.exports=_},614(l,e,t){var n=t(3236),r=n([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -419,7 +419,7 @@ void main() { f_position = position.xyz; f_uv = uv; } -`]),n=a([`#extension GL_OES_standard_derivatives : enable +`]),a=n([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 @@ -510,7 +510,7 @@ void main() { gl_FragColor = litColor * opacity; } -`]),o=a([`precision highp float; +`]),o=n([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -609,7 +609,7 @@ void main() { f_id = id; f_position = position.xyz; } -`]),s=a([`precision highp float; +`]),s=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -642,7 +642,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]);e.meshShader={vertex:r,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(l){l.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(l,e,t){var a=t(737);l.exports=function(n){return a[n]}},9165:function(l,e,t){"use strict";l.exports=g;var a=t(2762),r=t(8116),n=t(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(i,w,S,M){this.gl=i,this.shader=M,this.buffer=w,this.vao=S,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var c=s.prototype;c.isOpaque=function(){return!this.hasAlpha},c.isTransparent=function(){return this.hasAlpha},c.drawTransparent=c.draw=function(i){var w=this.gl,S=this.shader.uniforms;this.shader.bind();var M=S.view=i.view||o,C=S.projection=i.projection||o;S.model=i.model||o,S.clipBounds=this.clipBounds,S.opacity=this.opacity;var _=M[12],T=M[13],f=M[14],u=M[15],A=i._ortho||!1,b=A?2:1,z=b*this.pixelRatio*(C[3]*_+C[7]*T+C[11]*f+C[15]*u)/w.drawingBufferHeight;this.vao.bind();for(var I=0;I<3;++I)w.lineWidth(this.lineWidth[I]*this.pixelRatio),S.capSize=this.capSize[I]*z,this.lineCount[I]&&w.drawArrays(w.LINES,this.lineOffset[I],this.lineCount[I]);this.vao.unbind()};function m(i,w){for(var S=0;S<3;++S)i[0][S]=Math.min(i[0][S],w[S]),i[1][S]=Math.max(i[1][S],w[S])}var h=function(){for(var i=new Array(3),w=0;w<3;++w){for(var S=[],M=1;M<=2;++M)for(var C=-1;C<=1;C+=2){var _=(M+w)%3,T=[0,0,0];T[_]=C,S.push(T)}i[w]=S}return i}();function p(i,w,S,M){for(var C=h[M],_=0;_0){var N=A.slice();N[f]+=z[1][f],C.push(A[0],A[1],A[2],I[0],I[1],I[2],I[3],0,0,0,N[0],N[1],N[2],I[0],I[1],I[2],I[3],0,0,0),m(this.bounds,N),T+=2+p(C,N,I,f)}}}this.lineCount[f]=T-this.lineOffset[f]}this.buffer.update(C)}},c.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function g(i){var w=i.gl,S=a(w),M=r(w,[{buffer:S,type:w.FLOAT,size:3,offset:0,stride:40},{buffer:S,type:w.FLOAT,size:4,offset:12,stride:40},{buffer:S,type:w.FLOAT,size:3,offset:28,stride:40}]),C=n(w);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.offset.location=2;var _=new s(w,S,M,C);return _.update(i),_}},3436:function(l,e,t){"use strict";var a=t(3236),r=t(9405),n=a([`precision highp float; +}`]);e.meshShader={vertex:r,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737(l){l.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171(l,e,t){var n=t(737);l.exports=function(a){return n[a]}},9165(l,e,t){"use strict";l.exports=m;var n=t(2762),r=t(8116),a=t(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(i,T,S,M){this.gl=i,this.shader=M,this.buffer=T,this.vao=S,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var c=s.prototype;c.isOpaque=function(){return!this.hasAlpha},c.isTransparent=function(){return this.hasAlpha},c.drawTransparent=c.draw=function(i){var T=this.gl,S=this.shader.uniforms;this.shader.bind();var M=S.view=i.view||o,C=S.projection=i.projection||o;S.model=i.model||o,S.clipBounds=this.clipBounds,S.opacity=this.opacity;var _=M[12],w=M[13],h=M[14],u=M[15],A=i._ortho||!1,b=A?2:1,z=b*this.pixelRatio*(C[3]*_+C[7]*w+C[11]*h+C[15]*u)/T.drawingBufferHeight;this.vao.bind();for(var I=0;I<3;++I)T.lineWidth(this.lineWidth[I]*this.pixelRatio),S.capSize=this.capSize[I]*z,this.lineCount[I]&&T.drawArrays(T.LINES,this.lineOffset[I],this.lineCount[I]);this.vao.unbind()};function g(i,T){for(var S=0;S<3;++S)i[0][S]=Math.min(i[0][S],T[S]),i[1][S]=Math.max(i[1][S],T[S])}var f=function(){for(var i=new Array(3),T=0;T<3;++T){for(var S=[],M=1;M<=2;++M)for(var C=-1;C<=1;C+=2){var _=(M+T)%3,w=[0,0,0];w[_]=C,S.push(w)}i[T]=S}return i}();function p(i,T,S,M){for(var C=f[M],_=0;_0){var N=A.slice();N[h]+=z[1][h],C.push(A[0],A[1],A[2],I[0],I[1],I[2],I[3],0,0,0,N[0],N[1],N[2],I[0],I[1],I[2],I[3],0,0,0),g(this.bounds,N),w+=2+p(C,N,I,h)}}}this.lineCount[h]=w-this.lineOffset[h]}this.buffer.update(C)}},c.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function m(i){var T=i.gl,S=n(T),M=r(T,[{buffer:S,type:T.FLOAT,size:3,offset:0,stride:40},{buffer:S,type:T.FLOAT,size:4,offset:12,stride:40},{buffer:S,type:T.FLOAT,size:3,offset:28,stride:40}]),C=a(T);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.offset.location=2;var _=new s(T,S,M,C);return _.update(i),_}},3436(l,e,t){"use strict";var n=t(3236),r=t(9405),a=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; @@ -658,7 +658,7 @@ void main() { gl_Position = projection * (view * worldPosition); fragColor = color; fragPosition = position; -}`]),o=a([`precision highp float; +}`]),o=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -693,13 +693,13 @@ void main() { ) discard; gl_FragColor = opacity * fragColor; -}`]);l.exports=function(s){return r(s,n,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(l,e,t){"use strict";var a=t(7766);l.exports=T;var r=null,n,o,s,c;function m(f){var u=f.getParameter(f.FRAMEBUFFER_BINDING),A=f.getParameter(f.RENDERBUFFER_BINDING),b=f.getParameter(f.TEXTURE_BINDING_2D);return[u,A,b]}function h(f,u){f.bindFramebuffer(f.FRAMEBUFFER,u[0]),f.bindRenderbuffer(f.RENDERBUFFER,u[1]),f.bindTexture(f.TEXTURE_2D,u[2])}function p(f,u){var A=f.getParameter(u.MAX_COLOR_ATTACHMENTS_WEBGL);r=new Array(A+1);for(var b=0;b<=A;++b){for(var z=new Array(A),I=0;I1&&R.drawBuffersWEBGL(r[N]);var U=A.getExtension("WEBGL_depth_texture");U?B?f.depth=i(A,z,I,U.UNSIGNED_INT_24_8_WEBGL,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F&&(f.depth=i(A,z,I,A.UNSIGNED_SHORT,A.DEPTH_COMPONENT,A.DEPTH_ATTACHMENT)):F&&B?f._depth_rb=w(A,z,I,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F?f._depth_rb=w(A,z,I,A.DEPTH_COMPONENT16,A.DEPTH_ATTACHMENT):B&&(f._depth_rb=w(A,z,I,A.STENCIL_INDEX,A.STENCIL_ATTACHMENT));var Z=A.checkFramebufferStatus(A.FRAMEBUFFER);if(Z!==A.FRAMEBUFFER_COMPLETE){f._destroyed=!0,A.bindFramebuffer(A.FRAMEBUFFER,null),A.deleteFramebuffer(f.handle),f.handle=null,f.depth&&(f.depth.dispose(),f.depth=null),f._depth_rb&&(A.deleteRenderbuffer(f._depth_rb),f._depth_rb=null);for(var j=0;jz||A<0||A>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");f._shape[0]=u,f._shape[1]=A;for(var I=m(b),N=0;NI||A<0||A>I)throw new Error("gl-fbo: Parameters are too large for FBO");b=b||{};var N=1;if("color"in b){if(N=Math.max(b.color|0,0),N<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(N>1)if(z){if(N>f.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+N+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var R=f.UNSIGNED_BYTE,B=f.getExtension("OES_texture_float");if(b.float&&N>0){if(!B)throw new Error("gl-fbo: Context does not support floating point textures");R=f.FLOAT}else b.preferFloat&&N>0&&B&&(R=f.FLOAT);var F=!0;"depth"in b&&(F=!!b.depth);var P=!1;return"stencil"in b&&(P=!!b.stencil),new M(f,u,A,R,N,F,P,z)}},2992:function(l,e,t){var a=t(3387).sprintf,r=t(5171),n=t(1848),o=t(1085);l.exports=s;function s(c,m,h){"use strict";var p=n(m)||"of unknown name (see npm glsl-shader-name)",g="unknown type";h!==void 0&&(g=h===r.FRAGMENT_SHADER?"fragment":"vertex");for(var i=a(`Error compiling %s shader %s: -`,g,p),w=a("%s%s",i,c),S=c.split(` -`),M={},C=0;C1&&R.drawBuffersWEBGL(r[N]);var U=A.getExtension("WEBGL_depth_texture");U?B?h.depth=i(A,z,I,U.UNSIGNED_INT_24_8_WEBGL,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F&&(h.depth=i(A,z,I,A.UNSIGNED_SHORT,A.DEPTH_COMPONENT,A.DEPTH_ATTACHMENT)):F&&B?h._depth_rb=T(A,z,I,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F?h._depth_rb=T(A,z,I,A.DEPTH_COMPONENT16,A.DEPTH_ATTACHMENT):B&&(h._depth_rb=T(A,z,I,A.STENCIL_INDEX,A.STENCIL_ATTACHMENT));var Z=A.checkFramebufferStatus(A.FRAMEBUFFER);if(Z!==A.FRAMEBUFFER_COMPLETE){h._destroyed=!0,A.bindFramebuffer(A.FRAMEBUFFER,null),A.deleteFramebuffer(h.handle),h.handle=null,h.depth&&(h.depth.dispose(),h.depth=null),h._depth_rb&&(A.deleteRenderbuffer(h._depth_rb),h._depth_rb=null);for(var j=0;jz||A<0||A>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");h._shape[0]=u,h._shape[1]=A;for(var I=g(b),N=0;NI||A<0||A>I)throw new Error("gl-fbo: Parameters are too large for FBO");b=b||{};var N=1;if("color"in b){if(N=Math.max(b.color|0,0),N<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(N>1)if(z){if(N>h.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+N+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var R=h.UNSIGNED_BYTE,B=h.getExtension("OES_texture_float");if(b.float&&N>0){if(!B)throw new Error("gl-fbo: Context does not support floating point textures");R=h.FLOAT}else b.preferFloat&&N>0&&B&&(R=h.FLOAT);var F=!0;"depth"in b&&(F=!!b.depth);var P=!1;return"stencil"in b&&(P=!!b.stencil),new M(h,u,A,R,N,F,P,z)}},2992(l,e,t){var n=t(3387).sprintf,r=t(5171),a=t(1848),o=t(1085);l.exports=s;function s(c,g,f){"use strict";var p=a(g)||"of unknown name (see npm glsl-shader-name)",m="unknown type";f!==void 0&&(m=f===r.FRAGMENT_SHADER?"fragment":"vertex");for(var i=n(`Error compiling %s shader %s: +`,m,p),T=n("%s%s",i,c),S=c.split(` +`),M={},C=0;C0){for(var oe=0;oe<24;++oe)I.push(I[I.length-12]);F+=2,Q=!0}continue e}P[0][b]=Math.min(P[0][b],re[b],ae[b]),P[1][b]=Math.max(P[1][b],re[b],ae[b])}var H,X;Array.isArray(U[0])?(H=U.length>A-1?U[A-1]:U.length>0?U[U.length-1]:[0,0,0,1],X=U.length>A?U[A]:U.length>0?U[U.length-1]:[0,0,0,1]):H=X=U,H.length===3&&(H=[H[0],H[1],H[2],1]),X.length===3&&(X=[X[0],X[1],X[2],1]),!this.hasAlpha&&H[3]<1&&(this.hasAlpha=!0);var K;Array.isArray(Z)?K=Z.length>A-1?Z[A-1]:Z.length>0?Z[Z.length-1]:[0,0,0,1]:K=Z;var G=B;if(B+=S(re,ae),Q){for(b=0;b<2;++b)I.push(re[0],re[1],re[2],ae[0],ae[1],ae[2],G,K,H[0],H[1],H[2],H[3]);F+=2,Q=!1}I.push(re[0],re[1],re[2],ae[0],ae[1],ae[2],G,K,H[0],H[1],H[2],H[3],re[0],re[1],re[2],ae[0],ae[1],ae[2],G,-K,H[0],H[1],H[2],H[3],ae[0],ae[1],ae[2],re[0],re[1],re[2],B,-K,X[0],X[1],X[2],X[3],ae[0],ae[1],ae[2],re[0],re[1],re[2],B,K,X[0],X[1],X[2],X[3]),F+=4}}if(this.buffer.update(I),N.push(B),R.push(j[j.length-1].slice()),this.bounds=P,this.vertexCount=F,this.points=R,this.arcLength=N,"dashes"in u){var Y=u.dashes,q=Y.slice();for(q.unshift(0),A=1;A1.0001)return null;b+=A[C]}return Math.abs(b-1)>.001?null:[_,c(h,A),A]}},840:function(l,e,t){var a=t(3236),r=a([`precision highp float; +}`]),c=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];e.createShader=function(g){return r(g,a,o,null,c)},e.createPickShader=function(g){return r(g,a,s,null,c)}},5714(l,e,t){"use strict";l.exports=h;var n=t(2762),r=t(8116),a=t(7766),o=new Uint8Array(4),s=new Float32Array(o.buffer);function c(u,A,b,z){return o[0]=z,o[1]=b,o[2]=A,o[3]=u,s[0]}var g=t(2478),f=t(9618),p=t(7319),m=p.createShader,i=p.createPickShader,T=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function S(u,A){for(var b=0,z=0;z<3;++z){var I=u[z]-A[z];b+=I*I}return Math.sqrt(b)}function M(u){for(var A=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],b=0;b<3;++b)A[0][b]=Math.max(u[0][b],A[0][b]),A[1][b]=Math.min(u[1][b],A[1][b]);return A}function C(u,A,b,z){this.arcLength=u,this.position=A,this.index=b,this.dataCoordinate=z}function _(u,A,b,z,I,N){this.gl=u,this.shader=A,this.pickShader=b,this.buffer=z,this.vao=I,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=N,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var w=_.prototype;w.isTransparent=function(){return this.hasAlpha},w.isOpaque=function(){return!this.hasAlpha},w.pickSlots=1,w.setPickBase=function(u){this.pickId=u},w.drawTransparent=w.draw=function(u){if(this.vertexCount){var A=this.gl,b=this.shader,z=this.vao;b.bind(),b.uniforms={model:u.model||T,view:u.view||T,projection:u.projection||T,clipBounds:M(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(A.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},w.drawPick=function(u){if(this.vertexCount){var A=this.gl,b=this.pickShader,z=this.vao;b.bind(),b.uniforms={model:u.model||T,view:u.view||T,projection:u.projection||T,pickId:this.pickId,clipBounds:M(this.clipBounds),screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(A.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},w.update=function(u){var A,b;this.dirty=!0;var z=!!u.connectGaps;"dashScale"in u&&(this.dashScale=u.dashScale),this.hasAlpha=!1,"opacity"in u&&(this.opacity=+u.opacity,this.opacity<1&&(this.hasAlpha=!0));var I=[],N=[],R=[],B=0,F=0,P=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],j=u.position||u.positions;if(j){var U=u.color||u.colors||[0,0,0,1],Z=u.lineWidth||1,Q=!1;e:for(A=1;A0){for(var oe=0;oe<24;++oe)I.push(I[I.length-12]);F+=2,Q=!0}continue e}P[0][b]=Math.min(P[0][b],re[b],ne[b]),P[1][b]=Math.max(P[1][b],re[b],ne[b])}var V,$;Array.isArray(U[0])?(V=U.length>A-1?U[A-1]:U.length>0?U[U.length-1]:[0,0,0,1],$=U.length>A?U[A]:U.length>0?U[U.length-1]:[0,0,0,1]):V=$=U,V.length===3&&(V=[V[0],V[1],V[2],1]),$.length===3&&($=[$[0],$[1],$[2],1]),!this.hasAlpha&&V[3]<1&&(this.hasAlpha=!0);var K;Array.isArray(Z)?K=Z.length>A-1?Z[A-1]:Z.length>0?Z[Z.length-1]:[0,0,0,1]:K=Z;var G=B;if(B+=S(re,ne),Q){for(b=0;b<2;++b)I.push(re[0],re[1],re[2],ne[0],ne[1],ne[2],G,K,V[0],V[1],V[2],V[3]);F+=2,Q=!1}I.push(re[0],re[1],re[2],ne[0],ne[1],ne[2],G,K,V[0],V[1],V[2],V[3],re[0],re[1],re[2],ne[0],ne[1],ne[2],G,-K,V[0],V[1],V[2],V[3],ne[0],ne[1],ne[2],re[0],re[1],re[2],B,-K,$[0],$[1],$[2],$[3],ne[0],ne[1],ne[2],re[0],re[1],re[2],B,K,$[0],$[1],$[2],$[3]),F+=4}}if(this.buffer.update(I),N.push(B),R.push(j[j.length-1].slice()),this.bounds=P,this.vertexCount=F,this.points=R,this.arcLength=N,"dashes"in u){var X=u.dashes,q=X.slice();for(q.unshift(0),A=1;A1.0001)return null;b+=A[C]}return Math.abs(b-1)>.001?null:[_,c(f,A),A]}},840(l,e,t){var n=t(3236),r=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; @@ -900,7 +900,7 @@ void main() { f_data = position; f_uv = uv; } -`]),n=a([`#extension GL_OES_standard_derivatives : enable +`]),a=n([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 @@ -1005,7 +1005,7 @@ void main() { gl_FragColor = litColor * f_color.a; } -`]),o=a([`precision highp float; +`]),o=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1023,7 +1023,7 @@ void main() { f_color = color; f_data = position; f_uv = uv; -}`]),s=a([`precision highp float; +}`]),s=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1058,7 +1058,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),c=a([`precision highp float; +}`]),c=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1102,7 +1102,7 @@ void main() { gl_PointSize = pointSize; f_color = color; f_uv = uv; -}`]),m=a([`precision highp float; +}`]),g=n([`precision highp float; #define GLSLIFY 1 uniform sampler2D texture; @@ -1117,7 +1117,7 @@ void main() { discard; } gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),h=a([`precision highp float; +}`]),f=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1132,7 +1132,7 @@ void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_id = id; f_position = position; -}`]),p=a([`precision highp float; +}`]),p=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1165,7 +1165,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]),g=a([`precision highp float; +}`]),m=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1208,7 +1208,7 @@ void main() { } f_id = id; f_position = position; -}`]),i=a([`precision highp float; +}`]),i=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1217,7 +1217,7 @@ uniform mat4 model, view, projection; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); -}`]),w=a([`precision highp float; +}`]),T=n([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; @@ -1225,14 +1225,14 @@ uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } -`]);e.meshShader={vertex:r,fragment:n,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:c,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:h,fragment:p,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:g,fragment:p,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:i,fragment:w,attributes:[{name:"position",type:"vec3"}]}},7201:function(l,e,t){"use strict";var a=1e-6,r=1e-6,n=t(9405),o=t(2762),s=t(8116),c=t(7766),m=t(8406),h=t(6760),p=t(7608),g=t(9618),i=t(6729),w=t(7765),S=t(1888),M=t(840),C=t(7626),_=M.meshShader,T=M.wireShader,f=M.pointShader,u=M.pickShader,A=M.pointPickShader,b=M.contourShader,z=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function I(oe,H,X,K,G,Y,q,$,ee,ne,fe,ye,xe,Ae,Me,Ie,Ue,qe,ke,ge,ue,ve,se,Te,Fe,We,Ge){this.gl=oe,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=H,this.dirty=!0,this.triShader=X,this.lineShader=K,this.pointShader=G,this.pickShader=Y,this.pointPickShader=q,this.contourShader=$,this.trianglePositions=ee,this.triangleColors=fe,this.triangleNormals=xe,this.triangleUVs=ye,this.triangleIds=ne,this.triangleVAO=Ae,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Me,this.edgeColors=Ue,this.edgeUVs=qe,this.edgeIds=Ie,this.edgeVAO=ke,this.edgeCount=0,this.pointPositions=ge,this.pointColors=ve,this.pointUVs=se,this.pointSizes=Te,this.pointIds=ue,this.pointVAO=Fe,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=We,this.contourVAO=Ge,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=z,this._view=z,this._projection=z,this._resolution=[1,1]}var N=I.prototype;N.isOpaque=function(){return!this.hasAlpha},N.isTransparent=function(){return this.hasAlpha},N.pickSlots=1,N.setPickBase=function(oe){this.pickId=oe};function R(oe,H){if(!H||!H.length)return 1;for(var X=0;Xoe&&X>0){var K=(H[X][0]-oe)/(H[X][0]-H[X-1][0]);return H[X][1]*(1-K)+K*H[X-1][1]}}return 1}function B(oe,H){for(var X=i({colormap:oe,nshades:256,format:"rgba"}),K=new Uint8Array(256*4),G=0;G<256;++G){for(var Y=X[G],q=0;q<3;++q)K[4*G+q]=Y[q];H?K[4*G+3]=255*R(G/255,H):K[4*G+3]=255*Y[3]}return g(K,[256,256,4],[4,0,1])}function F(oe){for(var H=oe.length,X=new Array(H),K=0;K0){var xe=this.triShader;xe.bind(),xe.uniforms=$,this.triangleVAO.bind(),H.drawArrays(H.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var xe=this.lineShader;xe.bind(),xe.uniforms=$,this.edgeVAO.bind(),H.lineWidth(this.lineWidth*this.pixelRatio),H.drawArrays(H.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var xe=this.pointShader;xe.bind(),xe.uniforms=$,this.pointVAO.bind(),H.drawArrays(H.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var xe=this.contourShader;xe.bind(),xe.uniforms=$,this.contourVAO.bind(),H.drawArrays(H.LINES,0,this.contourCount),this.contourVAO.unbind()}},N.drawPick=function(oe){oe=oe||{};for(var H=this.gl,X=oe.model||z,K=oe.view||z,G=oe.projection||z,Y=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)Y[0][q]=Math.max(Y[0][q],this.clipBounds[0][q]),Y[1][q]=Math.min(Y[1][q],this.clipBounds[1][q]);this._model=[].slice.call(X),this._view=[].slice.call(K),this._projection=[].slice.call(G),this._resolution=[H.drawingBufferWidth,H.drawingBufferHeight];var $={model:X,view:K,projection:G,clipBounds:Y,pickId:this.pickId/255},ee=this.pickShader;if(ee.bind(),ee.uniforms=$,this.triangleCount>0&&(this.triangleVAO.bind(),H.drawArrays(H.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),H.lineWidth(this.lineWidth*this.pixelRatio),H.drawArrays(H.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ee=this.pointPickShader;ee.bind(),ee.uniforms=$,this.pointVAO.bind(),H.drawArrays(H.POINTS,0,this.pointCount),this.pointVAO.unbind()}},N.pick=function(oe){if(!oe||oe.id!==this.pickId)return null;for(var H=oe.value[0]+256*oe.value[1]+65536*oe.value[2],X=this.cells[H],K=this.positions,G=new Array(X.length),Y=0;YMath.abs(u))i.rotate(z,0,0,-f*A*Math.PI*_.rotateSpeed/window.innerWidth);else if(!_._ortho){var I=-_.zoomSpeed*b*u/window.innerHeight*(z-i.lastT())/20;i.pan(z,0,0,S*(Math.exp(I)-1))}}},!0)},_.enableMouseListeners(),_}},799:function(l,e,t){var a=t(3236),r=t(9405),n=a([`precision mediump float; +`]);e.meshShader={vertex:r,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:c,fragment:g,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:f,fragment:p,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:m,fragment:p,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:i,fragment:T,attributes:[{name:"position",type:"vec3"}]}},7201(l,e,t){"use strict";var n=1e-6,r=1e-6,a=t(9405),o=t(2762),s=t(8116),c=t(7766),g=t(8406),f=t(6760),p=t(7608),m=t(9618),i=t(6729),T=t(7765),S=t(1888),M=t(840),C=t(7626),_=M.meshShader,w=M.wireShader,h=M.pointShader,u=M.pickShader,A=M.pointPickShader,b=M.contourShader,z=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function I(oe,V,$,K,G,X,q,W,ee,ae,fe,ye,xe,Ae,Me,Ie,qe,je,ke,ge,le,ve,se,Te,Fe,We,Ge){this.gl=oe,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=V,this.dirty=!0,this.triShader=$,this.lineShader=K,this.pointShader=G,this.pickShader=X,this.pointPickShader=q,this.contourShader=W,this.trianglePositions=ee,this.triangleColors=fe,this.triangleNormals=xe,this.triangleUVs=ye,this.triangleIds=ae,this.triangleVAO=Ae,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Me,this.edgeColors=qe,this.edgeUVs=je,this.edgeIds=Ie,this.edgeVAO=ke,this.edgeCount=0,this.pointPositions=ge,this.pointColors=ve,this.pointUVs=se,this.pointSizes=Te,this.pointIds=le,this.pointVAO=Fe,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=We,this.contourVAO=Ge,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=z,this._view=z,this._projection=z,this._resolution=[1,1]}var N=I.prototype;N.isOpaque=function(){return!this.hasAlpha},N.isTransparent=function(){return this.hasAlpha},N.pickSlots=1,N.setPickBase=function(oe){this.pickId=oe};function R(oe,V){if(!V||!V.length)return 1;for(var $=0;$oe&&$>0){var K=(V[$][0]-oe)/(V[$][0]-V[$-1][0]);return V[$][1]*(1-K)+K*V[$-1][1]}}return 1}function B(oe,V){for(var $=i({colormap:oe,nshades:256,format:"rgba"}),K=new Uint8Array(256*4),G=0;G<256;++G){for(var X=$[G],q=0;q<3;++q)K[4*G+q]=X[q];V?K[4*G+3]=255*R(G/255,V):K[4*G+3]=255*X[3]}return m(K,[256,256,4],[4,0,1])}function F(oe){for(var V=oe.length,$=new Array(V),K=0;K0){var xe=this.triShader;xe.bind(),xe.uniforms=W,this.triangleVAO.bind(),V.drawArrays(V.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var xe=this.lineShader;xe.bind(),xe.uniforms=W,this.edgeVAO.bind(),V.lineWidth(this.lineWidth*this.pixelRatio),V.drawArrays(V.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var xe=this.pointShader;xe.bind(),xe.uniforms=W,this.pointVAO.bind(),V.drawArrays(V.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var xe=this.contourShader;xe.bind(),xe.uniforms=W,this.contourVAO.bind(),V.drawArrays(V.LINES,0,this.contourCount),this.contourVAO.unbind()}},N.drawPick=function(oe){oe=oe||{};for(var V=this.gl,$=oe.model||z,K=oe.view||z,G=oe.projection||z,X=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)X[0][q]=Math.max(X[0][q],this.clipBounds[0][q]),X[1][q]=Math.min(X[1][q],this.clipBounds[1][q]);this._model=[].slice.call($),this._view=[].slice.call(K),this._projection=[].slice.call(G),this._resolution=[V.drawingBufferWidth,V.drawingBufferHeight];var W={model:$,view:K,projection:G,clipBounds:X,pickId:this.pickId/255},ee=this.pickShader;if(ee.bind(),ee.uniforms=W,this.triangleCount>0&&(this.triangleVAO.bind(),V.drawArrays(V.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),V.lineWidth(this.lineWidth*this.pixelRatio),V.drawArrays(V.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ee=this.pointPickShader;ee.bind(),ee.uniforms=W,this.pointVAO.bind(),V.drawArrays(V.POINTS,0,this.pointCount),this.pointVAO.unbind()}},N.pick=function(oe){if(!oe||oe.id!==this.pickId)return null;for(var V=oe.value[0]+256*oe.value[1]+65536*oe.value[2],$=this.cells[V],K=this.positions,G=new Array($.length),X=0;X<$.length;++X)G[X]=K[$[X]];var q=oe.coord[0],W=oe.coord[1];if(!this.pickVertex){var ee=this.positions[$[0]],ae=this.positions[$[1]],fe=this.positions[$[2]],ye=[(ee[0]+ae[0]+fe[0])/3,(ee[1]+ae[1]+fe[1])/3,(ee[2]+ae[2]+fe[2])/3];return{_cellCenter:!0,position:[q,W],index:V,cell:$,cellId:V,intensity:this.intensity[V],dataCoordinate:ye}}var xe=C(G,[q*this.pixelRatio,this._resolution[1]-W*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!xe)return null;for(var Ae=xe[2],Me=0,X=0;X<$.length;++X)Me+=Ae[X]*this.intensity[$[X]];return{position:xe[1],index:$[xe[0]],cell:$,cellId:V,intensity:Me,dataCoordinate:this.positions[$[xe[0]]]}},N.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()};function P(oe){var V=a(oe,_.vertex,_.fragment);return V.attributes.position.location=0,V.attributes.color.location=2,V.attributes.uv.location=3,V.attributes.normal.location=4,V}function j(oe){var V=a(oe,w.vertex,w.fragment);return V.attributes.position.location=0,V.attributes.color.location=2,V.attributes.uv.location=3,V}function U(oe){var V=a(oe,h.vertex,h.fragment);return V.attributes.position.location=0,V.attributes.color.location=2,V.attributes.uv.location=3,V.attributes.pointSize.location=4,V}function Z(oe){var V=a(oe,u.vertex,u.fragment);return V.attributes.position.location=0,V.attributes.id.location=1,V}function Q(oe){var V=a(oe,A.vertex,A.fragment);return V.attributes.position.location=0,V.attributes.id.location=1,V.attributes.pointSize.location=4,V}function re(oe){var V=a(oe,b.vertex,b.fragment);return V.attributes.position.location=0,V}function ne(oe,V){arguments.length===1&&(V=oe,oe=V.gl);var $=oe.getExtension("OES_standard_derivatives")||oe.getExtension("MOZ_OES_standard_derivatives")||oe.getExtension("WEBKIT_OES_standard_derivatives");if(!$)throw new Error("derivatives not supported");var K=P(oe),G=j(oe),X=U(oe),q=Z(oe),W=Q(oe),ee=re(oe),ae=c(oe,m(new Uint8Array([255,255,255,255]),[1,1,4]));ae.generateMipmap(),ae.minFilter=oe.LINEAR_MIPMAP_LINEAR,ae.magFilter=oe.LINEAR;var fe=o(oe),ye=o(oe),xe=o(oe),Ae=o(oe),Me=o(oe),Ie=s(oe,[{buffer:fe,type:oe.FLOAT,size:3},{buffer:Me,type:oe.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:ye,type:oe.FLOAT,size:4},{buffer:xe,type:oe.FLOAT,size:2},{buffer:Ae,type:oe.FLOAT,size:3}]),qe=o(oe),je=o(oe),ke=o(oe),ge=o(oe),le=s(oe,[{buffer:qe,type:oe.FLOAT,size:3},{buffer:ge,type:oe.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:je,type:oe.FLOAT,size:4},{buffer:ke,type:oe.FLOAT,size:2}]),ve=o(oe),se=o(oe),Te=o(oe),Fe=o(oe),We=o(oe),Ge=s(oe,[{buffer:ve,type:oe.FLOAT,size:3},{buffer:We,type:oe.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:se,type:oe.FLOAT,size:4},{buffer:Te,type:oe.FLOAT,size:2},{buffer:Fe,type:oe.FLOAT,size:1}]),gt=o(oe),mt=s(oe,[{buffer:gt,type:oe.FLOAT,size:3}]),Tt=new I(oe,ae,K,G,X,q,W,ee,fe,Me,ye,xe,Ae,Ie,qe,ge,je,ke,le,ve,We,se,Te,Fe,Ge,gt,mt);return Tt.update(V),Tt}l.exports=ne},4437(l,e,t){"use strict";l.exports=g;var n=t(3025),r=t(6296),a=t(351),o=t(8512),s=t(24),c=t(7520);function g(f,p){f=f||document.body,p=p||{};var m=[.01,1/0];"distanceLimits"in p&&(m[0]=p.distanceLimits[0],m[1]=p.distanceLimits[1]),"zoomMin"in p&&(m[0]=p.zoomMin),"zoomMax"in p&&(m[1]=p.zoomMax);var i=r({center:p.center||[0,0,0],up:p.up||[0,1,0],eye:p.eye||[0,0,10],mode:p.mode||"orbit",distanceLimits:m}),T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S=0,M=f.clientWidth,C=f.clientHeight,_={keyBindingMode:"rotate",enableWheel:!0,view:i,element:f,delay:p.delay||16,rotateSpeed:p.rotateSpeed||1,zoomSpeed:p.zoomSpeed||1,translateSpeed:p.translateSpeed||1,flipX:!!p.flipX,flipY:!!p.flipY,modes:i.modes,_ortho:p._ortho||p.projection&&p.projection.type==="orthographic"||!1,tick:function(){var w=n(),h=this.delay,u=w-2*h;i.idle(w-h),i.recalcMatrix(u),i.flush(w-(100+h*2));for(var A=!0,b=i.computedMatrix,z=0;z<16;++z)A=A&&T[z]===b[z],T[z]=b[z];var I=f.clientWidth===M&&f.clientHeight===C;return M=f.clientWidth,C=f.clientHeight,A?!I:(S=Math.exp(i.computedRadius[0]),!0)},lookAt:function(w,h,u){i.lookAt(i.lastT(),w,h,u)},rotate:function(w,h,u){i.rotate(i.lastT(),w,h,u)},pan:function(w,h,u){i.pan(i.lastT(),w,h,u)},translate:function(w,h,u){i.translate(i.lastT(),w,h,u)}};return Object.defineProperties(_,{matrix:{get:function(){return i.computedMatrix},set:function(w){return i.setMatrix(i.lastT(),w),i.computedMatrix},enumerable:!0},mode:{get:function(){return i.getMode()},set:function(w){var h=i.computedUp.slice(),u=i.computedEye.slice(),A=i.computedCenter.slice();if(i.setMode(w),w==="turntable"){var b=n();i._active.lookAt(b,u,A,h),i._active.lookAt(b+500,u,A,[0,0,1]),i._active.flush(b)}return i.getMode()},enumerable:!0},center:{get:function(){return i.computedCenter},set:function(w){return i.lookAt(i.lastT(),null,w),i.computedCenter},enumerable:!0},eye:{get:function(){return i.computedEye},set:function(w){return i.lookAt(i.lastT(),w),i.computedEye},enumerable:!0},up:{get:function(){return i.computedUp},set:function(w){return i.lookAt(i.lastT(),null,null,w),i.computedUp},enumerable:!0},distance:{get:function(){return S},set:function(w){return i.setDistance(i.lastT(),w),w},enumerable:!0},distanceLimits:{get:function(){return i.getDistanceLimits(m)},set:function(w){return i.setDistanceLimits(w),w},enumerable:!0}}),f.addEventListener("contextmenu",function(w){return w.preventDefault(),!1}),_._lastX=-1,_._lastY=-1,_._lastMods={shift:!1,control:!1,alt:!1,meta:!1},_.enableMouseListeners=function(){_.mouseListener=a(f,w),f.addEventListener("touchstart",function(h){var u=s(h.changedTouches[0],f);w(0,u[0],u[1],_._lastMods),w(1,u[0],u[1],_._lastMods)},c?{passive:!0}:!1),f.addEventListener("touchmove",function(h){var u=s(h.changedTouches[0],f);w(1,u[0],u[1],_._lastMods),h.preventDefault()},c?{passive:!1}:!1),f.addEventListener("touchend",function(h){w(0,_._lastX,_._lastY,_._lastMods)},c?{passive:!0}:!1);function w(h,u,A,b){var z=_.keyBindingMode;if(z!==!1){var I=z==="rotate",N=z==="pan",R=z==="zoom",B=!!b.control,F=!!b.alt,P=!!b.shift,j=!!(h&1),U=!!(h&2),Z=!!(h&4),Q=1/f.clientHeight,re=Q*(u-_._lastX),ne=Q*(A-_._lastY),oe=_.flipX?1:-1,V=_.flipY?1:-1,$=Math.PI*_.rotateSpeed,K=n();if(_._lastX!==-1&&_._lastY!==-1&&((I&&j&&!B&&!F&&!P||j&&!B&&!F&&P)&&i.rotate(K,oe*$*re,-V*$*ne,0),(N&&j&&!B&&!F&&!P||U||j&&B&&!F&&!P)&&i.pan(K,-_.translateSpeed*re*S,_.translateSpeed*ne*S,0),R&&j&&!B&&!F&&!P||Z||j&&!B&&F&&!P)){var G=-_.zoomSpeed*ne/window.innerHeight*(K-i.lastT())*100;i.pan(K,0,0,S*(Math.exp(G)-1))}return _._lastX=u,_._lastY=A,_._lastMods=b,!0}}_.wheelListener=o(f,function(h,u){if(_.keyBindingMode!==!1&&_.enableWheel){var A=_.flipX?1:-1,b=_.flipY?1:-1,z=n();if(Math.abs(h)>Math.abs(u))i.rotate(z,0,0,-h*A*Math.PI*_.rotateSpeed/window.innerWidth);else if(!_._ortho){var I=-_.zoomSpeed*b*u/window.innerHeight*(z-i.lastT())/20;i.pan(z,0,0,S*(Math.exp(I)-1))}}},!0)},_.enableMouseListeners(),_}},799(l,e,t){var n=t(3236),r=t(9405),a=n([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; void main() { uv = position; gl_Position = vec4(position, 0, 1); -}`]),o=a([`precision mediump float; +}`]),o=n([`precision mediump float; #define GLSLIFY 1 uniform sampler2D accumBuffer; @@ -1241,7 +1241,7 @@ varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); -}`]);l.exports=function(s){return r(s,n,o,null,[{name:"position",type:"vec2"}])}},4100:function(l,e,t){"use strict";var a=t(4437),r=t(3837),n=t(5445),o=t(4449),s=t(3589),c=t(2260),m=t(7169),h=t(351),p=t(4772),g=t(4040),i=t(799),w=t(9216)({tablet:!0,featureDetect:!0});l.exports={createScene:T,createCamera:a};function S(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function M(u,A){var b=null;try{b=u.getContext("webgl",A),b||(b=u.getContext("experimental-webgl",A))}catch{return null}return b}function C(u){var A=Math.round(Math.log(Math.abs(u))/Math.log(10));if(A<0){var b=Math.round(Math.pow(10,-A));return Math.ceil(u*b)/b}else if(A>0){var b=Math.round(Math.pow(10,A));return Math.ceil(u/b)*b}return Math.ceil(u)}function _(u){return typeof u=="boolean"?u:!0}function T(u){u=u||{},u.camera=u.camera||{};var A=u.canvas;if(!A)if(A=document.createElement("canvas"),u.container){var b=u.container;b.appendChild(A)}else document.body.appendChild(A);var z=u.gl;if(z||(u.glOptions&&(w=!!u.glOptions.preserveDrawingBuffer),z=M(A,u.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:w})),!z)throw new Error("webgl not supported");var I=u.bounds||[[-10,-10,-10],[10,10,10]],N=new S,R=c(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!w}),B=i(z),F=u.cameraObject&&u.cameraObject._ortho===!0||u.camera.projection&&u.camera.projection.type==="orthographic"||!1,P={eye:u.camera.eye||[2,0,0],center:u.camera.center||[0,0,0],up:u.camera.up||[0,1,0],zoomMin:u.camera.zoomMax||.1,zoomMax:u.camera.zoomMin||100,mode:u.camera.mode||"turntable",_ortho:F},j=u.axes||{},U=r(z,j);U.enable=!j.disable;var Z=u.spikes||{},Q=o(z,Z),re=[],ae=[],oe=[],H=[],X=!0,q=!0,K=new Array(16),G=new Array(16),Y={view:null,projection:K,model:G,_ortho:!1},q=!0,$=[z.drawingBufferWidth,z.drawingBufferHeight],ee=u.cameraObject||a(A,P),ne={gl:z,contextLost:!1,pixelRatio:u.pixelRatio||1,canvas:A,selection:N,camera:ee,axes:U,axesPixels:null,spikes:Q,bounds:I,objects:re,shape:$,aspect:u.aspectRatio||[1,1,1],pickRadius:u.pickRadius||10,zNear:u.zNear||.01,zFar:u.zFar||1e3,fovy:u.fovy||Math.PI/4,clearColor:u.clearColor||[0,0,0,0],autoResize:_(u.autoResize),autoBounds:_(u.autoBounds),autoScale:!!u.autoScale,autoCenter:_(u.autoCenter),clipToBounds:_(u.clipToBounds),snapToData:!!u.snapToData,onselect:u.onselect||null,onrender:u.onrender||null,onclick:u.onclick||null,cameraParams:Y,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(ge){this.aspect[0]=ge.x,this.aspect[1]=ge.y,this.aspect[2]=ge.z,q=!0},setBounds:function(ge,ue){this.bounds[0][ge]=ue.min,this.bounds[1][ge]=ue.max},setClearColor:function(ge){this.clearColor=ge},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)}},fe=[z.drawingBufferWidth/ne.pixelRatio|0,z.drawingBufferHeight/ne.pixelRatio|0];function ye(){if(!ne._stopped&&ne.autoResize){var ge=A.parentNode,ue=1,ve=1;ge&&ge!==document.body?(ue=ge.clientWidth,ve=ge.clientHeight):(ue=window.innerWidth,ve=window.innerHeight);var se=Math.ceil(ue*ne.pixelRatio)|0,Te=Math.ceil(ve*ne.pixelRatio)|0;if(se!==A.width||Te!==A.height){A.width=se,A.height=Te;var Fe=A.style;Fe.position=Fe.position||"absolute",Fe.left="0px",Fe.top="0px",Fe.width=ue+"px",Fe.height=ve+"px",X=!0}}}ne.autoResize&&ye(),window.addEventListener("resize",ye);function xe(){for(var ge=re.length,ue=H.length,ve=0;ve0&&oe[ue-1]===0;)oe.pop(),H.pop().dispose()}ne.update=function(ge){ne._stopped||(ge=ge||{},X=!0,q=!0)},ne.add=function(ge){ne._stopped||(ge.axes=U,re.push(ge),ae.push(-1),X=!0,q=!0,xe())},ne.remove=function(ge){if(!ne._stopped){var ue=re.indexOf(ge);ue<0||(re.splice(ue,1),ae.pop(),X=!0,q=!0,xe())}},ne.dispose=function(){if(!ne._stopped&&(ne._stopped=!0,window.removeEventListener("resize",ye),A.removeEventListener("webglcontextlost",Ae),ne.mouseListener.enabled=!1,!ne.contextLost)){U.dispose(),Q.dispose();for(var ge=0;geN.distance)continue;for(var mt=0;mt1e-6?(w=Math.acos(S),M=Math.sin(w),C=Math.sin((1-n)*w)/M,_=Math.sin(n*w)/M):(C=1-n,_=n),t[0]=C*o+_*h,t[1]=C*s+_*p,t[2]=C*c+_*g,t[3]=C*m+_*i,t}},5964:function(l){"use strict";l.exports=function(e){return!e&&e!==0?"":e.toString()}},9366:function(l,e,t){"use strict";var a=t(4359);l.exports=n;var r={};function n(o,s,c){var m=[s.style,s.weight,s.variant,s.family].join("_"),h=r[m];if(h||(h=r[m]={}),o in h)return h[o];var p={textAlign:"center",textBaseline:"middle",lineHeight:1,font:s.family,fontStyle:s.style,fontWeight:s.weight,fontVariant:s.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};p.triangles=!0;var g=a(o,p);p.triangles=!1;var i=a(o,p),w,S;if(c&&c!==1){for(w=0;w0){var b=Math.round(Math.pow(10,A));return Math.ceil(u/b)*b}return Math.ceil(u)}function _(u){return typeof u=="boolean"?u:!0}function w(u){u=u||{},u.camera=u.camera||{};var A=u.canvas;if(!A)if(A=document.createElement("canvas"),u.container){var b=u.container;b.appendChild(A)}else document.body.appendChild(A);var z=u.gl;if(z||(u.glOptions&&(T=!!u.glOptions.preserveDrawingBuffer),z=M(A,u.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:T})),!z)throw new Error("webgl not supported");var I=u.bounds||[[-10,-10,-10],[10,10,10]],N=new S,R=c(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!T}),B=i(z),F=u.cameraObject&&u.cameraObject._ortho===!0||u.camera.projection&&u.camera.projection.type==="orthographic"||!1,P={eye:u.camera.eye||[2,0,0],center:u.camera.center||[0,0,0],up:u.camera.up||[0,1,0],zoomMin:u.camera.zoomMax||.1,zoomMax:u.camera.zoomMin||100,mode:u.camera.mode||"turntable",_ortho:F},j=u.axes||{},U=r(z,j);U.enable=!j.disable;var Z=u.spikes||{},Q=o(z,Z),re=[],ne=[],oe=[],V=[],$=!0,q=!0,K=new Array(16),G=new Array(16),X={view:null,projection:K,model:G,_ortho:!1},q=!0,W=[z.drawingBufferWidth,z.drawingBufferHeight],ee=u.cameraObject||n(A,P),ae={gl:z,contextLost:!1,pixelRatio:u.pixelRatio||1,canvas:A,selection:N,camera:ee,axes:U,axesPixels:null,spikes:Q,bounds:I,objects:re,shape:W,aspect:u.aspectRatio||[1,1,1],pickRadius:u.pickRadius||10,zNear:u.zNear||.01,zFar:u.zFar||1e3,fovy:u.fovy||Math.PI/4,clearColor:u.clearColor||[0,0,0,0],autoResize:_(u.autoResize),autoBounds:_(u.autoBounds),autoScale:!!u.autoScale,autoCenter:_(u.autoCenter),clipToBounds:_(u.clipToBounds),snapToData:!!u.snapToData,onselect:u.onselect||null,onrender:u.onrender||null,onclick:u.onclick||null,cameraParams:X,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(ge){this.aspect[0]=ge.x,this.aspect[1]=ge.y,this.aspect[2]=ge.z,q=!0},setBounds:function(ge,le){this.bounds[0][ge]=le.min,this.bounds[1][ge]=le.max},setClearColor:function(ge){this.clearColor=ge},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)}},fe=[z.drawingBufferWidth/ae.pixelRatio|0,z.drawingBufferHeight/ae.pixelRatio|0];function ye(){if(!ae._stopped&&ae.autoResize){var ge=A.parentNode,le=1,ve=1;ge&&ge!==document.body?(le=ge.clientWidth,ve=ge.clientHeight):(le=window.innerWidth,ve=window.innerHeight);var se=Math.ceil(le*ae.pixelRatio)|0,Te=Math.ceil(ve*ae.pixelRatio)|0;if(se!==A.width||Te!==A.height){A.width=se,A.height=Te;var Fe=A.style;Fe.position=Fe.position||"absolute",Fe.left="0px",Fe.top="0px",Fe.width=le+"px",Fe.height=ve+"px",$=!0}}}ae.autoResize&&ye(),window.addEventListener("resize",ye);function xe(){for(var ge=re.length,le=V.length,ve=0;ve0&&oe[le-1]===0;)oe.pop(),V.pop().dispose()}ae.update=function(ge){ae._stopped||(ge=ge||{},$=!0,q=!0)},ae.add=function(ge){ae._stopped||(ge.axes=U,re.push(ge),ne.push(-1),$=!0,q=!0,xe())},ae.remove=function(ge){if(!ae._stopped){var le=re.indexOf(ge);le<0||(re.splice(le,1),ne.pop(),$=!0,q=!0,xe())}},ae.dispose=function(){if(!ae._stopped&&(ae._stopped=!0,window.removeEventListener("resize",ye),A.removeEventListener("webglcontextlost",Ae),ae.mouseListener.enabled=!1,!ae.contextLost)){U.dispose(),Q.dispose();for(var ge=0;geN.distance)continue;for(var mt=0;mt1e-6?(T=Math.acos(S),M=Math.sin(T),C=Math.sin((1-a)*T)/M,_=Math.sin(a*T)/M):(C=1-a,_=a),t[0]=C*o+_*f,t[1]=C*s+_*p,t[2]=C*c+_*m,t[3]=C*g+_*i,t}},5964(l){"use strict";l.exports=function(e){return!e&&e!==0?"":e.toString()}},9366(l,e,t){"use strict";var n=t(4359);l.exports=a;var r={};function a(o,s,c){var g=[s.style,s.weight,s.variant,s.family].join("_"),f=r[g];if(f||(f=r[g]={}),o in f)return f[o];var p={textAlign:"center",textBaseline:"middle",lineHeight:1,font:s.family,fontStyle:s.style,fontWeight:s.weight,fontVariant:s.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};p.triangles=!0;var m=n(o,p);p.triangles=!1;var i=n(o,p),T,S;if(c&&c!==1){for(T=0;T1?1:G}function f(G,Y,q,$,ee,ne,fe,ye,xe,Ae,Me,Ie){this.gl=G,this.pixelRatio=1,this.shader=Y,this.orthoShader=q,this.projectShader=$,this.pointBuffer=ee,this.colorBuffer=ne,this.glyphBuffer=fe,this.idBuffer=ye,this.vao=xe,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=Ae,this.pickOrthoShader=Me,this.pickProjectShader=Ie,this.points=[],this._selectResult=new _(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var u=f.prototype;u.pickSlots=1,u.setPickBase=function(G){this.pickId=G},u.isTransparent=function(){if(this.hasAlpha)return!0;for(var G=0;G<3;++G)if(this.axesProject[G]&&this.projectHasAlpha)return!0;return!1},u.isOpaque=function(){if(!this.hasAlpha)return!0;for(var G=0;G<3;++G)if(this.axesProject[G]&&!this.projectHasAlpha)return!0;return!1};var A=[0,0],b=[0,0,0],z=[0,0,0],I=[0,0,0,1],N=[0,0,0,1],R=p.slice(),B=[0,0,0],F=[[0,0,0],[0,0,0]];function P(G){return G[0]=G[1]=G[2]=0,G}function j(G,Y){return G[0]=Y[0],G[1]=Y[1],G[2]=Y[2],G[3]=1,G}function U(G,Y,q,$){return G[0]=Y[0],G[1]=Y[1],G[2]=Y[2],G[q]=$,G}function Z(G){for(var Y=F,q=0;q<2;++q)for(var $=0;$<3;++$)Y[q][$]=Math.max(Math.min(G[q][$],1e8),-1e8);return Y}function Q(G,Y,q,$){var ee=Y.axesProject,ne=Y.gl,fe=G.uniforms,ye=q.model||p,xe=q.view||p,Ae=q.projection||p,Me=Y.axesBounds,Ie=Z(Y.clipBounds),Ue;Y.axes&&Y.axes.lastCubeProps?Ue=Y.axes.lastCubeProps.axis:Ue=[1,1,1],A[0]=2/ne.drawingBufferWidth,A[1]=2/ne.drawingBufferHeight,G.bind(),fe.view=xe,fe.projection=Ae,fe.screenSize=A,fe.highlightId=Y.highlightId,fe.highlightScale=Y.highlightScale,fe.clipBounds=Ie,fe.pickGroup=Y.pickId/255,fe.pixelRatio=$;for(var qe=0;qe<3;++qe)if(ee[qe]){fe.scale=Y.projectScale[qe],fe.opacity=Y.projectOpacity[qe];for(var ke=R,ge=0;ge<16;++ge)ke[ge]=0;for(var ge=0;ge<4;++ge)ke[5*ge]=1;ke[5*qe]=0,Ue[qe]<0?ke[12+qe]=Me[0][qe]:ke[12+qe]=Me[1][qe],s(ke,ye,ke),fe.model=ke;var ue=(qe+1)%3,ve=(qe+2)%3,se=P(b),Te=P(z);se[ue]=1,Te[ve]=1;var Fe=C(Ae,xe,ye,j(I,se)),We=C(Ae,xe,ye,j(N,Te));if(Math.abs(Fe[1])>Math.abs(We[1])){var Ge=Fe;Fe=We,We=Ge,Ge=se,se=Te,Te=Ge;var gt=ue;ue=ve,ve=gt}Fe[0]<0&&(se[ue]=-1),We[1]>0&&(Te[ve]=-1);for(var mt=0,Tt=0,ge=0;ge<4;++ge)mt+=Math.pow(ye[4*ue+ge],2),Tt+=Math.pow(ye[4*ve+ge],2);se[ue]/=Math.sqrt(mt),Te[ve]/=Math.sqrt(Tt),fe.axes[0]=se,fe.axes[1]=Te,fe.fragClipBounds[0]=U(B,Ie[0],qe,-1e8),fe.fragClipBounds[1]=U(B,Ie[1],qe,1e8),Y.vao.bind(),Y.vao.draw(ne.TRIANGLES,Y.vertexCount),Y.lineWidth>0&&(ne.lineWidth(Y.lineWidth*$),Y.vao.draw(ne.LINES,Y.lineVertexCount,Y.vertexCount)),Y.vao.unbind()}}var re=[-1e8,-1e8,-1e8],ae=[1e8,1e8,1e8],oe=[re,ae];function H(G,Y,q,$,ee,ne,fe){var ye=q.gl;if((ne===q.projectHasAlpha||fe)&&Q(Y,q,$,ee),ne===q.hasAlpha||fe){G.bind();var xe=G.uniforms;xe.model=$.model||p,xe.view=$.view||p,xe.projection=$.projection||p,A[0]=2/ye.drawingBufferWidth,A[1]=2/ye.drawingBufferHeight,xe.screenSize=A,xe.highlightId=q.highlightId,xe.highlightScale=q.highlightScale,xe.fragClipBounds=oe,xe.clipBounds=q.axes.bounds,xe.opacity=q.opacity,xe.pickGroup=q.pickId/255,xe.pixelRatio=ee,q.vao.bind(),q.vao.draw(ye.TRIANGLES,q.vertexCount),q.lineWidth>0&&(ye.lineWidth(q.lineWidth*ee),q.vao.draw(ye.LINES,q.lineVertexCount,q.vertexCount)),q.vao.unbind()}}u.draw=function(G){var Y=this.useOrtho?this.orthoShader:this.shader;H(Y,this.projectShader,this,G,this.pixelRatio,!1,!1)},u.drawTransparent=function(G){var Y=this.useOrtho?this.orthoShader:this.shader;H(Y,this.projectShader,this,G,this.pixelRatio,!0,!1)},u.drawPick=function(G){var Y=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;H(Y,this.pickProjectShader,this,G,1,!0,!0)},u.pick=function(G){if(!G||G.id!==this.pickId)return null;var Y=G.value[2]+(G.value[1]<<8)+(G.value[0]<<16);if(Y>=this.pointCount||Y<0)return null;var q=this.points[Y],$=this._selectResult;$.index=Y;for(var ee=0;ee<3;++ee)$.position[ee]=$.dataCoordinate[ee]=q[ee];return $},u.highlight=function(G){if(!G)this.highlightId=[1,1,1,1];else{var Y=G.index,q=Y&255,$=Y>>8&255,ee=Y>>16&255;this.highlightId=[q/255,$/255,ee/255,0]}};function X(G,Y,q,$){var ee;S(G)?Y0){var sr=0,Ot=ve,vt=[0,0,0,1],ht=[0,0,0,1],Re=S(Ue)&&S(Ue[0]),Be=S(ge)&&S(ge[0]);e:for(var $=0;$0?1-Tt[0][0]:Dt<0?1+Tt[1][0]:1,Ct*=Ct>0?1-Tt[0][1]:Ct<0?1+Tt[1][1]:1;for(var Vt=[Dt,Ct],$t=gt.cells||[],It=gt.positions||[],We=0;We<$t.length;++We)for(var Ht=$t[We],Wt=0;Wt<3;++Wt){for(var Sr=0;Sr<3;++Sr)Kt[3*sr+Sr]=Fe[Sr];for(var Sr=0;Sr<4;++Sr)nr[4*sr+Sr]=vt[Sr];Zt[sr]=ue;var on=It[Ht[Wt]];_r[2*sr]=Ze*(Mt*on[0]-dt*on[1]+Vt[0]),_r[2*sr+1]=Ze*(dt*on[0]+Mt*on[1]+Vt[1]),sr+=1}for(var $t=mt.edges,It=mt.positions,We=0;We<$t.length;++We)for(var Ht=$t[We],Wt=0;Wt<2;++Wt){for(var Sr=0;Sr<3;++Sr)Kt[3*Ot+Sr]=Fe[Sr];for(var Sr=0;Sr<4;++Sr)nr[4*Ot+Sr]=ht[Sr];Zt[Ot]=ue;var on=It[Ht[Wt]];_r[2*Ot]=Ze*(Mt*on[0]-dt*on[1]+Vt[0]),_r[2*Ot+1]=Ze*(dt*on[0]+Mt*on[1]+Vt[1]),Ot+=1}}}this.bounds=[Ae,Me],this.points=ee,this.pointCount=ee.length,this.vertexCount=ve,this.lineVertexCount=se,this.pointBuffer.update(Kt),this.colorBuffer.update(nr),this.glyphBuffer.update(_r),this.idBuffer.update(Zt),o.free(Kt),o.free(nr),o.free(_r),o.free(Zt)},u.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()};function K(G){var Y=G.gl,q=c.createPerspective(Y),$=c.createOrtho(Y),ee=c.createProject(Y),ne=c.createPickPerspective(Y),fe=c.createPickOrtho(Y),ye=c.createPickProject(Y),xe=r(Y),Ae=r(Y),Me=r(Y),Ie=r(Y),Ue=n(Y,[{buffer:xe,size:3,type:Y.FLOAT},{buffer:Ae,size:4,type:Y.FLOAT},{buffer:Me,size:2,type:Y.FLOAT},{buffer:Ie,size:4,type:Y.UNSIGNED_BYTE,normalized:!0}]),qe=new f(Y,q,$,ee,xe,Ae,Me,Ie,Ue,ne,fe,ye);return qe.update(G),qe}},3589:function(l,e,t){"use strict";l.exports=p;var a=t(2260),r=t(1888),n=t(9618),o=t(8828).nextPow2,s=function(g,i,w){for(var S=1e8,M=-1,C=-1,_=g.shape[0],T=g.shape[1],f=0;f<_;f++)for(var u=0;uthis.buffer.length){r.free(this.buffer);for(var S=this.buffer=r.mallocUint8(o(w*i*4)),M=0;MS)for(i=S;iw)for(i=w;i=0){for(var F=B.type.charAt(B.type.length-1)|0,P=new Array(F),j=0;j=0;)U+=1;N[R]=U}var Z=new Array(S.length);function Q(){_.program=o.program(T,_._vref,_._fref,I,N);for(var re=0;re=0){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new a("","Invalid data type for attribute "+_+": "+T);s(h,p,f[0],i,u,w,_)}else if(T.indexOf("mat")>=0){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new a("","Invalid data type for attribute "+_+": "+T);c(h,p,f,i,u,w,_)}else throw new a("","Unknown data type for attribute "+_+": "+T);break}}return w}},3327:function(l,e,t){"use strict";var a=t(216),r=t(8866);l.exports=s;function n(c){return function(){return c}}function o(c,m){for(var h=new Array(c),p=0;p4)throw new r("","Invalid data type");switch(U.charAt(0)){case"b":case"i":c["uniform"+Z+"iv"](p[N],R);break;case"v":c["uniform"+Z+"fv"](p[N],R);break;default:throw new r("","Unrecognized data type for vector "+name+": "+U)}}else if(U.indexOf("mat")===0&&U.length===4){if(Z=U.charCodeAt(U.length-1)-48,Z<2||Z>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+U);c["uniformMatrix"+Z+"fv"](p[N],!1,R);break}else throw new r("","Unknown uniform data type for "+name+": "+U)}}}}}function w(T,f){if(typeof f!="object")return[[T,f]];var u=[];for(var A in f){var b=f[A],z=T;parseInt(A)+""===A?z+="["+A+"]":z+="."+A,typeof b=="object"?u.push.apply(u,w(z,b)):u.push([z,b])}return u}function S(T){switch(T){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var f=T.indexOf("vec");if(0<=f&&f<=1&&T.length===4+f){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new r("","Invalid data type");return T.charAt(0)==="b"?o(u,!1):o(u,0)}else if(T.indexOf("mat")===0&&T.length===4){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+T);return o(u*u,0)}else throw new r("","Unknown uniform data type for "+name+": "+T)}}function M(T,f,u){if(typeof u=="object"){var A=C(u);Object.defineProperty(T,f,{get:n(A),set:i(u),enumerable:!0,configurable:!1})}else p[u]?Object.defineProperty(T,f,{get:g(u),set:i(u),enumerable:!0,configurable:!1}):T[f]=S(h[u].type)}function C(T){var f;if(Array.isArray(T)){f=new Array(T.length);for(var u=0;u1){h[0]in c||(c[h[0]]=[]),c=c[h[0]];for(var p=1;p1)for(var w=0;w"u"?t(606):WeakMap,o=new n,s=0;function c(M,C,_,T,f,u,A){this.id=M,this.src=C,this.type=_,this.shader=T,this.count=u,this.programs=[],this.cache=A}c.prototype.dispose=function(){if(--this.count===0){for(var M=this.cache,C=M.gl,_=this.programs,T=0,f=_.length;T1?1:G}function h(G,X,q,W,ee,ae,fe,ye,xe,Ae,Me,Ie){this.gl=G,this.pixelRatio=1,this.shader=X,this.orthoShader=q,this.projectShader=W,this.pointBuffer=ee,this.colorBuffer=ae,this.glyphBuffer=fe,this.idBuffer=ye,this.vao=xe,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=Ae,this.pickOrthoShader=Me,this.pickProjectShader=Ie,this.points=[],this._selectResult=new _(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var u=h.prototype;u.pickSlots=1,u.setPickBase=function(G){this.pickId=G},u.isTransparent=function(){if(this.hasAlpha)return!0;for(var G=0;G<3;++G)if(this.axesProject[G]&&this.projectHasAlpha)return!0;return!1},u.isOpaque=function(){if(!this.hasAlpha)return!0;for(var G=0;G<3;++G)if(this.axesProject[G]&&!this.projectHasAlpha)return!0;return!1};var A=[0,0],b=[0,0,0],z=[0,0,0],I=[0,0,0,1],N=[0,0,0,1],R=p.slice(),B=[0,0,0],F=[[0,0,0],[0,0,0]];function P(G){return G[0]=G[1]=G[2]=0,G}function j(G,X){return G[0]=X[0],G[1]=X[1],G[2]=X[2],G[3]=1,G}function U(G,X,q,W){return G[0]=X[0],G[1]=X[1],G[2]=X[2],G[q]=W,G}function Z(G){for(var X=F,q=0;q<2;++q)for(var W=0;W<3;++W)X[q][W]=Math.max(Math.min(G[q][W],1e8),-1e8);return X}function Q(G,X,q,W){var ee=X.axesProject,ae=X.gl,fe=G.uniforms,ye=q.model||p,xe=q.view||p,Ae=q.projection||p,Me=X.axesBounds,Ie=Z(X.clipBounds),qe;X.axes&&X.axes.lastCubeProps?qe=X.axes.lastCubeProps.axis:qe=[1,1,1],A[0]=2/ae.drawingBufferWidth,A[1]=2/ae.drawingBufferHeight,G.bind(),fe.view=xe,fe.projection=Ae,fe.screenSize=A,fe.highlightId=X.highlightId,fe.highlightScale=X.highlightScale,fe.clipBounds=Ie,fe.pickGroup=X.pickId/255,fe.pixelRatio=W;for(var je=0;je<3;++je)if(ee[je]){fe.scale=X.projectScale[je],fe.opacity=X.projectOpacity[je];for(var ke=R,ge=0;ge<16;++ge)ke[ge]=0;for(var ge=0;ge<4;++ge)ke[5*ge]=1;ke[5*je]=0,qe[je]<0?ke[12+je]=Me[0][je]:ke[12+je]=Me[1][je],s(ke,ye,ke),fe.model=ke;var le=(je+1)%3,ve=(je+2)%3,se=P(b),Te=P(z);se[le]=1,Te[ve]=1;var Fe=C(Ae,xe,ye,j(I,se)),We=C(Ae,xe,ye,j(N,Te));if(Math.abs(Fe[1])>Math.abs(We[1])){var Ge=Fe;Fe=We,We=Ge,Ge=se,se=Te,Te=Ge;var gt=le;le=ve,ve=gt}Fe[0]<0&&(se[le]=-1),We[1]>0&&(Te[ve]=-1);for(var mt=0,Tt=0,ge=0;ge<4;++ge)mt+=Math.pow(ye[4*le+ge],2),Tt+=Math.pow(ye[4*ve+ge],2);se[le]/=Math.sqrt(mt),Te[ve]/=Math.sqrt(Tt),fe.axes[0]=se,fe.axes[1]=Te,fe.fragClipBounds[0]=U(B,Ie[0],je,-1e8),fe.fragClipBounds[1]=U(B,Ie[1],je,1e8),X.vao.bind(),X.vao.draw(ae.TRIANGLES,X.vertexCount),X.lineWidth>0&&(ae.lineWidth(X.lineWidth*W),X.vao.draw(ae.LINES,X.lineVertexCount,X.vertexCount)),X.vao.unbind()}}var re=[-1e8,-1e8,-1e8],ne=[1e8,1e8,1e8],oe=[re,ne];function V(G,X,q,W,ee,ae,fe){var ye=q.gl;if((ae===q.projectHasAlpha||fe)&&Q(X,q,W,ee),ae===q.hasAlpha||fe){G.bind();var xe=G.uniforms;xe.model=W.model||p,xe.view=W.view||p,xe.projection=W.projection||p,A[0]=2/ye.drawingBufferWidth,A[1]=2/ye.drawingBufferHeight,xe.screenSize=A,xe.highlightId=q.highlightId,xe.highlightScale=q.highlightScale,xe.fragClipBounds=oe,xe.clipBounds=q.axes.bounds,xe.opacity=q.opacity,xe.pickGroup=q.pickId/255,xe.pixelRatio=ee,q.vao.bind(),q.vao.draw(ye.TRIANGLES,q.vertexCount),q.lineWidth>0&&(ye.lineWidth(q.lineWidth*ee),q.vao.draw(ye.LINES,q.lineVertexCount,q.vertexCount)),q.vao.unbind()}}u.draw=function(G){var X=this.useOrtho?this.orthoShader:this.shader;V(X,this.projectShader,this,G,this.pixelRatio,!1,!1)},u.drawTransparent=function(G){var X=this.useOrtho?this.orthoShader:this.shader;V(X,this.projectShader,this,G,this.pixelRatio,!0,!1)},u.drawPick=function(G){var X=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;V(X,this.pickProjectShader,this,G,1,!0,!0)},u.pick=function(G){if(!G||G.id!==this.pickId)return null;var X=G.value[2]+(G.value[1]<<8)+(G.value[0]<<16);if(X>=this.pointCount||X<0)return null;var q=this.points[X],W=this._selectResult;W.index=X;for(var ee=0;ee<3;++ee)W.position[ee]=W.dataCoordinate[ee]=q[ee];return W},u.highlight=function(G){if(!G)this.highlightId=[1,1,1,1];else{var X=G.index,q=X&255,W=X>>8&255,ee=X>>16&255;this.highlightId=[q/255,W/255,ee/255,0]}};function $(G,X,q,W){var ee;S(G)?X0){var sr=0,Ot=ve,vt=[0,0,0,1],ht=[0,0,0,1],Re=S(qe)&&S(qe[0]),Be=S(ge)&&S(ge[0]);e:for(var W=0;W0?1-Tt[0][0]:Dt<0?1+Tt[1][0]:1,Ct*=Ct>0?1-Tt[0][1]:Ct<0?1+Tt[1][1]:1;for(var Vt=[Dt,Ct],$t=gt.cells||[],It=gt.positions||[],We=0;We<$t.length;++We)for(var Ht=$t[We],Wt=0;Wt<3;++Wt){for(var Sr=0;Sr<3;++Sr)Kt[3*sr+Sr]=Fe[Sr];for(var Sr=0;Sr<4;++Sr)ar[4*sr+Sr]=vt[Sr];Zt[sr]=le;var ia=It[Ht[Wt]];_r[2*sr]=Ze*(Mt*ia[0]-dt*ia[1]+Vt[0]),_r[2*sr+1]=Ze*(dt*ia[0]+Mt*ia[1]+Vt[1]),sr+=1}for(var $t=mt.edges,It=mt.positions,We=0;We<$t.length;++We)for(var Ht=$t[We],Wt=0;Wt<2;++Wt){for(var Sr=0;Sr<3;++Sr)Kt[3*Ot+Sr]=Fe[Sr];for(var Sr=0;Sr<4;++Sr)ar[4*Ot+Sr]=ht[Sr];Zt[Ot]=le;var ia=It[Ht[Wt]];_r[2*Ot]=Ze*(Mt*ia[0]-dt*ia[1]+Vt[0]),_r[2*Ot+1]=Ze*(dt*ia[0]+Mt*ia[1]+Vt[1]),Ot+=1}}}this.bounds=[Ae,Me],this.points=ee,this.pointCount=ee.length,this.vertexCount=ve,this.lineVertexCount=se,this.pointBuffer.update(Kt),this.colorBuffer.update(ar),this.glyphBuffer.update(_r),this.idBuffer.update(Zt),o.free(Kt),o.free(ar),o.free(_r),o.free(Zt)},u.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()};function K(G){var X=G.gl,q=c.createPerspective(X),W=c.createOrtho(X),ee=c.createProject(X),ae=c.createPickPerspective(X),fe=c.createPickOrtho(X),ye=c.createPickProject(X),xe=r(X),Ae=r(X),Me=r(X),Ie=r(X),qe=a(X,[{buffer:xe,size:3,type:X.FLOAT},{buffer:Ae,size:4,type:X.FLOAT},{buffer:Me,size:2,type:X.FLOAT},{buffer:Ie,size:4,type:X.UNSIGNED_BYTE,normalized:!0}]),je=new h(X,q,W,ee,xe,Ae,Me,Ie,qe,ae,fe,ye);return je.update(G),je}},3589(l,e,t){"use strict";l.exports=p;var n=t(2260),r=t(1888),a=t(9618),o=t(8828).nextPow2,s=function(m,i,T){for(var S=1e8,M=-1,C=-1,_=m.shape[0],w=m.shape[1],h=0;h<_;h++)for(var u=0;uthis.buffer.length){r.free(this.buffer);for(var S=this.buffer=r.mallocUint8(o(T*i*4)),M=0;MS)for(i=S;iT)for(i=T;i=0){for(var F=B.type.charAt(B.type.length-1)|0,P=new Array(F),j=0;j=0;)U+=1;N[R]=U}var Z=new Array(S.length);function Q(){_.program=o.program(w,_._vref,_._fref,I,N);for(var re=0;re=0){var u=w.charCodeAt(w.length-1)-48;if(u<2||u>4)throw new n("","Invalid data type for attribute "+_+": "+w);s(f,p,h[0],i,u,T,_)}else if(w.indexOf("mat")>=0){var u=w.charCodeAt(w.length-1)-48;if(u<2||u>4)throw new n("","Invalid data type for attribute "+_+": "+w);c(f,p,h,i,u,T,_)}else throw new n("","Unknown data type for attribute "+_+": "+w);break}}return T}},3327(l,e,t){"use strict";var n=t(216),r=t(8866);l.exports=s;function a(c){return function(){return c}}function o(c,g){for(var f=new Array(c),p=0;p4)throw new r("","Invalid data type");switch(U.charAt(0)){case"b":case"i":c["uniform"+Z+"iv"](p[N],R);break;case"v":c["uniform"+Z+"fv"](p[N],R);break;default:throw new r("","Unrecognized data type for vector "+name+": "+U)}}else if(U.indexOf("mat")===0&&U.length===4){if(Z=U.charCodeAt(U.length-1)-48,Z<2||Z>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+U);c["uniformMatrix"+Z+"fv"](p[N],!1,R);break}else throw new r("","Unknown uniform data type for "+name+": "+U)}}}}}function T(w,h){if(typeof h!="object")return[[w,h]];var u=[];for(var A in h){var b=h[A],z=w;parseInt(A)+""===A?z+="["+A+"]":z+="."+A,typeof b=="object"?u.push.apply(u,T(z,b)):u.push([z,b])}return u}function S(w){switch(w){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var h=w.indexOf("vec");if(0<=h&&h<=1&&w.length===4+h){var u=w.charCodeAt(w.length-1)-48;if(u<2||u>4)throw new r("","Invalid data type");return w.charAt(0)==="b"?o(u,!1):o(u,0)}else if(w.indexOf("mat")===0&&w.length===4){var u=w.charCodeAt(w.length-1)-48;if(u<2||u>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+w);return o(u*u,0)}else throw new r("","Unknown uniform data type for "+name+": "+w)}}function M(w,h,u){if(typeof u=="object"){var A=C(u);Object.defineProperty(w,h,{get:a(A),set:i(u),enumerable:!0,configurable:!1})}else p[u]?Object.defineProperty(w,h,{get:m(u),set:i(u),enumerable:!0,configurable:!1}):w[h]=S(f[u].type)}function C(w){var h;if(Array.isArray(w)){h=new Array(w.length);for(var u=0;u1){f[0]in c||(c[f[0]]=[]),c=c[f[0]];for(var p=1;p1)for(var T=0;T"u"?t(606):WeakMap,o=new a,s=0;function c(M,C,_,w,h,u,A){this.id=M,this.src=C,this.type=_,this.shader=w,this.count=u,this.programs=[],this.cache=A}c.prototype.dispose=function(){if(--this.count===0){for(var M=this.cache,C=M.gl,_=this.programs,w=0,h=_.length;w0)for(var H=0;HC)return T-1}return T},m=function(M,C,_){return M_?_:M},h=function(M,C,_){var T=C.vectors,f=C.meshgrid,u=M[0],A=M[1],b=M[2],z=f[0].length,I=f[1].length,N=f[2].length,R=c(f[0],u),B=c(f[1],A),F=c(f[2],b),P=R+1,j=B+1,U=F+1;if(R=m(R,0,z-1),P=m(P,0,z-1),B=m(B,0,I-1),j=m(j,0,I-1),F=m(F,0,N-1),U=m(U,0,N-1),R<0||B<0||F<0||P>z-1||j>I-1||U>N-1)return a.create();var Z=f[0][R],Q=f[0][P],re=f[1][B],ae=f[1][j],oe=f[2][F],H=f[2][U],X=(u-Z)/(Q-Z),K=(A-re)/(ae-re),G=(b-oe)/(H-oe);isFinite(X)||(X=.5),isFinite(K)||(K=.5),isFinite(G)||(G=.5);var Y,q,$,ee,ne,fe;switch(_.reversedX&&(R=z-1-R,P=z-1-P),_.reversedY&&(B=I-1-B,j=I-1-j),_.reversedZ&&(F=N-1-F,U=N-1-U),_.filled){case 5:ne=F,fe=U,$=B*N,ee=j*N,Y=R*N*I,q=P*N*I;break;case 4:ne=F,fe=U,Y=R*N,q=P*N,$=B*N*z,ee=j*N*z;break;case 3:$=B,ee=j,ne=F*I,fe=U*I,Y=R*I*N,q=P*I*N;break;case 2:$=B,ee=j,Y=R*I,q=P*I,ne=F*I*z,fe=U*I*z;break;case 1:Y=R,q=P,ne=F*z,fe=U*z,$=B*z*N,ee=j*z*N;break;default:Y=R,q=P,$=B*z,ee=j*z,ne=F*z*I,fe=U*z*I;break}var ye=T[Y+$+ne],xe=T[Y+$+fe],Ae=T[Y+ee+ne],Me=T[Y+ee+fe],Ie=T[q+$+ne],Ue=T[q+$+fe],qe=T[q+ee+ne],ke=T[q+ee+fe],ge=a.create(),ue=a.create(),ve=a.create(),se=a.create();a.lerp(ge,ye,Ie,X),a.lerp(ue,xe,Ue,X),a.lerp(ve,Ae,qe,X),a.lerp(se,Me,ke,X);var Te=a.create(),Fe=a.create();a.lerp(Te,ge,ve,K),a.lerp(Fe,ue,se,K);var We=a.create();return a.lerp(We,Te,Fe,G),We},p=function(M,C){var _=C[0],T=C[1],f=C[2];return M[0]=_<0?-_:_,M[1]=T<0?-T:T,M[2]=f<0?-f:f,M},g=function(M){var C=1/0;M.sort(function(u,A){return u-A});for(var _=M.length,T=1;T<_;T++){var f=Math.abs(M[T]-M[T-1]);fP||kej||geU)},Q=a.distance(C[0],C[1]),re=10*Q/T,ae=re*re,oe=1,H=0,X=_.length;X>1&&(oe=i(_));for(var K=0;KH&&(H=ye),ne.push(ye),N.push({points:Y,velocities:q,divergences:ne});for(var xe=0;xeae&&a.scale(Ae,Ae,re/Math.sqrt(Me)),a.add(Ae,Ae,G),$=z(Ae),a.squaredDistance(ee,Ae)-ae>-1e-4*ae){Y.push(Ae),ee=Ae,q.push($);var fe=I(Ae,$),ye=a.length(fe);isFinite(ye)&&ye>H&&(H=ye),ne.push(ye)}G=Ae}}var Ie=s(N,M.colormap,H,oe);return u?Ie.tubeScale=u:(H===0&&(H=1),Ie.tubeScale=f*.5*oe/H),Ie};var w=t(6740),S=t(6405).createMesh;l.exports.createTubeMesh=function(M,C){return S(M,C,{shaders:w,traceType:"streamtube"})}},990:function(l,e,t){var a=t(9405),r=t(3236),n=r([`precision highp float; +}`]);e.meshShader={vertex:r,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815(l,e,t){"use strict";var n=t(2931),r=t(9970),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(M,C,_,w){for(var h=M.points,u=M.velocities,A=M.divergences,b=[],z=[],I=[],N=[],R=[],B=[],F=0,P=0,j=r.create(),U=r.create(),Z=8,Q=0;Q0)for(var V=0;VC)return w-1}return w},g=function(M,C,_){return M_?_:M},f=function(M,C,_){var w=C.vectors,h=C.meshgrid,u=M[0],A=M[1],b=M[2],z=h[0].length,I=h[1].length,N=h[2].length,R=c(h[0],u),B=c(h[1],A),F=c(h[2],b),P=R+1,j=B+1,U=F+1;if(R=g(R,0,z-1),P=g(P,0,z-1),B=g(B,0,I-1),j=g(j,0,I-1),F=g(F,0,N-1),U=g(U,0,N-1),R<0||B<0||F<0||P>z-1||j>I-1||U>N-1)return n.create();var Z=h[0][R],Q=h[0][P],re=h[1][B],ne=h[1][j],oe=h[2][F],V=h[2][U],$=(u-Z)/(Q-Z),K=(A-re)/(ne-re),G=(b-oe)/(V-oe);isFinite($)||($=.5),isFinite(K)||(K=.5),isFinite(G)||(G=.5);var X,q,W,ee,ae,fe;switch(_.reversedX&&(R=z-1-R,P=z-1-P),_.reversedY&&(B=I-1-B,j=I-1-j),_.reversedZ&&(F=N-1-F,U=N-1-U),_.filled){case 5:ae=F,fe=U,W=B*N,ee=j*N,X=R*N*I,q=P*N*I;break;case 4:ae=F,fe=U,X=R*N,q=P*N,W=B*N*z,ee=j*N*z;break;case 3:W=B,ee=j,ae=F*I,fe=U*I,X=R*I*N,q=P*I*N;break;case 2:W=B,ee=j,X=R*I,q=P*I,ae=F*I*z,fe=U*I*z;break;case 1:X=R,q=P,ae=F*z,fe=U*z,W=B*z*N,ee=j*z*N;break;default:X=R,q=P,W=B*z,ee=j*z,ae=F*z*I,fe=U*z*I;break}var ye=w[X+W+ae],xe=w[X+W+fe],Ae=w[X+ee+ae],Me=w[X+ee+fe],Ie=w[q+W+ae],qe=w[q+W+fe],je=w[q+ee+ae],ke=w[q+ee+fe],ge=n.create(),le=n.create(),ve=n.create(),se=n.create();n.lerp(ge,ye,Ie,$),n.lerp(le,xe,qe,$),n.lerp(ve,Ae,je,$),n.lerp(se,Me,ke,$);var Te=n.create(),Fe=n.create();n.lerp(Te,ge,ve,K),n.lerp(Fe,le,se,K);var We=n.create();return n.lerp(We,Te,Fe,G),We},p=function(M,C){var _=C[0],w=C[1],h=C[2];return M[0]=_<0?-_:_,M[1]=w<0?-w:w,M[2]=h<0?-h:h,M},m=function(M){var C=1/0;M.sort(function(u,A){return u-A});for(var _=M.length,w=1;w<_;w++){var h=Math.abs(M[w]-M[w-1]);hP||kej||geU)},Q=n.distance(C[0],C[1]),re=10*Q/w,ne=re*re,oe=1,V=0,$=_.length;$>1&&(oe=i(_));for(var K=0;K<$;K++){var G=n.create();n.copy(G,_[K]);var X=[G],q=[],W=z(G),ee=G;q.push(W);var ae=[],fe=I(G,W),ye=n.length(fe);isFinite(ye)&&ye>V&&(V=ye),ae.push(ye),N.push({points:X,velocities:q,divergences:ae});for(var xe=0;xene&&n.scale(Ae,Ae,re/Math.sqrt(Me)),n.add(Ae,Ae,G),W=z(Ae),n.squaredDistance(ee,Ae)-ne>-1e-4*ne){X.push(Ae),ee=Ae,q.push(W);var fe=I(Ae,W),ye=n.length(fe);isFinite(ye)&&ye>V&&(V=ye),ae.push(ye)}G=Ae}}var Ie=s(N,M.colormap,V,oe);return u?Ie.tubeScale=u:(V===0&&(V=1),Ie.tubeScale=h*.5*oe/V),Ie};var T=t(6740),S=t(6405).createMesh;l.exports.createTubeMesh=function(M,C){return S(M,C,{shaders:T,traceType:"streamtube"})}},990(l,e,t){var n=t(9405),r=t(3236),a=r([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; @@ -1988,13 +1988,13 @@ void main() { vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } -`]);e.createShader=function(m){var h=a(m,n,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},e.createPickShader=function(m){var h=a(m,n,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},e.createContourShader=function(m){var h=a(m,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h},e.createPickContourShader=function(m){var h=a(m,s,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h}},9499:function(l,e,t){"use strict";l.exports=Y;var a=t(8828),r=t(2762),n=t(8116),o=t(7766),s=t(1888),c=t(6729),m=t(5298),h=t(9994),p=t(9618),g=t(3711),i=t(6760),w=t(7608),S=t(2478),M=t(6199),C=t(990),_=C.createShader,T=C.createContourShader,f=C.createPickShader,u=C.createPickContourShader,A=4*10,b=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],z=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],I=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var q=0;q<3;++q){var $=I[q],ee=(q+1)%3,ne=(q+2)%3;$[ee+0]=1,$[ne+3]=1,$[q+6]=1}})();function N(q,$,ee,ne,fe){this.position=q,this.index=$,this.uv=ee,this.level=ne,this.dataCoordinate=fe}var R=256;function B(q,$,ee,ne,fe,ye,xe,Ae,Me,Ie,Ue,qe,ke,ge,ue){this.gl=q,this.shape=$,this.bounds=ee,this.objectOffset=ue,this.intensityBounds=[],this._shader=ne,this._pickShader=fe,this._coordinateBuffer=ye,this._vao=xe,this._colorMap=Ae,this._contourShader=Me,this._contourPickShader=Ie,this._contourBuffer=Ue,this._contourVAO=qe,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new N([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=ke,this._dynamicVAO=ge,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[p(s.mallocFloat(1024),[0,0]),p(s.mallocFloat(1024),[0,0]),p(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var F=B.prototype;F.genColormap=function(q,$){var ee=!1,ne=h([c({colormap:q,nshades:R,format:"rgba"}).map(function(fe,ye){var xe=$?P(ye/255,$):fe[3];return xe<1&&(ee=!0),[fe[0],fe[1],fe[2],255*xe]})]);return m.divseq(ne,255),this.hasAlphaScale=ee,ne},F.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},F.isOpaque=function(){return!this.isTransparent()},F.pickSlots=1,F.setPickBase=function(q){this.pickId=q};function P(q,$){if(!$||!$.length)return 1;for(var ee=0;ee<$.length;++ee){if($.length<2)return 1;if($[ee][0]===q)return $[ee][1];if($[ee][0]>q&&ee>0){var ne=($[ee][0]-q)/($[ee][0]-$[ee-1][0]);return $[ee][1]*(1-ne)+ne*$[ee-1][1]}}return 1}var j=[0,0,0],U={showSurface:!1,showContour:!1,projections:[b.slice(),b.slice(),b.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function Z(q,$){var ee,ne,fe,ye=$.axes&&$.axes.lastCubeProps.axis||j,xe=$.showSurface,Ae=$.showContour;for(ee=0;ee<3;++ee)for(xe=xe||$.surfaceProject[ee],ne=0;ne<3;++ne)Ae=Ae||$.contourProject[ee][ne];for(ee=0;ee<3;++ee){var Me=U.projections[ee];for(ne=0;ne<16;++ne)Me[ne]=0;for(ne=0;ne<4;++ne)Me[5*ne]=1;Me[5*ee]=0,Me[12+ee]=$.axesBounds[+(ye[ee]>0)][ee],i(Me,q.model,Me);var Ie=U.clipBounds[ee];for(fe=0;fe<2;++fe)for(ne=0;ne<3;++ne)Ie[fe][ne]=q.clipBounds[fe][ne];Ie[0][ee]=-1e8,Ie[1][ee]=1e8}return U.showSurface=xe,U.showContour=Ae,U}var Q={model:b,view:b,projection:b,inverseModel:b.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},re=b.slice(),ae=[1,0,0,0,1,0,0,0,1];function oe(q,$){q=q||{};var ee=this.gl;ee.disable(ee.CULL_FACE),this._colorMap.bind(0);var ne=Q;ne.model=q.model||b,ne.view=q.view||b,ne.projection=q.projection||b,ne.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ne.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ne.objectOffset=this.objectOffset,ne.contourColor=this.contourColor[0],ne.inverseModel=w(ne.inverseModel,ne.model);for(var fe=0;fe<2;++fe)for(var ye=ne.clipBounds[fe],xe=0;xe<3;++xe)ye[xe]=Math.min(Math.max(this.clipBounds[fe][xe],-1e8),1e8);ne.kambient=this.ambientLight,ne.kdiffuse=this.diffuseLight,ne.kspecular=this.specularLight,ne.roughness=this.roughness,ne.fresnel=this.fresnel,ne.opacity=this.opacity,ne.height=0,ne.permutation=ae,ne.vertexColor=this.vertexColor;var Ae=re;for(i(Ae,ne.view,ne.model),i(Ae,ne.projection,Ae),w(Ae,Ae),fe=0;fe<3;++fe)ne.eyePosition[fe]=Ae[12+fe]/Ae[15];var Me=Ae[15];for(fe=0;fe<3;++fe)Me+=this.lightPosition[fe]*Ae[4*fe+3];for(fe=0;fe<3;++fe){var Ie=Ae[12+fe];for(xe=0;xe<3;++xe)Ie+=Ae[4*xe+fe]*this.lightPosition[xe];ne.lightPosition[fe]=Ie/Me}var Ue=Z(ne,this);if(Ue.showSurface){for(this._shader.bind(),this._shader.uniforms=ne,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ee.TRIANGLES,this._vertexCount),fe=0;fe<3;++fe)!this.surfaceProject[fe]||!this.vertexCount||(this._shader.uniforms.model=Ue.projections[fe],this._shader.uniforms.clipBounds=Ue.clipBounds[fe],this._vao.draw(ee.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ue.showContour){var qe=this._contourShader;ne.kambient=1,ne.kdiffuse=0,ne.kspecular=0,ne.opacity=1,qe.bind(),qe.uniforms=ne;var ke=this._contourVAO;for(ke.bind(),fe=0;fe<3;++fe)for(qe.uniforms.permutation=I[fe],ee.lineWidth(this.contourWidth[fe]*this.pixelRatio),xe=0;xe>4)/16)/255,fe=Math.floor(ne),ye=ne-fe,xe=$[1]*(q.value[1]+(q.value[2]&15)/16)/255,Ae=Math.floor(xe),Me=xe-Ae;fe+=1,Ae+=1;var Ie=ee.position;Ie[0]=Ie[1]=Ie[2]=0;for(var Ue=0;Ue<2;++Ue)for(var qe=Ue?ye:1-ye,ke=0;ke<2;++ke)for(var ge=ke?Me:1-Me,ue=fe+Ue,ve=Ae+ke,se=qe*ge,Te=0;Te<3;++Te)Ie[Te]+=this._field[Te].get(ue,ve)*se;for(var Fe=this._pickResult.level,We=0;We<3;++We)if(Fe[We]=S.le(this.contourLevels[We],Ie[We]),Fe[We]<0)this.contourLevels[We].length>0&&(Fe[We]=0);else if(Fe[We]Math.abs(gt-Ie[We])&&(Fe[We]+=1)}for(ee.index[0]=ye<.5?fe:fe+1,ee.index[1]=Me<.5?Ae:Ae+1,ee.uv[0]=ne/$[0],ee.uv[1]=xe/$[1],Te=0;Te<3;++Te)ee.dataCoordinate[Te]=this._field[Te].get(ee.index[0],ee.index[1]);return ee},F.padField=function(q,$){var ee=$.shape.slice(),ne=q.shape.slice();m.assign(q.lo(1,1).hi(ee[0],ee[1]),$),m.assign(q.lo(1).hi(ee[0],1),$.hi(ee[0],1)),m.assign(q.lo(1,ne[1]-1).hi(ee[0],1),$.lo(0,ee[1]-1).hi(ee[0],1)),m.assign(q.lo(0,1).hi(1,ee[1]),$.hi(1)),m.assign(q.lo(ne[0]-1,1).hi(1,ee[1]),$.lo(ee[0]-1)),q.set(0,0,$.get(0,0)),q.set(0,ne[1]-1,$.get(0,ee[1]-1)),q.set(ne[0]-1,0,$.get(ee[0]-1,0)),q.set(ne[0]-1,ne[1]-1,$.get(ee[0]-1,ee[1]-1))};function X(q,$){return Array.isArray(q)?[$(q[0]),$(q[1]),$(q[2])]:[$(q),$(q),$(q)]}function K(q){return Array.isArray(q)?q.length===3?[q[0],q[1],q[2],1]:[q[0],q[1],q[2],q[3]]:[0,0,0,1]}function G(q){if(Array.isArray(q)){if(Array.isArray(q))return[K(q[0]),K(q[1]),K(q[2])];var $=K(q);return[$.slice(),$.slice(),$.slice()]}}F.update=function(q){q=q||{},this.objectOffset=q.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in q&&(this.contourWidth=X(q.contourWidth,Number)),"showContour"in q&&(this.showContour=X(q.showContour,Boolean)),"showSurface"in q&&(this.showSurface=!!q.showSurface),"contourTint"in q&&(this.contourTint=X(q.contourTint,Boolean)),"contourColor"in q&&(this.contourColor=G(q.contourColor)),"contourProject"in q&&(this.contourProject=X(q.contourProject,function(ba){return X(ba,Boolean)})),"surfaceProject"in q&&(this.surfaceProject=q.surfaceProject),"dynamicColor"in q&&(this.dynamicColor=G(q.dynamicColor)),"dynamicTint"in q&&(this.dynamicTint=X(q.dynamicTint,Number)),"dynamicWidth"in q&&(this.dynamicWidth=X(q.dynamicWidth,Number)),"opacity"in q&&(this.opacity=q.opacity),"opacityscale"in q&&(this.opacityscale=q.opacityscale),"colorBounds"in q&&(this.colorBounds=q.colorBounds),"vertexColor"in q&&(this.vertexColor=q.vertexColor?1:0),"colormap"in q&&this._colorMap.setPixels(this.genColormap(q.colormap,this.opacityscale));var $=q.field||q.coords&&q.coords[2]||null,ee=!1;if($||(this._field[2].shape[0]||this._field[2].shape[2]?$=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):$=this._field[2].hi(0,0)),"field"in q||"coords"in q){var ne=($.shape[0]+2)*($.shape[1]+2);ne>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(a.nextPow2(ne))),this._field[2]=p(this._field[2].data,[$.shape[0]+2,$.shape[1]+2]),this.padField(this._field[2],$),this.shape=$.shape.slice();for(var fe=this.shape,ye=0;ye<2;++ye)this._field[2].size>this._field[ye].data.length&&(s.freeFloat(this._field[ye].data),this._field[ye].data=s.mallocFloat(this._field[2].size)),this._field[ye]=p(this._field[ye].data,[fe[0]+2,fe[1]+2]);if(q.coords){var xe=q.coords;if(!Array.isArray(xe)||xe.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(ye=0;ye<2;++ye){var Ae=xe[ye];for(ke=0;ke<2;++ke)if(Ae.shape[ke]!==fe[ke])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[ye],Ae)}}else if(q.ticks){var Me=q.ticks;if(!Array.isArray(Me)||Me.length!==2)throw new Error("gl-surface: invalid ticks");for(ye=0;ye<2;++ye){var Ie=Me[ye];if((Array.isArray(Ie)||Ie.length)&&(Ie=p(Ie)),Ie.shape[0]!==fe[ye])throw new Error("gl-surface: invalid tick length");var Ue=p(Ie.data,fe);Ue.stride[ye]=Ie.stride[0],Ue.stride[ye^1]=0,this.padField(this._field[ye],Ue)}}else{for(ye=0;ye<2;++ye){var qe=[0,0];qe[ye]=1,this._field[ye]=p(this._field[ye].data,[fe[0]+2,fe[1]+2],qe,0)}this._field[0].set(0,0,0);for(var ke=0;ke0){for(var Mi=0;Mi<5;++Mi)Ht.pop();Re-=1}continue e}}}$t.push(Re)}this._contourOffsets[Wt]=on,this._contourCounts[Wt]=$t}var ci=s.mallocFloat(Ht.length);for(ye=0;yeN||z<0||z>N)throw new Error("gl-texture2d: Invalid texture size");return A._shape=[b,z],A.bind(),I.texImage2D(I.TEXTURE_2D,0,A.format,b,z,0,A.format,A.type,null),A._mipLevels=[0],A}function i(A,b,z,I,N,R){this.gl=A,this.handle=b,this.format=N,this.type=R,this._shape=[z,I],this._mipLevels=[0],this._magFilter=A.NEAREST,this._minFilter=A.NEAREST,this._wrapS=A.CLAMP_TO_EDGE,this._wrapT=A.CLAMP_TO_EDGE,this._anisoSamples=1;var B=this,F=[this._wrapS,this._wrapT];Object.defineProperties(F,[{get:function(){return B._wrapS},set:function(j){return B.wrapS=j}},{get:function(){return B._wrapT},set:function(j){return B.wrapT=j}}]),this._wrapVector=F;var P=[this._shape[0],this._shape[1]];Object.defineProperties(P,[{get:function(){return B._shape[0]},set:function(j){return B.width=j}},{get:function(){return B._shape[1]},set:function(j){return B.height=j}}]),this._shapeVector=P}var w=i.prototype;Object.defineProperties(w,{minFilter:{get:function(){return this._minFilter},set:function(A){this.bind();var b=this.gl;if(this.type===b.FLOAT&&o.indexOf(A)>=0&&(b.getExtension("OES_texture_float_linear")||(A=b.NEAREST)),s.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,A),this._minFilter=A}},magFilter:{get:function(){return this._magFilter},set:function(A){this.bind();var b=this.gl;if(this.type===b.FLOAT&&o.indexOf(A)>=0&&(b.getExtension("OES_texture_float_linear")||(A=b.NEAREST)),s.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,A),this._magFilter=A}},mipSamples:{get:function(){return this._anisoSamples},set:function(A){var b=this._anisoSamples;if(this._anisoSamples=Math.max(A,1)|0,b!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(A){if(this.bind(),c.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,A),this._wrapS=A}},wrapT:{get:function(){return this._wrapT},set:function(A){if(this.bind(),c.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,A),this._wrapT=A}},wrap:{get:function(){return this._wrapVector},set:function(A){if(Array.isArray(A)||(A=[A,A]),A.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var b=0;b<2;++b)if(c.indexOf(A[b])<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);this._wrapS=A[0],this._wrapT=A[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),A}},shape:{get:function(){return this._shapeVector},set:function(A){if(!Array.isArray(A))A=[A|0,A|0];else if(A.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return g(this,A[0]|0,A[1]|0),[A[0]|0,A[1]|0]}},width:{get:function(){return this._shape[0]},set:function(A){return A=A|0,g(this,A,this._shape[1]),A}},height:{get:function(){return this._shape[1]},set:function(A){return A=A|0,g(this,this._shape[0],A),A}}}),w.bind=function(A){var b=this.gl;return A!==void 0&&b.activeTexture(b.TEXTURE0+(A|0)),b.bindTexture(b.TEXTURE_2D,this.handle),A!==void 0?A|0:b.getParameter(b.ACTIVE_TEXTURE)-b.TEXTURE0},w.dispose=function(){this.gl.deleteTexture(this.handle)},w.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var A=Math.min(this._shape[0],this._shape[1]),b=0;A>0;++b,A>>>=1)this._mipLevels.indexOf(b)<0&&this._mipLevels.push(b)},w.setPixels=function(A,b,z,I){var N=this.gl;this.bind(),Array.isArray(b)?(I=z,z=b[1]|0,b=b[0]|0):(b=b||0,z=z||0),I=I||0;var R=h(A)?A:A.raw;if(R){var B=this._mipLevels.indexOf(I)<0;B?(N.texImage2D(N.TEXTURE_2D,0,this.format,this.format,this.type,R),this._mipLevels.push(I)):N.texSubImage2D(N.TEXTURE_2D,I,b,z,this.format,this.type,R)}else if(A.shape&&A.stride&&A.data){if(A.shape.length<2||b+A.shape[1]>this._shape[1]>>>I||z+A.shape[0]>this._shape[0]>>>I||b<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");M(N,b,z,I,this.format,this.type,this._mipLevels,A)}else throw new Error("gl-texture2d: Unsupported data type")};function S(A,b){return A.length===3?b[2]===1&&b[1]===A[0]*A[2]&&b[0]===A[2]:b[0]===1&&b[1]===A[0]}function M(A,b,z,I,N,R,B,F){var P=F.dtype,j=F.shape.slice();if(j.length<2||j.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var U=0,Z=0,Q=S(j,F.stride.slice());P==="float32"?U=A.FLOAT:P==="float64"?(U=A.FLOAT,Q=!1,P="float32"):P==="uint8"?U=A.UNSIGNED_BYTE:(U=A.UNSIGNED_BYTE,Q=!1,P="uint8");var re=1;if(j.length===2)Z=A.LUMINANCE,j=[j[0],j[1],1],F=a(F.data,j,[F.stride[0],F.stride[1],1],F.offset);else if(j.length===3){if(j[2]===1)Z=A.ALPHA;else if(j[2]===2)Z=A.LUMINANCE_ALPHA;else if(j[2]===3)Z=A.RGB;else if(j[2]===4)Z=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");re=j[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((Z===A.LUMINANCE||Z===A.ALPHA)&&(N===A.LUMINANCE||N===A.ALPHA)&&(Z=N),Z!==N)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ae=F.size,oe=B.indexOf(I)<0;if(oe&&B.push(I),U===R&&Q)F.offset===0&&F.data.length===ae?oe?A.texImage2D(A.TEXTURE_2D,I,N,j[0],j[1],0,N,R,F.data):A.texSubImage2D(A.TEXTURE_2D,I,b,z,j[0],j[1],N,R,F.data):oe?A.texImage2D(A.TEXTURE_2D,I,N,j[0],j[1],0,N,R,F.data.subarray(F.offset,F.offset+ae)):A.texSubImage2D(A.TEXTURE_2D,I,b,z,j[0],j[1],N,R,F.data.subarray(F.offset,F.offset+ae));else{var H;R===A.FLOAT?H=n.mallocFloat32(ae):H=n.mallocUint8(ae);var X=a(H,j,[j[2],j[2]*j[0],1]);U===A.FLOAT&&R===A.UNSIGNED_BYTE?p(X,F):r.assign(X,F),oe?A.texImage2D(A.TEXTURE_2D,I,N,j[0],j[1],0,N,R,H.subarray(0,ae)):A.texSubImage2D(A.TEXTURE_2D,I,b,z,j[0],j[1],N,R,H.subarray(0,ae)),R===A.FLOAT?n.freeFloat32(H):n.freeUint8(H)}}function C(A){var b=A.createTexture();return A.bindTexture(A.TEXTURE_2D,b),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE),b}function _(A,b,z,I,N){var R=A.getParameter(A.MAX_TEXTURE_SIZE);if(b<0||b>R||z<0||z>R)throw new Error("gl-texture2d: Invalid texture shape");if(N===A.FLOAT&&!A.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var B=C(A);return A.texImage2D(A.TEXTURE_2D,0,I,b,z,0,I,N,null),new i(A,B,b,z,I,N)}function T(A,b,z,I,N,R){var B=C(A);return A.texImage2D(A.TEXTURE_2D,0,N,N,R,b),new i(A,B,z,I,N,R)}function f(A,b){var z=b.dtype,I=b.shape.slice(),N=A.getParameter(A.MAX_TEXTURE_SIZE);if(I[0]<0||I[0]>N||I[1]<0||I[1]>N)throw new Error("gl-texture2d: Invalid texture size");var R=S(I,b.stride.slice()),B=0;z==="float32"?B=A.FLOAT:z==="float64"?(B=A.FLOAT,R=!1,z="float32"):z==="uint8"?B=A.UNSIGNED_BYTE:(B=A.UNSIGNED_BYTE,R=!1,z="uint8");var F=0;if(I.length===2)F=A.LUMINANCE,I=[I[0],I[1],1],b=a(b.data,I,[b.stride[0],b.stride[1],1],b.offset);else if(I.length===3)if(I[2]===1)F=A.ALPHA;else if(I[2]===2)F=A.LUMINANCE_ALPHA;else if(I[2]===3)F=A.RGB;else if(I[2]===4)F=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");B===A.FLOAT&&!A.getExtension("OES_texture_float")&&(B=A.UNSIGNED_BYTE,R=!1);var P,j,U=b.size;if(R)b.offset===0&&b.data.length===U?P=b.data:P=b.data.subarray(b.offset,b.offset+U);else{var Z=[I[2],I[2]*I[0],1];j=n.malloc(U,z);var Q=a(j,I,Z,0);(z==="float32"||z==="float64")&&B===A.UNSIGNED_BYTE?p(Q,b):r.assign(Q,b),P=j.subarray(0,U)}var re=C(A);return A.texImage2D(A.TEXTURE_2D,0,F,I[0],I[1],0,F,B,P),R||n.free(j),new i(A,re,I[0],I[1],F,B)}function u(A){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(o||m(A),typeof arguments[1]=="number")return _(A,arguments[1],arguments[2],arguments[3]||A.RGBA,arguments[4]||A.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return _(A,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var b=arguments[1],z=h(b)?b:b.raw;if(z)return T(A,z,b.width|0,b.height|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(b.shape&&b.data&&b.stride)return f(A,b)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(l){"use strict";function e(t,a,r){a?a.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=t.getParameter(t.MAX_VERTEX_ATTRIBS)|0;if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var o=0;o1?0:Math.acos(p)}},9226:function(l){l.exports=e;function e(t,a){return t[0]=Math.ceil(a[0]),t[1]=Math.ceil(a[1]),t[2]=Math.ceil(a[2]),t}},3126:function(l){l.exports=e;function e(t){var a=new Float32Array(3);return a[0]=t[0],a[1]=t[1],a[2]=t[2],a}},3990:function(l){l.exports=e;function e(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t}},1091:function(l){l.exports=e;function e(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},5911:function(l){l.exports=e;function e(t,a,r){var n=a[0],o=a[1],s=a[2],c=r[0],m=r[1],h=r[2];return t[0]=o*h-s*m,t[1]=s*c-n*h,t[2]=n*m-o*c,t}},5455:function(l,e,t){l.exports=t(7056)},7056:function(l){l.exports=e;function e(t,a){var r=a[0]-t[0],n=a[1]-t[1],o=a[2]-t[2];return Math.sqrt(r*r+n*n+o*o)}},4008:function(l,e,t){l.exports=t(6690)},6690:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]/r[0],t[1]=a[1]/r[1],t[2]=a[2]/r[2],t}},244:function(l){l.exports=e;function e(t,a){return t[0]*a[0]+t[1]*a[1]+t[2]*a[2]}},2613:function(l){l.exports=1e-6},9922:function(l,e,t){l.exports=r;var a=t(2613);function r(n,o){var s=n[0],c=n[1],m=n[2],h=o[0],p=o[1],g=o[2];return Math.abs(s-h)<=a*Math.max(1,Math.abs(s),Math.abs(h))&&Math.abs(c-p)<=a*Math.max(1,Math.abs(c),Math.abs(p))&&Math.abs(m-g)<=a*Math.max(1,Math.abs(m),Math.abs(g))}},9265:function(l){l.exports=e;function e(t,a){return t[0]===a[0]&&t[1]===a[1]&&t[2]===a[2]}},2681:function(l){l.exports=e;function e(t,a){return t[0]=Math.floor(a[0]),t[1]=Math.floor(a[1]),t[2]=Math.floor(a[2]),t}},5137:function(l,e,t){l.exports=r;var a=t(1091)();function r(n,o,s,c,m,h){var p,g;for(o||(o=3),s||(s=0),c?g=Math.min(c*o+s,n.length):g=n.length,p=s;p0&&(s=1/Math.sqrt(s),t[0]=a[0]*s,t[1]=a[1]*s,t[2]=a[2]*s),t}},7636:function(l){l.exports=e;function e(t,a){a=a||1;var r=Math.random()*2*Math.PI,n=Math.random()*2-1,o=Math.sqrt(1-n*n)*a;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=n*a,t}},6894:function(l){l.exports=e;function e(t,a,r,n){var o=r[1],s=r[2],c=a[1]-o,m=a[2]-s,h=Math.sin(n),p=Math.cos(n);return t[0]=a[0],t[1]=o+c*p-m*h,t[2]=s+c*h+m*p,t}},109:function(l){l.exports=e;function e(t,a,r,n){var o=r[0],s=r[2],c=a[0]-o,m=a[2]-s,h=Math.sin(n),p=Math.cos(n);return t[0]=o+m*h+c*p,t[1]=a[1],t[2]=s+m*p-c*h,t}},8692:function(l){l.exports=e;function e(t,a,r,n){var o=r[0],s=r[1],c=a[0]-o,m=a[1]-s,h=Math.sin(n),p=Math.cos(n);return t[0]=o+c*p-m*h,t[1]=s+c*h+m*p,t[2]=a[2],t}},2447:function(l){l.exports=e;function e(t,a){return t[0]=Math.round(a[0]),t[1]=Math.round(a[1]),t[2]=Math.round(a[2]),t}},6621:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]*r,t[1]=a[1]*r,t[2]=a[2]*r,t}},8489:function(l){l.exports=e;function e(t,a,r,n){return t[0]=a[0]+r[0]*n,t[1]=a[1]+r[1]*n,t[2]=a[2]+r[2]*n,t}},1463:function(l){l.exports=e;function e(t,a,r,n){return t[0]=a,t[1]=r,t[2]=n,t}},6141:function(l,e,t){l.exports=t(2953)},5486:function(l,e,t){l.exports=t(3066)},2953:function(l){l.exports=e;function e(t,a){var r=a[0]-t[0],n=a[1]-t[1],o=a[2]-t[2];return r*r+n*n+o*o}},3066:function(l){l.exports=e;function e(t){var a=t[0],r=t[1],n=t[2];return a*a+r*r+n*n}},2229:function(l,e,t){l.exports=t(6843)},6843:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]-r[0],t[1]=a[1]-r[1],t[2]=a[2]-r[2],t}},492:function(l){l.exports=e;function e(t,a,r){var n=a[0],o=a[1],s=a[2];return t[0]=n*r[0]+o*r[3]+s*r[6],t[1]=n*r[1]+o*r[4]+s*r[7],t[2]=n*r[2]+o*r[5]+s*r[8],t}},5673:function(l){l.exports=e;function e(t,a,r){var n=a[0],o=a[1],s=a[2],c=r[3]*n+r[7]*o+r[11]*s+r[15];return c=c||1,t[0]=(r[0]*n+r[4]*o+r[8]*s+r[12])/c,t[1]=(r[1]*n+r[5]*o+r[9]*s+r[13])/c,t[2]=(r[2]*n+r[6]*o+r[10]*s+r[14])/c,t}},264:function(l){l.exports=e;function e(t,a,r){var n=a[0],o=a[1],s=a[2],c=r[0],m=r[1],h=r[2],p=r[3],g=p*n+m*s-h*o,i=p*o+h*n-c*s,w=p*s+c*o-m*n,S=-c*n-m*o-h*s;return t[0]=g*p+S*-c+i*-h-w*-m,t[1]=i*p+S*-m+w*-c-g*-h,t[2]=w*p+S*-h+g*-m-i*-c,t}},4361:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t[3]=a[3]+r[3],t}},2335:function(l){l.exports=e;function e(t){var a=new Float32Array(4);return a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3],a}},2933:function(l){l.exports=e;function e(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t}},7536:function(l){l.exports=e;function e(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},4691:function(l){l.exports=e;function e(t,a){var r=a[0]-t[0],n=a[1]-t[1],o=a[2]-t[2],s=a[3]-t[3];return Math.sqrt(r*r+n*n+o*o+s*s)}},1373:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]/r[0],t[1]=a[1]/r[1],t[2]=a[2]/r[2],t[3]=a[3]/r[3],t}},3750:function(l){l.exports=e;function e(t,a){return t[0]*a[0]+t[1]*a[1]+t[2]*a[2]+t[3]*a[3]}},3390:function(l){l.exports=e;function e(t,a,r,n){var o=new Float32Array(4);return o[0]=t,o[1]=a,o[2]=r,o[3]=n,o}},9970:function(l,e,t){l.exports={create:t(7536),clone:t(2335),fromValues:t(3390),copy:t(2933),set:t(4578),add:t(4361),subtract:t(6860),multiply:t(3576),divide:t(1373),min:t(2334),max:t(160),scale:t(9288),scaleAndAdd:t(4844),distance:t(4691),squaredDistance:t(7960),length:t(6808),squaredLength:t(483),negate:t(1498),inverse:t(4494),normalize:t(5177),dot:t(3750),lerp:t(2573),random:t(9131),transformMat4:t(5352),transformQuat:t(4041)}},4494:function(l){l.exports=e;function e(t,a){return t[0]=1/a[0],t[1]=1/a[1],t[2]=1/a[2],t[3]=1/a[3],t}},6808:function(l){l.exports=e;function e(t){var a=t[0],r=t[1],n=t[2],o=t[3];return Math.sqrt(a*a+r*r+n*n+o*o)}},2573:function(l){l.exports=e;function e(t,a,r,n){var o=a[0],s=a[1],c=a[2],m=a[3];return t[0]=o+n*(r[0]-o),t[1]=s+n*(r[1]-s),t[2]=c+n*(r[2]-c),t[3]=m+n*(r[3]-m),t}},160:function(l){l.exports=e;function e(t,a,r){return t[0]=Math.max(a[0],r[0]),t[1]=Math.max(a[1],r[1]),t[2]=Math.max(a[2],r[2]),t[3]=Math.max(a[3],r[3]),t}},2334:function(l){l.exports=e;function e(t,a,r){return t[0]=Math.min(a[0],r[0]),t[1]=Math.min(a[1],r[1]),t[2]=Math.min(a[2],r[2]),t[3]=Math.min(a[3],r[3]),t}},3576:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]*r[0],t[1]=a[1]*r[1],t[2]=a[2]*r[2],t[3]=a[3]*r[3],t}},1498:function(l){l.exports=e;function e(t,a){return t[0]=-a[0],t[1]=-a[1],t[2]=-a[2],t[3]=-a[3],t}},5177:function(l){l.exports=e;function e(t,a){var r=a[0],n=a[1],o=a[2],s=a[3],c=r*r+n*n+o*o+s*s;return c>0&&(c=1/Math.sqrt(c),t[0]=r*c,t[1]=n*c,t[2]=o*c,t[3]=s*c),t}},9131:function(l,e,t){var a=t(5177),r=t(9288);l.exports=n;function n(o,s){return s=s||1,o[0]=Math.random(),o[1]=Math.random(),o[2]=Math.random(),o[3]=Math.random(),a(o,o),r(o,o,s),o}},9288:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]*r,t[1]=a[1]*r,t[2]=a[2]*r,t[3]=a[3]*r,t}},4844:function(l){l.exports=e;function e(t,a,r,n){return t[0]=a[0]+r[0]*n,t[1]=a[1]+r[1]*n,t[2]=a[2]+r[2]*n,t[3]=a[3]+r[3]*n,t}},4578:function(l){l.exports=e;function e(t,a,r,n,o){return t[0]=a,t[1]=r,t[2]=n,t[3]=o,t}},7960:function(l){l.exports=e;function e(t,a){var r=a[0]-t[0],n=a[1]-t[1],o=a[2]-t[2],s=a[3]-t[3];return r*r+n*n+o*o+s*s}},483:function(l){l.exports=e;function e(t){var a=t[0],r=t[1],n=t[2],o=t[3];return a*a+r*r+n*n+o*o}},6860:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]-r[0],t[1]=a[1]-r[1],t[2]=a[2]-r[2],t[3]=a[3]-r[3],t}},5352:function(l){l.exports=e;function e(t,a,r){var n=a[0],o=a[1],s=a[2],c=a[3];return t[0]=r[0]*n+r[4]*o+r[8]*s+r[12]*c,t[1]=r[1]*n+r[5]*o+r[9]*s+r[13]*c,t[2]=r[2]*n+r[6]*o+r[10]*s+r[14]*c,t[3]=r[3]*n+r[7]*o+r[11]*s+r[15]*c,t}},4041:function(l){l.exports=e;function e(t,a,r){var n=a[0],o=a[1],s=a[2],c=r[0],m=r[1],h=r[2],p=r[3],g=p*n+m*s-h*o,i=p*o+h*n-c*s,w=p*s+c*o-m*n,S=-c*n-m*o-h*s;return t[0]=g*p+S*-c+i*-h-w*-m,t[1]=i*p+S*-m+w*-c-g*-h,t[2]=w*p+S*-h+g*-m-i*-c,t[3]=a[3],t}},1848:function(l,e,t){var a=t(4905),r=t(6468);l.exports=n;function n(o){for(var s=Array.isArray(o)?o:a(o),c=0;c0)continue;We=se.slice(0,1).join("")}return ee(We),ae+=We.length,P=P.slice(We.length),P.length}while(!0)}function ke(){return/[^a-fA-F0-9]/.test(B)?(ee(P.join("")),R=c,I):(P.push(B),F=B,I+1)}function ge(){return B==="."||/[eE]/.test(B)?(P.push(B),R=S,F=B,I+1):B==="x"&&P.length===1&&P[0]==="0"?(R=u,P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),R=c,I):(P.push(B),F=B,I+1)}function ue(){return B==="f"&&(P.push(B),F=B,I+=1),/[eE]/.test(B)||(B==="-"||B==="+")&&/[eE]/.test(F)?(P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),R=c,I):(P.push(B),F=B,I+1)}function ve(){if(/[^\d\w_]/.test(B)){var se=P.join("");return $[se]?R=_:q[se]?R=C:R=M,ee(P.join("")),R=c,I}return P.push(B),F=B,I+1}}},3508:function(l,e,t){var a=t(6852);a=a.slice().filter(function(r){return!/^(gl\_|texture)/.test(r)}),l.exports=a.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(l){l.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(l,e,t){var a=t(620);l.exports=a.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(l){l.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(l){l.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(l,e,t){var a=t(5874);l.exports=r;function r(n,o){var s=a(o),c=[];return c=c.concat(s(n)),c=c.concat(s(null)),c}},3236:function(l){l.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),a=[],r=0;r>1,g=-7,i=r?o-1:0,w=r?-1:1,S=t[a+i];for(i+=w,s=S&(1<<-g)-1,S>>=-g,g+=m;g>0;s=s*256+t[a+i],i+=w,g-=8);for(c=s&(1<<-g)-1,s>>=-g,g+=n;g>0;c=c*256+t[a+i],i+=w,g-=8);if(s===0)s=1-p;else{if(s===h)return c?NaN:(S?-1:1)*(1/0);c=c+Math.pow(2,n),s=s-p}return(S?-1:1)*c*Math.pow(2,s-n)},e.write=function(t,a,r,n,o,s){var c,m,h,p=s*8-o-1,g=(1<>1,w=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=n?0:s-1,M=n?1:-1,C=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(m=isNaN(a)?1:0,c=g):(c=Math.floor(Math.log(a)/Math.LN2),a*(h=Math.pow(2,-c))<1&&(c--,h*=2),c+i>=1?a+=w/h:a+=w*Math.pow(2,1-i),a*h>=2&&(c++,h/=2),c+i>=g?(m=0,c=g):c+i>=1?(m=(a*h-1)*Math.pow(2,o),c=c+i):(m=a*Math.pow(2,i-1)*Math.pow(2,o),c=0));o>=8;t[r+S]=m&255,S+=M,m/=256,o-=8);for(c=c<0;t[r+S]=c&255,S+=M,c/=256,p-=8);t[r+S-M]|=C*128}},8954:function(l,e,t){"use strict";l.exports=i;var a=t(3250),r=t(6803).Fw;function n(w,S,M){this.vertices=w,this.adjacent=S,this.boundary=M,this.lastVisited=-1}n.prototype.flip=function(){var w=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=w;var S=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=S};function o(w,S,M){this.vertices=w,this.cell=S,this.index=M}function s(w,S){return r(w.vertices,S.vertices)}function c(w){return function(){var S=this.tuple;return w.apply(this,S)}}function m(w){var S=a[w+1];return S||(S=a),c(S)}var h=[];function p(w,S,M){this.dimension=w,this.vertices=S,this.simplices=M,this.interior=M.filter(function(T){return!T.boundary}),this.tuple=new Array(w+1);for(var C=0;C<=w;++C)this.tuple[C]=this.vertices[C];var _=h[w];_||(_=h[w]=m(w)),this.orient=_}var g=p.prototype;g.handleBoundaryDegeneracy=function(w,S){var M=this.dimension,C=this.vertices.length-1,_=this.tuple,T=this.vertices,f=[w];for(w.lastVisited=-C;f.length>0;){w=f.pop();for(var u=w.adjacent,A=0;A<=M;++A){var b=u[A];if(!(!b.boundary||b.lastVisited<=-C)){for(var z=b.vertices,I=0;I<=M;++I){var N=z[I];N<0?_[I]=S:_[I]=T[N]}var R=this.orient();if(R>0)return b;b.lastVisited=-C,R===0&&f.push(b)}}}return null},g.walk=function(w,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,T=this.tuple,f=S?this.interior.length*Math.random()|0:this.interior.length-1,u=this.interior[f];e:for(;!u.boundary;){for(var A=u.vertices,b=u.adjacent,z=0;z<=C;++z)T[z]=_[A[z]];u.lastVisited=M;for(var z=0;z<=C;++z){var I=b[z];if(!(I.lastVisited>=M)){var N=T[z];T[z]=w;var R=this.orient();if(T[z]=N,R<0){u=I;continue e}else I.boundary?I.lastVisited=-M:I.lastVisited=M}}return}return u},g.addPeaks=function(w,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,T=this.tuple,f=this.interior,u=this.simplices,A=[S];S.lastVisited=M,S.vertices[S.vertices.indexOf(-1)]=M,S.boundary=!1,f.push(S);for(var b=[];A.length>0;){var S=A.pop(),z=S.vertices,I=S.adjacent,N=z.indexOf(M);if(!(N<0)){for(var R=0;R<=C;++R)if(R!==N){var B=I[R];if(!(!B.boundary||B.lastVisited>=M)){var F=B.vertices;if(B.lastVisited!==-M){for(var P=0,j=0;j<=C;++j)F[j]<0?(P=j,T[j]=w):T[j]=_[F[j]];var U=this.orient();if(U>0){F[P]=M,B.boundary=!1,f.push(B),A.push(B),B.lastVisited=M;continue}else B.lastVisited=-M}var Z=B.adjacent,Q=z.slice(),re=I.slice(),ae=new n(Q,re,!0);u.push(ae);var oe=Z.indexOf(S);if(!(oe<0)){Z[oe]=ae,re[N]=B,Q[R]=-1,re[R]=S,I[R]=ae,ae.flip();for(var j=0;j<=C;++j){var H=Q[j];if(!(H<0||H===M)){for(var X=new Array(C-1),K=0,G=0;G<=C;++G){var Y=Q[G];Y<0||G===j||(X[K++]=Y)}b.push(new o(X,ae,j))}}}}}}}b.sort(s);for(var R=0;R+1=0?f[A++]=u[z]:b=z&1;if(b===(w&1)){var I=f[0];f[0]=f[1],f[1]=I}S.push(f)}}return S};function i(w,S){var M=w.length;if(M===0)throw new Error("Must have at least d+1 points");var C=w[0].length;if(M<=C)throw new Error("Must input at least d+1 points");var _=w.slice(0,C+1),T=a.apply(void 0,_);if(T===0)throw new Error("Input not in general position");for(var f=new Array(C+1),u=0;u<=C;++u)f[u]=u;T<0&&(f[0]=1,f[1]=0);for(var A=new n(f,new Array(C+1),!1),b=A.adjacent,z=new Array(C+2),u=0;u<=C;++u){for(var I=f.slice(),N=0;N<=C;++N)N===u&&(I[N]=-1);var R=I[0];I[0]=I[1],I[1]=R;var B=new n(I,new Array(C+1),!0);b[u]=B,z[u]=B}z[C+1]=A;for(var u=0;u<=C;++u)for(var I=b[u].vertices,F=b[u].adjacent,N=0;N<=C;++N){var P=I[N];if(P<0){F[N]=A;continue}for(var j=0;j<=C;++j)b[j].vertices.indexOf(P)<0&&(F[N]=b[j])}for(var U=new p(C,_,z),Z=!!S,u=C+1;u3*(z+1)?p(this,b):this.left.insert(b):this.left=T([b]);else if(b[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?p(this,b):this.right.insert(b):this.right=T([b]);else{var I=a.ge(this.leftPoints,b,C),N=a.ge(this.rightPoints,b,_);this.leftPoints.splice(I,0,b),this.rightPoints.splice(N,0,b)}},c.remove=function(b){var z=this.count-this.leftPoints;if(b[1]3*(z-1))return g(this,b);var N=this.left.remove(b);return N===o?(this.left=null,this.count-=1,n):(N===n&&(this.count-=1),N)}else if(b[0]>this.mid){if(!this.right)return r;var R=this.left?this.left.count:0;if(4*R>3*(z-1))return g(this,b);var N=this.right.remove(b);return N===o?(this.right=null,this.count-=1,n):(N===n&&(this.count-=1),N)}else{if(this.count===1)return this.leftPoints[0]===b?o:r;if(this.leftPoints.length===1&&this.leftPoints[0]===b){if(this.left&&this.right){for(var B=this,F=this.left;F.right;)B=F,F=F.right;if(B===this)F.right=this.right;else{var P=this.left,N=this.right;B.count-=F.count,B.right=F.left,F.left=P,F.right=N}m(this,F),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?m(this,this.left):m(this,this.right);return n}for(var P=a.ge(this.leftPoints,b,C);P=0&&b[N][1]>=z;--N){var R=I(b[N]);if(R)return R}}function S(b,z){for(var I=0;Ithis.mid){if(this.right){var I=this.right.queryPoint(b,z);if(I)return I}return w(this.rightPoints,b,z)}else return S(this.leftPoints,z)},c.queryInterval=function(b,z,I){if(bthis.mid&&this.right){var N=this.right.queryInterval(b,z,I);if(N)return N}return zthis.mid?w(this.rightPoints,b,I):S(this.leftPoints,I)};function M(b,z){return b-z}function C(b,z){var I=b[0]-z[0];return I||b[1]-z[1]}function _(b,z){var I=b[1]-z[1];return I||b[0]-z[0]}function T(b){if(b.length===0)return null;for(var z=[],I=0;I>1],R=[],B=[],F=[],I=0;I13)&&a!==32&&a!==133&&a!==160&&a!==5760&&a!==6158&&(a<8192||a>8205)&&a!==8232&&a!==8233&&a!==8239&&a!==8287&&a!==8288&&a!==12288&&a!==65279)return!1;return!0}},395:function(l){function e(t,a,r){return t*(1-r)+a*r}l.exports=e},2652:function(l,e,t){var a=t(4335),r=t(6864),n=t(1903),o=t(9921),s=t(7608),c=t(5665),m={length:t(1387),normalize:t(3536),dot:t(244),cross:t(5911)},h=r(),p=r(),g=[0,0,0,0],i=[[0,0,0],[0,0,0],[0,0,0]],w=[0,0,0];l.exports=function(T,f,u,A,b,z){if(f||(f=[0,0,0]),u||(u=[0,0,0]),A||(A=[0,0,0]),b||(b=[0,0,0,1]),z||(z=[0,0,0,1]),!a(h,T)||(n(p,h),p[3]=0,p[7]=0,p[11]=0,p[15]=1,Math.abs(o(p)<1e-8)))return!1;var I=h[3],N=h[7],R=h[11],B=h[12],F=h[13],P=h[14],j=h[15];if(I!==0||N!==0||R!==0){g[0]=I,g[1]=N,g[2]=R,g[3]=j;var U=s(p,p);if(!U)return!1;c(p,p),S(b,g,p)}else b[0]=b[1]=b[2]=0,b[3]=1;if(f[0]=B,f[1]=F,f[2]=P,M(i,h),u[0]=m.length(i[0]),m.normalize(i[0],i[0]),A[0]=m.dot(i[0],i[1]),C(i[1],i[1],i[0],1,-A[0]),u[1]=m.length(i[1]),m.normalize(i[1],i[1]),A[0]/=u[1],A[1]=m.dot(i[0],i[2]),C(i[2],i[2],i[0],1,-A[1]),A[2]=m.dot(i[1],i[2]),C(i[2],i[2],i[1],1,-A[2]),u[2]=m.length(i[2]),m.normalize(i[2],i[2]),A[1]/=u[2],A[2]/=u[2],m.cross(w,i[1],i[2]),m.dot(i[0],w)<0)for(var Z=0;Z<3;Z++)u[Z]*=-1,i[Z][0]*=-1,i[Z][1]*=-1,i[Z][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+i[0][0]-i[1][1]-i[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-i[0][0]+i[1][1]-i[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-i[0][0]-i[1][1]+i[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+i[0][0]+i[1][1]+i[2][2],0)),i[2][1]>i[1][2]&&(z[0]=-z[0]),i[0][2]>i[2][0]&&(z[1]=-z[1]),i[1][0]>i[0][1]&&(z[2]=-z[2]),!0};function S(_,T,f){var u=T[0],A=T[1],b=T[2],z=T[3];return _[0]=f[0]*u+f[4]*A+f[8]*b+f[12]*z,_[1]=f[1]*u+f[5]*A+f[9]*b+f[13]*z,_[2]=f[2]*u+f[6]*A+f[10]*b+f[14]*z,_[3]=f[3]*u+f[7]*A+f[11]*b+f[15]*z,_}function M(_,T){_[0][0]=T[0],_[0][1]=T[1],_[0][2]=T[2],_[1][0]=T[4],_[1][1]=T[5],_[1][2]=T[6],_[2][0]=T[8],_[2][1]=T[9],_[2][2]=T[10]}function C(_,T,f,u,A){_[0]=T[0]*u+f[0]*A,_[1]=T[1]*u+f[1]*A,_[2]=T[2]*u+f[2]*A}},4335:function(l){l.exports=function(t,a){var r=a[15];if(r===0)return!1;for(var n=1/r,o=0;o<16;o++)t[o]=a[o]*n;return!0}},7442:function(l,e,t){var a=t(6658),r=t(7182),n=t(2652),o=t(9921),s=t(8648),c=g(),m=g(),h=g();l.exports=p;function p(S,M,C,_){if(o(M)===0||o(C)===0)return!1;var T=n(M,c.translate,c.scale,c.skew,c.perspective,c.quaternion),f=n(C,m.translate,m.scale,m.skew,m.perspective,m.quaternion);return!T||!f?!1:(a(h.translate,c.translate,m.translate,_),a(h.skew,c.skew,m.skew,_),a(h.scale,c.scale,m.scale,_),a(h.perspective,c.perspective,m.perspective,_),s(h.quaternion,c.quaternion,m.quaternion,_),r(S,h.translate,h.scale,h.skew,h.perspective,h.quaternion),!0)}function g(){return{translate:i(),scale:i(1),skew:i(),perspective:w(),quaternion:w()}}function i(S){return[S||0,S||0,S||0]}function w(){return[0,0,0,1]}},7182:function(l,e,t){var a={identity:t(7894),translate:t(7656),multiply:t(6760),create:t(6864),scale:t(2504),fromRotationTranslation:t(6743)},r=a.create(),n=a.create();l.exports=function(s,c,m,h,p,g){return a.identity(s),a.fromRotationTranslation(s,g,c),s[3]=p[0],s[7]=p[1],s[11]=p[2],s[15]=p[3],a.identity(n),h[2]!==0&&(n[9]=h[2],a.multiply(s,s,n)),h[1]!==0&&(n[9]=0,n[8]=h[1],a.multiply(s,s,n)),h[0]!==0&&(n[8]=0,n[4]=h[0],a.multiply(s,s,n)),a.scale(s,s,m),s}},1811:function(l,e,t){"use strict";var a=t(2478),r=t(7442),n=t(7608),o=t(5567),s=t(2408),c=t(7089),m=t(6582),h=t(7656),p=t(2504),g=t(3536),i=[0,0,0];l.exports=C;function w(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var S=w.prototype;S.recalcMatrix=function(_){var T=this._time,f=a.le(T,_),u=this.computedMatrix;if(!(f<0)){var A=this._components;if(f===T.length-1)for(var b=16*f,z=0;z<16;++z)u[z]=A[b++];else{for(var I=T[f+1]-T[f],b=16*f,N=this.prevMatrix,R=!0,z=0;z<16;++z)N[z]=A[b++];for(var B=this.nextMatrix,z=0;z<16;++z)B[z]=A[b++],R=R&&N[z]===B[z];if(I<1e-6||R)for(var z=0;z<16;++z)u[z]=N[z];else r(u,N,B,(_-T[f])/I)}var F=this.computedUp;F[0]=u[1],F[1]=u[5],F[2]=u[9],g(F,F);var P=this.computedInverse;n(P,u);var j=this.computedEye,U=P[15];j[0]=P[12]/U,j[1]=P[13]/U,j[2]=P[14]/U;for(var Z=this.computedCenter,Q=Math.exp(this.computedRadius[0]),z=0;z<3;++z)Z[z]=j[z]-u[2+4*z]*Q}},S.idle=function(_){if(!(_1&&a(n[m[i-2]],n[m[i-1]],g)<=0;)i-=1,m.pop();for(m.push(p),i=h.length;i>1&&a(n[h[i-2]],n[h[i-1]],g)>=0;)i-=1,h.pop();h.push(p)}for(var w=new Array(h.length+m.length-2),S=0,s=0,M=m.length;s0;--C)w[S++]=h[C];return w}},351:function(l,e,t){"use strict";l.exports=r;var a=t(4687);function r(n,o){o||(o=n,n=window);var s=0,c=0,m=0,h={shift:!1,alt:!1,control:!1,meta:!1},p=!1;function g(b){var z=!1;return"altKey"in b&&(z=z||b.altKey!==h.alt,h.alt=!!b.altKey),"shiftKey"in b&&(z=z||b.shiftKey!==h.shift,h.shift=!!b.shiftKey),"ctrlKey"in b&&(z=z||b.ctrlKey!==h.control,h.control=!!b.ctrlKey),"metaKey"in b&&(z=z||b.metaKey!==h.meta,h.meta=!!b.metaKey),z}function i(b,z){var I=a.x(z),N=a.y(z);"buttons"in z&&(b=z.buttons|0),(b!==s||I!==c||N!==m||g(z))&&(s=b|0,c=I||0,m=N||0,o&&o(s,c,m,h))}function w(b){i(0,b)}function S(){(s||c||m||h.shift||h.alt||h.meta||h.control)&&(c=m=0,s=0,h.shift=h.alt=h.control=h.meta=!1,o&&o(0,0,0,h))}function M(b){g(b)&&o&&o(s,c,m,h)}function C(b){a.buttons(b)===0?i(0,b):i(s,b)}function _(b){i(s|a.buttons(b),b)}function T(b){i(s&~a.buttons(b),b)}function f(){p||(p=!0,n.addEventListener("mousemove",C),n.addEventListener("mousedown",_),n.addEventListener("mouseup",T),n.addEventListener("mouseleave",w),n.addEventListener("mouseenter",w),n.addEventListener("mouseout",w),n.addEventListener("mouseover",w),n.addEventListener("blur",S),n.addEventListener("keyup",M),n.addEventListener("keydown",M),n.addEventListener("keypress",M),n!==window&&(window.addEventListener("blur",S),window.addEventListener("keyup",M),window.addEventListener("keydown",M),window.addEventListener("keypress",M)))}function u(){p&&(p=!1,n.removeEventListener("mousemove",C),n.removeEventListener("mousedown",_),n.removeEventListener("mouseup",T),n.removeEventListener("mouseleave",w),n.removeEventListener("mouseenter",w),n.removeEventListener("mouseout",w),n.removeEventListener("mouseover",w),n.removeEventListener("blur",S),n.removeEventListener("keyup",M),n.removeEventListener("keydown",M),n.removeEventListener("keypress",M),n!==window&&(window.removeEventListener("blur",S),window.removeEventListener("keyup",M),window.removeEventListener("keydown",M),window.removeEventListener("keypress",M)))}f();var A={element:n};return Object.defineProperties(A,{enabled:{get:function(){return p},set:function(b){b?f():u()},enumerable:!0},buttons:{get:function(){return s},enumerable:!0},x:{get:function(){return c},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return h},enumerable:!0}}),A}},24:function(l){var e={left:0,top:0};l.exports=t;function t(r,n,o){n=n||r.currentTarget||r.srcElement,Array.isArray(o)||(o=[0,0]);var s=r.clientX||0,c=r.clientY||0,m=a(n);return o[0]=s-m.left,o[1]=c-m.top,o}function a(r){return r===window||r===document||r===document.body?e:r.getBoundingClientRect()}},4687:function(l,e){"use strict";function t(o){if(typeof o=="object"){if("buttons"in o)return o.buttons;if("which"in o){var s=o.which;if(s===2)return 4;if(s===3)return 2;if(s>0)return 1<=0)return 1<0){if(re=1,H[K++]=h(f[z],S,M,C),z+=U,_>0)for(Q=1,I=f[z],G=H[K]=h(I,S,M,C),$=H[K+Y],fe=H[K+ee],Ae=H[K+ye],(G!==$||G!==fe||G!==Ae)&&(R=f[z+N],F=f[z+B],j=f[z+P],c(Q,re,I,R,F,j,G,$,fe,Ae,S,M,C),Me=X[K]=ae++),K+=1,z+=U,Q=2;Q<_;++Q)I=f[z],G=H[K]=h(I,S,M,C),$=H[K+Y],fe=H[K+ee],Ae=H[K+ye],(G!==$||G!==fe||G!==Ae)&&(R=f[z+N],F=f[z+B],j=f[z+P],c(Q,re,I,R,F,j,G,$,fe,Ae,S,M,C),Me=X[K]=ae++,Ae!==$&&m(X[K+Y],Me,j,R,Ae,$,S,M,C)),K+=1,z+=U;for(z+=Z,K=0,Ie=Y,Y=q,q=Ie,Ie=ee,ee=ne,ne=Ie,Ie=ye,ye=xe,xe=Ie,re=2;re0)for(Q=1,I=f[z],G=H[K]=h(I,S,M,C),$=H[K+Y],fe=H[K+ee],Ae=H[K+ye],(G!==$||G!==fe||G!==Ae)&&(R=f[z+N],F=f[z+B],j=f[z+P],c(Q,re,I,R,F,j,G,$,fe,Ae,S,M,C),Me=X[K]=ae++,Ae!==fe&&m(X[K+ee],Me,F,j,fe,Ae,S,M,C)),K+=1,z+=U,Q=2;Q<_;++Q)I=f[z],G=H[K]=h(I,S,M,C),$=H[K+Y],fe=H[K+ee],Ae=H[K+ye],(G!==$||G!==fe||G!==Ae)&&(R=f[z+N],F=f[z+B],j=f[z+P],c(Q,re,I,R,F,j,G,$,fe,Ae,S,M,C),Me=X[K]=ae++,Ae!==fe&&m(X[K+ee],Me,F,j,fe,Ae,S,M,C),Ae!==$&&m(X[K+Y],Me,j,R,Ae,$,S,M,C)),K+=1,z+=U;re&1&&(K=0),Ie=Y,Y=q,q=Ie,Ie=ee,ee=ne,ne=Ie,Ie=ye,ye=xe,xe=Ie,z+=Z}}g(X),g(H)}},"false,1,0":function(c,m,h,p,g){return function(w,S,M,C){var _=w.shape[0]|0,T=w.shape[1]|0,f=w.data,u=w.offset|0,A=w.stride[0]|0,b=w.stride[1]|0,z=u,I,N=-A|0,R=0,B=-b|0,F=0,P=-A-b|0,j=0,U=b|0,Z=A-b*T|0,Q=0,re=0,ae=0,oe=2*T|0,H=p(oe),X=p(oe),K=0,G=0,Y=-1,q=-1,$=0,ee=-T|0,ne=T|0,fe=0,ye=-T-1|0,xe=T-1|0,Ae=0,Me=0,Ie=0;for(re=0;re0){if(Q=1,H[K++]=h(f[z],S,M,C),z+=U,T>0)for(re=1,I=f[z],G=H[K]=h(I,S,M,C),fe=H[K+ee],$=H[K+Y],Ae=H[K+ye],(G!==fe||G!==$||G!==Ae)&&(R=f[z+N],F=f[z+B],j=f[z+P],c(Q,re,I,R,F,j,G,fe,$,Ae,S,M,C),Me=X[K]=ae++),K+=1,z+=U,re=2;re0)for(re=1,I=f[z],G=H[K]=h(I,S,M,C),fe=H[K+ee],$=H[K+Y],Ae=H[K+ye],(G!==fe||G!==$||G!==Ae)&&(R=f[z+N],F=f[z+B],j=f[z+P],c(Q,re,I,R,F,j,G,fe,$,Ae,S,M,C),Me=X[K]=ae++,Ae!==fe&&m(X[K+ee],Me,j,R,Ae,fe,S,M,C)),K+=1,z+=U,re=2;re 0"),typeof s.vertex!="function"&&c("Must specify vertex creation function"),typeof s.cell!="function"&&c("Must specify cell creation function"),typeof s.phase!="function"&&c("Must specify phase function");for(var g=s.getters||[],i=new Array(h),w=0;w=0?i[w]=!0:i[w]=!1;return n(s.vertex,s.cell,s.phase,p,m,i)}},6199:function(l,e,t){"use strict";var a=t(1338),r={zero:function(C,_,T,f){var u=C[0],A=T[0];f|=0;var b=0,z=A;for(b=0;b2&&b[1]>2&&f(A.pick(-1,-1).lo(1,1).hi(b[0]-2,b[1]-2),u.pick(-1,-1,0).lo(1,1).hi(b[0]-2,b[1]-2),u.pick(-1,-1,1).lo(1,1).hi(b[0]-2,b[1]-2)),b[1]>2&&(T(A.pick(0,-1).lo(1).hi(b[1]-2),u.pick(0,-1,1).lo(1).hi(b[1]-2)),_(u.pick(0,-1,0).lo(1).hi(b[1]-2))),b[1]>2&&(T(A.pick(b[0]-1,-1).lo(1).hi(b[1]-2),u.pick(b[0]-1,-1,1).lo(1).hi(b[1]-2)),_(u.pick(b[0]-1,-1,0).lo(1).hi(b[1]-2))),b[0]>2&&(T(A.pick(-1,0).lo(1).hi(b[0]-2),u.pick(-1,0,0).lo(1).hi(b[0]-2)),_(u.pick(-1,0,1).lo(1).hi(b[0]-2))),b[0]>2&&(T(A.pick(-1,b[1]-1).lo(1).hi(b[0]-2),u.pick(-1,b[1]-1,0).lo(1).hi(b[0]-2)),_(u.pick(-1,b[1]-1,1).lo(1).hi(b[0]-2))),u.set(0,0,0,0),u.set(0,0,1,0),u.set(b[0]-1,0,0,0),u.set(b[0]-1,0,1,0),u.set(0,b[1]-1,0,0),u.set(0,b[1]-1,1,0),u.set(b[0]-1,b[1]-1,0,0),u.set(b[0]-1,b[1]-1,1,0),u}}function M(C){var _=C.join(),b=h[_];if(b)return b;for(var T=C.length,f=[g,i],u=1;u<=T;++u)f.push(w(u));var A=S,b=A.apply(void 0,f);return h[_]=b,b}l.exports=function(_,T,f){if(Array.isArray(f)||(typeof f=="string"?f=a(T.dimension,f):f=a(T.dimension,"clamp")),T.size===0)return _;if(T.dimension===0)return _.set(0),_;var u=M(f);return u(_,T)}},4317:function(l){"use strict";function e(o,s){var c=Math.floor(s),m=s-c,h=0<=c&&c0;){F<64?(_=F,F=0):(_=64,F-=64);for(var P=h[1]|0;P>0;){P<64?(T=P,P=0):(T=64,P-=64),i=R+F*u+P*A,M=B+F*z+P*I;var j=0,U=0,Z=0,Q=b,re=u-f*b,ae=A-_*u,oe=N,H=z-f*N,X=I-_*z;for(Z=0;Z0;){I<64?(_=I,I=0):(_=64,I-=64);for(var N=h[0]|0;N>0;){N<64?(C=N,N=0):(C=64,N-=64),i=b+I*f+N*T,M=z+I*A+N*u;var R=0,B=0,F=f,P=T-_*f,j=A,U=u-_*A;for(B=0;B0;){B<64?(T=B,B=0):(T=64,B-=64);for(var F=h[0]|0;F>0;){F<64?(C=F,F=0):(C=64,F-=64);for(var P=h[1]|0;P>0;){P<64?(_=P,P=0):(_=64,P-=64),i=N+B*A+F*f+P*u,M=R+B*I+F*b+P*z;var j=0,U=0,Z=0,Q=A,re=f-T*A,ae=u-C*f,oe=I,H=b-T*I,X=z-C*b;for(Z=0;Z<_;++Z){for(U=0;Uw;){j=0,U=R-_;t:for(F=0;FQ)break t;U+=b,j+=z}for(j=R,U=R-_,F=0;F>1,P=F-N,j=F+N,U=R,Z=P,Q=F,re=j,ae=B,oe=S+1,H=M-1,X=!0,K,G,Y,q,$,ee,ne,fe,ye,xe=0,Ae=0,Me=0,Ie,Ue,qe,ke,ge,ue,ve,se,Te,Fe,We,Ge,gt,mt,Tt,At,Kt=A,nr=g(Kt),_r=g(Kt);Ue=T*U,qe=T*Z,At=_;e:for(Ie=0;Ie0){G=U,U=Z,Z=G;break e}if(Me<0)break e;At+=z}Ue=T*re,qe=T*ae,At=_;e:for(Ie=0;Ie0){G=re,re=ae,ae=G;break e}if(Me<0)break e;At+=z}Ue=T*U,qe=T*Q,At=_;e:for(Ie=0;Ie0){G=U,U=Q,Q=G;break e}if(Me<0)break e;At+=z}Ue=T*Z,qe=T*Q,At=_;e:for(Ie=0;Ie0){G=Z,Z=Q,Q=G;break e}if(Me<0)break e;At+=z}Ue=T*U,qe=T*re,At=_;e:for(Ie=0;Ie0){G=U,U=re,re=G;break e}if(Me<0)break e;At+=z}Ue=T*Q,qe=T*re,At=_;e:for(Ie=0;Ie0){G=Q,Q=re,re=G;break e}if(Me<0)break e;At+=z}Ue=T*Z,qe=T*ae,At=_;e:for(Ie=0;Ie0){G=Z,Z=ae,ae=G;break e}if(Me<0)break e;At+=z}Ue=T*Z,qe=T*Q,At=_;e:for(Ie=0;Ie0){G=Z,Z=Q,Q=G;break e}if(Me<0)break e;At+=z}Ue=T*re,qe=T*ae,At=_;e:for(Ie=0;Ie0){G=re,re=ae,ae=G;break e}if(Me<0)break e;At+=z}for(Ue=T*U,qe=T*Z,ke=T*Q,ge=T*re,ue=T*ae,ve=T*R,se=T*F,Te=T*B,Tt=0,At=_,Ie=0;Ie0)H--;else if(Me<0){for(Ue=T*ee,qe=T*oe,ke=T*H,At=_,Ie=0;Ie0)for(;;){ne=_+H*T,Tt=0;e:for(Ie=0;Ie0){if(--HB){e:for(;;){for(ne=_+oe*T,Tt=0,At=_,Ie=0;Ie1&&w?M(i,w[0],w[1]):M(i)}var m={"uint32,1,0":function(p,g){return function(i){var w=i.data,S=i.offset|0,M=i.shape,C=i.stride,_=C[0]|0,T=M[0]|0,f=C[1]|0,u=M[1]|0,A=f,b=f,z=1;T<=32?p(0,T-1,w,S,_,f,T,u,A,b,z):g(0,T-1,w,S,_,f,T,u,A,b,z)}}};function h(p,g){var i=[g,p].join(","),w=m[i],S=o(p,g),M=c(p,g,S);return w(S,M)}l.exports=h},446:function(l,e,t){"use strict";var a=t(7640),r={};function n(o){var s=o.order,c=o.dtype,m=[s,c],h=m.join(":"),p=r[h];return p||(r[h]=p=a(s,c)),p(o),o}l.exports=n},9618:function(l,e,t){var a=t(7163),r=typeof Float64Array<"u";function n(g,i){return g[0]-i[0]}function o(){var g=this.stride,i=new Array(g.length),w;for(w=0;w=0&&(f=_|0,T+=A*f,u-=f),new S(this.data,u,A,T)},M.step=function(_){var T=this.shape[0],f=this.stride[0],u=this.offset,A=0,b=Math.ceil;return typeof _=="number"&&(A=_|0,A<0?(u+=f*(T-1),T=b(-T/A)):T=b(T/A),f*=A),new S(this.data,T,f,u)},M.transpose=function(_){_=_===void 0?0:_|0;var T=this.shape,f=this.stride;return new S(this.data,T[_],f[_],this.offset)},M.pick=function(_){var T=[],f=[],u=this.offset;typeof _=="number"&&_>=0?u=u+this.stride[0]*_|0:(T.push(this.shape[0]),f.push(this.stride[0]));var A=i[T.length+1];return A(this.data,T,f,u)},function(_,T,f,u){return new S(_,T[0],f[0],u)}},2:function(g,i,w){function S(C,_,T,f,u,A){this.data=C,this.shape=[_,T],this.stride=[f,u],this.offset=A|0}var M=S.prototype;return M.dtype=g,M.dimension=2,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(M,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),M.set=function(_,T,f){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T,f):this.data[this.offset+this.stride[0]*_+this.stride[1]*T]=f},M.get=function(_,T){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T):this.data[this.offset+this.stride[0]*_+this.stride[1]*T]},M.index=function(_,T){return this.offset+this.stride[0]*_+this.stride[1]*T},M.hi=function(_,T){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,this.stride[0],this.stride[1],this.offset)},M.lo=function(_,T){var f=this.offset,u=0,A=this.shape[0],b=this.shape[1],z=this.stride[0],I=this.stride[1];return typeof _=="number"&&_>=0&&(u=_|0,f+=z*u,A-=u),typeof T=="number"&&T>=0&&(u=T|0,f+=I*u,b-=u),new S(this.data,A,b,z,I,f)},M.step=function(_,T){var f=this.shape[0],u=this.shape[1],A=this.stride[0],b=this.stride[1],z=this.offset,I=0,N=Math.ceil;return typeof _=="number"&&(I=_|0,I<0?(z+=A*(f-1),f=N(-f/I)):f=N(f/I),A*=I),typeof T=="number"&&(I=T|0,I<0?(z+=b*(u-1),u=N(-u/I)):u=N(u/I),b*=I),new S(this.data,f,u,A,b,z)},M.transpose=function(_,T){_=_===void 0?0:_|0,T=T===void 0?1:T|0;var f=this.shape,u=this.stride;return new S(this.data,f[_],f[T],u[_],u[T],this.offset)},M.pick=function(_,T){var f=[],u=[],A=this.offset;typeof _=="number"&&_>=0?A=A+this.stride[0]*_|0:(f.push(this.shape[0]),u.push(this.stride[0])),typeof T=="number"&&T>=0?A=A+this.stride[1]*T|0:(f.push(this.shape[1]),u.push(this.stride[1]));var b=i[f.length+1];return b(this.data,f,u,A)},function(_,T,f,u){return new S(_,T[0],T[1],f[0],f[1],u)}},3:function(g,i,w){function S(C,_,T,f,u,A,b,z){this.data=C,this.shape=[_,T,f],this.stride=[u,A,b],this.offset=z|0}var M=S.prototype;return M.dtype=g,M.dimension=3,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(M,"order",{get:function(){var _=Math.abs(this.stride[0]),T=Math.abs(this.stride[1]),f=Math.abs(this.stride[2]);return _>T?T>f?[2,1,0]:_>f?[1,2,0]:[1,0,2]:_>f?[2,0,1]:f>T?[0,1,2]:[0,2,1]}}),M.set=function(_,T,f,u){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f,u):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f]=u},M.get=function(_,T,f){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f]},M.index=function(_,T,f){return this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f},M.hi=function(_,T,f){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof f!="number"||f<0?this.shape[2]:f|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},M.lo=function(_,T,f){var u=this.offset,A=0,b=this.shape[0],z=this.shape[1],I=this.shape[2],N=this.stride[0],R=this.stride[1],B=this.stride[2];return typeof _=="number"&&_>=0&&(A=_|0,u+=N*A,b-=A),typeof T=="number"&&T>=0&&(A=T|0,u+=R*A,z-=A),typeof f=="number"&&f>=0&&(A=f|0,u+=B*A,I-=A),new S(this.data,b,z,I,N,R,B,u)},M.step=function(_,T,f){var u=this.shape[0],A=this.shape[1],b=this.shape[2],z=this.stride[0],I=this.stride[1],N=this.stride[2],R=this.offset,B=0,F=Math.ceil;return typeof _=="number"&&(B=_|0,B<0?(R+=z*(u-1),u=F(-u/B)):u=F(u/B),z*=B),typeof T=="number"&&(B=T|0,B<0?(R+=I*(A-1),A=F(-A/B)):A=F(A/B),I*=B),typeof f=="number"&&(B=f|0,B<0?(R+=N*(b-1),b=F(-b/B)):b=F(b/B),N*=B),new S(this.data,u,A,b,z,I,N,R)},M.transpose=function(_,T,f){_=_===void 0?0:_|0,T=T===void 0?1:T|0,f=f===void 0?2:f|0;var u=this.shape,A=this.stride;return new S(this.data,u[_],u[T],u[f],A[_],A[T],A[f],this.offset)},M.pick=function(_,T,f){var u=[],A=[],b=this.offset;typeof _=="number"&&_>=0?b=b+this.stride[0]*_|0:(u.push(this.shape[0]),A.push(this.stride[0])),typeof T=="number"&&T>=0?b=b+this.stride[1]*T|0:(u.push(this.shape[1]),A.push(this.stride[1])),typeof f=="number"&&f>=0?b=b+this.stride[2]*f|0:(u.push(this.shape[2]),A.push(this.stride[2]));var z=i[u.length+1];return z(this.data,u,A,b)},function(_,T,f,u){return new S(_,T[0],T[1],T[2],f[0],f[1],f[2],u)}},4:function(g,i,w){function S(C,_,T,f,u,A,b,z,I,N){this.data=C,this.shape=[_,T,f,u],this.stride=[A,b,z,I],this.offset=N|0}var M=S.prototype;return M.dtype=g,M.dimension=4,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(M,"order",{get:w}),M.set=function(_,T,f,u,A){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u,A):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u]=A},M.get=function(_,T,f,u){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u]},M.index=function(_,T,f,u){return this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u},M.hi=function(_,T,f,u){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof f!="number"||f<0?this.shape[2]:f|0,typeof u!="number"||u<0?this.shape[3]:u|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},M.lo=function(_,T,f,u){var A=this.offset,b=0,z=this.shape[0],I=this.shape[1],N=this.shape[2],R=this.shape[3],B=this.stride[0],F=this.stride[1],P=this.stride[2],j=this.stride[3];return typeof _=="number"&&_>=0&&(b=_|0,A+=B*b,z-=b),typeof T=="number"&&T>=0&&(b=T|0,A+=F*b,I-=b),typeof f=="number"&&f>=0&&(b=f|0,A+=P*b,N-=b),typeof u=="number"&&u>=0&&(b=u|0,A+=j*b,R-=b),new S(this.data,z,I,N,R,B,F,P,j,A)},M.step=function(_,T,f,u){var A=this.shape[0],b=this.shape[1],z=this.shape[2],I=this.shape[3],N=this.stride[0],R=this.stride[1],B=this.stride[2],F=this.stride[3],P=this.offset,j=0,U=Math.ceil;return typeof _=="number"&&(j=_|0,j<0?(P+=N*(A-1),A=U(-A/j)):A=U(A/j),N*=j),typeof T=="number"&&(j=T|0,j<0?(P+=R*(b-1),b=U(-b/j)):b=U(b/j),R*=j),typeof f=="number"&&(j=f|0,j<0?(P+=B*(z-1),z=U(-z/j)):z=U(z/j),B*=j),typeof u=="number"&&(j=u|0,j<0?(P+=F*(I-1),I=U(-I/j)):I=U(I/j),F*=j),new S(this.data,A,b,z,I,N,R,B,F,P)},M.transpose=function(_,T,f,u){_=_===void 0?0:_|0,T=T===void 0?1:T|0,f=f===void 0?2:f|0,u=u===void 0?3:u|0;var A=this.shape,b=this.stride;return new S(this.data,A[_],A[T],A[f],A[u],b[_],b[T],b[f],b[u],this.offset)},M.pick=function(_,T,f,u){var A=[],b=[],z=this.offset;typeof _=="number"&&_>=0?z=z+this.stride[0]*_|0:(A.push(this.shape[0]),b.push(this.stride[0])),typeof T=="number"&&T>=0?z=z+this.stride[1]*T|0:(A.push(this.shape[1]),b.push(this.stride[1])),typeof f=="number"&&f>=0?z=z+this.stride[2]*f|0:(A.push(this.shape[2]),b.push(this.stride[2])),typeof u=="number"&&u>=0?z=z+this.stride[3]*u|0:(A.push(this.shape[3]),b.push(this.stride[3]));var I=i[A.length+1];return I(this.data,A,b,z)},function(_,T,f,u){return new S(_,T[0],T[1],T[2],T[3],f[0],f[1],f[2],f[3],u)}},5:function(i,w,S){function M(_,T,f,u,A,b,z,I,N,R,B,F){this.data=_,this.shape=[T,f,u,A,b],this.stride=[z,I,N,R,B],this.offset=F|0}var C=M.prototype;return C.dtype=i,C.dimension=5,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(C,"order",{get:S}),C.set=function(T,f,u,A,b,z){return i==="generic"?this.data.set(this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*b,z):this.data[this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*b]=z},C.get=function(T,f,u,A,b){return i==="generic"?this.data.get(this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*b):this.data[this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*b]},C.index=function(T,f,u,A,b){return this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*b},C.hi=function(T,f,u,A,b){return new M(this.data,typeof T!="number"||T<0?this.shape[0]:T|0,typeof f!="number"||f<0?this.shape[1]:f|0,typeof u!="number"||u<0?this.shape[2]:u|0,typeof A!="number"||A<0?this.shape[3]:A|0,typeof b!="number"||b<0?this.shape[4]:b|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},C.lo=function(T,f,u,A,b){var z=this.offset,I=0,N=this.shape[0],R=this.shape[1],B=this.shape[2],F=this.shape[3],P=this.shape[4],j=this.stride[0],U=this.stride[1],Z=this.stride[2],Q=this.stride[3],re=this.stride[4];return typeof T=="number"&&T>=0&&(I=T|0,z+=j*I,N-=I),typeof f=="number"&&f>=0&&(I=f|0,z+=U*I,R-=I),typeof u=="number"&&u>=0&&(I=u|0,z+=Z*I,B-=I),typeof A=="number"&&A>=0&&(I=A|0,z+=Q*I,F-=I),typeof b=="number"&&b>=0&&(I=b|0,z+=re*I,P-=I),new M(this.data,N,R,B,F,P,j,U,Z,Q,re,z)},C.step=function(T,f,u,A,b){var z=this.shape[0],I=this.shape[1],N=this.shape[2],R=this.shape[3],B=this.shape[4],F=this.stride[0],P=this.stride[1],j=this.stride[2],U=this.stride[3],Z=this.stride[4],Q=this.offset,re=0,ae=Math.ceil;return typeof T=="number"&&(re=T|0,re<0?(Q+=F*(z-1),z=ae(-z/re)):z=ae(z/re),F*=re),typeof f=="number"&&(re=f|0,re<0?(Q+=P*(I-1),I=ae(-I/re)):I=ae(I/re),P*=re),typeof u=="number"&&(re=u|0,re<0?(Q+=j*(N-1),N=ae(-N/re)):N=ae(N/re),j*=re),typeof A=="number"&&(re=A|0,re<0?(Q+=U*(R-1),R=ae(-R/re)):R=ae(R/re),U*=re),typeof b=="number"&&(re=b|0,re<0?(Q+=Z*(B-1),B=ae(-B/re)):B=ae(B/re),Z*=re),new M(this.data,z,I,N,R,B,F,P,j,U,Z,Q)},C.transpose=function(T,f,u,A,b){T=T===void 0?0:T|0,f=f===void 0?1:f|0,u=u===void 0?2:u|0,A=A===void 0?3:A|0,b=b===void 0?4:b|0;var z=this.shape,I=this.stride;return new M(this.data,z[T],z[f],z[u],z[A],z[b],I[T],I[f],I[u],I[A],I[b],this.offset)},C.pick=function(T,f,u,A,b){var z=[],I=[],N=this.offset;typeof T=="number"&&T>=0?N=N+this.stride[0]*T|0:(z.push(this.shape[0]),I.push(this.stride[0])),typeof f=="number"&&f>=0?N=N+this.stride[1]*f|0:(z.push(this.shape[1]),I.push(this.stride[1])),typeof u=="number"&&u>=0?N=N+this.stride[2]*u|0:(z.push(this.shape[2]),I.push(this.stride[2])),typeof A=="number"&&A>=0?N=N+this.stride[3]*A|0:(z.push(this.shape[3]),I.push(this.stride[3])),typeof b=="number"&&b>=0?N=N+this.stride[4]*b|0:(z.push(this.shape[4]),I.push(this.stride[4]));var R=w[z.length+1];return R(this.data,z,I,N)},function(T,f,u,A){return new M(T,f[0],f[1],f[2],f[3],f[4],u[0],u[1],u[2],u[3],u[4],A)}}};function c(g,i){var w=i===-1?"T":String(i),S=s[w];return i===-1?S(g):i===0?S(g,h[g][0]):S(g,h[g],o)}function m(g){if(a(g))return"buffer";if(r)switch(Object.prototype.toString.call(g)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(g)?"array":"generic"}var h={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function p(g,i,w,S){if(g===void 0){var u=h.array[0];return u([])}else typeof g=="number"&&(g=[g]);i===void 0&&(i=[g.length]);var M=i.length;if(w===void 0){w=new Array(M);for(var C=M-1,_=1;C>=0;--C)w[C]=_,_*=i[C]}if(S===void 0){S=0;for(var C=0;C>>0;l.exports=o;function o(s,c){if(isNaN(s)||isNaN(c))return NaN;if(s===c)return s;if(s===0)return c<0?-r:r;var m=a.hi(s),h=a.lo(s);return c>s==s>0?h===n?(m+=1,h=0):h+=1:h===0?(h=n,m-=1):h-=1,a.pack(h,m)}},8406:function(l,e){var t=1e-6,a=1e-6;e.vertexNormals=function(r,n,o){for(var s=n.length,c=new Array(s),m=o===void 0?t:o,h=0;hm)for(var z=c[i],I=1/Math.sqrt(f*A),b=0;b<3;++b){var N=(b+1)%3,R=(b+2)%3;z[b]+=I*(u[N]*T[R]-u[R]*T[N])}}for(var h=0;hm)for(var I=1/Math.sqrt(B),b=0;b<3;++b)z[b]*=I;else for(var b=0;b<3;++b)z[b]=0}return c},e.faceNormals=function(r,n,o){for(var s=r.length,c=new Array(s),m=o===void 0?a:o,h=0;hm?C=1/Math.sqrt(C):C=0;for(var i=0;i<3;++i)M[i]*=C;c[h]=M}return c}},4081:function(l){"use strict";l.exports=e;function e(t,a,r,n,o,s,c,m,h,p){var g=a+s+p;if(i>0){var i=Math.sqrt(g+1);t[0]=.5*(c-h)/i,t[1]=.5*(m-n)/i,t[2]=.5*(r-s)/i,t[3]=.5*i}else{var w=Math.max(a,s,p),i=Math.sqrt(2*w-g+1);a>=w?(t[0]=.5*i,t[1]=.5*(o+r)/i,t[2]=.5*(m+n)/i,t[3]=.5*(c-h)/i):s>=w?(t[0]=.5*(r+o)/i,t[1]=.5*i,t[2]=.5*(h+c)/i,t[3]=.5*(m-n)/i):(t[0]=.5*(n+m)/i,t[1]=.5*(c+h)/i,t[2]=.5*i,t[3]=.5*(r-o)/i)}return t}},9977:function(l,e,t){"use strict";l.exports=i;var a=t(9215),r=t(6582),n=t(7399),o=t(7608),s=t(4081);function c(w,S,M){return Math.sqrt(Math.pow(w,2)+Math.pow(S,2)+Math.pow(M,2))}function m(w,S,M,C){return Math.sqrt(Math.pow(w,2)+Math.pow(S,2)+Math.pow(M,2)+Math.pow(C,2))}function h(w,S){var M=S[0],C=S[1],_=S[2],T=S[3],f=m(M,C,_,T);f>1e-6?(w[0]=M/f,w[1]=C/f,w[2]=_/f,w[3]=T/f):(w[0]=w[1]=w[2]=0,w[3]=1)}function p(w,S,M){this.radius=a([M]),this.center=a(S),this.rotation=a(w),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var g=p.prototype;g.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},g.recalcMatrix=function(w){this.radius.curve(w),this.center.curve(w),this.rotation.curve(w);var S=this.computedRotation;h(S,S);var M=this.computedMatrix;n(M,S);var C=this.computedCenter,_=this.computedEye,T=this.computedUp,f=Math.exp(this.computedRadius[0]);_[0]=C[0]+f*M[2],_[1]=C[1]+f*M[6],_[2]=C[2]+f*M[10],T[0]=M[1],T[1]=M[5],T[2]=M[9];for(var u=0;u<3;++u){for(var A=0,b=0;b<3;++b)A+=M[u+4*b]*_[b];M[12+u]=-A}},g.getMatrix=function(w,S){this.recalcMatrix(w);var M=this.computedMatrix;if(S){for(var C=0;C<16;++C)S[C]=M[C];return S}return M},g.idle=function(w){this.center.idle(w),this.radius.idle(w),this.rotation.idle(w)},g.flush=function(w){this.center.flush(w),this.radius.flush(w),this.rotation.flush(w)},g.pan=function(w,S,M,C){S=S||0,M=M||0,C=C||0,this.recalcMatrix(w);var _=this.computedMatrix,T=_[1],f=_[5],u=_[9],A=c(T,f,u);T/=A,f/=A,u/=A;var b=_[0],z=_[4],I=_[8],N=b*T+z*f+I*u;b-=T*N,z-=f*N,I-=u*N;var R=c(b,z,I);b/=R,z/=R,I/=R;var B=_[2],F=_[6],P=_[10],j=B*T+F*f+P*u,U=B*b+F*z+P*I;B-=j*T+U*b,F-=j*f+U*z,P-=j*u+U*I;var Z=c(B,F,P);B/=Z,F/=Z,P/=Z;var Q=b*S+T*M,re=z*S+f*M,ae=I*S+u*M;this.center.move(w,Q,re,ae);var oe=Math.exp(this.computedRadius[0]);oe=Math.max(1e-4,oe+C),this.radius.set(w,Math.log(oe))},g.rotate=function(w,S,M,C){this.recalcMatrix(w),S=S||0,M=M||0;var _=this.computedMatrix,T=_[0],f=_[4],u=_[8],A=_[1],b=_[5],z=_[9],I=_[2],N=_[6],R=_[10],B=S*T+M*A,F=S*f+M*b,P=S*u+M*z,j=-(N*P-R*F),U=-(R*B-I*P),Z=-(I*F-N*B),Q=Math.sqrt(Math.max(0,1-Math.pow(j,2)-Math.pow(U,2)-Math.pow(Z,2))),re=m(j,U,Z,Q);re>1e-6?(j/=re,U/=re,Z/=re,Q/=re):(j=U=Z=0,Q=1);var ae=this.computedRotation,oe=ae[0],H=ae[1],X=ae[2],K=ae[3],G=oe*Q+K*j+H*Z-X*U,Y=H*Q+K*U+X*j-oe*Z,q=X*Q+K*Z+oe*U-H*j,$=K*Q-oe*j-H*U-X*Z;if(C){j=I,U=N,Z=R;var ee=Math.sin(C)/c(j,U,Z);j*=ee,U*=ee,Z*=ee,Q=Math.cos(S),G=G*Q+$*j+Y*Z-q*U,Y=Y*Q+$*U+q*j-G*Z,q=q*Q+$*Z+G*U-Y*j,$=$*Q-G*j-Y*U-q*Z}var ne=m(G,Y,q,$);ne>1e-6?(G/=ne,Y/=ne,q/=ne,$/=ne):(G=Y=q=0,$=1),this.rotation.set(w,G,Y,q,$)},g.lookAt=function(w,S,M,C){this.recalcMatrix(w),M=M||this.computedCenter,S=S||this.computedEye,C=C||this.computedUp;var _=this.computedMatrix;r(_,S,M,C);var T=this.computedRotation;s(T,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),h(T,T),this.rotation.set(w,T[0],T[1],T[2],T[3]);for(var f=0,u=0;u<3;++u)f+=Math.pow(M[u]-S[u],2);this.radius.set(w,.5*Math.log(Math.max(f,1e-6))),this.center.set(w,M[0],M[1],M[2])},g.translate=function(w,S,M,C){this.center.move(w,S||0,M||0,C||0)},g.setMatrix=function(w,S){var M=this.computedRotation;s(M,S[0],S[1],S[2],S[4],S[5],S[6],S[8],S[9],S[10]),h(M,M),this.rotation.set(w,M[0],M[1],M[2],M[3]);var C=this.computedMatrix;o(C,S);var _=C[15];if(Math.abs(_)>1e-6){var T=C[12]/_,f=C[13]/_,u=C[14]/_;this.recalcMatrix(w);var A=Math.exp(this.computedRadius[0]);this.center.set(w,T-C[2]*A,f-C[6]*A,u-C[10]*A),this.radius.idle(w)}else this.center.idle(w),this.radius.idle(w)},g.setDistance=function(w,S){S>0&&this.radius.set(w,Math.log(S))},g.setDistanceLimits=function(w,S){w>0?w=Math.log(w):w=-1/0,S>0?S=Math.log(S):S=1/0,S=Math.max(S,w),this.radius.bounds[0][0]=w,this.radius.bounds[1][0]=S},g.getDistanceLimits=function(w){var S=this.radius.bounds;return w?(w[0]=Math.exp(S[0][0]),w[1]=Math.exp(S[1][0]),w):[Math.exp(S[0][0]),Math.exp(S[1][0])]},g.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},g.fromJSON=function(w){var S=this.lastT(),M=w.center;M&&this.center.set(S,M[0],M[1],M[2]);var C=w.rotation;C&&this.rotation.set(S,C[0],C[1],C[2],C[3]);var _=w.distance;_&&_>0&&this.radius.set(S,Math.log(_)),this.setDistanceLimits(w.zoomMin,w.zoomMax)};function i(w){w=w||{};var S=w.center||[0,0,0],M=w.rotation||[0,0,0,1],C=w.radius||1;S=[].slice.call(S,0,3),M=[].slice.call(M,0,4),h(M,M);var _=new p(M,S,Math.log(C));return _.setDistanceLimits(w.zoomMin,w.zoomMax),("eye"in w||"up"in w)&&_.lookAt(0,w.eye,w.center,w.up),_}},1371:function(l,e,t){"use strict";var a=t(3233);l.exports=function(n,o,s){return s=typeof s<"u"?s+"":" ",a(s,o)+n}},3202:function(l){l.exports=function(t,a){a||(a=[0,""]),t=String(t);var r=parseFloat(t,10);return a[0]=r,a[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",a}},3088:function(l,e,t){"use strict";l.exports=r;var a=t(3140);function r(n,o){for(var s=o.length|0,c=n.length,m=[new Array(s),new Array(s)],h=0;h0){z=m[R][A][0],N=R;break}I=z[N^1];for(var B=0;B<2;++B)for(var F=m[B][A],P=0;P0&&(z=j,I=U,N=B)}return b||z&&i(z,N),I}function S(u,A){var b=m[A][u][0],z=[u];i(b,A);for(var I=b[A^1],N=A;;){for(;I!==u;)z.push(I),I=w(z[z.length-2],I,!1);if(m[0][u].length+m[1][u].length===0)break;var R=z[z.length-1],B=u,F=z[1],P=w(R,B,!0);if(a(o[R],o[B],o[F],o[P])<0)break;z.push(u),I=w(R,B)}return z}function M(u,A){return A[1]===A[A.length-1]}for(var h=0;h0;){var T=m[0][h].length,f=S(h,C);M(_,f)?_.push.apply(_,f):(_.length>0&&g.push(_),_=f)}_.length>0&&g.push(_)}return g}},5609:function(l,e,t){"use strict";l.exports=r;var a=t(3134);function r(n,o){for(var s=a(n,o.length),c=new Array(o.length),m=new Array(o.length),h=[],p=0;p0;){var i=h.pop();c[i]=!1;for(var w=s[i],p=0;p0}T=T.filter(f);for(var u=T.length,A=new Array(u),b=new Array(u),_=0;_0;){var ne=q.pop(),fe=re[ne];c(fe,function(Ie,Ue){return Ie-Ue});var ye=fe.length,xe=$[ne],Ae;if(xe===0){var F=T[ne];Ae=[F]}for(var _=0;_=0)&&($[Me]=xe^1,q.push(Me),xe===0)){var F=T[Me];Y(F)||(F.reverse(),Ae.push(F))}}xe===0&&ee.push(Ae)}return ee}},5085:function(l,e,t){l.exports=w;var a=t(3250)[3],r=t(4209),n=t(3352),o=t(2478);function s(){return!0}function c(S){return function(M,C){var _=S[M];return _?!!_.queryPoint(C,s):!1}}function m(S){for(var M={},C=0;C0&&M[_]===C[0])T=S[_-1];else return 1;for(var f=1;T;){var u=T.key,A=a(C,u[0],u[1]);if(u[0][0]0)f=-1,T=T.right;else return 0;else if(A>0)T=T.left;else if(A<0)f=1,T=T.right;else return 0}return f}}function p(S){return 1}function g(S){return function(C){return S(C[0],C[1])?0:1}}function i(S,M){return function(_){return S(_[0],_[1])?0:M(_)}}function w(S){for(var M=S.length,C=[],_=[],T=0,f=0;f=p?(u=1,b=p+2*w+M):(u=-w/p,b=w*u+M)):(u=0,S>=0?(A=0,b=M):-S>=i?(A=1,b=i+2*S+M):(A=-S/i,b=S*A+M));else if(A<0)A=0,w>=0?(u=0,b=M):-w>=p?(u=1,b=p+2*w+M):(u=-w/p,b=w*u+M);else{var z=1/f;u*=z,A*=z,b=u*(p*u+g*A+2*w)+A*(g*u+i*A+2*S)+M}else{var I,N,R,B;u<0?(I=g+w,N=i+S,N>I?(R=N-I,B=p-2*g+i,R>=B?(u=1,A=0,b=p+2*w+M):(u=R/B,A=1-u,b=u*(p*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)):(u=0,N<=0?(A=1,b=i+2*S+M):S>=0?(A=0,b=M):(A=-S/i,b=S*A+M))):A<0?(I=g+S,N=p+w,N>I?(R=N-I,B=p-2*g+i,R>=B?(A=1,u=0,b=i+2*S+M):(A=R/B,u=1-A,b=u*(p*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)):(A=0,N<=0?(u=1,b=p+2*w+M):w>=0?(u=0,b=M):(u=-w/p,b=w*u+M))):(R=i+S-g-w,R<=0?(u=0,A=1,b=i+2*S+M):(B=p-2*g+i,R>=B?(u=1,A=0,b=p+2*w+M):(u=R/B,A=1-u,b=u*(p*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)))}for(var F=1-u-A,h=0;h0){var i=s[m-1];if(a(p,i)===0&&n(i)!==g){m-=1;continue}}s[m++]=p}}return s.length=m,s}},3233:function(l){"use strict";var e="",t;l.exports=a;function a(r,n){if(typeof r!="string")throw new TypeError("expected a string");if(n===1)return r;if(n===2)return r+r;var o=r.length*n;if(t!==r||typeof t>"u")t=r,e="";else if(e.length>=o)return e.substr(0,o);for(;o>e.length&&n>1;)n&1&&(e+=r),n>>=1,r+=r;return e+=r,e=e.substr(0,o),e}},3025:function(l,e,t){l.exports=t.g.performance&&t.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(l){"use strict";l.exports=e;function e(t){for(var a=t.length,r=t[t.length-1],n=a,o=a-2;o>=0;--o){var s=r,c=t[o];r=s+c;var m=r-s,h=c-m;h&&(t[--n]=r,r=h)}for(var p=0,o=n;o0){if(N<=0)return R;B=I+N}else if(I<0){if(N>=0)return R;B=-(I+N)}else return R;var F=m*B;return R>=F||R<=-F?R:S(A,b,z)},function(A,b,z,I){var N=A[0]-I[0],R=b[0]-I[0],B=z[0]-I[0],F=A[1]-I[1],P=b[1]-I[1],j=z[1]-I[1],U=A[2]-I[2],Z=b[2]-I[2],Q=z[2]-I[2],re=R*j,ae=B*P,oe=B*F,H=N*j,X=N*P,K=R*F,G=U*(re-ae)+Z*(oe-H)+Q*(X-K),Y=(Math.abs(re)+Math.abs(ae))*Math.abs(U)+(Math.abs(oe)+Math.abs(H))*Math.abs(Z)+(Math.abs(X)+Math.abs(K))*Math.abs(Q),q=h*Y;return G>q||-G>q?G:M(A,b,z,I)}];function _(u){var A=C[u.length];return A||(A=C[u.length]=w(u.length)),A.apply(void 0,u)}function T(u,A,b,z,I,N,R){return function(F,P,j,U,Z){switch(arguments.length){case 0:case 1:return 0;case 2:return z(F,P);case 3:return I(F,P,j);case 4:return N(F,P,j,U);case 5:return R(F,P,j,U,Z)}for(var Q=new Array(arguments.length),re=0;re0&&p>0||h<0&&p<0)return!1;var g=a(c,o,s),i=a(m,o,s);return g>0&&i>0||g<0&&i<0?!1:h===0&&p===0&&g===0&&i===0?r(o,s,c,m):!0}},8545:function(l){"use strict";l.exports=t;function e(a,r){var n=a+r,o=n-a,s=n-o,c=r-o,m=a-s,h=m+c;return h?[h,n]:[n]}function t(a,r){var n=a.length|0,o=r.length|0;if(n===1&&o===1)return e(a[0],-r[0]);var s=n+o,c=new Array(s),m=0,h=0,p=0,g=Math.abs,i=a[h],w=g(i),S=-r[p],M=g(S),C,_;w=o?(C=i,h+=1,h=o?(C=i,h+=1,h"u"&&(C=s(w));var _=w.length;if(_===0||C<1)return{cells:[],vertexIds:[],vertexWeights:[]};var T=c(S,+M),f=m(w,C),u=h(f,S,T,+M),A=p(f,S.length|0),b=o(C)(w,f.data,A,T),z=g(f),I=[].slice.call(u.data,0,u.shape[0]);return r.free(T),r.free(f.data),r.free(u.data),r.free(A),{cells:b,vertexIds:z,vertexWeights:I}}},1570:function(l){"use strict";l.exports=t;var e=[function(){function r(o,s,c,m){for(var h=Math.min(c,m)|0,p=Math.max(c,m)|0,g=o[2*h],i=o[2*h+1];g>1,S=s[2*w+1];if(S===p)return w;p>1,S=s[2*w+1];if(S===p)return w;p>1,S=s[2*w+1];if(S===p)return w;p>1,S=s[2*w+1];if(S===p)return w;p>1,B=m(A[R],b);B<=0?(B===0&&(N=R),z=R+1):B>0&&(I=R-1)}return N}a=i;function w(A,b){for(var z=new Array(A.length),I=0,N=z.length;I=A.length||m(A[re],R)!==0););}return z}a=w;function S(A,b){if(!b)return w(g(C(A,0)),A,0);for(var z=new Array(b),I=0;I>>j&1&&P.push(N[j]);b.push(P)}return p(b)}a=M;function C(A,b){if(b<0)return[];for(var z=[],I=(1<0)-(n<0)},e.abs=function(n){var o=n>>t-1;return(n^o)-o},e.min=function(n,o){return o^(n^o)&-(n65535)<<4,n>>>=o,s=(n>255)<<3,n>>>=s,o|=s,s=(n>15)<<2,n>>>=s,o|=s,s=(n>3)<<1,n>>>=s,o|=s,o|n>>1},e.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},e.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function a(n){var o=32;return n&=-n,n&&o--,n&65535&&(o-=16),n&16711935&&(o-=8),n&252645135&&(o-=4),n&858993459&&(o-=2),n&1431655765&&(o-=1),o}e.countTrailingZeros=a,e.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},e.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},e.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var r=new Array(256);(function(n){for(var o=0;o<256;++o){var s=o,c=o,m=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--m;n[o]=c<>>8&255]<<16|r[n>>>16&255]<<8|r[n>>>24&255]},e.interleave2=function(n,o){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,n|o<<1},e.deinterleave2=function(n,o){return n=n>>>o&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},e.interleave3=function(n,o,s){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,n|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,n|s<<2},e.deinterleave3=function(n,o){return n=n>>>o&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},e.nextCombination=function(n){var o=n|n-1;return o+1|(~o&-~o)-1>>>a(n)+1}},2014:function(l,e,t){"use strict";"use restrict";var a=t(3105),r=t(4623);function n(u){for(var A=0,b=Math.max,z=0,I=u.length;z>1,R=c(u[N],A);R<=0?(R===0&&(I=N),b=N+1):R>0&&(z=N-1)}return I}e.findCell=g;function i(u,A){for(var b=new Array(u.length),z=0,I=b.length;z=u.length||c(u[Q],N)!==0););}return b}e.incidence=i;function w(u,A){if(!A)return i(p(M(u,0)),u,0);for(var b=new Array(A),z=0;z>>P&1&&F.push(I[P]);A.push(F)}return h(A)}e.explode=S;function M(u,A){if(A<0)return[];for(var b=[],z=(1<>1:(H>>1)-1}function z(H){for(var X=A(H);;){var K=X,G=2*H+1,Y=2*(H+1),q=H;if(G0;){var K=b(H);if(K>=0){var G=A(K);if(X0){var H=F[0];return u(0,U-1),U-=1,z(0),H}return-1}function R(H,X){var K=F[H];return w[K]===X?H:(w[K]=-1/0,I(H),N(),w[K]=X,U+=1,I(U-1))}function B(H){if(!S[H]){S[H]=!0;var X=g[H],K=i[H];g[K]>=0&&(g[K]=X),i[X]>=0&&(i[X]=K),P[X]>=0&&R(P[X],f(X)),P[K]>=0&&R(P[K],f(K))}}for(var F=[],P=new Array(h),M=0;M>1;M>=0;--M)z(M);for(;;){var Z=N();if(Z<0||w[Z]>m)break;B(Z)}for(var Q=[],M=0;M=0&&K>=0&&X!==K){var G=P[X],Y=P[K];G!==Y&&oe.push([G,Y])}}),r.unique(r.normalize(oe)),{positions:Q,edges:oe}}},1303:function(l,e,t){"use strict";l.exports=n;var a=t(3250);function r(o,s){var c,m;if(s[0][0]s[1][0])c=s[1],m=s[0];else{var h=Math.min(o[0][1],o[1][1]),p=Math.max(o[0][1],o[1][1]),g=Math.min(s[0][1],s[1][1]),i=Math.max(s[0][1],s[1][1]);return pi?h-i:p-i}var w,S;o[0][1]s[1][0])c=s[1],m=s[0];else return r(s,o);var h,p;if(o[0][0]o[1][0])h=o[1],p=o[0];else return-r(o,s);var g=a(c,m,p),i=a(c,m,h);if(g<0){if(i<=0)return g}else if(g>0){if(i>=0)return g}else if(i)return i;if(g=a(p,h,m),i=a(p,h,c),g<0){if(i<=0)return g}else if(g>0){if(i>=0)return g}else if(i)return i;return m[0]-p[0]}},4209:function(l,e,t){"use strict";l.exports=i;var a=t(2478),r=t(3840),n=t(3250),o=t(1303);function s(w,S,M){this.slabs=w,this.coordinates=S,this.horizontal=M}var c=s.prototype;function m(w,S){return w.y-S}function h(w,S){for(var M=null;w;){var C=w.key,_,T;C[0][0]0)if(S[0]!==C[1][0])M=w,w=w.right;else{var u=h(w.right,S);if(u)return u;w=w.left}else{if(S[0]!==C[1][0])return w;var u=h(w.right,S);if(u)return u;w=w.left}}return M}c.castUp=function(w){var S=a.le(this.coordinates,w[0]);if(S<0)return-1;var M=this.slabs[S],C=h(this.slabs[S],w),_=-1;if(C&&(_=C.value),this.coordinates[S]===w[0]){var T=null;if(C&&(T=C.key),S>0){var f=h(this.slabs[S-1],w);f&&(T?o(f.key,T)>0&&(T=f.key,_=f.value):(_=f.value,T=f.key))}var u=this.horizontal[S];if(u.length>0){var A=a.ge(u,w[1],m);if(A=u.length)return _;b=u[A]}}if(b.start)if(T){var z=n(T[0],T[1],[w[0],b.y]);T[0][0]>T[1][0]&&(z=-z),z>0&&(_=b.index)}else _=b.index;else b.y!==w[1]&&(_=b.index)}}}return _};function p(w,S,M,C){this.y=w,this.index=S,this.start=M,this.closed=C}function g(w,S,M,C){this.x=w,this.segment=S,this.create=M,this.index=C}function i(w){for(var S=w.length,M=2*S,C=new Array(M),_=0;_1&&(S=1);for(var M=1-S,C=h.length,_=new Array(C),T=0;T0||w>0&&_<0){var T=o(S,_,M,w);g.push(T),i.push(T.slice())}_<0?i.push(M.slice()):_>0?g.push(M.slice()):(g.push(M.slice()),i.push(M.slice())),w=_}return{positive:g,negative:i}}function c(h,p){for(var g=[],i=n(h[h.length-1],p),w=h[h.length-1],S=h[0],M=0;M0||i>0&&C<0)&&g.push(o(w,C,S,i)),C>=0&&g.push(S.slice()),i=C}return g}function m(h,p){for(var g=[],i=n(h[h.length-1],p),w=h[h.length-1],S=h[0],M=0;M0||i>0&&C<0)&&g.push(o(w,C,S,i)),C<=0&&g.push(S.slice()),i=C}return g}},3387:function(l,e,t){var a;(function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function n(h){return s(m(h),arguments)}function o(h,p){return n.apply(null,[h].concat(p||[]))}function s(h,p){var g=1,i=h.length,w,S="",M,C,_,T,f,u,A,b;for(M=0;M=0),_.type){case"b":w=parseInt(w,10).toString(2);break;case"c":w=String.fromCharCode(parseInt(w,10));break;case"d":case"i":w=parseInt(w,10);break;case"j":w=JSON.stringify(w,null,_.width?parseInt(_.width):0);break;case"e":w=_.precision?parseFloat(w).toExponential(_.precision):parseFloat(w).toExponential();break;case"f":w=_.precision?parseFloat(w).toFixed(_.precision):parseFloat(w);break;case"g":w=_.precision?String(Number(w.toPrecision(_.precision))):parseFloat(w);break;case"o":w=(parseInt(w,10)>>>0).toString(8);break;case"s":w=String(w),w=_.precision?w.substring(0,_.precision):w;break;case"t":w=String(!!w),w=_.precision?w.substring(0,_.precision):w;break;case"T":w=Object.prototype.toString.call(w).slice(8,-1).toLowerCase(),w=_.precision?w.substring(0,_.precision):w;break;case"u":w=parseInt(w,10)>>>0;break;case"v":w=w.valueOf(),w=_.precision?w.substring(0,_.precision):w;break;case"x":w=(parseInt(w,10)>>>0).toString(16);break;case"X":w=(parseInt(w,10)>>>0).toString(16).toUpperCase();break}r.json.test(_.type)?S+=w:(r.number.test(_.type)&&(!A||_.sign)?(b=A?"+":"-",w=w.toString().replace(r.sign,"")):b="",f=_.pad_char?_.pad_char==="0"?"0":_.pad_char.charAt(1):" ",u=_.width-(b+w).length,T=_.width&&u>0?f.repeat(u):"",S+=_.align?b+w+T:f==="0"?b+T+w:T+b+w)}return S}var c=Object.create(null);function m(h){if(c[h])return c[h];for(var p=h,g,i=[],w=0;p;){if((g=r.text.exec(p))!==null)i.push(g[0]);else if((g=r.modulo.exec(p))!==null)i.push("%");else if((g=r.placeholder.exec(p))!==null){if(g[2]){w|=1;var S=[],M=g[2],C=[];if((C=r.key.exec(M))!==null)for(S.push(C[1]);(M=M.substring(C[0].length))!=="";)if((C=r.key_access.exec(M))!==null)S.push(C[1]);else if((C=r.index_access.exec(M))!==null)S.push(C[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");g[2]=S}else w|=2;if(w===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:g[0],param_no:g[1],keys:g[2],sign:g[3],pad_char:g[4],align:g[5],width:g[6],precision:g[7],type:g[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");p=p.substring(g[0].length)}return c[h]=i}e.sprintf=n,e.vsprintf=o,typeof window<"u"&&(window.sprintf=n,window.vsprintf=o,a=function(){return{sprintf:n,vsprintf:o}}.call(e,t,e,l),a!==void 0&&(l.exports=a))})()},3711:function(l,e,t){"use strict";l.exports=m;var a=t(2640),r=t(781),n={"2d":function(h,p,g){var i=h({order:p,scalarArguments:3,getters:g==="generic"?[0]:void 0,phase:function(S,M,C,_){return S>_|0},vertex:function(S,M,C,_,T,f,u,A,b,z,I,N,R){var B=(u<<0)+(A<<1)+(b<<2)+(z<<3)|0;if(!(B===0||B===15))switch(B){case 0:I.push([S-.5,M-.5]);break;case 1:I.push([S-.25-.25*(_+C-2*R)/(C-_),M-.25-.25*(T+C-2*R)/(C-T)]);break;case 2:I.push([S-.75-.25*(-_-C+2*R)/(_-C),M-.25-.25*(f+_-2*R)/(_-f)]);break;case 3:I.push([S-.5,M-.5-.5*(T+C+f+_-4*R)/(C-T+_-f)]);break;case 4:I.push([S-.25-.25*(f+T-2*R)/(T-f),M-.75-.25*(-T-C+2*R)/(T-C)]);break;case 5:I.push([S-.5-.5*(_+C+f+T-4*R)/(C-_+T-f),M-.5]);break;case 6:I.push([S-.5-.25*(-_-C+f+T)/(_-C+T-f),M-.5-.25*(-T-C+f+_)/(T-C+_-f)]);break;case 7:I.push([S-.75-.25*(f+T-2*R)/(T-f),M-.75-.25*(f+_-2*R)/(_-f)]);break;case 8:I.push([S-.75-.25*(-f-T+2*R)/(f-T),M-.75-.25*(-f-_+2*R)/(f-_)]);break;case 9:I.push([S-.5-.25*(_+C+-f-T)/(C-_+f-T),M-.5-.25*(T+C+-f-_)/(C-T+f-_)]);break;case 10:I.push([S-.5-.5*(-_-C+-f-T+4*R)/(_-C+f-T),M-.5]);break;case 11:I.push([S-.25-.25*(-f-T+2*R)/(f-T),M-.75-.25*(T+C-2*R)/(C-T)]);break;case 12:I.push([S-.5,M-.5-.5*(-T-C+-f-_+4*R)/(T-C+f-_)]);break;case 13:I.push([S-.75-.25*(_+C-2*R)/(C-_),M-.25-.25*(-f-_+2*R)/(f-_)]);break;case 14:I.push([S-.25-.25*(-_-C+2*R)/(_-C),M-.25-.25*(-T-C+2*R)/(T-C)]);break;case 15:I.push([S-.5,M-.5]);break}},cell:function(S,M,C,_,T,f,u,A,b){T?A.push([S,M]):A.push([M,S])}});return function(w,S){var M=[],C=[];return i(w,M,C,S),{positions:M,cells:C}}}};function o(h,p){var g=h.length+"d",i=n[g];if(i)return i(a,h,p)}function s(h,p){for(var g=r(h,p),i=g.length,w=new Array(i),S=new Array(i),M=0;MMath.max(_,T)?f[2]=1:_>Math.max(C,T)?f[0]=1:f[1]=1;for(var u=0,A=0,b=0;b<3;++b)u+=M[b]*M[b],A+=f[b]*M[b];for(var b=0;b<3;++b)f[b]-=A/u*M[b];return s(f,f),f}function g(M,C,_,T,f,u,A,b){this.center=a(_),this.up=a(T),this.right=a(f),this.radius=a([u]),this.angle=a([A,b]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(M,C),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var i=g.prototype;i.setDistanceLimits=function(M,C){M>0?M=Math.log(M):M=-1/0,C>0?C=Math.log(C):C=1/0,C=Math.max(C,M),this.radius.bounds[0][0]=M,this.radius.bounds[1][0]=C},i.getDistanceLimits=function(M){var C=this.radius.bounds[0];return M?(M[0]=Math.exp(C[0][0]),M[1]=Math.exp(C[1][0]),M):[Math.exp(C[0][0]),Math.exp(C[1][0])]},i.recalcMatrix=function(M){this.center.curve(M),this.up.curve(M),this.right.curve(M),this.radius.curve(M),this.angle.curve(M);for(var C=this.computedUp,_=this.computedRight,T=0,f=0,u=0;u<3;++u)f+=C[u]*_[u],T+=C[u]*C[u];for(var A=Math.sqrt(T),b=0,u=0;u<3;++u)_[u]-=C[u]*f/T,b+=_[u]*_[u],C[u]/=A;for(var z=Math.sqrt(b),u=0;u<3;++u)_[u]/=z;var I=this.computedToward;o(I,C,_),s(I,I);for(var N=Math.exp(this.computedRadius[0]),R=this.computedAngle[0],B=this.computedAngle[1],F=Math.cos(R),P=Math.sin(R),j=Math.cos(B),U=Math.sin(B),Z=this.computedCenter,Q=F*j,re=P*j,ae=U,oe=-F*U,H=-P*U,X=j,K=this.computedEye,G=this.computedMatrix,u=0;u<3;++u){var Y=Q*_[u]+re*I[u]+ae*C[u];G[4*u+1]=oe*_[u]+H*I[u]+X*C[u],G[4*u+2]=Y,G[4*u+3]=0}var q=G[1],$=G[5],ee=G[9],ne=G[2],fe=G[6],ye=G[10],xe=$*ye-ee*fe,Ae=ee*ne-q*ye,Me=q*fe-$*ne,Ie=m(xe,Ae,Me);xe/=Ie,Ae/=Ie,Me/=Ie,G[0]=xe,G[4]=Ae,G[8]=Me;for(var u=0;u<3;++u)K[u]=Z[u]+G[2+4*u]*N;for(var u=0;u<3;++u){for(var b=0,Ue=0;Ue<3;++Ue)b+=G[u+4*Ue]*K[Ue];G[12+u]=-b}G[15]=1},i.getMatrix=function(M,C){this.recalcMatrix(M);var _=this.computedMatrix;if(C){for(var T=0;T<16;++T)C[T]=_[T];return C}return _};var w=[0,0,0];i.rotate=function(M,C,_,T){if(this.angle.move(M,C,_),T){this.recalcMatrix(M);var f=this.computedMatrix;w[0]=f[2],w[1]=f[6],w[2]=f[10];for(var u=this.computedUp,A=this.computedRight,b=this.computedToward,z=0;z<3;++z)f[4*z]=u[z],f[4*z+1]=A[z],f[4*z+2]=b[z];n(f,f,T,w);for(var z=0;z<3;++z)u[z]=f[4*z],A[z]=f[4*z+1];this.up.set(M,u[0],u[1],u[2]),this.right.set(M,A[0],A[1],A[2])}},i.pan=function(M,C,_,T){C=C||0,_=_||0,T=T||0,this.recalcMatrix(M);var f=this.computedMatrix,u=Math.exp(this.computedRadius[0]),A=f[1],b=f[5],z=f[9],I=m(A,b,z);A/=I,b/=I,z/=I;var N=f[0],R=f[4],B=f[8],F=N*A+R*b+B*z;N-=A*F,R-=b*F,B-=z*F;var P=m(N,R,B);N/=P,R/=P,B/=P;var j=N*C+A*_,U=R*C+b*_,Z=B*C+z*_;this.center.move(M,j,U,Z);var Q=Math.exp(this.computedRadius[0]);Q=Math.max(1e-4,Q+T),this.radius.set(M,Math.log(Q))},i.translate=function(M,C,_,T){this.center.move(M,C||0,_||0,T||0)},i.setMatrix=function(M,C,_,T){var f=1;typeof _=="number"&&(f=_|0),(f<0||f>3)&&(f=1);var u=(f+2)%3,A=(f+1)%3;C||(this.recalcMatrix(M),C=this.computedMatrix);var b=C[f],z=C[f+4],I=C[f+8];if(T){var R=Math.abs(b),B=Math.abs(z),F=Math.abs(I),P=Math.max(R,B,F);R===P?(b=b<0?-1:1,z=I=0):F===P?(I=I<0?-1:1,b=z=0):(z=z<0?-1:1,b=I=0)}else{var N=m(b,z,I);b/=N,z/=N,I/=N}var j=C[u],U=C[u+4],Z=C[u+8],Q=j*b+U*z+Z*I;j-=b*Q,U-=z*Q,Z-=I*Q;var re=m(j,U,Z);j/=re,U/=re,Z/=re;var ae=z*Z-I*U,oe=I*j-b*Z,H=b*U-z*j,X=m(ae,oe,H);ae/=X,oe/=X,H/=X,this.center.jump(M,ve,se,Te),this.radius.idle(M),this.up.jump(M,b,z,I),this.right.jump(M,j,U,Z);var K,G;if(f===2){var Y=C[1],q=C[5],$=C[9],ee=Y*j+q*U+$*Z,ne=Y*ae+q*oe+$*H;Ae<0?K=-Math.PI/2:K=Math.PI/2,G=Math.atan2(ne,ee)}else{var fe=C[2],ye=C[6],xe=C[10],Ae=fe*b+ye*z+xe*I,Me=fe*j+ye*U+xe*Z,Ie=fe*ae+ye*oe+xe*H;K=Math.asin(h(Ae)),G=Math.atan2(Ie,Me)}this.angle.jump(M,G,K),this.recalcMatrix(M);var Ue=C[2],qe=C[6],ke=C[10],ge=this.computedMatrix;r(ge,C);var ue=ge[15],ve=ge[12]/ue,se=ge[13]/ue,Te=ge[14]/ue,Fe=Math.exp(this.computedRadius[0]);this.center.jump(M,ve-Ue*Fe,se-qe*Fe,Te-ke*Fe)},i.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},i.idle=function(M){this.center.idle(M),this.up.idle(M),this.right.idle(M),this.radius.idle(M),this.angle.idle(M)},i.flush=function(M){this.center.flush(M),this.up.flush(M),this.right.flush(M),this.radius.flush(M),this.angle.flush(M)},i.setDistance=function(M,C){C>0&&this.radius.set(M,Math.log(C))},i.lookAt=function(M,C,_,T){this.recalcMatrix(M),C=C||this.computedEye,_=_||this.computedCenter,T=T||this.computedUp;var f=T[0],u=T[1],A=T[2],b=m(f,u,A);if(!(b<1e-6)){f/=b,u/=b,A/=b;var z=C[0]-_[0],I=C[1]-_[1],N=C[2]-_[2],R=m(z,I,N);if(!(R<1e-6)){z/=R,I/=R,N/=R;var B=this.computedRight,F=B[0],P=B[1],j=B[2],U=f*F+u*P+A*j;F-=U*f,P-=U*u,j-=U*A;var Z=m(F,P,j);if(!(Z<.01&&(F=u*N-A*I,P=A*z-f*N,j=f*I-u*z,Z=m(F,P,j),Z<1e-6))){F/=Z,P/=Z,j/=Z,this.up.set(M,f,u,A),this.right.set(M,F,P,j),this.center.set(M,_[0],_[1],_[2]),this.radius.set(M,Math.log(R));var Q=u*j-A*P,re=A*F-f*j,ae=f*P-u*F,oe=m(Q,re,ae);Q/=oe,re/=oe,ae/=oe;var H=f*z+u*I+A*N,X=F*z+P*I+j*N,K=Q*z+re*I+ae*N,G=Math.asin(h(H)),Y=Math.atan2(K,X),q=this.angle._state,$=q[q.length-1],ee=q[q.length-2];$=$%(2*Math.PI);var ne=Math.abs($+2*Math.PI-Y),fe=Math.abs($-Y),ye=Math.abs($-2*Math.PI-Y);ne0?j.pop():new ArrayBuffer(F)}e.mallocArrayBuffer=w;function S(B){return new Uint8Array(w(B),0,B)}e.mallocUint8=S;function M(B){return new Uint16Array(w(2*B),0,B)}e.mallocUint16=M;function C(B){return new Uint32Array(w(4*B),0,B)}e.mallocUint32=C;function _(B){return new Int8Array(w(B),0,B)}e.mallocInt8=_;function T(B){return new Int16Array(w(2*B),0,B)}e.mallocInt16=T;function f(B){return new Int32Array(w(4*B),0,B)}e.mallocInt32=f;function u(B){return new Float32Array(w(4*B),0,B)}e.mallocFloat32=e.mallocFloat=u;function A(B){return new Float64Array(w(8*B),0,B)}e.mallocFloat64=e.mallocDouble=A;function b(B){return o?new Uint8ClampedArray(w(B),0,B):S(B)}e.mallocUint8Clamped=b;function z(B){return s?new BigUint64Array(w(8*B),0,B):null}e.mallocBigUint64=z;function I(B){return c?new BigInt64Array(w(8*B),0,B):null}e.mallocBigInt64=I;function N(B){return new DataView(w(B),0,B)}e.mallocDataView=N;function R(B){B=a.nextPow2(B);var F=a.log2(B),P=p[F];return P.length>0?P.pop():new n(B)}e.mallocBuffer=R,e.clearCache=function(){for(var F=0;F<32;++F)m.UINT8[F].length=0,m.UINT16[F].length=0,m.UINT32[F].length=0,m.INT8[F].length=0,m.INT16[F].length=0,m.INT32[F].length=0,m.FLOAT[F].length=0,m.DOUBLE[F].length=0,m.BIGUINT64[F].length=0,m.BIGINT64[F].length=0,m.UINT8C[F].length=0,h[F].length=0,p[F].length=0}},1755:function(l){"use strict";"use restrict";l.exports=e;function e(a){this.roots=new Array(a),this.ranks=new Array(a);for(var r=0;r",j="",U=P.length,Z=j.length,Q=R[0]===w||R[0]===C,re=0,ae=-Z;re>-1&&(re=B.indexOf(P,re),!(re===-1||(ae=B.indexOf(j,re+U),ae===-1)||ae<=re));){for(var oe=re;oe=ae)F[oe]=null,B=B.substr(0,oe)+" "+B.substr(oe+1);else if(F[oe]!==null){var H=F[oe].indexOf(R[0]);H===-1?F[oe]+=R:Q&&(F[oe]=F[oe].substr(0,H+1)+(1+parseInt(F[oe][H+1]))+F[oe].substr(H+2))}var X=re+U,K=B.substr(X,ae-X),G=K.indexOf(P);G!==-1?re=G:re=ae+Z}return F}function f(N,R,B){for(var F=R.textAlign||"start",P=R.textBaseline||"alphabetic",j=[1<<30,1<<30],U=[0,0],Z=N.length,Q=0;Q/g,` -`):B=B.replace(/\/g," ");var U="",Z=[];for($=0;$-1?parseInt(se[1+We]):0,mt=Ge>-1?parseInt(Te[1+Ge]):0;gt!==mt&&(Fe=Fe.replace(Me(),"?px "),fe*=Math.pow(.75,mt-gt),Fe=Fe.replace("?px ",Me())),ne+=.25*H*(mt-gt)}if(j.superscripts===!0){var Tt=se.indexOf(w),At=Te.indexOf(w),Kt=Tt>-1?parseInt(se[1+Tt]):0,nr=At>-1?parseInt(Te[1+At]):0;Kt!==nr&&(Fe=Fe.replace(Me(),"?px "),fe*=Math.pow(.75,nr-Kt),Fe=Fe.replace("?px ",Me())),ne-=.25*H*(nr-Kt)}if(j.bolds===!0){var _r=se.indexOf(h)>-1,Zt=Te.indexOf(h)>-1;!_r&&Zt&&(sr?Fe=Fe.replace("italic ","italic bold "):Fe="bold "+Fe),_r&&!Zt&&(Fe=Fe.replace("bold ",""))}if(j.italics===!0){var sr=se.indexOf(g)>-1,Ot=Te.indexOf(g)>-1;!sr&&Ot&&(Fe="italic "+Fe),sr&&!Ot&&(Fe=Fe.replace("italic ",""))}R.font=Fe}for(q=0;q0&&(P=F.size),F.lineSpacing&&F.lineSpacing>0&&(j=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(U.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(U.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(U.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(U.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(U.superscripts=!!F.styletags.superscripts)),B.font=[F.fontStyle,F.fontVariant,F.fontWeight,P+"px",F.font].filter(function(Q){return Q}).join(" "),B.textAlign="start",B.textBaseline="alphabetic",B.direction="ltr";var Z=u(R,B,N,P,j,U);return z(Z,F,P)}},1538:function(l){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function t(b){b.permitHostObjects___&&b.permitHostObjects___(t)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=t);var a=!1;if(typeof WeakMap=="function"){var r=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var n=new r,o=Object.freeze({});if(n.set(o,1),n.get(o)!==1)a=!0;else{l.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,c=Object.getOwnPropertyNames,m=Object.defineProperty,h=Object.isExtensible,p="weakmap:",g=p+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var i=new ArrayBuffer(25),w=new Uint8Array(i);crypto.getRandomValues(w),g=p+"rand:"+Array.prototype.map.call(w,function(b){return(b%36).toString(36)}).join("")+"___"}function S(b){return!(b.substr(0,p.length)==p&&b.substr(b.length-3)==="___")}if(m(Object,"getOwnPropertyNames",{value:function(z){return c(z).filter(S)}}),"getPropertyNames"in Object){var M=Object.getPropertyNames;m(Object,"getPropertyNames",{value:function(z){return M(z).filter(S)}})}function C(b){if(b!==Object(b))throw new TypeError("Not an object: "+b);var z=b[g];if(z&&z.key===b)return z;if(h(b)){z={key:b};try{return m(b,g,{value:z,writable:!1,enumerable:!1,configurable:!1}),z}catch{return}}}(function(){var b=Object.freeze;m(Object,"freeze",{value:function(R){return C(R),b(R)}});var z=Object.seal;m(Object,"seal",{value:function(R){return C(R),z(R)}});var I=Object.preventExtensions;m(Object,"preventExtensions",{value:function(R){return C(R),I(R)}})})();function _(b){return b.prototype=null,Object.freeze(b)}var T=!1;function f(){!T&&typeof console<"u"&&(T=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var u=0,A=function(){this instanceof A||f();var b=[],z=[],I=u++;function N(P,j){var U,Z=C(P);return Z?I in Z?Z[I]:j:(U=b.indexOf(P),U>=0?z[U]:j)}function R(P){var j=C(P);return j?I in j:b.indexOf(P)>=0}function B(P,j){var U,Z=C(P);return Z?Z[I]=j:(U=b.indexOf(P),U>=0?z[U]=j:(U=b.length,z[U]=j,b[U]=P)),this}function F(P){var j=C(P),U,Z;return j?I in j&&delete j[I]:(U=b.indexOf(P),U<0?!1:(Z=b.length-1,b[U]=void 0,z[U]=z[Z],b[U]=b[Z],b.length=Z,z.length=Z,!0))}return Object.create(A.prototype,{get___:{value:_(N)},has___:{value:_(R)},set___:{value:_(B)},delete___:{value:_(F)}})};A.prototype=Object.create(Object.prototype,{get:{value:function(z,I){return this.get___(z,I)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,I){return this.set___(z,I)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof r=="function"?function(){a&&typeof Proxy<"u"&&(Proxy=void 0);function b(){this instanceof A||f();var z=new r,I=void 0,N=!1;function R(j,U){return I?z.has(j)?z.get(j):I.get___(j,U):z.get(j,U)}function B(j){return z.has(j)||(I?I.has___(j):!1)}var F;a?F=function(j,U){return z.set(j,U),z.has(j)||(I||(I=new A),I.set(j,U)),this}:F=function(j,U){if(N)try{z.set(j,U)}catch{I||(I=new A),I.set___(j,U)}else z.set(j,U);return this};function P(j){var U=!!z.delete(j);return I&&I.delete___(j)||U}return Object.create(A.prototype,{get___:{value:_(R)},has___:{value:_(B)},set___:{value:_(F)},delete___:{value:_(P)},permitHostObjects___:{value:_(function(j){if(j===t)N=!0;else throw new Error("bogus call to permitHostObjects___")})}})}b.prototype=A.prototype,l.exports=b,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),l.exports=A)})()},236:function(l,e,t){var a=t(8284);l.exports=r;function r(){var n={};return function(o){if((typeof o!="object"||o===null)&&typeof o!="function")throw new Error("Weakmap-shim: Key must be object");var s=o.valueOf(n);return s&&s.identity===n?s:a(o,n)}}},8284:function(l){l.exports=e;function e(t,a){var r={identity:a},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(o){return o!==a?n.apply(this,arguments):r},writable:!0}),r}},606:function(l,e,t){var a=t(236);l.exports=r;function r(){var n=a();return{get:function(o,s){var c=n(o);return c.hasOwnProperty("value")?c.value:s},set:function(o,s){return n(o).value=s,this},has:function(o){return"value"in n(o)},delete:function(o){return delete n(o).value}}}},3349:function(l){"use strict";function e(){return function(s,c,m,h,p,g){var i=s[0],w=m[0],S=[0],M=w;h|=0;var C=0,_=w;for(C=0;C=0!=f>=0&&p.push(S[0]+.5+.5*(T+f)/(T-f))}h+=_,++S[0]}}}function t(){return e()}var a=t;function r(s){var c={};return function(h,p,g){var i=h.dtype,w=h.order,S=[i,w.join()].join(),M=c[S];return M||(c[S]=M=s([i,w])),M(h.shape.slice(0),h.data,h.stride,h.offset|0,p,g)}}function n(s){return r(a.bind(void 0,s))}function o(s){return n({funcName:s.funcName})}l.exports=o({funcName:"zeroCrossings"})},781:function(l,e,t){"use strict";l.exports=r;var a=t(3349);function r(n,o){var s=[];return o=+o||0,a(n.hi(n.shape[0]-1),s,o),s}},7790:function(){}},x={};function E(l){var e=x[l];if(e!==void 0)return e.exports;var t=x[l]={id:l,loaded:!1,exports:{}};return v[l].call(t.exports,t,t.exports,E),t.loaded=!0,t.exports}(function(){E.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){E.nmd=function(l){return l.paths=[],l.children||(l.children=[]),l}}();var k=E(1964);V.exports=k})()}}),Td=Ee({"src/lib/str2rgbarray.js"(J,V){"use strict";var{normalize:v}=Qa();function x(E){return E?v(E):[0,0,0,1]}V.exports=x}}),Ad=Ee({"src/lib/gl_format_color.js"(J,V){"use strict";var v=mi(),x=pl(),E=Qa(),k=rs().defaultLine,l=vs().isArrayOrTypedArray,e=E.normalize(k),t=1;function a(c,m){return[c[0],c[1],c[2],c[3]*m]}function r(c){return v(c)||!E.isChannelArray(c)&&!E.isValid(c)?e:E.normalize(c)}function n(c){return v(c)?c:t}function o(c,m,h){var p=c.color;p&&p._inputArray&&(p=p._inputArray);var g=l(p),i=l(m),w=x.extractOpts(c),S=[],M,C,_,T,f;if(w.colorscale!==void 0?M=x.makeColorScaleFuncFromTrace(c):M=r,g?C=(A,b)=>A[b]===void 0?e:w.colorscale===void 0?M(A[b]):E.normalize(M(A[b])):C=r,i?_=function(A,b){return A[b]===void 0?t:n(A[b])}:_=n,g||i)for(var u=0;u0){var p=a.c2l(m);a._lowerLogErrorBound||(a._lowerLogErrorBound=p),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,p)}}else n[o]=[-s[0]*t,s[1]*t]}return n}function E(l){for(var e=0;e-1?-1:z.indexOf("right")>-1?1:0}function S(z){return z==null?0:z.indexOf("top")>-1?-1:z.indexOf("bottom")>-1?1:0}function M(z){var I=0,N=0,R=[I,N];if(Array.isArray(z))for(var B=0;B=0){var Z=g(j.position,j.delaunayColor,j.delaunayAxis);Z.opacity=z.opacity,this.delaunayMesh?this.delaunayMesh.update(Z):(Z.gl=I,this.delaunayMesh=k(Z),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},p.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function b(z,I){var N=new h(z,I.uid);return N.update(I),N}V.exports=b}}),J3=Ee({"src/traces/scatter3d/attributes.js"(J,V){"use strict";var v=ou(),x=Xs(),E=$s(),k=Fl().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=Cs(),a=ia(),r=K3(),n=My(),o=vo().extendFlat,s=El().overrideAll,c=(Ev(),ra(Hd)).default,m=v.line,h=v.marker,p=h.line,g=o({width:m.width,dash:{valType:"enumerated",values:c(r),dflt:"solid"}},E("line"));function i(S){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var w=V.exports=s({x:v.x,y:v.y,z:{valType:"data_array"},text:o({},v.text,{}),texttemplate:e(),texttemplatefallback:t({editType:"calc"}),hovertext:o({},v.hovertext,{}),hovertemplate:l(),hovertemplatefallback:t(),xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z"),mode:o({},v.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:i("x"),y:i("y"),z:i("z")},connectgaps:v.connectgaps,line:g,marker:o({symbol:{valType:"enumerated",values:c(n),dflt:"circle",arrayOk:!0},size:o({},h.size,{dflt:8}),sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,opacity:o({},h.opacity,{arrayOk:!1}),colorbar:h.colorbar,line:o({width:o({},p.width,{arrayOk:!1})},E("marker.line"))},E("marker")),textposition:o({},v.textposition,{dflt:"top center"}),textfont:x({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:a.opacity,hoverinfo:o({},a.hoverinfo)},"calc","nested");w.x.editType=w.y.editType=w.z.editType="calc+clearAxisTypes"}}),t8=Ee({"src/traces/scatter3d/defaults.js"(J,V){"use strict";var v=Ri(),x=Vr(),E=al(),k=gh(),l=Rh(),e=Fh(),t=J3();V.exports=function(n,o,s,c){function m(C,_){return x.coerce(n,o,t,C,_)}var h=a(n,o,m,c);if(!h){o.visible=!1;return}m("text"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("xhoverformat"),m("yhoverformat"),m("zhoverformat"),m("mode"),E.hasMarkers(o)&&k(n,o,s,c,m,{noAngle:!0,noLineDash:!0,noSelect:!0}),E.hasLines(o)&&(m("connectgaps"),l(n,o,s,c,m)),E.hasText(o)&&(m("texttemplate"),m("texttemplatefallback"),e(n,o,c,m,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var p=(o.line||{}).color,g=(o.marker||{}).color;m("surfaceaxis")>=0&&m("surfacecolor",p||g);for(var i=["x","y","z"],w=0;w<3;++w){var S="projection."+i[w];m(S+".show")&&(m(S+".opacity"),m(S+".scale"))}var M=v.getComponentMethod("errorbars","supplyDefaults");M(n,o,p||g||s,{axis:"z"}),M(n,o,p||g||s,{axis:"y",inherit:"z"}),M(n,o,p||g||s,{axis:"x",inherit:"z"})};function a(r,n,o,s){var c=0,m=o("x"),h=o("y"),p=o("z"),g=v.getComponentMethod("calendars","handleTraceDefaults");return g(r,n,["x","y","z"],s),m&&h&&p&&(c=Math.min(m.length,h.length,p.length),n._length=n._xlength=n._ylength=n._zlength=c),c}}}),r8=Ee({"src/traces/scatter3d/calc.js"(J,V){"use strict";var v=$h(),x=yh();V.exports=function(k,l){var e=[{x:!1,y:!1,trace:l,t:{}}];return v(e,l),x(k,l),e}}}),n8=Ee({"node_modules/get-canvas-context/index.js"(J,V){V.exports=v;function v(x,E){if(typeof x!="string")throw new TypeError("must specify type string");if(E=E||{},typeof document>"u"&&!E.canvas)return null;var k=E.canvas||document.createElement("canvas");typeof E.width=="number"&&(k.width=E.width),typeof E.height=="number"&&(k.height=E.height);var l=E,e;try{var t=[x];x.indexOf("webgl")===0&&t.push("experimental-"+x);for(var a=0;a/g," "));o[s]=p,c.tickmode=m}}a.ticks=o;for(var s=0;s<3;++s){k[s]=.5*(t.glplot.bounds[0][s]+t.glplot.bounds[1][s]);for(var g=0;g<2;++g)a.bounds[g][s]=t.glplot.bounds[g][s]}t.contourLevels=l(o)}}}),l8=Ee({"src/plots/gl3d/scene.js"(J,V){"use strict";var v=Xc().gl_plot3d,x=v.createCamera,E=v.createScene,k=a8(),l=Fg(),e=Ri(),t=Vr(),a=t.preserveDrawingBuffer(),r=uo(),n=$l(),o=Td(),s=Q3(),c=fx(),m=i8(),h=o8(),p=s8(),g=Ph().applyAutorangeOptions,i,w,S=!1;function M(N,R){var B=document.createElement("div"),F=N.container;this.graphDiv=N.graphDiv;var P=document.createElementNS("http://www.w3.org/2000/svg","svg");P.style.position="absolute",P.style.top=P.style.left="0px",P.style.width=P.style.height="100%",P.style["z-index"]=20,P.style["pointer-events"]="none",B.appendChild(P),this.svgContainer=P,B.id=N.id,B.style.position="absolute",B.style.top=B.style.left="0px",B.style.width=B.style.height="100%",F.appendChild(B),this.fullLayout=R,this.id=N.id||"scene",this.fullSceneLayout=R[this.id],this.plotArgs=[[],{},{}],this.axesOptions=m(R,R[this.id]),this.spikeOptions=h(R[this.id]),this.container=B,this.staticMode=!!N.staticPlot,this.pixelRatio=this.pixelRatio||N.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var C=M.prototype;C.prepareOptions=function(){var N=this,R={canvas:N.canvas,gl:N.gl,glOptions:{preserveDrawingBuffer:a,premultipliedAlpha:!0,antialias:!0},container:N.container,axes:N.axesOptions,spikes:N.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:N.camera,pixelRatio:N.pixelRatio};if(N.staticMode){if(!w&&(i=document.createElement("canvas"),w=k({canvas:i,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!w))throw new Error("error creating static canvas/context for image server");R.gl=w,R.canvas=i}return R};var _=!0;C.tryCreatePlot=function(){var N=this,R=N.prepareOptions(),B=!0;try{N.glplot=E(R)}catch{if(N.staticMode||!_||a)B=!1;else{t.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{a=R.glOptions.preserveDrawingBuffer=!0,N.glplot=E(R)}catch{a=R.glOptions.preserveDrawingBuffer=!1,B=!1}}}return _=!1,B},C.initializeGLCamera=function(){var N=this,R=N.fullSceneLayout.camera,B=R.projection.type==="orthographic";N.camera=x(N.container,{center:[R.center.x,R.center.y,R.center.z],eye:[R.eye.x,R.eye.y,R.eye.z],up:[R.up.x,R.up.y,R.up.z],_ortho:B,zoomMin:.01,zoomMax:100,mode:"orbit"})},C.initializeGLPlot=function(){var N=this;N.initializeGLCamera();var R=N.tryCreatePlot();if(!R)return s(N);N.traces={},N.make4thDimension();var B=N.graphDiv,F=B.layout,P=function(){var U={};return N.isCameraChanged(F)&&(U[N.id+".camera"]=N.getCamera()),N.isAspectChanged(F)&&(U[N.id+".aspectratio"]=N.glplot.getAspectratio(),F[N.id].aspectmode!=="manual"&&(N.fullSceneLayout.aspectmode=F[N.id].aspectmode=U[N.id+".aspectmode"]="manual")),U},j=function(U){if(U.fullSceneLayout.dragmode!==!1){var Z=P();U.saveLayout(F),U.graphDiv.emit("plotly_relayout",Z)}};return N.glplot.canvas&&(N.glplot.canvas.addEventListener("mouseup",function(){j(N)}),N.glplot.canvas.addEventListener("touchstart",function(){S=!0}),N.glplot.canvas.addEventListener("wheel",function(U){if(B._context._scrollZoom.gl3d){if(N.camera._ortho){var Z=U.deltaX>U.deltaY?1.1:.9090909090909091,Q=N.glplot.getAspectratio();N.glplot.setAspectratio({x:Z*Q.x,y:Z*Q.y,z:Z*Q.z})}j(N)}},l?{passive:!1}:!1),N.glplot.canvas.addEventListener("mousemove",function(){if(N.fullSceneLayout.dragmode!==!1&&N.camera.mouseListener.buttons!==0){var U=P();N.graphDiv.emit("plotly_relayouting",U)}}),N.staticMode||N.glplot.canvas.addEventListener("webglcontextlost",function(U){B&&B.emit&&B.emit("plotly_webglcontextlost",{event:U,layer:N.id})},!1)),N.glplot.oncontextloss=function(){N.recoverContext()},N.glplot.onrender=function(){N.render()},!0},C.render=function(){var N=this,R=N.graphDiv,B,F=N.svgContainer,P=N.container.getBoundingClientRect();R._fullLayout._calcInverseTransform(R);var j=R._fullLayout._invScaleX,U=R._fullLayout._invScaleY,Z=P.width*j,Q=P.height*U;F.setAttributeNS(null,"viewBox","0 0 "+Z+" "+Q),F.setAttributeNS(null,"width",Z),F.setAttributeNS(null,"height",Q),p(N),N.glplot.axes.update(N.axesOptions);for(var re=Object.keys(N.traces),ae=null,oe=N.glplot.selection,H=0;H")):B.type==="isosurface"||B.type==="volume"?(q.valueLabel=r.hoverLabelText(N._mockAxis,N._mockAxis.d2l(oe.traceCoordinate[3]),B.valuehoverformat),ye.push("value: "+q.valueLabel),oe.textLabel&&ye.push(oe.textLabel),fe=ye.join("
")):fe=oe.textLabel;var xe={x:oe.traceCoordinate[0],y:oe.traceCoordinate[1],z:oe.traceCoordinate[2],data:G._input,fullData:G,curveNumber:G.index,pointNumber:Y};n.appendArrayPointValue(xe,G,Y),B._module.eventData&&(xe=G._module.eventData(xe,oe,G,{},Y));var Ae={points:[xe]};if(N.fullSceneLayout.hovermode){var Me=[];n.loneHover({trace:G,x:(.5+.5*K[0]/K[3])*Z,y:(.5-.5*K[1]/K[3])*Q,xLabel:q.xLabel,yLabel:q.yLabel,zLabel:q.zLabel,text:fe,name:ae.name,color:n.castHoverOption(G,Y,"bgcolor")||ae.color,borderColor:n.castHoverOption(G,Y,"bordercolor"),fontFamily:n.castHoverOption(G,Y,"font.family"),fontSize:n.castHoverOption(G,Y,"font.size"),fontColor:n.castHoverOption(G,Y,"font.color"),nameLength:n.castHoverOption(G,Y,"namelength"),textAlign:n.castHoverOption(G,Y,"align"),hovertemplate:t.castOption(G,Y,"hovertemplate"),hovertemplateLabels:t.extendFlat({},xe,q),eventData:[xe]},{container:F,gd:R,inOut_bbox:Me}),xe.bbox=Me[0]}oe.distance<5&&(oe.buttons||S)?R.emit("plotly_click",Ae):R.emit("plotly_hover",Ae),this.oldEventData=Ae}else n.loneUnhover(F),this.oldEventData&&R.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;N.drawAnnotations(N)},C.recoverContext=function(){var N=this;N.glplot.dispose();var R=function(){if(N.glplot.gl.isContextLost()){requestAnimationFrame(R);return}if(!N.initializeGLPlot()){t.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}N.plot.apply(N,N.plotArgs)};requestAnimationFrame(R)};var T=["xaxis","yaxis","zaxis"];function f(N,R,B){for(var F=N.fullSceneLayout,P=0;P<3;P++){var j=T[P],U=j.charAt(0),Z=F[j],Q=R[U],re=R[U+"calendar"],ae=R["_"+U+"length"];if(!t.isArrayOrTypedArray(Q))B[0][P]=Math.min(B[0][P],0),B[1][P]=Math.max(B[1][P],ae-1);else for(var oe,H=0;H<(ae||Q.length);H++)if(t.isArrayOrTypedArray(Q[H]))for(var X=0;XG[1][U])G[0][U]=-1,G[1][U]=1;else{var Ue=G[1][U]-G[0][U];G[0][U]-=Ue/32,G[1][U]+=Ue/32}if($=[G[0][U],G[1][U]],$=g($,Q),G[0][U]=$[0],G[1][U]=$[1],Q.isReversed()){var qe=G[0][U];G[0][U]=G[1][U],G[1][U]=qe}}else $=Q.range,G[0][U]=Q.r2l($[0]),G[1][U]=Q.r2l($[1]);G[0][U]===G[1][U]&&(G[0][U]-=1,G[1][U]+=1),Y[U]=G[1][U]-G[0][U],Q.range=[G[0][U],G[1][U]],Q.limitRange(),F.glplot.setBounds(U,{min:Q.range[0]*X[U],max:Q.range[1]*X[U]})}var ke,ge=ae.aspectmode;if(ge==="cube")ke=[1,1,1];else if(ge==="manual"){var ue=ae.aspectratio;ke=[ue.x,ue.y,ue.z]}else if(ge==="auto"||ge==="data"){var ve=[1,1,1];for(U=0;U<3;++U){Q=ae[T[U]],re=Q.type;var se=q[re];ve[U]=Math.pow(se.acc,1/se.count)/X[U]}ge==="data"||Math.max.apply(null,ve)/Math.min.apply(null,ve)<=4?ke=ve:ke=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ae.aspectratio.x=oe.aspectratio.x=ke[0],ae.aspectratio.y=oe.aspectratio.y=ke[1],ae.aspectratio.z=oe.aspectratio.z=ke[2],F.glplot.setAspectratio(ae.aspectratio),F.viewInitial.aspectratio||(F.viewInitial.aspectratio={x:ae.aspectratio.x,y:ae.aspectratio.y,z:ae.aspectratio.z}),F.viewInitial.aspectmode||(F.viewInitial.aspectmode=ae.aspectmode);var Te=ae.domain||null,Fe=R._size||null;if(Te&&Fe){var We=F.container.style;We.position="absolute",We.left=Fe.l+Te.x[0]*Fe.w+"px",We.top=Fe.t+(1-Te.y[1])*Fe.h+"px",We.width=Fe.w*(Te.x[1]-Te.x[0])+"px",We.height=Fe.h*(Te.y[1]-Te.y[0])+"px"}F.glplot.redraw()}},C.destroy=function(){var N=this;N.glplot&&(N.camera.mouseListener.enabled=!1,N.container.removeEventListener("wheel",N.camera.wheelListener),N.camera=null,N.glplot.dispose(),N.container.parentNode.removeChild(N.container),N.glplot=null)};function A(N){return[[N.eye.x,N.eye.y,N.eye.z],[N.center.x,N.center.y,N.center.z],[N.up.x,N.up.y,N.up.z]]}function b(N){return{up:{x:N.up[0],y:N.up[1],z:N.up[2]},center:{x:N.center[0],y:N.center[1],z:N.center[2]},eye:{x:N.eye[0],y:N.eye[1],z:N.eye[2]},projection:{type:N._ortho===!0?"orthographic":"perspective"}}}C.getCamera=function(){var N=this;return N.camera.view.recalcMatrix(N.camera.view.lastT()),b(N.camera)},C.setViewport=function(N){var R=this,B=N.camera;R.camera.lookAt.apply(this,A(B)),R.glplot.setAspectratio(N.aspectratio);var F=B.projection.type==="orthographic",P=R.camera._ortho;F!==P&&(R.glplot.redraw(),R.glplot.clearRGBA(),R.glplot.dispose(),R.initializeGLPlot())},C.isCameraChanged=function(N){var R=this,B=R.getCamera(),F=t.nestedProperty(N,R.id+".camera"),P=F.get();function j(re,ae,oe,H){var X=["up","center","eye"],K=["x","y","z"];return ae[X[oe]]&&re[X[oe]][K[H]]===ae[X[oe]][K[H]]}var U=!1;if(P===void 0)U=!0;else{for(var Z=0;Z<3;Z++)for(var Q=0;Q<3;Q++)if(!j(B,P,Z,Q)){U=!0;break}(!P.projection||B.projection&&B.projection.type!==P.projection.type)&&(U=!0)}return U},C.isAspectChanged=function(N){var R=this,B=R.glplot.getAspectratio(),F=t.nestedProperty(N,R.id+".aspectratio"),P=F.get();return P===void 0||P.x!==B.x||P.y!==B.y||P.z!==B.z},C.saveLayout=function(N){var R=this,B=R.fullLayout,F,P,j,U,Z,Q,re=R.isCameraChanged(N),ae=R.isAspectChanged(N),oe=re||ae;if(oe){var H={};if(re&&(F=R.getCamera(),P=t.nestedProperty(N,R.id+".camera"),j=P.get(),H[R.id+".camera"]=j),ae&&(U=R.glplot.getAspectratio(),Z=t.nestedProperty(N,R.id+".aspectratio"),Q=Z.get(),H[R.id+".aspectratio"]=Q),e.call("_storeDirectGUIEdit",N,B._preGUI,H),re){P.set(F);var X=t.nestedProperty(B,R.id+".camera");X.set(F)}if(ae){Z.set(U);var K=t.nestedProperty(B,R.id+".aspectratio");K.set(U),R.glplot.redraw()}}return oe},C.updateFx=function(N,R){var B=this,F=B.camera;if(F)if(N==="orbit")F.mode="orbit",F.keyBindingMode="rotate";else if(N==="turntable"){F.up=[0,0,1],F.mode="turntable",F.keyBindingMode="rotate";var P=B.graphDiv,j=P._fullLayout,U=B.fullSceneLayout.camera,Z=U.up.x,Q=U.up.y,re=U.up.z;if(re/Math.sqrt(Z*Z+Q*Q+re*re)<.999){var ae=B.id+".camera.up",oe={x:0,y:0,z:1},H={};H[ae]=oe;var X=P.layout;e.call("_storeDirectGUIEdit",X,j._preGUI,H),U.up=oe,t.nestedProperty(X,ae).set(oe)}}else F.keyBindingMode=N;B.fullSceneLayout.hovermode=R};function z(N,R,B){for(var F=0,P=B-1;F0)for(var Z=255/U,Q=0;Q<3;++Q)N[j+Q]=Math.min(Z*N[j+Q],255)}}C.toImage=function(N){var R=this;N||(N="png"),R.staticMode&&R.container.appendChild(i),R.glplot.redraw();var B=R.glplot.gl,F=B.drawingBufferWidth,P=B.drawingBufferHeight;B.bindFramebuffer(B.FRAMEBUFFER,null);var j=new Uint8Array(F*P*4);B.readPixels(0,0,F,P,B.RGBA,B.UNSIGNED_BYTE,j),z(j,F,P),I(j,F,P);var U=document.createElement("canvas");U.width=F,U.height=P;var Z=U.getContext("2d",{willReadFrequently:!0}),Q=Z.createImageData(F,P);Q.data.set(j),Z.putImageData(Q,0,0);var re;switch(N){case"jpeg":re=U.toDataURL("image/jpeg");break;case"webp":re=U.toDataURL("image/webp");break;default:re=U.toDataURL("image/png")}return R.staticMode&&R.container.removeChild(i),re},C.setConvert=function(){for(var N=this,R=0;R<3;R++){var B=N.fullSceneLayout[T[R]];r.setConvert(B,N.fullLayout),B.setScale=t.noop}},C.make4thDimension=function(){var N=this,R=N.graphDiv,B=R._fullLayout;N._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},r.setConvert(N._mockAxis,B)},V.exports=M}}),u8=Ee({"src/plots/gl3d/layout/attributes.js"(J,V){"use strict";V.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),ew=Ee({"src/plots/gl3d/layout/axis_attributes.js"(J,V){"use strict";var v=Qa(),x=Gc(),E=vo().extendFlat,k=El().overrideAll;V.exports=k({visible:x.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:v.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:x.color,categoryorder:x.categoryorder,categoryarray:x.categoryarray,title:{text:x.title.text,font:x.title.font},type:E({},x.type,{values:["-","linear","log","date","category"]}),autotypenumbers:x.autotypenumbers,autorange:x.autorange,autorangeoptions:{minallowed:x.autorangeoptions.minallowed,maxallowed:x.autorangeoptions.maxallowed,clipmin:x.autorangeoptions.clipmin,clipmax:x.autorangeoptions.clipmax,include:x.autorangeoptions.include,editType:"plot"},rangemode:x.rangemode,minallowed:x.minallowed,maxallowed:x.maxallowed,range:E({},x.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:x.minor.tickmode,nticks:x.nticks,tick0:x.tick0,dtick:x.dtick,tickvals:x.tickvals,ticktext:x.ticktext,ticks:x.ticks,mirror:x.mirror,ticklen:x.ticklen,tickwidth:x.tickwidth,tickcolor:x.tickcolor,showticklabels:x.showticklabels,labelalias:x.labelalias,tickfont:x.tickfont,tickangle:x.tickangle,tickprefix:x.tickprefix,showtickprefix:x.showtickprefix,ticksuffix:x.ticksuffix,showticksuffix:x.showticksuffix,showexponent:x.showexponent,exponentformat:x.exponentformat,minexponent:x.minexponent,separatethousands:x.separatethousands,tickformat:x.tickformat,tickformatstops:x.tickformatstops,hoverformat:x.hoverformat,showline:x.showline,linecolor:x.linecolor,linewidth:x.linewidth,showgrid:x.showgrid,gridcolor:E({},x.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:x.gridwidth,zeroline:x.zeroline,zerolinecolor:x.zerolinecolor,zerolinewidth:x.zerolinewidth},"plot","from-root")}}),tw=Ee({"src/plots/gl3d/layout/layout_attributes.js"(J,V){"use strict";var v=ew(),x=kl().attributes,E=vo().extendFlat,k=Vr().counterRegex;function l(e,t,a){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:a,editType:"camera"},editType:"camera"}}V.exports={_arrayAttrRegexps:[k("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:E(l(0,0,1),{}),center:E(l(0,0,0),{}),eye:E(l(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:x({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:v,yaxis:v,zaxis:v,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot"}}}),c8=Ee({"src/plots/gl3d/layout/axis_defaults.js"(J,V){"use strict";var v=Qa(),x=Vr(),E=xs(),k=ew(),l=ux(),e=K0(),t=["xaxis","yaxis","zaxis"],a=100*136/187;V.exports=function(n,o,s){var c,m;function h(i,w){return x.coerce(c,m,k,i,w)}for(var p=0;p1;function h(p){if(!m){var g=v.validate(o[p],e[p]);if(g)return o[p]}}k(o,s,c,{type:a,attributes:e,handleDefaults:r,fullLayout:s,font:s.font,fullData:c,getDfltFromLayout:h,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function r(n,o,s,c){for(var m=s("bgcolor"),h=x.combine(m,c.paper_bgcolor),p=["up","center","eye"],g=0;g.999)&&(C="turntable")}else C="turntable";s("dragmode",C),s("hovermode",c.getDfltFromLayout("hovermode"))}}}),ov=Ee({"src/plots/gl3d/index.js"(J){"use strict";var V=El().overrideAll,v=Ei(),x=l8(),E=uf().getSubplotData,k=Vr(),l=mh(),e="gl3d",t="scene";J.name=e,J.attr=t,J.idRoot=t,J.idRegex=J.attrRegex=k.counterRegex("scene"),J.attributes=u8(),J.layoutAttributes=tw(),J.baseLayoutAttrOverrides=V({hoverlabel:v.hoverlabel},"plot","nested"),J.supplyLayoutDefaults=f8(),J.plot=function(r){for(var n=r._fullLayout,o=r._fullData,s=n._subplots[e],c=0;c0){z=c[I];break}return z}function g(A,b){if(!(A<1||b<1)){for(var z=h(A),I=h(b),N=1,R=0;RM;)I--,I/=p(I),I++,I1?N:1};function C(A,b,z){var I=z[8]+z[2]*b[0]+z[5]*b[1];return A[0]=(z[6]+z[0]*b[0]+z[3]*b[1])/I,A[1]=(z[7]+z[1]*b[0]+z[4]*b[1])/I,A}function _(A,b,z){return T(A,b,C,z),A}function T(A,b,z,I){for(var N=[0,0],R=A.shape[0],B=A.shape[1],F=0;F0&&this.contourStart[I]!==null&&this.contourEnd[I]!==null&&this.contourEnd[I]>this.contourStart[I]))for(b[I]=!0,N=this.contourStart[I];NQ&&(this.minValues[j]=Q),this.maxValues[j]c&&(a.isomin=null,a.isomax=null);var m=o("x"),h=o("y"),p=o("z"),g=o("value");if(!m||!m.length||!h||!h.length||!p||!p.length||!g||!g.length){a.visible=!1;return}var i=x.getComponentMethod("calendars","handleTraceDefaults");i(t,a,["x","y","z"],n),o("valuehoverformat"),["x","y","z"].forEach(function(C){o(C+"hoverformat");var _="caps."+C,T=o(_+".show");T&&o(_+".fill");var f="slices."+C,u=o(f+".show");u&&(o(f+".fill"),o(f+".locations"))});var w=o("spaceframe.show");w&&o("spaceframe.fill");var S=o("surface.show");S&&(o("surface.count"),o("surface.fill"),o("surface.pattern"));var M=o("contour.show");M&&(o("contour.color"),o("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(C){o(C)}),k(t,a,n,o,{prefix:"",cLetter:"c"}),a._length=null}V.exports={supplyDefaults:l,supplyIsoDefaults:e}}}),Ey=Ee({"src/traces/streamtube/calc.js"(J,V){"use strict";var v=Vr(),x=Sf();function E(t,a){a._len=Math.min(a.u.length,a.v.length,a.w.length,a.x.length,a.y.length,a.z.length),a._u=e(a.u,a._len),a._v=e(a.v,a._len),a._w=e(a.w,a._len),a._x=e(a.x,a._len),a._y=e(a.y,a._len),a._z=e(a.z,a._len);var r=k(a);a._gridFill=r.fill,a._Xs=r.Xs,a._Ys=r.Ys,a._Zs=r.Zs,a._len=r.len;var n=0,o,s,c;a.starts&&(o=e(a.starts.x||[]),s=e(a.starts.y||[]),c=e(a.starts.z||[]),n=Math.min(o.length,s.length,c.length)),a._startsX=o||[],a._startsY=s||[],a._startsZ=c||[];var m=0,h=1/0,p;for(p=0;p1&&(u=a[o-1],b=r[o-1],I=n[o-1]),s=0;su?"-":"+")+"x"),M=M.replace("y",(A>b?"-":"+")+"y"),M=M.replace("z",(z>I?"-":"+")+"z");var F=function(){o=0,N=[],R=[],B=[]};(!o||o0;h--){var p=Math.min(m[h],m[h-1]),g=Math.max(m[h],m[h-1]);if(g>p&&p-1}function ee(Ot,vt){return Ot===null?vt:Ot}function ne(Ot,vt,ht){re();var Re=[vt],Be=[ht];if(G>=1)Re=[vt],Be=[ht];else if(G>0){var He=q(vt,ht);Re=He.xyzv,Be=He.abc}for(var $e=0;$e-1?ht[Je]:Q(Mt,dt,Dt);Vt>-1?Ze[Je]=Vt:Ze[Je]=oe(Mt,dt,Dt,ee(Ot,Ct))}H(Ze[0],Ze[1],Ze[2])}}function fe(Ot,vt,ht){var Re=function(Be,He,$e){ne(Ot,[vt[Be],vt[He],vt[$e]],[ht[Be],ht[He],ht[$e]])};Re(0,1,2),Re(2,3,0)}function ye(Ot,vt,ht){var Re=function(Be,He,$e){ne(Ot,[vt[Be],vt[He],vt[$e]],[ht[Be],ht[He],ht[$e]])};Re(0,1,2),Re(3,0,1),Re(2,3,0),Re(1,2,3)}function xe(Ot,vt,ht,Re){var Be=Ot[3];BeRe&&(Be=Re);for(var He=(Ot[3]-Be)/(Ot[3]-vt[3]+1e-9),$e=[],Ze=0;Ze<4;Ze++)$e[Ze]=(1-He)*Ot[Ze]+He*vt[Ze];return $e}function Ae(Ot,vt,ht){return Ot>=vt&&Ot<=ht}function Me(Ot){var vt=.001*(F-B);return Ot>=B-vt&&Ot<=F+vt}function Ie(Ot){for(var vt=[],ht=0;ht<4;ht++){var Re=Ot[ht];vt.push([c._x[Re],c._y[Re],c._z[Re],c._value[Re]])}return vt}var Ue=3;function qe(Ot,vt,ht,Re,Be,He){He||(He=1),ht=[-1,-1,-1];var $e=!1,Ze=[Ae(vt[0][3],Re,Be),Ae(vt[1][3],Re,Be),Ae(vt[2][3],Re,Be)];if(!Ze[0]&&!Ze[1]&&!Ze[2])return!1;var Je=function(dt,Dt,Ct){return Me(Dt[0][3])&&Me(Dt[1][3])&&Me(Dt[2][3])?(ne(dt,Dt,Ct),!0):HeZe?[N,He]:[He,R];Tt(vt,Je[0],Je[1])}}var Mt=[[Math.min(B,R),Math.max(B,R)],[Math.min(N,F),Math.max(N,F)]];["x","y","z"].forEach(function(dt){for(var Dt=[],Ct=0;Ct0&&($t.push(cr.id),dt==="x"?It.push([cr.distRatio,0,0]):dt==="y"?It.push([0,cr.distRatio,0]):It.push([0,0,cr.distRatio]))}else dt==="x"?on=_r(1,u-1):dt==="y"?on=_r(1,A-1):on=_r(1,b-1);$t.length>0&&(dt==="x"?Dt[Vt]=At(Ot,$t,Ht,Wt,It,Dt[Vt]):dt==="y"?Dt[Vt]=Kt(Ot,$t,Ht,Wt,It,Dt[Vt]):Dt[Vt]=nr(Ot,$t,Ht,Wt,It,Dt[Vt]),Vt++),on.length>0&&(dt==="x"?Dt[Vt]=Fe(Ot,on,Ht,Wt,Dt[Vt]):dt==="y"?Dt[Vt]=We(Ot,on,Ht,Wt,Dt[Vt]):Dt[Vt]=Ge(Ot,on,Ht,Wt,Dt[Vt]),Vt++)}var fr=c.caps[dt];fr.show&&fr.fill&&(Y(fr.fill),dt==="x"?Dt[Vt]=Fe(Ot,[0,u-1],Ht,Wt,Dt[Vt]):dt==="y"?Dt[Vt]=We(Ot,[0,A-1],Ht,Wt,Dt[Vt]):Dt[Vt]=Ge(Ot,[0,b-1],Ht,Wt,Dt[Vt]),Vt++)}}),S===0&&ae(),c._meshX=P,c._meshY=j,c._meshZ=U,c._meshIntensity=Z,c._Xs=_,c._Ys=T,c._Zs=f}return sr(),c}function s(c,m){var h=c.glplot.gl,p=v({gl:h}),g=new a(c,p,m.uid);return p._trace=g,g.update(m),c.glplot.add(p),g}V.exports={findNearestOnAxis:t,generateIsoMeshes:o,createIsosurfaceTrace:s}}}),y8=Ee({"src/traces/isosurface/index.js"(J,V){"use strict";V.exports={attributes:Sy(),supplyDefaults:nw().supplyDefaults,calc:aw(),colorbar:{min:"cmin",max:"cmax"},plot:ky().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:ov(),categories:["gl3d","showLegend"],meta:{}}}}),_8=Ee({"lib/isosurface.js"(J,V){"use strict";V.exports=y8()}}),iw=Ee({"src/traces/volume/attributes.js"(J,V){"use strict";var v=$s(),x=Sy(),E=Lm(),k=ia(),l=vo().extendFlat,e=El().overrideAll,t=V.exports=e(l({x:x.x,y:x.y,z:x.z,value:x.value,isomin:x.isomin,isomax:x.isomax,surface:x.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:x.slices,caps:x.caps,text:x.text,hovertext:x.hovertext,xhoverformat:x.xhoverformat,yhoverformat:x.yhoverformat,zhoverformat:x.zhoverformat,valuehoverformat:x.valuehoverformat,hovertemplate:x.hovertemplate,hovertemplatefallback:x.hovertemplatefallback},v("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:x.colorbar,opacity:x.opacity,opacityscale:E.opacityscale,lightposition:x.lightposition,lighting:x.lighting,flatshading:x.flatshading,contour:x.contour,hoverinfo:l({},k.hoverinfo),showlegend:l({},k.showlegend,{dflt:!1})}),"calc","nested");t.x.editType=t.y.editType=t.z.editType=t.value.editType="calc+clearAxisTypes"}}),b8=Ee({"src/traces/volume/defaults.js"(J,V){"use strict";var v=Vr(),x=iw(),E=nw().supplyIsoDefaults,k=rw().opacityscaleDefaults;V.exports=function(e,t,a,r){function n(o,s){return v.coerce(e,t,x,o,s)}E(e,t,a,r,n),k(e,t,r,n)}}}),x8=Ee({"src/traces/volume/convert.js"(J,V){"use strict";var v=Xc().gl_mesh3d,x=Ad().parseColorScale,E=Vr().isArrayOrTypedArray,k=Td(),l=pl().extractOpts,e=s0(),t=ky().findNearestOnAxis,a=ky().generateIsoMeshes;function r(s,c,m){this.scene=s,this.uid=m,this.mesh=c,this.name="",this.data=null,this.showContour=!1}var n=r.prototype;n.handlePick=function(s){if(s.object===this.mesh){var c=s.data.index,m=this.data._meshX[c],h=this.data._meshY[c],p=this.data._meshZ[c],g=this.data._Ys.length,i=this.data._Zs.length,w=t(m,this.data._Xs).id,S=t(h,this.data._Ys).id,M=t(p,this.data._Zs).id,C=s.index=M+i*S+i*g*w;s.traceCoordinate=[this.data._meshX[C],this.data._meshY[C],this.data._meshZ[C],this.data._value[C]];var _=this.data.hovertext||this.data.text;return E(_)&&_[C]!==void 0?s.textLabel=_[C]:_&&(s.textLabel=_),!0}},n.update=function(s){var c=this.scene,m=c.fullSceneLayout;this.data=a(s);function h(S,M,C,_){return M.map(function(T){return S.d2l(T,0,_)*C})}var p=e(h(m.xaxis,s._meshX,c.dataScale[0],s.xcalendar),h(m.yaxis,s._meshY,c.dataScale[1],s.ycalendar),h(m.zaxis,s._meshZ,c.dataScale[2],s.zcalendar)),g=e(s._meshI,s._meshJ,s._meshK),i={positions:p,cells:g,lightPosition:[s.lightposition.x,s.lightposition.y,s.lightposition.z],ambient:s.lighting.ambient,diffuse:s.lighting.diffuse,specular:s.lighting.specular,roughness:s.lighting.roughness,fresnel:s.lighting.fresnel,vertexNormalsEpsilon:s.lighting.vertexnormalsepsilon,faceNormalsEpsilon:s.lighting.facenormalsepsilon,opacity:s.opacity,opacityscale:s.opacityscale,contourEnable:s.contour.show,contourColor:k(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},w=l(s);i.vertexIntensity=s._meshIntensity,i.vertexIntensityBounds=[w.min,w.max],i.colormap=x(s),this.mesh.update(i)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function o(s,c){var m=s.glplot.gl,h=v({gl:m}),p=new r(s,h,c.uid);return h._trace=p,p.update(c),s.glplot.add(h),p}V.exports=o}}),w8=Ee({"src/traces/volume/index.js"(J,V){"use strict";V.exports={attributes:iw(),supplyDefaults:b8(),calc:aw(),colorbar:{min:"cmin",max:"cmax"},plot:x8(),moduleType:"trace",name:"volume",basePlotModule:ov(),categories:["gl3d","showLegend"],meta:{}}}}),T8=Ee({"lib/volume.js"(J,V){"use strict";V.exports=w8()}}),A8=Ee({"src/traces/mesh3d/defaults.js"(J,V){"use strict";var v=Ri(),x=Vr(),E=Cc(),k=o0();V.exports=function(e,t,a,r){function n(h,p){return x.coerce(e,t,k,h,p)}function o(h){var p=h.map(function(g){var i=n(g);return i&&x.isArrayOrTypedArray(i)?i:null});return p.every(function(g){return g&&g.length===p[0].length})&&p}var s=o(["x","y","z"]);if(!s){t.visible=!1;return}if(o(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j)){t.visible=!1;return}var c=v.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],r),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(h){n(h)});var m=n("contour.show");m&&(n("contour.color"),n("contour.width")),"intensity"in e?(n("intensity"),n("intensitymode"),E(e,t,r,n,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?n("facecolor"):"vertexcolor"in e?n("vertexcolor"):n("color",a)),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),n("xhoverformat"),n("yhoverformat"),n("zhoverformat"),t._length=null}}}),M8=Ee({"src/traces/mesh3d/calc.js"(J,V){"use strict";var v=Sf();V.exports=function(E,k){k.intensity&&v(E,k,{vals:k.intensity,containerStr:"",cLetter:"c"})}}}),S8=Ee({"src/traces/mesh3d/convert.js"(J,V){"use strict";var v=Xc().gl_mesh3d,x=Xc().delaunay_triangulate,E=Xc().alpha_shape,k=Xc().convex_hull,l=Ad().parseColorScale,e=Vr().isArrayOrTypedArray,t=Td(),a=pl().extractOpts,r=s0();function n(i,w,S){this.scene=i,this.uid=S,this.mesh=w,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var o=n.prototype;o.handlePick=function(i){if(i.object===this.mesh){var w=i.index=i.data.index;i.data._cellCenter?i.traceCoordinate=i.data.dataCoordinate:i.traceCoordinate=[this.data.x[w],this.data.y[w],this.data.z[w]];var S=this.data.hovertext||this.data.text;return e(S)&&S[w]!==void 0?i.textLabel=S[w]:S&&(i.textLabel=S),!0}};function s(i){for(var w=[],S=i.length,M=0;M=w-.5)return!1;return!0}o.update=function(i){var w=this.scene,S=w.fullSceneLayout;this.data=i;var M=i.x.length,C=r(c(S.xaxis,i.x,w.dataScale[0],i.xcalendar),c(S.yaxis,i.y,w.dataScale[1],i.ycalendar),c(S.zaxis,i.z,w.dataScale[2],i.zcalendar)),_;if(i.i&&i.j&&i.k){if(i.i.length!==i.j.length||i.j.length!==i.k.length||!p(i.i,M)||!p(i.j,M)||!p(i.k,M))return;_=r(m(i.i),m(i.j),m(i.k))}else i.alphahull===0?_=k(C):i.alphahull>0?_=E(i.alphahull,C):_=h(i.delaunayaxis,C);var T={positions:C,cells:_,lightPosition:[i.lightposition.x,i.lightposition.y,i.lightposition.z],ambient:i.lighting.ambient,diffuse:i.lighting.diffuse,specular:i.lighting.specular,roughness:i.lighting.roughness,fresnel:i.lighting.fresnel,vertexNormalsEpsilon:i.lighting.vertexnormalsepsilon,faceNormalsEpsilon:i.lighting.facenormalsepsilon,opacity:i.opacity,contourEnable:i.contour.show,contourColor:t(i.contour.color).slice(0,3),contourWidth:i.contour.width,useFacetNormals:i.flatshading};if(i.intensity){var f=a(i);this.color="#fff";var u=i.intensitymode;T[u+"Intensity"]=i.intensity,T[u+"IntensityBounds"]=[f.min,f.max],T.colormap=l(i)}else i.vertexcolor?(this.color=i.vertexcolor[0],T.vertexColors=s(i.vertexcolor)):i.facecolor?(this.color=i.facecolor[0],T.cellColors=s(i.facecolor)):(this.color=i.color,T.meshColor=t(i.color));this.mesh.update(T)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function g(i,w){var S=i.glplot.gl,M=v({gl:S}),C=new n(i,M,w.uid);return M._trace=C,C.update(w),i.glplot.add(M),C}V.exports=g}}),E8=Ee({"src/traces/mesh3d/index.js"(J,V){"use strict";V.exports={attributes:o0(),supplyDefaults:A8(),calc:M8(),colorbar:{min:"cmin",max:"cmax"},plot:S8(),moduleType:"trace",name:"mesh3d",basePlotModule:ov(),categories:["gl3d","showLegend"],meta:{}}}}),k8=Ee({"lib/mesh3d.js"(J,V){"use strict";V.exports=E8()}}),ow=Ee({"src/traces/cone/attributes.js"(J,V){"use strict";var v=$s(),x=Fl().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:k}=Cs(),l=o0(),e=ia(),t=vo().extendFlat,a={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:E({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:k({editType:"calc"}),uhoverformat:x("u",1),vhoverformat:x("v",1),whoverformat:x("w",1),xhoverformat:x("x"),yhoverformat:x("y"),zhoverformat:x("z"),showlegend:t({},e.showlegend,{dflt:!1})};t(a,v("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(n){a[n]=l[n]}),a.hoverinfo=t({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),V.exports=a}}),C8=Ee({"src/traces/cone/defaults.js"(J,V){"use strict";var v=Vr(),x=Cc(),E=ow();V.exports=function(l,e,t,a){function r(g,i){return v.coerce(l,e,E,g,i)}var n=r("u"),o=r("v"),s=r("w"),c=r("x"),m=r("y"),h=r("z");if(!n||!n.length||!o||!o.length||!s||!s.length||!c||!c.length||!m||!m.length||!h||!h.length){e.visible=!1;return}var p=r("sizemode");r("sizeref",p==="raw"?1:.5),r("anchor"),r("lighting.ambient"),r("lighting.diffuse"),r("lighting.specular"),r("lighting.roughness"),r("lighting.fresnel"),r("lightposition.x"),r("lightposition.y"),r("lightposition.z"),x(l,e,a,r,{prefix:"",cLetter:"c"}),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),r("uhoverformat"),r("vhoverformat"),r("whoverformat"),r("xhoverformat"),r("yhoverformat"),r("zhoverformat"),e._length=null}}}),L8=Ee({"src/traces/cone/calc.js"(J,V){"use strict";var v=Sf();V.exports=function(E,k){for(var l=k.u,e=k.v,t=k.w,a=Math.min(k.x.length,k.y.length,k.z.length,l.length,e.length,t.length),r=-1/0,n=1/0,o=0;o2?p=m.slice(1,h-1):h===2?p=[(m[0]+m[1])/2]:p=m,p}function o(m){var h=m.length;return h===1?[.5,.5]:[m[1]-m[0],m[h-1]-m[h-2]]}function s(m,h){var p=m.fullSceneLayout,g=m.dataScale,i=h._len,w={};function S(oe,H){var X=p[H],K=g[t[H]];return E.simpleMap(oe,function(G){return X.d2l(G)*K})}if(w.vectors=e(S(h._u,"xaxis"),S(h._v,"yaxis"),S(h._w,"zaxis"),i),!i)return{positions:[],cells:[]};var M=S(h._Xs,"xaxis"),C=S(h._Ys,"yaxis"),_=S(h._Zs,"zaxis");w.meshgrid=[M,C,_],w.gridFill=h._gridFill;var T=h._slen;if(T)w.startingPositions=e(S(h._startsX,"xaxis"),S(h._startsY,"yaxis"),S(h._startsZ,"zaxis"));else{for(var f=C[0],u=n(M),A=n(_),b=new Array(u.length*A.length),z=0,I=0;If&&(f=z[0]),z[1]u&&(u=z[1])}function b(z){switch(z.type){case"GeometryCollection":z.geometries.forEach(b);break;case"Point":A(z.coordinates);break;case"MultiPoint":z.coordinates.forEach(A);break}}S.arcs.forEach(function(z){for(var I=-1,N=z.length,R;++If&&(f=R[0]),R[1]u&&(u=R[1])});for(C in S.objects)b(S.objects[C]);return[_,T,f,u]}function l(S,M){for(var C,_=S.length,T=_-M;T<--_;)C=S[T],S[T++]=S[_],S[_]=C}function e(S,M){return typeof M=="string"&&(M=S.objects[M]),M.type==="GeometryCollection"?{type:"FeatureCollection",features:M.geometries.map(function(C){return t(S,C)})}:t(S,M)}function t(S,M){var C=M.id,_=M.bbox,T=M.properties==null?{}:M.properties,f=a(S,M);return C==null&&_==null?{type:"Feature",properties:T,geometry:f}:_==null?{type:"Feature",id:C,properties:T,geometry:f}:{type:"Feature",id:C,bbox:_,properties:T,geometry:f}}function a(S,M){var C=E(S.transform),_=S.arcs;function T(I,N){N.length&&N.pop();for(var R=_[I<0?~I:I],B=0,F=R.length;B1)_=s(S,M,C);else for(T=0,_=new Array(f=S.arcs.length);T1)for(var N=1,R=A(z[0]),B,F;NR&&(F=z[0],z[0]=z[N],z[N]=F,R=B);return z}).filter(function(b){return b.length>0})}}function p(S,M){for(var C=0,_=S.length;C<_;){var T=C+_>>>1;S[T]=2))throw new Error("n must be \u22652");b=S.bbox||k(S);var C=b[0],_=b[1],T=b[2],f=b[3],u;M={scale:[T-C?(T-C)/(u-1):1,f-_?(f-_)/(u-1):1],translate:[C,_]}}else b=S.bbox;var A=i(M),b,z,I=S.objects,N={};function R(P){return A(P)}function B(P){var j;switch(P.type){case"GeometryCollection":j={type:"GeometryCollection",geometries:P.geometries.map(B)};break;case"Point":j={type:"Point",coordinates:R(P.coordinates)};break;case"MultiPoint":j={type:"MultiPoint",coordinates:P.coordinates.map(R)};break;default:return P}return P.id!=null&&(j.id=P.id),P.bbox!=null&&(j.bbox=P.bbox),P.properties!=null&&(j.properties=P.properties),j}function F(P){var j=0,U=1,Z=P.length,Q,re=new Array(Z);for(re[0]=A(P[0],0);++j0&&(k.push(l),l=[])}return l.length>0&&k.push(l),k},J.makeLine=function(v){return v.length===1?{type:"LineString",coordinates:v[0]}:{type:"MultiLineString",coordinates:v}},J.makePolygon=function(v){if(v.length===1)return{type:"Polygon",coordinates:v};for(var x=new Array(v.length),E=0;E{for(var S in w)v(i,S,{get:w[S],enumerable:!0})},e=(i,w,S,M)=>{if(w&&typeof w=="object"||typeof w=="function")for(let C of E(w))!k.call(i,C)&&C!==S&&v(i,C,{get:()=>w[C],enumerable:!(M=x(w,C))||M.enumerable});return i},t=i=>e(v({},"__esModule",{value:!0}),i),a={};l(a,{COUNTRIES:()=>r,byAlpha2:()=>p,byAlpha3:()=>h,byM49:()=>g,createLookup:()=>o,lookup:()=>c,lookupAlpha3:()=>m,sanitize:()=>n}),V.exports=t(a);var r=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\u{1F1F3}\u{1F1F7}","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function n(i){return i.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function o(i){let w=new Map,S=new Map,M=new Map;for(let f of i)w.set(f.iso3,f),f.iso2&&S.set(f.iso2,f),f.m49&&M.set(f.m49,f);let C=new Map;for(let f of i)for(let u of[f.name,...f.aliases]){let A=n(u),b=C.get(A);if(b!==void 0&&b!==f.iso3)throw new Error(`Duplicate name/alias "${A}": ${b} vs ${f.iso3}`);C.set(A,f.iso3)}function _(f){if(f==null)return;let u=String(f).trim();if(!u)return;if(/^\d+$/.test(u)){let b=M.get(String(parseInt(u,10)).padStart(3,"0"));if(b)return b}if(/^[A-Za-z]{2}$/.test(u)){let b=S.get(u.toUpperCase());if(b)return b}if(/^[A-Za-z]{3}$/.test(u)){let b=w.get(u.toUpperCase());if(b)return b}let A=C.get(n(u));return A===void 0?void 0:w.get(A)}function T(f){var u;return(u=_(f))==null?void 0:u.iso3}return{lookup:_,lookupAlpha3:T,byAlpha3:w,byAlpha2:S,byM49:M}}var s=o(r),c=s.lookup,m=s.lookupAlpha3,h=s.byAlpha3,p=s.byAlpha2,g=s.byM49}}),Ly=Ee({"node_modules/@turf/helpers/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=63710088e-1,v={centimeters:V*100,centimetres:V*100,degrees:360/(2*Math.PI),feet:V*3.28084,inches:V*39.37,kilometers:V/1e3,kilometres:V/1e3,meters:V,metres:V,miles:V/1609.344,millimeters:V*1e3,millimetres:V*1e3,nauticalmiles:V/1852,radians:1,yards:V*1.0936},x={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function E(I,N,R={}){let B={type:"Feature"};return(R.id===0||R.id)&&(B.id=R.id),R.bbox&&(B.bbox=R.bbox),B.properties=N||{},B.geometry=I,B}function k(I,N,R={}){switch(I){case"Point":return l(N).geometry;case"LineString":return r(N).geometry;case"Polygon":return t(N).geometry;case"MultiPoint":return c(N).geometry;case"MultiLineString":return s(N).geometry;case"MultiPolygon":return m(N).geometry;default:throw new Error(I+" is invalid")}}function l(I,N,R={}){if(!I)throw new Error("coordinates is required");if(!Array.isArray(I))throw new Error("coordinates must be an Array");if(I.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!u(I[0])||!u(I[1]))throw new Error("coordinates must contain numbers");return E({type:"Point",coordinates:I},N,R)}function e(I,N,R={}){return o(I.map(B=>l(B,N)),R)}function t(I,N,R={}){for(let F of I){if(F.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(F[F.length-1].length!==F[0].length)throw new Error("First and last Position are not equivalent.");for(let P=0;Pt(B,N)),R)}function r(I,N,R={}){if(I.length<2)throw new Error("coordinates must be an array of two or more positions");return E({type:"LineString",coordinates:I},N,R)}function n(I,N,R={}){return o(I.map(B=>r(B,N)),R)}function o(I,N={}){let R={type:"FeatureCollection"};return N.id&&(R.id=N.id),N.bbox&&(R.bbox=N.bbox),R.features=I,R}function s(I,N,R={}){return E({type:"MultiLineString",coordinates:I},N,R)}function c(I,N,R={}){return E({type:"MultiPoint",coordinates:I},N,R)}function m(I,N,R={}){return E({type:"MultiPolygon",coordinates:I},N,R)}function h(I,N,R={}){return E({type:"GeometryCollection",geometries:I},N,R)}function p(I,N=0){if(N&&!(N>=0))throw new Error("precision must be a positive number");let R=Math.pow(10,N||0);return Math.round(I*R)/R}function g(I,N="kilometers"){let R=v[N];if(!R)throw new Error(N+" units is invalid");return I*R}function i(I,N="kilometers"){let R=v[N];if(!R)throw new Error(N+" units is invalid");return I/R}function w(I,N){return C(i(I,N))}function S(I){let N=I%360;return N<0&&(N+=360),N}function M(I){return I=I%360,I>180?I-360:I<-180?I+360:I}function C(I){return I%(2*Math.PI)*180/Math.PI}function _(I){return I%360*Math.PI/180}function T(I,N="kilometers",R="kilometers"){if(!(I>=0))throw new Error("length must be a positive number");return g(i(I,N),R)}function f(I,N="meters",R="kilometers"){if(!(I>=0))throw new Error("area must be a positive number");let B=x[N];if(!B)throw new Error("invalid original units");let F=x[R];if(!F)throw new Error("invalid final units");return I/B*F}function u(I){return!isNaN(I)&&I!==null&&!Array.isArray(I)}function A(I){return I!==null&&typeof I=="object"&&!Array.isArray(I)}function b(I){if(!I)throw new Error("bbox is required");if(!Array.isArray(I))throw new Error("bbox must be an Array");if(I.length!==4&&I.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");I.forEach(N=>{if(!u(N))throw new Error("bbox must only contain numbers")})}function z(I){if(!I)throw new Error("id is required");if(["string","number"].indexOf(typeof I)===-1)throw new Error("id must be a number or a string")}J.areaFactors=x,J.azimuthToBearing=M,J.bearingToAzimuth=S,J.convertArea=f,J.convertLength=T,J.degreesToRadians=_,J.earthRadius=V,J.factors=v,J.feature=E,J.featureCollection=o,J.geometry=k,J.geometryCollection=h,J.isNumber=u,J.isObject=A,J.lengthToDegrees=w,J.lengthToRadians=i,J.lineString=r,J.lineStrings=n,J.multiLineString=s,J.multiPoint=c,J.multiPolygon=m,J.point=l,J.points=e,J.polygon=t,J.polygons=a,J.radiansToDegrees=C,J.radiansToLength=g,J.round=p,J.validateBBox=b,J.validateId=z}}),Py=Ee({"node_modules/@turf/meta/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=Ly();function v(i,w,S){if(i!==null)for(var M,C,_,T,f,u,A,b=0,z=0,I,N=i.type,R=N==="FeatureCollection",B=N==="Feature",F=R?i.features.length:1,P=0;Pu||R>A||B>b){f=z,u=M,A=R,b=B,_=0;return}var F=V.lineString.call(void 0,[f,z],S.properties);if(w(F,M,C,B,_)===!1)return!1;_++,f=z})===!1)return!1}}})}function c(i,w,S){var M=S,C=!1;return s(i,function(_,T,f,u,A){C===!1&&S===void 0?M=_:M=w(M,_,T,f,u,A),C=!0}),M}function m(i,w){if(!i)throw new Error("geojson is required");n(i,function(S,M,C){if(S.geometry!==null){var _=S.geometry.type,T=S.geometry.coordinates;switch(_){case"LineString":if(w(S,M,C,0,0)===!1)return!1;break;case"Polygon":for(var f=0;fn+E(o),0)}function E(r){let n=0,o;switch(r.type){case"Polygon":return k(r.coordinates);case"MultiPolygon":for(o=0;o0){n+=Math.abs(t(r[0]));for(let o=1;o=n?(s+2)%n:s+2],p=c[0]*e,g=m[1]*e,i=h[0]*e;o+=(i-p)*Math.sin(g),s++}return o*l}var a=x;J.area=x,J.default=a}}),q8=Ee({"node_modules/@turf/centroid/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=Ly(),v=Py();function x(k,l={}){let e=0,t=0,a=0;return v.coordEach.call(void 0,k,function(r){e+=r[0],t+=r[1],a++},!0),V.point.call(void 0,[e/a,t/a],l.properties)}var E=x;J.centroid=x,J.default=E}}),V8=Ee({"node_modules/d3-geo/node_modules/d3-array/dist/d3-array.js"(J,V){(function(v,x){x(typeof J=="object"&&typeof V<"u"?J:v.d3=v.d3||{})})(J,function(v){"use strict";function x(K,G){return KG?1:K>=G?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(G,Y,q,$){for(q==null&&(q=0),$==null&&($=G.length);q<$;){var ee=q+$>>>1;K(G[ee],Y)<0?q=ee+1:$=ee}return q},right:function(G,Y,q,$){for(q==null&&(q=0),$==null&&($=G.length);q<$;){var ee=q+$>>>1;K(G[ee],Y)>0?$=ee:q=ee+1}return q}}}function k(K){return function(G,Y){return x(K(G),Y)}}var l=E(x),e=l.right,t=l.left;function a(K,G){G==null&&(G=r);for(var Y=0,q=K.length-1,$=K[0],ee=new Array(q<0?0:q);YK?1:G>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,G){var Y=K.length,q=0,$=-1,ee=0,ne,fe,ye=0;if(G==null)for(;++$1)return ye/(q-1)}function m(K,G){var Y=c(K,G);return Y&&Math.sqrt(Y)}function h(K,G){var Y=K.length,q=-1,$,ee,ne;if(G==null){for(;++q=$)for(ee=ne=$;++q$&&(ee=$),ne<$&&(ne=$))}else for(;++q=$)for(ee=ne=$;++q$&&(ee=$),ne<$&&(ne=$));return[ee,ne]}var p=Array.prototype,g=p.slice,i=p.map;function w(K){return function(){return K}}function S(K){return K}function M(K,G,Y){K=+K,G=+G,Y=($=arguments.length)<2?(G=K,K=0,1):$<3?1:+Y;for(var q=-1,$=Math.max(0,Math.ceil((G-K)/Y))|0,ee=new Array($);++q<$;)ee[q]=K+q*Y;return ee}var C=Math.sqrt(50),_=Math.sqrt(10),T=Math.sqrt(2);function f(K,G,Y){var q,$=-1,ee,ne,fe;if(G=+G,K=+K,Y=+Y,K===G&&Y>0)return[K];if((q=G0)for(K=Math.ceil(K/fe),G=Math.floor(G/fe),ne=new Array(ee=Math.ceil(G-K+1));++$=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,$):-Math.pow(10,-$)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,G,Y){var q=Math.abs(G-K)/Math.max(0,Y),$=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/$;return ee>=C?$*=10:ee>=_?$*=5:ee>=T&&($*=2),GMe;)Ie.pop(),--Ue;var qe=new Array(Ue+1),ke;for(ee=0;ee<=Ue;++ee)ke=qe[ee]=[],ke.x0=ee>0?Ie[ee-1]:Ae,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,$=(q-1)*G,ee=Math.floor($),ne=+Y(K[ee],ee,K),fe=+Y(K[ee+1],ee+1,K);return ne+(fe-ne)*($-ee)}}function N(K,G,Y){return K=i.call(K,s).sort(x),Math.ceil((Y-G)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function R(K,G,Y){return Math.ceil((Y-G)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,G){var Y=K.length,q=-1,$,ee;if(G==null){for(;++q=$)for(ee=$;++qee&&(ee=$)}else for(;++q=$)for(ee=$;++qee&&(ee=$);return ee}function F(K,G){var Y=K.length,q=Y,$=-1,ee,ne=0;if(G==null)for(;++$=0;)for(ne=K[G],Y=ne.length;--Y>=0;)ee[--$]=ne[Y];return ee}function U(K,G){var Y=K.length,q=-1,$,ee;if(G==null){for(;++q=$)for(ee=$;++q$&&(ee=$)}else for(;++q=$)for(ee=$;++q$&&(ee=$);return ee}function Z(K,G){for(var Y=G.length,q=new Array(Y);Y--;)q[Y]=K[G[Y]];return q}function Q(K,G){if(Y=K.length){var Y,q=0,$=0,ee,ne=K[$];for(G==null&&(G=x);++q0?1:zt<0?-1:0},f=Math.sqrt,u=Math.tan;function A(zt){return zt>1?0:zt<-1?r:Math.acos(zt)}function b(zt){return zt>1?n:zt<-1?-n:Math.asin(zt)}function z(zt){return(zt=_(zt/2))*zt}function I(){}function N(zt,rr){zt&&B.hasOwnProperty(zt.type)&&B[zt.type](zt,rr)}var R={Feature:function(zt,rr){N(zt.geometry,rr)},FeatureCollection:function(zt,rr){for(var Br=zt.features,wr=-1,un=Br.length;++wr=0?1:-1,un=wr*Br,Ln=i(rr),Vn=_(rr),Jn=H*Vn,ca=oe*Ln+Jn*i(un),Pa=Jn*wr*_(un);U.add(g(Pa,ca)),ae=zt,oe=Ln,H=Vn}function $(zt){return Z.reset(),j(zt,X),Z*2}function ee(zt){return[g(zt[1],zt[0]),b(zt[2])]}function ne(zt){var rr=zt[0],Br=zt[1],wr=i(Br);return[wr*i(rr),wr*_(rr),_(Br)]}function fe(zt,rr){return zt[0]*rr[0]+zt[1]*rr[1]+zt[2]*rr[2]}function ye(zt,rr){return[zt[1]*rr[2]-zt[2]*rr[1],zt[2]*rr[0]-zt[0]*rr[2],zt[0]*rr[1]-zt[1]*rr[0]]}function xe(zt,rr){zt[0]+=rr[0],zt[1]+=rr[1],zt[2]+=rr[2]}function Ae(zt,rr){return[zt[0]*rr,zt[1]*rr,zt[2]*rr]}function Me(zt){var rr=f(zt[0]*zt[0]+zt[1]*zt[1]+zt[2]*zt[2]);zt[0]/=rr,zt[1]/=rr,zt[2]/=rr}var Ie,Ue,qe,ke,ge,ue,ve,se,Te=E(),Fe,We,Ge={point:gt,lineStart:Tt,lineEnd:At,polygonStart:function(){Ge.point=Kt,Ge.lineStart=nr,Ge.lineEnd=_r,Te.reset(),X.polygonStart()},polygonEnd:function(){X.polygonEnd(),Ge.point=gt,Ge.lineStart=Tt,Ge.lineEnd=At,U<0?(Ie=-(qe=180),Ue=-(ke=90)):Te>t?ke=90:Te<-t&&(Ue=-90),We[0]=Ie,We[1]=qe},sphere:function(){Ie=-(qe=180),Ue=-(ke=90)}};function gt(zt,rr){Fe.push(We=[Ie=zt,qe=zt]),rrke&&(ke=rr)}function mt(zt,rr){var Br=ne([zt*m,rr*m]);if(se){var wr=ye(se,Br),un=[wr[1],-wr[0],0],Ln=ye(un,wr);Me(Ln),Ln=ee(Ln);var Vn=zt-ge,Jn=Vn>0?1:-1,ca=Ln[0]*c*Jn,Pa,Gn=h(Vn)>180;Gn^(Jn*geke&&(ke=Pa)):(ca=(ca+360)%360-180,Gn^(Jn*geke&&(ke=rr))),Gn?ztZt(Ie,qe)&&(qe=zt):Zt(zt,qe)>Zt(Ie,qe)&&(Ie=zt):qe>=Ie?(ztqe&&(qe=zt)):zt>ge?Zt(Ie,zt)>Zt(Ie,qe)&&(qe=zt):Zt(zt,qe)>Zt(Ie,qe)&&(Ie=zt)}else Fe.push(We=[Ie=zt,qe=zt]);rrke&&(ke=rr),se=Br,ge=zt}function Tt(){Ge.point=mt}function At(){We[0]=Ie,We[1]=qe,Ge.point=gt,se=null}function Kt(zt,rr){if(se){var Br=zt-ge;Te.add(h(Br)>180?Br+(Br>0?360:-360):Br)}else ue=zt,ve=rr;X.point(zt,rr),mt(zt,rr)}function nr(){X.lineStart()}function _r(){Kt(ue,ve),X.lineEnd(),h(Te)>t&&(Ie=-(qe=180)),We[0]=Ie,We[1]=qe,se=null}function Zt(zt,rr){return(rr-=zt)<0?rr+360:rr}function sr(zt,rr){return zt[0]-rr[0]}function Ot(zt,rr){return zt[0]<=zt[1]?zt[0]<=rr&&rr<=zt[1]:rrZt(wr[0],wr[1])&&(wr[1]=un[1]),Zt(un[0],wr[1])>Zt(wr[0],wr[1])&&(wr[0]=un[0])):Ln.push(wr=un);for(Vn=-1/0,Br=Ln.length-1,rr=0,wr=Ln[Br];rr<=Br;wr=un,++rr)un=Ln[rr],(Jn=Zt(wr[1],un[0]))>Vn&&(Vn=Jn,Ie=un[0],qe=wr[1])}return Fe=We=null,Ie===1/0||Ue===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ie,Ue],[qe,ke]]}var ht,Re,Be,He,$e,Ze,Je,Mt,dt,Dt,Ct,Vt,Ht,Wt,Sr,on,$t={sphere:I,point:It,lineStart:cr,lineEnd:ln,polygonStart:function(){$t.lineStart=nn,$t.lineEnd=wn},polygonEnd:function(){$t.lineStart=cr,$t.lineEnd=ln}};function It(zt,rr){zt*=m,rr*=m;var Br=i(rr);ir(Br*i(zt),Br*_(zt),_(rr))}function ir(zt,rr,Br){++ht,Be+=(zt-Be)/ht,He+=(rr-He)/ht,$e+=(Br-$e)/ht}function cr(){$t.point=fr}function fr(zt,rr){zt*=m,rr*=m;var Br=i(rr);Wt=Br*i(zt),Sr=Br*_(zt),on=_(rr),$t.point=Ir,ir(Wt,Sr,on)}function Ir(zt,rr){zt*=m,rr*=m;var Br=i(rr),wr=Br*i(zt),un=Br*_(zt),Ln=_(rr),Vn=g(f((Vn=Sr*Ln-on*un)*Vn+(Vn=on*wr-Wt*Ln)*Vn+(Vn=Wt*un-Sr*wr)*Vn),Wt*wr+Sr*un+on*Ln);Re+=Vn,Ze+=Vn*(Wt+(Wt=wr)),Je+=Vn*(Sr+(Sr=un)),Mt+=Vn*(on+(on=Ln)),ir(Wt,Sr,on)}function ln(){$t.point=It}function nn(){$t.point=Un}function wn(){jn(Vt,Ht),$t.point=It}function Un(zt,rr){Vt=zt,Ht=rr,zt*=m,rr*=m,$t.point=jn;var Br=i(rr);Wt=Br*i(zt),Sr=Br*_(zt),on=_(rr),ir(Wt,Sr,on)}function jn(zt,rr){zt*=m,rr*=m;var Br=i(rr),wr=Br*i(zt),un=Br*_(zt),Ln=_(rr),Vn=Sr*Ln-on*un,Jn=on*wr-Wt*Ln,ca=Wt*un-Sr*wr,Pa=f(Vn*Vn+Jn*Jn+ca*ca),Gn=b(Pa),oa=Pa&&-Gn/Pa;dt+=oa*Vn,Dt+=oa*Jn,Ct+=oa*ca,Re+=Gn,Ze+=Gn*(Wt+(Wt=wr)),Je+=Gn*(Sr+(Sr=un)),Mt+=Gn*(on+(on=Ln)),ir(Wt,Sr,on)}function Aa(zt){ht=Re=Be=He=$e=Ze=Je=Mt=dt=Dt=Ct=0,j(zt,$t);var rr=dt,Br=Dt,wr=Ct,un=rr*rr+Br*Br+wr*wr;return unr?zt+Math.round(-zt/s)*s:zt,rr]}ei.invert=ei;function Fa(zt,rr,Br){return(zt%=s)?rr||Br?Qn(Mi(zt),ci(rr,Br)):Mi(zt):rr||Br?ci(rr,Br):ei}function ai(zt){return function(rr,Br){return rr+=zt,[rr>r?rr-s:rr<-r?rr+s:rr,Br]}}function Mi(zt){var rr=ai(zt);return rr.invert=ai(-zt),rr}function ci(zt,rr){var Br=i(zt),wr=_(zt),un=i(rr),Ln=_(rr);function Vn(Jn,ca){var Pa=i(ca),Gn=i(Jn)*Pa,oa=_(Jn)*Pa,fa=_(ca),La=fa*Br+Gn*wr;return[g(oa*un-La*Ln,Gn*Br-fa*wr),b(La*un+oa*Ln)]}return Vn.invert=function(Jn,ca){var Pa=i(ca),Gn=i(Jn)*Pa,oa=_(Jn)*Pa,fa=_(ca),La=fa*un-oa*Ln;return[g(oa*un+fa*Ln,Gn*Br+La*wr),b(La*Br-Gn*wr)]},Vn}function ba(zt){zt=Fa(zt[0]*m,zt[1]*m,zt.length>2?zt[2]*m:0);function rr(Br){return Br=zt(Br[0]*m,Br[1]*m),Br[0]*=c,Br[1]*=c,Br}return rr.invert=function(Br){return Br=zt.invert(Br[0]*m,Br[1]*m),Br[0]*=c,Br[1]*=c,Br},rr}function pa(zt,rr,Br,wr,un,Ln){if(Br){var Vn=i(rr),Jn=_(rr),ca=wr*Br;un==null?(un=rr+wr*s,Ln=rr-ca/2):(un=Ii(Vn,un),Ln=Ii(Vn,Ln),(wr>0?unLn)&&(un+=wr*s));for(var Pa,Gn=un;wr>0?Gn>Ln:Gn1&&zt.push(zt.pop().concat(zt.shift()))},result:function(){var Br=zt;return zt=[],rr=null,Br}}}function Kn(zt,rr){return h(zt[0]-rr[0])=0;--Jn)un.point((oa=Gn[Jn])[0],oa[1]);else wr(fa.x,fa.p.x,-1,un);fa=fa.p}fa=fa.o,Gn=fa.z,La=!La}while(!fa.v);un.lineEnd()}}}function hr(zt){if(rr=zt.length){for(var rr,Br=0,wr=zt[0],un;++Br=0?1:-1,Yo=Wo*Vo,as=Yo>r,Bo=Bi*oo;if(ur.add(g(Bo*Wo*_(Yo),Ni*go+Bo*i(Yo))),Vn+=as?Vo+Wo*s:Vo,as^La>=Br^Va>=Br){var Ks=ye(ne(fa),ne(_i));Me(Ks);var Rs=ye(Ln,Ks);Me(Rs);var ps=(as^Vo>=0?-1:1)*b(Rs[2]);(wr>ps||wr===ps&&(Ks[0]||Ks[1]))&&(Jn+=as^Vo>=0?1:-1)}}return(Vn<-t||Vn0){for(ca||(un.polygonStart(),ca=!0),un.lineStart(),go=0;go1&&Ga&2&&oo.push(oo.pop().concat(oo.shift())),Gn.push(oo.filter(at))}}return fa}}function at(zt){return zt.length>1}function kt(zt,rr){return((zt=zt.x)[0]<0?zt[1]-n-t:n-zt[1])-((rr=rr.x)[0]<0?rr[1]-n-t:n-rr[1])}var Ut=Fr(function(){return!0},ar,br,[-r,-n]);function ar(zt){var rr=NaN,Br=NaN,wr=NaN,un;return{lineStart:function(){zt.lineStart(),un=1},point:function(Ln,Vn){var Jn=Ln>0?r:-r,ca=h(Ln-rr);h(ca-r)0?n:-n),zt.point(wr,Br),zt.lineEnd(),zt.lineStart(),zt.point(Jn,Br),zt.point(Ln,Br),un=0):wr!==Jn&&ca>=r&&(h(rr-wr)t?p((_(rr)*(Ln=i(wr))*_(Br)-_(wr)*(un=i(rr))*_(zt))/(un*Ln*Vn)):(rr+wr)/2}function br(zt,rr,Br,wr){var un;if(zt==null)un=Br*n,wr.point(-r,un),wr.point(0,un),wr.point(r,un),wr.point(r,0),wr.point(r,-un),wr.point(0,-un),wr.point(-r,-un),wr.point(-r,0),wr.point(-r,un);else if(h(zt[0]-rr[0])>t){var Ln=zt[0]0,un=h(rr)>t;function Ln(Gn,oa,fa,La){pa(La,zt,Br,fa,Gn,oa)}function Vn(Gn,oa){return i(Gn)*i(oa)>rr}function Jn(Gn){var oa,fa,La,qa,Bi;return{lineStart:function(){qa=La=!1,Bi=1},point:function(Ni,Zi){var _i=[Ni,Zi],Va,Ga=Vn(Ni,Zi),oo=wr?Ga?0:Pa(Ni,Zi):Ga?Pa(Ni+(Ni<0?r:-r),Zi):0;if(!oa&&(qa=La=Ga)&&Gn.lineStart(),Ga!==La&&(Va=ca(oa,_i),(!Va||Kn(oa,Va)||Kn(_i,Va))&&(_i[2]=1)),Ga!==La)Bi=0,Ga?(Gn.lineStart(),Va=ca(_i,oa),Gn.point(Va[0],Va[1])):(Va=ca(oa,_i),Gn.point(Va[0],Va[1],2),Gn.lineEnd()),oa=Va;else if(un&&oa&&wr^Ga){var go;!(oo&fa)&&(go=ca(_i,oa,!0))&&(Bi=0,wr?(Gn.lineStart(),Gn.point(go[0][0],go[0][1]),Gn.point(go[1][0],go[1][1]),Gn.lineEnd()):(Gn.point(go[1][0],go[1][1]),Gn.lineEnd(),Gn.lineStart(),Gn.point(go[0][0],go[0][1],3)))}Ga&&(!oa||!Kn(oa,_i))&&Gn.point(_i[0],_i[1]),oa=_i,La=Ga,fa=oo},lineEnd:function(){La&&Gn.lineEnd(),oa=null},clean:function(){return Bi|(qa&&La)<<1}}}function ca(Gn,oa,fa){var La=ne(Gn),qa=ne(oa),Bi=[1,0,0],Ni=ye(La,qa),Zi=fe(Ni,Ni),_i=Ni[0],Va=Zi-_i*_i;if(!Va)return!fa&&Gn;var Ga=rr*Zi/Va,oo=-rr*_i/Va,go=ye(Bi,Ni),Vo=Ae(Bi,Ga),Wo=Ae(Ni,oo);xe(Vo,Wo);var Yo=go,as=fe(Vo,Yo),Bo=fe(Yo,Yo),Ks=as*as-Bo*(fe(Vo,Vo)-1);if(!(Ks<0)){var Rs=f(Ks),ps=Ae(Yo,(-as-Rs)/Bo);if(xe(ps,Vo),ps=ee(ps),!fa)return ps;var vi=Gn[0],Xo=oa[0],Ss=Gn[1],Ws=oa[1],Dl;Xo0^ps[1]<(h(ps[0]-vi)r^(vi<=ps[0]&&ps[0]<=Xo)){var Al=Ae(Yo,(-as+Rs)/Bo);return xe(Al,Vo),[ps,ee(Al)]}}}function Pa(Gn,oa){var fa=wr?zt:r-zt,La=0;return Gn<-fa?La|=1:Gn>fa&&(La|=2),oa<-fa?La|=4:oa>fa&&(La|=8),La}return Fr(Vn,Jn,Ln,wr?[0,-zt]:[-r,zt-r])}function Pr(zt,rr,Br,wr,un,Ln){var Vn=zt[0],Jn=zt[1],ca=rr[0],Pa=rr[1],Gn=0,oa=1,fa=ca-Vn,La=Pa-Jn,qa;if(qa=Br-Vn,!(!fa&&qa>0)){if(qa/=fa,fa<0){if(qa0){if(qa>oa)return;qa>Gn&&(Gn=qa)}if(qa=un-Vn,!(!fa&&qa<0)){if(qa/=fa,fa<0){if(qa>oa)return;qa>Gn&&(Gn=qa)}else if(fa>0){if(qa0)){if(qa/=La,La<0){if(qa0){if(qa>oa)return;qa>Gn&&(Gn=qa)}if(qa=Ln-Jn,!(!La&&qa<0)){if(qa/=La,La<0){if(qa>oa)return;qa>Gn&&(Gn=qa)}else if(La>0){if(qa0&&(zt[0]=Vn+Gn*fa,zt[1]=Jn+Gn*La),oa<1&&(rr[0]=Vn+oa*fa,rr[1]=Jn+oa*La),!0}}}}}var hn=1e9,zn=-hn;function Pn(zt,rr,Br,wr){function un(Pa,Gn){return zt<=Pa&&Pa<=Br&&rr<=Gn&&Gn<=wr}function Ln(Pa,Gn,oa,fa){var La=0,qa=0;if(Pa==null||(La=Vn(Pa,oa))!==(qa=Vn(Gn,oa))||ca(Pa,Gn)<0^oa>0)do fa.point(La===0||La===3?zt:Br,La>1?wr:rr);while((La=(La+oa+4)%4)!==qa);else fa.point(Gn[0],Gn[1])}function Vn(Pa,Gn){return h(Pa[0]-zt)0?0:3:h(Pa[0]-Br)0?2:1:h(Pa[1]-rr)0?1:0:Gn>0?3:2}function Jn(Pa,Gn){return ca(Pa.x,Gn.x)}function ca(Pa,Gn){var oa=Vn(Pa,1),fa=Vn(Gn,1);return oa!==fa?oa-fa:oa===0?Gn[1]-Pa[1]:oa===1?Pa[0]-Gn[0]:oa===2?Pa[1]-Gn[1]:Gn[0]-Pa[0]}return function(Pa){var Gn=Pa,oa=da(),fa,La,qa,Bi,Ni,Zi,_i,Va,Ga,oo,go,Vo={point:Wo,lineStart:Ks,lineEnd:Rs,polygonStart:as,polygonEnd:Bo};function Wo(vi,Xo){un(vi,Xo)&&Gn.point(vi,Xo)}function Yo(){for(var vi=0,Xo=0,Ss=La.length;Xowr&&(zu-Fu)*(wr-Al)>(bu-Al)*(zt-Fu)&&++vi:bu<=wr&&(zu-Fu)*(wr-Al)<(bu-Al)*(zt-Fu)&&--vi;return vi}function as(){Gn=oa,fa=[],La=[],go=!0}function Bo(){var vi=Yo(),Xo=go&&vi,Ss=(fa=x.merge(fa)).length;(Xo||Ss)&&(Pa.polygonStart(),Xo&&(Pa.lineStart(),Ln(null,null,1,Pa),Pa.lineEnd()),Ss&&et(fa,Jn,vi,Ln,Pa),Pa.polygonEnd()),Gn=Pa,fa=La=qa=null}function Ks(){Vo.point=ps,La&&La.push(qa=[]),oo=!0,Ga=!1,_i=Va=NaN}function Rs(){fa&&(ps(Bi,Ni),Zi&&Ga&&oa.rejoin(),fa.push(oa.result())),Vo.point=Wo,Ga&&Gn.lineEnd()}function ps(vi,Xo){var Ss=un(vi,Xo);if(La&&qa.push([vi,Xo]),oo)Bi=vi,Ni=Xo,Zi=Ss,oo=!1,Ss&&(Gn.lineStart(),Gn.point(vi,Xo));else if(Ss&&Ga)Gn.point(vi,Xo);else{var Ws=[_i=Math.max(zn,Math.min(hn,_i)),Va=Math.max(zn,Math.min(hn,Va))],Dl=[vi=Math.max(zn,Math.min(hn,vi)),Xo=Math.max(zn,Math.min(hn,Xo))];Pr(Ws,Dl,zt,rr,Br,wr)?(Ga||(Gn.lineStart(),Gn.point(Ws[0],Ws[1])),Gn.point(Dl[0],Dl[1]),Ss||Gn.lineEnd(),go=!1):Ss&&(Gn.lineStart(),Gn.point(vi,Xo),go=!1)}_i=vi,Va=Xo,Ga=Ss}return Vo}}function Ca(){var zt=0,rr=0,Br=960,wr=500,un,Ln,Vn;return Vn={stream:function(Jn){return un&&Ln===Jn?un:un=Pn(zt,rr,Br,wr)(Ln=Jn)},extent:function(Jn){return arguments.length?(zt=+Jn[0][0],rr=+Jn[0][1],Br=+Jn[1][0],wr=+Jn[1][1],un=Ln=null,Vn):[[zt,rr],[Br,wr]]}}}var ma=E(),bi,ga,eo,si={sphere:I,point:I,lineStart:Ao,lineEnd:I,polygonStart:I,polygonEnd:I};function Ao(){si.point=Sa,si.lineEnd=ro}function ro(){si.point=si.lineEnd=I}function Sa(zt,rr){zt*=m,rr*=m,bi=zt,ga=_(rr),eo=i(rr),si.point=Gi}function Gi(zt,rr){zt*=m,rr*=m;var Br=_(rr),wr=i(rr),un=h(zt-bi),Ln=i(un),Vn=_(un),Jn=wr*Vn,ca=eo*Br-ga*wr*Ln,Pa=ga*Br+eo*wr*Ln;ma.add(g(f(Jn*Jn+ca*ca),Pa)),bi=zt,ga=Br,eo=wr}function ti(zt){return ma.reset(),j(zt,si),+ma}var fi=[null,null],xo={type:"LineString",coordinates:fi};function zi(zt,rr){return fi[0]=zt,fi[1]=rr,ti(xo)}var so={Feature:function(zt,rr){return So(zt.geometry,rr)},FeatureCollection:function(zt,rr){for(var Br=zt.features,wr=-1,un=Br.length;++wr0&&(un=zi(zt[Ln],zt[Ln-1]),un>0&&Br<=un&&wr<=un&&(Br+wr-un)*(1-Math.pow((Br-wr)/un,2))t}).map(fa)).concat(x.range(w(Ln/Pa)*Pa,un,Pa).filter(function(Va){return h(Va%oa)>t}).map(La))}return Zi.lines=function(){return _i().map(function(Va){return{type:"LineString",coordinates:Va}})},Zi.outline=function(){return{type:"Polygon",coordinates:[qa(wr).concat(Bi(Vn).slice(1),qa(Br).reverse().slice(1),Bi(Jn).reverse().slice(1))]}},Zi.extent=function(Va){return arguments.length?Zi.extentMajor(Va).extentMinor(Va):Zi.extentMinor()},Zi.extentMajor=function(Va){return arguments.length?(wr=+Va[0][0],Br=+Va[1][0],Jn=+Va[0][1],Vn=+Va[1][1],wr>Br&&(Va=wr,wr=Br,Br=Va),Jn>Vn&&(Va=Jn,Jn=Vn,Vn=Va),Zi.precision(Ni)):[[wr,Jn],[Br,Vn]]},Zi.extentMinor=function(Va){return arguments.length?(rr=+Va[0][0],zt=+Va[1][0],Ln=+Va[0][1],un=+Va[1][1],rr>zt&&(Va=rr,rr=zt,zt=Va),Ln>un&&(Va=Ln,Ln=un,un=Va),Zi.precision(Ni)):[[rr,Ln],[zt,un]]},Zi.step=function(Va){return arguments.length?Zi.stepMajor(Va).stepMinor(Va):Zi.stepMinor()},Zi.stepMajor=function(Va){return arguments.length?(Gn=+Va[0],oa=+Va[1],Zi):[Gn,oa]},Zi.stepMinor=function(Va){return arguments.length?(ca=+Va[0],Pa=+Va[1],Zi):[ca,Pa]},Zi.precision=function(Va){return arguments.length?(Ni=+Va,fa=qo(Ln,un,90),La=Oo(rr,zt,Ni),qa=qo(Jn,Vn,90),Bi=Oo(wr,Br,Ni),Zi):Ni},Zi.extentMajor([[-180,-90+t],[180,90-t]]).extentMinor([[-180,-80-t],[180,80+t]])}function Ko(){return ws()()}function ns(zt,rr){var Br=zt[0]*m,wr=zt[1]*m,un=rr[0]*m,Ln=rr[1]*m,Vn=i(wr),Jn=_(wr),ca=i(Ln),Pa=_(Ln),Gn=Vn*i(Br),oa=Vn*_(Br),fa=ca*i(un),La=ca*_(un),qa=2*b(f(z(Ln-wr)+Vn*ca*z(un-Br))),Bi=_(qa),Ni=qa?function(Zi){var _i=_(Zi*=qa)/Bi,Va=_(qa-Zi)/Bi,Ga=Va*Gn+_i*fa,oo=Va*oa+_i*La,go=Va*Jn+_i*Pa;return[g(oo,Ga)*c,g(go,f(Ga*Ga+oo*oo))*c]}:function(){return[Br*c,wr*c]};return Ni.distance=qa,Ni}function wo(zt){return zt}var No=E(),Di=E(),lo,Go,mo,us,Jo={point:I,lineStart:I,lineEnd:I,polygonStart:function(){Jo.lineStart=zs,Jo.lineEnd=Zs},polygonEnd:function(){Jo.lineStart=Jo.lineEnd=Jo.point=I,No.add(h(Di)),Di.reset()},result:function(){var zt=No/2;return No.reset(),zt}};function zs(){Jo.point=Is}function Is(zt,rr){Jo.point=es,lo=mo=zt,Go=us=rr}function es(zt,rr){Di.add(us*zt-mo*rr),mo=zt,us=rr}function Zs(){es(lo,Go)}var Ps=1/0,$o=Ps,Fo=-Ps,Ji=Fo,Ro={point:Ls,lineStart:I,lineEnd:I,polygonStart:I,polygonEnd:I,result:function(){var zt=[[Ps,$o],[Fo,Ji]];return Fo=Ji=-($o=Ps=1/0),zt}};function Ls(zt,rr){ztFo&&(Fo=zt),rr<$o&&($o=rr),rr>Ji&&(Ji=rr)}var zl=0,ml=0,Ts=0,yl=0,mu=0,su=0,cc=0,Bl=0,_l=0,ju,lu,il,As,ms={point:Ms,lineStart:ol,lineEnd:Uu,polygonStart:function(){ms.lineStart=fc,ms.lineEnd=th},polygonEnd:function(){ms.point=Ms,ms.lineStart=ol,ms.lineEnd=Uu},result:function(){var zt=_l?[cc/_l,Bl/_l]:su?[yl/su,mu/su]:Ts?[zl/Ts,ml/Ts]:[NaN,NaN];return zl=ml=Ts=yl=mu=su=cc=Bl=_l=0,zt}};function Ms(zt,rr){zl+=zt,ml+=rr,++Ts}function ol(){ms.point=Su}function Su(zt,rr){ms.point=Eu,Ms(il=zt,As=rr)}function Eu(zt,rr){var Br=zt-il,wr=rr-As,un=f(Br*Br+wr*wr);yl+=un*(il+zt)/2,mu+=un*(As+rr)/2,su+=un,Ms(il=zt,As=rr)}function Uu(){ms.point=Ms}function fc(){ms.point=Cf}function th(){qu(ju,lu)}function Cf(zt,rr){ms.point=qu,Ms(ju=il=zt,lu=As=rr)}function qu(zt,rr){var Br=zt-il,wr=rr-As,un=f(Br*Br+wr*wr);yl+=un*(il+zt)/2,mu+=un*(As+rr)/2,su+=un,un=As*zt-il*rr,cc+=un*(il+zt),Bl+=un*(As+rr),_l+=un*3,Ms(il=zt,As=rr)}function gs(zt){this._context=zt}gs.prototype={_radius:4.5,pointRadius:function(zt){return this._radius=zt,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(zt,rr){switch(this._point){case 0:{this._context.moveTo(zt,rr),this._point=1;break}case 1:{this._context.lineTo(zt,rr);break}default:{this._context.moveTo(zt+this._radius,rr),this._context.arc(zt,rr,this._radius,0,s);break}}},result:I};var Lf=E(),hc,nc,hf,ku,dc,Cu={point:I,lineStart:function(){Cu.point=Pc},lineEnd:function(){hc&&$c(nc,hf),Cu.point=I},polygonStart:function(){hc=!0},polygonEnd:function(){hc=null},result:function(){var zt=+Lf;return Lf.reset(),zt}};function Pc(zt,rr){Cu.point=$c,nc=ku=zt,hf=dc=rr}function $c(zt,rr){ku-=zt,dc-=rr,Lf.add(f(ku*ku+dc*dc)),ku=zt,dc=rr}function Zl(){this._string=[]}Zl.prototype={_radius:4.5,_circle:df(4.5),pointRadius:function(zt){return(zt=+zt)!==this._radius&&(this._radius=zt,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(zt,rr){switch(this._point){case 0:{this._string.push("M",zt,",",rr),this._point=1;break}case 1:{this._string.push("L",zt,",",rr);break}default:{this._circle==null&&(this._circle=df(this._radius)),this._string.push("M",zt,",",rr,this._circle);break}}},result:function(){if(this._string.length){var zt=this._string.join("");return this._string=[],zt}else return null}};function df(zt){return"m0,"+zt+"a"+zt+","+zt+" 0 1,1 0,"+-2*zt+"a"+zt+","+zt+" 0 1,1 0,"+2*zt+"z"}function Dc(zt,rr){var Br=4.5,wr,un;function Ln(Vn){return Vn&&(typeof Br=="function"&&un.pointRadius(+Br.apply(this,arguments)),j(Vn,wr(un))),un.result()}return Ln.area=function(Vn){return j(Vn,wr(Jo)),Jo.result()},Ln.measure=function(Vn){return j(Vn,wr(Cu)),Cu.result()},Ln.bounds=function(Vn){return j(Vn,wr(Ro)),Ro.result()},Ln.centroid=function(Vn){return j(Vn,wr(ms)),ms.result()},Ln.projection=function(Vn){return arguments.length?(wr=Vn==null?(zt=null,wo):(zt=Vn).stream,Ln):zt},Ln.context=function(Vn){return arguments.length?(un=Vn==null?(rr=null,new Zl):new gs(rr=Vn),typeof Br!="function"&&un.pointRadius(Br),Ln):rr},Ln.pointRadius=function(Vn){return arguments.length?(Br=typeof Vn=="function"?Vn:(un.pointRadius(+Vn),+Vn),Ln):Br},Ln.projection(zt).context(rr)}function Ic(zt){return{stream:Vu(zt)}}function Vu(zt){return function(rr){var Br=new Rc;for(var wr in zt)Br[wr]=zt[wr];return Br.stream=rr,Br}}function Rc(){}Rc.prototype={constructor:Rc,point:function(zt,rr){this.stream.point(zt,rr)},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 Lu(zt,rr,Br){var wr=zt.clipExtent&&zt.clipExtent();return zt.scale(150).translate([0,0]),wr!=null&&zt.clipExtent(null),j(Br,zt.stream(Ro)),rr(Ro.result()),wr!=null&&zt.clipExtent(wr),zt}function vf(zt,rr,Br){return Lu(zt,function(wr){var un=rr[1][0]-rr[0][0],Ln=rr[1][1]-rr[0][1],Vn=Math.min(un/(wr[1][0]-wr[0][0]),Ln/(wr[1][1]-wr[0][1])),Jn=+rr[0][0]+(un-Vn*(wr[1][0]+wr[0][0]))/2,ca=+rr[0][1]+(Ln-Vn*(wr[1][1]+wr[0][1]))/2;zt.scale(150*Vn).translate([Jn,ca])},Br)}function sl(zt,rr,Br){return vf(zt,[[0,0],rr],Br)}function Fc(zt,rr,Br){return Lu(zt,function(wr){var un=+rr,Ln=un/(wr[1][0]-wr[0][0]),Vn=(un-Ln*(wr[1][0]+wr[0][0]))/2,Jn=-Ln*wr[0][1];zt.scale(150*Ln).translate([Vn,Jn])},Br)}function Pu(zt,rr,Br){return Lu(zt,function(wr){var un=+rr,Ln=un/(wr[1][1]-wr[0][1]),Vn=-Ln*wr[0][0],Jn=(un-Ln*(wr[1][1]+wr[0][1]))/2;zt.scale(150*Ln).translate([Vn,Jn])},Br)}var vc=16,zc=i(30*m);function Hu(zt,rr){return+rr?Gu(zt,rr):uu(zt)}function uu(zt){return Vu({point:function(rr,Br){rr=zt(rr,Br),this.stream.point(rr[0],rr[1])}})}function Gu(zt,rr){function Br(wr,un,Ln,Vn,Jn,ca,Pa,Gn,oa,fa,La,qa,Bi,Ni){var Zi=Pa-wr,_i=Gn-un,Va=Zi*Zi+_i*_i;if(Va>4*rr&&Bi--){var Ga=Vn+fa,oo=Jn+La,go=ca+qa,Vo=f(Ga*Ga+oo*oo+go*go),Wo=b(go/=Vo),Yo=h(h(go)-1)rr||h((Zi*Rs+_i*ps)/Va-.5)>.3||Vn*fa+Jn*La+ca*qa2?vi[2]%360*m:0,Rs()):[Jn*c,ca*c,Pa*c]},Bo.angle=function(vi){return arguments.length?(oa=vi%360*m,Rs()):oa*c},Bo.reflectX=function(vi){return arguments.length?(fa=vi?-1:1,Rs()):fa<0},Bo.reflectY=function(vi){return arguments.length?(La=vi?-1:1,Rs()):La<0},Bo.precision=function(vi){return arguments.length?(go=Hu(Vo,oo=vi*vi),ps()):f(oo)},Bo.fitExtent=function(vi,Xo){return vf(Bo,vi,Xo)},Bo.fitSize=function(vi,Xo){return sl(Bo,vi,Xo)},Bo.fitWidth=function(vi,Xo){return Fc(Bo,vi,Xo)},Bo.fitHeight=function(vi,Xo){return Pu(Bo,vi,Xo)};function Rs(){var vi=bl(Br,0,0,fa,La,oa).apply(null,rr(Ln,Vn)),Xo=(oa?bl:Pf)(Br,wr-vi[0],un-vi[1],fa,La,oa);return Gn=Fa(Jn,ca,Pa),Vo=Qn(rr,Xo),Wo=Qn(Gn,Vo),go=Hu(Vo,oo),ps()}function ps(){return Yo=as=null,Bo}return function(){return rr=zt.apply(this,arguments),Bo.invert=rr.invert&&Ks,Rs()}}function wl(zt){var rr=0,Br=r/3,wr=Wu(zt),un=wr(rr,Br);return un.parallels=function(Ln){return arguments.length?wr(rr=Ln[0]*m,Br=Ln[1]*m):[rr*c,Br*c]},un}function pf(zt){var rr=i(zt);function Br(wr,un){return[wr*rr,_(un)/rr]}return Br.invert=function(wr,un){return[wr/rr,b(un*rr)]},Br}function Yu(zt,rr){var Br=_(zt),wr=(Br+_(rr))/2;if(h(wr)=.12&&Ni<.234&&Bi>=-.425&&Bi<-.214?un:Ni>=.166&&Ni<.234&&Bi>=-.214&&Bi<-.115?Vn:Br).invert(fa)},Gn.stream=function(fa){return zt&&rr===fa?zt:zt=cs([Br.stream(rr=fa),un.stream(fa),Vn.stream(fa)])},Gn.precision=function(fa){return arguments.length?(Br.precision(fa),un.precision(fa),Vn.precision(fa),oa()):Br.precision()},Gn.scale=function(fa){return arguments.length?(Br.scale(fa),un.scale(fa*.35),Vn.scale(fa),Gn.translate(Br.translate())):Br.scale()},Gn.translate=function(fa){if(!arguments.length)return Br.translate();var La=Br.scale(),qa=+fa[0],Bi=+fa[1];return wr=Br.translate(fa).clipExtent([[qa-.455*La,Bi-.238*La],[qa+.455*La,Bi+.238*La]]).stream(Pa),Ln=un.translate([qa-.307*La,Bi+.201*La]).clipExtent([[qa-.425*La+t,Bi+.12*La+t],[qa-.214*La-t,Bi+.234*La-t]]).stream(Pa),Jn=Vn.translate([qa-.205*La,Bi+.212*La]).clipExtent([[qa-.214*La+t,Bi+.166*La+t],[qa-.115*La-t,Bi+.234*La-t]]).stream(Pa),oa()},Gn.fitExtent=function(fa,La){return vf(Gn,fa,La)},Gn.fitSize=function(fa,La){return sl(Gn,fa,La)},Gn.fitWidth=function(fa,La){return Fc(Gn,fa,La)},Gn.fitHeight=function(fa,La){return Pu(Gn,fa,La)};function oa(){return zt=rr=null,Gn}return Gn.scale(1070)}function cu(zt){return function(rr,Br){var wr=i(rr),un=i(Br),Ln=zt(wr*un);return[Ln*un*_(rr),Ln*_(Br)]}}function Cl(zt){return function(rr,Br){var wr=f(rr*rr+Br*Br),un=zt(wr),Ln=_(un),Vn=i(un);return[g(rr*Ln,wr*Vn),b(wr&&Br*Ln/wr)]}}var Ll=cu(function(zt){return f(2/(1+zt))});Ll.invert=Cl(function(zt){return 2*b(zt/2)});function If(){return xl(Ll).scale(124.75).clipAngle(180-.001)}var yu=cu(function(zt){return(zt=A(zt))&&zt/_(zt)});yu.invert=Cl(function(zt){return zt});function Bc(){return xl(yu).scale(79.4188).clipAngle(180-.001)}function Tl(zt,rr){return[zt,M(u((n+rr)/2))]}Tl.invert=function(zt,rr){return[zt,2*p(S(rr))-n]};function ll(){return Jc(Tl).scale(961/s)}function Jc(zt){var rr=xl(zt),Br=rr.center,wr=rr.scale,un=rr.translate,Ln=rr.clipExtent,Vn=null,Jn,ca,Pa;rr.scale=function(oa){return arguments.length?(wr(oa),Gn()):wr()},rr.translate=function(oa){return arguments.length?(un(oa),Gn()):un()},rr.center=function(oa){return arguments.length?(Br(oa),Gn()):Br()},rr.clipExtent=function(oa){return arguments.length?(oa==null?Vn=Jn=ca=Pa=null:(Vn=+oa[0][0],Jn=+oa[0][1],ca=+oa[1][0],Pa=+oa[1][1]),Gn()):Vn==null?null:[[Vn,Jn],[ca,Pa]]};function Gn(){var oa=r*wr(),fa=rr(ba(rr.rotate()).invert([0,0]));return Ln(Vn==null?[[fa[0]-oa,fa[1]-oa],[fa[0]+oa,fa[1]+oa]]:zt===Tl?[[Math.max(fa[0]-oa,Vn),Jn],[Math.min(fa[0]+oa,ca),Pa]]:[[Vn,Math.max(fa[1]-oa,Jn)],[ca,Math.min(fa[1]+oa,Pa)]])}return Gn()}function Nc(zt){return u((n+zt)/2)}function Rf(zt,rr){var Br=i(zt),wr=zt===rr?_(zt):M(Br/i(rr))/M(Nc(rr)/Nc(zt)),un=Br*C(Nc(zt),wr)/wr;if(!wr)return Tl;function Ln(Vn,Jn){un>0?Jn<-n+t&&(Jn=-n+t):Jn>n-t&&(Jn=n-t);var ca=un/C(Nc(Jn),wr);return[ca*_(wr*Vn),un-ca*i(wr*Vn)]}return Ln.invert=function(Vn,Jn){var ca=un-Jn,Pa=T(wr)*f(Vn*Vn+ca*ca),Gn=g(Vn,h(ca))*T(ca);return ca*wr<0&&(Gn-=r*T(Vn)*T(ca)),[Gn/wr,2*p(C(un/Pa,1/wr))-n]},Ln}function fu(){return wl(Rf).scale(109.5).parallels([30,30])}function Du(zt,rr){return[zt,rr]}Du.invert=Du;function Iu(){return xl(Du).scale(152.63)}function Xu(zt,rr){var Br=i(zt),wr=zt===rr?_(zt):(Br-i(rr))/(rr-zt),un=Br/wr+zt;if(h(wr)t&&--wr>0);return[zt/(.8707+(Ln=Br*Br)*(-.131979+Ln*(-.013791+Ln*Ln*Ln*(.003971-.001529*Ln)))),Br]};function yf(){return xl(Hf).scale(175.295)}function ul(zt,rr){return[i(rr)*_(zt),_(rr)]}ul.invert=Cl(b);function Pl(){return xl(ul).scale(249.5).clipAngle(90+t)}function yc(zt,rr){var Br=i(rr),wr=1+i(zt)*Br;return[Br*_(zt)/wr,_(rr)/wr]}yc.invert=Cl(function(zt){return 2*p(zt)});function _c(){return xl(yc).scale(250).clipAngle(142)}function bc(zt,rr){return[M(u((n+rr)/2)),-zt]}bc.invert=function(zt,rr){return[-rr,2*p(S(zt))-n]};function ac(){var zt=Jc(bc),rr=zt.center,Br=zt.rotate;return zt.center=function(wr){return arguments.length?rr([-wr[1],wr[0]]):(wr=rr(),[wr[1],-wr[0]])},zt.rotate=function(wr){return arguments.length?Br([wr[0],wr[1],wr.length>2?wr[2]+90:90]):(wr=Br(),[wr[0],wr[1],wr[2]-90])},Br([0,0,90]).scale(159.155)}v.geoAlbers=Kc,v.geoAlbersUsa=Df,v.geoArea=$,v.geoAzimuthalEqualArea=If,v.geoAzimuthalEqualAreaRaw=Ll,v.geoAzimuthalEquidistant=Bc,v.geoAzimuthalEquidistantRaw=yu,v.geoBounds=vt,v.geoCentroid=Aa,v.geoCircle=ho,v.geoClipAntimeridian=Ut,v.geoClipCircle=Or,v.geoClipExtent=Ca,v.geoClipRectangle=Pn,v.geoConicConformal=fu,v.geoConicConformalRaw=Rf,v.geoConicEqualArea=pc,v.geoConicEqualAreaRaw=Yu,v.geoConicEquidistant=Qc,v.geoConicEquidistantRaw=Xu,v.geoContains=Io,v.geoDistance=zi,v.geoEqualEarth=Vf,v.geoEqualEarthRaw=gc,v.geoEquirectangular=Iu,v.geoEquirectangularRaw=Du,v.geoGnomonic=tf,v.geoGnomonicRaw=mf,v.geoGraticule=ws,v.geoGraticule10=Ko,v.geoIdentity=gf,v.geoInterpolate=ns,v.geoLength=ti,v.geoMercator=ll,v.geoMercatorRaw=Tl,v.geoNaturalEarth1=yf,v.geoNaturalEarth1Raw=Hf,v.geoOrthographic=Pl,v.geoOrthographicRaw=ul,v.geoPath=Dc,v.geoProjection=xl,v.geoProjectionMutator=Wu,v.geoRotation=ba,v.geoStereographic=_c,v.geoStereographicRaw=yc,v.geoStream=j,v.geoTransform=Ic,v.geoTransverseMercator=ac,v.geoTransverseMercatorRaw=bc,Object.defineProperty(v,"__esModule",{value:!0})})}}),H8=Ee({"src/lib/usa_location_names.js"(J,V){"use strict";var v={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"},x=new Set(Object.values(v));V.exports={usaLocationAbbreviations:x,usaLocationList:v}}}),cw={};yn(cw,{COUNTRIES_X:()=>fw});var fw,G8=In({"src/lib/custom_country_codes.ts"(){"use strict";fw=[{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:[]}]}}),Md=Ee({"src/lib/geo_location_utils.js"(J,V){"use strict";var v=Hn(),{COUNTRIES:x,createLookup:E}=j8(),{area:k}=U8(),{centroid:l}=q8(),{coordAll:e}=Py(),{geoBounds:t}=Dy(),a=j0(),r=po(),n=Us(),o=dl(),s=Y0(),{usaLocationAbbreviations:c,usaLocationList:m}=H8(),{COUNTRIES_X:h}=(G8(),ra(cw)),{lookupAlpha3:p}=E([...x,...h]),g={"ISO-3":a,"USA-states":w,"country names":i};function i(P){let j=p(P);return j||(r.log("Unrecognized country name: "+P+"."),!1)}function w(P){P=P.trim();let j=c.has(P.toUpperCase())?P.toUpperCase():m[P.toLowerCase()];return j||(r.log("Unrecognized US location: "+P+"."),!1)}function S(P,j,U){var Z;if(!j||typeof j!="string")return!1;let Q=g[P](j);if(Q){let re;if(P==="USA-states"){re=[];for(let ae of U)((Z=ae?.properties)==null?void 0:Z.gu)==="USA"&&re.push(ae)}else re=U;for(let ae of re)if(ae.id===Q)return ae;r.log(`Location with id ${Q} does not have a matching topojson feature at this resolution.`)}return!1}var M=360;function C(P){for(let j=0;j0&&P[j+1][0]<0)return j;return null}function _(P){var j=P.geometry,U=j.coordinates,Z=P.id,Q=[],re,ae,oe,H;switch(Z==="RUS"||Z==="FJI"?re=function(X){var K;if(C(X)===null)K=X;else for(K=new Array(X.length),H=0;HK?G[Y++]=[X[H][0]+M,X[H][1]]:H===K?(G[Y++]=X[H],G[Y++]=[X[H][0],-90]):G[Y++]=X[H];var q=s.tester(G);q.pts.pop(),Q.push(q)}:re=function(X){Q.push(s.tester(X))},j.type){case"MultiPolygon":for(ae=0;aeQ&&(Q=oe,U=ae)}else U=j;return!U||!U.coordinates.some(H=>H.length>0)?[NaN,NaN]:l(U).geometry.coordinates}function A(P){var j=window.PlotlyGeoAssets||{},U=[];function Z(H){return new Promise(function(X,K){v.json(H,function(G,Y){if(G){delete j[H];var q=G.status===404?'GeoJSON at URL "'+H+'" does not exist.':"Unexpected error while fetching from "+H;return K(new Error(q))}return j[H]=Y,X(Y)})})}function Q(H){return new Promise(function(X,K){var G=0,Y=setInterval(function(){if(j[H]&&j[H]!=="pending")return clearInterval(Y),X(j[H]);if(G>100)return clearInterval(Y),K("Unexpected error while fetching from "+H);G++},50)})}for(var re=0;reI(z(P));function z(P){try{return e(P)}catch{return[]}}function I(P){if(P.length===0)return null;if(P.length===1){let[re,ae]=P[0];return[re,ae,re,ae]}let[[j,U],[Z,Q]]=t({type:"MultiPoint",coordinates:P});return[j,U,F([j,Z])[1],Q]}var N=(P,j)=>j.fitbounds==="geojson"&&P.locationmode==="geojson-id",R=(P,j)=>N(P,j)?z(T(P)):[],B=(P,j)=>I(R(P,j));function F([P,j]){return[P,P>j?j+M:j]}V.exports={locationToFeature:S,feature2polygons:_,getTraceGeojson:T,extractTraceFeature:f,fetchTraceGeoData:A,boundsOfCoords:I,computeBbox:b,coordsOf:z,doesCrossAntiMeridian:C,fitGeojsonBbox:B,fitGeojsonCoords:R,unwrapLonRange:F,ANTIMERIDIAN_LON_SHIFT:M}}}),hw=Ee({"src/traces/scattergeo/style.js"(J,V){"use strict";var v=Hn(),x=yo(),E=Qa(),k=eh(),l=k.stylePoints,e=k.styleText;V.exports=function(r,n){n&&t(r,n)};function t(a,r){var n=r[0].trace,o=r[0].node3;o.style("opacity",r[0].trace.opacity),l(o,n,a),e(o,n,a),o.selectAll("path.js-line").style("fill","none").each(function(s){var c=v.select(this),m=s.trace,h=m.line||{};c.call(E.stroke,h.color).call(x.dashLine,h.dash||"",h.width||0),m.fill!=="none"&&c.call(E.fill,m.fillcolor)})}}}),Iy=Ee({"src/traces/scattergeo/plot.js"(J,V){"use strict";var v=Hn(),x=Vr(),E=Cy().getTopojsonFeatures,k=Dm(),l=Md(),e=Ph().findExtremes,t=Qi().BADNUM,a=_h().calcMarkerSize,r=al(),n=hw();function o(m,h,p){var g=h.layers.frontplot.select(".scatterlayer"),i=x.makeTraceGroups(g,p,"trace scattergeo");function w(S,M){S.lonlat[0]===t&&v.select(M).remove()}i.selectAll("*").remove(),i.each(function(S){var M=v.select(this),C=S[0].trace;if(r.hasLines(C)||C.fill!=="none"){var _=k.calcTraceToLineCoords(S),T=C.fill!=="none"?k.makePolygon(_):k.makeLine(_);M.selectAll("path.js-line").data([{geojson:T,trace:C}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}r.hasMarkers(C)&&M.selectAll("path.point").data(x.identity).enter().append("path").classed("point",!0).each(function(f){w(f,this)}),r.hasText(C)&&M.selectAll("g").data(x.identity).enter().append("g").append("text").each(function(f){w(f,this)}),n(m,S)})}function s(m,h){var p=m[0].trace,g=h[p.geo],i=g._subplot,w=p._length,S,M;if(x.isArrayOrTypedArray(p.locations)){var C=p.locationmode,_=C==="geojson-id"?l.extractTraceFeature(m):E(p,i.topojson);for(S=0;S")}}}),Y8=Ee({"src/traces/scattergeo/event_data.js"(J,V){"use strict";V.exports=function(x,E,k,l,e){x.lon=E.lon,x.lat=E.lat,x.location=E.loc?E.loc:null;var t=l[e];return t.fIn&&t.fIn.properties&&(x.properties=t.fIn.properties),x}}}),X8=Ee({"src/traces/scattergeo/select.js"(J,V){"use strict";var v=al(),x=Qi().BADNUM;V.exports=function(k,l){var e=k.cd,t=k.xaxis,a=k.yaxis,r=[],n=e[0].trace,o,s,c,m,h,p=!v.hasMarkers(n)&&!v.hasText(n);if(p)return[];if(l===!1)for(h=0;hG?1:K>=G?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(G,Y,q,$){for(q==null&&(q=0),$==null&&($=G.length);q<$;){var ee=q+$>>>1;K(G[ee],Y)<0?q=ee+1:$=ee}return q},right:function(G,Y,q,$){for(q==null&&(q=0),$==null&&($=G.length);q<$;){var ee=q+$>>>1;K(G[ee],Y)>0?$=ee:q=ee+1}return q}}}function k(K){return function(G,Y){return x(K(G),Y)}}var l=E(x),e=l.right,t=l.left;function a(K,G){G==null&&(G=r);for(var Y=0,q=K.length-1,$=K[0],ee=new Array(q<0?0:q);YK?1:G>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,G){var Y=K.length,q=0,$=-1,ee=0,ne,fe,ye=0;if(G==null)for(;++$1)return ye/(q-1)}function m(K,G){var Y=c(K,G);return Y&&Math.sqrt(Y)}function h(K,G){var Y=K.length,q=-1,$,ee,ne;if(G==null){for(;++q=$)for(ee=ne=$;++q$&&(ee=$),ne<$&&(ne=$))}else for(;++q=$)for(ee=ne=$;++q$&&(ee=$),ne<$&&(ne=$));return[ee,ne]}var p=Array.prototype,g=p.slice,i=p.map;function w(K){return function(){return K}}function S(K){return K}function M(K,G,Y){K=+K,G=+G,Y=($=arguments.length)<2?(G=K,K=0,1):$<3?1:+Y;for(var q=-1,$=Math.max(0,Math.ceil((G-K)/Y))|0,ee=new Array($);++q<$;)ee[q]=K+q*Y;return ee}var C=Math.sqrt(50),_=Math.sqrt(10),T=Math.sqrt(2);function f(K,G,Y){var q,$=-1,ee,ne,fe;if(G=+G,K=+K,Y=+Y,K===G&&Y>0)return[K];if((q=G0)for(K=Math.ceil(K/fe),G=Math.floor(G/fe),ne=new Array(ee=Math.ceil(G-K+1));++$=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,$):-Math.pow(10,-$)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,G,Y){var q=Math.abs(G-K)/Math.max(0,Y),$=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/$;return ee>=C?$*=10:ee>=_?$*=5:ee>=T&&($*=2),GMe;)Ie.pop(),--Ue;var qe=new Array(Ue+1),ke;for(ee=0;ee<=Ue;++ee)ke=qe[ee]=[],ke.x0=ee>0?Ie[ee-1]:Ae,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,$=(q-1)*G,ee=Math.floor($),ne=+Y(K[ee],ee,K),fe=+Y(K[ee+1],ee+1,K);return ne+(fe-ne)*($-ee)}}function N(K,G,Y){return K=i.call(K,s).sort(x),Math.ceil((Y-G)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function R(K,G,Y){return Math.ceil((Y-G)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,G){var Y=K.length,q=-1,$,ee;if(G==null){for(;++q=$)for(ee=$;++qee&&(ee=$)}else for(;++q=$)for(ee=$;++qee&&(ee=$);return ee}function F(K,G){var Y=K.length,q=Y,$=-1,ee,ne=0;if(G==null)for(;++$=0;)for(ne=K[G],Y=ne.length;--Y>=0;)ee[--$]=ne[Y];return ee}function U(K,G){var Y=K.length,q=-1,$,ee;if(G==null){for(;++q=$)for(ee=$;++q$&&(ee=$)}else for(;++q=$)for(ee=$;++q$&&(ee=$);return ee}function Z(K,G){for(var Y=G.length,q=new Array(Y);Y--;)q[Y]=K[G[Y]];return q}function Q(K,G){if(Y=K.length){var Y,q=0,$=0,ee,ne=K[$];for(G==null&&(G=x);++q0?1:Xe<0?-1:0},p=Math.sin,g=Math.tan,i=1e-6,w=1e-12,S=Math.PI,M=S/2,C=S/4,_=Math.SQRT1_2,T=R(2),f=R(S),u=S*2,A=180/S,b=S/180;function z(Xe){return Xe?Xe/Math.sin(Xe):1}function I(Xe){return Xe>1?M:Xe<-1?-M:Math.asin(Xe)}function N(Xe){return Xe>1?0:Xe<-1?S:Math.acos(Xe)}function R(Xe){return Xe>0?Math.sqrt(Xe):0}function B(Xe){return Xe=a(2*Xe),(Xe-1)/(Xe+1)}function F(Xe){return(a(Xe)-a(-Xe))/2}function P(Xe){return(a(Xe)+a(-Xe))/2}function j(Xe){return n(Xe+R(Xe*Xe+1))}function U(Xe){return n(Xe+R(Xe*Xe-1))}function Z(Xe){var rt=g(Xe/2),pt=2*n(t(Xe/2))/(rt*rt);function _t(Nt,Bt){var Yt=t(Nt),Dr=t(Bt),Ur=p(Bt),kr=Dr*Yt,Wr=-((1-kr?n((1+kr)/2)/(1-kr):-.5)+pt/(1+kr));return[Wr*Dr*p(Nt),Wr*Ur]}return _t.invert=function(Nt,Bt){var Yt=R(Nt*Nt+Bt*Bt),Dr=-Xe/2,Ur=50,kr;if(!Yt)return[0,0];do{var Wr=Dr/2,sn=t(Wr),gn=p(Wr),Cn=gn/sn,Zn=-n(k(sn));Dr-=kr=(2/Cn*Zn-pt*Cn-Yt)/(-Zn/(gn*gn)+1-pt/(2*sn*sn))*(sn<0?.7:1)}while(k(kr)>i&&--Ur>0);var ya=p(Dr);return[e(Nt*ya,Yt*t(Dr)),I(Bt*ya/Yt)]},_t}function Q(){var Xe=M,rt=x.geoProjectionMutator(Z),pt=rt(Xe);return pt.radius=function(_t){return arguments.length?rt(Xe=_t*b):Xe*A},pt.scale(179.976).clipAngle(147)}function re(Xe,rt){var pt=t(rt),_t=z(N(pt*t(Xe/=2)));return[2*pt*p(Xe)*_t,p(rt)*_t]}re.invert=function(Xe,rt){if(!(Xe*Xe+4*rt*rt>S*S+i)){var pt=Xe,_t=rt,Nt=25;do{var Bt=p(pt),Yt=p(pt/2),Dr=t(pt/2),Ur=p(_t),kr=t(_t),Wr=p(2*_t),sn=Ur*Ur,gn=kr*kr,Cn=Yt*Yt,Zn=1-gn*Dr*Dr,ya=Zn?N(kr*Dr)*R(Na=1/Zn):Na=0,Na,wi=2*ya*kr*Yt-Xe,Yi=ya*Ur-rt,Ti=Na*(gn*Cn+ya*kr*Dr*sn),_o=Na*(.5*Bt*Wr-ya*2*Ur*Yt),bo=Na*.25*(Wr*Yt-ya*Ur*gn*Bt),Zo=Na*(sn*Dr+ya*Cn*kr),fs=_o*bo-Zo*Ti;if(!fs)break;var Po=(Yi*_o-wi*Zo)/fs,Es=(wi*bo-Yi*Ti)/fs;pt-=Po,_t-=Es}while((k(Po)>i||k(Es)>i)&&--Nt>0);return[pt,_t]}};function ae(){return x.geoProjection(re).scale(152.63)}function oe(Xe){var rt=p(Xe),pt=t(Xe),_t=Xe>=0?1:-1,Nt=g(_t*Xe),Bt=(1+rt-pt)/2;function Yt(Dr,Ur){var kr=t(Ur),Wr=t(Dr/=2);return[(1+kr)*p(Dr),(_t*Ur>-e(Wr,Nt)-.001?0:-_t*10)+Bt+p(Ur)*pt-(1+kr)*rt*Wr]}return Yt.invert=function(Dr,Ur){var kr=0,Wr=0,sn=50;do{var gn=t(kr),Cn=p(kr),Zn=t(Wr),ya=p(Wr),Na=1+Zn,wi=Na*Cn-Dr,Yi=Bt+ya*pt-Na*rt*gn-Ur,Ti=Na*gn/2,_o=-Cn*ya,bo=rt*Na*Cn/2,Zo=pt*Zn+rt*gn*ya,fs=_o*bo-Zo*Ti,Po=(Yi*_o-wi*Zo)/fs/2,Es=(wi*bo-Yi*Ti)/fs;k(Es)>2&&(Es/=2),kr-=Po,Wr-=Es}while((k(Po)>i||k(Es)>i)&&--sn>0);return _t*Wr>-e(t(kr),Nt)-.001?[kr*2,Wr]:null},Yt}function H(){var Xe=20*b,rt=Xe>=0?1:-1,pt=g(rt*Xe),_t=x.geoProjectionMutator(oe),Nt=_t(Xe),Bt=Nt.stream;return Nt.parallel=function(Yt){return arguments.length?(pt=g((rt=(Xe=Yt*b)>=0?1:-1)*Xe),_t(Xe)):Xe*A},Nt.stream=function(Yt){var Dr=Nt.rotate(),Ur=Bt(Yt),kr=(Nt.rotate([0,0]),Bt(Yt)),Wr=Nt.precision();return Nt.rotate(Dr),Ur.sphere=function(){kr.polygonStart(),kr.lineStart();for(var sn=rt*-180;rt*sn<180;sn+=rt*90)kr.point(sn,rt*90);if(Xe)for(;rt*(sn-=3*rt*Wr)>=-180;)kr.point(sn,rt*-e(t(sn*b/2),pt)*A);kr.lineEnd(),kr.polygonEnd()},Ur},Nt.scale(218.695).center([0,28.0974])}function X(Xe,rt){var pt=g(rt/2),_t=R(1-pt*pt),Nt=1+_t*t(Xe/=2),Bt=p(Xe)*_t/Nt,Yt=pt/Nt,Dr=Bt*Bt,Ur=Yt*Yt;return[4/3*Bt*(3+Dr-3*Ur),4/3*Yt*(3+3*Dr-Ur)]}X.invert=function(Xe,rt){if(Xe*=3/8,rt*=3/8,!Xe&&k(rt)>1)return null;var pt=Xe*Xe,_t=rt*rt,Nt=1+pt+_t,Bt=R((Nt-R(Nt*Nt-4*rt*rt))/2),Yt=I(Bt)/3,Dr=Bt?U(k(rt/Bt))/3:j(k(Xe))/3,Ur=t(Yt),kr=P(Dr),Wr=kr*kr-Ur*Ur;return[h(Xe)*2*e(F(Dr)*Ur,.25-Wr),h(rt)*2*e(kr*p(Yt),.25+Wr)]};function K(){return x.geoProjection(X).scale(66.1603)}var G=R(8),Y=n(1+T);function q(Xe,rt){var pt=k(rt);return ptw&&--_t>0);return[Xe/(t(pt)*(G-1/p(pt))),h(rt)*pt]};function $(){return x.geoProjection(q).scale(112.314)}function ee(Xe){var rt=2*S/Xe;function pt(_t,Nt){var Bt=x.geoAzimuthalEquidistantRaw(_t,Nt);if(k(_t)>M){var Yt=e(Bt[1],Bt[0]),Dr=R(Bt[0]*Bt[0]+Bt[1]*Bt[1]),Ur=rt*m((Yt-M)/rt)+M,kr=e(p(Yt-=Ur),2-t(Yt));Yt=Ur+I(S/Dr*p(kr))-kr,Bt[0]=Dr*t(Yt),Bt[1]=Dr*p(Yt)}return Bt}return pt.invert=function(_t,Nt){var Bt=R(_t*_t+Nt*Nt);if(Bt>M){var Yt=e(Nt,_t),Dr=rt*m((Yt-M)/rt)+M,Ur=Yt>Dr?-1:1,kr=Bt*t(Dr-Yt),Wr=1/g(Ur*N((kr-S)/R(S*(S-2*kr)+Bt*Bt)));Yt=Dr+2*l((Wr+Ur*R(Wr*Wr-3))/3),_t=Bt*t(Yt),Nt=Bt*p(Yt)}return x.geoAzimuthalEquidistantRaw.invert(_t,Nt)},pt}function ne(){var Xe=5,rt=x.geoProjectionMutator(ee),pt=rt(Xe),_t=pt.stream,Nt=.01,Bt=-t(Nt*b),Yt=p(Nt*b);return pt.lobes=function(Dr){return arguments.length?rt(Xe=+Dr):Xe},pt.stream=function(Dr){var Ur=pt.rotate(),kr=_t(Dr),Wr=(pt.rotate([0,0]),_t(Dr));return pt.rotate(Ur),kr.sphere=function(){Wr.polygonStart(),Wr.lineStart();for(var sn=0,gn=360/Xe,Cn=2*S/Xe,Zn=90-180/Xe,ya=M;sn0&&k(Nt)>i);return _t<0?NaN:pt}function Me(Xe,rt,pt){return rt===void 0&&(rt=40),pt===void 0&&(pt=w),function(_t,Nt,Bt,Yt){var Dr,Ur,kr;Bt=Bt===void 0?0:+Bt,Yt=Yt===void 0?0:+Yt;for(var Wr=0;WrDr){Bt-=Ur/=2,Yt-=kr/=2;continue}Dr=Zn;var ya=(Bt>0?-1:1)*pt,Na=(Yt>0?-1:1)*pt,wi=Xe(Bt+ya,Yt),Yi=Xe(Bt,Yt+Na),Ti=(wi[0]-sn[0])/ya,_o=(wi[1]-sn[1])/ya,bo=(Yi[0]-sn[0])/Na,Zo=(Yi[1]-sn[1])/Na,fs=Zo*Ti-_o*bo,Po=(k(fs)<.5?.5:1)/fs;if(Ur=(Cn*bo-gn*Zo)*Po,kr=(gn*_o-Cn*Ti)*Po,Bt+=Ur,Yt+=kr,k(Ur)0&&(Dr[1]*=1+Ur/1.5*Dr[0]*Dr[0]),Dr}return _t.invert=Me(_t),_t}function Ue(){return x.geoProjection(Ie()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function qe(Xe,rt){var pt=Xe*p(rt),_t=30,Nt;do rt-=Nt=(rt+p(rt)-pt)/(1+t(rt));while(k(Nt)>i&&--_t>0);return rt/2}function ke(Xe,rt,pt){function _t(Nt,Bt){return[Xe*Nt*t(Bt=qe(pt,Bt)),rt*p(Bt)]}return _t.invert=function(Nt,Bt){return Bt=I(Bt/rt),[Nt/(Xe*t(Bt)),I((2*Bt+p(2*Bt))/pt)]},_t}var ge=ke(T/M,T,S);function ue(){return x.geoProjection(ge).scale(169.529)}var ve=2.00276,se=1.11072;function Te(Xe,rt){var pt=qe(S,rt);return[ve*Xe/(1/t(rt)+se/t(pt)),(rt+T*p(pt))/ve]}Te.invert=function(Xe,rt){var pt=ve*rt,_t=rt<0?-C:C,Nt=25,Bt,Yt;do Yt=pt-T*p(_t),_t-=Bt=(p(2*_t)+2*_t-S*p(Yt))/(2*t(2*_t)+2+S*t(Yt)*T*t(_t));while(k(Bt)>i&&--Nt>0);return Yt=pt-T*p(_t),[Xe*(1/t(Yt)+se/t(_t))/ve,Yt]};function Fe(){return x.geoProjection(Te).scale(160.857)}function We(Xe){var rt=0,pt=x.geoProjectionMutator(Xe),_t=pt(rt);return _t.parallel=function(Nt){return arguments.length?pt(rt=Nt*b):rt*A},_t}function Ge(Xe,rt){return[Xe*t(rt),rt]}Ge.invert=function(Xe,rt){return[Xe/t(rt),rt]};function gt(){return x.geoProjection(Ge).scale(152.63)}function mt(Xe){if(!Xe)return Ge;var rt=1/g(Xe);function pt(_t,Nt){var Bt=rt+Xe-Nt,Yt=Bt&&_t*t(Nt)/Bt;return[Bt*p(Yt),rt-Bt*t(Yt)]}return pt.invert=function(_t,Nt){var Bt=R(_t*_t+(Nt=rt-Nt)*Nt),Yt=rt+Xe-Bt;return[Bt/t(Yt)*e(_t,Nt),Yt]},pt}function Tt(){return We(mt).scale(123.082).center([0,26.1441]).parallel(45)}function At(Xe){function rt(pt,_t){var Nt=M-_t,Bt=Nt&&pt*Xe*p(Nt)/Nt;return[Nt*p(Bt)/Xe,M-Nt*t(Bt)]}return rt.invert=function(pt,_t){var Nt=pt*Xe,Bt=M-_t,Yt=R(Nt*Nt+Bt*Bt),Dr=e(Nt,Bt);return[(Yt?Yt/p(Yt):1)*Dr/Xe,M-Yt]},rt}function Kt(){var Xe=.5,rt=x.geoProjectionMutator(At),pt=rt(Xe);return pt.fraction=function(_t){return arguments.length?rt(Xe=+_t):Xe},pt.scale(158.837)}var nr=ke(1,4/S,S);function _r(){return x.geoProjection(nr).scale(152.63)}function Zt(Xe,rt,pt,_t,Nt,Bt){var Yt=t(Bt),Dr;if(k(Xe)>1||k(Bt)>1)Dr=N(pt*Nt+rt*_t*Yt);else{var Ur=p(Xe/2),kr=p(Bt/2);Dr=2*I(R(Ur*Ur+rt*_t*kr*kr))}return k(Dr)>i?[Dr,e(_t*p(Bt),rt*Nt-pt*_t*Yt)]:[0,0]}function sr(Xe,rt,pt){return N((Xe*Xe+rt*rt-pt*pt)/(2*Xe*rt))}function Ot(Xe){return Xe-2*S*r((Xe+S)/(2*S))}function vt(Xe,rt,pt){for(var _t=[[Xe[0],Xe[1],p(Xe[1]),t(Xe[1])],[rt[0],rt[1],p(rt[1]),t(rt[1])],[pt[0],pt[1],p(pt[1]),t(pt[1])]],Nt=_t[2],Bt,Yt=0;Yt<3;++Yt,Nt=Bt)Bt=_t[Yt],Nt.v=Zt(Bt[1]-Nt[1],Nt[3],Nt[2],Bt[3],Bt[2],Bt[0]-Nt[0]),Nt.point=[0,0];var Dr=sr(_t[0].v[0],_t[2].v[0],_t[1].v[0]),Ur=sr(_t[0].v[0],_t[1].v[0],_t[2].v[0]),kr=S-Dr;_t[2].point[1]=0,_t[0].point[0]=-(_t[1].point[0]=_t[0].v[0]/2);var Wr=[_t[2].point[0]=_t[0].point[0]+_t[2].v[0]*t(Dr),2*(_t[0].point[1]=_t[1].point[1]=_t[2].v[0]*p(Dr))];function sn(gn,Cn){var Zn=p(Cn),ya=t(Cn),Na=new Array(3),wi;for(wi=0;wi<3;++wi){var Yi=_t[wi];if(Na[wi]=Zt(Cn-Yi[1],Yi[3],Yi[2],ya,Zn,gn-Yi[0]),!Na[wi][0])return Yi.point;Na[wi][1]=Ot(Na[wi][1]-Yi.v[1])}var Ti=Wr.slice();for(wi=0;wi<3;++wi){var _o=wi==2?0:wi+1,bo=sr(_t[wi].v[0],Na[wi][0],Na[_o][0]);Na[wi][1]<0&&(bo=-bo),wi?wi==1?(bo=Ur-bo,Ti[0]-=Na[wi][0]*t(bo),Ti[1]-=Na[wi][0]*p(bo)):(bo=kr-bo,Ti[0]+=Na[wi][0]*t(bo),Ti[1]+=Na[wi][0]*p(bo)):(Ti[0]+=Na[wi][0]*t(bo),Ti[1]-=Na[wi][0]*p(bo))}return Ti[0]/=3,Ti[1]/=3,Ti}return sn}function ht(Xe){return Xe[0]*=b,Xe[1]*=b,Xe}function Re(){return Be([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Be(Xe,rt,pt){var _t=x.geoCentroid({type:"MultiPoint",coordinates:[Xe,rt,pt]}),Nt=[-_t[0],-_t[1]],Bt=x.geoRotation(Nt),Yt=vt(ht(Bt(Xe)),ht(Bt(rt)),ht(Bt(pt)));Yt.invert=Me(Yt);var Dr=x.geoProjection(Yt).rotate(Nt),Ur=Dr.center;return delete Dr.rotate,Dr.center=function(kr){return arguments.length?Ur(Bt(kr)):Bt.invert(Ur())},Dr.clipAngle(90)}function He(Xe,rt){var pt=R(1-p(rt));return[2/f*Xe*pt,f*(1-pt)]}He.invert=function(Xe,rt){var pt=(pt=rt/f-1)*pt;return[pt>0?Xe*R(S/pt)/2:0,I(1-pt)]};function $e(){return x.geoProjection(He).scale(95.6464).center([0,30])}function Ze(Xe){var rt=g(Xe);function pt(_t,Nt){return[_t,(_t?_t/p(_t):1)*(p(Nt)*t(_t)-rt*t(Nt))]}return pt.invert=rt?function(_t,Nt){_t&&(Nt*=p(_t)/_t);var Bt=t(_t);return[_t,2*e(R(Bt*Bt+rt*rt-Nt*Nt)-Bt,rt-Nt)]}:function(_t,Nt){return[_t,I(_t?Nt*g(_t)/_t:Nt)]},pt}function Je(){return We(Ze).scale(249.828).clipAngle(90)}var Mt=R(3);function dt(Xe,rt){return[Mt*Xe*(2*t(2*rt/3)-1)/f,Mt*f*p(rt/3)]}dt.invert=function(Xe,rt){var pt=3*I(rt/(Mt*f));return[f*Xe/(Mt*(2*t(2*pt/3)-1)),pt]};function Dt(){return x.geoProjection(dt).scale(156.19)}function Ct(Xe){var rt=t(Xe);function pt(_t,Nt){return[_t*rt,p(Nt)/rt]}return pt.invert=function(_t,Nt){return[_t/rt,I(Nt*rt)]},pt}function Vt(){return We(Ct).parallel(38.58).scale(195.044)}function Ht(Xe){var rt=t(Xe);function pt(_t,Nt){return[_t*rt,(1+rt)*g(Nt/2)]}return pt.invert=function(_t,Nt){return[_t/rt,l(Nt/(1+rt))*2]},pt}function Wt(){return We(Ht).scale(124.75)}function Sr(Xe,rt){var pt=R(8/(3*S));return[pt*Xe*(1-k(rt)/S),pt*rt]}Sr.invert=function(Xe,rt){var pt=R(8/(3*S)),_t=rt/pt;return[Xe/(pt*(1-k(_t)/S)),_t]};function on(){return x.geoProjection(Sr).scale(165.664)}function $t(Xe,rt){var pt=R(4-3*p(k(rt)));return[2/R(6*S)*Xe*pt,h(rt)*R(2*S/3)*(2-pt)]}$t.invert=function(Xe,rt){var pt=2-k(rt)/R(2*S/3);return[Xe*R(6*S)/(2*pt),h(rt)*I((4-pt*pt)/3)]};function It(){return x.geoProjection($t).scale(165.664)}function ir(Xe,rt){var pt=R(S*(4+S));return[2/pt*Xe*(1+R(1-4*rt*rt/(S*S))),4/pt*rt]}ir.invert=function(Xe,rt){var pt=R(S*(4+S))/2;return[Xe*pt/(1+R(1-rt*rt*(4+S)/(4*S))),rt*pt/2]};function cr(){return x.geoProjection(ir).scale(180.739)}function fr(Xe,rt){var pt=(2+M)*p(rt);rt/=2;for(var _t=0,Nt=1/0;_t<10&&k(Nt)>i;_t++){var Bt=t(rt);rt-=Nt=(rt+p(rt)*(Bt+2)-pt)/(2*Bt*(1+Bt))}return[2/R(S*(4+S))*Xe*(1+t(rt)),2*R(S/(4+S))*p(rt)]}fr.invert=function(Xe,rt){var pt=rt*R((4+S)/S)/2,_t=I(pt),Nt=t(_t);return[Xe/(2/R(S*(4+S))*(1+Nt)),I((_t+pt*(Nt+2))/(2+M))]};function Ir(){return x.geoProjection(fr).scale(180.739)}function ln(Xe,rt){return[Xe*(1+t(rt))/R(2+S),2*rt/R(2+S)]}ln.invert=function(Xe,rt){var pt=R(2+S),_t=rt*pt/2;return[pt*Xe/(1+t(_t)),_t]};function nn(){return x.geoProjection(ln).scale(173.044)}function wn(Xe,rt){for(var pt=(1+M)*p(rt),_t=0,Nt=1/0;_t<10&&k(Nt)>i;_t++)rt-=Nt=(rt+p(rt)-pt)/(1+t(rt));return pt=R(2+S),[Xe*(1+t(rt))/pt,2*rt/pt]}wn.invert=function(Xe,rt){var pt=1+M,_t=R(pt/2);return[Xe*2*_t/(1+t(rt*=_t)),I((rt+p(rt))/pt)]};function Un(){return x.geoProjection(wn).scale(173.044)}var jn=3+2*T;function Aa(Xe,rt){var pt=p(Xe/=2),_t=t(Xe),Nt=R(t(rt)),Bt=t(rt/=2),Yt=p(rt)/(Bt+T*_t*Nt),Dr=R(2/(1+Yt*Yt)),Ur=R((T*Bt+(_t+pt)*Nt)/(T*Bt+(_t-pt)*Nt));return[jn*(Dr*(Ur-1/Ur)-2*n(Ur)),jn*(Dr*Yt*(Ur+1/Ur)-2*l(Yt))]}Aa.invert=function(Xe,rt){if(!(Bt=X.invert(Xe/1.2,rt*1.065)))return null;var pt=Bt[0],_t=Bt[1],Nt=20,Bt;Xe/=jn,rt/=jn;do{var Yt=pt/2,Dr=_t/2,Ur=p(Yt),kr=t(Yt),Wr=p(Dr),sn=t(Dr),gn=t(_t),Cn=R(gn),Zn=Wr/(sn+T*kr*Cn),ya=Zn*Zn,Na=R(2/(1+ya)),wi=T*sn+(kr+Ur)*Cn,Yi=T*sn+(kr-Ur)*Cn,Ti=wi/Yi,_o=R(Ti),bo=_o-1/_o,Zo=_o+1/_o,fs=Na*bo-2*n(_o)-Xe,Po=Na*Zn*Zo-2*l(Zn)-rt,Es=Wr&&_*Cn*Ur*ya/Wr,cl=(T*kr*sn+Cn)/(2*(sn+T*kr*Cn)*(sn+T*kr*Cn)*Cn),ql=-.5*Zn*Na*Na*Na,Js=ql*Es,Tu=ql*cl,Li=(Li=2*sn+T*Cn*(kr-Ur))*Li*_o,Vi=(T*kr*sn*Cn+gn)/Li,fl=-(T*Ur*Wr)/(Cn*Li),Ku=bo*Js-2*Vi/_o+Na*(Vi+Vi/Ti),tu=bo*Tu-2*fl/_o+Na*(fl+fl/Ti),Bs=Zn*Zo*Js-2*Es/(1+ya)+Na*Zo*Es+Na*Zn*(Vi-Vi/Ti),oc=Zn*Zo*Tu-2*cl/(1+ya)+Na*Zo*cl+Na*Zn*(fl-fl/Ti),du=tu*Bs-oc*Ku;if(!du)break;var hl=(Po*tu-fs*oc)/du,Uc=(fs*Bs-Po*Ku)/du;pt-=hl,_t=o(-M,s(M,_t-Uc))}while((k(hl)>i||k(Uc)>i)&&--Nt>0);return k(k(_t)-M)_t){var sn=R(Wr),gn=e(kr,Ur),Cn=pt*m(gn/pt),Zn=gn-Cn,ya=Xe*t(Zn),Na=(Xe*p(Zn)-Zn*p(ya))/(M-ya),wi=Kn(Zn,Na),Yi=(S-Xe)/ot(wi,ya,S);Ur=sn;var Ti=50,_o;do Ur-=_o=(Xe+ot(wi,ya,Ur)*Yi-sn)/(wi(Ur)*Yi);while(k(_o)>i&&--Ti>0);kr=Zn*p(Ur),Ur_t){var Ur=R(Dr),kr=e(Yt,Bt),Wr=pt*m(kr/pt),sn=kr-Wr;Bt=Ur*t(sn),Yt=Ur*p(sn);for(var gn=Bt-M,Cn=p(Bt),Zn=Yt/Cn,ya=Bti||k(Zn)>i)&&--ya>0);return[sn,gn]},Ur}var ur=hr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Tr(){return x.geoProjection(ur).scale(149.995)}var Rr=hr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Fr(){return x.geoProjection(Rr).scale(153.93)}var at=hr(5/6*S,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kt(){return x.geoProjection(at).scale(130.945)}function Ut(Xe,rt){var pt=Xe*Xe,_t=rt*rt;return[Xe*(1-.162388*_t)*(.87-952426e-9*pt*pt),rt*(1+_t/12)]}Ut.invert=function(Xe,rt){var pt=Xe,_t=rt,Nt=50,Bt;do{var Yt=_t*_t;_t-=Bt=(_t*(1+Yt/12)-rt)/(1+Yt/4)}while(k(Bt)>i&&--Nt>0);Nt=50,Xe/=1-.162388*Yt;do{var Dr=(Dr=pt*pt)*Dr;pt-=Bt=(pt*(.87-952426e-9*Dr)-Xe)/(.87-.00476213*Dr)}while(k(Bt)>i&&--Nt>0);return[pt,_t]};function ar(){return x.geoProjection(Ut).scale(131.747)}var Er=hr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function br(){return x.geoProjection(Er).scale(131.087)}function Or(Xe){var rt=Xe(M,0)[0]-Xe(-M,0)[0];function pt(_t,Nt){var Bt=_t>0?-.5:.5,Yt=Xe(_t+Bt*S,Nt);return Yt[0]-=Bt*rt,Yt}return Xe.invert&&(pt.invert=function(_t,Nt){var Bt=_t>0?-.5:.5,Yt=Xe.invert(_t+Bt*rt,Nt),Dr=Yt[0]-Bt*S;return Dr<-S?Dr+=2*S:Dr>S&&(Dr-=2*S),Yt[0]=Dr,Yt}),pt}function Pr(Xe,rt){var pt=h(Xe),_t=h(rt),Nt=t(rt),Bt=t(Xe)*Nt,Yt=p(Xe)*Nt,Dr=p(_t*rt);Xe=k(e(Yt,Dr)),rt=I(Bt),k(Xe-M)>i&&(Xe%=M);var Ur=hn(Xe>S/4?M-Xe:Xe,rt);return Xe>S/4&&(Dr=Ur[0],Ur[0]=-Ur[1],Ur[1]=-Dr),Ur[0]*=pt,Ur[1]*=-_t,Ur}Pr.invert=function(Xe,rt){k(Xe)>1&&(Xe=h(Xe)*2-Xe),k(rt)>1&&(rt=h(rt)*2-rt);var pt=h(Xe),_t=h(rt),Nt=-pt*Xe,Bt=-_t*rt,Yt=Bt/Nt<1,Dr=zn(Yt?Bt:Nt,Yt?Nt:Bt),Ur=Dr[0],kr=Dr[1],Wr=t(kr);return Yt&&(Ur=-M-Ur),[pt*(e(p(Ur)*Wr,-p(kr))+S),_t*I(t(Ur)*Wr)]};function hn(Xe,rt){if(rt===M)return[0,0];var pt=p(rt),_t=pt*pt,Nt=_t*_t,Bt=1+Nt,Yt=1+3*Nt,Dr=1-Nt,Ur=I(1/R(Bt)),kr=Dr+_t*Bt*Ur,Wr=(1-pt)/kr,sn=R(Wr),gn=Wr*Bt,Cn=R(gn),Zn=sn*Dr,ya,Na;if(Xe===0)return[0,-(Zn+_t*Cn)];var wi=t(rt),Yi=1/wi,Ti=2*pt*wi,_o=(-3*_t+Ur*Yt)*Ti,bo=(-kr*wi-(1-pt)*_o)/(kr*kr),Zo=.5*bo/sn,fs=Dr*Zo-2*_t*sn*Ti,Po=_t*Bt*bo+Wr*Yt*Ti,Es=-Yi*Ti,cl=-Yi*Po,ql=-2*Yi*fs,Js=4*Xe/S,Tu;if(Xe>.222*S||rt.175*S){if(ya=(Zn+_t*R(gn*(1+Nt)-Zn*Zn))/(1+Nt),Xe>S/4)return[ya,ya];var Li=ya,Vi=.5*ya;ya=.5*(Vi+Li),Na=50;do{var fl=R(gn-ya*ya),Ku=ya*(ql+Es*fl)+cl*I(ya/Cn)-Js;if(!Ku)break;Ku<0?Vi=ya:Li=ya,ya=.5*(Vi+Li)}while(k(Li-Vi)>i&&--Na>0)}else{ya=i,Na=25;do{var tu=ya*ya,Bs=R(gn-tu),oc=ql+Es*Bs,du=ya*oc+cl*I(ya/Cn)-Js,hl=oc+(cl-Es*tu)/Bs;ya-=Tu=Bs?du/hl:0}while(k(Tu)>i&&--Na>0)}return[ya,-Zn-_t*R(gn-ya*ya)]}function zn(Xe,rt){for(var pt=0,_t=1,Nt=.5,Bt=50;;){var Yt=Nt*Nt,Dr=R(Nt),Ur=I(1/R(1+Yt)),kr=1-Yt+Nt*(1+Yt)*Ur,Wr=(1-Dr)/kr,sn=R(Wr),gn=Wr*(1+Yt),Cn=sn*(1-Yt),Zn=gn-Xe*Xe,ya=R(Zn),Na=rt+Cn+Nt*ya;if(k(_t-pt)0?pt=Nt:_t=Nt,Nt=.5*(pt+_t)}if(!Bt)return null;var wi=I(Dr),Yi=t(wi),Ti=1/Yi,_o=2*Dr*Yi,bo=(-3*Nt+Ur*(1+3*Yt))*_o,Zo=(-kr*Yi-(1-Dr)*bo)/(kr*kr),fs=.5*Zo/sn,Po=(1-Yt)*fs-2*Nt*sn*_o,Es=-2*Ti*Po,cl=-Ti*_o,ql=-Ti*(Nt*(1+Yt)*Zo+Wr*(1+3*Yt)*_o);return[S/4*(Xe*(Es+cl*ya)+ql*I(Xe/R(gn))),wi]}function Pn(){return x.geoProjection(Or(Pr)).scale(239.75)}function Ca(Xe,rt,pt){var _t,Nt,Bt;return Xe?(_t=ma(Xe,pt),rt?(Nt=ma(rt,1-pt),Bt=Nt[1]*Nt[1]+pt*_t[0]*_t[0]*Nt[0]*Nt[0],[[_t[0]*Nt[2]/Bt,_t[1]*_t[2]*Nt[0]*Nt[1]/Bt],[_t[1]*Nt[1]/Bt,-_t[0]*_t[2]*Nt[0]*Nt[2]/Bt],[_t[2]*Nt[1]*Nt[2]/Bt,-pt*_t[0]*_t[1]*Nt[0]/Bt]]):[[_t[0],0],[_t[1],0],[_t[2],0]]):(Nt=ma(rt,1-pt),[[0,Nt[0]/Nt[1]],[1/Nt[1],0],[Nt[2]/Nt[1],0]])}function ma(Xe,rt){var pt,_t,Nt,Bt,Yt;if(rt=1-i)return pt=(1-rt)/4,_t=P(Xe),Bt=B(Xe),Nt=1/_t,Yt=_t*F(Xe),[Bt+pt*(Yt-Xe)/(_t*_t),Nt-pt*Bt*Nt*(Yt-Xe),Nt+pt*Bt*Nt*(Yt+Xe),2*l(a(Xe))-M+pt*(Yt-Xe)/_t];var Dr=[1,0,0,0,0,0,0,0,0],Ur=[R(rt),0,0,0,0,0,0,0,0],kr=0;for(_t=R(1-rt),Yt=1;k(Ur[kr]/Dr[kr])>i&&kr<8;)pt=Dr[kr++],Ur[kr]=(pt-_t)/2,Dr[kr]=(pt+_t)/2,_t=R(pt*_t),Yt*=2;Nt=Yt*Dr[kr]*Xe;do Bt=Ur[kr]*p(_t=Nt)/Dr[kr],Nt=(I(Bt)+Nt)/2;while(--kr);return[p(Nt),Bt=t(Nt),Bt/t(Nt-_t),Nt]}function bi(Xe,rt,pt){var _t=k(Xe),Nt=k(rt),Bt=F(Nt);if(_t){var Yt=1/p(_t),Dr=1/(g(_t)*g(_t)),Ur=-(Dr+pt*(Bt*Bt*Yt*Yt)-1+pt),kr=(pt-1)*Dr,Wr=(-Ur+R(Ur*Ur-4*kr))/2;return[ga(l(1/R(Wr)),pt)*h(Xe),ga(l(R((Wr/Dr-1)/pt)),1-pt)*h(rt)]}return[0,ga(l(Bt),1-pt)*h(rt)]}function ga(Xe,rt){if(!rt)return Xe;if(rt===1)return n(g(Xe/2+C));for(var pt=1,_t=R(1-rt),Nt=R(rt),Bt=0;k(Nt)>i;Bt++){if(Xe%S){var Yt=l(_t*g(Xe)/pt);Yt<0&&(Yt+=S),Xe+=Yt+~~(Xe/S)*S}else Xe+=Xe;Nt=(pt+_t)/2,_t=R(pt*_t),Nt=((pt=Nt)-_t)/2}return Xe/(c(2,Bt)*pt)}function eo(Xe,rt){var pt=(T-1)/(T+1),_t=R(1-pt*pt),Nt=ga(M,_t*_t),Bt=-1,Yt=n(g(S/4+k(rt)/2)),Dr=a(Bt*Yt)/R(pt),Ur=si(Dr*t(Bt*Xe),Dr*p(Bt*Xe)),kr=bi(Ur[0],Ur[1],_t*_t);return[-kr[1],(rt>=0?1:-1)*(.5*Nt-kr[0])]}function si(Xe,rt){var pt=Xe*Xe,_t=rt+1,Nt=1-pt-rt*rt;return[.5*((Xe>=0?M:-M)-e(Nt,2*Xe)),-.25*n(Nt*Nt+4*pt)+.5*n(_t*_t+pt)]}function Ao(Xe,rt){var pt=rt[0]*rt[0]+rt[1]*rt[1];return[(Xe[0]*rt[0]+Xe[1]*rt[1])/pt,(Xe[1]*rt[0]-Xe[0]*rt[1])/pt]}eo.invert=function(Xe,rt){var pt=(T-1)/(T+1),_t=R(1-pt*pt),Nt=ga(M,_t*_t),Bt=-1,Yt=Ca(.5*Nt-rt,-Xe,_t*_t),Dr=Ao(Yt[0],Yt[1]),Ur=e(Dr[1],Dr[0])/Bt;return[Ur,2*l(a(.5/Bt*n(pt*Dr[0]*Dr[0]+pt*Dr[1]*Dr[1])))-M]};function ro(){return x.geoProjection(Or(eo)).scale(151.496)}function Sa(Xe){var rt=p(Xe),pt=t(Xe),_t=Gi(Xe);_t.invert=Gi(-Xe);function Nt(Bt,Yt){var Dr=_t(Bt,Yt);Bt=Dr[0],Yt=Dr[1];var Ur=p(Yt),kr=t(Yt),Wr=t(Bt),sn=N(rt*Ur+pt*kr*Wr),gn=p(sn),Cn=k(gn)>i?sn/gn:1;return[Cn*pt*p(Bt),(k(Bt)>M?Cn:-Cn)*(rt*kr-pt*Ur*Wr)]}return Nt.invert=function(Bt,Yt){var Dr=R(Bt*Bt+Yt*Yt),Ur=-p(Dr),kr=t(Dr),Wr=Dr*kr,sn=-Yt*Ur,gn=Dr*rt,Cn=R(Wr*Wr+sn*sn-gn*gn),Zn=e(Wr*gn+sn*Cn,sn*gn-Wr*Cn),ya=(Dr>M?-1:1)*e(Bt*Ur,Dr*t(Zn)*kr+Yt*p(Zn)*Ur);return _t.invert(ya,Zn)},Nt}function Gi(Xe){var rt=p(Xe),pt=t(Xe);return function(_t,Nt){var Bt=t(Nt),Yt=t(_t)*Bt,Dr=p(_t)*Bt,Ur=p(Nt);return[e(Dr,Yt*pt-Ur*rt),I(Ur*pt+Yt*rt)]}}function ti(){var Xe=0,rt=x.geoProjectionMutator(Sa),pt=rt(Xe),_t=pt.rotate,Nt=pt.stream,Bt=x.geoCircle();return pt.parallel=function(Yt){if(!arguments.length)return Xe*A;var Dr=pt.rotate();return rt(Xe=Yt*b).rotate(Dr)},pt.rotate=function(Yt){return arguments.length?(_t.call(pt,[Yt[0],Yt[1]-Xe*A]),Bt.center([-Yt[0],-Yt[1]]),pt):(Yt=_t.call(pt),Yt[1]+=Xe*A,Yt)},pt.stream=function(Yt){return Yt=Nt(Yt),Yt.sphere=function(){Yt.polygonStart();var Dr=.01,Ur=Bt.radius(90-Dr)().coordinates[0],kr=Ur.length-1,Wr=-1,sn;for(Yt.lineStart();++Wr=0;)Yt.point((sn=Ur[Wr])[0],sn[1]);Yt.lineEnd(),Yt.polygonEnd()},Yt},pt.scale(79.4187).parallel(45).clipAngle(180-.001)}var fi=3,xo=I(1-1/fi)*A,zi=Ct(0);function so(Xe){var rt=xo*b,pt=He(S,rt)[0]-He(-S,rt)[0],_t=zi(0,rt)[1],Nt=He(0,rt)[1],Bt=f-Nt,Yt=u/Xe,Dr=4/u,Ur=_t+Bt*Bt*4/u;function kr(Wr,sn){var gn,Cn=k(sn);if(Cn>rt){var Zn=s(Xe-1,o(0,r((Wr+S)/Yt)));Wr+=S*(Xe-1)/Xe-Zn*Yt,gn=He(Wr,Cn),gn[0]=gn[0]*u/pt-u*(Xe-1)/(2*Xe)+Zn*u/Xe,gn[1]=_t+(gn[1]-Nt)*4*Bt/u,sn<0&&(gn[1]=-gn[1])}else gn=zi(Wr,sn);return gn[0]*=Dr,gn[1]/=Ur,gn}return kr.invert=function(Wr,sn){Wr/=Dr,sn*=Ur;var gn=k(sn);if(gn>_t){var Cn=s(Xe-1,o(0,r((Wr+S)/Yt)));Wr=(Wr+S*(Xe-1)/Xe-Cn*Yt)*pt/u;var Zn=He.invert(Wr,.25*(gn-_t)*u/Bt+Nt);return Zn[0]-=S*(Xe-1)/Xe-Cn*Yt,sn<0&&(Zn[1]=-Zn[1]),Zn}return zi.invert(Wr,sn)},kr}function Mo(Xe,rt){return[Xe,rt&1?90-i:xo]}function So(Xe,rt){return[Xe,rt&1?-90+i:-xo]}function oi(Xe){return[Xe[0]*(1-i),Xe[1]]}function ii(Xe){var rt=[].concat(E.range(-180,180+Xe/2,Xe).map(Mo),E.range(180,-180-Xe/2,-Xe).map(So));return{type:"Polygon",coordinates:[Xe===180?rt.map(oi):rt]}}function co(){var Xe=4,rt=x.geoProjectionMutator(so),pt=rt(Xe),_t=pt.stream;return pt.lobes=function(Nt){return arguments.length?rt(Xe=+Nt):Xe},pt.stream=function(Nt){var Bt=pt.rotate(),Yt=_t(Nt),Dr=(pt.rotate([0,0]),_t(Nt));return pt.rotate(Bt),Yt.sphere=function(){x.geoStream(ii(180/Xe),Dr)},Yt},pt.scale(239.75)}function Wi(Xe){var rt=1+Xe,pt=p(1/rt),_t=I(pt),Nt=2*R(S/(Bt=S+4*_t*rt)),Bt,Yt=.5*Nt*(rt+R(Xe*(2+Xe))),Dr=Xe*Xe,Ur=rt*rt;function kr(Wr,sn){var gn=1-p(sn),Cn,Zn;if(gn&&gn<2){var ya=M-sn,Na=25,wi;do{var Yi=p(ya),Ti=t(ya),_o=_t+e(Yi,rt-Ti),bo=1+Ur-2*rt*Ti;ya-=wi=(ya-Dr*_t-rt*Yi+bo*_o-.5*gn*Bt)/(2*rt*Yi*_o)}while(k(wi)>w&&--Na>0);Cn=Nt*R(bo),Zn=Wr*_o/S}else Cn=Nt*(Xe+gn),Zn=Wr*_t/S;return[Cn*p(Zn),Yt-Cn*t(Zn)]}return kr.invert=function(Wr,sn){var gn=Wr*Wr+(sn-=Yt)*sn,Cn=(1+Ur-gn/(Nt*Nt))/(2*rt),Zn=N(Cn),ya=p(Zn),Na=_t+e(ya,rt-Cn);return[I(Wr/R(gn))*S/Na,I(1-2*(Zn-Dr*_t-rt*ya+(1+Ur-2*rt*Cn)*Na)/Bt)]},kr}function Ho(){var Xe=1,rt=x.geoProjectionMutator(Wi),pt=rt(Xe);return pt.ratio=function(_t){return arguments.length?rt(Xe=+_t):Xe},pt.scale(167.774).center([0,18.67])}var Io=.7109889596207567,qo=.0528035274542;function Oo(Xe,rt){return rt>-Io?(Xe=ge(Xe,rt),Xe[1]+=qo,Xe):Ge(Xe,rt)}Oo.invert=function(Xe,rt){return rt>-Io?ge.invert(Xe,rt-qo):Ge.invert(Xe,rt)};function ws(){return x.geoProjection(Oo).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Ko(Xe,rt){return k(rt)>Io?(Xe=ge(Xe,rt),Xe[1]-=rt>0?qo:-qo,Xe):Ge(Xe,rt)}Ko.invert=function(Xe,rt){return k(rt)>Io?ge.invert(Xe,rt+(rt>0?qo:-qo)):Ge.invert(Xe,rt)};function ns(){return x.geoProjection(Ko).scale(152.63)}function wo(Xe,rt,pt,_t){var Nt=R(4*S/(2*pt+(1+Xe-rt/2)*p(2*pt)+(Xe+rt)/2*p(4*pt)+rt/2*p(6*pt))),Bt=R(_t*p(pt)*R((1+Xe*t(2*pt)+rt*t(4*pt))/(1+Xe+rt))),Yt=pt*Ur(1);function Dr(sn){return R(1+Xe*t(2*sn)+rt*t(4*sn))}function Ur(sn){var gn=sn*pt;return(2*gn+(1+Xe-rt/2)*p(2*gn)+(Xe+rt)/2*p(4*gn)+rt/2*p(6*gn))/pt}function kr(sn){return Dr(sn)*p(sn)}var Wr=function(sn,gn){var Cn=pt*Ae(Ur,Yt*p(gn)/pt,gn/S);isNaN(Cn)&&(Cn=pt*h(gn));var Zn=Nt*Dr(Cn);return[Zn*Bt*sn/S*t(Cn),Zn/Bt*p(Cn)]};return Wr.invert=function(sn,gn){var Cn=Ae(kr,gn*Bt/Nt);return[sn*S/(t(Cn)*Nt*Bt*Dr(Cn)),I(pt*Ur(Cn/pt)/Yt)]},pt===0&&(Nt=R(_t/S),Wr=function(sn,gn){return[sn*Nt,p(gn)/Nt]},Wr.invert=function(sn,gn){return[sn/Nt,I(gn*Nt)]}),Wr}function No(){var Xe=1,rt=0,pt=45*b,_t=2,Nt=x.geoProjectionMutator(wo),Bt=Nt(Xe,rt,pt,_t);return Bt.a=function(Yt){return arguments.length?Nt(Xe=+Yt,rt,pt,_t):Xe},Bt.b=function(Yt){return arguments.length?Nt(Xe,rt=+Yt,pt,_t):rt},Bt.psiMax=function(Yt){return arguments.length?Nt(Xe,rt,pt=+Yt*b,_t):pt*A},Bt.ratio=function(Yt){return arguments.length?Nt(Xe,rt,pt,_t=+Yt):_t},Bt.scale(180.739)}function Di(Xe,rt,pt,_t,Nt,Bt,Yt,Dr,Ur,kr,Wr){if(Wr.nanEncountered)return NaN;var sn,gn,Cn,Zn,ya,Na,wi,Yi,Ti,_o;if(sn=pt-rt,gn=Xe(rt+sn*.25),Cn=Xe(pt-sn*.25),isNaN(gn)){Wr.nanEncountered=!0;return}if(isNaN(Cn)){Wr.nanEncountered=!0;return}return Zn=sn*(_t+4*gn+Nt)/12,ya=sn*(Nt+4*Cn+Bt)/12,Na=Zn+ya,_o=(Na-Yt)/15,kr>Ur?(Wr.maxDepthCount++,Na+_o):Math.abs(_o)>1;do Ur[Na]>Cn?ya=Na:Zn=Na,Na=Zn+ya>>1;while(Na>Zn);var wi=Ur[Na+1]-Ur[Na];return wi&&(wi=(Cn-Ur[Na+1])/wi),(Na+1+wi)/Yt}var sn=2*Wr(1)/S*Bt/pt,gn=function(Cn,Zn){var ya=Wr(k(p(Zn))),Na=_t(ya)*Cn;return ya/=sn,[Na,Zn>=0?ya:-ya]};return gn.invert=function(Cn,Zn){var ya;return Zn*=sn,k(Zn)<1&&(ya=h(Zn)*I(Nt(k(Zn))*Bt)),[Cn/_t(k(Zn)),ya]},gn}function mo(){var Xe=0,rt=2.5,pt=1.183136,_t=x.geoProjectionMutator(Go),Nt=_t(Xe,rt,pt);return Nt.alpha=function(Bt){return arguments.length?_t(Xe=+Bt,rt,pt):Xe},Nt.k=function(Bt){return arguments.length?_t(Xe,rt=+Bt,pt):rt},Nt.gamma=function(Bt){return arguments.length?_t(Xe,rt,pt=+Bt):pt},Nt.scale(152.63)}function us(Xe,rt){return k(Xe[0]-rt[0])=0;--Ur)pt=Xe[1][Ur],_t=pt[0][0],Nt=pt[0][1],Bt=pt[1][1],Yt=pt[2][0],Dr=pt[2][1],rt.push(Jo([[Yt-i,Dr-i],[Yt-i,Bt+i],[_t+i,Bt+i],[_t+i,Nt-i]],30));return{type:"Polygon",coordinates:[E.merge(rt)]}}function Is(Xe,rt,pt){var _t,Nt;function Bt(Ur,kr){for(var Wr=kr<0?-1:1,sn=rt[+(kr<0)],gn=0,Cn=sn.length-1;gnsn[gn][2][0];++gn);var Zn=Xe(Ur-sn[gn][1][0],kr);return Zn[0]+=Xe(sn[gn][1][0],Wr*kr>Wr*sn[gn][0][1]?sn[gn][0][1]:kr)[0],Zn}pt?Bt.invert=pt(Bt):Xe.invert&&(Bt.invert=function(Ur,kr){for(var Wr=Nt[+(kr<0)],sn=rt[+(kr<0)],gn=0,Cn=Wr.length;gnZn&&(ya=Cn,Cn=Zn,Zn=ya),[[sn,Cn],[gn,Zn]]})}),Yt):rt.map(function(kr){return kr.map(function(Wr){return[[Wr[0][0]*A,Wr[0][1]*A],[Wr[1][0]*A,Wr[1][1]*A],[Wr[2][0]*A,Wr[2][1]*A]]})})},rt!=null&&Yt.lobes(rt),Yt}var es=[[[[-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 Zs(){return Is(Te,es).scale(160.857)}var Ps=[[[[-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 $o(){return Is(Ko,Ps).scale(152.63)}var Fo=[[[[-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 Ji(){return Is(ge,Fo).scale(169.529)}var Ro=[[[[-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 Ls(){return Is(ge,Ro).scale(169.529).rotate([20,0])}var zl=[[[[-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 ml(){return Is(Oo,zl,Me).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Ts=[[[[-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 yl(){return Is(Ge,Ts).scale(152.63).rotate([-20,0])}function mu(Xe,rt){return[3/u*Xe*R(S*S/3-rt*rt),rt]}mu.invert=function(Xe,rt){return[u/3*Xe/R(S*S/3-rt*rt),rt]};function su(){return x.geoProjection(mu).scale(158.837)}function cc(Xe){function rt(pt,_t){if(k(k(_t)-M)2)return null;pt/=2,_t/=2;var Bt=pt*pt,Yt=_t*_t,Dr=2*_t/(1+Bt+Yt);return Dr=c((1+Dr)/(1-Dr),1/Xe),[e(2*pt,1-Bt-Yt)/Xe,I((Dr-1)/(Dr+1))]},rt}function Bl(){var Xe=.5,rt=x.geoProjectionMutator(cc),pt=rt(Xe);return pt.spacing=function(_t){return arguments.length?rt(Xe=+_t):Xe},pt.scale(124.75)}var _l=S/T;function ju(Xe,rt){return[Xe*(1+R(t(rt)))/2,rt/(t(rt/2)*t(Xe/6))]}ju.invert=function(Xe,rt){var pt=k(Xe),_t=k(rt),Nt=i,Bt=M;_t<_l?Bt*=_t/_l:Nt+=6*N(_l/_t);for(var Yt=0;Yt<25;Yt++){var Dr=p(Bt),Ur=R(t(Bt)),kr=p(Bt/2),Wr=t(Bt/2),sn=p(Nt/6),gn=t(Nt/6),Cn=.5*Nt*(1+Ur)-pt,Zn=Bt/(Wr*gn)-_t,ya=Ur?-.25*Nt*Dr/Ur:0,Na=.5*(1+Ur),wi=(1+.5*Bt*kr/Wr)/(Wr*gn),Yi=Bt/Wr*(sn/6)/(gn*gn),Ti=ya*Yi-wi*Na,_o=(Cn*Yi-Zn*Na)/Ti,bo=(Zn*ya-Cn*wi)/Ti;if(Bt-=_o,Nt-=bo,k(_o)i||k(Na)>i)&&--Nt>0);return Nt&&[pt,_t]};function As(){return x.geoProjection(il).scale(139.98)}function ms(Xe,rt){return[p(Xe)/t(rt),g(rt)*t(Xe)]}ms.invert=function(Xe,rt){var pt=Xe*Xe,_t=rt*rt,Nt=_t+1,Bt=pt+Nt,Yt=Xe?_*R((Bt-R(Bt*Bt-4*pt))/pt):1/R(Nt);return[I(Xe*Yt),h(rt)*N(Yt)]};function Ms(){return x.geoProjection(ms).scale(144.049).clipAngle(90-.001)}function ol(Xe){var rt=t(Xe),pt=g(C+Xe/2);function _t(Nt,Bt){var Yt=Bt-Xe,Dr=k(Yt)=0;)Wr=Xe[kr],sn=Wr[0]+Dr*(Cn=sn)-Ur*gn,gn=Wr[1]+Dr*gn+Ur*Cn;return sn=Dr*(Cn=sn)-Ur*gn,gn=Dr*gn+Ur*Cn,[sn,gn]}return pt.invert=function(_t,Nt){var Bt=20,Yt=_t,Dr=Nt;do{for(var Ur=rt,kr=Xe[Ur],Wr=kr[0],sn=kr[1],gn=0,Cn=0,Zn;--Ur>=0;)kr=Xe[Ur],gn=Wr+Yt*(Zn=gn)-Dr*Cn,Cn=sn+Yt*Cn+Dr*Zn,Wr=kr[0]+Yt*(Zn=Wr)-Dr*sn,sn=kr[1]+Yt*sn+Dr*Zn;gn=Wr+Yt*(Zn=gn)-Dr*Cn,Cn=sn+Yt*Cn+Dr*Zn,Wr=Yt*(Zn=Wr)-Dr*sn-_t,sn=Yt*sn+Dr*Zn-Nt;var ya=gn*gn+Cn*Cn,Na,wi;Yt-=Na=(Wr*gn+sn*Cn)/ya,Dr-=wi=(sn*gn-Wr*Cn)/ya}while(k(Na)+k(wi)>i*i&&--Bt>0);if(Bt){var Yi=R(Yt*Yt+Dr*Dr),Ti=2*l(Yi*.5),_o=p(Ti);return[e(Yt*_o,Yi*t(Ti)),Yi?I(Dr*_o/Yi):0]}},pt}var th=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Cf=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],qu=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],gs=[[.9245,0],[0,0],[.01943,0]],Lf=[[.721316,0],[0,0],[-.00881625,-.00617325]];function hc(){return Cu(th,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function nc(){return Cu(Cf,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function hf(){return Cu(qu,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function ku(){return Cu(gs,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function dc(){return Cu(Lf,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Cu(Xe,rt){var pt=x.geoProjection(fc(Xe)).rotate(rt).clipAngle(90),_t=x.geoRotation(rt),Nt=pt.center;return delete pt.rotate,pt.center=function(Bt){return arguments.length?Nt(_t(Bt)):_t.invert(Nt())},pt}var Pc=R(6),$c=R(7);function Zl(Xe,rt){var pt=I(7*p(rt)/(3*Pc));return[Pc*Xe*(2*t(2*pt/3)-1)/$c,9*p(pt/3)/$c]}Zl.invert=function(Xe,rt){var pt=3*I(rt*$c/9);return[Xe*$c/(Pc*(2*t(2*pt/3)-1)),I(p(pt)*3*Pc/7)]};function df(){return x.geoProjection(Zl).scale(164.859)}function Dc(Xe,rt){for(var pt=(1+_)*p(rt),_t=rt,Nt=0,Bt;Nt<25&&(_t-=Bt=(p(_t/2)+p(_t)-pt)/(.5*t(_t/2)+t(_t)),!(k(Bt)w&&--_t>0);return Bt=pt*pt,Yt=Bt*Bt,Dr=Bt*Yt,[Xe/(.84719-.13063*Bt+Dr*Dr*(-.04515+.05494*Bt-.02326*Yt+.00331*Dr)),pt]};function vf(){return x.geoProjection(Lu).scale(175.295)}function sl(Xe,rt){return[Xe*(1+t(rt))/2,2*(rt-g(rt/2))]}sl.invert=function(Xe,rt){for(var pt=rt/2,_t=0,Nt=1/0;_t<10&&k(Nt)>i;++_t){var Bt=t(rt/2);rt-=Nt=(rt-g(rt/2)-pt)/(1-.5/(Bt*Bt))}return[2*Xe/(1+t(rt)),rt]};function Fc(){return x.geoProjection(sl).scale(152.63)}var Pu=[[[[-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 vc(){return Is(fe(1/0),Pu).rotate([20,0]).scale(152.63)}function zc(Xe,rt){var pt=p(rt),_t=t(rt),Nt=h(Xe);if(Xe===0||k(rt)===M)return[0,rt];if(rt===0)return[Xe,0];if(k(Xe)===M)return[Xe*_t,M*pt];var Bt=S/(2*Xe)-2*Xe/S,Yt=2*rt/S,Dr=(1-Yt*Yt)/(pt-Yt),Ur=Bt*Bt,kr=Dr*Dr,Wr=1+Ur/kr,sn=1+kr/Ur,gn=(Bt*pt/Dr-Bt/2)/Wr,Cn=(kr*pt/Ur+Dr/2)/sn,Zn=gn*gn+_t*_t/Wr,ya=Cn*Cn-(kr*pt*pt/Ur+Dr*pt-1)/sn;return[M*(gn+R(Zn)*Nt),M*(Cn+R(ya<0?0:ya)*h(-rt*Bt)*Nt)]}zc.invert=function(Xe,rt){Xe/=M,rt/=M;var pt=Xe*Xe,_t=rt*rt,Nt=pt+_t,Bt=S*S;return[Xe?(Nt-1+R((1-Nt)*(1-Nt)+4*pt))/(2*Xe)*M:0,Ae(function(Yt){return Nt*(S*p(Yt)-2*Yt)*S+4*Yt*Yt*(rt-p(Yt))+2*S*Yt-Bt*rt},0)]};function Hu(){return x.geoProjection(zc).scale(127.267)}var uu=1.0148,Gu=.23185,Zc=-.14499,gu=.02406,Pf=uu,bl=5*Gu,xl=7*Zc,Wu=9*gu,wl=1.790857183;function pf(Xe,rt){var pt=rt*rt;return[Xe,rt*(uu+pt*pt*(Gu+pt*(Zc+gu*pt)))]}pf.invert=function(Xe,rt){rt>wl?rt=wl:rt<-wl&&(rt=-wl);var pt=rt,_t;do{var Nt=pt*pt;pt-=_t=(pt*(uu+Nt*Nt*(Gu+Nt*(Zc+gu*Nt)))-rt)/(Pf+Nt*Nt*(bl+Nt*(xl+Wu*Nt)))}while(k(_t)>i);return[Xe,pt]};function Yu(){return x.geoProjection(pf).scale(139.319)}function pc(Xe,rt){if(k(rt)i&&--Nt>0);return Yt=g(_t),[(k(rt)=0;)if(_t=rt[Dr],pt[0]===_t[0]&&pt[1]===_t[1]){if(Bt)return[Bt,pt];Bt=pt}}}function Jc(Xe){for(var rt=Xe.length,pt=[],_t=Xe[rt-1],Nt=0;Nt0?[-_t[0],0]:[180-_t[0],180])};var rt=fu.map(function(pt){return{face:pt,project:Xe(pt)}});return[-1,0,0,1,0,1,4,5].forEach(function(pt,_t){var Nt=rt[pt];Nt&&(Nt.children||(Nt.children=[])).push(rt[_t])}),yu(rt[0],function(pt,_t){return rt[pt<-S/2?_t<0?6:4:pt<0?_t<0?2:0:pt_t^Cn>_t&&pt<(gn-kr)*(_t-Wr)/(Cn-Wr)+kr&&(Nt=!Nt)}return Nt}function mf(Xe,rt){var pt=rt.stream,_t;if(!pt)throw new Error("invalid projection");switch(Xe&&Xe.type){case"Feature":_t=gf;break;case"FeatureCollection":_t=tf;break;default:_t=yf;break}return _t(Xe,pt)}function tf(Xe,rt){return{type:"FeatureCollection",features:Xe.features.map(function(pt){return gf(pt,rt)})}}function gf(Xe,rt){return{type:"Feature",id:Xe.id,properties:Xe.properties,geometry:yf(Xe.geometry,rt)}}function Hf(Xe,rt){return{type:"GeometryCollection",geometries:Xe.geometries.map(function(pt){return yf(pt,rt)})}}function yf(Xe,rt){if(!Xe)return null;if(Xe.type==="GeometryCollection")return Hf(Xe,rt);var pt;switch(Xe.type){case"Point":pt=yc;break;case"MultiPoint":pt=yc;break;case"LineString":pt=_c;break;case"MultiLineString":pt=_c;break;case"Polygon":pt=bc;break;case"MultiPolygon":pt=bc;break;case"Sphere":pt=bc;break;default:return null}return x.geoStream(Xe,rt(pt)),pt.result()}var ul=[],Pl=[],yc={point:function(Xe,rt){ul.push([Xe,rt])},result:function(){var Xe=ul.length?ul.length<2?{type:"Point",coordinates:ul[0]}:{type:"MultiPoint",coordinates:ul}:null;return ul=[],Xe}},_c={lineStart:zo,point:function(Xe,rt){ul.push([Xe,rt])},lineEnd:function(){ul.length&&(Pl.push(ul),ul=[])},result:function(){var Xe=Pl.length?Pl.length<2?{type:"LineString",coordinates:Pl[0]}:{type:"MultiLineString",coordinates:Pl}:null;return Pl=[],Xe}},bc={polygonStart:zo,lineStart:zo,point:function(Xe,rt){ul.push([Xe,rt])},lineEnd:function(){var Xe=ul.length;if(Xe){do ul.push(ul[0].slice());while(++Xe<4);Pl.push(ul),ul=[]}},polygonEnd:zo,result:function(){if(!Pl.length)return null;var Xe=[],rt=[];return Pl.forEach(function(pt){gc(pt)?Xe.push([pt]):rt.push(pt)}),rt.forEach(function(pt){var _t=pt[0];Xe.some(function(Nt){if(Vf(Nt[0],_t))return Nt.push(pt),!0})||Xe.push([pt])}),Pl=[],Xe.length?Xe.length>1?{type:"MultiPolygon",coordinates:Xe}:{type:"Polygon",coordinates:Xe[0]}:null}};function ac(Xe){var rt=Xe(M,0)[0]-Xe(-M,0)[0];function pt(_t,Nt){var Bt=k(_t)0?_t-S:_t+S,Nt),Dr=(Yt[0]-Yt[1])*_,Ur=(Yt[0]+Yt[1])*_;if(Bt)return[Dr,Ur];var kr=rt*_,Wr=Dr>0^Ur>0?-1:1;return[Wr*Dr-h(Ur)*kr,Wr*Ur-h(Dr)*kr]}return Xe.invert&&(pt.invert=function(_t,Nt){var Bt=(_t+Nt)*_,Yt=(Nt-_t)*_,Dr=k(Bt)<.5*rt&&k(Yt)<.5*rt;if(!Dr){var Ur=rt*_,kr=Bt>0^Yt>0?-1:1,Wr=-kr*_t+(Yt>0?1:-1)*Ur,sn=-kr*Nt+(Bt>0?1:-1)*Ur;Bt=(-Wr-sn)*_,Yt=(Wr-sn)*_}var gn=Xe.invert(Bt,Yt);return Dr||(gn[0]+=Bt>0?S:-S),gn}),x.geoProjection(pt).rotate([-90,-90,45]).clipAngle(180-.001)}function zt(){return ac(Pr).scale(176.423)}function rr(){return ac(eo).scale(111.48)}function Br(Xe,rt){if(!(0<=(rt=+rt)&&rt<=20))throw new Error("invalid digits");function pt(kr){var Wr=kr.length,sn=2,gn=new Array(Wr);for(gn[0]=+kr[0].toFixed(rt),gn[1]=+kr[1].toFixed(rt);sn2||Cn[0]!=Wr[0]||Cn[1]!=Wr[1])&&(sn.push(Cn),Wr=Cn)}return sn.length===1&&kr.length>1&&sn.push(pt(kr[kr.length-1])),sn}function Bt(kr){return kr.map(Nt)}function Yt(kr){if(kr==null)return kr;var Wr;switch(kr.type){case"GeometryCollection":Wr={type:"GeometryCollection",geometries:kr.geometries.map(Yt)};break;case"Point":Wr={type:"Point",coordinates:pt(kr.coordinates)};break;case"MultiPoint":Wr={type:kr.type,coordinates:_t(kr.coordinates)};break;case"LineString":Wr={type:kr.type,coordinates:Nt(kr.coordinates)};break;case"MultiLineString":case"Polygon":Wr={type:kr.type,coordinates:Bt(kr.coordinates)};break;case"MultiPolygon":Wr={type:"MultiPolygon",coordinates:kr.coordinates.map(Bt)};break;default:return kr}return kr.bbox!=null&&(Wr.bbox=kr.bbox),Wr}function Dr(kr){var Wr={type:"Feature",properties:kr.properties,geometry:Yt(kr.geometry)};return kr.id!=null&&(Wr.id=kr.id),kr.bbox!=null&&(Wr.bbox=kr.bbox),Wr}if(Xe!=null)switch(Xe.type){case"Feature":return Dr(Xe);case"FeatureCollection":{var Ur={type:"FeatureCollection",features:Xe.features.map(Dr)};return Xe.bbox!=null&&(Ur.bbox=Xe.bbox),Ur}default:return Yt(Xe)}return Xe}function wr(Xe){var rt=p(Xe);function pt(_t,Nt){var Bt=rt?g(_t*rt/2)/rt:_t/2;if(!Nt)return[2*Bt,-Xe];var Yt=2*l(Bt*p(Nt)),Dr=1/g(Nt);return[p(Yt)*Dr,Nt+(1-t(Yt))*Dr-Xe]}return pt.invert=function(_t,Nt){if(k(Nt+=Xe)i&&--Dr>0);var gn=_t*(kr=g(Yt)),Cn=g(k(Nt)0?M:-M)*(Ur+Nt*(Wr-Yt)/2+Nt*Nt*(Wr-2*Ur+Yt)/2)]}Vn.invert=function(Xe,rt){var pt=rt/M,_t=pt*90,Nt=s(18,k(_t/5)),Bt=o(0,r(Nt));do{var Yt=Ln[Bt][1],Dr=Ln[Bt+1][1],Ur=Ln[s(19,Bt+2)][1],kr=Ur-Yt,Wr=Ur-2*Dr+Yt,sn=2*(k(pt)-Dr)/kr,gn=Wr/kr,Cn=sn*(1-gn*sn*(1-2*gn*sn));if(Cn>=0||Bt===1){_t=(rt>=0?5:-5)*(Cn+Nt);var Zn=50,ya;do Nt=s(18,k(_t)/5),Bt=r(Nt),Cn=Nt-Bt,Yt=Ln[Bt][1],Dr=Ln[Bt+1][1],Ur=Ln[s(19,Bt+2)][1],_t-=(ya=(rt>=0?M:-M)*(Dr+Cn*(Ur-Yt)/2+Cn*Cn*(Ur-2*Dr+Yt)/2)-rt)*A;while(k(ya)>w&&--Zn>0);break}}while(--Bt>=0);var Na=Ln[Bt][0],wi=Ln[Bt+1][0],Yi=Ln[s(19,Bt+2)][0];return[Xe/(wi+Cn*(Yi-Na)/2+Cn*Cn*(Yi-2*wi+Na)/2),_t*b]};function Jn(){return x.geoProjection(Vn).scale(152.63)}function ca(Xe){function rt(pt,_t){var Nt=t(_t),Bt=(Xe-1)/(Xe-Nt*t(pt));return[Bt*Nt*p(pt),Bt*p(_t)]}return rt.invert=function(pt,_t){var Nt=pt*pt+_t*_t,Bt=R(Nt),Yt=(Xe-R(1-Nt*(Xe+1)/(Xe-1)))/((Xe-1)/Bt+Bt/(Xe-1));return[e(pt*Yt,Bt*R(1-Yt*Yt)),Bt?I(_t*Yt/Bt):0]},rt}function Pa(Xe,rt){var pt=ca(Xe);if(!rt)return pt;var _t=t(rt),Nt=p(rt);function Bt(Yt,Dr){var Ur=pt(Yt,Dr),kr=Ur[1],Wr=kr*Nt/(Xe-1)+_t;return[Ur[0]*_t/Wr,kr/Wr]}return Bt.invert=function(Yt,Dr){var Ur=(Xe-1)/(Xe-1-Dr*Nt);return pt.invert(Ur*Yt,Ur*Dr*_t)},Bt}function Gn(){var Xe=2,rt=0,pt=x.geoProjectionMutator(Pa),_t=pt(Xe,rt);return _t.distance=function(Nt){return arguments.length?pt(Xe=+Nt,rt):Xe},_t.tilt=function(Nt){return arguments.length?pt(Xe,rt=Nt*b):rt*A},_t.scale(432.147).clipAngle(N(1/Xe)*A-1e-6)}var oa=1e-4,fa=1e4,La=-180,qa=La+oa,Bi=180,Ni=Bi-oa,Zi=-90,_i=Zi+oa,Va=90,Ga=Va-oa;function oo(Xe){return Xe.length>0}function go(Xe){return Math.floor(Xe*fa)/fa}function Vo(Xe){return Xe===Zi||Xe===Va?[0,Xe]:[La,go(Xe)]}function Wo(Xe){var rt=Xe[0],pt=Xe[1],_t=!1;return rt<=qa?(rt=La,_t=!0):rt>=Ni&&(rt=Bi,_t=!0),pt<=_i?(pt=Zi,_t=!0):pt>=Ga&&(pt=Va,_t=!0),_t?[rt,pt]:Xe}function Yo(Xe){return Xe.map(Wo)}function as(Xe,rt,pt){for(var _t=0,Nt=Xe.length;_t=Ni||Wr<=_i||Wr>=Ga){Bt[Yt]=Wo(Ur);for(var sn=Yt+1;snqa&&Cn_i&&Zn=Dr)break;pt.push({index:-1,polygon:rt,ring:Bt=Bt.slice(sn-1)}),Bt[0]=Vo(Bt[0][1]),Yt=-1,Dr=Bt.length}}}}function Bo(Xe){var rt,pt=Xe.length,_t={},Nt={},Bt,Yt,Dr,Ur,kr;for(rt=0;rt0?S-Dr:Dr)*A],kr=x.geoProjection(Xe(Yt)).rotate(Ur),Wr=x.geoRotation(Ur),sn=kr.center;return delete kr.rotate,kr.center=function(gn){return arguments.length?sn(Wr(gn)):Wr.invert(sn())},kr.clipAngle(90)}function Ws(Xe){var rt=t(Xe);function pt(_t,Nt){var Bt=x.geoGnomonicRaw(_t,Nt);return Bt[0]*=rt,Bt}return pt.invert=function(_t,Nt){return x.geoGnomonicRaw.invert(_t/rt,Nt)},pt}function Dl(){return Nl([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Nl(Xe,rt){return Ss(Ws,Xe,rt)}function Kl(Xe){if(!(Xe*=2))return x.geoAzimuthalEquidistantRaw;var rt=-Xe/2,pt=-rt,_t=Xe*Xe,Nt=g(pt),Bt=.5/p(pt);function Yt(Dr,Ur){var kr=N(t(Ur)*t(Dr-rt)),Wr=N(t(Ur)*t(Dr-pt)),sn=Ur<0?-1:1;return kr*=kr,Wr*=Wr,[(kr-Wr)/(2*Xe),sn*R(4*_t*Wr-(_t-kr+Wr)*(_t-kr+Wr))/(2*Xe)]}return Yt.invert=function(Dr,Ur){var kr=Ur*Ur,Wr=t(R(kr+(gn=Dr+rt)*gn)),sn=t(R(kr+(gn=Dr+pt)*gn)),gn,Cn;return[e(Cn=Wr-sn,gn=(Wr+sn)*Nt),(Ur<0?-1:1)*N(R(gn*gn+Cn*Cn)*Bt)]},Yt}function Fu(){return Al([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Al(Xe,rt){return Ss(Kl,Xe,rt)}function zu(Xe,rt){if(k(rt)i&&--Dr>0);return[h(Xe)*(R(Nt*Nt+4)+Nt)*S/4,M*Yt]};function Ql(){return x.geoProjection(Jl).scale(127.16)}function xu(Xe,rt,pt,_t,Nt){function Bt(Yt,Dr){var Ur=pt*p(_t*Dr),kr=R(1-Ur*Ur),Wr=R(2/(1+kr*t(Yt*=Nt)));return[Xe*kr*Wr*p(Yt),rt*Ur*Wr]}return Bt.invert=function(Yt,Dr){var Ur=Yt/Xe,kr=Dr/rt,Wr=R(Ur*Ur+kr*kr),sn=2*I(Wr/2);return[e(Yt*g(sn),Xe*Wr)/Nt,Wr&&I(Dr*p(sn)/(rt*pt*Wr))/_t]},Bt}function rf(Xe,rt,pt,_t){var Nt=S/3;Xe=o(Xe,i),rt=o(rt,i),Xe=s(Xe,M),rt=s(rt,S-i),pt=o(pt,0),pt=s(pt,100-i),_t=o(_t,i);var Bt=pt/100+1,Yt=_t/100,Dr=N(Bt*t(Nt))/Nt,Ur=p(Xe)/p(Dr*M),kr=rt/S,Wr=R(Yt*p(Xe/2)/p(rt/2)),sn=Wr/R(kr*Ur*Dr),gn=1/(Wr*R(kr*Ur*Dr));return xu(sn,gn,Ur,Dr,kr)}function Ff(){var Xe=65*b,rt=60*b,pt=20,_t=200,Nt=x.geoProjectionMutator(rf),Bt=Nt(Xe,rt,pt,_t);return Bt.poleline=function(Yt){return arguments.length?Nt(Xe=+Yt*b,rt,pt,_t):Xe*A},Bt.parallels=function(Yt){return arguments.length?Nt(Xe,rt=+Yt*b,pt,_t):rt*A},Bt.inflation=function(Yt){return arguments.length?Nt(Xe,rt,pt=+Yt,_t):pt},Bt.ratio=function(Yt){return arguments.length?Nt(Xe,rt,pt,_t=+Yt):_t},Bt.scale(163.775)}function xc(){return Ff().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var rl=4*S+3*R(3),Ol=2*R(2*S*R(3)/rl),Bu=ke(Ol*R(3)/S,Ol,rl/6);function nf(){return x.geoProjection(Bu).scale(176.84)}function jc(Xe,rt){return[Xe*R(1-3*rt*rt/(S*S)),rt]}jc.invert=function(Xe,rt){return[Xe/R(1-3*rt*rt/(S*S)),rt]};function wu(){return x.geoProjection(jc).scale(152.63)}function jl(Xe,rt){var pt=t(rt),_t=t(Xe)*pt,Nt=1-_t,Bt=t(Xe=e(p(Xe)*pt,-p(rt))),Yt=p(Xe);return pt=R(1-_t*_t),[Yt*pt-Bt*Nt,-Bt*pt-Yt*Nt]}jl.invert=function(Xe,rt){var pt=(Xe*Xe+rt*rt)/-2,_t=R(-pt*(2+pt)),Nt=rt*pt+Xe*_t,Bt=Xe*pt-rt*_t,Yt=R(Bt*Bt+Nt*Nt);return[e(_t*Nt,Yt*(1+pt)),Yt?-I(_t*Bt/Yt):0]};function Ul(){return x.geoProjection(jl).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Ci(Xe,rt){var pt=re(Xe,rt);return[(pt[0]+Xe/M)/2,(pt[1]+rt)/2]}Ci.invert=function(Xe,rt){var pt=Xe,_t=rt,Nt=25;do{var Bt=t(_t),Yt=p(_t),Dr=p(2*_t),Ur=Yt*Yt,kr=Bt*Bt,Wr=p(pt),sn=t(pt/2),gn=p(pt/2),Cn=gn*gn,Zn=1-kr*sn*sn,ya=Zn?N(Bt*sn)*R(Na=1/Zn):Na=0,Na,wi=.5*(2*ya*Bt*gn+pt/M)-Xe,Yi=.5*(ya*Yt+_t)-rt,Ti=.5*Na*(kr*Cn+ya*Bt*sn*Ur)+.5/M,_o=Na*(Wr*Dr/4-ya*Yt*gn),bo=.125*Na*(Dr*gn-ya*Yt*kr*Wr),Zo=.5*Na*(Ur*sn+ya*Cn*Bt)+.5,fs=_o*bo-Zo*Ti,Po=(Yi*_o-wi*Zo)/fs,Es=(wi*bo-Yi*Ti)/fs;pt-=Po,_t-=Es}while((k(Po)>i||k(Es)>i)&&--Nt>0);return[pt,_t]};function eu(){return x.geoProjection(Ci).scale(158.837)}v.geoNaturalEarth=x.geoNaturalEarth1,v.geoNaturalEarthRaw=x.geoNaturalEarth1Raw,v.geoAiry=Q,v.geoAiryRaw=Z,v.geoAitoff=ae,v.geoAitoffRaw=re,v.geoArmadillo=H,v.geoArmadilloRaw=oe,v.geoAugust=K,v.geoAugustRaw=X,v.geoBaker=$,v.geoBakerRaw=q,v.geoBerghaus=ne,v.geoBerghausRaw=ee,v.geoBertin1953=Ue,v.geoBertin1953Raw=Ie,v.geoBoggs=Fe,v.geoBoggsRaw=Te,v.geoBonne=Tt,v.geoBonneRaw=mt,v.geoBottomley=Kt,v.geoBottomleyRaw=At,v.geoBromley=_r,v.geoBromleyRaw=nr,v.geoChamberlin=Be,v.geoChamberlinRaw=vt,v.geoChamberlinAfrica=Re,v.geoCollignon=$e,v.geoCollignonRaw=He,v.geoCraig=Je,v.geoCraigRaw=Ze,v.geoCraster=Dt,v.geoCrasterRaw=dt,v.geoCylindricalEqualArea=Vt,v.geoCylindricalEqualAreaRaw=Ct,v.geoCylindricalStereographic=Wt,v.geoCylindricalStereographicRaw=Ht,v.geoEckert1=on,v.geoEckert1Raw=Sr,v.geoEckert2=It,v.geoEckert2Raw=$t,v.geoEckert3=cr,v.geoEckert3Raw=ir,v.geoEckert4=Ir,v.geoEckert4Raw=fr,v.geoEckert5=nn,v.geoEckert5Raw=ln,v.geoEckert6=Un,v.geoEckert6Raw=wn,v.geoEisenlohr=ua,v.geoEisenlohrRaw=Aa,v.geoFahey=Fa,v.geoFaheyRaw=ei,v.geoFoucaut=Mi,v.geoFoucautRaw=ai,v.geoFoucautSinusoidal=ba,v.geoFoucautSinusoidalRaw=ci,v.geoGilbert=ho,v.geoGingery=et,v.geoGingeryRaw=da,v.geoGinzburg4=Tr,v.geoGinzburg4Raw=ur,v.geoGinzburg5=Fr,v.geoGinzburg5Raw=Rr,v.geoGinzburg6=kt,v.geoGinzburg6Raw=at,v.geoGinzburg8=ar,v.geoGinzburg8Raw=Ut,v.geoGinzburg9=br,v.geoGinzburg9Raw=Er,v.geoGringorten=Pn,v.geoGringortenRaw=Pr,v.geoGuyou=ro,v.geoGuyouRaw=eo,v.geoHammer=xe,v.geoHammerRaw=fe,v.geoHammerRetroazimuthal=ti,v.geoHammerRetroazimuthalRaw=Sa,v.geoHealpix=co,v.geoHealpixRaw=so,v.geoHill=Ho,v.geoHillRaw=Wi,v.geoHomolosine=ns,v.geoHomolosineRaw=Ko,v.geoHufnagel=No,v.geoHufnagelRaw=wo,v.geoHyperelliptical=mo,v.geoHyperellipticalRaw=Go,v.geoInterrupt=Is,v.geoInterruptedBoggs=Zs,v.geoInterruptedHomolosine=$o,v.geoInterruptedMollweide=Ji,v.geoInterruptedMollweideHemispheres=Ls,v.geoInterruptedSinuMollweide=ml,v.geoInterruptedSinusoidal=yl,v.geoKavrayskiy7=su,v.geoKavrayskiy7Raw=mu,v.geoLagrange=Bl,v.geoLagrangeRaw=cc,v.geoLarrivee=lu,v.geoLarriveeRaw=ju,v.geoLaskowski=As,v.geoLaskowskiRaw=il,v.geoLittrow=Ms,v.geoLittrowRaw=ms,v.geoLoximuthal=Su,v.geoLoximuthalRaw=ol,v.geoMiller=Uu,v.geoMillerRaw=Eu,v.geoModifiedStereographic=Cu,v.geoModifiedStereographicRaw=fc,v.geoModifiedStereographicAlaska=hc,v.geoModifiedStereographicGs48=nc,v.geoModifiedStereographicGs50=hf,v.geoModifiedStereographicMiller=ku,v.geoModifiedStereographicLee=dc,v.geoMollweide=ue,v.geoMollweideRaw=ge,v.geoMtFlatPolarParabolic=df,v.geoMtFlatPolarParabolicRaw=Zl,v.geoMtFlatPolarQuartic=Ic,v.geoMtFlatPolarQuarticRaw=Dc,v.geoMtFlatPolarSinusoidal=Rc,v.geoMtFlatPolarSinusoidalRaw=Vu,v.geoNaturalEarth2=vf,v.geoNaturalEarth2Raw=Lu,v.geoNellHammer=Fc,v.geoNellHammerRaw=sl,v.geoInterruptedQuarticAuthalic=vc,v.geoNicolosi=Hu,v.geoNicolosiRaw=zc,v.geoPatterson=Yu,v.geoPattersonRaw=pf,v.geoPolyconic=Kc,v.geoPolyconicRaw=pc,v.geoPolyhedral=yu,v.geoPolyhedralButterfly=Du,v.geoPolyhedralCollignon=Qc,v.geoPolyhedralWaterman=ef,v.geoProject=mf,v.geoGringortenQuincuncial=zt,v.geoPeirceQuincuncial=rr,v.geoPierceQuincuncial=rr,v.geoQuantize=Br,v.geoQuincuncial=ac,v.geoRectangularPolyconic=un,v.geoRectangularPolyconicRaw=wr,v.geoRobinson=Jn,v.geoRobinsonRaw=Vn,v.geoSatellite=Gn,v.geoSatelliteRaw=Pa,v.geoSinuMollweide=ws,v.geoSinuMollweideRaw=Oo,v.geoSinusoidal=gt,v.geoSinusoidalRaw=Ge,v.geoStitch=ps,v.geoTimes=Xo,v.geoTimesRaw=vi,v.geoTwoPointAzimuthal=Nl,v.geoTwoPointAzimuthalRaw=Ws,v.geoTwoPointAzimuthalUsa=Dl,v.geoTwoPointEquidistant=Al,v.geoTwoPointEquidistantRaw=Kl,v.geoTwoPointEquidistantUsa=Fu,v.geoVanDerGrinten=bu,v.geoVanDerGrintenRaw=zu,v.geoVanDerGrinten2=Oc,v.geoVanDerGrinten2Raw=ic,v.geoVanDerGrinten3=hu,v.geoVanDerGrinten3Raw=Zu,v.geoVanDerGrinten4=Ql,v.geoVanDerGrinten4Raw=Jl,v.geoWagner=Ff,v.geoWagner7=xc,v.geoWagnerRaw=rf,v.geoWagner4=nf,v.geoWagner4Raw=Bu,v.geoWagner6=wu,v.geoWagner6Raw=jc,v.geoWiechel=Ul,v.geoWiechelRaw=jl,v.geoWinkel3=eu,v.geoWinkel3Raw=Ci,Object.defineProperty(v,"__esModule",{value:!0})})}}),K8=Ee({"src/plots/geo/zoom.js"(J,V){"use strict";var v=Hn(),x=Vr(),E=Ri(),k=Math.PI/180,l=180/Math.PI,e={cursor:"pointer"},t={cursor:"auto"};function a(A,b){var z=A.projection,I;return b._isScoped?I=o:b._isClipped?I=c:I=s,I(A,z)}V.exports=a;function r(A,b){return v.behavior.zoom().translate(b.translate()).scaleExtent(b.scaleExtent()).scale(b.scale())}function n(A,b,z){var I=A.id,N=A.graphDiv,R=N.layout,B=R[I],F=N._fullLayout,P=F[I],j={},U={};function Z(Q,re){j[I+"."+Q]=x.nestedProperty(B,Q).get(),E.call("_storeDirectGUIEdit",R,F._preGUI,j);var ae=x.nestedProperty(P,Q);ae.get()!==re&&(ae.set(re),x.nestedProperty(B,Q).set(re),U[I+"."+Q]=re)}z(Z),Z("projection.scale",b.scale()/A.fitScale),Z("fitbounds",!1),N.emit("plotly_relayout",U)}function o(A,b){var z=r(A,b);function I(){v.select(this).style(e)}function N(){b.scale(v.event.scale).translate(v.event.translate),A.render(!0);var F=b.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":b.scale()/A.fitScale,"geo.center.lon":F[0],"geo.center.lat":F[1]})}function R(F){var P=b.invert(A.midPt);F("center.lon",P[0]),F("center.lat",P[1])}function B(){v.select(this).style(t),n(A,b,R)}return z.on("zoomstart",I).on("zoom",N).on("zoomend",B),z}function s(A,b){var z=r(A,b),I=2,N,R,B,F,P,j,U,Z,Q;function re(G){return b.invert(G)}function ae(G){var Y=re(G);if(!Y)return!0;var q=b(Y);return Math.abs(q[0]-G[0])>I||Math.abs(q[1]-G[1])>I}function oe(){v.select(this).style(e);let{x:G,y:Y,width:q,height:$}=this.getBBox();N=v.event.sourceEvent?v.mouse(this):[G+q/2,Y+$/2],R=b.rotate(),B=b.translate(),F=R,P=re(N)}function H(){let{x:G,y:Y,width:q,height:$}=this.getBBox();if(j=v.event.sourceEvent?v.mouse(this):[G+q/2,Y+$/2],ae(N)){z.scale(b.scale()),z.translate(b.translate());return}b.scale(v.event.scale),b.translate([B[0],v.event.translate[1]]),P?re(j)&&(Z=re(j),U=[F[0]+(Z[0]-P[0]),R[1],R[2]],b.rotate(U),F=U):(N=j,P=re(N)),Q=!0,A.render(!0);var ee=b.rotate(),ne=b.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":b.scale()/A.fitScale,"geo.center.lon":ne[0],"geo.center.lat":ne[1],"geo.projection.rotation.lon":-ee[0]})}function X(){v.select(this).style(t),Q&&n(A,b,K)}function K(G){var Y=b.rotate(),q=b.invert(A.midPt);G("projection.rotation.lon",-Y[0]),G("center.lon",q[0]),G("center.lat",q[1])}return z.on("zoomstart",oe).on("zoom",H).on("zoomend",X),z}function c(A,b){var z={r:b.rotate(),k:b.scale()},I=r(A,b),N=u(I,"zoomstart","zoom","zoomend"),R=0,B=I.on,F;I.on("zoomstart",function(){v.select(this).style(e);let{x:Q,y:re,width:ae,height:oe}=this.getBBox(),H=v.event.sourceEvent?v.mouse(this):[Q+ae/2,re+oe/2],X=b.rotate(),K=X,G=b.translate(),Y=h(X);F=m(b,H),B.call(I,"zoom",function(){let{x:q,y:$,width:ee,height:ne}=this.getBBox(),fe=v.event.sourceEvent?v.mouse(this):[q+ee/2,$+ne/2];if(b.scale(z.k=v.event.scale),!F)H=fe,F=m(b,H);else if(m(b,fe)){b.rotate(X).translate(G);var ye=m(b,fe),xe=g(F,ye),Ae=C(p(Y,xe)),Me=z.r=i(Ae,F,K);(!isFinite(Me[0])||!isFinite(Me[1])||!isFinite(Me[2]))&&(Me=K),b.rotate(Me),K=Me}j(N.of(this,arguments))}),P(N.of(this,arguments))}).on("zoomend",function(){v.select(this).style(t),B.call(I,"zoom",null),U(N.of(this,arguments)),n(A,b,Z)}).on("zoom.redraw",function(){A.render(!0);var Q=b.rotate();A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":b.scale()/A.fitScale,"geo.projection.rotation.lon":-Q[0],"geo.projection.rotation.lat":-Q[1]})});function P(Q){R++||Q({type:"zoomstart"})}function j(Q){Q({type:"zoom"})}function U(Q){--R||Q({type:"zoomend"})}function Z(Q){var re=b.rotate();Q("projection.rotation.lon",-re[0]),Q("projection.rotation.lat",-re[1])}return v.rebind(I,N,"on")}function m(A,b){var z=A.invert(b);return z&&isFinite(z[0])&&isFinite(z[1])&&_(z)}function h(A){var b=.5*A[0]*k,z=.5*A[1]*k,I=.5*A[2]*k,N=Math.sin(b),R=Math.cos(b),B=Math.sin(z),F=Math.cos(z),P=Math.sin(I),j=Math.cos(I);return[R*F*j+N*B*P,N*F*j-R*B*P,R*B*j+N*F*P,R*F*P-N*B*j]}function p(A,b){var z=A[0],I=A[1],N=A[2],R=A[3],B=b[0],F=b[1],P=b[2],j=b[3];return[z*B-I*F-N*P-R*j,z*F+I*B+N*j-R*P,z*P-I*j+N*B+R*F,z*j+I*P-N*F+R*B]}function g(A,b){if(!(!A||!b)){var z=f(A,b),I=Math.sqrt(T(z,z)),N=.5*Math.acos(Math.max(-1,Math.min(1,T(A,b)))),R=Math.sin(N)/I;return I&&[Math.cos(N),z[2]*R,-z[1]*R,z[0]*R]}}function i(A,b,z){var I=M(b,2,A[0]);I=M(I,1,A[1]),I=M(I,0,A[2]-z[2]);var N=b[0],R=b[1],B=b[2],F=I[0],P=I[1],j=I[2],U=Math.atan2(R,N)*l,Z=Math.sqrt(N*N+R*R),Q,re;Math.abs(P)>Z?(re=(P>0?90:-90)-U,Q=0):(re=Math.asin(P/Z)*l-U,Q=Math.sqrt(Z*Z-P*P));var ae=180-re-2*U,oe=(Math.atan2(j,F)-Math.atan2(B,Q))*l,H=(Math.atan2(j,F)-Math.atan2(B,-Q))*l,X=w(z[0],z[1],re,oe),K=w(z[0],z[1],ae,H);return X<=K?[re,oe,z[2]]:[ae,H,z[2]]}function w(A,b,z,I){var N=S(z-A),R=S(I-b);return Math.sqrt(N*N+R*R)}function S(A){return(A%360+540)%360-180}function M(A,b,z){var I=z*k,N=A.slice(),R=b===0?1:0,B=b===2?1:2,F=Math.cos(I),P=Math.sin(I);return N[R]=A[R]*F-A[B]*P,N[B]=A[B]*F+A[R]*P,N}function C(A){return[Math.atan2(2*(A[0]*A[1]+A[2]*A[3]),1-2*(A[1]*A[1]+A[2]*A[2]))*l,Math.asin(Math.max(-1,Math.min(1,2*(A[0]*A[2]-A[3]*A[1]))))*l,Math.atan2(2*(A[0]*A[3]+A[1]*A[2]),1-2*(A[2]*A[2]+A[3]*A[3]))*l]}function _(A){var b=A[0]*k,z=A[1]*k,I=Math.cos(z);return[I*Math.cos(b),I*Math.sin(b),Math.sin(z)]}function T(A,b){for(var z=0,I=0,N=A.length;I0&&Z._module.calcGeoJSON(U,B)}if(!F){var Q=this.updateProjection(R,B);if(Q)return;(!this.viewInitial||this.scope!==P.scope)&&this.saveViewInitial(P)}this.scope=P.scope,this.updateBaseLayers(B,P),this.updateDims(B,P),this.updateFx(B,P),s.generalUpdatePerTraceModule(this.graphDiv,this,R,P);var re=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=re.selectAll(".point"),this.dataPoints.text=re.selectAll("text"),this.dataPaths.line=re.selectAll(".js-line");var ae=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ae.selectAll("path"),this._render()},b.updateProjection=function(R,B){var F=this.graphDiv,P=B[this.id],j=B._size,U=P.domain,Z=P.projection,Q=P.lonaxis,re=P.lataxis,ae=Q._ax,oe=re._ax,H=this.projection=z(P),X=[[j.l+j.w*U.x[0],j.t+j.h*(1-U.y[1])],[j.l+j.w*U.x[1],j.t+j.h*(1-U.y[0])]],K=P.center||{},G=Z.rotation||{},Y=Q.range||[],q=re.range||[];if(P.fitbounds){ae._length=X[1][0]-X[0][0],oe._length=X[1][1]-X[0][1],ae.range=h(F,ae),oe.range=h(F,oe);let ve=[];for(let Kt of R){let nr=Kt[0].trace;nr.visible===!0&&nr._module.fitCoords&&ve.push(nr._module.fitCoords(Kt,P))}let se=m(F,ae),Te=se.min.reduce((Kt,{val:nr})=>Math.min(Kt,nr),1/0),We=se.max.reduce((Kt,{val:nr})=>Math.max(Kt,nr),-1/0)-Te,Ge=_.boundsOfCoords(ve.flat()),[gt,,mt]=Ge||[],Tt=mt-gt;if(!!Ge&&(We>360||We<360&&TtMath.max(ht,Kt(Re)),0),Zt=se.max.reduce((ht,Re)=>Math.max(ht,nr(Re)),0),sr=ae._length-_r-Zt,Ot=sr>ae._length/10?Tt*ae._length/sr:Tt,vt=(gt+mt)/2;ae.range=[vt-Ot/2,vt+Ot/2]}var $=(ae.range[0]+ae.range[1])/2,ee=(oe.range[0]+oe.range[1])/2;if(P._isScoped)K={lon:$,lat:ee};else if(P._isClipped){K={lon:$,lat:ee},G={lon:$,lat:ee,roll:G.roll};var ne=Z.type,fe=C.lonaxisSpan[ne]/2||180,ye=C.lataxisSpan[ne]/2||90;Y=[$-fe,$+fe],q=[ee-ye,ee+ye]}else K={lon:$,lat:ee},G={lon:$,lat:G.lat,roll:G.roll}}H.center([K.lon-G.lon,K.lat-G.lat]).rotate([-G.lon,-G.lat,G.roll]).parallels(Z.parallels);var xe=N(Y,q);H.fitExtent(X,xe);var Ae=this.bounds=H.getBounds(xe),Me=this.fitScale=H.scale(),Ie=H.translate();if(H.scaleExtent=()=>{var ve;let{minscale:se}=Z,Te=(ve=Z.maxscale)!=null?ve:1/0;return[Me*Math.min(se,Te),Me*Math.max(se,Te)]},P.fitbounds){var Ue=H.getBounds(N(ae.range,oe.range)),qe=Math.min((Ae[1][0]-Ae[0][0])/(Ue[1][0]-Ue[0][0]),(Ae[1][1]-Ae[0][1])/(Ue[1][1]-Ue[0][1]));isFinite(qe)?H.scale(qe*Me):t.warn("Something went wrong during"+this.id+"fitbounds computations.")}else H.scale(Z.scale*Me);var ke=this.midPt=[(Ae[0][0]+Ae[1][0])/2,(Ae[0][1]+Ae[1][1])/2];if(H.translate([Ie[0]+(ke[0]-Ie[0]),Ie[1]+(ke[1]-Ie[1])]).clipExtent(Ae),P._isAlbersUsa){var ge=H([K.lon,K.lat]);if(ge){var ue=H.translate();H.translate([ue[0]-(ge[0]-ue[0]),ue[1]-(ge[1]-ue[1])])}}},b.updateBaseLayers=function(R,B){var F=this,P=F.topojson,j=F.layers,U=F.basePaths;function Z(X){return X==="lonaxis"||X==="lataxis"}function Q(X){return!!C.lineLayers[X]}function re(X){return!!C.fillLayers[X]}var ae=this.hasChoropleth?C.layersForChoropleth:C.layers,oe=ae.filter(function(X){return Q(X)||re(X)?B["show"+X]:Z(X)?B[X].showgrid:!0}),H=F.framework.selectAll(".layer").data(oe,String);H.exit().each(function(X){delete j[X],delete U[X],v.select(this).remove()}),H.enter().append("g").attr("class",function(X){return"layer "+X}).each(function(X){var K=j[X]=v.select(this);X==="bg"?F.bgRect=K.append("rect").style("pointer-events","all"):Z(X)?U[X]=K.append("path").style("fill","none"):X==="backplot"?K.append("g").classed("choroplethlayer",!0):X==="frontplot"?K.append("g").classed("scatterlayer",!0):Q(X)?U[X]=K.append("path").style("fill","none").style("stroke-miterlimit",2):re(X)&&(U[X]=K.append("path").style("stroke","none"))}),H.order(),H.each(function(X){var K=U[X],G=C.layerNameToAdjective[X];X==="frame"?K.datum(C.sphereSVG):Q(X)||re(X)?K.datum(u(P,P.objects[X])):Z(X)&&K.datum(I(X,B,R)).call(r.stroke,B[X].gridcolor).call(n.dashLine,B[X].griddash,B[X].gridwidth),Q(X)?K.call(r.stroke,B[G+"color"]).call(n.dashLine,"",B[G+"width"]):re(X)&&K.call(r.fill,B[G+"color"])})},b.updateDims=function(R,B){var F=this.bounds,P=(B.framewidth||0)/2,j=F[0][0]-P,U=F[0][1]-P,Z=F[1][0]-j+P,Q=F[1][1]-U+P;n.setRect(this.clipRect,j,U,Z,Q),this.bgRect.call(n.setRect,j,U,Z,Q).call(r.fill,B.bgcolor),this.xaxis._offset=j,this.xaxis._length=Z,this.yaxis._offset=U,this.yaxis._length=Q},b.updateFx=function(R,B){var F=this,P=F.graphDiv,j=F.bgRect,U=R.dragmode,Z=R.clickmode;if(F.isStatic)return;function Q(){var H=F.viewInitial,X={};for(var K in H)X[F.id+"."+K]=H[K];e.call("_guiRelayout",P,X),P.emit("plotly_doubleclick",null)}function re(H){return F.projection.invert([H[0]+F.xaxis._offset,H[1]+F.yaxis._offset])}var ae=function(H,X){if(X.isRect){var K=H.range={};K[F.id]=[re([X.xmin,X.ymin]),re([X.xmax,X.ymax])]}else{var G=H.lassoPoints={};G[F.id]=X.map(re)}},oe={element:F.bgRect.node(),gd:P,plotinfo:{id:F.id,xaxis:F.xaxis,yaxis:F.yaxis,fillRangeItems:ae},xaxes:[F.xaxis],yaxes:[F.yaxis],subplot:F.id,clickFn:function(H){H===2&&w(P)}};if(U==="pan"){j.node().onmousedown=null;let H=M(F,B);if(j.call(H),!v.event){let X=F.projection.scale(),[K,G]=F.projection.scaleExtent();(XG)&&H.event(j)}j.on("dblclick.zoom",Q),P._context._scrollZoom.geo||j.on("wheel.zoom",null)}else(U==="select"||U==="lasso")&&(j.on(".zoom",null),oe.prepFn=function(H,X,K){i(H,X,K,oe,U)},g.init(oe));j.on("mousemove",function(){var H=F.projection.invert(t.getPositionFromD3Event());if(!H)return g.unhover(P,v.event);F.xaxis.p2c=function(){return H[0]},F.yaxis.p2c=function(){return H[1]},o.hover(P,v.event,F.id)}),j.on("mouseout",function(){P._dragging||g.unhover(P,v.event)}),j.on("click",function(){U!=="select"&&U!=="lasso"&&(Z.indexOf("select")>-1&&S(v.event,P,[F.xaxis],[F.yaxis],F.id,oe),Z.indexOf("event")>-1&&o.click(P,v.event))})},b.makeFramework=function(){var R=this,B=R.graphDiv,F=B._fullLayout,P="clip"+F._uid+R.id;R.clipDef=F._clips.append("clipPath").attr("id",P),R.clipRect=R.clipDef.append("rect"),R.framework=v.select(R.container).append("g").attr("class","geo "+R.id).call(n.setClipUrl,P,B),R.project=function(j){var U=R.projection(j);return U?[U[0]-R.xaxis._offset,U[1]-R.yaxis._offset]:[null,null]},R.xaxis={_id:"x",c2p:function(j){return R.project(j)[0]}},R.yaxis={_id:"y",c2p:function(j){return R.project(j)[1]}},R.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(R.mockAxis,F)},b.saveViewInitial=function(R){var B=R.center||{},F=R.projection,P=F.rotation||{};this.viewInitial={fitbounds:R.fitbounds,"projection.scale":F.scale};var j;R._isScoped?j={"center.lon":B.lon,"center.lat":B.lat}:R._isClipped?j={"projection.rotation.lon":P.lon,"projection.rotation.lat":P.lat,"center.lon":B.lon,"center.lat":B.lat}:j={"center.lon":B.lon,"center.lat":B.lat,"projection.rotation.lon":P.lon},t.extendFlat(this.viewInitial,j)},b.render=function(R){this._hasMarkerAngles&&R?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},b._render=function(){var R=this.projection,B=R.getPath(),F;function P(U){var Z=R(U.lonlat);return Z?a(Z[0],Z[1]):null}function j(U){return R.isLonLatOverEdges(U.lonlat)?"none":null}for(F in this.basePaths)this.basePaths[F].attr("d",B);for(F in this.dataPaths)this.dataPaths[F].attr("d",function(U){return B(U.geojson)});for(F in this.dataPoints)this.dataPoints[F].attr("display",j).attr("transform",P)};function z(R){var B=R.projection,F=B.type,P=C.projNames[F];P="geo"+t.titleCase(P);for(var j=x[P]||l[P],U=j(),Z=R._isSatellite?Math.acos(1/B.distance)*180/Math.PI:R._isClipped?C.lonaxisSpan[F]/2:null,Q=["center","rotate","parallels","clipExtent"],re=function(H){return H?U:[]},ae=0;aeG}else return!1},U.getPath=function(){return E().projection(U)},U.getBounds=function(H){return U.getPath().bounds(H)},U.precision(C.precision),R._isSatellite&&U.tilt(B.tilt).distance(B.distance),Z&&U.clipAngle(Z-C.clipPad),U}function I(R,B,F){var P=1e-6,j=2.5,U=B[R],Z=C.scopeDefaults[B.scope],Q,re,ae;R==="lonaxis"?(Q=Z.lonaxisRange,re=Z.lataxisRange,ae=function(ee,ne){return[ee,ne]}):R==="lataxis"&&(Q=Z.lataxisRange,re=Z.lonaxisRange,ae=function(ee,ne){return[ne,ee]});var oe={type:"linear",range:[Q[0],Q[1]-P],tick0:U.tick0,dtick:U.dtick};c.setConvert(oe,F);var H=c.calcTicks(oe);!B.isScoped&&R==="lonaxis"&&H.pop();for(var X=H.length,K=new Array(X),G=0;Gfe[ye]!=null)||l.fitboundsIncompatible.has(i)?n.fitbounds=!1:ee.forEach(({dst:fe,key:ye})=>fe&&(fe[ye]=null))}}}}),vw=Ee({"src/plots/geo/index.js"(J,V){"use strict";var v=uf().getSubplotCalcData,x=Vr().counterRegex,E=J8(),k="geo",l=x(k),e={};e[k]={valType:"subplotid",dflt:k,editType:"calc"};function t(n){for(var o=n._fullLayout,s=n.calcdata,c=o._subplots[k],m=0;m")}}}}),gw=Ee({"src/traces/choropleth/event_data.js"(J,V){"use strict";V.exports=function(x,E,k,l,e){x.location=E.location,x.z=E.z;var t=l[e];return t.fIn&&t.fIn.properties&&(x.properties=t.fIn.properties),x.ct=t.ct,x}}}),yw=Ee({"src/traces/choropleth/select.js"(J,V){"use strict";V.exports=function(x,E){var k=x.cd,l=x.xaxis,e=x.yaxis,t=[],a,r,n,o,s;if(E===!1)for(a=0;a=Math.min(U,Z)&&g<=Math.max(U,Z)?0:1/0}if(I=Math.min(Q,re)&&i<=Math.max(Q,re)?0:1/0}B=Math.sqrt(I*I+N*N),u=S[z]}}}else for(z=S.length-1;z>-1;z--)f=S[z],A=h[f],b=p[f],I=c.c2p(A)-g,N=m.c2p(b)-i,R=Math.sqrt(I*I+N*N),R100},J.isDotSymbol=function(v){return typeof v=="string"?V.DOT_RE.test(v):v>200}}}),i7=Ee({"src/traces/scattergl/defaults.js"(J,V){"use strict";var v=Vr(),x=Ri(),E=By(),k=Rm(),l=Wh(),e=al(),t=Dv(),a=Ih(),r=gh(),n=Rh(),o=Xh(),s=Fh();V.exports=function(m,h,p,g){function i(u,A){return v.coerce(m,h,k,u,A)}var w=m.marker?E.isOpenSymbol(m.marker.symbol):!1,S=e.isBubble(m),M=t(m,h,g,i);if(!M){h.visible=!1;return}a(m,h,g,i),i("xhoverformat"),i("yhoverformat");var C=M>>1,m=t[c],h=r!==void 0?r(m,a):m-a;h>=0?(s=c,o=c-1):n=c+1}return s}function x(t,a,r,n,o){for(var s=o+1;n<=o;){var c=n+o>>>1,m=t[c],h=r!==void 0?r(m,a):m-a;h>0?(s=c,o=c-1):n=c+1}return s}function E(t,a,r,n,o){for(var s=n-1;n<=o;){var c=n+o>>>1,m=t[c],h=r!==void 0?r(m,a):m-a;h<0?(s=c,n=c+1):o=c-1}return s}function k(t,a,r,n,o){for(var s=n-1;n<=o;){var c=n+o>>>1,m=t[c],h=r!==void 0?r(m,a):m-a;h<=0?(s=c,n=c+1):o=c-1}return s}function l(t,a,r,n,o){for(;n<=o;){var s=n+o>>>1,c=t[s],m=r!==void 0?r(c,a):c-a;if(m===0)return s;m<=0?n=s+1:o=s-1}return-1}function e(t,a,r,n,o,s){return typeof r=="function"?s(t,a,r,n===void 0?0:n|0,o===void 0?t.length-1:o|0):s(t,a,void 0,r===void 0?0:r|0,n===void 0?t.length-1:n|0)}V.exports={ge:function(t,a,r,n,o){return e(t,a,r,n,o,v)},gt:function(t,a,r,n,o){return e(t,a,r,n,o,x)},lt:function(t,a,r,n,o){return e(t,a,r,n,o,E)},le:function(t,a,r,n,o){return e(t,a,r,n,o,k)},eq:function(t,a,r,n,o){return e(t,a,r,n,o,l)}}}}),_w=Ee({"node_modules/clamp/index.js"(J,V){V.exports=v;function v(x,E,k){return Ek?k:x:xE?E:x}}}),Jh=Ee({"node_modules/pick-by-alias/index.js"(J,V){"use strict";V.exports=function(k,l,e){var t={},a,r;if(typeof l=="string"&&(l=x(l)),Array.isArray(l)){var n={};for(r=0;r1&&(E=arguments),typeof E=="string"?E=E.split(/\s/).map(parseFloat):typeof E=="number"&&(E=[E]),E.length&&typeof E[0]=="number"?E.length===1?k={width:E[0],height:E[0],x:0,y:0}:E.length===2?k={width:E[0],height:E[1],x:0,y:0}:k={x:E[0],y:E[1],width:E[2]-E[0]||0,height:E[3]-E[1]||0}:E&&(E=v(E,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),k={x:E.left||0,y:E.top||0},E.width==null?E.right?k.width=E.right-k.x:k.width=0:k.width=E.width,E.height==null?E.bottom?k.height=E.bottom-k.y:k.height=0:k.height=E.height),k}}}),Jv=Ee({"node_modules/array-bounds/index.js"(J,V){"use strict";V.exports=v;function v(x,E){if(!x||x.length==null)throw Error("Argument should be an array");E==null?E=1:E=Math.floor(E);for(var k=Array(E*2),l=0;le&&(e=x[a]),x[a]>>1,S;h.dtype||(h.dtype="array"),typeof h.dtype=="string"?S=new(r(h.dtype))(w):h.dtype&&(S=h.dtype,Array.isArray(S)&&(S.length=w));for(let I=0;Ip||P>o){for(let Y=0;Yne||Z>fe||Q=ae||$===ee)return;let ye=M[q];ee===void 0&&(ee=ye.length);for(let ue=$;ue=B&&se<=P&&Te>=F&&Te<=j&&oe.push(ve)}let xe=C[q],Ae=xe[$*4+0],Me=xe[$*4+1],Ie=xe[$*4+2],Ue=xe[$*4+3],qe=X(xe,$+1),ke=Y*.5,ge=q+1;H(K,G,ke,ge,Ae,Me||Ie||Ue||qe),H(K,G+ke,ke,ge,Me,Ie||Ue||qe),H(K+ke,G,ke,ge,Ie,Ue||qe),H(K+ke,G+ke,ke,ge,Ue,qe)}function X(K,G){let Y=null,q=0;for(;Y===null;)if(Y=K[G*4+q],q++,q>K.length)return null;return Y}return oe}function b(I,N,R,B,F){let P=[];for(let j=0;j2&&(t.push([r].concat(n.splice(0,2))),o="l",r=r=="m"?"l":"L");;){if(n.length==v[o])return n.unshift(r),t.push(n);if(n.length1&&(m=1),m<-1&&(m=-1),c*Math.acos(m)},e=function(r,n,o,s,c,m,h,p,g,i,w,S){var M=Math.pow(c,2),C=Math.pow(m,2),_=Math.pow(w,2),T=Math.pow(S,2),f=M*C-M*T-C*_;f<0&&(f=0),f/=M*T+C*_,f=Math.sqrt(f)*(h===p?-1:1);var u=f*c/m*S,A=f*-m/c*w,b=i*u-g*A+(r+o)/2,z=g*u+i*A+(n+s)/2,I=(w-u)/c,N=(S-A)/m,R=(-w-u)/c,B=(-S-A)/m,F=l(1,0,I,N),P=l(I,N,R,B);return p===0&&P>0&&(P-=x),p===1&&P<0&&(P+=x),[b,z,F,P]},t=function(r){var n=r.px,o=r.py,s=r.cx,c=r.cy,m=r.rx,h=r.ry,p=r.xAxisRotation,g=p===void 0?0:p,i=r.largeArcFlag,w=i===void 0?0:i,S=r.sweepFlag,M=S===void 0?0:S,C=[];if(m===0||h===0)return[];var _=Math.sin(g*x/360),T=Math.cos(g*x/360),f=T*(n-s)/2+_*(o-c)/2,u=-_*(n-s)/2+T*(o-c)/2;if(f===0&&u===0)return[];m=Math.abs(m),h=Math.abs(h);var A=Math.pow(f,2)/Math.pow(m,2)+Math.pow(u,2)/Math.pow(h,2);A>1&&(m*=Math.sqrt(A),h*=Math.sqrt(A));var b=e(n,o,s,c,m,h,w,M,_,T,f,u),z=v(b,4),I=z[0],N=z[1],R=z[2],B=z[3],F=Math.abs(B)/(x/4);Math.abs(1-F)<1e-7&&(F=1);var P=Math.max(Math.ceil(F),1);B/=P;for(var j=0;j4?(a=i[i.length-4],r=i[i.length-3]):(a=m,r=h),t.push(i)}return t}function E(l,e,t,a){return["C",l,e,t,a,t,a]}function k(l,e,t,a,r,n){return["C",l/3+2/3*t,e/3+2/3*a,r/3+2/3*t,n/3+2/3*a,r,n]}}}),bw=Ee({"node_modules/is-svg-path/index.js"(J,V){"use strict";V.exports=function(x){return typeof x!="string"?!1:(x=x.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(x)&&/[\dz]$/i.test(x)&&x.length>4))}}}),m7=Ee({"node_modules/svg-path-bounds/index.js"(J,V){"use strict";var v=h7(),x=d7(),E=p7(),k=bw();V.exports=l;function l(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!k(e))throw Error("String is not an SVG path.");e=v(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=x(e),e=E(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],a=0,r=e.length;at[2]&&(t[2]=n[o+0]),n[o+1]>t[3]&&(t[3]=n[o+1]);return t}}}),g7=Ee({"node_modules/bitmap-sdf/index.js"(J,V){"use strict";V.exports=x;var v=1e20;function x(l,e){e||(e={});var t=e.cutoff==null?.25:e.cutoff,a=e.radius==null?8:e.radius,r=e.channel||0,n,o,s,c,m,h,p,g,i,w,S;if(ArrayBuffer.isView(l)||Array.isArray(l)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");n=e.width,o=e.height,c=l,e.stride?h=e.stride:h=Math.floor(l.length/n/o)}else window.HTMLCanvasElement&&l instanceof window.HTMLCanvasElement?(g=l,p=g.getContext("2d"),n=g.width,o=g.height,i=p.getImageData(0,0,n,o),c=i.data,h=4):window.CanvasRenderingContext2D&&l instanceof window.CanvasRenderingContext2D?(g=l.canvas,p=l,n=g.width,o=g.height,i=p.getImageData(0,0,n,o),c=i.data,h=4):window.ImageData&&l instanceof window.ImageData&&(i=l,n=l.width,o=l.height,c=i.data,h=4);if(s=Math.max(n,o),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(m=c,c=Array(n*o),w=0,S=Math.floor(m.length/h);wy7});function y7(J,V={}){if(!(0,Tw.default)(J))throw Error("Invalid SVG path");let v,x;V.shape||Array.isArray(V)?[v,x]=V.shape||V:(v=Fm.width=V.width||V.w||200,x=Fm.height=V.height||V.h||200);let E=Math.min(v,x),k=V.stroke||0,l=V.viewbox||V.viewBox||(0,ww.default)(J),e=[v/(l[2]-l[0]),x/(l[3]-l[1])],t=Math.min(e[0]||0,e[1]||0)/2;hh.fillStyle="black",hh.fillRect(0,0,v,x),hh.fillStyle="white",k&&(typeof k!="number"&&(k=1),hh.strokeStyle=k>0?"white":"black",hh.lineWidth=Math.abs(k)),hh.translate(v*.5,x*.5),hh.scale(t,t);let a=new Path2D(J);return hh.fill(a),k&&hh.stroke(a),hh.setTransform(1,0,0,1,0,0),(0,Aw.default)(hh,{cutoff:V.cutoff!=null?V.cutoff:.5,radius:V.radius!=null?V.radius:E*.5})}var ww,Tw,Aw,Fm,hh,_7=In({"node_modules/svg-path-sdf/svg-path-sdf.js"(){ww=Yn(m7()),Tw=Yn(bw()),Aw=Yn(g7()),Fm=document.createElement("canvas"),hh=Fm.getContext("2d",{willReadFrequently:!0})}}),ep=Ee({"src/traces/scattergl/convert.js"(J,V){"use strict";var v=mi(),x=(_7(),ra(xw)).default,{normalize:E}=Qa(),k=Ri(),l=Vr(),e=l.isArrayOrTypedArray,t=yo(),a=Xl(),r=Ad().formatColor,n=al(),o=U0(),s=By(),c=sv(),m=gd().DESELECTDIM,h={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},p=Qf().appendArrayPointValue;function g(B,F){var P,j={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},U=B._context.plotGlPixelRatio;if(F.visible!==!0)return j;if(n.hasText(F)&&(j.text=i(B,F),j.textSel=C(B,F,F.selected),j.textUnsel=C(B,F,F.unselected)),n.hasMarkers(F)&&(j.marker=S(B,F),j.markerSel=M(B,F,F.selected),j.markerUnsel=M(B,F,F.unselected),!F.unselected&&e(F.marker.opacity))){var Z=F.marker.opacity;for(j.markerUnsel.opacity=new Array(Z.length),P=0;P500?"bold":"normal":B}function S(B,F){var P=F._length,j=F.marker,U={},Z,Q=e(j.symbol),re=e(j.angle),ae=e(j.color),oe=e(j.line.color),H=e(j.opacity),X=e(j.size),K=e(j.line.width),G;if(Q||(G=s.isOpenSymbol(j.symbol)),Q||ae||oe||H||re){U.symbols=new Array(P),U.angles=new Array(P),U.colors=new Array(P),U.borderColors=new Array(P);var Y=j.symbol,q=j.angle,$=r(j,j.opacity,P),ee=r(j.line,j.opacity,P);if(!e(ee[0])){var ne=ee;for(ee=Array(P),Z=0;Zc.TOO_MANY_POINTS||n.hasMarkers(F)?"rect":"round";if(oe&&F.connectgaps){var X=Z[0],K=Z[1];for(Q=0;Q1?ae[Q]:ae[0]:ae,G=e(oe)?oe.length>1?oe[Q]:oe[0]:oe,Y=h[K],q=h[G],$=H?H/.8+1:0,ee=-q*$-q*.5;Z.offset[Q]=[Y*$/X,ee/X]}}return Z}V.exports={style:g,markerStyle:S,markerSelection:M,linePositions:I,errorBarPositions:N,textPosition:R}}}),Mw=Ee({"src/traces/scattergl/scene_update.js"(J,V){"use strict";var v=Vr();V.exports=function(E,k){var l=k._scene,e={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},t={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return k._scene||(l=k._scene={},l.init=function(){v.extendFlat(l,t,e)},l.init(),l.update=function(r){var n=v.repeat(r,l.count);if(l.fill2d&&l.fill2d.update(n),l.scatter2d&&l.scatter2d.update(n),l.line2d&&l.line2d.update(n),l.error2d&&l.error2d.update(n.concat(n)),l.select2d&&l.select2d.update(n),l.glText)for(var o=0;o=m,u=T*2,A={},b,z=M.makeCalcdata(w,"x"),I=C.makeCalcdata(w,"y"),N=l(w,M,"x",z),R=l(w,C,"y",I),B=N.vals,F=R.vals;w._x=B,w._y=F,w.xperiodalignment&&(w._origX=z,w._xStarts=N.starts,w._xEnds=N.ends),w.yperiodalignment&&(w._origY=I,w._yStarts=R.starts,w._yEnds=R.ends);var P=new Array(u),j=new Array(T);for(b=0;b1&&x.extendFlat(_.line,o.linePositions(g,w,S)),_.errorX||_.errorY){var T=o.errorBarPositions(g,w,S,M,C);_.errorX&&x.extendFlat(_.errorX,T.x),_.errorY&&x.extendFlat(_.errorY,T.y)}return _.text&&(x.extendFlat(_.text,{positions:S},o.textPosition(g,w,_.text,_.marker)),x.extendFlat(_.textSel,{positions:S},o.textPosition(g,w,_.text,_.markerSel)),x.extendFlat(_.textUnsel,{positions:S},o.textPosition(g,w,_.text,_.markerUnsel))),_}}}),Sw=Ee({"src/traces/scattergl/edit_style.js"(J,V){"use strict";var v=Vr(),x=Qa(),E=gd().DESELECTDIM;function k(l){var e=l[0],t=e.trace,a=e.t,r=a._scene,n=a.index,o=r.selectBatch[n],s=r.unselectBatch[n],c=r.textOptions[n],m=r.textSelectedOptions[n]||{},h=r.textUnselectedOptions[n]||{},p=v.extendFlat({},c),g,i;if(o.length||s.length){var w=m.color,S=h.color,M=c.color,C=v.isArrayOrTypedArray(M);for(p.color=new Array(t._length),g=0;g10&&/[0-9](?:\s|\/)/.test(k)&&(e=k.match(/([0-9]+)/g).map(function(m){return parseFloat(m)}),a=k.match(/([a-z])/ig).join("").toLowerCase());else isNaN(k)?Array.isArray(k)||k.length?(e=[k[0],k[1],k[2]],a="rgb",t=k.length===4?k[3]:1):k instanceof Object&&(k.r!=null||k.red!=null||k.R!=null?(a="rgb",e=[k.r||k.red||k.R||0,k.g||k.green||k.G||0,k.b||k.blue||k.B||0]):(a="hsl",e=[k.h||k.hue||k.H||0,k.s||k.saturation||k.S||0,k.l||k.lightness||k.L||k.b||k.brightness]),t=k.a||k.alpha||k.opacity||1,k.opacity!=null&&(t/=100)):(a="rgb",e=[k>>>16,(k&65280)>>>8,k&255]);return{space:a,values:e,alpha:t}}}}),A7=Ee({"node_modules/color-rgba/index.js"(J,V){"use strict";var v=T7();V.exports=function(k){Array.isArray(k)&&k.raw&&(k=String.raw.apply(null,arguments));var l,e,t,a=v(k);if(!a.space)return[];var r=[0,0,0],n=a.space[0]==="h"?[360,100,100]:[255,255,255];return l=Array(3),l[0]=Math.min(Math.max(a.values[0],r[0]),n[0]),l[1]=Math.min(Math.max(a.values[1],r[1]),n[1]),l[2]=Math.min(Math.max(a.values[2],r[2]),n[2]),a.space[0]==="h"&&(l=x(l)),l.push(Math.min(Math.max(a.alpha,0),1)),l};function x(E){var k=E[0]/360,l=E[1]/100,e=E[2]/100,t,a,r,n,o,s=0;if(l===0)return o=e*255,[o,o,o];for(a=e<.5?e*(1+l):e+l-e*l,t=2*e-a,n=[0,0,0];s<3;)r=k+1/3*-(s-1),r<0?r++:r>1&&r--,o=6*r<1?t+(a-t)*6*r:2*r<1?a:3*r<2?t+(a-t)*(2/3-r)*6:t,n[s++]=o*255;return n}}}),zm=Ee({"node_modules/color-normalize/index.js"(J,V){"use strict";var v=A7(),x=Ny();V.exports=function(l,e){(e==="float"||!e)&&(e="array"),e==="uint"&&(e="uint8"),e==="uint_clamped"&&(e="uint8_clamped");var t=x(e),a=new t(4),r=e!=="uint8"&&e!=="uint8_clamped";return(!l.length||typeof l=="string")&&(l=v(l),l[0]/=255,l[1]/=255,l[2]/=255),E(l)?(a[0]=l[0],a[1]=l[1],a[2]=l[2],a[3]=l[3]!=null?l[3]:255,r&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(r?(a[0]=l[0],a[1]=l[1],a[2]=l[2],a[3]=l[3]!=null?l[3]:1):(a[0]=Math.min(Math.max(Math.floor(l[0]*255),0),255),a[1]=Math.min(Math.max(Math.floor(l[1]*255),0),255),a[2]=Math.min(Math.max(Math.floor(l[2]*255),0),255),a[3]=l[3]==null?255:Math.min(Math.max(Math.floor(l[3]*255),0),255)),a)};function E(k){return!!(k instanceof Uint8Array||k instanceof Uint8ClampedArray||Array.isArray(k)&&(k[0]>1||k[0]===0)&&(k[1]>1||k[1]===0)&&(k[2]>1||k[2]===0)&&(!k[3]||k[3]>1))}}}),M7=Ee({"node_modules/color-id/index.js"(J,V){"use strict";var v=_w();V.exports=x,V.exports.to=x,V.exports.from=E;function x(k,l){l==null&&(l=!0);var e=k[0],t=k[1],a=k[2],r=k[3];r==null&&(r=l?1:255),l&&(e*=255,t*=255,a*=255,r*=255),e=v(e,0,255)&255,t=v(t,0,255)&255,a=v(a,0,255)&255,r=v(r,0,255)&255;var n=e*16777216+(t<<16)+(a<<8)+r;return n}function E(k,l){k=+k;var e=k>>>24,t=(k&16711680)>>>16,a=(k&65280)>>>8,r=k&255;return l===!1?[e,t,a,r]:[e/255,t/255,a/255,r/255]}}}),S7=Ee({"node_modules/glslify/browser.js"(J,V){V.exports=function(v){typeof v=="string"&&(v=[v]);for(var x=[].slice.call(arguments,1),E=[],k=0;k[this.tooManyColors?0:_,g.height],pixelRatio:m.context("pixelRatio"),scale:m.prop("scale"),scaleFract:m.prop("scaleFract"),translate:m.prop("translate"),translateFract:m.prop("translateFract"),markerTexture:m.prop("markerTexture"),paletteTexture:g},attributes:{x:(b,z)=>z.xAttr||{buffer:z.positionBuffer,stride:8,offset:0},y:(b,z)=>z.yAttr||{buffer:z.positionBuffer,stride:8,offset:4},xFract:(b,z)=>z.xAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:0},yFract:(b,z)=>z.yAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:4},size:(b,z)=>z.size.length?{buffer:z.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(z.size*255/this.maxSize)]},borderSize:(b,z)=>z.borderSize.length?{buffer:z.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(z.borderSize*255/this.maxSize)]},colorId:(b,z)=>z.color.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?i.slice(z.color*4,z.color*4+4):[z.color]},borderColorId:(b,z)=>z.borderColor.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?i.slice(z.borderColor*4,z.borderColor*4+4):[z.borderColor]},isActive:(b,z)=>z.activation===!0?{constant:[1]}:z.activation?z.activation:{constant:[0]}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:m.prop("viewport")},viewport:m.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:m.prop("elements"),count:m.prop("count"),offset:m.prop("offset"),primitive:"points"},u=Object.assign({},f);u.frag=l([`precision highp float; +`]);e.createShader=function(g){var f=n(g,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f.attributes.normal.location=2,f},e.createPickShader=function(g){var f=n(g,a,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f.attributes.normal.location=2,f},e.createContourShader=function(g){var f=n(g,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f},e.createPickContourShader=function(g){var f=n(g,s,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f}},9499(l,e,t){"use strict";l.exports=X;var n=t(8828),r=t(2762),a=t(8116),o=t(7766),s=t(1888),c=t(6729),g=t(5298),f=t(9994),p=t(9618),m=t(3711),i=t(6760),T=t(7608),S=t(2478),M=t(6199),C=t(990),_=C.createShader,w=C.createContourShader,h=C.createPickShader,u=C.createPickContourShader,A=4*10,b=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],z=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],I=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var q=0;q<3;++q){var W=I[q],ee=(q+1)%3,ae=(q+2)%3;W[ee+0]=1,W[ae+3]=1,W[q+6]=1}})();function N(q,W,ee,ae,fe){this.position=q,this.index=W,this.uv=ee,this.level=ae,this.dataCoordinate=fe}var R=256;function B(q,W,ee,ae,fe,ye,xe,Ae,Me,Ie,qe,je,ke,ge,le){this.gl=q,this.shape=W,this.bounds=ee,this.objectOffset=le,this.intensityBounds=[],this._shader=ae,this._pickShader=fe,this._coordinateBuffer=ye,this._vao=xe,this._colorMap=Ae,this._contourShader=Me,this._contourPickShader=Ie,this._contourBuffer=qe,this._contourVAO=je,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new N([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=ke,this._dynamicVAO=ge,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[p(s.mallocFloat(1024),[0,0]),p(s.mallocFloat(1024),[0,0]),p(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var F=B.prototype;F.genColormap=function(q,W){var ee=!1,ae=f([c({colormap:q,nshades:R,format:"rgba"}).map(function(fe,ye){var xe=W?P(ye/255,W):fe[3];return xe<1&&(ee=!0),[fe[0],fe[1],fe[2],255*xe]})]);return g.divseq(ae,255),this.hasAlphaScale=ee,ae},F.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},F.isOpaque=function(){return!this.isTransparent()},F.pickSlots=1,F.setPickBase=function(q){this.pickId=q};function P(q,W){if(!W||!W.length)return 1;for(var ee=0;eeq&&ee>0){var ae=(W[ee][0]-q)/(W[ee][0]-W[ee-1][0]);return W[ee][1]*(1-ae)+ae*W[ee-1][1]}}return 1}var j=[0,0,0],U={showSurface:!1,showContour:!1,projections:[b.slice(),b.slice(),b.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function Z(q,W){var ee,ae,fe,ye=W.axes&&W.axes.lastCubeProps.axis||j,xe=W.showSurface,Ae=W.showContour;for(ee=0;ee<3;++ee)for(xe=xe||W.surfaceProject[ee],ae=0;ae<3;++ae)Ae=Ae||W.contourProject[ee][ae];for(ee=0;ee<3;++ee){var Me=U.projections[ee];for(ae=0;ae<16;++ae)Me[ae]=0;for(ae=0;ae<4;++ae)Me[5*ae]=1;Me[5*ee]=0,Me[12+ee]=W.axesBounds[+(ye[ee]>0)][ee],i(Me,q.model,Me);var Ie=U.clipBounds[ee];for(fe=0;fe<2;++fe)for(ae=0;ae<3;++ae)Ie[fe][ae]=q.clipBounds[fe][ae];Ie[0][ee]=-1e8,Ie[1][ee]=1e8}return U.showSurface=xe,U.showContour=Ae,U}var Q={model:b,view:b,projection:b,inverseModel:b.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},re=b.slice(),ne=[1,0,0,0,1,0,0,0,1];function oe(q,W){q=q||{};var ee=this.gl;ee.disable(ee.CULL_FACE),this._colorMap.bind(0);var ae=Q;ae.model=q.model||b,ae.view=q.view||b,ae.projection=q.projection||b,ae.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ae.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ae.objectOffset=this.objectOffset,ae.contourColor=this.contourColor[0],ae.inverseModel=T(ae.inverseModel,ae.model);for(var fe=0;fe<2;++fe)for(var ye=ae.clipBounds[fe],xe=0;xe<3;++xe)ye[xe]=Math.min(Math.max(this.clipBounds[fe][xe],-1e8),1e8);ae.kambient=this.ambientLight,ae.kdiffuse=this.diffuseLight,ae.kspecular=this.specularLight,ae.roughness=this.roughness,ae.fresnel=this.fresnel,ae.opacity=this.opacity,ae.height=0,ae.permutation=ne,ae.vertexColor=this.vertexColor;var Ae=re;for(i(Ae,ae.view,ae.model),i(Ae,ae.projection,Ae),T(Ae,Ae),fe=0;fe<3;++fe)ae.eyePosition[fe]=Ae[12+fe]/Ae[15];var Me=Ae[15];for(fe=0;fe<3;++fe)Me+=this.lightPosition[fe]*Ae[4*fe+3];for(fe=0;fe<3;++fe){var Ie=Ae[12+fe];for(xe=0;xe<3;++xe)Ie+=Ae[4*xe+fe]*this.lightPosition[xe];ae.lightPosition[fe]=Ie/Me}var qe=Z(ae,this);if(qe.showSurface){for(this._shader.bind(),this._shader.uniforms=ae,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ee.TRIANGLES,this._vertexCount),fe=0;fe<3;++fe)!this.surfaceProject[fe]||!this.vertexCount||(this._shader.uniforms.model=qe.projections[fe],this._shader.uniforms.clipBounds=qe.clipBounds[fe],this._vao.draw(ee.TRIANGLES,this._vertexCount));this._vao.unbind()}if(qe.showContour){var je=this._contourShader;ae.kambient=1,ae.kdiffuse=0,ae.kspecular=0,ae.opacity=1,je.bind(),je.uniforms=ae;var ke=this._contourVAO;for(ke.bind(),fe=0;fe<3;++fe)for(je.uniforms.permutation=I[fe],ee.lineWidth(this.contourWidth[fe]*this.pixelRatio),xe=0;xe>4)/16)/255,fe=Math.floor(ae),ye=ae-fe,xe=W[1]*(q.value[1]+(q.value[2]&15)/16)/255,Ae=Math.floor(xe),Me=xe-Ae;fe+=1,Ae+=1;var Ie=ee.position;Ie[0]=Ie[1]=Ie[2]=0;for(var qe=0;qe<2;++qe)for(var je=qe?ye:1-ye,ke=0;ke<2;++ke)for(var ge=ke?Me:1-Me,le=fe+qe,ve=Ae+ke,se=je*ge,Te=0;Te<3;++Te)Ie[Te]+=this._field[Te].get(le,ve)*se;for(var Fe=this._pickResult.level,We=0;We<3;++We)if(Fe[We]=S.le(this.contourLevels[We],Ie[We]),Fe[We]<0)this.contourLevels[We].length>0&&(Fe[We]=0);else if(Fe[We]Math.abs(gt-Ie[We])&&(Fe[We]+=1)}for(ee.index[0]=ye<.5?fe:fe+1,ee.index[1]=Me<.5?Ae:Ae+1,ee.uv[0]=ae/W[0],ee.uv[1]=xe/W[1],Te=0;Te<3;++Te)ee.dataCoordinate[Te]=this._field[Te].get(ee.index[0],ee.index[1]);return ee},F.padField=function(q,W){var ee=W.shape.slice(),ae=q.shape.slice();g.assign(q.lo(1,1).hi(ee[0],ee[1]),W),g.assign(q.lo(1).hi(ee[0],1),W.hi(ee[0],1)),g.assign(q.lo(1,ae[1]-1).hi(ee[0],1),W.lo(0,ee[1]-1).hi(ee[0],1)),g.assign(q.lo(0,1).hi(1,ee[1]),W.hi(1)),g.assign(q.lo(ae[0]-1,1).hi(1,ee[1]),W.lo(ee[0]-1)),q.set(0,0,W.get(0,0)),q.set(0,ae[1]-1,W.get(0,ee[1]-1)),q.set(ae[0]-1,0,W.get(ee[0]-1,0)),q.set(ae[0]-1,ae[1]-1,W.get(ee[0]-1,ee[1]-1))};function $(q,W){return Array.isArray(q)?[W(q[0]),W(q[1]),W(q[2])]:[W(q),W(q),W(q)]}function K(q){return Array.isArray(q)?q.length===3?[q[0],q[1],q[2],1]:[q[0],q[1],q[2],q[3]]:[0,0,0,1]}function G(q){if(Array.isArray(q)){if(Array.isArray(q))return[K(q[0]),K(q[1]),K(q[2])];var W=K(q);return[W.slice(),W.slice(),W.slice()]}}F.update=function(q){q=q||{},this.objectOffset=q.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in q&&(this.contourWidth=$(q.contourWidth,Number)),"showContour"in q&&(this.showContour=$(q.showContour,Boolean)),"showSurface"in q&&(this.showSurface=!!q.showSurface),"contourTint"in q&&(this.contourTint=$(q.contourTint,Boolean)),"contourColor"in q&&(this.contourColor=G(q.contourColor)),"contourProject"in q&&(this.contourProject=$(q.contourProject,function(bn){return $(bn,Boolean)})),"surfaceProject"in q&&(this.surfaceProject=q.surfaceProject),"dynamicColor"in q&&(this.dynamicColor=G(q.dynamicColor)),"dynamicTint"in q&&(this.dynamicTint=$(q.dynamicTint,Number)),"dynamicWidth"in q&&(this.dynamicWidth=$(q.dynamicWidth,Number)),"opacity"in q&&(this.opacity=q.opacity),"opacityscale"in q&&(this.opacityscale=q.opacityscale),"colorBounds"in q&&(this.colorBounds=q.colorBounds),"vertexColor"in q&&(this.vertexColor=q.vertexColor?1:0),"colormap"in q&&this._colorMap.setPixels(this.genColormap(q.colormap,this.opacityscale));var W=q.field||q.coords&&q.coords[2]||null,ee=!1;if(W||(this._field[2].shape[0]||this._field[2].shape[2]?W=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):W=this._field[2].hi(0,0)),"field"in q||"coords"in q){var ae=(W.shape[0]+2)*(W.shape[1]+2);ae>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(ae))),this._field[2]=p(this._field[2].data,[W.shape[0]+2,W.shape[1]+2]),this.padField(this._field[2],W),this.shape=W.shape.slice();for(var fe=this.shape,ye=0;ye<2;++ye)this._field[2].size>this._field[ye].data.length&&(s.freeFloat(this._field[ye].data),this._field[ye].data=s.mallocFloat(this._field[2].size)),this._field[ye]=p(this._field[ye].data,[fe[0]+2,fe[1]+2]);if(q.coords){var xe=q.coords;if(!Array.isArray(xe)||xe.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(ye=0;ye<2;++ye){var Ae=xe[ye];for(ke=0;ke<2;++ke)if(Ae.shape[ke]!==fe[ke])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[ye],Ae)}}else if(q.ticks){var Me=q.ticks;if(!Array.isArray(Me)||Me.length!==2)throw new Error("gl-surface: invalid ticks");for(ye=0;ye<2;++ye){var Ie=Me[ye];if((Array.isArray(Ie)||Ie.length)&&(Ie=p(Ie)),Ie.shape[0]!==fe[ye])throw new Error("gl-surface: invalid tick length");var qe=p(Ie.data,fe);qe.stride[ye]=Ie.stride[0],qe.stride[ye^1]=0,this.padField(this._field[ye],qe)}}else{for(ye=0;ye<2;++ye){var je=[0,0];je[ye]=1,this._field[ye]=p(this._field[ye].data,[fe[0]+2,fe[1]+2],je,0)}this._field[0].set(0,0,0);for(var ke=0;ke0){for(var Mi=0;Mi<5;++Mi)Ht.pop();Re-=1}continue e}}}$t.push(Re)}this._contourOffsets[Wt]=ia,this._contourCounts[Wt]=$t}var ci=s.mallocFloat(Ht.length);for(ye=0;yeN||z<0||z>N)throw new Error("gl-texture2d: Invalid texture size");return A._shape=[b,z],A.bind(),I.texImage2D(I.TEXTURE_2D,0,A.format,b,z,0,A.format,A.type,null),A._mipLevels=[0],A}function i(A,b,z,I,N,R){this.gl=A,this.handle=b,this.format=N,this.type=R,this._shape=[z,I],this._mipLevels=[0],this._magFilter=A.NEAREST,this._minFilter=A.NEAREST,this._wrapS=A.CLAMP_TO_EDGE,this._wrapT=A.CLAMP_TO_EDGE,this._anisoSamples=1;var B=this,F=[this._wrapS,this._wrapT];Object.defineProperties(F,[{get:function(){return B._wrapS},set:function(j){return B.wrapS=j}},{get:function(){return B._wrapT},set:function(j){return B.wrapT=j}}]),this._wrapVector=F;var P=[this._shape[0],this._shape[1]];Object.defineProperties(P,[{get:function(){return B._shape[0]},set:function(j){return B.width=j}},{get:function(){return B._shape[1]},set:function(j){return B.height=j}}]),this._shapeVector=P}var T=i.prototype;Object.defineProperties(T,{minFilter:{get:function(){return this._minFilter},set:function(A){this.bind();var b=this.gl;if(this.type===b.FLOAT&&o.indexOf(A)>=0&&(b.getExtension("OES_texture_float_linear")||(A=b.NEAREST)),s.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,A),this._minFilter=A}},magFilter:{get:function(){return this._magFilter},set:function(A){this.bind();var b=this.gl;if(this.type===b.FLOAT&&o.indexOf(A)>=0&&(b.getExtension("OES_texture_float_linear")||(A=b.NEAREST)),s.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,A),this._magFilter=A}},mipSamples:{get:function(){return this._anisoSamples},set:function(A){var b=this._anisoSamples;if(this._anisoSamples=Math.max(A,1)|0,b!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(A){if(this.bind(),c.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,A),this._wrapS=A}},wrapT:{get:function(){return this._wrapT},set:function(A){if(this.bind(),c.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,A),this._wrapT=A}},wrap:{get:function(){return this._wrapVector},set:function(A){if(Array.isArray(A)||(A=[A,A]),A.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var b=0;b<2;++b)if(c.indexOf(A[b])<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);this._wrapS=A[0],this._wrapT=A[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),A}},shape:{get:function(){return this._shapeVector},set:function(A){if(!Array.isArray(A))A=[A|0,A|0];else if(A.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return m(this,A[0]|0,A[1]|0),[A[0]|0,A[1]|0]}},width:{get:function(){return this._shape[0]},set:function(A){return A=A|0,m(this,A,this._shape[1]),A}},height:{get:function(){return this._shape[1]},set:function(A){return A=A|0,m(this,this._shape[0],A),A}}}),T.bind=function(A){var b=this.gl;return A!==void 0&&b.activeTexture(b.TEXTURE0+(A|0)),b.bindTexture(b.TEXTURE_2D,this.handle),A!==void 0?A|0:b.getParameter(b.ACTIVE_TEXTURE)-b.TEXTURE0},T.dispose=function(){this.gl.deleteTexture(this.handle)},T.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var A=Math.min(this._shape[0],this._shape[1]),b=0;A>0;++b,A>>>=1)this._mipLevels.indexOf(b)<0&&this._mipLevels.push(b)},T.setPixels=function(A,b,z,I){var N=this.gl;this.bind(),Array.isArray(b)?(I=z,z=b[1]|0,b=b[0]|0):(b=b||0,z=z||0),I=I||0;var R=f(A)?A:A.raw;if(R){var B=this._mipLevels.indexOf(I)<0;B?(N.texImage2D(N.TEXTURE_2D,0,this.format,this.format,this.type,R),this._mipLevels.push(I)):N.texSubImage2D(N.TEXTURE_2D,I,b,z,this.format,this.type,R)}else if(A.shape&&A.stride&&A.data){if(A.shape.length<2||b+A.shape[1]>this._shape[1]>>>I||z+A.shape[0]>this._shape[0]>>>I||b<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");M(N,b,z,I,this.format,this.type,this._mipLevels,A)}else throw new Error("gl-texture2d: Unsupported data type")};function S(A,b){return A.length===3?b[2]===1&&b[1]===A[0]*A[2]&&b[0]===A[2]:b[0]===1&&b[1]===A[0]}function M(A,b,z,I,N,R,B,F){var P=F.dtype,j=F.shape.slice();if(j.length<2||j.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var U=0,Z=0,Q=S(j,F.stride.slice());P==="float32"?U=A.FLOAT:P==="float64"?(U=A.FLOAT,Q=!1,P="float32"):P==="uint8"?U=A.UNSIGNED_BYTE:(U=A.UNSIGNED_BYTE,Q=!1,P="uint8");var re=1;if(j.length===2)Z=A.LUMINANCE,j=[j[0],j[1],1],F=n(F.data,j,[F.stride[0],F.stride[1],1],F.offset);else if(j.length===3){if(j[2]===1)Z=A.ALPHA;else if(j[2]===2)Z=A.LUMINANCE_ALPHA;else if(j[2]===3)Z=A.RGB;else if(j[2]===4)Z=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");re=j[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((Z===A.LUMINANCE||Z===A.ALPHA)&&(N===A.LUMINANCE||N===A.ALPHA)&&(Z=N),Z!==N)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ne=F.size,oe=B.indexOf(I)<0;if(oe&&B.push(I),U===R&&Q)F.offset===0&&F.data.length===ne?oe?A.texImage2D(A.TEXTURE_2D,I,N,j[0],j[1],0,N,R,F.data):A.texSubImage2D(A.TEXTURE_2D,I,b,z,j[0],j[1],N,R,F.data):oe?A.texImage2D(A.TEXTURE_2D,I,N,j[0],j[1],0,N,R,F.data.subarray(F.offset,F.offset+ne)):A.texSubImage2D(A.TEXTURE_2D,I,b,z,j[0],j[1],N,R,F.data.subarray(F.offset,F.offset+ne));else{var V;R===A.FLOAT?V=a.mallocFloat32(ne):V=a.mallocUint8(ne);var $=n(V,j,[j[2],j[2]*j[0],1]);U===A.FLOAT&&R===A.UNSIGNED_BYTE?p($,F):r.assign($,F),oe?A.texImage2D(A.TEXTURE_2D,I,N,j[0],j[1],0,N,R,V.subarray(0,ne)):A.texSubImage2D(A.TEXTURE_2D,I,b,z,j[0],j[1],N,R,V.subarray(0,ne)),R===A.FLOAT?a.freeFloat32(V):a.freeUint8(V)}}function C(A){var b=A.createTexture();return A.bindTexture(A.TEXTURE_2D,b),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE),b}function _(A,b,z,I,N){var R=A.getParameter(A.MAX_TEXTURE_SIZE);if(b<0||b>R||z<0||z>R)throw new Error("gl-texture2d: Invalid texture shape");if(N===A.FLOAT&&!A.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var B=C(A);return A.texImage2D(A.TEXTURE_2D,0,I,b,z,0,I,N,null),new i(A,B,b,z,I,N)}function w(A,b,z,I,N,R){var B=C(A);return A.texImage2D(A.TEXTURE_2D,0,N,N,R,b),new i(A,B,z,I,N,R)}function h(A,b){var z=b.dtype,I=b.shape.slice(),N=A.getParameter(A.MAX_TEXTURE_SIZE);if(I[0]<0||I[0]>N||I[1]<0||I[1]>N)throw new Error("gl-texture2d: Invalid texture size");var R=S(I,b.stride.slice()),B=0;z==="float32"?B=A.FLOAT:z==="float64"?(B=A.FLOAT,R=!1,z="float32"):z==="uint8"?B=A.UNSIGNED_BYTE:(B=A.UNSIGNED_BYTE,R=!1,z="uint8");var F=0;if(I.length===2)F=A.LUMINANCE,I=[I[0],I[1],1],b=n(b.data,I,[b.stride[0],b.stride[1],1],b.offset);else if(I.length===3)if(I[2]===1)F=A.ALPHA;else if(I[2]===2)F=A.LUMINANCE_ALPHA;else if(I[2]===3)F=A.RGB;else if(I[2]===4)F=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");B===A.FLOAT&&!A.getExtension("OES_texture_float")&&(B=A.UNSIGNED_BYTE,R=!1);var P,j,U=b.size;if(R)b.offset===0&&b.data.length===U?P=b.data:P=b.data.subarray(b.offset,b.offset+U);else{var Z=[I[2],I[2]*I[0],1];j=a.malloc(U,z);var Q=n(j,I,Z,0);(z==="float32"||z==="float64")&&B===A.UNSIGNED_BYTE?p(Q,b):r.assign(Q,b),P=j.subarray(0,U)}var re=C(A);return A.texImage2D(A.TEXTURE_2D,0,F,I[0],I[1],0,F,B,P),R||a.free(j),new i(A,re,I[0],I[1],F,B)}function u(A){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(o||g(A),typeof arguments[1]=="number")return _(A,arguments[1],arguments[2],arguments[3]||A.RGBA,arguments[4]||A.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return _(A,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var b=arguments[1],z=f(b)?b:b.raw;if(z)return w(A,z,b.width|0,b.height|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(b.shape&&b.data&&b.stride)return h(A,b)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433(l){"use strict";function e(t,n,r){n?n.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var a=t.getParameter(t.MAX_VERTEX_ATTRIBS)|0;if(r){if(r.length>a)throw new Error("gl-vao: Too many vertex attributes");for(var o=0;o1?0:Math.acos(p)}},9226(l){l.exports=e;function e(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}},3126(l){l.exports=e;function e(t){var n=new Float32Array(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}},3990(l){l.exports=e;function e(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}},1091(l){l.exports=e;function e(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},5911(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],g=r[1],f=r[2];return t[0]=o*f-s*g,t[1]=s*c-a*f,t[2]=a*g-o*c,t}},5455(l,e,t){l.exports=t(7056)},7056(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(r*r+a*a+o*o)}},4008(l,e,t){l.exports=t(6690)},6690(l){l.exports=e;function e(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t}},244(l){l.exports=e;function e(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}},2613(l){l.exports=1e-6},9922(l,e,t){l.exports=r;var n=t(2613);function r(a,o){var s=a[0],c=a[1],g=a[2],f=o[0],p=o[1],m=o[2];return Math.abs(s-f)<=n*Math.max(1,Math.abs(s),Math.abs(f))&&Math.abs(c-p)<=n*Math.max(1,Math.abs(c),Math.abs(p))&&Math.abs(g-m)<=n*Math.max(1,Math.abs(g),Math.abs(m))}},9265(l){l.exports=e;function e(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}},2681(l){l.exports=e;function e(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}},5137(l,e,t){l.exports=r;var n=t(1091)();function r(a,o,s,c,g,f){var p,m;for(o||(o=3),s||(s=0),c?m=Math.min(c*o+s,a.length):m=a.length,p=s;p0&&(s=1/Math.sqrt(s),t[0]=n[0]*s,t[1]=n[1]*s,t[2]=n[2]*s),t}},7636(l){l.exports=e;function e(t,n){n=n||1;var r=Math.random()*2*Math.PI,a=Math.random()*2-1,o=Math.sqrt(1-a*a)*n;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=a*n,t}},6894(l){l.exports=e;function e(t,n,r,a){var o=r[1],s=r[2],c=n[1]-o,g=n[2]-s,f=Math.sin(a),p=Math.cos(a);return t[0]=n[0],t[1]=o+c*p-g*f,t[2]=s+c*f+g*p,t}},109(l){l.exports=e;function e(t,n,r,a){var o=r[0],s=r[2],c=n[0]-o,g=n[2]-s,f=Math.sin(a),p=Math.cos(a);return t[0]=o+g*f+c*p,t[1]=n[1],t[2]=s+g*p-c*f,t}},8692(l){l.exports=e;function e(t,n,r,a){var o=r[0],s=r[1],c=n[0]-o,g=n[1]-s,f=Math.sin(a),p=Math.cos(a);return t[0]=o+c*p-g*f,t[1]=s+c*f+g*p,t[2]=n[2],t}},2447(l){l.exports=e;function e(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}},6621(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t}},8489(l){l.exports=e;function e(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t}},1463(l){l.exports=e;function e(t,n,r,a){return t[0]=n,t[1]=r,t[2]=a,t}},6141(l,e,t){l.exports=t(2953)},5486(l,e,t){l.exports=t(3066)},2953(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return r*r+a*a+o*o}},3066(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2];return n*n+r*r+a*a}},2229(l,e,t){l.exports=t(6843)},6843(l){l.exports=e;function e(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t}},492(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2];return t[0]=a*r[0]+o*r[3]+s*r[6],t[1]=a*r[1]+o*r[4]+s*r[7],t[2]=a*r[2]+o*r[5]+s*r[8],t}},5673(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[3]*a+r[7]*o+r[11]*s+r[15];return c=c||1,t[0]=(r[0]*a+r[4]*o+r[8]*s+r[12])/c,t[1]=(r[1]*a+r[5]*o+r[9]*s+r[13])/c,t[2]=(r[2]*a+r[6]*o+r[10]*s+r[14])/c,t}},264(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],g=r[1],f=r[2],p=r[3],m=g*s-f*o,i=f*a-c*s,T=c*o-g*a;return m*=2,i*=2,T*=2,t[0]=a+p*m+g*T-f*i,t[1]=o+p*i+f*m-c*T,t[2]=s+p*T+c*i-g*m,t}},4361(l){l.exports=e;function e(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t}},2335(l){l.exports=e;function e(t){var n=new Float32Array(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n}},2933(l){l.exports=e;function e(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}},7536(l){l.exports=e;function e(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},4691(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=n[3]-t[3];return Math.sqrt(r*r+a*a+o*o+s*s)}},1373(l){l.exports=e;function e(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t[3]=n[3]/r[3],t}},3750(l){l.exports=e;function e(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}},3390(l){l.exports=e;function e(t,n,r,a){var o=new Float32Array(4);return o[0]=t,o[1]=n,o[2]=r,o[3]=a,o}},9970(l,e,t){l.exports={create:t(7536),clone:t(2335),fromValues:t(3390),copy:t(2933),set:t(4578),add:t(4361),subtract:t(6860),multiply:t(3576),divide:t(1373),min:t(2334),max:t(160),scale:t(9288),scaleAndAdd:t(4844),distance:t(4691),squaredDistance:t(7960),length:t(6808),squaredLength:t(483),negate:t(1498),inverse:t(4494),normalize:t(5177),dot:t(3750),lerp:t(2573),random:t(9131),transformMat4:t(5352),transformQuat:t(4041)}},4494(l){l.exports=e;function e(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t}},6808(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2],o=t[3];return Math.sqrt(n*n+r*r+a*a+o*o)}},2573(l){l.exports=e;function e(t,n,r,a){var o=n[0],s=n[1],c=n[2],g=n[3];return t[0]=o+a*(r[0]-o),t[1]=s+a*(r[1]-s),t[2]=c+a*(r[2]-c),t[3]=g+a*(r[3]-g),t}},160(l){l.exports=e;function e(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t[3]=Math.max(n[3],r[3]),t}},2334(l){l.exports=e;function e(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t[3]=Math.min(n[3],r[3]),t}},3576(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t[3]=n[3]*r[3],t}},1498(l){l.exports=e;function e(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t}},5177(l){l.exports=e;function e(t,n){var r=n[0],a=n[1],o=n[2],s=n[3],c=r*r+a*a+o*o+s*s;return c>0&&(c=1/Math.sqrt(c),t[0]=r*c,t[1]=a*c,t[2]=o*c,t[3]=s*c),t}},9131(l,e,t){var n=t(5177),r=t(9288);l.exports=a;function a(o,s){return s=s||1,o[0]=Math.random(),o[1]=Math.random(),o[2]=Math.random(),o[3]=Math.random(),n(o,o),r(o,o,s),o}},9288(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t}},4844(l){l.exports=e;function e(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t[3]=n[3]+r[3]*a,t}},4578(l){l.exports=e;function e(t,n,r,a,o){return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t}},7960(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=n[3]-t[3];return r*r+a*a+o*o+s*s}},483(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2],o=t[3];return n*n+r*r+a*a+o*o}},6860(l){l.exports=e;function e(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t}},5352(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=n[3];return t[0]=r[0]*a+r[4]*o+r[8]*s+r[12]*c,t[1]=r[1]*a+r[5]*o+r[9]*s+r[13]*c,t[2]=r[2]*a+r[6]*o+r[10]*s+r[14]*c,t[3]=r[3]*a+r[7]*o+r[11]*s+r[15]*c,t}},4041(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],g=r[1],f=r[2],p=r[3],m=p*a+g*s-f*o,i=p*o+f*a-c*s,T=p*s+c*o-g*a,S=-c*a-g*o-f*s;return t[0]=m*p+S*-c+i*-f-T*-g,t[1]=i*p+S*-g+T*-c-m*-f,t[2]=T*p+S*-f+m*-g-i*-c,t[3]=n[3],t}},1848(l,e,t){var n=t(4905),r=t(6468);l.exports=a;function a(o){for(var s=Array.isArray(o)?o:n(o),c=0;c0)continue;We=se.slice(0,1).join("")}return ee(We),ne+=We.length,P=P.slice(We.length),P.length}while(!0)}function ke(){return/[^a-fA-F0-9]/.test(B)?(ee(P.join("")),R=c,I):(P.push(B),F=B,I+1)}function ge(){return B==="."||/[eE]/.test(B)?(P.push(B),R=S,F=B,I+1):B==="x"&&P.length===1&&P[0]==="0"?(R=u,P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),R=c,I):(P.push(B),F=B,I+1)}function le(){return B==="f"&&(P.push(B),F=B,I+=1),/[eE]/.test(B)||(B==="-"||B==="+")&&/[eE]/.test(F)?(P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),R=c,I):(P.push(B),F=B,I+1)}function ve(){if(/[^\d\w_]/.test(B)){var se=P.join("");return W[se]?R=_:q[se]?R=C:R=M,ee(P.join("")),R=c,I}return P.push(B),F=B,I+1}}},3508(l,e,t){var n=t(6852);n=n.slice().filter(function(r){return!/^(gl\_|texture)/.test(r)}),l.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852(l){l.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932(l,e,t){var n=t(620);l.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620(l){l.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827(l){l.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905(l,e,t){var n=t(5874);l.exports=r;function r(a,o){var s=n(o),c=[];return c=c.concat(s(a)),c=c.concat(s(null)),c}},3236(l){l.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),n=[],r=0;r>1,m=-7,i=r?o-1:0,T=r?-1:1,S=t[n+i];for(i+=T,s=S&(1<<-m)-1,S>>=-m,m+=g;m>0;s=s*256+t[n+i],i+=T,m-=8);for(c=s&(1<<-m)-1,s>>=-m,m+=a;m>0;c=c*256+t[n+i],i+=T,m-=8);if(s===0)s=1-p;else{if(s===f)return c?NaN:(S?-1:1)*(1/0);c=c+Math.pow(2,a),s=s-p}return(S?-1:1)*c*Math.pow(2,s-a)},e.write=function(t,n,r,a,o,s){var c,g,f,p=s*8-o-1,m=(1<>1,T=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=a?0:s-1,M=a?1:-1,C=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(g=isNaN(n)?1:0,c=m):(c=Math.floor(Math.log(n)/Math.LN2),n*(f=Math.pow(2,-c))<1&&(c--,f*=2),c+i>=1?n+=T/f:n+=T*Math.pow(2,1-i),n*f>=2&&(c++,f/=2),c+i>=m?(g=0,c=m):c+i>=1?(g=(n*f-1)*Math.pow(2,o),c=c+i):(g=n*Math.pow(2,i-1)*Math.pow(2,o),c=0));o>=8;t[r+S]=g&255,S+=M,g/=256,o-=8);for(c=c<0;t[r+S]=c&255,S+=M,c/=256,p-=8);t[r+S-M]|=C*128}},8954(l,e,t){"use strict";l.exports=i;var n=t(3250),r=t(6803).Fw;function a(T,S,M){this.vertices=T,this.adjacent=S,this.boundary=M,this.lastVisited=-1}a.prototype.flip=function(){var T=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=T;var S=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=S};function o(T,S,M){this.vertices=T,this.cell=S,this.index=M}function s(T,S){return r(T.vertices,S.vertices)}function c(T){return function(){var S=this.tuple;return T.apply(this,S)}}function g(T){var S=n[T+1];return S||(S=n),c(S)}var f=[];function p(T,S,M){this.dimension=T,this.vertices=S,this.simplices=M,this.interior=M.filter(function(w){return!w.boundary}),this.tuple=new Array(T+1);for(var C=0;C<=T;++C)this.tuple[C]=this.vertices[C];var _=f[T];_||(_=f[T]=g(T)),this.orient=_}var m=p.prototype;m.handleBoundaryDegeneracy=function(T,S){var M=this.dimension,C=this.vertices.length-1,_=this.tuple,w=this.vertices,h=[T];for(T.lastVisited=-C;h.length>0;){T=h.pop();for(var u=T.adjacent,A=0;A<=M;++A){var b=u[A];if(!(!b.boundary||b.lastVisited<=-C)){for(var z=b.vertices,I=0;I<=M;++I){var N=z[I];N<0?_[I]=S:_[I]=w[N]}var R=this.orient();if(R>0)return b;b.lastVisited=-C,R===0&&h.push(b)}}}return null},m.walk=function(T,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,w=this.tuple,h=S?this.interior.length*Math.random()|0:this.interior.length-1,u=this.interior[h];e:for(;!u.boundary;){for(var A=u.vertices,b=u.adjacent,z=0;z<=C;++z)w[z]=_[A[z]];u.lastVisited=M;for(var z=0;z<=C;++z){var I=b[z];if(!(I.lastVisited>=M)){var N=w[z];w[z]=T;var R=this.orient();if(w[z]=N,R<0){u=I;continue e}else I.boundary?I.lastVisited=-M:I.lastVisited=M}}return}return u},m.addPeaks=function(T,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,w=this.tuple,h=this.interior,u=this.simplices,A=[S];S.lastVisited=M,S.vertices[S.vertices.indexOf(-1)]=M,S.boundary=!1,h.push(S);for(var b=[];A.length>0;){var S=A.pop(),z=S.vertices,I=S.adjacent,N=z.indexOf(M);if(!(N<0)){for(var R=0;R<=C;++R)if(R!==N){var B=I[R];if(!(!B.boundary||B.lastVisited>=M)){var F=B.vertices;if(B.lastVisited!==-M){for(var P=0,j=0;j<=C;++j)F[j]<0?(P=j,w[j]=T):w[j]=_[F[j]];var U=this.orient();if(U>0){F[P]=M,B.boundary=!1,h.push(B),A.push(B),B.lastVisited=M;continue}else B.lastVisited=-M}var Z=B.adjacent,Q=z.slice(),re=I.slice(),ne=new a(Q,re,!0);u.push(ne);var oe=Z.indexOf(S);if(!(oe<0)){Z[oe]=ne,re[N]=B,Q[R]=-1,re[R]=S,I[R]=ne,ne.flip();for(var j=0;j<=C;++j){var V=Q[j];if(!(V<0||V===M)){for(var $=new Array(C-1),K=0,G=0;G<=C;++G){var X=Q[G];X<0||G===j||($[K++]=X)}b.push(new o($,ne,j))}}}}}}}b.sort(s);for(var R=0;R+1=0?h[A++]=u[z]:b=z&1;if(b===(T&1)){var I=h[0];h[0]=h[1],h[1]=I}S.push(h)}}return S};function i(T,S){var M=T.length;if(M===0)throw new Error("Must have at least d+1 points");var C=T[0].length;if(M<=C)throw new Error("Must input at least d+1 points");var _=T.slice(0,C+1),w=n.apply(void 0,_);if(w===0)throw new Error("Input not in general position");for(var h=new Array(C+1),u=0;u<=C;++u)h[u]=u;w<0&&(h[0]=1,h[1]=0);for(var A=new a(h,new Array(C+1),!1),b=A.adjacent,z=new Array(C+2),u=0;u<=C;++u){for(var I=h.slice(),N=0;N<=C;++N)N===u&&(I[N]=-1);var R=I[0];I[0]=I[1],I[1]=R;var B=new a(I,new Array(C+1),!0);b[u]=B,z[u]=B}z[C+1]=A;for(var u=0;u<=C;++u)for(var I=b[u].vertices,F=b[u].adjacent,N=0;N<=C;++N){var P=I[N];if(P<0){F[N]=A;continue}for(var j=0;j<=C;++j)b[j].vertices.indexOf(P)<0&&(F[N]=b[j])}for(var U=new p(C,_,z),Z=!!S,u=C+1;u3*(z+1)?p(this,b):this.left.insert(b):this.left=w([b]);else if(b[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?p(this,b):this.right.insert(b):this.right=w([b]);else{var I=n.ge(this.leftPoints,b,C),N=n.ge(this.rightPoints,b,_);this.leftPoints.splice(I,0,b),this.rightPoints.splice(N,0,b)}},c.remove=function(b){var z=this.count-this.leftPoints;if(b[1]3*(z-1))return m(this,b);var N=this.left.remove(b);return N===o?(this.left=null,this.count-=1,a):(N===a&&(this.count-=1),N)}else if(b[0]>this.mid){if(!this.right)return r;var R=this.left?this.left.count:0;if(4*R>3*(z-1))return m(this,b);var N=this.right.remove(b);return N===o?(this.right=null,this.count-=1,a):(N===a&&(this.count-=1),N)}else{if(this.count===1)return this.leftPoints[0]===b?o:r;if(this.leftPoints.length===1&&this.leftPoints[0]===b){if(this.left&&this.right){for(var B=this,F=this.left;F.right;)B=F,F=F.right;if(B===this)F.right=this.right;else{var P=this.left,N=this.right;B.count-=F.count,B.right=F.left,F.left=P,F.right=N}g(this,F),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 a}for(var P=n.ge(this.leftPoints,b,C);P=0&&b[N][1]>=z;--N){var R=I(b[N]);if(R)return R}}function S(b,z){for(var I=0;Ithis.mid){if(this.right){var I=this.right.queryPoint(b,z);if(I)return I}return T(this.rightPoints,b,z)}else return S(this.leftPoints,z)},c.queryInterval=function(b,z,I){if(bthis.mid&&this.right){var N=this.right.queryInterval(b,z,I);if(N)return N}return zthis.mid?T(this.rightPoints,b,I):S(this.leftPoints,I)};function M(b,z){return b-z}function C(b,z){var I=b[0]-z[0];return I||b[1]-z[1]}function _(b,z){var I=b[1]-z[1];return I||b[0]-z[0]}function w(b){if(b.length===0)return null;for(var z=[],I=0;I>1],R=[],B=[],F=[],I=0;I1&&o.indexOf("Macintosh")!==-1&&o.indexOf("Safari")!==-1&&(s=!0),s}},5219(l){"use strict";l.exports=function(e){for(var t=e.length,n,r=0;r13)&&n!==32&&n!==133&&n!==160&&n!==5760&&n!==6158&&(n<8192||n>8205)&&n!==8232&&n!==8233&&n!==8239&&n!==8287&&n!==8288&&n!==12288&&n!==65279)return!1;return!0}},395(l){function e(t,n,r){return t*(1-r)+n*r}l.exports=e},2652(l,e,t){var n=t(4335),r=t(6864),a=t(1903),o=t(9921),s=t(7608),c=t(5665),g={length:t(1387),normalize:t(3536),dot:t(244),cross:t(5911)},f=r(),p=r(),m=[0,0,0,0],i=[[0,0,0],[0,0,0],[0,0,0]],T=[0,0,0];l.exports=function(w,h,u,A,b,z){if(h||(h=[0,0,0]),u||(u=[0,0,0]),A||(A=[0,0,0]),b||(b=[0,0,0,1]),z||(z=[0,0,0,1]),!n(f,w)||(a(p,f),p[3]=0,p[7]=0,p[11]=0,p[15]=1,Math.abs(o(p)<1e-8)))return!1;var I=f[3],N=f[7],R=f[11],B=f[12],F=f[13],P=f[14],j=f[15];if(I!==0||N!==0||R!==0){m[0]=I,m[1]=N,m[2]=R,m[3]=j;var U=s(p,p);if(!U)return!1;c(p,p),S(b,m,p)}else b[0]=b[1]=b[2]=0,b[3]=1;if(h[0]=B,h[1]=F,h[2]=P,M(i,f),u[0]=g.length(i[0]),g.normalize(i[0],i[0]),A[0]=g.dot(i[0],i[1]),C(i[1],i[1],i[0],1,-A[0]),u[1]=g.length(i[1]),g.normalize(i[1],i[1]),A[0]/=u[1],A[1]=g.dot(i[0],i[2]),C(i[2],i[2],i[0],1,-A[1]),A[2]=g.dot(i[1],i[2]),C(i[2],i[2],i[1],1,-A[2]),u[2]=g.length(i[2]),g.normalize(i[2],i[2]),A[1]/=u[2],A[2]/=u[2],g.cross(T,i[1],i[2]),g.dot(i[0],T)<0)for(var Z=0;Z<3;Z++)u[Z]*=-1,i[Z][0]*=-1,i[Z][1]*=-1,i[Z][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+i[0][0]-i[1][1]-i[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-i[0][0]+i[1][1]-i[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-i[0][0]-i[1][1]+i[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+i[0][0]+i[1][1]+i[2][2],0)),i[2][1]>i[1][2]&&(z[0]=-z[0]),i[0][2]>i[2][0]&&(z[1]=-z[1]),i[1][0]>i[0][1]&&(z[2]=-z[2]),!0};function S(_,w,h){var u=w[0],A=w[1],b=w[2],z=w[3];return _[0]=h[0]*u+h[4]*A+h[8]*b+h[12]*z,_[1]=h[1]*u+h[5]*A+h[9]*b+h[13]*z,_[2]=h[2]*u+h[6]*A+h[10]*b+h[14]*z,_[3]=h[3]*u+h[7]*A+h[11]*b+h[15]*z,_}function M(_,w){_[0][0]=w[0],_[0][1]=w[1],_[0][2]=w[2],_[1][0]=w[4],_[1][1]=w[5],_[1][2]=w[6],_[2][0]=w[8],_[2][1]=w[9],_[2][2]=w[10]}function C(_,w,h,u,A){_[0]=w[0]*u+h[0]*A,_[1]=w[1]*u+h[1]*A,_[2]=w[2]*u+h[2]*A}},4335(l){l.exports=function(t,n){var r=n[15];if(r===0)return!1;for(var a=1/r,o=0;o<16;o++)t[o]=n[o]*a;return!0}},7442(l,e,t){var n=t(6658),r=t(7182),a=t(2652),o=t(9921),s=t(8648),c=m(),g=m(),f=m();l.exports=p;function p(S,M,C,_){if(o(M)===0||o(C)===0)return!1;var w=a(M,c.translate,c.scale,c.skew,c.perspective,c.quaternion),h=a(C,g.translate,g.scale,g.skew,g.perspective,g.quaternion);return!w||!h?!1:(n(f.translate,c.translate,g.translate,_),n(f.skew,c.skew,g.skew,_),n(f.scale,c.scale,g.scale,_),n(f.perspective,c.perspective,g.perspective,_),s(f.quaternion,c.quaternion,g.quaternion,_),r(S,f.translate,f.scale,f.skew,f.perspective,f.quaternion),!0)}function m(){return{translate:i(),scale:i(1),skew:i(),perspective:T(),quaternion:T()}}function i(S){return[S||0,S||0,S||0]}function T(){return[0,0,0,1]}},7182(l,e,t){var n={identity:t(7894),translate:t(7656),multiply:t(6760),create:t(6864),scale:t(2504),fromRotationTranslation:t(6743)},r=n.create(),a=n.create();l.exports=function(s,c,g,f,p,m){return n.identity(s),n.fromRotationTranslation(s,m,c),s[3]=p[0],s[7]=p[1],s[11]=p[2],s[15]=p[3],n.identity(a),f[2]!==0&&(a[9]=f[2],n.multiply(s,s,a)),f[1]!==0&&(a[9]=0,a[8]=f[1],n.multiply(s,s,a)),f[0]!==0&&(a[8]=0,a[4]=f[0],n.multiply(s,s,a)),n.scale(s,s,g),s}},1811(l,e,t){"use strict";var n=t(2478),r=t(7442),a=t(7608),o=t(5567),s=t(2408),c=t(7089),g=t(6582),f=t(7656),p=t(2504),m=t(3536),i=[0,0,0];l.exports=C;function T(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var S=T.prototype;S.recalcMatrix=function(_){var w=this._time,h=n.le(w,_),u=this.computedMatrix;if(!(h<0)){var A=this._components;if(h===w.length-1)for(var b=16*h,z=0;z<16;++z)u[z]=A[b++];else{for(var I=w[h+1]-w[h],b=16*h,N=this.prevMatrix,R=!0,z=0;z<16;++z)N[z]=A[b++];for(var B=this.nextMatrix,z=0;z<16;++z)B[z]=A[b++],R=R&&N[z]===B[z];if(I<1e-6||R)for(var z=0;z<16;++z)u[z]=N[z];else r(u,N,B,(_-w[h])/I)}var F=this.computedUp;F[0]=u[1],F[1]=u[5],F[2]=u[9],m(F,F);var P=this.computedInverse;a(P,u);var j=this.computedEye,U=P[15];j[0]=P[12]/U,j[1]=P[13]/U,j[2]=P[14]/U;for(var Z=this.computedCenter,Q=Math.exp(this.computedRadius[0]),z=0;z<3;++z)Z[z]=j[z]-u[2+4*z]*Q}},S.idle=function(_){if(!(_1&&n(a[g[i-2]],a[g[i-1]],m)<=0;)i-=1,g.pop();for(g.push(p),i=f.length;i>1&&n(a[f[i-2]],a[f[i-1]],m)>=0;)i-=1,f.pop();f.push(p)}for(var T=new Array(f.length+g.length-2),S=0,s=0,M=g.length;s0;--C)T[S++]=f[C];return T}},351(l,e,t){"use strict";l.exports=r;var n=t(4687);function r(a,o){o||(o=a,a=window);var s=0,c=0,g=0,f={shift:!1,alt:!1,control:!1,meta:!1},p=!1;function m(b){var z=!1;return"altKey"in b&&(z=z||b.altKey!==f.alt,f.alt=!!b.altKey),"shiftKey"in b&&(z=z||b.shiftKey!==f.shift,f.shift=!!b.shiftKey),"ctrlKey"in b&&(z=z||b.ctrlKey!==f.control,f.control=!!b.ctrlKey),"metaKey"in b&&(z=z||b.metaKey!==f.meta,f.meta=!!b.metaKey),z}function i(b,z){var I=n.x(z),N=n.y(z);"buttons"in z&&(b=z.buttons|0),(b!==s||I!==c||N!==g||m(z))&&(s=b|0,c=I||0,g=N||0,o&&o(s,c,g,f))}function T(b){i(0,b)}function S(){(s||c||g||f.shift||f.alt||f.meta||f.control)&&(c=g=0,s=0,f.shift=f.alt=f.control=f.meta=!1,o&&o(0,0,0,f))}function M(b){m(b)&&o&&o(s,c,g,f)}function C(b){n.buttons(b)===0?i(0,b):i(s,b)}function _(b){i(s|n.buttons(b),b)}function w(b){i(s&~n.buttons(b),b)}function h(){p||(p=!0,a.addEventListener("mousemove",C),a.addEventListener("mousedown",_),a.addEventListener("mouseup",w),a.addEventListener("mouseleave",T),a.addEventListener("mouseenter",T),a.addEventListener("mouseout",T),a.addEventListener("mouseover",T),a.addEventListener("blur",S),a.addEventListener("keyup",M),a.addEventListener("keydown",M),a.addEventListener("keypress",M),a!==window&&(window.addEventListener("blur",S),window.addEventListener("keyup",M),window.addEventListener("keydown",M),window.addEventListener("keypress",M)))}function u(){p&&(p=!1,a.removeEventListener("mousemove",C),a.removeEventListener("mousedown",_),a.removeEventListener("mouseup",w),a.removeEventListener("mouseleave",T),a.removeEventListener("mouseenter",T),a.removeEventListener("mouseout",T),a.removeEventListener("mouseover",T),a.removeEventListener("blur",S),a.removeEventListener("keyup",M),a.removeEventListener("keydown",M),a.removeEventListener("keypress",M),a!==window&&(window.removeEventListener("blur",S),window.removeEventListener("keyup",M),window.removeEventListener("keydown",M),window.removeEventListener("keypress",M)))}h();var A={element:a};return Object.defineProperties(A,{enabled:{get:function(){return p},set:function(b){b?h():u()},enumerable:!0},buttons:{get:function(){return s},enumerable:!0},x:{get:function(){return c},enumerable:!0},y:{get:function(){return g},enumerable:!0},mods:{get:function(){return f},enumerable:!0}}),A}},24(l){var e={left:0,top:0};l.exports=t;function t(r,a,o){a=a||r.currentTarget||r.srcElement,Array.isArray(o)||(o=[0,0]);var s=r.clientX||0,c=r.clientY||0,g=n(a);return o[0]=s-g.left,o[1]=c-g.top,o}function n(r){return r===window||r===document||r===document.body?e:r.getBoundingClientRect()}},4687(l,e){"use strict";function t(o){if(typeof o=="object"){if("buttons"in o)return o.buttons;if("which"in o){var s=o.which;if(s===2)return 4;if(s===3)return 2;if(s>0)return 1<=0)return 1<0){if(re=1,V[K++]=f(h[z],S,M,C),z+=U,_>0)for(Q=1,I=h[z],G=V[K]=f(I,S,M,C),W=V[K+X],fe=V[K+ee],Ae=V[K+ye],(G!==W||G!==fe||G!==Ae)&&(R=h[z+N],F=h[z+B],j=h[z+P],c(Q,re,I,R,F,j,G,W,fe,Ae,S,M,C),Me=$[K]=ne++),K+=1,z+=U,Q=2;Q<_;++Q)I=h[z],G=V[K]=f(I,S,M,C),W=V[K+X],fe=V[K+ee],Ae=V[K+ye],(G!==W||G!==fe||G!==Ae)&&(R=h[z+N],F=h[z+B],j=h[z+P],c(Q,re,I,R,F,j,G,W,fe,Ae,S,M,C),Me=$[K]=ne++,Ae!==W&&g($[K+X],Me,j,R,Ae,W,S,M,C)),K+=1,z+=U;for(z+=Z,K=0,Ie=X,X=q,q=Ie,Ie=ee,ee=ae,ae=Ie,Ie=ye,ye=xe,xe=Ie,re=2;re0)for(Q=1,I=h[z],G=V[K]=f(I,S,M,C),W=V[K+X],fe=V[K+ee],Ae=V[K+ye],(G!==W||G!==fe||G!==Ae)&&(R=h[z+N],F=h[z+B],j=h[z+P],c(Q,re,I,R,F,j,G,W,fe,Ae,S,M,C),Me=$[K]=ne++,Ae!==fe&&g($[K+ee],Me,F,j,fe,Ae,S,M,C)),K+=1,z+=U,Q=2;Q<_;++Q)I=h[z],G=V[K]=f(I,S,M,C),W=V[K+X],fe=V[K+ee],Ae=V[K+ye],(G!==W||G!==fe||G!==Ae)&&(R=h[z+N],F=h[z+B],j=h[z+P],c(Q,re,I,R,F,j,G,W,fe,Ae,S,M,C),Me=$[K]=ne++,Ae!==fe&&g($[K+ee],Me,F,j,fe,Ae,S,M,C),Ae!==W&&g($[K+X],Me,j,R,Ae,W,S,M,C)),K+=1,z+=U;re&1&&(K=0),Ie=X,X=q,q=Ie,Ie=ee,ee=ae,ae=Ie,Ie=ye,ye=xe,xe=Ie,z+=Z}}m($),m(V)}},"false,1,0":function(c,g,f,p,m){return function(T,S,M,C){var _=T.shape[0]|0,w=T.shape[1]|0,h=T.data,u=T.offset|0,A=T.stride[0]|0,b=T.stride[1]|0,z=u,I,N=-A|0,R=0,B=-b|0,F=0,P=-A-b|0,j=0,U=b|0,Z=A-b*w|0,Q=0,re=0,ne=0,oe=2*w|0,V=p(oe),$=p(oe),K=0,G=0,X=-1,q=-1,W=0,ee=-w|0,ae=w|0,fe=0,ye=-w-1|0,xe=w-1|0,Ae=0,Me=0,Ie=0;for(re=0;re0){if(Q=1,V[K++]=f(h[z],S,M,C),z+=U,w>0)for(re=1,I=h[z],G=V[K]=f(I,S,M,C),fe=V[K+ee],W=V[K+X],Ae=V[K+ye],(G!==fe||G!==W||G!==Ae)&&(R=h[z+N],F=h[z+B],j=h[z+P],c(Q,re,I,R,F,j,G,fe,W,Ae,S,M,C),Me=$[K]=ne++),K+=1,z+=U,re=2;re0)for(re=1,I=h[z],G=V[K]=f(I,S,M,C),fe=V[K+ee],W=V[K+X],Ae=V[K+ye],(G!==fe||G!==W||G!==Ae)&&(R=h[z+N],F=h[z+B],j=h[z+P],c(Q,re,I,R,F,j,G,fe,W,Ae,S,M,C),Me=$[K]=ne++,Ae!==fe&&g($[K+ee],Me,j,R,Ae,fe,S,M,C)),K+=1,z+=U,re=2;re 0"),typeof s.vertex!="function"&&c("Must specify vertex creation function"),typeof s.cell!="function"&&c("Must specify cell creation function"),typeof s.phase!="function"&&c("Must specify phase function");for(var m=s.getters||[],i=new Array(f),T=0;T=0?i[T]=!0:i[T]=!1;return a(s.vertex,s.cell,s.phase,p,g,i)}},6199(l,e,t){"use strict";var n=t(1338),r={zero:function(C,_,w,h){var u=C[0],A=w[0];h|=0;var b=0,z=A;for(b=0;b2&&b[1]>2&&h(A.pick(-1,-1).lo(1,1).hi(b[0]-2,b[1]-2),u.pick(-1,-1,0).lo(1,1).hi(b[0]-2,b[1]-2),u.pick(-1,-1,1).lo(1,1).hi(b[0]-2,b[1]-2)),b[1]>2&&(w(A.pick(0,-1).lo(1).hi(b[1]-2),u.pick(0,-1,1).lo(1).hi(b[1]-2)),_(u.pick(0,-1,0).lo(1).hi(b[1]-2))),b[1]>2&&(w(A.pick(b[0]-1,-1).lo(1).hi(b[1]-2),u.pick(b[0]-1,-1,1).lo(1).hi(b[1]-2)),_(u.pick(b[0]-1,-1,0).lo(1).hi(b[1]-2))),b[0]>2&&(w(A.pick(-1,0).lo(1).hi(b[0]-2),u.pick(-1,0,0).lo(1).hi(b[0]-2)),_(u.pick(-1,0,1).lo(1).hi(b[0]-2))),b[0]>2&&(w(A.pick(-1,b[1]-1).lo(1).hi(b[0]-2),u.pick(-1,b[1]-1,0).lo(1).hi(b[0]-2)),_(u.pick(-1,b[1]-1,1).lo(1).hi(b[0]-2))),u.set(0,0,0,0),u.set(0,0,1,0),u.set(b[0]-1,0,0,0),u.set(b[0]-1,0,1,0),u.set(0,b[1]-1,0,0),u.set(0,b[1]-1,1,0),u.set(b[0]-1,b[1]-1,0,0),u.set(b[0]-1,b[1]-1,1,0),u}}function M(C){var _=C.join(),b=f[_];if(b)return b;for(var w=C.length,h=[m,i],u=1;u<=w;++u)h.push(T(u));var A=S,b=A.apply(void 0,h);return f[_]=b,b}l.exports=function(_,w,h){if(Array.isArray(h)||(typeof h=="string"?h=n(w.dimension,h):h=n(w.dimension,"clamp")),w.size===0)return _;if(w.dimension===0)return _.set(0),_;var u=M(h);return u(_,w)}},4317(l){"use strict";function e(o,s){var c=Math.floor(s),g=s-c,f=0<=c&&c0;){F<64?(_=F,F=0):(_=64,F-=64);for(var P=f[1]|0;P>0;){P<64?(w=P,P=0):(w=64,P-=64),i=R+F*u+P*A,M=B+F*z+P*I;var j=0,U=0,Z=0,Q=b,re=u-h*b,ne=A-_*u,oe=N,V=z-h*N,$=I-_*z;for(Z=0;Z0;){I<64?(_=I,I=0):(_=64,I-=64);for(var N=f[0]|0;N>0;){N<64?(C=N,N=0):(C=64,N-=64),i=b+I*h+N*w,M=z+I*A+N*u;var R=0,B=0,F=h,P=w-_*h,j=A,U=u-_*A;for(B=0;B0;){B<64?(w=B,B=0):(w=64,B-=64);for(var F=f[0]|0;F>0;){F<64?(C=F,F=0):(C=64,F-=64);for(var P=f[1]|0;P>0;){P<64?(_=P,P=0):(_=64,P-=64),i=N+B*A+F*h+P*u,M=R+B*I+F*b+P*z;var j=0,U=0,Z=0,Q=A,re=h-w*A,ne=u-C*h,oe=I,V=b-w*I,$=z-C*b;for(Z=0;Z<_;++Z){for(U=0;UT;){j=0,U=R-_;t:for(F=0;FQ)break t;U+=b,j+=z}for(j=R,U=R-_,F=0;F>1,P=F-N,j=F+N,U=R,Z=P,Q=F,re=j,ne=B,oe=S+1,V=M-1,$=!0,K,G,X,q,W,ee,ae,fe,ye,xe=0,Ae=0,Me=0,Ie,qe,je,ke,ge,le,ve,se,Te,Fe,We,Ge,gt,mt,Tt,At,Kt=A,ar=m(Kt),_r=m(Kt);qe=w*U,je=w*Z,At=_;e:for(Ie=0;Ie0){G=U,U=Z,Z=G;break e}if(Me<0)break e;At+=z}qe=w*re,je=w*ne,At=_;e:for(Ie=0;Ie0){G=re,re=ne,ne=G;break e}if(Me<0)break e;At+=z}qe=w*U,je=w*Q,At=_;e:for(Ie=0;Ie0){G=U,U=Q,Q=G;break e}if(Me<0)break e;At+=z}qe=w*Z,je=w*Q,At=_;e:for(Ie=0;Ie0){G=Z,Z=Q,Q=G;break e}if(Me<0)break e;At+=z}qe=w*U,je=w*re,At=_;e:for(Ie=0;Ie0){G=U,U=re,re=G;break e}if(Me<0)break e;At+=z}qe=w*Q,je=w*re,At=_;e:for(Ie=0;Ie0){G=Q,Q=re,re=G;break e}if(Me<0)break e;At+=z}qe=w*Z,je=w*ne,At=_;e:for(Ie=0;Ie0){G=Z,Z=ne,ne=G;break e}if(Me<0)break e;At+=z}qe=w*Z,je=w*Q,At=_;e:for(Ie=0;Ie0){G=Z,Z=Q,Q=G;break e}if(Me<0)break e;At+=z}qe=w*re,je=w*ne,At=_;e:for(Ie=0;Ie0){G=re,re=ne,ne=G;break e}if(Me<0)break e;At+=z}for(qe=w*U,je=w*Z,ke=w*Q,ge=w*re,le=w*ne,ve=w*R,se=w*F,Te=w*B,Tt=0,At=_,Ie=0;Ie0)V--;else if(Me<0){for(qe=w*ee,je=w*oe,ke=w*V,At=_,Ie=0;Ie0)for(;;){ae=_+V*w,Tt=0;e:for(Ie=0;Ie0){if(--VB){e:for(;;){for(ae=_+oe*w,Tt=0,At=_,Ie=0;Ie1&&T?M(i,T[0],T[1]):M(i)}var g={"uint32,1,0":function(p,m){return function(i){var T=i.data,S=i.offset|0,M=i.shape,C=i.stride,_=C[0]|0,w=M[0]|0,h=C[1]|0,u=M[1]|0,A=h,b=h,z=1;w<=32?p(0,w-1,T,S,_,h,w,u,A,b,z):m(0,w-1,T,S,_,h,w,u,A,b,z)}}};function f(p,m){var i=[m,p].join(","),T=g[i],S=o(p,m),M=c(p,m,S);return T(S,M)}l.exports=f},446(l,e,t){"use strict";var n=t(7640),r={};function a(o){var s=o.order,c=o.dtype,g=[s,c],f=g.join(":"),p=r[f];return p||(r[f]=p=n(s,c)),p(o),o}l.exports=a},9618(l,e,t){var n=t(7163),r=typeof Float64Array<"u";function a(m,i){return m[0]-i[0]}function o(){var m=this.stride,i=new Array(m.length),T;for(T=0;T=0&&(h=_|0,w+=A*h,u-=h),new S(this.data,u,A,w)},M.step=function(_){var w=this.shape[0],h=this.stride[0],u=this.offset,A=0,b=Math.ceil;return typeof _=="number"&&(A=_|0,A<0?(u+=h*(w-1),w=b(-w/A)):w=b(w/A),h*=A),new S(this.data,w,h,u)},M.transpose=function(_){_=_===void 0?0:_|0;var w=this.shape,h=this.stride;return new S(this.data,w[_],h[_],this.offset)},M.pick=function(_){var w=[],h=[],u=this.offset;typeof _=="number"&&_>=0?u=u+this.stride[0]*_|0:(w.push(this.shape[0]),h.push(this.stride[0]));var A=i[w.length+1];return A(this.data,w,h,u)},function(_,w,h,u){return new S(_,w[0],h[0],u)}},2:function(m,i,T){function S(C,_,w,h,u,A){this.data=C,this.shape=[_,w],this.stride=[h,u],this.offset=A|0}var M=S.prototype;return M.dtype=m,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,h){return m==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*w,h):this.data[this.offset+this.stride[0]*_+this.stride[1]*w]=h},M.get=function(_,w){return m==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*w):this.data[this.offset+this.stride[0]*_+this.stride[1]*w]},M.index=function(_,w){return this.offset+this.stride[0]*_+this.stride[1]*w},M.hi=function(_,w){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof w!="number"||w<0?this.shape[1]:w|0,this.stride[0],this.stride[1],this.offset)},M.lo=function(_,w){var h=this.offset,u=0,A=this.shape[0],b=this.shape[1],z=this.stride[0],I=this.stride[1];return typeof _=="number"&&_>=0&&(u=_|0,h+=z*u,A-=u),typeof w=="number"&&w>=0&&(u=w|0,h+=I*u,b-=u),new S(this.data,A,b,z,I,h)},M.step=function(_,w){var h=this.shape[0],u=this.shape[1],A=this.stride[0],b=this.stride[1],z=this.offset,I=0,N=Math.ceil;return typeof _=="number"&&(I=_|0,I<0?(z+=A*(h-1),h=N(-h/I)):h=N(h/I),A*=I),typeof w=="number"&&(I=w|0,I<0?(z+=b*(u-1),u=N(-u/I)):u=N(u/I),b*=I),new S(this.data,h,u,A,b,z)},M.transpose=function(_,w){_=_===void 0?0:_|0,w=w===void 0?1:w|0;var h=this.shape,u=this.stride;return new S(this.data,h[_],h[w],u[_],u[w],this.offset)},M.pick=function(_,w){var h=[],u=[],A=this.offset;typeof _=="number"&&_>=0?A=A+this.stride[0]*_|0:(h.push(this.shape[0]),u.push(this.stride[0])),typeof w=="number"&&w>=0?A=A+this.stride[1]*w|0:(h.push(this.shape[1]),u.push(this.stride[1]));var b=i[h.length+1];return b(this.data,h,u,A)},function(_,w,h,u){return new S(_,w[0],w[1],h[0],h[1],u)}},3:function(m,i,T){function S(C,_,w,h,u,A,b,z){this.data=C,this.shape=[_,w,h],this.stride=[u,A,b],this.offset=z|0}var M=S.prototype;return M.dtype=m,M.dimension=3,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(M,"order",{get:function(){var _=Math.abs(this.stride[0]),w=Math.abs(this.stride[1]),h=Math.abs(this.stride[2]);return _>w?w>h?[2,1,0]:_>h?[1,2,0]:[1,0,2]:_>h?[2,0,1]:h>w?[0,1,2]:[0,2,1]}}),M.set=function(_,w,h,u){return m==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h,u):this.data[this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h]=u},M.get=function(_,w,h){return m==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h):this.data[this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h]},M.index=function(_,w,h){return this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h},M.hi=function(_,w,h){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof w!="number"||w<0?this.shape[1]:w|0,typeof h!="number"||h<0?this.shape[2]:h|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},M.lo=function(_,w,h){var u=this.offset,A=0,b=this.shape[0],z=this.shape[1],I=this.shape[2],N=this.stride[0],R=this.stride[1],B=this.stride[2];return typeof _=="number"&&_>=0&&(A=_|0,u+=N*A,b-=A),typeof w=="number"&&w>=0&&(A=w|0,u+=R*A,z-=A),typeof h=="number"&&h>=0&&(A=h|0,u+=B*A,I-=A),new S(this.data,b,z,I,N,R,B,u)},M.step=function(_,w,h){var u=this.shape[0],A=this.shape[1],b=this.shape[2],z=this.stride[0],I=this.stride[1],N=this.stride[2],R=this.offset,B=0,F=Math.ceil;return typeof _=="number"&&(B=_|0,B<0?(R+=z*(u-1),u=F(-u/B)):u=F(u/B),z*=B),typeof w=="number"&&(B=w|0,B<0?(R+=I*(A-1),A=F(-A/B)):A=F(A/B),I*=B),typeof h=="number"&&(B=h|0,B<0?(R+=N*(b-1),b=F(-b/B)):b=F(b/B),N*=B),new S(this.data,u,A,b,z,I,N,R)},M.transpose=function(_,w,h){_=_===void 0?0:_|0,w=w===void 0?1:w|0,h=h===void 0?2:h|0;var u=this.shape,A=this.stride;return new S(this.data,u[_],u[w],u[h],A[_],A[w],A[h],this.offset)},M.pick=function(_,w,h){var u=[],A=[],b=this.offset;typeof _=="number"&&_>=0?b=b+this.stride[0]*_|0:(u.push(this.shape[0]),A.push(this.stride[0])),typeof w=="number"&&w>=0?b=b+this.stride[1]*w|0:(u.push(this.shape[1]),A.push(this.stride[1])),typeof h=="number"&&h>=0?b=b+this.stride[2]*h|0:(u.push(this.shape[2]),A.push(this.stride[2]));var z=i[u.length+1];return z(this.data,u,A,b)},function(_,w,h,u){return new S(_,w[0],w[1],w[2],h[0],h[1],h[2],u)}},4:function(m,i,T){function S(C,_,w,h,u,A,b,z,I,N){this.data=C,this.shape=[_,w,h,u],this.stride=[A,b,z,I],this.offset=N|0}var M=S.prototype;return M.dtype=m,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:T}),M.set=function(_,w,h,u,A){return m==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h+this.stride[3]*u,A):this.data[this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h+this.stride[3]*u]=A},M.get=function(_,w,h,u){return m==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h+this.stride[3]*u):this.data[this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h+this.stride[3]*u]},M.index=function(_,w,h,u){return this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h+this.stride[3]*u},M.hi=function(_,w,h,u){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof w!="number"||w<0?this.shape[1]:w|0,typeof h!="number"||h<0?this.shape[2]:h|0,typeof u!="number"||u<0?this.shape[3]:u|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},M.lo=function(_,w,h,u){var A=this.offset,b=0,z=this.shape[0],I=this.shape[1],N=this.shape[2],R=this.shape[3],B=this.stride[0],F=this.stride[1],P=this.stride[2],j=this.stride[3];return typeof _=="number"&&_>=0&&(b=_|0,A+=B*b,z-=b),typeof w=="number"&&w>=0&&(b=w|0,A+=F*b,I-=b),typeof h=="number"&&h>=0&&(b=h|0,A+=P*b,N-=b),typeof u=="number"&&u>=0&&(b=u|0,A+=j*b,R-=b),new S(this.data,z,I,N,R,B,F,P,j,A)},M.step=function(_,w,h,u){var A=this.shape[0],b=this.shape[1],z=this.shape[2],I=this.shape[3],N=this.stride[0],R=this.stride[1],B=this.stride[2],F=this.stride[3],P=this.offset,j=0,U=Math.ceil;return typeof _=="number"&&(j=_|0,j<0?(P+=N*(A-1),A=U(-A/j)):A=U(A/j),N*=j),typeof w=="number"&&(j=w|0,j<0?(P+=R*(b-1),b=U(-b/j)):b=U(b/j),R*=j),typeof h=="number"&&(j=h|0,j<0?(P+=B*(z-1),z=U(-z/j)):z=U(z/j),B*=j),typeof u=="number"&&(j=u|0,j<0?(P+=F*(I-1),I=U(-I/j)):I=U(I/j),F*=j),new S(this.data,A,b,z,I,N,R,B,F,P)},M.transpose=function(_,w,h,u){_=_===void 0?0:_|0,w=w===void 0?1:w|0,h=h===void 0?2:h|0,u=u===void 0?3:u|0;var A=this.shape,b=this.stride;return new S(this.data,A[_],A[w],A[h],A[u],b[_],b[w],b[h],b[u],this.offset)},M.pick=function(_,w,h,u){var A=[],b=[],z=this.offset;typeof _=="number"&&_>=0?z=z+this.stride[0]*_|0:(A.push(this.shape[0]),b.push(this.stride[0])),typeof w=="number"&&w>=0?z=z+this.stride[1]*w|0:(A.push(this.shape[1]),b.push(this.stride[1])),typeof h=="number"&&h>=0?z=z+this.stride[2]*h|0:(A.push(this.shape[2]),b.push(this.stride[2])),typeof u=="number"&&u>=0?z=z+this.stride[3]*u|0:(A.push(this.shape[3]),b.push(this.stride[3]));var I=i[A.length+1];return I(this.data,A,b,z)},function(_,w,h,u){return new S(_,w[0],w[1],w[2],w[3],h[0],h[1],h[2],h[3],u)}},5:function(i,T,S){function M(_,w,h,u,A,b,z,I,N,R,B,F){this.data=_,this.shape=[w,h,u,A,b],this.stride=[z,I,N,R,B],this.offset=F|0}var C=M.prototype;return C.dtype=i,C.dimension=5,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(C,"order",{get:S}),C.set=function(w,h,u,A,b,z){return i==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*h+this.stride[2]*u+this.stride[3]*A+this.stride[4]*b,z):this.data[this.offset+this.stride[0]*w+this.stride[1]*h+this.stride[2]*u+this.stride[3]*A+this.stride[4]*b]=z},C.get=function(w,h,u,A,b){return i==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*h+this.stride[2]*u+this.stride[3]*A+this.stride[4]*b):this.data[this.offset+this.stride[0]*w+this.stride[1]*h+this.stride[2]*u+this.stride[3]*A+this.stride[4]*b]},C.index=function(w,h,u,A,b){return this.offset+this.stride[0]*w+this.stride[1]*h+this.stride[2]*u+this.stride[3]*A+this.stride[4]*b},C.hi=function(w,h,u,A,b){return new M(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof h!="number"||h<0?this.shape[1]:h|0,typeof u!="number"||u<0?this.shape[2]:u|0,typeof A!="number"||A<0?this.shape[3]:A|0,typeof b!="number"||b<0?this.shape[4]:b|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},C.lo=function(w,h,u,A,b){var z=this.offset,I=0,N=this.shape[0],R=this.shape[1],B=this.shape[2],F=this.shape[3],P=this.shape[4],j=this.stride[0],U=this.stride[1],Z=this.stride[2],Q=this.stride[3],re=this.stride[4];return typeof w=="number"&&w>=0&&(I=w|0,z+=j*I,N-=I),typeof h=="number"&&h>=0&&(I=h|0,z+=U*I,R-=I),typeof u=="number"&&u>=0&&(I=u|0,z+=Z*I,B-=I),typeof A=="number"&&A>=0&&(I=A|0,z+=Q*I,F-=I),typeof b=="number"&&b>=0&&(I=b|0,z+=re*I,P-=I),new M(this.data,N,R,B,F,P,j,U,Z,Q,re,z)},C.step=function(w,h,u,A,b){var z=this.shape[0],I=this.shape[1],N=this.shape[2],R=this.shape[3],B=this.shape[4],F=this.stride[0],P=this.stride[1],j=this.stride[2],U=this.stride[3],Z=this.stride[4],Q=this.offset,re=0,ne=Math.ceil;return typeof w=="number"&&(re=w|0,re<0?(Q+=F*(z-1),z=ne(-z/re)):z=ne(z/re),F*=re),typeof h=="number"&&(re=h|0,re<0?(Q+=P*(I-1),I=ne(-I/re)):I=ne(I/re),P*=re),typeof u=="number"&&(re=u|0,re<0?(Q+=j*(N-1),N=ne(-N/re)):N=ne(N/re),j*=re),typeof A=="number"&&(re=A|0,re<0?(Q+=U*(R-1),R=ne(-R/re)):R=ne(R/re),U*=re),typeof b=="number"&&(re=b|0,re<0?(Q+=Z*(B-1),B=ne(-B/re)):B=ne(B/re),Z*=re),new M(this.data,z,I,N,R,B,F,P,j,U,Z,Q)},C.transpose=function(w,h,u,A,b){w=w===void 0?0:w|0,h=h===void 0?1:h|0,u=u===void 0?2:u|0,A=A===void 0?3:A|0,b=b===void 0?4:b|0;var z=this.shape,I=this.stride;return new M(this.data,z[w],z[h],z[u],z[A],z[b],I[w],I[h],I[u],I[A],I[b],this.offset)},C.pick=function(w,h,u,A,b){var z=[],I=[],N=this.offset;typeof w=="number"&&w>=0?N=N+this.stride[0]*w|0:(z.push(this.shape[0]),I.push(this.stride[0])),typeof h=="number"&&h>=0?N=N+this.stride[1]*h|0:(z.push(this.shape[1]),I.push(this.stride[1])),typeof u=="number"&&u>=0?N=N+this.stride[2]*u|0:(z.push(this.shape[2]),I.push(this.stride[2])),typeof A=="number"&&A>=0?N=N+this.stride[3]*A|0:(z.push(this.shape[3]),I.push(this.stride[3])),typeof b=="number"&&b>=0?N=N+this.stride[4]*b|0:(z.push(this.shape[4]),I.push(this.stride[4]));var R=T[z.length+1];return R(this.data,z,I,N)},function(w,h,u,A){return new M(w,h[0],h[1],h[2],h[3],h[4],u[0],u[1],u[2],u[3],u[4],A)}}};function c(m,i){var T=i===-1?"T":String(i),S=s[T];return i===-1?S(m):i===0?S(m,f[m][0]):S(m,f[m],o)}function g(m){if(n(m))return"buffer";if(r)switch(Object.prototype.toString.call(m)){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(m)?"array":"generic"}var f={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function p(m,i,T,S){if(m===void 0){var u=f.array[0];return u([])}else typeof m=="number"&&(m=[m]);i===void 0&&(i=[m.length]);var M=i.length;if(T===void 0){T=new Array(M);for(var C=M-1,_=1;C>=0;--C)T[C]=_,_*=i[C]}if(S===void 0){S=0;for(var C=0;C>>0;l.exports=o;function o(s,c){if(isNaN(s)||isNaN(c))return NaN;if(s===c)return s;if(s===0)return c<0?-r:r;var g=n.hi(s),f=n.lo(s);return c>s==s>0?f===a?(g+=1,f=0):f+=1:f===0?(f=a,g-=1):f-=1,n.pack(f,g)}},8406(l,e){var t=1e-6,n=1e-6;e.vertexNormals=function(r,a,o){for(var s=a.length,c=new Array(s),g=o===void 0?t:o,f=0;fg)for(var z=c[i],I=1/Math.sqrt(h*A),b=0;b<3;++b){var N=(b+1)%3,R=(b+2)%3;z[b]+=I*(u[N]*w[R]-u[R]*w[N])}}for(var f=0;fg)for(var I=1/Math.sqrt(B),b=0;b<3;++b)z[b]*=I;else for(var b=0;b<3;++b)z[b]=0}return c},e.faceNormals=function(r,a,o){for(var s=r.length,c=new Array(s),g=o===void 0?n:o,f=0;fg?C=1/Math.sqrt(C):C=0;for(var i=0;i<3;++i)M[i]*=C;c[f]=M}return c}},4081(l){"use strict";l.exports=e;function e(t,n,r,a,o,s,c,g,f,p){var m=n+s+p;if(i>0){var i=Math.sqrt(m+1);t[0]=.5*(c-f)/i,t[1]=.5*(g-a)/i,t[2]=.5*(r-s)/i,t[3]=.5*i}else{var T=Math.max(n,s,p),i=Math.sqrt(2*T-m+1);n>=T?(t[0]=.5*i,t[1]=.5*(o+r)/i,t[2]=.5*(g+a)/i,t[3]=.5*(c-f)/i):s>=T?(t[0]=.5*(r+o)/i,t[1]=.5*i,t[2]=.5*(f+c)/i,t[3]=.5*(g-a)/i):(t[0]=.5*(a+g)/i,t[1]=.5*(c+f)/i,t[2]=.5*i,t[3]=.5*(r-o)/i)}return t}},9977(l,e,t){"use strict";l.exports=i;var n=t(9215),r=t(6582),a=t(7399),o=t(7608),s=t(4081);function c(T,S,M){return Math.sqrt(Math.pow(T,2)+Math.pow(S,2)+Math.pow(M,2))}function g(T,S,M,C){return Math.sqrt(Math.pow(T,2)+Math.pow(S,2)+Math.pow(M,2)+Math.pow(C,2))}function f(T,S){var M=S[0],C=S[1],_=S[2],w=S[3],h=g(M,C,_,w);h>1e-6?(T[0]=M/h,T[1]=C/h,T[2]=_/h,T[3]=w/h):(T[0]=T[1]=T[2]=0,T[3]=1)}function p(T,S,M){this.radius=n([M]),this.center=n(S),this.rotation=n(T),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 m=p.prototype;m.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},m.recalcMatrix=function(T){this.radius.curve(T),this.center.curve(T),this.rotation.curve(T);var S=this.computedRotation;f(S,S);var M=this.computedMatrix;a(M,S);var C=this.computedCenter,_=this.computedEye,w=this.computedUp,h=Math.exp(this.computedRadius[0]);_[0]=C[0]+h*M[2],_[1]=C[1]+h*M[6],_[2]=C[2]+h*M[10],w[0]=M[1],w[1]=M[5],w[2]=M[9];for(var u=0;u<3;++u){for(var A=0,b=0;b<3;++b)A+=M[u+4*b]*_[b];M[12+u]=-A}},m.getMatrix=function(T,S){this.recalcMatrix(T);var M=this.computedMatrix;if(S){for(var C=0;C<16;++C)S[C]=M[C];return S}return M},m.idle=function(T){this.center.idle(T),this.radius.idle(T),this.rotation.idle(T)},m.flush=function(T){this.center.flush(T),this.radius.flush(T),this.rotation.flush(T)},m.pan=function(T,S,M,C){S=S||0,M=M||0,C=C||0,this.recalcMatrix(T);var _=this.computedMatrix,w=_[1],h=_[5],u=_[9],A=c(w,h,u);w/=A,h/=A,u/=A;var b=_[0],z=_[4],I=_[8],N=b*w+z*h+I*u;b-=w*N,z-=h*N,I-=u*N;var R=c(b,z,I);b/=R,z/=R,I/=R;var B=_[2],F=_[6],P=_[10],j=B*w+F*h+P*u,U=B*b+F*z+P*I;B-=j*w+U*b,F-=j*h+U*z,P-=j*u+U*I;var Z=c(B,F,P);B/=Z,F/=Z,P/=Z;var Q=b*S+w*M,re=z*S+h*M,ne=I*S+u*M;this.center.move(T,Q,re,ne);var oe=Math.exp(this.computedRadius[0]);oe=Math.max(1e-4,oe+C),this.radius.set(T,Math.log(oe))},m.rotate=function(T,S,M,C){this.recalcMatrix(T),S=S||0,M=M||0;var _=this.computedMatrix,w=_[0],h=_[4],u=_[8],A=_[1],b=_[5],z=_[9],I=_[2],N=_[6],R=_[10],B=S*w+M*A,F=S*h+M*b,P=S*u+M*z,j=-(N*P-R*F),U=-(R*B-I*P),Z=-(I*F-N*B),Q=Math.sqrt(Math.max(0,1-Math.pow(j,2)-Math.pow(U,2)-Math.pow(Z,2))),re=g(j,U,Z,Q);re>1e-6?(j/=re,U/=re,Z/=re,Q/=re):(j=U=Z=0,Q=1);var ne=this.computedRotation,oe=ne[0],V=ne[1],$=ne[2],K=ne[3],G=oe*Q+K*j+V*Z-$*U,X=V*Q+K*U+$*j-oe*Z,q=$*Q+K*Z+oe*U-V*j,W=K*Q-oe*j-V*U-$*Z;if(C){j=I,U=N,Z=R;var ee=Math.sin(C)/c(j,U,Z);j*=ee,U*=ee,Z*=ee,Q=Math.cos(S),G=G*Q+W*j+X*Z-q*U,X=X*Q+W*U+q*j-G*Z,q=q*Q+W*Z+G*U-X*j,W=W*Q-G*j-X*U-q*Z}var ae=g(G,X,q,W);ae>1e-6?(G/=ae,X/=ae,q/=ae,W/=ae):(G=X=q=0,W=1),this.rotation.set(T,G,X,q,W)},m.lookAt=function(T,S,M,C){this.recalcMatrix(T),M=M||this.computedCenter,S=S||this.computedEye,C=C||this.computedUp;var _=this.computedMatrix;r(_,S,M,C);var w=this.computedRotation;s(w,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),f(w,w),this.rotation.set(T,w[0],w[1],w[2],w[3]);for(var h=0,u=0;u<3;++u)h+=Math.pow(M[u]-S[u],2);this.radius.set(T,.5*Math.log(Math.max(h,1e-6))),this.center.set(T,M[0],M[1],M[2])},m.translate=function(T,S,M,C){this.center.move(T,S||0,M||0,C||0)},m.setMatrix=function(T,S){var M=this.computedRotation;s(M,S[0],S[1],S[2],S[4],S[5],S[6],S[8],S[9],S[10]),f(M,M),this.rotation.set(T,M[0],M[1],M[2],M[3]);var C=this.computedMatrix;o(C,S);var _=C[15];if(Math.abs(_)>1e-6){var w=C[12]/_,h=C[13]/_,u=C[14]/_;this.recalcMatrix(T);var A=Math.exp(this.computedRadius[0]);this.center.set(T,w-C[2]*A,h-C[6]*A,u-C[10]*A),this.radius.idle(T)}else this.center.idle(T),this.radius.idle(T)},m.setDistance=function(T,S){S>0&&this.radius.set(T,Math.log(S))},m.setDistanceLimits=function(T,S){T>0?T=Math.log(T):T=-1/0,S>0?S=Math.log(S):S=1/0,S=Math.max(S,T),this.radius.bounds[0][0]=T,this.radius.bounds[1][0]=S},m.getDistanceLimits=function(T){var S=this.radius.bounds;return T?(T[0]=Math.exp(S[0][0]),T[1]=Math.exp(S[1][0]),T):[Math.exp(S[0][0]),Math.exp(S[1][0])]},m.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]}},m.fromJSON=function(T){var S=this.lastT(),M=T.center;M&&this.center.set(S,M[0],M[1],M[2]);var C=T.rotation;C&&this.rotation.set(S,C[0],C[1],C[2],C[3]);var _=T.distance;_&&_>0&&this.radius.set(S,Math.log(_)),this.setDistanceLimits(T.zoomMin,T.zoomMax)};function i(T){T=T||{};var S=T.center||[0,0,0],M=T.rotation||[0,0,0,1],C=T.radius||1;S=[].slice.call(S,0,3),M=[].slice.call(M,0,4),f(M,M);var _=new p(M,S,Math.log(C));return _.setDistanceLimits(T.zoomMin,T.zoomMax),("eye"in T||"up"in T)&&_.lookAt(0,T.eye,T.center,T.up),_}},1371(l,e,t){"use strict";var n=t(3233);l.exports=function(a,o,s){return s=typeof s<"u"?s+"":" ",n(s,o)+a}},3202(l){l.exports=function(t,n){n||(n=[0,""]),t=String(t);var r=parseFloat(t,10);return n[0]=r,n[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}},3088(l,e,t){"use strict";l.exports=r;var n=t(3140);function r(a,o){for(var s=o.length|0,c=a.length,g=[new Array(s),new Array(s)],f=0;f0){z=g[R][A][0],N=R;break}I=z[N^1];for(var B=0;B<2;++B)for(var F=g[B][A],P=0;P0&&(z=j,I=U,N=B)}return b||z&&i(z,N),I}function S(u,A){var b=g[A][u][0],z=[u];i(b,A);for(var I=b[A^1],N=A;;){for(;I!==u;)z.push(I),I=T(z[z.length-2],I,!1);if(g[0][u].length+g[1][u].length===0)break;var R=z[z.length-1],B=u,F=z[1],P=T(R,B,!0);if(n(o[R],o[B],o[F],o[P])<0)break;z.push(u),I=T(R,B)}return z}function M(u,A){return A[1]===A[A.length-1]}for(var f=0;f0;){var w=g[0][f].length,h=S(f,C);M(_,h)?_.push.apply(_,h):(_.length>0&&m.push(_),_=h)}_.length>0&&m.push(_)}return m}},5609(l,e,t){"use strict";l.exports=r;var n=t(3134);function r(a,o){for(var s=n(a,o.length),c=new Array(o.length),g=new Array(o.length),f=[],p=0;p0;){var i=f.pop();c[i]=!1;for(var T=s[i],p=0;p0}w=w.filter(h);for(var u=w.length,A=new Array(u),b=new Array(u),_=0;_0;){var ae=q.pop(),fe=re[ae];c(fe,function(Ie,qe){return Ie-qe});var ye=fe.length,xe=W[ae],Ae;if(xe===0){var F=w[ae];Ae=[F]}for(var _=0;_=0)&&(W[Me]=xe^1,q.push(Me),xe===0)){var F=w[Me];X(F)||(F.reverse(),Ae.push(F))}}xe===0&&ee.push(Ae)}return ee}},5085(l,e,t){l.exports=T;var n=t(3250)[3],r=t(4209),a=t(3352),o=t(2478);function s(){return!0}function c(S){return function(M,C){var _=S[M];return _?!!_.queryPoint(C,s):!1}}function g(S){for(var M={},C=0;C0&&M[_]===C[0])w=S[_-1];else return 1;for(var h=1;w;){var u=w.key,A=n(C,u[0],u[1]);if(u[0][0]0)h=-1,w=w.right;else return 0;else if(A>0)w=w.left;else if(A<0)h=1,w=w.right;else return 0}return h}}function p(S){return 1}function m(S){return function(C){return S(C[0],C[1])?0:1}}function i(S,M){return function(_){return S(_[0],_[1])?0:M(_)}}function T(S){for(var M=S.length,C=[],_=[],w=0,h=0;h=p?(u=1,b=p+2*T+M):(u=-T/p,b=T*u+M)):(u=0,S>=0?(A=0,b=M):-S>=i?(A=1,b=i+2*S+M):(A=-S/i,b=S*A+M));else if(A<0)A=0,T>=0?(u=0,b=M):-T>=p?(u=1,b=p+2*T+M):(u=-T/p,b=T*u+M);else{var z=1/h;u*=z,A*=z,b=u*(p*u+m*A+2*T)+A*(m*u+i*A+2*S)+M}else{var I,N,R,B;u<0?(I=m+T,N=i+S,N>I?(R=N-I,B=p-2*m+i,R>=B?(u=1,A=0,b=p+2*T+M):(u=R/B,A=1-u,b=u*(p*u+m*A+2*T)+A*(m*u+i*A+2*S)+M)):(u=0,N<=0?(A=1,b=i+2*S+M):S>=0?(A=0,b=M):(A=-S/i,b=S*A+M))):A<0?(I=m+S,N=p+T,N>I?(R=N-I,B=p-2*m+i,R>=B?(A=1,u=0,b=i+2*S+M):(A=R/B,u=1-A,b=u*(p*u+m*A+2*T)+A*(m*u+i*A+2*S)+M)):(A=0,N<=0?(u=1,b=p+2*T+M):T>=0?(u=0,b=M):(u=-T/p,b=T*u+M))):(R=i+S-m-T,R<=0?(u=0,A=1,b=i+2*S+M):(B=p-2*m+i,R>=B?(u=1,A=0,b=p+2*T+M):(u=R/B,A=1-u,b=u*(p*u+m*A+2*T)+A*(m*u+i*A+2*S)+M)))}for(var F=1-u-A,f=0;f0){var i=s[g-1];if(n(p,i)===0&&a(i)!==m){g-=1;continue}}s[g++]=p}}return s.length=g,s}},3233(l){"use strict";var e="",t;l.exports=n;function n(r,a){if(typeof r!="string")throw new TypeError("expected a string");if(a===1)return r;if(a===2)return r+r;var o=r.length*a;if(t!==r||typeof t>"u")t=r,e="";else if(e.length>=o)return e.substr(0,o);for(;o>e.length&&a>1;)a&1&&(e+=r),a>>=1,r+=r;return e+=r,e=e.substr(0,o),e}},3025(l,e,t){l.exports=t.g.performance&&t.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004(l){"use strict";l.exports=e;function e(t){for(var n=t.length,r=t[t.length-1],a=n,o=n-2;o>=0;--o){var s=r,c=t[o];r=s+c;var g=r-s,f=c-g;f&&(t[--a]=r,r=f)}for(var p=0,o=a;o0){if(N<=0)return R;B=I+N}else if(I<0){if(N>=0)return R;B=-(I+N)}else return R;var F=g*B;return R>=F||R<=-F?R:S(A,b,z)},function(A,b,z,I){var N=A[0]-I[0],R=b[0]-I[0],B=z[0]-I[0],F=A[1]-I[1],P=b[1]-I[1],j=z[1]-I[1],U=A[2]-I[2],Z=b[2]-I[2],Q=z[2]-I[2],re=R*j,ne=B*P,oe=B*F,V=N*j,$=N*P,K=R*F,G=U*(re-ne)+Z*(oe-V)+Q*($-K),X=(Math.abs(re)+Math.abs(ne))*Math.abs(U)+(Math.abs(oe)+Math.abs(V))*Math.abs(Z)+(Math.abs($)+Math.abs(K))*Math.abs(Q),q=f*X;return G>q||-G>q?G:M(A,b,z,I)}];function _(u){var A=C[u.length];return A||(A=C[u.length]=T(u.length)),A.apply(void 0,u)}function w(u,A,b,z,I,N,R){return function(F,P,j,U,Z){switch(arguments.length){case 0:case 1:return 0;case 2:return z(F,P);case 3:return I(F,P,j);case 4:return N(F,P,j,U);case 5:return R(F,P,j,U,Z)}for(var Q=new Array(arguments.length),re=0;re0&&p>0||f<0&&p<0)return!1;var m=n(c,o,s),i=n(g,o,s);return m>0&&i>0||m<0&&i<0?!1:f===0&&p===0&&m===0&&i===0?r(o,s,c,g):!0}},8545(l){"use strict";l.exports=t;function e(n,r){var a=n+r,o=a-n,s=a-o,c=r-o,g=n-s,f=g+c;return f?[f,a]:[a]}function t(n,r){var a=n.length|0,o=r.length|0;if(a===1&&o===1)return e(n[0],-r[0]);var s=a+o,c=new Array(s),g=0,f=0,p=0,m=Math.abs,i=n[f],T=m(i),S=-r[p],M=m(S),C,_;T=o?(C=i,f+=1,f=o?(C=i,f+=1,f"u"&&(C=s(T));var _=T.length;if(_===0||C<1)return{cells:[],vertexIds:[],vertexWeights:[]};var w=c(S,+M),h=g(T,C),u=f(h,S,w,+M),A=p(h,S.length|0),b=o(C)(T,h.data,A,w),z=m(h),I=[].slice.call(u.data,0,u.shape[0]);return r.free(w),r.free(h.data),r.free(u.data),r.free(A),{cells:b,vertexIds:z,vertexWeights:I}}},1570(l){"use strict";l.exports=t;var e=[function(){function r(o,s,c,g){for(var f=Math.min(c,g)|0,p=Math.max(c,g)|0,m=o[2*f],i=o[2*f+1];m>1,S=s[2*T+1];if(S===p)return T;p>1,S=s[2*T+1];if(S===p)return T;p>1,S=s[2*T+1];if(S===p)return T;p>1,S=s[2*T+1];if(S===p)return T;p>1,B=g(A[R],b);B<=0?(B===0&&(N=R),z=R+1):B>0&&(I=R-1)}return N}n=i;function T(A,b){for(var z=new Array(A.length),I=0,N=z.length;I=A.length||g(A[re],R)!==0););}return z}n=T;function S(A,b){if(!b)return T(m(C(A,0)),A,0);for(var z=new Array(b),I=0;I>>j&1&&P.push(N[j]);b.push(P)}return p(b)}n=M;function C(A,b){if(b<0)return[];for(var z=[],I=(1<0)-(a<0)},e.abs=function(a){var o=a>>t-1;return(a^o)-o},e.min=function(a,o){return o^(a^o)&-(a65535)<<4,a>>>=o,s=(a>255)<<3,a>>>=s,o|=s,s=(a>15)<<2,a>>>=s,o|=s,s=(a>3)<<1,a>>>=s,o|=s,o|a>>1},e.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},e.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function n(a){var o=32;return a&=-a,a&&o--,a&65535&&(o-=16),a&16711935&&(o-=8),a&252645135&&(o-=4),a&858993459&&(o-=2),a&1431655765&&(o-=1),o}e.countTrailingZeros=n,e.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},e.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},e.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var r=new Array(256);(function(a){for(var o=0;o<256;++o){var s=o,c=o,g=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--g;a[o]=c<>>8&255]<<16|r[a>>>16&255]<<8|r[a>>>24&255]},e.interleave2=function(a,o){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,a|o<<1},e.deinterleave2=function(a,o){return a=a>>>o&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},e.interleave3=function(a,o,s){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,a|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,a|s<<2},e.deinterleave3=function(a,o){return a=a>>>o&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},e.nextCombination=function(a){var o=a|a-1;return o+1|(~o&-~o)-1>>>n(a)+1}},2014(l,e,t){"use strict";"use restrict";var n=t(3105),r=t(4623);function a(u){for(var A=0,b=Math.max,z=0,I=u.length;z>1,R=c(u[N],A);R<=0?(R===0&&(I=N),b=N+1):R>0&&(z=N-1)}return I}e.findCell=m;function i(u,A){for(var b=new Array(u.length),z=0,I=b.length;z=u.length||c(u[Q],N)!==0););}return b}e.incidence=i;function T(u,A){if(!A)return i(p(M(u,0)),u,0);for(var b=new Array(A),z=0;z>>P&1&&F.push(I[P]);A.push(F)}return f(A)}e.explode=S;function M(u,A){if(A<0)return[];for(var b=[],z=(1<>1:(V>>1)-1}function z(V){for(var $=A(V);;){var K=$,G=2*V+1,X=2*(V+1),q=V;if(G0;){var K=b(V);if(K>=0){var G=A(K);if($0){var V=F[0];return u(0,U-1),U-=1,z(0),V}return-1}function R(V,$){var K=F[V];return T[K]===$?V:(T[K]=-1/0,I(V),N(),T[K]=$,U+=1,I(U-1))}function B(V){if(!S[V]){S[V]=!0;var $=m[V],K=i[V];m[K]>=0&&(m[K]=$),i[$]>=0&&(i[$]=K),P[$]>=0&&R(P[$],h($)),P[K]>=0&&R(P[K],h(K))}}for(var F=[],P=new Array(f),M=0;M>1;M>=0;--M)z(M);for(;;){var Z=N();if(Z<0||T[Z]>g)break;B(Z)}for(var Q=[],M=0;M=0&&K>=0&&$!==K){var G=P[$],X=P[K];G!==X&&oe.push([G,X])}}),r.unique(r.normalize(oe)),{positions:Q,edges:oe}}},1303(l,e,t){"use strict";l.exports=a;var n=t(3250);function r(o,s){var c,g;if(s[0][0]s[1][0])c=s[1],g=s[0];else{var f=Math.min(o[0][1],o[1][1]),p=Math.max(o[0][1],o[1][1]),m=Math.min(s[0][1],s[1][1]),i=Math.max(s[0][1],s[1][1]);return pi?f-i:p-i}var T,S;o[0][1]s[1][0])c=s[1],g=s[0];else return r(s,o);var f,p;if(o[0][0]o[1][0])f=o[1],p=o[0];else return-r(o,s);var m=n(c,g,p),i=n(c,g,f);if(m<0){if(i<=0)return m}else if(m>0){if(i>=0)return m}else if(i)return i;if(m=n(p,f,g),i=n(p,f,c),m<0){if(i<=0)return m}else if(m>0){if(i>=0)return m}else if(i)return i;return g[0]-p[0]}},4209(l,e,t){"use strict";l.exports=i;var n=t(2478),r=t(3840),a=t(3250),o=t(1303);function s(T,S,M){this.slabs=T,this.coordinates=S,this.horizontal=M}var c=s.prototype;function g(T,S){return T.y-S}function f(T,S){for(var M=null;T;){var C=T.key,_,w;C[0][0]0)if(S[0]!==C[1][0])M=T,T=T.right;else{var u=f(T.right,S);if(u)return u;T=T.left}else{if(S[0]!==C[1][0])return T;var u=f(T.right,S);if(u)return u;T=T.left}}return M}c.castUp=function(T){var S=n.le(this.coordinates,T[0]);if(S<0)return-1;var M=this.slabs[S],C=f(this.slabs[S],T),_=-1;if(C&&(_=C.value),this.coordinates[S]===T[0]){var w=null;if(C&&(w=C.key),S>0){var h=f(this.slabs[S-1],T);h&&(w?o(h.key,w)>0&&(w=h.key,_=h.value):(_=h.value,w=h.key))}var u=this.horizontal[S];if(u.length>0){var A=n.ge(u,T[1],g);if(A=u.length)return _;b=u[A]}}if(b.start)if(w){var z=a(w[0],w[1],[T[0],b.y]);w[0][0]>w[1][0]&&(z=-z),z>0&&(_=b.index)}else _=b.index;else b.y!==T[1]&&(_=b.index)}}}return _};function p(T,S,M,C){this.y=T,this.index=S,this.start=M,this.closed=C}function m(T,S,M,C){this.x=T,this.segment=S,this.create=M,this.index=C}function i(T){for(var S=T.length,M=2*S,C=new Array(M),_=0;_1&&(S=1);for(var M=1-S,C=f.length,_=new Array(C),w=0;w0||T>0&&_<0){var w=o(S,_,M,T);m.push(w),i.push(w.slice())}_<0?i.push(M.slice()):_>0?m.push(M.slice()):(m.push(M.slice()),i.push(M.slice())),T=_}return{positive:m,negative:i}}function c(f,p){for(var m=[],i=a(f[f.length-1],p),T=f[f.length-1],S=f[0],M=0;M0||i>0&&C<0)&&m.push(o(T,C,S,i)),C>=0&&m.push(S.slice()),i=C}return m}function g(f,p){for(var m=[],i=a(f[f.length-1],p),T=f[f.length-1],S=f[0],M=0;M0||i>0&&C<0)&&m.push(o(T,C,S,i)),C<=0&&m.push(S.slice()),i=C}return m}},3387(l,e,t){var n;(function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(f){return s(g(f),arguments)}function o(f,p){return a.apply(null,[f].concat(p||[]))}function s(f,p){var m=1,i=f.length,T,S="",M,C,_,w,h,u,A,b;for(M=0;M=0),_.type){case"b":T=parseInt(T,10).toString(2);break;case"c":T=String.fromCharCode(parseInt(T,10));break;case"d":case"i":T=parseInt(T,10);break;case"j":T=JSON.stringify(T,null,_.width?parseInt(_.width):0);break;case"e":T=_.precision?parseFloat(T).toExponential(_.precision):parseFloat(T).toExponential();break;case"f":T=_.precision?parseFloat(T).toFixed(_.precision):parseFloat(T);break;case"g":T=_.precision?String(Number(T.toPrecision(_.precision))):parseFloat(T);break;case"o":T=(parseInt(T,10)>>>0).toString(8);break;case"s":T=String(T),T=_.precision?T.substring(0,_.precision):T;break;case"t":T=String(!!T),T=_.precision?T.substring(0,_.precision):T;break;case"T":T=Object.prototype.toString.call(T).slice(8,-1).toLowerCase(),T=_.precision?T.substring(0,_.precision):T;break;case"u":T=parseInt(T,10)>>>0;break;case"v":T=T.valueOf(),T=_.precision?T.substring(0,_.precision):T;break;case"x":T=(parseInt(T,10)>>>0).toString(16);break;case"X":T=(parseInt(T,10)>>>0).toString(16).toUpperCase();break}r.json.test(_.type)?S+=T:(r.number.test(_.type)&&(!A||_.sign)?(b=A?"+":"-",T=T.toString().replace(r.sign,"")):b="",h=_.pad_char?_.pad_char==="0"?"0":_.pad_char.charAt(1):" ",u=_.width-(b+T).length,w=_.width&&u>0?h.repeat(u):"",S+=_.align?b+T+w:h==="0"?b+w+T:w+b+T)}return S}var c=Object.create(null);function g(f){if(c[f])return c[f];for(var p=f,m,i=[],T=0;p;){if((m=r.text.exec(p))!==null)i.push(m[0]);else if((m=r.modulo.exec(p))!==null)i.push("%");else if((m=r.placeholder.exec(p))!==null){if(m[2]){T|=1;var S=[],M=m[2],C=[];if((C=r.key.exec(M))!==null)for(S.push(C[1]);(M=M.substring(C[0].length))!=="";)if((C=r.key_access.exec(M))!==null)S.push(C[1]);else if((C=r.index_access.exec(M))!==null)S.push(C[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");m[2]=S}else T|=2;if(T===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:m[0],param_no:m[1],keys:m[2],sign:m[3],pad_char:m[4],align:m[5],width:m[6],precision:m[7],type:m[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");p=p.substring(m[0].length)}return c[f]=i}e.sprintf=a,e.vsprintf=o,typeof window<"u"&&(window.sprintf=a,window.vsprintf=o,n=function(){return{sprintf:a,vsprintf:o}}.call(e,t,e,l),n!==void 0&&(l.exports=n))})()},3711(l,e,t){"use strict";l.exports=g;var n=t(2640),r=t(781),a={"2d":function(f,p,m){var i=f({order:p,scalarArguments:3,getters:m==="generic"?[0]:void 0,phase:function(S,M,C,_){return S>_|0},vertex:function(S,M,C,_,w,h,u,A,b,z,I,N,R){var B=(u<<0)+(A<<1)+(b<<2)+(z<<3)|0;if(!(B===0||B===15))switch(B){case 0:I.push([S-.5,M-.5]);break;case 1:I.push([S-.25-.25*(_+C-2*R)/(C-_),M-.25-.25*(w+C-2*R)/(C-w)]);break;case 2:I.push([S-.75-.25*(-_-C+2*R)/(_-C),M-.25-.25*(h+_-2*R)/(_-h)]);break;case 3:I.push([S-.5,M-.5-.5*(w+C+h+_-4*R)/(C-w+_-h)]);break;case 4:I.push([S-.25-.25*(h+w-2*R)/(w-h),M-.75-.25*(-w-C+2*R)/(w-C)]);break;case 5:I.push([S-.5-.5*(_+C+h+w-4*R)/(C-_+w-h),M-.5]);break;case 6:I.push([S-.5-.25*(-_-C+h+w)/(_-C+w-h),M-.5-.25*(-w-C+h+_)/(w-C+_-h)]);break;case 7:I.push([S-.75-.25*(h+w-2*R)/(w-h),M-.75-.25*(h+_-2*R)/(_-h)]);break;case 8:I.push([S-.75-.25*(-h-w+2*R)/(h-w),M-.75-.25*(-h-_+2*R)/(h-_)]);break;case 9:I.push([S-.5-.25*(_+C+-h-w)/(C-_+h-w),M-.5-.25*(w+C+-h-_)/(C-w+h-_)]);break;case 10:I.push([S-.5-.5*(-_-C+-h-w+4*R)/(_-C+h-w),M-.5]);break;case 11:I.push([S-.25-.25*(-h-w+2*R)/(h-w),M-.75-.25*(w+C-2*R)/(C-w)]);break;case 12:I.push([S-.5,M-.5-.5*(-w-C+-h-_+4*R)/(w-C+h-_)]);break;case 13:I.push([S-.75-.25*(_+C-2*R)/(C-_),M-.25-.25*(-h-_+2*R)/(h-_)]);break;case 14:I.push([S-.25-.25*(-_-C+2*R)/(_-C),M-.25-.25*(-w-C+2*R)/(w-C)]);break;case 15:I.push([S-.5,M-.5]);break}},cell:function(S,M,C,_,w,h,u,A,b){w?A.push([S,M]):A.push([M,S])}});return function(T,S){var M=[],C=[];return i(T,M,C,S),{positions:M,cells:C}}}};function o(f,p){var m=f.length+"d",i=a[m];if(i)return i(n,f,p)}function s(f,p){for(var m=r(f,p),i=m.length,T=new Array(i),S=new Array(i),M=0;MMath.max(_,w)?h[2]=1:_>Math.max(C,w)?h[0]=1:h[1]=1;for(var u=0,A=0,b=0;b<3;++b)u+=M[b]*M[b],A+=h[b]*M[b];for(var b=0;b<3;++b)h[b]-=A/u*M[b];return s(h,h),h}function m(M,C,_,w,h,u,A,b){this.center=n(_),this.up=n(w),this.right=n(h),this.radius=n([u]),this.angle=n([A,b]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(M,C),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var i=m.prototype;i.setDistanceLimits=function(M,C){M>0?M=Math.log(M):M=-1/0,C>0?C=Math.log(C):C=1/0,C=Math.max(C,M),this.radius.bounds[0][0]=M,this.radius.bounds[1][0]=C},i.getDistanceLimits=function(M){var C=this.radius.bounds[0];return M?(M[0]=Math.exp(C[0][0]),M[1]=Math.exp(C[1][0]),M):[Math.exp(C[0][0]),Math.exp(C[1][0])]},i.recalcMatrix=function(M){this.center.curve(M),this.up.curve(M),this.right.curve(M),this.radius.curve(M),this.angle.curve(M);for(var C=this.computedUp,_=this.computedRight,w=0,h=0,u=0;u<3;++u)h+=C[u]*_[u],w+=C[u]*C[u];for(var A=Math.sqrt(w),b=0,u=0;u<3;++u)_[u]-=C[u]*h/w,b+=_[u]*_[u],C[u]/=A;for(var z=Math.sqrt(b),u=0;u<3;++u)_[u]/=z;var I=this.computedToward;o(I,C,_),s(I,I);for(var N=Math.exp(this.computedRadius[0]),R=this.computedAngle[0],B=this.computedAngle[1],F=Math.cos(R),P=Math.sin(R),j=Math.cos(B),U=Math.sin(B),Z=this.computedCenter,Q=F*j,re=P*j,ne=U,oe=-F*U,V=-P*U,$=j,K=this.computedEye,G=this.computedMatrix,u=0;u<3;++u){var X=Q*_[u]+re*I[u]+ne*C[u];G[4*u+1]=oe*_[u]+V*I[u]+$*C[u],G[4*u+2]=X,G[4*u+3]=0}var q=G[1],W=G[5],ee=G[9],ae=G[2],fe=G[6],ye=G[10],xe=W*ye-ee*fe,Ae=ee*ae-q*ye,Me=q*fe-W*ae,Ie=g(xe,Ae,Me);xe/=Ie,Ae/=Ie,Me/=Ie,G[0]=xe,G[4]=Ae,G[8]=Me;for(var u=0;u<3;++u)K[u]=Z[u]+G[2+4*u]*N;for(var u=0;u<3;++u){for(var b=0,qe=0;qe<3;++qe)b+=G[u+4*qe]*K[qe];G[12+u]=-b}G[15]=1},i.getMatrix=function(M,C){this.recalcMatrix(M);var _=this.computedMatrix;if(C){for(var w=0;w<16;++w)C[w]=_[w];return C}return _};var T=[0,0,0];i.rotate=function(M,C,_,w){if(this.angle.move(M,C,_),w){this.recalcMatrix(M);var h=this.computedMatrix;T[0]=h[2],T[1]=h[6],T[2]=h[10];for(var u=this.computedUp,A=this.computedRight,b=this.computedToward,z=0;z<3;++z)h[4*z]=u[z],h[4*z+1]=A[z],h[4*z+2]=b[z];a(h,h,w,T);for(var z=0;z<3;++z)u[z]=h[4*z],A[z]=h[4*z+1];this.up.set(M,u[0],u[1],u[2]),this.right.set(M,A[0],A[1],A[2])}},i.pan=function(M,C,_,w){C=C||0,_=_||0,w=w||0,this.recalcMatrix(M);var h=this.computedMatrix,u=Math.exp(this.computedRadius[0]),A=h[1],b=h[5],z=h[9],I=g(A,b,z);A/=I,b/=I,z/=I;var N=h[0],R=h[4],B=h[8],F=N*A+R*b+B*z;N-=A*F,R-=b*F,B-=z*F;var P=g(N,R,B);N/=P,R/=P,B/=P;var j=N*C+A*_,U=R*C+b*_,Z=B*C+z*_;this.center.move(M,j,U,Z);var Q=Math.exp(this.computedRadius[0]);Q=Math.max(1e-4,Q+w),this.radius.set(M,Math.log(Q))},i.translate=function(M,C,_,w){this.center.move(M,C||0,_||0,w||0)},i.setMatrix=function(M,C,_,w){var h=1;typeof _=="number"&&(h=_|0),(h<0||h>3)&&(h=1);var u=(h+2)%3,A=(h+1)%3;C||(this.recalcMatrix(M),C=this.computedMatrix);var b=C[h],z=C[h+4],I=C[h+8];if(w){var R=Math.abs(b),B=Math.abs(z),F=Math.abs(I),P=Math.max(R,B,F);R===P?(b=b<0?-1:1,z=I=0):F===P?(I=I<0?-1:1,b=z=0):(z=z<0?-1:1,b=I=0)}else{var N=g(b,z,I);b/=N,z/=N,I/=N}var j=C[u],U=C[u+4],Z=C[u+8],Q=j*b+U*z+Z*I;j-=b*Q,U-=z*Q,Z-=I*Q;var re=g(j,U,Z);j/=re,U/=re,Z/=re;var ne=z*Z-I*U,oe=I*j-b*Z,V=b*U-z*j,$=g(ne,oe,V);ne/=$,oe/=$,V/=$,this.center.jump(M,ve,se,Te),this.radius.idle(M),this.up.jump(M,b,z,I),this.right.jump(M,j,U,Z);var K,G;if(h===2){var X=C[1],q=C[5],W=C[9],ee=X*j+q*U+W*Z,ae=X*ne+q*oe+W*V;Ae<0?K=-Math.PI/2:K=Math.PI/2,G=Math.atan2(ae,ee)}else{var fe=C[2],ye=C[6],xe=C[10],Ae=fe*b+ye*z+xe*I,Me=fe*j+ye*U+xe*Z,Ie=fe*ne+ye*oe+xe*V;K=Math.asin(f(Ae)),G=Math.atan2(Ie,Me)}this.angle.jump(M,G,K),this.recalcMatrix(M);var qe=C[2],je=C[6],ke=C[10],ge=this.computedMatrix;r(ge,C);var le=ge[15],ve=ge[12]/le,se=ge[13]/le,Te=ge[14]/le,Fe=Math.exp(this.computedRadius[0]);this.center.jump(M,ve-qe*Fe,se-je*Fe,Te-ke*Fe)},i.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},i.idle=function(M){this.center.idle(M),this.up.idle(M),this.right.idle(M),this.radius.idle(M),this.angle.idle(M)},i.flush=function(M){this.center.flush(M),this.up.flush(M),this.right.flush(M),this.radius.flush(M),this.angle.flush(M)},i.setDistance=function(M,C){C>0&&this.radius.set(M,Math.log(C))},i.lookAt=function(M,C,_,w){this.recalcMatrix(M),C=C||this.computedEye,_=_||this.computedCenter,w=w||this.computedUp;var h=w[0],u=w[1],A=w[2],b=g(h,u,A);if(!(b<1e-6)){h/=b,u/=b,A/=b;var z=C[0]-_[0],I=C[1]-_[1],N=C[2]-_[2],R=g(z,I,N);if(!(R<1e-6)){z/=R,I/=R,N/=R;var B=this.computedRight,F=B[0],P=B[1],j=B[2],U=h*F+u*P+A*j;F-=U*h,P-=U*u,j-=U*A;var Z=g(F,P,j);if(!(Z<.01&&(F=u*N-A*I,P=A*z-h*N,j=h*I-u*z,Z=g(F,P,j),Z<1e-6))){F/=Z,P/=Z,j/=Z,this.up.set(M,h,u,A),this.right.set(M,F,P,j),this.center.set(M,_[0],_[1],_[2]),this.radius.set(M,Math.log(R));var Q=u*j-A*P,re=A*F-h*j,ne=h*P-u*F,oe=g(Q,re,ne);Q/=oe,re/=oe,ne/=oe;var V=h*z+u*I+A*N,$=F*z+P*I+j*N,K=Q*z+re*I+ne*N,G=Math.asin(f(V)),X=Math.atan2(K,$),q=this.angle._state,W=q[q.length-1],ee=q[q.length-2];W=W%(2*Math.PI);var ae=Math.abs(W+2*Math.PI-X),fe=Math.abs(W-X),ye=Math.abs(W-2*Math.PI-X);ae0?j.pop():new ArrayBuffer(F)}e.mallocArrayBuffer=T;function S(B){return new Uint8Array(T(B),0,B)}e.mallocUint8=S;function M(B){return new Uint16Array(T(2*B),0,B)}e.mallocUint16=M;function C(B){return new Uint32Array(T(4*B),0,B)}e.mallocUint32=C;function _(B){return new Int8Array(T(B),0,B)}e.mallocInt8=_;function w(B){return new Int16Array(T(2*B),0,B)}e.mallocInt16=w;function h(B){return new Int32Array(T(4*B),0,B)}e.mallocInt32=h;function u(B){return new Float32Array(T(4*B),0,B)}e.mallocFloat32=e.mallocFloat=u;function A(B){return new Float64Array(T(8*B),0,B)}e.mallocFloat64=e.mallocDouble=A;function b(B){return o?new Uint8ClampedArray(T(B),0,B):S(B)}e.mallocUint8Clamped=b;function z(B){return s?new BigUint64Array(T(8*B),0,B):null}e.mallocBigUint64=z;function I(B){return c?new BigInt64Array(T(8*B),0,B):null}e.mallocBigInt64=I;function N(B){return new DataView(T(B),0,B)}e.mallocDataView=N;function R(B){B=n.nextPow2(B);var F=n.log2(B),P=p[F];return P.length>0?P.pop():new a(B)}e.mallocBuffer=R,e.clearCache=function(){for(var F=0;F<32;++F)g.UINT8[F].length=0,g.UINT16[F].length=0,g.UINT32[F].length=0,g.INT8[F].length=0,g.INT16[F].length=0,g.INT32[F].length=0,g.FLOAT[F].length=0,g.DOUBLE[F].length=0,g.BIGUINT64[F].length=0,g.BIGINT64[F].length=0,g.UINT8C[F].length=0,f[F].length=0,p[F].length=0}},1755(l){"use strict";"use restrict";l.exports=e;function e(n){this.roots=new Array(n),this.ranks=new Array(n);for(var r=0;r",j="",U=P.length,Z=j.length,Q=R[0]===T||R[0]===C,re=0,ne=-Z;re>-1&&(re=B.indexOf(P,re),!(re===-1||(ne=B.indexOf(j,re+U),ne===-1)||ne<=re));){for(var oe=re;oe=ne)F[oe]=null,B=B.substr(0,oe)+" "+B.substr(oe+1);else if(F[oe]!==null){var V=F[oe].indexOf(R[0]);V===-1?F[oe]+=R:Q&&(F[oe]=F[oe].substr(0,V+1)+(1+parseInt(F[oe][V+1]))+F[oe].substr(V+2))}var $=re+U,K=B.substr($,ne-$),G=K.indexOf(P);G!==-1?re=G:re=ne+Z}return F}function h(N,R,B){for(var F=R.textAlign||"start",P=R.textBaseline||"alphabetic",j=[1<<30,1<<30],U=[0,0],Z=N.length,Q=0;Q/g,` +`):B=B.replace(/\/g," ");var U="",Z=[];for(W=0;W-1?parseInt(se[1+We]):0,mt=Ge>-1?parseInt(Te[1+Ge]):0;gt!==mt&&(Fe=Fe.replace(Me(),"?px "),fe*=Math.pow(.75,mt-gt),Fe=Fe.replace("?px ",Me())),ae+=.25*V*(mt-gt)}if(j.superscripts===!0){var Tt=se.indexOf(T),At=Te.indexOf(T),Kt=Tt>-1?parseInt(se[1+Tt]):0,ar=At>-1?parseInt(Te[1+At]):0;Kt!==ar&&(Fe=Fe.replace(Me(),"?px "),fe*=Math.pow(.75,ar-Kt),Fe=Fe.replace("?px ",Me())),ae-=.25*V*(ar-Kt)}if(j.bolds===!0){var _r=se.indexOf(f)>-1,Zt=Te.indexOf(f)>-1;!_r&&Zt&&(sr?Fe=Fe.replace("italic ","italic bold "):Fe="bold "+Fe),_r&&!Zt&&(Fe=Fe.replace("bold ",""))}if(j.italics===!0){var sr=se.indexOf(m)>-1,Ot=Te.indexOf(m)>-1;!sr&&Ot&&(Fe="italic "+Fe),sr&&!Ot&&(Fe=Fe.replace("italic ",""))}R.font=Fe}for(q=0;q0&&(P=F.size),F.lineSpacing&&F.lineSpacing>0&&(j=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(U.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(U.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(U.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(U.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(U.superscripts=!!F.styletags.superscripts)),B.font=[F.fontStyle,F.fontVariant,F.fontWeight,P+"px",F.font].filter(function(Q){return Q}).join(" "),B.textAlign="start",B.textBaseline="alphabetic",B.direction="ltr";var Z=u(R,B,N,P,j,U);return z(Z,F,P)}},1538(l){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function t(b){b.permitHostObjects___&&b.permitHostObjects___(t)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=t);var n=!1;if(typeof WeakMap=="function"){var r=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var a=new r,o=Object.freeze({});if(a.set(o,1),a.get(o)!==1)n=!0;else{l.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,c=Object.getOwnPropertyNames,g=Object.defineProperty,f=Object.isExtensible,p="weakmap:",m=p+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var i=new ArrayBuffer(25),T=new Uint8Array(i);crypto.getRandomValues(T),m=p+"rand:"+Array.prototype.map.call(T,function(b){return(b%36).toString(36)}).join("")+"___"}function S(b){return!(b.substr(0,p.length)==p&&b.substr(b.length-3)==="___")}if(g(Object,"getOwnPropertyNames",{value:function(z){return c(z).filter(S)}}),"getPropertyNames"in Object){var M=Object.getPropertyNames;g(Object,"getPropertyNames",{value:function(z){return M(z).filter(S)}})}function C(b){if(b!==Object(b))throw new TypeError("Not an object: "+b);var z=b[m];if(z&&z.key===b)return z;if(f(b)){z={key:b};try{return g(b,m,{value:z,writable:!1,enumerable:!1,configurable:!1}),z}catch{return}}}(function(){var b=Object.freeze;g(Object,"freeze",{value:function(R){return C(R),b(R)}});var z=Object.seal;g(Object,"seal",{value:function(R){return C(R),z(R)}});var I=Object.preventExtensions;g(Object,"preventExtensions",{value:function(R){return C(R),I(R)}})})();function _(b){return b.prototype=null,Object.freeze(b)}var w=!1;function h(){!w&&typeof console<"u"&&(w=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var u=0,A=function(){this instanceof A||h();var b=[],z=[],I=u++;function N(P,j){var U,Z=C(P);return Z?I in Z?Z[I]:j:(U=b.indexOf(P),U>=0?z[U]:j)}function R(P){var j=C(P);return j?I in j:b.indexOf(P)>=0}function B(P,j){var U,Z=C(P);return Z?Z[I]=j:(U=b.indexOf(P),U>=0?z[U]=j:(U=b.length,z[U]=j,b[U]=P)),this}function F(P){var j=C(P),U,Z;return j?I in j&&delete j[I]:(U=b.indexOf(P),U<0?!1:(Z=b.length-1,b[U]=void 0,z[U]=z[Z],b[U]=b[Z],b.length=Z,z.length=Z,!0))}return Object.create(A.prototype,{get___:{value:_(N)},has___:{value:_(R)},set___:{value:_(B)},delete___:{value:_(F)}})};A.prototype=Object.create(Object.prototype,{get:{value:function(z,I){return this.get___(z,I)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,I){return this.set___(z,I)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof r=="function"?function(){n&&typeof Proxy<"u"&&(Proxy=void 0);function b(){this instanceof A||h();var z=new r,I=void 0,N=!1;function R(j,U){return I?z.has(j)?z.get(j):I.get___(j,U):z.get(j,U)}function B(j){return z.has(j)||(I?I.has___(j):!1)}var F;n?F=function(j,U){return z.set(j,U),z.has(j)||(I||(I=new A),I.set(j,U)),this}:F=function(j,U){if(N)try{z.set(j,U)}catch{I||(I=new A),I.set___(j,U)}else z.set(j,U);return this};function P(j){var U=!!z.delete(j);return I&&I.delete___(j)||U}return Object.create(A.prototype,{get___:{value:_(R)},has___:{value:_(B)},set___:{value:_(F)},delete___:{value:_(P)},permitHostObjects___:{value:_(function(j){if(j===t)N=!0;else throw new Error("bogus call to permitHostObjects___")})}})}b.prototype=A.prototype,l.exports=b,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),l.exports=A)})()},236(l,e,t){var n=t(8284);l.exports=r;function r(){var a={};return function(o){if((typeof o!="object"||o===null)&&typeof o!="function")throw new Error("Weakmap-shim: Key must be object");var s=o.valueOf(a);return s&&s.identity===a?s:n(o,a)}}},8284(l){l.exports=e;function e(t,n){var r={identity:n},a=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(o){return o!==n?a.apply(this,arguments):r},writable:!0}),r}},606(l,e,t){var n=t(236);l.exports=r;function r(){var a=n();return{get:function(o,s){var c=a(o);return c.hasOwnProperty("value")?c.value:s},set:function(o,s){return a(o).value=s,this},has:function(o){return"value"in a(o)},delete:function(o){return delete a(o).value}}}},3349(l){"use strict";function e(){return function(s,c,g,f,p,m){var i=s[0],T=g[0],S=[0],M=T;f|=0;var C=0,_=T;for(C=0;C=0!=h>=0&&p.push(S[0]+.5+.5*(w+h)/(w-h))}f+=_,++S[0]}}}function t(){return e()}var n=t;function r(s){var c={};return function(f,p,m){var i=f.dtype,T=f.order,S=[i,T.join()].join(),M=c[S];return M||(c[S]=M=s([i,T])),M(f.shape.slice(0),f.data,f.stride,f.offset|0,p,m)}}function a(s){return r(n.bind(void 0,s))}function o(s){return a({funcName:s.funcName})}l.exports=o({funcName:"zeroCrossings"})},781(l,e,t){"use strict";l.exports=r;var n=t(3349);function r(a,o){var s=[];return o=+o||0,n(a.hi(a.shape[0]-1),s,o),s}},7790(){}};let x={};function E(l){let e=x[l];if(e!==void 0)return e.exports;let t=x[l]={id:l,loaded:!1,exports:{}};return v[l].call(t.exports,t,t.exports,E),t.loaded=!0,t.exports}E.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),E.nmd=l=>(l.paths=[],l.children||(l.children=[]),l);let k=E(3065);H.exports=k})()}}),Td=Ee({"src/lib/str2rgbarray.js"(J,H){"use strict";var{normalize:v}=Qn();function x(E){return E?v(E):[0,0,0,1]}H.exports=x}}),Ad=Ee({"src/lib/gl_format_color.js"(J,H){"use strict";var v=mi(),x=pl(),E=Qn(),k=rs().defaultLine,l=vs().isArrayOrTypedArray,e=E.normalize(k),t=1;function n(c,g){return[c[0],c[1],c[2],c[3]*g]}function r(c){return v(c)||!E.isChannelArray(c)&&!E.isValid(c)?e:E.normalize(c)}function a(c){return v(c)?c:t}function o(c,g,f){var p=c.color;p&&p._inputArray&&(p=p._inputArray);var m=l(p),i=l(g),T=x.extractOpts(c),S=[],M,C,_,w,h;if(T.colorscale!==void 0?M=x.makeColorScaleFuncFromTrace(c):M=r,m?C=(A,b)=>A[b]===void 0?e:T.colorscale===void 0?M(A[b]):E.normalize(M(A[b])):C=r,i?_=function(A,b){return A[b]===void 0?t:a(A[b])}:_=a,m||i)for(var u=0;u0){var p=n.c2l(g);n._lowerLogErrorBound||(n._lowerLogErrorBound=p),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,p)}}else a[o]=[-s[0]*t,s[1]*t]}return a}function E(l){for(var e=0;e-1?-1:z.indexOf("right")>-1?1:0}function S(z){return z==null?0:z.indexOf("top")>-1?-1:z.indexOf("bottom")>-1?1:0}function M(z){var I=0,N=0,R=[I,N];if(Array.isArray(z))for(var B=0;B=0){var Z=m(j.position,j.delaunayColor,j.delaunayAxis);Z.opacity=z.opacity,this.delaunayMesh?this.delaunayMesh.update(Z):(Z.gl=I,this.delaunayMesh=k(Z),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},p.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function b(z,I){var N=new f(z,I.uid);return N.update(I),N}H.exports=b}}),J3=Ee({"src/traces/scatter3d/attributes.js"(J,H){"use strict";var v=ou(),x=Xs(),E=$s(),k=Fl().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=Cs(),n=nn(),r=K3(),a=My(),o=vo().extendFlat,s=El().overrideAll,c=(Ev(),tn(Hd)).default,g=v.line,f=v.marker,p=f.line,m=o({width:g.width,dash:{valType:"enumerated",values:c(r),dflt:"solid"}},E("line"));function i(S){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var T=H.exports=s({x:v.x,y:v.y,z:{valType:"data_array"},text:o({},v.text,{}),texttemplate:e(),texttemplatefallback:t({editType:"calc"}),hovertext:o({},v.hovertext,{}),hovertemplate:l(),hovertemplatefallback:t(),xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z"),mode:o({},v.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:i("x"),y:i("y"),z:i("z")},connectgaps:v.connectgaps,line:m,marker:o({symbol:{valType:"enumerated",values:c(a),dflt:"circle",arrayOk:!0},size:o({},f.size,{dflt:8}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:o({},f.opacity,{arrayOk:!1}),colorbar:f.colorbar,line:o({width:o({},p.width,{arrayOk:!1})},E("marker.line"))},E("marker")),textposition:o({},v.textposition,{dflt:"top center"}),textfont:x({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:n.opacity,hoverinfo:o({},n.hoverinfo)},"calc","nested");T.x.editType=T.y.editType=T.z.editType="calc+clearAxisTypes"}}),t8=Ee({"src/traces/scatter3d/defaults.js"(J,H){"use strict";var v=Ri(),x=Vr(),E=nl(),k=gh(),l=Rh(),e=Fh(),t=J3();H.exports=function(a,o,s,c){function g(C,_){return x.coerce(a,o,t,C,_)}var f=n(a,o,g,c);if(!f){o.visible=!1;return}g("text"),g("hovertext"),g("hovertemplate"),g("hovertemplatefallback"),g("xhoverformat"),g("yhoverformat"),g("zhoverformat"),g("mode"),E.hasMarkers(o)&&k(a,o,s,c,g,{noAngle:!0,noLineDash:!0,noSelect:!0}),E.hasLines(o)&&(g("connectgaps"),l(a,o,s,c,g)),E.hasText(o)&&(g("texttemplate"),g("texttemplatefallback"),e(a,o,c,g,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var p=(o.line||{}).color,m=(o.marker||{}).color;g("surfaceaxis")>=0&&g("surfacecolor",p||m);for(var i=["x","y","z"],T=0;T<3;++T){var S="projection."+i[T];g(S+".show")&&(g(S+".opacity"),g(S+".scale"))}var M=v.getComponentMethod("errorbars","supplyDefaults");M(a,o,p||m||s,{axis:"z"}),M(a,o,p||m||s,{axis:"y",inherit:"z"}),M(a,o,p||m||s,{axis:"x",inherit:"z"})};function n(r,a,o,s){var c=0,g=o("x"),f=o("y"),p=o("z"),m=v.getComponentMethod("calendars","handleTraceDefaults");return m(r,a,["x","y","z"],s),g&&f&&p&&(c=Math.min(g.length,f.length,p.length),a._length=a._xlength=a._ylength=a._zlength=c),c}}}),r8=Ee({"src/traces/scatter3d/calc.js"(J,H){"use strict";var v=$h(),x=yh();H.exports=function(k,l){var e=[{x:!1,y:!1,trace:l,t:{}}];return v(e,l),x(k,l),e}}}),a8=Ee({"node_modules/get-canvas-context/index.js"(J,H){H.exports=v;function v(x,E){if(typeof x!="string")throw new TypeError("must specify type string");if(E=E||{},typeof document>"u"&&!E.canvas)return null;var k=E.canvas||document.createElement("canvas");typeof E.width=="number"&&(k.width=E.width),typeof E.height=="number"&&(k.height=E.height);var l=E,e;try{var t=[x];x.indexOf("webgl")===0&&t.push("experimental-"+x);for(var n=0;n/g," "));o[s]=p,c.tickmode=g}}n.ticks=o;for(var s=0;s<3;++s){k[s]=.5*(t.glplot.bounds[0][s]+t.glplot.bounds[1][s]);for(var m=0;m<2;++m)n.bounds[m][s]=t.glplot.bounds[m][s]}t.contourLevels=l(o)}}}),l8=Ee({"src/plots/gl3d/scene.js"(J,H){"use strict";var v=Xc().gl_plot3d,x=v.createCamera,E=v.createScene,k=n8(),l=Fg(),e=Ri(),t=Vr(),n=t.preserveDrawingBuffer(),r=uo(),a=$l(),o=Td(),s=Q3(),c=fx(),g=i8(),f=o8(),p=s8(),m=Ph().applyAutorangeOptions,i,T,S=!1;function M(N,R){var B=document.createElement("div"),F=N.container;this.graphDiv=N.graphDiv;var P=document.createElementNS("http://www.w3.org/2000/svg","svg");P.style.position="absolute",P.style.top=P.style.left="0px",P.style.width=P.style.height="100%",P.style["z-index"]=20,P.style["pointer-events"]="none",B.appendChild(P),this.svgContainer=P,B.id=N.id,B.style.position="absolute",B.style.top=B.style.left="0px",B.style.width=B.style.height="100%",F.appendChild(B),this.fullLayout=R,this.id=N.id||"scene",this.fullSceneLayout=R[this.id],this.plotArgs=[[],{},{}],this.axesOptions=g(R,R[this.id]),this.spikeOptions=f(R[this.id]),this.container=B,this.staticMode=!!N.staticPlot,this.pixelRatio=this.pixelRatio||N.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var C=M.prototype;C.prepareOptions=function(){var N=this,R={canvas:N.canvas,gl:N.gl,glOptions:{preserveDrawingBuffer:n,premultipliedAlpha:!0,antialias:!0},container:N.container,axes:N.axesOptions,spikes:N.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:N.camera,pixelRatio:N.pixelRatio};if(N.staticMode){if(!T&&(i=document.createElement("canvas"),T=k({canvas:i,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!T))throw new Error("error creating static canvas/context for image server");R.gl=T,R.canvas=i}return R};var _=!0;C.tryCreatePlot=function(){var N=this,R=N.prepareOptions(),B=!0;try{N.glplot=E(R)}catch{if(N.staticMode||!_||n)B=!1;else{t.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{n=R.glOptions.preserveDrawingBuffer=!0,N.glplot=E(R)}catch{n=R.glOptions.preserveDrawingBuffer=!1,B=!1}}}return _=!1,B},C.initializeGLCamera=function(){var N=this,R=N.fullSceneLayout.camera,B=R.projection.type==="orthographic";N.camera=x(N.container,{center:[R.center.x,R.center.y,R.center.z],eye:[R.eye.x,R.eye.y,R.eye.z],up:[R.up.x,R.up.y,R.up.z],_ortho:B,zoomMin:.01,zoomMax:100,mode:"orbit"})},C.initializeGLPlot=function(){var N=this;N.initializeGLCamera();var R=N.tryCreatePlot();if(!R)return s(N);N.traces={},N.make4thDimension();var B=N.graphDiv,F=B.layout,P=function(){var U={};return N.isCameraChanged(F)&&(U[N.id+".camera"]=N.getCamera()),N.isAspectChanged(F)&&(U[N.id+".aspectratio"]=N.glplot.getAspectratio(),F[N.id].aspectmode!=="manual"&&(N.fullSceneLayout.aspectmode=F[N.id].aspectmode=U[N.id+".aspectmode"]="manual")),U},j=function(U){if(U.fullSceneLayout.dragmode!==!1){var Z=P();U.saveLayout(F),U.graphDiv.emit("plotly_relayout",Z)}};return N.glplot.canvas&&(N.glplot.canvas.addEventListener("mouseup",function(){j(N)}),N.glplot.canvas.addEventListener("touchstart",function(){S=!0}),N.glplot.canvas.addEventListener("wheel",function(U){if(B._context._scrollZoom.gl3d){if(N.camera._ortho){var Z=U.deltaX>U.deltaY?1.1:.9090909090909091,Q=N.glplot.getAspectratio();N.glplot.setAspectratio({x:Z*Q.x,y:Z*Q.y,z:Z*Q.z})}j(N)}},l?{passive:!1}:!1),N.glplot.canvas.addEventListener("mousemove",function(){if(N.fullSceneLayout.dragmode!==!1&&N.camera.mouseListener.buttons!==0){var U=P();N.graphDiv.emit("plotly_relayouting",U)}}),N.staticMode||N.glplot.canvas.addEventListener("webglcontextlost",function(U){B&&B.emit&&B.emit("plotly_webglcontextlost",{event:U,layer:N.id})},!1)),N.glplot.oncontextloss=function(){N.recoverContext()},N.glplot.onrender=function(){N.render()},!0},C.render=function(){var N=this,R=N.graphDiv,B,F=N.svgContainer,P=N.container.getBoundingClientRect();R._fullLayout._calcInverseTransform(R);var j=R._fullLayout._invScaleX,U=R._fullLayout._invScaleY,Z=P.width*j,Q=P.height*U;F.setAttributeNS(null,"viewBox","0 0 "+Z+" "+Q),F.setAttributeNS(null,"width",Z),F.setAttributeNS(null,"height",Q),p(N),N.glplot.axes.update(N.axesOptions);for(var re=Object.keys(N.traces),ne=null,oe=N.glplot.selection,V=0;V")):B.type==="isosurface"||B.type==="volume"?(q.valueLabel=r.hoverLabelText(N._mockAxis,N._mockAxis.d2l(oe.traceCoordinate[3]),B.valuehoverformat),ye.push("value: "+q.valueLabel),oe.textLabel&&ye.push(oe.textLabel),fe=ye.join("
")):fe=oe.textLabel;var xe={x:oe.traceCoordinate[0],y:oe.traceCoordinate[1],z:oe.traceCoordinate[2],data:G._input,fullData:G,curveNumber:G.index,pointNumber:X};a.appendArrayPointValue(xe,G,X),B._module.eventData&&(xe=G._module.eventData(xe,oe,G,{},X));var Ae={points:[xe]};if(N.fullSceneLayout.hovermode){var Me=[];a.loneHover({trace:G,x:(.5+.5*K[0]/K[3])*Z,y:(.5-.5*K[1]/K[3])*Q,xLabel:q.xLabel,yLabel:q.yLabel,zLabel:q.zLabel,text:fe,name:ne.name,color:a.castHoverOption(G,X,"bgcolor")||ne.color,borderColor:a.castHoverOption(G,X,"bordercolor"),fontFamily:a.castHoverOption(G,X,"font.family"),fontSize:a.castHoverOption(G,X,"font.size"),fontColor:a.castHoverOption(G,X,"font.color"),nameLength:a.castHoverOption(G,X,"namelength"),textAlign:a.castHoverOption(G,X,"align"),hovertemplate:t.castOption(G,X,"hovertemplate"),hovertemplateLabels:t.extendFlat({},xe,q),eventData:[xe]},{container:F,gd:R,inOut_bbox:Me}),xe.bbox=Me[0]}oe.distance<5&&(oe.buttons||S)?R.emit("plotly_click",Ae):R.emit("plotly_hover",Ae),this.oldEventData=Ae}else a.loneUnhover(F),this.oldEventData&&R.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;N.drawAnnotations(N)},C.recoverContext=function(){var N=this;N.glplot.dispose();var R=function(){if(N.glplot.gl.isContextLost()){requestAnimationFrame(R);return}if(!N.initializeGLPlot()){t.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}N.plot.apply(N,N.plotArgs)};requestAnimationFrame(R)};var w=["xaxis","yaxis","zaxis"];function h(N,R,B){for(var F=N.fullSceneLayout,P=0;P<3;P++){var j=w[P],U=j.charAt(0),Z=F[j],Q=R[U],re=R[U+"calendar"],ne=R["_"+U+"length"];if(!t.isArrayOrTypedArray(Q))B[0][P]=Math.min(B[0][P],0),B[1][P]=Math.max(B[1][P],ne-1);else for(var oe,V=0;V<(ne||Q.length);V++)if(t.isArrayOrTypedArray(Q[V]))for(var $=0;$G[1][U])G[0][U]=-1,G[1][U]=1;else{var qe=G[1][U]-G[0][U];G[0][U]-=qe/32,G[1][U]+=qe/32}if(W=[G[0][U],G[1][U]],W=m(W,Q),G[0][U]=W[0],G[1][U]=W[1],Q.isReversed()){var je=G[0][U];G[0][U]=G[1][U],G[1][U]=je}}else W=Q.range,G[0][U]=Q.r2l(W[0]),G[1][U]=Q.r2l(W[1]);G[0][U]===G[1][U]&&(G[0][U]-=1,G[1][U]+=1),X[U]=G[1][U]-G[0][U],Q.range=[G[0][U],G[1][U]],Q.limitRange(),F.glplot.setBounds(U,{min:Q.range[0]*$[U],max:Q.range[1]*$[U]})}var ke,ge=ne.aspectmode;if(ge==="cube")ke=[1,1,1];else if(ge==="manual"){var le=ne.aspectratio;ke=[le.x,le.y,le.z]}else if(ge==="auto"||ge==="data"){var ve=[1,1,1];for(U=0;U<3;++U){Q=ne[w[U]],re=Q.type;var se=q[re];ve[U]=Math.pow(se.acc,1/se.count)/$[U]}ge==="data"||Math.max.apply(null,ve)/Math.min.apply(null,ve)<=4?ke=ve:ke=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ne.aspectratio.x=oe.aspectratio.x=ke[0],ne.aspectratio.y=oe.aspectratio.y=ke[1],ne.aspectratio.z=oe.aspectratio.z=ke[2],F.glplot.setAspectratio(ne.aspectratio),F.viewInitial.aspectratio||(F.viewInitial.aspectratio={x:ne.aspectratio.x,y:ne.aspectratio.y,z:ne.aspectratio.z}),F.viewInitial.aspectmode||(F.viewInitial.aspectmode=ne.aspectmode);var Te=ne.domain||null,Fe=R._size||null;if(Te&&Fe){var We=F.container.style;We.position="absolute",We.left=Fe.l+Te.x[0]*Fe.w+"px",We.top=Fe.t+(1-Te.y[1])*Fe.h+"px",We.width=Fe.w*(Te.x[1]-Te.x[0])+"px",We.height=Fe.h*(Te.y[1]-Te.y[0])+"px"}F.glplot.redraw()}},C.destroy=function(){var N=this;N.glplot&&(N.camera.mouseListener.enabled=!1,N.container.removeEventListener("wheel",N.camera.wheelListener),N.camera=null,N.glplot.dispose(),N.container.parentNode.removeChild(N.container),N.glplot=null)};function A(N){return[[N.eye.x,N.eye.y,N.eye.z],[N.center.x,N.center.y,N.center.z],[N.up.x,N.up.y,N.up.z]]}function b(N){return{up:{x:N.up[0],y:N.up[1],z:N.up[2]},center:{x:N.center[0],y:N.center[1],z:N.center[2]},eye:{x:N.eye[0],y:N.eye[1],z:N.eye[2]},projection:{type:N._ortho===!0?"orthographic":"perspective"}}}C.getCamera=function(){var N=this;return N.camera.view.recalcMatrix(N.camera.view.lastT()),b(N.camera)},C.setViewport=function(N){var R=this,B=N.camera;R.camera.lookAt.apply(this,A(B)),R.glplot.setAspectratio(N.aspectratio);var F=B.projection.type==="orthographic",P=R.camera._ortho;F!==P&&(R.glplot.redraw(),R.glplot.clearRGBA(),R.glplot.dispose(),R.initializeGLPlot())},C.isCameraChanged=function(N){var R=this,B=R.getCamera(),F=t.nestedProperty(N,R.id+".camera"),P=F.get();function j(re,ne,oe,V){var $=["up","center","eye"],K=["x","y","z"];return ne[$[oe]]&&re[$[oe]][K[V]]===ne[$[oe]][K[V]]}var U=!1;if(P===void 0)U=!0;else{for(var Z=0;Z<3;Z++)for(var Q=0;Q<3;Q++)if(!j(B,P,Z,Q)){U=!0;break}(!P.projection||B.projection&&B.projection.type!==P.projection.type)&&(U=!0)}return U},C.isAspectChanged=function(N){var R=this,B=R.glplot.getAspectratio(),F=t.nestedProperty(N,R.id+".aspectratio"),P=F.get();return P===void 0||P.x!==B.x||P.y!==B.y||P.z!==B.z},C.saveLayout=function(N){var R=this,B=R.fullLayout,F,P,j,U,Z,Q,re=R.isCameraChanged(N),ne=R.isAspectChanged(N),oe=re||ne;if(oe){var V={};if(re&&(F=R.getCamera(),P=t.nestedProperty(N,R.id+".camera"),j=P.get(),V[R.id+".camera"]=j),ne&&(U=R.glplot.getAspectratio(),Z=t.nestedProperty(N,R.id+".aspectratio"),Q=Z.get(),V[R.id+".aspectratio"]=Q),e.call("_storeDirectGUIEdit",N,B._preGUI,V),re){P.set(F);var $=t.nestedProperty(B,R.id+".camera");$.set(F)}if(ne){Z.set(U);var K=t.nestedProperty(B,R.id+".aspectratio");K.set(U),R.glplot.redraw()}}return oe},C.updateFx=function(N,R){var B=this,F=B.camera;if(F)if(N==="orbit")F.mode="orbit",F.keyBindingMode="rotate";else if(N==="turntable"){F.up=[0,0,1],F.mode="turntable",F.keyBindingMode="rotate";var P=B.graphDiv,j=P._fullLayout,U=B.fullSceneLayout.camera,Z=U.up.x,Q=U.up.y,re=U.up.z;if(re/Math.sqrt(Z*Z+Q*Q+re*re)<.999){var ne=B.id+".camera.up",oe={x:0,y:0,z:1},V={};V[ne]=oe;var $=P.layout;e.call("_storeDirectGUIEdit",$,j._preGUI,V),U.up=oe,t.nestedProperty($,ne).set(oe)}}else F.keyBindingMode=N;B.fullSceneLayout.hovermode=R};function z(N,R,B){for(var F=0,P=B-1;F0)for(var Z=255/U,Q=0;Q<3;++Q)N[j+Q]=Math.min(Z*N[j+Q],255)}}C.toImage=function(N){var R=this;N||(N="png"),R.staticMode&&R.container.appendChild(i),R.glplot.redraw();var B=R.glplot.gl,F=B.drawingBufferWidth,P=B.drawingBufferHeight;B.bindFramebuffer(B.FRAMEBUFFER,null);var j=new Uint8Array(F*P*4);B.readPixels(0,0,F,P,B.RGBA,B.UNSIGNED_BYTE,j),z(j,F,P),I(j,F,P);var U=document.createElement("canvas");U.width=F,U.height=P;var Z=U.getContext("2d",{willReadFrequently:!0}),Q=Z.createImageData(F,P);Q.data.set(j),Z.putImageData(Q,0,0);var re;switch(N){case"jpeg":re=U.toDataURL("image/jpeg");break;case"webp":re=U.toDataURL("image/webp");break;default:re=U.toDataURL("image/png")}return R.staticMode&&R.container.removeChild(i),re},C.setConvert=function(){for(var N=this,R=0;R<3;R++){var B=N.fullSceneLayout[w[R]];r.setConvert(B,N.fullLayout),B.setScale=t.noop}},C.make4thDimension=function(){var N=this,R=N.graphDiv,B=R._fullLayout;N._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},r.setConvert(N._mockAxis,B)},H.exports=M}}),u8=Ee({"src/plots/gl3d/layout/attributes.js"(J,H){"use strict";H.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),ew=Ee({"src/plots/gl3d/layout/axis_attributes.js"(J,H){"use strict";var v=Qn(),x=Gc(),E=vo().extendFlat,k=El().overrideAll;H.exports=k({visible:x.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:v.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:x.color,categoryorder:x.categoryorder,categoryarray:x.categoryarray,title:{text:x.title.text,font:x.title.font},type:E({},x.type,{values:["-","linear","log","date","category"]}),autotypenumbers:x.autotypenumbers,autorange:x.autorange,autorangeoptions:{minallowed:x.autorangeoptions.minallowed,maxallowed:x.autorangeoptions.maxallowed,clipmin:x.autorangeoptions.clipmin,clipmax:x.autorangeoptions.clipmax,include:x.autorangeoptions.include,editType:"plot"},rangemode:x.rangemode,minallowed:x.minallowed,maxallowed:x.maxallowed,range:E({},x.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:x.minor.tickmode,nticks:x.nticks,tick0:x.tick0,dtick:x.dtick,tickvals:x.tickvals,ticktext:x.ticktext,ticks:x.ticks,mirror:x.mirror,ticklen:x.ticklen,tickwidth:x.tickwidth,tickcolor:x.tickcolor,showticklabels:x.showticklabels,labelalias:x.labelalias,tickfont:x.tickfont,tickangle:x.tickangle,tickprefix:x.tickprefix,showtickprefix:x.showtickprefix,ticksuffix:x.ticksuffix,showticksuffix:x.showticksuffix,showexponent:x.showexponent,exponentformat:x.exponentformat,minexponent:x.minexponent,separatethousands:x.separatethousands,tickformat:x.tickformat,tickformatstops:x.tickformatstops,hoverformat:x.hoverformat,showline:x.showline,linecolor:x.linecolor,linewidth:x.linewidth,showgrid:x.showgrid,gridcolor:E({},x.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:x.gridwidth,zeroline:x.zeroline,zerolinecolor:x.zerolinecolor,zerolinewidth:x.zerolinewidth},"plot","from-root")}}),tw=Ee({"src/plots/gl3d/layout/layout_attributes.js"(J,H){"use strict";var v=ew(),x=kl().attributes,E=vo().extendFlat,k=Vr().counterRegex;function l(e,t,n){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:n,editType:"camera"},editType:"camera"}}H.exports={_arrayAttrRegexps:[k("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:E(l(0,0,1),{}),center:E(l(0,0,0),{}),eye:E(l(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:x({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:v,yaxis:v,zaxis:v,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot"}}}),c8=Ee({"src/plots/gl3d/layout/axis_defaults.js"(J,H){"use strict";var v=Qn(),x=Vr(),E=xs(),k=ew(),l=ux(),e=K0(),t=["xaxis","yaxis","zaxis"],n=100*136/187;H.exports=function(a,o,s){var c,g;function f(i,T){return x.coerce(c,g,k,i,T)}for(var p=0;p1;function f(p){if(!g){var m=v.validate(o[p],e[p]);if(m)return o[p]}}k(o,s,c,{type:n,attributes:e,handleDefaults:r,fullLayout:s,font:s.font,fullData:c,getDfltFromLayout:f,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function r(a,o,s,c){for(var g=s("bgcolor"),f=x.combine(g,c.paper_bgcolor),p=["up","center","eye"],m=0;m.999)&&(C="turntable")}else C="turntable";s("dragmode",C),s("hovermode",c.getDfltFromLayout("hovermode"))}}}),ov=Ee({"src/plots/gl3d/index.js"(J){"use strict";var H=El().overrideAll,v=Ei(),x=l8(),E=uf().getSubplotData,k=Vr(),l=mh(),e="gl3d",t="scene";J.name=e,J.attr=t,J.idRoot=t,J.idRegex=J.attrRegex=k.counterRegex("scene"),J.attributes=u8(),J.layoutAttributes=tw(),J.baseLayoutAttrOverrides=H({hoverlabel:v.hoverlabel},"plot","nested"),J.supplyLayoutDefaults=f8(),J.plot=function(r){for(var a=r._fullLayout,o=r._fullData,s=a._subplots[e],c=0;c0){z=c[I];break}return z}function m(A,b){if(!(A<1||b<1)){for(var z=f(A),I=f(b),N=1,R=0;RM;)I--,I/=p(I),I++,I1?N:1};function C(A,b,z){var I=z[8]+z[2]*b[0]+z[5]*b[1];return A[0]=(z[6]+z[0]*b[0]+z[3]*b[1])/I,A[1]=(z[7]+z[1]*b[0]+z[4]*b[1])/I,A}function _(A,b,z){return w(A,b,C,z),A}function w(A,b,z,I){for(var N=[0,0],R=A.shape[0],B=A.shape[1],F=0;F0&&this.contourStart[I]!==null&&this.contourEnd[I]!==null&&this.contourEnd[I]>this.contourStart[I]))for(b[I]=!0,N=this.contourStart[I];NQ&&(this.minValues[j]=Q),this.maxValues[j]c&&(n.isomin=null,n.isomax=null);var g=o("x"),f=o("y"),p=o("z"),m=o("value");if(!g||!g.length||!f||!f.length||!p||!p.length||!m||!m.length){n.visible=!1;return}var i=x.getComponentMethod("calendars","handleTraceDefaults");i(t,n,["x","y","z"],a),o("valuehoverformat"),["x","y","z"].forEach(function(C){o(C+"hoverformat");var _="caps."+C,w=o(_+".show");w&&o(_+".fill");var h="slices."+C,u=o(h+".show");u&&(o(h+".fill"),o(h+".locations"))});var T=o("spaceframe.show");T&&o("spaceframe.fill");var S=o("surface.show");S&&(o("surface.count"),o("surface.fill"),o("surface.pattern"));var M=o("contour.show");M&&(o("contour.color"),o("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(C){o(C)}),k(t,n,a,o,{prefix:"",cLetter:"c"}),n._length=null}H.exports={supplyDefaults:l,supplyIsoDefaults:e}}}),Ey=Ee({"src/traces/streamtube/calc.js"(J,H){"use strict";var v=Vr(),x=Sf();function E(t,n){n._len=Math.min(n.u.length,n.v.length,n.w.length,n.x.length,n.y.length,n.z.length),n._u=e(n.u,n._len),n._v=e(n.v,n._len),n._w=e(n.w,n._len),n._x=e(n.x,n._len),n._y=e(n.y,n._len),n._z=e(n.z,n._len);var r=k(n);n._gridFill=r.fill,n._Xs=r.Xs,n._Ys=r.Ys,n._Zs=r.Zs,n._len=r.len;var a=0,o,s,c;n.starts&&(o=e(n.starts.x||[]),s=e(n.starts.y||[]),c=e(n.starts.z||[]),a=Math.min(o.length,s.length,c.length)),n._startsX=o||[],n._startsY=s||[],n._startsZ=c||[];var g=0,f=1/0,p;for(p=0;p1&&(u=n[o-1],b=r[o-1],I=a[o-1]),s=0;su?"-":"+")+"x"),M=M.replace("y",(A>b?"-":"+")+"y"),M=M.replace("z",(z>I?"-":"+")+"z");var F=function(){o=0,N=[],R=[],B=[]};(!o||o0;f--){var p=Math.min(g[f],g[f-1]),m=Math.max(g[f],g[f-1]);if(m>p&&p-1}function ee(Ot,vt){return Ot===null?vt:Ot}function ae(Ot,vt,ht){re();var Re=[vt],Be=[ht];if(G>=1)Re=[vt],Be=[ht];else if(G>0){var He=q(vt,ht);Re=He.xyzv,Be=He.abc}for(var $e=0;$e-1?ht[Je]:Q(Mt,dt,Dt);Vt>-1?Ze[Je]=Vt:Ze[Je]=oe(Mt,dt,Dt,ee(Ot,Ct))}V(Ze[0],Ze[1],Ze[2])}}function fe(Ot,vt,ht){var Re=function(Be,He,$e){ae(Ot,[vt[Be],vt[He],vt[$e]],[ht[Be],ht[He],ht[$e]])};Re(0,1,2),Re(2,3,0)}function ye(Ot,vt,ht){var Re=function(Be,He,$e){ae(Ot,[vt[Be],vt[He],vt[$e]],[ht[Be],ht[He],ht[$e]])};Re(0,1,2),Re(3,0,1),Re(2,3,0),Re(1,2,3)}function xe(Ot,vt,ht,Re){var Be=Ot[3];BeRe&&(Be=Re);for(var He=(Ot[3]-Be)/(Ot[3]-vt[3]+1e-9),$e=[],Ze=0;Ze<4;Ze++)$e[Ze]=(1-He)*Ot[Ze]+He*vt[Ze];return $e}function Ae(Ot,vt,ht){return Ot>=vt&&Ot<=ht}function Me(Ot){var vt=.001*(F-B);return Ot>=B-vt&&Ot<=F+vt}function Ie(Ot){for(var vt=[],ht=0;ht<4;ht++){var Re=Ot[ht];vt.push([c._x[Re],c._y[Re],c._z[Re],c._value[Re]])}return vt}var qe=3;function je(Ot,vt,ht,Re,Be,He){He||(He=1),ht=[-1,-1,-1];var $e=!1,Ze=[Ae(vt[0][3],Re,Be),Ae(vt[1][3],Re,Be),Ae(vt[2][3],Re,Be)];if(!Ze[0]&&!Ze[1]&&!Ze[2])return!1;var Je=function(dt,Dt,Ct){return Me(Dt[0][3])&&Me(Dt[1][3])&&Me(Dt[2][3])?(ae(dt,Dt,Ct),!0):HeZe?[N,He]:[He,R];Tt(vt,Je[0],Je[1])}}var Mt=[[Math.min(B,R),Math.max(B,R)],[Math.min(N,F),Math.max(N,F)]];["x","y","z"].forEach(function(dt){for(var Dt=[],Ct=0;Ct0&&($t.push(cr.id),dt==="x"?It.push([cr.distRatio,0,0]):dt==="y"?It.push([0,cr.distRatio,0]):It.push([0,0,cr.distRatio]))}else dt==="x"?ia=_r(1,u-1):dt==="y"?ia=_r(1,A-1):ia=_r(1,b-1);$t.length>0&&(dt==="x"?Dt[Vt]=At(Ot,$t,Ht,Wt,It,Dt[Vt]):dt==="y"?Dt[Vt]=Kt(Ot,$t,Ht,Wt,It,Dt[Vt]):Dt[Vt]=ar(Ot,$t,Ht,Wt,It,Dt[Vt]),Vt++),ia.length>0&&(dt==="x"?Dt[Vt]=Fe(Ot,ia,Ht,Wt,Dt[Vt]):dt==="y"?Dt[Vt]=We(Ot,ia,Ht,Wt,Dt[Vt]):Dt[Vt]=Ge(Ot,ia,Ht,Wt,Dt[Vt]),Vt++)}var fr=c.caps[dt];fr.show&&fr.fill&&(X(fr.fill),dt==="x"?Dt[Vt]=Fe(Ot,[0,u-1],Ht,Wt,Dt[Vt]):dt==="y"?Dt[Vt]=We(Ot,[0,A-1],Ht,Wt,Dt[Vt]):Dt[Vt]=Ge(Ot,[0,b-1],Ht,Wt,Dt[Vt]),Vt++)}}),S===0&&ne(),c._meshX=P,c._meshY=j,c._meshZ=U,c._meshIntensity=Z,c._Xs=_,c._Ys=w,c._Zs=h}return sr(),c}function s(c,g){var f=c.glplot.gl,p=v({gl:f}),m=new n(c,p,g.uid);return p._trace=m,m.update(g),c.glplot.add(p),m}H.exports={findNearestOnAxis:t,generateIsoMeshes:o,createIsosurfaceTrace:s}}}),y8=Ee({"src/traces/isosurface/index.js"(J,H){"use strict";H.exports={attributes:Sy(),supplyDefaults:aw().supplyDefaults,calc:nw(),colorbar:{min:"cmin",max:"cmax"},plot:ky().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:ov(),categories:["gl3d","showLegend"],meta:{}}}}),_8=Ee({"lib/isosurface.js"(J,H){"use strict";H.exports=y8()}}),iw=Ee({"src/traces/volume/attributes.js"(J,H){"use strict";var v=$s(),x=Sy(),E=Lm(),k=nn(),l=vo().extendFlat,e=El().overrideAll,t=H.exports=e(l({x:x.x,y:x.y,z:x.z,value:x.value,isomin:x.isomin,isomax:x.isomax,surface:x.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:x.slices,caps:x.caps,text:x.text,hovertext:x.hovertext,xhoverformat:x.xhoverformat,yhoverformat:x.yhoverformat,zhoverformat:x.zhoverformat,valuehoverformat:x.valuehoverformat,hovertemplate:x.hovertemplate,hovertemplatefallback:x.hovertemplatefallback},v("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:x.colorbar,opacity:x.opacity,opacityscale:E.opacityscale,lightposition:x.lightposition,lighting:x.lighting,flatshading:x.flatshading,contour:x.contour,hoverinfo:l({},k.hoverinfo),showlegend:l({},k.showlegend,{dflt:!1})}),"calc","nested");t.x.editType=t.y.editType=t.z.editType=t.value.editType="calc+clearAxisTypes"}}),b8=Ee({"src/traces/volume/defaults.js"(J,H){"use strict";var v=Vr(),x=iw(),E=aw().supplyIsoDefaults,k=rw().opacityscaleDefaults;H.exports=function(e,t,n,r){function a(o,s){return v.coerce(e,t,x,o,s)}E(e,t,n,r,a),k(e,t,r,a)}}}),x8=Ee({"src/traces/volume/convert.js"(J,H){"use strict";var v=Xc().gl_mesh3d,x=Ad().parseColorScale,E=Vr().isArrayOrTypedArray,k=Td(),l=pl().extractOpts,e=s0(),t=ky().findNearestOnAxis,n=ky().generateIsoMeshes;function r(s,c,g){this.scene=s,this.uid=g,this.mesh=c,this.name="",this.data=null,this.showContour=!1}var a=r.prototype;a.handlePick=function(s){if(s.object===this.mesh){var c=s.data.index,g=this.data._meshX[c],f=this.data._meshY[c],p=this.data._meshZ[c],m=this.data._Ys.length,i=this.data._Zs.length,T=t(g,this.data._Xs).id,S=t(f,this.data._Ys).id,M=t(p,this.data._Zs).id,C=s.index=M+i*S+i*m*T;s.traceCoordinate=[this.data._meshX[C],this.data._meshY[C],this.data._meshZ[C],this.data._value[C]];var _=this.data.hovertext||this.data.text;return E(_)&&_[C]!==void 0?s.textLabel=_[C]:_&&(s.textLabel=_),!0}},a.update=function(s){var c=this.scene,g=c.fullSceneLayout;this.data=n(s);function f(S,M,C,_){return M.map(function(w){return S.d2l(w,0,_)*C})}var p=e(f(g.xaxis,s._meshX,c.dataScale[0],s.xcalendar),f(g.yaxis,s._meshY,c.dataScale[1],s.ycalendar),f(g.zaxis,s._meshZ,c.dataScale[2],s.zcalendar)),m=e(s._meshI,s._meshJ,s._meshK),i={positions:p,cells:m,lightPosition:[s.lightposition.x,s.lightposition.y,s.lightposition.z],ambient:s.lighting.ambient,diffuse:s.lighting.diffuse,specular:s.lighting.specular,roughness:s.lighting.roughness,fresnel:s.lighting.fresnel,vertexNormalsEpsilon:s.lighting.vertexnormalsepsilon,faceNormalsEpsilon:s.lighting.facenormalsepsilon,opacity:s.opacity,opacityscale:s.opacityscale,contourEnable:s.contour.show,contourColor:k(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},T=l(s);i.vertexIntensity=s._meshIntensity,i.vertexIntensityBounds=[T.min,T.max],i.colormap=x(s),this.mesh.update(i)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function o(s,c){var g=s.glplot.gl,f=v({gl:g}),p=new r(s,f,c.uid);return f._trace=p,p.update(c),s.glplot.add(f),p}H.exports=o}}),w8=Ee({"src/traces/volume/index.js"(J,H){"use strict";H.exports={attributes:iw(),supplyDefaults:b8(),calc:nw(),colorbar:{min:"cmin",max:"cmax"},plot:x8(),moduleType:"trace",name:"volume",basePlotModule:ov(),categories:["gl3d","showLegend"],meta:{}}}}),T8=Ee({"lib/volume.js"(J,H){"use strict";H.exports=w8()}}),A8=Ee({"src/traces/mesh3d/defaults.js"(J,H){"use strict";var v=Ri(),x=Vr(),E=Cc(),k=o0();H.exports=function(e,t,n,r){function a(f,p){return x.coerce(e,t,k,f,p)}function o(f){var p=f.map(function(m){var i=a(m);return i&&x.isArrayOrTypedArray(i)?i:null});return p.every(function(m){return m&&m.length===p[0].length})&&p}var s=o(["x","y","z"]);if(!s){t.visible=!1;return}if(o(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j)){t.visible=!1;return}var c=v.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],r),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(f){a(f)});var g=a("contour.show");g&&(a("contour.color"),a("contour.width")),"intensity"in e?(a("intensity"),a("intensitymode"),E(e,t,r,a,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?a("facecolor"):"vertexcolor"in e?a("vertexcolor"):a("color",n)),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}}),M8=Ee({"src/traces/mesh3d/calc.js"(J,H){"use strict";var v=Sf();H.exports=function(E,k){k.intensity&&v(E,k,{vals:k.intensity,containerStr:"",cLetter:"c"})}}}),S8=Ee({"src/traces/mesh3d/convert.js"(J,H){"use strict";var v=Xc().gl_mesh3d,x=Xc().delaunay_triangulate,E=Xc().alpha_shape,k=Xc().convex_hull,l=Ad().parseColorScale,e=Vr().isArrayOrTypedArray,t=Td(),n=pl().extractOpts,r=s0();function a(i,T,S){this.scene=i,this.uid=S,this.mesh=T,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var o=a.prototype;o.handlePick=function(i){if(i.object===this.mesh){var T=i.index=i.data.index;i.data._cellCenter?i.traceCoordinate=i.data.dataCoordinate:i.traceCoordinate=[this.data.x[T],this.data.y[T],this.data.z[T]];var S=this.data.hovertext||this.data.text;return e(S)&&S[T]!==void 0?i.textLabel=S[T]:S&&(i.textLabel=S),!0}};function s(i){for(var T=[],S=i.length,M=0;M=T-.5)return!1;return!0}o.update=function(i){var T=this.scene,S=T.fullSceneLayout;this.data=i;var M=i.x.length,C=r(c(S.xaxis,i.x,T.dataScale[0],i.xcalendar),c(S.yaxis,i.y,T.dataScale[1],i.ycalendar),c(S.zaxis,i.z,T.dataScale[2],i.zcalendar)),_;if(i.i&&i.j&&i.k){if(i.i.length!==i.j.length||i.j.length!==i.k.length||!p(i.i,M)||!p(i.j,M)||!p(i.k,M))return;_=r(g(i.i),g(i.j),g(i.k))}else i.alphahull===0?_=k(C):i.alphahull>0?_=E(i.alphahull,C):_=f(i.delaunayaxis,C);var w={positions:C,cells:_,lightPosition:[i.lightposition.x,i.lightposition.y,i.lightposition.z],ambient:i.lighting.ambient,diffuse:i.lighting.diffuse,specular:i.lighting.specular,roughness:i.lighting.roughness,fresnel:i.lighting.fresnel,vertexNormalsEpsilon:i.lighting.vertexnormalsepsilon,faceNormalsEpsilon:i.lighting.facenormalsepsilon,opacity:i.opacity,contourEnable:i.contour.show,contourColor:t(i.contour.color).slice(0,3),contourWidth:i.contour.width,useFacetNormals:i.flatshading};if(i.intensity){var h=n(i);this.color="#fff";var u=i.intensitymode;w[u+"Intensity"]=i.intensity,w[u+"IntensityBounds"]=[h.min,h.max],w.colormap=l(i)}else i.vertexcolor?(this.color=i.vertexcolor[0],w.vertexColors=s(i.vertexcolor)):i.facecolor?(this.color=i.facecolor[0],w.cellColors=s(i.facecolor)):(this.color=i.color,w.meshColor=t(i.color));this.mesh.update(w)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function m(i,T){var S=i.glplot.gl,M=v({gl:S}),C=new a(i,M,T.uid);return M._trace=C,C.update(T),i.glplot.add(M),C}H.exports=m}}),E8=Ee({"src/traces/mesh3d/index.js"(J,H){"use strict";H.exports={attributes:o0(),supplyDefaults:A8(),calc:M8(),colorbar:{min:"cmin",max:"cmax"},plot:S8(),moduleType:"trace",name:"mesh3d",basePlotModule:ov(),categories:["gl3d","showLegend"],meta:{}}}}),k8=Ee({"lib/mesh3d.js"(J,H){"use strict";H.exports=E8()}}),ow=Ee({"src/traces/cone/attributes.js"(J,H){"use strict";var v=$s(),x=Fl().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:k}=Cs(),l=o0(),e=nn(),t=vo().extendFlat,n={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:E({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:k({editType:"calc"}),uhoverformat:x("u",1),vhoverformat:x("v",1),whoverformat:x("w",1),xhoverformat:x("x"),yhoverformat:x("y"),zhoverformat:x("z"),showlegend:t({},e.showlegend,{dflt:!1})};t(n,v("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(a){n[a]=l[a]}),n.hoverinfo=t({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),H.exports=n}}),C8=Ee({"src/traces/cone/defaults.js"(J,H){"use strict";var v=Vr(),x=Cc(),E=ow();H.exports=function(l,e,t,n){function r(m,i){return v.coerce(l,e,E,m,i)}var a=r("u"),o=r("v"),s=r("w"),c=r("x"),g=r("y"),f=r("z");if(!a||!a.length||!o||!o.length||!s||!s.length||!c||!c.length||!g||!g.length||!f||!f.length){e.visible=!1;return}var p=r("sizemode");r("sizeref",p==="raw"?1:.5),r("anchor"),r("lighting.ambient"),r("lighting.diffuse"),r("lighting.specular"),r("lighting.roughness"),r("lighting.fresnel"),r("lightposition.x"),r("lightposition.y"),r("lightposition.z"),x(l,e,n,r,{prefix:"",cLetter:"c"}),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),r("uhoverformat"),r("vhoverformat"),r("whoverformat"),r("xhoverformat"),r("yhoverformat"),r("zhoverformat"),e._length=null}}}),L8=Ee({"src/traces/cone/calc.js"(J,H){"use strict";var v=Sf();H.exports=function(E,k){for(var l=k.u,e=k.v,t=k.w,n=Math.min(k.x.length,k.y.length,k.z.length,l.length,e.length,t.length),r=-1/0,a=1/0,o=0;o2?p=g.slice(1,f-1):f===2?p=[(g[0]+g[1])/2]:p=g,p}function o(g){var f=g.length;return f===1?[.5,.5]:[g[1]-g[0],g[f-1]-g[f-2]]}function s(g,f){var p=g.fullSceneLayout,m=g.dataScale,i=f._len,T={};function S(oe,V){var $=p[V],K=m[t[V]];return E.simpleMap(oe,function(G){return $.d2l(G)*K})}if(T.vectors=e(S(f._u,"xaxis"),S(f._v,"yaxis"),S(f._w,"zaxis"),i),!i)return{positions:[],cells:[]};var M=S(f._Xs,"xaxis"),C=S(f._Ys,"yaxis"),_=S(f._Zs,"zaxis");T.meshgrid=[M,C,_],T.gridFill=f._gridFill;var w=f._slen;if(w)T.startingPositions=e(S(f._startsX,"xaxis"),S(f._startsY,"yaxis"),S(f._startsZ,"zaxis"));else{for(var h=C[0],u=a(M),A=a(_),b=new Array(u.length*A.length),z=0,I=0;Ih&&(h=z[0]),z[1]u&&(u=z[1])}function b(z){switch(z.type){case"GeometryCollection":z.geometries.forEach(b);break;case"Point":A(z.coordinates);break;case"MultiPoint":z.coordinates.forEach(A);break}}S.arcs.forEach(function(z){for(var I=-1,N=z.length,R;++Ih&&(h=R[0]),R[1]u&&(u=R[1])});for(C in S.objects)b(S.objects[C]);return[_,w,h,u]}function l(S,M){for(var C,_=S.length,w=_-M;w<--_;)C=S[w],S[w++]=S[_],S[_]=C}function e(S,M){return typeof M=="string"&&(M=S.objects[M]),M.type==="GeometryCollection"?{type:"FeatureCollection",features:M.geometries.map(function(C){return t(S,C)})}:t(S,M)}function t(S,M){var C=M.id,_=M.bbox,w=M.properties==null?{}:M.properties,h=n(S,M);return C==null&&_==null?{type:"Feature",properties:w,geometry:h}:_==null?{type:"Feature",id:C,properties:w,geometry:h}:{type:"Feature",id:C,bbox:_,properties:w,geometry:h}}function n(S,M){var C=E(S.transform),_=S.arcs;function w(I,N){N.length&&N.pop();for(var R=_[I<0?~I:I],B=0,F=R.length;B1)_=s(S,M,C);else for(w=0,_=new Array(h=S.arcs.length);w1)for(var N=1,R=A(z[0]),B,F;NR&&(F=z[0],z[0]=z[N],z[N]=F,R=B);return z}).filter(function(b){return b.length>0})}}function p(S,M){for(var C=0,_=S.length;C<_;){var w=C+_>>>1;S[w]=2))throw new Error("n must be \u22652");b=S.bbox||k(S);var C=b[0],_=b[1],w=b[2],h=b[3],u;M={scale:[w-C?(w-C)/(u-1):1,h-_?(h-_)/(u-1):1],translate:[C,_]}}else b=S.bbox;var A=i(M),b,z,I=S.objects,N={};function R(P){return A(P)}function B(P){var j;switch(P.type){case"GeometryCollection":j={type:"GeometryCollection",geometries:P.geometries.map(B)};break;case"Point":j={type:"Point",coordinates:R(P.coordinates)};break;case"MultiPoint":j={type:"MultiPoint",coordinates:P.coordinates.map(R)};break;default:return P}return P.id!=null&&(j.id=P.id),P.bbox!=null&&(j.bbox=P.bbox),P.properties!=null&&(j.properties=P.properties),j}function F(P){var j=0,U=1,Z=P.length,Q,re=new Array(Z);for(re[0]=A(P[0],0);++j0&&(k.push(l),l=[])}return l.length>0&&k.push(l),k},J.makeLine=function(v){return v.length===1?{type:"LineString",coordinates:v[0]}:{type:"MultiLineString",coordinates:v}},J.makePolygon=function(v){if(v.length===1)return{type:"Polygon",coordinates:v};for(var x=new Array(v.length),E=0;E{for(var S in T)v(i,S,{get:T[S],enumerable:!0})},e=(i,T,S,M)=>{if(T&&typeof T=="object"||typeof T=="function")for(let C of E(T))!k.call(i,C)&&C!==S&&v(i,C,{get:()=>T[C],enumerable:!(M=x(T,C))||M.enumerable});return i},t=i=>e(v({},"__esModule",{value:!0}),i),n={};l(n,{COUNTRIES:()=>r,byAlpha2:()=>p,byAlpha3:()=>f,byM49:()=>m,createLookup:()=>o,lookup:()=>c,lookupAlpha3:()=>g,sanitize:()=>a}),H.exports=t(n);var r=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","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 a(i){return i.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 o(i){let T=new Map,S=new Map,M=new Map;for(let h of i)T.set(h.iso3,h),h.iso2&&S.set(h.iso2,h),h.m49&&M.set(h.m49,h);let C=new Map;for(let h of i)for(let u of[h.name,...h.aliases]){let A=a(u),b=C.get(A);if(b!==void 0&&b!==h.iso3)throw new Error(`Duplicate name/alias "${A}": ${b} vs ${h.iso3}`);C.set(A,h.iso3)}function _(h){if(h==null)return;let u=String(h).trim();if(!u)return;if(/^\d+$/.test(u)){let b=M.get(String(parseInt(u,10)).padStart(3,"0"));if(b)return b}if(/^[A-Za-z]{2}$/.test(u)){let b=S.get(u.toUpperCase());if(b)return b}if(/^[A-Za-z]{3}$/.test(u)){let b=T.get(u.toUpperCase());if(b)return b}let A=C.get(a(u));return A===void 0?void 0:T.get(A)}function w(h){var u;return(u=_(h))==null?void 0:u.iso3}return{lookup:_,lookupAlpha3:w,byAlpha3:T,byAlpha2:S,byM49:M}}var s=o(r),c=s.lookup,g=s.lookupAlpha3,f=s.byAlpha3,p=s.byAlpha2,m=s.byM49}}),Ly=Ee({"node_modules/@turf/helpers/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var H=63710088e-1,v={centimeters:H*100,centimetres:H*100,degrees:360/(2*Math.PI),feet:H*3.28084,inches:H*39.37,kilometers:H/1e3,kilometres:H/1e3,meters:H,metres:H,miles:H/1609.344,millimeters:H*1e3,millimetres:H*1e3,nauticalmiles:H/1852,radians:1,yards:H*1.0936},x={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function E(I,N,R={}){let B={type:"Feature"};return(R.id===0||R.id)&&(B.id=R.id),R.bbox&&(B.bbox=R.bbox),B.properties=N||{},B.geometry=I,B}function k(I,N,R={}){switch(I){case"Point":return l(N).geometry;case"LineString":return r(N).geometry;case"Polygon":return t(N).geometry;case"MultiPoint":return c(N).geometry;case"MultiLineString":return s(N).geometry;case"MultiPolygon":return g(N).geometry;default:throw new Error(I+" is invalid")}}function l(I,N,R={}){if(!I)throw new Error("coordinates is required");if(!Array.isArray(I))throw new Error("coordinates must be an Array");if(I.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!u(I[0])||!u(I[1]))throw new Error("coordinates must contain numbers");return E({type:"Point",coordinates:I},N,R)}function e(I,N,R={}){return o(I.map(B=>l(B,N)),R)}function t(I,N,R={}){for(let F of I){if(F.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(F[F.length-1].length!==F[0].length)throw new Error("First and last Position are not equivalent.");for(let P=0;Pt(B,N)),R)}function r(I,N,R={}){if(I.length<2)throw new Error("coordinates must be an array of two or more positions");return E({type:"LineString",coordinates:I},N,R)}function a(I,N,R={}){return o(I.map(B=>r(B,N)),R)}function o(I,N={}){let R={type:"FeatureCollection"};return N.id&&(R.id=N.id),N.bbox&&(R.bbox=N.bbox),R.features=I,R}function s(I,N,R={}){return E({type:"MultiLineString",coordinates:I},N,R)}function c(I,N,R={}){return E({type:"MultiPoint",coordinates:I},N,R)}function g(I,N,R={}){return E({type:"MultiPolygon",coordinates:I},N,R)}function f(I,N,R={}){return E({type:"GeometryCollection",geometries:I},N,R)}function p(I,N=0){if(N&&!(N>=0))throw new Error("precision must be a positive number");let R=Math.pow(10,N||0);return Math.round(I*R)/R}function m(I,N="kilometers"){let R=v[N];if(!R)throw new Error(N+" units is invalid");return I*R}function i(I,N="kilometers"){let R=v[N];if(!R)throw new Error(N+" units is invalid");return I/R}function T(I,N){return C(i(I,N))}function S(I){let N=I%360;return N<0&&(N+=360),N}function M(I){return I=I%360,I>180?I-360:I<-180?I+360:I}function C(I){return I%(2*Math.PI)*180/Math.PI}function _(I){return I%360*Math.PI/180}function w(I,N="kilometers",R="kilometers"){if(!(I>=0))throw new Error("length must be a positive number");return m(i(I,N),R)}function h(I,N="meters",R="kilometers"){if(!(I>=0))throw new Error("area must be a positive number");let B=x[N];if(!B)throw new Error("invalid original units");let F=x[R];if(!F)throw new Error("invalid final units");return I/B*F}function u(I){return!isNaN(I)&&I!==null&&!Array.isArray(I)}function A(I){return I!==null&&typeof I=="object"&&!Array.isArray(I)}function b(I){if(!I)throw new Error("bbox is required");if(!Array.isArray(I))throw new Error("bbox must be an Array");if(I.length!==4&&I.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");I.forEach(N=>{if(!u(N))throw new Error("bbox must only contain numbers")})}function z(I){if(!I)throw new Error("id is required");if(["string","number"].indexOf(typeof I)===-1)throw new Error("id must be a number or a string")}J.areaFactors=x,J.azimuthToBearing=M,J.bearingToAzimuth=S,J.convertArea=h,J.convertLength=w,J.degreesToRadians=_,J.earthRadius=H,J.factors=v,J.feature=E,J.featureCollection=o,J.geometry=k,J.geometryCollection=f,J.isNumber=u,J.isObject=A,J.lengthToDegrees=T,J.lengthToRadians=i,J.lineString=r,J.lineStrings=a,J.multiLineString=s,J.multiPoint=c,J.multiPolygon=g,J.point=l,J.points=e,J.polygon=t,J.polygons=n,J.radiansToDegrees=C,J.radiansToLength=m,J.round=p,J.validateBBox=b,J.validateId=z}}),Py=Ee({"node_modules/@turf/meta/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var H=Ly();function v(i,T,S){if(i!==null)for(var M,C,_,w,h,u,A,b=0,z=0,I,N=i.type,R=N==="FeatureCollection",B=N==="Feature",F=R?i.features.length:1,P=0;Pu||R>A||B>b){h=z,u=M,A=R,b=B,_=0;return}var F=H.lineString.call(void 0,[h,z],S.properties);if(T(F,M,C,B,_)===!1)return!1;_++,h=z})===!1)return!1}}})}function c(i,T,S){var M=S,C=!1;return s(i,function(_,w,h,u,A){C===!1&&S===void 0?M=_:M=T(M,_,w,h,u,A),C=!0}),M}function g(i,T){if(!i)throw new Error("geojson is required");a(i,function(S,M,C){if(S.geometry!==null){var _=S.geometry.type,w=S.geometry.coordinates;switch(_){case"LineString":if(T(S,M,C,0,0)===!1)return!1;break;case"Polygon":for(var h=0;ha+E(o),0)}function E(r){let a=0,o;switch(r.type){case"Polygon":return k(r.coordinates);case"MultiPolygon":for(o=0;o0){a+=Math.abs(t(r[0]));for(let o=1;o=a?(s+2)%a:s+2],p=c[0]*e,m=g[1]*e,i=f[0]*e;o+=(i-p)*Math.sin(m),s++}return o*l}var n=x;J.area=x,J.default=n}}),q8=Ee({"node_modules/@turf/centroid/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var H=Ly(),v=Py();function x(k,l={}){let e=0,t=0,n=0;return v.coordEach.call(void 0,k,function(r){e+=r[0],t+=r[1],n++},!0),H.point.call(void 0,[e/n,t/n],l.properties)}var E=x;J.centroid=x,J.default=E}}),V8=Ee({"node_modules/d3-geo/node_modules/d3-array/dist/d3-array.js"(J,H){(function(v,x){x(typeof J=="object"&&typeof H<"u"?J:v.d3=v.d3||{})})(J,function(v){"use strict";function x(K,G){return KG?1:K>=G?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(G,X,q,W){for(q==null&&(q=0),W==null&&(W=G.length);q>>1;K(G[ee],X)<0?q=ee+1:W=ee}return q},right:function(G,X,q,W){for(q==null&&(q=0),W==null&&(W=G.length);q>>1;K(G[ee],X)>0?W=ee:q=ee+1}return q}}}function k(K){return function(G,X){return x(K(G),X)}}var l=E(x),e=l.right,t=l.left;function n(K,G){G==null&&(G=r);for(var X=0,q=K.length-1,W=K[0],ee=new Array(q<0?0:q);XK?1:G>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,G){var X=K.length,q=0,W=-1,ee=0,ae,fe,ye=0;if(G==null)for(;++W1)return ye/(q-1)}function g(K,G){var X=c(K,G);return X&&Math.sqrt(X)}function f(K,G){var X=K.length,q=-1,W,ee,ae;if(G==null){for(;++q=W)for(ee=ae=W;++qW&&(ee=W),ae=W)for(ee=ae=W;++qW&&(ee=W),ae0)return[K];if((q=G0)for(K=Math.ceil(K/fe),G=Math.floor(G/fe),ae=new Array(ee=Math.ceil(G-K+1));++W=0?(ee>=C?10:ee>=_?5:ee>=w?2:1)*Math.pow(10,W):-Math.pow(10,-W)/(ee>=C?10:ee>=_?5:ee>=w?2:1)}function A(K,G,X){var q=Math.abs(G-K)/Math.max(0,X),W=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/W;return ee>=C?W*=10:ee>=_?W*=5:ee>=w&&(W*=2),GMe;)Ie.pop(),--qe;var je=new Array(qe+1),ke;for(ee=0;ee<=qe;++ee)ke=je[ee]=[],ke.x0=ee>0?Ie[ee-1]:Ae,ke.x1=ee=1)return+X(K[q-1],q-1,K);var q,W=(q-1)*G,ee=Math.floor(W),ae=+X(K[ee],ee,K),fe=+X(K[ee+1],ee+1,K);return ae+(fe-ae)*(W-ee)}}function N(K,G,X){return K=i.call(K,s).sort(x),Math.ceil((X-G)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function R(K,G,X){return Math.ceil((X-G)/(3.5*g(K)*Math.pow(K.length,-1/3)))}function B(K,G){var X=K.length,q=-1,W,ee;if(G==null){for(;++q=W)for(ee=W;++qee&&(ee=W)}else for(;++q=W)for(ee=W;++qee&&(ee=W);return ee}function F(K,G){var X=K.length,q=X,W=-1,ee,ae=0;if(G==null)for(;++W=0;)for(ae=K[G],X=ae.length;--X>=0;)ee[--W]=ae[X];return ee}function U(K,G){var X=K.length,q=-1,W,ee;if(G==null){for(;++q=W)for(ee=W;++qW&&(ee=W)}else for(;++q=W)for(ee=W;++qW&&(ee=W);return ee}function Z(K,G){for(var X=G.length,q=new Array(X);X--;)q[X]=K[G[X]];return q}function Q(K,G){if(X=K.length){var X,q=0,W=0,ee,ae=K[W];for(G==null&&(G=x);++q0?1:zt<0?-1:0},h=Math.sqrt,u=Math.tan;function A(zt){return zt>1?0:zt<-1?r:Math.acos(zt)}function b(zt){return zt>1?a:zt<-1?-a:Math.asin(zt)}function z(zt){return(zt=_(zt/2))*zt}function I(){}function N(zt,rr){zt&&B.hasOwnProperty(zt.type)&&B[zt.type](zt,rr)}var R={Feature:function(zt,rr){N(zt.geometry,rr)},FeatureCollection:function(zt,rr){for(var Br=zt.features,wr=-1,la=Br.length;++wr=0?1:-1,la=wr*Br,Ca=i(rr),qa=_(rr),Ka=V*qa,cn=oe*Ca+Ka*i(la),Pn=Ka*wr*_(la);U.add(m(Pn,cn)),ne=zt,oe=Ca,V=qa}function W(zt){return Z.reset(),j(zt,$),Z*2}function ee(zt){return[m(zt[1],zt[0]),b(zt[2])]}function ae(zt){var rr=zt[0],Br=zt[1],wr=i(Br);return[wr*i(rr),wr*_(rr),_(Br)]}function fe(zt,rr){return zt[0]*rr[0]+zt[1]*rr[1]+zt[2]*rr[2]}function ye(zt,rr){return[zt[1]*rr[2]-zt[2]*rr[1],zt[2]*rr[0]-zt[0]*rr[2],zt[0]*rr[1]-zt[1]*rr[0]]}function xe(zt,rr){zt[0]+=rr[0],zt[1]+=rr[1],zt[2]+=rr[2]}function Ae(zt,rr){return[zt[0]*rr,zt[1]*rr,zt[2]*rr]}function Me(zt){var rr=h(zt[0]*zt[0]+zt[1]*zt[1]+zt[2]*zt[2]);zt[0]/=rr,zt[1]/=rr,zt[2]/=rr}var Ie,qe,je,ke,ge,le,ve,se,Te=E(),Fe,We,Ge={point:gt,lineStart:Tt,lineEnd:At,polygonStart:function(){Ge.point=Kt,Ge.lineStart=ar,Ge.lineEnd=_r,Te.reset(),$.polygonStart()},polygonEnd:function(){$.polygonEnd(),Ge.point=gt,Ge.lineStart=Tt,Ge.lineEnd=At,U<0?(Ie=-(je=180),qe=-(ke=90)):Te>t?ke=90:Te<-t&&(qe=-90),We[0]=Ie,We[1]=je},sphere:function(){Ie=-(je=180),qe=-(ke=90)}};function gt(zt,rr){Fe.push(We=[Ie=zt,je=zt]),rrke&&(ke=rr)}function mt(zt,rr){var Br=ae([zt*g,rr*g]);if(se){var wr=ye(se,Br),la=[wr[1],-wr[0],0],Ca=ye(la,wr);Me(Ca),Ca=ee(Ca);var qa=zt-ge,Ka=qa>0?1:-1,cn=Ca[0]*c*Ka,Pn,Ha=f(qa)>180;Ha^(Ka*geke&&(ke=Pn)):(cn=(cn+360)%360-180,Ha^(Ka*geke&&(ke=rr))),Ha?ztZt(Ie,je)&&(je=zt):Zt(zt,je)>Zt(Ie,je)&&(Ie=zt):je>=Ie?(ztje&&(je=zt)):zt>ge?Zt(Ie,zt)>Zt(Ie,je)&&(je=zt):Zt(zt,je)>Zt(Ie,je)&&(Ie=zt)}else Fe.push(We=[Ie=zt,je=zt]);rrke&&(ke=rr),se=Br,ge=zt}function Tt(){Ge.point=mt}function At(){We[0]=Ie,We[1]=je,Ge.point=gt,se=null}function Kt(zt,rr){if(se){var Br=zt-ge;Te.add(f(Br)>180?Br+(Br>0?360:-360):Br)}else le=zt,ve=rr;$.point(zt,rr),mt(zt,rr)}function ar(){$.lineStart()}function _r(){Kt(le,ve),$.lineEnd(),f(Te)>t&&(Ie=-(je=180)),We[0]=Ie,We[1]=je,se=null}function Zt(zt,rr){return(rr-=zt)<0?rr+360:rr}function sr(zt,rr){return zt[0]-rr[0]}function Ot(zt,rr){return zt[0]<=zt[1]?zt[0]<=rr&&rr<=zt[1]:rrZt(wr[0],wr[1])&&(wr[1]=la[1]),Zt(la[0],wr[1])>Zt(wr[0],wr[1])&&(wr[0]=la[0])):Ca.push(wr=la);for(qa=-1/0,Br=Ca.length-1,rr=0,wr=Ca[Br];rr<=Br;wr=la,++rr)la=Ca[rr],(Ka=Zt(wr[1],la[0]))>qa&&(qa=Ka,Ie=la[0],je=wr[1])}return Fe=We=null,Ie===1/0||qe===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ie,qe],[je,ke]]}var ht,Re,Be,He,$e,Ze,Je,Mt,dt,Dt,Ct,Vt,Ht,Wt,Sr,ia,$t={sphere:I,point:It,lineStart:cr,lineEnd:sa,polygonStart:function(){$t.lineStart=aa,$t.lineEnd=xa},polygonEnd:function(){$t.lineStart=cr,$t.lineEnd=sa}};function It(zt,rr){zt*=g,rr*=g;var Br=i(rr);ir(Br*i(zt),Br*_(zt),_(rr))}function ir(zt,rr,Br){++ht,Be+=(zt-Be)/ht,He+=(rr-He)/ht,$e+=(Br-$e)/ht}function cr(){$t.point=fr}function fr(zt,rr){zt*=g,rr*=g;var Br=i(rr);Wt=Br*i(zt),Sr=Br*_(zt),ia=_(rr),$t.point=Ir,ir(Wt,Sr,ia)}function Ir(zt,rr){zt*=g,rr*=g;var Br=i(rr),wr=Br*i(zt),la=Br*_(zt),Ca=_(rr),qa=m(h((qa=Sr*Ca-ia*la)*qa+(qa=ia*wr-Wt*Ca)*qa+(qa=Wt*la-Sr*wr)*qa),Wt*wr+Sr*la+ia*Ca);Re+=qa,Ze+=qa*(Wt+(Wt=wr)),Je+=qa*(Sr+(Sr=la)),Mt+=qa*(ia+(ia=Ca)),ir(Wt,Sr,ia)}function sa(){$t.point=It}function aa(){$t.point=ja}function xa(){Oa(Vt,Ht),$t.point=It}function ja(zt,rr){Vt=zt,Ht=rr,zt*=g,rr*=g,$t.point=Oa;var Br=i(rr);Wt=Br*i(zt),Sr=Br*_(zt),ia=_(rr),ir(Wt,Sr,ia)}function Oa(zt,rr){zt*=g,rr*=g;var Br=i(rr),wr=Br*i(zt),la=Br*_(zt),Ca=_(rr),qa=Sr*Ca-ia*la,Ka=ia*wr-Wt*Ca,cn=Wt*la-Sr*wr,Pn=h(qa*qa+Ka*Ka+cn*cn),Ha=b(Pn),on=Pn&&-Ha/Pn;dt+=on*qa,Dt+=on*Ka,Ct+=on*cn,Re+=Ha,Ze+=Ha*(Wt+(Wt=wr)),Je+=Ha*(Sr+(Sr=la)),Mt+=Ha*(ia+(ia=Ca)),ir(Wt,Sr,ia)}function An(zt){ht=Re=Be=He=$e=Ze=Je=Mt=dt=Dt=Ct=0,j(zt,$t);var rr=dt,Br=Dt,wr=Ct,la=rr*rr+Br*Br+wr*wr;return lar?zt+Math.round(-zt/s)*s:zt,rr]}ei.invert=ei;function Fn(zt,rr,Br){return(zt%=s)?rr||Br?Ja(Mi(zt),ci(rr,Br)):Mi(zt):rr||Br?ci(rr,Br):ei}function ni(zt){return function(rr,Br){return rr+=zt,[rr>r?rr-s:rr<-r?rr+s:rr,Br]}}function Mi(zt){var rr=ni(zt);return rr.invert=ni(-zt),rr}function ci(zt,rr){var Br=i(zt),wr=_(zt),la=i(rr),Ca=_(rr);function qa(Ka,cn){var Pn=i(cn),Ha=i(Ka)*Pn,on=_(Ka)*Pn,fn=_(cn),Ln=fn*Br+Ha*wr;return[m(on*la-Ln*Ca,Ha*Br-fn*wr),b(Ln*la+on*Ca)]}return qa.invert=function(Ka,cn){var Pn=i(cn),Ha=i(Ka)*Pn,on=_(Ka)*Pn,fn=_(cn),Ln=fn*la-on*Ca;return[m(on*la+fn*Ca,Ha*Br+Ln*wr),b(Ln*Br-Ha*wr)]},qa}function bn(zt){zt=Fn(zt[0]*g,zt[1]*g,zt.length>2?zt[2]*g:0);function rr(Br){return Br=zt(Br[0]*g,Br[1]*g),Br[0]*=c,Br[1]*=c,Br}return rr.invert=function(Br){return Br=zt.invert(Br[0]*g,Br[1]*g),Br[0]*=c,Br[1]*=c,Br},rr}function pn(zt,rr,Br,wr,la,Ca){if(Br){var qa=i(rr),Ka=_(rr),cn=wr*Br;la==null?(la=rr+wr*s,Ca=rr-cn/2):(la=Ii(qa,la),Ca=Ii(qa,Ca),(wr>0?laCa)&&(la+=wr*s));for(var Pn,Ha=la;wr>0?Ha>Ca:Ha1&&zt.push(zt.pop().concat(zt.shift()))},result:function(){var Br=zt;return zt=[],rr=null,Br}}}function Za(zt,rr){return f(zt[0]-rr[0])=0;--Ka)la.point((on=Ha[Ka])[0],on[1]);else wr(fn.x,fn.p.x,-1,la);fn=fn.p}fn=fn.o,Ha=fn.z,Ln=!Ln}while(!fn.v);la.lineEnd()}}}function hr(zt){if(rr=zt.length){for(var rr,Br=0,wr=zt[0],la;++Br=0?1:-1,Yo=Wo*Vo,ns=Yo>r,Bo=Bi*oo;if(ur.add(m(Bo*Wo*_(Yo),Ni*yo+Bo*i(Yo))),qa+=ns?Vo+Wo*s:Vo,ns^Ln>=Br^Vn>=Br){var Ks=ye(ae(fn),ae(_i));Me(Ks);var Rs=ye(Ca,Ks);Me(Rs);var ps=(ns^Vo>=0?-1:1)*b(Rs[2]);(wr>ps||wr===ps&&(Ks[0]||Ks[1]))&&(Ka+=ns^Vo>=0?1:-1)}}return(qa<-t||qa0){for(cn||(la.polygonStart(),cn=!0),la.lineStart(),yo=0;yo1&&Gn&2&&oo.push(oo.pop().concat(oo.shift())),Ha.push(oo.filter(nt))}}return fn}}function nt(zt){return zt.length>1}function kt(zt,rr){return((zt=zt.x)[0]<0?zt[1]-a-t:a-zt[1])-((rr=rr.x)[0]<0?rr[1]-a-t:a-rr[1])}var Ut=Fr(function(){return!0},nr,br,[-r,-a]);function nr(zt){var rr=NaN,Br=NaN,wr=NaN,la;return{lineStart:function(){zt.lineStart(),la=1},point:function(Ca,qa){var Ka=Ca>0?r:-r,cn=f(Ca-rr);f(cn-r)0?a:-a),zt.point(wr,Br),zt.lineEnd(),zt.lineStart(),zt.point(Ka,Br),zt.point(Ca,Br),la=0):wr!==Ka&&cn>=r&&(f(rr-wr)t?p((_(rr)*(Ca=i(wr))*_(Br)-_(wr)*(la=i(rr))*_(zt))/(la*Ca*qa)):(rr+wr)/2}function br(zt,rr,Br,wr){var la;if(zt==null)la=Br*a,wr.point(-r,la),wr.point(0,la),wr.point(r,la),wr.point(r,0),wr.point(r,-la),wr.point(0,-la),wr.point(-r,-la),wr.point(-r,0),wr.point(-r,la);else if(f(zt[0]-rr[0])>t){var Ca=zt[0]0,la=f(rr)>t;function Ca(Ha,on,fn,Ln){pn(Ln,zt,Br,fn,Ha,on)}function qa(Ha,on){return i(Ha)*i(on)>rr}function Ka(Ha){var on,fn,Ln,qn,Bi;return{lineStart:function(){qn=Ln=!1,Bi=1},point:function(Ni,Zi){var _i=[Ni,Zi],Vn,Gn=qa(Ni,Zi),oo=wr?Gn?0:Pn(Ni,Zi):Gn?Pn(Ni+(Ni<0?r:-r),Zi):0;if(!on&&(qn=Ln=Gn)&&Ha.lineStart(),Gn!==Ln&&(Vn=cn(on,_i),(!Vn||Za(on,Vn)||Za(_i,Vn))&&(_i[2]=1)),Gn!==Ln)Bi=0,Gn?(Ha.lineStart(),Vn=cn(_i,on),Ha.point(Vn[0],Vn[1])):(Vn=cn(on,_i),Ha.point(Vn[0],Vn[1],2),Ha.lineEnd()),on=Vn;else if(la&&on&&wr^Gn){var yo;!(oo&fn)&&(yo=cn(_i,on,!0))&&(Bi=0,wr?(Ha.lineStart(),Ha.point(yo[0][0],yo[0][1]),Ha.point(yo[1][0],yo[1][1]),Ha.lineEnd()):(Ha.point(yo[1][0],yo[1][1]),Ha.lineEnd(),Ha.lineStart(),Ha.point(yo[0][0],yo[0][1],3)))}Gn&&(!on||!Za(on,_i))&&Ha.point(_i[0],_i[1]),on=_i,Ln=Gn,fn=oo},lineEnd:function(){Ln&&Ha.lineEnd(),on=null},clean:function(){return Bi|(qn&&Ln)<<1}}}function cn(Ha,on,fn){var Ln=ae(Ha),qn=ae(on),Bi=[1,0,0],Ni=ye(Ln,qn),Zi=fe(Ni,Ni),_i=Ni[0],Vn=Zi-_i*_i;if(!Vn)return!fn&&Ha;var Gn=rr*Zi/Vn,oo=-rr*_i/Vn,yo=ye(Bi,Ni),Vo=Ae(Bi,Gn),Wo=Ae(Ni,oo);xe(Vo,Wo);var Yo=yo,ns=fe(Vo,Yo),Bo=fe(Yo,Yo),Ks=ns*ns-Bo*(fe(Vo,Vo)-1);if(!(Ks<0)){var Rs=h(Ks),ps=Ae(Yo,(-ns-Rs)/Bo);if(xe(ps,Vo),ps=ee(ps),!fn)return ps;var vi=Ha[0],Xo=on[0],Ss=Ha[1],Ws=on[1],Dl;Xo0^ps[1]<(f(ps[0]-vi)r^(vi<=ps[0]&&ps[0]<=Xo)){var Al=Ae(Yo,(-ns+Rs)/Bo);return xe(Al,Vo),[ps,ee(Al)]}}}function Pn(Ha,on){var fn=wr?zt:r-zt,Ln=0;return Ha<-fn?Ln|=1:Ha>fn&&(Ln|=2),on<-fn?Ln|=4:on>fn&&(Ln|=8),Ln}return Fr(qa,Ka,Ca,wr?[0,-zt]:[-r,zt-r])}function Pr(zt,rr,Br,wr,la,Ca){var qa=zt[0],Ka=zt[1],cn=rr[0],Pn=rr[1],Ha=0,on=1,fn=cn-qa,Ln=Pn-Ka,qn;if(qn=Br-qa,!(!fn&&qn>0)){if(qn/=fn,fn<0){if(qn0){if(qn>on)return;qn>Ha&&(Ha=qn)}if(qn=la-qa,!(!fn&&qn<0)){if(qn/=fn,fn<0){if(qn>on)return;qn>Ha&&(Ha=qn)}else if(fn>0){if(qn0)){if(qn/=Ln,Ln<0){if(qn0){if(qn>on)return;qn>Ha&&(Ha=qn)}if(qn=Ca-Ka,!(!Ln&&qn<0)){if(qn/=Ln,Ln<0){if(qn>on)return;qn>Ha&&(Ha=qn)}else if(Ln>0){if(qn0&&(zt[0]=qa+Ha*fn,zt[1]=Ka+Ha*Ln),on<1&&(rr[0]=qa+on*fn,rr[1]=Ka+on*Ln),!0}}}}}var fa=1e9,Fa=-fa;function La(zt,rr,Br,wr){function la(Pn,Ha){return zt<=Pn&&Pn<=Br&&rr<=Ha&&Ha<=wr}function Ca(Pn,Ha,on,fn){var Ln=0,qn=0;if(Pn==null||(Ln=qa(Pn,on))!==(qn=qa(Ha,on))||cn(Pn,Ha)<0^on>0)do fn.point(Ln===0||Ln===3?zt:Br,Ln>1?wr:rr);while((Ln=(Ln+on+4)%4)!==qn);else fn.point(Ha[0],Ha[1])}function qa(Pn,Ha){return f(Pn[0]-zt)0?0:3:f(Pn[0]-Br)0?2:1:f(Pn[1]-rr)0?1:0:Ha>0?3:2}function Ka(Pn,Ha){return cn(Pn.x,Ha.x)}function cn(Pn,Ha){var on=qa(Pn,1),fn=qa(Ha,1);return on!==fn?on-fn:on===0?Ha[1]-Pn[1]:on===1?Pn[0]-Ha[0]:on===2?Pn[1]-Ha[1]:Ha[0]-Pn[0]}return function(Pn){var Ha=Pn,on=dn(),fn,Ln,qn,Bi,Ni,Zi,_i,Vn,Gn,oo,yo,Vo={point:Wo,lineStart:Ks,lineEnd:Rs,polygonStart:ns,polygonEnd:Bo};function Wo(vi,Xo){la(vi,Xo)&&Ha.point(vi,Xo)}function Yo(){for(var vi=0,Xo=0,Ss=Ln.length;Xowr&&(zu-Fu)*(wr-Al)>(bu-Al)*(zt-Fu)&&++vi:bu<=wr&&(zu-Fu)*(wr-Al)<(bu-Al)*(zt-Fu)&&--vi;return vi}function ns(){Ha=on,fn=[],Ln=[],yo=!0}function Bo(){var vi=Yo(),Xo=yo&&vi,Ss=(fn=x.merge(fn)).length;(Xo||Ss)&&(Pn.polygonStart(),Xo&&(Pn.lineStart(),Ca(null,null,1,Pn),Pn.lineEnd()),Ss&&et(fn,Ka,vi,Ca,Pn),Pn.polygonEnd()),Ha=Pn,fn=Ln=qn=null}function Ks(){Vo.point=ps,Ln&&Ln.push(qn=[]),oo=!0,Gn=!1,_i=Vn=NaN}function Rs(){fn&&(ps(Bi,Ni),Zi&&Gn&&on.rejoin(),fn.push(on.result())),Vo.point=Wo,Gn&&Ha.lineEnd()}function ps(vi,Xo){var Ss=la(vi,Xo);if(Ln&&qn.push([vi,Xo]),oo)Bi=vi,Ni=Xo,Zi=Ss,oo=!1,Ss&&(Ha.lineStart(),Ha.point(vi,Xo));else if(Ss&&Gn)Ha.point(vi,Xo);else{var Ws=[_i=Math.max(Fa,Math.min(fa,_i)),Vn=Math.max(Fa,Math.min(fa,Vn))],Dl=[vi=Math.max(Fa,Math.min(fa,vi)),Xo=Math.max(Fa,Math.min(fa,Xo))];Pr(Ws,Dl,zt,rr,Br,wr)?(Gn||(Ha.lineStart(),Ha.point(Ws[0],Ws[1])),Ha.point(Dl[0],Dl[1]),Ss||Ha.lineEnd(),yo=!1):Ss&&(Ha.lineStart(),Ha.point(vi,Xo),yo=!1)}_i=vi,Vn=Xo,Gn=Ss}return Vo}}function Cn(){var zt=0,rr=0,Br=960,wr=500,la,Ca,qa;return qa={stream:function(Ka){return la&&Ca===Ka?la:la=La(zt,rr,Br,wr)(Ca=Ka)},extent:function(Ka){return arguments.length?(zt=+Ka[0][0],rr=+Ka[0][1],Br=+Ka[1][0],wr=+Ka[1][1],la=Ca=null,qa):[[zt,rr],[Br,wr]]}}}var mn=E(),bi,gn,eo,si={sphere:I,point:I,lineStart:Ao,lineEnd:I,polygonStart:I,polygonEnd:I};function Ao(){si.point=Sn,si.lineEnd=ro}function ro(){si.point=si.lineEnd=I}function Sn(zt,rr){zt*=g,rr*=g,bi=zt,gn=_(rr),eo=i(rr),si.point=Gi}function Gi(zt,rr){zt*=g,rr*=g;var Br=_(rr),wr=i(rr),la=f(zt-bi),Ca=i(la),qa=_(la),Ka=wr*qa,cn=eo*Br-gn*wr*Ca,Pn=gn*Br+eo*wr*Ca;mn.add(m(h(Ka*Ka+cn*cn),Pn)),bi=zt,gn=Br,eo=wr}function ti(zt){return mn.reset(),j(zt,si),+mn}var fi=[null,null],xo={type:"LineString",coordinates:fi};function zi(zt,rr){return fi[0]=zt,fi[1]=rr,ti(xo)}var so={Feature:function(zt,rr){return So(zt.geometry,rr)},FeatureCollection:function(zt,rr){for(var Br=zt.features,wr=-1,la=Br.length;++wr0&&(la=zi(zt[Ca],zt[Ca-1]),la>0&&Br<=la&&wr<=la&&(Br+wr-la)*(1-Math.pow((Br-wr)/la,2))t}).map(fn)).concat(x.range(T(Ca/Pn)*Pn,la,Pn).filter(function(Vn){return f(Vn%on)>t}).map(Ln))}return Zi.lines=function(){return _i().map(function(Vn){return{type:"LineString",coordinates:Vn}})},Zi.outline=function(){return{type:"Polygon",coordinates:[qn(wr).concat(Bi(qa).slice(1),qn(Br).reverse().slice(1),Bi(Ka).reverse().slice(1))]}},Zi.extent=function(Vn){return arguments.length?Zi.extentMajor(Vn).extentMinor(Vn):Zi.extentMinor()},Zi.extentMajor=function(Vn){return arguments.length?(wr=+Vn[0][0],Br=+Vn[1][0],Ka=+Vn[0][1],qa=+Vn[1][1],wr>Br&&(Vn=wr,wr=Br,Br=Vn),Ka>qa&&(Vn=Ka,Ka=qa,qa=Vn),Zi.precision(Ni)):[[wr,Ka],[Br,qa]]},Zi.extentMinor=function(Vn){return arguments.length?(rr=+Vn[0][0],zt=+Vn[1][0],Ca=+Vn[0][1],la=+Vn[1][1],rr>zt&&(Vn=rr,rr=zt,zt=Vn),Ca>la&&(Vn=Ca,Ca=la,la=Vn),Zi.precision(Ni)):[[rr,Ca],[zt,la]]},Zi.step=function(Vn){return arguments.length?Zi.stepMajor(Vn).stepMinor(Vn):Zi.stepMinor()},Zi.stepMajor=function(Vn){return arguments.length?(Ha=+Vn[0],on=+Vn[1],Zi):[Ha,on]},Zi.stepMinor=function(Vn){return arguments.length?(cn=+Vn[0],Pn=+Vn[1],Zi):[cn,Pn]},Zi.precision=function(Vn){return arguments.length?(Ni=+Vn,fn=qo(Ca,la,90),Ln=Oo(rr,zt,Ni),qn=qo(Ka,qa,90),Bi=Oo(wr,Br,Ni),Zi):Ni},Zi.extentMajor([[-180,-90+t],[180,90-t]]).extentMinor([[-180,-80-t],[180,80+t]])}function Ko(){return ws()()}function as(zt,rr){var Br=zt[0]*g,wr=zt[1]*g,la=rr[0]*g,Ca=rr[1]*g,qa=i(wr),Ka=_(wr),cn=i(Ca),Pn=_(Ca),Ha=qa*i(Br),on=qa*_(Br),fn=cn*i(la),Ln=cn*_(la),qn=2*b(h(z(Ca-wr)+qa*cn*z(la-Br))),Bi=_(qn),Ni=qn?function(Zi){var _i=_(Zi*=qn)/Bi,Vn=_(qn-Zi)/Bi,Gn=Vn*Ha+_i*fn,oo=Vn*on+_i*Ln,yo=Vn*Ka+_i*Pn;return[m(oo,Gn)*c,m(yo,h(Gn*Gn+oo*oo))*c]}:function(){return[Br*c,wr*c]};return Ni.distance=qn,Ni}function wo(zt){return zt}var No=E(),Di=E(),lo,Go,go,us,Jo={point:I,lineStart:I,lineEnd:I,polygonStart:function(){Jo.lineStart=zs,Jo.lineEnd=Zs},polygonEnd:function(){Jo.lineStart=Jo.lineEnd=Jo.point=I,No.add(f(Di)),Di.reset()},result:function(){var zt=No/2;return No.reset(),zt}};function zs(){Jo.point=Is}function Is(zt,rr){Jo.point=es,lo=go=zt,Go=us=rr}function es(zt,rr){Di.add(us*zt-go*rr),go=zt,us=rr}function Zs(){es(lo,Go)}var Ps=1/0,$o=Ps,Fo=-Ps,Ji=Fo,Ro={point:Ls,lineStart:I,lineEnd:I,polygonStart:I,polygonEnd:I,result:function(){var zt=[[Ps,$o],[Fo,Ji]];return Fo=Ji=-($o=Ps=1/0),zt}};function Ls(zt,rr){ztFo&&(Fo=zt),rr<$o&&($o=rr),rr>Ji&&(Ji=rr)}var zl=0,ml=0,Ts=0,yl=0,mu=0,su=0,cc=0,Bl=0,_l=0,ju,lu,il,As,ms={point:Ms,lineStart:ol,lineEnd:Uu,polygonStart:function(){ms.lineStart=fc,ms.lineEnd=th},polygonEnd:function(){ms.point=Ms,ms.lineStart=ol,ms.lineEnd=Uu},result:function(){var zt=_l?[cc/_l,Bl/_l]:su?[yl/su,mu/su]:Ts?[zl/Ts,ml/Ts]:[NaN,NaN];return zl=ml=Ts=yl=mu=su=cc=Bl=_l=0,zt}};function Ms(zt,rr){zl+=zt,ml+=rr,++Ts}function ol(){ms.point=Su}function Su(zt,rr){ms.point=Eu,Ms(il=zt,As=rr)}function Eu(zt,rr){var Br=zt-il,wr=rr-As,la=h(Br*Br+wr*wr);yl+=la*(il+zt)/2,mu+=la*(As+rr)/2,su+=la,Ms(il=zt,As=rr)}function Uu(){ms.point=Ms}function fc(){ms.point=Cf}function th(){qu(ju,lu)}function Cf(zt,rr){ms.point=qu,Ms(ju=il=zt,lu=As=rr)}function qu(zt,rr){var Br=zt-il,wr=rr-As,la=h(Br*Br+wr*wr);yl+=la*(il+zt)/2,mu+=la*(As+rr)/2,su+=la,la=As*zt-il*rr,cc+=la*(il+zt),Bl+=la*(As+rr),_l+=la*3,Ms(il=zt,As=rr)}function gs(zt){this._context=zt}gs.prototype={_radius:4.5,pointRadius:function(zt){return this._radius=zt,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(zt,rr){switch(this._point){case 0:{this._context.moveTo(zt,rr),this._point=1;break}case 1:{this._context.lineTo(zt,rr);break}default:{this._context.moveTo(zt+this._radius,rr),this._context.arc(zt,rr,this._radius,0,s);break}}},result:I};var Lf=E(),hc,ac,hf,ku,dc,Cu={point:I,lineStart:function(){Cu.point=Pc},lineEnd:function(){hc&&$c(ac,hf),Cu.point=I},polygonStart:function(){hc=!0},polygonEnd:function(){hc=null},result:function(){var zt=+Lf;return Lf.reset(),zt}};function Pc(zt,rr){Cu.point=$c,ac=ku=zt,hf=dc=rr}function $c(zt,rr){ku-=zt,dc-=rr,Lf.add(h(ku*ku+dc*dc)),ku=zt,dc=rr}function Zl(){this._string=[]}Zl.prototype={_radius:4.5,_circle:df(4.5),pointRadius:function(zt){return(zt=+zt)!==this._radius&&(this._radius=zt,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(zt,rr){switch(this._point){case 0:{this._string.push("M",zt,",",rr),this._point=1;break}case 1:{this._string.push("L",zt,",",rr);break}default:{this._circle==null&&(this._circle=df(this._radius)),this._string.push("M",zt,",",rr,this._circle);break}}},result:function(){if(this._string.length){var zt=this._string.join("");return this._string=[],zt}else return null}};function df(zt){return"m0,"+zt+"a"+zt+","+zt+" 0 1,1 0,"+-2*zt+"a"+zt+","+zt+" 0 1,1 0,"+2*zt+"z"}function Dc(zt,rr){var Br=4.5,wr,la;function Ca(qa){return qa&&(typeof Br=="function"&&la.pointRadius(+Br.apply(this,arguments)),j(qa,wr(la))),la.result()}return Ca.area=function(qa){return j(qa,wr(Jo)),Jo.result()},Ca.measure=function(qa){return j(qa,wr(Cu)),Cu.result()},Ca.bounds=function(qa){return j(qa,wr(Ro)),Ro.result()},Ca.centroid=function(qa){return j(qa,wr(ms)),ms.result()},Ca.projection=function(qa){return arguments.length?(wr=qa==null?(zt=null,wo):(zt=qa).stream,Ca):zt},Ca.context=function(qa){return arguments.length?(la=qa==null?(rr=null,new Zl):new gs(rr=qa),typeof Br!="function"&&la.pointRadius(Br),Ca):rr},Ca.pointRadius=function(qa){return arguments.length?(Br=typeof qa=="function"?qa:(la.pointRadius(+qa),+qa),Ca):Br},Ca.projection(zt).context(rr)}function Ic(zt){return{stream:Vu(zt)}}function Vu(zt){return function(rr){var Br=new Rc;for(var wr in zt)Br[wr]=zt[wr];return Br.stream=rr,Br}}function Rc(){}Rc.prototype={constructor:Rc,point:function(zt,rr){this.stream.point(zt,rr)},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 Lu(zt,rr,Br){var wr=zt.clipExtent&&zt.clipExtent();return zt.scale(150).translate([0,0]),wr!=null&&zt.clipExtent(null),j(Br,zt.stream(Ro)),rr(Ro.result()),wr!=null&&zt.clipExtent(wr),zt}function vf(zt,rr,Br){return Lu(zt,function(wr){var la=rr[1][0]-rr[0][0],Ca=rr[1][1]-rr[0][1],qa=Math.min(la/(wr[1][0]-wr[0][0]),Ca/(wr[1][1]-wr[0][1])),Ka=+rr[0][0]+(la-qa*(wr[1][0]+wr[0][0]))/2,cn=+rr[0][1]+(Ca-qa*(wr[1][1]+wr[0][1]))/2;zt.scale(150*qa).translate([Ka,cn])},Br)}function sl(zt,rr,Br){return vf(zt,[[0,0],rr],Br)}function Fc(zt,rr,Br){return Lu(zt,function(wr){var la=+rr,Ca=la/(wr[1][0]-wr[0][0]),qa=(la-Ca*(wr[1][0]+wr[0][0]))/2,Ka=-Ca*wr[0][1];zt.scale(150*Ca).translate([qa,Ka])},Br)}function Pu(zt,rr,Br){return Lu(zt,function(wr){var la=+rr,Ca=la/(wr[1][1]-wr[0][1]),qa=-Ca*wr[0][0],Ka=(la-Ca*(wr[1][1]+wr[0][1]))/2;zt.scale(150*Ca).translate([qa,Ka])},Br)}var vc=16,zc=i(30*g);function Hu(zt,rr){return+rr?Gu(zt,rr):uu(zt)}function uu(zt){return Vu({point:function(rr,Br){rr=zt(rr,Br),this.stream.point(rr[0],rr[1])}})}function Gu(zt,rr){function Br(wr,la,Ca,qa,Ka,cn,Pn,Ha,on,fn,Ln,qn,Bi,Ni){var Zi=Pn-wr,_i=Ha-la,Vn=Zi*Zi+_i*_i;if(Vn>4*rr&&Bi--){var Gn=qa+fn,oo=Ka+Ln,yo=cn+qn,Vo=h(Gn*Gn+oo*oo+yo*yo),Wo=b(yo/=Vo),Yo=f(f(yo)-1)rr||f((Zi*Rs+_i*ps)/Vn-.5)>.3||qa*fn+Ka*Ln+cn*qn2?vi[2]%360*g:0,Rs()):[Ka*c,cn*c,Pn*c]},Bo.angle=function(vi){return arguments.length?(on=vi%360*g,Rs()):on*c},Bo.reflectX=function(vi){return arguments.length?(fn=vi?-1:1,Rs()):fn<0},Bo.reflectY=function(vi){return arguments.length?(Ln=vi?-1:1,Rs()):Ln<0},Bo.precision=function(vi){return arguments.length?(yo=Hu(Vo,oo=vi*vi),ps()):h(oo)},Bo.fitExtent=function(vi,Xo){return vf(Bo,vi,Xo)},Bo.fitSize=function(vi,Xo){return sl(Bo,vi,Xo)},Bo.fitWidth=function(vi,Xo){return Fc(Bo,vi,Xo)},Bo.fitHeight=function(vi,Xo){return Pu(Bo,vi,Xo)};function Rs(){var vi=bl(Br,0,0,fn,Ln,on).apply(null,rr(Ca,qa)),Xo=(on?bl:Pf)(Br,wr-vi[0],la-vi[1],fn,Ln,on);return Ha=Fn(Ka,cn,Pn),Vo=Ja(rr,Xo),Wo=Ja(Ha,Vo),yo=Hu(Vo,oo),ps()}function ps(){return Yo=ns=null,Bo}return function(){return rr=zt.apply(this,arguments),Bo.invert=rr.invert&&Ks,Rs()}}function wl(zt){var rr=0,Br=r/3,wr=Wu(zt),la=wr(rr,Br);return la.parallels=function(Ca){return arguments.length?wr(rr=Ca[0]*g,Br=Ca[1]*g):[rr*c,Br*c]},la}function pf(zt){var rr=i(zt);function Br(wr,la){return[wr*rr,_(la)/rr]}return Br.invert=function(wr,la){return[wr/rr,b(la*rr)]},Br}function Yu(zt,rr){var Br=_(zt),wr=(Br+_(rr))/2;if(f(wr)=.12&&Ni<.234&&Bi>=-.425&&Bi<-.214?la:Ni>=.166&&Ni<.234&&Bi>=-.214&&Bi<-.115?qa:Br).invert(fn)},Ha.stream=function(fn){return zt&&rr===fn?zt:zt=cs([Br.stream(rr=fn),la.stream(fn),qa.stream(fn)])},Ha.precision=function(fn){return arguments.length?(Br.precision(fn),la.precision(fn),qa.precision(fn),on()):Br.precision()},Ha.scale=function(fn){return arguments.length?(Br.scale(fn),la.scale(fn*.35),qa.scale(fn),Ha.translate(Br.translate())):Br.scale()},Ha.translate=function(fn){if(!arguments.length)return Br.translate();var Ln=Br.scale(),qn=+fn[0],Bi=+fn[1];return wr=Br.translate(fn).clipExtent([[qn-.455*Ln,Bi-.238*Ln],[qn+.455*Ln,Bi+.238*Ln]]).stream(Pn),Ca=la.translate([qn-.307*Ln,Bi+.201*Ln]).clipExtent([[qn-.425*Ln+t,Bi+.12*Ln+t],[qn-.214*Ln-t,Bi+.234*Ln-t]]).stream(Pn),Ka=qa.translate([qn-.205*Ln,Bi+.212*Ln]).clipExtent([[qn-.214*Ln+t,Bi+.166*Ln+t],[qn-.115*Ln-t,Bi+.234*Ln-t]]).stream(Pn),on()},Ha.fitExtent=function(fn,Ln){return vf(Ha,fn,Ln)},Ha.fitSize=function(fn,Ln){return sl(Ha,fn,Ln)},Ha.fitWidth=function(fn,Ln){return Fc(Ha,fn,Ln)},Ha.fitHeight=function(fn,Ln){return Pu(Ha,fn,Ln)};function on(){return zt=rr=null,Ha}return Ha.scale(1070)}function cu(zt){return function(rr,Br){var wr=i(rr),la=i(Br),Ca=zt(wr*la);return[Ca*la*_(rr),Ca*_(Br)]}}function Cl(zt){return function(rr,Br){var wr=h(rr*rr+Br*Br),la=zt(wr),Ca=_(la),qa=i(la);return[m(rr*Ca,wr*qa),b(wr&&Br*Ca/wr)]}}var Ll=cu(function(zt){return h(2/(1+zt))});Ll.invert=Cl(function(zt){return 2*b(zt/2)});function If(){return xl(Ll).scale(124.75).clipAngle(180-.001)}var yu=cu(function(zt){return(zt=A(zt))&&zt/_(zt)});yu.invert=Cl(function(zt){return zt});function Bc(){return xl(yu).scale(79.4188).clipAngle(180-.001)}function Tl(zt,rr){return[zt,M(u((a+rr)/2))]}Tl.invert=function(zt,rr){return[zt,2*p(S(rr))-a]};function ll(){return Jc(Tl).scale(961/s)}function Jc(zt){var rr=xl(zt),Br=rr.center,wr=rr.scale,la=rr.translate,Ca=rr.clipExtent,qa=null,Ka,cn,Pn;rr.scale=function(on){return arguments.length?(wr(on),Ha()):wr()},rr.translate=function(on){return arguments.length?(la(on),Ha()):la()},rr.center=function(on){return arguments.length?(Br(on),Ha()):Br()},rr.clipExtent=function(on){return arguments.length?(on==null?qa=Ka=cn=Pn=null:(qa=+on[0][0],Ka=+on[0][1],cn=+on[1][0],Pn=+on[1][1]),Ha()):qa==null?null:[[qa,Ka],[cn,Pn]]};function Ha(){var on=r*wr(),fn=rr(bn(rr.rotate()).invert([0,0]));return Ca(qa==null?[[fn[0]-on,fn[1]-on],[fn[0]+on,fn[1]+on]]:zt===Tl?[[Math.max(fn[0]-on,qa),Ka],[Math.min(fn[0]+on,cn),Pn]]:[[qa,Math.max(fn[1]-on,Ka)],[cn,Math.min(fn[1]+on,Pn)]])}return Ha()}function Nc(zt){return u((a+zt)/2)}function Rf(zt,rr){var Br=i(zt),wr=zt===rr?_(zt):M(Br/i(rr))/M(Nc(rr)/Nc(zt)),la=Br*C(Nc(zt),wr)/wr;if(!wr)return Tl;function Ca(qa,Ka){la>0?Ka<-a+t&&(Ka=-a+t):Ka>a-t&&(Ka=a-t);var cn=la/C(Nc(Ka),wr);return[cn*_(wr*qa),la-cn*i(wr*qa)]}return Ca.invert=function(qa,Ka){var cn=la-Ka,Pn=w(wr)*h(qa*qa+cn*cn),Ha=m(qa,f(cn))*w(cn);return cn*wr<0&&(Ha-=r*w(qa)*w(cn)),[Ha/wr,2*p(C(la/Pn,1/wr))-a]},Ca}function fu(){return wl(Rf).scale(109.5).parallels([30,30])}function Du(zt,rr){return[zt,rr]}Du.invert=Du;function Iu(){return xl(Du).scale(152.63)}function Xu(zt,rr){var Br=i(zt),wr=zt===rr?_(zt):(Br-i(rr))/(rr-zt),la=Br/wr+zt;if(f(wr)t&&--wr>0);return[zt/(.8707+(Ca=Br*Br)*(-.131979+Ca*(-.013791+Ca*Ca*Ca*(.003971-.001529*Ca)))),Br]};function yf(){return xl(Hf).scale(175.295)}function ul(zt,rr){return[i(rr)*_(zt),_(rr)]}ul.invert=Cl(b);function Pl(){return xl(ul).scale(249.5).clipAngle(90+t)}function yc(zt,rr){var Br=i(rr),wr=1+i(zt)*Br;return[Br*_(zt)/wr,_(rr)/wr]}yc.invert=Cl(function(zt){return 2*p(zt)});function _c(){return xl(yc).scale(250).clipAngle(142)}function bc(zt,rr){return[M(u((a+rr)/2)),-zt]}bc.invert=function(zt,rr){return[-rr,2*p(S(zt))-a]};function nc(){var zt=Jc(bc),rr=zt.center,Br=zt.rotate;return zt.center=function(wr){return arguments.length?rr([-wr[1],wr[0]]):(wr=rr(),[wr[1],-wr[0]])},zt.rotate=function(wr){return arguments.length?Br([wr[0],wr[1],wr.length>2?wr[2]+90:90]):(wr=Br(),[wr[0],wr[1],wr[2]-90])},Br([0,0,90]).scale(159.155)}v.geoAlbers=Kc,v.geoAlbersUsa=Df,v.geoArea=W,v.geoAzimuthalEqualArea=If,v.geoAzimuthalEqualAreaRaw=Ll,v.geoAzimuthalEquidistant=Bc,v.geoAzimuthalEquidistantRaw=yu,v.geoBounds=vt,v.geoCentroid=An,v.geoCircle=ho,v.geoClipAntimeridian=Ut,v.geoClipCircle=Or,v.geoClipExtent=Cn,v.geoClipRectangle=La,v.geoConicConformal=fu,v.geoConicConformalRaw=Rf,v.geoConicEqualArea=pc,v.geoConicEqualAreaRaw=Yu,v.geoConicEquidistant=Qc,v.geoConicEquidistantRaw=Xu,v.geoContains=Io,v.geoDistance=zi,v.geoEqualEarth=Vf,v.geoEqualEarthRaw=gc,v.geoEquirectangular=Iu,v.geoEquirectangularRaw=Du,v.geoGnomonic=tf,v.geoGnomonicRaw=mf,v.geoGraticule=ws,v.geoGraticule10=Ko,v.geoIdentity=gf,v.geoInterpolate=as,v.geoLength=ti,v.geoMercator=ll,v.geoMercatorRaw=Tl,v.geoNaturalEarth1=yf,v.geoNaturalEarth1Raw=Hf,v.geoOrthographic=Pl,v.geoOrthographicRaw=ul,v.geoPath=Dc,v.geoProjection=xl,v.geoProjectionMutator=Wu,v.geoRotation=bn,v.geoStereographic=_c,v.geoStereographicRaw=yc,v.geoStream=j,v.geoTransform=Ic,v.geoTransverseMercator=nc,v.geoTransverseMercatorRaw=bc,Object.defineProperty(v,"__esModule",{value:!0})})}}),H8=Ee({"src/lib/usa_location_names.js"(J,H){"use strict";var v={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"},x=new Set(Object.values(v));H.exports={usaLocationAbbreviations:x,usaLocationList:v}}}),cw={};ga(cw,{COUNTRIES_X:()=>fw});var fw,G8=Da({"src/lib/custom_country_codes.ts"(){"use strict";fw=[{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:[]}]}}),Md=Ee({"src/lib/geo_location_utils.js"(J,H){"use strict";var v=Va(),{COUNTRIES:x,createLookup:E}=j8(),{area:k}=U8(),{centroid:l}=q8(),{coordAll:e}=Py(),{geoBounds:t}=Dy(),n=j0(),r=po(),a=Us(),o=dl(),s=Y0(),{usaLocationAbbreviations:c,usaLocationList:g}=H8(),{COUNTRIES_X:f}=(G8(),tn(cw)),{lookupAlpha3:p}=E([...x,...f]),m={"ISO-3":n,"USA-states":T,"country names":i};function i(P){let j=p(P);return j||(r.log("Unrecognized country name: "+P+"."),!1)}function T(P){P=P.trim();let j=c.has(P.toUpperCase())?P.toUpperCase():g[P.toLowerCase()];return j||(r.log("Unrecognized US location: "+P+"."),!1)}function S(P,j,U){var Z;if(!j||typeof j!="string")return!1;let Q=m[P](j);if(Q){let re;if(P==="USA-states"){re=[];for(let ne of U)((Z=ne?.properties)==null?void 0:Z.gu)==="USA"&&re.push(ne)}else re=U;for(let ne of re)if(ne.id===Q)return ne;r.log(`Location with id ${Q} does not have a matching topojson feature at this resolution.`)}return!1}var M=360;function C(P){for(let j=0;j0&&P[j+1][0]<0)return j;return null}function _(P){var j=P.geometry,U=j.coordinates,Z=P.id,Q=[],re,ne,oe,V;switch(Z==="RUS"||Z==="FJI"?re=function($){var K;if(C($)===null)K=$;else for(K=new Array($.length),V=0;V<$.length;V++)K[V]=[$[V][0]<0?$[V][0]+M:$[V][0],$[V][1]];Q.push(s.tester(K))}:Z==="ATA"?re=function($){var K=C($);if(K===null)return Q.push(s.tester($));var G=new Array($.length+1),X=0;for(V=0;V<$.length;V++)V>K?G[X++]=[$[V][0]+M,$[V][1]]:V===K?(G[X++]=$[V],G[X++]=[$[V][0],-90]):G[X++]=$[V];var q=s.tester(G);q.pts.pop(),Q.push(q)}:re=function($){Q.push(s.tester($))},j.type){case"MultiPolygon":for(ne=0;neQ&&(Q=oe,U=ne)}else U=j;return!U||!U.coordinates.some(V=>V.length>0)?[NaN,NaN]:l(U).geometry.coordinates}function A(P){var j=window.PlotlyGeoAssets||{},U=[];function Z(V){return new Promise(function($,K){v.json(V,function(G,X){if(G){delete j[V];var q=G.status===404?'GeoJSON at URL "'+V+'" does not exist.':"Unexpected error while fetching from "+V;return K(new Error(q))}return j[V]=X,$(X)})})}function Q(V){return new Promise(function($,K){var G=0,X=setInterval(function(){if(j[V]&&j[V]!=="pending")return clearInterval(X),$(j[V]);if(G>100)return clearInterval(X),K("Unexpected error while fetching from "+V);G++},50)})}for(var re=0;reI(z(P));function z(P){try{return e(P)}catch{return[]}}function I(P){if(P.length===0)return null;if(P.length===1){let[re,ne]=P[0];return[re,ne,re,ne]}let[[j,U],[Z,Q]]=t({type:"MultiPoint",coordinates:P});return[j,U,F([j,Z])[1],Q]}var N=(P,j)=>j.fitbounds==="geojson"&&P.locationmode==="geojson-id",R=(P,j)=>N(P,j)?z(w(P)):[],B=(P,j)=>I(R(P,j));function F([P,j]){return[P,P>j?j+M:j]}H.exports={locationToFeature:S,feature2polygons:_,getTraceGeojson:w,extractTraceFeature:h,fetchTraceGeoData:A,boundsOfCoords:I,computeBbox:b,coordsOf:z,doesCrossAntiMeridian:C,fitGeojsonBbox:B,fitGeojsonCoords:R,unwrapLonRange:F,ANTIMERIDIAN_LON_SHIFT:M}}}),hw=Ee({"src/traces/scattergeo/style.js"(J,H){"use strict";var v=Va(),x=mo(),E=Qn(),k=eh(),l=k.stylePoints,e=k.styleText;H.exports=function(r,a){a&&t(r,a)};function t(n,r){var a=r[0].trace,o=r[0].node3;o.style("opacity",r[0].trace.opacity),l(o,a,n),e(o,a,n),o.selectAll("path.js-line").style("fill","none").each(function(s){var c=v.select(this),g=s.trace,f=g.line||{};c.call(E.stroke,f.color).call(x.dashLine,f.dash||"",f.width||0),g.fill!=="none"&&c.call(E.fill,g.fillcolor)})}}}),Iy=Ee({"src/traces/scattergeo/plot.js"(J,H){"use strict";var v=Va(),x=Vr(),E=Cy().getTopojsonFeatures,k=Dm(),l=Md(),e=Ph().findExtremes,t=Qi().BADNUM,n=_h().calcMarkerSize,r=nl(),a=hw();function o(g,f,p){var m=f.layers.frontplot.select(".scatterlayer"),i=x.makeTraceGroups(m,p,"trace scattergeo");function T(S,M){S.lonlat[0]===t&&v.select(M).remove()}i.selectAll("*").remove(),i.each(function(S){var M=v.select(this),C=S[0].trace;if(r.hasLines(C)||C.fill!=="none"){var _=k.calcTraceToLineCoords(S),w=C.fill!=="none"?k.makePolygon(_):k.makeLine(_);M.selectAll("path.js-line").data([{geojson:w,trace:C}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}r.hasMarkers(C)&&M.selectAll("path.point").data(x.identity).enter().append("path").classed("point",!0).each(function(h){T(h,this)}),r.hasText(C)&&M.selectAll("g").data(x.identity).enter().append("g").append("text").each(function(h){T(h,this)}),a(g,S)})}function s(g,f){var p=g[0].trace,m=f[p.geo],i=m._subplot,T=p._length,S,M;if(x.isArrayOrTypedArray(p.locations)){var C=p.locationmode,_=C==="geojson-id"?l.extractTraceFeature(g):E(p,i.topojson);for(S=0;S")}}}),Y8=Ee({"src/traces/scattergeo/event_data.js"(J,H){"use strict";H.exports=function(x,E,k,l,e){x.lon=E.lon,x.lat=E.lat,x.location=E.loc?E.loc:null;var t=l[e];return t.fIn&&t.fIn.properties&&(x.properties=t.fIn.properties),x}}}),X8=Ee({"src/traces/scattergeo/select.js"(J,H){"use strict";var v=nl(),x=Qi().BADNUM;H.exports=function(k,l){var e=k.cd,t=k.xaxis,n=k.yaxis,r=[],a=e[0].trace,o,s,c,g,f,p=!v.hasMarkers(a)&&!v.hasText(a);if(p)return[];if(l===!1)for(f=0;fG?1:K>=G?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(G,X,q,W){for(q==null&&(q=0),W==null&&(W=G.length);q>>1;K(G[ee],X)<0?q=ee+1:W=ee}return q},right:function(G,X,q,W){for(q==null&&(q=0),W==null&&(W=G.length);q>>1;K(G[ee],X)>0?W=ee:q=ee+1}return q}}}function k(K){return function(G,X){return x(K(G),X)}}var l=E(x),e=l.right,t=l.left;function n(K,G){G==null&&(G=r);for(var X=0,q=K.length-1,W=K[0],ee=new Array(q<0?0:q);XK?1:G>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,G){var X=K.length,q=0,W=-1,ee=0,ae,fe,ye=0;if(G==null)for(;++W1)return ye/(q-1)}function g(K,G){var X=c(K,G);return X&&Math.sqrt(X)}function f(K,G){var X=K.length,q=-1,W,ee,ae;if(G==null){for(;++q=W)for(ee=ae=W;++qW&&(ee=W),ae=W)for(ee=ae=W;++qW&&(ee=W),ae0)return[K];if((q=G0)for(K=Math.ceil(K/fe),G=Math.floor(G/fe),ae=new Array(ee=Math.ceil(G-K+1));++W=0?(ee>=C?10:ee>=_?5:ee>=w?2:1)*Math.pow(10,W):-Math.pow(10,-W)/(ee>=C?10:ee>=_?5:ee>=w?2:1)}function A(K,G,X){var q=Math.abs(G-K)/Math.max(0,X),W=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/W;return ee>=C?W*=10:ee>=_?W*=5:ee>=w&&(W*=2),GMe;)Ie.pop(),--qe;var je=new Array(qe+1),ke;for(ee=0;ee<=qe;++ee)ke=je[ee]=[],ke.x0=ee>0?Ie[ee-1]:Ae,ke.x1=ee=1)return+X(K[q-1],q-1,K);var q,W=(q-1)*G,ee=Math.floor(W),ae=+X(K[ee],ee,K),fe=+X(K[ee+1],ee+1,K);return ae+(fe-ae)*(W-ee)}}function N(K,G,X){return K=i.call(K,s).sort(x),Math.ceil((X-G)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function R(K,G,X){return Math.ceil((X-G)/(3.5*g(K)*Math.pow(K.length,-1/3)))}function B(K,G){var X=K.length,q=-1,W,ee;if(G==null){for(;++q=W)for(ee=W;++qee&&(ee=W)}else for(;++q=W)for(ee=W;++qee&&(ee=W);return ee}function F(K,G){var X=K.length,q=X,W=-1,ee,ae=0;if(G==null)for(;++W=0;)for(ae=K[G],X=ae.length;--X>=0;)ee[--W]=ae[X];return ee}function U(K,G){var X=K.length,q=-1,W,ee;if(G==null){for(;++q=W)for(ee=W;++qW&&(ee=W)}else for(;++q=W)for(ee=W;++qW&&(ee=W);return ee}function Z(K,G){for(var X=G.length,q=new Array(X);X--;)q[X]=K[G[X]];return q}function Q(K,G){if(X=K.length){var X,q=0,W=0,ee,ae=K[W];for(G==null&&(G=x);++q0?1:Xe<0?-1:0},p=Math.sin,m=Math.tan,i=1e-6,T=1e-12,S=Math.PI,M=S/2,C=S/4,_=Math.SQRT1_2,w=R(2),h=R(S),u=S*2,A=180/S,b=S/180;function z(Xe){return Xe?Xe/Math.sin(Xe):1}function I(Xe){return Xe>1?M:Xe<-1?-M:Math.asin(Xe)}function N(Xe){return Xe>1?0:Xe<-1?S:Math.acos(Xe)}function R(Xe){return Xe>0?Math.sqrt(Xe):0}function B(Xe){return Xe=n(2*Xe),(Xe-1)/(Xe+1)}function F(Xe){return(n(Xe)-n(-Xe))/2}function P(Xe){return(n(Xe)+n(-Xe))/2}function j(Xe){return a(Xe+R(Xe*Xe+1))}function U(Xe){return a(Xe+R(Xe*Xe-1))}function Z(Xe){var rt=m(Xe/2),pt=2*a(t(Xe/2))/(rt*rt);function _t(Nt,Bt){var Yt=t(Nt),Dr=t(Bt),Ur=p(Bt),kr=Dr*Yt,Wr=-((1-kr?a((1+kr)/2)/(1-kr):-.5)+pt/(1+kr));return[Wr*Dr*p(Nt),Wr*Ur]}return _t.invert=function(Nt,Bt){var Yt=R(Nt*Nt+Bt*Bt),Dr=-Xe/2,Ur=50,kr;if(!Yt)return[0,0];do{var Wr=Dr/2,oa=t(Wr),ma=p(Wr),ka=ma/oa,$a=-a(k(oa));Dr-=kr=(2/ka*$a-pt*ka-Yt)/(-$a/(ma*ma)+1-pt/(2*oa*oa))*(oa<0?.7:1)}while(k(kr)>i&&--Ur>0);var yn=p(Dr);return[e(Nt*yn,Yt*t(Dr)),I(Bt*yn/Yt)]},_t}function Q(){var Xe=M,rt=x.geoProjectionMutator(Z),pt=rt(Xe);return pt.radius=function(_t){return arguments.length?rt(Xe=_t*b):Xe*A},pt.scale(179.976).clipAngle(147)}function re(Xe,rt){var pt=t(rt),_t=z(N(pt*t(Xe/=2)));return[2*pt*p(Xe)*_t,p(rt)*_t]}re.invert=function(Xe,rt){if(!(Xe*Xe+4*rt*rt>S*S+i)){var pt=Xe,_t=rt,Nt=25;do{var Bt=p(pt),Yt=p(pt/2),Dr=t(pt/2),Ur=p(_t),kr=t(_t),Wr=p(2*_t),oa=Ur*Ur,ma=kr*kr,ka=Yt*Yt,$a=1-ma*Dr*Dr,yn=$a?N(kr*Dr)*R(Nn=1/$a):Nn=0,Nn,wi=2*yn*kr*Yt-Xe,Yi=yn*Ur-rt,Ti=Nn*(ma*ka+yn*kr*Dr*oa),_o=Nn*(.5*Bt*Wr-yn*2*Ur*Yt),bo=Nn*.25*(Wr*Yt-yn*Ur*ma*Bt),Zo=Nn*(oa*Dr+yn*ka*kr),fs=_o*bo-Zo*Ti;if(!fs)break;var Po=(Yi*_o-wi*Zo)/fs,Es=(wi*bo-Yi*Ti)/fs;pt-=Po,_t-=Es}while((k(Po)>i||k(Es)>i)&&--Nt>0);return[pt,_t]}};function ne(){return x.geoProjection(re).scale(152.63)}function oe(Xe){var rt=p(Xe),pt=t(Xe),_t=Xe>=0?1:-1,Nt=m(_t*Xe),Bt=(1+rt-pt)/2;function Yt(Dr,Ur){var kr=t(Ur),Wr=t(Dr/=2);return[(1+kr)*p(Dr),(_t*Ur>-e(Wr,Nt)-.001?0:-_t*10)+Bt+p(Ur)*pt-(1+kr)*rt*Wr]}return Yt.invert=function(Dr,Ur){var kr=0,Wr=0,oa=50;do{var ma=t(kr),ka=p(kr),$a=t(Wr),yn=p(Wr),Nn=1+$a,wi=Nn*ka-Dr,Yi=Bt+yn*pt-Nn*rt*ma-Ur,Ti=Nn*ma/2,_o=-ka*yn,bo=rt*Nn*ka/2,Zo=pt*$a+rt*ma*yn,fs=_o*bo-Zo*Ti,Po=(Yi*_o-wi*Zo)/fs/2,Es=(wi*bo-Yi*Ti)/fs;k(Es)>2&&(Es/=2),kr-=Po,Wr-=Es}while((k(Po)>i||k(Es)>i)&&--oa>0);return _t*Wr>-e(t(kr),Nt)-.001?[kr*2,Wr]:null},Yt}function V(){var Xe=20*b,rt=Xe>=0?1:-1,pt=m(rt*Xe),_t=x.geoProjectionMutator(oe),Nt=_t(Xe),Bt=Nt.stream;return Nt.parallel=function(Yt){return arguments.length?(pt=m((rt=(Xe=Yt*b)>=0?1:-1)*Xe),_t(Xe)):Xe*A},Nt.stream=function(Yt){var Dr=Nt.rotate(),Ur=Bt(Yt),kr=(Nt.rotate([0,0]),Bt(Yt)),Wr=Nt.precision();return Nt.rotate(Dr),Ur.sphere=function(){kr.polygonStart(),kr.lineStart();for(var oa=rt*-180;rt*oa<180;oa+=rt*90)kr.point(oa,rt*90);if(Xe)for(;rt*(oa-=3*rt*Wr)>=-180;)kr.point(oa,rt*-e(t(oa*b/2),pt)*A);kr.lineEnd(),kr.polygonEnd()},Ur},Nt.scale(218.695).center([0,28.0974])}function $(Xe,rt){var pt=m(rt/2),_t=R(1-pt*pt),Nt=1+_t*t(Xe/=2),Bt=p(Xe)*_t/Nt,Yt=pt/Nt,Dr=Bt*Bt,Ur=Yt*Yt;return[4/3*Bt*(3+Dr-3*Ur),4/3*Yt*(3+3*Dr-Ur)]}$.invert=function(Xe,rt){if(Xe*=3/8,rt*=3/8,!Xe&&k(rt)>1)return null;var pt=Xe*Xe,_t=rt*rt,Nt=1+pt+_t,Bt=R((Nt-R(Nt*Nt-4*rt*rt))/2),Yt=I(Bt)/3,Dr=Bt?U(k(rt/Bt))/3:j(k(Xe))/3,Ur=t(Yt),kr=P(Dr),Wr=kr*kr-Ur*Ur;return[f(Xe)*2*e(F(Dr)*Ur,.25-Wr),f(rt)*2*e(kr*p(Yt),.25+Wr)]};function K(){return x.geoProjection($).scale(66.1603)}var G=R(8),X=a(1+w);function q(Xe,rt){var pt=k(rt);return ptT&&--_t>0);return[Xe/(t(pt)*(G-1/p(pt))),f(rt)*pt]};function W(){return x.geoProjection(q).scale(112.314)}function ee(Xe){var rt=2*S/Xe;function pt(_t,Nt){var Bt=x.geoAzimuthalEquidistantRaw(_t,Nt);if(k(_t)>M){var Yt=e(Bt[1],Bt[0]),Dr=R(Bt[0]*Bt[0]+Bt[1]*Bt[1]),Ur=rt*g((Yt-M)/rt)+M,kr=e(p(Yt-=Ur),2-t(Yt));Yt=Ur+I(S/Dr*p(kr))-kr,Bt[0]=Dr*t(Yt),Bt[1]=Dr*p(Yt)}return Bt}return pt.invert=function(_t,Nt){var Bt=R(_t*_t+Nt*Nt);if(Bt>M){var Yt=e(Nt,_t),Dr=rt*g((Yt-M)/rt)+M,Ur=Yt>Dr?-1:1,kr=Bt*t(Dr-Yt),Wr=1/m(Ur*N((kr-S)/R(S*(S-2*kr)+Bt*Bt)));Yt=Dr+2*l((Wr+Ur*R(Wr*Wr-3))/3),_t=Bt*t(Yt),Nt=Bt*p(Yt)}return x.geoAzimuthalEquidistantRaw.invert(_t,Nt)},pt}function ae(){var Xe=5,rt=x.geoProjectionMutator(ee),pt=rt(Xe),_t=pt.stream,Nt=.01,Bt=-t(Nt*b),Yt=p(Nt*b);return pt.lobes=function(Dr){return arguments.length?rt(Xe=+Dr):Xe},pt.stream=function(Dr){var Ur=pt.rotate(),kr=_t(Dr),Wr=(pt.rotate([0,0]),_t(Dr));return pt.rotate(Ur),kr.sphere=function(){Wr.polygonStart(),Wr.lineStart();for(var oa=0,ma=360/Xe,ka=2*S/Xe,$a=90-180/Xe,yn=M;oa0&&k(Nt)>i);return _t<0?NaN:pt}function Me(Xe,rt,pt){return rt===void 0&&(rt=40),pt===void 0&&(pt=T),function(_t,Nt,Bt,Yt){var Dr,Ur,kr;Bt=Bt===void 0?0:+Bt,Yt=Yt===void 0?0:+Yt;for(var Wr=0;WrDr){Bt-=Ur/=2,Yt-=kr/=2;continue}Dr=$a;var yn=(Bt>0?-1:1)*pt,Nn=(Yt>0?-1:1)*pt,wi=Xe(Bt+yn,Yt),Yi=Xe(Bt,Yt+Nn),Ti=(wi[0]-oa[0])/yn,_o=(wi[1]-oa[1])/yn,bo=(Yi[0]-oa[0])/Nn,Zo=(Yi[1]-oa[1])/Nn,fs=Zo*Ti-_o*bo,Po=(k(fs)<.5?.5:1)/fs;if(Ur=(ka*bo-ma*Zo)*Po,kr=(ma*_o-ka*Ti)*Po,Bt+=Ur,Yt+=kr,k(Ur)0&&(Dr[1]*=1+Ur/1.5*Dr[0]*Dr[0]),Dr}return _t.invert=Me(_t),_t}function qe(){return x.geoProjection(Ie()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function je(Xe,rt){var pt=Xe*p(rt),_t=30,Nt;do rt-=Nt=(rt+p(rt)-pt)/(1+t(rt));while(k(Nt)>i&&--_t>0);return rt/2}function ke(Xe,rt,pt){function _t(Nt,Bt){return[Xe*Nt*t(Bt=je(pt,Bt)),rt*p(Bt)]}return _t.invert=function(Nt,Bt){return Bt=I(Bt/rt),[Nt/(Xe*t(Bt)),I((2*Bt+p(2*Bt))/pt)]},_t}var ge=ke(w/M,w,S);function le(){return x.geoProjection(ge).scale(169.529)}var ve=2.00276,se=1.11072;function Te(Xe,rt){var pt=je(S,rt);return[ve*Xe/(1/t(rt)+se/t(pt)),(rt+w*p(pt))/ve]}Te.invert=function(Xe,rt){var pt=ve*rt,_t=rt<0?-C:C,Nt=25,Bt,Yt;do Yt=pt-w*p(_t),_t-=Bt=(p(2*_t)+2*_t-S*p(Yt))/(2*t(2*_t)+2+S*t(Yt)*w*t(_t));while(k(Bt)>i&&--Nt>0);return Yt=pt-w*p(_t),[Xe*(1/t(Yt)+se/t(_t))/ve,Yt]};function Fe(){return x.geoProjection(Te).scale(160.857)}function We(Xe){var rt=0,pt=x.geoProjectionMutator(Xe),_t=pt(rt);return _t.parallel=function(Nt){return arguments.length?pt(rt=Nt*b):rt*A},_t}function Ge(Xe,rt){return[Xe*t(rt),rt]}Ge.invert=function(Xe,rt){return[Xe/t(rt),rt]};function gt(){return x.geoProjection(Ge).scale(152.63)}function mt(Xe){if(!Xe)return Ge;var rt=1/m(Xe);function pt(_t,Nt){var Bt=rt+Xe-Nt,Yt=Bt&&_t*t(Nt)/Bt;return[Bt*p(Yt),rt-Bt*t(Yt)]}return pt.invert=function(_t,Nt){var Bt=R(_t*_t+(Nt=rt-Nt)*Nt),Yt=rt+Xe-Bt;return[Bt/t(Yt)*e(_t,Nt),Yt]},pt}function Tt(){return We(mt).scale(123.082).center([0,26.1441]).parallel(45)}function At(Xe){function rt(pt,_t){var Nt=M-_t,Bt=Nt&&pt*Xe*p(Nt)/Nt;return[Nt*p(Bt)/Xe,M-Nt*t(Bt)]}return rt.invert=function(pt,_t){var Nt=pt*Xe,Bt=M-_t,Yt=R(Nt*Nt+Bt*Bt),Dr=e(Nt,Bt);return[(Yt?Yt/p(Yt):1)*Dr/Xe,M-Yt]},rt}function Kt(){var Xe=.5,rt=x.geoProjectionMutator(At),pt=rt(Xe);return pt.fraction=function(_t){return arguments.length?rt(Xe=+_t):Xe},pt.scale(158.837)}var ar=ke(1,4/S,S);function _r(){return x.geoProjection(ar).scale(152.63)}function Zt(Xe,rt,pt,_t,Nt,Bt){var Yt=t(Bt),Dr;if(k(Xe)>1||k(Bt)>1)Dr=N(pt*Nt+rt*_t*Yt);else{var Ur=p(Xe/2),kr=p(Bt/2);Dr=2*I(R(Ur*Ur+rt*_t*kr*kr))}return k(Dr)>i?[Dr,e(_t*p(Bt),rt*Nt-pt*_t*Yt)]:[0,0]}function sr(Xe,rt,pt){return N((Xe*Xe+rt*rt-pt*pt)/(2*Xe*rt))}function Ot(Xe){return Xe-2*S*r((Xe+S)/(2*S))}function vt(Xe,rt,pt){for(var _t=[[Xe[0],Xe[1],p(Xe[1]),t(Xe[1])],[rt[0],rt[1],p(rt[1]),t(rt[1])],[pt[0],pt[1],p(pt[1]),t(pt[1])]],Nt=_t[2],Bt,Yt=0;Yt<3;++Yt,Nt=Bt)Bt=_t[Yt],Nt.v=Zt(Bt[1]-Nt[1],Nt[3],Nt[2],Bt[3],Bt[2],Bt[0]-Nt[0]),Nt.point=[0,0];var Dr=sr(_t[0].v[0],_t[2].v[0],_t[1].v[0]),Ur=sr(_t[0].v[0],_t[1].v[0],_t[2].v[0]),kr=S-Dr;_t[2].point[1]=0,_t[0].point[0]=-(_t[1].point[0]=_t[0].v[0]/2);var Wr=[_t[2].point[0]=_t[0].point[0]+_t[2].v[0]*t(Dr),2*(_t[0].point[1]=_t[1].point[1]=_t[2].v[0]*p(Dr))];function oa(ma,ka){var $a=p(ka),yn=t(ka),Nn=new Array(3),wi;for(wi=0;wi<3;++wi){var Yi=_t[wi];if(Nn[wi]=Zt(ka-Yi[1],Yi[3],Yi[2],yn,$a,ma-Yi[0]),!Nn[wi][0])return Yi.point;Nn[wi][1]=Ot(Nn[wi][1]-Yi.v[1])}var Ti=Wr.slice();for(wi=0;wi<3;++wi){var _o=wi==2?0:wi+1,bo=sr(_t[wi].v[0],Nn[wi][0],Nn[_o][0]);Nn[wi][1]<0&&(bo=-bo),wi?wi==1?(bo=Ur-bo,Ti[0]-=Nn[wi][0]*t(bo),Ti[1]-=Nn[wi][0]*p(bo)):(bo=kr-bo,Ti[0]+=Nn[wi][0]*t(bo),Ti[1]+=Nn[wi][0]*p(bo)):(Ti[0]+=Nn[wi][0]*t(bo),Ti[1]-=Nn[wi][0]*p(bo))}return Ti[0]/=3,Ti[1]/=3,Ti}return oa}function ht(Xe){return Xe[0]*=b,Xe[1]*=b,Xe}function Re(){return Be([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Be(Xe,rt,pt){var _t=x.geoCentroid({type:"MultiPoint",coordinates:[Xe,rt,pt]}),Nt=[-_t[0],-_t[1]],Bt=x.geoRotation(Nt),Yt=vt(ht(Bt(Xe)),ht(Bt(rt)),ht(Bt(pt)));Yt.invert=Me(Yt);var Dr=x.geoProjection(Yt).rotate(Nt),Ur=Dr.center;return delete Dr.rotate,Dr.center=function(kr){return arguments.length?Ur(Bt(kr)):Bt.invert(Ur())},Dr.clipAngle(90)}function He(Xe,rt){var pt=R(1-p(rt));return[2/h*Xe*pt,h*(1-pt)]}He.invert=function(Xe,rt){var pt=(pt=rt/h-1)*pt;return[pt>0?Xe*R(S/pt)/2:0,I(1-pt)]};function $e(){return x.geoProjection(He).scale(95.6464).center([0,30])}function Ze(Xe){var rt=m(Xe);function pt(_t,Nt){return[_t,(_t?_t/p(_t):1)*(p(Nt)*t(_t)-rt*t(Nt))]}return pt.invert=rt?function(_t,Nt){_t&&(Nt*=p(_t)/_t);var Bt=t(_t);return[_t,2*e(R(Bt*Bt+rt*rt-Nt*Nt)-Bt,rt-Nt)]}:function(_t,Nt){return[_t,I(_t?Nt*m(_t)/_t:Nt)]},pt}function Je(){return We(Ze).scale(249.828).clipAngle(90)}var Mt=R(3);function dt(Xe,rt){return[Mt*Xe*(2*t(2*rt/3)-1)/h,Mt*h*p(rt/3)]}dt.invert=function(Xe,rt){var pt=3*I(rt/(Mt*h));return[h*Xe/(Mt*(2*t(2*pt/3)-1)),pt]};function Dt(){return x.geoProjection(dt).scale(156.19)}function Ct(Xe){var rt=t(Xe);function pt(_t,Nt){return[_t*rt,p(Nt)/rt]}return pt.invert=function(_t,Nt){return[_t/rt,I(Nt*rt)]},pt}function Vt(){return We(Ct).parallel(38.58).scale(195.044)}function Ht(Xe){var rt=t(Xe);function pt(_t,Nt){return[_t*rt,(1+rt)*m(Nt/2)]}return pt.invert=function(_t,Nt){return[_t/rt,l(Nt/(1+rt))*2]},pt}function Wt(){return We(Ht).scale(124.75)}function Sr(Xe,rt){var pt=R(8/(3*S));return[pt*Xe*(1-k(rt)/S),pt*rt]}Sr.invert=function(Xe,rt){var pt=R(8/(3*S)),_t=rt/pt;return[Xe/(pt*(1-k(_t)/S)),_t]};function ia(){return x.geoProjection(Sr).scale(165.664)}function $t(Xe,rt){var pt=R(4-3*p(k(rt)));return[2/R(6*S)*Xe*pt,f(rt)*R(2*S/3)*(2-pt)]}$t.invert=function(Xe,rt){var pt=2-k(rt)/R(2*S/3);return[Xe*R(6*S)/(2*pt),f(rt)*I((4-pt*pt)/3)]};function It(){return x.geoProjection($t).scale(165.664)}function ir(Xe,rt){var pt=R(S*(4+S));return[2/pt*Xe*(1+R(1-4*rt*rt/(S*S))),4/pt*rt]}ir.invert=function(Xe,rt){var pt=R(S*(4+S))/2;return[Xe*pt/(1+R(1-rt*rt*(4+S)/(4*S))),rt*pt/2]};function cr(){return x.geoProjection(ir).scale(180.739)}function fr(Xe,rt){var pt=(2+M)*p(rt);rt/=2;for(var _t=0,Nt=1/0;_t<10&&k(Nt)>i;_t++){var Bt=t(rt);rt-=Nt=(rt+p(rt)*(Bt+2)-pt)/(2*Bt*(1+Bt))}return[2/R(S*(4+S))*Xe*(1+t(rt)),2*R(S/(4+S))*p(rt)]}fr.invert=function(Xe,rt){var pt=rt*R((4+S)/S)/2,_t=I(pt),Nt=t(_t);return[Xe/(2/R(S*(4+S))*(1+Nt)),I((_t+pt*(Nt+2))/(2+M))]};function Ir(){return x.geoProjection(fr).scale(180.739)}function sa(Xe,rt){return[Xe*(1+t(rt))/R(2+S),2*rt/R(2+S)]}sa.invert=function(Xe,rt){var pt=R(2+S),_t=rt*pt/2;return[pt*Xe/(1+t(_t)),_t]};function aa(){return x.geoProjection(sa).scale(173.044)}function xa(Xe,rt){for(var pt=(1+M)*p(rt),_t=0,Nt=1/0;_t<10&&k(Nt)>i;_t++)rt-=Nt=(rt+p(rt)-pt)/(1+t(rt));return pt=R(2+S),[Xe*(1+t(rt))/pt,2*rt/pt]}xa.invert=function(Xe,rt){var pt=1+M,_t=R(pt/2);return[Xe*2*_t/(1+t(rt*=_t)),I((rt+p(rt))/pt)]};function ja(){return x.geoProjection(xa).scale(173.044)}var Oa=3+2*w;function An(Xe,rt){var pt=p(Xe/=2),_t=t(Xe),Nt=R(t(rt)),Bt=t(rt/=2),Yt=p(rt)/(Bt+w*_t*Nt),Dr=R(2/(1+Yt*Yt)),Ur=R((w*Bt+(_t+pt)*Nt)/(w*Bt+(_t-pt)*Nt));return[Oa*(Dr*(Ur-1/Ur)-2*a(Ur)),Oa*(Dr*Yt*(Ur+1/Ur)-2*l(Yt))]}An.invert=function(Xe,rt){if(!(Bt=$.invert(Xe/1.2,rt*1.065)))return null;var pt=Bt[0],_t=Bt[1],Nt=20,Bt;Xe/=Oa,rt/=Oa;do{var Yt=pt/2,Dr=_t/2,Ur=p(Yt),kr=t(Yt),Wr=p(Dr),oa=t(Dr),ma=t(_t),ka=R(ma),$a=Wr/(oa+w*kr*ka),yn=$a*$a,Nn=R(2/(1+yn)),wi=w*oa+(kr+Ur)*ka,Yi=w*oa+(kr-Ur)*ka,Ti=wi/Yi,_o=R(Ti),bo=_o-1/_o,Zo=_o+1/_o,fs=Nn*bo-2*a(_o)-Xe,Po=Nn*$a*Zo-2*l($a)-rt,Es=Wr&&_*ka*Ur*yn/Wr,cl=(w*kr*oa+ka)/(2*(oa+w*kr*ka)*(oa+w*kr*ka)*ka),ql=-.5*$a*Nn*Nn*Nn,Js=ql*Es,Tu=ql*cl,Li=(Li=2*oa+w*ka*(kr-Ur))*Li*_o,Vi=(w*kr*oa*ka+ma)/Li,fl=-(w*Ur*Wr)/(ka*Li),Ku=bo*Js-2*Vi/_o+Nn*(Vi+Vi/Ti),tu=bo*Tu-2*fl/_o+Nn*(fl+fl/Ti),Bs=$a*Zo*Js-2*Es/(1+yn)+Nn*Zo*Es+Nn*$a*(Vi-Vi/Ti),oc=$a*Zo*Tu-2*cl/(1+yn)+Nn*Zo*cl+Nn*$a*(fl-fl/Ti),du=tu*Bs-oc*Ku;if(!du)break;var hl=(Po*tu-fs*oc)/du,Uc=(fs*Bs-Po*Ku)/du;pt-=hl,_t=o(-M,s(M,_t-Uc))}while((k(hl)>i||k(Uc)>i)&&--Nt>0);return k(k(_t)-M)_t){var oa=R(Wr),ma=e(kr,Ur),ka=pt*g(ma/pt),$a=ma-ka,yn=Xe*t($a),Nn=(Xe*p($a)-$a*p(yn))/(M-yn),wi=Za($a,Nn),Yi=(S-Xe)/ot(wi,yn,S);Ur=oa;var Ti=50,_o;do Ur-=_o=(Xe+ot(wi,yn,Ur)*Yi-oa)/(wi(Ur)*Yi);while(k(_o)>i&&--Ti>0);kr=$a*p(Ur),Ur_t){var Ur=R(Dr),kr=e(Yt,Bt),Wr=pt*g(kr/pt),oa=kr-Wr;Bt=Ur*t(oa),Yt=Ur*p(oa);for(var ma=Bt-M,ka=p(Bt),$a=Yt/ka,yn=Bti||k($a)>i)&&--yn>0);return[oa,ma]},Ur}var ur=hr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Tr(){return x.geoProjection(ur).scale(149.995)}var Rr=hr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Fr(){return x.geoProjection(Rr).scale(153.93)}var nt=hr(5/6*S,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kt(){return x.geoProjection(nt).scale(130.945)}function Ut(Xe,rt){var pt=Xe*Xe,_t=rt*rt;return[Xe*(1-.162388*_t)*(.87-952426e-9*pt*pt),rt*(1+_t/12)]}Ut.invert=function(Xe,rt){var pt=Xe,_t=rt,Nt=50,Bt;do{var Yt=_t*_t;_t-=Bt=(_t*(1+Yt/12)-rt)/(1+Yt/4)}while(k(Bt)>i&&--Nt>0);Nt=50,Xe/=1-.162388*Yt;do{var Dr=(Dr=pt*pt)*Dr;pt-=Bt=(pt*(.87-952426e-9*Dr)-Xe)/(.87-.00476213*Dr)}while(k(Bt)>i&&--Nt>0);return[pt,_t]};function nr(){return x.geoProjection(Ut).scale(131.747)}var Er=hr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function br(){return x.geoProjection(Er).scale(131.087)}function Or(Xe){var rt=Xe(M,0)[0]-Xe(-M,0)[0];function pt(_t,Nt){var Bt=_t>0?-.5:.5,Yt=Xe(_t+Bt*S,Nt);return Yt[0]-=Bt*rt,Yt}return Xe.invert&&(pt.invert=function(_t,Nt){var Bt=_t>0?-.5:.5,Yt=Xe.invert(_t+Bt*rt,Nt),Dr=Yt[0]-Bt*S;return Dr<-S?Dr+=2*S:Dr>S&&(Dr-=2*S),Yt[0]=Dr,Yt}),pt}function Pr(Xe,rt){var pt=f(Xe),_t=f(rt),Nt=t(rt),Bt=t(Xe)*Nt,Yt=p(Xe)*Nt,Dr=p(_t*rt);Xe=k(e(Yt,Dr)),rt=I(Bt),k(Xe-M)>i&&(Xe%=M);var Ur=fa(Xe>S/4?M-Xe:Xe,rt);return Xe>S/4&&(Dr=Ur[0],Ur[0]=-Ur[1],Ur[1]=-Dr),Ur[0]*=pt,Ur[1]*=-_t,Ur}Pr.invert=function(Xe,rt){k(Xe)>1&&(Xe=f(Xe)*2-Xe),k(rt)>1&&(rt=f(rt)*2-rt);var pt=f(Xe),_t=f(rt),Nt=-pt*Xe,Bt=-_t*rt,Yt=Bt/Nt<1,Dr=Fa(Yt?Bt:Nt,Yt?Nt:Bt),Ur=Dr[0],kr=Dr[1],Wr=t(kr);return Yt&&(Ur=-M-Ur),[pt*(e(p(Ur)*Wr,-p(kr))+S),_t*I(t(Ur)*Wr)]};function fa(Xe,rt){if(rt===M)return[0,0];var pt=p(rt),_t=pt*pt,Nt=_t*_t,Bt=1+Nt,Yt=1+3*Nt,Dr=1-Nt,Ur=I(1/R(Bt)),kr=Dr+_t*Bt*Ur,Wr=(1-pt)/kr,oa=R(Wr),ma=Wr*Bt,ka=R(ma),$a=oa*Dr,yn,Nn;if(Xe===0)return[0,-($a+_t*ka)];var wi=t(rt),Yi=1/wi,Ti=2*pt*wi,_o=(-3*_t+Ur*Yt)*Ti,bo=(-kr*wi-(1-pt)*_o)/(kr*kr),Zo=.5*bo/oa,fs=Dr*Zo-2*_t*oa*Ti,Po=_t*Bt*bo+Wr*Yt*Ti,Es=-Yi*Ti,cl=-Yi*Po,ql=-2*Yi*fs,Js=4*Xe/S,Tu;if(Xe>.222*S||rt.175*S){if(yn=($a+_t*R(ma*(1+Nt)-$a*$a))/(1+Nt),Xe>S/4)return[yn,yn];var Li=yn,Vi=.5*yn;yn=.5*(Vi+Li),Nn=50;do{var fl=R(ma-yn*yn),Ku=yn*(ql+Es*fl)+cl*I(yn/ka)-Js;if(!Ku)break;Ku<0?Vi=yn:Li=yn,yn=.5*(Vi+Li)}while(k(Li-Vi)>i&&--Nn>0)}else{yn=i,Nn=25;do{var tu=yn*yn,Bs=R(ma-tu),oc=ql+Es*Bs,du=yn*oc+cl*I(yn/ka)-Js,hl=oc+(cl-Es*tu)/Bs;yn-=Tu=Bs?du/hl:0}while(k(Tu)>i&&--Nn>0)}return[yn,-$a-_t*R(ma-yn*yn)]}function Fa(Xe,rt){for(var pt=0,_t=1,Nt=.5,Bt=50;;){var Yt=Nt*Nt,Dr=R(Nt),Ur=I(1/R(1+Yt)),kr=1-Yt+Nt*(1+Yt)*Ur,Wr=(1-Dr)/kr,oa=R(Wr),ma=Wr*(1+Yt),ka=oa*(1-Yt),$a=ma-Xe*Xe,yn=R($a),Nn=rt+ka+Nt*yn;if(k(_t-pt)0?pt=Nt:_t=Nt,Nt=.5*(pt+_t)}if(!Bt)return null;var wi=I(Dr),Yi=t(wi),Ti=1/Yi,_o=2*Dr*Yi,bo=(-3*Nt+Ur*(1+3*Yt))*_o,Zo=(-kr*Yi-(1-Dr)*bo)/(kr*kr),fs=.5*Zo/oa,Po=(1-Yt)*fs-2*Nt*oa*_o,Es=-2*Ti*Po,cl=-Ti*_o,ql=-Ti*(Nt*(1+Yt)*Zo+Wr*(1+3*Yt)*_o);return[S/4*(Xe*(Es+cl*yn)+ql*I(Xe/R(ma))),wi]}function La(){return x.geoProjection(Or(Pr)).scale(239.75)}function Cn(Xe,rt,pt){var _t,Nt,Bt;return Xe?(_t=mn(Xe,pt),rt?(Nt=mn(rt,1-pt),Bt=Nt[1]*Nt[1]+pt*_t[0]*_t[0]*Nt[0]*Nt[0],[[_t[0]*Nt[2]/Bt,_t[1]*_t[2]*Nt[0]*Nt[1]/Bt],[_t[1]*Nt[1]/Bt,-_t[0]*_t[2]*Nt[0]*Nt[2]/Bt],[_t[2]*Nt[1]*Nt[2]/Bt,-pt*_t[0]*_t[1]*Nt[0]/Bt]]):[[_t[0],0],[_t[1],0],[_t[2],0]]):(Nt=mn(rt,1-pt),[[0,Nt[0]/Nt[1]],[1/Nt[1],0],[Nt[2]/Nt[1],0]])}function mn(Xe,rt){var pt,_t,Nt,Bt,Yt;if(rt=1-i)return pt=(1-rt)/4,_t=P(Xe),Bt=B(Xe),Nt=1/_t,Yt=_t*F(Xe),[Bt+pt*(Yt-Xe)/(_t*_t),Nt-pt*Bt*Nt*(Yt-Xe),Nt+pt*Bt*Nt*(Yt+Xe),2*l(n(Xe))-M+pt*(Yt-Xe)/_t];var Dr=[1,0,0,0,0,0,0,0,0],Ur=[R(rt),0,0,0,0,0,0,0,0],kr=0;for(_t=R(1-rt),Yt=1;k(Ur[kr]/Dr[kr])>i&&kr<8;)pt=Dr[kr++],Ur[kr]=(pt-_t)/2,Dr[kr]=(pt+_t)/2,_t=R(pt*_t),Yt*=2;Nt=Yt*Dr[kr]*Xe;do Bt=Ur[kr]*p(_t=Nt)/Dr[kr],Nt=(I(Bt)+Nt)/2;while(--kr);return[p(Nt),Bt=t(Nt),Bt/t(Nt-_t),Nt]}function bi(Xe,rt,pt){var _t=k(Xe),Nt=k(rt),Bt=F(Nt);if(_t){var Yt=1/p(_t),Dr=1/(m(_t)*m(_t)),Ur=-(Dr+pt*(Bt*Bt*Yt*Yt)-1+pt),kr=(pt-1)*Dr,Wr=(-Ur+R(Ur*Ur-4*kr))/2;return[gn(l(1/R(Wr)),pt)*f(Xe),gn(l(R((Wr/Dr-1)/pt)),1-pt)*f(rt)]}return[0,gn(l(Bt),1-pt)*f(rt)]}function gn(Xe,rt){if(!rt)return Xe;if(rt===1)return a(m(Xe/2+C));for(var pt=1,_t=R(1-rt),Nt=R(rt),Bt=0;k(Nt)>i;Bt++){if(Xe%S){var Yt=l(_t*m(Xe)/pt);Yt<0&&(Yt+=S),Xe+=Yt+~~(Xe/S)*S}else Xe+=Xe;Nt=(pt+_t)/2,_t=R(pt*_t),Nt=((pt=Nt)-_t)/2}return Xe/(c(2,Bt)*pt)}function eo(Xe,rt){var pt=(w-1)/(w+1),_t=R(1-pt*pt),Nt=gn(M,_t*_t),Bt=-1,Yt=a(m(S/4+k(rt)/2)),Dr=n(Bt*Yt)/R(pt),Ur=si(Dr*t(Bt*Xe),Dr*p(Bt*Xe)),kr=bi(Ur[0],Ur[1],_t*_t);return[-kr[1],(rt>=0?1:-1)*(.5*Nt-kr[0])]}function si(Xe,rt){var pt=Xe*Xe,_t=rt+1,Nt=1-pt-rt*rt;return[.5*((Xe>=0?M:-M)-e(Nt,2*Xe)),-.25*a(Nt*Nt+4*pt)+.5*a(_t*_t+pt)]}function Ao(Xe,rt){var pt=rt[0]*rt[0]+rt[1]*rt[1];return[(Xe[0]*rt[0]+Xe[1]*rt[1])/pt,(Xe[1]*rt[0]-Xe[0]*rt[1])/pt]}eo.invert=function(Xe,rt){var pt=(w-1)/(w+1),_t=R(1-pt*pt),Nt=gn(M,_t*_t),Bt=-1,Yt=Cn(.5*Nt-rt,-Xe,_t*_t),Dr=Ao(Yt[0],Yt[1]),Ur=e(Dr[1],Dr[0])/Bt;return[Ur,2*l(n(.5/Bt*a(pt*Dr[0]*Dr[0]+pt*Dr[1]*Dr[1])))-M]};function ro(){return x.geoProjection(Or(eo)).scale(151.496)}function Sn(Xe){var rt=p(Xe),pt=t(Xe),_t=Gi(Xe);_t.invert=Gi(-Xe);function Nt(Bt,Yt){var Dr=_t(Bt,Yt);Bt=Dr[0],Yt=Dr[1];var Ur=p(Yt),kr=t(Yt),Wr=t(Bt),oa=N(rt*Ur+pt*kr*Wr),ma=p(oa),ka=k(ma)>i?oa/ma:1;return[ka*pt*p(Bt),(k(Bt)>M?ka:-ka)*(rt*kr-pt*Ur*Wr)]}return Nt.invert=function(Bt,Yt){var Dr=R(Bt*Bt+Yt*Yt),Ur=-p(Dr),kr=t(Dr),Wr=Dr*kr,oa=-Yt*Ur,ma=Dr*rt,ka=R(Wr*Wr+oa*oa-ma*ma),$a=e(Wr*ma+oa*ka,oa*ma-Wr*ka),yn=(Dr>M?-1:1)*e(Bt*Ur,Dr*t($a)*kr+Yt*p($a)*Ur);return _t.invert(yn,$a)},Nt}function Gi(Xe){var rt=p(Xe),pt=t(Xe);return function(_t,Nt){var Bt=t(Nt),Yt=t(_t)*Bt,Dr=p(_t)*Bt,Ur=p(Nt);return[e(Dr,Yt*pt-Ur*rt),I(Ur*pt+Yt*rt)]}}function ti(){var Xe=0,rt=x.geoProjectionMutator(Sn),pt=rt(Xe),_t=pt.rotate,Nt=pt.stream,Bt=x.geoCircle();return pt.parallel=function(Yt){if(!arguments.length)return Xe*A;var Dr=pt.rotate();return rt(Xe=Yt*b).rotate(Dr)},pt.rotate=function(Yt){return arguments.length?(_t.call(pt,[Yt[0],Yt[1]-Xe*A]),Bt.center([-Yt[0],-Yt[1]]),pt):(Yt=_t.call(pt),Yt[1]+=Xe*A,Yt)},pt.stream=function(Yt){return Yt=Nt(Yt),Yt.sphere=function(){Yt.polygonStart();var Dr=.01,Ur=Bt.radius(90-Dr)().coordinates[0],kr=Ur.length-1,Wr=-1,oa;for(Yt.lineStart();++Wr=0;)Yt.point((oa=Ur[Wr])[0],oa[1]);Yt.lineEnd(),Yt.polygonEnd()},Yt},pt.scale(79.4187).parallel(45).clipAngle(180-.001)}var fi=3,xo=I(1-1/fi)*A,zi=Ct(0);function so(Xe){var rt=xo*b,pt=He(S,rt)[0]-He(-S,rt)[0],_t=zi(0,rt)[1],Nt=He(0,rt)[1],Bt=h-Nt,Yt=u/Xe,Dr=4/u,Ur=_t+Bt*Bt*4/u;function kr(Wr,oa){var ma,ka=k(oa);if(ka>rt){var $a=s(Xe-1,o(0,r((Wr+S)/Yt)));Wr+=S*(Xe-1)/Xe-$a*Yt,ma=He(Wr,ka),ma[0]=ma[0]*u/pt-u*(Xe-1)/(2*Xe)+$a*u/Xe,ma[1]=_t+(ma[1]-Nt)*4*Bt/u,oa<0&&(ma[1]=-ma[1])}else ma=zi(Wr,oa);return ma[0]*=Dr,ma[1]/=Ur,ma}return kr.invert=function(Wr,oa){Wr/=Dr,oa*=Ur;var ma=k(oa);if(ma>_t){var ka=s(Xe-1,o(0,r((Wr+S)/Yt)));Wr=(Wr+S*(Xe-1)/Xe-ka*Yt)*pt/u;var $a=He.invert(Wr,.25*(ma-_t)*u/Bt+Nt);return $a[0]-=S*(Xe-1)/Xe-ka*Yt,oa<0&&($a[1]=-$a[1]),$a}return zi.invert(Wr,oa)},kr}function Mo(Xe,rt){return[Xe,rt&1?90-i:xo]}function So(Xe,rt){return[Xe,rt&1?-90+i:-xo]}function oi(Xe){return[Xe[0]*(1-i),Xe[1]]}function ii(Xe){var rt=[].concat(E.range(-180,180+Xe/2,Xe).map(Mo),E.range(180,-180-Xe/2,-Xe).map(So));return{type:"Polygon",coordinates:[Xe===180?rt.map(oi):rt]}}function co(){var Xe=4,rt=x.geoProjectionMutator(so),pt=rt(Xe),_t=pt.stream;return pt.lobes=function(Nt){return arguments.length?rt(Xe=+Nt):Xe},pt.stream=function(Nt){var Bt=pt.rotate(),Yt=_t(Nt),Dr=(pt.rotate([0,0]),_t(Nt));return pt.rotate(Bt),Yt.sphere=function(){x.geoStream(ii(180/Xe),Dr)},Yt},pt.scale(239.75)}function Wi(Xe){var rt=1+Xe,pt=p(1/rt),_t=I(pt),Nt=2*R(S/(Bt=S+4*_t*rt)),Bt,Yt=.5*Nt*(rt+R(Xe*(2+Xe))),Dr=Xe*Xe,Ur=rt*rt;function kr(Wr,oa){var ma=1-p(oa),ka,$a;if(ma&&ma<2){var yn=M-oa,Nn=25,wi;do{var Yi=p(yn),Ti=t(yn),_o=_t+e(Yi,rt-Ti),bo=1+Ur-2*rt*Ti;yn-=wi=(yn-Dr*_t-rt*Yi+bo*_o-.5*ma*Bt)/(2*rt*Yi*_o)}while(k(wi)>T&&--Nn>0);ka=Nt*R(bo),$a=Wr*_o/S}else ka=Nt*(Xe+ma),$a=Wr*_t/S;return[ka*p($a),Yt-ka*t($a)]}return kr.invert=function(Wr,oa){var ma=Wr*Wr+(oa-=Yt)*oa,ka=(1+Ur-ma/(Nt*Nt))/(2*rt),$a=N(ka),yn=p($a),Nn=_t+e(yn,rt-ka);return[I(Wr/R(ma))*S/Nn,I(1-2*($a-Dr*_t-rt*yn+(1+Ur-2*rt*ka)*Nn)/Bt)]},kr}function Ho(){var Xe=1,rt=x.geoProjectionMutator(Wi),pt=rt(Xe);return pt.ratio=function(_t){return arguments.length?rt(Xe=+_t):Xe},pt.scale(167.774).center([0,18.67])}var Io=.7109889596207567,qo=.0528035274542;function Oo(Xe,rt){return rt>-Io?(Xe=ge(Xe,rt),Xe[1]+=qo,Xe):Ge(Xe,rt)}Oo.invert=function(Xe,rt){return rt>-Io?ge.invert(Xe,rt-qo):Ge.invert(Xe,rt)};function ws(){return x.geoProjection(Oo).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Ko(Xe,rt){return k(rt)>Io?(Xe=ge(Xe,rt),Xe[1]-=rt>0?qo:-qo,Xe):Ge(Xe,rt)}Ko.invert=function(Xe,rt){return k(rt)>Io?ge.invert(Xe,rt+(rt>0?qo:-qo)):Ge.invert(Xe,rt)};function as(){return x.geoProjection(Ko).scale(152.63)}function wo(Xe,rt,pt,_t){var Nt=R(4*S/(2*pt+(1+Xe-rt/2)*p(2*pt)+(Xe+rt)/2*p(4*pt)+rt/2*p(6*pt))),Bt=R(_t*p(pt)*R((1+Xe*t(2*pt)+rt*t(4*pt))/(1+Xe+rt))),Yt=pt*Ur(1);function Dr(oa){return R(1+Xe*t(2*oa)+rt*t(4*oa))}function Ur(oa){var ma=oa*pt;return(2*ma+(1+Xe-rt/2)*p(2*ma)+(Xe+rt)/2*p(4*ma)+rt/2*p(6*ma))/pt}function kr(oa){return Dr(oa)*p(oa)}var Wr=function(oa,ma){var ka=pt*Ae(Ur,Yt*p(ma)/pt,ma/S);isNaN(ka)&&(ka=pt*f(ma));var $a=Nt*Dr(ka);return[$a*Bt*oa/S*t(ka),$a/Bt*p(ka)]};return Wr.invert=function(oa,ma){var ka=Ae(kr,ma*Bt/Nt);return[oa*S/(t(ka)*Nt*Bt*Dr(ka)),I(pt*Ur(ka/pt)/Yt)]},pt===0&&(Nt=R(_t/S),Wr=function(oa,ma){return[oa*Nt,p(ma)/Nt]},Wr.invert=function(oa,ma){return[oa/Nt,I(ma*Nt)]}),Wr}function No(){var Xe=1,rt=0,pt=45*b,_t=2,Nt=x.geoProjectionMutator(wo),Bt=Nt(Xe,rt,pt,_t);return Bt.a=function(Yt){return arguments.length?Nt(Xe=+Yt,rt,pt,_t):Xe},Bt.b=function(Yt){return arguments.length?Nt(Xe,rt=+Yt,pt,_t):rt},Bt.psiMax=function(Yt){return arguments.length?Nt(Xe,rt,pt=+Yt*b,_t):pt*A},Bt.ratio=function(Yt){return arguments.length?Nt(Xe,rt,pt,_t=+Yt):_t},Bt.scale(180.739)}function Di(Xe,rt,pt,_t,Nt,Bt,Yt,Dr,Ur,kr,Wr){if(Wr.nanEncountered)return NaN;var oa,ma,ka,$a,yn,Nn,wi,Yi,Ti,_o;if(oa=pt-rt,ma=Xe(rt+oa*.25),ka=Xe(pt-oa*.25),isNaN(ma)){Wr.nanEncountered=!0;return}if(isNaN(ka)){Wr.nanEncountered=!0;return}return $a=oa*(_t+4*ma+Nt)/12,yn=oa*(Nt+4*ka+Bt)/12,Nn=$a+yn,_o=(Nn-Yt)/15,kr>Ur?(Wr.maxDepthCount++,Nn+_o):Math.abs(_o)>1;do Ur[Nn]>ka?yn=Nn:$a=Nn,Nn=$a+yn>>1;while(Nn>$a);var wi=Ur[Nn+1]-Ur[Nn];return wi&&(wi=(ka-Ur[Nn+1])/wi),(Nn+1+wi)/Yt}var oa=2*Wr(1)/S*Bt/pt,ma=function(ka,$a){var yn=Wr(k(p($a))),Nn=_t(yn)*ka;return yn/=oa,[Nn,$a>=0?yn:-yn]};return ma.invert=function(ka,$a){var yn;return $a*=oa,k($a)<1&&(yn=f($a)*I(Nt(k($a))*Bt)),[ka/_t(k($a)),yn]},ma}function go(){var Xe=0,rt=2.5,pt=1.183136,_t=x.geoProjectionMutator(Go),Nt=_t(Xe,rt,pt);return Nt.alpha=function(Bt){return arguments.length?_t(Xe=+Bt,rt,pt):Xe},Nt.k=function(Bt){return arguments.length?_t(Xe,rt=+Bt,pt):rt},Nt.gamma=function(Bt){return arguments.length?_t(Xe,rt,pt=+Bt):pt},Nt.scale(152.63)}function us(Xe,rt){return k(Xe[0]-rt[0])=0;--Ur)pt=Xe[1][Ur],_t=pt[0][0],Nt=pt[0][1],Bt=pt[1][1],Yt=pt[2][0],Dr=pt[2][1],rt.push(Jo([[Yt-i,Dr-i],[Yt-i,Bt+i],[_t+i,Bt+i],[_t+i,Nt-i]],30));return{type:"Polygon",coordinates:[E.merge(rt)]}}function Is(Xe,rt,pt){var _t,Nt;function Bt(Ur,kr){for(var Wr=kr<0?-1:1,oa=rt[+(kr<0)],ma=0,ka=oa.length-1;maoa[ma][2][0];++ma);var $a=Xe(Ur-oa[ma][1][0],kr);return $a[0]+=Xe(oa[ma][1][0],Wr*kr>Wr*oa[ma][0][1]?oa[ma][0][1]:kr)[0],$a}pt?Bt.invert=pt(Bt):Xe.invert&&(Bt.invert=function(Ur,kr){for(var Wr=Nt[+(kr<0)],oa=rt[+(kr<0)],ma=0,ka=Wr.length;ma$a&&(yn=ka,ka=$a,$a=yn),[[oa,ka],[ma,$a]]})}),Yt):rt.map(function(kr){return kr.map(function(Wr){return[[Wr[0][0]*A,Wr[0][1]*A],[Wr[1][0]*A,Wr[1][1]*A],[Wr[2][0]*A,Wr[2][1]*A]]})})},rt!=null&&Yt.lobes(rt),Yt}var es=[[[[-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 Zs(){return Is(Te,es).scale(160.857)}var Ps=[[[[-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 $o(){return Is(Ko,Ps).scale(152.63)}var Fo=[[[[-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 Ji(){return Is(ge,Fo).scale(169.529)}var Ro=[[[[-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 Ls(){return Is(ge,Ro).scale(169.529).rotate([20,0])}var zl=[[[[-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 ml(){return Is(Oo,zl,Me).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Ts=[[[[-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 yl(){return Is(Ge,Ts).scale(152.63).rotate([-20,0])}function mu(Xe,rt){return[3/u*Xe*R(S*S/3-rt*rt),rt]}mu.invert=function(Xe,rt){return[u/3*Xe/R(S*S/3-rt*rt),rt]};function su(){return x.geoProjection(mu).scale(158.837)}function cc(Xe){function rt(pt,_t){if(k(k(_t)-M)2)return null;pt/=2,_t/=2;var Bt=pt*pt,Yt=_t*_t,Dr=2*_t/(1+Bt+Yt);return Dr=c((1+Dr)/(1-Dr),1/Xe),[e(2*pt,1-Bt-Yt)/Xe,I((Dr-1)/(Dr+1))]},rt}function Bl(){var Xe=.5,rt=x.geoProjectionMutator(cc),pt=rt(Xe);return pt.spacing=function(_t){return arguments.length?rt(Xe=+_t):Xe},pt.scale(124.75)}var _l=S/w;function ju(Xe,rt){return[Xe*(1+R(t(rt)))/2,rt/(t(rt/2)*t(Xe/6))]}ju.invert=function(Xe,rt){var pt=k(Xe),_t=k(rt),Nt=i,Bt=M;_t<_l?Bt*=_t/_l:Nt+=6*N(_l/_t);for(var Yt=0;Yt<25;Yt++){var Dr=p(Bt),Ur=R(t(Bt)),kr=p(Bt/2),Wr=t(Bt/2),oa=p(Nt/6),ma=t(Nt/6),ka=.5*Nt*(1+Ur)-pt,$a=Bt/(Wr*ma)-_t,yn=Ur?-.25*Nt*Dr/Ur:0,Nn=.5*(1+Ur),wi=(1+.5*Bt*kr/Wr)/(Wr*ma),Yi=Bt/Wr*(oa/6)/(ma*ma),Ti=yn*Yi-wi*Nn,_o=(ka*Yi-$a*Nn)/Ti,bo=($a*yn-ka*wi)/Ti;if(Bt-=_o,Nt-=bo,k(_o)i||k(Nn)>i)&&--Nt>0);return Nt&&[pt,_t]};function As(){return x.geoProjection(il).scale(139.98)}function ms(Xe,rt){return[p(Xe)/t(rt),m(rt)*t(Xe)]}ms.invert=function(Xe,rt){var pt=Xe*Xe,_t=rt*rt,Nt=_t+1,Bt=pt+Nt,Yt=Xe?_*R((Bt-R(Bt*Bt-4*pt))/pt):1/R(Nt);return[I(Xe*Yt),f(rt)*N(Yt)]};function Ms(){return x.geoProjection(ms).scale(144.049).clipAngle(90-.001)}function ol(Xe){var rt=t(Xe),pt=m(C+Xe/2);function _t(Nt,Bt){var Yt=Bt-Xe,Dr=k(Yt)=0;)Wr=Xe[kr],oa=Wr[0]+Dr*(ka=oa)-Ur*ma,ma=Wr[1]+Dr*ma+Ur*ka;return oa=Dr*(ka=oa)-Ur*ma,ma=Dr*ma+Ur*ka,[oa,ma]}return pt.invert=function(_t,Nt){var Bt=20,Yt=_t,Dr=Nt;do{for(var Ur=rt,kr=Xe[Ur],Wr=kr[0],oa=kr[1],ma=0,ka=0,$a;--Ur>=0;)kr=Xe[Ur],ma=Wr+Yt*($a=ma)-Dr*ka,ka=oa+Yt*ka+Dr*$a,Wr=kr[0]+Yt*($a=Wr)-Dr*oa,oa=kr[1]+Yt*oa+Dr*$a;ma=Wr+Yt*($a=ma)-Dr*ka,ka=oa+Yt*ka+Dr*$a,Wr=Yt*($a=Wr)-Dr*oa-_t,oa=Yt*oa+Dr*$a-Nt;var yn=ma*ma+ka*ka,Nn,wi;Yt-=Nn=(Wr*ma+oa*ka)/yn,Dr-=wi=(oa*ma-Wr*ka)/yn}while(k(Nn)+k(wi)>i*i&&--Bt>0);if(Bt){var Yi=R(Yt*Yt+Dr*Dr),Ti=2*l(Yi*.5),_o=p(Ti);return[e(Yt*_o,Yi*t(Ti)),Yi?I(Dr*_o/Yi):0]}},pt}var th=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Cf=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],qu=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],gs=[[.9245,0],[0,0],[.01943,0]],Lf=[[.721316,0],[0,0],[-.00881625,-.00617325]];function hc(){return Cu(th,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function ac(){return Cu(Cf,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function hf(){return Cu(qu,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function ku(){return Cu(gs,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function dc(){return Cu(Lf,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Cu(Xe,rt){var pt=x.geoProjection(fc(Xe)).rotate(rt).clipAngle(90),_t=x.geoRotation(rt),Nt=pt.center;return delete pt.rotate,pt.center=function(Bt){return arguments.length?Nt(_t(Bt)):_t.invert(Nt())},pt}var Pc=R(6),$c=R(7);function Zl(Xe,rt){var pt=I(7*p(rt)/(3*Pc));return[Pc*Xe*(2*t(2*pt/3)-1)/$c,9*p(pt/3)/$c]}Zl.invert=function(Xe,rt){var pt=3*I(rt*$c/9);return[Xe*$c/(Pc*(2*t(2*pt/3)-1)),I(p(pt)*3*Pc/7)]};function df(){return x.geoProjection(Zl).scale(164.859)}function Dc(Xe,rt){for(var pt=(1+_)*p(rt),_t=rt,Nt=0,Bt;Nt<25&&(_t-=Bt=(p(_t/2)+p(_t)-pt)/(.5*t(_t/2)+t(_t)),!(k(Bt)T&&--_t>0);return Bt=pt*pt,Yt=Bt*Bt,Dr=Bt*Yt,[Xe/(.84719-.13063*Bt+Dr*Dr*(-.04515+.05494*Bt-.02326*Yt+.00331*Dr)),pt]};function vf(){return x.geoProjection(Lu).scale(175.295)}function sl(Xe,rt){return[Xe*(1+t(rt))/2,2*(rt-m(rt/2))]}sl.invert=function(Xe,rt){for(var pt=rt/2,_t=0,Nt=1/0;_t<10&&k(Nt)>i;++_t){var Bt=t(rt/2);rt-=Nt=(rt-m(rt/2)-pt)/(1-.5/(Bt*Bt))}return[2*Xe/(1+t(rt)),rt]};function Fc(){return x.geoProjection(sl).scale(152.63)}var Pu=[[[[-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 vc(){return Is(fe(1/0),Pu).rotate([20,0]).scale(152.63)}function zc(Xe,rt){var pt=p(rt),_t=t(rt),Nt=f(Xe);if(Xe===0||k(rt)===M)return[0,rt];if(rt===0)return[Xe,0];if(k(Xe)===M)return[Xe*_t,M*pt];var Bt=S/(2*Xe)-2*Xe/S,Yt=2*rt/S,Dr=(1-Yt*Yt)/(pt-Yt),Ur=Bt*Bt,kr=Dr*Dr,Wr=1+Ur/kr,oa=1+kr/Ur,ma=(Bt*pt/Dr-Bt/2)/Wr,ka=(kr*pt/Ur+Dr/2)/oa,$a=ma*ma+_t*_t/Wr,yn=ka*ka-(kr*pt*pt/Ur+Dr*pt-1)/oa;return[M*(ma+R($a)*Nt),M*(ka+R(yn<0?0:yn)*f(-rt*Bt)*Nt)]}zc.invert=function(Xe,rt){Xe/=M,rt/=M;var pt=Xe*Xe,_t=rt*rt,Nt=pt+_t,Bt=S*S;return[Xe?(Nt-1+R((1-Nt)*(1-Nt)+4*pt))/(2*Xe)*M:0,Ae(function(Yt){return Nt*(S*p(Yt)-2*Yt)*S+4*Yt*Yt*(rt-p(Yt))+2*S*Yt-Bt*rt},0)]};function Hu(){return x.geoProjection(zc).scale(127.267)}var uu=1.0148,Gu=.23185,Zc=-.14499,gu=.02406,Pf=uu,bl=5*Gu,xl=7*Zc,Wu=9*gu,wl=1.790857183;function pf(Xe,rt){var pt=rt*rt;return[Xe,rt*(uu+pt*pt*(Gu+pt*(Zc+gu*pt)))]}pf.invert=function(Xe,rt){rt>wl?rt=wl:rt<-wl&&(rt=-wl);var pt=rt,_t;do{var Nt=pt*pt;pt-=_t=(pt*(uu+Nt*Nt*(Gu+Nt*(Zc+gu*Nt)))-rt)/(Pf+Nt*Nt*(bl+Nt*(xl+Wu*Nt)))}while(k(_t)>i);return[Xe,pt]};function Yu(){return x.geoProjection(pf).scale(139.319)}function pc(Xe,rt){if(k(rt)i&&--Nt>0);return Yt=m(_t),[(k(rt)=0;)if(_t=rt[Dr],pt[0]===_t[0]&&pt[1]===_t[1]){if(Bt)return[Bt,pt];Bt=pt}}}function Jc(Xe){for(var rt=Xe.length,pt=[],_t=Xe[rt-1],Nt=0;Nt0?[-_t[0],0]:[180-_t[0],180])};var rt=fu.map(function(pt){return{face:pt,project:Xe(pt)}});return[-1,0,0,1,0,1,4,5].forEach(function(pt,_t){var Nt=rt[pt];Nt&&(Nt.children||(Nt.children=[])).push(rt[_t])}),yu(rt[0],function(pt,_t){return rt[pt<-S/2?_t<0?6:4:pt<0?_t<0?2:0:pt_t^ka>_t&&pt<(ma-kr)*(_t-Wr)/(ka-Wr)+kr&&(Nt=!Nt)}return Nt}function mf(Xe,rt){var pt=rt.stream,_t;if(!pt)throw new Error("invalid projection");switch(Xe&&Xe.type){case"Feature":_t=gf;break;case"FeatureCollection":_t=tf;break;default:_t=yf;break}return _t(Xe,pt)}function tf(Xe,rt){return{type:"FeatureCollection",features:Xe.features.map(function(pt){return gf(pt,rt)})}}function gf(Xe,rt){return{type:"Feature",id:Xe.id,properties:Xe.properties,geometry:yf(Xe.geometry,rt)}}function Hf(Xe,rt){return{type:"GeometryCollection",geometries:Xe.geometries.map(function(pt){return yf(pt,rt)})}}function yf(Xe,rt){if(!Xe)return null;if(Xe.type==="GeometryCollection")return Hf(Xe,rt);var pt;switch(Xe.type){case"Point":pt=yc;break;case"MultiPoint":pt=yc;break;case"LineString":pt=_c;break;case"MultiLineString":pt=_c;break;case"Polygon":pt=bc;break;case"MultiPolygon":pt=bc;break;case"Sphere":pt=bc;break;default:return null}return x.geoStream(Xe,rt(pt)),pt.result()}var ul=[],Pl=[],yc={point:function(Xe,rt){ul.push([Xe,rt])},result:function(){var Xe=ul.length?ul.length<2?{type:"Point",coordinates:ul[0]}:{type:"MultiPoint",coordinates:ul}:null;return ul=[],Xe}},_c={lineStart:zo,point:function(Xe,rt){ul.push([Xe,rt])},lineEnd:function(){ul.length&&(Pl.push(ul),ul=[])},result:function(){var Xe=Pl.length?Pl.length<2?{type:"LineString",coordinates:Pl[0]}:{type:"MultiLineString",coordinates:Pl}:null;return Pl=[],Xe}},bc={polygonStart:zo,lineStart:zo,point:function(Xe,rt){ul.push([Xe,rt])},lineEnd:function(){var Xe=ul.length;if(Xe){do ul.push(ul[0].slice());while(++Xe<4);Pl.push(ul),ul=[]}},polygonEnd:zo,result:function(){if(!Pl.length)return null;var Xe=[],rt=[];return Pl.forEach(function(pt){gc(pt)?Xe.push([pt]):rt.push(pt)}),rt.forEach(function(pt){var _t=pt[0];Xe.some(function(Nt){if(Vf(Nt[0],_t))return Nt.push(pt),!0})||Xe.push([pt])}),Pl=[],Xe.length?Xe.length>1?{type:"MultiPolygon",coordinates:Xe}:{type:"Polygon",coordinates:Xe[0]}:null}};function nc(Xe){var rt=Xe(M,0)[0]-Xe(-M,0)[0];function pt(_t,Nt){var Bt=k(_t)0?_t-S:_t+S,Nt),Dr=(Yt[0]-Yt[1])*_,Ur=(Yt[0]+Yt[1])*_;if(Bt)return[Dr,Ur];var kr=rt*_,Wr=Dr>0^Ur>0?-1:1;return[Wr*Dr-f(Ur)*kr,Wr*Ur-f(Dr)*kr]}return Xe.invert&&(pt.invert=function(_t,Nt){var Bt=(_t+Nt)*_,Yt=(Nt-_t)*_,Dr=k(Bt)<.5*rt&&k(Yt)<.5*rt;if(!Dr){var Ur=rt*_,kr=Bt>0^Yt>0?-1:1,Wr=-kr*_t+(Yt>0?1:-1)*Ur,oa=-kr*Nt+(Bt>0?1:-1)*Ur;Bt=(-Wr-oa)*_,Yt=(Wr-oa)*_}var ma=Xe.invert(Bt,Yt);return Dr||(ma[0]+=Bt>0?S:-S),ma}),x.geoProjection(pt).rotate([-90,-90,45]).clipAngle(180-.001)}function zt(){return nc(Pr).scale(176.423)}function rr(){return nc(eo).scale(111.48)}function Br(Xe,rt){if(!(0<=(rt=+rt)&&rt<=20))throw new Error("invalid digits");function pt(kr){var Wr=kr.length,oa=2,ma=new Array(Wr);for(ma[0]=+kr[0].toFixed(rt),ma[1]=+kr[1].toFixed(rt);oa2||ka[0]!=Wr[0]||ka[1]!=Wr[1])&&(oa.push(ka),Wr=ka)}return oa.length===1&&kr.length>1&&oa.push(pt(kr[kr.length-1])),oa}function Bt(kr){return kr.map(Nt)}function Yt(kr){if(kr==null)return kr;var Wr;switch(kr.type){case"GeometryCollection":Wr={type:"GeometryCollection",geometries:kr.geometries.map(Yt)};break;case"Point":Wr={type:"Point",coordinates:pt(kr.coordinates)};break;case"MultiPoint":Wr={type:kr.type,coordinates:_t(kr.coordinates)};break;case"LineString":Wr={type:kr.type,coordinates:Nt(kr.coordinates)};break;case"MultiLineString":case"Polygon":Wr={type:kr.type,coordinates:Bt(kr.coordinates)};break;case"MultiPolygon":Wr={type:"MultiPolygon",coordinates:kr.coordinates.map(Bt)};break;default:return kr}return kr.bbox!=null&&(Wr.bbox=kr.bbox),Wr}function Dr(kr){var Wr={type:"Feature",properties:kr.properties,geometry:Yt(kr.geometry)};return kr.id!=null&&(Wr.id=kr.id),kr.bbox!=null&&(Wr.bbox=kr.bbox),Wr}if(Xe!=null)switch(Xe.type){case"Feature":return Dr(Xe);case"FeatureCollection":{var Ur={type:"FeatureCollection",features:Xe.features.map(Dr)};return Xe.bbox!=null&&(Ur.bbox=Xe.bbox),Ur}default:return Yt(Xe)}return Xe}function wr(Xe){var rt=p(Xe);function pt(_t,Nt){var Bt=rt?m(_t*rt/2)/rt:_t/2;if(!Nt)return[2*Bt,-Xe];var Yt=2*l(Bt*p(Nt)),Dr=1/m(Nt);return[p(Yt)*Dr,Nt+(1-t(Yt))*Dr-Xe]}return pt.invert=function(_t,Nt){if(k(Nt+=Xe)i&&--Dr>0);var ma=_t*(kr=m(Yt)),ka=m(k(Nt)0?M:-M)*(Ur+Nt*(Wr-Yt)/2+Nt*Nt*(Wr-2*Ur+Yt)/2)]}qa.invert=function(Xe,rt){var pt=rt/M,_t=pt*90,Nt=s(18,k(_t/5)),Bt=o(0,r(Nt));do{var Yt=Ca[Bt][1],Dr=Ca[Bt+1][1],Ur=Ca[s(19,Bt+2)][1],kr=Ur-Yt,Wr=Ur-2*Dr+Yt,oa=2*(k(pt)-Dr)/kr,ma=Wr/kr,ka=oa*(1-ma*oa*(1-2*ma*oa));if(ka>=0||Bt===1){_t=(rt>=0?5:-5)*(ka+Nt);var $a=50,yn;do Nt=s(18,k(_t)/5),Bt=r(Nt),ka=Nt-Bt,Yt=Ca[Bt][1],Dr=Ca[Bt+1][1],Ur=Ca[s(19,Bt+2)][1],_t-=(yn=(rt>=0?M:-M)*(Dr+ka*(Ur-Yt)/2+ka*ka*(Ur-2*Dr+Yt)/2)-rt)*A;while(k(yn)>T&&--$a>0);break}}while(--Bt>=0);var Nn=Ca[Bt][0],wi=Ca[Bt+1][0],Yi=Ca[s(19,Bt+2)][0];return[Xe/(wi+ka*(Yi-Nn)/2+ka*ka*(Yi-2*wi+Nn)/2),_t*b]};function Ka(){return x.geoProjection(qa).scale(152.63)}function cn(Xe){function rt(pt,_t){var Nt=t(_t),Bt=(Xe-1)/(Xe-Nt*t(pt));return[Bt*Nt*p(pt),Bt*p(_t)]}return rt.invert=function(pt,_t){var Nt=pt*pt+_t*_t,Bt=R(Nt),Yt=(Xe-R(1-Nt*(Xe+1)/(Xe-1)))/((Xe-1)/Bt+Bt/(Xe-1));return[e(pt*Yt,Bt*R(1-Yt*Yt)),Bt?I(_t*Yt/Bt):0]},rt}function Pn(Xe,rt){var pt=cn(Xe);if(!rt)return pt;var _t=t(rt),Nt=p(rt);function Bt(Yt,Dr){var Ur=pt(Yt,Dr),kr=Ur[1],Wr=kr*Nt/(Xe-1)+_t;return[Ur[0]*_t/Wr,kr/Wr]}return Bt.invert=function(Yt,Dr){var Ur=(Xe-1)/(Xe-1-Dr*Nt);return pt.invert(Ur*Yt,Ur*Dr*_t)},Bt}function Ha(){var Xe=2,rt=0,pt=x.geoProjectionMutator(Pn),_t=pt(Xe,rt);return _t.distance=function(Nt){return arguments.length?pt(Xe=+Nt,rt):Xe},_t.tilt=function(Nt){return arguments.length?pt(Xe,rt=Nt*b):rt*A},_t.scale(432.147).clipAngle(N(1/Xe)*A-1e-6)}var on=1e-4,fn=1e4,Ln=-180,qn=Ln+on,Bi=180,Ni=Bi-on,Zi=-90,_i=Zi+on,Vn=90,Gn=Vn-on;function oo(Xe){return Xe.length>0}function yo(Xe){return Math.floor(Xe*fn)/fn}function Vo(Xe){return Xe===Zi||Xe===Vn?[0,Xe]:[Ln,yo(Xe)]}function Wo(Xe){var rt=Xe[0],pt=Xe[1],_t=!1;return rt<=qn?(rt=Ln,_t=!0):rt>=Ni&&(rt=Bi,_t=!0),pt<=_i?(pt=Zi,_t=!0):pt>=Gn&&(pt=Vn,_t=!0),_t?[rt,pt]:Xe}function Yo(Xe){return Xe.map(Wo)}function ns(Xe,rt,pt){for(var _t=0,Nt=Xe.length;_t=Ni||Wr<=_i||Wr>=Gn){Bt[Yt]=Wo(Ur);for(var oa=Yt+1;oaqn&&ka_i&&$a=Dr)break;pt.push({index:-1,polygon:rt,ring:Bt=Bt.slice(oa-1)}),Bt[0]=Vo(Bt[0][1]),Yt=-1,Dr=Bt.length}}}}function Bo(Xe){var rt,pt=Xe.length,_t={},Nt={},Bt,Yt,Dr,Ur,kr;for(rt=0;rt0?S-Dr:Dr)*A],kr=x.geoProjection(Xe(Yt)).rotate(Ur),Wr=x.geoRotation(Ur),oa=kr.center;return delete kr.rotate,kr.center=function(ma){return arguments.length?oa(Wr(ma)):Wr.invert(oa())},kr.clipAngle(90)}function Ws(Xe){var rt=t(Xe);function pt(_t,Nt){var Bt=x.geoGnomonicRaw(_t,Nt);return Bt[0]*=rt,Bt}return pt.invert=function(_t,Nt){return x.geoGnomonicRaw.invert(_t/rt,Nt)},pt}function Dl(){return Nl([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Nl(Xe,rt){return Ss(Ws,Xe,rt)}function Kl(Xe){if(!(Xe*=2))return x.geoAzimuthalEquidistantRaw;var rt=-Xe/2,pt=-rt,_t=Xe*Xe,Nt=m(pt),Bt=.5/p(pt);function Yt(Dr,Ur){var kr=N(t(Ur)*t(Dr-rt)),Wr=N(t(Ur)*t(Dr-pt)),oa=Ur<0?-1:1;return kr*=kr,Wr*=Wr,[(kr-Wr)/(2*Xe),oa*R(4*_t*Wr-(_t-kr+Wr)*(_t-kr+Wr))/(2*Xe)]}return Yt.invert=function(Dr,Ur){var kr=Ur*Ur,Wr=t(R(kr+(ma=Dr+rt)*ma)),oa=t(R(kr+(ma=Dr+pt)*ma)),ma,ka;return[e(ka=Wr-oa,ma=(Wr+oa)*Nt),(Ur<0?-1:1)*N(R(ma*ma+ka*ka)*Bt)]},Yt}function Fu(){return Al([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Al(Xe,rt){return Ss(Kl,Xe,rt)}function zu(Xe,rt){if(k(rt)i&&--Dr>0);return[f(Xe)*(R(Nt*Nt+4)+Nt)*S/4,M*Yt]};function Ql(){return x.geoProjection(Jl).scale(127.16)}function xu(Xe,rt,pt,_t,Nt){function Bt(Yt,Dr){var Ur=pt*p(_t*Dr),kr=R(1-Ur*Ur),Wr=R(2/(1+kr*t(Yt*=Nt)));return[Xe*kr*Wr*p(Yt),rt*Ur*Wr]}return Bt.invert=function(Yt,Dr){var Ur=Yt/Xe,kr=Dr/rt,Wr=R(Ur*Ur+kr*kr),oa=2*I(Wr/2);return[e(Yt*m(oa),Xe*Wr)/Nt,Wr&&I(Dr*p(oa)/(rt*pt*Wr))/_t]},Bt}function rf(Xe,rt,pt,_t){var Nt=S/3;Xe=o(Xe,i),rt=o(rt,i),Xe=s(Xe,M),rt=s(rt,S-i),pt=o(pt,0),pt=s(pt,100-i),_t=o(_t,i);var Bt=pt/100+1,Yt=_t/100,Dr=N(Bt*t(Nt))/Nt,Ur=p(Xe)/p(Dr*M),kr=rt/S,Wr=R(Yt*p(Xe/2)/p(rt/2)),oa=Wr/R(kr*Ur*Dr),ma=1/(Wr*R(kr*Ur*Dr));return xu(oa,ma,Ur,Dr,kr)}function Ff(){var Xe=65*b,rt=60*b,pt=20,_t=200,Nt=x.geoProjectionMutator(rf),Bt=Nt(Xe,rt,pt,_t);return Bt.poleline=function(Yt){return arguments.length?Nt(Xe=+Yt*b,rt,pt,_t):Xe*A},Bt.parallels=function(Yt){return arguments.length?Nt(Xe,rt=+Yt*b,pt,_t):rt*A},Bt.inflation=function(Yt){return arguments.length?Nt(Xe,rt,pt=+Yt,_t):pt},Bt.ratio=function(Yt){return arguments.length?Nt(Xe,rt,pt,_t=+Yt):_t},Bt.scale(163.775)}function xc(){return Ff().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var rl=4*S+3*R(3),Ol=2*R(2*S*R(3)/rl),Bu=ke(Ol*R(3)/S,Ol,rl/6);function af(){return x.geoProjection(Bu).scale(176.84)}function jc(Xe,rt){return[Xe*R(1-3*rt*rt/(S*S)),rt]}jc.invert=function(Xe,rt){return[Xe/R(1-3*rt*rt/(S*S)),rt]};function wu(){return x.geoProjection(jc).scale(152.63)}function jl(Xe,rt){var pt=t(rt),_t=t(Xe)*pt,Nt=1-_t,Bt=t(Xe=e(p(Xe)*pt,-p(rt))),Yt=p(Xe);return pt=R(1-_t*_t),[Yt*pt-Bt*Nt,-Bt*pt-Yt*Nt]}jl.invert=function(Xe,rt){var pt=(Xe*Xe+rt*rt)/-2,_t=R(-pt*(2+pt)),Nt=rt*pt+Xe*_t,Bt=Xe*pt-rt*_t,Yt=R(Bt*Bt+Nt*Nt);return[e(_t*Nt,Yt*(1+pt)),Yt?-I(_t*Bt/Yt):0]};function Ul(){return x.geoProjection(jl).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Ci(Xe,rt){var pt=re(Xe,rt);return[(pt[0]+Xe/M)/2,(pt[1]+rt)/2]}Ci.invert=function(Xe,rt){var pt=Xe,_t=rt,Nt=25;do{var Bt=t(_t),Yt=p(_t),Dr=p(2*_t),Ur=Yt*Yt,kr=Bt*Bt,Wr=p(pt),oa=t(pt/2),ma=p(pt/2),ka=ma*ma,$a=1-kr*oa*oa,yn=$a?N(Bt*oa)*R(Nn=1/$a):Nn=0,Nn,wi=.5*(2*yn*Bt*ma+pt/M)-Xe,Yi=.5*(yn*Yt+_t)-rt,Ti=.5*Nn*(kr*ka+yn*Bt*oa*Ur)+.5/M,_o=Nn*(Wr*Dr/4-yn*Yt*ma),bo=.125*Nn*(Dr*ma-yn*Yt*kr*Wr),Zo=.5*Nn*(Ur*oa+yn*ka*Bt)+.5,fs=_o*bo-Zo*Ti,Po=(Yi*_o-wi*Zo)/fs,Es=(wi*bo-Yi*Ti)/fs;pt-=Po,_t-=Es}while((k(Po)>i||k(Es)>i)&&--Nt>0);return[pt,_t]};function eu(){return x.geoProjection(Ci).scale(158.837)}v.geoNaturalEarth=x.geoNaturalEarth1,v.geoNaturalEarthRaw=x.geoNaturalEarth1Raw,v.geoAiry=Q,v.geoAiryRaw=Z,v.geoAitoff=ne,v.geoAitoffRaw=re,v.geoArmadillo=V,v.geoArmadilloRaw=oe,v.geoAugust=K,v.geoAugustRaw=$,v.geoBaker=W,v.geoBakerRaw=q,v.geoBerghaus=ae,v.geoBerghausRaw=ee,v.geoBertin1953=qe,v.geoBertin1953Raw=Ie,v.geoBoggs=Fe,v.geoBoggsRaw=Te,v.geoBonne=Tt,v.geoBonneRaw=mt,v.geoBottomley=Kt,v.geoBottomleyRaw=At,v.geoBromley=_r,v.geoBromleyRaw=ar,v.geoChamberlin=Be,v.geoChamberlinRaw=vt,v.geoChamberlinAfrica=Re,v.geoCollignon=$e,v.geoCollignonRaw=He,v.geoCraig=Je,v.geoCraigRaw=Ze,v.geoCraster=Dt,v.geoCrasterRaw=dt,v.geoCylindricalEqualArea=Vt,v.geoCylindricalEqualAreaRaw=Ct,v.geoCylindricalStereographic=Wt,v.geoCylindricalStereographicRaw=Ht,v.geoEckert1=ia,v.geoEckert1Raw=Sr,v.geoEckert2=It,v.geoEckert2Raw=$t,v.geoEckert3=cr,v.geoEckert3Raw=ir,v.geoEckert4=Ir,v.geoEckert4Raw=fr,v.geoEckert5=aa,v.geoEckert5Raw=sa,v.geoEckert6=ja,v.geoEckert6Raw=xa,v.geoEisenlohr=un,v.geoEisenlohrRaw=An,v.geoFahey=Fn,v.geoFaheyRaw=ei,v.geoFoucaut=Mi,v.geoFoucautRaw=ni,v.geoFoucautSinusoidal=bn,v.geoFoucautSinusoidalRaw=ci,v.geoGilbert=ho,v.geoGingery=et,v.geoGingeryRaw=dn,v.geoGinzburg4=Tr,v.geoGinzburg4Raw=ur,v.geoGinzburg5=Fr,v.geoGinzburg5Raw=Rr,v.geoGinzburg6=kt,v.geoGinzburg6Raw=nt,v.geoGinzburg8=nr,v.geoGinzburg8Raw=Ut,v.geoGinzburg9=br,v.geoGinzburg9Raw=Er,v.geoGringorten=La,v.geoGringortenRaw=Pr,v.geoGuyou=ro,v.geoGuyouRaw=eo,v.geoHammer=xe,v.geoHammerRaw=fe,v.geoHammerRetroazimuthal=ti,v.geoHammerRetroazimuthalRaw=Sn,v.geoHealpix=co,v.geoHealpixRaw=so,v.geoHill=Ho,v.geoHillRaw=Wi,v.geoHomolosine=as,v.geoHomolosineRaw=Ko,v.geoHufnagel=No,v.geoHufnagelRaw=wo,v.geoHyperelliptical=go,v.geoHyperellipticalRaw=Go,v.geoInterrupt=Is,v.geoInterruptedBoggs=Zs,v.geoInterruptedHomolosine=$o,v.geoInterruptedMollweide=Ji,v.geoInterruptedMollweideHemispheres=Ls,v.geoInterruptedSinuMollweide=ml,v.geoInterruptedSinusoidal=yl,v.geoKavrayskiy7=su,v.geoKavrayskiy7Raw=mu,v.geoLagrange=Bl,v.geoLagrangeRaw=cc,v.geoLarrivee=lu,v.geoLarriveeRaw=ju,v.geoLaskowski=As,v.geoLaskowskiRaw=il,v.geoLittrow=Ms,v.geoLittrowRaw=ms,v.geoLoximuthal=Su,v.geoLoximuthalRaw=ol,v.geoMiller=Uu,v.geoMillerRaw=Eu,v.geoModifiedStereographic=Cu,v.geoModifiedStereographicRaw=fc,v.geoModifiedStereographicAlaska=hc,v.geoModifiedStereographicGs48=ac,v.geoModifiedStereographicGs50=hf,v.geoModifiedStereographicMiller=ku,v.geoModifiedStereographicLee=dc,v.geoMollweide=le,v.geoMollweideRaw=ge,v.geoMtFlatPolarParabolic=df,v.geoMtFlatPolarParabolicRaw=Zl,v.geoMtFlatPolarQuartic=Ic,v.geoMtFlatPolarQuarticRaw=Dc,v.geoMtFlatPolarSinusoidal=Rc,v.geoMtFlatPolarSinusoidalRaw=Vu,v.geoNaturalEarth2=vf,v.geoNaturalEarth2Raw=Lu,v.geoNellHammer=Fc,v.geoNellHammerRaw=sl,v.geoInterruptedQuarticAuthalic=vc,v.geoNicolosi=Hu,v.geoNicolosiRaw=zc,v.geoPatterson=Yu,v.geoPattersonRaw=pf,v.geoPolyconic=Kc,v.geoPolyconicRaw=pc,v.geoPolyhedral=yu,v.geoPolyhedralButterfly=Du,v.geoPolyhedralCollignon=Qc,v.geoPolyhedralWaterman=ef,v.geoProject=mf,v.geoGringortenQuincuncial=zt,v.geoPeirceQuincuncial=rr,v.geoPierceQuincuncial=rr,v.geoQuantize=Br,v.geoQuincuncial=nc,v.geoRectangularPolyconic=la,v.geoRectangularPolyconicRaw=wr,v.geoRobinson=Ka,v.geoRobinsonRaw=qa,v.geoSatellite=Ha,v.geoSatelliteRaw=Pn,v.geoSinuMollweide=ws,v.geoSinuMollweideRaw=Oo,v.geoSinusoidal=gt,v.geoSinusoidalRaw=Ge,v.geoStitch=ps,v.geoTimes=Xo,v.geoTimesRaw=vi,v.geoTwoPointAzimuthal=Nl,v.geoTwoPointAzimuthalRaw=Ws,v.geoTwoPointAzimuthalUsa=Dl,v.geoTwoPointEquidistant=Al,v.geoTwoPointEquidistantRaw=Kl,v.geoTwoPointEquidistantUsa=Fu,v.geoVanDerGrinten=bu,v.geoVanDerGrintenRaw=zu,v.geoVanDerGrinten2=Oc,v.geoVanDerGrinten2Raw=ic,v.geoVanDerGrinten3=hu,v.geoVanDerGrinten3Raw=Zu,v.geoVanDerGrinten4=Ql,v.geoVanDerGrinten4Raw=Jl,v.geoWagner=Ff,v.geoWagner7=xc,v.geoWagnerRaw=rf,v.geoWagner4=af,v.geoWagner4Raw=Bu,v.geoWagner6=wu,v.geoWagner6Raw=jc,v.geoWiechel=Ul,v.geoWiechelRaw=jl,v.geoWinkel3=eu,v.geoWinkel3Raw=Ci,Object.defineProperty(v,"__esModule",{value:!0})})}}),K8=Ee({"src/plots/geo/zoom.js"(J,H){"use strict";var v=Va(),x=Vr(),E=Ri(),k=Math.PI/180,l=180/Math.PI,e={cursor:"pointer"},t={cursor:"auto"};function n(A,b){var z=A.projection,I;return b._isScoped?I=o:b._isClipped?I=c:I=s,I(A,z)}H.exports=n;function r(A,b){return v.behavior.zoom().translate(b.translate()).scaleExtent(b.scaleExtent()).scale(b.scale())}function a(A,b,z){var I=A.id,N=A.graphDiv,R=N.layout,B=R[I],F=N._fullLayout,P=F[I],j={},U={};function Z(Q,re){j[I+"."+Q]=x.nestedProperty(B,Q).get(),E.call("_storeDirectGUIEdit",R,F._preGUI,j);var ne=x.nestedProperty(P,Q);ne.get()!==re&&(ne.set(re),x.nestedProperty(B,Q).set(re),U[I+"."+Q]=re)}z(Z),Z("projection.scale",b.scale()/A.fitScale),Z("fitbounds",!1),N.emit("plotly_relayout",U)}function o(A,b){var z=r(A,b);function I(){v.select(this).style(e)}function N(){b.scale(v.event.scale).translate(v.event.translate),A.render(!0);var F=b.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":b.scale()/A.fitScale,"geo.center.lon":F[0],"geo.center.lat":F[1]})}function R(F){var P=b.invert(A.midPt);F("center.lon",P[0]),F("center.lat",P[1])}function B(){v.select(this).style(t),a(A,b,R)}return z.on("zoomstart",I).on("zoom",N).on("zoomend",B),z}function s(A,b){var z=r(A,b),I=2,N,R,B,F,P,j,U,Z,Q;function re(G){return b.invert(G)}function ne(G){var X=re(G);if(!X)return!0;var q=b(X);return Math.abs(q[0]-G[0])>I||Math.abs(q[1]-G[1])>I}function oe(){v.select(this).style(e);let{x:G,y:X,width:q,height:W}=this.getBBox();N=v.event.sourceEvent?v.mouse(this):[G+q/2,X+W/2],R=b.rotate(),B=b.translate(),F=R,P=re(N)}function V(){let{x:G,y:X,width:q,height:W}=this.getBBox();if(j=v.event.sourceEvent?v.mouse(this):[G+q/2,X+W/2],ne(N)){z.scale(b.scale()),z.translate(b.translate());return}b.scale(v.event.scale),b.translate([B[0],v.event.translate[1]]),P?re(j)&&(Z=re(j),U=[F[0]+(Z[0]-P[0]),R[1],R[2]],b.rotate(U),F=U):(N=j,P=re(N)),Q=!0,A.render(!0);var ee=b.rotate(),ae=b.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":b.scale()/A.fitScale,"geo.center.lon":ae[0],"geo.center.lat":ae[1],"geo.projection.rotation.lon":-ee[0]})}function $(){v.select(this).style(t),Q&&a(A,b,K)}function K(G){var X=b.rotate(),q=b.invert(A.midPt);G("projection.rotation.lon",-X[0]),G("center.lon",q[0]),G("center.lat",q[1])}return z.on("zoomstart",oe).on("zoom",V).on("zoomend",$),z}function c(A,b){var z={r:b.rotate(),k:b.scale()},I=r(A,b),N=u(I,"zoomstart","zoom","zoomend"),R=0,B=I.on,F;I.on("zoomstart",function(){v.select(this).style(e);let{x:Q,y:re,width:ne,height:oe}=this.getBBox(),V=v.event.sourceEvent?v.mouse(this):[Q+ne/2,re+oe/2],$=b.rotate(),K=$,G=b.translate(),X=f($);F=g(b,V),B.call(I,"zoom",function(){let{x:q,y:W,width:ee,height:ae}=this.getBBox(),fe=v.event.sourceEvent?v.mouse(this):[q+ee/2,W+ae/2];if(b.scale(z.k=v.event.scale),!F)V=fe,F=g(b,V);else if(g(b,fe)){b.rotate($).translate(G);var ye=g(b,fe),xe=m(F,ye),Ae=C(p(X,xe)),Me=z.r=i(Ae,F,K);(!isFinite(Me[0])||!isFinite(Me[1])||!isFinite(Me[2]))&&(Me=K),b.rotate(Me),K=Me}j(N.of(this,arguments))}),P(N.of(this,arguments))}).on("zoomend",function(){v.select(this).style(t),B.call(I,"zoom",null),U(N.of(this,arguments)),a(A,b,Z)}).on("zoom.redraw",function(){A.render(!0);var Q=b.rotate();A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":b.scale()/A.fitScale,"geo.projection.rotation.lon":-Q[0],"geo.projection.rotation.lat":-Q[1]})});function P(Q){R++||Q({type:"zoomstart"})}function j(Q){Q({type:"zoom"})}function U(Q){--R||Q({type:"zoomend"})}function Z(Q){var re=b.rotate();Q("projection.rotation.lon",-re[0]),Q("projection.rotation.lat",-re[1])}return v.rebind(I,N,"on")}function g(A,b){var z=A.invert(b);return z&&isFinite(z[0])&&isFinite(z[1])&&_(z)}function f(A){var b=.5*A[0]*k,z=.5*A[1]*k,I=.5*A[2]*k,N=Math.sin(b),R=Math.cos(b),B=Math.sin(z),F=Math.cos(z),P=Math.sin(I),j=Math.cos(I);return[R*F*j+N*B*P,N*F*j-R*B*P,R*B*j+N*F*P,R*F*P-N*B*j]}function p(A,b){var z=A[0],I=A[1],N=A[2],R=A[3],B=b[0],F=b[1],P=b[2],j=b[3];return[z*B-I*F-N*P-R*j,z*F+I*B+N*j-R*P,z*P-I*j+N*B+R*F,z*j+I*P-N*F+R*B]}function m(A,b){if(!(!A||!b)){var z=h(A,b),I=Math.sqrt(w(z,z)),N=.5*Math.acos(Math.max(-1,Math.min(1,w(A,b)))),R=Math.sin(N)/I;return I&&[Math.cos(N),z[2]*R,-z[1]*R,z[0]*R]}}function i(A,b,z){var I=M(b,2,A[0]);I=M(I,1,A[1]),I=M(I,0,A[2]-z[2]);var N=b[0],R=b[1],B=b[2],F=I[0],P=I[1],j=I[2],U=Math.atan2(R,N)*l,Z=Math.sqrt(N*N+R*R),Q,re;Math.abs(P)>Z?(re=(P>0?90:-90)-U,Q=0):(re=Math.asin(P/Z)*l-U,Q=Math.sqrt(Z*Z-P*P));var ne=180-re-2*U,oe=(Math.atan2(j,F)-Math.atan2(B,Q))*l,V=(Math.atan2(j,F)-Math.atan2(B,-Q))*l,$=T(z[0],z[1],re,oe),K=T(z[0],z[1],ne,V);return $<=K?[re,oe,z[2]]:[ne,V,z[2]]}function T(A,b,z,I){var N=S(z-A),R=S(I-b);return Math.sqrt(N*N+R*R)}function S(A){return(A%360+540)%360-180}function M(A,b,z){var I=z*k,N=A.slice(),R=b===0?1:0,B=b===2?1:2,F=Math.cos(I),P=Math.sin(I);return N[R]=A[R]*F-A[B]*P,N[B]=A[B]*F+A[R]*P,N}function C(A){return[Math.atan2(2*(A[0]*A[1]+A[2]*A[3]),1-2*(A[1]*A[1]+A[2]*A[2]))*l,Math.asin(Math.max(-1,Math.min(1,2*(A[0]*A[2]-A[3]*A[1]))))*l,Math.atan2(2*(A[0]*A[3]+A[1]*A[2]),1-2*(A[2]*A[2]+A[3]*A[3]))*l]}function _(A){var b=A[0]*k,z=A[1]*k,I=Math.cos(z);return[I*Math.cos(b),I*Math.sin(b),Math.sin(z)]}function w(A,b){for(var z=0,I=0,N=A.length;I0&&Z._module.calcGeoJSON(U,B)}if(!F){var Q=this.updateProjection(R,B);if(Q)return;(!this.viewInitial||this.scope!==P.scope)&&this.saveViewInitial(P)}this.scope=P.scope,this.updateBaseLayers(B,P),this.updateDims(B,P),this.updateFx(B,P),s.generalUpdatePerTraceModule(this.graphDiv,this,R,P);var re=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=re.selectAll(".point"),this.dataPoints.text=re.selectAll("text"),this.dataPaths.line=re.selectAll(".js-line");var ne=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ne.selectAll("path"),this._render()},b.updateProjection=function(R,B){var F=this.graphDiv,P=B[this.id],j=B._size,U=P.domain,Z=P.projection,Q=P.lonaxis,re=P.lataxis,ne=Q._ax,oe=re._ax,V=this.projection=z(P),$=[[j.l+j.w*U.x[0],j.t+j.h*(1-U.y[1])],[j.l+j.w*U.x[1],j.t+j.h*(1-U.y[0])]],K=P.center||{},G=Z.rotation||{},X=Q.range||[],q=re.range||[];if(P.fitbounds){ne._length=$[1][0]-$[0][0],oe._length=$[1][1]-$[0][1],ne.range=f(F,ne),oe.range=f(F,oe);let ve=[];for(let Kt of R){let ar=Kt[0].trace;ar.visible===!0&&ar._module.fitCoords&&ve.push(ar._module.fitCoords(Kt,P))}let se=g(F,ne),Te=se.min.reduce((Kt,{val:ar})=>Math.min(Kt,ar),1/0),We=se.max.reduce((Kt,{val:ar})=>Math.max(Kt,ar),-1/0)-Te,Ge=_.boundsOfCoords(ve.flat()),[gt,,mt]=Ge||[],Tt=mt-gt;if(!!Ge&&(We>360||We<360&&TtMath.max(ht,Kt(Re)),0),Zt=se.max.reduce((ht,Re)=>Math.max(ht,ar(Re)),0),sr=ne._length-_r-Zt,Ot=sr>ne._length/10?Tt*ne._length/sr:Tt,vt=(gt+mt)/2;ne.range=[vt-Ot/2,vt+Ot/2]}var W=(ne.range[0]+ne.range[1])/2,ee=(oe.range[0]+oe.range[1])/2;if(P._isScoped)K={lon:W,lat:ee};else if(P._isClipped){K={lon:W,lat:ee},G={lon:W,lat:ee,roll:G.roll};var ae=Z.type,fe=C.lonaxisSpan[ae]/2||180,ye=C.lataxisSpan[ae]/2||90;X=[W-fe,W+fe],q=[ee-ye,ee+ye]}else K={lon:W,lat:ee},G={lon:W,lat:G.lat,roll:G.roll}}V.center([K.lon-G.lon,K.lat-G.lat]).rotate([-G.lon,-G.lat,G.roll]).parallels(Z.parallels);var xe=N(X,q);V.fitExtent($,xe);var Ae=this.bounds=V.getBounds(xe),Me=this.fitScale=V.scale(),Ie=V.translate();if(V.scaleExtent=()=>{var ve;let{minscale:se}=Z,Te=(ve=Z.maxscale)!=null?ve:1/0;return[Me*Math.min(se,Te),Me*Math.max(se,Te)]},P.fitbounds){var qe=V.getBounds(N(ne.range,oe.range)),je=Math.min((Ae[1][0]-Ae[0][0])/(qe[1][0]-qe[0][0]),(Ae[1][1]-Ae[0][1])/(qe[1][1]-qe[0][1]));isFinite(je)?V.scale(je*Me):t.warn("Something went wrong during"+this.id+"fitbounds computations.")}else V.scale(Z.scale*Me);var ke=this.midPt=[(Ae[0][0]+Ae[1][0])/2,(Ae[0][1]+Ae[1][1])/2];if(V.translate([Ie[0]+(ke[0]-Ie[0]),Ie[1]+(ke[1]-Ie[1])]).clipExtent(Ae),P._isAlbersUsa){var ge=V([K.lon,K.lat]);if(ge){var le=V.translate();V.translate([le[0]-(ge[0]-le[0]),le[1]-(ge[1]-le[1])])}}},b.updateBaseLayers=function(R,B){var F=this,P=F.topojson,j=F.layers,U=F.basePaths;function Z($){return $==="lonaxis"||$==="lataxis"}function Q($){return!!C.lineLayers[$]}function re($){return!!C.fillLayers[$]}var ne=this.hasChoropleth?C.layersForChoropleth:C.layers,oe=ne.filter(function($){return Q($)||re($)?B["show"+$]:Z($)?B[$].showgrid:!0}),V=F.framework.selectAll(".layer").data(oe,String);V.exit().each(function($){delete j[$],delete U[$],v.select(this).remove()}),V.enter().append("g").attr("class",function($){return"layer "+$}).each(function($){var K=j[$]=v.select(this);$==="bg"?F.bgRect=K.append("rect").style("pointer-events","all"):Z($)?U[$]=K.append("path").style("fill","none"):$==="backplot"?K.append("g").classed("choroplethlayer",!0):$==="frontplot"?K.append("g").classed("scatterlayer",!0):Q($)?U[$]=K.append("path").style("fill","none").style("stroke-miterlimit",2):re($)&&(U[$]=K.append("path").style("stroke","none"))}),V.order(),V.each(function($){var K=U[$],G=C.layerNameToAdjective[$];$==="frame"?K.datum(C.sphereSVG):Q($)||re($)?K.datum(u(P,P.objects[$])):Z($)&&K.datum(I($,B,R)).call(r.stroke,B[$].gridcolor).call(a.dashLine,B[$].griddash,B[$].gridwidth),Q($)?K.call(r.stroke,B[G+"color"]).call(a.dashLine,"",B[G+"width"]):re($)&&K.call(r.fill,B[G+"color"])})},b.updateDims=function(R,B){var F=this.bounds,P=(B.framewidth||0)/2,j=F[0][0]-P,U=F[0][1]-P,Z=F[1][0]-j+P,Q=F[1][1]-U+P;a.setRect(this.clipRect,j,U,Z,Q),this.bgRect.call(a.setRect,j,U,Z,Q).call(r.fill,B.bgcolor),this.xaxis._offset=j,this.xaxis._length=Z,this.yaxis._offset=U,this.yaxis._length=Q},b.updateFx=function(R,B){var F=this,P=F.graphDiv,j=F.bgRect,U=R.dragmode,Z=R.clickmode;if(F.isStatic)return;function Q(){var V=F.viewInitial,$={};for(var K in V)$[F.id+"."+K]=V[K];e.call("_guiRelayout",P,$),P.emit("plotly_doubleclick",null)}function re(V){return F.projection.invert([V[0]+F.xaxis._offset,V[1]+F.yaxis._offset])}var ne=function(V,$){if($.isRect){var K=V.range={};K[F.id]=[re([$.xmin,$.ymin]),re([$.xmax,$.ymax])]}else{var G=V.lassoPoints={};G[F.id]=$.map(re)}},oe={element:F.bgRect.node(),gd:P,plotinfo:{id:F.id,xaxis:F.xaxis,yaxis:F.yaxis,fillRangeItems:ne},xaxes:[F.xaxis],yaxes:[F.yaxis],subplot:F.id,clickFn:function(V){V===2&&T(P)}};if(U==="pan"){j.node().onmousedown=null;let V=M(F,B);if(j.call(V),!v.event){let $=F.projection.scale(),[K,G]=F.projection.scaleExtent();($G)&&V.event(j)}j.on("dblclick.zoom",Q),P._context._scrollZoom.geo||j.on("wheel.zoom",null)}else(U==="select"||U==="lasso")&&(j.on(".zoom",null),oe.prepFn=function(V,$,K){i(V,$,K,oe,U)},m.init(oe));j.on("mousemove",function(){var V=F.projection.invert(t.getPositionFromD3Event());if(!V)return m.unhover(P,v.event);F.xaxis.p2c=function(){return V[0]},F.yaxis.p2c=function(){return V[1]},o.hover(P,v.event,F.id)}),j.on("mouseout",function(){P._dragging||m.unhover(P,v.event)}),j.on("click",function(){U!=="select"&&U!=="lasso"&&(Z.indexOf("select")>-1&&S(v.event,P,[F.xaxis],[F.yaxis],F.id,oe),Z.indexOf("event")>-1&&o.click(P,v.event))})},b.makeFramework=function(){var R=this,B=R.graphDiv,F=B._fullLayout,P="clip"+F._uid+R.id;R.clipDef=F._clips.append("clipPath").attr("id",P),R.clipRect=R.clipDef.append("rect"),R.framework=v.select(R.container).append("g").attr("class","geo "+R.id).call(a.setClipUrl,P,B),R.project=function(j){var U=R.projection(j);return U?[U[0]-R.xaxis._offset,U[1]-R.yaxis._offset]:[null,null]},R.xaxis={_id:"x",c2p:function(j){return R.project(j)[0]}},R.yaxis={_id:"y",c2p:function(j){return R.project(j)[1]}},R.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(R.mockAxis,F)},b.saveViewInitial=function(R){var B=R.center||{},F=R.projection,P=F.rotation||{};this.viewInitial={fitbounds:R.fitbounds,"projection.scale":F.scale};var j;R._isScoped?j={"center.lon":B.lon,"center.lat":B.lat}:R._isClipped?j={"projection.rotation.lon":P.lon,"projection.rotation.lat":P.lat,"center.lon":B.lon,"center.lat":B.lat}:j={"center.lon":B.lon,"center.lat":B.lat,"projection.rotation.lon":P.lon},t.extendFlat(this.viewInitial,j)},b.render=function(R){this._hasMarkerAngles&&R?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},b._render=function(){var R=this.projection,B=R.getPath(),F;function P(U){var Z=R(U.lonlat);return Z?n(Z[0],Z[1]):null}function j(U){return R.isLonLatOverEdges(U.lonlat)?"none":null}for(F in this.basePaths)this.basePaths[F].attr("d",B);for(F in this.dataPaths)this.dataPaths[F].attr("d",function(U){return B(U.geojson)});for(F in this.dataPoints)this.dataPoints[F].attr("display",j).attr("transform",P)};function z(R){var B=R.projection,F=B.type,P=C.projNames[F];P="geo"+t.titleCase(P);for(var j=x[P]||l[P],U=j(),Z=R._isSatellite?Math.acos(1/B.distance)*180/Math.PI:R._isClipped?C.lonaxisSpan[F]/2:null,Q=["center","rotate","parallels","clipExtent"],re=function(V){return V?U:[]},ne=0;neG}else return!1},U.getPath=function(){return E().projection(U)},U.getBounds=function(V){return U.getPath().bounds(V)},U.precision(C.precision),R._isSatellite&&U.tilt(B.tilt).distance(B.distance),Z&&U.clipAngle(Z-C.clipPad),U}function I(R,B,F){var P=1e-6,j=2.5,U=B[R],Z=C.scopeDefaults[B.scope],Q,re,ne;R==="lonaxis"?(Q=Z.lonaxisRange,re=Z.lataxisRange,ne=function(ee,ae){return[ee,ae]}):R==="lataxis"&&(Q=Z.lataxisRange,re=Z.lonaxisRange,ne=function(ee,ae){return[ae,ee]});var oe={type:"linear",range:[Q[0],Q[1]-P],tick0:U.tick0,dtick:U.dtick};c.setConvert(oe,F);var V=c.calcTicks(oe);!B.isScoped&&R==="lonaxis"&&V.pop();for(var $=V.length,K=new Array($),G=0;G<$;G++)for(var X=V[G].x,q=K[G]=[],W=re[0];Wfe[ye]!=null)||l.fitboundsIncompatible.has(i)?a.fitbounds=!1:ee.forEach(({dst:fe,key:ye})=>fe&&(fe[ye]=null))}}}}),vw=Ee({"src/plots/geo/index.js"(J,H){"use strict";var v=uf().getSubplotCalcData,x=Vr().counterRegex,E=J8(),k="geo",l=x(k),e={};e[k]={valType:"subplotid",dflt:k,editType:"calc"};function t(a){for(var o=a._fullLayout,s=a.calcdata,c=o._subplots[k],g=0;g")}}}}),gw=Ee({"src/traces/choropleth/event_data.js"(J,H){"use strict";H.exports=function(x,E,k,l,e){x.location=E.location,x.z=E.z;var t=l[e];return t.fIn&&t.fIn.properties&&(x.properties=t.fIn.properties),x.ct=t.ct,x}}}),yw=Ee({"src/traces/choropleth/select.js"(J,H){"use strict";H.exports=function(x,E){var k=x.cd,l=x.xaxis,e=x.yaxis,t=[],n,r,a,o,s;if(E===!1)for(n=0;n=Math.min(Z,Q)&&i<=Math.max(Z,Q)?0:1/0}if(N=Math.min(re,ne)&&T<=Math.max(re,ne)?0:1/0}F=Math.sqrt(N*N+R*R),A=M[I]}}}else for(I=M.length-1;I>-1;I--)u=M[I],b=p[u],z=m[u],N=g.c2p(b)-i,R=f.c2p(z)-T,B=Math.sqrt(N*N+R*R),B100},J.isDotSymbol=function(v){return typeof v=="string"?H.DOT_RE.test(v):v>200}}}),i7=Ee({"src/traces/scattergl/defaults.js"(J,H){"use strict";var v=Vr(),x=Ri(),E=By(),k=Rm(),l=Wh(),e=nl(),t=Dv(),n=Ih(),r=gh(),a=Rh(),o=Xh(),s=Fh();H.exports=function(g,f,p,m){function i(u,A){return v.coerce(g,f,k,u,A)}var T=g.marker?E.isOpenSymbol(g.marker.symbol):!1,S=e.isBubble(g),M=t(g,f,m,i);if(!M){f.visible=!1;return}n(g,f,m,i),i("xhoverformat"),i("yhoverformat");var C=M>>1,g=t[c],f=r!==void 0?r(g,n):g-n;f>=0?(s=c,o=c-1):a=c+1}return s}function x(t,n,r,a,o){for(var s=o+1;a<=o;){var c=a+o>>>1,g=t[c],f=r!==void 0?r(g,n):g-n;f>0?(s=c,o=c-1):a=c+1}return s}function E(t,n,r,a,o){for(var s=a-1;a<=o;){var c=a+o>>>1,g=t[c],f=r!==void 0?r(g,n):g-n;f<0?(s=c,a=c+1):o=c-1}return s}function k(t,n,r,a,o){for(var s=a-1;a<=o;){var c=a+o>>>1,g=t[c],f=r!==void 0?r(g,n):g-n;f<=0?(s=c,a=c+1):o=c-1}return s}function l(t,n,r,a,o){for(;a<=o;){var s=a+o>>>1,c=t[s],g=r!==void 0?r(c,n):c-n;if(g===0)return s;g<=0?a=s+1:o=s-1}return-1}function e(t,n,r,a,o,s){return typeof r=="function"?s(t,n,r,a===void 0?0:a|0,o===void 0?t.length-1:o|0):s(t,n,void 0,r===void 0?0:r|0,a===void 0?t.length-1:a|0)}H.exports={ge:function(t,n,r,a,o){return e(t,n,r,a,o,v)},gt:function(t,n,r,a,o){return e(t,n,r,a,o,x)},lt:function(t,n,r,a,o){return e(t,n,r,a,o,E)},le:function(t,n,r,a,o){return e(t,n,r,a,o,k)},eq:function(t,n,r,a,o){return e(t,n,r,a,o,l)}}}}),_w=Ee({"node_modules/clamp/index.js"(J,H){H.exports=v;function v(x,E,k){return Ek?k:x:xE?E:x}}}),Jh=Ee({"node_modules/pick-by-alias/index.js"(J,H){"use strict";H.exports=function(k,l,e){var t={},n,r;if(typeof l=="string"&&(l=x(l)),Array.isArray(l)){var a={};for(r=0;r1&&(E=arguments),typeof E=="string"?E=E.split(/\s/).map(parseFloat):typeof E=="number"&&(E=[E]),E.length&&typeof E[0]=="number"?E.length===1?k={width:E[0],height:E[0],x:0,y:0}:E.length===2?k={width:E[0],height:E[1],x:0,y:0}:k={x:E[0],y:E[1],width:E[2]-E[0]||0,height:E[3]-E[1]||0}:E&&(E=v(E,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),k={x:E.left||0,y:E.top||0},E.width==null?E.right?k.width=E.right-k.x:k.width=0:k.width=E.width,E.height==null?E.bottom?k.height=E.bottom-k.y:k.height=0:k.height=E.height),k}}}),Jv=Ee({"node_modules/array-bounds/index.js"(J,H){"use strict";H.exports=v;function v(x,E){if(!x||x.length==null)throw Error("Argument should be an array");E==null?E=1:E=Math.floor(E);for(var k=Array(E*2),l=0;le&&(e=x[n]),x[n]>>1,S;f.dtype||(f.dtype="array"),typeof f.dtype=="string"?S=new(r(f.dtype))(T):f.dtype&&(S=f.dtype,Array.isArray(S)&&(S.length=T));for(let I=0;Ip||P>o){for(let X=0;Xae||Z>fe||Q=ne||W===ee)return;let ye=M[q];ee===void 0&&(ee=ye.length);for(let le=W;le=B&&se<=P&&Te>=F&&Te<=j&&oe.push(ve)}let xe=C[q],Ae=xe[W*4+0],Me=xe[W*4+1],Ie=xe[W*4+2],qe=xe[W*4+3],je=$(xe,W+1),ke=X*.5,ge=q+1;V(K,G,ke,ge,Ae,Me||Ie||qe||je),V(K,G+ke,ke,ge,Me,Ie||qe||je),V(K+ke,G,ke,ge,Ie,qe||je),V(K+ke,G+ke,ke,ge,qe,je)}function $(K,G){let X=null,q=0;for(;X===null;)if(X=K[G*4+q],q++,q>K.length)return null;return X}return oe}function b(I,N,R,B,F){let P=[];for(let j=0;j2&&(t.push([r].concat(a.splice(0,2))),o="l",r=r=="m"?"l":"L");;){if(a.length==v[o])return a.unshift(r),t.push(a);if(a.length1&&(g=1),g<-1&&(g=-1),c*Math.acos(g)},e=function(r,a,o,s,c,g,f,p,m,i,T,S){var M=Math.pow(c,2),C=Math.pow(g,2),_=Math.pow(T,2),w=Math.pow(S,2),h=M*C-M*w-C*_;h<0&&(h=0),h/=M*w+C*_,h=Math.sqrt(h)*(f===p?-1:1);var u=h*c/g*S,A=h*-g/c*T,b=i*u-m*A+(r+o)/2,z=m*u+i*A+(a+s)/2,I=(T-u)/c,N=(S-A)/g,R=(-T-u)/c,B=(-S-A)/g,F=l(1,0,I,N),P=l(I,N,R,B);return p===0&&P>0&&(P-=x),p===1&&P<0&&(P+=x),[b,z,F,P]},t=function(r){var a=r.px,o=r.py,s=r.cx,c=r.cy,g=r.rx,f=r.ry,p=r.xAxisRotation,m=p===void 0?0:p,i=r.largeArcFlag,T=i===void 0?0:i,S=r.sweepFlag,M=S===void 0?0:S,C=[];if(g===0||f===0)return[];var _=Math.sin(m*x/360),w=Math.cos(m*x/360),h=w*(a-s)/2+_*(o-c)/2,u=-_*(a-s)/2+w*(o-c)/2;if(h===0&&u===0)return[];g=Math.abs(g),f=Math.abs(f);var A=Math.pow(h,2)/Math.pow(g,2)+Math.pow(u,2)/Math.pow(f,2);A>1&&(g*=Math.sqrt(A),f*=Math.sqrt(A));var b=e(a,o,s,c,g,f,T,M,_,w,h,u),z=v(b,4),I=z[0],N=z[1],R=z[2],B=z[3],F=Math.abs(B)/(x/4);Math.abs(1-F)<1e-7&&(F=1);var P=Math.max(Math.ceil(F),1);B/=P;for(var j=0;j4?(n=i[i.length-4],r=i[i.length-3]):(n=g,r=f),t.push(i)}return t}function E(l,e,t,n){return["C",l,e,t,n,t,n]}function k(l,e,t,n,r,a){return["C",l/3+2/3*t,e/3+2/3*n,r/3+2/3*t,a/3+2/3*n,r,a]}}}),bw=Ee({"node_modules/is-svg-path/index.js"(J,H){"use strict";H.exports=function(x){return typeof x!="string"?!1:(x=x.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(x)&&/[\dz]$/i.test(x)&&x.length>4))}}}),m7=Ee({"node_modules/svg-path-bounds/index.js"(J,H){"use strict";var v=h7(),x=d7(),E=p7(),k=bw();H.exports=l;function l(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!k(e))throw Error("String is not an SVG path.");e=v(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=x(e),e=E(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],n=0,r=e.length;nt[2]&&(t[2]=a[o+0]),a[o+1]>t[3]&&(t[3]=a[o+1]);return t}}}),g7=Ee({"node_modules/bitmap-sdf/index.js"(J,H){"use strict";H.exports=x;var v=1e20;function x(l,e){e||(e={});var t=e.cutoff==null?.25:e.cutoff,n=e.radius==null?8:e.radius,r=e.channel||0,a,o,s,c,g,f,p,m,i,T,S;if(ArrayBuffer.isView(l)||Array.isArray(l)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");a=e.width,o=e.height,c=l,e.stride?f=e.stride:f=Math.floor(l.length/a/o)}else window.HTMLCanvasElement&&l instanceof window.HTMLCanvasElement?(m=l,p=m.getContext("2d"),a=m.width,o=m.height,i=p.getImageData(0,0,a,o),c=i.data,f=4):window.CanvasRenderingContext2D&&l instanceof window.CanvasRenderingContext2D?(m=l.canvas,p=l,a=m.width,o=m.height,i=p.getImageData(0,0,a,o),c=i.data,f=4):window.ImageData&&l instanceof window.ImageData&&(i=l,a=l.width,o=l.height,c=i.data,f=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(g=c,c=Array(a*o),T=0,S=Math.floor(g.length/f);Ty7});function y7(J,H={}){if(!(0,Tw.default)(J))throw Error("Invalid SVG path");let v,x;H.shape||Array.isArray(H)?[v,x]=H.shape||H:(v=Fm.width=H.width||H.w||200,x=Fm.height=H.height||H.h||200);let E=Math.min(v,x),k=H.stroke||0,l=H.viewbox||H.viewBox||(0,ww.default)(J),e=[v/(l[2]-l[0]),x/(l[3]-l[1])],t=Math.min(e[0]||0,e[1]||0)/2;hh.fillStyle="black",hh.fillRect(0,0,v,x),hh.fillStyle="white",k&&(typeof k!="number"&&(k=1),hh.strokeStyle=k>0?"white":"black",hh.lineWidth=Math.abs(k)),hh.translate(v*.5,x*.5),hh.scale(t,t);let n=new Path2D(J);return hh.fill(n),k&&hh.stroke(n),hh.setTransform(1,0,0,1,0,0),(0,Aw.default)(hh,{cutoff:H.cutoff!=null?H.cutoff:.5,radius:H.radius!=null?H.radius:E*.5})}var ww,Tw,Aw,Fm,hh,_7=Da({"node_modules/svg-path-sdf/svg-path-sdf.js"(){ww=Wa(m7()),Tw=Wa(bw()),Aw=Wa(g7()),Fm=document.createElement("canvas"),hh=Fm.getContext("2d",{willReadFrequently:!0})}}),ep=Ee({"src/traces/scattergl/convert.js"(J,H){"use strict";var v=mi(),x=(_7(),tn(xw)).default,{normalize:E}=Qn(),k=Ri(),l=Vr(),e=l.isArrayOrTypedArray,t=mo(),n=Xl(),r=Ad().formatColor,a=nl(),o=U0(),s=By(),c=sv(),g=gd().DESELECTDIM,f={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},p=Qf().appendArrayPointValue;function m(B,F){var P,j={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},U=B._context.plotGlPixelRatio;if(F.visible!==!0)return j;if(a.hasText(F)&&(j.text=i(B,F),j.textSel=C(B,F,F.selected),j.textUnsel=C(B,F,F.unselected)),a.hasMarkers(F)&&(j.marker=S(B,F),j.markerSel=M(B,F,F.selected),j.markerUnsel=M(B,F,F.unselected),!F.unselected&&e(F.marker.opacity))){var Z=F.marker.opacity;for(j.markerUnsel.opacity=new Array(Z.length),P=0;P500?"bold":"normal":B}function S(B,F){var P=F._length,j=F.marker,U={},Z,Q=e(j.symbol),re=e(j.angle),ne=e(j.color),oe=e(j.line.color),V=e(j.opacity),$=e(j.size),K=e(j.line.width),G;if(Q||(G=s.isOpenSymbol(j.symbol)),Q||ne||oe||V||re){U.symbols=new Array(P),U.angles=new Array(P),U.colors=new Array(P),U.borderColors=new Array(P);var X=j.symbol,q=j.angle,W=r(j,j.opacity,P),ee=r(j.line,j.opacity,P);if(!e(ee[0])){var ae=ee;for(ee=Array(P),Z=0;Zc.TOO_MANY_POINTS||a.hasMarkers(F)?"rect":"round";if(oe&&F.connectgaps){var $=Z[0],K=Z[1];for(Q=0;Q1?ne[Q]:ne[0]:ne,G=e(oe)?oe.length>1?oe[Q]:oe[0]:oe,X=f[K],q=f[G],W=V?V/.8+1:0,ee=-q*W-q*.5;Z.offset[Q]=[X*W/$,ee/$]}}return Z}H.exports={style:m,markerStyle:S,markerSelection:M,linePositions:I,errorBarPositions:N,textPosition:R}}}),Mw=Ee({"src/traces/scattergl/scene_update.js"(J,H){"use strict";var v=Vr();H.exports=function(E,k){var l=k._scene,e={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},t={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return k._scene||(l=k._scene={},l.init=function(){v.extendFlat(l,t,e)},l.init(),l.update=function(r){var a=v.repeat(r,l.count);if(l.fill2d&&l.fill2d.update(a),l.scatter2d&&l.scatter2d.update(a),l.line2d&&l.line2d.update(a),l.error2d&&l.error2d.update(a.concat(a)),l.select2d&&l.select2d.update(a),l.glText)for(var o=0;o=g,u=w*2,A={},b,z=M.makeCalcdata(T,"x"),I=C.makeCalcdata(T,"y"),N=l(T,M,"x",z),R=l(T,C,"y",I),B=N.vals,F=R.vals;T._x=B,T._y=F,T.xperiodalignment&&(T._origX=z,T._xStarts=N.starts,T._xEnds=N.ends),T.yperiodalignment&&(T._origY=I,T._yStarts=R.starts,T._yEnds=R.ends);var P=new Array(u),j=new Array(w);for(b=0;b1&&x.extendFlat(_.line,o.linePositions(m,T,S)),_.errorX||_.errorY){var w=o.errorBarPositions(m,T,S,M,C);_.errorX&&x.extendFlat(_.errorX,w.x),_.errorY&&x.extendFlat(_.errorY,w.y)}return _.text&&(x.extendFlat(_.text,{positions:S},o.textPosition(m,T,_.text,_.marker)),x.extendFlat(_.textSel,{positions:S},o.textPosition(m,T,_.text,_.markerSel)),x.extendFlat(_.textUnsel,{positions:S},o.textPosition(m,T,_.text,_.markerUnsel))),_}}}),Sw=Ee({"src/traces/scattergl/edit_style.js"(J,H){"use strict";var v=Vr(),x=Qn(),E=gd().DESELECTDIM;function k(l){var e=l[0],t=e.trace,n=e.t,r=n._scene,a=n.index,o=r.selectBatch[a],s=r.unselectBatch[a],c=r.textOptions[a],g=r.textSelectedOptions[a]||{},f=r.textUnselectedOptions[a]||{},p=v.extendFlat({},c),m,i;if(o.length||s.length){var T=g.color,S=f.color,M=c.color,C=v.isArrayOrTypedArray(M);for(p.color=new Array(t._length),m=0;m10&&/[0-9](?:\s|\/)/.test(k)&&(e=k.match(/([0-9]+)/g).map(function(g){return parseFloat(g)}),n=k.match(/([a-z])/ig).join("").toLowerCase());else isNaN(k)?Array.isArray(k)||k.length?(e=[k[0],k[1],k[2]],n="rgb",t=k.length===4?k[3]:1):k instanceof Object&&(k.r!=null||k.red!=null||k.R!=null?(n="rgb",e=[k.r||k.red||k.R||0,k.g||k.green||k.G||0,k.b||k.blue||k.B||0]):(n="hsl",e=[k.h||k.hue||k.H||0,k.s||k.saturation||k.S||0,k.l||k.lightness||k.L||k.b||k.brightness]),t=k.a||k.alpha||k.opacity||1,k.opacity!=null&&(t/=100)):(n="rgb",e=[k>>>16,(k&65280)>>>8,k&255]);return{space:n,values:e,alpha:t}}}}),A7=Ee({"node_modules/color-rgba/index.js"(J,H){"use strict";var v=T7();H.exports=function(k){Array.isArray(k)&&k.raw&&(k=String.raw.apply(null,arguments));var l,e,t,n=v(k);if(!n.space)return[];var r=[0,0,0],a=n.space[0]==="h"?[360,100,100]:[255,255,255];return l=Array(3),l[0]=Math.min(Math.max(n.values[0],r[0]),a[0]),l[1]=Math.min(Math.max(n.values[1],r[1]),a[1]),l[2]=Math.min(Math.max(n.values[2],r[2]),a[2]),n.space[0]==="h"&&(l=x(l)),l.push(Math.min(Math.max(n.alpha,0),1)),l};function x(E){var k=E[0]/360,l=E[1]/100,e=E[2]/100,t,n,r,a,o,s=0;if(l===0)return o=e*255,[o,o,o];for(n=e<.5?e*(1+l):e+l-e*l,t=2*e-n,a=[0,0,0];s<3;)r=k+1/3*-(s-1),r<0?r++:r>1&&r--,o=6*r<1?t+(n-t)*6*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,a[s++]=o*255;return a}}}),zm=Ee({"node_modules/color-normalize/index.js"(J,H){"use strict";var v=A7(),x=Ny();H.exports=function(l,e){(e==="float"||!e)&&(e="array"),e==="uint"&&(e="uint8"),e==="uint_clamped"&&(e="uint8_clamped");var t=x(e),n=new t(4),r=e!=="uint8"&&e!=="uint8_clamped";return(!l.length||typeof l=="string")&&(l=v(l),l[0]/=255,l[1]/=255,l[2]/=255),E(l)?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:255,r&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(r?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:1):(n[0]=Math.min(Math.max(Math.floor(l[0]*255),0),255),n[1]=Math.min(Math.max(Math.floor(l[1]*255),0),255),n[2]=Math.min(Math.max(Math.floor(l[2]*255),0),255),n[3]=l[3]==null?255:Math.min(Math.max(Math.floor(l[3]*255),0),255)),n)};function E(k){return!!(k instanceof Uint8Array||k instanceof Uint8ClampedArray||Array.isArray(k)&&(k[0]>1||k[0]===0)&&(k[1]>1||k[1]===0)&&(k[2]>1||k[2]===0)&&(!k[3]||k[3]>1))}}}),M7=Ee({"node_modules/color-id/index.js"(J,H){"use strict";var v=_w();H.exports=x,H.exports.to=x,H.exports.from=E;function x(k,l){l==null&&(l=!0);var e=k[0],t=k[1],n=k[2],r=k[3];r==null&&(r=l?1:255),l&&(e*=255,t*=255,n*=255,r*=255),e=v(e,0,255)&255,t=v(t,0,255)&255,n=v(n,0,255)&255,r=v(r,0,255)&255;var a=e*16777216+(t<<16)+(n<<8)+r;return a}function E(k,l){k=+k;var e=k>>>24,t=(k&16711680)>>>16,n=(k&65280)>>>8,r=k&255;return l===!1?[e,t,n,r]:[e/255,t/255,n/255,r/255]}}}),S7=Ee({"node_modules/glslify/browser.js"(J,H){H.exports=function(v){typeof v=="string"&&(v=[v]);for(var x=[].slice.call(arguments,1),E=[],k=0;k[this.tooManyColors?0:_,m.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:m},attributes:{x:(b,z)=>z.xAttr||{buffer:z.positionBuffer,stride:8,offset:0},y:(b,z)=>z.yAttr||{buffer:z.positionBuffer,stride:8,offset:4},xFract:(b,z)=>z.xAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:0},yFract:(b,z)=>z.yAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:4},size:(b,z)=>z.size.length?{buffer:z.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(z.size*255/this.maxSize)]},borderSize:(b,z)=>z.borderSize.length?{buffer:z.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(z.borderSize*255/this.maxSize)]},colorId:(b,z)=>z.color.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?i.slice(z.color*4,z.color*4+4):[z.color]},borderColorId:(b,z)=>z.borderColor.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?i.slice(z.borderColor*4,z.borderColor*4+4):[z.borderColor]},isActive:(b,z)=>z.activation===!0?{constant:[1]}:z.activation?z.activation:{constant:[0]}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box: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"},u=Object.assign({},h);u.frag=l([`precision highp float; #define GLSLIFY 1 uniform float opacity; @@ -2099,7 +2099,7 @@ void main() { fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.); fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.); } -`]),this.drawMarker=m(u);let A=Object.assign({},f);A.frag=l([`precision highp float; +`]),this.drawMarker=g(u);let A=Object.assign({},h);A.frag=l([`precision highp float; #define GLSLIFY 1 varying vec4 fragColor, fragBorderColor; @@ -2194,8 +2194,8 @@ void main() { fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; fragWidth = 1. / gl_PointSize; } -`]),this.drawCircle=m(A)}s.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},s.prototype.render=function(){return arguments.length&&this.update(...arguments),this.draw(),this},s.prototype.draw=function(){for(var m=arguments.length,h=new Array(m),p=0;p{this.drawItem(w)});return this},s.prototype.drawItem=function(m,h){let{groups:p}=this,g=p[m];if(typeof h=="number"&&(m=h,g=p[h],h=null),!(g&&g.count&&g.opacity))return;g.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,g,h));let i=[];for(let w=1;w{let f=g[T];if(_===void 0)return f;_===null?_={positions:null}:typeof _=="function"?_={ondraw:_}:typeof _[0]=="number"&&(_={positions:_}),_=e(_,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),_.positions===null&&(_.positions=[]),_.tooManyColors!=null&&(this.tooManyColors=_.tooManyColors),f||(g[T]=f={id:T,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:w.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},_=Object.assign({},s.defaults,_)),_.positions&&!("marker"in _)&&(_.marker=f.marker,delete f.marker),_.marker&&!("positions"in _)&&(_.positions=f.positions,delete f.positions);let u=0,A=0;if(t(f,_,[{snap:!0,size:(b,z)=>(b==null&&(b=s.defaults.size),u+=b&&b.length?1:0,b),borderSize:(b,z)=>(b==null&&(b=s.defaults.borderSize),u+=b&&b.length?1:0,b),opacity:parseFloat,color:(b,z)=>(b==null&&(b=s.defaults.color),b=this.updateColor(b),A++,b),borderColor:(b,z)=>(b==null&&(b=s.defaults.borderColor),b=this.updateColor(b),A++,b),bounds:(b,z,I)=>("range"in I||(I.range=null),b),positions:(b,z,I)=>{let{snap:N}=z,{positionBuffer:R,positionFractBuffer:B,selectionBuffer:F}=z;if(b.x||b.y)return b.x.length?z.xAttr={buffer:w.buffer(b.x),offset:0,stride:4,count:b.x.length}:z.xAttr={buffer:b.x.buffer,offset:b.x.offset*4||0,stride:(b.x.stride||1)*4,count:b.x.count},b.y.length?z.yAttr={buffer:w.buffer(b.y),offset:0,stride:4,count:b.y.length}:z.yAttr={buffer:b.y.buffer,offset:b.y.offset*4||0,stride:(b.y.stride||1)*4,count:b.y.count},z.count=Math.max(z.xAttr.count,z.yAttr.count),b;b=a(b,"float64");let P=z.count=Math.floor(b.length/2),j=z.bounds=P?x(b,2):null;if(!I.range&&!z.range&&(delete z.range,I.range=j),!I.marker&&!z.marker&&(delete z.marker,I.marker=null),N&&(N===!0||P>N)?z.tree=k(b,{bounds:j}):N&&N.length&&(z.tree=N),z.tree){let Q={primitive:"points",usage:"static",data:z.tree,type:"uint32"};z.elements?z.elements(Q):z.elements=w.elements(Q)}var U=r.float32(b);R({data:U,usage:"dynamic"});var Z=r.fract32(b,U);return B({data:Z,usage:"dynamic"}),F({data:new Uint8Array(P),type:"uint8",usage:"stream"}),b}},{marker:(b,z,I)=>{let{activation:N}=z;if(N.forEach(R=>R&&R.destroy&&R.destroy()),N.length=0,!b||typeof b[0]=="number"){let R=this.addMarker(b);N[R]=!0}else{let R=[];for(let B=0,F=Math.min(b.length,z.count);B{let N=z.bounds;if(N)return b||(b=N),z.scale=[1/(b[2]-b[0]),1/(b[3]-b[1])],z.translate=[-b[0],-b[1]],z.scaleFract=r.fract(z.scale),z.translateFract=r.fract(z.translate),b},viewport:b=>n(b||[i.drawingBufferWidth,i.drawingBufferHeight])}]),u){let{count:b,size:z,borderSize:I,sizeBuffer:N}=f,R=new Uint8Array(b*2);if(z.length||I.length)for(let B=0;B=0)return i;let w;if(m instanceof Uint8Array||m instanceof Uint8ClampedArray)w=m;else{w=new Uint8Array(m.length);for(let M=0,C=m.length;Mg*4&&(this.tooManyColors=!0),this.updatePalette(p),i.length===1?i[0]:i},s.prototype.updatePalette=function(m){if(this.tooManyColors)return;let{maxColors:h,paletteTexture:p}=this,g=Math.ceil(m.length*.25/h);if(g>1){m=m.slice();for(let i=m.length*.25%h;i{m.sizeBuffer.destroy(),m.positionBuffer.destroy(),m.positionFractBuffer.destroy(),m.colorBuffer.destroy(),m.activation.forEach(h=>h&&h.destroy&&h.destroy()),m.selectionBuffer.destroy(),m.elements&&m.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(m=>m&&m.destroy&&m.destroy()),this};var c=function(m,h){var p=new o(m,h),g=p.render.bind(p);return Object.assign(g,{render:g,update:p.update.bind(p),draw:p.draw.bind(p),destroy:p.destroy.bind(p),regl:p.regl,gl:p.gl,canvas:p.gl.canvas,groups:p.groups,markers:p.markerCache,palette:p.palette}),g};V.exports=c}}),Lc=Ee({"node_modules/object-assign/index.js"(J,V){"use strict";var v=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;function k(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function l(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},a=0;a<10;a++)t["_"+String.fromCharCode(a)]=a;var r=Object.getOwnPropertyNames(t).map(function(o){return t[o]});if(r.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(o){n[o]=o}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}V.exports=l()?Object.assign:function(e,t){for(var a,r=k(e),n,o=1;o80*P){re=oe=B[0],ae=H=B[1];for(var Y=P;Yoe&&(oe=X),K>H&&(H=K);G=Math.max(oe-re,H-ae),G=G!==0?32767/G:0}return k(Z,Q,P,re,ae,G,0),Q}function x(B,F,P,j,U){var Z,Q;if(U===R(B,F,P,j)>0)for(Z=F;Z=F;Z-=j)Q=z(Z,B[Z],B[Z+1],Q);return Q&&M(Q,Q.next)&&(I(Q),Q=Q.next),Q}function E(B,F){if(!B)return B;F||(F=B);var P=B,j;do if(j=!1,!P.steiner&&(M(P,P.next)||S(P.prev,P,P.next)===0)){if(I(P),P=F=P.prev,P===P.next)break;j=!0}else P=P.next;while(j||P!==F);return F}function k(B,F,P,j,U,Z,Q){if(B){!Q&&Z&&m(B,j,U,Z);for(var re=B,ae,oe;B.prev!==B.next;){if(ae=B.prev,oe=B.next,Z?e(B,j,U,Z):l(B)){F.push(ae.i/P|0),F.push(B.i/P|0),F.push(oe.i/P|0),I(B),B=oe.next,re=oe.next;continue}if(B=oe,B===re){Q?Q===1?(B=t(E(B),F,P),k(B,F,P,j,U,Z,2)):Q===2&&a(B,F,P,j,U,Z):k(E(B),F,P,j,U,Z,1);break}}}}function l(B){var F=B.prev,P=B,j=B.next;if(S(F,P,j)>=0)return!1;for(var U=F.x,Z=P.x,Q=j.x,re=F.y,ae=P.y,oe=j.y,H=UZ?U>Q?U:Q:Z>Q?Z:Q,G=re>ae?re>oe?re:oe:ae>oe?ae:oe,Y=j.next;Y!==F;){if(Y.x>=H&&Y.x<=K&&Y.y>=X&&Y.y<=G&&i(U,re,Z,ae,Q,oe,Y.x,Y.y)&&S(Y.prev,Y,Y.next)>=0)return!1;Y=Y.next}return!0}function e(B,F,P,j){var U=B.prev,Z=B,Q=B.next;if(S(U,Z,Q)>=0)return!1;for(var re=U.x,ae=Z.x,oe=Q.x,H=U.y,X=Z.y,K=Q.y,G=reae?re>oe?re:oe:ae>oe?ae:oe,$=H>X?H>K?H:K:X>K?X:K,ee=p(G,Y,F,P,j),ne=p(q,$,F,P,j),fe=B.prevZ,ye=B.nextZ;fe&&fe.z>=ee&&ye&&ye.z<=ne;){if(fe.x>=G&&fe.x<=q&&fe.y>=Y&&fe.y<=$&&fe!==U&&fe!==Q&&i(re,H,ae,X,oe,K,fe.x,fe.y)&&S(fe.prev,fe,fe.next)>=0||(fe=fe.prevZ,ye.x>=G&&ye.x<=q&&ye.y>=Y&&ye.y<=$&&ye!==U&&ye!==Q&&i(re,H,ae,X,oe,K,ye.x,ye.y)&&S(ye.prev,ye,ye.next)>=0))return!1;ye=ye.nextZ}for(;fe&&fe.z>=ee;){if(fe.x>=G&&fe.x<=q&&fe.y>=Y&&fe.y<=$&&fe!==U&&fe!==Q&&i(re,H,ae,X,oe,K,fe.x,fe.y)&&S(fe.prev,fe,fe.next)>=0)return!1;fe=fe.prevZ}for(;ye&&ye.z<=ne;){if(ye.x>=G&&ye.x<=q&&ye.y>=Y&&ye.y<=$&&ye!==U&&ye!==Q&&i(re,H,ae,X,oe,K,ye.x,ye.y)&&S(ye.prev,ye,ye.next)>=0)return!1;ye=ye.nextZ}return!0}function t(B,F,P){var j=B;do{var U=j.prev,Z=j.next.next;!M(U,Z)&&C(U,j,j.next,Z)&&u(U,Z)&&u(Z,U)&&(F.push(U.i/P|0),F.push(j.i/P|0),F.push(Z.i/P|0),I(j),I(j.next),j=B=Z),j=j.next}while(j!==B);return E(j)}function a(B,F,P,j,U,Z){var Q=B;do{for(var re=Q.next.next;re!==Q.prev;){if(Q.i!==re.i&&w(Q,re)){var ae=b(Q,re);Q=E(Q,Q.next),ae=E(ae,ae.next),k(Q,F,P,j,U,Z,0),k(ae,F,P,j,U,Z,0);return}re=re.next}Q=Q.next}while(Q!==B)}function r(B,F,P,j){var U=[],Z,Q,re,ae,oe;for(Z=0,Q=F.length;Z=P.next.y&&P.next.y!==P.y){var re=P.x+(U-P.y)*(P.next.x-P.x)/(P.next.y-P.y);if(re<=j&&re>Z&&(Z=re,Q=P.x=P.x&&P.x>=oe&&j!==P.x&&i(UQ.x||P.x===Q.x&&c(Q,P)))&&(Q=P,X=K)),P=P.next;while(P!==ae);return Q}function c(B,F){return S(B.prev,B,F.prev)<0&&S(F.next,B,B.next)<0}function m(B,F,P,j){var U=B;do U.z===0&&(U.z=p(U.x,U.y,F,P,j)),U.prevZ=U.prev,U.nextZ=U.next,U=U.next;while(U!==B);U.prevZ.nextZ=null,U.prevZ=null,h(U)}function h(B){var F,P,j,U,Z,Q,re,ae,oe=1;do{for(P=B,B=null,Z=null,Q=0;P;){for(Q++,j=P,re=0,F=0;F0||ae>0&&j;)re!==0&&(ae===0||!j||P.z<=j.z)?(U=P,P=P.nextZ,re--):(U=j,j=j.nextZ,ae--),Z?Z.nextZ=U:B=U,U.prevZ=Z,Z=U;P=j}Z.nextZ=null,oe*=2}while(Q>1);return B}function p(B,F,P,j,U){return B=(B-P)*U|0,F=(F-j)*U|0,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,F=(F|F<<8)&16711935,F=(F|F<<4)&252645135,F=(F|F<<2)&858993459,F=(F|F<<1)&1431655765,B|F<<1}function g(B){var F=B,P=B;do(F.x=(B-Q)*(Z-re)&&(B-Q)*(j-re)>=(P-Q)*(F-re)&&(P-Q)*(Z-re)>=(U-Q)*(j-re)}function w(B,F){return B.next.i!==F.i&&B.prev.i!==F.i&&!f(B,F)&&(u(B,F)&&u(F,B)&&A(B,F)&&(S(B.prev,B,F.prev)||S(B,F.prev,F))||M(B,F)&&S(B.prev,B,B.next)>0&&S(F.prev,F,F.next)>0)}function S(B,F,P){return(F.y-B.y)*(P.x-F.x)-(F.x-B.x)*(P.y-F.y)}function M(B,F){return B.x===F.x&&B.y===F.y}function C(B,F,P,j){var U=T(S(B,F,P)),Z=T(S(B,F,j)),Q=T(S(P,j,B)),re=T(S(P,j,F));return!!(U!==Z&&Q!==re||U===0&&_(B,P,F)||Z===0&&_(B,j,F)||Q===0&&_(P,B,j)||re===0&&_(P,F,j))}function _(B,F,P){return F.x<=Math.max(B.x,P.x)&&F.x>=Math.min(B.x,P.x)&&F.y<=Math.max(B.y,P.y)&&F.y>=Math.min(B.y,P.y)}function T(B){return B>0?1:B<0?-1:0}function f(B,F){var P=B;do{if(P.i!==B.i&&P.next.i!==B.i&&P.i!==F.i&&P.next.i!==F.i&&C(P,P.next,B,F))return!0;P=P.next}while(P!==B);return!1}function u(B,F){return S(B.prev,B,B.next)<0?S(B,F,B.next)>=0&&S(B,B.prev,F)>=0:S(B,F,B.prev)<0||S(B,B.next,F)<0}function A(B,F){var P=B,j=!1,U=(B.x+F.x)/2,Z=(B.y+F.y)/2;do P.y>Z!=P.next.y>Z&&P.next.y!==P.y&&U<(P.next.x-P.x)*(Z-P.y)/(P.next.y-P.y)+P.x&&(j=!j),P=P.next;while(P!==B);return j}function b(B,F){var P=new N(B.i,B.x,B.y),j=new N(F.i,F.x,F.y),U=B.next,Z=F.prev;return B.next=F,F.prev=B,P.next=U,U.prev=P,j.next=P,P.prev=j,Z.next=j,j.prev=Z,j}function z(B,F,P,j){var U=new N(B,F,P);return j?(U.next=j.next,U.prev=j,j.next.prev=U,j.next=U):(U.prev=U,U.next=U),U}function I(B){B.next.prev=B.prev,B.prev.next=B.next,B.prevZ&&(B.prevZ.nextZ=B.nextZ),B.nextZ&&(B.nextZ.prevZ=B.prevZ)}function N(B,F,P){this.i=B,this.x=F,this.y=P,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}v.deviation=function(B,F,P,j){var U=F&&F.length,Z=U?F[0]*P:B.length,Q=Math.abs(R(B,0,Z,P));if(U)for(var re=0,ae=F.length;re0&&(j+=B[U-1].length,P.holes.push(j))}return P}}}),k7=Ee({"node_modules/array-normalize/index.js"(J,V){"use strict";var v=Jv();V.exports=x;function x(E,k,l){if(!E||E.length==null)throw Error("Argument should be an array");k==null&&(k=1),l==null&&(l=v(E,k));for(var e=0;e-1}}}),zw=Ee({"node_modules/es5-ext/string/#/contains/index.js"(J,V){"use strict";V.exports=U7()()?String.prototype.contains:q7()}}),Ed=Ee({"node_modules/d/index.js"(J,V){"use strict";var v=tp(),x=Rw(),E=qy(),k=Fw(),l=zw(),e=V.exports=function(t,a){var r,n,o,s,c;return arguments.length<2||typeof t!="string"?(s=a,a=t,t=null):s=arguments[2],v(t)?(r=l.call(t,"c"),n=l.call(t,"e"),o=l.call(t,"w")):(r=o=!0,n=!1),c={value:a,configurable:r,enumerable:n,writable:o},s?E(k(s),c):c};e.gs=function(t,a,r){var n,o,s,c;return typeof t!="string"?(s=r,r=a,a=t,t=null):s=arguments[3],v(a)?x(a)?v(r)?x(r)||(s=r,r=void 0):r=void 0:(s=a,a=r=void 0):a=void 0,v(t)?(n=l.call(t,"c"),o=l.call(t,"e")):(n=!0,o=!1),c={get:a,set:r,configurable:n,enumerable:o},s?E(k(s),c):c}}}),Bm=Ee({"node_modules/es5-ext/function/is-arguments.js"(J,V){"use strict";var v=Object.prototype.toString,x=v.call(function(){return arguments}());V.exports=function(E){return v.call(E)===x}}}),Nm=Ee({"node_modules/es5-ext/string/is-string.js"(J,V){"use strict";var v=Object.prototype.toString,x=v.call("");V.exports=function(E){return typeof E=="string"||E&&typeof E=="object"&&(E instanceof String||v.call(E)===x)||!1}}}),V7=Ee({"node_modules/ext/global-this/is-implemented.js"(J,V){"use strict";V.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),H7=Ee({"node_modules/ext/global-this/implementation.js"(J,V){var v=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};V.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return v()}try{return __global__||v()}finally{delete Object.prototype.__global__}}()}}),Om=Ee({"node_modules/ext/global-this/index.js"(J,V){"use strict";V.exports=V7()()?globalThis:H7()}}),G7=Ee({"node_modules/es6-symbol/is-implemented.js"(J,V){"use strict";var v=Om(),x={object:!0,symbol:!0};V.exports=function(){var E=v.Symbol,k;if(typeof E!="function")return!1;k=E("test symbol");try{String(k)}catch{return!1}return!(!x[typeof E.iterator]||!x[typeof E.toPrimitive]||!x[typeof E.toStringTag])}}}),W7=Ee({"node_modules/es6-symbol/is-symbol.js"(J,V){"use strict";V.exports=function(v){return v?typeof v=="symbol"?!0:!v.constructor||v.constructor.name!=="Symbol"?!1:v[v.constructor.toStringTag]==="Symbol":!1}}}),Bw=Ee({"node_modules/es6-symbol/validate-symbol.js"(J,V){"use strict";var v=W7();V.exports=function(x){if(!v(x))throw new TypeError(x+" is not a symbol");return x}}}),Y7=Ee({"node_modules/es6-symbol/lib/private/generate-name.js"(J,V){"use strict";var v=Ed(),x=Object.create,E=Object.defineProperty,k=Object.prototype,l=x(null);V.exports=function(e){for(var t=0,a,r;l[e+(t||"")];)++t;return e+=t||"",l[e]=!0,a="@@"+e,E(k,a,v.gs(null,function(n){r||(r=!0,E(this,a,v(n)),r=!1)})),a}}}),X7=Ee({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(J,V){"use strict";var v=Ed(),x=Om().Symbol;V.exports=function(E){return Object.defineProperties(E,{hasInstance:v("",x&&x.hasInstance||E("hasInstance")),isConcatSpreadable:v("",x&&x.isConcatSpreadable||E("isConcatSpreadable")),iterator:v("",x&&x.iterator||E("iterator")),match:v("",x&&x.match||E("match")),replace:v("",x&&x.replace||E("replace")),search:v("",x&&x.search||E("search")),species:v("",x&&x.species||E("species")),split:v("",x&&x.split||E("split")),toPrimitive:v("",x&&x.toPrimitive||E("toPrimitive")),toStringTag:v("",x&&x.toStringTag||E("toStringTag")),unscopables:v("",x&&x.unscopables||E("unscopables"))})}}}),$7=Ee({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(J,V){"use strict";var v=Ed(),x=Bw(),E=Object.create(null);V.exports=function(k){return Object.defineProperties(k,{for:v(function(l){return E[l]?E[l]:E[l]=k(String(l))}),keyFor:v(function(l){var e;x(l);for(e in E)if(E[e]===l)return e})})}}}),Z7=Ee({"node_modules/es6-symbol/polyfill.js"(J,V){"use strict";var v=Ed(),x=Bw(),E=Om().Symbol,k=Y7(),l=X7(),e=$7(),t=Object.create,a=Object.defineProperties,r=Object.defineProperty,n,o,s;if(typeof E=="function")try{String(E()),s=!0}catch{}else E=null;o=function(m){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return n(m)},V.exports=n=function c(m){var h;if(this instanceof c)throw new TypeError("Symbol is not a constructor");return s?E(m):(h=t(o.prototype),m=m===void 0?"":String(m),a(h,{__description__:v("",m),__name__:v("",k(m))}))},l(n),e(n),a(o.prototype,{constructor:v(n),toString:v("",function(){return this.__name__})}),a(n.prototype,{toString:v(function(){return"Symbol ("+x(this).__description__+")"}),valueOf:v(function(){return x(this)})}),r(n.prototype,n.toPrimitive,v("",function(){var c=x(this);return typeof c=="symbol"?c:c.toString()})),r(n.prototype,n.toStringTag,v("c","Symbol")),r(o.prototype,n.toStringTag,v("c",n.prototype[n.toStringTag])),r(o.prototype,n.toPrimitive,v("c",n.prototype[n.toPrimitive]))}}),uv=Ee({"node_modules/es6-symbol/index.js"(J,V){"use strict";V.exports=G7()()?Om().Symbol:Z7()}}),K7=Ee({"node_modules/es5-ext/array/#/clear.js"(J,V){"use strict";var v=Sd();V.exports=function(){return v(this).length=0,this}}}),c0=Ee({"node_modules/es5-ext/object/valid-callable.js"(J,V){"use strict";V.exports=function(v){if(typeof v!="function")throw new TypeError(v+" is not a function");return v}}}),J7=Ee({"node_modules/type/string/coerce.js"(J,V){"use strict";var v=tp(),x=Iw(),E=Object.prototype.toString;V.exports=function(k){if(!v(k))return null;if(x(k)){var l=k.toString;if(typeof l!="function"||l===E)return null}try{return""+k}catch{return null}}}}),Q7=Ee({"node_modules/type/lib/safe-to-string.js"(J,V){"use strict";V.exports=function(v){try{return v.toString()}catch{try{return String(v)}catch{return null}}}}}),e9=Ee({"node_modules/type/lib/to-short-string.js"(J,V){"use strict";var v=Q7(),x=/[\n\r\u2028\u2029]/g;V.exports=function(E){var k=v(E);return k===null?"":(k.length>100&&(k=k.slice(0,99)+"\u2026"),k=k.replace(x,function(l){switch(l){case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),k)}}}),t9=Ee({"node_modules/type/lib/resolve-error-message.js"(J,V){"use strict";var v=J7(),x=e9();V.exports=function(E,k,l){l&&l.errorMessage&&(E=v(l.errorMessage));var e=E.indexOf("%v"),t=e>-1?x(k):null;if(l&&l.name){var a=E.indexOf("%n");if(a>-1){if(e>-1){var r,n,o,s;return a>e?(r=t,o=e,n=l.name,s=a):(r=l.name,o=a,n=t,s=e),E.slice(0,o)+r+E.slice(o+2,s)+n+E.slice(s+2)}return E.slice(0,a)+l.name+E.slice(a+2)}}return e>-1?E.slice(0,e)+t+E.slice(e+2):E}}}),Nw=Ee({"node_modules/type/lib/resolve-exception.js"(J,V){"use strict";var v=tp(),x=t9();V.exports=function(E,k,l){if(l&&!v(E)){if("default"in l)return l.default;if(l.isOptional)return null}var e=l&&l.Error||TypeError,t=new e(x(k,E,l));throw l&&l.errorCode&&(t.code=l.errorCode),t}}}),r9=Ee({"node_modules/type/value/ensure.js"(J,V){"use strict";var v=Nw(),x=tp();V.exports=function(E){if(x(E))return E;var k=arguments[1],l=k&&k.name?"Expected a value for %n, received %v":"Cannot use %v";return v(E,l,k)}}}),n9=Ee({"node_modules/type/plain-function/ensure.js"(J,V){"use strict";var v=Nw(),x=Rw();V.exports=function(E){if(x(E))return E;var k=arguments[1],l=k&&k.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return v(E,l,k)}}}),a9=Ee({"node_modules/es5-ext/array/from/is-implemented.js"(J,V){"use strict";V.exports=function(){var v=Array.from,x,E;return typeof v!="function"?!1:(x=["raz","dwa"],E=v(x),!!(E&&E!==x&&E[1]==="dwa"))}}}),i9=Ee({"node_modules/es5-ext/function/is-function.js"(J,V){"use strict";var v=Object.prototype.toString,x=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);V.exports=function(E){return typeof E=="function"&&x(v.call(E))}}}),o9=Ee({"node_modules/es5-ext/math/sign/is-implemented.js"(J,V){"use strict";V.exports=function(){var v=Math.sign;return typeof v!="function"?!1:v(10)===1&&v(-20)===-1}}}),s9=Ee({"node_modules/es5-ext/math/sign/shim.js"(J,V){"use strict";V.exports=function(v){return v=Number(v),isNaN(v)||v===0?v:v>0?1:-1}}}),l9=Ee({"node_modules/es5-ext/math/sign/index.js"(J,V){"use strict";V.exports=o9()()?Math.sign:s9()}}),u9=Ee({"node_modules/es5-ext/number/to-integer.js"(J,V){"use strict";var v=l9(),x=Math.abs,E=Math.floor;V.exports=function(k){return isNaN(k)?0:(k=Number(k),k===0||!isFinite(k)?k:v(k)*E(x(k)))}}}),c9=Ee({"node_modules/es5-ext/number/to-pos-integer.js"(J,V){"use strict";var v=u9(),x=Math.max;V.exports=function(E){return x(0,v(E))}}}),f9=Ee({"node_modules/es5-ext/array/from/shim.js"(J,V){"use strict";var v=uv().iterator,x=Bm(),E=i9(),k=c9(),l=c0(),e=Sd(),t=lv(),a=Nm(),r=Array.isArray,n=Function.prototype.call,o={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;V.exports=function(c){var m=arguments[1],h=arguments[2],p,g,i,w,S,M,C,_,T,f;if(c=Object(e(c)),t(m)&&l(m),!this||this===Array||!E(this)){if(!m){if(x(c))return S=c.length,S!==1?Array.apply(null,c):(w=new Array(1),w[0]=c[0],w);if(r(c)){for(w=new Array(S=c.length),g=0;g=55296&&M<=56319&&(f+=c[++g])),f=m?n.call(m,h,f,i):f,p?(o.value=f,s(w,i,o)):w[i]=f,++i;S=i}}if(S===void 0)for(S=k(c.length),p&&(w=new p(S)),g=0;g=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){a(this,"__redo__",l("c",[o]));return}this.__redo__.forEach(function(s,c){s>=o&&(this.__redo__[c]=++s)},this),this.__redo__.push(o)}}),_onDelete:l(function(o){var s;o>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(s=this.__redo__.indexOf(o),s!==-1&&this.__redo__.splice(s,1),this.__redo__.forEach(function(c,m){c>o&&(this.__redo__[m]=--c)},this)))}),_onClear:l(function(){this.__redo__&&v.call(this.__redo__),this.__nextIndex__=0})}))),a(n.prototype,t.iterator,l(function(){return this}))}}),y9=Ee({"node_modules/es6-iterator/array.js"(J,V){"use strict";var v=Uy(),x=zw(),E=Ed(),k=uv(),l=Ow(),e=Object.defineProperty,t;t=V.exports=function(a,r){if(!(this instanceof t))throw new TypeError("Constructor requires 'new'");l.call(this,a),r?x.call(r,"key+value")?r="key+value":x.call(r,"key")?r="key":r="value":r="value",e(this,"__kind__",E("",r))},v&&v(t,l),delete t.prototype.constructor,t.prototype=Object.create(l.prototype,{_resolve:E(function(a){return this.__kind__==="value"?this.__list__[a]:this.__kind__==="key+value"?[a,this.__list__[a]]:a})}),e(t.prototype,k.toStringTag,E("c","Array Iterator"))}}),_9=Ee({"node_modules/es6-iterator/string.js"(J,V){"use strict";var v=Uy(),x=Ed(),E=uv(),k=Ow(),l=Object.defineProperty,e;e=V.exports=function(t){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");t=String(t),k.call(this,t),l(this,"__length__",x("",t.length))},v&&v(e,k),delete e.prototype.constructor,e.prototype=Object.create(k.prototype,{_next:x(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?a+this.__list__[this.__nextIndex__++]:a)})}),l(e.prototype,E.toStringTag,x("c","String Iterator"))}}),b9=Ee({"node_modules/es6-iterator/is-iterable.js"(J,V){"use strict";var v=Bm(),x=lv(),E=Nm(),k=uv().iterator,l=Array.isArray;V.exports=function(e){return x(e)?l(e)||E(e)||v(e)?!0:typeof e[k]=="function":!1}}}),x9=Ee({"node_modules/es6-iterator/valid-iterable.js"(J,V){"use strict";var v=b9();V.exports=function(x){if(!v(x))throw new TypeError(x+" is not iterable");return x}}}),jw=Ee({"node_modules/es6-iterator/get.js"(J,V){"use strict";var v=Bm(),x=Nm(),E=y9(),k=_9(),l=x9(),e=uv().iterator;V.exports=function(t){return typeof l(t)[e]=="function"?t[e]():v(t)?new E(t):x(t)?new k(t):new E(t)}}}),w9=Ee({"node_modules/es6-iterator/for-of.js"(J,V){"use strict";var v=Bm(),x=c0(),E=Nm(),k=jw(),l=Array.isArray,e=Function.prototype.call,t=Array.prototype.some;V.exports=function(a,r){var n,o=arguments[2],s,c,m,h,p,g,i;if(l(a)||v(a)?n="array":E(a)?n="string":a=k(a),x(r),c=function(){m=!0},n==="array"){t.call(a,function(w){return e.call(r,o,w,c),m});return}if(n==="string"){for(p=a.length,h=0;h=55296&&i<=56319&&(g+=a[++h])),e.call(r,o,g,c),!m);++h);return}for(s=a.next();!s.done;){if(e.call(r,o,s.value,c),m)return;s=a.next()}}}}),T9=Ee({"node_modules/es6-weak-map/is-native-implemented.js"(J,V){"use strict";V.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}}),A9=Ee({"node_modules/es6-weak-map/polyfill.js"(J,V){"use strict";var v=lv(),x=Uy(),E=D7(),k=Sd(),l=I7(),e=Ed(),t=jw(),a=w9(),r=uv().toStringTag,n=T9(),o=Array.isArray,s=Object.defineProperty,c=Object.prototype.hasOwnProperty,m=Object.getPrototypeOf,h;V.exports=h=function(){var p=arguments[0],g;if(!(this instanceof h))throw new TypeError("Constructor requires 'new'");return g=n&&x&&WeakMap!==h?x(new WeakMap,m(this)):this,v(p)&&(o(p)||(p=t(p))),s(g,"__weakMapData__",e("c","$weakMap$"+l())),p&&a(p,function(i){k(i),g.set(i[0],i[1])}),g},n&&(x&&x(h,WeakMap),h.prototype=Object.create(WeakMap.prototype,{constructor:e(h)})),Object.defineProperties(h.prototype,{delete:e(function(p){return c.call(E(p),this.__weakMapData__)?(delete p[this.__weakMapData__],!0):!1}),get:e(function(p){if(c.call(E(p),this.__weakMapData__))return p[this.__weakMapData__]}),has:e(function(p){return c.call(E(p),this.__weakMapData__)}),set:e(function(p,g){return s(E(p),this.__weakMapData__,e("c",g)),this}),toString:e(function(){return"[object WeakMap]"})}),s(h.prototype,r,e("c","WeakMap"))}}),Uw=Ee({"node_modules/es6-weak-map/index.js"(J,V){"use strict";V.exports=C7()()?WeakMap:A9()}}),M9=Ee({"node_modules/array-find-index/index.js"(J,V){"use strict";V.exports=function(v,x,E){if(typeof Array.prototype.findIndex=="function")return v.findIndex(x,E);if(typeof x!="function")throw new TypeError("predicate must be a function");var k=Object(v),l=k.length;if(l===0)return-1;for(var e=0;e{this.drawItem(T)});return this},s.prototype.drawItem=function(g,f){let{groups:p}=this,m=p[g];if(typeof f=="number"&&(g=f,m=p[f],f=null),!(m&&m.count&&m.opacity))return;m.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,m,f));let i=[];for(let T=1;T{let h=m[w];if(_===void 0)return h;_===null?_={positions:null}:typeof _=="function"?_={ondraw:_}:typeof _[0]=="number"&&(_={positions:_}),_=e(_,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),_.positions===null&&(_.positions=[]),_.tooManyColors!=null&&(this.tooManyColors=_.tooManyColors),h||(m[w]=h={id:w,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:T.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:T.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:T.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:T.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:T.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},_=Object.assign({},s.defaults,_)),_.positions&&!("marker"in _)&&(_.marker=h.marker,delete h.marker),_.marker&&!("positions"in _)&&(_.positions=h.positions,delete h.positions);let u=0,A=0;if(t(h,_,[{snap:!0,size:(b,z)=>(b==null&&(b=s.defaults.size),u+=b&&b.length?1:0,b),borderSize:(b,z)=>(b==null&&(b=s.defaults.borderSize),u+=b&&b.length?1:0,b),opacity:parseFloat,color:(b,z)=>(b==null&&(b=s.defaults.color),b=this.updateColor(b),A++,b),borderColor:(b,z)=>(b==null&&(b=s.defaults.borderColor),b=this.updateColor(b),A++,b),bounds:(b,z,I)=>("range"in I||(I.range=null),b),positions:(b,z,I)=>{let{snap:N}=z,{positionBuffer:R,positionFractBuffer:B,selectionBuffer:F}=z;if(b.x||b.y)return b.x.length?z.xAttr={buffer:T.buffer(b.x),offset:0,stride:4,count:b.x.length}:z.xAttr={buffer:b.x.buffer,offset:b.x.offset*4||0,stride:(b.x.stride||1)*4,count:b.x.count},b.y.length?z.yAttr={buffer:T.buffer(b.y),offset:0,stride:4,count:b.y.length}:z.yAttr={buffer:b.y.buffer,offset:b.y.offset*4||0,stride:(b.y.stride||1)*4,count:b.y.count},z.count=Math.max(z.xAttr.count,z.yAttr.count),b;b=n(b,"float64");let P=z.count=Math.floor(b.length/2),j=z.bounds=P?x(b,2):null;if(!I.range&&!z.range&&(delete z.range,I.range=j),!I.marker&&!z.marker&&(delete z.marker,I.marker=null),N&&(N===!0||P>N)?z.tree=k(b,{bounds:j}):N&&N.length&&(z.tree=N),z.tree){let Q={primitive:"points",usage:"static",data:z.tree,type:"uint32"};z.elements?z.elements(Q):z.elements=T.elements(Q)}var U=r.float32(b);R({data:U,usage:"dynamic"});var Z=r.fract32(b,U);return B({data:Z,usage:"dynamic"}),F({data:new Uint8Array(P),type:"uint8",usage:"stream"}),b}},{marker:(b,z,I)=>{let{activation:N}=z;if(N.forEach(R=>R&&R.destroy&&R.destroy()),N.length=0,!b||typeof b[0]=="number"){let R=this.addMarker(b);N[R]=!0}else{let R=[];for(let B=0,F=Math.min(b.length,z.count);B{let N=z.bounds;if(N)return b||(b=N),z.scale=[1/(b[2]-b[0]),1/(b[3]-b[1])],z.translate=[-b[0],-b[1]],z.scaleFract=r.fract(z.scale),z.translateFract=r.fract(z.translate),b},viewport:b=>a(b||[i.drawingBufferWidth,i.drawingBufferHeight])}]),u){let{count:b,size:z,borderSize:I,sizeBuffer:N}=h,R=new Uint8Array(b*2);if(z.length||I.length)for(let B=0;B=0)return i;let T;if(g instanceof Uint8Array||g instanceof Uint8ClampedArray)T=g;else{T=new Uint8Array(g.length);for(let M=0,C=g.length;Mm*4&&(this.tooManyColors=!0),this.updatePalette(p),i.length===1?i[0]:i},s.prototype.updatePalette=function(g){if(this.tooManyColors)return;let{maxColors:f,paletteTexture:p}=this,m=Math.ceil(g.length*.25/f);if(m>1){g=g.slice();for(let i=g.length*.25%f;i{g.sizeBuffer.destroy(),g.positionBuffer.destroy(),g.positionFractBuffer.destroy(),g.colorBuffer.destroy(),g.activation.forEach(f=>f&&f.destroy&&f.destroy()),g.selectionBuffer.destroy(),g.elements&&g.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(g=>g&&g.destroy&&g.destroy()),this};var c=function(g,f){var p=new o(g,f),m=p.render.bind(p);return Object.assign(m,{render:m,update:p.update.bind(p),draw:p.draw.bind(p),destroy:p.destroy.bind(p),regl:p.regl,gl:p.gl,canvas:p.gl.canvas,groups:p.groups,markers:p.markerCache,palette:p.palette}),m};H.exports=c}}),Lc=Ee({"node_modules/object-assign/index.js"(J,H){"use strict";var v=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;function k(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function l(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(o){return t[o]});if(r.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(o){a[o]=o}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}H.exports=l()?Object.assign:function(e,t){for(var n,r=k(e),a,o=1;o80*P){re=oe=B[0],ne=V=B[1];for(var X=P;Xoe&&(oe=$),K>V&&(V=K);G=Math.max(oe-re,V-ne),G=G!==0?32767/G:0}return k(Z,Q,P,re,ne,G,0),Q}function x(B,F,P,j,U){var Z,Q;if(U===R(B,F,P,j)>0)for(Z=F;Z=F;Z-=j)Q=z(Z,B[Z],B[Z+1],Q);return Q&&M(Q,Q.next)&&(I(Q),Q=Q.next),Q}function E(B,F){if(!B)return B;F||(F=B);var P=B,j;do if(j=!1,!P.steiner&&(M(P,P.next)||S(P.prev,P,P.next)===0)){if(I(P),P=F=P.prev,P===P.next)break;j=!0}else P=P.next;while(j||P!==F);return F}function k(B,F,P,j,U,Z,Q){if(B){!Q&&Z&&g(B,j,U,Z);for(var re=B,ne,oe;B.prev!==B.next;){if(ne=B.prev,oe=B.next,Z?e(B,j,U,Z):l(B)){F.push(ne.i/P|0),F.push(B.i/P|0),F.push(oe.i/P|0),I(B),B=oe.next,re=oe.next;continue}if(B=oe,B===re){Q?Q===1?(B=t(E(B),F,P),k(B,F,P,j,U,Z,2)):Q===2&&n(B,F,P,j,U,Z):k(E(B),F,P,j,U,Z,1);break}}}}function l(B){var F=B.prev,P=B,j=B.next;if(S(F,P,j)>=0)return!1;for(var U=F.x,Z=P.x,Q=j.x,re=F.y,ne=P.y,oe=j.y,V=UZ?U>Q?U:Q:Z>Q?Z:Q,G=re>ne?re>oe?re:oe:ne>oe?ne:oe,X=j.next;X!==F;){if(X.x>=V&&X.x<=K&&X.y>=$&&X.y<=G&&i(U,re,Z,ne,Q,oe,X.x,X.y)&&S(X.prev,X,X.next)>=0)return!1;X=X.next}return!0}function e(B,F,P,j){var U=B.prev,Z=B,Q=B.next;if(S(U,Z,Q)>=0)return!1;for(var re=U.x,ne=Z.x,oe=Q.x,V=U.y,$=Z.y,K=Q.y,G=rene?re>oe?re:oe:ne>oe?ne:oe,W=V>$?V>K?V:K:$>K?$:K,ee=p(G,X,F,P,j),ae=p(q,W,F,P,j),fe=B.prevZ,ye=B.nextZ;fe&&fe.z>=ee&&ye&&ye.z<=ae;){if(fe.x>=G&&fe.x<=q&&fe.y>=X&&fe.y<=W&&fe!==U&&fe!==Q&&i(re,V,ne,$,oe,K,fe.x,fe.y)&&S(fe.prev,fe,fe.next)>=0||(fe=fe.prevZ,ye.x>=G&&ye.x<=q&&ye.y>=X&&ye.y<=W&&ye!==U&&ye!==Q&&i(re,V,ne,$,oe,K,ye.x,ye.y)&&S(ye.prev,ye,ye.next)>=0))return!1;ye=ye.nextZ}for(;fe&&fe.z>=ee;){if(fe.x>=G&&fe.x<=q&&fe.y>=X&&fe.y<=W&&fe!==U&&fe!==Q&&i(re,V,ne,$,oe,K,fe.x,fe.y)&&S(fe.prev,fe,fe.next)>=0)return!1;fe=fe.prevZ}for(;ye&&ye.z<=ae;){if(ye.x>=G&&ye.x<=q&&ye.y>=X&&ye.y<=W&&ye!==U&&ye!==Q&&i(re,V,ne,$,oe,K,ye.x,ye.y)&&S(ye.prev,ye,ye.next)>=0)return!1;ye=ye.nextZ}return!0}function t(B,F,P){var j=B;do{var U=j.prev,Z=j.next.next;!M(U,Z)&&C(U,j,j.next,Z)&&u(U,Z)&&u(Z,U)&&(F.push(U.i/P|0),F.push(j.i/P|0),F.push(Z.i/P|0),I(j),I(j.next),j=B=Z),j=j.next}while(j!==B);return E(j)}function n(B,F,P,j,U,Z){var Q=B;do{for(var re=Q.next.next;re!==Q.prev;){if(Q.i!==re.i&&T(Q,re)){var ne=b(Q,re);Q=E(Q,Q.next),ne=E(ne,ne.next),k(Q,F,P,j,U,Z,0),k(ne,F,P,j,U,Z,0);return}re=re.next}Q=Q.next}while(Q!==B)}function r(B,F,P,j){var U=[],Z,Q,re,ne,oe;for(Z=0,Q=F.length;Z=P.next.y&&P.next.y!==P.y){var re=P.x+(U-P.y)*(P.next.x-P.x)/(P.next.y-P.y);if(re<=j&&re>Z&&(Z=re,Q=P.x=P.x&&P.x>=oe&&j!==P.x&&i(UQ.x||P.x===Q.x&&c(Q,P)))&&(Q=P,$=K)),P=P.next;while(P!==ne);return Q}function c(B,F){return S(B.prev,B,F.prev)<0&&S(F.next,B,B.next)<0}function g(B,F,P,j){var U=B;do U.z===0&&(U.z=p(U.x,U.y,F,P,j)),U.prevZ=U.prev,U.nextZ=U.next,U=U.next;while(U!==B);U.prevZ.nextZ=null,U.prevZ=null,f(U)}function f(B){var F,P,j,U,Z,Q,re,ne,oe=1;do{for(P=B,B=null,Z=null,Q=0;P;){for(Q++,j=P,re=0,F=0;F0||ne>0&&j;)re!==0&&(ne===0||!j||P.z<=j.z)?(U=P,P=P.nextZ,re--):(U=j,j=j.nextZ,ne--),Z?Z.nextZ=U:B=U,U.prevZ=Z,Z=U;P=j}Z.nextZ=null,oe*=2}while(Q>1);return B}function p(B,F,P,j,U){return B=(B-P)*U|0,F=(F-j)*U|0,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,F=(F|F<<8)&16711935,F=(F|F<<4)&252645135,F=(F|F<<2)&858993459,F=(F|F<<1)&1431655765,B|F<<1}function m(B){var F=B,P=B;do(F.x=(B-Q)*(Z-re)&&(B-Q)*(j-re)>=(P-Q)*(F-re)&&(P-Q)*(Z-re)>=(U-Q)*(j-re)}function T(B,F){return B.next.i!==F.i&&B.prev.i!==F.i&&!h(B,F)&&(u(B,F)&&u(F,B)&&A(B,F)&&(S(B.prev,B,F.prev)||S(B,F.prev,F))||M(B,F)&&S(B.prev,B,B.next)>0&&S(F.prev,F,F.next)>0)}function S(B,F,P){return(F.y-B.y)*(P.x-F.x)-(F.x-B.x)*(P.y-F.y)}function M(B,F){return B.x===F.x&&B.y===F.y}function C(B,F,P,j){var U=w(S(B,F,P)),Z=w(S(B,F,j)),Q=w(S(P,j,B)),re=w(S(P,j,F));return!!(U!==Z&&Q!==re||U===0&&_(B,P,F)||Z===0&&_(B,j,F)||Q===0&&_(P,B,j)||re===0&&_(P,F,j))}function _(B,F,P){return F.x<=Math.max(B.x,P.x)&&F.x>=Math.min(B.x,P.x)&&F.y<=Math.max(B.y,P.y)&&F.y>=Math.min(B.y,P.y)}function w(B){return B>0?1:B<0?-1:0}function h(B,F){var P=B;do{if(P.i!==B.i&&P.next.i!==B.i&&P.i!==F.i&&P.next.i!==F.i&&C(P,P.next,B,F))return!0;P=P.next}while(P!==B);return!1}function u(B,F){return S(B.prev,B,B.next)<0?S(B,F,B.next)>=0&&S(B,B.prev,F)>=0:S(B,F,B.prev)<0||S(B,B.next,F)<0}function A(B,F){var P=B,j=!1,U=(B.x+F.x)/2,Z=(B.y+F.y)/2;do P.y>Z!=P.next.y>Z&&P.next.y!==P.y&&U<(P.next.x-P.x)*(Z-P.y)/(P.next.y-P.y)+P.x&&(j=!j),P=P.next;while(P!==B);return j}function b(B,F){var P=new N(B.i,B.x,B.y),j=new N(F.i,F.x,F.y),U=B.next,Z=F.prev;return B.next=F,F.prev=B,P.next=U,U.prev=P,j.next=P,P.prev=j,Z.next=j,j.prev=Z,j}function z(B,F,P,j){var U=new N(B,F,P);return j?(U.next=j.next,U.prev=j,j.next.prev=U,j.next=U):(U.prev=U,U.next=U),U}function I(B){B.next.prev=B.prev,B.prev.next=B.next,B.prevZ&&(B.prevZ.nextZ=B.nextZ),B.nextZ&&(B.nextZ.prevZ=B.prevZ)}function N(B,F,P){this.i=B,this.x=F,this.y=P,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}v.deviation=function(B,F,P,j){var U=F&&F.length,Z=U?F[0]*P:B.length,Q=Math.abs(R(B,0,Z,P));if(U)for(var re=0,ne=F.length;re0&&(j+=B[U-1].length,P.holes.push(j))}return P}}}),k7=Ee({"node_modules/array-normalize/index.js"(J,H){"use strict";var v=Jv();H.exports=x;function x(E,k,l){if(!E||E.length==null)throw Error("Argument should be an array");k==null&&(k=1),l==null&&(l=v(E,k));for(var e=0;e-1}}}),zw=Ee({"node_modules/es5-ext/string/#/contains/index.js"(J,H){"use strict";H.exports=U7()()?String.prototype.contains:q7()}}),Ed=Ee({"node_modules/d/index.js"(J,H){"use strict";var v=tp(),x=Rw(),E=qy(),k=Fw(),l=zw(),e=H.exports=function(t,n){var r,a,o,s,c;return arguments.length<2||typeof t!="string"?(s=n,n=t,t=null):s=arguments[2],v(t)?(r=l.call(t,"c"),a=l.call(t,"e"),o=l.call(t,"w")):(r=o=!0,a=!1),c={value:n,configurable:r,enumerable:a,writable:o},s?E(k(s),c):c};e.gs=function(t,n,r){var a,o,s,c;return typeof t!="string"?(s=r,r=n,n=t,t=null):s=arguments[3],v(n)?x(n)?v(r)?x(r)||(s=r,r=void 0):r=void 0:(s=n,n=r=void 0):n=void 0,v(t)?(a=l.call(t,"c"),o=l.call(t,"e")):(a=!0,o=!1),c={get:n,set:r,configurable:a,enumerable:o},s?E(k(s),c):c}}}),Bm=Ee({"node_modules/es5-ext/function/is-arguments.js"(J,H){"use strict";var v=Object.prototype.toString,x=v.call(function(){return arguments}());H.exports=function(E){return v.call(E)===x}}}),Nm=Ee({"node_modules/es5-ext/string/is-string.js"(J,H){"use strict";var v=Object.prototype.toString,x=v.call("");H.exports=function(E){return typeof E=="string"||E&&typeof E=="object"&&(E instanceof String||v.call(E)===x)||!1}}}),V7=Ee({"node_modules/ext/global-this/is-implemented.js"(J,H){"use strict";H.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),H7=Ee({"node_modules/ext/global-this/implementation.js"(J,H){var v=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};H.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return v()}try{return __global__||v()}finally{delete Object.prototype.__global__}}()}}),Om=Ee({"node_modules/ext/global-this/index.js"(J,H){"use strict";H.exports=V7()()?globalThis:H7()}}),G7=Ee({"node_modules/es6-symbol/is-implemented.js"(J,H){"use strict";var v=Om(),x={object:!0,symbol:!0};H.exports=function(){var E=v.Symbol,k;if(typeof E!="function")return!1;k=E("test symbol");try{String(k)}catch{return!1}return!(!x[typeof E.iterator]||!x[typeof E.toPrimitive]||!x[typeof E.toStringTag])}}}),W7=Ee({"node_modules/es6-symbol/is-symbol.js"(J,H){"use strict";H.exports=function(v){return v?typeof v=="symbol"?!0:!v.constructor||v.constructor.name!=="Symbol"?!1:v[v.constructor.toStringTag]==="Symbol":!1}}}),Bw=Ee({"node_modules/es6-symbol/validate-symbol.js"(J,H){"use strict";var v=W7();H.exports=function(x){if(!v(x))throw new TypeError(x+" is not a symbol");return x}}}),Y7=Ee({"node_modules/es6-symbol/lib/private/generate-name.js"(J,H){"use strict";var v=Ed(),x=Object.create,E=Object.defineProperty,k=Object.prototype,l=x(null);H.exports=function(e){for(var t=0,n,r;l[e+(t||"")];)++t;return e+=t||"",l[e]=!0,n="@@"+e,E(k,n,v.gs(null,function(a){r||(r=!0,E(this,n,v(a)),r=!1)})),n}}}),X7=Ee({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(J,H){"use strict";var v=Ed(),x=Om().Symbol;H.exports=function(E){return Object.defineProperties(E,{hasInstance:v("",x&&x.hasInstance||E("hasInstance")),isConcatSpreadable:v("",x&&x.isConcatSpreadable||E("isConcatSpreadable")),iterator:v("",x&&x.iterator||E("iterator")),match:v("",x&&x.match||E("match")),replace:v("",x&&x.replace||E("replace")),search:v("",x&&x.search||E("search")),species:v("",x&&x.species||E("species")),split:v("",x&&x.split||E("split")),toPrimitive:v("",x&&x.toPrimitive||E("toPrimitive")),toStringTag:v("",x&&x.toStringTag||E("toStringTag")),unscopables:v("",x&&x.unscopables||E("unscopables"))})}}}),$7=Ee({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(J,H){"use strict";var v=Ed(),x=Bw(),E=Object.create(null);H.exports=function(k){return Object.defineProperties(k,{for:v(function(l){return E[l]?E[l]:E[l]=k(String(l))}),keyFor:v(function(l){var e;x(l);for(e in E)if(E[e]===l)return e})})}}}),Z7=Ee({"node_modules/es6-symbol/polyfill.js"(J,H){"use strict";var v=Ed(),x=Bw(),E=Om().Symbol,k=Y7(),l=X7(),e=$7(),t=Object.create,n=Object.defineProperties,r=Object.defineProperty,a,o,s;if(typeof E=="function")try{String(E()),s=!0}catch{}else E=null;o=function(g){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return a(g)},H.exports=a=function c(g){var f;if(this instanceof c)throw new TypeError("Symbol is not a constructor");return s?E(g):(f=t(o.prototype),g=g===void 0?"":String(g),n(f,{__description__:v("",g),__name__:v("",k(g))}))},l(a),e(a),n(o.prototype,{constructor:v(a),toString:v("",function(){return this.__name__})}),n(a.prototype,{toString:v(function(){return"Symbol ("+x(this).__description__+")"}),valueOf:v(function(){return x(this)})}),r(a.prototype,a.toPrimitive,v("",function(){var c=x(this);return typeof c=="symbol"?c:c.toString()})),r(a.prototype,a.toStringTag,v("c","Symbol")),r(o.prototype,a.toStringTag,v("c",a.prototype[a.toStringTag])),r(o.prototype,a.toPrimitive,v("c",a.prototype[a.toPrimitive]))}}),uv=Ee({"node_modules/es6-symbol/index.js"(J,H){"use strict";H.exports=G7()()?Om().Symbol:Z7()}}),K7=Ee({"node_modules/es5-ext/array/#/clear.js"(J,H){"use strict";var v=Sd();H.exports=function(){return v(this).length=0,this}}}),c0=Ee({"node_modules/es5-ext/object/valid-callable.js"(J,H){"use strict";H.exports=function(v){if(typeof v!="function")throw new TypeError(v+" is not a function");return v}}}),J7=Ee({"node_modules/type/string/coerce.js"(J,H){"use strict";var v=tp(),x=Iw(),E=Object.prototype.toString;H.exports=function(k){if(!v(k))return null;if(x(k)){var l=k.toString;if(typeof l!="function"||l===E)return null}try{return""+k}catch{return null}}}}),Q7=Ee({"node_modules/type/lib/safe-to-string.js"(J,H){"use strict";H.exports=function(v){try{return v.toString()}catch{try{return String(v)}catch{return null}}}}}),e9=Ee({"node_modules/type/lib/to-short-string.js"(J,H){"use strict";var v=Q7(),x=/[\n\r\u2028\u2029]/g;H.exports=function(E){var k=v(E);return k===null?"":(k.length>100&&(k=k.slice(0,99)+"\u2026"),k=k.replace(x,function(l){switch(l){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),k)}}}),t9=Ee({"node_modules/type/lib/resolve-error-message.js"(J,H){"use strict";var v=J7(),x=e9();H.exports=function(E,k,l){l&&l.errorMessage&&(E=v(l.errorMessage));var e=E.indexOf("%v"),t=e>-1?x(k):null;if(l&&l.name){var n=E.indexOf("%n");if(n>-1){if(e>-1){var r,a,o,s;return n>e?(r=t,o=e,a=l.name,s=n):(r=l.name,o=n,a=t,s=e),E.slice(0,o)+r+E.slice(o+2,s)+a+E.slice(s+2)}return E.slice(0,n)+l.name+E.slice(n+2)}}return e>-1?E.slice(0,e)+t+E.slice(e+2):E}}}),Nw=Ee({"node_modules/type/lib/resolve-exception.js"(J,H){"use strict";var v=tp(),x=t9();H.exports=function(E,k,l){if(l&&!v(E)){if("default"in l)return l.default;if(l.isOptional)return null}var e=l&&l.Error||TypeError,t=new e(x(k,E,l));throw l&&l.errorCode&&(t.code=l.errorCode),t}}}),r9=Ee({"node_modules/type/value/ensure.js"(J,H){"use strict";var v=Nw(),x=tp();H.exports=function(E){if(x(E))return E;var k=arguments[1],l=k&&k.name?"Expected a value for %n, received %v":"Cannot use %v";return v(E,l,k)}}}),a9=Ee({"node_modules/type/plain-function/ensure.js"(J,H){"use strict";var v=Nw(),x=Rw();H.exports=function(E){if(x(E))return E;var k=arguments[1],l=k&&k.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return v(E,l,k)}}}),n9=Ee({"node_modules/es5-ext/array/from/is-implemented.js"(J,H){"use strict";H.exports=function(){var v=Array.from,x,E;return typeof v!="function"?!1:(x=["raz","dwa"],E=v(x),!!(E&&E!==x&&E[1]==="dwa"))}}}),i9=Ee({"node_modules/es5-ext/function/is-function.js"(J,H){"use strict";var v=Object.prototype.toString,x=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);H.exports=function(E){return typeof E=="function"&&x(v.call(E))}}}),o9=Ee({"node_modules/es5-ext/math/sign/is-implemented.js"(J,H){"use strict";H.exports=function(){var v=Math.sign;return typeof v!="function"?!1:v(10)===1&&v(-20)===-1}}}),s9=Ee({"node_modules/es5-ext/math/sign/shim.js"(J,H){"use strict";H.exports=function(v){return v=Number(v),isNaN(v)||v===0?v:v>0?1:-1}}}),l9=Ee({"node_modules/es5-ext/math/sign/index.js"(J,H){"use strict";H.exports=o9()()?Math.sign:s9()}}),u9=Ee({"node_modules/es5-ext/number/to-integer.js"(J,H){"use strict";var v=l9(),x=Math.abs,E=Math.floor;H.exports=function(k){return isNaN(k)?0:(k=Number(k),k===0||!isFinite(k)?k:v(k)*E(x(k)))}}}),c9=Ee({"node_modules/es5-ext/number/to-pos-integer.js"(J,H){"use strict";var v=u9(),x=Math.max;H.exports=function(E){return x(0,v(E))}}}),f9=Ee({"node_modules/es5-ext/array/from/shim.js"(J,H){"use strict";var v=uv().iterator,x=Bm(),E=i9(),k=c9(),l=c0(),e=Sd(),t=lv(),n=Nm(),r=Array.isArray,a=Function.prototype.call,o={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;H.exports=function(c){var g=arguments[1],f=arguments[2],p,m,i,T,S,M,C,_,w,h;if(c=Object(e(c)),t(g)&&l(g),!this||this===Array||!E(this)){if(!g){if(x(c))return S=c.length,S!==1?Array.apply(null,c):(T=new Array(1),T[0]=c[0],T);if(r(c)){for(T=new Array(S=c.length),m=0;m=55296&&M<=56319&&(h+=c[++m])),h=g?a.call(g,f,h,i):h,p?(o.value=h,s(T,i,o)):T[i]=h,++i;S=i}}if(S===void 0)for(S=k(c.length),p&&(T=new p(S)),m=0;m=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){n(this,"__redo__",l("c",[o]));return}this.__redo__.forEach(function(s,c){s>=o&&(this.__redo__[c]=++s)},this),this.__redo__.push(o)}}),_onDelete:l(function(o){var s;o>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(s=this.__redo__.indexOf(o),s!==-1&&this.__redo__.splice(s,1),this.__redo__.forEach(function(c,g){c>o&&(this.__redo__[g]=--c)},this)))}),_onClear:l(function(){this.__redo__&&v.call(this.__redo__),this.__nextIndex__=0})}))),n(a.prototype,t.iterator,l(function(){return this}))}}),y9=Ee({"node_modules/es6-iterator/array.js"(J,H){"use strict";var v=Uy(),x=zw(),E=Ed(),k=uv(),l=Ow(),e=Object.defineProperty,t;t=H.exports=function(n,r){if(!(this instanceof t))throw new TypeError("Constructor requires 'new'");l.call(this,n),r?x.call(r,"key+value")?r="key+value":x.call(r,"key")?r="key":r="value":r="value",e(this,"__kind__",E("",r))},v&&v(t,l),delete t.prototype.constructor,t.prototype=Object.create(l.prototype,{_resolve:E(function(n){return this.__kind__==="value"?this.__list__[n]:this.__kind__==="key+value"?[n,this.__list__[n]]:n})}),e(t.prototype,k.toStringTag,E("c","Array Iterator"))}}),_9=Ee({"node_modules/es6-iterator/string.js"(J,H){"use strict";var v=Uy(),x=Ed(),E=uv(),k=Ow(),l=Object.defineProperty,e;e=H.exports=function(t){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");t=String(t),k.call(this,t),l(this,"__length__",x("",t.length))},v&&v(e,k),delete e.prototype.constructor,e.prototype=Object.create(k.prototype,{_next:x(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?n+this.__list__[this.__nextIndex__++]:n)})}),l(e.prototype,E.toStringTag,x("c","String Iterator"))}}),b9=Ee({"node_modules/es6-iterator/is-iterable.js"(J,H){"use strict";var v=Bm(),x=lv(),E=Nm(),k=uv().iterator,l=Array.isArray;H.exports=function(e){return x(e)?l(e)||E(e)||v(e)?!0:typeof e[k]=="function":!1}}}),x9=Ee({"node_modules/es6-iterator/valid-iterable.js"(J,H){"use strict";var v=b9();H.exports=function(x){if(!v(x))throw new TypeError(x+" is not iterable");return x}}}),jw=Ee({"node_modules/es6-iterator/get.js"(J,H){"use strict";var v=Bm(),x=Nm(),E=y9(),k=_9(),l=x9(),e=uv().iterator;H.exports=function(t){return typeof l(t)[e]=="function"?t[e]():v(t)?new E(t):x(t)?new k(t):new E(t)}}}),w9=Ee({"node_modules/es6-iterator/for-of.js"(J,H){"use strict";var v=Bm(),x=c0(),E=Nm(),k=jw(),l=Array.isArray,e=Function.prototype.call,t=Array.prototype.some;H.exports=function(n,r){var a,o=arguments[2],s,c,g,f,p,m,i;if(l(n)||v(n)?a="array":E(n)?a="string":n=k(n),x(r),c=function(){g=!0},a==="array"){t.call(n,function(T){return e.call(r,o,T,c),g});return}if(a==="string"){for(p=n.length,f=0;f=55296&&i<=56319&&(m+=n[++f])),e.call(r,o,m,c),!g);++f);return}for(s=n.next();!s.done;){if(e.call(r,o,s.value,c),g)return;s=n.next()}}}}),T9=Ee({"node_modules/es6-weak-map/is-native-implemented.js"(J,H){"use strict";H.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}}),A9=Ee({"node_modules/es6-weak-map/polyfill.js"(J,H){"use strict";var v=lv(),x=Uy(),E=D7(),k=Sd(),l=I7(),e=Ed(),t=jw(),n=w9(),r=uv().toStringTag,a=T9(),o=Array.isArray,s=Object.defineProperty,c=Object.prototype.hasOwnProperty,g=Object.getPrototypeOf,f;H.exports=f=function(){var p=arguments[0],m;if(!(this instanceof f))throw new TypeError("Constructor requires 'new'");return m=a&&x&&WeakMap!==f?x(new WeakMap,g(this)):this,v(p)&&(o(p)||(p=t(p))),s(m,"__weakMapData__",e("c","$weakMap$"+l())),p&&n(p,function(i){k(i),m.set(i[0],i[1])}),m},a&&(x&&x(f,WeakMap),f.prototype=Object.create(WeakMap.prototype,{constructor:e(f)})),Object.defineProperties(f.prototype,{delete:e(function(p){return c.call(E(p),this.__weakMapData__)?(delete p[this.__weakMapData__],!0):!1}),get:e(function(p){if(c.call(E(p),this.__weakMapData__))return p[this.__weakMapData__]}),has:e(function(p){return c.call(E(p),this.__weakMapData__)}),set:e(function(p,m){return s(E(p),this.__weakMapData__,e("c",m)),this}),toString:e(function(){return"[object WeakMap]"})}),s(f.prototype,r,e("c","WeakMap"))}}),Uw=Ee({"node_modules/es6-weak-map/index.js"(J,H){"use strict";H.exports=C7()()?WeakMap:A9()}}),M9=Ee({"node_modules/array-find-index/index.js"(J,H){"use strict";H.exports=function(v,x,E){if(typeof Array.prototype.findIndex=="function")return v.findIndex(x,E);if(typeof x!="function")throw new TypeError("predicate must be a function");var k=Object(v),l=k.length;if(l===0)return-1;for(var e=0;eA.join==="round"?2:1,miterLimit:S.prop("miterLimit"),scale:S.prop("scale"),scaleFract:S.prop("scaleFract"),translateFract:S.prop("translateFract"),translate:S.prop("translate"),thickness:S.prop("thickness"),dashTexture:S.prop("dashTexture"),opacity:S.prop("opacity"),pixelRatio:S.context("pixelRatio"),id:S.prop("id"),dashLength:S.prop("dashLength"),viewport:(u,A)=>[A.viewport.x,A.viewport.y,u.viewportWidth,u.viewportHeight],depth:S.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(u,A)=>!A.overlay},stencil:{enable:!1},scissor:{enable:!0,box:S.prop("viewport")},viewport:S.prop("viewport")},_=S(E({vert:c,frag:m,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:S.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},C)),T;try{T=S(E({cull:{enable:!0,face:"back"},vert:g,frag:i,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aColor:{buffer:S.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:S.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},C))}catch{T=_}return{fill:S({primitive:"triangle",elements:(u,A)=>A.triangles,offset:0,vert:h,frag:p,uniforms:{scale:S.prop("scale"),color:S.prop("fill"),scaleFract:S.prop("scaleFract"),translateFract:S.prop("translateFract"),translate:S.prop("translate"),opacity:S.prop("opacity"),pixelRatio:S.context("pixelRatio"),id:S.prop("id"),viewport:(u,A)=>[A.viewport.x,A.viewport.y,u.viewportWidth,u.viewportHeight]},attributes:{position:{buffer:S.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:8}},blend:C.blend,depth:{enable:!1},scissor:C.scissor,stencil:C.stencil,viewport:C.viewport}),rect:_,miter:T}},w.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},w.prototype.render=function(...S){S.length&&this.update(...S),this.draw()},w.prototype.draw=function(...S){return(S.length?S:this.passes).forEach((M,C)=>{if(M&&Array.isArray(M))return this.draw(...M);typeof M=="number"&&(M=this.passes[M]),M&&M.count>1&&M.opacity&&(this.regl._refresh(),M.fill&&M.triangles&&M.triangles.length>2&&this.shaders.fill(M),M.thickness&&(M.scale[0]*M.viewport.width>w.precisionThreshold||M.scale[1]*M.viewport.height>w.precisionThreshold?this.shaders.rect(M):M.join==="rect"||!M.join&&(M.thickness<=2||M.count>=w.maxPoints)?this.shaders.rect(M):this.shaders.miter(M)))}),this},w.prototype.update=function(S){if(!S)return;S.length!=null?typeof S[0]=="number"&&(S=[{positions:S}]):Array.isArray(S)||(S=[S]);let{regl:M,gl:C}=this;if(S.forEach((T,f)=>{let u=this.passes[f];if(T!==void 0){if(T===null){this.passes[f]=null;return}if(typeof T[0]=="number"&&(T={positions:T}),T=k(T,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),u||(this.passes[f]=u={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:M.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:M.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},T=E({},w.defaults,T)),T.thickness!=null&&(u.thickness=parseFloat(T.thickness)),T.opacity!=null&&(u.opacity=parseFloat(T.opacity)),T.miterLimit!=null&&(u.miterLimit=parseFloat(T.miterLimit)),T.overlay!=null&&(u.overlay=!!T.overlay,fae-oe),Z=[],Q=0,re=u.hole!=null?u.hole[0]:null;if(re!=null){let ae=s(U,oe=>oe>=re);U=U.slice(0,ae),U.push(re)}for(let ae=0;aeK-re+(U[ae]-Q)),X=e(oe,H);X=X.map(K=>K+Q+(K+Q{S.colorBuffer.destroy(),S.positionBuffer.destroy(),S.dashTexture.destroy()}),this.passes.length=0,this}}}),S9=Ee({"node_modules/regl-error2d/index.js"(J,V){"use strict";var v=Jv(),x=zm(),E=kw(),k=Jh(),l=Lc(),e=Qv(),{float32:t,fract32:a}=jy();V.exports=n;var r=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function n(o,s){if(typeof o=="function"?(s||(s={}),s.regl=o):s=o,s.length&&(s.positions=s),o=s.regl,!o.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let c=o._gl,m,h,p,g,i,w,S={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},M=[];return g=o.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),h=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),i=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),w=o.buffer({usage:"static",type:"float",data:r}),f(s),m=o({vert:` +`;H.exports=T;function T(S,M){if(!(this instanceof T))return new T(S,M);if(typeof S=="function"?(M||(M={}),M.regl=S):M=S,M.length&&(M.positions=M),S=M.regl,!S.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=S._gl,this.regl=S,this.passes=[],this.shaders=T.shaders.has(S)?T.shaders.get(S):T.shaders.set(S,T.createShaders(S)).get(S),this.update(M)}T.dashMult=2,T.maxPatternLength=256,T.precisionThreshold=3e6,T.maxPoints=1e4,T.maxLines=2048,T.shaders=new a,T.createShaders=function(S){let M=S.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),C={primitive:"triangle strip",instances:S.prop("count"),count:4,offset:0,uniforms:{miterMode:(u,A)=>A.join==="round"?2:1,miterLimit:S.prop("miterLimit"),scale:S.prop("scale"),scaleFract:S.prop("scaleFract"),translateFract:S.prop("translateFract"),translate:S.prop("translate"),thickness:S.prop("thickness"),dashTexture:S.prop("dashTexture"),opacity:S.prop("opacity"),pixelRatio:S.context("pixelRatio"),id:S.prop("id"),dashLength:S.prop("dashLength"),viewport:(u,A)=>[A.viewport.x,A.viewport.y,u.viewportWidth,u.viewportHeight],depth:S.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(u,A)=>!A.overlay},stencil:{enable:!1},scissor:{enable:!0,box:S.prop("viewport")},viewport:S.prop("viewport")},_=S(E({vert:c,frag:g,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:S.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},C)),w;try{w=S(E({cull:{enable:!0,face:"back"},vert:m,frag:i,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aColor:{buffer:S.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:S.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},C))}catch{w=_}return{fill:S({primitive:"triangle",elements:(u,A)=>A.triangles,offset:0,vert:f,frag:p,uniforms:{scale:S.prop("scale"),color:S.prop("fill"),scaleFract:S.prop("scaleFract"),translateFract:S.prop("translateFract"),translate:S.prop("translate"),opacity:S.prop("opacity"),pixelRatio:S.context("pixelRatio"),id:S.prop("id"),viewport:(u,A)=>[A.viewport.x,A.viewport.y,u.viewportWidth,u.viewportHeight]},attributes:{position:{buffer:S.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:8}},blend:C.blend,depth:{enable:!1},scissor:C.scissor,stencil:C.stencil,viewport:C.viewport}),rect:_,miter:w}},T.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},T.prototype.render=function(...S){S.length&&this.update(...S),this.draw()},T.prototype.draw=function(...S){return(S.length?S:this.passes).forEach((M,C)=>{if(M&&Array.isArray(M))return this.draw(...M);typeof M=="number"&&(M=this.passes[M]),M&&M.count>1&&M.opacity&&(this.regl._refresh(),M.fill&&M.triangles&&M.triangles.length>2&&this.shaders.fill(M),M.thickness&&(M.scale[0]*M.viewport.width>T.precisionThreshold||M.scale[1]*M.viewport.height>T.precisionThreshold?this.shaders.rect(M):M.join==="rect"||!M.join&&(M.thickness<=2||M.count>=T.maxPoints)?this.shaders.rect(M):this.shaders.miter(M)))}),this},T.prototype.update=function(S){if(!S)return;S.length!=null?typeof S[0]=="number"&&(S=[{positions:S}]):Array.isArray(S)||(S=[S]);let{regl:M,gl:C}=this;if(S.forEach((w,h)=>{let u=this.passes[h];if(w!==void 0){if(w===null){this.passes[h]=null;return}if(typeof w[0]=="number"&&(w={positions:w}),w=k(w,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),u||(this.passes[h]=u={id:h,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:M.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:M.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},w=E({},T.defaults,w)),w.thickness!=null&&(u.thickness=parseFloat(w.thickness)),w.opacity!=null&&(u.opacity=parseFloat(w.opacity)),w.miterLimit!=null&&(u.miterLimit=parseFloat(w.miterLimit)),w.overlay!=null&&(u.overlay=!!w.overlay,hne-oe),Z=[],Q=0,re=u.hole!=null?u.hole[0]:null;if(re!=null){let ne=s(U,oe=>oe>=re);U=U.slice(0,ne),U.push(re)}for(let ne=0;neK-re+(U[ne]-Q)),$=e(oe,V);$=$.map(K=>K+Q+(K+Q{S.colorBuffer.destroy(),S.positionBuffer.destroy(),S.dashTexture.destroy()}),this.passes.length=0,this}}}),S9=Ee({"node_modules/regl-error2d/index.js"(J,H){"use strict";var v=Jv(),x=zm(),E=kw(),k=Jh(),l=Lc(),e=Qv(),{float32:t,fract32:n}=jy();H.exports=a;var r=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function a(o,s){if(typeof o=="function"?(s||(s={}),s.regl=o):s=o,s.length&&(s.positions=s),o=s.regl,!o.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let c=o._gl,g,f,p,m,i,T,S={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},M=[];return m=o.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),f=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),i=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),T=o.buffer({usage:"static",type:"float",data:r}),h(s),g=o({vert:` precision highp float; attribute vec2 position, positionFract; @@ -2615,10 +2615,10 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } - `,uniforms:{range:o.prop("range"),lineWidth:o.prop("lineWidth"),capSize:o.prop("capSize"),opacity:o.prop("opacity"),scale:o.prop("scale"),translate:o.prop("translate"),scaleFract:o.prop("scaleFract"),translateFract:o.prop("translateFract"),viewport:(A,b)=>[b.viewport.x,b.viewport.y,A.viewportWidth,A.viewportHeight]},attributes:{color:{buffer:g,offset:(A,b)=>b.offset*4,divisor:1},position:{buffer:h,offset:(A,b)=>b.offset*8,divisor:1},positionFract:{buffer:p,offset:(A,b)=>b.offset*8,divisor:1},error:{buffer:i,offset:(A,b)=>b.offset*16,divisor:1},direction:{buffer:w,stride:24,offset:0},lineOffset:{buffer:w,stride:24,offset:8},capOffset:{buffer:w,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:o.prop("viewport")},viewport:o.prop("viewport"),stencil:!1,instances:o.prop("count"),count:r.length}),l(C,{update:f,draw:_,destroy:u,regl:o,gl:c,canvas:c.canvas,groups:M}),C;function C(A){A?f(A):A===null&&u(),_()}function _(A){if(typeof A=="number")return T(A);A&&!Array.isArray(A)&&(A=[A]),o._refresh(),M.forEach((b,z)=>{if(b){if(A&&(A[z]?b.draw=!0:b.draw=!1),!b.draw){b.draw=!0;return}T(z)}})}function T(A){typeof A=="number"&&(A=M[A]),A!=null&&A&&A.count&&A.color&&A.opacity&&A.positions&&A.positions.length>1&&(A.scaleRatio=[A.scale[0]*A.viewport.width,A.scale[1]*A.viewport.height],m(A),A.after&&A.after(A))}function f(A){if(!A)return;A.length!=null?typeof A[0]=="number"&&(A=[{positions:A}]):Array.isArray(A)||(A=[A]);let b=0,z=0;if(C.groups=M=A.map((R,B)=>{let F=M[B];if(R)typeof R=="function"?R={after:R}:typeof R[0]=="number"&&(R={positions:R});else return F;return R=k(R,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),F||(M[B]=F={id:B,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},R=l({},S,R)),E(F,R,[{lineWidth:P=>+P*.5,capSize:P=>+P*.5,opacity:parseFloat,errors:P=>(P=e(P),z+=P.length,P),positions:(P,j)=>(P=e(P,"float64"),j.count=Math.floor(P.length/2),j.bounds=v(P,2),j.offset=b,b+=j.count,P)},{color:(P,j)=>{let U=j.count;if(P||(P="transparent"),!Array.isArray(P)||typeof P[0]=="number"){let Q=P;P=Array(U);for(let re=0;re{let Z=j.bounds;return P||(P=Z),j.scale=[1/(P[2]-P[0]),1/(P[3]-P[1])],j.translate=[-P[0],-P[1]],j.scaleFract=a(j.scale),j.translateFract=a(j.translate),P},viewport:P=>{let j;return Array.isArray(P)?j={x:P[0],y:P[1],width:P[2]-P[0],height:P[3]-P[1]}:P?(j={x:P.x||P.left||0,y:P.y||P.top||0},P.right?j.width=P.right-j.x:j.width=P.w||P.width||0,P.bottom?j.height=P.bottom-j.y:j.height=P.h||P.height||0):j={x:0,y:0,width:c.drawingBufferWidth,height:c.drawingBufferHeight},j}}]),F}),b||z){let R=M.reduce((j,U,Z)=>j+(U?U.count:0),0),B=new Float64Array(R*2),F=new Uint8Array(R*4),P=new Float32Array(R*4);M.forEach((j,U)=>{if(!j)return;let{positions:Z,count:Q,offset:re,color:ae,errors:oe}=j;Q&&(F.set(ae,re*4),P.set(oe,re*4),B.set(Z,re*2))});var I=t(B);h(I);var N=a(B,I);p(N),g(F),i(P)}}function u(){h.destroy(),p.destroy(),g.destroy(),i.destroy(),w.destroy()}}}}),E9=Ee({"node_modules/unquote/index.js"(J,V){var v=/[\'\"]/;V.exports=function(E){return E?(v.test(E.charAt(0))&&(E=E.substr(1)),v.test(E.charAt(E.length-1))&&(E=E.substr(0,E.length-1)),E):""}}}),Vw=Ee({"node_modules/css-global-keywords/index.json"(J,V){V.exports=["inherit","initial","unset"]}}),Hw=Ee({"node_modules/css-system-font-keywords/index.json"(J,V){V.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),Gw=Ee({"node_modules/css-font-weight-keywords/index.json"(J,V){V.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),Ww=Ee({"node_modules/css-font-style-keywords/index.json"(J,V){V.exports=["normal","italic","oblique"]}}),Yw=Ee({"node_modules/css-font-stretch-keywords/index.json"(J,V){V.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),k9=Ee({"node_modules/parenthesis/index.js"(J,V){"use strict";function v(k,l){if(typeof k!="string")return[k];var e=[k];typeof l=="string"||Array.isArray(l)?l={brackets:l}:l||(l={});var t=l.brackets?Array.isArray(l.brackets)?l.brackets:[l.brackets]:["{}","[]","()"],a=l.escape||"___",r=!!l.flat;t.forEach(function(s){var c=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),m=[];function h(p,g,i){var w=e.push(p.slice(s[0].length,-s[1].length))-1;return m.push(w),a+w+a}e.forEach(function(p,g){for(var i,w=0;p!=i;)if(i=p,p=p.replace(c,h),w++>1e4)throw Error("References have circular dependency. Please, check them.");e[g]=p}),m=m.reverse(),e=e.map(function(p){return m.forEach(function(g){p=p.replace(new RegExp("(\\"+a+g+"\\"+a+")","g"),s[0]+"$1"+s[1])}),p})});var n=new RegExp("\\"+a+"([0-9]+)\\"+a);function o(s,c,m){for(var h=[],p,g=0;p=n.exec(s);){if(g++>1e4)throw Error("Circular references in parenthesis");h.push(s.slice(0,p.index)),h.push(o(c[p[1]],c)),s=s.slice(p.index+p[0].length)}return h.push(s),h}return r?e:o(e[0],e)}function x(k,l){if(l&&l.flat){var e=l&&l.escape||"___",t=k[0],a;if(!t)return"";for(var r=new RegExp("\\"+e+"([0-9]+)\\"+e),n=0;t!=a;){if(n++>1e4)throw Error("Circular references in "+k);a=t,t=t.replace(r,o)}return t}return k.reduce(function s(c,m){return Array.isArray(m)&&(m=m.reduce(s,"")),c+m},"");function o(s,c){if(k[c]==null)throw Error("Reference "+c+"is undefined");return k[c]}}function E(k,l){return Array.isArray(k)?x(k,l):v(k,l)}E.parse=v,E.stringify=x,V.exports=E}}),C9=Ee({"node_modules/string-split-by/index.js"(J,V){"use strict";var v=k9();V.exports=function(E,k,l){if(E==null)throw Error("First argument should be a string");if(k==null)throw Error("Separator should be a string or a RegExp");l?(typeof l=="string"||Array.isArray(l))&&(l={ignore:l}):l={},l.escape==null&&(l.escape=!0),l.ignore==null?l.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof l.ignore=="string"&&(l.ignore=[l.ignore]),l.ignore=l.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var e=v.parse(E,{flat:!0,brackets:l.ignore}),t=e[0],a=t.split(k);if(l.escape){for(var r=[],n=0;n1&&Rt===qt&&(Rt==='"'||Rt==="'"))return['"'+t(it.substr(1,it.length-2))+'"'];var or=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(it);if(or)return a(it.substr(0,or.index)).concat(a(or[1])).concat(a(it.substr(or.index+or[0].length)));var vr=it.split(".");if(vr.length===1)return['"'+t(it)+'"'];for(var Ar=[],dr=0;dr"u"?1:window.devicePixelRatio,cn=!1,Nn={},Dn=function(vn){},qn=function(){};if(typeof Rt=="string"?qt=document.querySelector(Rt):typeof Rt=="object"&&(w(Rt)?qt=Rt:S(Rt)?(Ar=Rt,vr=Ar.canvas):("gl"in Rt?Ar=Rt.gl:"canvas"in Rt?vr=C(Rt.canvas):"container"in Rt&&(or=C(Rt.container)),"attributes"in Rt&&(dr=Rt.attributes),"extensions"in Rt&&(mr=M(Rt.extensions)),"optionalExtensions"in Rt&&(qr=M(Rt.optionalExtensions)),"onDone"in Rt&&(Dn=Rt.onDone),"profile"in Rt&&(cn=!!Rt.profile),"pixelRatio"in Rt&&(Lr=+Rt.pixelRatio),"cachedCode"in Rt&&(Nn=Rt.cachedCode))),qt&&(qt.nodeName.toLowerCase()==="canvas"?vr=qt:or=qt),!Ar){if(!vr){var _n=g(or||document.body,Dn,Lr);if(!_n)return null;vr=_n.canvas,qn=_n.onDestroy}dr.premultipliedAlpha===void 0&&(dr.premultipliedAlpha=!0),Ar=i(vr,dr)}return Ar?{gl:Ar,canvas:vr,container:or,extensions:mr,optionalExtensions:qr,pixelRatio:Lr,profile:cn,cachedCode:Nn,onDone:Dn,onDestroy:qn}:(qn(),Dn("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function T(it,Rt){var qt={};function or(dr){var mr=dr.toLowerCase(),qr;try{qr=qt[mr]=it.getExtension(mr)}catch{}return!!qr}for(var vr=0;vr65535)<<4,it>>>=Rt,qt=(it>255)<<3,it>>>=qt,Rt|=qt,qt=(it>15)<<2,it>>>=qt,Rt|=qt,qt=(it>3)<<1,it>>>=qt,Rt|=qt,Rt|it>>1}function P(){var it=f(8,function(){return[]});function Rt(Ar){var dr=B(Ar),mr=it[F(dr)>>2];return mr.length>0?mr.pop():new ArrayBuffer(dr)}function qt(Ar){it[F(Ar.byteLength)>>2].push(Ar)}function or(Ar,dr){var mr=null;switch(Ar){case u:mr=new Int8Array(Rt(dr),0,dr);break;case A:mr=new Uint8Array(Rt(dr),0,dr);break;case b:mr=new Int16Array(Rt(2*dr),0,dr);break;case z:mr=new Uint16Array(Rt(2*dr),0,dr);break;case I:mr=new Int32Array(Rt(4*dr),0,dr);break;case N:mr=new Uint32Array(Rt(4*dr),0,dr);break;case R:mr=new Float32Array(Rt(4*dr),0,dr);break;default:return null}return mr.length!==dr?mr.subarray(0,dr):mr}function vr(Ar){qt(Ar.buffer)}return{alloc:Rt,free:qt,allocType:or,freeType:vr}}var j=P();j.zero=P();var U=3408,Z=3410,Q=3411,re=3412,ae=3413,oe=3414,H=3415,X=33901,K=33902,G=3379,Y=3386,q=34921,$=36347,ee=36348,ne=35661,fe=35660,ye=34930,xe=36349,Ae=34076,Me=34024,Ie=7936,Ue=7937,qe=7938,ke=35724,ge=34047,ue=36063,ve=34852,se=3553,Te=34067,Fe=34069,We=33984,Ge=6408,gt=5126,mt=5121,Tt=36160,At=36053,Kt=36064,nr=16384,_r=function(it,Rt){var qt=1;Rt.ext_texture_filter_anisotropic&&(qt=it.getParameter(ge));var or=1,vr=1;Rt.webgl_draw_buffers&&(or=it.getParameter(ve),vr=it.getParameter(ue));var Ar=!!Rt.oes_texture_float;if(Ar){var dr=it.createTexture();it.bindTexture(se,dr),it.texImage2D(se,0,Ge,1,1,0,Ge,gt,null);var mr=it.createFramebuffer();if(it.bindFramebuffer(Tt,mr),it.framebufferTexture2D(Tt,Kt,se,dr,0),it.bindTexture(se,null),it.checkFramebufferStatus(Tt)!==At)Ar=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(nr);var qr=j.allocType(gt,4);it.readPixels(0,0,1,1,Ge,gt,qr),it.getError()?Ar=!1:(it.deleteFramebuffer(mr),it.deleteTexture(dr),Ar=qr[0]===1),j.freeType(qr)}}var Lr=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),cn=!0;if(!Lr){var Nn=it.createTexture(),Dn=j.allocType(mt,36);it.activeTexture(We),it.bindTexture(Te,Nn),it.texImage2D(Fe,0,Ge,3,3,0,Ge,mt,Dn),j.freeType(Dn),it.bindTexture(Te,null),it.deleteTexture(Nn),cn=!it.getError()}return{colorBits:[it.getParameter(Z),it.getParameter(Q),it.getParameter(re),it.getParameter(ae)],depthBits:it.getParameter(oe),stencilBits:it.getParameter(H),subpixelBits:it.getParameter(U),extensions:Object.keys(Rt).filter(function(qn){return!!Rt[qn]}),maxAnisotropic:qt,maxDrawbuffers:or,maxColorAttachments:vr,pointSizeDims:it.getParameter(X),lineWidthDims:it.getParameter(K),maxViewportDims:it.getParameter(Y),maxCombinedTextureUnits:it.getParameter(ne),maxCubeMapSize:it.getParameter(Ae),maxRenderbufferSize:it.getParameter(Me),maxTextureUnits:it.getParameter(ye),maxTextureSize:it.getParameter(G),maxAttributes:it.getParameter(q),maxVertexUniforms:it.getParameter($),maxVertexTextureUnits:it.getParameter(fe),maxVaryingVectors:it.getParameter(ee),maxFragmentUniforms:it.getParameter(xe),glsl:it.getParameter(ke),renderer:it.getParameter(Ue),vendor:it.getParameter(Ie),version:it.getParameter(qe),readFloat:Ar,npotTextureCube:cn}},Zt=function(it){return it instanceof Uint8Array||it instanceof Uint16Array||it instanceof Uint32Array||it instanceof Int8Array||it instanceof Int16Array||it instanceof Int32Array||it instanceof Float32Array||it instanceof Float64Array||it instanceof Uint8ClampedArray};function sr(it){return!!it&&typeof it=="object"&&Array.isArray(it.shape)&&Array.isArray(it.stride)&&typeof it.offset=="number"&&it.shape.length===it.stride.length&&(Array.isArray(it.data)||Zt(it.data))}var Ot=function(it){return Object.keys(it).map(function(Rt){return it[Rt]})},vt={shape:Ze,flatten:$e};function ht(it,Rt,qt){for(var or=0;or0){var Si;if(Array.isArray(Sn[0])){$a=fr(Sn);for(var Ma=1,xa=1;xa<$a.length;++xa)Ma*=$a[xa];vn.dimension=Ma,Si=cr(Sn,$a,vn.dtype),cn(vn,Si,Tn),Ha?vn.persistentData=Si:j.freeType(Si)}else if(typeof Sn[0]=="number"){vn.dimension=$n;var gi=j.allocType(vn.dtype,Sn.length);Aa(gi,Sn),cn(vn,gi,Tn),Ha?vn.persistentData=gi:j.freeType(gi)}else Zt(Sn[0])&&(vn.dimension=Sn[0].length,vn.dtype=Xn||jn(Sn[0])||wn,Si=cr(Sn,[Sn.length,Sn[0].length],vn.dtype),cn(vn,Si,Tn),Ha?vn.persistentData=Si:j.freeType(Si))}}else if(Zt(Sn))vn.dtype=Xn||jn(Sn),vn.dimension=$n,cn(vn,Sn,Tn),Ha&&(vn.persistentData=new Uint8Array(new Uint8Array(Sn.buffer)));else if(sr(Sn)){$a=Sn.shape;var Wa=Sn.stride,Ya=Sn.offset,Xa=0,pi=0,Xi=0,Eo=0;$a.length===1?(Xa=$a[0],pi=1,Xi=Wa[0],Eo=0):$a.length===2&&(Xa=$a[0],pi=$a[1],Xi=Wa[0],Eo=Wa[1]),vn.dtype=Xn||jn(Sn.data)||wn,vn.dimension=pi;var yi=j.allocType(vn.dtype,Xa*pi);ua(yi,Sn.data,Xa,pi,Xi,Eo,Ya),cn(vn,yi,Tn),Ha?vn.persistentData=yi:j.freeType(yi)}else Sn instanceof ArrayBuffer&&(vn.dtype=nn,vn.dimension=$n,cn(vn,Sn,Tn),Ha&&(vn.persistentData=new Uint8Array(new Uint8Array(Sn))))}function Dn(vn){Rt.bufferCount--,or(vn);var Sn=vn.buffer;it.deleteBuffer(Sn),vn.buffer=null,delete Ar[vn.id]}function qn(vn,Sn,Tn,Xn){Rt.bufferCount++;var $n=new dr(Sn);Ar[$n.id]=$n;function Ha(Ma){var xa=Ir,gi=null,Wa=0,Ya=0,Xa=1;return Array.isArray(Ma)||Zt(Ma)||sr(Ma)||Ma instanceof ArrayBuffer?gi=Ma:typeof Ma=="number"?Wa=Ma|0:Ma&&("data"in Ma&&(gi=Ma.data),"usage"in Ma&&(xa=ir[Ma.usage]),"type"in Ma&&(Ya=on[Ma.type]),"dimension"in Ma&&(Xa=Ma.dimension|0),"length"in Ma&&(Wa=Ma.length|0)),$n.bind(),gi?Nn($n,gi,xa,Ya,Xa,Xn):(Wa&&it.bufferData($n.type,Wa,xa),$n.dtype=Ya||nn,$n.usage=xa,$n.dimension=Xa,$n.byteLength=Wa),qt.profile&&($n.stats.size=$n.byteLength*Un[$n.dtype]),Ha}function $a(Ma,xa){it.bufferSubData($n.type,xa,Ma)}function Si(Ma,xa){var gi=(xa||0)|0,Wa;if($n.bind(),Zt(Ma)||Ma instanceof ArrayBuffer)$a(Ma,gi);else if(Array.isArray(Ma)){if(Ma.length>0){if(typeof Ma[0]=="number"){var Ya=j.allocType($n.dtype,Ma.length);Aa(Ya,Ma),$a(Ya,gi),j.freeType(Ya)}else if(Array.isArray(Ma[0])||Zt(Ma[0])){Wa=fr(Ma);var Xa=cr(Ma,Wa,$n.dtype);$a(Xa,gi),j.freeType(Xa)}}}else if(sr(Ma)){Wa=Ma.shape;var pi=Ma.stride,Xi=0,Eo=0,yi=0,Ui=0;Wa.length===1?(Xi=Wa[0],Eo=1,yi=pi[0],Ui=0):Wa.length===2&&(Xi=Wa[0],Eo=Wa[1],yi=pi[0],Ui=pi[1]);var fo=Array.isArray(Ma.data)?$n.dtype:jn(Ma.data),To=j.allocType(fo,Xi*Eo);ua(To,Ma.data,Xi,Eo,yi,Ui,Ma.offset),$a(To,gi),j.freeType(To)}return Ha}return Tn||Ha(vn),Ha._reglType="buffer",Ha._buffer=$n,Ha.subdata=Si,qt.profile&&(Ha.stats=$n.stats),Ha.destroy=function(){Dn($n)},Ha}function _n(){Ot(Ar).forEach(function(vn){vn.buffer=it.createBuffer(),it.bindBuffer(vn.type,vn.buffer),it.bufferData(vn.type,vn.persistentData||vn.byteLength,vn.usage)})}return qt.profile&&(Rt.getTotalBufferSize=function(){var vn=0;return Object.keys(Ar).forEach(function(Sn){vn+=Ar[Sn].stats.size}),vn}),{create:qn,createStream:qr,destroyStream:Lr,clear:function(){Ot(Ar).forEach(Dn),mr.forEach(Dn)},getBuffer:function(vn){return vn&&vn._buffer instanceof dr?vn._buffer:null},restore:_n,_initBuffer:Nn}}var ei=0,Fa=0,ai=1,Mi=1,ci=4,ba=4,pa={points:ei,point:Fa,lines:ai,line:Mi,triangles:ci,triangle:ba,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ii=0,ho=1,da=4,Kn=5120,ot=5121,et=5122,hr=5123,ur=5124,Tr=5125,Rr=34963,Fr=35040,at=35044;function kt(it,Rt,qt,or){var vr={},Ar=0,dr={uint8:ot,uint16:hr};Rt.oes_element_index_uint&&(dr.uint32=Tr);function mr(_n){this.id=Ar++,vr[this.id]=this,this.buffer=_n,this.primType=da,this.vertCount=0,this.type=0}mr.prototype.bind=function(){this.buffer.bind()};var qr=[];function Lr(_n){var vn=qr.pop();return vn||(vn=new mr(qt.create(null,Rr,!0,!1)._buffer)),Nn(vn,_n,Fr,-1,-1,0,0),vn}function cn(_n){qr.push(_n)}function Nn(_n,vn,Sn,Tn,Xn,$n,Ha){_n.buffer.bind();var $a;if(vn){var Si=Ha;!Ha&&(!Zt(vn)||sr(vn)&&!Zt(vn.data))&&(Si=Rt.oes_element_index_uint?Tr:hr),qt._initBuffer(_n.buffer,vn,Sn,Si,3)}else it.bufferData(Rr,$n,Sn),_n.buffer.dtype=$a||ot,_n.buffer.usage=Sn,_n.buffer.dimension=3,_n.buffer.byteLength=$n;if($a=Ha,!Ha){switch(_n.buffer.dtype){case ot:case Kn:$a=ot;break;case hr:case et:$a=hr;break;case Tr:case ur:$a=Tr;break;default:}_n.buffer.dtype=$a}_n.type=$a;var Ma=Xn;Ma<0&&(Ma=_n.buffer.byteLength,$a===hr?Ma>>=1:$a===Tr&&(Ma>>=2)),_n.vertCount=Ma;var xa=Tn;if(Tn<0){xa=da;var gi=_n.buffer.dimension;gi===1&&(xa=Ii),gi===2&&(xa=ho),gi===3&&(xa=da)}_n.primType=xa}function Dn(_n){or.elementsCount--,delete vr[_n.id],_n.buffer.destroy(),_n.buffer=null}function qn(_n,vn){var Sn=qt.create(null,Rr,!0),Tn=new mr(Sn._buffer);or.elementsCount++;function Xn($n){if(!$n)Sn(),Tn.primType=da,Tn.vertCount=0,Tn.type=ot;else if(typeof $n=="number")Sn($n),Tn.primType=da,Tn.vertCount=$n|0,Tn.type=ot;else{var Ha=null,$a=at,Si=-1,Ma=-1,xa=0,gi=0;Array.isArray($n)||Zt($n)||sr($n)?Ha=$n:("data"in $n&&(Ha=$n.data),"usage"in $n&&($a=ir[$n.usage]),"primitive"in $n&&(Si=pa[$n.primitive]),"count"in $n&&(Ma=$n.count|0),"type"in $n&&(gi=dr[$n.type]),"length"in $n?xa=$n.length|0:(xa=Ma,gi===hr||gi===et?xa*=2:(gi===Tr||gi===ur)&&(xa*=4))),Nn(Tn,Ha,$a,Si,Ma,xa,gi)}return Xn}return Xn(_n),Xn._reglType="elements",Xn._elements=Tn,Xn.subdata=function($n,Ha){return Sn.subdata($n,Ha),Xn},Xn.destroy=function(){Dn(Tn)},Xn}return{create:qn,createStream:Lr,destroyStream:cn,getElements:function(_n){return typeof _n=="function"&&_n._elements instanceof mr?_n._elements:null},clear:function(){Ot(vr).forEach(Dn)}}}var Ut=new Float32Array(1),ar=new Uint32Array(Ut.buffer),Er=5123;function br(it){for(var Rt=j.allocType(Er,it.length),qt=0;qt>>31<<15,Ar=(or<<1>>>24)-127,dr=or>>13&1023;if(Ar<-24)Rt[qt]=vr;else if(Ar<-14){var mr=-14-Ar;Rt[qt]=vr+(dr+1024>>mr)}else Ar>15?Rt[qt]=vr+31744:Rt[qt]=vr+(Ar+15<<10)+dr}return Rt}function Or(it){return Array.isArray(it)||Zt(it)}var Pr=34467,hn=3553,zn=34067,Pn=34069,Ca=6408,ma=6406,bi=6407,ga=6409,eo=6410,si=32854,Ao=32855,ro=36194,Sa=32819,Gi=32820,ti=33635,fi=34042,xo=6402,zi=34041,so=35904,Mo=35906,So=36193,oi=33776,ii=33777,co=33778,Wi=33779,Ho=35986,Io=35987,qo=34798,Oo=35840,ws=35841,Ko=35842,ns=35843,wo=36196,No=5121,Di=5123,lo=5125,Go=5126,mo=10242,us=10243,Jo=10497,zs=33071,Is=33648,es=10240,Zs=10241,Ps=9728,$o=9729,Fo=9984,Ji=9985,Ro=9986,Ls=9987,zl=33170,ml=4352,Ts=4353,yl=4354,mu=34046,su=3317,cc=37440,Bl=37441,_l=37443,ju=37444,lu=33984,il=[Fo,Ro,Ji,Ls],As=[0,ga,eo,bi,Ca],ms={};ms[ga]=ms[ma]=ms[xo]=1,ms[zi]=ms[eo]=2,ms[bi]=ms[so]=3,ms[Ca]=ms[Mo]=4;function Ms(it){return"[object "+it+"]"}var ol=Ms("HTMLCanvasElement"),Su=Ms("OffscreenCanvas"),Eu=Ms("CanvasRenderingContext2D"),Uu=Ms("ImageBitmap"),fc=Ms("HTMLImageElement"),th=Ms("HTMLVideoElement"),Cf=Object.keys(Je).concat([ol,Su,Eu,Uu,fc,th]),qu=[];qu[No]=1,qu[Go]=4,qu[So]=2,qu[Di]=2,qu[lo]=4;var gs=[];gs[si]=2,gs[Ao]=2,gs[ro]=2,gs[zi]=4,gs[oi]=.5,gs[ii]=.5,gs[co]=1,gs[Wi]=1,gs[Ho]=.5,gs[Io]=1,gs[qo]=1,gs[Oo]=.5,gs[ws]=.25,gs[Ko]=.5,gs[ns]=.25,gs[wo]=.5;function Lf(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function hc(it){if(!Array.isArray(it))return!1;var Rt=it.length;return!(Rt===0||!Or(it[0]))}function nc(it){return Object.prototype.toString.call(it)}function hf(it){return nc(it)===ol}function ku(it){return nc(it)===Su}function dc(it){return nc(it)===Eu}function Cu(it){return nc(it)===Uu}function Pc(it){return nc(it)===fc}function $c(it){return nc(it)===th}function Zl(it){if(!it)return!1;var Rt=nc(it);return Cf.indexOf(Rt)>=0?!0:Lf(it)||hc(it)||sr(it)}function df(it){return Je[Object.prototype.toString.call(it)]|0}function Dc(it,Rt){var qt=Rt.length;switch(it.type){case No:case Di:case lo:case Go:var or=j.allocType(it.type,qt);or.set(Rt),it.data=or;break;case So:it.data=br(Rt);break;default:}}function Ic(it,Rt){return j.allocType(it.type===So?Go:it.type,Rt)}function Vu(it,Rt){it.type===So?(it.data=br(Rt),j.freeType(Rt)):it.data=Rt}function Rc(it,Rt,qt,or,vr,Ar){for(var dr=it.width,mr=it.height,qr=it.channels,Lr=dr*mr*qr,cn=Ic(it,Lr),Nn=0,Dn=0;Dn=1;)mr+=dr*qr*qr,qr/=2;return mr}else return dr*qt*or}function vf(it,Rt,qt,or,vr,Ar,dr){var mr={"don't care":ml,"dont care":ml,nice:yl,fast:Ts},qr={repeat:Jo,clamp:zs,mirror:Is},Lr={nearest:Ps,linear:$o},cn=v({mipmap:Ls,"nearest mipmap nearest":Fo,"linear mipmap nearest":Ji,"nearest mipmap linear":Ro,"linear mipmap linear":Ls},Lr),Nn={none:0,browser:ju},Dn={uint8:No,rgba4:Sa,rgb565:ti,"rgb5 a1":Gi},qn={alpha:ma,luminance:ga,"luminance alpha":eo,rgb:bi,rgba:Ca,rgba4:si,"rgb5 a1":Ao,rgb565:ro},_n={};Rt.ext_srgb&&(qn.srgb=so,qn.srgba=Mo),Rt.oes_texture_float&&(Dn.float32=Dn.float=Go),Rt.oes_texture_half_float&&(Dn.float16=Dn["half float"]=So),Rt.webgl_depth_texture&&(v(qn,{depth:xo,"depth stencil":zi}),v(Dn,{uint16:Di,uint32:lo,"depth stencil":fi})),Rt.webgl_compressed_texture_s3tc&&v(_n,{"rgb s3tc dxt1":oi,"rgba s3tc dxt1":ii,"rgba s3tc dxt3":co,"rgba s3tc dxt5":Wi}),Rt.webgl_compressed_texture_atc&&v(_n,{"rgb atc":Ho,"rgba atc explicit alpha":Io,"rgba atc interpolated alpha":qo}),Rt.webgl_compressed_texture_pvrtc&&v(_n,{"rgb pvrtc 4bppv1":Oo,"rgb pvrtc 2bppv1":ws,"rgba pvrtc 4bppv1":Ko,"rgba pvrtc 2bppv1":ns}),Rt.webgl_compressed_texture_etc1&&(_n["rgb etc1"]=wo);var vn=Array.prototype.slice.call(it.getParameter(Pr));Object.keys(_n).forEach(function(fn){var la=_n[fn];vn.indexOf(la)>=0&&(qn[fn]=la)});var Sn=Object.keys(qn);qt.textureFormats=Sn;var Tn=[];Object.keys(qn).forEach(function(fn){var la=qn[fn];Tn[la]=fn});var Xn=[];Object.keys(Dn).forEach(function(fn){var la=Dn[fn];Xn[la]=fn});var $n=[];Object.keys(Lr).forEach(function(fn){var la=Lr[fn];$n[la]=fn});var Ha=[];Object.keys(cn).forEach(function(fn){var la=cn[fn];Ha[la]=fn});var $a=[];Object.keys(qr).forEach(function(fn){var la=qr[fn];$a[la]=fn});var Si=Sn.reduce(function(fn,la){var ha=qn[la];return ha===ga||ha===ma||ha===ga||ha===eo||ha===xo||ha===zi||Rt.ext_srgb&&(ha===so||ha===Mo)?fn[ha]=ha:ha===Ao||la.indexOf("rgba")>=0?fn[ha]=Ca:fn[ha]=bi,fn},{});function Ma(){this.internalformat=Ca,this.format=Ca,this.type=No,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=ju,this.width=0,this.height=0,this.channels=0}function xa(fn,la){fn.internalformat=la.internalformat,fn.format=la.format,fn.type=la.type,fn.compressed=la.compressed,fn.premultiplyAlpha=la.premultiplyAlpha,fn.flipY=la.flipY,fn.unpackAlignment=la.unpackAlignment,fn.colorSpace=la.colorSpace,fn.width=la.width,fn.height=la.height,fn.channels=la.channels}function gi(fn,la){if(!(typeof la!="object"||!la)){if("premultiplyAlpha"in la&&(fn.premultiplyAlpha=la.premultiplyAlpha),"flipY"in la&&(fn.flipY=la.flipY),"alignment"in la&&(fn.unpackAlignment=la.alignment),"colorSpace"in la&&(fn.colorSpace=Nn[la.colorSpace]),"type"in la){var ha=la.type;fn.type=Dn[ha]}var ao=fn.width,ds=fn.height,Os=fn.channels,io=!1;"shape"in la?(ao=la.shape[0],ds=la.shape[1],la.shape.length===3&&(Os=la.shape[2],io=!0)):("radius"in la&&(ao=ds=la.radius),"width"in la&&(ao=la.width),"height"in la&&(ds=la.height),"channels"in la&&(Os=la.channels,io=!0)),fn.width=ao|0,fn.height=ds|0,fn.channels=Os|0;var en=!1;if("format"in la){var dn=la.format,An=fn.internalformat=qn[dn];fn.format=Si[An],dn in Dn&&("type"in la||(fn.type=Dn[dn])),dn in _n&&(fn.compressed=!0),en=!0}!io&&en?fn.channels=ms[fn.format]:io&&!en&&fn.channels!==As[fn.format]&&(fn.format=fn.internalformat=As[fn.channels])}}function Wa(fn){it.pixelStorei(cc,fn.flipY),it.pixelStorei(Bl,fn.premultiplyAlpha),it.pixelStorei(_l,fn.colorSpace),it.pixelStorei(su,fn.unpackAlignment)}function Ya(){Ma.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Xa(fn,la){var ha=null;if(Zl(la)?ha=la:la&&(gi(fn,la),"x"in la&&(fn.xOffset=la.x|0),"y"in la&&(fn.yOffset=la.y|0),Zl(la.data)&&(ha=la.data)),la.copy){var ao=vr.viewportWidth,ds=vr.viewportHeight;fn.width=fn.width||ao-fn.xOffset,fn.height=fn.height||ds-fn.yOffset,fn.needsCopy=!0}else if(!ha)fn.width=fn.width||1,fn.height=fn.height||1,fn.channels=fn.channels||4;else if(Zt(ha))fn.channels=fn.channels||4,fn.data=ha,!("type"in la)&&fn.type===No&&(fn.type=df(ha));else if(Lf(ha))fn.channels=fn.channels||4,Dc(fn,ha),fn.alignment=1,fn.needsFree=!0;else if(sr(ha)){var Os=ha.data;!Array.isArray(Os)&&fn.type===No&&(fn.type=df(Os));var io=ha.shape,en=ha.stride,dn,An,sa,wa,Le,Oe;io.length===3?(sa=io[2],Oe=en[2]):(sa=1,Oe=1),dn=io[0],An=io[1],wa=en[0],Le=en[1],fn.alignment=1,fn.width=dn,fn.height=An,fn.channels=sa,fn.format=fn.internalformat=As[sa],fn.needsFree=!0,Rc(fn,Os,wa,Le,Oe,ha.offset)}else if(hf(ha)||ku(ha)||dc(ha))hf(ha)||ku(ha)?fn.element=ha:fn.element=ha.canvas,fn.width=fn.element.width,fn.height=fn.element.height,fn.channels=4;else if(Cu(ha))fn.element=ha,fn.width=ha.width,fn.height=ha.height,fn.channels=4;else if(Pc(ha))fn.element=ha,fn.width=ha.naturalWidth,fn.height=ha.naturalHeight,fn.channels=4;else if($c(ha))fn.element=ha,fn.width=ha.videoWidth,fn.height=ha.videoHeight,fn.channels=4;else if(hc(ha)){var Ke=fn.width||ha[0].length,yt=fn.height||ha.length,wt=fn.channels;Or(ha[0][0])?wt=wt||ha[0][0].length:wt=wt||1;for(var Pt=vt.shape(ha),pr=1,Zr=0;Zr>=ds,ha.height>>=ds,Xa(ha,ao[ds]),fn.mipmask|=1<=0&&!("faces"in la)&&(fn.genMipmaps=!0)}if("mag"in la){var ao=la.mag;fn.magFilter=Lr[ao]}var ds=fn.wrapS,Os=fn.wrapT;if("wrap"in la){var io=la.wrap;typeof io=="string"?ds=Os=qr[io]:Array.isArray(io)&&(ds=qr[io[0]],Os=qr[io[1]])}else{if("wrapS"in la){var en=la.wrapS;ds=qr[en]}if("wrapT"in la){var dn=la.wrapT;Os=qr[dn]}}if(fn.wrapS=ds,fn.wrapT=Os,"anisotropic"in la){var An=la.anisotropic;fn.anisotropic=la.anisotropic}if("mipmap"in la){var sa=!1;switch(typeof la.mipmap){case"string":fn.mipmapHint=mr[la.mipmap],fn.genMipmaps=!0,sa=!0;break;case"boolean":sa=fn.genMipmaps=la.mipmap;break;case"object":fn.genMipmaps=!1,sa=!0;break;default:}sa&&!("min"in la)&&(fn.minFilter=Fo)}}function ss(fn,la){it.texParameteri(la,Zs,fn.minFilter),it.texParameteri(la,es,fn.magFilter),it.texParameteri(la,mo,fn.wrapS),it.texParameteri(la,us,fn.wrapT),Rt.ext_texture_filter_anisotropic&&it.texParameteri(la,mu,fn.anisotropic),fn.genMipmaps&&(it.hint(zl,fn.mipmapHint),it.generateMipmap(la))}var ks=0,ts={},el=qt.maxTextureUnits,Il=Array(el).map(function(){return null});function Do(fn){Ma.call(this),this.mipmask=0,this.internalformat=Ca,this.id=ks++,this.refCount=1,this.target=fn,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new os,dr.profile&&(this.stats={size:0})}function ru(fn){it.activeTexture(lu),it.bindTexture(fn.target,fn.texture)}function Ns(){var fn=Il[0];fn?it.bindTexture(fn.target,fn.texture):it.bindTexture(hn,null)}function Nu(fn){var la=fn.texture,ha=fn.unit,ao=fn.target;ha>=0&&(it.activeTexture(lu+ha),it.bindTexture(ao,null),Il[ha]=null),it.deleteTexture(la),fn.texture=null,fn.params=null,fn.pixels=null,fn.refCount=0,delete ts[fn.id],Ar.textureCount--}v(Do.prototype,{bind:function(){var fn=this;fn.bindCount+=1;var la=fn.unit;if(la<0){for(var ha=0;ha0)continue;ao.unit=-1}Il[ha]=fn,la=ha;break}la>=el,dr.profile&&Ar.maxTextureUnits>Le)-sa,Oe.height=Oe.height||(ha.height>>Le)-wa,ru(ha),Xi(Oe,hn,sa,wa,Le),Ns(),Ui(Oe),ao}function Os(io,en){var dn=io|0,An=en|0||dn;if(dn===ha.width&&An===ha.height)return ao;ao.width=ha.width=dn,ao.height=ha.height=An,ru(ha);for(var sa=0;ha.mipmask>>sa;++sa){var wa=dn>>sa,Le=An>>sa;if(!wa||!Le)break;it.texImage2D(hn,sa,ha.format,wa,Le,0,ha.format,ha.type,null)}return Ns(),dr.profile&&(ha.stats.size=Lu(ha.internalformat,ha.type,dn,An,!1,!1)),ao}return ao(fn,la),ao.subimage=ds,ao.resize=Os,ao._reglType="texture2d",ao._texture=ha,dr.profile&&(ao.stats=ha.stats),ao.destroy=function(){ha.decRef()},ao}function Hl(fn,la,ha,ao,ds,Os){var io=new Do(zn);ts[io.id]=io,Ar.cubeCount++;var en=new Array(6);function dn(wa,Le,Oe,Ke,yt,wt){var Pt,pr=io.texInfo;for(os.call(pr),Pt=0;Pt<6;++Pt)en[Pt]=Uo();if(typeof wa=="number"||!wa){var Zr=wa|0||1;for(Pt=0;Pt<6;++Pt)To(en[Pt],Zr,Zr)}else if(typeof wa=="object")if(Le)jo(en[0],wa),jo(en[1],Le),jo(en[2],Oe),jo(en[3],Ke),jo(en[4],yt),jo(en[5],wt);else if(hs(pr,wa),gi(io,wa),"faces"in wa){var Mn=wa.faces;for(Pt=0;Pt<6;++Pt)xa(en[Pt],io),jo(en[Pt],Mn[Pt])}else for(Pt=0;Pt<6;++Pt)jo(en[Pt],wa);for(xa(io,en[0]),pr.genMipmaps?io.mipmask=(en[0].width<<1)-1:io.mipmask=en[0].mipmask,io.internalformat=en[0].internalformat,dn.width=en[0].width,dn.height=en[0].height,ru(io),Pt=0;Pt<6;++Pt)qs(en[Pt],Pn+Pt);for(ss(pr,zn),Ns(),dr.profile&&(io.stats.size=Lu(io.internalformat,io.type,dn.width,dn.height,pr.genMipmaps,!0)),dn.format=Tn[io.internalformat],dn.type=Xn[io.type],dn.mag=$n[pr.magFilter],dn.min=Ha[pr.minFilter],dn.wrapS=$a[pr.wrapS],dn.wrapT=$a[pr.wrapT],Pt=0;Pt<6;++Pt)Qs(en[Pt]);return dn}function An(wa,Le,Oe,Ke,yt){var wt=Oe|0,Pt=Ke|0,pr=yt|0,Zr=yi();return xa(Zr,io),Zr.width=0,Zr.height=0,Xa(Zr,Le),Zr.width=Zr.width||(io.width>>pr)-wt,Zr.height=Zr.height||(io.height>>pr)-Pt,ru(io),Xi(Zr,Pn+wa,wt,Pt,pr),Ns(),Ui(Zr),dn}function sa(wa){var Le=wa|0;if(Le!==io.width){dn.width=io.width=Le,dn.height=io.height=Le,ru(io);for(var Oe=0;Oe<6;++Oe)for(var Ke=0;io.mipmask>>Ke;++Ke)it.texImage2D(Pn+Oe,Ke,io.format,Le>>Ke,Le>>Ke,0,io.format,io.type,null);return Ns(),dr.profile&&(io.stats.size=Lu(io.internalformat,io.type,dn.width,dn.height,!1,!0)),dn}}return dn(fn,la,ha,ao,ds,Os),dn.subimage=An,dn.resize=sa,dn._reglType="textureCube",dn._texture=io,dr.profile&&(dn.stats=io.stats),dn.destroy=function(){io.decRef()},dn}function Co(){for(var fn=0;fn>ao,ha.height>>ao,0,ha.internalformat,ha.type,null);else for(var ds=0;ds<6;++ds)it.texImage2D(Pn+ds,ao,ha.internalformat,ha.width>>ao,ha.height>>ao,0,ha.internalformat,ha.type,null);ss(ha.texInfo,ha.target)})}function Hs(){for(var fn=0;fn=0?Qs=!0:qr.indexOf(os)>=0&&(Qs=!1))),("depthTexture"in Do||"depthStencilTexture"in Do)&&(Il=!!(Do.depthTexture||Do.depthStencilTexture)),"depth"in Do&&(typeof Do.depth=="boolean"?qs=Do.depth:(ks=Do.depth,Vs=!1)),"stencil"in Do&&(typeof Do.stencil=="boolean"?Vs=Do.stencil:(ts=Do.stencil,qs=!1)),"depthStencil"in Do&&(typeof Do.depthStencil=="boolean"?qs=Vs=Do.depthStencil:(el=Do.depthStencil,qs=!1,Vs=!1))}var Ns=null,Nu=null,Vl=null,Hl=null;if(Array.isArray(Uo))Ns=Uo.map(_n);else if(Uo)Ns=[_n(Uo)];else for(Ns=new Array(ss),fo=0;fo0&&(Ui.depth=Xa[0].depth,Ui.stencil=Xa[0].stencil,Ui.depthStencil=Xa[0].depthStencil),Xa[yi]?Xa[yi](Ui):Xa[yi]=xa(Ui)}return v(pi,{width:fo,height:fo,color:os})}function Xi(Eo){var yi,Ui=Eo|0;if(Ui===pi.width)return pi;var fo=pi.color;for(yi=0;yi=fo.byteLength?To.subdata(fo):(To.destroy(),xa.buffers[Eo]=null)),xa.buffers[Eo]||(To=xa.buffers[Eo]=vr.create(yi,fu,!1,!0)),Ui.buffer=vr.getBuffer(To),Ui.size=Ui.buffer.dimension|0,Ui.normalized=!1,Ui.type=Ui.buffer.dtype,Ui.offset=0,Ui.stride=0,Ui.divisor=0,Ui.state=1,pi[Eo]=1}else vr.getBuffer(yi)?(Ui.buffer=vr.getBuffer(yi),Ui.size=Ui.buffer.dimension|0,Ui.normalized=!1,Ui.type=Ui.buffer.dtype,Ui.offset=0,Ui.stride=0,Ui.divisor=0,Ui.state=1):vr.getBuffer(yi.buffer)?(Ui.buffer=vr.getBuffer(yi.buffer),Ui.size=(+yi.size||Ui.buffer.dimension)|0,Ui.normalized=!!yi.normalized||!1,"type"in yi?Ui.type=on[yi.type]:Ui.type=Ui.buffer.dtype,Ui.offset=(yi.offset||0)|0,Ui.stride=(yi.stride||0)|0,Ui.divisor=(yi.divisor||0)|0,Ui.state=1):"x"in yi&&(Ui.x=+yi.x||0,Ui.y=+yi.y||0,Ui.z=+yi.z||0,Ui.w=+yi.w||0,Ui.state=2)}for(var jo=0;jo1)for(var Wa=0;Wa<$n.size;++Wa){var Ya=$n.name.replace("[0]","["+Wa+"]");mr(gi,new dr(Ya,Rt.id(Ya),it.getUniformLocation(Si,Ya),$n))}else mr(gi,new dr($n.name,Rt.id($n.name),it.getUniformLocation(Si,$n.name),$n));var Xa=it.getProgramParameter(Si,$u);or.profile&&(vn.stats.attributesCount=Xa);var pi=vn.attributes;for(Xn=0;Xnvn&&(vn=Sn.stats.uniformsCount)}),vn},qt.getMaxAttributesCount=function(){var vn=0;return cn.forEach(function(Sn){Sn.stats.attributesCount>vn&&(vn=Sn.stats.attributesCount)}),vn});function _n(){vr={},Ar={};for(var vn=0;vn16&&(qt=Gn(qt,it.length*8));for(var or=Array(16),vr=Array(16),Ar=0;Ar<16;Ar++)or[Ar]=qt[Ar]^909522486,vr[Ar]=qt[Ar]^1549556828;var dr=Gn(or.concat(ac(Rt)),512+Rt.length*8);return zt(Gn(vr.concat(dr),768))}function Pl(it){for(var Rt=tf?"0123456789ABCDEF":"0123456789abcdef",qt="",or,vr=0;vr>>4&15)+Rt.charAt(or&15);return qt}function yc(it){for(var Rt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qt="",or=it.length,vr=0;vrit.length*8?qt+=gf:qt+=Rt.charAt(Ar>>>6*(3-dr)&63);return qt}function _c(it,Rt){var qt=Rt.length,or=Array(),vr,Ar,dr,mr,qr=Array(Math.ceil(it.length/2));for(vr=0;vr0;){for(mr=Array(),dr=0,vr=0;vr0||Ar>0)&&(mr[mr.length]=Ar);or[or.length]=dr,qr=mr}var Lr="";for(vr=or.length-1;vr>=0;vr--)Lr+=Rt.charAt(or[vr]);var cn=Math.ceil(it.length*8/(Math.log(Rt.length)/Math.log(2)));for(vr=Lr.length;vr>>6&31,128|or&63):or<=65535?Rt+=String.fromCharCode(224|or>>>12&15,128|or>>>6&63,128|or&63):or<=2097151&&(Rt+=String.fromCharCode(240|or>>>18&7,128|or>>>12&63,128|or>>>6&63,128|or&63));return Rt}function ac(it){for(var Rt=Array(it.length>>2),qt=0;qt>5]|=(it.charCodeAt(qt/8)&255)<<24-qt%32;return Rt}function zt(it){for(var Rt="",qt=0;qt>5]>>>24-qt%32&255);return Rt}function rr(it,Rt){return it>>>Rt|it<<32-Rt}function Br(it,Rt){return it>>>Rt}function wr(it,Rt,qt){return it&Rt^~it&qt}function un(it,Rt,qt){return it&Rt^it&qt^Rt&qt}function Ln(it){return rr(it,2)^rr(it,13)^rr(it,22)}function Vn(it){return rr(it,6)^rr(it,11)^rr(it,25)}function Jn(it){return rr(it,7)^rr(it,18)^Br(it,3)}function ca(it){return rr(it,17)^rr(it,19)^Br(it,10)}var Pa=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 Gn(it,Rt){var qt=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),or=new Array(64),vr,Ar,dr,mr,qr,Lr,cn,Nn,Dn,qn,_n,vn;for(it[Rt>>5]|=128<<24-Rt%32,it[(Rt+64>>9<<4)+15]=Rt,Dn=0;Dn>16)+(Rt>>16)+(qt>>16);return or<<16|qt&65535}function fa(it){return Array.prototype.slice.call(it)}function La(it){return fa(it).join("")}function qa(it){var Rt=it&&it.cache,qt=0,or=[],vr=[],Ar=[];function dr(_n,vn){var Sn=vn&&vn.stable;if(!Sn){for(var Tn=0;Tn0&&(_n.push(Xn,"="),_n.push.apply(_n,fa(arguments)),_n.push(";")),Xn}return v(vn,{def:Tn,toString:function(){return La([Sn.length>0?"var "+Sn.join(",")+";":"",La(_n)])}})}function qr(){var _n=mr(),vn=mr(),Sn=_n.toString,Tn=vn.toString;function Xn($n,Ha){vn($n,Ha,"=",_n.def($n,Ha),";")}return v(function(){_n.apply(_n,fa(arguments))},{def:_n.def,entry:_n,exit:vn,save:Xn,set:function($n,Ha,$a){Xn($n,Ha),_n($n,Ha,"=",$a,";")},toString:function(){return Sn()+Tn()}})}function Lr(){var _n=La(arguments),vn=qr(),Sn=qr(),Tn=vn.toString,Xn=Sn.toString;return v(vn,{then:function(){return vn.apply(vn,fa(arguments)),this},else:function(){return Sn.apply(Sn,fa(arguments)),this},toString:function(){var $n=Xn();return $n&&($n="else{"+$n+"}"),La(["if(",_n,"){",Tn(),"}",$n])}})}var cn=mr(),Nn={};function Dn(_n,vn){var Sn=[];function Tn(){var Si="a"+Sn.length;return Sn.push(Si),Si}vn=vn||0;for(var Xn=0;Xn[b.viewport.x,b.viewport.y,A.viewportWidth,A.viewportHeight]},attributes:{color:{buffer:m,offset:(A,b)=>b.offset*4,divisor:1},position:{buffer:f,offset:(A,b)=>b.offset*8,divisor:1},positionFract:{buffer:p,offset:(A,b)=>b.offset*8,divisor:1},error:{buffer:i,offset:(A,b)=>b.offset*16,divisor:1},direction:{buffer:T,stride:24,offset:0},lineOffset:{buffer:T,stride:24,offset:8},capOffset:{buffer:T,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:o.prop("viewport")},viewport:o.prop("viewport"),stencil:!1,instances:o.prop("count"),count:r.length}),l(C,{update:h,draw:_,destroy:u,regl:o,gl:c,canvas:c.canvas,groups:M}),C;function C(A){A?h(A):A===null&&u(),_()}function _(A){if(typeof A=="number")return w(A);A&&!Array.isArray(A)&&(A=[A]),o._refresh(),M.forEach((b,z)=>{if(b){if(A&&(A[z]?b.draw=!0:b.draw=!1),!b.draw){b.draw=!0;return}w(z)}})}function w(A){typeof A=="number"&&(A=M[A]),A!=null&&A&&A.count&&A.color&&A.opacity&&A.positions&&A.positions.length>1&&(A.scaleRatio=[A.scale[0]*A.viewport.width,A.scale[1]*A.viewport.height],g(A),A.after&&A.after(A))}function h(A){if(!A)return;A.length!=null?typeof A[0]=="number"&&(A=[{positions:A}]):Array.isArray(A)||(A=[A]);let b=0,z=0;if(C.groups=M=A.map((R,B)=>{let F=M[B];if(R)typeof R=="function"?R={after:R}:typeof R[0]=="number"&&(R={positions:R});else return F;return R=k(R,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),F||(M[B]=F={id:B,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},R=l({},S,R)),E(F,R,[{lineWidth:P=>+P*.5,capSize:P=>+P*.5,opacity:parseFloat,errors:P=>(P=e(P),z+=P.length,P),positions:(P,j)=>(P=e(P,"float64"),j.count=Math.floor(P.length/2),j.bounds=v(P,2),j.offset=b,b+=j.count,P)},{color:(P,j)=>{let U=j.count;if(P||(P="transparent"),!Array.isArray(P)||typeof P[0]=="number"){let Q=P;P=Array(U);for(let re=0;re{let Z=j.bounds;return P||(P=Z),j.scale=[1/(P[2]-P[0]),1/(P[3]-P[1])],j.translate=[-P[0],-P[1]],j.scaleFract=n(j.scale),j.translateFract=n(j.translate),P},viewport:P=>{let j;return Array.isArray(P)?j={x:P[0],y:P[1],width:P[2]-P[0],height:P[3]-P[1]}:P?(j={x:P.x||P.left||0,y:P.y||P.top||0},P.right?j.width=P.right-j.x:j.width=P.w||P.width||0,P.bottom?j.height=P.bottom-j.y:j.height=P.h||P.height||0):j={x:0,y:0,width:c.drawingBufferWidth,height:c.drawingBufferHeight},j}}]),F}),b||z){let R=M.reduce((j,U,Z)=>j+(U?U.count:0),0),B=new Float64Array(R*2),F=new Uint8Array(R*4),P=new Float32Array(R*4);M.forEach((j,U)=>{if(!j)return;let{positions:Z,count:Q,offset:re,color:ne,errors:oe}=j;Q&&(F.set(ne,re*4),P.set(oe,re*4),B.set(Z,re*2))});var I=t(B);f(I);var N=n(B,I);p(N),m(F),i(P)}}function u(){f.destroy(),p.destroy(),m.destroy(),i.destroy(),T.destroy()}}}}),E9=Ee({"node_modules/unquote/index.js"(J,H){var v=/[\'\"]/;H.exports=function(E){return E?(v.test(E.charAt(0))&&(E=E.substr(1)),v.test(E.charAt(E.length-1))&&(E=E.substr(0,E.length-1)),E):""}}}),Vw=Ee({"node_modules/css-global-keywords/index.json"(J,H){H.exports=["inherit","initial","unset"]}}),Hw=Ee({"node_modules/css-system-font-keywords/index.json"(J,H){H.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),Gw=Ee({"node_modules/css-font-weight-keywords/index.json"(J,H){H.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),Ww=Ee({"node_modules/css-font-style-keywords/index.json"(J,H){H.exports=["normal","italic","oblique"]}}),Yw=Ee({"node_modules/css-font-stretch-keywords/index.json"(J,H){H.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),k9=Ee({"node_modules/parenthesis/index.js"(J,H){"use strict";function v(k,l){if(typeof k!="string")return[k];var e=[k];typeof l=="string"||Array.isArray(l)?l={brackets:l}:l||(l={});var t=l.brackets?Array.isArray(l.brackets)?l.brackets:[l.brackets]:["{}","[]","()"],n=l.escape||"___",r=!!l.flat;t.forEach(function(s){var c=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),g=[];function f(p,m,i){var T=e.push(p.slice(s[0].length,-s[1].length))-1;return g.push(T),n+T+n}e.forEach(function(p,m){for(var i,T=0;p!=i;)if(i=p,p=p.replace(c,f),T++>1e4)throw Error("References have circular dependency. Please, check them.");e[m]=p}),g=g.reverse(),e=e.map(function(p){return g.forEach(function(m){p=p.replace(new RegExp("(\\"+n+m+"\\"+n+")","g"),s[0]+"$1"+s[1])}),p})});var a=new RegExp("\\"+n+"([0-9]+)\\"+n);function o(s,c,g){for(var f=[],p,m=0;p=a.exec(s);){if(m++>1e4)throw Error("Circular references in parenthesis");f.push(s.slice(0,p.index)),f.push(o(c[p[1]],c)),s=s.slice(p.index+p[0].length)}return f.push(s),f}return r?e:o(e[0],e)}function x(k,l){if(l&&l.flat){var e=l&&l.escape||"___",t=k[0],n;if(!t)return"";for(var r=new RegExp("\\"+e+"([0-9]+)\\"+e),a=0;t!=n;){if(a++>1e4)throw Error("Circular references in "+k);n=t,t=t.replace(r,o)}return t}return k.reduce(function s(c,g){return Array.isArray(g)&&(g=g.reduce(s,"")),c+g},"");function o(s,c){if(k[c]==null)throw Error("Reference "+c+"is undefined");return k[c]}}function E(k,l){return Array.isArray(k)?x(k,l):v(k,l)}E.parse=v,E.stringify=x,H.exports=E}}),C9=Ee({"node_modules/string-split-by/index.js"(J,H){"use strict";var v=k9();H.exports=function(E,k,l){if(E==null)throw Error("First argument should be a string");if(k==null)throw Error("Separator should be a string or a RegExp");l?(typeof l=="string"||Array.isArray(l))&&(l={ignore:l}):l={},l.escape==null&&(l.escape=!0),l.ignore==null?l.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof l.ignore=="string"&&(l.ignore=[l.ignore]),l.ignore=l.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var e=v.parse(E,{flat:!0,brackets:l.ignore}),t=e[0],n=t.split(k);if(l.escape){for(var r=[],a=0;a1&&Rt===qt&&(Rt==='"'||Rt==="'"))return['"'+t(it.substr(1,it.length-2))+'"'];var or=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(it);if(or)return n(it.substr(0,or.index)).concat(n(or[1])).concat(n(it.substr(or.index+or[0].length)));var vr=it.split(".");if(vr.length===1)return['"'+t(it)+'"'];for(var Ar=[],dr=0;dr"u"?1:window.devicePixelRatio,ua=!1,Ba={},Pa=function(da){},Ua=function(){};if(typeof Rt=="string"?qt=document.querySelector(Rt):typeof Rt=="object"&&(T(Rt)?qt=Rt:S(Rt)?(Ar=Rt,vr=Ar.canvas):("gl"in Rt?Ar=Rt.gl:"canvas"in Rt?vr=C(Rt.canvas):"container"in Rt&&(or=C(Rt.container)),"attributes"in Rt&&(dr=Rt.attributes),"extensions"in Rt&&(mr=M(Rt.extensions)),"optionalExtensions"in Rt&&(qr=M(Rt.optionalExtensions)),"onDone"in Rt&&(Pa=Rt.onDone),"profile"in Rt&&(ua=!!Rt.profile),"pixelRatio"in Rt&&(Lr=+Rt.pixelRatio),"cachedCode"in Rt&&(Ba=Rt.cachedCode))),qt&&(qt.nodeName.toLowerCase()==="canvas"?vr=qt:or=qt),!Ar){if(!vr){var ya=m(or||document.body,Pa,Lr);if(!ya)return null;vr=ya.canvas,Ua=ya.onDestroy}dr.premultipliedAlpha===void 0&&(dr.premultipliedAlpha=!0),Ar=i(vr,dr)}return Ar?{gl:Ar,canvas:vr,container:or,extensions:mr,optionalExtensions:qr,pixelRatio:Lr,profile:ua,cachedCode:Ba,onDone:Pa,onDestroy:Ua}:(Ua(),Pa("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function w(it,Rt){var qt={};function or(dr){var mr=dr.toLowerCase(),qr;try{qr=qt[mr]=it.getExtension(mr)}catch{}return!!qr}for(var vr=0;vr65535)<<4,it>>>=Rt,qt=(it>255)<<3,it>>>=qt,Rt|=qt,qt=(it>15)<<2,it>>>=qt,Rt|=qt,qt=(it>3)<<1,it>>>=qt,Rt|=qt,Rt|it>>1}function P(){var it=h(8,function(){return[]});function Rt(Ar){var dr=B(Ar),mr=it[F(dr)>>2];return mr.length>0?mr.pop():new ArrayBuffer(dr)}function qt(Ar){it[F(Ar.byteLength)>>2].push(Ar)}function or(Ar,dr){var mr=null;switch(Ar){case u:mr=new Int8Array(Rt(dr),0,dr);break;case A:mr=new Uint8Array(Rt(dr),0,dr);break;case b:mr=new Int16Array(Rt(2*dr),0,dr);break;case z:mr=new Uint16Array(Rt(2*dr),0,dr);break;case I:mr=new Int32Array(Rt(4*dr),0,dr);break;case N:mr=new Uint32Array(Rt(4*dr),0,dr);break;case R:mr=new Float32Array(Rt(4*dr),0,dr);break;default:return null}return mr.length!==dr?mr.subarray(0,dr):mr}function vr(Ar){qt(Ar.buffer)}return{alloc:Rt,free:qt,allocType:or,freeType:vr}}var j=P();j.zero=P();var U=3408,Z=3410,Q=3411,re=3412,ne=3413,oe=3414,V=3415,$=33901,K=33902,G=3379,X=3386,q=34921,W=36347,ee=36348,ae=35661,fe=35660,ye=34930,xe=36349,Ae=34076,Me=34024,Ie=7936,qe=7937,je=7938,ke=35724,ge=34047,le=36063,ve=34852,se=3553,Te=34067,Fe=34069,We=33984,Ge=6408,gt=5126,mt=5121,Tt=36160,At=36053,Kt=36064,ar=16384,_r=function(it,Rt){var qt=1;Rt.ext_texture_filter_anisotropic&&(qt=it.getParameter(ge));var or=1,vr=1;Rt.webgl_draw_buffers&&(or=it.getParameter(ve),vr=it.getParameter(le));var Ar=!!Rt.oes_texture_float;if(Ar){var dr=it.createTexture();it.bindTexture(se,dr),it.texImage2D(se,0,Ge,1,1,0,Ge,gt,null);var mr=it.createFramebuffer();if(it.bindFramebuffer(Tt,mr),it.framebufferTexture2D(Tt,Kt,se,dr,0),it.bindTexture(se,null),it.checkFramebufferStatus(Tt)!==At)Ar=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(ar);var qr=j.allocType(gt,4);it.readPixels(0,0,1,1,Ge,gt,qr),it.getError()?Ar=!1:(it.deleteFramebuffer(mr),it.deleteTexture(dr),Ar=qr[0]===1),j.freeType(qr)}}var Lr=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ua=!0;if(!Lr){var Ba=it.createTexture(),Pa=j.allocType(mt,36);it.activeTexture(We),it.bindTexture(Te,Ba),it.texImage2D(Fe,0,Ge,3,3,0,Ge,mt,Pa),j.freeType(Pa),it.bindTexture(Te,null),it.deleteTexture(Ba),ua=!it.getError()}return{colorBits:[it.getParameter(Z),it.getParameter(Q),it.getParameter(re),it.getParameter(ne)],depthBits:it.getParameter(oe),stencilBits:it.getParameter(V),subpixelBits:it.getParameter(U),extensions:Object.keys(Rt).filter(function(Ua){return!!Rt[Ua]}),maxAnisotropic:qt,maxDrawbuffers:or,maxColorAttachments:vr,pointSizeDims:it.getParameter($),lineWidthDims:it.getParameter(K),maxViewportDims:it.getParameter(X),maxCombinedTextureUnits:it.getParameter(ae),maxCubeMapSize:it.getParameter(Ae),maxRenderbufferSize:it.getParameter(Me),maxTextureUnits:it.getParameter(ye),maxTextureSize:it.getParameter(G),maxAttributes:it.getParameter(q),maxVertexUniforms:it.getParameter(W),maxVertexTextureUnits:it.getParameter(fe),maxVaryingVectors:it.getParameter(ee),maxFragmentUniforms:it.getParameter(xe),glsl:it.getParameter(ke),renderer:it.getParameter(qe),vendor:it.getParameter(Ie),version:it.getParameter(je),readFloat:Ar,npotTextureCube:ua}},Zt=function(it){return it instanceof Uint8Array||it instanceof Uint16Array||it instanceof Uint32Array||it instanceof Int8Array||it instanceof Int16Array||it instanceof Int32Array||it instanceof Float32Array||it instanceof Float64Array||it instanceof Uint8ClampedArray};function sr(it){return!!it&&typeof it=="object"&&Array.isArray(it.shape)&&Array.isArray(it.stride)&&typeof it.offset=="number"&&it.shape.length===it.stride.length&&(Array.isArray(it.data)||Zt(it.data))}var Ot=function(it){return Object.keys(it).map(function(Rt){return it[Rt]})},vt={shape:Ze,flatten:$e};function ht(it,Rt,qt){for(var or=0;or0){var Si;if(Array.isArray(Ma[0])){$n=fr(Ma);for(var Mn=1,xn=1;xn<$n.length;++xn)Mn*=$n[xn];da.dimension=Mn,Si=cr(Ma,$n,da.dtype),ua(da,Si,wa),Hn?da.persistentData=Si:j.freeType(Si)}else if(typeof Ma[0]=="number"){da.dimension=Xa;var gi=j.allocType(da.dtype,Ma.length);An(gi,Ma),ua(da,gi,wa),Hn?da.persistentData=gi:j.freeType(gi)}else Zt(Ma[0])&&(da.dimension=Ma[0].length,da.dtype=Ya||Oa(Ma[0])||xa,Si=cr(Ma,[Ma.length,Ma[0].length],da.dtype),ua(da,Si,wa),Hn?da.persistentData=Si:j.freeType(Si))}}else if(Zt(Ma))da.dtype=Ya||Oa(Ma),da.dimension=Xa,ua(da,Ma,wa),Hn&&(da.persistentData=new Uint8Array(new Uint8Array(Ma.buffer)));else if(sr(Ma)){$n=Ma.shape;var Wn=Ma.stride,Yn=Ma.offset,Xn=0,pi=0,Xi=0,Eo=0;$n.length===1?(Xn=$n[0],pi=1,Xi=Wn[0],Eo=0):$n.length===2&&(Xn=$n[0],pi=$n[1],Xi=Wn[0],Eo=Wn[1]),da.dtype=Ya||Oa(Ma.data)||xa,da.dimension=pi;var yi=j.allocType(da.dtype,Xn*pi);un(yi,Ma.data,Xn,pi,Xi,Eo,Yn),ua(da,yi,wa),Hn?da.persistentData=yi:j.freeType(yi)}else Ma instanceof ArrayBuffer&&(da.dtype=aa,da.dimension=Xa,ua(da,Ma,wa),Hn&&(da.persistentData=new Uint8Array(new Uint8Array(Ma))))}function Pa(da){Rt.bufferCount--,or(da);var Ma=da.buffer;it.deleteBuffer(Ma),da.buffer=null,delete Ar[da.id]}function Ua(da,Ma,wa,Ya){Rt.bufferCount++;var Xa=new dr(Ma);Ar[Xa.id]=Xa;function Hn(Mn){var xn=Ir,gi=null,Wn=0,Yn=0,Xn=1;return Array.isArray(Mn)||Zt(Mn)||sr(Mn)||Mn instanceof ArrayBuffer?gi=Mn:typeof Mn=="number"?Wn=Mn|0:Mn&&("data"in Mn&&(gi=Mn.data),"usage"in Mn&&(xn=ir[Mn.usage]),"type"in Mn&&(Yn=ia[Mn.type]),"dimension"in Mn&&(Xn=Mn.dimension|0),"length"in Mn&&(Wn=Mn.length|0)),Xa.bind(),gi?Ba(Xa,gi,xn,Yn,Xn,Ya):(Wn&&it.bufferData(Xa.type,Wn,xn),Xa.dtype=Yn||aa,Xa.usage=xn,Xa.dimension=Xn,Xa.byteLength=Wn),qt.profile&&(Xa.stats.size=Xa.byteLength*ja[Xa.dtype]),Hn}function $n(Mn,xn){it.bufferSubData(Xa.type,xn,Mn)}function Si(Mn,xn){var gi=(xn||0)|0,Wn;if(Xa.bind(),Zt(Mn)||Mn instanceof ArrayBuffer)$n(Mn,gi);else if(Array.isArray(Mn)){if(Mn.length>0){if(typeof Mn[0]=="number"){var Yn=j.allocType(Xa.dtype,Mn.length);An(Yn,Mn),$n(Yn,gi),j.freeType(Yn)}else if(Array.isArray(Mn[0])||Zt(Mn[0])){Wn=fr(Mn);var Xn=cr(Mn,Wn,Xa.dtype);$n(Xn,gi),j.freeType(Xn)}}}else if(sr(Mn)){Wn=Mn.shape;var pi=Mn.stride,Xi=0,Eo=0,yi=0,Ui=0;Wn.length===1?(Xi=Wn[0],Eo=1,yi=pi[0],Ui=0):Wn.length===2&&(Xi=Wn[0],Eo=Wn[1],yi=pi[0],Ui=pi[1]);var fo=Array.isArray(Mn.data)?Xa.dtype:Oa(Mn.data),To=j.allocType(fo,Xi*Eo);un(To,Mn.data,Xi,Eo,yi,Ui,Mn.offset),$n(To,gi),j.freeType(To)}return Hn}return wa||Hn(da),Hn._reglType="buffer",Hn._buffer=Xa,Hn.subdata=Si,qt.profile&&(Hn.stats=Xa.stats),Hn.destroy=function(){Pa(Xa)},Hn}function ya(){Ot(Ar).forEach(function(da){da.buffer=it.createBuffer(),it.bindBuffer(da.type,da.buffer),it.bufferData(da.type,da.persistentData||da.byteLength,da.usage)})}return qt.profile&&(Rt.getTotalBufferSize=function(){var da=0;return Object.keys(Ar).forEach(function(Ma){da+=Ar[Ma].stats.size}),da}),{create:Ua,createStream:qr,destroyStream:Lr,clear:function(){Ot(Ar).forEach(Pa),mr.forEach(Pa)},getBuffer:function(da){return da&&da._buffer instanceof dr?da._buffer:null},restore:ya,_initBuffer:Ba}}var ei=0,Fn=0,ni=1,Mi=1,ci=4,bn=4,pn={points:ei,point:Fn,lines:ni,line:Mi,triangles:ci,triangle:bn,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ii=0,ho=1,dn=4,Za=5120,ot=5121,et=5122,hr=5123,ur=5124,Tr=5125,Rr=34963,Fr=35040,nt=35044;function kt(it,Rt,qt,or){var vr={},Ar=0,dr={uint8:ot,uint16:hr};Rt.oes_element_index_uint&&(dr.uint32=Tr);function mr(ya){this.id=Ar++,vr[this.id]=this,this.buffer=ya,this.primType=dn,this.vertCount=0,this.type=0}mr.prototype.bind=function(){this.buffer.bind()};var qr=[];function Lr(ya){var da=qr.pop();return da||(da=new mr(qt.create(null,Rr,!0,!1)._buffer)),Ba(da,ya,Fr,-1,-1,0,0),da}function ua(ya){qr.push(ya)}function Ba(ya,da,Ma,wa,Ya,Xa,Hn){ya.buffer.bind();var $n;if(da){var Si=Hn;!Hn&&(!Zt(da)||sr(da)&&!Zt(da.data))&&(Si=Rt.oes_element_index_uint?Tr:hr),qt._initBuffer(ya.buffer,da,Ma,Si,3)}else it.bufferData(Rr,Xa,Ma),ya.buffer.dtype=$n||ot,ya.buffer.usage=Ma,ya.buffer.dimension=3,ya.buffer.byteLength=Xa;if($n=Hn,!Hn){switch(ya.buffer.dtype){case ot:case Za:$n=ot;break;case hr:case et:$n=hr;break;case Tr:case ur:$n=Tr;break;default:}ya.buffer.dtype=$n}ya.type=$n;var Mn=Ya;Mn<0&&(Mn=ya.buffer.byteLength,$n===hr?Mn>>=1:$n===Tr&&(Mn>>=2)),ya.vertCount=Mn;var xn=wa;if(wa<0){xn=dn;var gi=ya.buffer.dimension;gi===1&&(xn=Ii),gi===2&&(xn=ho),gi===3&&(xn=dn)}ya.primType=xn}function Pa(ya){or.elementsCount--,delete vr[ya.id],ya.buffer.destroy(),ya.buffer=null}function Ua(ya,da){var Ma=qt.create(null,Rr,!0),wa=new mr(Ma._buffer);or.elementsCount++;function Ya(Xa){if(!Xa)Ma(),wa.primType=dn,wa.vertCount=0,wa.type=ot;else if(typeof Xa=="number")Ma(Xa),wa.primType=dn,wa.vertCount=Xa|0,wa.type=ot;else{var Hn=null,$n=nt,Si=-1,Mn=-1,xn=0,gi=0;Array.isArray(Xa)||Zt(Xa)||sr(Xa)?Hn=Xa:("data"in Xa&&(Hn=Xa.data),"usage"in Xa&&($n=ir[Xa.usage]),"primitive"in Xa&&(Si=pn[Xa.primitive]),"count"in Xa&&(Mn=Xa.count|0),"type"in Xa&&(gi=dr[Xa.type]),"length"in Xa?xn=Xa.length|0:(xn=Mn,gi===hr||gi===et?xn*=2:(gi===Tr||gi===ur)&&(xn*=4))),Ba(wa,Hn,$n,Si,Mn,xn,gi)}return Ya}return Ya(ya),Ya._reglType="elements",Ya._elements=wa,Ya.subdata=function(Xa,Hn){return Ma.subdata(Xa,Hn),Ya},Ya.destroy=function(){Pa(wa)},Ya}return{create:Ua,createStream:Lr,destroyStream:ua,getElements:function(ya){return typeof ya=="function"&&ya._elements instanceof mr?ya._elements:null},clear:function(){Ot(vr).forEach(Pa)}}}var Ut=new Float32Array(1),nr=new Uint32Array(Ut.buffer),Er=5123;function br(it){for(var Rt=j.allocType(Er,it.length),qt=0;qt>>31<<15,Ar=(or<<1>>>24)-127,dr=or>>13&1023;if(Ar<-24)Rt[qt]=vr;else if(Ar<-14){var mr=-14-Ar;Rt[qt]=vr+(dr+1024>>mr)}else Ar>15?Rt[qt]=vr+31744:Rt[qt]=vr+(Ar+15<<10)+dr}return Rt}function Or(it){return Array.isArray(it)||Zt(it)}var Pr=34467,fa=3553,Fa=34067,La=34069,Cn=6408,mn=6406,bi=6407,gn=6409,eo=6410,si=32854,Ao=32855,ro=36194,Sn=32819,Gi=32820,ti=33635,fi=34042,xo=6402,zi=34041,so=35904,Mo=35906,So=36193,oi=33776,ii=33777,co=33778,Wi=33779,Ho=35986,Io=35987,qo=34798,Oo=35840,ws=35841,Ko=35842,as=35843,wo=36196,No=5121,Di=5123,lo=5125,Go=5126,go=10242,us=10243,Jo=10497,zs=33071,Is=33648,es=10240,Zs=10241,Ps=9728,$o=9729,Fo=9984,Ji=9985,Ro=9986,Ls=9987,zl=33170,ml=4352,Ts=4353,yl=4354,mu=34046,su=3317,cc=37440,Bl=37441,_l=37443,ju=37444,lu=33984,il=[Fo,Ro,Ji,Ls],As=[0,gn,eo,bi,Cn],ms={};ms[gn]=ms[mn]=ms[xo]=1,ms[zi]=ms[eo]=2,ms[bi]=ms[so]=3,ms[Cn]=ms[Mo]=4;function Ms(it){return"[object "+it+"]"}var ol=Ms("HTMLCanvasElement"),Su=Ms("OffscreenCanvas"),Eu=Ms("CanvasRenderingContext2D"),Uu=Ms("ImageBitmap"),fc=Ms("HTMLImageElement"),th=Ms("HTMLVideoElement"),Cf=Object.keys(Je).concat([ol,Su,Eu,Uu,fc,th]),qu=[];qu[No]=1,qu[Go]=4,qu[So]=2,qu[Di]=2,qu[lo]=4;var gs=[];gs[si]=2,gs[Ao]=2,gs[ro]=2,gs[zi]=4,gs[oi]=.5,gs[ii]=.5,gs[co]=1,gs[Wi]=1,gs[Ho]=.5,gs[Io]=1,gs[qo]=1,gs[Oo]=.5,gs[ws]=.25,gs[Ko]=.5,gs[as]=.25,gs[wo]=.5;function Lf(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function hc(it){if(!Array.isArray(it))return!1;var Rt=it.length;return!(Rt===0||!Or(it[0]))}function ac(it){return Object.prototype.toString.call(it)}function hf(it){return ac(it)===ol}function ku(it){return ac(it)===Su}function dc(it){return ac(it)===Eu}function Cu(it){return ac(it)===Uu}function Pc(it){return ac(it)===fc}function $c(it){return ac(it)===th}function Zl(it){if(!it)return!1;var Rt=ac(it);return Cf.indexOf(Rt)>=0?!0:Lf(it)||hc(it)||sr(it)}function df(it){return Je[Object.prototype.toString.call(it)]|0}function Dc(it,Rt){var qt=Rt.length;switch(it.type){case No:case Di:case lo:case Go:var or=j.allocType(it.type,qt);or.set(Rt),it.data=or;break;case So:it.data=br(Rt);break;default:}}function Ic(it,Rt){return j.allocType(it.type===So?Go:it.type,Rt)}function Vu(it,Rt){it.type===So?(it.data=br(Rt),j.freeType(Rt)):it.data=Rt}function Rc(it,Rt,qt,or,vr,Ar){for(var dr=it.width,mr=it.height,qr=it.channels,Lr=dr*mr*qr,ua=Ic(it,Lr),Ba=0,Pa=0;Pa=1;)mr+=dr*qr*qr,qr/=2;return mr}else return dr*qt*or}function vf(it,Rt,qt,or,vr,Ar,dr){var mr={"don't care":ml,"dont care":ml,nice:yl,fast:Ts},qr={repeat:Jo,clamp:zs,mirror:Is},Lr={nearest:Ps,linear:$o},ua=v({mipmap:Ls,"nearest mipmap nearest":Fo,"linear mipmap nearest":Ji,"nearest mipmap linear":Ro,"linear mipmap linear":Ls},Lr),Ba={none:0,browser:ju},Pa={uint8:No,rgba4:Sn,rgb565:ti,"rgb5 a1":Gi},Ua={alpha:mn,luminance:gn,"luminance alpha":eo,rgb:bi,rgba:Cn,rgba4:si,"rgb5 a1":Ao,rgb565:ro},ya={};Rt.ext_srgb&&(Ua.srgb=so,Ua.srgba=Mo),Rt.oes_texture_float&&(Pa.float32=Pa.float=Go),Rt.oes_texture_half_float&&(Pa.float16=Pa["half float"]=So),Rt.webgl_depth_texture&&(v(Ua,{depth:xo,"depth stencil":zi}),v(Pa,{uint16:Di,uint32:lo,"depth stencil":fi})),Rt.webgl_compressed_texture_s3tc&&v(ya,{"rgb s3tc dxt1":oi,"rgba s3tc dxt1":ii,"rgba s3tc dxt3":co,"rgba s3tc dxt5":Wi}),Rt.webgl_compressed_texture_atc&&v(ya,{"rgb atc":Ho,"rgba atc explicit alpha":Io,"rgba atc interpolated alpha":qo}),Rt.webgl_compressed_texture_pvrtc&&v(ya,{"rgb pvrtc 4bppv1":Oo,"rgb pvrtc 2bppv1":ws,"rgba pvrtc 4bppv1":Ko,"rgba pvrtc 2bppv1":as}),Rt.webgl_compressed_texture_etc1&&(ya["rgb etc1"]=wo);var da=Array.prototype.slice.call(it.getParameter(Pr));Object.keys(ya).forEach(function(ca){var ln=ya[ca];da.indexOf(ln)>=0&&(Ua[ca]=ln)});var Ma=Object.keys(Ua);qt.textureFormats=Ma;var wa=[];Object.keys(Ua).forEach(function(ca){var ln=Ua[ca];wa[ln]=ca});var Ya=[];Object.keys(Pa).forEach(function(ca){var ln=Pa[ca];Ya[ln]=ca});var Xa=[];Object.keys(Lr).forEach(function(ca){var ln=Lr[ca];Xa[ln]=ca});var Hn=[];Object.keys(ua).forEach(function(ca){var ln=ua[ca];Hn[ln]=ca});var $n=[];Object.keys(qr).forEach(function(ca){var ln=qr[ca];$n[ln]=ca});var Si=Ma.reduce(function(ca,ln){var hn=Ua[ln];return hn===gn||hn===mn||hn===gn||hn===eo||hn===xo||hn===zi||Rt.ext_srgb&&(hn===so||hn===Mo)?ca[hn]=hn:hn===Ao||ln.indexOf("rgba")>=0?ca[hn]=Cn:ca[hn]=bi,ca},{});function Mn(){this.internalformat=Cn,this.format=Cn,this.type=No,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=ju,this.width=0,this.height=0,this.channels=0}function xn(ca,ln){ca.internalformat=ln.internalformat,ca.format=ln.format,ca.type=ln.type,ca.compressed=ln.compressed,ca.premultiplyAlpha=ln.premultiplyAlpha,ca.flipY=ln.flipY,ca.unpackAlignment=ln.unpackAlignment,ca.colorSpace=ln.colorSpace,ca.width=ln.width,ca.height=ln.height,ca.channels=ln.channels}function gi(ca,ln){if(!(typeof ln!="object"||!ln)){if("premultiplyAlpha"in ln&&(ca.premultiplyAlpha=ln.premultiplyAlpha),"flipY"in ln&&(ca.flipY=ln.flipY),"alignment"in ln&&(ca.unpackAlignment=ln.alignment),"colorSpace"in ln&&(ca.colorSpace=Ba[ln.colorSpace]),"type"in ln){var hn=ln.type;ca.type=Pa[hn]}var no=ca.width,ds=ca.height,Os=ca.channels,io=!1;"shape"in ln?(no=ln.shape[0],ds=ln.shape[1],ln.shape.length===3&&(Os=ln.shape[2],io=!0)):("radius"in ln&&(no=ds=ln.radius),"width"in ln&&(no=ln.width),"height"in ln&&(ds=ln.height),"channels"in ln&&(Os=ln.channels,io=!0)),ca.width=no|0,ca.height=ds|0,ca.channels=Os|0;var ea=!1;if("format"in ln){var ha=ln.format,Ta=ca.internalformat=Ua[ha];ca.format=Si[Ta],ha in Pa&&("type"in ln||(ca.type=Pa[ha])),ha in ya&&(ca.compressed=!0),ea=!0}!io&&ea?ca.channels=ms[ca.format]:io&&!ea&&ca.channels!==As[ca.format]&&(ca.format=ca.internalformat=As[ca.channels])}}function Wn(ca){it.pixelStorei(cc,ca.flipY),it.pixelStorei(Bl,ca.premultiplyAlpha),it.pixelStorei(_l,ca.colorSpace),it.pixelStorei(su,ca.unpackAlignment)}function Yn(){Mn.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Xn(ca,ln){var hn=null;if(Zl(ln)?hn=ln:ln&&(gi(ca,ln),"x"in ln&&(ca.xOffset=ln.x|0),"y"in ln&&(ca.yOffset=ln.y|0),Zl(ln.data)&&(hn=ln.data)),ln.copy){var no=vr.viewportWidth,ds=vr.viewportHeight;ca.width=ca.width||no-ca.xOffset,ca.height=ca.height||ds-ca.yOffset,ca.needsCopy=!0}else if(!hn)ca.width=ca.width||1,ca.height=ca.height||1,ca.channels=ca.channels||4;else if(Zt(hn))ca.channels=ca.channels||4,ca.data=hn,!("type"in ln)&&ca.type===No&&(ca.type=df(hn));else if(Lf(hn))ca.channels=ca.channels||4,Dc(ca,hn),ca.alignment=1,ca.needsFree=!0;else if(sr(hn)){var Os=hn.data;!Array.isArray(Os)&&ca.type===No&&(ca.type=df(Os));var io=hn.shape,ea=hn.stride,ha,Ta,sn,wn,Le,Oe;io.length===3?(sn=io[2],Oe=ea[2]):(sn=1,Oe=1),ha=io[0],Ta=io[1],wn=ea[0],Le=ea[1],ca.alignment=1,ca.width=ha,ca.height=Ta,ca.channels=sn,ca.format=ca.internalformat=As[sn],ca.needsFree=!0,Rc(ca,Os,wn,Le,Oe,hn.offset)}else if(hf(hn)||ku(hn)||dc(hn))hf(hn)||ku(hn)?ca.element=hn:ca.element=hn.canvas,ca.width=ca.element.width,ca.height=ca.element.height,ca.channels=4;else if(Cu(hn))ca.element=hn,ca.width=hn.width,ca.height=hn.height,ca.channels=4;else if(Pc(hn))ca.element=hn,ca.width=hn.naturalWidth,ca.height=hn.naturalHeight,ca.channels=4;else if($c(hn))ca.element=hn,ca.width=hn.videoWidth,ca.height=hn.videoHeight,ca.channels=4;else if(hc(hn)){var Ke=ca.width||hn[0].length,yt=ca.height||hn.length,wt=ca.channels;Or(hn[0][0])?wt=wt||hn[0][0].length:wt=wt||1;for(var Pt=vt.shape(hn),pr=1,Zr=0;Zr>=ds,hn.height>>=ds,Xn(hn,no[ds]),ca.mipmask|=1<=0&&!("faces"in ln)&&(ca.genMipmaps=!0)}if("mag"in ln){var no=ln.mag;ca.magFilter=Lr[no]}var ds=ca.wrapS,Os=ca.wrapT;if("wrap"in ln){var io=ln.wrap;typeof io=="string"?ds=Os=qr[io]:Array.isArray(io)&&(ds=qr[io[0]],Os=qr[io[1]])}else{if("wrapS"in ln){var ea=ln.wrapS;ds=qr[ea]}if("wrapT"in ln){var ha=ln.wrapT;Os=qr[ha]}}if(ca.wrapS=ds,ca.wrapT=Os,"anisotropic"in ln){var Ta=ln.anisotropic;ca.anisotropic=ln.anisotropic}if("mipmap"in ln){var sn=!1;switch(typeof ln.mipmap){case"string":ca.mipmapHint=mr[ln.mipmap],ca.genMipmaps=!0,sn=!0;break;case"boolean":sn=ca.genMipmaps=ln.mipmap;break;case"object":ca.genMipmaps=!1,sn=!0;break;default:}sn&&!("min"in ln)&&(ca.minFilter=Fo)}}function ss(ca,ln){it.texParameteri(ln,Zs,ca.minFilter),it.texParameteri(ln,es,ca.magFilter),it.texParameteri(ln,go,ca.wrapS),it.texParameteri(ln,us,ca.wrapT),Rt.ext_texture_filter_anisotropic&&it.texParameteri(ln,mu,ca.anisotropic),ca.genMipmaps&&(it.hint(zl,ca.mipmapHint),it.generateMipmap(ln))}var ks=0,ts={},el=qt.maxTextureUnits,Il=Array(el).map(function(){return null});function Do(ca){Mn.call(this),this.mipmask=0,this.internalformat=Cn,this.id=ks++,this.refCount=1,this.target=ca,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new os,dr.profile&&(this.stats={size:0})}function ru(ca){it.activeTexture(lu),it.bindTexture(ca.target,ca.texture)}function Ns(){var ca=Il[0];ca?it.bindTexture(ca.target,ca.texture):it.bindTexture(fa,null)}function Nu(ca){var ln=ca.texture,hn=ca.unit,no=ca.target;hn>=0&&(it.activeTexture(lu+hn),it.bindTexture(no,null),Il[hn]=null),it.deleteTexture(ln),ca.texture=null,ca.params=null,ca.pixels=null,ca.refCount=0,delete ts[ca.id],Ar.textureCount--}v(Do.prototype,{bind:function(){var ca=this;ca.bindCount+=1;var ln=ca.unit;if(ln<0){for(var hn=0;hn0)continue;no.unit=-1}Il[hn]=ca,ln=hn;break}ln>=el,dr.profile&&Ar.maxTextureUnits>Le)-sn,Oe.height=Oe.height||(hn.height>>Le)-wn,ru(hn),Xi(Oe,fa,sn,wn,Le),Ns(),Ui(Oe),no}function Os(io,ea){var ha=io|0,Ta=ea|0||ha;if(ha===hn.width&&Ta===hn.height)return no;no.width=hn.width=ha,no.height=hn.height=Ta,ru(hn);for(var sn=0;hn.mipmask>>sn;++sn){var wn=ha>>sn,Le=Ta>>sn;if(!wn||!Le)break;it.texImage2D(fa,sn,hn.format,wn,Le,0,hn.format,hn.type,null)}return Ns(),dr.profile&&(hn.stats.size=Lu(hn.internalformat,hn.type,ha,Ta,!1,!1)),no}return no(ca,ln),no.subimage=ds,no.resize=Os,no._reglType="texture2d",no._texture=hn,dr.profile&&(no.stats=hn.stats),no.destroy=function(){hn.decRef()},no}function Hl(ca,ln,hn,no,ds,Os){var io=new Do(Fa);ts[io.id]=io,Ar.cubeCount++;var ea=new Array(6);function ha(wn,Le,Oe,Ke,yt,wt){var Pt,pr=io.texInfo;for(os.call(pr),Pt=0;Pt<6;++Pt)ea[Pt]=Uo();if(typeof wn=="number"||!wn){var Zr=wn|0||1;for(Pt=0;Pt<6;++Pt)To(ea[Pt],Zr,Zr)}else if(typeof wn=="object")if(Le)jo(ea[0],wn),jo(ea[1],Le),jo(ea[2],Oe),jo(ea[3],Ke),jo(ea[4],yt),jo(ea[5],wt);else if(hs(pr,wn),gi(io,wn),"faces"in wn){var Aa=wn.faces;for(Pt=0;Pt<6;++Pt)xn(ea[Pt],io),jo(ea[Pt],Aa[Pt])}else for(Pt=0;Pt<6;++Pt)jo(ea[Pt],wn);for(xn(io,ea[0]),pr.genMipmaps?io.mipmask=(ea[0].width<<1)-1:io.mipmask=ea[0].mipmask,io.internalformat=ea[0].internalformat,ha.width=ea[0].width,ha.height=ea[0].height,ru(io),Pt=0;Pt<6;++Pt)qs(ea[Pt],La+Pt);for(ss(pr,Fa),Ns(),dr.profile&&(io.stats.size=Lu(io.internalformat,io.type,ha.width,ha.height,pr.genMipmaps,!0)),ha.format=wa[io.internalformat],ha.type=Ya[io.type],ha.mag=Xa[pr.magFilter],ha.min=Hn[pr.minFilter],ha.wrapS=$n[pr.wrapS],ha.wrapT=$n[pr.wrapT],Pt=0;Pt<6;++Pt)Qs(ea[Pt]);return ha}function Ta(wn,Le,Oe,Ke,yt){var wt=Oe|0,Pt=Ke|0,pr=yt|0,Zr=yi();return xn(Zr,io),Zr.width=0,Zr.height=0,Xn(Zr,Le),Zr.width=Zr.width||(io.width>>pr)-wt,Zr.height=Zr.height||(io.height>>pr)-Pt,ru(io),Xi(Zr,La+wn,wt,Pt,pr),Ns(),Ui(Zr),ha}function sn(wn){var Le=wn|0;if(Le!==io.width){ha.width=io.width=Le,ha.height=io.height=Le,ru(io);for(var Oe=0;Oe<6;++Oe)for(var Ke=0;io.mipmask>>Ke;++Ke)it.texImage2D(La+Oe,Ke,io.format,Le>>Ke,Le>>Ke,0,io.format,io.type,null);return Ns(),dr.profile&&(io.stats.size=Lu(io.internalformat,io.type,ha.width,ha.height,!1,!0)),ha}}return ha(ca,ln,hn,no,ds,Os),ha.subimage=Ta,ha.resize=sn,ha._reglType="textureCube",ha._texture=io,dr.profile&&(ha.stats=io.stats),ha.destroy=function(){io.decRef()},ha}function Co(){for(var ca=0;ca>no,hn.height>>no,0,hn.internalformat,hn.type,null);else for(var ds=0;ds<6;++ds)it.texImage2D(La+ds,no,hn.internalformat,hn.width>>no,hn.height>>no,0,hn.internalformat,hn.type,null);ss(hn.texInfo,hn.target)})}function Hs(){for(var ca=0;ca=0?Qs=!0:qr.indexOf(os)>=0&&(Qs=!1))),("depthTexture"in Do||"depthStencilTexture"in Do)&&(Il=!!(Do.depthTexture||Do.depthStencilTexture)),"depth"in Do&&(typeof Do.depth=="boolean"?qs=Do.depth:(ks=Do.depth,Vs=!1)),"stencil"in Do&&(typeof Do.stencil=="boolean"?Vs=Do.stencil:(ts=Do.stencil,qs=!1)),"depthStencil"in Do&&(typeof Do.depthStencil=="boolean"?qs=Vs=Do.depthStencil:(el=Do.depthStencil,qs=!1,Vs=!1))}var Ns=null,Nu=null,Vl=null,Hl=null;if(Array.isArray(Uo))Ns=Uo.map(ya);else if(Uo)Ns=[ya(Uo)];else for(Ns=new Array(ss),fo=0;fo0&&(Ui.depth=Xn[0].depth,Ui.stencil=Xn[0].stencil,Ui.depthStencil=Xn[0].depthStencil),Xn[yi]?Xn[yi](Ui):Xn[yi]=xn(Ui)}return v(pi,{width:fo,height:fo,color:os})}function Xi(Eo){var yi,Ui=Eo|0;if(Ui===pi.width)return pi;var fo=pi.color;for(yi=0;yi=fo.byteLength?To.subdata(fo):(To.destroy(),xn.buffers[Eo]=null)),xn.buffers[Eo]||(To=xn.buffers[Eo]=vr.create(yi,fu,!1,!0)),Ui.buffer=vr.getBuffer(To),Ui.size=Ui.buffer.dimension|0,Ui.normalized=!1,Ui.type=Ui.buffer.dtype,Ui.offset=0,Ui.stride=0,Ui.divisor=0,Ui.state=1,pi[Eo]=1}else vr.getBuffer(yi)?(Ui.buffer=vr.getBuffer(yi),Ui.size=Ui.buffer.dimension|0,Ui.normalized=!1,Ui.type=Ui.buffer.dtype,Ui.offset=0,Ui.stride=0,Ui.divisor=0,Ui.state=1):vr.getBuffer(yi.buffer)?(Ui.buffer=vr.getBuffer(yi.buffer),Ui.size=(+yi.size||Ui.buffer.dimension)|0,Ui.normalized=!!yi.normalized||!1,"type"in yi?Ui.type=ia[yi.type]:Ui.type=Ui.buffer.dtype,Ui.offset=(yi.offset||0)|0,Ui.stride=(yi.stride||0)|0,Ui.divisor=(yi.divisor||0)|0,Ui.state=1):"x"in yi&&(Ui.x=+yi.x||0,Ui.y=+yi.y||0,Ui.z=+yi.z||0,Ui.w=+yi.w||0,Ui.state=2)}for(var jo=0;jo1)for(var Wn=0;Wnda&&(da=Ma.stats.uniformsCount)}),da},qt.getMaxAttributesCount=function(){var da=0;return ua.forEach(function(Ma){Ma.stats.attributesCount>da&&(da=Ma.stats.attributesCount)}),da});function ya(){vr={},Ar={};for(var da=0;da16&&(qt=Ha(qt,it.length*8));for(var or=Array(16),vr=Array(16),Ar=0;Ar<16;Ar++)or[Ar]=qt[Ar]^909522486,vr[Ar]=qt[Ar]^1549556828;var dr=Ha(or.concat(nc(Rt)),512+Rt.length*8);return zt(Ha(vr.concat(dr),768))}function Pl(it){for(var Rt=tf?"0123456789ABCDEF":"0123456789abcdef",qt="",or,vr=0;vr>>4&15)+Rt.charAt(or&15);return qt}function yc(it){for(var Rt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qt="",or=it.length,vr=0;vrit.length*8?qt+=gf:qt+=Rt.charAt(Ar>>>6*(3-dr)&63);return qt}function _c(it,Rt){var qt=Rt.length,or=Array(),vr,Ar,dr,mr,qr=Array(Math.ceil(it.length/2));for(vr=0;vr0;){for(mr=Array(),dr=0,vr=0;vr0||Ar>0)&&(mr[mr.length]=Ar);or[or.length]=dr,qr=mr}var Lr="";for(vr=or.length-1;vr>=0;vr--)Lr+=Rt.charAt(or[vr]);var ua=Math.ceil(it.length*8/(Math.log(Rt.length)/Math.log(2)));for(vr=Lr.length;vr>>6&31,128|or&63):or<=65535?Rt+=String.fromCharCode(224|or>>>12&15,128|or>>>6&63,128|or&63):or<=2097151&&(Rt+=String.fromCharCode(240|or>>>18&7,128|or>>>12&63,128|or>>>6&63,128|or&63));return Rt}function nc(it){for(var Rt=Array(it.length>>2),qt=0;qt>5]|=(it.charCodeAt(qt/8)&255)<<24-qt%32;return Rt}function zt(it){for(var Rt="",qt=0;qt>5]>>>24-qt%32&255);return Rt}function rr(it,Rt){return it>>>Rt|it<<32-Rt}function Br(it,Rt){return it>>>Rt}function wr(it,Rt,qt){return it&Rt^~it&qt}function la(it,Rt,qt){return it&Rt^it&qt^Rt&qt}function Ca(it){return rr(it,2)^rr(it,13)^rr(it,22)}function qa(it){return rr(it,6)^rr(it,11)^rr(it,25)}function Ka(it){return rr(it,7)^rr(it,18)^Br(it,3)}function cn(it){return rr(it,17)^rr(it,19)^Br(it,10)}var Pn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Ha(it,Rt){var qt=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),or=new Array(64),vr,Ar,dr,mr,qr,Lr,ua,Ba,Pa,Ua,ya,da;for(it[Rt>>5]|=128<<24-Rt%32,it[(Rt+64>>9<<4)+15]=Rt,Pa=0;Pa>16)+(Rt>>16)+(qt>>16);return or<<16|qt&65535}function fn(it){return Array.prototype.slice.call(it)}function Ln(it){return fn(it).join("")}function qn(it){var Rt=it&&it.cache,qt=0,or=[],vr=[],Ar=[];function dr(ya,da){var Ma=da&&da.stable;if(!Ma){for(var wa=0;wa0&&(ya.push(Ya,"="),ya.push.apply(ya,fn(arguments)),ya.push(";")),Ya}return v(da,{def:wa,toString:function(){return Ln([Ma.length>0?"var "+Ma.join(",")+";":"",Ln(ya)])}})}function qr(){var ya=mr(),da=mr(),Ma=ya.toString,wa=da.toString;function Ya(Xa,Hn){da(Xa,Hn,"=",ya.def(Xa,Hn),";")}return v(function(){ya.apply(ya,fn(arguments))},{def:ya.def,entry:ya,exit:da,save:Ya,set:function(Xa,Hn,$n){Ya(Xa,Hn),ya(Xa,Hn,"=",$n,";")},toString:function(){return Ma()+wa()}})}function Lr(){var ya=Ln(arguments),da=qr(),Ma=qr(),wa=da.toString,Ya=Ma.toString;return v(da,{then:function(){return da.apply(da,fn(arguments)),this},else:function(){return Ma.apply(Ma,fn(arguments)),this},toString:function(){var Xa=Ya();return Xa&&(Xa="else{"+Xa+"}"),Ln(["if(",ya,"){",wa(),"}",Xa])}})}var ua=mr(),Ba={};function Pa(ya,da){var Ma=[];function wa(){var Si="a"+Ma.length;return Ma.push(Si),Si}da=da||0;for(var Ya=0;Ya":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},pn={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},xn={cw:je,ccw:Qe};function Bn(it){return Array.isArray(it)||Zt(it)||sr(it)}function Fn(it){return it.sort(function(Rt,qt){return Rt===rl?-1:qt===rl?1:Rt=1,or>=2,Rt)}else if(qt===Vo){var vr=it.data;return new mn(vr.thisDep,vr.contextDep,vr.propDep,Rt)}else{if(qt===Wo)return new mn(!1,!1,!1,Rt);if(qt===Yo){for(var Ar=!1,dr=!1,mr=!1,qr=0;qr=1&&(dr=!0),cn>=2&&(mr=!0)}else Lr.type===Vo&&(Ar=Ar||Lr.data.thisDep,dr=dr||Lr.data.contextDep,mr=mr||Lr.data.propDep)}return new mn(Ar,dr,mr,Rt)}else return new mn(qt===go,qt===oo,qt===Ga,Rt)}}var di=new mn(!1,!1,!1,function(){});function Oi(it,Rt,qt,or,vr,Ar,dr,mr,qr,Lr,cn,Nn,Dn,qn,_n,vn){var Sn=Lr.Record,Tn={add:32774,subtract:32778,"reverse subtract":32779};qt.ext_blend_minmax&&(Tn.min=tt,Tn.max=ut);var Xn=qt.angle_instanced_arrays,$n=qt.webgl_draw_buffers,Ha=qt.oes_vertex_array_object,$a={dirty:!0,profile:vn.profile},Si={},Ma=[],xa={},gi={};function Wa(en){return en.replace(".","_")}function Ya(en,dn,An){var sa=Wa(en);Ma.push(en),Si[sa]=$a[sa]=!!An,xa[sa]=dn}function Xa(en,dn,An){var sa=Wa(en);Ma.push(en),Array.isArray(An)?($a[sa]=An.slice(),Si[sa]=An.slice()):$a[sa]=Si[sa]=An,gi[sa]=dn}function pi(en){return!!isNaN(en)}Ya(as,ya),Ya(Bo,Zn),Xa(Ks,"blendColor",[0,0,0,0]),Xa(Rs,"blendEquationSeparate",[yr,yr]),Xa(ps,"blendFuncSeparate",[gr,Qt,gr,Qt]),Ya(vi,wi,!0),Xa(Xo,"depthFunc",Kr),Xa(Ss,"depthRange",[0,1]),Xa(Ws,"depthMask",!0),Xa(Dl,Dl,[!0,!0,!0,!0]),Ya(Nl,Cn),Xa(Kl,"cullFace",Se),Xa(Fu,Fu,Qe),Xa(Al,Al,1),Ya(zu,Ti),Xa(bu,"polygonOffset",[0,0]),Ya(ic,_o),Ya(Oc,bo),Xa(Zu,"sampleCoverage",[1,!1]),Ya(hu,Na),Xa(Jl,"stencilMask",-1),Xa(Ql,"stencilFunc",[jt,0,-1]),Xa(xu,"stencilOpSeparate",[he,St,St,St]),Xa(rf,"stencilOpSeparate",[Se,St,St,St]),Ya(Ff,Yi),Xa(xc,"scissor",[0,0,it.drawingBufferWidth,it.drawingBufferHeight]),Xa(rl,rl,[0,0,it.drawingBufferWidth,it.drawingBufferHeight]);var Xi={gl:it,context:Dn,strings:Rt,next:Si,current:$a,draw:Nn,elements:Ar,buffer:vr,shader:cn,attributes:Lr.state,vao:Lr,uniforms:qr,framebuffer:mr,extensions:qt,timer:qn,isBufferArgs:Bn},Eo={primTypes:pa,compareFuncs:rn,blendFuncs:Rn,blendEquations:Tn,stencilOps:pn,glTypes:on,orientationType:xn};$n&&(Eo.backBuffer=[Se],Eo.drawBuffer=f(or.maxDrawbuffers,function(en){return en===0?[0]:f(en,function(dn){return bn+dn})}));var yi=0;function Ui(){var en=qa({cache:_n}),dn=en.link,An=en.global;en.id=yi++,en.batchId="0";var sa=dn(Xi),wa=en.shared={props:"a0"};Object.keys(Xi).forEach(function(wt){wa[wt]=An.def(sa,".",wt)});var Le=en.next={},Oe=en.current={};Object.keys(gi).forEach(function(wt){Array.isArray($a[wt])&&(Le[wt]=An.def(wa.next,".",wt),Oe[wt]=An.def(wa.current,".",wt))});var Ke=en.constants={};Object.keys(Eo).forEach(function(wt){Ke[wt]=An.def(JSON.stringify(Eo[wt]))}),en.invoke=function(wt,Pt){switch(Pt.type){case Va:var pr=["this",wa.context,wa.props,en.batchId];return wt.def(dn(Pt.data),".call(",pr.slice(0,Math.max(Pt.data.length+1,4)),")");case Ga:return wt.def(wa.props,Pt.data);case oo:return wt.def(wa.context,Pt.data);case go:return wt.def("this",Pt.data);case Vo:return Pt.data.append(en,wt),Pt.data.ref;case Wo:return Pt.data.toString();case Yo:return Pt.data.map(function(Zr){return en.invoke(wt,Zr)})}},en.attribCache={};var yt={};return en.scopeAttrib=function(wt){var Pt=Rt.id(wt);if(Pt in yt)return yt[Pt];var pr=Lr.scope[Pt];pr||(pr=Lr.scope[Pt]=new Sn);var Zr=yt[Pt]=dn(pr);return Zr},en}function fo(en){var dn=en.static,An=en.dynamic,sa;if(Ol in dn){var wa=!!dn[Ol];sa=Oa(function(Oe,Ke){return wa}),sa.enable=wa}else if(Ol in An){var Le=An[Ol];sa=Ka(Le,function(Oe,Ke){return Oe.invoke(Ke,Le)})}return sa}function To(en,dn){var An=en.static,sa=en.dynamic;if(Bu in An){var wa=An[Bu];return wa?(wa=mr.getFramebuffer(wa),Oa(function(Oe,Ke){var yt=Oe.link(wa),wt=Oe.shared;Ke.set(wt.framebuffer,".next",yt);var Pt=wt.context;return Ke.set(Pt,"."+_t,yt+".width"),Ke.set(Pt,"."+Nt,yt+".height"),yt})):Oa(function(Oe,Ke){var yt=Oe.shared;Ke.set(yt.framebuffer,".next","null");var wt=yt.context;return Ke.set(wt,"."+_t,wt+"."+Ur),Ke.set(wt,"."+Nt,wt+"."+kr),"null"})}else if(Bu in sa){var Le=sa[Bu];return Ka(Le,function(Oe,Ke){var yt=Oe.invoke(Ke,Le),wt=Oe.shared,Pt=wt.framebuffer,pr=Ke.def(Pt,".getFramebuffer(",yt,")");Ke.set(Pt,".next",pr);var Zr=wt.context;return Ke.set(Zr,"."+_t,pr+"?"+pr+".width:"+Zr+"."+Ur),Ke.set(Zr,"."+Nt,pr+"?"+pr+".height:"+Zr+"."+kr),pr})}else return null}function jo(en,dn,An){var sa=en.static,wa=en.dynamic;function Le(yt){if(yt in sa){var wt=sa[yt],Pt=!0,pr=wt.x|0,Zr=wt.y|0,Mn,va;return"width"in wt?Mn=wt.width|0:Pt=!1,"height"in wt?va=wt.height|0:Pt=!1,new mn(!Pt&&dn&&dn.thisDep,!Pt&&dn&&dn.contextDep,!Pt&&dn&&dn.propDep,function(ja,ka){var za=ja.shared.context,Ua=Mn;"width"in wt||(Ua=ka.def(za,".",_t,"-",pr));var Ja=va;return"height"in wt||(Ja=ka.def(za,".",Nt,"-",Zr)),[pr,Zr,Ua,Ja]})}else if(yt in wa){var aa=wa[yt],ea=Ka(aa,function(ja,ka){var za=ja.invoke(ka,aa),Ua=ja.shared.context,Ja=ka.def(za,".x|0"),hi=ka.def(za,".y|0"),Ki=ka.def('"width" in ',za,"?",za,".width|0:","(",Ua,".",_t,"-",Ja,")"),Qo=ka.def('"height" in ',za,"?",za,".height|0:","(",Ua,".",Nt,"-",hi,")");return[Ja,hi,Ki,Qo]});return dn&&(ea.thisDep=ea.thisDep||dn.thisDep,ea.contextDep=ea.contextDep||dn.contextDep,ea.propDep=ea.propDep||dn.propDep),ea}else return dn?new mn(dn.thisDep,dn.contextDep,dn.propDep,function(ja,ka){var za=ja.shared.context;return[0,0,ka.def(za,".",_t),ka.def(za,".",Nt)]}):null}var Oe=Le(rl);if(Oe){var Ke=Oe;Oe=new mn(Oe.thisDep,Oe.contextDep,Oe.propDep,function(yt,wt){var Pt=Ke.append(yt,wt),pr=yt.shared.context;return wt.set(pr,"."+Bt,Pt[2]),wt.set(pr,"."+Yt,Pt[3]),Pt})}return{viewport:Oe,scissor_box:Le(xc)}}function qs(en,dn){var An=en.static,sa=typeof An[jc]=="string"&&typeof An[nf]=="string";if(sa){if(Object.keys(dn.dynamic).length>0)return null;var wa=dn.static,Le=Object.keys(wa);if(Le.length>0&&typeof wa[Le[0]]=="number"){for(var Oe=[],Ke=0;Ke"+Ja+"?"+Pt+".constant["+Ja+"]:0;"}).join(""),"}}else{","if(",Mn,"(",Pt,".buffer)){",ja,"=",va,".createStream(",sn,",",Pt,".buffer);","}else{",ja,"=",va,".getBuffer(",Pt,".buffer);","}",ka,'="type" in ',Pt,"?",Zr.glTypes,"[",Pt,".type]:",ja,".dtype;",aa.normalized,"=!!",Pt,".normalized;");function za(Ua){wt(aa[Ua],"=",Pt,".",Ua,"|0;")}return za("size"),za("offset"),za("stride"),za("divisor"),wt("}}"),wt.exit("if(",aa.isStream,"){",va,".destroyStream(",ja,");","}"),aa}wa[Le]=Ka(Oe,Ke)}),wa}function ss(en){var dn=en.static,An=en.dynamic,sa={};return Object.keys(dn).forEach(function(wa){var Le=dn[wa];sa[wa]=Oa(function(Oe,Ke){return typeof Le=="number"||typeof Le=="boolean"?""+Le:Oe.link(Le)})}),Object.keys(An).forEach(function(wa){var Le=An[wa];sa[wa]=Ka(Le,function(Oe,Ke){return Oe.invoke(Ke,Le)})}),sa}function ks(en,dn,An,sa,wa){var Le=en.static,Oe=en.dynamic,Ke=qs(en,dn),yt=To(en,wa),wt=jo(en,yt,wa),Pt=Uo(en,wa),pr=Qs(en,wa),Zr=Vs(en,wa,Ke);function Mn(za){var Ua=wt[za];Ua&&(pr[za]=Ua)}Mn(rl),Mn(Wa(xc));var va=Object.keys(pr).length>0,aa={framebuffer:yt,draw:Pt,shader:Zr,state:pr,dirty:va,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(aa.profile=fo(en,wa),aa.uniforms=os(An,wa),aa.drawVAO=aa.scopeVAO=Pt.vao,!aa.drawVAO&&Zr.program&&!Ke&&qt.angle_instanced_arrays&&Pt.static.elements){var ea=!0,ja=Zr.program.attributes.map(function(za){var Ua=dn.static[za];return ea=ea&&!!Ua,Ua});if(ea&&ja.length>0){var ka=Lr.getVAO(Lr.createVAO({attributes:ja,elements:Pt.static.elements}));aa.drawVAO=new mn(null,null,null,function(za,Ua){return za.link(ka)}),aa.useVAO=!0}}return Ke?aa.useVAO=!0:aa.attributes=hs(dn,wa),aa.context=ss(sa,wa),aa}function ts(en,dn,An){var sa=en.shared,wa=sa.context,Le=en.scope();Object.keys(An).forEach(function(Oe){dn.save(wa,"."+Oe);var Ke=An[Oe],yt=Ke.append(en,dn);Array.isArray(yt)?Le(wa,".",Oe,"=[",yt.join(),"];"):Le(wa,".",Oe,"=",yt,";")}),dn(Le)}function el(en,dn,An,sa){var wa=en.shared,Le=wa.gl,Oe=wa.framebuffer,Ke;$n&&(Ke=dn.def(wa.extensions,".webgl_draw_buffers"));var yt=en.constants,wt=yt.drawBuffer,Pt=yt.backBuffer,pr;An?pr=An.append(en,dn):pr=dn.def(Oe,".next"),sa||dn("if(",pr,"!==",Oe,".cur){"),dn("if(",pr,"){",Le,".bindFramebuffer(",$r,",",pr,".framebuffer);"),$n&&dn(Ke,".drawBuffersWEBGL(",wt,"[",pr,".colorAttachments.length]);"),dn("}else{",Le,".bindFramebuffer(",$r,",null);"),$n&&dn(Ke,".drawBuffersWEBGL(",Pt,");"),dn("}",Oe,".cur=",pr,";"),sa||dn("}")}function Il(en,dn,An){var sa=en.shared,wa=sa.gl,Le=en.current,Oe=en.next,Ke=sa.current,yt=sa.next,wt=en.cond(Ke,".dirty");Ma.forEach(function(Pt){var pr=Wa(Pt);if(!(pr in An.state)){var Zr,Mn;if(pr in Oe){Zr=Oe[pr],Mn=Le[pr];var va=f($a[pr].length,function(ea){return wt.def(Zr,"[",ea,"]")});wt(en.cond(va.map(function(ea,ja){return ea+"!=="+Mn+"["+ja+"]"}).join("||")).then(wa,".",gi[pr],"(",va,");",va.map(function(ea,ja){return Mn+"["+ja+"]="+ea}).join(";"),";"))}else{Zr=wt.def(yt,".",pr);var aa=en.cond(Zr,"!==",Ke,".",pr);wt(aa),pr in xa?aa(en.cond(Zr).then(wa,".enable(",xa[pr],");").else(wa,".disable(",xa[pr],");"),Ke,".",pr,"=",Zr,";"):aa(wa,".",gi[pr],"(",Zr,");",Ke,".",pr,"=",Zr,";")}}}),Object.keys(An.state).length===0&&wt(Ke,".dirty=false;"),dn(wt)}function Do(en,dn,An,sa){var wa=en.shared,Le=en.current,Oe=wa.current,Ke=wa.gl,yt;Fn(Object.keys(An)).forEach(function(wt){var Pt=An[wt];if(!(sa&&!sa(Pt))){var pr=Pt.append(en,dn);if(xa[wt]){var Zr=xa[wt];Ea(Pt)?(yt=en.link(pr,{stable:!0}),dn(en.cond(yt).then(Ke,".enable(",Zr,");").else(Ke,".disable(",Zr,");")),dn(Oe,".",wt,"=",yt,";")):(dn(en.cond(pr).then(Ke,".enable(",Zr,");").else(Ke,".disable(",Zr,");")),dn(Oe,".",wt,"=",pr,";"))}else if(Or(pr)){var Mn=Le[wt];dn(Ke,".",gi[wt],"(",pr,");",pr.map(function(va,aa){return Mn+"["+aa+"]="+va}).join(";"),";")}else Ea(Pt)?(yt=en.link(pr,{stable:!0}),dn(Ke,".",gi[wt],"(",yt,");",Oe,".",wt,"=",yt,";")):dn(Ke,".",gi[wt],"(",pr,");",Oe,".",wt,"=",pr,";")}})}function ru(en,dn){Xn&&(en.instancing=dn.def(en.shared.extensions,".angle_instanced_arrays"))}function Ns(en,dn,An,sa,wa){var Le=en.shared,Oe=en.stats,Ke=Le.current,yt=Le.timer,wt=An.profile;function Pt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var pr,Zr;function Mn(za){pr=dn.def(),za(pr,"=",Pt(),";"),typeof wa=="string"?za(Oe,".count+=",wa,";"):za(Oe,".count++;"),qn&&(sa?(Zr=dn.def(),za(Zr,"=",yt,".getNumPendingQueries();")):za(yt,".beginQuery(",Oe,");"))}function va(za){za(Oe,".cpuTime+=",Pt(),"-",pr,";"),qn&&(sa?za(yt,".pushScopeStats(",Zr,",",yt,".getNumPendingQueries(),",Oe,");"):za(yt,".endQuery();"))}function aa(za){var Ua=dn.def(Ke,".profile");dn(Ke,".profile=",za,";"),dn.exit(Ke,".profile=",Ua,";")}var ea;if(wt){if(Ea(wt)){wt.enable?(Mn(dn),va(dn.exit),aa("true")):aa("false");return}ea=wt.append(en,dn),aa(ea)}else ea=dn.def(Ke,".profile");var ja=en.block();Mn(ja),dn("if(",ea,"){",ja,"}");var ka=en.block();va(ka),dn.exit("if(",ea,"){",ka,"}")}function Nu(en,dn,An,sa,wa){var Le=en.shared;function Oe(yt){switch(yt){case fs:case ql:case Vi:return 2;case Po:case Js:case fl:return 3;case Es:case Tu:case Ku:return 4;default:return 1}}function Ke(yt,wt,Pt){var pr=Le.gl,Zr=dn.def(yt,".location"),Mn=dn.def(Le.attributes,"[",Zr,"]"),va=Pt.state,aa=Pt.buffer,ea=[Pt.x,Pt.y,Pt.z,Pt.w],ja=["buffer","normalized","offset","stride"];function ka(){dn("if(!",Mn,".buffer){",pr,".enableVertexAttribArray(",Zr,");}");var Ua=Pt.type,Ja;if(Pt.size?Ja=dn.def(Pt.size,"||",wt):Ja=wt,dn("if(",Mn,".type!==",Ua,"||",Mn,".size!==",Ja,"||",ja.map(function(Ki){return Mn+"."+Ki+"!=="+Pt[Ki]}).join("||"),"){",pr,".bindBuffer(",sn,",",aa,".buffer);",pr,".vertexAttribPointer(",[Zr,Ja,Ua,Pt.normalized,Pt.stride,Pt.offset],");",Mn,".type=",Ua,";",Mn,".size=",Ja,";",ja.map(function(Ki){return Mn+"."+Ki+"="+Pt[Ki]+";"}).join(""),"}"),Xn){var hi=Pt.divisor;dn("if(",Mn,".divisor!==",hi,"){",en.instancing,".vertexAttribDivisorANGLE(",[Zr,hi],");",Mn,".divisor=",hi,";}")}}function za(){dn("if(",Mn,".buffer){",pr,".disableVertexAttribArray(",Zr,");",Mn,".buffer=null;","}if(",Bi.map(function(Ua,Ja){return Mn+"."+Ua+"!=="+ea[Ja]}).join("||"),"){",pr,".vertexAttrib4f(",Zr,",",ea,");",Bi.map(function(Ua,Ja){return Mn+"."+Ua+"="+ea[Ja]+";"}).join(""),"}")}va===Zi?ka():va===_i?za():(dn("if(",va,"===",Zi,"){"),ka(),dn("}else{"),za(),dn("}"))}sa.forEach(function(yt){var wt=yt.name,Pt=An.attributes[wt],pr;if(Pt){if(!wa(Pt))return;pr=Pt.append(en,dn)}else{if(!wa(di))return;var Zr=en.scopeAttrib(wt);pr={},Object.keys(new Sn).forEach(function(Mn){pr[Mn]=dn.def(Zr,".",Mn)})}Ke(en.link(yt),Oe(yt.info.type),pr)})}function Vl(en,dn,An,sa,wa,Le){for(var Oe=en.shared,Ke=Oe.gl,yt,wt=0;wt1){for(var Ds=[],ys=[],Gl=0;Gl>1)",aa],");")}function hi(){An(ea,".drawArraysInstancedANGLE(",[Zr,Mn,va,aa],");")}Pt&&Pt!=="null"?ka?Ja():(An("if(",Pt,"){"),Ja(),An("}else{"),hi(),An("}")):hi()}function Ua(){function Ja(){An(Le+".drawElements("+[Zr,va,ja,Mn+"<<(("+ja+"-"+Ni+")>>1)"]+");")}function hi(){An(Le+".drawArrays("+[Zr,Mn,va]+");")}Pt&&Pt!=="null"?ka?Ja():(An("if(",Pt,"){"),Ja(),An("}else{"),hi(),An("}")):hi()}Xn&&(typeof aa!="number"||aa>=0)?typeof aa=="string"?(An("if(",aa,">0){"),za(),An("}else if(",aa,"<0){"),Ua(),An("}")):za():Ua()}function Co(en,dn,An,sa,wa){var Le=Ui(),Oe=Le.proc("body",wa);return Xn&&(Le.instancing=Oe.def(Le.shared.extensions,".angle_instanced_arrays")),en(Le,Oe,An,sa),Le.compile().body}function is(en,dn,An,sa){ru(en,dn),An.useVAO?An.drawVAO?dn(en.shared.vao,".setVAO(",An.drawVAO.append(en,dn),");"):dn(en.shared.vao,".setVAO(",en.shared.vao,".targetVAO);"):(dn(en.shared.vao,".setVAO(null);"),Nu(en,dn,An,sa.attributes,function(){return!0})),Vl(en,dn,An,sa.uniforms,function(){return!0},!1),Hl(en,dn,dn,An)}function Hs(en,dn){var An=en.proc("draw",1);ru(en,An),ts(en,An,dn.context),el(en,An,dn.framebuffer),Il(en,An,dn),Do(en,An,dn.state),Ns(en,An,dn,!1,!0);var sa=dn.shader.progVar.append(en,An);if(An(en.shared.gl,".useProgram(",sa,".program);"),dn.shader.program)is(en,An,dn,dn.shader.program);else{An(en.shared.vao,".setVAO(null);");var wa=en.global.def("{}"),Le=An.def(sa,".id"),Oe=An.def(wa,"[",Le,"]");An(en.cond(Oe).then(Oe,".call(this,a0);").else(Oe,"=",wa,"[",Le,"]=",en.link(function(Ke){return Co(is,en,dn,Ke,1)}),"(",sa,");",Oe,".call(this,a0);"))}Object.keys(dn.state).length>0&&An(en.shared.current,".dirty=true;"),en.shared.vao&&An(en.shared.vao,".setVAO(null);")}function fn(en,dn,An,sa){en.batchId="a1",ru(en,dn);function wa(){return!0}Nu(en,dn,An,sa.attributes,wa),Vl(en,dn,An,sa.uniforms,wa,!1),Hl(en,dn,dn,An)}function la(en,dn,An,sa){ru(en,dn);var wa=An.contextDep,Le=dn.def(),Oe="a0",Ke="a1",yt=dn.def();en.shared.props=yt,en.batchId=Le;var wt=en.scope(),Pt=en.scope();dn(wt.entry,"for(",Le,"=0;",Le,"<",Ke,";++",Le,"){",yt,"=",Oe,"[",Le,"];",Pt,"}",wt.exit);function pr(ja){return ja.contextDep&&wa||ja.propDep}function Zr(ja){return!pr(ja)}if(An.needsContext&&ts(en,Pt,An.context),An.needsFramebuffer&&el(en,Pt,An.framebuffer),Do(en,Pt,An.state,pr),An.profile&&pr(An.profile)&&Ns(en,Pt,An,!1,!0),sa)An.useVAO?An.drawVAO?pr(An.drawVAO)?Pt(en.shared.vao,".setVAO(",An.drawVAO.append(en,Pt),");"):wt(en.shared.vao,".setVAO(",An.drawVAO.append(en,wt),");"):wt(en.shared.vao,".setVAO(",en.shared.vao,".targetVAO);"):(wt(en.shared.vao,".setVAO(null);"),Nu(en,wt,An,sa.attributes,Zr),Nu(en,Pt,An,sa.attributes,pr)),Vl(en,wt,An,sa.uniforms,Zr,!1),Vl(en,Pt,An,sa.uniforms,pr,!0),Hl(en,wt,Pt,An);else{var Mn=en.global.def("{}"),va=An.shader.progVar.append(en,Pt),aa=Pt.def(va,".id"),ea=Pt.def(Mn,"[",aa,"]");Pt(en.shared.gl,".useProgram(",va,".program);","if(!",ea,"){",ea,"=",Mn,"[",aa,"]=",en.link(function(ja){return Co(fn,en,An,ja,2)}),"(",va,");}",ea,".call(this,a0[",Le,"],",Le,");")}}function ha(en,dn){var An=en.proc("batch",2);en.batchId="0",ru(en,An);var sa=!1,wa=!0;Object.keys(dn.context).forEach(function(Mn){sa=sa||dn.context[Mn].propDep}),sa||(ts(en,An,dn.context),wa=!1);var Le=dn.framebuffer,Oe=!1;Le?(Le.propDep?sa=Oe=!0:Le.contextDep&&sa&&(Oe=!0),Oe||el(en,An,Le)):el(en,An,null),dn.state.viewport&&dn.state.viewport.propDep&&(sa=!0);function Ke(Mn){return Mn.contextDep&&sa||Mn.propDep}Il(en,An,dn),Do(en,An,dn.state,function(Mn){return!Ke(Mn)}),(!dn.profile||!Ke(dn.profile))&&Ns(en,An,dn,!1,"a1"),dn.contextDep=sa,dn.needsContext=wa,dn.needsFramebuffer=Oe;var yt=dn.shader.progVar;if(yt.contextDep&&sa||yt.propDep)la(en,An,dn,null);else{var wt=yt.append(en,An);if(An(en.shared.gl,".useProgram(",wt,".program);"),dn.shader.program)la(en,An,dn,dn.shader.program);else{An(en.shared.vao,".setVAO(null);");var Pt=en.global.def("{}"),pr=An.def(wt,".id"),Zr=An.def(Pt,"[",pr,"]");An(en.cond(Zr).then(Zr,".call(this,a0,a1);").else(Zr,"=",Pt,"[",pr,"]=",en.link(function(Mn){return Co(la,en,dn,Mn,2)}),"(",wt,");",Zr,".call(this,a0,a1);"))}}Object.keys(dn.state).length>0&&An(en.shared.current,".dirty=true;"),en.shared.vao&&An(en.shared.vao,".setVAO(null);")}function ao(en,dn){var An=en.proc("scope",3);en.batchId="a2";var sa=en.shared,wa=sa.current;if(ts(en,An,dn.context),dn.framebuffer&&dn.framebuffer.append(en,An),Fn(Object.keys(dn.state)).forEach(function(Ke){var yt=dn.state[Ke],wt=yt.append(en,An);Or(wt)?wt.forEach(function(Pt,pr){pi(Pt)?An.set(en.next[Ke],"["+pr+"]",Pt):An.set(en.next[Ke],"["+pr+"]",en.link(Pt,{stable:!0}))}):Ea(yt)?An.set(sa.next,"."+Ke,en.link(wt,{stable:!0})):An.set(sa.next,"."+Ke,wt)}),Ns(en,An,dn,!0,!0),[wu,Ci,Ul,eu,jl].forEach(function(Ke){var yt=dn.draw[Ke];if(yt){var wt=yt.append(en,An);pi(wt)?An.set(sa.draw,"."+Ke,wt):An.set(sa.draw,"."+Ke,en.link(wt),{stable:!0})}}),Object.keys(dn.uniforms).forEach(function(Ke){var yt=dn.uniforms[Ke].append(en,An);Array.isArray(yt)&&(yt="["+yt.map(function(wt){return pi(wt)?wt:en.link(wt,{stable:!0})})+"]"),An.set(sa.uniforms,"["+en.link(Rt.id(Ke),{stable:!0})+"]",yt)}),Object.keys(dn.attributes).forEach(function(Ke){var yt=dn.attributes[Ke].append(en,An),wt=en.scopeAttrib(Ke);Object.keys(new Sn).forEach(function(Pt){An.set(wt,"."+Pt,yt[Pt])})}),dn.scopeVAO){var Le=dn.scopeVAO.append(en,An);pi(Le)?An.set(sa.vao,".targetVAO",Le):An.set(sa.vao,".targetVAO",en.link(Le,{stable:!0}))}function Oe(Ke){var yt=dn.shader[Ke];if(yt){var wt=yt.append(en,An);pi(wt)?An.set(sa.shader,"."+Ke,wt):An.set(sa.shader,"."+Ke,en.link(wt,{stable:!0}))}}Oe(nf),Oe(jc),Object.keys(dn.state).length>0&&(An(wa,".dirty=true;"),An.exit(wa,".dirty=true;")),An("a1(",en.shared.context,",a0,",en.batchId,");")}function ds(en){if(!(typeof en!="object"||Or(en))){for(var dn=Object.keys(en),An=0;An=0;--Co){var is=Xi[Co];is&&is(_n,null,0)}qt.flush(),cn&&cn.update()}function jo(){!fo&&Xi.length>0&&(fo=m.next(To))}function qs(){fo&&(m.cancel(To),fo=null)}function Vs(Co){Co.preventDefault(),vr=!0,qs(),Eo.forEach(function(is){is()})}function Uo(Co){qt.getError(),vr=!1,Ar.restore(),Si.restore(),Xn.restore(),Ma.restore(),xa.restore(),gi.restore(),Ha.restore(),cn&&cn.restore(),Wa.procs.refresh(),jo(),yi.forEach(function(is){is()})}pi&&(pi.addEventListener(Ne,Vs,!1),pi.addEventListener(Ye,Uo,!1));function Qs(){Xi.length=0,qs(),pi&&(pi.removeEventListener(Ne,Vs),pi.removeEventListener(Ye,Uo)),Si.clear(),gi.clear(),xa.clear(),Ha.clear(),Ma.clear(),$n.clear(),Xn.clear(),cn&&cn.clear(),Ui.forEach(function(Co){Co()})}function os(Co){function is(Le){var Oe=v({},Le);delete Oe.uniforms,delete Oe.attributes,delete Oe.context,delete Oe.vao,"stencil"in Oe&&Oe.stencil.op&&(Oe.stencil.opBack=Oe.stencil.opFront=Oe.stencil.op,delete Oe.stencil.op);function Ke(yt){if(yt in Oe){var wt=Oe[yt];delete Oe[yt],Object.keys(wt).forEach(function(Pt){Oe[yt+"."+Pt]=wt[Pt]})}}return Ke("blend"),Ke("depth"),Ke("cull"),Ke("stencil"),Ke("polygonOffset"),Ke("scissor"),Ke("sample"),"vao"in Le&&(Oe.vao=Le.vao),Oe}function Hs(Le,Oe){var Ke={},yt={};return Object.keys(Le).forEach(function(wt){var Pt=Le[wt];if(c.isDynamic(Pt)){yt[wt]=c.unbox(Pt,wt);return}else if(Oe&&Array.isArray(Pt)){for(var pr=0;pr0)return en.call(this,sa(Le|0),Le|0)}else if(Array.isArray(Le)){if(Le.length)return en.call(this,Le,Le.length)}else return io.call(this,Le)}return v(wa,{stats:ds,destroy:function(){Os.destroy()}})}var hs=gi.setFBO=os({framebuffer:c.define.call(null,lt,"framebuffer")});function ss(Co,is){var Hs=0;Wa.procs.poll();var fn=is.color;fn&&(qt.clearColor(+fn[0]||0,+fn[1]||0,+fn[2]||0,+fn[3]||0),Hs|=ie),"depth"in is&&(qt.clearDepth(+is.depth),Hs|=ce),"stencil"in is&&(qt.clearStencil(is.stencil|0),Hs|=_e),qt.clear(Hs)}function ks(Co){if("framebuffer"in Co)if(Co.framebuffer&&Co.framebuffer_reglType==="framebufferCube")for(var is=0;is<6;++is)hs(v({framebuffer:Co.framebuffer.faces[is]},Co),ss);else hs(Co,ss);else ss(null,Co)}function ts(Co){Xi.push(Co);function is(){var Hs=Gt(Xi,Co);function fn(){var la=Gt(Xi,fn);Xi[la]=Xi[Xi.length-1],Xi.length-=1,Xi.length<=0&&qs()}Xi[Hs]=fn}return jo(),{cancel:is}}function el(){var Co=Xa.viewport,is=Xa.scissor_box;Co[0]=Co[1]=is[0]=is[1]=0,_n.viewportWidth=_n.framebufferWidth=_n.drawingBufferWidth=Co[2]=is[2]=qt.drawingBufferWidth,_n.viewportHeight=_n.framebufferHeight=_n.drawingBufferHeight=Co[3]=is[3]=qt.drawingBufferHeight}function Il(){_n.tick+=1,_n.time=ru(),el(),Wa.procs.poll()}function Do(){Ma.refresh(),el(),Wa.procs.refresh(),cn&&cn.update()}function ru(){return(h()-Nn)/1e3}Do();function Ns(Co,is){var Hs;switch(Co){case"frame":return ts(is);case"lost":Hs=Eo;break;case"restore":Hs=yi;break;case"destroy":Hs=Ui;break;default:}return Hs.push(is),{cancel:function(){for(var fn=0;fn=0},read:Ya,destroy:Qs,_gl:qt,_refresh:Do,poll:function(){Il(),cn&&cn.update()},now:ru,stats:mr,getCachedCode:Nu,preloadCachedCode:Vl});return Rt.onDone(null,Hl),Hl}return Jt})}}),I9=Ee({"node_modules/gl-util/context.js"(J,V){"use strict";var v=Jh();V.exports=function(a){if(a?typeof a=="string"&&(a={container:a}):a={},E(a)?a={container:a}:k(a)?a={container:a}:l(a)?a={gl:a}:a=v(a,{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),a.pixelRatio||(a.pixelRatio=window.pixelRatio||1),a.gl)return a.gl;if(a.canvas&&(a.container=a.canvas.parentNode),a.container){if(typeof a.container=="string"){var r=document.querySelector(a.container);if(!r)throw Error("Element "+a.container+" is not found");a.container=r}E(a.container)?(a.canvas=a.container,a.container=a.canvas.parentNode):a.canvas||(a.canvas=e(),a.container.appendChild(a.canvas),x(a))}else if(!a.canvas)if(typeof document<"u")a.container=document.body||document.documentElement,a.canvas=e(),a.container.appendChild(a.canvas),x(a);else throw Error("Not DOM environment. Use headless-gl.");return a.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{a.gl=a.canvas.getContext(n,a.attrs)}catch{}return a.gl}),a.gl};function x(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*window.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*window.innerHeight);else{var a=t.container.getBoundingClientRect();t.canvas.width=t.width||a.right-a.left,t.canvas.height=t.height||a.bottom-a.top}}function E(t){return typeof t.getContext=="function"&&"width"in t&&"height"in t}function k(t){return typeof t.nodeName=="string"&&typeof t.appendChild=="function"&&typeof t.getBoundingClientRect=="function"}function l(t){return typeof t.drawArrays=="function"||typeof t.drawElements=="function"}function e(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}}}),R9=Ee({"node_modules/font-atlas/index.js"(J,V){"use strict";var v=$w(),x=[32,126];V.exports=E;function E(k){k=k||{};var l=k.shape?k.shape:k.canvas?[k.canvas.width,k.canvas.height]:[512,512],e=k.canvas||document.createElement("canvas"),t=k.font,a=typeof k.step=="number"?[k.step,k.step]:k.step||[32,32],r=k.chars||x;if(t&&typeof t!="string"&&(t=v(t)),!Array.isArray(r))r=String(r).split("");else if(r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"){for(var n=[],o=r[0],s=0;o<=r[1];o++)n[s++]=String.fromCharCode(o);r=n}l=l.slice(),e.width=l[0],e.height=l[1];var c=e.getContext("2d");c.fillStyle="#000",c.fillRect(0,0,e.width,e.height),c.font=t,c.textAlign="center",c.textBaseline="middle",c.fillStyle="#fff";for(var m=a[0]/2,h=a[1]/2,o=0;ol[0]-a[0]/2&&(m=a[0]/2,h+=a[1]);return e}}}),Kw=Ee({"node_modules/bit-twiddle/twiddle.js"(J){"use strict";"use restrict";var V=32;J.INT_BITS=V,J.INT_MAX=2147483647,J.INT_MIN=-1<0)-(E<0)},J.abs=function(E){var k=E>>V-1;return(E^k)-k},J.min=function(E,k){return k^(E^k)&-(E65535)<<4,E>>>=k,l=(E>255)<<3,E>>>=l,k|=l,l=(E>15)<<2,E>>>=l,k|=l,l=(E>3)<<1,E>>>=l,k|=l,k|E>>1},J.log10=function(E){return E>=1e9?9:E>=1e8?8:E>=1e7?7:E>=1e6?6:E>=1e5?5:E>=1e4?4:E>=1e3?3:E>=100?2:E>=10?1:0},J.popCount=function(E){return E=E-(E>>>1&1431655765),E=(E&858993459)+(E>>>2&858993459),(E+(E>>>4)&252645135)*16843009>>>24};function v(E){var k=32;return E&=-E,E&&k--,E&65535&&(k-=16),E&16711935&&(k-=8),E&252645135&&(k-=4),E&858993459&&(k-=2),E&1431655765&&(k-=1),k}J.countTrailingZeros=v,J.nextPow2=function(E){return E+=E===0,--E,E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E+1},J.prevPow2=function(E){return E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E-(E>>>1)},J.parity=function(E){return E^=E>>>16,E^=E>>>8,E^=E>>>4,E&=15,27030>>>E&1};var x=new Array(256);(function(E){for(var k=0;k<256;++k){var l=k,e=k,t=7;for(l>>>=1;l;l>>>=1)e<<=1,e|=l&1,--t;E[k]=e<>>8&255]<<16|x[E>>>16&255]<<8|x[E>>>24&255]},J.interleave2=function(E,k){return E&=65535,E=(E|E<<8)&16711935,E=(E|E<<4)&252645135,E=(E|E<<2)&858993459,E=(E|E<<1)&1431655765,k&=65535,k=(k|k<<8)&16711935,k=(k|k<<4)&252645135,k=(k|k<<2)&858993459,k=(k|k<<1)&1431655765,E|k<<1},J.deinterleave2=function(E,k){return E=E>>>k&1431655765,E=(E|E>>>1)&858993459,E=(E|E>>>2)&252645135,E=(E|E>>>4)&16711935,E=(E|E>>>16)&65535,E<<16>>16},J.interleave3=function(E,k,l){return E&=1023,E=(E|E<<16)&4278190335,E=(E|E<<8)&251719695,E=(E|E<<4)&3272356035,E=(E|E<<2)&1227133513,k&=1023,k=(k|k<<16)&4278190335,k=(k|k<<8)&251719695,k=(k|k<<4)&3272356035,k=(k|k<<2)&1227133513,E|=k<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,E|l<<2},J.deinterleave3=function(E,k){return E=E>>>k&1227133513,E=(E|E>>>2)&3272356035,E=(E|E>>>4)&251719695,E=(E|E>>>8)&4278190335,E=(E|E>>>16)&1023,E<<22>>22},J.nextCombination=function(E){var k=E|E-1;return k+1|(~k&-~k)-1>>>v(E)+1}}}),F9=Ee({"node_modules/dup/dup.js"(J,V){"use strict";function v(k,l,e){var t=k[e]|0;if(t<=0)return[];var a=new Array(t),r;if(e===k.length-1)for(r=0;r"u"&&(l=0),typeof k){case"number":if(k>0)return x(k|0,l);break;case"object":if(typeof k.length=="number")return v(k,l,0);break}return[]}V.exports=E}}),z9=Ee({"node_modules/typedarray-pool/pool.js"(J){"use strict";var V=Kw(),v=F9(),x=Nv().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:v([32,0]),UINT16:v([32,0]),UINT32:v([32,0]),BIGUINT64:v([32,0]),INT8:v([32,0]),INT16:v([32,0]),INT32:v([32,0]),BIGINT64:v([32,0]),FLOAT:v([32,0]),DOUBLE:v([32,0]),DATA:v([32,0]),UINT8C:v([32,0]),BUFFER:v([32,0])});var E=typeof Uint8ClampedArray<"u",k=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=v([32,0])),e.BIGUINT64||(e.BIGUINT64=v([32,0])),e.BIGINT64||(e.BIGINT64=v([32,0])),e.BUFFER||(e.BUFFER=v([32,0]));var t=e.DATA,a=e.BUFFER;J.free=function(u){if(x.isBuffer(u))a[V.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var A=u.length||u.byteLength,b=V.log2(A)|0;t[b].push(u)}};function r(f){if(f){var u=f.length||f.byteLength,A=V.log2(u);t[A].push(f)}}function n(f){r(f.buffer)}J.freeUint8=J.freeUint16=J.freeUint32=J.freeBigUint64=J.freeInt8=J.freeInt16=J.freeInt32=J.freeBigInt64=J.freeFloat32=J.freeFloat=J.freeFloat64=J.freeDouble=J.freeUint8Clamped=J.freeDataView=n,J.freeArrayBuffer=r,J.freeBuffer=function(u){a[V.log2(u.length)].push(u)},J.malloc=function(u,A){if(A===void 0||A==="arraybuffer")return o(u);switch(A){case"uint8":return s(u);case"uint16":return c(u);case"uint32":return m(u);case"int8":return h(u);case"int16":return p(u);case"int32":return g(u);case"float":case"float32":return i(u);case"double":case"float64":return w(u);case"uint8_clamped":return S(u);case"bigint64":return C(u);case"biguint64":return M(u);case"buffer":return T(u);case"data":case"dataview":return _(u);default:return null}return null};function o(u){var u=V.nextPow2(u),A=V.log2(u),b=t[A];return b.length>0?b.pop():new ArrayBuffer(u)}J.mallocArrayBuffer=o;function s(f){return new Uint8Array(o(f),0,f)}J.mallocUint8=s;function c(f){return new Uint16Array(o(2*f),0,f)}J.mallocUint16=c;function m(f){return new Uint32Array(o(4*f),0,f)}J.mallocUint32=m;function h(f){return new Int8Array(o(f),0,f)}J.mallocInt8=h;function p(f){return new Int16Array(o(2*f),0,f)}J.mallocInt16=p;function g(f){return new Int32Array(o(4*f),0,f)}J.mallocInt32=g;function i(f){return new Float32Array(o(4*f),0,f)}J.mallocFloat32=J.mallocFloat=i;function w(f){return new Float64Array(o(8*f),0,f)}J.mallocFloat64=J.mallocDouble=w;function S(f){return E?new Uint8ClampedArray(o(f),0,f):s(f)}J.mallocUint8Clamped=S;function M(f){return k?new BigUint64Array(o(8*f),0,f):null}J.mallocBigUint64=M;function C(f){return l?new BigInt64Array(o(8*f),0,f):null}J.mallocBigInt64=C;function _(f){return new DataView(o(f),0,f)}J.mallocDataView=_;function T(f){f=V.nextPow2(f);var u=V.log2(f),A=a[u];return A.length>0?A.pop():new x(f)}J.mallocBuffer=T,J.clearCache=function(){for(var u=0;u<32;++u)e.UINT8[u].length=0,e.UINT16[u].length=0,e.UINT32[u].length=0,e.INT8[u].length=0,e.INT16[u].length=0,e.INT32[u].length=0,e.FLOAT[u].length=0,e.DOUBLE[u].length=0,e.BIGUINT64[u].length=0,e.BIGINT64[u].length=0,e.UINT8C[u].length=0,t[u].length=0,a[u].length=0}}}),B9=Ee({"node_modules/is-plain-obj/index.js"(J,V){"use strict";var v=Object.prototype.toString;V.exports=function(x){var E;return v.call(x)==="[object Object]"&&(E=Object.getPrototypeOf(x),E===null||E===Object.getPrototypeOf({}))}}}),Jw=Ee({"node_modules/parse-unit/index.js"(J,V){V.exports=function(x,E){E||(E=[0,""]),x=String(x);var k=parseFloat(x,10);return E[0]=k,E[1]=x.match(/[\d.\-\+]*\s*(.*)/)[1]||"",E}}}),N9=Ee({"node_modules/gl-text/node_modules/to-px/topx.js"(J,V){"use strict";var v=Jw();V.exports=l;var x=96;function E(e,t){var a=v(getComputedStyle(e).getPropertyValue(t));return a[0]*l(a[1],e)}function k(e,t){var a=document.createElement("div");a.style["font-size"]="128"+e,t.appendChild(a);var r=E(a,"font-size")/128;return t.removeChild(a),r}function l(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return k(e,t);case"em":return E(t,"font-size");case"rem":return E(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return x;case"cm":return x/2.54;case"mm":return x/25.4;case"pt":return x/72;case"pc":return x/6}return 1}}}),O9=Ee({"node_modules/detect-kerning/index.js"(J,V){"use strict";V.exports=k;var v=k.canvas=document.createElement("canvas"),x=v.getContext("2d"),E=l([32,126]);k.createPairs=l,k.ascii=E;function k(e,t){Array.isArray(e)&&(e=e.join(", "));var a={},r,n=16,o=.05;t&&(t.length===2&&typeof t[0]=="number"?r=l(t):Array.isArray(t)?r=t:(t.o?r=l(t.o):t.pairs&&(r=t.pairs),t.fontSize&&(n=t.fontSize),t.threshold!=null&&(o=t.threshold))),r||(r=E),x.font=n+"px "+e;for(var s=0;sn*o){var p=(h-m)/n;a[c]=p*1e3}}return a}function l(e){for(var t=[],a=e[0];a<=e[1];a++)for(var r=String.fromCharCode(a),n=e[0];n0;a-=4)if(t[a]!==0)return Math.floor((a-3)*.25/e)}}}),U9=Ee({"node_modules/gl-text/dist.js"(J,V){"use strict";var v=D9(),x=Jh(),E=Zw(),k=I9(),l=Uw(),e=zm(),t=R9(),a=z9(),r=u0(),n=B9(),o=Jw(),s=N9(),c=O9(),m=Lc(),h=j9(),p=Qv(),g=Kw(),i=g.nextPow2,w=new l,S=!1;document.body&&(M=document.body.appendChild(document.createElement("div")),M.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(M).fontStretch&&(S=!0),document.body.removeChild(M));var M,C=function(f){_(f)?(f={regl:f},this.gl=f.regl._gl):this.gl=k(f),this.shader=w.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=f.regl||E({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),w.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(n(f)?f:{})};C.prototype.createShader=function(){var f=this.regl,u=f({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:f.prop("count"),offset:f.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:f.this("sizeBuffer")},width:{offset:0,stride:8,buffer:f.this("sizeBuffer")},char:f.this("charBuffer"),position:f.this("position")},uniforms:{atlasSize:function(b,z){return[z.atlas.width,z.atlas.height]},atlasDim:function(b,z){return[z.atlas.cols,z.atlas.rows]},atlas:function(b,z){return z.atlas.texture},charStep:function(b,z){return z.atlas.step},em:function(b,z){return z.atlas.em},color:f.prop("color"),opacity:f.prop("opacity"),viewport:f.this("viewportArray"),scale:f.this("scale"),align:f.prop("align"),baseline:f.prop("baseline"),translate:f.this("translate"),positionOffset:f.prop("positionOffset")},primitive:"points",viewport:f.this("viewport"),vert:` +`),Ma;if(Rt&&(Ma=Hf(da),Rt[Ma]))return Rt[Ma].apply(null,vr);var wa=Function.apply(null,or.concat(da));return Rt&&(Rt[Ma]=wa),wa.apply(null,vr)}return{global:ua,link:dr,block:mr,proc:Pa,scope:qr,cond:Lr,compile:Ua}}var Bi="xyzw".split(""),Ni=5121,Zi=1,_i=2,Vn=0,Gn=1,oo=2,yo=3,Vo=4,Wo=5,Yo=6,ns="dither",Bo="blend.enable",Ks="blend.color",Rs="blend.equation",ps="blend.func",vi="depth.enable",Xo="depth.func",Ss="depth.range",Ws="depth.mask",Dl="colorMask",Nl="cull.enable",Kl="cull.face",Fu="frontFace",Al="lineWidth",zu="polygonOffset.enable",bu="polygonOffset.offset",ic="sample.alpha",Oc="sample.enable",Zu="sample.coverage",hu="stencil.enable",Jl="stencil.mask",Ql="stencil.func",xu="stencil.opFront",rf="stencil.opBack",Ff="scissor.enable",xc="scissor.box",rl="viewport",Ol="profile",Bu="framebuffer",af="vert",jc="frag",wu="elements",jl="primitive",Ul="count",Ci="offset",eu="instances",Xe="vao",rt="Width",pt="Height",_t=Bu+rt,Nt=Bu+pt,Bt=rl+rt,Yt=rl+pt,Dr="drawingBuffer",Ur=Dr+rt,kr=Dr+pt,Wr=[ps,Rs,Ql,xu,rf,Zu,rl,xc,bu],oa=34962,ma=34963,ka=2884,$a=3042,yn=3024,Nn=2960,wi=2929,Yi=3089,Ti=32823,_o=32926,bo=32928,Zo=5126,fs=35664,Po=35665,Es=35666,cl=5124,ql=35667,Js=35668,Tu=35669,Li=35670,Vi=35671,fl=35672,Ku=35673,tu=35674,Bs=35675,oc=35676,du=35678,hl=35680,Uc=4,he=1028,Se=1029,Ue=2304,Qe=2305,tt=32775,ut=32776,jt=519,St=7680,Qt=0,gr=1,yr=32774,Kr=513,$r=36160,_a=36064,Ia={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},ra={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},va={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},ba={cw:Ue,ccw:Qe};function za(it){return Array.isArray(it)||Zt(it)||sr(it)}function Ra(it){return it.sort(function(Rt,qt){return Rt===rl?-1:qt===rl?1:Rt=1,or>=2,Rt)}else if(qt===Vo){var vr=it.data;return new pa(vr.thisDep,vr.contextDep,vr.propDep,Rt)}else{if(qt===Wo)return new pa(!1,!1,!1,Rt);if(qt===Yo){for(var Ar=!1,dr=!1,mr=!1,qr=0;qr=1&&(dr=!0),ua>=2&&(mr=!0)}else Lr.type===Vo&&(Ar=Ar||Lr.data.thisDep,dr=dr||Lr.data.contextDep,mr=mr||Lr.data.propDep)}return new pa(Ar,dr,mr,Rt)}else return new pa(qt===yo,qt===oo,qt===Gn,Rt)}}var di=new pa(!1,!1,!1,function(){});function Oi(it,Rt,qt,or,vr,Ar,dr,mr,qr,Lr,ua,Ba,Pa,Ua,ya,da){var Ma=Lr.Record,wa={add:32774,subtract:32778,"reverse subtract":32779};qt.ext_blend_minmax&&(wa.min=tt,wa.max=ut);var Ya=qt.angle_instanced_arrays,Xa=qt.webgl_draw_buffers,Hn=qt.oes_vertex_array_object,$n={dirty:!0,profile:da.profile},Si={},Mn=[],xn={},gi={};function Wn(ea){return ea.replace(".","_")}function Yn(ea,ha,Ta){var sn=Wn(ea);Mn.push(ea),Si[sn]=$n[sn]=!!Ta,xn[sn]=ha}function Xn(ea,ha,Ta){var sn=Wn(ea);Mn.push(ea),Array.isArray(Ta)?($n[sn]=Ta.slice(),Si[sn]=Ta.slice()):$n[sn]=Si[sn]=Ta,gi[sn]=ha}function pi(ea){return!!isNaN(ea)}Yn(ns,yn),Yn(Bo,$a),Xn(Ks,"blendColor",[0,0,0,0]),Xn(Rs,"blendEquationSeparate",[yr,yr]),Xn(ps,"blendFuncSeparate",[gr,Qt,gr,Qt]),Yn(vi,wi,!0),Xn(Xo,"depthFunc",Kr),Xn(Ss,"depthRange",[0,1]),Xn(Ws,"depthMask",!0),Xn(Dl,Dl,[!0,!0,!0,!0]),Yn(Nl,ka),Xn(Kl,"cullFace",Se),Xn(Fu,Fu,Qe),Xn(Al,Al,1),Yn(zu,Ti),Xn(bu,"polygonOffset",[0,0]),Yn(ic,_o),Yn(Oc,bo),Xn(Zu,"sampleCoverage",[1,!1]),Yn(hu,Nn),Xn(Jl,"stencilMask",-1),Xn(Ql,"stencilFunc",[jt,0,-1]),Xn(xu,"stencilOpSeparate",[he,St,St,St]),Xn(rf,"stencilOpSeparate",[Se,St,St,St]),Yn(Ff,Yi),Xn(xc,"scissor",[0,0,it.drawingBufferWidth,it.drawingBufferHeight]),Xn(rl,rl,[0,0,it.drawingBufferWidth,it.drawingBufferHeight]);var Xi={gl:it,context:Pa,strings:Rt,next:Si,current:$n,draw:Ba,elements:Ar,buffer:vr,shader:ua,attributes:Lr.state,vao:Lr,uniforms:qr,framebuffer:mr,extensions:qt,timer:Ua,isBufferArgs:za},Eo={primTypes:pn,compareFuncs:ra,blendFuncs:Ia,blendEquations:wa,stencilOps:va,glTypes:ia,orientationType:ba};Xa&&(Eo.backBuffer=[Se],Eo.drawBuffer=h(or.maxDrawbuffers,function(ea){return ea===0?[0]:h(ea,function(ha){return _a+ha})}));var yi=0;function Ui(){var ea=qn({cache:ya}),ha=ea.link,Ta=ea.global;ea.id=yi++,ea.batchId="0";var sn=ha(Xi),wn=ea.shared={props:"a0"};Object.keys(Xi).forEach(function(wt){wn[wt]=Ta.def(sn,".",wt)});var Le=ea.next={},Oe=ea.current={};Object.keys(gi).forEach(function(wt){Array.isArray($n[wt])&&(Le[wt]=Ta.def(wn.next,".",wt),Oe[wt]=Ta.def(wn.current,".",wt))});var Ke=ea.constants={};Object.keys(Eo).forEach(function(wt){Ke[wt]=Ta.def(JSON.stringify(Eo[wt]))}),ea.invoke=function(wt,Pt){switch(Pt.type){case Vn:var pr=["this",wn.context,wn.props,ea.batchId];return wt.def(ha(Pt.data),".call(",pr.slice(0,Math.max(Pt.data.length+1,4)),")");case Gn:return wt.def(wn.props,Pt.data);case oo:return wt.def(wn.context,Pt.data);case yo:return wt.def("this",Pt.data);case Vo:return Pt.data.append(ea,wt),Pt.data.ref;case Wo:return Pt.data.toString();case Yo:return Pt.data.map(function(Zr){return ea.invoke(wt,Zr)})}},ea.attribCache={};var yt={};return ea.scopeAttrib=function(wt){var Pt=Rt.id(wt);if(Pt in yt)return yt[Pt];var pr=Lr.scope[Pt];pr||(pr=Lr.scope[Pt]=new Ma);var Zr=yt[Pt]=ha(pr);return Zr},ea}function fo(ea){var ha=ea.static,Ta=ea.dynamic,sn;if(Ol in ha){var wn=!!ha[Ol];sn=On(function(Oe,Ke){return wn}),sn.enable=wn}else if(Ol in Ta){var Le=Ta[Ol];sn=Kn(Le,function(Oe,Ke){return Oe.invoke(Ke,Le)})}return sn}function To(ea,ha){var Ta=ea.static,sn=ea.dynamic;if(Bu in Ta){var wn=Ta[Bu];return wn?(wn=mr.getFramebuffer(wn),On(function(Oe,Ke){var yt=Oe.link(wn),wt=Oe.shared;Ke.set(wt.framebuffer,".next",yt);var Pt=wt.context;return Ke.set(Pt,"."+_t,yt+".width"),Ke.set(Pt,"."+Nt,yt+".height"),yt})):On(function(Oe,Ke){var yt=Oe.shared;Ke.set(yt.framebuffer,".next","null");var wt=yt.context;return Ke.set(wt,"."+_t,wt+"."+Ur),Ke.set(wt,"."+Nt,wt+"."+kr),"null"})}else if(Bu in sn){var Le=sn[Bu];return Kn(Le,function(Oe,Ke){var yt=Oe.invoke(Ke,Le),wt=Oe.shared,Pt=wt.framebuffer,pr=Ke.def(Pt,".getFramebuffer(",yt,")");Ke.set(Pt,".next",pr);var Zr=wt.context;return Ke.set(Zr,"."+_t,pr+"?"+pr+".width:"+Zr+"."+Ur),Ke.set(Zr,"."+Nt,pr+"?"+pr+".height:"+Zr+"."+kr),pr})}else return null}function jo(ea,ha,Ta){var sn=ea.static,wn=ea.dynamic;function Le(yt){if(yt in sn){var wt=sn[yt],Pt=!0,pr=wt.x|0,Zr=wt.y|0,Aa,vn;return"width"in wt?Aa=wt.width|0:Pt=!1,"height"in wt?vn=wt.height|0:Pt=!1,new pa(!Pt&&ha&&ha.thisDep,!Pt&&ha&&ha.contextDep,!Pt&&ha&&ha.propDep,function(jn,kn){var zn=jn.shared.context,Un=Aa;"width"in wt||(Un=kn.def(zn,".",_t,"-",pr));var Jn=vn;return"height"in wt||(Jn=kn.def(zn,".",Nt,"-",Zr)),[pr,Zr,Un,Jn]})}else if(yt in wn){var an=wn[yt],Qa=Kn(an,function(jn,kn){var zn=jn.invoke(kn,an),Un=jn.shared.context,Jn=kn.def(zn,".x|0"),hi=kn.def(zn,".y|0"),Ki=kn.def('"width" in ',zn,"?",zn,".width|0:","(",Un,".",_t,"-",Jn,")"),Qo=kn.def('"height" in ',zn,"?",zn,".height|0:","(",Un,".",Nt,"-",hi,")");return[Jn,hi,Ki,Qo]});return ha&&(Qa.thisDep=Qa.thisDep||ha.thisDep,Qa.contextDep=Qa.contextDep||ha.contextDep,Qa.propDep=Qa.propDep||ha.propDep),Qa}else return ha?new pa(ha.thisDep,ha.contextDep,ha.propDep,function(jn,kn){var zn=jn.shared.context;return[0,0,kn.def(zn,".",_t),kn.def(zn,".",Nt)]}):null}var Oe=Le(rl);if(Oe){var Ke=Oe;Oe=new pa(Oe.thisDep,Oe.contextDep,Oe.propDep,function(yt,wt){var Pt=Ke.append(yt,wt),pr=yt.shared.context;return wt.set(pr,"."+Bt,Pt[2]),wt.set(pr,"."+Yt,Pt[3]),Pt})}return{viewport:Oe,scissor_box:Le(xc)}}function qs(ea,ha){var Ta=ea.static,sn=typeof Ta[jc]=="string"&&typeof Ta[af]=="string";if(sn){if(Object.keys(ha.dynamic).length>0)return null;var wn=ha.static,Le=Object.keys(wn);if(Le.length>0&&typeof wn[Le[0]]=="number"){for(var Oe=[],Ke=0;Ke"+Jn+"?"+Pt+".constant["+Jn+"]:0;"}).join(""),"}}else{","if(",Aa,"(",Pt,".buffer)){",jn,"=",vn,".createStream(",oa,",",Pt,".buffer);","}else{",jn,"=",vn,".getBuffer(",Pt,".buffer);","}",kn,'="type" in ',Pt,"?",Zr.glTypes,"[",Pt,".type]:",jn,".dtype;",an.normalized,"=!!",Pt,".normalized;");function zn(Un){wt(an[Un],"=",Pt,".",Un,"|0;")}return zn("size"),zn("offset"),zn("stride"),zn("divisor"),wt("}}"),wt.exit("if(",an.isStream,"){",vn,".destroyStream(",jn,");","}"),an}wn[Le]=Kn(Oe,Ke)}),wn}function ss(ea){var ha=ea.static,Ta=ea.dynamic,sn={};return Object.keys(ha).forEach(function(wn){var Le=ha[wn];sn[wn]=On(function(Oe,Ke){return typeof Le=="number"||typeof Le=="boolean"?""+Le:Oe.link(Le)})}),Object.keys(Ta).forEach(function(wn){var Le=Ta[wn];sn[wn]=Kn(Le,function(Oe,Ke){return Oe.invoke(Ke,Le)})}),sn}function ks(ea,ha,Ta,sn,wn){var Le=ea.static,Oe=ea.dynamic,Ke=qs(ea,ha),yt=To(ea,wn),wt=jo(ea,yt,wn),Pt=Uo(ea,wn),pr=Qs(ea,wn),Zr=Vs(ea,wn,Ke);function Aa(zn){var Un=wt[zn];Un&&(pr[zn]=Un)}Aa(rl),Aa(Wn(xc));var vn=Object.keys(pr).length>0,an={framebuffer:yt,draw:Pt,shader:Zr,state:pr,dirty:vn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(an.profile=fo(ea,wn),an.uniforms=os(Ta,wn),an.drawVAO=an.scopeVAO=Pt.vao,!an.drawVAO&&Zr.program&&!Ke&&qt.angle_instanced_arrays&&Pt.static.elements){var Qa=!0,jn=Zr.program.attributes.map(function(zn){var Un=ha.static[zn];return Qa=Qa&&!!Un,Un});if(Qa&&jn.length>0){var kn=Lr.getVAO(Lr.createVAO({attributes:jn,elements:Pt.static.elements}));an.drawVAO=new pa(null,null,null,function(zn,Un){return zn.link(kn)}),an.useVAO=!0}}return Ke?an.useVAO=!0:an.attributes=hs(ha,wn),an.context=ss(sn,wn),an}function ts(ea,ha,Ta){var sn=ea.shared,wn=sn.context,Le=ea.scope();Object.keys(Ta).forEach(function(Oe){ha.save(wn,"."+Oe);var Ke=Ta[Oe],yt=Ke.append(ea,ha);Array.isArray(yt)?Le(wn,".",Oe,"=[",yt.join(),"];"):Le(wn,".",Oe,"=",yt,";")}),ha(Le)}function el(ea,ha,Ta,sn){var wn=ea.shared,Le=wn.gl,Oe=wn.framebuffer,Ke;Xa&&(Ke=ha.def(wn.extensions,".webgl_draw_buffers"));var yt=ea.constants,wt=yt.drawBuffer,Pt=yt.backBuffer,pr;Ta?pr=Ta.append(ea,ha):pr=ha.def(Oe,".next"),sn||ha("if(",pr,"!==",Oe,".cur){"),ha("if(",pr,"){",Le,".bindFramebuffer(",$r,",",pr,".framebuffer);"),Xa&&ha(Ke,".drawBuffersWEBGL(",wt,"[",pr,".colorAttachments.length]);"),ha("}else{",Le,".bindFramebuffer(",$r,",null);"),Xa&&ha(Ke,".drawBuffersWEBGL(",Pt,");"),ha("}",Oe,".cur=",pr,";"),sn||ha("}")}function Il(ea,ha,Ta){var sn=ea.shared,wn=sn.gl,Le=ea.current,Oe=ea.next,Ke=sn.current,yt=sn.next,wt=ea.cond(Ke,".dirty");Mn.forEach(function(Pt){var pr=Wn(Pt);if(!(pr in Ta.state)){var Zr,Aa;if(pr in Oe){Zr=Oe[pr],Aa=Le[pr];var vn=h($n[pr].length,function(Qa){return wt.def(Zr,"[",Qa,"]")});wt(ea.cond(vn.map(function(Qa,jn){return Qa+"!=="+Aa+"["+jn+"]"}).join("||")).then(wn,".",gi[pr],"(",vn,");",vn.map(function(Qa,jn){return Aa+"["+jn+"]="+Qa}).join(";"),";"))}else{Zr=wt.def(yt,".",pr);var an=ea.cond(Zr,"!==",Ke,".",pr);wt(an),pr in xn?an(ea.cond(Zr).then(wn,".enable(",xn[pr],");").else(wn,".disable(",xn[pr],");"),Ke,".",pr,"=",Zr,";"):an(wn,".",gi[pr],"(",Zr,");",Ke,".",pr,"=",Zr,";")}}}),Object.keys(Ta.state).length===0&&wt(Ke,".dirty=false;"),ha(wt)}function Do(ea,ha,Ta,sn){var wn=ea.shared,Le=ea.current,Oe=wn.current,Ke=wn.gl,yt;Ra(Object.keys(Ta)).forEach(function(wt){var Pt=Ta[wt];if(!(sn&&!sn(Pt))){var pr=Pt.append(ea,ha);if(xn[wt]){var Zr=xn[wt];En(Pt)?(yt=ea.link(pr,{stable:!0}),ha(ea.cond(yt).then(Ke,".enable(",Zr,");").else(Ke,".disable(",Zr,");")),ha(Oe,".",wt,"=",yt,";")):(ha(ea.cond(pr).then(Ke,".enable(",Zr,");").else(Ke,".disable(",Zr,");")),ha(Oe,".",wt,"=",pr,";"))}else if(Or(pr)){var Aa=Le[wt];ha(Ke,".",gi[wt],"(",pr,");",pr.map(function(vn,an){return Aa+"["+an+"]="+vn}).join(";"),";")}else En(Pt)?(yt=ea.link(pr,{stable:!0}),ha(Ke,".",gi[wt],"(",yt,");",Oe,".",wt,"=",yt,";")):ha(Ke,".",gi[wt],"(",pr,");",Oe,".",wt,"=",pr,";")}})}function ru(ea,ha){Ya&&(ea.instancing=ha.def(ea.shared.extensions,".angle_instanced_arrays"))}function Ns(ea,ha,Ta,sn,wn){var Le=ea.shared,Oe=ea.stats,Ke=Le.current,yt=Le.timer,wt=Ta.profile;function Pt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var pr,Zr;function Aa(zn){pr=ha.def(),zn(pr,"=",Pt(),";"),typeof wn=="string"?zn(Oe,".count+=",wn,";"):zn(Oe,".count++;"),Ua&&(sn?(Zr=ha.def(),zn(Zr,"=",yt,".getNumPendingQueries();")):zn(yt,".beginQuery(",Oe,");"))}function vn(zn){zn(Oe,".cpuTime+=",Pt(),"-",pr,";"),Ua&&(sn?zn(yt,".pushScopeStats(",Zr,",",yt,".getNumPendingQueries(),",Oe,");"):zn(yt,".endQuery();"))}function an(zn){var Un=ha.def(Ke,".profile");ha(Ke,".profile=",zn,";"),ha.exit(Ke,".profile=",Un,";")}var Qa;if(wt){if(En(wt)){wt.enable?(Aa(ha),vn(ha.exit),an("true")):an("false");return}Qa=wt.append(ea,ha),an(Qa)}else Qa=ha.def(Ke,".profile");var jn=ea.block();Aa(jn),ha("if(",Qa,"){",jn,"}");var kn=ea.block();vn(kn),ha.exit("if(",Qa,"){",kn,"}")}function Nu(ea,ha,Ta,sn,wn){var Le=ea.shared;function Oe(yt){switch(yt){case fs:case ql:case Vi:return 2;case Po:case Js:case fl:return 3;case Es:case Tu:case Ku:return 4;default:return 1}}function Ke(yt,wt,Pt){var pr=Le.gl,Zr=ha.def(yt,".location"),Aa=ha.def(Le.attributes,"[",Zr,"]"),vn=Pt.state,an=Pt.buffer,Qa=[Pt.x,Pt.y,Pt.z,Pt.w],jn=["buffer","normalized","offset","stride"];function kn(){ha("if(!",Aa,".buffer){",pr,".enableVertexAttribArray(",Zr,");}");var Un=Pt.type,Jn;if(Pt.size?Jn=ha.def(Pt.size,"||",wt):Jn=wt,ha("if(",Aa,".type!==",Un,"||",Aa,".size!==",Jn,"||",jn.map(function(Ki){return Aa+"."+Ki+"!=="+Pt[Ki]}).join("||"),"){",pr,".bindBuffer(",oa,",",an,".buffer);",pr,".vertexAttribPointer(",[Zr,Jn,Un,Pt.normalized,Pt.stride,Pt.offset],");",Aa,".type=",Un,";",Aa,".size=",Jn,";",jn.map(function(Ki){return Aa+"."+Ki+"="+Pt[Ki]+";"}).join(""),"}"),Ya){var hi=Pt.divisor;ha("if(",Aa,".divisor!==",hi,"){",ea.instancing,".vertexAttribDivisorANGLE(",[Zr,hi],");",Aa,".divisor=",hi,";}")}}function zn(){ha("if(",Aa,".buffer){",pr,".disableVertexAttribArray(",Zr,");",Aa,".buffer=null;","}if(",Bi.map(function(Un,Jn){return Aa+"."+Un+"!=="+Qa[Jn]}).join("||"),"){",pr,".vertexAttrib4f(",Zr,",",Qa,");",Bi.map(function(Un,Jn){return Aa+"."+Un+"="+Qa[Jn]+";"}).join(""),"}")}vn===Zi?kn():vn===_i?zn():(ha("if(",vn,"===",Zi,"){"),kn(),ha("}else{"),zn(),ha("}"))}sn.forEach(function(yt){var wt=yt.name,Pt=Ta.attributes[wt],pr;if(Pt){if(!wn(Pt))return;pr=Pt.append(ea,ha)}else{if(!wn(di))return;var Zr=ea.scopeAttrib(wt);pr={},Object.keys(new Ma).forEach(function(Aa){pr[Aa]=ha.def(Zr,".",Aa)})}Ke(ea.link(yt),Oe(yt.info.type),pr)})}function Vl(ea,ha,Ta,sn,wn,Le){for(var Oe=ea.shared,Ke=Oe.gl,yt,wt=0;wt1){for(var Ds=[],ys=[],Gl=0;Gl>1)",an],");")}function hi(){Ta(Qa,".drawArraysInstancedANGLE(",[Zr,Aa,vn,an],");")}Pt&&Pt!=="null"?kn?Jn():(Ta("if(",Pt,"){"),Jn(),Ta("}else{"),hi(),Ta("}")):hi()}function Un(){function Jn(){Ta(Le+".drawElements("+[Zr,vn,jn,Aa+"<<(("+jn+"-"+Ni+")>>1)"]+");")}function hi(){Ta(Le+".drawArrays("+[Zr,Aa,vn]+");")}Pt&&Pt!=="null"?kn?Jn():(Ta("if(",Pt,"){"),Jn(),Ta("}else{"),hi(),Ta("}")):hi()}Ya&&(typeof an!="number"||an>=0)?typeof an=="string"?(Ta("if(",an,">0){"),zn(),Ta("}else if(",an,"<0){"),Un(),Ta("}")):zn():Un()}function Co(ea,ha,Ta,sn,wn){var Le=Ui(),Oe=Le.proc("body",wn);return Ya&&(Le.instancing=Oe.def(Le.shared.extensions,".angle_instanced_arrays")),ea(Le,Oe,Ta,sn),Le.compile().body}function is(ea,ha,Ta,sn){ru(ea,ha),Ta.useVAO?Ta.drawVAO?ha(ea.shared.vao,".setVAO(",Ta.drawVAO.append(ea,ha),");"):ha(ea.shared.vao,".setVAO(",ea.shared.vao,".targetVAO);"):(ha(ea.shared.vao,".setVAO(null);"),Nu(ea,ha,Ta,sn.attributes,function(){return!0})),Vl(ea,ha,Ta,sn.uniforms,function(){return!0},!1),Hl(ea,ha,ha,Ta)}function Hs(ea,ha){var Ta=ea.proc("draw",1);ru(ea,Ta),ts(ea,Ta,ha.context),el(ea,Ta,ha.framebuffer),Il(ea,Ta,ha),Do(ea,Ta,ha.state),Ns(ea,Ta,ha,!1,!0);var sn=ha.shader.progVar.append(ea,Ta);if(Ta(ea.shared.gl,".useProgram(",sn,".program);"),ha.shader.program)is(ea,Ta,ha,ha.shader.program);else{Ta(ea.shared.vao,".setVAO(null);");var wn=ea.global.def("{}"),Le=Ta.def(sn,".id"),Oe=Ta.def(wn,"[",Le,"]");Ta(ea.cond(Oe).then(Oe,".call(this,a0);").else(Oe,"=",wn,"[",Le,"]=",ea.link(function(Ke){return Co(is,ea,ha,Ke,1)}),"(",sn,");",Oe,".call(this,a0);"))}Object.keys(ha.state).length>0&&Ta(ea.shared.current,".dirty=true;"),ea.shared.vao&&Ta(ea.shared.vao,".setVAO(null);")}function ca(ea,ha,Ta,sn){ea.batchId="a1",ru(ea,ha);function wn(){return!0}Nu(ea,ha,Ta,sn.attributes,wn),Vl(ea,ha,Ta,sn.uniforms,wn,!1),Hl(ea,ha,ha,Ta)}function ln(ea,ha,Ta,sn){ru(ea,ha);var wn=Ta.contextDep,Le=ha.def(),Oe="a0",Ke="a1",yt=ha.def();ea.shared.props=yt,ea.batchId=Le;var wt=ea.scope(),Pt=ea.scope();ha(wt.entry,"for(",Le,"=0;",Le,"<",Ke,";++",Le,"){",yt,"=",Oe,"[",Le,"];",Pt,"}",wt.exit);function pr(jn){return jn.contextDep&&wn||jn.propDep}function Zr(jn){return!pr(jn)}if(Ta.needsContext&&ts(ea,Pt,Ta.context),Ta.needsFramebuffer&&el(ea,Pt,Ta.framebuffer),Do(ea,Pt,Ta.state,pr),Ta.profile&&pr(Ta.profile)&&Ns(ea,Pt,Ta,!1,!0),sn)Ta.useVAO?Ta.drawVAO?pr(Ta.drawVAO)?Pt(ea.shared.vao,".setVAO(",Ta.drawVAO.append(ea,Pt),");"):wt(ea.shared.vao,".setVAO(",Ta.drawVAO.append(ea,wt),");"):wt(ea.shared.vao,".setVAO(",ea.shared.vao,".targetVAO);"):(wt(ea.shared.vao,".setVAO(null);"),Nu(ea,wt,Ta,sn.attributes,Zr),Nu(ea,Pt,Ta,sn.attributes,pr)),Vl(ea,wt,Ta,sn.uniforms,Zr,!1),Vl(ea,Pt,Ta,sn.uniforms,pr,!0),Hl(ea,wt,Pt,Ta);else{var Aa=ea.global.def("{}"),vn=Ta.shader.progVar.append(ea,Pt),an=Pt.def(vn,".id"),Qa=Pt.def(Aa,"[",an,"]");Pt(ea.shared.gl,".useProgram(",vn,".program);","if(!",Qa,"){",Qa,"=",Aa,"[",an,"]=",ea.link(function(jn){return Co(ca,ea,Ta,jn,2)}),"(",vn,");}",Qa,".call(this,a0[",Le,"],",Le,");")}}function hn(ea,ha){var Ta=ea.proc("batch",2);ea.batchId="0",ru(ea,Ta);var sn=!1,wn=!0;Object.keys(ha.context).forEach(function(Aa){sn=sn||ha.context[Aa].propDep}),sn||(ts(ea,Ta,ha.context),wn=!1);var Le=ha.framebuffer,Oe=!1;Le?(Le.propDep?sn=Oe=!0:Le.contextDep&&sn&&(Oe=!0),Oe||el(ea,Ta,Le)):el(ea,Ta,null),ha.state.viewport&&ha.state.viewport.propDep&&(sn=!0);function Ke(Aa){return Aa.contextDep&&sn||Aa.propDep}Il(ea,Ta,ha),Do(ea,Ta,ha.state,function(Aa){return!Ke(Aa)}),(!ha.profile||!Ke(ha.profile))&&Ns(ea,Ta,ha,!1,"a1"),ha.contextDep=sn,ha.needsContext=wn,ha.needsFramebuffer=Oe;var yt=ha.shader.progVar;if(yt.contextDep&&sn||yt.propDep)ln(ea,Ta,ha,null);else{var wt=yt.append(ea,Ta);if(Ta(ea.shared.gl,".useProgram(",wt,".program);"),ha.shader.program)ln(ea,Ta,ha,ha.shader.program);else{Ta(ea.shared.vao,".setVAO(null);");var Pt=ea.global.def("{}"),pr=Ta.def(wt,".id"),Zr=Ta.def(Pt,"[",pr,"]");Ta(ea.cond(Zr).then(Zr,".call(this,a0,a1);").else(Zr,"=",Pt,"[",pr,"]=",ea.link(function(Aa){return Co(ln,ea,ha,Aa,2)}),"(",wt,");",Zr,".call(this,a0,a1);"))}}Object.keys(ha.state).length>0&&Ta(ea.shared.current,".dirty=true;"),ea.shared.vao&&Ta(ea.shared.vao,".setVAO(null);")}function no(ea,ha){var Ta=ea.proc("scope",3);ea.batchId="a2";var sn=ea.shared,wn=sn.current;if(ts(ea,Ta,ha.context),ha.framebuffer&&ha.framebuffer.append(ea,Ta),Ra(Object.keys(ha.state)).forEach(function(Ke){var yt=ha.state[Ke],wt=yt.append(ea,Ta);Or(wt)?wt.forEach(function(Pt,pr){pi(Pt)?Ta.set(ea.next[Ke],"["+pr+"]",Pt):Ta.set(ea.next[Ke],"["+pr+"]",ea.link(Pt,{stable:!0}))}):En(yt)?Ta.set(sn.next,"."+Ke,ea.link(wt,{stable:!0})):Ta.set(sn.next,"."+Ke,wt)}),Ns(ea,Ta,ha,!0,!0),[wu,Ci,Ul,eu,jl].forEach(function(Ke){var yt=ha.draw[Ke];if(yt){var wt=yt.append(ea,Ta);pi(wt)?Ta.set(sn.draw,"."+Ke,wt):Ta.set(sn.draw,"."+Ke,ea.link(wt),{stable:!0})}}),Object.keys(ha.uniforms).forEach(function(Ke){var yt=ha.uniforms[Ke].append(ea,Ta);Array.isArray(yt)&&(yt="["+yt.map(function(wt){return pi(wt)?wt:ea.link(wt,{stable:!0})})+"]"),Ta.set(sn.uniforms,"["+ea.link(Rt.id(Ke),{stable:!0})+"]",yt)}),Object.keys(ha.attributes).forEach(function(Ke){var yt=ha.attributes[Ke].append(ea,Ta),wt=ea.scopeAttrib(Ke);Object.keys(new Ma).forEach(function(Pt){Ta.set(wt,"."+Pt,yt[Pt])})}),ha.scopeVAO){var Le=ha.scopeVAO.append(ea,Ta);pi(Le)?Ta.set(sn.vao,".targetVAO",Le):Ta.set(sn.vao,".targetVAO",ea.link(Le,{stable:!0}))}function Oe(Ke){var yt=ha.shader[Ke];if(yt){var wt=yt.append(ea,Ta);pi(wt)?Ta.set(sn.shader,"."+Ke,wt):Ta.set(sn.shader,"."+Ke,ea.link(wt,{stable:!0}))}}Oe(af),Oe(jc),Object.keys(ha.state).length>0&&(Ta(wn,".dirty=true;"),Ta.exit(wn,".dirty=true;")),Ta("a1(",ea.shared.context,",a0,",ea.batchId,");")}function ds(ea){if(!(typeof ea!="object"||Or(ea))){for(var ha=Object.keys(ea),Ta=0;Ta=0;--Co){var is=Xi[Co];is&&is(ya,null,0)}qt.flush(),ua&&ua.update()}function jo(){!fo&&Xi.length>0&&(fo=g.next(To))}function qs(){fo&&(g.cancel(To),fo=null)}function Vs(Co){Co.preventDefault(),vr=!0,qs(),Eo.forEach(function(is){is()})}function Uo(Co){qt.getError(),vr=!1,Ar.restore(),Si.restore(),Ya.restore(),Mn.restore(),xn.restore(),gi.restore(),Hn.restore(),ua&&ua.restore(),Wn.procs.refresh(),jo(),yi.forEach(function(is){is()})}pi&&(pi.addEventListener(Ne,Vs,!1),pi.addEventListener(Ye,Uo,!1));function Qs(){Xi.length=0,qs(),pi&&(pi.removeEventListener(Ne,Vs),pi.removeEventListener(Ye,Uo)),Si.clear(),gi.clear(),xn.clear(),Hn.clear(),Mn.clear(),Xa.clear(),Ya.clear(),ua&&ua.clear(),Ui.forEach(function(Co){Co()})}function os(Co){function is(Le){var Oe=v({},Le);delete Oe.uniforms,delete Oe.attributes,delete Oe.context,delete Oe.vao,"stencil"in Oe&&Oe.stencil.op&&(Oe.stencil.opBack=Oe.stencil.opFront=Oe.stencil.op,delete Oe.stencil.op);function Ke(yt){if(yt in Oe){var wt=Oe[yt];delete Oe[yt],Object.keys(wt).forEach(function(Pt){Oe[yt+"."+Pt]=wt[Pt]})}}return Ke("blend"),Ke("depth"),Ke("cull"),Ke("stencil"),Ke("polygonOffset"),Ke("scissor"),Ke("sample"),"vao"in Le&&(Oe.vao=Le.vao),Oe}function Hs(Le,Oe){var Ke={},yt={};return Object.keys(Le).forEach(function(wt){var Pt=Le[wt];if(c.isDynamic(Pt)){yt[wt]=c.unbox(Pt,wt);return}else if(Oe&&Array.isArray(Pt)){for(var pr=0;pr0)return ea.call(this,sn(Le|0),Le|0)}else if(Array.isArray(Le)){if(Le.length)return ea.call(this,Le,Le.length)}else return io.call(this,Le)}return v(wn,{stats:ds,destroy:function(){Os.destroy()}})}var hs=gi.setFBO=os({framebuffer:c.define.call(null,lt,"framebuffer")});function ss(Co,is){var Hs=0;Wn.procs.poll();var ca=is.color;ca&&(qt.clearColor(+ca[0]||0,+ca[1]||0,+ca[2]||0,+ca[3]||0),Hs|=ie),"depth"in is&&(qt.clearDepth(+is.depth),Hs|=ce),"stencil"in is&&(qt.clearStencil(is.stencil|0),Hs|=_e),qt.clear(Hs)}function ks(Co){if("framebuffer"in Co)if(Co.framebuffer&&Co.framebuffer_reglType==="framebufferCube")for(var is=0;is<6;++is)hs(v({framebuffer:Co.framebuffer.faces[is]},Co),ss);else hs(Co,ss);else ss(null,Co)}function ts(Co){Xi.push(Co);function is(){var Hs=Gt(Xi,Co);function ca(){var ln=Gt(Xi,ca);Xi[ln]=Xi[Xi.length-1],Xi.length-=1,Xi.length<=0&&qs()}Xi[Hs]=ca}return jo(),{cancel:is}}function el(){var Co=Xn.viewport,is=Xn.scissor_box;Co[0]=Co[1]=is[0]=is[1]=0,ya.viewportWidth=ya.framebufferWidth=ya.drawingBufferWidth=Co[2]=is[2]=qt.drawingBufferWidth,ya.viewportHeight=ya.framebufferHeight=ya.drawingBufferHeight=Co[3]=is[3]=qt.drawingBufferHeight}function Il(){ya.tick+=1,ya.time=ru(),el(),Wn.procs.poll()}function Do(){Mn.refresh(),el(),Wn.procs.refresh(),ua&&ua.update()}function ru(){return(f()-Ba)/1e3}Do();function Ns(Co,is){var Hs;switch(Co){case"frame":return ts(is);case"lost":Hs=Eo;break;case"restore":Hs=yi;break;case"destroy":Hs=Ui;break;default:}return Hs.push(is),{cancel:function(){for(var ca=0;ca=0},read:Yn,destroy:Qs,_gl:qt,_refresh:Do,poll:function(){Il(),ua&&ua.update()},now:ru,stats:mr,getCachedCode:Nu,preloadCachedCode:Vl});return Rt.onDone(null,Hl),Hl}return Jt})}}),I9=Ee({"node_modules/gl-util/context.js"(J,H){"use strict";var v=Jh();H.exports=function(n){if(n?typeof n=="string"&&(n={container:n}):n={},E(n)?n={container:n}:k(n)?n={container:n}:l(n)?n={gl:n}:n=v(n,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),n.pixelRatio||(n.pixelRatio=window.pixelRatio||1),n.gl)return n.gl;if(n.canvas&&(n.container=n.canvas.parentNode),n.container){if(typeof n.container=="string"){var r=document.querySelector(n.container);if(!r)throw Error("Element "+n.container+" is not found");n.container=r}E(n.container)?(n.canvas=n.container,n.container=n.canvas.parentNode):n.canvas||(n.canvas=e(),n.container.appendChild(n.canvas),x(n))}else if(!n.canvas)if(typeof document<"u")n.container=document.body||document.documentElement,n.canvas=e(),n.container.appendChild(n.canvas),x(n);else throw Error("Not DOM environment. Use headless-gl.");return n.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(a){try{n.gl=n.canvas.getContext(a,n.attrs)}catch{}return n.gl}),n.gl};function x(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*window.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*window.innerHeight);else{var n=t.container.getBoundingClientRect();t.canvas.width=t.width||n.right-n.left,t.canvas.height=t.height||n.bottom-n.top}}function E(t){return typeof t.getContext=="function"&&"width"in t&&"height"in t}function k(t){return typeof t.nodeName=="string"&&typeof t.appendChild=="function"&&typeof t.getBoundingClientRect=="function"}function l(t){return typeof t.drawArrays=="function"||typeof t.drawElements=="function"}function e(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}}}),R9=Ee({"node_modules/font-atlas/index.js"(J,H){"use strict";var v=$w(),x=[32,126];H.exports=E;function E(k){k=k||{};var l=k.shape?k.shape:k.canvas?[k.canvas.width,k.canvas.height]:[512,512],e=k.canvas||document.createElement("canvas"),t=k.font,n=typeof k.step=="number"?[k.step,k.step]:k.step||[32,32],r=k.chars||x;if(t&&typeof t!="string"&&(t=v(t)),!Array.isArray(r))r=String(r).split("");else if(r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"){for(var a=[],o=r[0],s=0;o<=r[1];o++)a[s++]=String.fromCharCode(o);r=a}l=l.slice(),e.width=l[0],e.height=l[1];var c=e.getContext("2d");c.fillStyle="#000",c.fillRect(0,0,e.width,e.height),c.font=t,c.textAlign="center",c.textBaseline="middle",c.fillStyle="#fff";for(var g=n[0]/2,f=n[1]/2,o=0;ol[0]-n[0]/2&&(g=n[0]/2,f+=n[1]);return e}}}),Kw=Ee({"node_modules/bit-twiddle/twiddle.js"(J){"use strict";"use restrict";var H=32;J.INT_BITS=H,J.INT_MAX=2147483647,J.INT_MIN=-1<0)-(E<0)},J.abs=function(E){var k=E>>H-1;return(E^k)-k},J.min=function(E,k){return k^(E^k)&-(E65535)<<4,E>>>=k,l=(E>255)<<3,E>>>=l,k|=l,l=(E>15)<<2,E>>>=l,k|=l,l=(E>3)<<1,E>>>=l,k|=l,k|E>>1},J.log10=function(E){return E>=1e9?9:E>=1e8?8:E>=1e7?7:E>=1e6?6:E>=1e5?5:E>=1e4?4:E>=1e3?3:E>=100?2:E>=10?1:0},J.popCount=function(E){return E=E-(E>>>1&1431655765),E=(E&858993459)+(E>>>2&858993459),(E+(E>>>4)&252645135)*16843009>>>24};function v(E){var k=32;return E&=-E,E&&k--,E&65535&&(k-=16),E&16711935&&(k-=8),E&252645135&&(k-=4),E&858993459&&(k-=2),E&1431655765&&(k-=1),k}J.countTrailingZeros=v,J.nextPow2=function(E){return E+=E===0,--E,E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E+1},J.prevPow2=function(E){return E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E-(E>>>1)},J.parity=function(E){return E^=E>>>16,E^=E>>>8,E^=E>>>4,E&=15,27030>>>E&1};var x=new Array(256);(function(E){for(var k=0;k<256;++k){var l=k,e=k,t=7;for(l>>>=1;l;l>>>=1)e<<=1,e|=l&1,--t;E[k]=e<>>8&255]<<16|x[E>>>16&255]<<8|x[E>>>24&255]},J.interleave2=function(E,k){return E&=65535,E=(E|E<<8)&16711935,E=(E|E<<4)&252645135,E=(E|E<<2)&858993459,E=(E|E<<1)&1431655765,k&=65535,k=(k|k<<8)&16711935,k=(k|k<<4)&252645135,k=(k|k<<2)&858993459,k=(k|k<<1)&1431655765,E|k<<1},J.deinterleave2=function(E,k){return E=E>>>k&1431655765,E=(E|E>>>1)&858993459,E=(E|E>>>2)&252645135,E=(E|E>>>4)&16711935,E=(E|E>>>16)&65535,E<<16>>16},J.interleave3=function(E,k,l){return E&=1023,E=(E|E<<16)&4278190335,E=(E|E<<8)&251719695,E=(E|E<<4)&3272356035,E=(E|E<<2)&1227133513,k&=1023,k=(k|k<<16)&4278190335,k=(k|k<<8)&251719695,k=(k|k<<4)&3272356035,k=(k|k<<2)&1227133513,E|=k<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,E|l<<2},J.deinterleave3=function(E,k){return E=E>>>k&1227133513,E=(E|E>>>2)&3272356035,E=(E|E>>>4)&251719695,E=(E|E>>>8)&4278190335,E=(E|E>>>16)&1023,E<<22>>22},J.nextCombination=function(E){var k=E|E-1;return k+1|(~k&-~k)-1>>>v(E)+1}}}),F9=Ee({"node_modules/dup/dup.js"(J,H){"use strict";function v(k,l,e){var t=k[e]|0;if(t<=0)return[];var n=new Array(t),r;if(e===k.length-1)for(r=0;r"u"&&(l=0),typeof k){case"number":if(k>0)return x(k|0,l);break;case"object":if(typeof k.length=="number")return v(k,l,0);break}return[]}H.exports=E}}),z9=Ee({"node_modules/typedarray-pool/pool.js"(J){"use strict";var H=Kw(),v=F9(),x=Nv().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:v([32,0]),UINT16:v([32,0]),UINT32:v([32,0]),BIGUINT64:v([32,0]),INT8:v([32,0]),INT16:v([32,0]),INT32:v([32,0]),BIGINT64:v([32,0]),FLOAT:v([32,0]),DOUBLE:v([32,0]),DATA:v([32,0]),UINT8C:v([32,0]),BUFFER:v([32,0])});var E=typeof Uint8ClampedArray<"u",k=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=v([32,0])),e.BIGUINT64||(e.BIGUINT64=v([32,0])),e.BIGINT64||(e.BIGINT64=v([32,0])),e.BUFFER||(e.BUFFER=v([32,0]));var t=e.DATA,n=e.BUFFER;J.free=function(u){if(x.isBuffer(u))n[H.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var A=u.length||u.byteLength,b=H.log2(A)|0;t[b].push(u)}};function r(h){if(h){var u=h.length||h.byteLength,A=H.log2(u);t[A].push(h)}}function a(h){r(h.buffer)}J.freeUint8=J.freeUint16=J.freeUint32=J.freeBigUint64=J.freeInt8=J.freeInt16=J.freeInt32=J.freeBigInt64=J.freeFloat32=J.freeFloat=J.freeFloat64=J.freeDouble=J.freeUint8Clamped=J.freeDataView=a,J.freeArrayBuffer=r,J.freeBuffer=function(u){n[H.log2(u.length)].push(u)},J.malloc=function(u,A){if(A===void 0||A==="arraybuffer")return o(u);switch(A){case"uint8":return s(u);case"uint16":return c(u);case"uint32":return g(u);case"int8":return f(u);case"int16":return p(u);case"int32":return m(u);case"float":case"float32":return i(u);case"double":case"float64":return T(u);case"uint8_clamped":return S(u);case"bigint64":return C(u);case"biguint64":return M(u);case"buffer":return w(u);case"data":case"dataview":return _(u);default:return null}return null};function o(u){var u=H.nextPow2(u),A=H.log2(u),b=t[A];return b.length>0?b.pop():new ArrayBuffer(u)}J.mallocArrayBuffer=o;function s(h){return new Uint8Array(o(h),0,h)}J.mallocUint8=s;function c(h){return new Uint16Array(o(2*h),0,h)}J.mallocUint16=c;function g(h){return new Uint32Array(o(4*h),0,h)}J.mallocUint32=g;function f(h){return new Int8Array(o(h),0,h)}J.mallocInt8=f;function p(h){return new Int16Array(o(2*h),0,h)}J.mallocInt16=p;function m(h){return new Int32Array(o(4*h),0,h)}J.mallocInt32=m;function i(h){return new Float32Array(o(4*h),0,h)}J.mallocFloat32=J.mallocFloat=i;function T(h){return new Float64Array(o(8*h),0,h)}J.mallocFloat64=J.mallocDouble=T;function S(h){return E?new Uint8ClampedArray(o(h),0,h):s(h)}J.mallocUint8Clamped=S;function M(h){return k?new BigUint64Array(o(8*h),0,h):null}J.mallocBigUint64=M;function C(h){return l?new BigInt64Array(o(8*h),0,h):null}J.mallocBigInt64=C;function _(h){return new DataView(o(h),0,h)}J.mallocDataView=_;function w(h){h=H.nextPow2(h);var u=H.log2(h),A=n[u];return A.length>0?A.pop():new x(h)}J.mallocBuffer=w,J.clearCache=function(){for(var u=0;u<32;++u)e.UINT8[u].length=0,e.UINT16[u].length=0,e.UINT32[u].length=0,e.INT8[u].length=0,e.INT16[u].length=0,e.INT32[u].length=0,e.FLOAT[u].length=0,e.DOUBLE[u].length=0,e.BIGUINT64[u].length=0,e.BIGINT64[u].length=0,e.UINT8C[u].length=0,t[u].length=0,n[u].length=0}}}),B9=Ee({"node_modules/is-plain-obj/index.js"(J,H){"use strict";var v=Object.prototype.toString;H.exports=function(x){var E;return v.call(x)==="[object Object]"&&(E=Object.getPrototypeOf(x),E===null||E===Object.getPrototypeOf({}))}}}),Jw=Ee({"node_modules/parse-unit/index.js"(J,H){H.exports=function(x,E){E||(E=[0,""]),x=String(x);var k=parseFloat(x,10);return E[0]=k,E[1]=x.match(/[\d.\-\+]*\s*(.*)/)[1]||"",E}}}),N9=Ee({"node_modules/gl-text/node_modules/to-px/topx.js"(J,H){"use strict";var v=Jw();H.exports=l;var x=96;function E(e,t){var n=v(getComputedStyle(e).getPropertyValue(t));return n[0]*l(n[1],e)}function k(e,t){var n=document.createElement("div");n.style["font-size"]="128"+e,t.appendChild(n);var r=E(n,"font-size")/128;return t.removeChild(n),r}function l(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return k(e,t);case"em":return E(t,"font-size");case"rem":return E(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return x;case"cm":return x/2.54;case"mm":return x/25.4;case"pt":return x/72;case"pc":return x/6}return 1}}}),O9=Ee({"node_modules/detect-kerning/index.js"(J,H){"use strict";H.exports=k;var v=k.canvas=document.createElement("canvas"),x=v.getContext("2d"),E=l([32,126]);k.createPairs=l,k.ascii=E;function k(e,t){Array.isArray(e)&&(e=e.join(", "));var n={},r,a=16,o=.05;t&&(t.length===2&&typeof t[0]=="number"?r=l(t):Array.isArray(t)?r=t:(t.o?r=l(t.o):t.pairs&&(r=t.pairs),t.fontSize&&(a=t.fontSize),t.threshold!=null&&(o=t.threshold))),r||(r=E),x.font=a+"px "+e;for(var s=0;sa*o){var p=(f-g)/a;n[c]=p*1e3}}return n}function l(e){for(var t=[],n=e[0];n<=e[1];n++)for(var r=String.fromCharCode(n),a=e[0];a0;n-=4)if(t[n]!==0)return Math.floor((n-3)*.25/e)}}}),U9=Ee({"node_modules/gl-text/dist.js"(J,H){"use strict";var v=D9(),x=Jh(),E=Zw(),k=I9(),l=Uw(),e=zm(),t=R9(),n=z9(),r=u0(),a=B9(),o=Jw(),s=N9(),c=O9(),g=Lc(),f=j9(),p=Qv(),m=Kw(),i=m.nextPow2,T=new l,S=!1;document.body&&(M=document.body.appendChild(document.createElement("div")),M.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(M).fontStretch&&(S=!0),document.body.removeChild(M));var M,C=function(h){_(h)?(h={regl:h},this.gl=h.regl._gl):this.gl=k(h),this.shader=T.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=h.regl||E({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),T.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(a(h)?h:{})};C.prototype.createShader=function(){var h=this.regl,u=h({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:h.prop("count"),offset:h.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:h.this("sizeBuffer")},width:{offset:0,stride:8,buffer:h.this("sizeBuffer")},char:h.this("charBuffer"),position:h.this("position")},uniforms:{atlasSize:function(b,z){return[z.atlas.width,z.atlas.height]},atlasDim:function(b,z){return[z.atlas.cols,z.atlas.rows]},atlas:function(b,z){return z.atlas.texture},charStep:function(b,z){return z.atlas.step},em:function(b,z){return z.atlas.em},color:h.prop("color"),opacity:h.prop("opacity"),viewport:h.this("viewportArray"),scale:h.this("scale"),align:h.prop("align"),baseline:h.prop("baseline"),translate:h.this("translate"),positionOffset:h.prop("positionOffset")},primitive:"points",viewport:h.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -2692,9 +2692,9 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),A={};return{regl:f,draw:u,atlas:A}},C.prototype.update=function(f){var u=this;if(typeof f=="string")f={text:f};else if(!f)return;f=x(f,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0),f.opacity!=null&&(Array.isArray(f.opacity)?this.opacity=f.opacity.map(function(se){return parseFloat(se)}):this.opacity=parseFloat(f.opacity)),f.viewport!=null&&(this.viewport=r(f.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),f.kerning!=null&&(this.kerning=f.kerning),f.offset!=null&&(typeof f.offset=="number"&&(f.offset=[f.offset,0]),this.positionOffset=p(f.offset)),f.direction&&(this.direction=f.direction),f.range&&(this.range=f.range,this.scale=[1/(f.range[2]-f.range[0]),1/(f.range[3]-f.range[1])],this.translate=[-f.range[0],-f.range[1]]),f.scale&&(this.scale=f.scale),f.translate&&(this.translate=f.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!f.font&&(f.font=C.baseFontSize+"px sans-serif");var A=!1,b=!1;if(f.font&&(Array.isArray(f.font)?f.font:[f.font]).forEach(function(se,Te){if(typeof se=="string")try{se=v.parse(se)}catch{se=v.parse(C.baseFontSize+"px "+se)}else{var Fe=se.style,We=se.weight,Ge=se.stretch,gt=se.variant;se=v.parse(v.stringify(se)),Fe&&(se.style=Fe),We&&(se.weight=We),Ge&&(se.stretch=Ge),gt&&(se.variant=gt)}var mt=v.stringify({size:C.baseFontSize,family:se.family,stretch:S?se.stretch:void 0,variant:se.variant,weight:se.weight,style:se.style}),Tt=o(se.size),At=Math.round(Tt[0]*s(Tt[1]));if(At!==u.fontSize[Te]&&(b=!0,u.fontSize[Te]=At),(!u.font[Te]||mt!=u.font[Te].baseString)&&(A=!0,u.font[Te]=C.fonts[mt],!u.font[Te])){var Kt=se.family.join(", "),nr=[se.style];se.style!=se.variant&&nr.push(se.variant),se.variant!=se.weight&&nr.push(se.weight),S&&se.weight!=se.stretch&&nr.push(se.stretch),u.font[Te]={baseString:mt,family:Kt,weight:se.weight,stretch:se.stretch,style:se.style,variant:se.variant,width:{},kerning:{},metrics:h(Kt,{origin:"top",fontSize:C.baseFontSize,fontStyle:nr.join(" ")})},C.fonts[mt]=u.font[Te]}}),(A||b)&&this.font.forEach(function(se,Te){var Fe=v.stringify({size:u.fontSize[Te],family:se.family,stretch:S?se.stretch:void 0,variant:se.variant,weight:se.weight,style:se.style});if(u.fontAtlas[Te]=u.shader.atlas[Fe],!u.fontAtlas[Te]){var We=se.metrics;u.shader.atlas[Fe]=u.fontAtlas[Te]={fontString:Fe,step:Math.ceil(u.fontSize[Te]*We.bottom*.5)*2,em:u.fontSize[Te],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:u.regl.texture()}}f.text==null&&(f.text=u.text)}),typeof f.text=="string"&&f.position&&f.position.length>2){for(var z=Array(f.position.length*.5),I=0;I2){for(var B=!f.position[0].length,F=a.mallocFloat(this.count*2),P=0,j=0;P1?u.align[Te]:u.align[0]:u.align;if(typeof Fe=="number")return Fe;switch(Fe){case"right":case"end":return-se;case"center":case"centre":case"middle":return-se*.5}return 0})),this.baseline==null&&f.baseline==null&&(f.baseline=0),f.baseline!=null&&(this.baseline=f.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(se,Te){var Fe=(u.font[Te]||u.font[0]).metrics,We=0;return We+=Fe.bottom*.5,typeof se=="number"?We+=se-Fe.baseline:We+=-Fe[se],We*=-1,We})),f.color!=null)if(f.color||(f.color="transparent"),typeof f.color=="string"||!isNaN(f.color))this.color=e(f.color,"uint8");else{var Ae;if(typeof f.color[0]=="number"&&f.color.length>this.counts.length){var Me=f.color.length;Ae=a.mallocUint8(Me);for(var Ie=(f.color.subarray||f.color.slice).bind(f.color),Ue=0;Ue4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(ge){var ue=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(ue);for(var ve=0;ve1?this.counts[ve]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ve]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ve*4,ve*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ve]:this.opacity,baseline:this.baselineOffset[ve]!=null?this.baselineOffset[ve]:this.baselineOffset[0],align:this.align?this.alignOffset[ve]!=null?this.alignOffset[ve]:this.alignOffset[0]:0,atlas:this.fontAtlas[ve]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ve*2,ve*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},C.prototype.destroy=function(){},C.prototype.kerning=!0,C.prototype.position={constant:new Float32Array(2)},C.prototype.translate=null,C.prototype.scale=null,C.prototype.font=null,C.prototype.text="",C.prototype.positionOffset=[0,0],C.prototype.opacity=1,C.prototype.color=new Uint8Array([0,0,0,255]),C.prototype.alignOffset=[0,0],C.maxAtlasSize=1024,C.atlasCanvas=document.createElement("canvas"),C.atlasContext=C.atlasCanvas.getContext("2d",{alpha:!1}),C.baseFontSize=64,C.fonts={};function _(T){return typeof T=="function"&&T._gl&&T.prop&&T.texture&&T.buffer}V.exports=C}}),Vy=Ee({"src/lib/prepare_regl.js"(J,V){"use strict";var v=Q3(),x=Zw();V.exports=function(k,l,e){var t=k._fullLayout,a=!0;return t._glcanvas.each(function(r){if(r.regl){r.regl.preloadCachedCode(e);return}if(!(r.pick&&!t._has("parcoords"))){try{r.regl=x({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:k._context.plotGlPixelRatio||window.devicePixelRatio,extensions:l||[],cachedCode:e||{}})}catch{a=!1}r.regl||(a=!1),a&&this.addEventListener("webglcontextlost",function(n){k&&k.emit&&k.emit("plotly_webglcontextlost",{event:n,layer:r.key})},!1)}}),a||v({container:t._glcontainer.node()}),a}}}),Qw=Ee({"src/traces/scattergl/plot.js"(c,V){"use strict";var v=Cw(),x=qw(),E=S9(),k=U9(),l=Vr(),e=Gh().selectMode,t=Vy(),a=al(),r=lx(),n=Sw().styleTextSelection,o={};function s(m,h,p,g){var i=m._size,w=m.width*g,S=m.height*g,M=i.l*g,C=i.b*g,_=i.r*g,T=i.t*g,f=i.w*g,u=i.h*g;return[M+h.domain[0]*f,C+p.domain[0]*u,w-_-(1-h.domain[1])*f,S-T-(1-p.domain[1])*u]}var c=V.exports=function(h,p,g){if(g.length){var i=h._fullLayout,w=p._scene,S=p.xaxis,M=p.yaxis,C,_;if(w){var T=t(h,["ANGLE_instanced_arrays","OES_element_index_uint"],o);if(!T){w.init();return}var f=w.count,u=i._glcanvas.data()[0].regl;if(r(h,p,g),w.dirty){if((w.line2d||w.error2d)&&!(w.scatter2d||w.fill2d||w.glText)&&u.clear({color:!0,depth:!0}),w.error2d===!0&&(w.error2d=E(u)),w.line2d===!0&&(w.line2d=x(u)),w.scatter2d===!0&&(w.scatter2d=v(u)),w.fill2d===!0&&(w.fill2d=x(u)),w.glText===!0)for(w.glText=new Array(f),C=0;Cw.glText.length){var A=f-w.glText.length;for(C=0;Cee&&(isNaN($[ne])||isNaN($[ne+1]));)ne-=2;q.positions=$.slice(ee,ne+2)}return q}),w.line2d.update(w.lineOptions)),w.error2d){var I=(w.errorXOptions||[]).concat(w.errorYOptions||[]).map(function(q){return q||{positions:[],errors:[]}});w.error2d.update(I)}w.scatter2d&&w.scatter2d.update(w.markerOptions),w.fillOrder=l.repeat(null,f),w.fill2d&&(w.fillOptions=w.fillOptions.map(function(q,$){var ee=g[$];if(!(!q||!ee||!ee[0]||!ee[0].trace)){var ne=ee[0],fe=ne.trace,ye=ne.t,xe=w.lineOptions[$],Ae,Me,Ie=[];fe._ownfill&&Ie.push($),fe._nexttrace&&Ie.push($+1),Ie.length&&(w.fillOrder[$]=Ie);var Ue=[],qe=xe&&xe.positions||ye.positions,ke,ge;if(fe.fill==="tozeroy"){for(ke=0;keke&&isNaN(qe[ge+1]);)ge-=2;qe[ke+1]!==0&&(Ue=[qe[ke],0]),Ue=Ue.concat(qe.slice(ke,ge+2)),qe[ge+1]!==0&&(Ue=Ue.concat([qe[ge],0]))}else if(fe.fill==="tozerox"){for(ke=0;keke&&isNaN(qe[ge]);)ge-=2;qe[ke]!==0&&(Ue=[0,qe[ke+1]]),Ue=Ue.concat(qe.slice(ke,ge+2)),qe[ge]!==0&&(Ue=Ue.concat([0,qe[ge+1]]))}else if(fe.fill==="toself"||fe.fill==="tonext"){for(Ue=[],Ae=0,q.splitNull=!0,Me=0;Me-1;for(let[q]of g)if(q){var F=q.trace,P=q.t,j=P.index,U=F._length,Z=P.x,Q=P.y;if(F.selectedpoints||R||B){if(R||(R=!0),F.selectedpoints){var re=w.selectBatch[j]=F.selectedpoints,ae={};for(_=0;_S&&p||wn,b;for(A?b=p.sizeAvg||Math.max(p.size,3):b=E(c,h),M=0;M{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,k(()=>{this.dirty=!1})),this)},a.prototype.update=function(...s){if(!s.length)return;for(let h=0;hb||!p.lower&&A{c[g+w]=h})}this.scatter.draw(...c)}return this},a.prototype.destroy=function(){return this.traces.forEach(s=>{s.buffer&&s.buffer.destroy&&s.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function r(s,c,m){let h=s.id!=null?s.id:s,p=c,g=m;return h<<16|(p&255)<<8|g&255}function n(s,c,m){let h,p,g,i,w,S,M,C,_=s[c],T=s[m];return _.length>2?(h=_[0],g=_[2],p=_[1],i=_[3]):_.length?(h=p=_[0],g=i=_[1]):(h=_.x,p=_.y,g=_.x+_.width,i=_.y+_.height),T.length>2?(w=T[0],M=T[2],S=T[1],C=T[3]):T.length?(w=S=T[0],M=C=T[1]):(w=T.x,S=T.y,M=T.x+T.width,C=T.y+T.height),[w,p,M,i]}function o(s){if(typeof s=="number")return[s,s,s,s];if(s.length===2)return[s[0],s[1],s[0],s[1]];{let c=e(s);return[c.x,c.y,c.x+c.width,c.y+c.height]}}}}),K9=Ee({"src/traces/splom/plot.js"(J,V){"use strict";var v=Z9(),x=Vr(),E=Xl(),k=Gh().selectMode;V.exports=function(t,a,r){if(r.length)for(var n=0;n-1,B=k(p)||!!n.selectedpoints||R,F=!0;if(B){var P=n._length;if(n.selectedpoints){s.selectBatch=n.selectedpoints;var j=n.selectedpoints,U={};for(w=0;w=Z[Q][0]&&U<=Z[Q][1])return!0;return!1}function c(U){U.attr("x",-v.bar.captureWidth/2).attr("width",v.bar.captureWidth)}function m(U){U.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function h(U){if(!U.brush.filterSpecified)return"0,"+U.height;for(var Z=p(U.brush.filter.getConsolidated(),U.height),Q=[0],re,ae,oe,H=Z.length?Z[0][0]:null,X=0;XU[1]+Q||Z=.9*U[1]+.1*U[0]?"n":Z<=.9*U[0]+.1*U[1]?"s":"ns"}function i(){x.select(document.body).style("cursor",null)}function w(U){U.attr("stroke-dasharray",h)}function S(U,Z){var Q=x.select(U).selectAll(".highlight, .highlight-shadow"),re=Z?Q.transition().duration(v.bar.snapDuration).each("end",Z):Q;w(re)}function M(U,Z){var Q=U.brush,re=Q.filterSpecified,ae=NaN,oe={},H;if(re){var X=U.height,K=Q.filter.getConsolidated(),G=p(K,X),Y=NaN,q=NaN,$=NaN;for(H=0;H<=G.length;H++){var ee=G[H];if(ee&&ee[0]<=Z&&Z<=ee[1]){Y=H;break}else if(q=H?H-1:NaN,ee&&ee[0]>Z){$=H;break}}if(ae=Y,isNaN(ae)&&(isNaN(q)||isNaN($)?ae=isNaN(q)?$:q:ae=Z-G[q][1]=Ae[0]&&xe<=Ae[1]){oe.clickableOrdinalRange=Ae;break}}}return oe}function C(U,Z){x.event.sourceEvent.stopPropagation();var Q=Z.height-x.mouse(U)[1]-2*v.verticalPadding,re=Z.unitToPaddedPx.invert(Q),ae=Z.brush,oe=M(Z,Q),H=oe.interval,X=ae.svgBrush;if(X.wasDragged=!1,X.grabbingBar=oe.region==="ns",X.grabbingBar){var K=H.map(Z.unitToPaddedPx);X.grabPoint=Q-K[0]-v.verticalPadding,X.barLength=K[1]-K[0]}X.clickableOrdinalRange=oe.clickableOrdinalRange,X.stayingIntervals=Z.multiselect&&ae.filterSpecified?ae.filter.getConsolidated():[],H&&(X.stayingIntervals=X.stayingIntervals.filter(function(G){return G[0]!==H[0]&&G[1]!==H[1]})),X.startExtent=oe.region?H[oe.region==="s"?1:0]:re,Z.parent.inBrushDrag=!0,X.brushStartCallback()}function _(U,Z){x.event.sourceEvent.stopPropagation();var Q=Z.height-x.mouse(U)[1]-2*v.verticalPadding,re=Z.brush.svgBrush;re.wasDragged=!0,re._dragging=!0,re.grabbingBar?re.newExtent=[Q-re.grabPoint,Q+re.barLength-re.grabPoint].map(Z.unitToPaddedPx.invert):re.newExtent=[re.startExtent,Z.unitToPaddedPx.invert(Q)].sort(l),Z.brush.filterSpecified=!0,re.extent=re.stayingIntervals.concat([re.newExtent]),re.brushCallback(Z),S(U.parentNode)}function T(U,Z){var Q=Z.brush,re=Q.filter,ae=Q.svgBrush;ae._dragging||(f(U,Z),_(U,Z),Z.brush.svgBrush.wasDragged=!1),ae._dragging=!1;var oe=x.event;oe.sourceEvent.stopPropagation();var H=ae.grabbingBar;if(ae.grabbingBar=!1,ae.grabLocation=void 0,Z.parent.inBrushDrag=!1,i(),!ae.wasDragged){ae.wasDragged=void 0,ae.clickableOrdinalRange?Q.filterSpecified&&Z.multiselect?ae.extent.push(ae.clickableOrdinalRange):(ae.extent=[ae.clickableOrdinalRange],Q.filterSpecified=!0):H?(ae.extent=ae.stayingIntervals,ae.extent.length===0&&N(Q)):N(Q),ae.brushCallback(Z),S(U.parentNode),ae.brushEndCallback(Q.filterSpecified?re.getConsolidated():[]);return}var X=function(){re.set(re.getConsolidated())};if(Z.ordinal){var K=Z.unitTickvals;K[K.length-1]ae.newExtent[0];ae.extent=ae.stayingIntervals.concat(G?[ae.newExtent]:[]),ae.extent.length||N(Q),ae.brushCallback(Z),G?S(U.parentNode,X):(X(),S(U.parentNode))}else X();ae.brushEndCallback(Q.filterSpecified?re.getConsolidated():[])}function f(U,Z){var Q=Z.height-x.mouse(U)[1]-2*v.verticalPadding,re=M(Z,Q),ae="crosshair";re.clickableOrdinalRange?ae="pointer":re.region&&(ae=re.region+"-resize"),x.select(document.body).style("cursor",ae)}function u(U){U.on("mousemove",function(Z){x.event.preventDefault(),Z.parent.inBrushDrag||f(this,Z)}).on("mouseleave",function(Z){Z.parent.inBrushDrag||i()}).call(x.behavior.drag().on("dragstart",function(Z){C(this,Z)}).on("drag",function(Z){_(this,Z)}).on("dragend",function(Z){T(this,Z)}))}function A(U,Z){return U[0]-Z[0]}function b(U,Z,Q){var re=Q._context.staticPlot,ae=U.selectAll(".background").data(k);ae.enter().append("rect").classed("background",!0).call(c).call(m).style("pointer-events",re?"none":"auto").attr("transform",e(0,v.verticalPadding)),ae.call(u).attr("height",function(X){return X.height-v.verticalPadding});var oe=U.selectAll(".highlight-shadow").data(k);oe.enter().append("line").classed("highlight-shadow",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width+v.bar.strokeWidth).attr("stroke",Z).attr("opacity",v.bar.strokeOpacity).attr("stroke-linecap","butt"),oe.attr("y1",function(X){return X.height}).call(w);var H=U.selectAll(".highlight").data(k);H.enter().append("line").classed("highlight",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width-v.bar.strokeWidth).attr("stroke",v.bar.fillColor).attr("opacity",v.bar.fillOpacity).attr("stroke-linecap","butt"),H.attr("y1",function(X){return X.height}).call(w)}function z(U,Z,Q){var re=U.selectAll("."+v.cn.axisBrush).data(k,E);re.enter().append("g").classed(v.cn.axisBrush,!0),b(re,Z,Q)}function I(U){return U.svgBrush.extent.map(function(Z){return Z.slice()})}function N(U){U.filterSpecified=!1,U.svgBrush.extent=[[-1/0,1/0]]}function R(U){return function(Q){var re=Q.brush,ae=I(re),oe=ae.slice();re.filter.set(oe),U()}}function B(U){for(var Z=U.slice(),Q=[],re,ae=Z.shift();ae;){for(re=ae.slice();(ae=Z.shift())&&ae[0]<=re[1];)re[1]=Math.max(re[1],ae[1]);Q.push(re)}return Q.length===1&&Q[0][0]>Q[0][1]&&(Q=[]),Q}function F(){var U=[],Z,Q;return{set:function(re){U=re.map(function(ae){return ae.slice().sort(l)}).sort(A),U.length===1&&U[0][0]===-1/0&&U[0][1]===1/0&&(U=[[0,-1]]),Z=B(U),Q=U.reduce(function(ae,oe){return[Math.min(ae[0],oe[0]),Math.max(ae[1],oe[1])]},[1/0,-1/0])},get:function(){return U.slice()},getConsolidated:function(){return Z},getBounds:function(){return Q}}}function P(U,Z,Q,re,ae,oe){var H=F();return H.set(Q),{filter:H,filterSpecified:Z,svgBrush:{extent:[],brushStartCallback:re,brushCallback:R(ae),brushEndCallback:oe}}}function j(U,Z){if(Array.isArray(U[0])?(U=U.map(function(re){return re.sort(l)}),Z.multiselect?U=B(U.sort(A)):U=[U[0]]):U=[U.sort(l)],Z.tickvals){var Q=Z.tickvals.slice().sort(l);if(U=U.map(function(re){var ae=[o(0,Q,re[0],[]),o(1,Q,re[1],[])];if(ae[1]>ae[0])return ae}).filter(function(re){return re}),!U.length)return}return U.length>1?U:U[0]}V.exports={makeBrush:P,ensureAxisBrush:z,cleanRanges:j}}}),iL=Ee({"src/traces/parcoords/defaults.js"(J,V){"use strict";var v=Vr(),x=cf().hasColorscale,E=Cc(),k=kl().defaults,l=Mf(),e=uo(),t=r5(),a=n5(),r=jm().maxDimensionCount,n=Hy();function o(c,m,h,p,g){var i=g("line.color",h);if(x(c,"line")&&v.isArrayOrTypedArray(i)){if(i.length)return g("line.colorscale"),E(c,m,p,g,{prefix:"line.",cLetter:"c"}),i.length;m.line.color=h}return 1/0}function s(c,m,h,p){function g(C,_){return v.coerce(c,m,t.dimensions,C,_)}var i=g("values"),w=g("visible");if(i&&i.length||(w=m.visible=!1),w){g("label"),g("tickvals"),g("ticktext"),g("tickformat");var S=g("range");m._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:S},e.setConvert(m._ax,p.layout),g("multiselect");var M=g("constraintrange");M&&(m.constraintrange=a.cleanRanges(M,m))}}V.exports=function(m,h,p,g){function i(_,T){return v.coerce(m,h,t,_,T)}var w=m.dimensions;Array.isArray(w)&&w.length>r&&(v.log("parcoords traces support up to "+r+" dimensions at the moment"),w.splice(r));var S=l(m,h,{name:"dimensions",layout:g,handleItemDefaults:s}),M=o(m,h,p,g,i);k(h,g,i),(!Array.isArray(S)||!S.length)&&(h.visible=!1),n(h,S,"values",M);var C=v.extendFlat({},g.font,{size:Math.round(g.font.size/1.2)});v.coerceFont(i,"labelfont",C),v.coerceFont(i,"tickfont",C,{autoShadowDflt:!0}),v.coerceFont(i,"rangefont",C),i("labelangle"),i("labelside"),i("unselected.line.color"),i("unselected.line.opacity")}}}),oL=Ee({"src/traces/parcoords/calc.js"(J,V){"use strict";var v=Vr().isArrayOrTypedArray,x=pl(),E=Qh().wrap;V.exports=function(e,t){var a,r;return x.hasColorscale(t,"line")&&v(t.line.color)?(a=t.line.color,r=x.extractOpts(t.line).colorscale,x.calc(e,t,{vals:a,containerStr:"line",cLetter:"c"})):(a=k(t._length),r=[[0,t.line.color],[1,t.line.color]]),E({lineColor:a,cscale:r})};function k(l){for(var e=new Array(l),t=0;t 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` + }`}),A={};return{regl:h,draw:u,atlas:A}},C.prototype.update=function(h){var u=this;if(typeof h=="string")h={text:h};else if(!h)return;h=x(h,{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),h.opacity!=null&&(Array.isArray(h.opacity)?this.opacity=h.opacity.map(function(se){return parseFloat(se)}):this.opacity=parseFloat(h.opacity)),h.viewport!=null&&(this.viewport=r(h.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]),h.kerning!=null&&(this.kerning=h.kerning),h.offset!=null&&(typeof h.offset=="number"&&(h.offset=[h.offset,0]),this.positionOffset=p(h.offset)),h.direction&&(this.direction=h.direction),h.range&&(this.range=h.range,this.scale=[1/(h.range[2]-h.range[0]),1/(h.range[3]-h.range[1])],this.translate=[-h.range[0],-h.range[1]]),h.scale&&(this.scale=h.scale),h.translate&&(this.translate=h.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!h.font&&(h.font=C.baseFontSize+"px sans-serif");var A=!1,b=!1;if(h.font&&(Array.isArray(h.font)?h.font:[h.font]).forEach(function(se,Te){if(typeof se=="string")try{se=v.parse(se)}catch{se=v.parse(C.baseFontSize+"px "+se)}else{var Fe=se.style,We=se.weight,Ge=se.stretch,gt=se.variant;se=v.parse(v.stringify(se)),Fe&&(se.style=Fe),We&&(se.weight=We),Ge&&(se.stretch=Ge),gt&&(se.variant=gt)}var mt=v.stringify({size:C.baseFontSize,family:se.family,stretch:S?se.stretch:void 0,variant:se.variant,weight:se.weight,style:se.style}),Tt=o(se.size),At=Math.round(Tt[0]*s(Tt[1]));if(At!==u.fontSize[Te]&&(b=!0,u.fontSize[Te]=At),(!u.font[Te]||mt!=u.font[Te].baseString)&&(A=!0,u.font[Te]=C.fonts[mt],!u.font[Te])){var Kt=se.family.join(", "),ar=[se.style];se.style!=se.variant&&ar.push(se.variant),se.variant!=se.weight&&ar.push(se.weight),S&&se.weight!=se.stretch&&ar.push(se.stretch),u.font[Te]={baseString:mt,family:Kt,weight:se.weight,stretch:se.stretch,style:se.style,variant:se.variant,width:{},kerning:{},metrics:f(Kt,{origin:"top",fontSize:C.baseFontSize,fontStyle:ar.join(" ")})},C.fonts[mt]=u.font[Te]}}),(A||b)&&this.font.forEach(function(se,Te){var Fe=v.stringify({size:u.fontSize[Te],family:se.family,stretch:S?se.stretch:void 0,variant:se.variant,weight:se.weight,style:se.style});if(u.fontAtlas[Te]=u.shader.atlas[Fe],!u.fontAtlas[Te]){var We=se.metrics;u.shader.atlas[Fe]=u.fontAtlas[Te]={fontString:Fe,step:Math.ceil(u.fontSize[Te]*We.bottom*.5)*2,em:u.fontSize[Te],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:u.regl.texture()}}h.text==null&&(h.text=u.text)}),typeof h.text=="string"&&h.position&&h.position.length>2){for(var z=Array(h.position.length*.5),I=0;I2){for(var B=!h.position[0].length,F=n.mallocFloat(this.count*2),P=0,j=0;P1?u.align[Te]:u.align[0]:u.align;if(typeof Fe=="number")return Fe;switch(Fe){case"right":case"end":return-se;case"center":case"centre":case"middle":return-se*.5}return 0})),this.baseline==null&&h.baseline==null&&(h.baseline=0),h.baseline!=null&&(this.baseline=h.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(se,Te){var Fe=(u.font[Te]||u.font[0]).metrics,We=0;return We+=Fe.bottom*.5,typeof se=="number"?We+=se-Fe.baseline:We+=-Fe[se],We*=-1,We})),h.color!=null)if(h.color||(h.color="transparent"),typeof h.color=="string"||!isNaN(h.color))this.color=e(h.color,"uint8");else{var Ae;if(typeof h.color[0]=="number"&&h.color.length>this.counts.length){var Me=h.color.length;Ae=n.mallocUint8(Me);for(var Ie=(h.color.subarray||h.color.slice).bind(h.color),qe=0;qe4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(ge){var le=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(le);for(var ve=0;ve1?this.counts[ve]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ve]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ve*4,ve*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ve]:this.opacity,baseline:this.baselineOffset[ve]!=null?this.baselineOffset[ve]:this.baselineOffset[0],align:this.align?this.alignOffset[ve]!=null?this.alignOffset[ve]:this.alignOffset[0]:0,atlas:this.fontAtlas[ve]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ve*2,ve*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},C.prototype.destroy=function(){},C.prototype.kerning=!0,C.prototype.position={constant:new Float32Array(2)},C.prototype.translate=null,C.prototype.scale=null,C.prototype.font=null,C.prototype.text="",C.prototype.positionOffset=[0,0],C.prototype.opacity=1,C.prototype.color=new Uint8Array([0,0,0,255]),C.prototype.alignOffset=[0,0],C.maxAtlasSize=1024,C.atlasCanvas=document.createElement("canvas"),C.atlasContext=C.atlasCanvas.getContext("2d",{alpha:!1}),C.baseFontSize=64,C.fonts={};function _(w){return typeof w=="function"&&w._gl&&w.prop&&w.texture&&w.buffer}H.exports=C}}),Vy=Ee({"src/lib/prepare_regl.js"(J,H){"use strict";var v=Q3(),x=Zw();H.exports=function(k,l,e){var t=k._fullLayout,n=!0;return t._glcanvas.each(function(r){if(r.regl){r.regl.preloadCachedCode(e);return}if(!(r.pick&&!t._has("parcoords"))){try{r.regl=x({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:k._context.plotGlPixelRatio||window.devicePixelRatio,extensions:l||[],cachedCode:e||{}})}catch{n=!1}r.regl||(n=!1),n&&this.addEventListener("webglcontextlost",function(a){k&&k.emit&&k.emit("plotly_webglcontextlost",{event:a,layer:r.key})},!1)}}),n||v({container:t._glcontainer.node()}),n}}}),Qw=Ee({"src/traces/scattergl/plot.js"(c,H){"use strict";var v=Cw(),x=qw(),E=S9(),k=U9(),l=Vr(),e=Gh().selectMode,t=Vy(),n=nl(),r=lx(),a=Sw().styleTextSelection,o={};function s(g,f,p,m){var i=g._size,T=g.width*m,S=g.height*m,M=i.l*m,C=i.b*m,_=i.r*m,w=i.t*m,h=i.w*m,u=i.h*m;return[M+f.domain[0]*h,C+p.domain[0]*u,T-_-(1-f.domain[1])*h,S-w-(1-p.domain[1])*u]}var c=H.exports=function(f,p,m){if(m.length){var i=f._fullLayout,T=p._scene,S=p.xaxis,M=p.yaxis,C,_;if(T){var w=t(f,["ANGLE_instanced_arrays","OES_element_index_uint"],o);if(!w){T.init();return}var h=T.count,u=i._glcanvas.data()[0].regl;if(r(f,p,m),T.dirty){if((T.line2d||T.error2d)&&!(T.scatter2d||T.fill2d||T.glText)&&u.clear({color:!0,depth:!0}),T.error2d===!0&&(T.error2d=E(u)),T.line2d===!0&&(T.line2d=x(u)),T.scatter2d===!0&&(T.scatter2d=v(u)),T.fill2d===!0&&(T.fill2d=x(u)),T.glText===!0)for(T.glText=new Array(h),C=0;CT.glText.length){var A=h-T.glText.length;for(C=0;Cee&&(isNaN(W[ae])||isNaN(W[ae+1]));)ae-=2;q.positions=W.slice(ee,ae+2)}return q}),T.line2d.update(T.lineOptions)),T.error2d){var I=(T.errorXOptions||[]).concat(T.errorYOptions||[]).map(function(q){return q||{positions:[],errors:[]}});T.error2d.update(I)}T.scatter2d&&T.scatter2d.update(T.markerOptions),T.fillOrder=l.repeat(null,h),T.fill2d&&(T.fillOptions=T.fillOptions.map(function(q,W){var ee=m[W];if(!(!q||!ee||!ee[0]||!ee[0].trace)){var ae=ee[0],fe=ae.trace,ye=ae.t,xe=T.lineOptions[W],Ae,Me,Ie=[];fe._ownfill&&Ie.push(W),fe._nexttrace&&Ie.push(W+1),Ie.length&&(T.fillOrder[W]=Ie);var qe=[],je=xe&&xe.positions||ye.positions,ke,ge;if(fe.fill==="tozeroy"){for(ke=0;keke&&isNaN(je[ge+1]);)ge-=2;je[ke+1]!==0&&(qe=[je[ke],0]),qe=qe.concat(je.slice(ke,ge+2)),je[ge+1]!==0&&(qe=qe.concat([je[ge],0]))}else if(fe.fill==="tozerox"){for(ke=0;keke&&isNaN(je[ge]);)ge-=2;je[ke]!==0&&(qe=[0,je[ke+1]]),qe=qe.concat(je.slice(ke,ge+2)),je[ge]!==0&&(qe=qe.concat([0,je[ge+1]]))}else if(fe.fill==="toself"||fe.fill==="tonext"){for(qe=[],Ae=0,q.splitNull=!0,Me=0;Me-1;for(let[q]of m)if(q){var F=q.trace,P=q.t,j=P.index,U=F._length,Z=P.x,Q=P.y;if(F.selectedpoints||R||B){if(R||(R=!0),F.selectedpoints){var re=T.selectBatch[j]=F.selectedpoints,ne={};for(_=0;_S&&p||Ta,b;for(A?b=p.sizeAvg||Math.max(p.size,3):b=E(c,f),M=0;M{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,k(()=>{this.dirty=!1})),this)},n.prototype.update=function(...s){if(!s.length)return;for(let f=0;fb||!p.lower&&A{c[m+T]=f})}this.scatter.draw(...c)}return this},n.prototype.destroy=function(){return this.traces.forEach(s=>{s.buffer&&s.buffer.destroy&&s.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function r(s,c,g){let f=s.id!=null?s.id:s,p=c,m=g;return f<<16|(p&255)<<8|m&255}function a(s,c,g){let f,p,m,i,T,S,M,C,_=s[c],w=s[g];return _.length>2?(f=_[0],m=_[2],p=_[1],i=_[3]):_.length?(f=p=_[0],m=i=_[1]):(f=_.x,p=_.y,m=_.x+_.width,i=_.y+_.height),w.length>2?(T=w[0],M=w[2],S=w[1],C=w[3]):w.length?(T=S=w[0],M=C=w[1]):(T=w.x,S=w.y,M=w.x+w.width,C=w.y+w.height),[T,p,M,i]}function o(s){if(typeof s=="number")return[s,s,s,s];if(s.length===2)return[s[0],s[1],s[0],s[1]];{let c=e(s);return[c.x,c.y,c.x+c.width,c.y+c.height]}}}}),K9=Ee({"src/traces/splom/plot.js"(J,H){"use strict";var v=Z9(),x=Vr(),E=Xl(),k=Gh().selectMode;H.exports=function(t,n,r){if(r.length)for(var a=0;a-1,B=k(p)||!!a.selectedpoints||R,F=!0;if(B){var P=a._length;if(a.selectedpoints){s.selectBatch=a.selectedpoints;var j=a.selectedpoints,U={};for(T=0;T=Z[Q][0]&&U<=Z[Q][1])return!0;return!1}function c(U){U.attr("x",-v.bar.captureWidth/2).attr("width",v.bar.captureWidth)}function g(U){U.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function f(U){if(!U.brush.filterSpecified)return"0,"+U.height;for(var Z=p(U.brush.filter.getConsolidated(),U.height),Q=[0],re,ne,oe,V=Z.length?Z[0][0]:null,$=0;$U[1]+Q||Z=.9*U[1]+.1*U[0]?"n":Z<=.9*U[0]+.1*U[1]?"s":"ns"}function i(){x.select(document.body).style("cursor",null)}function T(U){U.attr("stroke-dasharray",f)}function S(U,Z){var Q=x.select(U).selectAll(".highlight, .highlight-shadow"),re=Z?Q.transition().duration(v.bar.snapDuration).each("end",Z):Q;T(re)}function M(U,Z){var Q=U.brush,re=Q.filterSpecified,ne=NaN,oe={},V;if(re){var $=U.height,K=Q.filter.getConsolidated(),G=p(K,$),X=NaN,q=NaN,W=NaN;for(V=0;V<=G.length;V++){var ee=G[V];if(ee&&ee[0]<=Z&&Z<=ee[1]){X=V;break}else if(q=V?V-1:NaN,ee&&ee[0]>Z){W=V;break}}if(ne=X,isNaN(ne)&&(isNaN(q)||isNaN(W)?ne=isNaN(q)?W:q:ne=Z-G[q][1]=Ae[0]&&xe<=Ae[1]){oe.clickableOrdinalRange=Ae;break}}}return oe}function C(U,Z){x.event.sourceEvent.stopPropagation();var Q=Z.height-x.mouse(U)[1]-2*v.verticalPadding,re=Z.unitToPaddedPx.invert(Q),ne=Z.brush,oe=M(Z,Q),V=oe.interval,$=ne.svgBrush;if($.wasDragged=!1,$.grabbingBar=oe.region==="ns",$.grabbingBar){var K=V.map(Z.unitToPaddedPx);$.grabPoint=Q-K[0]-v.verticalPadding,$.barLength=K[1]-K[0]}$.clickableOrdinalRange=oe.clickableOrdinalRange,$.stayingIntervals=Z.multiselect&&ne.filterSpecified?ne.filter.getConsolidated():[],V&&($.stayingIntervals=$.stayingIntervals.filter(function(G){return G[0]!==V[0]&&G[1]!==V[1]})),$.startExtent=oe.region?V[oe.region==="s"?1:0]:re,Z.parent.inBrushDrag=!0,$.brushStartCallback()}function _(U,Z){x.event.sourceEvent.stopPropagation();var Q=Z.height-x.mouse(U)[1]-2*v.verticalPadding,re=Z.brush.svgBrush;re.wasDragged=!0,re._dragging=!0,re.grabbingBar?re.newExtent=[Q-re.grabPoint,Q+re.barLength-re.grabPoint].map(Z.unitToPaddedPx.invert):re.newExtent=[re.startExtent,Z.unitToPaddedPx.invert(Q)].sort(l),Z.brush.filterSpecified=!0,re.extent=re.stayingIntervals.concat([re.newExtent]),re.brushCallback(Z),S(U.parentNode)}function w(U,Z){var Q=Z.brush,re=Q.filter,ne=Q.svgBrush;ne._dragging||(h(U,Z),_(U,Z),Z.brush.svgBrush.wasDragged=!1),ne._dragging=!1;var oe=x.event;oe.sourceEvent.stopPropagation();var V=ne.grabbingBar;if(ne.grabbingBar=!1,ne.grabLocation=void 0,Z.parent.inBrushDrag=!1,i(),!ne.wasDragged){ne.wasDragged=void 0,ne.clickableOrdinalRange?Q.filterSpecified&&Z.multiselect?ne.extent.push(ne.clickableOrdinalRange):(ne.extent=[ne.clickableOrdinalRange],Q.filterSpecified=!0):V?(ne.extent=ne.stayingIntervals,ne.extent.length===0&&N(Q)):N(Q),ne.brushCallback(Z),S(U.parentNode),ne.brushEndCallback(Q.filterSpecified?re.getConsolidated():[]);return}var $=function(){re.set(re.getConsolidated())};if(Z.ordinal){var K=Z.unitTickvals;K[K.length-1]ne.newExtent[0];ne.extent=ne.stayingIntervals.concat(G?[ne.newExtent]:[]),ne.extent.length||N(Q),ne.brushCallback(Z),G?S(U.parentNode,$):($(),S(U.parentNode))}else $();ne.brushEndCallback(Q.filterSpecified?re.getConsolidated():[])}function h(U,Z){var Q=Z.height-x.mouse(U)[1]-2*v.verticalPadding,re=M(Z,Q),ne="crosshair";re.clickableOrdinalRange?ne="pointer":re.region&&(ne=re.region+"-resize"),x.select(document.body).style("cursor",ne)}function u(U){U.on("mousemove",function(Z){x.event.preventDefault(),Z.parent.inBrushDrag||h(this,Z)}).on("mouseleave",function(Z){Z.parent.inBrushDrag||i()}).call(x.behavior.drag().on("dragstart",function(Z){C(this,Z)}).on("drag",function(Z){_(this,Z)}).on("dragend",function(Z){w(this,Z)}))}function A(U,Z){return U[0]-Z[0]}function b(U,Z,Q){var re=Q._context.staticPlot,ne=U.selectAll(".background").data(k);ne.enter().append("rect").classed("background",!0).call(c).call(g).style("pointer-events",re?"none":"auto").attr("transform",e(0,v.verticalPadding)),ne.call(u).attr("height",function($){return $.height-v.verticalPadding});var oe=U.selectAll(".highlight-shadow").data(k);oe.enter().append("line").classed("highlight-shadow",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width+v.bar.strokeWidth).attr("stroke",Z).attr("opacity",v.bar.strokeOpacity).attr("stroke-linecap","butt"),oe.attr("y1",function($){return $.height}).call(T);var V=U.selectAll(".highlight").data(k);V.enter().append("line").classed("highlight",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width-v.bar.strokeWidth).attr("stroke",v.bar.fillColor).attr("opacity",v.bar.fillOpacity).attr("stroke-linecap","butt"),V.attr("y1",function($){return $.height}).call(T)}function z(U,Z,Q){var re=U.selectAll("."+v.cn.axisBrush).data(k,E);re.enter().append("g").classed(v.cn.axisBrush,!0),b(re,Z,Q)}function I(U){return U.svgBrush.extent.map(function(Z){return Z.slice()})}function N(U){U.filterSpecified=!1,U.svgBrush.extent=[[-1/0,1/0]]}function R(U){return function(Q){var re=Q.brush,ne=I(re),oe=ne.slice();re.filter.set(oe),U()}}function B(U){for(var Z=U.slice(),Q=[],re,ne=Z.shift();ne;){for(re=ne.slice();(ne=Z.shift())&&ne[0]<=re[1];)re[1]=Math.max(re[1],ne[1]);Q.push(re)}return Q.length===1&&Q[0][0]>Q[0][1]&&(Q=[]),Q}function F(){var U=[],Z,Q;return{set:function(re){U=re.map(function(ne){return ne.slice().sort(l)}).sort(A),U.length===1&&U[0][0]===-1/0&&U[0][1]===1/0&&(U=[[0,-1]]),Z=B(U),Q=U.reduce(function(ne,oe){return[Math.min(ne[0],oe[0]),Math.max(ne[1],oe[1])]},[1/0,-1/0])},get:function(){return U.slice()},getConsolidated:function(){return Z},getBounds:function(){return Q}}}function P(U,Z,Q,re,ne,oe){var V=F();return V.set(Q),{filter:V,filterSpecified:Z,svgBrush:{extent:[],brushStartCallback:re,brushCallback:R(ne),brushEndCallback:oe}}}function j(U,Z){if(Array.isArray(U[0])?(U=U.map(function(re){return re.sort(l)}),Z.multiselect?U=B(U.sort(A)):U=[U[0]]):U=[U.sort(l)],Z.tickvals){var Q=Z.tickvals.slice().sort(l);if(U=U.map(function(re){var ne=[o(0,Q,re[0],[]),o(1,Q,re[1],[])];if(ne[1]>ne[0])return ne}).filter(function(re){return re}),!U.length)return}return U.length>1?U:U[0]}H.exports={makeBrush:P,ensureAxisBrush:z,cleanRanges:j}}}),iL=Ee({"src/traces/parcoords/defaults.js"(J,H){"use strict";var v=Vr(),x=cf().hasColorscale,E=Cc(),k=kl().defaults,l=Mf(),e=uo(),t=r5(),n=a5(),r=jm().maxDimensionCount,a=Hy();function o(c,g,f,p,m){var i=m("line.color",f);if(x(c,"line")&&v.isArrayOrTypedArray(i)){if(i.length)return m("line.colorscale"),E(c,g,p,m,{prefix:"line.",cLetter:"c"}),i.length;g.line.color=f}return 1/0}function s(c,g,f,p){function m(C,_){return v.coerce(c,g,t.dimensions,C,_)}var i=m("values"),T=m("visible");if(i&&i.length||(T=g.visible=!1),T){m("label"),m("tickvals"),m("ticktext"),m("tickformat");var S=m("range");g._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:S},e.setConvert(g._ax,p.layout),m("multiselect");var M=m("constraintrange");M&&(g.constraintrange=n.cleanRanges(M,g))}}H.exports=function(g,f,p,m){function i(_,w){return v.coerce(g,f,t,_,w)}var T=g.dimensions;Array.isArray(T)&&T.length>r&&(v.log("parcoords traces support up to "+r+" dimensions at the moment"),T.splice(r));var S=l(g,f,{name:"dimensions",layout:m,handleItemDefaults:s}),M=o(g,f,p,m,i);k(f,m,i),(!Array.isArray(S)||!S.length)&&(f.visible=!1),a(f,S,"values",M);var C=v.extendFlat({},m.font,{size:Math.round(m.font.size/1.2)});v.coerceFont(i,"labelfont",C),v.coerceFont(i,"tickfont",C,{autoShadowDflt:!0}),v.coerceFont(i,"rangefont",C),i("labelangle"),i("labelside"),i("unselected.line.color"),i("unselected.line.opacity")}}}),oL=Ee({"src/traces/parcoords/calc.js"(J,H){"use strict";var v=Vr().isArrayOrTypedArray,x=pl(),E=Qh().wrap;H.exports=function(e,t){var n,r;return x.hasColorscale(t,"line")&&v(t.line.color)?(n=t.line.color,r=x.extractOpts(t.line).colorscale,x.calc(e,t,{vals:n,containerStr:"line",cLetter:"c"})):(n=k(t._length),r=[[0,t.line.color],[1,t.line.color]]),E({lineColor:n,cscale:r})};function k(l){for(var e=new Array(l),t=0;t 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` `),x=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),E=jm().maxDimensionCount,k=Vr(),l=1e-6,e=2048,t=new Uint8Array(4),a=new Uint8Array(4),r={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function n(T){T.read({x:0,y:0,width:1,height:1,data:t})}function o(T,f,u,A,b){var z=T._gl;z.enable(z.SCISSOR_TEST),z.scissor(f,u,A,b),T.clear({color:[0,0,0,0],depth:1})}function s(T,f,u,A,b,z){var I=z.key;function N(R){var B=Math.min(A,b-R*A);R===0&&(window.cancelAnimationFrame(u.currentRafs[I]),delete u.currentRafs[I],o(T,z.scissorX,z.scissorY,z.scissorWidth,z.viewBoxSize[1])),!u.clearOnly&&(z.count=2*B,z.offset=2*R*A,f(z),R*A+B>>8*f)%256/255}function p(T,f,u){for(var A=new Array(T*(E+4)),b=0,z=0;zMe&&(Me=q[fe].dim1.canvasX,xe=fe);ne===0&&o(b,0,0,B.canvasWidth,B.canvasHeight);var Ie=H(u);for(fe=0;fefe._length&&(ge=ge.slice(0,fe._length));var ue=fe.tickvals,ve;function se(gt,mt){return{val:gt,text:ve[mt]}}function Te(gt,mt){return gt.val-mt.val}if(E(ue)&&ue.length){x.isTypedArray(ue)&&(ue=Array.from(ue)),ve=fe.ticktext,!E(ve)||!ve.length?ve=ue.map(k(fe.tickformat)):ve.length>ue.length?ve=ve.slice(0,ue.length):ue.length>ve.length&&(ue=ue.slice(0,ve.length));for(var Fe=1;Fe=mt||nr>=Tt)return;var _r=Ge.lineLayer.readPixel(Kt,Tt-1-nr),Zt=_r[3]!==0,sr=Zt?_r[2]+256*(_r[1]+256*_r[0]):null,Ot={x:Kt,y:nr,clientX:gt.clientX,clientY:gt.clientY,dataIndex:Ge.model.key,curveNumber:sr};sr!==xe&&(Zt?X.hover(Ot):X.unhover&&X.unhover(Ot),xe=sr)}}),ye.style("opacity",function(Ge){return Ge.pick?0:1}),Y.style("background","rgba(255, 255, 255, 0)");var Me=Y.selectAll("."+g.cn.parcoords).data(fe,c);Me.exit().remove(),Me.enter().append("g").classed(g.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Me.attr("transform",function(Ge){return a(Ge.model.translateX,Ge.model.translateY)});var Ie=Me.selectAll("."+g.cn.parcoordsControlView).data(m,c);Ie.enter().append("g").classed(g.cn.parcoordsControlView,!0),Ie.attr("transform",function(Ge){return a(Ge.model.pad.l,Ge.model.pad.t)});var Ue=Ie.selectAll("."+g.cn.yAxis).data(function(Ge){return Ge.dimensions},c);Ue.enter().append("g").classed(g.cn.yAxis,!0),Ie.each(function(Ge){j(Ue,Ge,$)}),ye.each(function(Ge){if(Ge.viewModel){!Ge.lineLayer||X?Ge.lineLayer=w(this,Ge):Ge.lineLayer.update(Ge),(Ge.key||Ge.key===0)&&(Ge.viewModel[Ge.key]=Ge.lineLayer);var gt=!Ge.context||X;Ge.lineLayer.render(Ge.viewModel.panels,gt)}}),Ue.attr("transform",function(Ge){return a(Ge.xScale(Ge.xIndex),0)}),Ue.call(v.behavior.drag().origin(function(Ge){return Ge}).on("drag",function(Ge){var gt=Ge.parent;ne.linePickActive(!1),Ge.x=Math.max(-g.overdrag,Math.min(Ge.model.width+g.overdrag,v.event.x)),Ge.canvasX=Ge.x*Ge.model.canvasPixelRatio,Ue.sort(function(mt,Tt){return mt.x-Tt.x}).each(function(mt,Tt){mt.xIndex=Tt,mt.x=Ge===mt?mt.x:mt.xScale(mt.xIndex),mt.canvasX=mt.x*mt.model.canvasPixelRatio}),j(Ue,gt,$),Ue.filter(function(mt){return Math.abs(Ge.xIndex-mt.xIndex)!==0}).attr("transform",function(mt){return a(mt.xScale(mt.xIndex),0)}),v.select(this).attr("transform",a(Ge.x,0)),Ue.each(function(mt,Tt,At){At===Ge.parent.key&&(gt.dimensions[Tt]=mt)}),gt.contextLayer&>.contextLayer.render(gt.panels,!1,!I(gt)),gt.focusLayer.render&>.focusLayer.render(gt.panels)}).on("dragend",function(Ge){var gt=Ge.parent;Ge.x=Ge.xScale(Ge.xIndex),Ge.canvasX=Ge.x*Ge.model.canvasPixelRatio,j(Ue,gt,$),v.select(this).attr("transform",function(mt){return a(mt.x,0)}),gt.contextLayer&>.contextLayer.render(gt.panels,!1,!I(gt)),gt.focusLayer&>.focusLayer.render(gt.panels),gt.pickLayer&>.pickLayer.render(gt.panels,!0),ne.linePickActive(!0),X&&X.axesMoved&&X.axesMoved(gt.key,gt.dimensions.map(function(mt){return mt.crossfilterDimensionIndex}))})),Ue.exit().remove();var qe=Ue.selectAll("."+g.cn.axisOverlays).data(m,c);qe.enter().append("g").classed(g.cn.axisOverlays,!0),qe.selectAll("."+g.cn.axis).remove();var ke=qe.selectAll("."+g.cn.axis).data(m,c);ke.enter().append("g").classed(g.cn.axis,!0),ke.each(function(Ge){var gt=Ge.model.height/Ge.model.tickDistance,mt=Ge.domainScale,Tt=mt.domain();v.select(this).call(v.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(gt,Ge.tickFormat).tickValues(Ge.ordinal?Tt:null).tickFormat(function(At){return p.isOrdinal(Ge)?At:Z(Ge.model.dimensions[Ge.visibleIndex],At)}).scale(mt)),n.font(ke.selectAll("text"),Ge.model.tickFont)}),ke.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),ke.selectAll("text").style("cursor","default");var ge=qe.selectAll("."+g.cn.axisHeading).data(m,c);ge.enter().append("g").classed(g.cn.axisHeading,!0);var ue=ge.selectAll("."+g.cn.axisTitle).data(m,c);ue.enter().append("text").classed(g.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",K?"none":"auto"),ue.text(function(Ge){return Ge.label}).each(function(Ge){var gt=v.select(this);n.font(gt,Ge.model.labelFont),r.convertToTspans(gt,ae)}).attr("transform",function(Ge){var gt=P(Ge.model.labelAngle,Ge.model.labelSide),mt=g.axisTitleOffset;return(gt.dir>0?"":a(0,2*mt+Ge.model.height))+t(gt.degrees)+a(-mt*gt.dx,-mt*gt.dy)}).attr("text-anchor",function(Ge){var gt=P(Ge.model.labelAngle,Ge.model.labelSide),mt=Math.abs(gt.dx),Tt=Math.abs(gt.dy);return 2*mt>Tt?gt.dir*gt.dx<0?"start":"end":"middle"});var ve=qe.selectAll("."+g.cn.axisExtent).data(m,c);ve.enter().append("g").classed(g.cn.axisExtent,!0);var se=ve.selectAll("."+g.cn.axisExtentTop).data(m,c);se.enter().append("g").classed(g.cn.axisExtentTop,!0),se.attr("transform",a(0,-g.axisExtentOffset));var Te=se.selectAll("."+g.cn.axisExtentTopText).data(m,c);Te.enter().append("text").classed(g.cn.axisExtentTopText,!0).call(B),Te.text(function(Ge){return Q(Ge,!0)}).each(function(Ge){n.font(v.select(this),Ge.model.rangeFont)});var Fe=ve.selectAll("."+g.cn.axisExtentBottom).data(m,c);Fe.enter().append("g").classed(g.cn.axisExtentBottom,!0),Fe.attr("transform",function(Ge){return a(0,Ge.model.height+g.axisExtentOffset)});var We=Fe.selectAll("."+g.cn.axisExtentBottomText).data(m,c);We.enter().append("text").classed(g.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(B),We.text(function(Ge){return Q(Ge,!1)}).each(function(Ge){n.font(v.select(this),Ge.model.rangeFont)}),i.ensureAxisBrush(qe,ee,ae)}}}),i5=Ee({"src/traces/parcoords/plot.js"(t,V){"use strict";var v=lL(),x=Vy(),E=a5().isVisible,k={};function l(a,r,n){var o=r.indexOf(n),s=a.indexOf(o);return s===-1&&(s+=r.length),s}function e(a,r){return function(o,s){return l(a,r,o)-l(a,r,s)}}var t=V.exports=function(r,n){var o=r._fullLayout,s=x(r,[],k);if(s){var c={},m={},h={},p=o._size;n.forEach(function(M,C){var _=M[0].trace,T=h[C]=_.index;c[C]=r.data[T].dimensions,m[C]=r.data[T].dimensions.slice()});var g=function(M,C,_){var T=m[M][C],f=_.map(function(N){return N.slice()}),u="dimensions["+C+"].constraintrange",A=o._tracePreGUI[r._fullData[h[M]].uid];if(A[u]===void 0){var b=T.constraintrange;A[u]=b||null}var z=r._fullData[h[M]].dimensions[C];f.length?(f.length===1&&(f=f[0]),T.constraintrange=f,z.constraintrange=f.slice(),f=[f]):(delete T.constraintrange,delete z.constraintrange,f=null);var I={};I[u]=f,r.emit("plotly_restyle",[I,[h[M]]])},i=function(M){r.emit("plotly_hover",M)},w=function(M){r.emit("plotly_unhover",M)},S=function(M,C){var _=e(C,m[M].filter(E));c[M].sort(_),m[M].filter(function(T){return!E(T)}).sort(function(T){return m[M].indexOf(T)}).forEach(function(T){c[M].splice(c[M].indexOf(T),1),c[M].splice(m[M].indexOf(T),0,T)}),r.emit("plotly_restyle",[{dimensions:[c[M]]},[h[M]]])};v(r,n,{width:p.w,height:p.h,margin:{t:p.t,r:p.r,b:p.b,l:p.l}},{filterChanged:g,hover:i,unhover:w,axesMoved:S})}};t.reglPrecompiled=k}}),uL=Ee({"src/traces/parcoords/base_plot.js"(J){"use strict";var V=Hn(),v=uf().getModuleCalcData,x=i5(),E=mh();J.name="parcoords",J.plot=function(k){var l=v(k.calcdata,"parcoords")[0];l.length&&x(k,l)},J.clean=function(k,l,e,t){var a=t._has&&t._has("parcoords"),r=l._has&&l._has("parcoords");a&&!r&&(t._paperdiv.selectAll(".parcoords").remove(),t._glimages.selectAll("*").remove())},J.toSVG=function(k){var l=k._fullLayout._glimages,e=V.select(k).selectAll(".svg-container"),t=e.filter(function(r,n){return n===e.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function a(){var r=this,n=r.toDataURL("image/png"),o=l.append("svg:image");o.attr({xmlns:E.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:r.style.width,height:r.style.height})}t.each(a),window.setTimeout(function(){V.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),cL=Ee({"src/traces/parcoords/base_index.js"(J,V){"use strict";V.exports={attributes:r5(),supplyDefaults:iL(),calc:oL(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:uL(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),fL=Ee({"src/traces/parcoords/index.js"(J,V){"use strict";var v=cL();v.plot=i5(),V.exports=v}}),hL=Ee({"lib/parcoords.js"(J,V){"use strict";V.exports=fL()}}),o5=Ee({"src/traces/parcats/attributes.js"(J,V){"use strict";var v=vo().extendFlat,x=ia(),E=Xs(),k=$s(),{hovertemplateAttrs:l,templatefallbackAttrs:e}=Cs(),t=kl().attributes,a=v({editType:"calc"},k("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:e({editType:"plot"})});V.exports={domain:t({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:v({},x.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:e({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:E({editType:"calc"}),tickfont:E({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:a,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}}}),dL=Ee({"src/traces/parcats/defaults.js"(J,V){"use strict";var v=Vr(),x=cf().hasColorscale,E=Cc(),k=kl().defaults,l=Mf(),e=o5(),t=Hy(),a=vs().isTypedArraySpec;function r(o,s,c,m,h){h("line.shape"),h("line.hovertemplate"),h("line.hovertemplatefallback");var p=h("line.color",m.colorway[0]);if(x(o,"line")&&v.isArrayOrTypedArray(p)){if(p.length)return h("line.colorscale"),E(o,s,m,h,{prefix:"line.",cLetter:"c"}),p.length;s.line.color=c}return 1/0}function n(o,s){function c(S,M){return v.coerce(o,s,e.dimensions,S,M)}var m=c("values"),h=c("visible");if(m&&m.length||(h=s.visible=!1),h){c("label"),c("displayindex",s._index);var p=o.categoryarray,g=v.isArrayOrTypedArray(p)&&p.length>0||a(p),i;g&&(i="array");var w=c("categoryorder",i);w==="array"?(c("categoryarray"),c("ticktext")):(delete o.categoryarray,delete o.ticktext),!g&&w==="array"&&(s.categoryorder="trace")}}V.exports=function(s,c,m,h){function p(S,M){return v.coerce(s,c,e,S,M)}var g=l(s,c,{name:"dimensions",handleItemDefaults:n}),i=r(s,c,m,h,p);k(c,h,p),(!Array.isArray(g)||!g.length)&&(c.visible=!1),t(c,g,"values",i),p("hoveron"),p("hovertemplate"),p("hovertemplatefallback"),p("arrangement"),p("bundlecolors"),p("sortpaths"),p("counts");var w=h.font;v.coerceFont(p,"labelfont",w,{overrideDflt:{size:Math.round(w.size)}}),v.coerceFont(p,"tickfont",w,{autoShadowDflt:!0,overrideDflt:{size:Math.round(w.size/1.2)}})}}}),vL=Ee({"src/traces/parcats/calc.js"(J,V){"use strict";var v=Qh().wrap,x=cf().hasColorscale,E=Sf(),k=_b(),l=yo(),e=Vr(),t=mi();V.exports=function(w,S){var M=e.filterVisible(S.dimensions);if(M.length===0)return[];var C=M.map(function(H){var X;if(H.categoryorder==="trace")X=null;else if(H.categoryorder==="array")X=H.categoryarray;else{X=k(H.values);for(var K=!0,G=0;G=i.length||w[i[S]]!==void 0)return!1;w[i[S]]=!0}return!0}}}),pL=Ee({"src/traces/parcats/parcats.js"(J,V){"use strict";var v=Hn(),x=(Zv(),ra(iv)).interpolateNumber,E=Hg(),k=Qa(),l=$l(),e=Vr(),t=e.strTranslate,a=yo(),r=Fs();function n(Y,q,$,ee){var ne=q._context.staticPlot,fe=Y.map(oe.bind(0,q,$)),ye=ee.selectAll("g.parcatslayer").data([null]);ye.enter().append("g").attr("class","parcatslayer").style("pointer-events",ne?"none":"all");var xe=ye.selectAll("g.trace.parcats").data(fe,o),Ae=xe.enter().append("g").attr("class","trace parcats");xe.attr("transform",function(Te){return t(Te.x,Te.y)}),Ae.append("g").attr("class","paths");var Me=xe.select("g.paths"),Ie=Me.selectAll("path.path").data(function(Te){return Te.paths},o);Ie.attr("fill",function(Te){return Te.model.color});var Ue=Ie.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Te){return Te.model.color}).attr("fill-opacity",0);S(Ue),Ie.attr("d",function(Te){return Te.svgD}),Ue.empty()||Ie.sort(c),Ie.exit().remove(),Ie.on("mouseover",h).on("mouseout",p).on("click",w),Ae.append("g").attr("class","dimensions");var qe=xe.select("g.dimensions"),ke=qe.selectAll("g.dimension").data(function(Te){return Te.dimensions},o);ke.enter().append("g").attr("class","dimension"),ke.attr("transform",function(Te){return t(Te.x,0)}),ke.exit().remove();var ge=ke.selectAll("g.category").data(function(Te){return Te.categories},o),ue=ge.enter().append("g").attr("class","category");ge.attr("transform",function(Te){return t(0,Te.y)}),ue.append("rect").attr("class","catrect").attr("pointer-events","none"),ge.select("rect.catrect").attr("fill","none").attr("width",function(Te){return Te.width}).attr("height",function(Te){return Te.height}),_(ue);var ve=ge.selectAll("rect.bandrect").data(function(Te){return Te.bands},o);ve.each(function(){e.raiseToTop(this)}),ve.attr("fill",function(Te){return Te.color});var se=ve.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Te){return Te.color}).attr("fill-opacity",0);ve.attr("fill",function(Te){return Te.color}).attr("width",function(Te){return Te.width}).attr("height",function(Te){return Te.height}).attr("y",function(Te){return Te.y}).attr("cursor",function(Te){return Te.parcatsViewModel.arrangement==="fixed"?"default":Te.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),f(se),ve.exit().remove(),ue.append("text").attr("class","catlabel").attr("pointer-events","none"),ge.select("text.catlabel").attr("text-anchor",function(Te){return s(Te)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(Te){return s(Te)?Te.width+5:-5}).attr("y",function(Te){return Te.height/2}).text(function(Te){return Te.model.categoryLabel}).each(function(Te){a.font(v.select(this),Te.parcatsViewModel.categorylabelfont),r.convertToTspans(v.select(this),q)}),ue.append("text").attr("class","dimlabel"),ge.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Te){return Te.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Te){return Te.width/2}).attr("y",-5).text(function(Te,Fe){return Fe===0?Te.parcatsViewModel.model.dimensions[Te.model.dimensionInd].dimensionLabel:null}).each(function(Te){a.font(v.select(this),Te.parcatsViewModel.labelfont)}),ge.selectAll("rect.bandrect").on("mouseover",F).on("mouseout",P),ge.exit().remove(),ke.call(v.behavior.drag().origin(function(Te){return{x:Te.x,y:0}}).on("dragstart",j).on("drag",U).on("dragend",Z)),xe.each(function(Te){Te.traceSelection=v.select(this),Te.pathSelection=v.select(this).selectAll("g.paths").selectAll("path.path"),Te.dimensionSelection=v.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),xe.exit().remove()}V.exports=function(Y,q,$,ee){n($,Y,ee,q)};function o(Y){return Y.key}function s(Y){var q=Y.parcatsViewModel.dimensions.length,$=Y.parcatsViewModel.dimensions[q-1].model.dimensionInd;return Y.model.dimensionInd===$}function c(Y,q){return Y.model.rawColor>q.model.rawColor?1:Y.model.rawColorne)return 1;if(ee!==ne){var fe=isNaN(ee),ye=isNaN(ne);if(fe!==ye)return fe?1:-1}}return Y.length-q.length}function h(Y){if(!Y.parcatsViewModel.dragDimension&&Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){e.raiseToTop(this),M(v.select(this));var q=g(Y),$=i(Y);if(Y.parcatsViewModel.graphDiv.emit("plotly_hover",{points:q,event:v.event,constraints:$}),Y.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var ee=v.mouse(this)[0],ne=Y.parcatsViewModel.graphDiv,fe=Y.parcatsViewModel.trace,ye=ne._fullLayout,xe=ye._paperdiv.node().getBoundingClientRect(),Ae=Y.parcatsViewModel.graphDiv.getBoundingClientRect(),Me,Ie,Ue;for(Ue=0;Ue"),gt=v.mouse(ne)[0];l.loneHover({trace:fe,x:ge-xe.left+Ae.left,y:ue-xe.top+Ae.top,text:Ge,color:Y.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:ve,idealAlign:gtk.mostReadable(q.model.color)).attr("stroke-width",.3)}function C(Y){Y.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function _(Y){Y.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function T(Y){Y.attr("stroke","black").attr("stroke-width",1.5)}function f(Y){Y.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function u(Y){var q=Y.parcatsViewModel.pathSelection,$=Y.categoryViewModel.model.dimensionInd,ee=Y.categoryViewModel.model.categoryInd;return q.filter(function(ne){return ne.model.categoryInds[$]===ee&&ne.model.color===Y.color})}function A(Y){var q=v.select(Y.parentNode).selectAll("rect.bandrect");q.each(function($){var ee=u($);M(ee),ee.each(function(){e.raiseToTop(this)})}),C(v.select(Y.parentNode))}function b(Y){var q=v.select(Y).datum(),$=u(q);M($),$.each(function(){e.raiseToTop(this)}),v.select(Y.parentNode).selectAll("rect.bandrect").filter(function(ee){return ee.color===q.color}).each(function(){e.raiseToTop(this),T(v.select(this))})}function z(Y,q,$){var ee=v.select(Y).datum(),ne=ee.categoryViewModel.model,fe=ee.parcatsViewModel.graphDiv,ye=v.select(Y.parentNode).selectAll("rect.bandrect"),xe=[];ye.each(function(Me){var Ie=u(Me);Ie.each(function(Ue){Array.prototype.push.apply(xe,g(Ue))})});var Ae={};Ae[ne.dimensionInd]=ne.categoryValue,fe.emit(q,{points:xe,event:$,constraints:Ae})}function I(Y,q,$){var ee=v.select(Y).datum(),ne=ee.categoryViewModel.model,fe=ee.parcatsViewModel.graphDiv,ye=u(ee),xe=[];ye.each(function(Me){Array.prototype.push.apply(xe,g(Me))});var Ae={};Ae[ne.dimensionInd]=ne.categoryValue,ee.rawColor!==void 0&&(Ae.color=ee.rawColor),fe.emit(q,{points:xe,event:$,constraints:Ae})}function N(Y,q,$){Y._fullLayout._calcInverseTransform(Y);var ee=Y._fullLayout._invScaleX,ne=Y._fullLayout._invScaleY,fe=v.select($.parentNode).select("rect.catrect"),ye=fe.node().getBoundingClientRect(),xe=fe.datum(),Ae=xe.parcatsViewModel,Me=Ae.model.dimensions[xe.model.dimensionInd],Ie=Ae.trace,Ue=ye.top+ye.height/2,qe,ke;Ae.dimensions.length>1&&Me.displayInd===Ae.dimensions.length-1?(qe=ye.left,ke="left"):(qe=ye.left+ye.width,ke="right");var ge=xe.model.count,ue=xe.model.categoryLabel,ve=ge/xe.parcatsViewModel.model.count,se={countLabel:ge,categoryLabel:ue,probabilityLabel:ve.toFixed(3)},Te=[];xe.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Te.push(["Count:",se.countLabel].join(" ")),xe.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Te.push(["P("+se.categoryLabel+"):",se.probabilityLabel].join(" "));var Fe=Te.join("
");return{trace:Ie,x:ee*(qe-q.left),y:ne*(Ue-q.top),text:Fe,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:ke,hovertemplate:Ie.hovertemplate,hovertemplateLabels:se,eventData:[{data:Ie._input,fullData:Ie,count:ge,category:ue,probability:ve}]}}function R(Y,q,$){var ee=[];return v.select($.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ne=this;ee.push(N(Y,q,ne))}),ee}function B(Y,q,$){Y._fullLayout._calcInverseTransform(Y);var ee=Y._fullLayout._invScaleX,ne=Y._fullLayout._invScaleY,fe=$.getBoundingClientRect(),ye=v.select($).datum(),xe=ye.categoryViewModel,Ae=xe.parcatsViewModel,Me=Ae.model.dimensions[xe.model.dimensionInd],Ie=Ae.trace,Ue=fe.y+fe.height/2,qe,ke;Ae.dimensions.length>1&&Me.displayInd===Ae.dimensions.length-1?(qe=fe.left,ke="left"):(qe=fe.left+fe.width,ke="right");var ge=xe.model.categoryLabel,ue=ye.parcatsViewModel.model.count,ve=0;ye.categoryViewModel.bands.forEach(function(Kt){Kt.color===ye.color&&(ve+=Kt.count)});var se=xe.model.count,Te=0;Ae.pathSelection.each(function(Kt){Kt.model.color===ye.color&&(Te+=Kt.model.count)});var Fe=ve/ue,We=ve/Te,Ge=ve/se,gt={countLabel:ve,categoryLabel:ge,probabilityLabel:Fe.toFixed(3)},mt=[];xe.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&mt.push(["Count:",gt.countLabel].join(" ")),xe.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(mt.push("P(color \u2229 "+ge+"): "+gt.probabilityLabel),mt.push("P("+ge+" | color): "+We.toFixed(3)),mt.push("P(color | "+ge+"): "+Ge.toFixed(3)));var Tt=mt.join("
"),At=k.mostReadable(ye.color);return{trace:Ie,x:ee*(qe-q.left),y:ne*(Ue-q.top),text:Tt,color:ye.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:At,fontSize:10,idealAlign:ke,hovertemplate:Ie.hovertemplate,hovertemplateLabels:gt,eventData:[{data:Ie._input,fullData:Ie,category:ge,count:ue,probability:Fe,categorycount:se,colorcount:Te,bandcolorcount:ve}]}}function F(Y){if(!Y.parcatsViewModel.dragDimension&&Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var q=v.mouse(this)[1];if(q<-1)return;var $=Y.parcatsViewModel.graphDiv,ee=$._fullLayout,ne=ee._paperdiv.node().getBoundingClientRect(),fe=Y.parcatsViewModel.hoveron,ye=this;if(fe==="color"?(b(ye),I(ye,"plotly_hover",v.event)):(A(ye),z(ye,"plotly_hover",v.event)),Y.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var xe;fe==="category"?xe=N($,ne,ye):fe==="color"?xe=B($,ne,ye):fe==="dimension"&&(xe=R($,ne,ye)),xe&&l.loneHover(xe,{container:ee._hoverlayer.node(),outerContainer:ee._paper.node(),gd:$})}}}function P(Y){var q=Y.parcatsViewModel;if(!q.dragDimension&&(S(q.pathSelection),_(q.dimensionSelection.selectAll("g.category")),f(q.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),l.loneUnhover(q.graphDiv._fullLayout._hoverlayer.node()),q.pathSelection.sort(c),q.hoverinfoItems.indexOf("skip")===-1)){var $=Y.parcatsViewModel.hoveron,ee=this;$==="color"?I(ee,"plotly_unhover",v.event):z(ee,"plotly_unhover",v.event)}}function j(Y){Y.parcatsViewModel.arrangement!=="fixed"&&(Y.dragDimensionDisplayInd=Y.model.displayInd,Y.initialDragDimensionDisplayInds=Y.parcatsViewModel.model.dimensions.map(function(q){return q.displayInd}),Y.dragHasMoved=!1,Y.dragCategoryDisplayInd=null,v.select(this).selectAll("g.category").select("rect.catrect").each(function(q){var $=v.mouse(this)[0],ee=v.mouse(this)[1];-2<=$&&$<=q.width+2&&-2<=ee&&ee<=q.height+2&&(Y.dragCategoryDisplayInd=q.model.displayInd,Y.initialDragCategoryDisplayInds=Y.model.categories.map(function(ne){return ne.displayInd}),q.model.dragY=q.y,e.raiseToTop(this.parentNode),v.select(this.parentNode).selectAll("rect.bandrect").each(function(ne){ne.yIe.y+Ie.height/2&&(fe.model.displayInd=Ie.model.displayInd,Ie.model.displayInd=xe),Y.dragCategoryDisplayInd=fe.model.displayInd}if(Y.dragCategoryDisplayInd===null||Y.parcatsViewModel.arrangement==="freeform"){ne.model.dragX=v.event.x;var Ue=Y.parcatsViewModel.dimensions[$],qe=Y.parcatsViewModel.dimensions[ee];Ue!==void 0&&ne.model.dragXqe.x&&(ne.model.displayInd=qe.model.displayInd,qe.model.displayInd=Y.dragDimensionDisplayInd),Y.dragDimensionDisplayInd=ne.model.displayInd}K(Y.parcatsViewModel),X(Y.parcatsViewModel),ae(Y.parcatsViewModel),re(Y.parcatsViewModel)}}function Z(Y){if(Y.parcatsViewModel.arrangement!=="fixed"&&Y.dragDimensionDisplayInd!==null){v.select(this).selectAll("text").attr("font-weight","normal");var q={},$=Q(Y.parcatsViewModel),ee=Y.parcatsViewModel.model.dimensions.map(function(qe){return qe.displayInd}),ne=Y.initialDragDimensionDisplayInds.some(function(qe,ke){return qe!==ee[ke]});ne&&ee.forEach(function(qe,ke){var ge=Y.parcatsViewModel.model.dimensions[ke].containerInd;q["dimensions["+ge+"].displayindex"]=qe});var fe=!1;if(Y.dragCategoryDisplayInd!==null){var ye=Y.model.categories.map(function(qe){return qe.displayInd});if(fe=Y.initialDragCategoryDisplayInds.some(function(qe,ke){return qe!==ye[ke]}),fe){var xe=Y.model.categories.slice().sort(function(qe,ke){return qe.displayInd-ke.displayInd}),Ae=xe.map(function(qe){return qe.categoryValue}),Me=xe.map(function(qe){return qe.categoryLabel});q["dimensions["+Y.model.containerInd+"].categoryarray"]=[Ae],q["dimensions["+Y.model.containerInd+"].ticktext"]=[Me],q["dimensions["+Y.model.containerInd+"].categoryorder"]="array"}}if(Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!Y.dragHasMoved&&Y.potentialClickBand&&(Y.parcatsViewModel.hoveron==="color"?I(Y.potentialClickBand,"plotly_click",v.event.sourceEvent):z(Y.potentialClickBand,"plotly_click",v.event.sourceEvent)),Y.model.dragX=null,Y.dragCategoryDisplayInd!==null){var Ie=Y.parcatsViewModel.dimensions[Y.dragDimensionDisplayInd].categories[Y.dragCategoryDisplayInd];Ie.model.dragY=null,Y.dragCategoryDisplayInd=null}Y.dragDimensionDisplayInd=null,Y.parcatsViewModel.dragDimension=null,Y.dragHasMoved=null,Y.potentialClickBand=null,K(Y.parcatsViewModel),X(Y.parcatsViewModel);var Ue=v.transition().duration(300).ease("cubic-in-out");Ue.each(function(){ae(Y.parcatsViewModel,!0),re(Y.parcatsViewModel,!0)}).each("end",function(){(ne||fe)&&E.restyle(Y.parcatsViewModel.graphDiv,q,[$])})}}function Q(Y){for(var q,$=Y.graphDiv._fullData,ee=0;ee<$.length;ee++)if(Y.key===$[ee].uid){q=ee;break}return q}function re(Y,q){q===void 0&&(q=!1);function $(ee){return q?ee.transition():ee}Y.pathSelection.data(function(ee){return ee.paths},o),$(Y.pathSelection).attr("d",function(ee){return ee.svgD})}function ae(Y,q){q===void 0&&(q=!1);function $(Ae){return q?Ae.transition():Ae}Y.dimensionSelection.data(function(Ae){return Ae.dimensions},o);var ee=Y.dimensionSelection.selectAll("g.category").data(function(Ae){return Ae.categories},o);$(Y.dimensionSelection).attr("transform",function(Ae){return t(Ae.x,0)}),$(ee).attr("transform",function(Ae){return t(0,Ae.y)});var ne=ee.select(".dimlabel");ne.text(function(Ae,Me){return Me===0?Ae.parcatsViewModel.model.dimensions[Ae.model.dimensionInd].dimensionLabel:null});var fe=ee.select(".catlabel");fe.attr("text-anchor",function(Ae){return s(Ae)?"start":"end"}).attr("x",function(Ae){return s(Ae)?Ae.width+5:-5}).each(function(Ae){var Me,Ie;s(Ae)?(Me=Ae.width+5,Ie="start"):(Me=-5,Ie="end"),v.select(this).selectAll("tspan").attr("x",Me).attr("text-anchor",Ie)});var ye=ee.selectAll("rect.bandrect").data(function(Ae){return Ae.bands},o),xe=ye.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(Ae){return Ae.color}).attr("fill-opacity",0);ye.attr("fill",function(Ae){return Ae.color}).attr("width",function(Ae){return Ae.width}).attr("height",function(Ae){return Ae.height}).attr("y",function(Ae){return Ae.y}),f(xe),ye.each(function(){e.raiseToTop(this)}),ye.exit().remove()}function oe(Y,q,$){var ee=$[0],ne=q.margin||{l:80,r:80,t:100,b:80},fe=ee.trace,ye=fe.domain,xe=q.width,Ae=q.height,Me=Math.floor(xe*(ye.x[1]-ye.x[0])),Ie=Math.floor(Ae*(ye.y[1]-ye.y[0])),Ue=ye.x[0]*xe+ne.l,qe=q.height-ye.y[1]*q.height+ne.t,ke=fe.line.shape,ge;fe.hoverinfo==="all"?ge=["count","probability"]:ge=(fe.hoverinfo||"").split("+");var ue={trace:fe,key:fe.uid,model:ee,x:Ue,y:qe,width:Me,height:Ie,hoveron:fe.hoveron,hoverinfoItems:ge,arrangement:fe.arrangement,bundlecolors:fe.bundlecolors,sortpaths:fe.sortpaths,labelfont:fe.labelfont,categorylabelfont:fe.tickfont,pathShape:ke,dragDimension:null,margin:ne,paths:[],dimensions:[],graphDiv:Y,traceSelection:null,pathSelection:null,dimensionSelection:null};return ee.dimensions&&(K(ue),X(ue)),ue}function H(Y,q,$,ee,ne){var fe=[],ye=[],xe,Ae;for(Ae=0;Ae<$.length-1;Ae++)xe=x($[Ae]+Y[Ae],Y[Ae+1]),fe.push(xe(ne)),ye.push(xe(1-ne));var Me="M "+Y[0]+","+q[0];for(Me+="l"+$[0]+",0 ",Ae=1;Ae<$.length;Ae++)Me+="C"+fe[Ae-1]+","+q[Ae-1]+" "+ye[Ae-1]+","+q[Ae]+" "+Y[Ae]+","+q[Ae],Me+="l"+$[Ae]+",0 ";for(Me+="l0,"+ee+" ",Me+="l -"+$[$.length-1]+",0 ",Ae=$.length-2;Ae>=0;Ae--)Me+="C"+ye[Ae]+","+(q[Ae+1]+ee)+" "+fe[Ae]+","+(q[Ae]+ee)+" "+(Y[Ae]+$[Ae])+","+(q[Ae]+ee),Me+="l-"+$[Ae]+",0 ";return Me+="Z",Me}function X(Y){var q=Y.dimensions,$=Y.model,ee=q.map(function(Zt){return Zt.categories.map(function(sr){return sr.y})}),ne=Y.model.dimensions.map(function(Zt){return Zt.categories.map(function(sr){return sr.displayInd})}),fe=Y.model.dimensions.map(function(Zt){return Zt.displayInd}),ye=Y.dimensions.map(function(Zt){return Zt.model.dimensionInd}),xe=q.map(function(Zt){return Zt.x}),Ae=q.map(function(Zt){return Zt.width}),Me=[];for(var Ie in $.paths)$.paths.hasOwnProperty(Ie)&&Me.push($.paths[Ie]);function Ue(Zt){var sr=Zt.categoryInds.map(function(vt,ht){return ne[ht][vt]}),Ot=ye.map(function(vt){return sr[vt]});return Ot}Me.sort(function(Zt,sr){var Ot=Ue(Zt),vt=Ue(sr);return Y.sortpaths==="backward"&&(Ot.reverse(),vt.reverse()),Ot.push(Zt.valueInds[0]),vt.push(sr.valueInds[0]),Y.bundlecolors&&(Ot.unshift(Zt.rawColor),vt.unshift(sr.rawColor)),m(Ot,vt)});for(var qe=new Array(Me.length),ke=q[0].model.count,ge=q[0].categories.map(function(Zt){return Zt.height}).reduce(function(Zt,sr){return Zt+sr}),ue=0;ue0?se=ge*(ve.count/ke):se=0;for(var Te=new Array(ee.length),Fe=0;Fe1?ye=(Y.width-2*$-ee)/(ne-1):ye=0,xe=$,Ae=xe+ye*fe;var Me=[],Ie=Y.model.maxCats,Ue=q.categories.length,qe=8,ke=q.count,ge=Y.height-qe*(Ie-1),ue,ve,se,Te,Fe,We=(Ie-Ue)*qe/2,Ge=q.categories.map(function(gt){return{displayInd:gt.displayInd,categoryInd:gt.categoryInd}});for(Ge.sort(function(gt,mt){return gt.displayInd-mt.displayInd}),Fe=0;Fe0?ue=ve.count/ke*ge:ue=0,se={key:ve.valueInds[0],model:ve,width:ee,height:ue,y:ve.dragY!==null?ve.dragY:We,bands:[],parcatsViewModel:Y},We=We+ue+qe,Me.push(se);return{key:q.dimensionInd,x:q.dragX!==null?q.dragX:Ae,y:0,width:ee,model:q,categories:Me,parcatsViewModel:Y,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),s5=Ee({"src/traces/parcats/plot.js"(J,V){"use strict";var v=pL();V.exports=function(E,k,l,e){var t=E._fullLayout,a=t._paper,r=t._size;v(E,a,k,{width:r.w,height:r.h,margin:{t:r.t,r:r.r,b:r.b,l:r.l}},l,e)}}}),mL=Ee({"src/traces/parcats/base_plot.js"(J){"use strict";var V=uf().getModuleCalcData,v=s5(),x="parcats";J.name=x,J.plot=function(E,k,l,e){var t=V(E.calcdata,x);if(t.length){var a=t[0];v(E,a,l,e)}},J.clean=function(E,k,l,e){var t=e._has&&e._has("parcats"),a=k._has&&k._has("parcats");t&&!a&&e._paperdiv.selectAll(".parcats").remove()}}}),gL=Ee({"src/traces/parcats/index.js"(J,V){"use strict";V.exports={attributes:o5(),supplyDefaults:dL(),calc:vL(),plot:s5(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:mL(),categories:["noOpacity"],meta:{}}}}),yL=Ee({"lib/parcats.js"(J,V){"use strict";V.exports=gL()}}),_L=Ee({"src/plots/map/styles/arcgis-sat-hybrid.js"(J,V){"use strict";V.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} +`),E=jm().maxDimensionCount,k=Vr(),l=1e-6,e=2048,t=new Uint8Array(4),n=new Uint8Array(4),r={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function a(w){w.read({x:0,y:0,width:1,height:1,data:t})}function o(w,h,u,A,b){var z=w._gl;z.enable(z.SCISSOR_TEST),z.scissor(h,u,A,b),w.clear({color:[0,0,0,0],depth:1})}function s(w,h,u,A,b,z){var I=z.key;function N(R){var B=Math.min(A,b-R*A);R===0&&(window.cancelAnimationFrame(u.currentRafs[I]),delete u.currentRafs[I],o(w,z.scissorX,z.scissorY,z.scissorWidth,z.viewBoxSize[1])),!u.clearOnly&&(z.count=2*B,z.offset=2*R*A,h(z),R*A+B>>8*h)%256/255}function p(w,h,u){for(var A=new Array(w*(E+4)),b=0,z=0;zMe&&(Me=q[fe].dim1.canvasX,xe=fe);ae===0&&o(b,0,0,B.canvasWidth,B.canvasHeight);var Ie=V(u);for(fe=0;fefe._length&&(ge=ge.slice(0,fe._length));var le=fe.tickvals,ve;function se(gt,mt){return{val:gt,text:ve[mt]}}function Te(gt,mt){return gt.val-mt.val}if(E(le)&&le.length){x.isTypedArray(le)&&(le=Array.from(le)),ve=fe.ticktext,!E(ve)||!ve.length?ve=le.map(k(fe.tickformat)):ve.length>le.length?ve=ve.slice(0,le.length):le.length>ve.length&&(le=le.slice(0,ve.length));for(var Fe=1;Fe=mt||ar>=Tt)return;var _r=Ge.lineLayer.readPixel(Kt,Tt-1-ar),Zt=_r[3]!==0,sr=Zt?_r[2]+256*(_r[1]+256*_r[0]):null,Ot={x:Kt,y:ar,clientX:gt.clientX,clientY:gt.clientY,dataIndex:Ge.model.key,curveNumber:sr};sr!==xe&&(Zt?$.hover(Ot):$.unhover&&$.unhover(Ot),xe=sr)}}),ye.style("opacity",function(Ge){return Ge.pick?0:1}),X.style("background","rgba(255, 255, 255, 0)");var Me=X.selectAll("."+m.cn.parcoords).data(fe,c);Me.exit().remove(),Me.enter().append("g").classed(m.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Me.attr("transform",function(Ge){return n(Ge.model.translateX,Ge.model.translateY)});var Ie=Me.selectAll("."+m.cn.parcoordsControlView).data(g,c);Ie.enter().append("g").classed(m.cn.parcoordsControlView,!0),Ie.attr("transform",function(Ge){return n(Ge.model.pad.l,Ge.model.pad.t)});var qe=Ie.selectAll("."+m.cn.yAxis).data(function(Ge){return Ge.dimensions},c);qe.enter().append("g").classed(m.cn.yAxis,!0),Ie.each(function(Ge){j(qe,Ge,W)}),ye.each(function(Ge){if(Ge.viewModel){!Ge.lineLayer||$?Ge.lineLayer=T(this,Ge):Ge.lineLayer.update(Ge),(Ge.key||Ge.key===0)&&(Ge.viewModel[Ge.key]=Ge.lineLayer);var gt=!Ge.context||$;Ge.lineLayer.render(Ge.viewModel.panels,gt)}}),qe.attr("transform",function(Ge){return n(Ge.xScale(Ge.xIndex),0)}),qe.call(v.behavior.drag().origin(function(Ge){return Ge}).on("drag",function(Ge){var gt=Ge.parent;ae.linePickActive(!1),Ge.x=Math.max(-m.overdrag,Math.min(Ge.model.width+m.overdrag,v.event.x)),Ge.canvasX=Ge.x*Ge.model.canvasPixelRatio,qe.sort(function(mt,Tt){return mt.x-Tt.x}).each(function(mt,Tt){mt.xIndex=Tt,mt.x=Ge===mt?mt.x:mt.xScale(mt.xIndex),mt.canvasX=mt.x*mt.model.canvasPixelRatio}),j(qe,gt,W),qe.filter(function(mt){return Math.abs(Ge.xIndex-mt.xIndex)!==0}).attr("transform",function(mt){return n(mt.xScale(mt.xIndex),0)}),v.select(this).attr("transform",n(Ge.x,0)),qe.each(function(mt,Tt,At){At===Ge.parent.key&&(gt.dimensions[Tt]=mt)}),gt.contextLayer&>.contextLayer.render(gt.panels,!1,!I(gt)),gt.focusLayer.render&>.focusLayer.render(gt.panels)}).on("dragend",function(Ge){var gt=Ge.parent;Ge.x=Ge.xScale(Ge.xIndex),Ge.canvasX=Ge.x*Ge.model.canvasPixelRatio,j(qe,gt,W),v.select(this).attr("transform",function(mt){return n(mt.x,0)}),gt.contextLayer&>.contextLayer.render(gt.panels,!1,!I(gt)),gt.focusLayer&>.focusLayer.render(gt.panels),gt.pickLayer&>.pickLayer.render(gt.panels,!0),ae.linePickActive(!0),$&&$.axesMoved&&$.axesMoved(gt.key,gt.dimensions.map(function(mt){return mt.crossfilterDimensionIndex}))})),qe.exit().remove();var je=qe.selectAll("."+m.cn.axisOverlays).data(g,c);je.enter().append("g").classed(m.cn.axisOverlays,!0),je.selectAll("."+m.cn.axis).remove();var ke=je.selectAll("."+m.cn.axis).data(g,c);ke.enter().append("g").classed(m.cn.axis,!0),ke.each(function(Ge){var gt=Ge.model.height/Ge.model.tickDistance,mt=Ge.domainScale,Tt=mt.domain();v.select(this).call(v.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(gt,Ge.tickFormat).tickValues(Ge.ordinal?Tt:null).tickFormat(function(At){return p.isOrdinal(Ge)?At:Z(Ge.model.dimensions[Ge.visibleIndex],At)}).scale(mt)),a.font(ke.selectAll("text"),Ge.model.tickFont)}),ke.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),ke.selectAll("text").style("cursor","default");var ge=je.selectAll("."+m.cn.axisHeading).data(g,c);ge.enter().append("g").classed(m.cn.axisHeading,!0);var le=ge.selectAll("."+m.cn.axisTitle).data(g,c);le.enter().append("text").classed(m.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",K?"none":"auto"),le.text(function(Ge){return Ge.label}).each(function(Ge){var gt=v.select(this);a.font(gt,Ge.model.labelFont),r.convertToTspans(gt,ne)}).attr("transform",function(Ge){var gt=P(Ge.model.labelAngle,Ge.model.labelSide),mt=m.axisTitleOffset;return(gt.dir>0?"":n(0,2*mt+Ge.model.height))+t(gt.degrees)+n(-mt*gt.dx,-mt*gt.dy)}).attr("text-anchor",function(Ge){var gt=P(Ge.model.labelAngle,Ge.model.labelSide),mt=Math.abs(gt.dx),Tt=Math.abs(gt.dy);return 2*mt>Tt?gt.dir*gt.dx<0?"start":"end":"middle"});var ve=je.selectAll("."+m.cn.axisExtent).data(g,c);ve.enter().append("g").classed(m.cn.axisExtent,!0);var se=ve.selectAll("."+m.cn.axisExtentTop).data(g,c);se.enter().append("g").classed(m.cn.axisExtentTop,!0),se.attr("transform",n(0,-m.axisExtentOffset));var Te=se.selectAll("."+m.cn.axisExtentTopText).data(g,c);Te.enter().append("text").classed(m.cn.axisExtentTopText,!0).call(B),Te.text(function(Ge){return Q(Ge,!0)}).each(function(Ge){a.font(v.select(this),Ge.model.rangeFont)});var Fe=ve.selectAll("."+m.cn.axisExtentBottom).data(g,c);Fe.enter().append("g").classed(m.cn.axisExtentBottom,!0),Fe.attr("transform",function(Ge){return n(0,Ge.model.height+m.axisExtentOffset)});var We=Fe.selectAll("."+m.cn.axisExtentBottomText).data(g,c);We.enter().append("text").classed(m.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(B),We.text(function(Ge){return Q(Ge,!1)}).each(function(Ge){a.font(v.select(this),Ge.model.rangeFont)}),i.ensureAxisBrush(je,ee,ne)}}}),i5=Ee({"src/traces/parcoords/plot.js"(t,H){"use strict";var v=lL(),x=Vy(),E=n5().isVisible,k={};function l(n,r,a){var o=r.indexOf(a),s=n.indexOf(o);return s===-1&&(s+=r.length),s}function e(n,r){return function(o,s){return l(n,r,o)-l(n,r,s)}}var t=H.exports=function(r,a){var o=r._fullLayout,s=x(r,[],k);if(s){var c={},g={},f={},p=o._size;a.forEach(function(M,C){var _=M[0].trace,w=f[C]=_.index;c[C]=r.data[w].dimensions,g[C]=r.data[w].dimensions.slice()});var m=function(M,C,_){var w=g[M][C],h=_.map(function(N){return N.slice()}),u="dimensions["+C+"].constraintrange",A=o._tracePreGUI[r._fullData[f[M]].uid];if(A[u]===void 0){var b=w.constraintrange;A[u]=b||null}var z=r._fullData[f[M]].dimensions[C];h.length?(h.length===1&&(h=h[0]),w.constraintrange=h,z.constraintrange=h.slice(),h=[h]):(delete w.constraintrange,delete z.constraintrange,h=null);var I={};I[u]=h,r.emit("plotly_restyle",[I,[f[M]]])},i=function(M){r.emit("plotly_hover",M)},T=function(M){r.emit("plotly_unhover",M)},S=function(M,C){var _=e(C,g[M].filter(E));c[M].sort(_),g[M].filter(function(w){return!E(w)}).sort(function(w){return g[M].indexOf(w)}).forEach(function(w){c[M].splice(c[M].indexOf(w),1),c[M].splice(g[M].indexOf(w),0,w)}),r.emit("plotly_restyle",[{dimensions:[c[M]]},[f[M]]])};v(r,a,{width:p.w,height:p.h,margin:{t:p.t,r:p.r,b:p.b,l:p.l}},{filterChanged:m,hover:i,unhover:T,axesMoved:S})}};t.reglPrecompiled=k}}),uL=Ee({"src/traces/parcoords/base_plot.js"(J){"use strict";var H=Va(),v=uf().getModuleCalcData,x=i5(),E=mh();J.name="parcoords",J.plot=function(k){var l=v(k.calcdata,"parcoords")[0];l.length&&x(k,l)},J.clean=function(k,l,e,t){var n=t._has&&t._has("parcoords"),r=l._has&&l._has("parcoords");n&&!r&&(t._paperdiv.selectAll(".parcoords").remove(),t._glimages.selectAll("*").remove())},J.toSVG=function(k){var l=k._fullLayout._glimages,e=H.select(k).selectAll(".svg-container"),t=e.filter(function(r,a){return a===e.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function n(){var r=this,a=r.toDataURL("image/png"),o=l.append("svg:image");o.attr({xmlns:E.svg,"xlink:href":a,preserveAspectRatio:"none",x:0,y:0,width:r.style.width,height:r.style.height})}t.each(n),window.setTimeout(function(){H.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),cL=Ee({"src/traces/parcoords/base_index.js"(J,H){"use strict";H.exports={attributes:r5(),supplyDefaults:iL(),calc:oL(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:uL(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),fL=Ee({"src/traces/parcoords/index.js"(J,H){"use strict";var v=cL();v.plot=i5(),H.exports=v}}),hL=Ee({"lib/parcoords.js"(J,H){"use strict";H.exports=fL()}}),o5=Ee({"src/traces/parcats/attributes.js"(J,H){"use strict";var v=vo().extendFlat,x=nn(),E=Xs(),k=$s(),{hovertemplateAttrs:l,templatefallbackAttrs:e}=Cs(),t=kl().attributes,n=v({editType:"calc"},k("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:e({editType:"plot"})});H.exports={domain:t({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:v({},x.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:e({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:E({editType:"calc"}),tickfont:E({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:n,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}}),dL=Ee({"src/traces/parcats/defaults.js"(J,H){"use strict";var v=Vr(),x=cf().hasColorscale,E=Cc(),k=kl().defaults,l=Mf(),e=o5(),t=Hy(),n=vs().isTypedArraySpec;function r(o,s,c,g,f){f("line.shape"),f("line.hovertemplate"),f("line.hovertemplatefallback");var p=f("line.color",g.colorway[0]);if(x(o,"line")&&v.isArrayOrTypedArray(p)){if(p.length)return f("line.colorscale"),E(o,s,g,f,{prefix:"line.",cLetter:"c"}),p.length;s.line.color=c}return 1/0}function a(o,s){function c(S,M){return v.coerce(o,s,e.dimensions,S,M)}var g=c("values"),f=c("visible");if(g&&g.length||(f=s.visible=!1),f){c("label"),c("displayindex",s._index);var p=o.categoryarray,m=v.isArrayOrTypedArray(p)&&p.length>0||n(p),i;m&&(i="array");var T=c("categoryorder",i);T==="array"?(c("categoryarray"),c("ticktext")):(delete o.categoryarray,delete o.ticktext),!m&&T==="array"&&(s.categoryorder="trace")}}H.exports=function(s,c,g,f){function p(S,M){return v.coerce(s,c,e,S,M)}var m=l(s,c,{name:"dimensions",handleItemDefaults:a}),i=r(s,c,g,f,p);k(c,f,p),(!Array.isArray(m)||!m.length)&&(c.visible=!1),t(c,m,"values",i),p("hoveron"),p("hovertemplate"),p("hovertemplatefallback"),p("arrangement"),p("bundlecolors"),p("sortpaths"),p("counts");var T=f.font;v.coerceFont(p,"labelfont",T,{overrideDflt:{size:Math.round(T.size)}}),v.coerceFont(p,"tickfont",T,{autoShadowDflt:!0,overrideDflt:{size:Math.round(T.size/1.2)}})}}}),vL=Ee({"src/traces/parcats/calc.js"(J,H){"use strict";var v=Qh().wrap,x=cf().hasColorscale,E=Sf(),k=_b(),l=mo(),e=Vr(),t=mi();H.exports=function(T,S){var M=e.filterVisible(S.dimensions);if(M.length===0)return[];var C=M.map(function(V){var $;if(V.categoryorder==="trace")$=null;else if(V.categoryorder==="array")$=V.categoryarray;else{$=k(V.values);for(var K=!0,G=0;G<$.length;G++)if(!t($[G])){K=!1;break}$.sort(K?e.sorterAsc:void 0),V.categoryorder==="category descending"&&($=$.reverse())}return g(V.values,$)}),_,w,h;e.isArrayOrTypedArray(S.counts)?_=S.counts:_=[S.counts],f(M),M.forEach(function(V,$){p(V,C[$])});var u=S.line,A;u?(x(S,"line")&&E(T,S,{vals:S.line.color,containerStr:"line",cLetter:"c"}),A=l.tryColorscale(u)):A=e.identity;function b(V){var $,K;return e.isArrayOrTypedArray(u.color)?($=u.color[V%u.color.length],K=$):$=u.color,{color:A($),rawColor:K}}var z=M[0].values.length,I={},N=C.map(function(V){return V.inds});h=0;var R,B;for(R=0;R=i.length||T[i[S]]!==void 0)return!1;T[i[S]]=!0}return!0}}}),pL=Ee({"src/traces/parcats/parcats.js"(J,H){"use strict";var v=Va(),x=(Zv(),tn(iv)).interpolateNumber,E=Hg(),k=Qn(),l=$l(),e=Vr(),t=e.strTranslate,n=mo(),r=Fs();function a(X,q,W,ee){var ae=q._context.staticPlot,fe=X.map(oe.bind(0,q,W)),ye=ee.selectAll("g.parcatslayer").data([null]);ye.enter().append("g").attr("class","parcatslayer").style("pointer-events",ae?"none":"all");var xe=ye.selectAll("g.trace.parcats").data(fe,o),Ae=xe.enter().append("g").attr("class","trace parcats");xe.attr("transform",function(Te){return t(Te.x,Te.y)}),Ae.append("g").attr("class","paths");var Me=xe.select("g.paths"),Ie=Me.selectAll("path.path").data(function(Te){return Te.paths},o);Ie.attr("fill",function(Te){return Te.model.color});var qe=Ie.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Te){return Te.model.color}).attr("fill-opacity",0);S(qe),Ie.attr("d",function(Te){return Te.svgD}),qe.empty()||Ie.sort(c),Ie.exit().remove(),Ie.on("mouseover",f).on("mouseout",p).on("click",T),Ae.append("g").attr("class","dimensions");var je=xe.select("g.dimensions"),ke=je.selectAll("g.dimension").data(function(Te){return Te.dimensions},o);ke.enter().append("g").attr("class","dimension"),ke.attr("transform",function(Te){return t(Te.x,0)}),ke.exit().remove();var ge=ke.selectAll("g.category").data(function(Te){return Te.categories},o),le=ge.enter().append("g").attr("class","category");ge.attr("transform",function(Te){return t(0,Te.y)}),le.append("rect").attr("class","catrect").attr("pointer-events","none"),ge.select("rect.catrect").attr("fill","none").attr("width",function(Te){return Te.width}).attr("height",function(Te){return Te.height}),_(le);var ve=ge.selectAll("rect.bandrect").data(function(Te){return Te.bands},o);ve.each(function(){e.raiseToTop(this)}),ve.attr("fill",function(Te){return Te.color});var se=ve.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Te){return Te.color}).attr("fill-opacity",0);ve.attr("fill",function(Te){return Te.color}).attr("width",function(Te){return Te.width}).attr("height",function(Te){return Te.height}).attr("y",function(Te){return Te.y}).attr("cursor",function(Te){return Te.parcatsViewModel.arrangement==="fixed"?"default":Te.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),h(se),ve.exit().remove(),le.append("text").attr("class","catlabel").attr("pointer-events","none"),ge.select("text.catlabel").attr("text-anchor",function(Te){return s(Te)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(Te){return s(Te)?Te.width+5:-5}).attr("y",function(Te){return Te.height/2}).text(function(Te){return Te.model.categoryLabel}).each(function(Te){n.font(v.select(this),Te.parcatsViewModel.categorylabelfont),r.convertToTspans(v.select(this),q)}),le.append("text").attr("class","dimlabel"),ge.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Te){return Te.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Te){return Te.width/2}).attr("y",-5).text(function(Te,Fe){return Fe===0?Te.parcatsViewModel.model.dimensions[Te.model.dimensionInd].dimensionLabel:null}).each(function(Te){n.font(v.select(this),Te.parcatsViewModel.labelfont)}),ge.selectAll("rect.bandrect").on("mouseover",F).on("mouseout",P),ge.exit().remove(),ke.call(v.behavior.drag().origin(function(Te){return{x:Te.x,y:0}}).on("dragstart",j).on("drag",U).on("dragend",Z)),xe.each(function(Te){Te.traceSelection=v.select(this),Te.pathSelection=v.select(this).selectAll("g.paths").selectAll("path.path"),Te.dimensionSelection=v.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),xe.exit().remove()}H.exports=function(X,q,W,ee){a(W,X,ee,q)};function o(X){return X.key}function s(X){var q=X.parcatsViewModel.dimensions.length,W=X.parcatsViewModel.dimensions[q-1].model.dimensionInd;return X.model.dimensionInd===W}function c(X,q){return X.model.rawColor>q.model.rawColor?1:X.model.rawColorae)return 1;if(ee!==ae){var fe=isNaN(ee),ye=isNaN(ae);if(fe!==ye)return fe?1:-1}}return X.length-q.length}function f(X){if(!X.parcatsViewModel.dragDimension&&X.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){e.raiseToTop(this),M(v.select(this));var q=m(X),W=i(X);if(X.parcatsViewModel.graphDiv.emit("plotly_hover",{points:q,event:v.event,constraints:W}),X.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var ee=v.mouse(this)[0],ae=X.parcatsViewModel.graphDiv,fe=X.parcatsViewModel.trace,ye=ae._fullLayout,xe=ye._paperdiv.node().getBoundingClientRect(),Ae=X.parcatsViewModel.graphDiv.getBoundingClientRect(),Me,Ie,qe;for(qe=0;qe"),gt=v.mouse(ae)[0];l.loneHover({trace:fe,x:ge-xe.left+Ae.left,y:le-xe.top+Ae.top,text:Ge,color:X.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:ve,idealAlign:gtk.mostReadable(q.model.color)).attr("stroke-width",.3)}function C(X){X.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function _(X){X.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function w(X){X.attr("stroke","black").attr("stroke-width",1.5)}function h(X){X.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function u(X){var q=X.parcatsViewModel.pathSelection,W=X.categoryViewModel.model.dimensionInd,ee=X.categoryViewModel.model.categoryInd;return q.filter(function(ae){return ae.model.categoryInds[W]===ee&&ae.model.color===X.color})}function A(X){var q=v.select(X.parentNode).selectAll("rect.bandrect");q.each(function(W){var ee=u(W);M(ee),ee.each(function(){e.raiseToTop(this)})}),C(v.select(X.parentNode))}function b(X){var q=v.select(X).datum(),W=u(q);M(W),W.each(function(){e.raiseToTop(this)}),v.select(X.parentNode).selectAll("rect.bandrect").filter(function(ee){return ee.color===q.color}).each(function(){e.raiseToTop(this),w(v.select(this))})}function z(X,q,W){var ee=v.select(X).datum(),ae=ee.categoryViewModel.model,fe=ee.parcatsViewModel.graphDiv,ye=v.select(X.parentNode).selectAll("rect.bandrect"),xe=[];ye.each(function(Me){var Ie=u(Me);Ie.each(function(qe){Array.prototype.push.apply(xe,m(qe))})});var Ae={};Ae[ae.dimensionInd]=ae.categoryValue,fe.emit(q,{points:xe,event:W,constraints:Ae})}function I(X,q,W){var ee=v.select(X).datum(),ae=ee.categoryViewModel.model,fe=ee.parcatsViewModel.graphDiv,ye=u(ee),xe=[];ye.each(function(Me){Array.prototype.push.apply(xe,m(Me))});var Ae={};Ae[ae.dimensionInd]=ae.categoryValue,ee.rawColor!==void 0&&(Ae.color=ee.rawColor),fe.emit(q,{points:xe,event:W,constraints:Ae})}function N(X,q,W){X._fullLayout._calcInverseTransform(X);var ee=X._fullLayout._invScaleX,ae=X._fullLayout._invScaleY,fe=v.select(W.parentNode).select("rect.catrect"),ye=fe.node().getBoundingClientRect(),xe=fe.datum(),Ae=xe.parcatsViewModel,Me=Ae.model.dimensions[xe.model.dimensionInd],Ie=Ae.trace,qe=ye.top+ye.height/2,je,ke;Ae.dimensions.length>1&&Me.displayInd===Ae.dimensions.length-1?(je=ye.left,ke="left"):(je=ye.left+ye.width,ke="right");var ge=xe.model.count,le=xe.model.categoryLabel,ve=ge/xe.parcatsViewModel.model.count,se={countLabel:ge,categoryLabel:le,probabilityLabel:ve.toFixed(3)},Te=[];xe.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Te.push(["Count:",se.countLabel].join(" ")),xe.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Te.push(["P("+se.categoryLabel+"):",se.probabilityLabel].join(" "));var Fe=Te.join("
");return{trace:Ie,x:ee*(je-q.left),y:ae*(qe-q.top),text:Fe,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:ke,hovertemplate:Ie.hovertemplate,hovertemplateLabels:se,eventData:[{data:Ie._input,fullData:Ie,count:ge,category:le,probability:ve}]}}function R(X,q,W){var ee=[];return v.select(W.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ae=this;ee.push(N(X,q,ae))}),ee}function B(X,q,W){X._fullLayout._calcInverseTransform(X);var ee=X._fullLayout._invScaleX,ae=X._fullLayout._invScaleY,fe=W.getBoundingClientRect(),ye=v.select(W).datum(),xe=ye.categoryViewModel,Ae=xe.parcatsViewModel,Me=Ae.model.dimensions[xe.model.dimensionInd],Ie=Ae.trace,qe=fe.y+fe.height/2,je,ke;Ae.dimensions.length>1&&Me.displayInd===Ae.dimensions.length-1?(je=fe.left,ke="left"):(je=fe.left+fe.width,ke="right");var ge=xe.model.categoryLabel,le=ye.parcatsViewModel.model.count,ve=0;ye.categoryViewModel.bands.forEach(function(Kt){Kt.color===ye.color&&(ve+=Kt.count)});var se=xe.model.count,Te=0;Ae.pathSelection.each(function(Kt){Kt.model.color===ye.color&&(Te+=Kt.model.count)});var Fe=ve/le,We=ve/Te,Ge=ve/se,gt={countLabel:ve,categoryLabel:ge,probabilityLabel:Fe.toFixed(3)},mt=[];xe.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&mt.push(["Count:",gt.countLabel].join(" ")),xe.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(mt.push("P(color \u2229 "+ge+"): "+gt.probabilityLabel),mt.push("P("+ge+" | color): "+We.toFixed(3)),mt.push("P(color | "+ge+"): "+Ge.toFixed(3)));var Tt=mt.join("
"),At=k.mostReadable(ye.color);return{trace:Ie,x:ee*(je-q.left),y:ae*(qe-q.top),text:Tt,color:ye.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:At,fontSize:10,idealAlign:ke,hovertemplate:Ie.hovertemplate,hovertemplateLabels:gt,eventData:[{data:Ie._input,fullData:Ie,category:ge,count:le,probability:Fe,categorycount:se,colorcount:Te,bandcolorcount:ve}]}}function F(X){if(!X.parcatsViewModel.dragDimension&&X.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var q=v.mouse(this)[1];if(q<-1)return;var W=X.parcatsViewModel.graphDiv,ee=W._fullLayout,ae=ee._paperdiv.node().getBoundingClientRect(),fe=X.parcatsViewModel.hoveron,ye=this;if(fe==="color"?(b(ye),I(ye,"plotly_hover",v.event)):(A(ye),z(ye,"plotly_hover",v.event)),X.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var xe;fe==="category"?xe=N(W,ae,ye):fe==="color"?xe=B(W,ae,ye):fe==="dimension"&&(xe=R(W,ae,ye)),xe&&l.loneHover(xe,{container:ee._hoverlayer.node(),outerContainer:ee._paper.node(),gd:W})}}}function P(X){var q=X.parcatsViewModel;if(!q.dragDimension&&(S(q.pathSelection),_(q.dimensionSelection.selectAll("g.category")),h(q.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),l.loneUnhover(q.graphDiv._fullLayout._hoverlayer.node()),q.pathSelection.sort(c),q.hoverinfoItems.indexOf("skip")===-1)){var W=X.parcatsViewModel.hoveron,ee=this;W==="color"?I(ee,"plotly_unhover",v.event):z(ee,"plotly_unhover",v.event)}}function j(X){X.parcatsViewModel.arrangement!=="fixed"&&(X.dragDimensionDisplayInd=X.model.displayInd,X.initialDragDimensionDisplayInds=X.parcatsViewModel.model.dimensions.map(function(q){return q.displayInd}),X.dragHasMoved=!1,X.dragCategoryDisplayInd=null,v.select(this).selectAll("g.category").select("rect.catrect").each(function(q){var W=v.mouse(this)[0],ee=v.mouse(this)[1];-2<=W&&W<=q.width+2&&-2<=ee&&ee<=q.height+2&&(X.dragCategoryDisplayInd=q.model.displayInd,X.initialDragCategoryDisplayInds=X.model.categories.map(function(ae){return ae.displayInd}),q.model.dragY=q.y,e.raiseToTop(this.parentNode),v.select(this.parentNode).selectAll("rect.bandrect").each(function(ae){ae.yIe.y+Ie.height/2&&(fe.model.displayInd=Ie.model.displayInd,Ie.model.displayInd=xe),X.dragCategoryDisplayInd=fe.model.displayInd}if(X.dragCategoryDisplayInd===null||X.parcatsViewModel.arrangement==="freeform"){ae.model.dragX=v.event.x;var qe=X.parcatsViewModel.dimensions[W],je=X.parcatsViewModel.dimensions[ee];qe!==void 0&&ae.model.dragXje.x&&(ae.model.displayInd=je.model.displayInd,je.model.displayInd=X.dragDimensionDisplayInd),X.dragDimensionDisplayInd=ae.model.displayInd}K(X.parcatsViewModel),$(X.parcatsViewModel),ne(X.parcatsViewModel),re(X.parcatsViewModel)}}function Z(X){if(X.parcatsViewModel.arrangement!=="fixed"&&X.dragDimensionDisplayInd!==null){v.select(this).selectAll("text").attr("font-weight","normal");var q={},W=Q(X.parcatsViewModel),ee=X.parcatsViewModel.model.dimensions.map(function(je){return je.displayInd}),ae=X.initialDragDimensionDisplayInds.some(function(je,ke){return je!==ee[ke]});ae&&ee.forEach(function(je,ke){var ge=X.parcatsViewModel.model.dimensions[ke].containerInd;q["dimensions["+ge+"].displayindex"]=je});var fe=!1;if(X.dragCategoryDisplayInd!==null){var ye=X.model.categories.map(function(je){return je.displayInd});if(fe=X.initialDragCategoryDisplayInds.some(function(je,ke){return je!==ye[ke]}),fe){var xe=X.model.categories.slice().sort(function(je,ke){return je.displayInd-ke.displayInd}),Ae=xe.map(function(je){return je.categoryValue}),Me=xe.map(function(je){return je.categoryLabel});q["dimensions["+X.model.containerInd+"].categoryarray"]=[Ae],q["dimensions["+X.model.containerInd+"].ticktext"]=[Me],q["dimensions["+X.model.containerInd+"].categoryorder"]="array"}}if(X.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!X.dragHasMoved&&X.potentialClickBand&&(X.parcatsViewModel.hoveron==="color"?I(X.potentialClickBand,"plotly_click",v.event.sourceEvent):z(X.potentialClickBand,"plotly_click",v.event.sourceEvent)),X.model.dragX=null,X.dragCategoryDisplayInd!==null){var Ie=X.parcatsViewModel.dimensions[X.dragDimensionDisplayInd].categories[X.dragCategoryDisplayInd];Ie.model.dragY=null,X.dragCategoryDisplayInd=null}X.dragDimensionDisplayInd=null,X.parcatsViewModel.dragDimension=null,X.dragHasMoved=null,X.potentialClickBand=null,K(X.parcatsViewModel),$(X.parcatsViewModel);var qe=v.transition().duration(300).ease("cubic-in-out");qe.each(function(){ne(X.parcatsViewModel,!0),re(X.parcatsViewModel,!0)}).each("end",function(){(ae||fe)&&E.restyle(X.parcatsViewModel.graphDiv,q,[W])})}}function Q(X){for(var q,W=X.graphDiv._fullData,ee=0;ee=0;Ae--)Me+="C"+ye[Ae]+","+(q[Ae+1]+ee)+" "+fe[Ae]+","+(q[Ae]+ee)+" "+(X[Ae]+W[Ae])+","+(q[Ae]+ee),Me+="l-"+W[Ae]+",0 ";return Me+="Z",Me}function $(X){var q=X.dimensions,W=X.model,ee=q.map(function(Zt){return Zt.categories.map(function(sr){return sr.y})}),ae=X.model.dimensions.map(function(Zt){return Zt.categories.map(function(sr){return sr.displayInd})}),fe=X.model.dimensions.map(function(Zt){return Zt.displayInd}),ye=X.dimensions.map(function(Zt){return Zt.model.dimensionInd}),xe=q.map(function(Zt){return Zt.x}),Ae=q.map(function(Zt){return Zt.width}),Me=[];for(var Ie in W.paths)W.paths.hasOwnProperty(Ie)&&Me.push(W.paths[Ie]);function qe(Zt){var sr=Zt.categoryInds.map(function(vt,ht){return ae[ht][vt]}),Ot=ye.map(function(vt){return sr[vt]});return Ot}Me.sort(function(Zt,sr){var Ot=qe(Zt),vt=qe(sr);return X.sortpaths==="backward"&&(Ot.reverse(),vt.reverse()),Ot.push(Zt.valueInds[0]),vt.push(sr.valueInds[0]),X.bundlecolors&&(Ot.unshift(Zt.rawColor),vt.unshift(sr.rawColor)),g(Ot,vt)});for(var je=new Array(Me.length),ke=q[0].model.count,ge=q[0].categories.map(function(Zt){return Zt.height}).reduce(function(Zt,sr){return Zt+sr}),le=0;le0?se=ge*(ve.count/ke):se=0;for(var Te=new Array(ee.length),Fe=0;Fe1?ye=(X.width-2*W-ee)/(ae-1):ye=0,xe=W,Ae=xe+ye*fe;var Me=[],Ie=X.model.maxCats,qe=q.categories.length,je=8,ke=q.count,ge=X.height-je*(Ie-1),le,ve,se,Te,Fe,We=(Ie-qe)*je/2,Ge=q.categories.map(function(gt){return{displayInd:gt.displayInd,categoryInd:gt.categoryInd}});for(Ge.sort(function(gt,mt){return gt.displayInd-mt.displayInd}),Fe=0;Fe0?le=ve.count/ke*ge:le=0,se={key:ve.valueInds[0],model:ve,width:ee,height:le,y:ve.dragY!==null?ve.dragY:We,bands:[],parcatsViewModel:X},We=We+le+je,Me.push(se);return{key:q.dimensionInd,x:q.dragX!==null?q.dragX:Ae,y:0,width:ee,model:q,categories:Me,parcatsViewModel:X,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),s5=Ee({"src/traces/parcats/plot.js"(J,H){"use strict";var v=pL();H.exports=function(E,k,l,e){var t=E._fullLayout,n=t._paper,r=t._size;v(E,n,k,{width:r.w,height:r.h,margin:{t:r.t,r:r.r,b:r.b,l:r.l}},l,e)}}}),mL=Ee({"src/traces/parcats/base_plot.js"(J){"use strict";var H=uf().getModuleCalcData,v=s5(),x="parcats";J.name=x,J.plot=function(E,k,l,e){var t=H(E.calcdata,x);if(t.length){var n=t[0];v(E,n,l,e)}},J.clean=function(E,k,l,e){var t=e._has&&e._has("parcats"),n=k._has&&k._has("parcats");t&&!n&&e._paperdiv.selectAll(".parcats").remove()}}}),gL=Ee({"src/traces/parcats/index.js"(J,H){"use strict";H.exports={attributes:o5(),supplyDefaults:dL(),calc:vL(),plot:s5(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:mL(),categories:["noOpacity"],meta:{}}}}),yL=Ee({"lib/parcats.js"(J,H){"use strict";H.exports=gL()}}),_L=Ee({"src/plots/map/styles/arcgis-sat-hybrid.js"(J,H){"use strict";H.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} @@ -2705,10 +2705,10 @@ void main() { {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} -{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}}),bL=Ee({"src/plots/map/styles/arcgis-sat.js"(J,V){"use strict";V.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}}),cv=Ee({"src/plots/map/constants.js"(J,V){"use strict";var v=(Ev(),ra(Hd)).default,x=_L(),E=bL(),k='\xA9 OpenStreetMap contributors',l="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",e="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",t="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",o={basic:t,streets:t,outdoors:t,light:l,dark:e,satellite:E,"satellite-streets":x,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:k,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":l,"carto-darkmatter":e,"carto-voyager":t,"carto-positron-nolabels":a,"carto-darkmatter-nolabels":r,"carto-voyager-nolabels":n},s=v(o);V.exports={styleValueDflt:"basic",stylesMap:o,styleValuesMap:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",s.join(", "),"or use a tile service."].join(` -`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}}}),Um=Ee({"src/plots/map/layout_attributes.js"(J,V){"use strict";var v=Vr(),x=Qa().defaultLine,E=kl().attributes,k=Xs(),l=ou().textposition,e=El().overrideAll,t=xs().templatedArray,a=cv(),r=k({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});r.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var n=V.exports=e({_arrayAttrRegexps:[v.counterRegex("map",".layers",!0)],domain:E({name:"map"}),style:{valType:"any",values:a.styleValuesMap,dflt:a.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:t("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:x},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:x}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:r,textposition:v.extendFlat({},l,{arrayOk:!1})}})},"plot","from-root");n.uirevision={valType:"any",editType:"none"}}}),Gy=Ee({"src/traces/scattermap/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:E}=Cs(),k=Yh(),l=l0(),e=ou(),t=Um(),a=ia(),r=$s(),n=vo().extendFlat,o=El().overrideAll,s=Um(),c=l.line,m=l.marker;V.exports=o({lon:l.lon,lat:l.lat,cluster:{enabled:{valType:"boolean"},maxzoom:n({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:n({},m.opacity,{dflt:1})},mode:n({},e.mode,{dflt:"markers"}),text:n({},e.text,{}),texttemplate:x({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:n({},e.hovertext,{}),line:{color:c.color,width:c.width},connectgaps:e.connectgaps,marker:n({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:m.opacity,size:m.size,sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode},r("marker")),fill:l.fill,fillcolor:k(),textfont:t.layers.symbol.textfont,textposition:t.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:n({},a.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:v(),hovertemplatefallback:E()},"calc","nested")}}),l5=Ee({"src/traces/scattermap/constants.js"(J,V){"use strict";var v=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];V.exports={isSupportedFont:function(x){return v.indexOf(x)!==-1}}}}),xL=Ee({"src/traces/scattermap/defaults.js"(J,V){"use strict";var v=Vr(),x=al(),E=gh(),k=Rh(),l=Fh(),e=Xh(),t=Gy(),a=l5().isSupportedFont;V.exports=function(o,s,c,m){function h(A,b){return v.coerce(o,s,t,A,b)}function p(A,b){return v.coerce2(o,s,t,A,b)}var g=r(o,s,h);if(!g){s.visible=!1;return}if(h("text"),h("texttemplate"),h("texttemplatefallback"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),h("mode"),h("below"),x.hasMarkers(s)){E(o,s,c,m,h,{noLine:!0,noAngle:!0}),h("marker.allowoverlap"),h("marker.angle");var i=s.marker;i.symbol!=="circle"&&(v.isArrayOrTypedArray(i.size)&&(i.size=i.size[0]),v.isArrayOrTypedArray(i.color)&&(i.color=i.color[0]))}x.hasLines(s)&&(k(o,s,c,m,h,{noDash:!0}),h("connectgaps"));var w=p("cluster.maxzoom"),S=p("cluster.step"),M=p("cluster.color",s.marker&&s.marker.color||c),C=p("cluster.size"),_=p("cluster.opacity"),T=w!==!1||S!==!1||M!==!1||C!==!1||_!==!1,f=h("cluster.enabled",T);if(f||x.hasText(s)){var u=m.font.family;l(o,s,m,h,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:a(u)?u:"Open Sans Regular",weight:m.font.weight,style:m.font.style,size:m.font.size,color:m.font.color}})}h("fill"),s.fill!=="none"&&e(o,s,c,h),v.coerceSelectionMarkerOpacity(s,h)};function r(n,o,s){var c=s("lon")||[],m=s("lat")||[],h=Math.min(c.length,m.length);return o._length=h,h}}}),u5=Ee({"src/traces/scattermap/format_labels.js"(J,V){"use strict";var v=uo();V.exports=function(E,k,l){var e={},t=l[k.subplot]._subplot,a=t.mockAxis,r=E.lonlat;return e.lonLabel=v.tickText(a,a.c2l(r[0]),!0).text,e.latLabel=v.tickText(a,a.c2l(r[1]),!0).text,e}}}),c5=Ee({"src/plots/map/convert_text_opts.js"(J,V){"use strict";var v=Vr();V.exports=function(E,k){var l=E.split(" "),e=l[0],t=l[1],a=v.isArrayOrTypedArray(k)?v.mean(k):k,r=.5+a/100,n=1.5+a/100,o=["",""],s=[0,0];switch(e){case"top":o[0]="top",s[1]=-n;break;case"bottom":o[0]="bottom",s[1]=n;break}switch(t){case"left":o[1]="right",s[0]=-r;break;case"right":o[1]="left",s[0]=r;break}var c;return o[0]&&o[1]?c=o.join("-"):o[0]?c=o[0]:o[1]?c=o[1]:c="center",{anchor:c,offset:s}}}}),wL=Ee({"src/traces/scattermap/convert.js"(J,V){"use strict";var v=mi(),x=Vr(),E=Qi().BADNUM,k=Dm(),l=pl(),e=yo(),t=U0(),a=al(),r=l5().isSupportedFont,n=c5(),o=Qf().appendArrayPointValue,s=Fs().NEWLINES,c=Fs().BR_TAG_ALL;V.exports=function(_,T){var f=T[0].trace,u=f.visible===!0&&f._length!==0,A=f.fill!=="none",b=a.hasLines(f),z=a.hasMarkers(f),I=a.hasText(f),N=z&&f.marker.symbol==="circle",R=z&&f.marker.symbol!=="circle",B=f.cluster&&f.cluster.enabled,F=m("fill"),P=m("line"),j=m("circle"),U=m("symbol"),Z={fill:F,line:P,circle:j,symbol:U};if(!u)return Z;var Q;if((A||b)&&(Q=k.calcTraceToLineCoords(T)),A&&(F.geojson=k.makePolygon(Q),F.layout.visibility="visible",x.extendFlat(F.paint,{"fill-color":f.fillcolor})),b&&(P.geojson=k.makeLine(Q),P.layout.visibility="visible",x.extendFlat(P.paint,{"line-width":f.line.width,"line-color":f.line.color,"line-opacity":f.opacity})),N){var re=h(T);j.geojson=re.geojson,j.layout.visibility="visible",B&&(j.filter=["!",["has","point_count"]],Z.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":S(f.cluster.color,f.cluster.step),"circle-radius":S(f.cluster.size,f.cluster.step),"circle-opacity":S(f.cluster.opacity,f.cluster.step)}},Z.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":M(f),"text-size":12}}),x.extendFlat(j.paint,{"circle-color":re.mcc,"circle-radius":re.mrc,"circle-opacity":re.mo})}if(N&&B&&(j.filter=["!",["has","point_count"]]),(R||I)&&(U.geojson=p(T,_),x.extendFlat(U.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),R&&(x.extendFlat(U.layout,{"icon-size":f.marker.size/10}),"angle"in f.marker&&f.marker.angle!=="auto"&&x.extendFlat(U.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),U.layout["icon-allow-overlap"]=f.marker.allowoverlap,x.extendFlat(U.paint,{"icon-opacity":f.opacity*f.marker.opacity,"icon-color":f.marker.color,"icon-halo-color":f.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),I)){var ae=(f.marker||{}).size,oe=n(f.textposition,ae);x.extendFlat(U.layout,{"text-size":f.textfont.size,"text-anchor":oe.anchor,"text-offset":oe.offset,"text-font":M(f)}),x.extendFlat(U.paint,{"text-color":f.textfont.color,"text-opacity":f.opacity})}return Z};function m(C){return{type:C,geojson:k.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function h(C){var _=C[0].trace,T=_.marker,f=_.selectedpoints,u=x.isArrayOrTypedArray(T.color),A=x.isArrayOrTypedArray(T.size),b=x.isArrayOrTypedArray(T.opacity),z;function I(ae){return _.opacity*ae}function N(ae){return ae/2}var R;u&&(l.hasColorscale(_,"marker")?R=l.makeColorScaleFuncFromTrace(T):R=x.identity);var B;A&&(B=t(_));var F;b&&(F=function(ae){var oe=v(ae)?+x.constrain(ae,0,1):0;return I(oe)});var P=[];for(z=0;z850?z+=" Black":u>750?z+=" Extra Bold":u>650?z+=" Bold":u>550?z+=" Semi Bold":u>450?z+=" Medium":u>350?z+=" Regular":u>250?z+=" Light":u>150?z+=" Extra Light":z+=" Thin"):A.slice(0,2).join(" ")==="Open Sans"?(z="Open Sans",u>750?z+=" Extrabold":u>650?z+=" Bold":u>550?z+=" Semibold":u>350?z+=" Regular":z+=" Light"):A.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(z="Klokantech Noto Sans",A[3]==="CJK"&&(z+=" CJK"),z+=u>500?" Bold":" Regular")),b&&(z+=" Italic"),z==="Open Sans Regular Italic"?z="Open Sans Italic":z==="Open Sans Regular Bold"?z="Open Sans Bold":z==="Open Sans Regular Bold Italic"?z="Open Sans Bold Italic":z==="Klokantech Noto Sans Regular Italic"&&(z="Klokantech Noto Sans Italic"),r(z)||(z=T);var I=z.split(", ");return I}}}),TL=Ee({"src/traces/scattermap/plot.js"(J,V){"use strict";var v=Vr(),x=wL(),E=cv().traceLayerPrefix,k={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function l(t,a,r,n){this.type="scattermap",this.subplot=t,this.uid=a,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+a+"-fill",line:"source-"+a+"-line",circle:"source-"+a+"-circle",symbol:"source-"+a+"-symbol",cluster:"source-"+a+"-circle",clusterCount:"source-"+a+"-circle"},this.layerIds={fill:E+a+"-fill",line:E+a+"-line",circle:E+a+"-circle",symbol:E+a+"-symbol",cluster:E+a+"-cluster",clusterCount:E+a+"-cluster-count"},this.below=null}var e=l.prototype;e.addSource=function(t,a,r){var n={type:"geojson",data:a.geojson};r&&r.enabled&&v.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var o=this.subplot.map.getSource(this.sourceIds[t]);o?o.setData(a.geojson):this.subplot.map.addSource(this.sourceIds[t],n)},e.setSourceData=function(t,a){this.subplot.map.getSource(this.sourceIds[t]).setData(a.geojson)},e.addLayer=function(t,a,r){var n={type:a.type,id:this.layerIds[t],source:this.sourceIds[t],layout:a.layout,paint:a.paint};a.filter&&(n.filter=a.filter);for(var o=this.layerIds[t],s,c=this.subplot.getMapLayers(),m=0;m=0;b--){var z=A[b];o.removeLayer(p.layerIds[z])}u||o.removeSource(p.sourceIds.circle)}function w(u){for(var A=k.nonCluster,b=0;b=0;b--){var z=A[b];o.removeLayer(p.layerIds[z]),u||o.removeSource(p.sourceIds[z])}}function M(u){h?i(u):S(u)}function C(u){m?g(u):w(u)}function _(){for(var u=m?k.cluster:k.nonCluster,A=0;A=0;n--){var o=r[n];a.removeLayer(this.layerIds[o]),a.removeSource(this.sourceIds[o])}},V.exports=function(a,r){var n=r[0].trace,o=n.cluster&&n.cluster.enabled,s=n.visible!==!0,c=new l(a,n.uid,o,s),m=x(a.gd,r),h=c.below=a.belowLookup["trace-"+n.uid],p,g,i;if(o)for(c.addSource("circle",m.circle,n.cluster),p=0;p=0?Math.floor((n+180)/360):Math.ceil((n-180)/360),C=M*360,_=n-C;function T(B){var F=B.lonlat;if(F[0]===l||w&&g.indexOf(B.i+1)===-1)return 1/0;var P=x.modHalf(F[0],360),j=F[1],U=p.project([P,j]),Z=U.x-m.c2p([_,j]),Q=U.y-h.c2p([P,o]),re=Math.max(3,B.mrc||0);return Math.max(Math.sqrt(Z*Z+Q*Q)-re,1-3/re)}if(v.getClosest(s,T,r),r.index!==!1){var f=s[r.index],u=f.lonlat,A=[x.modHalf(u[0],360)+C,u[1]],b=m.c2p(A),z=h.c2p(A),I=f.mrc||1;r.x0=b-I,r.x1=b+I,r.y0=z-I,r.y1=z+I;var N={};N[c.subplot]={_subplot:p};var R=c._module.formatLabels(f,c,N);return r.lonLabel=R.lonLabel,r.latLabel=R.latLabel,r.color=E(c,f),r.extraText=a(c,f,s[0].t.labels),r.hovertemplate=c.hovertemplate,[r]}}function a(r,n,o){if(r.hovertemplate)return;var s=n.hi||r.hoverinfo,c=s.split("+"),m=c.indexOf("all")!==-1,h=c.indexOf("lon")!==-1,p=c.indexOf("lat")!==-1,g=n.lonlat,i=[];function w(S){return S+"\xB0"}return m||h&&p?i.push("("+w(g[1])+", "+w(g[0])+")"):h?i.push(o.lon+w(g[0])):p&&i.push(o.lat+w(g[1])),(m||c.indexOf("text")!==-1)&&k(n,r,i),i.join("
")}V.exports={hoverPoints:t,getExtraText:a}}}),AL=Ee({"src/traces/scattermap/event_data.js"(J,V){"use strict";V.exports=function(x,E){return x.lon=E.lon,x.lat=E.lat,x}}}),ML=Ee({"src/traces/scattermap/select.js"(J,V){"use strict";var v=Vr(),x=al(),{BADNUM:E}=Qi();V.exports=function(l,e){var t;let{cd:a,xaxis:r,yaxis:n}=l,{trace:o}=a[0];if(!x.hasMarkers(o))return[];if(e===!1){for(let h of a)h.selected=0;return[]}let s=(t=r._subplot)==null?void 0:t.map,c=s?.getRenderWorldCopies()&&e.xmax>e.xmin?s.transform.worldSize:0,m=[];for(let h=0;h1)return 1;for(var W=d,te=0;te<8;te++){var le=this.sampleCurveX(W)-d;if(Math.abs(le)le?me=W:Ce=W,W=.5*(Ce-me)+me;return W},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},r}(),s=a(o);let c,m;function h(){return c!=null||(c=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),c}function p(){if(m==null&&(m=!1,h())){let d=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(d){for(let W=0;W<5*5;W++){let te=4*W;d.fillStyle=`rgb(${te},${te+1},${te+2})`,d.fillRect(W%5,Math.floor(W/5),1,1)}let L=d.getImageData(0,0,5,5).data;for(let W=0;W<5*5*4;W++)if(W%4!=3&&L[W]!==W){m=!0;break}}}return m||!1}var g=1e-6,i=typeof Float32Array<"u"?Float32Array:Array;function w(){var D=new i(9);return i!=Float32Array&&(D[1]=0,D[2]=0,D[3]=0,D[5]=0,D[6]=0,D[7]=0),D[0]=1,D[4]=1,D[8]=1,D}function S(D){return D[0]=1,D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[5]=1,D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[10]=1,D[11]=0,D[12]=0,D[13]=0,D[14]=0,D[15]=1,D}function M(){var D=new i(3);return i!=Float32Array&&(D[0]=0,D[1]=0,D[2]=0),D}function C(D){var d=D[0],L=D[1],W=D[2];return Math.sqrt(d*d+L*L+W*W)}function _(D,d,L){var W=new i(3);return W[0]=D,W[1]=d,W[2]=L,W}function T(D,d,L){return D[0]=d[0]+L[0],D[1]=d[1]+L[1],D[2]=d[2]+L[2],D}function f(D,d,L){return D[0]=d[0]*L,D[1]=d[1]*L,D[2]=d[2]*L,D}function u(D,d,L){var W=d[0],te=d[1],le=d[2],pe=L[0],me=L[1],Ce=L[2];return D[0]=te*Ce-le*me,D[1]=le*pe-W*Ce,D[2]=W*me-te*pe,D}var A,b=C;function z(D,d,L){var W=d[0],te=d[1],le=d[2],pe=d[3];return D[0]=L[0]*W+L[4]*te+L[8]*le+L[12]*pe,D[1]=L[1]*W+L[5]*te+L[9]*le+L[13]*pe,D[2]=L[2]*W+L[6]*te+L[10]*le+L[14]*pe,D[3]=L[3]*W+L[7]*te+L[11]*le+L[15]*pe,D}function I(){var D=new i(4);return i!=Float32Array&&(D[0]=0,D[1]=0,D[2]=0),D[3]=1,D}function N(D,d,L,W){var te=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",le=Math.PI/360;d*=le,W*=le,L*=le;var pe=Math.sin(d),me=Math.cos(d),Ce=Math.sin(L),we=Math.cos(L),ze=Math.sin(W),Pe=Math.cos(W);switch(te){case"xyz":D[0]=pe*we*Pe+me*Ce*ze,D[1]=me*Ce*Pe-pe*we*ze,D[2]=me*we*ze+pe*Ce*Pe,D[3]=me*we*Pe-pe*Ce*ze;break;case"xzy":D[0]=pe*we*Pe-me*Ce*ze,D[1]=me*Ce*Pe-pe*we*ze,D[2]=me*we*ze+pe*Ce*Pe,D[3]=me*we*Pe+pe*Ce*ze;break;case"yxz":D[0]=pe*we*Pe+me*Ce*ze,D[1]=me*Ce*Pe-pe*we*ze,D[2]=me*we*ze-pe*Ce*Pe,D[3]=me*we*Pe+pe*Ce*ze;break;case"yzx":D[0]=pe*we*Pe+me*Ce*ze,D[1]=me*Ce*Pe+pe*we*ze,D[2]=me*we*ze-pe*Ce*Pe,D[3]=me*we*Pe-pe*Ce*ze;break;case"zxy":D[0]=pe*we*Pe-me*Ce*ze,D[1]=me*Ce*Pe+pe*we*ze,D[2]=me*we*ze+pe*Ce*Pe,D[3]=me*we*Pe-pe*Ce*ze;break;case"zyx":D[0]=pe*we*Pe-me*Ce*ze,D[1]=me*Ce*Pe+pe*we*ze,D[2]=me*we*ze-pe*Ce*Pe,D[3]=me*we*Pe+pe*Ce*ze;break;default:throw new Error("Unknown angle order "+te)}return D}function R(){var D=new i(2);return i!=Float32Array&&(D[0]=0,D[1]=0),D}function B(D,d){var L=new i(2);return L[0]=D,L[1]=d,L}M(),A=new i(4),i!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0,A[3]=0),M(),_(1,0,0),_(0,1,0),I(),I(),w(),R();let F=8192;function P(D,d,L){return d*(F/(D.tileSize*Math.pow(2,L-D.tileID.overscaledZ)))}function j(D){return D instanceof Error?D:new Error(typeof D=="string"?D:String(D))}function U(D,d){return(D%d+d)%d}function Z(D,d,L){return D*(1-L)+d*L}function Q(D){if(D<=0)return 0;if(D>=1)return 1;let d=D*D,L=d*D;return 4*(D<.5?L:3*(D-d)+L-.75)}function re(D,d,L,W){let te=new s(D,d,L,W);return le=>te.solve(le)}let ae=re(.25,.1,.25,1);function oe(D,d,L){return Math.min(L,Math.max(d,D))}function H(D,d,L){let W=L-d,te=((D-d)%W+W)%W+d;return te===d?L:te}function X(D,...d){for(let L of d)for(let W in L)D[W]=L[W];return D}let K=1;function G(D,d,L){let W={};for(let te in D)W[te]=d.call(this,D[te],te,D);return W}function Y(D,d,L){let W={};for(let te in D)d.call(this,D[te],te,D)&&(W[te]=D[te]);return W}function q(D){return Array.isArray(D)?D.map(q):typeof D=="object"&&D?G(D,q):D}let $={};function ee(D){$[D]||(typeof console<"u"&&console.warn(D),$[D]=!0)}function ne(D,d,L){return(L.y-D.y)*(d.x-D.x)>(d.y-D.y)*(L.x-D.x)}function fe(D){return typeof WorkerGlobalScope<"u"&&D!==void 0&&D instanceof WorkerGlobalScope}let ye=null;function xe(D){return typeof ImageBitmap<"u"&&D instanceof ImageBitmap}let Ae="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Me(D,d,L,W,te){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let le=new VideoFrame(D,{timestamp:0});try{let pe=le?.format;if(!pe||!pe.startsWith("BGR")&&!pe.startsWith("RGB"))throw new Error(`Unrecognized format ${pe}`);let me=pe.startsWith("BGR"),Ce=new Uint8ClampedArray(W*te*4);if(yield le.copyTo(Ce,function(we,ze,Pe,nt,Ve){let bt=4*Math.max(-ze,0),Et=(Math.max(0,Pe)-Pe)*nt*4+bt,er=4*nt,tr=Math.max(0,ze),xr=Math.max(0,Pe);return{rect:{x:tr,y:xr,width:Math.min(we.width,ze+nt)-tr,height:Math.min(we.height,Pe+Ve)-xr},layout:[{offset:Et,stride:er}]}}(D,d,L,W,te)),me)for(let we=0;we{D.removeEventListener(d,L,W)}}}function ke(D){return D*Math.PI/180}function ge(D){return D/Math.PI*180}let ue={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},ve={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},se="AbortError";class Te extends Error{constructor(d=se){super(d instanceof Error?d.message:d),this.name=se,d instanceof Error&&d.stack&&(this.stack=d.stack)}}function Fe(D){return D instanceof Error&&D.name===se}function We(D){if(D.aborted)throw new Te(D.reason)}let Ge={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function gt(D){return Ge.REGISTERED_PROTOCOLS[D.substring(0,D.indexOf("://"))]}let mt="global-dispatcher";class Tt extends Error{constructor(d,L,W,te){super(`AJAXError: ${L} (${d}): ${W}`),this.status=d,this.statusText=L,this.url=W,this.body=te}}let At=()=>{var D;return fe(self)?(D=self.worker)===null||D===void 0?void 0:D.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href},Kt=function(D,d){return e(this,void 0,void 0,function*(){var L,W;if(D.url.includes("://")&&!/^https?:|^file:/.test(D.url)){let te=gt(D.url);if(te){let le=yield te(D,d);return le.data||D.type!=="arrayBuffer"?le:X(le,{data:new ArrayBuffer(0)})}if(fe(self)&&(!((L=self.worker)===null||L===void 0)&&L.actor))return self.worker.actor.sendAsync({type:"GR",data:D,targetMapId:mt},d)}if(!(te=>{var le;return te.startsWith("file:")||((le=At())===null||le===void 0?void 0:le.startsWith("file:"))&&!/^\w+:/.test(te)})(D.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return function(te,le){return e(this,void 0,void 0,function*(){let pe=new Request(te.url,{method:te.method||"GET",body:te.body,credentials:te.credentials,headers:te.headers,cache:te.cache,referrer:At(),referrerPolicy:te.referrerPolicy,signal:le.signal}),me,Ce;te.type!=="json"||pe.headers.has("Accept")||pe.headers.set("Accept","application/json");try{me=yield fetch(pe)}catch(ze){throw Fe(ze)?ze:new Tt(0,j(ze).message,te.url,new Blob)}if(!me.ok){let ze=yield me.blob();throw new Tt(me.status,me.statusText,te.url,ze)}Ce=te.type==="arrayBuffer"||te.type==="image"?me.arrayBuffer():te.type==="json"?me.json():me.text();let we=yield Ce;return We(le.signal),{data:we,cacheControl:me.headers.get("Cache-Control"),expires:me.headers.get("Expires"),etag:me.headers.get("ETag")}})}(D,d);if(fe(self)&&(!((W=self.worker)===null||W===void 0)&&W.actor))return self.worker.actor.sendAsync({type:"GR",data:D,mustQueue:!0,targetMapId:mt},d)}return function(te,le){return new Promise((pe,me)=>{var Ce;let we=new XMLHttpRequest;we.open(te.method||"GET",te.url,!0),te.type!=="arrayBuffer"&&te.type!=="image"||(we.responseType="arraybuffer");for(let ze in te.headers)we.setRequestHeader(ze,te.headers[ze]);te.type==="json"&&(we.responseType="text",!((Ce=te.headers)===null||Ce===void 0)&&Ce.Accept||we.setRequestHeader("Accept","application/json")),we.withCredentials=te.credentials==="include",we.onerror=()=>{me(new Error(we.statusText))},we.onload=()=>{if(!le.signal.aborted)if((we.status>=200&&we.status<300||we.status===0)&&we.response!==null){let ze=we.response;if(te.type==="json")try{ze=JSON.parse(we.response)}catch(Pe){return void me(Pe)}pe({data:ze,cacheControl:we.getResponseHeader("Cache-Control"),expires:we.getResponseHeader("Expires"),etag:we.getResponseHeader("ETag")})}else{let ze=new Blob([we.response],{type:we.getResponseHeader("Content-Type")});me(new Tt(we.status,we.statusText,te.url,ze))}},le.signal.addEventListener("abort",()=>{we.abort(),me(new Te(le.signal.reason))}),we.send(te.body)})}(D,d)})};function nr(D){if(!D||D.indexOf("://")<=0||D.startsWith("data:image/")||D.startsWith("blob:"))return!0;let d=new URL(D),L=window.location;return d.protocol===L.protocol&&d.host===L.host}function _r(D,d,L){var W;!((W=L[D])===null||W===void 0)&&W.includes(d)||(L[D]||(L[D]=[]),L[D].push(d))}function Zt(D,d,L){if(L?.[D]){let W=L[D].indexOf(d);W!==-1&&L[D].splice(W,1)}}class sr{constructor(d,L={}){X(this,L),this.type=d}}class Ot extends sr{constructor(d,L={}){super("error",X({error:d},L))}}class vt{on(d,L){return this._listeners||(this._listeners={}),_r(d,L,this._listeners),{unsubscribe:()=>{this.off(d,L)}}}off(d,L){return Zt(d,L,this._listeners),Zt(d,L,this._oneTimeListeners),this}once(d,L){return L?(this._oneTimeListeners||(this._oneTimeListeners={}),_r(d,L,this._oneTimeListeners),this):new Promise(W=>this.once(d,W))}fire(d,L){var W,te;typeof d=="string"&&(d=new sr(d,L||{}));let le=d.type;if(this.listens(le)){d.target=this;let pe=!((W=this._listeners)===null||W===void 0)&&W[le]?this._listeners[le].slice():[];for(let we of pe)we.call(this,d);let me=!((te=this._oneTimeListeners)===null||te===void 0)&&te[le]?this._oneTimeListeners[le].slice():[];for(let we of me)Zt(le,we,this._oneTimeListeners),we.call(this,d);let Ce=this._eventedParent;Ce&&(X(d,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ce.fire(d))}else d instanceof Ot&&console.error(d.error);return this}listens(d){var L,W,te,le,pe;return((W=(L=this._listeners)===null||L===void 0?void 0:L[d])===null||W===void 0?void 0:W.length)>0||((le=(te=this._oneTimeListeners)===null||te===void 0?void 0:te[d])===null||le===void 0?void 0:le.length)>0||((pe=this._eventedParent)===null||pe===void 0?void 0:pe.listens(d))}setEventedParent(d,L){return this._eventedParent=d,this._eventedParentData=L,this}}var ht={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let Re=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Be(D,d){let L={};for(let W in D)W!=="ref"&&(L[W]=D[W]);return Re.forEach(W=>{W in d&&(L[W]=d[W])}),L}function He(D,d){if(Array.isArray(D)){if(!Array.isArray(d)||D.length!==d.length)return!1;for(let L=0;L`:D.itemType.kind==="value"?"array":`array<${d}>`}return D.kind}let Mi=[$t,It,ir,cr,fr,Ir,Un,ln,Fa(nn),jn,ua,Aa,Qn,ei];function ci(D,d){if(d.kind==="error")return null;if(D.kind==="array"){if(d.kind==="array"&&(d.N===0&&d.itemType.kind==="value"||!ci(D.itemType,d.itemType))&&(typeof D.N!="number"||D.N===d.N))return null}else{if(D.kind===d.kind)return null;if(D.kind==="value"){for(let L of Mi)if(!ci(L,d))return null}}return`Expected ${ai(D)} but found ${ai(d)} instead.`}function ba(D,d){return d.some(L=>L.kind===D.kind)}function pa(D,d){return d.some(L=>L==="null"?D===null:L==="array"?Array.isArray(D):L==="object"?D&&!Array.isArray(D)&&typeof D=="object":L===typeof D)}function Ii(D,d){return D.kind==="array"&&d.kind==="array"?D.itemType.kind===d.itemType.kind&&typeof D.N=="number":D.kind===d.kind}let ho=.96422,da=.82521,Kn=4/29,ot=6/29,et=3*ot*ot,hr=ot*ot*ot,ur=Math.PI/180,Tr=180/Math.PI;function Rr(D){return(D%=360)<0&&(D+=360),D}function Fr([D,d,L,W]){let te,le,pe=kt((.2225045*(D=at(D))+.7168786*(d=at(d))+.0606169*(L=at(L)))/1);D===d&&d===L?te=le=pe:(te=kt((.4360747*D+.3850649*d+.1430804*L)/ho),le=kt((.0139322*D+.0971045*d+.7141733*L)/da));let me=116*pe-16;return[me<0?0:me,500*(te-pe),200*(pe-le),W]}function at(D){return D<=.04045?D/12.92:Math.pow((D+.055)/1.055,2.4)}function kt(D){return D>hr?Math.pow(D,1/3):D/et+Kn}function Ut([D,d,L,W]){let te=(D+16)/116,le=isNaN(d)?te:te+d/500,pe=isNaN(L)?te:te-L/200;return te=1*Er(te),le=ho*Er(le),pe=da*Er(pe),[ar(3.1338561*le-1.6168667*te-.4906146*pe),ar(-.9787684*le+1.9161415*te+.033454*pe),ar(.0719453*le-.2289914*te+1.4052427*pe),W]}function ar(D){return(D=D<=.00304?12.92*D:1.055*Math.pow(D,1/2.4)-.055)<0?0:D>1?1:D}function Er(D){return D>ot?D*D*D:et*(D-Kn)}let br=Object.hasOwn||function(D,d){return Object.prototype.hasOwnProperty.call(D,d)};function Or(D,d){return br(D,d)?D[d]:void 0}function Pr(D){return parseInt(D.padEnd(2,D),16)/255}function hn(D,d){return zn(d?D/100:D,0,1)}function zn(D,d,L){return Math.min(Math.max(d,D),L)}function Pn(D){return!D.some(Number.isNaN)}let Ca={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 ma(D,d,L){return D+L*(d-D)}function bi(D,d,L){return D.map((W,te)=>ma(W,d[te],L))}class ga{constructor(d,L,W,te=1,le=!0){this.r=d,this.g=L,this.b=W,this.a=te,le||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter("rgb",[d,L,W,te]))}static parse(d){if(d instanceof ga)return d;if(typeof d!="string")return;let L=function(W){if((W=W.toLowerCase().trim())==="transparent")return[0,0,0,0];let te=Or(Ca,W);if(te){let[pe,me,Ce]=te;return[pe/255,me/255,Ce/255,1]}if(W.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(W)){let pe=W.length<6?1:2,me=1;return[Pr(W.slice(me,me+=pe)),Pr(W.slice(me,me+=pe)),Pr(W.slice(me,me+=pe)),Pr(W.slice(me,me+pe)||"ff")]}if(W.startsWith("rgb")){let pe=W.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(pe){let[me,Ce,we,ze,Pe,nt,Ve,bt,Et,er,tr,xr]=pe,lr=[ze||" ",Ve||" ",er].join("");if(lr===" "||lr===" /"||lr===",,"||lr===",,,"){let Mr=[we,nt,Et].join(""),Xr=Mr==="%%%"?100:Mr===""?255:0;if(Xr){let an=[zn(+Ce/Xr,0,1),zn(+Pe/Xr,0,1),zn(+bt/Xr,0,1),tr?hn(+tr,xr):1];if(Pn(an))return an}}return}}let le=W.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(le){let[pe,me,Ce,we,ze,Pe,nt,Ve,bt]=le,Et=[Ce||" ",ze||" ",nt].join("");if(Et===" "||Et===" /"||Et===",,"||Et===",,,"){let er=[+me,zn(+we,0,100),zn(+Pe,0,100),Ve?hn(+Ve,bt):1];if(Pn(er))return function([tr,xr,lr,Mr]){function Xr(an){let kn=(an+tr/30)%12,On=xr*Math.min(lr,1-lr);return lr-On*Math.max(-1,Math.min(kn-3,9-kn,1))}return tr=Rr(tr),xr/=100,lr/=100,[Xr(0),Xr(8),Xr(4),Mr]}(er)}}}(d);return L?new ga(...L,!1):void 0}get rgb(){let{r:d,g:L,b:W,a:te}=this,le=te||1/0;return this.overwriteGetter("rgb",[d/le,L/le,W/le,te])}get hcl(){return this.overwriteGetter("hcl",function(d){let[L,W,te,le]=Fr(d),pe=Math.sqrt(W*W+te*te);return[Math.round(1e4*pe)?Rr(Math.atan2(te,W)*Tr):NaN,pe,L,le]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Fr(this.rgb))}overwriteGetter(d,L){return Object.defineProperty(this,d,{value:L}),L}toString(){let[d,L,W,te]=this.rgb;return`rgba(${[d,L,W].map(le=>Math.round(255*le)).join(",")},${te})`}static interpolate(d,L,W,te="rgb"){switch(te){case"rgb":{let[le,pe,me,Ce]=bi(d.rgb,L.rgb,W);return new ga(le,pe,me,Ce,!1)}case"hcl":{let[le,pe,me,Ce]=d.hcl,[we,ze,Pe,nt]=L.hcl,Ve,bt;if(isNaN(le)||isNaN(we))isNaN(le)?isNaN(we)?Ve=NaN:(Ve=we,me!==1&&me!==0||(bt=ze)):(Ve=le,Pe!==1&&Pe!==0||(bt=pe));else{let lr=we-le;we>le&&lr>180?lr-=360:we180&&(lr+=360),Ve=le+W*lr}let[Et,er,tr,xr]=function([lr,Mr,Xr,an]){return lr=isNaN(lr)?0:lr*ur,Ut([Xr,Math.cos(lr)*Mr,Math.sin(lr)*Mr,an])}([Ve,bt??ma(pe,ze,W),ma(me,Pe,W),ma(Ce,nt,W)]);return new ga(Et,er,tr,xr,!1)}case"lab":{let[le,pe,me,Ce]=Ut(bi(d.lab,L.lab,W));return new ga(le,pe,me,Ce,!1)}}}}ga.black=new ga(0,0,0,1),ga.white=new ga(1,1,1,1),ga.transparent=new ga(0,0,0,0),ga.red=new ga(1,0,0,1);class eo{constructor(d,L,W){this.sensitivity=d?L?"variant":"case":L?"accent":"base",this.locale=W,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(d,L){return this.collator.compare(d,L)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let si=["bottom","center","top"];class Ao{constructor(d,L,W,te,le,pe){this.text=d,this.image=L,this.scale=W,this.fontStack=te,this.textColor=le,this.verticalAlign=pe}}class ro{constructor(d){this.sections=d}static fromString(d){return new ro([new Ao(d,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(d=>d.text.length!==0||d.image&&d.image.name.length!==0)}static factory(d){return d instanceof ro?d:ro.fromString(d)}toString(){return this.sections.length===0?"":this.sections.map(d=>d.text).join("")}}class Sa{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof Sa)return d;if(typeof d=="number")return new Sa([d,d,d,d]);if(Array.isArray(d)&&!(d.length<1||d.length>4)){for(let L of d)if(typeof L!="number")return;switch(d.length){case 1:d=[d[0],d[0],d[0],d[0]];break;case 2:d=[d[0],d[1],d[0],d[1]];break;case 3:d=[d[0],d[1],d[2],d[1]]}return new Sa(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W){return new Sa(bi(d.values,L.values,W))}}class Gi{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof Gi)return d;if(typeof d=="number")return new Gi([d]);if(Array.isArray(d)){for(let L of d)if(typeof L!="number")return;return new Gi(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W){return new Gi(bi(d.values,L.values,W))}}class ti{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof ti)return d;if(typeof d=="string"){let W=ga.parse(d);return W?new ti([W]):void 0}if(!Array.isArray(d))return;let L=[];for(let W of d){if(typeof W!="string")return;let te=ga.parse(W);if(!te)return;L.push(te)}return new ti(L)}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W,te="rgb"){let le=[];if(d.values.length!=L.values.length)throw new Error(`colorArray: Arrays have mismatched length (${d.values.length} vs. ${L.values.length}), cannot interpolate.`);for(let pe=0;pe=0&&D<=255&&typeof d=="number"&&d>=0&&d<=255&&typeof L=="number"&&L>=0&&L<=255?W===void 0||typeof W=="number"&&W>=0&&W<=1?null:`Invalid rgba value [${[D,d,L,W].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof W=="number"?[D,d,L,W]:[D,d,L]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function oi(D){if(D===null||typeof D=="string"||typeof D=="boolean"||typeof D=="number"||D instanceof Mo||D instanceof ga||D instanceof eo||D instanceof ro||D instanceof Sa||D instanceof Gi||D instanceof ti||D instanceof zi||D instanceof so)return!0;if(Array.isArray(D)){for(let d of D)if(!oi(d))return!1;return!0}if(typeof D=="object"){for(let d in D)if(!oi(D[d]))return!1;return!0}return!1}function ii(D){if(D===null)return $t;if(typeof D=="string")return ir;if(typeof D=="boolean")return cr;if(typeof D=="number")return It;if(D instanceof ga)return fr;if(D instanceof Mo)return Ir;if(D instanceof eo)return wn;if(D instanceof ro)return Un;if(D instanceof Sa)return jn;if(D instanceof Gi)return ua;if(D instanceof ti)return Aa;if(D instanceof zi)return ei;if(D instanceof so)return Qn;if(Array.isArray(D)){let d=D.length,L;for(let W of D){let te=ii(W);if(L){if(L===te)continue;L=nn;break}L=te}return Fa(L||nn,d)}return ln}function co(D){let d=typeof D;return D===null?"":d==="string"||d==="number"||d==="boolean"?String(D):D instanceof ga||D instanceof Mo||D instanceof ro||D instanceof Sa||D instanceof Gi||D instanceof ti||D instanceof zi||D instanceof so?D.toString():JSON.stringify(D)}class Wi{constructor(d,L){this.type=d,this.value=L}static parse(d,L){if(d.length!==2)return L.error(`'literal' expression requires exactly one argument, but found ${d.length-1} instead.`);if(!oi(d[1]))return L.error("invalid value");let W=d[1],te=ii(W),le=L.expectedType;return te.kind!=="array"||te.N!==0||!le||le.kind!=="array"||typeof le.N=="number"&&le.N!==0||(te=le),new Wi(te,W)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let Ho={string:ir,number:It,boolean:cr,object:ln};class Io{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W,te=1,le=d[0];if(le==="array"){let me,Ce;if(d.length>2){let we=d[1];if(typeof we!="string"||!(we in Ho)||we==="object")return L.error('The item type argument of "array" must be one of string, number, boolean',1);me=Ho[we],te++}else me=nn;if(d.length>3){if(d[2]!==null&&(typeof d[2]!="number"||d[2]<0||d[2]!==Math.floor(d[2])))return L.error('The length argument to "array" must be a positive integer literal',2);Ce=d[2],te++}W=Fa(me,Ce)}else{if(!Ho[le])throw new Error(`Types doesn't contain name = ${le}`);W=Ho[le]}let pe=[];for(;ted.outputDefined())}}let qo={"to-boolean":cr,"to-color":fr,"to-number":It,"to-string":ir};class Oo{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=d[0];if(!qo[W])throw new Error(`Can't parse ${W} as it is not part of the known types`);if((W==="to-boolean"||W==="to-string")&&d.length!==2)return L.error("Expected one argument.");let te=qo[W],le=[];for(let pe=1;pe4?`Invalid rgba value ${JSON.stringify(L)}: expected an array containing either three or four numeric values.`:So(L[0],L[1],L[2],L[3]),!W))return new ga(L[0]/255,L[1]/255,L[2]/255,L[3])}throw new fi(W||`Could not parse color from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"padding":{let L;for(let W of this.args){L=W.evaluate(d);let te=Sa.parse(L);if(te)return te}throw new fi(`Could not parse padding from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"numberArray":{let L;for(let W of this.args){L=W.evaluate(d);let te=Gi.parse(L);if(te)return te}throw new fi(`Could not parse numberArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"colorArray":{let L;for(let W of this.args){L=W.evaluate(d);let te=ti.parse(L);if(te)return te}throw new fi(`Could not parse colorArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"variableAnchorOffsetCollection":{let L;for(let W of this.args){L=W.evaluate(d);let te=zi.parse(L);if(te)return te}throw new fi(`Could not parse variableAnchorOffsetCollection from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"number":{let L=null;for(let W of this.args){if(L=W.evaluate(d),L===null)return 0;let te=Number(L);if(!isNaN(te))return te}throw new fi(`Could not convert ${JSON.stringify(L)} to number.`)}case"formatted":return ro.fromString(co(this.args[0].evaluate(d)));case"resolvedImage":return so.fromString(co(this.args[0].evaluate(d)));case"projectionDefinition":return this.args[0].evaluate(d);default:return co(this.args[0].evaluate(d))}}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}let ws=["Unknown","Point","LineString","Polygon"];class Ko{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"?ws[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(d){let L=this._parseColorCache.get(d);return L||(L=ga.parse(d),this._parseColorCache.set(d,L)),L}}class ns{constructor(d,L,W=[],te,le=new on,pe=[]){this.registry=d,this.path=W,this.key=W.map(me=>`[${me}]`).join(""),this.scope=le,this.errors=pe,this.expectedType=te,this._isConstant=L}parse(d,L,W,te,le={}){return L?this.concat(L,W,te)._parse(d,le):this._parse(d,le)}_parse(d,L){function W(te,le,pe){return pe==="assert"?new Io(le,[te]):pe==="coerce"?new Oo(le,[te]):te}if(d!==null&&typeof d!="string"&&typeof d!="boolean"&&typeof d!="number"||(d=["literal",d]),Array.isArray(d)){if(d.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let te=d[0];if(typeof te!="string")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let le=this.registry[te];if(le){let pe=le.parse(d,this);if(!pe)return null;if(this.expectedType){let me=this.expectedType,Ce=pe.type;if(me.kind!=="string"&&me.kind!=="number"&&me.kind!=="boolean"&&me.kind!=="object"&&me.kind!=="array"||Ce.kind!=="value"){if(me.kind==="projectionDefinition"&&["string","array"].includes(Ce.kind)||["color","formatted","resolvedImage"].includes(me.kind)&&["value","string"].includes(Ce.kind)||["padding","numberArray"].includes(me.kind)&&["value","number","array"].includes(Ce.kind)||me.kind==="colorArray"&&["value","string","array"].includes(Ce.kind)||me.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(Ce.kind))pe=W(pe,me,L.typeAnnotation||"coerce");else if(this.checkSubtype(me,Ce))return null}else pe=W(pe,me,L.typeAnnotation||"assert")}if(!(pe instanceof Wi)&&pe.type.kind!=="resolvedImage"&&this._isConstant(pe)){let me=new Ko;try{pe=new Wi(pe.type,pe.evaluate(me))}catch(Ce){return this.error(Ce.message),null}}return pe}return this.error(`Unknown expression "${te}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(d===void 0?"'undefined' value invalid. Use null instead.":typeof d=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof d} instead.`)}concat(d,L,W){let te=typeof d=="number"?this.path.concat(d):this.path,le=W?this.scope.concat(W):this.scope;return new ns(this.registry,this._isConstant,te,L||null,le,this.errors)}error(d,...L){let W=`${this.key}${L.map(te=>`[${te}]`).join("")}`;this.errors.push(new Sr(W,d))}checkSubtype(d,L){let W=ci(d,L);return W&&this.error(W),W}}class wo{constructor(d,L){this.type=L.type,this.bindings=[].concat(d),this.result=L}evaluate(d){return this.result.evaluate(d)}eachChild(d){for(let L of this.bindings)d(L[1]);d(this.result)}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found ${d.length-1} instead.`);let W=[];for(let le=1;le=W.length)throw new fi(`Array index out of bounds: ${L} > ${W.length-1}.`);if(L!==Math.floor(L))throw new fi(`Array index must be an integer, but found ${L} instead.`);return W[L]}eachChild(d){d(this.index),d(this.input)}outputDefined(){return!1}}class lo{constructor(d,L){this.type=cr,this.needle=d,this.haystack=L}static parse(d,L){if(d.length!==3)return L.error(`Expected 2 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,nn),te=L.parse(d[2],2,nn);return W&&te?ba(W.type,[cr,ir,It,$t,nn])?new lo(W,te):L.error(`Expected first argument to be of type boolean, string, number or null, but found ${ai(W.type)} instead`):null}evaluate(d){let L=this.needle.evaluate(d),W=this.haystack.evaluate(d);if(!W)return!1;if(!pa(L,["boolean","string","number","null"]))throw new fi(`Expected first argument to be of type boolean, string, number or null, but found ${ai(ii(L))} instead.`);if(!pa(W,["string","array"]))throw new fi(`Expected second argument to be of type array or string, but found ${ai(ii(W))} instead.`);return W.indexOf(L)>=0}eachChild(d){d(this.needle),d(this.haystack)}outputDefined(){return!0}}class Go{constructor(d,L,W){this.type=It,this.needle=d,this.haystack=L,this.fromIndex=W}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,nn),te=L.parse(d[2],2,nn);if(!W||!te)return null;if(!ba(W.type,[cr,ir,It,$t,nn]))return L.error(`Expected first argument to be of type boolean, string, number or null, but found ${ai(W.type)} instead`);if(d.length===4){let le=L.parse(d[3],3,It);return le?new Go(W,te,le):null}return new Go(W,te)}evaluate(d){let L=this.needle.evaluate(d),W=this.haystack.evaluate(d);if(!pa(L,["boolean","string","number","null"]))throw new fi(`Expected first argument to be of type boolean, string, number or null, but found ${ai(ii(L))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(d)),pa(W,["string"])){let le=W.indexOf(L,te);return le===-1?-1:[...W.slice(0,le)].length}if(pa(W,["array"]))return W.indexOf(L,te);throw new fi(`Expected second argument to be of type array or string, but found ${ai(ii(W))} instead.`)}eachChild(d){d(this.needle),d(this.haystack),this.fromIndex&&d(this.fromIndex)}outputDefined(){return!1}}class mo{constructor(d,L,W,te,le,pe){this.inputType=d,this.type=L,this.input=W,this.cases=te,this.outputs=le,this.otherwise=pe}static parse(d,L){if(d.length<5)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if(d.length%2!=1)return L.error("Expected an even number of arguments.");let W,te;L.expectedType&&L.expectedType.kind!=="value"&&(te=L.expectedType);let le={},pe=[];for(let we=2;weNumber.MAX_SAFE_INTEGER)return nt.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof bt=="number"&&Math.floor(bt)!==bt)return nt.error("Numeric branch labels must be integer values.");if(W){if(nt.checkSubtype(W,ii(bt)))return null}else W=ii(bt);if(le[String(bt)]!==void 0)return nt.error("Branch labels must be unique.");le[String(bt)]=pe.length}let Ve=L.parse(Pe,we,te);if(!Ve)return null;te=te||Ve.type,pe.push(Ve)}let me=L.parse(d[1],1,nn);if(!me)return null;let Ce=L.parse(d[d.length-1],d.length-1,te);return Ce?me.type.kind!=="value"&&L.concat(1).checkSubtype(W,me.type)?null:new mo(W,te,me,le,pe,Ce):null}evaluate(d){let L=this.input.evaluate(d);return(ii(L)===this.inputType&&this.outputs[this.cases[L]]||this.otherwise).evaluate(d)}eachChild(d){d(this.input),this.outputs.forEach(d),d(this.otherwise)}outputDefined(){return this.outputs.every(d=>d.outputDefined())&&this.otherwise.outputDefined()}}class us{constructor(d,L,W){this.type=d,this.branches=L,this.otherwise=W}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found only ${d.length-1}.`);if(d.length%2!=0)return L.error("Expected an odd number of arguments.");let W;L.expectedType&&L.expectedType.kind!=="value"&&(W=L.expectedType);let te=[];for(let pe=1;peL.outputDefined())&&this.otherwise.outputDefined()}}class Jo{constructor(d,L,W,te){this.type=d,this.input=L,this.beginIndex=W,this.endIndex=te}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,nn),te=L.parse(d[2],2,It);if(!W||!te)return null;if(!ba(W.type,[Fa(nn),ir,nn]))return L.error(`Expected first argument to be of type array or string, but found ${ai(W.type)} instead`);if(d.length===4){let le=L.parse(d[3],3,It);return le?new Jo(W.type,W,te,le):null}return new Jo(W.type,W,te)}evaluate(d){let L=this.input.evaluate(d),W=this.beginIndex.evaluate(d),te;if(this.endIndex&&(te=this.endIndex.evaluate(d)),pa(L,["string"]))return[...L].slice(W,te).join("");if(pa(L,["array"]))return L.slice(W,te);throw new fi(`Expected first argument to be of type array or string, but found ${ai(ii(L))} instead.`)}eachChild(d){d(this.input),d(this.beginIndex),this.endIndex&&d(this.endIndex)}outputDefined(){return!1}}function zs(D,d){let L=D.length-1,W,te,le=0,pe=L,me=0;for(;le<=pe;)if(me=Math.floor((le+pe)/2),W=D[me],te=D[me+1],W<=d){if(me===L||dd))throw new fi("Input is not a number.");pe=me-1}return 0}class Is{constructor(d,L,W){this.type=d,this.input=L,this.labels=[],this.outputs=[];for(let[te,le]of W)this.labels.push(te),this.outputs.push(le)}static parse(d,L){if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");let W=L.parse(d[1],1,It);if(!W)return null;let te=[],le=null;L.expectedType&&L.expectedType.kind!=="value"&&(le=L.expectedType);for(let pe=1;pe=me)return L.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',we);let Pe=L.parse(Ce,ze,le);if(!Pe)return null;le=le||Pe.type,te.push([me,Pe])}return new Is(le,W,te)}evaluate(d){let L=this.labels,W=this.outputs;if(L.length===1)return W[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return W[0].evaluate(d);let le=L.length;return te>=L[le-1]?W[le-1].evaluate(d):W[zs(L,te)].evaluate(d)}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function es(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}var Zs,Ps,$o=function(){if(Ps)return Zs;function D(d,L,W,te){this.cx=3*d,this.bx=3*(W-d)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*L,this.by=3*(te-L)-this.cy,this.ay=1-this.cy-this.by,this.p1x=d,this.p1y=L,this.p2x=W,this.p2y=te}return Ps=1,Zs=D,D.prototype={sampleCurveX:function(d){return((this.ax*d+this.bx)*d+this.cx)*d},sampleCurveY:function(d){return((this.ay*d+this.by)*d+this.cy)*d},sampleCurveDerivativeX:function(d){return(3*this.ax*d+2*this.bx)*d+this.cx},solveCurveX:function(d,L){if(L===void 0&&(L=1e-6),d<0)return 0;if(d>1)return 1;for(var W=d,te=0;te<8;te++){var le=this.sampleCurveX(W)-d;if(Math.abs(le)le?me=W:Ce=W,W=.5*(Ce-me)+me;return W},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},Zs}(),Fo=es($o);class Ji{constructor(d,L,W,te,le){this.type=d,this.operator=L,this.interpolation=W,this.input=te,this.labels=[],this.outputs=[];for(let[pe,me]of le)this.labels.push(pe),this.outputs.push(me)}static interpolationFactor(d,L,W,te){let le=0;if(d.name==="exponential")le=Ro(L,d.base,W,te);else if(d.name==="linear")le=Ro(L,1,W,te);else if(d.name==="cubic-bezier"){let pe=d.controlPoints;le=new Fo(pe[0],pe[1],pe[2],pe[3]).solve(Ro(L,1,W,te))}return le}static parse(d,L){let[W,te,le,...pe]=d;if(!Array.isArray(te)||te.length===0)return L.error("Expected an interpolation type expression.",1);if(te[0]==="linear")te={name:"linear"};else if(te[0]==="exponential"){let we=te[1];if(typeof we!="number")return L.error("Exponential interpolation requires a numeric base.",1,1);te={name:"exponential",base:we}}else{if(te[0]!=="cubic-bezier")return L.error(`Unknown interpolation type ${String(te[0])}`,1,0);{let we=te.slice(1);if(we.length!==4||we.some(ze=>typeof ze!="number"||ze<0||ze>1))return L.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);te={name:"cubic-bezier",controlPoints:we}}}if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");if(le=L.parse(le,2,It),!le)return null;let me=[],Ce=null;W!=="interpolate-hcl"&&W!=="interpolate-lab"||L.expectedType==Aa?L.expectedType&&L.expectedType.kind!=="value"&&(Ce=L.expectedType):Ce=fr;for(let we=0;we=ze)return L.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',nt);let bt=L.parse(Pe,Ve,Ce);if(!bt)return null;Ce=Ce||bt.type,me.push([ze,bt])}return Ii(Ce,It)||Ii(Ce,Ir)||Ii(Ce,fr)||Ii(Ce,jn)||Ii(Ce,ua)||Ii(Ce,Aa)||Ii(Ce,ei)||Ii(Ce,Fa(It))?new Ji(Ce,W,te,le,me):L.error(`Type ${ai(Ce)} is not interpolatable.`)}evaluate(d){let L=this.labels,W=this.outputs;if(L.length===1)return W[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return W[0].evaluate(d);let le=L.length;if(te>=L[le-1])return W[le-1].evaluate(d);let pe=zs(L,te),me=Ji.interpolationFactor(this.interpolation,te,L[pe],L[pe+1]),Ce=W[pe].evaluate(d),we=W[pe+1].evaluate(d);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return ma(Ce,we,me);case"color":return ga.interpolate(Ce,we,me);case"padding":return Sa.interpolate(Ce,we,me);case"colorArray":return ti.interpolate(Ce,we,me);case"numberArray":return Gi.interpolate(Ce,we,me);case"variableAnchorOffsetCollection":return zi.interpolate(Ce,we,me);case"array":return bi(Ce,we,me);case"projectionDefinition":return Mo.interpolate(Ce,we,me)}case"interpolate-hcl":switch(this.type.kind){case"color":return ga.interpolate(Ce,we,me,"hcl");case"colorArray":return ti.interpolate(Ce,we,me,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return ga.interpolate(Ce,we,me,"lab");case"colorArray":return ti.interpolate(Ce,we,me,"lab")}}}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function Ro(D,d,L,W){let te=W-L,le=D-L;return te===0?0:d===1?le/te:(Math.pow(d,le)-1)/(Math.pow(d,te)-1)}let Ls={color:ga.interpolate,number:ma,padding:Sa.interpolate,numberArray:Gi.interpolate,colorArray:ti.interpolate,variableAnchorOffsetCollection:zi.interpolate,array:bi};class zl{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=null,te=L.expectedType;te&&te.kind!=="value"&&(W=te);let le=[];for(let me of d.slice(1)){let Ce=L.parse(me,1+le.length,W,void 0,{typeAnnotation:"omit"});if(!Ce)return null;W=W||Ce.type,le.push(Ce)}if(!W)throw new Error("No output type");let pe=te&&le.some(me=>ci(te,me.type));return new zl(pe?nn:W,le)}evaluate(d){let L,W=null,te=0;for(let le of this.args)if(te++,W=le.evaluate(d),W&&W instanceof so&&!W.available&&(L||(L=W.name),W=null,te===this.args.length&&(W=L)),W!==null)break;return W}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}function ml(D,d){return D==="=="||D==="!="?d.kind==="boolean"||d.kind==="string"||d.kind==="number"||d.kind==="null"||d.kind==="value":d.kind==="string"||d.kind==="number"||d.kind==="value"}function Ts(D,d,L,W){return W.compare(d,L)===0}function yl(D,d,L){let W=D!=="=="&&D!=="!=";return class uA{constructor(le,pe,me){this.type=cr,this.lhs=le,this.rhs=pe,this.collator=me,this.hasUntypedArgument=le.type.kind==="value"||pe.type.kind==="value"}static parse(le,pe){if(le.length!==3&&le.length!==4)return pe.error("Expected two or three arguments.");let me=le[0],Ce=pe.parse(le[1],1,nn);if(!Ce)return null;if(!ml(me,Ce.type))return pe.concat(1).error(`"${me}" comparisons are not supported for type '${ai(Ce.type)}'.`);let we=pe.parse(le[2],2,nn);if(!we)return null;if(!ml(me,we.type))return pe.concat(2).error(`"${me}" comparisons are not supported for type '${ai(we.type)}'.`);if(Ce.type.kind!==we.type.kind&&Ce.type.kind!=="value"&&we.type.kind!=="value")return pe.error(`Cannot compare types '${ai(Ce.type)}' and '${ai(we.type)}'.`);W&&(Ce.type.kind==="value"&&we.type.kind!=="value"?Ce=new Io(we.type,[Ce]):Ce.type.kind!=="value"&&we.type.kind==="value"&&(we=new Io(Ce.type,[we])));let ze=null;if(le.length===4){if(Ce.type.kind!=="string"&&we.type.kind!=="string"&&Ce.type.kind!=="value"&&we.type.kind!=="value")return pe.error("Cannot use collator to compare non-string types.");if(ze=pe.parse(le[3],3,wn),!ze)return null}return new uA(Ce,we,ze)}evaluate(le){let pe=this.lhs.evaluate(le),me=this.rhs.evaluate(le);if(W&&this.hasUntypedArgument){let Ce=ii(pe),we=ii(me);if(Ce.kind!==we.kind||Ce.kind!=="string"&&Ce.kind!=="number")throw new fi(`Expected arguments for "${D}" to be (string, string) or (number, number), but found (${Ce.kind}, ${we.kind}) instead.`)}if(this.collator&&!W&&this.hasUntypedArgument){let Ce=ii(pe),we=ii(me);if(Ce.kind!=="string"||we.kind!=="string")return d(le,pe,me)}return this.collator?L(le,pe,me,this.collator.evaluate(le)):d(le,pe,me)}eachChild(le){le(this.lhs),le(this.rhs),this.collator&&le(this.collator)}outputDefined(){return!0}}}let mu=yl("==",function(D,d,L){return d===L},Ts),su=yl("!=",function(D,d,L){return d!==L},function(D,d,L,W){return!Ts(0,d,L,W)}),cc=yl("<",function(D,d,L){return d",function(D,d,L){return d>L},function(D,d,L,W){return W.compare(d,L)>0}),_l=yl("<=",function(D,d,L){return d<=L},function(D,d,L,W){return W.compare(d,L)<=0}),ju=yl(">=",function(D,d,L){return d>=L},function(D,d,L,W){return W.compare(d,L)>=0});class lu{constructor(d,L,W){this.type=wn,this.locale=W,this.caseSensitive=d,this.diacriticSensitive=L}static parse(d,L){if(d.length!==2)return L.error("Expected one argument.");let W=d[1];if(typeof W!="object"||Array.isArray(W))return L.error("Collator options argument must be an object.");let te=L.parse(W["case-sensitive"]!==void 0&&W["case-sensitive"],1,cr);if(!te)return null;let le=L.parse(W["diacritic-sensitive"]!==void 0&&W["diacritic-sensitive"],1,cr);if(!le)return null;let pe=null;return W.locale&&(pe=L.parse(W.locale,1,ir),!pe)?null:new lu(te,le,pe)}evaluate(d){return new eo(this.caseSensitive.evaluate(d),this.diacriticSensitive.evaluate(d),this.locale?this.locale.evaluate(d):null)}eachChild(d){d(this.caseSensitive),d(this.diacriticSensitive),this.locale&&d(this.locale)}outputDefined(){return!1}}class il{constructor(d,L,W,te,le,pe){this.type=ir,this.number=d,this.locale=L,this.currency=W,this.unit=te,this.minFractionDigits=le,this.maxFractionDigits=pe}static parse(d,L){if(d.length!==3)return L.error("Expected two arguments.");let W=L.parse(d[1],1,It);if(!W)return null;let te=d[2];if(typeof te!="object"||Array.isArray(te))return L.error("NumberFormat options argument must be an object.");let le=null;if(te.locale&&(le=L.parse(te.locale,1,ir),!le))return null;let pe=null;if(te.currency&&(pe=L.parse(te.currency,1,ir),!pe))return null;let me=null;if(te.unit&&(me=L.parse(te.unit,1,ir),!me))return null;if(pe&&me)return L.error("NumberFormat options `currency` and `unit` are mutually exclusive");let Ce=null;if(te["min-fraction-digits"]&&(Ce=L.parse(te["min-fraction-digits"],1,It),!Ce))return null;let we=null;return te["max-fraction-digits"]&&(we=L.parse(te["max-fraction-digits"],1,It),!we)?null:new il(W,le,pe,me,Ce,we)}evaluate(d){return new Intl.NumberFormat(this.locale?this.locale.evaluate(d):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(d):void 0,unit:this.unit?this.unit.evaluate(d):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(d):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(d):void 0}).format(this.number.evaluate(d))}eachChild(d){d(this.number),this.locale&&d(this.locale),this.currency&&d(this.currency),this.unit&&d(this.unit),this.minFractionDigits&&d(this.minFractionDigits),this.maxFractionDigits&&d(this.maxFractionDigits)}outputDefined(){return!1}}class As{constructor(d){this.type=Un,this.sections=d}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=d[1];if(!Array.isArray(W)&&typeof W=="object")return L.error("First argument must be an image or text section.");let te=[],le=!1;for(let pe=1;pe<=d.length-1;++pe){let me=d[pe];if(le&&typeof me=="object"&&!Array.isArray(me)){le=!1;let Ce=null;if(me["font-scale"]&&(Ce=L.parse(me["font-scale"],1,It),!Ce))return null;let we=null;if(me["text-font"]&&(we=L.parse(me["text-font"],1,Fa(ir)),!we))return null;let ze=null;if(me["text-color"]&&(ze=L.parse(me["text-color"],1,fr),!ze))return null;let Pe=null;if(me["vertical-align"]){if(typeof me["vertical-align"]=="string"&&!si.includes(me["vertical-align"]))return L.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${me["vertical-align"]}' instead.`);if(Pe=L.parse(me["vertical-align"],1,ir),!Pe)return null}let nt=te[te.length-1];nt.scale=Ce,nt.font=we,nt.textColor=ze,nt.verticalAlign=Pe}else{let Ce=L.parse(d[pe],1,nn);if(!Ce)return null;let we=Ce.type.kind;if(we!=="string"&&we!=="value"&&we!=="null"&&we!=="resolvedImage")return L.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");le=!0,te.push({content:Ce,scale:null,font:null,textColor:null,verticalAlign:null})}}return new As(te)}evaluate(d){return new ro(this.sections.map(L=>{let W=L.content.evaluate(d);return ii(W)===Qn?new Ao("",W,null,null,null,L.verticalAlign?L.verticalAlign.evaluate(d):null):new Ao(co(W),null,L.scale?L.scale.evaluate(d):null,L.font?L.font.evaluate(d).join(","):null,L.textColor?L.textColor.evaluate(d):null,L.verticalAlign?L.verticalAlign.evaluate(d):null)}))}eachChild(d){for(let L of this.sections)d(L.content),L.scale&&d(L.scale),L.font&&d(L.font),L.textColor&&d(L.textColor),L.verticalAlign&&d(L.verticalAlign)}outputDefined(){return!1}}class ms{constructor(d){this.type=Qn,this.input=d}static parse(d,L){if(d.length!==2)return L.error("Expected two arguments.");let W=L.parse(d[1],1,ir);return W?new ms(W):L.error("No image name provided.")}evaluate(d){let L=this.input.evaluate(d),W=so.fromString(L);return W&&d.availableImages&&(W.available=d.availableImages.indexOf(L)>-1),W}eachChild(d){d(this.input)}outputDefined(){return!1}}class Ms{constructor(d){this.type=It,this.input=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let W=L.parse(d[1],1);return W?W.type.kind!=="array"&&W.type.kind!=="string"&&W.type.kind!=="value"?L.error(`Expected argument of type string or array, but found ${ai(W.type)} instead.`):new Ms(W):null}evaluate(d){let L=this.input.evaluate(d);if(typeof L=="string")return[...L].length;if(Array.isArray(L))return L.length;throw new fi(`Expected value to be of type string or array, but found ${ai(ii(L))} instead.`)}eachChild(d){d(this.input)}outputDefined(){return!1}}let ol=8192;function Su(D,d){let L=(180+D[0])/360,W=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+D[1]*Math.PI/360)))/360,te=Math.pow(2,d.z);return[Math.round(L*te*ol),Math.round(W*te*ol)]}function Eu(D,d){let L=Math.pow(2,d.z);return[(te=(D[0]/ol+d.x)/L,360*te-180),(W=(D[1]/ol+d.y)/L,360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90)];var W,te}function Uu(D,d){D[0]=Math.min(D[0],d[0]),D[1]=Math.min(D[1],d[1]),D[2]=Math.max(D[2],d[0]),D[3]=Math.max(D[3],d[1])}function fc(D,d){return!(D[0]<=d[0]||D[2]>=d[2]||D[1]<=d[1]||D[3]>=d[3])}function th(D,d,L){let W=D[0]-d[0],te=D[1]-d[1],le=D[0]-L[0],pe=D[1]-L[1];return W*pe-le*te==0&&W*le<=0&&te*pe<=0}function Cf(D,d,L,W){return(te=[W[0]-L[0],W[1]-L[1]])[0]*(le=[d[0]-D[0],d[1]-D[1]])[1]-te[1]*le[0]!=0&&!(!hf(D,d,L,W)||!hf(L,W,D,d));var te,le}function qu(D,d,L){for(let W of L)for(let te=0;te(te=D)[1]!=(pe=me[Ce+1])[1]>te[1]&&te[0]<(pe[0]-le[0])*(te[1]-le[1])/(pe[1]-le[1])+le[0]&&(W=!W)}var te,le,pe;return W}function Lf(D,d){for(let L of d)if(gs(D,L))return!0;return!1}function hc(D,d){for(let L of D)if(!gs(L,d))return!1;for(let L=0;L0&&me<0||pe<0&&me>0}function ku(D,d,L){let W=[];for(let te=0;teL[2]){let te=.5*W,le=D[0]-L[0]>te?-W:L[0]-D[0]>te?W:0;le===0&&(le=D[0]-L[2]>te?-W:L[2]-D[0]>te?W:0),D[0]+=le}Uu(d,D)}function Pc(D,d,L,W){let te=Math.pow(2,W.z)*ol,le=[W.x*ol,W.y*ol],pe=[];for(let me of D)for(let Ce of me){let we=[Ce.x+le[0],Ce.y+le[1]];Cu(we,d,L,te),pe.push(we)}return pe}function $c(D,d,L,W){let te=Math.pow(2,W.z)*ol,le=[W.x*ol,W.y*ol],pe=[];for(let Ce of D){let we=[];for(let ze of Ce){let Pe=[ze.x+le[0],ze.y+le[1]];Uu(d,Pe),we.push(Pe)}pe.push(we)}if(d[2]-d[0]<=te/2){(me=d)[0]=me[1]=1/0,me[2]=me[3]=-1/0;for(let Ce of pe)for(let we of Ce)Cu(we,d,L,te)}var me;return pe}class Zl{constructor(d,L){this.type=cr,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'within' expression requires exactly one argument, but found ${d.length-1} instead.`);if(oi(d[1])){let W=d[1];if(W.type==="FeatureCollection"){let te=[];for(let le of W.features){let{type:pe,coordinates:me}=le.geometry;pe==="Polygon"&&te.push(me),pe==="MultiPolygon"&&te.push(...me)}if(te.length)return new Zl(W,{type:"MultiPolygon",coordinates:te})}else if(W.type==="Feature"){let te=W.geometry.type;if(te==="Polygon"||te==="MultiPolygon")return new Zl(W,W.geometry)}else if(W.type==="Polygon"||W.type==="MultiPolygon")return new Zl(W,W)}return L.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(d){if(d.geometry()!=null&&d.canonicalID()!=null){if(d.geometryType()==="Point")return function(L,W){let te=[1/0,1/0,-1/0,-1/0],le=[1/0,1/0,-1/0,-1/0],pe=L.canonicalID();if(W.type==="Polygon"){let me=ku(W.coordinates,le,pe),Ce=Pc(L.geometry(),te,le,pe);if(!fc(te,le))return!1;for(let we of Ce)if(!gs(we,me))return!1}if(W.type==="MultiPolygon"){let me=dc(W.coordinates,le,pe),Ce=Pc(L.geometry(),te,le,pe);if(!fc(te,le))return!1;for(let we of Ce)if(!Lf(we,me))return!1}return!0}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,W){let te=[1/0,1/0,-1/0,-1/0],le=[1/0,1/0,-1/0,-1/0],pe=L.canonicalID();if(W.type==="Polygon"){let me=ku(W.coordinates,le,pe),Ce=$c(L.geometry(),te,le,pe);if(!fc(te,le))return!1;for(let we of Ce)if(!hc(we,me))return!1}if(W.type==="MultiPolygon"){let me=dc(W.coordinates,le,pe),Ce=$c(L.geometry(),te,le,pe);if(!fc(te,le))return!1;for(let we of Ce)if(!nc(we,me))return!1}return!0}(d,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let df=class{constructor(D=[],d=(L,W)=>LW?1:0){if(this.data=D,this.length=this.data.length,this.compare=d,this.length>0)for(let L=(this.length>>1)-1;L>=0;L--)this._down(L)}push(D){this.data.push(D),this._up(this.length++)}pop(){if(this.length===0)return;let D=this.data[0],d=this.data.pop();return--this.length>0&&(this.data[0]=d,this._down(0)),D}peek(){return this.data[0]}_up(D){let{data:d,compare:L}=this,W=d[D];for(;D>0;){let te=D-1>>1,le=d[te];if(L(W,le)>=0)break;d[D]=le,D=te}d[D]=W}_down(D){let{data:d,compare:L}=this,W=this.length>>1,te=d[D];for(;D=0)break;d[D]=d[le],D=le}d[D]=te}};function Dc(D,d,L=0,W=D.length-1,te=Vu){for(;W>L;){if(W-L>600){let Ce=W-L+1,we=d-L+1,ze=Math.log(Ce),Pe=.5*Math.exp(2*ze/3),nt=.5*Math.sqrt(ze*Pe*(Ce-Pe)/Ce)*(we-Ce/2<0?-1:1);Dc(D,d,Math.max(L,Math.floor(d-we*Pe/Ce+nt)),Math.min(W,Math.floor(d+(Ce-we)*Pe/Ce+nt)),te)}let le=D[d],pe=L,me=W;for(Ic(D,L,d),te(D[W],le)>0&&Ic(D,L,W);pe0;)me--}te(D[L],le)===0?Ic(D,L,me):(me++,Ic(D,me,W)),me<=d&&(L=me+1),d<=me&&(W=me-1)}}function Ic(D,d,L){let W=D[d];D[d]=D[L],D[L]=W}function Vu(D,d){return Dd?1:0}function Rc(D,d){if(D.length<=1)return[D];let L=[],W,te;for(let le of D){let pe=vf(le);pe!==0&&(le.area=Math.abs(pe),te===void 0&&(te=pe<0),te===pe<0?(W&&L.push(W),W=[le]):W.push(le))}if(W&&L.push(W),d>1)for(let le=0;le1?(we=d[Ce+1][0],ze=d[Ce+1][1]):Ve>0&&(we+=Pe/this.kx*Ve,ze+=nt/this.ky*Ve)),Pe=this.wrap(L[0]-we)*this.kx,nt=(L[1]-ze)*this.ky;let bt=Pe*Pe+nt*nt;bt180;)d-=360;return d}}function zc(D,d){return d[0]-D[0]}function Hu(D){return D[1]-D[0]+1}function uu(D,d){return D[1]>=D[0]&&D[1]D[1])return[null,null];let L=Hu(D);if(d){if(L===2)return[D,null];let te=Math.floor(L/2);return[[D[0],D[0]+te],[D[0]+te,D[1]]]}if(L===1)return[D,null];let W=Math.floor(L/2)-1;return[[D[0],D[0]+W],[D[0]+W+1,D[1]]]}function Zc(D,d){if(!uu(d,D.length))return[1/0,1/0,-1/0,-1/0];let L=[1/0,1/0,-1/0,-1/0];for(let W=d[0];W<=d[1];++W)Uu(L,D[W]);return L}function gu(D){let d=[1/0,1/0,-1/0,-1/0];for(let L of D)for(let W of L)Uu(d,W);return d}function Pf(D){return D[0]!==-1/0&&D[1]!==-1/0&&D[2]!==1/0&&D[3]!==1/0}function bl(D,d,L){if(!Pf(D)||!Pf(d))return NaN;let W=0,te=0;return D[2]d[2]&&(W=D[0]-d[2]),D[1]>d[3]&&(te=D[1]-d[3]),D[3]=W)return W;if(fc(te,le)){if(Kc(D,d))return 0}else if(Kc(d,D))return 0;let pe=1/0;for(let me of D)for(let Ce=0,we=me.length,ze=we-1;Ce0;){let Ce=pe.pop();if(Ce[0]>=le)continue;let we=Ce[1],ze=d?50:100;if(Hu(we)<=ze){if(!uu(we,D.length))return NaN;if(d){let Pe=pc(D,we,L,W);if(isNaN(Pe)||Pe===0)return Pe;le=Math.min(le,Pe)}else for(let Pe=we[0];Pe<=we[1];++Pe){let nt=Yu(D[Pe],L,W);if(le=Math.min(le,nt),le===0)return 0}}else{let Pe=Gu(we,d);Df(pe,le,W,D,me,Pe[0]),Df(pe,le,W,D,me,Pe[1])}}return le}function Ll(D,d,L,W,te,le=1/0){let pe=Math.min(le,te.distance(D[0],L[0]));if(pe===0)return pe;let me=new df([[0,[0,D.length-1],[0,L.length-1]]],zc);for(;me.length>0;){let Ce=me.pop();if(Ce[0]>=pe)continue;let we=Ce[1],ze=Ce[2],Pe=d?50:100,nt=W?50:100;if(Hu(we)<=Pe&&Hu(ze)<=nt){if(!uu(we,D.length)&&uu(ze,L.length))return NaN;let Ve;if(d&&W)Ve=wl(D,we,L,ze,te),pe=Math.min(pe,Ve);else if(d&&!W){let bt=D.slice(we[0],we[1]+1);for(let Et=ze[0];Et<=ze[1];++Et)if(Ve=xl(L[Et],bt,te),pe=Math.min(pe,Ve),pe===0)return pe}else if(!d&&W){let bt=L.slice(ze[0],ze[1]+1);for(let Et=we[0];Et<=we[1];++Et)if(Ve=xl(D[Et],bt,te),pe=Math.min(pe,Ve),pe===0)return pe}else Ve=pf(D,we,L,ze,te),pe=Math.min(pe,Ve)}else{let Ve=Gu(we,d),bt=Gu(ze,W);cu(me,pe,te,D,L,Ve[0],bt[0]),cu(me,pe,te,D,L,Ve[0],bt[1]),cu(me,pe,te,D,L,Ve[1],bt[0]),cu(me,pe,te,D,L,Ve[1],bt[1])}}return pe}function If(D){return D.type==="MultiPolygon"?D.coordinates.map(d=>({type:"Polygon",coordinates:d})):D.type==="MultiLineString"?D.coordinates.map(d=>({type:"LineString",coordinates:d})):D.type==="MultiPoint"?D.coordinates.map(d=>({type:"Point",coordinates:d})):[D]}class yu{constructor(d,L){this.type=It,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'distance' expression requires exactly one argument, but found ${d.length-1} instead.`);if(oi(d[1])){let W=d[1];if(W.type==="FeatureCollection")return new yu(W,W.features.map(te=>If(te.geometry)).flat());if(W.type==="Feature")return new yu(W,If(W.geometry));if("type"in W&&"coordinates"in W)return new yu(W,If(W))}return L.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(d){if(d.geometry()!=null&&d.canonicalID()!=null){if(d.geometryType()==="Point")return function(L,W){let te=L.geometry(),le=te.flat().map(Ce=>Eu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let pe=new vc(le[0][1]),me=1/0;for(let Ce of W){switch(Ce.type){case"Point":me=Math.min(me,Ll(le,!1,[Ce.coordinates],!1,pe,me));break;case"LineString":me=Math.min(me,Ll(le,!1,Ce.coordinates,!0,pe,me));break;case"Polygon":me=Math.min(me,Cl(le,!1,Ce.coordinates,pe,me))}if(me===0)return me}return me}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,W){let te=L.geometry(),le=te.flat().map(Ce=>Eu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let pe=new vc(le[0][1]),me=1/0;for(let Ce of W){switch(Ce.type){case"Point":me=Math.min(me,Ll(le,!0,[Ce.coordinates],!1,pe,me));break;case"LineString":me=Math.min(me,Ll(le,!0,Ce.coordinates,!0,pe,me));break;case"Polygon":me=Math.min(me,Cl(le,!0,Ce.coordinates,pe,me))}if(me===0)return me}return me}(d,this.geometries);if(d.geometryType()==="Polygon")return function(L,W){let te=L.geometry();if(te.length===0||te[0].length===0)return NaN;let le=Rc(te,0).map(Ce=>Ce.map(we=>we.map(ze=>Eu([ze.x,ze.y],L.canonical)))),pe=new vc(le[0][0][0][1]),me=1/0;for(let Ce of W)for(let we of le){switch(Ce.type){case"Point":me=Math.min(me,Cl([Ce.coordinates],!1,we,pe,me));break;case"LineString":me=Math.min(me,Cl(Ce.coordinates,!0,we,pe,me));break;case"Polygon":me=Math.min(me,cs(we,Ce.coordinates,pe,me))}if(me===0)return me}return me}(d,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class Bc{constructor(d){this.type=nn,this.key=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let W=d[1];return W==null?L.error("Global state property must be defined."):typeof W!="string"?L.error(`Global state property must be string, but found ${typeof d[1]} instead.`):new Bc(W)}evaluate(d){var L;let W=(L=d.globals)===null||L===void 0?void 0:L.globalState;return W&&Object.keys(W).length!==0?Or(W,this.key):null}eachChild(){}outputDefined(){return!1}}let Tl={"==":mu,"!=":su,">":Bl,"<":cc,">=":ju,"<=":_l,array:Io,at:Di,boolean:Io,case:us,coalesce:zl,collator:lu,format:As,image:ms,in:lo,"index-of":Go,interpolate:Ji,"interpolate-hcl":Ji,"interpolate-lab":Ji,length:Ms,let:wo,literal:Wi,match:mo,number:Io,"number-format":il,object:Io,slice:Jo,step:Is,string:Io,"to-boolean":Oo,"to-color":Oo,"to-number":Oo,"to-string":Oo,var:No,within:Zl,distance:yu,"global-state":Bc};class ll{constructor(d,L,W,te){this.name=d,this.type=L,this._evaluate=W,this.args=te}evaluate(d){return this._evaluate(d,this.args)}eachChild(d){this.args.forEach(d)}outputDefined(){return!1}static parse(d,L){let W=d[0],te=ll.definitions[W];if(!te)return L.error(`Unknown expression "${W}". If you wanted a literal array, use ["literal", [...]].`,0);let le=Array.isArray(te)?te[0]:te.type,pe=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,me=pe.filter(([we])=>!Array.isArray(we)||we.length===d.length-1),Ce=null;for(let[we,ze]of me){Ce=new ns(L.registry,Du,L.path,null,L.scope);let Pe=[],nt=!1;for(let Ve=1;Ve{return nt=Pe,Array.isArray(nt)?`(${nt.map(ai).join(", ")})`:`(${ai(nt.type)}...)`;var nt}).join(" | "),ze=[];for(let Pe=1;Pe{L=d?L&&Du(W):L&&W instanceof Wi}),!!L&&Iu(D)&&Qc(D,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function Iu(D){if(D instanceof ll&&(D.name==="get"&&D.args.length===1||D.name==="feature-state"||D.name==="has"&&D.args.length===1||D.name==="properties"||D.name==="geometry-type"||D.name==="id"||/^filter-/.test(D.name))||D instanceof Zl||D instanceof yu)return!1;let d=!0;return D.eachChild(L=>{d&&!Iu(L)&&(d=!1)}),d}function Xu(D){if(D instanceof ll&&D.name==="feature-state")return!1;let d=!0;return D.eachChild(L=>{d&&!Xu(L)&&(d=!1)}),d}function Qc(D,d){if(D instanceof ll&&d.indexOf(D.name)>=0)return!1;let L=!0;return D.eachChild(W=>{L&&!Qc(W,d)&&(L=!1)}),L}function ef(D){return{result:"success",value:D}}function _u(D){return{result:"error",value:D}}function $u(D){return D["property-type"]==="data-driven"||D["property-type"]==="cross-faded-data-driven"}function mc(D){return!!D.expression&&D.expression.parameters.indexOf("zoom")>-1}function Ru(D){return!!D.expression&&D.expression.interpolated}function zo(D){return D instanceof Number?"number":D instanceof String?"string":D instanceof Boolean?"boolean":Array.isArray(D)?"array":D===null?"null":typeof D}function gc(D){return typeof D=="object"&&D!==null&&!Array.isArray(D)&&ii(D)===ln}function Vf(D){return D}function mf(D,d){let L=D.stops&&typeof D.stops[0][0]=="object",W=L||!(L||D.property!==void 0),te=D.type||(Ru(d)?"exponential":"interval"),le=function(ze){switch(ze.type){case"color":return ga.parse;case"padding":return Sa.parse;case"numberArray":return Gi.parse;case"colorArray":return ti.parse;default:return null}}(d);if(le&&((D=Wt({},D)).stops&&(D.stops=D.stops.map(ze=>[ze[0],le(ze[1])])),D.default=le(D.default?D.default:d.default)),D.colorSpace&&(pe=D.colorSpace)!=="rgb"&&pe!=="hcl"&&pe!=="lab")throw new Error(`Unknown color space: "${D.colorSpace}"`);var pe;let me=function(ze){switch(ze){case"exponential":return yf;case"interval":return Hf;case"categorical":return gf;case"identity":return ul;default:throw new Error(`Unknown function type "${ze}"`)}}(te),Ce,we;if(te==="categorical"){Ce=Object.create(null);for(let ze of D.stops)Ce[ze[0]]=ze[1];we=typeof D.stops[0][0]}if(L){let ze={},Pe=[];for(let bt=0;btbt[0]),evaluate:({zoom:bt},Et)=>yf({stops:nt,base:D.base},d,bt).evaluate(bt,Et)}}if(W){let ze=te==="exponential"?{name:"exponential",base:D.base!==void 0?D.base:1}:null;return{kind:"camera",interpolationType:ze,interpolationFactor:Ji.interpolationFactor.bind(void 0,ze),zoomStops:D.stops.map(Pe=>Pe[0]),evaluate:({zoom:Pe})=>me(D,d,Pe,Ce,we)}}return{kind:"source",evaluate(ze,Pe){let nt=Pe&&Pe.properties?Pe.properties[D.property]:void 0;return nt===void 0?tf(D.default,d.default):me(D,d,nt,Ce,we)}}}function tf(D,d,L){return D!==void 0?D:d!==void 0?d:L!==void 0?L:void 0}function gf(D,d,L,W,te){return tf(typeof L===te?W[L]:void 0,D.default,d.default)}function Hf(D,d,L){if(zo(L)!=="number")return tf(D.default,d.default);let W=D.stops.length;if(W===1||L<=D.stops[0][0])return D.stops[0][1];if(L>=D.stops[W-1][0])return D.stops[W-1][1];let te=zs(D.stops.map(le=>le[0]),L);return D.stops[te][1]}function yf(D,d,L){let W=D.base!==void 0?D.base:1;if(zo(L)!=="number")return tf(D.default,d.default);let te=D.stops.length;if(te===1||L<=D.stops[0][0])return D.stops[0][1];if(L>=D.stops[te-1][0])return D.stops[te-1][1];let le=zs(D.stops.map(ze=>ze[0]),L),pe=function(ze,Pe,nt,Ve){let bt=Ve-nt,Et=ze-nt;return bt===0?0:Pe===1?Et/bt:(Math.pow(Pe,Et)-1)/(Math.pow(Pe,bt)-1)}(L,W,D.stops[le][0],D.stops[le+1][0]),me=D.stops[le][1],Ce=D.stops[le+1][1],we=Ls[d.type]||Vf;return typeof me.evaluate=="function"?{evaluate(...ze){let Pe=me.evaluate.apply(void 0,ze),nt=Ce.evaluate.apply(void 0,ze);if(Pe!==void 0&&nt!==void 0)return we(Pe,nt,pe,D.colorSpace)}}:we(me,Ce,pe,D.colorSpace)}function ul(D,d,L){switch(d.type){case"color":L=ga.parse(L);break;case"formatted":L=ro.fromString(L.toString());break;case"resolvedImage":L=so.fromString(L.toString());break;case"padding":L=Sa.parse(L);break;case"colorArray":L=ti.parse(L);break;case"numberArray":L=Gi.parse(L);break;default:zo(L)===d.type||d.type==="enum"&&d.values[L]||(L=void 0)}return tf(L,D.default,d.default)}ll.register(Tl,{error:[{kind:"error"},[ir],(D,[d])=>{throw new fi(d.evaluate(D))}],typeof:[ir,[nn],(D,[d])=>ai(ii(d.evaluate(D)))],"to-rgba":[Fa(It,4),[fr],(D,[d])=>{let[L,W,te,le]=d.evaluate(D).rgb;return[255*L,255*W,255*te,le]}],rgb:[fr,[It,It,It],Jc],rgba:[fr,[It,It,It,It],Jc],has:{type:cr,overloads:[[[ir],(D,[d])=>Nc(d.evaluate(D),D.properties())],[[ir,ln],(D,[d,L])=>Nc(d.evaluate(D),L.evaluate(D))]]},get:{type:nn,overloads:[[[ir],(D,[d])=>Rf(d.evaluate(D),D.properties())],[[ir,ln],(D,[d,L])=>Rf(d.evaluate(D),L.evaluate(D))]]},"feature-state":[nn,[ir],(D,[d])=>Rf(d.evaluate(D),D.featureState||{})],properties:[ln,[],D=>D.properties()],"geometry-type":[ir,[],D=>D.geometryType()],id:[nn,[],D=>D.id()],zoom:[It,[],D=>D.globals.zoom],"heatmap-density":[It,[],D=>D.globals.heatmapDensity||0],elevation:[It,[],D=>D.globals.elevation||0],"line-progress":[It,[],D=>D.globals.lineProgress||0],accumulated:[nn,[],D=>D.globals.accumulated===void 0?null:D.globals.accumulated],"+":[It,fu(It),(D,d)=>{let L=0;for(let W of d)L+=W.evaluate(D);return L}],"*":[It,fu(It),(D,d)=>{let L=1;for(let W of d)L*=W.evaluate(D);return L}],"-":{type:It,overloads:[[[It,It],(D,[d,L])=>d.evaluate(D)-L.evaluate(D)],[[It],(D,[d])=>-d.evaluate(D)]]},"/":[It,[It,It],(D,[d,L])=>d.evaluate(D)/L.evaluate(D)],"%":[It,[It,It],(D,[d,L])=>d.evaluate(D)%L.evaluate(D)],ln2:[It,[],()=>Math.LN2],pi:[It,[],()=>Math.PI],e:[It,[],()=>Math.E],"^":[It,[It,It],(D,[d,L])=>Math.pow(d.evaluate(D),L.evaluate(D))],sqrt:[It,[It],(D,[d])=>Math.sqrt(d.evaluate(D))],log10:[It,[It],(D,[d])=>Math.log(d.evaluate(D))/Math.LN10],ln:[It,[It],(D,[d])=>Math.log(d.evaluate(D))],log2:[It,[It],(D,[d])=>Math.log(d.evaluate(D))/Math.LN2],sin:[It,[It],(D,[d])=>Math.sin(d.evaluate(D))],cos:[It,[It],(D,[d])=>Math.cos(d.evaluate(D))],tan:[It,[It],(D,[d])=>Math.tan(d.evaluate(D))],asin:[It,[It],(D,[d])=>Math.asin(d.evaluate(D))],acos:[It,[It],(D,[d])=>Math.acos(d.evaluate(D))],atan:[It,[It],(D,[d])=>Math.atan(d.evaluate(D))],min:[It,fu(It),(D,d)=>Math.min(...d.map(L=>L.evaluate(D)))],max:[It,fu(It),(D,d)=>Math.max(...d.map(L=>L.evaluate(D)))],abs:[It,[It],(D,[d])=>Math.abs(d.evaluate(D))],round:[It,[It],(D,[d])=>{let L=d.evaluate(D);return L<0?-Math.round(-L):Math.round(L)}],floor:[It,[It],(D,[d])=>Math.floor(d.evaluate(D))],ceil:[It,[It],(D,[d])=>Math.ceil(d.evaluate(D))],"filter-==":[cr,[ir,nn],(D,[d,L])=>D.properties()[d.value]===L.value],"filter-id-==":[cr,[nn],(D,[d])=>D.id()===d.value],"filter-type-==":[cr,[ir],(D,[d])=>D.geometryType()===d.value],"filter-<":[cr,[ir,nn],(D,[d,L])=>{let W=D.properties()[d.value],te=L.value;return typeof W==typeof te&&W{let L=D.id(),W=d.value;return typeof L==typeof W&&L":[cr,[ir,nn],(D,[d,L])=>{let W=D.properties()[d.value],te=L.value;return typeof W==typeof te&&W>te}],"filter-id->":[cr,[nn],(D,[d])=>{let L=D.id(),W=d.value;return typeof L==typeof W&&L>W}],"filter-<=":[cr,[ir,nn],(D,[d,L])=>{let W=D.properties()[d.value],te=L.value;return typeof W==typeof te&&W<=te}],"filter-id-<=":[cr,[nn],(D,[d])=>{let L=D.id(),W=d.value;return typeof L==typeof W&&L<=W}],"filter->=":[cr,[ir,nn],(D,[d,L])=>{let W=D.properties()[d.value],te=L.value;return typeof W==typeof te&&W>=te}],"filter-id->=":[cr,[nn],(D,[d])=>{let L=D.id(),W=d.value;return typeof L==typeof W&&L>=W}],"filter-has":[cr,[nn],(D,[d])=>d.value in D.properties()],"filter-has-id":[cr,[],D=>D.id()!==null&&D.id()!==void 0],"filter-type-in":[cr,[Fa(ir)],(D,[d])=>d.value.indexOf(D.geometryType())>=0],"filter-id-in":[cr,[Fa(nn)],(D,[d])=>d.value.indexOf(D.id())>=0],"filter-in-small":[cr,[ir,Fa(nn)],(D,[d,L])=>L.value.indexOf(D.properties()[d.value])>=0],"filter-in-large":[cr,[ir,Fa(nn)],(D,[d,L])=>function(W,te,le,pe){for(;le<=pe;){let me=le+pe>>1;if(te[me]===W)return!0;te[me]>W?pe=me-1:le=me+1}return!1}(D.properties()[d.value],L.value,0,L.value.length-1)],all:{type:cr,overloads:[[[cr,cr],(D,[d,L])=>d.evaluate(D)&&L.evaluate(D)],[fu(cr),(D,d)=>{for(let L of d)if(!L.evaluate(D))return!1;return!0}]]},any:{type:cr,overloads:[[[cr,cr],(D,[d,L])=>d.evaluate(D)||L.evaluate(D)],[fu(cr),(D,d)=>{for(let L of d)if(L.evaluate(D))return!0;return!1}]]},"!":[cr,[cr],(D,[d])=>!d.evaluate(D)],"is-supported-script":[cr,[ir],(D,[d])=>{let L=D.globals&&D.globals.isSupportedScript;return!L||L(d.evaluate(D))}],upcase:[ir,[ir],(D,[d])=>d.evaluate(D).toUpperCase()],downcase:[ir,[ir],(D,[d])=>d.evaluate(D).toLowerCase()],concat:[ir,fu(nn),(D,d)=>d.map(L=>co(L.evaluate(D))).join("")],split:[Fa(ir),[ir,ir],(D,[d,L])=>d.evaluate(D).split(L.evaluate(D))],join:[ir,[Fa(ir),ir],(D,[d,L])=>d.evaluate(D).join(L.evaluate(D))],"resolved-locale":[ir,[wn],(D,[d])=>d.evaluate(D).resolvedLocale()]});class Pl{constructor(d,L,W){this.expression=d,this._warningHistory={},this._evaluator=new Ko,this._defaultValue=L?function(te){if(te.type==="color"&&gc(te.default))return new ga(0,0,0,0);switch(te.type){case"color":return ga.parse(te.default)||null;case"padding":return Sa.parse(te.default)||null;case"numberArray":return Gi.parse(te.default)||null;case"colorArray":return ti.parse(te.default)||null;case"variableAnchorOffsetCollection":return zi.parse(te.default)||null;case"projectionDefinition":return Mo.parse(te.default)||null;default:return te.default===void 0?null:te.default}}(L):null,this._enumValues=L&&L.type==="enum"?L.values:null,this._globalState=W}evaluateWithoutErrorHandling(d,L,W,te,le,pe){return this._globalState&&(d=un(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L,this._evaluator.featureState=W,this._evaluator.canonical=te,this._evaluator.availableImages=le||null,this._evaluator.formattedSection=pe,this.expression.evaluate(this._evaluator)}evaluate(d,L,W,te,le,pe){this._globalState&&(d=un(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L||null,this._evaluator.featureState=W||null,this._evaluator.canonical=te,this._evaluator.availableImages=le||null,this._evaluator.formattedSection=pe||null;try{let me=this.expression.evaluate(this._evaluator);if(me==null||typeof me=="number"&&me!=me)return this._defaultValue;if(this._enumValues&&!(me in this._enumValues))throw new fi(`Expected value to be one of ${Object.keys(this._enumValues).map(Ce=>JSON.stringify(Ce)).join(", ")}, but found ${JSON.stringify(me)} instead.`);return me}catch(me){return this._warningHistory[me.message]||(this._warningHistory[me.message]=!0,typeof console<"u"&&console.warn(me.message)),this._defaultValue}}}function yc(D){return Array.isArray(D)&&D.length>0&&typeof D[0]=="string"&&D[0]in Tl}function _c(D,d,L){let W=new ns(Tl,Du,[],d?function(le){let pe={color:fr,string:ir,number:It,enum:ir,boolean:cr,formatted:Un,padding:jn,numberArray:ua,colorArray:Aa,projectionDefinition:Ir,resolvedImage:Qn,variableAnchorOffsetCollection:ei};return le.type==="array"?Fa(pe[le.value]||nn,le.length):pe[le.type]}(d):void 0),te=W.parse(D,void 0,void 0,void 0,d&&d.type==="string"?{typeAnnotation:"coerce"}:void 0);return te?ef(new Pl(te,d,L)):_u(W.errors)}class bc{constructor(d,L,W){this.kind=d,this._styleExpression=L,this.isStateDependent=d!=="constant"&&!Xu(L.expression),this.globalStateRefs=wr(L.expression),this._globalState=W}evaluateWithoutErrorHandling(d,L,W,te,le,pe){return this._globalState&&(d=un(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,W,te,le,pe)}evaluate(d,L,W,te,le,pe){return this._globalState&&(d=un(d,this._globalState)),this._styleExpression.evaluate(d,L,W,te,le,pe)}}class ac{constructor(d,L,W,te,le){this.kind=d,this.zoomStops=W,this._styleExpression=L,this.isStateDependent=d!=="camera"&&!Xu(L.expression),this.globalStateRefs=wr(L.expression),this.interpolationType=te,this._globalState=le}evaluateWithoutErrorHandling(d,L,W,te,le,pe){return this._globalState&&(d=un(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,W,te,le,pe)}evaluate(d,L,W,te,le,pe){return this._globalState&&(d=un(d,this._globalState)),this._styleExpression.evaluate(d,L,W,te,le,pe)}interpolationFactor(d,L,W){return this.interpolationType?Ji.interpolationFactor(this.interpolationType,d,L,W):0}}function zt(D,d,L){let W=_c(D,d,L);if(W.result==="error")return W;let te=W.value.expression,le=Iu(te);if(!le&&!$u(d))return _u([new Sr("","data expressions not supported")]);let pe=Qc(te,["zoom"]);if(!pe&&!mc(d))return _u([new Sr("","zoom expressions not supported")]);let me=Br(te);return me||pe?me instanceof Sr?_u([me]):me instanceof Ji&&!Ru(d)?_u([new Sr("",'"interpolate" expressions cannot be used with this property')]):ef(me?new ac(le?"camera":"composite",W.value,me.labels,me instanceof Ji?me.interpolation:void 0,L):new bc(le?"constant":"source",W.value,L)):_u([new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class rr{constructor(d,L){this._parameters=d,this._specification=L,Wt(this,mf(this._parameters,this._specification))}static deserialize(d){return new rr(d._parameters,d._specification)}static serialize(d){return{_parameters:d._parameters,_specification:d._specification}}}function Br(D){let d=null;if(D instanceof wo)d=Br(D.result);else if(D instanceof zl){for(let L of D.args)if(d=Br(L),d)break}else(D instanceof Is||D instanceof Ji)&&D.input instanceof ll&&D.input.name==="zoom"&&(d=D);return d instanceof Sr||D.eachChild(L=>{let W=Br(L);W instanceof Sr?d=W:!d&&W?d=new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):d&&W&&d!==W&&(d=new Sr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),d}function wr(D,d=new Set){return D instanceof Bc&&d.add(D.key),D.eachChild(L=>{wr(L,d)}),d}function un(D,d){let{zoom:L,heatmapDensity:W,elevation:te,lineProgress:le,isSupportedScript:pe,accumulated:me}=D??{};return{zoom:L,heatmapDensity:W,elevation:te,lineProgress:le,isSupportedScript:pe,accumulated:me,globalState:d}}function Ln(D){if(D===!0||D===!1)return!0;if(!Array.isArray(D)||D.length===0)return!1;switch(D[0]){case"has":return D.length>=2&&D[1]!=="$id"&&D[1]!=="$type";case"in":return D.length>=3&&(typeof D[1]!="string"||Array.isArray(D[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return D.length!==3||Array.isArray(D[1])||Array.isArray(D[2]);case"any":case"all":for(let d of D.slice(1))if(!Ln(d)&&typeof d!="boolean")return!1;return!0;default:return!0}}let Vn={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Jn(D,d){if(D==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Ln(D)||(D=Gn(D));let L=_c(D,Vn,d);if(L.result==="error")throw new Error(L.value.map(W=>`${W.key}: ${W.message}`).join(", "));return{filter:(W,te,le)=>L.value.evaluate(W,te,{},le),needGeometry:Pa(D),getGlobalStateRefs:()=>wr(L.value.expression)}}function ca(D,d){return Dd?1:0}function Pa(D){if(!Array.isArray(D))return!1;if(D[0]==="within"||D[0]==="distance")return!0;for(let d=1;d"||d==="<="||d===">="?oa(D[1],D[2],d):d==="any"?(L=D.slice(1),["any"].concat(L.map(Gn))):d==="all"?["all"].concat(D.slice(1).map(Gn)):d==="none"?["all"].concat(D.slice(1).map(Gn).map(qa)):d==="in"?fa(D[1],D.slice(2)):d==="!in"?qa(fa(D[1],D.slice(2))):d==="has"?La(D[1]):d!=="!has"||qa(La(D[1]));var L}function oa(D,d,L){switch(D){case"$type":return[`filter-type-${L}`,d];case"$id":return[`filter-id-${L}`,d];default:return[`filter-${L}`,D,d]}}function fa(D,d){if(d.length===0)return!1;switch(D){case"$type":return["filter-type-in",["literal",d]];case"$id":return["filter-id-in",["literal",d]];default:return d.length>200&&!d.some(L=>typeof L!=typeof d[0])?["filter-in-large",D,["literal",d.sort(ca)]]:["filter-in-small",D,["literal",d]]}}function La(D){switch(D){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",D]}}function qa(D){return["!",D]}function Bi(D){let d=typeof D;if(d==="number"||d==="boolean"||d==="string"||D==null)return JSON.stringify(D);if(Array.isArray(D)){let te="[";for(let le of D)te+=`${Bi(le)},`;return`${te}]`}let L=Object.keys(D).sort(),W="{";for(let te=0;teW.maximum?[new Ht(d,L,`${L} is greater than the maximum value ${W.maximum}`)]:[]}function Vo(D){let d=D.valueSpec,L=_i(D.value.type),W,te,le,pe={},me=L!=="categorical"&&D.value.property===void 0,Ce=!me,we=zo(D.value.stops)==="array"&&zo(D.value.stops[0])==="array"&&zo(D.value.stops[0][0])==="object",ze=Ga({key:D.key,value:D.value,valueSpec:D.styleSpec.function,validateSpec:D.validateSpec,style:D.style,styleSpec:D.styleSpec,objectElementValidators:{stops:function(Ve){if(L==="identity")return[new Ht(Ve.key,Ve.value,'identity function may not have a "stops" property')];let bt=[],Et=Ve.value;return bt=bt.concat(oo({key:Ve.key,value:Et,valueSpec:Ve.valueSpec,validateSpec:Ve.validateSpec,style:Ve.style,styleSpec:Ve.styleSpec,arrayElementValidator:Pe})),zo(Et)==="array"&&Et.length===0&&bt.push(new Ht(Ve.key,Et,"array must have at least one stop")),bt},default:function(Ve){return Ve.validateSpec({key:Ve.key,value:Ve.value,valueSpec:d,validateSpec:Ve.validateSpec,style:Ve.style,styleSpec:Ve.styleSpec})}}});return L==="identity"&&me&&ze.push(new Ht(D.key,D.value,'missing required property "property"')),L==="identity"||D.value.stops||ze.push(new Ht(D.key,D.value,'missing required property "stops"')),L==="exponential"&&D.valueSpec.expression&&!Ru(D.valueSpec)&&ze.push(new Ht(D.key,D.value,"exponential functions not supported")),D.styleSpec.$version>=8&&(Ce&&!$u(D.valueSpec)?ze.push(new Ht(D.key,D.value,"property functions not supported")):me&&!mc(D.valueSpec)&&ze.push(new Ht(D.key,D.value,"zoom functions not supported"))),L!=="categorical"&&!we||D.value.property!==void 0||ze.push(new Ht(D.key,D.value,'"property" property is required')),ze;function Pe(Ve){let bt=[],Et=Ve.value,er=Ve.key;if(zo(Et)!=="array")return[new Ht(er,Et,`array expected, ${zo(Et)} found`)];if(Et.length!==2)return[new Ht(er,Et,`array length 2 expected, length ${Et.length} found`)];if(we){if(zo(Et[0])!=="object")return[new Ht(er,Et,`object expected, ${zo(Et[0])} found`)];if(Et[0].zoom===void 0)return[new Ht(er,Et,"object stop key must have zoom")];if(Et[0].value===void 0)return[new Ht(er,Et,"object stop key must have value")];if(le&&le>_i(Et[0].zoom))return[new Ht(er,Et[0].zoom,"stop zoom values must appear in ascending order")];_i(Et[0].zoom)!==le&&(le=_i(Et[0].zoom),te=void 0,pe={}),bt=bt.concat(Ga({key:`${er}[0]`,value:Et[0],valueSpec:{zoom:{}},validateSpec:Ve.validateSpec,style:Ve.style,styleSpec:Ve.styleSpec,objectElementValidators:{zoom:go,value:nt}}))}else bt=bt.concat(nt({key:`${er}[0]`,value:Et[0],validateSpec:Ve.validateSpec,style:Ve.style,styleSpec:Ve.styleSpec},Et));return yc(Va(Et[1]))?bt.concat([new Ht(`${er}[1]`,Et[1],"expressions are not allowed in function stops.")]):bt.concat(Ve.validateSpec({key:`${er}[1]`,value:Et[1],valueSpec:d,validateSpec:Ve.validateSpec,style:Ve.style,styleSpec:Ve.styleSpec}))}function nt(Ve,bt){let Et=zo(Ve.value),er=_i(Ve.value),tr=Ve.value!==null?Ve.value:bt;if(W){if(Et!==W)return[new Ht(Ve.key,tr,`${Et} stop domain type must match previous stop domain type ${W}`)]}else W=Et;if(Et!=="number"&&Et!=="string"&&Et!=="boolean")return[new Ht(Ve.key,tr,"stop domain value must be a number, string, or boolean")];if(Et!=="number"&&L!=="categorical"){let xr=`number expected, ${Et} found`;return $u(d)&&L===void 0&&(xr+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ht(Ve.key,tr,xr)]}return L!=="categorical"||Et!=="number"||isFinite(er)&&Math.floor(er)===er?L!=="categorical"&&Et==="number"&&te!==void 0&&ernew Ht(`${D.key}${W.key}`,D.value,W.message));let L=d.value.expression||d.value._styleExpression.expression;if(D.expressionContext==="property"&&D.propertyKey==="text-font"&&!L.outputDefined())return[new Ht(D.key,D.value,`Invalid data expression for "${D.propertyKey}". Output values must be contained as literals within the expression.`)];if(D.expressionContext==="property"&&D.propertyType==="layout"&&!Xu(L))return[new Ht(D.key,D.value,'"feature-state" data expressions are not supported with layout properties.')];if(D.expressionContext==="filter"&&!Xu(L))return[new Ht(D.key,D.value,'"feature-state" data expressions are not supported with filters.')];if(D.expressionContext&&D.expressionContext.indexOf("cluster")===0){if(!Qc(L,["zoom","feature-state"]))return[new Ht(D.key,D.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(D.expressionContext==="cluster-initial"&&!Iu(L))return[new Ht(D.key,D.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Yo(D){let d=D.key,L=D.value,W=zo(L);return W!=="string"?[new Ht(d,L,`color expected, ${W} found`)]:ga.parse(String(L))?[]:[new Ht(d,L,`color expected, "${L}" found`)]}function as(D){let d=D.key,L=D.value,W=D.valueSpec,te=[];return Array.isArray(W.values)?W.values.indexOf(_i(L))===-1&&te.push(new Ht(d,L,`expected one of [${W.values.join(", ")}], ${JSON.stringify(L)} found`)):Object.keys(W.values).indexOf(_i(L))===-1&&te.push(new Ht(d,L,`expected one of [${Object.keys(W.values).join(", ")}], ${JSON.stringify(L)} found`)),te}function Bo(D){return Ln(Va(D.value))?Wo(Wt({},D,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Ks(D)}function Ks(D){let d=D.value,L=D.key;if(zo(d)!=="array")return[new Ht(L,d,`array expected, ${zo(d)} found`)];let W=D.styleSpec,te,le=[];if(d.length<1)return[new Ht(L,d,"filter array must have at least 1 element")];switch(le=le.concat(as({key:`${L}[0]`,value:d[0],valueSpec:W.filter_operator,style:D.style,styleSpec:D.styleSpec})),_i(d[0])){case"<":case"<=":case">":case">=":d.length>=2&&_i(d[1])==="$type"&&le.push(new Ht(L,d,`"$type" cannot be use with operator "${d[0]}"`));case"==":case"!=":d.length!==3&&le.push(new Ht(L,d,`filter array for operator "${d[0]}" must have 3 elements`));case"in":case"!in":d.length>=2&&(te=zo(d[1]),te!=="string"&&le.push(new Ht(`${L}[1]`,d[1],`string expected, ${te} found`)));for(let pe=2;pe{Pe in te&&W.push(new Ht(le,te[Pe],`"${Pe}" is prohibited for ref layers`))}),pe.layers.forEach(Pe=>{_i(Pe.id)===we&&(ze=Pe)}),ze?ze.ref?W.push(new Ht(le,te.ref,"ref cannot reference another ref layer")):Ce=_i(ze.type):W.push(new Ht(le,te.ref,`ref layer "${we}" not found`))}else if(Ce!=="background")if(te.source){let ze=pe.sources&&pe.sources[te.source],Pe=ze&&_i(ze.type);ze?Pe==="vector"&&Ce==="raster"?W.push(new Ht(le,te.source,`layer "${te.id}" requires a raster source`)):Pe!=="raster-dem"&&Ce==="hillshade"||Pe!=="raster-dem"&&Ce==="color-relief"?W.push(new Ht(le,te.source,`layer "${te.id}" requires a raster-dem source`)):Pe==="raster"&&Ce!=="raster"?W.push(new Ht(le,te.source,`layer "${te.id}" requires a vector source`)):Pe!=="vector"||te["source-layer"]?Pe==="raster-dem"&&Ce!=="hillshade"&&Ce!=="color-relief"?W.push(new Ht(le,te.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):Ce!=="line"||!te.paint||!te.paint["line-gradient"]||Pe==="geojson"&&ze.lineMetrics||W.push(new Ht(le,te,`layer "${te.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):W.push(new Ht(le,te,`layer "${te.id}" must specify a "source-layer"`)):W.push(new Ht(le,te.source,`source "${te.source}" not found`))}else W.push(new Ht(le,te,'missing required property "source"'));return Ce==="raster"&&(!((d=te.paint)===null||d===void 0)&&d.resampling)&&(!((L=te.paint)===null||L===void 0)&&L["raster-resampling"])&&W.push(new Ht(le,te.paint,`layer "${te.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),W=W.concat(Ga({key:le,value:te,valueSpec:me.layer,style:D.style,styleSpec:D.styleSpec,validateSpec:D.validateSpec,objectElementValidators:{"*":()=>[],type:()=>D.validateSpec({key:`${le}.type`,value:te.type,valueSpec:me.layer.type,style:D.style,styleSpec:D.styleSpec,validateSpec:D.validateSpec,object:te,objectKey:"type"}),filter:Bo,layout:ze=>Ga({layer:te,key:ze.key,value:ze.value,style:ze.style,styleSpec:ze.styleSpec,validateSpec:ze.validateSpec,objectElementValidators:{"*":Pe=>vi(Wt({layerType:Ce},Pe))}}),paint:ze=>Ga({layer:te,key:ze.key,value:ze.value,style:ze.style,styleSpec:ze.styleSpec,validateSpec:ze.validateSpec,objectElementValidators:{"*":Pe=>ps(Wt({layerType:Ce},Pe))}})}})),W}function Ss(D){let d=D.value,L=D.key,W=zo(d);return W!=="string"?[new Ht(L,d,`string expected, ${W} found`)]:[]}let Ws={promoteId:function({key:D,value:d}){if(zo(d)==="string")return Ss({key:D,value:d});{let L=[];for(let W in d)L.push(...Ss({key:`${D}.${W}`,value:d[W]}));return L}}};function Dl(D){let d=D.value,L=D.key,W=D.styleSpec,te=D.style,le=D.validateSpec;if(!d.type)return[new Ht(L,d,'"type" is required')];let pe=_i(d.type),me;switch(pe){case"vector":case"raster":return me=Ga({key:L,value:d,valueSpec:W[`source_${pe.replace("-","_")}`],style:D.style,styleSpec:W,objectElementValidators:Ws,validateSpec:le}),me;case"raster-dem":return me=function(Ce){var we;let ze=(we=Ce.sourceName)!==null&&we!==void 0?we:"",Pe=Ce.value,nt=Ce.styleSpec,Ve=nt.source_raster_dem,bt=Ce.style,Et=[],er=zo(Pe);if(Pe===void 0)return Et;if(er!=="object")return Et.push(new Ht("source_raster_dem",Pe,`object expected, ${er} found`)),Et;let tr=_i(Pe.encoding)==="custom",xr=["redFactor","greenFactor","blueFactor","baseShift"],lr=Ce.value.encoding?`"${Ce.value.encoding}"`:"Default";for(let Mr in Pe)!tr&&xr.includes(Mr)?Et.push(new Ht(Mr,Pe[Mr],`In "${ze}": "${Mr}" is only valid when "encoding" is set to "custom". ${lr} encoding found`)):Ve[Mr]?Et=Et.concat(Ce.validateSpec({key:Mr,value:Pe[Mr],valueSpec:Ve[Mr],validateSpec:Ce.validateSpec,style:bt,styleSpec:nt})):Et.push(new Ht(Mr,Pe[Mr],`unknown property "${Mr}"`));return Et}({sourceName:L,value:d,style:D.style,styleSpec:W,validateSpec:le}),me;case"geojson":if(me=Ga({key:L,value:d,valueSpec:W.source_geojson,style:te,styleSpec:W,validateSpec:le,objectElementValidators:Ws}),d.cluster)for(let Ce in d.clusterProperties){let[we,ze]=d.clusterProperties[Ce],Pe=typeof we=="string"?[we,["accumulated"],["get",Ce]]:we;me.push(...Wo({key:`${L}.${Ce}.map`,value:ze,expressionContext:"cluster-map"})),me.push(...Wo({key:`${L}.${Ce}.reduce`,value:Pe,expressionContext:"cluster-reduce"}))}return me;case"video":return Ga({key:L,value:d,valueSpec:W.source_video,style:te,validateSpec:le,styleSpec:W});case"image":return Ga({key:L,value:d,valueSpec:W.source_image,style:te,validateSpec:le,styleSpec:W});case"canvas":return[new Ht(L,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return as({key:`${L}.type`,value:d.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Nl(D){let d=D.value,L=D.styleSpec,W=L.light,te=D.style,le=[],pe=zo(d);if(d===void 0)return le;if(pe!=="object")return le=le.concat([new Ht("light",d,`object expected, ${pe} found`)]),le;for(let me in d){let Ce=me.match(/^(.*)-transition$/);le=le.concat(Ce&&W[Ce[1]]&&W[Ce[1]].transition?D.validateSpec({key:me,value:d[me],valueSpec:L.transition,validateSpec:D.validateSpec,style:te,styleSpec:L}):W[me]?D.validateSpec({key:me,value:d[me],valueSpec:W[me],validateSpec:D.validateSpec,style:te,styleSpec:L}):[new Ht(me,d[me],`unknown property "${me}"`)])}return le}function Kl(D){let d=D.value,L=D.styleSpec,W=L.sky,te=D.style,le=zo(d);if(d===void 0)return[];if(le!=="object")return[new Ht("sky",d,`object expected, ${le} found`)];let pe=[];for(let me in d)pe=pe.concat(W[me]?D.validateSpec({key:me,value:d[me],valueSpec:W[me],style:te,styleSpec:L}):[new Ht(me,d[me],`unknown property "${me}"`)]);return pe}function Fu(D){let d=D.value,L=D.styleSpec,W=L.terrain,te=D.style,le=[],pe=zo(d);if(d===void 0)return le;if(pe!=="object")return le=le.concat([new Ht("terrain",d,`object expected, ${pe} found`)]),le;for(let me in d)le=le.concat(W[me]?D.validateSpec({key:me,value:d[me],valueSpec:W[me],validateSpec:D.validateSpec,style:te,styleSpec:L}):[new Ht(me,d[me],`unknown property "${me}"`)]);return le}function Al(D){let d=[],L=D.value,W=D.key;if(Array.isArray(L)){let te=[],le=[];for(let pe in L)L[pe].id&&te.includes(L[pe].id)&&d.push(new Ht(W,L,`all the sprites' ids must be unique, but ${L[pe].id} is duplicated`)),te.push(L[pe].id),L[pe].url&&le.includes(L[pe].url)&&d.push(new Ht(W,L,`all the sprites' URLs must be unique, but ${L[pe].url} is duplicated`)),le.push(L[pe].url),d=d.concat(Ga({key:`${W}[${pe}]`,value:L[pe],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:D.validateSpec}));return d}return Ss({key:W,value:L})}function zu(D){return!!D&&D.constructor===Object}function bu(D){return zu(D.value)?[]:[new Ht(D.key,D.value,`object expected, ${zo(D.value)} found`)]}let ic={"*":()=>[],array:oo,boolean:function(D){let d=D.value,L=D.key,W=zo(d);return W!=="boolean"?[new Ht(L,d,`boolean expected, ${W} found`)]:[]},number:go,color:Yo,constants:Zi,enum:as,filter:Bo,function:Vo,layer:Xo,object:Ga,source:Dl,light:Nl,sky:Kl,terrain:Fu,projection:function(D){let d=D.value,L=D.styleSpec,W=L.projection,te=D.style,le=zo(d);if(d===void 0)return[];if(le!=="object")return[new Ht("projection",d,`object expected, ${le} found`)];let pe=[];for(let me in d)pe=pe.concat(W[me]?D.validateSpec({key:me,value:d[me],valueSpec:W[me],style:te,styleSpec:L}):[new Ht(me,d[me],`unknown property "${me}"`)]);return pe},projectionDefinition:function(D){let d=D.key,L=D.value;L=L instanceof String?L.valueOf():L;let W=zo(L);return W!=="array"||function(te){return Array.isArray(te)&&te.length===3&&typeof te[0]=="string"&&typeof te[1]=="string"&&typeof te[2]=="number"}(L)||function(te){return!!["interpolate","step","literal"].includes(te[0])}(L)?["array","string"].includes(W)?[]:[new Ht(d,L,`projection expected, invalid type "${W}" found`)]:[new Ht(d,L,`projection expected, invalid array ${JSON.stringify(L)} found`)]},string:Ss,formatted:function(D){return Ss(D).length===0?[]:Wo(D)},resolvedImage:function(D){return Ss(D).length===0?[]:Wo(D)},padding:function(D){let d=D.key,L=D.value;if(zo(L)==="array"){if(L.length<1||L.length>4)return[new Ht(d,L,`padding requires 1 to 4 values; ${L.length} values found`)];let W={type:"number"},te=[];for(let le=0;le[]}})),D.constants&&(L=L.concat(Zi({key:"constants",value:D.constants}))),Ql(L)}function Jl(D){return function(d){return D(Object.assign({},d,{validateSpec:Oc}))}}function Ql(D){return[].concat(D).sort((d,L)=>d.line-L.line)}function xu(D){return function(...d){return Ql(D.apply(this,d))}}hu.source=xu(Jl(Dl)),hu.sprite=xu(Jl(Al)),hu.glyphs=xu(Jl(Zu)),hu.light=xu(Jl(Nl)),hu.sky=xu(Jl(Kl)),hu.terrain=xu(Jl(Fu)),hu.state=xu(Jl(bu)),hu.layer=xu(Jl(Xo)),hu.filter=xu(Jl(Bo)),hu.paintProperty=xu(Jl(ps)),hu.layoutProperty=xu(Jl(vi));let rf={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class Ff{constructor(d,L){this._globalState=L,this.setValue(d)}evaluate(){var d;return(d=this._literalValue)!==null&&d!==void 0?d:this._compiledValue.evaluate({})}setValue(d){if(d==null||d==="visible"||d==="none")return this._literalValue=d==="none"?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let L=_c(d,rf,this._globalState);if(L.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,new Error(L.value.map(W=>`${W.key}: ${W.message}`).join(", "));this._literalValue=void 0,this._compiledValue=L.value,this._globalStateRefs=wr(L.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let xc=ht,rl=hu,Ol=rl.light,Bu=rl.sky,nf=rl.paintProperty,jc=rl.layoutProperty;function wu(D,d){let L=!1;if(d?.length)for(let W of d)D.fire(new Ot(new Error(W.message))),L=!0;return L}class jl{constructor(d,L,W){let te=this.cells=[];if(d instanceof ArrayBuffer){this.arrayBuffer=d;let pe=new Int32Array(this.arrayBuffer);d=pe[0],this.d=(L=pe[1])+2*(W=pe[2]);for(let Ce=0;Ce=Pe[Ve+0]&&te>=Pe[Ve+1])?(me[nt]=!0,pe.push(ze[nt])):me[nt]=!1}}}_forEachCell(d,L,W,te,le,pe,me,Ce){let we=this._convertToCellCoord(d),ze=this._convertToCellCoord(L),Pe=this._convertToCellCoord(W),nt=this._convertToCellCoord(te);for(let Ve=we;Ve<=Pe;Ve++)for(let bt=ze;bt<=nt;bt++){let Et=this.d*bt+Ve;if((!Ce||Ce(this._convertFromCellCoord(Ve),this._convertFromCellCoord(bt),this._convertFromCellCoord(Ve+1),this._convertFromCellCoord(bt+1)))&&le.call(this,d,L,W,te,Et,pe,me,Ce))return}}_convertFromCellCoord(d){return(d-this.padding)/this.scale}_convertToCellCoord(d){return Math.max(0,Math.min(this.d-1,Math.floor(d*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let d=this.cells,L=3+this.cells.length+1+1,W=0;for(let pe of this.cells)W+=pe.length;let te=new Int32Array(L+W+this.keys.length+this.bboxes.length);te[0]=this.extent,te[1]=this.n,te[2]=this.padding;let le=L;for(let pe=0;peW?(this.lastIntegerZoom=W+1,this.lastIntegerZoomTime=L):this.lastFloorZoom{try{return new RegExp(`\\p{sc=${L}}`,"u").source}catch{return null}}).filter(L=>L);return new RegExp(d.join("|"),"u")}let sn=Wr(["Arab","Dupl","Mong","Ougr","Syrc"]);function gn(D){return!sn.test(String.fromCodePoint(D))}function Cn(D){return!(Yt(D)||(d=D,/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(d))));var d}let Zn=Wr(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function ya(D){return Zn.test(String.fromCodePoint(D))}function Na(D,d){return!(!d&&ya(D)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(D)))}function wi(D){for(let d of D)if(ya(d.codePointAt(0)))return!0;return!1}let Yi=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(D){this.pluginStatus=D.pluginStatus,this.pluginURL=D.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(D){if(Yi.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=D.applyArabicShaping,this.processBidirectionalText=D.processBidirectionalText,this.processStyledBidirectionalText=D.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(D,d){return e(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(D.pluginStatus!=="loading")return this.setState(D),D;let L=D.pluginURL,W=new Promise(le=>{this.loadScriptResolve=le});d(L);let te=new Promise(le=>setTimeout(()=>le(),this.TIMEOUT));if(yield Promise.race([W,te]),this.isParsed()){let le={pluginStatus:"loaded",pluginURL:L};return this.setState(le),le}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${L}`)})}};class Ti{constructor(d,L){this.isSupportedScript=_o,this.zoom=d,L?(this.now=L.now||0,this.fadeDuration=L.fadeDuration||0,this.zoomHistory=L.zoomHistory||new Nt,this.transition=L.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Nt,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let d=this.zoom,L=d-Math.floor(d),W=this.crossFadingFactor();return d>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:L+(1-L)*W}:{fromScale:.5,toScale:1,t:1-(1-W)*L}}}function _o(D){return function(d,L){for(let W of d)if(!Na(W.codePointAt(0),L))return!1;return!0}(D,Yi.getRTLTextPluginStatus()==="loaded")}let bo="-transition";class Zo{constructor(d,L,W){this.property=d,this.value=L,this.expression=function(te,le,pe){if(gc(te))return new rr(te,le);if(yc(te)){let me=zt(te,le,pe);if(me.result==="error")throw new Error(me.value.map(Ce=>`${Ce.key}: ${Ce.message}`).join(", "));return me.value}{let me=te;return le.type==="color"&&typeof te=="string"?me=ga.parse(te):le.type!=="padding"||typeof te!="number"&&!Array.isArray(te)?le.type!=="numberArray"||typeof te!="number"&&!Array.isArray(te)?le.type!=="colorArray"||typeof te!="string"&&!Array.isArray(te)?le.type==="variableAnchorOffsetCollection"&&Array.isArray(te)?me=zi.parse(te):le.type==="projectionDefinition"&&typeof te=="string"&&(me=Mo.parse(te)):me=ti.parse(te):me=Gi.parse(te):me=Sa.parse(te),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>me}}}(L===void 0?d.specification.default:L,d.specification,W)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(d,L,W){return this.property.possiblyEvaluate(this,d,L,W)}}class fs{constructor(d,L){this.property=d,this.value=new Zo(d,void 0,L)}transitioned(d,L){return new Es(this.property,this.value,L,X({},d.transition,this.transition),d.now)}untransitioned(){return new Es(this.property,this.value,null,{},0)}}class Po{constructor(d,L){this._properties=d,this._values=Object.create(d.defaultTransitionablePropertyValues),this._globalState=L}hasProperty(d){return d in this._properties.defaultTransitionablePropertyValues}getValue(d){return q(this._values[d].value.value)}setValue(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new fs(this._values[d].property,this._globalState)),this._values[d].value=new Zo(this._values[d].property,L===null?void 0:q(L),this._globalState)}getTransition(d){return q(this._values[d].transition)}setTransition(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new fs(this._values[d].property,this._globalState)),this._values[d].transition=q(L)||void 0}serialize(){let d={};for(let L of Object.keys(this._values)){let W=this.getValue(L);W!==void 0&&(d[L]=W);let te=this.getTransition(L);te!==void 0&&(d[`${L}${bo}`]=te)}return d}transitioned(d,L){let W=new cl(this._properties);for(let te of Object.keys(this._values))W._values[te]=this._values[te].transitioned(d,L._values[te]);return W}untransitioned(){let d=new cl(this._properties);for(let L of Object.keys(this._values))d._values[L]=this._values[L].untransitioned();return d}}class Es{constructor(d,L,W,te,le){this.property=d,this.value=L,this.begin=le+te.delay||0,this.end=this.begin+te.duration||0,d.specification.transition&&(te.delay||te.duration)&&(this.prior=W)}possiblyEvaluate(d,L,W){let te=d.now||0,le=this.value.possiblyEvaluate(d,L,W),pe=this.prior;if(pe){if(te>this.end)return this.prior=null,le;if(this.value.isDataDriven())return this.prior=null,le;if(tete.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:W,to:L}}interpolate(d){return d}}class Ku{constructor(d){this.specification=d}possiblyEvaluate(d,L,W,te){if(d.value!==void 0){if(d.expression.kind==="constant"){let le=d.expression.evaluate(L,null,{},W,te);return this._calculate(le,le,le,L)}return this._calculate(d.expression.evaluate(new Ti(Math.floor(L.zoom-1),L)),d.expression.evaluate(new Ti(Math.floor(L.zoom),L)),d.expression.evaluate(new Ti(Math.floor(L.zoom+1),L)),L)}}_calculate(d,L,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:W,to:L}}interpolate(d){return d}}class tu{constructor(d){this.specification=d}possiblyEvaluate(d,L,W,te){return!!d.expression.evaluate(L,null,{},W,te)}interpolate(){return!1}}class Bs{constructor(d){this.properties=d,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let L in d){let W=d[L];W.specification.overridable&&this.overridableProperties.push(L);let te=this.defaultPropertyValues[L]=new Zo(W,void 0,void 0),le=this.defaultTransitionablePropertyValues[L]=new fs(W,void 0);this.defaultTransitioningPropertyValues[L]=le.untransitioned(),this.defaultPossiblyEvaluatedValues[L]=te.possiblyEvaluate({})}}}Ci("DataDrivenProperty",Vi),Ci("DataConstantProperty",Li),Ci("CrossFadedDataDrivenProperty",fl),Ci("CrossFadedProperty",Ku),Ci("ColorRampProperty",tu);let oc=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",du=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class hl extends vt{constructor(d,L,W){if(super(),this.id=d.id,this.type=d.type,this._globalState=W,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=function(te,le){return new Ff(te,le)}(this.visibility,W),d.type!=="custom"&&(this.metadata=d.metadata,this.minzoom=d.minzoom,this.maxzoom=d.maxzoom,d.type!=="background"&&(this.source=d.source,this.sourceLayer=d["source-layer"],this.filter=d.filter,this._featureFilter=Jn(d.filter,W)),L.layout&&(this._unevaluatedLayout=new ql(L.layout,W)),L.paint)){this._transitionablePaint=new Po(L.paint,W);for(let te in d.paint)this.setPaintProperty(te,d.paint[te],{validate:!1});for(let te in d.layout)this.setLayoutProperty(te,d.layout[te],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Tu(L.paint)}}setFilter(d){this.filter=d,this._featureFilter=Jn(d,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(d){var L;if(d==="visibility")return this.visibility;if(!((L=this._transitionablePaint)===null||L===void 0)&&L.hasProperty(d))throw new Error(d+oc);if(!this._unevaluatedLayout)throw new Error(`Cannot get layout property "${d}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(d)}getLayoutAffectingGlobalStateRefs(){let d=new Set;for(let L of this._visibilityExpression.getGlobalStateRefs())d.add(L);if(this._unevaluatedLayout)for(let L in this._unevaluatedLayout._values){let W=this._unevaluatedLayout._values[L];for(let te of W.getGlobalStateRefs())d.add(te)}for(let L of this._featureFilter.getGlobalStateRefs())d.add(L);return d}getPaintAffectingGlobalStateRefs(){var d;let L=new globalThis.Map;if(this._transitionablePaint)for(let W in this._transitionablePaint._values){let te=this._transitionablePaint._values[W].value;for(let le of te.getGlobalStateRefs()){let pe=(d=L.get(le))!==null&&d!==void 0?d:[];pe.push({name:W,value:te.value}),L.set(le,pe)}}return L}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(d,L,W={}){var te;if(d==="visibility")return this.visibility=L,this._visibilityExpression.setValue(L),void this.recalculateVisibility();!((te=this._transitionablePaint)===null||te===void 0)&&te.hasProperty(d)?this.fire(new Ot(new Error(d+oc))):L!=null&&this._validate(jc,`layers.${this.id}.layout.${d}`,d,L,W)||this._unevaluatedLayout.setValue(d,L)}getPaintProperty(d){var L,W;if(d.endsWith(bo)){let te=d.slice(0,-11);if(te==="visibility"||!((L=this._unevaluatedLayout)===null||L===void 0)&&L.hasProperty(te))throw new Error(d+du);return this._transitionablePaint.getTransition(te)}if(d==="visibility"||!((W=this._unevaluatedLayout)===null||W===void 0)&&W.hasProperty(d))throw new Error(d+du);return this._transitionablePaint.getValue(d)}setPaintProperty(d,L,W={}){var te;if(d==="visibility"||!((te=this._unevaluatedLayout)===null||te===void 0)&&te.hasProperty(d))return this.fire(new Ot(new Error(d+du))),!1;if(L!=null&&this._validate(nf,`layers.${this.id}.paint.${d}`,d,L,W))return!1;if(d.endsWith(bo))return this._transitionablePaint.setTransition(d.slice(0,-11),L||void 0),!1;{let le=this._transitionablePaint._values[d],pe=le.property.specification["property-type"]==="cross-faded-data-driven",me=le.value.isDataDriven(),Ce=le.value;this._transitionablePaint.setValue(d,L),this._handleSpecialPaintPropertyUpdate(d);let we=this._transitionablePaint._values[d].value;return we.isDataDriven()||me||pe||this._handleOverridablePaintPropertyUpdate(d,Ce,we)}}_handleSpecialPaintPropertyUpdate(d){}_handleOverridablePaintPropertyUpdate(d,L,W){return!1}isHidden(d=this.minzoom,L=!1){return!!(this.minzoom&&d<(L?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&d>=this.maxzoom)||this._evaluatedVisibility==="none"}updateTransitions(d){this._transitioningPaint=this._transitionablePaint.transitioned(d,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(d,L){d.getCrossfadeParameters&&(this._crossfadeParameters=d.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(d,void 0,L)),this.paint=this._transitioningPaint.possiblyEvaluate(d,void 0,L)}serialize(){var d,L;let W={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:(d=this._unevaluatedLayout)===null||d===void 0?void 0:d.serialize(),paint:(L=this._transitionablePaint)===null||L===void 0?void 0:L.serialize()};return this.visibility&&(W.layout||(W.layout={}),W.layout.visibility=this.visibility),Y(W,(te,le)=>!(te===void 0||le==="layout"&&!Object.keys(te).length||le==="paint"&&!Object.keys(te).length))}_validate(d,L,W,te,le={}){return le?.validate!==!1&&wu(this,d.call(rl,{key:L,layerType:this.type,objectKey:W,value:te,styleSpec:ht,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let d in this.paint._values){let L=this.paint.get(d);if(L instanceof Js&&$u(L.property.specification)&&(L.value.kind==="source"||L.value.kind==="composite")&&L.value.isStateDependent)return!0}return!1}}let Uc;var he={get paint(){return Uc=Uc||new Bs({"raster-opacity":new Li(ht.paint_raster["raster-opacity"]),"raster-hue-rotate":new Li(ht.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Li(ht.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Li(ht.paint_raster["raster-brightness-max"]),"raster-saturation":new Li(ht.paint_raster["raster-saturation"]),"raster-contrast":new Li(ht.paint_raster["raster-contrast"]),resampling:new Li(ht.paint_raster.resampling),"raster-resampling":new Li(ht.paint_raster["raster-resampling"]),"raster-fade-duration":new Li(ht.paint_raster["raster-fade-duration"])})}};class Se extends hl{constructor(d,L){super(d,he,L)}}let je={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Qe{constructor(d,L){this._structArray=d,this._pos1=L*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class tt{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(d,L){return d._trim(),L&&(d.isTransferred=!0,L.push(d.arrayBuffer)),{length:d.length,arrayBuffer:d.arrayBuffer}}static deserialize(d){let L=Object.create(this.prototype);return L.arrayBuffer=d.arrayBuffer,L.length=d.length,L.capacity=d.arrayBuffer.byteLength/L.bytesPerElement,L._refreshViews(),L}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(d){this.reserve(d),this.length=d}reserve(d){if(d>this.capacity){this.capacity=Math.max(d,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let L=this.uint8;this._refreshViews(),L&&this.uint8.set(L)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function ut(D,d=1){let L=0,W=0;return{members:D.map(te=>{let le=je[te.type].BYTES_PER_ELEMENT,pe=L=jt(L,Math.max(d,le)),me=te.components||1;return W=Math.max(W,le),L+=le*me,{name:te.name,type:te.type,components:me,offset:pe}}),size:jt(L,Math.max(W,d)),alignment:d}}function jt(D,d){return Math.ceil(D/d)*d}class St extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.int16[te+0]=L,this.int16[te+1]=W,d}}St.prototype.bytesPerElement=4,Ci("StructArrayLayout2i4",St);class Qt extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let le=3*d;return this.int16[le+0]=L,this.int16[le+1]=W,this.int16[le+2]=te,d}}Qt.prototype.bytesPerElement=6,Ci("StructArrayLayout3i6",Qt);class gr extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te){let le=this.length;return this.resize(le+1),this.emplace(le,d,L,W,te)}emplace(d,L,W,te,le){let pe=4*d;return this.int16[pe+0]=L,this.int16[pe+1]=W,this.int16[pe+2]=te,this.int16[pe+3]=le,d}}gr.prototype.bytesPerElement=8,Ci("StructArrayLayout4i8",gr);class yr extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,W,te,le,pe)}emplace(d,L,W,te,le,pe,me){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.int16[Ce+2]=te,this.int16[Ce+3]=le,this.int16[Ce+4]=pe,this.int16[Ce+5]=me,d}}yr.prototype.bytesPerElement=12,Ci("StructArrayLayout2i4i12",yr);class Kr extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,W,te,le,pe)}emplace(d,L,W,te,le,pe,me){let Ce=4*d,we=8*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.uint8[we+4]=te,this.uint8[we+5]=le,this.uint8[we+6]=pe,this.uint8[we+7]=me,d}}Kr.prototype.bytesPerElement=8,Ci("StructArrayLayout2i4ub8",Kr);class $r extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.float32[te+0]=L,this.float32[te+1]=W,d}}$r.prototype.bytesPerElement=8,Ci("StructArrayLayout2f8",$r);class bn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe,me,Ce,we,ze){let Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,d,L,W,te,le,pe,me,Ce,we,ze)}emplace(d,L,W,te,le,pe,me,Ce,we,ze,Pe){let nt=10*d;return this.uint16[nt+0]=L,this.uint16[nt+1]=W,this.uint16[nt+2]=te,this.uint16[nt+3]=le,this.uint16[nt+4]=pe,this.uint16[nt+5]=me,this.uint16[nt+6]=Ce,this.uint16[nt+7]=we,this.uint16[nt+8]=ze,this.uint16[nt+9]=Pe,d}}bn.prototype.bytesPerElement=20,Ci("StructArrayLayout10ui20",bn);class Rn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe,me,Ce){let we=this.length;return this.resize(we+1),this.emplace(we,d,L,W,te,le,pe,me,Ce)}emplace(d,L,W,te,le,pe,me,Ce,we){let ze=8*d;return this.uint16[ze+0]=L,this.uint16[ze+1]=W,this.uint16[ze+2]=te,this.uint16[ze+3]=le,this.uint16[ze+4]=pe,this.uint16[ze+5]=me,this.uint16[ze+6]=Ce,this.uint16[ze+7]=we,d}}Rn.prototype.bytesPerElement=16,Ci("StructArrayLayout8ui16",Rn);class rn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt){let Ve=this.length;return this.resize(Ve+1),this.emplace(Ve,d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt)}emplace(d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve){let bt=12*d;return this.int16[bt+0]=L,this.int16[bt+1]=W,this.int16[bt+2]=te,this.int16[bt+3]=le,this.uint16[bt+4]=pe,this.uint16[bt+5]=me,this.uint16[bt+6]=Ce,this.uint16[bt+7]=we,this.int16[bt+8]=ze,this.int16[bt+9]=Pe,this.int16[bt+10]=nt,this.int16[bt+11]=Ve,d}}rn.prototype.bytesPerElement=24,Ci("StructArrayLayout4i4ui4i24",rn);class pn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let le=3*d;return this.float32[le+0]=L,this.float32[le+1]=W,this.float32[le+2]=te,d}}pn.prototype.bytesPerElement=12,Ci("StructArrayLayout3f12",pn);class xn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint32[1*d+0]=L,d}}xn.prototype.bytesPerElement=4,Ci("StructArrayLayout1ul4",xn);class Bn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe,me,Ce,we){let ze=this.length;return this.resize(ze+1),this.emplace(ze,d,L,W,te,le,pe,me,Ce,we)}emplace(d,L,W,te,le,pe,me,Ce,we,ze){let Pe=10*d,nt=5*d;return this.int16[Pe+0]=L,this.int16[Pe+1]=W,this.int16[Pe+2]=te,this.int16[Pe+3]=le,this.int16[Pe+4]=pe,this.int16[Pe+5]=me,this.uint32[nt+3]=Ce,this.uint16[Pe+8]=we,this.uint16[Pe+9]=ze,d}}Bn.prototype.bytesPerElement=20,Ci("StructArrayLayout6i1ul2ui20",Bn);class Fn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,W,te,le,pe)}emplace(d,L,W,te,le,pe,me){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.int16[Ce+2]=te,this.int16[Ce+3]=le,this.int16[Ce+4]=pe,this.int16[Ce+5]=me,d}}Fn.prototype.bytesPerElement=12,Ci("StructArrayLayout2i2i2i12",Fn);class mn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le){let pe=this.length;return this.resize(pe+1),this.emplace(pe,d,L,W,te,le)}emplace(d,L,W,te,le,pe){let me=4*d,Ce=8*d;return this.float32[me+0]=L,this.float32[me+1]=W,this.float32[me+2]=te,this.int16[Ce+6]=le,this.int16[Ce+7]=pe,d}}mn.prototype.bytesPerElement=16,Ci("StructArrayLayout2f1f2i16",mn);class Ea extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,W,te,le,pe)}emplace(d,L,W,te,le,pe,me){let Ce=16*d,we=4*d,ze=8*d;return this.uint8[Ce+0]=L,this.uint8[Ce+1]=W,this.float32[we+1]=te,this.float32[we+2]=le,this.int16[ze+6]=pe,this.int16[ze+7]=me,d}}Ea.prototype.bytesPerElement=16,Ci("StructArrayLayout2ub2f2i16",Ea);class Oa extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let le=3*d;return this.uint16[le+0]=L,this.uint16[le+1]=W,this.uint16[le+2]=te,d}}Oa.prototype.bytesPerElement=6,Ci("StructArrayLayout3ui6",Oa);class Ka extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt,Et,er,tr){let xr=this.length;return this.resize(xr+1),this.emplace(xr,d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt,Et,er,tr)}emplace(d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt,Et,er,tr,xr){let lr=24*d,Mr=12*d,Xr=48*d;return this.int16[lr+0]=L,this.int16[lr+1]=W,this.uint16[lr+2]=te,this.uint16[lr+3]=le,this.uint32[Mr+2]=pe,this.uint32[Mr+3]=me,this.uint32[Mr+4]=Ce,this.uint16[lr+10]=we,this.uint16[lr+11]=ze,this.uint16[lr+12]=Pe,this.float32[Mr+7]=nt,this.float32[Mr+8]=Ve,this.uint8[Xr+36]=bt,this.uint8[Xr+37]=Et,this.uint8[Xr+38]=er,this.uint32[Mr+10]=tr,this.int16[lr+22]=xr,d}}Ka.prototype.bytesPerElement=48,Ci("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ka);class di extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt,Et,er,tr,xr,lr,Mr,Xr,an,kn,On,_a,ta,Ba,Za){let Da=this.length;return this.resize(Da+1),this.emplace(Da,d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt,Et,er,tr,xr,lr,Mr,Xr,an,kn,On,_a,ta,Ba,Za)}emplace(d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt,Et,er,tr,xr,lr,Mr,Xr,an,kn,On,_a,ta,Ba,Za,Da){let na=32*d,li=16*d;return this.int16[na+0]=L,this.int16[na+1]=W,this.int16[na+2]=te,this.int16[na+3]=le,this.int16[na+4]=pe,this.int16[na+5]=me,this.int16[na+6]=Ce,this.int16[na+7]=we,this.uint16[na+8]=ze,this.uint16[na+9]=Pe,this.uint16[na+10]=nt,this.uint16[na+11]=Ve,this.uint16[na+12]=bt,this.uint16[na+13]=Et,this.uint16[na+14]=er,this.uint16[na+15]=tr,this.uint16[na+16]=xr,this.uint16[na+17]=lr,this.uint16[na+18]=Mr,this.uint16[na+19]=Xr,this.uint16[na+20]=an,this.uint16[na+21]=kn,this.uint16[na+22]=On,this.uint32[li+12]=_a,this.float32[li+13]=ta,this.float32[li+14]=Ba,this.uint16[na+30]=Za,this.uint16[na+31]=Da,d}}di.prototype.bytesPerElement=64,Ci("StructArrayLayout8i15ui1ul2f2ui64",di);class Oi extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.float32[1*d+0]=L,d}}Oi.prototype.bytesPerElement=4,Ci("StructArrayLayout1f4",Oi);class Pi extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let le=3*d;return this.uint16[6*d+0]=L,this.float32[le+1]=W,this.float32[le+2]=te,d}}Pi.prototype.bytesPerElement=12,Ci("StructArrayLayout1ui2f12",Pi);class ko extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let le=4*d;return this.uint32[2*d+0]=L,this.uint16[le+2]=W,this.uint16[le+3]=te,d}}ko.prototype.bytesPerElement=8,Ci("StructArrayLayout1ul2ui8",ko);class de extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.uint16[te+0]=L,this.uint16[te+1]=W,d}}de.prototype.bytesPerElement=4,Ci("StructArrayLayout2ui4",de);class y extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint16[1*d+0]=L,d}}y.prototype.bytesPerElement=2,Ci("StructArrayLayout1ui2",y);class O extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W,te){let le=this.length;return this.resize(le+1),this.emplace(le,d,L,W,te)}emplace(d,L,W,te,le){let pe=4*d;return this.float32[pe+0]=L,this.float32[pe+1]=W,this.float32[pe+2]=te,this.float32[pe+3]=le,d}}O.prototype.bytesPerElement=16,Ci("StructArrayLayout4f16",O);class ie extends Qe{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new t(this.anchorPointX,this.anchorPointY)}}ie.prototype.size=20;class ce extends Bn{get(d){return new ie(this,d)}}Ci("CollisionBoxArray",ce);class _e extends Qe{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(d){this._structArray.uint8[this._pos1+37]=d}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(d){this._structArray.uint8[this._pos1+38]=d}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(d){this._structArray.uint32[this._pos4+10]=d}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}_e.prototype.size=48;class De extends Ka{get(d){return new _e(this,d)}}Ci("PlacedSymbolArray",De);class Ne extends Qe{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(d){this._structArray.uint32[this._pos4+12]=d}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Ne.prototype.size=64;class Ye extends di{get(d){return new Ne(this,d)}}Ci("SymbolInstanceArray",Ye);class lt extends Oi{getoffsetX(d){return this.float32[1*d+0]}}Ci("GlyphOffsetArray",lt);class ct extends Qt{getx(d){return this.int16[3*d+0]}gety(d){return this.int16[3*d+1]}gettileUnitDistanceFromAnchor(d){return this.int16[3*d+2]}}Ci("SymbolLineVertexArray",ct);class Ft extends Qe{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]}}Ft.prototype.size=12;class Gt extends Pi{get(d){return new Ft(this,d)}}Ci("TextAnchorOffsetArray",Gt);class Jt extends Qe{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]}}Jt.prototype.size=8;class it extends ko{get(d){return new Jt(this,d)}}Ci("FeatureIndexArray",it);class Rt extends St{}class qt extends St{}class or extends St{}class vr extends yr{}class Ar extends Kr{}class dr extends $r{}class mr extends bn{}class qr extends Rn{}class Lr extends rn{}class cn extends pn{}class Nn extends xn{}class Dn extends Fn{}class qn extends Ea{}class _n extends Oa{}class vn extends de{}let Sn=ut([{name:"a_pos",components:2,type:"Int16"}],4),{members:Tn}=Sn;class Xn{constructor(d=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=d}prepareSegment(d,L,W,te){let le=this.segments[this.segments.length-1];return d>Xn.MAX_VERTEX_ARRAY_LENGTH&&ee(`Max vertices per segment is ${Xn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${d}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Xn.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!le||le.vertexLength+d>Xn.MAX_VERTEX_ARRAY_LENGTH||le.sortKey!==te?this.createNewSegment(L,W,te):le}createNewSegment(d,L,W){let te={vertexOffset:d.length,primitiveOffset:L.length,vertexLength:0,primitiveLength:0,vaos:{}};return W!==void 0&&(te.sortKey=W),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(te),te}getOrCreateLatestSegment(d,L,W){return this.prepareSegment(0,d,L,W)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let d of this.segments)for(let L in d.vaos)d.vaos[L].destroy()}static simpleSegment(d,L,W,te){return new Xn([{vertexOffset:d,primitiveOffset:L,vertexLength:W,primitiveLength:te,vaos:{},sortKey:0}])}}function $n(D,d){return 256*(D=oe(Math.floor(D),0,255))+oe(Math.floor(d),0,255)}Xn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ci("SegmentVector",Xn);let Ha=ut([{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"}]),$a=ut([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var Si,Ma,xa,gi={exports:{}},Wa={exports:{}},Ya={exports:{}},Xa=function(){if(xa)return gi.exports;xa=1;var D=(Si||(Si=1,Wa.exports=function(L,W){var te,le,pe,me,Ce,we,ze,Pe;for(le=L.length-(te=3&L.length),pe=W,Ce=3432918353,we=461845907,Pe=0;Pe>>16)*Ce&65535)<<16)&4294967295)<<15|ze>>>17))*we+(((ze>>>16)*we&65535)<<16)&4294967295)<<13|pe>>>19))+((5*(pe>>>16)&65535)<<16)&4294967295))+((58964+(me>>>16)&65535)<<16);switch(ze=0,te){case 3:ze^=(255&L.charCodeAt(Pe+2))<<16;case 2:ze^=(255&L.charCodeAt(Pe+1))<<8;case 1:pe^=ze=(65535&(ze=(ze=(65535&(ze^=255&L.charCodeAt(Pe)))*Ce+(((ze>>>16)*Ce&65535)<<16)&4294967295)<<15|ze>>>17))*we+(((ze>>>16)*we&65535)<<16)&4294967295}return pe^=L.length,pe=2246822507*(65535&(pe^=pe>>>16))+((2246822507*(pe>>>16)&65535)<<16)&4294967295,pe=3266489909*(65535&(pe^=pe>>>13))+((3266489909*(pe>>>16)&65535)<<16)&4294967295,(pe^=pe>>>16)>>>0}),Wa.exports),d=(Ma||(Ma=1,Ya.exports=function(L,W){for(var te,le=L.length,pe=W^le,me=0;le>=4;)te=1540483477*(65535&(te=255&L.charCodeAt(me)|(255&L.charCodeAt(++me))<<8|(255&L.charCodeAt(++me))<<16|(255&L.charCodeAt(++me))<<24))+((1540483477*(te>>>16)&65535)<<16),pe=1540483477*(65535&pe)+((1540483477*(pe>>>16)&65535)<<16)^(te=1540483477*(65535&(te^=te>>>24))+((1540483477*(te>>>16)&65535)<<16)),le-=4,++me;switch(le){case 3:pe^=(255&L.charCodeAt(me+2))<<16;case 2:pe^=(255&L.charCodeAt(me+1))<<8;case 1:pe=1540483477*(65535&(pe^=255&L.charCodeAt(me)))+((1540483477*(pe>>>16)&65535)<<16)}return pe=1540483477*(65535&(pe^=pe>>>13))+((1540483477*(pe>>>16)&65535)<<16),(pe^=pe>>>15)>>>0}),Ya.exports);return gi.exports=D,gi.exports.murmur3=D,gi.exports.murmur2=d,gi.exports}(),pi=a(Xa);class Xi{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(d,L,W,te){this.ids.push(Eo(d)),this.positions.push(L,W,te)}getPositions(d){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let L=Eo(d),W=0,te=this.ids.length-1;for(;W>1;this.ids[pe]>=L?te=pe:W=pe+1}let le=[];for(;this.ids[W]===L;)le.push({index:this.positions[3*W],start:this.positions[3*W+1],end:this.positions[3*W+2]}),W++;return le}static serialize(d,L){let W=new Float64Array(d.ids),te=new Uint32Array(d.positions);return yi(W,te,0,W.length-1),L&&L.push(W.buffer,te.buffer),{ids:W,positions:te}}static deserialize(d){let L=new Xi;return L.ids=d.ids,L.positions=d.positions,L.indexed=!0,L}}function Eo(D){let d=+D;return!isNaN(d)&&d<=Number.MAX_SAFE_INTEGER?d:pi(String(D))}function yi(D,d,L,W){for(;L>1],le=L-1,pe=W+1;for(;;){do le++;while(D[le]te);if(le>=pe)break;Ui(D,le,pe),Ui(d,3*le,3*pe),Ui(d,3*le+1,3*pe+1),Ui(d,3*le+2,3*pe+2)}pe-L`u_${te}`),this.type=W}setUniform(d,L,W){d.set(W.constantOr(this.value))}getBinding(d,L,W){return this.type==="color"?new qs(d,L):new To(d,L)}}class os{constructor(d,L){this.uniformNames=L.map(W=>`u_${W}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(d,L){this.pixelRatioFrom=L.pixelRatio,this.pixelRatioTo=d.pixelRatio,this.patternFrom=L.tlbr,this.patternTo=d.tlbr}setConstantDashPositions(d,L){this.dashTo=[0,d.y,d.height,d.width],this.dashFrom=[0,L.y,L.height,L.width]}setUniform(d,L,W,te){let le=null;te==="u_pattern_to"?le=this.patternTo:te==="u_pattern_from"?le=this.patternFrom:te==="u_dasharray_to"?le=this.dashTo:te==="u_dasharray_from"?le=this.dashFrom:te==="u_pixel_ratio_to"?le=this.pixelRatioTo:te==="u_pixel_ratio_from"&&(le=this.pixelRatioFrom),le!==null&&d.set(le)}getBinding(d,L,W){return W.startsWith("u_pattern")||W.startsWith("u_dasharray_")?new jo(d,L):new To(d,L)}}class hs{constructor(d,L,W,te){this.expression=d,this.type=W,this.maxValue=0,this.paintVertexAttributes=L.map(le=>({name:`a_${le}`,type:"Float32",components:W==="color"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(d,L,W){let te=this.paintVertexArray.length,le=this.expression.evaluate(new Ti(0,W),L,{},W.canonical,[],W.formattedSection);this.paintVertexArray.resize(d),this._setPaintValue(te,d,le)}updatePaintArray(d,L,W,te,le){let pe=this.expression.evaluate(new Ti(0,le),W,te);this._setPaintValue(d,L,pe)}_setPaintValue(d,L,W){if(this.type==="color"){let te=Uo(W);for(let le=d;le`u_${me}_t`),this.type=W,this.useIntegerZoom=te,this.zoom=le,this.maxValue=0,this.paintVertexAttributes=L.map(me=>({name:`a_${me}`,type:"Float32",components:W==="color"?4:2,offset:0})),this.paintVertexArray=new pe}populatePaintArray(d,L,W){let te=this.expression.evaluate(new Ti(this.zoom,W),L,{},W.canonical,[],W.formattedSection),le=this.expression.evaluate(new Ti(this.zoom+1,W),L,{},W.canonical,[],W.formattedSection),pe=this.paintVertexArray.length;this.paintVertexArray.resize(d),this._setPaintValue(pe,d,te,le)}updatePaintArray(d,L,W,te,le){let pe=this.expression.evaluate(new Ti(this.zoom,le),W,te),me=this.expression.evaluate(new Ti(this.zoom+1,le),W,te);this._setPaintValue(d,L,pe,me)}_setPaintValue(d,L,W,te){if(this.type==="color"){let le=Uo(W),pe=Uo(te);for(let me=d;me`#define HAS_UNIFORM_${te}`))}return d}getBinderAttributes(){let d=[];for(let L in this.binders){let W=this.binders[L];if(W instanceof hs||W instanceof ss)for(let te of W.paintVertexAttributes)d.push(te.name);else if(W instanceof ks){let te=W.getVertexAttributes();for(let le of te)d.push(le.name)}}return d}getBinderUniforms(){let d=[];for(let L in this.binders){let W=this.binders[L];if(W instanceof Qs||W instanceof os||W instanceof ss)for(let te of W.uniformNames)d.push(te)}return d}getPaintVertexBuffers(){return this._buffers}getUniforms(d,L){let W=[];for(let te in this.binders){let le=this.binders[te];if(le instanceof Qs||le instanceof os||le instanceof ss){for(let pe of le.uniformNames)if(L[pe]){let me=le.getBinding(d,L[pe],pe);W.push({name:pe,property:te,binding:me})}}}return W}setUniforms(d,L,W,te){for(let{name:le,property:pe,binding:me}of L)this.binders[pe].setUniform(me,te,W.get(pe),le)}updatePaintBuffers(d){this._buffers=[];for(let L in this.binders){let W=this.binders[L];if(d&&W instanceof ks){let te=d.fromScale===2?W.zoomInPaintVertexBuffer:W.zoomOutPaintVertexBuffer;te&&this._buffers.push(te)}else(W instanceof hs||W instanceof ss)&&W.paintVertexBuffer&&this._buffers.push(W.paintVertexBuffer)}}upload(d){for(let L in this.binders){let W=this.binders[L];(W instanceof hs||W instanceof ss||W instanceof ks)&&W.upload(d)}this.updatePaintBuffers()}destroy(){for(let d in this.binders){let L=this.binders[d];(L instanceof hs||L instanceof ss||L instanceof ks)&&L.destroy()}}}class Do{constructor(d,L,W=()=>!0){this.programConfigurations={};for(let te of d)this.programConfigurations[te.id]=new Il(te,L,W);this.needsUpload=!1,this._featureMap=new Xi,this._bufferOffset=0}populatePaintArrays(d,L,W,te){for(let le in this.programConfigurations)this.programConfigurations[le].populatePaintArrays(d,L,te);L.id!==void 0&&this._featureMap.add(L.id,W,this._bufferOffset,d),this._bufferOffset=d,this.needsUpload=!0}updatePaintArrays(d,L,W,te){for(let le of W)this.needsUpload=this.programConfigurations[le.id].updatePaintArrays(d,this._featureMap,L,le,te)||this.needsUpload}get(d){return this.programConfigurations[d]}upload(d){if(this.needsUpload){for(let L in this.programConfigurations)this.programConfigurations[L].upload(d);this.needsUpload=!1}}destroy(){for(let d in this.programConfigurations)this.programConfigurations[d].destroy()}}function ru(D,d){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[D]||[D.replace(`${d}-`,"").replace(/-/g,"_")]}function Ns(D,d,L){let W={color:{source:$r,composite:O},number:{source:Oi,composite:$r}},te=function(le){return{"line-pattern":{source:mr,composite:mr},"fill-pattern":{source:mr,composite:mr},"fill-extrusion-pattern":{source:mr,composite:mr},"line-dasharray":{source:qr,composite:qr}}[le]}(D);return te?.[L]||W[d][L]}Ci("ConstantBinder",Qs),Ci("CrossFadedConstantBinder",os),Ci("SourceExpressionBinder",hs),Ci("CrossFadedPatternBinder",ts),Ci("CrossFadedDasharrayBinder",el),Ci("CompositeExpressionBinder",ss),Ci("ProgramConfiguration",Il,{omit:["_buffers"]}),Ci("ProgramConfigurationSet",Do);let Nu=Math.pow(2,14)-1,Vl=-Nu-1;function Hl(D){let d=F/D.extent,L=D.loadGeometry();for(let W of L)for(let te of W){let le=Math.round(te.x*d),pe=Math.round(te.y*d);te.x=oe(le,Vl,Nu),te.y=oe(pe,Vl,Nu),(lete.x+1||pete.y+1)&&ee("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return L}function Co(D,d){return{type:D.type,id:D.id,properties:D.properties,geometry:d?Hl(D):[]}}let is=-32768;function Hs(D,d,L,W,te){D.emplaceBack(is+8*d+W,is+8*L+te)}class fn{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new qt,this.indexArray=new _n,this.segments=new Xn,this.programConfigurations=new Do(d.layers,d.zoom),this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){let te=this.layers[0],le=[],pe=null,me=!1,Ce=te.type==="heatmap";if(te.type==="circle"){let ze=te;pe=ze.layout.get("circle-sort-key"),me=!pe.isConstant(),Ce||(Ce=ze.paint.get("circle-pitch-alignment")==="map")}let we=Ce?L.subdivisionGranularity.circle:1;for(let{feature:ze,id:Pe,index:nt,sourceLayerIndex:Ve}of d){let bt=this.layers[0]._featureFilter.needGeometry,Et=Co(ze,bt);if(!this.layers[0]._featureFilter.filter(new Ti(this.zoom),Et,W))continue;let er=me?pe.evaluate(Et,{},W):void 0,tr={id:Pe,properties:ze.properties,type:ze.type,sourceLayerIndex:Ve,index:nt,geometry:bt?Et.geometry:Hl(ze),patterns:{},sortKey:er};le.push(tr)}me&&le.sort((ze,Pe)=>ze.sortKey-Pe.sortKey);for(let ze of le){let{geometry:Pe,index:nt,sourceLayerIndex:Ve}=ze,bt=d[nt].feature;this.addFeature(ze,Pe,nt,W,we),L.featureIndex.insert(bt,Pe,nt,Ve,this.index)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,Tn),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(d,L,W,te,le=1){let pe;switch(le){case 1:pe=[0,7];break;case 3:pe=[0,2,5,7];break;case 5:pe=[0,1,3,4,6,7];break;case 7:pe=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${le}; valid values are 1, 3, 5, 7.`)}let me=pe.length;for(let Ce of L)for(let we of Ce){let ze=we.x,Pe=we.y;if(ze<0||ze>=F||Pe<0||Pe>=F)continue;let nt=this.segments.prepareSegment(me*me,this.layoutVertexArray,this.indexArray,d.sortKey),Ve=nt.vertexLength;for(let bt=0;bt1){if(Os(D,d))return!0;for(let W of d)if(en(W,D,L))return!0}for(let W of D)if(en(W,d,L))return!0;return!1}function Os(D,d){if(D.length===0||d.length===0)return!1;for(let L=0;L1?L:L.sub(d)._mult(te)._add(d))}function An(D,d){let L,W,te,le=!1;for(let pe of D){L=pe;for(let me=0,Ce=L.length-1;med.y!=te.y>d.y&&d.x<(te.x-W.x)*(d.y-W.y)/(te.y-W.y)+W.x&&(le=!le)}return le}function sa(D,d){let L=!1;for(let W=0,te=D.length-1;Wd.y!=pe.y>d.y&&d.x<(pe.x-le.x)*(d.y-le.y)/(pe.y-le.y)+le.x&&(L=!L)}return L}function wa(D,d,L){let W=L[0],te=L[2];if(D.xte.x&&d.x>te.x||D.yte.y&&d.y>te.y)return!1;let le=ne(D,d,L[0]);return le!==ne(D,d,L[1])||le!==ne(D,d,L[2])||le!==ne(D,d,L[3])}function Le(D,d,L){let W=d.paint.get(D).value;return W.kind==="constant"?W.value:L.programConfigurations.get(d.id).getMaxValue(D)}function Oe(D){return Math.sqrt(D[0]*D[0]+D[1]*D[1])}function Ke(D,d,L,W,te){if(!d[0]&&!d[1])return D;let le=t.convert(d)._mult(te);L==="viewport"&&le._rotate(-W);let pe=[];for(let me of D)pe.push(me.sub(le));return pe}function yt(D){let d=[];for(let L=0;Lva(lr,er,tr,xr))}(we,le,me,Ce),bt=ze),Mn({queryGeometry:Ve,size:bt,transform:le,unwrappedTileID:me,getElevation:Ce,pitchAlignment:nt,pitchScale:Pe},te)}}class za extends fn{}let Ua;Ci("HeatmapBucket",za,{omit:["layers"]});var Ja={get paint(){return Ua=Ua||new Bs({"heatmap-radius":new Vi(ht.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Vi(ht.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Li(ht.paint_heatmap["heatmap-intensity"]),"heatmap-color":new tu(ht.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Li(ht.paint_heatmap["heatmap-opacity"])})}};function hi(D,{width:d,height:L},W,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==d*L*W)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${d*L*W}`)}else te=new Uint8Array(d*L*W);return D.width=d,D.height=L,D.data=te,D}function Ki(D,{width:d,height:L},W){if(d===D.width&&L===D.height)return;let te=hi({},{width:d,height:L},W);Qo(D,te,{x:0,y:0},{x:0,y:0},{width:Math.min(D.width,d),height:Math.min(D.height,L)},W),D.width=d,D.height=L,D.data=te.data}function Qo(D,d,L,W,te,le){if(te.width===0||te.height===0)return d;if(te.width>D.width||te.height>D.height||L.x>D.width-te.width||L.y>D.height-te.height)throw new RangeError("out of range source coordinates for image copy");if(te.width>d.width||te.height>d.height||W.x>d.width-te.width||W.y>d.height-te.height)throw new RangeError("out of range destination coordinates for image copy");let pe=D.data,me=d.data;if(pe===me)throw new Error("srcData equals dstData, so image is already copied");for(let Ce=0;Ce{d[D.evaluationKey]=Ce;let we=D.expression.evaluate(d);te.setPixel(pe/4/L,me/4,we)};if(D.clips)for(let pe=0,me=0;pethis.max&&(this.max=Pe),Pe=this.dim+1||L<-1||L>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${d}, y: ${L}, dim: ${this.dim}`);return(L+1)*this.stride+(d+1)}unpack(d,L,W){return d*this.redFactor+L*this.greenFactor+W*this.blueFactor-this.baseShift}pack(d){return Ld(d,this.getUnpackVector())}getPixels(){return new ys({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(d,L,W){if(this.dim!==d.dim)throw new Error("dem dimension mismatch");let te=L*this.dim,le=L*this.dim+this.dim,pe=W*this.dim,me=W*this.dim+this.dim;switch(L){case-1:te=le-1;break;case 1:le=te+1}switch(W){case-1:pe=me-1;break;case 1:me=pe+1}let Ce=-L*this.dim,we=-W*this.dim;for(let ze=pe;ze0)for(let pe=d;pe=d;pe-=W)le=J5(pe/W|0,D[pe],D[pe+1],le);return le&&ip(le,le.next)&&(p0(le),le=le.next),le}function td(D,d){if(!D)return D;d||(d=D);let L,W=D;do if(L=!1,W.steiner||!ip(W,W.next)&&Ou(W.prev,W,W.next)!==0)W=W.next;else{if(p0(W),W=d=W.prev,W===W.next)break;L=!0}while(L||W!==d);return d}function Dd(D,d,L,W,te,le,pe){if(!D)return;!pe&&le&&function(Ce,we,ze,Pe){let nt=Ce;do nt.z===0&&(nt.z=a_(nt.x,nt.y,we,ze,Pe)),nt.prevZ=nt.prev,nt.nextZ=nt.next,nt=nt.next;while(nt!==Ce);nt.prevZ.nextZ=null,nt.prevZ=null,function(Ve){let bt,Et=1;do{let er,tr=Ve;Ve=null;let xr=null;for(bt=0;tr;){bt++;let lr=tr,Mr=0;for(let an=0;an0||Xr>0&&lr;)Mr!==0&&(Xr===0||!lr||tr.z<=lr.z)?(er=tr,tr=tr.nextZ,Mr--):(er=lr,lr=lr.nextZ,Xr--),xr?xr.nextZ=er:Ve=er,er.prevZ=xr,xr=er;tr=lr}xr.nextZ=null,Et*=2}while(bt>1)}(nt)}(D,W,te,le);let me=D;for(;D.prev!==D.next;){let Ce=D.prev,we=D.next;if(le?pI(D,W,te,le):h0(D))d.push(Ce.i,D.i,we.i),p0(D),D=we.next,me=we.next;else if((D=we)===me){pe?pe===1?Dd(D=mI(td(D),d),d,L,W,te,le,2):pe===2&&gI(D,d,L,W,te,le):Dd(td(D),d,L,W,te,le,1);break}}}function h0(D){let d=D.prev,L=D,W=D.next;if(Ou(d,L,W)>=0)return!1;let te=d.x,le=L.x,pe=W.x,me=d.y,Ce=L.y,we=W.y,ze=Math.min(te,le,pe),Pe=Math.min(me,Ce,we),nt=Math.max(te,le,pe),Ve=Math.max(me,Ce,we),bt=W.next;for(;bt!==d;){if(bt.x>=ze&&bt.x<=nt&&bt.y>=Pe&&bt.y<=Ve&&d0(te,me,le,Ce,pe,we,bt.x,bt.y)&&Ou(bt.prev,bt,bt.next)>=0)return!1;bt=bt.next}return!0}function pI(D,d,L,W){let te=D.prev,le=D,pe=D.next;if(Ou(te,le,pe)>=0)return!1;let me=te.x,Ce=le.x,we=pe.x,ze=te.y,Pe=le.y,nt=pe.y,Ve=Math.min(me,Ce,we),bt=Math.min(ze,Pe,nt),Et=Math.max(me,Ce,we),er=Math.max(ze,Pe,nt),tr=a_(Ve,bt,d,L,W),xr=a_(Et,er,d,L,W),lr=D.prevZ,Mr=D.nextZ;for(;lr&&lr.z>=tr&&Mr&&Mr.z<=xr;){if(lr.x>=Ve&&lr.x<=Et&&lr.y>=bt&&lr.y<=er&&lr!==te&&lr!==pe&&d0(me,ze,Ce,Pe,we,nt,lr.x,lr.y)&&Ou(lr.prev,lr,lr.next)>=0||(lr=lr.prevZ,Mr.x>=Ve&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=er&&Mr!==te&&Mr!==pe&&d0(me,ze,Ce,Pe,we,nt,Mr.x,Mr.y)&&Ou(Mr.prev,Mr,Mr.next)>=0))return!1;Mr=Mr.nextZ}for(;lr&&lr.z>=tr;){if(lr.x>=Ve&&lr.x<=Et&&lr.y>=bt&&lr.y<=er&&lr!==te&&lr!==pe&&d0(me,ze,Ce,Pe,we,nt,lr.x,lr.y)&&Ou(lr.prev,lr,lr.next)>=0)return!1;lr=lr.prevZ}for(;Mr&&Mr.z<=xr;){if(Mr.x>=Ve&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=er&&Mr!==te&&Mr!==pe&&d0(me,ze,Ce,Pe,we,nt,Mr.x,Mr.y)&&Ou(Mr.prev,Mr,Mr.next)>=0)return!1;Mr=Mr.nextZ}return!0}function mI(D,d){let L=D;do{let W=L.prev,te=L.next.next;!ip(W,te)&&Z5(W,L,L.next,te)&&v0(W,te)&&v0(te,W)&&(d.push(W.i,L.i,te.i),p0(L),p0(L.next),L=D=te),L=L.next}while(L!==D);return td(L)}function gI(D,d,L,W,te,le){let pe=D;do{let me=pe.next.next;for(;me!==pe.prev;){if(pe.i!==me.i&&wI(pe,me)){let Ce=K5(pe,me);return pe=td(pe,pe.next),Ce=td(Ce,Ce.next),Dd(pe,d,L,W,te,le,0),void Dd(Ce,d,L,W,te,le,0)}me=me.next}pe=pe.next}while(pe!==D)}function yI(D,d){let L=D.x-d.x;return L===0&&(L=D.y-d.y,L===0)&&(L=(D.next.y-D.y)/(D.next.x-D.x)-(d.next.y-d.y)/(d.next.x-d.x)),L}function _I(D,d){let L=function(te,le){let pe=le,me=te.x,Ce=te.y,we,ze=-1/0;if(ip(te,pe))return pe;do{if(ip(te,pe.next))return pe.next;if(Ce<=pe.y&&Ce>=pe.next.y&&pe.next.y!==pe.y){let Et=pe.x+(Ce-pe.y)*(pe.next.x-pe.x)/(pe.next.y-pe.y);if(Et<=me&&Et>ze&&(ze=Et,we=pe.x=pe.x&&pe.x>=nt&&me!==pe.x&&$5(Cewe.x||pe.x===we.x&&bI(we,pe)))&&(we=pe,bt=Et)}pe=pe.next}while(pe!==Pe);return we}(D,d);if(!L)return d;let W=K5(L,D);return td(W,W.next),td(L,L.next)}function bI(D,d){return Ou(D.prev,D,d.prev)<0&&Ou(d.next,D,D.next)<0}function a_(D,d,L,W,te){return(D=1431655765&((D=858993459&((D=252645135&((D=16711935&((D=(D-L)*te|0)|D<<8))|D<<4))|D<<2))|D<<1))|(d=1431655765&((d=858993459&((d=252645135&((d=16711935&((d=(d-W)*te|0)|d<<8))|d<<4))|d<<2))|d<<1))<<1}function xI(D){let d=D,L=D;do(d.x=(D-pe)*(le-me)&&(D-pe)*(W-me)>=(L-pe)*(d-me)&&(L-pe)*(le-me)>=(te-pe)*(W-me)}function d0(D,d,L,W,te,le,pe,me){return!(D===pe&&d===me)&&$5(D,d,L,W,te,le,pe,me)}function wI(D,d){return D.next.i!==d.i&&D.prev.i!==d.i&&!function(L,W){let te=L;do{if(te.i!==L.i&&te.next.i!==L.i&&te.i!==W.i&&te.next.i!==W.i&&Z5(te,te.next,L,W))return!0;te=te.next}while(te!==L);return!1}(D,d)&&(v0(D,d)&&v0(d,D)&&function(L,W){let te=L,le=!1,pe=(L.x+W.x)/2,me=(L.y+W.y)/2;do te.y>me!=te.next.y>me&&te.next.y!==te.y&&pe<(te.next.x-te.x)*(me-te.y)/(te.next.y-te.y)+te.x&&(le=!le),te=te.next;while(te!==L);return le}(D,d)&&(Ou(D.prev,D,d.prev)||Ou(D,d.prev,d))||ip(D,d)&&Ou(D.prev,D,D.next)>0&&Ou(d.prev,d,d.next)>0)}function Ou(D,d,L){return(d.y-D.y)*(L.x-d.x)-(d.x-D.x)*(L.y-d.y)}function ip(D,d){return D.x===d.x&&D.y===d.y}function Z5(D,d,L,W){let te=Hm(Ou(D,d,L)),le=Hm(Ou(D,d,W)),pe=Hm(Ou(L,W,D)),me=Hm(Ou(L,W,d));return te!==le&&pe!==me||!(te!==0||!Vm(D,L,d))||!(le!==0||!Vm(D,W,d))||!(pe!==0||!Vm(L,D,W))||!(me!==0||!Vm(L,d,W))}function Vm(D,d,L){return d.x<=Math.max(D.x,L.x)&&d.x>=Math.min(D.x,L.x)&&d.y<=Math.max(D.y,L.y)&&d.y>=Math.min(D.y,L.y)}function Hm(D){return D>0?1:D<0?-1:0}function v0(D,d){return Ou(D.prev,D,D.next)<0?Ou(D,d,D.next)>=0&&Ou(D,D.prev,d)>=0:Ou(D,d,D.prev)<0||Ou(D,D.next,d)<0}function K5(D,d){let L=i_(D.i,D.x,D.y),W=i_(d.i,d.x,d.y),te=D.next,le=d.prev;return D.next=d,d.prev=D,L.next=te,te.prev=L,W.next=L,L.prev=W,le.next=W,W.prev=le,W}function J5(D,d,L,W){let te=i_(D,d,L);return W?(te.next=W.next,te.prev=W,W.next.prev=te,W.next=te):(te.prev=te,te.next=te),te}function p0(D){D.next.prev=D.prev,D.prev.next=D.next,D.prevZ&&(D.prevZ.nextZ=D.nextZ),D.nextZ&&(D.nextZ.prevZ=D.prevZ)}function i_(D,d,L){return{i:D,x:d,y:L,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class op{constructor(d,L){if(L>d)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=d,this._minGranularity=L}getGranularityForZoomLevel(d){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||L>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let W=0|Math.round(d),te=0|Math.round(L),le=this._getKey(W,te);if(this._vertexDictionary.has(le))return this._vertexDictionary.get(le);let pe=this._vertexBuffer.length/2;return this._vertexDictionary.set(le,pe),this._vertexBuffer.push(W,te),pe}_subdivideTrianglesScanline(d){if(this._granularity<2)return function(te,le){let pe=[];for(let me=0;me0?(pe.push(Ce),pe.push(ze),pe.push(we)):(pe.push(Ce),pe.push(we),pe.push(ze))}return pe}(this._vertexBuffer,d);let L=[],W=d.length;for(let te=0;te=1||Xr<=0)||tr&&(wele)){Pe>=te&&Pe<=le&&pe.push(W[(me+1)%3]);continue}!tr&&Mr>0&&pe.push(this._vertexToIndex(Ce+bt*Mr,we+Et*Mr));let an=Ce+bt*Math.max(Mr,0),kn=Ce+bt*Math.min(Xr,1);er||this._generateIntraEdgeVertices(pe,Ce,we,ze,Pe,an,kn),!tr&&Xr<1&&pe.push(this._vertexToIndex(Ce+bt*Xr,we+Et*Xr)),(tr||Pe>=te&&Pe<=le)&&pe.push(W[(me+1)%3]),!tr&&(Pe<=te||Pe>=le)&&this._generateInterEdgeVertices(pe,Ce,we,ze,Pe,nt,Ve,kn,te,le)}return pe}_generateIntraEdgeVertices(d,L,W,te,le,pe,me){let Ce=te-L,we=le-W,ze=we===0,Pe=ze?Math.min(L,te):Math.min(pe,me),nt=ze?Math.max(L,te):Math.max(pe,me),Ve=Math.floor(Pe/this._granularityCellSize)+1,bt=Math.ceil(nt/this._granularityCellSize)-1;if(ze?L=Ve;Et--){let er=Et*this._granularityCellSize;d.push(this._vertexToIndex(er,W+we*(er-L)/Ce))}}_generateInterEdgeVertices(d,L,W,te,le,pe,me,Ce,we,ze){let Pe=le-W,nt=pe-te,Ve=me-le,bt=(we-le)/Ve,Et=(ze-le)/Ve,er=Math.min(bt,Et),tr=Math.max(bt,Et),xr=te+nt*er,lr=Math.floor(Math.min(xr,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(xr,Ce)/this._granularityCellSize)-1,Xr=Ce=1||tr<=0){let On=W-me,_a=pe+(L-pe)*Math.min((we-me)/On,(ze-me)/On);lr=Math.floor(Math.min(_a,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(_a,Ce)/this._granularityCellSize)-1,Xr=Ce<_a}let kn=Pe>0?ze:we;if(Xr)for(let On=lr;On<=Mr;On++)d.push(this._vertexToIndex(On*this._granularityCellSize,kn));else for(let On=Mr;On>=lr;On--)d.push(this._vertexToIndex(On*this._granularityCellSize,kn))}_generateOutline(d){let L=[];for(let W of d){let te=hv(W,this._granularity,!0),le=this._pointArrayToIndices(te),pe=[];for(let me=1;mele!=(pe===sp)?(d.push(L),d.push(W),d.push(this._vertexToIndex(te,pe)),d.push(W),d.push(this._vertexToIndex(le,pe)),d.push(this._vertexToIndex(te,pe))):(d.push(W),d.push(L),d.push(this._vertexToIndex(te,pe)),d.push(this._vertexToIndex(le,pe)),d.push(W),d.push(this._vertexToIndex(te,pe)))}_fillPoles(d,L,W){let te=this._vertexBuffer,le=F,pe=d.length;for(let me=2;me80*Pe){er=we[0],tr=we[1];let lr=er,Mr=tr;for(let Xr=Pe;Xrlr&&(lr=an),kn>Mr&&(Mr=kn)}xr=Math.max(lr-er,Mr-tr),xr=xr!==0?32767/xr:0}return Dd(bt,Et,Pe,er,tr,xr,0),Et}(W,te),Ce=this._convertIndices(W,me);le=this._subdivideTrianglesScanline(Ce)}catch(me){console.error(me)}let pe=[];return L&&(pe=this._generateOutline(d)),this._ensureNoPoleVertices(),this._handlePoles(le),{verticesFlattened:this._vertexBuffer,indicesTriangles:le,indicesLineList:pe}}_convertIndices(d,L){let W=[];for(let te of L)W.push(this._vertexToIndex(d[2*te],d[2*te+1]));return W}_pointArrayToIndices(d){let L=[];for(let W of d)L.push(this._vertexToIndex(W.x,W.y));return L}}function Q5(D,d,L,W=!0){return new TI(L,d).subdividePolygonInternal(D,W)}function hv(D,d,L=!1){if(!D||D.length<1)return[];if(D.length<2)return[];let W=D[0],te=D[D.length-1],le=L&&(W.x!==te.x||W.y!==te.y);if(d<2)return le?[...D,D[0]]:[...D];let pe=Math.floor(F/d),me=[];me.push(new t(D[0].x,D[0].y));let Ce=D.length,we=le?Ce:Ce-1;for(let ze=0;ze0?(Math.floor(kn/pe)+1)*pe:(Math.ceil(kn/pe)-1)*pe,Ba=Mr>0?(Math.floor(On/pe)+1)*pe:(Math.ceil(On/pe)-1)*pe,Za=Math.abs(kn-ta),Da=Math.abs(On-Ba),na=Math.abs(kn-Et),li=Math.abs(On-er),xi=tr?Za/Xr:Number.POSITIVE_INFINITY,ui=xr?Da/an:Number.POSITIVE_INFINITY;if((na<=Za||!tr)&&(li<=Da||!xr))break;if(xi=0?pe-1:le-1,we=(me+1)%le,ze=D[2*d[Ce]],Pe=D[2*d[we]],nt=D[2*d[pe]],Ve=D[2*d[pe]+1],bt=D[2*d[me]+1],Et=!1;if(zePe)Et=!1;else{let er=bt-Ve,tr=-(D[2*d[me]]-nt),xr=Ve((Pe-nt)*er+(D[2*d[we]+1]-Ve)*tr)*xr&&(Et=!0)}if(Et){let er=d[Ce],tr=d[pe],xr=d[me];er!==tr&&er!==xr&&tr!==xr&&L.push(xr,tr,er),pe--,pe<0&&(pe=le-1)}else{let er=d[we],tr=d[pe],xr=d[me];er!==tr&&er!==xr&&tr!==xr&&L.push(xr,tr,er),me++,me>=le&&(me=0)}if(Ce===we)break}}function eT(D,d,L,W,te,le,pe,me,Ce){let we=te.length/2,ze=pe&&me&&Ce;if(weXn.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(nt,Ve),lr=xr.count,ta=!0,Ba=!0,Za=!0,Xr=0);let Da=g0(tr,bt,er,xr,kn,ta,Mr),na=g0(tr,bt,er,xr,On,Ba,Mr),li=g0(tr,bt,er,xr,_a,Za,Mr);Ve.emplaceBack(Xr+Da-lr,Xr+na-lr,Xr+li-lr),Mr.primitiveLength++}})(d,L,W,te,le,D),ze&&function(Pe,nt,Ve,bt,Et,er){let tr=[];for(let an=0;anXn.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(nt,Ve),lr=xr.count,ta=!0,Ba=!0,Xr=0);let Za=g0(tr,bt,er,xr,On,ta,Mr),Da=g0(tr,bt,er,xr,_a,Ba,Mr);Ve.emplaceBack(Xr+Za-lr,Xr+Da-lr),Mr.primitiveLength++}}(pe,L,me,te,Ce,D),d.forceNewSegmentOnNextPrepare(),pe?.forceNewSegmentOnNextPrepare()}function g0(D,d,L,W,te,le,pe){if(le){let me=W.count;return L(d[2*te],d[2*te+1]),D[te]=W.count,W.count++,pe.vertexLength++,me}return D[te]}class o_{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new or,this.indexArray=new _n,this.indexArray2=new vn,this.programConfigurations=new Do(d.layers,d.zoom),this.segments=new Xn,this.segments2=new Xn,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.hasDependencies=jh("fill",this.layers,L);let te=this.layers[0].layout.get("fill-sort-key"),le=!te.isConstant(),pe=[];for(let{feature:me,id:Ce,index:we,sourceLayerIndex:ze}of d){let Pe=this.layers[0]._featureFilter.needGeometry,nt=Co(me,Pe);if(!this.layers[0]._featureFilter.filter(new Ti(this.zoom),nt,W))continue;let Ve=le?te.evaluate(nt,{},W,L.availableImages):void 0,bt={id:Ce,properties:me.properties,type:me.type,sourceLayerIndex:ze,index:we,geometry:Pe?nt.geometry:Hl(me),patterns:{},sortKey:Ve};pe.push(bt)}le&&pe.sort((me,Ce)=>me.sortKey-Ce.sortKey);for(let me of pe){let{geometry:Ce,index:we,sourceLayerIndex:ze}=me;if(this.hasDependencies){let Pe=np("fill",this.layers,me,{zoom:this.zoom},L);this.patternFeatures.push(Pe)}else this.addFeature(me,Ce,we,W,{},L.subdivisionGranularity);L.featureIndex.insert(d[we].feature,Ce,we,ze,this.index)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}addFeatures(d,L,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,L,W,d.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,rp),this.indexBuffer=d.createIndexBuffer(this.indexArray),this.indexBuffer2=d.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(d,L,W,te,le,pe){for(let me of Rc(L,500)){let Ce=Q5(me,te,pe.fill.getGranularityForZoomLevel(te.z)),we=this.layoutVertexArray;eT((ze,Pe)=>{we.emplaceBack(ze,Pe)},this.segments,this.layoutVertexArray,this.indexArray,Ce.verticesFlattened,Ce.indicesTriangles,this.segments2,this.indexArray2,Ce.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,W,{imagePositions:le,canonical:te})}}let tT,rT;Ci("FillBucket",o_,{omit:["layers","patternFeatures"]});var MI={get paint(){return rT=rT||new Bs({"fill-antialias":new Li(ht.paint_fill["fill-antialias"]),"fill-opacity":new Vi(ht.paint_fill["fill-opacity"]),"fill-color":new Vi(ht.paint_fill["fill-color"]),"fill-outline-color":new Vi(ht.paint_fill["fill-outline-color"]),"fill-translate":new Li(ht.paint_fill["fill-translate"]),"fill-translate-anchor":new Li(ht.paint_fill["fill-translate-anchor"]),"fill-pattern":new fl(ht.paint_fill["fill-pattern"])})},get layout(){return tT=tT||new Bs({"fill-sort-key":new Vi(ht.layout_fill["fill-sort-key"])})}};class SI extends hl{constructor(d,L){super(d,MI,L)}recalculate(d,L){super.recalculate(d,L);let W=this.paint._values["fill-outline-color"];W.value.kind==="constant"&&W.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(d){return new o_(d)}queryRadius(){return Oe(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:d,geometry:L,transform:W,pixelsToTileUnits:te}){return ao(Ke(d,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-W.bearingInRadians,te),L)}isTileClipped(){return!0}}let EI=ut([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),kI=ut([{name:"a_centroid",components:2,type:"Int16"}],4),{members:CI}=EI;class y0{constructor(d,L,W,te,le){this.properties={},this.extent=W,this.type=0,this.id=void 0,this._pbf=d,this._geometry=-1,this._keys=te,this._values=le,d.readFields(LI,this,L)}loadGeometry(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,W=[],te,le=1,pe=0,me=0,Ce=0;for(;d.pos>3}if(pe--,le===1||le===2)me+=d.readSVarint(),Ce+=d.readSVarint(),le===1&&(te&&W.push(te),te=[]),te&&te.push(new t(me,Ce));else{if(le!==7)throw new Error(`unknown command ${le}`);te&&te.push(te[0].clone())}}return te&&W.push(te),W}bbox(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,W=1,te=0,le=0,pe=0,me=1/0,Ce=-1/0,we=1/0,ze=-1/0;for(;d.pos>3}if(te--,W===1||W===2)le+=d.readSVarint(),pe+=d.readSVarint(),leCe&&(Ce=le),peze&&(ze=pe);else if(W!==7)throw new Error(`unknown command ${W}`)}return[me,we,Ce,ze]}toGeoJSON(d,L,W){let te=this.extent*Math.pow(2,W),le=this.extent*d,pe=this.extent*L,me=this.loadGeometry();function Ce(nt){return[360*(nt.x+le)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(nt.y+pe)/te)*Math.PI))-90]}function we(nt){return nt.map(Ce)}let ze;if(this.type===1){let nt=[];for(let bt of me)nt.push(bt[0]);let Ve=we(nt);ze=nt.length===1?{type:"Point",coordinates:Ve[0]}:{type:"MultiPoint",coordinates:Ve}}else if(this.type===2){let nt=me.map(we);ze=nt.length===1?{type:"LineString",coordinates:nt[0]}:{type:"MultiLineString",coordinates:nt}}else{if(this.type!==3)throw new Error("unknown feature type");{let nt=nT(me),Ve=[];for(let bt of nt)Ve.push(bt.map(we));ze=Ve.length===1?{type:"Polygon",coordinates:Ve[0]}:{type:"MultiPolygon",coordinates:Ve}}}let Pe={type:"Feature",geometry:ze,properties:this.properties};return this.id!=null&&(Pe.id=this.id),Pe}}function LI(D,d,L){D===1?d.id=L.readVarint():D===2?function(W,te){let le=W.readVarint()+W.pos;for(;W.pos=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[d];let L=this._pbf.readVarint()+this._pbf.pos;return new y0(this._pbf,L,this.extent,this._keys,this._values)}}function II(D,d,L){D===15?d.version=L.readVarint():D===1?d.name=L.readString():D===5?d.extent=L.readVarint():D===2?d._features.push(L.pos):D===3?d._keys.push(L.readString()):D===4&&d._values.push(function(W){let te=null,le=W.readVarint()+W.pos;for(;W.pos>3;te=pe===1?W.readString():pe===2?W.readFloat():pe===3?W.readDouble():pe===4?W.readVarint64():pe===5?W.readVarint():pe===6?W.readSVarint():pe===7?W.readBoolean():null}if(te==null)throw new Error("unknown feature value");return te}(L))}class aT{constructor(d,L){this.layers=d.readFields(RI,{},L)}}function RI(D,d,L){if(D===3){let W=new DI(L,L.readVarint()+L.pos);W.length&&(d[W.name]=W)}}let s_=Math.pow(2,13);function _0(D,d,L,W,te,le,pe,me){D.emplaceBack(d,L,2*Math.floor(W*s_)+pe,te*s_*2,le*s_*2,Math.round(me))}class l_{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new vr,this.centroidVertexArray=new Rt,this.indexArray=new _n,this.programConfigurations=new Do(d.layers,d.zoom),this.segments=new Xn,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.features=[],this.hasDependencies=jh("fill-extrusion",this.layers,L);for(let{feature:te,id:le,index:pe,sourceLayerIndex:me}of d){let Ce=this.layers[0]._featureFilter.needGeometry,we=Co(te,Ce);if(!this.layers[0]._featureFilter.filter(new Ti(this.zoom),we,W))continue;let ze={id:le,sourceLayerIndex:me,index:pe,geometry:Ce?we.geometry:Hl(te),properties:te.properties,type:te.type,patterns:{}};this.hasDependencies?this.features.push(np("fill-extrusion",this.layers,ze,{zoom:this.zoom},L)):this.addFeature(ze,ze.geometry,pe,W,{},L.subdivisionGranularity),L.featureIndex.insert(te,ze.geometry,pe,me,this.index,!0)}}addFeatures(d,L,W){for(let te of this.features){let{geometry:le}=te;this.addFeature(te,le,te.index,L,W,d.subdivisionGranularity)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,CI),this.centroidVertexBuffer=d.createVertexBuffer(this.centroidVertexArray,kI.members,!0),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(d,L,W,te,le,pe){for(let me of Rc(L,500)){let Ce={x:0,y:0,sampleCount:0},we=this.layoutVertexArray.length;this.processPolygon(Ce,te,d,me,pe);let ze=this.layoutVertexArray.length-we,Pe=Math.floor(Ce.x/Ce.sampleCount),nt=Math.floor(Ce.y/Ce.sampleCount);for(let Ve=0;Ve{_0(ze,Pe,nt,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,we.verticesFlattened,we.indicesTriangles)}_generateSideFaces(d,L){let W=0;for(let te=1;teXn.MAX_VERTEX_ARRAY_LENGTH&&(L.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let me=le.sub(pe)._perp()._unit(),Ce=pe.dist(le);W+Ce>32768&&(W=0),_0(this.layoutVertexArray,le.x,le.y,me.x,me.y,0,0,W),_0(this.layoutVertexArray,le.x,le.y,me.x,me.y,0,1,W),W+=Ce,_0(this.layoutVertexArray,pe.x,pe.y,me.x,me.y,0,0,W),_0(this.layoutVertexArray,pe.x,pe.y,me.x,me.y,0,1,W);let we=L.segment.vertexLength;this.indexArray.emplaceBack(we,we+2,we+1),this.indexArray.emplaceBack(we+1,we+2,we+3),L.segment.vertexLength+=4,L.segment.primitiveLength+=2}}}function FI(D,d){for(let L=0;LF)||D.y===d.y&&(D.y<0||D.y>F)}function iT(D){return D.every(d=>d.x<0)||D.every(d=>d.x>F)||D.every(d=>d.y<0)||D.every(d=>d.y>F)}let oT;Ci("FillExtrusionBucket",l_,{omit:["layers","features"]});var BI={get paint(){return oT=oT||new Bs({"fill-extrusion-opacity":new Li(ht["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Vi(ht["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Li(ht["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Li(ht["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new fl(ht["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Vi(ht["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Vi(ht["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Li(ht["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class NI extends hl{constructor(d,L){super(d,BI,L)}createBucket(d){return new l_(d)}queryRadius(){return Oe(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:W,geometry:te,transform:le,pixelsToTileUnits:pe,pixelPosMatrix:me}){let Ce=Ke(d,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-le.bearingInRadians,pe),we=this.paint.get("fill-extrusion-height").evaluate(L,W),ze=this.paint.get("fill-extrusion-base").evaluate(L,W),Pe=function(Ve,bt){let Et=[];for(let er of Ve){let tr=[er.x,er.y,0,1];z(tr,tr,bt),Et.push(new t(tr[0]/tr[3],tr[1]/tr[3]))}return Et}(Ce,me),nt=function(Ve,bt,Et,er){let tr=[],xr=[],lr=er[8]*bt,Mr=er[9]*bt,Xr=er[10]*bt,an=er[11]*bt,kn=er[8]*Et,On=er[9]*Et,_a=er[10]*Et,ta=er[11]*Et;for(let Ba of Ve){let Za=[],Da=[];for(let na of Ba){let li=na.x,xi=na.y,ui=er[0]*li+er[4]*xi+er[12],Ai=er[1]*li+er[5]*xi+er[13],Lo=er[2]*li+er[6]*xi+er[14],bs=er[3]*li+er[7]*xi+er[15],js=Lo+Xr,tl=bs+an,sf=ui+kn,vu=Ai+On,sc=Lo+_a,Ac=bs+ta,Yl=new t((ui+lr)/tl,(Ai+Mr)/tl);Yl.z=js/tl,Za.push(Yl);let Vc=new t(sf/Ac,vu/Ac);Vc.z=sc/Ac,Da.push(Vc)}tr.push(Za),xr.push(Da)}return[tr,xr]}(te,ze,we,me);return function(Ve,bt,Et){let er=1/0;ao(Et,bt)&&(er=sT(Et,bt[0]));for(let tr=0;tr>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let le=lT[15&W];if(!le)throw new Error("Unrecognized array type.");let[pe]=new Uint16Array(d,2,1),[me]=new Uint32Array(d,4,1);return new Wm(me,pe,le,d)}constructor(d,L=64,W=Float64Array,te){if(isNaN(d)||d<0)throw new Error(`Unpexpected numItems value: ${d}.`);this.numItems=+d,this.nodeSize=Math.min(Math.max(+L,2),65535),this.ArrayType=W,this.IndexArrayType=d<65536?Uint16Array:Uint32Array;let le=lT.indexOf(this.ArrayType),pe=2*d*this.ArrayType.BYTES_PER_ELEMENT,me=d*this.IndexArrayType.BYTES_PER_ELEMENT,Ce=(8-me%8)%8;if(le<0)throw new Error(`Unexpected typed array class: ${W}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+me+Ce,2*d),this._pos=2*d,this._finished=!0):(this.data=new ArrayBuffer(8+pe+me+Ce),this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+me+Ce,2*d),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+le]),new Uint16Array(this.data,2,1)[0]=L,new Uint32Array(this.data,4,1)[0]=d)}add(d,L){let W=this._pos>>1;return this.ids[W]=W,this.coords[this._pos++]=d,this.coords[this._pos++]=L,W}finish(){let d=this._pos>>1;if(d!==this.numItems)throw new Error(`Added ${d} items when expected ${this.numItems}.`);return u_(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(d,L,W,te){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:le,coords:pe,nodeSize:me}=this,Ce=[0,le.length-1,0],we=[];for(;Ce.length;){let ze=Ce.pop()||0,Pe=Ce.pop()||0,nt=Ce.pop()||0;if(Pe-nt<=me){for(let er=nt;er<=Pe;er++){let tr=pe[2*er],xr=pe[2*er+1];tr>=d&&tr<=W&&xr>=L&&xr<=te&&we.push(le[er])}continue}let Ve=nt+Pe>>1,bt=pe[2*Ve],Et=pe[2*Ve+1];bt>=d&&bt<=W&&Et>=L&&Et<=te&&we.push(le[Ve]),(ze===0?d<=bt:L<=Et)&&(Ce.push(nt),Ce.push(Ve-1),Ce.push(1-ze)),(ze===0?W>=bt:te>=Et)&&(Ce.push(Ve+1),Ce.push(Pe),Ce.push(1-ze))}return we}within(d,L,W){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:te,coords:le,nodeSize:pe}=this,me=[0,te.length-1,0],Ce=[],we=W*W;for(;me.length;){let ze=me.pop()||0,Pe=me.pop()||0,nt=me.pop()||0;if(Pe-nt<=pe){for(let er=nt;er<=Pe;er++)cT(le[2*er],le[2*er+1],d,L)<=we&&Ce.push(te[er]);continue}let Ve=nt+Pe>>1,bt=le[2*Ve],Et=le[2*Ve+1];cT(bt,Et,d,L)<=we&&Ce.push(te[Ve]),(ze===0?d-W<=bt:L-W<=Et)&&(me.push(nt),me.push(Ve-1),me.push(1-ze)),(ze===0?d+W>=bt:L+W>=Et)&&(me.push(Ve+1),me.push(Pe),me.push(1-ze))}return Ce}}function u_(D,d,L,W,te,le){if(te-W<=L)return;let pe=W+te>>1;uT(D,d,pe,W,te,le),u_(D,d,L,W,pe-1,1-le),u_(D,d,L,pe+1,te,1-le)}function uT(D,d,L,W,te,le){for(;te>W;){if(te-W>600){let we=te-W+1,ze=L-W+1,Pe=Math.log(we),nt=.5*Math.exp(2*Pe/3),Ve=.5*Math.sqrt(Pe*nt*(we-nt)/we)*(ze-we/2<0?-1:1);uT(D,d,L,Math.max(W,Math.floor(L-ze*nt/we+Ve)),Math.min(te,Math.floor(L+(we-ze)*nt/we+Ve)),le)}let pe=d[2*L+le],me=W,Ce=te;for(x0(D,d,W,L),d[2*te+le]>pe&&x0(D,d,W,te);mepe;)Ce--}d[2*W+le]===pe?x0(D,d,W,Ce):(Ce++,x0(D,d,Ce,te)),Ce<=L&&(W=Ce+1),L<=Ce&&(te=Ce-1)}}function x0(D,d,L,W){c_(D,L,W),c_(d,2*L,2*W),c_(d,2*L+1,2*W+1)}function c_(D,d,L){let W=D[d];D[d]=D[L],D[L]=W}function cT(D,d,L,W){let te=D-L,le=d-W;return te*te+le*le}function f_(D,d,L,W){let te=W,le=d+(L-d>>1),pe,me=L-d,Ce=D[d],we=D[d+1],ze=D[L],Pe=D[L+1];for(let nt=d+3;ntte)pe=nt,te=Ve;else if(Ve===te){let bt=Math.abs(nt-le);btW&&(pe-d>3&&f_(D,d,pe,W),D[pe+2]=te,L-pe>3&&f_(D,pe,L,W))}function OI(D,d,L,W,te,le){let pe=te-L,me=le-W;if(pe!==0||me!==0){let Ce=((D-L)*pe+(d-W)*me)/(pe*pe+me*me);Ce>1?(L=te,W=le):Ce>0&&(L+=pe*Ce,W+=me*Ce)}return pe=D-L,me=d-W,pe*pe+me*me}function qc(D,d,L,W){let te={type:d,geom:L},le={id:D??null,type:te.type,geometry:te.geom,tags:W,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(te.type){case"Point":case"MultiPoint":w0(le,te.geom);break;case"LineString":w0(le,te.geom.points);break;case"Polygon":w0(le,te.geom[0].points);break;case"MultiLineString":for(let pe of te.geom)w0(le,pe.points);break;case"MultiPolygon":for(let pe of te.geom)w0(le,pe[0].points)}return le}function h_(D){D.points.length>64&&(D.points=new Float64Array(D.points))}function w0(D,d){for(let L=0;L0&&(pe+=W?(te*ze-we*le)/2:Math.sqrt(Math.pow(we-te,2)+Math.pow(ze-le,2))),te=we,le=ze}let me=d.points.length-3;d.points[2]=1,L>0&&f_(d.points,0,me,L),d.points[me+2]=1,h_(d),d.size=Math.abs(pe),d.start=0,d.end=d.size}function p_(D,d,L,W){for(let te=0;te1?1:L}function Xm(D){let d={type:"Feature",geometry:jI(D),properties:D.tags};return D.id!=null&&(d.id=D.id),d}function jI(D){let{type:d,geometry:L}=D;switch(d){case"Point":return{type:d,coordinates:fT(L[0],L[1])};case"MultiPoint":return{type:d,coordinates:$m(L)};case"LineString":return{type:d,coordinates:$m(L.points)};case"MultiLineString":case"Polygon":return{type:d,coordinates:L.map(W=>$m(W.points))};case"MultiPolygon":return{type:d,coordinates:L.map(W=>W.map(te=>$m(te.points)))}}}function $m(D){let d=[];for(let L=0;L=(L/=d)&&pe=W)return null;let Ce=[];for(let we of D){let ze=te===_f.X?we.minX:we.minY,Pe=te===_f.X?we.maxX:we.maxY;if(ze>=L&&Pe=W))switch(we.type){case"Point":case"MultiPoint":UI(we,Ce,L,W,te);continue;case"LineString":qI(we,Ce,L,W,te,me);continue;case"MultiLineString":VI(we,Ce,L,W,te);continue;case"Polygon":HI(we,Ce,L,W,te);continue;case"MultiPolygon":GI(we,Ce,L,W,te);continue}}return Ce.length?Ce:null}function UI(D,d,L,W,te){let le=[];(function(pe,me,Ce,we,ze){for(let Pe=0;Pe=Ce&&nt<=we&&cp(me,pe[Pe],pe[Pe+1],pe[Pe+2])}})(D.geometry,le,L,W,te),le.length&&d.push(qc(D.id,le.length===3?"Point":"MultiPoint",le,D.tags))}function qI(D,d,L,W,te,le){let pe=[];if(vT(D.geometry,pe,L,W,te,!1,le.lineMetrics),pe.length)if(le.lineMetrics)for(let me of pe)d.push(qc(D.id,"LineString",me,D.tags));else d.push(pe.length>1?qc(D.id,"MultiLineString",pe,D.tags):qc(D.id,"LineString",pe[0],D.tags))}function VI(D,d,L,W,te){let le=[];m_(D.geometry,le,L,W,te,!1),le.length&&d.push(le.length!==1?qc(D.id,"MultiLineString",le,D.tags):qc(D.id,"LineString",le[0],D.tags))}function HI(D,d,L,W,te){let le=[];m_(D.geometry,le,L,W,te,!0),le.length&&d.push(qc(D.id,"Polygon",le,D.tags))}function GI(D,d,L,W,te){let le=[];for(let pe of D.geometry){let me=[];m_(pe,me,L,W,te,!0),me.length&&le.push(me)}le.length&&d.push(qc(D.id,"MultiPolygon",le,D.tags))}function vT(D,d,L,W,te,le,pe){let me=pT(D),Ce=te===_f.X?WI:YI,we,ze,Pe=D.start;for(let er=0;erL&&(ze=Ce(me,tr,xr,Mr,Xr,L),pe&&(me.start=Pe+we*ze)):an>W?kn=L&&(ze=Ce(me,tr,xr,Mr,Xr,L),On=!0),kn>W&&an<=W&&(ze=Ce(me,tr,xr,Mr,Xr,W),On=!0),!le&&On&&(pe&&(me.end=Pe+we*ze),d.push(me),me=pT(D)),pe&&(Pe+=we)}let nt=D.points.length-3,Ve=D.points[nt],bt=D.points[nt+1],Et=te===_f.X?Ve:bt;Et>=L&&Et<=W&&cp(me.points,Ve,bt,D.points[nt+2]),nt=me.points.length-3,le&&nt>=3&&(me.points[nt]!==me.points[0]||me.points[nt+1]!==me.points[1])&&cp(me.points,me.points[0],me.points[1],me.points[2]),me.points.length&&(h_(me),d.push(me))}function pT(D){return{points:[],size:D.size,start:D.start,end:D.end}}function m_(D,d,L,W,te,le){for(let pe of D)vT(pe,d,L,W,te,le,!1)}function cp(D,d,L,W){D.push(d,L,W)}function WI(D,d,L,W,te,le){let pe=(le-d)/(W-d);return cp(D.points,le,L+(te-L)*pe,1),pe}function YI(D,d,L,W,te,le){let pe=(le-L)/(te-L);return cp(D.points,d+(W-d)*pe,le,1),pe}function g_(D,d){let L=d.buffer/d.extent,W=D,te=rd(D,1,-1-L,L,_f.X,-1,2,d),le=rd(D,1,1-L,2+L,_f.X,-1,2,d);return(te||le)&&(W=rd(D,1,-L,1+L,_f.X,-1,2,d)||[],te&&(W=mT(te,1).concat(W)),le&&(W=W.concat(mT(le,-1)))),W}function mT(D,d){let L=[];for(let W of D)switch(W.type){case"Point":case"MultiPoint":{let te=XI(W.geometry,d);L.push(qc(W.id,W.type,te,W.tags));continue}case"LineString":{let te=y_(W.geometry,d);L.push(qc(W.id,W.type,te,W.tags));continue}case"MultiLineString":case"Polygon":{let te=[];for(let le of W.geometry)te.push(y_(le,d));L.push(qc(W.id,W.type,te,W.tags));continue}case"MultiPolygon":{let te=[];for(let le of W.geometry){let pe=[];for(let me of le)pe.push(y_(me,d));te.push(pe)}L.push(qc(W.id,W.type,te,W.tags));continue}}return L}function XI(D,d){let L=[];for(let W=0;W0||((te=d.addOrUpdateProperties)==null?void 0:te.length)>0;if(le){let me=D[0],Ce=d_({type:"FeatureCollection",features:[{type:"Feature",id:me.id,geometry:d.newGeometry,properties:pe?gT(me.tags,d):me.tags}]},L);return Ce=g_(Ce,L),Ce}if(pe){let me=[];for(let Ce of D){let we=Nr({},Ce);we.tags=gT(we.tags,d),me.push(we)}return me}return D}function gT(D,d){if(d.removeAllProperties)return{};let L=Nr({},D||{});if(d.removeProperties)for(let W of d.removeProperties)delete L[W];if(d.addOrUpdateProperties)for(let{key:W,value:te}of d.addOrUpdateProperties)L[W]=te;return L}(function(D){D[D.X=0]="X",D[D.Y=1]="Y"})(_f||(_f={}));let __={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:D=>D};class ZI{constructor(d){this.options=Object.assign(Object.create(__),d),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(d){let L=[];for(let W of d){if(!W.geometry)continue;let[te,le]=W.geometry.coordinates,[pe,me]=[lp(te),up(le)];L.push({id:W.id,type:"Point",geometry:[pe,me],tags:W.properties})}this.createIndex(L)}initialize(d){let L=[];for(let W of d)W.type==="Point"&&L.push(W);this.createIndex(L)}updateIndex(d,L,W){this.options=Object.assign(Object.create(__),W.clusterOptions),this.initialize(d)}createIndex(d){let{log:L,minZoom:W,maxZoom:te}=this.options;L&&console.time("total time");let le=`prepare ${d.length} points`;L&&console.time(le),this.points=d;let pe=[];for(let Ce=0;Ce=W;Ce--){let we=Date.now();me=this.trees[Ce]=this.createTree(this.cluster(me,Ce)),L&&console.log("z%d: %d clusters in %dms",Ce,me.numItems,Date.now()-we)}L&&console.timeEnd("total time")}getClusters(d,L){return this.getClustersInternal(d,L).map(W=>Xm(W))}getClustersInternal(d,L){let W=((d[0]+180)%360+360)%360-180,te=Math.max(-90,Math.min(90,d[1])),le=d[2]===180?180:((d[2]+180)%360+360)%360-180,pe=Math.max(-90,Math.min(90,d[3]));if(d[2]-d[0]>=360)W=-180,le=180;else if(W>le){let Pe=this.getClustersInternal([W,te,180,pe],L),nt=this.getClustersInternal([-180,te,le,pe],L);return Pe.concat(nt)}let me=this.trees[this.limitZoom(L)],Ce=me.range(lp(W),up(pe),lp(le),up(te)),we=me.flatData,ze=[];for(let Pe of Ce){let nt=this.stride*Pe;ze.push(we[nt+5]>1?KI(we,nt,this.clusterProps):this.points[we[nt+3]])}return ze}getChildren(d){let L=this.getOriginId(d),W=this.getOriginZoom(d),te=new Error("No cluster with the specified id: "+d),le=this.trees[W];if(!le)throw te;let pe=le.flatData;if(L*this.stride>=pe.length)throw te;let me=this.options.radius/(this.options.extent*Math.pow(2,W-1)),Ce=le.within(pe[L*this.stride],pe[L*this.stride+1],me),we=[];for(let ze of Ce){let Pe=ze*this.stride;pe[Pe+4]===d&&we.push(pe[Pe+5]>1?JI(pe,Pe,this.clusterProps):Xm(this.points[pe[Pe+3]]))}if(we.length===0)throw te;return we}getLeaves(d,L,W){let te=[];return this.appendLeaves(te,d,L=L||10,W=W||0,0),te}getTile(d,L,W){let te=this.trees[this.limitZoom(d)];if(!te)return null;let le=Math.pow(2,d),{extent:pe,radius:me}=this.options,Ce=me/pe,we=(W-Ce)/le,ze=(W+1+Ce)/le,Pe={transformed:!0,features:[],source:null,x:L,y:W,z:d};return this.addTileFeatures(te.range((L-Ce)/le,we,(L+1+Ce)/le,ze),te.flatData,L,W,le,Pe),L===0&&this.addTileFeatures(te.range(1-Ce/le,we,1,ze),te.flatData,le,W,le,Pe),L===le-1&&this.addTileFeatures(te.range(0,we,Ce/le,ze),te.flatData,-1,W,le,Pe),Pe}getClusterExpansionZoom(d){return this.getOriginZoom(d)}appendLeaves(d,L,W,te,le){let pe=this.getChildren(L);for(let me of pe){let Ce=me.properties;if(Ce?.cluster?le+Ce.point_count<=te?le+=Ce.point_count:le=this.appendLeaves(d,Ce.cluster_id,W,te,le):le1,ze,Pe,nt;if(we)ze=b_(L,Ce,this.clusterProps),Pe=L[Ce],nt=L[Ce+1];else{let Et=this.points[L[Ce+3]];ze=Et.tags,[Pe,nt]=Et.geometry}let Ve={type:1,geometry:[[Math.round(this.options.extent*(Pe*le-W)),Math.round(this.options.extent*(nt*le-te))]],tags:ze},bt;bt=we||this.options.generateId?L[Ce+3]:this.points[L[Ce+3]].id,bt!==void 0&&(Ve.id=bt),pe.features.push(Ve)}}limitZoom(d){return Math.max(this.options.minZoom,Math.min(Math.floor(+d),this.options.maxZoom+1))}cluster(d,L){let{radius:W,extent:te,reduce:le,minPoints:pe}=this.options,me=W/(te*Math.pow(2,L)),Ce=d.flatData,we=[],ze=this.stride;for(let Pe=0;PeL&&(er+=Ce[xr+5])}if(er>Et&&er>=pe){let tr,xr=nt*Et,lr=Ve*Et,Mr=-1,Xr=(Pe/ze<<5)+(L+1)+this.points.length;for(let an of bt){let kn=an*ze;if(Ce[kn+2]<=L)continue;Ce[kn+2]=L;let On=Ce[kn+5];xr+=Ce[kn]*On,lr+=Ce[kn+1]*On,Ce[kn+4]=Xr,le&&(tr||(tr=this.map(Ce,Pe,!0),Mr=this.clusterProps.length,this.clusterProps.push(tr)),le(tr,this.map(Ce,kn)))}Ce[Pe+4]=Xr,we.push(xr/er,lr/er,1/0,Xr,-1,er),le&&we.push(Mr)}else{for(let tr=0;tr1)for(let tr of bt){let xr=tr*ze;if(!(Ce[xr+2]<=L)){Ce[xr+2]=L;for(let lr=0;lr>5}getOriginZoom(d){return(d-this.points.length)%32}map(d,L,W){if(d[L+5]>1){let pe=this.clusterProps[d[L+6]];return W?Object.assign({},pe):pe}let te=this.points[d[L+3]].tags,le=this.options.map(te);return W&&le===te?Object.assign({},le):le}}function KI(D,d,L){return{id:D[d+3],type:"Point",tags:b_(D,d,L),geometry:[D[d],D[d+1]]}}function JI(D,d,L){return{type:"Feature",id:D[d+3],properties:b_(D,d,L),geometry:{type:"Point",coordinates:[hT(D[d]),dT(D[d+1])]}}}function b_(D,d,L){let W=D[d+5],te=W>=1e4?`${Math.round(W/1e3)}k`:W>=1e3?Math.round(W/100)/10+"k":W,le=D[d+6],pe=le===-1?{}:Object.assign({},L[le]);return Object.assign(pe,{cluster:!0,cluster_id:D[d+3],point_count:W,point_count_abbreviated:te})}let x_="geojsonvt_clip_start",w_="geojsonvt_clip_end";function yT(D,d,L,W,te){let le=d===te.maxZoom?0:te.tolerance/((1<0&&d.size<(te?pe:W))return void(L.numPoints+=d.points.length/3);let me=[];for(let Ce=0;Cepe)&&(L.numSimplified++,me.push(d.points[Ce],d.points[Ce+1])),L.numPoints++;te&&function(Ce,we){let ze=0;for(let Pe=0,nt=Ce.length,Ve=nt-2;Pe0===we)for(let Pe=0,nt=Ce.length;Pe1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(L),W.debug>1&&console.timeEnd("invalidating");let[te,le,pe]=[0,0,0],me=yT(d,te,le,pe,W);me.source=d;let Ce=Zm(te,le,pe);if(this.tiles[Ce]=me,this.tileCoords.push({z:te,x:le,y:pe,id:Ce}),W.debug){let we=`z${te}`;this.stats[we]=(this.stats[we]||0)+1,this.total++}}getClusterExpansionZoom(d){return null}getChildren(d){return null}getLeaves(d,L,W){return null}getTile(d,L,W){let{extent:te,debug:le}=this.options,pe=1<1&&console.log("drilling down to z%d-%d-%d",d,L,W);let Ce,we=d,ze=L,Pe=W;for(;!Ce&&we>0;)we--,ze>>=1,Pe>>=1,Ce=this.tiles[Zm(we,ze,Pe)];return Ce?.source?(le>1&&(console.log("found parent tile z%d-%d-%d",we,ze,Pe),console.time("drilling down")),this.splitTile(Ce.source,we,ze,Pe,d,L,W),le>1&&console.timeEnd("drilling down"),this.tiles[me]?_T(this.tiles[me],te):null):null}splitTile(d,L,W,te,le,pe,me){let Ce=[d,L,W,te],we=this.options,ze=we.debug;for(;Ce.length;){te=Ce.pop(),W=Ce.pop(),L=Ce.pop(),d=Ce.pop();let Pe=1<1&&console.time("creation"),Ve=this.tiles[nt]=yT(d,L,W,te,we),this.tileCoords.push({z:L,x:W,y:te,id:nt}),ze)){ze>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",L,W,te,Ve.numFeatures,Ve.numPoints,Ve.numSimplified),console.timeEnd("creation"));let On=`z${L}`;this.stats[On]=(this.stats[On]||0)+1,this.total++}if(Ve.source=d,le==null){if(L===we.indexMaxZoom||Ve.numPoints<=we.indexMaxPoints)continue}else{if(L===we.maxZoom||L===le)continue;if(le!=null){let On=le-L;if(W!==pe>>On||te!==me>>On)continue}}if(Ve.source=null,!d.length)continue;ze>1&&console.time("clipping");let bt=.5*we.buffer/we.extent,Et=.5-bt,er=.5+bt,tr=1+bt,xr=null,lr=null,Mr=null,Xr=null,an=rd(d,Pe,W-bt,W+er,_f.X,Ve.minX,Ve.maxX,we),kn=rd(d,Pe,W+Et,W+tr,_f.X,Ve.minX,Ve.maxX,we);an&&(xr=rd(an,Pe,te-bt,te+er,_f.Y,Ve.minY,Ve.maxY,we),lr=rd(an,Pe,te+Et,te+tr,_f.Y,Ve.minY,Ve.maxY,we)),kn&&(Mr=rd(kn,Pe,te-bt,te+er,_f.Y,Ve.minY,Ve.maxY,we),Xr=rd(kn,Pe,te+Et,te+tr,_f.Y,Ve.minY,Ve.maxY,we)),ze>1&&console.timeEnd("clipping"),Ce.push(xr||[],L+1,2*W,2*te),Ce.push(lr||[],L+1,2*W,2*te+1),Ce.push(Mr||[],L+1,2*W+1,2*te),Ce.push(Xr||[],L+1,2*W+1,2*te+1)}}invalidateTiles(d){if(!d.length)return;let L=this.options,{debug:W}=L,te=1/0,le=-1/0,pe=1/0,me=-1/0;for(let ze of d)te=Math.min(te,ze.minX),le=Math.max(le,ze.maxX),pe=Math.min(pe,ze.minY),me=Math.max(me,ze.maxY);let Ce=L.buffer/L.extent,we=new Set;for(let ze in this.tiles){let Pe=this.tiles[ze],nt=1<=bt||me=er)continue;let tr=!1;for(let xr of d)if(xr.maxX>=Ve&&xr.minX=Et&&xr.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Pe.z,Pe.x,Pe.y,Pe.numFeatures,Pe.numPoints,Pe.numSimplified);let xr=`z${Pe.z}`;this.stats[xr]=(this.stats[xr]||0)-1,this.total--}delete this.tiles[ze],we.add(ze)}}we.size&&(this.tileCoords=this.tileCoords.filter(ze=>!we.has(ze.id)))}}function Zm(D,d,L){return 32*((1<L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let L of this.layers)this.gradients[L.id]={};this.layoutVertexArray=new Ar,this.layoutVertexArray2=new dr,this.indexArray=new _n,this.programConfigurations=new Do(d.layers,d.zoom),this.segments=new Xn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.hasDependencies=jh("line",this.layers,L)||this.hasLineDasharray(this.layers);let te=this.layers[0].layout.get("line-sort-key"),le=!te.isConstant(),pe=[];for(let{feature:me,id:Ce,index:we,sourceLayerIndex:ze}of d){let Pe=this.layers[0]._featureFilter.needGeometry,nt=Co(me,Pe);if(!this.layers[0]._featureFilter.filter(new Ti(this.zoom),nt,W))continue;let Ve=le?te.evaluate(nt,{},W):void 0,bt={id:Ce,properties:me.properties,type:me.type,sourceLayerIndex:ze,index:we,geometry:Pe?nt.geometry:Hl(me),patterns:{},dashes:{},sortKey:Ve};pe.push(bt)}le&&pe.sort((me,Ce)=>me.sortKey-Ce.sortKey);for(let me of pe){let{geometry:Ce,index:we,sourceLayerIndex:ze}=me;this.hasDependencies?(jh("line",this.layers,L)?np("line",this.layers,me,{zoom:this.zoom},L):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,me,this.zoom,L),this.patternFeatures.push(me)):this.addFeature(me,Ce,we,W,{},{},L.subdivisionGranularity),L.featureIndex.insert(d[we].feature,Ce,we,ze,this.index)}}update(d,L,W,te){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W,dashPositions:te})}addFeatures(d,L,W,te){for(let le of this.patternFeatures)this.addFeature(le,le.geometry,le.index,L,W,te,d.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=d.createVertexBuffer(this.layoutVertexArray2,sR)),this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,iR),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(d){if(d.properties&&Object.hasOwn(d.properties,x_)&&Object.hasOwn(d.properties,w_))return{start:+d.properties[x_],end:+d.properties[w_]}}addFeature(d,L,W,te,le,pe,me){let Ce=this.layers[0].layout,we=Ce.get("line-join").evaluate(d,{}),ze=Ce.get("line-cap").evaluate(d,{}),Pe=Ce.get("line-miter-limit").evaluate(d,{}),nt=Ce.get("line-round-limit").evaluate(d,{});this.lineClips=this.lineFeatureClips(d);for(let Ve of L)this.addLine(Ve,d,we,ze,Pe,nt,te,me);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,W,{imagePositions:le,dashPositions:pe,canonical:te})}addLine(d,L,W,te,le,pe,me,Ce){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,d=hv(d,me?Ce.line.getGranularityForZoomLevel(me.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let lr=0;lr=2&&d[ze-1].equals(d[ze-2]);)ze--;let Pe=0;for(;Pe0;if(_a&&lr>Pe){let Da=bt.dist(Et);if(Da>2*nt){let na=bt.sub(bt.sub(Et)._mult(nt/Da)._round());this.updateDistance(Et,na),this.addCurrentVertex(na,tr,0,0,Ve),Et=na}}let Ba=Et&&er,Za=Ba?W:we?"butt":te;if(Ba&&Za==="round"&&(knle&&(Za="bevel"),Za==="bevel"&&(kn>2&&(Za="flipbevel"),kn100)Mr=xr.mult(-1);else{let Da=kn*tr.add(xr).mag()/tr.sub(xr).mag();Mr._perp()._mult(Da*(ta?-1:1))}this.addCurrentVertex(bt,Mr,0,0,Ve),this.addCurrentVertex(bt,Mr.mult(-1),0,0,Ve)}else if(Za==="bevel"||Za==="fakeround"){let Da=-Math.sqrt(kn*kn-1),na=ta?Da:0,li=ta?0:Da;if(Et&&this.addCurrentVertex(bt,tr,na,li,Ve),Za==="fakeround"){let xi=Math.round(180*On/Math.PI/20);for(let ui=1;ui2*nt){let na=bt.add(er.sub(bt)._mult(nt/Da)._round());this.updateDistance(bt,na),this.addCurrentVertex(na,xr,0,0,Ve),bt=na}}}}addCurrentVertex(d,L,W,te,le,pe=!1){let me=L.y*te-L.x,Ce=-L.y-L.x*te;this.addHalfVertex(d,L.x+L.y*W,L.y-L.x*W,pe,!1,W,le),this.addHalfVertex(d,me,Ce,pe,!0,-te,le),this.distance>xT/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(d,L,W,te,le,pe))}addHalfVertex({x:d,y:L},W,te,le,pe,me,Ce){let we=.5*(this.lineClips?this.scaledDistance*(xT-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((d<<1)+(le?1:0),(L<<1)+(pe?1:0),Math.round(63*W)+128,Math.round(63*te)+128,1+(me===0?0:me<0?-1:1)|(63&we)<<2,we>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let ze=Ce.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,ze,this.e2),Ce.primitiveLength++),pe?this.e2=ze:this.e1=ze}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(d,L){this.distance+=d.dist(L),this.updateScaledDistance()}hasLineDasharray(d){for(let L of d){let W=L.paint.get("line-dasharray");if(W&&!W.isConstant())return!0}return!1}addLineDashDependencies(d,L,W,te){for(let le of d){let pe=le.paint.get("line-dasharray");if(!pe||pe.value.kind==="constant")continue;let me=le.layout.get("line-cap").evaluate(L,{})==="round",Ce={dasharray:pe.value.evaluate({zoom:W-1},L,{}),round:me},we={dasharray:pe.value.evaluate({zoom:W},L,{}),round:me},ze={dasharray:pe.value.evaluate({zoom:W+1},L,{}),round:me},Pe=`${Ce.dasharray.join(",")},${Ce.round}`,nt=`${we.dasharray.join(",")},${we.round}`,Ve=`${ze.dasharray.join(",")},${ze.round}`;te.dashDependencies[Pe]=Ce,te.dashDependencies[nt]=we,te.dashDependencies[Ve]=ze,L.dashes[le.id]={min:Pe,mid:nt,max:Ve}}}}let wT,TT;Ci("LineBucket",A_,{omit:["layers","patternFeatures"]});var AT={get paint(){return TT=TT||new Bs({"line-opacity":new Vi(ht.paint_line["line-opacity"]),"line-color":new Vi(ht.paint_line["line-color"]),"line-translate":new Li(ht.paint_line["line-translate"]),"line-translate-anchor":new Li(ht.paint_line["line-translate-anchor"]),"line-width":new Vi(ht.paint_line["line-width"]),"line-gap-width":new Vi(ht.paint_line["line-gap-width"]),"line-offset":new Vi(ht.paint_line["line-offset"]),"line-blur":new Vi(ht.paint_line["line-blur"]),"line-dasharray":new fl(ht.paint_line["line-dasharray"]),"line-pattern":new fl(ht.paint_line["line-pattern"]),"line-gradient":new tu(ht.paint_line["line-gradient"])})},get layout(){return wT=wT||new Bs({"line-cap":new Vi(ht.layout_line["line-cap"]),"line-join":new Vi(ht.layout_line["line-join"]),"line-miter-limit":new Vi(ht.layout_line["line-miter-limit"]),"line-round-limit":new Vi(ht.layout_line["line-round-limit"]),"line-sort-key":new Vi(ht.layout_line["line-sort-key"])})}};class uR extends Vi{possiblyEvaluate(d,L){return L=new Ti(Math.floor(L.zoom),{now:L.now,fadeDuration:L.fadeDuration,zoomHistory:L.zoomHistory,transition:L.transition}),super.possiblyEvaluate(d,L)}evaluate(d,L,W,te){return L=X({},L,{zoom:Math.floor(L.zoom)}),super.evaluate(d,L,W,te)}}let Km;class cR extends hl{constructor(d,L){super(d,AT,L),this.gradientVersion=0,Km||(Km=new uR(AT.paint.properties["line-width"].specification),Km.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(d){if(d==="line-gradient"){let L=this.gradientExpression();this.stepInterpolant=!!function(W){return W._styleExpression!==void 0}(L)&&L._styleExpression.expression instanceof Is,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(d,L){super.recalculate(d,L),this.paint._values["line-floorwidth"]=Km.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,d)}createBucket(d){return new A_(d)}queryRadius(d){let L=d,W=MT(Le("line-width",this,L),Le("line-gap-width",this,L)),te=Le("line-offset",this,L);return W/2+Math.abs(te)+Oe(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:W,geometry:te,transform:le,pixelsToTileUnits:pe}){let me=Ke(d,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-le.bearingInRadians,pe),Ce=pe/2*MT(this.paint.get("line-width").evaluate(L,W),this.paint.get("line-gap-width").evaluate(L,W)),we=this.paint.get("line-offset").evaluate(L,W);return we&&(te=function(ze,Pe){let nt=[];for(let Ve of ze){let bt=yt(Ve),Et=[];for(let er=0;er=3){for(let bt of Ve)if(sa(ze,bt))return!0}if(ds(ze,Ve,nt))return!0}return!1}(me,te,Ce)}isTileClipped(){return!0}}function MT(D,d){return d>0?d+2*D:D}let fR=ut([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),hR=ut([{name:"a_projected_pos",components:3,type:"Float32"}],4);ut([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let dR=ut([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ut([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let ST=ut([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),vR=ut([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function pR(D,d,L){let W=d.layout.get("text-transform").evaluate(L,{});return W==="uppercase"?D=D.toLocaleUpperCase():W==="lowercase"&&(D=D.toLocaleLowerCase()),Yi.applyArabicShaping&&(D=Yi.applyArabicShaping(D)),D}function mR(D,d,L){for(let W of D.sections)W.text=pR(W.text,d,L);return D}ut([{name:"triangle",components:3,type:"Uint16"}]),ut([{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"}]),ut([{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"}]),ut([{type:"Float32",name:"offsetX"}]),ut([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ut([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var wc=24;let T0={"!":"\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"},gR={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},yR={40:!0};function ET(D,d,L,W,te,le){if("fontStack"in d){let pe=L[d.fontStack],me=pe?.[D];return me?me.metrics.advance*d.scale+te:0}{let pe=W[d.imageName];return pe?pe.displaySize[0]*d.scale*wc/le+te:0}}function kT(D,d,L,W){let te=Math.pow(D-d,2);return W?DMath.max(d,this.sections[L].scale),0)}getMaxImageSize(d){let L=0,W=0;for(let te=0;teW))}addImageSection(d){let L=d.image?d.image.name:"";if(L.length===0)return void ee("Can't add FormattedSection with an empty image.");let W=this.getNextImageSectionCharCode();W?(this.text+=String.fromCharCode(W),this.sections.push({scale:1,verticalAlign:d.verticalAlign||"bottom",imageName:L}),this.sectionIndex.push(this.sections.length-1)):ee("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(d,L,W,te,le){let pe=[],me=this.determineAverageLineWidth(d,L,W,te,le),Ce=this.hasZeroWidthSpaces(),we=0,ze=0,Pe=this.text[Symbol.iterator](),nt=Pe.next(),Ve=this.text[Symbol.iterator]();Ve.next();let bt=Ve.next(),Et=this.text[Symbol.iterator]();Et.next(),Et.next();let er=Et.next();for(;!nt.done;){let tr=this.getSection(ze),xr=nt.value.codePointAt(0);if(Dr(xr)||(we+=ET(xr,tr,W,te,d,le)),!bt.done){let lr=Bt(xr),Mr=bt.value.codePointAt(0);(gR[xr]||lr||"imageName"in tr||!er.done&&yR[Mr])&&pe.push(CT(ze+1,we,me,pe,_R(xr,Mr,lr&&Ce),!1))}ze++,nt=Pe.next(),bt=Ve.next(),er=Et.next()}return LT(CT(this.length(),we,me,pe,0,!0))}determineAverageLineWidth(d,L,W,te,le){let pe=0,me=0;for(let Ce of this.text){let we=this.getSection(me);pe+=ET(Ce.codePointAt(0),we,W,te,d,le),me++}return pe/Math.max(1,Math.ceil(pe/L))}}let M_=4294967296,PT=1/M_,DT=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class Jm{constructor(d=new Uint8Array(16)){this.buf=ArrayBuffer.isView(d)?d:new Uint8Array(d),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(d,L,W=this.length){for(;this.pos>3,pe=this.pos;this.type=7&te,d(le,L,this),this.pos===pe&&this.skip(te)}return L}readMessage(d,L){return this.readFields(d,L,this.readVarint()+this.pos)}readFixed32(){let d=this.dataView.getUint32(this.pos,!0);return this.pos+=4,d}readSFixed32(){let d=this.dataView.getInt32(this.pos,!0);return this.pos+=4,d}readFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*M_;return this.pos+=8,d}readSFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*M_;return this.pos+=8,d}readFloat(){let d=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,d}readDouble(){let d=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,d}readVarint(d){let L=this.buf,W,te;return te=L[this.pos++],W=127&te,te<128?W:(te=L[this.pos++],W|=(127&te)<<7,te<128?W:(te=L[this.pos++],W|=(127&te)<<14,te<128?W:(te=L[this.pos++],W|=(127&te)<<21,te<128?W:(te=L[this.pos],W|=(15&te)<<28,function(le,pe,me){let Ce=me.buf,we,ze;if(ze=Ce[me.pos++],we=(112&ze)>>4,ze<128||(ze=Ce[me.pos++],we|=(127&ze)<<3,ze<128)||(ze=Ce[me.pos++],we|=(127&ze)<<10,ze<128)||(ze=Ce[me.pos++],we|=(127&ze)<<17,ze<128)||(ze=Ce[me.pos++],we|=(127&ze)<<24,ze<128)||(ze=Ce[me.pos++],we|=(1&ze)<<31,ze<128))return hp(le,we,pe);throw new Error("Expected varint not more than 10 bytes")}(W,d,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let d=this.readVarint();return d%2==1?(d+1)/-2:d/2}readBoolean(){return!!this.readVarint()}readString(){let d=this.readVarint()+this.pos,L=this.pos;return this.pos=d,d-L>=12&&DT?DT.decode(this.buf.subarray(L,d)):function(W,te,le){let pe="",me=te;for(;me239?4:Ce>223?3:Ce>191?2:1;if(me+Ve>le)break;Ve===1?Ce<128&&(nt=Ce):Ve===2?(we=W[me+1],(192&we)==128&&(nt=(31&Ce)<<6|63&we,nt<=127&&(nt=null))):Ve===3?(we=W[me+1],ze=W[me+2],(192&we)==128&&(192&ze)==128&&(nt=(15&Ce)<<12|(63&we)<<6|63&ze,(nt<=2047||nt>=55296&&nt<=57343)&&(nt=null))):Ve===4&&(we=W[me+1],ze=W[me+2],Pe=W[me+3],(192&we)==128&&(192&ze)==128&&(192&Pe)==128&&(nt=(15&Ce)<<18|(63&we)<<12|(63&ze)<<6|63&Pe,(nt<=65535||nt>=1114112)&&(nt=null))),nt===null?(nt=65533,Ve=1):nt>65535&&(nt-=65536,pe+=String.fromCharCode(nt>>>10&1023|55296),nt=56320|1023&nt),pe+=String.fromCharCode(nt),me+=Ve}return pe}(this.buf,L,d)}readBytes(){let d=this.readVarint()+this.pos,L=this.buf.subarray(this.pos,d);return this.pos=d,L}readPackedVarint(d=[],L){let W=this.readPackedEnd();for(;this.pos127;);else if(L===2)this.pos=this.readVarint()+this.pos;else if(L===5)this.pos+=4;else{if(L!==1)throw new Error(`Unimplemented type: ${L}`);this.pos+=8}}writeTag(d,L){this.writeVarint(d<<3|L)}realloc(d){let L=this.length||16;for(;L268435455||d<0?function(L,W){let te,le;if(L>=0?(te=L%4294967296|0,le=L/4294967296|0):(te=~(-L%4294967296),le=~(-L/4294967296),4294967295^te?te=te+1|0:(te=0,le=le+1|0)),L>=18446744073709552e3||L<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");W.realloc(10),function(pe,me,Ce){Ce.buf[Ce.pos++]=127&pe|128,pe>>>=7,Ce.buf[Ce.pos++]=127&pe|128,pe>>>=7,Ce.buf[Ce.pos++]=127&pe|128,pe>>>=7,Ce.buf[Ce.pos++]=127&pe|128,Ce.buf[Ce.pos]=127&(pe>>>=7)}(te,0,W),function(pe,me){let Ce=(7&pe)<<4;me.buf[me.pos++]|=Ce|((pe>>>=3)?128:0),pe&&(me.buf[me.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(me.buf[me.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(me.buf[me.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(me.buf[me.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(me.buf[me.pos++]=127&pe)))))}(le,W)}(d,this):(this.realloc(4),this.buf[this.pos++]=127&d|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=d>>>7&127))))}writeSVarint(d){this.writeVarint(d<0?2*-d-1:2*d)}writeBoolean(d){this.writeVarint(+d)}writeString(d){d=String(d),this.realloc(4*d.length),this.pos++;let L=this.pos;this.pos=function(te,le,pe){for(let me,Ce,we=0;we55295&&me<57344){if(!Ce){me>56319||we+1===le.length?(te[pe++]=239,te[pe++]=191,te[pe++]=189):Ce=me;continue}if(me<56320){te[pe++]=239,te[pe++]=191,te[pe++]=189,Ce=me;continue}me=Ce-55296<<10|me-56320|65536,Ce=null}else Ce&&(te[pe++]=239,te[pe++]=191,te[pe++]=189,Ce=null);me<128?te[pe++]=me:(me<2048?te[pe++]=me>>6|192:(me<65536?te[pe++]=me>>12|224:(te[pe++]=me>>18|240,te[pe++]=me>>12&63|128),te[pe++]=me>>6&63|128),te[pe++]=63&me|128)}return pe}(this.buf,d,this.pos);let W=this.pos-L;W>=128&&IT(L,W,this),this.pos=L-1,this.writeVarint(W),this.pos+=W}writeFloat(d){this.realloc(4),this.dataView.setFloat32(this.pos,d,!0),this.pos+=4}writeDouble(d){this.realloc(8),this.dataView.setFloat64(this.pos,d,!0),this.pos+=8}writeBytes(d){let L=d.length;this.writeVarint(L),this.realloc(L);for(let W=0;W=128&&IT(W,te,this),this.pos=W-1,this.writeVarint(te),this.pos+=te}writeMessage(d,L,W){this.writeTag(d,2),this.writeRawMessage(L,W)}writePackedVarint(d,L){L.length&&this.writeMessage(d,bR,L)}writePackedSVarint(d,L){L.length&&this.writeMessage(d,xR,L)}writePackedBoolean(d,L){L.length&&this.writeMessage(d,AR,L)}writePackedFloat(d,L){L.length&&this.writeMessage(d,wR,L)}writePackedDouble(d,L){L.length&&this.writeMessage(d,TR,L)}writePackedFixed32(d,L){L.length&&this.writeMessage(d,MR,L)}writePackedSFixed32(d,L){L.length&&this.writeMessage(d,SR,L)}writePackedFixed64(d,L){L.length&&this.writeMessage(d,ER,L)}writePackedSFixed64(d,L){L.length&&this.writeMessage(d,kR,L)}writeBytesField(d,L){this.writeTag(d,2),this.writeBytes(L)}writeFixed32Field(d,L){this.writeTag(d,5),this.writeFixed32(L)}writeSFixed32Field(d,L){this.writeTag(d,5),this.writeSFixed32(L)}writeFixed64Field(d,L){this.writeTag(d,1),this.writeFixed64(L)}writeSFixed64Field(d,L){this.writeTag(d,1),this.writeSFixed64(L)}writeVarintField(d,L){this.writeTag(d,0),this.writeVarint(L)}writeSVarintField(d,L){this.writeTag(d,0),this.writeSVarint(L)}writeStringField(d,L){this.writeTag(d,2),this.writeString(L)}writeFloatField(d,L){this.writeTag(d,5),this.writeFloat(L)}writeDoubleField(d,L){this.writeTag(d,1),this.writeDouble(L)}writeBooleanField(d,L){this.writeVarintField(d,+L)}}function hp(D,d,L){return L?4294967296*d+(D>>>0):4294967296*(d>>>0)+(D>>>0)}function IT(D,d,L){let W=d<=16383?1:d<=2097151?2:d<=268435455?3:Math.floor(Math.log(d)/(7*Math.LN2));L.realloc(W);for(let te=L.pos-1;te>=D;te--)L.buf[te+W]=L.buf[te]}function bR(D,d){for(let L=0;Lme.h-pe.h);let W=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(d/.95)),L),h:1/0}],te=0,le=0;for(let pe of D)for(let me=W.length-1;me>=0;me--){let Ce=W[me];if(!(pe.w>Ce.w||pe.h>Ce.h)){if(pe.x=Ce.x,pe.y=Ce.y,le=Math.max(le,pe.y+pe.h),te=Math.max(te,pe.x+pe.w),pe.w===Ce.w&&pe.h===Ce.h){let we=W.pop();we&&meEt.toCodeUnitIndex(kn));let an=xr(Et.toString(),tr);for(let kn of an){let On=[...kn].map(()=>0);er.push(new fp(kn,Et.sections,On))}}else if(lr){er=[],tr=tr.map(_a=>Et.toCodeUnitIndex(_a));let an=0,kn=[];for(let _a of Et.text)kn.push(...Array(_a.length).fill(Et.sectionIndex[an])),an++;let On=lr(Et.text,kn,tr);for(let _a of On){let ta=[],Ba="";for(let Za of _a[0])ta.push(_a[1][Ba.length]),Ba+=Za;er.push(new fp(_a[0],Et.sections,ta))}}else er=function(an,kn){let On=[],_a=0;for(let ta of kn)On.push(an.substring(_a,ta)),_a=ta;return _awe){let ze=Math.ceil(le/we);te*=ze/pe,pe=ze}return{x1:W,y1:te,x2:W+le,y2:te+pe}}function NT(D,d,L,W,te,le){let pe=D.image,me;if(pe.content){let er=pe.content,tr=pe.pixelRatio||1;me=[er[0]/tr,er[1]/tr,pe.displaySize[0]-er[2]/tr,pe.displaySize[1]-er[3]/tr]}let Ce=d.left*le,we=d.right*le,ze,Pe,nt,Ve;L==="width"||L==="both"?(Ve=te[0]+Ce-W[3],Pe=te[0]+we+W[1]):(Ve=te[0]+(Ce+we-pe.displaySize[0])/2,Pe=Ve+pe.displaySize[0]);let bt=d.top*le,Et=d.bottom*le;return L==="height"||L==="both"?(ze=te[1]+bt-W[0],nt=te[1]+Et+W[2]):(ze=te[1]+(bt+Et-pe.displaySize[1])/2,nt=ze+pe.displaySize[1]),{image:pe,top:ze,right:Pe,bottom:nt,left:Ve,collisionPadding:me}}Ci("ImagePosition",S_),Ci("ImageAtlas",FT),l.ax=void 0,(Id=l.ax||(l.ax={}))[Id.none=0]="none",Id[Id.horizontal=1]="horizontal",Id[Id.vertical=2]="vertical",Id[Id.horizontalOnly=3]="horizontalOnly";let nd=128,Rd=32640;function OT(D,d){let{expression:L}=d;if(L.kind==="constant")return{kind:"constant",layoutSize:L.evaluate(new Ti(D+1))};if(L.kind==="source")return{kind:"source"};{let{zoomStops:W,interpolationType:te}=L,le=0;for(;lepe.id),this.index=d.index,this.pixelRatio=d.pixelRatio,this.sourceLayerIndex=d.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let L=this.layers[0]._unevaluatedLayout._values;this.textSizeData=OT(this.zoom,L["text-size"]),this.iconSizeData=OT(this.zoom,L["icon-size"]);let W=this.layers[0].layout,te=W.get("symbol-sort-key"),le=W.get("symbol-z-order");this.canOverlap=k_(W,"text-overlap","text-allow-overlap")!=="never"||k_(W,"icon-overlap","icon-allow-overlap")!=="never"||W.get("text-ignore-placement")||W.get("icon-ignore-placement"),this.sortFeaturesByKey=le!=="viewport-y"&&!te.isConstant(),this.sortFeaturesByY=(le==="viewport-y"||le==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,W.get("symbol-placement")==="point"&&(this.writingModes=W.get("text-writing-mode").map(pe=>l.ax[pe])),this.stateDependentLayerIds=this.layers.filter(pe=>pe.isStateDependent()).map(pe=>pe.id),this.sourceID=d.sourceID}createArrays(){this.text=new L_(new Do(this.layers,this.zoom,d=>d.startsWith("text"))),this.icon=new L_(new Do(this.layers,this.zoom,d=>d.startsWith("icon"))),this.glyphOffsetArray=new lt,this.lineVertexArray=new ct,this.symbolInstances=new Ye,this.textAnchorOffsets=new Gt}calculateGlyphDependencies(d,L,W,te,le){for(let pe of d)if(L[pe.codePointAt(0)]=!0,(W||te)&&le){let me=T0[pe];me&&(L[me.codePointAt(0)]=!0)}}populate(d,L,W){var te;let le=this.layers[0],pe=le.layout,me=pe.get("text-font"),Ce=pe.get("text-field"),we=pe.get("icon-image"),ze=(Ce.value.kind!=="constant"||Ce.value.value instanceof ro&&!Ce.value.value.isEmpty()||Ce.value.value.toString().length>0)&&(me.value.kind!=="constant"||me.value.value.length>0),Pe=we.value.kind!=="constant"||!!we.value.value||Object.keys(we.parameters).length>0,nt=pe.get("symbol-sort-key");if(this.features=[],!ze&&!Pe)return;let Ve=L.iconDependencies,bt=L.glyphDependencies,Et=L.availableImages,er=new Ti(this.zoom);for(let{feature:tr,id:xr,index:lr,sourceLayerIndex:Mr}of d){let Xr=le._featureFilter.needGeometry,an=Co(tr,Xr);if(!le._featureFilter.filter(er,an,W))continue;let kn,On;if(Xr||(an.geometry=Hl(tr)),ze){let ta=le.getValueAndResolveTokens("text-field",an,W,Et),Ba=ro.factory(ta);this.hasRTLText||(this.hasRTLText=OR(Ba)),(!this.hasRTLText||Yi.getRTLTextPluginStatus()==="unavailable"||this.hasRTLText&&Yi.isParsed())&&(kn=mR(Ba,le,an))}if(Pe){let ta=le.getValueAndResolveTokens("icon-image",an,W,Et);On=ta instanceof so?ta:so.fromString(ta)}if(!kn&&!On)continue;let _a=this.sortFeaturesByKey?nt.evaluate(an,{},W):void 0;if(this.features.push({id:xr,text:kn,icon:On,index:lr,sourceLayerIndex:Mr,geometry:an.geometry,properties:tr.properties,type:y0.types[tr.type],sortKey:_a}),On&&(Ve[On.name]=!0),kn){let ta=me.evaluate(an,{},W).join(","),Ba=pe.get("text-rotation-alignment")!=="viewport"&&pe.get("symbol-placement")!=="point";this.allowVerticalPlacement=(te=this.writingModes)===null||te===void 0?void 0:te.includes(l.ax.vertical);for(let Za of kn.sections)if(Za.image)Ve[Za.image.name]=!0;else{let Da=Ur(kn.toString()),na=Za.fontStack||ta;bt[na]||(bt[na]={}),this.calculateGlyphDependencies(Za.text,bt[na],Ba,this.allowVerticalPlacement,Da)}}}pe.get("symbol-placement")==="line"&&(this.features=function(tr){let xr={},lr={},Mr=[],Xr=0;function an(ta){Mr.push(tr[ta]),Xr++}function kn(ta,Ba,Za){let Da=lr[ta];return delete lr[ta],lr[Ba]=Da,Mr[Da].geometry[0].pop(),Mr[Da].geometry[0]=Mr[Da].geometry[0].concat(Za[0]),Da}function On(ta,Ba,Za){let Da=xr[Ba];return delete xr[Ba],xr[ta]=Da,Mr[Da].geometry[0].shift(),Mr[Da].geometry[0]=Za[0].concat(Mr[Da].geometry[0]),Da}function _a(ta,Ba,Za){let Da=Za?Ba[0][Ba[0].length-1]:Ba[0][0];return`${ta}:${Da.x}:${Da.y}`}for(let ta=0;tata.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((tr,xr)=>tr.sortKey-xr.sortKey)}update(d,L,W){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:W}),this.icon.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:W}))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(d){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(d),this.iconCollisionBox.upload(d)),this.text.upload(d,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(d,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(d,L){let W=this.lineVertexArray.length;if(d.segment!==void 0){let te=d.dist(L[d.segment+1]),le=d.dist(L[d.segment]),pe={};for(let me=d.segment+1;me=0;me--)pe[me]={x:L[me].x,y:L[me].y,tileUnitDistanceFromAnchor:le},me>0&&(le+=L[me-1].dist(L[me]));for(let me=0;me0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(d,L){let W=d.placedSymbolArray.get(L),te=W.vertexStartIndex+4*W.numGlyphs;for(let le=W.vertexStartIndex;lete[me]-te[Ce]||le[Ce]-le[me]),pe}addToSortKeyRanges(d,L){let W=this.sortKeyRanges[this.sortKeyRanges.length-1];W?.sortKey===L?W.symbolInstanceEnd=d+1:this.sortKeyRanges.push({sortKey:L,symbolInstanceStart:d,symbolInstanceEnd:d+1})}sortFeatures(d){if(this.sortFeaturesByY&&this.sortedAngle!==d&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(d),this.sortedAngle=d,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let L of this.symbolInstanceIndexes){let W=this.symbolInstances.get(L);this.featureSortOrder.push(W.featureIndex);let te=[W.rightJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.leftJustifiedTextSymbolIndex];for(let le=0;le=0&&te.indexOf(pe)===le&&this.addIndicesForPlacedSymbol(this.text,pe)}W.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,W.verticalPlacedTextSymbolIndex),W.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.placedIconSymbolIndex),W.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let jT,UT;Ci("SymbolBucket",dp,{omit:["layers","collisionBoxArray","features","compareText"]}),dp.MAX_GLYPHS=65535,dp.addDynamicAttributes=C_;var D_={get paint(){return UT=UT||new Bs({"icon-opacity":new Vi(ht.paint_symbol["icon-opacity"]),"icon-color":new Vi(ht.paint_symbol["icon-color"]),"icon-halo-color":new Vi(ht.paint_symbol["icon-halo-color"]),"icon-halo-width":new Vi(ht.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Vi(ht.paint_symbol["icon-halo-blur"]),"icon-translate":new Li(ht.paint_symbol["icon-translate"]),"icon-translate-anchor":new Li(ht.paint_symbol["icon-translate-anchor"]),"text-opacity":new Vi(ht.paint_symbol["text-opacity"]),"text-color":new Vi(ht.paint_symbol["text-color"],{runtimeType:fr,getOverride:D=>D.textColor,hasOverride:D=>!!D.textColor}),"text-halo-color":new Vi(ht.paint_symbol["text-halo-color"]),"text-halo-width":new Vi(ht.paint_symbol["text-halo-width"]),"text-halo-blur":new Vi(ht.paint_symbol["text-halo-blur"]),"text-translate":new Li(ht.paint_symbol["text-translate"]),"text-translate-anchor":new Li(ht.paint_symbol["text-translate-anchor"])})},get layout(){return jT=jT||new Bs({"symbol-placement":new Li(ht.layout_symbol["symbol-placement"]),"symbol-spacing":new Li(ht.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Li(ht.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Vi(ht.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Li(ht.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Li(ht.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Li(ht.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Li(ht.layout_symbol["icon-ignore-placement"]),"icon-optional":new Li(ht.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Li(ht.layout_symbol["icon-rotation-alignment"]),"icon-size":new Vi(ht.layout_symbol["icon-size"]),"icon-text-fit":new Li(ht.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Li(ht.layout_symbol["icon-text-fit-padding"]),"icon-image":new Vi(ht.layout_symbol["icon-image"]),"icon-rotate":new Vi(ht.layout_symbol["icon-rotate"]),"icon-padding":new Vi(ht.layout_symbol["icon-padding"]),"icon-keep-upright":new Li(ht.layout_symbol["icon-keep-upright"]),"icon-offset":new Vi(ht.layout_symbol["icon-offset"]),"icon-anchor":new Vi(ht.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Li(ht.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Li(ht.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Li(ht.layout_symbol["text-rotation-alignment"]),"text-field":new Vi(ht.layout_symbol["text-field"]),"text-font":new Vi(ht.layout_symbol["text-font"]),"text-size":new Vi(ht.layout_symbol["text-size"]),"text-max-width":new Vi(ht.layout_symbol["text-max-width"]),"text-line-height":new Li(ht.layout_symbol["text-line-height"]),"text-letter-spacing":new Vi(ht.layout_symbol["text-letter-spacing"]),"text-justify":new Vi(ht.layout_symbol["text-justify"]),"text-radial-offset":new Vi(ht.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Li(ht.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Vi(ht.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Vi(ht.layout_symbol["text-anchor"]),"text-max-angle":new Li(ht.layout_symbol["text-max-angle"]),"text-writing-mode":new Li(ht.layout_symbol["text-writing-mode"]),"text-rotate":new Vi(ht.layout_symbol["text-rotate"]),"text-padding":new Li(ht.layout_symbol["text-padding"]),"text-keep-upright":new Li(ht.layout_symbol["text-keep-upright"]),"text-transform":new Vi(ht.layout_symbol["text-transform"]),"text-offset":new Vi(ht.layout_symbol["text-offset"]),"text-allow-overlap":new Li(ht.layout_symbol["text-allow-overlap"]),"text-overlap":new Li(ht.layout_symbol["text-overlap"]),"text-ignore-placement":new Li(ht.layout_symbol["text-ignore-placement"]),"text-optional":new Li(ht.layout_symbol["text-optional"])})}};class qT{constructor(d){if(d.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=d.property.overrides?d.property.overrides.runtimeType:$t,this.defaultValue=d}evaluate(d){if(d.formattedSection){let L=this.defaultValue.property.overrides;if(L?.hasOverride(d.formattedSection))return L.getOverride(d.formattedSection)}return d.feature&&d.featureState?this.defaultValue.evaluate(d.feature,d.featureState):this.defaultValue.property.specification.default}eachChild(d){this.defaultValue.isConstant()||d(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Ci("FormatSectionOverride",qT,{omit:["defaultValue"]});class tg extends hl{constructor(d,L){super(d,D_,L)}recalculate(d,L){if(super.recalculate(d,L),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let W=this.layout.get("text-writing-mode");if(W){let te=[];for(let le of W)te.includes(le)||te.push(le);this.layout._values["text-writing-mode"]=te}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(d,L,W,te){let le=this.layout.get(d).evaluate(L,{},W,te),pe=this._unevaluatedLayout._values[d];return pe.isDataDriven()||yc(pe.value)||!le?le:function(me,Ce){return Ce.replace(/{([^{}]+)}/g,(we,ze)=>me&&ze in me?String(me[ze]):"")}(L.properties,le)}createBucket(d){return new dp(d)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let d of D_.paint.overridableProperties){if(!tg.hasPaintOverride(this.layout,d))continue;let L=this.paint.get(d),W=new qT(L),te=new Pl(W,L.property.specification),le=null;le=L.value.kind==="constant"||L.value.kind==="source"?new bc("source",te):new ac("composite",te,L.value.zoomStops),this.paint._values[d]=new Js(L.property,le,L.parameters)}}_handleOverridablePaintPropertyUpdate(d,L,W){return!(!this.layout||L.isDataDriven()||W.isDataDriven())&&tg.hasPaintOverride(this.layout,d)}static hasPaintOverride(d,L){let W=d.get("text-field"),te=D_.paint.properties[L],le=!1,pe=me=>{var Ce;for(let we of me)if(!((Ce=te.overrides)===null||Ce===void 0)&&Ce.hasOverride(we))return void(le=!0)};if(W.value.kind==="constant"&&W.value.value instanceof ro)pe(W.value.value.sections);else if(W.value.kind==="source"||W.value.kind==="composite"){let me=we=>{le||(we instanceof Wi&&ii(we.value)===Un?pe(we.value.sections):we instanceof As?pe(we.sections):we.eachChild(me))},Ce=W.value;Ce._styleExpression&&me(Ce._styleExpression.expression)}return le}}let VT;var jR={get paint(){return VT=VT||new Bs({"background-color":new Li(ht.paint_background["background-color"]),"background-pattern":new Ku(ht.paint_background["background-pattern"]),"background-opacity":new Li(ht.paint_background["background-opacity"])})}};class UR extends hl{constructor(d,L){super(d,jR,L)}}class qR extends hl{constructor(d,L){super(d,{},L),this.onAdd=W=>{this.implementation.onAdd&&this.implementation.onAdd(W,W.painter.context.gl)},this.onRemove=W=>{this.implementation.onRemove&&this.implementation.onRemove(W,W.painter.context.gl)},this.implementation=d}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class VR{constructor(d){this._methodToThrottle=d,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var d;this._triggered||(this._triggered=!0,(d=this._channel)===null||d===void 0||d.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let HR={once:!0},I_=63710088e-1;class Fd{constructor(d,L){if(isNaN(d)||isNaN(L))throw new Error(`Invalid LngLat object: (${d}, ${L})`);if(this.lng=+d,this.lat=+L,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Fd(H(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(d){let L=Math.PI/180,W=this.lat*L,te=d.lat*L,le=Math.sin(W)*Math.sin(te)+Math.cos(W)*Math.cos(te)*Math.cos((d.lng-this.lng)*L);return I_*Math.acos(Math.min(le,1))}static convert(d){if(d instanceof Fd)return d;if(Array.isArray(d)&&(d.length===2||d.length===3))return new Fd(Number(d[0]),Number(d[1]));if(!Array.isArray(d)&&typeof d=="object"&&d!==null)return new Fd(Number("lng"in d?d.lng:d.lon),Number(d.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let HT=2*Math.PI*I_;function GT(D){return HT*Math.cos(D*Math.PI/180)}function WT(D){return(180+D)/360}function YT(D){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+D*Math.PI/360)))/360}function XT(D,d){return D/GT(d)}function $T(D){return 360*D-180}function rg(D){return 360/Math.PI*Math.atan(Math.exp((180-360*D)*Math.PI/180))-90}function ZT(D,d){return D*GT(rg(d))}class A0{constructor(d,L,W=0){this.x=+d,this.y=+L,this.z=+W}static fromLngLat(d,L=0){let W=Fd.convert(d);return new A0(WT(W.lng),YT(W.lat),XT(L,W.lat))}toLngLat(){return new Fd($T(this.x),rg(this.y))}toAltitude(){return ZT(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/HT*(d=rg(this.y),1/Math.cos(d*Math.PI/180));var d}}function KT(D,d,L){var W=2*Math.PI*6378137/256/Math.pow(2,L);return[D*W-2*Math.PI*6378137/2,d*W-2*Math.PI*6378137/2]}class R_{constructor(d,L,W){if(!function(te,le,pe){return!(te<0||te>25||pe<0||pe>=Math.pow(2,te)||le<0||le>=Math.pow(2,te))}(d,L,W))throw new Error(`x=${L}, y=${W}, z=${d} outside of bounds. 0<=x<${Math.pow(2,d)}, 0<=y<${Math.pow(2,d)} 0<=z<=25 `);this.z=d,this.x=L,this.y=W,this.key=vp(0,d,d,L,W)}equals(d){return this.z===d.z&&this.x===d.x&&this.y===d.y}url(d,L,W){let te=(pe=this.y,me=this.z,Ce=KT(256*(le=this.x),256*(pe=Math.pow(2,me)-pe-1),me),we=KT(256*(le+1),256*(pe+1),me),Ce[0]+","+Ce[1]+","+we[0]+","+we[1]);var le,pe,me,Ce,we;let ze=function(Pe,nt,Ve){let bt="";for(let Et=Pe;Et>0;Et--){let er=1<1?"@2x":"").replace(/{quadkey}/g,ze).replace(/{bbox-epsg-3857}/g,te)}isChildOf(d){let L=this.z-d.z;return L>0&&d.x===this.x>>L&&d.y===this.y>>L}getTilePoint(d){let L=Math.pow(2,this.z);return new t((d.x*L-this.x)*F,(d.y*L-this.y)*F)}toString(){return`${this.z}/${this.x}/${this.y}`}}class JT{constructor(d,L){this.wrap=d,this.canonical=L,this.key=vp(d,L.z,L.z,L.x,L.y)}}class rh{constructor(d,L,W,te,le){if(this.terrainRttPosMatrix32f=null,d= z; overscaledZ = ${d}; z = ${W}`);this.overscaledZ=d,this.wrap=L,this.canonical=new R_(W,+te,+le),this.key=vp(L,d,W,te,le)}clone(){return new rh(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(d){return this.overscaledZ===d.overscaledZ&&this.wrap===d.wrap&&this.canonical.equals(d.canonical)}scaledTo(d){if(d>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${d}; overscaledZ = ${this.overscaledZ}`);let L=this.canonical.z-d;return d>this.canonical.z?new rh(d,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new rh(d,this.wrap,d,this.canonical.x>>L,this.canonical.y>>L)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(d,L){if(d>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${d}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-d;return d>this.canonical.z?vp(this.wrap*+L,d,this.canonical.z,this.canonical.x,this.canonical.y):vp(this.wrap*+L,d,d,this.canonical.x>>W,this.canonical.y>>W)}isChildOf(d){if(d.wrap!==this.wrap||this.overscaledZ-d.overscaledZ<=0)return!1;if(d.overscaledZ===0)return this.overscaledZ>0;let L=this.canonical.z-d.canonical.z;return!(L<0)&&d.canonical.x===this.canonical.x>>L&&d.canonical.y===this.canonical.y>>L}children(d){if(this.overscaledZ>=d)return[new rh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let L=this.canonical.z+1,W=2*this.canonical.x,te=2*this.canonical.y;return[new rh(L,this.wrap,L,W,te),new rh(L,this.wrap,L,W+1,te),new rh(L,this.wrap,L,W,te+1),new rh(L,this.wrap,L,W+1,te+1)]}isLessThan(d){return this.wrapd.wrap)&&(this.overscaledZd.overscaledZ)&&(this.canonical.xd.canonical.x)&&this.canonical.y=0&&d=0&&L=we)return null;let Pe=this.canonical.x+te,nt=this.wrap;return Pe<0?(nt-=Math.ceil(-Pe/we),Pe=(Pe%we+we)%we):Pe>=we&&(nt+=Math.floor(Pe/we),Pe%=we),{tileID:new rh(this.overscaledZ,nt,Ce,Pe,ze),x:pe,y:me}}}function vp(D,d,L,W,te){(D*=2)<0&&(D=-1*D-1);let le=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(d){return this.expandBy(-d)}map(d){let L=new dv;return L.extend(d(new t(this.minX,this.minY))),L.extend(d(new t(this.maxX,this.minY))),L.extend(d(new t(this.minX,this.maxY))),L.extend(d(new t(this.maxX,this.maxY))),L}static fromPoints(d){let L=new dv;for(let W of d)L.extend(W);return L}contains(d){return d.x>=this.minX&&d.x<=this.maxX&&d.y>=this.minY&&d.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(d){return!this.empty()&&!d.empty()&&d.minX>=this.minX&&d.maxX<=this.maxX&&d.minY>=this.minY&&d.maxY<=this.maxY}intersects(d){return!this.empty()&&!d.empty()&&d.minX<=this.maxX&&d.maxX>=this.minX&&d.minY<=this.maxY&&d.maxY>=this.minY}}class QT{constructor(d){this._stringToNumber={},this._numberToString=[];for(let L=0;L=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${d} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[d]}}class e6{constructor(d,L,W,te,le){this.type="Feature",this._vectorTileFeature=d,this._x=W,this._y=te,this._z=L,this.properties=d.properties,this.id=le}projectPoint(d,L,W,te){return[360*(d.x+L)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(d.y+W)/te)*Math.PI))-90]}projectLine(d,L,W,te){return d.map(le=>this.projectPoint(le,L,W,te))}get geometry(){if(this._geometry)return this._geometry;let d=this._vectorTileFeature,L=d.extent*Math.pow(2,this._z),W=d.extent*this._x,te=d.extent*this._y,le=d.loadGeometry();switch(d.type){case 1:{let pe=[];for(let Ce of le)pe.push(Ce[0]);let me=this.projectLine(pe,W,te,L);this._geometry=pe.length===1?{type:"Point",coordinates:me[0]}:{type:"MultiPoint",coordinates:me};break}case 2:{let pe=le.map(me=>this.projectLine(me,W,te,L));this._geometry=pe.length===1?{type:"LineString",coordinates:pe[0]}:{type:"MultiLineString",coordinates:pe};break}case 3:{let pe=nT(le),me=[];for(let Ce of pe)me.push(Ce.map(we=>this.projectLine(we,W,te,L)));this._geometry=me.length===1?{type:"Polygon",coordinates:me[0]}:{type:"MultiPolygon",coordinates:me};break}default:throw new Error(`unknown feature type: ${d.type}`)}return this._geometry}set geometry(d){this._geometry=d}toJSON(){let d={geometry:this.geometry};for(let L in this)L!=="_geometry"&&L!=="_vectorTileFeature"&&L!=="_x"&&L!=="_y"&&L!=="_z"&&(d[L]=this[L]);return d}}class pp{constructor(d,L,W){this._name=d,this.dataBuffer=L,typeof W=="number"?this._size=W:(this.nullabilityBuffer=W,this._size=W.size())}getValue(d){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(d)?null:this.getValueFromBuffer(d)}has(d){var L;return((L=this.nullabilityBuffer)==null?void 0:L.get(d))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class ng extends pp{}class F_ extends ng{getValueFromBuffer(d){return this.dataBuffer[d]}}class z_ extends ng{getValueFromBuffer(d){return this.dataBuffer[d]}}class t6 extends pp{constructor(d,L,W,te){super(d,L,te),this.delta=W}}class B_ extends t6{constructor(d,L,W,te){super(d,Int32Array.of(L),W,te)}getValueFromBuffer(d){return this.dataBuffer[0]+d*this.delta}}class N_ extends pp{constructor(d,L,W,te){super(d,te?Int32Array.of(L):Uint32Array.of(L),W)}getValueFromBuffer(d){return this.dataBuffer[0]}}class GR{constructor(d,L,W,te,le=4096){this._name=d,this._geometryVector=L,this._idVector=W,this._propertyVectors=te,this._extent=le}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(d){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map(L=>[L.name,L]))),this.propertyVectorsMap.get(d)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let d=[],L=this.geometryVector.getGeometries();for(let W=0;W>>32-D;let j_=O_,ad=256;function U_(D,d){return D-D%d}function WR(D){let d=D>>>0;return((255&d)<<24|(65280&d)<<8|d>>>8&65280|d>>>24&255)>>>0}let q_=function(){if(!Number.isFinite(65536))return 65536;let D=U_(Math.floor(65536),ad);return D===0?ad:D}(),YR=3*q_/ad+q_|0;function n6(){let D=new Uint8Array(YR);return{dataToBePacked:new Array(33),dataPointers:new Int32Array(33),byteContainer:D,byteContainerI32:new Int32Array(D.buffer,D.byteOffset,D.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function XR(D,d,L,W,te){switch(te){case 1:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let nt=le[ze++]>>>0;me[we++]=nt>>>0&1,me[we++]=nt>>>1&1,me[we++]=nt>>>2&1,me[we++]=nt>>>3&1,me[we++]=nt>>>4&1,me[we++]=nt>>>5&1,me[we++]=nt>>>6&1,me[we++]=nt>>>7&1,me[we++]=nt>>>8&1,me[we++]=nt>>>9&1,me[we++]=nt>>>10&1,me[we++]=nt>>>11&1,me[we++]=nt>>>12&1,me[we++]=nt>>>13&1,me[we++]=nt>>>14&1,me[we++]=nt>>>15&1,me[we++]=nt>>>16&1,me[we++]=nt>>>17&1,me[we++]=nt>>>18&1,me[we++]=nt>>>19&1,me[we++]=nt>>>20&1,me[we++]=nt>>>21&1,me[we++]=nt>>>22&1,me[we++]=nt>>>23&1,me[we++]=nt>>>24&1,me[we++]=nt>>>25&1,me[we++]=nt>>>26&1,me[we++]=nt>>>27&1,me[we++]=nt>>>28&1,me[we++]=nt>>>29&1,me[we++]=nt>>>30&1,me[we++]=nt>>>31&1}})(D,d,L,W);break;case 2:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let nt=le[ze++]>>>0,Ve=le[ze++]>>>0;me[we++]=nt>>>0&3,me[we++]=nt>>>2&3,me[we++]=nt>>>4&3,me[we++]=nt>>>6&3,me[we++]=nt>>>8&3,me[we++]=nt>>>10&3,me[we++]=nt>>>12&3,me[we++]=nt>>>14&3,me[we++]=nt>>>16&3,me[we++]=nt>>>18&3,me[we++]=nt>>>20&3,me[we++]=nt>>>22&3,me[we++]=nt>>>24&3,me[we++]=nt>>>26&3,me[we++]=nt>>>28&3,me[we++]=nt>>>30&3,me[we++]=Ve>>>0&3,me[we++]=Ve>>>2&3,me[we++]=Ve>>>4&3,me[we++]=Ve>>>6&3,me[we++]=Ve>>>8&3,me[we++]=Ve>>>10&3,me[we++]=Ve>>>12&3,me[we++]=Ve>>>14&3,me[we++]=Ve>>>16&3,me[we++]=Ve>>>18&3,me[we++]=Ve>>>20&3,me[we++]=Ve>>>22&3,me[we++]=Ve>>>24&3,me[we++]=Ve>>>26&3,me[we++]=Ve>>>28&3,me[we++]=Ve>>>30&3}})(D,d,L,W);break;case 3:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let nt=le[ze++]>>>0,Ve=le[ze++]>>>0,bt=le[ze++]>>>0;me[we++]=nt>>>0&7,me[we++]=nt>>>3&7,me[we++]=nt>>>6&7,me[we++]=nt>>>9&7,me[we++]=nt>>>12&7,me[we++]=nt>>>15&7,me[we++]=nt>>>18&7,me[we++]=nt>>>21&7,me[we++]=nt>>>24&7,me[we++]=nt>>>27&7,me[we++]=7&(nt>>>30|(1&Ve)<<2),me[we++]=Ve>>>1&7,me[we++]=Ve>>>4&7,me[we++]=Ve>>>7&7,me[we++]=Ve>>>10&7,me[we++]=Ve>>>13&7,me[we++]=Ve>>>16&7,me[we++]=Ve>>>19&7,me[we++]=Ve>>>22&7,me[we++]=Ve>>>25&7,me[we++]=Ve>>>28&7,me[we++]=7&(Ve>>>31|(3&bt)<<1),me[we++]=bt>>>2&7,me[we++]=bt>>>5&7,me[we++]=bt>>>8&7,me[we++]=bt>>>11&7,me[we++]=bt>>>14&7,me[we++]=bt>>>17&7,me[we++]=bt>>>20&7,me[we++]=bt>>>23&7,me[we++]=bt>>>26&7,me[we++]=bt>>>29&7}})(D,d,L,W);break;case 4:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let nt=le[ze++]>>>0,Ve=le[ze++]>>>0,bt=le[ze++]>>>0,Et=le[ze++]>>>0;me[we++]=nt>>>0&15,me[we++]=nt>>>4&15,me[we++]=nt>>>8&15,me[we++]=nt>>>12&15,me[we++]=nt>>>16&15,me[we++]=nt>>>20&15,me[we++]=nt>>>24&15,me[we++]=nt>>>28&15,me[we++]=Ve>>>0&15,me[we++]=Ve>>>4&15,me[we++]=Ve>>>8&15,me[we++]=Ve>>>12&15,me[we++]=Ve>>>16&15,me[we++]=Ve>>>20&15,me[we++]=Ve>>>24&15,me[we++]=Ve>>>28&15,me[we++]=bt>>>0&15,me[we++]=bt>>>4&15,me[we++]=bt>>>8&15,me[we++]=bt>>>12&15,me[we++]=bt>>>16&15,me[we++]=bt>>>20&15,me[we++]=bt>>>24&15,me[we++]=bt>>>28&15,me[we++]=Et>>>0&15,me[we++]=Et>>>4&15,me[we++]=Et>>>8&15,me[we++]=Et>>>12&15,me[we++]=Et>>>16&15,me[we++]=Et>>>20&15,me[we++]=Et>>>24&15,me[we++]=Et>>>28&15}})(D,d,L,W);break;case 5:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let nt=le[ze++]>>>0,Ve=le[ze++]>>>0,bt=le[ze++]>>>0,Et=le[ze++]>>>0,er=le[ze++]>>>0;me[we++]=nt>>>0&31,me[we++]=nt>>>5&31,me[we++]=nt>>>10&31,me[we++]=nt>>>15&31,me[we++]=nt>>>20&31,me[we++]=nt>>>25&31,me[we++]=31&(nt>>>30|(7&Ve)<<2),me[we++]=Ve>>>3&31,me[we++]=Ve>>>8&31,me[we++]=Ve>>>13&31,me[we++]=Ve>>>18&31,me[we++]=Ve>>>23&31,me[we++]=31&(Ve>>>28|(1&bt)<<4),me[we++]=bt>>>1&31,me[we++]=bt>>>6&31,me[we++]=bt>>>11&31,me[we++]=bt>>>16&31,me[we++]=bt>>>21&31,me[we++]=bt>>>26&31,me[we++]=31&(bt>>>31|(15&Et)<<1),me[we++]=Et>>>4&31,me[we++]=Et>>>9&31,me[we++]=Et>>>14&31,me[we++]=Et>>>19&31,me[we++]=Et>>>24&31,me[we++]=31&(Et>>>29|(3&er)<<3),me[we++]=er>>>2&31,me[we++]=er>>>7&31,me[we++]=er>>>12&31,me[we++]=er>>>17&31,me[we++]=er>>>22&31,me[we++]=er>>>27&31}})(D,d,L,W);break;case 6:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let nt=le[ze++]>>>0,Ve=le[ze++]>>>0,bt=le[ze++]>>>0,Et=le[ze++]>>>0,er=le[ze++]>>>0,tr=le[ze++]>>>0;me[we++]=nt>>>0&63,me[we++]=nt>>>6&63,me[we++]=nt>>>12&63,me[we++]=nt>>>18&63,me[we++]=nt>>>24&63,me[we++]=63&(nt>>>30|(15&Ve)<<2),me[we++]=Ve>>>4&63,me[we++]=Ve>>>10&63,me[we++]=Ve>>>16&63,me[we++]=Ve>>>22&63,me[we++]=63&(Ve>>>28|(3&bt)<<4),me[we++]=bt>>>2&63,me[we++]=bt>>>8&63,me[we++]=bt>>>14&63,me[we++]=bt>>>20&63,me[we++]=bt>>>26&63,me[we++]=Et>>>0&63,me[we++]=Et>>>6&63,me[we++]=Et>>>12&63,me[we++]=Et>>>18&63,me[we++]=Et>>>24&63,me[we++]=63&(Et>>>30|(15&er)<<2),me[we++]=er>>>4&63,me[we++]=er>>>10&63,me[we++]=er>>>16&63,me[we++]=er>>>22&63,me[we++]=63&(er>>>28|(3&tr)<<4),me[we++]=tr>>>2&63,me[we++]=tr>>>8&63,me[we++]=tr>>>14&63,me[we++]=tr>>>20&63,me[we++]=tr>>>26&63}})(D,d,L,W);break;case 7:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let nt=le[ze++]>>>0,Ve=le[ze++]>>>0,bt=le[ze++]>>>0,Et=le[ze++]>>>0,er=le[ze++]>>>0,tr=le[ze++]>>>0,xr=le[ze++]>>>0;me[we++]=nt>>>0&127,me[we++]=nt>>>7&127,me[we++]=nt>>>14&127,me[we++]=nt>>>21&127,me[we++]=127&(nt>>>28|(7&Ve)<<4),me[we++]=Ve>>>3&127,me[we++]=Ve>>>10&127,me[we++]=Ve>>>17&127,me[we++]=Ve>>>24&127,me[we++]=127&(Ve>>>31|(63&bt)<<1),me[we++]=bt>>>6&127,me[we++]=bt>>>13&127,me[we++]=bt>>>20&127,me[we++]=127&(bt>>>27|(3&Et)<<5),me[we++]=Et>>>2&127,me[we++]=Et>>>9&127,me[we++]=Et>>>16&127,me[we++]=Et>>>23&127,me[we++]=127&(Et>>>30|(31&er)<<2),me[we++]=er>>>5&127,me[we++]=er>>>12&127,me[we++]=er>>>19&127,me[we++]=127&(er>>>26|(1&tr)<<6),me[we++]=tr>>>1&127,me[we++]=tr>>>8&127,me[we++]=tr>>>15&127,me[we++]=tr>>>22&127,me[we++]=127&(tr>>>29|(15&xr)<<3),me[we++]=xr>>>4&127,me[we++]=xr>>>11&127,me[we++]=xr>>>18&127,me[we++]=xr>>>25&127}})(D,d,L,W);break;case 8:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let nt=le[ze++]>>>0,Ve=le[ze++]>>>0,bt=le[ze++]>>>0,Et=le[ze++]>>>0,er=le[ze++]>>>0,tr=le[ze++]>>>0,xr=le[ze++]>>>0,lr=le[ze++]>>>0;me[we++]=nt>>>0&255,me[we++]=nt>>>8&255,me[we++]=nt>>>16&255,me[we++]=nt>>>24&255,me[we++]=Ve>>>0&255,me[we++]=Ve>>>8&255,me[we++]=Ve>>>16&255,me[we++]=Ve>>>24&255,me[we++]=bt>>>0&255,me[we++]=bt>>>8&255,me[we++]=bt>>>16&255,me[we++]=bt>>>24&255,me[we++]=Et>>>0&255,me[we++]=Et>>>8&255,me[we++]=Et>>>16&255,me[we++]=Et>>>24&255,me[we++]=er>>>0&255,me[we++]=er>>>8&255,me[we++]=er>>>16&255,me[we++]=er>>>24&255,me[we++]=tr>>>0&255,me[we++]=tr>>>8&255,me[we++]=tr>>>16&255,me[we++]=tr>>>24&255,me[we++]=xr>>>0&255,me[we++]=xr>>>8&255,me[we++]=xr>>>16&255,me[we++]=xr>>>24&255,me[we++]=lr>>>0&255,me[we++]=lr>>>8&255,me[we++]=lr>>>16&255,me[we++]=lr>>>24&255}})(D,d,L,W);break;case 16:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<128;Pe++){let nt=le[ze++]>>>0;me[we++]=65535&nt,me[we++]=nt>>>16&65535}})(D,d,L,W);break;default:(function(le,pe,me,Ce,we){let ze=j_[we]>>>0,Pe=pe,nt=0,Ve=le[Pe]>>>0,bt=Ce;for(let Et=0;Et<8;Et++){for(let er=0;er<32;er++)if(nt+we<=32)me[bt+er]=Ve>>>nt&ze,nt+=we,nt===32&&(nt=0,Pe++,er!==31&&(Ve=le[Pe]>>>0));else{let tr=32-nt,xr=Ve>>>nt;Pe++,Ve=le[Pe]>>>0;let lr=we-tr;me[bt+er]=(xr|(Ve&-1>>>32-lr>>>0)<>>0)}})(D,d,L,W,te)}return d+(te<<3)|0}function $R(D,d,L,W){if(L+2>d)throw new Error(`FastPFOR decode: byteContainer underflow at block=${W} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${L}, byteSize=${d})`);let te=D[L++],le=D[L++];if(te>32)throw new Error(`FastPFOR decode: invalid bitWidth=${te} at block=${W} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:te,exceptionCount:le,bytePosIn:L}}function ZR(D,d,L,W,te,le,pe,me,Ce){let{maxBits:we,exceptionBitWidth:ze,bytePosIn:Pe}=function(er,tr,xr,lr,Mr,Xr){if(xr+1>tr)throw new Error(`FastPFOR decode: exception header underflow at block=${Xr} (need 1 byte for maxBits, bytePos=${xr}, byteSize=${tr})`);let an=er[xr++];if(an32)throw new Error(`FastPFOR decode: invalid maxBits=${an} at block=${Xr} (bitWidth=${lr}, expected ${lr}..32)`);let kn=an-lr|0;if(kn<1||kn>32)throw new Error(`FastPFOR decode: invalid exceptionBitWidth=${kn} at block=${Xr} (bitWidth=${lr}, maxBits=${an})`);if(xr+Mr>tr)throw new Error(`FastPFOR decode: exception positions underflow at block=${Xr} (need=${Mr}, have=${tr-xr})`);return{maxBits:an,exceptionBitWidth:kn,bytePosIn:xr}}(te,le,pe,L,W,Ce);if(pe=Pe,ze===1){let er=1<Et)throw new Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${ze} (ptr=${bt}, need ${W}, size=${Et}) at block ${Ce}`);for(let er=0;erD.length-1)throw new Error(`FastPFOR decode: invalid whereMeta=${me} at pageStart=${pe} (expected > 0 and pageStart+whereMeta < encoded.length=${D.length})`);let Ce=pe+1|0,we=pe+me|0,ze=D[we]>>>0,Pe=ze+3>>>2,nt=we+1,Ve=nt+Pe;if(Ve>=D.length)throw new Error(`FastPFOR decode: invalid byteSize=${ze} (metaInts=${Pe}, pageStart=${pe}, packedEnd=${we}, byteContainerStart=${nt}) causes bitmapPos=${Ve} out of bounds (encoded.length=${D.length})`);let bt=function(tr,xr,lr,Mr){Mr.byteContainer.length>>2;if(3&Xr.byteOffset)for(let On=0;On>>8&255,Xr[ta+2|0]=_a>>>16&255,Xr[ta+3|0]=_a>>>24&255}else{let On=Mr.byteContainerI32;(!On||On.buffer!==Xr.buffer||On.byteOffset!==Xr.byteOffset||On.length>>2)),On.set(tr.subarray(xr,xr+an))}let kn=3&lr;if(kn>0){let On=0|tr[xr+an|0],_a=an<<2;for(let ta=0;ta>>(ta<<3)&255}return Xr}(D,nt,ze,le),Et=ze,er=function(tr,xr,lr){let Mr=0|tr[xr++],Xr=lr.dataToBePacked;for(let an=2;an<=32;an=an+1|0){if(!(Mr>>>an-1&1))continue;if(xr>=tr.length)throw new Error(`FastPFOR decode: truncated exception stream header (bitWidth=${an}, streamWordIndex=${xr}, needWords=1, availableWords=${tr.length-xr}, encodedWords=${tr.length})`);let kn=tr[xr++]>>>0,On=U_(kn+31,32),_a=kn*an+31>>>5;if(xr+_a>tr.length)throw new Error(`FastPFOR decode: truncated exception stream (bitWidth=${an}, size=${kn}, streamWordIndex=${xr}, needWords=${_a}, availableWords=${tr.length-xr}, encodedWords=${tr.length})`);let ta=Xr[an];(!ta||ta.length>>5)|0,lr.exceptionSizes[an]=kn}return xr}(D,Ve,le);return le.dataPointers.fill(0),function(tr,xr,lr,Mr,Xr,an,kn,On,_a,ta){let Ba=0|lr,Za=0;for(let Da=0;Da0&&(Za=ZR(Xr,ui,li,xi,On,_a,Za,ta,Da))}if(Ba!==Mr)throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${xr}, packedStart=${lr}, consumedPackedEnd=${Ba}, expectedPackedEnd=${Mr}, packedWords=${Mr-lr}, encoded.length=${tr.length})`)}(D,pe,Ce,we,d,0|W,te/ad|0,bt,Et,le),er}function JR(D,d,L,W,te){switch(te){case 2:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0;Pe[Ve++]=bt>>>0&3,Pe[Ve++]=bt>>>2&3,Pe[Ve++]=bt>>>4&3,Pe[Ve++]=bt>>>6&3,Pe[Ve++]=bt>>>8&3,Pe[Ve++]=bt>>>10&3,Pe[Ve++]=bt>>>12&3,Pe[Ve++]=bt>>>14&3,Pe[Ve++]=bt>>>16&3,Pe[Ve++]=bt>>>18&3,Pe[Ve++]=bt>>>20&3,Pe[Ve++]=bt>>>22&3,Pe[Ve++]=bt>>>24&3,Pe[Ve++]=bt>>>26&3,Pe[Ve++]=bt>>>28&3,Pe[Ve++]=bt>>>30&3,Pe[Ve++]=Et>>>0&3,Pe[Ve++]=Et>>>2&3,Pe[Ve++]=Et>>>4&3,Pe[Ve++]=Et>>>6&3,Pe[Ve++]=Et>>>8&3,Pe[Ve++]=Et>>>10&3,Pe[Ve++]=Et>>>12&3,Pe[Ve++]=Et>>>14&3,Pe[Ve++]=Et>>>16&3,Pe[Ve++]=Et>>>18&3,Pe[Ve++]=Et>>>20&3,Pe[Ve++]=Et>>>22&3,Pe[Ve++]=Et>>>24&3,Pe[Ve++]=Et>>>26&3,Pe[Ve++]=Et>>>28&3,Pe[Ve]=Et>>>30&3}(D,d,L,W);case 3:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0;Pe[Ve++]=bt>>>0&7,Pe[Ve++]=bt>>>3&7,Pe[Ve++]=bt>>>6&7,Pe[Ve++]=bt>>>9&7,Pe[Ve++]=bt>>>12&7,Pe[Ve++]=bt>>>15&7,Pe[Ve++]=bt>>>18&7,Pe[Ve++]=bt>>>21&7,Pe[Ve++]=bt>>>24&7,Pe[Ve++]=bt>>>27&7,Pe[Ve++]=7&(bt>>>30|(1&Et)<<2),Pe[Ve++]=Et>>>1&7,Pe[Ve++]=Et>>>4&7,Pe[Ve++]=Et>>>7&7,Pe[Ve++]=Et>>>10&7,Pe[Ve++]=Et>>>13&7,Pe[Ve++]=Et>>>16&7,Pe[Ve++]=Et>>>19&7,Pe[Ve++]=Et>>>22&7,Pe[Ve++]=Et>>>25&7,Pe[Ve++]=Et>>>28&7,Pe[Ve++]=7&(Et>>>31|(3&er)<<1),Pe[Ve++]=er>>>2&7,Pe[Ve++]=er>>>5&7,Pe[Ve++]=er>>>8&7,Pe[Ve++]=er>>>11&7,Pe[Ve++]=er>>>14&7,Pe[Ve++]=er>>>17&7,Pe[Ve++]=er>>>20&7,Pe[Ve++]=er>>>23&7,Pe[Ve++]=er>>>26&7,Pe[Ve]=er>>>29&7}(D,d,L,W);case 4:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0;Pe[Ve++]=bt>>>0&15,Pe[Ve++]=bt>>>4&15,Pe[Ve++]=bt>>>8&15,Pe[Ve++]=bt>>>12&15,Pe[Ve++]=bt>>>16&15,Pe[Ve++]=bt>>>20&15,Pe[Ve++]=bt>>>24&15,Pe[Ve++]=bt>>>28&15,Pe[Ve++]=Et>>>0&15,Pe[Ve++]=Et>>>4&15,Pe[Ve++]=Et>>>8&15,Pe[Ve++]=Et>>>12&15,Pe[Ve++]=Et>>>16&15,Pe[Ve++]=Et>>>20&15,Pe[Ve++]=Et>>>24&15,Pe[Ve++]=Et>>>28&15,Pe[Ve++]=er>>>0&15,Pe[Ve++]=er>>>4&15,Pe[Ve++]=er>>>8&15,Pe[Ve++]=er>>>12&15,Pe[Ve++]=er>>>16&15,Pe[Ve++]=er>>>20&15,Pe[Ve++]=er>>>24&15,Pe[Ve++]=er>>>28&15,Pe[Ve++]=tr>>>0&15,Pe[Ve++]=tr>>>4&15,Pe[Ve++]=tr>>>8&15,Pe[Ve++]=tr>>>12&15,Pe[Ve++]=tr>>>16&15,Pe[Ve++]=tr>>>20&15,Pe[Ve++]=tr>>>24&15,Pe[Ve]=tr>>>28&15}(D,d,L,W);case 5:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0;Pe[Ve++]=bt>>>0&31,Pe[Ve++]=bt>>>5&31,Pe[Ve++]=bt>>>10&31,Pe[Ve++]=bt>>>15&31,Pe[Ve++]=bt>>>20&31,Pe[Ve++]=bt>>>25&31,Pe[Ve++]=31&(bt>>>30|(7&Et)<<2),Pe[Ve++]=Et>>>3&31,Pe[Ve++]=Et>>>8&31,Pe[Ve++]=Et>>>13&31,Pe[Ve++]=Et>>>18&31,Pe[Ve++]=Et>>>23&31,Pe[Ve++]=31&(Et>>>28|(1&er)<<4),Pe[Ve++]=er>>>1&31,Pe[Ve++]=er>>>6&31,Pe[Ve++]=er>>>11&31,Pe[Ve++]=er>>>16&31,Pe[Ve++]=er>>>21&31,Pe[Ve++]=er>>>26&31,Pe[Ve++]=31&(er>>>31|(15&tr)<<1),Pe[Ve++]=tr>>>4&31,Pe[Ve++]=tr>>>9&31,Pe[Ve++]=tr>>>14&31,Pe[Ve++]=tr>>>19&31,Pe[Ve++]=tr>>>24&31,Pe[Ve++]=31&(tr>>>29|(3&xr)<<3),Pe[Ve++]=xr>>>2&31,Pe[Ve++]=xr>>>7&31,Pe[Ve++]=xr>>>12&31,Pe[Ve++]=xr>>>17&31,Pe[Ve++]=xr>>>22&31,Pe[Ve]=xr>>>27&31}(D,d,L,W);case 6:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0;Pe[Ve++]=bt>>>0&63,Pe[Ve++]=bt>>>6&63,Pe[Ve++]=bt>>>12&63,Pe[Ve++]=bt>>>18&63,Pe[Ve++]=bt>>>24&63,Pe[Ve++]=63&(bt>>>30|(15&Et)<<2),Pe[Ve++]=Et>>>4&63,Pe[Ve++]=Et>>>10&63,Pe[Ve++]=Et>>>16&63,Pe[Ve++]=Et>>>22&63,Pe[Ve++]=63&(Et>>>28|(3&er)<<4),Pe[Ve++]=er>>>2&63,Pe[Ve++]=er>>>8&63,Pe[Ve++]=er>>>14&63,Pe[Ve++]=er>>>20&63,Pe[Ve++]=er>>>26&63,Pe[Ve++]=tr>>>0&63,Pe[Ve++]=tr>>>6&63,Pe[Ve++]=tr>>>12&63,Pe[Ve++]=tr>>>18&63,Pe[Ve++]=tr>>>24&63,Pe[Ve++]=63&(tr>>>30|(15&xr)<<2),Pe[Ve++]=xr>>>4&63,Pe[Ve++]=xr>>>10&63,Pe[Ve++]=xr>>>16&63,Pe[Ve++]=xr>>>22&63,Pe[Ve++]=63&(xr>>>28|(3&lr)<<4),Pe[Ve++]=lr>>>2&63,Pe[Ve++]=lr>>>8&63,Pe[Ve++]=lr>>>14&63,Pe[Ve++]=lr>>>20&63,Pe[Ve]=lr>>>26&63}(D,d,L,W);case 7:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0;Pe[Ve++]=bt>>>0&127,Pe[Ve++]=bt>>>7&127,Pe[Ve++]=bt>>>14&127,Pe[Ve++]=bt>>>21&127,Pe[Ve++]=127&(bt>>>28|(7&Et)<<4),Pe[Ve++]=Et>>>3&127,Pe[Ve++]=Et>>>10&127,Pe[Ve++]=Et>>>17&127,Pe[Ve++]=Et>>>24&127,Pe[Ve++]=127&(Et>>>31|(63&er)<<1),Pe[Ve++]=er>>>6&127,Pe[Ve++]=er>>>13&127,Pe[Ve++]=er>>>20&127,Pe[Ve++]=127&(er>>>27|(3&tr)<<5),Pe[Ve++]=tr>>>2&127,Pe[Ve++]=tr>>>9&127,Pe[Ve++]=tr>>>16&127,Pe[Ve++]=tr>>>23&127,Pe[Ve++]=127&(tr>>>30|(31&xr)<<2),Pe[Ve++]=xr>>>5&127,Pe[Ve++]=xr>>>12&127,Pe[Ve++]=xr>>>19&127,Pe[Ve++]=127&(xr>>>26|(1&lr)<<6),Pe[Ve++]=lr>>>1&127,Pe[Ve++]=lr>>>8&127,Pe[Ve++]=lr>>>15&127,Pe[Ve++]=lr>>>22&127,Pe[Ve++]=127&(lr>>>29|(15&Mr)<<3),Pe[Ve++]=Mr>>>4&127,Pe[Ve++]=Mr>>>11&127,Pe[Ve++]=Mr>>>18&127,Pe[Ve]=Mr>>>25&127}(D,d,L,W);case 8:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0;Pe[Ve++]=bt>>>0&255,Pe[Ve++]=bt>>>8&255,Pe[Ve++]=bt>>>16&255,Pe[Ve++]=bt>>>24&255,Pe[Ve++]=Et>>>0&255,Pe[Ve++]=Et>>>8&255,Pe[Ve++]=Et>>>16&255,Pe[Ve++]=Et>>>24&255,Pe[Ve++]=er>>>0&255,Pe[Ve++]=er>>>8&255,Pe[Ve++]=er>>>16&255,Pe[Ve++]=er>>>24&255,Pe[Ve++]=tr>>>0&255,Pe[Ve++]=tr>>>8&255,Pe[Ve++]=tr>>>16&255,Pe[Ve++]=tr>>>24&255,Pe[Ve++]=xr>>>0&255,Pe[Ve++]=xr>>>8&255,Pe[Ve++]=xr>>>16&255,Pe[Ve++]=xr>>>24&255,Pe[Ve++]=lr>>>0&255,Pe[Ve++]=lr>>>8&255,Pe[Ve++]=lr>>>16&255,Pe[Ve++]=lr>>>24&255,Pe[Ve++]=Mr>>>0&255,Pe[Ve++]=Mr>>>8&255,Pe[Ve++]=Mr>>>16&255,Pe[Ve++]=Mr>>>24&255,Pe[Ve++]=Xr>>>0&255,Pe[Ve++]=Xr>>>8&255,Pe[Ve++]=Xr>>>16&255,Pe[Ve]=Xr>>>24&255}(D,d,L,W);case 9:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0,an=we[ze+8]>>>0;Pe[Ve++]=bt>>>0&511,Pe[Ve++]=bt>>>9&511,Pe[Ve++]=bt>>>18&511,Pe[Ve++]=511&(bt>>>27|(15&Et)<<5),Pe[Ve++]=Et>>>4&511,Pe[Ve++]=Et>>>13&511,Pe[Ve++]=Et>>>22&511,Pe[Ve++]=511&(Et>>>31|(255&er)<<1),Pe[Ve++]=er>>>8&511,Pe[Ve++]=er>>>17&511,Pe[Ve++]=511&(er>>>26|(7&tr)<<6),Pe[Ve++]=tr>>>3&511,Pe[Ve++]=tr>>>12&511,Pe[Ve++]=tr>>>21&511,Pe[Ve++]=511&(tr>>>30|(127&xr)<<2),Pe[Ve++]=xr>>>7&511,Pe[Ve++]=xr>>>16&511,Pe[Ve++]=511&(xr>>>25|(3&lr)<<7),Pe[Ve++]=lr>>>2&511,Pe[Ve++]=lr>>>11&511,Pe[Ve++]=lr>>>20&511,Pe[Ve++]=511&(lr>>>29|(63&Mr)<<3),Pe[Ve++]=Mr>>>6&511,Pe[Ve++]=Mr>>>15&511,Pe[Ve++]=511&(Mr>>>24|(1&Xr)<<8),Pe[Ve++]=Xr>>>1&511,Pe[Ve++]=Xr>>>10&511,Pe[Ve++]=Xr>>>19&511,Pe[Ve++]=511&(Xr>>>28|(31&an)<<4),Pe[Ve++]=an>>>5&511,Pe[Ve++]=an>>>14&511,Pe[Ve]=an>>>23&511}(D,d,L,W);case 10:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0,an=we[ze+8]>>>0,kn=we[ze+9]>>>0;Pe[Ve++]=bt>>>0&1023,Pe[Ve++]=bt>>>10&1023,Pe[Ve++]=bt>>>20&1023,Pe[Ve++]=1023&(bt>>>30|(255&Et)<<2),Pe[Ve++]=Et>>>8&1023,Pe[Ve++]=Et>>>18&1023,Pe[Ve++]=1023&(Et>>>28|(63&er)<<4),Pe[Ve++]=er>>>6&1023,Pe[Ve++]=er>>>16&1023,Pe[Ve++]=1023&(er>>>26|(15&tr)<<6),Pe[Ve++]=tr>>>4&1023,Pe[Ve++]=tr>>>14&1023,Pe[Ve++]=1023&(tr>>>24|(3&xr)<<8),Pe[Ve++]=xr>>>2&1023,Pe[Ve++]=xr>>>12&1023,Pe[Ve++]=xr>>>22&1023,Pe[Ve++]=lr>>>0&1023,Pe[Ve++]=lr>>>10&1023,Pe[Ve++]=lr>>>20&1023,Pe[Ve++]=1023&(lr>>>30|(255&Mr)<<2),Pe[Ve++]=Mr>>>8&1023,Pe[Ve++]=Mr>>>18&1023,Pe[Ve++]=1023&(Mr>>>28|(63&Xr)<<4),Pe[Ve++]=Xr>>>6&1023,Pe[Ve++]=Xr>>>16&1023,Pe[Ve++]=1023&(Xr>>>26|(15&an)<<6),Pe[Ve++]=an>>>4&1023,Pe[Ve++]=an>>>14&1023,Pe[Ve++]=1023&(an>>>24|(3&kn)<<8),Pe[Ve++]=kn>>>2&1023,Pe[Ve++]=kn>>>12&1023,Pe[Ve]=kn>>>22&1023}(D,d,L,W);case 11:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0,an=we[ze+8]>>>0,kn=we[ze+9]>>>0,On=we[ze+10]>>>0;Pe[Ve++]=bt>>>0&2047,Pe[Ve++]=bt>>>11&2047,Pe[Ve++]=2047&(bt>>>22|(1&Et)<<10),Pe[Ve++]=Et>>>1&2047,Pe[Ve++]=Et>>>12&2047,Pe[Ve++]=2047&(Et>>>23|(3&er)<<9),Pe[Ve++]=er>>>2&2047,Pe[Ve++]=er>>>13&2047,Pe[Ve++]=2047&(er>>>24|(7&tr)<<8),Pe[Ve++]=tr>>>3&2047,Pe[Ve++]=tr>>>14&2047,Pe[Ve++]=2047&(tr>>>25|(15&xr)<<7),Pe[Ve++]=xr>>>4&2047,Pe[Ve++]=xr>>>15&2047,Pe[Ve++]=2047&(xr>>>26|(31&lr)<<6),Pe[Ve++]=lr>>>5&2047,Pe[Ve++]=lr>>>16&2047,Pe[Ve++]=2047&(lr>>>27|(63&Mr)<<5),Pe[Ve++]=Mr>>>6&2047,Pe[Ve++]=Mr>>>17&2047,Pe[Ve++]=2047&(Mr>>>28|(127&Xr)<<4),Pe[Ve++]=Xr>>>7&2047,Pe[Ve++]=Xr>>>18&2047,Pe[Ve++]=2047&(Xr>>>29|(255&an)<<3),Pe[Ve++]=an>>>8&2047,Pe[Ve++]=an>>>19&2047,Pe[Ve++]=2047&(an>>>30|(511&kn)<<2),Pe[Ve++]=kn>>>9&2047,Pe[Ve++]=kn>>>20&2047,Pe[Ve++]=2047&(kn>>>31|(1023&On)<<1),Pe[Ve++]=On>>>10&2047,Pe[Ve]=On>>>21&2047}(D,d,L,W);case 12:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0,an=we[ze+8]>>>0,kn=we[ze+9]>>>0,On=we[ze+10]>>>0,_a=we[ze+11]>>>0;Pe[Ve++]=bt>>>0&4095,Pe[Ve++]=bt>>>12&4095,Pe[Ve++]=4095&(bt>>>24|(15&Et)<<8),Pe[Ve++]=Et>>>4&4095,Pe[Ve++]=Et>>>16&4095,Pe[Ve++]=4095&(Et>>>28|(255&er)<<4),Pe[Ve++]=er>>>8&4095,Pe[Ve++]=er>>>20&4095,Pe[Ve++]=tr>>>0&4095,Pe[Ve++]=tr>>>12&4095,Pe[Ve++]=4095&(tr>>>24|(15&xr)<<8),Pe[Ve++]=xr>>>4&4095,Pe[Ve++]=xr>>>16&4095,Pe[Ve++]=4095&(xr>>>28|(255&lr)<<4),Pe[Ve++]=lr>>>8&4095,Pe[Ve++]=lr>>>20&4095,Pe[Ve++]=Mr>>>0&4095,Pe[Ve++]=Mr>>>12&4095,Pe[Ve++]=4095&(Mr>>>24|(15&Xr)<<8),Pe[Ve++]=Xr>>>4&4095,Pe[Ve++]=Xr>>>16&4095,Pe[Ve++]=4095&(Xr>>>28|(255&an)<<4),Pe[Ve++]=an>>>8&4095,Pe[Ve++]=an>>>20&4095,Pe[Ve++]=kn>>>0&4095,Pe[Ve++]=kn>>>12&4095,Pe[Ve++]=4095&(kn>>>24|(15&On)<<8),Pe[Ve++]=On>>>4&4095,Pe[Ve++]=On>>>16&4095,Pe[Ve++]=4095&(On>>>28|(255&_a)<<4),Pe[Ve++]=_a>>>8&4095,Pe[Ve]=_a>>>20&4095}(D,d,L,W);case 16:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0,an=we[ze+8]>>>0,kn=we[ze+9]>>>0,On=we[ze+10]>>>0,_a=we[ze+11]>>>0,ta=we[ze+12]>>>0,Ba=we[ze+13]>>>0,Za=we[ze+14]>>>0,Da=we[ze+15]>>>0;Pe[Ve++]=bt>>>0&65535,Pe[Ve++]=bt>>>16&65535,Pe[Ve++]=Et>>>0&65535,Pe[Ve++]=Et>>>16&65535,Pe[Ve++]=er>>>0&65535,Pe[Ve++]=er>>>16&65535,Pe[Ve++]=tr>>>0&65535,Pe[Ve++]=tr>>>16&65535,Pe[Ve++]=xr>>>0&65535,Pe[Ve++]=xr>>>16&65535,Pe[Ve++]=lr>>>0&65535,Pe[Ve++]=lr>>>16&65535,Pe[Ve++]=Mr>>>0&65535,Pe[Ve++]=Mr>>>16&65535,Pe[Ve++]=Xr>>>0&65535,Pe[Ve++]=Xr>>>16&65535,Pe[Ve++]=an>>>0&65535,Pe[Ve++]=an>>>16&65535,Pe[Ve++]=kn>>>0&65535,Pe[Ve++]=kn>>>16&65535,Pe[Ve++]=On>>>0&65535,Pe[Ve++]=On>>>16&65535,Pe[Ve++]=_a>>>0&65535,Pe[Ve++]=_a>>>16&65535,Pe[Ve++]=ta>>>0&65535,Pe[Ve++]=ta>>>16&65535,Pe[Ve++]=Ba>>>0&65535,Pe[Ve++]=Ba>>>16&65535,Pe[Ve++]=Za>>>0&65535,Pe[Ve++]=Za>>>16&65535,Pe[Ve++]=Da>>>0&65535,Pe[Ve]=Da>>>16&65535}(D,d,L,W);case 32:for(let we=0;we<32;we=we+1|0)L[W+we|0]=0|D[d+we|0];return}let le=j_[te]>>>0,pe=d,me=0,Ce=D[pe]>>>0;for(let we=0;we<32;we++)if(me+te<=32)L[W+we]=Ce>>>me&le,me+=te,me===32&&(me=0,pe++,we!==31&&(Ce=D[pe]>>>0));else{let ze=32-me,Pe=Ce>>>me;pe++,Ce=D[pe]>>>0,L[W+we]=(Pe|(Ce&j_[te-ze]>>>0)<=64)throw new Error("Varint too long")}return d.set(te),L}function eF(D,d){let L,W;return W=D[d.get()],d.increment(),L=127&W,W<128?L:(W=D[d.get()],d.increment(),L|=(127&W)<<7,W<128?L:(W=D[d.get()],d.increment(),L|=(127&W)<<14,W<128?L:(W=D[d.get()],d.increment(),L|=(127&W)<<21,W<128?L:(W=D[d.get()],L|=(15&W)<<28,function(te,le,pe){let me,Ce;if(Ce=le[pe.get()],pe.increment(),me=(112&Ce)>>4,Ce<128||(Ce=le[pe.get()],pe.increment(),me|=(127&Ce)<<3,Ce<128)||(Ce=le[pe.get()],pe.increment(),me|=(127&Ce)<<10,Ce<128)||(Ce=le[pe.get()],pe.increment(),me|=(127&Ce)<<17,Ce<128)||(Ce=le[pe.get()],pe.increment(),me|=(127&Ce)<<24,Ce<128)||(Ce=le[pe.get()],pe.increment(),me|=(1&Ce)<<31,Ce<128))return 4294967296*me+(te>>>0);throw new Error("Expected varint not more than 10 bytes")}(L,D,d)))))}function nl(D){return D>>>1^-(1&D)}function Nf(D){return D>>BigInt("1")^-(BigInt("1")&D)}function gp(D){return D%2==1?(D+1)/-2:D/2}function V_(D,d,L){if(L===void 0){L=0;for(let le=0;le=4)for(;W=4)for(;W=4)for(let W=D[0];L>4],me=null;switch(pe){case af.DATA:me={dictionaryType:Object.values(Th)[15&le]};break;case af.OFFSET:me={offsetType:Object.values(vv)[15&le]};break;case af.LENGTH:me={lengthType:Object.values(nh)[15&le]}}te.increment();let Ce=W[te.get()],we=Object.values(_s)[Ce>>5],ze=Object.values(_s)[Ce>>2&7],Pe=Object.values(zd)[3&Ce];te.increment();let nt=bf(W,te,2),Ve=nt[0];return{physicalStreamType:pe,logicalStreamType:me,logicalLevelTechnique1:we,logicalLevelTechnique2:ze,physicalLevelTechnique:Pe,numValues:Ve,byteLength:nt[1],decompressedCount:Ve}}(D,d);return L.logicalLevelTechnique1===_s.MORTON?function(W,te,le){let pe=bf(te,le,2);return{physicalStreamType:W.physicalStreamType,logicalStreamType:W.logicalStreamType,logicalLevelTechnique1:W.logicalLevelTechnique1,logicalLevelTechnique2:W.logicalLevelTechnique2,physicalLevelTechnique:W.physicalLevelTechnique,numValues:W.numValues,byteLength:W.byteLength,decompressedCount:W.decompressedCount,numBits:pe[0],coordinateShift:pe[1]}}(L,D,d):_s.RLE!==L.logicalLevelTechnique1&&_s.RLE!==L.logicalLevelTechnique2||zd.NONE===L.physicalLevelTechnique?L:function(W,te,le){let pe=bf(te,le,2);return{physicalStreamType:W.physicalStreamType,logicalStreamType:W.logicalStreamType,logicalLevelTechnique1:W.logicalLevelTechnique1,logicalLevelTechnique2:W.logicalLevelTechnique2,physicalLevelTechnique:W.physicalLevelTechnique,numValues:W.numValues,byteLength:W.byteLength,decompressedCount:pe[1],runs:pe[0],numRleValues:pe[1]}}(L,D,d)}(function(D){D.PRESENT="PRESENT",D.DATA="DATA",D.OFFSET="OFFSET",D.LENGTH="LENGTH"})(af||(af={})),function(D){D.NONE="NONE",D.SINGLE="SINGLE",D.SHARED="SHARED",D.VERTEX="VERTEX",D.MORTON="MORTON",D.FSST="FSST"}(Th||(Th={})),function(D){D.VERTEX="VERTEX",D.INDEX="INDEX",D.STRING="STRING",D.KEY="KEY"}(vv||(vv={})),function(D){D.VAR_BINARY="VAR_BINARY",D.GEOMETRIES="GEOMETRIES",D.PARTS="PARTS",D.RINGS="RINGS",D.TRIANGLES="TRIANGLES",D.SYMBOL="SYMBOL",D.DICTIONARY="DICTIONARY"}(nh||(nh={})),function(D){D[D.FLAT=0]="FLAT",D[D.CONST=1]="CONST",D[D.SEQUENCE=2]="SEQUENCE",D[D.DICTIONARY=3]="DICTIONARY",D[D.FSST_DICTIONARY=4]="FSST_DICTIONARY"}(Wl||(Wl={}));class Ah{constructor(d,L){this.values=d,this._size=L}get(d){let L=Math.floor(d/8);return(this.values[L]>>d%8&1)==1}set(d,L){let W=Math.floor(d/8);this.values[W]=this.values[W]|(L?1:0)<>d%8&1}size(){return this._size}getBuffer(){return this.values}}function yp(D,d,L){if(!d)return D;let W=d.size(),te=new D.constructor(W),le=0;for(let pe=0;pe=4)for(;Ve>>0;for(let nt=1;nt>>0;return Pe}(pe.logicalLevelTechnique2===_s.RLE?V_(le,pe.runs,pe.numRleValues):le);break;case _s.RLE:we=V_(le,pe.runs,pe.numRleValues);break;case _s.MORTON:G_(le),we=le;break;case _s.COMPONENTWISE_DELTA:we=function(ze){if(ze.length<2)return new Uint32Array(ze);let Pe=new Uint32Array(ze.length);Pe[0]=nl(ze[0])>>>0,Pe[1]=nl(ze[1])>>>0;for(let nt=2;nt>>0,Pe[nt+1]=Pe[nt-1]+nl(ze[nt+1])>>>0;return Pe}(le);break;case _s.NONE:we=le;break;default:throw new Error(`The specified Logical level technique is not supported: ${pe.logicalLevelTechnique1}`)}return Ce?yp(we,Ce,0):we}(_p(D,d,L),L,0,te)}function Nd(D,d,L){return function(W,te){if(te.logicalLevelTechnique1===_s.DELTA&&te.logicalLevelTechnique2===_s.NONE)return function(le){let pe=new Int32Array(le.length+1);pe[0]=0,pe[1]=nl(le[0]);let me=pe[1];for(let Ce=2;Ce!==pe.length;++Ce)me+=nl(le[Ce-1]),pe[Ce]=pe[Ce-1]+me;return new Uint32Array(pe)}(W);if(te.logicalLevelTechnique1===_s.RLE&&te.logicalLevelTechnique2===_s.NONE)return function(le,pe,me){let Ce=new Uint32Array(me+1);Ce[0]=0;let we=1,ze=Ce[0];for(let Pe=0;Pe>>2,Et=function(tr,xr){if(xr<=tr.encodedWords.length)return tr.encodedWords;let lr=new Uint32Array(Math.max(16,2*xr));return tr.encodedWords=lr,lr}(nt,bt);(function(tr,xr,lr,Mr){if(xr<0||lr<0||xr+lr>tr.length)throw new RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${xr}, byteLength=${lr}, bytes.length=${tr.length})`);let Xr=Math.floor(lr/4),an=lr%4!=0,kn=an?Xr+1:Xr;if(Mr.length0){let On=tr.byteOffset+xr;if(3&On)for(let _a=0;_a0){let On=0|tr[Mr];if(Mr=Mr+1|0,255&On)throw new Error(`FastPFOR decode: invalid alignedLength=${On} (expected multiple of 256)`);if(Xr+On>an.length)throw new Error(`FastPFOR decode: output buffer too small (outPos=${Xr}, alignedLength=${On}, out.length=${an.length})`);Mr=function(_a,ta,Ba,Za,Da,na){let li=Za+U_(Da,ad),xi=Za,ui=Ba;for(;xi!==li;){let Ai=Math.min(q_,li-xi);ui=KR(_a,ta,ui,xi,Ai,na),xi=xi+Ai|0}return ui}(tr,an,Mr,Xr,On,kn),Xr=Xr+On|0}return function(On,_a,ta,Ba,Za,Da){if(Da===0)return _a;let na=0,li=_a,xi=_a+ta,ui=Za,Ai=Za,Lo=Za+Da,bs=0,js=0;for(;li>>na&255;if(na+=8,li+=na>>>5,na&=31,bs|=(127&tl)<28)throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${js}, partial=${bs}, decoded=${Ai-ui}/${Da}, inPos=${li}, inEnd=${xi})`)}if(Ai!==Lo)throw new Error(`FastPFOR VByte: truncated stream (decoded=${Ai-ui}, expected=${Da}, consumedWords=${li-_a}/${ta}, vbyteStart=${_a}, vbyteEnd=${xi})`)}(tr,Mr,tr.length-Mr|0,an,Xr,xr-Xr|0),an}(Et.subarray(0,bt),we,nt.decoderWorkspace);return Pe.add(ze),er}(te,le,pe,me,function(Ce=16){if(Ce<0)throw new RangeError(`initialEncodedWordCapacity must be >= 0, got ${Ce}`);let we=Math.max(16,0|Ce);return{encodedWords:new Uint32Array(we),decoderWorkspace:n6()}}(pe>>>2))}(D,L.numValues,L.byteLength,d);case zd.VARINT:return bf(D,d,L.numValues);case zd.NONE:{let te=d.get();d.add(L.byteLength);let le=D.subarray(te,d.get());return new Uint32Array(le)}default:throw new Error(`Specified physicalLevelTechnique ${W} is not supported (yet).`)}}function Y_(D,d,L){let W=_p(D,d,L);return W.length===1?W[0]:function(te){return te[1]}(W)}function l6(D,d,L){return function(W){if(W.length===2){let te=nl(W[1]);return[te,te]}return[nl(W[2]),nl(W[3])]}(_p(D,d,L))}function u6(D,d,L){return function(W){if(W.length===2){let te=Nf(W[1]);return[te,te]}return[Nf(W[2]),Nf(W[3])]}(mp(D,d,L.numValues))}function c6(D,d,L,W){return function(te,le,pe){let me;switch(le.logicalLevelTechnique1){case _s.DELTA:me=function(Ce){let we=new BigUint64Array(Ce.length);we[0]=BigInt.asUintN(64,Nf(Ce[0]));for(let ze=1;ze>1,d)-L}}function v6(D,d){let L=0;for(let W=0;W>W;return L}function bp(D,d,L,W,te,le,pe){return D===Bd.MORTON?function(me,Ce,we,ze,Pe,nt){let Ve=new Array(Pe?ze+1:ze);for(let bt=0;bt[Xr]),W+=lr,te+=lr}break;case Tc.LINESTRING:{let lr,Mr;er?(lr=Ve[te]-Ve[te-1],te++):lr=nt[W]-nt[W-1],W++,Et?(Mr=xp(tr,me,lr,!1),me+=2*lr):(Mr=bp(d.vertexBufferType,tr,bt,Ce,lr,!1,we),Ce+=lr),L[pe++]=[Mr],Pe&&le++}break;case Tc.POLYGON:{let lr=nt[W]-nt[W-1];W++;let Mr=new Array(lr-1),Xr,an=Ve[te]-Ve[te-1];if(te++,Et){Xr=xp(tr,me,an,!0),me+=2*an;for(let kn=0;kn0&&Et.push(Et[0]),nt.push(Et)}d[ze]=nt,le&&we++}break;case Tc.MULTIPOLYGON:{let Pe=le[we]-le[we-1];we++;let nt=[];for(let Ve=0;Ve0&&tr.push(tr[0]),nt.push(tr)}}d[ze]=nt}}return d}[Symbol.iterator](){return null}}function _6(D,d,L,W,te,le){return new tF(D,d,L,W,te,le)}class tF extends y6{constructor(d,L,W,te,le,pe){super(W,te,le,pe),this._numGeometries=d,this._geometryType=L}geometryType(d){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}function b6(D,d,L,W,te){return new rF(D,d,L,W,te)}class rF extends y6{constructor(d,L,W,te,le){super(L,W,te,le),this._geometryTypes=d}geometryType(d){return this._geometryTypes[d]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function nF(D,d,L,W,te){let le=Of(D,L),pe,me,Ce,we;if(ag(le,W,D,L)===Wl.CONST){let xr=Y_(D,L,le),lr,Mr,Xr,an;for(let kn=0;knL?d[le++]:1);return W}function x6(D,d,L,W){let te=new Uint32Array(d[d.length-1]+1),le=0;te[0]=le;let pe=1,me=0;for(let Ce=0;Ce=nt);){let Ve=pe[we.increment()];if(Ve<=127){let bt=Ve+3,Et=pe[we.increment()],er=Math.min(Pe+bt,me);ze.fill(Et,Pe,er),Pe=er}else{let bt=256-Ve;for(let Et=0;Et=12?oF.decode(D.subarray(d,L)):function(W,te,le){let pe="",me=te;for(;me239?4:Ce>223?3:Ce>191?2:1;if(me+Ve>le)break;Ve===1?Ce<128&&(nt=Ce):Ve===2?(we=W[me+1],(192&we)==128&&(nt=(31&Ce)<<6|63&we,nt<=127&&(nt=null))):Ve===3?(we=W[me+1],ze=W[me+2],(192&we)==128&&(192&ze)==128&&(nt=(15&Ce)<<12|(63&we)<<6|63&ze,(nt<=2047||nt>=55296&&nt<=57343)&&(nt=null))):Ve===4&&(we=W[me+1],ze=W[me+2],Pe=W[me+3],(192&we)==128&&(192&ze)==128&&(192&Pe)==128&&(nt=(15&Ce)<<18|(63&we)<<12|(63&ze)<<6|63&Pe,(nt<=65535||nt>=1114112)&&(nt=null))),nt===null?(nt=65533,Ve=1):nt>65535&&(nt-=65536,pe+=String.fromCharCode(nt>>>10&1023|55296),nt=56320|1023&nt),pe+=String.fromCharCode(nt),me+=Ve}return pe}(D,d,L)}class K_ extends pp{constructor(d,L,W,te){super(d,W,te),this.offsetBuffer=L}}class T6 extends K_{constructor(d,L,W,te){super(d,L,W,te??L.length-1)}getValueFromBuffer(d){return Z_(this.dataBuffer,this.offsetBuffer[d],this.offsetBuffer[d+1])}}class wp extends K_{constructor(d,L,W,te,le){super(d,W,te,le??L.length),this.indexBuffer=L,this.indexBuffer=L}getValueFromBuffer(d){let L=this.indexBuffer[d];return Z_(this.dataBuffer,this.offsetBuffer[L],this.offsetBuffer[L+1])}}class A6 extends K_{constructor(d,L,W,te,le,pe,me){super(d,W,te,me),this.indexBuffer=L,this.symbolOffsetBuffer=le,this.symbolTableBuffer=pe}getValueFromBuffer(d){this.decodedDictionary==null&&(this.symbolLengthBuffer==null&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=function(W,te,le){let pe=[],me=new Array(te.length).fill(0);for(let Ce=1;Ce=10}function E6(D){return D===30}function lF(D){if(D.type==="scalarType"){let d=D.scalarType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if(d.type==="logicalType")return!1}else if(D.type==="complexType"){let d=D.complexType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",D),!1}function uF(D){var d;return D.type==="complexType"&&((d=D.complexType)==null?void 0:d.type)==="physicalType"&&D.complexType.physicalType===0}let cF=new TextDecoder;function J_(D,d){let L=bf(D,d,1)[0];if(L===0)return"";let W=d.get(),te=D.subarray(W,W+L);return d.add(L),cF.decode(te)}function k6(D,d){let L=bf(D,d,1)[0]>>>0;if(L<10||L>30)throw new Error(`Unsupported field type code ${L}. Supported: 10-29(scalars), 30(STRUCT)`);let W=M6(L);if(S6(L)&&(W.name=J_(D,d)),E6(L)){let te=bf(D,d,1)[0]>>>0;W.complexType.children=new Array(te);for(let le=0;le>>0,W=M6(L);if(!W)throw new Error(`Unsupported column type code ${L}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(S6(L)?W.name=J_(D,d):L>=0&&L<=3?W.name="id":L===4&&(W.name="geometry"),E6(L)){let te=bf(D,d,1)[0]>>>0,le=W.complexType;le.children=new Array(te);for(let pe=0;pe>>0,le=bf(D,d,1)[0]>>>0;W.columns=new Array(le);for(let pe=0;pe=4)for(;Xr>>0,Pe=me.get()+ze;if(Pe>W.length)throw new Error(`Block overruns tile: ${Pe} > ${W.length}`);if(bf(W,me,1)[0]>>>0!=1){me.set(Pe);continue}let[nt,Ve]=hF(W,me),bt=nt.featureTables[0],Et=null,er=null,tr=[],xr=0;for(let Mr of bt.columns){let Xr=Mr.name;if((we=Mr).type==="scalarType"&&((pe=we.scalarType)==null?void 0:pe.type)==="logicalType"&&we.scalarType.logicalType===0){let an=null;if(Mr.nullable){let On=Of(W,me),_a=me.get(),ta=M0(W,On.numValues,On.byteLength,me);me.set(_a+On.byteLength),an=new Ah(ta,On.numValues)}let kn=Of(W,me);xr=an?an.size():kn.decompressedCount,Et=dF(W,Mr,me,Xr,kn,an??xr,le)}else if(uF(Mr)){let an=bf(W,me,1)[0];if(xr===0){let kn=me.get();xr=Of(W,me).decompressedCount,me.set(kn)}er=nF(W,an,me,xr)}else{let an=lF(Mr)?bf(W,me,1)[0]:1;if(an===0)continue;let kn=sF(W,me,Mr,an,xr);if(kn)if(Array.isArray(kn))for(let On of kn)tr.push(On);else tr.push(kn)}}let lr=new GR(bt.name,er,Et,tr,Ve);Ce.push(lr),me.set(Pe)}var we;return Ce}(new Uint8Array(d));this.layers=L.reduce((W,te)=>Object.assign(Object.assign({},W),{[te.name]:new pF(te)}),{})}}class mF{constructor(d,L){this.feature=d,this.type=d.type,this.properties=d.tags?d.tags:{},this.extent=L,"id"in d&&(typeof d.id=="string"?this.id=parseInt(d.id,10):typeof d.id!="number"||isNaN(d.id)||(this.id=d.id))}loadGeometry(){let d=[],L=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(let W of L){let te=[];for(let le of W)te.push(new t(le[0],le[1]));d.push(te)}return d}}let E0="_geojsonTileLayer";function gF(D,d,L=""){d.writeVarintField(15,D.version||1),d.writeStringField(1,D.name||""),d.writeVarintField(5,D.extent||4096);let W={jsonPrefix:L,keys:[],values:[],keycache:{},valuecache:{}};for(let pe=0;pe>31}function bF(D,d){let L=D.loadGeometry(),W=D.type,te=0,le=0;for(let pe of L){let me=1;W===1&&(me=pe.length),d.writeVarint(Q_(1,me));let Ce=W===3?pe.length-1:pe.length;for(let we=0;we=0&&ze[3]>=0&&Ce.insert(me,ze[0],ze[1],ze[2],ze[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=this.encoding!=="mlt"?new aT(new Jm(this.rawTileData)).layers:new C6(this.rawTileData).layers,this.sourceLayerCoder=new QT(this.vtLayers?Object.keys(this.vtLayers).sort():[E0])),this.vtLayers}query(d,L,W,te){this.loadVTLayers();let le=d.params,pe=F/d.tileSize/d.scale,me=Jn(le.filter,le.globalState),Ce=d.queryGeometry,we=d.queryPadding*pe,ze=dv.fromPoints(Ce),Pe=this.grid.query(ze.minX-we,ze.minY-we,ze.maxX+we,ze.maxY+we),nt=dv.fromPoints(d.cameraQueryGeometry).expandBy(we),Ve=this.grid3D.query(nt.minX,nt.minY,nt.maxX,nt.maxY,(er,tr,xr,lr)=>function(Mr,Xr,an,kn,On){for(let ta of Mr)if(Xr<=ta.x&&an<=ta.y&&kn>=ta.x&&On>=ta.y)return!0;let _a=[new t(Xr,an),new t(Xr,On),new t(kn,On),new t(kn,an)];if(Mr.length>2){for(let ta of _a)if(sa(Mr,ta))return!0}for(let ta=0;ta(xr||(xr=Hl(lr)),Mr.queryIntersectsFeature({queryGeometry:Ce,feature:lr,featureState:Xr,geometry:xr,zoom:this.z,transform:d.transform,pixelsToTileUnits:pe,pixelPosMatrix:d.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:d.getElevation})))}return bt}loadMatchingFeature(d,L,W,te,le,pe,me,Ce,we,ze,Pe){let nt=this.bucketLayerIDs[L];if(pe&&!nt.some(er=>pe.has(er)))return;let Ve=this.sourceLayerCoder.decode(W),bt=this.vtLayers[Ve].feature(te);if(le.needGeometry){let er=Co(bt,!0);if(!le.filter(new Ti(this.tileID.overscaledZ),er,this.tileID.canonical))return}else if(!le.filter(new Ti(this.tileID.overscaledZ),bt))return;let Et=this.getId(bt,Ve);for(let er of nt){if(pe&&!pe.has(er))continue;let tr=Ce[er];if(!tr)continue;let xr={};Et&&ze&&(xr=ze.getState(tr.sourceLayer||E0,Et));let lr=X({},we[er]);lr.paint=D6(lr.paint,tr.paint,bt,xr,me),lr.layout=D6(lr.layout,tr.layout,bt,xr,me);let Mr=!Pe||Pe(bt,tr,xr);if(!Mr)continue;let Xr=new e6(bt,this.z,this.x,this.y,Et);Xr.layer=lr;let an=d[er];an===void 0&&(an=d[er]=[]),an.push({featureIndex:te,feature:Xr,intersectionZ:Mr})}}lookupSymbolFeatures(d,L,W,te,le,pe,me,Ce){let we={};this.loadVTLayers();let ze=Jn(le.filterSpec,le.globalState);for(let Pe of d)this.loadMatchingFeature(we,W,te,Pe,ze,pe,me,Ce,L);return we}hasLayer(d){for(let L of this.bucketLayerIDs)for(let W of L)if(d===W)return!0;return!1}getId(d,L){var W;let te=d.id;return this.promoteId&&(te=d.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[L]],typeof te=="boolean"&&(te=Number(te)),te===void 0&&(!((W=d.properties)===null||W===void 0)&&W.cluster)&&this.promoteId&&(te=Number(d.properties.cluster_id))),te}}function D6(D,d,L,W,te){return G(D,(le,pe)=>{let me=d instanceof Tu?d.get(pe):null;return me?.evaluate?me.evaluate(L,W,te):me})}function wF(D,d){return d-D}function I6(D,d,L,W,te){let le=[];for(let pe of D){let me;for(let Ce=0;Ce=W&&ze.x>=W||(we.x>=W?we=new t(W,we.y+(W-we.x)/(ze.x-we.x)*(ze.y-we.y))._round():ze.x>=W&&(ze=new t(W,we.y+(W-we.x)/(ze.x-we.x)*(ze.y-we.y))._round()),we.y>=te&&ze.y>=te||(we.y>=te?we=new t(we.x+(te-we.y)/(ze.y-we.y)*(ze.x-we.x),te)._round():ze.y>=te&&(ze=new t(we.x+(te-we.y)/(ze.y-we.y)*(ze.x-we.x),te)._round()),me&&we.equals(me[me.length-1])||(me=[we],le.push(me)),me.push(ze)))))}}return le}function R6(D,d,L,W,te){switch(d){case 1:return function(le,pe,me,Ce){let we=[];for(let ze of le)for(let Pe of ze){let nt=Ce===0?Pe.x:Pe.y;nt>=pe&&nt<=me&&we.push([Pe])}return we}(D,L,W,te);case 2:return F6(D,L,W,te,!1);case 3:return F6(D,L,W,te,!0)}return[]}function TF(D,d,L,W,te){let le=W===0?AF:MF,pe=[],me=[];for(let ze=0;zed&&pe.push(le(Pe,nt,d)):Ve>L?bt=d&&(pe.push(le(Pe,nt,d)),Et=!0),bt>L&&Ve<=L&&(pe.push(le(Pe,nt,L)),Et=!0),!te&&Et&&(me.push(pe),pe=[])}let Ce=D.length-1,we=W===0?D[Ce].x:D[Ce].y;return we>=d&&we<=L&&pe.push(D[Ce]),te&&pe.length>0&&!pe[0].equals(pe[pe.length-1])&&pe.push(new t(pe[0].x,pe[0].y)),pe.length>0&&me.push(pe),me}function F6(D,d,L,W,te){let le=[];for(let pe of D){let me=TF(pe,d,L,W,te);me.length>0&&le.push(...me)}return le}function AF(D,d,L){return new t(L,D.y+(L-D.x)/(d.x-D.x)*(d.y-D.y))}function MF(D,d,L){return new t(D.x+(L-D.y)/(d.y-D.y)*(d.x-D.x),L)}Ci("FeatureIndex",P6,{omit:["rawTileData","sourceLayerCoder"]});class Od extends t{constructor(d,L,W,te){super(d,L),this.angle=W,te!==void 0&&(this.segment=te)}clone(){return new Od(this.x,this.y,this.angle,this.segment)}}function z6(D,d,L,W,te){if(d.segment===void 0||L===0)return!0;let le=d,pe=d.segment+1,me=0;for(;me>-L/2;){if(pe--,pe<0)return!1;me-=D[pe].dist(le),le=D[pe]}me+=D[pe].dist(D[pe+1]),pe++;let Ce=[],we=0;for(;meW;)we-=Ce.shift().angleDelta;if(we>te)return!1;pe++,me+=ze.dist(Pe)}return!0}function B6(D){let d=0;for(let L=0;Lwe){let bt=(we-Ce)/Ve,Et=Ls.number(Pe.x,nt.x,bt),er=Ls.number(Pe.y,nt.y,bt),tr=new Od(Et,er,nt.angleTo(Pe),ze);return tr._round(),!pe||z6(D,tr,me,pe,d)?tr:void 0}Ce+=Ve}}function EF(D,d,L,W,te,le,pe,me,Ce){let we=N6(W,le,pe),ze=O6(W,te),Pe=ze*pe,nt=D[0].x===0||D[0].x===Ce||D[0].y===0||D[0].y===Ce;return d-Pe=0&&Mr=0&&Xr=0&&nt+we<=ze){let an=new Od(Mr,Xr,xr,bt);an._round(),W&&!z6(D,an,le,W,te)||Ve.push(an)}}Pe+=tr}return me||Ve.length||pe||(Ve=j6(D,Pe/2,L,W,te,le,pe,!0,Ce)),Ve}function U6(D,d,L,W){let te=[],le=D.image,pe=le.pixelRatio,me=le.paddedRect.w-2,Ce=le.paddedRect.h-2,we={x1:D.left,y1:D.top,x2:D.right,y2:D.bottom},ze=le.stretchX||[[0,me]],Pe=le.stretchY||[[0,Ce]],nt=(na,li)=>na+li[1]-li[0],Ve=ze.reduce(nt,0),bt=Pe.reduce(nt,0),Et=me-Ve,er=Ce-bt,tr=0,xr=Ve,lr=0,Mr=bt,Xr=0,an=Et,kn=0,On=er;if(le.content&&W){let na=le.content,li=na[2]-na[0],xi=na[3]-na[1];(le.textFitWidth||le.textFitHeight)&&(we=BT(D)),tr=ig(ze,0,na[0]),lr=ig(Pe,0,na[1]),xr=ig(ze,na[0],na[2]),Mr=ig(Pe,na[1],na[3]),Xr=na[0]-tr,kn=na[1]-lr,an=li-xr,On=xi-Mr}let _a=we.x1,ta=we.y1,Ba=we.x2-_a,Za=we.y2-ta,Da=(na,li,xi,ui)=>{let Ai=og(na.stretch-tr,xr,Ba,_a),Lo=sg(na.fixed-Xr,an,na.stretch,Ve),bs=og(li.stretch-lr,Mr,Za,ta),js=sg(li.fixed-kn,On,li.stretch,bt),tl=og(xi.stretch-tr,xr,Ba,_a),sf=sg(xi.fixed-Xr,an,xi.stretch,Ve),vu=og(ui.stretch-lr,Mr,Za,ta),sc=sg(ui.fixed-kn,On,ui.stretch,bt),Ac=new t(Ai,bs),Yl=new t(tl,bs),Vc=new t(tl,vu),xf=new t(Ai,vu),wf=new t(Lo/pe,js/pe),Wf=new t(sf/pe,sc/pe),lf=d*Math.PI/180;if(lf){let Mc=Math.sin(lf),au=Math.cos(lf),Ju=[au,-Mc,Mc,au];Ac._matMult(Ju),Yl._matMult(Ju),xf._matMult(Ju),Vc._matMult(Ju)}let Yf=na.stretch+na.fixed,vh=li.stretch+li.fixed;return{tl:Ac,tr:Yl,bl:xf,br:Vc,tex:{x:le.paddedRect.x+1+Yf,y:le.paddedRect.y+1+vh,w:xi.stretch+xi.fixed-Yf,h:ui.stretch+ui.fixed-vh},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:wf,pixelOffsetBR:Wf,minFontScaleX:an/pe/Ba,minFontScaleY:On/pe/Za,isSDF:L}};if(W&&(le.stretchX||le.stretchY)){let na=q6(ze,Et,Ve),li=q6(Pe,er,bt);for(let xi=0;xi0&&(Et=Math.max(10,Et),this.circleDiameter=Et)}else{let nt=!((Pe=pe.image)===null||Pe===void 0)&&Pe.content&&(pe.image.textFitWidth||pe.image.textFitHeight)?BT(pe):{x1:pe.left,y1:pe.top,x2:pe.right,y2:pe.bottom};nt.y1=nt.y1*me-Ce[0],nt.y2=nt.y2*me+Ce[2],nt.x1=nt.x1*me-Ce[3],nt.x2=nt.x2*me+Ce[1];let Ve=pe.collisionPadding;if(Ve&&(nt.x1-=Ve[0]*me,nt.y1-=Ve[1]*me,nt.x2+=Ve[2]*me,nt.y2+=Ve[3]*me),ze){let bt=new t(nt.x1,nt.y1),Et=new t(nt.x2,nt.y1),er=new t(nt.x1,nt.y2),tr=new t(nt.x2,nt.y2),xr=ze*Math.PI/180;bt._rotate(xr),Et._rotate(xr),er._rotate(xr),tr._rotate(xr),nt.x1=Math.min(bt.x,Et.x,er.x,tr.x),nt.x2=Math.max(bt.x,Et.x,er.x,tr.x),nt.y1=Math.min(bt.y,Et.y,er.y,tr.y),nt.y2=Math.max(bt.y,Et.y,er.y,tr.y)}d.emplaceBack(L.x,L.y,nt.x1,nt.y1,nt.x2,nt.y2,W,te,le)}this.boxEndIndex=d.length}}class kF{constructor(d=[],L=(W,te)=>Wte?1:0){if(this.data=d,this.length=this.data.length,this.compare=L,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(d){this.data.push(d),this._up(this.length++)}pop(){if(this.length===0)return;let d=this.data[0],L=this.data.pop();return--this.length>0&&(this.data[0]=L,this._down(0)),d}peek(){return this.data[0]}_up(d){let{data:L,compare:W}=this,te=L[d];for(;d>0;){let le=d-1>>1,pe=L[le];if(W(te,pe)>=0)break;L[d]=pe,d=le}L[d]=te}_down(d){let{data:L,compare:W}=this,te=this.length>>1,le=L[d];for(;d=0)break;L[d]=L[pe],d=pe}L[d]=le}}function CF(D,d=1){let L=dv.fromPoints(D[0]),W=Math.min(L.width(),L.height()),te=W/2,le=new kF([],LF),{minX:pe,minY:me,maxX:Ce,maxY:we}=L;if(W===0)return new t(pe,me);for(let nt=pe;ntPe.d||!Pe.d)&&(Pe=nt),nt.max-Pe.d<=d||(te=nt.h/2,le.push(new Tp(nt.p.x-te,nt.p.y-te,te,D)),le.push(new Tp(nt.p.x+te,nt.p.y-te,te,D)),le.push(new Tp(nt.p.x-te,nt.p.y+te,te,D)),le.push(new Tp(nt.p.x+te,nt.p.y+te,te,D)))}return ze.d>0&&Pe.d-ze.d<=d?ze.p:Pe.p}function LF(D,d){return d.max-D.max}class Tp{constructor(d,L,W,te){this.p=new t(d,L),this.h=W,this.d=function(le,pe){let me=!1,Ce=1/0;for(let we of pe)for(let ze=0,Pe=we.length,nt=Pe-1;zele.y!=bt.y>le.y&&le.x<(bt.x-Ve.x)*(le.y-Ve.y)/(bt.y-Ve.y)+Ve.x&&(me=!me),Ce=Math.min(Ce,dn(le,Ve,bt))}return(me?1:-1)*Math.sqrt(Ce)}(this.p,te),this.max=this.d+this.h*Math.SQRT2}}var of;l.aM=void 0,(of=l.aM||(l.aM={}))[of.center=1]="center",of[of.left=2]="left",of[of.right=3]="right",of[of.top=4]="top",of[of.bottom=5]="bottom",of[of["top-left"]=6]="top-left",of[of["top-right"]=7]="top-right",of[of["bottom-left"]=8]="bottom-left",of[of["bottom-right"]=9]="bottom-right";let eb=Number.POSITIVE_INFINITY;function V6(D,d){return d[1]!==eb?function(L,W,te){let le=0,pe=0;switch(W=Math.abs(W),te=Math.abs(te),L){case"top-right":case"top-left":case"top":pe=te-7;break;case"bottom-right":case"bottom-left":case"bottom":pe=7-te}switch(L){case"top-right":case"bottom-right":case"right":le=-W;break;case"top-left":case"bottom-left":case"left":le=W}return[le,pe]}(D,d[0],d[1]):function(L,W){let te=0,le=0;W<0&&(W=0);let pe=W/Math.SQRT2;switch(L){case"top-right":case"top-left":le=pe-7;break;case"bottom-right":case"bottom-left":le=7-pe;break;case"bottom":le=7-W;break;case"top":le=W-7}switch(L){case"top-right":case"bottom-right":te=-pe;break;case"top-left":case"bottom-left":te=pe;break;case"left":te=W;break;case"right":te=-W}return[te,le]}(D,d[0])}function H6(D,d,L){var W;let te=D.layout,le=(W=te.get("text-variable-anchor-offset"))===null||W===void 0?void 0:W.evaluate(d,{},L);if(le){let me=le.values,Ce=[];for(let we=0;went*wc);ze.startsWith("top")?Pe[1]-=7:ze.startsWith("bottom")&&(Pe[1]+=7),Ce[we+1]=Pe}return new zi(Ce)}let pe=te.get("text-variable-anchor");if(pe){let me;me=D._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[te.get("text-radial-offset").evaluate(d,{},L)*wc,eb]:te.get("text-offset").evaluate(d,{},L).map(we=>we*wc);let Ce=[];for(let we of pe)Ce.push(we,V6(we,me));return new zi(Ce)}return null}function tb(D){switch(D){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function PF(D,d,L,W,te,le,pe,me,Ce,we,ze,Pe){let nt=le.textMaxSize.evaluate(d,{});nt===void 0&&(nt=pe);let Ve=D.layers[0].layout,bt=Ve.get("icon-offset").evaluate(d,{},ze),Et=W6(L.horizontal),er=pe/24,tr=D.tilePixelRatio*er,xr=D.tilePixelRatio*nt/24,lr=D.tilePixelRatio*me,Mr=D.tilePixelRatio*Ve.get("symbol-spacing"),Xr=Ve.get("text-padding")*D.tilePixelRatio,an=function(xi,ui,Ai,Lo=1){let bs=xi.get("icon-padding").evaluate(ui,{},Ai),js=bs?.values;return[js[0]*Lo,js[1]*Lo,js[2]*Lo,js[3]*Lo]}(Ve,d,ze,D.tilePixelRatio),kn=Ve.get("text-max-angle")/180*Math.PI,On=Ve.get("text-rotation-alignment")!=="viewport"&&Ve.get("symbol-placement")!=="point",_a=Ve.get("icon-rotation-alignment")==="map"&&Ve.get("symbol-placement")!=="point",ta=Ve.get("symbol-placement"),Ba=Mr/2,Za=Ve.get("icon-text-fit"),Da;W&&Za!=="none"&&(D.allowVerticalPlacement&&L.vertical&&(Da=NT(W,L.vertical,Za,Ve.get("icon-text-fit-padding"),bt,er)),Et&&(W=NT(W,Et,Za,Ve.get("icon-text-fit-padding"),bt,er)));let na=ze?Pe.line.getGranularityForZoomLevel(ze.z):1,li=(xi,ui)=>{ui.x<0||ui.x>=F||ui.y<0||ui.y>=F||function(Ai,Lo,bs,js,tl,sf,vu,sc,Ac,Yl,Vc,xf,wf,Wf,lf,Yf,vh,Mc,au,Ju,pu,Sc,id,Mh,k0){let jd=Ai.addToLineVertexArray(Lo,bs),pv,Ap,Mp,Sp,Y6=0,X6=0,$6=0,Z6=0,rb=-1,nb=-1,od={},K6=pi("");if(Ai.allowVerticalPlacement&&js.vertical){let Tf=sc.layout.get("text-rotate").evaluate(pu,{},Mh)+90;Mp=new lg(Ac,Lo,Yl,Vc,xf,js.vertical,wf,Wf,lf,Tf),vu&&(Sp=new lg(Ac,Lo,Yl,Vc,xf,vu,vh,Mc,lf,Tf))}if(tl){let Tf=sc.layout.get("icon-rotate").evaluate(pu,{}),ih=sc.layout.get("icon-text-fit")!=="none",mv=U6(tl,Tf,id,ih),Eh=vu?U6(vu,Tf,id,ih):void 0;Ap=new lg(Ac,Lo,Yl,Vc,xf,tl,vh,Mc,!1,Tf),Y6=4*mv.length;let gv=Ai.iconSizeData,Uh=null;gv.kind==="source"?(Uh=[nd*sc.layout.get("icon-size").evaluate(pu,{})],Uh[0]>Rd&&ee(`${Ai.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):gv.kind==="composite"&&(Uh=[nd*Sc.compositeIconSizes[0].evaluate(pu,{},Mh),nd*Sc.compositeIconSizes[1].evaluate(pu,{},Mh)],(Uh[0]>Rd||Uh[1]>Rd)&&ee(`${Ai.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),Ai.addSymbols(Ai.icon,mv,Uh,Ju,au,pu,l.ax.none,Lo,jd.lineStartIndex,jd.lineLength,-1,Mh),rb=Ai.icon.placedSymbolArray.length-1,Eh&&(X6=4*Eh.length,Ai.addSymbols(Ai.icon,Eh,Uh,Ju,au,pu,l.ax.vertical,Lo,jd.lineStartIndex,jd.lineLength,-1,Mh),nb=Ai.icon.placedSymbolArray.length-1)}let J6=Object.keys(js.horizontal);for(let Tf of J6){let ih=js.horizontal[Tf];if(!pv){K6=pi(ih.text);let Eh=sc.layout.get("text-rotate").evaluate(pu,{},Mh);pv=new lg(Ac,Lo,Yl,Vc,xf,ih,wf,Wf,lf,Eh)}let mv=ih.positionedLines.length===1;if($6+=G6(Ai,Lo,ih,sf,sc,lf,pu,Yf,jd,js.vertical?l.ax.horizontal:l.ax.horizontalOnly,mv?J6:[Tf],od,rb,Sc,Mh),mv)break}js.vertical&&(Z6+=G6(Ai,Lo,js.vertical,sf,sc,lf,pu,Yf,jd,l.ax.vertical,["vertical"],od,nb,Sc,Mh));let IF=pv?pv.boxStartIndex:Ai.collisionBoxArray.length,RF=pv?pv.boxEndIndex:Ai.collisionBoxArray.length,FF=Mp?Mp.boxStartIndex:Ai.collisionBoxArray.length,zF=Mp?Mp.boxEndIndex:Ai.collisionBoxArray.length,BF=Ap?Ap.boxStartIndex:Ai.collisionBoxArray.length,NF=Ap?Ap.boxEndIndex:Ai.collisionBoxArray.length,OF=Sp?Sp.boxStartIndex:Ai.collisionBoxArray.length,jF=Sp?Sp.boxEndIndex:Ai.collisionBoxArray.length,Sh=-1,ug=(Tf,ih)=>Tf?.circleDiameter?Math.max(Tf.circleDiameter,ih):ih;Sh=ug(pv,Sh),Sh=ug(Mp,Sh),Sh=ug(Ap,Sh),Sh=ug(Sp,Sh);let Q6=Sh>-1?1:0;Q6&&(Sh*=k0/wc),Ai.glyphOffsetArray.length>=dp.MAX_GLYPHS&&ee("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),pu.sortKey!==void 0&&Ai.addToSortKeyRanges(Ai.symbolInstances.length,pu.sortKey);let UF=H6(sc,pu,Mh),[qF,VF]=function(Tf,ih){let mv=Tf.length,Eh=ih?.values;if(Eh?.length>0)for(let gv=0;gv=0?od.right:-1,od.center>=0?od.center:-1,od.left>=0?od.left:-1,od.vertical||-1,rb,nb,K6,IF,RF,FF,zF,BF,NF,OF,jF,Yl,$6,Z6,Y6,X6,Q6,0,wf,Sh,qF,VF)}(D,ui,xi,L,W,te,Da,D.layers[0],D.collisionBoxArray,d.index,d.sourceLayerIndex,D.index,tr,[Xr,Xr,Xr,Xr],On,Ce,lr,an,_a,bt,d,le,we,ze,pe)};if(ta==="line")for(let xi of I6(d.geometry,0,0,F,F)){let ui=hv(xi,na),Ai=EF(ui,Mr,kn,L.vertical||Et,W,24,xr,D.overscaling,F);for(let Lo of Ai)Et&&DF(D,Et.text,Ba,Lo)||li(ui,Lo)}else if(ta==="line-center"){for(let xi of d.geometry)if(xi.length>1){let ui=hv(xi,na),Ai=SF(ui,kn,L.vertical||Et,W,24,xr);Ai&&li(ui,Ai)}}else if(d.type==="Polygon")for(let xi of Rc(d.geometry,0)){let ui=CF(xi,16);li(hv(xi[0],na,!0),new Od(ui.x,ui.y,0))}else if(d.type==="LineString")for(let xi of d.geometry){let ui=hv(xi,na);li(ui,new Od(ui[0].x,ui[0].y,0))}else if(d.type==="Point")for(let xi of d.geometry)for(let ui of xi)li([ui],new Od(ui.x,ui.y,0))}function G6(D,d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt){let Et=function(xr,lr,Mr,Xr,an,kn,On,_a){let ta=Xr.layout.get("text-rotate").evaluate(kn,{})*Math.PI/180,Ba=[];for(let Za of lr.positionedLines)for(let Da of Za.positionedGlyphs){if(!Da.rect)continue;let na=Da.rect||{},li=4,xi=!0,ui=1,Ai=0,Lo=(an||_a)&&Da.vertical,bs=Da.metrics.advance*Da.scale/2;if(_a&&lr.verticalizable&&(Ai=Za.lineOffset/2-(Da.imageName?-(wc-Da.metrics.width*Da.scale)/2:(Da.scale-1)*wc)),Da.imageName){let Mc=On[Da.imageName];xi=Mc.sdf,ui=Mc.pixelRatio,li=1/ui}let js=an?[Da.x+bs,Da.y]:[0,0],tl=an?[0,0]:[Da.x+bs+Mr[0],Da.y+Mr[1]-Ai],sf=[0,0];Lo&&(sf=tl,tl=[0,0]);let vu=Da.metrics.isDoubleResolution?2:1,sc=(Da.metrics.left-li)*Da.scale-bs+tl[0],Ac=(-Da.metrics.top-li)*Da.scale+tl[1],Yl=sc+na.w/vu*Da.scale/ui,Vc=Ac+na.h/vu*Da.scale/ui,xf=new t(sc,Ac),wf=new t(Yl,Ac),Wf=new t(sc,Vc),lf=new t(Yl,Vc);if(Lo){let Mc=new t(-bs,bs- -17),au=-Math.PI/2,Ju=12-bs,pu=new t(22-Ju,-(Da.imageName?Ju:0)),Sc=new t(...sf);xf._rotateAround(au,Mc)._add(pu)._add(Sc),wf._rotateAround(au,Mc)._add(pu)._add(Sc),Wf._rotateAround(au,Mc)._add(pu)._add(Sc),lf._rotateAround(au,Mc)._add(pu)._add(Sc)}if(ta){let Mc=Math.sin(ta),au=Math.cos(ta),Ju=[au,-Mc,Mc,au];xf._matMult(Ju),wf._matMult(Ju),Wf._matMult(Ju),lf._matMult(Ju)}let Yf=new t(0,0),vh=new t(0,0);Ba.push({tl:xf,tr:wf,bl:Wf,br:lf,tex:na,writingMode:lr.writingMode,glyphOffset:js,sectionIndex:Da.sectionIndex,isSDF:xi,pixelOffsetTL:Yf,pixelOffsetBR:vh,minFontScaleX:0,minFontScaleY:0})}return Ba}(0,L,me,te,le,pe,W,D.allowVerticalPlacement),er=D.textSizeData,tr=null;er.kind==="source"?(tr=[nd*te.layout.get("text-size").evaluate(pe,{})],tr[0]>Rd&&ee(`${D.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):er.kind==="composite"&&(tr=[nd*Ve.compositeTextSizes[0].evaluate(pe,{},bt),nd*Ve.compositeTextSizes[1].evaluate(pe,{},bt)],(tr[0]>Rd||tr[1]>Rd)&&ee(`${D.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),D.addSymbols(D.text,Et,tr,me,le,pe,we,d,Ce.lineStartIndex,Ce.lineLength,nt,bt);for(let xr of ze)Pe[xr]=D.text.placedSymbolArray.length-1;return 4*Et.length}function W6(D){for(let d in D)return D[d];return null}function DF(D,d,L,W){let te=D.compareText;if(d in te){let le=te[d];for(let pe=le.length-1;pe>=0;pe--)if(W.dist(le[pe])this.process()),this.subscription=qe(this.target,"message",L=>this.receive(L),!1),this.globalScope=fe(self)?D:window}registerMessageHandler(D,d){this.messageHandlers[D]=d}unregisterMessageHandler(D){delete this.messageHandlers[D]}sendAsync(D,d){return new Promise((L,W)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10),le=d?qe(d.signal,"abort",()=>{le?.unsubscribe(),delete this.resolveRejects[te];let Ce={id:te,type:"",origin:location.origin,targetMapId:D.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Ce)},HR):null;this.resolveRejects[te]={resolve:Ce=>{le?.unsubscribe(),L(Ce)},reject:Ce=>{le?.unsubscribe(),W(Ce)}};let pe=[],me=Object.assign(Object.assign({},D),{id:te,sourceMapId:this.mapId,origin:location.origin,data:pt(D.data,pe)});this.target.postMessage(me,{transfer:pe})})}receive(D){let d=D.data,L=d.id,W=["file://","resource://android","null"],te=[d.origin,location.origin],le=d.origin===location.origin,pe=te.some(me=>W.includes(me));if((le||pe)&&(!d.targetMapId||this.mapId===d.targetMapId)){if(d.type===""){delete this.tasks[L];let me=this.abortControllers[L];return delete this.abortControllers[L],void(me&&me.abort())}if(fe(self)||d.mustQueue)return this.tasks[L]=d,this.taskQueue.push(L),void this.invoker.trigger();this.processTask(L,d)}}process(){if(this.taskQueue.length===0)return;let D=this.taskQueue.shift(),d=this.tasks[D];delete this.tasks[D],this.taskQueue.length>0&&this.invoker.trigger(),d&&this.processTask(D,d)}processTask(D,d){return e(this,void 0,void 0,function*(){if(d.type===""){let te=this.resolveRejects[D];return delete this.resolveRejects[D],te?void(d.error?te.reject(j(_t(d.error))):te.resolve(_t(d.data))):void 0}if(!this.messageHandlers[d.type])return void this.completeTask(D,new Error(`Could not find a registered handler for ${d.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let L=_t(d.data),W=new AbortController;this.abortControllers[D]=W;try{let te=yield this.messageHandlers[d.type](d.sourceMapId,L,W);this.completeTask(D,null,te)}catch(te){this.completeTask(D,j(te))}})}completeTask(D,d,L){let W=[];delete this.abortControllers[D];let te={id:D,type:"",sourceMapId:this.mapId,origin:location.origin,error:d?pt(d):null,data:pt(L,W)};this.target.postMessage(te,{transfer:W})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},l.O=function(){var D=new i(16);return i!=Float32Array&&(D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[11]=0,D[12]=0,D[13]=0,D[14]=0),D[0]=1,D[5]=1,D[10]=1,D[15]=1,D},l.P=t,l.Q=function(D,d,L){var W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt,Et=L[0],er=L[1],tr=L[2];return d===D?(D[12]=d[0]*Et+d[4]*er+d[8]*tr+d[12],D[13]=d[1]*Et+d[5]*er+d[9]*tr+d[13],D[14]=d[2]*Et+d[6]*er+d[10]*tr+d[14],D[15]=d[3]*Et+d[7]*er+d[11]*tr+d[15]):(te=d[1],le=d[2],pe=d[3],me=d[4],Ce=d[5],we=d[6],ze=d[7],Pe=d[8],nt=d[9],Ve=d[10],bt=d[11],D[0]=W=d[0],D[1]=te,D[2]=le,D[3]=pe,D[4]=me,D[5]=Ce,D[6]=we,D[7]=ze,D[8]=Pe,D[9]=nt,D[10]=Ve,D[11]=bt,D[12]=W*Et+me*er+Pe*tr+d[12],D[13]=te*Et+Ce*er+nt*tr+d[13],D[14]=le*Et+we*er+Ve*tr+d[14],D[15]=pe*Et+ze*er+bt*tr+d[15]),D},l.R=ys,l.S=function(D,d,L){var W=L[0],te=L[1],le=L[2];return D[0]=d[0]*W,D[1]=d[1]*W,D[2]=d[2]*W,D[3]=d[3]*W,D[4]=d[4]*te,D[5]=d[5]*te,D[6]=d[6]*te,D[7]=d[7]*te,D[8]=d[8]*le,D[9]=d[9]*le,D[10]=d[10]*le,D[11]=d[11]*le,D[12]=d[12],D[13]=d[13],D[14]=d[14],D[15]=d[15],D},l.T=kd,l.U=function(D,d,L){var W=d[0],te=d[1],le=d[2],pe=d[3],me=d[4],Ce=d[5],we=d[6],ze=d[7],Pe=d[8],nt=d[9],Ve=d[10],bt=d[11],Et=d[12],er=d[13],tr=d[14],xr=d[15],lr=L[0],Mr=L[1],Xr=L[2],an=L[3];return D[0]=lr*W+Mr*me+Xr*Pe+an*Et,D[1]=lr*te+Mr*Ce+Xr*nt+an*er,D[2]=lr*le+Mr*we+Xr*Ve+an*tr,D[3]=lr*pe+Mr*ze+Xr*bt+an*xr,D[4]=(lr=L[4])*W+(Mr=L[5])*me+(Xr=L[6])*Pe+(an=L[7])*Et,D[5]=lr*te+Mr*Ce+Xr*nt+an*er,D[6]=lr*le+Mr*we+Xr*Ve+an*tr,D[7]=lr*pe+Mr*ze+Xr*bt+an*xr,D[8]=(lr=L[8])*W+(Mr=L[9])*me+(Xr=L[10])*Pe+(an=L[11])*Et,D[9]=lr*te+Mr*Ce+Xr*nt+an*er,D[10]=lr*le+Mr*we+Xr*Ve+an*tr,D[11]=lr*pe+Mr*ze+Xr*bt+an*xr,D[12]=(lr=L[12])*W+(Mr=L[13])*me+(Xr=L[14])*Pe+(an=L[15])*Et,D[13]=lr*te+Mr*Ce+Xr*nt+an*er,D[14]=lr*le+Mr*we+Xr*Ve+an*tr,D[15]=lr*pe+Mr*ze+Xr*bt+an*xr,D},l.V=function(D,d){let L={};for(let W of d)W in D&&(L[W]=D[W]);return L},l.W=Fd,l.X=H,l.Y=YT,l.Z=WT,l._=e,l.a=Te,l.a$=function(D){var d=new i(3);return d[0]=D[0],d[1]=D[1],d[2]=D[2],d},l.a0=h,l.a1=p,l.a2=Me,l.a3=rh,l.a4=$T,l.a5=rg,l.a6=F,l.a7=A0,l.a8=dv,l.a9=25,l.aA=function(D){var d=D[0],L=D[1];return Math.sqrt(d*d+L*L)},l.aB=function(D){return D[0]=0,D[1]=0,D},l.aC=function(D,d,L){return D[0]=d[0]*L,D[1]=d[1]*L,D},l.aD=C_,l.aE=z,l.aF=function(D,d,L,W){let te=d.y-D.y,le=d.x-D.x,pe=W.y-L.y,me=W.x-L.x,Ce=pe*le-me*te;if(Ce===0)return null;let we=(me*(D.y-L.y)-pe*(D.x-L.x))/Ce;return new t(D.x+we*le,D.y+we*te)},l.aG=I6,l.aH=la,l.aI=function(D){let d=1/0,L=1/0,W=-1/0,te=-1/0;for(let le of D)d=Math.min(d,le.x),L=Math.min(L,le.y),W=Math.max(W,le.x),te=Math.max(te,le.y);return[d,L,W,te]},l.aJ=wc,l.aK=P,l.aL=function(D,d,L,W,te=!1){if(!L[0]&&!L[1])return[0,0];let le=te?W==="map"?-D.bearingInRadians:0:W==="viewport"?D.bearingInRadians:0;if(le){let pe=Math.sin(le),me=Math.cos(le);L=[L[0]*me-L[1]*pe,L[0]*pe+L[1]*me]}return[te?L[0]:P(d,L[0],D.zoom),te?L[1]:P(d,L[1],D.zoom)]},l.aN=k_,l.aO=tb,l.aP=E_,l.aQ=D=>D.type==="symbol",l.aR=Wm,l.aS=ut,l.aT=Gm,l.aU=Rt,l.aV=Xn,l.aW=_n,l.aX=ge,l.aY=ZT,l.aZ=f,l.a_=T,l.aa=R_,l.ab=D=>{let d=window.document.createElement("video");return d.muted=!0,new Promise(L=>{d.onloadstart=()=>{L(d)};for(let W of D){let te=window.document.createElement("source");nr(W)||(d.crossOrigin="Anonymous"),te.src=W,d.appendChild(te)}})},l.ac=Ht,l.ad=function(){return K++},l.ae=ce,l.af=dp,l.ag=E0,l.ah=Jn,l.ai=Co,l.aj=e6,l.ak=function(D){let d={};if(D.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(L,W,te,le)=>{let pe=te||le;return d[W]=!pe||pe.toLowerCase(),""}),d["max-age"]){let L=parseInt(d["max-age"],10);isNaN(L)?delete d["max-age"]:d["max-age"]=L}return d},l.al=oe,l.am=85.051129,l.an=ke,l.ao=function(D){return Math.pow(2,D)},l.ap=S,l.aq=XT,l.ar=function(D){return Math.log(D)/Math.LN2},l.as=function(D){var d=D[0],L=D[1];return d*d+L*L},l.at=function(D){if(!D.length)return new Set;let d=Math.max(...D.map(Ce=>Ce.canonical.z)),L=1/0,W=-1/0,te=1/0,le=-1/0,pe=[];for(let Ce of D){let{x:we,y:ze,z:Pe}=Ce.canonical,nt=Math.pow(2,d-Pe),Ve=we*nt,bt=ze*nt;pe.push({id:Ce,x:Ve,y:bt}),VeW&&(W=Ve),btle&&(le=bt)}let me=new Set;for(let Ce of pe)Ce.x!==L&&Ce.x!==W&&Ce.y!==te&&Ce.y!==le||me.add(Ce.id);return me},l.au=function(D,d){let L=Math.abs(2*D.wrap)-+(D.wrap<0),W=Math.abs(2*d.wrap)-+(d.wrap<0);return D.overscaledZ-d.overscaledZ||W-L||d.canonical.y-D.canonical.y||d.canonical.x-D.canonical.x},l.av=class{constructor(D,d){this.max=D,this.onRemove=d,this.reset()}reset(){for(let D in this.data)for(let d of this.data[D])d.timeout&&clearTimeout(d.timeout),this.onRemove(d.value);return this.data={},this.order=[],this}add(D,d,L){let W=D.wrapped().key;this.data[W]===void 0&&(this.data[W]=[]);let te={value:d,timeout:void 0};if(L!==void 0&&(te.timeout=setTimeout(()=>{this.remove(D,te)},L)),this.data[W].push(te),this.order.push(W),this.order.length>this.max){let le=this._getAndRemoveByKey(this.order[0]);le&&this.onRemove(le)}return this}has(D){return D.wrapped().key in this.data}getAndRemove(D){return this.has(D)?this._getAndRemoveByKey(D.wrapped().key):null}_getAndRemoveByKey(D){let d=this.data[D].shift();return d.timeout&&clearTimeout(d.timeout),this.data[D].length===0&&delete this.data[D],this.order.splice(this.order.indexOf(D),1),d.value}getByKey(D){let d=this.data[D];return d?d[0].value:null}get(D){return this.has(D)?this.data[D.wrapped().key][0].value:null}remove(D,d){if(!this.has(D))return this;let L=D.wrapped().key,W=d===void 0?0:this.data[L].indexOf(d),te=this.data[L][W];return this.data[L].splice(W,1),te.timeout&&clearTimeout(te.timeout),this.data[L].length===0&&delete this.data[L],this.onRemove(te.value),this.order.splice(this.order.indexOf(L),1),this}setMaxSize(D){for(this.max=D;this.order.length>this.max;){let d=this._getAndRemoveByKey(this.order[0]);d&&this.onRemove(d)}return this}filter(D){let d=[];for(let L in this.data)for(let W of this.data[L])D(W.value)||d.push(W);for(let L of d)this.remove(L.value.tileID,L)}},l.aw=function(D,d){let L=0,W=0;if(D.kind==="constant")W=D.layoutSize;else if(D.kind!=="source"){let{interpolationType:te,minZoom:le,maxZoom:pe}=D,me=te?oe(Ji.interpolationFactor(te,d,le,pe),0,1):0;D.kind==="camera"?W=Ls.number(D.minSize,D.maxSize,me):L=me}return{uSizeT:L,uSize:W}},l.ay=function(D,{uSize:d,uSizeT:L},{lowerSize:W,upperSize:te}){return D.kind==="source"?W/nd:D.kind==="composite"?Ls.number(W/nd,te/nd,L):d},l.az=R,l.b=xe,l.b$=qs,l.b0=function(D,d,L){return D[0]=d[0]-L[0],D[1]=d[1]-L[1],D[2]=d[2]-L[2],D},l.b1=function(D,d){var L=d[0],W=d[1],te=d[2],le=L*L+W*W+te*te;return le>0&&(le=1/Math.sqrt(le)),D[0]=d[0]*le,D[1]=d[1]*le,D[2]=d[2]*le,D},l.b2=u,l.b3=function(D,d){return D[0]*d[0]+D[1]*d[1]+D[2]*d[2]},l.b4=function(D,d,L){return D[0]=d[0]*L[0],D[1]=d[1]*L[1],D[2]=d[2]*L[2],D[3]=d[3]*L[3],D},l.b5=C,l.b6=function(D,d,L){let W=d[0]*L[0]+d[1]*L[1]+d[2]*L[2];return W===0?null:(-(D[0]*L[0]+D[1]*L[1]+D[2]*L[2])-L[3])/W},l.b7=b,l.b8=function(D,d,L){return D[0]=d[0]*L,D[1]=d[1]*L,D[2]=d[2]*L,D[3]=d[3]*L,D},l.b9=function(D,d){return D[0]*d[0]+D[1]*d[1]+D[2]*d[2]+D[3]},l.bA=N,l.bB=function(D,d,L){var W=L[0],te=L[1],le=L[2],pe=L[3],me=d[0],Ce=d[1],we=d[2],ze=te*we-le*Ce,Pe=le*me-W*we,nt=W*Ce-te*me;return D[0]=me+pe*(ze+=ze)+te*(nt+=nt)-le*(Pe+=Pe),D[1]=Ce+pe*Pe+le*ze-W*nt,D[2]=we+pe*nt+W*Pe-te*ze,D},l.bC=function(D,d,L){let W=(te=[D[0],D[1],D[2],d[0],d[1],d[2],L[0],L[1],L[2]])[0]*((ze=te[8])*(pe=te[4])-(me=te[5])*(we=te[7]))+te[1]*(-ze*(le=te[3])+me*(Ce=te[6]))+te[2]*(we*le-pe*Ce);var te,le,pe,me,Ce,we,ze;if(W===0)return null;let Pe=u([],[d[0],d[1],d[2]],[L[0],L[1],L[2]]),nt=u([],[L[0],L[1],L[2]],[D[0],D[1],D[2]]),Ve=u([],[D[0],D[1],D[2]],[d[0],d[1],d[2]]),bt=f([],Pe,-D[3]);return T(bt,bt,f([],nt,-d[3])),T(bt,bt,f([],Ve,-L[3])),f(bt,bt,1/W),bt},l.bD=I_,l.bE=function(){return new Float64Array(4)},l.bF=function(D,d,L,W){var te=[],le=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],le[0]=te[0]*Math.cos(W)-te[1]*Math.sin(W),le[1]=te[0]*Math.sin(W)+te[1]*Math.cos(W),le[2]=te[2],D[0]=le[0]+L[0],D[1]=le[1]+L[1],D[2]=le[2]+L[2],D},l.bG=function(D,d,L,W){var te=[],le=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],le[0]=te[0],le[1]=te[1]*Math.cos(W)-te[2]*Math.sin(W),le[2]=te[1]*Math.sin(W)+te[2]*Math.cos(W),D[0]=le[0]+L[0],D[1]=le[1]+L[1],D[2]=le[2]+L[2],D},l.bH=function(D,d,L,W){var te=[],le=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],le[0]=te[2]*Math.sin(W)+te[0]*Math.cos(W),le[1]=te[1],le[2]=te[2]*Math.cos(W)-te[0]*Math.sin(W),D[0]=le[0]+L[0],D[1]=le[1]+L[1],D[2]=le[2]+L[2],D},l.bI=function(D,d,L){var W=Math.sin(L),te=Math.cos(L),le=d[0],pe=d[1],me=d[2],Ce=d[3],we=d[8],ze=d[9],Pe=d[10],nt=d[11];return d!==D&&(D[4]=d[4],D[5]=d[5],D[6]=d[6],D[7]=d[7],D[12]=d[12],D[13]=d[13],D[14]=d[14],D[15]=d[15]),D[0]=le*te-we*W,D[1]=pe*te-ze*W,D[2]=me*te-Pe*W,D[3]=Ce*te-nt*W,D[8]=le*W+we*te,D[9]=pe*W+ze*te,D[10]=me*W+Pe*te,D[11]=Ce*W+nt*te,D},l.bJ=function(D,d){let L=U(D,360),W=U(d,360),te=W-L,le=W>L?te-360:te+360;return Math.abs(te)0?pe:-pe},l.bM=function(D,d){let L=U(D,2*Math.PI),W=U(d,2*Math.PI);return Math.min(Math.abs(L-W),Math.abs(L-W+2*Math.PI),Math.abs(L-W-2*Math.PI))},l.bN=function(){let D={},d=ht.$version;for(let L in ht.$root){let W=ht.$root[L];if(W.required){let te=null;te=L==="version"?d:W.type==="array"?[]:{},te!=null&&(D[L]=te)}}return D},l.bO=At,l.bP=Nt,l.bQ=function D(d,L){if(Array.isArray(d)){if(!Array.isArray(L)||d.length!==L.length)return!1;for(let W=0;WD.type==="raster",l.bV=q,l.bW=function(D,d){if(!D)return[{command:"setStyle",args:[d]}];let L=[];try{if(!He(D.version,d.version))return[{command:"setStyle",args:[d]}];He(D.center,d.center)||L.push({command:"setCenter",args:[d.center]}),He(D.state,d.state)||L.push({command:"setGlobalState",args:[d.state]}),He(D.centerAltitude,d.centerAltitude)||L.push({command:"setCenterAltitude",args:[d.centerAltitude]}),He(D.zoom,d.zoom)||L.push({command:"setZoom",args:[d.zoom]}),He(D.bearing,d.bearing)||L.push({command:"setBearing",args:[d.bearing]}),He(D.pitch,d.pitch)||L.push({command:"setPitch",args:[d.pitch]}),He(D.roll,d.roll)||L.push({command:"setRoll",args:[d.roll]}),He(D.sprite,d.sprite)||L.push({command:"setSprite",args:[d.sprite]}),He(D.glyphs,d.glyphs)||L.push({command:"setGlyphs",args:[d.glyphs]}),He(D.transition,d.transition)||L.push({command:"setTransition",args:[d.transition]}),He(D.light,d.light)||L.push({command:"setLight",args:[d.light]}),He(D.terrain,d.terrain)||L.push({command:"setTerrain",args:[d.terrain]}),He(D.sky,d.sky)||L.push({command:"setSky",args:[d.sky]}),He(D.projection,d.projection)||L.push({command:"setProjection",args:[d.projection]});let W={},te=[];(function(pe,me,Ce,we){let ze;for(ze in me=me||{},pe=pe||{})Object.prototype.hasOwnProperty.call(pe,ze)&&(Object.prototype.hasOwnProperty.call(me,ze)||Je(ze,Ce,we));for(ze in me)Object.prototype.hasOwnProperty.call(me,ze)&&(Object.prototype.hasOwnProperty.call(pe,ze)?He(pe[ze],me[ze])||(pe[ze].type==="geojson"&&me[ze].type==="geojson"&&dt(pe,me,ze)?$e(Ce,{command:"setGeoJSONSourceData",args:[ze,me[ze].data]}):Mt(ze,me,Ce,we)):Ze(ze,me,Ce))})(D.sources,d.sources,te,W);let le=[];D.layers&&D.layers.forEach(pe=>{"source"in pe&&W[pe.source]?L.push({command:"removeLayer",args:[pe.id]}):le.push(pe)}),L=L.concat(te),function(pe,me,Ce){me=me||[];let we=(pe=pe||[]).map(Ct),ze=me.map(Ct),Pe=pe.reduce(Vt,{}),nt=me.reduce(Vt,{}),Ve=we.slice(),bt=Object.create(null),Et,er,tr,xr,lr;for(let Mr=0,Xr=0;Mrg?(te=Math.acos(le),pe=Math.sin(te),me=Math.sin((1-W)*te)/pe,Ce=Math.sin(W*te)/pe):(me=1-W,Ce=W),D[0]=me*we+Ce*Ve,D[1]=me*ze+Ce*bt,D[2]=me*Pe+Ce*Et,D[3]=me*nt+Ce*er,D},l.bm=function(D){let d=new Float64Array(9);var L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt,Et,er,tr,xr,lr;Pe=(te=(W=D)[0])*(Ce=te+te),nt=(le=W[1])*Ce,bt=(pe=W[2])*Ce,Et=pe*(we=le+le),tr=(me=W[3])*Ce,xr=me*we,lr=me*(ze=pe+pe),(L=d)[0]=1-(Ve=le*we)-(er=pe*ze),L[3]=nt-lr,L[6]=bt+xr,L[1]=nt+lr,L[4]=1-Pe-er,L[7]=Et-tr,L[2]=bt-xr,L[5]=Et+tr,L[8]=1-Pe-Ve;let Mr=ge(-Math.asin(oe(d[2],-1,1))),Xr,an;return Math.hypot(d[5],d[8])<.001?(Xr=0,an=-ge(Math.atan2(d[3],d[4]))):(Xr=ge(d[5]===0&&d[8]===0?0:Math.atan2(d[5],d[8])),an=ge(d[1]===0&&d[0]===0?0:Math.atan2(d[1],d[0]))),{roll:Xr,pitch:Mr+90,bearing:an}},l.bn=function(D,d){return D.roll==d.roll&&D.pitch==d.pitch&&D.bearing==d.bearing},l.bo=ga,l.bp=To,l.bq=sp,l.br=m0,l.bs=op,l.bt=Z,l.bu=Q,l.bv=Mo,l.bw=function(D,d,L,W,te){return Z(W,te,oe((D-d)/(L-d),0,1))},l.bx=function(D,d,L,W){return D[0]=d[0]+L[0]*W,D[1]=d[1]+L[1]*W,D[2]=d[2]+L[2]*W,D},l.by=U,l.bz=function(){return new Float64Array(3)},l.c=Ge,l.c$=_c,l.c0=class extends fo{constructor(D,d){super(D,d),this.current=Vs}set(D){if(D[12]!==this.current[12]||D[0]!==this.current[0])return this.current=D,void this.gl.uniformMatrix4fv(this.location,!1,D);for(let d=1;d<16;d++)if(D[d]!==this.current[d]){this.current=D,this.gl.uniformMatrix4fv(this.location,!1,D);break}}},l.c1=jo,l.c2=class extends fo{constructor(D,d){super(D,d),this.current=[0,0,0]}set(D){D[0]===this.current[0]&&D[1]===this.current[1]&&D[2]===this.current[2]||(this.current=D,this.gl.uniform3f(this.location,D[0],D[1],D[2]))}},l.c3=class extends fo{constructor(D,d){super(D,d),this.current=[0,0]}set(D){D[0]===this.current[0]&&D[1]===this.current[1]||(this.current=D,this.gl.uniform2f(this.location,D[0],D[1]))}},l.c4=w,l.c5=function(D,d){var L=Math.sin(d),W=Math.cos(d);return D[0]=W,D[1]=L,D[2]=0,D[3]=-L,D[4]=W,D[5]=0,D[6]=0,D[7]=0,D[8]=1,D},l.c6=function(D,d,L){var W=d[0],te=d[1],le=d[2];return D[0]=W*L[0]+te*L[3]+le*L[6],D[1]=W*L[1]+te*L[4]+le*L[7],D[2]=W*L[2]+te*L[5]+le*L[8],D},l.c7=function(D,d,L,W,te,le,pe){var me=1/(d-L),Ce=1/(W-te),we=1/(le-pe);return D[0]=-2*me,D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[5]=-2*Ce,D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[10]=2*we,D[11]=0,D[12]=(d+L)*me,D[13]=(te+W)*Ce,D[14]=(pe+le)*we,D[15]=1,D},l.c8=class extends fo{constructor(D,d){super(D,d),this.current=new Array}set(D){if(D!=this.current){this.current=D;let d=new Float32Array(4*D.length);for(let L=0;L25||W<0||W>=1||L<0||L>=1)},l.cE=function(D,d){return D[0]=d[0],D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[5]=d[1],D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[10]=d[2],D[11]=0,D[12]=0,D[13]=0,D[14]=0,D[15]=1,D},l.cF=class extends Qt{},l.cG=Tt,l.cH=function(D,d){Ge.REGISTERED_PROTOCOLS[D]=d},l.cI=function(D){delete Ge.REGISTERED_PROTOCOLS[D]},l.cJ=function(D,d){let L={};for(let te=0;teli*wc)}let Ba=Ce?"center":te.get("text-justify").evaluate(Pe,{},D.canonical),Za=te.get("symbol-placement")==="point"?te.get("text-max-width").evaluate(Pe,{},D.canonical)*wc:1/0,Da=()=>{D.bucket.allowVerticalPlacement&&Ur(an)&&(er.vertical=Qm(tr,D.glyphMap,D.glyphPositions,D.imagePositions,nt,Za,me,_a,"left",On,lr,l.ax.vertical,!0,bt,Ve))};if(!Ce&&ta){let na=new Set;if(Ba==="auto")for(let xi=0;xigF(me,Ce,le),W.layers[pe])}(D,L,d),L.finish()},l.cT=function(D,d,L,W,te,le){let pe=R6(D,d,L,te,0);return pe=R6(pe,d,W,le,1),pe},l.cU=class{constructor(D){this.maxEntries=D,this.map=new Map}get(D){let d=this.map.get(D);return d!==void 0&&(this.map.delete(D),this.map.set(D,d)),d}set(D,d){if(this.map.has(D))this.map.delete(D);else if(this.map.size>=this.maxEntries){let L=this.map.keys().next().value;this.map.delete(L)}this.map.set(D,d)}clear(){this.map.clear()}},l.cV=aT,l.cW=Jm,l.cX=C6,l.cY=function(D,d,L,W,te){return e(this,void 0,void 0,function*(){if(p())try{return yield Me(D,d,L,W,te)}catch{}return function(le,pe,me,Ce,we){let ze=le.width,Pe=le.height;Ie&&Ue||(Ie=new OffscreenCanvas(ze,Pe),Ue=Ie.getContext("2d",{willReadFrequently:!0})),Ie.width=ze,Ie.height=Pe,Ue.drawImage(le,0,0,ze,Pe);let nt=Ue.getImageData(pe,me,Ce,we);return Ue.clearRect(0,0,ze,Pe),nt.data}(D,d,L,W,te)})},l.cZ=Cd,l.c_=class{constructor(D,d){this.layers={[E0]:this},this.name=E0,this.version=d?d.version:1,this.extent=d?d.extent:4096,this.length=D.length,this.features=D}feature(D){return new mF(this.features[D],this.extent)}},l.ca=class extends mn{},l.cb=vR,l.cc=class extends Oa{},l.cd=Au,l.ce=function(D){return D<=1?1:Math.pow(2,Math.ceil(Math.log(D)/Math.LN2))},l.cf=nu,l.cg=function(D,d,L){var W=d[0],te=d[1],le=d[2],pe=L[3]*W+L[7]*te+L[11]*le+L[15];return D[0]=(L[0]*W+L[4]*te+L[8]*le+L[12])/(pe=pe||1),D[1]=(L[1]*W+L[5]*te+L[9]*le+L[13])/pe,D[2]=(L[2]*W+L[6]*te+L[10]*le+L[14])/pe,D},l.ch=class extends gr{},l.ci=class extends y{},l.cj=function(D,d){return D[0]===d[0]&&D[1]===d[1]&&D[2]===d[2]&&D[3]===d[3]&&D[4]===d[4]&&D[5]===d[5]&&D[6]===d[6]&&D[7]===d[7]&&D[8]===d[8]&&D[9]===d[9]&&D[10]===d[10]&&D[11]===d[11]&&D[12]===d[12]&&D[13]===d[13]&&D[14]===d[14]&&D[15]===d[15]},l.ck=function(D,d){var L=D[0],W=D[1],te=D[2],le=D[3],pe=D[4],me=D[5],Ce=D[6],we=D[7],ze=D[8],Pe=D[9],nt=D[10],Ve=D[11],bt=D[12],Et=D[13],er=D[14],tr=D[15],xr=d[0],lr=d[1],Mr=d[2],Xr=d[3],an=d[4],kn=d[5],On=d[6],_a=d[7],ta=d[8],Ba=d[9],Za=d[10],Da=d[11],na=d[12],li=d[13],xi=d[14],ui=d[15];return Math.abs(L-xr)<=g*Math.max(1,Math.abs(L),Math.abs(xr))&&Math.abs(W-lr)<=g*Math.max(1,Math.abs(W),Math.abs(lr))&&Math.abs(te-Mr)<=g*Math.max(1,Math.abs(te),Math.abs(Mr))&&Math.abs(le-Xr)<=g*Math.max(1,Math.abs(le),Math.abs(Xr))&&Math.abs(pe-an)<=g*Math.max(1,Math.abs(pe),Math.abs(an))&&Math.abs(me-kn)<=g*Math.max(1,Math.abs(me),Math.abs(kn))&&Math.abs(Ce-On)<=g*Math.max(1,Math.abs(Ce),Math.abs(On))&&Math.abs(we-_a)<=g*Math.max(1,Math.abs(we),Math.abs(_a))&&Math.abs(ze-ta)<=g*Math.max(1,Math.abs(ze),Math.abs(ta))&&Math.abs(Pe-Ba)<=g*Math.max(1,Math.abs(Pe),Math.abs(Ba))&&Math.abs(nt-Za)<=g*Math.max(1,Math.abs(nt),Math.abs(Za))&&Math.abs(Ve-Da)<=g*Math.max(1,Math.abs(Ve),Math.abs(Da))&&Math.abs(bt-na)<=g*Math.max(1,Math.abs(bt),Math.abs(na))&&Math.abs(Et-li)<=g*Math.max(1,Math.abs(Et),Math.abs(li))&&Math.abs(er-xi)<=g*Math.max(1,Math.abs(er),Math.abs(xi))&&Math.abs(tr-ui)<=g*Math.max(1,Math.abs(tr),Math.abs(ui))},l.cl=function(D,d){return D[0]=d[0],D[1]=d[1],D[2]=d[2],D[3]=d[3],D[4]=d[4],D[5]=d[5],D[6]=d[6],D[7]=d[7],D[8]=d[8],D[9]=d[9],D[10]=d[10],D[11]=d[11],D[12]=d[12],D[13]=d[13],D[14]=d[14],D[15]=d[15],D},l.cm=D=>D.type==="circle",l.cn=D=>D.type==="heatmap",l.co=D=>D.type==="line",l.cp=D=>D.type==="fill",l.cq=D=>D.type==="fill-extrusion",l.cr=D=>D.type==="hillshade",l.cs=D=>D.type==="color-relief",l.ct=D=>D.type==="background",l.cu=D=>D.type==="custom",l.cv=re,l.cw=function(D,d,L){if(d<=0)return D;let W=1/d;return L===void 0||Math.abs(L)<1e-10?Math.round(D*W)/W:(L>0?Math.ceil(D*W-1e-9):Math.floor(D*W+1e-10))/W},l.cx=function(D,d,L){let W=B(d.x-L.x,d.y-L.y),te=B(D.x-L.x,D.y-L.y);var le,pe;return ge(Math.atan2(W[0]*te[1]-W[1]*te[0],(le=W)[0]*(pe=te)[0]+le[1]*pe[1]))},l.cy=ae,l.cz=function(D,d){var L;if(!ve[d])return!1;let W=D?.target,te=((L=W?.ownerDocument)===null||L===void 0?void 0:L.defaultView)||window;return D instanceof te.MouseEvent||D instanceof te.WheelEvent},l.d=j,l.d0=class{constructor(D,d){let L=(d=this.options=Object.assign({},nR,d)).debug;if(L&&console.time("preprocess data"),d.maxZoom<0||d.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(d.promoteId&&d.generateId)throw new Error("promoteId and generateId cannot be used together.");let W=d_(D,d);L&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",d.indexMaxZoom,d.indexMaxPoints),console.time("generate tiles")),W=g_(W,d),d.updateable&&(this.source=W),this.initializeIndex(W,d)}initializeIndex(D,d){this.tileIndex=d.cluster?new ZI(d.clusterOptions):new rR(d),D.length&&this.tileIndex.initialize(D)}getTile(D,d,L){return d=+d,L=+L,(D=+D)<0||D>24?null:this.tileIndex.getTile(D,d,L)}updateData(D,d){let L=this.options;if(!L.updateable)throw new Error("to update tile geojson `updateable` option must be set to true");let{affected:W,source:te}=function(le,pe,me){let Ce=function(ze,Pe){var nt,Ve;return ze?{removeAll:ze.removeAll,remove:new Set(ze.remove||[]),add:new Map((nt=ze.add)==null?void 0:nt.map(bt=>[Pe.promoteId?bt.properties[Pe.promoteId]:bt.id,bt])),update:new Map((Ve=ze.update)==null?void 0:Ve.map(bt=>[bt.id,bt]))}:{remove:new Set,add:new Map,update:new Map}}(pe,me),we=[];if(Ce.removeAll&&(we=le,le=[]),Ce.remove.size||Ce.add.size){let ze=[];for(let Pe of le)(Ce.remove.has(Pe.id)||Ce.add.has(Pe.id))&&ze.push(Pe);if(ze.length){we.push(...ze);let Pe=new Set(ze.map(nt=>nt.id));le=le.filter(nt=>!Pe.has(nt.id))}if(Ce.add.size){let Pe=d_({type:"FeatureCollection",features:Array.from(Ce.add.values())},me);Pe=g_(Pe,me),we.push(...Pe),le.push(...Pe)}}if(Ce.update.size){let ze=new Map,Pe=[];for(let nt of le)Ce.update.has(nt.id)?ze.set(nt.id,[...ze.get(nt.id)||[],nt]):Pe.push(nt);for(let[nt,Ve]of Ce.update){let bt=ze.get(nt);if(!bt||bt.length===0)continue;let Et=$I(bt,Ve,me);we.push(...bt,...Et),Pe.push(...Et)}le=Pe}return{affected:we,source:le}}(this.source,D,L);d&&({affected:W,source:te}=this.filterUpdate(te,W,d)),W.length&&(this.source=te,this.tileIndex.updateIndex(te,W,L))}filterUpdate(D,d,L){let W=new Set;for(let te of D)te.id!=null&&(L(Xm(te))||(d.push(te),W.add(te.id)));return{affected:d,source:D=D.filter(te=>!W.has(te.id))}}getData(){if(!this.options.updateable)throw new Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map(D=>Xm(D))}}updateClusterOptions(D,d){let L=this.options.cluster;this.options.cluster=D,this.options.clusterOptions=d,L!=D?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(D){return this.tileIndex.getClusterExpansionZoom(D)}getClusterChildren(D){return this.tileIndex.getChildren(D)}getClusterLeaves(D,d,L){return this.tileIndex.getLeaves(D,d,L)}},l.d1=Yi,l.e=X,l.f=nr,l.g=gt,l.h=D=>e(void 0,void 0,void 0,function*(){if(D.byteLength===0)return createImageBitmap(new ImageData(1,1));let d=new Blob([new Uint8Array(D)],{type:"image/png"});try{return createImageBitmap(d)}catch(L){throw new Error(`Could not load image because of ${j(L).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),l.i=fe,l.j=D=>new Promise((d,L)=>{let W=new Image;W.onload=()=>{d(W),URL.revokeObjectURL(W.src),W.onload=null,window.requestAnimationFrame(()=>W.src=Ae)},W.onerror=()=>L(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let te=new Blob([new Uint8Array(D)],{type:"image/png"});W.src=D.byteLength?URL.createObjectURL(te):Ae}),l.k=(D,d)=>Kt(X(D,{type:"json"}),d),l.l=Ot,l.m=Kt,l.n=sr,l.o=(D,d)=>Kt(X(D,{type:"arrayBuffer"}),d),l.p=RT,l.q=function(D){return new Jm(D).readFields(CR,[])},l.r=function(D){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(D))},l.s=qe,l.t=Ds,l.u=Bs,l.v=xc,l.w=ee,l.x=ht,l.y=Po,l.z=Ol}),E("worker",["./shared"],function(l){"use strict";class e{constructor(T,f){this.keyCache={},T&&this.replace(T,f)}replace(T,f){this._layerConfigs={},this._layers={},this.update(T,[],f)}update(T,f,u){for(let b of T){this._layerConfigs[b.id]=b;let z=this._layers[b.id]=l.bT(b,u);z._featureFilter=l.ah(z.filter,u),this.keyCache[b.id]&&delete this.keyCache[b.id]}for(let b of f)delete this.keyCache[b],delete this._layerConfigs[b],delete this._layers[b];this.familiesBySource={};let A=l.cJ(Object.values(this._layerConfigs),this.keyCache);for(let b of A){let z=b.map(P=>this._layers[P.id]),I=z[0];if(I.isHidden())continue;let N=I.source||"",R=this.familiesBySource[N];R||(R=this.familiesBySource[N]={});let B=I.sourceLayer||l.ag,F=R[B];F||(F=R[B]=[]),F.push(z)}}}class t{constructor(T){let f={},u=[];for(let I in T){let N=T[I],R=f[I]={};for(let B in N){let F=N[+B];if(!F||F.bitmap.width===0||F.bitmap.height===0)continue;let P={x:0,y:0,w:F.bitmap.width+2,h:F.bitmap.height+2};u.push(P),R[B]={rect:P,metrics:F.metrics}}}let{w:A,h:b}=l.p(u),z=new l.t({width:A||1,height:b||1});for(let I in T){let N=T[I];for(let R in N){let B=N[+R];if(!B||B.bitmap.width===0||B.bitmap.height===0)continue;let F=f[I][R].rect;l.t.copy(B.bitmap,z,{x:0,y:0},{x:F.x+1,y:F.y+1},B.bitmap)}}this.image=z,this.positions=f}}l.cK("GlyphAtlas",t);class a{constructor(T){this.tileID=new l.a3(T.tileID.overscaledZ,T.tileID.wrap,T.tileID.canonical.z,T.tileID.canonical.x,T.tileID.canonical.y),this.uid=T.uid,this.zoom=T.zoom,this.pixelRatio=T.pixelRatio,this.tileSize=T.tileSize,this.source=T.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=T.showCollisionBoxes,this.collectResourceTiming=!!T.collectResourceTiming,this.returnDependencies=!!T.returnDependencies,this.promoteId=T.promoteId,this.inFlightDependencies=[]}parse(T,f,u,A,b){return l._(this,void 0,void 0,function*(){this.status="parsing",this.data=T,this.collisionBoxArray=new l.ae;let z=new l.cL(Object.keys(T.layers).sort()),I=new l.cM(this.tileID,this.promoteId);I.bucketLayerIDs=[];let N={},R={featureIndex:I,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:u,subdivisionGranularity:b},B=f.familiesBySource[this.source];for(let q in B){let $=T.layers[q];if(!$)continue;$.version===1&&l.w(`Vector tile source "${this.source}" layer "${q}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ee=z.encode(q),ne=[];for(let fe=0;fe<$.length;fe++){let ye=$.feature(fe),xe=I.getId(ye,q);ne.push({feature:ye,id:xe,index:fe,sourceLayerIndex:ee})}for(let fe of B[q]){let ye=fe[0];ye.source!==this.source&&l.w(`layer.source = ${ye.source} does not equal this.source = ${this.source}`),ye.isHidden(this.zoom,!0)||(r(fe,this.zoom,u),(N[ye.id]=ye.createBucket({index:I.bucketLayerIDs.length,layers:fe,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ee,sourceID:this.source})).populate(ne,R,this.tileID.canonical),I.bucketLayerIDs.push(fe.map(xe=>xe.id)))}}let F=l.bY(R.glyphDependencies,q=>Object.keys(q).map(Number));for(let q of this.inFlightDependencies)q?.abort();this.inFlightDependencies=[];let P=Promise.resolve({});if(Object.keys(F).length){let q=new AbortController;this.inFlightDependencies.push(q),P=A.sendAsync({type:"GG",data:{stacks:F,source:this.source,tileID:this.tileID,type:"glyphs"}},q)}let j=Object.keys(R.iconDependencies),U=Promise.resolve({});if(j.length){let q=new AbortController;this.inFlightDependencies.push(q),U=A.sendAsync({type:"GI",data:{icons:j,source:this.source,tileID:this.tileID,type:"icons"}},q)}let Z=Object.keys(R.patternDependencies),Q=Promise.resolve({});if(Z.length){let q=new AbortController;this.inFlightDependencies.push(q),Q=A.sendAsync({type:"GI",data:{icons:Z,source:this.source,tileID:this.tileID,type:"patterns"}},q)}let re=R.dashDependencies,ae=Promise.resolve({});if(Object.keys(re).length){let q=new AbortController;this.inFlightDependencies.push(q),ae=A.sendAsync({type:"GDA",data:{dashes:re}},q)}let[oe,H,X,K]=yield Promise.all([P,U,Q,ae]),G=new t(oe),Y=new l.cN(H,X);for(let q in N){let $=N[q];$ instanceof l.af?(r($.layers,this.zoom,u),l.cO({bucket:$,glyphMap:oe,glyphPositions:G.positions,imageMap:H,imagePositions:Y.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:R.subdivisionGranularity})):$.hasDependencies&&($ instanceof l.cP||$ instanceof l.cQ||$ instanceof l.cR)&&(r($.layers,this.zoom,u),$.addFeatures(R,this.tileID.canonical,Y.patternPositions,K))}return this.status="done",{buckets:Object.values(N).filter(q=>!q.isEmpty()),featureIndex:I,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:G.image,imageAtlas:Y,dashPositions:K,glyphMap:this.returnDependencies?oe:null,iconMap:this.returnDependencies?H:null,glyphPositions:this.returnDependencies?G.positions:null}})}}function r(_,T,f){let u=new l.J(T);for(let A of _)A.recalculate(u,f)}class n{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(T,f){this.loading[T]=f}finishLoading(T){delete this.loading[T]}abort(T){let f=this.loading[T];f?.abort&&(f.abort.abort(),delete this.loading[T])}setParsing(T,f){this.parsing[T]=f}consumeParsing(T){let f=this.parsing[T];if(f)return delete this.parsing[T],f}clearParsing(T){delete this.parsing[T]}markLoaded(T,f){this.loaded[T]=f}getLoaded(T){let f=this.loaded[T];if(f)return f}removeLoaded(T){delete this.loaded[T]}clearLoaded(){this.loaded={}}}class o{constructor(T){this.start=`${T}#start`,this.end=`${T}#end`,this.measure=T,performance.mark(this.start)}finish(){performance.mark(this.end);let T=performance.getEntriesByName(this.measure);return T.length===0&&(performance.measure(this.measure,this.start,this.end),T=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),T}}class s{constructor(T,f,u,A,b){this.type=T,this.properties=u||{},this.extent=b,this.pointsArray=f,this.id=A}loadGeometry(){return this.pointsArray.map(T=>T.map(f=>new l.P(f.x,f.y)))}}class c{constructor(T,f,u){this.version=2,this._myFeatures=T,this.name=f,this.length=T.length,this.extent=u}feature(T){return this._myFeatures[T]}}class m{constructor(){this.layers={}}addLayer(T){this.layers[T.name]=T}}function h(_){let T=l.cS(_);return T.byteOffset===0&&T.byteLength===T.buffer.byteLength||(T=new Uint8Array(T)),{vectorTile:_,rawData:T.buffer}}function p(_,T,f){let{extent:u}=_,A=Math.pow(2,f.z-T.z),b=(f.x-T.x*A)*u,z=(f.y-T.y*A)*u,I=[];for(let N=0;N<_.length;N++){let R=_.feature(N),B=R.loadGeometry();for(let P of B)for(let j of P)j.x=j.x*A-b,j.y=j.y*A-z;let F=128;B=l.cT(B,R.type,-F,-F,u+F,u+F),B.length!==0&&I.push(new s(R.type,B,R.properties,R.id,u))}return new c(I,_.name,u)}class g{constructor(T,f,u){this.actor=T,this.layerIndex=f,this.availableImages=u,this.tileState=new n,this.overzoomedTileResultCache=new l.cU(1e3)}loadVectorTile(T,f){try{return{vectorTile:T.encoding!=="mlt"?new l.cV(new l.cW(f)):new l.cX(f),rawData:f}}catch(u){let A=new Uint8Array(f),b=`Unable to parse the tile at ${T.request.url}, `;throw b+=A[0]===31&&A[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${l.d(u).message}`,new Error(b)}}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f,overzoomParameters:u}=T;u&&(T.request=u.overzoomRequest);let A=this._startRequestTiming(T),b=new a(T);this.tileState.startLoading(f,b);let z=new AbortController;b.abort=z;try{let I=yield l.o(T.request,z);if(T.etag&&T.etag===I.etag)return this.tileState.finishLoading(f),this._getEtagUnmodifiedResult(I,A);let N=this.loadVectorTile(T,I.data);if(this.tileState.finishLoading(f),!N)return null;let{vectorTile:R,rawData:B}=N;u&&({vectorTile:R,rawData:B}=this._getOverzoomTile(T,R));let F=this._getExpiryData(I),P=this._finishRequestTiming(A);b.vectorTile=R,this.tileState.markLoaded(f,b);let j={rawData:B,cacheControl:F,resourceTiming:P};this.tileState.setParsing(f,j);try{return yield this._parseWorkerTile(b,T,j)}finally{this.tileState.clearParsing(f)}}catch(I){throw this.tileState.finishLoading(f),b.status="done",this.tileState.markLoaded(f,b),I}})}_getEtagUnmodifiedResult(T,f){let u=this._getExpiryData(T),A=this._finishRequestTiming(f);return l.e({etagUnmodified:!0},u,A)}_parseWorkerTile(T,f,u){return l._(this,void 0,void 0,function*(){let A=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,f.subdivisionGranularity);if(u){let{rawData:b,cacheControl:z,resourceTiming:I}=u;A=l.e({rawTileData:b.slice(0),encoding:f.encoding},A,z,I)}return A})}_getExpiryData({expires:T,cacheControl:f,etag:u}){let A={};return T&&(A.expires=T),f&&(A.cacheControl=f),u&&(A.etag=u),A}_startRequestTiming(T){var f;if(!((f=T.request)===null||f===void 0)&&f.collectResourceTiming)return new o(T.request.url)}_finishRequestTiming(T){let f=T?.finish();return f?{resourceTiming:JSON.parse(JSON.stringify(f))}:{}}_getOverzoomTile(T,f){var u;let{tileID:A,source:b,overzoomParameters:z}=T,{maxZoomTileID:I}=z,N=`${I.key}_${A.key}_${(u=T.request)===null||u===void 0?void 0:u.url}`,R=this.overzoomedTileResultCache.get(N);if(R)return R;let B=new m,F=this.layerIndex.familiesBySource[b];for(let j in F){let U=f.layers[j];if(!U)continue;let Z=p(U,I,A.canonical);Z.length>0&&B.addLayer(Z)}let P=h(B);return this.overzoomedTileResultCache.set(N,P),P}reloadTile(T){return l._(this,void 0,void 0,function*(){let f=T.uid,u=this.tileState.getLoaded(f);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=T.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(f);return yield this._parseWorkerTile(u,T,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,T)})}abortTile(T){return l._(this,void 0,void 0,function*(){this.tileState.abort(T.uid)})}removeTile(T){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(T.uid)})}}class i{constructor(){this.loaded={}}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f,encoding:u,rawImageData:A,redFactor:b,greenFactor:z,blueFactor:I,baseShift:N}=T,R=A.width+2,B=A.height+2,F=l.b(A)?new l.R({width:R,height:B},yield l.cY(A,-1,-1,R,B)):A,P=new l.cZ(f,F,u,b,z,I,N);return this.loaded||(this.loaded={}),this.loaded[f]=P,P})}removeTile(T){let f=this.loaded,u=T.uid;f?.[u]&&delete f[u]}}class w{constructor(T,f,u,A=S){this.actor=T,this.layerIndex=f,this.availableImages=u,this.tileState=new n,this._createGeoJSONIndex=A}loadVectorTile(T){if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let{z:f,x:u,y:A}=T.tileID.canonical,b=this._geoJSONIndex.getTile(f,u,A);return b?h(new l.c_(b.features,{version:2,extent:l.a6})):null}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f}=T,u=new a(T);u.abort=new AbortController;try{let A=this.loadVectorTile(T);if(!A)return null;let{vectorTile:b,rawData:z}=A;u.vectorTile=b,this.tileState.markLoaded(f,u);let I={rawData:z};this.tileState.setParsing(f,I);try{return yield this._parseWorkerTile(u,T,I)}finally{this.tileState.clearParsing(f)}}catch(A){throw u.status="done",this.tileState.markLoaded(f,u),A}})}_reloadLoadedTile(T){return l._(this,void 0,void 0,function*(){let f=T.uid,u=this.tileState.getLoaded(f);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=T.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(f);return yield this._parseWorkerTile(u,T,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,T)})}_parseWorkerTile(T,f,u){return l._(this,void 0,void 0,function*(){let A=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,f.subdivisionGranularity);if(u){let{rawData:b}=u;A=l.e({rawTileData:b.slice(0),encoding:"mvt"},A)}return A})}abortTile(T){return l._(this,void 0,void 0,function*(){this.tileState.abort(T.uid)})}removeTile(T){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(T.uid)})}loadData(T){return l._(this,void 0,void 0,function*(){var f;(f=this._pendingRequest)===null||f===void 0||f.abort();let u=this._startRequestTiming(T);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(T,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let A={};return T.request&&(A.data=T.data),this._finishRequestTiming(u,T,A),A}catch(A){if(delete this._pendingRequest,!l.$(A))throw A;return{abandoned:!0}}})}_startRequestTiming(T){var f;if(!((f=T.request)===null||f===void 0)&&f.collectResourceTiming)return new o(T.request.url)}_finishRequestTiming(T,f,u){let A=T?.finish();A&&(u.resourceTiming={[f.source]:JSON.parse(JSON.stringify(A))})}reloadTile(T){return this.tileState.getLoaded(T.uid)?this._reloadLoadedTile(T):this.loadTile(T)}loadAndProcessGeoJSON(T,f){return l._(this,void 0,void 0,function*(){var u;if(T.request&&(T.data=(yield l.k(T.request,f)).data),T.data)return T.data=this._filterGeoJSON(T.data,T.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(T.data,T));if(T.dataDiff)return(u=this._geoJSONIndex)!==null&&u!==void 0||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},T)),void this._geoJSONIndex.updateData(T.dataDiff,this._getFilterPredicate(T.filter));if(T.updateCluster&&this._geoJSONIndex.updateClusterOptions(T.geojsonVtOptions.cluster,M(T)),this._geoJSONIndex==null)throw new Error(`Input data given to '${T.source}' is not a valid GeoJSON object.`)})}_filterGeoJSON(T,f){if(T.type!=="FeatureCollection")return T;let u=this._getFilterPredicate(f);return u?{type:"FeatureCollection",features:T.features.filter(A=>u(A))}:T}_getFilterPredicate(T){if(typeof T!="boolean"&&!T?.length)return;let f=l.c$(T,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(f.result==="error")throw new Error(f.value.map(u=>`${u.key}: ${u.message}`).join(", "));return u=>f.value.evaluate({zoom:0},u)}removeSource(T){return l._(this,void 0,void 0,function*(){var f;(f=this._pendingRequest)===null||f===void 0||f.abort()})}getClusterExpansionZoom(T){return this._geoJSONIndex.getClusterExpansionZoom(T.clusterId)}getClusterChildren(T){return this._geoJSONIndex.getClusterChildren(T.clusterId)}getClusterLeaves(T){return this._geoJSONIndex.getClusterLeaves(T.clusterId,T.limit,T.offset)}}function S(_,T){let f=l.e(T.geojsonVtOptions||{},{updateable:!0,clusterOptions:M(T)});return new l.d0(_,f)}function M({geojsonVtOptions:_,clusterProperties:T}){if(!T||!_.clusterOptions)return _.clusterOptions;let f={},u={},A={accumulated:null,zoom:0},b={properties:null},z=Object.keys(T);for(let I of z){let[N,R]=T[I],B=l.c$(R),F=l.c$(typeof N=="string"?[N,["accumulated"],["get",I]]:N);f[I]=B.value,u[I]=F.value}return _.clusterOptions.map=I=>{b.properties=I;let N={};for(let R of z)N[R]=f[R].evaluate(A,b);return N},_.clusterOptions.reduce=(I,N)=>{b.properties=N;for(let R of z)A.accumulated=I[R],I[R]=u[R].evaluate(A,b)},_.clusterOptions}class C{constructor(T){this.self=T,this.actor=new l.N(T),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(f,u)=>{if(this.externalWorkerSourceTypes[f])throw new Error(`Worker source with name "${f}" already registered.`);this.externalWorkerSourceTypes[f]=u},this.self.addProtocol=l.cH,this.self.removeProtocol=l.cI,this.self.registerRTLTextPlugin=f=>{l.d1.setMethods(f)},this.self.makeRequest=l.m,this.actor.registerMessageHandler("LDT",(f,u)=>this._getDEMWorkerSource(f,u.source).loadTile(u)),this.actor.registerMessageHandler("RDT",(f,u)=>l._(this,void 0,void 0,function*(){this._getDEMWorkerSource(f,u.source).removeTile(u)})),this.actor.registerMessageHandler("GCEZ",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterExpansionZoom(u)})),this.actor.registerMessageHandler("GCC",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterChildren(u)})),this.actor.registerMessageHandler("GCL",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterLeaves(u)})),this.actor.registerMessageHandler("LD",(f,u)=>this._getWorkerSource(f,u.type,u.source).loadData(u)),this.actor.registerMessageHandler("LT",(f,u)=>this._getWorkerSource(f,u.type,u.source).loadTile(u)),this.actor.registerMessageHandler("RT",(f,u)=>this._getWorkerSource(f,u.type,u.source).reloadTile(u)),this.actor.registerMessageHandler("AT",(f,u)=>this._getWorkerSource(f,u.type,u.source).abortTile(u)),this.actor.registerMessageHandler("RMT",(f,u)=>this._getWorkerSource(f,u.type,u.source).removeTile(u)),this.actor.registerMessageHandler("RS",(f,u)=>l._(this,void 0,void 0,function*(){var A,b;if(!(!((b=(A=this.workerSources[f])===null||A===void 0?void 0:A[u.type])===null||b===void 0)&&b[u.source]))return;let z=this.workerSources[f][u.type][u.source];delete this.workerSources[f][u.type][u.source],z.removeSource!==void 0&&z.removeSource(u)})),this.actor.registerMessageHandler("RM",f=>l._(this,void 0,void 0,function*(){delete this.layerIndexes[f],delete this.availableImages[f],delete this.workerSources[f],delete this.demWorkerSources[f],this.globalStates.delete(f)})),this.actor.registerMessageHandler("SR",(f,u)=>l._(this,void 0,void 0,function*(){this.referrer=u})),this.actor.registerMessageHandler("SRPS",(f,u)=>this._syncRTLPluginState(f,u)),this.actor.registerMessageHandler("IS",(f,u)=>l._(this,void 0,void 0,function*(){this.self.importScripts(u)})),this.actor.registerMessageHandler("SI",(f,u)=>this._setImages(f,u)),this.actor.registerMessageHandler("UL",(f,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(f).update(u.layers,u.removedIds,this._getGlobalState(f))})),this.actor.registerMessageHandler("UGS",(f,u)=>l._(this,void 0,void 0,function*(){let A=this._getGlobalState(f);for(let b in u)A[b]=u[b]})),this.actor.registerMessageHandler("SL",(f,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(f).replace(u,this._getGlobalState(f))}))}_getGlobalState(T){let f=this.globalStates.get(T);return f||(f={},this.globalStates.set(T,f)),f}_setImages(T,f){return l._(this,void 0,void 0,function*(){this.availableImages[T]=f;for(let u in this.workerSources[T]){let A=this.workerSources[T][u];for(let b in A)A[b].availableImages=f}})}_syncRTLPluginState(T,f){return l._(this,void 0,void 0,function*(){return yield l.d1.syncState(f,this.self.importScripts)})}_getAvailableImages(T){let f=this.availableImages[T];return f||(f=[]),f}_getLayerIndex(T){let f=this.layerIndexes[T];return f||(f=this.layerIndexes[T]=new e),f}_getWorkerSource(T,f,u){var A,b;if((A=this.workerSources)[T]||(A[T]={}),(b=this.workerSources[T])[f]||(b[f]={}),!this.workerSources[T][f][u]){let z={sendAsync:(I,N)=>(I.targetMapId=T,this.actor.sendAsync(I,N))};switch(f){case"vector":this.workerSources[T][f][u]=new g(z,this._getLayerIndex(T),this._getAvailableImages(T));break;case"geojson":this.workerSources[T][f][u]=new w(z,this._getLayerIndex(T),this._getAvailableImages(T));break;default:this.workerSources[T][f][u]=new this.externalWorkerSourceTypes[f](z,this._getLayerIndex(T),this._getAvailableImages(T))}}return this.workerSources[T][f][u]}_getDEMWorkerSource(T,f){var u,A;return(u=this.demWorkerSources)[T]||(u[T]={}),(A=this.demWorkerSources[T])[f]||(A[f]=new i),this.demWorkerSources[T][f]}}return l.i(self)&&(self.worker=new C(self)),C}),E("index",["exports","./shared"],function(l,e){"use strict";var t="5.24.0";function a(){var de=new e.A(4);return e.A!=Float32Array&&(de[1]=0,de[2]=0),de[0]=1,de[3]=1,de}let r,n,o,s={frame(de,y,O,ie){let ce=ie||window,_e=ce.requestAnimationFrame(Ne=>{De(),y(Ne)}),{unsubscribe:De}=e.s(de.signal,"abort",()=>{De(),ce.cancelAnimationFrame(_e),O(new e.a(de.signal.reason))},!1)},frameAsync(de,y){return new Promise((O,ie)=>{this.frame(de,O,ie,y)})},getImageData(de,y=0){return this.getImageCanvasContext(de).getImageData(-y,-y,de.width+2*y,de.height+2*y)},getImageCanvasContext(de){let y=window.document.createElement("canvas"),O=y.getContext("2d",{willReadFrequently:!0});if(!O)throw new Error("failed to create canvas 2d context");return y.width=de.width,y.height=de.height,O.drawImage(de,0,0,de.width,de.height),O},resolveURL:de=>(r||(r=document.createElement("a")),r.href=de,r.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return o!==void 0?o:!!matchMedia&&(n!=null||(n=matchMedia("(prefers-reduced-motion: reduce)")),n.matches)},set prefersReducedMotion(de){o=de}},c=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt!==null?this._frozenAt:performance.now()}setNow(de){this._frozenAt=de}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};function m(){return c.getCurrentTime()}var h,p;class g{static create(y,O,ie){let ce=window.document.createElement(y);return O!==void 0&&(ce.className=O),ie&&ie.appendChild(ce),ce}static createNS(y,O){return window.document.createElementNS(y,O)}static disableDrag(){g.docStyle&&g.selectProp&&(g.userSelect=g.docStyle[g.selectProp],g.docStyle[g.selectProp]="none")}static enableDrag(){g.docStyle&&g.selectProp&&(g.docStyle[g.selectProp]=g.userSelect)}static suppressClickInternal(y){y.preventDefault(),y.stopPropagation(),window.removeEventListener("click",g.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",g.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",g.suppressClickInternal,!0)},0)}static getScale(y){let O=y.getBoundingClientRect();return{x:O.width/y.offsetWidth||1,y:O.height/y.offsetHeight||1,boundingClientRect:O}}static getPoint(y,O,ie){let ce=O.boundingClientRect;return new e.P((ie.clientX-ce.left)/O.x-y.clientLeft,(ie.clientY-ce.top)/O.y-y.clientTop)}static mousePos(y,O){let ie=g.getScale(y);return g.getPoint(y,ie,O)}static touchPos(y,O){let ie=[],ce=g.getScale(y);for(let _e of O)ie.push(g.getPoint(y,ce,_e));return ie}static sanitize(y){let O=new DOMParser().parseFromString(y,"text/html").body||document.createElement("body"),ie=O.querySelectorAll("script");for(let ce of ie)ce.remove();return g.clean(O),O.innerHTML}static isPossiblyDangerous(y,O){let ie=O.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(y)||!ie.includes("javascript:")&&!ie.includes("data:"))||!!y.startsWith("on")||void 0}static clean(y){let O=y.children;for(let ie of O)g.removeAttributes(ie),g.clean(ie)}static removeAttributes(y){for(let{name:O,value:ie}of y.attributes)g.isPossiblyDangerous(O,ie)&&y.removeAttribute(O)}}g.docStyle=typeof window<"u"&&((h=window.document)===null||h===void 0?void 0:h.documentElement.style),g.selectProp=!g.docStyle||"userSelect"in g.docStyle?"userSelect":"webkitUserSelect",function(de){let y,O,ie,ce;de.resetRequestQueue=()=>{y=[],O=0,ie=0,ce={}},de.addThrottleControl=Ye=>{let lt=ie++;return ce[lt]=Ye,lt},de.removeThrottleControl=Ye=>{delete ce[Ye],De()},de.getImage=(Ye,lt,ct=!0)=>new Promise((Ft,Gt)=>{Ye.headers||(Ye.headers={}),Ye.headers.accept="image/webp,*/*",e.e(Ye,{type:"image"}),y.push({abortController:lt,requestParameters:Ye,supportImageRefresh:ct,state:"queued",onError:Jt=>{Gt(Jt)},onSuccess:Jt=>{Ft(Jt)}}),De()});let _e=Ye=>e._(this,void 0,void 0,function*(){Ye.state="running";let{requestParameters:lt,supportImageRefresh:ct,onError:Ft,onSuccess:Gt,abortController:Jt}=Ye,it=ct===!1&&!e.i(self)&&!e.g(lt.url)&&(!lt.headers||Object.keys(lt.headers).reduce((or,vr)=>or&&vr==="accept",!0));O++;let Rt=it?Ne(lt,Jt):e.m(lt,Jt);try{let or=yield Rt;delete Ye.abortController,Ye.state="completed",or.data instanceof HTMLImageElement||e.b(or.data)?Gt(or):or.data&&Gt({data:yield(qt=or.data,typeof createImageBitmap=="function"?e.h(qt):e.j(qt)),cacheControl:or.cacheControl,expires:or.expires})}catch(or){delete Ye.abortController,Ft(e.d(or))}finally{O--,De()}var qt}),De=()=>{let Ye=(()=>{for(let lt of Object.keys(ce))if(ce[lt]())return!0;return!1})()?e.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let lt=O;lt0;lt++){let ct=y.shift();ct.abortController.signal.aborted?lt--:_e(ct)}},Ne=(Ye,lt)=>new Promise((ct,Ft)=>{let Gt=new Image,Jt=Ye.url,it=Ye.credentials;it&&it==="include"?Gt.crossOrigin="use-credentials":(it&&it==="same-origin"||!e.f(Jt))&&(Gt.crossOrigin="anonymous"),lt.signal.addEventListener("abort",()=>{Gt.src="",Ft(new e.a(lt.signal.reason))}),Gt.fetchPriority="high",Gt.onload=()=>{Gt.onerror=Gt.onload=null,ct({data:Gt})},Gt.onerror=()=>{Gt.onerror=Gt.onload=null,lt.signal.aborted||Ft(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},Gt.src=Jt})}(p||(p={})),p.resetRequestQueue();class i{constructor(y){this._transformRequestFn=y??null}transformRequest(y,O){return this._transformRequestFn&&this._transformRequestFn(y,O)||{url:y}}setTransformRequest(y){this._transformRequestFn=y}}function w(de){let y=[];if(typeof de=="string")y.push({id:"default",url:de});else if(de&&de.length>0){let O=[];for(let{id:ie,url:ce}of de){let _e=`${ie}${ce}`;O.includes(_e)||(O.push(_e),y.push({id:ie,url:ce}))}}return y}function S(de,y,O){try{let ie=new URL(de);return ie.pathname+=`${y}${O}`,ie.toString()}catch{throw new Error(`Invalid sprite URL "${de}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function M(de){let{userImage:y}=de;return!(!y?.render||!y.render()||(de.data.replace(new Uint8Array(y.data.buffer)),0))}class C extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(let y of Object.keys(this.images))this.removeImage(y);this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(y){if(this.loaded!==y&&(this.loaded=y,y)){for(let{ids:O,promiseResolve:ie}of this.requestors)ie(this._getImagesForIds(O));this.requestors=[]}}getImage(y){let O=this.images[y];if(O&&!O.data&&O.spriteData){let ie=O.spriteData;O.data=new e.R({width:ie.width,height:ie.height},ie.context.getImageData(ie.x,ie.y,ie.width,ie.height).data),O.spriteData=null}return O}addImage(y,O){if(this.images[y])throw new Error(`Image id ${y} already exist, use updateImage instead`);this._validate(y,O)&&(this.images[y]=O)}_validate(y,O){let ie=!0,ce=O.data||O.spriteData;return this._validateStretch(O.stretchX,ce?.width)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchX" value`))),ie=!1),this._validateStretch(O.stretchY,ce?.height)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchY" value`))),ie=!1),this._validateContent(O.content,O)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "content" value`))),ie=!1),ie}_validateStretch(y,O){if(!y)return!0;let ie=0;for(let ce of y){if(ce[0]=y[1]))}updateImage(y,O,ie=!0){let ce=this.getImage(y);if(ie&&(ce.data.width!==O.data.width||ce.data.height!==O.data.height))throw new Error(`size mismatch between old image (${ce.data.width}x${ce.data.height}) and new image (${O.data.width}x${O.data.height}).`);O.version=ce.version+1,this.images[y]=O,this.updatedImages[y]=!0}removeImage(y){var O;let ie=this.images[y];delete this.images[y],delete this.patterns[y],!((O=ie.userImage)===null||O===void 0)&&O.onRemove&&ie.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(y){return new Promise((O,ie)=>{let ce=!0;if(!this.isLoaded())for(let _e of y)this.images[_e]||(ce=!1);this.isLoaded()||ce?O(this._getImagesForIds(y)):this.requestors.push({ids:y,promiseResolve:O})})}_getImagesForIds(y){var O;let ie={};for(let ce of y){let _e=this.getImage(ce);_e||(this.fire(new e.n("styleimagemissing",{id:ce})),_e=this.getImage(ce)),_e?ie[ce]={data:_e.data.clone(),pixelRatio:_e.pixelRatio,sdf:_e.sdf,version:_e.version,stretchX:_e.stretchX,stretchY:_e.stretchY,content:_e.content,textFitWidth:_e.textFitWidth,textFitHeight:_e.textFitHeight,hasRenderCallback:!!(!((O=_e.userImage)===null||O===void 0)&&O.render)}:e.w(`Image "${ce}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return ie}getPixelSize(){let{width:y,height:O}=this.atlasImage;return{width:y,height:O}}getPattern(y){let O=this.patterns[y],ie=this.getImage(y);if(!ie)return null;if(O&&O.position.version===ie.version)return O.position;if(O)O.position.version=ie.version;else{let ce={w:ie.data.width+2,h:ie.data.height+2,x:0,y:0},_e=new e.I(ce,ie);this.patterns[y]={bin:ce,position:_e}}return this._updatePatternAtlas(),this.patterns[y].position}bind(y){let O=y.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.T(y,this.atlasImage,O.RGBA),this.atlasTexture.bind(O.LINEAR,O.CLAMP_TO_EDGE)}_updatePatternAtlas(){let y=[];for(let _e in this.patterns)y.push(this.patterns[_e].bin);let{w:O,h:ie}=e.p(y),ce=this.atlasImage;ce.resize({width:O||1,height:ie||1});for(let _e in this.patterns){let{bin:De}=this.patterns[_e],Ne=De.x+1,Ye=De.y+1,lt=this.getImage(_e).data,ct=lt.width,Ft=lt.height;e.R.copy(lt,ce,{x:0,y:0},{x:Ne,y:Ye},{width:ct,height:Ft}),e.R.copy(lt,ce,{x:0,y:Ft-1},{x:Ne,y:Ye-1},{width:ct,height:1}),e.R.copy(lt,ce,{x:0,y:0},{x:Ne,y:Ye+Ft},{width:ct,height:1}),e.R.copy(lt,ce,{x:ct-1,y:0},{x:Ne-1,y:Ye},{width:1,height:Ft}),e.R.copy(lt,ce,{x:0,y:0},{x:Ne+ct,y:Ye},{width:1,height:Ft})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(y){for(let O of y){if(this.callbackDispatchedThisFrame[O])continue;this.callbackDispatchedThisFrame[O]=!0;let ie=this.getImage(O);ie||e.w(`Image with ID: "${O}" was not found`),M(ie)&&this.updateImage(O,ie)}}cloneImages(){let y={};for(let O in this.images){let ie=this.images[O];y[O]=Object.assign(Object.assign({},ie),{data:ie.data?ie.data.clone():null})}return y}}let _=1e20,T=new Float64Array(256);for(let de=0;de<256;de++){let y=.5-Math.pow(de/255,.45454545454545453);T[de]=y*Math.abs(y)}function f(de,y,O,ie,ce,_e,De,Ne,Ye){for(let lt=y;lt-1);Ye++,_e[Ye]=Ne,De[Ye]=lt,De[Ye+1]=_}for(let Ne=0,Ye=0;Ne/[-\w]+/.test(ce)?ce:`'${CSS.escape(ce)}'`).join(",");return new b.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ie,fontWeight:this._fontWeight(O[0]),fontStyle:this._fontStyle(O[0]),lang:this.lang})}_fontStyle(y){return/italic/i.test(y)?"italic":/oblique/i.test(y)?"oblique":"normal"}_fontWeight(y){let O={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},ie;for(let[ce,_e]of Object.entries(O))new RegExp(`\\b${ce}\\b`,"i").test(y)&&(ie=`${_e}`);return ie}destroy(){for(let y in this.entries){let O=this.entries[y];O.tinySDF=null,O.ideographTinySDF=null,O.glyphs={},O.requests={},O.ranges={}}this.entries={}}}b.loadGlyphRange=function(de,y,O,ie){return e._(this,void 0,void 0,function*(){let ce=256*y,_e=ce+255,De=yield ie.transformRequest(O.replace("{fontstack}",de).replace("{range}",`${ce}-${_e}`),"Glyphs"),Ne=yield e.o(De,new AbortController);if(!Ne?.data)throw new Error(`Could not load glyph range. range: ${y}, ${ce}-${_e}`);let Ye={};for(let lt of e.q(Ne.data))Ye[lt.id]=lt;return Ye})},b.TinySDF=class{constructor({fontSize:de=24,buffer:y=3,radius:O=8,cutoff:ie=.25,fontFamily:ce="sans-serif",fontWeight:_e="normal",fontStyle:De="normal",lang:Ne=null}={}){this.buffer=y,this.radius=O,this.cutoff=ie,this.lang=Ne;let Ye=this.size=de+4*y,lt=this._createCanvas(Ye),ct=this.ctx=lt.getContext("2d",{willReadFrequently:!0});ct.font=`${De} ${_e} ${de}px ${ce}`,ct.textBaseline="alphabetic",ct.textAlign="left",ct.fillStyle="black",this.gridOuter=new Float64Array(Ye*Ye),this.gridInner=new Float64Array(Ye*Ye),this.f=new Float64Array(Ye),this.z=new Float64Array(Ye+1),this.v=new Uint16Array(Ye)}_createCanvas(de){if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(de,de);let y=document.createElement("canvas");return y.width=y.height=de,y}draw(de){let{width:y,actualBoundingBoxAscent:O,actualBoundingBoxDescent:ie,actualBoundingBoxLeft:ce,actualBoundingBoxRight:_e}=this.ctx.measureText(de),De=Math.ceil(O),Ne=Math.floor(ce),Ye=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(_e)-Ne)),lt=Math.max(0,Math.min(this.size-this.buffer,De+Math.ceil(ie))),ct=Ye+2*this.buffer,Ft=lt+2*this.buffer,Gt=Math.max(ct*Ft,0),Jt=new Uint8ClampedArray(Gt),it={data:Jt,width:ct,height:Ft,glyphWidth:Ye,glyphHeight:lt,glyphTop:De,glyphLeft:Ne,glyphAdvance:y};if(Ye===0||lt===0)return it;let{ctx:Rt,buffer:qt,gridInner:or,gridOuter:vr}=this;this.lang&&(Rt.lang=this.lang),Rt.clearRect(qt,qt,Ye,lt),Rt.fillText(de,qt-Ne,qt+De);let Ar=Rt.getImageData(qt,qt,Ye,lt);vr.fill(_,0,Gt),or.fill(0,0,Gt);let dr=3;for(let Lr=0;Lr1&&(Ye=y[++Ne]);let ct=Math.abs(lt-Ye.left),Ft=Math.abs(lt-Ye.right),Gt=Math.min(ct,Ft),Jt,it=_e/ie*(ce+1);if(Ye.isDash){let Rt=ce-Math.abs(it);Jt=Math.sqrt(Gt*Gt+Rt*Rt)}else Jt=ce-Math.sqrt(Gt*Gt+it*it);this.data[De+lt]=Math.max(0,Math.min(255,Jt+128))}}}addRegularDash(y){for(let Ne=y.length-1;Ne>=0;--Ne){let Ye=y[Ne],lt=y[Ne+1];Ye.zeroLength?y.splice(Ne,1):lt&<.isDash===Ye.isDash&&(lt.left=Ye.left,y.splice(Ne,1))}let O=y[0],ie=y[y.length-1];O.isDash===ie.isDash&&(O.left=ie.left-this.width,ie.right=O.right+this.width);let ce=this.width*this.nextRow,_e=0,De=y[_e];for(let Ne=0;Ne1&&(De=y[++_e]);let Ye=Math.abs(Ne-De.left),lt=Math.abs(Ne-De.right),ct=Math.min(Ye,lt);this.data[ce+Ne]=Math.max(0,Math.min(255,(De.isDash?ct:-ct)+128))}}addDash(y,O){let ie=O?7:0,ce=2*ie+1;if(this.nextRow+ce>this.height)return e.w("LineAtlas out of space"),null;let _e=0;for(let Ne of y)_e+=Ne;if(_e!==0){let Ne=this.width/_e,Ye=this.getDashRanges(y,this.width,Ne);O?this.addRoundDash(Ye,Ne,ie):this.addRegularDash(Ye)}let De={y:this.nextRow+ie,height:2*ie,width:_e};return this.nextRow+=ce,this.dirty=!0,De}bind(y){let O=y.gl;this.texture?(O.bindTexture(O.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,O.texSubImage2D(O.TEXTURE_2D,0,0,0,this.width,this.height,O.ALPHA,O.UNSIGNED_BYTE,this.data))):(this.texture=O.createTexture(),O.bindTexture(O.TEXTURE_2D,this.texture),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_WRAP_S,O.REPEAT),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_WRAP_T,O.REPEAT),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MIN_FILTER,O.LINEAR),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MAG_FILTER,O.LINEAR),O.texImage2D(O.TEXTURE_2D,0,O.ALPHA,this.width,this.height,0,O.ALPHA,O.UNSIGNED_BYTE,this.data))}}let P="maplibre_preloaded_worker_pool";class j{constructor(){this.active={}}acquire(y){if(!this.workers)for(this.workers=[];this.workers.lengthe.m(y,O))),Q}function H(de,y){let O=e.O();return e.Q(O,O,[1,1,0]),e.S(O,O,[.5*de.width,.5*de.height,1]),de.calculatePosMatrix?e.U(O,O,de.calculatePosMatrix(y.toUnwrapped())):O}function X(de,y,O,ie,ce,_e,De){var Ne;let Ye=function(Gt,Jt,it){if(Gt)for(let Rt of Gt){let qt=Jt[Rt];if(qt?.source===it&&qt.type==="fill-extrusion")return!0}else for(let Rt in Jt){let qt=Jt[Rt];if(qt.source===it&&qt.type==="fill-extrusion")return!0}return!1}((Ne=ce?.layers)!==null&&Ne!==void 0?Ne:null,y,de.id),lt=_e.maxPitchScaleFactor(),ct=de.tilesIn(ie,lt,Ye);ct.sort(K);let Ft=[];for(let Gt of ct)Ft.push({wrappedTileID:Gt.tileID.wrapped().key,queryResults:Gt.tile.queryRenderedFeatures(y,O,de.getState(),Gt.queryGeometry,Gt.cameraQueryGeometry,Gt.scale,ce,_e,lt,H(_e,Gt.tileID),De?(Jt,it)=>De(Gt.tileID,Jt,it):void 0)});return function(Gt,Jt){for(let it in Gt)for(let Rt of Gt[it])G(Rt,Jt);return Gt}(function(Gt){let Jt={},it={};for(let{queryResults:Rt,wrappedTileID:qt}of Gt){it[qt]||(it[qt]={});let or=it[qt];for(let vr in Rt){let Ar=Rt[vr];or[vr]||(or[vr]={});let dr=or[vr];Jt[vr]||(Jt[vr]=[]);for(let mr of Ar)dr[mr.featureIndex]||(dr[mr.featureIndex]=!0,Jt[vr].push(mr))}}return Jt}(Ft),de)}function K(de,y){let O=de.tileID,ie=y.tileID;return O.overscaledZ-ie.overscaledZ||O.canonical.y-ie.canonical.y||O.wrap-ie.wrap||O.canonical.x-ie.canonical.x}function G(de,y){let O=de.feature,ie=y.getFeatureState(O.layer["source-layer"],O.id);O.source=O.layer.source,O.layer["source-layer"]&&(O.sourceLayer=O.layer["source-layer"]),O.state=ie}function Y(de,y,O,ie){return e._(this,void 0,void 0,function*(){let ce=de;if(de.url?ce=(yield e.k(yield y.transformRequest(de.url,"Source"),O)).data:yield s.frameAsync(O,ie),!ce)return null;let _e=e.V(e.e(ce,de),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in ce&&ce.vector_layers&&(_e.vectorLayerIds=ce.vector_layers.map(De=>De.id)),_e})}class q{constructor(y,O){y&&(O?this.setSouthWest(y).setNorthEast(O):Array.isArray(y)&&(y.length===4?this.setSouthWest([y[0],y[1]]).setNorthEast([y[2],y[3]]):this.setSouthWest(y[0]).setNorthEast(y[1])))}setNorthEast(y){return this._ne=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}setSouthWest(y){return this._sw=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}extend(y){let O=this._sw,ie=this._ne,ce,_e;if(y instanceof e.W)ce=y,_e=y;else{if(!(y instanceof q))return Array.isArray(y)?y.length===4||y.every(Array.isArray)?this.extend(q.convert(y)):this.extend(e.W.convert(y)):y&&("lng"in y||"lon"in y)&&"lat"in y?this.extend(e.W.convert(y)):this;if(ce=y._sw,_e=y._ne,!ce||!_e)return this}return O||ie?(O.lng=Math.min(ce.lng,O.lng),O.lat=Math.min(ce.lat,O.lat),ie.lng=Math.max(_e.lng,ie.lng),ie.lat=Math.max(_e.lat,ie.lat)):(this._sw=new e.W(ce.lng,ce.lat),this._ne=new e.W(_e.lng,_e.lat)),this}getCenter(){return new e.W((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new e.W(this.getWest(),this.getNorth())}getSouthEast(){return new e.W(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(y){let{lng:O,lat:ie}=e.W.convert(y),ce=this._sw.lng<=O&&O<=this._ne.lng;return this._sw.lng>this._ne.lng&&(ce=this._sw.lng>=O&&O>=this._ne.lng),this._sw.lat<=ie&&ie<=this._ne.lat&&ce}intersects(y){if(!((y=q.convert(y)).getNorth()>=this.getSouth()&&y.getSouth()<=this.getNorth()))return!1;let O=Math.abs(this.getEast()-this.getWest()),ie=Math.abs(y.getEast()-y.getWest());if(O>=360||ie>=360)return!0;let ce=e.X(this.getWest(),-180,180),_e=e.X(this.getEast(),-180,180),De=e.X(y.getWest(),-180,180),Ne=e.X(y.getEast(),-180,180),Ye=ce>_e,lt=De>Ne;return!(!Ye||!lt)||(Ye?Ne>=ce||De<=_e:lt?_e>=De||ce<=Ne:De<=_e&&Ne>=ce)}static convert(y){return y instanceof q?y:y&&new q(y)}static fromLngLat(y,O=0){let ie=360*O/40075017,ce=ie/Math.cos(Math.PI/180*y.lat);return new q(new e.W(y.lng-ce,y.lat-ie),new e.W(y.lng+ce,y.lat+ie))}adjustAntiMeridian(){let y=new e.W(this._sw.lng,this._sw.lat),O=new e.W(this._ne.lng,this._ne.lat);return new q(y,y.lng>O.lng?new e.W(O.lng+360,O.lat):O)}}class ${constructor(y,O,ie){this.bounds=q.convert(this.validateBounds(y)),this.minzoom=O||0,this.maxzoom=ie||24}validateBounds(y){return Array.isArray(y)&&y.length===4?[Math.max(-180,y[0]),Math.max(-90,y[1]),Math.min(180,y[2]),Math.min(90,y[3])]:[-180,-90,180,90]}contains(y){let O=Math.pow(2,y.z),ie=Math.floor(e.Z(this.bounds.getWest())*O),ce=Math.floor(e.Y(this.bounds.getNorth())*O),_e=Math.ceil(e.Z(this.bounds.getEast())*O),De=Math.ceil(e.Y(this.bounds.getSouth())*O);return y.x>=ie&&y.x<_e&&y.y>=ce&&y.y{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(y){return e._(this,void 0,void 0,function*(){let O=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie={request:yield this.map._requestManager.transformRequest(O,"Tile"),uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,tileSize:this.tileSize*y.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(y),etag:y.etag};ie.request.collectResourceTiming=this._collectResourceTiming;let ce="RT";if(y.actor&&y.state!=="expired"){if(y.state==="loading")return new Promise((_e,De)=>{y.reloadPromise={resolve:_e,reject:De}})}else y.actor=this.dispatcher.getActor(),ce="LT";y.abortController=new AbortController;try{let _e=yield y.actor.sendAsync({type:ce,data:ie},y.abortController);if(delete y.abortController,y.aborted)return;this._afterTileLoadWorkerResponse(y,_e);let De={};return _e?.etagUnmodified&&(De.unmodified=!0),De}catch(_e){if(delete y.abortController,y.aborted)return;if(_e&&_e.status!==404)throw _e;this._afterTileLoadWorkerResponse(y,null)}})}_getOverzoomParameters(y){return e._(this,void 0,void 0,function*(){if(y.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let O=y.tileID.scaledTo(this.maxzoom).canonical,ie=O.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:O,overzoomRequest:yield this.map._requestManager.transformRequest(ie,"Tile")}})}_afterTileLoadWorkerResponse(y,O){if(O?.resourceTiming&&(y.resourceTiming=O.resourceTiming),O&&this.map._refreshExpiredTiles&&y.setExpiryData(O),y.etag=O?.etag,y.loadVectorData(O,this.map.painter),y.reloadPromise){let ie=y.reloadPromise;y.reloadPromise=null,this.loadTile(y).then(ie.resolve).catch(ie.reject)}}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.actor&&(yield y.actor.sendAsync({type:"AT",data:{uid:y.uid,type:this.type,source:this.id}}))})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),y.actor&&(yield y.actor.sendAsync({type:"RMT",data:{uid:y.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class ne extends e.E{constructor(y,O,ie,ce){super(),this.id=y,this.dispatcher=ie,this.setEventedParent(ce),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},O),e.e(this,e.V(O,["url","scheme","tileSize"]))}load(){return e._(this,arguments,void 0,function*(y=!1){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let O=yield Y(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,O&&(e.e(this,O),O.bounds&&(this.tileBounds=new $(O.bounds,this.minzoom,this.maxzoom)),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:y})))}catch(O){this._tileJSONRequest=null,this._loaded=!0,e.$(O)||this.fire(new e.l(e.d(O)))}})}loaded(){return this._loaded}onAdd(y){this.map=y,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(y){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),y(),this.load(!0)}setTiles(y){return this.setSourceProperty(()=>{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}serialize(){return e.e({},this._options)}hasTile(y){return!this.tileBounds||this.tileBounds.contains(y.canonical)}loadTile(y){return e._(this,void 0,void 0,function*(){let O=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);y.abortController=new AbortController;try{let ie=yield p.getImage(yield this.map._requestManager.transformRequest(O,"Tile"),y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(ie?.data){this.map._refreshExpiredTiles&&(ie.cacheControl||ie.expires)&&y.setExpiryData({cacheControl:ie.cacheControl,expires:ie.expires});let ce=this.map.painter.context,_e=ce.gl,De=ie.data;y.texture=this.map.painter.getTileTexture(De.width),y.texture?y.texture.update(De,{useMipmap:!0}):(y.texture=new e.T(ce,De,_e.RGBA,{useMipmap:!0}),y.texture.bind(_e.LINEAR,_e.CLAMP_TO_EDGE,_e.LINEAR_MIPMAP_NEAREST)),y.state="loaded"}}catch(ie){if(delete y.abortController,y.aborted)y.state="unloaded";else if(ie)throw y.state="errored",ie}})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController)})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.texture&&this.map.painter.saveTileTexture(y.texture)})}hasTransition(){return!1}}class fe extends ne{constructor(y,O,ie,ce){super(y,O,ie,ce),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},O),this.encoding=O.encoding||"mapbox",this.redFactor=O.redFactor,this.greenFactor=O.greenFactor,this.blueFactor=O.blueFactor,this.baseShift=O.baseShift}loadTile(y){return e._(this,void 0,void 0,function*(){let O=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie=yield this.map._requestManager.transformRequest(O,"Tile");y.neighboringTiles=this._getNeighboringTiles(y.tileID),y.abortController=new AbortController;try{let ce=yield p.getImage(ie,y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(ce?.data){let _e=ce.data;this.map._refreshExpiredTiles&&(ce.cacheControl||ce.expires)&&y.setExpiryData({cacheControl:ce.cacheControl,expires:ce.expires});let De=e.b(_e)&&e.a0()?_e:yield this.readImageNow(_e),Ne={type:this.type,uid:y.uid,source:this.id,rawImageData:De,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(y.actor&&y.state!=="expired"&&y.state!=="reloading")return;y.actor&&y.state!=="expired"||(y.actor=this.dispatcher.getActor()),y.dem=yield y.actor.sendAsync({type:"LDT",data:Ne}),y.needsHillshadePrepare=!0,y.needsTerrainPrepare=!0,y.state="loaded"}}catch(ce){if(delete y.abortController,y.aborted)y.state="unloaded";else if(ce)throw y.state="errored",ce}})}readImageNow(y){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.a1()){let O=y.width+2,ie=y.height+2;try{return new e.R({width:O,height:ie},yield e.a2(y,-1,-1,O,ie))}catch{}}return s.getImageData(y,1)})}_getNeighboringTiles(y){let O=y.canonical,ie=Math.pow(2,O.z),ce=(O.x-1+ie)%ie,_e=O.x===0?y.wrap-1:y.wrap,De=(O.x+1+ie)%ie,Ne=O.x+1===ie?y.wrap+1:y.wrap,Ye={};return Ye[new e.a3(y.overscaledZ,_e,O.z,ce,O.y).key]={backfilled:!1},Ye[new e.a3(y.overscaledZ,Ne,O.z,De,O.y).key]={backfilled:!1},O.y>0&&(Ye[new e.a3(y.overscaledZ,_e,O.z,ce,O.y-1).key]={backfilled:!1},Ye[new e.a3(y.overscaledZ,y.wrap,O.z,O.x,O.y-1).key]={backfilled:!1},Ye[new e.a3(y.overscaledZ,Ne,O.z,De,O.y-1).key]={backfilled:!1}),O.y+1_e.key===ie);ce>-1&&de.addOrUpdateProperties.splice(ce,1)}return(de.removeAllProperties||y.removeAllProperties)&&(O.removeAllProperties=!0),(de.removeProperties||y.removeProperties)&&(O.removeProperties=[...de.removeProperties||[],...y.removeProperties||[]]),(de.addOrUpdateProperties||y.addOrUpdateProperties)&&(O.addOrUpdateProperties=[...de.addOrUpdateProperties||[],...y.addOrUpdateProperties||[]]),(de.newGeometry||y.newGeometry)&&(O.newGeometry=y.newGeometry||de.newGeometry),O}function Ae(de){var y,O;if(!de)return{};let ie={};return ie.removeAll=de.removeAll,ie.remove=new Set(de.remove||[]),ie.add=new Map((y=de.add)===null||y===void 0?void 0:y.map(ce=>[ce.id,ce])),ie.update=new Map((O=de.update)===null||O===void 0?void 0:O.map(ce=>[ce.id,ce])),ie}function Me(de){return de&&de.length!==0?typeof de[0]=="number"?[de]:de.flatMap(y=>Me(y)):[]}function Ie(de){return de.type==="GeometryCollection"?de.geometries.flatMap(y=>Ie(y)):Me(de.coordinates)}function Ue(de){let y=new q,O;switch(de.type){case"FeatureCollection":O=de.features.flatMap(ie=>Ie(ie.geometry));break;case"Feature":O=Ie(de.geometry);break;default:O=Ie(de)}if(O.length===0)return y;for(let ie of O){let[ce,_e]=ie;y.extend([ce,_e])}return y}class qe extends e.E{constructor(y,O,ie,ce){super(),this.id=y,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:O.data},this.actor=ie.getActor(),this.setEventedParent(ce),this._data=typeof O.data=="string"?{url:O.data}:{geojson:O.data},this._options=e.e({},O),this._collectResourceTiming=O.collectResourceTiming,O.maxzoom!==void 0&&(this.maxzoom=O.maxzoom),O.type&&(this.type=O.type),O.attribution&&(this.attribution=O.attribution),this.promoteId=O.promoteId,O.clusterMaxZoom!==void 0&&this.maxzoom<=O.clusterMaxZoom&&e.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${O.clusterMaxZoom}".`),this.workerOptions=e.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(O.buffer!==void 0?O.buffer:128),tolerance:this._pixelsToTileUnits(O.tolerance!==void 0?O.tolerance:.375),extent:e.a6,maxZoom:this.maxzoom,lineMetrics:O.lineMetrics||!1,generateId:O.generateId||!1,promoteId:typeof O.promoteId=="string"?O.promoteId:void 0,cluster:O.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(O.clusterMaxZoom),minPoints:Math.max(2,O.clusterMinPoints||2),extent:e.a6,radius:this._pixelsToTileUnits(O.clusterRadius||50),log:!1,generateId:O.generateId||!1}},clusterProperties:O.clusterProperties,filter:O.filter},O.workerOptions)}_hasPendingWorkerUpdate(){return this._pendingWorkerUpdate.data!==void 0||this._pendingWorkerUpdate.diff!==void 0||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(y){return y*(e.a6/this.tileSize)}_getClusterMaxZoom(y){let O=y?Math.round(y):this.maxzoom-1;return Number.isInteger(y)||y===void 0||e.w(`Integer expected for option 'clusterMaxZoom': provided value "${y}" rounded to "${O}"`),O}load(){return e._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(y){this.map=y,this.load()}setData(y,O){this._data=typeof y=="string"?{url:y}:{geojson:y},this._pendingWorkerUpdate={data:y};let ie=this._updateWorkerData();return O?ie:this}updateData(y,O){this._pendingWorkerUpdate.diff=function(ce,_e){if(!ce)return _e||{};if(!_e)return ce||{};let De=Ae(ce),Ne=Ae(_e);(function(lt,ct){ct.removeAll&&(lt.add.clear(),lt.update.clear(),lt.remove.clear(),ct.remove.clear());for(let Ft of ct.remove)lt.add.delete(Ft),lt.update.delete(Ft);for(let[Ft,Gt]of ct.update){let Jt=lt.update.get(Ft);Jt&&(ct.update.set(Ft,xe(Jt,Gt)),lt.update.delete(Ft))}})(De,Ne);let Ye={};if((De.removeAll||Ne.removeAll)&&(Ye.removeAll=!0),Ye.remove=new Set([...De.remove,...Ne.remove]),Ye.add=new Map([...De.add,...Ne.add]),Ye.update=new Map([...De.update,...Ne.update]),Ye.remove.size&&Ye.add.size)for(let lt of Ye.add.keys())Ye.remove.delete(lt);return function(lt){let ct={};return lt.removeAll&&(ct.removeAll=lt.removeAll),lt.remove&&(ct.remove=Array.from(lt.remove)),lt.add&&(ct.add=Array.from(lt.add.values())),lt.update&&(ct.update=Array.from(lt.update.values())),ct}(Ye)}(this._pendingWorkerUpdate.diff,y);let ie=this._updateWorkerData();return O?ie:this}getData(){return e._(this,void 0,void 0,function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}})}getBounds(){return e._(this,void 0,void 0,function*(){return Ue(yield this.getData())})}setClusterOptions(y){return this.workerOptions.geojsonVtOptions.cluster=y.cluster,y.clusterRadius!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(y.clusterRadius)),y.clusterMaxZoom!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(y.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(y){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:y,source:this.id}})}getClusterChildren(y){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:y,source:this.id}})}getClusterLeaves(y,O,ie){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:y,limit:O,offset:ie}})}_updateWorkerData(){return e._(this,void 0,void 0,function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void e.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:y,diff:O,updateCluster:ie}=this._pendingWorkerUpdate,ce=this._getLoadGeoJSONParameters(y,O,ie);y!==void 0?this._pendingWorkerUpdate.data=void 0:O?this._pendingWorkerUpdate.diff=void 0:ie&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(ce)})}_getLoadGeoJSONParameters(y,O,ie){return e._(this,void 0,void 0,function*(){let ce=e.e({type:this.type},this.workerOptions);return typeof y=="string"?(ce.request=yield this.map._requestManager.transformRequest(s.resolveURL(y),"Source"),ce.request.collectResourceTiming=this._collectResourceTiming,ce):y!==void 0?(ce.data=y,ce):O?(ce.dataDiff=O,ce):ie?(ce.updateCluster=!0,ce):void 0})}_dispatchWorkerUpdate(y){return e._(this,void 0,void 0,function*(){this._isUpdatingWorker=!0,this.fire(new e.n("dataloading",{dataType:"source"}));try{let O=yield y,ie=yield this.actor.sendAsync({type:"LD",data:O});if(this._isUpdatingWorker=!1,this._removed||ie.abandoned)return void this.fire(new e.n("dataabort",{dataType:"source"}));ie.data&&(this._data={geojson:ie.data});let ce=this._applyDiffToSource(O.dataDiff),_e=this._getShouldReloadTileOptions(ce),De={dataType:"source"};this._applyResourceTiming(De,ie),this.fire(new e.n("data",Object.assign(Object.assign({},De),{sourceDataType:"metadata"}))),this.fire(new e.n("data",Object.assign(Object.assign({},De),{sourceDataType:"content",shouldReloadTileOptions:_e})))}catch(O){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new e.n("dataabort",{dataType:"source"}));this.fire(new e.l(e.d(O)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}})}_applyResourceTiming(y,O){var ie;if(!this._collectResourceTiming)return;let ce=(ie=O.resourceTiming)===null||ie===void 0?void 0:ie[this.id];if(!ce)return;let _e=ce.slice(0);_e?.length&&e.e(y,{resourceTiming:_e})}_applyDiffToSource(y){if(!y)return;let O=typeof this.promoteId=="string"?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let ce=function(_e,De){let Ne=new Map;if(_e==null||_e.type==null)return Ne;if(_e.type==="Feature"){let Ye=ye(_e,De);return Ye==null?void 0:(Ne.set(Ye,_e),Ne)}if(_e.type==="FeatureCollection"){let Ye=new Set;for(let lt of _e.features){let ct=ye(lt,De);if(ct==null||Ye.has(ct))return;Ye.add(ct),Ne.set(ct,lt)}return Ne}}(this._data.geojson,O);if(!ce)throw new Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:ce}}if(!this._data.updateable)return;let ie=function(ce,_e,De){var Ne,Ye;let lt=[];if(_e.removeAll)ce.clear();else if(_e.remove)for(let ct of _e.remove){let Ft=ce.get(ct);Ft&&(lt.push(Ft.geometry),ce.delete(ct))}if(_e.add)for(let ct of _e.add){let Ft=ye(ct,De);if(Ft==null)continue;let Gt=ce.get(Ft);Gt&<.push(Gt.geometry),lt.push(ct.geometry),ce.set(Ft,ct)}if(_e.update)for(let ct of _e.update){let Ft=ce.get(ct.id);if(!Ft)continue;let Gt=!!ct.newGeometry,Jt=ct.removeAllProperties||((Ne=ct.removeProperties)===null||Ne===void 0?void 0:Ne.length)>0||((Ye=ct.addOrUpdateProperties)===null||Ye===void 0?void 0:Ye.length)>0;if(!Gt&&!Jt)continue;lt.push(Ft.geometry);let it=Object.assign({},Ft);if(ce.set(ct.id,it),Gt&&(lt.push(ct.newGeometry),it.geometry=ct.newGeometry),Jt){if(it.properties=ct.removeAllProperties?{}:Object.assign({},it.properties||{}),ct.removeProperties)for(let Rt of ct.removeProperties)delete it.properties[Rt];if(ct.addOrUpdateProperties)for(let{key:Rt,value:qt}of ct.addOrUpdateProperties)it.properties[Rt]=qt}}return lt}(this._data.updateable,y,O);return y.removeAll||this._options.cluster?void 0:ie}_getShouldReloadTileOptions(y){if(y)return{affectedBounds:y.filter(Boolean).map(O=>Ue(O))}}shouldReloadTile(y,{affectedBounds:O}){if(y.state==="loading")return!0;if(y.state==="unloaded")return!1;let{buffer:ie,extent:ce}=this.workerOptions.geojsonVtOptions,_e=function({x:De,y:Ne,z:Ye},lt=0){let ct=e.a4((De-lt)/Math.pow(2,Ye)),Ft=e.a5((Ne+1+lt)/Math.pow(2,Ye)),Gt=e.a4((De+1+lt)/Math.pow(2,Ye)),Jt=e.a5((Ne-lt)/Math.pow(2,Ye));return new q([ct,Ft],[Gt,Jt])}(y.tileID.canonical,ie/ce);for(let De of O)if(_e.intersects(De))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(y){return e._(this,void 0,void 0,function*(){let O=y.actor?"RT":"LT";y.actor=this.actor;let ie={type:this.type,uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};y.abortController=new AbortController;let ce=yield this.actor.sendAsync({type:O,data:ie},y.abortController);delete y.abortController,y.unloadVectorData(),y.aborted||y.loadVectorData(ce,this.map.painter,O==="RT")})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.aborted=!0})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:y.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return e.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class ke extends e.E{constructor(y,O,ie,ce){super(),this.flippedWindingOrder=!1,this.id=y,this.dispatcher=ie,this.coordinates=O.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ce),this.options=O}load(y){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let O=yield p.getImage(yield this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,O?.data&&(this.image=O.data,y&&(this.coordinates=y),this._finishLoading())}catch(O){this._request=null,this._loaded=!0,e.$(O)||this.fire(new e.l(e.d(O)))}})}loaded(){return this._loaded}updateImage(y){return y.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=y.url,this.load(y.coordinates).finally(()=>this.texture=null),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(y){this.map=y,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(y){this.coordinates=y;let O=y.map(e.a7.fromLngLat);var ie;return this.tileID=function(ce){let _e=e.a8.fromPoints(ce),De=_e.width(),Ne=_e.height(),Ye=Math.max(De,Ne),lt=Math.max(0,Math.floor(-Math.log(Ye)/Math.LN2)),ct=Math.pow(2,lt);return new e.aa(lt,Math.floor((_e.minX+_e.maxX)/2*ct),Math.floor((_e.minY+_e.maxY)/2*ct))}(O),this.terrainTileRanges=this._getOverlappingTileRanges(O),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=O.map(ce=>this.tileID.getTilePoint(ce)._round()),this.flippedWindingOrder=((ie=this.tileCoords)[1].x-ie[0].x)*(ie[2].y-ie[0].y)-(ie[1].y-ie[0].y)*(ie[2].x-ie[0].x)<0,this.fire(new e.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let y=this.map.painter.context,O=y.gl;this.texture||(this.texture=new e.T(y,this.image,O.RGBA),this.texture.bind(O.LINEAR,O.CLAMP_TO_EDGE));let ie=!1;for(let ce in this.tiles){let _e=this.tiles[ce];_e.state!=="loaded"&&(_e.state="loaded",_e.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(y){return e._(this,void 0,void 0,function*(){var O;!((O=this.tileID)===null||O===void 0)&&O.equals(y.tileID.canonical)?(this.tiles[String(y.tileID.wrap)]=y,y.buckets={}):y.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(y){let{minX:O,minY:ie,maxX:ce,maxY:_e}=e.a8.fromPoints(y),De={};for(let Ne=0;Ne<=e.a9;Ne++){let Ye=Math.pow(2,Ne),lt=Math.floor(O*Ye),ct=Math.floor(ie*Ye),Ft=Math.floor(ce*Ye),Gt=Math.floor(_e*Ye),Jt=(lt%Ye+Ye)%Ye,it=Ft%Ye,Rt=Math.floor(lt/Ye),qt=Math.floor(Ft/Ye);De[Ne]={minWrap:Rt,maxWrap:qt,minTileXWrapped:Jt,maxTileXWrapped:it,minTileY:ct,maxTileY:Gt}}return De}}class ge extends ke{constructor(y,O,ie,ce){super(y,O,ie,ce),this._onPlayingHandler=()=>{var _e;(_e=this.map)===null||_e===void 0||_e.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=O}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let y=this.options;this.urls=[];for(let O of y.urls)this.urls.push((yield this.map._requestManager.transformRequest(O,"Source")).url);try{let O=yield e.ab(this.urls);if(this._loaded=!0,!O)return;this.video=O,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(O){this.fire(new e.l(e.d(O)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(y){if(this.video){let O=this.video.seekable;yO.end(0)?this.fire(new e.l(new e.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${O.start(0)} and ${O.end(0)}-second mark.`))):this.video.currentTime=y}}getVideo(){return this.video}onAdd(y){this.map||(this.map=y,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let y=this.map.painter.context,O=y.gl;this.texture?this.video.paused||(this.texture.bind(O.LINEAR,O.CLAMP_TO_EDGE),O.texSubImage2D(O.TEXTURE_2D,0,0,0,O.RGBA,O.UNSIGNED_BYTE,this.video)):(this.texture=new e.T(y,this.video,O.RGBA),this.texture.bind(O.LINEAR,O.CLAMP_TO_EDGE));let ie=!1;for(let ce in this.tiles){let _e=this.tiles[ce];_e.state!=="loaded"&&(_e.state="loaded",_e.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class ue extends ke{constructor(y,O,ie,ce){super(y,O,ie,ce),O.coordinates?Array.isArray(O.coordinates)&&O.coordinates.length===4&&!O.coordinates.some(_e=>!Array.isArray(_e)||_e.length!==2||_e.some(De=>typeof De!="number"))||this.fire(new e.l(new e.ac(`sources.${y}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.l(new e.ac(`sources.${y}`,null,'missing required property "coordinates"'))),O.animate&&typeof O.animate!="boolean"&&this.fire(new e.l(new e.ac(`sources.${y}`,null,'optional "animate" property must be a boolean value'))),O.canvas?typeof O.canvas=="string"||O.canvas instanceof HTMLCanvasElement||this.fire(new e.l(new e.ac(`sources.${y}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.l(new e.ac(`sources.${y}`,null,'missing required property "canvas"'))),this.options=O,this.animate=O.animate===void 0||O.animate}load(){return e._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.l(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(y){this.map=y,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let y=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,y=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,y=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let O=this.map.painter.context,ie=O.gl;this.texture?(y||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new e.T(O,this.canvas,ie.RGBA,{premultiply:!0}),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let ce=!1;for(let _e in this.tiles){let De=this.tiles[_e];De.state!=="loaded"&&(De.state="loaded",De.texture=this.texture,ce=!0)}ce&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let y of[this.canvas.width,this.canvas.height])if(isNaN(y)||y<=0)return!0;return!1}}let ve={},se=de=>{switch(de){case"geojson":return qe;case"image":return ke;case"raster":return ne;case"raster-dem":return fe;case"vector":return ee;case"video":return ge;case"canvas":return ue}return ve[de]},Te="RTLPluginLoaded";class Fe extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=oe()}_syncState(y){return this.status=y,this.dispatcher.broadcast("SRPS",{pluginStatus:y,pluginURL:this.url}).catch(O=>{throw this.status="error",O})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(y){return e._(this,arguments,void 0,function*(O,ie=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=s.resolveURL(O),!this.url)throw new Error(`requested url ${O} is invalid`);if(this.status==="unavailable"){if(!ie)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.n(Te))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let We=null;function Ge(){return We||(We=new Fe),We}var gt,mt;(function(de){de[de.Base=0]="Base",de[de.Parent=1]="Parent"})(gt||(gt={})),function(de){de[de.Departing=0]="Departing",de[de.Incoming=1]="Incoming"}(mt||(mt={}));class Tt{constructor(y,O){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=y,this.uid=e.ad(),this.uses=0,this.tileSize=O,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(y){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(y||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:y,fadingDirection:O,fadingParentID:ie,fadeEndTime:ce}){this.resetFadeLogic(),this.fadingRole=y,this.fadingDirection=O,this.fadingParentID=ie,this.fadeEndTime=ce}setSelfFadeLogic(y){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=y}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=m(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(y){this.demTexture&&y.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(y,O,ie){if(y?.etagUnmodified!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",y){y.featureIndex&&(this.latestFeatureIndex=y.featureIndex,y.rawTileData?(this.latestRawTileData=y.rawTileData,this.latestEncoding=y.encoding,this.latestFeatureIndex.rawTileData=y.rawTileData,this.latestFeatureIndex.encoding=y.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=y.collisionBoxArray,this.buckets=function(ce,_e){let De={};if(!_e)return De;for(let Ne of ce){let Ye=Ne.layerIds.map(lt=>_e.getLayer(lt)).filter(Boolean);if(Ye.length!==0){Ne.layers=Ye,Ne.stateDependentLayerIds&&(Ne.stateDependentLayers=Ne.stateDependentLayerIds.map(lt=>Ye.filter(ct=>ct.id===lt)[0]));for(let lt of Ye)De[lt.id]=Ne}}return De}(y.buckets,O?.style),this.hasSymbolBuckets=!1;for(let ce in this.buckets){let _e=this.buckets[ce];if(_e instanceof e.af){if(this.hasSymbolBuckets=!0,!ie)break;_e.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let ce in this.buckets){let _e=this.buckets[ce];if(_e instanceof e.af&&_e.hasRTLText){this.hasRTLText=!0,Ge().lazyLoad();break}}this.queryPadding=0;for(let ce in this.buckets){let _e=this.buckets[ce];this.queryPadding=Math.max(this.queryPadding,O.style.getLayer(ce).queryRadius(_e))}y.imageAtlas&&(this.imageAtlas=y.imageAtlas),y.glyphAtlasImage&&(this.glyphAtlasImage=y.glyphAtlasImage),this.dashPositions=y.dashPositions}else this.collisionBoxArray=new e.ae;else this.state="loaded"}unloadVectorData(){for(let y in this.buckets)this.buckets[y].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(y){return this.buckets[y.id]}upload(y){for(let ie in this.buckets){let ce=this.buckets[ie];ce.uploadPending()&&ce.upload(y)}let O=y.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new e.T(y,this.imageAtlas.image,O.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new e.T(y,this.glyphAtlasImage,O.ALPHA),this.glyphAtlasImage=null)}prepare(y){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(y,this.imageAtlasTexture)}queryRenderedFeatures(y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft){var Gt;return!((Gt=this.latestFeatureIndex)===null||Gt===void 0)&&Gt.rawTileData?this.latestFeatureIndex.query({queryGeometry:ce,cameraQueryGeometry:_e,scale:De,tileSize:this.tileSize,pixelPosMatrix:ct,transform:Ye,params:Ne,queryPadding:this.queryPadding*lt,getElevation:Ft},y,O,ie):{}}querySourceFeatures(y,O){let ie=this.latestFeatureIndex;if(!ie?.rawTileData)return;let ce=ie.loadVTLayers(),_e=O?.sourceLayer?O.sourceLayer:"",De=ce[e.ag]||ce[_e];if(!De)return;let Ne=e.ah(O?.filter,O?.globalState),{z:Ye,x:lt,y:ct}=this.tileID.canonical,Ft={z:Ye,x:lt,y:ct};for(let Gt=0;Gtie)ce=!1;else if(O)if(this.expirationTime({zoom:0,x:0,y:0,wrap:mr,fullyVisible:!1}),Ar=[],dr=[];if(de.renderWorldCopies&&De.allowWorldCopies())for(let mr=1;mr<=3;mr++)Ar.push(vr(-mr)),Ar.push(vr(mr));for(Ar.push(vr(0));Ar.length>0;){let mr=Ar.pop(),qr=mr.x,Lr=mr.y,cn=mr.fullyVisible,Nn={x:qr,y:Lr,z:mr.zoom},Dn=De.getTileBoundingVolume(Nn,mr.wrap,de.elevation,y);if(!cn){let Sn=ht(O,Dn,ie);if(Sn===0)continue;cn=Sn===2}let qn=De.distanceToTile2d(ce.x,ce.y,Nn,Dn),_n=Ye;Ne&&(_n=(y.calculateTileZoom||He)(de.zoom+e.ar(de.tileSize/y.tileSize),qn,qt,or,de.fov)),_n=(y.roundZoom?Math.round:Math.floor)(_n),_n=Math.max(0,_n);let vn=Math.min(_n,ct);if(mr.wrap=De.getWrap(_e,Nn,mr.wrap),mr.zoom>=vn){if(mr.zoom>1),wrap:mr.wrap,fullyVisible:cn})}return dr.sort((mr,qr)=>mr.distanceSq-qr.distanceSq).map(mr=>mr.tileID)}let Je=e.a8.fromPoints([new e.P(0,0),new e.P(e.a6,e.a6)]);function Mt(de){return de==="raster"||de==="image"||de==="video"}function dt(de,y,O,ie,ce,_e,De){if(!y.hasData())return!1;let{tileID:Ne,fadingRole:Ye,fadingDirection:lt,fadingParentID:ct}=y;if(Ye===gt.Base&<===mt.Incoming&&ct)return O[ct.key]=ct,!0;let Ft=Math.max(Ne.overscaledZ-ce,_e);for(let Gt=Ne.overscaledZ-1;Gt>=Ft;Gt--){let Jt=Ne.scaledTo(Gt),it=de.getLoadedTile(Jt);if(it)return y.setCrossFadeLogic({fadingRole:gt.Base,fadingDirection:mt.Incoming,fadingParentID:it.tileID,fadeEndTime:ie+De}),it.setCrossFadeLogic({fadingRole:gt.Parent,fadingDirection:mt.Departing,fadeEndTime:ie+De}),O[Jt.key]=Jt,!0}return!1}function Dt(de,y,O,ie,ce,_e){if(!y.hasData())return!1;let De=y.tileID.children(ce),Ne=Ct(de,y,De,O,ie,ce,_e);if(Ne)return!0;for(let Ye of De)Ct(de,y,Ye.children(ce),O,ie,ce,_e)&&(Ne=!0);return Ne}function Ct(de,y,O,ie,ce,_e,De){if(O[0].overscaledZ>=_e)return!1;let Ne=!1;for(let Ye of O){let lt=de.getLoadedTile(Ye);if(!lt)continue;let{fadingRole:ct,fadingDirection:Ft,fadingParentID:Gt}=lt;ct===gt.Base&&Ft===mt.Departing&&Gt||(lt.setCrossFadeLogic({fadingRole:gt.Base,fadingDirection:mt.Departing,fadingParentID:y.tileID,fadeEndTime:ce+De}),y.setCrossFadeLogic({fadingRole:gt.Parent,fadingDirection:mt.Incoming,fadeEndTime:ce+De})),ie[Ye.key]=Ye,Ne=!0}return Ne}function Vt(de,y,O,ie){let ce=de.tileID;return!!de.selfFading||!de.hasData()&&!!y.has(ce)&&(de.setSelfFadeLogic(O+ie),!0)}function Ht(de,y){var O;de.needsHillshadePrepare=!0,de.needsTerrainPrepare=!0;let ie=y.tileID.canonical.x-de.tileID.canonical.x,ce=y.tileID.canonical.y-de.tileID.canonical.y,_e=Math.pow(2,de.tileID.canonical.z),De=y.tileID.key;ie===0&&ce===0||Math.abs(ce)>1||(Math.abs(ie)>1&&(Math.abs(ie+_e)===1?ie+=_e:Math.abs(ie-_e)===1&&(ie-=_e)),y.dem&&de.dem&&(de.dem.backfillBorder(y.dem,ie,ce),!((O=de.neighboringTiles)===null||O===void 0)&&O[De]&&(de.neighboringTiles[De].backfilled=!0)))}class Wt{constructor(){this._tiles={}}handleWrapJump(y){let O={};for(let ie in this._tiles){let ce=this._tiles[ie];ce.tileID=ce.tileID.unwrapTo(ce.tileID.wrap+y),O[ce.tileID.key]=ce}this._tiles=O}setFeatureState(y,O){for(let ie in this._tiles)this._tiles[ie].setFeatureState(y,O)}getAllTiles(){return Object.values(this._tiles)}getAllIds(y=!1){return y?Object.values(this._tiles).map(O=>O.tileID).sort(e.au).map(O=>O.key):Object.keys(this._tiles)}getTileById(y){return this._tiles[y]}setTile(y,O){this._tiles[y]=O}deleteTileById(y){delete this._tiles[y]}getLoadedTile(y){let O=this.getTileById(y.key);return O?.hasData()?O:null}isIdRenderable(y,O=!1){var ie;return(ie=this.getTileById(y))===null||ie===void 0?void 0:ie.isRenderable(O)}getRenderableIds(y=0,O){let ie=[];for(let ce of this.getAllIds())this.isIdRenderable(ce,O)&&ie.push(this.getTileById(ce));return O?ie.sort((ce,_e)=>{let De=ce.tileID,Ne=_e.tileID,Ye=new e.P(De.canonical.x,De.canonical.y)._rotate(-y),lt=new e.P(Ne.canonical.x,Ne.canonical.y)._rotate(-y);return De.overscaledZ-Ne.overscaledZ||lt.y-Ye.y||lt.x-Ye.x}).map(ce=>ce.tileID.key):ie.map(ce=>ce.tileID).sort(e.au).map(ce=>ce.key)}}class Sr extends e.E{constructor(y,O,ie){super(),this.id=y,this.dispatcher=ie,this.on("data",ce=>{this._dataHandler(ce)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((ce,_e,De,Ne)=>{let Ye=new(se(_e.type))(ce,_e,De,Ne);if(Ye.id!==ce)throw new Error(`Expected Source id to be ${ce} instead of ${Ye.id}`);return Ye})(y,O,ie,this),this._inViewTiles=new Wt,this._outOfViewCache=new e.av(0,ce=>this._unloadTile(ce)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new At,this._didEmitContent=!1,this._updated=!1}onAdd(y){var O;this.map=y,this._maxTileCacheSize=y?y._maxTileCacheSize:null,this._maxTileCacheZoomLevels=y?y._maxTileCacheZoomLevels:null,!((O=this._source)===null||O===void 0)&&O.onAdd&&this._source.onAdd(y)}onRemove(y){var O;for(let ie of this._inViewTiles.getAllTiles())ie.unloadVectorData();this.clearTiles(),!((O=this._source)===null||O===void 0)&&O.onRemove&&this._source.onRemove(y),this._inViewTiles=new Wt}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let y=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,y&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(y,O,ie){return e._(this,void 0,void 0,function*(){try{let ce=yield this._source.loadTile(y);this._tileLoaded(y,O,ie,ce)}catch(ce){y.state="errored",ce.status!==404?this._source.fire(new e.l(e.d(ce),{tile:y})):this.update(this.transform,this.terrain)}})}_unloadTile(y){this._source.unloadTile&&this._source.unloadTile(y)}_abortTile(y){this._source.abortTile&&this._source.abortTile(y),this._source.fire(new e.n("dataabort",{tile:y,coord:y.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(y){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let O of this._inViewTiles.getAllTiles())O.upload(y),O.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(y){var O;return this._inViewTiles.getRenderableIds((O=this.transform)===null||O===void 0?void 0:O.bearingInRadians,y)}hasRenderableParent(y){let O=y.overscaledZ-1;if(O>=this._source.minzoom){let ie=this.getLoadedTile(y.scaledTo(O));if(ie)return this._inViewTiles.isIdRenderable(ie.tileID.key)}return!1}reload(y,O=void 0){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(let ie of this._inViewTiles.getAllIds()){let ce=this._inViewTiles.getTileById(ie);O&&!this._source.shouldReloadTile(ce,O)||(y?this._reloadTile(ie,"expired"):ce.state!=="errored"&&this._reloadTile(ie,"reloading"))}}}_reloadTile(y,O){return e._(this,void 0,void 0,function*(){let ie=this._inViewTiles.getTileById(y);ie&&(ie.state!=="loading"&&(ie.state=O),yield this._loadTile(ie,y,O))})}_tileLoaded(y,O,ie,ce){y.timeAdded=m(),y.selfFading&&(y.fadeEndTime=y.timeAdded+this._rasterFadeDuration),ie==="expired"&&(y.refreshedUponExpiration=!0),this._setTileReloadTimer(O,y),ce?.unmodified||(this.getSource().type==="raster-dem"&&y.dem&&function(_e,De){var Ne,Ye,lt;let ct=De.getRenderableIds();for(let Ft of ct){if(!(!((Ne=_e.neighboringTiles)===null||Ne===void 0)&&Ne[Ft]))continue;let Gt=De.getTileById(Ft);_e.neighboringTiles[Ft].backfilled||Ht(_e,Gt),!((lt=(Ye=Gt.neighboringTiles)===null||Ye===void 0?void 0:Ye[_e.tileID.key])===null||lt===void 0)&<.backfilled||Ht(Gt,_e)}}(y,this._inViewTiles),this._state.initializeTileState(y,this.map?this.map.painter:null),y.aborted||this._source.fire(new e.n("data",{dataType:"source",tile:y,coord:y.tileID})))}getTile(y){return this.getTileByID(y.key)}getTileByID(y){return this._inViewTiles.getTileById(y)}_retainLoadedChildren(y,O){let ie=this._getLoadedDescendents(O),ce=new Set;for(let _e of O){let De=ie[_e.key];if(!De?.length){ce.add(_e);continue}let Ne=_e.overscaledZ+Sr.maxOverzooming,Ye=De.filter(Ft=>Ft.tileID.overscaledZ<=Ne);if(!Ye.length){ce.add(_e);continue}let lt=Math.min(...Ye.map(Ft=>Ft.tileID.overscaledZ)),ct=Ye.filter(Ft=>Ft.tileID.overscaledZ===lt).map(Ft=>Ft.tileID);for(let Ft of ct)y[Ft.key]=Ft;this._areDescendentsComplete(ct,lt,_e.overscaledZ)||ce.add(_e)}return ce}_getLoadedDescendents(y){var O;let ie={};for(let ce of this._inViewTiles.getAllTiles().filter(_e=>_e.hasData()))for(let _e of y)ce.tileID.isChildOf(_e)&&(ie[O=_e.key]||(ie[O]=[]),ie[_e.key].push(ce));return ie}_areDescendentsComplete(y,O,ie){return y.length===1&&y[0].isOverscaled()?y[0].overscaledZ===O:Math.pow(4,O-ie)===y.length}getLoadedTile(y){return this._inViewTiles.getLoadedTile(y)}updateCacheSize(y){let O=Math.ceil(y.width/this._source.tileSize)+1,ie=Math.ceil(y.height/this._source.tileSize)+1,ce=Math.floor(O*ie*(this._maxTileCacheZoomLevels===null?e.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),_e=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,ce):ce;this._outOfViewCache.setMaxSize(_e)}handleWrapJump(y){let O=Math.round((y-(this._prevLng===void 0?y:this._prevLng))/360);this._prevLng=y,O&&(this._inViewTiles.handleWrapJump(O),this._resetTileReloadTimers())}update(y,O){if(!this._sourceLoaded||this._paused)return;let ie;this.transform=y,this.terrain=O,this.updateCacheSize(y),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?ie=y.getVisibleUnwrappedCoordinates(this._source.tileID).map(Ye=>new e.a3(Ye.canonical.z,Ye.wrap,Ye.canonical.z,Ye.canonical.x,Ye.canonical.y)):(ie=Ze(y,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?y.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:O,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(ie=ie.filter(Ye=>this._source.hasTile(Ye)))):ie=[],this.usedForTerrain&&(ie=this._addTerrainIdealTiles(ie));let ce=ie.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,ce&&this.fire(new e.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let _e=$e(y,this._source),De=this._updateRetainedTiles(ie,_e),Ne=Mt(this._source.type);Ne&&this._rasterFadeDuration>0&&!O&&function(Ye,lt,ct,Ft,Gt,Jt,it){let Rt=m(),qt=e.at(lt);for(let or of lt){let vr=Ye.getTileById(or.key);vr.fadingDirection!==mt.Departing&&vr.fadeOpacity!==0||vr.resetFadeLogic(),dt(Ye,vr,ct,Rt,Ft,Gt,it)||Dt(Ye,vr,ct,Rt,Jt,it)||Vt(vr,qt,Rt,it)||vr.resetFadeLogic()}}(this._inViewTiles,ie,De,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),Ne?this._cleanUpRasterTiles(De):this._cleanUpVectorTiles(De)}_cleanUpRasterTiles(y){for(let O of this._inViewTiles.getAllIds())y[O]||this._removeTile(O)}_cleanUpVectorTiles(y){for(let O of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(O);y[O]?ie.clearSymbolFadeHold():ie.hasSymbolBuckets?ie.holdingForSymbolFade()?ie.symbolFadeFinished()&&this._removeTile(O):ie.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(O)}}_addTerrainIdealTiles(y){let O=[];for(let ie of y)if(ie.canonical.z>this._source.minzoom){let ce=ie.scaledTo(ie.canonical.z-1);O.push(ce);let _e=ie.scaledTo(Math.max(this._source.minzoom,Math.min(ie.canonical.z,5)));O.push(_e)}return y.concat(O)}releaseSymbolFadeTiles(){for(let y of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(y).holdingForSymbolFade()&&this._removeTile(y)}_updateRetainedTiles(y,O){var ie;let ce=new Set;for(let lt of y)this._addTile(lt).hasData()||ce.add(lt);let _e=y.reduce((lt,ct)=>(lt[ct.key]=ct,lt),{}),De=this._retainLoadedChildren(_e,ce),Ne={},Ye=Math.max(O-Sr.maxUnderzooming,this._source.minzoom);for(let lt of De){let ct=this._inViewTiles.getTileById(lt.key),Ft=ct?.wasRequested();for(let Gt=lt.overscaledZ-1;Gt>=Ye;--Gt){let Jt=lt.scaledTo(Gt);if(Ne[Jt.key])break;if(Ne[Jt.key]=!0,ct=this.getTile(Jt),!ct&&Ft&&(ct=this._addTile(Jt)),ct){let it=ct.hasData();if((it||!(!((ie=this.map)===null||ie===void 0)&&ie.cancelPendingTileRequestsWhileZooming)||Ft)&&(_e[Jt.key]=Jt),Ft=ct.wasRequested(),it)break}}}return _e}_addTile(y){let O=this._inViewTiles.getTileById(y.key);if(O)return O;O=this._outOfViewCache.getAndRemove(y),O&&(O.resetFadeLogic(),this._setTileReloadTimer(y.key,O),O.tileID=y,this._state.initializeTileState(O,this.map?this.map.painter:null));let ie=O;return O||(O=new Tt(y,this._source.tileSize*y.overscaleFactor()),this._loadTile(O,y.key,O.state)),O.uses++,this._inViewTiles.setTile(y.key,O),ie||this._source.fire(new e.n("dataloading",{tile:O,coord:O.tileID,dataType:"source"})),O}_setTileReloadTimer(y,O){this._clearTileReloadTimer(y);let ie=O.getExpiryTimeout();ie&&(this._timers[y]=setTimeout(()=>{this._reloadTile(y,"expired"),delete this._timers[y]},ie))}_clearTileReloadTimer(y){let O=this._timers[y];O&&(clearTimeout(O),delete this._timers[y])}_resetTileReloadTimers(){for(let y in this._timers)clearTimeout(this._timers[y]),delete this._timers[y];for(let y of this._inViewTiles.getAllIds()){let O=this._inViewTiles.getTileById(y);this._setTileReloadTimer(y,O)}}refreshTiles(y){for(let O of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(O);(this._inViewTiles.isIdRenderable(O)||ie.state=="errored")&&y.some(ce=>ce.equals(ie.tileID.canonical))&&this._reloadTile(O,"expired")}}_removeTile(y){let O=this._inViewTiles.getTileById(y);O&&(O.uses--,this._inViewTiles.deleteTileById(y),this._clearTileReloadTimer(y),O.uses>0||(O.hasData()&&O.state!=="reloading"?this._outOfViewCache.add(O.tileID,O,O.getExpiryTimeout()):(O.aborted=!0,this._abortTile(O),this._unloadTile(O))))}_dataHandler(y){y.dataType==="source"&&(y.sourceDataType!=="metadata"?y.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(y.sourceDataChanged,y.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let y of this._inViewTiles.getAllIds())this._removeTile(y);this._outOfViewCache.reset()}tilesIn(y,O,ie){let ce=[],_e=this.transform;if(!_e)return ce;let De=_e.getCoveringTilesDetailsProvider().allowWorldCopies(),Ne=ie?_e.getCameraQueryGeometry(y):y,Ye=Jt=>_e.screenPointToMercatorCoordinate(Jt,this.terrain),lt=this.transformBbox(y,Ye,!De),ct=this.transformBbox(Ne,Ye,!De),Ft=this.getIds(),Gt=e.a8.fromPoints(ct);for(let Jt of Ft){let it=this._inViewTiles.getTileById(Jt);if(it.holdingForSymbolFade())continue;let Rt=De?[it.tileID]:[it.tileID.unwrapTo(-1),it.tileID.unwrapTo(0)],qt=Math.pow(2,_e.zoom-it.tileID.overscaledZ),or=O*it.queryPadding*e.a6/it.tileSize/qt;for(let vr of Rt){let Ar=Gt.map(dr=>vr.getTilePoint(new e.a7(dr.x,dr.y)));if(Ar.expandBy(or),Ar.intersects(Je)){let dr=lt.map(qr=>vr.getTilePoint(qr)),mr=ct.map(qr=>vr.getTilePoint(qr));ce.push({tile:it,tileID:De?vr:vr.unwrapTo(0),queryGeometry:dr,cameraQueryGeometry:mr,scale:qt})}}}return ce}transformBbox(y,O,ie){let ce=y.map(O);if(ie){let _e=e.a8.fromPoints(y);_e.shrinkBy(.001*Math.min(_e.width(),_e.height()));let De=_e.map(O);e.a8.fromPoints(ce).covers(De)||(ce=ce.map(Ne=>Ne.x>.5?new e.a7(Ne.x-1,Ne.y,Ne.z):Ne))}return ce}getVisibleCoordinates(y){let O=this.getRenderableIds(y).map(ie=>this._inViewTiles.getTileById(ie).tileID);return this.transform&&this.transform.populateCache(O),O}hasTransition(){return!!this._source.hasTransition()||Mt(this._source.type)&&function(y,O){if(O<=0)return!1;let ie=m();for(let ce of y.getAllTiles())if(ce.fadeEndTime>=ie)return!0;return!1}(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(y){this._rasterFadeDuration=y}setFeatureState(y,O,ie){y||(y=e.ag),this._state.updateState(y,O,ie)}removeFeatureState(y,O,ie){y||(y=e.ag),this._state.removeFeatureState(y,O,ie)}getFeatureState(y,O){return y||(y=e.ag),this._state.getState(y,O)}setDependencies(y,O,ie){let ce=this._inViewTiles.getTileById(y);ce&&ce.setDependencies(O,ie)}reloadTilesForDependencies(y,O){for(let ie of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(ie).hasDependency(y,O)&&this._reloadTile(ie,"reloading");this._outOfViewCache.filter(ie=>!ie.hasDependency(y,O))}areTilesLoaded(){for(let y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}}Sr.maxUnderzooming=10,Sr.maxOverzooming=3;class on{constructor(y,O){this.reset(y,O)}reset(y,O){this.points=y||[],this._distances=[0];for(let ie=1;ie0?(ce-De)/Ne:0;return this.points[_e].mult(1-Ye).add(this.points[O].mult(Ye))}}function $t(de,y){let O=!0;return de==="always"||de!=="never"&&y!=="never"||(O=!1),O}class It{constructor(y,O,ie){let ce=this.boxCells=[],_e=this.circleCells=[];this.xCellCount=Math.ceil(y/ie),this.yCellCount=Math.ceil(O/ie);for(let De=0;Dethis.width||ce<0||O>this.height)return[];let Ye=[];if(y<=0&&O<=0&&this.width<=ie&&this.height<=ce){if(_e)return[{key:null,x1:y,y1:O,x2:ie,y2:ce}];for(let lt=0;lt0}hitTestCircle(y,O,ie,ce,_e){let De=y-ie,Ne=y+ie,Ye=O-ie,lt=O+ie;if(Ne<0||De>this.width||lt<0||Ye>this.height)return!1;let ct=[];return this._forEachCell(De,Ye,Ne,lt,this._queryCellCircle,ct,{hitTest:!0,overlapMode:ce,circle:{x:y,y:O,radius:ie},seenUids:{box:{},circle:{}}},_e),ct.length>0}_queryCell(y,O,ie,ce,_e,De,Ne,Ye){let{seenUids:lt,hitTest:ct,overlapMode:Ft}=Ne,Gt=this.boxCells[_e],Jt=1e-6;if(Gt!==null){let Rt=this.bboxes;for(let qt of Gt)if(!lt.box[qt]){lt.box[qt]=!0;let or=4*qt,vr=this.boxKeys[qt];if(y<=Rt[or+2]+Jt&&O<=Rt[or+3]+Jt&&ie>=Rt[or+0]-Jt&&ce>=Rt[or+1]-Jt&&(!Ye||Ye(vr))&&(!ct||!$t(Ft,vr.overlapMode))&&(De.push({key:vr,x1:Rt[or],y1:Rt[or+1],x2:Rt[or+2],y2:Rt[or+3]}),ct))return!0}}let it=this.circleCells[_e];if(it!==null){let Rt=this.circles;for(let qt of it)if(!lt.circle[qt]){lt.circle[qt]=!0;let or=3*qt,vr=this.circleKeys[qt];if(this._circleAndRectCollide(Rt[or],Rt[or+1],Rt[or+2],y,O,ie,ce)&&(!Ye||Ye(vr))&&(!ct||!$t(Ft,vr.overlapMode))){let Ar=Rt[or],dr=Rt[or+1],mr=Rt[or+2];if(De.push({key:vr,x1:Ar-mr,y1:dr-mr,x2:Ar+mr,y2:dr+mr}),ct)return!0}}}return!1}_queryCellCircle(y,O,ie,ce,_e,De,Ne,Ye){let{circle:lt,seenUids:ct,overlapMode:Ft}=Ne,Gt=this.boxCells[_e];if(Gt!==null){let it=this.bboxes;for(let Rt of Gt)if(!ct.box[Rt]){ct.box[Rt]=!0;let qt=4*Rt,or=this.boxKeys[Rt];if(this._circleAndRectCollide(lt.x,lt.y,lt.radius,it[qt+0],it[qt+1],it[qt+2],it[qt+3])&&(!Ye||Ye(or))&&!$t(Ft,or.overlapMode))return De.push(!0),!0}}let Jt=this.circleCells[_e];if(Jt!==null){let it=this.circles;for(let Rt of Jt)if(!ct.circle[Rt]){ct.circle[Rt]=!0;let qt=3*Rt,or=this.circleKeys[Rt];if(this._circlesCollide(it[qt],it[qt+1],it[qt+2],lt.x,lt.y,lt.radius)&&(!Ye||Ye(or))&&!$t(Ft,or.overlapMode))return De.push(!0),!0}}}_forEachCell(y,O,ie,ce,_e,De,Ne,Ye){let lt=this._convertToXCellCoord(y),ct=this._convertToYCellCoord(O),Ft=this._convertToXCellCoord(ie),Gt=this._convertToYCellCoord(ce);for(let Jt=lt;Jt<=Ft;Jt++)for(let it=ct;it<=Gt;it++)if(_e.call(this,y,O,ie,ce,this.xCellCount*it+Jt,De,Ne,Ye))return}_convertToXCellCoord(y){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(y*this.xScale)))}_convertToYCellCoord(y){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(y*this.yScale)))}_circlesCollide(y,O,ie,ce,_e,De){let Ne=ce-y,Ye=_e-O,lt=ie+De;return lt*lt>Ne*Ne+Ye*Ye}_circleAndRectCollide(y,O,ie,ce,_e,De,Ne){let Ye=(De-ce)/2,lt=Math.abs(y-(ce+Ye));if(lt>Ye+ie)return!1;let ct=(Ne-_e)/2,Ft=Math.abs(O-(_e+ct));if(Ft>ct+ie)return!1;if(lt<=Ye||Ft<=ct)return!0;let Gt=lt-Ye,Jt=Ft-ct;return Gt*Gt+Jt*Jt<=ie*ie}}function ir(de,y){let O=1/(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]),ie=1/(y[8]*y[8]+y[9]*y[9]+y[10]*y[10]),ce=y[0]*O,_e=y[4]*O,De=y[8]*ie,Ne=y[1]*O,Ye=y[5]*O,lt=y[9]*ie,ct=y[2]*O,Ft=y[6]*O,Gt=y[10]*ie;de[0]=ce,de[1]=_e,de[2]=De,de[4]=Ne,de[5]=Ye,de[6]=lt,de[8]=ct,de[9]=Ft,de[10]=Gt;let Jt=y[12],it=y[13],Rt=y[14];return de[12]=-ce*Jt-Ne*it-ct*Rt,de[13]=-_e*Jt-Ye*it-Ft*Rt,de[14]=-De*Jt-lt*it-Gt*Rt,de[3]=0,de[7]=0,de[11]=0,de[15]=1,de}let cr=e.O();function fr(de,y,O){let ie=e.O();if(!de){let{vecSouth:Ft,vecEast:Gt}=ln(y),Jt=a();Jt[0]=Gt[0],Jt[1]=Gt[1],Jt[2]=Ft[0],Jt[3]=Ft[1],ce=Jt,(ct=(De=(_e=Jt)[0])*(lt=_e[3])-(Ye=_e[2])*(Ne=_e[1]))&&(ce[0]=lt*(ct=1/ct),ce[1]=-Ne*ct,ce[2]=-Ye*ct,ce[3]=De*ct),ie[0]=Jt[0],ie[1]=Jt[1],ie[4]=Jt[2],ie[5]=Jt[3]}var ce,_e,De,Ne,Ye,lt,ct;return e.S(ie,ie,[1/O,1/O,1]),ie}function Ir(de,y,O,ie){if(de){let ce=e.O();if(!y){let{vecSouth:_e,vecEast:De}=ln(O);ce[0]=De[0],ce[1]=De[1],ce[4]=_e[0],ce[5]=_e[1]}return e.S(ce,ce,[ie,ie,1]),ce}return O.pixelsToClipSpaceMatrix}function ln(de){let y=Math.cos(de.rollInRadians),O=Math.sin(de.rollInRadians),ie=Math.cos(de.pitchInRadians),ce=Math.cos(de.bearingInRadians),_e=Math.sin(de.bearingInRadians),De=e.az();De[0]=-ce*ie*O-_e*y,De[1]=-_e*ie*O+ce*y;let Ne=e.aA(De);Ne<1e-9?e.aB(De):e.aC(De,De,1/Ne);let Ye=e.az();Ye[0]=ce*ie*y-_e*O,Ye[1]=_e*ie*y+ce*O;let lt=e.aA(Ye);return lt<1e-9?e.aB(Ye):e.aC(Ye,Ye,1/lt),{vecEast:Ye,vecSouth:De}}function nn(de,y,O,ie){let ce;ie?(ce=[de,y,ie(de,y),1],e.aE(ce,ce,O)):(ce=[de,y,0,1],Kn(ce,ce,O));let _e=ce[3];return{point:new e.P(ce[0]/_e,ce[1]/_e),signedDistanceFromCamera:_e,isOccluded:!1}}function wn(de,y){return .5+de/y*.5}function Un(de,y){return de.x>=-y[0]&&de.x<=y[0]&&de.y>=-y[1]&&de.y<=y[1]}function jn(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt){let Jt=O?de.textSizeData:de.iconSizeData,it=e.aw(Jt,y.transform.zoom),Rt=[256/y.width*2+1,256/y.height*2+1],qt=O?de.text.dynamicLayoutVertexArray:de.icon.dynamicLayoutVertexArray;qt.clear();let or=de.lineVertexArray,vr=O?de.text.placedSymbolArray:de.icon.placedSymbolArray,Ar=y.transform.width/y.transform.height,dr=!1;for(let mr=0;mrMath.abs(O.x-y.x)*ie?{useVertical:!0}:(de===e.ax.vertical?y.yO.x)?{needsFlipping:!0}:null}function Qn(de){let{projectionContext:y,pitchedLabelPlaneMatrixInverse:O,symbol:ie,fontSize:ce,flip:_e,keepUpright:De,glyphOffsetArray:Ne,dynamicLayoutVertexArray:Ye,aspectRatio:lt,rotateToLine:ct}=de,Ft=ce/24,Gt=ie.lineOffsetX*Ft,Jt=ie.lineOffsetY*Ft,it;if(ie.numGlyphs>1){let Rt=ie.glyphStartIndex+ie.numGlyphs,qt=ie.lineStartIndex,or=ie.lineStartIndex+ie.lineLength,vr=Aa(Ft,Ne,Gt,Jt,_e,ie,ct,y);if(!vr)return{notEnoughRoom:!0};let Ar=Mi(vr.first.point.x,vr.first.point.y,y,O),dr=Mi(vr.last.point.x,vr.last.point.y,y,O);if(De&&!_e){let mr=ua(ie.writingMode,Ar,dr,lt);if(mr)return mr}it=[vr.first];for(let mr=ie.glyphStartIndex+1;mr0?Ar.point:ei(y.tileAnchorPoint,vr,qt,1,y),mr=Mi(qt.x,qt.y,y,O),qr=Mi(dr.x,dr.y,y,O),Lr=ua(ie.writingMode,mr,qr,lt);if(Lr)return Lr}let Rt=Ii(Ft*Ne.getoffsetX(ie.glyphStartIndex),Gt,Jt,_e,ie.segment,ie.lineStartIndex,ie.lineStartIndex+ie.lineLength,y,ct);if(!Rt||y.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};it=[Rt]}for(let Rt of it)e.aD(Ye,Rt.point,Rt.angle);return{}}function ei(de,y,O,ie,ce){let _e=de.add(de.sub(y)._unit()),De=ai(_e.x,_e.y,ce).point,Ne=O.sub(De);return O.add(Ne._mult(ie/Ne.mag()))}function Fa(de,y,O){let ie=y.projectionCache;if(ie.projections[de])return ie.projections[de];let ce=new e.P(y.lineVertexArray.getx(de),y.lineVertexArray.gety(de)),_e=ai(ce.x,ce.y,y);if(_e.signedDistanceFromCamera>0)return ie.projections[de]=_e.point,ie.anyProjectionOccluded||(ie.anyProjectionOccluded=_e.isOccluded),_e.point;let De=de-O.direction;return ei(O.distanceFromAnchor===0?y.tileAnchorPoint:new e.P(y.lineVertexArray.getx(De),y.lineVertexArray.gety(De)),ce,O.previousVertex,O.absOffsetX-O.distanceFromAnchor+1,y)}function ai(de,y,O){let ie=de+O.translation[0],ce=y+O.translation[1],_e;return O.pitchWithMap?(_e=nn(ie,ce,O.pitchedLabelPlaneMatrix,O.getElevation),_e.isOccluded=!1):(_e=O.transform.projectTileCoordinates(ie,ce,O.unwrappedTileID,O.getElevation),_e.point.x=(.5*_e.point.x+.5)*O.width,_e.point.y=(.5*-_e.point.y+.5)*O.height),_e}function Mi(de,y,O,ie){if(O.pitchWithMap){let ce=[de,y,0,1];return e.aE(ce,ce,ie),O.transform.projectTileCoordinates(ce[0]/ce[3],ce[1]/ce[3],O.unwrappedTileID,O.getElevation).point}return{x:de/O.width*2-1,y:1-y/O.height*2}}function ci(de,y,O){return O.transform.projectTileCoordinates(de,y,O.unwrappedTileID,O.getElevation)}function ba(de,y,O){return de._unit()._perp()._mult(y*O)}function pa(de,y,O,ie,ce,_e,De,Ne,Ye){if(Ne.projectionCache.offsets[de])return Ne.projectionCache.offsets[de];let lt=O.add(y);if(de+Ye.direction=ce)return Ne.projectionCache.offsets[de]=lt,lt;let ct=Fa(de+Ye.direction,Ne,Ye),Ft=ba(ct.sub(O),De,Ye.direction),Gt=O.add(Ft),Jt=ct.add(Ft);return Ne.projectionCache.offsets[de]=e.aF(_e,lt,Gt,Jt)||lt,Ne.projectionCache.offsets[de]}function Ii(de,y,O,ie,ce,_e,De,Ne,Ye){let lt=ie?de-y:de+y,ct=lt>0?1:-1,Ft=0;ie&&(ct*=-1,Ft=Math.PI),ct<0&&(Ft+=Math.PI);let Gt,Jt=ct>0?_e+ce:_e+ce+1;Ne.projectionCache.cachedAnchorPoint?Gt=Ne.projectionCache.cachedAnchorPoint:(Gt=ai(Ne.tileAnchorPoint.x,Ne.tileAnchorPoint.y,Ne).point,Ne.projectionCache.cachedAnchorPoint=Gt);let it,Rt,qt=Gt,or=Gt,vr=0,Ar=0,dr=Math.abs(lt),mr=[],qr;for(;vr+Ar<=dr;){if(Jt+=ct,Jt<_e||Jt>=De)return null;vr+=Ar,or=qt,Rt=it;let Nn={absOffsetX:dr,direction:ct,distanceFromAnchor:vr,previousVertex:or};if(qt=Fa(Jt,Ne,Nn),O===0)mr.push(or),qr=qt.sub(or);else{let Dn,qn=qt.sub(or);Dn=qn.mag()===0?ba(Fa(Jt+ct,Ne,Nn).sub(qt),O,ct):ba(qn,O,ct),Rt||(Rt=or.add(Dn)),it=pa(Jt,Dn,qt,_e,De,Rt,O,Ne,Nn),mr.push(Rt),qr=it.sub(Rt)}Ar=qr.mag()}let Lr=qr._mult((dr-vr)/Ar)._add(Rt||or),cn=Ft+Math.atan2(qt.y-or.y,qt.x-or.x);return mr.push(Lr),{point:Lr,angle:Ye?cn:0,path:mr}}let ho=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function da(de,y){for(let O=0;O=1;$n--)Sn.push(_n.path[$n]);for(let $n=1;$nHa.signedDistanceFromCamera<=0)?[]:$n.map(Ha=>Ha.point)}let Xn=[];if(Sn.length>0){let $n=Sn[0].clone(),Ha=Sn[0].clone();for(let $a=1;$a=Nn.x&&Ha.x<=Dn.x&&$n.y>=Nn.y&&Ha.y<=Dn.y?[Sn]:Ha.xDn.x||Ha.yDn.y?[]:e.aG([Sn],Nn.x,Nn.y,Dn.x,Dn.y)}for(let $n of Xn){qn.reset($n,.25*cn);let Ha=0;Ha=qn.length<=.5*cn?1:Math.ceil(qn.paddedLength/Tn)+1;for(let $a=0;$a{let Ye=nn(Ne.x,Ne.y,De,_e.getElevation),lt=_e.transform.projectTileCoordinates(Ye.point.x,Ye.point.y,_e.unwrappedTileID,_e.getElevation);return lt.point.x=(.5*lt.point.x+.5)*_e.width,lt.point.y=(.5*-lt.point.y+.5)*_e.height,lt})}(y,O);return function(ce){let _e=0,De=0,Ne=0,Ye=0;for(let lt=0;ltDe&&(De=Ye,_e=Ne));return ce.slice(_e,_e+De)}(ie)}queryRenderedSymbols(y){if(y.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let O=[],ie=new e.a8;for(let Ft of y){let Gt=new e.P(Ft.x+ot,Ft.y+ot);ie.extend(Gt),O.push(Gt)}let{minX:ce,minY:_e,maxX:De,maxY:Ne}=ie,Ye=this.grid.query(ce,_e,De,Ne).concat(this.ignoredGrid.query(ce,_e,De,Ne)),lt={},ct={};for(let Ft of Ye){let Gt=Ft.key;if(lt[Gt.bucketInstanceId]===void 0&&(lt[Gt.bucketInstanceId]={}),lt[Gt.bucketInstanceId][Gt.featureIndex])continue;let Jt=[new e.P(Ft.x1,Ft.y1),new e.P(Ft.x2,Ft.y1),new e.P(Ft.x2,Ft.y2),new e.P(Ft.x1,Ft.y2)];e.aH(O,Jt)&&(lt[Gt.bucketInstanceId][Gt.featureIndex]=!0,ct[Gt.bucketInstanceId]===void 0&&(ct[Gt.bucketInstanceId]=[]),ct[Gt.bucketInstanceId].push(Gt.featureIndex))}return ct}insertCollisionBox(y,O,ie,ce,_e,De){(ie?this.ignoredGrid:this.grid).insert({bucketInstanceId:ce,featureIndex:_e,collisionGroupID:De,overlapMode:O},y[0],y[1],y[2],y[3])}insertCollisionCircles(y,O,ie,ce,_e,De){let Ne=ie?this.ignoredGrid:this.grid,Ye={bucketInstanceId:ce,featureIndex:_e,collisionGroupID:De,overlapMode:O};for(let lt=0;lt=this.screenRightBoundary||cethis.screenBottomBoundary}isInsideGrid(y,O,ie,ce){return ie>=0&&y=0&&Othis.projectAndGetPerspectiveRatio(Tn.x,Tn.y,ce,lt,Ft));vn=Sn.some(Tn=>!Tn.isOccluded),_n=Sn.map(Tn=>new e.P(Tn.x,Tn.y))}else vn=!0;return{box:e.aI(_n),allPointsOccluded:!vn}}}class hr{constructor(y,O,ie,ce){this.opacity=y?Math.max(0,Math.min(1,y.opacity+(y.placed?O:-O))):ce&&ie?1:0,this.placed=ie}isHidden(){return this.opacity===0&&!this.placed}}class ur{constructor(y,O,ie,ce,_e){this.text=new hr(y?y.text:null,O,ie,_e),this.icon=new hr(y?y.icon:null,O,ce,_e)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Tr{constructor(y,O,ie){this.text=y,this.icon=O,this.skipFade=ie}}class Rr{constructor(y,O,ie,ce,_e){this.bucketInstanceId=y,this.featureIndex=O,this.sourceLayerIndex=ie,this.bucketIndex=ce,this.tileID=_e}}class Fr{constructor(y){this.crossSourceCollisions=y,this.maxGroupID=0,this.collisionGroups={}}get(y){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[y]){let O=++this.maxGroupID;this.collisionGroups[y]={ID:O,predicate:ie=>ie.collisionGroupID===O}}return this.collisionGroups[y]}}function at(de,y,O,ie,ce){let{horizontalAlign:_e,verticalAlign:De}=e.aP(de);return new e.P(-(_e-.5)*y+ie[0]*ce,-(De-.5)*O+ie[1]*ce)}class kt{constructor(y,O,ie,ce,_e){this.transform=y.clone(),this.terrain=O,this.collisionIndex=new et(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ie,this.retainedQueryData={},this.collisionGroups=new Fr(ce),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=_e,_e&&(_e.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(y){let O=this.terrain;return O?(ie,ce)=>O.getElevation(y,ie,ce):null}getBucketParts(y,O,ie,ce){let _e=ie.getBucket(O),De=ie.latestFeatureIndex;if(!_e||!De||O.id!==_e.layerIds[0])return;let Ne=ie.collisionBoxArray,Ye=_e.layers[0].layout,lt=_e.layers[0].paint,ct=Math.pow(2,this.transform.zoom-ie.tileID.overscaledZ),Ft=ie.tileSize/e.a6,Gt=ie.tileID.toUnwrapped(),Jt=Ye.get("text-rotation-alignment")==="map",it=e.aK(ie,1,this.transform.zoom),Rt=e.aL(this.collisionIndex.transform,ie,lt.get("text-translate"),lt.get("text-translate-anchor")),qt=e.aL(this.collisionIndex.transform,ie,lt.get("icon-translate"),lt.get("icon-translate-anchor")),or=fr(Jt,this.transform,it);this.retainedQueryData[_e.bucketInstanceId]=new Rr(_e.bucketInstanceId,De,_e.sourceLayerIndex,_e.index,ie.tileID);let vr={bucket:_e,layout:Ye,translationText:Rt,translationIcon:qt,unwrappedTileID:Gt,pitchedLabelPlaneMatrix:or,scale:ct,textPixelRatio:Ft,holdingForFade:ie.holdingForSymbolFade(),collisionBoxArray:Ne,partiallyEvaluatedTextSize:e.aw(_e.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(_e.sourceID)};if(ce)for(let Ar of _e.sortKeyRanges){let{sortKey:dr,symbolInstanceStart:mr,symbolInstanceEnd:qr}=Ar;y.push({sortKey:dr,symbolInstanceStart:mr,symbolInstanceEnd:qr,parameters:vr})}else y.push({symbolInstanceStart:0,symbolInstanceEnd:_e.symbolInstances.length,parameters:vr})}attemptAnchorPlacement(y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt,Jt,it,Rt,qt,or,vr,Ar,dr){var mr,qr,Lr;let cn=e.aM[y.textAnchor],Nn=[y.textOffset0,y.textOffset1],Dn=at(cn,ie,ce,Nn,_e),qn=this.collisionIndex.placeCollisionBox(O,Gt,Ye,lt,ct,Ne,De,qt,Ft.predicate,Ar,Dn,dr);if((!vr||this.collisionIndex.placeCollisionBox(vr,Gt,Ye,lt,ct,Ne,De,or,Ft.predicate,Ar,Dn,dr).placeable)&&qn.placeable){let _n;if(!((mr=this.prevPlacement)===null||mr===void 0)&&mr.variableOffsets[Jt.crossTileID]&&(!((Lr=(qr=this.prevPlacement)===null||qr===void 0?void 0:qr.placements[Jt.crossTileID])===null||Lr===void 0)&&Lr.text)&&(_n=this.prevPlacement.variableOffsets[Jt.crossTileID].anchor),Jt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Jt.crossTileID]={textOffset:Nn,width:ie,height:ce,anchor:cn,textBoxScale:_e,prevAnchor:_n},this.markUsedJustification(it,cn,Jt,Rt),it.allowVerticalPlacement&&(this.markUsedOrientation(it,Rt,Jt),this.placedOrientations[Jt.crossTileID]=Rt),{shift:Dn,placedGlyphBoxes:qn}}}placeLayerBucketPart(y,O,ie){let{bucket:ce,layout:_e,translationText:De,translationIcon:Ne,unwrappedTileID:Ye,pitchedLabelPlaneMatrix:lt,textPixelRatio:ct,holdingForFade:Ft,collisionBoxArray:Gt,partiallyEvaluatedTextSize:Jt,collisionGroup:it}=y.parameters,Rt=_e.get("text-optional"),qt=_e.get("icon-optional"),or=e.aN(_e,"text-overlap","text-allow-overlap"),vr=or==="always",Ar=e.aN(_e,"icon-overlap","icon-allow-overlap"),dr=Ar==="always",mr=_e.get("text-rotation-alignment")==="map",qr=_e.get("text-pitch-alignment")==="map",Lr=_e.get("icon-text-fit")!=="none",cn=_e.get("symbol-z-order")==="viewport-y",Nn=vr&&(dr||!ce.hasIconData()||qt),Dn=dr&&(vr||!ce.hasTextData()||Rt);!ce.collisionArrays&&Gt&&ce.deserializeCollisionBoxes(Gt);let qn=this.retainedQueryData[ce.bucketInstanceId].tileID,_n=this._getTerrainElevationFunc(qn),vn=this.transform.getFastPathSimpleProjectionMatrix(qn),Sn=(Tn,Xn,$n)=>{var Ha,$a;if(O[Tn.crossTileID])return;if(Ft)return void(this.placements[Tn.crossTileID]=new Tr(!1,!1,!1));let Si=!1,Ma=!1,xa=!0,gi=null,Wa={box:null,placeable:!1,offscreen:null,occluded:!1},Ya={placeable:!1},Xa=null,pi=null,Xi=null,Eo=0,yi=0,Ui=0;Xn.textFeatureIndex?Eo=Xn.textFeatureIndex:Tn.useRuntimeCollisionCircles&&(Eo=Tn.featureIndex),Xn.verticalTextFeatureIndex&&(yi=Xn.verticalTextFeatureIndex);let fo=Xn.textBox;if(fo){let Vs=hs=>{let ss=e.ax.horizontal;if(ce.allowVerticalPlacement&&!hs&&this.prevPlacement){let ks=this.prevPlacement.placedOrientations[Tn.crossTileID];ks&&(this.placedOrientations[Tn.crossTileID]=ks,ss=ks,this.markUsedOrientation(ce,ss,Tn))}return ss},Uo=(hs,ss)=>{if(ce.allowVerticalPlacement&&Tn.numVerticalGlyphVertices>0&&Xn.verticalTextBox){for(let ks of ce.writingModes)if(ks===e.ax.vertical?(Wa=ss(),Ya=Wa):Wa=hs(),Wa?.placeable)break}else Wa=hs()},Qs=Tn.textAnchorOffsetStartIndex,os=Tn.textAnchorOffsetEndIndex;if(os===Qs){let hs=(ss,ks)=>{let ts=this.collisionIndex.placeCollisionBox(ss,or,ct,qn,Ye,qr,mr,De,it.predicate,_n,void 0,vn);return ts?.placeable&&(this.markUsedOrientation(ce,ks,Tn),this.placedOrientations[Tn.crossTileID]=ks),ts};Uo(()=>hs(fo,e.ax.horizontal),()=>{let ss=Xn.verticalTextBox;return ce.allowVerticalPlacement&&Tn.numVerticalGlyphVertices>0&&ss?hs(ss,e.ax.vertical):{box:null,offscreen:null}}),Vs(Wa?.placeable)}else{let hs=e.aM[($a=(Ha=this.prevPlacement)===null||Ha===void 0?void 0:Ha.variableOffsets[Tn.crossTileID])===null||$a===void 0?void 0:$a.anchor],ss=(ts,el,Il)=>{let Do=ts.x2-ts.x1,ru=ts.y2-ts.y1,Ns=Tn.textBoxScale,Nu=Lr&&Ar==="never"?el:null,Vl=null,Hl=or==="never"?1:2,Co="never";hs&&Hl++;for(let is=0;isss(fo,Xn.iconBox,e.ax.horizontal),()=>{let ts=Xn.verticalTextBox;return ce.allowVerticalPlacement&&!Wa?.placeable&&Tn.numVerticalGlyphVertices>0&&ts?ss(ts,Xn.verticalIconBox,e.ax.vertical):{box:null,occluded:!0,offscreen:null}}),Wa&&(Si=Wa.placeable,xa=Wa.offscreen);let ks=Vs(Wa?.placeable);if(!Si&&this.prevPlacement){let ts=this.prevPlacement.variableOffsets[Tn.crossTileID];ts&&(this.variableOffsets[Tn.crossTileID]=ts,this.markUsedJustification(ce,ts.anchor,Tn,ks))}}}if(Xa=Wa,Si=Xa?.placeable,xa=Xa?.offscreen,Tn.useRuntimeCollisionCircles&&Tn.centerJustifiedTextSymbolIndex>=0){let Vs=ce.text.placedSymbolArray.get(Tn.centerJustifiedTextSymbolIndex),Uo=e.ay(ce.textSizeData,Jt,Vs),Qs=_e.get("text-padding");pi=this.collisionIndex.placeCollisionCircles(or,Vs,ce.lineVertexArray,ce.glyphOffsetArray,Uo,Ye,lt,ie,qr,it.predicate,Tn.collisionCircleDiameter,Qs,De,_n),pi.circles.length&&pi.collisionDetected&&!ie&&e.w("Collisions detected, but collision boxes are not shown"),Si=vr||pi.circles.length>0&&!pi.collisionDetected,xa&&(xa=pi.offscreen)}if(Xn.iconFeatureIndex&&(Ui=Xn.iconFeatureIndex),Xn.iconBox){let Vs=Uo=>this.collisionIndex.placeCollisionBox(Uo,Ar,ct,qn,Ye,qr,mr,Ne,it.predicate,_n,Lr&&gi?gi:void 0,vn);Ya&&Ya.placeable&&Xn.verticalIconBox?(Xi=Vs(Xn.verticalIconBox),Ma=Xi.placeable):(Xi=Vs(Xn.iconBox),Ma=Xi.placeable),xa&&(xa=Xi.offscreen)}let To=Rt||Tn.numHorizontalGlyphVertices===0&&Tn.numVerticalGlyphVertices===0,jo=qt||Tn.numIconVertices===0;To||jo?jo?To||Ma&&(Ma=Si):Si=Ma&&Si:Ma=Si=Ma&&Si;let qs=Ma&&Xi.placeable;if(Si&&Xa.placeable&&this.collisionIndex.insertCollisionBox(Xa.box,or,_e.get("text-ignore-placement"),ce.bucketInstanceId,Ya&&Ya.placeable&&yi?yi:Eo,it.ID),qs&&this.collisionIndex.insertCollisionBox(Xi.box,Ar,_e.get("icon-ignore-placement"),ce.bucketInstanceId,Ui,it.ID),pi&&Si&&this.collisionIndex.insertCollisionCircles(pi.circles,or,_e.get("text-ignore-placement"),ce.bucketInstanceId,Eo,it.ID),ie&&this.storeCollisionData(ce.bucketInstanceId,$n,Xn,Xa,Xi,pi),Tn.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(ce.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[Tn.crossTileID]=new Tr((Si||Nn)&&!Xa?.occluded,(Ma||Dn)&&!Xi?.occluded,xa||ce.justReloaded),O[Tn.crossTileID]=!0};if(cn){if(y.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let Tn=ce.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let Xn=Tn.length-1;Xn>=0;--Xn){let $n=Tn[Xn];Sn(ce.symbolInstances.get($n),ce.collisionArrays[$n],$n)}}else for(let Tn=y.symbolInstanceStart;Tn=0&&(y.text.placedSymbolArray.get(Ne).crossTileID=_e>=0&&Ne!==_e?0:ie.crossTileID)}markUsedOrientation(y,O,ie){let ce=O===e.ax.horizontal||O===e.ax.horizontalOnly?O:0,_e=O===e.ax.vertical?O:0,De=[ie.leftJustifiedTextSymbolIndex,ie.centerJustifiedTextSymbolIndex,ie.rightJustifiedTextSymbolIndex];for(let Ne of De)y.text.placedSymbolArray.get(Ne).placedOrientation=ce;ie.verticalPlacedTextSymbolIndex&&(y.text.placedSymbolArray.get(ie.verticalPlacedTextSymbolIndex).placedOrientation=_e)}commit(y){this.commitTime=y,this.zoomAtLastRecencyCheck=this.transform.zoom;let O=this.prevPlacement,ie=!1;this.prevZoomAdjustment=O?O.zoomAdjustment(this.transform.zoom):0;let ce=O?O.symbolFadeChange(y):1,_e=O?O.opacities:{},De=O?O.variableOffsets:{},Ne=O?O.placedOrientations:{};for(let Ye in this.placements){let lt=this.placements[Ye],ct=_e[Ye];ct?(this.opacities[Ye]=new ur(ct,ce,lt.text,lt.icon),ie||(ie=lt.text!==ct.text.placed),ie||(ie=lt.icon!==ct.icon.placed)):(this.opacities[Ye]=new ur(null,ce,lt.text,lt.icon,lt.skipFade),ie||(ie=lt.text||lt.icon))}for(let Ye in _e){let lt=_e[Ye];if(!this.opacities[Ye]){let ct=new ur(lt,ce,!1,!1);ct.isHidden()||(this.opacities[Ye]=ct,ie||(ie=lt.text.placed),ie||(ie=lt.icon.placed))}}for(let Ye in De)this.variableOffsets[Ye]||!this.opacities[Ye]||this.opacities[Ye].isHidden()||(this.variableOffsets[Ye]=De[Ye]);for(let Ye in Ne)this.placedOrientations[Ye]||!this.opacities[Ye]||this.opacities[Ye].isHidden()||(this.placedOrientations[Ye]=Ne[Ye]);if(O&&O.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");ie?this.lastPlacementChangeTime=y:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=O?O.lastPlacementChangeTime:y)}updateLayerOpacities(y,O){let ie={};for(let ce of O){let _e=ce.getBucket(y);_e&&ce.latestFeatureIndex&&y.id===_e.layerIds[0]&&this.updateBucketOpacities(_e,ce.tileID,ie,ce.collisionBoxArray)}}updateBucketOpacities(y,O,ie,ce){y.hasTextData()&&(y.text.opacityVertexArray.clear(),y.text.hasVisibleVertices=!1),y.hasIconData()&&(y.icon.opacityVertexArray.clear(),y.icon.hasVisibleVertices=!1),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexArray.clear(),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexArray.clear();let _e=y.layers[0],De=_e.layout,Ne=new ur(null,0,!1,!1,!0),Ye=De.get("text-allow-overlap"),lt=De.get("icon-allow-overlap"),ct=_e._unevaluatedLayout.hasValue("text-variable-anchor")||_e._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ft=De.get("text-rotation-alignment")==="map",Gt=De.get("text-pitch-alignment")==="map",Jt=De.get("icon-text-fit")!=="none",it=new ur(null,0,Ye&&(lt||!y.hasIconData()||De.get("icon-optional")),lt&&(Ye||!y.hasTextData()||De.get("text-optional")),!0);!y.collisionArrays&&ce&&(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData())&&y.deserializeCollisionBoxes(ce);let Rt=(or,vr,Ar)=>{for(let dr=0;dr0,cn=this.placedOrientations[vr.crossTileID],Nn=cn===e.ax.vertical,Dn=cn===e.ax.horizontal||cn===e.ax.horizontalOnly;if(Ar>0||dr>0){let _n=Pn(qr.text);Rt(y.text,Ar,Nn?Ca:_n),Rt(y.text,dr,Dn?Ca:_n);let vn=qr.text.isHidden(),Sn=[vr.rightJustifiedTextSymbolIndex,vr.centerJustifiedTextSymbolIndex,vr.leftJustifiedTextSymbolIndex];for(let $n of Sn)$n>=0&&(y.text.placedSymbolArray.get($n).hidden=vn||Nn?1:0);vr.verticalPlacedTextSymbolIndex>=0&&(y.text.placedSymbolArray.get(vr.verticalPlacedTextSymbolIndex).hidden=vn||Dn?1:0);let Tn=this.variableOffsets[vr.crossTileID];Tn&&this.markUsedJustification(y,Tn.anchor,vr,cn);let Xn=this.placedOrientations[vr.crossTileID];Xn&&(this.markUsedJustification(y,"left",vr,Xn),this.markUsedOrientation(y,Xn,vr))}if(Lr){let _n=Pn(qr.icon),vn=!(Jt&&vr.verticalPlacedIconSymbolIndex&&Nn);vr.placedIconSymbolIndex>=0&&(Rt(y.icon,vr.numIconVertices,vn?_n:Ca),y.icon.placedSymbolArray.get(vr.placedIconSymbolIndex).hidden=qr.icon.isHidden()),vr.verticalPlacedIconSymbolIndex>=0&&(Rt(y.icon,vr.numVerticalIconVertices,vn?Ca:_n),y.icon.placedSymbolArray.get(vr.verticalPlacedIconSymbolIndex).hidden=qr.icon.isHidden())}let qn=qt?.has(or)?qt.get(or):{text:null,icon:null};if(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData()){let _n=y.collisionArrays[or];if(_n){let vn=new e.P(0,0);if(_n.textBox||_n.verticalTextBox){let Sn=!0;if(ct){let Tn=this.variableOffsets[mr];Tn?(vn=at(Tn.anchor,Tn.width,Tn.height,Tn.textOffset,Tn.textBoxScale),Ft&&vn._rotate(Gt?-this.transform.bearingInRadians:this.transform.bearingInRadians)):Sn=!1}if(_n.textBox||_n.verticalTextBox){let Tn;_n.textBox&&(Tn=Nn),_n.verticalTextBox&&(Tn=Dn),Ut(y.textCollisionBox.collisionVertexArray,qr.text.placed,!Sn||Tn,qn.text,vn.x,vn.y)}}if(_n.iconBox||_n.verticalIconBox){let Sn=!!(!Dn&&_n.verticalIconBox),Tn;_n.iconBox&&(Tn=Sn),_n.verticalIconBox&&(Tn=!Sn),Ut(y.iconCollisionBox.collisionVertexArray,qr.icon.placed,Tn,qn.icon,Jt?vn.x:0,Jt?vn.y:0)}}}}if(y.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[y.bucketInstanceId]&&(this.retainedQueryData[y.bucketInstanceId].featureSortOrder=y.featureSortOrder),y.hasTextData()&&y.text.opacityVertexBuffer&&y.text.opacityVertexBuffer.updateData(y.text.opacityVertexArray),y.hasIconData()&&y.icon.opacityVertexBuffer&&y.icon.opacityVertexBuffer.updateData(y.icon.opacityVertexArray),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexBuffer&&y.iconCollisionBox.collisionVertexBuffer.updateData(y.iconCollisionBox.collisionVertexArray),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexBuffer&&y.textCollisionBox.collisionVertexBuffer.updateData(y.textCollisionBox.collisionVertexArray),y.text.opacityVertexArray.length!==y.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${y.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${y.text.layoutVertexArray.length}) / 4`);if(y.icon.opacityVertexArray.length!==y.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${y.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${y.icon.layoutVertexArray.length}) / 4`);y.bucketInstanceId in this.collisionCircleArrays&&(y.collisionCircleArray=this.collisionCircleArrays[y.bucketInstanceId],delete this.collisionCircleArrays[y.bucketInstanceId])}symbolFadeChange(y){return this.fadeDuration===0?1:(y-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(y){return Math.max(0,(this.transform.zoom-y)/1.5)}hasTransitions(y){return this.stale||y-this.lastPlacementChangeTimey}setStale(){this.stale=!0}}function Ut(de,y,O,ie,ce,_e){ie&&ie.length!==0||(ie=[0,0,0,0]);let De=ie[0]-ot,Ne=ie[1]-ot,Ye=ie[2]-ot,lt=ie[3]-ot;de.emplaceBack(y?1:0,O?1:0,ce||0,_e||0,De,Ne),de.emplaceBack(y?1:0,O?1:0,ce||0,_e||0,Ye,Ne),de.emplaceBack(y?1:0,O?1:0,ce||0,_e||0,Ye,lt),de.emplaceBack(y?1:0,O?1:0,ce||0,_e||0,De,lt)}let ar=Math.pow(2,25),Er=Math.pow(2,24),br=Math.pow(2,17),Or=Math.pow(2,16),Pr=Math.pow(2,9),hn=Math.pow(2,8),zn=Math.pow(2,1);function Pn(de){if(de.opacity===0&&!de.placed)return 0;if(de.opacity===1&&de.placed)return 4294967295;let y=de.placed?1:0,O=Math.floor(127*de.opacity);return O*ar+y*Er+O*br+y*Or+O*Pr+y*hn+O*zn+y}let Ca=0;class ma{constructor(y){this._sortAcrossTiles=y.layout.get("symbol-z-order")!=="viewport-y"&&!y.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(y,O,ie,ce,_e){let De=this._bucketParts;for(;this._currentTileIndexNe.sortKey-Ye.sortKey));this._currentPartIndex!this._forceFullPlacement&&m()-ce>2;for(;this._currentPlacementIndex>=0;){let De=O[y[this._currentPlacementIndex]],Ne=this.placement.collisionIndex.transform.zoom;if(e.aQ(De)&&De.layout&&(!De.minzoom||De.minzoom<=Ne)&&(!De.maxzoom||De.maxzoom>Ne)){if(this._inProgressLayer||(this._inProgressLayer=new ma(De)),this._inProgressLayer.continuePlacement(ie[De.source],this.placement,this._showCollisionBoxes,De,_e))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(y){return this.placement.commit(y),this.placement}}let ga=512/e.a6/2;class eo{constructor(y,O,ie){this.tileID=y,this.bucketInstanceId=ie,this._symbolsByKey={};let ce=new Map;for(let _e=0;_e({x:Math.floor(Ye.anchorX*ga),y:Math.floor(Ye.anchorY*ga)})),crossTileIDs:De.map(Ye=>Ye.crossTileID)};if(Ne.positions.length>128){let Ye=new e.aR(Ne.positions.length,16,Uint16Array);for(let{x:lt,y:ct}of Ne.positions)Ye.add(lt,ct);Ye.finish(),delete Ne.positions,Ne.index=Ye}this._symbolsByKey[_e]=Ne}}getScaledCoordinates(y,O){let{x:ie,y:ce,z:_e}=this.tileID.canonical,{x:De,y:Ne,z:Ye}=O.canonical,lt=ga/Math.pow(2,Ye-_e),ct=(Ne*e.a6+y.anchorY)*lt,Ft=ce*e.a6*ga;return{x:Math.floor((De*e.a6+y.anchorX)*lt-ie*e.a6*ga),y:Math.floor(ct-Ft)}}findMatches(y,O,ie){let ce=this.tileID.canonical.zy)}}class si{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Ao{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(y){let O=Math.round((y-this.lng)/360);if(O!==0)for(let ie in this.indexes){let ce=this.indexes[ie],_e={};for(let De in ce){let Ne=ce[De];Ne.tileID=Ne.tileID.unwrapTo(Ne.tileID.wrap+O),_e[Ne.tileID.key]=Ne}this.indexes[ie]=_e}this.lng=y}addBucket(y,O,ie){var ce,_e,De;if(!((ce=this.indexes[y.overscaledZ])===null||ce===void 0)&&ce[y.key]){if(this.indexes[y.overscaledZ][y.key].bucketInstanceId===O.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(y.overscaledZ,this.indexes[y.overscaledZ][y.key])}for(let Ye=0;Yey.overscaledZ)for(let ct in lt){let Ft=lt[ct];Ft.tileID.isChildOf(y)&&Ft.findMatches(O.symbolInstances,y,Ne)}else{let ct=lt[y.scaledTo(Number(Ye)).key];ct&&ct.findMatches(O.symbolInstances,y,Ne)}}for(let Ye=0;Ye=","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"}}}),bL=Ee({"src/plots/map/styles/arcgis-sat.js"(J,H){"use strict";H.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"}}]}}}),cv=Ee({"src/plots/map/constants.js"(J,H){"use strict";var v=(Ev(),tn(Hd)).default,x=_L(),E=bL(),k='\xA9 OpenStreetMap contributors',l="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",e="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",t="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",o={basic:t,streets:t,outdoors:t,light:l,dark:e,satellite:E,"satellite-streets":x,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:k,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":l,"carto-darkmatter":e,"carto-voyager":t,"carto-positron-nolabels":n,"carto-darkmatter-nolabels":r,"carto-voyager-nolabels":a},s=v(o);H.exports={styleValueDflt:"basic",stylesMap:o,styleValuesMap:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",s.join(", "),"or use a tile service."].join(` +`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}}}),Um=Ee({"src/plots/map/layout_attributes.js"(J,H){"use strict";var v=Vr(),x=Qn().defaultLine,E=kl().attributes,k=Xs(),l=ou().textposition,e=El().overrideAll,t=xs().templatedArray,n=cv(),r=k({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});r.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var a=H.exports=e({_arrayAttrRegexps:[v.counterRegex("map",".layers",!0)],domain:E({name:"map"}),style:{valType:"any",values:n.styleValuesMap,dflt:n.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:t("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:x},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:x}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:r,textposition:v.extendFlat({},l,{arrayOk:!1})}})},"plot","from-root");a.uirevision={valType:"any",editType:"none"}}}),Gy=Ee({"src/traces/scattermap/attributes.js"(J,H){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:E}=Cs(),k=Yh(),l=l0(),e=ou(),t=Um(),n=nn(),r=$s(),a=vo().extendFlat,o=El().overrideAll,s=Um(),c=l.line,g=l.marker;H.exports=o({lon:l.lon,lat:l.lat,cluster:{enabled:{valType:"boolean"},maxzoom:a({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:a({},g.opacity,{dflt:1})},mode:a({},e.mode,{dflt:"markers"}),text:a({},e.text,{}),texttemplate:x({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:a({},e.hovertext,{}),line:{color:c.color,width:c.width},connectgaps:e.connectgaps,marker:a({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:g.opacity,size:g.size,sizeref:g.sizeref,sizemin:g.sizemin,sizemode:g.sizemode},r("marker")),fill:l.fill,fillcolor:k(),textfont:t.layers.symbol.textfont,textposition:t.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:a({},n.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:v(),hovertemplatefallback:E()},"calc","nested")}}),l5=Ee({"src/traces/scattermap/constants.js"(J,H){"use strict";var v=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];H.exports={isSupportedFont:function(x){return v.indexOf(x)!==-1}}}}),xL=Ee({"src/traces/scattermap/defaults.js"(J,H){"use strict";var v=Vr(),x=nl(),E=gh(),k=Rh(),l=Fh(),e=Xh(),t=Gy(),n=l5().isSupportedFont;H.exports=function(o,s,c,g){function f(A,b){return v.coerce(o,s,t,A,b)}function p(A,b){return v.coerce2(o,s,t,A,b)}var m=r(o,s,f);if(!m){s.visible=!1;return}if(f("text"),f("texttemplate"),f("texttemplatefallback"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("mode"),f("below"),x.hasMarkers(s)){E(o,s,c,g,f,{noLine:!0,noAngle:!0}),f("marker.allowoverlap"),f("marker.angle");var i=s.marker;i.symbol!=="circle"&&(v.isArrayOrTypedArray(i.size)&&(i.size=i.size[0]),v.isArrayOrTypedArray(i.color)&&(i.color=i.color[0]))}x.hasLines(s)&&(k(o,s,c,g,f,{noDash:!0}),f("connectgaps"));var T=p("cluster.maxzoom"),S=p("cluster.step"),M=p("cluster.color",s.marker&&s.marker.color||c),C=p("cluster.size"),_=p("cluster.opacity"),w=T!==!1||S!==!1||M!==!1||C!==!1||_!==!1,h=f("cluster.enabled",w);if(h||x.hasText(s)){var u=g.font.family;l(o,s,g,f,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:n(u)?u:"Open Sans Regular",weight:g.font.weight,style:g.font.style,size:g.font.size,color:g.font.color}})}f("fill"),s.fill!=="none"&&e(o,s,c,f),v.coerceSelectionMarkerOpacity(s,f)};function r(a,o,s){var c=s("lon")||[],g=s("lat")||[],f=Math.min(c.length,g.length);return o._length=f,f}}}),u5=Ee({"src/traces/scattermap/format_labels.js"(J,H){"use strict";var v=uo();H.exports=function(E,k,l){var e={},t=l[k.subplot]._subplot,n=t.mockAxis,r=E.lonlat;return e.lonLabel=v.tickText(n,n.c2l(r[0]),!0).text,e.latLabel=v.tickText(n,n.c2l(r[1]),!0).text,e}}}),c5=Ee({"src/plots/map/convert_text_opts.js"(J,H){"use strict";var v=Vr();H.exports=function(E,k){var l=E.split(" "),e=l[0],t=l[1],n=v.isArrayOrTypedArray(k)?v.mean(k):k,r=.5+n/100,a=1.5+n/100,o=["",""],s=[0,0];switch(e){case"top":o[0]="top",s[1]=-a;break;case"bottom":o[0]="bottom",s[1]=a;break}switch(t){case"left":o[1]="right",s[0]=-r;break;case"right":o[1]="left",s[0]=r;break}var c;return o[0]&&o[1]?c=o.join("-"):o[0]?c=o[0]:o[1]?c=o[1]:c="center",{anchor:c,offset:s}}}}),wL=Ee({"src/traces/scattermap/convert.js"(J,H){"use strict";var v=mi(),x=Vr(),E=Qi().BADNUM,k=Dm(),l=pl(),e=mo(),t=U0(),n=nl(),r=l5().isSupportedFont,a=c5(),o=Qf().appendArrayPointValue,s=Fs().NEWLINES,c=Fs().BR_TAG_ALL;H.exports=function(_,w){var h=w[0].trace,u=h.visible===!0&&h._length!==0,A=h.fill!=="none",b=n.hasLines(h),z=n.hasMarkers(h),I=n.hasText(h),N=z&&h.marker.symbol==="circle",R=z&&h.marker.symbol!=="circle",B=h.cluster&&h.cluster.enabled,F=g("fill"),P=g("line"),j=g("circle"),U=g("symbol"),Z={fill:F,line:P,circle:j,symbol:U};if(!u)return Z;var Q;if((A||b)&&(Q=k.calcTraceToLineCoords(w)),A&&(F.geojson=k.makePolygon(Q),F.layout.visibility="visible",x.extendFlat(F.paint,{"fill-color":h.fillcolor})),b&&(P.geojson=k.makeLine(Q),P.layout.visibility="visible",x.extendFlat(P.paint,{"line-width":h.line.width,"line-color":h.line.color,"line-opacity":h.opacity})),N){var re=f(w);j.geojson=re.geojson,j.layout.visibility="visible",B&&(j.filter=["!",["has","point_count"]],Z.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":S(h.cluster.color,h.cluster.step),"circle-radius":S(h.cluster.size,h.cluster.step),"circle-opacity":S(h.cluster.opacity,h.cluster.step)}},Z.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":M(h),"text-size":12}}),x.extendFlat(j.paint,{"circle-color":re.mcc,"circle-radius":re.mrc,"circle-opacity":re.mo})}if(N&&B&&(j.filter=["!",["has","point_count"]]),(R||I)&&(U.geojson=p(w,_),x.extendFlat(U.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),R&&(x.extendFlat(U.layout,{"icon-size":h.marker.size/10}),"angle"in h.marker&&h.marker.angle!=="auto"&&x.extendFlat(U.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),U.layout["icon-allow-overlap"]=h.marker.allowoverlap,x.extendFlat(U.paint,{"icon-opacity":h.opacity*h.marker.opacity,"icon-color":h.marker.color,"icon-halo-color":h.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),I)){var ne=(h.marker||{}).size,oe=a(h.textposition,ne);x.extendFlat(U.layout,{"text-size":h.textfont.size,"text-anchor":oe.anchor,"text-offset":oe.offset,"text-font":M(h)}),x.extendFlat(U.paint,{"text-color":h.textfont.color,"text-opacity":h.opacity})}return Z};function g(C){return{type:C,geojson:k.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function f(C){var _=C[0].trace,w=_.marker,h=_.selectedpoints,u=x.isArrayOrTypedArray(w.color),A=x.isArrayOrTypedArray(w.size),b=x.isArrayOrTypedArray(w.opacity),z;function I(ne){return _.opacity*ne}function N(ne){return ne/2}var R;u&&(l.hasColorscale(_,"marker")?R=l.makeColorScaleFuncFromTrace(w):R=x.identity);var B;A&&(B=t(_));var F;b&&(F=function(ne){var oe=v(ne)?+x.constrain(ne,0,1):0;return I(oe)});var P=[];for(z=0;z850?z+=" Black":u>750?z+=" Extra Bold":u>650?z+=" Bold":u>550?z+=" Semi Bold":u>450?z+=" Medium":u>350?z+=" Regular":u>250?z+=" Light":u>150?z+=" Extra Light":z+=" Thin"):A.slice(0,2).join(" ")==="Open Sans"?(z="Open Sans",u>750?z+=" Extrabold":u>650?z+=" Bold":u>550?z+=" Semibold":u>350?z+=" Regular":z+=" Light"):A.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(z="Klokantech Noto Sans",A[3]==="CJK"&&(z+=" CJK"),z+=u>500?" Bold":" Regular")),b&&(z+=" Italic"),z==="Open Sans Regular Italic"?z="Open Sans Italic":z==="Open Sans Regular Bold"?z="Open Sans Bold":z==="Open Sans Regular Bold Italic"?z="Open Sans Bold Italic":z==="Klokantech Noto Sans Regular Italic"&&(z="Klokantech Noto Sans Italic"),r(z)||(z=w);var I=z.split(", ");return I}}}),TL=Ee({"src/traces/scattermap/plot.js"(J,H){"use strict";var v=Vr(),x=wL(),E=cv().traceLayerPrefix,k={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function l(t,n,r,a){this.type="scattermap",this.subplot=t,this.uid=n,this.clusterEnabled=r,this.isHidden=a,this.sourceIds={fill:"source-"+n+"-fill",line:"source-"+n+"-line",circle:"source-"+n+"-circle",symbol:"source-"+n+"-symbol",cluster:"source-"+n+"-circle",clusterCount:"source-"+n+"-circle"},this.layerIds={fill:E+n+"-fill",line:E+n+"-line",circle:E+n+"-circle",symbol:E+n+"-symbol",cluster:E+n+"-cluster",clusterCount:E+n+"-cluster-count"},this.below=null}var e=l.prototype;e.addSource=function(t,n,r){var a={type:"geojson",data:n.geojson};r&&r.enabled&&v.extendFlat(a,{cluster:!0,clusterMaxZoom:r.maxzoom});var o=this.subplot.map.getSource(this.sourceIds[t]);o?o.setData(n.geojson):this.subplot.map.addSource(this.sourceIds[t],a)},e.setSourceData=function(t,n){this.subplot.map.getSource(this.sourceIds[t]).setData(n.geojson)},e.addLayer=function(t,n,r){var a={type:n.type,id:this.layerIds[t],source:this.sourceIds[t],layout:n.layout,paint:n.paint};n.filter&&(a.filter=n.filter);for(var o=this.layerIds[t],s,c=this.subplot.getMapLayers(),g=0;g=0;b--){var z=A[b];o.removeLayer(p.layerIds[z])}u||o.removeSource(p.sourceIds.circle)}function T(u){for(var A=k.nonCluster,b=0;b=0;b--){var z=A[b];o.removeLayer(p.layerIds[z]),u||o.removeSource(p.sourceIds[z])}}function M(u){f?i(u):S(u)}function C(u){g?m(u):T(u)}function _(){for(var u=g?k.cluster:k.nonCluster,A=0;A=0;a--){var o=r[a];n.removeLayer(this.layerIds[o]),n.removeSource(this.sourceIds[o])}},H.exports=function(n,r){var a=r[0].trace,o=a.cluster&&a.cluster.enabled,s=a.visible!==!0,c=new l(n,a.uid,o,s),g=x(n.gd,r),f=c.below=n.belowLookup["trace-"+a.uid],p,m,i;if(o)for(c.addSource("circle",g.circle,a.cluster),p=0;p=0?Math.floor((a+180)/360):Math.ceil((a-180)/360),C=M*360,_=a-C;function w(B){var F=B.lonlat;if(F[0]===l||T&&m.indexOf(B.i+1)===-1)return 1/0;var P=x.modHalf(F[0],360),j=F[1],U=p.project([P,j]),Z=U.x-g.c2p([_,j]),Q=U.y-f.c2p([P,o]),re=Math.max(3,B.mrc||0);return Math.max(Math.sqrt(Z*Z+Q*Q)-re,1-3/re)}if(v.getClosest(s,w,r),r.index!==!1){var h=s[r.index],u=h.lonlat,A=[x.modHalf(u[0],360)+C,u[1]],b=g.c2p(A),z=f.c2p(A),I=h.mrc||1;r.x0=b-I,r.x1=b+I,r.y0=z-I,r.y1=z+I;var N={};N[c.subplot]={_subplot:p};var R=c._module.formatLabels(h,c,N);return r.lonLabel=R.lonLabel,r.latLabel=R.latLabel,r.color=E(c,h),r.extraText=n(c,h,s[0].t.labels),r.hovertemplate=c.hovertemplate,[r]}}function n(r,a,o){if(r.hovertemplate)return;var s=a.hi||r.hoverinfo,c=s.split("+"),g=c.indexOf("all")!==-1,f=c.indexOf("lon")!==-1,p=c.indexOf("lat")!==-1,m=a.lonlat,i=[];function T(S){return S+"\xB0"}return g||f&&p?i.push("("+T(m[1])+", "+T(m[0])+")"):f?i.push(o.lon+T(m[0])):p&&i.push(o.lat+T(m[1])),(g||c.indexOf("text")!==-1)&&k(a,r,i),i.join("
")}H.exports={hoverPoints:t,getExtraText:n}}}),AL=Ee({"src/traces/scattermap/event_data.js"(J,H){"use strict";H.exports=function(x,E){return x.lon=E.lon,x.lat=E.lat,x}}}),ML=Ee({"src/traces/scattermap/select.js"(J,H){"use strict";var v=Vr(),x=nl(),{BADNUM:E}=Qi();H.exports=function(l,e){var t;let{cd:n,xaxis:r,yaxis:a}=l,{trace:o}=n[0];if(!x.hasMarkers(o))return[];if(e===!1){for(let f of n)f.selected=0;return[]}let s=(t=r._subplot)==null?void 0:t.map,c=s?.getRenderWorldCopies()&&e.xmax>e.xmin?s.transform.worldSize:0,g=[];for(let f=0;f1)return 1;for(var Y=d,te=0;te<8;te++){var ue=this.sampleCurveX(Y)-d;if(Math.abs(ue)ue?me=Y:Ce=Y,Y=.5*(Ce-me)+me;return Y},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},r}(),s=n(o);let c,g;function f(){return c!=null||(c=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),c}function p(){if(g==null&&(g=!1,f())){let d=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(d){for(let Y=0;Y<5*5;Y++){let te=4*Y;d.fillStyle=`rgb(${te},${te+1},${te+2})`,d.fillRect(Y%5,Math.floor(Y/5),1,1)}let L=d.getImageData(0,0,5,5).data;for(let Y=0;Y<5*5*4;Y++)if(Y%4!=3&&L[Y]!==Y){g=!0;break}}}return g||!1}var m=1e-6,i=typeof Float32Array<"u"?Float32Array:Array;function T(){var D=new i(9);return i!=Float32Array&&(D[1]=0,D[2]=0,D[3]=0,D[5]=0,D[6]=0,D[7]=0),D[0]=1,D[4]=1,D[8]=1,D}function S(D){return D[0]=1,D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[5]=1,D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[10]=1,D[11]=0,D[12]=0,D[13]=0,D[14]=0,D[15]=1,D}function M(){var D=new i(3);return i!=Float32Array&&(D[0]=0,D[1]=0,D[2]=0),D}function C(D){var d=D[0],L=D[1],Y=D[2];return Math.sqrt(d*d+L*L+Y*Y)}function _(D,d,L){var Y=new i(3);return Y[0]=D,Y[1]=d,Y[2]=L,Y}function w(D,d,L){return D[0]=d[0]+L[0],D[1]=d[1]+L[1],D[2]=d[2]+L[2],D}function h(D,d,L){return D[0]=d[0]*L,D[1]=d[1]*L,D[2]=d[2]*L,D}function u(D,d,L){var Y=d[0],te=d[1],ue=d[2],pe=L[0],me=L[1],Ce=L[2];return D[0]=te*Ce-ue*me,D[1]=ue*pe-Y*Ce,D[2]=Y*me-te*pe,D}var A,b=C;function z(D,d,L){var Y=d[0],te=d[1],ue=d[2],pe=d[3];return D[0]=L[0]*Y+L[4]*te+L[8]*ue+L[12]*pe,D[1]=L[1]*Y+L[5]*te+L[9]*ue+L[13]*pe,D[2]=L[2]*Y+L[6]*te+L[10]*ue+L[14]*pe,D[3]=L[3]*Y+L[7]*te+L[11]*ue+L[15]*pe,D}function I(){var D=new i(4);return i!=Float32Array&&(D[0]=0,D[1]=0,D[2]=0),D[3]=1,D}function N(D,d,L,Y){var te=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",ue=Math.PI/360;d*=ue,Y*=ue,L*=ue;var pe=Math.sin(d),me=Math.cos(d),Ce=Math.sin(L),we=Math.cos(L),ze=Math.sin(Y),Pe=Math.cos(Y);switch(te){case"xyz":D[0]=pe*we*Pe+me*Ce*ze,D[1]=me*Ce*Pe-pe*we*ze,D[2]=me*we*ze+pe*Ce*Pe,D[3]=me*we*Pe-pe*Ce*ze;break;case"xzy":D[0]=pe*we*Pe-me*Ce*ze,D[1]=me*Ce*Pe-pe*we*ze,D[2]=me*we*ze+pe*Ce*Pe,D[3]=me*we*Pe+pe*Ce*ze;break;case"yxz":D[0]=pe*we*Pe+me*Ce*ze,D[1]=me*Ce*Pe-pe*we*ze,D[2]=me*we*ze-pe*Ce*Pe,D[3]=me*we*Pe+pe*Ce*ze;break;case"yzx":D[0]=pe*we*Pe+me*Ce*ze,D[1]=me*Ce*Pe+pe*we*ze,D[2]=me*we*ze-pe*Ce*Pe,D[3]=me*we*Pe-pe*Ce*ze;break;case"zxy":D[0]=pe*we*Pe-me*Ce*ze,D[1]=me*Ce*Pe+pe*we*ze,D[2]=me*we*ze+pe*Ce*Pe,D[3]=me*we*Pe-pe*Ce*ze;break;case"zyx":D[0]=pe*we*Pe-me*Ce*ze,D[1]=me*Ce*Pe+pe*we*ze,D[2]=me*we*ze-pe*Ce*Pe,D[3]=me*we*Pe+pe*Ce*ze;break;default:throw new Error("Unknown angle order "+te)}return D}function R(){var D=new i(2);return i!=Float32Array&&(D[0]=0,D[1]=0),D}function B(D,d){var L=new i(2);return L[0]=D,L[1]=d,L}M(),A=new i(4),i!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0,A[3]=0),M(),_(1,0,0),_(0,1,0),I(),I(),T(),R();let F=8192;function P(D,d,L){return d*(F/(D.tileSize*Math.pow(2,L-D.tileID.overscaledZ)))}function j(D){return D instanceof Error?D:new Error(typeof D=="string"?D:String(D))}function U(D,d){return(D%d+d)%d}function Z(D,d,L){return D*(1-L)+d*L}function Q(D){if(D<=0)return 0;if(D>=1)return 1;let d=D*D,L=d*D;return 4*(D<.5?L:3*(D-d)+L-.75)}function re(D,d,L,Y){let te=new s(D,d,L,Y);return ue=>te.solve(ue)}let ne=re(.25,.1,.25,1);function oe(D,d,L){return Math.min(L,Math.max(d,D))}function V(D,d,L){let Y=L-d,te=((D-d)%Y+Y)%Y+d;return te===d?L:te}function $(D,...d){for(let L of d)for(let Y in L)D[Y]=L[Y];return D}let K=1;function G(D,d,L){let Y={};for(let te in D)Y[te]=d.call(this,D[te],te,D);return Y}function X(D,d,L){let Y={};for(let te in D)d.call(this,D[te],te,D)&&(Y[te]=D[te]);return Y}function q(D){return Array.isArray(D)?D.map(q):typeof D=="object"&&D?G(D,q):D}let W={};function ee(D){W[D]||(typeof console<"u"&&console.warn(D),W[D]=!0)}function ae(D,d,L){return(L.y-D.y)*(d.x-D.x)>(d.y-D.y)*(L.x-D.x)}function fe(D){return typeof WorkerGlobalScope<"u"&&D!==void 0&&D instanceof WorkerGlobalScope}let ye=null;function xe(D){return typeof ImageBitmap<"u"&&D instanceof ImageBitmap}let Ae="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Me(D,d,L,Y,te){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let ue=new VideoFrame(D,{timestamp:0});try{let pe=ue?.format;if(!pe||!pe.startsWith("BGR")&&!pe.startsWith("RGB"))throw new Error(`Unrecognized format ${pe}`);let me=pe.startsWith("BGR"),Ce=new Uint8ClampedArray(Y*te*4);if(yield ue.copyTo(Ce,function(we,ze,Pe,at,Ve){let bt=4*Math.max(-ze,0),Et=(Math.max(0,Pe)-Pe)*at*4+bt,er=4*at,tr=Math.max(0,ze),xr=Math.max(0,Pe);return{rect:{x:tr,y:xr,width:Math.min(we.width,ze+at)-tr,height:Math.min(we.height,Pe+Ve)-xr},layout:[{offset:Et,stride:er}]}}(D,d,L,Y,te)),me)for(let we=0;we{D.removeEventListener(d,L,Y)}}}function ke(D){return D*Math.PI/180}function ge(D){return D/Math.PI*180}let le={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},ve={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},se="AbortError";class Te extends Error{constructor(d=se){super(d instanceof Error?d.message:d),this.name=se,d instanceof Error&&d.stack&&(this.stack=d.stack)}}function Fe(D){return D instanceof Error&&D.name===se}function We(D){if(D.aborted)throw new Te(D.reason)}let Ge={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function gt(D){return Ge.REGISTERED_PROTOCOLS[D.substring(0,D.indexOf("://"))]}let mt="global-dispatcher";class Tt extends Error{constructor(d,L,Y,te){super(`AJAXError: ${L} (${d}): ${Y}`),this.status=d,this.statusText=L,this.url=Y,this.body=te}}let At=()=>{var D;return fe(self)?(D=self.worker)===null||D===void 0?void 0:D.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href},Kt=function(D,d){return e(this,void 0,void 0,function*(){var L,Y;if(D.url.includes("://")&&!/^https?:|^file:/.test(D.url)){let te=gt(D.url);if(te){let ue=yield te(D,d);return ue.data||D.type!=="arrayBuffer"?ue:$(ue,{data:new ArrayBuffer(0)})}if(fe(self)&&(!((L=self.worker)===null||L===void 0)&&L.actor))return self.worker.actor.sendAsync({type:"GR",data:D,targetMapId:mt},d)}if(!(te=>{var ue;return te.startsWith("file:")||((ue=At())===null||ue===void 0?void 0:ue.startsWith("file:"))&&!/^\w+:/.test(te)})(D.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return function(te,ue){return e(this,void 0,void 0,function*(){let pe=new Request(te.url,{method:te.method||"GET",body:te.body,credentials:te.credentials,headers:te.headers,cache:te.cache,referrer:At(),referrerPolicy:te.referrerPolicy,signal:ue.signal}),me,Ce;te.type!=="json"||pe.headers.has("Accept")||pe.headers.set("Accept","application/json");try{me=yield fetch(pe)}catch(ze){throw Fe(ze)?ze:new Tt(0,j(ze).message,te.url,new Blob)}if(!me.ok){let ze=yield me.blob();throw new Tt(me.status,me.statusText,te.url,ze)}Ce=te.type==="arrayBuffer"||te.type==="image"?me.arrayBuffer():te.type==="json"?me.json():me.text();let we=yield Ce;return We(ue.signal),{data:we,cacheControl:me.headers.get("Cache-Control"),expires:me.headers.get("Expires"),etag:me.headers.get("ETag")}})}(D,d);if(fe(self)&&(!((Y=self.worker)===null||Y===void 0)&&Y.actor))return self.worker.actor.sendAsync({type:"GR",data:D,mustQueue:!0,targetMapId:mt},d)}return function(te,ue){return new Promise((pe,me)=>{var Ce;let we=new XMLHttpRequest;we.open(te.method||"GET",te.url,!0),te.type!=="arrayBuffer"&&te.type!=="image"||(we.responseType="arraybuffer");for(let ze in te.headers)we.setRequestHeader(ze,te.headers[ze]);te.type==="json"&&(we.responseType="text",!((Ce=te.headers)===null||Ce===void 0)&&Ce.Accept||we.setRequestHeader("Accept","application/json")),we.withCredentials=te.credentials==="include",we.onerror=()=>{me(new Error(we.statusText))},we.onload=()=>{if(!ue.signal.aborted)if((we.status>=200&&we.status<300||we.status===0)&&we.response!==null){let ze=we.response;if(te.type==="json")try{ze=JSON.parse(we.response)}catch(Pe){return void me(Pe)}pe({data:ze,cacheControl:we.getResponseHeader("Cache-Control"),expires:we.getResponseHeader("Expires"),etag:we.getResponseHeader("ETag")})}else{let ze=new Blob([we.response],{type:we.getResponseHeader("Content-Type")});me(new Tt(we.status,we.statusText,te.url,ze))}},ue.signal.addEventListener("abort",()=>{we.abort(),me(new Te(ue.signal.reason))}),we.send(te.body)})}(D,d)})};function ar(D){if(!D||D.indexOf("://")<=0||D.startsWith("data:image/")||D.startsWith("blob:"))return!0;let d=new URL(D),L=window.location;return d.protocol===L.protocol&&d.host===L.host}function _r(D,d,L){var Y;!((Y=L[D])===null||Y===void 0)&&Y.includes(d)||(L[D]||(L[D]=[]),L[D].push(d))}function Zt(D,d,L){if(L?.[D]){let Y=L[D].indexOf(d);Y!==-1&&L[D].splice(Y,1)}}class sr{constructor(d,L={}){$(this,L),this.type=d}}class Ot extends sr{constructor(d,L={}){super("error",$({error:d},L))}}class vt{on(d,L){return this._listeners||(this._listeners={}),_r(d,L,this._listeners),{unsubscribe:()=>{this.off(d,L)}}}off(d,L){return Zt(d,L,this._listeners),Zt(d,L,this._oneTimeListeners),this}once(d,L){return L?(this._oneTimeListeners||(this._oneTimeListeners={}),_r(d,L,this._oneTimeListeners),this):new Promise(Y=>this.once(d,Y))}fire(d,L){var Y,te;typeof d=="string"&&(d=new sr(d,L||{}));let ue=d.type;if(this.listens(ue)){d.target=this;let pe=!((Y=this._listeners)===null||Y===void 0)&&Y[ue]?this._listeners[ue].slice():[];for(let we of pe)we.call(this,d);let me=!((te=this._oneTimeListeners)===null||te===void 0)&&te[ue]?this._oneTimeListeners[ue].slice():[];for(let we of me)Zt(ue,we,this._oneTimeListeners),we.call(this,d);let Ce=this._eventedParent;Ce&&($(d,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ce.fire(d))}else d instanceof Ot&&console.error(d.error);return this}listens(d){var L,Y,te,ue,pe;return((Y=(L=this._listeners)===null||L===void 0?void 0:L[d])===null||Y===void 0?void 0:Y.length)>0||((ue=(te=this._oneTimeListeners)===null||te===void 0?void 0:te[d])===null||ue===void 0?void 0:ue.length)>0||((pe=this._eventedParent)===null||pe===void 0?void 0:pe.listens(d))}setEventedParent(d,L){return this._eventedParent=d,this._eventedParentData=L,this}}var ht={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let Re=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Be(D,d){let L={};for(let Y in D)Y!=="ref"&&(L[Y]=D[Y]);return Re.forEach(Y=>{Y in d&&(L[Y]=d[Y])}),L}function He(D,d){if(Array.isArray(D)){if(!Array.isArray(d)||D.length!==d.length)return!1;for(let L=0;L`:D.itemType.kind==="value"?"array":`array<${d}>`}return D.kind}let Mi=[$t,It,ir,cr,fr,Ir,ja,sa,Fn(aa),Oa,un,An,Ja,ei];function ci(D,d){if(d.kind==="error")return null;if(D.kind==="array"){if(d.kind==="array"&&(d.N===0&&d.itemType.kind==="value"||!ci(D.itemType,d.itemType))&&(typeof D.N!="number"||D.N===d.N))return null}else{if(D.kind===d.kind)return null;if(D.kind==="value"){for(let L of Mi)if(!ci(L,d))return null}}return`Expected ${ni(D)} but found ${ni(d)} instead.`}function bn(D,d){return d.some(L=>L.kind===D.kind)}function pn(D,d){return d.some(L=>L==="null"?D===null:L==="array"?Array.isArray(D):L==="object"?D&&!Array.isArray(D)&&typeof D=="object":L===typeof D)}function Ii(D,d){return D.kind==="array"&&d.kind==="array"?D.itemType.kind===d.itemType.kind&&typeof D.N=="number":D.kind===d.kind}let ho=.96422,dn=.82521,Za=4/29,ot=6/29,et=3*ot*ot,hr=ot*ot*ot,ur=Math.PI/180,Tr=180/Math.PI;function Rr(D){return(D%=360)<0&&(D+=360),D}function Fr([D,d,L,Y]){let te,ue,pe=kt((.2225045*(D=nt(D))+.7168786*(d=nt(d))+.0606169*(L=nt(L)))/1);D===d&&d===L?te=ue=pe:(te=kt((.4360747*D+.3850649*d+.1430804*L)/ho),ue=kt((.0139322*D+.0971045*d+.7141733*L)/dn));let me=116*pe-16;return[me<0?0:me,500*(te-pe),200*(pe-ue),Y]}function nt(D){return D<=.04045?D/12.92:Math.pow((D+.055)/1.055,2.4)}function kt(D){return D>hr?Math.pow(D,1/3):D/et+Za}function Ut([D,d,L,Y]){let te=(D+16)/116,ue=isNaN(d)?te:te+d/500,pe=isNaN(L)?te:te-L/200;return te=1*Er(te),ue=ho*Er(ue),pe=dn*Er(pe),[nr(3.1338561*ue-1.6168667*te-.4906146*pe),nr(-.9787684*ue+1.9161415*te+.033454*pe),nr(.0719453*ue-.2289914*te+1.4052427*pe),Y]}function nr(D){return(D=D<=.00304?12.92*D:1.055*Math.pow(D,1/2.4)-.055)<0?0:D>1?1:D}function Er(D){return D>ot?D*D*D:et*(D-Za)}let br=Object.hasOwn||function(D,d){return Object.prototype.hasOwnProperty.call(D,d)};function Or(D,d){return br(D,d)?D[d]:void 0}function Pr(D){return parseInt(D.padEnd(2,D),16)/255}function fa(D,d){return Fa(d?D/100:D,0,1)}function Fa(D,d,L){return Math.min(Math.max(d,D),L)}function La(D){return!D.some(Number.isNaN)}let Cn={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 mn(D,d,L){return D+L*(d-D)}function bi(D,d,L){return D.map((Y,te)=>mn(Y,d[te],L))}class gn{constructor(d,L,Y,te=1,ue=!0){this.r=d,this.g=L,this.b=Y,this.a=te,ue||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter("rgb",[d,L,Y,te]))}static parse(d){if(d instanceof gn)return d;if(typeof d!="string")return;let L=function(Y){if((Y=Y.toLowerCase().trim())==="transparent")return[0,0,0,0];let te=Or(Cn,Y);if(te){let[pe,me,Ce]=te;return[pe/255,me/255,Ce/255,1]}if(Y.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(Y)){let pe=Y.length<6?1:2,me=1;return[Pr(Y.slice(me,me+=pe)),Pr(Y.slice(me,me+=pe)),Pr(Y.slice(me,me+=pe)),Pr(Y.slice(me,me+pe)||"ff")]}if(Y.startsWith("rgb")){let pe=Y.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(pe){let[me,Ce,we,ze,Pe,at,Ve,bt,Et,er,tr,xr]=pe,lr=[ze||" ",Ve||" ",er].join("");if(lr===" "||lr===" /"||lr===",,"||lr===",,,"){let Mr=[we,at,Et].join(""),Xr=Mr==="%%%"?100:Mr===""?255:0;if(Xr){let na=[Fa(+Ce/Xr,0,1),Fa(+Pe/Xr,0,1),Fa(+bt/Xr,0,1),tr?fa(+tr,xr):1];if(La(na))return na}}return}}let ue=Y.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(ue){let[pe,me,Ce,we,ze,Pe,at,Ve,bt]=ue,Et=[Ce||" ",ze||" ",at].join("");if(Et===" "||Et===" /"||Et===",,"||Et===",,,"){let er=[+me,Fa(+we,0,100),Fa(+Pe,0,100),Ve?fa(+Ve,bt):1];if(La(er))return function([tr,xr,lr,Mr]){function Xr(na){let Ea=(na+tr/30)%12,Na=xr*Math.min(lr,1-lr);return lr-Na*Math.max(-1,Math.min(Ea-3,9-Ea,1))}return tr=Rr(tr),xr/=100,lr/=100,[Xr(0),Xr(8),Xr(4),Mr]}(er)}}}(d);return L?new gn(...L,!1):void 0}get rgb(){let{r:d,g:L,b:Y,a:te}=this,ue=te||1/0;return this.overwriteGetter("rgb",[d/ue,L/ue,Y/ue,te])}get hcl(){return this.overwriteGetter("hcl",function(d){let[L,Y,te,ue]=Fr(d),pe=Math.sqrt(Y*Y+te*te);return[Math.round(1e4*pe)?Rr(Math.atan2(te,Y)*Tr):NaN,pe,L,ue]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Fr(this.rgb))}overwriteGetter(d,L){return Object.defineProperty(this,d,{value:L}),L}toString(){let[d,L,Y,te]=this.rgb;return`rgba(${[d,L,Y].map(ue=>Math.round(255*ue)).join(",")},${te})`}static interpolate(d,L,Y,te="rgb"){switch(te){case"rgb":{let[ue,pe,me,Ce]=bi(d.rgb,L.rgb,Y);return new gn(ue,pe,me,Ce,!1)}case"hcl":{let[ue,pe,me,Ce]=d.hcl,[we,ze,Pe,at]=L.hcl,Ve,bt;if(isNaN(ue)||isNaN(we))isNaN(ue)?isNaN(we)?Ve=NaN:(Ve=we,me!==1&&me!==0||(bt=ze)):(Ve=ue,Pe!==1&&Pe!==0||(bt=pe));else{let lr=we-ue;we>ue&&lr>180?lr-=360:we180&&(lr+=360),Ve=ue+Y*lr}let[Et,er,tr,xr]=function([lr,Mr,Xr,na]){return lr=isNaN(lr)?0:lr*ur,Ut([Xr,Math.cos(lr)*Mr,Math.sin(lr)*Mr,na])}([Ve,bt??mn(pe,ze,Y),mn(me,Pe,Y),mn(Ce,at,Y)]);return new gn(Et,er,tr,xr,!1)}case"lab":{let[ue,pe,me,Ce]=Ut(bi(d.lab,L.lab,Y));return new gn(ue,pe,me,Ce,!1)}}}}gn.black=new gn(0,0,0,1),gn.white=new gn(1,1,1,1),gn.transparent=new gn(0,0,0,0),gn.red=new gn(1,0,0,1);class eo{constructor(d,L,Y){this.sensitivity=d?L?"variant":"case":L?"accent":"base",this.locale=Y,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(d,L){return this.collator.compare(d,L)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let si=["bottom","center","top"];class Ao{constructor(d,L,Y,te,ue,pe){this.text=d,this.image=L,this.scale=Y,this.fontStack=te,this.textColor=ue,this.verticalAlign=pe}}class ro{constructor(d){this.sections=d}static fromString(d){return new ro([new Ao(d,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(d=>d.text.length!==0||d.image&&d.image.name.length!==0)}static factory(d){return d instanceof ro?d:ro.fromString(d)}toString(){return this.sections.length===0?"":this.sections.map(d=>d.text).join("")}}class Sn{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof Sn)return d;if(typeof d=="number")return new Sn([d,d,d,d]);if(Array.isArray(d)&&!(d.length<1||d.length>4)){for(let L of d)if(typeof L!="number")return;switch(d.length){case 1:d=[d[0],d[0],d[0],d[0]];break;case 2:d=[d[0],d[1],d[0],d[1]];break;case 3:d=[d[0],d[1],d[2],d[1]]}return new Sn(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,Y){return new Sn(bi(d.values,L.values,Y))}}class Gi{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof Gi)return d;if(typeof d=="number")return new Gi([d]);if(Array.isArray(d)){for(let L of d)if(typeof L!="number")return;return new Gi(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,Y){return new Gi(bi(d.values,L.values,Y))}}class ti{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof ti)return d;if(typeof d=="string"){let Y=gn.parse(d);return Y?new ti([Y]):void 0}if(!Array.isArray(d))return;let L=[];for(let Y of d){if(typeof Y!="string")return;let te=gn.parse(Y);if(!te)return;L.push(te)}return new ti(L)}toString(){return JSON.stringify(this.values)}static interpolate(d,L,Y,te="rgb"){let ue=[];if(d.values.length!=L.values.length)throw new Error(`colorArray: Arrays have mismatched length (${d.values.length} vs. ${L.values.length}), cannot interpolate.`);for(let pe=0;pe=0&&D<=255&&typeof d=="number"&&d>=0&&d<=255&&typeof L=="number"&&L>=0&&L<=255?Y===void 0||typeof Y=="number"&&Y>=0&&Y<=1?null:`Invalid rgba value [${[D,d,L,Y].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof Y=="number"?[D,d,L,Y]:[D,d,L]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function oi(D){if(D===null||typeof D=="string"||typeof D=="boolean"||typeof D=="number"||D instanceof Mo||D instanceof gn||D instanceof eo||D instanceof ro||D instanceof Sn||D instanceof Gi||D instanceof ti||D instanceof zi||D instanceof so)return!0;if(Array.isArray(D)){for(let d of D)if(!oi(d))return!1;return!0}if(typeof D=="object"){for(let d in D)if(!oi(D[d]))return!1;return!0}return!1}function ii(D){if(D===null)return $t;if(typeof D=="string")return ir;if(typeof D=="boolean")return cr;if(typeof D=="number")return It;if(D instanceof gn)return fr;if(D instanceof Mo)return Ir;if(D instanceof eo)return xa;if(D instanceof ro)return ja;if(D instanceof Sn)return Oa;if(D instanceof Gi)return un;if(D instanceof ti)return An;if(D instanceof zi)return ei;if(D instanceof so)return Ja;if(Array.isArray(D)){let d=D.length,L;for(let Y of D){let te=ii(Y);if(L){if(L===te)continue;L=aa;break}L=te}return Fn(L||aa,d)}return sa}function co(D){let d=typeof D;return D===null?"":d==="string"||d==="number"||d==="boolean"?String(D):D instanceof gn||D instanceof Mo||D instanceof ro||D instanceof Sn||D instanceof Gi||D instanceof ti||D instanceof zi||D instanceof so?D.toString():JSON.stringify(D)}class Wi{constructor(d,L){this.type=d,this.value=L}static parse(d,L){if(d.length!==2)return L.error(`'literal' expression requires exactly one argument, but found ${d.length-1} instead.`);if(!oi(d[1]))return L.error("invalid value");let Y=d[1],te=ii(Y),ue=L.expectedType;return te.kind!=="array"||te.N!==0||!ue||ue.kind!=="array"||typeof ue.N=="number"&&ue.N!==0||(te=ue),new Wi(te,Y)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let Ho={string:ir,number:It,boolean:cr,object:sa};class Io{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let Y,te=1,ue=d[0];if(ue==="array"){let me,Ce;if(d.length>2){let we=d[1];if(typeof we!="string"||!(we in Ho)||we==="object")return L.error('The item type argument of "array" must be one of string, number, boolean',1);me=Ho[we],te++}else me=aa;if(d.length>3){if(d[2]!==null&&(typeof d[2]!="number"||d[2]<0||d[2]!==Math.floor(d[2])))return L.error('The length argument to "array" must be a positive integer literal',2);Ce=d[2],te++}Y=Fn(me,Ce)}else{if(!Ho[ue])throw new Error(`Types doesn't contain name = ${ue}`);Y=Ho[ue]}let pe=[];for(;ted.outputDefined())}}let qo={"to-boolean":cr,"to-color":fr,"to-number":It,"to-string":ir};class Oo{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let Y=d[0];if(!qo[Y])throw new Error(`Can't parse ${Y} as it is not part of the known types`);if((Y==="to-boolean"||Y==="to-string")&&d.length!==2)return L.error("Expected one argument.");let te=qo[Y],ue=[];for(let pe=1;pe4?`Invalid rgba value ${JSON.stringify(L)}: expected an array containing either three or four numeric values.`:So(L[0],L[1],L[2],L[3]),!Y))return new gn(L[0]/255,L[1]/255,L[2]/255,L[3])}throw new fi(Y||`Could not parse color from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"padding":{let L;for(let Y of this.args){L=Y.evaluate(d);let te=Sn.parse(L);if(te)return te}throw new fi(`Could not parse padding from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"numberArray":{let L;for(let Y of this.args){L=Y.evaluate(d);let te=Gi.parse(L);if(te)return te}throw new fi(`Could not parse numberArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"colorArray":{let L;for(let Y of this.args){L=Y.evaluate(d);let te=ti.parse(L);if(te)return te}throw new fi(`Could not parse colorArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"variableAnchorOffsetCollection":{let L;for(let Y of this.args){L=Y.evaluate(d);let te=zi.parse(L);if(te)return te}throw new fi(`Could not parse variableAnchorOffsetCollection from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"number":{let L=null;for(let Y of this.args){if(L=Y.evaluate(d),L===null)return 0;let te=Number(L);if(!isNaN(te))return te}throw new fi(`Could not convert ${JSON.stringify(L)} to number.`)}case"formatted":return ro.fromString(co(this.args[0].evaluate(d)));case"resolvedImage":return so.fromString(co(this.args[0].evaluate(d)));case"projectionDefinition":return this.args[0].evaluate(d);default:return co(this.args[0].evaluate(d))}}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}let ws=["Unknown","Point","LineString","Polygon"];class Ko{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"?ws[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(d){let L=this._parseColorCache.get(d);return L||(L=gn.parse(d),this._parseColorCache.set(d,L)),L}}class as{constructor(d,L,Y=[],te,ue=new ia,pe=[]){this.registry=d,this.path=Y,this.key=Y.map(me=>`[${me}]`).join(""),this.scope=ue,this.errors=pe,this.expectedType=te,this._isConstant=L}parse(d,L,Y,te,ue={}){return L?this.concat(L,Y,te)._parse(d,ue):this._parse(d,ue)}_parse(d,L){function Y(te,ue,pe){return pe==="assert"?new Io(ue,[te]):pe==="coerce"?new Oo(ue,[te]):te}if(d!==null&&typeof d!="string"&&typeof d!="boolean"&&typeof d!="number"||(d=["literal",d]),Array.isArray(d)){if(d.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let te=d[0];if(typeof te!="string")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let ue=this.registry[te];if(ue){let pe=ue.parse(d,this);if(!pe)return null;if(this.expectedType){let me=this.expectedType,Ce=pe.type;if(me.kind!=="string"&&me.kind!=="number"&&me.kind!=="boolean"&&me.kind!=="object"&&me.kind!=="array"||Ce.kind!=="value"){if(me.kind==="projectionDefinition"&&["string","array"].includes(Ce.kind)||["color","formatted","resolvedImage"].includes(me.kind)&&["value","string"].includes(Ce.kind)||["padding","numberArray"].includes(me.kind)&&["value","number","array"].includes(Ce.kind)||me.kind==="colorArray"&&["value","string","array"].includes(Ce.kind)||me.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(Ce.kind))pe=Y(pe,me,L.typeAnnotation||"coerce");else if(this.checkSubtype(me,Ce))return null}else pe=Y(pe,me,L.typeAnnotation||"assert")}if(!(pe instanceof Wi)&&pe.type.kind!=="resolvedImage"&&this._isConstant(pe)){let me=new Ko;try{pe=new Wi(pe.type,pe.evaluate(me))}catch(Ce){return this.error(Ce.message),null}}return pe}return this.error(`Unknown expression "${te}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(d===void 0?"'undefined' value invalid. Use null instead.":typeof d=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof d} instead.`)}concat(d,L,Y){let te=typeof d=="number"?this.path.concat(d):this.path,ue=Y?this.scope.concat(Y):this.scope;return new as(this.registry,this._isConstant,te,L||null,ue,this.errors)}error(d,...L){let Y=`${this.key}${L.map(te=>`[${te}]`).join("")}`;this.errors.push(new Sr(Y,d))}checkSubtype(d,L){let Y=ci(d,L);return Y&&this.error(Y),Y}}class wo{constructor(d,L){this.type=L.type,this.bindings=[].concat(d),this.result=L}evaluate(d){return this.result.evaluate(d)}eachChild(d){for(let L of this.bindings)d(L[1]);d(this.result)}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found ${d.length-1} instead.`);let Y=[];for(let ue=1;ue=Y.length)throw new fi(`Array index out of bounds: ${L} > ${Y.length-1}.`);if(L!==Math.floor(L))throw new fi(`Array index must be an integer, but found ${L} instead.`);return Y[L]}eachChild(d){d(this.index),d(this.input)}outputDefined(){return!1}}class lo{constructor(d,L){this.type=cr,this.needle=d,this.haystack=L}static parse(d,L){if(d.length!==3)return L.error(`Expected 2 arguments, but found ${d.length-1} instead.`);let Y=L.parse(d[1],1,aa),te=L.parse(d[2],2,aa);return Y&&te?bn(Y.type,[cr,ir,It,$t,aa])?new lo(Y,te):L.error(`Expected first argument to be of type boolean, string, number or null, but found ${ni(Y.type)} instead`):null}evaluate(d){let L=this.needle.evaluate(d),Y=this.haystack.evaluate(d);if(!Y)return!1;if(!pn(L,["boolean","string","number","null"]))throw new fi(`Expected first argument to be of type boolean, string, number or null, but found ${ni(ii(L))} instead.`);if(!pn(Y,["string","array"]))throw new fi(`Expected second argument to be of type array or string, but found ${ni(ii(Y))} instead.`);return Y.indexOf(L)>=0}eachChild(d){d(this.needle),d(this.haystack)}outputDefined(){return!0}}class Go{constructor(d,L,Y){this.type=It,this.needle=d,this.haystack=L,this.fromIndex=Y}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let Y=L.parse(d[1],1,aa),te=L.parse(d[2],2,aa);if(!Y||!te)return null;if(!bn(Y.type,[cr,ir,It,$t,aa]))return L.error(`Expected first argument to be of type boolean, string, number or null, but found ${ni(Y.type)} instead`);if(d.length===4){let ue=L.parse(d[3],3,It);return ue?new Go(Y,te,ue):null}return new Go(Y,te)}evaluate(d){let L=this.needle.evaluate(d),Y=this.haystack.evaluate(d);if(!pn(L,["boolean","string","number","null"]))throw new fi(`Expected first argument to be of type boolean, string, number or null, but found ${ni(ii(L))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(d)),pn(Y,["string"])){let ue=Y.indexOf(L,te);return ue===-1?-1:[...Y.slice(0,ue)].length}if(pn(Y,["array"]))return Y.indexOf(L,te);throw new fi(`Expected second argument to be of type array or string, but found ${ni(ii(Y))} instead.`)}eachChild(d){d(this.needle),d(this.haystack),this.fromIndex&&d(this.fromIndex)}outputDefined(){return!1}}class go{constructor(d,L,Y,te,ue,pe){this.inputType=d,this.type=L,this.input=Y,this.cases=te,this.outputs=ue,this.otherwise=pe}static parse(d,L){if(d.length<5)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if(d.length%2!=1)return L.error("Expected an even number of arguments.");let Y,te;L.expectedType&&L.expectedType.kind!=="value"&&(te=L.expectedType);let ue={},pe=[];for(let we=2;weNumber.MAX_SAFE_INTEGER)return at.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof bt=="number"&&Math.floor(bt)!==bt)return at.error("Numeric branch labels must be integer values.");if(Y){if(at.checkSubtype(Y,ii(bt)))return null}else Y=ii(bt);if(ue[String(bt)]!==void 0)return at.error("Branch labels must be unique.");ue[String(bt)]=pe.length}let Ve=L.parse(Pe,we,te);if(!Ve)return null;te=te||Ve.type,pe.push(Ve)}let me=L.parse(d[1],1,aa);if(!me)return null;let Ce=L.parse(d[d.length-1],d.length-1,te);return Ce?me.type.kind!=="value"&&L.concat(1).checkSubtype(Y,me.type)?null:new go(Y,te,me,ue,pe,Ce):null}evaluate(d){let L=this.input.evaluate(d);return(ii(L)===this.inputType&&this.outputs[this.cases[L]]||this.otherwise).evaluate(d)}eachChild(d){d(this.input),this.outputs.forEach(d),d(this.otherwise)}outputDefined(){return this.outputs.every(d=>d.outputDefined())&&this.otherwise.outputDefined()}}class us{constructor(d,L,Y){this.type=d,this.branches=L,this.otherwise=Y}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found only ${d.length-1}.`);if(d.length%2!=0)return L.error("Expected an odd number of arguments.");let Y;L.expectedType&&L.expectedType.kind!=="value"&&(Y=L.expectedType);let te=[];for(let pe=1;peL.outputDefined())&&this.otherwise.outputDefined()}}class Jo{constructor(d,L,Y,te){this.type=d,this.input=L,this.beginIndex=Y,this.endIndex=te}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let Y=L.parse(d[1],1,aa),te=L.parse(d[2],2,It);if(!Y||!te)return null;if(!bn(Y.type,[Fn(aa),ir,aa]))return L.error(`Expected first argument to be of type array or string, but found ${ni(Y.type)} instead`);if(d.length===4){let ue=L.parse(d[3],3,It);return ue?new Jo(Y.type,Y,te,ue):null}return new Jo(Y.type,Y,te)}evaluate(d){let L=this.input.evaluate(d),Y=this.beginIndex.evaluate(d),te;if(this.endIndex&&(te=this.endIndex.evaluate(d)),pn(L,["string"]))return[...L].slice(Y,te).join("");if(pn(L,["array"]))return L.slice(Y,te);throw new fi(`Expected first argument to be of type array or string, but found ${ni(ii(L))} instead.`)}eachChild(d){d(this.input),d(this.beginIndex),this.endIndex&&d(this.endIndex)}outputDefined(){return!1}}function zs(D,d){let L=D.length-1,Y,te,ue=0,pe=L,me=0;for(;ue<=pe;)if(me=Math.floor((ue+pe)/2),Y=D[me],te=D[me+1],Y<=d){if(me===L||dd))throw new fi("Input is not a number.");pe=me-1}return 0}class Is{constructor(d,L,Y){this.type=d,this.input=L,this.labels=[],this.outputs=[];for(let[te,ue]of Y)this.labels.push(te),this.outputs.push(ue)}static parse(d,L){if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");let Y=L.parse(d[1],1,It);if(!Y)return null;let te=[],ue=null;L.expectedType&&L.expectedType.kind!=="value"&&(ue=L.expectedType);for(let pe=1;pe=me)return L.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',we);let Pe=L.parse(Ce,ze,ue);if(!Pe)return null;ue=ue||Pe.type,te.push([me,Pe])}return new Is(ue,Y,te)}evaluate(d){let L=this.labels,Y=this.outputs;if(L.length===1)return Y[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return Y[0].evaluate(d);let ue=L.length;return te>=L[ue-1]?Y[ue-1].evaluate(d):Y[zs(L,te)].evaluate(d)}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function es(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}var Zs,Ps,$o=function(){if(Ps)return Zs;function D(d,L,Y,te){this.cx=3*d,this.bx=3*(Y-d)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*L,this.by=3*(te-L)-this.cy,this.ay=1-this.cy-this.by,this.p1x=d,this.p1y=L,this.p2x=Y,this.p2y=te}return Ps=1,Zs=D,D.prototype={sampleCurveX:function(d){return((this.ax*d+this.bx)*d+this.cx)*d},sampleCurveY:function(d){return((this.ay*d+this.by)*d+this.cy)*d},sampleCurveDerivativeX:function(d){return(3*this.ax*d+2*this.bx)*d+this.cx},solveCurveX:function(d,L){if(L===void 0&&(L=1e-6),d<0)return 0;if(d>1)return 1;for(var Y=d,te=0;te<8;te++){var ue=this.sampleCurveX(Y)-d;if(Math.abs(ue)ue?me=Y:Ce=Y,Y=.5*(Ce-me)+me;return Y},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},Zs}(),Fo=es($o);class Ji{constructor(d,L,Y,te,ue){this.type=d,this.operator=L,this.interpolation=Y,this.input=te,this.labels=[],this.outputs=[];for(let[pe,me]of ue)this.labels.push(pe),this.outputs.push(me)}static interpolationFactor(d,L,Y,te){let ue=0;if(d.name==="exponential")ue=Ro(L,d.base,Y,te);else if(d.name==="linear")ue=Ro(L,1,Y,te);else if(d.name==="cubic-bezier"){let pe=d.controlPoints;ue=new Fo(pe[0],pe[1],pe[2],pe[3]).solve(Ro(L,1,Y,te))}return ue}static parse(d,L){let[Y,te,ue,...pe]=d;if(!Array.isArray(te)||te.length===0)return L.error("Expected an interpolation type expression.",1);if(te[0]==="linear")te={name:"linear"};else if(te[0]==="exponential"){let we=te[1];if(typeof we!="number")return L.error("Exponential interpolation requires a numeric base.",1,1);te={name:"exponential",base:we}}else{if(te[0]!=="cubic-bezier")return L.error(`Unknown interpolation type ${String(te[0])}`,1,0);{let we=te.slice(1);if(we.length!==4||we.some(ze=>typeof ze!="number"||ze<0||ze>1))return L.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);te={name:"cubic-bezier",controlPoints:we}}}if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");if(ue=L.parse(ue,2,It),!ue)return null;let me=[],Ce=null;Y!=="interpolate-hcl"&&Y!=="interpolate-lab"||L.expectedType==An?L.expectedType&&L.expectedType.kind!=="value"&&(Ce=L.expectedType):Ce=fr;for(let we=0;we=ze)return L.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',at);let bt=L.parse(Pe,Ve,Ce);if(!bt)return null;Ce=Ce||bt.type,me.push([ze,bt])}return Ii(Ce,It)||Ii(Ce,Ir)||Ii(Ce,fr)||Ii(Ce,Oa)||Ii(Ce,un)||Ii(Ce,An)||Ii(Ce,ei)||Ii(Ce,Fn(It))?new Ji(Ce,Y,te,ue,me):L.error(`Type ${ni(Ce)} is not interpolatable.`)}evaluate(d){let L=this.labels,Y=this.outputs;if(L.length===1)return Y[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return Y[0].evaluate(d);let ue=L.length;if(te>=L[ue-1])return Y[ue-1].evaluate(d);let pe=zs(L,te),me=Ji.interpolationFactor(this.interpolation,te,L[pe],L[pe+1]),Ce=Y[pe].evaluate(d),we=Y[pe+1].evaluate(d);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return mn(Ce,we,me);case"color":return gn.interpolate(Ce,we,me);case"padding":return Sn.interpolate(Ce,we,me);case"colorArray":return ti.interpolate(Ce,we,me);case"numberArray":return Gi.interpolate(Ce,we,me);case"variableAnchorOffsetCollection":return zi.interpolate(Ce,we,me);case"array":return bi(Ce,we,me);case"projectionDefinition":return Mo.interpolate(Ce,we,me)}case"interpolate-hcl":switch(this.type.kind){case"color":return gn.interpolate(Ce,we,me,"hcl");case"colorArray":return ti.interpolate(Ce,we,me,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return gn.interpolate(Ce,we,me,"lab");case"colorArray":return ti.interpolate(Ce,we,me,"lab")}}}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function Ro(D,d,L,Y){let te=Y-L,ue=D-L;return te===0?0:d===1?ue/te:(Math.pow(d,ue)-1)/(Math.pow(d,te)-1)}let Ls={color:gn.interpolate,number:mn,padding:Sn.interpolate,numberArray:Gi.interpolate,colorArray:ti.interpolate,variableAnchorOffsetCollection:zi.interpolate,array:bi};class zl{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let Y=null,te=L.expectedType;te&&te.kind!=="value"&&(Y=te);let ue=[];for(let me of d.slice(1)){let Ce=L.parse(me,1+ue.length,Y,void 0,{typeAnnotation:"omit"});if(!Ce)return null;Y=Y||Ce.type,ue.push(Ce)}if(!Y)throw new Error("No output type");let pe=te&&ue.some(me=>ci(te,me.type));return new zl(pe?aa:Y,ue)}evaluate(d){let L,Y=null,te=0;for(let ue of this.args)if(te++,Y=ue.evaluate(d),Y&&Y instanceof so&&!Y.available&&(L||(L=Y.name),Y=null,te===this.args.length&&(Y=L)),Y!==null)break;return Y}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}function ml(D,d){return D==="=="||D==="!="?d.kind==="boolean"||d.kind==="string"||d.kind==="number"||d.kind==="null"||d.kind==="value":d.kind==="string"||d.kind==="number"||d.kind==="value"}function Ts(D,d,L,Y){return Y.compare(d,L)===0}function yl(D,d,L){let Y=D!=="=="&&D!=="!=";return class uA{constructor(ue,pe,me){this.type=cr,this.lhs=ue,this.rhs=pe,this.collator=me,this.hasUntypedArgument=ue.type.kind==="value"||pe.type.kind==="value"}static parse(ue,pe){if(ue.length!==3&&ue.length!==4)return pe.error("Expected two or three arguments.");let me=ue[0],Ce=pe.parse(ue[1],1,aa);if(!Ce)return null;if(!ml(me,Ce.type))return pe.concat(1).error(`"${me}" comparisons are not supported for type '${ni(Ce.type)}'.`);let we=pe.parse(ue[2],2,aa);if(!we)return null;if(!ml(me,we.type))return pe.concat(2).error(`"${me}" comparisons are not supported for type '${ni(we.type)}'.`);if(Ce.type.kind!==we.type.kind&&Ce.type.kind!=="value"&&we.type.kind!=="value")return pe.error(`Cannot compare types '${ni(Ce.type)}' and '${ni(we.type)}'.`);Y&&(Ce.type.kind==="value"&&we.type.kind!=="value"?Ce=new Io(we.type,[Ce]):Ce.type.kind!=="value"&&we.type.kind==="value"&&(we=new Io(Ce.type,[we])));let ze=null;if(ue.length===4){if(Ce.type.kind!=="string"&&we.type.kind!=="string"&&Ce.type.kind!=="value"&&we.type.kind!=="value")return pe.error("Cannot use collator to compare non-string types.");if(ze=pe.parse(ue[3],3,xa),!ze)return null}return new uA(Ce,we,ze)}evaluate(ue){let pe=this.lhs.evaluate(ue),me=this.rhs.evaluate(ue);if(Y&&this.hasUntypedArgument){let Ce=ii(pe),we=ii(me);if(Ce.kind!==we.kind||Ce.kind!=="string"&&Ce.kind!=="number")throw new fi(`Expected arguments for "${D}" to be (string, string) or (number, number), but found (${Ce.kind}, ${we.kind}) instead.`)}if(this.collator&&!Y&&this.hasUntypedArgument){let Ce=ii(pe),we=ii(me);if(Ce.kind!=="string"||we.kind!=="string")return d(ue,pe,me)}return this.collator?L(ue,pe,me,this.collator.evaluate(ue)):d(ue,pe,me)}eachChild(ue){ue(this.lhs),ue(this.rhs),this.collator&&ue(this.collator)}outputDefined(){return!0}}}let mu=yl("==",function(D,d,L){return d===L},Ts),su=yl("!=",function(D,d,L){return d!==L},function(D,d,L,Y){return!Ts(0,d,L,Y)}),cc=yl("<",function(D,d,L){return d",function(D,d,L){return d>L},function(D,d,L,Y){return Y.compare(d,L)>0}),_l=yl("<=",function(D,d,L){return d<=L},function(D,d,L,Y){return Y.compare(d,L)<=0}),ju=yl(">=",function(D,d,L){return d>=L},function(D,d,L,Y){return Y.compare(d,L)>=0});class lu{constructor(d,L,Y){this.type=xa,this.locale=Y,this.caseSensitive=d,this.diacriticSensitive=L}static parse(d,L){if(d.length!==2)return L.error("Expected one argument.");let Y=d[1];if(typeof Y!="object"||Array.isArray(Y))return L.error("Collator options argument must be an object.");let te=L.parse(Y["case-sensitive"]!==void 0&&Y["case-sensitive"],1,cr);if(!te)return null;let ue=L.parse(Y["diacritic-sensitive"]!==void 0&&Y["diacritic-sensitive"],1,cr);if(!ue)return null;let pe=null;return Y.locale&&(pe=L.parse(Y.locale,1,ir),!pe)?null:new lu(te,ue,pe)}evaluate(d){return new eo(this.caseSensitive.evaluate(d),this.diacriticSensitive.evaluate(d),this.locale?this.locale.evaluate(d):null)}eachChild(d){d(this.caseSensitive),d(this.diacriticSensitive),this.locale&&d(this.locale)}outputDefined(){return!1}}class il{constructor(d,L,Y,te,ue,pe){this.type=ir,this.number=d,this.locale=L,this.currency=Y,this.unit=te,this.minFractionDigits=ue,this.maxFractionDigits=pe}static parse(d,L){if(d.length!==3)return L.error("Expected two arguments.");let Y=L.parse(d[1],1,It);if(!Y)return null;let te=d[2];if(typeof te!="object"||Array.isArray(te))return L.error("NumberFormat options argument must be an object.");let ue=null;if(te.locale&&(ue=L.parse(te.locale,1,ir),!ue))return null;let pe=null;if(te.currency&&(pe=L.parse(te.currency,1,ir),!pe))return null;let me=null;if(te.unit&&(me=L.parse(te.unit,1,ir),!me))return null;if(pe&&me)return L.error("NumberFormat options `currency` and `unit` are mutually exclusive");let Ce=null;if(te["min-fraction-digits"]&&(Ce=L.parse(te["min-fraction-digits"],1,It),!Ce))return null;let we=null;return te["max-fraction-digits"]&&(we=L.parse(te["max-fraction-digits"],1,It),!we)?null:new il(Y,ue,pe,me,Ce,we)}evaluate(d){return new Intl.NumberFormat(this.locale?this.locale.evaluate(d):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(d):void 0,unit:this.unit?this.unit.evaluate(d):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(d):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(d):void 0}).format(this.number.evaluate(d))}eachChild(d){d(this.number),this.locale&&d(this.locale),this.currency&&d(this.currency),this.unit&&d(this.unit),this.minFractionDigits&&d(this.minFractionDigits),this.maxFractionDigits&&d(this.maxFractionDigits)}outputDefined(){return!1}}class As{constructor(d){this.type=ja,this.sections=d}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let Y=d[1];if(!Array.isArray(Y)&&typeof Y=="object")return L.error("First argument must be an image or text section.");let te=[],ue=!1;for(let pe=1;pe<=d.length-1;++pe){let me=d[pe];if(ue&&typeof me=="object"&&!Array.isArray(me)){ue=!1;let Ce=null;if(me["font-scale"]&&(Ce=L.parse(me["font-scale"],1,It),!Ce))return null;let we=null;if(me["text-font"]&&(we=L.parse(me["text-font"],1,Fn(ir)),!we))return null;let ze=null;if(me["text-color"]&&(ze=L.parse(me["text-color"],1,fr),!ze))return null;let Pe=null;if(me["vertical-align"]){if(typeof me["vertical-align"]=="string"&&!si.includes(me["vertical-align"]))return L.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${me["vertical-align"]}' instead.`);if(Pe=L.parse(me["vertical-align"],1,ir),!Pe)return null}let at=te[te.length-1];at.scale=Ce,at.font=we,at.textColor=ze,at.verticalAlign=Pe}else{let Ce=L.parse(d[pe],1,aa);if(!Ce)return null;let we=Ce.type.kind;if(we!=="string"&&we!=="value"&&we!=="null"&&we!=="resolvedImage")return L.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ue=!0,te.push({content:Ce,scale:null,font:null,textColor:null,verticalAlign:null})}}return new As(te)}evaluate(d){return new ro(this.sections.map(L=>{let Y=L.content.evaluate(d);return ii(Y)===Ja?new Ao("",Y,null,null,null,L.verticalAlign?L.verticalAlign.evaluate(d):null):new Ao(co(Y),null,L.scale?L.scale.evaluate(d):null,L.font?L.font.evaluate(d).join(","):null,L.textColor?L.textColor.evaluate(d):null,L.verticalAlign?L.verticalAlign.evaluate(d):null)}))}eachChild(d){for(let L of this.sections)d(L.content),L.scale&&d(L.scale),L.font&&d(L.font),L.textColor&&d(L.textColor),L.verticalAlign&&d(L.verticalAlign)}outputDefined(){return!1}}class ms{constructor(d){this.type=Ja,this.input=d}static parse(d,L){if(d.length!==2)return L.error("Expected two arguments.");let Y=L.parse(d[1],1,ir);return Y?new ms(Y):L.error("No image name provided.")}evaluate(d){let L=this.input.evaluate(d),Y=so.fromString(L);return Y&&d.availableImages&&(Y.available=d.availableImages.indexOf(L)>-1),Y}eachChild(d){d(this.input)}outputDefined(){return!1}}class Ms{constructor(d){this.type=It,this.input=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let Y=L.parse(d[1],1);return Y?Y.type.kind!=="array"&&Y.type.kind!=="string"&&Y.type.kind!=="value"?L.error(`Expected argument of type string or array, but found ${ni(Y.type)} instead.`):new Ms(Y):null}evaluate(d){let L=this.input.evaluate(d);if(typeof L=="string")return[...L].length;if(Array.isArray(L))return L.length;throw new fi(`Expected value to be of type string or array, but found ${ni(ii(L))} instead.`)}eachChild(d){d(this.input)}outputDefined(){return!1}}let ol=8192;function Su(D,d){let L=(180+D[0])/360,Y=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+D[1]*Math.PI/360)))/360,te=Math.pow(2,d.z);return[Math.round(L*te*ol),Math.round(Y*te*ol)]}function Eu(D,d){let L=Math.pow(2,d.z);return[(te=(D[0]/ol+d.x)/L,360*te-180),(Y=(D[1]/ol+d.y)/L,360/Math.PI*Math.atan(Math.exp((180-360*Y)*Math.PI/180))-90)];var Y,te}function Uu(D,d){D[0]=Math.min(D[0],d[0]),D[1]=Math.min(D[1],d[1]),D[2]=Math.max(D[2],d[0]),D[3]=Math.max(D[3],d[1])}function fc(D,d){return!(D[0]<=d[0]||D[2]>=d[2]||D[1]<=d[1]||D[3]>=d[3])}function th(D,d,L){let Y=D[0]-d[0],te=D[1]-d[1],ue=D[0]-L[0],pe=D[1]-L[1];return Y*pe-ue*te==0&&Y*ue<=0&&te*pe<=0}function Cf(D,d,L,Y){return(te=[Y[0]-L[0],Y[1]-L[1]])[0]*(ue=[d[0]-D[0],d[1]-D[1]])[1]-te[1]*ue[0]!=0&&!(!hf(D,d,L,Y)||!hf(L,Y,D,d));var te,ue}function qu(D,d,L){for(let Y of L)for(let te=0;te(te=D)[1]!=(pe=me[Ce+1])[1]>te[1]&&te[0]<(pe[0]-ue[0])*(te[1]-ue[1])/(pe[1]-ue[1])+ue[0]&&(Y=!Y)}var te,ue,pe;return Y}function Lf(D,d){for(let L of d)if(gs(D,L))return!0;return!1}function hc(D,d){for(let L of D)if(!gs(L,d))return!1;for(let L=0;L0&&me<0||pe<0&&me>0}function ku(D,d,L){let Y=[];for(let te=0;teL[2]){let te=.5*Y,ue=D[0]-L[0]>te?-Y:L[0]-D[0]>te?Y:0;ue===0&&(ue=D[0]-L[2]>te?-Y:L[2]-D[0]>te?Y:0),D[0]+=ue}Uu(d,D)}function Pc(D,d,L,Y){let te=Math.pow(2,Y.z)*ol,ue=[Y.x*ol,Y.y*ol],pe=[];for(let me of D)for(let Ce of me){let we=[Ce.x+ue[0],Ce.y+ue[1]];Cu(we,d,L,te),pe.push(we)}return pe}function $c(D,d,L,Y){let te=Math.pow(2,Y.z)*ol,ue=[Y.x*ol,Y.y*ol],pe=[];for(let Ce of D){let we=[];for(let ze of Ce){let Pe=[ze.x+ue[0],ze.y+ue[1]];Uu(d,Pe),we.push(Pe)}pe.push(we)}if(d[2]-d[0]<=te/2){(me=d)[0]=me[1]=1/0,me[2]=me[3]=-1/0;for(let Ce of pe)for(let we of Ce)Cu(we,d,L,te)}var me;return pe}class Zl{constructor(d,L){this.type=cr,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'within' expression requires exactly one argument, but found ${d.length-1} instead.`);if(oi(d[1])){let Y=d[1];if(Y.type==="FeatureCollection"){let te=[];for(let ue of Y.features){let{type:pe,coordinates:me}=ue.geometry;pe==="Polygon"&&te.push(me),pe==="MultiPolygon"&&te.push(...me)}if(te.length)return new Zl(Y,{type:"MultiPolygon",coordinates:te})}else if(Y.type==="Feature"){let te=Y.geometry.type;if(te==="Polygon"||te==="MultiPolygon")return new Zl(Y,Y.geometry)}else if(Y.type==="Polygon"||Y.type==="MultiPolygon")return new Zl(Y,Y)}return L.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(d){if(d.geometry()!=null&&d.canonicalID()!=null){if(d.geometryType()==="Point")return function(L,Y){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],pe=L.canonicalID();if(Y.type==="Polygon"){let me=ku(Y.coordinates,ue,pe),Ce=Pc(L.geometry(),te,ue,pe);if(!fc(te,ue))return!1;for(let we of Ce)if(!gs(we,me))return!1}if(Y.type==="MultiPolygon"){let me=dc(Y.coordinates,ue,pe),Ce=Pc(L.geometry(),te,ue,pe);if(!fc(te,ue))return!1;for(let we of Ce)if(!Lf(we,me))return!1}return!0}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,Y){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],pe=L.canonicalID();if(Y.type==="Polygon"){let me=ku(Y.coordinates,ue,pe),Ce=$c(L.geometry(),te,ue,pe);if(!fc(te,ue))return!1;for(let we of Ce)if(!hc(we,me))return!1}if(Y.type==="MultiPolygon"){let me=dc(Y.coordinates,ue,pe),Ce=$c(L.geometry(),te,ue,pe);if(!fc(te,ue))return!1;for(let we of Ce)if(!ac(we,me))return!1}return!0}(d,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let df=class{constructor(D=[],d=(L,Y)=>LY?1:0){if(this.data=D,this.length=this.data.length,this.compare=d,this.length>0)for(let L=(this.length>>1)-1;L>=0;L--)this._down(L)}push(D){this.data.push(D),this._up(this.length++)}pop(){if(this.length===0)return;let D=this.data[0],d=this.data.pop();return--this.length>0&&(this.data[0]=d,this._down(0)),D}peek(){return this.data[0]}_up(D){let{data:d,compare:L}=this,Y=d[D];for(;D>0;){let te=D-1>>1,ue=d[te];if(L(Y,ue)>=0)break;d[D]=ue,D=te}d[D]=Y}_down(D){let{data:d,compare:L}=this,Y=this.length>>1,te=d[D];for(;D=0)break;d[D]=d[ue],D=ue}d[D]=te}};function Dc(D,d,L=0,Y=D.length-1,te=Vu){for(;Y>L;){if(Y-L>600){let Ce=Y-L+1,we=d-L+1,ze=Math.log(Ce),Pe=.5*Math.exp(2*ze/3),at=.5*Math.sqrt(ze*Pe*(Ce-Pe)/Ce)*(we-Ce/2<0?-1:1);Dc(D,d,Math.max(L,Math.floor(d-we*Pe/Ce+at)),Math.min(Y,Math.floor(d+(Ce-we)*Pe/Ce+at)),te)}let ue=D[d],pe=L,me=Y;for(Ic(D,L,d),te(D[Y],ue)>0&&Ic(D,L,Y);pe0;)me--}te(D[L],ue)===0?Ic(D,L,me):(me++,Ic(D,me,Y)),me<=d&&(L=me+1),d<=me&&(Y=me-1)}}function Ic(D,d,L){let Y=D[d];D[d]=D[L],D[L]=Y}function Vu(D,d){return Dd?1:0}function Rc(D,d){if(D.length<=1)return[D];let L=[],Y,te;for(let ue of D){let pe=vf(ue);pe!==0&&(ue.area=Math.abs(pe),te===void 0&&(te=pe<0),te===pe<0?(Y&&L.push(Y),Y=[ue]):Y.push(ue))}if(Y&&L.push(Y),d>1)for(let ue=0;ue1?(we=d[Ce+1][0],ze=d[Ce+1][1]):Ve>0&&(we+=Pe/this.kx*Ve,ze+=at/this.ky*Ve)),Pe=this.wrap(L[0]-we)*this.kx,at=(L[1]-ze)*this.ky;let bt=Pe*Pe+at*at;bt180;)d-=360;return d}}function zc(D,d){return d[0]-D[0]}function Hu(D){return D[1]-D[0]+1}function uu(D,d){return D[1]>=D[0]&&D[1]D[1])return[null,null];let L=Hu(D);if(d){if(L===2)return[D,null];let te=Math.floor(L/2);return[[D[0],D[0]+te],[D[0]+te,D[1]]]}if(L===1)return[D,null];let Y=Math.floor(L/2)-1;return[[D[0],D[0]+Y],[D[0]+Y+1,D[1]]]}function Zc(D,d){if(!uu(d,D.length))return[1/0,1/0,-1/0,-1/0];let L=[1/0,1/0,-1/0,-1/0];for(let Y=d[0];Y<=d[1];++Y)Uu(L,D[Y]);return L}function gu(D){let d=[1/0,1/0,-1/0,-1/0];for(let L of D)for(let Y of L)Uu(d,Y);return d}function Pf(D){return D[0]!==-1/0&&D[1]!==-1/0&&D[2]!==1/0&&D[3]!==1/0}function bl(D,d,L){if(!Pf(D)||!Pf(d))return NaN;let Y=0,te=0;return D[2]d[2]&&(Y=D[0]-d[2]),D[1]>d[3]&&(te=D[1]-d[3]),D[3]=Y)return Y;if(fc(te,ue)){if(Kc(D,d))return 0}else if(Kc(d,D))return 0;let pe=1/0;for(let me of D)for(let Ce=0,we=me.length,ze=we-1;Ce0;){let Ce=pe.pop();if(Ce[0]>=ue)continue;let we=Ce[1],ze=d?50:100;if(Hu(we)<=ze){if(!uu(we,D.length))return NaN;if(d){let Pe=pc(D,we,L,Y);if(isNaN(Pe)||Pe===0)return Pe;ue=Math.min(ue,Pe)}else for(let Pe=we[0];Pe<=we[1];++Pe){let at=Yu(D[Pe],L,Y);if(ue=Math.min(ue,at),ue===0)return 0}}else{let Pe=Gu(we,d);Df(pe,ue,Y,D,me,Pe[0]),Df(pe,ue,Y,D,me,Pe[1])}}return ue}function Ll(D,d,L,Y,te,ue=1/0){let pe=Math.min(ue,te.distance(D[0],L[0]));if(pe===0)return pe;let me=new df([[0,[0,D.length-1],[0,L.length-1]]],zc);for(;me.length>0;){let Ce=me.pop();if(Ce[0]>=pe)continue;let we=Ce[1],ze=Ce[2],Pe=d?50:100,at=Y?50:100;if(Hu(we)<=Pe&&Hu(ze)<=at){if(!uu(we,D.length)&&uu(ze,L.length))return NaN;let Ve;if(d&&Y)Ve=wl(D,we,L,ze,te),pe=Math.min(pe,Ve);else if(d&&!Y){let bt=D.slice(we[0],we[1]+1);for(let Et=ze[0];Et<=ze[1];++Et)if(Ve=xl(L[Et],bt,te),pe=Math.min(pe,Ve),pe===0)return pe}else if(!d&&Y){let bt=L.slice(ze[0],ze[1]+1);for(let Et=we[0];Et<=we[1];++Et)if(Ve=xl(D[Et],bt,te),pe=Math.min(pe,Ve),pe===0)return pe}else Ve=pf(D,we,L,ze,te),pe=Math.min(pe,Ve)}else{let Ve=Gu(we,d),bt=Gu(ze,Y);cu(me,pe,te,D,L,Ve[0],bt[0]),cu(me,pe,te,D,L,Ve[0],bt[1]),cu(me,pe,te,D,L,Ve[1],bt[0]),cu(me,pe,te,D,L,Ve[1],bt[1])}}return pe}function If(D){return D.type==="MultiPolygon"?D.coordinates.map(d=>({type:"Polygon",coordinates:d})):D.type==="MultiLineString"?D.coordinates.map(d=>({type:"LineString",coordinates:d})):D.type==="MultiPoint"?D.coordinates.map(d=>({type:"Point",coordinates:d})):[D]}class yu{constructor(d,L){this.type=It,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'distance' expression requires exactly one argument, but found ${d.length-1} instead.`);if(oi(d[1])){let Y=d[1];if(Y.type==="FeatureCollection")return new yu(Y,Y.features.map(te=>If(te.geometry)).flat());if(Y.type==="Feature")return new yu(Y,If(Y.geometry));if("type"in Y&&"coordinates"in Y)return new yu(Y,If(Y))}return L.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(d){if(d.geometry()!=null&&d.canonicalID()!=null){if(d.geometryType()==="Point")return function(L,Y){let te=L.geometry(),ue=te.flat().map(Ce=>Eu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let pe=new vc(ue[0][1]),me=1/0;for(let Ce of Y){switch(Ce.type){case"Point":me=Math.min(me,Ll(ue,!1,[Ce.coordinates],!1,pe,me));break;case"LineString":me=Math.min(me,Ll(ue,!1,Ce.coordinates,!0,pe,me));break;case"Polygon":me=Math.min(me,Cl(ue,!1,Ce.coordinates,pe,me))}if(me===0)return me}return me}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,Y){let te=L.geometry(),ue=te.flat().map(Ce=>Eu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let pe=new vc(ue[0][1]),me=1/0;for(let Ce of Y){switch(Ce.type){case"Point":me=Math.min(me,Ll(ue,!0,[Ce.coordinates],!1,pe,me));break;case"LineString":me=Math.min(me,Ll(ue,!0,Ce.coordinates,!0,pe,me));break;case"Polygon":me=Math.min(me,Cl(ue,!0,Ce.coordinates,pe,me))}if(me===0)return me}return me}(d,this.geometries);if(d.geometryType()==="Polygon")return function(L,Y){let te=L.geometry();if(te.length===0||te[0].length===0)return NaN;let ue=Rc(te,0).map(Ce=>Ce.map(we=>we.map(ze=>Eu([ze.x,ze.y],L.canonical)))),pe=new vc(ue[0][0][0][1]),me=1/0;for(let Ce of Y)for(let we of ue){switch(Ce.type){case"Point":me=Math.min(me,Cl([Ce.coordinates],!1,we,pe,me));break;case"LineString":me=Math.min(me,Cl(Ce.coordinates,!0,we,pe,me));break;case"Polygon":me=Math.min(me,cs(we,Ce.coordinates,pe,me))}if(me===0)return me}return me}(d,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class Bc{constructor(d){this.type=aa,this.key=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let Y=d[1];return Y==null?L.error("Global state property must be defined."):typeof Y!="string"?L.error(`Global state property must be string, but found ${typeof d[1]} instead.`):new Bc(Y)}evaluate(d){var L;let Y=(L=d.globals)===null||L===void 0?void 0:L.globalState;return Y&&Object.keys(Y).length!==0?Or(Y,this.key):null}eachChild(){}outputDefined(){return!1}}let Tl={"==":mu,"!=":su,">":Bl,"<":cc,">=":ju,"<=":_l,array:Io,at:Di,boolean:Io,case:us,coalesce:zl,collator:lu,format:As,image:ms,in:lo,"index-of":Go,interpolate:Ji,"interpolate-hcl":Ji,"interpolate-lab":Ji,length:Ms,let:wo,literal:Wi,match:go,number:Io,"number-format":il,object:Io,slice:Jo,step:Is,string:Io,"to-boolean":Oo,"to-color":Oo,"to-number":Oo,"to-string":Oo,var:No,within:Zl,distance:yu,"global-state":Bc};class ll{constructor(d,L,Y,te){this.name=d,this.type=L,this._evaluate=Y,this.args=te}evaluate(d){return this._evaluate(d,this.args)}eachChild(d){this.args.forEach(d)}outputDefined(){return!1}static parse(d,L){let Y=d[0],te=ll.definitions[Y];if(!te)return L.error(`Unknown expression "${Y}". If you wanted a literal array, use ["literal", [...]].`,0);let ue=Array.isArray(te)?te[0]:te.type,pe=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,me=pe.filter(([we])=>!Array.isArray(we)||we.length===d.length-1),Ce=null;for(let[we,ze]of me){Ce=new as(L.registry,Du,L.path,null,L.scope);let Pe=[],at=!1;for(let Ve=1;Ve{return at=Pe,Array.isArray(at)?`(${at.map(ni).join(", ")})`:`(${ni(at.type)}...)`;var at}).join(" | "),ze=[];for(let Pe=1;Pe{L=d?L&&Du(Y):L&&Y instanceof Wi}),!!L&&Iu(D)&&Qc(D,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function Iu(D){if(D instanceof ll&&(D.name==="get"&&D.args.length===1||D.name==="feature-state"||D.name==="has"&&D.args.length===1||D.name==="properties"||D.name==="geometry-type"||D.name==="id"||/^filter-/.test(D.name))||D instanceof Zl||D instanceof yu)return!1;let d=!0;return D.eachChild(L=>{d&&!Iu(L)&&(d=!1)}),d}function Xu(D){if(D instanceof ll&&D.name==="feature-state")return!1;let d=!0;return D.eachChild(L=>{d&&!Xu(L)&&(d=!1)}),d}function Qc(D,d){if(D instanceof ll&&d.indexOf(D.name)>=0)return!1;let L=!0;return D.eachChild(Y=>{L&&!Qc(Y,d)&&(L=!1)}),L}function ef(D){return{result:"success",value:D}}function _u(D){return{result:"error",value:D}}function $u(D){return D["property-type"]==="data-driven"||D["property-type"]==="cross-faded-data-driven"}function mc(D){return!!D.expression&&D.expression.parameters.indexOf("zoom")>-1}function Ru(D){return!!D.expression&&D.expression.interpolated}function zo(D){return D instanceof Number?"number":D instanceof String?"string":D instanceof Boolean?"boolean":Array.isArray(D)?"array":D===null?"null":typeof D}function gc(D){return typeof D=="object"&&D!==null&&!Array.isArray(D)&&ii(D)===sa}function Vf(D){return D}function mf(D,d){let L=D.stops&&typeof D.stops[0][0]=="object",Y=L||!(L||D.property!==void 0),te=D.type||(Ru(d)?"exponential":"interval"),ue=function(ze){switch(ze.type){case"color":return gn.parse;case"padding":return Sn.parse;case"numberArray":return Gi.parse;case"colorArray":return ti.parse;default:return null}}(d);if(ue&&((D=Wt({},D)).stops&&(D.stops=D.stops.map(ze=>[ze[0],ue(ze[1])])),D.default=ue(D.default?D.default:d.default)),D.colorSpace&&(pe=D.colorSpace)!=="rgb"&&pe!=="hcl"&&pe!=="lab")throw new Error(`Unknown color space: "${D.colorSpace}"`);var pe;let me=function(ze){switch(ze){case"exponential":return yf;case"interval":return Hf;case"categorical":return gf;case"identity":return ul;default:throw new Error(`Unknown function type "${ze}"`)}}(te),Ce,we;if(te==="categorical"){Ce=Object.create(null);for(let ze of D.stops)Ce[ze[0]]=ze[1];we=typeof D.stops[0][0]}if(L){let ze={},Pe=[];for(let bt=0;btbt[0]),evaluate:({zoom:bt},Et)=>yf({stops:at,base:D.base},d,bt).evaluate(bt,Et)}}if(Y){let ze=te==="exponential"?{name:"exponential",base:D.base!==void 0?D.base:1}:null;return{kind:"camera",interpolationType:ze,interpolationFactor:Ji.interpolationFactor.bind(void 0,ze),zoomStops:D.stops.map(Pe=>Pe[0]),evaluate:({zoom:Pe})=>me(D,d,Pe,Ce,we)}}return{kind:"source",evaluate(ze,Pe){let at=Pe&&Pe.properties?Pe.properties[D.property]:void 0;return at===void 0?tf(D.default,d.default):me(D,d,at,Ce,we)}}}function tf(D,d,L){return D!==void 0?D:d!==void 0?d:L!==void 0?L:void 0}function gf(D,d,L,Y,te){return tf(typeof L===te?Y[L]:void 0,D.default,d.default)}function Hf(D,d,L){if(zo(L)!=="number")return tf(D.default,d.default);let Y=D.stops.length;if(Y===1||L<=D.stops[0][0])return D.stops[0][1];if(L>=D.stops[Y-1][0])return D.stops[Y-1][1];let te=zs(D.stops.map(ue=>ue[0]),L);return D.stops[te][1]}function yf(D,d,L){let Y=D.base!==void 0?D.base:1;if(zo(L)!=="number")return tf(D.default,d.default);let te=D.stops.length;if(te===1||L<=D.stops[0][0])return D.stops[0][1];if(L>=D.stops[te-1][0])return D.stops[te-1][1];let ue=zs(D.stops.map(ze=>ze[0]),L),pe=function(ze,Pe,at,Ve){let bt=Ve-at,Et=ze-at;return bt===0?0:Pe===1?Et/bt:(Math.pow(Pe,Et)-1)/(Math.pow(Pe,bt)-1)}(L,Y,D.stops[ue][0],D.stops[ue+1][0]),me=D.stops[ue][1],Ce=D.stops[ue+1][1],we=Ls[d.type]||Vf;return typeof me.evaluate=="function"?{evaluate(...ze){let Pe=me.evaluate.apply(void 0,ze),at=Ce.evaluate.apply(void 0,ze);if(Pe!==void 0&&at!==void 0)return we(Pe,at,pe,D.colorSpace)}}:we(me,Ce,pe,D.colorSpace)}function ul(D,d,L){switch(d.type){case"color":L=gn.parse(L);break;case"formatted":L=ro.fromString(L.toString());break;case"resolvedImage":L=so.fromString(L.toString());break;case"padding":L=Sn.parse(L);break;case"colorArray":L=ti.parse(L);break;case"numberArray":L=Gi.parse(L);break;default:zo(L)===d.type||d.type==="enum"&&d.values[L]||(L=void 0)}return tf(L,D.default,d.default)}ll.register(Tl,{error:[{kind:"error"},[ir],(D,[d])=>{throw new fi(d.evaluate(D))}],typeof:[ir,[aa],(D,[d])=>ni(ii(d.evaluate(D)))],"to-rgba":[Fn(It,4),[fr],(D,[d])=>{let[L,Y,te,ue]=d.evaluate(D).rgb;return[255*L,255*Y,255*te,ue]}],rgb:[fr,[It,It,It],Jc],rgba:[fr,[It,It,It,It],Jc],has:{type:cr,overloads:[[[ir],(D,[d])=>Nc(d.evaluate(D),D.properties())],[[ir,sa],(D,[d,L])=>Nc(d.evaluate(D),L.evaluate(D))]]},get:{type:aa,overloads:[[[ir],(D,[d])=>Rf(d.evaluate(D),D.properties())],[[ir,sa],(D,[d,L])=>Rf(d.evaluate(D),L.evaluate(D))]]},"feature-state":[aa,[ir],(D,[d])=>Rf(d.evaluate(D),D.featureState||{})],properties:[sa,[],D=>D.properties()],"geometry-type":[ir,[],D=>D.geometryType()],id:[aa,[],D=>D.id()],zoom:[It,[],D=>D.globals.zoom],"heatmap-density":[It,[],D=>D.globals.heatmapDensity||0],elevation:[It,[],D=>D.globals.elevation||0],"line-progress":[It,[],D=>D.globals.lineProgress||0],accumulated:[aa,[],D=>D.globals.accumulated===void 0?null:D.globals.accumulated],"+":[It,fu(It),(D,d)=>{let L=0;for(let Y of d)L+=Y.evaluate(D);return L}],"*":[It,fu(It),(D,d)=>{let L=1;for(let Y of d)L*=Y.evaluate(D);return L}],"-":{type:It,overloads:[[[It,It],(D,[d,L])=>d.evaluate(D)-L.evaluate(D)],[[It],(D,[d])=>-d.evaluate(D)]]},"/":[It,[It,It],(D,[d,L])=>d.evaluate(D)/L.evaluate(D)],"%":[It,[It,It],(D,[d,L])=>d.evaluate(D)%L.evaluate(D)],ln2:[It,[],()=>Math.LN2],pi:[It,[],()=>Math.PI],e:[It,[],()=>Math.E],"^":[It,[It,It],(D,[d,L])=>Math.pow(d.evaluate(D),L.evaluate(D))],sqrt:[It,[It],(D,[d])=>Math.sqrt(d.evaluate(D))],log10:[It,[It],(D,[d])=>Math.log(d.evaluate(D))/Math.LN10],ln:[It,[It],(D,[d])=>Math.log(d.evaluate(D))],log2:[It,[It],(D,[d])=>Math.log(d.evaluate(D))/Math.LN2],sin:[It,[It],(D,[d])=>Math.sin(d.evaluate(D))],cos:[It,[It],(D,[d])=>Math.cos(d.evaluate(D))],tan:[It,[It],(D,[d])=>Math.tan(d.evaluate(D))],asin:[It,[It],(D,[d])=>Math.asin(d.evaluate(D))],acos:[It,[It],(D,[d])=>Math.acos(d.evaluate(D))],atan:[It,[It],(D,[d])=>Math.atan(d.evaluate(D))],min:[It,fu(It),(D,d)=>Math.min(...d.map(L=>L.evaluate(D)))],max:[It,fu(It),(D,d)=>Math.max(...d.map(L=>L.evaluate(D)))],abs:[It,[It],(D,[d])=>Math.abs(d.evaluate(D))],round:[It,[It],(D,[d])=>{let L=d.evaluate(D);return L<0?-Math.round(-L):Math.round(L)}],floor:[It,[It],(D,[d])=>Math.floor(d.evaluate(D))],ceil:[It,[It],(D,[d])=>Math.ceil(d.evaluate(D))],"filter-==":[cr,[ir,aa],(D,[d,L])=>D.properties()[d.value]===L.value],"filter-id-==":[cr,[aa],(D,[d])=>D.id()===d.value],"filter-type-==":[cr,[ir],(D,[d])=>D.geometryType()===d.value],"filter-<":[cr,[ir,aa],(D,[d,L])=>{let Y=D.properties()[d.value],te=L.value;return typeof Y==typeof te&&Y{let L=D.id(),Y=d.value;return typeof L==typeof Y&&L":[cr,[ir,aa],(D,[d,L])=>{let Y=D.properties()[d.value],te=L.value;return typeof Y==typeof te&&Y>te}],"filter-id->":[cr,[aa],(D,[d])=>{let L=D.id(),Y=d.value;return typeof L==typeof Y&&L>Y}],"filter-<=":[cr,[ir,aa],(D,[d,L])=>{let Y=D.properties()[d.value],te=L.value;return typeof Y==typeof te&&Y<=te}],"filter-id-<=":[cr,[aa],(D,[d])=>{let L=D.id(),Y=d.value;return typeof L==typeof Y&&L<=Y}],"filter->=":[cr,[ir,aa],(D,[d,L])=>{let Y=D.properties()[d.value],te=L.value;return typeof Y==typeof te&&Y>=te}],"filter-id->=":[cr,[aa],(D,[d])=>{let L=D.id(),Y=d.value;return typeof L==typeof Y&&L>=Y}],"filter-has":[cr,[aa],(D,[d])=>d.value in D.properties()],"filter-has-id":[cr,[],D=>D.id()!==null&&D.id()!==void 0],"filter-type-in":[cr,[Fn(ir)],(D,[d])=>d.value.indexOf(D.geometryType())>=0],"filter-id-in":[cr,[Fn(aa)],(D,[d])=>d.value.indexOf(D.id())>=0],"filter-in-small":[cr,[ir,Fn(aa)],(D,[d,L])=>L.value.indexOf(D.properties()[d.value])>=0],"filter-in-large":[cr,[ir,Fn(aa)],(D,[d,L])=>function(Y,te,ue,pe){for(;ue<=pe;){let me=ue+pe>>1;if(te[me]===Y)return!0;te[me]>Y?pe=me-1:ue=me+1}return!1}(D.properties()[d.value],L.value,0,L.value.length-1)],all:{type:cr,overloads:[[[cr,cr],(D,[d,L])=>d.evaluate(D)&&L.evaluate(D)],[fu(cr),(D,d)=>{for(let L of d)if(!L.evaluate(D))return!1;return!0}]]},any:{type:cr,overloads:[[[cr,cr],(D,[d,L])=>d.evaluate(D)||L.evaluate(D)],[fu(cr),(D,d)=>{for(let L of d)if(L.evaluate(D))return!0;return!1}]]},"!":[cr,[cr],(D,[d])=>!d.evaluate(D)],"is-supported-script":[cr,[ir],(D,[d])=>{let L=D.globals&&D.globals.isSupportedScript;return!L||L(d.evaluate(D))}],upcase:[ir,[ir],(D,[d])=>d.evaluate(D).toUpperCase()],downcase:[ir,[ir],(D,[d])=>d.evaluate(D).toLowerCase()],concat:[ir,fu(aa),(D,d)=>d.map(L=>co(L.evaluate(D))).join("")],split:[Fn(ir),[ir,ir],(D,[d,L])=>d.evaluate(D).split(L.evaluate(D))],join:[ir,[Fn(ir),ir],(D,[d,L])=>d.evaluate(D).join(L.evaluate(D))],"resolved-locale":[ir,[xa],(D,[d])=>d.evaluate(D).resolvedLocale()]});class Pl{constructor(d,L,Y){this.expression=d,this._warningHistory={},this._evaluator=new Ko,this._defaultValue=L?function(te){if(te.type==="color"&&gc(te.default))return new gn(0,0,0,0);switch(te.type){case"color":return gn.parse(te.default)||null;case"padding":return Sn.parse(te.default)||null;case"numberArray":return Gi.parse(te.default)||null;case"colorArray":return ti.parse(te.default)||null;case"variableAnchorOffsetCollection":return zi.parse(te.default)||null;case"projectionDefinition":return Mo.parse(te.default)||null;default:return te.default===void 0?null:te.default}}(L):null,this._enumValues=L&&L.type==="enum"?L.values:null,this._globalState=Y}evaluateWithoutErrorHandling(d,L,Y,te,ue,pe){return this._globalState&&(d=la(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L,this._evaluator.featureState=Y,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=pe,this.expression.evaluate(this._evaluator)}evaluate(d,L,Y,te,ue,pe){this._globalState&&(d=la(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L||null,this._evaluator.featureState=Y||null,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=pe||null;try{let me=this.expression.evaluate(this._evaluator);if(me==null||typeof me=="number"&&me!=me)return this._defaultValue;if(this._enumValues&&!(me in this._enumValues))throw new fi(`Expected value to be one of ${Object.keys(this._enumValues).map(Ce=>JSON.stringify(Ce)).join(", ")}, but found ${JSON.stringify(me)} instead.`);return me}catch(me){return this._warningHistory[me.message]||(this._warningHistory[me.message]=!0,typeof console<"u"&&console.warn(me.message)),this._defaultValue}}}function yc(D){return Array.isArray(D)&&D.length>0&&typeof D[0]=="string"&&D[0]in Tl}function _c(D,d,L){let Y=new as(Tl,Du,[],d?function(ue){let pe={color:fr,string:ir,number:It,enum:ir,boolean:cr,formatted:ja,padding:Oa,numberArray:un,colorArray:An,projectionDefinition:Ir,resolvedImage:Ja,variableAnchorOffsetCollection:ei};return ue.type==="array"?Fn(pe[ue.value]||aa,ue.length):pe[ue.type]}(d):void 0),te=Y.parse(D,void 0,void 0,void 0,d&&d.type==="string"?{typeAnnotation:"coerce"}:void 0);return te?ef(new Pl(te,d,L)):_u(Y.errors)}class bc{constructor(d,L,Y){this.kind=d,this._styleExpression=L,this.isStateDependent=d!=="constant"&&!Xu(L.expression),this.globalStateRefs=wr(L.expression),this._globalState=Y}evaluateWithoutErrorHandling(d,L,Y,te,ue,pe){return this._globalState&&(d=la(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,Y,te,ue,pe)}evaluate(d,L,Y,te,ue,pe){return this._globalState&&(d=la(d,this._globalState)),this._styleExpression.evaluate(d,L,Y,te,ue,pe)}}class nc{constructor(d,L,Y,te,ue){this.kind=d,this.zoomStops=Y,this._styleExpression=L,this.isStateDependent=d!=="camera"&&!Xu(L.expression),this.globalStateRefs=wr(L.expression),this.interpolationType=te,this._globalState=ue}evaluateWithoutErrorHandling(d,L,Y,te,ue,pe){return this._globalState&&(d=la(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,Y,te,ue,pe)}evaluate(d,L,Y,te,ue,pe){return this._globalState&&(d=la(d,this._globalState)),this._styleExpression.evaluate(d,L,Y,te,ue,pe)}interpolationFactor(d,L,Y){return this.interpolationType?Ji.interpolationFactor(this.interpolationType,d,L,Y):0}}function zt(D,d,L){let Y=_c(D,d,L);if(Y.result==="error")return Y;let te=Y.value.expression,ue=Iu(te);if(!ue&&!$u(d))return _u([new Sr("","data expressions not supported")]);let pe=Qc(te,["zoom"]);if(!pe&&!mc(d))return _u([new Sr("","zoom expressions not supported")]);let me=Br(te);return me||pe?me instanceof Sr?_u([me]):me instanceof Ji&&!Ru(d)?_u([new Sr("",'"interpolate" expressions cannot be used with this property')]):ef(me?new nc(ue?"camera":"composite",Y.value,me.labels,me instanceof Ji?me.interpolation:void 0,L):new bc(ue?"constant":"source",Y.value,L)):_u([new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class rr{constructor(d,L){this._parameters=d,this._specification=L,Wt(this,mf(this._parameters,this._specification))}static deserialize(d){return new rr(d._parameters,d._specification)}static serialize(d){return{_parameters:d._parameters,_specification:d._specification}}}function Br(D){let d=null;if(D instanceof wo)d=Br(D.result);else if(D instanceof zl){for(let L of D.args)if(d=Br(L),d)break}else(D instanceof Is||D instanceof Ji)&&D.input instanceof ll&&D.input.name==="zoom"&&(d=D);return d instanceof Sr||D.eachChild(L=>{let Y=Br(L);Y instanceof Sr?d=Y:!d&&Y?d=new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):d&&Y&&d!==Y&&(d=new Sr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),d}function wr(D,d=new Set){return D instanceof Bc&&d.add(D.key),D.eachChild(L=>{wr(L,d)}),d}function la(D,d){let{zoom:L,heatmapDensity:Y,elevation:te,lineProgress:ue,isSupportedScript:pe,accumulated:me}=D??{};return{zoom:L,heatmapDensity:Y,elevation:te,lineProgress:ue,isSupportedScript:pe,accumulated:me,globalState:d}}function Ca(D){if(D===!0||D===!1)return!0;if(!Array.isArray(D)||D.length===0)return!1;switch(D[0]){case"has":return D.length>=2&&D[1]!=="$id"&&D[1]!=="$type";case"in":return D.length>=3&&(typeof D[1]!="string"||Array.isArray(D[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return D.length!==3||Array.isArray(D[1])||Array.isArray(D[2]);case"any":case"all":for(let d of D.slice(1))if(!Ca(d)&&typeof d!="boolean")return!1;return!0;default:return!0}}let qa={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Ka(D,d){if(D==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Ca(D)||(D=Ha(D));let L=_c(D,qa,d);if(L.result==="error")throw new Error(L.value.map(Y=>`${Y.key}: ${Y.message}`).join(", "));return{filter:(Y,te,ue)=>L.value.evaluate(Y,te,{},ue),needGeometry:Pn(D),getGlobalStateRefs:()=>wr(L.value.expression)}}function cn(D,d){return Dd?1:0}function Pn(D){if(!Array.isArray(D))return!1;if(D[0]==="within"||D[0]==="distance")return!0;for(let d=1;d"||d==="<="||d===">="?on(D[1],D[2],d):d==="any"?(L=D.slice(1),["any"].concat(L.map(Ha))):d==="all"?["all"].concat(D.slice(1).map(Ha)):d==="none"?["all"].concat(D.slice(1).map(Ha).map(qn)):d==="in"?fn(D[1],D.slice(2)):d==="!in"?qn(fn(D[1],D.slice(2))):d==="has"?Ln(D[1]):d!=="!has"||qn(Ln(D[1]));var L}function on(D,d,L){switch(D){case"$type":return[`filter-type-${L}`,d];case"$id":return[`filter-id-${L}`,d];default:return[`filter-${L}`,D,d]}}function fn(D,d){if(d.length===0)return!1;switch(D){case"$type":return["filter-type-in",["literal",d]];case"$id":return["filter-id-in",["literal",d]];default:return d.length>200&&!d.some(L=>typeof L!=typeof d[0])?["filter-in-large",D,["literal",d.sort(cn)]]:["filter-in-small",D,["literal",d]]}}function Ln(D){switch(D){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",D]}}function qn(D){return["!",D]}function Bi(D){let d=typeof D;if(d==="number"||d==="boolean"||d==="string"||D==null)return JSON.stringify(D);if(Array.isArray(D)){let te="[";for(let ue of D)te+=`${Bi(ue)},`;return`${te}]`}let L=Object.keys(D).sort(),Y="{";for(let te=0;teY.maximum?[new Ht(d,L,`${L} is greater than the maximum value ${Y.maximum}`)]:[]}function Vo(D){let d=D.valueSpec,L=_i(D.value.type),Y,te,ue,pe={},me=L!=="categorical"&&D.value.property===void 0,Ce=!me,we=zo(D.value.stops)==="array"&&zo(D.value.stops[0])==="array"&&zo(D.value.stops[0][0])==="object",ze=Gn({key:D.key,value:D.value,valueSpec:D.styleSpec.function,validateSpec:D.validateSpec,style:D.style,styleSpec:D.styleSpec,objectElementValidators:{stops:function(Ve){if(L==="identity")return[new Ht(Ve.key,Ve.value,'identity function may not have a "stops" property')];let bt=[],Et=Ve.value;return bt=bt.concat(oo({key:Ve.key,value:Et,valueSpec:Ve.valueSpec,validateSpec:Ve.validateSpec,style:Ve.style,styleSpec:Ve.styleSpec,arrayElementValidator:Pe})),zo(Et)==="array"&&Et.length===0&&bt.push(new Ht(Ve.key,Et,"array must have at least one stop")),bt},default:function(Ve){return Ve.validateSpec({key:Ve.key,value:Ve.value,valueSpec:d,validateSpec:Ve.validateSpec,style:Ve.style,styleSpec:Ve.styleSpec})}}});return L==="identity"&&me&&ze.push(new Ht(D.key,D.value,'missing required property "property"')),L==="identity"||D.value.stops||ze.push(new Ht(D.key,D.value,'missing required property "stops"')),L==="exponential"&&D.valueSpec.expression&&!Ru(D.valueSpec)&&ze.push(new Ht(D.key,D.value,"exponential functions not supported")),D.styleSpec.$version>=8&&(Ce&&!$u(D.valueSpec)?ze.push(new Ht(D.key,D.value,"property functions not supported")):me&&!mc(D.valueSpec)&&ze.push(new Ht(D.key,D.value,"zoom functions not supported"))),L!=="categorical"&&!we||D.value.property!==void 0||ze.push(new Ht(D.key,D.value,'"property" property is required')),ze;function Pe(Ve){let bt=[],Et=Ve.value,er=Ve.key;if(zo(Et)!=="array")return[new Ht(er,Et,`array expected, ${zo(Et)} found`)];if(Et.length!==2)return[new Ht(er,Et,`array length 2 expected, length ${Et.length} found`)];if(we){if(zo(Et[0])!=="object")return[new Ht(er,Et,`object expected, ${zo(Et[0])} found`)];if(Et[0].zoom===void 0)return[new Ht(er,Et,"object stop key must have zoom")];if(Et[0].value===void 0)return[new Ht(er,Et,"object stop key must have value")];if(ue&&ue>_i(Et[0].zoom))return[new Ht(er,Et[0].zoom,"stop zoom values must appear in ascending order")];_i(Et[0].zoom)!==ue&&(ue=_i(Et[0].zoom),te=void 0,pe={}),bt=bt.concat(Gn({key:`${er}[0]`,value:Et[0],valueSpec:{zoom:{}},validateSpec:Ve.validateSpec,style:Ve.style,styleSpec:Ve.styleSpec,objectElementValidators:{zoom:yo,value:at}}))}else bt=bt.concat(at({key:`${er}[0]`,value:Et[0],validateSpec:Ve.validateSpec,style:Ve.style,styleSpec:Ve.styleSpec},Et));return yc(Vn(Et[1]))?bt.concat([new Ht(`${er}[1]`,Et[1],"expressions are not allowed in function stops.")]):bt.concat(Ve.validateSpec({key:`${er}[1]`,value:Et[1],valueSpec:d,validateSpec:Ve.validateSpec,style:Ve.style,styleSpec:Ve.styleSpec}))}function at(Ve,bt){let Et=zo(Ve.value),er=_i(Ve.value),tr=Ve.value!==null?Ve.value:bt;if(Y){if(Et!==Y)return[new Ht(Ve.key,tr,`${Et} stop domain type must match previous stop domain type ${Y}`)]}else Y=Et;if(Et!=="number"&&Et!=="string"&&Et!=="boolean")return[new Ht(Ve.key,tr,"stop domain value must be a number, string, or boolean")];if(Et!=="number"&&L!=="categorical"){let xr=`number expected, ${Et} found`;return $u(d)&&L===void 0&&(xr+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ht(Ve.key,tr,xr)]}return L!=="categorical"||Et!=="number"||isFinite(er)&&Math.floor(er)===er?L!=="categorical"&&Et==="number"&&te!==void 0&&ernew Ht(`${D.key}${Y.key}`,D.value,Y.message));let L=d.value.expression||d.value._styleExpression.expression;if(D.expressionContext==="property"&&D.propertyKey==="text-font"&&!L.outputDefined())return[new Ht(D.key,D.value,`Invalid data expression for "${D.propertyKey}". Output values must be contained as literals within the expression.`)];if(D.expressionContext==="property"&&D.propertyType==="layout"&&!Xu(L))return[new Ht(D.key,D.value,'"feature-state" data expressions are not supported with layout properties.')];if(D.expressionContext==="filter"&&!Xu(L))return[new Ht(D.key,D.value,'"feature-state" data expressions are not supported with filters.')];if(D.expressionContext&&D.expressionContext.indexOf("cluster")===0){if(!Qc(L,["zoom","feature-state"]))return[new Ht(D.key,D.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(D.expressionContext==="cluster-initial"&&!Iu(L))return[new Ht(D.key,D.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Yo(D){let d=D.key,L=D.value,Y=zo(L);return Y!=="string"?[new Ht(d,L,`color expected, ${Y} found`)]:gn.parse(String(L))?[]:[new Ht(d,L,`color expected, "${L}" found`)]}function ns(D){let d=D.key,L=D.value,Y=D.valueSpec,te=[];return Array.isArray(Y.values)?Y.values.indexOf(_i(L))===-1&&te.push(new Ht(d,L,`expected one of [${Y.values.join(", ")}], ${JSON.stringify(L)} found`)):Object.keys(Y.values).indexOf(_i(L))===-1&&te.push(new Ht(d,L,`expected one of [${Object.keys(Y.values).join(", ")}], ${JSON.stringify(L)} found`)),te}function Bo(D){return Ca(Vn(D.value))?Wo(Wt({},D,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Ks(D)}function Ks(D){let d=D.value,L=D.key;if(zo(d)!=="array")return[new Ht(L,d,`array expected, ${zo(d)} found`)];let Y=D.styleSpec,te,ue=[];if(d.length<1)return[new Ht(L,d,"filter array must have at least 1 element")];switch(ue=ue.concat(ns({key:`${L}[0]`,value:d[0],valueSpec:Y.filter_operator,style:D.style,styleSpec:D.styleSpec})),_i(d[0])){case"<":case"<=":case">":case">=":d.length>=2&&_i(d[1])==="$type"&&ue.push(new Ht(L,d,`"$type" cannot be use with operator "${d[0]}"`));case"==":case"!=":d.length!==3&&ue.push(new Ht(L,d,`filter array for operator "${d[0]}" must have 3 elements`));case"in":case"!in":d.length>=2&&(te=zo(d[1]),te!=="string"&&ue.push(new Ht(`${L}[1]`,d[1],`string expected, ${te} found`)));for(let pe=2;pe{Pe in te&&Y.push(new Ht(ue,te[Pe],`"${Pe}" is prohibited for ref layers`))}),pe.layers.forEach(Pe=>{_i(Pe.id)===we&&(ze=Pe)}),ze?ze.ref?Y.push(new Ht(ue,te.ref,"ref cannot reference another ref layer")):Ce=_i(ze.type):Y.push(new Ht(ue,te.ref,`ref layer "${we}" not found`))}else if(Ce!=="background")if(te.source){let ze=pe.sources&&pe.sources[te.source],Pe=ze&&_i(ze.type);ze?Pe==="vector"&&Ce==="raster"?Y.push(new Ht(ue,te.source,`layer "${te.id}" requires a raster source`)):Pe!=="raster-dem"&&Ce==="hillshade"||Pe!=="raster-dem"&&Ce==="color-relief"?Y.push(new Ht(ue,te.source,`layer "${te.id}" requires a raster-dem source`)):Pe==="raster"&&Ce!=="raster"?Y.push(new Ht(ue,te.source,`layer "${te.id}" requires a vector source`)):Pe!=="vector"||te["source-layer"]?Pe==="raster-dem"&&Ce!=="hillshade"&&Ce!=="color-relief"?Y.push(new Ht(ue,te.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):Ce!=="line"||!te.paint||!te.paint["line-gradient"]||Pe==="geojson"&&ze.lineMetrics||Y.push(new Ht(ue,te,`layer "${te.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):Y.push(new Ht(ue,te,`layer "${te.id}" must specify a "source-layer"`)):Y.push(new Ht(ue,te.source,`source "${te.source}" not found`))}else Y.push(new Ht(ue,te,'missing required property "source"'));return Ce==="raster"&&(!((d=te.paint)===null||d===void 0)&&d.resampling)&&(!((L=te.paint)===null||L===void 0)&&L["raster-resampling"])&&Y.push(new Ht(ue,te.paint,`layer "${te.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),Y=Y.concat(Gn({key:ue,value:te,valueSpec:me.layer,style:D.style,styleSpec:D.styleSpec,validateSpec:D.validateSpec,objectElementValidators:{"*":()=>[],type:()=>D.validateSpec({key:`${ue}.type`,value:te.type,valueSpec:me.layer.type,style:D.style,styleSpec:D.styleSpec,validateSpec:D.validateSpec,object:te,objectKey:"type"}),filter:Bo,layout:ze=>Gn({layer:te,key:ze.key,value:ze.value,style:ze.style,styleSpec:ze.styleSpec,validateSpec:ze.validateSpec,objectElementValidators:{"*":Pe=>vi(Wt({layerType:Ce},Pe))}}),paint:ze=>Gn({layer:te,key:ze.key,value:ze.value,style:ze.style,styleSpec:ze.styleSpec,validateSpec:ze.validateSpec,objectElementValidators:{"*":Pe=>ps(Wt({layerType:Ce},Pe))}})}})),Y}function Ss(D){let d=D.value,L=D.key,Y=zo(d);return Y!=="string"?[new Ht(L,d,`string expected, ${Y} found`)]:[]}let Ws={promoteId:function({key:D,value:d}){if(zo(d)==="string")return Ss({key:D,value:d});{let L=[];for(let Y in d)L.push(...Ss({key:`${D}.${Y}`,value:d[Y]}));return L}}};function Dl(D){let d=D.value,L=D.key,Y=D.styleSpec,te=D.style,ue=D.validateSpec;if(!d.type)return[new Ht(L,d,'"type" is required')];let pe=_i(d.type),me;switch(pe){case"vector":case"raster":return me=Gn({key:L,value:d,valueSpec:Y[`source_${pe.replace("-","_")}`],style:D.style,styleSpec:Y,objectElementValidators:Ws,validateSpec:ue}),me;case"raster-dem":return me=function(Ce){var we;let ze=(we=Ce.sourceName)!==null&&we!==void 0?we:"",Pe=Ce.value,at=Ce.styleSpec,Ve=at.source_raster_dem,bt=Ce.style,Et=[],er=zo(Pe);if(Pe===void 0)return Et;if(er!=="object")return Et.push(new Ht("source_raster_dem",Pe,`object expected, ${er} found`)),Et;let tr=_i(Pe.encoding)==="custom",xr=["redFactor","greenFactor","blueFactor","baseShift"],lr=Ce.value.encoding?`"${Ce.value.encoding}"`:"Default";for(let Mr in Pe)!tr&&xr.includes(Mr)?Et.push(new Ht(Mr,Pe[Mr],`In "${ze}": "${Mr}" is only valid when "encoding" is set to "custom". ${lr} encoding found`)):Ve[Mr]?Et=Et.concat(Ce.validateSpec({key:Mr,value:Pe[Mr],valueSpec:Ve[Mr],validateSpec:Ce.validateSpec,style:bt,styleSpec:at})):Et.push(new Ht(Mr,Pe[Mr],`unknown property "${Mr}"`));return Et}({sourceName:L,value:d,style:D.style,styleSpec:Y,validateSpec:ue}),me;case"geojson":if(me=Gn({key:L,value:d,valueSpec:Y.source_geojson,style:te,styleSpec:Y,validateSpec:ue,objectElementValidators:Ws}),d.cluster)for(let Ce in d.clusterProperties){let[we,ze]=d.clusterProperties[Ce],Pe=typeof we=="string"?[we,["accumulated"],["get",Ce]]:we;me.push(...Wo({key:`${L}.${Ce}.map`,value:ze,expressionContext:"cluster-map"})),me.push(...Wo({key:`${L}.${Ce}.reduce`,value:Pe,expressionContext:"cluster-reduce"}))}return me;case"video":return Gn({key:L,value:d,valueSpec:Y.source_video,style:te,validateSpec:ue,styleSpec:Y});case"image":return Gn({key:L,value:d,valueSpec:Y.source_image,style:te,validateSpec:ue,styleSpec:Y});case"canvas":return[new Ht(L,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return ns({key:`${L}.type`,value:d.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Nl(D){let d=D.value,L=D.styleSpec,Y=L.light,te=D.style,ue=[],pe=zo(d);if(d===void 0)return ue;if(pe!=="object")return ue=ue.concat([new Ht("light",d,`object expected, ${pe} found`)]),ue;for(let me in d){let Ce=me.match(/^(.*)-transition$/);ue=ue.concat(Ce&&Y[Ce[1]]&&Y[Ce[1]].transition?D.validateSpec({key:me,value:d[me],valueSpec:L.transition,validateSpec:D.validateSpec,style:te,styleSpec:L}):Y[me]?D.validateSpec({key:me,value:d[me],valueSpec:Y[me],validateSpec:D.validateSpec,style:te,styleSpec:L}):[new Ht(me,d[me],`unknown property "${me}"`)])}return ue}function Kl(D){let d=D.value,L=D.styleSpec,Y=L.sky,te=D.style,ue=zo(d);if(d===void 0)return[];if(ue!=="object")return[new Ht("sky",d,`object expected, ${ue} found`)];let pe=[];for(let me in d)pe=pe.concat(Y[me]?D.validateSpec({key:me,value:d[me],valueSpec:Y[me],style:te,styleSpec:L}):[new Ht(me,d[me],`unknown property "${me}"`)]);return pe}function Fu(D){let d=D.value,L=D.styleSpec,Y=L.terrain,te=D.style,ue=[],pe=zo(d);if(d===void 0)return ue;if(pe!=="object")return ue=ue.concat([new Ht("terrain",d,`object expected, ${pe} found`)]),ue;for(let me in d)ue=ue.concat(Y[me]?D.validateSpec({key:me,value:d[me],valueSpec:Y[me],validateSpec:D.validateSpec,style:te,styleSpec:L}):[new Ht(me,d[me],`unknown property "${me}"`)]);return ue}function Al(D){let d=[],L=D.value,Y=D.key;if(Array.isArray(L)){let te=[],ue=[];for(let pe in L)L[pe].id&&te.includes(L[pe].id)&&d.push(new Ht(Y,L,`all the sprites' ids must be unique, but ${L[pe].id} is duplicated`)),te.push(L[pe].id),L[pe].url&&ue.includes(L[pe].url)&&d.push(new Ht(Y,L,`all the sprites' URLs must be unique, but ${L[pe].url} is duplicated`)),ue.push(L[pe].url),d=d.concat(Gn({key:`${Y}[${pe}]`,value:L[pe],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:D.validateSpec}));return d}return Ss({key:Y,value:L})}function zu(D){return!!D&&D.constructor===Object}function bu(D){return zu(D.value)?[]:[new Ht(D.key,D.value,`object expected, ${zo(D.value)} found`)]}let ic={"*":()=>[],array:oo,boolean:function(D){let d=D.value,L=D.key,Y=zo(d);return Y!=="boolean"?[new Ht(L,d,`boolean expected, ${Y} found`)]:[]},number:yo,color:Yo,constants:Zi,enum:ns,filter:Bo,function:Vo,layer:Xo,object:Gn,source:Dl,light:Nl,sky:Kl,terrain:Fu,projection:function(D){let d=D.value,L=D.styleSpec,Y=L.projection,te=D.style,ue=zo(d);if(d===void 0)return[];if(ue!=="object")return[new Ht("projection",d,`object expected, ${ue} found`)];let pe=[];for(let me in d)pe=pe.concat(Y[me]?D.validateSpec({key:me,value:d[me],valueSpec:Y[me],style:te,styleSpec:L}):[new Ht(me,d[me],`unknown property "${me}"`)]);return pe},projectionDefinition:function(D){let d=D.key,L=D.value;L=L instanceof String?L.valueOf():L;let Y=zo(L);return Y!=="array"||function(te){return Array.isArray(te)&&te.length===3&&typeof te[0]=="string"&&typeof te[1]=="string"&&typeof te[2]=="number"}(L)||function(te){return!!["interpolate","step","literal"].includes(te[0])}(L)?["array","string"].includes(Y)?[]:[new Ht(d,L,`projection expected, invalid type "${Y}" found`)]:[new Ht(d,L,`projection expected, invalid array ${JSON.stringify(L)} found`)]},string:Ss,formatted:function(D){return Ss(D).length===0?[]:Wo(D)},resolvedImage:function(D){return Ss(D).length===0?[]:Wo(D)},padding:function(D){let d=D.key,L=D.value;if(zo(L)==="array"){if(L.length<1||L.length>4)return[new Ht(d,L,`padding requires 1 to 4 values; ${L.length} values found`)];let Y={type:"number"},te=[];for(let ue=0;ue[]}})),D.constants&&(L=L.concat(Zi({key:"constants",value:D.constants}))),Ql(L)}function Jl(D){return function(d){return D(Object.assign({},d,{validateSpec:Oc}))}}function Ql(D){return[].concat(D).sort((d,L)=>d.line-L.line)}function xu(D){return function(...d){return Ql(D.apply(this,d))}}hu.source=xu(Jl(Dl)),hu.sprite=xu(Jl(Al)),hu.glyphs=xu(Jl(Zu)),hu.light=xu(Jl(Nl)),hu.sky=xu(Jl(Kl)),hu.terrain=xu(Jl(Fu)),hu.state=xu(Jl(bu)),hu.layer=xu(Jl(Xo)),hu.filter=xu(Jl(Bo)),hu.paintProperty=xu(Jl(ps)),hu.layoutProperty=xu(Jl(vi));let rf={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class Ff{constructor(d,L){this._globalState=L,this.setValue(d)}evaluate(){var d;return(d=this._literalValue)!==null&&d!==void 0?d:this._compiledValue.evaluate({})}setValue(d){if(d==null||d==="visible"||d==="none")return this._literalValue=d==="none"?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let L=_c(d,rf,this._globalState);if(L.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,new Error(L.value.map(Y=>`${Y.key}: ${Y.message}`).join(", "));this._literalValue=void 0,this._compiledValue=L.value,this._globalStateRefs=wr(L.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let xc=ht,rl=hu,Ol=rl.light,Bu=rl.sky,af=rl.paintProperty,jc=rl.layoutProperty;function wu(D,d){let L=!1;if(d?.length)for(let Y of d)D.fire(new Ot(new Error(Y.message))),L=!0;return L}class jl{constructor(d,L,Y){let te=this.cells=[];if(d instanceof ArrayBuffer){this.arrayBuffer=d;let pe=new Int32Array(this.arrayBuffer);d=pe[0],this.d=(L=pe[1])+2*(Y=pe[2]);for(let Ce=0;Ce=Pe[Ve+0]&&te>=Pe[Ve+1])?(me[at]=!0,pe.push(ze[at])):me[at]=!1}}}_forEachCell(d,L,Y,te,ue,pe,me,Ce){let we=this._convertToCellCoord(d),ze=this._convertToCellCoord(L),Pe=this._convertToCellCoord(Y),at=this._convertToCellCoord(te);for(let Ve=we;Ve<=Pe;Ve++)for(let bt=ze;bt<=at;bt++){let Et=this.d*bt+Ve;if((!Ce||Ce(this._convertFromCellCoord(Ve),this._convertFromCellCoord(bt),this._convertFromCellCoord(Ve+1),this._convertFromCellCoord(bt+1)))&&ue.call(this,d,L,Y,te,Et,pe,me,Ce))return}}_convertFromCellCoord(d){return(d-this.padding)/this.scale}_convertToCellCoord(d){return Math.max(0,Math.min(this.d-1,Math.floor(d*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let d=this.cells,L=3+this.cells.length+1+1,Y=0;for(let pe of this.cells)Y+=pe.length;let te=new Int32Array(L+Y+this.keys.length+this.bboxes.length);te[0]=this.extent,te[1]=this.n,te[2]=this.padding;let ue=L;for(let pe=0;peY?(this.lastIntegerZoom=Y+1,this.lastIntegerZoomTime=L):this.lastFloorZoom{try{return new RegExp(`\\p{sc=${L}}`,"u").source}catch{return null}}).filter(L=>L);return new RegExp(d.join("|"),"u")}let oa=Wr(["Arab","Dupl","Mong","Ougr","Syrc"]);function ma(D){return!oa.test(String.fromCodePoint(D))}function ka(D){return!(Yt(D)||(d=D,/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(d))));var d}let $a=Wr(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function yn(D){return $a.test(String.fromCodePoint(D))}function Nn(D,d){return!(!d&&yn(D)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(D)))}function wi(D){for(let d of D)if(yn(d.codePointAt(0)))return!0;return!1}let Yi=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(D){this.pluginStatus=D.pluginStatus,this.pluginURL=D.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(D){if(Yi.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=D.applyArabicShaping,this.processBidirectionalText=D.processBidirectionalText,this.processStyledBidirectionalText=D.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(D,d){return e(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(D.pluginStatus!=="loading")return this.setState(D),D;let L=D.pluginURL,Y=new Promise(ue=>{this.loadScriptResolve=ue});d(L);let te=new Promise(ue=>setTimeout(()=>ue(),this.TIMEOUT));if(yield Promise.race([Y,te]),this.isParsed()){let ue={pluginStatus:"loaded",pluginURL:L};return this.setState(ue),ue}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${L}`)})}};class Ti{constructor(d,L){this.isSupportedScript=_o,this.zoom=d,L?(this.now=L.now||0,this.fadeDuration=L.fadeDuration||0,this.zoomHistory=L.zoomHistory||new Nt,this.transition=L.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Nt,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let d=this.zoom,L=d-Math.floor(d),Y=this.crossFadingFactor();return d>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:L+(1-L)*Y}:{fromScale:.5,toScale:1,t:1-(1-Y)*L}}}function _o(D){return function(d,L){for(let Y of d)if(!Nn(Y.codePointAt(0),L))return!1;return!0}(D,Yi.getRTLTextPluginStatus()==="loaded")}let bo="-transition";class Zo{constructor(d,L,Y){this.property=d,this.value=L,this.expression=function(te,ue,pe){if(gc(te))return new rr(te,ue);if(yc(te)){let me=zt(te,ue,pe);if(me.result==="error")throw new Error(me.value.map(Ce=>`${Ce.key}: ${Ce.message}`).join(", "));return me.value}{let me=te;return ue.type==="color"&&typeof te=="string"?me=gn.parse(te):ue.type!=="padding"||typeof te!="number"&&!Array.isArray(te)?ue.type!=="numberArray"||typeof te!="number"&&!Array.isArray(te)?ue.type!=="colorArray"||typeof te!="string"&&!Array.isArray(te)?ue.type==="variableAnchorOffsetCollection"&&Array.isArray(te)?me=zi.parse(te):ue.type==="projectionDefinition"&&typeof te=="string"&&(me=Mo.parse(te)):me=ti.parse(te):me=Gi.parse(te):me=Sn.parse(te),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>me}}}(L===void 0?d.specification.default:L,d.specification,Y)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(d,L,Y){return this.property.possiblyEvaluate(this,d,L,Y)}}class fs{constructor(d,L){this.property=d,this.value=new Zo(d,void 0,L)}transitioned(d,L){return new Es(this.property,this.value,L,$({},d.transition,this.transition),d.now)}untransitioned(){return new Es(this.property,this.value,null,{},0)}}class Po{constructor(d,L){this._properties=d,this._values=Object.create(d.defaultTransitionablePropertyValues),this._globalState=L}hasProperty(d){return d in this._properties.defaultTransitionablePropertyValues}getValue(d){return q(this._values[d].value.value)}setValue(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new fs(this._values[d].property,this._globalState)),this._values[d].value=new Zo(this._values[d].property,L===null?void 0:q(L),this._globalState)}getTransition(d){return q(this._values[d].transition)}setTransition(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new fs(this._values[d].property,this._globalState)),this._values[d].transition=q(L)||void 0}serialize(){let d={};for(let L of Object.keys(this._values)){let Y=this.getValue(L);Y!==void 0&&(d[L]=Y);let te=this.getTransition(L);te!==void 0&&(d[`${L}${bo}`]=te)}return d}transitioned(d,L){let Y=new cl(this._properties);for(let te of Object.keys(this._values))Y._values[te]=this._values[te].transitioned(d,L._values[te]);return Y}untransitioned(){let d=new cl(this._properties);for(let L of Object.keys(this._values))d._values[L]=this._values[L].untransitioned();return d}}class Es{constructor(d,L,Y,te,ue){this.property=d,this.value=L,this.begin=ue+te.delay||0,this.end=this.begin+te.duration||0,d.specification.transition&&(te.delay||te.duration)&&(this.prior=Y)}possiblyEvaluate(d,L,Y){let te=d.now||0,ue=this.value.possiblyEvaluate(d,L,Y),pe=this.prior;if(pe){if(te>this.end)return this.prior=null,ue;if(this.value.isDataDriven())return this.prior=null,ue;if(tete.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:Y,to:L}}interpolate(d){return d}}class Ku{constructor(d){this.specification=d}possiblyEvaluate(d,L,Y,te){if(d.value!==void 0){if(d.expression.kind==="constant"){let ue=d.expression.evaluate(L,null,{},Y,te);return this._calculate(ue,ue,ue,L)}return this._calculate(d.expression.evaluate(new Ti(Math.floor(L.zoom-1),L)),d.expression.evaluate(new Ti(Math.floor(L.zoom),L)),d.expression.evaluate(new Ti(Math.floor(L.zoom+1),L)),L)}}_calculate(d,L,Y,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:Y,to:L}}interpolate(d){return d}}class tu{constructor(d){this.specification=d}possiblyEvaluate(d,L,Y,te){return!!d.expression.evaluate(L,null,{},Y,te)}interpolate(){return!1}}class Bs{constructor(d){this.properties=d,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let L in d){let Y=d[L];Y.specification.overridable&&this.overridableProperties.push(L);let te=this.defaultPropertyValues[L]=new Zo(Y,void 0,void 0),ue=this.defaultTransitionablePropertyValues[L]=new fs(Y,void 0);this.defaultTransitioningPropertyValues[L]=ue.untransitioned(),this.defaultPossiblyEvaluatedValues[L]=te.possiblyEvaluate({})}}}Ci("DataDrivenProperty",Vi),Ci("DataConstantProperty",Li),Ci("CrossFadedDataDrivenProperty",fl),Ci("CrossFadedProperty",Ku),Ci("ColorRampProperty",tu);let oc=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",du=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class hl extends vt{constructor(d,L,Y){if(super(),this.id=d.id,this.type=d.type,this._globalState=Y,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=function(te,ue){return new Ff(te,ue)}(this.visibility,Y),d.type!=="custom"&&(this.metadata=d.metadata,this.minzoom=d.minzoom,this.maxzoom=d.maxzoom,d.type!=="background"&&(this.source=d.source,this.sourceLayer=d["source-layer"],this.filter=d.filter,this._featureFilter=Ka(d.filter,Y)),L.layout&&(this._unevaluatedLayout=new ql(L.layout,Y)),L.paint)){this._transitionablePaint=new Po(L.paint,Y);for(let te in d.paint)this.setPaintProperty(te,d.paint[te],{validate:!1});for(let te in d.layout)this.setLayoutProperty(te,d.layout[te],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Tu(L.paint)}}setFilter(d){this.filter=d,this._featureFilter=Ka(d,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(d){var L;if(d==="visibility")return this.visibility;if(!((L=this._transitionablePaint)===null||L===void 0)&&L.hasProperty(d))throw new Error(d+oc);if(!this._unevaluatedLayout)throw new Error(`Cannot get layout property "${d}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(d)}getLayoutAffectingGlobalStateRefs(){let d=new Set;for(let L of this._visibilityExpression.getGlobalStateRefs())d.add(L);if(this._unevaluatedLayout)for(let L in this._unevaluatedLayout._values){let Y=this._unevaluatedLayout._values[L];for(let te of Y.getGlobalStateRefs())d.add(te)}for(let L of this._featureFilter.getGlobalStateRefs())d.add(L);return d}getPaintAffectingGlobalStateRefs(){var d;let L=new globalThis.Map;if(this._transitionablePaint)for(let Y in this._transitionablePaint._values){let te=this._transitionablePaint._values[Y].value;for(let ue of te.getGlobalStateRefs()){let pe=(d=L.get(ue))!==null&&d!==void 0?d:[];pe.push({name:Y,value:te.value}),L.set(ue,pe)}}return L}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(d,L,Y={}){var te;if(d==="visibility")return this.visibility=L,this._visibilityExpression.setValue(L),void this.recalculateVisibility();!((te=this._transitionablePaint)===null||te===void 0)&&te.hasProperty(d)?this.fire(new Ot(new Error(d+oc))):L!=null&&this._validate(jc,`layers.${this.id}.layout.${d}`,d,L,Y)||this._unevaluatedLayout.setValue(d,L)}getPaintProperty(d){var L,Y;if(d.endsWith(bo)){let te=d.slice(0,-11);if(te==="visibility"||!((L=this._unevaluatedLayout)===null||L===void 0)&&L.hasProperty(te))throw new Error(d+du);return this._transitionablePaint.getTransition(te)}if(d==="visibility"||!((Y=this._unevaluatedLayout)===null||Y===void 0)&&Y.hasProperty(d))throw new Error(d+du);return this._transitionablePaint.getValue(d)}setPaintProperty(d,L,Y={}){var te;if(d==="visibility"||!((te=this._unevaluatedLayout)===null||te===void 0)&&te.hasProperty(d))return this.fire(new Ot(new Error(d+du))),!1;if(L!=null&&this._validate(af,`layers.${this.id}.paint.${d}`,d,L,Y))return!1;if(d.endsWith(bo))return this._transitionablePaint.setTransition(d.slice(0,-11),L||void 0),!1;{let ue=this._transitionablePaint._values[d],pe=ue.property.specification["property-type"]==="cross-faded-data-driven",me=ue.value.isDataDriven(),Ce=ue.value;this._transitionablePaint.setValue(d,L),this._handleSpecialPaintPropertyUpdate(d);let we=this._transitionablePaint._values[d].value;return we.isDataDriven()||me||pe||this._handleOverridablePaintPropertyUpdate(d,Ce,we)}}_handleSpecialPaintPropertyUpdate(d){}_handleOverridablePaintPropertyUpdate(d,L,Y){return!1}isHidden(d=this.minzoom,L=!1){return!!(this.minzoom&&d<(L?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&d>=this.maxzoom)||this._evaluatedVisibility==="none"}updateTransitions(d){this._transitioningPaint=this._transitionablePaint.transitioned(d,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(d,L){d.getCrossfadeParameters&&(this._crossfadeParameters=d.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(d,void 0,L)),this.paint=this._transitioningPaint.possiblyEvaluate(d,void 0,L)}serialize(){var d,L;let Y={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:(d=this._unevaluatedLayout)===null||d===void 0?void 0:d.serialize(),paint:(L=this._transitionablePaint)===null||L===void 0?void 0:L.serialize()};return this.visibility&&(Y.layout||(Y.layout={}),Y.layout.visibility=this.visibility),X(Y,(te,ue)=>!(te===void 0||ue==="layout"&&!Object.keys(te).length||ue==="paint"&&!Object.keys(te).length))}_validate(d,L,Y,te,ue={}){return ue?.validate!==!1&&wu(this,d.call(rl,{key:L,layerType:this.type,objectKey:Y,value:te,styleSpec:ht,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let d in this.paint._values){let L=this.paint.get(d);if(L instanceof Js&&$u(L.property.specification)&&(L.value.kind==="source"||L.value.kind==="composite")&&L.value.isStateDependent)return!0}return!1}}let Uc;var he={get paint(){return Uc=Uc||new Bs({"raster-opacity":new Li(ht.paint_raster["raster-opacity"]),"raster-hue-rotate":new Li(ht.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Li(ht.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Li(ht.paint_raster["raster-brightness-max"]),"raster-saturation":new Li(ht.paint_raster["raster-saturation"]),"raster-contrast":new Li(ht.paint_raster["raster-contrast"]),resampling:new Li(ht.paint_raster.resampling),"raster-resampling":new Li(ht.paint_raster["raster-resampling"]),"raster-fade-duration":new Li(ht.paint_raster["raster-fade-duration"])})}};class Se extends hl{constructor(d,L){super(d,he,L)}}let Ue={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Qe{constructor(d,L){this._structArray=d,this._pos1=L*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class tt{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(d,L){return d._trim(),L&&(d.isTransferred=!0,L.push(d.arrayBuffer)),{length:d.length,arrayBuffer:d.arrayBuffer}}static deserialize(d){let L=Object.create(this.prototype);return L.arrayBuffer=d.arrayBuffer,L.length=d.length,L.capacity=d.arrayBuffer.byteLength/L.bytesPerElement,L._refreshViews(),L}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(d){this.reserve(d),this.length=d}reserve(d){if(d>this.capacity){this.capacity=Math.max(d,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let L=this.uint8;this._refreshViews(),L&&this.uint8.set(L)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function ut(D,d=1){let L=0,Y=0;return{members:D.map(te=>{let ue=Ue[te.type].BYTES_PER_ELEMENT,pe=L=jt(L,Math.max(d,ue)),me=te.components||1;return Y=Math.max(Y,ue),L+=ue*me,{name:te.name,type:te.type,components:me,offset:pe}}),size:jt(L,Math.max(Y,d)),alignment:d}}function jt(D,d){return Math.ceil(D/d)*d}class St extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L){let Y=this.length;return this.resize(Y+1),this.emplace(Y,d,L)}emplace(d,L,Y){let te=2*d;return this.int16[te+0]=L,this.int16[te+1]=Y,d}}St.prototype.bytesPerElement=4,Ci("StructArrayLayout2i4",St);class Qt extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,Y){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,Y)}emplace(d,L,Y,te){let ue=3*d;return this.int16[ue+0]=L,this.int16[ue+1]=Y,this.int16[ue+2]=te,d}}Qt.prototype.bytesPerElement=6,Ci("StructArrayLayout3i6",Qt);class gr extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,d,L,Y,te)}emplace(d,L,Y,te,ue){let pe=4*d;return this.int16[pe+0]=L,this.int16[pe+1]=Y,this.int16[pe+2]=te,this.int16[pe+3]=ue,d}}gr.prototype.bytesPerElement=8,Ci("StructArrayLayout4i8",gr);class yr extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ue,pe){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,Y,te,ue,pe)}emplace(d,L,Y,te,ue,pe,me){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=Y,this.int16[Ce+2]=te,this.int16[Ce+3]=ue,this.int16[Ce+4]=pe,this.int16[Ce+5]=me,d}}yr.prototype.bytesPerElement=12,Ci("StructArrayLayout2i4i12",yr);class Kr extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ue,pe){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,Y,te,ue,pe)}emplace(d,L,Y,te,ue,pe,me){let Ce=4*d,we=8*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=Y,this.uint8[we+4]=te,this.uint8[we+5]=ue,this.uint8[we+6]=pe,this.uint8[we+7]=me,d}}Kr.prototype.bytesPerElement=8,Ci("StructArrayLayout2i4ub8",Kr);class $r extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L){let Y=this.length;return this.resize(Y+1),this.emplace(Y,d,L)}emplace(d,L,Y){let te=2*d;return this.float32[te+0]=L,this.float32[te+1]=Y,d}}$r.prototype.bytesPerElement=8,Ci("StructArrayLayout2f8",$r);class _a extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ue,pe,me,Ce,we,ze){let Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,d,L,Y,te,ue,pe,me,Ce,we,ze)}emplace(d,L,Y,te,ue,pe,me,Ce,we,ze,Pe){let at=10*d;return this.uint16[at+0]=L,this.uint16[at+1]=Y,this.uint16[at+2]=te,this.uint16[at+3]=ue,this.uint16[at+4]=pe,this.uint16[at+5]=me,this.uint16[at+6]=Ce,this.uint16[at+7]=we,this.uint16[at+8]=ze,this.uint16[at+9]=Pe,d}}_a.prototype.bytesPerElement=20,Ci("StructArrayLayout10ui20",_a);class Ia extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ue,pe,me,Ce){let we=this.length;return this.resize(we+1),this.emplace(we,d,L,Y,te,ue,pe,me,Ce)}emplace(d,L,Y,te,ue,pe,me,Ce,we){let ze=8*d;return this.uint16[ze+0]=L,this.uint16[ze+1]=Y,this.uint16[ze+2]=te,this.uint16[ze+3]=ue,this.uint16[ze+4]=pe,this.uint16[ze+5]=me,this.uint16[ze+6]=Ce,this.uint16[ze+7]=we,d}}Ia.prototype.bytesPerElement=16,Ci("StructArrayLayout8ui16",Ia);class ra extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ue,pe,me,Ce,we,ze,Pe,at){let Ve=this.length;return this.resize(Ve+1),this.emplace(Ve,d,L,Y,te,ue,pe,me,Ce,we,ze,Pe,at)}emplace(d,L,Y,te,ue,pe,me,Ce,we,ze,Pe,at,Ve){let bt=12*d;return this.int16[bt+0]=L,this.int16[bt+1]=Y,this.int16[bt+2]=te,this.int16[bt+3]=ue,this.uint16[bt+4]=pe,this.uint16[bt+5]=me,this.uint16[bt+6]=Ce,this.uint16[bt+7]=we,this.int16[bt+8]=ze,this.int16[bt+9]=Pe,this.int16[bt+10]=at,this.int16[bt+11]=Ve,d}}ra.prototype.bytesPerElement=24,Ci("StructArrayLayout4i4ui4i24",ra);class va extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,Y){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,Y)}emplace(d,L,Y,te){let ue=3*d;return this.float32[ue+0]=L,this.float32[ue+1]=Y,this.float32[ue+2]=te,d}}va.prototype.bytesPerElement=12,Ci("StructArrayLayout3f12",va);class ba extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint32[1*d+0]=L,d}}ba.prototype.bytesPerElement=4,Ci("StructArrayLayout1ul4",ba);class za extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ue,pe,me,Ce,we){let ze=this.length;return this.resize(ze+1),this.emplace(ze,d,L,Y,te,ue,pe,me,Ce,we)}emplace(d,L,Y,te,ue,pe,me,Ce,we,ze){let Pe=10*d,at=5*d;return this.int16[Pe+0]=L,this.int16[Pe+1]=Y,this.int16[Pe+2]=te,this.int16[Pe+3]=ue,this.int16[Pe+4]=pe,this.int16[Pe+5]=me,this.uint32[at+3]=Ce,this.uint16[Pe+8]=we,this.uint16[Pe+9]=ze,d}}za.prototype.bytesPerElement=20,Ci("StructArrayLayout6i1ul2ui20",za);class Ra extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ue,pe){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,Y,te,ue,pe)}emplace(d,L,Y,te,ue,pe,me){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=Y,this.int16[Ce+2]=te,this.int16[Ce+3]=ue,this.int16[Ce+4]=pe,this.int16[Ce+5]=me,d}}Ra.prototype.bytesPerElement=12,Ci("StructArrayLayout2i2i2i12",Ra);class pa extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ue){let pe=this.length;return this.resize(pe+1),this.emplace(pe,d,L,Y,te,ue)}emplace(d,L,Y,te,ue,pe){let me=4*d,Ce=8*d;return this.float32[me+0]=L,this.float32[me+1]=Y,this.float32[me+2]=te,this.int16[Ce+6]=ue,this.int16[Ce+7]=pe,d}}pa.prototype.bytesPerElement=16,Ci("StructArrayLayout2f1f2i16",pa);class En extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ue,pe){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,Y,te,ue,pe)}emplace(d,L,Y,te,ue,pe,me){let Ce=16*d,we=4*d,ze=8*d;return this.uint8[Ce+0]=L,this.uint8[Ce+1]=Y,this.float32[we+1]=te,this.float32[we+2]=ue,this.int16[ze+6]=pe,this.int16[ze+7]=me,d}}En.prototype.bytesPerElement=16,Ci("StructArrayLayout2ub2f2i16",En);class On extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,Y){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,Y)}emplace(d,L,Y,te){let ue=3*d;return this.uint16[ue+0]=L,this.uint16[ue+1]=Y,this.uint16[ue+2]=te,d}}On.prototype.bytesPerElement=6,Ci("StructArrayLayout3ui6",On);class Kn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ue,pe,me,Ce,we,ze,Pe,at,Ve,bt,Et,er,tr){let xr=this.length;return this.resize(xr+1),this.emplace(xr,d,L,Y,te,ue,pe,me,Ce,we,ze,Pe,at,Ve,bt,Et,er,tr)}emplace(d,L,Y,te,ue,pe,me,Ce,we,ze,Pe,at,Ve,bt,Et,er,tr,xr){let lr=24*d,Mr=12*d,Xr=48*d;return this.int16[lr+0]=L,this.int16[lr+1]=Y,this.uint16[lr+2]=te,this.uint16[lr+3]=ue,this.uint32[Mr+2]=pe,this.uint32[Mr+3]=me,this.uint32[Mr+4]=Ce,this.uint16[lr+10]=we,this.uint16[lr+11]=ze,this.uint16[lr+12]=Pe,this.float32[Mr+7]=at,this.float32[Mr+8]=Ve,this.uint8[Xr+36]=bt,this.uint8[Xr+37]=Et,this.uint8[Xr+38]=er,this.uint32[Mr+10]=tr,this.int16[lr+22]=xr,d}}Kn.prototype.bytesPerElement=48,Ci("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Kn);class di extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ue,pe,me,Ce,we,ze,Pe,at,Ve,bt,Et,er,tr,xr,lr,Mr,Xr,na,Ea,Na,_n,en,Bn,Zn){let Dn=this.length;return this.resize(Dn+1),this.emplace(Dn,d,L,Y,te,ue,pe,me,Ce,we,ze,Pe,at,Ve,bt,Et,er,tr,xr,lr,Mr,Xr,na,Ea,Na,_n,en,Bn,Zn)}emplace(d,L,Y,te,ue,pe,me,Ce,we,ze,Pe,at,Ve,bt,Et,er,tr,xr,lr,Mr,Xr,na,Ea,Na,_n,en,Bn,Zn,Dn){let rn=32*d,li=16*d;return this.int16[rn+0]=L,this.int16[rn+1]=Y,this.int16[rn+2]=te,this.int16[rn+3]=ue,this.int16[rn+4]=pe,this.int16[rn+5]=me,this.int16[rn+6]=Ce,this.int16[rn+7]=we,this.uint16[rn+8]=ze,this.uint16[rn+9]=Pe,this.uint16[rn+10]=at,this.uint16[rn+11]=Ve,this.uint16[rn+12]=bt,this.uint16[rn+13]=Et,this.uint16[rn+14]=er,this.uint16[rn+15]=tr,this.uint16[rn+16]=xr,this.uint16[rn+17]=lr,this.uint16[rn+18]=Mr,this.uint16[rn+19]=Xr,this.uint16[rn+20]=na,this.uint16[rn+21]=Ea,this.uint16[rn+22]=Na,this.uint32[li+12]=_n,this.float32[li+13]=en,this.float32[li+14]=Bn,this.uint16[rn+30]=Zn,this.uint16[rn+31]=Dn,d}}di.prototype.bytesPerElement=64,Ci("StructArrayLayout8i15ui1ul2f2ui64",di);class Oi extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.float32[1*d+0]=L,d}}Oi.prototype.bytesPerElement=4,Ci("StructArrayLayout1f4",Oi);class Pi extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,Y){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,Y)}emplace(d,L,Y,te){let ue=3*d;return this.uint16[6*d+0]=L,this.float32[ue+1]=Y,this.float32[ue+2]=te,d}}Pi.prototype.bytesPerElement=12,Ci("StructArrayLayout1ui2f12",Pi);class ko extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,Y){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,Y)}emplace(d,L,Y,te){let ue=4*d;return this.uint32[2*d+0]=L,this.uint16[ue+2]=Y,this.uint16[ue+3]=te,d}}ko.prototype.bytesPerElement=8,Ci("StructArrayLayout1ul2ui8",ko);class de extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L){let Y=this.length;return this.resize(Y+1),this.emplace(Y,d,L)}emplace(d,L,Y){let te=2*d;return this.uint16[te+0]=L,this.uint16[te+1]=Y,d}}de.prototype.bytesPerElement=4,Ci("StructArrayLayout2ui4",de);class y extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint16[1*d+0]=L,d}}y.prototype.bytesPerElement=2,Ci("StructArrayLayout1ui2",y);class O extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,Y,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,d,L,Y,te)}emplace(d,L,Y,te,ue){let pe=4*d;return this.float32[pe+0]=L,this.float32[pe+1]=Y,this.float32[pe+2]=te,this.float32[pe+3]=ue,d}}O.prototype.bytesPerElement=16,Ci("StructArrayLayout4f16",O);class ie extends Qe{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new t(this.anchorPointX,this.anchorPointY)}}ie.prototype.size=20;class ce extends za{get(d){return new ie(this,d)}}Ci("CollisionBoxArray",ce);class _e extends Qe{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(d){this._structArray.uint8[this._pos1+37]=d}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(d){this._structArray.uint8[this._pos1+38]=d}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(d){this._structArray.uint32[this._pos4+10]=d}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}_e.prototype.size=48;class De extends Kn{get(d){return new _e(this,d)}}Ci("PlacedSymbolArray",De);class Ne extends Qe{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(d){this._structArray.uint32[this._pos4+12]=d}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Ne.prototype.size=64;class Ye extends di{get(d){return new Ne(this,d)}}Ci("SymbolInstanceArray",Ye);class lt extends Oi{getoffsetX(d){return this.float32[1*d+0]}}Ci("GlyphOffsetArray",lt);class ct extends Qt{getx(d){return this.int16[3*d+0]}gety(d){return this.int16[3*d+1]}gettileUnitDistanceFromAnchor(d){return this.int16[3*d+2]}}Ci("SymbolLineVertexArray",ct);class Ft extends Qe{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]}}Ft.prototype.size=12;class Gt extends Pi{get(d){return new Ft(this,d)}}Ci("TextAnchorOffsetArray",Gt);class Jt extends Qe{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]}}Jt.prototype.size=8;class it extends ko{get(d){return new Jt(this,d)}}Ci("FeatureIndexArray",it);class Rt extends St{}class qt extends St{}class or extends St{}class vr extends yr{}class Ar extends Kr{}class dr extends $r{}class mr extends _a{}class qr extends Ia{}class Lr extends ra{}class ua extends va{}class Ba extends ba{}class Pa extends Ra{}class Ua extends En{}class ya extends On{}class da extends de{}let Ma=ut([{name:"a_pos",components:2,type:"Int16"}],4),{members:wa}=Ma;class Ya{constructor(d=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=d}prepareSegment(d,L,Y,te){let ue=this.segments[this.segments.length-1];return d>Ya.MAX_VERTEX_ARRAY_LENGTH&&ee(`Max vertices per segment is ${Ya.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${d}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Ya.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!ue||ue.vertexLength+d>Ya.MAX_VERTEX_ARRAY_LENGTH||ue.sortKey!==te?this.createNewSegment(L,Y,te):ue}createNewSegment(d,L,Y){let te={vertexOffset:d.length,primitiveOffset:L.length,vertexLength:0,primitiveLength:0,vaos:{}};return Y!==void 0&&(te.sortKey=Y),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(te),te}getOrCreateLatestSegment(d,L,Y){return this.prepareSegment(0,d,L,Y)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let d of this.segments)for(let L in d.vaos)d.vaos[L].destroy()}static simpleSegment(d,L,Y,te){return new Ya([{vertexOffset:d,primitiveOffset:L,vertexLength:Y,primitiveLength:te,vaos:{},sortKey:0}])}}function Xa(D,d){return 256*(D=oe(Math.floor(D),0,255))+oe(Math.floor(d),0,255)}Ya.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ci("SegmentVector",Ya);let Hn=ut([{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"}]),$n=ut([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var Si,Mn,xn,gi={exports:{}},Wn={exports:{}},Yn={exports:{}},Xn=function(){if(xn)return gi.exports;xn=1;var D=(Si||(Si=1,Wn.exports=function(L,Y){var te,ue,pe,me,Ce,we,ze,Pe;for(ue=L.length-(te=3&L.length),pe=Y,Ce=3432918353,we=461845907,Pe=0;Pe>>16)*Ce&65535)<<16)&4294967295)<<15|ze>>>17))*we+(((ze>>>16)*we&65535)<<16)&4294967295)<<13|pe>>>19))+((5*(pe>>>16)&65535)<<16)&4294967295))+((58964+(me>>>16)&65535)<<16);switch(ze=0,te){case 3:ze^=(255&L.charCodeAt(Pe+2))<<16;case 2:ze^=(255&L.charCodeAt(Pe+1))<<8;case 1:pe^=ze=(65535&(ze=(ze=(65535&(ze^=255&L.charCodeAt(Pe)))*Ce+(((ze>>>16)*Ce&65535)<<16)&4294967295)<<15|ze>>>17))*we+(((ze>>>16)*we&65535)<<16)&4294967295}return pe^=L.length,pe=2246822507*(65535&(pe^=pe>>>16))+((2246822507*(pe>>>16)&65535)<<16)&4294967295,pe=3266489909*(65535&(pe^=pe>>>13))+((3266489909*(pe>>>16)&65535)<<16)&4294967295,(pe^=pe>>>16)>>>0}),Wn.exports),d=(Mn||(Mn=1,Yn.exports=function(L,Y){for(var te,ue=L.length,pe=Y^ue,me=0;ue>=4;)te=1540483477*(65535&(te=255&L.charCodeAt(me)|(255&L.charCodeAt(++me))<<8|(255&L.charCodeAt(++me))<<16|(255&L.charCodeAt(++me))<<24))+((1540483477*(te>>>16)&65535)<<16),pe=1540483477*(65535&pe)+((1540483477*(pe>>>16)&65535)<<16)^(te=1540483477*(65535&(te^=te>>>24))+((1540483477*(te>>>16)&65535)<<16)),ue-=4,++me;switch(ue){case 3:pe^=(255&L.charCodeAt(me+2))<<16;case 2:pe^=(255&L.charCodeAt(me+1))<<8;case 1:pe=1540483477*(65535&(pe^=255&L.charCodeAt(me)))+((1540483477*(pe>>>16)&65535)<<16)}return pe=1540483477*(65535&(pe^=pe>>>13))+((1540483477*(pe>>>16)&65535)<<16),(pe^=pe>>>15)>>>0}),Yn.exports);return gi.exports=D,gi.exports.murmur3=D,gi.exports.murmur2=d,gi.exports}(),pi=n(Xn);class Xi{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(d,L,Y,te){this.ids.push(Eo(d)),this.positions.push(L,Y,te)}getPositions(d){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let L=Eo(d),Y=0,te=this.ids.length-1;for(;Y>1;this.ids[pe]>=L?te=pe:Y=pe+1}let ue=[];for(;this.ids[Y]===L;)ue.push({index:this.positions[3*Y],start:this.positions[3*Y+1],end:this.positions[3*Y+2]}),Y++;return ue}static serialize(d,L){let Y=new Float64Array(d.ids),te=new Uint32Array(d.positions);return yi(Y,te,0,Y.length-1),L&&L.push(Y.buffer,te.buffer),{ids:Y,positions:te}}static deserialize(d){let L=new Xi;return L.ids=d.ids,L.positions=d.positions,L.indexed=!0,L}}function Eo(D){let d=+D;return!isNaN(d)&&d<=Number.MAX_SAFE_INTEGER?d:pi(String(D))}function yi(D,d,L,Y){for(;L>1],ue=L-1,pe=Y+1;for(;;){do ue++;while(D[ue]te);if(ue>=pe)break;Ui(D,ue,pe),Ui(d,3*ue,3*pe),Ui(d,3*ue+1,3*pe+1),Ui(d,3*ue+2,3*pe+2)}pe-L`u_${te}`),this.type=Y}setUniform(d,L,Y){d.set(Y.constantOr(this.value))}getBinding(d,L,Y){return this.type==="color"?new qs(d,L):new To(d,L)}}class os{constructor(d,L){this.uniformNames=L.map(Y=>`u_${Y}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(d,L){this.pixelRatioFrom=L.pixelRatio,this.pixelRatioTo=d.pixelRatio,this.patternFrom=L.tlbr,this.patternTo=d.tlbr}setConstantDashPositions(d,L){this.dashTo=[0,d.y,d.height,d.width],this.dashFrom=[0,L.y,L.height,L.width]}setUniform(d,L,Y,te){let ue=null;te==="u_pattern_to"?ue=this.patternTo:te==="u_pattern_from"?ue=this.patternFrom:te==="u_dasharray_to"?ue=this.dashTo:te==="u_dasharray_from"?ue=this.dashFrom:te==="u_pixel_ratio_to"?ue=this.pixelRatioTo:te==="u_pixel_ratio_from"&&(ue=this.pixelRatioFrom),ue!==null&&d.set(ue)}getBinding(d,L,Y){return Y.startsWith("u_pattern")||Y.startsWith("u_dasharray_")?new jo(d,L):new To(d,L)}}class hs{constructor(d,L,Y,te){this.expression=d,this.type=Y,this.maxValue=0,this.paintVertexAttributes=L.map(ue=>({name:`a_${ue}`,type:"Float32",components:Y==="color"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(d,L,Y){let te=this.paintVertexArray.length,ue=this.expression.evaluate(new Ti(0,Y),L,{},Y.canonical,[],Y.formattedSection);this.paintVertexArray.resize(d),this._setPaintValue(te,d,ue)}updatePaintArray(d,L,Y,te,ue){let pe=this.expression.evaluate(new Ti(0,ue),Y,te);this._setPaintValue(d,L,pe)}_setPaintValue(d,L,Y){if(this.type==="color"){let te=Uo(Y);for(let ue=d;ue`u_${me}_t`),this.type=Y,this.useIntegerZoom=te,this.zoom=ue,this.maxValue=0,this.paintVertexAttributes=L.map(me=>({name:`a_${me}`,type:"Float32",components:Y==="color"?4:2,offset:0})),this.paintVertexArray=new pe}populatePaintArray(d,L,Y){let te=this.expression.evaluate(new Ti(this.zoom,Y),L,{},Y.canonical,[],Y.formattedSection),ue=this.expression.evaluate(new Ti(this.zoom+1,Y),L,{},Y.canonical,[],Y.formattedSection),pe=this.paintVertexArray.length;this.paintVertexArray.resize(d),this._setPaintValue(pe,d,te,ue)}updatePaintArray(d,L,Y,te,ue){let pe=this.expression.evaluate(new Ti(this.zoom,ue),Y,te),me=this.expression.evaluate(new Ti(this.zoom+1,ue),Y,te);this._setPaintValue(d,L,pe,me)}_setPaintValue(d,L,Y,te){if(this.type==="color"){let ue=Uo(Y),pe=Uo(te);for(let me=d;me`#define HAS_UNIFORM_${te}`))}return d}getBinderAttributes(){let d=[];for(let L in this.binders){let Y=this.binders[L];if(Y instanceof hs||Y instanceof ss)for(let te of Y.paintVertexAttributes)d.push(te.name);else if(Y instanceof ks){let te=Y.getVertexAttributes();for(let ue of te)d.push(ue.name)}}return d}getBinderUniforms(){let d=[];for(let L in this.binders){let Y=this.binders[L];if(Y instanceof Qs||Y instanceof os||Y instanceof ss)for(let te of Y.uniformNames)d.push(te)}return d}getPaintVertexBuffers(){return this._buffers}getUniforms(d,L){let Y=[];for(let te in this.binders){let ue=this.binders[te];if(ue instanceof Qs||ue instanceof os||ue instanceof ss){for(let pe of ue.uniformNames)if(L[pe]){let me=ue.getBinding(d,L[pe],pe);Y.push({name:pe,property:te,binding:me})}}}return Y}setUniforms(d,L,Y,te){for(let{name:ue,property:pe,binding:me}of L)this.binders[pe].setUniform(me,te,Y.get(pe),ue)}updatePaintBuffers(d){this._buffers=[];for(let L in this.binders){let Y=this.binders[L];if(d&&Y instanceof ks){let te=d.fromScale===2?Y.zoomInPaintVertexBuffer:Y.zoomOutPaintVertexBuffer;te&&this._buffers.push(te)}else(Y instanceof hs||Y instanceof ss)&&Y.paintVertexBuffer&&this._buffers.push(Y.paintVertexBuffer)}}upload(d){for(let L in this.binders){let Y=this.binders[L];(Y instanceof hs||Y instanceof ss||Y instanceof ks)&&Y.upload(d)}this.updatePaintBuffers()}destroy(){for(let d in this.binders){let L=this.binders[d];(L instanceof hs||L instanceof ss||L instanceof ks)&&L.destroy()}}}class Do{constructor(d,L,Y=()=>!0){this.programConfigurations={};for(let te of d)this.programConfigurations[te.id]=new Il(te,L,Y);this.needsUpload=!1,this._featureMap=new Xi,this._bufferOffset=0}populatePaintArrays(d,L,Y,te){for(let ue in this.programConfigurations)this.programConfigurations[ue].populatePaintArrays(d,L,te);L.id!==void 0&&this._featureMap.add(L.id,Y,this._bufferOffset,d),this._bufferOffset=d,this.needsUpload=!0}updatePaintArrays(d,L,Y,te){for(let ue of Y)this.needsUpload=this.programConfigurations[ue.id].updatePaintArrays(d,this._featureMap,L,ue,te)||this.needsUpload}get(d){return this.programConfigurations[d]}upload(d){if(this.needsUpload){for(let L in this.programConfigurations)this.programConfigurations[L].upload(d);this.needsUpload=!1}}destroy(){for(let d in this.programConfigurations)this.programConfigurations[d].destroy()}}function ru(D,d){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[D]||[D.replace(`${d}-`,"").replace(/-/g,"_")]}function Ns(D,d,L){let Y={color:{source:$r,composite:O},number:{source:Oi,composite:$r}},te=function(ue){return{"line-pattern":{source:mr,composite:mr},"fill-pattern":{source:mr,composite:mr},"fill-extrusion-pattern":{source:mr,composite:mr},"line-dasharray":{source:qr,composite:qr}}[ue]}(D);return te?.[L]||Y[d][L]}Ci("ConstantBinder",Qs),Ci("CrossFadedConstantBinder",os),Ci("SourceExpressionBinder",hs),Ci("CrossFadedPatternBinder",ts),Ci("CrossFadedDasharrayBinder",el),Ci("CompositeExpressionBinder",ss),Ci("ProgramConfiguration",Il,{omit:["_buffers"]}),Ci("ProgramConfigurationSet",Do);let Nu=Math.pow(2,14)-1,Vl=-Nu-1;function Hl(D){let d=F/D.extent,L=D.loadGeometry();for(let Y of L)for(let te of Y){let ue=Math.round(te.x*d),pe=Math.round(te.y*d);te.x=oe(ue,Vl,Nu),te.y=oe(pe,Vl,Nu),(uete.x+1||pete.y+1)&&ee("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return L}function Co(D,d){return{type:D.type,id:D.id,properties:D.properties,geometry:d?Hl(D):[]}}let is=-32768;function Hs(D,d,L,Y,te){D.emplaceBack(is+8*d+Y,is+8*L+te)}class ca{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new qt,this.indexArray=new ya,this.segments=new Ya,this.programConfigurations=new Do(d.layers,d.zoom),this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,Y){let te=this.layers[0],ue=[],pe=null,me=!1,Ce=te.type==="heatmap";if(te.type==="circle"){let ze=te;pe=ze.layout.get("circle-sort-key"),me=!pe.isConstant(),Ce||(Ce=ze.paint.get("circle-pitch-alignment")==="map")}let we=Ce?L.subdivisionGranularity.circle:1;for(let{feature:ze,id:Pe,index:at,sourceLayerIndex:Ve}of d){let bt=this.layers[0]._featureFilter.needGeometry,Et=Co(ze,bt);if(!this.layers[0]._featureFilter.filter(new Ti(this.zoom),Et,Y))continue;let er=me?pe.evaluate(Et,{},Y):void 0,tr={id:Pe,properties:ze.properties,type:ze.type,sourceLayerIndex:Ve,index:at,geometry:bt?Et.geometry:Hl(ze),patterns:{},sortKey:er};ue.push(tr)}me&&ue.sort((ze,Pe)=>ze.sortKey-Pe.sortKey);for(let ze of ue){let{geometry:Pe,index:at,sourceLayerIndex:Ve}=ze,bt=d[at].feature;this.addFeature(ze,Pe,at,Y,we),L.featureIndex.insert(bt,Pe,at,Ve,this.index)}}update(d,L,Y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:Y})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,wa),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(d,L,Y,te,ue=1){let pe;switch(ue){case 1:pe=[0,7];break;case 3:pe=[0,2,5,7];break;case 5:pe=[0,1,3,4,6,7];break;case 7:pe=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${ue}; valid values are 1, 3, 5, 7.`)}let me=pe.length;for(let Ce of L)for(let we of Ce){let ze=we.x,Pe=we.y;if(ze<0||ze>=F||Pe<0||Pe>=F)continue;let at=this.segments.prepareSegment(me*me,this.layoutVertexArray,this.indexArray,d.sortKey),Ve=at.vertexLength;for(let bt=0;bt1){if(Os(D,d))return!0;for(let Y of d)if(ea(Y,D,L))return!0}for(let Y of D)if(ea(Y,d,L))return!0;return!1}function Os(D,d){if(D.length===0||d.length===0)return!1;for(let L=0;L1?L:L.sub(d)._mult(te)._add(d))}function Ta(D,d){let L,Y,te,ue=!1;for(let pe of D){L=pe;for(let me=0,Ce=L.length-1;med.y!=te.y>d.y&&d.x<(te.x-Y.x)*(d.y-Y.y)/(te.y-Y.y)+Y.x&&(ue=!ue)}return ue}function sn(D,d){let L=!1;for(let Y=0,te=D.length-1;Yd.y!=pe.y>d.y&&d.x<(pe.x-ue.x)*(d.y-ue.y)/(pe.y-ue.y)+ue.x&&(L=!L)}return L}function wn(D,d,L){let Y=L[0],te=L[2];if(D.xte.x&&d.x>te.x||D.yte.y&&d.y>te.y)return!1;let ue=ae(D,d,L[0]);return ue!==ae(D,d,L[1])||ue!==ae(D,d,L[2])||ue!==ae(D,d,L[3])}function Le(D,d,L){let Y=d.paint.get(D).value;return Y.kind==="constant"?Y.value:L.programConfigurations.get(d.id).getMaxValue(D)}function Oe(D){return Math.sqrt(D[0]*D[0]+D[1]*D[1])}function Ke(D,d,L,Y,te){if(!d[0]&&!d[1])return D;let ue=t.convert(d)._mult(te);L==="viewport"&&ue._rotate(-Y);let pe=[];for(let me of D)pe.push(me.sub(ue));return pe}function yt(D){let d=[];for(let L=0;Lvn(lr,er,tr,xr))}(we,ue,me,Ce),bt=ze),Aa({queryGeometry:Ve,size:bt,transform:ue,unwrappedTileID:me,getElevation:Ce,pitchAlignment:at,pitchScale:Pe},te)}}class zn extends ca{}let Un;Ci("HeatmapBucket",zn,{omit:["layers"]});var Jn={get paint(){return Un=Un||new Bs({"heatmap-radius":new Vi(ht.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Vi(ht.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Li(ht.paint_heatmap["heatmap-intensity"]),"heatmap-color":new tu(ht.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Li(ht.paint_heatmap["heatmap-opacity"])})}};function hi(D,{width:d,height:L},Y,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==d*L*Y)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${d*L*Y}`)}else te=new Uint8Array(d*L*Y);return D.width=d,D.height=L,D.data=te,D}function Ki(D,{width:d,height:L},Y){if(d===D.width&&L===D.height)return;let te=hi({},{width:d,height:L},Y);Qo(D,te,{x:0,y:0},{x:0,y:0},{width:Math.min(D.width,d),height:Math.min(D.height,L)},Y),D.width=d,D.height=L,D.data=te.data}function Qo(D,d,L,Y,te,ue){if(te.width===0||te.height===0)return d;if(te.width>D.width||te.height>D.height||L.x>D.width-te.width||L.y>D.height-te.height)throw new RangeError("out of range source coordinates for image copy");if(te.width>d.width||te.height>d.height||Y.x>d.width-te.width||Y.y>d.height-te.height)throw new RangeError("out of range destination coordinates for image copy");let pe=D.data,me=d.data;if(pe===me)throw new Error("srcData equals dstData, so image is already copied");for(let Ce=0;Ce{d[D.evaluationKey]=Ce;let we=D.expression.evaluate(d);te.setPixel(pe/4/L,me/4,we)};if(D.clips)for(let pe=0,me=0;pethis.max&&(this.max=Pe),Pe=this.dim+1||L<-1||L>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${d}, y: ${L}, dim: ${this.dim}`);return(L+1)*this.stride+(d+1)}unpack(d,L,Y){return d*this.redFactor+L*this.greenFactor+Y*this.blueFactor-this.baseShift}pack(d){return Ld(d,this.getUnpackVector())}getPixels(){return new ys({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(d,L,Y){if(this.dim!==d.dim)throw new Error("dem dimension mismatch");let te=L*this.dim,ue=L*this.dim+this.dim,pe=Y*this.dim,me=Y*this.dim+this.dim;switch(L){case-1:te=ue-1;break;case 1:ue=te+1}switch(Y){case-1:pe=me-1;break;case 1:me=pe+1}let Ce=-L*this.dim,we=-Y*this.dim;for(let ze=pe;ze0)for(let pe=d;pe=d;pe-=Y)ue=J5(pe/Y|0,D[pe],D[pe+1],ue);return ue&&ip(ue,ue.next)&&(p0(ue),ue=ue.next),ue}function td(D,d){if(!D)return D;d||(d=D);let L,Y=D;do if(L=!1,Y.steiner||!ip(Y,Y.next)&&Ou(Y.prev,Y,Y.next)!==0)Y=Y.next;else{if(p0(Y),Y=d=Y.prev,Y===Y.next)break;L=!0}while(L||Y!==d);return d}function Dd(D,d,L,Y,te,ue,pe){if(!D)return;!pe&&ue&&function(Ce,we,ze,Pe){let at=Ce;do at.z===0&&(at.z=n_(at.x,at.y,we,ze,Pe)),at.prevZ=at.prev,at.nextZ=at.next,at=at.next;while(at!==Ce);at.prevZ.nextZ=null,at.prevZ=null,function(Ve){let bt,Et=1;do{let er,tr=Ve;Ve=null;let xr=null;for(bt=0;tr;){bt++;let lr=tr,Mr=0;for(let na=0;na0||Xr>0&&lr;)Mr!==0&&(Xr===0||!lr||tr.z<=lr.z)?(er=tr,tr=tr.nextZ,Mr--):(er=lr,lr=lr.nextZ,Xr--),xr?xr.nextZ=er:Ve=er,er.prevZ=xr,xr=er;tr=lr}xr.nextZ=null,Et*=2}while(bt>1)}(at)}(D,Y,te,ue);let me=D;for(;D.prev!==D.next;){let Ce=D.prev,we=D.next;if(ue?pI(D,Y,te,ue):h0(D))d.push(Ce.i,D.i,we.i),p0(D),D=we.next,me=we.next;else if((D=we)===me){pe?pe===1?Dd(D=mI(td(D),d),d,L,Y,te,ue,2):pe===2&&gI(D,d,L,Y,te,ue):Dd(td(D),d,L,Y,te,ue,1);break}}}function h0(D){let d=D.prev,L=D,Y=D.next;if(Ou(d,L,Y)>=0)return!1;let te=d.x,ue=L.x,pe=Y.x,me=d.y,Ce=L.y,we=Y.y,ze=Math.min(te,ue,pe),Pe=Math.min(me,Ce,we),at=Math.max(te,ue,pe),Ve=Math.max(me,Ce,we),bt=Y.next;for(;bt!==d;){if(bt.x>=ze&&bt.x<=at&&bt.y>=Pe&&bt.y<=Ve&&d0(te,me,ue,Ce,pe,we,bt.x,bt.y)&&Ou(bt.prev,bt,bt.next)>=0)return!1;bt=bt.next}return!0}function pI(D,d,L,Y){let te=D.prev,ue=D,pe=D.next;if(Ou(te,ue,pe)>=0)return!1;let me=te.x,Ce=ue.x,we=pe.x,ze=te.y,Pe=ue.y,at=pe.y,Ve=Math.min(me,Ce,we),bt=Math.min(ze,Pe,at),Et=Math.max(me,Ce,we),er=Math.max(ze,Pe,at),tr=n_(Ve,bt,d,L,Y),xr=n_(Et,er,d,L,Y),lr=D.prevZ,Mr=D.nextZ;for(;lr&&lr.z>=tr&&Mr&&Mr.z<=xr;){if(lr.x>=Ve&&lr.x<=Et&&lr.y>=bt&&lr.y<=er&&lr!==te&&lr!==pe&&d0(me,ze,Ce,Pe,we,at,lr.x,lr.y)&&Ou(lr.prev,lr,lr.next)>=0||(lr=lr.prevZ,Mr.x>=Ve&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=er&&Mr!==te&&Mr!==pe&&d0(me,ze,Ce,Pe,we,at,Mr.x,Mr.y)&&Ou(Mr.prev,Mr,Mr.next)>=0))return!1;Mr=Mr.nextZ}for(;lr&&lr.z>=tr;){if(lr.x>=Ve&&lr.x<=Et&&lr.y>=bt&&lr.y<=er&&lr!==te&&lr!==pe&&d0(me,ze,Ce,Pe,we,at,lr.x,lr.y)&&Ou(lr.prev,lr,lr.next)>=0)return!1;lr=lr.prevZ}for(;Mr&&Mr.z<=xr;){if(Mr.x>=Ve&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=er&&Mr!==te&&Mr!==pe&&d0(me,ze,Ce,Pe,we,at,Mr.x,Mr.y)&&Ou(Mr.prev,Mr,Mr.next)>=0)return!1;Mr=Mr.nextZ}return!0}function mI(D,d){let L=D;do{let Y=L.prev,te=L.next.next;!ip(Y,te)&&Z5(Y,L,L.next,te)&&v0(Y,te)&&v0(te,Y)&&(d.push(Y.i,L.i,te.i),p0(L),p0(L.next),L=D=te),L=L.next}while(L!==D);return td(L)}function gI(D,d,L,Y,te,ue){let pe=D;do{let me=pe.next.next;for(;me!==pe.prev;){if(pe.i!==me.i&&wI(pe,me)){let Ce=K5(pe,me);return pe=td(pe,pe.next),Ce=td(Ce,Ce.next),Dd(pe,d,L,Y,te,ue,0),void Dd(Ce,d,L,Y,te,ue,0)}me=me.next}pe=pe.next}while(pe!==D)}function yI(D,d){let L=D.x-d.x;return L===0&&(L=D.y-d.y,L===0)&&(L=(D.next.y-D.y)/(D.next.x-D.x)-(d.next.y-d.y)/(d.next.x-d.x)),L}function _I(D,d){let L=function(te,ue){let pe=ue,me=te.x,Ce=te.y,we,ze=-1/0;if(ip(te,pe))return pe;do{if(ip(te,pe.next))return pe.next;if(Ce<=pe.y&&Ce>=pe.next.y&&pe.next.y!==pe.y){let Et=pe.x+(Ce-pe.y)*(pe.next.x-pe.x)/(pe.next.y-pe.y);if(Et<=me&&Et>ze&&(ze=Et,we=pe.x=pe.x&&pe.x>=at&&me!==pe.x&&$5(Cewe.x||pe.x===we.x&&bI(we,pe)))&&(we=pe,bt=Et)}pe=pe.next}while(pe!==Pe);return we}(D,d);if(!L)return d;let Y=K5(L,D);return td(Y,Y.next),td(L,L.next)}function bI(D,d){return Ou(D.prev,D,d.prev)<0&&Ou(d.next,D,D.next)<0}function n_(D,d,L,Y,te){return(D=1431655765&((D=858993459&((D=252645135&((D=16711935&((D=(D-L)*te|0)|D<<8))|D<<4))|D<<2))|D<<1))|(d=1431655765&((d=858993459&((d=252645135&((d=16711935&((d=(d-Y)*te|0)|d<<8))|d<<4))|d<<2))|d<<1))<<1}function xI(D){let d=D,L=D;do(d.x=(D-pe)*(ue-me)&&(D-pe)*(Y-me)>=(L-pe)*(d-me)&&(L-pe)*(ue-me)>=(te-pe)*(Y-me)}function d0(D,d,L,Y,te,ue,pe,me){return!(D===pe&&d===me)&&$5(D,d,L,Y,te,ue,pe,me)}function wI(D,d){return D.next.i!==d.i&&D.prev.i!==d.i&&!function(L,Y){let te=L;do{if(te.i!==L.i&&te.next.i!==L.i&&te.i!==Y.i&&te.next.i!==Y.i&&Z5(te,te.next,L,Y))return!0;te=te.next}while(te!==L);return!1}(D,d)&&(v0(D,d)&&v0(d,D)&&function(L,Y){let te=L,ue=!1,pe=(L.x+Y.x)/2,me=(L.y+Y.y)/2;do te.y>me!=te.next.y>me&&te.next.y!==te.y&&pe<(te.next.x-te.x)*(me-te.y)/(te.next.y-te.y)+te.x&&(ue=!ue),te=te.next;while(te!==L);return ue}(D,d)&&(Ou(D.prev,D,d.prev)||Ou(D,d.prev,d))||ip(D,d)&&Ou(D.prev,D,D.next)>0&&Ou(d.prev,d,d.next)>0)}function Ou(D,d,L){return(d.y-D.y)*(L.x-d.x)-(d.x-D.x)*(L.y-d.y)}function ip(D,d){return D.x===d.x&&D.y===d.y}function Z5(D,d,L,Y){let te=Hm(Ou(D,d,L)),ue=Hm(Ou(D,d,Y)),pe=Hm(Ou(L,Y,D)),me=Hm(Ou(L,Y,d));return te!==ue&&pe!==me||!(te!==0||!Vm(D,L,d))||!(ue!==0||!Vm(D,Y,d))||!(pe!==0||!Vm(L,D,Y))||!(me!==0||!Vm(L,d,Y))}function Vm(D,d,L){return d.x<=Math.max(D.x,L.x)&&d.x>=Math.min(D.x,L.x)&&d.y<=Math.max(D.y,L.y)&&d.y>=Math.min(D.y,L.y)}function Hm(D){return D>0?1:D<0?-1:0}function v0(D,d){return Ou(D.prev,D,D.next)<0?Ou(D,d,D.next)>=0&&Ou(D,D.prev,d)>=0:Ou(D,d,D.prev)<0||Ou(D,D.next,d)<0}function K5(D,d){let L=i_(D.i,D.x,D.y),Y=i_(d.i,d.x,d.y),te=D.next,ue=d.prev;return D.next=d,d.prev=D,L.next=te,te.prev=L,Y.next=L,L.prev=Y,ue.next=Y,Y.prev=ue,Y}function J5(D,d,L,Y){let te=i_(D,d,L);return Y?(te.next=Y.next,te.prev=Y,Y.next.prev=te,Y.next=te):(te.prev=te,te.next=te),te}function p0(D){D.next.prev=D.prev,D.prev.next=D.next,D.prevZ&&(D.prevZ.nextZ=D.nextZ),D.nextZ&&(D.nextZ.prevZ=D.prevZ)}function i_(D,d,L){return{i:D,x:d,y:L,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class op{constructor(d,L){if(L>d)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=d,this._minGranularity=L}getGranularityForZoomLevel(d){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||L>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let Y=0|Math.round(d),te=0|Math.round(L),ue=this._getKey(Y,te);if(this._vertexDictionary.has(ue))return this._vertexDictionary.get(ue);let pe=this._vertexBuffer.length/2;return this._vertexDictionary.set(ue,pe),this._vertexBuffer.push(Y,te),pe}_subdivideTrianglesScanline(d){if(this._granularity<2)return function(te,ue){let pe=[];for(let me=0;me0?(pe.push(Ce),pe.push(ze),pe.push(we)):(pe.push(Ce),pe.push(we),pe.push(ze))}return pe}(this._vertexBuffer,d);let L=[],Y=d.length;for(let te=0;te=1||Xr<=0)||tr&&(weue)){Pe>=te&&Pe<=ue&&pe.push(Y[(me+1)%3]);continue}!tr&&Mr>0&&pe.push(this._vertexToIndex(Ce+bt*Mr,we+Et*Mr));let na=Ce+bt*Math.max(Mr,0),Ea=Ce+bt*Math.min(Xr,1);er||this._generateIntraEdgeVertices(pe,Ce,we,ze,Pe,na,Ea),!tr&&Xr<1&&pe.push(this._vertexToIndex(Ce+bt*Xr,we+Et*Xr)),(tr||Pe>=te&&Pe<=ue)&&pe.push(Y[(me+1)%3]),!tr&&(Pe<=te||Pe>=ue)&&this._generateInterEdgeVertices(pe,Ce,we,ze,Pe,at,Ve,Ea,te,ue)}return pe}_generateIntraEdgeVertices(d,L,Y,te,ue,pe,me){let Ce=te-L,we=ue-Y,ze=we===0,Pe=ze?Math.min(L,te):Math.min(pe,me),at=ze?Math.max(L,te):Math.max(pe,me),Ve=Math.floor(Pe/this._granularityCellSize)+1,bt=Math.ceil(at/this._granularityCellSize)-1;if(ze?L=Ve;Et--){let er=Et*this._granularityCellSize;d.push(this._vertexToIndex(er,Y+we*(er-L)/Ce))}}_generateInterEdgeVertices(d,L,Y,te,ue,pe,me,Ce,we,ze){let Pe=ue-Y,at=pe-te,Ve=me-ue,bt=(we-ue)/Ve,Et=(ze-ue)/Ve,er=Math.min(bt,Et),tr=Math.max(bt,Et),xr=te+at*er,lr=Math.floor(Math.min(xr,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(xr,Ce)/this._granularityCellSize)-1,Xr=Ce=1||tr<=0){let Na=Y-me,_n=pe+(L-pe)*Math.min((we-me)/Na,(ze-me)/Na);lr=Math.floor(Math.min(_n,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(_n,Ce)/this._granularityCellSize)-1,Xr=Ce<_n}let Ea=Pe>0?ze:we;if(Xr)for(let Na=lr;Na<=Mr;Na++)d.push(this._vertexToIndex(Na*this._granularityCellSize,Ea));else for(let Na=Mr;Na>=lr;Na--)d.push(this._vertexToIndex(Na*this._granularityCellSize,Ea))}_generateOutline(d){let L=[];for(let Y of d){let te=hv(Y,this._granularity,!0),ue=this._pointArrayToIndices(te),pe=[];for(let me=1;meue!=(pe===sp)?(d.push(L),d.push(Y),d.push(this._vertexToIndex(te,pe)),d.push(Y),d.push(this._vertexToIndex(ue,pe)),d.push(this._vertexToIndex(te,pe))):(d.push(Y),d.push(L),d.push(this._vertexToIndex(te,pe)),d.push(this._vertexToIndex(ue,pe)),d.push(Y),d.push(this._vertexToIndex(te,pe)))}_fillPoles(d,L,Y){let te=this._vertexBuffer,ue=F,pe=d.length;for(let me=2;me80*Pe){er=we[0],tr=we[1];let lr=er,Mr=tr;for(let Xr=Pe;Xrlr&&(lr=na),Ea>Mr&&(Mr=Ea)}xr=Math.max(lr-er,Mr-tr),xr=xr!==0?32767/xr:0}return Dd(bt,Et,Pe,er,tr,xr,0),Et}(Y,te),Ce=this._convertIndices(Y,me);ue=this._subdivideTrianglesScanline(Ce)}catch(me){console.error(me)}let pe=[];return L&&(pe=this._generateOutline(d)),this._ensureNoPoleVertices(),this._handlePoles(ue),{verticesFlattened:this._vertexBuffer,indicesTriangles:ue,indicesLineList:pe}}_convertIndices(d,L){let Y=[];for(let te of L)Y.push(this._vertexToIndex(d[2*te],d[2*te+1]));return Y}_pointArrayToIndices(d){let L=[];for(let Y of d)L.push(this._vertexToIndex(Y.x,Y.y));return L}}function Q5(D,d,L,Y=!0){return new TI(L,d).subdividePolygonInternal(D,Y)}function hv(D,d,L=!1){if(!D||D.length<1)return[];if(D.length<2)return[];let Y=D[0],te=D[D.length-1],ue=L&&(Y.x!==te.x||Y.y!==te.y);if(d<2)return ue?[...D,D[0]]:[...D];let pe=Math.floor(F/d),me=[];me.push(new t(D[0].x,D[0].y));let Ce=D.length,we=ue?Ce:Ce-1;for(let ze=0;ze0?(Math.floor(Ea/pe)+1)*pe:(Math.ceil(Ea/pe)-1)*pe,Bn=Mr>0?(Math.floor(Na/pe)+1)*pe:(Math.ceil(Na/pe)-1)*pe,Zn=Math.abs(Ea-en),Dn=Math.abs(Na-Bn),rn=Math.abs(Ea-Et),li=Math.abs(Na-er),xi=tr?Zn/Xr:Number.POSITIVE_INFINITY,ui=xr?Dn/na:Number.POSITIVE_INFINITY;if((rn<=Zn||!tr)&&(li<=Dn||!xr))break;if(xi=0?pe-1:ue-1,we=(me+1)%ue,ze=D[2*d[Ce]],Pe=D[2*d[we]],at=D[2*d[pe]],Ve=D[2*d[pe]+1],bt=D[2*d[me]+1],Et=!1;if(zePe)Et=!1;else{let er=bt-Ve,tr=-(D[2*d[me]]-at),xr=Ve((Pe-at)*er+(D[2*d[we]+1]-Ve)*tr)*xr&&(Et=!0)}if(Et){let er=d[Ce],tr=d[pe],xr=d[me];er!==tr&&er!==xr&&tr!==xr&&L.push(xr,tr,er),pe--,pe<0&&(pe=ue-1)}else{let er=d[we],tr=d[pe],xr=d[me];er!==tr&&er!==xr&&tr!==xr&&L.push(xr,tr,er),me++,me>=ue&&(me=0)}if(Ce===we)break}}function eT(D,d,L,Y,te,ue,pe,me,Ce){let we=te.length/2,ze=pe&&me&&Ce;if(weYa.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(at,Ve),lr=xr.count,en=!0,Bn=!0,Zn=!0,Xr=0);let Dn=g0(tr,bt,er,xr,Ea,en,Mr),rn=g0(tr,bt,er,xr,Na,Bn,Mr),li=g0(tr,bt,er,xr,_n,Zn,Mr);Ve.emplaceBack(Xr+Dn-lr,Xr+rn-lr,Xr+li-lr),Mr.primitiveLength++}})(d,L,Y,te,ue,D),ze&&function(Pe,at,Ve,bt,Et,er){let tr=[];for(let na=0;naYa.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(at,Ve),lr=xr.count,en=!0,Bn=!0,Xr=0);let Zn=g0(tr,bt,er,xr,Na,en,Mr),Dn=g0(tr,bt,er,xr,_n,Bn,Mr);Ve.emplaceBack(Xr+Zn-lr,Xr+Dn-lr),Mr.primitiveLength++}}(pe,L,me,te,Ce,D),d.forceNewSegmentOnNextPrepare(),pe?.forceNewSegmentOnNextPrepare()}function g0(D,d,L,Y,te,ue,pe){if(ue){let me=Y.count;return L(d[2*te],d[2*te+1]),D[te]=Y.count,Y.count++,pe.vertexLength++,me}return D[te]}class o_{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new or,this.indexArray=new ya,this.indexArray2=new da,this.programConfigurations=new Do(d.layers,d.zoom),this.segments=new Ya,this.segments2=new Ya,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,Y){this.hasDependencies=jh("fill",this.layers,L);let te=this.layers[0].layout.get("fill-sort-key"),ue=!te.isConstant(),pe=[];for(let{feature:me,id:Ce,index:we,sourceLayerIndex:ze}of d){let Pe=this.layers[0]._featureFilter.needGeometry,at=Co(me,Pe);if(!this.layers[0]._featureFilter.filter(new Ti(this.zoom),at,Y))continue;let Ve=ue?te.evaluate(at,{},Y,L.availableImages):void 0,bt={id:Ce,properties:me.properties,type:me.type,sourceLayerIndex:ze,index:we,geometry:Pe?at.geometry:Hl(me),patterns:{},sortKey:Ve};pe.push(bt)}ue&&pe.sort((me,Ce)=>me.sortKey-Ce.sortKey);for(let me of pe){let{geometry:Ce,index:we,sourceLayerIndex:ze}=me;if(this.hasDependencies){let Pe=ap("fill",this.layers,me,{zoom:this.zoom},L);this.patternFeatures.push(Pe)}else this.addFeature(me,Ce,we,Y,{},L.subdivisionGranularity);L.featureIndex.insert(d[we].feature,Ce,we,ze,this.index)}}update(d,L,Y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:Y})}addFeatures(d,L,Y){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,L,Y,d.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,rp),this.indexBuffer=d.createIndexBuffer(this.indexArray),this.indexBuffer2=d.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(d,L,Y,te,ue,pe){for(let me of Rc(L,500)){let Ce=Q5(me,te,pe.fill.getGranularityForZoomLevel(te.z)),we=this.layoutVertexArray;eT((ze,Pe)=>{we.emplaceBack(ze,Pe)},this.segments,this.layoutVertexArray,this.indexArray,Ce.verticesFlattened,Ce.indicesTriangles,this.segments2,this.indexArray2,Ce.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,Y,{imagePositions:ue,canonical:te})}}let tT,rT;Ci("FillBucket",o_,{omit:["layers","patternFeatures"]});var MI={get paint(){return rT=rT||new Bs({"fill-antialias":new Li(ht.paint_fill["fill-antialias"]),"fill-opacity":new Vi(ht.paint_fill["fill-opacity"]),"fill-color":new Vi(ht.paint_fill["fill-color"]),"fill-outline-color":new Vi(ht.paint_fill["fill-outline-color"]),"fill-translate":new Li(ht.paint_fill["fill-translate"]),"fill-translate-anchor":new Li(ht.paint_fill["fill-translate-anchor"]),"fill-pattern":new fl(ht.paint_fill["fill-pattern"])})},get layout(){return tT=tT||new Bs({"fill-sort-key":new Vi(ht.layout_fill["fill-sort-key"])})}};class SI extends hl{constructor(d,L){super(d,MI,L)}recalculate(d,L){super.recalculate(d,L);let Y=this.paint._values["fill-outline-color"];Y.value.kind==="constant"&&Y.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(d){return new o_(d)}queryRadius(){return Oe(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:d,geometry:L,transform:Y,pixelsToTileUnits:te}){return no(Ke(d,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-Y.bearingInRadians,te),L)}isTileClipped(){return!0}}let EI=ut([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),kI=ut([{name:"a_centroid",components:2,type:"Int16"}],4),{members:CI}=EI;class y0{constructor(d,L,Y,te,ue){this.properties={},this.extent=Y,this.type=0,this.id=void 0,this._pbf=d,this._geometry=-1,this._keys=te,this._values=ue,d.readFields(LI,this,L)}loadGeometry(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,Y=[],te,ue=1,pe=0,me=0,Ce=0;for(;d.pos>3}if(pe--,ue===1||ue===2)me+=d.readSVarint(),Ce+=d.readSVarint(),ue===1&&(te&&Y.push(te),te=[]),te&&te.push(new t(me,Ce));else{if(ue!==7)throw new Error(`unknown command ${ue}`);te&&te.push(te[0].clone())}}return te&&Y.push(te),Y}bbox(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,Y=1,te=0,ue=0,pe=0,me=1/0,Ce=-1/0,we=1/0,ze=-1/0;for(;d.pos>3}if(te--,Y===1||Y===2)ue+=d.readSVarint(),pe+=d.readSVarint(),ueCe&&(Ce=ue),peze&&(ze=pe);else if(Y!==7)throw new Error(`unknown command ${Y}`)}return[me,we,Ce,ze]}toGeoJSON(d,L,Y){let te=this.extent*Math.pow(2,Y),ue=this.extent*d,pe=this.extent*L,me=this.loadGeometry();function Ce(at){return[360*(at.x+ue)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(at.y+pe)/te)*Math.PI))-90]}function we(at){return at.map(Ce)}let ze;if(this.type===1){let at=[];for(let bt of me)at.push(bt[0]);let Ve=we(at);ze=at.length===1?{type:"Point",coordinates:Ve[0]}:{type:"MultiPoint",coordinates:Ve}}else if(this.type===2){let at=me.map(we);ze=at.length===1?{type:"LineString",coordinates:at[0]}:{type:"MultiLineString",coordinates:at}}else{if(this.type!==3)throw new Error("unknown feature type");{let at=aT(me),Ve=[];for(let bt of at)Ve.push(bt.map(we));ze=Ve.length===1?{type:"Polygon",coordinates:Ve[0]}:{type:"MultiPolygon",coordinates:Ve}}}let Pe={type:"Feature",geometry:ze,properties:this.properties};return this.id!=null&&(Pe.id=this.id),Pe}}function LI(D,d,L){D===1?d.id=L.readVarint():D===2?function(Y,te){let ue=Y.readVarint()+Y.pos;for(;Y.pos=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[d];let L=this._pbf.readVarint()+this._pbf.pos;return new y0(this._pbf,L,this.extent,this._keys,this._values)}}function II(D,d,L){D===15?d.version=L.readVarint():D===1?d.name=L.readString():D===5?d.extent=L.readVarint():D===2?d._features.push(L.pos):D===3?d._keys.push(L.readString()):D===4&&d._values.push(function(Y){let te=null,ue=Y.readVarint()+Y.pos;for(;Y.pos>3;te=pe===1?Y.readString():pe===2?Y.readFloat():pe===3?Y.readDouble():pe===4?Y.readVarint64():pe===5?Y.readVarint():pe===6?Y.readSVarint():pe===7?Y.readBoolean():null}if(te==null)throw new Error("unknown feature value");return te}(L))}class nT{constructor(d,L){this.layers=d.readFields(RI,{},L)}}function RI(D,d,L){if(D===3){let Y=new DI(L,L.readVarint()+L.pos);Y.length&&(d[Y.name]=Y)}}let s_=Math.pow(2,13);function _0(D,d,L,Y,te,ue,pe,me){D.emplaceBack(d,L,2*Math.floor(Y*s_)+pe,te*s_*2,ue*s_*2,Math.round(me))}class l_{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new vr,this.centroidVertexArray=new Rt,this.indexArray=new ya,this.programConfigurations=new Do(d.layers,d.zoom),this.segments=new Ya,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,Y){this.features=[],this.hasDependencies=jh("fill-extrusion",this.layers,L);for(let{feature:te,id:ue,index:pe,sourceLayerIndex:me}of d){let Ce=this.layers[0]._featureFilter.needGeometry,we=Co(te,Ce);if(!this.layers[0]._featureFilter.filter(new Ti(this.zoom),we,Y))continue;let ze={id:ue,sourceLayerIndex:me,index:pe,geometry:Ce?we.geometry:Hl(te),properties:te.properties,type:te.type,patterns:{}};this.hasDependencies?this.features.push(ap("fill-extrusion",this.layers,ze,{zoom:this.zoom},L)):this.addFeature(ze,ze.geometry,pe,Y,{},L.subdivisionGranularity),L.featureIndex.insert(te,ze.geometry,pe,me,this.index,!0)}}addFeatures(d,L,Y){for(let te of this.features){let{geometry:ue}=te;this.addFeature(te,ue,te.index,L,Y,d.subdivisionGranularity)}}update(d,L,Y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:Y})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,CI),this.centroidVertexBuffer=d.createVertexBuffer(this.centroidVertexArray,kI.members,!0),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(d,L,Y,te,ue,pe){for(let me of Rc(L,500)){let Ce={x:0,y:0,sampleCount:0},we=this.layoutVertexArray.length;this.processPolygon(Ce,te,d,me,pe);let ze=this.layoutVertexArray.length-we,Pe=Math.floor(Ce.x/Ce.sampleCount),at=Math.floor(Ce.y/Ce.sampleCount);for(let Ve=0;Ve{_0(ze,Pe,at,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,we.verticesFlattened,we.indicesTriangles)}_generateSideFaces(d,L){let Y=0;for(let te=1;teYa.MAX_VERTEX_ARRAY_LENGTH&&(L.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let me=ue.sub(pe)._perp()._unit(),Ce=pe.dist(ue);Y+Ce>32768&&(Y=0),_0(this.layoutVertexArray,ue.x,ue.y,me.x,me.y,0,0,Y),_0(this.layoutVertexArray,ue.x,ue.y,me.x,me.y,0,1,Y),Y+=Ce,_0(this.layoutVertexArray,pe.x,pe.y,me.x,me.y,0,0,Y),_0(this.layoutVertexArray,pe.x,pe.y,me.x,me.y,0,1,Y);let we=L.segment.vertexLength;this.indexArray.emplaceBack(we,we+2,we+1),this.indexArray.emplaceBack(we+1,we+2,we+3),L.segment.vertexLength+=4,L.segment.primitiveLength+=2}}}function FI(D,d){for(let L=0;LF)||D.y===d.y&&(D.y<0||D.y>F)}function iT(D){return D.every(d=>d.x<0)||D.every(d=>d.x>F)||D.every(d=>d.y<0)||D.every(d=>d.y>F)}let oT;Ci("FillExtrusionBucket",l_,{omit:["layers","features"]});var BI={get paint(){return oT=oT||new Bs({"fill-extrusion-opacity":new Li(ht["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Vi(ht["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Li(ht["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Li(ht["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new fl(ht["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Vi(ht["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Vi(ht["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Li(ht["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class NI extends hl{constructor(d,L){super(d,BI,L)}createBucket(d){return new l_(d)}queryRadius(){return Oe(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:Y,geometry:te,transform:ue,pixelsToTileUnits:pe,pixelPosMatrix:me}){let Ce=Ke(d,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-ue.bearingInRadians,pe),we=this.paint.get("fill-extrusion-height").evaluate(L,Y),ze=this.paint.get("fill-extrusion-base").evaluate(L,Y),Pe=function(Ve,bt){let Et=[];for(let er of Ve){let tr=[er.x,er.y,0,1];z(tr,tr,bt),Et.push(new t(tr[0]/tr[3],tr[1]/tr[3]))}return Et}(Ce,me),at=function(Ve,bt,Et,er){let tr=[],xr=[],lr=er[8]*bt,Mr=er[9]*bt,Xr=er[10]*bt,na=er[11]*bt,Ea=er[8]*Et,Na=er[9]*Et,_n=er[10]*Et,en=er[11]*Et;for(let Bn of Ve){let Zn=[],Dn=[];for(let rn of Bn){let li=rn.x,xi=rn.y,ui=er[0]*li+er[4]*xi+er[12],Ai=er[1]*li+er[5]*xi+er[13],Lo=er[2]*li+er[6]*xi+er[14],bs=er[3]*li+er[7]*xi+er[15],js=Lo+Xr,tl=bs+na,sf=ui+Ea,vu=Ai+Na,sc=Lo+_n,Ac=bs+en,Yl=new t((ui+lr)/tl,(Ai+Mr)/tl);Yl.z=js/tl,Zn.push(Yl);let Vc=new t(sf/Ac,vu/Ac);Vc.z=sc/Ac,Dn.push(Vc)}tr.push(Zn),xr.push(Dn)}return[tr,xr]}(te,ze,we,me);return function(Ve,bt,Et){let er=1/0;no(Et,bt)&&(er=sT(Et,bt[0]));for(let tr=0;tr>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let ue=lT[15&Y];if(!ue)throw new Error("Unrecognized array type.");let[pe]=new Uint16Array(d,2,1),[me]=new Uint32Array(d,4,1);return new Wm(me,pe,ue,d)}constructor(d,L=64,Y=Float64Array,te){if(isNaN(d)||d<0)throw new Error(`Unpexpected numItems value: ${d}.`);this.numItems=+d,this.nodeSize=Math.min(Math.max(+L,2),65535),this.ArrayType=Y,this.IndexArrayType=d<65536?Uint16Array:Uint32Array;let ue=lT.indexOf(this.ArrayType),pe=2*d*this.ArrayType.BYTES_PER_ELEMENT,me=d*this.IndexArrayType.BYTES_PER_ELEMENT,Ce=(8-me%8)%8;if(ue<0)throw new Error(`Unexpected typed array class: ${Y}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+me+Ce,2*d),this._pos=2*d,this._finished=!0):(this.data=new ArrayBuffer(8+pe+me+Ce),this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+me+Ce,2*d),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+ue]),new Uint16Array(this.data,2,1)[0]=L,new Uint32Array(this.data,4,1)[0]=d)}add(d,L){let Y=this._pos>>1;return this.ids[Y]=Y,this.coords[this._pos++]=d,this.coords[this._pos++]=L,Y}finish(){let d=this._pos>>1;if(d!==this.numItems)throw new Error(`Added ${d} items when expected ${this.numItems}.`);return u_(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(d,L,Y,te){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ue,coords:pe,nodeSize:me}=this,Ce=[0,ue.length-1,0],we=[];for(;Ce.length;){let ze=Ce.pop()||0,Pe=Ce.pop()||0,at=Ce.pop()||0;if(Pe-at<=me){for(let er=at;er<=Pe;er++){let tr=pe[2*er],xr=pe[2*er+1];tr>=d&&tr<=Y&&xr>=L&&xr<=te&&we.push(ue[er])}continue}let Ve=at+Pe>>1,bt=pe[2*Ve],Et=pe[2*Ve+1];bt>=d&&bt<=Y&&Et>=L&&Et<=te&&we.push(ue[Ve]),(ze===0?d<=bt:L<=Et)&&(Ce.push(at),Ce.push(Ve-1),Ce.push(1-ze)),(ze===0?Y>=bt:te>=Et)&&(Ce.push(Ve+1),Ce.push(Pe),Ce.push(1-ze))}return we}within(d,L,Y){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:te,coords:ue,nodeSize:pe}=this,me=[0,te.length-1,0],Ce=[],we=Y*Y;for(;me.length;){let ze=me.pop()||0,Pe=me.pop()||0,at=me.pop()||0;if(Pe-at<=pe){for(let er=at;er<=Pe;er++)cT(ue[2*er],ue[2*er+1],d,L)<=we&&Ce.push(te[er]);continue}let Ve=at+Pe>>1,bt=ue[2*Ve],Et=ue[2*Ve+1];cT(bt,Et,d,L)<=we&&Ce.push(te[Ve]),(ze===0?d-Y<=bt:L-Y<=Et)&&(me.push(at),me.push(Ve-1),me.push(1-ze)),(ze===0?d+Y>=bt:L+Y>=Et)&&(me.push(Ve+1),me.push(Pe),me.push(1-ze))}return Ce}}function u_(D,d,L,Y,te,ue){if(te-Y<=L)return;let pe=Y+te>>1;uT(D,d,pe,Y,te,ue),u_(D,d,L,Y,pe-1,1-ue),u_(D,d,L,pe+1,te,1-ue)}function uT(D,d,L,Y,te,ue){for(;te>Y;){if(te-Y>600){let we=te-Y+1,ze=L-Y+1,Pe=Math.log(we),at=.5*Math.exp(2*Pe/3),Ve=.5*Math.sqrt(Pe*at*(we-at)/we)*(ze-we/2<0?-1:1);uT(D,d,L,Math.max(Y,Math.floor(L-ze*at/we+Ve)),Math.min(te,Math.floor(L+(we-ze)*at/we+Ve)),ue)}let pe=d[2*L+ue],me=Y,Ce=te;for(x0(D,d,Y,L),d[2*te+ue]>pe&&x0(D,d,Y,te);mepe;)Ce--}d[2*Y+ue]===pe?x0(D,d,Y,Ce):(Ce++,x0(D,d,Ce,te)),Ce<=L&&(Y=Ce+1),L<=Ce&&(te=Ce-1)}}function x0(D,d,L,Y){c_(D,L,Y),c_(d,2*L,2*Y),c_(d,2*L+1,2*Y+1)}function c_(D,d,L){let Y=D[d];D[d]=D[L],D[L]=Y}function cT(D,d,L,Y){let te=D-L,ue=d-Y;return te*te+ue*ue}function f_(D,d,L,Y){let te=Y,ue=d+(L-d>>1),pe,me=L-d,Ce=D[d],we=D[d+1],ze=D[L],Pe=D[L+1];for(let at=d+3;atte)pe=at,te=Ve;else if(Ve===te){let bt=Math.abs(at-ue);btY&&(pe-d>3&&f_(D,d,pe,Y),D[pe+2]=te,L-pe>3&&f_(D,pe,L,Y))}function OI(D,d,L,Y,te,ue){let pe=te-L,me=ue-Y;if(pe!==0||me!==0){let Ce=((D-L)*pe+(d-Y)*me)/(pe*pe+me*me);Ce>1?(L=te,Y=ue):Ce>0&&(L+=pe*Ce,Y+=me*Ce)}return pe=D-L,me=d-Y,pe*pe+me*me}function qc(D,d,L,Y){let te={type:d,geom:L},ue={id:D??null,type:te.type,geometry:te.geom,tags:Y,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(te.type){case"Point":case"MultiPoint":w0(ue,te.geom);break;case"LineString":w0(ue,te.geom.points);break;case"Polygon":w0(ue,te.geom[0].points);break;case"MultiLineString":for(let pe of te.geom)w0(ue,pe.points);break;case"MultiPolygon":for(let pe of te.geom)w0(ue,pe[0].points)}return ue}function h_(D){D.points.length>64&&(D.points=new Float64Array(D.points))}function w0(D,d){for(let L=0;L0&&(pe+=Y?(te*ze-we*ue)/2:Math.sqrt(Math.pow(we-te,2)+Math.pow(ze-ue,2))),te=we,ue=ze}let me=d.points.length-3;d.points[2]=1,L>0&&f_(d.points,0,me,L),d.points[me+2]=1,h_(d),d.size=Math.abs(pe),d.start=0,d.end=d.size}function p_(D,d,L,Y){for(let te=0;te1?1:L}function Xm(D){let d={type:"Feature",geometry:jI(D),properties:D.tags};return D.id!=null&&(d.id=D.id),d}function jI(D){let{type:d,geometry:L}=D;switch(d){case"Point":return{type:d,coordinates:fT(L[0],L[1])};case"MultiPoint":return{type:d,coordinates:$m(L)};case"LineString":return{type:d,coordinates:$m(L.points)};case"MultiLineString":case"Polygon":return{type:d,coordinates:L.map(Y=>$m(Y.points))};case"MultiPolygon":return{type:d,coordinates:L.map(Y=>Y.map(te=>$m(te.points)))}}}function $m(D){let d=[];for(let L=0;L=(L/=d)&&pe=Y)return null;let Ce=[];for(let we of D){let ze=te===_f.X?we.minX:we.minY,Pe=te===_f.X?we.maxX:we.maxY;if(ze>=L&&Pe=Y))switch(we.type){case"Point":case"MultiPoint":UI(we,Ce,L,Y,te);continue;case"LineString":qI(we,Ce,L,Y,te,me);continue;case"MultiLineString":VI(we,Ce,L,Y,te);continue;case"Polygon":HI(we,Ce,L,Y,te);continue;case"MultiPolygon":GI(we,Ce,L,Y,te);continue}}return Ce.length?Ce:null}function UI(D,d,L,Y,te){let ue=[];(function(pe,me,Ce,we,ze){for(let Pe=0;Pe=Ce&&at<=we&&cp(me,pe[Pe],pe[Pe+1],pe[Pe+2])}})(D.geometry,ue,L,Y,te),ue.length&&d.push(qc(D.id,ue.length===3?"Point":"MultiPoint",ue,D.tags))}function qI(D,d,L,Y,te,ue){let pe=[];if(vT(D.geometry,pe,L,Y,te,!1,ue.lineMetrics),pe.length)if(ue.lineMetrics)for(let me of pe)d.push(qc(D.id,"LineString",me,D.tags));else d.push(pe.length>1?qc(D.id,"MultiLineString",pe,D.tags):qc(D.id,"LineString",pe[0],D.tags))}function VI(D,d,L,Y,te){let ue=[];m_(D.geometry,ue,L,Y,te,!1),ue.length&&d.push(ue.length!==1?qc(D.id,"MultiLineString",ue,D.tags):qc(D.id,"LineString",ue[0],D.tags))}function HI(D,d,L,Y,te){let ue=[];m_(D.geometry,ue,L,Y,te,!0),ue.length&&d.push(qc(D.id,"Polygon",ue,D.tags))}function GI(D,d,L,Y,te){let ue=[];for(let pe of D.geometry){let me=[];m_(pe,me,L,Y,te,!0),me.length&&ue.push(me)}ue.length&&d.push(qc(D.id,"MultiPolygon",ue,D.tags))}function vT(D,d,L,Y,te,ue,pe){let me=pT(D),Ce=te===_f.X?WI:YI,we,ze,Pe=D.start;for(let er=0;erL&&(ze=Ce(me,tr,xr,Mr,Xr,L),pe&&(me.start=Pe+we*ze)):na>Y?Ea=L&&(ze=Ce(me,tr,xr,Mr,Xr,L),Na=!0),Ea>Y&&na<=Y&&(ze=Ce(me,tr,xr,Mr,Xr,Y),Na=!0),!ue&&Na&&(pe&&(me.end=Pe+we*ze),d.push(me),me=pT(D)),pe&&(Pe+=we)}let at=D.points.length-3,Ve=D.points[at],bt=D.points[at+1],Et=te===_f.X?Ve:bt;Et>=L&&Et<=Y&&cp(me.points,Ve,bt,D.points[at+2]),at=me.points.length-3,ue&&at>=3&&(me.points[at]!==me.points[0]||me.points[at+1]!==me.points[1])&&cp(me.points,me.points[0],me.points[1],me.points[2]),me.points.length&&(h_(me),d.push(me))}function pT(D){return{points:[],size:D.size,start:D.start,end:D.end}}function m_(D,d,L,Y,te,ue){for(let pe of D)vT(pe,d,L,Y,te,ue,!1)}function cp(D,d,L,Y){D.push(d,L,Y)}function WI(D,d,L,Y,te,ue){let pe=(ue-d)/(Y-d);return cp(D.points,ue,L+(te-L)*pe,1),pe}function YI(D,d,L,Y,te,ue){let pe=(ue-L)/(te-L);return cp(D.points,d+(Y-d)*pe,ue,1),pe}function g_(D,d){let L=d.buffer/d.extent,Y=D,te=rd(D,1,-1-L,L,_f.X,-1,2,d),ue=rd(D,1,1-L,2+L,_f.X,-1,2,d);return(te||ue)&&(Y=rd(D,1,-L,1+L,_f.X,-1,2,d)||[],te&&(Y=mT(te,1).concat(Y)),ue&&(Y=Y.concat(mT(ue,-1)))),Y}function mT(D,d){let L=[];for(let Y of D)switch(Y.type){case"Point":case"MultiPoint":{let te=XI(Y.geometry,d);L.push(qc(Y.id,Y.type,te,Y.tags));continue}case"LineString":{let te=y_(Y.geometry,d);L.push(qc(Y.id,Y.type,te,Y.tags));continue}case"MultiLineString":case"Polygon":{let te=[];for(let ue of Y.geometry)te.push(y_(ue,d));L.push(qc(Y.id,Y.type,te,Y.tags));continue}case"MultiPolygon":{let te=[];for(let ue of Y.geometry){let pe=[];for(let me of ue)pe.push(y_(me,d));te.push(pe)}L.push(qc(Y.id,Y.type,te,Y.tags));continue}}return L}function XI(D,d){let L=[];for(let Y=0;Y0||((te=d.addOrUpdateProperties)==null?void 0:te.length)>0;if(ue){let me=D[0],Ce=d_({type:"FeatureCollection",features:[{type:"Feature",id:me.id,geometry:d.newGeometry,properties:pe?gT(me.tags,d):me.tags}]},L);return Ce=g_(Ce,L),Ce}if(pe){let me=[];for(let Ce of D){let we=Nr({},Ce);we.tags=gT(we.tags,d),me.push(we)}return me}return D}function gT(D,d){if(d.removeAllProperties)return{};let L=Nr({},D||{});if(d.removeProperties)for(let Y of d.removeProperties)delete L[Y];if(d.addOrUpdateProperties)for(let{key:Y,value:te}of d.addOrUpdateProperties)L[Y]=te;return L}(function(D){D[D.X=0]="X",D[D.Y=1]="Y"})(_f||(_f={}));let __={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:D=>D};class ZI{constructor(d){this.options=Object.assign(Object.create(__),d),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(d){let L=[];for(let Y of d){if(!Y.geometry)continue;let[te,ue]=Y.geometry.coordinates,[pe,me]=[lp(te),up(ue)];L.push({id:Y.id,type:"Point",geometry:[pe,me],tags:Y.properties})}this.createIndex(L)}initialize(d){let L=[];for(let Y of d)Y.type==="Point"&&L.push(Y);this.createIndex(L)}updateIndex(d,L,Y){this.options=Object.assign(Object.create(__),Y.clusterOptions),this.initialize(d)}createIndex(d){let{log:L,minZoom:Y,maxZoom:te}=this.options;L&&console.time("total time");let ue=`prepare ${d.length} points`;L&&console.time(ue),this.points=d;let pe=[];for(let Ce=0;Ce=Y;Ce--){let we=Date.now();me=this.trees[Ce]=this.createTree(this.cluster(me,Ce)),L&&console.log("z%d: %d clusters in %dms",Ce,me.numItems,Date.now()-we)}L&&console.timeEnd("total time")}getClusters(d,L){return this.getClustersInternal(d,L).map(Y=>Xm(Y))}getClustersInternal(d,L){let Y=((d[0]+180)%360+360)%360-180,te=Math.max(-90,Math.min(90,d[1])),ue=d[2]===180?180:((d[2]+180)%360+360)%360-180,pe=Math.max(-90,Math.min(90,d[3]));if(d[2]-d[0]>=360)Y=-180,ue=180;else if(Y>ue){let Pe=this.getClustersInternal([Y,te,180,pe],L),at=this.getClustersInternal([-180,te,ue,pe],L);return Pe.concat(at)}let me=this.trees[this.limitZoom(L)],Ce=me.range(lp(Y),up(pe),lp(ue),up(te)),we=me.flatData,ze=[];for(let Pe of Ce){let at=this.stride*Pe;ze.push(we[at+5]>1?KI(we,at,this.clusterProps):this.points[we[at+3]])}return ze}getChildren(d){let L=this.getOriginId(d),Y=this.getOriginZoom(d),te=new Error("No cluster with the specified id: "+d),ue=this.trees[Y];if(!ue)throw te;let pe=ue.flatData;if(L*this.stride>=pe.length)throw te;let me=this.options.radius/(this.options.extent*Math.pow(2,Y-1)),Ce=ue.within(pe[L*this.stride],pe[L*this.stride+1],me),we=[];for(let ze of Ce){let Pe=ze*this.stride;pe[Pe+4]===d&&we.push(pe[Pe+5]>1?JI(pe,Pe,this.clusterProps):Xm(this.points[pe[Pe+3]]))}if(we.length===0)throw te;return we}getLeaves(d,L,Y){let te=[];return this.appendLeaves(te,d,L=L||10,Y=Y||0,0),te}getTile(d,L,Y){let te=this.trees[this.limitZoom(d)];if(!te)return null;let ue=Math.pow(2,d),{extent:pe,radius:me}=this.options,Ce=me/pe,we=(Y-Ce)/ue,ze=(Y+1+Ce)/ue,Pe={transformed:!0,features:[],source:null,x:L,y:Y,z:d};return this.addTileFeatures(te.range((L-Ce)/ue,we,(L+1+Ce)/ue,ze),te.flatData,L,Y,ue,Pe),L===0&&this.addTileFeatures(te.range(1-Ce/ue,we,1,ze),te.flatData,ue,Y,ue,Pe),L===ue-1&&this.addTileFeatures(te.range(0,we,Ce/ue,ze),te.flatData,-1,Y,ue,Pe),Pe}getClusterExpansionZoom(d){return this.getOriginZoom(d)}appendLeaves(d,L,Y,te,ue){let pe=this.getChildren(L);for(let me of pe){let Ce=me.properties;if(Ce?.cluster?ue+Ce.point_count<=te?ue+=Ce.point_count:ue=this.appendLeaves(d,Ce.cluster_id,Y,te,ue):ue1,ze,Pe,at;if(we)ze=b_(L,Ce,this.clusterProps),Pe=L[Ce],at=L[Ce+1];else{let Et=this.points[L[Ce+3]];ze=Et.tags,[Pe,at]=Et.geometry}let Ve={type:1,geometry:[[Math.round(this.options.extent*(Pe*ue-Y)),Math.round(this.options.extent*(at*ue-te))]],tags:ze},bt;bt=we||this.options.generateId?L[Ce+3]:this.points[L[Ce+3]].id,bt!==void 0&&(Ve.id=bt),pe.features.push(Ve)}}limitZoom(d){return Math.max(this.options.minZoom,Math.min(Math.floor(+d),this.options.maxZoom+1))}cluster(d,L){let{radius:Y,extent:te,reduce:ue,minPoints:pe}=this.options,me=Y/(te*Math.pow(2,L)),Ce=d.flatData,we=[],ze=this.stride;for(let Pe=0;PeL&&(er+=Ce[xr+5])}if(er>Et&&er>=pe){let tr,xr=at*Et,lr=Ve*Et,Mr=-1,Xr=(Pe/ze<<5)+(L+1)+this.points.length;for(let na of bt){let Ea=na*ze;if(Ce[Ea+2]<=L)continue;Ce[Ea+2]=L;let Na=Ce[Ea+5];xr+=Ce[Ea]*Na,lr+=Ce[Ea+1]*Na,Ce[Ea+4]=Xr,ue&&(tr||(tr=this.map(Ce,Pe,!0),Mr=this.clusterProps.length,this.clusterProps.push(tr)),ue(tr,this.map(Ce,Ea)))}Ce[Pe+4]=Xr,we.push(xr/er,lr/er,1/0,Xr,-1,er),ue&&we.push(Mr)}else{for(let tr=0;tr1)for(let tr of bt){let xr=tr*ze;if(!(Ce[xr+2]<=L)){Ce[xr+2]=L;for(let lr=0;lr>5}getOriginZoom(d){return(d-this.points.length)%32}map(d,L,Y){if(d[L+5]>1){let pe=this.clusterProps[d[L+6]];return Y?Object.assign({},pe):pe}let te=this.points[d[L+3]].tags,ue=this.options.map(te);return Y&&ue===te?Object.assign({},ue):ue}}function KI(D,d,L){return{id:D[d+3],type:"Point",tags:b_(D,d,L),geometry:[D[d],D[d+1]]}}function JI(D,d,L){return{type:"Feature",id:D[d+3],properties:b_(D,d,L),geometry:{type:"Point",coordinates:[hT(D[d]),dT(D[d+1])]}}}function b_(D,d,L){let Y=D[d+5],te=Y>=1e4?`${Math.round(Y/1e3)}k`:Y>=1e3?Math.round(Y/100)/10+"k":Y,ue=D[d+6],pe=ue===-1?{}:Object.assign({},L[ue]);return Object.assign(pe,{cluster:!0,cluster_id:D[d+3],point_count:Y,point_count_abbreviated:te})}let x_="geojsonvt_clip_start",w_="geojsonvt_clip_end";function yT(D,d,L,Y,te){let ue=d===te.maxZoom?0:te.tolerance/((1<0&&d.size<(te?pe:Y))return void(L.numPoints+=d.points.length/3);let me=[];for(let Ce=0;Cepe)&&(L.numSimplified++,me.push(d.points[Ce],d.points[Ce+1])),L.numPoints++;te&&function(Ce,we){let ze=0;for(let Pe=0,at=Ce.length,Ve=at-2;Pe0===we)for(let Pe=0,at=Ce.length;Pe1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(L),Y.debug>1&&console.timeEnd("invalidating");let[te,ue,pe]=[0,0,0],me=yT(d,te,ue,pe,Y);me.source=d;let Ce=Zm(te,ue,pe);if(this.tiles[Ce]=me,this.tileCoords.push({z:te,x:ue,y:pe,id:Ce}),Y.debug){let we=`z${te}`;this.stats[we]=(this.stats[we]||0)+1,this.total++}}getClusterExpansionZoom(d){return null}getChildren(d){return null}getLeaves(d,L,Y){return null}getTile(d,L,Y){let{extent:te,debug:ue}=this.options,pe=1<1&&console.log("drilling down to z%d-%d-%d",d,L,Y);let Ce,we=d,ze=L,Pe=Y;for(;!Ce&&we>0;)we--,ze>>=1,Pe>>=1,Ce=this.tiles[Zm(we,ze,Pe)];return Ce?.source?(ue>1&&(console.log("found parent tile z%d-%d-%d",we,ze,Pe),console.time("drilling down")),this.splitTile(Ce.source,we,ze,Pe,d,L,Y),ue>1&&console.timeEnd("drilling down"),this.tiles[me]?_T(this.tiles[me],te):null):null}splitTile(d,L,Y,te,ue,pe,me){let Ce=[d,L,Y,te],we=this.options,ze=we.debug;for(;Ce.length;){te=Ce.pop(),Y=Ce.pop(),L=Ce.pop(),d=Ce.pop();let Pe=1<1&&console.time("creation"),Ve=this.tiles[at]=yT(d,L,Y,te,we),this.tileCoords.push({z:L,x:Y,y:te,id:at}),ze)){ze>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",L,Y,te,Ve.numFeatures,Ve.numPoints,Ve.numSimplified),console.timeEnd("creation"));let Na=`z${L}`;this.stats[Na]=(this.stats[Na]||0)+1,this.total++}if(Ve.source=d,ue==null){if(L===we.indexMaxZoom||Ve.numPoints<=we.indexMaxPoints)continue}else{if(L===we.maxZoom||L===ue)continue;if(ue!=null){let Na=ue-L;if(Y!==pe>>Na||te!==me>>Na)continue}}if(Ve.source=null,!d.length)continue;ze>1&&console.time("clipping");let bt=.5*we.buffer/we.extent,Et=.5-bt,er=.5+bt,tr=1+bt,xr=null,lr=null,Mr=null,Xr=null,na=rd(d,Pe,Y-bt,Y+er,_f.X,Ve.minX,Ve.maxX,we),Ea=rd(d,Pe,Y+Et,Y+tr,_f.X,Ve.minX,Ve.maxX,we);na&&(xr=rd(na,Pe,te-bt,te+er,_f.Y,Ve.minY,Ve.maxY,we),lr=rd(na,Pe,te+Et,te+tr,_f.Y,Ve.minY,Ve.maxY,we)),Ea&&(Mr=rd(Ea,Pe,te-bt,te+er,_f.Y,Ve.minY,Ve.maxY,we),Xr=rd(Ea,Pe,te+Et,te+tr,_f.Y,Ve.minY,Ve.maxY,we)),ze>1&&console.timeEnd("clipping"),Ce.push(xr||[],L+1,2*Y,2*te),Ce.push(lr||[],L+1,2*Y,2*te+1),Ce.push(Mr||[],L+1,2*Y+1,2*te),Ce.push(Xr||[],L+1,2*Y+1,2*te+1)}}invalidateTiles(d){if(!d.length)return;let L=this.options,{debug:Y}=L,te=1/0,ue=-1/0,pe=1/0,me=-1/0;for(let ze of d)te=Math.min(te,ze.minX),ue=Math.max(ue,ze.maxX),pe=Math.min(pe,ze.minY),me=Math.max(me,ze.maxY);let Ce=L.buffer/L.extent,we=new Set;for(let ze in this.tiles){let Pe=this.tiles[ze],at=1<=bt||me=er)continue;let tr=!1;for(let xr of d)if(xr.maxX>=Ve&&xr.minX=Et&&xr.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Pe.z,Pe.x,Pe.y,Pe.numFeatures,Pe.numPoints,Pe.numSimplified);let xr=`z${Pe.z}`;this.stats[xr]=(this.stats[xr]||0)-1,this.total--}delete this.tiles[ze],we.add(ze)}}we.size&&(this.tileCoords=this.tileCoords.filter(ze=>!we.has(ze.id)))}}function Zm(D,d,L){return 32*((1<L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let L of this.layers)this.gradients[L.id]={};this.layoutVertexArray=new Ar,this.layoutVertexArray2=new dr,this.indexArray=new ya,this.programConfigurations=new Do(d.layers,d.zoom),this.segments=new Ya,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,Y){this.hasDependencies=jh("line",this.layers,L)||this.hasLineDasharray(this.layers);let te=this.layers[0].layout.get("line-sort-key"),ue=!te.isConstant(),pe=[];for(let{feature:me,id:Ce,index:we,sourceLayerIndex:ze}of d){let Pe=this.layers[0]._featureFilter.needGeometry,at=Co(me,Pe);if(!this.layers[0]._featureFilter.filter(new Ti(this.zoom),at,Y))continue;let Ve=ue?te.evaluate(at,{},Y):void 0,bt={id:Ce,properties:me.properties,type:me.type,sourceLayerIndex:ze,index:we,geometry:Pe?at.geometry:Hl(me),patterns:{},dashes:{},sortKey:Ve};pe.push(bt)}ue&&pe.sort((me,Ce)=>me.sortKey-Ce.sortKey);for(let me of pe){let{geometry:Ce,index:we,sourceLayerIndex:ze}=me;this.hasDependencies?(jh("line",this.layers,L)?ap("line",this.layers,me,{zoom:this.zoom},L):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,me,this.zoom,L),this.patternFeatures.push(me)):this.addFeature(me,Ce,we,Y,{},{},L.subdivisionGranularity),L.featureIndex.insert(d[we].feature,Ce,we,ze,this.index)}}update(d,L,Y,te){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:Y,dashPositions:te})}addFeatures(d,L,Y,te){for(let ue of this.patternFeatures)this.addFeature(ue,ue.geometry,ue.index,L,Y,te,d.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=d.createVertexBuffer(this.layoutVertexArray2,sR)),this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,iR),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(d){if(d.properties&&Object.hasOwn(d.properties,x_)&&Object.hasOwn(d.properties,w_))return{start:+d.properties[x_],end:+d.properties[w_]}}addFeature(d,L,Y,te,ue,pe,me){let Ce=this.layers[0].layout,we=Ce.get("line-join").evaluate(d,{}),ze=Ce.get("line-cap").evaluate(d,{}),Pe=Ce.get("line-miter-limit").evaluate(d,{}),at=Ce.get("line-round-limit").evaluate(d,{});this.lineClips=this.lineFeatureClips(d);for(let Ve of L)this.addLine(Ve,d,we,ze,Pe,at,te,me);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,Y,{imagePositions:ue,dashPositions:pe,canonical:te})}addLine(d,L,Y,te,ue,pe,me,Ce){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,d=hv(d,me?Ce.line.getGranularityForZoomLevel(me.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let lr=0;lr=2&&d[ze-1].equals(d[ze-2]);)ze--;let Pe=0;for(;Pe0;if(_n&&lr>Pe){let Dn=bt.dist(Et);if(Dn>2*at){let rn=bt.sub(bt.sub(Et)._mult(at/Dn)._round());this.updateDistance(Et,rn),this.addCurrentVertex(rn,tr,0,0,Ve),Et=rn}}let Bn=Et&&er,Zn=Bn?Y:we?"butt":te;if(Bn&&Zn==="round"&&(Eaue&&(Zn="bevel"),Zn==="bevel"&&(Ea>2&&(Zn="flipbevel"),Ea100)Mr=xr.mult(-1);else{let Dn=Ea*tr.add(xr).mag()/tr.sub(xr).mag();Mr._perp()._mult(Dn*(en?-1:1))}this.addCurrentVertex(bt,Mr,0,0,Ve),this.addCurrentVertex(bt,Mr.mult(-1),0,0,Ve)}else if(Zn==="bevel"||Zn==="fakeround"){let Dn=-Math.sqrt(Ea*Ea-1),rn=en?Dn:0,li=en?0:Dn;if(Et&&this.addCurrentVertex(bt,tr,rn,li,Ve),Zn==="fakeround"){let xi=Math.round(180*Na/Math.PI/20);for(let ui=1;ui2*at){let rn=bt.add(er.sub(bt)._mult(at/Dn)._round());this.updateDistance(bt,rn),this.addCurrentVertex(rn,xr,0,0,Ve),bt=rn}}}}addCurrentVertex(d,L,Y,te,ue,pe=!1){let me=L.y*te-L.x,Ce=-L.y-L.x*te;this.addHalfVertex(d,L.x+L.y*Y,L.y-L.x*Y,pe,!1,Y,ue),this.addHalfVertex(d,me,Ce,pe,!0,-te,ue),this.distance>xT/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(d,L,Y,te,ue,pe))}addHalfVertex({x:d,y:L},Y,te,ue,pe,me,Ce){let we=.5*(this.lineClips?this.scaledDistance*(xT-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((d<<1)+(ue?1:0),(L<<1)+(pe?1:0),Math.round(63*Y)+128,Math.round(63*te)+128,1+(me===0?0:me<0?-1:1)|(63&we)<<2,we>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let ze=Ce.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,ze,this.e2),Ce.primitiveLength++),pe?this.e2=ze:this.e1=ze}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(d,L){this.distance+=d.dist(L),this.updateScaledDistance()}hasLineDasharray(d){for(let L of d){let Y=L.paint.get("line-dasharray");if(Y&&!Y.isConstant())return!0}return!1}addLineDashDependencies(d,L,Y,te){for(let ue of d){let pe=ue.paint.get("line-dasharray");if(!pe||pe.value.kind==="constant")continue;let me=ue.layout.get("line-cap").evaluate(L,{})==="round",Ce={dasharray:pe.value.evaluate({zoom:Y-1},L,{}),round:me},we={dasharray:pe.value.evaluate({zoom:Y},L,{}),round:me},ze={dasharray:pe.value.evaluate({zoom:Y+1},L,{}),round:me},Pe=`${Ce.dasharray.join(",")},${Ce.round}`,at=`${we.dasharray.join(",")},${we.round}`,Ve=`${ze.dasharray.join(",")},${ze.round}`;te.dashDependencies[Pe]=Ce,te.dashDependencies[at]=we,te.dashDependencies[Ve]=ze,L.dashes[ue.id]={min:Pe,mid:at,max:Ve}}}}let wT,TT;Ci("LineBucket",A_,{omit:["layers","patternFeatures"]});var AT={get paint(){return TT=TT||new Bs({"line-opacity":new Vi(ht.paint_line["line-opacity"]),"line-color":new Vi(ht.paint_line["line-color"]),"line-translate":new Li(ht.paint_line["line-translate"]),"line-translate-anchor":new Li(ht.paint_line["line-translate-anchor"]),"line-width":new Vi(ht.paint_line["line-width"]),"line-gap-width":new Vi(ht.paint_line["line-gap-width"]),"line-offset":new Vi(ht.paint_line["line-offset"]),"line-blur":new Vi(ht.paint_line["line-blur"]),"line-dasharray":new fl(ht.paint_line["line-dasharray"]),"line-pattern":new fl(ht.paint_line["line-pattern"]),"line-gradient":new tu(ht.paint_line["line-gradient"])})},get layout(){return wT=wT||new Bs({"line-cap":new Vi(ht.layout_line["line-cap"]),"line-join":new Vi(ht.layout_line["line-join"]),"line-miter-limit":new Vi(ht.layout_line["line-miter-limit"]),"line-round-limit":new Vi(ht.layout_line["line-round-limit"]),"line-sort-key":new Vi(ht.layout_line["line-sort-key"])})}};class uR extends Vi{possiblyEvaluate(d,L){return L=new Ti(Math.floor(L.zoom),{now:L.now,fadeDuration:L.fadeDuration,zoomHistory:L.zoomHistory,transition:L.transition}),super.possiblyEvaluate(d,L)}evaluate(d,L,Y,te){return L=$({},L,{zoom:Math.floor(L.zoom)}),super.evaluate(d,L,Y,te)}}let Km;class cR extends hl{constructor(d,L){super(d,AT,L),this.gradientVersion=0,Km||(Km=new uR(AT.paint.properties["line-width"].specification),Km.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(d){if(d==="line-gradient"){let L=this.gradientExpression();this.stepInterpolant=!!function(Y){return Y._styleExpression!==void 0}(L)&&L._styleExpression.expression instanceof Is,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(d,L){super.recalculate(d,L),this.paint._values["line-floorwidth"]=Km.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,d)}createBucket(d){return new A_(d)}queryRadius(d){let L=d,Y=MT(Le("line-width",this,L),Le("line-gap-width",this,L)),te=Le("line-offset",this,L);return Y/2+Math.abs(te)+Oe(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:Y,geometry:te,transform:ue,pixelsToTileUnits:pe}){let me=Ke(d,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-ue.bearingInRadians,pe),Ce=pe/2*MT(this.paint.get("line-width").evaluate(L,Y),this.paint.get("line-gap-width").evaluate(L,Y)),we=this.paint.get("line-offset").evaluate(L,Y);return we&&(te=function(ze,Pe){let at=[];for(let Ve of ze){let bt=yt(Ve),Et=[];for(let er=0;er=3){for(let bt of Ve)if(sn(ze,bt))return!0}if(ds(ze,Ve,at))return!0}return!1}(me,te,Ce)}isTileClipped(){return!0}}function MT(D,d){return d>0?d+2*D:D}let fR=ut([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),hR=ut([{name:"a_projected_pos",components:3,type:"Float32"}],4);ut([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let dR=ut([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ut([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let ST=ut([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),vR=ut([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function pR(D,d,L){let Y=d.layout.get("text-transform").evaluate(L,{});return Y==="uppercase"?D=D.toLocaleUpperCase():Y==="lowercase"&&(D=D.toLocaleLowerCase()),Yi.applyArabicShaping&&(D=Yi.applyArabicShaping(D)),D}function mR(D,d,L){for(let Y of D.sections)Y.text=pR(Y.text,d,L);return D}ut([{name:"triangle",components:3,type:"Uint16"}]),ut([{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"}]),ut([{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"}]),ut([{type:"Float32",name:"offsetX"}]),ut([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ut([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var wc=24;let T0={"!":"\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"},gR={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},yR={40:!0};function ET(D,d,L,Y,te,ue){if("fontStack"in d){let pe=L[d.fontStack],me=pe?.[D];return me?me.metrics.advance*d.scale+te:0}{let pe=Y[d.imageName];return pe?pe.displaySize[0]*d.scale*wc/ue+te:0}}function kT(D,d,L,Y){let te=Math.pow(D-d,2);return Y?DMath.max(d,this.sections[L].scale),0)}getMaxImageSize(d){let L=0,Y=0;for(let te=0;teY))}addImageSection(d){let L=d.image?d.image.name:"";if(L.length===0)return void ee("Can't add FormattedSection with an empty image.");let Y=this.getNextImageSectionCharCode();Y?(this.text+=String.fromCharCode(Y),this.sections.push({scale:1,verticalAlign:d.verticalAlign||"bottom",imageName:L}),this.sectionIndex.push(this.sections.length-1)):ee("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(d,L,Y,te,ue){let pe=[],me=this.determineAverageLineWidth(d,L,Y,te,ue),Ce=this.hasZeroWidthSpaces(),we=0,ze=0,Pe=this.text[Symbol.iterator](),at=Pe.next(),Ve=this.text[Symbol.iterator]();Ve.next();let bt=Ve.next(),Et=this.text[Symbol.iterator]();Et.next(),Et.next();let er=Et.next();for(;!at.done;){let tr=this.getSection(ze),xr=at.value.codePointAt(0);if(Dr(xr)||(we+=ET(xr,tr,Y,te,d,ue)),!bt.done){let lr=Bt(xr),Mr=bt.value.codePointAt(0);(gR[xr]||lr||"imageName"in tr||!er.done&&yR[Mr])&&pe.push(CT(ze+1,we,me,pe,_R(xr,Mr,lr&&Ce),!1))}ze++,at=Pe.next(),bt=Ve.next(),er=Et.next()}return LT(CT(this.length(),we,me,pe,0,!0))}determineAverageLineWidth(d,L,Y,te,ue){let pe=0,me=0;for(let Ce of this.text){let we=this.getSection(me);pe+=ET(Ce.codePointAt(0),we,Y,te,d,ue),me++}return pe/Math.max(1,Math.ceil(pe/L))}}let M_=4294967296,PT=1/M_,DT=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class Jm{constructor(d=new Uint8Array(16)){this.buf=ArrayBuffer.isView(d)?d:new Uint8Array(d),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(d,L,Y=this.length){for(;this.pos>3,pe=this.pos;this.type=7&te,d(ue,L,this),this.pos===pe&&this.skip(te)}return L}readMessage(d,L){return this.readFields(d,L,this.readVarint()+this.pos)}readFixed32(){let d=this.dataView.getUint32(this.pos,!0);return this.pos+=4,d}readSFixed32(){let d=this.dataView.getInt32(this.pos,!0);return this.pos+=4,d}readFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*M_;return this.pos+=8,d}readSFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*M_;return this.pos+=8,d}readFloat(){let d=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,d}readDouble(){let d=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,d}readVarint(d){let L=this.buf,Y,te;return te=L[this.pos++],Y=127&te,te<128?Y:(te=L[this.pos++],Y|=(127&te)<<7,te<128?Y:(te=L[this.pos++],Y|=(127&te)<<14,te<128?Y:(te=L[this.pos++],Y|=(127&te)<<21,te<128?Y:(te=L[this.pos],Y|=(15&te)<<28,function(ue,pe,me){let Ce=me.buf,we,ze;if(ze=Ce[me.pos++],we=(112&ze)>>4,ze<128||(ze=Ce[me.pos++],we|=(127&ze)<<3,ze<128)||(ze=Ce[me.pos++],we|=(127&ze)<<10,ze<128)||(ze=Ce[me.pos++],we|=(127&ze)<<17,ze<128)||(ze=Ce[me.pos++],we|=(127&ze)<<24,ze<128)||(ze=Ce[me.pos++],we|=(1&ze)<<31,ze<128))return hp(ue,we,pe);throw new Error("Expected varint not more than 10 bytes")}(Y,d,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let d=this.readVarint();return d%2==1?(d+1)/-2:d/2}readBoolean(){return!!this.readVarint()}readString(){let d=this.readVarint()+this.pos,L=this.pos;return this.pos=d,d-L>=12&&DT?DT.decode(this.buf.subarray(L,d)):function(Y,te,ue){let pe="",me=te;for(;me239?4:Ce>223?3:Ce>191?2:1;if(me+Ve>ue)break;Ve===1?Ce<128&&(at=Ce):Ve===2?(we=Y[me+1],(192&we)==128&&(at=(31&Ce)<<6|63&we,at<=127&&(at=null))):Ve===3?(we=Y[me+1],ze=Y[me+2],(192&we)==128&&(192&ze)==128&&(at=(15&Ce)<<12|(63&we)<<6|63&ze,(at<=2047||at>=55296&&at<=57343)&&(at=null))):Ve===4&&(we=Y[me+1],ze=Y[me+2],Pe=Y[me+3],(192&we)==128&&(192&ze)==128&&(192&Pe)==128&&(at=(15&Ce)<<18|(63&we)<<12|(63&ze)<<6|63&Pe,(at<=65535||at>=1114112)&&(at=null))),at===null?(at=65533,Ve=1):at>65535&&(at-=65536,pe+=String.fromCharCode(at>>>10&1023|55296),at=56320|1023&at),pe+=String.fromCharCode(at),me+=Ve}return pe}(this.buf,L,d)}readBytes(){let d=this.readVarint()+this.pos,L=this.buf.subarray(this.pos,d);return this.pos=d,L}readPackedVarint(d=[],L){let Y=this.readPackedEnd();for(;this.pos127;);else if(L===2)this.pos=this.readVarint()+this.pos;else if(L===5)this.pos+=4;else{if(L!==1)throw new Error(`Unimplemented type: ${L}`);this.pos+=8}}writeTag(d,L){this.writeVarint(d<<3|L)}realloc(d){let L=this.length||16;for(;L268435455||d<0?function(L,Y){let te,ue;if(L>=0?(te=L%4294967296|0,ue=L/4294967296|0):(te=~(-L%4294967296),ue=~(-L/4294967296),4294967295^te?te=te+1|0:(te=0,ue=ue+1|0)),L>=18446744073709552e3||L<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");Y.realloc(10),function(pe,me,Ce){Ce.buf[Ce.pos++]=127&pe|128,pe>>>=7,Ce.buf[Ce.pos++]=127&pe|128,pe>>>=7,Ce.buf[Ce.pos++]=127&pe|128,pe>>>=7,Ce.buf[Ce.pos++]=127&pe|128,Ce.buf[Ce.pos]=127&(pe>>>=7)}(te,0,Y),function(pe,me){let Ce=(7&pe)<<4;me.buf[me.pos++]|=Ce|((pe>>>=3)?128:0),pe&&(me.buf[me.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(me.buf[me.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(me.buf[me.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(me.buf[me.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(me.buf[me.pos++]=127&pe)))))}(ue,Y)}(d,this):(this.realloc(4),this.buf[this.pos++]=127&d|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=d>>>7&127))))}writeSVarint(d){this.writeVarint(d<0?2*-d-1:2*d)}writeBoolean(d){this.writeVarint(+d)}writeString(d){d=String(d),this.realloc(4*d.length),this.pos++;let L=this.pos;this.pos=function(te,ue,pe){for(let me,Ce,we=0;we55295&&me<57344){if(!Ce){me>56319||we+1===ue.length?(te[pe++]=239,te[pe++]=191,te[pe++]=189):Ce=me;continue}if(me<56320){te[pe++]=239,te[pe++]=191,te[pe++]=189,Ce=me;continue}me=Ce-55296<<10|me-56320|65536,Ce=null}else Ce&&(te[pe++]=239,te[pe++]=191,te[pe++]=189,Ce=null);me<128?te[pe++]=me:(me<2048?te[pe++]=me>>6|192:(me<65536?te[pe++]=me>>12|224:(te[pe++]=me>>18|240,te[pe++]=me>>12&63|128),te[pe++]=me>>6&63|128),te[pe++]=63&me|128)}return pe}(this.buf,d,this.pos);let Y=this.pos-L;Y>=128&&IT(L,Y,this),this.pos=L-1,this.writeVarint(Y),this.pos+=Y}writeFloat(d){this.realloc(4),this.dataView.setFloat32(this.pos,d,!0),this.pos+=4}writeDouble(d){this.realloc(8),this.dataView.setFloat64(this.pos,d,!0),this.pos+=8}writeBytes(d){let L=d.length;this.writeVarint(L),this.realloc(L);for(let Y=0;Y=128&&IT(Y,te,this),this.pos=Y-1,this.writeVarint(te),this.pos+=te}writeMessage(d,L,Y){this.writeTag(d,2),this.writeRawMessage(L,Y)}writePackedVarint(d,L){L.length&&this.writeMessage(d,bR,L)}writePackedSVarint(d,L){L.length&&this.writeMessage(d,xR,L)}writePackedBoolean(d,L){L.length&&this.writeMessage(d,AR,L)}writePackedFloat(d,L){L.length&&this.writeMessage(d,wR,L)}writePackedDouble(d,L){L.length&&this.writeMessage(d,TR,L)}writePackedFixed32(d,L){L.length&&this.writeMessage(d,MR,L)}writePackedSFixed32(d,L){L.length&&this.writeMessage(d,SR,L)}writePackedFixed64(d,L){L.length&&this.writeMessage(d,ER,L)}writePackedSFixed64(d,L){L.length&&this.writeMessage(d,kR,L)}writeBytesField(d,L){this.writeTag(d,2),this.writeBytes(L)}writeFixed32Field(d,L){this.writeTag(d,5),this.writeFixed32(L)}writeSFixed32Field(d,L){this.writeTag(d,5),this.writeSFixed32(L)}writeFixed64Field(d,L){this.writeTag(d,1),this.writeFixed64(L)}writeSFixed64Field(d,L){this.writeTag(d,1),this.writeSFixed64(L)}writeVarintField(d,L){this.writeTag(d,0),this.writeVarint(L)}writeSVarintField(d,L){this.writeTag(d,0),this.writeSVarint(L)}writeStringField(d,L){this.writeTag(d,2),this.writeString(L)}writeFloatField(d,L){this.writeTag(d,5),this.writeFloat(L)}writeDoubleField(d,L){this.writeTag(d,1),this.writeDouble(L)}writeBooleanField(d,L){this.writeVarintField(d,+L)}}function hp(D,d,L){return L?4294967296*d+(D>>>0):4294967296*(d>>>0)+(D>>>0)}function IT(D,d,L){let Y=d<=16383?1:d<=2097151?2:d<=268435455?3:Math.floor(Math.log(d)/(7*Math.LN2));L.realloc(Y);for(let te=L.pos-1;te>=D;te--)L.buf[te+Y]=L.buf[te]}function bR(D,d){for(let L=0;Lme.h-pe.h);let Y=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(d/.95)),L),h:1/0}],te=0,ue=0;for(let pe of D)for(let me=Y.length-1;me>=0;me--){let Ce=Y[me];if(!(pe.w>Ce.w||pe.h>Ce.h)){if(pe.x=Ce.x,pe.y=Ce.y,ue=Math.max(ue,pe.y+pe.h),te=Math.max(te,pe.x+pe.w),pe.w===Ce.w&&pe.h===Ce.h){let we=Y.pop();we&&meEt.toCodeUnitIndex(Ea));let na=xr(Et.toString(),tr);for(let Ea of na){let Na=[...Ea].map(()=>0);er.push(new fp(Ea,Et.sections,Na))}}else if(lr){er=[],tr=tr.map(_n=>Et.toCodeUnitIndex(_n));let na=0,Ea=[];for(let _n of Et.text)Ea.push(...Array(_n.length).fill(Et.sectionIndex[na])),na++;let Na=lr(Et.text,Ea,tr);for(let _n of Na){let en=[],Bn="";for(let Zn of _n[0])en.push(_n[1][Bn.length]),Bn+=Zn;er.push(new fp(_n[0],Et.sections,en))}}else er=function(na,Ea){let Na=[],_n=0;for(let en of Ea)Na.push(na.substring(_n,en)),_n=en;return _nwe){let ze=Math.ceil(ue/we);te*=ze/pe,pe=ze}return{x1:Y,y1:te,x2:Y+ue,y2:te+pe}}function NT(D,d,L,Y,te,ue){let pe=D.image,me;if(pe.content){let er=pe.content,tr=pe.pixelRatio||1;me=[er[0]/tr,er[1]/tr,pe.displaySize[0]-er[2]/tr,pe.displaySize[1]-er[3]/tr]}let Ce=d.left*ue,we=d.right*ue,ze,Pe,at,Ve;L==="width"||L==="both"?(Ve=te[0]+Ce-Y[3],Pe=te[0]+we+Y[1]):(Ve=te[0]+(Ce+we-pe.displaySize[0])/2,Pe=Ve+pe.displaySize[0]);let bt=d.top*ue,Et=d.bottom*ue;return L==="height"||L==="both"?(ze=te[1]+bt-Y[0],at=te[1]+Et+Y[2]):(ze=te[1]+(bt+Et-pe.displaySize[1])/2,at=ze+pe.displaySize[1]),{image:pe,top:ze,right:Pe,bottom:at,left:Ve,collisionPadding:me}}Ci("ImagePosition",S_),Ci("ImageAtlas",FT),l.ax=void 0,(Id=l.ax||(l.ax={}))[Id.none=0]="none",Id[Id.horizontal=1]="horizontal",Id[Id.vertical=2]="vertical",Id[Id.horizontalOnly=3]="horizontalOnly";let ad=128,Rd=32640;function OT(D,d){let{expression:L}=d;if(L.kind==="constant")return{kind:"constant",layoutSize:L.evaluate(new Ti(D+1))};if(L.kind==="source")return{kind:"source"};{let{zoomStops:Y,interpolationType:te}=L,ue=0;for(;uepe.id),this.index=d.index,this.pixelRatio=d.pixelRatio,this.sourceLayerIndex=d.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let L=this.layers[0]._unevaluatedLayout._values;this.textSizeData=OT(this.zoom,L["text-size"]),this.iconSizeData=OT(this.zoom,L["icon-size"]);let Y=this.layers[0].layout,te=Y.get("symbol-sort-key"),ue=Y.get("symbol-z-order");this.canOverlap=k_(Y,"text-overlap","text-allow-overlap")!=="never"||k_(Y,"icon-overlap","icon-allow-overlap")!=="never"||Y.get("text-ignore-placement")||Y.get("icon-ignore-placement"),this.sortFeaturesByKey=ue!=="viewport-y"&&!te.isConstant(),this.sortFeaturesByY=(ue==="viewport-y"||ue==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,Y.get("symbol-placement")==="point"&&(this.writingModes=Y.get("text-writing-mode").map(pe=>l.ax[pe])),this.stateDependentLayerIds=this.layers.filter(pe=>pe.isStateDependent()).map(pe=>pe.id),this.sourceID=d.sourceID}createArrays(){this.text=new L_(new Do(this.layers,this.zoom,d=>d.startsWith("text"))),this.icon=new L_(new Do(this.layers,this.zoom,d=>d.startsWith("icon"))),this.glyphOffsetArray=new lt,this.lineVertexArray=new ct,this.symbolInstances=new Ye,this.textAnchorOffsets=new Gt}calculateGlyphDependencies(d,L,Y,te,ue){for(let pe of d)if(L[pe.codePointAt(0)]=!0,(Y||te)&&ue){let me=T0[pe];me&&(L[me.codePointAt(0)]=!0)}}populate(d,L,Y){var te;let ue=this.layers[0],pe=ue.layout,me=pe.get("text-font"),Ce=pe.get("text-field"),we=pe.get("icon-image"),ze=(Ce.value.kind!=="constant"||Ce.value.value instanceof ro&&!Ce.value.value.isEmpty()||Ce.value.value.toString().length>0)&&(me.value.kind!=="constant"||me.value.value.length>0),Pe=we.value.kind!=="constant"||!!we.value.value||Object.keys(we.parameters).length>0,at=pe.get("symbol-sort-key");if(this.features=[],!ze&&!Pe)return;let Ve=L.iconDependencies,bt=L.glyphDependencies,Et=L.availableImages,er=new Ti(this.zoom);for(let{feature:tr,id:xr,index:lr,sourceLayerIndex:Mr}of d){let Xr=ue._featureFilter.needGeometry,na=Co(tr,Xr);if(!ue._featureFilter.filter(er,na,Y))continue;let Ea,Na;if(Xr||(na.geometry=Hl(tr)),ze){let en=ue.getValueAndResolveTokens("text-field",na,Y,Et),Bn=ro.factory(en);this.hasRTLText||(this.hasRTLText=OR(Bn)),(!this.hasRTLText||Yi.getRTLTextPluginStatus()==="unavailable"||this.hasRTLText&&Yi.isParsed())&&(Ea=mR(Bn,ue,na))}if(Pe){let en=ue.getValueAndResolveTokens("icon-image",na,Y,Et);Na=en instanceof so?en:so.fromString(en)}if(!Ea&&!Na)continue;let _n=this.sortFeaturesByKey?at.evaluate(na,{},Y):void 0;if(this.features.push({id:xr,text:Ea,icon:Na,index:lr,sourceLayerIndex:Mr,geometry:na.geometry,properties:tr.properties,type:y0.types[tr.type],sortKey:_n}),Na&&(Ve[Na.name]=!0),Ea){let en=me.evaluate(na,{},Y).join(","),Bn=pe.get("text-rotation-alignment")!=="viewport"&&pe.get("symbol-placement")!=="point";this.allowVerticalPlacement=(te=this.writingModes)===null||te===void 0?void 0:te.includes(l.ax.vertical);for(let Zn of Ea.sections)if(Zn.image)Ve[Zn.image.name]=!0;else{let Dn=Ur(Ea.toString()),rn=Zn.fontStack||en;bt[rn]||(bt[rn]={}),this.calculateGlyphDependencies(Zn.text,bt[rn],Bn,this.allowVerticalPlacement,Dn)}}}pe.get("symbol-placement")==="line"&&(this.features=function(tr){let xr={},lr={},Mr=[],Xr=0;function na(en){Mr.push(tr[en]),Xr++}function Ea(en,Bn,Zn){let Dn=lr[en];return delete lr[en],lr[Bn]=Dn,Mr[Dn].geometry[0].pop(),Mr[Dn].geometry[0]=Mr[Dn].geometry[0].concat(Zn[0]),Dn}function Na(en,Bn,Zn){let Dn=xr[Bn];return delete xr[Bn],xr[en]=Dn,Mr[Dn].geometry[0].shift(),Mr[Dn].geometry[0]=Zn[0].concat(Mr[Dn].geometry[0]),Dn}function _n(en,Bn,Zn){let Dn=Zn?Bn[0][Bn[0].length-1]:Bn[0][0];return`${en}:${Dn.x}:${Dn.y}`}for(let en=0;enen.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((tr,xr)=>tr.sortKey-xr.sortKey)}update(d,L,Y){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:Y}),this.icon.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:Y}))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(d){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(d),this.iconCollisionBox.upload(d)),this.text.upload(d,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(d,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(d,L){let Y=this.lineVertexArray.length;if(d.segment!==void 0){let te=d.dist(L[d.segment+1]),ue=d.dist(L[d.segment]),pe={};for(let me=d.segment+1;me=0;me--)pe[me]={x:L[me].x,y:L[me].y,tileUnitDistanceFromAnchor:ue},me>0&&(ue+=L[me-1].dist(L[me]));for(let me=0;me0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(d,L){let Y=d.placedSymbolArray.get(L),te=Y.vertexStartIndex+4*Y.numGlyphs;for(let ue=Y.vertexStartIndex;uete[me]-te[Ce]||ue[Ce]-ue[me]),pe}addToSortKeyRanges(d,L){let Y=this.sortKeyRanges[this.sortKeyRanges.length-1];Y?.sortKey===L?Y.symbolInstanceEnd=d+1:this.sortKeyRanges.push({sortKey:L,symbolInstanceStart:d,symbolInstanceEnd:d+1})}sortFeatures(d){if(this.sortFeaturesByY&&this.sortedAngle!==d&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(d),this.sortedAngle=d,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let L of this.symbolInstanceIndexes){let Y=this.symbolInstances.get(L);this.featureSortOrder.push(Y.featureIndex);let te=[Y.rightJustifiedTextSymbolIndex,Y.centerJustifiedTextSymbolIndex,Y.leftJustifiedTextSymbolIndex];for(let ue=0;ue=0&&te.indexOf(pe)===ue&&this.addIndicesForPlacedSymbol(this.text,pe)}Y.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Y.verticalPlacedTextSymbolIndex),Y.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Y.placedIconSymbolIndex),Y.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Y.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let jT,UT;Ci("SymbolBucket",dp,{omit:["layers","collisionBoxArray","features","compareText"]}),dp.MAX_GLYPHS=65535,dp.addDynamicAttributes=C_;var D_={get paint(){return UT=UT||new Bs({"icon-opacity":new Vi(ht.paint_symbol["icon-opacity"]),"icon-color":new Vi(ht.paint_symbol["icon-color"]),"icon-halo-color":new Vi(ht.paint_symbol["icon-halo-color"]),"icon-halo-width":new Vi(ht.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Vi(ht.paint_symbol["icon-halo-blur"]),"icon-translate":new Li(ht.paint_symbol["icon-translate"]),"icon-translate-anchor":new Li(ht.paint_symbol["icon-translate-anchor"]),"text-opacity":new Vi(ht.paint_symbol["text-opacity"]),"text-color":new Vi(ht.paint_symbol["text-color"],{runtimeType:fr,getOverride:D=>D.textColor,hasOverride:D=>!!D.textColor}),"text-halo-color":new Vi(ht.paint_symbol["text-halo-color"]),"text-halo-width":new Vi(ht.paint_symbol["text-halo-width"]),"text-halo-blur":new Vi(ht.paint_symbol["text-halo-blur"]),"text-translate":new Li(ht.paint_symbol["text-translate"]),"text-translate-anchor":new Li(ht.paint_symbol["text-translate-anchor"])})},get layout(){return jT=jT||new Bs({"symbol-placement":new Li(ht.layout_symbol["symbol-placement"]),"symbol-spacing":new Li(ht.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Li(ht.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Vi(ht.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Li(ht.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Li(ht.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Li(ht.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Li(ht.layout_symbol["icon-ignore-placement"]),"icon-optional":new Li(ht.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Li(ht.layout_symbol["icon-rotation-alignment"]),"icon-size":new Vi(ht.layout_symbol["icon-size"]),"icon-text-fit":new Li(ht.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Li(ht.layout_symbol["icon-text-fit-padding"]),"icon-image":new Vi(ht.layout_symbol["icon-image"]),"icon-rotate":new Vi(ht.layout_symbol["icon-rotate"]),"icon-padding":new Vi(ht.layout_symbol["icon-padding"]),"icon-keep-upright":new Li(ht.layout_symbol["icon-keep-upright"]),"icon-offset":new Vi(ht.layout_symbol["icon-offset"]),"icon-anchor":new Vi(ht.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Li(ht.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Li(ht.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Li(ht.layout_symbol["text-rotation-alignment"]),"text-field":new Vi(ht.layout_symbol["text-field"]),"text-font":new Vi(ht.layout_symbol["text-font"]),"text-size":new Vi(ht.layout_symbol["text-size"]),"text-max-width":new Vi(ht.layout_symbol["text-max-width"]),"text-line-height":new Li(ht.layout_symbol["text-line-height"]),"text-letter-spacing":new Vi(ht.layout_symbol["text-letter-spacing"]),"text-justify":new Vi(ht.layout_symbol["text-justify"]),"text-radial-offset":new Vi(ht.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Li(ht.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Vi(ht.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Vi(ht.layout_symbol["text-anchor"]),"text-max-angle":new Li(ht.layout_symbol["text-max-angle"]),"text-writing-mode":new Li(ht.layout_symbol["text-writing-mode"]),"text-rotate":new Vi(ht.layout_symbol["text-rotate"]),"text-padding":new Li(ht.layout_symbol["text-padding"]),"text-keep-upright":new Li(ht.layout_symbol["text-keep-upright"]),"text-transform":new Vi(ht.layout_symbol["text-transform"]),"text-offset":new Vi(ht.layout_symbol["text-offset"]),"text-allow-overlap":new Li(ht.layout_symbol["text-allow-overlap"]),"text-overlap":new Li(ht.layout_symbol["text-overlap"]),"text-ignore-placement":new Li(ht.layout_symbol["text-ignore-placement"]),"text-optional":new Li(ht.layout_symbol["text-optional"])})}};class qT{constructor(d){if(d.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=d.property.overrides?d.property.overrides.runtimeType:$t,this.defaultValue=d}evaluate(d){if(d.formattedSection){let L=this.defaultValue.property.overrides;if(L?.hasOverride(d.formattedSection))return L.getOverride(d.formattedSection)}return d.feature&&d.featureState?this.defaultValue.evaluate(d.feature,d.featureState):this.defaultValue.property.specification.default}eachChild(d){this.defaultValue.isConstant()||d(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Ci("FormatSectionOverride",qT,{omit:["defaultValue"]});class tg extends hl{constructor(d,L){super(d,D_,L)}recalculate(d,L){if(super.recalculate(d,L),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let Y=this.layout.get("text-writing-mode");if(Y){let te=[];for(let ue of Y)te.includes(ue)||te.push(ue);this.layout._values["text-writing-mode"]=te}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(d,L,Y,te){let ue=this.layout.get(d).evaluate(L,{},Y,te),pe=this._unevaluatedLayout._values[d];return pe.isDataDriven()||yc(pe.value)||!ue?ue:function(me,Ce){return Ce.replace(/{([^{}]+)}/g,(we,ze)=>me&&ze in me?String(me[ze]):"")}(L.properties,ue)}createBucket(d){return new dp(d)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let d of D_.paint.overridableProperties){if(!tg.hasPaintOverride(this.layout,d))continue;let L=this.paint.get(d),Y=new qT(L),te=new Pl(Y,L.property.specification),ue=null;ue=L.value.kind==="constant"||L.value.kind==="source"?new bc("source",te):new nc("composite",te,L.value.zoomStops),this.paint._values[d]=new Js(L.property,ue,L.parameters)}}_handleOverridablePaintPropertyUpdate(d,L,Y){return!(!this.layout||L.isDataDriven()||Y.isDataDriven())&&tg.hasPaintOverride(this.layout,d)}static hasPaintOverride(d,L){let Y=d.get("text-field"),te=D_.paint.properties[L],ue=!1,pe=me=>{var Ce;for(let we of me)if(!((Ce=te.overrides)===null||Ce===void 0)&&Ce.hasOverride(we))return void(ue=!0)};if(Y.value.kind==="constant"&&Y.value.value instanceof ro)pe(Y.value.value.sections);else if(Y.value.kind==="source"||Y.value.kind==="composite"){let me=we=>{ue||(we instanceof Wi&&ii(we.value)===ja?pe(we.value.sections):we instanceof As?pe(we.sections):we.eachChild(me))},Ce=Y.value;Ce._styleExpression&&me(Ce._styleExpression.expression)}return ue}}let VT;var jR={get paint(){return VT=VT||new Bs({"background-color":new Li(ht.paint_background["background-color"]),"background-pattern":new Ku(ht.paint_background["background-pattern"]),"background-opacity":new Li(ht.paint_background["background-opacity"])})}};class UR extends hl{constructor(d,L){super(d,jR,L)}}class qR extends hl{constructor(d,L){super(d,{},L),this.onAdd=Y=>{this.implementation.onAdd&&this.implementation.onAdd(Y,Y.painter.context.gl)},this.onRemove=Y=>{this.implementation.onRemove&&this.implementation.onRemove(Y,Y.painter.context.gl)},this.implementation=d}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class VR{constructor(d){this._methodToThrottle=d,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var d;this._triggered||(this._triggered=!0,(d=this._channel)===null||d===void 0||d.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let HR={once:!0},I_=63710088e-1;class Fd{constructor(d,L){if(isNaN(d)||isNaN(L))throw new Error(`Invalid LngLat object: (${d}, ${L})`);if(this.lng=+d,this.lat=+L,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Fd(V(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(d){let L=Math.PI/180,Y=this.lat*L,te=d.lat*L,ue=Math.sin(Y)*Math.sin(te)+Math.cos(Y)*Math.cos(te)*Math.cos((d.lng-this.lng)*L);return I_*Math.acos(Math.min(ue,1))}static convert(d){if(d instanceof Fd)return d;if(Array.isArray(d)&&(d.length===2||d.length===3))return new Fd(Number(d[0]),Number(d[1]));if(!Array.isArray(d)&&typeof d=="object"&&d!==null)return new Fd(Number("lng"in d?d.lng:d.lon),Number(d.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let HT=2*Math.PI*I_;function GT(D){return HT*Math.cos(D*Math.PI/180)}function WT(D){return(180+D)/360}function YT(D){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+D*Math.PI/360)))/360}function XT(D,d){return D/GT(d)}function $T(D){return 360*D-180}function rg(D){return 360/Math.PI*Math.atan(Math.exp((180-360*D)*Math.PI/180))-90}function ZT(D,d){return D*GT(rg(d))}class A0{constructor(d,L,Y=0){this.x=+d,this.y=+L,this.z=+Y}static fromLngLat(d,L=0){let Y=Fd.convert(d);return new A0(WT(Y.lng),YT(Y.lat),XT(L,Y.lat))}toLngLat(){return new Fd($T(this.x),rg(this.y))}toAltitude(){return ZT(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/HT*(d=rg(this.y),1/Math.cos(d*Math.PI/180));var d}}function KT(D,d,L){var Y=2*Math.PI*6378137/256/Math.pow(2,L);return[D*Y-2*Math.PI*6378137/2,d*Y-2*Math.PI*6378137/2]}class R_{constructor(d,L,Y){if(!function(te,ue,pe){return!(te<0||te>25||pe<0||pe>=Math.pow(2,te)||ue<0||ue>=Math.pow(2,te))}(d,L,Y))throw new Error(`x=${L}, y=${Y}, z=${d} outside of bounds. 0<=x<${Math.pow(2,d)}, 0<=y<${Math.pow(2,d)} 0<=z<=25 `);this.z=d,this.x=L,this.y=Y,this.key=vp(0,d,d,L,Y)}equals(d){return this.z===d.z&&this.x===d.x&&this.y===d.y}url(d,L,Y){let te=(pe=this.y,me=this.z,Ce=KT(256*(ue=this.x),256*(pe=Math.pow(2,me)-pe-1),me),we=KT(256*(ue+1),256*(pe+1),me),Ce[0]+","+Ce[1]+","+we[0]+","+we[1]);var ue,pe,me,Ce,we;let ze=function(Pe,at,Ve){let bt="";for(let Et=Pe;Et>0;Et--){let er=1<1?"@2x":"").replace(/{quadkey}/g,ze).replace(/{bbox-epsg-3857}/g,te)}isChildOf(d){let L=this.z-d.z;return L>0&&d.x===this.x>>L&&d.y===this.y>>L}getTilePoint(d){let L=Math.pow(2,this.z);return new t((d.x*L-this.x)*F,(d.y*L-this.y)*F)}toString(){return`${this.z}/${this.x}/${this.y}`}}class JT{constructor(d,L){this.wrap=d,this.canonical=L,this.key=vp(d,L.z,L.z,L.x,L.y)}}class rh{constructor(d,L,Y,te,ue){if(this.terrainRttPosMatrix32f=null,d= z; overscaledZ = ${d}; z = ${Y}`);this.overscaledZ=d,this.wrap=L,this.canonical=new R_(Y,+te,+ue),this.key=vp(L,d,Y,te,ue)}clone(){return new rh(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(d){return this.overscaledZ===d.overscaledZ&&this.wrap===d.wrap&&this.canonical.equals(d.canonical)}scaledTo(d){if(d>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${d}; overscaledZ = ${this.overscaledZ}`);let L=this.canonical.z-d;return d>this.canonical.z?new rh(d,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new rh(d,this.wrap,d,this.canonical.x>>L,this.canonical.y>>L)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(d,L){if(d>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${d}; overscaledZ = ${this.overscaledZ}`);let Y=this.canonical.z-d;return d>this.canonical.z?vp(this.wrap*+L,d,this.canonical.z,this.canonical.x,this.canonical.y):vp(this.wrap*+L,d,d,this.canonical.x>>Y,this.canonical.y>>Y)}isChildOf(d){if(d.wrap!==this.wrap||this.overscaledZ-d.overscaledZ<=0)return!1;if(d.overscaledZ===0)return this.overscaledZ>0;let L=this.canonical.z-d.canonical.z;return!(L<0)&&d.canonical.x===this.canonical.x>>L&&d.canonical.y===this.canonical.y>>L}children(d){if(this.overscaledZ>=d)return[new rh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let L=this.canonical.z+1,Y=2*this.canonical.x,te=2*this.canonical.y;return[new rh(L,this.wrap,L,Y,te),new rh(L,this.wrap,L,Y+1,te),new rh(L,this.wrap,L,Y,te+1),new rh(L,this.wrap,L,Y+1,te+1)]}isLessThan(d){return this.wrapd.wrap)&&(this.overscaledZd.overscaledZ)&&(this.canonical.xd.canonical.x)&&this.canonical.y=0&&d=0&&L=we)return null;let Pe=this.canonical.x+te,at=this.wrap;return Pe<0?(at-=Math.ceil(-Pe/we),Pe=(Pe%we+we)%we):Pe>=we&&(at+=Math.floor(Pe/we),Pe%=we),{tileID:new rh(this.overscaledZ,at,Ce,Pe,ze),x:pe,y:me}}}function vp(D,d,L,Y,te){(D*=2)<0&&(D=-1*D-1);let ue=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(d){return this.expandBy(-d)}map(d){let L=new dv;return L.extend(d(new t(this.minX,this.minY))),L.extend(d(new t(this.maxX,this.minY))),L.extend(d(new t(this.minX,this.maxY))),L.extend(d(new t(this.maxX,this.maxY))),L}static fromPoints(d){let L=new dv;for(let Y of d)L.extend(Y);return L}contains(d){return d.x>=this.minX&&d.x<=this.maxX&&d.y>=this.minY&&d.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(d){return!this.empty()&&!d.empty()&&d.minX>=this.minX&&d.maxX<=this.maxX&&d.minY>=this.minY&&d.maxY<=this.maxY}intersects(d){return!this.empty()&&!d.empty()&&d.minX<=this.maxX&&d.maxX>=this.minX&&d.minY<=this.maxY&&d.maxY>=this.minY}}class QT{constructor(d){this._stringToNumber={},this._numberToString=[];for(let L=0;L=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${d} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[d]}}class e6{constructor(d,L,Y,te,ue){this.type="Feature",this._vectorTileFeature=d,this._x=Y,this._y=te,this._z=L,this.properties=d.properties,this.id=ue}projectPoint(d,L,Y,te){return[360*(d.x+L)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(d.y+Y)/te)*Math.PI))-90]}projectLine(d,L,Y,te){return d.map(ue=>this.projectPoint(ue,L,Y,te))}get geometry(){if(this._geometry)return this._geometry;let d=this._vectorTileFeature,L=d.extent*Math.pow(2,this._z),Y=d.extent*this._x,te=d.extent*this._y,ue=d.loadGeometry();switch(d.type){case 1:{let pe=[];for(let Ce of ue)pe.push(Ce[0]);let me=this.projectLine(pe,Y,te,L);this._geometry=pe.length===1?{type:"Point",coordinates:me[0]}:{type:"MultiPoint",coordinates:me};break}case 2:{let pe=ue.map(me=>this.projectLine(me,Y,te,L));this._geometry=pe.length===1?{type:"LineString",coordinates:pe[0]}:{type:"MultiLineString",coordinates:pe};break}case 3:{let pe=aT(ue),me=[];for(let Ce of pe)me.push(Ce.map(we=>this.projectLine(we,Y,te,L)));this._geometry=me.length===1?{type:"Polygon",coordinates:me[0]}:{type:"MultiPolygon",coordinates:me};break}default:throw new Error(`unknown feature type: ${d.type}`)}return this._geometry}set geometry(d){this._geometry=d}toJSON(){let d={geometry:this.geometry};for(let L in this)L!=="_geometry"&&L!=="_vectorTileFeature"&&L!=="_x"&&L!=="_y"&&L!=="_z"&&(d[L]=this[L]);return d}}class pp{constructor(d,L,Y){this._name=d,this.dataBuffer=L,typeof Y=="number"?this._size=Y:(this.nullabilityBuffer=Y,this._size=Y.size())}getValue(d){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(d)?null:this.getValueFromBuffer(d)}has(d){var L;return((L=this.nullabilityBuffer)==null?void 0:L.get(d))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class ag extends pp{}class F_ extends ag{getValueFromBuffer(d){return this.dataBuffer[d]}}class z_ extends ag{getValueFromBuffer(d){return this.dataBuffer[d]}}class t6 extends pp{constructor(d,L,Y,te){super(d,L,te),this.delta=Y}}class B_ extends t6{constructor(d,L,Y,te){super(d,Int32Array.of(L),Y,te)}getValueFromBuffer(d){return this.dataBuffer[0]+d*this.delta}}class N_ extends pp{constructor(d,L,Y,te){super(d,te?Int32Array.of(L):Uint32Array.of(L),Y)}getValueFromBuffer(d){return this.dataBuffer[0]}}class GR{constructor(d,L,Y,te,ue=4096){this._name=d,this._geometryVector=L,this._idVector=Y,this._propertyVectors=te,this._extent=ue}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(d){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map(L=>[L.name,L]))),this.propertyVectorsMap.get(d)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let d=[],L=this.geometryVector.getGeometries();for(let Y=0;Y>>32-D;let j_=O_,nd=256;function U_(D,d){return D-D%d}function WR(D){let d=D>>>0;return((255&d)<<24|(65280&d)<<8|d>>>8&65280|d>>>24&255)>>>0}let q_=function(){if(!Number.isFinite(65536))return 65536;let D=U_(Math.floor(65536),nd);return D===0?nd:D}(),YR=3*q_/nd+q_|0;function a6(){let D=new Uint8Array(YR);return{dataToBePacked:new Array(33),dataPointers:new Int32Array(33),byteContainer:D,byteContainerI32:new Int32Array(D.buffer,D.byteOffset,D.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function XR(D,d,L,Y,te){switch(te){case 1:(function(ue,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let at=ue[ze++]>>>0;me[we++]=at>>>0&1,me[we++]=at>>>1&1,me[we++]=at>>>2&1,me[we++]=at>>>3&1,me[we++]=at>>>4&1,me[we++]=at>>>5&1,me[we++]=at>>>6&1,me[we++]=at>>>7&1,me[we++]=at>>>8&1,me[we++]=at>>>9&1,me[we++]=at>>>10&1,me[we++]=at>>>11&1,me[we++]=at>>>12&1,me[we++]=at>>>13&1,me[we++]=at>>>14&1,me[we++]=at>>>15&1,me[we++]=at>>>16&1,me[we++]=at>>>17&1,me[we++]=at>>>18&1,me[we++]=at>>>19&1,me[we++]=at>>>20&1,me[we++]=at>>>21&1,me[we++]=at>>>22&1,me[we++]=at>>>23&1,me[we++]=at>>>24&1,me[we++]=at>>>25&1,me[we++]=at>>>26&1,me[we++]=at>>>27&1,me[we++]=at>>>28&1,me[we++]=at>>>29&1,me[we++]=at>>>30&1,me[we++]=at>>>31&1}})(D,d,L,Y);break;case 2:(function(ue,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let at=ue[ze++]>>>0,Ve=ue[ze++]>>>0;me[we++]=at>>>0&3,me[we++]=at>>>2&3,me[we++]=at>>>4&3,me[we++]=at>>>6&3,me[we++]=at>>>8&3,me[we++]=at>>>10&3,me[we++]=at>>>12&3,me[we++]=at>>>14&3,me[we++]=at>>>16&3,me[we++]=at>>>18&3,me[we++]=at>>>20&3,me[we++]=at>>>22&3,me[we++]=at>>>24&3,me[we++]=at>>>26&3,me[we++]=at>>>28&3,me[we++]=at>>>30&3,me[we++]=Ve>>>0&3,me[we++]=Ve>>>2&3,me[we++]=Ve>>>4&3,me[we++]=Ve>>>6&3,me[we++]=Ve>>>8&3,me[we++]=Ve>>>10&3,me[we++]=Ve>>>12&3,me[we++]=Ve>>>14&3,me[we++]=Ve>>>16&3,me[we++]=Ve>>>18&3,me[we++]=Ve>>>20&3,me[we++]=Ve>>>22&3,me[we++]=Ve>>>24&3,me[we++]=Ve>>>26&3,me[we++]=Ve>>>28&3,me[we++]=Ve>>>30&3}})(D,d,L,Y);break;case 3:(function(ue,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let at=ue[ze++]>>>0,Ve=ue[ze++]>>>0,bt=ue[ze++]>>>0;me[we++]=at>>>0&7,me[we++]=at>>>3&7,me[we++]=at>>>6&7,me[we++]=at>>>9&7,me[we++]=at>>>12&7,me[we++]=at>>>15&7,me[we++]=at>>>18&7,me[we++]=at>>>21&7,me[we++]=at>>>24&7,me[we++]=at>>>27&7,me[we++]=7&(at>>>30|(1&Ve)<<2),me[we++]=Ve>>>1&7,me[we++]=Ve>>>4&7,me[we++]=Ve>>>7&7,me[we++]=Ve>>>10&7,me[we++]=Ve>>>13&7,me[we++]=Ve>>>16&7,me[we++]=Ve>>>19&7,me[we++]=Ve>>>22&7,me[we++]=Ve>>>25&7,me[we++]=Ve>>>28&7,me[we++]=7&(Ve>>>31|(3&bt)<<1),me[we++]=bt>>>2&7,me[we++]=bt>>>5&7,me[we++]=bt>>>8&7,me[we++]=bt>>>11&7,me[we++]=bt>>>14&7,me[we++]=bt>>>17&7,me[we++]=bt>>>20&7,me[we++]=bt>>>23&7,me[we++]=bt>>>26&7,me[we++]=bt>>>29&7}})(D,d,L,Y);break;case 4:(function(ue,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let at=ue[ze++]>>>0,Ve=ue[ze++]>>>0,bt=ue[ze++]>>>0,Et=ue[ze++]>>>0;me[we++]=at>>>0&15,me[we++]=at>>>4&15,me[we++]=at>>>8&15,me[we++]=at>>>12&15,me[we++]=at>>>16&15,me[we++]=at>>>20&15,me[we++]=at>>>24&15,me[we++]=at>>>28&15,me[we++]=Ve>>>0&15,me[we++]=Ve>>>4&15,me[we++]=Ve>>>8&15,me[we++]=Ve>>>12&15,me[we++]=Ve>>>16&15,me[we++]=Ve>>>20&15,me[we++]=Ve>>>24&15,me[we++]=Ve>>>28&15,me[we++]=bt>>>0&15,me[we++]=bt>>>4&15,me[we++]=bt>>>8&15,me[we++]=bt>>>12&15,me[we++]=bt>>>16&15,me[we++]=bt>>>20&15,me[we++]=bt>>>24&15,me[we++]=bt>>>28&15,me[we++]=Et>>>0&15,me[we++]=Et>>>4&15,me[we++]=Et>>>8&15,me[we++]=Et>>>12&15,me[we++]=Et>>>16&15,me[we++]=Et>>>20&15,me[we++]=Et>>>24&15,me[we++]=Et>>>28&15}})(D,d,L,Y);break;case 5:(function(ue,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let at=ue[ze++]>>>0,Ve=ue[ze++]>>>0,bt=ue[ze++]>>>0,Et=ue[ze++]>>>0,er=ue[ze++]>>>0;me[we++]=at>>>0&31,me[we++]=at>>>5&31,me[we++]=at>>>10&31,me[we++]=at>>>15&31,me[we++]=at>>>20&31,me[we++]=at>>>25&31,me[we++]=31&(at>>>30|(7&Ve)<<2),me[we++]=Ve>>>3&31,me[we++]=Ve>>>8&31,me[we++]=Ve>>>13&31,me[we++]=Ve>>>18&31,me[we++]=Ve>>>23&31,me[we++]=31&(Ve>>>28|(1&bt)<<4),me[we++]=bt>>>1&31,me[we++]=bt>>>6&31,me[we++]=bt>>>11&31,me[we++]=bt>>>16&31,me[we++]=bt>>>21&31,me[we++]=bt>>>26&31,me[we++]=31&(bt>>>31|(15&Et)<<1),me[we++]=Et>>>4&31,me[we++]=Et>>>9&31,me[we++]=Et>>>14&31,me[we++]=Et>>>19&31,me[we++]=Et>>>24&31,me[we++]=31&(Et>>>29|(3&er)<<3),me[we++]=er>>>2&31,me[we++]=er>>>7&31,me[we++]=er>>>12&31,me[we++]=er>>>17&31,me[we++]=er>>>22&31,me[we++]=er>>>27&31}})(D,d,L,Y);break;case 6:(function(ue,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let at=ue[ze++]>>>0,Ve=ue[ze++]>>>0,bt=ue[ze++]>>>0,Et=ue[ze++]>>>0,er=ue[ze++]>>>0,tr=ue[ze++]>>>0;me[we++]=at>>>0&63,me[we++]=at>>>6&63,me[we++]=at>>>12&63,me[we++]=at>>>18&63,me[we++]=at>>>24&63,me[we++]=63&(at>>>30|(15&Ve)<<2),me[we++]=Ve>>>4&63,me[we++]=Ve>>>10&63,me[we++]=Ve>>>16&63,me[we++]=Ve>>>22&63,me[we++]=63&(Ve>>>28|(3&bt)<<4),me[we++]=bt>>>2&63,me[we++]=bt>>>8&63,me[we++]=bt>>>14&63,me[we++]=bt>>>20&63,me[we++]=bt>>>26&63,me[we++]=Et>>>0&63,me[we++]=Et>>>6&63,me[we++]=Et>>>12&63,me[we++]=Et>>>18&63,me[we++]=Et>>>24&63,me[we++]=63&(Et>>>30|(15&er)<<2),me[we++]=er>>>4&63,me[we++]=er>>>10&63,me[we++]=er>>>16&63,me[we++]=er>>>22&63,me[we++]=63&(er>>>28|(3&tr)<<4),me[we++]=tr>>>2&63,me[we++]=tr>>>8&63,me[we++]=tr>>>14&63,me[we++]=tr>>>20&63,me[we++]=tr>>>26&63}})(D,d,L,Y);break;case 7:(function(ue,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let at=ue[ze++]>>>0,Ve=ue[ze++]>>>0,bt=ue[ze++]>>>0,Et=ue[ze++]>>>0,er=ue[ze++]>>>0,tr=ue[ze++]>>>0,xr=ue[ze++]>>>0;me[we++]=at>>>0&127,me[we++]=at>>>7&127,me[we++]=at>>>14&127,me[we++]=at>>>21&127,me[we++]=127&(at>>>28|(7&Ve)<<4),me[we++]=Ve>>>3&127,me[we++]=Ve>>>10&127,me[we++]=Ve>>>17&127,me[we++]=Ve>>>24&127,me[we++]=127&(Ve>>>31|(63&bt)<<1),me[we++]=bt>>>6&127,me[we++]=bt>>>13&127,me[we++]=bt>>>20&127,me[we++]=127&(bt>>>27|(3&Et)<<5),me[we++]=Et>>>2&127,me[we++]=Et>>>9&127,me[we++]=Et>>>16&127,me[we++]=Et>>>23&127,me[we++]=127&(Et>>>30|(31&er)<<2),me[we++]=er>>>5&127,me[we++]=er>>>12&127,me[we++]=er>>>19&127,me[we++]=127&(er>>>26|(1&tr)<<6),me[we++]=tr>>>1&127,me[we++]=tr>>>8&127,me[we++]=tr>>>15&127,me[we++]=tr>>>22&127,me[we++]=127&(tr>>>29|(15&xr)<<3),me[we++]=xr>>>4&127,me[we++]=xr>>>11&127,me[we++]=xr>>>18&127,me[we++]=xr>>>25&127}})(D,d,L,Y);break;case 8:(function(ue,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let at=ue[ze++]>>>0,Ve=ue[ze++]>>>0,bt=ue[ze++]>>>0,Et=ue[ze++]>>>0,er=ue[ze++]>>>0,tr=ue[ze++]>>>0,xr=ue[ze++]>>>0,lr=ue[ze++]>>>0;me[we++]=at>>>0&255,me[we++]=at>>>8&255,me[we++]=at>>>16&255,me[we++]=at>>>24&255,me[we++]=Ve>>>0&255,me[we++]=Ve>>>8&255,me[we++]=Ve>>>16&255,me[we++]=Ve>>>24&255,me[we++]=bt>>>0&255,me[we++]=bt>>>8&255,me[we++]=bt>>>16&255,me[we++]=bt>>>24&255,me[we++]=Et>>>0&255,me[we++]=Et>>>8&255,me[we++]=Et>>>16&255,me[we++]=Et>>>24&255,me[we++]=er>>>0&255,me[we++]=er>>>8&255,me[we++]=er>>>16&255,me[we++]=er>>>24&255,me[we++]=tr>>>0&255,me[we++]=tr>>>8&255,me[we++]=tr>>>16&255,me[we++]=tr>>>24&255,me[we++]=xr>>>0&255,me[we++]=xr>>>8&255,me[we++]=xr>>>16&255,me[we++]=xr>>>24&255,me[we++]=lr>>>0&255,me[we++]=lr>>>8&255,me[we++]=lr>>>16&255,me[we++]=lr>>>24&255}})(D,d,L,Y);break;case 16:(function(ue,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<128;Pe++){let at=ue[ze++]>>>0;me[we++]=65535&at,me[we++]=at>>>16&65535}})(D,d,L,Y);break;default:(function(ue,pe,me,Ce,we){let ze=j_[we]>>>0,Pe=pe,at=0,Ve=ue[Pe]>>>0,bt=Ce;for(let Et=0;Et<8;Et++){for(let er=0;er<32;er++)if(at+we<=32)me[bt+er]=Ve>>>at&ze,at+=we,at===32&&(at=0,Pe++,er!==31&&(Ve=ue[Pe]>>>0));else{let tr=32-at,xr=Ve>>>at;Pe++,Ve=ue[Pe]>>>0;let lr=we-tr;me[bt+er]=(xr|(Ve&-1>>>32-lr>>>0)<>>0)}})(D,d,L,Y,te)}return d+(te<<3)|0}function $R(D,d,L,Y){if(L+2>d)throw new Error(`FastPFOR decode: byteContainer underflow at block=${Y} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${L}, byteSize=${d})`);let te=D[L++],ue=D[L++];if(te>32)throw new Error(`FastPFOR decode: invalid bitWidth=${te} at block=${Y} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:te,exceptionCount:ue,bytePosIn:L}}function ZR(D,d,L,Y,te,ue,pe,me,Ce){let{maxBits:we,exceptionBitWidth:ze,bytePosIn:Pe}=function(er,tr,xr,lr,Mr,Xr){if(xr+1>tr)throw new Error(`FastPFOR decode: exception header underflow at block=${Xr} (need 1 byte for maxBits, bytePos=${xr}, byteSize=${tr})`);let na=er[xr++];if(na32)throw new Error(`FastPFOR decode: invalid maxBits=${na} at block=${Xr} (bitWidth=${lr}, expected ${lr}..32)`);let Ea=na-lr|0;if(Ea<1||Ea>32)throw new Error(`FastPFOR decode: invalid exceptionBitWidth=${Ea} at block=${Xr} (bitWidth=${lr}, maxBits=${na})`);if(xr+Mr>tr)throw new Error(`FastPFOR decode: exception positions underflow at block=${Xr} (need=${Mr}, have=${tr-xr})`);return{maxBits:na,exceptionBitWidth:Ea,bytePosIn:xr}}(te,ue,pe,L,Y,Ce);if(pe=Pe,ze===1){let er=1<Et)throw new Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${ze} (ptr=${bt}, need ${Y}, size=${Et}) at block ${Ce}`);for(let er=0;erD.length-1)throw new Error(`FastPFOR decode: invalid whereMeta=${me} at pageStart=${pe} (expected > 0 and pageStart+whereMeta < encoded.length=${D.length})`);let Ce=pe+1|0,we=pe+me|0,ze=D[we]>>>0,Pe=ze+3>>>2,at=we+1,Ve=at+Pe;if(Ve>=D.length)throw new Error(`FastPFOR decode: invalid byteSize=${ze} (metaInts=${Pe}, pageStart=${pe}, packedEnd=${we}, byteContainerStart=${at}) causes bitmapPos=${Ve} out of bounds (encoded.length=${D.length})`);let bt=function(tr,xr,lr,Mr){Mr.byteContainer.length>>2;if(3&Xr.byteOffset)for(let Na=0;Na>>8&255,Xr[en+2|0]=_n>>>16&255,Xr[en+3|0]=_n>>>24&255}else{let Na=Mr.byteContainerI32;(!Na||Na.buffer!==Xr.buffer||Na.byteOffset!==Xr.byteOffset||Na.length>>2)),Na.set(tr.subarray(xr,xr+na))}let Ea=3&lr;if(Ea>0){let Na=0|tr[xr+na|0],_n=na<<2;for(let en=0;en>>(en<<3)&255}return Xr}(D,at,ze,ue),Et=ze,er=function(tr,xr,lr){let Mr=0|tr[xr++],Xr=lr.dataToBePacked;for(let na=2;na<=32;na=na+1|0){if(!(Mr>>>na-1&1))continue;if(xr>=tr.length)throw new Error(`FastPFOR decode: truncated exception stream header (bitWidth=${na}, streamWordIndex=${xr}, needWords=1, availableWords=${tr.length-xr}, encodedWords=${tr.length})`);let Ea=tr[xr++]>>>0,Na=U_(Ea+31,32),_n=Ea*na+31>>>5;if(xr+_n>tr.length)throw new Error(`FastPFOR decode: truncated exception stream (bitWidth=${na}, size=${Ea}, streamWordIndex=${xr}, needWords=${_n}, availableWords=${tr.length-xr}, encodedWords=${tr.length})`);let en=Xr[na];(!en||en.length>>5)|0,lr.exceptionSizes[na]=Ea}return xr}(D,Ve,ue);return ue.dataPointers.fill(0),function(tr,xr,lr,Mr,Xr,na,Ea,Na,_n,en){let Bn=0|lr,Zn=0;for(let Dn=0;Dn0&&(Zn=ZR(Xr,ui,li,xi,Na,_n,Zn,en,Dn))}if(Bn!==Mr)throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${xr}, packedStart=${lr}, consumedPackedEnd=${Bn}, expectedPackedEnd=${Mr}, packedWords=${Mr-lr}, encoded.length=${tr.length})`)}(D,pe,Ce,we,d,0|Y,te/nd|0,bt,Et,ue),er}function JR(D,d,L,Y,te){switch(te){case 2:return void function(we,ze,Pe,at){let Ve=at,bt=we[ze]>>>0,Et=we[ze+1]>>>0;Pe[Ve++]=bt>>>0&3,Pe[Ve++]=bt>>>2&3,Pe[Ve++]=bt>>>4&3,Pe[Ve++]=bt>>>6&3,Pe[Ve++]=bt>>>8&3,Pe[Ve++]=bt>>>10&3,Pe[Ve++]=bt>>>12&3,Pe[Ve++]=bt>>>14&3,Pe[Ve++]=bt>>>16&3,Pe[Ve++]=bt>>>18&3,Pe[Ve++]=bt>>>20&3,Pe[Ve++]=bt>>>22&3,Pe[Ve++]=bt>>>24&3,Pe[Ve++]=bt>>>26&3,Pe[Ve++]=bt>>>28&3,Pe[Ve++]=bt>>>30&3,Pe[Ve++]=Et>>>0&3,Pe[Ve++]=Et>>>2&3,Pe[Ve++]=Et>>>4&3,Pe[Ve++]=Et>>>6&3,Pe[Ve++]=Et>>>8&3,Pe[Ve++]=Et>>>10&3,Pe[Ve++]=Et>>>12&3,Pe[Ve++]=Et>>>14&3,Pe[Ve++]=Et>>>16&3,Pe[Ve++]=Et>>>18&3,Pe[Ve++]=Et>>>20&3,Pe[Ve++]=Et>>>22&3,Pe[Ve++]=Et>>>24&3,Pe[Ve++]=Et>>>26&3,Pe[Ve++]=Et>>>28&3,Pe[Ve]=Et>>>30&3}(D,d,L,Y);case 3:return void function(we,ze,Pe,at){let Ve=at,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0;Pe[Ve++]=bt>>>0&7,Pe[Ve++]=bt>>>3&7,Pe[Ve++]=bt>>>6&7,Pe[Ve++]=bt>>>9&7,Pe[Ve++]=bt>>>12&7,Pe[Ve++]=bt>>>15&7,Pe[Ve++]=bt>>>18&7,Pe[Ve++]=bt>>>21&7,Pe[Ve++]=bt>>>24&7,Pe[Ve++]=bt>>>27&7,Pe[Ve++]=7&(bt>>>30|(1&Et)<<2),Pe[Ve++]=Et>>>1&7,Pe[Ve++]=Et>>>4&7,Pe[Ve++]=Et>>>7&7,Pe[Ve++]=Et>>>10&7,Pe[Ve++]=Et>>>13&7,Pe[Ve++]=Et>>>16&7,Pe[Ve++]=Et>>>19&7,Pe[Ve++]=Et>>>22&7,Pe[Ve++]=Et>>>25&7,Pe[Ve++]=Et>>>28&7,Pe[Ve++]=7&(Et>>>31|(3&er)<<1),Pe[Ve++]=er>>>2&7,Pe[Ve++]=er>>>5&7,Pe[Ve++]=er>>>8&7,Pe[Ve++]=er>>>11&7,Pe[Ve++]=er>>>14&7,Pe[Ve++]=er>>>17&7,Pe[Ve++]=er>>>20&7,Pe[Ve++]=er>>>23&7,Pe[Ve++]=er>>>26&7,Pe[Ve]=er>>>29&7}(D,d,L,Y);case 4:return void function(we,ze,Pe,at){let Ve=at,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0;Pe[Ve++]=bt>>>0&15,Pe[Ve++]=bt>>>4&15,Pe[Ve++]=bt>>>8&15,Pe[Ve++]=bt>>>12&15,Pe[Ve++]=bt>>>16&15,Pe[Ve++]=bt>>>20&15,Pe[Ve++]=bt>>>24&15,Pe[Ve++]=bt>>>28&15,Pe[Ve++]=Et>>>0&15,Pe[Ve++]=Et>>>4&15,Pe[Ve++]=Et>>>8&15,Pe[Ve++]=Et>>>12&15,Pe[Ve++]=Et>>>16&15,Pe[Ve++]=Et>>>20&15,Pe[Ve++]=Et>>>24&15,Pe[Ve++]=Et>>>28&15,Pe[Ve++]=er>>>0&15,Pe[Ve++]=er>>>4&15,Pe[Ve++]=er>>>8&15,Pe[Ve++]=er>>>12&15,Pe[Ve++]=er>>>16&15,Pe[Ve++]=er>>>20&15,Pe[Ve++]=er>>>24&15,Pe[Ve++]=er>>>28&15,Pe[Ve++]=tr>>>0&15,Pe[Ve++]=tr>>>4&15,Pe[Ve++]=tr>>>8&15,Pe[Ve++]=tr>>>12&15,Pe[Ve++]=tr>>>16&15,Pe[Ve++]=tr>>>20&15,Pe[Ve++]=tr>>>24&15,Pe[Ve]=tr>>>28&15}(D,d,L,Y);case 5:return void function(we,ze,Pe,at){let Ve=at,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0;Pe[Ve++]=bt>>>0&31,Pe[Ve++]=bt>>>5&31,Pe[Ve++]=bt>>>10&31,Pe[Ve++]=bt>>>15&31,Pe[Ve++]=bt>>>20&31,Pe[Ve++]=bt>>>25&31,Pe[Ve++]=31&(bt>>>30|(7&Et)<<2),Pe[Ve++]=Et>>>3&31,Pe[Ve++]=Et>>>8&31,Pe[Ve++]=Et>>>13&31,Pe[Ve++]=Et>>>18&31,Pe[Ve++]=Et>>>23&31,Pe[Ve++]=31&(Et>>>28|(1&er)<<4),Pe[Ve++]=er>>>1&31,Pe[Ve++]=er>>>6&31,Pe[Ve++]=er>>>11&31,Pe[Ve++]=er>>>16&31,Pe[Ve++]=er>>>21&31,Pe[Ve++]=er>>>26&31,Pe[Ve++]=31&(er>>>31|(15&tr)<<1),Pe[Ve++]=tr>>>4&31,Pe[Ve++]=tr>>>9&31,Pe[Ve++]=tr>>>14&31,Pe[Ve++]=tr>>>19&31,Pe[Ve++]=tr>>>24&31,Pe[Ve++]=31&(tr>>>29|(3&xr)<<3),Pe[Ve++]=xr>>>2&31,Pe[Ve++]=xr>>>7&31,Pe[Ve++]=xr>>>12&31,Pe[Ve++]=xr>>>17&31,Pe[Ve++]=xr>>>22&31,Pe[Ve]=xr>>>27&31}(D,d,L,Y);case 6:return void function(we,ze,Pe,at){let Ve=at,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0;Pe[Ve++]=bt>>>0&63,Pe[Ve++]=bt>>>6&63,Pe[Ve++]=bt>>>12&63,Pe[Ve++]=bt>>>18&63,Pe[Ve++]=bt>>>24&63,Pe[Ve++]=63&(bt>>>30|(15&Et)<<2),Pe[Ve++]=Et>>>4&63,Pe[Ve++]=Et>>>10&63,Pe[Ve++]=Et>>>16&63,Pe[Ve++]=Et>>>22&63,Pe[Ve++]=63&(Et>>>28|(3&er)<<4),Pe[Ve++]=er>>>2&63,Pe[Ve++]=er>>>8&63,Pe[Ve++]=er>>>14&63,Pe[Ve++]=er>>>20&63,Pe[Ve++]=er>>>26&63,Pe[Ve++]=tr>>>0&63,Pe[Ve++]=tr>>>6&63,Pe[Ve++]=tr>>>12&63,Pe[Ve++]=tr>>>18&63,Pe[Ve++]=tr>>>24&63,Pe[Ve++]=63&(tr>>>30|(15&xr)<<2),Pe[Ve++]=xr>>>4&63,Pe[Ve++]=xr>>>10&63,Pe[Ve++]=xr>>>16&63,Pe[Ve++]=xr>>>22&63,Pe[Ve++]=63&(xr>>>28|(3&lr)<<4),Pe[Ve++]=lr>>>2&63,Pe[Ve++]=lr>>>8&63,Pe[Ve++]=lr>>>14&63,Pe[Ve++]=lr>>>20&63,Pe[Ve]=lr>>>26&63}(D,d,L,Y);case 7:return void function(we,ze,Pe,at){let Ve=at,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0;Pe[Ve++]=bt>>>0&127,Pe[Ve++]=bt>>>7&127,Pe[Ve++]=bt>>>14&127,Pe[Ve++]=bt>>>21&127,Pe[Ve++]=127&(bt>>>28|(7&Et)<<4),Pe[Ve++]=Et>>>3&127,Pe[Ve++]=Et>>>10&127,Pe[Ve++]=Et>>>17&127,Pe[Ve++]=Et>>>24&127,Pe[Ve++]=127&(Et>>>31|(63&er)<<1),Pe[Ve++]=er>>>6&127,Pe[Ve++]=er>>>13&127,Pe[Ve++]=er>>>20&127,Pe[Ve++]=127&(er>>>27|(3&tr)<<5),Pe[Ve++]=tr>>>2&127,Pe[Ve++]=tr>>>9&127,Pe[Ve++]=tr>>>16&127,Pe[Ve++]=tr>>>23&127,Pe[Ve++]=127&(tr>>>30|(31&xr)<<2),Pe[Ve++]=xr>>>5&127,Pe[Ve++]=xr>>>12&127,Pe[Ve++]=xr>>>19&127,Pe[Ve++]=127&(xr>>>26|(1&lr)<<6),Pe[Ve++]=lr>>>1&127,Pe[Ve++]=lr>>>8&127,Pe[Ve++]=lr>>>15&127,Pe[Ve++]=lr>>>22&127,Pe[Ve++]=127&(lr>>>29|(15&Mr)<<3),Pe[Ve++]=Mr>>>4&127,Pe[Ve++]=Mr>>>11&127,Pe[Ve++]=Mr>>>18&127,Pe[Ve]=Mr>>>25&127}(D,d,L,Y);case 8:return void function(we,ze,Pe,at){let Ve=at,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0;Pe[Ve++]=bt>>>0&255,Pe[Ve++]=bt>>>8&255,Pe[Ve++]=bt>>>16&255,Pe[Ve++]=bt>>>24&255,Pe[Ve++]=Et>>>0&255,Pe[Ve++]=Et>>>8&255,Pe[Ve++]=Et>>>16&255,Pe[Ve++]=Et>>>24&255,Pe[Ve++]=er>>>0&255,Pe[Ve++]=er>>>8&255,Pe[Ve++]=er>>>16&255,Pe[Ve++]=er>>>24&255,Pe[Ve++]=tr>>>0&255,Pe[Ve++]=tr>>>8&255,Pe[Ve++]=tr>>>16&255,Pe[Ve++]=tr>>>24&255,Pe[Ve++]=xr>>>0&255,Pe[Ve++]=xr>>>8&255,Pe[Ve++]=xr>>>16&255,Pe[Ve++]=xr>>>24&255,Pe[Ve++]=lr>>>0&255,Pe[Ve++]=lr>>>8&255,Pe[Ve++]=lr>>>16&255,Pe[Ve++]=lr>>>24&255,Pe[Ve++]=Mr>>>0&255,Pe[Ve++]=Mr>>>8&255,Pe[Ve++]=Mr>>>16&255,Pe[Ve++]=Mr>>>24&255,Pe[Ve++]=Xr>>>0&255,Pe[Ve++]=Xr>>>8&255,Pe[Ve++]=Xr>>>16&255,Pe[Ve]=Xr>>>24&255}(D,d,L,Y);case 9:return void function(we,ze,Pe,at){let Ve=at,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0,na=we[ze+8]>>>0;Pe[Ve++]=bt>>>0&511,Pe[Ve++]=bt>>>9&511,Pe[Ve++]=bt>>>18&511,Pe[Ve++]=511&(bt>>>27|(15&Et)<<5),Pe[Ve++]=Et>>>4&511,Pe[Ve++]=Et>>>13&511,Pe[Ve++]=Et>>>22&511,Pe[Ve++]=511&(Et>>>31|(255&er)<<1),Pe[Ve++]=er>>>8&511,Pe[Ve++]=er>>>17&511,Pe[Ve++]=511&(er>>>26|(7&tr)<<6),Pe[Ve++]=tr>>>3&511,Pe[Ve++]=tr>>>12&511,Pe[Ve++]=tr>>>21&511,Pe[Ve++]=511&(tr>>>30|(127&xr)<<2),Pe[Ve++]=xr>>>7&511,Pe[Ve++]=xr>>>16&511,Pe[Ve++]=511&(xr>>>25|(3&lr)<<7),Pe[Ve++]=lr>>>2&511,Pe[Ve++]=lr>>>11&511,Pe[Ve++]=lr>>>20&511,Pe[Ve++]=511&(lr>>>29|(63&Mr)<<3),Pe[Ve++]=Mr>>>6&511,Pe[Ve++]=Mr>>>15&511,Pe[Ve++]=511&(Mr>>>24|(1&Xr)<<8),Pe[Ve++]=Xr>>>1&511,Pe[Ve++]=Xr>>>10&511,Pe[Ve++]=Xr>>>19&511,Pe[Ve++]=511&(Xr>>>28|(31&na)<<4),Pe[Ve++]=na>>>5&511,Pe[Ve++]=na>>>14&511,Pe[Ve]=na>>>23&511}(D,d,L,Y);case 10:return void function(we,ze,Pe,at){let Ve=at,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0,na=we[ze+8]>>>0,Ea=we[ze+9]>>>0;Pe[Ve++]=bt>>>0&1023,Pe[Ve++]=bt>>>10&1023,Pe[Ve++]=bt>>>20&1023,Pe[Ve++]=1023&(bt>>>30|(255&Et)<<2),Pe[Ve++]=Et>>>8&1023,Pe[Ve++]=Et>>>18&1023,Pe[Ve++]=1023&(Et>>>28|(63&er)<<4),Pe[Ve++]=er>>>6&1023,Pe[Ve++]=er>>>16&1023,Pe[Ve++]=1023&(er>>>26|(15&tr)<<6),Pe[Ve++]=tr>>>4&1023,Pe[Ve++]=tr>>>14&1023,Pe[Ve++]=1023&(tr>>>24|(3&xr)<<8),Pe[Ve++]=xr>>>2&1023,Pe[Ve++]=xr>>>12&1023,Pe[Ve++]=xr>>>22&1023,Pe[Ve++]=lr>>>0&1023,Pe[Ve++]=lr>>>10&1023,Pe[Ve++]=lr>>>20&1023,Pe[Ve++]=1023&(lr>>>30|(255&Mr)<<2),Pe[Ve++]=Mr>>>8&1023,Pe[Ve++]=Mr>>>18&1023,Pe[Ve++]=1023&(Mr>>>28|(63&Xr)<<4),Pe[Ve++]=Xr>>>6&1023,Pe[Ve++]=Xr>>>16&1023,Pe[Ve++]=1023&(Xr>>>26|(15&na)<<6),Pe[Ve++]=na>>>4&1023,Pe[Ve++]=na>>>14&1023,Pe[Ve++]=1023&(na>>>24|(3&Ea)<<8),Pe[Ve++]=Ea>>>2&1023,Pe[Ve++]=Ea>>>12&1023,Pe[Ve]=Ea>>>22&1023}(D,d,L,Y);case 11:return void function(we,ze,Pe,at){let Ve=at,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0,na=we[ze+8]>>>0,Ea=we[ze+9]>>>0,Na=we[ze+10]>>>0;Pe[Ve++]=bt>>>0&2047,Pe[Ve++]=bt>>>11&2047,Pe[Ve++]=2047&(bt>>>22|(1&Et)<<10),Pe[Ve++]=Et>>>1&2047,Pe[Ve++]=Et>>>12&2047,Pe[Ve++]=2047&(Et>>>23|(3&er)<<9),Pe[Ve++]=er>>>2&2047,Pe[Ve++]=er>>>13&2047,Pe[Ve++]=2047&(er>>>24|(7&tr)<<8),Pe[Ve++]=tr>>>3&2047,Pe[Ve++]=tr>>>14&2047,Pe[Ve++]=2047&(tr>>>25|(15&xr)<<7),Pe[Ve++]=xr>>>4&2047,Pe[Ve++]=xr>>>15&2047,Pe[Ve++]=2047&(xr>>>26|(31&lr)<<6),Pe[Ve++]=lr>>>5&2047,Pe[Ve++]=lr>>>16&2047,Pe[Ve++]=2047&(lr>>>27|(63&Mr)<<5),Pe[Ve++]=Mr>>>6&2047,Pe[Ve++]=Mr>>>17&2047,Pe[Ve++]=2047&(Mr>>>28|(127&Xr)<<4),Pe[Ve++]=Xr>>>7&2047,Pe[Ve++]=Xr>>>18&2047,Pe[Ve++]=2047&(Xr>>>29|(255&na)<<3),Pe[Ve++]=na>>>8&2047,Pe[Ve++]=na>>>19&2047,Pe[Ve++]=2047&(na>>>30|(511&Ea)<<2),Pe[Ve++]=Ea>>>9&2047,Pe[Ve++]=Ea>>>20&2047,Pe[Ve++]=2047&(Ea>>>31|(1023&Na)<<1),Pe[Ve++]=Na>>>10&2047,Pe[Ve]=Na>>>21&2047}(D,d,L,Y);case 12:return void function(we,ze,Pe,at){let Ve=at,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0,na=we[ze+8]>>>0,Ea=we[ze+9]>>>0,Na=we[ze+10]>>>0,_n=we[ze+11]>>>0;Pe[Ve++]=bt>>>0&4095,Pe[Ve++]=bt>>>12&4095,Pe[Ve++]=4095&(bt>>>24|(15&Et)<<8),Pe[Ve++]=Et>>>4&4095,Pe[Ve++]=Et>>>16&4095,Pe[Ve++]=4095&(Et>>>28|(255&er)<<4),Pe[Ve++]=er>>>8&4095,Pe[Ve++]=er>>>20&4095,Pe[Ve++]=tr>>>0&4095,Pe[Ve++]=tr>>>12&4095,Pe[Ve++]=4095&(tr>>>24|(15&xr)<<8),Pe[Ve++]=xr>>>4&4095,Pe[Ve++]=xr>>>16&4095,Pe[Ve++]=4095&(xr>>>28|(255&lr)<<4),Pe[Ve++]=lr>>>8&4095,Pe[Ve++]=lr>>>20&4095,Pe[Ve++]=Mr>>>0&4095,Pe[Ve++]=Mr>>>12&4095,Pe[Ve++]=4095&(Mr>>>24|(15&Xr)<<8),Pe[Ve++]=Xr>>>4&4095,Pe[Ve++]=Xr>>>16&4095,Pe[Ve++]=4095&(Xr>>>28|(255&na)<<4),Pe[Ve++]=na>>>8&4095,Pe[Ve++]=na>>>20&4095,Pe[Ve++]=Ea>>>0&4095,Pe[Ve++]=Ea>>>12&4095,Pe[Ve++]=4095&(Ea>>>24|(15&Na)<<8),Pe[Ve++]=Na>>>4&4095,Pe[Ve++]=Na>>>16&4095,Pe[Ve++]=4095&(Na>>>28|(255&_n)<<4),Pe[Ve++]=_n>>>8&4095,Pe[Ve]=_n>>>20&4095}(D,d,L,Y);case 16:return void function(we,ze,Pe,at){let Ve=at,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0,na=we[ze+8]>>>0,Ea=we[ze+9]>>>0,Na=we[ze+10]>>>0,_n=we[ze+11]>>>0,en=we[ze+12]>>>0,Bn=we[ze+13]>>>0,Zn=we[ze+14]>>>0,Dn=we[ze+15]>>>0;Pe[Ve++]=bt>>>0&65535,Pe[Ve++]=bt>>>16&65535,Pe[Ve++]=Et>>>0&65535,Pe[Ve++]=Et>>>16&65535,Pe[Ve++]=er>>>0&65535,Pe[Ve++]=er>>>16&65535,Pe[Ve++]=tr>>>0&65535,Pe[Ve++]=tr>>>16&65535,Pe[Ve++]=xr>>>0&65535,Pe[Ve++]=xr>>>16&65535,Pe[Ve++]=lr>>>0&65535,Pe[Ve++]=lr>>>16&65535,Pe[Ve++]=Mr>>>0&65535,Pe[Ve++]=Mr>>>16&65535,Pe[Ve++]=Xr>>>0&65535,Pe[Ve++]=Xr>>>16&65535,Pe[Ve++]=na>>>0&65535,Pe[Ve++]=na>>>16&65535,Pe[Ve++]=Ea>>>0&65535,Pe[Ve++]=Ea>>>16&65535,Pe[Ve++]=Na>>>0&65535,Pe[Ve++]=Na>>>16&65535,Pe[Ve++]=_n>>>0&65535,Pe[Ve++]=_n>>>16&65535,Pe[Ve++]=en>>>0&65535,Pe[Ve++]=en>>>16&65535,Pe[Ve++]=Bn>>>0&65535,Pe[Ve++]=Bn>>>16&65535,Pe[Ve++]=Zn>>>0&65535,Pe[Ve++]=Zn>>>16&65535,Pe[Ve++]=Dn>>>0&65535,Pe[Ve]=Dn>>>16&65535}(D,d,L,Y);case 32:for(let we=0;we<32;we=we+1|0)L[Y+we|0]=0|D[d+we|0];return}let ue=j_[te]>>>0,pe=d,me=0,Ce=D[pe]>>>0;for(let we=0;we<32;we++)if(me+te<=32)L[Y+we]=Ce>>>me&ue,me+=te,me===32&&(me=0,pe++,we!==31&&(Ce=D[pe]>>>0));else{let ze=32-me,Pe=Ce>>>me;pe++,Ce=D[pe]>>>0,L[Y+we]=(Pe|(Ce&j_[te-ze]>>>0)<=64)throw new Error("Varint too long")}return d.set(te),L}function eF(D,d){let L,Y;return Y=D[d.get()],d.increment(),L=127&Y,Y<128?L:(Y=D[d.get()],d.increment(),L|=(127&Y)<<7,Y<128?L:(Y=D[d.get()],d.increment(),L|=(127&Y)<<14,Y<128?L:(Y=D[d.get()],d.increment(),L|=(127&Y)<<21,Y<128?L:(Y=D[d.get()],L|=(15&Y)<<28,function(te,ue,pe){let me,Ce;if(Ce=ue[pe.get()],pe.increment(),me=(112&Ce)>>4,Ce<128||(Ce=ue[pe.get()],pe.increment(),me|=(127&Ce)<<3,Ce<128)||(Ce=ue[pe.get()],pe.increment(),me|=(127&Ce)<<10,Ce<128)||(Ce=ue[pe.get()],pe.increment(),me|=(127&Ce)<<17,Ce<128)||(Ce=ue[pe.get()],pe.increment(),me|=(127&Ce)<<24,Ce<128)||(Ce=ue[pe.get()],pe.increment(),me|=(1&Ce)<<31,Ce<128))return 4294967296*me+(te>>>0);throw new Error("Expected varint not more than 10 bytes")}(L,D,d)))))}function al(D){return D>>>1^-(1&D)}function Nf(D){return D>>BigInt("1")^-(BigInt("1")&D)}function gp(D){return D%2==1?(D+1)/-2:D/2}function V_(D,d,L){if(L===void 0){L=0;for(let ue=0;ue=4)for(;Y=4)for(;Y=4)for(let Y=D[0];L>4],me=null;switch(pe){case nf.DATA:me={dictionaryType:Object.values(Th)[15&ue]};break;case nf.OFFSET:me={offsetType:Object.values(vv)[15&ue]};break;case nf.LENGTH:me={lengthType:Object.values(ah)[15&ue]}}te.increment();let Ce=Y[te.get()],we=Object.values(_s)[Ce>>5],ze=Object.values(_s)[Ce>>2&7],Pe=Object.values(zd)[3&Ce];te.increment();let at=bf(Y,te,2),Ve=at[0];return{physicalStreamType:pe,logicalStreamType:me,logicalLevelTechnique1:we,logicalLevelTechnique2:ze,physicalLevelTechnique:Pe,numValues:Ve,byteLength:at[1],decompressedCount:Ve}}(D,d);return L.logicalLevelTechnique1===_s.MORTON?function(Y,te,ue){let pe=bf(te,ue,2);return{physicalStreamType:Y.physicalStreamType,logicalStreamType:Y.logicalStreamType,logicalLevelTechnique1:Y.logicalLevelTechnique1,logicalLevelTechnique2:Y.logicalLevelTechnique2,physicalLevelTechnique:Y.physicalLevelTechnique,numValues:Y.numValues,byteLength:Y.byteLength,decompressedCount:Y.decompressedCount,numBits:pe[0],coordinateShift:pe[1]}}(L,D,d):_s.RLE!==L.logicalLevelTechnique1&&_s.RLE!==L.logicalLevelTechnique2||zd.NONE===L.physicalLevelTechnique?L:function(Y,te,ue){let pe=bf(te,ue,2);return{physicalStreamType:Y.physicalStreamType,logicalStreamType:Y.logicalStreamType,logicalLevelTechnique1:Y.logicalLevelTechnique1,logicalLevelTechnique2:Y.logicalLevelTechnique2,physicalLevelTechnique:Y.physicalLevelTechnique,numValues:Y.numValues,byteLength:Y.byteLength,decompressedCount:pe[1],runs:pe[0],numRleValues:pe[1]}}(L,D,d)}(function(D){D.PRESENT="PRESENT",D.DATA="DATA",D.OFFSET="OFFSET",D.LENGTH="LENGTH"})(nf||(nf={})),function(D){D.NONE="NONE",D.SINGLE="SINGLE",D.SHARED="SHARED",D.VERTEX="VERTEX",D.MORTON="MORTON",D.FSST="FSST"}(Th||(Th={})),function(D){D.VERTEX="VERTEX",D.INDEX="INDEX",D.STRING="STRING",D.KEY="KEY"}(vv||(vv={})),function(D){D.VAR_BINARY="VAR_BINARY",D.GEOMETRIES="GEOMETRIES",D.PARTS="PARTS",D.RINGS="RINGS",D.TRIANGLES="TRIANGLES",D.SYMBOL="SYMBOL",D.DICTIONARY="DICTIONARY"}(ah||(ah={})),function(D){D[D.FLAT=0]="FLAT",D[D.CONST=1]="CONST",D[D.SEQUENCE=2]="SEQUENCE",D[D.DICTIONARY=3]="DICTIONARY",D[D.FSST_DICTIONARY=4]="FSST_DICTIONARY"}(Wl||(Wl={}));class Ah{constructor(d,L){this.values=d,this._size=L}get(d){let L=Math.floor(d/8);return(this.values[L]>>d%8&1)==1}set(d,L){let Y=Math.floor(d/8);this.values[Y]=this.values[Y]|(L?1:0)<>d%8&1}size(){return this._size}getBuffer(){return this.values}}function yp(D,d,L){if(!d)return D;let Y=d.size(),te=new D.constructor(Y),ue=0;for(let pe=0;pe=4)for(;Ve>>0;for(let at=1;at>>0;return Pe}(pe.logicalLevelTechnique2===_s.RLE?V_(ue,pe.runs,pe.numRleValues):ue);break;case _s.RLE:we=V_(ue,pe.runs,pe.numRleValues);break;case _s.MORTON:G_(ue),we=ue;break;case _s.COMPONENTWISE_DELTA:we=function(ze){if(ze.length<2)return new Uint32Array(ze);let Pe=new Uint32Array(ze.length);Pe[0]=al(ze[0])>>>0,Pe[1]=al(ze[1])>>>0;for(let at=2;at>>0,Pe[at+1]=Pe[at-1]+al(ze[at+1])>>>0;return Pe}(ue);break;case _s.NONE:we=ue;break;default:throw new Error(`The specified Logical level technique is not supported: ${pe.logicalLevelTechnique1}`)}return Ce?yp(we,Ce,0):we}(_p(D,d,L),L,0,te)}function Nd(D,d,L){return function(Y,te){if(te.logicalLevelTechnique1===_s.DELTA&&te.logicalLevelTechnique2===_s.NONE)return function(ue){let pe=new Int32Array(ue.length+1);pe[0]=0,pe[1]=al(ue[0]);let me=pe[1];for(let Ce=2;Ce!==pe.length;++Ce)me+=al(ue[Ce-1]),pe[Ce]=pe[Ce-1]+me;return new Uint32Array(pe)}(Y);if(te.logicalLevelTechnique1===_s.RLE&&te.logicalLevelTechnique2===_s.NONE)return function(ue,pe,me){let Ce=new Uint32Array(me+1);Ce[0]=0;let we=1,ze=Ce[0];for(let Pe=0;Pe>>2,Et=function(tr,xr){if(xr<=tr.encodedWords.length)return tr.encodedWords;let lr=new Uint32Array(Math.max(16,2*xr));return tr.encodedWords=lr,lr}(at,bt);(function(tr,xr,lr,Mr){if(xr<0||lr<0||xr+lr>tr.length)throw new RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${xr}, byteLength=${lr}, bytes.length=${tr.length})`);let Xr=Math.floor(lr/4),na=lr%4!=0,Ea=na?Xr+1:Xr;if(Mr.length0){let Na=tr.byteOffset+xr;if(3&Na)for(let _n=0;_n0){let Na=0|tr[Mr];if(Mr=Mr+1|0,255&Na)throw new Error(`FastPFOR decode: invalid alignedLength=${Na} (expected multiple of 256)`);if(Xr+Na>na.length)throw new Error(`FastPFOR decode: output buffer too small (outPos=${Xr}, alignedLength=${Na}, out.length=${na.length})`);Mr=function(_n,en,Bn,Zn,Dn,rn){let li=Zn+U_(Dn,nd),xi=Zn,ui=Bn;for(;xi!==li;){let Ai=Math.min(q_,li-xi);ui=KR(_n,en,ui,xi,Ai,rn),xi=xi+Ai|0}return ui}(tr,na,Mr,Xr,Na,Ea),Xr=Xr+Na|0}return function(Na,_n,en,Bn,Zn,Dn){if(Dn===0)return _n;let rn=0,li=_n,xi=_n+en,ui=Zn,Ai=Zn,Lo=Zn+Dn,bs=0,js=0;for(;li>>rn&255;if(rn+=8,li+=rn>>>5,rn&=31,bs|=(127&tl)<28)throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${js}, partial=${bs}, decoded=${Ai-ui}/${Dn}, inPos=${li}, inEnd=${xi})`)}if(Ai!==Lo)throw new Error(`FastPFOR VByte: truncated stream (decoded=${Ai-ui}, expected=${Dn}, consumedWords=${li-_n}/${en}, vbyteStart=${_n}, vbyteEnd=${xi})`)}(tr,Mr,tr.length-Mr|0,na,Xr,xr-Xr|0),na}(Et.subarray(0,bt),we,at.decoderWorkspace);return Pe.add(ze),er}(te,ue,pe,me,function(Ce=16){if(Ce<0)throw new RangeError(`initialEncodedWordCapacity must be >= 0, got ${Ce}`);let we=Math.max(16,0|Ce);return{encodedWords:new Uint32Array(we),decoderWorkspace:a6()}}(pe>>>2))}(D,L.numValues,L.byteLength,d);case zd.VARINT:return bf(D,d,L.numValues);case zd.NONE:{let te=d.get();d.add(L.byteLength);let ue=D.subarray(te,d.get());return new Uint32Array(ue)}default:throw new Error(`Specified physicalLevelTechnique ${Y} is not supported (yet).`)}}function Y_(D,d,L){let Y=_p(D,d,L);return Y.length===1?Y[0]:function(te){return te[1]}(Y)}function l6(D,d,L){return function(Y){if(Y.length===2){let te=al(Y[1]);return[te,te]}return[al(Y[2]),al(Y[3])]}(_p(D,d,L))}function u6(D,d,L){return function(Y){if(Y.length===2){let te=Nf(Y[1]);return[te,te]}return[Nf(Y[2]),Nf(Y[3])]}(mp(D,d,L.numValues))}function c6(D,d,L,Y){return function(te,ue,pe){let me;switch(ue.logicalLevelTechnique1){case _s.DELTA:me=function(Ce){let we=new BigUint64Array(Ce.length);we[0]=BigInt.asUintN(64,Nf(Ce[0]));for(let ze=1;ze>1,d)-L}}function v6(D,d){let L=0;for(let Y=0;Y>Y;return L}function bp(D,d,L,Y,te,ue,pe){return D===Bd.MORTON?function(me,Ce,we,ze,Pe,at){let Ve=new Array(Pe?ze+1:ze);for(let bt=0;bt[Xr]),Y+=lr,te+=lr}break;case Tc.LINESTRING:{let lr,Mr;er?(lr=Ve[te]-Ve[te-1],te++):lr=at[Y]-at[Y-1],Y++,Et?(Mr=xp(tr,me,lr,!1),me+=2*lr):(Mr=bp(d.vertexBufferType,tr,bt,Ce,lr,!1,we),Ce+=lr),L[pe++]=[Mr],Pe&&ue++}break;case Tc.POLYGON:{let lr=at[Y]-at[Y-1];Y++;let Mr=new Array(lr-1),Xr,na=Ve[te]-Ve[te-1];if(te++,Et){Xr=xp(tr,me,na,!0),me+=2*na;for(let Ea=0;Ea0&&Et.push(Et[0]),at.push(Et)}d[ze]=at,ue&&we++}break;case Tc.MULTIPOLYGON:{let Pe=ue[we]-ue[we-1];we++;let at=[];for(let Ve=0;Ve0&&tr.push(tr[0]),at.push(tr)}}d[ze]=at}}return d}[Symbol.iterator](){return null}}function _6(D,d,L,Y,te,ue){return new tF(D,d,L,Y,te,ue)}class tF extends y6{constructor(d,L,Y,te,ue,pe){super(Y,te,ue,pe),this._numGeometries=d,this._geometryType=L}geometryType(d){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}function b6(D,d,L,Y,te){return new rF(D,d,L,Y,te)}class rF extends y6{constructor(d,L,Y,te,ue){super(L,Y,te,ue),this._geometryTypes=d}geometryType(d){return this._geometryTypes[d]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function aF(D,d,L,Y,te){let ue=Of(D,L),pe,me,Ce,we;if(ng(ue,Y,D,L)===Wl.CONST){let xr=Y_(D,L,ue),lr,Mr,Xr,na;for(let Ea=0;EaL?d[ue++]:1);return Y}function x6(D,d,L,Y){let te=new Uint32Array(d[d.length-1]+1),ue=0;te[0]=ue;let pe=1,me=0;for(let Ce=0;Ce=at);){let Ve=pe[we.increment()];if(Ve<=127){let bt=Ve+3,Et=pe[we.increment()],er=Math.min(Pe+bt,me);ze.fill(Et,Pe,er),Pe=er}else{let bt=256-Ve;for(let Et=0;Et=12?oF.decode(D.subarray(d,L)):function(Y,te,ue){let pe="",me=te;for(;me239?4:Ce>223?3:Ce>191?2:1;if(me+Ve>ue)break;Ve===1?Ce<128&&(at=Ce):Ve===2?(we=Y[me+1],(192&we)==128&&(at=(31&Ce)<<6|63&we,at<=127&&(at=null))):Ve===3?(we=Y[me+1],ze=Y[me+2],(192&we)==128&&(192&ze)==128&&(at=(15&Ce)<<12|(63&we)<<6|63&ze,(at<=2047||at>=55296&&at<=57343)&&(at=null))):Ve===4&&(we=Y[me+1],ze=Y[me+2],Pe=Y[me+3],(192&we)==128&&(192&ze)==128&&(192&Pe)==128&&(at=(15&Ce)<<18|(63&we)<<12|(63&ze)<<6|63&Pe,(at<=65535||at>=1114112)&&(at=null))),at===null?(at=65533,Ve=1):at>65535&&(at-=65536,pe+=String.fromCharCode(at>>>10&1023|55296),at=56320|1023&at),pe+=String.fromCharCode(at),me+=Ve}return pe}(D,d,L)}class K_ extends pp{constructor(d,L,Y,te){super(d,Y,te),this.offsetBuffer=L}}class T6 extends K_{constructor(d,L,Y,te){super(d,L,Y,te??L.length-1)}getValueFromBuffer(d){return Z_(this.dataBuffer,this.offsetBuffer[d],this.offsetBuffer[d+1])}}class wp extends K_{constructor(d,L,Y,te,ue){super(d,Y,te,ue??L.length),this.indexBuffer=L,this.indexBuffer=L}getValueFromBuffer(d){let L=this.indexBuffer[d];return Z_(this.dataBuffer,this.offsetBuffer[L],this.offsetBuffer[L+1])}}class A6 extends K_{constructor(d,L,Y,te,ue,pe,me){super(d,Y,te,me),this.indexBuffer=L,this.symbolOffsetBuffer=ue,this.symbolTableBuffer=pe}getValueFromBuffer(d){this.decodedDictionary==null&&(this.symbolLengthBuffer==null&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=function(Y,te,ue){let pe=[],me=new Array(te.length).fill(0);for(let Ce=1;Ce=10}function E6(D){return D===30}function lF(D){if(D.type==="scalarType"){let d=D.scalarType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if(d.type==="logicalType")return!1}else if(D.type==="complexType"){let d=D.complexType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",D),!1}function uF(D){var d;return D.type==="complexType"&&((d=D.complexType)==null?void 0:d.type)==="physicalType"&&D.complexType.physicalType===0}let cF=new TextDecoder;function J_(D,d){let L=bf(D,d,1)[0];if(L===0)return"";let Y=d.get(),te=D.subarray(Y,Y+L);return d.add(L),cF.decode(te)}function k6(D,d){let L=bf(D,d,1)[0]>>>0;if(L<10||L>30)throw new Error(`Unsupported field type code ${L}. Supported: 10-29(scalars), 30(STRUCT)`);let Y=M6(L);if(S6(L)&&(Y.name=J_(D,d)),E6(L)){let te=bf(D,d,1)[0]>>>0;Y.complexType.children=new Array(te);for(let ue=0;ue>>0,Y=M6(L);if(!Y)throw new Error(`Unsupported column type code ${L}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(S6(L)?Y.name=J_(D,d):L>=0&&L<=3?Y.name="id":L===4&&(Y.name="geometry"),E6(L)){let te=bf(D,d,1)[0]>>>0,ue=Y.complexType;ue.children=new Array(te);for(let pe=0;pe>>0,ue=bf(D,d,1)[0]>>>0;Y.columns=new Array(ue);for(let pe=0;pe=4)for(;Xr>>0,Pe=me.get()+ze;if(Pe>Y.length)throw new Error(`Block overruns tile: ${Pe} > ${Y.length}`);if(bf(Y,me,1)[0]>>>0!=1){me.set(Pe);continue}let[at,Ve]=hF(Y,me),bt=at.featureTables[0],Et=null,er=null,tr=[],xr=0;for(let Mr of bt.columns){let Xr=Mr.name;if((we=Mr).type==="scalarType"&&((pe=we.scalarType)==null?void 0:pe.type)==="logicalType"&&we.scalarType.logicalType===0){let na=null;if(Mr.nullable){let Na=Of(Y,me),_n=me.get(),en=M0(Y,Na.numValues,Na.byteLength,me);me.set(_n+Na.byteLength),na=new Ah(en,Na.numValues)}let Ea=Of(Y,me);xr=na?na.size():Ea.decompressedCount,Et=dF(Y,Mr,me,Xr,Ea,na??xr,ue)}else if(uF(Mr)){let na=bf(Y,me,1)[0];if(xr===0){let Ea=me.get();xr=Of(Y,me).decompressedCount,me.set(Ea)}er=aF(Y,na,me,xr)}else{let na=lF(Mr)?bf(Y,me,1)[0]:1;if(na===0)continue;let Ea=sF(Y,me,Mr,na,xr);if(Ea)if(Array.isArray(Ea))for(let Na of Ea)tr.push(Na);else tr.push(Ea)}}let lr=new GR(bt.name,er,Et,tr,Ve);Ce.push(lr),me.set(Pe)}var we;return Ce}(new Uint8Array(d));this.layers=L.reduce((Y,te)=>Object.assign(Object.assign({},Y),{[te.name]:new pF(te)}),{})}}class mF{constructor(d,L){this.feature=d,this.type=d.type,this.properties=d.tags?d.tags:{},this.extent=L,"id"in d&&(typeof d.id=="string"?this.id=parseInt(d.id,10):typeof d.id!="number"||isNaN(d.id)||(this.id=d.id))}loadGeometry(){let d=[],L=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(let Y of L){let te=[];for(let ue of Y)te.push(new t(ue[0],ue[1]));d.push(te)}return d}}let E0="_geojsonTileLayer";function gF(D,d,L=""){d.writeVarintField(15,D.version||1),d.writeStringField(1,D.name||""),d.writeVarintField(5,D.extent||4096);let Y={jsonPrefix:L,keys:[],values:[],keycache:{},valuecache:{}};for(let pe=0;pe>31}function bF(D,d){let L=D.loadGeometry(),Y=D.type,te=0,ue=0;for(let pe of L){let me=1;Y===1&&(me=pe.length),d.writeVarint(Q_(1,me));let Ce=Y===3?pe.length-1:pe.length;for(let we=0;we=0&&ze[3]>=0&&Ce.insert(me,ze[0],ze[1],ze[2],ze[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=this.encoding!=="mlt"?new nT(new Jm(this.rawTileData)).layers:new C6(this.rawTileData).layers,this.sourceLayerCoder=new QT(this.vtLayers?Object.keys(this.vtLayers).sort():[E0])),this.vtLayers}query(d,L,Y,te){this.loadVTLayers();let ue=d.params,pe=F/d.tileSize/d.scale,me=Ka(ue.filter,ue.globalState),Ce=d.queryGeometry,we=d.queryPadding*pe,ze=dv.fromPoints(Ce),Pe=this.grid.query(ze.minX-we,ze.minY-we,ze.maxX+we,ze.maxY+we),at=dv.fromPoints(d.cameraQueryGeometry).expandBy(we),Ve=this.grid3D.query(at.minX,at.minY,at.maxX,at.maxY,(er,tr,xr,lr)=>function(Mr,Xr,na,Ea,Na){for(let en of Mr)if(Xr<=en.x&&na<=en.y&&Ea>=en.x&&Na>=en.y)return!0;let _n=[new t(Xr,na),new t(Xr,Na),new t(Ea,Na),new t(Ea,na)];if(Mr.length>2){for(let en of _n)if(sn(Mr,en))return!0}for(let en=0;en(xr||(xr=Hl(lr)),Mr.queryIntersectsFeature({queryGeometry:Ce,feature:lr,featureState:Xr,geometry:xr,zoom:this.z,transform:d.transform,pixelsToTileUnits:pe,pixelPosMatrix:d.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:d.getElevation})))}return bt}loadMatchingFeature(d,L,Y,te,ue,pe,me,Ce,we,ze,Pe){let at=this.bucketLayerIDs[L];if(pe&&!at.some(er=>pe.has(er)))return;let Ve=this.sourceLayerCoder.decode(Y),bt=this.vtLayers[Ve].feature(te);if(ue.needGeometry){let er=Co(bt,!0);if(!ue.filter(new Ti(this.tileID.overscaledZ),er,this.tileID.canonical))return}else if(!ue.filter(new Ti(this.tileID.overscaledZ),bt))return;let Et=this.getId(bt,Ve);for(let er of at){if(pe&&!pe.has(er))continue;let tr=Ce[er];if(!tr)continue;let xr={};Et&&ze&&(xr=ze.getState(tr.sourceLayer||E0,Et));let lr=$({},we[er]);lr.paint=D6(lr.paint,tr.paint,bt,xr,me),lr.layout=D6(lr.layout,tr.layout,bt,xr,me);let Mr=!Pe||Pe(bt,tr,xr);if(!Mr)continue;let Xr=new e6(bt,this.z,this.x,this.y,Et);Xr.layer=lr;let na=d[er];na===void 0&&(na=d[er]=[]),na.push({featureIndex:te,feature:Xr,intersectionZ:Mr})}}lookupSymbolFeatures(d,L,Y,te,ue,pe,me,Ce){let we={};this.loadVTLayers();let ze=Ka(ue.filterSpec,ue.globalState);for(let Pe of d)this.loadMatchingFeature(we,Y,te,Pe,ze,pe,me,Ce,L);return we}hasLayer(d){for(let L of this.bucketLayerIDs)for(let Y of L)if(d===Y)return!0;return!1}getId(d,L){var Y;let te=d.id;return this.promoteId&&(te=d.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[L]],typeof te=="boolean"&&(te=Number(te)),te===void 0&&(!((Y=d.properties)===null||Y===void 0)&&Y.cluster)&&this.promoteId&&(te=Number(d.properties.cluster_id))),te}}function D6(D,d,L,Y,te){return G(D,(ue,pe)=>{let me=d instanceof Tu?d.get(pe):null;return me?.evaluate?me.evaluate(L,Y,te):me})}function wF(D,d){return d-D}function I6(D,d,L,Y,te){let ue=[];for(let pe of D){let me;for(let Ce=0;Ce=Y&&ze.x>=Y||(we.x>=Y?we=new t(Y,we.y+(Y-we.x)/(ze.x-we.x)*(ze.y-we.y))._round():ze.x>=Y&&(ze=new t(Y,we.y+(Y-we.x)/(ze.x-we.x)*(ze.y-we.y))._round()),we.y>=te&&ze.y>=te||(we.y>=te?we=new t(we.x+(te-we.y)/(ze.y-we.y)*(ze.x-we.x),te)._round():ze.y>=te&&(ze=new t(we.x+(te-we.y)/(ze.y-we.y)*(ze.x-we.x),te)._round()),me&&we.equals(me[me.length-1])||(me=[we],ue.push(me)),me.push(ze)))))}}return ue}function R6(D,d,L,Y,te){switch(d){case 1:return function(ue,pe,me,Ce){let we=[];for(let ze of ue)for(let Pe of ze){let at=Ce===0?Pe.x:Pe.y;at>=pe&&at<=me&&we.push([Pe])}return we}(D,L,Y,te);case 2:return F6(D,L,Y,te,!1);case 3:return F6(D,L,Y,te,!0)}return[]}function TF(D,d,L,Y,te){let ue=Y===0?AF:MF,pe=[],me=[];for(let ze=0;zed&&pe.push(ue(Pe,at,d)):Ve>L?bt=d&&(pe.push(ue(Pe,at,d)),Et=!0),bt>L&&Ve<=L&&(pe.push(ue(Pe,at,L)),Et=!0),!te&&Et&&(me.push(pe),pe=[])}let Ce=D.length-1,we=Y===0?D[Ce].x:D[Ce].y;return we>=d&&we<=L&&pe.push(D[Ce]),te&&pe.length>0&&!pe[0].equals(pe[pe.length-1])&&pe.push(new t(pe[0].x,pe[0].y)),pe.length>0&&me.push(pe),me}function F6(D,d,L,Y,te){let ue=[];for(let pe of D){let me=TF(pe,d,L,Y,te);me.length>0&&ue.push(...me)}return ue}function AF(D,d,L){return new t(L,D.y+(L-D.x)/(d.x-D.x)*(d.y-D.y))}function MF(D,d,L){return new t(D.x+(L-D.y)/(d.y-D.y)*(d.x-D.x),L)}Ci("FeatureIndex",P6,{omit:["rawTileData","sourceLayerCoder"]});class Od extends t{constructor(d,L,Y,te){super(d,L),this.angle=Y,te!==void 0&&(this.segment=te)}clone(){return new Od(this.x,this.y,this.angle,this.segment)}}function z6(D,d,L,Y,te){if(d.segment===void 0||L===0)return!0;let ue=d,pe=d.segment+1,me=0;for(;me>-L/2;){if(pe--,pe<0)return!1;me-=D[pe].dist(ue),ue=D[pe]}me+=D[pe].dist(D[pe+1]),pe++;let Ce=[],we=0;for(;meY;)we-=Ce.shift().angleDelta;if(we>te)return!1;pe++,me+=ze.dist(Pe)}return!0}function B6(D){let d=0;for(let L=0;Lwe){let bt=(we-Ce)/Ve,Et=Ls.number(Pe.x,at.x,bt),er=Ls.number(Pe.y,at.y,bt),tr=new Od(Et,er,at.angleTo(Pe),ze);return tr._round(),!pe||z6(D,tr,me,pe,d)?tr:void 0}Ce+=Ve}}function EF(D,d,L,Y,te,ue,pe,me,Ce){let we=N6(Y,ue,pe),ze=O6(Y,te),Pe=ze*pe,at=D[0].x===0||D[0].x===Ce||D[0].y===0||D[0].y===Ce;return d-Pe=0&&Mr=0&&Xr=0&&at+we<=ze){let na=new Od(Mr,Xr,xr,bt);na._round(),Y&&!z6(D,na,ue,Y,te)||Ve.push(na)}}Pe+=tr}return me||Ve.length||pe||(Ve=j6(D,Pe/2,L,Y,te,ue,pe,!0,Ce)),Ve}function U6(D,d,L,Y){let te=[],ue=D.image,pe=ue.pixelRatio,me=ue.paddedRect.w-2,Ce=ue.paddedRect.h-2,we={x1:D.left,y1:D.top,x2:D.right,y2:D.bottom},ze=ue.stretchX||[[0,me]],Pe=ue.stretchY||[[0,Ce]],at=(rn,li)=>rn+li[1]-li[0],Ve=ze.reduce(at,0),bt=Pe.reduce(at,0),Et=me-Ve,er=Ce-bt,tr=0,xr=Ve,lr=0,Mr=bt,Xr=0,na=Et,Ea=0,Na=er;if(ue.content&&Y){let rn=ue.content,li=rn[2]-rn[0],xi=rn[3]-rn[1];(ue.textFitWidth||ue.textFitHeight)&&(we=BT(D)),tr=ig(ze,0,rn[0]),lr=ig(Pe,0,rn[1]),xr=ig(ze,rn[0],rn[2]),Mr=ig(Pe,rn[1],rn[3]),Xr=rn[0]-tr,Ea=rn[1]-lr,na=li-xr,Na=xi-Mr}let _n=we.x1,en=we.y1,Bn=we.x2-_n,Zn=we.y2-en,Dn=(rn,li,xi,ui)=>{let Ai=og(rn.stretch-tr,xr,Bn,_n),Lo=sg(rn.fixed-Xr,na,rn.stretch,Ve),bs=og(li.stretch-lr,Mr,Zn,en),js=sg(li.fixed-Ea,Na,li.stretch,bt),tl=og(xi.stretch-tr,xr,Bn,_n),sf=sg(xi.fixed-Xr,na,xi.stretch,Ve),vu=og(ui.stretch-lr,Mr,Zn,en),sc=sg(ui.fixed-Ea,Na,ui.stretch,bt),Ac=new t(Ai,bs),Yl=new t(tl,bs),Vc=new t(tl,vu),xf=new t(Ai,vu),wf=new t(Lo/pe,js/pe),Wf=new t(sf/pe,sc/pe),lf=d*Math.PI/180;if(lf){let Mc=Math.sin(lf),nu=Math.cos(lf),Ju=[nu,-Mc,Mc,nu];Ac._matMult(Ju),Yl._matMult(Ju),xf._matMult(Ju),Vc._matMult(Ju)}let Yf=rn.stretch+rn.fixed,vh=li.stretch+li.fixed;return{tl:Ac,tr:Yl,bl:xf,br:Vc,tex:{x:ue.paddedRect.x+1+Yf,y:ue.paddedRect.y+1+vh,w:xi.stretch+xi.fixed-Yf,h:ui.stretch+ui.fixed-vh},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:wf,pixelOffsetBR:Wf,minFontScaleX:na/pe/Bn,minFontScaleY:Na/pe/Zn,isSDF:L}};if(Y&&(ue.stretchX||ue.stretchY)){let rn=q6(ze,Et,Ve),li=q6(Pe,er,bt);for(let xi=0;xi0&&(Et=Math.max(10,Et),this.circleDiameter=Et)}else{let at=!((Pe=pe.image)===null||Pe===void 0)&&Pe.content&&(pe.image.textFitWidth||pe.image.textFitHeight)?BT(pe):{x1:pe.left,y1:pe.top,x2:pe.right,y2:pe.bottom};at.y1=at.y1*me-Ce[0],at.y2=at.y2*me+Ce[2],at.x1=at.x1*me-Ce[3],at.x2=at.x2*me+Ce[1];let Ve=pe.collisionPadding;if(Ve&&(at.x1-=Ve[0]*me,at.y1-=Ve[1]*me,at.x2+=Ve[2]*me,at.y2+=Ve[3]*me),ze){let bt=new t(at.x1,at.y1),Et=new t(at.x2,at.y1),er=new t(at.x1,at.y2),tr=new t(at.x2,at.y2),xr=ze*Math.PI/180;bt._rotate(xr),Et._rotate(xr),er._rotate(xr),tr._rotate(xr),at.x1=Math.min(bt.x,Et.x,er.x,tr.x),at.x2=Math.max(bt.x,Et.x,er.x,tr.x),at.y1=Math.min(bt.y,Et.y,er.y,tr.y),at.y2=Math.max(bt.y,Et.y,er.y,tr.y)}d.emplaceBack(L.x,L.y,at.x1,at.y1,at.x2,at.y2,Y,te,ue)}this.boxEndIndex=d.length}}class kF{constructor(d=[],L=(Y,te)=>Yte?1:0){if(this.data=d,this.length=this.data.length,this.compare=L,this.length>0)for(let Y=(this.length>>1)-1;Y>=0;Y--)this._down(Y)}push(d){this.data.push(d),this._up(this.length++)}pop(){if(this.length===0)return;let d=this.data[0],L=this.data.pop();return--this.length>0&&(this.data[0]=L,this._down(0)),d}peek(){return this.data[0]}_up(d){let{data:L,compare:Y}=this,te=L[d];for(;d>0;){let ue=d-1>>1,pe=L[ue];if(Y(te,pe)>=0)break;L[d]=pe,d=ue}L[d]=te}_down(d){let{data:L,compare:Y}=this,te=this.length>>1,ue=L[d];for(;d=0)break;L[d]=L[pe],d=pe}L[d]=ue}}function CF(D,d=1){let L=dv.fromPoints(D[0]),Y=Math.min(L.width(),L.height()),te=Y/2,ue=new kF([],LF),{minX:pe,minY:me,maxX:Ce,maxY:we}=L;if(Y===0)return new t(pe,me);for(let at=pe;atPe.d||!Pe.d)&&(Pe=at),at.max-Pe.d<=d||(te=at.h/2,ue.push(new Tp(at.p.x-te,at.p.y-te,te,D)),ue.push(new Tp(at.p.x+te,at.p.y-te,te,D)),ue.push(new Tp(at.p.x-te,at.p.y+te,te,D)),ue.push(new Tp(at.p.x+te,at.p.y+te,te,D)))}return ze.d>0&&Pe.d-ze.d<=d?ze.p:Pe.p}function LF(D,d){return d.max-D.max}class Tp{constructor(d,L,Y,te){this.p=new t(d,L),this.h=Y,this.d=function(ue,pe){let me=!1,Ce=1/0;for(let we of pe)for(let ze=0,Pe=we.length,at=Pe-1;zeue.y!=bt.y>ue.y&&ue.x<(bt.x-Ve.x)*(ue.y-Ve.y)/(bt.y-Ve.y)+Ve.x&&(me=!me),Ce=Math.min(Ce,ha(ue,Ve,bt))}return(me?1:-1)*Math.sqrt(Ce)}(this.p,te),this.max=this.d+this.h*Math.SQRT2}}var of;l.aM=void 0,(of=l.aM||(l.aM={}))[of.center=1]="center",of[of.left=2]="left",of[of.right=3]="right",of[of.top=4]="top",of[of.bottom=5]="bottom",of[of["top-left"]=6]="top-left",of[of["top-right"]=7]="top-right",of[of["bottom-left"]=8]="bottom-left",of[of["bottom-right"]=9]="bottom-right";let eb=Number.POSITIVE_INFINITY;function V6(D,d){return d[1]!==eb?function(L,Y,te){let ue=0,pe=0;switch(Y=Math.abs(Y),te=Math.abs(te),L){case"top-right":case"top-left":case"top":pe=te-7;break;case"bottom-right":case"bottom-left":case"bottom":pe=7-te}switch(L){case"top-right":case"bottom-right":case"right":ue=-Y;break;case"top-left":case"bottom-left":case"left":ue=Y}return[ue,pe]}(D,d[0],d[1]):function(L,Y){let te=0,ue=0;Y<0&&(Y=0);let pe=Y/Math.SQRT2;switch(L){case"top-right":case"top-left":ue=pe-7;break;case"bottom-right":case"bottom-left":ue=7-pe;break;case"bottom":ue=7-Y;break;case"top":ue=Y-7}switch(L){case"top-right":case"bottom-right":te=-pe;break;case"top-left":case"bottom-left":te=pe;break;case"left":te=Y;break;case"right":te=-Y}return[te,ue]}(D,d[0])}function H6(D,d,L){var Y;let te=D.layout,ue=(Y=te.get("text-variable-anchor-offset"))===null||Y===void 0?void 0:Y.evaluate(d,{},L);if(ue){let me=ue.values,Ce=[];for(let we=0;weat*wc);ze.startsWith("top")?Pe[1]-=7:ze.startsWith("bottom")&&(Pe[1]+=7),Ce[we+1]=Pe}return new zi(Ce)}let pe=te.get("text-variable-anchor");if(pe){let me;me=D._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[te.get("text-radial-offset").evaluate(d,{},L)*wc,eb]:te.get("text-offset").evaluate(d,{},L).map(we=>we*wc);let Ce=[];for(let we of pe)Ce.push(we,V6(we,me));return new zi(Ce)}return null}function tb(D){switch(D){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function PF(D,d,L,Y,te,ue,pe,me,Ce,we,ze,Pe){let at=ue.textMaxSize.evaluate(d,{});at===void 0&&(at=pe);let Ve=D.layers[0].layout,bt=Ve.get("icon-offset").evaluate(d,{},ze),Et=W6(L.horizontal),er=pe/24,tr=D.tilePixelRatio*er,xr=D.tilePixelRatio*at/24,lr=D.tilePixelRatio*me,Mr=D.tilePixelRatio*Ve.get("symbol-spacing"),Xr=Ve.get("text-padding")*D.tilePixelRatio,na=function(xi,ui,Ai,Lo=1){let bs=xi.get("icon-padding").evaluate(ui,{},Ai),js=bs?.values;return[js[0]*Lo,js[1]*Lo,js[2]*Lo,js[3]*Lo]}(Ve,d,ze,D.tilePixelRatio),Ea=Ve.get("text-max-angle")/180*Math.PI,Na=Ve.get("text-rotation-alignment")!=="viewport"&&Ve.get("symbol-placement")!=="point",_n=Ve.get("icon-rotation-alignment")==="map"&&Ve.get("symbol-placement")!=="point",en=Ve.get("symbol-placement"),Bn=Mr/2,Zn=Ve.get("icon-text-fit"),Dn;Y&&Zn!=="none"&&(D.allowVerticalPlacement&&L.vertical&&(Dn=NT(Y,L.vertical,Zn,Ve.get("icon-text-fit-padding"),bt,er)),Et&&(Y=NT(Y,Et,Zn,Ve.get("icon-text-fit-padding"),bt,er)));let rn=ze?Pe.line.getGranularityForZoomLevel(ze.z):1,li=(xi,ui)=>{ui.x<0||ui.x>=F||ui.y<0||ui.y>=F||function(Ai,Lo,bs,js,tl,sf,vu,sc,Ac,Yl,Vc,xf,wf,Wf,lf,Yf,vh,Mc,nu,Ju,pu,Sc,id,Mh,k0){let jd=Ai.addToLineVertexArray(Lo,bs),pv,Ap,Mp,Sp,Y6=0,X6=0,$6=0,Z6=0,rb=-1,ab=-1,od={},K6=pi("");if(Ai.allowVerticalPlacement&&js.vertical){let Tf=sc.layout.get("text-rotate").evaluate(pu,{},Mh)+90;Mp=new lg(Ac,Lo,Yl,Vc,xf,js.vertical,wf,Wf,lf,Tf),vu&&(Sp=new lg(Ac,Lo,Yl,Vc,xf,vu,vh,Mc,lf,Tf))}if(tl){let Tf=sc.layout.get("icon-rotate").evaluate(pu,{}),ih=sc.layout.get("icon-text-fit")!=="none",mv=U6(tl,Tf,id,ih),Eh=vu?U6(vu,Tf,id,ih):void 0;Ap=new lg(Ac,Lo,Yl,Vc,xf,tl,vh,Mc,!1,Tf),Y6=4*mv.length;let gv=Ai.iconSizeData,Uh=null;gv.kind==="source"?(Uh=[ad*sc.layout.get("icon-size").evaluate(pu,{})],Uh[0]>Rd&&ee(`${Ai.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):gv.kind==="composite"&&(Uh=[ad*Sc.compositeIconSizes[0].evaluate(pu,{},Mh),ad*Sc.compositeIconSizes[1].evaluate(pu,{},Mh)],(Uh[0]>Rd||Uh[1]>Rd)&&ee(`${Ai.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),Ai.addSymbols(Ai.icon,mv,Uh,Ju,nu,pu,l.ax.none,Lo,jd.lineStartIndex,jd.lineLength,-1,Mh),rb=Ai.icon.placedSymbolArray.length-1,Eh&&(X6=4*Eh.length,Ai.addSymbols(Ai.icon,Eh,Uh,Ju,nu,pu,l.ax.vertical,Lo,jd.lineStartIndex,jd.lineLength,-1,Mh),ab=Ai.icon.placedSymbolArray.length-1)}let J6=Object.keys(js.horizontal);for(let Tf of J6){let ih=js.horizontal[Tf];if(!pv){K6=pi(ih.text);let Eh=sc.layout.get("text-rotate").evaluate(pu,{},Mh);pv=new lg(Ac,Lo,Yl,Vc,xf,ih,wf,Wf,lf,Eh)}let mv=ih.positionedLines.length===1;if($6+=G6(Ai,Lo,ih,sf,sc,lf,pu,Yf,jd,js.vertical?l.ax.horizontal:l.ax.horizontalOnly,mv?J6:[Tf],od,rb,Sc,Mh),mv)break}js.vertical&&(Z6+=G6(Ai,Lo,js.vertical,sf,sc,lf,pu,Yf,jd,l.ax.vertical,["vertical"],od,ab,Sc,Mh));let IF=pv?pv.boxStartIndex:Ai.collisionBoxArray.length,RF=pv?pv.boxEndIndex:Ai.collisionBoxArray.length,FF=Mp?Mp.boxStartIndex:Ai.collisionBoxArray.length,zF=Mp?Mp.boxEndIndex:Ai.collisionBoxArray.length,BF=Ap?Ap.boxStartIndex:Ai.collisionBoxArray.length,NF=Ap?Ap.boxEndIndex:Ai.collisionBoxArray.length,OF=Sp?Sp.boxStartIndex:Ai.collisionBoxArray.length,jF=Sp?Sp.boxEndIndex:Ai.collisionBoxArray.length,Sh=-1,ug=(Tf,ih)=>Tf?.circleDiameter?Math.max(Tf.circleDiameter,ih):ih;Sh=ug(pv,Sh),Sh=ug(Mp,Sh),Sh=ug(Ap,Sh),Sh=ug(Sp,Sh);let Q6=Sh>-1?1:0;Q6&&(Sh*=k0/wc),Ai.glyphOffsetArray.length>=dp.MAX_GLYPHS&&ee("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),pu.sortKey!==void 0&&Ai.addToSortKeyRanges(Ai.symbolInstances.length,pu.sortKey);let UF=H6(sc,pu,Mh),[qF,VF]=function(Tf,ih){let mv=Tf.length,Eh=ih?.values;if(Eh?.length>0)for(let gv=0;gv=0?od.right:-1,od.center>=0?od.center:-1,od.left>=0?od.left:-1,od.vertical||-1,rb,ab,K6,IF,RF,FF,zF,BF,NF,OF,jF,Yl,$6,Z6,Y6,X6,Q6,0,wf,Sh,qF,VF)}(D,ui,xi,L,Y,te,Dn,D.layers[0],D.collisionBoxArray,d.index,d.sourceLayerIndex,D.index,tr,[Xr,Xr,Xr,Xr],Na,Ce,lr,na,_n,bt,d,ue,we,ze,pe)};if(en==="line")for(let xi of I6(d.geometry,0,0,F,F)){let ui=hv(xi,rn),Ai=EF(ui,Mr,Ea,L.vertical||Et,Y,24,xr,D.overscaling,F);for(let Lo of Ai)Et&&DF(D,Et.text,Bn,Lo)||li(ui,Lo)}else if(en==="line-center"){for(let xi of d.geometry)if(xi.length>1){let ui=hv(xi,rn),Ai=SF(ui,Ea,L.vertical||Et,Y,24,xr);Ai&&li(ui,Ai)}}else if(d.type==="Polygon")for(let xi of Rc(d.geometry,0)){let ui=CF(xi,16);li(hv(xi[0],rn,!0),new Od(ui.x,ui.y,0))}else if(d.type==="LineString")for(let xi of d.geometry){let ui=hv(xi,rn);li(ui,new Od(ui[0].x,ui[0].y,0))}else if(d.type==="Point")for(let xi of d.geometry)for(let ui of xi)li([ui],new Od(ui.x,ui.y,0))}function G6(D,d,L,Y,te,ue,pe,me,Ce,we,ze,Pe,at,Ve,bt){let Et=function(xr,lr,Mr,Xr,na,Ea,Na,_n){let en=Xr.layout.get("text-rotate").evaluate(Ea,{})*Math.PI/180,Bn=[];for(let Zn of lr.positionedLines)for(let Dn of Zn.positionedGlyphs){if(!Dn.rect)continue;let rn=Dn.rect||{},li=4,xi=!0,ui=1,Ai=0,Lo=(na||_n)&&Dn.vertical,bs=Dn.metrics.advance*Dn.scale/2;if(_n&&lr.verticalizable&&(Ai=Zn.lineOffset/2-(Dn.imageName?-(wc-Dn.metrics.width*Dn.scale)/2:(Dn.scale-1)*wc)),Dn.imageName){let Mc=Na[Dn.imageName];xi=Mc.sdf,ui=Mc.pixelRatio,li=1/ui}let js=na?[Dn.x+bs,Dn.y]:[0,0],tl=na?[0,0]:[Dn.x+bs+Mr[0],Dn.y+Mr[1]-Ai],sf=[0,0];Lo&&(sf=tl,tl=[0,0]);let vu=Dn.metrics.isDoubleResolution?2:1,sc=(Dn.metrics.left-li)*Dn.scale-bs+tl[0],Ac=(-Dn.metrics.top-li)*Dn.scale+tl[1],Yl=sc+rn.w/vu*Dn.scale/ui,Vc=Ac+rn.h/vu*Dn.scale/ui,xf=new t(sc,Ac),wf=new t(Yl,Ac),Wf=new t(sc,Vc),lf=new t(Yl,Vc);if(Lo){let Mc=new t(-bs,bs- -17),nu=-Math.PI/2,Ju=12-bs,pu=new t(22-Ju,-(Dn.imageName?Ju:0)),Sc=new t(...sf);xf._rotateAround(nu,Mc)._add(pu)._add(Sc),wf._rotateAround(nu,Mc)._add(pu)._add(Sc),Wf._rotateAround(nu,Mc)._add(pu)._add(Sc),lf._rotateAround(nu,Mc)._add(pu)._add(Sc)}if(en){let Mc=Math.sin(en),nu=Math.cos(en),Ju=[nu,-Mc,Mc,nu];xf._matMult(Ju),wf._matMult(Ju),Wf._matMult(Ju),lf._matMult(Ju)}let Yf=new t(0,0),vh=new t(0,0);Bn.push({tl:xf,tr:wf,bl:Wf,br:lf,tex:rn,writingMode:lr.writingMode,glyphOffset:js,sectionIndex:Dn.sectionIndex,isSDF:xi,pixelOffsetTL:Yf,pixelOffsetBR:vh,minFontScaleX:0,minFontScaleY:0})}return Bn}(0,L,me,te,ue,pe,Y,D.allowVerticalPlacement),er=D.textSizeData,tr=null;er.kind==="source"?(tr=[ad*te.layout.get("text-size").evaluate(pe,{})],tr[0]>Rd&&ee(`${D.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):er.kind==="composite"&&(tr=[ad*Ve.compositeTextSizes[0].evaluate(pe,{},bt),ad*Ve.compositeTextSizes[1].evaluate(pe,{},bt)],(tr[0]>Rd||tr[1]>Rd)&&ee(`${D.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),D.addSymbols(D.text,Et,tr,me,ue,pe,we,d,Ce.lineStartIndex,Ce.lineLength,at,bt);for(let xr of ze)Pe[xr]=D.text.placedSymbolArray.length-1;return 4*Et.length}function W6(D){for(let d in D)return D[d];return null}function DF(D,d,L,Y){let te=D.compareText;if(d in te){let ue=te[d];for(let pe=ue.length-1;pe>=0;pe--)if(Y.dist(ue[pe])this.process()),this.subscription=je(this.target,"message",L=>this.receive(L),!1),this.globalScope=fe(self)?D:window}registerMessageHandler(D,d){this.messageHandlers[D]=d}unregisterMessageHandler(D){delete this.messageHandlers[D]}sendAsync(D,d){return new Promise((L,Y)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10),ue=d?je(d.signal,"abort",()=>{ue?.unsubscribe(),delete this.resolveRejects[te];let Ce={id:te,type:"",origin:location.origin,targetMapId:D.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Ce)},HR):null;this.resolveRejects[te]={resolve:Ce=>{ue?.unsubscribe(),L(Ce)},reject:Ce=>{ue?.unsubscribe(),Y(Ce)}};let pe=[],me=Object.assign(Object.assign({},D),{id:te,sourceMapId:this.mapId,origin:location.origin,data:pt(D.data,pe)});this.target.postMessage(me,{transfer:pe})})}receive(D){let d=D.data,L=d.id,Y=["file://","resource://android","null"],te=[d.origin,location.origin],ue=d.origin===location.origin,pe=te.some(me=>Y.includes(me));if((ue||pe)&&(!d.targetMapId||this.mapId===d.targetMapId)){if(d.type===""){delete this.tasks[L];let me=this.abortControllers[L];return delete this.abortControllers[L],void(me&&me.abort())}if(fe(self)||d.mustQueue)return this.tasks[L]=d,this.taskQueue.push(L),void this.invoker.trigger();this.processTask(L,d)}}process(){if(this.taskQueue.length===0)return;let D=this.taskQueue.shift(),d=this.tasks[D];delete this.tasks[D],this.taskQueue.length>0&&this.invoker.trigger(),d&&this.processTask(D,d)}processTask(D,d){return e(this,void 0,void 0,function*(){if(d.type===""){let te=this.resolveRejects[D];return delete this.resolveRejects[D],te?void(d.error?te.reject(j(_t(d.error))):te.resolve(_t(d.data))):void 0}if(!this.messageHandlers[d.type])return void this.completeTask(D,new Error(`Could not find a registered handler for ${d.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let L=_t(d.data),Y=new AbortController;this.abortControllers[D]=Y;try{let te=yield this.messageHandlers[d.type](d.sourceMapId,L,Y);this.completeTask(D,null,te)}catch(te){this.completeTask(D,j(te))}})}completeTask(D,d,L){let Y=[];delete this.abortControllers[D];let te={id:D,type:"",sourceMapId:this.mapId,origin:location.origin,error:d?pt(d):null,data:pt(L,Y)};this.target.postMessage(te,{transfer:Y})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},l.O=function(){var D=new i(16);return i!=Float32Array&&(D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[11]=0,D[12]=0,D[13]=0,D[14]=0),D[0]=1,D[5]=1,D[10]=1,D[15]=1,D},l.P=t,l.Q=function(D,d,L){var Y,te,ue,pe,me,Ce,we,ze,Pe,at,Ve,bt,Et=L[0],er=L[1],tr=L[2];return d===D?(D[12]=d[0]*Et+d[4]*er+d[8]*tr+d[12],D[13]=d[1]*Et+d[5]*er+d[9]*tr+d[13],D[14]=d[2]*Et+d[6]*er+d[10]*tr+d[14],D[15]=d[3]*Et+d[7]*er+d[11]*tr+d[15]):(te=d[1],ue=d[2],pe=d[3],me=d[4],Ce=d[5],we=d[6],ze=d[7],Pe=d[8],at=d[9],Ve=d[10],bt=d[11],D[0]=Y=d[0],D[1]=te,D[2]=ue,D[3]=pe,D[4]=me,D[5]=Ce,D[6]=we,D[7]=ze,D[8]=Pe,D[9]=at,D[10]=Ve,D[11]=bt,D[12]=Y*Et+me*er+Pe*tr+d[12],D[13]=te*Et+Ce*er+at*tr+d[13],D[14]=ue*Et+we*er+Ve*tr+d[14],D[15]=pe*Et+ze*er+bt*tr+d[15]),D},l.R=ys,l.S=function(D,d,L){var Y=L[0],te=L[1],ue=L[2];return D[0]=d[0]*Y,D[1]=d[1]*Y,D[2]=d[2]*Y,D[3]=d[3]*Y,D[4]=d[4]*te,D[5]=d[5]*te,D[6]=d[6]*te,D[7]=d[7]*te,D[8]=d[8]*ue,D[9]=d[9]*ue,D[10]=d[10]*ue,D[11]=d[11]*ue,D[12]=d[12],D[13]=d[13],D[14]=d[14],D[15]=d[15],D},l.T=kd,l.U=function(D,d,L){var Y=d[0],te=d[1],ue=d[2],pe=d[3],me=d[4],Ce=d[5],we=d[6],ze=d[7],Pe=d[8],at=d[9],Ve=d[10],bt=d[11],Et=d[12],er=d[13],tr=d[14],xr=d[15],lr=L[0],Mr=L[1],Xr=L[2],na=L[3];return D[0]=lr*Y+Mr*me+Xr*Pe+na*Et,D[1]=lr*te+Mr*Ce+Xr*at+na*er,D[2]=lr*ue+Mr*we+Xr*Ve+na*tr,D[3]=lr*pe+Mr*ze+Xr*bt+na*xr,D[4]=(lr=L[4])*Y+(Mr=L[5])*me+(Xr=L[6])*Pe+(na=L[7])*Et,D[5]=lr*te+Mr*Ce+Xr*at+na*er,D[6]=lr*ue+Mr*we+Xr*Ve+na*tr,D[7]=lr*pe+Mr*ze+Xr*bt+na*xr,D[8]=(lr=L[8])*Y+(Mr=L[9])*me+(Xr=L[10])*Pe+(na=L[11])*Et,D[9]=lr*te+Mr*Ce+Xr*at+na*er,D[10]=lr*ue+Mr*we+Xr*Ve+na*tr,D[11]=lr*pe+Mr*ze+Xr*bt+na*xr,D[12]=(lr=L[12])*Y+(Mr=L[13])*me+(Xr=L[14])*Pe+(na=L[15])*Et,D[13]=lr*te+Mr*Ce+Xr*at+na*er,D[14]=lr*ue+Mr*we+Xr*Ve+na*tr,D[15]=lr*pe+Mr*ze+Xr*bt+na*xr,D},l.V=function(D,d){let L={};for(let Y of d)Y in D&&(L[Y]=D[Y]);return L},l.W=Fd,l.X=V,l.Y=YT,l.Z=WT,l._=e,l.a=Te,l.a$=function(D){var d=new i(3);return d[0]=D[0],d[1]=D[1],d[2]=D[2],d},l.a0=f,l.a1=p,l.a2=Me,l.a3=rh,l.a4=$T,l.a5=rg,l.a6=F,l.a7=A0,l.a8=dv,l.a9=25,l.aA=function(D){var d=D[0],L=D[1];return Math.sqrt(d*d+L*L)},l.aB=function(D){return D[0]=0,D[1]=0,D},l.aC=function(D,d,L){return D[0]=d[0]*L,D[1]=d[1]*L,D},l.aD=C_,l.aE=z,l.aF=function(D,d,L,Y){let te=d.y-D.y,ue=d.x-D.x,pe=Y.y-L.y,me=Y.x-L.x,Ce=pe*ue-me*te;if(Ce===0)return null;let we=(me*(D.y-L.y)-pe*(D.x-L.x))/Ce;return new t(D.x+we*ue,D.y+we*te)},l.aG=I6,l.aH=ln,l.aI=function(D){let d=1/0,L=1/0,Y=-1/0,te=-1/0;for(let ue of D)d=Math.min(d,ue.x),L=Math.min(L,ue.y),Y=Math.max(Y,ue.x),te=Math.max(te,ue.y);return[d,L,Y,te]},l.aJ=wc,l.aK=P,l.aL=function(D,d,L,Y,te=!1){if(!L[0]&&!L[1])return[0,0];let ue=te?Y==="map"?-D.bearingInRadians:0:Y==="viewport"?D.bearingInRadians:0;if(ue){let pe=Math.sin(ue),me=Math.cos(ue);L=[L[0]*me-L[1]*pe,L[0]*pe+L[1]*me]}return[te?L[0]:P(d,L[0],D.zoom),te?L[1]:P(d,L[1],D.zoom)]},l.aN=k_,l.aO=tb,l.aP=E_,l.aQ=D=>D.type==="symbol",l.aR=Wm,l.aS=ut,l.aT=Gm,l.aU=Rt,l.aV=Ya,l.aW=ya,l.aX=ge,l.aY=ZT,l.aZ=h,l.a_=w,l.aa=R_,l.ab=D=>{let d=window.document.createElement("video");return d.muted=!0,new Promise(L=>{d.onloadstart=()=>{L(d)};for(let Y of D){let te=window.document.createElement("source");ar(Y)||(d.crossOrigin="Anonymous"),te.src=Y,d.appendChild(te)}})},l.ac=Ht,l.ad=function(){return K++},l.ae=ce,l.af=dp,l.ag=E0,l.ah=Ka,l.ai=Co,l.aj=e6,l.ak=function(D){let d={};if(D.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(L,Y,te,ue)=>{let pe=te||ue;return d[Y]=!pe||pe.toLowerCase(),""}),d["max-age"]){let L=parseInt(d["max-age"],10);isNaN(L)?delete d["max-age"]:d["max-age"]=L}return d},l.al=oe,l.am=85.051129,l.an=ke,l.ao=function(D){return Math.pow(2,D)},l.ap=S,l.aq=XT,l.ar=function(D){return Math.log(D)/Math.LN2},l.as=function(D){var d=D[0],L=D[1];return d*d+L*L},l.at=function(D){if(!D.length)return new Set;let d=Math.max(...D.map(Ce=>Ce.canonical.z)),L=1/0,Y=-1/0,te=1/0,ue=-1/0,pe=[];for(let Ce of D){let{x:we,y:ze,z:Pe}=Ce.canonical,at=Math.pow(2,d-Pe),Ve=we*at,bt=ze*at;pe.push({id:Ce,x:Ve,y:bt}),VeY&&(Y=Ve),btue&&(ue=bt)}let me=new Set;for(let Ce of pe)Ce.x!==L&&Ce.x!==Y&&Ce.y!==te&&Ce.y!==ue||me.add(Ce.id);return me},l.au=function(D,d){let L=Math.abs(2*D.wrap)-+(D.wrap<0),Y=Math.abs(2*d.wrap)-+(d.wrap<0);return D.overscaledZ-d.overscaledZ||Y-L||d.canonical.y-D.canonical.y||d.canonical.x-D.canonical.x},l.av=class{constructor(D,d){this.max=D,this.onRemove=d,this.reset()}reset(){for(let D in this.data)for(let d of this.data[D])d.timeout&&clearTimeout(d.timeout),this.onRemove(d.value);return this.data={},this.order=[],this}add(D,d,L){let Y=D.wrapped().key;this.data[Y]===void 0&&(this.data[Y]=[]);let te={value:d,timeout:void 0};if(L!==void 0&&(te.timeout=setTimeout(()=>{this.remove(D,te)},L)),this.data[Y].push(te),this.order.push(Y),this.order.length>this.max){let ue=this._getAndRemoveByKey(this.order[0]);ue&&this.onRemove(ue)}return this}has(D){return D.wrapped().key in this.data}getAndRemove(D){return this.has(D)?this._getAndRemoveByKey(D.wrapped().key):null}_getAndRemoveByKey(D){let d=this.data[D].shift();return d.timeout&&clearTimeout(d.timeout),this.data[D].length===0&&delete this.data[D],this.order.splice(this.order.indexOf(D),1),d.value}getByKey(D){let d=this.data[D];return d?d[0].value:null}get(D){return this.has(D)?this.data[D.wrapped().key][0].value:null}remove(D,d){if(!this.has(D))return this;let L=D.wrapped().key,Y=d===void 0?0:this.data[L].indexOf(d),te=this.data[L][Y];return this.data[L].splice(Y,1),te.timeout&&clearTimeout(te.timeout),this.data[L].length===0&&delete this.data[L],this.onRemove(te.value),this.order.splice(this.order.indexOf(L),1),this}setMaxSize(D){for(this.max=D;this.order.length>this.max;){let d=this._getAndRemoveByKey(this.order[0]);d&&this.onRemove(d)}return this}filter(D){let d=[];for(let L in this.data)for(let Y of this.data[L])D(Y.value)||d.push(Y);for(let L of d)this.remove(L.value.tileID,L)}},l.aw=function(D,d){let L=0,Y=0;if(D.kind==="constant")Y=D.layoutSize;else if(D.kind!=="source"){let{interpolationType:te,minZoom:ue,maxZoom:pe}=D,me=te?oe(Ji.interpolationFactor(te,d,ue,pe),0,1):0;D.kind==="camera"?Y=Ls.number(D.minSize,D.maxSize,me):L=me}return{uSizeT:L,uSize:Y}},l.ay=function(D,{uSize:d,uSizeT:L},{lowerSize:Y,upperSize:te}){return D.kind==="source"?Y/ad:D.kind==="composite"?Ls.number(Y/ad,te/ad,L):d},l.az=R,l.b=xe,l.b$=qs,l.b0=function(D,d,L){return D[0]=d[0]-L[0],D[1]=d[1]-L[1],D[2]=d[2]-L[2],D},l.b1=function(D,d){var L=d[0],Y=d[1],te=d[2],ue=L*L+Y*Y+te*te;return ue>0&&(ue=1/Math.sqrt(ue)),D[0]=d[0]*ue,D[1]=d[1]*ue,D[2]=d[2]*ue,D},l.b2=u,l.b3=function(D,d){return D[0]*d[0]+D[1]*d[1]+D[2]*d[2]},l.b4=function(D,d,L){return D[0]=d[0]*L[0],D[1]=d[1]*L[1],D[2]=d[2]*L[2],D[3]=d[3]*L[3],D},l.b5=C,l.b6=function(D,d,L){let Y=d[0]*L[0]+d[1]*L[1]+d[2]*L[2];return Y===0?null:(-(D[0]*L[0]+D[1]*L[1]+D[2]*L[2])-L[3])/Y},l.b7=b,l.b8=function(D,d,L){return D[0]=d[0]*L,D[1]=d[1]*L,D[2]=d[2]*L,D[3]=d[3]*L,D},l.b9=function(D,d){return D[0]*d[0]+D[1]*d[1]+D[2]*d[2]+D[3]},l.bA=N,l.bB=function(D,d,L){var Y=L[0],te=L[1],ue=L[2],pe=L[3],me=d[0],Ce=d[1],we=d[2],ze=te*we-ue*Ce,Pe=ue*me-Y*we,at=Y*Ce-te*me;return D[0]=me+pe*(ze+=ze)+te*(at+=at)-ue*(Pe+=Pe),D[1]=Ce+pe*Pe+ue*ze-Y*at,D[2]=we+pe*at+Y*Pe-te*ze,D},l.bC=function(D,d,L){let Y=(te=[D[0],D[1],D[2],d[0],d[1],d[2],L[0],L[1],L[2]])[0]*((ze=te[8])*(pe=te[4])-(me=te[5])*(we=te[7]))+te[1]*(-ze*(ue=te[3])+me*(Ce=te[6]))+te[2]*(we*ue-pe*Ce);var te,ue,pe,me,Ce,we,ze;if(Y===0)return null;let Pe=u([],[d[0],d[1],d[2]],[L[0],L[1],L[2]]),at=u([],[L[0],L[1],L[2]],[D[0],D[1],D[2]]),Ve=u([],[D[0],D[1],D[2]],[d[0],d[1],d[2]]),bt=h([],Pe,-D[3]);return w(bt,bt,h([],at,-d[3])),w(bt,bt,h([],Ve,-L[3])),h(bt,bt,1/Y),bt},l.bD=I_,l.bE=function(){return new Float64Array(4)},l.bF=function(D,d,L,Y){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[0]*Math.cos(Y)-te[1]*Math.sin(Y),ue[1]=te[0]*Math.sin(Y)+te[1]*Math.cos(Y),ue[2]=te[2],D[0]=ue[0]+L[0],D[1]=ue[1]+L[1],D[2]=ue[2]+L[2],D},l.bG=function(D,d,L,Y){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[0],ue[1]=te[1]*Math.cos(Y)-te[2]*Math.sin(Y),ue[2]=te[1]*Math.sin(Y)+te[2]*Math.cos(Y),D[0]=ue[0]+L[0],D[1]=ue[1]+L[1],D[2]=ue[2]+L[2],D},l.bH=function(D,d,L,Y){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[2]*Math.sin(Y)+te[0]*Math.cos(Y),ue[1]=te[1],ue[2]=te[2]*Math.cos(Y)-te[0]*Math.sin(Y),D[0]=ue[0]+L[0],D[1]=ue[1]+L[1],D[2]=ue[2]+L[2],D},l.bI=function(D,d,L){var Y=Math.sin(L),te=Math.cos(L),ue=d[0],pe=d[1],me=d[2],Ce=d[3],we=d[8],ze=d[9],Pe=d[10],at=d[11];return d!==D&&(D[4]=d[4],D[5]=d[5],D[6]=d[6],D[7]=d[7],D[12]=d[12],D[13]=d[13],D[14]=d[14],D[15]=d[15]),D[0]=ue*te-we*Y,D[1]=pe*te-ze*Y,D[2]=me*te-Pe*Y,D[3]=Ce*te-at*Y,D[8]=ue*Y+we*te,D[9]=pe*Y+ze*te,D[10]=me*Y+Pe*te,D[11]=Ce*Y+at*te,D},l.bJ=function(D,d){let L=U(D,360),Y=U(d,360),te=Y-L,ue=Y>L?te-360:te+360;return Math.abs(te)0?pe:-pe},l.bM=function(D,d){let L=U(D,2*Math.PI),Y=U(d,2*Math.PI);return Math.min(Math.abs(L-Y),Math.abs(L-Y+2*Math.PI),Math.abs(L-Y-2*Math.PI))},l.bN=function(){let D={},d=ht.$version;for(let L in ht.$root){let Y=ht.$root[L];if(Y.required){let te=null;te=L==="version"?d:Y.type==="array"?[]:{},te!=null&&(D[L]=te)}}return D},l.bO=At,l.bP=Nt,l.bQ=function D(d,L){if(Array.isArray(d)){if(!Array.isArray(L)||d.length!==L.length)return!1;for(let Y=0;YD.type==="raster",l.bV=q,l.bW=function(D,d){if(!D)return[{command:"setStyle",args:[d]}];let L=[];try{if(!He(D.version,d.version))return[{command:"setStyle",args:[d]}];He(D.center,d.center)||L.push({command:"setCenter",args:[d.center]}),He(D.state,d.state)||L.push({command:"setGlobalState",args:[d.state]}),He(D.centerAltitude,d.centerAltitude)||L.push({command:"setCenterAltitude",args:[d.centerAltitude]}),He(D.zoom,d.zoom)||L.push({command:"setZoom",args:[d.zoom]}),He(D.bearing,d.bearing)||L.push({command:"setBearing",args:[d.bearing]}),He(D.pitch,d.pitch)||L.push({command:"setPitch",args:[d.pitch]}),He(D.roll,d.roll)||L.push({command:"setRoll",args:[d.roll]}),He(D.sprite,d.sprite)||L.push({command:"setSprite",args:[d.sprite]}),He(D.glyphs,d.glyphs)||L.push({command:"setGlyphs",args:[d.glyphs]}),He(D.transition,d.transition)||L.push({command:"setTransition",args:[d.transition]}),He(D.light,d.light)||L.push({command:"setLight",args:[d.light]}),He(D.terrain,d.terrain)||L.push({command:"setTerrain",args:[d.terrain]}),He(D.sky,d.sky)||L.push({command:"setSky",args:[d.sky]}),He(D.projection,d.projection)||L.push({command:"setProjection",args:[d.projection]});let Y={},te=[];(function(pe,me,Ce,we){let ze;for(ze in me=me||{},pe=pe||{})Object.prototype.hasOwnProperty.call(pe,ze)&&(Object.prototype.hasOwnProperty.call(me,ze)||Je(ze,Ce,we));for(ze in me)Object.prototype.hasOwnProperty.call(me,ze)&&(Object.prototype.hasOwnProperty.call(pe,ze)?He(pe[ze],me[ze])||(pe[ze].type==="geojson"&&me[ze].type==="geojson"&&dt(pe,me,ze)?$e(Ce,{command:"setGeoJSONSourceData",args:[ze,me[ze].data]}):Mt(ze,me,Ce,we)):Ze(ze,me,Ce))})(D.sources,d.sources,te,Y);let ue=[];D.layers&&D.layers.forEach(pe=>{"source"in pe&&Y[pe.source]?L.push({command:"removeLayer",args:[pe.id]}):ue.push(pe)}),L=L.concat(te),function(pe,me,Ce){me=me||[];let we=(pe=pe||[]).map(Ct),ze=me.map(Ct),Pe=pe.reduce(Vt,{}),at=me.reduce(Vt,{}),Ve=we.slice(),bt=Object.create(null),Et,er,tr,xr,lr;for(let Mr=0,Xr=0;Mrm?(te=Math.acos(ue),pe=Math.sin(te),me=Math.sin((1-Y)*te)/pe,Ce=Math.sin(Y*te)/pe):(me=1-Y,Ce=Y),D[0]=me*we+Ce*Ve,D[1]=me*ze+Ce*bt,D[2]=me*Pe+Ce*Et,D[3]=me*at+Ce*er,D},l.bm=function(D){let d=new Float64Array(9);var L,Y,te,ue,pe,me,Ce,we,ze,Pe,at,Ve,bt,Et,er,tr,xr,lr;Pe=(te=(Y=D)[0])*(Ce=te+te),at=(ue=Y[1])*Ce,bt=(pe=Y[2])*Ce,Et=pe*(we=ue+ue),tr=(me=Y[3])*Ce,xr=me*we,lr=me*(ze=pe+pe),(L=d)[0]=1-(Ve=ue*we)-(er=pe*ze),L[3]=at-lr,L[6]=bt+xr,L[1]=at+lr,L[4]=1-Pe-er,L[7]=Et-tr,L[2]=bt-xr,L[5]=Et+tr,L[8]=1-Pe-Ve;let Mr=ge(-Math.asin(oe(d[2],-1,1))),Xr,na;return Math.hypot(d[5],d[8])<.001?(Xr=0,na=-ge(Math.atan2(d[3],d[4]))):(Xr=ge(d[5]===0&&d[8]===0?0:Math.atan2(d[5],d[8])),na=ge(d[1]===0&&d[0]===0?0:Math.atan2(d[1],d[0]))),{roll:Xr,pitch:Mr+90,bearing:na}},l.bn=function(D,d){return D.roll==d.roll&&D.pitch==d.pitch&&D.bearing==d.bearing},l.bo=gn,l.bp=To,l.bq=sp,l.br=m0,l.bs=op,l.bt=Z,l.bu=Q,l.bv=Mo,l.bw=function(D,d,L,Y,te){return Z(Y,te,oe((D-d)/(L-d),0,1))},l.bx=function(D,d,L,Y){return D[0]=d[0]+L[0]*Y,D[1]=d[1]+L[1]*Y,D[2]=d[2]+L[2]*Y,D},l.by=U,l.bz=function(){return new Float64Array(3)},l.c=Ge,l.c$=_c,l.c0=class extends fo{constructor(D,d){super(D,d),this.current=Vs}set(D){if(D[12]!==this.current[12]||D[0]!==this.current[0])return this.current=D,void this.gl.uniformMatrix4fv(this.location,!1,D);for(let d=1;d<16;d++)if(D[d]!==this.current[d]){this.current=D,this.gl.uniformMatrix4fv(this.location,!1,D);break}}},l.c1=jo,l.c2=class extends fo{constructor(D,d){super(D,d),this.current=[0,0,0]}set(D){D[0]===this.current[0]&&D[1]===this.current[1]&&D[2]===this.current[2]||(this.current=D,this.gl.uniform3f(this.location,D[0],D[1],D[2]))}},l.c3=class extends fo{constructor(D,d){super(D,d),this.current=[0,0]}set(D){D[0]===this.current[0]&&D[1]===this.current[1]||(this.current=D,this.gl.uniform2f(this.location,D[0],D[1]))}},l.c4=T,l.c5=function(D,d){var L=Math.sin(d),Y=Math.cos(d);return D[0]=Y,D[1]=L,D[2]=0,D[3]=-L,D[4]=Y,D[5]=0,D[6]=0,D[7]=0,D[8]=1,D},l.c6=function(D,d,L){var Y=d[0],te=d[1],ue=d[2];return D[0]=Y*L[0]+te*L[3]+ue*L[6],D[1]=Y*L[1]+te*L[4]+ue*L[7],D[2]=Y*L[2]+te*L[5]+ue*L[8],D},l.c7=function(D,d,L,Y,te,ue,pe){var me=1/(d-L),Ce=1/(Y-te),we=1/(ue-pe);return D[0]=-2*me,D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[5]=-2*Ce,D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[10]=2*we,D[11]=0,D[12]=(d+L)*me,D[13]=(te+Y)*Ce,D[14]=(pe+ue)*we,D[15]=1,D},l.c8=class extends fo{constructor(D,d){super(D,d),this.current=new Array}set(D){if(D!=this.current){this.current=D;let d=new Float32Array(4*D.length);for(let L=0;L25||Y<0||Y>=1||L<0||L>=1)},l.cE=function(D,d){return D[0]=d[0],D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[5]=d[1],D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[10]=d[2],D[11]=0,D[12]=0,D[13]=0,D[14]=0,D[15]=1,D},l.cF=class extends Qt{},l.cG=Tt,l.cH=function(D,d){Ge.REGISTERED_PROTOCOLS[D]=d},l.cI=function(D){delete Ge.REGISTERED_PROTOCOLS[D]},l.cJ=function(D,d){let L={};for(let te=0;teli*wc)}let Bn=Ce?"center":te.get("text-justify").evaluate(Pe,{},D.canonical),Zn=te.get("symbol-placement")==="point"?te.get("text-max-width").evaluate(Pe,{},D.canonical)*wc:1/0,Dn=()=>{D.bucket.allowVerticalPlacement&&Ur(na)&&(er.vertical=Qm(tr,D.glyphMap,D.glyphPositions,D.imagePositions,at,Zn,me,_n,"left",Na,lr,l.ax.vertical,!0,bt,Ve))};if(!Ce&&en){let rn=new Set;if(Bn==="auto")for(let xi=0;xigF(me,Ce,ue),Y.layers[pe])}(D,L,d),L.finish()},l.cT=function(D,d,L,Y,te,ue){let pe=R6(D,d,L,te,0);return pe=R6(pe,d,Y,ue,1),pe},l.cU=class{constructor(D){this.maxEntries=D,this.map=new Map}get(D){let d=this.map.get(D);return d!==void 0&&(this.map.delete(D),this.map.set(D,d)),d}set(D,d){if(this.map.has(D))this.map.delete(D);else if(this.map.size>=this.maxEntries){let L=this.map.keys().next().value;this.map.delete(L)}this.map.set(D,d)}clear(){this.map.clear()}},l.cV=nT,l.cW=Jm,l.cX=C6,l.cY=function(D,d,L,Y,te){return e(this,void 0,void 0,function*(){if(p())try{return yield Me(D,d,L,Y,te)}catch{}return function(ue,pe,me,Ce,we){let ze=ue.width,Pe=ue.height;Ie&&qe||(Ie=new OffscreenCanvas(ze,Pe),qe=Ie.getContext("2d",{willReadFrequently:!0})),Ie.width=ze,Ie.height=Pe,qe.drawImage(ue,0,0,ze,Pe);let at=qe.getImageData(pe,me,Ce,we);return qe.clearRect(0,0,ze,Pe),at.data}(D,d,L,Y,te)})},l.cZ=Cd,l.c_=class{constructor(D,d){this.layers={[E0]:this},this.name=E0,this.version=d?d.version:1,this.extent=d?d.extent:4096,this.length=D.length,this.features=D}feature(D){return new mF(this.features[D],this.extent)}},l.ca=class extends pa{},l.cb=vR,l.cc=class extends On{},l.cd=Au,l.ce=function(D){return D<=1?1:Math.pow(2,Math.ceil(Math.log(D)/Math.LN2))},l.cf=au,l.cg=function(D,d,L){var Y=d[0],te=d[1],ue=d[2],pe=L[3]*Y+L[7]*te+L[11]*ue+L[15];return D[0]=(L[0]*Y+L[4]*te+L[8]*ue+L[12])/(pe=pe||1),D[1]=(L[1]*Y+L[5]*te+L[9]*ue+L[13])/pe,D[2]=(L[2]*Y+L[6]*te+L[10]*ue+L[14])/pe,D},l.ch=class extends gr{},l.ci=class extends y{},l.cj=function(D,d){return D[0]===d[0]&&D[1]===d[1]&&D[2]===d[2]&&D[3]===d[3]&&D[4]===d[4]&&D[5]===d[5]&&D[6]===d[6]&&D[7]===d[7]&&D[8]===d[8]&&D[9]===d[9]&&D[10]===d[10]&&D[11]===d[11]&&D[12]===d[12]&&D[13]===d[13]&&D[14]===d[14]&&D[15]===d[15]},l.ck=function(D,d){var L=D[0],Y=D[1],te=D[2],ue=D[3],pe=D[4],me=D[5],Ce=D[6],we=D[7],ze=D[8],Pe=D[9],at=D[10],Ve=D[11],bt=D[12],Et=D[13],er=D[14],tr=D[15],xr=d[0],lr=d[1],Mr=d[2],Xr=d[3],na=d[4],Ea=d[5],Na=d[6],_n=d[7],en=d[8],Bn=d[9],Zn=d[10],Dn=d[11],rn=d[12],li=d[13],xi=d[14],ui=d[15];return Math.abs(L-xr)<=m*Math.max(1,Math.abs(L),Math.abs(xr))&&Math.abs(Y-lr)<=m*Math.max(1,Math.abs(Y),Math.abs(lr))&&Math.abs(te-Mr)<=m*Math.max(1,Math.abs(te),Math.abs(Mr))&&Math.abs(ue-Xr)<=m*Math.max(1,Math.abs(ue),Math.abs(Xr))&&Math.abs(pe-na)<=m*Math.max(1,Math.abs(pe),Math.abs(na))&&Math.abs(me-Ea)<=m*Math.max(1,Math.abs(me),Math.abs(Ea))&&Math.abs(Ce-Na)<=m*Math.max(1,Math.abs(Ce),Math.abs(Na))&&Math.abs(we-_n)<=m*Math.max(1,Math.abs(we),Math.abs(_n))&&Math.abs(ze-en)<=m*Math.max(1,Math.abs(ze),Math.abs(en))&&Math.abs(Pe-Bn)<=m*Math.max(1,Math.abs(Pe),Math.abs(Bn))&&Math.abs(at-Zn)<=m*Math.max(1,Math.abs(at),Math.abs(Zn))&&Math.abs(Ve-Dn)<=m*Math.max(1,Math.abs(Ve),Math.abs(Dn))&&Math.abs(bt-rn)<=m*Math.max(1,Math.abs(bt),Math.abs(rn))&&Math.abs(Et-li)<=m*Math.max(1,Math.abs(Et),Math.abs(li))&&Math.abs(er-xi)<=m*Math.max(1,Math.abs(er),Math.abs(xi))&&Math.abs(tr-ui)<=m*Math.max(1,Math.abs(tr),Math.abs(ui))},l.cl=function(D,d){return D[0]=d[0],D[1]=d[1],D[2]=d[2],D[3]=d[3],D[4]=d[4],D[5]=d[5],D[6]=d[6],D[7]=d[7],D[8]=d[8],D[9]=d[9],D[10]=d[10],D[11]=d[11],D[12]=d[12],D[13]=d[13],D[14]=d[14],D[15]=d[15],D},l.cm=D=>D.type==="circle",l.cn=D=>D.type==="heatmap",l.co=D=>D.type==="line",l.cp=D=>D.type==="fill",l.cq=D=>D.type==="fill-extrusion",l.cr=D=>D.type==="hillshade",l.cs=D=>D.type==="color-relief",l.ct=D=>D.type==="background",l.cu=D=>D.type==="custom",l.cv=re,l.cw=function(D,d,L){if(d<=0)return D;let Y=1/d;return L===void 0||Math.abs(L)<1e-10?Math.round(D*Y)/Y:(L>0?Math.ceil(D*Y-1e-9):Math.floor(D*Y+1e-10))/Y},l.cx=function(D,d,L){let Y=B(d.x-L.x,d.y-L.y),te=B(D.x-L.x,D.y-L.y);var ue,pe;return ge(Math.atan2(Y[0]*te[1]-Y[1]*te[0],(ue=Y)[0]*(pe=te)[0]+ue[1]*pe[1]))},l.cy=ne,l.cz=function(D,d){var L;if(!ve[d])return!1;let Y=D?.target,te=((L=Y?.ownerDocument)===null||L===void 0?void 0:L.defaultView)||window;return D instanceof te.MouseEvent||D instanceof te.WheelEvent},l.d=j,l.d0=class{constructor(D,d){let L=(d=this.options=Object.assign({},aR,d)).debug;if(L&&console.time("preprocess data"),d.maxZoom<0||d.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(d.promoteId&&d.generateId)throw new Error("promoteId and generateId cannot be used together.");let Y=d_(D,d);L&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",d.indexMaxZoom,d.indexMaxPoints),console.time("generate tiles")),Y=g_(Y,d),d.updateable&&(this.source=Y),this.initializeIndex(Y,d)}initializeIndex(D,d){this.tileIndex=d.cluster?new ZI(d.clusterOptions):new rR(d),D.length&&this.tileIndex.initialize(D)}getTile(D,d,L){return d=+d,L=+L,(D=+D)<0||D>24?null:this.tileIndex.getTile(D,d,L)}updateData(D,d){let L=this.options;if(!L.updateable)throw new Error("to update tile geojson `updateable` option must be set to true");let{affected:Y,source:te}=function(ue,pe,me){let Ce=function(ze,Pe){var at,Ve;return ze?{removeAll:ze.removeAll,remove:new Set(ze.remove||[]),add:new Map((at=ze.add)==null?void 0:at.map(bt=>[Pe.promoteId?bt.properties[Pe.promoteId]:bt.id,bt])),update:new Map((Ve=ze.update)==null?void 0:Ve.map(bt=>[bt.id,bt]))}:{remove:new Set,add:new Map,update:new Map}}(pe,me),we=[];if(Ce.removeAll&&(we=ue,ue=[]),Ce.remove.size||Ce.add.size){let ze=[];for(let Pe of ue)(Ce.remove.has(Pe.id)||Ce.add.has(Pe.id))&&ze.push(Pe);if(ze.length){we.push(...ze);let Pe=new Set(ze.map(at=>at.id));ue=ue.filter(at=>!Pe.has(at.id))}if(Ce.add.size){let Pe=d_({type:"FeatureCollection",features:Array.from(Ce.add.values())},me);Pe=g_(Pe,me),we.push(...Pe),ue.push(...Pe)}}if(Ce.update.size){let ze=new Map,Pe=[];for(let at of ue)Ce.update.has(at.id)?ze.set(at.id,[...ze.get(at.id)||[],at]):Pe.push(at);for(let[at,Ve]of Ce.update){let bt=ze.get(at);if(!bt||bt.length===0)continue;let Et=$I(bt,Ve,me);we.push(...bt,...Et),Pe.push(...Et)}ue=Pe}return{affected:we,source:ue}}(this.source,D,L);d&&({affected:Y,source:te}=this.filterUpdate(te,Y,d)),Y.length&&(this.source=te,this.tileIndex.updateIndex(te,Y,L))}filterUpdate(D,d,L){let Y=new Set;for(let te of D)te.id!=null&&(L(Xm(te))||(d.push(te),Y.add(te.id)));return{affected:d,source:D=D.filter(te=>!Y.has(te.id))}}getData(){if(!this.options.updateable)throw new Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map(D=>Xm(D))}}updateClusterOptions(D,d){let L=this.options.cluster;this.options.cluster=D,this.options.clusterOptions=d,L!=D?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(D){return this.tileIndex.getClusterExpansionZoom(D)}getClusterChildren(D){return this.tileIndex.getChildren(D)}getClusterLeaves(D,d,L){return this.tileIndex.getLeaves(D,d,L)}},l.d1=Yi,l.e=$,l.f=ar,l.g=gt,l.h=D=>e(void 0,void 0,void 0,function*(){if(D.byteLength===0)return createImageBitmap(new ImageData(1,1));let d=new Blob([new Uint8Array(D)],{type:"image/png"});try{return createImageBitmap(d)}catch(L){throw new Error(`Could not load image because of ${j(L).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),l.i=fe,l.j=D=>new Promise((d,L)=>{let Y=new Image;Y.onload=()=>{d(Y),URL.revokeObjectURL(Y.src),Y.onload=null,window.requestAnimationFrame(()=>Y.src=Ae)},Y.onerror=()=>L(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let te=new Blob([new Uint8Array(D)],{type:"image/png"});Y.src=D.byteLength?URL.createObjectURL(te):Ae}),l.k=(D,d)=>Kt($(D,{type:"json"}),d),l.l=Ot,l.m=Kt,l.n=sr,l.o=(D,d)=>Kt($(D,{type:"arrayBuffer"}),d),l.p=RT,l.q=function(D){return new Jm(D).readFields(CR,[])},l.r=function(D){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(D))},l.s=je,l.t=Ds,l.u=Bs,l.v=xc,l.w=ee,l.x=ht,l.y=Po,l.z=Ol}),E("worker",["./shared"],function(l){"use strict";class e{constructor(w,h){this.keyCache={},w&&this.replace(w,h)}replace(w,h){this._layerConfigs={},this._layers={},this.update(w,[],h)}update(w,h,u){for(let b of w){this._layerConfigs[b.id]=b;let z=this._layers[b.id]=l.bT(b,u);z._featureFilter=l.ah(z.filter,u),this.keyCache[b.id]&&delete this.keyCache[b.id]}for(let b of h)delete this.keyCache[b],delete this._layerConfigs[b],delete this._layers[b];this.familiesBySource={};let A=l.cJ(Object.values(this._layerConfigs),this.keyCache);for(let b of A){let z=b.map(P=>this._layers[P.id]),I=z[0];if(I.isHidden())continue;let N=I.source||"",R=this.familiesBySource[N];R||(R=this.familiesBySource[N]={});let B=I.sourceLayer||l.ag,F=R[B];F||(F=R[B]=[]),F.push(z)}}}class t{constructor(w){let h={},u=[];for(let I in w){let N=w[I],R=h[I]={};for(let B in N){let F=N[+B];if(!F||F.bitmap.width===0||F.bitmap.height===0)continue;let P={x:0,y:0,w:F.bitmap.width+2,h:F.bitmap.height+2};u.push(P),R[B]={rect:P,metrics:F.metrics}}}let{w:A,h:b}=l.p(u),z=new l.t({width:A||1,height:b||1});for(let I in w){let N=w[I];for(let R in N){let B=N[+R];if(!B||B.bitmap.width===0||B.bitmap.height===0)continue;let F=h[I][R].rect;l.t.copy(B.bitmap,z,{x:0,y:0},{x:F.x+1,y:F.y+1},B.bitmap)}}this.image=z,this.positions=h}}l.cK("GlyphAtlas",t);class n{constructor(w){this.tileID=new l.a3(w.tileID.overscaledZ,w.tileID.wrap,w.tileID.canonical.z,w.tileID.canonical.x,w.tileID.canonical.y),this.uid=w.uid,this.zoom=w.zoom,this.pixelRatio=w.pixelRatio,this.tileSize=w.tileSize,this.source=w.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=w.showCollisionBoxes,this.collectResourceTiming=!!w.collectResourceTiming,this.returnDependencies=!!w.returnDependencies,this.promoteId=w.promoteId,this.inFlightDependencies=[]}parse(w,h,u,A,b){return l._(this,void 0,void 0,function*(){this.status="parsing",this.data=w,this.collisionBoxArray=new l.ae;let z=new l.cL(Object.keys(w.layers).sort()),I=new l.cM(this.tileID,this.promoteId);I.bucketLayerIDs=[];let N={},R={featureIndex:I,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:u,subdivisionGranularity:b},B=h.familiesBySource[this.source];for(let q in B){let W=w.layers[q];if(!W)continue;W.version===1&&l.w(`Vector tile source "${this.source}" layer "${q}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ee=z.encode(q),ae=[];for(let fe=0;fexe.id)))}}let F=l.bY(R.glyphDependencies,q=>Object.keys(q).map(Number));for(let q of this.inFlightDependencies)q?.abort();this.inFlightDependencies=[];let P=Promise.resolve({});if(Object.keys(F).length){let q=new AbortController;this.inFlightDependencies.push(q),P=A.sendAsync({type:"GG",data:{stacks:F,source:this.source,tileID:this.tileID,type:"glyphs"}},q)}let j=Object.keys(R.iconDependencies),U=Promise.resolve({});if(j.length){let q=new AbortController;this.inFlightDependencies.push(q),U=A.sendAsync({type:"GI",data:{icons:j,source:this.source,tileID:this.tileID,type:"icons"}},q)}let Z=Object.keys(R.patternDependencies),Q=Promise.resolve({});if(Z.length){let q=new AbortController;this.inFlightDependencies.push(q),Q=A.sendAsync({type:"GI",data:{icons:Z,source:this.source,tileID:this.tileID,type:"patterns"}},q)}let re=R.dashDependencies,ne=Promise.resolve({});if(Object.keys(re).length){let q=new AbortController;this.inFlightDependencies.push(q),ne=A.sendAsync({type:"GDA",data:{dashes:re}},q)}let[oe,V,$,K]=yield Promise.all([P,U,Q,ne]),G=new t(oe),X=new l.cN(V,$);for(let q in N){let W=N[q];W instanceof l.af?(r(W.layers,this.zoom,u),l.cO({bucket:W,glyphMap:oe,glyphPositions:G.positions,imageMap:V,imagePositions:X.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:R.subdivisionGranularity})):W.hasDependencies&&(W instanceof l.cP||W instanceof l.cQ||W instanceof l.cR)&&(r(W.layers,this.zoom,u),W.addFeatures(R,this.tileID.canonical,X.patternPositions,K))}return this.status="done",{buckets:Object.values(N).filter(q=>!q.isEmpty()),featureIndex:I,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:G.image,imageAtlas:X,dashPositions:K,glyphMap:this.returnDependencies?oe:null,iconMap:this.returnDependencies?V:null,glyphPositions:this.returnDependencies?G.positions:null}})}}function r(_,w,h){let u=new l.J(w);for(let A of _)A.recalculate(u,h)}class a{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(w,h){this.loading[w]=h}finishLoading(w){delete this.loading[w]}abort(w){let h=this.loading[w];h?.abort&&(h.abort.abort(),delete this.loading[w])}setParsing(w,h){this.parsing[w]=h}consumeParsing(w){let h=this.parsing[w];if(h)return delete this.parsing[w],h}clearParsing(w){delete this.parsing[w]}markLoaded(w,h){this.loaded[w]=h}getLoaded(w){let h=this.loaded[w];if(h)return h}removeLoaded(w){delete this.loaded[w]}clearLoaded(){this.loaded={}}}class o{constructor(w){this.start=`${w}#start`,this.end=`${w}#end`,this.measure=w,performance.mark(this.start)}finish(){performance.mark(this.end);let w=performance.getEntriesByName(this.measure);return w.length===0&&(performance.measure(this.measure,this.start,this.end),w=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),w}}class s{constructor(w,h,u,A,b){this.type=w,this.properties=u||{},this.extent=b,this.pointsArray=h,this.id=A}loadGeometry(){return this.pointsArray.map(w=>w.map(h=>new l.P(h.x,h.y)))}}class c{constructor(w,h,u){this.version=2,this._myFeatures=w,this.name=h,this.length=w.length,this.extent=u}feature(w){return this._myFeatures[w]}}class g{constructor(){this.layers={}}addLayer(w){this.layers[w.name]=w}}function f(_){let w=l.cS(_);return w.byteOffset===0&&w.byteLength===w.buffer.byteLength||(w=new Uint8Array(w)),{vectorTile:_,rawData:w.buffer}}function p(_,w,h){let{extent:u}=_,A=Math.pow(2,h.z-w.z),b=(h.x-w.x*A)*u,z=(h.y-w.y*A)*u,I=[];for(let N=0;N<_.length;N++){let R=_.feature(N),B=R.loadGeometry();for(let P of B)for(let j of P)j.x=j.x*A-b,j.y=j.y*A-z;let F=128;B=l.cT(B,R.type,-F,-F,u+F,u+F),B.length!==0&&I.push(new s(R.type,B,R.properties,R.id,u))}return new c(I,_.name,u)}class m{constructor(w,h,u){this.actor=w,this.layerIndex=h,this.availableImages=u,this.tileState=new a,this.overzoomedTileResultCache=new l.cU(1e3)}loadVectorTile(w,h){try{return{vectorTile:w.encoding!=="mlt"?new l.cV(new l.cW(h)):new l.cX(h),rawData:h}}catch(u){let A=new Uint8Array(h),b=`Unable to parse the tile at ${w.request.url}, `;throw b+=A[0]===31&&A[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${l.d(u).message}`,new Error(b)}}loadTile(w){return l._(this,void 0,void 0,function*(){let{uid:h,overzoomParameters:u}=w;u&&(w.request=u.overzoomRequest);let A=this._startRequestTiming(w),b=new n(w);this.tileState.startLoading(h,b);let z=new AbortController;b.abort=z;try{let I=yield l.o(w.request,z);if(w.etag&&w.etag===I.etag)return this.tileState.finishLoading(h),this._getEtagUnmodifiedResult(I,A);let N=this.loadVectorTile(w,I.data);if(this.tileState.finishLoading(h),!N)return null;let{vectorTile:R,rawData:B}=N;u&&({vectorTile:R,rawData:B}=this._getOverzoomTile(w,R));let F=this._getExpiryData(I),P=this._finishRequestTiming(A);b.vectorTile=R,this.tileState.markLoaded(h,b);let j={rawData:B,cacheControl:F,resourceTiming:P};this.tileState.setParsing(h,j);try{return yield this._parseWorkerTile(b,w,j)}finally{this.tileState.clearParsing(h)}}catch(I){throw this.tileState.finishLoading(h),b.status="done",this.tileState.markLoaded(h,b),I}})}_getEtagUnmodifiedResult(w,h){let u=this._getExpiryData(w),A=this._finishRequestTiming(h);return l.e({etagUnmodified:!0},u,A)}_parseWorkerTile(w,h,u){return l._(this,void 0,void 0,function*(){let A=yield w.parse(w.vectorTile,this.layerIndex,this.availableImages,this.actor,h.subdivisionGranularity);if(u){let{rawData:b,cacheControl:z,resourceTiming:I}=u;A=l.e({rawTileData:b.slice(0),encoding:h.encoding},A,z,I)}return A})}_getExpiryData({expires:w,cacheControl:h,etag:u}){let A={};return w&&(A.expires=w),h&&(A.cacheControl=h),u&&(A.etag=u),A}_startRequestTiming(w){var h;if(!((h=w.request)===null||h===void 0)&&h.collectResourceTiming)return new o(w.request.url)}_finishRequestTiming(w){let h=w?.finish();return h?{resourceTiming:JSON.parse(JSON.stringify(h))}:{}}_getOverzoomTile(w,h){var u;let{tileID:A,source:b,overzoomParameters:z}=w,{maxZoomTileID:I}=z,N=`${I.key}_${A.key}_${(u=w.request)===null||u===void 0?void 0:u.url}`,R=this.overzoomedTileResultCache.get(N);if(R)return R;let B=new g,F=this.layerIndex.familiesBySource[b];for(let j in F){let U=h.layers[j];if(!U)continue;let Z=p(U,I,A.canonical);Z.length>0&&B.addLayer(Z)}let P=f(B);return this.overzoomedTileResultCache.set(N,P),P}reloadTile(w){return l._(this,void 0,void 0,function*(){let h=w.uid,u=this.tileState.getLoaded(h);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=w.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(h);return yield this._parseWorkerTile(u,w,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,w)})}abortTile(w){return l._(this,void 0,void 0,function*(){this.tileState.abort(w.uid)})}removeTile(w){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(w.uid)})}}class i{constructor(){this.loaded={}}loadTile(w){return l._(this,void 0,void 0,function*(){let{uid:h,encoding:u,rawImageData:A,redFactor:b,greenFactor:z,blueFactor:I,baseShift:N}=w,R=A.width+2,B=A.height+2,F=l.b(A)?new l.R({width:R,height:B},yield l.cY(A,-1,-1,R,B)):A,P=new l.cZ(h,F,u,b,z,I,N);return this.loaded||(this.loaded={}),this.loaded[h]=P,P})}removeTile(w){let h=this.loaded,u=w.uid;h?.[u]&&delete h[u]}}class T{constructor(w,h,u,A=S){this.actor=w,this.layerIndex=h,this.availableImages=u,this.tileState=new a,this._createGeoJSONIndex=A}loadVectorTile(w){if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let{z:h,x:u,y:A}=w.tileID.canonical,b=this._geoJSONIndex.getTile(h,u,A);return b?f(new l.c_(b.features,{version:2,extent:l.a6})):null}loadTile(w){return l._(this,void 0,void 0,function*(){let{uid:h}=w,u=new n(w);u.abort=new AbortController;try{let A=this.loadVectorTile(w);if(!A)return null;let{vectorTile:b,rawData:z}=A;u.vectorTile=b,this.tileState.markLoaded(h,u);let I={rawData:z};this.tileState.setParsing(h,I);try{return yield this._parseWorkerTile(u,w,I)}finally{this.tileState.clearParsing(h)}}catch(A){throw u.status="done",this.tileState.markLoaded(h,u),A}})}_reloadLoadedTile(w){return l._(this,void 0,void 0,function*(){let h=w.uid,u=this.tileState.getLoaded(h);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=w.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(h);return yield this._parseWorkerTile(u,w,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,w)})}_parseWorkerTile(w,h,u){return l._(this,void 0,void 0,function*(){let A=yield w.parse(w.vectorTile,this.layerIndex,this.availableImages,this.actor,h.subdivisionGranularity);if(u){let{rawData:b}=u;A=l.e({rawTileData:b.slice(0),encoding:"mvt"},A)}return A})}abortTile(w){return l._(this,void 0,void 0,function*(){this.tileState.abort(w.uid)})}removeTile(w){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(w.uid)})}loadData(w){return l._(this,void 0,void 0,function*(){var h;(h=this._pendingRequest)===null||h===void 0||h.abort();let u=this._startRequestTiming(w);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(w,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let A={};return w.request&&(A.data=w.data),this._finishRequestTiming(u,w,A),A}catch(A){if(delete this._pendingRequest,!l.$(A))throw A;return{abandoned:!0}}})}_startRequestTiming(w){var h;if(!((h=w.request)===null||h===void 0)&&h.collectResourceTiming)return new o(w.request.url)}_finishRequestTiming(w,h,u){let A=w?.finish();A&&(u.resourceTiming={[h.source]:JSON.parse(JSON.stringify(A))})}reloadTile(w){return this.tileState.getLoaded(w.uid)?this._reloadLoadedTile(w):this.loadTile(w)}loadAndProcessGeoJSON(w,h){return l._(this,void 0,void 0,function*(){var u;if(w.request&&(w.data=(yield l.k(w.request,h)).data),w.data)return w.data=this._filterGeoJSON(w.data,w.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(w.data,w));if(w.dataDiff)return(u=this._geoJSONIndex)!==null&&u!==void 0||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},w)),void this._geoJSONIndex.updateData(w.dataDiff,this._getFilterPredicate(w.filter));if(w.updateCluster&&this._geoJSONIndex.updateClusterOptions(w.geojsonVtOptions.cluster,M(w)),this._geoJSONIndex==null)throw new Error(`Input data given to '${w.source}' is not a valid GeoJSON object.`)})}_filterGeoJSON(w,h){if(w.type!=="FeatureCollection")return w;let u=this._getFilterPredicate(h);return u?{type:"FeatureCollection",features:w.features.filter(A=>u(A))}:w}_getFilterPredicate(w){if(typeof w!="boolean"&&!w?.length)return;let h=l.c$(w,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(h.result==="error")throw new Error(h.value.map(u=>`${u.key}: ${u.message}`).join(", "));return u=>h.value.evaluate({zoom:0},u)}removeSource(w){return l._(this,void 0,void 0,function*(){var h;(h=this._pendingRequest)===null||h===void 0||h.abort()})}getClusterExpansionZoom(w){return this._geoJSONIndex.getClusterExpansionZoom(w.clusterId)}getClusterChildren(w){return this._geoJSONIndex.getClusterChildren(w.clusterId)}getClusterLeaves(w){return this._geoJSONIndex.getClusterLeaves(w.clusterId,w.limit,w.offset)}}function S(_,w){let h=l.e(w.geojsonVtOptions||{},{updateable:!0,clusterOptions:M(w)});return new l.d0(_,h)}function M({geojsonVtOptions:_,clusterProperties:w}){if(!w||!_.clusterOptions)return _.clusterOptions;let h={},u={},A={accumulated:null,zoom:0},b={properties:null},z=Object.keys(w);for(let I of z){let[N,R]=w[I],B=l.c$(R),F=l.c$(typeof N=="string"?[N,["accumulated"],["get",I]]:N);h[I]=B.value,u[I]=F.value}return _.clusterOptions.map=I=>{b.properties=I;let N={};for(let R of z)N[R]=h[R].evaluate(A,b);return N},_.clusterOptions.reduce=(I,N)=>{b.properties=N;for(let R of z)A.accumulated=I[R],I[R]=u[R].evaluate(A,b)},_.clusterOptions}class C{constructor(w){this.self=w,this.actor=new l.N(w),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(h,u)=>{if(this.externalWorkerSourceTypes[h])throw new Error(`Worker source with name "${h}" already registered.`);this.externalWorkerSourceTypes[h]=u},this.self.addProtocol=l.cH,this.self.removeProtocol=l.cI,this.self.registerRTLTextPlugin=h=>{l.d1.setMethods(h)},this.self.makeRequest=l.m,this.actor.registerMessageHandler("LDT",(h,u)=>this._getDEMWorkerSource(h,u.source).loadTile(u)),this.actor.registerMessageHandler("RDT",(h,u)=>l._(this,void 0,void 0,function*(){this._getDEMWorkerSource(h,u.source).removeTile(u)})),this.actor.registerMessageHandler("GCEZ",(h,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(h,u.type,u.source).getClusterExpansionZoom(u)})),this.actor.registerMessageHandler("GCC",(h,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(h,u.type,u.source).getClusterChildren(u)})),this.actor.registerMessageHandler("GCL",(h,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(h,u.type,u.source).getClusterLeaves(u)})),this.actor.registerMessageHandler("LD",(h,u)=>this._getWorkerSource(h,u.type,u.source).loadData(u)),this.actor.registerMessageHandler("LT",(h,u)=>this._getWorkerSource(h,u.type,u.source).loadTile(u)),this.actor.registerMessageHandler("RT",(h,u)=>this._getWorkerSource(h,u.type,u.source).reloadTile(u)),this.actor.registerMessageHandler("AT",(h,u)=>this._getWorkerSource(h,u.type,u.source).abortTile(u)),this.actor.registerMessageHandler("RMT",(h,u)=>this._getWorkerSource(h,u.type,u.source).removeTile(u)),this.actor.registerMessageHandler("RS",(h,u)=>l._(this,void 0,void 0,function*(){var A,b;if(!(!((b=(A=this.workerSources[h])===null||A===void 0?void 0:A[u.type])===null||b===void 0)&&b[u.source]))return;let z=this.workerSources[h][u.type][u.source];delete this.workerSources[h][u.type][u.source],z.removeSource!==void 0&&z.removeSource(u)})),this.actor.registerMessageHandler("RM",h=>l._(this,void 0,void 0,function*(){delete this.layerIndexes[h],delete this.availableImages[h],delete this.workerSources[h],delete this.demWorkerSources[h],this.globalStates.delete(h)})),this.actor.registerMessageHandler("SR",(h,u)=>l._(this,void 0,void 0,function*(){this.referrer=u})),this.actor.registerMessageHandler("SRPS",(h,u)=>this._syncRTLPluginState(h,u)),this.actor.registerMessageHandler("IS",(h,u)=>l._(this,void 0,void 0,function*(){this.self.importScripts(u)})),this.actor.registerMessageHandler("SI",(h,u)=>this._setImages(h,u)),this.actor.registerMessageHandler("UL",(h,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(h).update(u.layers,u.removedIds,this._getGlobalState(h))})),this.actor.registerMessageHandler("UGS",(h,u)=>l._(this,void 0,void 0,function*(){let A=this._getGlobalState(h);for(let b in u)A[b]=u[b]})),this.actor.registerMessageHandler("SL",(h,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(h).replace(u,this._getGlobalState(h))}))}_getGlobalState(w){let h=this.globalStates.get(w);return h||(h={},this.globalStates.set(w,h)),h}_setImages(w,h){return l._(this,void 0,void 0,function*(){this.availableImages[w]=h;for(let u in this.workerSources[w]){let A=this.workerSources[w][u];for(let b in A)A[b].availableImages=h}})}_syncRTLPluginState(w,h){return l._(this,void 0,void 0,function*(){return yield l.d1.syncState(h,this.self.importScripts)})}_getAvailableImages(w){let h=this.availableImages[w];return h||(h=[]),h}_getLayerIndex(w){let h=this.layerIndexes[w];return h||(h=this.layerIndexes[w]=new e),h}_getWorkerSource(w,h,u){var A,b;if((A=this.workerSources)[w]||(A[w]={}),(b=this.workerSources[w])[h]||(b[h]={}),!this.workerSources[w][h][u]){let z={sendAsync:(I,N)=>(I.targetMapId=w,this.actor.sendAsync(I,N))};switch(h){case"vector":this.workerSources[w][h][u]=new m(z,this._getLayerIndex(w),this._getAvailableImages(w));break;case"geojson":this.workerSources[w][h][u]=new T(z,this._getLayerIndex(w),this._getAvailableImages(w));break;default:this.workerSources[w][h][u]=new this.externalWorkerSourceTypes[h](z,this._getLayerIndex(w),this._getAvailableImages(w))}}return this.workerSources[w][h][u]}_getDEMWorkerSource(w,h){var u,A;return(u=this.demWorkerSources)[w]||(u[w]={}),(A=this.demWorkerSources[w])[h]||(A[h]=new i),this.demWorkerSources[w][h]}}return l.i(self)&&(self.worker=new C(self)),C}),E("index",["exports","./shared"],function(l,e){"use strict";var t="5.24.0";function n(){var de=new e.A(4);return e.A!=Float32Array&&(de[1]=0,de[2]=0),de[0]=1,de[3]=1,de}let r,a,o,s={frame(de,y,O,ie){let ce=ie||window,_e=ce.requestAnimationFrame(Ne=>{De(),y(Ne)}),{unsubscribe:De}=e.s(de.signal,"abort",()=>{De(),ce.cancelAnimationFrame(_e),O(new e.a(de.signal.reason))},!1)},frameAsync(de,y){return new Promise((O,ie)=>{this.frame(de,O,ie,y)})},getImageData(de,y=0){return this.getImageCanvasContext(de).getImageData(-y,-y,de.width+2*y,de.height+2*y)},getImageCanvasContext(de){let y=window.document.createElement("canvas"),O=y.getContext("2d",{willReadFrequently:!0});if(!O)throw new Error("failed to create canvas 2d context");return y.width=de.width,y.height=de.height,O.drawImage(de,0,0,de.width,de.height),O},resolveURL:de=>(r||(r=document.createElement("a")),r.href=de,r.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return o!==void 0?o:!!matchMedia&&(a!=null||(a=matchMedia("(prefers-reduced-motion: reduce)")),a.matches)},set prefersReducedMotion(de){o=de}},c=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt!==null?this._frozenAt:performance.now()}setNow(de){this._frozenAt=de}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};function g(){return c.getCurrentTime()}var f,p;class m{static create(y,O,ie){let ce=window.document.createElement(y);return O!==void 0&&(ce.className=O),ie&&ie.appendChild(ce),ce}static createNS(y,O){return window.document.createElementNS(y,O)}static disableDrag(){m.docStyle&&m.selectProp&&(m.userSelect=m.docStyle[m.selectProp],m.docStyle[m.selectProp]="none")}static enableDrag(){m.docStyle&&m.selectProp&&(m.docStyle[m.selectProp]=m.userSelect)}static suppressClickInternal(y){y.preventDefault(),y.stopPropagation(),window.removeEventListener("click",m.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",m.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",m.suppressClickInternal,!0)},0)}static getScale(y){let O=y.getBoundingClientRect();return{x:O.width/y.offsetWidth||1,y:O.height/y.offsetHeight||1,boundingClientRect:O}}static getPoint(y,O,ie){let ce=O.boundingClientRect;return new e.P((ie.clientX-ce.left)/O.x-y.clientLeft,(ie.clientY-ce.top)/O.y-y.clientTop)}static mousePos(y,O){let ie=m.getScale(y);return m.getPoint(y,ie,O)}static touchPos(y,O){let ie=[],ce=m.getScale(y);for(let _e of O)ie.push(m.getPoint(y,ce,_e));return ie}static sanitize(y){let O=new DOMParser().parseFromString(y,"text/html").body||document.createElement("body"),ie=O.querySelectorAll("script");for(let ce of ie)ce.remove();return m.clean(O),O.innerHTML}static isPossiblyDangerous(y,O){let ie=O.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(y)||!ie.includes("javascript:")&&!ie.includes("data:"))||!!y.startsWith("on")||void 0}static clean(y){let O=y.children;for(let ie of O)m.removeAttributes(ie),m.clean(ie)}static removeAttributes(y){for(let{name:O,value:ie}of y.attributes)m.isPossiblyDangerous(O,ie)&&y.removeAttribute(O)}}m.docStyle=typeof window<"u"&&((f=window.document)===null||f===void 0?void 0:f.documentElement.style),m.selectProp=!m.docStyle||"userSelect"in m.docStyle?"userSelect":"webkitUserSelect",function(de){let y,O,ie,ce;de.resetRequestQueue=()=>{y=[],O=0,ie=0,ce={}},de.addThrottleControl=Ye=>{let lt=ie++;return ce[lt]=Ye,lt},de.removeThrottleControl=Ye=>{delete ce[Ye],De()},de.getImage=(Ye,lt,ct=!0)=>new Promise((Ft,Gt)=>{Ye.headers||(Ye.headers={}),Ye.headers.accept="image/webp,*/*",e.e(Ye,{type:"image"}),y.push({abortController:lt,requestParameters:Ye,supportImageRefresh:ct,state:"queued",onError:Jt=>{Gt(Jt)},onSuccess:Jt=>{Ft(Jt)}}),De()});let _e=Ye=>e._(this,void 0,void 0,function*(){Ye.state="running";let{requestParameters:lt,supportImageRefresh:ct,onError:Ft,onSuccess:Gt,abortController:Jt}=Ye,it=ct===!1&&!e.i(self)&&!e.g(lt.url)&&(!lt.headers||Object.keys(lt.headers).reduce((or,vr)=>or&&vr==="accept",!0));O++;let Rt=it?Ne(lt,Jt):e.m(lt,Jt);try{let or=yield Rt;delete Ye.abortController,Ye.state="completed",or.data instanceof HTMLImageElement||e.b(or.data)?Gt(or):or.data&&Gt({data:yield(qt=or.data,typeof createImageBitmap=="function"?e.h(qt):e.j(qt)),cacheControl:or.cacheControl,expires:or.expires})}catch(or){delete Ye.abortController,Ft(e.d(or))}finally{O--,De()}var qt}),De=()=>{let Ye=(()=>{for(let lt of Object.keys(ce))if(ce[lt]())return!0;return!1})()?e.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let lt=O;lt0;lt++){let ct=y.shift();ct.abortController.signal.aborted?lt--:_e(ct)}},Ne=(Ye,lt)=>new Promise((ct,Ft)=>{let Gt=new Image,Jt=Ye.url,it=Ye.credentials;it&&it==="include"?Gt.crossOrigin="use-credentials":(it&&it==="same-origin"||!e.f(Jt))&&(Gt.crossOrigin="anonymous"),lt.signal.addEventListener("abort",()=>{Gt.src="",Ft(new e.a(lt.signal.reason))}),Gt.fetchPriority="high",Gt.onload=()=>{Gt.onerror=Gt.onload=null,ct({data:Gt})},Gt.onerror=()=>{Gt.onerror=Gt.onload=null,lt.signal.aborted||Ft(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},Gt.src=Jt})}(p||(p={})),p.resetRequestQueue();class i{constructor(y){this._transformRequestFn=y??null}transformRequest(y,O){return this._transformRequestFn&&this._transformRequestFn(y,O)||{url:y}}setTransformRequest(y){this._transformRequestFn=y}}function T(de){let y=[];if(typeof de=="string")y.push({id:"default",url:de});else if(de&&de.length>0){let O=[];for(let{id:ie,url:ce}of de){let _e=`${ie}${ce}`;O.includes(_e)||(O.push(_e),y.push({id:ie,url:ce}))}}return y}function S(de,y,O){try{let ie=new URL(de);return ie.pathname+=`${y}${O}`,ie.toString()}catch{throw new Error(`Invalid sprite URL "${de}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function M(de){let{userImage:y}=de;return!(!y?.render||!y.render()||(de.data.replace(new Uint8Array(y.data.buffer)),0))}class C extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(let y of Object.keys(this.images))this.removeImage(y);this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(y){if(this.loaded!==y&&(this.loaded=y,y)){for(let{ids:O,promiseResolve:ie}of this.requestors)ie(this._getImagesForIds(O));this.requestors=[]}}getImage(y){let O=this.images[y];if(O&&!O.data&&O.spriteData){let ie=O.spriteData;O.data=new e.R({width:ie.width,height:ie.height},ie.context.getImageData(ie.x,ie.y,ie.width,ie.height).data),O.spriteData=null}return O}addImage(y,O){if(this.images[y])throw new Error(`Image id ${y} already exist, use updateImage instead`);this._validate(y,O)&&(this.images[y]=O)}_validate(y,O){let ie=!0,ce=O.data||O.spriteData;return this._validateStretch(O.stretchX,ce?.width)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchX" value`))),ie=!1),this._validateStretch(O.stretchY,ce?.height)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchY" value`))),ie=!1),this._validateContent(O.content,O)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "content" value`))),ie=!1),ie}_validateStretch(y,O){if(!y)return!0;let ie=0;for(let ce of y){if(ce[0]=y[1]))}updateImage(y,O,ie=!0){let ce=this.getImage(y);if(ie&&(ce.data.width!==O.data.width||ce.data.height!==O.data.height))throw new Error(`size mismatch between old image (${ce.data.width}x${ce.data.height}) and new image (${O.data.width}x${O.data.height}).`);O.version=ce.version+1,this.images[y]=O,this.updatedImages[y]=!0}removeImage(y){var O;let ie=this.images[y];delete this.images[y],delete this.patterns[y],!((O=ie.userImage)===null||O===void 0)&&O.onRemove&&ie.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(y){return new Promise((O,ie)=>{let ce=!0;if(!this.isLoaded())for(let _e of y)this.images[_e]||(ce=!1);this.isLoaded()||ce?O(this._getImagesForIds(y)):this.requestors.push({ids:y,promiseResolve:O})})}_getImagesForIds(y){var O;let ie={};for(let ce of y){let _e=this.getImage(ce);_e||(this.fire(new e.n("styleimagemissing",{id:ce})),_e=this.getImage(ce)),_e?ie[ce]={data:_e.data.clone(),pixelRatio:_e.pixelRatio,sdf:_e.sdf,version:_e.version,stretchX:_e.stretchX,stretchY:_e.stretchY,content:_e.content,textFitWidth:_e.textFitWidth,textFitHeight:_e.textFitHeight,hasRenderCallback:!!(!((O=_e.userImage)===null||O===void 0)&&O.render)}:e.w(`Image "${ce}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return ie}getPixelSize(){let{width:y,height:O}=this.atlasImage;return{width:y,height:O}}getPattern(y){let O=this.patterns[y],ie=this.getImage(y);if(!ie)return null;if(O&&O.position.version===ie.version)return O.position;if(O)O.position.version=ie.version;else{let ce={w:ie.data.width+2,h:ie.data.height+2,x:0,y:0},_e=new e.I(ce,ie);this.patterns[y]={bin:ce,position:_e}}return this._updatePatternAtlas(),this.patterns[y].position}bind(y){let O=y.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.T(y,this.atlasImage,O.RGBA),this.atlasTexture.bind(O.LINEAR,O.CLAMP_TO_EDGE)}_updatePatternAtlas(){let y=[];for(let _e in this.patterns)y.push(this.patterns[_e].bin);let{w:O,h:ie}=e.p(y),ce=this.atlasImage;ce.resize({width:O||1,height:ie||1});for(let _e in this.patterns){let{bin:De}=this.patterns[_e],Ne=De.x+1,Ye=De.y+1,lt=this.getImage(_e).data,ct=lt.width,Ft=lt.height;e.R.copy(lt,ce,{x:0,y:0},{x:Ne,y:Ye},{width:ct,height:Ft}),e.R.copy(lt,ce,{x:0,y:Ft-1},{x:Ne,y:Ye-1},{width:ct,height:1}),e.R.copy(lt,ce,{x:0,y:0},{x:Ne,y:Ye+Ft},{width:ct,height:1}),e.R.copy(lt,ce,{x:ct-1,y:0},{x:Ne-1,y:Ye},{width:1,height:Ft}),e.R.copy(lt,ce,{x:0,y:0},{x:Ne+ct,y:Ye},{width:1,height:Ft})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(y){for(let O of y){if(this.callbackDispatchedThisFrame[O])continue;this.callbackDispatchedThisFrame[O]=!0;let ie=this.getImage(O);ie||e.w(`Image with ID: "${O}" was not found`),M(ie)&&this.updateImage(O,ie)}}cloneImages(){let y={};for(let O in this.images){let ie=this.images[O];y[O]=Object.assign(Object.assign({},ie),{data:ie.data?ie.data.clone():null})}return y}}let _=1e20,w=new Float64Array(256);for(let de=0;de<256;de++){let y=.5-Math.pow(de/255,.45454545454545453);w[de]=y*Math.abs(y)}function h(de,y,O,ie,ce,_e,De,Ne,Ye){for(let lt=y;lt-1);Ye++,_e[Ye]=Ne,De[Ye]=lt,De[Ye+1]=_}for(let Ne=0,Ye=0;Ne/[-\w]+/.test(ce)?ce:`'${CSS.escape(ce)}'`).join(",");return new b.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ie,fontWeight:this._fontWeight(O[0]),fontStyle:this._fontStyle(O[0]),lang:this.lang})}_fontStyle(y){return/italic/i.test(y)?"italic":/oblique/i.test(y)?"oblique":"normal"}_fontWeight(y){let O={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},ie;for(let[ce,_e]of Object.entries(O))new RegExp(`\\b${ce}\\b`,"i").test(y)&&(ie=`${_e}`);return ie}destroy(){for(let y in this.entries){let O=this.entries[y];O.tinySDF=null,O.ideographTinySDF=null,O.glyphs={},O.requests={},O.ranges={}}this.entries={}}}b.loadGlyphRange=function(de,y,O,ie){return e._(this,void 0,void 0,function*(){let ce=256*y,_e=ce+255,De=yield ie.transformRequest(O.replace("{fontstack}",de).replace("{range}",`${ce}-${_e}`),"Glyphs"),Ne=yield e.o(De,new AbortController);if(!Ne?.data)throw new Error(`Could not load glyph range. range: ${y}, ${ce}-${_e}`);let Ye={};for(let lt of e.q(Ne.data))Ye[lt.id]=lt;return Ye})},b.TinySDF=class{constructor({fontSize:de=24,buffer:y=3,radius:O=8,cutoff:ie=.25,fontFamily:ce="sans-serif",fontWeight:_e="normal",fontStyle:De="normal",lang:Ne=null}={}){this.buffer=y,this.radius=O,this.cutoff=ie,this.lang=Ne;let Ye=this.size=de+4*y,lt=this._createCanvas(Ye),ct=this.ctx=lt.getContext("2d",{willReadFrequently:!0});ct.font=`${De} ${_e} ${de}px ${ce}`,ct.textBaseline="alphabetic",ct.textAlign="left",ct.fillStyle="black",this.gridOuter=new Float64Array(Ye*Ye),this.gridInner=new Float64Array(Ye*Ye),this.f=new Float64Array(Ye),this.z=new Float64Array(Ye+1),this.v=new Uint16Array(Ye)}_createCanvas(de){if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(de,de);let y=document.createElement("canvas");return y.width=y.height=de,y}draw(de){let{width:y,actualBoundingBoxAscent:O,actualBoundingBoxDescent:ie,actualBoundingBoxLeft:ce,actualBoundingBoxRight:_e}=this.ctx.measureText(de),De=Math.ceil(O),Ne=Math.floor(ce),Ye=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(_e)-Ne)),lt=Math.max(0,Math.min(this.size-this.buffer,De+Math.ceil(ie))),ct=Ye+2*this.buffer,Ft=lt+2*this.buffer,Gt=Math.max(ct*Ft,0),Jt=new Uint8ClampedArray(Gt),it={data:Jt,width:ct,height:Ft,glyphWidth:Ye,glyphHeight:lt,glyphTop:De,glyphLeft:Ne,glyphAdvance:y};if(Ye===0||lt===0)return it;let{ctx:Rt,buffer:qt,gridInner:or,gridOuter:vr}=this;this.lang&&(Rt.lang=this.lang),Rt.clearRect(qt,qt,Ye,lt),Rt.fillText(de,qt-Ne,qt+De);let Ar=Rt.getImageData(qt,qt,Ye,lt);vr.fill(_,0,Gt),or.fill(0,0,Gt);let dr=3;for(let Lr=0;Lr1&&(Ye=y[++Ne]);let ct=Math.abs(lt-Ye.left),Ft=Math.abs(lt-Ye.right),Gt=Math.min(ct,Ft),Jt,it=_e/ie*(ce+1);if(Ye.isDash){let Rt=ce-Math.abs(it);Jt=Math.sqrt(Gt*Gt+Rt*Rt)}else Jt=ce-Math.sqrt(Gt*Gt+it*it);this.data[De+lt]=Math.max(0,Math.min(255,Jt+128))}}}addRegularDash(y){for(let Ne=y.length-1;Ne>=0;--Ne){let Ye=y[Ne],lt=y[Ne+1];Ye.zeroLength?y.splice(Ne,1):lt&<.isDash===Ye.isDash&&(lt.left=Ye.left,y.splice(Ne,1))}let O=y[0],ie=y[y.length-1];O.isDash===ie.isDash&&(O.left=ie.left-this.width,ie.right=O.right+this.width);let ce=this.width*this.nextRow,_e=0,De=y[_e];for(let Ne=0;Ne1&&(De=y[++_e]);let Ye=Math.abs(Ne-De.left),lt=Math.abs(Ne-De.right),ct=Math.min(Ye,lt);this.data[ce+Ne]=Math.max(0,Math.min(255,(De.isDash?ct:-ct)+128))}}addDash(y,O){let ie=O?7:0,ce=2*ie+1;if(this.nextRow+ce>this.height)return e.w("LineAtlas out of space"),null;let _e=0;for(let Ne of y)_e+=Ne;if(_e!==0){let Ne=this.width/_e,Ye=this.getDashRanges(y,this.width,Ne);O?this.addRoundDash(Ye,Ne,ie):this.addRegularDash(Ye)}let De={y:this.nextRow+ie,height:2*ie,width:_e};return this.nextRow+=ce,this.dirty=!0,De}bind(y){let O=y.gl;this.texture?(O.bindTexture(O.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,O.texSubImage2D(O.TEXTURE_2D,0,0,0,this.width,this.height,O.ALPHA,O.UNSIGNED_BYTE,this.data))):(this.texture=O.createTexture(),O.bindTexture(O.TEXTURE_2D,this.texture),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_WRAP_S,O.REPEAT),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_WRAP_T,O.REPEAT),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MIN_FILTER,O.LINEAR),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MAG_FILTER,O.LINEAR),O.texImage2D(O.TEXTURE_2D,0,O.ALPHA,this.width,this.height,0,O.ALPHA,O.UNSIGNED_BYTE,this.data))}}let P="maplibre_preloaded_worker_pool";class j{constructor(){this.active={}}acquire(y){if(!this.workers)for(this.workers=[];this.workers.lengthe.m(y,O))),Q}function V(de,y){let O=e.O();return e.Q(O,O,[1,1,0]),e.S(O,O,[.5*de.width,.5*de.height,1]),de.calculatePosMatrix?e.U(O,O,de.calculatePosMatrix(y.toUnwrapped())):O}function $(de,y,O,ie,ce,_e,De){var Ne;let Ye=function(Gt,Jt,it){if(Gt)for(let Rt of Gt){let qt=Jt[Rt];if(qt?.source===it&&qt.type==="fill-extrusion")return!0}else for(let Rt in Jt){let qt=Jt[Rt];if(qt.source===it&&qt.type==="fill-extrusion")return!0}return!1}((Ne=ce?.layers)!==null&&Ne!==void 0?Ne:null,y,de.id),lt=_e.maxPitchScaleFactor(),ct=de.tilesIn(ie,lt,Ye);ct.sort(K);let Ft=[];for(let Gt of ct)Ft.push({wrappedTileID:Gt.tileID.wrapped().key,queryResults:Gt.tile.queryRenderedFeatures(y,O,de.getState(),Gt.queryGeometry,Gt.cameraQueryGeometry,Gt.scale,ce,_e,lt,V(_e,Gt.tileID),De?(Jt,it)=>De(Gt.tileID,Jt,it):void 0)});return function(Gt,Jt){for(let it in Gt)for(let Rt of Gt[it])G(Rt,Jt);return Gt}(function(Gt){let Jt={},it={};for(let{queryResults:Rt,wrappedTileID:qt}of Gt){it[qt]||(it[qt]={});let or=it[qt];for(let vr in Rt){let Ar=Rt[vr];or[vr]||(or[vr]={});let dr=or[vr];Jt[vr]||(Jt[vr]=[]);for(let mr of Ar)dr[mr.featureIndex]||(dr[mr.featureIndex]=!0,Jt[vr].push(mr))}}return Jt}(Ft),de)}function K(de,y){let O=de.tileID,ie=y.tileID;return O.overscaledZ-ie.overscaledZ||O.canonical.y-ie.canonical.y||O.wrap-ie.wrap||O.canonical.x-ie.canonical.x}function G(de,y){let O=de.feature,ie=y.getFeatureState(O.layer["source-layer"],O.id);O.source=O.layer.source,O.layer["source-layer"]&&(O.sourceLayer=O.layer["source-layer"]),O.state=ie}function X(de,y,O,ie){return e._(this,void 0,void 0,function*(){let ce=de;if(de.url?ce=(yield e.k(yield y.transformRequest(de.url,"Source"),O)).data:yield s.frameAsync(O,ie),!ce)return null;let _e=e.V(e.e(ce,de),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in ce&&ce.vector_layers&&(_e.vectorLayerIds=ce.vector_layers.map(De=>De.id)),_e})}class q{constructor(y,O){y&&(O?this.setSouthWest(y).setNorthEast(O):Array.isArray(y)&&(y.length===4?this.setSouthWest([y[0],y[1]]).setNorthEast([y[2],y[3]]):this.setSouthWest(y[0]).setNorthEast(y[1])))}setNorthEast(y){return this._ne=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}setSouthWest(y){return this._sw=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}extend(y){let O=this._sw,ie=this._ne,ce,_e;if(y instanceof e.W)ce=y,_e=y;else{if(!(y instanceof q))return Array.isArray(y)?y.length===4||y.every(Array.isArray)?this.extend(q.convert(y)):this.extend(e.W.convert(y)):y&&("lng"in y||"lon"in y)&&"lat"in y?this.extend(e.W.convert(y)):this;if(ce=y._sw,_e=y._ne,!ce||!_e)return this}return O||ie?(O.lng=Math.min(ce.lng,O.lng),O.lat=Math.min(ce.lat,O.lat),ie.lng=Math.max(_e.lng,ie.lng),ie.lat=Math.max(_e.lat,ie.lat)):(this._sw=new e.W(ce.lng,ce.lat),this._ne=new e.W(_e.lng,_e.lat)),this}getCenter(){return new e.W((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new e.W(this.getWest(),this.getNorth())}getSouthEast(){return new e.W(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(y){let{lng:O,lat:ie}=e.W.convert(y),ce=this._sw.lng<=O&&O<=this._ne.lng;return this._sw.lng>this._ne.lng&&(ce=this._sw.lng>=O&&O>=this._ne.lng),this._sw.lat<=ie&&ie<=this._ne.lat&&ce}intersects(y){if(!((y=q.convert(y)).getNorth()>=this.getSouth()&&y.getSouth()<=this.getNorth()))return!1;let O=Math.abs(this.getEast()-this.getWest()),ie=Math.abs(y.getEast()-y.getWest());if(O>=360||ie>=360)return!0;let ce=e.X(this.getWest(),-180,180),_e=e.X(this.getEast(),-180,180),De=e.X(y.getWest(),-180,180),Ne=e.X(y.getEast(),-180,180),Ye=ce>_e,lt=De>Ne;return!(!Ye||!lt)||(Ye?Ne>=ce||De<=_e:lt?_e>=De||ce<=Ne:De<=_e&&Ne>=ce)}static convert(y){return y instanceof q?y:y&&new q(y)}static fromLngLat(y,O=0){let ie=360*O/40075017,ce=ie/Math.cos(Math.PI/180*y.lat);return new q(new e.W(y.lng-ce,y.lat-ie),new e.W(y.lng+ce,y.lat+ie))}adjustAntiMeridian(){let y=new e.W(this._sw.lng,this._sw.lat),O=new e.W(this._ne.lng,this._ne.lat);return new q(y,y.lng>O.lng?new e.W(O.lng+360,O.lat):O)}}class W{constructor(y,O,ie){this.bounds=q.convert(this.validateBounds(y)),this.minzoom=O||0,this.maxzoom=ie||24}validateBounds(y){return Array.isArray(y)&&y.length===4?[Math.max(-180,y[0]),Math.max(-90,y[1]),Math.min(180,y[2]),Math.min(90,y[3])]:[-180,-90,180,90]}contains(y){let O=Math.pow(2,y.z),ie=Math.floor(e.Z(this.bounds.getWest())*O),ce=Math.floor(e.Y(this.bounds.getNorth())*O),_e=Math.ceil(e.Z(this.bounds.getEast())*O),De=Math.ceil(e.Y(this.bounds.getSouth())*O);return y.x>=ie&&y.x<_e&&y.y>=ce&&y.y{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(y){return e._(this,void 0,void 0,function*(){let O=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie={request:yield this.map._requestManager.transformRequest(O,"Tile"),uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,tileSize:this.tileSize*y.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(y),etag:y.etag};ie.request.collectResourceTiming=this._collectResourceTiming;let ce="RT";if(y.actor&&y.state!=="expired"){if(y.state==="loading")return new Promise((_e,De)=>{y.reloadPromise={resolve:_e,reject:De}})}else y.actor=this.dispatcher.getActor(),ce="LT";y.abortController=new AbortController;try{let _e=yield y.actor.sendAsync({type:ce,data:ie},y.abortController);if(delete y.abortController,y.aborted)return;this._afterTileLoadWorkerResponse(y,_e);let De={};return _e?.etagUnmodified&&(De.unmodified=!0),De}catch(_e){if(delete y.abortController,y.aborted)return;if(_e&&_e.status!==404)throw _e;this._afterTileLoadWorkerResponse(y,null)}})}_getOverzoomParameters(y){return e._(this,void 0,void 0,function*(){if(y.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let O=y.tileID.scaledTo(this.maxzoom).canonical,ie=O.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:O,overzoomRequest:yield this.map._requestManager.transformRequest(ie,"Tile")}})}_afterTileLoadWorkerResponse(y,O){if(O?.resourceTiming&&(y.resourceTiming=O.resourceTiming),O&&this.map._refreshExpiredTiles&&y.setExpiryData(O),y.etag=O?.etag,y.loadVectorData(O,this.map.painter),y.reloadPromise){let ie=y.reloadPromise;y.reloadPromise=null,this.loadTile(y).then(ie.resolve).catch(ie.reject)}}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.actor&&(yield y.actor.sendAsync({type:"AT",data:{uid:y.uid,type:this.type,source:this.id}}))})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),y.actor&&(yield y.actor.sendAsync({type:"RMT",data:{uid:y.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class ae extends e.E{constructor(y,O,ie,ce){super(),this.id=y,this.dispatcher=ie,this.setEventedParent(ce),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},O),e.e(this,e.V(O,["url","scheme","tileSize"]))}load(){return e._(this,arguments,void 0,function*(y=!1){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let O=yield X(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,O&&(e.e(this,O),O.bounds&&(this.tileBounds=new W(O.bounds,this.minzoom,this.maxzoom)),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:y})))}catch(O){this._tileJSONRequest=null,this._loaded=!0,e.$(O)||this.fire(new e.l(e.d(O)))}})}loaded(){return this._loaded}onAdd(y){this.map=y,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(y){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),y(),this.load(!0)}setTiles(y){return this.setSourceProperty(()=>{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}serialize(){return e.e({},this._options)}hasTile(y){return!this.tileBounds||this.tileBounds.contains(y.canonical)}loadTile(y){return e._(this,void 0,void 0,function*(){let O=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);y.abortController=new AbortController;try{let ie=yield p.getImage(yield this.map._requestManager.transformRequest(O,"Tile"),y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(ie?.data){this.map._refreshExpiredTiles&&(ie.cacheControl||ie.expires)&&y.setExpiryData({cacheControl:ie.cacheControl,expires:ie.expires});let ce=this.map.painter.context,_e=ce.gl,De=ie.data;y.texture=this.map.painter.getTileTexture(De.width),y.texture?y.texture.update(De,{useMipmap:!0}):(y.texture=new e.T(ce,De,_e.RGBA,{useMipmap:!0}),y.texture.bind(_e.LINEAR,_e.CLAMP_TO_EDGE,_e.LINEAR_MIPMAP_NEAREST)),y.state="loaded"}}catch(ie){if(delete y.abortController,y.aborted)y.state="unloaded";else if(ie)throw y.state="errored",ie}})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController)})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.texture&&this.map.painter.saveTileTexture(y.texture)})}hasTransition(){return!1}}class fe extends ae{constructor(y,O,ie,ce){super(y,O,ie,ce),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},O),this.encoding=O.encoding||"mapbox",this.redFactor=O.redFactor,this.greenFactor=O.greenFactor,this.blueFactor=O.blueFactor,this.baseShift=O.baseShift}loadTile(y){return e._(this,void 0,void 0,function*(){let O=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie=yield this.map._requestManager.transformRequest(O,"Tile");y.neighboringTiles=this._getNeighboringTiles(y.tileID),y.abortController=new AbortController;try{let ce=yield p.getImage(ie,y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(ce?.data){let _e=ce.data;this.map._refreshExpiredTiles&&(ce.cacheControl||ce.expires)&&y.setExpiryData({cacheControl:ce.cacheControl,expires:ce.expires});let De=e.b(_e)&&e.a0()?_e:yield this.readImageNow(_e),Ne={type:this.type,uid:y.uid,source:this.id,rawImageData:De,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(y.actor&&y.state!=="expired"&&y.state!=="reloading")return;y.actor&&y.state!=="expired"||(y.actor=this.dispatcher.getActor()),y.dem=yield y.actor.sendAsync({type:"LDT",data:Ne}),y.needsHillshadePrepare=!0,y.needsTerrainPrepare=!0,y.state="loaded"}}catch(ce){if(delete y.abortController,y.aborted)y.state="unloaded";else if(ce)throw y.state="errored",ce}})}readImageNow(y){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.a1()){let O=y.width+2,ie=y.height+2;try{return new e.R({width:O,height:ie},yield e.a2(y,-1,-1,O,ie))}catch{}}return s.getImageData(y,1)})}_getNeighboringTiles(y){let O=y.canonical,ie=Math.pow(2,O.z),ce=(O.x-1+ie)%ie,_e=O.x===0?y.wrap-1:y.wrap,De=(O.x+1+ie)%ie,Ne=O.x+1===ie?y.wrap+1:y.wrap,Ye={};return Ye[new e.a3(y.overscaledZ,_e,O.z,ce,O.y).key]={backfilled:!1},Ye[new e.a3(y.overscaledZ,Ne,O.z,De,O.y).key]={backfilled:!1},O.y>0&&(Ye[new e.a3(y.overscaledZ,_e,O.z,ce,O.y-1).key]={backfilled:!1},Ye[new e.a3(y.overscaledZ,y.wrap,O.z,O.x,O.y-1).key]={backfilled:!1},Ye[new e.a3(y.overscaledZ,Ne,O.z,De,O.y-1).key]={backfilled:!1}),O.y+1_e.key===ie);ce>-1&&de.addOrUpdateProperties.splice(ce,1)}return(de.removeAllProperties||y.removeAllProperties)&&(O.removeAllProperties=!0),(de.removeProperties||y.removeProperties)&&(O.removeProperties=[...de.removeProperties||[],...y.removeProperties||[]]),(de.addOrUpdateProperties||y.addOrUpdateProperties)&&(O.addOrUpdateProperties=[...de.addOrUpdateProperties||[],...y.addOrUpdateProperties||[]]),(de.newGeometry||y.newGeometry)&&(O.newGeometry=y.newGeometry||de.newGeometry),O}function Ae(de){var y,O;if(!de)return{};let ie={};return ie.removeAll=de.removeAll,ie.remove=new Set(de.remove||[]),ie.add=new Map((y=de.add)===null||y===void 0?void 0:y.map(ce=>[ce.id,ce])),ie.update=new Map((O=de.update)===null||O===void 0?void 0:O.map(ce=>[ce.id,ce])),ie}function Me(de){return de&&de.length!==0?typeof de[0]=="number"?[de]:de.flatMap(y=>Me(y)):[]}function Ie(de){return de.type==="GeometryCollection"?de.geometries.flatMap(y=>Ie(y)):Me(de.coordinates)}function qe(de){let y=new q,O;switch(de.type){case"FeatureCollection":O=de.features.flatMap(ie=>Ie(ie.geometry));break;case"Feature":O=Ie(de.geometry);break;default:O=Ie(de)}if(O.length===0)return y;for(let ie of O){let[ce,_e]=ie;y.extend([ce,_e])}return y}class je extends e.E{constructor(y,O,ie,ce){super(),this.id=y,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:O.data},this.actor=ie.getActor(),this.setEventedParent(ce),this._data=typeof O.data=="string"?{url:O.data}:{geojson:O.data},this._options=e.e({},O),this._collectResourceTiming=O.collectResourceTiming,O.maxzoom!==void 0&&(this.maxzoom=O.maxzoom),O.type&&(this.type=O.type),O.attribution&&(this.attribution=O.attribution),this.promoteId=O.promoteId,O.clusterMaxZoom!==void 0&&this.maxzoom<=O.clusterMaxZoom&&e.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${O.clusterMaxZoom}".`),this.workerOptions=e.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(O.buffer!==void 0?O.buffer:128),tolerance:this._pixelsToTileUnits(O.tolerance!==void 0?O.tolerance:.375),extent:e.a6,maxZoom:this.maxzoom,lineMetrics:O.lineMetrics||!1,generateId:O.generateId||!1,promoteId:typeof O.promoteId=="string"?O.promoteId:void 0,cluster:O.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(O.clusterMaxZoom),minPoints:Math.max(2,O.clusterMinPoints||2),extent:e.a6,radius:this._pixelsToTileUnits(O.clusterRadius||50),log:!1,generateId:O.generateId||!1}},clusterProperties:O.clusterProperties,filter:O.filter},O.workerOptions)}_hasPendingWorkerUpdate(){return this._pendingWorkerUpdate.data!==void 0||this._pendingWorkerUpdate.diff!==void 0||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(y){return y*(e.a6/this.tileSize)}_getClusterMaxZoom(y){let O=y?Math.round(y):this.maxzoom-1;return Number.isInteger(y)||y===void 0||e.w(`Integer expected for option 'clusterMaxZoom': provided value "${y}" rounded to "${O}"`),O}load(){return e._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(y){this.map=y,this.load()}setData(y,O){this._data=typeof y=="string"?{url:y}:{geojson:y},this._pendingWorkerUpdate={data:y};let ie=this._updateWorkerData();return O?ie:this}updateData(y,O){this._pendingWorkerUpdate.diff=function(ce,_e){if(!ce)return _e||{};if(!_e)return ce||{};let De=Ae(ce),Ne=Ae(_e);(function(lt,ct){ct.removeAll&&(lt.add.clear(),lt.update.clear(),lt.remove.clear(),ct.remove.clear());for(let Ft of ct.remove)lt.add.delete(Ft),lt.update.delete(Ft);for(let[Ft,Gt]of ct.update){let Jt=lt.update.get(Ft);Jt&&(ct.update.set(Ft,xe(Jt,Gt)),lt.update.delete(Ft))}})(De,Ne);let Ye={};if((De.removeAll||Ne.removeAll)&&(Ye.removeAll=!0),Ye.remove=new Set([...De.remove,...Ne.remove]),Ye.add=new Map([...De.add,...Ne.add]),Ye.update=new Map([...De.update,...Ne.update]),Ye.remove.size&&Ye.add.size)for(let lt of Ye.add.keys())Ye.remove.delete(lt);return function(lt){let ct={};return lt.removeAll&&(ct.removeAll=lt.removeAll),lt.remove&&(ct.remove=Array.from(lt.remove)),lt.add&&(ct.add=Array.from(lt.add.values())),lt.update&&(ct.update=Array.from(lt.update.values())),ct}(Ye)}(this._pendingWorkerUpdate.diff,y);let ie=this._updateWorkerData();return O?ie:this}getData(){return e._(this,void 0,void 0,function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}})}getBounds(){return e._(this,void 0,void 0,function*(){return qe(yield this.getData())})}setClusterOptions(y){return this.workerOptions.geojsonVtOptions.cluster=y.cluster,y.clusterRadius!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(y.clusterRadius)),y.clusterMaxZoom!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(y.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(y){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:y,source:this.id}})}getClusterChildren(y){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:y,source:this.id}})}getClusterLeaves(y,O,ie){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:y,limit:O,offset:ie}})}_updateWorkerData(){return e._(this,void 0,void 0,function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void e.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:y,diff:O,updateCluster:ie}=this._pendingWorkerUpdate,ce=this._getLoadGeoJSONParameters(y,O,ie);y!==void 0?this._pendingWorkerUpdate.data=void 0:O?this._pendingWorkerUpdate.diff=void 0:ie&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(ce)})}_getLoadGeoJSONParameters(y,O,ie){return e._(this,void 0,void 0,function*(){let ce=e.e({type:this.type},this.workerOptions);return typeof y=="string"?(ce.request=yield this.map._requestManager.transformRequest(s.resolveURL(y),"Source"),ce.request.collectResourceTiming=this._collectResourceTiming,ce):y!==void 0?(ce.data=y,ce):O?(ce.dataDiff=O,ce):ie?(ce.updateCluster=!0,ce):void 0})}_dispatchWorkerUpdate(y){return e._(this,void 0,void 0,function*(){this._isUpdatingWorker=!0,this.fire(new e.n("dataloading",{dataType:"source"}));try{let O=yield y,ie=yield this.actor.sendAsync({type:"LD",data:O});if(this._isUpdatingWorker=!1,this._removed||ie.abandoned)return void this.fire(new e.n("dataabort",{dataType:"source"}));ie.data&&(this._data={geojson:ie.data});let ce=this._applyDiffToSource(O.dataDiff),_e=this._getShouldReloadTileOptions(ce),De={dataType:"source"};this._applyResourceTiming(De,ie),this.fire(new e.n("data",Object.assign(Object.assign({},De),{sourceDataType:"metadata"}))),this.fire(new e.n("data",Object.assign(Object.assign({},De),{sourceDataType:"content",shouldReloadTileOptions:_e})))}catch(O){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new e.n("dataabort",{dataType:"source"}));this.fire(new e.l(e.d(O)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}})}_applyResourceTiming(y,O){var ie;if(!this._collectResourceTiming)return;let ce=(ie=O.resourceTiming)===null||ie===void 0?void 0:ie[this.id];if(!ce)return;let _e=ce.slice(0);_e?.length&&e.e(y,{resourceTiming:_e})}_applyDiffToSource(y){if(!y)return;let O=typeof this.promoteId=="string"?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let ce=function(_e,De){let Ne=new Map;if(_e==null||_e.type==null)return Ne;if(_e.type==="Feature"){let Ye=ye(_e,De);return Ye==null?void 0:(Ne.set(Ye,_e),Ne)}if(_e.type==="FeatureCollection"){let Ye=new Set;for(let lt of _e.features){let ct=ye(lt,De);if(ct==null||Ye.has(ct))return;Ye.add(ct),Ne.set(ct,lt)}return Ne}}(this._data.geojson,O);if(!ce)throw new Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:ce}}if(!this._data.updateable)return;let ie=function(ce,_e,De){var Ne,Ye;let lt=[];if(_e.removeAll)ce.clear();else if(_e.remove)for(let ct of _e.remove){let Ft=ce.get(ct);Ft&&(lt.push(Ft.geometry),ce.delete(ct))}if(_e.add)for(let ct of _e.add){let Ft=ye(ct,De);if(Ft==null)continue;let Gt=ce.get(Ft);Gt&<.push(Gt.geometry),lt.push(ct.geometry),ce.set(Ft,ct)}if(_e.update)for(let ct of _e.update){let Ft=ce.get(ct.id);if(!Ft)continue;let Gt=!!ct.newGeometry,Jt=ct.removeAllProperties||((Ne=ct.removeProperties)===null||Ne===void 0?void 0:Ne.length)>0||((Ye=ct.addOrUpdateProperties)===null||Ye===void 0?void 0:Ye.length)>0;if(!Gt&&!Jt)continue;lt.push(Ft.geometry);let it=Object.assign({},Ft);if(ce.set(ct.id,it),Gt&&(lt.push(ct.newGeometry),it.geometry=ct.newGeometry),Jt){if(it.properties=ct.removeAllProperties?{}:Object.assign({},it.properties||{}),ct.removeProperties)for(let Rt of ct.removeProperties)delete it.properties[Rt];if(ct.addOrUpdateProperties)for(let{key:Rt,value:qt}of ct.addOrUpdateProperties)it.properties[Rt]=qt}}return lt}(this._data.updateable,y,O);return y.removeAll||this._options.cluster?void 0:ie}_getShouldReloadTileOptions(y){if(y)return{affectedBounds:y.filter(Boolean).map(O=>qe(O))}}shouldReloadTile(y,{affectedBounds:O}){if(y.state==="loading")return!0;if(y.state==="unloaded")return!1;let{buffer:ie,extent:ce}=this.workerOptions.geojsonVtOptions,_e=function({x:De,y:Ne,z:Ye},lt=0){let ct=e.a4((De-lt)/Math.pow(2,Ye)),Ft=e.a5((Ne+1+lt)/Math.pow(2,Ye)),Gt=e.a4((De+1+lt)/Math.pow(2,Ye)),Jt=e.a5((Ne-lt)/Math.pow(2,Ye));return new q([ct,Ft],[Gt,Jt])}(y.tileID.canonical,ie/ce);for(let De of O)if(_e.intersects(De))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(y){return e._(this,void 0,void 0,function*(){let O=y.actor?"RT":"LT";y.actor=this.actor;let ie={type:this.type,uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};y.abortController=new AbortController;let ce=yield this.actor.sendAsync({type:O,data:ie},y.abortController);delete y.abortController,y.unloadVectorData(),y.aborted||y.loadVectorData(ce,this.map.painter,O==="RT")})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.aborted=!0})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:y.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return e.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class ke extends e.E{constructor(y,O,ie,ce){super(),this.flippedWindingOrder=!1,this.id=y,this.dispatcher=ie,this.coordinates=O.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ce),this.options=O}load(y){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let O=yield p.getImage(yield this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,O?.data&&(this.image=O.data,y&&(this.coordinates=y),this._finishLoading())}catch(O){this._request=null,this._loaded=!0,e.$(O)||this.fire(new e.l(e.d(O)))}})}loaded(){return this._loaded}updateImage(y){return y.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=y.url,this.load(y.coordinates).finally(()=>this.texture=null),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(y){this.map=y,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(y){this.coordinates=y;let O=y.map(e.a7.fromLngLat);var ie;return this.tileID=function(ce){let _e=e.a8.fromPoints(ce),De=_e.width(),Ne=_e.height(),Ye=Math.max(De,Ne),lt=Math.max(0,Math.floor(-Math.log(Ye)/Math.LN2)),ct=Math.pow(2,lt);return new e.aa(lt,Math.floor((_e.minX+_e.maxX)/2*ct),Math.floor((_e.minY+_e.maxY)/2*ct))}(O),this.terrainTileRanges=this._getOverlappingTileRanges(O),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=O.map(ce=>this.tileID.getTilePoint(ce)._round()),this.flippedWindingOrder=((ie=this.tileCoords)[1].x-ie[0].x)*(ie[2].y-ie[0].y)-(ie[1].y-ie[0].y)*(ie[2].x-ie[0].x)<0,this.fire(new e.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let y=this.map.painter.context,O=y.gl;this.texture||(this.texture=new e.T(y,this.image,O.RGBA),this.texture.bind(O.LINEAR,O.CLAMP_TO_EDGE));let ie=!1;for(let ce in this.tiles){let _e=this.tiles[ce];_e.state!=="loaded"&&(_e.state="loaded",_e.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(y){return e._(this,void 0,void 0,function*(){var O;!((O=this.tileID)===null||O===void 0)&&O.equals(y.tileID.canonical)?(this.tiles[String(y.tileID.wrap)]=y,y.buckets={}):y.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(y){let{minX:O,minY:ie,maxX:ce,maxY:_e}=e.a8.fromPoints(y),De={};for(let Ne=0;Ne<=e.a9;Ne++){let Ye=Math.pow(2,Ne),lt=Math.floor(O*Ye),ct=Math.floor(ie*Ye),Ft=Math.floor(ce*Ye),Gt=Math.floor(_e*Ye),Jt=(lt%Ye+Ye)%Ye,it=Ft%Ye,Rt=Math.floor(lt/Ye),qt=Math.floor(Ft/Ye);De[Ne]={minWrap:Rt,maxWrap:qt,minTileXWrapped:Jt,maxTileXWrapped:it,minTileY:ct,maxTileY:Gt}}return De}}class ge extends ke{constructor(y,O,ie,ce){super(y,O,ie,ce),this._onPlayingHandler=()=>{var _e;(_e=this.map)===null||_e===void 0||_e.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=O}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let y=this.options;this.urls=[];for(let O of y.urls)this.urls.push((yield this.map._requestManager.transformRequest(O,"Source")).url);try{let O=yield e.ab(this.urls);if(this._loaded=!0,!O)return;this.video=O,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(O){this.fire(new e.l(e.d(O)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(y){if(this.video){let O=this.video.seekable;yO.end(0)?this.fire(new e.l(new e.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${O.start(0)} and ${O.end(0)}-second mark.`))):this.video.currentTime=y}}getVideo(){return this.video}onAdd(y){this.map||(this.map=y,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let y=this.map.painter.context,O=y.gl;this.texture?this.video.paused||(this.texture.bind(O.LINEAR,O.CLAMP_TO_EDGE),O.texSubImage2D(O.TEXTURE_2D,0,0,0,O.RGBA,O.UNSIGNED_BYTE,this.video)):(this.texture=new e.T(y,this.video,O.RGBA),this.texture.bind(O.LINEAR,O.CLAMP_TO_EDGE));let ie=!1;for(let ce in this.tiles){let _e=this.tiles[ce];_e.state!=="loaded"&&(_e.state="loaded",_e.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class le extends ke{constructor(y,O,ie,ce){super(y,O,ie,ce),O.coordinates?Array.isArray(O.coordinates)&&O.coordinates.length===4&&!O.coordinates.some(_e=>!Array.isArray(_e)||_e.length!==2||_e.some(De=>typeof De!="number"))||this.fire(new e.l(new e.ac(`sources.${y}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.l(new e.ac(`sources.${y}`,null,'missing required property "coordinates"'))),O.animate&&typeof O.animate!="boolean"&&this.fire(new e.l(new e.ac(`sources.${y}`,null,'optional "animate" property must be a boolean value'))),O.canvas?typeof O.canvas=="string"||O.canvas instanceof HTMLCanvasElement||this.fire(new e.l(new e.ac(`sources.${y}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.l(new e.ac(`sources.${y}`,null,'missing required property "canvas"'))),this.options=O,this.animate=O.animate===void 0||O.animate}load(){return e._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.l(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(y){this.map=y,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let y=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,y=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,y=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let O=this.map.painter.context,ie=O.gl;this.texture?(y||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new e.T(O,this.canvas,ie.RGBA,{premultiply:!0}),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let ce=!1;for(let _e in this.tiles){let De=this.tiles[_e];De.state!=="loaded"&&(De.state="loaded",De.texture=this.texture,ce=!0)}ce&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let y of[this.canvas.width,this.canvas.height])if(isNaN(y)||y<=0)return!0;return!1}}let ve={},se=de=>{switch(de){case"geojson":return je;case"image":return ke;case"raster":return ae;case"raster-dem":return fe;case"vector":return ee;case"video":return ge;case"canvas":return le}return ve[de]},Te="RTLPluginLoaded";class Fe extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=oe()}_syncState(y){return this.status=y,this.dispatcher.broadcast("SRPS",{pluginStatus:y,pluginURL:this.url}).catch(O=>{throw this.status="error",O})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(y){return e._(this,arguments,void 0,function*(O,ie=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=s.resolveURL(O),!this.url)throw new Error(`requested url ${O} is invalid`);if(this.status==="unavailable"){if(!ie)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.n(Te))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let We=null;function Ge(){return We||(We=new Fe),We}var gt,mt;(function(de){de[de.Base=0]="Base",de[de.Parent=1]="Parent"})(gt||(gt={})),function(de){de[de.Departing=0]="Departing",de[de.Incoming=1]="Incoming"}(mt||(mt={}));class Tt{constructor(y,O){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=y,this.uid=e.ad(),this.uses=0,this.tileSize=O,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(y){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(y||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:y,fadingDirection:O,fadingParentID:ie,fadeEndTime:ce}){this.resetFadeLogic(),this.fadingRole=y,this.fadingDirection=O,this.fadingParentID=ie,this.fadeEndTime=ce}setSelfFadeLogic(y){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=y}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=g(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(y){this.demTexture&&y.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(y,O,ie){if(y?.etagUnmodified!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",y){y.featureIndex&&(this.latestFeatureIndex=y.featureIndex,y.rawTileData?(this.latestRawTileData=y.rawTileData,this.latestEncoding=y.encoding,this.latestFeatureIndex.rawTileData=y.rawTileData,this.latestFeatureIndex.encoding=y.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=y.collisionBoxArray,this.buckets=function(ce,_e){let De={};if(!_e)return De;for(let Ne of ce){let Ye=Ne.layerIds.map(lt=>_e.getLayer(lt)).filter(Boolean);if(Ye.length!==0){Ne.layers=Ye,Ne.stateDependentLayerIds&&(Ne.stateDependentLayers=Ne.stateDependentLayerIds.map(lt=>Ye.filter(ct=>ct.id===lt)[0]));for(let lt of Ye)De[lt.id]=Ne}}return De}(y.buckets,O?.style),this.hasSymbolBuckets=!1;for(let ce in this.buckets){let _e=this.buckets[ce];if(_e instanceof e.af){if(this.hasSymbolBuckets=!0,!ie)break;_e.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let ce in this.buckets){let _e=this.buckets[ce];if(_e instanceof e.af&&_e.hasRTLText){this.hasRTLText=!0,Ge().lazyLoad();break}}this.queryPadding=0;for(let ce in this.buckets){let _e=this.buckets[ce];this.queryPadding=Math.max(this.queryPadding,O.style.getLayer(ce).queryRadius(_e))}y.imageAtlas&&(this.imageAtlas=y.imageAtlas),y.glyphAtlasImage&&(this.glyphAtlasImage=y.glyphAtlasImage),this.dashPositions=y.dashPositions}else this.collisionBoxArray=new e.ae;else this.state="loaded"}unloadVectorData(){for(let y in this.buckets)this.buckets[y].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(y){return this.buckets[y.id]}upload(y){for(let ie in this.buckets){let ce=this.buckets[ie];ce.uploadPending()&&ce.upload(y)}let O=y.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new e.T(y,this.imageAtlas.image,O.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new e.T(y,this.glyphAtlasImage,O.ALPHA),this.glyphAtlasImage=null)}prepare(y){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(y,this.imageAtlasTexture)}queryRenderedFeatures(y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft){var Gt;return!((Gt=this.latestFeatureIndex)===null||Gt===void 0)&&Gt.rawTileData?this.latestFeatureIndex.query({queryGeometry:ce,cameraQueryGeometry:_e,scale:De,tileSize:this.tileSize,pixelPosMatrix:ct,transform:Ye,params:Ne,queryPadding:this.queryPadding*lt,getElevation:Ft},y,O,ie):{}}querySourceFeatures(y,O){let ie=this.latestFeatureIndex;if(!ie?.rawTileData)return;let ce=ie.loadVTLayers(),_e=O?.sourceLayer?O.sourceLayer:"",De=ce[e.ag]||ce[_e];if(!De)return;let Ne=e.ah(O?.filter,O?.globalState),{z:Ye,x:lt,y:ct}=this.tileID.canonical,Ft={z:Ye,x:lt,y:ct};for(let Gt=0;Gtie)ce=!1;else if(O)if(this.expirationTime({zoom:0,x:0,y:0,wrap:mr,fullyVisible:!1}),Ar=[],dr=[];if(de.renderWorldCopies&&De.allowWorldCopies())for(let mr=1;mr<=3;mr++)Ar.push(vr(-mr)),Ar.push(vr(mr));for(Ar.push(vr(0));Ar.length>0;){let mr=Ar.pop(),qr=mr.x,Lr=mr.y,ua=mr.fullyVisible,Ba={x:qr,y:Lr,z:mr.zoom},Pa=De.getTileBoundingVolume(Ba,mr.wrap,de.elevation,y);if(!ua){let Ma=ht(O,Pa,ie);if(Ma===0)continue;ua=Ma===2}let Ua=De.distanceToTile2d(ce.x,ce.y,Ba,Pa),ya=Ye;Ne&&(ya=(y.calculateTileZoom||He)(de.zoom+e.ar(de.tileSize/y.tileSize),Ua,qt,or,de.fov)),ya=(y.roundZoom?Math.round:Math.floor)(ya),ya=Math.max(0,ya);let da=Math.min(ya,ct);if(mr.wrap=De.getWrap(_e,Ba,mr.wrap),mr.zoom>=da){if(mr.zoom>1),wrap:mr.wrap,fullyVisible:ua})}return dr.sort((mr,qr)=>mr.distanceSq-qr.distanceSq).map(mr=>mr.tileID)}let Je=e.a8.fromPoints([new e.P(0,0),new e.P(e.a6,e.a6)]);function Mt(de){return de==="raster"||de==="image"||de==="video"}function dt(de,y,O,ie,ce,_e,De){if(!y.hasData())return!1;let{tileID:Ne,fadingRole:Ye,fadingDirection:lt,fadingParentID:ct}=y;if(Ye===gt.Base&<===mt.Incoming&&ct)return O[ct.key]=ct,!0;let Ft=Math.max(Ne.overscaledZ-ce,_e);for(let Gt=Ne.overscaledZ-1;Gt>=Ft;Gt--){let Jt=Ne.scaledTo(Gt),it=de.getLoadedTile(Jt);if(it)return y.setCrossFadeLogic({fadingRole:gt.Base,fadingDirection:mt.Incoming,fadingParentID:it.tileID,fadeEndTime:ie+De}),it.setCrossFadeLogic({fadingRole:gt.Parent,fadingDirection:mt.Departing,fadeEndTime:ie+De}),O[Jt.key]=Jt,!0}return!1}function Dt(de,y,O,ie,ce,_e){if(!y.hasData())return!1;let De=y.tileID.children(ce),Ne=Ct(de,y,De,O,ie,ce,_e);if(Ne)return!0;for(let Ye of De)Ct(de,y,Ye.children(ce),O,ie,ce,_e)&&(Ne=!0);return Ne}function Ct(de,y,O,ie,ce,_e,De){if(O[0].overscaledZ>=_e)return!1;let Ne=!1;for(let Ye of O){let lt=de.getLoadedTile(Ye);if(!lt)continue;let{fadingRole:ct,fadingDirection:Ft,fadingParentID:Gt}=lt;ct===gt.Base&&Ft===mt.Departing&&Gt||(lt.setCrossFadeLogic({fadingRole:gt.Base,fadingDirection:mt.Departing,fadingParentID:y.tileID,fadeEndTime:ce+De}),y.setCrossFadeLogic({fadingRole:gt.Parent,fadingDirection:mt.Incoming,fadeEndTime:ce+De})),ie[Ye.key]=Ye,Ne=!0}return Ne}function Vt(de,y,O,ie){let ce=de.tileID;return!!de.selfFading||!de.hasData()&&!!y.has(ce)&&(de.setSelfFadeLogic(O+ie),!0)}function Ht(de,y){var O;de.needsHillshadePrepare=!0,de.needsTerrainPrepare=!0;let ie=y.tileID.canonical.x-de.tileID.canonical.x,ce=y.tileID.canonical.y-de.tileID.canonical.y,_e=Math.pow(2,de.tileID.canonical.z),De=y.tileID.key;ie===0&&ce===0||Math.abs(ce)>1||(Math.abs(ie)>1&&(Math.abs(ie+_e)===1?ie+=_e:Math.abs(ie-_e)===1&&(ie-=_e)),y.dem&&de.dem&&(de.dem.backfillBorder(y.dem,ie,ce),!((O=de.neighboringTiles)===null||O===void 0)&&O[De]&&(de.neighboringTiles[De].backfilled=!0)))}class Wt{constructor(){this._tiles={}}handleWrapJump(y){let O={};for(let ie in this._tiles){let ce=this._tiles[ie];ce.tileID=ce.tileID.unwrapTo(ce.tileID.wrap+y),O[ce.tileID.key]=ce}this._tiles=O}setFeatureState(y,O){for(let ie in this._tiles)this._tiles[ie].setFeatureState(y,O)}getAllTiles(){return Object.values(this._tiles)}getAllIds(y=!1){return y?Object.values(this._tiles).map(O=>O.tileID).sort(e.au).map(O=>O.key):Object.keys(this._tiles)}getTileById(y){return this._tiles[y]}setTile(y,O){this._tiles[y]=O}deleteTileById(y){delete this._tiles[y]}getLoadedTile(y){let O=this.getTileById(y.key);return O?.hasData()?O:null}isIdRenderable(y,O=!1){var ie;return(ie=this.getTileById(y))===null||ie===void 0?void 0:ie.isRenderable(O)}getRenderableIds(y=0,O){let ie=[];for(let ce of this.getAllIds())this.isIdRenderable(ce,O)&&ie.push(this.getTileById(ce));return O?ie.sort((ce,_e)=>{let De=ce.tileID,Ne=_e.tileID,Ye=new e.P(De.canonical.x,De.canonical.y)._rotate(-y),lt=new e.P(Ne.canonical.x,Ne.canonical.y)._rotate(-y);return De.overscaledZ-Ne.overscaledZ||lt.y-Ye.y||lt.x-Ye.x}).map(ce=>ce.tileID.key):ie.map(ce=>ce.tileID).sort(e.au).map(ce=>ce.key)}}class Sr extends e.E{constructor(y,O,ie){super(),this.id=y,this.dispatcher=ie,this.on("data",ce=>{this._dataHandler(ce)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((ce,_e,De,Ne)=>{let Ye=new(se(_e.type))(ce,_e,De,Ne);if(Ye.id!==ce)throw new Error(`Expected Source id to be ${ce} instead of ${Ye.id}`);return Ye})(y,O,ie,this),this._inViewTiles=new Wt,this._outOfViewCache=new e.av(0,ce=>this._unloadTile(ce)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new At,this._didEmitContent=!1,this._updated=!1}onAdd(y){var O;this.map=y,this._maxTileCacheSize=y?y._maxTileCacheSize:null,this._maxTileCacheZoomLevels=y?y._maxTileCacheZoomLevels:null,!((O=this._source)===null||O===void 0)&&O.onAdd&&this._source.onAdd(y)}onRemove(y){var O;for(let ie of this._inViewTiles.getAllTiles())ie.unloadVectorData();this.clearTiles(),!((O=this._source)===null||O===void 0)&&O.onRemove&&this._source.onRemove(y),this._inViewTiles=new Wt}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let y=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,y&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(y,O,ie){return e._(this,void 0,void 0,function*(){try{let ce=yield this._source.loadTile(y);this._tileLoaded(y,O,ie,ce)}catch(ce){y.state="errored",ce.status!==404?this._source.fire(new e.l(e.d(ce),{tile:y})):this.update(this.transform,this.terrain)}})}_unloadTile(y){this._source.unloadTile&&this._source.unloadTile(y)}_abortTile(y){this._source.abortTile&&this._source.abortTile(y),this._source.fire(new e.n("dataabort",{tile:y,coord:y.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(y){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let O of this._inViewTiles.getAllTiles())O.upload(y),O.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(y){var O;return this._inViewTiles.getRenderableIds((O=this.transform)===null||O===void 0?void 0:O.bearingInRadians,y)}hasRenderableParent(y){let O=y.overscaledZ-1;if(O>=this._source.minzoom){let ie=this.getLoadedTile(y.scaledTo(O));if(ie)return this._inViewTiles.isIdRenderable(ie.tileID.key)}return!1}reload(y,O=void 0){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(let ie of this._inViewTiles.getAllIds()){let ce=this._inViewTiles.getTileById(ie);O&&!this._source.shouldReloadTile(ce,O)||(y?this._reloadTile(ie,"expired"):ce.state!=="errored"&&this._reloadTile(ie,"reloading"))}}}_reloadTile(y,O){return e._(this,void 0,void 0,function*(){let ie=this._inViewTiles.getTileById(y);ie&&(ie.state!=="loading"&&(ie.state=O),yield this._loadTile(ie,y,O))})}_tileLoaded(y,O,ie,ce){y.timeAdded=g(),y.selfFading&&(y.fadeEndTime=y.timeAdded+this._rasterFadeDuration),ie==="expired"&&(y.refreshedUponExpiration=!0),this._setTileReloadTimer(O,y),ce?.unmodified||(this.getSource().type==="raster-dem"&&y.dem&&function(_e,De){var Ne,Ye,lt;let ct=De.getRenderableIds();for(let Ft of ct){if(!(!((Ne=_e.neighboringTiles)===null||Ne===void 0)&&Ne[Ft]))continue;let Gt=De.getTileById(Ft);_e.neighboringTiles[Ft].backfilled||Ht(_e,Gt),!((lt=(Ye=Gt.neighboringTiles)===null||Ye===void 0?void 0:Ye[_e.tileID.key])===null||lt===void 0)&<.backfilled||Ht(Gt,_e)}}(y,this._inViewTiles),this._state.initializeTileState(y,this.map?this.map.painter:null),y.aborted||this._source.fire(new e.n("data",{dataType:"source",tile:y,coord:y.tileID})))}getTile(y){return this.getTileByID(y.key)}getTileByID(y){return this._inViewTiles.getTileById(y)}_retainLoadedChildren(y,O){let ie=this._getLoadedDescendents(O),ce=new Set;for(let _e of O){let De=ie[_e.key];if(!De?.length){ce.add(_e);continue}let Ne=_e.overscaledZ+Sr.maxOverzooming,Ye=De.filter(Ft=>Ft.tileID.overscaledZ<=Ne);if(!Ye.length){ce.add(_e);continue}let lt=Math.min(...Ye.map(Ft=>Ft.tileID.overscaledZ)),ct=Ye.filter(Ft=>Ft.tileID.overscaledZ===lt).map(Ft=>Ft.tileID);for(let Ft of ct)y[Ft.key]=Ft;this._areDescendentsComplete(ct,lt,_e.overscaledZ)||ce.add(_e)}return ce}_getLoadedDescendents(y){var O;let ie={};for(let ce of this._inViewTiles.getAllTiles().filter(_e=>_e.hasData()))for(let _e of y)ce.tileID.isChildOf(_e)&&(ie[O=_e.key]||(ie[O]=[]),ie[_e.key].push(ce));return ie}_areDescendentsComplete(y,O,ie){return y.length===1&&y[0].isOverscaled()?y[0].overscaledZ===O:Math.pow(4,O-ie)===y.length}getLoadedTile(y){return this._inViewTiles.getLoadedTile(y)}updateCacheSize(y){let O=Math.ceil(y.width/this._source.tileSize)+1,ie=Math.ceil(y.height/this._source.tileSize)+1,ce=Math.floor(O*ie*(this._maxTileCacheZoomLevels===null?e.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),_e=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,ce):ce;this._outOfViewCache.setMaxSize(_e)}handleWrapJump(y){let O=Math.round((y-(this._prevLng===void 0?y:this._prevLng))/360);this._prevLng=y,O&&(this._inViewTiles.handleWrapJump(O),this._resetTileReloadTimers())}update(y,O){if(!this._sourceLoaded||this._paused)return;let ie;this.transform=y,this.terrain=O,this.updateCacheSize(y),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?ie=y.getVisibleUnwrappedCoordinates(this._source.tileID).map(Ye=>new e.a3(Ye.canonical.z,Ye.wrap,Ye.canonical.z,Ye.canonical.x,Ye.canonical.y)):(ie=Ze(y,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?y.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:O,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(ie=ie.filter(Ye=>this._source.hasTile(Ye)))):ie=[],this.usedForTerrain&&(ie=this._addTerrainIdealTiles(ie));let ce=ie.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,ce&&this.fire(new e.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let _e=$e(y,this._source),De=this._updateRetainedTiles(ie,_e),Ne=Mt(this._source.type);Ne&&this._rasterFadeDuration>0&&!O&&function(Ye,lt,ct,Ft,Gt,Jt,it){let Rt=g(),qt=e.at(lt);for(let or of lt){let vr=Ye.getTileById(or.key);vr.fadingDirection!==mt.Departing&&vr.fadeOpacity!==0||vr.resetFadeLogic(),dt(Ye,vr,ct,Rt,Ft,Gt,it)||Dt(Ye,vr,ct,Rt,Jt,it)||Vt(vr,qt,Rt,it)||vr.resetFadeLogic()}}(this._inViewTiles,ie,De,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),Ne?this._cleanUpRasterTiles(De):this._cleanUpVectorTiles(De)}_cleanUpRasterTiles(y){for(let O of this._inViewTiles.getAllIds())y[O]||this._removeTile(O)}_cleanUpVectorTiles(y){for(let O of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(O);y[O]?ie.clearSymbolFadeHold():ie.hasSymbolBuckets?ie.holdingForSymbolFade()?ie.symbolFadeFinished()&&this._removeTile(O):ie.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(O)}}_addTerrainIdealTiles(y){let O=[];for(let ie of y)if(ie.canonical.z>this._source.minzoom){let ce=ie.scaledTo(ie.canonical.z-1);O.push(ce);let _e=ie.scaledTo(Math.max(this._source.minzoom,Math.min(ie.canonical.z,5)));O.push(_e)}return y.concat(O)}releaseSymbolFadeTiles(){for(let y of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(y).holdingForSymbolFade()&&this._removeTile(y)}_updateRetainedTiles(y,O){var ie;let ce=new Set;for(let lt of y)this._addTile(lt).hasData()||ce.add(lt);let _e=y.reduce((lt,ct)=>(lt[ct.key]=ct,lt),{}),De=this._retainLoadedChildren(_e,ce),Ne={},Ye=Math.max(O-Sr.maxUnderzooming,this._source.minzoom);for(let lt of De){let ct=this._inViewTiles.getTileById(lt.key),Ft=ct?.wasRequested();for(let Gt=lt.overscaledZ-1;Gt>=Ye;--Gt){let Jt=lt.scaledTo(Gt);if(Ne[Jt.key])break;if(Ne[Jt.key]=!0,ct=this.getTile(Jt),!ct&&Ft&&(ct=this._addTile(Jt)),ct){let it=ct.hasData();if((it||!(!((ie=this.map)===null||ie===void 0)&&ie.cancelPendingTileRequestsWhileZooming)||Ft)&&(_e[Jt.key]=Jt),Ft=ct.wasRequested(),it)break}}}return _e}_addTile(y){let O=this._inViewTiles.getTileById(y.key);if(O)return O;O=this._outOfViewCache.getAndRemove(y),O&&(O.resetFadeLogic(),this._setTileReloadTimer(y.key,O),O.tileID=y,this._state.initializeTileState(O,this.map?this.map.painter:null));let ie=O;return O||(O=new Tt(y,this._source.tileSize*y.overscaleFactor()),this._loadTile(O,y.key,O.state)),O.uses++,this._inViewTiles.setTile(y.key,O),ie||this._source.fire(new e.n("dataloading",{tile:O,coord:O.tileID,dataType:"source"})),O}_setTileReloadTimer(y,O){this._clearTileReloadTimer(y);let ie=O.getExpiryTimeout();ie&&(this._timers[y]=setTimeout(()=>{this._reloadTile(y,"expired"),delete this._timers[y]},ie))}_clearTileReloadTimer(y){let O=this._timers[y];O&&(clearTimeout(O),delete this._timers[y])}_resetTileReloadTimers(){for(let y in this._timers)clearTimeout(this._timers[y]),delete this._timers[y];for(let y of this._inViewTiles.getAllIds()){let O=this._inViewTiles.getTileById(y);this._setTileReloadTimer(y,O)}}refreshTiles(y){for(let O of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(O);(this._inViewTiles.isIdRenderable(O)||ie.state=="errored")&&y.some(ce=>ce.equals(ie.tileID.canonical))&&this._reloadTile(O,"expired")}}_removeTile(y){let O=this._inViewTiles.getTileById(y);O&&(O.uses--,this._inViewTiles.deleteTileById(y),this._clearTileReloadTimer(y),O.uses>0||(O.hasData()&&O.state!=="reloading"?this._outOfViewCache.add(O.tileID,O,O.getExpiryTimeout()):(O.aborted=!0,this._abortTile(O),this._unloadTile(O))))}_dataHandler(y){y.dataType==="source"&&(y.sourceDataType!=="metadata"?y.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(y.sourceDataChanged,y.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let y of this._inViewTiles.getAllIds())this._removeTile(y);this._outOfViewCache.reset()}tilesIn(y,O,ie){let ce=[],_e=this.transform;if(!_e)return ce;let De=_e.getCoveringTilesDetailsProvider().allowWorldCopies(),Ne=ie?_e.getCameraQueryGeometry(y):y,Ye=Jt=>_e.screenPointToMercatorCoordinate(Jt,this.terrain),lt=this.transformBbox(y,Ye,!De),ct=this.transformBbox(Ne,Ye,!De),Ft=this.getIds(),Gt=e.a8.fromPoints(ct);for(let Jt of Ft){let it=this._inViewTiles.getTileById(Jt);if(it.holdingForSymbolFade())continue;let Rt=De?[it.tileID]:[it.tileID.unwrapTo(-1),it.tileID.unwrapTo(0)],qt=Math.pow(2,_e.zoom-it.tileID.overscaledZ),or=O*it.queryPadding*e.a6/it.tileSize/qt;for(let vr of Rt){let Ar=Gt.map(dr=>vr.getTilePoint(new e.a7(dr.x,dr.y)));if(Ar.expandBy(or),Ar.intersects(Je)){let dr=lt.map(qr=>vr.getTilePoint(qr)),mr=ct.map(qr=>vr.getTilePoint(qr));ce.push({tile:it,tileID:De?vr:vr.unwrapTo(0),queryGeometry:dr,cameraQueryGeometry:mr,scale:qt})}}}return ce}transformBbox(y,O,ie){let ce=y.map(O);if(ie){let _e=e.a8.fromPoints(y);_e.shrinkBy(.001*Math.min(_e.width(),_e.height()));let De=_e.map(O);e.a8.fromPoints(ce).covers(De)||(ce=ce.map(Ne=>Ne.x>.5?new e.a7(Ne.x-1,Ne.y,Ne.z):Ne))}return ce}getVisibleCoordinates(y){let O=this.getRenderableIds(y).map(ie=>this._inViewTiles.getTileById(ie).tileID);return this.transform&&this.transform.populateCache(O),O}hasTransition(){return!!this._source.hasTransition()||Mt(this._source.type)&&function(y,O){if(O<=0)return!1;let ie=g();for(let ce of y.getAllTiles())if(ce.fadeEndTime>=ie)return!0;return!1}(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(y){this._rasterFadeDuration=y}setFeatureState(y,O,ie){y||(y=e.ag),this._state.updateState(y,O,ie)}removeFeatureState(y,O,ie){y||(y=e.ag),this._state.removeFeatureState(y,O,ie)}getFeatureState(y,O){return y||(y=e.ag),this._state.getState(y,O)}setDependencies(y,O,ie){let ce=this._inViewTiles.getTileById(y);ce&&ce.setDependencies(O,ie)}reloadTilesForDependencies(y,O){for(let ie of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(ie).hasDependency(y,O)&&this._reloadTile(ie,"reloading");this._outOfViewCache.filter(ie=>!ie.hasDependency(y,O))}areTilesLoaded(){for(let y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}}Sr.maxUnderzooming=10,Sr.maxOverzooming=3;class ia{constructor(y,O){this.reset(y,O)}reset(y,O){this.points=y||[],this._distances=[0];for(let ie=1;ie0?(ce-De)/Ne:0;return this.points[_e].mult(1-Ye).add(this.points[O].mult(Ye))}}function $t(de,y){let O=!0;return de==="always"||de!=="never"&&y!=="never"||(O=!1),O}class It{constructor(y,O,ie){let ce=this.boxCells=[],_e=this.circleCells=[];this.xCellCount=Math.ceil(y/ie),this.yCellCount=Math.ceil(O/ie);for(let De=0;Dethis.width||ce<0||O>this.height)return[];let Ye=[];if(y<=0&&O<=0&&this.width<=ie&&this.height<=ce){if(_e)return[{key:null,x1:y,y1:O,x2:ie,y2:ce}];for(let lt=0;lt0}hitTestCircle(y,O,ie,ce,_e){let De=y-ie,Ne=y+ie,Ye=O-ie,lt=O+ie;if(Ne<0||De>this.width||lt<0||Ye>this.height)return!1;let ct=[];return this._forEachCell(De,Ye,Ne,lt,this._queryCellCircle,ct,{hitTest:!0,overlapMode:ce,circle:{x:y,y:O,radius:ie},seenUids:{box:{},circle:{}}},_e),ct.length>0}_queryCell(y,O,ie,ce,_e,De,Ne,Ye){let{seenUids:lt,hitTest:ct,overlapMode:Ft}=Ne,Gt=this.boxCells[_e],Jt=1e-6;if(Gt!==null){let Rt=this.bboxes;for(let qt of Gt)if(!lt.box[qt]){lt.box[qt]=!0;let or=4*qt,vr=this.boxKeys[qt];if(y<=Rt[or+2]+Jt&&O<=Rt[or+3]+Jt&&ie>=Rt[or+0]-Jt&&ce>=Rt[or+1]-Jt&&(!Ye||Ye(vr))&&(!ct||!$t(Ft,vr.overlapMode))&&(De.push({key:vr,x1:Rt[or],y1:Rt[or+1],x2:Rt[or+2],y2:Rt[or+3]}),ct))return!0}}let it=this.circleCells[_e];if(it!==null){let Rt=this.circles;for(let qt of it)if(!lt.circle[qt]){lt.circle[qt]=!0;let or=3*qt,vr=this.circleKeys[qt];if(this._circleAndRectCollide(Rt[or],Rt[or+1],Rt[or+2],y,O,ie,ce)&&(!Ye||Ye(vr))&&(!ct||!$t(Ft,vr.overlapMode))){let Ar=Rt[or],dr=Rt[or+1],mr=Rt[or+2];if(De.push({key:vr,x1:Ar-mr,y1:dr-mr,x2:Ar+mr,y2:dr+mr}),ct)return!0}}}return!1}_queryCellCircle(y,O,ie,ce,_e,De,Ne,Ye){let{circle:lt,seenUids:ct,overlapMode:Ft}=Ne,Gt=this.boxCells[_e];if(Gt!==null){let it=this.bboxes;for(let Rt of Gt)if(!ct.box[Rt]){ct.box[Rt]=!0;let qt=4*Rt,or=this.boxKeys[Rt];if(this._circleAndRectCollide(lt.x,lt.y,lt.radius,it[qt+0],it[qt+1],it[qt+2],it[qt+3])&&(!Ye||Ye(or))&&!$t(Ft,or.overlapMode))return De.push(!0),!0}}let Jt=this.circleCells[_e];if(Jt!==null){let it=this.circles;for(let Rt of Jt)if(!ct.circle[Rt]){ct.circle[Rt]=!0;let qt=3*Rt,or=this.circleKeys[Rt];if(this._circlesCollide(it[qt],it[qt+1],it[qt+2],lt.x,lt.y,lt.radius)&&(!Ye||Ye(or))&&!$t(Ft,or.overlapMode))return De.push(!0),!0}}}_forEachCell(y,O,ie,ce,_e,De,Ne,Ye){let lt=this._convertToXCellCoord(y),ct=this._convertToYCellCoord(O),Ft=this._convertToXCellCoord(ie),Gt=this._convertToYCellCoord(ce);for(let Jt=lt;Jt<=Ft;Jt++)for(let it=ct;it<=Gt;it++)if(_e.call(this,y,O,ie,ce,this.xCellCount*it+Jt,De,Ne,Ye))return}_convertToXCellCoord(y){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(y*this.xScale)))}_convertToYCellCoord(y){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(y*this.yScale)))}_circlesCollide(y,O,ie,ce,_e,De){let Ne=ce-y,Ye=_e-O,lt=ie+De;return lt*lt>Ne*Ne+Ye*Ye}_circleAndRectCollide(y,O,ie,ce,_e,De,Ne){let Ye=(De-ce)/2,lt=Math.abs(y-(ce+Ye));if(lt>Ye+ie)return!1;let ct=(Ne-_e)/2,Ft=Math.abs(O-(_e+ct));if(Ft>ct+ie)return!1;if(lt<=Ye||Ft<=ct)return!0;let Gt=lt-Ye,Jt=Ft-ct;return Gt*Gt+Jt*Jt<=ie*ie}}function ir(de,y){let O=1/(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]),ie=1/(y[8]*y[8]+y[9]*y[9]+y[10]*y[10]),ce=y[0]*O,_e=y[4]*O,De=y[8]*ie,Ne=y[1]*O,Ye=y[5]*O,lt=y[9]*ie,ct=y[2]*O,Ft=y[6]*O,Gt=y[10]*ie;de[0]=ce,de[1]=_e,de[2]=De,de[4]=Ne,de[5]=Ye,de[6]=lt,de[8]=ct,de[9]=Ft,de[10]=Gt;let Jt=y[12],it=y[13],Rt=y[14];return de[12]=-ce*Jt-Ne*it-ct*Rt,de[13]=-_e*Jt-Ye*it-Ft*Rt,de[14]=-De*Jt-lt*it-Gt*Rt,de[3]=0,de[7]=0,de[11]=0,de[15]=1,de}let cr=e.O();function fr(de,y,O){let ie=e.O();if(!de){let{vecSouth:Ft,vecEast:Gt}=sa(y),Jt=n();Jt[0]=Gt[0],Jt[1]=Gt[1],Jt[2]=Ft[0],Jt[3]=Ft[1],ce=Jt,(ct=(De=(_e=Jt)[0])*(lt=_e[3])-(Ye=_e[2])*(Ne=_e[1]))&&(ce[0]=lt*(ct=1/ct),ce[1]=-Ne*ct,ce[2]=-Ye*ct,ce[3]=De*ct),ie[0]=Jt[0],ie[1]=Jt[1],ie[4]=Jt[2],ie[5]=Jt[3]}var ce,_e,De,Ne,Ye,lt,ct;return e.S(ie,ie,[1/O,1/O,1]),ie}function Ir(de,y,O,ie){if(de){let ce=e.O();if(!y){let{vecSouth:_e,vecEast:De}=sa(O);ce[0]=De[0],ce[1]=De[1],ce[4]=_e[0],ce[5]=_e[1]}return e.S(ce,ce,[ie,ie,1]),ce}return O.pixelsToClipSpaceMatrix}function sa(de){let y=Math.cos(de.rollInRadians),O=Math.sin(de.rollInRadians),ie=Math.cos(de.pitchInRadians),ce=Math.cos(de.bearingInRadians),_e=Math.sin(de.bearingInRadians),De=e.az();De[0]=-ce*ie*O-_e*y,De[1]=-_e*ie*O+ce*y;let Ne=e.aA(De);Ne<1e-9?e.aB(De):e.aC(De,De,1/Ne);let Ye=e.az();Ye[0]=ce*ie*y-_e*O,Ye[1]=_e*ie*y+ce*O;let lt=e.aA(Ye);return lt<1e-9?e.aB(Ye):e.aC(Ye,Ye,1/lt),{vecEast:Ye,vecSouth:De}}function aa(de,y,O,ie){let ce;ie?(ce=[de,y,ie(de,y),1],e.aE(ce,ce,O)):(ce=[de,y,0,1],Za(ce,ce,O));let _e=ce[3];return{point:new e.P(ce[0]/_e,ce[1]/_e),signedDistanceFromCamera:_e,isOccluded:!1}}function xa(de,y){return .5+de/y*.5}function ja(de,y){return de.x>=-y[0]&&de.x<=y[0]&&de.y>=-y[1]&&de.y<=y[1]}function Oa(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt){let Jt=O?de.textSizeData:de.iconSizeData,it=e.aw(Jt,y.transform.zoom),Rt=[256/y.width*2+1,256/y.height*2+1],qt=O?de.text.dynamicLayoutVertexArray:de.icon.dynamicLayoutVertexArray;qt.clear();let or=de.lineVertexArray,vr=O?de.text.placedSymbolArray:de.icon.placedSymbolArray,Ar=y.transform.width/y.transform.height,dr=!1;for(let mr=0;mrMath.abs(O.x-y.x)*ie?{useVertical:!0}:(de===e.ax.vertical?y.yO.x)?{needsFlipping:!0}:null}function Ja(de){let{projectionContext:y,pitchedLabelPlaneMatrixInverse:O,symbol:ie,fontSize:ce,flip:_e,keepUpright:De,glyphOffsetArray:Ne,dynamicLayoutVertexArray:Ye,aspectRatio:lt,rotateToLine:ct}=de,Ft=ce/24,Gt=ie.lineOffsetX*Ft,Jt=ie.lineOffsetY*Ft,it;if(ie.numGlyphs>1){let Rt=ie.glyphStartIndex+ie.numGlyphs,qt=ie.lineStartIndex,or=ie.lineStartIndex+ie.lineLength,vr=An(Ft,Ne,Gt,Jt,_e,ie,ct,y);if(!vr)return{notEnoughRoom:!0};let Ar=Mi(vr.first.point.x,vr.first.point.y,y,O),dr=Mi(vr.last.point.x,vr.last.point.y,y,O);if(De&&!_e){let mr=un(ie.writingMode,Ar,dr,lt);if(mr)return mr}it=[vr.first];for(let mr=ie.glyphStartIndex+1;mr0?Ar.point:ei(y.tileAnchorPoint,vr,qt,1,y),mr=Mi(qt.x,qt.y,y,O),qr=Mi(dr.x,dr.y,y,O),Lr=un(ie.writingMode,mr,qr,lt);if(Lr)return Lr}let Rt=Ii(Ft*Ne.getoffsetX(ie.glyphStartIndex),Gt,Jt,_e,ie.segment,ie.lineStartIndex,ie.lineStartIndex+ie.lineLength,y,ct);if(!Rt||y.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};it=[Rt]}for(let Rt of it)e.aD(Ye,Rt.point,Rt.angle);return{}}function ei(de,y,O,ie,ce){let _e=de.add(de.sub(y)._unit()),De=ni(_e.x,_e.y,ce).point,Ne=O.sub(De);return O.add(Ne._mult(ie/Ne.mag()))}function Fn(de,y,O){let ie=y.projectionCache;if(ie.projections[de])return ie.projections[de];let ce=new e.P(y.lineVertexArray.getx(de),y.lineVertexArray.gety(de)),_e=ni(ce.x,ce.y,y);if(_e.signedDistanceFromCamera>0)return ie.projections[de]=_e.point,ie.anyProjectionOccluded||(ie.anyProjectionOccluded=_e.isOccluded),_e.point;let De=de-O.direction;return ei(O.distanceFromAnchor===0?y.tileAnchorPoint:new e.P(y.lineVertexArray.getx(De),y.lineVertexArray.gety(De)),ce,O.previousVertex,O.absOffsetX-O.distanceFromAnchor+1,y)}function ni(de,y,O){let ie=de+O.translation[0],ce=y+O.translation[1],_e;return O.pitchWithMap?(_e=aa(ie,ce,O.pitchedLabelPlaneMatrix,O.getElevation),_e.isOccluded=!1):(_e=O.transform.projectTileCoordinates(ie,ce,O.unwrappedTileID,O.getElevation),_e.point.x=(.5*_e.point.x+.5)*O.width,_e.point.y=(.5*-_e.point.y+.5)*O.height),_e}function Mi(de,y,O,ie){if(O.pitchWithMap){let ce=[de,y,0,1];return e.aE(ce,ce,ie),O.transform.projectTileCoordinates(ce[0]/ce[3],ce[1]/ce[3],O.unwrappedTileID,O.getElevation).point}return{x:de/O.width*2-1,y:1-y/O.height*2}}function ci(de,y,O){return O.transform.projectTileCoordinates(de,y,O.unwrappedTileID,O.getElevation)}function bn(de,y,O){return de._unit()._perp()._mult(y*O)}function pn(de,y,O,ie,ce,_e,De,Ne,Ye){if(Ne.projectionCache.offsets[de])return Ne.projectionCache.offsets[de];let lt=O.add(y);if(de+Ye.direction=ce)return Ne.projectionCache.offsets[de]=lt,lt;let ct=Fn(de+Ye.direction,Ne,Ye),Ft=bn(ct.sub(O),De,Ye.direction),Gt=O.add(Ft),Jt=ct.add(Ft);return Ne.projectionCache.offsets[de]=e.aF(_e,lt,Gt,Jt)||lt,Ne.projectionCache.offsets[de]}function Ii(de,y,O,ie,ce,_e,De,Ne,Ye){let lt=ie?de-y:de+y,ct=lt>0?1:-1,Ft=0;ie&&(ct*=-1,Ft=Math.PI),ct<0&&(Ft+=Math.PI);let Gt,Jt=ct>0?_e+ce:_e+ce+1;Ne.projectionCache.cachedAnchorPoint?Gt=Ne.projectionCache.cachedAnchorPoint:(Gt=ni(Ne.tileAnchorPoint.x,Ne.tileAnchorPoint.y,Ne).point,Ne.projectionCache.cachedAnchorPoint=Gt);let it,Rt,qt=Gt,or=Gt,vr=0,Ar=0,dr=Math.abs(lt),mr=[],qr;for(;vr+Ar<=dr;){if(Jt+=ct,Jt<_e||Jt>=De)return null;vr+=Ar,or=qt,Rt=it;let Ba={absOffsetX:dr,direction:ct,distanceFromAnchor:vr,previousVertex:or};if(qt=Fn(Jt,Ne,Ba),O===0)mr.push(or),qr=qt.sub(or);else{let Pa,Ua=qt.sub(or);Pa=Ua.mag()===0?bn(Fn(Jt+ct,Ne,Ba).sub(qt),O,ct):bn(Ua,O,ct),Rt||(Rt=or.add(Pa)),it=pn(Jt,Pa,qt,_e,De,Rt,O,Ne,Ba),mr.push(Rt),qr=it.sub(Rt)}Ar=qr.mag()}let Lr=qr._mult((dr-vr)/Ar)._add(Rt||or),ua=Ft+Math.atan2(qt.y-or.y,qt.x-or.x);return mr.push(Lr),{point:Lr,angle:Ye?ua:0,path:mr}}let ho=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function dn(de,y){for(let O=0;O=1;Xa--)Ma.push(ya.path[Xa]);for(let Xa=1;XaHn.signedDistanceFromCamera<=0)?[]:Xa.map(Hn=>Hn.point)}let Ya=[];if(Ma.length>0){let Xa=Ma[0].clone(),Hn=Ma[0].clone();for(let $n=1;$n=Ba.x&&Hn.x<=Pa.x&&Xa.y>=Ba.y&&Hn.y<=Pa.y?[Ma]:Hn.xPa.x||Hn.yPa.y?[]:e.aG([Ma],Ba.x,Ba.y,Pa.x,Pa.y)}for(let Xa of Ya){Ua.reset(Xa,.25*ua);let Hn=0;Hn=Ua.length<=.5*ua?1:Math.ceil(Ua.paddedLength/wa)+1;for(let $n=0;$n{let Ye=aa(Ne.x,Ne.y,De,_e.getElevation),lt=_e.transform.projectTileCoordinates(Ye.point.x,Ye.point.y,_e.unwrappedTileID,_e.getElevation);return lt.point.x=(.5*lt.point.x+.5)*_e.width,lt.point.y=(.5*-lt.point.y+.5)*_e.height,lt})}(y,O);return function(ce){let _e=0,De=0,Ne=0,Ye=0;for(let lt=0;ltDe&&(De=Ye,_e=Ne));return ce.slice(_e,_e+De)}(ie)}queryRenderedSymbols(y){if(y.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let O=[],ie=new e.a8;for(let Ft of y){let Gt=new e.P(Ft.x+ot,Ft.y+ot);ie.extend(Gt),O.push(Gt)}let{minX:ce,minY:_e,maxX:De,maxY:Ne}=ie,Ye=this.grid.query(ce,_e,De,Ne).concat(this.ignoredGrid.query(ce,_e,De,Ne)),lt={},ct={};for(let Ft of Ye){let Gt=Ft.key;if(lt[Gt.bucketInstanceId]===void 0&&(lt[Gt.bucketInstanceId]={}),lt[Gt.bucketInstanceId][Gt.featureIndex])continue;let Jt=[new e.P(Ft.x1,Ft.y1),new e.P(Ft.x2,Ft.y1),new e.P(Ft.x2,Ft.y2),new e.P(Ft.x1,Ft.y2)];e.aH(O,Jt)&&(lt[Gt.bucketInstanceId][Gt.featureIndex]=!0,ct[Gt.bucketInstanceId]===void 0&&(ct[Gt.bucketInstanceId]=[]),ct[Gt.bucketInstanceId].push(Gt.featureIndex))}return ct}insertCollisionBox(y,O,ie,ce,_e,De){(ie?this.ignoredGrid:this.grid).insert({bucketInstanceId:ce,featureIndex:_e,collisionGroupID:De,overlapMode:O},y[0],y[1],y[2],y[3])}insertCollisionCircles(y,O,ie,ce,_e,De){let Ne=ie?this.ignoredGrid:this.grid,Ye={bucketInstanceId:ce,featureIndex:_e,collisionGroupID:De,overlapMode:O};for(let lt=0;lt=this.screenRightBoundary||cethis.screenBottomBoundary}isInsideGrid(y,O,ie,ce){return ie>=0&&y=0&&Othis.projectAndGetPerspectiveRatio(wa.x,wa.y,ce,lt,Ft));da=Ma.some(wa=>!wa.isOccluded),ya=Ma.map(wa=>new e.P(wa.x,wa.y))}else da=!0;return{box:e.aI(ya),allPointsOccluded:!da}}}class hr{constructor(y,O,ie,ce){this.opacity=y?Math.max(0,Math.min(1,y.opacity+(y.placed?O:-O))):ce&&ie?1:0,this.placed=ie}isHidden(){return this.opacity===0&&!this.placed}}class ur{constructor(y,O,ie,ce,_e){this.text=new hr(y?y.text:null,O,ie,_e),this.icon=new hr(y?y.icon:null,O,ce,_e)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Tr{constructor(y,O,ie){this.text=y,this.icon=O,this.skipFade=ie}}class Rr{constructor(y,O,ie,ce,_e){this.bucketInstanceId=y,this.featureIndex=O,this.sourceLayerIndex=ie,this.bucketIndex=ce,this.tileID=_e}}class Fr{constructor(y){this.crossSourceCollisions=y,this.maxGroupID=0,this.collisionGroups={}}get(y){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[y]){let O=++this.maxGroupID;this.collisionGroups[y]={ID:O,predicate:ie=>ie.collisionGroupID===O}}return this.collisionGroups[y]}}function nt(de,y,O,ie,ce){let{horizontalAlign:_e,verticalAlign:De}=e.aP(de);return new e.P(-(_e-.5)*y+ie[0]*ce,-(De-.5)*O+ie[1]*ce)}class kt{constructor(y,O,ie,ce,_e){this.transform=y.clone(),this.terrain=O,this.collisionIndex=new et(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ie,this.retainedQueryData={},this.collisionGroups=new Fr(ce),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=_e,_e&&(_e.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(y){let O=this.terrain;return O?(ie,ce)=>O.getElevation(y,ie,ce):null}getBucketParts(y,O,ie,ce){let _e=ie.getBucket(O),De=ie.latestFeatureIndex;if(!_e||!De||O.id!==_e.layerIds[0])return;let Ne=ie.collisionBoxArray,Ye=_e.layers[0].layout,lt=_e.layers[0].paint,ct=Math.pow(2,this.transform.zoom-ie.tileID.overscaledZ),Ft=ie.tileSize/e.a6,Gt=ie.tileID.toUnwrapped(),Jt=Ye.get("text-rotation-alignment")==="map",it=e.aK(ie,1,this.transform.zoom),Rt=e.aL(this.collisionIndex.transform,ie,lt.get("text-translate"),lt.get("text-translate-anchor")),qt=e.aL(this.collisionIndex.transform,ie,lt.get("icon-translate"),lt.get("icon-translate-anchor")),or=fr(Jt,this.transform,it);this.retainedQueryData[_e.bucketInstanceId]=new Rr(_e.bucketInstanceId,De,_e.sourceLayerIndex,_e.index,ie.tileID);let vr={bucket:_e,layout:Ye,translationText:Rt,translationIcon:qt,unwrappedTileID:Gt,pitchedLabelPlaneMatrix:or,scale:ct,textPixelRatio:Ft,holdingForFade:ie.holdingForSymbolFade(),collisionBoxArray:Ne,partiallyEvaluatedTextSize:e.aw(_e.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(_e.sourceID)};if(ce)for(let Ar of _e.sortKeyRanges){let{sortKey:dr,symbolInstanceStart:mr,symbolInstanceEnd:qr}=Ar;y.push({sortKey:dr,symbolInstanceStart:mr,symbolInstanceEnd:qr,parameters:vr})}else y.push({symbolInstanceStart:0,symbolInstanceEnd:_e.symbolInstances.length,parameters:vr})}attemptAnchorPlacement(y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt,Jt,it,Rt,qt,or,vr,Ar,dr){var mr,qr,Lr;let ua=e.aM[y.textAnchor],Ba=[y.textOffset0,y.textOffset1],Pa=nt(ua,ie,ce,Ba,_e),Ua=this.collisionIndex.placeCollisionBox(O,Gt,Ye,lt,ct,Ne,De,qt,Ft.predicate,Ar,Pa,dr);if((!vr||this.collisionIndex.placeCollisionBox(vr,Gt,Ye,lt,ct,Ne,De,or,Ft.predicate,Ar,Pa,dr).placeable)&&Ua.placeable){let ya;if(!((mr=this.prevPlacement)===null||mr===void 0)&&mr.variableOffsets[Jt.crossTileID]&&(!((Lr=(qr=this.prevPlacement)===null||qr===void 0?void 0:qr.placements[Jt.crossTileID])===null||Lr===void 0)&&Lr.text)&&(ya=this.prevPlacement.variableOffsets[Jt.crossTileID].anchor),Jt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Jt.crossTileID]={textOffset:Ba,width:ie,height:ce,anchor:ua,textBoxScale:_e,prevAnchor:ya},this.markUsedJustification(it,ua,Jt,Rt),it.allowVerticalPlacement&&(this.markUsedOrientation(it,Rt,Jt),this.placedOrientations[Jt.crossTileID]=Rt),{shift:Pa,placedGlyphBoxes:Ua}}}placeLayerBucketPart(y,O,ie){let{bucket:ce,layout:_e,translationText:De,translationIcon:Ne,unwrappedTileID:Ye,pitchedLabelPlaneMatrix:lt,textPixelRatio:ct,holdingForFade:Ft,collisionBoxArray:Gt,partiallyEvaluatedTextSize:Jt,collisionGroup:it}=y.parameters,Rt=_e.get("text-optional"),qt=_e.get("icon-optional"),or=e.aN(_e,"text-overlap","text-allow-overlap"),vr=or==="always",Ar=e.aN(_e,"icon-overlap","icon-allow-overlap"),dr=Ar==="always",mr=_e.get("text-rotation-alignment")==="map",qr=_e.get("text-pitch-alignment")==="map",Lr=_e.get("icon-text-fit")!=="none",ua=_e.get("symbol-z-order")==="viewport-y",Ba=vr&&(dr||!ce.hasIconData()||qt),Pa=dr&&(vr||!ce.hasTextData()||Rt);!ce.collisionArrays&&Gt&&ce.deserializeCollisionBoxes(Gt);let Ua=this.retainedQueryData[ce.bucketInstanceId].tileID,ya=this._getTerrainElevationFunc(Ua),da=this.transform.getFastPathSimpleProjectionMatrix(Ua),Ma=(wa,Ya,Xa)=>{var Hn,$n;if(O[wa.crossTileID])return;if(Ft)return void(this.placements[wa.crossTileID]=new Tr(!1,!1,!1));let Si=!1,Mn=!1,xn=!0,gi=null,Wn={box:null,placeable:!1,offscreen:null,occluded:!1},Yn={placeable:!1},Xn=null,pi=null,Xi=null,Eo=0,yi=0,Ui=0;Ya.textFeatureIndex?Eo=Ya.textFeatureIndex:wa.useRuntimeCollisionCircles&&(Eo=wa.featureIndex),Ya.verticalTextFeatureIndex&&(yi=Ya.verticalTextFeatureIndex);let fo=Ya.textBox;if(fo){let Vs=hs=>{let ss=e.ax.horizontal;if(ce.allowVerticalPlacement&&!hs&&this.prevPlacement){let ks=this.prevPlacement.placedOrientations[wa.crossTileID];ks&&(this.placedOrientations[wa.crossTileID]=ks,ss=ks,this.markUsedOrientation(ce,ss,wa))}return ss},Uo=(hs,ss)=>{if(ce.allowVerticalPlacement&&wa.numVerticalGlyphVertices>0&&Ya.verticalTextBox){for(let ks of ce.writingModes)if(ks===e.ax.vertical?(Wn=ss(),Yn=Wn):Wn=hs(),Wn?.placeable)break}else Wn=hs()},Qs=wa.textAnchorOffsetStartIndex,os=wa.textAnchorOffsetEndIndex;if(os===Qs){let hs=(ss,ks)=>{let ts=this.collisionIndex.placeCollisionBox(ss,or,ct,Ua,Ye,qr,mr,De,it.predicate,ya,void 0,da);return ts?.placeable&&(this.markUsedOrientation(ce,ks,wa),this.placedOrientations[wa.crossTileID]=ks),ts};Uo(()=>hs(fo,e.ax.horizontal),()=>{let ss=Ya.verticalTextBox;return ce.allowVerticalPlacement&&wa.numVerticalGlyphVertices>0&&ss?hs(ss,e.ax.vertical):{box:null,offscreen:null}}),Vs(Wn?.placeable)}else{let hs=e.aM[($n=(Hn=this.prevPlacement)===null||Hn===void 0?void 0:Hn.variableOffsets[wa.crossTileID])===null||$n===void 0?void 0:$n.anchor],ss=(ts,el,Il)=>{let Do=ts.x2-ts.x1,ru=ts.y2-ts.y1,Ns=wa.textBoxScale,Nu=Lr&&Ar==="never"?el:null,Vl=null,Hl=or==="never"?1:2,Co="never";hs&&Hl++;for(let is=0;isss(fo,Ya.iconBox,e.ax.horizontal),()=>{let ts=Ya.verticalTextBox;return ce.allowVerticalPlacement&&!Wn?.placeable&&wa.numVerticalGlyphVertices>0&&ts?ss(ts,Ya.verticalIconBox,e.ax.vertical):{box:null,occluded:!0,offscreen:null}}),Wn&&(Si=Wn.placeable,xn=Wn.offscreen);let ks=Vs(Wn?.placeable);if(!Si&&this.prevPlacement){let ts=this.prevPlacement.variableOffsets[wa.crossTileID];ts&&(this.variableOffsets[wa.crossTileID]=ts,this.markUsedJustification(ce,ts.anchor,wa,ks))}}}if(Xn=Wn,Si=Xn?.placeable,xn=Xn?.offscreen,wa.useRuntimeCollisionCircles&&wa.centerJustifiedTextSymbolIndex>=0){let Vs=ce.text.placedSymbolArray.get(wa.centerJustifiedTextSymbolIndex),Uo=e.ay(ce.textSizeData,Jt,Vs),Qs=_e.get("text-padding");pi=this.collisionIndex.placeCollisionCircles(or,Vs,ce.lineVertexArray,ce.glyphOffsetArray,Uo,Ye,lt,ie,qr,it.predicate,wa.collisionCircleDiameter,Qs,De,ya),pi.circles.length&&pi.collisionDetected&&!ie&&e.w("Collisions detected, but collision boxes are not shown"),Si=vr||pi.circles.length>0&&!pi.collisionDetected,xn&&(xn=pi.offscreen)}if(Ya.iconFeatureIndex&&(Ui=Ya.iconFeatureIndex),Ya.iconBox){let Vs=Uo=>this.collisionIndex.placeCollisionBox(Uo,Ar,ct,Ua,Ye,qr,mr,Ne,it.predicate,ya,Lr&&gi?gi:void 0,da);Yn&&Yn.placeable&&Ya.verticalIconBox?(Xi=Vs(Ya.verticalIconBox),Mn=Xi.placeable):(Xi=Vs(Ya.iconBox),Mn=Xi.placeable),xn&&(xn=Xi.offscreen)}let To=Rt||wa.numHorizontalGlyphVertices===0&&wa.numVerticalGlyphVertices===0,jo=qt||wa.numIconVertices===0;To||jo?jo?To||Mn&&(Mn=Si):Si=Mn&&Si:Mn=Si=Mn&&Si;let qs=Mn&&Xi.placeable;if(Si&&Xn.placeable&&this.collisionIndex.insertCollisionBox(Xn.box,or,_e.get("text-ignore-placement"),ce.bucketInstanceId,Yn&&Yn.placeable&&yi?yi:Eo,it.ID),qs&&this.collisionIndex.insertCollisionBox(Xi.box,Ar,_e.get("icon-ignore-placement"),ce.bucketInstanceId,Ui,it.ID),pi&&Si&&this.collisionIndex.insertCollisionCircles(pi.circles,or,_e.get("text-ignore-placement"),ce.bucketInstanceId,Eo,it.ID),ie&&this.storeCollisionData(ce.bucketInstanceId,Xa,Ya,Xn,Xi,pi),wa.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(ce.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[wa.crossTileID]=new Tr((Si||Ba)&&!Xn?.occluded,(Mn||Pa)&&!Xi?.occluded,xn||ce.justReloaded),O[wa.crossTileID]=!0};if(ua){if(y.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let wa=ce.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let Ya=wa.length-1;Ya>=0;--Ya){let Xa=wa[Ya];Ma(ce.symbolInstances.get(Xa),ce.collisionArrays[Xa],Xa)}}else for(let wa=y.symbolInstanceStart;wa=0&&(y.text.placedSymbolArray.get(Ne).crossTileID=_e>=0&&Ne!==_e?0:ie.crossTileID)}markUsedOrientation(y,O,ie){let ce=O===e.ax.horizontal||O===e.ax.horizontalOnly?O:0,_e=O===e.ax.vertical?O:0,De=[ie.leftJustifiedTextSymbolIndex,ie.centerJustifiedTextSymbolIndex,ie.rightJustifiedTextSymbolIndex];for(let Ne of De)y.text.placedSymbolArray.get(Ne).placedOrientation=ce;ie.verticalPlacedTextSymbolIndex&&(y.text.placedSymbolArray.get(ie.verticalPlacedTextSymbolIndex).placedOrientation=_e)}commit(y){this.commitTime=y,this.zoomAtLastRecencyCheck=this.transform.zoom;let O=this.prevPlacement,ie=!1;this.prevZoomAdjustment=O?O.zoomAdjustment(this.transform.zoom):0;let ce=O?O.symbolFadeChange(y):1,_e=O?O.opacities:{},De=O?O.variableOffsets:{},Ne=O?O.placedOrientations:{};for(let Ye in this.placements){let lt=this.placements[Ye],ct=_e[Ye];ct?(this.opacities[Ye]=new ur(ct,ce,lt.text,lt.icon),ie||(ie=lt.text!==ct.text.placed),ie||(ie=lt.icon!==ct.icon.placed)):(this.opacities[Ye]=new ur(null,ce,lt.text,lt.icon,lt.skipFade),ie||(ie=lt.text||lt.icon))}for(let Ye in _e){let lt=_e[Ye];if(!this.opacities[Ye]){let ct=new ur(lt,ce,!1,!1);ct.isHidden()||(this.opacities[Ye]=ct,ie||(ie=lt.text.placed),ie||(ie=lt.icon.placed))}}for(let Ye in De)this.variableOffsets[Ye]||!this.opacities[Ye]||this.opacities[Ye].isHidden()||(this.variableOffsets[Ye]=De[Ye]);for(let Ye in Ne)this.placedOrientations[Ye]||!this.opacities[Ye]||this.opacities[Ye].isHidden()||(this.placedOrientations[Ye]=Ne[Ye]);if(O&&O.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");ie?this.lastPlacementChangeTime=y:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=O?O.lastPlacementChangeTime:y)}updateLayerOpacities(y,O){let ie={};for(let ce of O){let _e=ce.getBucket(y);_e&&ce.latestFeatureIndex&&y.id===_e.layerIds[0]&&this.updateBucketOpacities(_e,ce.tileID,ie,ce.collisionBoxArray)}}updateBucketOpacities(y,O,ie,ce){y.hasTextData()&&(y.text.opacityVertexArray.clear(),y.text.hasVisibleVertices=!1),y.hasIconData()&&(y.icon.opacityVertexArray.clear(),y.icon.hasVisibleVertices=!1),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexArray.clear(),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexArray.clear();let _e=y.layers[0],De=_e.layout,Ne=new ur(null,0,!1,!1,!0),Ye=De.get("text-allow-overlap"),lt=De.get("icon-allow-overlap"),ct=_e._unevaluatedLayout.hasValue("text-variable-anchor")||_e._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ft=De.get("text-rotation-alignment")==="map",Gt=De.get("text-pitch-alignment")==="map",Jt=De.get("icon-text-fit")!=="none",it=new ur(null,0,Ye&&(lt||!y.hasIconData()||De.get("icon-optional")),lt&&(Ye||!y.hasTextData()||De.get("text-optional")),!0);!y.collisionArrays&&ce&&(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData())&&y.deserializeCollisionBoxes(ce);let Rt=(or,vr,Ar)=>{for(let dr=0;dr0,ua=this.placedOrientations[vr.crossTileID],Ba=ua===e.ax.vertical,Pa=ua===e.ax.horizontal||ua===e.ax.horizontalOnly;if(Ar>0||dr>0){let ya=La(qr.text);Rt(y.text,Ar,Ba?Cn:ya),Rt(y.text,dr,Pa?Cn:ya);let da=qr.text.isHidden(),Ma=[vr.rightJustifiedTextSymbolIndex,vr.centerJustifiedTextSymbolIndex,vr.leftJustifiedTextSymbolIndex];for(let Xa of Ma)Xa>=0&&(y.text.placedSymbolArray.get(Xa).hidden=da||Ba?1:0);vr.verticalPlacedTextSymbolIndex>=0&&(y.text.placedSymbolArray.get(vr.verticalPlacedTextSymbolIndex).hidden=da||Pa?1:0);let wa=this.variableOffsets[vr.crossTileID];wa&&this.markUsedJustification(y,wa.anchor,vr,ua);let Ya=this.placedOrientations[vr.crossTileID];Ya&&(this.markUsedJustification(y,"left",vr,Ya),this.markUsedOrientation(y,Ya,vr))}if(Lr){let ya=La(qr.icon),da=!(Jt&&vr.verticalPlacedIconSymbolIndex&&Ba);vr.placedIconSymbolIndex>=0&&(Rt(y.icon,vr.numIconVertices,da?ya:Cn),y.icon.placedSymbolArray.get(vr.placedIconSymbolIndex).hidden=qr.icon.isHidden()),vr.verticalPlacedIconSymbolIndex>=0&&(Rt(y.icon,vr.numVerticalIconVertices,da?Cn:ya),y.icon.placedSymbolArray.get(vr.verticalPlacedIconSymbolIndex).hidden=qr.icon.isHidden())}let Ua=qt?.has(or)?qt.get(or):{text:null,icon:null};if(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData()){let ya=y.collisionArrays[or];if(ya){let da=new e.P(0,0);if(ya.textBox||ya.verticalTextBox){let Ma=!0;if(ct){let wa=this.variableOffsets[mr];wa?(da=nt(wa.anchor,wa.width,wa.height,wa.textOffset,wa.textBoxScale),Ft&&da._rotate(Gt?-this.transform.bearingInRadians:this.transform.bearingInRadians)):Ma=!1}if(ya.textBox||ya.verticalTextBox){let wa;ya.textBox&&(wa=Ba),ya.verticalTextBox&&(wa=Pa),Ut(y.textCollisionBox.collisionVertexArray,qr.text.placed,!Ma||wa,Ua.text,da.x,da.y)}}if(ya.iconBox||ya.verticalIconBox){let Ma=!!(!Pa&&ya.verticalIconBox),wa;ya.iconBox&&(wa=Ma),ya.verticalIconBox&&(wa=!Ma),Ut(y.iconCollisionBox.collisionVertexArray,qr.icon.placed,wa,Ua.icon,Jt?da.x:0,Jt?da.y:0)}}}}if(y.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[y.bucketInstanceId]&&(this.retainedQueryData[y.bucketInstanceId].featureSortOrder=y.featureSortOrder),y.hasTextData()&&y.text.opacityVertexBuffer&&y.text.opacityVertexBuffer.updateData(y.text.opacityVertexArray),y.hasIconData()&&y.icon.opacityVertexBuffer&&y.icon.opacityVertexBuffer.updateData(y.icon.opacityVertexArray),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexBuffer&&y.iconCollisionBox.collisionVertexBuffer.updateData(y.iconCollisionBox.collisionVertexArray),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexBuffer&&y.textCollisionBox.collisionVertexBuffer.updateData(y.textCollisionBox.collisionVertexArray),y.text.opacityVertexArray.length!==y.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${y.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${y.text.layoutVertexArray.length}) / 4`);if(y.icon.opacityVertexArray.length!==y.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${y.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${y.icon.layoutVertexArray.length}) / 4`);y.bucketInstanceId in this.collisionCircleArrays&&(y.collisionCircleArray=this.collisionCircleArrays[y.bucketInstanceId],delete this.collisionCircleArrays[y.bucketInstanceId])}symbolFadeChange(y){return this.fadeDuration===0?1:(y-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(y){return Math.max(0,(this.transform.zoom-y)/1.5)}hasTransitions(y){return this.stale||y-this.lastPlacementChangeTimey}setStale(){this.stale=!0}}function Ut(de,y,O,ie,ce,_e){ie&&ie.length!==0||(ie=[0,0,0,0]);let De=ie[0]-ot,Ne=ie[1]-ot,Ye=ie[2]-ot,lt=ie[3]-ot;de.emplaceBack(y?1:0,O?1:0,ce||0,_e||0,De,Ne),de.emplaceBack(y?1:0,O?1:0,ce||0,_e||0,Ye,Ne),de.emplaceBack(y?1:0,O?1:0,ce||0,_e||0,Ye,lt),de.emplaceBack(y?1:0,O?1:0,ce||0,_e||0,De,lt)}let nr=Math.pow(2,25),Er=Math.pow(2,24),br=Math.pow(2,17),Or=Math.pow(2,16),Pr=Math.pow(2,9),fa=Math.pow(2,8),Fa=Math.pow(2,1);function La(de){if(de.opacity===0&&!de.placed)return 0;if(de.opacity===1&&de.placed)return 4294967295;let y=de.placed?1:0,O=Math.floor(127*de.opacity);return O*nr+y*Er+O*br+y*Or+O*Pr+y*fa+O*Fa+y}let Cn=0;class mn{constructor(y){this._sortAcrossTiles=y.layout.get("symbol-z-order")!=="viewport-y"&&!y.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(y,O,ie,ce,_e){let De=this._bucketParts;for(;this._currentTileIndexNe.sortKey-Ye.sortKey));this._currentPartIndex!this._forceFullPlacement&&g()-ce>2;for(;this._currentPlacementIndex>=0;){let De=O[y[this._currentPlacementIndex]],Ne=this.placement.collisionIndex.transform.zoom;if(e.aQ(De)&&De.layout&&(!De.minzoom||De.minzoom<=Ne)&&(!De.maxzoom||De.maxzoom>Ne)){if(this._inProgressLayer||(this._inProgressLayer=new mn(De)),this._inProgressLayer.continuePlacement(ie[De.source],this.placement,this._showCollisionBoxes,De,_e))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(y){return this.placement.commit(y),this.placement}}let gn=512/e.a6/2;class eo{constructor(y,O,ie){this.tileID=y,this.bucketInstanceId=ie,this._symbolsByKey={};let ce=new Map;for(let _e=0;_e({x:Math.floor(Ye.anchorX*gn),y:Math.floor(Ye.anchorY*gn)})),crossTileIDs:De.map(Ye=>Ye.crossTileID)};if(Ne.positions.length>128){let Ye=new e.aR(Ne.positions.length,16,Uint16Array);for(let{x:lt,y:ct}of Ne.positions)Ye.add(lt,ct);Ye.finish(),delete Ne.positions,Ne.index=Ye}this._symbolsByKey[_e]=Ne}}getScaledCoordinates(y,O){let{x:ie,y:ce,z:_e}=this.tileID.canonical,{x:De,y:Ne,z:Ye}=O.canonical,lt=gn/Math.pow(2,Ye-_e),ct=(Ne*e.a6+y.anchorY)*lt,Ft=ce*e.a6*gn;return{x:Math.floor((De*e.a6+y.anchorX)*lt-ie*e.a6*gn),y:Math.floor(ct-Ft)}}findMatches(y,O,ie){let ce=this.tileID.canonical.zy)}}class si{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Ao{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(y){let O=Math.round((y-this.lng)/360);if(O!==0)for(let ie in this.indexes){let ce=this.indexes[ie],_e={};for(let De in ce){let Ne=ce[De];Ne.tileID=Ne.tileID.unwrapTo(Ne.tileID.wrap+O),_e[Ne.tileID.key]=Ne}this.indexes[ie]=_e}this.lng=y}addBucket(y,O,ie){var ce,_e,De;if(!((ce=this.indexes[y.overscaledZ])===null||ce===void 0)&&ce[y.key]){if(this.indexes[y.overscaledZ][y.key].bucketInstanceId===O.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(y.overscaledZ,this.indexes[y.overscaledZ][y.key])}for(let Ye=0;Yey.overscaledZ)for(let ct in lt){let Ft=lt[ct];Ft.tileID.isChildOf(y)&&Ft.findMatches(O.symbolInstances,y,Ne)}else{let ct=lt[y.scaledTo(Number(Ye)).key];ct&&ct.findMatches(O.symbolInstances,y,Ne)}}for(let Ye=0;Ye 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:ti(Sa,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:ti(`uniform highp float u_intensity;in vec2 v_extrude; +} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:ti(Sn,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:ti(`uniform highp float u_intensity;in vec2 v_extrude; #pragma mapbox: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { @@ -2866,7 +2866,7 @@ uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_st #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,"uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:ti("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:ti(Sa,`in vec2 a_pos;void main() { +}`,"uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:ti("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:ti(Sn,`in vec2 a_pos;void main() { #ifdef GLOBE gl_Position=projectTileFor3D(a_pos,0.0); #else @@ -3502,11 +3502,11 @@ uniform ${ct} ${Ft} u_${Gt}; #else ${ct} ${Ft} ${Gt} = u_${Gt}; #endif -`}),staticAttributes:ie,staticUniforms:De}}class fi{constructor(y,O,ie){this.vertexBuffer=y,this.indexBuffer=O,this.segments=ie}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var xo=e.aS([{name:"a_pos",type:"Int16",components:2}]);let zi="#define PROJECTION_MERCATOR",so="mercator";class Mo{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return so}get shaderDefine(){return zi}get shaderPreludeCode(){return Gi.projectionMercator}get vertexShaderPreludeCode(){return Gi.projectionMercator.vertexSource}get subdivisionGranularity(){return e.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(y){}getMeshFromTileID(y,O,ie,ce,_e){if(this._cachedMesh)return this._cachedMesh;let De=new e.aU;De.emplaceBack(0,0),De.emplaceBack(e.a6,0),De.emplaceBack(0,e.a6),De.emplaceBack(e.a6,e.a6);let Ne=y.createVertexBuffer(De,xo.members),Ye=e.aV.simpleSegment(0,0,4,2),lt=new e.aW;lt.emplaceBack(1,0,2),lt.emplaceBack(1,2,3);let ct=y.createIndexBuffer(lt);return this._cachedMesh=new fi(Ne,ct,Ye),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(y){}}class So{constructor(y=0,O=0,ie=0,ce=0){if(isNaN(y)||y<0||isNaN(O)||O<0||isNaN(ie)||ie<0||isNaN(ce)||ce<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=y,this.bottom=O,this.left=ie,this.right=ce}interpolate(y,O,ie){return O.top!=null&&y.top!=null&&(this.top=e.H.number(y.top,O.top,ie)),O.bottom!=null&&y.bottom!=null&&(this.bottom=e.H.number(y.bottom,O.bottom,ie)),O.left!=null&&y.left!=null&&(this.left=e.H.number(y.left,O.left,ie)),O.right!=null&&y.right!=null&&(this.right=e.H.number(y.right,O.right,ie)),this}getCenter(y,O){let ie=e.al((this.left+y-this.right)/2,0,y),ce=e.al((this.top+O-this.bottom)/2,0,O);return new e.P(ie,ce)}equals(y){return this.top===y.top&&this.bottom===y.bottom&&this.left===y.left&&this.right===y.right}clone(){return new So(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function oi(de,y){if(!de.renderWorldCopies||de.lngRange)return;let O=y.lng-de.center.lng;y.lng+=O>180?-360:O<-180?360:0}function ii(de){return Math.max(0,Math.floor(de))}class co{constructor(y,O){var ie;this.applyConstrain=(ce,_e)=>this._constrainOverride!==null?this._constrainOverride(ce,_e):this._callbacks.defaultConstrain(ce,_e),this._callbacks=y,this._tileSize=512,this._renderWorldCopies=O?.renderWorldCopies===void 0||!!O?.renderWorldCopies,this._minZoom=O?.minZoom||0,this._maxZoom=O?.maxZoom||22,this._minPitch=O?.minPitch==null?0:O?.minPitch,this._maxPitch=O?.maxPitch==null?60:O?.maxPitch,this._constrainOverride=(ie=O?.constrainOverride)!==null&&ie!==void 0?ie:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new e.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=ii(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new So,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(y,O,ie){this._constrainOverride=y.constrainOverride,this._latRange=y.latRange,this._lngRange=y.lngRange,this._width=y.width,this._height=y.height,this._center=y.center,this._elevation=y.elevation,this._minElevationForCurrentTile=y.minElevationForCurrentTile,this._zoom=y.zoom,this._tileZoom=ii(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=y.bearingInRadians,this._fovInRadians=y.fovInRadians,this._pitchInRadians=y.pitchInRadians,this._rollInRadians=y.rollInRadians,this._unmodified=y.unmodified,this._edgeInsets=new So(y.padding.top,y.padding.bottom,y.padding.left,y.padding.right),this._minZoom=y.minZoom,this._maxZoom=y.maxZoom,this._minPitch=y.minPitch,this._maxPitch=y.maxPitch,this._renderWorldCopies=y.renderWorldCopies,this._cameraToCenterDistance=y.cameraToCenterDistance,this._nearZ=y.nearZ,this._farZ=y.farZ,this._autoCalculateNearFarZ=!ie&&y.autoCalculateNearFarZ,O&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(y){this._minElevationForCurrentTile=y}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(y){this._minZoom!==y&&(this._minZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(y){this._maxZoom!==y&&(this._maxZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(y){this._minPitch!==y&&(this._minPitch=y,this.setPitch(Math.max(this.pitch,y)))}get maxPitch(){return this._maxPitch}setMaxPitch(y){this._maxPitch!==y&&(this._maxPitch=y,this.setPitch(Math.min(this.pitch,y)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(y){y===void 0?y=!0:y===null&&(y=!1),this._renderWorldCopies=y}get constrainOverride(){return this._constrainOverride}setConstrainOverride(y){y===void 0&&(y=null),this._constrainOverride!==y&&(this._constrainOverride=y,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(y){let O=e.X(y,-180,180)*Math.PI/180;var ie,ce,_e,De,Ne,Ye,lt,ct,Ft;this._bearingInRadians!==O&&(this._unmodified=!1,this._bearingInRadians=O,this._calcMatrices(),this._rotationMatrix=a(),ie=this._rotationMatrix,_e=-this._bearingInRadians,De=(ce=this._rotationMatrix)[0],Ne=ce[1],Ye=ce[2],lt=ce[3],ct=Math.sin(_e),Ft=Math.cos(_e),ie[0]=De*Ft+Ye*ct,ie[1]=Ne*Ft+lt*ct,ie[2]=De*-ct+Ye*Ft,ie[3]=Ne*-ct+lt*Ft)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(y){let O=e.al(y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==O&&(this._unmodified=!1,this._pitchInRadians=O,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(y){let O=y/180*Math.PI;this._rollInRadians!==O&&(this._unmodified=!1,this._rollInRadians=O,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return e.aX(this._fovInRadians)}setFov(y){y=e.al(y,.1,150),this.fov!==y&&(this._unmodified=!1,this._fovInRadians=e.an(y),this._calcMatrices())}get zoom(){return this._zoom}setZoom(y){let O=this.applyConstrain(this._center,y).zoom;this._zoom!==O&&(this._unmodified=!1,this._zoom=O,this._tileZoom=Math.max(0,Math.floor(O)),this._scale=e.ao(O),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(y){y.lat===this._center.lat&&y.lng===this._center.lng||(this._unmodified=!1,this._center=y,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(y){y!==this._elevation&&(this._elevation=y,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(y){this._edgeInsets.equals(y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,y,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(y,O){this._autoCalculateNearFarZ=!1,this._nearZ=y,this._farZ=O,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(y){return this._edgeInsets.equals(y)}interpolatePadding(y,O,ie){this._unmodified=!1,this._edgeInsets.interpolate(y,O,ie),this.constrainInternal(),this._calcMatrices()}resize(y,O,ie=!0){this._width=y,this._height=O,ie&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var y,O;return((y=this._latRange)===null||y===void 0?void 0:y.length)!==2||((O=this._lngRange)===null||O===void 0?void 0:O.length)!==2?null:new q([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(y){y?(this._lngRange=[y.getWest(),y.getEast()],this._latRange=[y.getSouth(),y.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-e.am,e.am])}getCameraQueryGeometry(y,O){if(O.length===1)return[O[0],y];{let{minX:ie,minY:ce,maxX:_e,maxY:De}=e.a8.fromPoints(O).extend(y);return[new e.P(ie,ce),new e.P(_e,ce),new e.P(_e,De),new e.P(ie,De),new e.P(ie,ce)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let y=this._unmodified,{center:O,zoom:ie}=this.applyConstrain(this.center,this.zoom);this.setCenter(O),this.setZoom(ie),this._unmodified=y,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let y=e.ap(new Float64Array(16));e.S(y,y,[this._width/2,-this._height/2,1]),e.Q(y,y,[1,-1,0]),this._clipSpaceToPixelsMatrix=y,y=e.ap(new Float64Array(16)),e.S(y,y,[1,-1,1]),e.Q(y,y,[-1,-1,0]),e.S(y,y,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=y,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(y,O,ie,ce){let _e=ie!==void 0?ie:this.bearing,De=ce=ce!==void 0?ce:this.pitch,{distanceToCenter:Ne,clampedElevation:Ye}=this._distanceToCenterFromAltElevationPitch(O,this.elevation,De),{x:lt,y:ct}=vt(De,_e),Ft=e.a7.fromLngLat(y,O),Gt,Jt,it=e.aY(1,Ft.y),Rt=0;do{if(Rt+=1,Rt>10)break;Jt=Ne/it,Gt=new e.a7(Ft.x+lt*Jt,Ft.y+ct*Jt),it=1/Gt.meterInMercatorCoordinateUnits()}while(Math.abs(Ne-Jt*it)>1e-12);return{center:Gt.toLngLat(),elevation:Ye,zoom:e.ar(this.height/2/Math.tan(this.fovInRadians/2)/Jt/this.tileSize)}}recalculateZoomAndCenter(y){if(this.elevation-y==0)return;let O=1/this.worldSize,ie=e.aq(1,this.center.lat)*this.worldSize,ce=e.a7.fromLngLat(this.center,this.elevation),_e=ce.x/O,De=ce.y/O,Ne=ce.z/O,Ye=this.pitch,lt=this.bearing,{x:ct,y:Ft,z:Gt}=vt(Ye,lt),Jt=this.cameraToCenterDistance,it=_e+Jt*-ct,Rt=De+Jt*-Ft,qt=Ne+Jt*Gt,{distanceToCenter:or,clampedElevation:vr}=this._distanceToCenterFromAltElevationPitch(qt/ie,y,Ye),Ar=or*ie,dr=new e.a7((it+ct*Ar)*O,(Rt+Ft*Ar)*O,0).toLngLat(),mr=e.aq(1,dr.lat),qr=e.ar(this.height/2/Math.tan(this.fovInRadians/2)/or/mr/this.tileSize);this._elevation=vr,this._center=dr,this.setZoom(qr)}_distanceToCenterFromAltElevationPitch(y,O,ie){let ce=-Math.cos(e.an(ie)),_e=y-O,De,Ne=O;return ce*_e>=0||Math.abs(ce)<.1?(De=1e4,Ne=y+De*ce):De=-_e/ce,{distanceToCenter:De,clampedElevation:Ne}}getCameraPoint(){let y=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(y*Math.sin(this.rollInRadians),y*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/y).toLngLat()}getMercatorTileCoordinates(y){if(!y)return[0,0,1,1];let O=y.canonical.z>=0?1<this.max[0]||y.aabb.min[1]>this.max[1]||y.aabb.min[2]>this.max[2]||y.aabb.max[0]0?(O+=y[ce]*this.min[ce],ie+=y[ce]*this.max[ce]):(ie+=y[ce]*this.min[ce],O+=y[ce]*this.max[ce]);return O>=0?2:ie<0?0:1}}class Ho{distanceToTile2d(y,O,ie,ce){let _e=ce,De=_e.distanceX([y,O]),Ne=_e.distanceY([y,O]);return Math.hypot(De,Ne)}getWrap(y,O,ie){return ie}getTileBoundingVolume(y,O,ie,ce){var _e,De;let Ne=0,Ye=0;if(ce?.terrain){let ct=new e.a3(y.z,O,y.z,y.x,y.y),Ft=ce.terrain.getMinMaxElevation(ct);Ne=(_e=Ft.minElevation)!==null&&_e!==void 0?_e:Math.min(0,ie),Ye=(De=Ft.maxElevation)!==null&&De!==void 0?De:Math.max(0,ie)}let lt=1<ce}allowWorldCopies(){return!0}prepareNextFrame(){}}class Io{constructor(y,O,ie){this.points=y,this.planes=O,this.aabb=ie}static fromInvProjectionMatrix(y,O=1,ie=0,ce,_e){let De=_e?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Ne=Math.pow(2,ie),Ye=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Gt=>function(Jt,it,Rt,qt){let or=e.aE([],Jt,it),vr=1/or[3]/Rt*qt;return e.b4(or,or,[vr,vr,1/or[3],vr])}(Gt,y,O,Ne));ce&&function(Gt,Jt,it,Rt){let qt=Rt?4:0,or=Rt?0:4,vr=0,Ar=[],dr=[];for(let Lr=0;Lr<4;Lr++){let cn=e.b0([],Gt[Lr+or],Gt[Lr+qt]),Nn=e.b5(cn);e.aZ(cn,cn,1/Nn),Ar.push(Nn),dr.push(cn)}for(let Lr=0;Lr<4;Lr++){let cn=e.b6(Gt[Lr+qt],dr[Lr],it);vr=cn!==null&&cn>=0?Math.max(vr,cn):Math.max(vr,Ar[Lr])}let mr=function(Lr,cn){let Nn=e.b0([],Lr[cn[0]],Lr[cn[1]]),Dn=e.b0([],Lr[cn[2]],Lr[cn[1]]),qn=[0,0,0,0];return e.b1(qn,e.b2([],Nn,Dn)),qn[3]=-e.b3(qn,Lr[cn[0]]),qn}(Gt,Jt),qr=function(Lr,cn){let Nn=e.b7(Lr),Dn=e.b8([],Lr,1/Nn),qn=e.b0([],cn,e.aZ([],Dn,e.b3(cn,Dn))),_n=e.b7(qn);if(_n>0){let vn=Math.sqrt(1-Dn[3]*Dn[3]),Sn=e.aZ([],Dn,-Dn[3]),Tn=e.a_([],Sn,e.aZ([],qn,vn/_n));return e.b9(cn,Tn)}return null}(it,mr);if(qr!==null){let Lr=qr/e.b3(dr[0],mr);vr=Math.min(vr,Lr)}for(let Lr=0;Lr<4;Lr++){let cn=Math.min(vr,Ar[Lr]);Gt[Lr+or]=[Gt[Lr+qt][0]+dr[Lr][0]*cn,Gt[Lr+qt][1]+dr[Lr][1]*cn,Gt[Lr+qt][2]+dr[Lr][2]*cn,1]}}(Ye,De[0],ce,_e);let lt=De.map(Gt=>{let Jt=e.b0([],Ye[Gt[0]],Ye[Gt[1]]),it=e.b0([],Ye[Gt[2]],Ye[Gt[1]]),Rt=e.b1([],e.b2([],Jt,it)),qt=-e.b3(Rt,Ye[Gt[1]]);return Rt.concat(qt)}),ct=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],Ft=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let Gt of Ye)for(let Jt=0;Jt<3;Jt++)ct[Jt]=Math.min(ct[Jt],Gt[Jt]),Ft[Jt]=Math.max(Ft[Jt],Gt[Jt]);return new Io(Ye,lt,new Wi(ct,Ft))}}class qo{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,O,ie){this._helper.interpolatePadding(y,O,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,O,ie=!0){this._helper.resize(y,O,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,O){this._helper.overrideNearFarZ(y,O)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(y,O){}constructor(y){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(O,ie)=>{ie=e.al(+ie,this.minZoom,this.maxZoom);let ce={center:new e.W(O.lng,O.lat),zoom:ie},_e=this._helper._lngRange;if(!this._helper._renderWorldCopies&&_e===null){let dr=179.9999999999;_e=[-dr,dr]}let De=this.tileSize*e.ao(ce.zoom),Ne=0,Ye=De,lt=0,ct=De,Ft=0,Gt=0,{x:Jt,y:it}=this.size;if(this._helper._latRange){let dr=this._helper._latRange;Ne=e.Y(dr[1])*De,Ye=e.Y(dr[0])*De,Ye-NeYe&&(vr=Ye-dr)}if(_e){let dr=(lt+ct)/2,mr=Rt;this._helper._renderWorldCopies&&(mr=e.X(Rt,dr-De/2,dr+De/2));let qr=Jt/2;mr-qrct&&(or=ct-qr)}if(or!==void 0||vr!==void 0){let dr=new e.P(or??Rt,vr??qt);ce.center=_r(De,dr).wrap()}return ce},this.applyConstrain=(O,ie)=>this._helper.applyConstrain(O,ie),this._helper=new co({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(O,ie)=>this.defaultConstrain(O,ie)},y),this._coveringTilesDetailsProvider=new Ho}clone(){let y=new qo;return y.apply(this,!1),y}apply(y,O,ie){this._helper.apply(y,O,ie)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(y){let O=[new e.ba(0,y)];if(this._helper._renderWorldCopies){let ie=this.screenPointToMercatorCoordinate(new e.P(0,0)),ce=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,0)),_e=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,this._helper._height)),De=this.screenPointToMercatorCoordinate(new e.P(0,this._helper._height)),Ne=Math.floor(Math.min(ie.x,ce.x,_e.x,De.x)),Ye=Math.floor(Math.max(ie.x,ce.x,_e.x,De.x)),lt=1;for(let ct=Ne-lt;ct<=Ye+lt;ct++)ct!==0&&O.push(new e.ba(ct,y))}return O}getCameraFrustum(){return Io.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(y){let O=this.screenPointToLocation(this.centerPoint,y),ie=y?y.getElevationForLngLatZoom(O,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(ie)}setLocationAtPoint(y,O){let ie=e.aq(this.elevation,this.center.lat),ce=this.screenPointToMercatorCoordinateAtZ(O,ie),_e=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,ie),De=e.a7.fromLngLat(y),Ne=new e.a7(De.x-(ce.x-_e.x),De.y-(ce.y-_e.y));this.setCenter(Ne?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(y,O){return O?this.coordinatePoint(e.a7.fromLngLat(y),O.getElevationForLngLat(y,this),this._pixelMatrix3D):this.coordinatePoint(e.a7.fromLngLat(y))}screenPointToLocation(y,O){var ie;return(ie=this.screenPointToMercatorCoordinate(y,O))===null||ie===void 0?void 0:ie.toLngLat()}screenPointToMercatorCoordinate(y,O){if(O){let ie=O.pointCoordinate(y);if(ie!=null)return ie}return this.screenPointToMercatorCoordinateAtZ(y)}screenPointToMercatorCoordinateAtZ(y,O){let ie=O||0,ce=[y.x,y.y,0,1],_e=[y.x,y.y,1,1];e.aE(ce,ce,this._pixelMatrixInverse),e.aE(_e,_e,this._pixelMatrixInverse);let De=ce[3],Ne=_e[3],Ye=ce[1]/De,lt=_e[1]/Ne,ct=ce[2]/De,Ft=_e[2]/Ne,Gt=ct===Ft?0:(ie-ct)/(Ft-ct);return new e.a7(e.H.number(ce[0]/De,_e[0]/Ne,Gt)/this.worldSize,e.H.number(Ye,lt,Gt)/this.worldSize,ie)}coordinatePoint(y,O=0,ie=this._pixelMatrix){let ce=[y.x*this.worldSize,y.y*this.worldSize,O,1];return e.aE(ce,ce,ie),new e.P(ce[0]/ce[3],ce[1]/ce[3])}getBounds(){let y=Math.max(0,this._helper._height/2-Zt(this));return new q().extend(this.screenPointToLocation(new e.P(0,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new e.P(0,this._helper._height)))}isPointOnMapSurface(y,O){return O?O.pointCoordinate(y)!=null:y.y>this.height/2-Zt(this)}calculatePosMatrix(y,O=!1,ie){var ce;let _e=(ce=y.key)!==null&&ce!==void 0?ce:e.bb(y.wrap,y.canonical.z,y.canonical.z,y.canonical.x,y.canonical.y),De=O?this._alignedPosMatrixCache:this._posMatrixCache;if(De.has(_e)){let lt=De.get(_e);return ie?lt.f32:lt.f64}let Ne=sr(y,this.worldSize);e.U(Ne,O?this._alignedProjMatrix:this._viewProjMatrix,Ne);let Ye={f64:Ne,f32:new Float32Array(Ne)};return De.set(_e,Ye),ie?Ye.f32:Ye.f64}calculateFogMatrix(y){let O=y.key,ie=this._fogMatrixCacheF32;if(ie.has(O))return ie.get(O);let ce=sr(y,this.worldSize);return e.U(ce,this._fogMatrix,ce),ie.set(O,new Float32Array(ce)),ie.get(O)}calculateCenterFromCameraLngLatAlt(y,O,ie,ce){return this._helper.calculateCenterFromCameraLngLatAlt(y,O,ie,ce)}_calculateNearFarZIfNeeded(y,O,ie){if(!this._helper.autoCalculateNearFarZ)return;let ce=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),_e=y-ce*this._helper._pixelPerMeter/Math.cos(O),De=ce<0?_e:y,Ne=Math.PI/2+this.pitchInRadians,Ye=e.an(this.fov)*(Math.abs(Math.cos(e.an(this.roll)))*this.height+Math.abs(Math.sin(e.an(this.roll)))*this.width)/this.height*(.5+ie.y/this.height),lt=Math.sin(Ye)*De/Math.sin(e.al(Math.PI-Ne-Ye,.01,Math.PI-.01)),ct=Zt(this),Ft=Math.atan(ct/this._helper.cameraToCenterDistance),Gt=e.an(.75),Jt=Ft>Gt?2*Ft*(.5+ie.y/(2*ct)):Gt,it=Math.sin(Jt)*De/Math.sin(e.al(Math.PI-Ne-Jt,.01,Math.PI-.01)),Rt=Math.min(lt,it);this._helper._farZ=1.01*(Math.cos(Math.PI/2-O)*Rt+De),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let y=this.centerOffset,O=nr(this.worldSize,this.center),ie=O.x,ce=O.y;this._helper._pixelPerMeter=e.aq(1,this.center.lat)*this.worldSize;let _e=e.an(Math.min(this.pitch,Kt)),De=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(_e)),Ne;var Ye,lt;this._calculateNearFarZIfNeeded(De,_e,y),Ne=new Float64Array(16),e.bc(Ne,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(Ye=this._invProjMatrix)[0]=1/(lt=Ne)[0],Ye[1]=0,Ye[2]=0,Ye[3]=0,Ye[4]=0,Ye[5]=1/lt[5],Ye[6]=0,Ye[7]=0,Ye[8]=0,Ye[9]=0,Ye[10]=0,Ye[11]=1/lt[14],Ye[12]=0,Ye[13]=0,Ye[14]=-1,Ye[15]=lt[10]/lt[14],Ne[8]=2*-y.x/this._helper._width,Ne[9]=2*y.y/this._helper._height,this._projectionMatrix=e.bd(Ne),e.S(Ne,Ne,[1,-1,1]),e.Q(Ne,Ne,[0,0,-this._helper.cameraToCenterDistance]),e.be(Ne,Ne,-this.rollInRadians),e.bf(Ne,Ne,this.pitchInRadians),e.be(Ne,Ne,-this.bearingInRadians),e.Q(Ne,Ne,[-ie,-ce,0]),this._mercatorMatrix=e.S([],Ne,[this.worldSize,this.worldSize,this.worldSize]),e.S(Ne,Ne,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,Ne),e.Q(Ne,Ne,[0,0,-this.elevation]),this._viewProjMatrix=Ne,this._invViewProjMatrix=e.bg([],Ne);let ct=[0,0,-1,1];e.aE(ct,ct,this._invViewProjMatrix),this._cameraPosition=[ct[0]/ct[3],ct[1]/ct[3],ct[2]/ct[3]],this._fogMatrix=new Float64Array(16),e.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,De,this._helper._farZ),this._fogMatrix[8]=2*-y.x/this.width,this._fogMatrix[9]=2*y.y/this.height,e.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),e.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),e.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),e.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),e.Q(this._fogMatrix,this._fogMatrix,[-ie,-ce,0]),e.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,Ne);let Ft=this._helper._width%2/2,Gt=this._helper._height%2/2,Jt=Math.cos(this.bearingInRadians),it=Math.sin(-this.bearingInRadians),Rt=ie-Math.round(ie)+Jt*Ft+it*Gt,qt=ce-Math.round(ce)+Jt*Gt+it*Ft,or=new Float64Array(Ne);if(e.Q(or,or,[Rt>.5?Rt-1:Rt,qt>.5?qt-1:qt,0]),this._alignedProjMatrix=or,Ne=e.bg(new Float64Array(16),this._pixelMatrix),!Ne)throw new Error("failed to invert matrix");this._pixelMatrixInverse=Ne,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let y=this.screenPointToMercatorCoordinate(new e.P(0,0)),O=[y.x*this.worldSize,y.y*this.worldSize,0,1];return e.aE(O,O,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/y).toLngLat()}lngLatToCameraDepth(y,O){let ie=e.a7.fromLngLat(y),ce=[ie.x*this.worldSize,ie.y*this.worldSize,O,1];return e.aE(ce,ce,this._viewProjMatrix),ce[2]/ce[3]}getProjectionData(y){let{overscaledTileID:O,aligned:ie,applyTerrainMatrix:ce}=y,_e=this._helper.getMercatorTileCoordinates(O),De=O?this.calculatePosMatrix(O,ie,!0):null,Ne;return Ne=O?.terrainRttPosMatrix32f&&ce?O.terrainRttPosMatrix32f:De||e.bh(),{mainMatrix:Ne,tileMercatorCoords:_e,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:Ne}}isLocationOccluded(y){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(y,O,ie){return 1}transformLightDirection(y){return e.a$(y)}getRayDirectionFromPixel(y){throw new Error("Not implemented.")}projectTileCoordinates(y,O,ie,ce){let _e=this.calculatePosMatrix(ie),De;ce?(De=[y,O,ce(y,O),1],e.aE(De,De,_e)):(De=[y,O,0,1],Kn(De,De,_e));let Ne=De[3];return{point:new e.P(De[0]/Ne,De[1]/Ne),signedDistanceFromCamera:Ne,isOccluded:!1}}populateCache(y){for(let O of y)this.calculatePosMatrix(O)}getMatrixForModel(y,O){let ie=e.a7.fromLngLat(y,O),ce=ie.meterInMercatorCoordinateUnits(),_e=e.bi();return e.Q(_e,_e,[ie.x,ie.y,ie.z]),e.be(_e,_e,Math.PI),e.bf(_e,_e,Math.PI/2),e.S(_e,_e,[-ce,ce,ce]),_e}getProjectionDataForCustomLayer(y=!0){let O=new e.a3(0,0,0,0,0),ie=this.getProjectionData({overscaledTileID:O,applyGlobeMatrix:y}),ce=sr(O,this.worldSize);e.U(ce,this._viewProjMatrix,ce),ie.tileMercatorCoords=[0,0,1,1];let _e=[e.a6,e.a6,this.worldSize/this._helper.pixelsPerMeter],De=e.bj();return e.S(De,ce,_e),ie.fallbackMatrix=De,ie.mainMatrix=De,ie}getFastPathSimpleProjectionMatrix(y){return this.calculatePosMatrix(y)}}function Oo(){e.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function ws(de){if(de.useSlerp)if(de.k<1){let y=e.bk(de.startEulerAngles.roll,de.startEulerAngles.pitch,de.startEulerAngles.bearing),O=e.bk(de.endEulerAngles.roll,de.endEulerAngles.pitch,de.endEulerAngles.bearing),ie=new Float64Array(4);e.bl(ie,y,O,de.k);let ce=e.bm(ie);de.tr.setRoll(ce.roll),de.tr.setPitch(ce.pitch),de.tr.setBearing(ce.bearing)}else de.tr.setRoll(de.endEulerAngles.roll),de.tr.setPitch(de.endEulerAngles.pitch),de.tr.setBearing(de.endEulerAngles.bearing);else de.tr.setRoll(e.H.number(de.startEulerAngles.roll,de.endEulerAngles.roll,de.k)),de.tr.setPitch(e.H.number(de.startEulerAngles.pitch,de.endEulerAngles.pitch,de.k)),de.tr.setBearing(e.H.number(de.startEulerAngles.bearing,de.endEulerAngles.bearing,de.k))}function Ko(de,y,O,ie,ce){let _e=ce.padding,De=nr(ce.worldSize,O.getNorthWest()),Ne=nr(ce.worldSize,O.getNorthEast()),Ye=nr(ce.worldSize,O.getSouthEast()),lt=nr(ce.worldSize,O.getSouthWest()),ct=e.an(-ie),Ft=De.rotate(ct),Gt=Ne.rotate(ct),Jt=Ye.rotate(ct),it=lt.rotate(ct),Rt=new e.P(Math.max(Ft.x,Gt.x,it.x,Jt.x),Math.max(Ft.y,Gt.y,it.y,Jt.y)),qt=new e.P(Math.min(Ft.x,Gt.x,it.x,Jt.x),Math.min(Ft.y,Gt.y,it.y,Jt.y)),or=Rt.sub(qt),vr=(ce.width-(_e.left+_e.right+y.left+y.right))/or.x,Ar=(ce.height-(_e.top+_e.bottom+y.top+y.bottom))/or.y;if(Ar<0||vr<0)return void Oo();let dr=Math.min(e.ar(ce.scale*Math.min(vr,Ar)),de.maxZoom),mr=e.P.convert(de.offset),qr=new e.P((y.left-y.right)/2,(y.top-y.bottom)/2).rotate(e.an(ie)),Lr=mr.add(qr).mult(ce.scale/e.ao(dr));return{center:_r(ce.worldSize,De.add(Ye).div(2).sub(Lr)),zoom:dr,bearing:ie}}class ns{get useGlobeControls(){return!1}handlePanInertia(y,O){let ie=y.mag(),ce=Math.abs(Zt(O));return{easingOffset:y.mult(Math.min(.75*ce/ie,1)),easingCenter:O.center}}handleMapControlsRollPitchBearingZoom(y,O){y.bearingDelta&&O.setBearing(O.bearing+y.bearingDelta),y.pitchDelta&&O.setPitch(O.pitch+y.pitchDelta),y.rollDelta&&O.setRoll(O.roll+y.rollDelta),y.zoomDelta&&O.setZoom(O.zoom+y.zoomDelta)}handleMapControlsPan(y,O,ie){y.around.distSqr(O.centerPoint)<.01||O.setLocationAtPoint(ie,y.around)}cameraForBoxAndBearing(y,O,ie,ce,_e){return Ko(y,O,ie,ce,_e)}handleJumpToCenterZoom(y,O){y.zoom!==(O.zoom!==void 0?+O.zoom:y.zoom)&&y.setZoom(+O.zoom),O.center!==void 0&&y.setCenter(e.W.convert(O.center))}handleEaseTo(y,O){let ie=y.zoom,ce=y.padding,_e={roll:y.roll,pitch:y.pitch,bearing:y.bearing},De={roll:O.roll===void 0?y.roll:O.roll,pitch:O.pitch===void 0?y.pitch:O.pitch,bearing:O.bearing===void 0?y.bearing:O.bearing},Ne=O.zoom!==void 0,Ye=!y.isPaddingEqual(O.padding),lt=!1,ct=Ne?+O.zoom:y.zoom,Ft=y.centerPoint.add(O.offsetAsPoint),Gt=y.screenPointToLocation(Ft),{center:Jt,zoom:it}=y.applyConstrain(e.W.convert(O.center||Gt),ct??ie);oi(y,Jt);let Rt=nr(y.worldSize,Gt),qt=nr(y.worldSize,Jt).sub(Rt),or=e.ao(it-ie);return lt=it!==ie,{easeFunc:vr=>{if(lt&&y.setZoom(e.H.number(ie,it,vr)),e.bn(_e,De)||ws({startEulerAngles:_e,endEulerAngles:De,tr:y,k:vr,useSlerp:_e.roll!=De.roll}),Ye&&(y.interpolatePadding(ce,O.padding,vr),Ft=y.centerPoint.add(O.offsetAsPoint)),O.around)y.setLocationAtPoint(O.around,O.aroundPoint);else{let Ar=e.ao(y.zoom-ie),dr=it>ie?Math.min(2,or):Math.max(.5,or),mr=Math.pow(dr,1-vr),qr=_r(y.worldSize,Rt.add(qt.mult(vr*mr)).mult(Ar));y.setLocationAtPoint(y.renderWorldCopies?qr.wrap():qr,Ft)}},isZooming:lt,elevationCenter:Jt}}handleFlyTo(y,O){let ie=O.zoom!==void 0,ce=y.zoom,_e=y.applyConstrain(e.W.convert(O.center||O.locationAtOffset),ie?+O.zoom:ce),De=_e.center,Ne=_e.zoom;oi(y,De);let Ye=nr(y.worldSize,O.locationAtOffset),lt=nr(y.worldSize,De).sub(Ye),ct=lt.mag(),Ft=e.ao(Ne-ce),Gt;if(O.minZoom!==void 0){let Jt=Math.min(+O.minZoom,ce,Ne),it=y.applyConstrain(De,Jt).zoom;Gt=e.ao(it-ce)}return{easeFunc:(Jt,it,Rt,qt)=>{y.setZoom(Jt===1?Ne:ce+e.ar(it));let or=Jt===1?De:_r(y.worldSize,Ye.add(lt.mult(Rt)).mult(it));y.setLocationAtPoint(y.renderWorldCopies?or.wrap():or,qt)},scaleOfZoom:Ft,targetCenter:De,scaleOfMinZoom:Gt,pixelPathLength:ct}}}class wo{constructor(y,O,ie){this.blendFunction=y,this.blendColor=O,this.mask=ie}}wo.Replace=[1,0],wo.disabled=new wo(wo.Replace,e.bo.transparent,[!1,!1,!1,!1]),wo.unblended=new wo(wo.Replace,e.bo.transparent,[!0,!0,!0,!0]),wo.alphaBlended=new wo([1,771],e.bo.transparent,[!0,!0,!0,!0]);let No=2305;class Di{constructor(y,O,ie){this.enable=y,this.mode=O,this.frontFace=ie}}Di.disabled=new Di(!1,1029,No),Di.backCCW=new Di(!0,1029,No),Di.frontCCW=new Di(!0,1028,No);class lo{constructor(y,O,ie){this.func=y,this.mask=O,this.range=ie}}lo.ReadOnly=!1,lo.ReadWrite=!0,lo.disabled=new lo(519,lo.ReadOnly,[0,1]);let Go=7680;class mo{constructor(y,O,ie,ce,_e,De){this.test=y,this.ref=O,this.mask=ie,this.fail=ce,this.depthFail=_e,this.pass=De}}function us(de){return typeof WebGL2RenderingContext<"u"&&de instanceof WebGL2RenderingContext}mo.disabled=new mo({func:519,mask:0},0,0,Go,Go,Go);class Jo{get awaitingQuery(){return!!this._readbackQueue}constructor(y){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=y;let O=y.context,ie=O.gl;this._texFormat=ie.RGBA,this._texType=ie.UNSIGNED_BYTE;let ce=new e.aU;ce.emplaceBack(-1,-1),ce.emplaceBack(2,-1),ce.emplaceBack(-1,2);let _e=new e.aW;_e.emplaceBack(0,1,2),this._fullscreenTriangle=new fi(O.createVertexBuffer(ce,xo.members),O.createIndexBuffer(_e),e.aV.simpleSegment(0,0,ce.length,_e.length)),this._resultBuffer=new Uint8Array(4),O.activeTexture.set(ie.TEXTURE1);let De=ie.createTexture();ie.bindTexture(ie.TEXTURE_2D,De),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_S,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_T,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MIN_FILTER,ie.NEAREST),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MAG_FILTER,ie.NEAREST),ie.texImage2D(ie.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=O.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(De),us(ie)&&(this._pbo=ie.createBuffer(),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,this._pbo),ie.bufferData(ie.PIXEL_PACK_BUFFER,4,ie.STREAM_READ),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,null))}destroy(){let y=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),y.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(y,O){let ie=this._updateCount;return this._readbackQueue?ie>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():ie>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(y,O),this._updateCount++,this._measuredError}_bindFramebuffer(){let y=this._cachedRenderContext.context,O=y.gl;y.activeTexture.set(O.TEXTURE1),O.bindTexture(O.TEXTURE_2D,this._fbo.colorAttachment.get()),y.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(y,O){let ie=this._cachedRenderContext.context,ce=ie.gl;if(this._bindFramebuffer(),ie.viewport.set([0,0,this._texWidth,this._texHeight]),ie.clear({color:e.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(ie,ce.TRIANGLES,lo.disabled,mo.disabled,wo.unblended,Di.disabled,((_e,De)=>({u_input:_e,u_output_expected:De}))(y,O),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&us(ce)){ce.bindBuffer(ce.PIXEL_PACK_BUFFER,this._pbo),ce.readBuffer(ce.COLOR_ATTACHMENT0),ce.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),ce.bindBuffer(ce.PIXEL_PACK_BUFFER,null);let _e=ce.fenceSync(ce.SYNC_GPU_COMMANDS_COMPLETE,0);ce.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:_e}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let y=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&us(y)){let O=y.clientWaitSync(this._readbackQueue.sync,0,0);if(O===y.WAIT_FAILED)return e.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(O===y.TIMEOUT_EXPIRED)return;y.bindBuffer(y.PIXEL_PACK_BUFFER,this._pbo),y.getBufferSubData(y.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),y.bindBuffer(y.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),y.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=Jo._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(y){let O=0;return O+=y[0]/256,O+=y[1]/65536,O+=y[2]/16777216,y[3]<127&&(O=-O),O/128}}let zs=e.a6/128;function Is(de,y){let O=de.granularity!==void 0?Math.max(de.granularity,1):1,ie=O+(de.generateBorders?2:0),ce=O+(de.extendToNorthPole||de.generateBorders?1:0)+(de.extendToSouthPole||de.generateBorders?1:0),_e=ie+1,De=ce+1,Ne=de.generateBorders?-1:0,Ye=de.generateBorders||de.extendToNorthPole?-1:0,lt=O+(de.generateBorders?1:0),ct=O+(de.generateBorders||de.extendToSouthPole?1:0),Ft=_e*De,Gt=ie*ce*6,Jt=_e*De>65536;if(Jt&&y==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let it=Jt||y==="32bit",Rt=new Int16Array(2*Ft),qt=0;for(let Ar=Ye;Ar<=ct;Ar++)for(let dr=Ne;dr<=lt;dr++){let mr=dr/O*e.a6;dr===-1&&(mr=-zs),dr===O+1&&(mr=e.a6+zs);let qr=Ar/O*e.a6;Ar===-1&&(qr=de.extendToNorthPole?e.bq:-zs),Ar===O+1&&(qr=de.extendToSouthPole?e.br:e.a6+zs),Rt[qt++]=mr,Rt[qt++]=qr}let or=it?new Uint32Array(Gt):new Uint16Array(Gt),vr=0;for(let Ar=0;Ar0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(y){this._mercatorProjection.updateGPUdependent(y),this._verticalPerspectiveProjection.updateGPUdependent(y)}getMeshFromTileID(y,O,ie,ce,_e){return this.currentProjection.getMeshFromTileID(y,O,ie,ce,_e)}setProjection(y){this._transitionable.setValue("type",y?.type||"mercator")}updateTransitions(y){this._transitioning=this._transitionable.transitioned(y,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(y){this.properties=this._transitioning.possiblyEvaluate(y)}setErrorQueryLatitudeDegrees(y){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(y),this._mercatorProjection.setErrorQueryLatitudeDegrees(y)}}function Fo(de){let y=Ls(de.worldSize,de.center.lat);return 2*Math.PI*y}function Ji(de,y,O,ie,ce){let _e=1/(1<1e-6){let ie=de[0]/O,ce=Math.acos(de[2]/O),_e=(ie>0?ce:-ce)/Math.PI*180;return new e.W(e.X(_e,-180,180),y)}return new e.W(0,y)}function ml(de){return Math.cos(de*Math.PI/180)}function Ts(de,y){let O=ml(de),ie=ml(y);return e.ar(ie/O)}function yl(de,y){let O=de.rotate(y.bearingInRadians),ie=y.zoom+Ts(y.center.lat,0),ce=e.bt(1/ml(y.center.lat),1/ml(Math.min(Math.abs(y.center.lat),60)),e.bw(ie,7,3,0,1)),_e=360/Fo({worldSize:y.worldSize,center:{lat:y.center.lat}});return new e.W(y.center.lng-O.x*_e*ce,e.al(y.center.lat+O.y*_e,-e.am,e.am))}function mu(de){let y=.5*de,O=Math.sin(y),ie=Math.cos(y);return Math.log(O+ie)-Math.log(ie-O)}function su(de,y,O,ie){let ce=de.lat+O*ie;if(Math.abs(O)>1){let _e=(Math.sign(de.lat+O)!==Math.sign(de.lat)?-Math.abs(de.lat):Math.abs(de.lat))*Math.PI/180,De=Math.abs(de.lat+O)*Math.PI/180,Ne=mu(_e+ie*(De-_e)),Ye=mu(_e),lt=mu(De);return new e.W(de.lng+y*((Ne-Ye)/(lt-Ye)),ce)}return new e.W(de.lng+y*ie,ce)}class cc{constructor(y){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=y}swapBuffers(){if(!this._hadAnyChanges)return;let y=this._cachePrevious;this._cachePrevious=this._cache,this._cache=y,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(y,O,ie,ce){let _e=`${y.z}_${y.x}_${y.y}_${ce?.terrain?"t":""}`,De=this._cache.get(_e);if(De)return De;let Ne=this._cachePrevious.get(_e);if(Ne)return this._cache.set(_e,Ne),Ne;let Ye=this._boundingVolumeFactory(y,O,ie,ce);return this._cache.set(_e,Ye),this._hadAnyChanges=!0,Ye}}class Bl{constructor(y,O,ie,ce){this.min=ie,this.max=ce,this.points=y,this.planes=O}static fromAabb(y,O){let ie=[];for(let ce=0;ce<8;ce++)ie.push([1&~ce?y[0]:O[0],(ce>>1&1)==1?O[1]:y[1],(ce>>2&1)==1?O[2]:y[2]]);return new Bl(ie,[[-1,0,0,O[0]],[1,0,0,-y[0]],[0,-1,0,O[1]],[0,1,0,-y[1]],[0,0,-1,O[2]],[0,0,1,-y[2]]],y,O)}static fromCenterSizeAngles(y,O,ie){let ce=e.bA([],ie[0],ie[1],ie[2]),_e=e.bB([],[O[0],0,0],ce),De=e.bB([],[0,O[1],0],ce),Ne=e.bB([],[0,0,O[2]],ce),Ye=[...y],lt=[...y];for(let Ft=0;Ft<8;Ft++)for(let Gt=0;Gt<3;Gt++){let Jt=y[Gt]+_e[Gt]*(1&~Ft?-1:1)+De[Gt]*((Ft>>1&1)==1?1:-1)+Ne[Gt]*((Ft>>2&1)==1?1:-1);Ye[Gt]=Math.min(Ye[Gt],Jt),lt[Gt]=Math.max(lt[Gt],Jt)}let ct=[];for(let Ft=0;Ft<8;Ft++){let Gt=[...y];e.a_(Gt,Gt,e.aZ([],_e,1&~Ft?-1:1)),e.a_(Gt,Gt,e.aZ([],De,(Ft>>1&1)==1?1:-1)),e.a_(Gt,Gt,e.aZ([],Ne,(Ft>>2&1)==1?1:-1)),ct.push(Gt)}return new Bl(ct,[[..._e,-e.b3(_e,ct[0])],[...De,-e.b3(De,ct[0])],[...Ne,-e.b3(Ne,ct[0])],[-_e[0],-_e[1],-_e[2],-e.b3(_e,ct[7])],[-De[0],-De[1],-De[2],-e.b3(De,ct[7])],[-Ne[0],-Ne[1],-Ne[2],-e.b3(Ne,ct[7])]],Ye,lt)}intersectsFrustum(y){let O=!0,ie=this.points.length,ce=this.planes.length,_e=y.planes.length,De=y.points.length;for(let Ne=0;Ne<_e;Ne++){let Ye=y.planes[Ne],lt=0;for(let ct=0;ct=0&<++}if(lt===0)return 0;lt=0&<++}if(lt===0)return 0}return 1}intersectsPlane(y){let O=this.points.length,ie=0;for(let ce=0;ce=0&&ie++}return ie===O?2:ie===0?0:1}}function _l(de,y,O){let ie=de-y;return ie<0?-ie:Math.max(0,ie-O)}function ju(de,y,O,ie,ce){let _e=de-O,De;return De=_e<0?Math.min(-_e,1+_e-ce):_e>ce?Math.min(Math.max(_e-ce,0),1-_e):0,Math.max(De,_l(y,ie,ce))}class lu{constructor(){this._boundingVolumeCache=new cc(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(y,O,ie,ce){let _e=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(y,O,ie,ce){return this._boundingVolumeCache.getTileBoundingVolume(y,O,ie,ce)}_computeTileBoundingVolume(y,O,ie,ce){var _e,De;let Ne=0,Ye=0;if(ce?.terrain){let lt=new e.a3(y.z,O,y.z,y.x,y.y),ct=ce.terrain.getMinMaxElevation(lt);Ne=(_e=ct.minElevation)!==null&&_e!==void 0?_e:Math.min(0,ie),Ye=(De=ct.maxElevation)!==null&&De!==void 0?De:Math.max(0,ie)}if(Ne/=e.bD,Ye/=e.bD,Ne+=1,Ye+=1,y.z<=0)return Bl.fromAabb([-Ye,-Ye,-Ye],[Ye,Ye,Ye]);if(y.z===1)return Bl.fromAabb([y.x===0?-Ye:0,y.y===0?0:-Ye,-Ye],[y.x===0?0:Ye,y.y===0?Ye:0,Ye]);{let lt=[Ji(0,0,y.x,y.y,y.z),Ji(e.a6,0,y.x,y.y,y.z),Ji(e.a6,e.a6,y.x,y.y,y.z),Ji(0,e.a6,y.x,y.y,y.z)],ct=[];for(let qn of lt)ct.push(e.aZ([],qn,Ye));if(Ye!==Ne)for(let qn of lt)ct.push(e.aZ([],qn,Ne));y.y===0&&ct.push([0,1,0]),y.y===(1<=(1<{let ce=e.al(O.lat,-e.am,e.am),_e=e.al(+ie,this.minZoom+Ts(0,ce),this.maxZoom);return{center:new e.W(O.lng,ce),zoom:_e}},this.applyConstrain=(O,ie)=>this._helper.applyConstrain(O,ie),this._helper=new co({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(O,ie)=>this.defaultConstrain(O,ie)},y),this._coveringTilesDetailsProvider=new lu}clone(){let y=new As;return y.apply(this,!1),y}apply(y,O,ie){this._globeLatitudeErrorCorrectionRadians=ie||0,this._helper.apply(y,O)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let y=e.bz();return y[0]=this._cameraPosition[0],y[1]=this._cameraPosition[1],y[2]=this._cameraPosition[2],y}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(y){let{overscaledTileID:O,applyGlobeMatrix:ie}=y,ce=this._helper.getMercatorTileCoordinates(O);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:ce,clippingPlane:this._cachedClippingPlane,projectionTransition:ie?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(y){let O=this.pitchInRadians,ie=this.cameraToCenterDistance/y,ce=Math.sin(O)*ie,_e=Math.cos(O)*ie+1,De=1/Math.sqrt(ce*ce+_e*_e)*1,Ne=-ce,Ye=_e,lt=Math.sqrt(Ne*Ne+Ye*Ye);Ne/=lt,Ye/=lt;let ct=[0,Ne,Ye];e.bF(ct,ct,[0,0,0],-this.bearingInRadians),e.bG(ct,ct,[0,0,0],-1*this.center.lat*Math.PI/180),e.bH(ct,ct,[0,0,0],this.center.lng*Math.PI/180);let Ft=1/e.b5(ct);return e.aZ(ct,ct,Ft),[...ct,-De*Ft]}isLocationOccluded(y){return!this.isSurfacePointVisible(Ro(y))}transformLightDirection(y){let O=this._helper._center.lng*Math.PI/180,ie=this._helper._center.lat*Math.PI/180,ce=Math.cos(ie),_e=[Math.sin(O)*ce,Math.sin(ie),Math.cos(O)*ce],De=[_e[2],0,-_e[0]],Ne=[0,0,0];e.b2(Ne,De,_e),e.b1(De,De),e.b1(Ne,Ne);let Ye=[0,0,0];return e.b1(Ye,[De[0]*y[0]+Ne[0]*y[1]+_e[0]*y[2],De[1]*y[0]+Ne[1]*y[1]+_e[1]*y[2],De[2]*y[0]+Ne[2]*y[1]+_e[2]*y[2]]),Ye}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(y,O,ie){let ce=function(Ne,Ye,lt){let ct=1/(1<_e&&(_e=Gt),JtNe&&(Ne=Jt)}let ct=[lt.lng+De,lt.lat+Ye,lt.lng+_e,lt.lat+Ne];return this.isSurfacePointOnScreen([0,1,0])&&(ct[3]=90,ct[0]=-180,ct[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(ct[1]=-90,ct[0]=-180,ct[2]=180),new q(ct)}calculateCenterFromCameraLngLatAlt(y,O,ie,ce){return this._helper.calculateCenterFromCameraLngLatAlt(y,O,ie,ce)}setLocationAtPoint(y,O){let ie=Ro(this.unprojectScreenPoint(O)),ce=Ro(y),_e=e.bz();e.bK(_e);let De=e.bz();e.bH(De,ie,_e,-this.center.lng*Math.PI/180),e.bG(De,De,_e,this.center.lat*Math.PI/180);let Ne=ce[0]*ce[0]+ce[2]*ce[2],Ye=De[0]*De[0];if(Ne=-or&&it<=or,Ar=qt>=-or&&qt<=or,dr,mr;if(vr&&Ar){let Nn=this.center.lng*Math.PI/180,Dn=this.center.lat*Math.PI/180;e.bM(Ft,Nn)+e.bM(it,Dn)=0}isSurfacePointOnScreen(y){if(!this.isSurfacePointVisible(y))return!1;let O=e.bE();return e.aE(O,[...y,1],this._globeViewProjMatrixNoCorrection),O[0]/=O[3],O[1]/=O[3],O[2]/=O[3],O[0]>-1&&O[0]<1&&O[1]>-1&&O[1]<1&&O[2]>-1&&O[2]<1}rayPlanetIntersection(y,O){let ie=e.b3(y,O),ce=e.bz(),_e=e.bz();e.aZ(_e,O,ie),e.b0(ce,y,_e);let De=1-e.b3(ce,ce);if(De<0)return null;let Ne=e.b3(y,y)-1,Ye=-ie+(ie<0?1:-1)*Math.sqrt(De),lt=Ne/Ye,ct=Ye;return{tMin:Math.min(lt,ct),tMax:Math.max(lt,ct)}}unprojectScreenPoint(y){let O=this._cameraPosition,ie=this.getRayDirectionFromPixel(y),ce=this.rayPlanetIntersection(O,ie);if(ce){let ct=e.bz();e.a_(ct,O,[ie[0]*ce.tMin,ie[1]*ce.tMin,ie[2]*ce.tMin]);let Ft=e.bz();return e.b1(Ft,ct),zl(Ft)}let _e=this._cachedClippingPlane,De=_e[0]*ie[0]+_e[1]*ie[1]+_e[2]*ie[2],Ne=-e.b9(_e,O)/De,Ye=e.bz();if(Ne>0)e.a_(Ye,O,[ie[0]*Ne,ie[1]*Ne,ie[2]*Ne]);else{let ct=e.bz();e.a_(ct,O,[2*ie[0],2*ie[1],2*ie[2]]);let Ft=e.b9(this._cachedClippingPlane,ct);e.b0(Ye,ct,[this._cachedClippingPlane[0]*Ft,this._cachedClippingPlane[1]*Ft,this._cachedClippingPlane[2]*Ft])}let lt=function(ct){let Ft=e.bz();return Ft[0]=ct[0]*-ct[3],Ft[1]=ct[1]*-ct[3],Ft[2]=ct[2]*-ct[3],{center:Ft,radius:Math.sqrt(1-ct[3]*ct[3])}}(_e);return zl(function(ct,Ft,Gt){let Jt=e.bz();e.b0(Jt,Gt,ct);let it=e.bz();return e.bx(it,ct,Jt,Ft/e.b7(Jt)),it}(lt.center,lt.radius,Ye))}getMatrixForModel(y,O){let ie=e.W.convert(y),ce=1/e.bD,_e=e.bi();return e.bI(_e,_e,ie.lng/180*Math.PI),e.bf(_e,_e,-ie.lat/180*Math.PI),e.Q(_e,_e,[0,0,1+O/e.bD]),e.bf(_e,_e,.5*Math.PI),e.S(_e,_e,[ce,ce,ce]),_e}getProjectionDataForCustomLayer(y=!0){let O=this.getProjectionData({overscaledTileID:new e.a3(0,0,0,0,0),applyGlobeMatrix:y});return O.tileMercatorCoords=[0,0,1,1],O}getFastPathSimpleProjectionMatrix(y){}}class ms{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,O,ie){this._helper.interpolatePadding(y,O,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,O,ie=!0){this._helper.resize(y,O,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,O){this._helper.overrideNearFarZ(y,O)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(y,O){this._globeness=y,this._globeLatitudeErrorCorrectionRadians=O,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(y){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(O,ie)=>this.currentTransform.defaultConstrain(O,ie),this.applyConstrain=(O,ie)=>this._helper.applyConstrain(O,ie),this._helper=new co({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(O,ie)=>this.defaultConstrain(O,ie)},y),this._globeness=1,this._mercatorTransform=new qo,this._verticalPerspectiveTransform=new As}clone(){let y=new ms;return y._globeness=this._globeness,y._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,y.apply(this,!1),y}apply(y,O){this._helper.apply(y,O),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(y){let O=this._mercatorTransform.getProjectionData(y),ie=this._verticalPerspectiveTransform.getProjectionData(y);return{mainMatrix:this.isGlobeRendering?ie.mainMatrix:O.mainMatrix,clippingPlane:ie.clippingPlane,tileMercatorCoords:ie.tileMercatorCoords,projectionTransition:y.applyGlobeMatrix?this._globeness:0,fallbackMatrix:O.fallbackMatrix}}isLocationOccluded(y){return this.currentTransform.isLocationOccluded(y)}transformLightDirection(y){return this.currentTransform.transformLightDirection(y)}getPixelScale(){return e.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return e.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(y,O,ie){let ce=this._mercatorTransform.getPitchedTextCorrection(y,O,ie),_e=this._verticalPerspectiveTransform.getPitchedTextCorrection(y,O,ie);return e.bt(ce,_e,this._globeness)}projectTileCoordinates(y,O,ie,ce){return this.currentTransform.projectTileCoordinates(y,O,ie,ce)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(y){return this.currentTransform.calculateFogMatrix(y)}getVisibleUnwrappedCoordinates(y){return this.currentTransform.getVisibleUnwrappedCoordinates(y)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(y){this._mercatorTransform.recalculateZoomAndCenter(y),this._verticalPerspectiveTransform.recalculateZoomAndCenter(y)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(y,O){return this.currentTransform.lngLatToCameraDepth(y,O)}populateCache(y){this._mercatorTransform.populateCache(y),this._verticalPerspectiveTransform.populateCache(y)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(y,O,ie,ce){return this._helper.calculateCenterFromCameraLngLatAlt(y,O,ie,ce)}setLocationAtPoint(y,O){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(y,O),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(y,O),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(y,O){return this.currentTransform.locationToScreenPoint(y,O)}screenPointToMercatorCoordinate(y,O){return this.currentTransform.screenPointToMercatorCoordinate(y,O)}screenPointToLocation(y,O){return this.currentTransform.screenPointToLocation(y,O)}isPointOnMapSurface(y,O){return this.currentTransform.isPointOnMapSurface(y,O)}getRayDirectionFromPixel(y){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(y)}getMatrixForModel(y,O){return this.currentTransform.getMatrixForModel(y,O)}getProjectionDataForCustomLayer(y=!0){let O=this._mercatorTransform.getProjectionDataForCustomLayer(y);if(!this.isGlobeRendering)return O;let ie=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(y);return ie.fallbackMatrix=O.mainMatrix,ie}getFastPathSimpleProjectionMatrix(y){return this.currentTransform.getFastPathSimpleProjectionMatrix(y)}}class Ms{get useGlobeControls(){return!0}handlePanInertia(y,O){let ie=yl(y,O);return Math.abs(ie.lng-O.center.lng)>180&&(ie.lng=O.center.lng+179.5*Math.sign(ie.lng-O.center.lng)),{easingCenter:ie,easingOffset:new e.P(0,0)}}handleMapControlsRollPitchBearingZoom(y,O){let ie=y.around,ce=O.screenPointToLocation(ie);y.bearingDelta&&O.setBearing(O.bearing+y.bearingDelta),y.pitchDelta&&O.setPitch(O.pitch+y.pitchDelta),y.rollDelta&&O.setRoll(O.roll+y.rollDelta);let _e=O.zoom;y.zoomDelta&&O.setZoom(O.zoom+y.zoomDelta);let De=O.zoom-_e;if(De===0)return;let Ne=e.bJ(O.center.lng,ce.lng),Ye=Ne/(Math.abs(Ne/180)+1),lt=e.bJ(O.center.lat,ce.lat),ct=O.getRayDirectionFromPixel(ie),Ft=O.cameraPosition,Gt=-1*e.b3(Ft,ct),Jt=e.bz();e.a_(Jt,Ft,[ct[0]*Gt,ct[1]*Gt,ct[2]*Gt]);let it=e.b5(Jt)-1,Rt=Math.exp(.5*-Math.max(it-.3,0)),qt=Ls(O.worldSize,O.center.lat)/Math.min(O.width,O.height),or=e.bw(qt,.9,.5,1,.25),vr=(1-e.ao(-De))*Math.min(Rt,or),Ar=O.center.lat,dr=O.zoom,mr=new e.W(O.center.lng+Ye*vr,e.al(O.center.lat+lt*vr,-e.am,e.am));O.setLocationAtPoint(ce,ie);let qr=O.center,Lr=e.bw(Math.abs(Ne),45,85,0,1),cn=e.bw(qt,.75,.35,0,1),Nn=Math.pow(Math.max(Lr,cn),.25),Dn=e.bJ(qr.lng,mr.lng),qn=e.bJ(qr.lat,mr.lat);O.setCenter(new e.W(qr.lng+Dn*Nn,qr.lat+qn*Nn).wrap()),O.setZoom(dr+Ts(Ar,O.center.lat))}handleMapControlsPan(y,O,ie){if(!y.panDelta)return;let ce=O.center.lat,_e=O.zoom;O.setCenter(yl(y.panDelta,O).wrap()),O.setZoom(_e+Ts(ce,O.center.lat))}cameraForBoxAndBearing(y,O,ie,ce,_e){let De=Ko(y,O,ie,ce,_e),Ne=O.left/_e.width*2-1,Ye=(_e.width-O.right)/_e.width*2-1,lt=O.top/_e.height*-2+1,ct=(_e.height-O.bottom)/_e.height*-2+1,Ft=e.bJ(ie.getWest(),ie.getEast())<0,Gt=Ft?ie.getEast():ie.getWest(),Jt=Ft?ie.getWest():ie.getEast(),it=Math.max(ie.getNorth(),ie.getSouth()),Rt=Math.min(ie.getNorth(),ie.getSouth()),qt=Gt+.5*e.bJ(Gt,Jt),or=it+.5*e.bJ(it,Rt),vr=_e.clone();vr.setCenter(De.center),vr.setBearing(De.bearing),vr.setPitch(0),vr.setRoll(0),vr.setZoom(De.zoom);let Ar=vr.modelViewProjectionMatrix,dr=[Ro(ie.getNorthWest()),Ro(ie.getNorthEast()),Ro(ie.getSouthWest()),Ro(ie.getSouthEast()),Ro(new e.W(Jt,or)),Ro(new e.W(Gt,or)),Ro(new e.W(qt,it)),Ro(new e.W(qt,Rt))],mr=Ro(De.center),qr=Number.POSITIVE_INFINITY;for(let Lr of dr)Ne<0&&(qr=Ms.getLesserNonNegativeNonNull(qr,Ms.solveVectorScale(Lr,mr,Ar,"x",Ne))),Ye>0&&(qr=Ms.getLesserNonNegativeNonNull(qr,Ms.solveVectorScale(Lr,mr,Ar,"x",Ye))),lt>0&&(qr=Ms.getLesserNonNegativeNonNull(qr,Ms.solveVectorScale(Lr,mr,Ar,"y",lt))),ct<0&&(qr=Ms.getLesserNonNegativeNonNull(qr,Ms.solveVectorScale(Lr,mr,Ar,"y",ct)));if(Number.isFinite(qr)&&qr!==0)return De.zoom=Math.min(vr.zoom+e.ar(qr),y.maxZoom),De;Oo()}handleJumpToCenterZoom(y,O){let ie=y.center.lat,ce=y.applyConstrain(O.center?e.W.convert(O.center):y.center,y.zoom).center;y.setCenter(ce.wrap());let _e=O.zoom!==void 0?+O.zoom:y.zoom+Ts(ie,ce.lat);y.zoom!==_e&&y.setZoom(_e)}handleEaseTo(y,O){let ie=y.zoom,ce=y.center,_e=y.padding,De={roll:y.roll,pitch:y.pitch,bearing:y.bearing},Ne={roll:O.roll===void 0?y.roll:O.roll,pitch:O.pitch===void 0?y.pitch:O.pitch,bearing:O.bearing===void 0?y.bearing:O.bearing},Ye=O.zoom!==void 0,lt=!y.isPaddingEqual(O.padding),ct=!1,Ft=O.center?e.W.convert(O.center):ce,Gt=y.applyConstrain(Ft,ie).center;oi(y,Gt);let Jt=y.clone();Jt.setCenter(Gt),Jt.setZoom(Ye?+O.zoom:ie+Ts(ce.lat,Ft.lat)),Jt.setBearing(O.bearing);let it=new e.P(e.al(y.centerPoint.x+O.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+O.offsetAsPoint.y,0,y.height));Jt.setLocationAtPoint(Gt,it);let Rt=(O.offset&&O.offsetAsPoint.mag())>0?Jt.center:Gt,qt=Ye?+O.zoom:ie+Ts(ce.lat,Rt.lat),or=ie+Ts(ce.lat,0),vr=qt+Ts(Rt.lat,0),Ar=e.bJ(ce.lng,Rt.lng),dr=e.bJ(ce.lat,Rt.lat),mr=e.ao(vr-or);return ct=qt!==ie,{easeFunc:qr=>{if(e.bn(De,Ne)||ws({startEulerAngles:De,endEulerAngles:Ne,tr:y,k:qr,useSlerp:De.roll!=Ne.roll}),lt&&y.interpolatePadding(_e,O.padding,qr),O.around)e.w("Easing around a point is not supported under globe projection."),y.setLocationAtPoint(O.around,O.aroundPoint);else{let Lr=vr>or?Math.min(2,mr):Math.max(.5,mr),cn=Math.pow(Lr,1-qr),Nn=su(ce,Ar,dr,qr*cn);y.setCenter(Nn.wrap())}if(ct){let Lr=e.H.number(or,vr,qr)+Ts(0,y.center.lat);y.setZoom(Lr)}},isZooming:ct,elevationCenter:Rt}}handleFlyTo(y,O){let ie=O.zoom!==void 0,ce=y.center,_e=y.zoom,De=y.padding,Ne=!y.isPaddingEqual(O.padding),Ye=y.applyConstrain(e.W.convert(O.center||O.locationAtOffset),_e).center,lt=ie?+O.zoom:y.zoom+Ts(y.center.lat,Ye.lat),ct=y.clone();ct.setCenter(Ye),ct.setZoom(lt),ct.setBearing(O.bearing);let Ft=new e.P(e.al(y.centerPoint.x+O.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+O.offsetAsPoint.y,0,y.height));ct.setLocationAtPoint(Ye,Ft);let Gt=ct.center;oi(y,Gt);let Jt=function(dr,mr,qr){let Lr=Ro(mr),cn=Ro(qr),Nn=e.b3(Lr,cn),Dn=Math.acos(Nn),qn=Fo(dr);return Dn/(2*Math.PI)*qn}(y,ce,Gt),it=_e+Ts(ce.lat,0),Rt=lt+Ts(Gt.lat,0),qt=e.ao(Rt-it),or;if(typeof O.minZoom=="number"){let dr=+O.minZoom+Ts(Gt.lat,0),mr=Math.min(dr,it,Rt)+Ts(0,Gt.lat),qr=y.applyConstrain(Gt,mr).zoom+Ts(Gt.lat,0);or=e.ao(qr-it)}let vr=e.bJ(ce.lng,Gt.lng),Ar=e.bJ(ce.lat,Gt.lat);return{easeFunc:(dr,mr,qr,Lr)=>{let cn=su(ce,vr,Ar,qr);Ne&&y.interpolatePadding(De,O.padding,dr);let Nn=dr===1?Gt:cn;y.setCenter(Nn.wrap());let Dn=it+e.ar(mr);y.setZoom(dr===1?lt:Dn+Ts(0,Nn.lat))},scaleOfZoom:qt,targetCenter:Gt,scaleOfMinZoom:or,pixelPathLength:Jt}}static solveVectorScale(y,O,ie,ce,_e){let De=ce==="x"?[ie[0],ie[4],ie[8],ie[12]]:[ie[1],ie[5],ie[9],ie[13]],Ne=[ie[3],ie[7],ie[11],ie[15]],Ye=y[0]*De[0]+y[1]*De[1]+y[2]*De[2],lt=y[0]*Ne[0]+y[1]*Ne[1]+y[2]*Ne[2],ct=O[0]*De[0]+O[1]*De[1]+O[2]*De[2],Ft=O[0]*Ne[0]+O[1]*Ne[1]+O[2]*Ne[2];return ct+_e*lt===Ye+_e*Ft||Ne[3]*(Ye-ct)+De[3]*(Ft-lt)+Ye*Ft==ct*lt?null:(ct+De[3]-_e*Ft-_e*Ne[3])/(ct-Ye-_e*Ft+_e*lt)}static getLesserNonNegativeNonNull(y,O){return O!==null&&O>=0&&Oe.C(de,y?.filter(O=>O.identifier!=="source.canvas")),Eu=e.bN();class Uu extends e.E{constructor(y,O={}){var ie,ce;super(),this._rtlPluginLoaded=()=>{for(let De in this.tileManagers){let Ne=this.tileManagers[De].getSource().type;Ne!=="vector"&&Ne!=="geojson"||this.tileManagers[De].reload()}},this.map=y,this.dispatcher=new ae(re(),y._getMapId()),this.dispatcher.registerMessageHandler("GG",(De,Ne)=>this.getGlyphs(De,Ne)),this.dispatcher.registerMessageHandler("GI",(De,Ne)=>this.getImages(De,Ne)),this.dispatcher.registerMessageHandler("GDA",(De,Ne)=>this.getDashes(De,Ne)),this.imageManager=new C,this.imageManager.setEventedParent(this);let _e=((ie=y._container)===null||ie===void 0?void 0:ie.lang)||typeof document<"u"&&((ce=document.documentElement)===null||ce===void 0?void 0:ce.lang)||void 0;this.glyphManager=new b(y._requestManager,O.localIdeographFontFamily,_e),this.lineAtlas=new F(256,512),this.crossTileSymbolIndex=new ro,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",e.bO()),Ge().on(Te,this._rtlPluginLoaded),this.on("data",De=>{if(De.dataType!=="source"||De.sourceDataType!=="metadata")return;let Ne=this.tileManagers[De.sourceId];if(!Ne)return;let Ye=Ne.getSource();if(Ye?.vectorLayerIds)for(let lt in this._layers){let ct=this._layers[lt];ct.source===Ye.id&&this._validateLayer(ct)}})}_setInitialValues(){var y;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new e.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new(((y=this.crossTileSymbolIndex)===null||y===void 0?void 0:y.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(y,O){var ie,ce,_e;this._checkLoaded();let De=O===null?(_e=(ce=(ie=this.stylesheet.state)===null||ie===void 0?void 0:ie[y])===null||ce===void 0?void 0:ce.default)!==null&&_e!==void 0?_e:null:O;if(e.bQ(De,this._globalState[y]))return this;this._globalState[y]=De,this._applyGlobalStateChanges([y])}getGlobalState(){return this._globalState}setGlobalState(y){this._checkLoaded();let O=[];for(let ie in y)!e.bQ(this._globalState[ie],y[ie].default)&&(O.push(ie),this._globalState[ie]=y[ie].default);this._applyGlobalStateChanges(O)}_applyGlobalStateChanges(y){if(y.length===0)return;let O=new Set,ie={};for(let ce of y){ie[ce]=this._globalState[ce];for(let _e in this._layers){let De=this._layers[_e],Ne=De.getLayoutAffectingGlobalStateRefs(),Ye=De.getPaintAffectingGlobalStateRefs(),lt=De.getVisibilityAffectingGlobalStateRefs();if(Ne.has(ce)&&O.add(De.source),Ye.has(ce))for(let{name:ct,value:Ft}of Ye.get(ce))this._updatePaintProperty(De,ct,Ft);lt?.has(ce)&&(De.recalculateVisibility(),this._updateLayer(De))}}this.dispatcher.broadcast("UGS",ie);for(let ce in this.tileManagers)O.has(ce)&&(this._reloadSource(ce),this._changed=!0)}loadURL(y){return e._(this,arguments,void 0,function*(O,ie={},ce){this.fire(new e.n("dataloading",{dataType:"style"})),ie.validate=typeof ie.validate!="boolean"||ie.validate,this._loadStyleRequest=new AbortController;let _e=this._loadStyleRequest;try{let De=yield this.map._requestManager.transformRequest(O,"Style");e.bR(_e.signal);let Ne=yield e.k(De,_e);this._loadStyleRequest===_e&&(this._loadStyleRequest=null),this._load(Ne.data,ie,ce)}catch(De){this._loadStyleRequest===_e&&(this._loadStyleRequest=null),De&&!_e.signal.aborted&&this.fire(new e.l(e.d(De)))}})}loadJSON(y,O={},ie){this.fire(new e.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,s.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,O.validate=O.validate!==!1,this._load(y,O,ie)}).catch(()=>{})}loadEmpty(){this.fire(new e.n("dataloading",{dataType:"style"})),this._load(Eu,{validate:!1})}_load(y,O,ie){var ce,_e;let De=O.transformStyle?O.transformStyle(ie,y):y;if(!O.validate||!Su(this,e.F(De))){De=Object.assign({},De),this._loaded=!0,this.stylesheet=De;for(let Ne in De.sources)this.addSource(Ne,De.sources[Ne],{validate:!1});De.sprite?this._loadSprite(De.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(De.glyphs),this._createLayers(),this.light=new N(this.stylesheet.light),this._setProjectionInternal(((ce=this.stylesheet.projection)===null||ce===void 0?void 0:ce.type)||"mercator"),this.sky=new B(this.stylesheet.sky),this.map.setTerrain((_e=this.stylesheet.terrain)!==null&&_e!==void 0?_e:null),this.fire(new e.n("data",{dataType:"style"})),this.fire(new e.n("style.load"))}}_createLayers(){var y,O,ie;let ce=e.bS(this.stylesheet.layers);this.setGlobalState((y=this.stylesheet.state)!==null&&y!==void 0?y:null),this.dispatcher.broadcast("SL",ce),this._order=ce.map(_e=>_e.id),this._layers={},this._serializedLayers=null;for(let _e of ce){let De=e.bT(_e,this._globalState);if(De.setEventedParent(this,{layer:{id:_e.id}}),this._layers[_e.id]=De,e.bU(De)&&this.tileManagers[De.source]){let Ne=(ie=(O=_e.paint)===null||O===void 0?void 0:O["raster-fade-duration"])!==null&&ie!==void 0?ie:De.paint.get("raster-fade-duration");this.tileManagers[De.source].setRasterFadeDuration(Ne)}}}_loadSprite(y,O=!1,ie=void 0){this.imageManager.setLoaded(!1);let ce=new AbortController,_e;this._spriteRequest=ce,function(De,Ne,Ye,lt){return e._(this,void 0,void 0,function*(){let ct=w(De),Ft=Ye>1?"@2x":"",Gt={},Jt={};for(let{id:it,url:Rt}of ct){let qt=yield Ne.transformRequest(S(Rt,Ft,".json"),"SpriteJSON");Gt[it]=e.k(qt,lt);let or=yield Ne.transformRequest(S(Rt,Ft,".png"),"SpriteImage");Jt[it]=p.getImage(or,lt)}return yield Promise.all([...Object.values(Gt),...Object.values(Jt)]),function(it,Rt){return e._(this,void 0,void 0,function*(){let qt={};for(let or in it){qt[or]={};let vr=s.getImageCanvasContext((yield Rt[or]).data),Ar=(yield it[or]).data;for(let dr in Ar){let{width:mr,height:qr,x:Lr,y:cn,sdf:Nn,pixelRatio:Dn,stretchX:qn,stretchY:_n,content:vn,textFitWidth:Sn,textFitHeight:Tn}=Ar[dr];qt[or][dr]={data:null,pixelRatio:Dn,sdf:Nn,stretchX:qn,stretchY:_n,content:vn,textFitWidth:Sn,textFitHeight:Tn,spriteData:{width:mr,height:qr,x:Lr,y:cn,context:vr}}}}return qt})}(Gt,Jt)})}(y,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(De=>{if(this._spriteRequest=null,De)for(let Ne in De){this._spritesImagesIds[Ne]=[];let Ye=this._spritesImagesIds[Ne]?this._spritesImagesIds[Ne].filter(lt=>!(lt in De)):[];for(let lt of Ye)this.imageManager.removeImage(lt),this._changedImages[lt]=!0;for(let lt in De[Ne]){let ct=Ne==="default"?lt:`${Ne}:${lt}`;this._spritesImagesIds[Ne].push(ct),ct in this.imageManager.images?this.imageManager.updateImage(ct,De[Ne][lt],!1):this.imageManager.addImage(ct,De[Ne][lt]),O&&(this._changedImages[ct]=!0)}}}).catch(De=>{this._spriteRequest=null,_e=De,ce.signal.aborted||this.fire(new e.l(_e))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),O&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"})),ie&&ie(_e)})}_unloadSprite(){for(let y of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(y),this._changedImages[y]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}_validateLayer(y){let O=this.tileManagers[y.source];if(!O)return;let ie=y.sourceLayer;if(!ie)return;let ce=O.getSource();(ce.type==="geojson"||ce.vectorLayerIds&&!ce.vectorLayerIds.includes(ie))&&this.fire(new e.l(new Error(`Source layer "${ie}" does not exist on source "${ce.id}" as specified by style layer "${y.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let y in this.tileManagers)if(!this.tileManagers[y].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(y,O=!1){let ie=this._serializedAllLayers();if(!y||y.length===0)return Object.values(O?e.bV(ie):ie);let ce=[];for(let _e of y)if(ie[_e]){let De=O?e.bV(ie[_e]):ie[_e];ce.push(De)}return ce}_serializedAllLayers(){let y=this._serializedLayers;if(y)return y;y=this._serializedLayers={};let O=Object.keys(this._layers);for(let ie of O){let ce=this._layers[ie];ce.type!=="custom"&&(y[ie]=ce.serialize())}return y}hasTransitions(){var y,O,ie;if(!((y=this.light)===null||y===void 0)&&y.hasTransition()||!((O=this.sky)===null||O===void 0)&&O.hasTransition()||!((ie=this.projection)===null||ie===void 0)&&ie.hasTransition())return!0;for(let ce in this.tileManagers)if(this.tileManagers[ce].hasTransition())return!0;for(let ce in this._layers)if(this._layers[ce].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(y){if(!this._loaded)return;let O=this._changed;if(O){let ce=Object.keys(this._updatedLayers),_e=Object.keys(this._removedLayers);(ce.length||_e.length)&&this._updateWorkerLayers(ce,_e);for(let De in this._updatedSources){let Ne=this._updatedSources[De];if(Ne==="reload")this._reloadSource(De);else{if(Ne!=="clear")throw new Error(`Invalid action ${Ne}`);this._clearSource(De)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let De in this._updatedPaintProps)this._layers[De].updateTransitions(y);this.light.updateTransitions(y),this.sky.updateTransitions(y),this._resetUpdates()}let ie={};for(let ce in this.tileManagers){let _e=this.tileManagers[ce];ie[ce]=_e.used,_e.used=!1}for(let ce of this._order){let _e=this._layers[ce];_e.recalculate(y,this._availableImages),!_e.isHidden(y.zoom)&&_e.source&&(this.tileManagers[_e.source].used=!0)}for(let ce in ie){let _e=this.tileManagers[ce];!!ie[ce]!=!!_e.used&&_e.fire(new e.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:ce}))}this.light.recalculate(y),this.sky.recalculate(y),this.projection.recalculate(y),this.z=y.zoom,O&&this.fire(new e.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let y=Object.keys(this._changedImages);if(y.length){for(let O in this.tileManagers)this.tileManagers[O].reloadTilesForDependencies(["icons","patterns"],y);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let y in this.tileManagers)this.tileManagers[y].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(y,O){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(y,!1),removedIds:O})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(y,O={}){var ie;this._checkLoaded();let ce=this.serialize();if(y=O.transformStyle?O.transformStyle(ce,y):y,((ie=O.validate)===null||ie===void 0||ie)&&Su(this,e.F(y)))return!1;(y=e.bV(y)).layers=e.bS(y.layers);let _e=e.bW(ce,y),De=this._getOperationsToPerform(_e);if(De.unimplemented.length>0)throw new Error(`Unimplemented: ${De.unimplemented.join(", ")}.`);if(De.operations.length===0)return!1;for(let Ne of De.operations)Ne();return this.stylesheet=y,this._serializedLayers=null,this.fire(new e.n("style.load",{style:this})),!0}_getOperationsToPerform(y){let O=[],ie=[];for(let ce of y)switch(ce.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":O.push(()=>this.addLayer.apply(this,ce.args));break;case"removeLayer":O.push(()=>this.removeLayer.apply(this,ce.args));break;case"setPaintProperty":O.push(()=>this.setPaintProperty.apply(this,ce.args));break;case"setLayoutProperty":O.push(()=>this.setLayoutProperty.apply(this,ce.args));break;case"setFilter":O.push(()=>this.setFilter.apply(this,ce.args));break;case"addSource":O.push(()=>this.addSource.apply(this,ce.args));break;case"removeSource":O.push(()=>this.removeSource.apply(this,ce.args));break;case"setLayerZoomRange":O.push(()=>this.setLayerZoomRange.apply(this,ce.args));break;case"setLight":O.push(()=>this.setLight.apply(this,ce.args));break;case"setGeoJSONSourceData":O.push(()=>this.setGeoJSONSourceData.apply(this,ce.args));break;case"setGlyphs":O.push(()=>this.setGlyphs.apply(this,ce.args));break;case"setSprite":O.push(()=>this.setSprite.apply(this,ce.args));break;case"setTerrain":O.push(()=>this.map.setTerrain.apply(this,ce.args));break;case"setSky":O.push(()=>this.setSky.apply(this,ce.args));break;case"setProjection":this.setProjection.apply(this,ce.args);break;case"setGlobalState":O.push(()=>this.setGlobalState.apply(this,ce.args));break;case"setTransition":O.push(()=>{});break;default:ie.push(ce.command)}return{operations:O,unimplemented:ie}}addImage(y,O){if(this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" already exists.`)));this.imageManager.addImage(y,O),this._afterImageUpdated(y)}updateImage(y,O){this.imageManager.updateImage(y,O)}getImage(y){return this.imageManager.getImage(y)}removeImage(y){if(!this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" does not exist.`)));this.imageManager.removeImage(y),this._afterImageUpdated(y)}_afterImageUpdated(y){this._availableImages=this.imageManager.listImages(),this._changedImages[y]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(y,O,ie={}){var ce;if(this._checkLoaded(),this.tileManagers[y]!==void 0)throw new Error(`Source "${y}" already exists.`);if(!O.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(O).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(O.type)&&this._validate(e.F.source,`sources.${y}`,O,null,ie))return;!((ce=this.map)===null||ce===void 0)&&ce._collectResourceTiming&&(O.collectResourceTiming=!0);let _e=this.tileManagers[y]=new Sr(y,O,this.dispatcher);_e.style=this,_e.setEventedParent(this,()=>({isSourceLoaded:_e.loaded(),source:_e.serialize(),sourceId:y})),_e.onAdd(this.map),this._changed=!0}removeSource(y){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);for(let ie in this._layers)if(this._layers[ie].source===y)return this.fire(new e.l(new Error(`Source "${y}" cannot be removed while layer "${ie}" is using it.`)));let O=this.tileManagers[y];delete this.tileManagers[y],delete this._updatedSources[y],O.fire(new e.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:y})),O.setEventedParent(null),O.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(y,O){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);let ie=this.tileManagers[y].getSource();if(ie.type!=="geojson")throw new Error(`geojsonSource.type is ${ie.type}, which is !== 'geojson`);ie.setData(O),this._changed=!0}getSource(y){var O;return(O=this.tileManagers[y])===null||O===void 0?void 0:O.getSource()}addLayer(y,O,ie={}){this._checkLoaded();let ce=y.id;if(this.getLayer(ce))return void this.fire(new e.l(new Error(`Layer "${ce}" already exists on this map.`)));let _e;if(y.type==="custom"){if(Su(this,e.bX(y)))return;_e=e.bT(y,this._globalState)}else{if("source"in y&&typeof y.source=="object"&&(this.addSource(ce,y.source),y=e.bV(y),y=e.e(y,{source:ce})),this._validate(e.F.layer,`layers.${ce}`,y,{arrayIndex:-1},ie))return;_e=e.bT(y,this._globalState),this._validateLayer(_e),_e.setEventedParent(this,{layer:{id:ce}})}let De=O?this._order.indexOf(O):this._order.length;if(O&&De===-1)this.fire(new e.l(new Error(`Cannot add layer "${ce}" before non-existing layer "${O}".`)));else{if(this._order.splice(De,0,ce),this._layerOrderChanged=!0,this._layers[ce]=_e,this._removedLayers[ce]&&_e.source&&_e.type!=="custom"){let Ne=this._removedLayers[ce];delete this._removedLayers[ce],Ne.type!==_e.type?this._updatedSources[_e.source]="clear":(this._updatedSources[_e.source]="reload",this.tileManagers[_e.source].pause())}this._updateLayer(_e),_e.onAdd&&_e.onAdd(this.map)}}moveLayer(y,O){if(this._checkLoaded(),this._changed=!0,!this._layers[y])return void this.fire(new e.l(new Error(`The layer '${y}' does not exist in the map's style and cannot be moved.`)));if(y===O)return;let ie=this._order.indexOf(y);this._order.splice(ie,1);let ce=O?this._order.indexOf(O):this._order.length;O&&ce===-1?this.fire(new e.l(new Error(`Cannot move layer "${y}" before non-existing layer "${O}".`))):(this._order.splice(ce,0,y),this._layerOrderChanged=!0)}removeLayer(y){this._checkLoaded();let O=this._layers[y];if(!O)return void this.fire(new e.l(new Error(`Cannot remove non-existing layer "${y}".`)));O.setEventedParent(null);let ie=this._order.indexOf(y);this._order.splice(ie,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[y]=O,delete this._layers[y],this._serializedLayers&&delete this._serializedLayers[y],delete this._updatedLayers[y],delete this._updatedPaintProps[y],O.onRemove&&O.onRemove(this.map)}getLayer(y){return this._layers[y]}getLayersOrder(){return[...this._order]}hasLayer(y){return y in this._layers}setLayerZoomRange(y,O,ie){this._checkLoaded();let ce=this.getLayer(y);ce?ce.minzoom===O&&ce.maxzoom===ie||(O!=null&&(ce.minzoom=O),ie!=null&&(ce.maxzoom=ie),this._updateLayer(ce)):this.fire(new e.l(new Error(`Cannot set the zoom range of non-existing layer "${y}".`)))}setFilter(y,O,ie={}){this._checkLoaded();let ce=this.getLayer(y);if(ce){if(!e.bQ(ce.filter,O))return O==null?(ce.setFilter(void 0),void this._updateLayer(ce)):void(this._validate(e.F.filter,`layers.${ce.id}.filter`,O,null,ie)||(ce.setFilter(e.bV(O)),this._updateLayer(ce)))}else this.fire(new e.l(new Error(`Cannot filter non-existing layer "${y}".`)))}getFilter(y){return e.bV(this.getLayer(y).filter)}setLayoutProperty(y,O,ie,ce={}){this._checkLoaded();let _e=this.getLayer(y);_e?e.bQ(_e.getLayoutProperty(O),ie)||(_e.setLayoutProperty(O,ie,ce),this._updateLayer(_e)):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}getLayoutProperty(y,O){let ie=this.getLayer(y);if(ie)return ie.getLayoutProperty(O);this.fire(new e.l(new Error(`Cannot get style of non-existing layer "${y}".`)))}setPaintProperty(y,O,ie,ce={}){this._checkLoaded();let _e=this.getLayer(y);_e?e.bQ(_e.getPaintProperty(O),ie)||this._updatePaintProperty(_e,O,ie,ce):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}_updatePaintProperty(y,O,ie,ce={}){y.setPaintProperty(O,ie,ce)&&this._updateLayer(y),e.bU(y)&&O==="raster-fade-duration"&&this.tileManagers[y.source].setRasterFadeDuration(ie),this._changed=!0,this._updatedPaintProps[y.id]=!0,this._serializedLayers=null}getPaintProperty(y,O){return this.getLayer(y).getPaintProperty(O)}setFeatureState(y,O){this._checkLoaded();let ie=y.source,ce=y.sourceLayer,_e=this.tileManagers[ie];if(_e===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let De=_e.getSource().type;De==="geojson"&&ce?this.fire(new e.l(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):De!=="vector"||ce?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),_e.setFeatureState(ce,y.id,O)):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(y,O){this._checkLoaded();let ie=y.source,ce=this.tileManagers[ie];if(ce===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let _e=ce.getSource().type,De=_e==="vector"?y.sourceLayer:void 0;_e!=="vector"||De?O&&typeof y.id!="string"&&typeof y.id!="number"?this.fire(new e.l(new Error("A feature id is required to remove its specific state property."))):ce.removeFeatureState(De,y.id,O):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(y){this._checkLoaded();let O=y.source,ie=y.sourceLayer,ce=this.tileManagers[O];if(ce!==void 0)return ce.getSource().type!=="vector"||ie?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),ce.getFeatureState(ie,y.id)):void this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.l(new Error(`The source '${O}' does not exist in the map's style.`)))}getTransition(){var y;return e.e({duration:300,delay:0},(y=this.stylesheet)===null||y===void 0?void 0:y.transition)}serialize(){if(!this._loaded)return;let y=e.bY(this.tileManagers,_e=>_e.serialize()),O=this._serializeByIds(this._order,!0),ie=this.map.getTerrain()||void 0,ce=this.stylesheet;return e.bZ({version:ce.version,name:ce.name,metadata:ce.metadata,light:ce.light,sky:ce.sky,center:ce.center,zoom:ce.zoom,bearing:ce.bearing,pitch:ce.pitch,sprite:ce.sprite,glyphs:ce.glyphs,transition:ce.transition,projection:ce.projection,sources:y,layers:O,terrain:ie},_e=>_e!==void 0)}_updateLayer(y){this._updatedLayers[y.id]=!0,y.source&&!this._updatedSources[y.source]&&this.tileManagers[y.source].getSource().type!=="raster"&&(this._updatedSources[y.source]="reload",this.tileManagers[y.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(y){let O=De=>this._layers[De].type==="fill-extrusion",ie={},ce=[];for(let De=this._order.length-1;De>=0;De--){let Ne=this._order[De];if(O(Ne)){ie[Ne]=De;for(let Ye of y){let lt=Ye[Ne];if(lt)for(let ct of lt)ce.push(ct)}}}ce.sort((De,Ne)=>Ne.intersectionZ-De.intersectionZ);let _e=[];for(let De=this._order.length-1;De>=0;De--){let Ne=this._order[De];if(O(Ne))for(let Ye=ce.length-1;Ye>=0;Ye--){let lt=ce[Ye].feature;if(ie[lt.layer.id]this.map.terrain.getElevation(ct,Ft,Gt):void 0));return this.placement&&_e.push(function(lt,ct,Ft,Gt,Jt,it,Rt){let qt={},or=it.queryRenderedSymbols(Gt),vr=[];for(let Ar of Object.keys(or).map(Number))vr.push(Rt[Ar]);vr.sort(K);for(let Ar of vr){let dr=Ar.featureIndex.lookupSymbolFeatures(or[Ar.bucketInstanceId],ct,Ar.bucketIndex,Ar.sourceLayerIndex,{filterSpec:Jt.filter,globalState:Jt.globalState},Jt.layers,Jt.availableImages,lt);for(let mr in dr){qt[mr]||(qt[mr]=[]);let qr=dr[mr];qr.sort((Lr,cn)=>{let Nn=Ar.featureSortOrder;if(Nn){let Dn=Nn.indexOf(Lr.featureIndex);return Nn.indexOf(cn.featureIndex)-Dn}return cn.featureIndex-Lr.featureIndex});for(let Lr of qr)qt[mr].push(Lr)}}return function(Ar,dr,mr){for(let qr in Ar)for(let Lr of Ar[qr])G(Lr,mr[dr[qr].source]);return Ar}(qt,lt,Ft)}(this._layers,De,this.tileManagers,y,Ye,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(_e)}querySourceFeatures(y,O){O?.filter&&this._validate(e.F.filter,"querySourceFeatures.filter",O.filter,null,O);let ie=this.tileManagers[y];return ie?function(ce,_e){let De=ce.getRenderableIds().map(lt=>ce.getTileByID(lt)),Ne=[],Ye={};for(let lt of De){let ct=lt.tileID.canonical.key;Ye[ct]||(Ye[ct]=!0,lt.querySourceFeatures(Ne,_e))}return Ne}(ie,O?Object.assign(Object.assign({},O),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(y,O={}){this._checkLoaded();let ie=this.light.getLight(),ce=!1;for(let De in y)if(!e.bQ(y[De],ie[De])){ce=!0;break}if(!ce)return;let _e={now:m(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(y,O),this.light.updateTransitions(_e)}getProjection(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.projection}setProjection(y){this._checkLoaded();let O=y??{type:"mercator"};if(this.stylesheet.projection=y,this.projection){if(this.projection.name===O.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(O.type)}getSky(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.sky}setSky(y,O={}){this._checkLoaded();let ie=this.getSky(),ce=!1;if(!y&&!ie)return;if(y&&!ie)ce=!0;else if(!y&&ie)ce=!0;else for(let De in y)if(!e.bQ(y[De],ie[De])){ce=!0;break}if(!ce)return;let _e={now:m(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=y,this.sky.setSky(y,O),this.sky.updateTransitions(_e)}_setProjectionInternal(y){let O=function(ie,ce){let _e={constrainOverride:ce};if(Array.isArray(ie)){let De=new $o({type:ie});return{projection:De,transform:new ms(_e),cameraHelper:new ol(De)}}switch(ie){case"mercator":return{projection:new Mo,transform:new qo(_e),cameraHelper:new ns};case"globe":{let De=new $o({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:De,transform:new ms(_e),cameraHelper:new ol(De)}}case"vertical-perspective":return{projection:new Zs,transform:new As(_e),cameraHelper:new Ms};default:return e.w(`Unknown projection name: ${ie}. Falling back to mercator projection.`),{projection:new Mo,transform:new qo(_e),cameraHelper:new ns}}}(y,this.map.transformConstrain);this.projection=O.projection,this.map.migrateProjection(O.transform,O.cameraHelper);for(let ie in this.tileManagers)this.tileManagers[ie].reload()}_validate(y,O,ie,ce,_e={}){return _e?.validate!==!1&&Su(this,y.call(e.F,e.e({key:O,style:this.serialize(),value:ie,styleSpec:e.x},ce)))}_remove(y=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),Ge().off(Te,this._rtlPluginLoaded);for(let O in this._layers)this._layers[O].setEventedParent(null);for(let O in this.tileManagers){let ie=this.tileManagers[O];ie.setEventedParent(null),ie.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),y&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(y)}_clearSource(y){this.tileManagers[y].clearTiles()}_reloadSource(y){this.tileManagers[y].resume(),this.tileManagers[y].reload()}_updateSources(y){for(let O in this.tileManagers)this.tileManagers[O].update(y,this.map.terrain)}_generateCollisionBoxes(){for(let y in this.tileManagers)this._reloadSource(y)}_updatePlacement(y,O,ie,ce,_e=!1){let De=!1,Ne=!1,Ye={};for(let lt of this._order){let ct=this._layers[lt];if(ct.type!=="symbol")continue;if(!Ye[ct.source]){let Gt=this.tileManagers[ct.source];Ye[ct.source]=Gt.getRenderableIds(!0).map(Jt=>Gt.getTileByID(Jt)).sort((Jt,it)=>it.tileID.overscaledZ-Jt.tileID.overscaledZ||(Jt.tileID.isLessThan(it.tileID)?-1:1))}let Ft=this.crossTileSymbolIndex.addLayer(ct,Ye[ct.source],y.center.lng);De||(De=Ft)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),_e||(_e=this._layerOrderChanged||ie===0),(_e||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(m(),y.zoom))&&(this.pauseablePlacement=new bi(y,this.map.terrain,this._order,_e,O,ie,ce,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ye),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(m()),Ne=!0),De&&this.pauseablePlacement.placement.setStale()),Ne||De)for(let lt of this._order){let ct=this._layers[lt];ct.type==="symbol"&&this.placement.updateLayerOpacities(ct,Ye[ct.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(m())}_releaseSymbolFadeTiles(){for(let y in this.tileManagers)this.tileManagers[y].releaseSymbolFadeTiles()}getImages(y,O){return e._(this,void 0,void 0,function*(){let ie=yield this.imageManager.getImages(O.icons);this._updateTilesForChangedImages();let ce=this.tileManagers[O.source];return ce&&ce.setDependencies(O.tileID.key,O.type,O.icons),ie})}getGlyphs(y,O){return e._(this,void 0,void 0,function*(){let ie=yield this.glyphManager.getGlyphs(O.stacks),ce=this.tileManagers[O.source];return ce&&ce.setDependencies(O.tileID.key,O.type,[""]),ie})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(y,O={}){this._checkLoaded(),y&&this._validate(e.F.glyphs,"glyphs",y,null,O)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=y,this.glyphManager.entries={},this.glyphManager.setURL(y))}getDashes(y,O){return e._(this,void 0,void 0,function*(){let ie={};for(let[ce,_e]of Object.entries(O.dashes))ie[ce]=this.lineAtlas.getDash(_e.dasharray,_e.round);return ie})}addSprite(y,O,ie={},ce){this._checkLoaded();let _e=[{id:y,url:O}],De=[...w(this.stylesheet.sprite),..._e];this._validate(e.F.sprite,"sprite",De,null,ie)||(this.stylesheet.sprite=De,this._loadSprite(_e,!0,ce))}removeSprite(y){this._checkLoaded();let O=w(this.stylesheet.sprite);if(O.find(ie=>ie.id===y)){if(this._spritesImagesIds[y])for(let ie of this._spritesImagesIds[y])this.imageManager.removeImage(ie),this._changedImages[ie]=!0;O.splice(O.findIndex(ie=>ie.id===y),1),this.stylesheet.sprite=O.length>0?O:void 0,delete this._spritesImagesIds[y],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}else this.fire(new e.l(new Error(`Sprite "${y}" doesn't exists on this map.`)))}getSprite(){return w(this.stylesheet.sprite)}setSprite(y,O={},ie){this._checkLoaded(),y&&this._validate(e.F.sprite,"sprite",y,null,O)||(this.stylesheet.sprite=y,y?this._loadSprite(y,!0,ie):(this._unloadSprite(),ie&&ie(null)))}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(let y in this.tileManagers){let O=this.tileManagers[y];O.setEventedParent(null),O.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(let y in this._layers){let O=this._layers[y];O.setEventedParent(null),O.onRemove&&O.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var fc=e.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class th{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(y,O,ie,ce,_e,De,Ne,Ye,lt){this.context=y;let ct=this.boundPaintVertexBuffers.length!==ce.length;for(let Ft=0;!ct&&Ft({u_texture:0,u_ele_delta:de,u_fog_matrix:y,u_fog_color:O?O.properties.get("fog-color"):e.bo.white,u_fog_ground_blend:O?O.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:ce?0:O?O.calculateFogBlendOpacity(ie):0,u_horizon_color:O?O.properties.get("horizon-color"):e.bo.white,u_horizon_fog_blend:O?O.properties.get("horizon-fog-blend"):1,u_is_globe_mode:ce?1:0}),qu={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function gs(de){let y=[];for(let O of de){if(O===null)continue;let ie=O.split(" ");y.push(ie.pop())}return y}class Lf{constructor(y,O,ie,ce,_e,De,Ne,Ye,lt=[]){let ct=y.gl;this.program=ct.createProgram();let Ft=gs(O.staticAttributes),Gt=ie?ie.getBinderAttributes():[],Jt=Ft.concat(Gt),it=Gi.prelude.staticUniforms?gs(Gi.prelude.staticUniforms):[],Rt=Ne.staticUniforms?gs(Ne.staticUniforms):[],qt=O.staticUniforms?gs(O.staticUniforms):[],or=ie?ie.getBinderUniforms():[],vr=it.concat(Rt).concat(qt).concat(or),Ar=[];for(let Dn of vr)Ar.includes(Dn)||Ar.push(Dn);let dr=ie?ie.defines():[];us(ct)&&dr.unshift("#version 300 es"),_e&&dr.push("#define OVERDRAW_INSPECTOR;"),De&&dr.push("#define TERRAIN3D;"),Ye&&dr.push(Ye),lt&&dr.push(...lt);let mr=dr.concat(Gi.prelude.fragmentSource,Ne.fragmentSource,O.fragmentSource).join(` +`}),staticAttributes:ie,staticUniforms:De}}class fi{constructor(y,O,ie){this.vertexBuffer=y,this.indexBuffer=O,this.segments=ie}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var xo=e.aS([{name:"a_pos",type:"Int16",components:2}]);let zi="#define PROJECTION_MERCATOR",so="mercator";class Mo{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return so}get shaderDefine(){return zi}get shaderPreludeCode(){return Gi.projectionMercator}get vertexShaderPreludeCode(){return Gi.projectionMercator.vertexSource}get subdivisionGranularity(){return e.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(y){}getMeshFromTileID(y,O,ie,ce,_e){if(this._cachedMesh)return this._cachedMesh;let De=new e.aU;De.emplaceBack(0,0),De.emplaceBack(e.a6,0),De.emplaceBack(0,e.a6),De.emplaceBack(e.a6,e.a6);let Ne=y.createVertexBuffer(De,xo.members),Ye=e.aV.simpleSegment(0,0,4,2),lt=new e.aW;lt.emplaceBack(1,0,2),lt.emplaceBack(1,2,3);let ct=y.createIndexBuffer(lt);return this._cachedMesh=new fi(Ne,ct,Ye),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(y){}}class So{constructor(y=0,O=0,ie=0,ce=0){if(isNaN(y)||y<0||isNaN(O)||O<0||isNaN(ie)||ie<0||isNaN(ce)||ce<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=y,this.bottom=O,this.left=ie,this.right=ce}interpolate(y,O,ie){return O.top!=null&&y.top!=null&&(this.top=e.H.number(y.top,O.top,ie)),O.bottom!=null&&y.bottom!=null&&(this.bottom=e.H.number(y.bottom,O.bottom,ie)),O.left!=null&&y.left!=null&&(this.left=e.H.number(y.left,O.left,ie)),O.right!=null&&y.right!=null&&(this.right=e.H.number(y.right,O.right,ie)),this}getCenter(y,O){let ie=e.al((this.left+y-this.right)/2,0,y),ce=e.al((this.top+O-this.bottom)/2,0,O);return new e.P(ie,ce)}equals(y){return this.top===y.top&&this.bottom===y.bottom&&this.left===y.left&&this.right===y.right}clone(){return new So(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function oi(de,y){if(!de.renderWorldCopies||de.lngRange)return;let O=y.lng-de.center.lng;y.lng+=O>180?-360:O<-180?360:0}function ii(de){return Math.max(0,Math.floor(de))}class co{constructor(y,O){var ie;this.applyConstrain=(ce,_e)=>this._constrainOverride!==null?this._constrainOverride(ce,_e):this._callbacks.defaultConstrain(ce,_e),this._callbacks=y,this._tileSize=512,this._renderWorldCopies=O?.renderWorldCopies===void 0||!!O?.renderWorldCopies,this._minZoom=O?.minZoom||0,this._maxZoom=O?.maxZoom||22,this._minPitch=O?.minPitch==null?0:O?.minPitch,this._maxPitch=O?.maxPitch==null?60:O?.maxPitch,this._constrainOverride=(ie=O?.constrainOverride)!==null&&ie!==void 0?ie:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new e.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=ii(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new So,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(y,O,ie){this._constrainOverride=y.constrainOverride,this._latRange=y.latRange,this._lngRange=y.lngRange,this._width=y.width,this._height=y.height,this._center=y.center,this._elevation=y.elevation,this._minElevationForCurrentTile=y.minElevationForCurrentTile,this._zoom=y.zoom,this._tileZoom=ii(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=y.bearingInRadians,this._fovInRadians=y.fovInRadians,this._pitchInRadians=y.pitchInRadians,this._rollInRadians=y.rollInRadians,this._unmodified=y.unmodified,this._edgeInsets=new So(y.padding.top,y.padding.bottom,y.padding.left,y.padding.right),this._minZoom=y.minZoom,this._maxZoom=y.maxZoom,this._minPitch=y.minPitch,this._maxPitch=y.maxPitch,this._renderWorldCopies=y.renderWorldCopies,this._cameraToCenterDistance=y.cameraToCenterDistance,this._nearZ=y.nearZ,this._farZ=y.farZ,this._autoCalculateNearFarZ=!ie&&y.autoCalculateNearFarZ,O&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(y){this._minElevationForCurrentTile=y}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(y){this._minZoom!==y&&(this._minZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(y){this._maxZoom!==y&&(this._maxZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(y){this._minPitch!==y&&(this._minPitch=y,this.setPitch(Math.max(this.pitch,y)))}get maxPitch(){return this._maxPitch}setMaxPitch(y){this._maxPitch!==y&&(this._maxPitch=y,this.setPitch(Math.min(this.pitch,y)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(y){y===void 0?y=!0:y===null&&(y=!1),this._renderWorldCopies=y}get constrainOverride(){return this._constrainOverride}setConstrainOverride(y){y===void 0&&(y=null),this._constrainOverride!==y&&(this._constrainOverride=y,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(y){let O=e.X(y,-180,180)*Math.PI/180;var ie,ce,_e,De,Ne,Ye,lt,ct,Ft;this._bearingInRadians!==O&&(this._unmodified=!1,this._bearingInRadians=O,this._calcMatrices(),this._rotationMatrix=n(),ie=this._rotationMatrix,_e=-this._bearingInRadians,De=(ce=this._rotationMatrix)[0],Ne=ce[1],Ye=ce[2],lt=ce[3],ct=Math.sin(_e),Ft=Math.cos(_e),ie[0]=De*Ft+Ye*ct,ie[1]=Ne*Ft+lt*ct,ie[2]=De*-ct+Ye*Ft,ie[3]=Ne*-ct+lt*Ft)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(y){let O=e.al(y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==O&&(this._unmodified=!1,this._pitchInRadians=O,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(y){let O=y/180*Math.PI;this._rollInRadians!==O&&(this._unmodified=!1,this._rollInRadians=O,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return e.aX(this._fovInRadians)}setFov(y){y=e.al(y,.1,150),this.fov!==y&&(this._unmodified=!1,this._fovInRadians=e.an(y),this._calcMatrices())}get zoom(){return this._zoom}setZoom(y){let O=this.applyConstrain(this._center,y).zoom;this._zoom!==O&&(this._unmodified=!1,this._zoom=O,this._tileZoom=Math.max(0,Math.floor(O)),this._scale=e.ao(O),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(y){y.lat===this._center.lat&&y.lng===this._center.lng||(this._unmodified=!1,this._center=y,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(y){y!==this._elevation&&(this._elevation=y,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(y){this._edgeInsets.equals(y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,y,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(y,O){this._autoCalculateNearFarZ=!1,this._nearZ=y,this._farZ=O,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(y){return this._edgeInsets.equals(y)}interpolatePadding(y,O,ie){this._unmodified=!1,this._edgeInsets.interpolate(y,O,ie),this.constrainInternal(),this._calcMatrices()}resize(y,O,ie=!0){this._width=y,this._height=O,ie&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var y,O;return((y=this._latRange)===null||y===void 0?void 0:y.length)!==2||((O=this._lngRange)===null||O===void 0?void 0:O.length)!==2?null:new q([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(y){y?(this._lngRange=[y.getWest(),y.getEast()],this._latRange=[y.getSouth(),y.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-e.am,e.am])}getCameraQueryGeometry(y,O){if(O.length===1)return[O[0],y];{let{minX:ie,minY:ce,maxX:_e,maxY:De}=e.a8.fromPoints(O).extend(y);return[new e.P(ie,ce),new e.P(_e,ce),new e.P(_e,De),new e.P(ie,De),new e.P(ie,ce)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let y=this._unmodified,{center:O,zoom:ie}=this.applyConstrain(this.center,this.zoom);this.setCenter(O),this.setZoom(ie),this._unmodified=y,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let y=e.ap(new Float64Array(16));e.S(y,y,[this._width/2,-this._height/2,1]),e.Q(y,y,[1,-1,0]),this._clipSpaceToPixelsMatrix=y,y=e.ap(new Float64Array(16)),e.S(y,y,[1,-1,1]),e.Q(y,y,[-1,-1,0]),e.S(y,y,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=y,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(y,O,ie,ce){let _e=ie!==void 0?ie:this.bearing,De=ce=ce!==void 0?ce:this.pitch,{distanceToCenter:Ne,clampedElevation:Ye}=this._distanceToCenterFromAltElevationPitch(O,this.elevation,De),{x:lt,y:ct}=vt(De,_e),Ft=e.a7.fromLngLat(y,O),Gt,Jt,it=e.aY(1,Ft.y),Rt=0;do{if(Rt+=1,Rt>10)break;Jt=Ne/it,Gt=new e.a7(Ft.x+lt*Jt,Ft.y+ct*Jt),it=1/Gt.meterInMercatorCoordinateUnits()}while(Math.abs(Ne-Jt*it)>1e-12);return{center:Gt.toLngLat(),elevation:Ye,zoom:e.ar(this.height/2/Math.tan(this.fovInRadians/2)/Jt/this.tileSize)}}recalculateZoomAndCenter(y){if(this.elevation-y==0)return;let O=1/this.worldSize,ie=e.aq(1,this.center.lat)*this.worldSize,ce=e.a7.fromLngLat(this.center,this.elevation),_e=ce.x/O,De=ce.y/O,Ne=ce.z/O,Ye=this.pitch,lt=this.bearing,{x:ct,y:Ft,z:Gt}=vt(Ye,lt),Jt=this.cameraToCenterDistance,it=_e+Jt*-ct,Rt=De+Jt*-Ft,qt=Ne+Jt*Gt,{distanceToCenter:or,clampedElevation:vr}=this._distanceToCenterFromAltElevationPitch(qt/ie,y,Ye),Ar=or*ie,dr=new e.a7((it+ct*Ar)*O,(Rt+Ft*Ar)*O,0).toLngLat(),mr=e.aq(1,dr.lat),qr=e.ar(this.height/2/Math.tan(this.fovInRadians/2)/or/mr/this.tileSize);this._elevation=vr,this._center=dr,this.setZoom(qr)}_distanceToCenterFromAltElevationPitch(y,O,ie){let ce=-Math.cos(e.an(ie)),_e=y-O,De,Ne=O;return ce*_e>=0||Math.abs(ce)<.1?(De=1e4,Ne=y+De*ce):De=-_e/ce,{distanceToCenter:De,clampedElevation:Ne}}getCameraPoint(){let y=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(y*Math.sin(this.rollInRadians),y*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/y).toLngLat()}getMercatorTileCoordinates(y){if(!y)return[0,0,1,1];let O=y.canonical.z>=0?1<this.max[0]||y.aabb.min[1]>this.max[1]||y.aabb.min[2]>this.max[2]||y.aabb.max[0]0?(O+=y[ce]*this.min[ce],ie+=y[ce]*this.max[ce]):(ie+=y[ce]*this.min[ce],O+=y[ce]*this.max[ce]);return O>=0?2:ie<0?0:1}}class Ho{distanceToTile2d(y,O,ie,ce){let _e=ce,De=_e.distanceX([y,O]),Ne=_e.distanceY([y,O]);return Math.hypot(De,Ne)}getWrap(y,O,ie){return ie}getTileBoundingVolume(y,O,ie,ce){var _e,De;let Ne=0,Ye=0;if(ce?.terrain){let ct=new e.a3(y.z,O,y.z,y.x,y.y),Ft=ce.terrain.getMinMaxElevation(ct);Ne=(_e=Ft.minElevation)!==null&&_e!==void 0?_e:Math.min(0,ie),Ye=(De=Ft.maxElevation)!==null&&De!==void 0?De:Math.max(0,ie)}let lt=1<ce}allowWorldCopies(){return!0}prepareNextFrame(){}}class Io{constructor(y,O,ie){this.points=y,this.planes=O,this.aabb=ie}static fromInvProjectionMatrix(y,O=1,ie=0,ce,_e){let De=_e?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Ne=Math.pow(2,ie),Ye=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Gt=>function(Jt,it,Rt,qt){let or=e.aE([],Jt,it),vr=1/or[3]/Rt*qt;return e.b4(or,or,[vr,vr,1/or[3],vr])}(Gt,y,O,Ne));ce&&function(Gt,Jt,it,Rt){let qt=Rt?4:0,or=Rt?0:4,vr=0,Ar=[],dr=[];for(let Lr=0;Lr<4;Lr++){let ua=e.b0([],Gt[Lr+or],Gt[Lr+qt]),Ba=e.b5(ua);e.aZ(ua,ua,1/Ba),Ar.push(Ba),dr.push(ua)}for(let Lr=0;Lr<4;Lr++){let ua=e.b6(Gt[Lr+qt],dr[Lr],it);vr=ua!==null&&ua>=0?Math.max(vr,ua):Math.max(vr,Ar[Lr])}let mr=function(Lr,ua){let Ba=e.b0([],Lr[ua[0]],Lr[ua[1]]),Pa=e.b0([],Lr[ua[2]],Lr[ua[1]]),Ua=[0,0,0,0];return e.b1(Ua,e.b2([],Ba,Pa)),Ua[3]=-e.b3(Ua,Lr[ua[0]]),Ua}(Gt,Jt),qr=function(Lr,ua){let Ba=e.b7(Lr),Pa=e.b8([],Lr,1/Ba),Ua=e.b0([],ua,e.aZ([],Pa,e.b3(ua,Pa))),ya=e.b7(Ua);if(ya>0){let da=Math.sqrt(1-Pa[3]*Pa[3]),Ma=e.aZ([],Pa,-Pa[3]),wa=e.a_([],Ma,e.aZ([],Ua,da/ya));return e.b9(ua,wa)}return null}(it,mr);if(qr!==null){let Lr=qr/e.b3(dr[0],mr);vr=Math.min(vr,Lr)}for(let Lr=0;Lr<4;Lr++){let ua=Math.min(vr,Ar[Lr]);Gt[Lr+or]=[Gt[Lr+qt][0]+dr[Lr][0]*ua,Gt[Lr+qt][1]+dr[Lr][1]*ua,Gt[Lr+qt][2]+dr[Lr][2]*ua,1]}}(Ye,De[0],ce,_e);let lt=De.map(Gt=>{let Jt=e.b0([],Ye[Gt[0]],Ye[Gt[1]]),it=e.b0([],Ye[Gt[2]],Ye[Gt[1]]),Rt=e.b1([],e.b2([],Jt,it)),qt=-e.b3(Rt,Ye[Gt[1]]);return Rt.concat(qt)}),ct=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],Ft=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let Gt of Ye)for(let Jt=0;Jt<3;Jt++)ct[Jt]=Math.min(ct[Jt],Gt[Jt]),Ft[Jt]=Math.max(Ft[Jt],Gt[Jt]);return new Io(Ye,lt,new Wi(ct,Ft))}}class qo{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,O,ie){this._helper.interpolatePadding(y,O,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,O,ie=!0){this._helper.resize(y,O,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,O){this._helper.overrideNearFarZ(y,O)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(y,O){}constructor(y){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(O,ie)=>{ie=e.al(+ie,this.minZoom,this.maxZoom);let ce={center:new e.W(O.lng,O.lat),zoom:ie},_e=this._helper._lngRange;if(!this._helper._renderWorldCopies&&_e===null){let dr=179.9999999999;_e=[-dr,dr]}let De=this.tileSize*e.ao(ce.zoom),Ne=0,Ye=De,lt=0,ct=De,Ft=0,Gt=0,{x:Jt,y:it}=this.size;if(this._helper._latRange){let dr=this._helper._latRange;Ne=e.Y(dr[1])*De,Ye=e.Y(dr[0])*De,Ye-NeYe&&(vr=Ye-dr)}if(_e){let dr=(lt+ct)/2,mr=Rt;this._helper._renderWorldCopies&&(mr=e.X(Rt,dr-De/2,dr+De/2));let qr=Jt/2;mr-qrct&&(or=ct-qr)}if(or!==void 0||vr!==void 0){let dr=new e.P(or??Rt,vr??qt);ce.center=_r(De,dr).wrap()}return ce},this.applyConstrain=(O,ie)=>this._helper.applyConstrain(O,ie),this._helper=new co({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(O,ie)=>this.defaultConstrain(O,ie)},y),this._coveringTilesDetailsProvider=new Ho}clone(){let y=new qo;return y.apply(this,!1),y}apply(y,O,ie){this._helper.apply(y,O,ie)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(y){let O=[new e.ba(0,y)];if(this._helper._renderWorldCopies){let ie=this.screenPointToMercatorCoordinate(new e.P(0,0)),ce=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,0)),_e=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,this._helper._height)),De=this.screenPointToMercatorCoordinate(new e.P(0,this._helper._height)),Ne=Math.floor(Math.min(ie.x,ce.x,_e.x,De.x)),Ye=Math.floor(Math.max(ie.x,ce.x,_e.x,De.x)),lt=1;for(let ct=Ne-lt;ct<=Ye+lt;ct++)ct!==0&&O.push(new e.ba(ct,y))}return O}getCameraFrustum(){return Io.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(y){let O=this.screenPointToLocation(this.centerPoint,y),ie=y?y.getElevationForLngLatZoom(O,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(ie)}setLocationAtPoint(y,O){let ie=e.aq(this.elevation,this.center.lat),ce=this.screenPointToMercatorCoordinateAtZ(O,ie),_e=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,ie),De=e.a7.fromLngLat(y),Ne=new e.a7(De.x-(ce.x-_e.x),De.y-(ce.y-_e.y));this.setCenter(Ne?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(y,O){return O?this.coordinatePoint(e.a7.fromLngLat(y),O.getElevationForLngLat(y,this),this._pixelMatrix3D):this.coordinatePoint(e.a7.fromLngLat(y))}screenPointToLocation(y,O){var ie;return(ie=this.screenPointToMercatorCoordinate(y,O))===null||ie===void 0?void 0:ie.toLngLat()}screenPointToMercatorCoordinate(y,O){if(O){let ie=O.pointCoordinate(y);if(ie!=null)return ie}return this.screenPointToMercatorCoordinateAtZ(y)}screenPointToMercatorCoordinateAtZ(y,O){let ie=O||0,ce=[y.x,y.y,0,1],_e=[y.x,y.y,1,1];e.aE(ce,ce,this._pixelMatrixInverse),e.aE(_e,_e,this._pixelMatrixInverse);let De=ce[3],Ne=_e[3],Ye=ce[1]/De,lt=_e[1]/Ne,ct=ce[2]/De,Ft=_e[2]/Ne,Gt=ct===Ft?0:(ie-ct)/(Ft-ct);return new e.a7(e.H.number(ce[0]/De,_e[0]/Ne,Gt)/this.worldSize,e.H.number(Ye,lt,Gt)/this.worldSize,ie)}coordinatePoint(y,O=0,ie=this._pixelMatrix){let ce=[y.x*this.worldSize,y.y*this.worldSize,O,1];return e.aE(ce,ce,ie),new e.P(ce[0]/ce[3],ce[1]/ce[3])}getBounds(){let y=Math.max(0,this._helper._height/2-Zt(this));return new q().extend(this.screenPointToLocation(new e.P(0,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new e.P(0,this._helper._height)))}isPointOnMapSurface(y,O){return O?O.pointCoordinate(y)!=null:y.y>this.height/2-Zt(this)}calculatePosMatrix(y,O=!1,ie){var ce;let _e=(ce=y.key)!==null&&ce!==void 0?ce:e.bb(y.wrap,y.canonical.z,y.canonical.z,y.canonical.x,y.canonical.y),De=O?this._alignedPosMatrixCache:this._posMatrixCache;if(De.has(_e)){let lt=De.get(_e);return ie?lt.f32:lt.f64}let Ne=sr(y,this.worldSize);e.U(Ne,O?this._alignedProjMatrix:this._viewProjMatrix,Ne);let Ye={f64:Ne,f32:new Float32Array(Ne)};return De.set(_e,Ye),ie?Ye.f32:Ye.f64}calculateFogMatrix(y){let O=y.key,ie=this._fogMatrixCacheF32;if(ie.has(O))return ie.get(O);let ce=sr(y,this.worldSize);return e.U(ce,this._fogMatrix,ce),ie.set(O,new Float32Array(ce)),ie.get(O)}calculateCenterFromCameraLngLatAlt(y,O,ie,ce){return this._helper.calculateCenterFromCameraLngLatAlt(y,O,ie,ce)}_calculateNearFarZIfNeeded(y,O,ie){if(!this._helper.autoCalculateNearFarZ)return;let ce=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),_e=y-ce*this._helper._pixelPerMeter/Math.cos(O),De=ce<0?_e:y,Ne=Math.PI/2+this.pitchInRadians,Ye=e.an(this.fov)*(Math.abs(Math.cos(e.an(this.roll)))*this.height+Math.abs(Math.sin(e.an(this.roll)))*this.width)/this.height*(.5+ie.y/this.height),lt=Math.sin(Ye)*De/Math.sin(e.al(Math.PI-Ne-Ye,.01,Math.PI-.01)),ct=Zt(this),Ft=Math.atan(ct/this._helper.cameraToCenterDistance),Gt=e.an(.75),Jt=Ft>Gt?2*Ft*(.5+ie.y/(2*ct)):Gt,it=Math.sin(Jt)*De/Math.sin(e.al(Math.PI-Ne-Jt,.01,Math.PI-.01)),Rt=Math.min(lt,it);this._helper._farZ=1.01*(Math.cos(Math.PI/2-O)*Rt+De),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let y=this.centerOffset,O=ar(this.worldSize,this.center),ie=O.x,ce=O.y;this._helper._pixelPerMeter=e.aq(1,this.center.lat)*this.worldSize;let _e=e.an(Math.min(this.pitch,Kt)),De=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(_e)),Ne;var Ye,lt;this._calculateNearFarZIfNeeded(De,_e,y),Ne=new Float64Array(16),e.bc(Ne,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(Ye=this._invProjMatrix)[0]=1/(lt=Ne)[0],Ye[1]=0,Ye[2]=0,Ye[3]=0,Ye[4]=0,Ye[5]=1/lt[5],Ye[6]=0,Ye[7]=0,Ye[8]=0,Ye[9]=0,Ye[10]=0,Ye[11]=1/lt[14],Ye[12]=0,Ye[13]=0,Ye[14]=-1,Ye[15]=lt[10]/lt[14],Ne[8]=2*-y.x/this._helper._width,Ne[9]=2*y.y/this._helper._height,this._projectionMatrix=e.bd(Ne),e.S(Ne,Ne,[1,-1,1]),e.Q(Ne,Ne,[0,0,-this._helper.cameraToCenterDistance]),e.be(Ne,Ne,-this.rollInRadians),e.bf(Ne,Ne,this.pitchInRadians),e.be(Ne,Ne,-this.bearingInRadians),e.Q(Ne,Ne,[-ie,-ce,0]),this._mercatorMatrix=e.S([],Ne,[this.worldSize,this.worldSize,this.worldSize]),e.S(Ne,Ne,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,Ne),e.Q(Ne,Ne,[0,0,-this.elevation]),this._viewProjMatrix=Ne,this._invViewProjMatrix=e.bg([],Ne);let ct=[0,0,-1,1];e.aE(ct,ct,this._invViewProjMatrix),this._cameraPosition=[ct[0]/ct[3],ct[1]/ct[3],ct[2]/ct[3]],this._fogMatrix=new Float64Array(16),e.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,De,this._helper._farZ),this._fogMatrix[8]=2*-y.x/this.width,this._fogMatrix[9]=2*y.y/this.height,e.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),e.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),e.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),e.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),e.Q(this._fogMatrix,this._fogMatrix,[-ie,-ce,0]),e.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,Ne);let Ft=this._helper._width%2/2,Gt=this._helper._height%2/2,Jt=Math.cos(this.bearingInRadians),it=Math.sin(-this.bearingInRadians),Rt=ie-Math.round(ie)+Jt*Ft+it*Gt,qt=ce-Math.round(ce)+Jt*Gt+it*Ft,or=new Float64Array(Ne);if(e.Q(or,or,[Rt>.5?Rt-1:Rt,qt>.5?qt-1:qt,0]),this._alignedProjMatrix=or,Ne=e.bg(new Float64Array(16),this._pixelMatrix),!Ne)throw new Error("failed to invert matrix");this._pixelMatrixInverse=Ne,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let y=this.screenPointToMercatorCoordinate(new e.P(0,0)),O=[y.x*this.worldSize,y.y*this.worldSize,0,1];return e.aE(O,O,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/y).toLngLat()}lngLatToCameraDepth(y,O){let ie=e.a7.fromLngLat(y),ce=[ie.x*this.worldSize,ie.y*this.worldSize,O,1];return e.aE(ce,ce,this._viewProjMatrix),ce[2]/ce[3]}getProjectionData(y){let{overscaledTileID:O,aligned:ie,applyTerrainMatrix:ce}=y,_e=this._helper.getMercatorTileCoordinates(O),De=O?this.calculatePosMatrix(O,ie,!0):null,Ne;return Ne=O?.terrainRttPosMatrix32f&&ce?O.terrainRttPosMatrix32f:De||e.bh(),{mainMatrix:Ne,tileMercatorCoords:_e,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:Ne}}isLocationOccluded(y){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(y,O,ie){return 1}transformLightDirection(y){return e.a$(y)}getRayDirectionFromPixel(y){throw new Error("Not implemented.")}projectTileCoordinates(y,O,ie,ce){let _e=this.calculatePosMatrix(ie),De;ce?(De=[y,O,ce(y,O),1],e.aE(De,De,_e)):(De=[y,O,0,1],Za(De,De,_e));let Ne=De[3];return{point:new e.P(De[0]/Ne,De[1]/Ne),signedDistanceFromCamera:Ne,isOccluded:!1}}populateCache(y){for(let O of y)this.calculatePosMatrix(O)}getMatrixForModel(y,O){let ie=e.a7.fromLngLat(y,O),ce=ie.meterInMercatorCoordinateUnits(),_e=e.bi();return e.Q(_e,_e,[ie.x,ie.y,ie.z]),e.be(_e,_e,Math.PI),e.bf(_e,_e,Math.PI/2),e.S(_e,_e,[-ce,ce,ce]),_e}getProjectionDataForCustomLayer(y=!0){let O=new e.a3(0,0,0,0,0),ie=this.getProjectionData({overscaledTileID:O,applyGlobeMatrix:y}),ce=sr(O,this.worldSize);e.U(ce,this._viewProjMatrix,ce),ie.tileMercatorCoords=[0,0,1,1];let _e=[e.a6,e.a6,this.worldSize/this._helper.pixelsPerMeter],De=e.bj();return e.S(De,ce,_e),ie.fallbackMatrix=De,ie.mainMatrix=De,ie}getFastPathSimpleProjectionMatrix(y){return this.calculatePosMatrix(y)}}function Oo(){e.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function ws(de){if(de.useSlerp)if(de.k<1){let y=e.bk(de.startEulerAngles.roll,de.startEulerAngles.pitch,de.startEulerAngles.bearing),O=e.bk(de.endEulerAngles.roll,de.endEulerAngles.pitch,de.endEulerAngles.bearing),ie=new Float64Array(4);e.bl(ie,y,O,de.k);let ce=e.bm(ie);de.tr.setRoll(ce.roll),de.tr.setPitch(ce.pitch),de.tr.setBearing(ce.bearing)}else de.tr.setRoll(de.endEulerAngles.roll),de.tr.setPitch(de.endEulerAngles.pitch),de.tr.setBearing(de.endEulerAngles.bearing);else de.tr.setRoll(e.H.number(de.startEulerAngles.roll,de.endEulerAngles.roll,de.k)),de.tr.setPitch(e.H.number(de.startEulerAngles.pitch,de.endEulerAngles.pitch,de.k)),de.tr.setBearing(e.H.number(de.startEulerAngles.bearing,de.endEulerAngles.bearing,de.k))}function Ko(de,y,O,ie,ce){let _e=ce.padding,De=ar(ce.worldSize,O.getNorthWest()),Ne=ar(ce.worldSize,O.getNorthEast()),Ye=ar(ce.worldSize,O.getSouthEast()),lt=ar(ce.worldSize,O.getSouthWest()),ct=e.an(-ie),Ft=De.rotate(ct),Gt=Ne.rotate(ct),Jt=Ye.rotate(ct),it=lt.rotate(ct),Rt=new e.P(Math.max(Ft.x,Gt.x,it.x,Jt.x),Math.max(Ft.y,Gt.y,it.y,Jt.y)),qt=new e.P(Math.min(Ft.x,Gt.x,it.x,Jt.x),Math.min(Ft.y,Gt.y,it.y,Jt.y)),or=Rt.sub(qt),vr=(ce.width-(_e.left+_e.right+y.left+y.right))/or.x,Ar=(ce.height-(_e.top+_e.bottom+y.top+y.bottom))/or.y;if(Ar<0||vr<0)return void Oo();let dr=Math.min(e.ar(ce.scale*Math.min(vr,Ar)),de.maxZoom),mr=e.P.convert(de.offset),qr=new e.P((y.left-y.right)/2,(y.top-y.bottom)/2).rotate(e.an(ie)),Lr=mr.add(qr).mult(ce.scale/e.ao(dr));return{center:_r(ce.worldSize,De.add(Ye).div(2).sub(Lr)),zoom:dr,bearing:ie}}class as{get useGlobeControls(){return!1}handlePanInertia(y,O){let ie=y.mag(),ce=Math.abs(Zt(O));return{easingOffset:y.mult(Math.min(.75*ce/ie,1)),easingCenter:O.center}}handleMapControlsRollPitchBearingZoom(y,O){y.bearingDelta&&O.setBearing(O.bearing+y.bearingDelta),y.pitchDelta&&O.setPitch(O.pitch+y.pitchDelta),y.rollDelta&&O.setRoll(O.roll+y.rollDelta),y.zoomDelta&&O.setZoom(O.zoom+y.zoomDelta)}handleMapControlsPan(y,O,ie){y.around.distSqr(O.centerPoint)<.01||O.setLocationAtPoint(ie,y.around)}cameraForBoxAndBearing(y,O,ie,ce,_e){return Ko(y,O,ie,ce,_e)}handleJumpToCenterZoom(y,O){y.zoom!==(O.zoom!==void 0?+O.zoom:y.zoom)&&y.setZoom(+O.zoom),O.center!==void 0&&y.setCenter(e.W.convert(O.center))}handleEaseTo(y,O){let ie=y.zoom,ce=y.padding,_e={roll:y.roll,pitch:y.pitch,bearing:y.bearing},De={roll:O.roll===void 0?y.roll:O.roll,pitch:O.pitch===void 0?y.pitch:O.pitch,bearing:O.bearing===void 0?y.bearing:O.bearing},Ne=O.zoom!==void 0,Ye=!y.isPaddingEqual(O.padding),lt=!1,ct=Ne?+O.zoom:y.zoom,Ft=y.centerPoint.add(O.offsetAsPoint),Gt=y.screenPointToLocation(Ft),{center:Jt,zoom:it}=y.applyConstrain(e.W.convert(O.center||Gt),ct??ie);oi(y,Jt);let Rt=ar(y.worldSize,Gt),qt=ar(y.worldSize,Jt).sub(Rt),or=e.ao(it-ie);return lt=it!==ie,{easeFunc:vr=>{if(lt&&y.setZoom(e.H.number(ie,it,vr)),e.bn(_e,De)||ws({startEulerAngles:_e,endEulerAngles:De,tr:y,k:vr,useSlerp:_e.roll!=De.roll}),Ye&&(y.interpolatePadding(ce,O.padding,vr),Ft=y.centerPoint.add(O.offsetAsPoint)),O.around)y.setLocationAtPoint(O.around,O.aroundPoint);else{let Ar=e.ao(y.zoom-ie),dr=it>ie?Math.min(2,or):Math.max(.5,or),mr=Math.pow(dr,1-vr),qr=_r(y.worldSize,Rt.add(qt.mult(vr*mr)).mult(Ar));y.setLocationAtPoint(y.renderWorldCopies?qr.wrap():qr,Ft)}},isZooming:lt,elevationCenter:Jt}}handleFlyTo(y,O){let ie=O.zoom!==void 0,ce=y.zoom,_e=y.applyConstrain(e.W.convert(O.center||O.locationAtOffset),ie?+O.zoom:ce),De=_e.center,Ne=_e.zoom;oi(y,De);let Ye=ar(y.worldSize,O.locationAtOffset),lt=ar(y.worldSize,De).sub(Ye),ct=lt.mag(),Ft=e.ao(Ne-ce),Gt;if(O.minZoom!==void 0){let Jt=Math.min(+O.minZoom,ce,Ne),it=y.applyConstrain(De,Jt).zoom;Gt=e.ao(it-ce)}return{easeFunc:(Jt,it,Rt,qt)=>{y.setZoom(Jt===1?Ne:ce+e.ar(it));let or=Jt===1?De:_r(y.worldSize,Ye.add(lt.mult(Rt)).mult(it));y.setLocationAtPoint(y.renderWorldCopies?or.wrap():or,qt)},scaleOfZoom:Ft,targetCenter:De,scaleOfMinZoom:Gt,pixelPathLength:ct}}}class wo{constructor(y,O,ie){this.blendFunction=y,this.blendColor=O,this.mask=ie}}wo.Replace=[1,0],wo.disabled=new wo(wo.Replace,e.bo.transparent,[!1,!1,!1,!1]),wo.unblended=new wo(wo.Replace,e.bo.transparent,[!0,!0,!0,!0]),wo.alphaBlended=new wo([1,771],e.bo.transparent,[!0,!0,!0,!0]);let No=2305;class Di{constructor(y,O,ie){this.enable=y,this.mode=O,this.frontFace=ie}}Di.disabled=new Di(!1,1029,No),Di.backCCW=new Di(!0,1029,No),Di.frontCCW=new Di(!0,1028,No);class lo{constructor(y,O,ie){this.func=y,this.mask=O,this.range=ie}}lo.ReadOnly=!1,lo.ReadWrite=!0,lo.disabled=new lo(519,lo.ReadOnly,[0,1]);let Go=7680;class go{constructor(y,O,ie,ce,_e,De){this.test=y,this.ref=O,this.mask=ie,this.fail=ce,this.depthFail=_e,this.pass=De}}function us(de){return typeof WebGL2RenderingContext<"u"&&de instanceof WebGL2RenderingContext}go.disabled=new go({func:519,mask:0},0,0,Go,Go,Go);class Jo{get awaitingQuery(){return!!this._readbackQueue}constructor(y){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=y;let O=y.context,ie=O.gl;this._texFormat=ie.RGBA,this._texType=ie.UNSIGNED_BYTE;let ce=new e.aU;ce.emplaceBack(-1,-1),ce.emplaceBack(2,-1),ce.emplaceBack(-1,2);let _e=new e.aW;_e.emplaceBack(0,1,2),this._fullscreenTriangle=new fi(O.createVertexBuffer(ce,xo.members),O.createIndexBuffer(_e),e.aV.simpleSegment(0,0,ce.length,_e.length)),this._resultBuffer=new Uint8Array(4),O.activeTexture.set(ie.TEXTURE1);let De=ie.createTexture();ie.bindTexture(ie.TEXTURE_2D,De),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_S,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_T,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MIN_FILTER,ie.NEAREST),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MAG_FILTER,ie.NEAREST),ie.texImage2D(ie.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=O.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(De),us(ie)&&(this._pbo=ie.createBuffer(),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,this._pbo),ie.bufferData(ie.PIXEL_PACK_BUFFER,4,ie.STREAM_READ),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,null))}destroy(){let y=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),y.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(y,O){let ie=this._updateCount;return this._readbackQueue?ie>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():ie>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(y,O),this._updateCount++,this._measuredError}_bindFramebuffer(){let y=this._cachedRenderContext.context,O=y.gl;y.activeTexture.set(O.TEXTURE1),O.bindTexture(O.TEXTURE_2D,this._fbo.colorAttachment.get()),y.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(y,O){let ie=this._cachedRenderContext.context,ce=ie.gl;if(this._bindFramebuffer(),ie.viewport.set([0,0,this._texWidth,this._texHeight]),ie.clear({color:e.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(ie,ce.TRIANGLES,lo.disabled,go.disabled,wo.unblended,Di.disabled,((_e,De)=>({u_input:_e,u_output_expected:De}))(y,O),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&us(ce)){ce.bindBuffer(ce.PIXEL_PACK_BUFFER,this._pbo),ce.readBuffer(ce.COLOR_ATTACHMENT0),ce.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),ce.bindBuffer(ce.PIXEL_PACK_BUFFER,null);let _e=ce.fenceSync(ce.SYNC_GPU_COMMANDS_COMPLETE,0);ce.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:_e}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let y=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&us(y)){let O=y.clientWaitSync(this._readbackQueue.sync,0,0);if(O===y.WAIT_FAILED)return e.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(O===y.TIMEOUT_EXPIRED)return;y.bindBuffer(y.PIXEL_PACK_BUFFER,this._pbo),y.getBufferSubData(y.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),y.bindBuffer(y.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),y.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=Jo._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(y){let O=0;return O+=y[0]/256,O+=y[1]/65536,O+=y[2]/16777216,y[3]<127&&(O=-O),O/128}}let zs=e.a6/128;function Is(de,y){let O=de.granularity!==void 0?Math.max(de.granularity,1):1,ie=O+(de.generateBorders?2:0),ce=O+(de.extendToNorthPole||de.generateBorders?1:0)+(de.extendToSouthPole||de.generateBorders?1:0),_e=ie+1,De=ce+1,Ne=de.generateBorders?-1:0,Ye=de.generateBorders||de.extendToNorthPole?-1:0,lt=O+(de.generateBorders?1:0),ct=O+(de.generateBorders||de.extendToSouthPole?1:0),Ft=_e*De,Gt=ie*ce*6,Jt=_e*De>65536;if(Jt&&y==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let it=Jt||y==="32bit",Rt=new Int16Array(2*Ft),qt=0;for(let Ar=Ye;Ar<=ct;Ar++)for(let dr=Ne;dr<=lt;dr++){let mr=dr/O*e.a6;dr===-1&&(mr=-zs),dr===O+1&&(mr=e.a6+zs);let qr=Ar/O*e.a6;Ar===-1&&(qr=de.extendToNorthPole?e.bq:-zs),Ar===O+1&&(qr=de.extendToSouthPole?e.br:e.a6+zs),Rt[qt++]=mr,Rt[qt++]=qr}let or=it?new Uint32Array(Gt):new Uint16Array(Gt),vr=0;for(let Ar=0;Ar0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(y){this._mercatorProjection.updateGPUdependent(y),this._verticalPerspectiveProjection.updateGPUdependent(y)}getMeshFromTileID(y,O,ie,ce,_e){return this.currentProjection.getMeshFromTileID(y,O,ie,ce,_e)}setProjection(y){this._transitionable.setValue("type",y?.type||"mercator")}updateTransitions(y){this._transitioning=this._transitionable.transitioned(y,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(y){this.properties=this._transitioning.possiblyEvaluate(y)}setErrorQueryLatitudeDegrees(y){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(y),this._mercatorProjection.setErrorQueryLatitudeDegrees(y)}}function Fo(de){let y=Ls(de.worldSize,de.center.lat);return 2*Math.PI*y}function Ji(de,y,O,ie,ce){let _e=1/(1<1e-6){let ie=de[0]/O,ce=Math.acos(de[2]/O),_e=(ie>0?ce:-ce)/Math.PI*180;return new e.W(e.X(_e,-180,180),y)}return new e.W(0,y)}function ml(de){return Math.cos(de*Math.PI/180)}function Ts(de,y){let O=ml(de),ie=ml(y);return e.ar(ie/O)}function yl(de,y){let O=de.rotate(y.bearingInRadians),ie=y.zoom+Ts(y.center.lat,0),ce=e.bt(1/ml(y.center.lat),1/ml(Math.min(Math.abs(y.center.lat),60)),e.bw(ie,7,3,0,1)),_e=360/Fo({worldSize:y.worldSize,center:{lat:y.center.lat}});return new e.W(y.center.lng-O.x*_e*ce,e.al(y.center.lat+O.y*_e,-e.am,e.am))}function mu(de){let y=.5*de,O=Math.sin(y),ie=Math.cos(y);return Math.log(O+ie)-Math.log(ie-O)}function su(de,y,O,ie){let ce=de.lat+O*ie;if(Math.abs(O)>1){let _e=(Math.sign(de.lat+O)!==Math.sign(de.lat)?-Math.abs(de.lat):Math.abs(de.lat))*Math.PI/180,De=Math.abs(de.lat+O)*Math.PI/180,Ne=mu(_e+ie*(De-_e)),Ye=mu(_e),lt=mu(De);return new e.W(de.lng+y*((Ne-Ye)/(lt-Ye)),ce)}return new e.W(de.lng+y*ie,ce)}class cc{constructor(y){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=y}swapBuffers(){if(!this._hadAnyChanges)return;let y=this._cachePrevious;this._cachePrevious=this._cache,this._cache=y,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(y,O,ie,ce){let _e=`${y.z}_${y.x}_${y.y}_${ce?.terrain?"t":""}`,De=this._cache.get(_e);if(De)return De;let Ne=this._cachePrevious.get(_e);if(Ne)return this._cache.set(_e,Ne),Ne;let Ye=this._boundingVolumeFactory(y,O,ie,ce);return this._cache.set(_e,Ye),this._hadAnyChanges=!0,Ye}}class Bl{constructor(y,O,ie,ce){this.min=ie,this.max=ce,this.points=y,this.planes=O}static fromAabb(y,O){let ie=[];for(let ce=0;ce<8;ce++)ie.push([1&~ce?y[0]:O[0],(ce>>1&1)==1?O[1]:y[1],(ce>>2&1)==1?O[2]:y[2]]);return new Bl(ie,[[-1,0,0,O[0]],[1,0,0,-y[0]],[0,-1,0,O[1]],[0,1,0,-y[1]],[0,0,-1,O[2]],[0,0,1,-y[2]]],y,O)}static fromCenterSizeAngles(y,O,ie){let ce=e.bA([],ie[0],ie[1],ie[2]),_e=e.bB([],[O[0],0,0],ce),De=e.bB([],[0,O[1],0],ce),Ne=e.bB([],[0,0,O[2]],ce),Ye=[...y],lt=[...y];for(let Ft=0;Ft<8;Ft++)for(let Gt=0;Gt<3;Gt++){let Jt=y[Gt]+_e[Gt]*(1&~Ft?-1:1)+De[Gt]*((Ft>>1&1)==1?1:-1)+Ne[Gt]*((Ft>>2&1)==1?1:-1);Ye[Gt]=Math.min(Ye[Gt],Jt),lt[Gt]=Math.max(lt[Gt],Jt)}let ct=[];for(let Ft=0;Ft<8;Ft++){let Gt=[...y];e.a_(Gt,Gt,e.aZ([],_e,1&~Ft?-1:1)),e.a_(Gt,Gt,e.aZ([],De,(Ft>>1&1)==1?1:-1)),e.a_(Gt,Gt,e.aZ([],Ne,(Ft>>2&1)==1?1:-1)),ct.push(Gt)}return new Bl(ct,[[..._e,-e.b3(_e,ct[0])],[...De,-e.b3(De,ct[0])],[...Ne,-e.b3(Ne,ct[0])],[-_e[0],-_e[1],-_e[2],-e.b3(_e,ct[7])],[-De[0],-De[1],-De[2],-e.b3(De,ct[7])],[-Ne[0],-Ne[1],-Ne[2],-e.b3(Ne,ct[7])]],Ye,lt)}intersectsFrustum(y){let O=!0,ie=this.points.length,ce=this.planes.length,_e=y.planes.length,De=y.points.length;for(let Ne=0;Ne<_e;Ne++){let Ye=y.planes[Ne],lt=0;for(let ct=0;ct=0&<++}if(lt===0)return 0;lt=0&<++}if(lt===0)return 0}return 1}intersectsPlane(y){let O=this.points.length,ie=0;for(let ce=0;ce=0&&ie++}return ie===O?2:ie===0?0:1}}function _l(de,y,O){let ie=de-y;return ie<0?-ie:Math.max(0,ie-O)}function ju(de,y,O,ie,ce){let _e=de-O,De;return De=_e<0?Math.min(-_e,1+_e-ce):_e>ce?Math.min(Math.max(_e-ce,0),1-_e):0,Math.max(De,_l(y,ie,ce))}class lu{constructor(){this._boundingVolumeCache=new cc(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(y,O,ie,ce){let _e=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(y,O,ie,ce){return this._boundingVolumeCache.getTileBoundingVolume(y,O,ie,ce)}_computeTileBoundingVolume(y,O,ie,ce){var _e,De;let Ne=0,Ye=0;if(ce?.terrain){let lt=new e.a3(y.z,O,y.z,y.x,y.y),ct=ce.terrain.getMinMaxElevation(lt);Ne=(_e=ct.minElevation)!==null&&_e!==void 0?_e:Math.min(0,ie),Ye=(De=ct.maxElevation)!==null&&De!==void 0?De:Math.max(0,ie)}if(Ne/=e.bD,Ye/=e.bD,Ne+=1,Ye+=1,y.z<=0)return Bl.fromAabb([-Ye,-Ye,-Ye],[Ye,Ye,Ye]);if(y.z===1)return Bl.fromAabb([y.x===0?-Ye:0,y.y===0?0:-Ye,-Ye],[y.x===0?0:Ye,y.y===0?Ye:0,Ye]);{let lt=[Ji(0,0,y.x,y.y,y.z),Ji(e.a6,0,y.x,y.y,y.z),Ji(e.a6,e.a6,y.x,y.y,y.z),Ji(0,e.a6,y.x,y.y,y.z)],ct=[];for(let Ua of lt)ct.push(e.aZ([],Ua,Ye));if(Ye!==Ne)for(let Ua of lt)ct.push(e.aZ([],Ua,Ne));y.y===0&&ct.push([0,1,0]),y.y===(1<=(1<{let ce=e.al(O.lat,-e.am,e.am),_e=e.al(+ie,this.minZoom+Ts(0,ce),this.maxZoom);return{center:new e.W(O.lng,ce),zoom:_e}},this.applyConstrain=(O,ie)=>this._helper.applyConstrain(O,ie),this._helper=new co({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(O,ie)=>this.defaultConstrain(O,ie)},y),this._coveringTilesDetailsProvider=new lu}clone(){let y=new As;return y.apply(this,!1),y}apply(y,O,ie){this._globeLatitudeErrorCorrectionRadians=ie||0,this._helper.apply(y,O)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let y=e.bz();return y[0]=this._cameraPosition[0],y[1]=this._cameraPosition[1],y[2]=this._cameraPosition[2],y}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(y){let{overscaledTileID:O,applyGlobeMatrix:ie}=y,ce=this._helper.getMercatorTileCoordinates(O);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:ce,clippingPlane:this._cachedClippingPlane,projectionTransition:ie?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(y){let O=this.pitchInRadians,ie=this.cameraToCenterDistance/y,ce=Math.sin(O)*ie,_e=Math.cos(O)*ie+1,De=1/Math.sqrt(ce*ce+_e*_e)*1,Ne=-ce,Ye=_e,lt=Math.sqrt(Ne*Ne+Ye*Ye);Ne/=lt,Ye/=lt;let ct=[0,Ne,Ye];e.bF(ct,ct,[0,0,0],-this.bearingInRadians),e.bG(ct,ct,[0,0,0],-1*this.center.lat*Math.PI/180),e.bH(ct,ct,[0,0,0],this.center.lng*Math.PI/180);let Ft=1/e.b5(ct);return e.aZ(ct,ct,Ft),[...ct,-De*Ft]}isLocationOccluded(y){return!this.isSurfacePointVisible(Ro(y))}transformLightDirection(y){let O=this._helper._center.lng*Math.PI/180,ie=this._helper._center.lat*Math.PI/180,ce=Math.cos(ie),_e=[Math.sin(O)*ce,Math.sin(ie),Math.cos(O)*ce],De=[_e[2],0,-_e[0]],Ne=[0,0,0];e.b2(Ne,De,_e),e.b1(De,De),e.b1(Ne,Ne);let Ye=[0,0,0];return e.b1(Ye,[De[0]*y[0]+Ne[0]*y[1]+_e[0]*y[2],De[1]*y[0]+Ne[1]*y[1]+_e[1]*y[2],De[2]*y[0]+Ne[2]*y[1]+_e[2]*y[2]]),Ye}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(y,O,ie){let ce=function(Ne,Ye,lt){let ct=1/(1<_e&&(_e=Gt),JtNe&&(Ne=Jt)}let ct=[lt.lng+De,lt.lat+Ye,lt.lng+_e,lt.lat+Ne];return this.isSurfacePointOnScreen([0,1,0])&&(ct[3]=90,ct[0]=-180,ct[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(ct[1]=-90,ct[0]=-180,ct[2]=180),new q(ct)}calculateCenterFromCameraLngLatAlt(y,O,ie,ce){return this._helper.calculateCenterFromCameraLngLatAlt(y,O,ie,ce)}setLocationAtPoint(y,O){let ie=Ro(this.unprojectScreenPoint(O)),ce=Ro(y),_e=e.bz();e.bK(_e);let De=e.bz();e.bH(De,ie,_e,-this.center.lng*Math.PI/180),e.bG(De,De,_e,this.center.lat*Math.PI/180);let Ne=ce[0]*ce[0]+ce[2]*ce[2],Ye=De[0]*De[0];if(Ne=-or&&it<=or,Ar=qt>=-or&&qt<=or,dr,mr;if(vr&&Ar){let Ba=this.center.lng*Math.PI/180,Pa=this.center.lat*Math.PI/180;e.bM(Ft,Ba)+e.bM(it,Pa)=0}isSurfacePointOnScreen(y){if(!this.isSurfacePointVisible(y))return!1;let O=e.bE();return e.aE(O,[...y,1],this._globeViewProjMatrixNoCorrection),O[0]/=O[3],O[1]/=O[3],O[2]/=O[3],O[0]>-1&&O[0]<1&&O[1]>-1&&O[1]<1&&O[2]>-1&&O[2]<1}rayPlanetIntersection(y,O){let ie=e.b3(y,O),ce=e.bz(),_e=e.bz();e.aZ(_e,O,ie),e.b0(ce,y,_e);let De=1-e.b3(ce,ce);if(De<0)return null;let Ne=e.b3(y,y)-1,Ye=-ie+(ie<0?1:-1)*Math.sqrt(De),lt=Ne/Ye,ct=Ye;return{tMin:Math.min(lt,ct),tMax:Math.max(lt,ct)}}unprojectScreenPoint(y){let O=this._cameraPosition,ie=this.getRayDirectionFromPixel(y),ce=this.rayPlanetIntersection(O,ie);if(ce){let ct=e.bz();e.a_(ct,O,[ie[0]*ce.tMin,ie[1]*ce.tMin,ie[2]*ce.tMin]);let Ft=e.bz();return e.b1(Ft,ct),zl(Ft)}let _e=this._cachedClippingPlane,De=_e[0]*ie[0]+_e[1]*ie[1]+_e[2]*ie[2],Ne=-e.b9(_e,O)/De,Ye=e.bz();if(Ne>0)e.a_(Ye,O,[ie[0]*Ne,ie[1]*Ne,ie[2]*Ne]);else{let ct=e.bz();e.a_(ct,O,[2*ie[0],2*ie[1],2*ie[2]]);let Ft=e.b9(this._cachedClippingPlane,ct);e.b0(Ye,ct,[this._cachedClippingPlane[0]*Ft,this._cachedClippingPlane[1]*Ft,this._cachedClippingPlane[2]*Ft])}let lt=function(ct){let Ft=e.bz();return Ft[0]=ct[0]*-ct[3],Ft[1]=ct[1]*-ct[3],Ft[2]=ct[2]*-ct[3],{center:Ft,radius:Math.sqrt(1-ct[3]*ct[3])}}(_e);return zl(function(ct,Ft,Gt){let Jt=e.bz();e.b0(Jt,Gt,ct);let it=e.bz();return e.bx(it,ct,Jt,Ft/e.b7(Jt)),it}(lt.center,lt.radius,Ye))}getMatrixForModel(y,O){let ie=e.W.convert(y),ce=1/e.bD,_e=e.bi();return e.bI(_e,_e,ie.lng/180*Math.PI),e.bf(_e,_e,-ie.lat/180*Math.PI),e.Q(_e,_e,[0,0,1+O/e.bD]),e.bf(_e,_e,.5*Math.PI),e.S(_e,_e,[ce,ce,ce]),_e}getProjectionDataForCustomLayer(y=!0){let O=this.getProjectionData({overscaledTileID:new e.a3(0,0,0,0,0),applyGlobeMatrix:y});return O.tileMercatorCoords=[0,0,1,1],O}getFastPathSimpleProjectionMatrix(y){}}class ms{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,O,ie){this._helper.interpolatePadding(y,O,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,O,ie=!0){this._helper.resize(y,O,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,O){this._helper.overrideNearFarZ(y,O)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(y,O){this._globeness=y,this._globeLatitudeErrorCorrectionRadians=O,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(y){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(O,ie)=>this.currentTransform.defaultConstrain(O,ie),this.applyConstrain=(O,ie)=>this._helper.applyConstrain(O,ie),this._helper=new co({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(O,ie)=>this.defaultConstrain(O,ie)},y),this._globeness=1,this._mercatorTransform=new qo,this._verticalPerspectiveTransform=new As}clone(){let y=new ms;return y._globeness=this._globeness,y._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,y.apply(this,!1),y}apply(y,O){this._helper.apply(y,O),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(y){let O=this._mercatorTransform.getProjectionData(y),ie=this._verticalPerspectiveTransform.getProjectionData(y);return{mainMatrix:this.isGlobeRendering?ie.mainMatrix:O.mainMatrix,clippingPlane:ie.clippingPlane,tileMercatorCoords:ie.tileMercatorCoords,projectionTransition:y.applyGlobeMatrix?this._globeness:0,fallbackMatrix:O.fallbackMatrix}}isLocationOccluded(y){return this.currentTransform.isLocationOccluded(y)}transformLightDirection(y){return this.currentTransform.transformLightDirection(y)}getPixelScale(){return e.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return e.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(y,O,ie){let ce=this._mercatorTransform.getPitchedTextCorrection(y,O,ie),_e=this._verticalPerspectiveTransform.getPitchedTextCorrection(y,O,ie);return e.bt(ce,_e,this._globeness)}projectTileCoordinates(y,O,ie,ce){return this.currentTransform.projectTileCoordinates(y,O,ie,ce)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(y){return this.currentTransform.calculateFogMatrix(y)}getVisibleUnwrappedCoordinates(y){return this.currentTransform.getVisibleUnwrappedCoordinates(y)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(y){this._mercatorTransform.recalculateZoomAndCenter(y),this._verticalPerspectiveTransform.recalculateZoomAndCenter(y)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(y,O){return this.currentTransform.lngLatToCameraDepth(y,O)}populateCache(y){this._mercatorTransform.populateCache(y),this._verticalPerspectiveTransform.populateCache(y)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(y,O,ie,ce){return this._helper.calculateCenterFromCameraLngLatAlt(y,O,ie,ce)}setLocationAtPoint(y,O){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(y,O),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(y,O),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(y,O){return this.currentTransform.locationToScreenPoint(y,O)}screenPointToMercatorCoordinate(y,O){return this.currentTransform.screenPointToMercatorCoordinate(y,O)}screenPointToLocation(y,O){return this.currentTransform.screenPointToLocation(y,O)}isPointOnMapSurface(y,O){return this.currentTransform.isPointOnMapSurface(y,O)}getRayDirectionFromPixel(y){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(y)}getMatrixForModel(y,O){return this.currentTransform.getMatrixForModel(y,O)}getProjectionDataForCustomLayer(y=!0){let O=this._mercatorTransform.getProjectionDataForCustomLayer(y);if(!this.isGlobeRendering)return O;let ie=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(y);return ie.fallbackMatrix=O.mainMatrix,ie}getFastPathSimpleProjectionMatrix(y){return this.currentTransform.getFastPathSimpleProjectionMatrix(y)}}class Ms{get useGlobeControls(){return!0}handlePanInertia(y,O){let ie=yl(y,O);return Math.abs(ie.lng-O.center.lng)>180&&(ie.lng=O.center.lng+179.5*Math.sign(ie.lng-O.center.lng)),{easingCenter:ie,easingOffset:new e.P(0,0)}}handleMapControlsRollPitchBearingZoom(y,O){let ie=y.around,ce=O.screenPointToLocation(ie);y.bearingDelta&&O.setBearing(O.bearing+y.bearingDelta),y.pitchDelta&&O.setPitch(O.pitch+y.pitchDelta),y.rollDelta&&O.setRoll(O.roll+y.rollDelta);let _e=O.zoom;y.zoomDelta&&O.setZoom(O.zoom+y.zoomDelta);let De=O.zoom-_e;if(De===0)return;let Ne=e.bJ(O.center.lng,ce.lng),Ye=Ne/(Math.abs(Ne/180)+1),lt=e.bJ(O.center.lat,ce.lat),ct=O.getRayDirectionFromPixel(ie),Ft=O.cameraPosition,Gt=-1*e.b3(Ft,ct),Jt=e.bz();e.a_(Jt,Ft,[ct[0]*Gt,ct[1]*Gt,ct[2]*Gt]);let it=e.b5(Jt)-1,Rt=Math.exp(.5*-Math.max(it-.3,0)),qt=Ls(O.worldSize,O.center.lat)/Math.min(O.width,O.height),or=e.bw(qt,.9,.5,1,.25),vr=(1-e.ao(-De))*Math.min(Rt,or),Ar=O.center.lat,dr=O.zoom,mr=new e.W(O.center.lng+Ye*vr,e.al(O.center.lat+lt*vr,-e.am,e.am));O.setLocationAtPoint(ce,ie);let qr=O.center,Lr=e.bw(Math.abs(Ne),45,85,0,1),ua=e.bw(qt,.75,.35,0,1),Ba=Math.pow(Math.max(Lr,ua),.25),Pa=e.bJ(qr.lng,mr.lng),Ua=e.bJ(qr.lat,mr.lat);O.setCenter(new e.W(qr.lng+Pa*Ba,qr.lat+Ua*Ba).wrap()),O.setZoom(dr+Ts(Ar,O.center.lat))}handleMapControlsPan(y,O,ie){if(!y.panDelta)return;let ce=O.center.lat,_e=O.zoom;O.setCenter(yl(y.panDelta,O).wrap()),O.setZoom(_e+Ts(ce,O.center.lat))}cameraForBoxAndBearing(y,O,ie,ce,_e){let De=Ko(y,O,ie,ce,_e),Ne=O.left/_e.width*2-1,Ye=(_e.width-O.right)/_e.width*2-1,lt=O.top/_e.height*-2+1,ct=(_e.height-O.bottom)/_e.height*-2+1,Ft=e.bJ(ie.getWest(),ie.getEast())<0,Gt=Ft?ie.getEast():ie.getWest(),Jt=Ft?ie.getWest():ie.getEast(),it=Math.max(ie.getNorth(),ie.getSouth()),Rt=Math.min(ie.getNorth(),ie.getSouth()),qt=Gt+.5*e.bJ(Gt,Jt),or=it+.5*e.bJ(it,Rt),vr=_e.clone();vr.setCenter(De.center),vr.setBearing(De.bearing),vr.setPitch(0),vr.setRoll(0),vr.setZoom(De.zoom);let Ar=vr.modelViewProjectionMatrix,dr=[Ro(ie.getNorthWest()),Ro(ie.getNorthEast()),Ro(ie.getSouthWest()),Ro(ie.getSouthEast()),Ro(new e.W(Jt,or)),Ro(new e.W(Gt,or)),Ro(new e.W(qt,it)),Ro(new e.W(qt,Rt))],mr=Ro(De.center),qr=Number.POSITIVE_INFINITY;for(let Lr of dr)Ne<0&&(qr=Ms.getLesserNonNegativeNonNull(qr,Ms.solveVectorScale(Lr,mr,Ar,"x",Ne))),Ye>0&&(qr=Ms.getLesserNonNegativeNonNull(qr,Ms.solveVectorScale(Lr,mr,Ar,"x",Ye))),lt>0&&(qr=Ms.getLesserNonNegativeNonNull(qr,Ms.solveVectorScale(Lr,mr,Ar,"y",lt))),ct<0&&(qr=Ms.getLesserNonNegativeNonNull(qr,Ms.solveVectorScale(Lr,mr,Ar,"y",ct)));if(Number.isFinite(qr)&&qr!==0)return De.zoom=Math.min(vr.zoom+e.ar(qr),y.maxZoom),De;Oo()}handleJumpToCenterZoom(y,O){let ie=y.center.lat,ce=y.applyConstrain(O.center?e.W.convert(O.center):y.center,y.zoom).center;y.setCenter(ce.wrap());let _e=O.zoom!==void 0?+O.zoom:y.zoom+Ts(ie,ce.lat);y.zoom!==_e&&y.setZoom(_e)}handleEaseTo(y,O){let ie=y.zoom,ce=y.center,_e=y.padding,De={roll:y.roll,pitch:y.pitch,bearing:y.bearing},Ne={roll:O.roll===void 0?y.roll:O.roll,pitch:O.pitch===void 0?y.pitch:O.pitch,bearing:O.bearing===void 0?y.bearing:O.bearing},Ye=O.zoom!==void 0,lt=!y.isPaddingEqual(O.padding),ct=!1,Ft=O.center?e.W.convert(O.center):ce,Gt=y.applyConstrain(Ft,ie).center;oi(y,Gt);let Jt=y.clone();Jt.setCenter(Gt),Jt.setZoom(Ye?+O.zoom:ie+Ts(ce.lat,Ft.lat)),Jt.setBearing(O.bearing);let it=new e.P(e.al(y.centerPoint.x+O.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+O.offsetAsPoint.y,0,y.height));Jt.setLocationAtPoint(Gt,it);let Rt=(O.offset&&O.offsetAsPoint.mag())>0?Jt.center:Gt,qt=Ye?+O.zoom:ie+Ts(ce.lat,Rt.lat),or=ie+Ts(ce.lat,0),vr=qt+Ts(Rt.lat,0),Ar=e.bJ(ce.lng,Rt.lng),dr=e.bJ(ce.lat,Rt.lat),mr=e.ao(vr-or);return ct=qt!==ie,{easeFunc:qr=>{if(e.bn(De,Ne)||ws({startEulerAngles:De,endEulerAngles:Ne,tr:y,k:qr,useSlerp:De.roll!=Ne.roll}),lt&&y.interpolatePadding(_e,O.padding,qr),O.around)e.w("Easing around a point is not supported under globe projection."),y.setLocationAtPoint(O.around,O.aroundPoint);else{let Lr=vr>or?Math.min(2,mr):Math.max(.5,mr),ua=Math.pow(Lr,1-qr),Ba=su(ce,Ar,dr,qr*ua);y.setCenter(Ba.wrap())}if(ct){let Lr=e.H.number(or,vr,qr)+Ts(0,y.center.lat);y.setZoom(Lr)}},isZooming:ct,elevationCenter:Rt}}handleFlyTo(y,O){let ie=O.zoom!==void 0,ce=y.center,_e=y.zoom,De=y.padding,Ne=!y.isPaddingEqual(O.padding),Ye=y.applyConstrain(e.W.convert(O.center||O.locationAtOffset),_e).center,lt=ie?+O.zoom:y.zoom+Ts(y.center.lat,Ye.lat),ct=y.clone();ct.setCenter(Ye),ct.setZoom(lt),ct.setBearing(O.bearing);let Ft=new e.P(e.al(y.centerPoint.x+O.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+O.offsetAsPoint.y,0,y.height));ct.setLocationAtPoint(Ye,Ft);let Gt=ct.center;oi(y,Gt);let Jt=function(dr,mr,qr){let Lr=Ro(mr),ua=Ro(qr),Ba=e.b3(Lr,ua),Pa=Math.acos(Ba),Ua=Fo(dr);return Pa/(2*Math.PI)*Ua}(y,ce,Gt),it=_e+Ts(ce.lat,0),Rt=lt+Ts(Gt.lat,0),qt=e.ao(Rt-it),or;if(typeof O.minZoom=="number"){let dr=+O.minZoom+Ts(Gt.lat,0),mr=Math.min(dr,it,Rt)+Ts(0,Gt.lat),qr=y.applyConstrain(Gt,mr).zoom+Ts(Gt.lat,0);or=e.ao(qr-it)}let vr=e.bJ(ce.lng,Gt.lng),Ar=e.bJ(ce.lat,Gt.lat);return{easeFunc:(dr,mr,qr,Lr)=>{let ua=su(ce,vr,Ar,qr);Ne&&y.interpolatePadding(De,O.padding,dr);let Ba=dr===1?Gt:ua;y.setCenter(Ba.wrap());let Pa=it+e.ar(mr);y.setZoom(dr===1?lt:Pa+Ts(0,Ba.lat))},scaleOfZoom:qt,targetCenter:Gt,scaleOfMinZoom:or,pixelPathLength:Jt}}static solveVectorScale(y,O,ie,ce,_e){let De=ce==="x"?[ie[0],ie[4],ie[8],ie[12]]:[ie[1],ie[5],ie[9],ie[13]],Ne=[ie[3],ie[7],ie[11],ie[15]],Ye=y[0]*De[0]+y[1]*De[1]+y[2]*De[2],lt=y[0]*Ne[0]+y[1]*Ne[1]+y[2]*Ne[2],ct=O[0]*De[0]+O[1]*De[1]+O[2]*De[2],Ft=O[0]*Ne[0]+O[1]*Ne[1]+O[2]*Ne[2];return ct+_e*lt===Ye+_e*Ft||Ne[3]*(Ye-ct)+De[3]*(Ft-lt)+Ye*Ft==ct*lt?null:(ct+De[3]-_e*Ft-_e*Ne[3])/(ct-Ye-_e*Ft+_e*lt)}static getLesserNonNegativeNonNull(y,O){return O!==null&&O>=0&&Oe.C(de,y?.filter(O=>O.identifier!=="source.canvas")),Eu=e.bN();class Uu extends e.E{constructor(y,O={}){var ie,ce;super(),this._rtlPluginLoaded=()=>{for(let De in this.tileManagers){let Ne=this.tileManagers[De].getSource().type;Ne!=="vector"&&Ne!=="geojson"||this.tileManagers[De].reload()}},this.map=y,this.dispatcher=new ne(re(),y._getMapId()),this.dispatcher.registerMessageHandler("GG",(De,Ne)=>this.getGlyphs(De,Ne)),this.dispatcher.registerMessageHandler("GI",(De,Ne)=>this.getImages(De,Ne)),this.dispatcher.registerMessageHandler("GDA",(De,Ne)=>this.getDashes(De,Ne)),this.imageManager=new C,this.imageManager.setEventedParent(this);let _e=((ie=y._container)===null||ie===void 0?void 0:ie.lang)||typeof document<"u"&&((ce=document.documentElement)===null||ce===void 0?void 0:ce.lang)||void 0;this.glyphManager=new b(y._requestManager,O.localIdeographFontFamily,_e),this.lineAtlas=new F(256,512),this.crossTileSymbolIndex=new ro,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",e.bO()),Ge().on(Te,this._rtlPluginLoaded),this.on("data",De=>{if(De.dataType!=="source"||De.sourceDataType!=="metadata")return;let Ne=this.tileManagers[De.sourceId];if(!Ne)return;let Ye=Ne.getSource();if(Ye?.vectorLayerIds)for(let lt in this._layers){let ct=this._layers[lt];ct.source===Ye.id&&this._validateLayer(ct)}})}_setInitialValues(){var y;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new e.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new(((y=this.crossTileSymbolIndex)===null||y===void 0?void 0:y.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(y,O){var ie,ce,_e;this._checkLoaded();let De=O===null?(_e=(ce=(ie=this.stylesheet.state)===null||ie===void 0?void 0:ie[y])===null||ce===void 0?void 0:ce.default)!==null&&_e!==void 0?_e:null:O;if(e.bQ(De,this._globalState[y]))return this;this._globalState[y]=De,this._applyGlobalStateChanges([y])}getGlobalState(){return this._globalState}setGlobalState(y){this._checkLoaded();let O=[];for(let ie in y)!e.bQ(this._globalState[ie],y[ie].default)&&(O.push(ie),this._globalState[ie]=y[ie].default);this._applyGlobalStateChanges(O)}_applyGlobalStateChanges(y){if(y.length===0)return;let O=new Set,ie={};for(let ce of y){ie[ce]=this._globalState[ce];for(let _e in this._layers){let De=this._layers[_e],Ne=De.getLayoutAffectingGlobalStateRefs(),Ye=De.getPaintAffectingGlobalStateRefs(),lt=De.getVisibilityAffectingGlobalStateRefs();if(Ne.has(ce)&&O.add(De.source),Ye.has(ce))for(let{name:ct,value:Ft}of Ye.get(ce))this._updatePaintProperty(De,ct,Ft);lt?.has(ce)&&(De.recalculateVisibility(),this._updateLayer(De))}}this.dispatcher.broadcast("UGS",ie);for(let ce in this.tileManagers)O.has(ce)&&(this._reloadSource(ce),this._changed=!0)}loadURL(y){return e._(this,arguments,void 0,function*(O,ie={},ce){this.fire(new e.n("dataloading",{dataType:"style"})),ie.validate=typeof ie.validate!="boolean"||ie.validate,this._loadStyleRequest=new AbortController;let _e=this._loadStyleRequest;try{let De=yield this.map._requestManager.transformRequest(O,"Style");e.bR(_e.signal);let Ne=yield e.k(De,_e);this._loadStyleRequest===_e&&(this._loadStyleRequest=null),this._load(Ne.data,ie,ce)}catch(De){this._loadStyleRequest===_e&&(this._loadStyleRequest=null),De&&!_e.signal.aborted&&this.fire(new e.l(e.d(De)))}})}loadJSON(y,O={},ie){this.fire(new e.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,s.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,O.validate=O.validate!==!1,this._load(y,O,ie)}).catch(()=>{})}loadEmpty(){this.fire(new e.n("dataloading",{dataType:"style"})),this._load(Eu,{validate:!1})}_load(y,O,ie){var ce,_e;let De=O.transformStyle?O.transformStyle(ie,y):y;if(!O.validate||!Su(this,e.F(De))){De=Object.assign({},De),this._loaded=!0,this.stylesheet=De;for(let Ne in De.sources)this.addSource(Ne,De.sources[Ne],{validate:!1});De.sprite?this._loadSprite(De.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(De.glyphs),this._createLayers(),this.light=new N(this.stylesheet.light),this._setProjectionInternal(((ce=this.stylesheet.projection)===null||ce===void 0?void 0:ce.type)||"mercator"),this.sky=new B(this.stylesheet.sky),this.map.setTerrain((_e=this.stylesheet.terrain)!==null&&_e!==void 0?_e:null),this.fire(new e.n("data",{dataType:"style"})),this.fire(new e.n("style.load"))}}_createLayers(){var y,O,ie;let ce=e.bS(this.stylesheet.layers);this.setGlobalState((y=this.stylesheet.state)!==null&&y!==void 0?y:null),this.dispatcher.broadcast("SL",ce),this._order=ce.map(_e=>_e.id),this._layers={},this._serializedLayers=null;for(let _e of ce){let De=e.bT(_e,this._globalState);if(De.setEventedParent(this,{layer:{id:_e.id}}),this._layers[_e.id]=De,e.bU(De)&&this.tileManagers[De.source]){let Ne=(ie=(O=_e.paint)===null||O===void 0?void 0:O["raster-fade-duration"])!==null&&ie!==void 0?ie:De.paint.get("raster-fade-duration");this.tileManagers[De.source].setRasterFadeDuration(Ne)}}}_loadSprite(y,O=!1,ie=void 0){this.imageManager.setLoaded(!1);let ce=new AbortController,_e;this._spriteRequest=ce,function(De,Ne,Ye,lt){return e._(this,void 0,void 0,function*(){let ct=T(De),Ft=Ye>1?"@2x":"",Gt={},Jt={};for(let{id:it,url:Rt}of ct){let qt=yield Ne.transformRequest(S(Rt,Ft,".json"),"SpriteJSON");Gt[it]=e.k(qt,lt);let or=yield Ne.transformRequest(S(Rt,Ft,".png"),"SpriteImage");Jt[it]=p.getImage(or,lt)}return yield Promise.all([...Object.values(Gt),...Object.values(Jt)]),function(it,Rt){return e._(this,void 0,void 0,function*(){let qt={};for(let or in it){qt[or]={};let vr=s.getImageCanvasContext((yield Rt[or]).data),Ar=(yield it[or]).data;for(let dr in Ar){let{width:mr,height:qr,x:Lr,y:ua,sdf:Ba,pixelRatio:Pa,stretchX:Ua,stretchY:ya,content:da,textFitWidth:Ma,textFitHeight:wa}=Ar[dr];qt[or][dr]={data:null,pixelRatio:Pa,sdf:Ba,stretchX:Ua,stretchY:ya,content:da,textFitWidth:Ma,textFitHeight:wa,spriteData:{width:mr,height:qr,x:Lr,y:ua,context:vr}}}}return qt})}(Gt,Jt)})}(y,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(De=>{if(this._spriteRequest=null,De)for(let Ne in De){this._spritesImagesIds[Ne]=[];let Ye=this._spritesImagesIds[Ne]?this._spritesImagesIds[Ne].filter(lt=>!(lt in De)):[];for(let lt of Ye)this.imageManager.removeImage(lt),this._changedImages[lt]=!0;for(let lt in De[Ne]){let ct=Ne==="default"?lt:`${Ne}:${lt}`;this._spritesImagesIds[Ne].push(ct),ct in this.imageManager.images?this.imageManager.updateImage(ct,De[Ne][lt],!1):this.imageManager.addImage(ct,De[Ne][lt]),O&&(this._changedImages[ct]=!0)}}}).catch(De=>{this._spriteRequest=null,_e=De,ce.signal.aborted||this.fire(new e.l(_e))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),O&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"})),ie&&ie(_e)})}_unloadSprite(){for(let y of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(y),this._changedImages[y]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}_validateLayer(y){let O=this.tileManagers[y.source];if(!O)return;let ie=y.sourceLayer;if(!ie)return;let ce=O.getSource();(ce.type==="geojson"||ce.vectorLayerIds&&!ce.vectorLayerIds.includes(ie))&&this.fire(new e.l(new Error(`Source layer "${ie}" does not exist on source "${ce.id}" as specified by style layer "${y.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let y in this.tileManagers)if(!this.tileManagers[y].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(y,O=!1){let ie=this._serializedAllLayers();if(!y||y.length===0)return Object.values(O?e.bV(ie):ie);let ce=[];for(let _e of y)if(ie[_e]){let De=O?e.bV(ie[_e]):ie[_e];ce.push(De)}return ce}_serializedAllLayers(){let y=this._serializedLayers;if(y)return y;y=this._serializedLayers={};let O=Object.keys(this._layers);for(let ie of O){let ce=this._layers[ie];ce.type!=="custom"&&(y[ie]=ce.serialize())}return y}hasTransitions(){var y,O,ie;if(!((y=this.light)===null||y===void 0)&&y.hasTransition()||!((O=this.sky)===null||O===void 0)&&O.hasTransition()||!((ie=this.projection)===null||ie===void 0)&&ie.hasTransition())return!0;for(let ce in this.tileManagers)if(this.tileManagers[ce].hasTransition())return!0;for(let ce in this._layers)if(this._layers[ce].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(y){if(!this._loaded)return;let O=this._changed;if(O){let ce=Object.keys(this._updatedLayers),_e=Object.keys(this._removedLayers);(ce.length||_e.length)&&this._updateWorkerLayers(ce,_e);for(let De in this._updatedSources){let Ne=this._updatedSources[De];if(Ne==="reload")this._reloadSource(De);else{if(Ne!=="clear")throw new Error(`Invalid action ${Ne}`);this._clearSource(De)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let De in this._updatedPaintProps)this._layers[De].updateTransitions(y);this.light.updateTransitions(y),this.sky.updateTransitions(y),this._resetUpdates()}let ie={};for(let ce in this.tileManagers){let _e=this.tileManagers[ce];ie[ce]=_e.used,_e.used=!1}for(let ce of this._order){let _e=this._layers[ce];_e.recalculate(y,this._availableImages),!_e.isHidden(y.zoom)&&_e.source&&(this.tileManagers[_e.source].used=!0)}for(let ce in ie){let _e=this.tileManagers[ce];!!ie[ce]!=!!_e.used&&_e.fire(new e.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:ce}))}this.light.recalculate(y),this.sky.recalculate(y),this.projection.recalculate(y),this.z=y.zoom,O&&this.fire(new e.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let y=Object.keys(this._changedImages);if(y.length){for(let O in this.tileManagers)this.tileManagers[O].reloadTilesForDependencies(["icons","patterns"],y);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let y in this.tileManagers)this.tileManagers[y].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(y,O){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(y,!1),removedIds:O})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(y,O={}){var ie;this._checkLoaded();let ce=this.serialize();if(y=O.transformStyle?O.transformStyle(ce,y):y,((ie=O.validate)===null||ie===void 0||ie)&&Su(this,e.F(y)))return!1;(y=e.bV(y)).layers=e.bS(y.layers);let _e=e.bW(ce,y),De=this._getOperationsToPerform(_e);if(De.unimplemented.length>0)throw new Error(`Unimplemented: ${De.unimplemented.join(", ")}.`);if(De.operations.length===0)return!1;for(let Ne of De.operations)Ne();return this.stylesheet=y,this._serializedLayers=null,this.fire(new e.n("style.load",{style:this})),!0}_getOperationsToPerform(y){let O=[],ie=[];for(let ce of y)switch(ce.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":O.push(()=>this.addLayer.apply(this,ce.args));break;case"removeLayer":O.push(()=>this.removeLayer.apply(this,ce.args));break;case"setPaintProperty":O.push(()=>this.setPaintProperty.apply(this,ce.args));break;case"setLayoutProperty":O.push(()=>this.setLayoutProperty.apply(this,ce.args));break;case"setFilter":O.push(()=>this.setFilter.apply(this,ce.args));break;case"addSource":O.push(()=>this.addSource.apply(this,ce.args));break;case"removeSource":O.push(()=>this.removeSource.apply(this,ce.args));break;case"setLayerZoomRange":O.push(()=>this.setLayerZoomRange.apply(this,ce.args));break;case"setLight":O.push(()=>this.setLight.apply(this,ce.args));break;case"setGeoJSONSourceData":O.push(()=>this.setGeoJSONSourceData.apply(this,ce.args));break;case"setGlyphs":O.push(()=>this.setGlyphs.apply(this,ce.args));break;case"setSprite":O.push(()=>this.setSprite.apply(this,ce.args));break;case"setTerrain":O.push(()=>this.map.setTerrain.apply(this,ce.args));break;case"setSky":O.push(()=>this.setSky.apply(this,ce.args));break;case"setProjection":this.setProjection.apply(this,ce.args);break;case"setGlobalState":O.push(()=>this.setGlobalState.apply(this,ce.args));break;case"setTransition":O.push(()=>{});break;default:ie.push(ce.command)}return{operations:O,unimplemented:ie}}addImage(y,O){if(this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" already exists.`)));this.imageManager.addImage(y,O),this._afterImageUpdated(y)}updateImage(y,O){this.imageManager.updateImage(y,O)}getImage(y){return this.imageManager.getImage(y)}removeImage(y){if(!this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" does not exist.`)));this.imageManager.removeImage(y),this._afterImageUpdated(y)}_afterImageUpdated(y){this._availableImages=this.imageManager.listImages(),this._changedImages[y]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(y,O,ie={}){var ce;if(this._checkLoaded(),this.tileManagers[y]!==void 0)throw new Error(`Source "${y}" already exists.`);if(!O.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(O).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(O.type)&&this._validate(e.F.source,`sources.${y}`,O,null,ie))return;!((ce=this.map)===null||ce===void 0)&&ce._collectResourceTiming&&(O.collectResourceTiming=!0);let _e=this.tileManagers[y]=new Sr(y,O,this.dispatcher);_e.style=this,_e.setEventedParent(this,()=>({isSourceLoaded:_e.loaded(),source:_e.serialize(),sourceId:y})),_e.onAdd(this.map),this._changed=!0}removeSource(y){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);for(let ie in this._layers)if(this._layers[ie].source===y)return this.fire(new e.l(new Error(`Source "${y}" cannot be removed while layer "${ie}" is using it.`)));let O=this.tileManagers[y];delete this.tileManagers[y],delete this._updatedSources[y],O.fire(new e.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:y})),O.setEventedParent(null),O.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(y,O){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);let ie=this.tileManagers[y].getSource();if(ie.type!=="geojson")throw new Error(`geojsonSource.type is ${ie.type}, which is !== 'geojson`);ie.setData(O),this._changed=!0}getSource(y){var O;return(O=this.tileManagers[y])===null||O===void 0?void 0:O.getSource()}addLayer(y,O,ie={}){this._checkLoaded();let ce=y.id;if(this.getLayer(ce))return void this.fire(new e.l(new Error(`Layer "${ce}" already exists on this map.`)));let _e;if(y.type==="custom"){if(Su(this,e.bX(y)))return;_e=e.bT(y,this._globalState)}else{if("source"in y&&typeof y.source=="object"&&(this.addSource(ce,y.source),y=e.bV(y),y=e.e(y,{source:ce})),this._validate(e.F.layer,`layers.${ce}`,y,{arrayIndex:-1},ie))return;_e=e.bT(y,this._globalState),this._validateLayer(_e),_e.setEventedParent(this,{layer:{id:ce}})}let De=O?this._order.indexOf(O):this._order.length;if(O&&De===-1)this.fire(new e.l(new Error(`Cannot add layer "${ce}" before non-existing layer "${O}".`)));else{if(this._order.splice(De,0,ce),this._layerOrderChanged=!0,this._layers[ce]=_e,this._removedLayers[ce]&&_e.source&&_e.type!=="custom"){let Ne=this._removedLayers[ce];delete this._removedLayers[ce],Ne.type!==_e.type?this._updatedSources[_e.source]="clear":(this._updatedSources[_e.source]="reload",this.tileManagers[_e.source].pause())}this._updateLayer(_e),_e.onAdd&&_e.onAdd(this.map)}}moveLayer(y,O){if(this._checkLoaded(),this._changed=!0,!this._layers[y])return void this.fire(new e.l(new Error(`The layer '${y}' does not exist in the map's style and cannot be moved.`)));if(y===O)return;let ie=this._order.indexOf(y);this._order.splice(ie,1);let ce=O?this._order.indexOf(O):this._order.length;O&&ce===-1?this.fire(new e.l(new Error(`Cannot move layer "${y}" before non-existing layer "${O}".`))):(this._order.splice(ce,0,y),this._layerOrderChanged=!0)}removeLayer(y){this._checkLoaded();let O=this._layers[y];if(!O)return void this.fire(new e.l(new Error(`Cannot remove non-existing layer "${y}".`)));O.setEventedParent(null);let ie=this._order.indexOf(y);this._order.splice(ie,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[y]=O,delete this._layers[y],this._serializedLayers&&delete this._serializedLayers[y],delete this._updatedLayers[y],delete this._updatedPaintProps[y],O.onRemove&&O.onRemove(this.map)}getLayer(y){return this._layers[y]}getLayersOrder(){return[...this._order]}hasLayer(y){return y in this._layers}setLayerZoomRange(y,O,ie){this._checkLoaded();let ce=this.getLayer(y);ce?ce.minzoom===O&&ce.maxzoom===ie||(O!=null&&(ce.minzoom=O),ie!=null&&(ce.maxzoom=ie),this._updateLayer(ce)):this.fire(new e.l(new Error(`Cannot set the zoom range of non-existing layer "${y}".`)))}setFilter(y,O,ie={}){this._checkLoaded();let ce=this.getLayer(y);if(ce){if(!e.bQ(ce.filter,O))return O==null?(ce.setFilter(void 0),void this._updateLayer(ce)):void(this._validate(e.F.filter,`layers.${ce.id}.filter`,O,null,ie)||(ce.setFilter(e.bV(O)),this._updateLayer(ce)))}else this.fire(new e.l(new Error(`Cannot filter non-existing layer "${y}".`)))}getFilter(y){return e.bV(this.getLayer(y).filter)}setLayoutProperty(y,O,ie,ce={}){this._checkLoaded();let _e=this.getLayer(y);_e?e.bQ(_e.getLayoutProperty(O),ie)||(_e.setLayoutProperty(O,ie,ce),this._updateLayer(_e)):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}getLayoutProperty(y,O){let ie=this.getLayer(y);if(ie)return ie.getLayoutProperty(O);this.fire(new e.l(new Error(`Cannot get style of non-existing layer "${y}".`)))}setPaintProperty(y,O,ie,ce={}){this._checkLoaded();let _e=this.getLayer(y);_e?e.bQ(_e.getPaintProperty(O),ie)||this._updatePaintProperty(_e,O,ie,ce):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}_updatePaintProperty(y,O,ie,ce={}){y.setPaintProperty(O,ie,ce)&&this._updateLayer(y),e.bU(y)&&O==="raster-fade-duration"&&this.tileManagers[y.source].setRasterFadeDuration(ie),this._changed=!0,this._updatedPaintProps[y.id]=!0,this._serializedLayers=null}getPaintProperty(y,O){return this.getLayer(y).getPaintProperty(O)}setFeatureState(y,O){this._checkLoaded();let ie=y.source,ce=y.sourceLayer,_e=this.tileManagers[ie];if(_e===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let De=_e.getSource().type;De==="geojson"&&ce?this.fire(new e.l(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):De!=="vector"||ce?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),_e.setFeatureState(ce,y.id,O)):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(y,O){this._checkLoaded();let ie=y.source,ce=this.tileManagers[ie];if(ce===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let _e=ce.getSource().type,De=_e==="vector"?y.sourceLayer:void 0;_e!=="vector"||De?O&&typeof y.id!="string"&&typeof y.id!="number"?this.fire(new e.l(new Error("A feature id is required to remove its specific state property."))):ce.removeFeatureState(De,y.id,O):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(y){this._checkLoaded();let O=y.source,ie=y.sourceLayer,ce=this.tileManagers[O];if(ce!==void 0)return ce.getSource().type!=="vector"||ie?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),ce.getFeatureState(ie,y.id)):void this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.l(new Error(`The source '${O}' does not exist in the map's style.`)))}getTransition(){var y;return e.e({duration:300,delay:0},(y=this.stylesheet)===null||y===void 0?void 0:y.transition)}serialize(){if(!this._loaded)return;let y=e.bY(this.tileManagers,_e=>_e.serialize()),O=this._serializeByIds(this._order,!0),ie=this.map.getTerrain()||void 0,ce=this.stylesheet;return e.bZ({version:ce.version,name:ce.name,metadata:ce.metadata,light:ce.light,sky:ce.sky,center:ce.center,zoom:ce.zoom,bearing:ce.bearing,pitch:ce.pitch,sprite:ce.sprite,glyphs:ce.glyphs,transition:ce.transition,projection:ce.projection,sources:y,layers:O,terrain:ie},_e=>_e!==void 0)}_updateLayer(y){this._updatedLayers[y.id]=!0,y.source&&!this._updatedSources[y.source]&&this.tileManagers[y.source].getSource().type!=="raster"&&(this._updatedSources[y.source]="reload",this.tileManagers[y.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(y){let O=De=>this._layers[De].type==="fill-extrusion",ie={},ce=[];for(let De=this._order.length-1;De>=0;De--){let Ne=this._order[De];if(O(Ne)){ie[Ne]=De;for(let Ye of y){let lt=Ye[Ne];if(lt)for(let ct of lt)ce.push(ct)}}}ce.sort((De,Ne)=>Ne.intersectionZ-De.intersectionZ);let _e=[];for(let De=this._order.length-1;De>=0;De--){let Ne=this._order[De];if(O(Ne))for(let Ye=ce.length-1;Ye>=0;Ye--){let lt=ce[Ye].feature;if(ie[lt.layer.id]this.map.terrain.getElevation(ct,Ft,Gt):void 0));return this.placement&&_e.push(function(lt,ct,Ft,Gt,Jt,it,Rt){let qt={},or=it.queryRenderedSymbols(Gt),vr=[];for(let Ar of Object.keys(or).map(Number))vr.push(Rt[Ar]);vr.sort(K);for(let Ar of vr){let dr=Ar.featureIndex.lookupSymbolFeatures(or[Ar.bucketInstanceId],ct,Ar.bucketIndex,Ar.sourceLayerIndex,{filterSpec:Jt.filter,globalState:Jt.globalState},Jt.layers,Jt.availableImages,lt);for(let mr in dr){qt[mr]||(qt[mr]=[]);let qr=dr[mr];qr.sort((Lr,ua)=>{let Ba=Ar.featureSortOrder;if(Ba){let Pa=Ba.indexOf(Lr.featureIndex);return Ba.indexOf(ua.featureIndex)-Pa}return ua.featureIndex-Lr.featureIndex});for(let Lr of qr)qt[mr].push(Lr)}}return function(Ar,dr,mr){for(let qr in Ar)for(let Lr of Ar[qr])G(Lr,mr[dr[qr].source]);return Ar}(qt,lt,Ft)}(this._layers,De,this.tileManagers,y,Ye,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(_e)}querySourceFeatures(y,O){O?.filter&&this._validate(e.F.filter,"querySourceFeatures.filter",O.filter,null,O);let ie=this.tileManagers[y];return ie?function(ce,_e){let De=ce.getRenderableIds().map(lt=>ce.getTileByID(lt)),Ne=[],Ye={};for(let lt of De){let ct=lt.tileID.canonical.key;Ye[ct]||(Ye[ct]=!0,lt.querySourceFeatures(Ne,_e))}return Ne}(ie,O?Object.assign(Object.assign({},O),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(y,O={}){this._checkLoaded();let ie=this.light.getLight(),ce=!1;for(let De in y)if(!e.bQ(y[De],ie[De])){ce=!0;break}if(!ce)return;let _e={now:g(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(y,O),this.light.updateTransitions(_e)}getProjection(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.projection}setProjection(y){this._checkLoaded();let O=y??{type:"mercator"};if(this.stylesheet.projection=y,this.projection){if(this.projection.name===O.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(O.type)}getSky(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.sky}setSky(y,O={}){this._checkLoaded();let ie=this.getSky(),ce=!1;if(!y&&!ie)return;if(y&&!ie)ce=!0;else if(!y&&ie)ce=!0;else for(let De in y)if(!e.bQ(y[De],ie[De])){ce=!0;break}if(!ce)return;let _e={now:g(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=y,this.sky.setSky(y,O),this.sky.updateTransitions(_e)}_setProjectionInternal(y){let O=function(ie,ce){let _e={constrainOverride:ce};if(Array.isArray(ie)){let De=new $o({type:ie});return{projection:De,transform:new ms(_e),cameraHelper:new ol(De)}}switch(ie){case"mercator":return{projection:new Mo,transform:new qo(_e),cameraHelper:new as};case"globe":{let De=new $o({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:De,transform:new ms(_e),cameraHelper:new ol(De)}}case"vertical-perspective":return{projection:new Zs,transform:new As(_e),cameraHelper:new Ms};default:return e.w(`Unknown projection name: ${ie}. Falling back to mercator projection.`),{projection:new Mo,transform:new qo(_e),cameraHelper:new as}}}(y,this.map.transformConstrain);this.projection=O.projection,this.map.migrateProjection(O.transform,O.cameraHelper);for(let ie in this.tileManagers)this.tileManagers[ie].reload()}_validate(y,O,ie,ce,_e={}){return _e?.validate!==!1&&Su(this,y.call(e.F,e.e({key:O,style:this.serialize(),value:ie,styleSpec:e.x},ce)))}_remove(y=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),Ge().off(Te,this._rtlPluginLoaded);for(let O in this._layers)this._layers[O].setEventedParent(null);for(let O in this.tileManagers){let ie=this.tileManagers[O];ie.setEventedParent(null),ie.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),y&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(y)}_clearSource(y){this.tileManagers[y].clearTiles()}_reloadSource(y){this.tileManagers[y].resume(),this.tileManagers[y].reload()}_updateSources(y){for(let O in this.tileManagers)this.tileManagers[O].update(y,this.map.terrain)}_generateCollisionBoxes(){for(let y in this.tileManagers)this._reloadSource(y)}_updatePlacement(y,O,ie,ce,_e=!1){let De=!1,Ne=!1,Ye={};for(let lt of this._order){let ct=this._layers[lt];if(ct.type!=="symbol")continue;if(!Ye[ct.source]){let Gt=this.tileManagers[ct.source];Ye[ct.source]=Gt.getRenderableIds(!0).map(Jt=>Gt.getTileByID(Jt)).sort((Jt,it)=>it.tileID.overscaledZ-Jt.tileID.overscaledZ||(Jt.tileID.isLessThan(it.tileID)?-1:1))}let Ft=this.crossTileSymbolIndex.addLayer(ct,Ye[ct.source],y.center.lng);De||(De=Ft)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),_e||(_e=this._layerOrderChanged||ie===0),(_e||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(g(),y.zoom))&&(this.pauseablePlacement=new bi(y,this.map.terrain,this._order,_e,O,ie,ce,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ye),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(g()),Ne=!0),De&&this.pauseablePlacement.placement.setStale()),Ne||De)for(let lt of this._order){let ct=this._layers[lt];ct.type==="symbol"&&this.placement.updateLayerOpacities(ct,Ye[ct.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(g())}_releaseSymbolFadeTiles(){for(let y in this.tileManagers)this.tileManagers[y].releaseSymbolFadeTiles()}getImages(y,O){return e._(this,void 0,void 0,function*(){let ie=yield this.imageManager.getImages(O.icons);this._updateTilesForChangedImages();let ce=this.tileManagers[O.source];return ce&&ce.setDependencies(O.tileID.key,O.type,O.icons),ie})}getGlyphs(y,O){return e._(this,void 0,void 0,function*(){let ie=yield this.glyphManager.getGlyphs(O.stacks),ce=this.tileManagers[O.source];return ce&&ce.setDependencies(O.tileID.key,O.type,[""]),ie})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(y,O={}){this._checkLoaded(),y&&this._validate(e.F.glyphs,"glyphs",y,null,O)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=y,this.glyphManager.entries={},this.glyphManager.setURL(y))}getDashes(y,O){return e._(this,void 0,void 0,function*(){let ie={};for(let[ce,_e]of Object.entries(O.dashes))ie[ce]=this.lineAtlas.getDash(_e.dasharray,_e.round);return ie})}addSprite(y,O,ie={},ce){this._checkLoaded();let _e=[{id:y,url:O}],De=[...T(this.stylesheet.sprite),..._e];this._validate(e.F.sprite,"sprite",De,null,ie)||(this.stylesheet.sprite=De,this._loadSprite(_e,!0,ce))}removeSprite(y){this._checkLoaded();let O=T(this.stylesheet.sprite);if(O.find(ie=>ie.id===y)){if(this._spritesImagesIds[y])for(let ie of this._spritesImagesIds[y])this.imageManager.removeImage(ie),this._changedImages[ie]=!0;O.splice(O.findIndex(ie=>ie.id===y),1),this.stylesheet.sprite=O.length>0?O:void 0,delete this._spritesImagesIds[y],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}else this.fire(new e.l(new Error(`Sprite "${y}" doesn't exists on this map.`)))}getSprite(){return T(this.stylesheet.sprite)}setSprite(y,O={},ie){this._checkLoaded(),y&&this._validate(e.F.sprite,"sprite",y,null,O)||(this.stylesheet.sprite=y,y?this._loadSprite(y,!0,ie):(this._unloadSprite(),ie&&ie(null)))}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(let y in this.tileManagers){let O=this.tileManagers[y];O.setEventedParent(null),O.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(let y in this._layers){let O=this._layers[y];O.setEventedParent(null),O.onRemove&&O.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var fc=e.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class th{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(y,O,ie,ce,_e,De,Ne,Ye,lt){this.context=y;let ct=this.boundPaintVertexBuffers.length!==ce.length;for(let Ft=0;!ct&&Ft({u_texture:0,u_ele_delta:de,u_fog_matrix:y,u_fog_color:O?O.properties.get("fog-color"):e.bo.white,u_fog_ground_blend:O?O.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:ce?0:O?O.calculateFogBlendOpacity(ie):0,u_horizon_color:O?O.properties.get("horizon-color"):e.bo.white,u_horizon_fog_blend:O?O.properties.get("horizon-fog-blend"):1,u_is_globe_mode:ce?1:0}),qu={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function gs(de){let y=[];for(let O of de){if(O===null)continue;let ie=O.split(" ");y.push(ie.pop())}return y}class Lf{constructor(y,O,ie,ce,_e,De,Ne,Ye,lt=[]){let ct=y.gl;this.program=ct.createProgram();let Ft=gs(O.staticAttributes),Gt=ie?ie.getBinderAttributes():[],Jt=Ft.concat(Gt),it=Gi.prelude.staticUniforms?gs(Gi.prelude.staticUniforms):[],Rt=Ne.staticUniforms?gs(Ne.staticUniforms):[],qt=O.staticUniforms?gs(O.staticUniforms):[],or=ie?ie.getBinderUniforms():[],vr=it.concat(Rt).concat(qt).concat(or),Ar=[];for(let Pa of vr)Ar.includes(Pa)||Ar.push(Pa);let dr=ie?ie.defines():[];us(ct)&&dr.unshift("#version 300 es"),_e&&dr.push("#define OVERDRAW_INSPECTOR;"),De&&dr.push("#define TERRAIN3D;"),Ye&&dr.push(Ye),lt&&dr.push(...lt);let mr=dr.concat(Gi.prelude.fragmentSource,Ne.fragmentSource,O.fragmentSource).join(` `),qr=dr.concat(Gi.prelude.vertexSource,Ne.vertexSource,O.vertexSource).join(` -`);us(ct)||(mr=function(Dn){return Dn.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(mr),qr=function(Dn){return Dn.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(qr));let Lr=ct.createShader(ct.FRAGMENT_SHADER);if(ct.isContextLost())return void(this.failedToCreate=!0);if(ct.shaderSource(Lr,mr),ct.compileShader(Lr),!ct.getShaderParameter(Lr,ct.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${ct.getShaderInfoLog(Lr)}`);ct.attachShader(this.program,Lr);let cn=ct.createShader(ct.VERTEX_SHADER);if(ct.isContextLost())return void(this.failedToCreate=!0);if(ct.shaderSource(cn,qr),ct.compileShader(cn),!ct.getShaderParameter(cn,ct.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${ct.getShaderInfoLog(cn)}`);ct.attachShader(this.program,cn),this.attributes={};let Nn={};this.numAttributes=Jt.length;for(let Dn=0;Dn({u_depth:new e.b_(Dn,qn.u_depth),u_terrain:new e.b_(Dn,qn.u_terrain),u_terrain_dim:new e.bp(Dn,qn.u_terrain_dim),u_terrain_matrix:new e.c0(Dn,qn.u_terrain_matrix),u_terrain_unpack:new e.c1(Dn,qn.u_terrain_unpack),u_terrain_exaggeration:new e.bp(Dn,qn.u_terrain_exaggeration)}))(y,Nn),this.projectionUniforms=((Dn,qn)=>({u_projection_matrix:new e.c0(Dn,qn.u_projection_matrix),u_projection_tile_mercator_coords:new e.c1(Dn,qn.u_projection_tile_mercator_coords),u_projection_clipping_plane:new e.c1(Dn,qn.u_projection_clipping_plane),u_projection_transition:new e.bp(Dn,qn.u_projection_transition),u_projection_fallback_matrix:new e.c0(Dn,qn.u_projection_fallback_matrix)}))(y,Nn),this.binderUniforms=ie?ie.getUniforms(y,Nn):[]}draw(y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt,Jt,it,Rt,qt,or,vr,Ar){var dr;let mr=y.gl;if(this.failedToCreate)return;if(y.program.set(this.program),y.setDepthMode(ie),y.setStencilMode(ce),y.setColorMode(_e),y.setCullFace(De),Ye){y.activeTexture.set(mr.TEXTURE2),mr.bindTexture(mr.TEXTURE_2D,Ye.depthTexture),y.activeTexture.set(mr.TEXTURE3),mr.bindTexture(mr.TEXTURE_2D,Ye.texture);for(let Lr in this.terrainUniforms)this.terrainUniforms[Lr].set(Ye[Lr])}if(lt)for(let Lr in lt)this.projectionUniforms[qu[Lr]].set(lt[Lr]);if(Ne)for(let Lr in this.fixedUniforms)this.fixedUniforms[Lr].set(Ne[Lr]);qt&&qt.setUniforms(y,this.binderUniforms,it,{zoom:Rt});let qr=0;switch(O){case mr.LINES:qr=2;break;case mr.TRIANGLES:qr=3;break;case mr.LINE_STRIP:qr=1}for(let Lr of Jt.get())Lr.vaos||(Lr.vaos={}),(dr=Lr.vaos)[ct]||(dr[ct]=new th),Lr.vaos[ct].bind(y,this,Ft,qt?qt.getPaintVertexBuffers():[],Gt,Lr.vertexOffset,or,vr,Ar),mr.drawElements(O,Lr.primitiveLength*qr,mr.UNSIGNED_SHORT,Lr.primitiveOffset*qr*2)}}function hc(de,y,O){let ie=1/e.aK(O,1,y.transform.tileZoom),ce=Math.pow(2,O.tileID.overscaledZ),_e=O.tileSize*Math.pow(2,y.transform.tileZoom)/ce,De=_e*(O.tileID.canonical.x+O.tileID.wrap*ce),Ne=_e*O.tileID.canonical.y;return{u_image:0,u_texsize:O.imageAtlasTexture.size,u_scale:[ie,de.fromScale,de.toScale],u_fade:de.t,u_pixel_coord_upper:[De>>16,Ne>>16],u_pixel_coord_lower:[65535&De,65535&Ne]}}let nc=(de,y,O,ie)=>{let ce=de.style.light,_e=ce.properties.get("position"),De=[_e.x,_e.y,_e.z],Ne=e.c4();ce.properties.get("anchor")==="viewport"&&e.c5(Ne,de.transform.bearingInRadians),e.c6(De,De,Ne);let Ye=de.transform.transformLightDirection(De),lt=ce.properties.get("color");return{u_lightpos:De,u_lightpos_globe:Ye,u_lightintensity:ce.properties.get("intensity"),u_lightcolor:[lt.r,lt.g,lt.b],u_vertical_gradient:+y,u_opacity:O,u_fill_translate:ie}},hf=(de,y,O,ie,ce,_e,De)=>e.e(nc(de,y,O,ie),hc(_e,de,De),{u_height_factor:-Math.pow(2,ce.overscaledZ)/De.tileSize/8}),ku=(de,y,O,ie)=>e.e(hc(y,de,O),{u_fill_translate:ie}),dc=(de,y)=>({u_world:de,u_fill_translate:y}),Cu=(de,y,O,ie,ce)=>e.e(ku(de,y,O,ce),{u_world:ie}),Pc=(de,y,O,ie,ce)=>{let _e=de.transform,De,Ne,Ye=0;if(O.paint.get("circle-pitch-alignment")==="map"){let lt=e.aK(y,1,_e.zoom);De=!0,Ne=[lt,lt],Ye=lt/(e.a6*Math.pow(2,y.tileID.overscaledZ))*2*Math.PI*ce}else De=!1,Ne=_e.pixelsToGLUnits;return{u_camera_to_center_distance:_e.cameraToCenterDistance,u_scale_with_map:+(O.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+De,u_device_pixel_ratio:de.pixelRatio,u_extrude_scale:Ne,u_globe_extrude_scale:Ye,u_translate:ie}},$c=de=>({u_pixel_extrude_scale:[1/de.width,1/de.height]}),Zl=de=>({u_viewport_size:[de.width,de.height]}),df=(de,y=1)=>({u_color:de,u_overlay:0,u_overlay_scale:y}),Dc=(de,y,O,ie)=>{let ce=e.aK(de,1,y)/(e.a6*Math.pow(2,de.tileID.overscaledZ))*2*Math.PI*ie;return{u_extrude_scale:e.aK(de,1,y),u_intensity:O,u_globe_extrude_scale:ce}},Ic=(de,y,O,ie)=>{let ce=e.O();e.c7(ce,0,de.width,de.height,0,0,1);let _e=de.context.gl;return{u_matrix:ce,u_world:[_e.drawingBufferWidth,_e.drawingBufferHeight],u_image:O,u_color_ramp:ie,u_opacity:y.paint.get("heatmap-opacity")}},Vu=(de,y,O)=>{let ie=O.paint.get("hillshade-accent-color"),ce;switch(O.paint.get("hillshade-method")){case"basic":ce=4;break;case"combined":ce=1;break;case"igor":ce=2;break;case"multidirectional":ce=3;break;default:ce=0}let _e=O.getIlluminationProperties();for(let De=0;De<_e.directionRadians.length;De++)O.paint.get("hillshade-illumination-anchor")==="viewport"&&(_e.directionRadians[De]+=de.transform.bearingInRadians);return{u_image:0,u_latrange:Lu(0,y.tileID),u_exaggeration:O.paint.get("hillshade-exaggeration"),u_altitudes:_e.altitudeRadians,u_azimuths:_e.directionRadians,u_accent:ie,u_method:ce,u_highlights:_e.highlightColor,u_shadows:_e.shadowColor}},Rc=(de,y)=>{let O=y.stride,ie=e.O();return e.c7(ie,0,e.a6,-e.a6,0,0,1),e.Q(ie,ie,[0,-e.a6,0]),{u_matrix:ie,u_image:1,u_dimension:[O,O],u_zoom:de.overscaledZ,u_unpack:y.getUnpackVector()}};function Lu(de,y){let O=Math.pow(2,y.canonical.z),ie=y.canonical.y;return[new e.a7(0,ie/O).toLngLat().lat,new e.a7(0,(ie+1)/O).toLngLat().lat]}let vf=(de,y,O=0)=>({u_image:0,u_unpack:y.getUnpackVector(),u_dimension:[y.stride,y.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:O,u_opacity:de.paint.get("color-relief-opacity")}),sl=(de,y,O,ie)=>{let ce=de.transform;return{u_translation:uu(de,y,O),u_ratio:ie/e.aK(y,1,ce.zoom),u_device_pixel_ratio:de.pixelRatio,u_units_to_pixels:[1/ce.pixelsToGLUnits[0],1/ce.pixelsToGLUnits[1]]}},Fc=(de,y,O,ie,ce)=>e.e(sl(de,y,O,ie),{u_image:0,u_image_height:ce}),Pu=(de,y,O,ie,ce)=>{let _e=de.transform,De=Hu(y,_e);return{u_translation:uu(de,y,O),u_texsize:y.imageAtlasTexture.size,u_ratio:ie/e.aK(y,1,_e.zoom),u_device_pixel_ratio:de.pixelRatio,u_image:0,u_scale:[De,ce.fromScale,ce.toScale],u_fade:ce.t,u_units_to_pixels:[1/_e.pixelsToGLUnits[0],1/_e.pixelsToGLUnits[1]]}},vc=(de,y,O,ie,ce)=>{let _e=Hu(y,de.transform);return e.e(sl(de,y,O,ie),{u_tileratio:_e,u_crossfade_from:ce.fromScale,u_crossfade_to:ce.toScale,u_image:0,u_mix:ce.t,u_lineatlas_width:de.lineAtlas.width,u_lineatlas_height:de.lineAtlas.height})},zc=(de,y,O,ie,ce,_e)=>{let De=Hu(y,de.transform);return e.e(sl(de,y,O,ie),{u_image:0,u_image_height:_e,u_tileratio:De,u_crossfade_from:ce.fromScale,u_crossfade_to:ce.toScale,u_image_dash:1,u_mix:ce.t,u_lineatlas_width:de.lineAtlas.width,u_lineatlas_height:de.lineAtlas.height})};function Hu(de,y){return 1/e.aK(de,1,y.tileZoom)}function uu(de,y,O){return e.aL(de.transform,y,O.paint.get("line-translate"),O.paint.get("line-translate-anchor"))}let Gu=(de,y,O,ie,ce)=>{return{u_tl_parent:de,u_scale_parent:y,u_buffer_scale:1,u_fade_t:O.mix,u_opacity:O.opacity*ie.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ie.paint.get("raster-brightness-min"),u_brightness_high:ie.paint.get("raster-brightness-max"),u_saturation_factor:(De=ie.paint.get("raster-saturation"),De>0?1-1/(1.001-De):-De),u_contrast_factor:(_e=ie.paint.get("raster-contrast"),_e>0?1/(1-_e):1+_e),u_spin_weights:Zc(ie.paint.get("raster-hue-rotate")),u_coords_top:[ce[0].x,ce[0].y,ce[1].x,ce[1].y],u_coords_bottom:[ce[3].x,ce[3].y,ce[2].x,ce[2].y]};var _e,De};function Zc(de){de*=Math.PI/180;let y=Math.sin(de),O=Math.cos(de);return[(2*O+1)/3,(-Math.sqrt(3)*y-O+1)/3,(Math.sqrt(3)*y-O+1)/3]}let gu=(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt)=>{let Jt=De.transform;return{u_is_size_zoom_constant:+(de==="constant"||de==="source"),u_is_size_feature_constant:+(de==="constant"||de==="camera"),u_size_t:y?y.uSizeT:0,u_size:y?y.uSize:0,u_camera_to_center_distance:Jt.cameraToCenterDistance,u_pitch:Jt.pitch/360*2*Math.PI,u_rotate_symbol:+O,u_aspect_ratio:Jt.width/Jt.height,u_fade_change:De.options.fadeDuration?De.symbolFadeChange:1,u_label_plane_matrix:Ne,u_coord_matrix:Ye,u_is_text:+ct,u_pitch_with_map:+ie,u_is_along_line:ce,u_is_variable_anchor:_e,u_texsize:Ft,u_texture:0,u_translation:lt,u_pitched_scale:Gt}},Pf=(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt,Jt)=>{let it=De.transform;return e.e(gu(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Jt),{u_gamma_scale:ie?Math.cos(it.pitch*Math.PI/180)*it.cameraToCenterDistance:1,u_device_pixel_ratio:De.pixelRatio,u_is_halo:Gt?1:0,u_is_plain:1})},bl=(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt)=>e.e(Pf(de,y,O,ie,ce,_e,De,Ne,Ye,lt,!0,ct,!0,Gt),{u_texsize_icon:Ft,u_texture_icon:1}),xl=(de,y)=>({u_opacity:de,u_color:y}),Wu=(de,y,O,ie,ce)=>e.e(function(_e,De,Ne,Ye){let lt=Ne.imageManager.getPattern(_e.from.toString()),ct=Ne.imageManager.getPattern(_e.to.toString()),{width:Ft,height:Gt}=Ne.imageManager.getPixelSize(),Jt=Math.pow(2,Ye.tileID.overscaledZ),it=Ye.tileSize*Math.pow(2,Ne.transform.tileZoom)/Jt,Rt=it*(Ye.tileID.canonical.x+Ye.tileID.wrap*Jt),qt=it*Ye.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:lt.tl,u_pattern_br_a:lt.br,u_pattern_tl_b:ct.tl,u_pattern_br_b:ct.br,u_texsize:[Ft,Gt],u_mix:De.t,u_pattern_size_a:lt.displaySize,u_pattern_size_b:ct.displaySize,u_scale_a:De.fromScale,u_scale_b:De.toScale,u_tile_units_to_pixels:1/e.aK(Ye,1,Ne.transform.tileZoom),u_pixel_coord_upper:[Rt>>16,qt>>16],u_pixel_coord_lower:[65535&Rt,65535&qt]}}(O,ce,y,ie),{u_opacity:de}),wl=(de,y)=>{},pf={fillExtrusion:(de,y)=>({u_lightpos:new e.c2(de,y.u_lightpos),u_lightpos_globe:new e.c2(de,y.u_lightpos_globe),u_lightintensity:new e.bp(de,y.u_lightintensity),u_lightcolor:new e.c2(de,y.u_lightcolor),u_vertical_gradient:new e.bp(de,y.u_vertical_gradient),u_opacity:new e.bp(de,y.u_opacity),u_fill_translate:new e.c3(de,y.u_fill_translate)}),fillExtrusionPattern:(de,y)=>({u_lightpos:new e.c2(de,y.u_lightpos),u_lightpos_globe:new e.c2(de,y.u_lightpos_globe),u_lightintensity:new e.bp(de,y.u_lightintensity),u_lightcolor:new e.c2(de,y.u_lightcolor),u_vertical_gradient:new e.bp(de,y.u_vertical_gradient),u_height_factor:new e.bp(de,y.u_height_factor),u_opacity:new e.bp(de,y.u_opacity),u_fill_translate:new e.c3(de,y.u_fill_translate),u_image:new e.b_(de,y.u_image),u_texsize:new e.c3(de,y.u_texsize),u_pixel_coord_upper:new e.c3(de,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(de,y.u_pixel_coord_lower),u_scale:new e.c2(de,y.u_scale),u_fade:new e.bp(de,y.u_fade)}),fill:(de,y)=>({u_fill_translate:new e.c3(de,y.u_fill_translate)}),fillPattern:(de,y)=>({u_image:new e.b_(de,y.u_image),u_texsize:new e.c3(de,y.u_texsize),u_pixel_coord_upper:new e.c3(de,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(de,y.u_pixel_coord_lower),u_scale:new e.c2(de,y.u_scale),u_fade:new e.bp(de,y.u_fade),u_fill_translate:new e.c3(de,y.u_fill_translate)}),fillOutline:(de,y)=>({u_world:new e.c3(de,y.u_world),u_fill_translate:new e.c3(de,y.u_fill_translate)}),fillOutlinePattern:(de,y)=>({u_world:new e.c3(de,y.u_world),u_image:new e.b_(de,y.u_image),u_texsize:new e.c3(de,y.u_texsize),u_pixel_coord_upper:new e.c3(de,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(de,y.u_pixel_coord_lower),u_scale:new e.c2(de,y.u_scale),u_fade:new e.bp(de,y.u_fade),u_fill_translate:new e.c3(de,y.u_fill_translate)}),circle:(de,y)=>({u_camera_to_center_distance:new e.bp(de,y.u_camera_to_center_distance),u_scale_with_map:new e.b_(de,y.u_scale_with_map),u_pitch_with_map:new e.b_(de,y.u_pitch_with_map),u_extrude_scale:new e.c3(de,y.u_extrude_scale),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_globe_extrude_scale:new e.bp(de,y.u_globe_extrude_scale),u_translate:new e.c3(de,y.u_translate)}),collisionBox:(de,y)=>({u_pixel_extrude_scale:new e.c3(de,y.u_pixel_extrude_scale)}),collisionCircle:(de,y)=>({u_viewport_size:new e.c3(de,y.u_viewport_size)}),debug:(de,y)=>({u_color:new e.b$(de,y.u_color),u_overlay:new e.b_(de,y.u_overlay),u_overlay_scale:new e.bp(de,y.u_overlay_scale)}),depth:wl,clippingMask:wl,heatmap:(de,y)=>({u_extrude_scale:new e.bp(de,y.u_extrude_scale),u_intensity:new e.bp(de,y.u_intensity),u_globe_extrude_scale:new e.bp(de,y.u_globe_extrude_scale)}),heatmapTexture:(de,y)=>({u_matrix:new e.c0(de,y.u_matrix),u_world:new e.c3(de,y.u_world),u_image:new e.b_(de,y.u_image),u_color_ramp:new e.b_(de,y.u_color_ramp),u_opacity:new e.bp(de,y.u_opacity)}),hillshade:(de,y)=>({u_image:new e.b_(de,y.u_image),u_latrange:new e.c3(de,y.u_latrange),u_exaggeration:new e.bp(de,y.u_exaggeration),u_altitudes:new e.c9(de,y.u_altitudes),u_azimuths:new e.c9(de,y.u_azimuths),u_accent:new e.b$(de,y.u_accent),u_method:new e.b_(de,y.u_method),u_shadows:new e.c8(de,y.u_shadows),u_highlights:new e.c8(de,y.u_highlights)}),hillshadePrepare:(de,y)=>({u_matrix:new e.c0(de,y.u_matrix),u_image:new e.b_(de,y.u_image),u_dimension:new e.c3(de,y.u_dimension),u_zoom:new e.bp(de,y.u_zoom),u_unpack:new e.c1(de,y.u_unpack)}),colorRelief:(de,y)=>({u_image:new e.b_(de,y.u_image),u_unpack:new e.c1(de,y.u_unpack),u_dimension:new e.c3(de,y.u_dimension),u_elevation_stops:new e.b_(de,y.u_elevation_stops),u_color_stops:new e.b_(de,y.u_color_stops),u_color_ramp_size:new e.b_(de,y.u_color_ramp_size),u_opacity:new e.bp(de,y.u_opacity)}),line:(de,y)=>({u_translation:new e.c3(de,y.u_translation),u_ratio:new e.bp(de,y.u_ratio),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(de,y.u_units_to_pixels)}),lineGradient:(de,y)=>({u_translation:new e.c3(de,y.u_translation),u_ratio:new e.bp(de,y.u_ratio),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(de,y.u_units_to_pixels),u_image:new e.b_(de,y.u_image),u_image_height:new e.bp(de,y.u_image_height)}),linePattern:(de,y)=>({u_translation:new e.c3(de,y.u_translation),u_texsize:new e.c3(de,y.u_texsize),u_ratio:new e.bp(de,y.u_ratio),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_image:new e.b_(de,y.u_image),u_units_to_pixels:new e.c3(de,y.u_units_to_pixels),u_scale:new e.c2(de,y.u_scale),u_fade:new e.bp(de,y.u_fade)}),lineSDF:(de,y)=>({u_translation:new e.c3(de,y.u_translation),u_ratio:new e.bp(de,y.u_ratio),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(de,y.u_units_to_pixels),u_image:new e.b_(de,y.u_image),u_mix:new e.bp(de,y.u_mix),u_tileratio:new e.bp(de,y.u_tileratio),u_crossfade_from:new e.bp(de,y.u_crossfade_from),u_crossfade_to:new e.bp(de,y.u_crossfade_to),u_lineatlas_width:new e.bp(de,y.u_lineatlas_width),u_lineatlas_height:new e.bp(de,y.u_lineatlas_height)}),lineGradientSDF:(de,y)=>({u_translation:new e.c3(de,y.u_translation),u_ratio:new e.bp(de,y.u_ratio),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(de,y.u_units_to_pixels),u_image:new e.b_(de,y.u_image),u_image_height:new e.bp(de,y.u_image_height),u_tileratio:new e.bp(de,y.u_tileratio),u_crossfade_from:new e.bp(de,y.u_crossfade_from),u_crossfade_to:new e.bp(de,y.u_crossfade_to),u_image_dash:new e.b_(de,y.u_image_dash),u_mix:new e.bp(de,y.u_mix),u_lineatlas_width:new e.bp(de,y.u_lineatlas_width),u_lineatlas_height:new e.bp(de,y.u_lineatlas_height)}),raster:(de,y)=>({u_tl_parent:new e.c3(de,y.u_tl_parent),u_scale_parent:new e.bp(de,y.u_scale_parent),u_buffer_scale:new e.bp(de,y.u_buffer_scale),u_fade_t:new e.bp(de,y.u_fade_t),u_opacity:new e.bp(de,y.u_opacity),u_image0:new e.b_(de,y.u_image0),u_image1:new e.b_(de,y.u_image1),u_brightness_low:new e.bp(de,y.u_brightness_low),u_brightness_high:new e.bp(de,y.u_brightness_high),u_saturation_factor:new e.bp(de,y.u_saturation_factor),u_contrast_factor:new e.bp(de,y.u_contrast_factor),u_spin_weights:new e.c2(de,y.u_spin_weights),u_coords_top:new e.c1(de,y.u_coords_top),u_coords_bottom:new e.c1(de,y.u_coords_bottom)}),symbolIcon:(de,y)=>({u_is_size_zoom_constant:new e.b_(de,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(de,y.u_is_size_feature_constant),u_size_t:new e.bp(de,y.u_size_t),u_size:new e.bp(de,y.u_size),u_camera_to_center_distance:new e.bp(de,y.u_camera_to_center_distance),u_pitch:new e.bp(de,y.u_pitch),u_rotate_symbol:new e.b_(de,y.u_rotate_symbol),u_aspect_ratio:new e.bp(de,y.u_aspect_ratio),u_fade_change:new e.bp(de,y.u_fade_change),u_label_plane_matrix:new e.c0(de,y.u_label_plane_matrix),u_coord_matrix:new e.c0(de,y.u_coord_matrix),u_is_text:new e.b_(de,y.u_is_text),u_pitch_with_map:new e.b_(de,y.u_pitch_with_map),u_is_along_line:new e.b_(de,y.u_is_along_line),u_is_variable_anchor:new e.b_(de,y.u_is_variable_anchor),u_texsize:new e.c3(de,y.u_texsize),u_texture:new e.b_(de,y.u_texture),u_translation:new e.c3(de,y.u_translation),u_pitched_scale:new e.bp(de,y.u_pitched_scale)}),symbolSDF:(de,y)=>({u_is_size_zoom_constant:new e.b_(de,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(de,y.u_is_size_feature_constant),u_size_t:new e.bp(de,y.u_size_t),u_size:new e.bp(de,y.u_size),u_camera_to_center_distance:new e.bp(de,y.u_camera_to_center_distance),u_pitch:new e.bp(de,y.u_pitch),u_rotate_symbol:new e.b_(de,y.u_rotate_symbol),u_aspect_ratio:new e.bp(de,y.u_aspect_ratio),u_fade_change:new e.bp(de,y.u_fade_change),u_label_plane_matrix:new e.c0(de,y.u_label_plane_matrix),u_coord_matrix:new e.c0(de,y.u_coord_matrix),u_is_text:new e.b_(de,y.u_is_text),u_pitch_with_map:new e.b_(de,y.u_pitch_with_map),u_is_along_line:new e.b_(de,y.u_is_along_line),u_is_variable_anchor:new e.b_(de,y.u_is_variable_anchor),u_texsize:new e.c3(de,y.u_texsize),u_texture:new e.b_(de,y.u_texture),u_gamma_scale:new e.bp(de,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_is_halo:new e.b_(de,y.u_is_halo),u_is_plain:new e.b_(de,y.u_is_plain),u_translation:new e.c3(de,y.u_translation),u_pitched_scale:new e.bp(de,y.u_pitched_scale)}),symbolTextAndIcon:(de,y)=>({u_is_size_zoom_constant:new e.b_(de,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(de,y.u_is_size_feature_constant),u_size_t:new e.bp(de,y.u_size_t),u_size:new e.bp(de,y.u_size),u_camera_to_center_distance:new e.bp(de,y.u_camera_to_center_distance),u_pitch:new e.bp(de,y.u_pitch),u_rotate_symbol:new e.b_(de,y.u_rotate_symbol),u_aspect_ratio:new e.bp(de,y.u_aspect_ratio),u_fade_change:new e.bp(de,y.u_fade_change),u_label_plane_matrix:new e.c0(de,y.u_label_plane_matrix),u_coord_matrix:new e.c0(de,y.u_coord_matrix),u_is_text:new e.b_(de,y.u_is_text),u_pitch_with_map:new e.b_(de,y.u_pitch_with_map),u_is_along_line:new e.b_(de,y.u_is_along_line),u_is_variable_anchor:new e.b_(de,y.u_is_variable_anchor),u_texsize:new e.c3(de,y.u_texsize),u_texsize_icon:new e.c3(de,y.u_texsize_icon),u_texture:new e.b_(de,y.u_texture),u_texture_icon:new e.b_(de,y.u_texture_icon),u_gamma_scale:new e.bp(de,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_is_halo:new e.b_(de,y.u_is_halo),u_translation:new e.c3(de,y.u_translation),u_pitched_scale:new e.bp(de,y.u_pitched_scale)}),background:(de,y)=>({u_opacity:new e.bp(de,y.u_opacity),u_color:new e.b$(de,y.u_color)}),backgroundPattern:(de,y)=>({u_opacity:new e.bp(de,y.u_opacity),u_image:new e.b_(de,y.u_image),u_pattern_tl_a:new e.c3(de,y.u_pattern_tl_a),u_pattern_br_a:new e.c3(de,y.u_pattern_br_a),u_pattern_tl_b:new e.c3(de,y.u_pattern_tl_b),u_pattern_br_b:new e.c3(de,y.u_pattern_br_b),u_texsize:new e.c3(de,y.u_texsize),u_mix:new e.bp(de,y.u_mix),u_pattern_size_a:new e.c3(de,y.u_pattern_size_a),u_pattern_size_b:new e.c3(de,y.u_pattern_size_b),u_scale_a:new e.bp(de,y.u_scale_a),u_scale_b:new e.bp(de,y.u_scale_b),u_pixel_coord_upper:new e.c3(de,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(de,y.u_pixel_coord_lower),u_tile_units_to_pixels:new e.bp(de,y.u_tile_units_to_pixels)}),terrain:(de,y)=>({u_texture:new e.b_(de,y.u_texture),u_ele_delta:new e.bp(de,y.u_ele_delta),u_fog_matrix:new e.c0(de,y.u_fog_matrix),u_fog_color:new e.b$(de,y.u_fog_color),u_fog_ground_blend:new e.bp(de,y.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.bp(de,y.u_fog_ground_blend_opacity),u_horizon_color:new e.b$(de,y.u_horizon_color),u_horizon_fog_blend:new e.bp(de,y.u_horizon_fog_blend),u_is_globe_mode:new e.bp(de,y.u_is_globe_mode)}),terrainDepth:(de,y)=>({u_ele_delta:new e.bp(de,y.u_ele_delta)}),terrainCoords:(de,y)=>({u_texture:new e.b_(de,y.u_texture),u_terrain_coords_id:new e.bp(de,y.u_terrain_coords_id),u_ele_delta:new e.bp(de,y.u_ele_delta)}),projectionErrorMeasurement:(de,y)=>({u_input:new e.bp(de,y.u_input),u_output_expected:new e.bp(de,y.u_output_expected)}),atmosphere:(de,y)=>({u_sun_pos:new e.c2(de,y.u_sun_pos),u_atmosphere_blend:new e.bp(de,y.u_atmosphere_blend),u_globe_position:new e.c2(de,y.u_globe_position),u_globe_radius:new e.bp(de,y.u_globe_radius),u_inv_proj_matrix:new e.c0(de,y.u_inv_proj_matrix)}),sky:(de,y)=>({u_sky_color:new e.b$(de,y.u_sky_color),u_horizon_color:new e.b$(de,y.u_horizon_color),u_horizon:new e.c3(de,y.u_horizon),u_horizon_normal:new e.c3(de,y.u_horizon_normal),u_sky_horizon_blend:new e.bp(de,y.u_sky_horizon_blend),u_sky_blend:new e.bp(de,y.u_sky_blend)})};class Yu{constructor(y,O,ie){this.context=y;let ce=y.gl;this.buffer=ce.createBuffer(),this.dynamicDraw=!!ie,this.context.unbindVAO(),y.bindElementBuffer.set(this.buffer),ce.bufferData(ce.ELEMENT_ARRAY_BUFFER,O.arrayBuffer,this.dynamicDraw?ce.DYNAMIC_DRAW:ce.STATIC_DRAW),this.dynamicDraw||O.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(y){let O=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),O.bufferSubData(O.ELEMENT_ARRAY_BUFFER,0,y.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let pc={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Kc{constructor(y,O,ie,ce){this.length=O.length,this.attributes=ie,this.itemSize=O.bytesPerElement,this.dynamicDraw=ce,this.context=y;let _e=y.gl;this.buffer=_e.createBuffer(),y.bindVertexBuffer.set(this.buffer),_e.bufferData(_e.ARRAY_BUFFER,O.arrayBuffer,this.dynamicDraw?_e.DYNAMIC_DRAW:_e.STATIC_DRAW),this.dynamicDraw||O.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(y){if(y.length!==this.length)throw new Error(`Length of new data is ${y.length}, which doesn't match current length of ${this.length}`);let O=this.context.gl;this.bind(),O.bufferSubData(O.ARRAY_BUFFER,0,y.arrayBuffer)}enableAttributes(y,O){for(let ie of this.attributes){let ce=O.attributes[ie.name];ce!==void 0&&y.enableVertexAttribArray(ce)}}setVertexAttribPointers(y,O,ie){for(let ce of this.attributes){let _e=O.attributes[ce.name];_e!==void 0&&y.vertexAttribPointer(_e,ce.components,y[pc[ce.type]],!1,this.itemSize,ce.offset+this.itemSize*(ie||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class cs{constructor(y){this.gl=y.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(y){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Df extends cs{getDefault(){return e.bo.transparent}set(y){let O=this.current;(y.r!==O.r||y.g!==O.g||y.b!==O.b||y.a!==O.a||this.dirty)&&(this.gl.clearColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class cu extends cs{getDefault(){return 1}set(y){(y!==this.current||this.dirty)&&(this.gl.clearDepth(y),this.current=y,this.dirty=!1)}}class Cl extends cs{getDefault(){return 0}set(y){(y!==this.current||this.dirty)&&(this.gl.clearStencil(y),this.current=y,this.dirty=!1)}}class Ll extends cs{getDefault(){return[!0,!0,!0,!0]}set(y){let O=this.current;(y[0]!==O[0]||y[1]!==O[1]||y[2]!==O[2]||y[3]!==O[3]||this.dirty)&&(this.gl.colorMask(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class If extends cs{getDefault(){return!0}set(y){(y!==this.current||this.dirty)&&(this.gl.depthMask(y),this.current=y,this.dirty=!1)}}class yu extends cs{getDefault(){return 255}set(y){(y!==this.current||this.dirty)&&(this.gl.stencilMask(y),this.current=y,this.dirty=!1)}}class Bc extends cs{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(y){let O=this.current;(y.func!==O.func||y.ref!==O.ref||y.mask!==O.mask||this.dirty)&&(this.gl.stencilFunc(y.func,y.ref,y.mask),this.current=y,this.dirty=!1)}}class Tl extends cs{getDefault(){let y=this.gl;return[y.KEEP,y.KEEP,y.KEEP]}set(y){let O=this.current;(y[0]!==O[0]||y[1]!==O[1]||y[2]!==O[2]||this.dirty)&&(this.gl.stencilOp(y[0],y[1],y[2]),this.current=y,this.dirty=!1)}}class ll extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;y?O.enable(O.STENCIL_TEST):O.disable(O.STENCIL_TEST),this.current=y,this.dirty=!1}}class Jc extends cs{getDefault(){return[0,1]}set(y){let O=this.current;(y[0]!==O[0]||y[1]!==O[1]||this.dirty)&&(this.gl.depthRange(y[0],y[1]),this.current=y,this.dirty=!1)}}class Nc extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;y?O.enable(O.DEPTH_TEST):O.disable(O.DEPTH_TEST),this.current=y,this.dirty=!1}}class Rf extends cs{getDefault(){return this.gl.LESS}set(y){(y!==this.current||this.dirty)&&(this.gl.depthFunc(y),this.current=y,this.dirty=!1)}}class fu extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;y?O.enable(O.BLEND):O.disable(O.BLEND),this.current=y,this.dirty=!1}}class Du extends cs{getDefault(){let y=this.gl;return[y.ONE,y.ZERO]}set(y){let O=this.current;(y[0]!==O[0]||y[1]!==O[1]||this.dirty)&&(this.gl.blendFunc(y[0],y[1]),this.current=y,this.dirty=!1)}}class Iu extends cs{getDefault(){return e.bo.transparent}set(y){let O=this.current;(y.r!==O.r||y.g!==O.g||y.b!==O.b||y.a!==O.a||this.dirty)&&(this.gl.blendColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class Xu extends cs{getDefault(){return this.gl.FUNC_ADD}set(y){(y!==this.current||this.dirty)&&(this.gl.blendEquation(y),this.current=y,this.dirty=!1)}}class Qc extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;y?O.enable(O.CULL_FACE):O.disable(O.CULL_FACE),this.current=y,this.dirty=!1}}class ef extends cs{getDefault(){return this.gl.BACK}set(y){(y!==this.current||this.dirty)&&(this.gl.cullFace(y),this.current=y,this.dirty=!1)}}class _u extends cs{getDefault(){return this.gl.CCW}set(y){(y!==this.current||this.dirty)&&(this.gl.frontFace(y),this.current=y,this.dirty=!1)}}class $u extends cs{getDefault(){return null}set(y){(y!==this.current||this.dirty)&&(this.gl.useProgram(y),this.current=y,this.dirty=!1)}}class mc extends cs{getDefault(){return this.gl.TEXTURE0}set(y){(y!==this.current||this.dirty)&&(this.gl.activeTexture(y),this.current=y,this.dirty=!1)}}class Ru extends cs{getDefault(){let y=this.gl;return[0,0,y.drawingBufferWidth,y.drawingBufferHeight]}set(y){let O=this.current;(y[0]!==O[0]||y[1]!==O[1]||y[2]!==O[2]||y[3]!==O[3]||this.dirty)&&(this.gl.viewport(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class zo extends cs{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.bindFramebuffer(O.FRAMEBUFFER,y),this.current=y,this.dirty=!1}}class gc extends cs{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.bindRenderbuffer(O.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class Vf extends cs{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.bindTexture(O.TEXTURE_2D,y),this.current=y,this.dirty=!1}}class mf extends cs{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.bindBuffer(O.ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class tf extends cs{getDefault(){return null}set(y){let O=this.gl;O.bindBuffer(O.ELEMENT_ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class gf extends cs{getDefault(){return null}set(y){var O;if(y===this.current&&!this.dirty)return;let ie=this.gl;us(ie)?ie.bindVertexArray(y):(O=ie.getExtension("OES_vertex_array_object"))===null||O===void 0||O.bindVertexArrayOES(y),this.current=y,this.dirty=!1}}class Hf extends cs{getDefault(){return 4}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.pixelStorei(O.UNPACK_ALIGNMENT,y),this.current=y,this.dirty=!1}}class yf extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.pixelStorei(O.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),this.current=y,this.dirty=!1}}class ul extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.pixelStorei(O.UNPACK_FLIP_Y_WEBGL,y),this.current=y,this.dirty=!1}}class Pl extends cs{constructor(y,O){super(y),this.context=y,this.parent=O}getDefault(){return null}}class yc extends Pl{setDirty(){this.dirty=!0}set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let O=this.gl;O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,y,0),this.current=y,this.dirty=!1}}class _c extends Pl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let O=this.gl;O.framebufferRenderbuffer(O.FRAMEBUFFER,O.DEPTH_ATTACHMENT,O.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class bc extends Pl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let O=this.gl;O.framebufferRenderbuffer(O.FRAMEBUFFER,O.DEPTH_STENCIL_ATTACHMENT,O.RENDERBUFFER,y),this.current=y,this.dirty=!1}}let ac="Framebuffer is not complete";class zt{constructor(y,O,ie,ce,_e){this.context=y,this.width=O,this.height=ie;let De=y.gl,Ne=this.framebuffer=De.createFramebuffer();if(this.colorAttachment=new yc(y,Ne),ce)this.depthAttachment=_e?new bc(y,Ne):new _c(y,Ne);else if(_e)throw new Error("Stencil cannot be set without depth");if(De.checkFramebufferStatus(De.FRAMEBUFFER)!==De.FRAMEBUFFER_COMPLETE)throw new Error(ac)}destroy(){let y=this.context.gl,O=this.colorAttachment.get();if(O&&y.deleteTexture(O),this.depthAttachment){let ie=this.depthAttachment.get();ie&&y.deleteRenderbuffer(ie)}y.deleteFramebuffer(this.framebuffer)}}class rr{constructor(y){var O,ie;if(this.gl=y,this.clearColor=new Df(this),this.clearDepth=new cu(this),this.clearStencil=new Cl(this),this.colorMask=new Ll(this),this.depthMask=new If(this),this.stencilMask=new yu(this),this.stencilFunc=new Bc(this),this.stencilOp=new Tl(this),this.stencilTest=new ll(this),this.depthRange=new Jc(this),this.depthTest=new Nc(this),this.depthFunc=new Rf(this),this.blend=new fu(this),this.blendFunc=new Du(this),this.blendColor=new Iu(this),this.blendEquation=new Xu(this),this.cullFace=new Qc(this),this.cullFaceSide=new ef(this),this.frontFace=new _u(this),this.program=new $u(this),this.activeTexture=new mc(this),this.viewport=new Ru(this),this.bindFramebuffer=new zo(this),this.bindRenderbuffer=new gc(this),this.bindTexture=new Vf(this),this.bindVertexBuffer=new mf(this),this.bindElementBuffer=new tf(this),this.bindVertexArray=new gf(this),this.pixelStoreUnpack=new Hf(this),this.pixelStoreUnpackPremultiplyAlpha=new yf(this),this.pixelStoreUnpackFlipY=new ul(this),this.extTextureFilterAnisotropic=y.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=y.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=y.getParameter(y.MAX_TEXTURE_SIZE),us(y)){this.HALF_FLOAT=y.HALF_FLOAT;let ce=y.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(O=y.RGBA16F)!==null&&O!==void 0?O:ce?.RGBA16F_EXT,this.RGB16F=(ie=y.RGB16F)!==null&&ie!==void 0?ie:ce?.RGB16F_EXT,y.getExtension("EXT_color_buffer_float")}else{y.getExtension("EXT_color_buffer_half_float"),y.getExtension("OES_texture_half_float_linear");let ce=y.getExtension("OES_texture_half_float");this.HALF_FLOAT=ce?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(y,O){return new Yu(this,y,O)}createVertexBuffer(y,O,ie){return new Kc(this,y,O,ie)}createRenderbuffer(y,O,ie){let ce=this.gl,_e=ce.createRenderbuffer();return this.bindRenderbuffer.set(_e),ce.renderbufferStorage(ce.RENDERBUFFER,y,O,ie),this.bindRenderbuffer.set(null),_e}createFramebuffer(y,O,ie,ce){return new zt(this,y,O,ie,ce)}clear({color:y,depth:O,stencil:ie}){let ce=this.gl,_e=0;y&&(_e|=ce.COLOR_BUFFER_BIT,this.clearColor.set(y),this.colorMask.set([!0,!0,!0,!0])),O!==void 0&&(_e|=ce.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(O),this.depthMask.set(!0)),ie!==void 0&&(_e|=ce.STENCIL_BUFFER_BIT,this.clearStencil.set(ie),this.stencilMask.set(255)),ce.clear(_e)}setCullFace(y){y.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(y.mode),this.frontFace.set(y.frontFace))}setDepthMode(y){y.func!==this.gl.ALWAYS||y.mask?(this.depthTest.set(!0),this.depthFunc.set(y.func),this.depthMask.set(y.mask),this.depthRange.set(y.range)):this.depthTest.set(!1)}setStencilMode(y){y.test.func!==this.gl.ALWAYS||y.mask?(this.stencilTest.set(!0),this.stencilMask.set(y.mask),this.stencilOp.set([y.fail,y.depthFail,y.pass]),this.stencilFunc.set({func:y.test.func,ref:y.ref,mask:y.test.mask})):this.stencilTest.set(!1)}setColorMode(y){e.bQ(y.blendFunction,wo.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(y.blendFunction),this.blendColor.set(y.blendColor)),this.colorMask.set(y.mask)}createVertexArray(){var y;return us(this.gl)?this.gl.createVertexArray():(y=this.gl.getExtension("OES_vertex_array_object"))===null||y===void 0?void 0:y.createVertexArrayOES()}deleteVertexArray(y){var O;us(this.gl)?this.gl.deleteVertexArray(y):(O=this.gl.getExtension("OES_vertex_array_object"))===null||O===void 0||O.deleteVertexArrayOES(y)}unbindVAO(){this.bindVertexArray.set(null)}}let Br;function wr(de,y,O,ie,ce){var _e,De;let Ne=de.context,Ye=de.transform,lt=Ne.gl,ct=de.useProgram("collisionBox"),Ft=[],Gt=0,Jt=0;for(let Ar of ie){let dr=y.getTile(Ar).getBucket(O);if(!dr)continue;let mr=ce?dr.textCollisionBox:dr.iconCollisionBox,qr=dr.collisionCircleArray;qr.length>0&&(Ft.push({circleArray:qr,circleOffset:Jt,coord:Ar}),Gt+=qr.length/4,Jt=Gt),mr&&ct.draw(Ne,lt.LINES,lo.disabled,mo.disabled,de.colorModeForRenderPass(),Di.disabled,$c(de.transform),(_e=de.style.map.terrain)===null||_e===void 0?void 0:_e.getTerrainData(Ar),Ye.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),O.id,mr.layoutVertexBuffer,mr.indexBuffer,mr.segments,null,de.transform.zoom,null,null,mr.collisionVertexBuffer)}if(!ce||!Ft.length)return;let it=de.useProgram("collisionCircle"),Rt=new e.ca;Rt.resize(4*Gt),Rt._trim();let qt=0;for(let Ar of Ft)for(let dr=0;dr=0&&(Rt[or.associatedIconIndex]={shiftedAnchor:Tn,angle:Xn})}else da(or.numGlyphs,Jt)}if(Ye){it.clear();let qt=de.icon.placedSymbolArray;for(let or=0;orde.style.map.terrain.getElevation(Sn,Do,ru):null,Il=O.layout.get("text-rotation-alignment")==="map";jn(Xn,de,ce,fo,ts,Ar,lt,Il,Sn.toUnwrapped(),or.width,or.height,jo,el)}let Qs=ce&&Nn||Uo,os=dr||Qs?un:Ar?fo:de.transform.clipSpaceToPixelsMatrix,hs=$a&&O.paint.get(ce?"text-halo-width":"icon-halo-width").constantOr(1)!==0,ss;ss=$a?Xn.iconsInText?bl(Si.kind,gi,mr,Ar,dr,Qs,de,os,To,jo,Ya,Eo,qn):Pf(Si.kind,gi,mr,Ar,dr,Qs,de,os,To,jo,ce,Ya,hs,qn):gu(Si.kind,gi,mr,Ar,dr,Qs,de,os,To,jo,ce,Ya,qn);let ks={program:xa,buffers:$n,uniformValues:ss,projectionData:qs,atlasTexture:Xa,atlasTextureIcon:yi,atlasInterpolation:pi,atlasInterpolationIcon:Xi,isSDF:$a,hasHalo:hs};if(qr&&Xn.canOverlap){Lr=!0;let ts=$n.segments.get();for(let el of ts)Dn.push({segments:new e.aV([el]),sortKey:el.sortKey,state:ks,terrainData:Wa})}else Dn.push({segments:$n.segments,sortKey:0,state:ks,terrainData:Wa})}Lr&&Dn.sort((Sn,Tn)=>Sn.sortKey-Tn.sortKey);let _n=(it=O.paint.get(ce?"text-halo-width":"icon-halo-width").constantOr(null))!==null&&it!==void 0?it:1/0,vn=O.layout.get("text-letter-spacing").constantOr(0)*e.aJ<0||_n>1;for(let Sn of Dn){let Tn=Sn.state;Rt.activeTexture.set(qt.TEXTURE0),Tn.atlasTexture.bind(Tn.atlasInterpolation,qt.CLAMP_TO_EDGE),Tn.atlasTextureIcon&&(Rt.activeTexture.set(qt.TEXTURE1),Tn.atlasTextureIcon&&Tn.atlasTextureIcon.bind(Tn.atlasInterpolationIcon,qt.CLAMP_TO_EDGE));let Xn=Tn.isSDF&&Tn.hasHalo;if(Xn){let $n=Tn.uniformValues;$n.u_is_halo=1,vn&&($n.u_is_plain=0,Gn(Tn.buffers,Sn.segments,O,de,Tn.program,cn,ct,Ft,$n,Tn.projectionData,Sn.terrainData),$n.u_is_halo=0,$n.u_is_plain=1)}Gn(Tn.buffers,Sn.segments,O,de,Tn.program,cn,ct,Ft,Tn.uniformValues,Tn.projectionData,Sn.terrainData),Xn&&!vn&&(Tn.uniformValues.u_is_halo=0)}}function Gn(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct){let Ft=ie.context;ce.draw(Ft,Ft.gl.TRIANGLES,_e,De,Ne,Di.backCCW,Ye,ct,lt,O.id,de.layoutVertexBuffer,de.indexBuffer,y,O.paint,ie.transform.zoom,de.programConfigurations.get(O.id),de.dynamicLayoutVertexBuffer,de.opacityVertexBuffer)}function oa(de,y,O,ie,ce){let _e=de.context,De=_e.gl,Ne=mo.disabled,Ye=new wo([De.ONE,De.ONE],e.bo.transparent,[!0,!0,!0,!0]),lt=y.getBucket(O);if(!lt)return;let ct=ie.key,Ft=O.heatmapFbos.get(ct);Ft||(Ft=La(_e,y.tileSize,y.tileSize),O.heatmapFbos.set(ct,Ft)),_e.bindFramebuffer.set(Ft.framebuffer),_e.viewport.set([0,0,y.tileSize,y.tileSize]),_e.clear({color:e.bo.transparent});let Gt=lt.programConfigurations.get(O.id),Jt=de.useProgram("heatmap",Gt,!ce),it=de.transform.getProjectionData({overscaledTileID:y.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Rt=de.style.map.terrain.getTerrainData(ie);Jt.draw(_e,De.TRIANGLES,lo.disabled,Ne,Ye,Di.disabled,Dc(y,de.transform.zoom,O.paint.get("heatmap-intensity"),1),Rt,it,O.id,lt.layoutVertexBuffer,lt.indexBuffer,lt.segments,O.paint,de.transform.zoom,Gt)}function fa(de,y,O,ie,ce){let _e=de.context,De=_e.gl,Ne=de.transform;_e.setColorMode(de.colorModeForRenderPass());let Ye=qa(_e,y),lt=O.key,ct=y.heatmapFbos.get(lt);if(!ct)return;_e.activeTexture.set(De.TEXTURE0),De.bindTexture(De.TEXTURE_2D,ct.colorAttachment.get()),_e.activeTexture.set(De.TEXTURE1),Ye.bind(De.LINEAR,De.CLAMP_TO_EDGE);let Ft=Ne.getProjectionData({overscaledTileID:O,applyTerrainMatrix:ce,applyGlobeMatrix:!ie});de.useProgram("heatmapTexture").draw(_e,De.TRIANGLES,lo.disabled,mo.disabled,de.colorModeForRenderPass(),Di.disabled,Ic(de,y,0,1),null,Ft,y.id,de.rasterBoundsBuffer,de.quadTriangleIndexBuffer,de.rasterBoundsSegments,y.paint,Ne.zoom),ct.destroy(),y.heatmapFbos.delete(lt)}function La(de,y,O){var ie,ce;let _e=de.gl,De=_e.createTexture();_e.bindTexture(_e.TEXTURE_2D,De),_e.texParameteri(_e.TEXTURE_2D,_e.TEXTURE_WRAP_S,_e.CLAMP_TO_EDGE),_e.texParameteri(_e.TEXTURE_2D,_e.TEXTURE_WRAP_T,_e.CLAMP_TO_EDGE),_e.texParameteri(_e.TEXTURE_2D,_e.TEXTURE_MIN_FILTER,_e.LINEAR),_e.texParameteri(_e.TEXTURE_2D,_e.TEXTURE_MAG_FILTER,_e.LINEAR);let Ne=(ie=de.HALF_FLOAT)!==null&&ie!==void 0?ie:_e.UNSIGNED_BYTE,Ye=(ce=de.RGBA16F)!==null&&ce!==void 0?ce:_e.RGBA;_e.texImage2D(_e.TEXTURE_2D,0,Ye,y,O,0,_e.RGBA,Ne,null);let lt=de.createFramebuffer(y,O,!1,!1);return lt.colorAttachment.set(De),lt}function qa(de,y){return y.colorRampTexture||(y.colorRampTexture=new e.T(de,y.colorRamp,de.gl.RGBA)),y.colorRampTexture}function Bi(de,y,O,ie,ce,_e,De,Ne){let Ye=256;if(ce.stepInterpolant){let lt=y.getSource().maxzoom,ct=De.canonical.z===lt?Math.ceil(1<de.options.anisotropicFilterPitch&&Jt.texParameterf(Jt.TEXTURE_2D,Gt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Gt.extTextureFilterAnisotropicMax);let Sn=(ct=de.style.map.terrain)===null||ct===void 0?void 0:ct.getTerrainData(Lr),Tn=Rt.getProjectionData({overscaledTileID:Lr,aligned:vr,applyGlobeMatrix:!lt,applyTerrainMatrix:!0}),Xn=Gu(_n,qn,vn.fadeMix,O,Ne),$n=qt.getMeshFromTileID(Gt,Lr.canonical,_e,De,"raster");it.draw(Gt,Jt.TRIANGLES,cn,ce?ce[Lr.overscaledZ]:mo.disabled,or,Ye?Di.frontCCW:Di.backCCW,Xn,Sn,Tn,O.id,$n.vertexBuffer,$n.indexBuffer,$n.segments)}}function Ks(de,y,O,ie){let ce={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(O===0||ie)return ce;if(de.fadingParentID){let _e=y.getLoadedTile(de.fadingParentID);if(!_e)return ce;let De=Math.pow(2,_e.tileID.overscaledZ-de.tileID.overscaledZ),Ne=[de.tileID.canonical.x*De%1,de.tileID.canonical.y*De%1],Ye=function(lt,ct,Ft){let Gt=m(),Jt=(Gt-ct.timeAdded)/Ft,it=lt.fadingDirection===mt.Incoming,Rt=e.al((Gt-lt.timeAdded)/Ft,0,1),qt=e.al(1-Jt,0,1),or=it?Rt:qt;return{tileOpacity:or,parentTileOpacity:it?qt:Rt,fadeMix:{opacity:1,mix:1-or}}}(de,_e,O);return{parentTile:_e,parentScaleBy:De,parentTopLeft:Ne,fadeValues:Ye}}if(de.selfFading){let _e=function(De,Ne){let Ye=(m()-De.timeAdded)/Ne,lt=e.al(Ye,0,1);return{tileOpacity:lt,fadeMix:{opacity:lt,mix:0}}}(de,O);return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:_e}}return ce}let Rs=new e.bo(1,0,0,1),ps=new e.bo(0,1,0,1),vi=new e.bo(0,0,1,1),Xo=new e.bo(1,0,1,1),Ss=new e.bo(0,1,1,1);function Ws(de,y,O,ie){Nl(de,0,y+O/2,de.transform.width,O,ie)}function Dl(de,y,O,ie){Nl(de,y-O/2,0,O,de.transform.height,ie)}function Nl(de,y,O,ie,ce,_e){let De=de.context,Ne=De.gl;Ne.enable(Ne.SCISSOR_TEST),Ne.scissor(y*de.pixelRatio,O*de.pixelRatio,ie*de.pixelRatio,ce*de.pixelRatio),De.clear({color:_e}),Ne.disable(Ne.SCISSOR_TEST)}function Kl(de,y,O){var ie;let ce=de.context,_e=ce.gl,De=de.useProgram("debug"),Ne=lo.disabled,Ye=mo.disabled,lt=de.colorModeForRenderPass(),ct="$debug",Ft=(ie=de.style.map.terrain)===null||ie===void 0?void 0:ie.getTerrainData(O);ce.activeTexture.set(_e.TEXTURE0);let Gt=y.getTileByID(O.key).latestRawTileData,Jt=Math.floor((Gt?.byteLength||0)/1024),it=y.getTile(O).tileSize,Rt=512/Math.min(it,512)*(O.overscaledZ/de.transform.zoom)*.5,qt=O.canonical.toString();O.overscaledZ!==O.canonical.z&&(qt+=` => ${O.overscaledZ}`),function(vr,Ar){vr.initDebugOverlayCanvas();let dr=vr.debugOverlayCanvas,mr=vr.context.gl,qr=vr.debugOverlayCanvas.getContext("2d");qr.clearRect(0,0,dr.width,dr.height),qr.shadowColor="white",qr.shadowBlur=2,qr.lineWidth=1.5,qr.strokeStyle="white",qr.textBaseline="top",qr.font="bold 36px Open Sans, sans-serif",qr.fillText(Ar,5,5),qr.strokeText(Ar,5,5),vr.debugOverlayTexture.update(dr),vr.debugOverlayTexture.bind(mr.LINEAR,mr.CLAMP_TO_EDGE)}(de,`${qt} ${Jt}kB`);let or=de.transform.getProjectionData({overscaledTileID:O,applyGlobeMatrix:!0,applyTerrainMatrix:!0});De.draw(ce,_e.TRIANGLES,Ne,Ye,wo.alphaBlended,Di.disabled,df(e.bo.transparent,Rt),null,or,ct,de.debugBuffer,de.quadTriangleIndexBuffer,de.debugSegments),De.draw(ce,_e.LINE_STRIP,Ne,Ye,lt,Di.disabled,df(e.bo.red),Ft,or,ct,de.debugBuffer,de.tileBorderIndexBuffer,de.debugSegments)}function Fu(de,y,O,ie){let{isRenderingGlobe:ce}=ie,_e=de.context,De=_e.gl,Ne=de.transform,Ye=de.colorModeForRenderPass(),lt=de.getDepthModeFor3D(),ct=de.useProgram("terrain");_e.bindFramebuffer.set(null),_e.viewport.set([0,0,de.width,de.height]);for(let Ft of O){let Gt=y.getTerrainMesh(Ft.tileID),Jt=de.renderToTexture.getTexture(Ft),it=y.getTerrainData(Ft.tileID);_e.activeTexture.set(De.TEXTURE0),De.bindTexture(De.TEXTURE_2D,Jt.texture);let Rt=y.getMeshFrameDelta(Ne.zoom),qt=Ne.calculateFogMatrix(Ft.tileID.toUnwrapped()),or=Cf(Rt,qt,de.style.sky,Ne.pitch,ce),vr=Ne.getProjectionData({overscaledTileID:Ft.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ct.draw(_e,De.TRIANGLES,lt,mo.disabled,Ye,Di.backCCW,or,it,vr,"terrain",Gt.vertexBuffer,Gt.indexBuffer,Gt.segments)}}function Al(de,y){if(!y.mesh){let O=new e.aU;O.emplaceBack(-1,-1),O.emplaceBack(1,-1),O.emplaceBack(1,1),O.emplaceBack(-1,1);let ie=new e.aW;ie.emplaceBack(0,1,2),ie.emplaceBack(0,2,3),y.mesh=new fi(de.createVertexBuffer(O,xo.members),de.createIndexBuffer(ie),e.aV.simpleSegment(0,0,O.length,ie.length))}return y.mesh}let zu={symbol:function(de,y,O,ie,ce,_e){if(de.renderPass!=="translucent")return;let{isRenderingToTexture:De}=_e,Ne=mo.disabled,Ye=de.colorModeForRenderPass();(O._unevaluatedLayout.hasValue("text-variable-anchor")||O._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(lt,ct,Ft,Gt,Jt,it,Rt,qt,or){var vr;let Ar=ct.transform,dr=ct.style.map.terrain,mr=Jt==="map",qr=it==="map";for(let Lr of lt){let cn=Gt.getTile(Lr),Nn=cn.getBucket(Ft);if(!(!((vr=Nn?.text)===null||vr===void 0)&&vr.segments.get().length))continue;let Dn=e.aw(Nn.textSizeData,Ar.zoom),qn=e.aK(cn,1,ct.transform.zoom),_n=fr(mr,ct.transform,qn),vn=Ft.layout.get("icon-text-fit")!=="none"&&Nn.hasIconData();if(Dn){let Sn=Math.pow(2,Ar.zoom-cn.tileID.overscaledZ),Tn=dr?(Xn,$n)=>dr.getElevation(Lr,Xn,$n):null;Jn(Nn,mr,qr,or,Ar,_n,Sn,Dn,vn,e.aL(Ar,cn,Rt,qt),Lr.toUnwrapped(),Tn)}}}(ie,de,O,y,O.layout.get("text-rotation-alignment"),O.layout.get("text-pitch-alignment"),O.paint.get("text-translate"),O.paint.get("text-translate-anchor"),ce),O.paint.get("icon-opacity").constantOr(1)!==0&&Pa(de,y,O,ie,!1,O.paint.get("icon-translate"),O.paint.get("icon-translate-anchor"),O.layout.get("icon-rotation-alignment"),O.layout.get("icon-pitch-alignment"),O.layout.get("icon-keep-upright"),Ne,Ye,De),O.paint.get("text-opacity").constantOr(1)!==0&&Pa(de,y,O,ie,!0,O.paint.get("text-translate"),O.paint.get("text-translate-anchor"),O.layout.get("text-rotation-alignment"),O.layout.get("text-pitch-alignment"),O.layout.get("text-keep-upright"),Ne,Ye,De),y.map.showCollisionBoxes&&(wr(de,y,O,ie,!0),wr(de,y,O,ie,!1))},circle:function(de,y,O,ie,ce){var _e;if(de.renderPass!=="translucent")return;let{isRenderingToTexture:De}=ce,Ne=O.paint.get("circle-opacity"),Ye=O.paint.get("circle-stroke-width"),lt=O.paint.get("circle-stroke-opacity"),ct=!O.layout.get("circle-sort-key").isConstant();if(Ne.constantOr(1)===0&&(Ye.constantOr(1)===0||lt.constantOr(1)===0))return;let Ft=de.context,Gt=Ft.gl,Jt=de.transform,it=de.getDepthModeForSublayer(0,lo.ReadOnly),Rt=mo.disabled,qt=de.colorModeForRenderPass(),or=[],vr=Jt.getCircleRadiusCorrection();for(let Ar of ie){let dr=y.getTile(Ar),mr=dr.getBucket(O);if(!mr)continue;let qr=O.paint.get("circle-translate"),Lr=O.paint.get("circle-translate-anchor"),cn=e.aL(Jt,dr,qr,Lr),Nn=mr.programConfigurations.get(O.id),Dn=de.useProgram("circle",Nn),qn=mr.layoutVertexBuffer,_n=mr.indexBuffer,vn=(_e=de.style.map.terrain)===null||_e===void 0?void 0:_e.getTerrainData(Ar),Sn={programConfiguration:Nn,program:Dn,layoutVertexBuffer:qn,indexBuffer:_n,uniformValues:Pc(de,dr,O,cn,vr),terrainData:vn,projectionData:Jt.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!De,applyTerrainMatrix:!0})};if(ct){let Tn=mr.segments.get();for(let Xn of Tn)or.push({segments:new e.aV([Xn]),sortKey:Xn.sortKey,state:Sn})}else or.push({segments:mr.segments,sortKey:0,state:Sn})}ct&&or.sort((Ar,dr)=>Ar.sortKey-dr.sortKey);for(let Ar of or){let{programConfiguration:dr,program:mr,layoutVertexBuffer:qr,indexBuffer:Lr,uniformValues:cn,terrainData:Nn,projectionData:Dn}=Ar.state;mr.draw(Ft,Gt.TRIANGLES,it,Rt,qt,Di.backCCW,cn,Nn,Dn,O.id,qr,Lr,Ar.segments,O.paint,de.transform.zoom,dr)}},heatmap:function(de,y,O,ie,ce){if(O.paint.get("heatmap-opacity")===0)return;let _e=de.context,{isRenderingToTexture:De,isRenderingGlobe:Ne}=ce;if(de.style.map.terrain){for(let Ye of ie){let lt=y.getTile(Ye);y.hasRenderableParent(Ye)||(de.renderPass==="offscreen"?oa(de,lt,O,Ye,Ne):de.renderPass==="translucent"&&fa(de,O,Ye,De,Ne))}_e.viewport.set([0,0,de.width,de.height])}else de.renderPass==="offscreen"?function(Ye,lt,ct,Ft){let Gt=Ye.context,Jt=Gt.gl,it=Ye.transform,Rt=mo.disabled,qt=new wo([Jt.ONE,Jt.ONE],e.bo.transparent,[!0,!0,!0,!0]);(function(or,vr,Ar){let dr=or.gl;or.activeTexture.set(dr.TEXTURE1),or.viewport.set([0,0,vr.width/4,vr.height/4]);let mr=Ar.heatmapFbos.get(e.cd);mr?(dr.bindTexture(dr.TEXTURE_2D,mr.colorAttachment.get()),or.bindFramebuffer.set(mr.framebuffer)):(mr=La(or,vr.width/4,vr.height/4),Ar.heatmapFbos.set(e.cd,mr))})(Gt,Ye,ct),Gt.clear({color:e.bo.transparent});for(let or of Ft){if(lt.hasRenderableParent(or))continue;let vr=lt.getTile(or),Ar=vr.getBucket(ct);if(!Ar)continue;let dr=Ar.programConfigurations.get(ct.id),mr=Ye.useProgram("heatmap",dr),qr=it.getProjectionData({overscaledTileID:or,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Lr=it.getCircleRadiusCorrection();mr.draw(Gt,Jt.TRIANGLES,lo.disabled,Rt,qt,Di.backCCW,Dc(vr,it.zoom,ct.paint.get("heatmap-intensity"),Lr),null,qr,ct.id,Ar.layoutVertexBuffer,Ar.indexBuffer,Ar.segments,ct.paint,it.zoom,dr)}Gt.viewport.set([0,0,Ye.width,Ye.height])}(de,y,O,ie):de.renderPass==="translucent"&&function(Ye,lt){let ct=Ye.context,Ft=ct.gl;ct.setColorMode(Ye.colorModeForRenderPass());let Gt=lt.heatmapFbos.get(e.cd);Gt&&(ct.activeTexture.set(Ft.TEXTURE0),Ft.bindTexture(Ft.TEXTURE_2D,Gt.colorAttachment.get()),ct.activeTexture.set(Ft.TEXTURE1),qa(ct,lt).bind(Ft.LINEAR,Ft.CLAMP_TO_EDGE),Ye.useProgram("heatmapTexture").draw(ct,Ft.TRIANGLES,lo.disabled,mo.disabled,Ye.colorModeForRenderPass(),Di.disabled,Ic(Ye,lt,0,1),null,null,lt.id,Ye.viewportBuffer,Ye.quadTriangleIndexBuffer,Ye.viewportSegments,lt.paint,Ye.transform.zoom))}(de,O)},line:function(de,y,O,ie,ce){var _e;if(de.renderPass!=="translucent")return;let{isRenderingToTexture:De}=ce,Ne=O.paint.get("line-opacity"),Ye=O.paint.get("line-width");if(Ne.constantOr(1)===0||Ye.constantOr(1)===0)return;let lt=de.getDepthModeForSublayer(0,lo.ReadOnly),ct=de.colorModeForRenderPass(),Ft=O.paint.get("line-dasharray"),Gt=Ft.constantOr(1),Jt=O.paint.get("line-pattern"),it=Jt.constantOr(1),Rt=O.paint.get("line-gradient"),qt=O.getCrossfadeParameters(),or;or=it?"linePattern":Gt&&Rt?"lineGradientSDF":Gt?"lineSDF":Rt?"lineGradient":"line";let vr=de.context,Ar=vr.gl,dr=de.transform,mr=!0;for(let qr of ie){let Lr=y.getTile(qr);if(it&&!Lr.patternsLoaded())continue;let cn=Lr.getBucket(O);if(!cn)continue;let Nn=cn.programConfigurations.get(O.id),Dn=de.context.program.get(),qn=de.useProgram(or,Nn),_n=mr||qn.program!==Dn,vn=(_e=de.style.map.terrain)===null||_e===void 0?void 0:_e.getTerrainData(qr),Sn=Jt.constantOr(null),Tn=Ft?.constantOr(null);if(Sn&&Lr.imageAtlas){let Si=Lr.imageAtlas,Ma=Si.patternPositions[Sn.to.toString()],xa=Si.patternPositions[Sn.from.toString()];Ma&&xa&&Nn.setConstantPatternPositions(Ma,xa)}else if(Tn){let Si=O.layout.get("line-cap").constantOr(null)==="round",Ma=de.lineAtlas.getDash(Tn.to,Si),xa=de.lineAtlas.getDash(Tn.from,Si);Nn.setConstantDashPositions(Ma,xa)}let Xn=dr.getProjectionData({overscaledTileID:qr,applyGlobeMatrix:!De,applyTerrainMatrix:!0}),$n=dr.getPixelScale(),Ha;it?(Ha=Pu(de,Lr,O,$n,qt),Ni(vr,Ar,Lr,Nn,qt)):Gt&&Rt?(Ha=zc(de,Lr,O,$n,qt,cn.lineClipsArray.length),Va(de,y,vr,Ar,O,cn,qr,Nn,qt)):Gt?(Ha=vc(de,Lr,O,$n,qt),Zi(de,vr,Ar,Nn,_n,qt)):Rt?(Ha=Fc(de,Lr,O,$n,cn.lineClipsArray.length),_i(de,y,vr,Ar,O,cn,qr)):Ha=sl(de,Lr,O,$n);let $a=de.stencilModeForClipping(qr);qn.draw(vr,Ar.TRIANGLES,lt,$a,ct,Di.disabled,Ha,vn,Xn,O.id,cn.layoutVertexBuffer,cn.indexBuffer,cn.segments,O.paint,de.transform.zoom,Nn,cn.layoutVertexBuffer2),mr=!1}},fill:function(de,y,O,ie,ce){let _e=O.paint.get("fill-color"),De=O.paint.get("fill-opacity");if(De.constantOr(1)===0)return;let{isRenderingToTexture:Ne}=ce,Ye=de.colorModeForRenderPass(),lt=O.paint.get("fill-pattern"),ct=de.opaquePassEnabledForLayer()&&!lt.constantOr(1)&&_e.constantOr(e.bo.transparent).a===1&&De.constantOr(0)===1?"opaque":"translucent";if(de.renderPass===ct){let Ft=de.getDepthModeForSublayer(1,de.renderPass==="opaque"?lo.ReadWrite:lo.ReadOnly);oo(de,y,O,ie,Ft,Ye,!1,Ne)}if(de.renderPass==="translucent"&&O.paint.get("fill-antialias")){let Ft=de.getDepthModeForSublayer(O.getPaintProperty("fill-outline-color")?2:0,lo.ReadOnly);oo(de,y,O,ie,Ft,Ye,!0,Ne)}},fillExtrusion:function(de,y,O,ie,ce){let _e=O.paint.get("fill-extrusion-opacity");if(_e===0)return;let{isRenderingToTexture:De}=ce;if(de.renderPass==="translucent"){let Ne=new lo(de.context.gl.LEQUAL,lo.ReadWrite,de.depthRangeFor3D);if(_e!==1||O.paint.get("fill-extrusion-pattern").constantOr(1))go(de,y,O,ie,Ne,mo.disabled,wo.disabled,De),go(de,y,O,ie,Ne,de.stencilModeFor3D(),de.colorModeForRenderPass(),De);else{let Ye=de.colorModeForRenderPass();go(de,y,O,ie,Ne,mo.disabled,Ye,De)}}},hillshade:function(de,y,O,ie,ce){if(de.renderPass!=="offscreen"&&de.renderPass!=="translucent")return;let{isRenderingToTexture:_e}=ce,De=de.context,Ne=de.style.projection.useSubdivision,Ye=de.getDepthModeForSublayer(0,lo.ReadOnly),lt=de.colorModeForRenderPass();if(de.renderPass==="offscreen")(function(ct,Ft,Gt,Jt,it,Rt,qt){let or=ct.context,vr=or.gl,Ar=Jt.paint.get("resampling")==="nearest"?vr.NEAREST:vr.LINEAR;for(let dr of Gt){let mr=Ft.getTile(dr),qr=mr.dem;if(!qr?.data||!mr.needsHillshadePrepare)continue;let Lr=qr.dim,cn=qr.stride,Nn=qr.getPixels();if(or.activeTexture.set(vr.TEXTURE1),or.pixelStoreUnpackPremultiplyAlpha.set(!1),mr.demTexture||(mr.demTexture=ct.getTileTexture(cn)),mr.demTexture){let qn=mr.demTexture;qn.update(Nn,{premultiply:!1}),qn.bind(vr.NEAREST,vr.CLAMP_TO_EDGE)}else mr.demTexture=new e.T(or,Nn,vr.RGBA,{premultiply:!1}),mr.demTexture.bind(vr.NEAREST,vr.CLAMP_TO_EDGE);or.activeTexture.set(vr.TEXTURE0);let Dn=mr.fbo;if(!Dn){let qn=new e.T(or,{width:Lr,height:Lr,data:null},vr.RGBA);qn.bind(Ar,vr.CLAMP_TO_EDGE),Dn=mr.fbo=or.createFramebuffer(Lr,Lr,!0,!1),Dn.colorAttachment.set(qn.texture)}or.bindFramebuffer.set(Dn.framebuffer),or.viewport.set([0,0,Lr,Lr]),ct.useProgram("hillshadePrepare").draw(or,vr.TRIANGLES,it,Rt,qt,Di.disabled,Rc(mr.tileID,qr),null,null,Jt.id,ct.rasterBoundsBuffer,ct.quadTriangleIndexBuffer,ct.rasterBoundsSegments),mr.needsHillshadePrepare=!1}})(de,y,ie,O,Ye,mo.disabled,lt),De.viewport.set([0,0,de.width,de.height]);else if(de.renderPass==="translucent")if(Ne){let[ct,Ft,Gt]=de.stencilConfigForOverlapTwoPass(ie);Vo(de,y,O,Gt,ct,Ye,lt,!1,_e),Vo(de,y,O,Gt,Ft,Ye,lt,!0,_e)}else{let[ct,Ft]=de.getStencilConfigForOverlapAndUpdateStencilID(ie);Vo(de,y,O,Ft,ct,Ye,lt,!1,_e)}},colorRelief:function(de,y,O,ie,ce){if(de.renderPass!=="translucent"||!ie.length)return;let{isRenderingToTexture:_e}=ce,De=de.style.projection.useSubdivision,Ne=de.getDepthModeForSublayer(0,lo.ReadOnly),Ye=de.colorModeForRenderPass();if(De){let[lt,ct,Ft]=de.stencilConfigForOverlapTwoPass(ie);Yo(de,y,O,Ft,lt,Ne,Ye,!1,_e),Yo(de,y,O,Ft,ct,Ne,Ye,!0,_e)}else{let[lt,ct]=de.getStencilConfigForOverlapAndUpdateStencilID(ie);Yo(de,y,O,ct,lt,Ne,Ye,!1,_e)}},raster:function(de,y,O,ie,ce){if(de.renderPass!=="translucent"||O.paint.get("raster-opacity")===0||!ie.length)return;let{isRenderingToTexture:_e}=ce,De=y.getSource(),Ne=de.style.projection.useSubdivision;if(De instanceof ke)Bo(de,y,O,ie,null,!1,!1,De.tileCoords,De.flippedWindingOrder,_e);else if(Ne){let[Ye,lt,ct]=de.stencilConfigForOverlapTwoPass(ie);Bo(de,y,O,ct,Ye,!1,!0,as,!1,_e),Bo(de,y,O,ct,lt,!0,!0,as,!1,_e)}else{let[Ye,lt]=de.getStencilConfigForOverlapAndUpdateStencilID(ie);Bo(de,y,O,lt,Ye,!1,!0,as,!1,_e)}},background:function(de,y,O,ie,ce){var _e;let De=O.paint.get("background-color"),Ne=O.paint.get("background-opacity");if(Ne===0)return;let{isRenderingToTexture:Ye}=ce,lt=de.context,ct=lt.gl,Ft=de.style.projection,Gt=de.transform,Jt=Gt.tileSize,it=O.paint.get("background-pattern");if(de.isPatternMissing(it))return;let Rt=!it&&De.a===1&&Ne===1&&de.opaquePassEnabledForLayer()?"opaque":"translucent";if(de.renderPass!==Rt)return;let qt=mo.disabled,or=de.getDepthModeForSublayer(0,Rt==="opaque"?lo.ReadWrite:lo.ReadOnly),vr=de.colorModeForRenderPass(),Ar=de.useProgram(it?"backgroundPattern":"background"),dr=ie||Ze(Gt,{tileSize:Jt,terrain:de.style.map.terrain});it&&(lt.activeTexture.set(ct.TEXTURE0),de.imageManager.bind(de.context));let mr=O.getCrossfadeParameters();for(let qr of dr){let Lr=Gt.getProjectionData({overscaledTileID:qr,applyGlobeMatrix:!Ye,applyTerrainMatrix:!0}),cn=it?Wu(Ne,de,it,{tileID:qr,tileSize:Jt},mr):xl(Ne,De),Nn=(_e=de.style.map.terrain)===null||_e===void 0?void 0:_e.getTerrainData(qr),Dn=Ft.getMeshFromTileID(lt,qr.canonical,!1,!0,"raster");Ar.draw(lt,ct.TRIANGLES,or,qt,vr,Di.backCCW,cn,Nn,Lr,O.id,Dn.vertexBuffer,Dn.indexBuffer,Dn.segments)}},sky:function(de,y){let O=de.context,ie=O.gl,ce=((ct,Ft,Gt)=>{let Jt=Math.cos(Ft.rollInRadians),it=Math.sin(Ft.rollInRadians),Rt=Zt(Ft),qt=Ft.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:ct.properties.get("sky-color"),u_horizon_color:ct.properties.get("horizon-color"),u_horizon:[(Ft.width/2-Rt*it)*Gt,(Ft.height/2+Rt*Jt)*Gt],u_horizon_normal:[-it,Jt],u_sky_horizon_blend:ct.properties.get("sky-horizon-blend")*Ft.height/2*Gt,u_sky_blend:qt}})(y,de.style.map.transform,de.pixelRatio),_e=new lo(ie.LEQUAL,lo.ReadWrite,[0,1]),De=mo.disabled,Ne=de.colorModeForRenderPass(),Ye=de.useProgram("sky"),lt=Al(O,y);Ye.draw(O,ie.TRIANGLES,_e,De,Ne,Di.disabled,ce,null,void 0,"sky",lt.vertexBuffer,lt.indexBuffer,lt.segments)},atmosphere:function(de,y,O){let ie=de.context,ce=ie.gl,_e=de.useProgram("atmosphere"),De=new lo(ce.LEQUAL,lo.ReadOnly,[0,1]),Ne=de.transform,Ye=function(qt,or){let vr=qt.properties.get("position"),Ar=[-vr.x,-vr.y,-vr.z],dr=e.ap(new Float64Array(16));return qt.properties.get("anchor")==="map"&&(e.be(dr,dr,or.rollInRadians),e.bf(dr,dr,-or.pitchInRadians),e.be(dr,dr,or.bearingInRadians),e.bf(dr,dr,or.center.lat*Math.PI/180),e.bI(dr,dr,-or.center.lng*Math.PI/180)),e.cg(Ar,Ar,dr),Ar}(O,de.transform),lt=Ne.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),ct=y.properties.get("atmosphere-blend")*lt.projectionTransition;if(ct===0)return;let Ft=Ls(Ne.worldSize,Ne.center.lat),Gt=Ne.inverseProjectionMatrix,Jt=new Float64Array(4);Jt[3]=1,e.aE(Jt,Jt,Ne.modelViewProjectionMatrix),Jt[0]/=Jt[3],Jt[1]/=Jt[3],Jt[2]/=Jt[3],Jt[3]=1,e.aE(Jt,Jt,Gt),Jt[0]/=Jt[3],Jt[1]/=Jt[3],Jt[2]/=Jt[3],Jt[3]=1;let it=((qt,or,vr,Ar,dr)=>({u_sun_pos:qt,u_atmosphere_blend:or,u_globe_position:vr,u_globe_radius:Ar,u_inv_proj_matrix:dr}))(Ye,ct,[Jt[0],Jt[1],Jt[2]],Ft,Gt),Rt=Al(ie,y);_e.draw(ie,ce.TRIANGLES,De,mo.disabled,wo.alphaBlended,Di.disabled,it,null,null,"atmosphere",Rt.vertexBuffer,Rt.indexBuffer,Rt.segments)},custom:function(de,y,O,ie){let{isRenderingGlobe:ce}=ie,_e=de.context,De=O.implementation,Ne=de.style.projection,Ye=de.transform,lt=Ye.getProjectionDataForCustomLayer(ce),ct={farZ:Ye.farZ,nearZ:Ye.nearZ,fov:Ye.fov*Math.PI/180,modelViewProjectionMatrix:Ye.modelViewProjectionMatrix,projectionMatrix:Ye.projectionMatrix,shaderData:{variantName:Ne.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; +`);us(ct)||(mr=function(Pa){return Pa.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(mr),qr=function(Pa){return Pa.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(qr));let Lr=ct.createShader(ct.FRAGMENT_SHADER);if(ct.isContextLost())return void(this.failedToCreate=!0);if(ct.shaderSource(Lr,mr),ct.compileShader(Lr),!ct.getShaderParameter(Lr,ct.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${ct.getShaderInfoLog(Lr)}`);ct.attachShader(this.program,Lr);let ua=ct.createShader(ct.VERTEX_SHADER);if(ct.isContextLost())return void(this.failedToCreate=!0);if(ct.shaderSource(ua,qr),ct.compileShader(ua),!ct.getShaderParameter(ua,ct.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${ct.getShaderInfoLog(ua)}`);ct.attachShader(this.program,ua),this.attributes={};let Ba={};this.numAttributes=Jt.length;for(let Pa=0;Pa({u_depth:new e.b_(Pa,Ua.u_depth),u_terrain:new e.b_(Pa,Ua.u_terrain),u_terrain_dim:new e.bp(Pa,Ua.u_terrain_dim),u_terrain_matrix:new e.c0(Pa,Ua.u_terrain_matrix),u_terrain_unpack:new e.c1(Pa,Ua.u_terrain_unpack),u_terrain_exaggeration:new e.bp(Pa,Ua.u_terrain_exaggeration)}))(y,Ba),this.projectionUniforms=((Pa,Ua)=>({u_projection_matrix:new e.c0(Pa,Ua.u_projection_matrix),u_projection_tile_mercator_coords:new e.c1(Pa,Ua.u_projection_tile_mercator_coords),u_projection_clipping_plane:new e.c1(Pa,Ua.u_projection_clipping_plane),u_projection_transition:new e.bp(Pa,Ua.u_projection_transition),u_projection_fallback_matrix:new e.c0(Pa,Ua.u_projection_fallback_matrix)}))(y,Ba),this.binderUniforms=ie?ie.getUniforms(y,Ba):[]}draw(y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt,Jt,it,Rt,qt,or,vr,Ar){var dr;let mr=y.gl;if(this.failedToCreate)return;if(y.program.set(this.program),y.setDepthMode(ie),y.setStencilMode(ce),y.setColorMode(_e),y.setCullFace(De),Ye){y.activeTexture.set(mr.TEXTURE2),mr.bindTexture(mr.TEXTURE_2D,Ye.depthTexture),y.activeTexture.set(mr.TEXTURE3),mr.bindTexture(mr.TEXTURE_2D,Ye.texture);for(let Lr in this.terrainUniforms)this.terrainUniforms[Lr].set(Ye[Lr])}if(lt)for(let Lr in lt)this.projectionUniforms[qu[Lr]].set(lt[Lr]);if(Ne)for(let Lr in this.fixedUniforms)this.fixedUniforms[Lr].set(Ne[Lr]);qt&&qt.setUniforms(y,this.binderUniforms,it,{zoom:Rt});let qr=0;switch(O){case mr.LINES:qr=2;break;case mr.TRIANGLES:qr=3;break;case mr.LINE_STRIP:qr=1}for(let Lr of Jt.get())Lr.vaos||(Lr.vaos={}),(dr=Lr.vaos)[ct]||(dr[ct]=new th),Lr.vaos[ct].bind(y,this,Ft,qt?qt.getPaintVertexBuffers():[],Gt,Lr.vertexOffset,or,vr,Ar),mr.drawElements(O,Lr.primitiveLength*qr,mr.UNSIGNED_SHORT,Lr.primitiveOffset*qr*2)}}function hc(de,y,O){let ie=1/e.aK(O,1,y.transform.tileZoom),ce=Math.pow(2,O.tileID.overscaledZ),_e=O.tileSize*Math.pow(2,y.transform.tileZoom)/ce,De=_e*(O.tileID.canonical.x+O.tileID.wrap*ce),Ne=_e*O.tileID.canonical.y;return{u_image:0,u_texsize:O.imageAtlasTexture.size,u_scale:[ie,de.fromScale,de.toScale],u_fade:de.t,u_pixel_coord_upper:[De>>16,Ne>>16],u_pixel_coord_lower:[65535&De,65535&Ne]}}let ac=(de,y,O,ie)=>{let ce=de.style.light,_e=ce.properties.get("position"),De=[_e.x,_e.y,_e.z],Ne=e.c4();ce.properties.get("anchor")==="viewport"&&e.c5(Ne,de.transform.bearingInRadians),e.c6(De,De,Ne);let Ye=de.transform.transformLightDirection(De),lt=ce.properties.get("color");return{u_lightpos:De,u_lightpos_globe:Ye,u_lightintensity:ce.properties.get("intensity"),u_lightcolor:[lt.r,lt.g,lt.b],u_vertical_gradient:+y,u_opacity:O,u_fill_translate:ie}},hf=(de,y,O,ie,ce,_e,De)=>e.e(ac(de,y,O,ie),hc(_e,de,De),{u_height_factor:-Math.pow(2,ce.overscaledZ)/De.tileSize/8}),ku=(de,y,O,ie)=>e.e(hc(y,de,O),{u_fill_translate:ie}),dc=(de,y)=>({u_world:de,u_fill_translate:y}),Cu=(de,y,O,ie,ce)=>e.e(ku(de,y,O,ce),{u_world:ie}),Pc=(de,y,O,ie,ce)=>{let _e=de.transform,De,Ne,Ye=0;if(O.paint.get("circle-pitch-alignment")==="map"){let lt=e.aK(y,1,_e.zoom);De=!0,Ne=[lt,lt],Ye=lt/(e.a6*Math.pow(2,y.tileID.overscaledZ))*2*Math.PI*ce}else De=!1,Ne=_e.pixelsToGLUnits;return{u_camera_to_center_distance:_e.cameraToCenterDistance,u_scale_with_map:+(O.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+De,u_device_pixel_ratio:de.pixelRatio,u_extrude_scale:Ne,u_globe_extrude_scale:Ye,u_translate:ie}},$c=de=>({u_pixel_extrude_scale:[1/de.width,1/de.height]}),Zl=de=>({u_viewport_size:[de.width,de.height]}),df=(de,y=1)=>({u_color:de,u_overlay:0,u_overlay_scale:y}),Dc=(de,y,O,ie)=>{let ce=e.aK(de,1,y)/(e.a6*Math.pow(2,de.tileID.overscaledZ))*2*Math.PI*ie;return{u_extrude_scale:e.aK(de,1,y),u_intensity:O,u_globe_extrude_scale:ce}},Ic=(de,y,O,ie)=>{let ce=e.O();e.c7(ce,0,de.width,de.height,0,0,1);let _e=de.context.gl;return{u_matrix:ce,u_world:[_e.drawingBufferWidth,_e.drawingBufferHeight],u_image:O,u_color_ramp:ie,u_opacity:y.paint.get("heatmap-opacity")}},Vu=(de,y,O)=>{let ie=O.paint.get("hillshade-accent-color"),ce;switch(O.paint.get("hillshade-method")){case"basic":ce=4;break;case"combined":ce=1;break;case"igor":ce=2;break;case"multidirectional":ce=3;break;default:ce=0}let _e=O.getIlluminationProperties();for(let De=0;De<_e.directionRadians.length;De++)O.paint.get("hillshade-illumination-anchor")==="viewport"&&(_e.directionRadians[De]+=de.transform.bearingInRadians);return{u_image:0,u_latrange:Lu(0,y.tileID),u_exaggeration:O.paint.get("hillshade-exaggeration"),u_altitudes:_e.altitudeRadians,u_azimuths:_e.directionRadians,u_accent:ie,u_method:ce,u_highlights:_e.highlightColor,u_shadows:_e.shadowColor}},Rc=(de,y)=>{let O=y.stride,ie=e.O();return e.c7(ie,0,e.a6,-e.a6,0,0,1),e.Q(ie,ie,[0,-e.a6,0]),{u_matrix:ie,u_image:1,u_dimension:[O,O],u_zoom:de.overscaledZ,u_unpack:y.getUnpackVector()}};function Lu(de,y){let O=Math.pow(2,y.canonical.z),ie=y.canonical.y;return[new e.a7(0,ie/O).toLngLat().lat,new e.a7(0,(ie+1)/O).toLngLat().lat]}let vf=(de,y,O=0)=>({u_image:0,u_unpack:y.getUnpackVector(),u_dimension:[y.stride,y.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:O,u_opacity:de.paint.get("color-relief-opacity")}),sl=(de,y,O,ie)=>{let ce=de.transform;return{u_translation:uu(de,y,O),u_ratio:ie/e.aK(y,1,ce.zoom),u_device_pixel_ratio:de.pixelRatio,u_units_to_pixels:[1/ce.pixelsToGLUnits[0],1/ce.pixelsToGLUnits[1]]}},Fc=(de,y,O,ie,ce)=>e.e(sl(de,y,O,ie),{u_image:0,u_image_height:ce}),Pu=(de,y,O,ie,ce)=>{let _e=de.transform,De=Hu(y,_e);return{u_translation:uu(de,y,O),u_texsize:y.imageAtlasTexture.size,u_ratio:ie/e.aK(y,1,_e.zoom),u_device_pixel_ratio:de.pixelRatio,u_image:0,u_scale:[De,ce.fromScale,ce.toScale],u_fade:ce.t,u_units_to_pixels:[1/_e.pixelsToGLUnits[0],1/_e.pixelsToGLUnits[1]]}},vc=(de,y,O,ie,ce)=>{let _e=Hu(y,de.transform);return e.e(sl(de,y,O,ie),{u_tileratio:_e,u_crossfade_from:ce.fromScale,u_crossfade_to:ce.toScale,u_image:0,u_mix:ce.t,u_lineatlas_width:de.lineAtlas.width,u_lineatlas_height:de.lineAtlas.height})},zc=(de,y,O,ie,ce,_e)=>{let De=Hu(y,de.transform);return e.e(sl(de,y,O,ie),{u_image:0,u_image_height:_e,u_tileratio:De,u_crossfade_from:ce.fromScale,u_crossfade_to:ce.toScale,u_image_dash:1,u_mix:ce.t,u_lineatlas_width:de.lineAtlas.width,u_lineatlas_height:de.lineAtlas.height})};function Hu(de,y){return 1/e.aK(de,1,y.tileZoom)}function uu(de,y,O){return e.aL(de.transform,y,O.paint.get("line-translate"),O.paint.get("line-translate-anchor"))}let Gu=(de,y,O,ie,ce)=>{return{u_tl_parent:de,u_scale_parent:y,u_buffer_scale:1,u_fade_t:O.mix,u_opacity:O.opacity*ie.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ie.paint.get("raster-brightness-min"),u_brightness_high:ie.paint.get("raster-brightness-max"),u_saturation_factor:(De=ie.paint.get("raster-saturation"),De>0?1-1/(1.001-De):-De),u_contrast_factor:(_e=ie.paint.get("raster-contrast"),_e>0?1/(1-_e):1+_e),u_spin_weights:Zc(ie.paint.get("raster-hue-rotate")),u_coords_top:[ce[0].x,ce[0].y,ce[1].x,ce[1].y],u_coords_bottom:[ce[3].x,ce[3].y,ce[2].x,ce[2].y]};var _e,De};function Zc(de){de*=Math.PI/180;let y=Math.sin(de),O=Math.cos(de);return[(2*O+1)/3,(-Math.sqrt(3)*y-O+1)/3,(Math.sqrt(3)*y-O+1)/3]}let gu=(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt)=>{let Jt=De.transform;return{u_is_size_zoom_constant:+(de==="constant"||de==="source"),u_is_size_feature_constant:+(de==="constant"||de==="camera"),u_size_t:y?y.uSizeT:0,u_size:y?y.uSize:0,u_camera_to_center_distance:Jt.cameraToCenterDistance,u_pitch:Jt.pitch/360*2*Math.PI,u_rotate_symbol:+O,u_aspect_ratio:Jt.width/Jt.height,u_fade_change:De.options.fadeDuration?De.symbolFadeChange:1,u_label_plane_matrix:Ne,u_coord_matrix:Ye,u_is_text:+ct,u_pitch_with_map:+ie,u_is_along_line:ce,u_is_variable_anchor:_e,u_texsize:Ft,u_texture:0,u_translation:lt,u_pitched_scale:Gt}},Pf=(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt,Jt)=>{let it=De.transform;return e.e(gu(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Jt),{u_gamma_scale:ie?Math.cos(it.pitch*Math.PI/180)*it.cameraToCenterDistance:1,u_device_pixel_ratio:De.pixelRatio,u_is_halo:Gt?1:0,u_is_plain:1})},bl=(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt)=>e.e(Pf(de,y,O,ie,ce,_e,De,Ne,Ye,lt,!0,ct,!0,Gt),{u_texsize_icon:Ft,u_texture_icon:1}),xl=(de,y)=>({u_opacity:de,u_color:y}),Wu=(de,y,O,ie,ce)=>e.e(function(_e,De,Ne,Ye){let lt=Ne.imageManager.getPattern(_e.from.toString()),ct=Ne.imageManager.getPattern(_e.to.toString()),{width:Ft,height:Gt}=Ne.imageManager.getPixelSize(),Jt=Math.pow(2,Ye.tileID.overscaledZ),it=Ye.tileSize*Math.pow(2,Ne.transform.tileZoom)/Jt,Rt=it*(Ye.tileID.canonical.x+Ye.tileID.wrap*Jt),qt=it*Ye.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:lt.tl,u_pattern_br_a:lt.br,u_pattern_tl_b:ct.tl,u_pattern_br_b:ct.br,u_texsize:[Ft,Gt],u_mix:De.t,u_pattern_size_a:lt.displaySize,u_pattern_size_b:ct.displaySize,u_scale_a:De.fromScale,u_scale_b:De.toScale,u_tile_units_to_pixels:1/e.aK(Ye,1,Ne.transform.tileZoom),u_pixel_coord_upper:[Rt>>16,qt>>16],u_pixel_coord_lower:[65535&Rt,65535&qt]}}(O,ce,y,ie),{u_opacity:de}),wl=(de,y)=>{},pf={fillExtrusion:(de,y)=>({u_lightpos:new e.c2(de,y.u_lightpos),u_lightpos_globe:new e.c2(de,y.u_lightpos_globe),u_lightintensity:new e.bp(de,y.u_lightintensity),u_lightcolor:new e.c2(de,y.u_lightcolor),u_vertical_gradient:new e.bp(de,y.u_vertical_gradient),u_opacity:new e.bp(de,y.u_opacity),u_fill_translate:new e.c3(de,y.u_fill_translate)}),fillExtrusionPattern:(de,y)=>({u_lightpos:new e.c2(de,y.u_lightpos),u_lightpos_globe:new e.c2(de,y.u_lightpos_globe),u_lightintensity:new e.bp(de,y.u_lightintensity),u_lightcolor:new e.c2(de,y.u_lightcolor),u_vertical_gradient:new e.bp(de,y.u_vertical_gradient),u_height_factor:new e.bp(de,y.u_height_factor),u_opacity:new e.bp(de,y.u_opacity),u_fill_translate:new e.c3(de,y.u_fill_translate),u_image:new e.b_(de,y.u_image),u_texsize:new e.c3(de,y.u_texsize),u_pixel_coord_upper:new e.c3(de,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(de,y.u_pixel_coord_lower),u_scale:new e.c2(de,y.u_scale),u_fade:new e.bp(de,y.u_fade)}),fill:(de,y)=>({u_fill_translate:new e.c3(de,y.u_fill_translate)}),fillPattern:(de,y)=>({u_image:new e.b_(de,y.u_image),u_texsize:new e.c3(de,y.u_texsize),u_pixel_coord_upper:new e.c3(de,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(de,y.u_pixel_coord_lower),u_scale:new e.c2(de,y.u_scale),u_fade:new e.bp(de,y.u_fade),u_fill_translate:new e.c3(de,y.u_fill_translate)}),fillOutline:(de,y)=>({u_world:new e.c3(de,y.u_world),u_fill_translate:new e.c3(de,y.u_fill_translate)}),fillOutlinePattern:(de,y)=>({u_world:new e.c3(de,y.u_world),u_image:new e.b_(de,y.u_image),u_texsize:new e.c3(de,y.u_texsize),u_pixel_coord_upper:new e.c3(de,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(de,y.u_pixel_coord_lower),u_scale:new e.c2(de,y.u_scale),u_fade:new e.bp(de,y.u_fade),u_fill_translate:new e.c3(de,y.u_fill_translate)}),circle:(de,y)=>({u_camera_to_center_distance:new e.bp(de,y.u_camera_to_center_distance),u_scale_with_map:new e.b_(de,y.u_scale_with_map),u_pitch_with_map:new e.b_(de,y.u_pitch_with_map),u_extrude_scale:new e.c3(de,y.u_extrude_scale),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_globe_extrude_scale:new e.bp(de,y.u_globe_extrude_scale),u_translate:new e.c3(de,y.u_translate)}),collisionBox:(de,y)=>({u_pixel_extrude_scale:new e.c3(de,y.u_pixel_extrude_scale)}),collisionCircle:(de,y)=>({u_viewport_size:new e.c3(de,y.u_viewport_size)}),debug:(de,y)=>({u_color:new e.b$(de,y.u_color),u_overlay:new e.b_(de,y.u_overlay),u_overlay_scale:new e.bp(de,y.u_overlay_scale)}),depth:wl,clippingMask:wl,heatmap:(de,y)=>({u_extrude_scale:new e.bp(de,y.u_extrude_scale),u_intensity:new e.bp(de,y.u_intensity),u_globe_extrude_scale:new e.bp(de,y.u_globe_extrude_scale)}),heatmapTexture:(de,y)=>({u_matrix:new e.c0(de,y.u_matrix),u_world:new e.c3(de,y.u_world),u_image:new e.b_(de,y.u_image),u_color_ramp:new e.b_(de,y.u_color_ramp),u_opacity:new e.bp(de,y.u_opacity)}),hillshade:(de,y)=>({u_image:new e.b_(de,y.u_image),u_latrange:new e.c3(de,y.u_latrange),u_exaggeration:new e.bp(de,y.u_exaggeration),u_altitudes:new e.c9(de,y.u_altitudes),u_azimuths:new e.c9(de,y.u_azimuths),u_accent:new e.b$(de,y.u_accent),u_method:new e.b_(de,y.u_method),u_shadows:new e.c8(de,y.u_shadows),u_highlights:new e.c8(de,y.u_highlights)}),hillshadePrepare:(de,y)=>({u_matrix:new e.c0(de,y.u_matrix),u_image:new e.b_(de,y.u_image),u_dimension:new e.c3(de,y.u_dimension),u_zoom:new e.bp(de,y.u_zoom),u_unpack:new e.c1(de,y.u_unpack)}),colorRelief:(de,y)=>({u_image:new e.b_(de,y.u_image),u_unpack:new e.c1(de,y.u_unpack),u_dimension:new e.c3(de,y.u_dimension),u_elevation_stops:new e.b_(de,y.u_elevation_stops),u_color_stops:new e.b_(de,y.u_color_stops),u_color_ramp_size:new e.b_(de,y.u_color_ramp_size),u_opacity:new e.bp(de,y.u_opacity)}),line:(de,y)=>({u_translation:new e.c3(de,y.u_translation),u_ratio:new e.bp(de,y.u_ratio),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(de,y.u_units_to_pixels)}),lineGradient:(de,y)=>({u_translation:new e.c3(de,y.u_translation),u_ratio:new e.bp(de,y.u_ratio),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(de,y.u_units_to_pixels),u_image:new e.b_(de,y.u_image),u_image_height:new e.bp(de,y.u_image_height)}),linePattern:(de,y)=>({u_translation:new e.c3(de,y.u_translation),u_texsize:new e.c3(de,y.u_texsize),u_ratio:new e.bp(de,y.u_ratio),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_image:new e.b_(de,y.u_image),u_units_to_pixels:new e.c3(de,y.u_units_to_pixels),u_scale:new e.c2(de,y.u_scale),u_fade:new e.bp(de,y.u_fade)}),lineSDF:(de,y)=>({u_translation:new e.c3(de,y.u_translation),u_ratio:new e.bp(de,y.u_ratio),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(de,y.u_units_to_pixels),u_image:new e.b_(de,y.u_image),u_mix:new e.bp(de,y.u_mix),u_tileratio:new e.bp(de,y.u_tileratio),u_crossfade_from:new e.bp(de,y.u_crossfade_from),u_crossfade_to:new e.bp(de,y.u_crossfade_to),u_lineatlas_width:new e.bp(de,y.u_lineatlas_width),u_lineatlas_height:new e.bp(de,y.u_lineatlas_height)}),lineGradientSDF:(de,y)=>({u_translation:new e.c3(de,y.u_translation),u_ratio:new e.bp(de,y.u_ratio),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(de,y.u_units_to_pixels),u_image:new e.b_(de,y.u_image),u_image_height:new e.bp(de,y.u_image_height),u_tileratio:new e.bp(de,y.u_tileratio),u_crossfade_from:new e.bp(de,y.u_crossfade_from),u_crossfade_to:new e.bp(de,y.u_crossfade_to),u_image_dash:new e.b_(de,y.u_image_dash),u_mix:new e.bp(de,y.u_mix),u_lineatlas_width:new e.bp(de,y.u_lineatlas_width),u_lineatlas_height:new e.bp(de,y.u_lineatlas_height)}),raster:(de,y)=>({u_tl_parent:new e.c3(de,y.u_tl_parent),u_scale_parent:new e.bp(de,y.u_scale_parent),u_buffer_scale:new e.bp(de,y.u_buffer_scale),u_fade_t:new e.bp(de,y.u_fade_t),u_opacity:new e.bp(de,y.u_opacity),u_image0:new e.b_(de,y.u_image0),u_image1:new e.b_(de,y.u_image1),u_brightness_low:new e.bp(de,y.u_brightness_low),u_brightness_high:new e.bp(de,y.u_brightness_high),u_saturation_factor:new e.bp(de,y.u_saturation_factor),u_contrast_factor:new e.bp(de,y.u_contrast_factor),u_spin_weights:new e.c2(de,y.u_spin_weights),u_coords_top:new e.c1(de,y.u_coords_top),u_coords_bottom:new e.c1(de,y.u_coords_bottom)}),symbolIcon:(de,y)=>({u_is_size_zoom_constant:new e.b_(de,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(de,y.u_is_size_feature_constant),u_size_t:new e.bp(de,y.u_size_t),u_size:new e.bp(de,y.u_size),u_camera_to_center_distance:new e.bp(de,y.u_camera_to_center_distance),u_pitch:new e.bp(de,y.u_pitch),u_rotate_symbol:new e.b_(de,y.u_rotate_symbol),u_aspect_ratio:new e.bp(de,y.u_aspect_ratio),u_fade_change:new e.bp(de,y.u_fade_change),u_label_plane_matrix:new e.c0(de,y.u_label_plane_matrix),u_coord_matrix:new e.c0(de,y.u_coord_matrix),u_is_text:new e.b_(de,y.u_is_text),u_pitch_with_map:new e.b_(de,y.u_pitch_with_map),u_is_along_line:new e.b_(de,y.u_is_along_line),u_is_variable_anchor:new e.b_(de,y.u_is_variable_anchor),u_texsize:new e.c3(de,y.u_texsize),u_texture:new e.b_(de,y.u_texture),u_translation:new e.c3(de,y.u_translation),u_pitched_scale:new e.bp(de,y.u_pitched_scale)}),symbolSDF:(de,y)=>({u_is_size_zoom_constant:new e.b_(de,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(de,y.u_is_size_feature_constant),u_size_t:new e.bp(de,y.u_size_t),u_size:new e.bp(de,y.u_size),u_camera_to_center_distance:new e.bp(de,y.u_camera_to_center_distance),u_pitch:new e.bp(de,y.u_pitch),u_rotate_symbol:new e.b_(de,y.u_rotate_symbol),u_aspect_ratio:new e.bp(de,y.u_aspect_ratio),u_fade_change:new e.bp(de,y.u_fade_change),u_label_plane_matrix:new e.c0(de,y.u_label_plane_matrix),u_coord_matrix:new e.c0(de,y.u_coord_matrix),u_is_text:new e.b_(de,y.u_is_text),u_pitch_with_map:new e.b_(de,y.u_pitch_with_map),u_is_along_line:new e.b_(de,y.u_is_along_line),u_is_variable_anchor:new e.b_(de,y.u_is_variable_anchor),u_texsize:new e.c3(de,y.u_texsize),u_texture:new e.b_(de,y.u_texture),u_gamma_scale:new e.bp(de,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_is_halo:new e.b_(de,y.u_is_halo),u_is_plain:new e.b_(de,y.u_is_plain),u_translation:new e.c3(de,y.u_translation),u_pitched_scale:new e.bp(de,y.u_pitched_scale)}),symbolTextAndIcon:(de,y)=>({u_is_size_zoom_constant:new e.b_(de,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(de,y.u_is_size_feature_constant),u_size_t:new e.bp(de,y.u_size_t),u_size:new e.bp(de,y.u_size),u_camera_to_center_distance:new e.bp(de,y.u_camera_to_center_distance),u_pitch:new e.bp(de,y.u_pitch),u_rotate_symbol:new e.b_(de,y.u_rotate_symbol),u_aspect_ratio:new e.bp(de,y.u_aspect_ratio),u_fade_change:new e.bp(de,y.u_fade_change),u_label_plane_matrix:new e.c0(de,y.u_label_plane_matrix),u_coord_matrix:new e.c0(de,y.u_coord_matrix),u_is_text:new e.b_(de,y.u_is_text),u_pitch_with_map:new e.b_(de,y.u_pitch_with_map),u_is_along_line:new e.b_(de,y.u_is_along_line),u_is_variable_anchor:new e.b_(de,y.u_is_variable_anchor),u_texsize:new e.c3(de,y.u_texsize),u_texsize_icon:new e.c3(de,y.u_texsize_icon),u_texture:new e.b_(de,y.u_texture),u_texture_icon:new e.b_(de,y.u_texture_icon),u_gamma_scale:new e.bp(de,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_is_halo:new e.b_(de,y.u_is_halo),u_translation:new e.c3(de,y.u_translation),u_pitched_scale:new e.bp(de,y.u_pitched_scale)}),background:(de,y)=>({u_opacity:new e.bp(de,y.u_opacity),u_color:new e.b$(de,y.u_color)}),backgroundPattern:(de,y)=>({u_opacity:new e.bp(de,y.u_opacity),u_image:new e.b_(de,y.u_image),u_pattern_tl_a:new e.c3(de,y.u_pattern_tl_a),u_pattern_br_a:new e.c3(de,y.u_pattern_br_a),u_pattern_tl_b:new e.c3(de,y.u_pattern_tl_b),u_pattern_br_b:new e.c3(de,y.u_pattern_br_b),u_texsize:new e.c3(de,y.u_texsize),u_mix:new e.bp(de,y.u_mix),u_pattern_size_a:new e.c3(de,y.u_pattern_size_a),u_pattern_size_b:new e.c3(de,y.u_pattern_size_b),u_scale_a:new e.bp(de,y.u_scale_a),u_scale_b:new e.bp(de,y.u_scale_b),u_pixel_coord_upper:new e.c3(de,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(de,y.u_pixel_coord_lower),u_tile_units_to_pixels:new e.bp(de,y.u_tile_units_to_pixels)}),terrain:(de,y)=>({u_texture:new e.b_(de,y.u_texture),u_ele_delta:new e.bp(de,y.u_ele_delta),u_fog_matrix:new e.c0(de,y.u_fog_matrix),u_fog_color:new e.b$(de,y.u_fog_color),u_fog_ground_blend:new e.bp(de,y.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.bp(de,y.u_fog_ground_blend_opacity),u_horizon_color:new e.b$(de,y.u_horizon_color),u_horizon_fog_blend:new e.bp(de,y.u_horizon_fog_blend),u_is_globe_mode:new e.bp(de,y.u_is_globe_mode)}),terrainDepth:(de,y)=>({u_ele_delta:new e.bp(de,y.u_ele_delta)}),terrainCoords:(de,y)=>({u_texture:new e.b_(de,y.u_texture),u_terrain_coords_id:new e.bp(de,y.u_terrain_coords_id),u_ele_delta:new e.bp(de,y.u_ele_delta)}),projectionErrorMeasurement:(de,y)=>({u_input:new e.bp(de,y.u_input),u_output_expected:new e.bp(de,y.u_output_expected)}),atmosphere:(de,y)=>({u_sun_pos:new e.c2(de,y.u_sun_pos),u_atmosphere_blend:new e.bp(de,y.u_atmosphere_blend),u_globe_position:new e.c2(de,y.u_globe_position),u_globe_radius:new e.bp(de,y.u_globe_radius),u_inv_proj_matrix:new e.c0(de,y.u_inv_proj_matrix)}),sky:(de,y)=>({u_sky_color:new e.b$(de,y.u_sky_color),u_horizon_color:new e.b$(de,y.u_horizon_color),u_horizon:new e.c3(de,y.u_horizon),u_horizon_normal:new e.c3(de,y.u_horizon_normal),u_sky_horizon_blend:new e.bp(de,y.u_sky_horizon_blend),u_sky_blend:new e.bp(de,y.u_sky_blend)})};class Yu{constructor(y,O,ie){this.context=y;let ce=y.gl;this.buffer=ce.createBuffer(),this.dynamicDraw=!!ie,this.context.unbindVAO(),y.bindElementBuffer.set(this.buffer),ce.bufferData(ce.ELEMENT_ARRAY_BUFFER,O.arrayBuffer,this.dynamicDraw?ce.DYNAMIC_DRAW:ce.STATIC_DRAW),this.dynamicDraw||O.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(y){let O=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),O.bufferSubData(O.ELEMENT_ARRAY_BUFFER,0,y.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let pc={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Kc{constructor(y,O,ie,ce){this.length=O.length,this.attributes=ie,this.itemSize=O.bytesPerElement,this.dynamicDraw=ce,this.context=y;let _e=y.gl;this.buffer=_e.createBuffer(),y.bindVertexBuffer.set(this.buffer),_e.bufferData(_e.ARRAY_BUFFER,O.arrayBuffer,this.dynamicDraw?_e.DYNAMIC_DRAW:_e.STATIC_DRAW),this.dynamicDraw||O.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(y){if(y.length!==this.length)throw new Error(`Length of new data is ${y.length}, which doesn't match current length of ${this.length}`);let O=this.context.gl;this.bind(),O.bufferSubData(O.ARRAY_BUFFER,0,y.arrayBuffer)}enableAttributes(y,O){for(let ie of this.attributes){let ce=O.attributes[ie.name];ce!==void 0&&y.enableVertexAttribArray(ce)}}setVertexAttribPointers(y,O,ie){for(let ce of this.attributes){let _e=O.attributes[ce.name];_e!==void 0&&y.vertexAttribPointer(_e,ce.components,y[pc[ce.type]],!1,this.itemSize,ce.offset+this.itemSize*(ie||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class cs{constructor(y){this.gl=y.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(y){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Df extends cs{getDefault(){return e.bo.transparent}set(y){let O=this.current;(y.r!==O.r||y.g!==O.g||y.b!==O.b||y.a!==O.a||this.dirty)&&(this.gl.clearColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class cu extends cs{getDefault(){return 1}set(y){(y!==this.current||this.dirty)&&(this.gl.clearDepth(y),this.current=y,this.dirty=!1)}}class Cl extends cs{getDefault(){return 0}set(y){(y!==this.current||this.dirty)&&(this.gl.clearStencil(y),this.current=y,this.dirty=!1)}}class Ll extends cs{getDefault(){return[!0,!0,!0,!0]}set(y){let O=this.current;(y[0]!==O[0]||y[1]!==O[1]||y[2]!==O[2]||y[3]!==O[3]||this.dirty)&&(this.gl.colorMask(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class If extends cs{getDefault(){return!0}set(y){(y!==this.current||this.dirty)&&(this.gl.depthMask(y),this.current=y,this.dirty=!1)}}class yu extends cs{getDefault(){return 255}set(y){(y!==this.current||this.dirty)&&(this.gl.stencilMask(y),this.current=y,this.dirty=!1)}}class Bc extends cs{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(y){let O=this.current;(y.func!==O.func||y.ref!==O.ref||y.mask!==O.mask||this.dirty)&&(this.gl.stencilFunc(y.func,y.ref,y.mask),this.current=y,this.dirty=!1)}}class Tl extends cs{getDefault(){let y=this.gl;return[y.KEEP,y.KEEP,y.KEEP]}set(y){let O=this.current;(y[0]!==O[0]||y[1]!==O[1]||y[2]!==O[2]||this.dirty)&&(this.gl.stencilOp(y[0],y[1],y[2]),this.current=y,this.dirty=!1)}}class ll extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;y?O.enable(O.STENCIL_TEST):O.disable(O.STENCIL_TEST),this.current=y,this.dirty=!1}}class Jc extends cs{getDefault(){return[0,1]}set(y){let O=this.current;(y[0]!==O[0]||y[1]!==O[1]||this.dirty)&&(this.gl.depthRange(y[0],y[1]),this.current=y,this.dirty=!1)}}class Nc extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;y?O.enable(O.DEPTH_TEST):O.disable(O.DEPTH_TEST),this.current=y,this.dirty=!1}}class Rf extends cs{getDefault(){return this.gl.LESS}set(y){(y!==this.current||this.dirty)&&(this.gl.depthFunc(y),this.current=y,this.dirty=!1)}}class fu extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;y?O.enable(O.BLEND):O.disable(O.BLEND),this.current=y,this.dirty=!1}}class Du extends cs{getDefault(){let y=this.gl;return[y.ONE,y.ZERO]}set(y){let O=this.current;(y[0]!==O[0]||y[1]!==O[1]||this.dirty)&&(this.gl.blendFunc(y[0],y[1]),this.current=y,this.dirty=!1)}}class Iu extends cs{getDefault(){return e.bo.transparent}set(y){let O=this.current;(y.r!==O.r||y.g!==O.g||y.b!==O.b||y.a!==O.a||this.dirty)&&(this.gl.blendColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class Xu extends cs{getDefault(){return this.gl.FUNC_ADD}set(y){(y!==this.current||this.dirty)&&(this.gl.blendEquation(y),this.current=y,this.dirty=!1)}}class Qc extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;y?O.enable(O.CULL_FACE):O.disable(O.CULL_FACE),this.current=y,this.dirty=!1}}class ef extends cs{getDefault(){return this.gl.BACK}set(y){(y!==this.current||this.dirty)&&(this.gl.cullFace(y),this.current=y,this.dirty=!1)}}class _u extends cs{getDefault(){return this.gl.CCW}set(y){(y!==this.current||this.dirty)&&(this.gl.frontFace(y),this.current=y,this.dirty=!1)}}class $u extends cs{getDefault(){return null}set(y){(y!==this.current||this.dirty)&&(this.gl.useProgram(y),this.current=y,this.dirty=!1)}}class mc extends cs{getDefault(){return this.gl.TEXTURE0}set(y){(y!==this.current||this.dirty)&&(this.gl.activeTexture(y),this.current=y,this.dirty=!1)}}class Ru extends cs{getDefault(){let y=this.gl;return[0,0,y.drawingBufferWidth,y.drawingBufferHeight]}set(y){let O=this.current;(y[0]!==O[0]||y[1]!==O[1]||y[2]!==O[2]||y[3]!==O[3]||this.dirty)&&(this.gl.viewport(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class zo extends cs{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.bindFramebuffer(O.FRAMEBUFFER,y),this.current=y,this.dirty=!1}}class gc extends cs{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.bindRenderbuffer(O.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class Vf extends cs{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.bindTexture(O.TEXTURE_2D,y),this.current=y,this.dirty=!1}}class mf extends cs{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.bindBuffer(O.ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class tf extends cs{getDefault(){return null}set(y){let O=this.gl;O.bindBuffer(O.ELEMENT_ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class gf extends cs{getDefault(){return null}set(y){var O;if(y===this.current&&!this.dirty)return;let ie=this.gl;us(ie)?ie.bindVertexArray(y):(O=ie.getExtension("OES_vertex_array_object"))===null||O===void 0||O.bindVertexArrayOES(y),this.current=y,this.dirty=!1}}class Hf extends cs{getDefault(){return 4}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.pixelStorei(O.UNPACK_ALIGNMENT,y),this.current=y,this.dirty=!1}}class yf extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.pixelStorei(O.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),this.current=y,this.dirty=!1}}class ul extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.pixelStorei(O.UNPACK_FLIP_Y_WEBGL,y),this.current=y,this.dirty=!1}}class Pl extends cs{constructor(y,O){super(y),this.context=y,this.parent=O}getDefault(){return null}}class yc extends Pl{setDirty(){this.dirty=!0}set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let O=this.gl;O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,y,0),this.current=y,this.dirty=!1}}class _c extends Pl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let O=this.gl;O.framebufferRenderbuffer(O.FRAMEBUFFER,O.DEPTH_ATTACHMENT,O.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class bc extends Pl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let O=this.gl;O.framebufferRenderbuffer(O.FRAMEBUFFER,O.DEPTH_STENCIL_ATTACHMENT,O.RENDERBUFFER,y),this.current=y,this.dirty=!1}}let nc="Framebuffer is not complete";class zt{constructor(y,O,ie,ce,_e){this.context=y,this.width=O,this.height=ie;let De=y.gl,Ne=this.framebuffer=De.createFramebuffer();if(this.colorAttachment=new yc(y,Ne),ce)this.depthAttachment=_e?new bc(y,Ne):new _c(y,Ne);else if(_e)throw new Error("Stencil cannot be set without depth");if(De.checkFramebufferStatus(De.FRAMEBUFFER)!==De.FRAMEBUFFER_COMPLETE)throw new Error(nc)}destroy(){let y=this.context.gl,O=this.colorAttachment.get();if(O&&y.deleteTexture(O),this.depthAttachment){let ie=this.depthAttachment.get();ie&&y.deleteRenderbuffer(ie)}y.deleteFramebuffer(this.framebuffer)}}class rr{constructor(y){var O,ie;if(this.gl=y,this.clearColor=new Df(this),this.clearDepth=new cu(this),this.clearStencil=new Cl(this),this.colorMask=new Ll(this),this.depthMask=new If(this),this.stencilMask=new yu(this),this.stencilFunc=new Bc(this),this.stencilOp=new Tl(this),this.stencilTest=new ll(this),this.depthRange=new Jc(this),this.depthTest=new Nc(this),this.depthFunc=new Rf(this),this.blend=new fu(this),this.blendFunc=new Du(this),this.blendColor=new Iu(this),this.blendEquation=new Xu(this),this.cullFace=new Qc(this),this.cullFaceSide=new ef(this),this.frontFace=new _u(this),this.program=new $u(this),this.activeTexture=new mc(this),this.viewport=new Ru(this),this.bindFramebuffer=new zo(this),this.bindRenderbuffer=new gc(this),this.bindTexture=new Vf(this),this.bindVertexBuffer=new mf(this),this.bindElementBuffer=new tf(this),this.bindVertexArray=new gf(this),this.pixelStoreUnpack=new Hf(this),this.pixelStoreUnpackPremultiplyAlpha=new yf(this),this.pixelStoreUnpackFlipY=new ul(this),this.extTextureFilterAnisotropic=y.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=y.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=y.getParameter(y.MAX_TEXTURE_SIZE),us(y)){this.HALF_FLOAT=y.HALF_FLOAT;let ce=y.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(O=y.RGBA16F)!==null&&O!==void 0?O:ce?.RGBA16F_EXT,this.RGB16F=(ie=y.RGB16F)!==null&&ie!==void 0?ie:ce?.RGB16F_EXT,y.getExtension("EXT_color_buffer_float")}else{y.getExtension("EXT_color_buffer_half_float"),y.getExtension("OES_texture_half_float_linear");let ce=y.getExtension("OES_texture_half_float");this.HALF_FLOAT=ce?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(y,O){return new Yu(this,y,O)}createVertexBuffer(y,O,ie){return new Kc(this,y,O,ie)}createRenderbuffer(y,O,ie){let ce=this.gl,_e=ce.createRenderbuffer();return this.bindRenderbuffer.set(_e),ce.renderbufferStorage(ce.RENDERBUFFER,y,O,ie),this.bindRenderbuffer.set(null),_e}createFramebuffer(y,O,ie,ce){return new zt(this,y,O,ie,ce)}clear({color:y,depth:O,stencil:ie}){let ce=this.gl,_e=0;y&&(_e|=ce.COLOR_BUFFER_BIT,this.clearColor.set(y),this.colorMask.set([!0,!0,!0,!0])),O!==void 0&&(_e|=ce.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(O),this.depthMask.set(!0)),ie!==void 0&&(_e|=ce.STENCIL_BUFFER_BIT,this.clearStencil.set(ie),this.stencilMask.set(255)),ce.clear(_e)}setCullFace(y){y.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(y.mode),this.frontFace.set(y.frontFace))}setDepthMode(y){y.func!==this.gl.ALWAYS||y.mask?(this.depthTest.set(!0),this.depthFunc.set(y.func),this.depthMask.set(y.mask),this.depthRange.set(y.range)):this.depthTest.set(!1)}setStencilMode(y){y.test.func!==this.gl.ALWAYS||y.mask?(this.stencilTest.set(!0),this.stencilMask.set(y.mask),this.stencilOp.set([y.fail,y.depthFail,y.pass]),this.stencilFunc.set({func:y.test.func,ref:y.ref,mask:y.test.mask})):this.stencilTest.set(!1)}setColorMode(y){e.bQ(y.blendFunction,wo.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(y.blendFunction),this.blendColor.set(y.blendColor)),this.colorMask.set(y.mask)}createVertexArray(){var y;return us(this.gl)?this.gl.createVertexArray():(y=this.gl.getExtension("OES_vertex_array_object"))===null||y===void 0?void 0:y.createVertexArrayOES()}deleteVertexArray(y){var O;us(this.gl)?this.gl.deleteVertexArray(y):(O=this.gl.getExtension("OES_vertex_array_object"))===null||O===void 0||O.deleteVertexArrayOES(y)}unbindVAO(){this.bindVertexArray.set(null)}}let Br;function wr(de,y,O,ie,ce){var _e,De;let Ne=de.context,Ye=de.transform,lt=Ne.gl,ct=de.useProgram("collisionBox"),Ft=[],Gt=0,Jt=0;for(let Ar of ie){let dr=y.getTile(Ar).getBucket(O);if(!dr)continue;let mr=ce?dr.textCollisionBox:dr.iconCollisionBox,qr=dr.collisionCircleArray;qr.length>0&&(Ft.push({circleArray:qr,circleOffset:Jt,coord:Ar}),Gt+=qr.length/4,Jt=Gt),mr&&ct.draw(Ne,lt.LINES,lo.disabled,go.disabled,de.colorModeForRenderPass(),Di.disabled,$c(de.transform),(_e=de.style.map.terrain)===null||_e===void 0?void 0:_e.getTerrainData(Ar),Ye.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),O.id,mr.layoutVertexBuffer,mr.indexBuffer,mr.segments,null,de.transform.zoom,null,null,mr.collisionVertexBuffer)}if(!ce||!Ft.length)return;let it=de.useProgram("collisionCircle"),Rt=new e.ca;Rt.resize(4*Gt),Rt._trim();let qt=0;for(let Ar of Ft)for(let dr=0;dr=0&&(Rt[or.associatedIconIndex]={shiftedAnchor:wa,angle:Ya})}else dn(or.numGlyphs,Jt)}if(Ye){it.clear();let qt=de.icon.placedSymbolArray;for(let or=0;orde.style.map.terrain.getElevation(Ma,Do,ru):null,Il=O.layout.get("text-rotation-alignment")==="map";Oa(Ya,de,ce,fo,ts,Ar,lt,Il,Ma.toUnwrapped(),or.width,or.height,jo,el)}let Qs=ce&&Ba||Uo,os=dr||Qs?la:Ar?fo:de.transform.clipSpaceToPixelsMatrix,hs=$n&&O.paint.get(ce?"text-halo-width":"icon-halo-width").constantOr(1)!==0,ss;ss=$n?Ya.iconsInText?bl(Si.kind,gi,mr,Ar,dr,Qs,de,os,To,jo,Yn,Eo,Ua):Pf(Si.kind,gi,mr,Ar,dr,Qs,de,os,To,jo,ce,Yn,hs,Ua):gu(Si.kind,gi,mr,Ar,dr,Qs,de,os,To,jo,ce,Yn,Ua);let ks={program:xn,buffers:Xa,uniformValues:ss,projectionData:qs,atlasTexture:Xn,atlasTextureIcon:yi,atlasInterpolation:pi,atlasInterpolationIcon:Xi,isSDF:$n,hasHalo:hs};if(qr&&Ya.canOverlap){Lr=!0;let ts=Xa.segments.get();for(let el of ts)Pa.push({segments:new e.aV([el]),sortKey:el.sortKey,state:ks,terrainData:Wn})}else Pa.push({segments:Xa.segments,sortKey:0,state:ks,terrainData:Wn})}Lr&&Pa.sort((Ma,wa)=>Ma.sortKey-wa.sortKey);let ya=(it=O.paint.get(ce?"text-halo-width":"icon-halo-width").constantOr(null))!==null&&it!==void 0?it:1/0,da=O.layout.get("text-letter-spacing").constantOr(0)*e.aJ<0||ya>1;for(let Ma of Pa){let wa=Ma.state;Rt.activeTexture.set(qt.TEXTURE0),wa.atlasTexture.bind(wa.atlasInterpolation,qt.CLAMP_TO_EDGE),wa.atlasTextureIcon&&(Rt.activeTexture.set(qt.TEXTURE1),wa.atlasTextureIcon&&wa.atlasTextureIcon.bind(wa.atlasInterpolationIcon,qt.CLAMP_TO_EDGE));let Ya=wa.isSDF&&wa.hasHalo;if(Ya){let Xa=wa.uniformValues;Xa.u_is_halo=1,da&&(Xa.u_is_plain=0,Ha(wa.buffers,Ma.segments,O,de,wa.program,ua,ct,Ft,Xa,wa.projectionData,Ma.terrainData),Xa.u_is_halo=0,Xa.u_is_plain=1)}Ha(wa.buffers,Ma.segments,O,de,wa.program,ua,ct,Ft,wa.uniformValues,wa.projectionData,Ma.terrainData),Ya&&!da&&(wa.uniformValues.u_is_halo=0)}}function Ha(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct){let Ft=ie.context;ce.draw(Ft,Ft.gl.TRIANGLES,_e,De,Ne,Di.backCCW,Ye,ct,lt,O.id,de.layoutVertexBuffer,de.indexBuffer,y,O.paint,ie.transform.zoom,de.programConfigurations.get(O.id),de.dynamicLayoutVertexBuffer,de.opacityVertexBuffer)}function on(de,y,O,ie,ce){let _e=de.context,De=_e.gl,Ne=go.disabled,Ye=new wo([De.ONE,De.ONE],e.bo.transparent,[!0,!0,!0,!0]),lt=y.getBucket(O);if(!lt)return;let ct=ie.key,Ft=O.heatmapFbos.get(ct);Ft||(Ft=Ln(_e,y.tileSize,y.tileSize),O.heatmapFbos.set(ct,Ft)),_e.bindFramebuffer.set(Ft.framebuffer),_e.viewport.set([0,0,y.tileSize,y.tileSize]),_e.clear({color:e.bo.transparent});let Gt=lt.programConfigurations.get(O.id),Jt=de.useProgram("heatmap",Gt,!ce),it=de.transform.getProjectionData({overscaledTileID:y.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Rt=de.style.map.terrain.getTerrainData(ie);Jt.draw(_e,De.TRIANGLES,lo.disabled,Ne,Ye,Di.disabled,Dc(y,de.transform.zoom,O.paint.get("heatmap-intensity"),1),Rt,it,O.id,lt.layoutVertexBuffer,lt.indexBuffer,lt.segments,O.paint,de.transform.zoom,Gt)}function fn(de,y,O,ie,ce){let _e=de.context,De=_e.gl,Ne=de.transform;_e.setColorMode(de.colorModeForRenderPass());let Ye=qn(_e,y),lt=O.key,ct=y.heatmapFbos.get(lt);if(!ct)return;_e.activeTexture.set(De.TEXTURE0),De.bindTexture(De.TEXTURE_2D,ct.colorAttachment.get()),_e.activeTexture.set(De.TEXTURE1),Ye.bind(De.LINEAR,De.CLAMP_TO_EDGE);let Ft=Ne.getProjectionData({overscaledTileID:O,applyTerrainMatrix:ce,applyGlobeMatrix:!ie});de.useProgram("heatmapTexture").draw(_e,De.TRIANGLES,lo.disabled,go.disabled,de.colorModeForRenderPass(),Di.disabled,Ic(de,y,0,1),null,Ft,y.id,de.rasterBoundsBuffer,de.quadTriangleIndexBuffer,de.rasterBoundsSegments,y.paint,Ne.zoom),ct.destroy(),y.heatmapFbos.delete(lt)}function Ln(de,y,O){var ie,ce;let _e=de.gl,De=_e.createTexture();_e.bindTexture(_e.TEXTURE_2D,De),_e.texParameteri(_e.TEXTURE_2D,_e.TEXTURE_WRAP_S,_e.CLAMP_TO_EDGE),_e.texParameteri(_e.TEXTURE_2D,_e.TEXTURE_WRAP_T,_e.CLAMP_TO_EDGE),_e.texParameteri(_e.TEXTURE_2D,_e.TEXTURE_MIN_FILTER,_e.LINEAR),_e.texParameteri(_e.TEXTURE_2D,_e.TEXTURE_MAG_FILTER,_e.LINEAR);let Ne=(ie=de.HALF_FLOAT)!==null&&ie!==void 0?ie:_e.UNSIGNED_BYTE,Ye=(ce=de.RGBA16F)!==null&&ce!==void 0?ce:_e.RGBA;_e.texImage2D(_e.TEXTURE_2D,0,Ye,y,O,0,_e.RGBA,Ne,null);let lt=de.createFramebuffer(y,O,!1,!1);return lt.colorAttachment.set(De),lt}function qn(de,y){return y.colorRampTexture||(y.colorRampTexture=new e.T(de,y.colorRamp,de.gl.RGBA)),y.colorRampTexture}function Bi(de,y,O,ie,ce,_e,De,Ne){let Ye=256;if(ce.stepInterpolant){let lt=y.getSource().maxzoom,ct=De.canonical.z===lt?Math.ceil(1<de.options.anisotropicFilterPitch&&Jt.texParameterf(Jt.TEXTURE_2D,Gt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Gt.extTextureFilterAnisotropicMax);let Ma=(ct=de.style.map.terrain)===null||ct===void 0?void 0:ct.getTerrainData(Lr),wa=Rt.getProjectionData({overscaledTileID:Lr,aligned:vr,applyGlobeMatrix:!lt,applyTerrainMatrix:!0}),Ya=Gu(ya,Ua,da.fadeMix,O,Ne),Xa=qt.getMeshFromTileID(Gt,Lr.canonical,_e,De,"raster");it.draw(Gt,Jt.TRIANGLES,ua,ce?ce[Lr.overscaledZ]:go.disabled,or,Ye?Di.frontCCW:Di.backCCW,Ya,Ma,wa,O.id,Xa.vertexBuffer,Xa.indexBuffer,Xa.segments)}}function Ks(de,y,O,ie){let ce={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(O===0||ie)return ce;if(de.fadingParentID){let _e=y.getLoadedTile(de.fadingParentID);if(!_e)return ce;let De=Math.pow(2,_e.tileID.overscaledZ-de.tileID.overscaledZ),Ne=[de.tileID.canonical.x*De%1,de.tileID.canonical.y*De%1],Ye=function(lt,ct,Ft){let Gt=g(),Jt=(Gt-ct.timeAdded)/Ft,it=lt.fadingDirection===mt.Incoming,Rt=e.al((Gt-lt.timeAdded)/Ft,0,1),qt=e.al(1-Jt,0,1),or=it?Rt:qt;return{tileOpacity:or,parentTileOpacity:it?qt:Rt,fadeMix:{opacity:1,mix:1-or}}}(de,_e,O);return{parentTile:_e,parentScaleBy:De,parentTopLeft:Ne,fadeValues:Ye}}if(de.selfFading){let _e=function(De,Ne){let Ye=(g()-De.timeAdded)/Ne,lt=e.al(Ye,0,1);return{tileOpacity:lt,fadeMix:{opacity:lt,mix:0}}}(de,O);return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:_e}}return ce}let Rs=new e.bo(1,0,0,1),ps=new e.bo(0,1,0,1),vi=new e.bo(0,0,1,1),Xo=new e.bo(1,0,1,1),Ss=new e.bo(0,1,1,1);function Ws(de,y,O,ie){Nl(de,0,y+O/2,de.transform.width,O,ie)}function Dl(de,y,O,ie){Nl(de,y-O/2,0,O,de.transform.height,ie)}function Nl(de,y,O,ie,ce,_e){let De=de.context,Ne=De.gl;Ne.enable(Ne.SCISSOR_TEST),Ne.scissor(y*de.pixelRatio,O*de.pixelRatio,ie*de.pixelRatio,ce*de.pixelRatio),De.clear({color:_e}),Ne.disable(Ne.SCISSOR_TEST)}function Kl(de,y,O){var ie;let ce=de.context,_e=ce.gl,De=de.useProgram("debug"),Ne=lo.disabled,Ye=go.disabled,lt=de.colorModeForRenderPass(),ct="$debug",Ft=(ie=de.style.map.terrain)===null||ie===void 0?void 0:ie.getTerrainData(O);ce.activeTexture.set(_e.TEXTURE0);let Gt=y.getTileByID(O.key).latestRawTileData,Jt=Math.floor((Gt?.byteLength||0)/1024),it=y.getTile(O).tileSize,Rt=512/Math.min(it,512)*(O.overscaledZ/de.transform.zoom)*.5,qt=O.canonical.toString();O.overscaledZ!==O.canonical.z&&(qt+=` => ${O.overscaledZ}`),function(vr,Ar){vr.initDebugOverlayCanvas();let dr=vr.debugOverlayCanvas,mr=vr.context.gl,qr=vr.debugOverlayCanvas.getContext("2d");qr.clearRect(0,0,dr.width,dr.height),qr.shadowColor="white",qr.shadowBlur=2,qr.lineWidth=1.5,qr.strokeStyle="white",qr.textBaseline="top",qr.font="bold 36px Open Sans, sans-serif",qr.fillText(Ar,5,5),qr.strokeText(Ar,5,5),vr.debugOverlayTexture.update(dr),vr.debugOverlayTexture.bind(mr.LINEAR,mr.CLAMP_TO_EDGE)}(de,`${qt} ${Jt}kB`);let or=de.transform.getProjectionData({overscaledTileID:O,applyGlobeMatrix:!0,applyTerrainMatrix:!0});De.draw(ce,_e.TRIANGLES,Ne,Ye,wo.alphaBlended,Di.disabled,df(e.bo.transparent,Rt),null,or,ct,de.debugBuffer,de.quadTriangleIndexBuffer,de.debugSegments),De.draw(ce,_e.LINE_STRIP,Ne,Ye,lt,Di.disabled,df(e.bo.red),Ft,or,ct,de.debugBuffer,de.tileBorderIndexBuffer,de.debugSegments)}function Fu(de,y,O,ie){let{isRenderingGlobe:ce}=ie,_e=de.context,De=_e.gl,Ne=de.transform,Ye=de.colorModeForRenderPass(),lt=de.getDepthModeFor3D(),ct=de.useProgram("terrain");_e.bindFramebuffer.set(null),_e.viewport.set([0,0,de.width,de.height]);for(let Ft of O){let Gt=y.getTerrainMesh(Ft.tileID),Jt=de.renderToTexture.getTexture(Ft),it=y.getTerrainData(Ft.tileID);_e.activeTexture.set(De.TEXTURE0),De.bindTexture(De.TEXTURE_2D,Jt.texture);let Rt=y.getMeshFrameDelta(Ne.zoom),qt=Ne.calculateFogMatrix(Ft.tileID.toUnwrapped()),or=Cf(Rt,qt,de.style.sky,Ne.pitch,ce),vr=Ne.getProjectionData({overscaledTileID:Ft.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ct.draw(_e,De.TRIANGLES,lt,go.disabled,Ye,Di.backCCW,or,it,vr,"terrain",Gt.vertexBuffer,Gt.indexBuffer,Gt.segments)}}function Al(de,y){if(!y.mesh){let O=new e.aU;O.emplaceBack(-1,-1),O.emplaceBack(1,-1),O.emplaceBack(1,1),O.emplaceBack(-1,1);let ie=new e.aW;ie.emplaceBack(0,1,2),ie.emplaceBack(0,2,3),y.mesh=new fi(de.createVertexBuffer(O,xo.members),de.createIndexBuffer(ie),e.aV.simpleSegment(0,0,O.length,ie.length))}return y.mesh}let zu={symbol:function(de,y,O,ie,ce,_e){if(de.renderPass!=="translucent")return;let{isRenderingToTexture:De}=_e,Ne=go.disabled,Ye=de.colorModeForRenderPass();(O._unevaluatedLayout.hasValue("text-variable-anchor")||O._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(lt,ct,Ft,Gt,Jt,it,Rt,qt,or){var vr;let Ar=ct.transform,dr=ct.style.map.terrain,mr=Jt==="map",qr=it==="map";for(let Lr of lt){let ua=Gt.getTile(Lr),Ba=ua.getBucket(Ft);if(!(!((vr=Ba?.text)===null||vr===void 0)&&vr.segments.get().length))continue;let Pa=e.aw(Ba.textSizeData,Ar.zoom),Ua=e.aK(ua,1,ct.transform.zoom),ya=fr(mr,ct.transform,Ua),da=Ft.layout.get("icon-text-fit")!=="none"&&Ba.hasIconData();if(Pa){let Ma=Math.pow(2,Ar.zoom-ua.tileID.overscaledZ),wa=dr?(Ya,Xa)=>dr.getElevation(Lr,Ya,Xa):null;Ka(Ba,mr,qr,or,Ar,ya,Ma,Pa,da,e.aL(Ar,ua,Rt,qt),Lr.toUnwrapped(),wa)}}}(ie,de,O,y,O.layout.get("text-rotation-alignment"),O.layout.get("text-pitch-alignment"),O.paint.get("text-translate"),O.paint.get("text-translate-anchor"),ce),O.paint.get("icon-opacity").constantOr(1)!==0&&Pn(de,y,O,ie,!1,O.paint.get("icon-translate"),O.paint.get("icon-translate-anchor"),O.layout.get("icon-rotation-alignment"),O.layout.get("icon-pitch-alignment"),O.layout.get("icon-keep-upright"),Ne,Ye,De),O.paint.get("text-opacity").constantOr(1)!==0&&Pn(de,y,O,ie,!0,O.paint.get("text-translate"),O.paint.get("text-translate-anchor"),O.layout.get("text-rotation-alignment"),O.layout.get("text-pitch-alignment"),O.layout.get("text-keep-upright"),Ne,Ye,De),y.map.showCollisionBoxes&&(wr(de,y,O,ie,!0),wr(de,y,O,ie,!1))},circle:function(de,y,O,ie,ce){var _e;if(de.renderPass!=="translucent")return;let{isRenderingToTexture:De}=ce,Ne=O.paint.get("circle-opacity"),Ye=O.paint.get("circle-stroke-width"),lt=O.paint.get("circle-stroke-opacity"),ct=!O.layout.get("circle-sort-key").isConstant();if(Ne.constantOr(1)===0&&(Ye.constantOr(1)===0||lt.constantOr(1)===0))return;let Ft=de.context,Gt=Ft.gl,Jt=de.transform,it=de.getDepthModeForSublayer(0,lo.ReadOnly),Rt=go.disabled,qt=de.colorModeForRenderPass(),or=[],vr=Jt.getCircleRadiusCorrection();for(let Ar of ie){let dr=y.getTile(Ar),mr=dr.getBucket(O);if(!mr)continue;let qr=O.paint.get("circle-translate"),Lr=O.paint.get("circle-translate-anchor"),ua=e.aL(Jt,dr,qr,Lr),Ba=mr.programConfigurations.get(O.id),Pa=de.useProgram("circle",Ba),Ua=mr.layoutVertexBuffer,ya=mr.indexBuffer,da=(_e=de.style.map.terrain)===null||_e===void 0?void 0:_e.getTerrainData(Ar),Ma={programConfiguration:Ba,program:Pa,layoutVertexBuffer:Ua,indexBuffer:ya,uniformValues:Pc(de,dr,O,ua,vr),terrainData:da,projectionData:Jt.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!De,applyTerrainMatrix:!0})};if(ct){let wa=mr.segments.get();for(let Ya of wa)or.push({segments:new e.aV([Ya]),sortKey:Ya.sortKey,state:Ma})}else or.push({segments:mr.segments,sortKey:0,state:Ma})}ct&&or.sort((Ar,dr)=>Ar.sortKey-dr.sortKey);for(let Ar of or){let{programConfiguration:dr,program:mr,layoutVertexBuffer:qr,indexBuffer:Lr,uniformValues:ua,terrainData:Ba,projectionData:Pa}=Ar.state;mr.draw(Ft,Gt.TRIANGLES,it,Rt,qt,Di.backCCW,ua,Ba,Pa,O.id,qr,Lr,Ar.segments,O.paint,de.transform.zoom,dr)}},heatmap:function(de,y,O,ie,ce){if(O.paint.get("heatmap-opacity")===0)return;let _e=de.context,{isRenderingToTexture:De,isRenderingGlobe:Ne}=ce;if(de.style.map.terrain){for(let Ye of ie){let lt=y.getTile(Ye);y.hasRenderableParent(Ye)||(de.renderPass==="offscreen"?on(de,lt,O,Ye,Ne):de.renderPass==="translucent"&&fn(de,O,Ye,De,Ne))}_e.viewport.set([0,0,de.width,de.height])}else de.renderPass==="offscreen"?function(Ye,lt,ct,Ft){let Gt=Ye.context,Jt=Gt.gl,it=Ye.transform,Rt=go.disabled,qt=new wo([Jt.ONE,Jt.ONE],e.bo.transparent,[!0,!0,!0,!0]);(function(or,vr,Ar){let dr=or.gl;or.activeTexture.set(dr.TEXTURE1),or.viewport.set([0,0,vr.width/4,vr.height/4]);let mr=Ar.heatmapFbos.get(e.cd);mr?(dr.bindTexture(dr.TEXTURE_2D,mr.colorAttachment.get()),or.bindFramebuffer.set(mr.framebuffer)):(mr=Ln(or,vr.width/4,vr.height/4),Ar.heatmapFbos.set(e.cd,mr))})(Gt,Ye,ct),Gt.clear({color:e.bo.transparent});for(let or of Ft){if(lt.hasRenderableParent(or))continue;let vr=lt.getTile(or),Ar=vr.getBucket(ct);if(!Ar)continue;let dr=Ar.programConfigurations.get(ct.id),mr=Ye.useProgram("heatmap",dr),qr=it.getProjectionData({overscaledTileID:or,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Lr=it.getCircleRadiusCorrection();mr.draw(Gt,Jt.TRIANGLES,lo.disabled,Rt,qt,Di.backCCW,Dc(vr,it.zoom,ct.paint.get("heatmap-intensity"),Lr),null,qr,ct.id,Ar.layoutVertexBuffer,Ar.indexBuffer,Ar.segments,ct.paint,it.zoom,dr)}Gt.viewport.set([0,0,Ye.width,Ye.height])}(de,y,O,ie):de.renderPass==="translucent"&&function(Ye,lt){let ct=Ye.context,Ft=ct.gl;ct.setColorMode(Ye.colorModeForRenderPass());let Gt=lt.heatmapFbos.get(e.cd);Gt&&(ct.activeTexture.set(Ft.TEXTURE0),Ft.bindTexture(Ft.TEXTURE_2D,Gt.colorAttachment.get()),ct.activeTexture.set(Ft.TEXTURE1),qn(ct,lt).bind(Ft.LINEAR,Ft.CLAMP_TO_EDGE),Ye.useProgram("heatmapTexture").draw(ct,Ft.TRIANGLES,lo.disabled,go.disabled,Ye.colorModeForRenderPass(),Di.disabled,Ic(Ye,lt,0,1),null,null,lt.id,Ye.viewportBuffer,Ye.quadTriangleIndexBuffer,Ye.viewportSegments,lt.paint,Ye.transform.zoom))}(de,O)},line:function(de,y,O,ie,ce){var _e;if(de.renderPass!=="translucent")return;let{isRenderingToTexture:De}=ce,Ne=O.paint.get("line-opacity"),Ye=O.paint.get("line-width");if(Ne.constantOr(1)===0||Ye.constantOr(1)===0)return;let lt=de.getDepthModeForSublayer(0,lo.ReadOnly),ct=de.colorModeForRenderPass(),Ft=O.paint.get("line-dasharray"),Gt=Ft.constantOr(1),Jt=O.paint.get("line-pattern"),it=Jt.constantOr(1),Rt=O.paint.get("line-gradient"),qt=O.getCrossfadeParameters(),or;or=it?"linePattern":Gt&&Rt?"lineGradientSDF":Gt?"lineSDF":Rt?"lineGradient":"line";let vr=de.context,Ar=vr.gl,dr=de.transform,mr=!0;for(let qr of ie){let Lr=y.getTile(qr);if(it&&!Lr.patternsLoaded())continue;let ua=Lr.getBucket(O);if(!ua)continue;let Ba=ua.programConfigurations.get(O.id),Pa=de.context.program.get(),Ua=de.useProgram(or,Ba),ya=mr||Ua.program!==Pa,da=(_e=de.style.map.terrain)===null||_e===void 0?void 0:_e.getTerrainData(qr),Ma=Jt.constantOr(null),wa=Ft?.constantOr(null);if(Ma&&Lr.imageAtlas){let Si=Lr.imageAtlas,Mn=Si.patternPositions[Ma.to.toString()],xn=Si.patternPositions[Ma.from.toString()];Mn&&xn&&Ba.setConstantPatternPositions(Mn,xn)}else if(wa){let Si=O.layout.get("line-cap").constantOr(null)==="round",Mn=de.lineAtlas.getDash(wa.to,Si),xn=de.lineAtlas.getDash(wa.from,Si);Ba.setConstantDashPositions(Mn,xn)}let Ya=dr.getProjectionData({overscaledTileID:qr,applyGlobeMatrix:!De,applyTerrainMatrix:!0}),Xa=dr.getPixelScale(),Hn;it?(Hn=Pu(de,Lr,O,Xa,qt),Ni(vr,Ar,Lr,Ba,qt)):Gt&&Rt?(Hn=zc(de,Lr,O,Xa,qt,ua.lineClipsArray.length),Vn(de,y,vr,Ar,O,ua,qr,Ba,qt)):Gt?(Hn=vc(de,Lr,O,Xa,qt),Zi(de,vr,Ar,Ba,ya,qt)):Rt?(Hn=Fc(de,Lr,O,Xa,ua.lineClipsArray.length),_i(de,y,vr,Ar,O,ua,qr)):Hn=sl(de,Lr,O,Xa);let $n=de.stencilModeForClipping(qr);Ua.draw(vr,Ar.TRIANGLES,lt,$n,ct,Di.disabled,Hn,da,Ya,O.id,ua.layoutVertexBuffer,ua.indexBuffer,ua.segments,O.paint,de.transform.zoom,Ba,ua.layoutVertexBuffer2),mr=!1}},fill:function(de,y,O,ie,ce){let _e=O.paint.get("fill-color"),De=O.paint.get("fill-opacity");if(De.constantOr(1)===0)return;let{isRenderingToTexture:Ne}=ce,Ye=de.colorModeForRenderPass(),lt=O.paint.get("fill-pattern"),ct=de.opaquePassEnabledForLayer()&&!lt.constantOr(1)&&_e.constantOr(e.bo.transparent).a===1&&De.constantOr(0)===1?"opaque":"translucent";if(de.renderPass===ct){let Ft=de.getDepthModeForSublayer(1,de.renderPass==="opaque"?lo.ReadWrite:lo.ReadOnly);oo(de,y,O,ie,Ft,Ye,!1,Ne)}if(de.renderPass==="translucent"&&O.paint.get("fill-antialias")){let Ft=de.getDepthModeForSublayer(O.getPaintProperty("fill-outline-color")?2:0,lo.ReadOnly);oo(de,y,O,ie,Ft,Ye,!0,Ne)}},fillExtrusion:function(de,y,O,ie,ce){let _e=O.paint.get("fill-extrusion-opacity");if(_e===0)return;let{isRenderingToTexture:De}=ce;if(de.renderPass==="translucent"){let Ne=new lo(de.context.gl.LEQUAL,lo.ReadWrite,de.depthRangeFor3D);if(_e!==1||O.paint.get("fill-extrusion-pattern").constantOr(1))yo(de,y,O,ie,Ne,go.disabled,wo.disabled,De),yo(de,y,O,ie,Ne,de.stencilModeFor3D(),de.colorModeForRenderPass(),De);else{let Ye=de.colorModeForRenderPass();yo(de,y,O,ie,Ne,go.disabled,Ye,De)}}},hillshade:function(de,y,O,ie,ce){if(de.renderPass!=="offscreen"&&de.renderPass!=="translucent")return;let{isRenderingToTexture:_e}=ce,De=de.context,Ne=de.style.projection.useSubdivision,Ye=de.getDepthModeForSublayer(0,lo.ReadOnly),lt=de.colorModeForRenderPass();if(de.renderPass==="offscreen")(function(ct,Ft,Gt,Jt,it,Rt,qt){let or=ct.context,vr=or.gl,Ar=Jt.paint.get("resampling")==="nearest"?vr.NEAREST:vr.LINEAR;for(let dr of Gt){let mr=Ft.getTile(dr),qr=mr.dem;if(!qr?.data||!mr.needsHillshadePrepare)continue;let Lr=qr.dim,ua=qr.stride,Ba=qr.getPixels();if(or.activeTexture.set(vr.TEXTURE1),or.pixelStoreUnpackPremultiplyAlpha.set(!1),mr.demTexture||(mr.demTexture=ct.getTileTexture(ua)),mr.demTexture){let Ua=mr.demTexture;Ua.update(Ba,{premultiply:!1}),Ua.bind(vr.NEAREST,vr.CLAMP_TO_EDGE)}else mr.demTexture=new e.T(or,Ba,vr.RGBA,{premultiply:!1}),mr.demTexture.bind(vr.NEAREST,vr.CLAMP_TO_EDGE);or.activeTexture.set(vr.TEXTURE0);let Pa=mr.fbo;if(!Pa){let Ua=new e.T(or,{width:Lr,height:Lr,data:null},vr.RGBA);Ua.bind(Ar,vr.CLAMP_TO_EDGE),Pa=mr.fbo=or.createFramebuffer(Lr,Lr,!0,!1),Pa.colorAttachment.set(Ua.texture)}or.bindFramebuffer.set(Pa.framebuffer),or.viewport.set([0,0,Lr,Lr]),ct.useProgram("hillshadePrepare").draw(or,vr.TRIANGLES,it,Rt,qt,Di.disabled,Rc(mr.tileID,qr),null,null,Jt.id,ct.rasterBoundsBuffer,ct.quadTriangleIndexBuffer,ct.rasterBoundsSegments),mr.needsHillshadePrepare=!1}})(de,y,ie,O,Ye,go.disabled,lt),De.viewport.set([0,0,de.width,de.height]);else if(de.renderPass==="translucent")if(Ne){let[ct,Ft,Gt]=de.stencilConfigForOverlapTwoPass(ie);Vo(de,y,O,Gt,ct,Ye,lt,!1,_e),Vo(de,y,O,Gt,Ft,Ye,lt,!0,_e)}else{let[ct,Ft]=de.getStencilConfigForOverlapAndUpdateStencilID(ie);Vo(de,y,O,Ft,ct,Ye,lt,!1,_e)}},colorRelief:function(de,y,O,ie,ce){if(de.renderPass!=="translucent"||!ie.length)return;let{isRenderingToTexture:_e}=ce,De=de.style.projection.useSubdivision,Ne=de.getDepthModeForSublayer(0,lo.ReadOnly),Ye=de.colorModeForRenderPass();if(De){let[lt,ct,Ft]=de.stencilConfigForOverlapTwoPass(ie);Yo(de,y,O,Ft,lt,Ne,Ye,!1,_e),Yo(de,y,O,Ft,ct,Ne,Ye,!0,_e)}else{let[lt,ct]=de.getStencilConfigForOverlapAndUpdateStencilID(ie);Yo(de,y,O,ct,lt,Ne,Ye,!1,_e)}},raster:function(de,y,O,ie,ce){if(de.renderPass!=="translucent"||O.paint.get("raster-opacity")===0||!ie.length)return;let{isRenderingToTexture:_e}=ce,De=y.getSource(),Ne=de.style.projection.useSubdivision;if(De instanceof ke)Bo(de,y,O,ie,null,!1,!1,De.tileCoords,De.flippedWindingOrder,_e);else if(Ne){let[Ye,lt,ct]=de.stencilConfigForOverlapTwoPass(ie);Bo(de,y,O,ct,Ye,!1,!0,ns,!1,_e),Bo(de,y,O,ct,lt,!0,!0,ns,!1,_e)}else{let[Ye,lt]=de.getStencilConfigForOverlapAndUpdateStencilID(ie);Bo(de,y,O,lt,Ye,!1,!0,ns,!1,_e)}},background:function(de,y,O,ie,ce){var _e;let De=O.paint.get("background-color"),Ne=O.paint.get("background-opacity");if(Ne===0)return;let{isRenderingToTexture:Ye}=ce,lt=de.context,ct=lt.gl,Ft=de.style.projection,Gt=de.transform,Jt=Gt.tileSize,it=O.paint.get("background-pattern");if(de.isPatternMissing(it))return;let Rt=!it&&De.a===1&&Ne===1&&de.opaquePassEnabledForLayer()?"opaque":"translucent";if(de.renderPass!==Rt)return;let qt=go.disabled,or=de.getDepthModeForSublayer(0,Rt==="opaque"?lo.ReadWrite:lo.ReadOnly),vr=de.colorModeForRenderPass(),Ar=de.useProgram(it?"backgroundPattern":"background"),dr=ie||Ze(Gt,{tileSize:Jt,terrain:de.style.map.terrain});it&&(lt.activeTexture.set(ct.TEXTURE0),de.imageManager.bind(de.context));let mr=O.getCrossfadeParameters();for(let qr of dr){let Lr=Gt.getProjectionData({overscaledTileID:qr,applyGlobeMatrix:!Ye,applyTerrainMatrix:!0}),ua=it?Wu(Ne,de,it,{tileID:qr,tileSize:Jt},mr):xl(Ne,De),Ba=(_e=de.style.map.terrain)===null||_e===void 0?void 0:_e.getTerrainData(qr),Pa=Ft.getMeshFromTileID(lt,qr.canonical,!1,!0,"raster");Ar.draw(lt,ct.TRIANGLES,or,qt,vr,Di.backCCW,ua,Ba,Lr,O.id,Pa.vertexBuffer,Pa.indexBuffer,Pa.segments)}},sky:function(de,y){let O=de.context,ie=O.gl,ce=((ct,Ft,Gt)=>{let Jt=Math.cos(Ft.rollInRadians),it=Math.sin(Ft.rollInRadians),Rt=Zt(Ft),qt=Ft.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:ct.properties.get("sky-color"),u_horizon_color:ct.properties.get("horizon-color"),u_horizon:[(Ft.width/2-Rt*it)*Gt,(Ft.height/2+Rt*Jt)*Gt],u_horizon_normal:[-it,Jt],u_sky_horizon_blend:ct.properties.get("sky-horizon-blend")*Ft.height/2*Gt,u_sky_blend:qt}})(y,de.style.map.transform,de.pixelRatio),_e=new lo(ie.LEQUAL,lo.ReadWrite,[0,1]),De=go.disabled,Ne=de.colorModeForRenderPass(),Ye=de.useProgram("sky"),lt=Al(O,y);Ye.draw(O,ie.TRIANGLES,_e,De,Ne,Di.disabled,ce,null,void 0,"sky",lt.vertexBuffer,lt.indexBuffer,lt.segments)},atmosphere:function(de,y,O){let ie=de.context,ce=ie.gl,_e=de.useProgram("atmosphere"),De=new lo(ce.LEQUAL,lo.ReadOnly,[0,1]),Ne=de.transform,Ye=function(qt,or){let vr=qt.properties.get("position"),Ar=[-vr.x,-vr.y,-vr.z],dr=e.ap(new Float64Array(16));return qt.properties.get("anchor")==="map"&&(e.be(dr,dr,or.rollInRadians),e.bf(dr,dr,-or.pitchInRadians),e.be(dr,dr,or.bearingInRadians),e.bf(dr,dr,or.center.lat*Math.PI/180),e.bI(dr,dr,-or.center.lng*Math.PI/180)),e.cg(Ar,Ar,dr),Ar}(O,de.transform),lt=Ne.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),ct=y.properties.get("atmosphere-blend")*lt.projectionTransition;if(ct===0)return;let Ft=Ls(Ne.worldSize,Ne.center.lat),Gt=Ne.inverseProjectionMatrix,Jt=new Float64Array(4);Jt[3]=1,e.aE(Jt,Jt,Ne.modelViewProjectionMatrix),Jt[0]/=Jt[3],Jt[1]/=Jt[3],Jt[2]/=Jt[3],Jt[3]=1,e.aE(Jt,Jt,Gt),Jt[0]/=Jt[3],Jt[1]/=Jt[3],Jt[2]/=Jt[3],Jt[3]=1;let it=((qt,or,vr,Ar,dr)=>({u_sun_pos:qt,u_atmosphere_blend:or,u_globe_position:vr,u_globe_radius:Ar,u_inv_proj_matrix:dr}))(Ye,ct,[Jt[0],Jt[1],Jt[2]],Ft,Gt),Rt=Al(ie,y);_e.draw(ie,ce.TRIANGLES,De,go.disabled,wo.alphaBlended,Di.disabled,it,null,null,"atmosphere",Rt.vertexBuffer,Rt.indexBuffer,Rt.segments)},custom:function(de,y,O,ie){let{isRenderingGlobe:ce}=ie,_e=de.context,De=O.implementation,Ne=de.style.projection,Ye=de.transform,lt=Ye.getProjectionDataForCustomLayer(ce),ct={farZ:Ye.farZ,nearZ:Ye.nearZ,fov:Ye.fov*Math.PI/180,modelViewProjectionMatrix:Ye.modelViewProjectionMatrix,projectionMatrix:Ye.projectionMatrix,shaderData:{variantName:Ne.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; uniform mat4 u_projection_matrix; -${Ne.shaderPreludeCode.vertexSource}`,define:Ne.shaderDefine},defaultProjectionData:lt},Ft=De.renderingMode?De.renderingMode:"2d";if(de.renderPass==="offscreen"){let Gt=De.prerender;Gt&&(de.setCustomLayerDefaults(),_e.setColorMode(de.colorModeForRenderPass()),Gt.call(De,_e.gl,ct),_e.setDirty(),de.setBaseState())}else if(de.renderPass==="translucent"){de.setCustomLayerDefaults(),_e.setColorMode(de.colorModeForRenderPass()),_e.setStencilMode(mo.disabled);let Gt=Ft==="3d"?de.getDepthModeFor3D():de.getDepthModeForSublayer(0,lo.ReadOnly);_e.setDepthMode(Gt),De.render(_e.gl,ct),_e.setDirty(),de.setBaseState(),_e.bindFramebuffer.set(null)}},debug:function(de,y,O){for(let ie of O)Kl(de,y,ie)},debugPadding:function(de){let y=de.transform.padding;Ws(de,de.transform.height-(y.top||0),3,Rs),Ws(de,y.bottom||0,3,ps),Dl(de,y.left||0,3,vi),Dl(de,de.transform.width-(y.right||0),3,Xo);let O=de.transform.centerPoint;(function(ie,ce,_e,De){Nl(ie,ce-1,_e-10,2,20,De),Nl(ie,ce-10,_e-1,20,2,De)})(de,O.x,de.transform.height-O.y,Ss)},terrainDepth:function(de,y){let O=de.context,ie=O.gl,ce=de.transform,_e=wo.unblended,De=new lo(ie.LEQUAL,lo.ReadWrite,[0,1]),Ne=y.tileManager.getRenderableTiles(),Ye=de.useProgram("terrainDepth");O.bindFramebuffer.set(y.getFramebuffer("depth").framebuffer),O.viewport.set([0,0,de.width/devicePixelRatio,de.height/devicePixelRatio]),O.clear({color:e.bo.transparent,depth:1});for(let lt of Ne){let ct=y.getTerrainMesh(lt.tileID),Ft=y.getTerrainData(lt.tileID),Gt=ce.getProjectionData({overscaledTileID:lt.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),Jt={u_ele_delta:y.getMeshFrameDelta(ce.zoom)};Ye.draw(O,ie.TRIANGLES,De,mo.disabled,_e,Di.backCCW,Jt,Ft,Gt,"terrain",ct.vertexBuffer,ct.indexBuffer,ct.segments)}O.bindFramebuffer.set(null),O.viewport.set([0,0,de.width,de.height])},terrainCoords:function(de,y){let O=de.context,ie=O.gl,ce=de.transform,_e=wo.unblended,De=new lo(ie.LEQUAL,lo.ReadWrite,[0,1]),Ne=y.getCoordsTexture(),Ye=y.tileManager.getRenderableTiles(),lt=de.useProgram("terrainCoords");O.bindFramebuffer.set(y.getFramebuffer("coords").framebuffer),O.viewport.set([0,0,de.width/devicePixelRatio,de.height/devicePixelRatio]),O.clear({color:e.bo.transparent,depth:1}),y.coordsIndex=[];for(let ct of Ye){let Ft=y.getTerrainMesh(ct.tileID),Gt=y.getTerrainData(ct.tileID);O.activeTexture.set(ie.TEXTURE0),ie.bindTexture(ie.TEXTURE_2D,Ne.texture);let Jt={u_terrain_coords_id:(255-y.coordsIndex.length)/255,u_texture:0,u_ele_delta:y.getMeshFrameDelta(ce.zoom)},it=ce.getProjectionData({overscaledTileID:ct.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});lt.draw(O,ie.TRIANGLES,De,mo.disabled,_e,Di.backCCW,Jt,Gt,it,"terrain",Ft.vertexBuffer,Ft.indexBuffer,Ft.segments),y.coordsIndex.push(ct.tileID.key)}O.bindFramebuffer.set(null),O.viewport.set([0,0,de.width,de.height])}};class bu{constructor(y,O){this.drawFunctions=zu,this.context=new rr(y),this.transform=O,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:e.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Sr.maxOverzooming+Sr.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ro}resize(y,O,ie){if(this.width=Math.floor(y*ie),this.height=Math.floor(O*ie),this.pixelRatio=ie,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let ce of this.style._order)this.style._layers[ce].resize()}setup(){let y=this.context,O=new e.aU;O.emplaceBack(0,0),O.emplaceBack(e.a6,0),O.emplaceBack(0,e.a6),O.emplaceBack(e.a6,e.a6),this.tileExtentBuffer=y.createVertexBuffer(O,xo.members),this.tileExtentSegments=e.aV.simpleSegment(0,0,4,2);let ie=new e.aU;ie.emplaceBack(0,0),ie.emplaceBack(e.a6,0),ie.emplaceBack(0,e.a6),ie.emplaceBack(e.a6,e.a6),this.debugBuffer=y.createVertexBuffer(ie,xo.members),this.debugSegments=e.aV.simpleSegment(0,0,4,5);let ce=new e.ch;ce.emplaceBack(0,0,0,0),ce.emplaceBack(e.a6,0,e.a6,0),ce.emplaceBack(0,e.a6,0,e.a6),ce.emplaceBack(e.a6,e.a6,e.a6,e.a6),this.rasterBoundsBuffer=y.createVertexBuffer(ce,fc.members),this.rasterBoundsSegments=e.aV.simpleSegment(0,0,4,2);let _e=new e.aU;_e.emplaceBack(0,0),_e.emplaceBack(e.a6,0),_e.emplaceBack(0,e.a6),_e.emplaceBack(e.a6,e.a6),this.rasterBoundsBufferPosOnly=y.createVertexBuffer(_e,xo.members),this.rasterBoundsSegmentsPosOnly=e.aV.simpleSegment(0,0,4,5);let De=new e.aU;De.emplaceBack(0,0),De.emplaceBack(1,0),De.emplaceBack(0,1),De.emplaceBack(1,1),this.viewportBuffer=y.createVertexBuffer(De,xo.members),this.viewportSegments=e.aV.simpleSegment(0,0,4,2);let Ne=new e.ci;Ne.emplaceBack(0),Ne.emplaceBack(1),Ne.emplaceBack(3),Ne.emplaceBack(2),Ne.emplaceBack(0),this.tileBorderIndexBuffer=y.createIndexBuffer(Ne);let Ye=new e.aW;Ye.emplaceBack(1,0,2),Ye.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=y.createIndexBuffer(Ye);let lt=this.context.gl;this.stencilClearMode=new mo({func:lt.ALWAYS,mask:0},0,255,lt.ZERO,lt.ZERO,lt.ZERO),this.tileExtentMesh=new fi(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let y=this.context,O=y.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let ie=e.O();e.c7(ie,0,this.width,this.height,0,0,1),e.S(ie,ie,[O.drawingBufferWidth,O.drawingBufferHeight,0]);let ce={mainMatrix:ie,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:ie};this.useProgram("clippingMask",null,!0).draw(y,O.TRIANGLES,lo.disabled,this.stencilClearMode,wo.disabled,Di.disabled,null,null,ce,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(y,O,ie){if(this.currentStencilSource===y.source||!y.isTileClipped()||!O?.length)return;this.currentStencilSource=y.source,this.nextStencilID+O.length>256&&this.clearStencil();let ce=this.context;ce.setColorMode(wo.disabled),ce.setDepthMode(lo.disabled);let _e={};for(let De of O)_e[De.key]=this.nextStencilID++;this._renderTileMasks(_e,O,ie,!0),this._renderTileMasks(_e,O,ie,!1),this._tileClippingMaskIDs=_e}_renderTileMasks(y,O,ie,ce){var _e;let De=this.context,Ne=De.gl,Ye=this.style.projection,lt=this.transform,ct=this.useProgram("clippingMask");for(let Ft of O){let Gt=y[Ft.key],Jt=(_e=this.style.map.terrain)===null||_e===void 0?void 0:_e.getTerrainData(Ft),it=Ye.getMeshFromTileID(this.context,Ft.canonical,ce,!0,"stencil"),Rt=lt.getProjectionData({overscaledTileID:Ft,applyGlobeMatrix:!ie,applyTerrainMatrix:!0});ct.draw(De,Ne.TRIANGLES,lo.disabled,new mo({func:Ne.ALWAYS,mask:0},Gt,255,Ne.KEEP,Ne.KEEP,Ne.REPLACE),wo.disabled,ie?Di.disabled:Di.backCCW,null,Jt,Rt,"$clipping",it.vertexBuffer,it.indexBuffer,it.segments)}}_renderTilesDepthBuffer(){var y;let O=this.context,ie=O.gl,ce=this.style.projection,_e=this.transform,De=this.useProgram("depth"),Ne=this.getDepthModeFor3D(),Ye=Ze(_e,{tileSize:_e.tileSize});for(let lt of Ye){let ct=(y=this.style.map.terrain)===null||y===void 0?void 0:y.getTerrainData(lt),Ft=ce.getMeshFromTileID(this.context,lt.canonical,!0,!0,"raster"),Gt=_e.getProjectionData({overscaledTileID:lt,applyGlobeMatrix:!0,applyTerrainMatrix:!0});De.draw(O,ie.TRIANGLES,Ne,mo.disabled,wo.disabled,Di.backCCW,null,ct,Gt,"$clipping",Ft.vertexBuffer,Ft.indexBuffer,Ft.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let y=this.nextStencilID++,O=this.context.gl;return new mo({func:O.NOTEQUAL,mask:255},y,255,O.KEEP,O.KEEP,O.REPLACE)}stencilModeForClipping(y){let O=this.context.gl;return new mo({func:O.EQUAL,mask:255},this._tileClippingMaskIDs[y.key],0,O.KEEP,O.KEEP,O.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(y){let O=this.context.gl,ie=y.sort((De,Ne)=>Ne.overscaledZ-De.overscaledZ),ce=ie[ie.length-1].overscaledZ,_e=ie[0].overscaledZ-ce+1;if(_e>1){this.currentStencilSource=void 0,this.nextStencilID+_e>256&&this.clearStencil();let De={};for(let Ne=0;Ne<_e;Ne++)De[Ne+ce]=new mo({func:O.GEQUAL,mask:255},Ne+this.nextStencilID,255,O.KEEP,O.KEEP,O.REPLACE);return this.nextStencilID+=_e,[De,ie]}return[{[ce]:mo.disabled},ie]}stencilConfigForOverlapTwoPass(y){let O=this.context.gl,ie=y.sort((De,Ne)=>Ne.overscaledZ-De.overscaledZ),ce=ie[ie.length-1].overscaledZ,_e=ie[0].overscaledZ-ce+1;if(this.clearStencil(),_e>1){let De={},Ne={};for(let Ye=0;Ye<_e;Ye++)De[Ye+ce]=new mo({func:O.GREATER,mask:255},_e+1+Ye,255,O.KEEP,O.KEEP,O.REPLACE),Ne[Ye+ce]=new mo({func:O.GREATER,mask:255},1+Ye,255,O.KEEP,O.KEEP,O.REPLACE);return this.nextStencilID=2*_e+1,[De,Ne,ie]}return this.nextStencilID=3,[{[ce]:new mo({func:O.GREATER,mask:255},2,255,O.KEEP,O.KEEP,O.REPLACE)},{[ce]:new mo({func:O.GREATER,mask:255},1,255,O.KEEP,O.KEEP,O.REPLACE)},ie]}colorModeForRenderPass(){let y=this.context.gl;return this._showOverdrawInspector?new wo([y.CONSTANT_COLOR,y.ONE],new e.bo(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?wo.unblended:wo.alphaBlended}getDepthModeForSublayer(y,O,ie){if(!this.opaquePassEnabledForLayer())return lo.disabled;let ce=1-((1+this.currentLayer)*this.numSublayers+y)*this.depthEpsilon;return new lo(ie||this.context.gl.LEQUAL,O,[ce,ce])}getDepthModeFor3D(){return new lo(this.context.gl.LEQUAL,lo.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer0};for(let Jt in Ne){let it=Ne[Jt];it.used&&it.prepare(this.context),Ye[Jt]=it.getVisibleCoordinates(!1),lt[Jt]=Ye[Jt].slice().reverse(),ct[Jt]=it.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Jt=0;Jtthis.useProgram(Jt)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:O.showOverdrawInspector?e.bo.black:e.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=O.showOverdrawInspector,this.depthRangeFor3D=[0,1-(y._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=De.length-1;this.currentLayer>=0;this.currentLayer--){let Jt=this.style._layers[De[this.currentLayer]],it=Ne[Jt.source],Rt=Ye[Jt.source];this._renderTileClippingMasks(Jt,Rt,!1),this.renderLayer(this,it,Jt,Rt,Ft)}this.renderPass="translucent";let Gt=!1;for(this.currentLayer=0;this.currentLayermr.source&&!mr.isHidden(Rt)?[it.tileManagers[mr.source]]:[]),vr=or.filter(mr=>mr.getSource().type==="vector"),Ar=or.filter(mr=>mr.getSource().type!=="vector"),dr=mr=>{(!qt||qt.getSource().maxzoom0?O.pop():null}isPatternMissing(y){if(!y)return!1;if(!y.from||!y.to)return!0;let O=this.imageManager.getPattern(y.from.toString()),ie=this.imageManager.getPattern(y.to.toString());return!O||!ie}useProgram(y,O,ie=!1,ce=[]){var _e;this.cache||(this.cache={});let De=!!this.style.map.terrain,Ne=this.style.projection,Ye=ie?Gi.projectionMercator:Ne.shaderPreludeCode,lt=ie?zi:Ne.shaderDefine,ct=y+(O?O.cacheKey:"")+`/${ie?so:Ne.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(De?"/terrain":"")+(ce?`/${ce.join("/")}`:"");return(_e=this.cache)[ct]||(_e[ct]=new Lf(this.context,Gi[y],O,pf[y],this._showOverdrawInspector,De,Ye,lt,ce)),this.cache[ct]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let y=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(y.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new e.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var y,O;if(this._tileTextures){for(let ie in this._tileTextures){let ce=this._tileTextures[ie];if(ce)for(let _e of ce)_e.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((y=this.tileExtentMesh.vertexBuffer)===null||y===void 0||y.destroy()),this.tileExtentMesh&&((O=this.tileExtentMesh.indexBuffer)===null||O===void 0||O.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let ie in this.cache){let ce=this.cache[ie];ce?.program&&this.context.gl.deleteProgram(ce.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:y,drawingBufferHeight:O}=this.context.gl;return this.width!==y||this.height!==O}}function ic(de,y){let O,ie=!1,ce=null,_e=()=>{ce=null,ie&&(de(...O),ce=setTimeout(_e,y),ie=!1)};return(...De)=>(ie=!0,O=De,ce||_e(),ce)}bu.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class Oc{constructor(y){this._getCurrentHash=()=>{let O=window.location.hash.replace("#","");if(this._hashName){let ie,ce=O.split("&").map(_e=>_e.split("="));for(let _e of ce)_e[0]===this._hashName&&(ie=_e);return(ie&&ie[1]||"").split("/")}return O.split("/")},this._onHashChange=()=>{let O=this._getCurrentHash();if(!this._isValidHash(O))return!1;let ie=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(O[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+O[2],+O[1]],zoom:+O[0],bearing:ie,pitch:+(O[4]||0)}),!0},this._updateHashUnthrottled=()=>{let O=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,O)},this._removeHash=()=>{let O=this._getCurrentHash();if(O.length===0)return;let ie=O.join("/"),ce=ie;ce.split("&").length>0&&(ce=ce.split("&")[0]),this._hashName&&(ce=`${this._hashName}=${ie}`);let _e=window.location.hash.replace(ce,"");_e.startsWith("#&")?_e=_e.slice(0,1)+_e.slice(2):_e==="#"&&(_e="");let De=window.location.href.replace(/(#.+)?$/,_e);De=De.replace("&&","&"),window.history.replaceState(window.history.state,null,De)},this._updateHash=ic(this._updateHashUnthrottled,300),this._hashName=y&&encodeURIComponent(y)}addTo(y){return this._map=y,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(y){let O=this._map.getCenter(),ie=Math.round(100*this._map.getZoom())/100,ce=Math.ceil((ie*Math.LN2+Math.log(512/360/.5))/Math.LN10),_e=Math.pow(10,ce),De=Math.round(O.lng*_e)/_e,Ne=Math.round(O.lat*_e)/_e,Ye=this._map.getBearing(),lt=this._map.getPitch(),ct="";if(ct+=y?`/${De}/${Ne}/${ie}`:`${ie}/${Ne}/${De}`,(Ye||lt)&&(ct+="/"+Math.round(10*Ye)/10),lt&&(ct+=`/${Math.round(lt)}`),this._hashName){let Ft=this._hashName,Gt=!1,Jt=window.location.hash.slice(1).split("&").map(it=>{let Rt=it.split("=")[0];return Rt===Ft?(Gt=!0,`${Rt}=${ct}`):it}).filter(it=>it);return Gt||Jt.push(`${Ft}=${ct}`),`#${Jt.join("&")}`}return`#${ct}`}_isValidHash(y){if(y.length<3||y.some(isNaN))return!1;try{new e.W(+y[2],+y[1])}catch{return!1}let O=+y[0],ie=+(y[3]||0),ce=+(y[4]||0);return O>=this._map.getMinZoom()&&O<=this._map.getMaxZoom()&&ie>=-180&&ie<=180&&ce>=this._map.getMinPitch()&&ce<=this._map.getMaxPitch()}}let Zu={linearity:.3,easing:e.cv(0,0,.3,1)},hu=e.e({deceleration:2500,maxSpeed:1400},Zu),Jl=e.e({deceleration:20,maxSpeed:1400},Zu),Ql=e.e({deceleration:1e3,maxSpeed:360},Zu),xu=e.e({deceleration:1e3,maxSpeed:90},Zu),rf=e.e({deceleration:1e3,maxSpeed:360},Zu);class Ff{constructor(y){this._map=y,this.clear()}clear(){this._inertiaBuffer=[]}record(y){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:m(),settings:y})}_drainInertiaBuffer(){let y=this._inertiaBuffer,O=m();for(;y.length>0&&O-y[0].time>160;)y.shift()}_onMoveEnd(y){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let O={zoom:0,bearing:0,pitch:0,roll:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:_e}of this._inertiaBuffer)O.zoom+=_e.zoomDelta||0,O.bearing+=_e.bearingDelta||0,O.pitch+=_e.pitchDelta||0,O.roll+=_e.rollDelta||0,_e.panDelta&&O.pan._add(_e.panDelta),_e.around&&(O.around=_e.around),_e.pinchAround&&(O.pinchAround=_e.pinchAround);let ie=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,ce={};if(O.pan.mag()){let _e=rl(O.pan.mag(),ie,e.e({},hu,y||{})),De=O.pan.mult(_e.amount/O.pan.mag()),Ne=this._map.cameraHelper.handlePanInertia(De,this._map.transform);ce.center=Ne.easingCenter,ce.offset=Ne.easingOffset,xc(ce,_e)}if(O.zoom){let _e=rl(O.zoom,ie,Jl);ce.zoom=e.cw(this._map.transform.zoom+_e.amount,this._map.getZoomSnap(),_e.amount),xc(ce,_e)}if(O.bearing){let _e=rl(O.bearing,ie,Ql);ce.bearing=this._map.transform.bearing+e.al(_e.amount,-179,179),xc(ce,_e)}if(O.pitch){let _e=rl(O.pitch,ie,xu);ce.pitch=this._map.transform.pitch+_e.amount,xc(ce,_e)}if(O.roll){let _e=rl(O.roll,ie,rf);ce.roll=this._map.transform.roll+e.al(_e.amount,-179,179),xc(ce,_e)}if(ce.zoom||ce.bearing){let _e=O.pinchAround===void 0?O.around:O.pinchAround;ce.around=_e?this._map.unproject(_e):this._map.getCenter()}return this.clear(),e.e(ce,{noMoveStart:!0})}}function xc(de,y){(!de.duration||de.durationO.unproject(Ye)),Ne=_e.reduce((Ye,lt,ct,Ft)=>Ye.add(lt.div(Ft.length)),new e.P(0,0));super(y,{points:_e,point:Ne,lngLats:De,lngLat:O.unproject(Ne),originalEvent:ie}),this._defaultPrevented=!1}}class nf extends e.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(y,O,ie){super(y,{originalEvent:ie}),this._defaultPrevented=!1}}class jc{constructor(y,O){this._map=y,this._clickTolerance=O.clickTolerance}reset(){delete this._mousedownPos}wheel(y){return this._firePreventable(new nf(y.type,this._map,y))}mousedown(y,O){return this._mousedownPos=O,this._firePreventable(new Ol(y.type,this._map,y))}mouseup(y){this._map.fire(new Ol(y.type,this._map,y))}click(y,O){this._mousedownPos&&this._mousedownPos.dist(O)>=this._clickTolerance||this._map.fire(new Ol(y.type,this._map,y))}dblclick(y){return this._firePreventable(new Ol(y.type,this._map,y))}mouseover(y){this._map.fire(new Ol(y.type,this._map,y))}mouseout(y){this._map.fire(new Ol(y.type,this._map,y))}touchstart(y){return this._firePreventable(new Bu(y.type,this._map,y))}touchmove(y){this._map.fire(new Bu(y.type,this._map,y))}touchend(y){this._map.fire(new Bu(y.type,this._map,y))}touchcancel(y){this._map.fire(new Bu(y.type,this._map,y))}_firePreventable(y){if(this._map.fire(y),y.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class wu{constructor(y){this._map=y}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(y){this._map.fire(new Ol(y.type,this._map,y))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Ol("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(y){this._delayContextMenu?this._contextMenuEvent=y:this._ignoreContextMenu||this._map.fire(new Ol(y.type,this._map,y)),this._map.listens("contextmenu")&&y.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class jl{constructor(y){this._map=y}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(y){return this.transform.screenPointToLocation(e.P.convert(y),this._map.terrain)}}class Ul{constructor(y,O){this._map=y,this._tr=new jl(y),this._el=y.getCanvasContainer(),this._container=y.getContainer(),this._clickTolerance=O.clickTolerance||1,O.boxZoom&&typeof O.boxZoom=="object"&&(this._boxZoomEnd=O.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(y,O){this.isEnabled()&&y.shiftKey&&y.button===0&&(g.disableDrag(),this._startPos=this._lastPos=O,this._active=!0)}mousemoveWindow(y,O){if(!this._active)return;let ie=O;if(this._lastPos.equals(ie)||!this._box&&ie.dist(this._startPos)_e.fitScreenCoordinates(ie,ce,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",y)}keydown(y){this._active&&y.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",y))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),g.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(y,O){return this._map.fire(new e.n(y,{originalEvent:O}))}}function Ci(de,y){if(de.length!==y.length)throw new Error(`The number of touches and points are not equal - touches ${de.length}, points ${y.length}`);let O={};for(let ie=0;iethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=y.timeStamp),ie.length===this.numTouches&&(this.centroid=function(ce){let _e=new e.P(0,0);for(let De of ce)_e._add(De);return _e.div(ce.length)}(O),this.touches=Ci(ie,O)))}touchmove(y,O,ie){if(this.aborted||!this.centroid)return;let ce=Ci(ie,O);for(let _e in this.touches){let De=ce[_e];(!De||De.dist(this.touches[_e])>30)&&(this.aborted=!0)}}touchend(y,O,ie){if((!this.centroid||y.timeStamp-this.startTime>500)&&(this.aborted=!0),ie.length===0){let ce=!this.aborted&&this.centroid;if(this.reset(),ce)return ce}}}class Xe{constructor(y){this.singleTap=new eu(y),this.numTaps=y.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(y,O,ie){this.singleTap.touchstart(y,O,ie)}touchmove(y,O,ie){this.singleTap.touchmove(y,O,ie)}touchend(y,O,ie){let ce=this.singleTap.touchend(y,O,ie);if(ce){let _e=y.timeStamp-this.lastTime<500,De=!this.lastTap||this.lastTap.dist(ce)<30;if(_e&&De||this.reset(),this.count++,this.lastTime=y.timeStamp,this.lastTap=ce,this.count===this.numTaps)return this.reset(),ce}}}class rt{constructor(y){this._tr=new jl(y),this._zoomIn=new Xe({numTouches:1,numTaps:2}),this._zoomOut=new Xe({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(y,O,ie){this._zoomIn.touchstart(y,O,ie),this._zoomOut.touchstart(y,O,ie)}touchmove(y,O,ie){this._zoomIn.touchmove(y,O,ie),this._zoomOut.touchmove(y,O,ie)}touchend(y,O,ie){let ce=this._zoomIn.touchend(y,O,ie),_e=this._zoomOut.touchend(y,O,ie),De=this._tr;return ce?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Ne=>Ne.easeTo({duration:300,zoom:e.cw(De.zoom+1,Ne.getZoomSnap()),around:De.unproject(ce)},{originalEvent:y})}):_e?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Ne=>Ne.easeTo({duration:300,zoom:e.cw(De.zoom-1,Ne.getZoomSnap()),around:De.unproject(_e)},{originalEvent:y})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class pt{constructor(y){this._enabled=!!y.enable,this._moveStateManager=y.moveStateManager,this._clickTolerance=y.clickTolerance||1,this._moveFunction=y.move,this._activateOnStart=!!y.activateOnStart,y.assignEvents(this),this.reset()}reset(y){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(y)}_move(...y){let O=this._moveFunction(...y);if(O.bearingDelta||O.pitchDelta||O.rollDelta||O.around||O.panDelta)return this._active=!0,O}dragStart(y,O){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(y)&&(this._moveStateManager.startMove(y),this._lastPoint=Array.isArray(O)?O[0]:O,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(y,O){if(!this.isEnabled())return;let ie=this._lastPoint;if(!ie)return;if(y.preventDefault(),!this._moveStateManager.isValidMoveEvent(y))return void this.reset(y);let ce=Array.isArray(O)?O[0]:O;return!this._moved&&ce.dist(ie)!0}),O=new Dr){this.mouseMoveStateManager=y,this.oneFingerTouchMoveStateManager=O}_executeRelevantHandler(y,O,ie){return y instanceof MouseEvent?O(y):typeof TouchEvent<"u"&&y instanceof TouchEvent?ie(y):void 0}startMove(y){this._executeRelevantHandler(y,O=>{this.mouseMoveStateManager.startMove(O)},O=>{this.oneFingerTouchMoveStateManager.startMove(O)})}endMove(y){this._executeRelevantHandler(y,O=>{this.mouseMoveStateManager.endMove(O)},O=>{this.oneFingerTouchMoveStateManager.endMove(O)})}isValidStartEvent(y){return this._executeRelevantHandler(y,O=>this.mouseMoveStateManager.isValidStartEvent(O),O=>this.oneFingerTouchMoveStateManager.isValidStartEvent(O))}isValidMoveEvent(y){return this._executeRelevantHandler(y,O=>this.mouseMoveStateManager.isValidMoveEvent(O),O=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(O))}isValidEndEvent(y){return this._executeRelevantHandler(y,O=>this.mouseMoveStateManager.isValidEndEvent(O),O=>this.oneFingerTouchMoveStateManager.isValidEndEvent(O))}}let kr=de=>{de.mousedown=de.dragStart,de.mousemoveWindow=de.dragMove,de.mouseup=de.dragEnd,de.contextmenu=y=>{y.preventDefault()}};class Wr{constructor(y,O){this._clickTolerance=y.clickTolerance||1,this._map=O,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(y){return y<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(y,O,ie){return this._calculateTransform(y,O,ie)}touchmove(y,O,ie){if(this._active){if(!this._shouldBePrevented(ie.length))return y.preventDefault(),this._calculateTransform(y,O,ie);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",y)}}touchend(y,O,ie){this._calculateTransform(y,O,ie),this._active&&this._shouldBePrevented(ie.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(y,O,ie){ie.length>0&&(this._active=!0);let ce=Ci(ie,O),_e=new e.P(0,0),De=new e.P(0,0),Ne=0;for(let lt in ce){let ct=ce[lt],Ft=this._touches[lt];Ft&&(_e._add(ct),De._add(ct.sub(Ft)),Ne++,ce[lt]=ct)}if(this._touches=ce,this._shouldBePrevented(Ne)||!De.mag())return;let Ye=De.div(Ne);return this._sum._add(Ye),this._sum.mag()Math.abs(de.x)}class Yi extends sn{constructor(y){super(),this._currentTouchCount=0,this._map=y}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(y,O,ie){super.touchstart(y,O,ie),this._currentTouchCount=ie.length}_start(y){this._lastPoints=y,wi(y[0].sub(y[1]))&&(this._valid=!1)}_move(y,O,ie){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let ce=y[0].sub(this._lastPoints[0]),_e=y[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(ce,_e,ie.timeStamp),this._valid?(this._lastPoints=y,this._active=!0,{pitchDelta:(ce.y+_e.y)/2*-.5}):void 0}gestureBeginsVertically(y,O,ie){if(this._valid!==void 0)return this._valid;let ce=y.mag()>=2,_e=O.mag()>=2;if(!ce&&!_e)return;if(!ce||!_e)return this._firstMove===void 0&&(this._firstMove=ie),ie-this._firstMove<100&&void 0;let De=y.y>0==O.y>0;return wi(y)&&wi(O)&&De}}let Ti={panStep:100,bearingStep:15,pitchStep:10};class _o{constructor(y){this._tr=new jl(y);let O=Ti;this._panStep=O.panStep,this._bearingStep=O.bearingStep,this._pitchStep=O.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(y){if(y.altKey||y.ctrlKey||y.metaKey)return;let O=0,ie=0,ce=0,_e=0,De=0;switch(y.keyCode){case 61:case 107:case 171:case 187:O=1;break;case 189:case 109:case 173:O=-1;break;case 37:y.shiftKey?ie=-1:(y.preventDefault(),_e=-1);break;case 39:y.shiftKey?ie=1:(y.preventDefault(),_e=1);break;case 38:y.shiftKey?ce=1:(y.preventDefault(),De=-1);break;case 40:y.shiftKey?ce=-1:(y.preventDefault(),De=1);break;default:return}return this._rotationDisabled&&(ie=0,ce=0),{cameraAnimation:Ne=>{let Ye=this._tr;Ne.easeTo({duration:300,easeId:"keyboardHandler",easing:bo,zoom:O?e.cw(Ye.zoom+O*(y.shiftKey?2:1),Ne.getZoomSnap()):Ye.zoom,bearing:Ye.bearing+ie*this._bearingStep,pitch:Ye.pitch+ce*this._pitchStep,offset:[-_e*this._panStep,-De*this._panStep],center:Ye.center},{originalEvent:y})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function bo(de){return de*(2-de)}let Zo=4.000244140625,fs=1/450;class Po{constructor(y,O){this._onTimeout=ie=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(ie)},this._map=y,this._tr=new jl(y),this._triggerRenderFrame=O,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=fs}setZoomRate(y){this._defaultZoomRate=y}setWheelZoomRate(y){this._wheelZoomRate=y}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(y){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!y&&y.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(y){return!!this._map.cooperativeGestures.isEnabled()&&!(y.ctrlKey||this._map.cooperativeGestures.isBypassed(y))}wheel(y){if(!this.isEnabled())return;if(this._shouldBePrevented(y))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",y);let O=y.deltaMode===WheelEvent.DOM_DELTA_LINE?40*y.deltaY:y.deltaY,ie=m(),ce=ie-(this._lastWheelEventTime||0);this._lastWheelEventTime=ie,O!==0&&O%Zo==0?this._type="wheel":O!==0&&Math.abs(O)<4?this._type="trackpad":ce>400?(this._type=null,this._lastValue=O,this._timeout=setTimeout(this._onTimeout,40,y)):this._type||(this._type=Math.abs(ce*O)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,O+=this._lastValue)),y.shiftKey&&O&&(O/=4),this._type&&(this._lastWheelEvent=y,this._delta-=O,this._active||this._start(y)),y.preventDefault()}_start(y){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let O=g.mousePos(this._map.getCanvas(),y),ie=this._tr;this._aroundPoint=this._aroundCenter?ie.transform.locationToScreenPoint(e.W.convert(ie.center)):O,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let y=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let Ne=y.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=Ne),typeof this._targetZoom=="number"&&(this._targetZoom+=Ne)}if(this._delta!==0){let Ne=this._type==="wheel"&&Math.abs(this._delta)>Zo?this._wheelZoomRate:this._defaultZoomRate,Ye=2/(1+Math.exp(-Math.abs(this._delta*Ne)));this._delta<0&&Ye!==0&&(Ye=1/Ye);let lt=typeof this._targetZoom!="number"?y.scale:e.ao(this._targetZoom),ct=y.applyConstrain(y.getCameraLngLat(),e.ar(lt*Ye)).zoom,Ft=this._map.getZoomSnap();if(this._type==="wheel"&&Ft>0){let Gt=e.cw(y.zoom,Ft);this._targetZoom=e.cw(ct,Ft,ct-Gt)}else this._targetZoom=ct;this._type==="wheel"&&(this._startZoom=y.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let O=typeof this._targetZoom!="number"?y.zoom:this._targetZoom,ie=this._startZoom,ce=this._easing,_e,De=!1;if(this._type==="wheel"&&ie&&ce){let Ne=m()-this._lastWheelEventTime,Ye=Math.min((Ne+5)/200,1),lt=ce(Ye);_e=e.H.number(ie,O,lt),Ye<1?this._needsRerender=!0:De=!0}else _e=O,De=!0;return this._active=!0,De&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=_e,{noInertia:!0,needsRenderFrame:!De,zoomDelta:_e-y.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(y){let O=e.cy;if(this._prevEase){let ie=this._prevEase,ce=(m()-ie.start)/ie.duration,_e=ie.easing(ce+.01)-ie.easing(ce),De=.27/Math.sqrt(_e*_e+1e-4)*.01,Ne=Math.sqrt(.0729-De*De);O=e.cv(De,Ne,.25,1)}return this._prevEase={start:m(),duration:y,easing:O},O}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Es{constructor(y,O){this._clickZoom=y,this._tapZoom=O}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class cl{constructor(y){this._tr=new jl(y),this.reset()}reset(){this._active=!1}dblclick(y,O){return y.preventDefault(),{cameraAnimation:ie=>{ie.easeTo({duration:300,zoom:e.cw(this._tr.zoom+(y.shiftKey?-1:1),ie.getZoomSnap()),around:this._tr.unproject(O)},{originalEvent:y})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ql{constructor(){this._tap=new Xe({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(y){this._zoomRate=y??1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(y,O,ie){if(!this._swipePoint)if(this._tapTime){let ce=O[0],_e=y.timeStamp-this._tapTime<500,De=this._tapPoint.dist(ce)<30;_e&&De?ie.length>0&&(this._swipePoint=ce,this._swipeTouch=ie[0].identifier):this.reset()}else this._tap.touchstart(y,O,ie)}touchmove(y,O,ie){if(this._tapTime){if(this._swipePoint){if(ie[0].identifier!==this._swipeTouch)return;let ce=O[0],_e=ce.y-this._swipePoint.y;return this._swipePoint=ce,y.preventDefault(),this._active=!0,{zoomDelta:_e/128*this._zoomRate}}}else this._tap.touchmove(y,O,ie)}touchend(y,O,ie){if(this._tapTime)this._swipePoint&&ie.length===0&&this.reset();else{let ce=this._tap.touchend(y,O,ie);ce&&(this._tapTime=y.timeStamp,this._tapPoint=ce)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Js{constructor(y,O,ie){this._el=y,this._mousePan=O,this._touchPan=ie}enable(y){this._inertiaOptions=y||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Tu{constructor(y,O,ie,ce){this._pitchWithRotate=y.pitchWithRotate,this._rollEnabled=y.rollEnabled,this._mouseRotate=O,this._mousePitch=ie,this._mouseRoll=ce}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class Li{constructor(y,O,ie,ce){this._el=y,this._touchZoom=O,this._touchRotate=ie,this._tapDragZoom=ce,this._rotationDisabled=!1,this._enabled=!0}enable(y){this._touchZoom.enable(y),this._rotationDisabled||this._touchRotate.enable(y),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}setZoomRate(y){this._touchZoom.setZoomRate(y),this._tapDragZoom.setZoomRate(y)}setZoomThreshold(y){this._touchZoom.setZoomThreshold(y)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Vi{constructor(y,O){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=y,this._options=O,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let y=this._map.getCanvasContainer();y.classList.add("maplibregl-cooperative-gestures"),this._container=g.create("div","maplibregl-cooperative-gesture-screen",y);let O=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(O=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let ie=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),ce=document.createElement("div");ce.className="maplibregl-desktop-message",ce.textContent=O,this._container.appendChild(ce);let _e=document.createElement("div");_e.className="maplibregl-mobile-message",_e.textContent=ie,this._container.appendChild(_e),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(y){return y[this._bypassKey]}notifyGestureBlocked(y,O){this._enabled&&(this._map.fire(new e.n("cooperativegestureprevented",{gestureType:y,originalEvent:O})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let fl=de=>de.zoom||de.drag||de.roll||de.pitch||de.rotate;class Ku extends e.n{}function tu(de){var y;return((y=de.panDelta)===null||y===void 0?void 0:y.mag())||de.zoomDelta||de.bearingDelta||de.pitchDelta||de.rollDelta}class Bs{get _ownerDocument(){var y;return((y=this._el)===null||y===void 0?void 0:y.ownerDocument)||document}get _ownerWindow(){var y,O;return((O=(y=this._el)===null||y===void 0?void 0:y.ownerDocument)===null||O===void 0?void 0:O.defaultView)||window}constructor(y,O){this.handleWindowEvent=ce=>{this.handleEvent(ce,`${ce.type}Window`)},this.handleEvent=(ce,_e)=>{if(ce.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let De=ce.type==="renderFrame"?void 0:ce,Ne={needsRenderFrame:!1},Ye={},lt={};for(let{handlerName:Gt,handler:Jt,allowed:it}of this._handlers){if(!Jt.isEnabled())continue;let Rt;if(this._blockedByActive(lt,it,Gt))Jt.reset();else if(Jt[_e||ce.type]){if(e.cz(ce,_e||ce.type)){let qt=g.mousePos(this._map.getCanvas(),ce);Rt=Jt[_e||ce.type](ce,qt)}else if(e.cA(ce,_e||ce.type)){let qt=this._getMapTouches(ce.touches),or=g.touchPos(this._map.getCanvas(),qt);Rt=Jt[_e||ce.type](ce,or,qt)}else e.cB(_e||ce.type)||(Rt=Jt[_e||ce.type](ce));this.mergeHandlerResult(Ne,Ye,Rt,Gt,De),Rt?.needsRenderFrame&&this._triggerRenderFrame()}(Rt||Jt.isActive())&&(lt[Gt]=Jt)}let ct={};for(let Gt in this._previousActiveHandlers)lt[Gt]||(ct[Gt]=De);this._previousActiveHandlers=lt,(Object.keys(ct).length||tu(Ne))&&(this._changes.push([Ne,Ye,ct]),this._triggerRenderFrame()),(Object.keys(lt).length||tu(Ne))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Ft}=Ne;Ft&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Ft(this._map))},this._map=y,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ff(y),this._bearingSnap=O.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(O);let ie=this._el;this._listeners=[[ie,"touchstart",{passive:!0}],[ie,"touchmove",{passive:!1}],[ie,"touchend",void 0],[ie,"touchcancel",void 0],[ie,"mousedown",void 0],[ie,"mousemove",void 0],[ie,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[ie,"mouseover",void 0],[ie,"mouseout",void 0],[ie,"dblclick",void 0],[ie,"click",void 0],[ie,"keydown",{capture:!1}],[ie,"keyup",void 0],[ie,"wheel",{passive:!1}],[ie,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[ce,_e,De]of this._listeners)ce.addEventListener(_e,ce===this._ownerDocument?this.handleWindowEvent:this.handleEvent,De)}destroy(){for(let[y,O,ie]of this._listeners)y.removeEventListener(O,y===this._ownerDocument?this.handleWindowEvent:this.handleEvent,ie)}_addDefaultHandlers(y){let O=this._map,ie=O.getCanvasContainer();this._add("mapEvent",new jc(O,y));let ce=O.boxZoom=new Ul(O,y);this._add("boxZoom",ce),y.interactive&&y.boxZoom&&ce.enable();let _e=O.cooperativeGestures=new Vi(O,y.cooperativeGestures);this._add("cooperativeGestures",_e),y.cooperativeGestures&&_e.enable();let De=new rt(O),Ne=new cl(O);O.doubleClickZoom=new Es(Ne,De),this._add("tapZoom",De),this._add("clickZoom",Ne),y.interactive&&y.doubleClickZoom&&O.doubleClickZoom.enable();let Ye=new ql;this._add("tapDragZoom",Ye);let lt=O.touchPitch=new Yi(O);this._add("touchPitch",lt),y.interactive&&y.touchPitch&&O.touchPitch.enable(y.touchPitch);let ct=()=>O.project(O.getCenter()),Ft=function({enable:dr,clickTolerance:mr,aroundCenter:qr=!0,minPixelCenterThreshold:Lr=100,rotateDegreesPerPixelMoved:cn=.8},Nn){let Dn=new Yt({checkCorrectEvent:qn=>qn.button===0&&qn.ctrlKey||qn.button===2&&!qn.ctrlKey});return new pt({clickTolerance:mr,move:(qn,_n)=>{let vn=Nn();if(qr&&Math.abs(vn.y-qn.y)>Lr)return{bearingDelta:e.cx(new e.P(qn.x,_n.y),_n,vn)};let Sn=(_n.x-qn.x)*cn;return qr&&_n.ycn.button===0&&cn.ctrlKey||cn.button===2});return new pt({clickTolerance:mr,move:(cn,Nn)=>({pitchDelta:(Nn.y-cn.y)*qr}),moveStateManager:Lr,enable:dr,assignEvents:kr})}(y),Jt=function({enable:dr,clickTolerance:mr,rollDegreesPerPixelMoved:qr=.3},Lr){let cn=new Yt({checkCorrectEvent:Nn=>Nn.button===2&&Nn.ctrlKey});return new pt({clickTolerance:mr,move:(Nn,Dn)=>{let qn=Lr(),_n=(Dn.x-Nn.x)*qr;return Dn.yLr.button===0&&!Lr.ctrlKey});return new pt({clickTolerance:mr,move:(Lr,cn)=>({around:cn,panDelta:cn.sub(Lr)}),activateOnStart:!0,moveStateManager:qr,enable:dr,assignEvents:kr})}(y),Rt=new Wr(y,O);O.dragPan=new Js(ie,it,Rt),this._add("mousePan",it),this._add("touchPan",Rt,["touchZoom","touchRotate"]),y.interactive&&y.dragPan&&O.dragPan.enable(y.dragPan);let qt=new Na,or=new Zn;O.touchZoomRotate=new Li(ie,or,qt,Ye),this._add("touchRotate",qt,["touchPan","touchZoom"]),this._add("touchZoom",or,["touchPan","touchRotate"]),y.interactive&&y.touchZoomRotate&&O.touchZoomRotate.enable(y.touchZoomRotate),this._add("blockableMapEvent",new wu(O));let vr=O.scrollZoom=new Po(O,()=>this._triggerRenderFrame());this._add("scrollZoom",vr,["mousePan"]),y.interactive&&y.scrollZoom&&O.scrollZoom.enable(y.scrollZoom);let Ar=O.keyboard=new _o(O);this._add("keyboard",Ar),y.interactive&&y.keyboard&&O.keyboard.enable()}_add(y,O,ie){this._handlers.push({handlerName:y,handler:O,allowed:ie}),this._handlersById[y]=O}stop(y){if(!this._updatingCamera){for(let{handler:O}of this._handlers)O.reset();this._inertia.clear(),this._fireEvents({},{},y),this._changes=[]}}isActive(){for(let{handler:y}of this._handlers)if(y.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!fl(this._eventsInProgress)||this.isZooming()}_blockedByActive(y,O,ie){for(let ce in y)if(ce!==ie&&!O?.includes(ce))return!0;return!1}_getMapTouches(y){let O=[];for(let ie of y)this._el.contains(ie.target)&&O.push(ie);return O}mergeHandlerResult(y,O,ie,ce,_e){if(!ie)return;e.e(y,ie);let De={handlerName:ce,originalEvent:ie.originalEvent||_e};ie.zoomDelta!==void 0&&(O.zoom=De),ie.panDelta!==void 0&&(O.drag=De),ie.rollDelta!==void 0&&(O.roll=De),ie.pitchDelta!==void 0&&(O.pitch=De),ie.bearingDelta!==void 0&&(O.rotate=De)}_applyChanges(){let y={},O={},ie={};for(let[ce,_e,De]of this._changes)ce.panDelta&&(y.panDelta=(y.panDelta||new e.P(0,0))._add(ce.panDelta)),ce.zoomDelta&&(y.zoomDelta=(y.zoomDelta||0)+ce.zoomDelta),ce.bearingDelta&&(y.bearingDelta=(y.bearingDelta||0)+ce.bearingDelta),ce.pitchDelta&&(y.pitchDelta=(y.pitchDelta||0)+ce.pitchDelta),ce.rollDelta&&(y.rollDelta=(y.rollDelta||0)+ce.rollDelta),ce.around!==void 0&&(y.around=ce.around),ce.pinchAround!==void 0&&(y.pinchAround=ce.pinchAround),ce.noInertia&&(y.noInertia=ce.noInertia),e.e(O,_e),e.e(ie,De);this._updateMapTransform(y,O,ie),this._changes=[]}_updateMapTransform(y,O,ie){let ce=this._map,_e=ce._getTransformForUpdate(),De=ce.terrain;if(!(tu(y)||De&&this._terrainMovement))return void this._fireEvents(O,ie,!0);ce._stop(!0);let{panDelta:Ne,zoomDelta:Ye,bearingDelta:lt,pitchDelta:ct,rollDelta:Ft,around:Gt,pinchAround:Jt}=y;Jt!==void 0&&(Gt=Jt),Gt||(Gt=ce.transform.centerPoint),De&&!_e.isPointOnMapSurface(Gt)&&(Gt=_e.centerPoint);let it={panDelta:Ne,zoomDelta:Ye,rollDelta:Ft,pitchDelta:ct,bearingDelta:lt,around:Gt};this._map.cameraHelper.useGlobeControls&&!_e.isPointOnMapSurface(Gt)&&(Gt=_e.centerPoint);let Rt=Gt.distSqr(_e.centerPoint)<.01?_e.center:_e.screenPointToLocation(Ne?Gt.sub(Ne):Gt);this._handleMapControls({terrain:De,tr:_e,deltasForHelper:it,preZoomAroundLoc:Rt,combinedEventsInProgress:O,panDelta:Ne}),ce._applyUpdatedTransform(_e),this._map._update(),y.noInertia||this._inertia.record(y),this._fireEvents(O,ie,!0)}_handleMapControls({terrain:y,tr:O,deltasForHelper:ie,preZoomAroundLoc:ce,combinedEventsInProgress:_e,panDelta:De}){let Ne=this._map.cameraHelper;if(Ne.handleMapControlsRollPitchBearingZoom(ie,O),y)return Ne.useGlobeControls?(this._terrainMovement||!_e.drag&&!_e.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void Ne.handleMapControlsPan(ie,O,ce)):this._terrainMovement||!_e.drag&&!_e.zoom?void(_e.drag&&this._terrainMovement&&De?O.setCenter(O.screenPointToLocation(O.centerPoint.sub(De))):Ne.handleMapControlsPan(ie,O,ce)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void Ne.handleMapControlsPan(ie,O,ce));Ne.handleMapControlsPan(ie,O,ce)}_fireEvents(y,O,ie){let ce=fl(this._eventsInProgress),_e=fl(y),De={};for(let Ft in y){let{originalEvent:Gt}=y[Ft];this._eventsInProgress[Ft]||(De[`${Ft}start`]=Gt),this._eventsInProgress[Ft]=y[Ft]}!ce&&_e&&this._fireEvent("movestart",_e.originalEvent);for(let Ft in De)this._fireEvent(Ft,De[Ft]);_e&&this._fireEvent("move",_e.originalEvent);for(let Ft in y){let{originalEvent:Gt}=y[Ft];this._fireEvent(Ft,Gt)}let Ne={},Ye;for(let Ft in this._eventsInProgress){let{handlerName:Gt,originalEvent:Jt}=this._eventsInProgress[Ft];this._handlersById[Gt].isActive()||(delete this._eventsInProgress[Ft],Ye=O[Gt]||Jt,Ne[`${Ft}end`]=Ye)}for(let Ft in Ne)this._fireEvent(Ft,Ne[Ft]);let lt=fl(this._eventsInProgress),ct=(ce||_e)&&!lt;if(ct&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Ft=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&Ft.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(Ft)}if(ie&&ct){this._updatingCamera=!0;let Ft=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Gt=Jt=>Jt!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Ku("renderFrame",{timeStamp:y})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class oc extends e.E{constructor(y,O,ie){super(),this._renderFrameCallback=()=>{let ce=Math.min((m()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(ce)),ce<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=y,this._bearingSnap=ie.bearingSnap,this._zoomSnap=ie.zoomSnap,this.cameraHelper=O,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(y,O){y.apply(this.transform,!0),this.transform=y,this.cameraHelper=O}getCenter(){return new e.W(this.transform.center.lng,this.transform.center.lat)}setCenter(y,O){return this.jumpTo({center:y},O)}getCenterElevation(){return this.transform.elevation}setCenterElevation(y,O){return this.jumpTo({elevation:y},O),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(y){this._centerClampedToGround=y}panBy(y,O,ie){return y=e.P.convert(y).mult(-1),this.panTo(this.transform.center,e.e({offset:y},O),ie)}panTo(y,O,ie){return this.easeTo(e.e({center:y},O),ie)}getZoom(){return this.transform.zoom}setZoom(y,O){return this.jumpTo({zoom:y},O),this}zoomTo(y,O,ie){return this.easeTo(e.e({zoom:y},O),ie)}zoomIn(y,O){return this.zoomTo(e.cw(this.getZoom()+1,this._zoomSnap),y,O),this}zoomOut(y,O){return this.zoomTo(e.cw(this.getZoom()-1,this._zoomSnap),y,O),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(y,O){return y!=this.transform.fov&&(this.transform.setFov(y),this.fire(new e.n("movestart",O)).fire(new e.n("move",O)).fire(new e.n("moveend",O))),this}getBearing(){return this.transform.bearing}setZoomSnap(y){return this._zoomSnap=y,this}getZoomSnap(){return this._zoomSnap}setBearing(y,O){return this.jumpTo({bearing:y},O),this}getPadding(){return this.transform.padding}setPadding(y,O){return this.jumpTo({padding:y},O),this}rotateTo(y,O,ie){return this.easeTo(e.e({bearing:y},O),ie)}resetNorth(y,O){return this.rotateTo(0,e.e({duration:1e3},y),O),this}resetNorthPitch(y,O){return this.easeTo(e.e({bearing:0,pitch:0,roll:0,duration:1e3},y),O),this}snapToNorth(y,O){return Math.abs(this.getBearing()){Rt.easeFunc(qt),this.terrain&&!y.freezeElevation&&this._updateElevation(qt),this._applyUpdatedTransform(ie),this._fireMoveEvents(O)},qt=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(O,qt)},y),this}_prepareEase(y,O,ie={}){this._moving=!0,O||ie.moving||this.fire(new e.n("movestart",y)),this._zooming&&!ie.zooming&&this.fire(new e.n("zoomstart",y)),this._rotating&&!ie.rotating&&this.fire(new e.n("rotatestart",y)),this._pitching&&!ie.pitching&&this.fire(new e.n("pitchstart",y)),this._rolling&&!ie.rolling&&this.fire(new e.n("rollstart",y))}_prepareElevation(y){this._elevationCenter=y,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(y,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(y){this._elevationStart!==void 0&&this._elevationCenter!==void 0||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let O=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(y<1&&O!==this._elevationTarget){let ie=this._elevationTarget-this._elevationStart;this._elevationStart+=y*(ie-(O-(ie*y+this._elevationStart))/(1-y)),this._elevationTarget=O}this.transform.setElevation(e.H.number(this._elevationStart,this._elevationTarget,y))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(y){if(!this.terrain&&y.elevation>=0&&y.pitch<=90)return{};let O=y.getCameraLngLat(),ie=y.getCameraAltitude(),ce=this.terrain?this.terrain.getElevationForLngLatZoom(O,y.zoom):0;if(iethis._elevateCameraIfInsideTerrain(ce)),this.transformCameraUpdate&&O.push(ce=>this.transformCameraUpdate(ce)),!O.length)return;let ie=y.clone();for(let ce of O){let _e=ie.clone(),{center:De,zoom:Ne,roll:Ye,pitch:lt,bearing:ct,elevation:Ft}=ce(_e);De&&_e.setCenter(De),Ft!==void 0&&_e.setElevation(Ft),Ne!==void 0&&_e.setZoom(Ne),Ye!==void 0&&_e.setRoll(Ye),lt!==void 0&&_e.setPitch(lt),ct!==void 0&&_e.setBearing(ct),ie.apply(_e,!1)}this.transform.apply(ie,!1)}_fireMoveEvents(y){this.fire(new e.n("move",y)),this._zooming&&this.fire(new e.n("zoom",y)),this._rotating&&this.fire(new e.n("rotate",y)),this._pitching&&this.fire(new e.n("pitch",y)),this._rolling&&this.fire(new e.n("roll",y))}_afterEase(y,O){if(this._easeId&&O&&this._easeId===O)return;delete this._easeId;let ie=this._zooming,ce=this._rotating,_e=this._pitching,De=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,ie&&this.fire(new e.n("zoomend",y)),ce&&this.fire(new e.n("rotateend",y)),_e&&this.fire(new e.n("pitchend",y)),De&&this.fire(new e.n("rollend",y)),this.fire(new e.n("moveend",y))}flyTo(y,O){if(!y.essential&&s.prefersReducedMotion){let _n=e.V(y,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(_n,O)}this.stop(),"zoom"in(y=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.cy},y))&&this._zoomSnap&&(y.zoom=e.cw(y.zoom,this._zoomSnap));let ie=this._getTransformForUpdate(),ce=ie.bearing,_e=ie.pitch,De=ie.roll,Ne=ie.padding,Ye="bearing"in y?this._normalizeBearing(y.bearing,ce):ce,lt="pitch"in y?+y.pitch:_e,ct="roll"in y?this._normalizeBearing(y.roll,De):De,Ft="padding"in y?y.padding:ie.padding,Gt=e.P.convert(y.offset),Jt=ie.centerPoint.add(Gt),it=ie.screenPointToLocation(Jt),Rt=this.cameraHelper.handleFlyTo(ie,{bearing:Ye,pitch:lt,roll:ct,padding:Ft,locationAtOffset:it,offsetAsPoint:Gt,center:y.center,minZoom:y.minZoom,zoom:y.zoom}),qt=y.curve,or=Math.max(ie.width,ie.height),vr=or/Rt.scaleOfZoom,Ar=Rt.pixelPathLength;typeof Rt.scaleOfMinZoom=="number"&&(qt=Math.sqrt(or/Rt.scaleOfMinZoom/Ar*2));let dr=qt*qt;function mr(_n){let vn=(vr*vr-or*or+(_n?-1:1)*dr*dr*Ar*Ar)/(2*(_n?vr:or)*dr*Ar);return Math.log(Math.sqrt(vn*vn+1)-vn)}function qr(_n){return(Math.exp(_n)-Math.exp(-_n))/2}function Lr(_n){return(Math.exp(_n)+Math.exp(-_n))/2}let cn=mr(!1),Nn=function(_n){return Lr(cn)/Lr(cn+qt*_n)},Dn=function(_n){return or*((Lr(cn)*(qr(vn=cn+qt*_n)/Lr(vn))-qr(cn))/dr)/Ar;var vn},qn=(mr(!0)-cn)/qt;if(Math.abs(Ar)<2e-6||!isFinite(qn)){if(Math.abs(or-vr)<1e-6)return this.easeTo(y,O);let _n=vr0,Nn=vn=>Math.exp(_n*qt*vn)}return y.duration="duration"in y?+y.duration:1e3*qn/("screenSpeed"in y?+y.screenSpeed/qt:+y.speed),y.maxDuration&&y.duration>y.maxDuration&&(y.duration=0),this._zooming=!0,this._rotating=ce!==Ye,this._pitching=lt!==_e,this._rolling=ct!==De,this._padding=!ie.isPaddingEqual(Ft),this._prepareEase(O,!1),this.terrain&&this._prepareElevation(Rt.targetCenter),this._ease(_n=>{let vn=_n*qn,Sn=1/Nn(vn),Tn=Dn(vn);this._rotating&&ie.setBearing(e.H.number(ce,Ye,_n)),this._pitching&&ie.setPitch(e.H.number(_e,lt,_n)),this._rolling&&ie.setRoll(e.H.number(De,ct,_n)),this._padding&&(ie.interpolatePadding(Ne,Ft,_n),Jt=ie.centerPoint.add(Gt)),Rt.easeFunc(_n,Sn,Tn,Jt),this.terrain&&!y.freezeElevation&&this._updateElevation(_n),this._applyUpdatedTransform(ie),this._fireMoveEvents(O)},()=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(O)},y),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(y,O){var ie;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let ce=this._onEaseEnd;delete this._onEaseEnd,ce.call(this,O)}return y||(ie=this.handlers)===null||ie===void 0||ie.stop(!1),this}_ease(y,O,ie){ie.animate===!1||ie.duration===0?(y(1),O()):(this._easeStart=m(),this._easeOptions=ie,this._onEaseFrame=y,this._onEaseEnd=O,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(y,O){y=e.X(y,-180,180);let ie=Math.abs(y-O);return Math.abs(y-360-O)MapLibre'};class hl{constructor(y=du){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=O=>{!O||O.sourceDataType!=="metadata"&&O.sourceDataType!=="visibility"&&O.dataType!=="style"&&O.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=y}getDefaultPosition(){return"bottom-right"}onAdd(y){return this._map=y,this._compact=this.options.compact,this._container=g.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=g.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=g.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(y,O){let ie=this._map._getUIString(`AttributionControl.${O}`);y.title=ie,y.setAttribute("aria-label",ie)}_updateAttributions(){if(!this._map.style)return;let y=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?y=y.concat(this.options.customAttribution.map(ce=>typeof ce!="string"?"":ce)):typeof this.options.customAttribution=="string"&&y.push(this.options.customAttribution)),this._map.style.stylesheet){let ce=this._map.style.stylesheet;this.styleOwner=ce.owner,this.styleId=ce.id}let O=this._map.style.tileManagers;for(let ce in O){let _e=O[ce];if(_e.used||_e.usedForTerrain){let De=_e.getSource();De.attribution&&!y.includes(De.attribution)&&y.push(De.attribution)}}y=y.filter(ce=>String(ce).trim()),y.sort((ce,_e)=>ce.length-_e.length),y=y.filter((ce,_e)=>{for(let De=_e+1;De{let O=this._container.children;if(O.length){let ie=O[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&ie.classList.add("maplibregl-compact"):ie.classList.remove("maplibregl-compact")}},this.options=y}getDefaultPosition(){return"bottom-left"}onAdd(y){var O;this._map=y,this._compact=(O=this.options)===null||O===void 0?void 0:O.compact,this._container=g.create("div","maplibregl-ctrl");let ie=g.create("a","maplibregl-ctrl-logo");return ie.target="_blank",ie.rel="noopener nofollow",ie.href="https://maplibre.org/",ie.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ie.setAttribute("rel","noopener nofollow"),this._container.appendChild(ie),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class he{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(y){let O=++this._id;return this._queue.push({callback:y,id:O,cancelled:!1}),O}remove(y){let O=this._currentlyRunning,ie=O?this._queue.concat(O):this._queue;for(let ce of ie)if(ce.id===y)return void(ce.cancelled=!0)}run(y=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let O=this._currentlyRunning=this._queue;this._queue=[];for(let ie of O)if(!ie.cancelled&&(ie.callback(y),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Se=e.aS([{name:"a_pos3d",type:"Int16",components:3}]);class je extends e.E{constructor(y){super(),this._lastTilesetChange=m(),this.tileManager=y,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=y._source.tileSize*2**this.deltaZoom,y.usedForTerrain=!0,y.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(y,O){this.tileManager.update(y,O),this._renderableTilesKeys=[];let ie={};for(let ce of Ze(y,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:O,calculateTileZoom:this.tileManager._source.calculateTileZoom}))ie[ce.key]=!0,this._renderableTilesKeys.push(ce.key),this._tiles[ce.key]||(ce.terrainRttPosMatrix32f=new Float64Array(16),e.c7(ce.terrainRttPosMatrix32f,0,e.a6,e.a6,0,0,1),this._tiles[ce.key]=new Tt(ce,this.tileSize),this._lastTilesetChange=m());for(let ce in this._tiles)ie[ce]||delete this._tiles[ce]}freeRtt(y){for(let O in this._tiles){let ie=this._tiles[O];(!y||ie.tileID.equals(y)||ie.tileID.isChildOf(y)||y.isChildOf(ie.tileID))&&(ie.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(y=>this.getTileByID(y))}getTileByID(y){return this._tiles[y]}getTerrainCoords(y,O){return O?this._getTerrainCoordsForTileRanges(y,O):this._getTerrainCoordsForRegularTile(y)}_getTerrainCoordsForRegularTile(y){let O={};for(let ie of this._renderableTilesKeys){let ce=this._tiles[ie].tileID,_e=y.clone(),De=e.bj();if(ce.canonical.equals(y.canonical))e.c7(De,0,e.a6,e.a6,0,0,1);else if(ce.canonical.isChildOf(y.canonical)){let Ne=ce.canonical.z-y.canonical.z,Ye=ce.canonical.x-(ce.canonical.x>>Ne<>Ne<>Ne;e.c7(De,0,ct,ct,0,0,1),e.Q(De,De,[-Ye*ct,-lt*ct,0])}else{if(!y.canonical.isChildOf(ce.canonical))continue;{let Ne=y.canonical.z-ce.canonical.z,Ye=y.canonical.x-(y.canonical.x>>Ne<>Ne<>Ne;e.c7(De,0,e.a6,e.a6,0,0,1),e.Q(De,De,[Ye*ct,lt*ct,0]),e.S(De,De,[1/2**Ne,1/2**Ne,0])}}_e.terrainRttPosMatrix32f=new Float32Array(De),O[ie]=_e}return O}_getTerrainCoordsForTileRanges(y,O){let ie={};for(let ce of this._renderableTilesKeys){let _e=this._tiles[ce].tileID;if(!this._isWithinTileRanges(_e,O))continue;let De=y.clone(),Ne=e.bj();if(_e.canonical.z===y.canonical.z){let Ye=y.canonical.x-_e.canonical.x+y.wrap*(1<y.canonical.z){let Ye=_e.canonical.z-y.canonical.z,lt=_e.canonical.x-(_e.canonical.x>>Ye<>Ye<>Ye),Gt=y.canonical.y-(_e.canonical.y>>Ye),Jt=e.a6>>Ye;e.c7(Ne,0,Jt,Jt,0,0,1),e.Q(Ne,Ne,[-lt*Jt+Ft*e.a6,-ct*Jt+Gt*e.a6,0])}else{let Ye=y.canonical.z-_e.canonical.z,lt=y.canonical.x-(y.canonical.x>>Ye<>Ye<>Ye)-_e.canonical.x,Gt=(y.canonical.y>>Ye)-_e.canonical.y,Jt=e.a6<_e.maxzoom&&(De=_e.maxzoom),De<_e.minzoom)return;(ie=this._sourceTileCache)[ce=y.key]||(ie[ce]=y.scaledTo(De).key);let Ne=this.findTileInCaches(this._sourceTileCache[y.key]);if(!Ne?.dem&&O)for(;De>=_e.minzoom&&!Ne?.dem;)Ne=this.findTileInCaches(y.scaledTo(De--).key);return Ne}findTileInCaches(y){let O=this.tileManager.getTileByID(y);return O||(O=this.tileManager._outOfViewCache.getByKey(y),O)}anyTilesAfterTime(y=Date.now()){return this._lastTilesetChange>=y}_isWithinTileRanges(y,O){let ie=O[y.canonical.z];return!!ie&&(y.wrap>ie.minWrap||y.wrap=ie.minTileXWrapped&&y.canonical.x<=ie.maxTileXWrapped&&y.canonical.y>=ie.minTileY&&y.canonical.y<=ie.maxTileY)}}class Qe{constructor(y,O,ie){this._meshCache={},this.painter=y,this.tileManager=new je(O),this.options=ie,this.exaggeration=typeof ie.exaggeration=="number"?ie.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null);for(let y in this._meshCache)this._meshCache[y].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(y,O,ie,ce=e.a6){var _e;let De=y.normalizeCoordinates(O,ie,ce);if(!De)return 0;let Ne=this.getTerrainData(De.tileID),Ye=(_e=Ne.tile)===null||_e===void 0?void 0:_e.dem;if(!Ye)return 0;let lt=e.cC([],[De.x/ce*e.a6,De.y/ce*e.a6],Ne.u_terrain_matrix),ct=[lt[0]*Ye.dim,lt[1]*Ye.dim],Ft=Math.floor(ct[0]),Gt=Math.floor(ct[1]),Jt=ct[0]-Ft,it=ct[1]-Gt;return Ye.get(Ft,Gt)*(1-Jt)*(1-it)+Ye.get(Ft+1,Gt)*Jt*(1-it)+Ye.get(Ft,Gt+1)*(1-Jt)*it+Ye.get(Ft+1,Gt+1)*Jt*it}getElevationForLngLatZoom(y,O){if(!e.cD(O,y.wrap()))return 0;let{tileID:ie,mercatorX:ce,mercatorY:_e}=this._getOverscaledTileIDFromLngLatZoom(y,O);return this.getElevation(ie,ce%e.a6,_e%e.a6,e.a6)}getElevationForLngLat(y,O){let ie=Ze(O,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),ce=0;for(let _e of ie)_e.canonical.z>ce&&(ce=Math.min(_e.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(y,ce)}getElevation(y,O,ie,ce=e.a6){return this.getDEMElevation(y,O,ie,ce)*this.exaggeration}getTerrainData(y){var O,ie;if(!this._emptyDemTexture){let De=this.painter.context,Ne=new e.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new e.T(De,Ne,De.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new e.T(De,new e.R({width:1,height:1}),De.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(De.gl.NEAREST,De.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=e.ap([])}let ce=this.tileManager.getSourceTile(y,!0);if(ce?.dem&&(!ce.demTexture||ce.needsTerrainPrepare)){let De=this.painter.context;ce.demTexture=this.painter.getTileTexture(ce.dem.stride),ce.demTexture?ce.demTexture.update(ce.dem.getPixels(),{premultiply:!1}):ce.demTexture=new e.T(De,ce.dem.getPixels(),De.gl.RGBA,{premultiply:!1}),ce.demTexture.bind(De.gl.NEAREST,De.gl.CLAMP_TO_EDGE),ce.needsTerrainPrepare=!1}let _e=ce&&ce.toString()+ce.tileID.key+y.key;if(_e&&!this._demMatrixCache[_e]){let De=this.tileManager.getSource().maxzoom,Ne=y.canonical.z-ce.tileID.canonical.z;y.overscaledZ>y.canonical.z&&(y.canonical.z>=De?Ne=y.canonical.z-De:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Ye=y.canonical.x-(y.canonical.x>>Ne<>Ne<>8<<4|_e>>8,O[De+3]=0;let ie=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(O.buffer)),ce=new e.T(y,ie,y.gl.RGBA,{premultiply:!1});return ce.bind(y.gl.NEAREST,y.gl.CLAMP_TO_EDGE),this._coordsTexture=ce,ce}pointCoordinate(y){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let O=new Uint8Array(4),ie=this.painter.context,ce=ie.gl,_e=Math.round(y.x*this.painter.pixelRatio/devicePixelRatio),De=Math.round(y.y*this.painter.pixelRatio/devicePixelRatio),Ne=Math.round(this.painter.height/devicePixelRatio);ie.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),ce.readPixels(_e,Ne-De-1,1,1,ce.RGBA,ce.UNSIGNED_BYTE,O),ie.bindFramebuffer.set(null);let Ye=O[0]+(O[2]>>4<<8),lt=O[1]+((15&O[2])<<8),ct=this.coordsIndex[255-O[3]],Ft=ct&&this.tileManager.getTileByID(ct);if(!Ft)return null;let Gt=this._coordsTextureSize,Jt=(1<0,ce=ie&&y.canonical.y===0,_e=ie&&y.canonical.y===(1<y.id!==O),this._recentlyUsed.push(y.id)}stampObject(y){y.stamp=++this._stamp}getOrCreateFreeObject(){for(let O of this._recentlyUsed)if(!this._objects[O].inUse)return this._objects[O];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let y=this._createObject(this._objects.length);return this._objects.push(y),y}freeObject(y){y.inUse=!1}freeAllObjects(){for(let y of this._objects)this.freeObject(y)}isFull(){return!(this._objects.length!y.inUse)===!1}}let ut={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class jt{constructor(y,O){this.painter=y,this.terrain=O,this.pool=new tt(y.context,30,O.tileManager.tileSize*O.qualityFactor)}destruct(){this.pool.destruct()}getTexture(y){return this.pool.getObjectForId(y.rtt[this._stacks.length-1].id).texture}prepareForRender(y,O){var ie,ce,_e;this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=y._order.filter(De=>!y._layers[De].isHidden(O)),this._coordsAscending={};for(let De in y.tileManagers){this._coordsAscending[De]={};let Ne=y.tileManagers[De].getVisibleCoordinates(),Ye=y.tileManagers[De].getSource(),lt=Ye instanceof ke?Ye.terrainTileRanges:null;for(let ct of Ne){let Ft=this.terrain.tileManager.getTerrainCoords(ct,lt);for(let Gt in Ft)(_e=this._coordsAscending[De])[Gt]||(_e[Gt]=[]),this._coordsAscending[De][Gt].push(Ft[Gt])}}this._rttFingerprints={};for(let De of y._order){let Ne=y._layers[De],Ye=Ne.source;if(ut[Ne.type]&&!this._rttFingerprints[Ye]){this._rttFingerprints[Ye]={};let lt=(ce=(ie=y.tileManagers[Ye])===null||ie===void 0?void 0:ie.getState().revision)!==null&&ce!==void 0?ce:0;for(let ct in this._coordsAscending[Ye])this._rttFingerprints[Ye][ct]=`${this._coordsAscending[Ye][ct].map(Ft=>Ft.key).sort().join()}#${lt}`}}for(let De of this._renderableTiles)for(let Ne in this._rttFingerprints){let Ye=this._rttFingerprints[Ne][De.tileID.key];Ye&&Ye!==De.rttFingerprint[Ne]&&(De.rtt=[])}}renderLayer(y,O){if(y.isHidden(this.painter.transform.zoom))return!1;let ie=Object.assign(Object.assign({},O),{isRenderingToTexture:!0}),ce=y.type,_e=this.painter,De=this._renderableLayerIds[this._renderableLayerIds.length-1]===y.id;if(ut[ce]&&(this._prevType&&ut[this._prevType]||this._stacks.push([]),this._prevType=ce,this._stacks[this._stacks.length-1].push(y.id),!De))return!0;if(ut[this._prevType]||ut[ce]&&De){this._prevType=ce;let Ne=this._stacks.length-1,Ye=this._stacks[Ne]||[];for(let lt of this._renderableTiles){if(this.pool.isFull()&&(Fu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(lt),lt.rtt[Ne]){let Ft=this.pool.getObjectForId(lt.rtt[Ne].id);if(Ft.stamp===lt.rtt[Ne].stamp){this.pool.useObject(Ft);continue}}let ct=this.pool.getOrCreateFreeObject();this.pool.useObject(ct),this.pool.stampObject(ct),lt.rtt[Ne]={id:ct.id,stamp:ct.stamp},_e.context.bindFramebuffer.set(ct.fbo.framebuffer),_e.context.clear({color:e.bo.transparent,stencil:0}),_e.currentStencilSource=void 0;for(let Ft of Ye){let Gt=_e.style._layers[Ft],Jt=Gt.source?this._coordsAscending[Gt.source][lt.tileID.key]:[lt.tileID];_e.context.viewport.set([0,0,ct.fbo.width,ct.fbo.height]),_e._renderTileClippingMasks(Gt,Jt,!0),_e.renderLayer(_e,_e.style.tileManagers[Gt.source],Gt,Jt,ie),Gt.source&&(lt.rttFingerprint[Gt.source]=this._rttFingerprints[Gt.source][lt.tileID.key])}}return Fu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects(),ut[ce]}return!1}}let St={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Qt=t,gr={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:du,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:e.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},yr=class extends oc{get _ownerWindow(){var de,y;return((y=(de=this._container)===null||de===void 0?void 0:de.ownerDocument)===null||y===void 0?void 0:y.defaultView)||window}constructor(de){var y,O,ie;let ce=Object.assign(Object.assign(Object.assign({},gr),de),{canvasContextAttributes:Object.assign(Object.assign({},gr.canvasContextAttributes),de.canvasContextAttributes)});if(ce.minZoom!=null&&ce.maxZoom!=null&&ce.minZoom>ce.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(ce.minPitch!=null&&ce.maxPitch!=null&&ce.minPitch>ce.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(ce.minPitch!=null&&ce.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(ce.maxPitch!=null&&ce.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let _e=new qo,De=new ns;ce.minZoom!==void 0&&_e.setMinZoom(ce.minZoom),ce.maxZoom!==void 0&&_e.setMaxZoom(ce.maxZoom),ce.minPitch!==void 0&&_e.setMinPitch(ce.minPitch),ce.maxPitch!==void 0&&_e.setMaxPitch(ce.maxPitch),ce.renderWorldCopies!==void 0&&_e.setRenderWorldCopies(ce.renderWorldCopies),ce.transformConstrain!==null&&_e.setConstrainOverride(ce.transformConstrain),super(_e,De,{bearingSnap:ce.bearingSnap,zoomSnap:ce.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new he,this._controls=[],this._mapId=e.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=Ye=>{if(Ye.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let lt of Object.values(this.style._layers))if(lt.type==="custom"&&console.warn(`Custom layer with id '${lt.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),lt._listeners)for(let[ct]of Object.entries(lt._listeners))console.warn(`Custom layer with id '${lt.id}' had event listeners for event '${ct}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new e.n("webglcontextlost",{originalEvent:Ye}))}else this.fire(new e.n("webglcontextlost",{originalEvent:Ye}))},this._contextRestored=Ye=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new e.n("webglcontextrestored",{originalEvent:Ye}))},this._onMapScroll=Ye=>{if(Ye.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=ce.interactive,this._maxTileCacheSize=ce.maxTileCacheSize,this._maxTileCacheZoomLevels=ce.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},ce.canvasContextAttributes),this._trackResize=ce.trackResize===!0,this._bearingSnap=ce.bearingSnap,this._zoomSnap=ce.zoomSnap,this._centerClampedToGround=ce.centerClampedToGround,this._refreshExpiredTiles=ce.refreshExpiredTiles===!0,this._fadeDuration=ce.fadeDuration,this._crossSourceCollisions=ce.crossSourceCollisions===!0,this._collectResourceTiming=ce.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},St),ce.locale),this._clickTolerance=ce.clickTolerance,this._overridePixelRatio=ce.pixelRatio,this._maxCanvasSize=ce.maxCanvasSize,this._zoomLevelsToOverscale=ce.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=ce.transformCameraUpdate,this.transformConstrain=ce.transformConstrain,this.cancelPendingTileRequestsWhileZooming=ce.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(ce.anisotropicFilterPitch),ce.reduceMotion!==void 0&&(s.prefersReducedMotion=ce.reduceMotion),this._imageQueueHandle=p.addThrottleControl(()=>this.isMoving()),this._requestManager=new i(ce.transformRequest),this._container=this._resolveContainer(ce.container),ce.maxBounds&&this.setMaxBounds(ce.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new Bs(this,ce),this._hash=ce.hash?new Oc(typeof ce.hash=="string"&&ce.hash||void 0).addTo(this):void 0,!((y=this._hash)===null||y===void 0)&&y._onHashChange()||(this.jumpTo({center:ce.center,elevation:ce.elevation,zoom:ce.zoom,bearing:ce.bearing,pitch:ce.pitch,roll:ce.roll}),ce.bounds&&(this.resize(),this.fitBounds(ce.bounds,e.e({},ce.fitBoundsOptions,{duration:0}))));let Ne=typeof ce.style=="string"||((ie=(O=ce.style)===null||O===void 0?void 0:O.projection)===null||ie===void 0?void 0:ie.type)!=="globe";this.resize(null,Ne),this._localIdeographFontFamily=ce.localIdeographFontFamily,this._validateStyle=ce.validateStyle,ce.style&&this.setStyle(ce.style,{localIdeographFontFamily:ce.localIdeographFontFamily}),ce.attributionControl&&this.addControl(new hl(typeof ce.attributionControl=="boolean"?void 0:ce.attributionControl)),ce.maplibreLogo&&this.addControl(new Uc,ce.logoPosition),this.on("style.load",()=>{if(Ne||this._resizeTransform(),this.transform.unmodified){let Ye=e.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(Ye)}}),this.on("data",Ye=>{this._update(Ye.dataType==="style"),this.fire(new e.n(`${Ye.dataType}data`,Ye))}),this.on("dataloading",Ye=>{this.fire(new e.n(`${Ye.dataType}dataloading`,Ye))}),this.on("dataabort",Ye=>{this.fire(new e.n("sourcedataabort",Ye))})}_getMapId(){return this._mapId}setGlobalStateProperty(de,y){return this.style.setGlobalStateProperty(de,y),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(de,y){if(y===void 0&&(y=de.getDefaultPosition?de.getDefaultPosition():"top-right"),!de?.onAdd)return this.fire(new e.l(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let O=de.onAdd(this);this._controls.push(de);let ie=this._controlPositions[y];return y.includes("bottom")?ie.insertBefore(O,ie.firstChild):ie.appendChild(O),this}removeControl(de){if(!de?.onRemove)return this.fire(new e.l(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let y=this._controls.indexOf(de);return y>-1&&this._controls.splice(y,1),de.onRemove(this),this}hasControl(de){return this._controls.includes(de)}coveringTiles(de){return Ze(this.transform,de)}calculateCameraOptionsFromTo(de,y,O,ie){return ie==null&&this.terrain&&(ie=this.terrain.getElevationForLngLat(O,this.transform)),super.calculateCameraOptionsFromTo(de,y,O,ie)}resize(de,y=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(y);let O=!this._moving;return O&&(this.stop(),this.fire(new e.n("movestart",de)).fire(new e.n("move",de))),this.fire(new e.n("resize",de)),O&&this.fire(new e.n("moveend",de)),this}_resizeInternal(de=!0){let[y,O]=this._containerDimensions(),ie=this._getClampedPixelRatio(y,O);if(this._resizeCanvas(y,O,ie),this.painter.resize(y,O,ie),this.painter.overLimit()){let ce=this.painter.context.gl;this._maxCanvasSize=[ce.drawingBufferWidth,ce.drawingBufferHeight];let _e=this._getClampedPixelRatio(y,O);this._resizeCanvas(y,O,_e),this.painter.resize(y,O,_e)}this._resizeTransform(de)}_resizeTransform(de=!0){var y;let[O,ie]=this._containerDimensions();this.transform.resize(O,ie,de),(y=this._requestedCameraState)===null||y===void 0||y.resize(O,ie,de)}_getClampedPixelRatio(de,y){let{0:O,1:ie}=this._maxCanvasSize,ce=this.getPixelRatio(),_e=de*ce,De=y*ce;return Math.min(_e>O?O/_e:1,De>ie?ie/De:1)*ce}getPixelRatio(){var de;return(de=this._overridePixelRatio)!==null&&de!==void 0?de:devicePixelRatio}setPixelRatio(de){this._overridePixelRatio=de,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(de){return this.transform.setMaxBounds(q.convert(de)),this._update()}setMinZoom(de){if((de=de??-2)>=-2&&de<=this.transform.maxZoom){let y=this.transform.zoom,O=this._getTransformForUpdate();return O.setMinZoom(de),this._applyUpdatedTransform(O),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(de){if((de=de??22)>=this.transform.minZoom){let y=this.transform.zoom,O=this._getTransformForUpdate();return O.setMaxZoom(de),this._applyUpdatedTransform(O),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(de){if((de=de??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(de>=0&&de<=this.transform.maxPitch){let y=this.transform.pitch,O=this._getTransformForUpdate();return O.setMinPitch(de),this._applyUpdatedTransform(O),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(de){if((de=de??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(de>=this.transform.minPitch){let y=this.transform.pitch,O=this._getTransformForUpdate();return O.setMaxPitch(de),this._applyUpdatedTransform(O),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(de){if((de=de??20)>180)throw new Error("anisotropicFilterPitch must be less than or equal to 180");if(de<0)throw new Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=de,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(de){return this.transform.setRenderWorldCopies(de),this._update()}setTransformConstrain(de){return this.transform.setConstrainOverride(de),this._update()}project(de){return this.transform.locationToScreenPoint(e.W.convert(de),this.style&&this.terrain)}unproject(de){return this.transform.screenPointToLocation(e.P.convert(de),this.terrain)}isMoving(){var de;return this._moving||((de=this.handlers)===null||de===void 0?void 0:de.isMoving())}isZooming(){var de;return this._zooming||((de=this.handlers)===null||de===void 0?void 0:de.isZooming())}isRotating(){var de;return this._rotating||((de=this.handlers)===null||de===void 0?void 0:de.isRotating())}_createDelegatedListener(de,y,O){if(de==="mouseenter"||de==="mouseover"){let ie=!1;return{layers:y,listener:O,delegates:{mousemove:_e=>{let De=y.filter(Ye=>this.getLayer(Ye)),Ne=De.length!==0?this.queryRenderedFeatures(_e.point,{layers:De}):[];Ne.length?ie||(ie=!0,O.call(this,new Ol(de,this,_e.originalEvent,{features:Ne}))):ie=!1},mouseout:()=>{ie=!1}}}}if(de==="mouseleave"||de==="mouseout"){let ie=!1;return{layers:y,listener:O,delegates:{mousemove:De=>{let Ne=y.filter(Ye=>this.getLayer(Ye));(Ne.length!==0?this.queryRenderedFeatures(De.point,{layers:Ne}):[]).length?ie=!0:ie&&(ie=!1,O.call(this,new Ol(de,this,De.originalEvent)))},mouseout:De=>{ie&&(ie=!1,O.call(this,new Ol(de,this,De.originalEvent)))}}}}{let ie=ce=>{let _e=y.filter(Ne=>this.getLayer(Ne)),De=_e.length!==0?this.queryRenderedFeatures(ce.point,{layers:_e}):[];De.length&&(ce.features=De,O.call(this,ce),delete ce.features)};return{layers:y,listener:O,delegates:{[de]:ie}}}}_saveDelegatedListener(de,y){var O;this._delegatedListeners||(this._delegatedListeners={}),(O=this._delegatedListeners)[de]||(O[de]=[]),this._delegatedListeners[de].push(y)}_removeDelegatedListener(de,y,O){var ie;if(!(!((ie=this._delegatedListeners)===null||ie===void 0)&&ie[de]))return;let ce=this._delegatedListeners[de];for(let _e=0;_ey.includes(Ne))){for(let Ne in De.delegates)this.off(Ne,De.delegates[Ne]);return void ce.splice(_e,1)}}}on(de,y,O){if(O===void 0)return super.on(de,y);let ie=typeof y=="string"?[y]:y,ce=this._createDelegatedListener(de,ie,O);this._saveDelegatedListener(de,ce);for(let _e in ce.delegates)this.on(_e,ce.delegates[_e]);return{unsubscribe:()=>{this._removeDelegatedListener(de,ie,O)}}}once(de,y,O){if(O===void 0)return super.once(de,y);let ie=typeof y=="string"?[y]:y,ce=this._createDelegatedListener(de,ie,O);for(let _e in ce.delegates){let De=ce.delegates[_e];ce.delegates[_e]=(...Ne)=>{this._removeDelegatedListener(de,ie,O),De(...Ne)}}this._saveDelegatedListener(de,ce);for(let _e in ce.delegates)this.once(_e,ce.delegates[_e]);return this}off(de,y,O){return O===void 0?super.off(de,y):(this._removeDelegatedListener(de,typeof y=="string"?[y]:y,O),this)}queryRenderedFeatures(de,y){if(!this.style)return[];let O,ie=de instanceof e.P||Array.isArray(de),ce=ie?de:[[0,0],[this.transform.width,this.transform.height]];if(y||(y=(ie?{}:de)||{}),ce instanceof e.P||typeof ce[0]=="number")O=[e.P.convert(ce)];else{let _e=e.P.convert(ce[0]),De=e.P.convert(ce[1]);O=[_e,new e.P(De.x,_e.y),De,new e.P(_e.x,De.y),_e]}return this.style.queryRenderedFeatures(O,y,this.transform)}querySourceFeatures(de,y){return this.style.querySourceFeatures(de,y)}setStyle(de,y){return(y=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},y)).diff!==!1&&y.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&de?(this._diffStyle(de,y),this):(this._localIdeographFontFamily=y.localIdeographFontFamily,this._updateStyle(de,y))}setTransformRequest(de){return this._requestManager.setTransformRequest(de),this}_getUIString(de){let y=this._locale[de];if(y==null)throw new Error(`Missing UI string '${de}'`);return y}_updateStyle(de,y){var O,ie,ce;if((O=this._diffStyleRequest)===null||O===void 0||O.abort(),this._diffStyleRequest=null,y.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(de,y));let _e=this.style&&y.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!de)),de?(this.style=new Uu(this,y||{}),this.style.setEventedParent(this,{style:this.style}),typeof de=="string"?this.style.loadURL(de,y,_e):this.style.loadJSON(de,y,_e),this):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),(ce=(ie=this.style)===null||ie===void 0?void 0:ie.projection)===null||ce===void 0||ce.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Uu(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(de,y){return e._(this,void 0,void 0,function*(){var O;if((O=this._diffStyleRequest)===null||O===void 0||O.abort(),typeof de=="string"){let ie=de;this._diffStyleRequest=new AbortController;let ce=this._diffStyleRequest;try{let _e=yield this._requestManager.transformRequest(ie,"Style");if(ce.signal.aborted)return void(this._diffStyleRequest=null);let De=yield e.k(_e,ce);this._diffStyleRequest=null,this._updateDiff(De.data,y)}catch(_e){this._diffStyleRequest=null,e.$(_e)||this.fire(new e.l(e.d(_e)))}}else typeof de=="object"&&(this._diffStyleRequest=null,this._updateDiff(de,y))})}_updateDiff(de,y){try{this.style.setState(de,y)&&this._update(!0)}catch(O){e.w(`Unable to perform style diff: ${e.d(O).message}. Rebuilding the style from scratch.`),this._updateStyle(de,y)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();e.w("There is no style added to the map.")}addSource(de,y){return this._lazyInitEmptyStyle(),this.style.addSource(de,y),this._update(!0)}isSourceLoaded(de){var y;let O=(y=this.style)===null||y===void 0?void 0:y.tileManagers[de];if(O!==void 0)return O.loaded();this.fire(new e.l(new Error(`There is no tile manager with ID '${de}'`)))}setTerrain(de){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),de){let y=this.style.tileManagers[de.source];if(!y)throw new Error(`cannot load terrain, because there exists no source with ID: ${de.source}`);this.terrain===null&&y.reload();for(let O in this.style._layers){let ie=this.style._layers[O];ie.type==="hillshade"&&ie.source===de.source&&e.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),ie.type==="color-relief"&&ie.source===de.source&&e.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Qe(this.painter,y,de),this.painter.renderToTexture=new jt(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=O=>{var ie;O.dataType==="style"?this.terrain.tileManager.freeRtt():O.dataType==="source"&&O.tile&&(O.sourceId!==de.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((ie=O.source)===null||ie===void 0?void 0:ie.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(O.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new e.n("terrain",{terrain:de})),this}getTerrain(){var de,y;return(y=(de=this.terrain)===null||de===void 0?void 0:de.options)!==null&&y!==void 0?y:null}areTilesLoaded(){var de;let y=(de=this.style)===null||de===void 0?void 0:de.tileManagers;for(let O of Object.values(y))if(!O.areTilesLoaded())return!1;return!0}removeSource(de){return this.style.removeSource(de),this._update(!0)}getSource(de){return this.style.getSource(de)}setSourceTileLodParams(de,y,O){if(O){let ie=this.getSource(O);if(!ie)throw new Error(`There is no source with ID "${O}", cannot set LOD parameters`);ie.calculateTileZoom=Be(Math.max(1,de),Math.max(1,y))}else for(let ie in this.style.tileManagers)this.style.tileManagers[ie].getSource().calculateTileZoom=Be(Math.max(1,de),Math.max(1,y));return this._update(!0),this}refreshTiles(de,y){let O=this.style.tileManagers[de];if(!O)throw new Error(`There is no tile manager with ID "${de}", cannot refresh tile`);y===void 0?O.reload(!0):O.refreshTiles(y.map(ie=>new e.aa(ie.z,ie.x,ie.y)))}addImage(de,y,O={}){let{pixelRatio:ie=1,sdf:ce=!1,stretchX:_e,stretchY:De,content:Ne,textFitWidth:Ye,textFitHeight:lt}=O;if(this._lazyInitEmptyStyle(),!(y instanceof HTMLImageElement||e.b(y))){if(y.width===void 0||y.height===void 0)return this.fire(new e.l(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:ct,height:Ft,data:Gt}=y,Jt=y;return this.style.addImage(de,{data:new e.R({width:ct,height:Ft},new Uint8Array(Gt)),pixelRatio:ie,stretchX:_e,stretchY:De,content:Ne,textFitWidth:Ye,textFitHeight:lt,sdf:ce,version:0,userImage:Jt}),Jt.onAdd&&Jt.onAdd(this,de),this}}{let{width:ct,height:Ft,data:Gt}=s.getImageData(y);this.style.addImage(de,{data:new e.R({width:ct,height:Ft},Gt),pixelRatio:ie,stretchX:_e,stretchY:De,content:Ne,textFitWidth:Ye,textFitHeight:lt,sdf:ce,version:0})}}updateImage(de,y){let O=this.style.getImage(de);if(!O)return this.fire(new e.l(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let ie=y instanceof HTMLImageElement||e.b(y)?s.getImageData(y):y,{width:ce,height:_e,data:De}=ie;if(ce===void 0||_e===void 0)return this.fire(new e.l(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(ce!==O.data.width||_e!==O.data.height)return this.fire(new e.l(new Error("The width and height of the updated image must be that same as the previous version of the image")));let Ne=!(y instanceof HTMLImageElement||e.b(y));return O.data.replace(De,Ne),this.style.updateImage(de,O),this}getImage(de){return this.style.getImage(de)}hasImage(de){return de?!!this.style.getImage(de):(this.fire(new e.l(new Error("Missing required image id"))),!1)}removeImage(de){this.style.removeImage(de)}loadImage(de){return e._(this,void 0,void 0,function*(){return p.getImage(yield this._requestManager.transformRequest(de,"Image"),new AbortController)})}listImages(){return this.style.listImages()}addLayer(de,y){return this._lazyInitEmptyStyle(),this.style.addLayer(de,y),this._update(!0)}moveLayer(de,y){return this.style.moveLayer(de,y),this._update(!0)}removeLayer(de){return this.style.removeLayer(de),this._update(!0)}getLayer(de){return this.style.getLayer(de)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(de,y,O){return this.style.setLayerZoomRange(de,y,O),this._update(!0)}setFilter(de,y,O={}){return this.style.setFilter(de,y,O),this._update(!0)}getFilter(de){return this.style.getFilter(de)}setPaintProperty(de,y,O,ie={}){return this.style.setPaintProperty(de,y,O,ie),this._update(!0)}getPaintProperty(de,y){return this.style.getPaintProperty(de,y)}setLayoutProperty(de,y,O,ie={}){return this.style.setLayoutProperty(de,y,O,ie),this._update(!0)}getLayoutProperty(de,y){return this.style.getLayoutProperty(de,y)}setGlyphs(de,y={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(de,y),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(de,y,O={}){return this._lazyInitEmptyStyle(),this.style.addSprite(de,y,O,ie=>{ie||this._update(!0)}),this}removeSprite(de){return this._lazyInitEmptyStyle(),this.style.removeSprite(de),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(de,y={}){return this._lazyInitEmptyStyle(),this.style.setSprite(de,y,O=>{O||this._update(!0)}),this}setLight(de,y={}){return this._lazyInitEmptyStyle(),this.style.setLight(de,y),this._update(!0)}getLight(){return this.style.getLight()}setSky(de,y={}){return this._lazyInitEmptyStyle(),this.style.setSky(de,y),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(de,y){return this.style.setFeatureState(de,y),this._update()}removeFeatureState(de,y){return this.style.removeFeatureState(de,y),this._update()}getFeatureState(de){return this.style.getFeatureState(de)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let de=0,y=0;return this._container&&(de=this._container.clientWidth||400,y=this._container.clientHeight||300),[de,y]}_setupResizeObserver(){var de;let y=!1,O=ic(ce=>{this._trackResize&&!this._removed&&(this.resize(ce),this.redraw())},50),ie=(de=this._ownerWindow.ResizeObserver)!==null&&de!==void 0?de:ResizeObserver;this._resizeObserver=new ie(ce=>{y?O(ce):y=!0}),this._resizeObserver.observe(this._container)}_resolveContainer(de){if(typeof de=="string"){let y=document.getElementById(de);if(!y)throw new Error(`Container '${de}' not found.`);return y}if(de instanceof HTMLElement||de&&typeof de=="object"&&de.nodeType===1)return de;throw new Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let de=this._container;de.classList.add("maplibregl-map");let y=this._canvasContainer=g.create("div","maplibregl-canvas-container",de);this._interactive&&y.classList.add("maplibregl-interactive"),this._canvas=g.create("canvas","maplibregl-canvas",y),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let O=this._containerDimensions(),ie=this._getClampedPixelRatio(O[0],O[1]);this._resizeCanvas(O[0],O[1],ie);let ce=this._controlContainer=g.create("div","maplibregl-control-container",de),_e=this._controlPositions={};for(let De of["top-left","top-right","bottom-left","bottom-right"])_e[De]=g.create("div",`maplibregl-ctrl-${De} `,ce);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(de,y,O){this._canvas.width=Math.floor(O*de),this._canvas.height=Math.floor(O*y),this._canvas.style.width=`${de}px`,this._canvas.style.height=`${y}px`}_setupPainter(){let de=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),y=null;this._canvas.addEventListener("webglcontextcreationerror",ie=>{y={requestedAttributes:de},ie&&(y.statusMessage=ie.statusMessage,y.type=ie.type)},{once:!0});let O=null;if(O=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,de):this._canvas.getContext("webgl2",de)||this._canvas.getContext("webgl",de),!O){let ie="Failed to initialize WebGL";throw y?(y.message=ie,new Error(JSON.stringify(y))):new Error(ie)}this.painter=new bu(O,this.transform)}migrateProjection(de,y){super.migrateProjection(de,y),this.painter.transform=de,this.fire(new e.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(de){var y;return!((y=this.style)===null||y===void 0)&&y._loaded?(this._styleDirty||(this._styleDirty=de),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(de){return this._update(),this._renderTaskQueue.add(de)}_cancelRenderFrame(de){this._renderTaskQueue.remove(de)}_render(de){var y,O,ie,ce,_e,De;let Ne=this._idleTriggered?this._fadeDuration:0,Ye=((y=this.style.projection)===null||y===void 0?void 0:y.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(de),this._removed)return;let lt=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Gt=this.transform.zoom,Jt=m();this.style.zoomHistory.update(Gt,Jt);let it=new e.J(Gt,{now:Jt,fadeDuration:Ne,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Rt=it.crossFadingFactor();Rt===1&&Rt===this._crossFadingFactor||(lt=!0,this._crossFadingFactor=Rt),this.style.update(it)}let ct=((O=this.style.projection)===null||O===void 0?void 0:O.transitionState)>0!==Ye;(ie=this.style.projection)===null||ie===void 0||ie.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((ce=this.style.projection)===null||ce===void 0?void 0:ce.transitionState,(_e=this.style.projection)===null||_e===void 0?void 0:_e.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||ct)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=(De=this.style)===null||De===void 0?void 0:De._updatePlacement(this.transform,this.showCollisionBoxes,Ne,this._crossSourceCollisions,ct),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:Ne,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new e.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.n("load"))),this.style&&(this.style.hasTransitions()||lt)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Ft=this._sourcesDirty||this._styleDirty||this._placementDirty;return Ft||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.n("idle")),!this._loaded||this._fullyLoaded||Ft||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var de,y;this._hash&&this._hash.remove();for(let ie of this._controls)ie.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),(de=this._diffStyleRequest)===null||de===void 0||de.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),p.removeThrottleControl(this._imageQueueHandle),(y=this._resizeObserver)===null||y===void 0||y.disconnect();let O=this.painter.context.gl.getExtension("WEBGL_lose_context");O?.loseContext&&O.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new e.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,s.frame(this._frameRequest,de=>{this._frameRequest=null;try{this._render(de)}catch(y){if(!e.$(y)&&!function(O){return O.message===ac}(y))throw y}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(de){this._showTileBoundaries!==de&&(this._showTileBoundaries=de,this._update())}get showPadding(){return!!this._showPadding}set showPadding(de){this._showPadding!==de&&(this._showPadding=de,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(de){this._showCollisionBoxes!==de&&(this._showCollisionBoxes=de,de?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(de){this._showOverdrawInspector!==de&&(this._showOverdrawInspector=de,this._update())}get repaint(){return!!this._repaint}set repaint(de){this._repaint!==de&&(this._repaint=de,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(de){this._vertices=de,this._update()}get version(){return Qt}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(de){return this._lazyInitEmptyStyle(),this.style.setProjection(de),this._update(!0)}},Kr={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class $r{constructor(y,O,ie=!1){this.mousedown=_e=>{this.startMove(_e,g.mousePos(this.element,_e)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=_e=>{this.move(_e,g.mousePos(this.element,_e))},this.mouseup=_e=>{this._rotatePitchHandler.dragEnd(_e),this.offTemp()},this.touchstart=_e=>{_e.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=g.touchPos(this.element,_e.targetTouches)[0],this.startMove(_e,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=_e=>{_e.targetTouches.length!==1?this.reset():(this._lastPos=g.touchPos(this.element,_e.targetTouches)[0],this.move(_e,this._lastPos))},this.touchend=_e=>{_e.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=O;let ce=new Ur;this._rotatePitchHandler=new pt({clickTolerance:3,move:(_e,De)=>{let Ne=O.getBoundingClientRect(),Ye=new e.P((Ne.bottom-Ne.top)/2,(Ne.right-Ne.left)/2);return{bearingDelta:e.cx(new e.P(_e.x,De.y),De,Ye),pitchDelta:ie?-.5*(De.y-_e.y):void 0}},moveStateManager:ce,enable:!0,assignEvents:()=>{}}),this.map=y,O.addEventListener("mousedown",this.mousedown),O.addEventListener("touchstart",this.touchstart,{passive:!1}),O.addEventListener("touchcancel",this.reset)}startMove(y,O){this._rotatePitchHandler.dragStart(y,O),g.disableDrag()}move(y,O){let ie=this.map,{bearingDelta:ce,pitchDelta:_e}=this._rotatePitchHandler.dragMove(y,O)||{};ce&&ie.setBearing(ie.getBearing()+ce),_e&&ie.setPitch(ie.getPitch()+_e)}off(){let y=this.element;y.removeEventListener("mousedown",this.mousedown),y.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),y.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){g.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}let bn;function Rn(de,y,O,ie=!1){if(ie||!O.getCoveringTilesDetailsProvider().allowWorldCopies())return de?.wrap();let ce=new e.W(de.lng,de.lat);if(de=new e.W(de.lng,de.lat),y){let _e=new e.W(de.lng-360,de.lat),De=new e.W(de.lng+360,de.lat),Ne=O.locationToScreenPoint(de).distSqr(y);O.locationToScreenPoint(_e).distSqr(y)180;){let _e=O.locationToScreenPoint(de);if(_e.x>=0&&_e.y>=0&&_e.x<=O.width&&_e.y<=O.height)break;de.lng>O.center.lng?de.lng-=360:de.lng+=360}return de.lng!==ce.lng&&O.isPointOnMapSurface(O.locationToScreenPoint(de))?de:ce}let rn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function pn(de,y,O){let ie=de.classList;for(let ce in rn)ie.remove(`maplibregl-${O}-anchor-${ce}`);ie.add(`maplibregl-${O}-anchor-${y}`)}class xn extends e.E{constructor(y){if(super(),this._onClick=O=>{this.fire(new e.n("click",{originalEvent:O}))},this._onKeyPress=O=>{O.code!=="Space"&&O.code!=="Enter"||this.togglePopup()},this._onMapClick=O=>{let ie=O.originalEvent.target,ce=this._element;this._popup&&(ie===ce||ce.contains(ie))&&this.togglePopup()},this._update=O=>{if(!this._map)return;let ie=this._map.loaded()&&!this._map.isMoving();(O?.type==="terrain"||O?.type==="render"&&!ie)&&this._map.once("render",this._update),this._lngLat=Rn(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let ce="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?ce=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(ce=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let _e="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?_e="rotateX(0deg)":this._pitchAlignment==="map"&&(_e=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||O&&O.type!=="moveend"||(this._pos=this._pos.round()),this._element.style.transform=`${rn[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${_e} ${ce}`,s.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity(O?.type==="moveend")}).catch(()=>{})},this._onMove=O=>{if(!this._isDragging){let ie=this._clickTolerance||this._map._clickTolerance;this._isDragging=O.point.dist(this._pointerdownPos)>=ie}this._isDragging&&(this._pos=O.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.n("dragstart"))),this.fire(new e.n("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new e.n("dragend")),this._state="inactive"},this._addDragHandler=O=>{this._element.contains(O.originalEvent.target)&&(O.preventDefault(),this._positionDelta=O.point.sub(this._pos).add(this._offset),this._pointerdownPos=O.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=y?.anchor||"center",this._color=y?.color||"#3FB1CE",this._scale=y?.scale||1,this._draggable=y?.draggable||!1,this._clickTolerance=y?.clickTolerance||0,this._subpixelPositioning=y?.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=y?.rotation||0,this._rotationAlignment=y?.rotationAlignment||"auto",this._pitchAlignment=y?.pitchAlignment&&y.pitchAlignment!=="auto"?y.pitchAlignment:this._rotationAlignment,this.setOpacity(y?.opacity,y?.opacityWhenCovered),y?.element)this._element=y.element,this._offset=e.P.convert(y?.offset||[0,0]);else{this._defaultMarker=!0,this._element=g.create("div");let O=g.createNS("http://www.w3.org/2000/svg","svg"),ie=41,ce=27;O.setAttributeNS(null,"display","block"),O.setAttributeNS(null,"height",`${ie}px`),O.setAttributeNS(null,"width",`${ce}px`),O.setAttributeNS(null,"viewBox",`0 0 ${ce} ${ie}`);let _e=g.createNS("http://www.w3.org/2000/svg","g");_e.setAttributeNS(null,"stroke","none"),_e.setAttributeNS(null,"stroke-width","1"),_e.setAttributeNS(null,"fill","none"),_e.setAttributeNS(null,"fill-rule","evenodd");let De=g.createNS("http://www.w3.org/2000/svg","g");De.setAttributeNS(null,"fill-rule","nonzero");let Ne=g.createNS("http://www.w3.org/2000/svg","g");Ne.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Ne.setAttributeNS(null,"fill","#000000");let Ye=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let or of Ye){let vr=g.createNS("http://www.w3.org/2000/svg","ellipse");vr.setAttributeNS(null,"opacity","0.04"),vr.setAttributeNS(null,"cx","10.5"),vr.setAttributeNS(null,"cy","5.80029008"),vr.setAttributeNS(null,"rx",or.rx),vr.setAttributeNS(null,"ry",or.ry),Ne.appendChild(vr)}let lt=g.createNS("http://www.w3.org/2000/svg","g");lt.setAttributeNS(null,"fill",this._color);let ct=g.createNS("http://www.w3.org/2000/svg","path");ct.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),lt.appendChild(ct);let Ft=g.createNS("http://www.w3.org/2000/svg","g");Ft.setAttributeNS(null,"opacity","0.25"),Ft.setAttributeNS(null,"fill","#000000");let Gt=g.createNS("http://www.w3.org/2000/svg","path");Gt.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ft.appendChild(Gt);let Jt=g.createNS("http://www.w3.org/2000/svg","g");Jt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Jt.setAttributeNS(null,"fill","#FFFFFF");let it=g.createNS("http://www.w3.org/2000/svg","g");it.setAttributeNS(null,"transform","translate(8.0, 8.0)");let Rt=g.createNS("http://www.w3.org/2000/svg","circle");Rt.setAttributeNS(null,"fill","#000000"),Rt.setAttributeNS(null,"opacity","0.25"),Rt.setAttributeNS(null,"cx","5.5"),Rt.setAttributeNS(null,"cy","5.5"),Rt.setAttributeNS(null,"r","5.4999962");let qt=g.createNS("http://www.w3.org/2000/svg","circle");qt.setAttributeNS(null,"fill","#FFFFFF"),qt.setAttributeNS(null,"cx","5.5"),qt.setAttributeNS(null,"cy","5.5"),qt.setAttributeNS(null,"r","5.4999962"),it.appendChild(Rt),it.appendChild(qt),De.appendChild(Ne),De.appendChild(lt),De.appendChild(Ft),De.appendChild(Jt),De.appendChild(it),O.appendChild(De),O.setAttributeNS(null,"height",ie*this._scale+"px"),O.setAttributeNS(null,"width",ce*this._scale+"px"),this._element.appendChild(O),this._offset=e.P.convert(y?.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",O=>{O.preventDefault()}),this._element.addEventListener("mousedown",O=>{O.preventDefault()}),pn(this._element,this._anchor,"marker"),y?.className)for(let O of y.className.split(" "))this._element.classList.add(O);this._popup=null}addTo(y){return this.remove(),this._map=y,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",y._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),y.getCanvasContainer().appendChild(this._element),y.on("move",this._update),y.on("moveend",this._update),y.on("terrain",this._update),y.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(y){return this._lngLat=e.W.convert(y),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(y){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),y){if(!("offset"in y.options)){let ce=Math.abs(13.5)/Math.SQRT2;y.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[ce,-1*(38.1-13.5+ce)],"bottom-right":[-ce,-1*(38.1-13.5+ce)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=y,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(y){return this._subpixelPositioning=y,this}getPopup(){return this._popup}togglePopup(){let y=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:y?(y.isOpen()?y.remove():(y.setLngLat(this._lngLat),y.addTo(this._map)),this):this}_updateOpacity(y=!1){var O,ie;let ce=(O=this._map)===null||O===void 0?void 0:O.terrain,_e=this._map.transform.isLocationOccluded(this._lngLat);if(!ce||_e){let Jt=_e?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==Jt&&(this._element.style.opacity=Jt,this._element.classList.toggle("maplibregl-marker-covered",_e)))}if(y)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let De=this._map,Ne=De.terrain.depthAtPoint(this._pos),Ye=De.terrain.getElevationForLngLat(this._lngLat,De.transform);if(De.transform.lngLatToCameraDepth(this._lngLat,Ye)-Ne<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let lt=-this._offset.y/De.transform.pixelsPerMeter,ct=Math.sin(De.getPitch()*Math.PI/180)*lt,Ft=De.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Gt=De.transform.lngLatToCameraDepth(this._lngLat,Ye+ct)-Ft>.006;!((ie=this._popup)===null||ie===void 0)&&ie.isOpen()&&Gt&&this._popup.remove(),this._element.style.opacity=Gt?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",Gt)}getOffset(){return this._offset}setOffset(y){return this._offset=e.P.convert(y),this._update(),this}addClassName(y){this._element.classList.add(y)}removeClassName(y){this._element.classList.remove(y)}toggleClassName(y){return this._element.classList.toggle(y)}setDraggable(y){return this._draggable=!!y,this._map&&(y?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(y){return this._rotation=y||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(y){return this._rotationAlignment=y||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(y){return this._pitchAlignment=y&&y!=="auto"?y:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(y,O){return(this._opacity===void 0||y===void 0&&O===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),y!==void 0&&(this._opacity=String(y)),O!==void 0&&(this._opacityWhenCovered=String(O)),this._map&&this._updateOpacity(!0),this}}let Bn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Fn=0,mn=!1,Ea={maxWidth:100,unit:"metric"};function Oa(de,y,O){let ie=O?.maxWidth||100,ce=de._container.clientHeight/2,_e=de._container.clientWidth/2,De=de.unproject([_e-ie/2,ce]),Ne=de.unproject([_e+ie/2,ce]),Ye=Math.round(de.project(Ne).x-de.project(De).x),lt=Math.min(ie,Ye,de._container.clientWidth),ct=De.distanceTo(Ne);if(O?.unit==="imperial"){let Ft=3.2808*ct;Ft>5280?Ka(y,lt,Ft/5280,de._getUIString("ScaleControl.Miles")):Ka(y,lt,Ft,de._getUIString("ScaleControl.Feet"))}else O?.unit==="nautical"?Ka(y,lt,ct/1852,de._getUIString("ScaleControl.NauticalMiles")):ct>=1e3?Ka(y,lt,ct/1e3,de._getUIString("ScaleControl.Kilometers")):Ka(y,lt,ct,de._getUIString("ScaleControl.Meters"))}function Ka(de,y,O,ie){let ce=function(_e){let De=Math.pow(10,`${Math.floor(_e)}`.length-1),Ne=_e/De;return Ne=Ne>=10?10:Ne>=5?5:Ne>=3?3:Ne>=2?2:Ne>=1?1:function(Ye){let lt=Math.pow(10,Math.ceil(-Math.log(Ye)/Math.LN10));return Math.round(Ye*lt)/lt}(Ne),De*Ne}(O);de.style.width=y*(ce/O)+"px",de.innerHTML=`${ce} ${ie}`}let di={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},Oi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Pi(de){if(de){if(typeof de=="number"){let y=Math.round(Math.abs(de)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,de),"top-left":new e.P(y,y),"top-right":new e.P(-y,y),bottom:new e.P(0,-de),"bottom-left":new e.P(y,-y),"bottom-right":new e.P(-y,-y),left:new e.P(de,0),right:new e.P(-de,0)}}if(de instanceof e.P||Array.isArray(de)){let y=e.P.convert(de);return{center:y,top:y,"top-left":y,"top-right":y,bottom:y,"bottom-left":y,"bottom-right":y,left:y,right:y}}return{center:e.P.convert(de.center||[0,0]),top:e.P.convert(de.top||[0,0]),"top-left":e.P.convert(de["top-left"]||[0,0]),"top-right":e.P.convert(de["top-right"]||[0,0]),bottom:e.P.convert(de.bottom||[0,0]),"bottom-left":e.P.convert(de["bottom-left"]||[0,0]),"bottom-right":e.P.convert(de["bottom-right"]||[0,0]),left:e.P.convert(de.left||[0,0]),right:e.P.convert(de.right||[0,0])}}return Pi(new e.P(0,0))}let ko=t;l.AJAXError=e.cG,l.EXTENT=e.a6,l.Event=e.n,l.Evented=e.E,l.LngLat=e.W,l.MercatorCoordinate=e.a7,l.Point=e.P,l.addProtocol=e.cH,l.config=e.c,l.removeProtocol=e.cI,l.AttributionControl=hl,l.BoxZoomHandler=Ul,l.CanvasSource=ue,l.CooperativeGesturesHandler=Vi,l.DoubleClickZoomHandler=Es,l.DragPanHandler=Js,l.DragRotateHandler=Tu,l.EdgeInsets=So,l.FullscreenControl=class extends e.E{constructor(de={}){var y;super(),this._onFullscreenChange=()=>{var O;let ie=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;!((O=ie?.shadowRoot)===null||O===void 0)&&O.fullscreenElement;)ie=ie.shadowRoot.fullscreenElement;ie===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(y=de.pseudo)!==null&&y!==void 0&&y,de?.container&&(de.container instanceof HTMLElement?this._container=de.container:e.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(de){return this._map=de,this._container||(this._container=this._map.getContainer()),this._controlContainer=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let de=this._fullscreenButton=g.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);g.create("span","maplibregl-ctrl-icon",de).setAttribute("aria-hidden","true"),de.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let de=this._getTitle();this._fullscreenButton.setAttribute("aria-label",de),this._fullscreenButton.title=de}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new e.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},l.GeoJSONSource=qe,l.GeolocateControl=class extends e.E{constructor(de){super(),this._onSuccess=y=>{if(this._map){if(this._isOutOfMapMaxBounds(y))return this._setErrorState(),this.fire(new e.n("outofmaxbounds",y)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=y,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(y),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(y),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.n("geolocate",y)),this._finish()}},this._updateCamera=y=>{let O=new e.W(y.coords.longitude,y.coords.latitude),ie=y.coords.accuracy,ce=this._map.getBearing(),_e=e.e({bearing:ce},this.options.fitBoundsOptions),De=q.fromLngLat(O,ie);this._map.fitBounds(De,_e,{geolocateSource:!0})},this._updateMarker=y=>{if(y){let O=new e.W(y.coords.longitude,y.coords.latitude);this._accuracyCircleMarker.setLngLat(O).addTo(this._map),this._userLocationDotMarker.setLngLat(O).addTo(this._map),this._accuracy=y.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=y=>{if(this._map){if(y.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let O=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=O,this._geolocateButton.setAttribute("aria-label",O),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(y.code===3&&mn)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.n("error",y)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=y=>{if(!this._map)return;let O=y?.[0]instanceof ResizeObserverEntry;y.geolocateSource||this._watchState!=="ACTIVE_LOCK"||O||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.n("trackuserlocationend")),this.fire(new e.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",y=>{y.preventDefault()}),this._geolocateButton=g.create("button","maplibregl-ctrl-geolocate",this._container),g.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=y=>{if(this._map){if(y===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let O=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=O,this._geolocateButton.setAttribute("aria-label",O)}else{let O=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=O,this._geolocateButton.setAttribute("aria-label",O)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=g.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new xn({element:this._dotElement}),this._circleElement=g.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new xn({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=e.e({},Bn,de)}onAdd(de){return this._map=de,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(y=!1){if(bn!==void 0&&!y)return bn;if(window.navigator.permissions===void 0)return bn=!!window.navigator.geolocation,bn;try{bn=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{bn=!!window.navigator.geolocation}return bn})}().then(y=>this._finishSetupUI(y)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,Fn=0,mn=!1}_isOutOfMapMaxBounds(de){let y=this._map.getMaxBounds(),O=de.coords;return y&&(O.longitudey.getEast()||O.latitudey.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let de=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&de))return;let y=this._map.project(de),O=this._map.unproject([y.x+100,y.y]),ie=de.distanceTo(O)/100,ce=2*this._accuracy/ie;this._circleElement.style.width=`${ce.toFixed(2)}px`,this._circleElement.style.height=`${ce.toFixed(2)}px`}trigger(){if(!this._setup)return e.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Fn--,mn=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new e.n("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.n("trackuserlocationstart")),this.fire(new e.n("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let de;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Fn++,Fn>1?(de={maximumAge:6e5,timeout:0},mn=!0):(de=this.options.positionOptions,mn=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,de)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},l.GlobeControl=class{constructor(){this._toggleProjection=()=>{var de;let y=(de=this._map.getProjection())===null||de===void 0?void 0:de.type;this._map.setProjection(y!=="mercator"&&y?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var de;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((de=this._map.getProjection())===null||de===void 0?void 0:de.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(de){return this._map=de,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=g.create("button","maplibregl-ctrl-globe",this._container),g.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},l.Hash=Oc,l.ImageSource=ke,l.KeyboardHandler=_o,l.LngLatBounds=q,l.LogoControl=Uc,l.Map=yr,l.MapLibreMap=yr,l.MapMouseEvent=Ol,l.MapTouchEvent=Bu,l.MapWheelEvent=nf,l.Marker=xn,l.NavigationControl=class{constructor(de){this._updateZoomButtons=()=>{let y=this._map.getZoom(),O=y===this._map.getMaxZoom(),ie=y===this._map.getMinZoom();this._zoomInButton.disabled=O,this._zoomOutButton.disabled=ie,this._zoomInButton.setAttribute("aria-disabled",O.toString()),this._zoomOutButton.setAttribute("aria-disabled",ie.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(y,O)=>{let ie=this._map._getUIString(`NavigationControl.${O}`);y.title=ie,y.setAttribute("aria-label",ie)},this.options=e.e({},Kr,de),this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",y=>y.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",y=>this._map.zoomIn({},{originalEvent:y})),g.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",y=>this._map.zoomOut({},{originalEvent:y})),g.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",y=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:y}):this._map.resetNorth({},{originalEvent:y})}),this._compassIcon=g.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(de){return this._map=de,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new $r(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(de,y){let O=g.create("button",de,this._container);return O.type="button",O.addEventListener("click",y),O}},l.Popup=class extends e.E{constructor(de){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.n("close"))),this),this._update=y=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=g.create("div","maplibregl-popup",this._map.getContainer()),this._tip=g.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let Ne of this.options.className.split(" "))this._container.classList.add(Ne);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}let O;if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Rn(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),y&&"point"in y&&y.point&&(O=y.point),this._trackPointer&&!O)return;let ie=this._flatPos=this._pos=this._trackPointer&&O?O:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&O?O:this._map.transform.locationToScreenPoint(this._lngLat));let ce=this.options.anchor,_e=Pi(this.options.offset);if(!ce){let Ne=this._container.offsetWidth,Ye=this._container.offsetHeight,lt=function(Ft){var Gt,Jt,it,Rt;return Ft?{top:(Gt=Ft.top)!==null&&Gt!==void 0?Gt:0,right:(Jt=Ft.right)!==null&&Jt!==void 0?Jt:0,bottom:(it=Ft.bottom)!==null&&it!==void 0?it:0,left:(Rt=Ft.left)!==null&&Rt!==void 0?Rt:0}:{top:0,right:0,bottom:0,left:0}}(this.options.padding),ct;ct=ie.y+_e.bottom.ythis._map.transform.height-Ye-lt.bottom?["bottom"]:[],ie.xthis._map.transform.width-Ne/2-lt.right&&ct.push("right"),ce=ct.length===0?"bottom":ct.join("-")}let De=ie.add(_e[ce]);this.options.subpixelPositioning||(De=De.round()),this._container.style.transform=`${rn[ce]} translate(${De.x}px,${De.y}px)`,pn(this._container,ce,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=e.e(Object.create(di),de)}addTo(de){return this._map&&this.remove(),this._map=de,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new e.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(de){return this._lngLat=e.W.convert(de),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(de){return this.setDOMContent(document.createTextNode(de))}setHTML(de){let y=document.createDocumentFragment(),O=document.createElement("body"),ie;for(O.innerHTML=de;ie=O.firstChild,ie;)y.appendChild(ie);return this.setDOMContent(y)}getMaxWidth(){var de;return(de=this._container)===null||de===void 0?void 0:de.style.maxWidth}setMaxWidth(de){return this.options.maxWidth=de,this._update(),this}setDOMContent(de){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=g.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(de),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(de){return this._container&&this._container.classList.add(de),this}removeClassName(de){return this._container&&this._container.classList.remove(de),this}setOffset(de){return this.options.offset=de,this._update(),this}toggleClassName(de){if(this._container)return this._container.classList.toggle(de)}setSubpixelPositioning(de){this.options.subpixelPositioning=de}setPadding(de){this.options.padding=de,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=g.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let de=this._container.querySelector(Oi);de&&de.focus()}},l.RasterDEMTileSource=fe,l.RasterTileSource=ne,l.ScaleControl=class{constructor(de){this._onMove=()=>{Oa(this._map,this._container,this.options)},this.setUnit=y=>{this.options.unit=y,Oa(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Ea),de)}getDefaultPosition(){return"bottom-left"}onAdd(de){return this._map=de,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-scale",de.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},l.ScrollZoomHandler=Po,l.Style=Uu,l.TerrainControl=class{constructor(de){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=de}onAdd(de){return this._map=de,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=g.create("button","maplibregl-ctrl-terrain",this._container),g.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},l.TwoFingersTouchPitchHandler=Yi,l.TwoFingersTouchRotateHandler=Na,l.TwoFingersTouchZoomHandler=Zn,l.TwoFingersTouchZoomRotateHandler=Li,l.VectorTileSource=ee,l.VideoSource=ge,l.addSourceType=(de,y)=>e._(void 0,void 0,void 0,function*(){if(se(de))throw new Error(`A source type called "${de}" already exists.`);((O,ie)=>{ve[O]=ie})(de,y)}),l.clearPrewarmedResources=function(){let de=Z;de&&(de.isPreloaded()&&de.numActive()===1?(de.release(P),Z=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},l.createTileMesh=Is,l.getGlobalDispatcher=oe,l.getMaxParallelImageRequests=function(){return e.c.MAX_PARALLEL_IMAGE_REQUESTS},l.getRTLTextPluginStatus=function(){return Ge().getRTLTextPluginStatus()},l.getVersion=function(){return ko},l.getWorkerCount=function(){return j.workerCount},l.getWorkerUrl=function(){return e.c.WORKER_URL},l.importScriptInWorkers=function(de){return oe().broadcast("IS",de)},l.isTimeFrozen=function(){return c.isFrozen()},l.now=m,l.prewarm=function(){re().acquire(P)},l.restoreNow=function(){c.restoreNow()},l.setMaxParallelImageRequests=function(de){e.c.MAX_PARALLEL_IMAGE_REQUESTS=de},l.setNow=function(de){c.setNow(de)},l.setRTLTextPlugin=function(de,y){return Ge().setRTLTextPlugin(de,y)},l.setWorkerCount=function(de){j.workerCount=de},l.setWorkerUrl=function(de){e.c.WORKER_URL=de}});var k=v;return k})}}),EL=Ee({"src/plots/map/layers.js"(J,V){"use strict";var v=Vr(),x=Fs().sanitizeHTML,E=c5(),k=cv();function l(n,o){this.subplot=n,this.uid=n.uid+"-"+o,this.index=o,this.idSource="source-"+this.uid,this.idLayer=k.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=l.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=t(o)},e.needsNewImage=function(n){var o=this.subplot.map;return o.getSource(this.idSource)&&this.sourceType==="image"&&n.sourcetype==="image"&&(this.source!==n.source||JSON.stringify(this.coordinates)!==JSON.stringify(n.coordinates))},e.needsNewSource=function(n){return this.sourceType!==n.sourcetype||JSON.stringify(this.source)!==JSON.stringify(n.source)||this.layerType!==n.type},e.needsNewLayer=function(n){return this.layerType!==n.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(n){var o=this.subplot.map;o.getSource(this.idSource).updateImage({url:n.source,coordinates:n.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},e.updateSource=function(n){var o=this.subplot.map;if(o.getSource(this.idSource)&&o.removeSource(this.idSource),this.sourceType=n.sourcetype,this.source=n.source,!!t(n)){var s=r(n);o.addSource(this.idSource,s)}},e.findFollowingMapLayerId=function(n){if(n==="traces")for(var o=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function a(n){var o={},s={};switch(n.type){case"circle":v.extendFlat(s,{"circle-radius":n.circle.radius,"circle-color":n.color,"circle-opacity":n.opacity});break;case"line":v.extendFlat(s,{"line-width":n.line.width,"line-color":n.color,"line-opacity":n.opacity,"line-dasharray":n.line.dash});break;case"fill":v.extendFlat(s,{"fill-color":n.color,"fill-outline-color":n.fill.outlinecolor,"fill-opacity":n.opacity});break;case"symbol":var c=n.symbol,m=E(c.textposition,c.iconsize);v.extendFlat(o,{"icon-image":c.icon,"icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":m.anchor,"text-offset":m.offset,"symbol-placement":c.placement}),v.extendFlat(s,{"icon-color":n.color,"text-color":c.textfont.color,"text-opacity":n.opacity});break;case"raster":v.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":n.opacity});break}return{layout:o,paint:s}}function r(n){var o=n.sourcetype,s=n.source,c={type:o},m;return o==="geojson"?m="data":o==="vector"?m=typeof s=="string"?"url":"tiles":o==="raster"?(m="tiles",c.tileSize=256):o==="image"&&(m="url",c.coordinates=n.coordinates),c[m]=s,n.sourceattribution&&(c.attribution=x(n.sourceattribution)),c}V.exports=function(o,s,c){var m=new l(o,s);return m.update(c),m}}}),kL=Ee({"src/plots/map/map.js"(J,V){"use strict";var v=SL(),x=Vr(),E=Md(),k=Ri(),l=uo(),e=qf(),t=$l(),a=Gh(),r=a.drawMode,n=a.selectMode,o=uc().prepSelect,s=uc().clearOutline,c=uc().clearSelectionsCache,m=uc().selectOnClick,h=cv(),p=EL();function g(T,f){this.id=f,this.gd=T;var u=T._fullLayout,A=T._context;this.container=u._glcontainer.node(),this.isStatic=A.staticPlot,this.uid=u._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(u),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var i=g.prototype;i.plot=function(T,f,u){var A=this,b;A.map?b=new Promise(function(z,I){A.updateMap(T,f,z,I)}):b=new Promise(function(z,I){A.createMap(T,f,z,I)}),u.push(b)},i.createMap=function(T,f,u,A){var b=this,z=f[b.id],I=b.styleObj=C(z.style),N=z.bounds,R=N?[[N.west,N.south],[N.east,N.north]]:null;let B={container:b.div,style:I.style,center:_(z.center),zoom:z.zoom,bearing:z.bearing,pitch:z.pitch,maxBounds:R,interactive:!b.isStatic,canvasContextAttributes:{preserveDrawingBuffer:b.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},F=z._fitBounds;F&&(B.bounds=[[F.west,F.south],[F.east,F.north]],B.fitBoundsOptions={padding:h.fitBoundsPadding});let P=b.map=new v.Map(B).addControl(new v.AttributionControl({compact:!0}));var j={};P.on("styleimagemissing",function(Z){var Q=Z.id;if(!j[Q]&&/^[a-zA-Z0-9-]+$/.test(Q)){j[Q]=!0;var re=new Image(15,15);re.onload=function(){P.addImage(Q,re,{sdf:!0})},re.crossOrigin="Anonymous",re.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+Q+".svg"}}),P.setTransformRequest(function(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}}),P._canvas.style.left="0px",P._canvas.style.top="0px",b.rejectOnError(A),b.isStatic||b.initFx(T,f);var U=[];U.push(new Promise(function(Z){P.once("load",Z)})),U=U.concat(E.fetchTraceGeoData(T)),Promise.all(U).then(function(){F&&w(b,z),S(b,z),b.fillBelowLookup(T,f),b.updateData(T),b.updateLayout(f),b.resolveOnRender(u)}).catch(A)},i.updateMap=function(T,f,u,A){var b=this,z=b.map,I=f[this.id];b.rejectOnError(A);var N=[],R=C(I.style);JSON.stringify(b.styleObj)!==JSON.stringify(R)&&(b.styleObj=R,z.setStyle(R.style),b.traceHash={},N.push(new Promise(function(B){z.once("styledata",B)}))),N=N.concat(E.fetchTraceGeoData(T)),Promise.all(N).then(function(){b.fillBelowLookup(T,f),b.updateData(T);let B=I._fitBounds;B&&(z.fitBounds([[B.west,B.south],[B.east,B.north]],{padding:h.fitBoundsPadding,animate:!1}),w(b,I),S(b,I)),b.updateLayout(f),b.resolveOnRender(u)}).catch(A)};function w(T,f){let{center:u,zoom:A}=T.getView();f._input.center=f.center=u,f._input.zoom=f.zoom=A,f._input._fitView={center:Nr({},u),zoom:A}}function S(T,f){let u=T.getView();T.viewInitial={center:x.extendFlat({},u.center),bearing:f.bearing,pitch:f.pitch,zoom:u.zoom}}i.fillBelowLookup=function(T,f){var u=f[this.id],A=u.layers,b,z,I=this.belowLookup={},N=!1;for(b=0;b1)for(b=0;bf.project(A).x,_subplot:f},f.yaxis={_id:"y",c2p:A=>f.project(A).y,_subplot:f},f.updateFramework(T),f.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},l.setConvert(f.mockAxis,T)},i.initFx=function(T,f){var u=this,A=u.gd,b=u.map;b.on("moveend",function(N){if(u.map){var R=A._fullLayout;if(N.originalEvent||u.wheeling){var B=R[u.id];k.call("_storeDirectGUIEdit",A.layout,R._preGUI,u.getViewEdits(B));var F=u.getView();B._input.center=B.center=F.center,B._input.zoom=B.zoom=F.zoom,B._input.bearing=B.bearing=F.bearing,B._input.pitch=B.pitch=F.pitch,A.emit("plotly_relayout",u.getViewEditsWithDerived(F))}N.originalEvent&&N.originalEvent.type==="mouseup"?u.dragging=!1:u.wheeling&&(u.wheeling=!1),R&&R._rehover&&R._rehover()}}),b.on("wheel",function(){u.wheeling=!0}),b.on("mousemove",function(N){var R=u.div.getBoundingClientRect(),B=[N.originalEvent.offsetX,N.originalEvent.offsetY];N.target.getBoundingClientRect=function(){return R},u.xaxis.p2c=function(){return b.unproject(B).lng},u.yaxis.p2c=function(){return b.unproject(B).lat},A._fullLayout._rehover=function(){A._fullLayout._hoversubplot===u.id&&A._fullLayout[u.id]&&t.hover(A,N,u.id)},t.hover(A,N,u.id),A._fullLayout._hoversubplot=u.id});function z(){t.loneUnhover(f._hoverlayer)}b.on("dragstart",function(){u.dragging=!0,z()}),b.on("zoomstart",z),b.on("mouseout",function(){A._fullLayout._hoversubplot=null});function I(){var N=u.getView();A.emit("plotly_relayouting",u.getViewEditsWithDerived(N))}b.on("drag",I),b.on("zoom",I),b.on("dblclick",function(){var N=A._fullLayout[u.id];k.call("_storeDirectGUIEdit",A.layout,A._fullLayout._preGUI,u.getViewEdits(N));var R=u.viewInitial;b.setCenter(_(R.center)),b.setZoom(R.zoom),b.setBearing(R.bearing),b.setPitch(R.pitch);var B=u.getView();N._input.center=N.center=B.center,N._input.zoom=N.zoom=B.zoom,N._input.bearing=N.bearing=B.bearing,N._input.pitch=N.pitch=B.pitch,A.emit("plotly_doubleclick",null),A.emit("plotly_relayout",u.getViewEditsWithDerived(B))}),u.clearOutline=function(){c(u.dragOptions),s(u.dragOptions.gd)},u.onClickInPanFn=function(N){return function(R){var B=A._fullLayout.clickmode;B.indexOf("select")>-1&&m(R.originalEvent,A,[u.xaxis],[u.yaxis],u.id,N),B.indexOf("event")>-1&&t.click(A,R.originalEvent)}}},i.updateFx=function(T){var f=this,u=f.map,A=f.gd;if(f.isStatic)return;function b(R){var B=f.map.unproject(R);return[B.lng,B.lat]}var z=T.dragmode,I;I=function(R,B){if(B.isRect){var F=R.range={};F[f.id]=[b([B.xmin,B.ymin]),b([B.xmax,B.ymax])]}else{var P=R.lassoPoints={};P[f.id]=B.map(b)}};var N=f.dragOptions;f.dragOptions=x.extendDeep(N||{},{dragmode:T.dragmode,element:f.div,gd:A,plotinfo:{id:f.id,domain:T[f.id].domain,xaxis:f.xaxis,yaxis:f.yaxis,fillRangeItems:I},xaxes:[f.xaxis],yaxes:[f.yaxis],subplot:f.id}),u.off("click",f.onClickInPanHandler),n(z)||r(z)?(u.dragPan.disable(),u.on("zoomstart",f.clearOutline),f.dragOptions.prepFn=function(R,B,F){o(R,B,F,f.dragOptions,z)},e.init(f.dragOptions)):(u.dragPan.enable(),u.off("zoomstart",f.clearOutline),f.div.onmousedown=null,f.div.ontouchstart=null,f.div.removeEventListener("touchstart",f.div._ontouchstart),f.onClickInPanHandler=f.onClickInPanFn(f.dragOptions),u.on("click",f.onClickInPanHandler))},i.updateFramework=function(T){var f=T[this.id].domain,u=T._size,A=this.div.style;A.width=u.w*(f.x[1]-f.x[0])+"px",A.height=u.h*(f.y[1]-f.y[0])+"px",A.left=u.l+f.x[0]*u.w+"px",A.top=u.t+(1-f.y[1])*u.h+"px",this.xaxis._offset=u.l+f.x[0]*u.w,this.xaxis._length=u.w*(f.x[1]-f.x[0]),this.yaxis._offset=u.t+(1-f.y[1])*u.h,this.yaxis._length=u.h*(f.y[1]-f.y[0])},i.updateLayers=function(T){var f=T[this.id],u=f.layers,A=this.layerList,b;if(u.length!==A.length){for(b=0;bCL});function CL(J,V){let v=[];for(let t of J){if(t.subplot!==V||t.visible!==!0)continue;if(t.type==="choroplethmap")return null;let{lat:a,lon:r}=t;if(!r||!a)continue;let n=Math.min(r.length,a.length);for(let o=0;of/2){var u=M.split("|").join("
");_.text(u).attr("data-unformatted",u).call(t.convertToTspans,n),T=e.bBox(_.node())}_.attr("transform",v(-3,-T.height+8)),C.insert("rect",".static-attribution").attr({x:-T.width-6,y:-T.height-3,width:T.width+6,height:T.height+3,fill:"rgba(255, 255, 255, 0.75)"});var A=1;T.width+6>f&&(A=f/(T.width+6));var b=[c.l+c.w*p.x[1],c.t+c.h*(1-p.y[0])];C.attr("transform",v(b[0],b[1])+x(A))}},J.updateFx=function(n){for(var o=n._fullLayout,s=o._subplots[r],c=0;c=0;a--)e.removeLayer(t[a][1])},l.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},V.exports=function(t,a){var r=a[0].trace,n=new k(t,r.uid),o=n.sourceId,s=v(a),c=n.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),n._addLayers(s,c),a[0].trace._glTrace=n,n}}}),zL=Ee({"src/traces/choroplethmap/index.js"(J,V){"use strict";V.exports={attributes:d5(),supplyDefaults:RL(),colorbar:Xp(),calc:pw(),plot:FL(),hoverPoints:mw(),eventData:gw(),selectPoints:yw(),styleOnSelect:function(v,x){if(x){var E=x[0].trace;E._glTrace.updateOnSelect(x)}},getBelow:function(v,x){for(var E=x.getMapLayers(),k=E.length-2;k>=0;k--){var l=E[k].id;if(typeof l=="string"&&l.indexOf("water")===0){for(var e=k+1;e0?+p[m]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:S},properties:M})}}var _=k.extractOpts(r),T=_.reversescale?k.flipScale(_.colorscale):_.colorscale,f=T[0][1],u=E.opacity(f)<1?f:E.addOpacity(f,0),A=["interpolate",["linear"],["heatmap-density"],0,u];for(m=1;m=0;t--)l.removeLayer(e[t][1])},k.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},V.exports=function(e,t){var a=t[0].trace,r=new E(e,a.uid),n=r.sourceId,o=v(t),s=r.below=e.belowLookup["trace-"+a.uid];return e.map.addSource(n,{type:"geojson",data:o.geojson}),r._addLayers(o,s),r}}}),qL=Ee({"src/traces/densitymap/hover.js"(J,V){"use strict";var v=uo(),x=Wy().hoverPoints,E=Wy().getExtraText;V.exports=function(l,e,t){var a=x(l,e,t);if(a){var r=a[0],n=r.cd,o=n[0].trace,s=n[r.index];if(delete r.color,"z"in s){var c=r.subplot.mockAxis;r.z=s.z,r.zLabel=v.tickText(c,c.c2l(s.z),"hover").text}return r.extraText=E(o,s,n[0].t.labels),[r]}}}}),VL=Ee({"src/traces/densitymap/event_data.js"(J,V){"use strict";V.exports=function(x,E){return x.lon=E.lon,x.lat=E.lat,x.z=E.z,x}}}),HL=Ee({"src/traces/densitymap/index.js"(J,V){"use strict";V.exports={attributes:p5(),supplyDefaults:NL(),colorbar:Xp(),formatLabels:u5(),calc:OL(),plot:UL(),hoverPoints:qL(),eventData:VL(),getBelow:function(v,x){for(var E=x.getMapLayers(),k=0;kw[z%w.length];i("color",g.label.map((z,I)=>E.addOpacity(S(I),.8))),i("customdata");var M=n.link||{},C=e.newContainer(o,"link");function _(z,I){return v.coerce(M,C,x.link,z,I)}_("label"),_("arrowlen"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",n.hoverinfo),l(M,C,_,h),_("hovertemplate"),_("sort");var T=E.luminosity(c.paper_bgcolor)<.333,f=T?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",u=_("color",f);function A(z){if(!E.isValid(z))return z;let I=E.opacity(z);return I<=.8?E.addOpacity(z,I+.2):T?E.brighten(z,10):E.adjustLightness(z,-10)}_("hovercolor",Array.isArray(u)?u.map(A):A(u)),_("customdata"),t(M,C,{name:"colorscales",handleItemDefaults:a}),k(o,c,m),m("orientation"),m("direction"),m("valueformat"),m("valuesuffix");let b=g.x.length&&g.y.length?"freeform":void 0;m("arrangement",b),v.coerceFont(m,"textfont",c.font,{autoShadowDflt:!0}),o._length=null};function a(r,n){function o(s,c){return v.coerce(r,n,x.link.colorscales,s,c)}o("label"),o("cmin"),o("cmax"),o("colorscale")}}}),g5=Ee({"node_modules/strongly-connected-components/scc.js"(J,V){"use strict";V.exports=v;function v(x){for(var E=x.length,k=new Array(E),l=new Array(E),e=new Array(E),t=new Array(E),a=new Array(E),r=new Array(E),n=0;n0;){i=S[S.length-1];var M=x[i];if(t[i]=0&&r[i].push(a[_])}t[i]=C}else{if(l[i]===k[i]){for(var T=[],f=[],u=0,C=w.length-1;C>=0;--C){var A=w[C];if(e[A]=!1,T.push(A),f.push(r[A]),u+=r[A].length,a[A]=s.length,A===i){w.length=C;break}}s.push(T);for(var b=new Array(u),C=0;C_&&(_=o.source[w]),o.target[w]>_&&(_=o.target[w]);var T=_+1;r.node._count=T;var f,u=r.node.groups,A={};for(w=0;w0&&l(B,T)&&l(F,T)&&!(A.hasOwnProperty(B)&&A.hasOwnProperty(F)&&A[B]===A[F])){A.hasOwnProperty(F)&&(F=A[F]),A.hasOwnProperty(B)&&(B=A[B]),B=+B,F=+F,p[B]=p[F]=!0;var P="";o.label&&o.label[w]&&(P=o.label[w]);var j=null;P&&g.hasOwnProperty(P)&&(j=g[P]),s.push({pointNumber:w,label:P,color:c?o.color[w]:o.color,hovercolor:m?o.hovercolor[w]:o.hovercolor,customdata:h?o.customdata[w]:o.customdata,concentrationscale:j,source:B,target:F,value:+R}),N.source.push(B),N.target.push(F)}}var U=T+u.length,Z=k(n.color),Q=k(n.customdata),re=[];for(w=0;wT-1,childrenNodes:[],pointNumber:w,label:ae,color:Z?n.color[w]:n.color,customdata:Q?n.customdata[w]:n.customdata})}var oe=!1;return a(U,N.source,N.target)&&(oe=!0),{circular:oe,links:s,nodes:re,groups:u,groupLookup:A}}function a(r,n,o){for(var s=x.init2dArray(r,0),c=0;c1})}V.exports=function(n,o){var s=t(o);return E({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),XL=Ee({"node_modules/d3-quadtree/dist/d3-quadtree.js"(J,V){(function(v,x){typeof J=="object"&&typeof V<"u"?x(J):(v=v||self,x(v.d3=v.d3||{}))})(J,function(v){"use strict";function x(T){var f=+this._x.call(null,T),u=+this._y.call(null,T);return E(this.cover(f,u),f,u,T)}function E(T,f,u,A){if(isNaN(f)||isNaN(u))return T;var b,z=T._root,I={data:A},N=T._x0,R=T._y0,B=T._x1,F=T._y1,P,j,U,Z,Q,re,ae,oe;if(!z)return T._root=I,T;for(;z.length;)if((Q=f>=(P=(N+B)/2))?N=P:B=P,(re=u>=(j=(R+F)/2))?R=j:F=j,b=z,!(z=z[ae=re<<1|Q]))return b[ae]=I,T;if(U=+T._x.call(null,z.data),Z=+T._y.call(null,z.data),f===U&&u===Z)return I.next=z,b?b[ae]=I:T._root=I,T;do b=b?b[ae]=new Array(4):T._root=new Array(4),(Q=f>=(P=(N+B)/2))?N=P:B=P,(re=u>=(j=(R+F)/2))?R=j:F=j;while((ae=re<<1|Q)===(oe=(Z>=j)<<1|U>=P));return b[oe]=z,b[ae]=I,T}function k(T){var f,u,A=T.length,b,z,I=new Array(A),N=new Array(A),R=1/0,B=1/0,F=-1/0,P=-1/0;for(u=0;uF&&(F=b),zP&&(P=z));if(R>F||B>P)return this;for(this.cover(R,B).cover(F,P),u=0;uT||T>=b||A>f||f>=z;)switch(B=(fF||(N=Z.y0)>P||(R=Z.x1)=ae)<<1|T>=re)&&(Z=j[j.length-1],j[j.length-1]=j[j.length-1-Q],j[j.length-1-Q]=Z)}else{var oe=T-+this._x.call(null,U.data),H=f-+this._y.call(null,U.data),X=oe*oe+H*H;if(X=(j=(I+R)/2))?I=j:R=j,(Q=P>=(U=(N+B)/2))?N=U:B=U,f=u,!(u=u[re=Q<<1|Z]))return this;if(!u.length)break;(f[re+1&3]||f[re+2&3]||f[re+3&3])&&(A=f,ae=re)}for(;u.data!==T;)if(b=u,!(u=u.next))return this;return(z=u.next)&&delete u.next,b?(z?b.next=z:delete b.next,this):f?(z?f[re]=z:delete f[re],(u=f[0]||f[1]||f[2]||f[3])&&u===(f[3]||f[2]||f[1]||f[0])&&!u.length&&(A?A[ae]=u:this._root=u),this):(this._root=z,this)}function o(T){for(var f=0,u=T.length;f=p.length)return i!=null&&_.sort(i),w!=null?w(_):_;for(var A=-1,b=_.length,z=p[T++],I,N,R=k(),B,F=f();++Ap.length)return _;var f,u=g[T-1];return w!=null&&T>=p.length?f=_.entries():(f=[],_.each(function(A,b){f.push({key:b,values:C(A,T)})})),u!=null?f.sort(function(A,b){return u(A.key,b.key)}):f}return S={object:function(_){return M(_,0,e,t)},map:function(_){return M(_,0,a,r)},entries:function(_){return C(M(_,0,a,r),0)},key:function(_){return p.push(_),S},sortKeys:function(_){return g[p.length-1]=_,S},sortValues:function(_){return i=_,S},rollup:function(_){return w=_,S}}}function e(){return{}}function t(p,g,i){p[g]=i}function a(){return k()}function r(p,g,i){p.set(g,i)}function n(){}var o=k.prototype;n.prototype=s.prototype={constructor:n,has:o.has,add:function(p){return p+="",this[x+p]=p,this},remove:o.remove,clear:o.clear,values:o.keys,size:o.size,empty:o.empty,each:o.each};function s(p,g){var i=new n;if(p instanceof n)p.each(function(M){i.add(M)});else if(p){var w=-1,S=p.length;if(g==null)for(;++w=0&&(o=n.slice(s+1),n=n.slice(0,s)),n&&!r.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}k.prototype=E.prototype={constructor:k,on:function(a,r){var n=this._,o=l(a+"",n),s,c=-1,m=o.length;if(arguments.length<2){for(;++c0)for(var n=new Array(s),o=0,s,c;o=0&&T._call.call(null,f),T=T._next;--x}function i(){r=(a=o.now())+n,x=E=0;try{g()}finally{x=0,S(),r=0}}function w(){var T=o.now(),f=T-a;f>l&&(n-=f,a=T)}function S(){for(var T,f=e,u,A=1/0;f;)f._call?(A>f._time&&(A=f._time),T=f,f=f._next):(u=f._next,f._next=null,f=T?T._next=u:e=u);t=T,M(A)}function M(T){if(!x){E&&(E=clearTimeout(E));var f=T-r;f>24?(T<1/0&&(E=setTimeout(i,T-o.now()-n)),k&&(k=clearInterval(k))):(k||(a=o.now(),k=setInterval(w,l)),x=1,s(i))}}function C(T,f,u){var A=new h;return f=f==null?0:+f,A.restart(function(b){A.stop(),T(b+f)},f,u),A}function _(T,f,u){var A=new h,b=f;return f==null?(A.restart(T,f,u),A):(f=+f,u=u==null?c():+u,A.restart(function z(I){I+=b,A.restart(z,b+=f,u),T(I)},f,u),A)}v.interval=_,v.now=c,v.timeout=C,v.timer=p,v.timerFlush=g,Object.defineProperty(v,"__esModule",{value:!0})})}}),KL=Ee({"node_modules/d3-force/dist/d3-force.js"(J,V){(function(v,x){typeof J=="object"&&typeof V<"u"?x(J,XL(),y5(),$L(),ZL()):x(v.d3=v.d3||{},v.d3,v.d3,v.d3,v.d3)})(J,function(v,x,E,k,l){"use strict";function e(T,f){var u;T==null&&(T=0),f==null&&(f=0);function A(){var b,z=u.length,I,N=0,R=0;for(b=0;bP.index){var ee=j-Y.x-Y.vx,ne=U-Y.y-Y.vy,fe=ee*ee+ne*ne;fe<$*$&&(ee===0&&(ee=a(),fe+=ee*ee),ne===0&&(ne=a(),fe+=ne*ne),fe=($-(fe=Math.sqrt(fe)))/fe*A,P.vx+=(ee*=fe)*($=(q*=q)/(Q+q)),P.vy+=(ne*=fe)*$,Y.vx-=ee*($=1-$),Y.vy-=ne*$)}return}return H>j+$||KU+$||GR.r&&(R.r=R[B].r)}function N(){if(f){var R,B=f.length,F;for(u=new Array(B),R=0;R1?(Q==null?N.remove(Z):N.set(Z,U(Q)),f):N.get(Z)},find:function(Z,Q,re){var ae=0,oe=T.length,H,X,K,G,Y;for(re==null?re=1/0:re*=re,ae=0;ae1?(B.on(Z,Q),f):B.on(Z)}}}function S(){var T,f,u,A=t(-30),b,z=1,I=1/0,N=.81;function R(j){var U,Z=T.length,Q=x.quadtree(T,h,p).visitAfter(F);for(u=j,U=0;U=I)return;(j.data!==f||j.next)&&(re===0&&(re=a(),H+=re*re),ae===0&&(ae=a(),H+=ae*ae),HIt?1:$t>=It?0:NaN}function E($t){let It=$t,ir=$t;$t.length===1&&(It=(ln,nn)=>$t(ln)-nn,ir=k($t));function cr(ln,nn,wn,Un){for(wn==null&&(wn=0),Un==null&&(Un=ln.length);wn>>1;ir(ln[jn],nn)<0?wn=jn+1:Un=jn}return wn}function fr(ln,nn,wn,Un){for(wn==null&&(wn=0),Un==null&&(Un=ln.length);wn>>1;ir(ln[jn],nn)>0?Un=jn:wn=jn+1}return wn}function Ir(ln,nn,wn,Un){wn==null&&(wn=0),Un==null&&(Un=ln.length);let jn=cr(ln,nn,wn,Un-1);return jn>wn&&It(ln[jn-1],nn)>-It(ln[jn],nn)?jn-1:jn}return{left:cr,center:Ir,right:fr}}function k($t){return(It,ir)=>x($t(It),ir)}function l($t){return $t===null?NaN:+$t}function*e($t,It){if(It===void 0)for(let ir of $t)ir!=null&&(ir=+ir)>=ir&&(yield ir);else{let ir=-1;for(let cr of $t)(cr=It(cr,++ir,$t))!=null&&(cr=+cr)>=cr&&(yield cr)}}let t=E(x),a=t.right,r=t.left,n=E(l).center;function o($t,It){let ir=0;if(It===void 0)for(let cr of $t)cr!=null&&(cr=+cr)>=cr&&++ir;else{let cr=-1;for(let fr of $t)(fr=It(fr,++cr,$t))!=null&&(fr=+fr)>=fr&&++ir}return ir}function s($t){return $t.length|0}function c($t){return!($t>0)}function m($t){return typeof $t!="object"||"length"in $t?$t:Array.from($t)}function h($t){return It=>$t(...It)}function p(...$t){let It=typeof $t[$t.length-1]=="function"&&h($t.pop());$t=$t.map(m);let ir=$t.map(s),cr=$t.length-1,fr=new Array(cr+1).fill(0),Ir=[];if(cr<0||ir.some(c))return Ir;for(;;){Ir.push(fr.map((nn,wn)=>$t[wn][nn]));let ln=cr;for(;++fr[ln]===ir[ln];){if(ln===0)return It?Ir.map(It):Ir;fr[ln--]=0}}}function g($t,It){var ir=0,cr=0;return Float64Array.from($t,It===void 0?fr=>ir+=+fr||0:fr=>ir+=+It(fr,cr++,$t)||0)}function i($t,It){return It<$t?-1:It>$t?1:It>=$t?0:NaN}function w($t,It){let ir=0,cr,fr=0,Ir=0;if(It===void 0)for(let ln of $t)ln!=null&&(ln=+ln)>=ln&&(cr=ln-fr,fr+=cr/++ir,Ir+=cr*(ln-fr));else{let ln=-1;for(let nn of $t)(nn=It(nn,++ln,$t))!=null&&(nn=+nn)>=nn&&(cr=nn-fr,fr+=cr/++ir,Ir+=cr*(nn-fr))}if(ir>1)return Ir/(ir-1)}function S($t,It){let ir=w($t,It);return ir&&Math.sqrt(ir)}function M($t,It){let ir,cr;if(It===void 0)for(let fr of $t)fr!=null&&(ir===void 0?fr>=fr&&(ir=cr=fr):(ir>fr&&(ir=fr),cr=Ir&&(ir=cr=Ir):(ir>Ir&&(ir=Ir),cr0){for(ln=It[--ir];ir>0&&(cr=ln,fr=It[--ir],ln=cr+fr,Ir=fr-(ln-cr),!Ir););ir>0&&(Ir<0&&It[ir-1]<0||Ir>0&&It[ir-1]>0)&&(fr=Ir*2,cr=ln+fr,fr==cr-ln&&(ln=cr))}return ln}}function _($t,It){let ir=new C;if(It===void 0)for(let cr of $t)(cr=+cr)&&ir.add(cr);else{let cr=-1;for(let fr of $t)(fr=+It(fr,++cr,$t))&&ir.add(fr)}return+ir}function T($t,It){let ir=new C,cr=-1;return Float64Array.from($t,It===void 0?fr=>ir.add(+fr||0):fr=>ir.add(+It(fr,++cr,$t)||0))}class f extends Map{constructor(It,ir=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:ir}}),It!=null)for(let[cr,fr]of It)this.set(cr,fr)}get(It){return super.get(A(this,It))}has(It){return super.has(A(this,It))}set(It,ir){return super.set(b(this,It),ir)}delete(It){return super.delete(z(this,It))}}class u extends Set{constructor(It,ir=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:ir}}),It!=null)for(let cr of It)this.add(cr)}has(It){return super.has(A(this,It))}add(It){return super.add(b(this,It))}delete(It){return super.delete(z(this,It))}}function A({_intern:$t,_key:It},ir){let cr=It(ir);return $t.has(cr)?$t.get(cr):ir}function b({_intern:$t,_key:It},ir){let cr=It(ir);return $t.has(cr)?$t.get(cr):($t.set(cr,ir),ir)}function z({_intern:$t,_key:It},ir){let cr=It(ir);return $t.has(cr)&&(ir=$t.get(ir),$t.delete(cr)),ir}function I($t){return $t!==null&&typeof $t=="object"?$t.valueOf():$t}function N($t){return $t}function R($t,...It){return Q($t,N,N,It)}function B($t,...It){return Q($t,Array.from,N,It)}function F($t,It,...ir){return Q($t,N,It,ir)}function P($t,It,...ir){return Q($t,Array.from,It,ir)}function j($t,...It){return Q($t,N,Z,It)}function U($t,...It){return Q($t,Array.from,Z,It)}function Z($t){if($t.length!==1)throw new Error("duplicate key");return $t[0]}function Q($t,It,ir,cr){return function fr(Ir,ln){if(ln>=cr.length)return ir(Ir);let nn=new f,wn=cr[ln++],Un=-1;for(let jn of Ir){let Aa=wn(jn,++Un,Ir),ua=nn.get(Aa);ua?ua.push(jn):nn.set(Aa,[jn])}for(let[jn,Aa]of nn)nn.set(jn,fr(Aa,ln));return It(nn)}($t,0)}function re($t,It){return Array.from(It,ir=>$t[ir])}function ae($t,...It){if(typeof $t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");$t=Array.from($t);let[ir=x]=It;if(ir.length===1||It.length>1){let cr=Uint32Array.from($t,(fr,Ir)=>Ir);return It.length>1?(It=It.map(fr=>$t.map(fr)),cr.sort((fr,Ir)=>{for(let ln of It){let nn=x(ln[fr],ln[Ir]);if(nn)return nn}})):(ir=$t.map(ir),cr.sort((fr,Ir)=>x(ir[fr],ir[Ir]))),re($t,cr)}return $t.sort(ir)}function oe($t,It,ir){return(It.length===1?ae(F($t,It,ir),([cr,fr],[Ir,ln])=>x(fr,ln)||x(cr,Ir)):ae(R($t,ir),([cr,fr],[Ir,ln])=>It(fr,ln)||x(cr,Ir))).map(([cr])=>cr)}var H=Array.prototype,X=H.slice;function K($t){return function(){return $t}}var G=Math.sqrt(50),Y=Math.sqrt(10),q=Math.sqrt(2);function $($t,It,ir){var cr,fr=-1,Ir,ln,nn;if(It=+It,$t=+$t,ir=+ir,$t===It&&ir>0)return[$t];if((cr=It<$t)&&(Ir=$t,$t=It,It=Ir),(nn=ee($t,It,ir))===0||!isFinite(nn))return[];if(nn>0){let wn=Math.round($t/nn),Un=Math.round(It/nn);for(wn*nn<$t&&++wn,Un*nn>It&&--Un,ln=new Array(Ir=Un-wn+1);++frIt&&--Un,ln=new Array(Ir=Un-wn+1);++fr=0?(Ir>=G?10:Ir>=Y?5:Ir>=q?2:1)*Math.pow(10,fr):-Math.pow(10,-fr)/(Ir>=G?10:Ir>=Y?5:Ir>=q?2:1)}function ne($t,It,ir){var cr=Math.abs(It-$t)/Math.max(0,ir),fr=Math.pow(10,Math.floor(Math.log(cr)/Math.LN10)),Ir=cr/fr;return Ir>=G?fr*=10:Ir>=Y?fr*=5:Ir>=q&&(fr*=2),It<$t?-fr:fr}function fe($t,It,ir){let cr;for(;;){let fr=ee($t,It,ir);if(fr===cr||fr===0||!isFinite(fr))return[$t,It];fr>0?($t=Math.floor($t/fr)*fr,It=Math.ceil(It/fr)*fr):fr<0&&($t=Math.ceil($t*fr)/fr,It=Math.floor(It*fr)/fr),cr=fr}}function ye($t){return Math.ceil(Math.log(o($t))/Math.LN2)+1}function xe(){var $t=N,It=M,ir=ye;function cr(fr){Array.isArray(fr)||(fr=Array.from(fr));var Ir,ln=fr.length,nn,wn=new Array(ln);for(Ir=0;Ir=Aa)if(ai>=Aa&&It===M){let ci=ee(jn,Aa,Mi);isFinite(ci)&&(ci>0?Aa=(Math.floor(Aa/ci)+1)*ci:ci<0&&(Aa=(Math.ceil(Aa*-ci)+1)/-ci))}else ua.pop()}for(var Qn=ua.length;ua[0]<=jn;)ua.shift(),--Qn;for(;ua[Qn-1]>Aa;)ua.pop(),--Qn;var ei=new Array(Qn+1),Fa;for(Ir=0;Ir<=Qn;++Ir)Fa=ei[Ir]=[],Fa.x0=Ir>0?ua[Ir-1]:jn,Fa.x1=Ir=cr)&&(ir=cr);else{let cr=-1;for(let fr of $t)(fr=It(fr,++cr,$t))!=null&&(ir=fr)&&(ir=fr)}return ir}function Me($t,It){let ir;if(It===void 0)for(let cr of $t)cr!=null&&(ir>cr||ir===void 0&&cr>=cr)&&(ir=cr);else{let cr=-1;for(let fr of $t)(fr=It(fr,++cr,$t))!=null&&(ir>fr||ir===void 0&&fr>=fr)&&(ir=fr)}return ir}function Ie($t,It,ir=0,cr=$t.length-1,fr=x){for(;cr>ir;){if(cr-ir>600){let wn=cr-ir+1,Un=It-ir+1,jn=Math.log(wn),Aa=.5*Math.exp(2*jn/3),ua=.5*Math.sqrt(jn*Aa*(wn-Aa)/wn)*(Un-wn/2<0?-1:1),Qn=Math.max(ir,Math.floor(It-Un*Aa/wn+ua)),ei=Math.min(cr,Math.floor(It+(wn-Un)*Aa/wn+ua));Ie($t,It,Qn,ei,fr)}let Ir=$t[It],ln=ir,nn=cr;for(Ue($t,ir,It),fr($t[cr],Ir)>0&&Ue($t,ir,cr);ln0;)--nn}fr($t[ir],Ir)===0?Ue($t,ir,nn):(++nn,Ue($t,nn,cr)),nn<=It&&(ir=nn+1),It<=nn&&(cr=nn-1)}return $t}function Ue($t,It,ir){let cr=$t[It];$t[It]=$t[ir],$t[ir]=cr}function qe($t,It,ir){if($t=Float64Array.from(e($t,ir)),!!(cr=$t.length)){if((It=+It)<=0||cr<2)return Me($t);if(It>=1)return Ae($t);var cr,fr=(cr-1)*It,Ir=Math.floor(fr),ln=Ae(Ie($t,Ir).subarray(0,Ir+1)),nn=Me($t.subarray(Ir+1));return ln+(nn-ln)*(fr-Ir)}}function ke($t,It,ir=l){if(cr=$t.length){if((It=+It)<=0||cr<2)return+ir($t[0],0,$t);if(It>=1)return+ir($t[cr-1],cr-1,$t);var cr,fr=(cr-1)*It,Ir=Math.floor(fr),ln=+ir($t[Ir],Ir,$t),nn=+ir($t[Ir+1],Ir+1,$t);return ln+(nn-ln)*(fr-Ir)}}function ge($t,It,ir){return Math.ceil((ir-It)/(2*(qe($t,.75)-qe($t,.25))*Math.pow(o($t),-1/3)))}function ue($t,It,ir){return Math.ceil((ir-It)/(3.5*S($t)*Math.pow(o($t),-1/3)))}function ve($t,It){let ir,cr=-1,fr=-1;if(It===void 0)for(let Ir of $t)++fr,Ir!=null&&(ir=Ir)&&(ir=Ir,cr=fr);else for(let Ir of $t)(Ir=It(Ir,++fr,$t))!=null&&(ir=Ir)&&(ir=Ir,cr=fr);return cr}function se($t,It){let ir=0,cr=0;if(It===void 0)for(let fr of $t)fr!=null&&(fr=+fr)>=fr&&(++ir,cr+=fr);else{let fr=-1;for(let Ir of $t)(Ir=It(Ir,++fr,$t))!=null&&(Ir=+Ir)>=Ir&&(++ir,cr+=Ir)}if(ir)return cr/ir}function Te($t,It){return qe($t,.5,It)}function*Fe($t){for(let It of $t)yield*ni(It)}function We($t){return Array.from(Fe($t))}function Ge($t,It){let ir,cr=-1,fr=-1;if(It===void 0)for(let Ir of $t)++fr,Ir!=null&&(ir>Ir||ir===void 0&&Ir>=Ir)&&(ir=Ir,cr=fr);else for(let Ir of $t)(Ir=It(Ir,++fr,$t))!=null&&(ir>Ir||ir===void 0&&Ir>=Ir)&&(ir=Ir,cr=fr);return cr}function gt($t,It=mt){let ir=[],cr,fr=!1;for(let Ir of $t)fr&&ir.push(It(cr,Ir)),cr=Ir,fr=!0;return ir}function mt($t,It){return[$t,It]}function Tt($t,It,ir){$t=+$t,It=+It,ir=(fr=arguments.length)<2?(It=$t,$t=0,1):fr<3?1:+ir;for(var cr=-1,fr=Math.max(0,Math.ceil((It-$t)/ir))|0,Ir=new Array(fr);++cr0:x(ln,ln)===0)&&(ir=Ir,fr=ln,cr=!0)}}else for(let fr of $t)(cr?It(fr,ir)>0:It(fr,fr)===0)&&(ir=fr,cr=!0);return ir}function _r($t,It=x){if(It.length===1)return ve($t,It);let ir,cr=-1,fr=-1;for(let Ir of $t)++fr,(cr<0?It(Ir,Ir)===0:It(Ir,ir)>0)&&(ir=Ir,cr=fr);return cr}function Zt($t,It){let ir=Kt($t,It);return ir<0?void 0:ir}var sr=Ot(Math.random);function Ot($t){return function(ir,cr=0,fr=ir.length){let Ir=fr-(cr=+cr);for(;Ir;){let ln=$t()*Ir--|0,nn=ir[Ir+cr];ir[Ir+cr]=ir[ln+cr],ir[ln+cr]=nn}return ir}}function vt($t,It){let ir=0;if(It===void 0)for(let cr of $t)(cr=+cr)&&(ir+=cr);else{let cr=-1;for(let fr of $t)(fr=+It(fr,++cr,$t))&&(ir+=fr)}return ir}function ht($t){if(!(Ir=$t.length))return[];for(var It=-1,ir=Me($t,Re),cr=new Array(ir);++ItIt(ir,cr,$t))}function Mt($t,It,ir){if(typeof It!="function")throw new TypeError("reducer is not a function");let cr=$t[Symbol.iterator](),fr,Ir,ln=-1;if(arguments.length<3){if({done:fr,value:ir}=cr.next(),fr)return;++ln}for(;{done:fr,value:Ir}=cr.next(),!fr;)ir=It(ir,Ir,++ln,$t);return ir}function dt($t){if(typeof $t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from($t).reverse()}function Dt($t,...It){$t=new Set($t);for(let ir of It)for(let cr of ir)$t.delete(cr);return $t}function Ct($t,It){let ir=It[Symbol.iterator](),cr=new Set;for(let fr of $t){if(cr.has(fr))return!1;let Ir,ln;for(;({value:Ir,done:ln}=ir.next())&&!ln;){if(Object.is(fr,Ir))return!1;cr.add(Ir)}}return!0}function Vt($t){return $t instanceof Set?$t:new Set($t)}function Ht($t,...It){$t=new Set($t),It=It.map(Vt);e:for(let ir of $t)for(let cr of It)if(!cr.has(ir)){$t.delete(ir);continue e}return $t}function Wt($t,It){let ir=$t[Symbol.iterator](),cr=new Set;for(let fr of It){if(cr.has(fr))continue;let Ir,ln;for(;{value:Ir,done:ln}=ir.next();){if(ln)return!1;if(cr.add(Ir),Object.is(fr,Ir))break}}return!0}function Sr($t,It){return Wt(It,$t)}function on(...$t){let It=new Set;for(let ir of $t)for(let cr of ir)It.add(cr);return It}v.Adder=C,v.InternMap=f,v.InternSet=u,v.ascending=x,v.bin=xe,v.bisect=a,v.bisectCenter=n,v.bisectLeft=r,v.bisectRight=a,v.bisector=E,v.count=o,v.cross=p,v.cumsum=g,v.descending=i,v.deviation=S,v.difference=Dt,v.disjoint=Ct,v.every=He,v.extent=M,v.fcumsum=T,v.filter=Ze,v.fsum=_,v.greatest=nr,v.greatestIndex=_r,v.group=R,v.groupSort=oe,v.groups=B,v.histogram=xe,v.index=j,v.indexes=U,v.intersection=Ht,v.least=At,v.leastIndex=Kt,v.map=Je,v.max=Ae,v.maxIndex=ve,v.mean=se,v.median=Te,v.merge=We,v.min=Me,v.minIndex=Ge,v.nice=fe,v.pairs=gt,v.permute=re,v.quantile=qe,v.quantileSorted=ke,v.quickselect=Ie,v.range=Tt,v.reduce=Mt,v.reverse=dt,v.rollup=F,v.rollups=P,v.scan=Zt,v.shuffle=sr,v.shuffler=Ot,v.some=$e,v.sort=ae,v.subset=Sr,v.sum=vt,v.superset=Wt,v.thresholdFreedmanDiaconis=ge,v.thresholdScott=ue,v.thresholdSturges=ye,v.tickIncrement=ee,v.tickStep=ne,v.ticks=$,v.transpose=ht,v.union=on,v.variance=w,v.zip=Be,Object.defineProperty(v,"__esModule",{value:!0})})}}),QL=Ee({"node_modules/d3-path/dist/d3-path.js"(J,V){(function(v,x){typeof J=="object"&&typeof V<"u"?x(J):(v=v||self,x(v.d3=v.d3||{}))})(J,function(v){"use strict";var x=Math.PI,E=2*x,k=1e-6,l=E-k;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function t(){return new e}e.prototype=t.prototype={constructor:e,moveTo:function(a,r){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+r)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(a,r){this._+="L"+(this._x1=+a)+","+(this._y1=+r)},quadraticCurveTo:function(a,r,n,o){this._+="Q"+ +a+","+ +r+","+(this._x1=+n)+","+(this._y1=+o)},bezierCurveTo:function(a,r,n,o,s,c){this._+="C"+ +a+","+ +r+","+ +n+","+ +o+","+(this._x1=+s)+","+(this._y1=+c)},arcTo:function(a,r,n,o,s){a=+a,r=+r,n=+n,o=+o,s=+s;var c=this._x1,m=this._y1,h=n-a,p=o-r,g=c-a,i=m-r,w=g*g+i*i;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=a)+","+(this._y1=r);else if(w>k)if(!(Math.abs(i*h-p*g)>k)||!s)this._+="L"+(this._x1=a)+","+(this._y1=r);else{var S=n-c,M=o-m,C=h*h+p*p,_=S*S+M*M,T=Math.sqrt(C),f=Math.sqrt(w),u=s*Math.tan((x-Math.acos((C+w-_)/(2*T*f)))/2),A=u/f,b=u/T;Math.abs(A-1)>k&&(this._+="L"+(a+A*g)+","+(r+A*i)),this._+="A"+s+","+s+",0,0,"+ +(i*S>g*M)+","+(this._x1=a+b*h)+","+(this._y1=r+b*p)}},arc:function(a,r,n,o,s,c){a=+a,r=+r,n=+n,c=!!c;var m=n*Math.cos(o),h=n*Math.sin(o),p=a+m,g=r+h,i=1^c,w=c?o-s:s-o;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+p+","+g:(Math.abs(this._x1-p)>k||Math.abs(this._y1-g)>k)&&(this._+="L"+p+","+g),n&&(w<0&&(w=w%E+E),w>l?this._+="A"+n+","+n+",0,1,"+i+","+(a-m)+","+(r-h)+"A"+n+","+n+",0,1,"+i+","+(this._x1=p)+","+(this._y1=g):w>k&&(this._+="A"+n+","+n+",0,"+ +(w>=x)+","+i+","+(this._x1=a+n*Math.cos(s))+","+(this._y1=r+n*Math.sin(s))))},rect:function(a,r,n,o){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+r)+"h"+ +n+"v"+ +o+"h"+-n+"Z"},toString:function(){return this._}},v.path=t,Object.defineProperty(v,"__esModule",{value:!0})})}}),_5=Ee({"node_modules/d3-shape/dist/d3-shape.js"(J,V){(function(v,x){typeof J=="object"&&typeof V<"u"?x(J,QL()):(v=v||self,x(v.d3=v.d3||{},v.d3))})(J,function(v,x){"use strict";function E(at){return function(){return at}}var k=Math.abs,l=Math.atan2,e=Math.cos,t=Math.max,a=Math.min,r=Math.sin,n=Math.sqrt,o=1e-12,s=Math.PI,c=s/2,m=2*s;function h(at){return at>1?0:at<-1?s:Math.acos(at)}function p(at){return at>=1?c:at<=-1?-c:Math.asin(at)}function g(at){return at.innerRadius}function i(at){return at.outerRadius}function w(at){return at.startAngle}function S(at){return at.endAngle}function M(at){return at&&at.padAngle}function C(at,kt,Ut,ar,Er,br,Or,Pr){var hn=Ut-at,zn=ar-kt,Pn=Or-Er,Ca=Pr-br,ma=Ca*hn-Pn*zn;if(!(ma*maco*co+Wi*Wi&&(zi=Mo,so=So),{cx:zi,cy:so,x01:-Pn,y01:-Ca,x11:zi*(Er/ti-1),y11:so*(Er/ti-1)}}function T(){var at=g,kt=i,Ut=E(0),ar=null,Er=w,br=S,Or=M,Pr=null;function hn(){var zn,Pn,Ca=+at.apply(this,arguments),ma=+kt.apply(this,arguments),bi=Er.apply(this,arguments)-c,ga=br.apply(this,arguments)-c,eo=k(ga-bi),si=ga>bi;if(Pr||(Pr=zn=x.path()),mao))Pr.moveTo(0,0);else if(eo>m-o)Pr.moveTo(ma*e(bi),ma*r(bi)),Pr.arc(0,0,ma,bi,ga,!si),Ca>o&&(Pr.moveTo(Ca*e(ga),Ca*r(ga)),Pr.arc(0,0,Ca,ga,bi,si));else{var Ao=bi,ro=ga,Sa=bi,Gi=ga,ti=eo,fi=eo,xo=Or.apply(this,arguments)/2,zi=xo>o&&(ar?+ar.apply(this,arguments):n(Ca*Ca+ma*ma)),so=a(k(ma-Ca)/2,+Ut.apply(this,arguments)),Mo=so,So=so,oi,ii;if(zi>o){var co=p(zi/Ca*r(xo)),Wi=p(zi/ma*r(xo));(ti-=co*2)>o?(co*=si?1:-1,Sa+=co,Gi-=co):(ti=0,Sa=Gi=(bi+ga)/2),(fi-=Wi*2)>o?(Wi*=si?1:-1,Ao+=Wi,ro-=Wi):(fi=0,Ao=ro=(bi+ga)/2)}var Ho=ma*e(Ao),Io=ma*r(Ao),qo=Ca*e(Gi),Oo=Ca*r(Gi);if(so>o){var ws=ma*e(ro),Ko=ma*r(ro),ns=Ca*e(Sa),wo=Ca*r(Sa),No;if(eoo?So>o?(oi=_(ns,wo,Ho,Io,ma,So,si),ii=_(ws,Ko,qo,Oo,ma,So,si),Pr.moveTo(oi.cx+oi.x01,oi.cy+oi.y01),Soo)||!(ti>o)?Pr.lineTo(qo,Oo):Mo>o?(oi=_(qo,Oo,ws,Ko,Ca,-Mo,si),ii=_(Ho,Io,ns,wo,Ca,-Mo,si),Pr.lineTo(oi.cx+oi.x01,oi.cy+oi.y01),Mo=ma;--bi)Pr.point(ro[bi],Sa[bi]);Pr.lineEnd(),Pr.areaEnd()}si&&(ro[Ca]=+at(eo,Ca,Pn),Sa[Ca]=+Ut(eo,Ca,Pn),Pr.point(kt?+kt(eo,Ca,Pn):ro[Ca],ar?+ar(eo,Ca,Pn):Sa[Ca]))}if(Ao)return Pr=null,Ao+""||null}function zn(){return z().defined(Er).curve(Or).context(br)}return hn.x=function(Pn){return arguments.length?(at=typeof Pn=="function"?Pn:E(+Pn),kt=null,hn):at},hn.x0=function(Pn){return arguments.length?(at=typeof Pn=="function"?Pn:E(+Pn),hn):at},hn.x1=function(Pn){return arguments.length?(kt=Pn==null?null:typeof Pn=="function"?Pn:E(+Pn),hn):kt},hn.y=function(Pn){return arguments.length?(Ut=typeof Pn=="function"?Pn:E(+Pn),ar=null,hn):Ut},hn.y0=function(Pn){return arguments.length?(Ut=typeof Pn=="function"?Pn:E(+Pn),hn):Ut},hn.y1=function(Pn){return arguments.length?(ar=Pn==null?null:typeof Pn=="function"?Pn:E(+Pn),hn):ar},hn.lineX0=hn.lineY0=function(){return zn().x(at).y(Ut)},hn.lineY1=function(){return zn().x(at).y(ar)},hn.lineX1=function(){return zn().x(kt).y(Ut)},hn.defined=function(Pn){return arguments.length?(Er=typeof Pn=="function"?Pn:E(!!Pn),hn):Er},hn.curve=function(Pn){return arguments.length?(Or=Pn,br!=null&&(Pr=Or(br)),hn):Or},hn.context=function(Pn){return arguments.length?(Pn==null?br=Pr=null:Pr=Or(br=Pn),hn):br},hn}function N(at,kt){return ktat?1:kt>=at?0:NaN}function R(at){return at}function B(){var at=R,kt=N,Ut=null,ar=E(0),Er=E(m),br=E(0);function Or(Pr){var hn,zn=Pr.length,Pn,Ca,ma=0,bi=new Array(zn),ga=new Array(zn),eo=+ar.apply(this,arguments),si=Math.min(m,Math.max(-m,Er.apply(this,arguments)-eo)),Ao,ro=Math.min(Math.abs(si)/zn,br.apply(this,arguments)),Sa=ro*(si<0?-1:1),Gi;for(hn=0;hn0&&(ma+=Gi);for(kt!=null?bi.sort(function(ti,fi){return kt(ga[ti],ga[fi])}):Ut!=null&&bi.sort(function(ti,fi){return Ut(Pr[ti],Pr[fi])}),hn=0,Ca=ma?(si-zn*Sa)/ma:0;hn0?Gi*Ca:0)+Sa,ga[Pn]={data:Pr[Pn],index:hn,value:Gi,startAngle:eo,endAngle:Ao,padAngle:ro};return ga}return Or.value=function(Pr){return arguments.length?(at=typeof Pr=="function"?Pr:E(+Pr),Or):at},Or.sortValues=function(Pr){return arguments.length?(kt=Pr,Ut=null,Or):kt},Or.sort=function(Pr){return arguments.length?(Ut=Pr,kt=null,Or):Ut},Or.startAngle=function(Pr){return arguments.length?(ar=typeof Pr=="function"?Pr:E(+Pr),Or):ar},Or.endAngle=function(Pr){return arguments.length?(Er=typeof Pr=="function"?Pr:E(+Pr),Or):Er},Or.padAngle=function(Pr){return arguments.length?(br=typeof Pr=="function"?Pr:E(+Pr),Or):br},Or}var F=j(u);function P(at){this._curve=at}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(at,kt){this._curve.point(kt*Math.sin(at),kt*-Math.cos(at))}};function j(at){function kt(Ut){return new P(at(Ut))}return kt._curve=at,kt}function U(at){var kt=at.curve;return at.angle=at.x,delete at.x,at.radius=at.y,delete at.y,at.curve=function(Ut){return arguments.length?kt(j(Ut)):kt()._curve},at}function Z(){return U(z().curve(F))}function Q(){var at=I().curve(F),kt=at.curve,Ut=at.lineX0,ar=at.lineX1,Er=at.lineY0,br=at.lineY1;return at.angle=at.x,delete at.x,at.startAngle=at.x0,delete at.x0,at.endAngle=at.x1,delete at.x1,at.radius=at.y,delete at.y,at.innerRadius=at.y0,delete at.y0,at.outerRadius=at.y1,delete at.y1,at.lineStartAngle=function(){return U(Ut())},delete at.lineX0,at.lineEndAngle=function(){return U(ar())},delete at.lineX1,at.lineInnerRadius=function(){return U(Er())},delete at.lineY0,at.lineOuterRadius=function(){return U(br())},delete at.lineY1,at.curve=function(Or){return arguments.length?kt(j(Or)):kt()._curve},at}function re(at,kt){return[(kt=+kt)*Math.cos(at-=Math.PI/2),kt*Math.sin(at)]}var ae=Array.prototype.slice;function oe(at){return at.source}function H(at){return at.target}function X(at){var kt=oe,Ut=H,ar=A,Er=b,br=null;function Or(){var Pr,hn=ae.call(arguments),zn=kt.apply(this,hn),Pn=Ut.apply(this,hn);if(br||(br=Pr=x.path()),at(br,+ar.apply(this,(hn[0]=zn,hn)),+Er.apply(this,hn),+ar.apply(this,(hn[0]=Pn,hn)),+Er.apply(this,hn)),Pr)return br=null,Pr+""||null}return Or.source=function(Pr){return arguments.length?(kt=Pr,Or):kt},Or.target=function(Pr){return arguments.length?(Ut=Pr,Or):Ut},Or.x=function(Pr){return arguments.length?(ar=typeof Pr=="function"?Pr:E(+Pr),Or):ar},Or.y=function(Pr){return arguments.length?(Er=typeof Pr=="function"?Pr:E(+Pr),Or):Er},Or.context=function(Pr){return arguments.length?(br=Pr??null,Or):br},Or}function K(at,kt,Ut,ar,Er){at.moveTo(kt,Ut),at.bezierCurveTo(kt=(kt+ar)/2,Ut,kt,Er,ar,Er)}function G(at,kt,Ut,ar,Er){at.moveTo(kt,Ut),at.bezierCurveTo(kt,Ut=(Ut+Er)/2,ar,Ut,ar,Er)}function Y(at,kt,Ut,ar,Er){var br=re(kt,Ut),Or=re(kt,Ut=(Ut+Er)/2),Pr=re(ar,Ut),hn=re(ar,Er);at.moveTo(br[0],br[1]),at.bezierCurveTo(Or[0],Or[1],Pr[0],Pr[1],hn[0],hn[1])}function q(){return X(K)}function $(){return X(G)}function ee(){var at=X(Y);return at.angle=at.x,delete at.x,at.radius=at.y,delete at.y,at}var ne={draw:function(at,kt){var Ut=Math.sqrt(kt/s);at.moveTo(Ut,0),at.arc(0,0,Ut,0,m)}},fe={draw:function(at,kt){var Ut=Math.sqrt(kt/5)/2;at.moveTo(-3*Ut,-Ut),at.lineTo(-Ut,-Ut),at.lineTo(-Ut,-3*Ut),at.lineTo(Ut,-3*Ut),at.lineTo(Ut,-Ut),at.lineTo(3*Ut,-Ut),at.lineTo(3*Ut,Ut),at.lineTo(Ut,Ut),at.lineTo(Ut,3*Ut),at.lineTo(-Ut,3*Ut),at.lineTo(-Ut,Ut),at.lineTo(-3*Ut,Ut),at.closePath()}},ye=Math.sqrt(1/3),xe=ye*2,Ae={draw:function(at,kt){var Ut=Math.sqrt(kt/xe),ar=Ut*ye;at.moveTo(0,-Ut),at.lineTo(ar,0),at.lineTo(0,Ut),at.lineTo(-ar,0),at.closePath()}},Me=.8908130915292852,Ie=Math.sin(s/10)/Math.sin(7*s/10),Ue=Math.sin(m/10)*Ie,qe=-Math.cos(m/10)*Ie,ke={draw:function(at,kt){var Ut=Math.sqrt(kt*Me),ar=Ue*Ut,Er=qe*Ut;at.moveTo(0,-Ut),at.lineTo(ar,Er);for(var br=1;br<5;++br){var Or=m*br/5,Pr=Math.cos(Or),hn=Math.sin(Or);at.lineTo(hn*Ut,-Pr*Ut),at.lineTo(Pr*ar-hn*Er,hn*ar+Pr*Er)}at.closePath()}},ge={draw:function(at,kt){var Ut=Math.sqrt(kt),ar=-Ut/2;at.rect(ar,ar,Ut,Ut)}},ue=Math.sqrt(3),ve={draw:function(at,kt){var Ut=-Math.sqrt(kt/(ue*3));at.moveTo(0,Ut*2),at.lineTo(-ue*Ut,-Ut),at.lineTo(ue*Ut,-Ut),at.closePath()}},se=-.5,Te=Math.sqrt(3)/2,Fe=1/Math.sqrt(12),We=(Fe/2+1)*3,Ge={draw:function(at,kt){var Ut=Math.sqrt(kt/We),ar=Ut/2,Er=Ut*Fe,br=ar,Or=Ut*Fe+Ut,Pr=-br,hn=Or;at.moveTo(ar,Er),at.lineTo(br,Or),at.lineTo(Pr,hn),at.lineTo(se*ar-Te*Er,Te*ar+se*Er),at.lineTo(se*br-Te*Or,Te*br+se*Or),at.lineTo(se*Pr-Te*hn,Te*Pr+se*hn),at.lineTo(se*ar+Te*Er,se*Er-Te*ar),at.lineTo(se*br+Te*Or,se*Or-Te*br),at.lineTo(se*Pr+Te*hn,se*hn-Te*Pr),at.closePath()}},gt=[ne,fe,Ae,ge,ke,ve,Ge];function mt(){var at=E(ne),kt=E(64),Ut=null;function ar(){var Er;if(Ut||(Ut=Er=x.path()),at.apply(this,arguments).draw(Ut,+kt.apply(this,arguments)),Er)return Ut=null,Er+""||null}return ar.type=function(Er){return arguments.length?(at=typeof Er=="function"?Er:E(Er),ar):at},ar.size=function(Er){return arguments.length?(kt=typeof Er=="function"?Er:E(+Er),ar):kt},ar.context=function(Er){return arguments.length?(Ut=Er??null,ar):Ut},ar}function Tt(){}function At(at,kt,Ut){at._context.bezierCurveTo((2*at._x0+at._x1)/3,(2*at._y0+at._y1)/3,(at._x0+2*at._x1)/3,(at._y0+2*at._y1)/3,(at._x0+4*at._x1+kt)/6,(at._y0+4*at._y1+Ut)/6)}function Kt(at){this._context=at}Kt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:At(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(at,kt){switch(at=+at,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(at,kt):this._context.moveTo(at,kt);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:At(this,at,kt);break}this._x0=this._x1,this._x1=at,this._y0=this._y1,this._y1=kt}};function nr(at){return new Kt(at)}function _r(at){this._context=at}_r.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(at,kt){switch(at=+at,kt=+kt,this._point){case 0:this._point=1,this._x2=at,this._y2=kt;break;case 1:this._point=2,this._x3=at,this._y3=kt;break;case 2:this._point=3,this._x4=at,this._y4=kt,this._context.moveTo((this._x0+4*this._x1+at)/6,(this._y0+4*this._y1+kt)/6);break;default:At(this,at,kt);break}this._x0=this._x1,this._x1=at,this._y0=this._y1,this._y1=kt}};function Zt(at){return new _r(at)}function sr(at){this._context=at}sr.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(at,kt){switch(at=+at,kt=+kt,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+at)/6,ar=(this._y0+4*this._y1+kt)/6;this._line?this._context.lineTo(Ut,ar):this._context.moveTo(Ut,ar);break;case 3:this._point=4;default:At(this,at,kt);break}this._x0=this._x1,this._x1=at,this._y0=this._y1,this._y1=kt}};function Ot(at){return new sr(at)}function vt(at,kt){this._basis=new Kt(at),this._beta=kt}vt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var at=this._x,kt=this._y,Ut=at.length-1;if(Ut>0)for(var ar=at[0],Er=kt[0],br=at[Ut]-ar,Or=kt[Ut]-Er,Pr=-1,hn;++Pr<=Ut;)hn=Pr/Ut,this._basis.point(this._beta*at[Pr]+(1-this._beta)*(ar+hn*br),this._beta*kt[Pr]+(1-this._beta)*(Er+hn*Or));this._x=this._y=null,this._basis.lineEnd()},point:function(at,kt){this._x.push(+at),this._y.push(+kt)}};var ht=function at(kt){function Ut(ar){return kt===1?new Kt(ar):new vt(ar,kt)}return Ut.beta=function(ar){return at(+ar)},Ut}(.85);function Re(at,kt,Ut){at._context.bezierCurveTo(at._x1+at._k*(at._x2-at._x0),at._y1+at._k*(at._y2-at._y0),at._x2+at._k*(at._x1-kt),at._y2+at._k*(at._y1-Ut),at._x2,at._y2)}function Be(at,kt){this._context=at,this._k=(1-kt)/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:Re(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(at,kt){switch(at=+at,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(at,kt):this._context.moveTo(at,kt);break;case 1:this._point=2,this._x1=at,this._y1=kt;break;case 2:this._point=3;default:Re(this,at,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=at,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var He=function at(kt){function Ut(ar){return new Be(ar,kt)}return Ut.tension=function(ar){return at(+ar)},Ut}(0);function $e(at,kt){this._context=at,this._k=(1-kt)/6}$e.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(at,kt){switch(at=+at,kt=+kt,this._point){case 0:this._point=1,this._x3=at,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=at,this._y4=kt);break;case 2:this._point=3,this._x5=at,this._y5=kt;break;default:Re(this,at,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=at,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Ze=function at(kt){function Ut(ar){return new $e(ar,kt)}return Ut.tension=function(ar){return at(+ar)},Ut}(0);function Je(at,kt){this._context=at,this._k=(1-kt)/6}Je.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(at,kt){switch(at=+at,kt=+kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Re(this,at,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=at,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Mt=function at(kt){function Ut(ar){return new Je(ar,kt)}return Ut.tension=function(ar){return at(+ar)},Ut}(0);function dt(at,kt,Ut){var ar=at._x1,Er=at._y1,br=at._x2,Or=at._y2;if(at._l01_a>o){var Pr=2*at._l01_2a+3*at._l01_a*at._l12_a+at._l12_2a,hn=3*at._l01_a*(at._l01_a+at._l12_a);ar=(ar*Pr-at._x0*at._l12_2a+at._x2*at._l01_2a)/hn,Er=(Er*Pr-at._y0*at._l12_2a+at._y2*at._l01_2a)/hn}if(at._l23_a>o){var zn=2*at._l23_2a+3*at._l23_a*at._l12_a+at._l12_2a,Pn=3*at._l23_a*(at._l23_a+at._l12_a);br=(br*zn+at._x1*at._l23_2a-kt*at._l12_2a)/Pn,Or=(Or*zn+at._y1*at._l23_2a-Ut*at._l12_2a)/Pn}at._context.bezierCurveTo(ar,Er,br,Or,at._x2,at._y2)}function Dt(at,kt){this._context=at,this._alpha=kt}Dt.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(at,kt){if(at=+at,kt=+kt,this._point){var Ut=this._x2-at,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Ut*Ut+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(at,kt):this._context.moveTo(at,kt);break;case 1:this._point=2;break;case 2:this._point=3;default:dt(this,at,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=at,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Ct=function at(kt){function Ut(ar){return kt?new Dt(ar,kt):new Be(ar,0)}return Ut.alpha=function(ar){return at(+ar)},Ut}(.5);function Vt(at,kt){this._context=at,this._alpha=kt}Vt.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(at,kt){if(at=+at,kt=+kt,this._point){var Ut=this._x2-at,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Ut*Ut+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=at,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=at,this._y4=kt);break;case 2:this._point=3,this._x5=at,this._y5=kt;break;default:dt(this,at,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=at,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Ht=function at(kt){function Ut(ar){return kt?new Vt(ar,kt):new $e(ar,0)}return Ut.alpha=function(ar){return at(+ar)},Ut}(.5);function Wt(at,kt){this._context=at,this._alpha=kt}Wt.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(at,kt){if(at=+at,kt=+kt,this._point){var Ut=this._x2-at,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Ut*Ut+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:dt(this,at,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=at,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Sr=function at(kt){function Ut(ar){return kt?new Wt(ar,kt):new Je(ar,0)}return Ut.alpha=function(ar){return at(+ar)},Ut}(.5);function on(at){this._context=at}on.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(at,kt){at=+at,kt=+kt,this._point?this._context.lineTo(at,kt):(this._point=1,this._context.moveTo(at,kt))}};function $t(at){return new on(at)}function It(at){return at<0?-1:1}function ir(at,kt,Ut){var ar=at._x1-at._x0,Er=kt-at._x1,br=(at._y1-at._y0)/(ar||Er<0&&-0),Or=(Ut-at._y1)/(Er||ar<0&&-0),Pr=(br*Er+Or*ar)/(ar+Er);return(It(br)+It(Or))*Math.min(Math.abs(br),Math.abs(Or),.5*Math.abs(Pr))||0}function cr(at,kt){var Ut=at._x1-at._x0;return Ut?(3*(at._y1-at._y0)/Ut-kt)/2:kt}function fr(at,kt,Ut){var ar=at._x0,Er=at._y0,br=at._x1,Or=at._y1,Pr=(br-ar)/3;at._context.bezierCurveTo(ar+Pr,Er+Pr*kt,br-Pr,Or-Pr*Ut,br,Or)}function Ir(at){this._context=at}Ir.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:fr(this,this._t0,cr(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(at,kt){var Ut=NaN;if(at=+at,kt=+kt,!(at===this._x1&&kt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(at,kt):this._context.moveTo(at,kt);break;case 1:this._point=2;break;case 2:this._point=3,fr(this,cr(this,Ut=ir(this,at,kt)),Ut);break;default:fr(this,this._t0,Ut=ir(this,at,kt));break}this._x0=this._x1,this._x1=at,this._y0=this._y1,this._y1=kt,this._t0=Ut}}};function ln(at){this._context=new nn(at)}(ln.prototype=Object.create(Ir.prototype)).point=function(at,kt){Ir.prototype.point.call(this,kt,at)};function nn(at){this._context=at}nn.prototype={moveTo:function(at,kt){this._context.moveTo(kt,at)},closePath:function(){this._context.closePath()},lineTo:function(at,kt){this._context.lineTo(kt,at)},bezierCurveTo:function(at,kt,Ut,ar,Er,br){this._context.bezierCurveTo(kt,at,ar,Ut,br,Er)}};function wn(at){return new Ir(at)}function Un(at){return new ln(at)}function jn(at){this._context=at}jn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var at=this._x,kt=this._y,Ut=at.length;if(Ut)if(this._line?this._context.lineTo(at[0],kt[0]):this._context.moveTo(at[0],kt[0]),Ut===2)this._context.lineTo(at[1],kt[1]);else for(var ar=Aa(at),Er=Aa(kt),br=0,Or=1;Or=0;--kt)Er[kt]=(Or[kt]-Er[kt+1])/br[kt];for(br[Ut-1]=(at[Ut]+Er[Ut-1])/2,kt=0;kt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(at,kt){switch(at=+at,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(at,kt):this._context.moveTo(at,kt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,kt),this._context.lineTo(at,kt);else{var Ut=this._x*(1-this._t)+at*this._t;this._context.lineTo(Ut,this._y),this._context.lineTo(Ut,kt)}break}}this._x=at,this._y=kt}};function ei(at){return new Qn(at,.5)}function Fa(at){return new Qn(at,0)}function ai(at){return new Qn(at,1)}function Mi(at,kt){if((Or=at.length)>1)for(var Ut=1,ar,Er,br=at[kt[0]],Or,Pr=br.length;Ut=0;)Ut[kt]=kt;return Ut}function ba(at,kt){return at[kt]}function pa(){var at=E([]),kt=ci,Ut=Mi,ar=ba;function Er(br){var Or=at.apply(this,arguments),Pr,hn=br.length,zn=Or.length,Pn=new Array(zn),Ca;for(Pr=0;Pr0){for(var Ut,ar,Er=0,br=at[0].length,Or;Er0)for(var Ut,ar=0,Er,br,Or,Pr,hn,zn=at[kt[0]].length;ar0?(Er[0]=Or,Er[1]=Or+=br):br<0?(Er[1]=Pr,Er[0]=Pr+=br):(Er[0]=0,Er[1]=br)}function da(at,kt){if((Er=at.length)>0){for(var Ut=0,ar=at[kt[0]],Er,br=ar.length;Ut0)||!((br=(Er=at[kt[0]]).length)>0))){for(var Ut=0,ar=1,Er,br,Or;arbr&&(br=Er,Ut=kt);return Ut}function hr(at){var kt=at.map(ur);return ci(at).sort(function(Ut,ar){return kt[Ut]-kt[ar]})}function ur(at){for(var kt=0,Ut=-1,ar=at.length,Er;++Ut[I(Ue,qe,Ae),Ue]));for(let[Ue,qe]of Me.entries()){qe.index=Ue;let{source:ke,target:ge}=qe;typeof ke!="object"&&(ke=qe.source=g(Ie,ke)),typeof ge!="object"&&(ge=qe.target=g(Ie,ge)),ke.sourceLinks.push(qe),ge.targetLinks.push(qe)}if(B!=null)for(let{sourceLinks:Ue,targetLinks:qe}of Ae)Ue.sort(B),qe.sort(B)}function re({nodes:Ae}){for(let Me of Ae)Me.value=Me.fixedValue===void 0?Math.max(x.sum(Me.sourceLinks,c),x.sum(Me.targetLinks,c)):Me.fixedValue}function ae({nodes:Ae}){let Me=Ae.length,Ie=new Set(Ae),Ue=new Set,qe=0;for(;Ie.size;){for(let ke of Ie){ke.depth=qe;for(let{target:ge}of ke.sourceLinks)Ue.add(ge)}if(++qe>Me)throw new Error("circular link");Ie=Ue,Ue=new Set}}function oe({nodes:Ae}){let Me=Ae.length,Ie=new Set(Ae),Ue=new Set,qe=0;for(;Ie.size;){for(let ke of Ie){ke.height=qe;for(let{source:ge}of ke.targetLinks)Ue.add(ge)}if(++qe>Me)throw new Error("circular link");Ie=Ue,Ue=new Set}}function H({nodes:Ae}){let Me=x.max(Ae,qe=>qe.depth)+1,Ie=(f-_-A)/(Me-1),Ue=new Array(Me);for(let qe of Ae){let ke=Math.max(0,Math.min(Me-1,Math.floor(N.call(null,qe,Me))));qe.layer=ke,qe.x0=_+ke*Ie,qe.x1=qe.x0+A,Ue[ke]?Ue[ke].push(qe):Ue[ke]=[qe]}if(R)for(let qe of Ue)qe.sort(R);return Ue}function X(Ae){let Me=x.min(Ae,Ie=>(u-T-(Ie.length-1)*z)/x.sum(Ie,c));for(let Ie of Ae){let Ue=T;for(let qe of Ie){qe.y0=Ue,qe.y1=Ue+qe.value*Me,Ue=qe.y1+z;for(let ke of qe.sourceLinks)ke.width=ke.value*Me}Ue=(u-Ue+z)/(Ie.length+1);for(let qe=0;qeIe.length)-1)),X(Me);for(let Ie=0;Ie0))continue;let se=(ue/ve-ge.y0)*Me;ge.y0+=se,ge.y1+=se,ne(ge)}R===void 0&&ke.sort(s),q(ke,Ie)}}function Y(Ae,Me,Ie){for(let Ue=Ae.length,qe=Ue-2;qe>=0;--qe){let ke=Ae[qe];for(let ge of ke){let ue=0,ve=0;for(let{target:Te,value:Fe}of ge.sourceLinks){let We=Fe*(Te.layer-ge.layer);ue+=xe(ge,Te)*We,ve+=We}if(!(ve>0))continue;let se=(ue/ve-ge.y0)*Me;ge.y0+=se,ge.y1+=se,ne(ge)}R===void 0&&ke.sort(s),q(ke,Ie)}}function q(Ae,Me){let Ie=Ae.length>>1,Ue=Ae[Ie];ee(Ae,Ue.y0-z,Ie-1,Me),$(Ae,Ue.y1+z,Ie+1,Me),ee(Ae,u,Ae.length-1,Me),$(Ae,T,0,Me)}function $(Ae,Me,Ie,Ue){for(;Ie1e-6&&(qe.y0+=ke,qe.y1+=ke),Me=qe.y1+z}}function ee(Ae,Me,Ie,Ue){for(;Ie>=0;--Ie){let qe=Ae[Ie],ke=(qe.y1-Me)*Ue;ke>1e-6&&(qe.y0-=ke,qe.y1-=ke),Me=qe.y0-z}}function ne({sourceLinks:Ae,targetLinks:Me}){if(B===void 0){for(let{source:{sourceLinks:Ie}}of Me)Ie.sort(o);for(let{target:{targetLinks:Ie}}of Ae)Ie.sort(n)}}function fe(Ae){if(B===void 0)for(let{sourceLinks:Me,targetLinks:Ie}of Ae)Me.sort(o),Ie.sort(n)}function ye(Ae,Me){let Ie=Ae.y0-(Ae.sourceLinks.length-1)*z/2;for(let{target:Ue,width:qe}of Ae.sourceLinks){if(Ue===Me)break;Ie+=qe+z}for(let{source:Ue,width:qe}of Me.targetLinks){if(Ue===Ae)break;Ie-=qe}return Ie}function xe(Ae,Me){let Ie=Me.y0-(Me.targetLinks.length-1)*z/2;for(let{source:Ue,width:qe}of Me.targetLinks){if(Ue===Ae)break;Ie+=qe+z}for(let{target:Ue,width:qe}of Ae.sourceLinks){if(Ue===Me)break;Ie-=qe}return Ie}return Z}function S(_){return[_.source.x1,_.y0]}function M(_){return[_.target.x0,_.y1]}function C(){return E.linkHorizontal().source(S).target(M)}v.sankey=w,v.sankeyCenter=a,v.sankeyJustify=t,v.sankeyLeft=l,v.sankeyLinkHorizontal=C,v.sankeyRight=e,Object.defineProperty(v,"__esModule",{value:!0})})}}),tP=Ee({"node_modules/@plotly/d3-sankey-circular/node_modules/d3-array/dist/d3-array.js"(J,V){(function(v,x){x(typeof J=="object"&&typeof V<"u"?J:v.d3=v.d3||{})})(J,function(v){"use strict";function x(K,G){return KG?1:K>=G?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(G,Y,q,$){for(q==null&&(q=0),$==null&&($=G.length);q<$;){var ee=q+$>>>1;K(G[ee],Y)<0?q=ee+1:$=ee}return q},right:function(G,Y,q,$){for(q==null&&(q=0),$==null&&($=G.length);q<$;){var ee=q+$>>>1;K(G[ee],Y)>0?$=ee:q=ee+1}return q}}}function k(K){return function(G,Y){return x(K(G),Y)}}var l=E(x),e=l.right,t=l.left;function a(K,G){G==null&&(G=r);for(var Y=0,q=K.length-1,$=K[0],ee=new Array(q<0?0:q);YK?1:G>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,G){var Y=K.length,q=0,$=-1,ee=0,ne,fe,ye=0;if(G==null)for(;++$1)return ye/(q-1)}function m(K,G){var Y=c(K,G);return Y&&Math.sqrt(Y)}function h(K,G){var Y=K.length,q=-1,$,ee,ne;if(G==null){for(;++q=$)for(ee=ne=$;++q$&&(ee=$),ne<$&&(ne=$))}else for(;++q=$)for(ee=ne=$;++q$&&(ee=$),ne<$&&(ne=$));return[ee,ne]}var p=Array.prototype,g=p.slice,i=p.map;function w(K){return function(){return K}}function S(K){return K}function M(K,G,Y){K=+K,G=+G,Y=($=arguments.length)<2?(G=K,K=0,1):$<3?1:+Y;for(var q=-1,$=Math.max(0,Math.ceil((G-K)/Y))|0,ee=new Array($);++q<$;)ee[q]=K+q*Y;return ee}var C=Math.sqrt(50),_=Math.sqrt(10),T=Math.sqrt(2);function f(K,G,Y){var q,$=-1,ee,ne,fe;if(G=+G,K=+K,Y=+Y,K===G&&Y>0)return[K];if((q=G0)for(K=Math.ceil(K/fe),G=Math.floor(G/fe),ne=new Array(ee=Math.ceil(G-K+1));++$=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,$):-Math.pow(10,-$)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,G,Y){var q=Math.abs(G-K)/Math.max(0,Y),$=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/$;return ee>=C?$*=10:ee>=_?$*=5:ee>=T&&($*=2),GMe;)Ie.pop(),--Ue;var qe=new Array(Ue+1),ke;for(ee=0;ee<=Ue;++ee)ke=qe[ee]=[],ke.x0=ee>0?Ie[ee-1]:Ae,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,$=(q-1)*G,ee=Math.floor($),ne=+Y(K[ee],ee,K),fe=+Y(K[ee+1],ee+1,K);return ne+(fe-ne)*($-ee)}}function N(K,G,Y){return K=i.call(K,s).sort(x),Math.ceil((Y-G)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function R(K,G,Y){return Math.ceil((Y-G)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,G){var Y=K.length,q=-1,$,ee;if(G==null){for(;++q=$)for(ee=$;++qee&&(ee=$)}else for(;++q=$)for(ee=$;++qee&&(ee=$);return ee}function F(K,G){var Y=K.length,q=Y,$=-1,ee,ne=0;if(G==null)for(;++$=0;)for(ne=K[G],Y=ne.length;--Y>=0;)ee[--$]=ne[Y];return ee}function U(K,G){var Y=K.length,q=-1,$,ee;if(G==null){for(;++q=$)for(ee=$;++q$&&(ee=$)}else for(;++q=$)for(ee=$;++q$&&(ee=$);return ee}function Z(K,G){for(var Y=G.length,q=new Array(Y);Y--;)q[Y]=K[G[Y]];return q}function Q(K,G){if(Y=K.length){var Y,q=0,$=0,ee,ne=K[$];for(G==null&&(G=x);++q=M})}function h(M){m(M);for(var C=E,_=v(C),T=_.components.filter(function(N){return N.length>1}),f=1/0,u,A=0;A"u"?"undefined":s(Be))!=="object"&&(Be=ht.source=_(vt,Be)),(typeof He>"u"?"undefined":s(He))!=="object"&&(He=ht.target=_(vt,He)),Be.sourceLinks.push(ht),He.targetLinks.push(ht)}),Ot}function At(Ot){Ot.nodes.forEach(function(vt){vt.partOfCycle=!1,vt.value=Math.max(x.sum(vt.sourceLinks,p),x.sum(vt.targetLinks,p)),vt.sourceLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)}),vt.targetLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)})})}function Kt(Ot){var vt=0,ht=0,Re=0,Be=0,He=x.max(Ot.nodes,function($e){return $e.column});return Ot.links.forEach(function($e){$e.circular&&($e.circularLinkType=="top"?vt=vt+$e.width:ht=ht+$e.width,$e.target.column==0&&(Be=Be+$e.width),$e.source.column==He&&(Re=Re+$e.width))}),vt=vt>0?vt+f+u:vt,ht=ht>0?ht+f+u:ht,Re=Re>0?Re+f+u:Re,Be=Be>0?Be+f+u:Be,{top:vt,bottom:ht,left:Be,right:Re}}function nr(Ot,vt){var ht=x.max(Ot.nodes,function(Mt){return Mt.column}),Re=Ue-Me,Be=qe-Ie,He=Re+vt.right+vt.left,$e=Be+vt.top+vt.bottom,Ze=Re/He,Je=Be/$e;return Me=Me*Ze+vt.left,Ue=vt.right==0?Ue:Ue*Ze,Ie=Ie*Je+vt.top,qe=qe*Je,Ot.nodes.forEach(function(Mt){Mt.x0=Me+Mt.column*((Ue-Me-ke)/ht),Mt.x1=Mt.x0+ke}),Je}function _r(Ot){var vt,ht,Re;for(vt=Ot.nodes,ht=[],Re=0;vt.length;++Re,vt=ht,ht=[])vt.forEach(function(Be){Be.depth=Re,Be.sourceLinks.forEach(function(He){ht.indexOf(He.target)<0&&!He.circular&&ht.push(He.target)})});for(vt=Ot.nodes,ht=[],Re=0;vt.length;++Re,vt=ht,ht=[])vt.forEach(function(Be){Be.height=Re,Be.targetLinks.forEach(function(He){ht.indexOf(He.source)<0&&!He.circular&&ht.push(He.source)})});Ot.nodes.forEach(function(Be){Be.column=Math.floor(ve.call(null,Be,Re))})}function Zt(Ot,vt,ht){var Re=E.nest().key(function(Mt){return Mt.column}).sortKeys(x.ascending).entries(Ot.nodes).map(function(Mt){return Mt.values});$e(ht),Je();for(var Be=1,He=vt;He>0;--He)Ze(Be*=.99,ht),Je();function $e(Mt){if(Ge){var dt=1/0;Re.forEach(function(Ht){var Wt=qe*Ge/(Ht.length+1);dt=Wt0))if(Ht==0&&Vt==1)Sr=Wt.y1-Wt.y0,Wt.y0=qe/2-Sr/2,Wt.y1=qe/2+Sr/2;else if(Ht==Dt-1&&Vt==1)Sr=Wt.y1-Wt.y0,Wt.y0=qe/2-Sr/2,Wt.y1=qe/2+Sr/2;else{var on=0,$t=x.mean(Wt.sourceLinks,w),It=x.mean(Wt.targetLinks,i);$t&&It?on=($t+It)/2:on=$t||It;var ir=(on-g(Wt))*Mt;Wt.y0+=ir,Wt.y1+=ir}})})}function Je(){Re.forEach(function(Mt){var dt,Dt,Ct=Ie,Vt=Mt.length,Ht;for(Mt.sort(h),Ht=0;Ht0&&(dt.y0+=Dt,dt.y1+=Dt),Ct=dt.y1+ge;if(Dt=Ct-ge-qe,Dt>0)for(Ct=dt.y0-=Dt,dt.y1-=Dt,Ht=Vt-2;Ht>=0;--Ht)dt=Mt[Ht],Dt=dt.y1+ge-Ct,Dt>0&&(dt.y0-=Dt,dt.y1-=Dt),Ct=dt.y0})}}function sr(Ot){Ot.nodes.forEach(function(vt){vt.sourceLinks.sort(m),vt.targetLinks.sort(c)}),Ot.nodes.forEach(function(vt){var ht=vt.y0,Re=ht,Be=vt.y1,He=Be;vt.sourceLinks.forEach(function($e){$e.circular?($e.y0=Be-$e.width/2,Be=Be-$e.width):($e.y0=ht+$e.width/2,ht+=$e.width)}),vt.targetLinks.forEach(function($e){$e.circular?($e.y1=He-$e.width/2,He=He-$e.width):($e.y1=Re+$e.width/2,Re+=$e.width)})})}return mt}function z(Me,Ie,Ue){var qe=0;if(Ue===null){for(var ke=[],ge=0;geIe.source.column)}function B(Me,Ie){var Ue=0;Me.sourceLinks.forEach(function(ke){Ue=ke.circular&&!xe(ke,Ie)?Ue+1:Ue});var qe=0;return Me.targetLinks.forEach(function(ke){qe=ke.circular&&!xe(ke,Ie)?qe+1:qe}),Ue+qe}function F(Me){var Ie=Me.source.sourceLinks,Ue=0;Ie.forEach(function(ge){Ue=ge.circular?Ue+1:Ue});var qe=Me.target.targetLinks,ke=0;return qe.forEach(function(ge){ke=ge.circular?ke+1:ke}),!(Ue>1||ke>1)}function P(Me,Ie,Ue){return Me.sort(Z),Me.forEach(function(qe,ke){var ge=0;if(xe(qe,Ue)&&F(qe))qe.circularPathData.verticalBuffer=ge+qe.width/2;else{var ue=0;for(ue;uege?ve:ge}qe.circularPathData.verticalBuffer=ge+qe.width/2}}),Me}function j(Me,Ie,Ue,qe){var ke=5,ge=x.min(Me.links,function(se){return se.source.y0});Me.links.forEach(function(se){se.circular&&(se.circularPathData={})});var ue=Me.links.filter(function(se){return se.circularLinkType=="top"});P(ue,Ie,qe);var ve=Me.links.filter(function(se){return se.circularLinkType=="bottom"});P(ve,Ie,qe),Me.links.forEach(function(se){if(se.circular){if(se.circularPathData.arcRadius=se.width+u,se.circularPathData.leftNodeBuffer=ke,se.circularPathData.rightNodeBuffer=ke,se.circularPathData.sourceWidth=se.source.x1-se.source.x0,se.circularPathData.sourceX=se.source.x0+se.circularPathData.sourceWidth,se.circularPathData.targetX=se.target.x0,se.circularPathData.sourceY=se.y0,se.circularPathData.targetY=se.y1,xe(se,qe)&&F(se))se.circularPathData.leftSmallArcRadius=u+se.width/2,se.circularPathData.leftLargeArcRadius=u+se.width/2,se.circularPathData.rightSmallArcRadius=u+se.width/2,se.circularPathData.rightLargeArcRadius=u+se.width/2,se.circularLinkType=="bottom"?(se.circularPathData.verticalFullExtent=se.source.y1+f+se.circularPathData.verticalBuffer,se.circularPathData.verticalLeftInnerExtent=se.circularPathData.verticalFullExtent-se.circularPathData.leftLargeArcRadius,se.circularPathData.verticalRightInnerExtent=se.circularPathData.verticalFullExtent-se.circularPathData.rightLargeArcRadius):(se.circularPathData.verticalFullExtent=se.source.y0-f-se.circularPathData.verticalBuffer,se.circularPathData.verticalLeftInnerExtent=se.circularPathData.verticalFullExtent+se.circularPathData.leftLargeArcRadius,se.circularPathData.verticalRightInnerExtent=se.circularPathData.verticalFullExtent+se.circularPathData.rightLargeArcRadius);else{var Te=se.source.column,Fe=se.circularLinkType,We=Me.links.filter(function(mt){return mt.source.column==Te&&mt.circularLinkType==Fe});se.circularLinkType=="bottom"?We.sort(re):We.sort(Q);var Ge=0;We.forEach(function(mt,Tt){mt.circularLinkID==se.circularLinkID&&(se.circularPathData.leftSmallArcRadius=u+se.width/2+Ge,se.circularPathData.leftLargeArcRadius=u+se.width/2+Tt*Ie+Ge),Ge=Ge+mt.width}),Te=se.target.column,We=Me.links.filter(function(mt){return mt.target.column==Te&&mt.circularLinkType==Fe}),se.circularLinkType=="bottom"?We.sort(oe):We.sort(ae),Ge=0,We.forEach(function(mt,Tt){mt.circularLinkID==se.circularLinkID&&(se.circularPathData.rightSmallArcRadius=u+se.width/2+Ge,se.circularPathData.rightLargeArcRadius=u+se.width/2+Tt*Ie+Ge),Ge=Ge+mt.width}),se.circularLinkType=="bottom"?(se.circularPathData.verticalFullExtent=Math.max(Ue,se.source.y1,se.target.y1)+f+se.circularPathData.verticalBuffer,se.circularPathData.verticalLeftInnerExtent=se.circularPathData.verticalFullExtent-se.circularPathData.leftLargeArcRadius,se.circularPathData.verticalRightInnerExtent=se.circularPathData.verticalFullExtent-se.circularPathData.rightLargeArcRadius):(se.circularPathData.verticalFullExtent=ge-f-se.circularPathData.verticalBuffer,se.circularPathData.verticalLeftInnerExtent=se.circularPathData.verticalFullExtent+se.circularPathData.leftLargeArcRadius,se.circularPathData.verticalRightInnerExtent=se.circularPathData.verticalFullExtent+se.circularPathData.rightLargeArcRadius)}se.circularPathData.leftInnerExtent=se.circularPathData.sourceX+se.circularPathData.leftNodeBuffer,se.circularPathData.rightInnerExtent=se.circularPathData.targetX-se.circularPathData.rightNodeBuffer,se.circularPathData.leftFullExtent=se.circularPathData.sourceX+se.circularPathData.leftLargeArcRadius+se.circularPathData.leftNodeBuffer,se.circularPathData.rightFullExtent=se.circularPathData.targetX-se.circularPathData.rightLargeArcRadius-se.circularPathData.rightNodeBuffer}if(se.circular)se.path=U(se);else{var gt=k.linkHorizontal().source(function(mt){var Tt=mt.source.x0+(mt.source.x1-mt.source.x0),At=mt.y0;return[Tt,At]}).target(function(mt){var Tt=mt.target.x0,At=mt.y1;return[Tt,At]});se.path=gt(se)}})}function U(Me){var Ie="";return Me.circularLinkType=="top"?Ie="M"+Me.circularPathData.sourceX+" "+Me.circularPathData.sourceY+" L"+Me.circularPathData.leftInnerExtent+" "+Me.circularPathData.sourceY+" A"+Me.circularPathData.leftLargeArcRadius+" "+Me.circularPathData.leftSmallArcRadius+" 0 0 0 "+Me.circularPathData.leftFullExtent+" "+(Me.circularPathData.sourceY-Me.circularPathData.leftSmallArcRadius)+" L"+Me.circularPathData.leftFullExtent+" "+Me.circularPathData.verticalLeftInnerExtent+" A"+Me.circularPathData.leftLargeArcRadius+" "+Me.circularPathData.leftLargeArcRadius+" 0 0 0 "+Me.circularPathData.leftInnerExtent+" "+Me.circularPathData.verticalFullExtent+" L"+Me.circularPathData.rightInnerExtent+" "+Me.circularPathData.verticalFullExtent+" A"+Me.circularPathData.rightLargeArcRadius+" "+Me.circularPathData.rightLargeArcRadius+" 0 0 0 "+Me.circularPathData.rightFullExtent+" "+Me.circularPathData.verticalRightInnerExtent+" L"+Me.circularPathData.rightFullExtent+" "+(Me.circularPathData.targetY-Me.circularPathData.rightSmallArcRadius)+" A"+Me.circularPathData.rightLargeArcRadius+" "+Me.circularPathData.rightSmallArcRadius+" 0 0 0 "+Me.circularPathData.rightInnerExtent+" "+Me.circularPathData.targetY+" L"+Me.circularPathData.targetX+" "+Me.circularPathData.targetY:Ie="M"+Me.circularPathData.sourceX+" "+Me.circularPathData.sourceY+" L"+Me.circularPathData.leftInnerExtent+" "+Me.circularPathData.sourceY+" A"+Me.circularPathData.leftLargeArcRadius+" "+Me.circularPathData.leftSmallArcRadius+" 0 0 1 "+Me.circularPathData.leftFullExtent+" "+(Me.circularPathData.sourceY+Me.circularPathData.leftSmallArcRadius)+" L"+Me.circularPathData.leftFullExtent+" "+Me.circularPathData.verticalLeftInnerExtent+" A"+Me.circularPathData.leftLargeArcRadius+" "+Me.circularPathData.leftLargeArcRadius+" 0 0 1 "+Me.circularPathData.leftInnerExtent+" "+Me.circularPathData.verticalFullExtent+" L"+Me.circularPathData.rightInnerExtent+" "+Me.circularPathData.verticalFullExtent+" A"+Me.circularPathData.rightLargeArcRadius+" "+Me.circularPathData.rightLargeArcRadius+" 0 0 1 "+Me.circularPathData.rightFullExtent+" "+Me.circularPathData.verticalRightInnerExtent+" L"+Me.circularPathData.rightFullExtent+" "+(Me.circularPathData.targetY+Me.circularPathData.rightSmallArcRadius)+" A"+Me.circularPathData.rightLargeArcRadius+" "+Me.circularPathData.rightSmallArcRadius+" 0 0 1 "+Me.circularPathData.rightInnerExtent+" "+Me.circularPathData.targetY+" L"+Me.circularPathData.targetX+" "+Me.circularPathData.targetY,Ie}function Z(Me,Ie){return H(Me)==H(Ie)?Me.circularLinkType=="bottom"?re(Me,Ie):Q(Me,Ie):H(Ie)-H(Me)}function Q(Me,Ie){return Me.y0-Ie.y0}function re(Me,Ie){return Ie.y0-Me.y0}function ae(Me,Ie){return Me.y1-Ie.y1}function oe(Me,Ie){return Ie.y1-Me.y1}function H(Me){return Me.target.column-Me.source.column}function X(Me){return Me.target.x0-Me.source.x1}function K(Me,Ie){var Ue=N(Me),qe=X(Ie)/Math.tan(Ue),ke=ye(Me)=="up"?Me.y1+qe:Me.y1-qe;return ke}function G(Me,Ie){var Ue=N(Me),qe=X(Ie)/Math.tan(Ue),ke=ye(Me)=="up"?Me.y1-qe:Me.y1+qe;return ke}function Y(Me,Ie,Ue,qe){Me.links.forEach(function(ke){if(!ke.circular&&ke.target.column-ke.source.column>1){var ge=ke.source.column+1,ue=ke.target.column-1,ve=1,se=ue-ge+1;for(ve=1;ge<=ue;ge++,ve++)Me.nodes.forEach(function(Te){if(Te.column==ge){var Fe=ve/(se+1),We=Math.pow(1-Fe,3),Ge=3*Fe*Math.pow(1-Fe,2),gt=3*Math.pow(Fe,2)*(1-Fe),mt=Math.pow(Fe,3),Tt=We*ke.y0+Ge*ke.y0+gt*ke.y1+mt*ke.y1,At=Tt-ke.width/2,Kt=Tt+ke.width/2,nr;At>Te.y0&&AtTe.y0&&KtTe.y1&&$(_r,nr,Ie,Ue)})):AtTe.y1&&(nr=Kt-Te.y0+10,Te=$(Te,nr,Ie,Ue),Me.nodes.forEach(function(_r){T(_r,qe)==T(Te,qe)||_r.column!=Te.column||_r.y0Te.y1&&$(_r,nr,Ie,Ue)}))}})}})}function q(Me,Ie){return Me.y0>Ie.y0&&Me.y0Ie.y0&&Me.y1Ie.y1}function $(Me,Ie,Ue,qe){return Me.y0+Ie>=Ue&&Me.y1+Ie<=qe&&(Me.y0=Me.y0+Ie,Me.y1=Me.y1+Ie,Me.targetLinks.forEach(function(ke){ke.y1=ke.y1+Ie}),Me.sourceLinks.forEach(function(ke){ke.y0=ke.y0+Ie})),Me}function ee(Me,Ie,Ue,qe){Me.nodes.forEach(function(ke){qe&&ke.y+(ke.y1-ke.y0)>Ie&&(ke.y=ke.y-(ke.y+(ke.y1-ke.y0)-Ie));var ge=Me.links.filter(function(se){return T(se.source,Ue)==T(ke,Ue)}),ue=ge.length;ue>1&&ge.sort(function(se,Te){if(!se.circular&&!Te.circular){if(se.target.column==Te.target.column)return se.y1-Te.y1;if(fe(se,Te)){if(se.target.column>Te.target.column){var Fe=G(Te,se);return se.y1-Fe}if(Te.target.column>se.target.column){var We=G(se,Te);return We-Te.y1}}else return se.y1-Te.y1}if(se.circular&&!Te.circular)return se.circularLinkType=="top"?-1:1;if(Te.circular&&!se.circular)return Te.circularLinkType=="top"?1:-1;if(se.circular&&Te.circular)return se.circularLinkType===Te.circularLinkType&&se.circularLinkType=="top"?se.target.column===Te.target.column?se.target.y1-Te.target.y1:Te.target.column-se.target.column:se.circularLinkType===Te.circularLinkType&&se.circularLinkType=="bottom"?se.target.column===Te.target.column?Te.target.y1-se.target.y1:se.target.column-Te.target.column:se.circularLinkType=="top"?-1:1});var ve=ke.y0;ge.forEach(function(se){se.y0=ve+se.width/2,ve=ve+se.width}),ge.forEach(function(se,Te){if(se.circularLinkType=="bottom"){var Fe=Te+1,We=0;for(Fe;Fe1&&ke.sort(function(ve,se){if(!ve.circular&&!se.circular){if(ve.source.column==se.source.column)return ve.y0-se.y0;if(fe(ve,se)){if(se.source.column0?"up":"down"}function xe(Me,Ie){return T(Me.source,Ie)==T(Me.target,Ie)}function Ae(Me,Ie,Ue){var qe=Me.nodes,ke=Me.links,ge=!1,ue=!1;if(ke.forEach(function(Ge){Ge.circularLinkType=="top"?ge=!0:Ge.circularLinkType=="bottom"&&(ue=!0)}),ge==!1||ue==!1){var ve=x.min(qe,function(Ge){return Ge.y0}),se=x.max(qe,function(Ge){return Ge.y1}),Te=se-ve,Fe=Ue-Ie,We=Fe/Te;qe.forEach(function(Ge){var gt=(Ge.y1-Ge.y0)*We;Ge.y0=(Ge.y0-ve)*We,Ge.y1=Ge.y0+gt}),ke.forEach(function(Ge){Ge.y0=(Ge.y0-ve)*We,Ge.y1=(Ge.y1-ve)*We,Ge.width=Ge.width*We})}}v.sankeyCircular=b,v.sankeyCenter=n,v.sankeyLeft=t,v.sankeyRight=a,v.sankeyJustify=r,Object.defineProperty(v,"__esModule",{value:!0})})}}),b5=Ee({"src/traces/sankey/constants.js"(J,V){"use strict";V.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}}),aP=Ee({"src/traces/sankey/render.js"(J,V){"use strict";var v=KL(),x=(Zv(),ra(iv)).interpolateNumber,E=Hn(),k=eP(),l=nP(),e=b5(),t=Qa(),a=yo(),r=Vr(),n=r.strTranslate,o=r.strRotate,s=Qh(),c=s.keyFun,m=s.repeat,h=s.unwrap,p=Fs(),g=Ri(),i=rc(),w=i.CAP_SHIFT,S=i.LINE_SPACING,M=3;function C(X,K,G){var Y=h(K),q=Y.trace,$=q.domain,ee=q.orientation==="h",ne=q.direction==="reversed",fe=q.node.pad,ye=q.node.thickness,xe={justify:k.sankeyJustify,left:k.sankeyLeft,right:k.sankeyRight,center:k.sankeyCenter}[q.node.align],Ae=X.width*($.x[1]-$.x[0]),Me=X.height*($.y[1]-$.y[0]),Ie=Y._nodes,Ue=Y._links,qe=Y.circular,ke;qe?ke=l.sankeyCircular().circularLinkGap(0):ke=k.sankey(),ke.iterations(e.sankeyIterations).size(ee?[Ae,Me]:[Me,Ae]).nodeWidth(ye).nodePadding(fe).nodeId(function(Zt){return Zt.pointNumber}).nodeAlign(xe).nodes(Ie).links(Ue);function ge(Zt){q[Zt].sort==="input"&&(qe?r.warn(`Circular Sankey diagrams do not support the "input" ${Zt}.sort mode; falling back to the default sort.`):ke[`${Zt}Sort`](null))}ge("link"),ge("node");var ue=ke();ke.nodePadding()=ht||(vt=ht-Ot.y0,vt>1e-6&&(Ot.y0+=vt,Ot.y1+=vt)),ht=Ot.y1+fe})}function At(Zt){var sr=Zt.map(function($e,Ze){return{x0:$e.x0,index:Ze}}).sort(function($e,Ze){return $e.x0-Ze.x0}),Ot=[],vt=-1,ht,Re=-1/0,Be;for(ve=0;veRe+ye&&(vt+=1,ht=He.x0),Re=He.x0,Ot[vt]||(Ot[vt]=[]),Ot[vt].push(He),Be=ht-He.x0,He.x0+=Be,He.x1+=Be}return Ot}if(q.node.x.length&&q.node.y.length){for(ve=0;ve0?" L "+q.targetX+" "+q.targetY:"")+"Z"):(G="M "+(q.targetX-K)+" "+(q.targetY-Y)+" L "+(q.rightInnerExtent-K)+" "+(q.targetY-Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightSmallArcRadius+Y)+" 0 0 0 "+(q.rightFullExtent-Y-K)+" "+(q.targetY+q.rightSmallArcRadius)+" L "+(q.rightFullExtent-Y-K)+" "+q.verticalRightInnerExtent,$&&ee?G+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightInnerExtent-Y-K)+" "+(q.verticalFullExtent+Y)+" L "+(q.rightFullExtent+Y-K-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent+Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent:$?G+=" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent-K-Y-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" L "+(q.leftFullExtent+Y+(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent:G+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent+Y)+" L "+q.leftInnerExtent+" "+(q.verticalFullExtent+Y)+" A "+(q.leftLargeArcRadius+Y)+" "+(q.leftLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent,G+=" L "+(q.leftFullExtent+Y)+" "+(q.sourceY+q.leftSmallArcRadius)+" A "+(q.leftLargeArcRadius+Y)+" "+(q.leftSmallArcRadius+Y)+" 0 0 0 "+q.leftInnerExtent+" "+(q.sourceY-Y)+" L "+q.sourceX+" "+(q.sourceY-Y)+" L "+q.sourceX+" "+(q.sourceY+Y)+" L "+q.leftInnerExtent+" "+(q.sourceY+Y)+" A "+(q.leftLargeArcRadius-Y)+" "+(q.leftSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent-Y)+" "+(q.sourceY+q.leftSmallArcRadius)+" L "+(q.leftFullExtent-Y)+" "+q.verticalLeftInnerExtent,$&&ee?G+=" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent-Y-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" L "+(q.rightFullExtent+Y-K+(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent:$?G+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+(q.verticalFullExtent+Y)+" L "+(q.rightFullExtent-K-Y)+" "+(q.verticalFullExtent+Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent:G+=" A "+(q.leftLargeArcRadius-Y)+" "+(q.leftLargeArcRadius-Y)+" 0 0 1 "+q.leftInnerExtent+" "+(q.verticalFullExtent-Y)+" L "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightLargeArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent,G+=" L "+(q.rightFullExtent+Y-K)+" "+(q.targetY+q.rightSmallArcRadius)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightInnerExtent-K)+" "+(q.targetY+Y)+" L "+(q.targetX-K)+" "+(q.targetY+Y)+(K>0?" L "+q.targetX+" "+q.targetY:"")+"Z"),G}function f(){var X=.5;function K(G){var Y=G.linkArrowLength;if(G.link.circular)return T(G.link,Y);var q=Math.abs((G.link.target.x0-G.link.source.x1)/2);Y>q&&(Y=q);var $=G.link.source.x1,ee=G.link.target.x0-Y,ne=x($,ee),fe=ne(X),ye=ne(1-X),xe=G.link.y0-G.link.width/2,Ae=G.link.y0+G.link.width/2,Me=G.link.y1-G.link.width/2,Ie=G.link.y1+G.link.width/2,Ue="M"+$+","+xe,qe="C"+fe+","+xe+" "+ye+","+Me+" "+ee+","+Me,ke="C"+ye+","+Ie+" "+fe+","+Ae+" "+$+","+Ae,ge=Y>0?"L"+(ee+Y)+","+(Me+G.link.width/2):"";return ge+="L"+ee+","+Ie,Ue+qe+ge+ke+"Z"}return K}function u(X,K){var G=e.nodePadAcross,Y=X.nodePad/2;K.dx=K.x1-K.x0,K.dy=K.y1-K.y0;var q=K.dx,$=Math.max(.5,K.dy),ee="node_"+K.pointNumber;return K.group&&(ee=r.randstr()),K.trace=X.trace,K.curveNumber=X.trace.index,{index:K.pointNumber,key:ee,partOfGroup:K.partOfGroup||!1,group:K.group,traceId:X.key,trace:X.trace,node:K,nodePad:X.nodePad,nodeLineColor:X.nodeLineColor,nodeLineWidth:X.nodeLineWidth,textFont:X.textFont,size:X.horizontal?X.height:X.width,visibleWidth:Math.ceil(q),visibleHeight:$,zoneX:-G,zoneY:-Y,zoneWidth:q+2*G,zoneHeight:$+2*Y,labelY:X.horizontal?K.dy/2+1:K.dx/2+1,left:K.originalLayer===1,sizeAcross:X.width,forceLayouts:X.forceLayouts,horizontal:X.horizontal,reversed:X.reversed,rgb:t.rgb(K.color),alpha:t.parse(K.color).alpha,valueFormat:X.valueFormat,valueSuffix:X.valueSuffix,sankey:X.sankey,graph:X.graph,arrangement:X.arrangement,uniqueNodeLabelPathId:[X.guid,X.key,ee].join("_"),interactionState:X.interactionState,figure:X}}function A(X){X.attr("transform",function(K){return n(K.node.x0.toFixed(3),K.node.y0.toFixed(3))})}function b(X){X.call(A)}function z(X,K){X.call(b),K.attr("d",f())}function I(X){X.attr("width",function(K){return K.node.x1-K.node.x0}).attr("height",function(K){return K.visibleHeight})}function N(X){return X.link.width>1||X.linkLineWidth>0}function R(X){return X.horizontal?X.reversed?n(X.translateX+X.width,X.translateY)+"matrix(-1 0 0 1 0 0)":n(X.translateX,X.translateY)+"matrix(1 0 0 1 0 0)":X.reversed?n(X.translateX,X.translateY+X.height)+"matrix(0 -1 1 0 0 0)":n(X.translateX,X.translateY)+"matrix(0 1 1 0 0 0)"}function B(X,K,G){X.on(".basic",null).on("mouseover.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(G.hover(this,Y,K),Y.interactionState.hovered=[this,Y])}).on("mousemove.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(G.follow(this,Y),Y.interactionState.hovered=[this,Y])}).on("mouseout.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(G.unhover(this,Y,K),Y.interactionState.hovered=!1)}).on("click.basic",function(Y){Y.interactionState.hovered&&(G.unhover(this,Y,K),Y.interactionState.hovered=!1),!Y.interactionState.dragInProgress&&!Y.partOfGroup&&G.select(this,Y,K)})}function F(X,K,G,Y){var q=E.behavior.drag().origin(function($){return{x:$.node.x0+$.visibleWidth/2,y:$.node.y0+$.visibleHeight/2}}).on("dragstart",function($){if($.arrangement!=="fixed"&&(r.ensureSingle(Y._fullLayout._infolayer,"g","dragcover",function(ne){Y._fullLayout._dragCover=ne}),r.raiseToTop(this),$.interactionState.dragInProgress=$.node,re($.node),$.interactionState.hovered&&(G.nodeEvents.unhover.apply(0,$.interactionState.hovered),$.interactionState.hovered=!1),$.arrangement==="snap")){var ee=$.traceId+"|"+$.key;$.forceLayouts[ee]?$.forceLayouts[ee].alpha(1):P(X,ee,$,Y),j(X,K,$,ee,Y)}}).on("drag",function($){if($.arrangement!=="fixed"){var ee=E.event.x,ne=E.event.y;$.arrangement==="snap"?($.node.x0=ee-$.visibleWidth/2,$.node.x1=ee+$.visibleWidth/2,$.node.y0=ne-$.visibleHeight/2,$.node.y1=ne+$.visibleHeight/2):($.arrangement==="freeform"&&($.node.x0=ee-$.visibleWidth/2,$.node.x1=ee+$.visibleWidth/2),ne=Math.max(0,Math.min($.size-$.visibleHeight/2,ne)),$.node.y0=ne-$.visibleHeight/2,$.node.y1=ne+$.visibleHeight/2),re($.node),$.arrangement!=="snap"&&($.sankey.update($.graph),z(X.filter(ae($)),K))}}).on("dragend",function($){if($.arrangement!=="fixed"){$.interactionState.dragInProgress=!1;for(var ee=0;ee<$.node.childrenNodes.length;ee++)$.node.childrenNodes[ee].x=$.node.x,$.node.childrenNodes[ee].y=$.node.y;$.arrangement!=="snap"&&Z($,Y)}});X.on(".drag",null).call(q)}function P(X,K,G,Y){oe(G.graph.nodes);var q=G.graph.nodes.filter(function($){return $.originalX===G.node.originalX}).filter(function($){return!$.partOfGroup});G.forceLayouts[K]=v.forceSimulation(q).alphaDecay(0).force("collide",v.forceCollide().radius(function($){return $.dy/2+G.nodePad/2}).strength(1).iterations(e.forceIterations)).force("constrain",U(X,K,q,G,Y)).stop()}function j(X,K,G,Y,q){window.requestAnimationFrame(function $(){var ee;for(ee=0;ee0)window.requestAnimationFrame($);else{var fe=G.node.originalX;G.node.x0=fe-G.visibleWidth/2,G.node.x1=fe+G.visibleWidth/2,Z(G,q)}})}function U(X,K,G,Y){return function(){for(var $=0,ee=0;ee0&&Y.forceLayouts[K].alpha(0)}}function Z(X,K){for(var G=[],Y=[],q=0;qN(ke)?t.rgb(ke.linkLineColor):ke.rgb).style("stroke-opacity",ke=>N(ke)?t.opacity(ke.linkLineColor):ke.alpha).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha).style("stroke-width",ke=>N(ke)?ke.linkLineWidth:1).attr("d",f()),Ae.style("opacity",function(){return X._context.staticPlot||ee||ne?1:0}).transition().ease(e.ease).duration(e.duration).style("opacity",1),Ae.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Me=ye.selectAll("."+e.cn.sankeyNodeSet).data(m,c);Me.enter().append("g").classed(e.cn.sankeyNodeSet,!0),Me.style("cursor",function(ke){switch(ke.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var Ie=Me.selectAll("."+e.cn.sankeyNode).data(function(ke){var ge=ke.graph.nodes;return Q(ge),ge.map(u.bind(null,ke))},c);Ie.enter().append("g").classed(e.cn.sankeyNode,!0).call(A).style("opacity",function(ke){return(X._context.staticPlot||ee)&&!ke.partOfGroup?1:0}),Ie.call(B,ye,q.nodeEvents).call(F,Ae,q,X),Ie.transition().ease(e.ease).duration(e.duration).call(A).style("opacity",function(ke){return ke.partOfGroup?0:1}),Ie.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Ue=Ie.selectAll("."+e.cn.nodeRect).data(m);Ue.enter().append("rect").classed(e.cn.nodeRect,!0).call(I),Ue.style("stroke-width",function(ke){return ke.nodeLineWidth}).style("stroke",function(ke){return t.rgb(ke.nodeLineColor)}).style("stroke-opacity",function(ke){return t.opacity(ke.nodeLineColor)}).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha),Ue.transition().ease(e.ease).duration(e.duration).call(I);var qe=Ie.selectAll("."+e.cn.nodeLabel).data(m);qe.enter().append("text").classed(e.cn.nodeLabel,!0).style("cursor","default"),qe.attr("data-notex",1).text(function(ke){return ke.node.label}).each(function(ke){var ge=E.select(this);a.font(ge,ke.textFont),p.convertToTspans(ge,X)}).attr("text-anchor",function(ke){return ke.horizontal&&ke.left!==ke.reversed?"end":"start"}).attr("transform",function(ke){var ge=E.select(this),ue=p.lineCount(ge),ve=ke.textFont.size*((ue-1)*S-w),se=ke.nodeLineWidth/2+M;if(!ke.horizontal){var We=ke.reversed?(ke.visibleWidth+ve)/2:(ke.visibleWidth-ve)/2,Te=ke.reversed?o(90):"scale(-1,1)"+o(90);return n(We,se)+Te}var Fe=se,We=(ke.visibleHeight-ve)/2;return ke.left?Fe=-Fe:Fe+=ke.visibleWidth,n(Fe,We)+(ke.reversed?"scale(-1,1)":"")}),qe.transition().ease(e.ease).duration(e.duration)}}}),x5=Ee({"src/traces/sankey/plot.js"(J,V){"use strict";var v=Hn(),x=Vr(),E=x.numberFormat,k=aP(),l=$l(),e=Qa(),t=b5().cn,a=x._;function r(S){return S!==""}function n(S,M){return S.filter(function(C){return C.key===M.traceId})}function o(S,M){v.select(S).select("path").style("fill-opacity",M),v.select(S).select("rect").style("fill-opacity",M)}function s(S){v.select(S).select("text.name").style("fill","black")}function c(S){return function(M){return S.node.sourceLinks.indexOf(M.link)!==-1||S.node.targetLinks.indexOf(M.link)!==-1}}function m(S){return function(M){return M.node.sourceLinks.indexOf(S.link)!==-1||M.node.targetLinks.indexOf(S.link)!==-1}}function h(S,M,C){M&&C&&n(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(g.bind(0,M,C,!1))}function p(S,M,C){M&&C&&n(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(i.bind(0,M,C,!1))}function g(S,M,C,_){_.style("fill",function(T){if(!T.link.concentrationscale)return T.hoverRgb}).style("fill-opacity",function(T){if(!T.link.concentrationscale)return T.hoverAlpha}),_.each(function(T){var f=T.link.label;f!==""&&n(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===f}).style("fill",function(u){if(!u.link.concentrationscale)return u.hoverRgb}).style("fill-opacity",function(u){if(!u.link.concentrationscale)return u.hoverAlpha})}),C&&n(M,S).selectAll("."+t.sankeyNode).filter(m(S)).call(h)}function i(S,M,C,_){_.style("fill",function(T){return T.rgb}).style("fill-opacity",function(T){return T.alpha}),_.each(function(T){var f=T.link.label;f!==""&&n(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===f}).style("fill",u=>u.rgb).style("fill-opacity",u=>u.alpha)}),C&&n(M,S).selectAll(t.sankeyNode).filter(m(S)).call(p)}function w(S,M){var C=S.hoverlabel||{},_=x.nestedProperty(C,M).get();return Array.isArray(_)?!1:_}V.exports=function(M,C){for(var _=M._fullLayout,T=_._paper,f=_._size,u=0;u"),color:w(H,"bgcolor")||e.addOpacity(q.color,1),borderColor:w(H,"bordercolor"),fontFamily:w(H,"font.family"),fontSize:w(H,"font.size"),fontColor:w(H,"font.color"),fontWeight:w(H,"font.weight"),fontStyle:w(H,"font.style"),fontVariant:w(H,"font.variant"),fontTextcase:w(H,"font.textcase"),fontLineposition:w(H,"font.lineposition"),fontShadow:w(H,"font.shadow"),nameLength:w(H,"namelength"),textAlign:w(H,"align"),idealAlign:v.event.x<$[0]?"right":"left",hovertemplate:H.hovertemplate,hovertemplateLabels:ee,eventData:[q]})}}var ne=l.loneHover(X,{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:M,anchorIndex:G});ne.each(function(){var fe=this;oe.link.concentrationscale||o(fe,.65),s(fe)})},j=function(ae,oe,H){M._fullLayout.hovermode!==!1&&(v.select(ae).call(i.bind(0,oe,H,!0)),oe.link.trace.link.hoverinfo!=="skip"&&(oe.link.fullData=oe.link.trace,M.emit("plotly_unhover",{event:v.event,points:[oe.link]})),l.loneUnhover(_._hoverlayer.node()))},U=function(ae,oe,H){var X=oe.node;X.originalEvent=v.event,M._hoverdata=[X],v.select(ae).call(p,oe,H),l.click(M,{target:!0})},Z=function(ae,oe,H){M._fullLayout.hovermode!==!1&&(v.select(ae).call(h,oe,H),oe.node.trace.node.hoverinfo!=="skip"&&(oe.node.fullData=oe.node.trace,M.emit("plotly_hover",{event:v.event,points:[oe.node]})))},Q=function(ae,oe){if(M._fullLayout.hovermode!==!1){var H=oe.node.trace.node;if(!(H.hoverinfo==="none"||H.hoverinfo==="skip")){var X=v.select(ae).select("."+t.nodeRect),K=M._fullLayout._paperdiv.node().getBoundingClientRect(),G=X.node().getBoundingClientRect(),Y=G.left-2-K.left,q=G.right+2-K.left,$=G.top+G.height/4-K.top,ee={valueLabel:E(oe.valueFormat)(oe.node.value)+oe.valueSuffix};oe.node.fullData=oe.node.trace,M._fullLayout._calcInverseTransform(M);var ne=M._fullLayout._invScaleX,fe=M._fullLayout._invScaleY,ye=l.loneHover({x0:ne*Y,x1:ne*q,y:fe*$,name:E(oe.valueFormat)(oe.node.value)+oe.valueSuffix,text:[oe.node.label,B+oe.node.targetLinks.length,F+oe.node.sourceLinks.length].filter(r).join("
"),color:w(H,"bgcolor")||oe.rgb,borderColor:w(H,"bordercolor"),fontFamily:w(H,"font.family"),fontSize:w(H,"font.size"),fontColor:w(H,"font.color"),fontWeight:w(H,"font.weight"),fontStyle:w(H,"font.style"),fontVariant:w(H,"font.variant"),fontTextcase:w(H,"font.textcase"),fontLineposition:w(H,"font.lineposition"),fontShadow:w(H,"font.shadow"),nameLength:w(H,"namelength"),textAlign:w(H,"align"),idealAlign:"left",hovertemplate:H.hovertemplate,hovertemplateLabels:ee,eventData:[oe.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:M});o(ye,.85),s(ye)}}},re=function(ae,oe,H){M._fullLayout.hovermode!==!1&&(v.select(ae).call(p,oe,H),oe.node.trace.node.hoverinfo!=="skip"&&(oe.node.fullData=oe.node.trace,M.emit("plotly_unhover",{event:v.event,points:[oe.node]})),l.loneUnhover(_._hoverlayer.node()))};k(M,T,C,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{linkEvents:{hover:z,follow:P,unhover:j,select:b},nodeEvents:{hover:Z,follow:Q,unhover:re,select:U}})}}}),iP=Ee({"src/traces/sankey/base_plot.js"(J){"use strict";var V=El().overrideAll,v=uf().getModuleCalcData,x=x5(),E=Ei(),k=Dh(),l=qf(),e=uc().prepSelect,t=Vr(),a=Ri(),r="sankey";J.name=r,J.baseLayoutAttrOverrides=V({hoverlabel:E.hoverlabel},"plot","nested"),J.plot=function(o){var s=v(o.calcdata,r)[0];x(o,s),J.updateFx(o)},J.clean=function(o,s,c,m){var h=m._has&&m._has(r),p=s._has&&s._has(r);h&&!p&&(m._paperdiv.selectAll(".sankey").remove(),m._paperdiv.selectAll(".bgsankey").remove())},J.updateFx=function(o){for(var s=0;s0}V.exports=function(R,B,F,P){var j=R._fullLayout,U;S(F)&&P&&(U=P()),k.makeTraceGroups(j._indicatorlayer,B,"trace").each(function(Z){var Q=Z[0],re=Q.trace,ae=v.select(this),oe=re._hasGauge,H=re._isAngular,X=re._isBullet,K=re.domain,G={w:j._size.w*(K.x[1]-K.x[0]),h:j._size.h*(K.y[1]-K.y[0]),l:j._size.l+j._size.w*K.x[0],r:j._size.r+j._size.w*(1-K.x[1]),t:j._size.t+j._size.h*(1-K.y[1]),b:j._size.b+j._size.h*K.y[0]},Y=G.l+G.w/2,q=G.t+G.h/2,$=Math.min(G.w/2,G.h),ee=n.innerRadius*$,ne,fe,ye,xe=re.align||"center";if(fe=q,!oe)ne=G.l+i[xe]*G.w,ye=function(se){return A(se,G.w,G.h)};else if(H&&(ne=Y,fe=q+$/2,ye=function(se){return b(se,.9*ee)}),X){var Ae=n.bulletPadding,Me=1-n.bulletNumberDomainSize+Ae;ne=G.l+(Me+(1-Me)*i[xe])*G.w,ye=function(se){return A(se,(n.bulletNumberDomainSize-Ae)*G.w,G.h)}}_(R,ae,Z,{numbersX:ne,numbersY:fe,numbersScaler:ye,transitionOpts:F,onComplete:U});var Ie,Ue;oe&&(Ie={range:re.gauge.axis.range,color:re.gauge.bgcolor,line:{color:re.gauge.bordercolor,width:0},thickness:1},Ue={range:re.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:re.gauge.bordercolor,width:re.gauge.borderwidth},thickness:1});var qe=ae.selectAll("g.angular").data(H?Z:[]);qe.exit().remove();var ke=ae.selectAll("g.angularaxis").data(H?Z:[]);ke.exit().remove(),H&&C(R,ae,Z,{radius:$,innerRadius:ee,gauge:qe,layer:ke,size:G,gaugeBg:Ie,gaugeOutline:Ue,transitionOpts:F,onComplete:U});var ge=ae.selectAll("g.bullet").data(X?Z:[]);ge.exit().remove();var ue=ae.selectAll("g.bulletaxis").data(X?Z:[]);ue.exit().remove(),X&&M(R,ae,Z,{gauge:ge,layer:ue,size:G,gaugeBg:Ie,gaugeOutline:Ue,transitionOpts:F,onComplete:U});var ve=ae.selectAll("text.title").data(Z);ve.exit().remove(),ve.enter().append("text").classed("title",!0),ve.attr("text-anchor",function(){return X?g.right:g[re.title.align]}).text(re.title.text).call(r.font,re.title.font).call(o.convertToTspans,R),ve.attr("transform",function(){var se=G.l+G.w*i[re.title.align],Te,Fe=n.titlePadding,We=r.bBox(ve.node());if(oe){if(H)if(re.gauge.axis.visible){var Ge=r.bBox(ke.node());Te=Ge.top-Fe-We.bottom}else Te=G.t+G.h/2-$/2-We.bottom-Fe;X&&(Te=fe-(We.top+We.bottom)/2,se=G.l-n.bulletPadding*G.w)}else Te=re._numbersTop-Fe-We.bottom;return e(se,Te)})})};function M(N,R,B,F){var P=B[0].trace,j=F.gauge,U=F.layer,Z=F.gaugeBg,Q=F.gaugeOutline,re=F.size,ae=P.domain,oe=F.transitionOpts,H=F.onComplete,X,K,G,Y,q;j.enter().append("g").classed("bullet",!0),j.attr("transform",e(re.l,re.t)),U.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),U.selectAll("g.xbulletaxistick,path,text").remove();var $=re.h,ee=P.gauge.bar.thickness*$,ne=ae.x[0],fe=ae.x[0]+(ae.x[1]-ae.x[0])*(P._hasNumber||P._hasDelta?1-n.bulletNumberDomainSize:1);X=u(N,P.gauge.axis),X._id="xbulletaxis",X.domain=[ne,fe],X.setScale(),K=s.calcTicks(X),G=s.makeTransTickFn(X),Y=s.getTickSigns(X)[2],q=re.t+re.h,X.visible&&(s.drawTicks(N,X,{vals:X.ticks==="inside"?s.clipEnds(X,K):K,layer:U,path:s.makeTickPath(X,q,Y),transFn:G}),s.drawLabels(N,X,{vals:K,layer:U,transFn:G,labelFns:s.makeLabelFns(X,q)}));function ye(ke){ke.attr("width",function(ge){return Math.max(0,X.c2p(ge.range[1])-X.c2p(ge.range[0]))}).attr("x",function(ge){return X.c2p(ge.range[0])}).attr("y",function(ge){return .5*(1-ge.thickness)*$}).attr("height",function(ge){return ge.thickness*$})}var xe=[Z].concat(P.gauge.steps),Ae=j.selectAll("g.bg-bullet").data(xe);Ae.enter().append("g").classed("bg-bullet",!0).append("rect"),Ae.select("rect").call(ye).call(T),Ae.exit().remove();var Me=j.selectAll("g.value-bullet").data([P.gauge.bar]);Me.enter().append("g").classed("value-bullet",!0).append("rect"),Me.select("rect").attr("height",ee).attr("y",($-ee)/2).call(T),S(oe)?Me.select("rect").transition().duration(oe.duration).ease(oe.easing).each("end",function(){H&&H()}).each("interrupt",function(){H&&H()}).attr("width",Math.max(0,X.c2p(Math.min(P.gauge.axis.range[1],B[0].y)))):Me.select("rect").attr("width",typeof B[0].y=="number"?Math.max(0,X.c2p(Math.min(P.gauge.axis.range[1],B[0].y))):0),Me.exit().remove();var Ie=B.filter(function(){return P.gauge.threshold.value||P.gauge.threshold.value===0}),Ue=j.selectAll("g.threshold-bullet").data(Ie);Ue.enter().append("g").classed("threshold-bullet",!0).append("line"),Ue.select("line").attr("x1",X.c2p(P.gauge.threshold.value)).attr("x2",X.c2p(P.gauge.threshold.value)).attr("y1",(1-P.gauge.threshold.thickness)/2*$).attr("y2",(1-(1-P.gauge.threshold.thickness)/2)*$).call(p.stroke,P.gauge.threshold.line.color).style("stroke-width",P.gauge.threshold.line.width),Ue.exit().remove();var qe=j.selectAll("g.gauge-outline").data([Q]);qe.enter().append("g").classed("gauge-outline",!0).append("rect"),qe.select("rect").call(ye).call(T),qe.exit().remove()}function C(N,R,B,F){var P=B[0].trace,j=F.size,U=F.radius,Z=F.innerRadius,Q=F.gaugeBg,re=F.gaugeOutline,ae=[j.l+j.w/2,j.t+j.h/2+U/2],oe=F.gauge,H=F.layer,X=F.transitionOpts,K=F.onComplete,G=Math.PI/2;function Y(gt){var mt=P.gauge.axis.range[0],Tt=P.gauge.axis.range[1],At=(gt-mt)/(Tt-mt)*Math.PI-G;return At<-G?-G:At>G?G:At}function q(gt){return v.svg.arc().innerRadius((Z+U)/2-gt/2*(U-Z)).outerRadius((Z+U)/2+gt/2*(U-Z)).startAngle(-G)}function $(gt){gt.attr("d",function(mt){return q(mt.thickness).startAngle(Y(mt.range[0])).endAngle(Y(mt.range[1]))()})}var ee,ne,fe,ye;oe.enter().append("g").classed("angular",!0),oe.attr("transform",e(ae[0],ae[1])),H.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),H.selectAll("g.xangularaxistick,path,text").remove(),ee=u(N,P.gauge.axis),ee.type="linear",ee.range=P.gauge.axis.range,ee._id="xangularaxis",ee.ticklabeloverflow="allow",ee.setScale();var xe=function(gt){return(ee.range[0]-gt.x)/(ee.range[1]-ee.range[0])*Math.PI+Math.PI},Ae={},Me=s.makeLabelFns(ee,0),Ie=Me.labelStandoff;Ae.xFn=function(gt){var mt=xe(gt);return Math.cos(mt)*Ie},Ae.yFn=function(gt){var mt=xe(gt),Tt=Math.sin(mt)>0?.2:1;return-Math.sin(mt)*(Ie+gt.fontSize*Tt)+Math.abs(Math.cos(mt))*(gt.fontSize*a)},Ae.anchorFn=function(gt){var mt=xe(gt),Tt=Math.cos(mt);return Math.abs(Tt)<.1?"middle":Tt>0?"start":"end"},Ae.heightFn=function(gt,mt,Tt){var At=xe(gt);return-.5*(1+Math.sin(At))*Tt};var Ue=function(gt){return e(ae[0]+U*Math.cos(gt),ae[1]-U*Math.sin(gt))};fe=function(gt){return Ue(xe(gt))};var qe=function(gt){var mt=xe(gt);return Ue(mt)+"rotate("+-t(mt)+")"};if(ne=s.calcTicks(ee),ye=s.getTickSigns(ee)[2],ee.visible){ye=ee.ticks==="inside"?-1:1;var ke=(ee.linewidth||1)/2;s.drawTicks(N,ee,{vals:ne,layer:H,path:"M"+ye*ke+",0h"+ye*ee.ticklen,transFn:qe}),s.drawLabels(N,ee,{vals:ne,layer:H,transFn:fe,labelFns:Ae})}var ge=[Q].concat(P.gauge.steps),ue=oe.selectAll("g.bg-arc").data(ge);ue.enter().append("g").classed("bg-arc",!0).append("path"),ue.select("path").call($).call(T),ue.exit().remove();var ve=q(P.gauge.bar.thickness),se=oe.selectAll("g.value-arc").data([P.gauge.bar]);se.enter().append("g").classed("value-arc",!0).append("path");var Te=se.select("path");S(X)?(Te.transition().duration(X.duration).ease(X.easing).each("end",function(){K&&K()}).each("interrupt",function(){K&&K()}).attrTween("d",f(ve,Y(B[0].lastY),Y(B[0].y))),P._lastValue=B[0].y):Te.attr("d",typeof B[0].y=="number"?ve.endAngle(Y(B[0].y)):"M0,0Z"),Te.call(T),se.exit().remove(),ge=[];var Fe=P.gauge.threshold.value;(Fe||Fe===0)&&ge.push({range:[Fe,Fe],color:P.gauge.threshold.color,line:{color:P.gauge.threshold.line.color,width:P.gauge.threshold.line.width},thickness:P.gauge.threshold.thickness});var We=oe.selectAll("g.threshold-arc").data(ge);We.enter().append("g").classed("threshold-arc",!0).append("path"),We.select("path").call($).call(T),We.exit().remove();var Ge=oe.selectAll("g.gauge-outline").data([re]);Ge.enter().append("g").classed("gauge-outline",!0).append("path"),Ge.select("path").call($).call(T),Ge.exit().remove()}function _(N,R,B,F){var P=B[0].trace,j=F.numbersX,U=F.numbersY,Z=P.align||"center",Q=g[Z],re=F.transitionOpts,ae=F.onComplete,oe=k.ensureSingle(R,"g","numbers"),H,X,K,G=[];P._hasNumber&&G.push("number"),P._hasDelta&&(G.push("delta"),P.delta.position==="left"&&G.reverse());var Y=oe.selectAll("text").data(G);Y.enter().append("text"),Y.attr("text-anchor",function(){return Q}).attr("class",function(Ue){return Ue}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),Y.exit().remove();function q(Ue,qe,ke,ge){if(Ue.match("s")&&ke>=0!=ge>=0&&!qe(ke).slice(-1).match(w)&&!qe(ge).slice(-1).match(w)){var ue=Ue.slice().replace("s","f").replace(/\d+/,function(se){return parseInt(se)-1}),ve=u(N,{tickformat:ue});return function(se){return Math.abs(se)<1?s.tickText(ve,se).text:qe(se)}}else return qe}function $(){var Ue=u(N,{tickformat:P.number.valueformat},P._range);Ue.setScale(),s.prepTicks(Ue);var qe=function(se){return s.tickText(Ue,se).text},ke=P.number.suffix,ge=P.number.prefix,ue=oe.select("text.number");function ve(){var se=typeof B[0].y=="number"?ge+qe(B[0].y)+ke:"-";ue.text(se).call(r.font,P.number.font).call(o.convertToTspans,N)}return S(re)?ue.transition().duration(re.duration).ease(re.easing).each("end",function(){ve(),ae&&ae()}).each("interrupt",function(){ve(),ae&&ae()}).attrTween("text",function(){var se=v.select(this),Te=E(B[0].lastY,B[0].y);P._lastValue=B[0].y;var Fe=q(P.number.valueformat,qe,B[0].lastY,B[0].y);return function(We){se.text(ge+Fe(Te(We))+ke)}}):ve(),H=z(ge+qe(B[0].y)+ke,P.number.font,Q,N),ue}function ee(){var Ue=u(N,{tickformat:P.delta.valueformat},P._range);Ue.setScale(),s.prepTicks(Ue);var qe=function(We){return s.tickText(Ue,We).text},ke=P.delta.suffix,ge=P.delta.prefix,ue=function(We){var Ge=P.delta.relative?We.relativeDelta:We.delta;return Ge},ve=function(We,Ge){return We===0||typeof We!="number"||isNaN(We)?"-":(We>0?P.delta.increasing.symbol:P.delta.decreasing.symbol)+ge+Ge(We)+ke},se=function(We){return We.delta>=0?P.delta.increasing.color:P.delta.decreasing.color};P._deltaLastValue===void 0&&(P._deltaLastValue=ue(B[0]));var Te=oe.select("text.delta");Te.call(r.font,P.delta.font).call(p.fill,se({delta:P._deltaLastValue}));function Fe(){Te.text(ve(ue(B[0]),qe)).call(p.fill,se(B[0])).call(o.convertToTspans,N)}return S(re)?Te.transition().duration(re.duration).ease(re.easing).tween("text",function(){var We=v.select(this),Ge=ue(B[0]),gt=P._deltaLastValue,mt=q(P.delta.valueformat,qe,gt,Ge),Tt=E(gt,Ge);return P._deltaLastValue=Ge,function(At){We.text(ve(Tt(At),mt)),We.call(p.fill,se({delta:Tt(At)}))}}).each("end",function(){Fe(),ae&&ae()}).each("interrupt",function(){Fe(),ae&&ae()}):Fe(),X=z(ve(ue(B[0]),qe),P.delta.font,Q,N),Te}var ne=P.mode+P.align,fe;if(P._hasDelta&&(fe=ee(),ne+=P.delta.position+P.delta.font.size+P.delta.font.family+P.delta.valueformat,ne+=P.delta.increasing.symbol+P.delta.decreasing.symbol,K=X),P._hasNumber&&($(),ne+=P.number.font.size+P.number.font.family+P.number.valueformat+P.number.suffix+P.number.prefix,K=H),P._hasDelta&&P._hasNumber){var ye=[(H.left+H.right)/2,(H.top+H.bottom)/2],xe=[(X.left+X.right)/2,(X.top+X.bottom)/2],Ae,Me,Ie=.75*P.delta.font.size;P.delta.position==="left"&&(Ae=I(P,"deltaPos",0,-1*(H.width*i[P.align]+X.width*(1-i[P.align])+Ie),ne,Math.min),Me=ye[1]-xe[1],K={width:H.width+X.width+Ie,height:Math.max(H.height,X.height),left:X.left+Ae,right:H.right,top:Math.min(H.top,X.top+Me),bottom:Math.max(H.bottom,X.bottom+Me)}),P.delta.position==="right"&&(Ae=I(P,"deltaPos",0,H.width*(1-i[P.align])+X.width*i[P.align]+Ie,ne,Math.max),Me=ye[1]-xe[1],K={width:H.width+X.width+Ie,height:Math.max(H.height,X.height),left:H.left,right:X.right+Ae,top:Math.min(H.top,X.top+Me),bottom:Math.max(H.bottom,X.bottom+Me)}),P.delta.position==="bottom"&&(Ae=null,Me=X.height,K={width:Math.max(H.width,X.width),height:H.height+X.height,left:Math.min(H.left,X.left),right:Math.max(H.right,X.right),top:H.bottom-H.height,bottom:H.bottom+X.height}),P.delta.position==="top"&&(Ae=null,Me=H.top,K={width:Math.max(H.width,X.width),height:H.height+X.height,left:Math.min(H.left,X.left),right:Math.max(H.right,X.right),top:H.bottom-H.height-X.height,bottom:H.bottom}),fe.attr({dx:Ae,dy:Me})}(P._hasNumber||P._hasDelta)&&oe.attr("transform",function(){var Ue=F.numbersScaler(K);ne+=Ue[2];var qe=I(P,"numbersScale",1,Ue[0],ne,Math.min),ke;P._scaleNumbers||(qe=1),P._isAngular?ke=U-qe*K.bottom:ke=U-qe*(K.top+K.bottom)/2,P._numbersTop=qe*K.top+ke;var ge=K[Z];Z==="center"&&(ge=(K.left+K.right)/2);var ue=j-qe*ge;return ue=I(P,"numbersTranslate",0,ue,ne,Math.max),e(ue,ke)+l(qe)})}function T(N){N.each(function(R){p.stroke(v.select(this),R.line.color)}).each(function(R){p.fill(v.select(this),R.color)}).style("stroke-width",function(R){return R.line.width})}function f(N,R,B){return function(){var F=x(R,B);return function(P){return N.endAngle(F(P))()}}}function u(N,R,B){var F=N._fullLayout,P=k.extendFlat({type:"linear",ticks:"outside",range:B,showline:!0},R),j={type:"linear",_id:"x"+R._id},U={letter:"x",font:F.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function Z(Q,re){return k.coerce(P,j,h,Q,re)}return c(P,j,Z,U,F),m(P,j,Z,U),j}function A(N,R,B){var F=Math.min(R/N.width,B/N.height);return[F,N,R+"x"+B]}function b(N,R){var B=Math.sqrt(N.width/2*(N.width/2)+N.height*N.height),F=R/B;return[F,N,R]}function z(N,R,B,F){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),j=v.select(P);return j.text(N).attr("x",0).attr("y",0).attr("text-anchor",B).attr("data-unformatted",N).call(o.convertToTspans,F).call(r.font,R),r.bBox(j.node())}function I(N,R,B,F,P,j){var U="_cache"+R;N[U]&&N[U].key===P||(N[U]={key:P,value:B});var Z=k.aggNums(j,null,[N[U].value,F],2);return N[U].value=Z,Z}}}),dP=Ee({"src/traces/indicator/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"indicator",basePlotModule:uP(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:w5(),supplyDefaults:cP().supplyDefaults,calc:fP().calc,plot:hP(),meta:{}}}}),vP=Ee({"lib/indicator.js"(J,V){"use strict";V.exports=dP()}}),A5=Ee({"src/traces/table/attributes.js"(J,V){"use strict";var v=Kd(),x=vo().extendFlat,E=El().overrideAll,k=Xs(),l=kl().attributes,e=Fl().descriptionOnlyNumbers,t=V.exports=E({domain:l({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:x({},v.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:x({},k({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:x({},v.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:x({},k({arrayOk:!0}))}},"calc","from-root")}}),pP=Ee({"src/traces/table/defaults.js"(J,V){"use strict";var v=Vr(),x=A5(),E=kl().defaults;function k(l,e){for(var t=l.columnorder||[],a=l.header.values.length,r=t.slice(0,a),n=r.slice().sort(function(c,m){return c-m}),o=r.map(function(c){return n.indexOf(c)}),s=o.length;s",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}}),gP=Ee({"src/traces/table/data_preparation_helper.js"(J,V){"use strict";var v=M5(),x=vo().extendFlat,E=mi(),k=vs().isTypedArray,l=vs().isArrayOrTypedArray;V.exports=function(h,p){var g=a(p.cells.values),i=function(Q){return Q.slice(p.header.values.length,Q.length)},w=a(p.header.values);w.length&&!w[0].length&&(w[0]=[""],w=a(w));var S=w.concat(i(g).map(function(){return r((w[0]||[""]).length)})),M=p.domain,C=Math.floor(h._fullLayout._size.w*(M.x[1]-M.x[0])),_=Math.floor(h._fullLayout._size.h*(M.y[1]-M.y[0])),T=p.header.values.length?S[0].map(function(){return p.header.height}):[v.emptyHeaderHeight],f=g.length?g[0].map(function(){return p.cells.height}):[],u=T.reduce(t,0),A=_-u,b=A+v.uplift,z=s(f,b),I=s(T,u),N=o(I,[]),R=o(z,N),B={},F=p.columnorder;l(F)&&(F=Array.from(F)),F=F.concat(i(g.map(function(Q,re){return re})));var P=S.map(function(Q,re){var ae=l(p.columnwidth)?p.columnwidth[Math.min(re,p.columnwidth.length-1)]:p.columnwidth;return E(ae)?Number(ae):1}),j=P.reduce(t,0);P=P.map(function(Q){return Q/j*C});var U=Math.max(e(p.header.line.width),e(p.cells.line.width)),Z={key:p.uid+h._context.staticPlot,translateX:M.x[0]*h._fullLayout._size.w,translateY:h._fullLayout._size.h*(1-M.y[1]),size:h._fullLayout._size,width:C,maxLineWidth:U,height:_,columnOrder:F,groupHeight:_,rowBlocks:R,headerRowBlocks:N,scrollY:0,cells:x({},p.cells,{values:g}),headerCells:x({},p.header,{values:S}),gdColumns:S.map(function(Q){return Q[0]}),gdColumnsOriginalOrder:S.map(function(Q){return Q[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:S.map(function(Q,re){var ae=B[Q];B[Q]=(ae||0)+1;var oe=Q+"__"+B[Q];return{key:oe,label:Q,specIndex:re,xIndex:F[re],xScale:n,x:void 0,calcdata:void 0,columnWidth:P[re]}})};return Z.columns.forEach(function(Q){Q.calcdata=Z,Q.x=n(Q)}),Z};function e(m){if(l(m)){for(var h=0,p=0;p=h||_===m.length-1)&&(p[i]=S,S.key=C++,S.firstRowIndex=M,S.lastRowIndex=_,S=c(),i+=w,M=_+1,w=0);return p}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),yP=Ee({"src/traces/table/data_split_helpers.js"(J){"use strict";var V=vo().extendFlat;J.splitToPanels=function(x){var E=[0,0],k=V({},x,{key:"header",type:"header",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!0,values:x.calcdata.headerCells.values[x.specIndex],rowBlocks:x.calcdata.headerRowBlocks,calcdata:V({},x.calcdata,{cells:x.calcdata.headerCells})}),l=V({},x,{key:"cells1",type:"cells",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:x.calcdata.cells.values[x.specIndex],rowBlocks:x.calcdata.rowBlocks}),e=V({},x,{key:"cells2",type:"cells",page:1,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:x.calcdata.cells.values[x.specIndex],rowBlocks:x.calcdata.rowBlocks});return[l,e,k]},J.splitToCells=function(x){var E=v(x);return(x.values||[]).slice(E[0],E[1]).map(function(k,l){var e=typeof k=="string"&&k.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:l+e,key:E[0]+l,column:x,calcdata:x.calcdata,page:x.page,rowBlocks:x.rowBlocks,value:k}})};function v(x){var E=x.rowBlocks[x.page],k=E?E.rows[0].rowIndex:0,l=E?k+E.rows.length:0;return[k,l]}}}),S5=Ee({"src/traces/table/plot.js"(J,V){"use strict";var v=M5(),x=Hn(),E=Vr(),k=E.numberFormat,l=Qh(),e=yo(),t=Fs(),a=Vr().raiseToTop,r=Vr().strTranslate,n=Vr().cancelTransition,o=gP(),s=yP(),c=Qa();V.exports=function(ne,fe){var ye=!ne._context.staticPlot,xe=ne._fullLayout._paper.selectAll("."+v.cn.table).data(fe.map(function(Ge){var gt=l.unwrap(Ge),mt=gt.trace;return o(ne,mt)}),l.keyFun);xe.exit().remove(),xe.enter().append("g").classed(v.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),xe.attr("width",function(Ge){return Ge.width+Ge.size.l+Ge.size.r}).attr("height",function(Ge){return Ge.height+Ge.size.t+Ge.size.b}).attr("transform",function(Ge){return r(Ge.translateX,Ge.translateY)});var Ae=xe.selectAll("."+v.cn.tableControlView).data(l.repeat,l.keyFun),Me=Ae.enter().append("g").classed(v.cn.tableControlView,!0).style("box-sizing","content-box");if(ye){var Ie="onwheel"in document?"wheel":"mousewheel";Me.on("mousemove",function(Ge){Ae.filter(function(gt){return Ge===gt}).call(i,ne)}).on(Ie,function(Ge){if(!Ge.scrollbarState.wheeling){Ge.scrollbarState.wheeling=!0;var gt=Ge.scrollY+x.event.deltaY,mt=Q(ne,Ae,null,gt)(Ge);mt||(x.event.stopPropagation(),x.event.preventDefault()),Ge.scrollbarState.wheeling=!1}}).call(i,ne,!0)}Ae.attr("transform",function(Ge){return r(Ge.size.l,Ge.size.t)});var Ue=Ae.selectAll("."+v.cn.scrollBackground).data(l.repeat,l.keyFun);Ue.enter().append("rect").classed(v.cn.scrollBackground,!0).attr("fill","none"),Ue.attr("width",function(Ge){return Ge.width}).attr("height",function(Ge){return Ge.height}),Ae.each(function(Ge){e.setClipUrl(x.select(this),h(ne,Ge),ne)});var qe=Ae.selectAll("."+v.cn.yColumn).data(function(Ge){return Ge.columns},l.keyFun);qe.enter().append("g").classed(v.cn.yColumn,!0),qe.exit().remove(),qe.attr("transform",function(Ge){return r(Ge.x,0)}),ye&&qe.call(x.behavior.drag().origin(function(Ge){var gt=x.select(this);return B(gt,Ge,-v.uplift),a(this),Ge.calcdata.columnDragInProgress=!0,i(Ae.filter(function(mt){return Ge.calcdata.key===mt.key}),ne),Ge}).on("drag",function(Ge){var gt=x.select(this),mt=function(Kt){return(Ge===Kt?x.event.x:Kt.x)+Kt.columnWidth/2};Ge.x=Math.max(-v.overdrag,Math.min(Ge.calcdata.width+v.overdrag-Ge.columnWidth,x.event.x));var Tt=g(qe).filter(function(Kt){return Kt.calcdata.key===Ge.calcdata.key}),At=Tt.sort(function(Kt,nr){return mt(Kt)-mt(nr)});At.forEach(function(Kt,nr){Kt.xIndex=nr,Kt.x=Ge===Kt?Kt.x:Kt.xScale(Kt)}),qe.filter(function(Kt){return Ge!==Kt}).transition().ease(v.transitionEase).duration(v.transitionDuration).attr("transform",function(Kt){return r(Kt.x,0)}),gt.call(n).attr("transform",r(Ge.x,-v.uplift))}).on("dragend",function(Ge){var gt=x.select(this),mt=Ge.calcdata;Ge.x=Ge.xScale(Ge),Ge.calcdata.columnDragInProgress=!1,B(gt,Ge,0),N(ne,mt,mt.columns.map(function(Tt){return Tt.xIndex}))})),qe.each(function(Ge){e.setClipUrl(x.select(this),p(ne,Ge),ne)});var ke=qe.selectAll("."+v.cn.columnBlock).data(s.splitToPanels,l.keyFun);ke.enter().append("g").classed(v.cn.columnBlock,!0).attr("id",function(Ge){return Ge.key}),ke.style("cursor",function(Ge){return Ge.dragHandle?"ew-resize":Ge.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var ge=ke.filter(P),ue=ke.filter(F);ye&&ue.call(x.behavior.drag().origin(function(Ge){return x.event.stopPropagation(),Ge}).on("drag",Q(ne,Ae,-1)).on("dragend",function(){})),w(ne,Ae,ge,ke),w(ne,Ae,ue,ke);var ve=Ae.selectAll("."+v.cn.scrollAreaClip).data(l.repeat,l.keyFun);ve.enter().append("clipPath").classed(v.cn.scrollAreaClip,!0).attr("id",function(Ge){return h(ne,Ge)});var se=ve.selectAll("."+v.cn.scrollAreaClipRect).data(l.repeat,l.keyFun);se.enter().append("rect").classed(v.cn.scrollAreaClipRect,!0).attr("x",-v.overdrag).attr("y",-v.uplift).attr("fill","none"),se.attr("width",function(Ge){return Ge.width+2*v.overdrag}).attr("height",function(Ge){return Ge.height+v.uplift});var Te=qe.selectAll("."+v.cn.columnBoundary).data(l.repeat,l.keyFun);Te.enter().append("g").classed(v.cn.columnBoundary,!0);var Fe=qe.selectAll("."+v.cn.columnBoundaryClippath).data(l.repeat,l.keyFun);Fe.enter().append("clipPath").classed(v.cn.columnBoundaryClippath,!0),Fe.attr("id",function(Ge){return p(ne,Ge)});var We=Fe.selectAll("."+v.cn.columnBoundaryRect).data(l.repeat,l.keyFun);We.enter().append("rect").classed(v.cn.columnBoundaryRect,!0).attr("fill","none"),We.attr("width",function(Ge){return Ge.columnWidth+2*m(Ge)}).attr("height",function(Ge){return Ge.calcdata.height+2*m(Ge)+v.uplift}).attr("x",function(Ge){return-m(Ge)}).attr("y",function(Ge){return-m(Ge)}),Z(null,ue,Ae)};function m(ee){return Math.ceil(ee.calcdata.maxLineWidth/2)}function h(ee,ne){return"clip"+ee._fullLayout._uid+"_scrollAreaBottomClip_"+ne.key}function p(ee,ne){return"clip"+ee._fullLayout._uid+"_columnBoundaryClippath_"+ne.calcdata.key+"_"+ne.specIndex}function g(ee){return[].concat.apply([],ee.map(function(ne){return ne})).map(function(ne){return ne.__data__})}function i(ee,ne,fe){function ye(qe){var ke=qe.rowBlocks;return K(ke,ke.length-1)+(ke.length?G(ke[ke.length-1],1/0):1)}var xe=ee.selectAll("."+v.cn.scrollbarKit).data(l.repeat,l.keyFun);xe.enter().append("g").classed(v.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),xe.each(function(qe){var ke=qe.scrollbarState;ke.totalHeight=ye(qe),ke.scrollableAreaHeight=qe.groupHeight-j(qe),ke.currentlyVisibleHeight=Math.min(ke.totalHeight,ke.scrollableAreaHeight),ke.ratio=ke.currentlyVisibleHeight/ke.totalHeight,ke.barLength=Math.max(ke.ratio*ke.currentlyVisibleHeight,v.goldenRatio*v.scrollbarWidth),ke.barWiggleRoom=ke.currentlyVisibleHeight-ke.barLength,ke.wiggleRoom=Math.max(0,ke.totalHeight-ke.scrollableAreaHeight),ke.topY=ke.barWiggleRoom===0?0:qe.scrollY/ke.wiggleRoom*ke.barWiggleRoom,ke.bottomY=ke.topY+ke.barLength,ke.dragMultiplier=ke.wiggleRoom/ke.barWiggleRoom}).attr("transform",function(qe){var ke=qe.width+v.scrollbarWidth/2+v.scrollbarOffset;return r(ke,j(qe))});var Ae=xe.selectAll("."+v.cn.scrollbar).data(l.repeat,l.keyFun);Ae.enter().append("g").classed(v.cn.scrollbar,!0);var Me=Ae.selectAll("."+v.cn.scrollbarSlider).data(l.repeat,l.keyFun);Me.enter().append("g").classed(v.cn.scrollbarSlider,!0),Me.attr("transform",function(qe){return r(0,qe.scrollbarState.topY||0)});var Ie=Me.selectAll("."+v.cn.scrollbarGlyph).data(l.repeat,l.keyFun);Ie.enter().append("line").classed(v.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",v.scrollbarWidth).attr("stroke-linecap","round").attr("y1",v.scrollbarWidth/2),Ie.attr("y2",function(qe){return qe.scrollbarState.barLength-v.scrollbarWidth/2}).attr("stroke-opacity",function(qe){return qe.columnDragInProgress||!qe.scrollbarState.barWiggleRoom||fe?0:.4}),Ie.transition().delay(0).duration(0),Ie.transition().delay(v.scrollbarHideDelay).duration(v.scrollbarHideDuration).attr("stroke-opacity",0);var Ue=Ae.selectAll("."+v.cn.scrollbarCaptureZone).data(l.repeat,l.keyFun);Ue.enter().append("line").classed(v.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",v.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(qe){var ke=x.event.y,ge=this.getBoundingClientRect(),ue=qe.scrollbarState,ve=ke-ge.top,se=x.scale.linear().domain([0,ue.scrollableAreaHeight]).range([0,ue.totalHeight]).clamp(!0);ue.topY<=ve&&ve<=ue.bottomY||Q(ne,ee,null,se(ve-ue.barLength/2))(qe)}).call(x.behavior.drag().origin(function(qe){return x.event.stopPropagation(),qe.scrollbarState.scrollbarScrollInProgress=!0,qe}).on("drag",Q(ne,ee)).on("dragend",function(){})),Ue.attr("y2",function(qe){return qe.scrollbarState.scrollableAreaHeight}),ne._context.staticPlot&&(Ie.remove(),Ue.remove())}function w(ee,ne,fe,ye){var xe=S(fe),Ae=M(xe);f(Ae);var Me=C(Ae);A(Me);var Ie=T(Ae),Ue=_(Ie);u(Ue),b(Ue,ne,ye,ee),X(Ae)}function S(ee){var ne=ee.selectAll("."+v.cn.columnCells).data(l.repeat,l.keyFun);return ne.enter().append("g").classed(v.cn.columnCells,!0),ne.exit().remove(),ne}function M(ee){var ne=ee.selectAll("."+v.cn.columnCell).data(s.splitToCells,function(fe){return fe.keyWithinBlock});return ne.enter().append("g").classed(v.cn.columnCell,!0),ne.exit().remove(),ne}function C(ee){var ne=ee.selectAll("."+v.cn.cellRect).data(l.repeat,function(fe){return fe.keyWithinBlock});return ne.enter().append("rect").classed(v.cn.cellRect,!0),ne}function _(ee){var ne=ee.selectAll("."+v.cn.cellText).data(l.repeat,function(fe){return fe.keyWithinBlock});return ne.enter().append("text").classed(v.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){x.event.stopPropagation()}),ne}function T(ee){var ne=ee.selectAll("."+v.cn.cellTextHolder).data(l.repeat,function(fe){return fe.keyWithinBlock});return ne.enter().append("g").classed(v.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ne}function f(ee){ee.each(function(ne,fe){var ye=ne.calcdata.cells.font,xe=ne.column.specIndex,Ae={size:R(ye.size,xe,fe),color:R(ye.color,xe,fe),family:R(ye.family,xe,fe),weight:R(ye.weight,xe,fe),style:R(ye.style,xe,fe),variant:R(ye.variant,xe,fe),textcase:R(ye.textcase,xe,fe),lineposition:R(ye.lineposition,xe,fe),shadow:R(ye.shadow,xe,fe)};ne.rowNumber=ne.key,ne.align=R(ne.calcdata.cells.align,xe,fe),ne.cellBorderWidth=R(ne.calcdata.cells.line.width,xe,fe),ne.font=Ae})}function u(ee){ee.each(function(ne){e.font(x.select(this),ne.font)})}function A(ee){ee.attr("width",function(ne){return ne.column.columnWidth}).attr("stroke-width",function(ne){return ne.cellBorderWidth}).each(function(ne){var fe=x.select(this);c.stroke(fe,R(ne.calcdata.cells.line.color,ne.column.specIndex,ne.rowNumber)),c.fill(fe,R(ne.calcdata.cells.fill.color,ne.column.specIndex,ne.rowNumber))})}function b(ee,ne,fe,ye){ee.text(function(xe){var Ae=xe.column.specIndex,Me=xe.rowNumber,Ie=xe.value,Ue=typeof Ie=="string",qe=Ue&&Ie.match(/
/i),ke=!Ue||qe;xe.mayHaveMarkup=Ue&&Ie.match(/[<&>]/);var ge=z(Ie);xe.latex=ge;var ue=ge?"":R(xe.calcdata.cells.prefix,Ae,Me)||"",ve=ge?"":R(xe.calcdata.cells.suffix,Ae,Me)||"",se=ge?null:R(xe.calcdata.cells.format,Ae,Me)||null,Te=ue+(se?k(se)(xe.value):xe.value)+ve,Fe;xe.wrappingNeeded=!xe.wrapped&&!ke&&!ge&&(Fe=I(Te)),xe.cellHeightMayIncrease=qe||ge||xe.mayHaveMarkup||(Fe===void 0?I(Te):Fe),xe.needsConvertToTspans=xe.mayHaveMarkup||xe.wrappingNeeded||xe.latex;var We;if(xe.wrappingNeeded){var Ge=v.wrapSplitCharacter===" "?Te.replace(/xe&&ye.push(Ae),xe+=Ue}return ye}function Z(ee,ne,fe){var ye=g(ne)[0];if(ye!==void 0){var xe=ye.rowBlocks,Ae=ye.calcdata,Me=K(xe,xe.length),Ie=ye.calcdata.groupHeight-j(ye),Ue=Ae.scrollY=Math.max(0,Math.min(Me-Ie,Ae.scrollY)),qe=U(xe,Ue,Ie);qe.length===1&&(qe[0]===xe.length-1?qe.unshift(qe[0]-1):qe.push(qe[0]+1)),qe[0]%2&&qe.reverse(),ne.each(function(ke,ge){ke.page=qe[ge],ke.scrollY=Ue}),ne.attr("transform",function(ke){var ge=K(ke.rowBlocks,ke.page)-ke.scrollY;return r(0,ge)}),ee&&(re(ee,fe,ne,qe,ye.prevPages,ye,0),re(ee,fe,ne,qe,ye.prevPages,ye,1),i(fe,ee))}}function Q(ee,ne,fe,ye){return function(Ae){var Me=Ae.calcdata?Ae.calcdata:Ae,Ie=ne.filter(function(ge){return Me.key===ge.key}),Ue=fe||Me.scrollbarState.dragMultiplier,qe=Me.scrollY;Me.scrollY=ye===void 0?Me.scrollY+Ue*x.event.dy:ye;var ke=Ie.selectAll("."+v.cn.yColumn).selectAll("."+v.cn.columnBlock).filter(F);return Z(ee,ke,Ie),Me.scrollY===qe}}function re(ee,ne,fe,ye,xe,Ae,Me){var Ie=ye[Me]!==xe[Me];Ie&&(clearTimeout(Ae.currentRepaint[Me]),Ae.currentRepaint[Me]=setTimeout(function(){var Ue=fe.filter(function(qe,ke){return ke===Me&&ye[ke]!==xe[ke]});w(ee,ne,Ue,fe),xe[Me]=ye[Me]}))}function ae(ee,ne,fe,ye){return function(){var Ae=x.select(ne.parentNode);Ae.each(function(Me){var Ie=Me.fragments;Ae.selectAll("tspan.line").each(function(Te,Fe){Ie[Fe].width=this.getComputedTextLength()});var Ue=Ie[Ie.length-1].width,qe=Ie.slice(0,-1),ke=[],ge,ue,ve=0,se=Me.column.columnWidth-2*v.cellPad;for(Me.value="";qe.length;)ge=qe.shift(),ue=ge.width+Ue,ve+ue>se&&(Me.value+=ke.join(v.wrapSpacer)+v.lineBreaker,ke=[],ve=0),ke.push(ge.text),ve+=ue;ve&&(Me.value+=ke.join(v.wrapSpacer)),Me.wrapped=!0}),Ae.selectAll("tspan.line").remove(),b(Ae.select("."+v.cn.cellText),fe,ee,ye),x.select(ne.parentNode.parentNode).call(X)}}function oe(ee,ne,fe,ye,xe){return function(){if(!xe.settledY){var Me=x.select(ne.parentNode),Ie=q(xe),Ue=xe.key-Ie.firstRowIndex,qe=Ie.rows[Ue].rowHeight,ke=xe.cellHeightMayIncrease?ne.parentNode.getBoundingClientRect().height+2*v.cellPad:qe,ge=Math.max(ke,qe),ue=ge-Ie.rows[Ue].rowHeight;ue&&(Ie.rows[Ue].rowHeight=ge,ee.selectAll("."+v.cn.columnCell).call(X),Z(null,ee.filter(F),0),i(fe,ye,!0)),Me.attr("transform",function(){var ve=this,se=ve.parentNode,Te=se.getBoundingClientRect(),Fe=x.select(ve.parentNode).select("."+v.cn.cellRect).node().getBoundingClientRect(),We=ve.transform.baseVal.consolidate(),Ge=Fe.top-Te.top+(We?We.matrix.f:v.cellPad);return r(H(xe,x.select(ve.parentNode).select("."+v.cn.cellTextHolder).node().getBoundingClientRect().width),Ge)}),xe.settledY=!0}}}function H(ee,ne){switch(ee.align){case"left":return v.cellPad;case"right":return ee.column.columnWidth-(ne||0)-v.cellPad;case"center":return(ee.column.columnWidth-(ne||0))/2;default:return v.cellPad}}function X(ee){ee.attr("transform",function(ne){var fe=ne.rowBlocks[0].auxiliaryBlocks.reduce(function(Me,Ie){return Me+G(Ie,1/0)},0),ye=q(ne),xe=G(ye,ne.key),Ae=xe+fe;return r(0,Ae)}).selectAll("."+v.cn.cellRect).attr("height",function(ne){return $(q(ne),ne.key).rowHeight})}function K(ee,ne){for(var fe=0,ye=ne-1;ye>=0;ye--)fe+=Y(ee[ye]);return fe}function G(ee,ne){for(var fe=0,ye=0;yek.length&&(E=E.slice(0,k.length)):E=[],e=0;e90&&(h-=180,n=-n),{angle:h,flip:n,p:x.c2p(l,E,k),offsetMultplier:o}}}}),kP=Ee({"src/traces/carpet/plot.js"(J,V){"use strict";var v=Hn(),x=yo(),E=E5(),k=k5(),l=EP(),e=Fs(),t=Vr(),a=t.strRotate,r=t.strTranslate,n=rc();V.exports=function(w,S,M,C){var _=w._context.staticPlot,T=S.xaxis,f=S.yaxis,u=w._fullLayout,A=u._clips;t.makeTraceGroups(C,M,"trace").each(function(b){var z=v.select(this),I=b[0],N=I.trace,R=N.aaxis,B=N.baxis,F=t.ensureSingle(z,"g","minorlayer"),P=t.ensureSingle(z,"g","majorlayer"),j=t.ensureSingle(z,"g","boundarylayer"),U=t.ensureSingle(z,"g","labellayer");z.style("opacity",N.opacity),s(T,f,P,R,"a",R._gridlines,!0,_),s(T,f,P,B,"b",B._gridlines,!0,_),s(T,f,F,R,"a",R._minorgridlines,!0,_),s(T,f,F,B,"b",B._minorgridlines,!0,_),s(T,f,j,R,"a-boundary",R._boundarylines,_),s(T,f,j,B,"b-boundary",B._boundarylines,_);var Z=c(w,T,f,N,I,U,R._labels,"a-label"),Q=c(w,T,f,N,I,U,B._labels,"b-label");m(w,U,N,I,T,f,Z,Q),o(N,I,A,T,f)})};function o(i,w,S,M,C){var _,T,f,u,A=S.select("#"+i._clipPathId);A.size()||(A=S.append("clipPath").classed("carpetclip",!0));var b=t.ensureSingle(A,"path","carpetboundary"),z=w.clipsegments,I=[];for(u=0;u0?"start":"end","data-notex":1}).call(x.font,z.font).text(z.text).call(e.convertToTspans,i),P=x.bBox(this);F.attr("transform",r(N.p[0],N.p[1])+a(N.angle)+r(z.axis.labelpadding*B,P.height*.3)),A=Math.max(A,P.width+z.axis.labelpadding)}),u.exit().remove(),b.maxExtent=A,b}function m(i,w,S,M,C,_,T,f){var u,A,b,z,I=t.aggNums(Math.min,null,S.a),N=t.aggNums(Math.max,null,S.a),R=t.aggNums(Math.min,null,S.b),B=t.aggNums(Math.max,null,S.b);u=.5*(I+N),A=R,b=S.ab2xy(u,A,!0),z=S.dxyda_rough(u,A),T.angle===void 0&&t.extendFlat(T,l(S,C,_,b,S.dxydb_rough(u,A))),g(i,w,S,M,b,z,S.aaxis,C,_,T,"a-title"),u=I,A=.5*(R+B),b=S.ab2xy(u,A,!0),z=S.dxydb_rough(u,A),f.angle===void 0&&t.extendFlat(f,l(S,C,_,b,S.dxyda_rough(u,A))),g(i,w,S,M,b,z,S.baxis,C,_,f,"b-title")}var h=n.LINE_SPACING,p=(1-n.MID_SHIFT)/h+1;function g(i,w,S,M,C,_,T,f,u,A,b){var z=[];T.title.text&&z.push(T.title.text);var I=w.selectAll("text."+b).data(z),N=A.maxExtent;I.enter().append("text").classed(b,!0),I.each(function(){var R=l(S,f,u,C,_);["start","both"].indexOf(T.showticklabels)===-1&&(N=0);var B=T.title.font.size;N+=B+T.title.offset;var F=A.angle+(A.flip<0?180:0),P=(F-R.angle+450)%360,j=P>90&&P<270,U=v.select(this);U.text(T.title.text).call(e.convertToTspans,i),j&&(N=(-e.lineCount(U)+p)*h*B-N),U.attr("transform",r(R.p[0],R.p[1])+a(R.angle)+r(0,N)).attr("text-anchor","middle").call(x.font,T.title.font)}),I.exit().remove()}}}),CP=Ee({"src/traces/carpet/cheater_basis.js"(J,V){"use strict";var v=Vr().isArrayOrTypedArray;V.exports=function(x,E,k){var l,e,t,a,r,n,o=[],s=v(x)?x.length:x,c=v(E)?E.length:E,m=v(x)?x:null,h=v(E)?E:null;m&&(t=(m.length-1)/(m[m.length-1]-m[0])/(s-1)),h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(c-1));var p,g=1/0,i=-1/0;for(e=0;e=10)return null;for(var l=1/0,e=-1/0,t=E.length,a=0;a0&&(G=k.dxydi([],Z-1,re,0,ae),ee.push(oe[0]+G[0]/3),ne.push(oe[1]+G[1]/3),Y=k.dxydi([],Z-1,re,1,ae),ee.push(K[0]-Y[0]/3),ne.push(K[1]-Y[1]/3)),ee.push(K[0]),ne.push(K[1]),oe=K;else for(Z=k.a2i(U),H=Math.floor(Math.max(0,Math.min(R-2,Z))),X=Z-H,fe.length=R,fe.crossLength=B,fe.xy=function(ye){return k.evalxy([],Z,ye)},fe.dxy=function(ye,xe){return k.dxydj([],H,ye,X,xe)},Q=0;Q0&&(q=k.dxydj([],H,Q-1,X,0),ee.push(oe[0]+q[0]/3),ne.push(oe[1]+q[1]/3),$=k.dxydj([],H,Q-1,X,1),ee.push(K[0]-$[0]/3),ne.push(K[1]-$[1]/3)),ee.push(K[0]),ne.push(K[1]),oe=K;return fe.axisLetter=l,fe.axis=C,fe.crossAxis=A,fe.value=U,fe.constvar=e,fe.index=m,fe.x=ee,fe.y=ne,fe.smoothing=A.smoothing,fe}function j(U){var Z,Q,re,ae,oe,H=[],X=[],K={};if(K.length=M.length,K.crossLength=u.length,l==="b")for(re=Math.max(0,Math.min(B-2,U)),oe=Math.min(1,Math.max(0,U-re)),K.xy=function(G){return k.evalxy([],G,U)},K.dxy=function(G,Y){return k.dxydi([],G,re,Y,oe)},Z=0;ZM.length-1)&&_.push(x(j(a),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(m=s;mM.length-1)&&!(g<0||g>M.length-1))for(i=M[r],w=M[g],t=0;tM[M.length-1])&&T.push(x(P(p),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash})));C.startline&&f.push(x(j(0),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&f.push(x(j(M.length-1),{color:C.endlinecolor,width:C.endlinewidth}))}else{for(n=5e-15,o=[Math.floor((M[M.length-1]-C.tick0)/C.dtick*(1+n)),Math.ceil((M[0]-C.tick0)/C.dtick/(1+n))].sort(function(U,Z){return U-Z}),s=o[0],c=o[1],m=s;m<=c;m++)h=C.tick0+C.dtick*m,_.push(x(P(h),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(m=s-1;mM[M.length-1])&&T.push(x(P(p),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash}));C.startline&&f.push(x(P(M[0]),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&f.push(x(P(M[M.length-1]),{color:C.endlinecolor,width:C.endlinewidth}))}}}}),DP=Ee({"src/traces/carpet/calc_labels.js"(J,V){"use strict";var v=uo(),x=vo().extendFlat;V.exports=function(k,l){var e,t,a,r,n,o=l._labels=[],s=l._gridlines;for(e=0;e=0;e--)t[s-e]=x[c][e],a[s-e]=E[c][e];for(r.push({x:t,y:a,bicubic:n}),e=c,t=[],a=[];e>=0;e--)t[c-e]=x[e][0],a[c-e]=E[e][0];return r.push({x:t,y:a,bicubic:o}),r}}}),RP=Ee({"src/traces/carpet/smooth_fill_2d_array.js"(J,V){"use strict";var v=Vr();V.exports=function(E,k,l){var e,t,a,r=[],n=[],o=E[0].length,s=E.length;function c(Q,re){var ae=0,oe,H=0;return Q>0&&(oe=E[re][Q-1])!==void 0&&(H++,ae+=oe),Q0&&(oe=E[re-1][Q])!==void 0&&(H++,ae+=oe),re0&&t0&&eu);return v.log("Smoother converged to",A,"after",z,"iterations"),E}}}),FP=Ee({"src/traces/carpet/constants.js"(J,V){"use strict";V.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),zP=Ee({"src/traces/carpet/catmull_rom.js"(J,V){"use strict";var v=.5;V.exports=function(E,k,l,e){var t=E[0]-k[0],a=E[1]-k[1],r=l[0]-k[0],n=l[1]-k[1],o=Math.pow(t*t+a*a,v/2),s=Math.pow(r*r+n*n,v/2),c=(s*s*t-o*o*r)*e,m=(s*s*a-o*o*n)*e,h=s*(o+s)*3,p=o*(o+s)*3;return[[k[0]+(h&&c/h),k[1]+(h&&m/h)],[k[0]-(p&&c/p),k[1]-(p&&m/p)]]}}}),BP=Ee({"src/traces/carpet/compute_control_points.js"(J,V){"use strict";var v=zP(),x=Vr().ensureArray;function E(k,l,e){var t=-.5*e[0]+1.5*l[0],a=-.5*e[1]+1.5*l[1];return[(2*t+k[0])/3,(2*a+k[1])/3]}V.exports=function(l,e,t,a,r,n){var o,s,c,m,h,p,g,i,w,S,M=t[0].length,C=t.length,_=r?3*M-2:M,T=n?3*C-2:C;for(l=x(l,T),e=x(e,T),c=0;ch&&_g&&Tp||Ti},a.setScale=function(){var _=a._x,T=a._y,f=E(a._xctrl,a._yctrl,_,T,c.smoothing,m.smoothing);a._xctrl=f[0],a._yctrl=f[1],a.evalxy=k([a._xctrl,a._yctrl],o,s,c.smoothing,m.smoothing),a.dxydi=l([a._xctrl,a._yctrl],c.smoothing,m.smoothing),a.dxydj=e([a._xctrl,a._yctrl],c.smoothing,m.smoothing)},a.i2a=function(_){var T=Math.max(0,Math.floor(_[0]),o-2),f=_[0]-T;return(1-f)*r[T]+f*r[T+1]},a.j2b=function(_){var T=Math.max(0,Math.floor(_[1]),o-2),f=_[1]-T;return(1-f)*n[T]+f*n[T+1]},a.ij2ab=function(_){return[a.i2a(_[0]),a.j2b(_[1])]},a.a2i=function(_){var T=Math.max(0,Math.min(x(_,r),o-2)),f=r[T],u=r[T+1];return Math.max(0,Math.min(o-1,T+(_-f)/(u-f)))},a.b2j=function(_){var T=Math.max(0,Math.min(x(_,n),s-2)),f=n[T],u=n[T+1];return Math.max(0,Math.min(s-1,T+(_-f)/(u-f)))},a.ab2ij=function(_){return[a.a2i(_[0]),a.b2j(_[1])]},a.i2c=function(_,T){return a.evalxy([],_,T)},a.ab2xy=function(_,T,f){if(!f&&(_r[o-1]|Tn[s-1]))return[!1,!1];var u=a.a2i(_),A=a.b2j(T),b=a.evalxy([],u,A);if(f){var z=0,I=0,N=[],R,B,F,P;_r[o-1]?(R=o-2,B=1,z=(_-r[o-1])/(r[o-1]-r[o-2])):(R=Math.max(0,Math.min(o-2,Math.floor(u))),B=u-R),Tn[s-1]?(F=s-2,P=1,I=(T-n[s-1])/(n[s-1]-n[s-2])):(F=Math.max(0,Math.min(s-2,Math.floor(A))),P=A-F),z&&(a.dxydi(N,R,F,B,P),b[0]+=N[0]*z,b[1]+=N[1]*z),I&&(a.dxydj(N,R,F,B,P),b[0]+=N[0]*I,b[1]+=N[1]*I)}return b},a.c2p=function(_,T,f){return[T.c2p(_[0]),f.c2p(_[1])]},a.p2x=function(_,T,f){return[T.p2c(_[0]),f.p2c(_[1])]},a.dadi=function(_){var T=Math.max(0,Math.min(r.length-2,_));return r[T+1]-r[T]},a.dbdj=function(_){var T=Math.max(0,Math.min(n.length-2,_));return n[T+1]-n[T]},a.dxyda=function(_,T,f,u){var A=a.dxydi(null,_,T,f,u),b=a.dadi(_,f);return[A[0]/b,A[1]/b]},a.dxydb=function(_,T,f,u){var A=a.dxydj(null,_,T,f,u),b=a.dbdj(T,u);return[A[0]/b,A[1]/b]},a.dxyda_rough=function(_,T,f){var u=w*(f||.1),A=a.ab2xy(_+u,T,!0),b=a.ab2xy(_-u,T,!0);return[(A[0]-b[0])*.5/u,(A[1]-b[1])*.5/u]},a.dxydb_rough=function(_,T,f){var u=S*(f||.1),A=a.ab2xy(_,T+u,!0),b=a.ab2xy(_,T-u,!0);return[(A[0]-b[0])*.5/u,(A[1]-b[1])*.5/u]},a.dpdx=function(_){return _._m},a.dpdy=function(_){return _._m}}}}),qP=Ee({"src/traces/carpet/calc.js"(J,V){"use strict";var v=uo(),x=Vr().isArray1D,E=CP(),k=LP(),l=PP(),e=DP(),t=IP(),a=f1(),r=RP(),n=c1(),o=UP();V.exports=function(c,m){var h=v.getFromId(c,m.xaxis),p=v.getFromId(c,m.yaxis),g=m.aaxis,i=m.baxis,w=m.x,S=m.y,M=[];w&&x(w)&&M.push("x"),S&&x(S)&&M.push("y"),M.length&&n(m,g,i,"a","b",M);var C=m._a=m._a||m.a,_=m._b=m._b||m.b;w=m._x||m.x,S=m._y||m.y;var T={};if(m._cheater){var f=g.cheatertype==="index"?C.length:C,u=i.cheatertype==="index"?_.length:_;w=E(f,u,m.cheaterslope)}m._x=w=a(w),m._y=S=a(S),r(w,C,_),r(S,C,_),o(m),m.setScale();var A=k(w),b=k(S),z=.5*(A[1]-A[0]),I=.5*(A[1]+A[0]),N=.5*(b[1]-b[0]),R=.5*(b[1]+b[0]),B=1.3;return A=[I-z*B,I+z*B],b=[R-N*B,R+N*B],m._extremes[h._id]=v.findExtremes(h,A,{padded:!0}),m._extremes[p._id]=v.findExtremes(p,b,{padded:!0}),l(m,"a","b"),l(m,"b","a"),e(m,g),e(m,i),T.clipsegments=t(m._xctrl,m._yctrl,g,i),T.x=w,T.y=S,T.a=C,T.b=_,[T]}}}),VP=Ee({"src/traces/carpet/index.js"(J,V){"use strict";V.exports={attributes:Xy(),supplyDefaults:SP(),plot:kP(),calc:qP(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Mu(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),HP=Ee({"lib/carpet.js"(J,V){"use strict";V.exports=VP()}}),C5=Ee({"src/traces/scattercarpet/attributes.js"(J,V){"use strict";var v=Yh(),x=ou(),E=ia(),{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=Cs(),t=$s(),a=vo().extendFlat,r=x.marker,n=x.line,o=r.line;V.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:a({},x.mode,{dflt:"markers"}),text:a({},x.text,{}),texttemplate:l({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:a({},x.hovertext,{}),line:{color:n.color,width:n.width,dash:n.dash,backoff:n.backoff,shape:a({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:x.connectgaps,fill:a({},x.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:v(),marker:a({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:a({width:o.width,dash:o.dash,editType:"calc"},t("marker.line")),gradient:r.gradient,editType:"calc"},t("marker")),textfont:x.textfont,textposition:x.textposition,selected:x.selected,unselected:x.unselected,hoverinfo:a({},E.hoverinfo,{flags:["a","b","text","name"]}),hoveron:x.hoveron,hovertemplate:k(),hovertemplatefallback:e(),zorder:x.zorder}}}),GP=Ee({"src/traces/scattercarpet/defaults.js"(J,V){"use strict";var v=Vr(),x=Wh(),E=al(),k=gh(),l=Rh(),e=Up(),t=Fh(),a=Xh(),r=C5();V.exports=function(o,s,c,m){function h(C,_){return v.coerce(o,s,r,C,_)}h("carpet"),s.xaxis="x",s.yaxis="y";var p=h("a"),g=h("b"),i=Math.min(p.length,g.length);if(!i){s.visible=!1;return}s._length=i,h("text"),h("texttemplate"),h("texttemplatefallback"),h("hovertext");var w=i0?T=C.labelprefix.replace(/ = $/,""):T=C._hovertitle,i.push(T+": "+_.toFixed(3)+C.labelsuffix)}if(!h.hovertemplate){var S=m.hi||h.hoverinfo,M=S.split("+");M.indexOf("all")!==-1&&(M=["a","b","text"]),M.indexOf("a")!==-1&&w(p.aaxis,m.a),M.indexOf("b")!==-1&&w(p.baxis,m.b),i.push("y: "+r.yLabel),M.indexOf("text")!==-1&&x(m,h,i),r.extraText=i.join("
")}return a}}}),ZP=Ee({"src/traces/scattercarpet/event_data.js"(J,V){"use strict";V.exports=function(x,E,k,l,e){var t=l[e];return x.a=t.a,x.b=t.b,x.y=t.y,x}}}),KP=Ee({"src/traces/scattercarpet/index.js"(J,V){"use strict";V.exports={attributes:C5(),supplyDefaults:GP(),colorbar:ff(),formatLabels:WP(),calc:YP(),plot:XP(),style:eh().style,styleOnSelect:eh().styleOnSelect,hoverPoints:$P(),selectPoints:Fv(),eventData:ZP(),moduleType:"trace",name:"scattercarpet",basePlotModule:Mu(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),JP=Ee({"lib/scattercarpet.js"(J,V){"use strict";V.exports=KP()}}),L5=Ee({"src/traces/contourcarpet/attributes.js"(J,V){"use strict";var v=Yp(),x=am(),E=$s(),k=vo().extendFlat,l=x.contours;V.exports=k({carpet:{valType:"string",editType:"calc"},z:v.z,a:v.x,a0:v.x0,da:v.dx,b:v.y,b0:v.y0,db:v.dy,text:v.text,hovertext:v.hovertext,transpose:v.transpose,atype:v.xtype,btype:v.ytype,fillcolor:x.fillcolor,autocontour:x.autocontour,ncontours:x.ncontours,contours:{type:l.type,start:l.start,end:l.end,size:l.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:l.showlines,showlabels:l.showlabels,labelfont:l.labelfont,labelformat:l.labelformat,operation:l.operation,value:l.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:x.line.color,width:x.line.width,dash:x.line.dash,smoothing:x.line.smoothing,editType:"plot"},zorder:x.zorder},E("",{cLetter:"z",autoColorDflt:!1}))}}),P5=Ee({"src/traces/contourcarpet/defaults.js"(J,V){"use strict";var v=Vr(),x=u1(),E=L5(),k=Xx(),l=T1(),e=A1();V.exports=function(a,r,n,o){function s(p,g){return v.coerce(a,r,E,p,g)}function c(p){return v.coerce2(a,r,E,p)}if(s("carpet"),a.a&&a.b){var m=x(a,r,s,o,"a","b");if(!m){r.visible=!1;return}s("text");var h=s("contours.type")==="constraint";h?k(a,r,s,o,n,{hasHover:!1}):(l(a,r,s,c),e(a,r,s,o,{hasHover:!1}))}else r._defaultColor=n,r._length=null;s("zorder")}}}),QP=Ee({"src/traces/contourcarpet/calc.js"(J,V){"use strict";var v=Sf(),x=Vr(),E=c1(),k=f1(),l=h1(),e=d1(),t=Dx(),a=P5(),r=$y(),n=Ox();V.exports=function(c,m){var h=m._carpetTrace=r(c,m);if(!(!h||!h.visible||h.visible==="legendonly")){if(!m.a||!m.b){var p=c.data[h.index],g=c.data[m.index];g.a||(g.a=p.a),g.b||(g.b=p.b),a(g,m,m._defaultColor,c._fullLayout)}var i=o(c,m);return n(m,m._z),i}};function o(s,c){var m=c._carpetTrace,h=m.aaxis,p=m.baxis,g,i,w,S,M,C,_;h._minDtick=0,p._minDtick=0,x.isArray1D(c.z)&&E(c,h,p,"a","b",["z"]),g=c._a=c._a||c.a,S=c._b=c._b||c.b,g=g?h.makeCalcdata(c,"_a"):[],S=S?p.makeCalcdata(c,"_b"):[],i=c.a0||0,w=c.da||1,M=c.b0||0,C=c.db||1,_=c._z=k(c._z||c.z,c.transpose),c._emptypoints=e(_),l(_,c._emptypoints);var T=x.maxRowLength(_),f=c.xtype==="scaled"?"":g,u=t(c,f,i,w,T,h),A=c.ytype==="scaled"?"":S,b=t(c,A,M,C,_.length,p),z={a:u,b,z:_};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&v(s,c,{vals:_,containerStr:"",cLetter:"z"}),[z]}}}),eD=Ee({"src/traces/carpet/axis_aligned_line.js"(J,V){"use strict";var v=Vr().isArrayOrTypedArray;V.exports=function(x,E,k,l){var e,t,a,r,n,o,s,c,m,h,p,g,i,w=v(k)?"a":"b",S=w==="a"?x.aaxis:x.baxis,M=S.smoothing,C=w==="a"?x.a2i:x.b2j,_=w==="a"?k:l,T=w==="a"?l:k,f=w==="a"?E.a.length:E.b.length,u=w==="a"?E.b.length:E.a.length,A=Math.floor(w==="a"?x.b2j(T):x.a2i(T)),b=w==="a"?function(re){return x.evalxy([],re,A)}:function(re){return x.evalxy([],A,re)};M&&(a=Math.max(0,Math.min(u-2,A)),r=A-a,t=w==="a"?function(re,ae){return x.dxydi([],re,a,ae,r)}:function(re,ae){return x.dxydj([],a,re,r,ae)});var z=C(_[0]),I=C(_[1]),N=z0?Math.floor:Math.ceil,F=N>0?Math.ceil:Math.floor,P=N>0?Math.min:Math.max,j=N>0?Math.max:Math.min,U=B(z+R),Z=F(I-R);s=b(z);var Q=[[s]];for(e=U;e*N=0;fe--)$=j.clipsegments[fe],ee=x([],$.x,z.c2p),ne=x([],$.y,I.c2p),ee.reverse(),ne.reverse(),ye.push(E(ee,ne,$.bicubic));var xe="M"+ye.join("L")+"Z";M(R,j.clipsegments,z,I,ae,H),C(F,R,z,I,q,K,X,P,j,H,xe),p(R,re,f,B,Q,u,P),k.setClipUrl(R,P._clipPathId,f)})};function h(T,f){var u,A,b,z,I,N,R,B,F;for(u=0;ure&&(A.max=re),A.len=A.max-A.min}function i(T,f,u){var A=T.getPointAtLength(f),b=T.getPointAtLength(u),z=b.x-A.x,I=b.y-A.y,N=Math.sqrt(z*z+I*I);return[z/N,I/N]}function w(T){var f=Math.sqrt(T[0]*T[0]+T[1]*T[1]);return[T[0]/f,T[1]/f]}function S(T,f){var u=Math.abs(T[0]*f[0]+T[1]*f[1]),A=Math.sqrt(1-u*u);return A/u}function M(T,f,u,A,b,z){var I,N,R,B,F=l.ensureSingle(T,"g","contourbg"),P=F.selectAll("path").data(z==="fill"&&!b?[0]:[]);P.enter().append("path"),P.exit().remove();var j=[];for(B=0;B=0&&(U=ee,Q=re):Math.abs(j[1]-U[1])=0&&(U=ee,Q=re):l.log("endpt to newendpt is not vert. or horz.",j,U,ee)}if(Q>=0)break;B+=q(j,U),j=U}if(Q===f.edgepaths.length){l.log("unclosed perimeter path");break}R=Q,P=F.indexOf(R)===-1,P&&(R=F[0],B+=q(j,U)+"Z",j=null)}for(R=0;R_):C=N>b,_=N;var R=h(b,z,I,N);R.pos=A,R.yc=(b+N)/2,R.i=u,R.dir=C?"increasing":"decreasing",R.x=R.pos,R.y=[I,z],T&&(R.orig_p=s[u]),S&&(R.tx=o.text[u]),M&&(R.htx=o.hovertext[u]),f.push(R)}else f.push({pos:A,empty:!0})}return o._extremes[m._id]=E.findExtremes(m,v.concat(i,g),{padded:!0}),f.length&&(f[0].t={labels:{open:x(n,"open:")+" ",high:x(n,"high:")+" ",low:x(n,"low:")+" ",close:x(n,"close:")+" "}}),f}function r(n,o,s){var c=s._minDiff;if(!c){var m=n._fullData,h=[];c=1/0;var p;for(p=0;p"+w.labels[A]+v.hoverLabelText(g,b,i.yhoverformat)):(I=x.extendFlat({},M),I.y0=I.y1=z,I.yLabelVal=b,I.yLabel=w.labels[A]+v.hoverLabelText(g,b,i.yhoverformat),I.name="",S.push(I),f[b]=I)}return S}function o(s,c,m,h){var p=s.cd,g=s.ya,i=p[0].trace,w=p[0].t,S=r(s,c,m,h);if(!S)return[];var M=S.index,C=p[M],_=S.index=C.i,T=C.dir;function f(R){return w.labels[R]+v.hoverLabelText(g,i[R][_],i.yhoverformat)}var u=C.hi||i.hoverinfo||"",A=u.split("+"),b=u==="all",z=b||A.indexOf("y")!==-1,I=b||A.indexOf("text")!==-1,N=z?[f("open"),f("high"),f("low"),f("close")+" "+t[T]]:[];return I&&l(C,i,N),S.extraText=N.join("
"),S.y0=S.y1=g.c2p(C.yc,!0),[S]}V.exports={hoverPoints:a,hoverSplit:n,hoverOnPoints:o}}}),F5=Ee({"src/traces/ohlc/select.js"(J,V){"use strict";V.exports=function(x,E){var k=x.cd,l=x.xaxis,e=x.yaxis,t=[],a,r=k[0].t.bPos||0;if(E===!1)for(a=0;ac?function(i){return i<=0}:function(i){return i>=0};r.c2g=function(i){var w=r.c2l(i)-s;return(g(w)?w:0)+p},r.g2c=function(i){return r.l2c(i+s-p)},r.g2p=function(i){return i*h},r.c2p=function(i){return r.g2p(r.c2g(i))}}}function e(r,n){return n==="degrees"?E(r):r}function t(r,n){return n==="degrees"?k(r):r}function a(r,n){var o=r.type;if(o==="linear"){var s=r.d2c,c=r.c2d;r.d2c=function(m,h){return e(s(m),h)},r.c2d=function(m,h){return c(t(m,h))}}r.makeCalcdata=function(m,h){var p=m[h],g=m._length,i,w,S=function(f){return r.d2c(f,m.thetaunit)};if(p)for(i=new Array(g),w=0;w0?f:1/0},C=E(S,M),_=v.mod(C+1,S.length);return[S[C],S[_]]}function h(w){return Math.abs(w)>1e-10?w:0}function p(w,S,M){S=S||0,M=M||0;for(var C=w.length,_=new Array(C),T=0;T0?1:0}function x(t){var a=t[0],r=t[1];if(!isFinite(a)||!isFinite(r))return[1,0];var n=(a+1)*(a+1)+r*r;return[(a*a+r*r-1)/n,2*r/n]}function E(t,a){var r=a[0],n=a[1];return[r*t.radius+t.cx,-n*t.radius+t.cy]}function k(t,a){return a*t.radius}function l(t,a,r,n){var o=E(t,x([r,a])),s=o[0],c=o[1],m=E(t,x([n,a])),h=m[0],p=m[1];if(a===0)return["M"+s+","+c,"L"+h+","+p].join(" ");var g=k(t,1/Math.abs(a));return["M"+s+","+c,"A"+g+","+g+" 0 0,"+(a<0?1:0)+" "+h+","+p].join(" ")}function e(t,a,r,n){var o=k(t,1/(a+1)),s=E(t,x([a,r])),c=s[0],m=s[1],h=E(t,x([a,n])),p=h[0],g=h[1];if(v(r)!==v(n)){var i=E(t,x([a,0])),w=i[0],S=i[1];return["M"+c+","+m,"A"+o+","+o+" 0 0,"+(0Ie?(Ue=ee,qe=ee*Ie,ue=(ne-qe)/K.h/2,ke=[q[0],q[1]],ge=[$[0]+ue,$[1]-ue]):(Ue=ne/Ie,qe=ne,ue=(ee-Ue)/K.w/2,ke=[q[0]+ue,q[1]-ue],ge=[$[0],$[1]]),H.xLength2=Ue,H.yLength2=qe,H.xDomain2=ke,H.yDomain2=ge;var ve=H.xOffset2=K.l+K.w*ke[0],se=H.yOffset2=K.t+K.h*(1-ge[1]),Te=H.radius=Ue/xe,Fe=H.innerRadius=H.getHole(oe)*Te,We=H.cx=ve-Te*ye[0],Ge=H.cy=se+Te*ye[3],gt=H.cxx=We-ve,mt=H.cyy=Ge-se,Tt=G.side,At;Tt==="counterclockwise"?(At=Tt,Tt="top"):Tt==="clockwise"&&(At=Tt,Tt="bottom"),H.radialAxis=H.mockAxis(ae,oe,G,{_id:"x",side:Tt,_trueSide:At,domain:[Fe/K.w,Te/K.w]}),H.angularAxis=H.mockAxis(ae,oe,Y,{side:"right",domain:[0,Math.PI],autorange:!1}),H.doAutoRange(ae,oe),H.updateAngularAxis(ae,oe),H.updateRadialAxis(ae,oe),H.updateRadialAxisTitle(ae,oe),H.xaxis=H.mockCartesianAxis(ae,oe,{_id:"x",domain:ke}),H.yaxis=H.mockCartesianAxis(ae,oe,{_id:"y",domain:ge});var Kt=H.pathSubplot();H.clipPaths.forTraces.select("path").attr("d",Kt).attr("transform",l(gt,mt)),X.frontplot.attr("transform",l(ve,se)).call(t.setClipUrl,H._hasClipOnAxisFalse?null:H.clipIds.forTraces,H.gd),X.bg.attr("d",Kt).attr("transform",l(We,Ge)).call(e.fill,oe.bgcolor)},j.mockAxis=function(ae,oe,H,X){var K=E.extendFlat({},H,X);return o(K,oe,ae),K},j.mockCartesianAxis=function(ae,oe,H){var X=this,K=X.isSmith,G=H._id,Y=E.extendFlat({type:"linear"},H);n(Y,ae);var q={x:[0,2],y:[1,3]};return Y.setRange=function(){var $=X.sectorBBox,ee=q[G],ne=X.radialAxis._rl,fe=(ne[1]-ne[0])/(1-X.getHole(oe));Y.range=[$[ee[0]]*fe,$[ee[1]]*fe]},Y.isPtWithinRange=G==="x"&&!K?function($){return X.isPtInside($)}:function(){return!0},Y.setRange(),Y.setScale(),Y},j.doAutoRange=function(ae,oe){var H=this,X=H.gd,K=H.radialAxis,G=H.getRadial(oe);s(X,K);var Y=K.range;if(G.range=Y.slice(),G._input.range=Y.slice(),K._rl=[K.r2l(Y[0],null,"gregorian"),K.r2l(Y[1],null,"gregorian")],K.minallowed!==void 0){var q=K.r2l(K.minallowed);K._rl[0]>K._rl[1]?K._rl[1]=Math.max(K._rl[1],q):K._rl[0]=Math.max(K._rl[0],q)}if(K.maxallowed!==void 0){var $=K.r2l(K.maxallowed);K._rl[0]90&&ne<=270&&(fe.tickangle=180);var Ae=xe?function(Te){var Fe=I(H,A([Te.x,0]));return l(Fe[0]-q,Fe[1]-$)}:function(Te){return l(fe.l2p(Te.x)+Y,0)},Me=xe?function(Te){return z(H,Te.x,-1/0,1/0)}:function(Te){return H.pathArc(fe.r2p(Te.x)+Y)},Ie=U(ee);if(H.radialTickLayout!==Ie&&(K["radial-axis"].selectAll(".xtick").remove(),H.radialTickLayout=Ie),ye){fe.setScale();var Ue=0,qe=xe?(fe.tickvals||[]).filter(function(Te){return Te>=0}).map(function(Te){return r.tickText(fe,Te,!0,!1)}):r.calcTicks(fe),ke=xe?qe:r.clipEnds(fe,qe),ge=r.getTickSigns(fe)[2];xe&&((fe.ticks==="top"&&fe.side==="bottom"||fe.ticks==="bottom"&&fe.side==="top")&&(ge=-ge),fe.ticks==="top"&&fe.side==="top"&&(Ue=-fe.ticklen),fe.ticks==="bottom"&&fe.side==="bottom"&&(Ue=fe.ticklen)),r.drawTicks(X,fe,{vals:qe,layer:K["radial-axis"],path:r.makeTickPath(fe,0,ge),transFn:Ae,crisp:!1}),r.drawGrid(X,fe,{vals:ke,layer:K["radial-grid"],path:Me,transFn:E.noop,crisp:!1}),r.drawLabels(X,fe,{vals:qe,layer:K["radial-axis"],transFn:Ae,labelFns:r.makeLabelFns(fe,Ue)})}var ue=H.radialAxisAngle=H.vangles?F(Q(B(ee.angle),H.vangles)):ee.angle,ve=l(q,$),se=ve+k(-ue);re(K["radial-axis"],ye&&(ee.showticklabels||ee.ticks),{transform:se}),re(K["radial-grid"],ye&&ee.showgrid,{transform:xe?"":ve}),re(K["radial-line"].select("line"),ye&&ee.showline,{x1:xe?-G:Y,y1:0,x2:G,y2:0,transform:se}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateRadialAxisTitle=function(ae,oe,H){if(!this.isSmith){var X=this,K=X.gd,G=X.radius,Y=X.cx,q=X.cy,$=X.getRadial(oe),ee=X.id+"title",ne=0;if($.title){var fe=t.bBox(X.layers["radial-axis"].node()).height,ye=$.title.font.size,xe=$.side;ne=xe==="top"?ye:xe==="counterclockwise"?-(fe+ye*.4):fe+ye*.8}var Ae=H!==void 0?H:X.radialAxisAngle,Me=B(Ae),Ie=Math.cos(Me),Ue=Math.sin(Me),qe=Y+G/2*Ie+ne*Ue,ke=q-G/2*Ue+ne*Ie;X.layers["radial-axis-title"]=p.draw(K,ee,{propContainer:$,propName:X.id+".radialaxis.title.text",placeholder:N(K,"Click to enter radial axis title"),attributes:{x:qe,y:ke,"text-anchor":"middle"},transform:{rotate:-Ae}})}},j.updateAngularAxis=function(ae,oe){var H=this,X=H.gd,K=H.layers,G=H.radius,Y=H.innerRadius,q=H.cx,$=H.cy,ee=H.getAngular(oe),ne=H.angularAxis,fe=H.isSmith;fe||(H.fillViewInitialKey("angularaxis.rotation",ee.rotation),ne.setGeometry(),ne.setScale());var ye=fe?function(Fe){var We=I(H,A([0,Fe.x]));return Math.atan2(We[0]-q,We[1]-$)-Math.PI/2}:function(Fe){return ne.t2g(Fe.x)};ne.type==="linear"&&ne.thetaunit==="radians"&&(ne.tick0=F(ne.tick0),ne.dtick=F(ne.dtick));var xe=function(Fe){return l(q+G*Math.cos(Fe),$-G*Math.sin(Fe))},Ae=fe?function(Fe){var We=I(H,A([0,Fe.x]));return l(We[0],We[1])}:function(Fe){return xe(ye(Fe))},Me=fe?function(Fe){var We=I(H,A([0,Fe.x])),Ge=Math.atan2(We[0]-q,We[1]-$)-Math.PI/2;return l(We[0],We[1])+k(-F(Ge))}:function(Fe){var We=ye(Fe);return xe(We)+k(-F(We))},Ie=fe?function(Fe){return b(H,Fe.x,0,1/0)}:function(Fe){var We=ye(Fe),Ge=Math.cos(We),gt=Math.sin(We);return"M"+[q+Y*Ge,$-Y*gt]+"L"+[q+G*Ge,$-G*gt]},Ue=r.makeLabelFns(ne,0),qe=Ue.labelStandoff,ke={};ke.xFn=function(Fe){var We=ye(Fe);return Math.cos(We)*qe},ke.yFn=function(Fe){var We=ye(Fe),Ge=Math.sin(We)>0?.2:1;return-Math.sin(We)*(qe+Fe.fontSize*Ge)+Math.abs(Math.cos(We))*(Fe.fontSize*_)},ke.anchorFn=function(Fe){var We=ye(Fe),Ge=Math.cos(We);return Math.abs(Ge)<.1?"middle":Ge>0?"start":"end"},ke.heightFn=function(Fe,We,Ge){var gt=ye(Fe);return-.5*(1+Math.sin(gt))*Ge};var ge=U(ee);H.angularTickLayout!==ge&&(K["angular-axis"].selectAll("."+ne._id+"tick").remove(),H.angularTickLayout=ge);var ue=fe?[1/0].concat(ne.tickvals||[]).map(function(Fe){return r.tickText(ne,Fe,!0,!1)}):r.calcTicks(ne);fe&&(ue[0].text="\u221E",ue[0].fontSize*=1.75);var ve;if(oe.gridshape==="linear"?(ve=ue.map(ye),E.angleDelta(ve[0],ve[1])<0&&(ve=ve.slice().reverse())):ve=null,H.vangles=ve,ne.type==="category"&&(ue=ue.filter(function(Fe){return E.isAngleInsideSector(ye(Fe),H.sectorInRad)})),ne.visible){var se=ne.ticks==="inside"?-1:1,Te=(ne.linewidth||1)/2;r.drawTicks(X,ne,{vals:ue,layer:K["angular-axis"],path:"M"+se*Te+",0h"+se*ne.ticklen,transFn:Me,crisp:!1}),r.drawGrid(X,ne,{vals:ue,layer:K["angular-grid"],path:Ie,transFn:E.noop,crisp:!1}),r.drawLabels(X,ne,{vals:ue,layer:K["angular-axis"],repositionOnUpdate:!0,transFn:Ae,labelFns:ke})}re(K["angular-line"].select("path"),ee.showline,{d:H.pathSubplot(),transform:l(q,$)}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateFx=function(ae,oe){if(!this.gd._context.staticPlot){var H=!this.isSmith;H&&(this.updateAngularDrag(ae),this.updateRadialDrag(ae,oe,0),this.updateRadialDrag(ae,oe,1)),this.updateHoverAndMainDrag(ae)}},j.updateHoverAndMainDrag=function(ae){var oe=this,H=oe.isSmith,X=oe.gd,K=oe.layers,G=ae._zoomlayer,Y=T.MINZOOM,q=T.OFFEDGE,$=oe.radius,ee=oe.innerRadius,ne=oe.cx,fe=oe.cy,ye=oe.cxx,xe=oe.cyy,Ae=oe.sectorInRad,Me=oe.vangles,Ie=oe.radialAxis,Ue=f.clampTiny,qe=f.findXYatLength,ke=f.findEnclosingVertexAngles,ge=T.cornerHalfWidth,ue=T.cornerLen/2,ve,se,Te=c.makeDragger(K,"path","maindrag",ae.dragmode===!1?"none":"crosshair");v.select(Te).attr("d",oe.pathSubplot()).attr("transform",l(ne,fe)),Te.onmousemove=function(Vt){h.hover(X,Vt,oe.id),X._fullLayout._lasthover=Te,X._fullLayout._hoversubplot=oe.id},Te.onmouseout=function(Vt){X._dragging||m.unhover(X,Vt)};var Fe={element:Te,gd:X,subplot:oe.id,plotinfo:{id:oe.id,xaxis:oe.xaxis,yaxis:oe.yaxis},xaxes:[oe.xaxis],yaxes:[oe.yaxis]},We,Ge,gt,mt,Tt,At,Kt,nr,_r;function Zt(Vt,Ht){return Math.sqrt(Vt*Vt+Ht*Ht)}function sr(Vt,Ht){return Zt(Vt-ye,Ht-xe)}function Ot(Vt,Ht){return Math.atan2(xe-Ht,Vt-ye)}function vt(Vt,Ht){return[Vt*Math.cos(Ht),Vt*Math.sin(-Ht)]}function ht(Vt,Ht){if(Vt===0)return oe.pathSector(2*ge);var Wt=ue/Vt,Sr=Ht-Wt,on=Ht+Wt,$t=Math.max(0,Math.min(Vt,$)),It=$t-ge,ir=$t+ge;return"M"+vt(It,Sr)+"A"+[It,It]+" 0,0,0 "+vt(It,on)+"L"+vt(ir,on)+"A"+[ir,ir]+" 0,0,1 "+vt(ir,Sr)+"Z"}function Re(Vt,Ht,Wt){if(Vt===0)return oe.pathSector(2*ge);var Sr=vt(Vt,Ht),on=vt(Vt,Wt),$t=Ue((Sr[0]+on[0])/2),It=Ue((Sr[1]+on[1])/2),ir,cr;if($t&&It){var fr=It/$t,Ir=-1/fr,ln=qe(ge,fr,$t,It);ir=qe(ue,Ir,ln[0][0],ln[0][1]),cr=qe(ue,Ir,ln[1][0],ln[1][1])}else{var nn,wn;It?(nn=ue,wn=ge):(nn=ge,wn=ue),ir=[[$t-nn,It-wn],[$t+nn,It-wn]],cr=[[$t-nn,It+wn],[$t+nn,It+wn]]}return"M"+ir.join("L")+"L"+cr.reverse().join("L")+"Z"}function Be(){gt=null,mt=null,Tt=oe.pathSubplot(),At=!1;var Vt=X._fullLayout[oe.id];Kt=e.luminosity(Vt.bgcolor),nr=c.makeZoombox(G,Kt,ne,fe,Tt),nr.attr("fill-rule","evenodd"),_r=c.makeCorners(G,ne,fe),w(X)}function He(Vt,Ht){return Ht=Math.max(Math.min(Ht,$),ee),VtY?(Vt-1&&Vt===1&&i(Ht,X,[oe.xaxis],[oe.yaxis],oe.id,Fe),Wt.indexOf("event")>-1&&h.click(X,Ht,oe.id)}Fe.prepFn=function(Vt,Ht,Wt){var Sr=X._fullLayout.dragmode,on=Te.getBoundingClientRect();X._fullLayout._calcInverseTransform(X);var $t=X._fullLayout._invTransform;ve=X._fullLayout._invScaleX,se=X._fullLayout._invScaleY;var It=E.apply3DTransform($t)(Ht-on.left,Wt-on.top);if(We=It[0],Ge=It[1],Me){var ir=f.findPolygonOffset($,Ae[0],Ae[1],Me);We+=ye+ir[0],Ge+=xe+ir[1]}switch(Sr){case"zoom":Fe.clickFn=Ct,H||(Me?Fe.moveFn=Mt:Fe.moveFn=Ze,Fe.doneFn=dt,Be(Vt,Ht,Wt));break;case"select":case"lasso":g(Vt,Ht,Wt,Fe,Sr);break}},m.init(Fe)},j.updateRadialDrag=function(ae,oe,H){var X=this,K=X.gd,G=X.layers,Y=X.radius,q=X.innerRadius,$=X.cx,ee=X.cy,ne=X.radialAxis,fe=T.radialDragBoxSize,ye=fe/2;if(!ne.visible)return;var xe=B(X.radialAxisAngle),Ae=ne._rl,Me=Ae[0],Ie=Ae[1],Ue=Ae[H],qe=.75*(Ae[1]-Ae[0])/(1-X.getHole(oe))/Y,ke,ge,ue;H?(ke=$+(Y+ye)*Math.cos(xe),ge=ee-(Y+ye)*Math.sin(xe),ue="radialdrag"):(ke=$+(q-ye)*Math.cos(xe),ge=ee-(q-ye)*Math.sin(xe),ue="radialdrag-inner");var ve=c.makeRectDragger(G,ue,"crosshair",-ye,-ye,fe,fe),se={element:ve,gd:K};ae.dragmode===!1&&(se.dragmode=!1),re(v.select(ve),ne.visible&&q0!=(H?We>Me:We=90||K>90&&G>=450?xe=1:q<=0&&ee<=0?xe=0:xe=Math.max(q,ee),K<=180&&G>=180||K>180&&G>=540?ne=-1:Y>=0&&$>=0?ne=0:ne=Math.min(Y,$),K<=270&&G>=270||K>270&&G>=630?fe=-1:q>=0&&ee>=0?fe=0:fe=Math.min(q,ee),G>=360?ye=1:Y<=0&&$<=0?ye=0:ye=Math.max(Y,$),[ne,fe,ye,xe]}function Q(ae,oe){var H=function(K){return E.angleDist(ae,K)},X=E.findIndexOfMin(oe,H);return oe[X]}function re(ae,oe,H){return oe?(ae.attr("display",null),ae.attr(H)):ae&&ae.attr("display","none"),ae}}}),j5=Ee({"src/plots/polar/layout_attributes.js"(J,V){"use strict";var v=rs(),x=Gc(),E=kl().attributes,k=Vr().extendFlat,l=El().overrideAll,e=l({color:x.color,showline:k({},x.showline,{dflt:!0}),linecolor:x.linecolor,linewidth:x.linewidth,showgrid:k({},x.showgrid,{dflt:!0}),gridcolor:x.gridcolor,gridwidth:x.gridwidth,griddash:x.griddash},"plot","from-root"),t=l({tickmode:x.minor.tickmode,nticks:x.nticks,tick0:x.tick0,dtick:x.dtick,tickvals:x.tickvals,ticktext:x.ticktext,ticks:x.ticks,ticklen:x.ticklen,tickwidth:x.tickwidth,tickcolor:x.tickcolor,ticklabelstep:x.ticklabelstep,showticklabels:x.showticklabels,labelalias:x.labelalias,minorloglabels:x.minorloglabels,showtickprefix:x.showtickprefix,tickprefix:x.tickprefix,showticksuffix:x.showticksuffix,ticksuffix:x.ticksuffix,showexponent:x.showexponent,exponentformat:x.exponentformat,minexponent:x.minexponent,separatethousands:x.separatethousands,tickfont:x.tickfont,tickangle:x.tickangle,tickformat:x.tickformat,tickformatstops:x.tickformatstops,layer:x.layer},"plot","from-root"),a={visible:k({},x.visible,{dflt:!0}),type:k({},x.type,{values:["-","linear","log","date","category"]}),autotypenumbers:x.autotypenumbers,autorangeoptions:{minallowed:x.autorangeoptions.minallowed,maxallowed:x.autorangeoptions.maxallowed,clipmin:x.autorangeoptions.clipmin,clipmax:x.autorangeoptions.clipmax,include:x.autorangeoptions.include,editType:"plot"},autorange:k({},x.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:k({},x.minallowed,{editType:"plot"}),maxallowed:k({},x.maxallowed,{editType:"plot"}),range:k({},x.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:x.categoryorder,categoryarray:x.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:x.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:k({},x.title.text,{editType:"plot",dflt:""}),font:k({},x.title.font,{editType:"plot"}),editType:"plot"},hoverformat:x.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(a,e,t);var r={visible:k({},x.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:x.autotypenumbers,categoryorder:x.categoryorder,categoryarray:x.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:x.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(r,e,t),V.exports={domain:E({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:v.background},radialaxis:a,angularaxis:r,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),dD=Ee({"src/plots/polar/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=Qa(),E=xs(),k=Bv(),l=uf().getSubplotData,e=Cv(),t=Np(),a=Wd(),r=Yd(),n=Xg(),o=Z0(),s=Rb(),c=Op(),m=j5(),h=B5(),p=Ky(),g=p.axisNames;function i(S,M,C,_){var T=C("bgcolor");_.bgColor=x.combine(T,_.paper_bgcolor);var f=C("sector");C("hole");var u=l(_.fullData,p.name,_.id),A=_.layoutOut,b;function z(ye,xe){return C(b+"."+ye,xe)}for(var I=0;I")}}V.exports={hoverPoints:x,makeHoverPointText:E}}}),mD=Ee({"src/traces/scatterpolar/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:Qy(),categories:["polar","symbols","showLegend","scatter-like"],attributes:qm(),supplyDefaults:e_().supplyDefaults,colorbar:ff(),formatLabels:t_(),calc:vD(),plot:pD(),style:eh().style,styleOnSelect:eh().styleOnSelect,hoverPoints:r_().hoverPoints,selectPoints:Fv(),meta:{}}}}),gD=Ee({"lib/scatterpolar.js"(J,V){"use strict";V.exports=mD()}}),U5=Ee({"src/traces/scatterpolargl/attributes.js"(J,V){"use strict";var v=qm(),{cliponaxis:x,hoveron:E}=v,k=En(v,["cliponaxis","hoveron"]),{connectgaps:l,line:{color:e,dash:t,width:a},fill:r,fillcolor:n,marker:o,textfont:s,textposition:c}=Rm();V.exports=Qr(Nr({},k),{connectgaps:l,fill:r,fillcolor:n,line:{color:e,dash:t,editType:"calc",width:a},marker:o,textfont:s,textposition:c})}}),yD=Ee({"src/traces/scatterpolargl/defaults.js"(J,V){"use strict";var v=Vr(),x=al(),E=e_().handleRThetaDefaults,k=gh(),l=Rh(),e=Fh(),t=Xh(),a=Wh().PTS_LINESONLY,r=U5();V.exports=function(o,s,c,m){function h(g,i){return v.coerce(o,s,r,g,i)}var p=E(o,s,m,h);if(!p){s.visible=!1;return}h("thetaunit"),h("mode",p=t&&(_.marker.cluster=w.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=A),_.line&&A.length>1&&e.extendFlat(_.line,l.linePositions(n,i,A)),_.text&&(e.extendFlat(_.text,{positions:A},l.textPosition(n,i,_.text,_.marker)),e.extendFlat(_.textSel,{positions:A},l.textPosition(n,i,_.text,_.markerSel)),e.extendFlat(_.textUnsel,{positions:A},l.textPosition(n,i,_.text,_.markerUnsel))),_.fill&&!h.fill2d&&(h.fill2d=!0),_.marker&&!h.scatter2d&&(h.scatter2d=!0),_.line&&!h.line2d&&(h.line2d=!0),_.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(_.line),h.fillOptions.push(_.fill),h.markerOptions.push(_.marker),h.markerSelectedOptions.push(_.markerSel),h.markerUnselectedOptions.push(_.markerUnsel),h.textOptions.push(_.text),h.textSelectedOptions.push(_.textSel),h.textUnselectedOptions.push(_.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),w.x=b,w.y=z,w.rawx=b,w.rawy=z,w.r=M,w.theta=C,w.positions=A,w._scene=h,w.index=h.count,h.count++}}),E(n,o,s)}},V.exports.reglPrecompiled=a}}),AD=Ee({"src/traces/scatterpolargl/index.js"(J,V){"use strict";var v=wD();v.plot=TD(),V.exports=v}}),MD=Ee({"lib/scatterpolargl.js"(J,V){"use strict";V.exports=AD()}}),q5=Ee({"src/traces/barpolar/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:v,templatefallbackAttrs:x}=Cs(),E=vo().extendFlat,k=qm(),l=Zh();V.exports={r:k.r,theta:k.theta,r0:k.r0,dr:k.dr,theta0:k.theta0,dtheta:k.dtheta,thetaunit:k.thetaunit,base:E({},l.base,{}),offset:E({},l.offset,{}),width:E({},l.width,{}),text:E({},l.text,{}),hovertext:E({},l.hovertext,{}),marker:e(),hoverinfo:k.hoverinfo,hovertemplate:v(),hovertemplatefallback:x(),selected:l.selected,unselected:l.unselected};function e(){var t=E({},l.marker);return delete t.cornerradius,t}}}),V5=Ee({"src/traces/barpolar/layout_attributes.js"(J,V){"use strict";V.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),SD=Ee({"src/traces/barpolar/defaults.js"(J,V){"use strict";var v=Vr(),x=e_().handleRThetaDefaults,E=n1(),k=q5();V.exports=function(e,t,a,r){function n(s,c){return v.coerce(e,t,k,s,c)}var o=x(e,t,r,n);if(!o){t.visible=!1;return}n("thetaunit"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),E(e,t,n,a,r),v.coerceSelectionMarkerOpacity(t,n)}}}),ED=Ee({"src/traces/barpolar/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=V5();V.exports=function(E,k,l){var e={},t;function a(o,s){return v.coerce(E[t]||{},k[t],x,o,s)}for(var r=0;r0?(m=s,h=c):(m=c,h=s);var p=l.findEnclosingVertexAngles(m,t.vangles)[0],g=l.findEnclosingVertexAngles(h,t.vangles)[1],i=[p,(m+h)/2,g];return l.pathPolygonAnnulus(n,o,m,h,i,a,r)}:function(n,o,s,c){return E.pathAnnulus(n,o,s,c,a,r)}}}}),CD=Ee({"src/traces/barpolar/hover.js"(J,V){"use strict";var v=$l(),x=Vr(),E=Gp().getTraceColor,k=x.fillText,l=r_().makeHoverPointText,e=Jy().isPtInsidePolygon;V.exports=function(a,r,n){var o=a.cd,s=o[0].trace,c=a.subplot,m=c.radialAxis,h=c.angularAxis,p=c.vangles,g=p?e:x.isPtInsideSector,i=a.maxHoverDistance,w=h._period||2*Math.PI,S=Math.abs(m.g2p(Math.sqrt(r*r+n*n))),M=Math.atan2(n,r);m.range[0]>m.range[1]&&(M+=Math.PI);var C=function(u){return g(S,M,[u.rp0,u.rp1],[u.thetag0,u.thetag1],p)?i+Math.min(1,Math.abs(u.thetag1-u.thetag0)/w)-1+(u.rp1-S)/(u.rp1-u.rp0)-1:1/0};if(v.getClosest(o,C,a),a.index!==!1){var _=a.index,T=o[_];a.x0=a.x1=T.ct[0],a.y0=a.y1=T.ct[1];var f=x.extendFlat({},T,{r:T.s,theta:T.p});return k(T,s,a),l(f,s,c,a),a.hovertemplate=s.hovertemplate,a.color=E(s,T),a.xLabelVal=a.yLabelVal=void 0,T.s<0&&(a.idealAlign="left"),[a]}}}}),LD=Ee({"src/traces/barpolar/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"barpolar",basePlotModule:Qy(),categories:["polar","bar","showLegend"],attributes:q5(),layoutAttributes:V5(),supplyDefaults:SD(),supplyLayoutDefaults:ED(),calc:H5().calc,crossTraceCalc:H5().crossTraceCalc,plot:kD(),colorbar:ff(),formatLabels:t_(),style:bh().style,styleOnSelect:bh().styleOnSelect,hoverPoints:CD(),selectPoints:Wp(),meta:{}}}}),PD=Ee({"lib/barpolar.js"(J,V){"use strict";V.exports=LD()}}),G5=Ee({"src/plots/smith/constants.js"(J,V){"use strict";V.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),W5=Ee({"src/plots/smith/layout_attributes.js"(J,V){"use strict";var v=rs(),x=Gc(),E=kl().attributes,k=Vr().extendFlat,l=El().overrideAll,e=l({color:x.color,showline:k({},x.showline,{dflt:!0}),linecolor:x.linecolor,linewidth:x.linewidth,showgrid:k({},x.showgrid,{dflt:!0}),gridcolor:x.gridcolor,gridwidth:x.gridwidth,griddash:x.griddash},"plot","from-root"),t=l({ticklen:x.ticklen,tickwidth:k({},x.tickwidth,{dflt:2}),tickcolor:x.tickcolor,showticklabels:x.showticklabels,labelalias:x.labelalias,showtickprefix:x.showtickprefix,tickprefix:x.tickprefix,showticksuffix:x.showticksuffix,ticksuffix:x.ticksuffix,tickfont:x.tickfont,tickformat:x.tickformat,hoverformat:x.hoverformat,layer:x.layer},"plot","from-root"),a=k({visible:k({},x.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:k({},x.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,t),r=k({visible:k({},x.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:x.ticks,editType:"calc"},e,t);V.exports={domain:E({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:v.background},realaxis:a,imaginaryaxis:r,editType:"calc"}}}),DD=Ee({"src/plots/smith/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=Qa(),E=xs(),k=Bv(),l=uf().getSubplotData,e=Yd(),t=Wd(),a=Z0(),r=Hh(),n=W5(),o=G5(),s=o.axisNames,c=h(function(p){return v.isTypedArray(p)&&(p=Array.from(p)),p.slice().reverse().map(function(g){return-g}).concat([0]).concat(p)},String);function m(p,g,i,w){var S=i("bgcolor");w.bgColor=x.combine(S,w.paper_bgcolor);var M=l(w.fullData,o.name,w.id),C=w.layoutOut,_;function T(U,Z){return i(_+"."+U,Z)}for(var f=0;f")}}V.exports={hoverPoints:x,makeHoverPointText:E}}}),OD=Ee({"src/traces/scattersmith/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"scattersmith",basePlotModule:ID(),categories:["smith","symbols","showLegend","scatter-like"],attributes:Y5(),supplyDefaults:RD(),colorbar:ff(),formatLabels:FD(),calc:zD(),plot:BD(),style:eh().style,styleOnSelect:eh().styleOnSelect,hoverPoints:ND().hoverPoints,selectPoints:Fv(),meta:{}}}}),jD=Ee({"lib/scattersmith.js"(J,V){"use strict";V.exports=OD()}}),X5=Ee({"src/traces/quiver/attributes.js"(J,V){"use strict";var v=ia(),x=Cs().hovertemplateAttrs,E=Fl().axisHoverFormat,k=vo().extendFlat,l=$s(),e=kc().dash,t=Kd(),a=ou(),r={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:a.x0,dx:a.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:a.y0,dy:a.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},arrowref:{valType:"enumerated",values:["paper","data"],dflt:"data",editType:"calc"},lengthmode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},lengthfactor:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:E("x"),yhoverformat:E("y"),uhoverformat:E("u","noDate"),vhoverformat:E("v","noDate"),hoverinfo:k({},v.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:x({},{keys:["x","y","u","v","text","name"]}),text:a.text,textposition:a.textposition,textfont:a.textfont,marker:k({arrowsize:k({},t.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:e,editType:"style"},editType:"calc"},l("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};V.exports=r}}),UD=Ee({"src/traces/quiver/defaults.js"(J,V){"use strict";var v=Vr(),x=X5(),E=Dv(),k=cf().hasColorscale,l=Cc();V.exports=function(t,a,r,n){function o(S,M){return v.coerce(t,a,x,S,M)}var s=E(t,a,n,o);if(!s){a.visible=!1;return}var c=o("u"),m=o("v");if(!v.isArrayOrTypedArray(c)||c.length===0){a.u=new Array(s);for(var h=0;hN&&(N=c[Q]),m[Q]B&&(B=m[Q]),HP&&(P=H),XU&&(U=X);var K=Math.sqrt(H*H+X*X);if(K>i&&(i=K),KS&&(S=G))}}else re.x=k,re.y=k}if(n._maxNorm=i,u==="scaled"||A==="paper"){let Ae=N-I,Me=B-R;var Y;Ae===0&&Me===0?Y=1:Y=(Ae+Me+Math.sqrt((Ae-Me)*(Ae-Me)+4*Z*Ae*Me))/(2*(Z-1)),Y*=t,n._scaleFactor=Y/n._maxNorm}else n._scaleFactor=1;n._scaleFactor*=n.lengthfactor;let q=new Array(h),$=new Array(h),ee=new Array(h),ne=new Array(h);for(var fe,ye,Q=0;Qm.i&&isFinite(h[m.i]))p=h[m.i];else{var g=o.u&&o.u[m.i]||0,i=o.v&&o.v[m.i]||0;p=Math.sqrt(g*g+i*i)}return c(p)})}function t(n){var o=v.select(n).selectAll("g.trace.quiver");o.each(function(s){r(n,s,v.select(this))})}function a(n,o,s){r(n,o,s)}function r(n,o,s){var c=o[0].trace,m=c.marker||{},h=m.line||{},p=x.isArrayOrTypedArray(m.color)?void 0:m.color,g=c._hasColorscale;if(s)if(c.selectedpoints){var i=(c.selected||{}).marker||{},w=(c.unselected||{}).marker||{},S=i.line||{},M=w.line||{};s.selectAll("path.js-line").each(function(_){var T=v.select(this),f=!_.selected,u=f?w.color:i.color,A=f?M.width!==void 0?M.width:h.width:S.width!==void 0?S.width:h.width;u?(E.lineGroupStyle(T,A,u,h.dash),T.style("stroke-opacity",1)):(E.lineGroupStyle(T,A,p,h.dash),g&&e(T,c),T.style("stroke-opacity",f?l:1))}),E.selectedTextStyle(s.selectAll("text"),c)}else{var C=s.selectAll("path.js-line");C.call(E.lineGroupStyle,h.width,p,h.dash),g&&e(C,c),C.style("stroke-opacity",1),E.textPointStyle(s.selectAll("text"),c,n)}}V.exports={style:t,styleOnSelect:a,colorscaleStroke:e}}}),HD=Ee({"src/traces/quiver/plot.js"(J,V){"use strict";var v=Hn(),x=Vr(),E=yo(),k=n_().colorscaleStroke,l=Math.PI/12,e=5.8,t=1.5,a=.7;V.exports=function(o,s,c,m,h,p){var g,i,w=!h,S=!!h&&h.duration>0;if(g=m.selectAll("g.trace").data(c,function(C){return C[0].trace.uid}),g.enter().append("g").attr("class",function(C){return"trace quiver trace"+C[0].trace.uid}).style("stroke-miterlimit",2),g.order(),S){p&&(i=p());var M=v.transition().duration(h.duration).ease(h.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()});M.each(function(){m.selectAll("g.trace").each(function(C,_){r(o,_,s,C,c,this,h)})})}else g.each(function(C,_){r(o,_,s,C,c,this,h)});w&&g.exit().remove()};function r(n,o,s,c,m,h,p){var g=c[0].trace,i=s.xaxis,w=s.yaxis;c[0][s.isRangePlot?"nodeRangePlot3":"node3"]=v.select(h);var S=v.select(h).selectAll("g.lines").data([c]);S.enter().append("g").classed("lines",!0),E.setClipUrl(S,s.layerClipId,n);var M=S.selectAll("path.js-line").data(c);M.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),M.exit().remove();let{anchor:C,maxNorm:_=0,arrowref:T}=g,f=T==="paper"?g._scaleFactor*Math.sqrt(Math.abs(i._m*w._m)):g._scaleFactor,u=g.marker.arrowsize;M.each(function(B){let F=v.select(this);if(B.x===void 0||B.y===void 0){F.attr("d",null);return}let P=(T==="paper"?B._u*Math.sign(i._m):v.round(i._m*B._u))*f,j=(T==="paper"?B._v*Math.sign(w._m):v.round(w._m*B._v))*f,U=(g._input.marker||{}).arrowsize!==void 0;var Z,Q,re,ae;C==="tip"?(Z=i.c2p(B.x)-P,re=w.c2p(B.y)-j,Q=i.c2p(B.x),ae=w.c2p(B.y)):C==="center"?(Z=i.c2p(B.x)-P/2,re=w.c2p(B.y)-j/2,Q=i.c2p(B.x)+P/2,ae=w.c2p(B.y)+j/2):(Z=i.c2p(B.x),re=w.c2p(B.y),Q=i.c2p(B.x)+P,ae=w.c2p(B.y)+j),B._px0=Z,B._py0=re,B._px1=Q,B._py1=ae;var oe=g.marker.line.width;U||(oe=Math.max(oe,t));let H=Math.sqrt((Q-Z)*(Q-Z)+(ae-re)*(ae-re)),X=a*H,K=Math.min(e*u*oe,X),G=Math.atan2(ae-re,Q-Z),Y=Q-K*Math.cos(G-l),q=ae-K*Math.sin(G-l),$=Q-K*Math.cos(G+l),ee=ae-K*Math.sin(G+l),ne="M"+Z+","+re+"L"+Q+","+ae+"L"+Y+","+q+"L"+Q+","+ae+"L"+$+","+ee;F.attr("d",ne)});var A=g.marker||{},b=A.line||{},z=x.isArrayOrTypedArray(A.color)?void 0:A.color;E.lineGroupStyle(M,b.width,z,b.dash),g._hasColorscale&&k(M,g);var I=v.select(h).selectAll("g.text").data([c]);I.enter().append("g").classed("text",!0),E.setClipUrl(I,s.layerClipId,n);var N=I.selectAll("g.textpoint").data(c);if(N.enter().append("g").classed("textpoint",!0).append("text"),N.exit().remove(),N.each(function(B){var F=v.select(this),P=E.translatePoint(B,F.select("text"),i,w);P||F.remove()}),N.selectAll("text").call(E.textPointStyle,g,n).each(function(B){var F=i.c2p(B.x),P=w.c2p(B.y);v.select(this).selectAll("tspan.line").each(function(){v.select(this).attr({x:F,y:P})})}),p&&p.duration>0){var R=v.transition().duration(p.duration).ease(p.easing);M.transition(R).style("opacity",1)}}}}),GD=Ee({"src/traces/quiver/hover.js"(J,V){"use strict";var v=Vr(),x=$l(),E=Vp();function k(l,e,t,a,r,n){let o=r-t,s=n-a,c=o*o+s*s;if(!c)return Math.sqrt((l-t)*(l-t)+(e-a)*(e-a));var m=((l-t)*o+(e-a)*s)/c;m=Math.max(0,Math.min(1,m));let h=t+m*o,p=a+m*s;return Math.sqrt((l-h)*(l-h)+(e-p)*(e-p))}V.exports=function(e,t,a,r){var n=e.cd,o=n[0].trace,s=e.xa,c=e.ya,m=s.c2p(t),h=c.c2p(a),p=function(T){return T._px0===void 0?1/0:k(m,h,T._px0,T._py0,T._px1,T._py1)};if(x.getClosest(n,p,e),e.index!==!1){var g=n[e.index],i=s.c2p(g.x,!0),w=c.c2p(g.y,!0),S=Math.sqrt((m-i)*(m-i)+(h-w)*(h-w));e.index=g.i;var M=o.u?o.u[g.i]:0,C=o.v?o.v[g.i]:0,_="u: "+M+", v: "+C;return v.extendFlat(e,{color:E(o,g),x0:i-3,x1:i+3,xLabelVal:g.x,y0:w-3,y1:w+3,yLabelVal:g.y,uLabelVal:M,vLabelVal:C,extraText:_,spikeDistance:S,hovertemplate:o.hovertemplate}),v.fillText(g,o,e),[e]}}}}),WD=Ee({"src/traces/quiver/format_labels.js"(J,V){"use strict";var v=uo(),x=Vr();V.exports=function(k,l,e){var t={},a={_fullLayout:e},r=v.getFromTrace(a,l,"x"),n=v.getFromTrace(a,l,"y"),o=k.x,s=k.y;t.xLabel=v.tickText(r,r.c2l(o),!0).text,t.yLabel=v.tickText(n,n.c2l(s),!0).text;var c=l.u?l.u[k.i]:0,m=l.v?l.v[k.i]:0,h=l.uhoverformat,p=l.vhoverformat;return t.uLabel=h?x.numberFormat(h)(c):String(c),t.vLabel=p?x.numberFormat(p)(m):String(m),t}}}),YD=Ee({"src/traces/quiver/event_data.js"(J,V){"use strict";V.exports=function(x,E,k,l,e){return x.x=E.x,x.y=E.y,x.u=k.u?k.u[e]:void 0,x.v=k.v?k.v[e]:void 0,x}}}),XD=Ee({"src/traces/quiver/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"quiver",basePlotModule:Mu(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:X5(),supplyDefaults:UD(),calc:qD(),crossTraceCalc:VD(),plot:HD(),style:n_().style,styleOnSelect:n_().styleOnSelect,hoverPoints:GD(),formatLabels:WD(),eventData:YD(),selectPoints:Fv(),colorbar:ff(),animatable:!0,meta:{}}}}),$D=Ee({"lib/quiver.js"(J,V){"use strict";V.exports=XD()}}),kf=Ee({"node_modules/world-calendars/dist/main.js"(J,V){var v=Lc();function x(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}v(x.prototype,{instance:function(a,r){a=(a||"gregorian").toLowerCase(),r=r||"";var n=this._localCals[a+"-"+r];if(!n&&this.calendars[a]&&(n=new this.calendars[a](r),this._localCals[a+"-"+r]=n),!n)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,a);return n},newDate:function(a,r,n,o,s){return o=(a!=null&&a.year?a.calendar():typeof o=="string"?this.instance(o,s):o)||this.instance(),o.newDate(a,r,n)},substituteDigits:function(a){return function(r){return(r+"").replace(/[0-9]/g,function(n){return a[n]})}},substituteChineseDigits:function(a,r){return function(n){for(var o="",s=0;n>0;){var c=n%10;o=(c===0?"":a[c]+r[s])+o,s++,n=Math.floor(n/10)}return o.indexOf(a[1]+r[1])===0&&(o=o.substr(1)),o||a[0]}}});function E(a,r,n,o){if(this._calendar=a,this._year=r,this._month=n,this._day=o,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function k(a,r){return a=""+a,"000000".substring(0,r-a.length)+a}v(E.prototype,{newDate:function(a,r,n){return this._calendar.newDate(a??this,r,n)},year:function(a){return arguments.length===0?this._year:this.set(a,"y")},month:function(a){return arguments.length===0?this._month:this.set(a,"m")},day:function(a){return arguments.length===0?this._day:this.set(a,"d")},date:function(a,r,n){if(!this._calendar.isValid(a,r,n))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=a,this._month=r,this._day=n,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(a,r){return this._calendar.add(this,a,r)},set:function(a,r){return this._calendar.set(this,a,r)},compareTo:function(a){if(this._calendar.name!==a._calendar.name)throw(t.local.differentCalendars||t.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,a._calendar.local.name);var r=this._year!==a._year?this._year-a._year:this._month!==a._month?this.monthOfYear()-a.monthOfYear():this._day-a._day;return r===0?0:r<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(a){return this._calendar.fromJD(a)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(a){return this._calendar.fromJSDate(a)},toString:function(){return(this.year()<0?"-":"")+k(Math.abs(this.year()),4)+"-"+k(this.month(),2)+"-"+k(this.day(),2)}});function l(){this.shortYearCutoff="+10"}v(l.prototype,{_validateLevel:0,newDate:function(a,r,n){return a==null?this.today():(a.year&&(this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate),n=a.day(),r=a.month(),a=a.year()),new E(this,a,r,n))},today:function(){return this.fromJSDate(new Date)},epoch:function(a){var r=this._validate(a,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(a){var r=this._validate(a,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+k(Math.abs(r.year()),4)},monthsInYear:function(a){return this._validate(a,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear),12},monthOfYear:function(a,r){var n=this._validate(a,r,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth);return(n.month()+this.monthsInYear(n)-this.firstMonth)%this.monthsInYear(n)+this.minMonth},fromMonthOfYear:function(a,r){var n=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(a)+this.minMonth;return this._validate(a,n,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth),n},daysInYear:function(a){var r=this._validate(a,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(a,r,n){var o=this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate);return o.toJD()-this.newDate(o.year(),this.fromMonthOfYear(o.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(a,r,n){var o=this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(o))+2)%this.daysInWeek()},extraInfo:function(a,r,n){return this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate),{}},add:function(a,r,n){return this._validate(a,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate),this._correctAdd(a,this._add(a,r,n),r,n)},_add:function(a,r,n){if(this._validateLevel++,n==="d"||n==="w"){var o=a.toJD()+r*(n==="w"?this.daysInWeek():1),s=a.calendar().fromJD(o);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var c=a.year()+(n==="y"?r:0),m=a.monthOfYear()+(n==="m"?r:0),s=a.day(),h=function(i){for(;mw-1+i.minMonth;)c++,m-=w,w=i.monthsInYear(c)};n==="y"?(a.month()!==this.fromMonthOfYear(c,m)&&(m=this.newDate(c,a.month(),this.minDay).monthOfYear()),m=Math.min(m,this.monthsInYear(c)),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,m)))):n==="m"&&(h(this),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,m))));var p=[c,this.fromMonthOfYear(c,m),s];return this._validateLevel--,p}catch(g){throw this._validateLevel--,g}},_correctAdd:function(a,r,n,o){if(!this.hasYearZero&&(o==="y"||o==="m")&&(r[0]===0||a.year()>0!=r[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[o],c=n<0?-1:1;r=this._add(a,n*s[0]+c*s[1],s[2])}return a.date(r[0],r[1],r[2])},set:function(a,r,n){this._validate(a,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate);var o=n==="y"?r:a.year(),s=n==="m"?r:a.month(),c=n==="d"?r:a.day();return(n==="y"||n==="m")&&(c=Math.min(c,this.daysInMonth(o,s))),a.date(o,s,c)},isValid:function(a,r,n){this._validateLevel++;var o=this.hasYearZero||a!==0;if(o){var s=this.newDate(a,r,this.minDay);o=r>=this.minMonth&&r-this.minMonth=this.minDay&&n-this.minDay13.5?13:1),g=s-(p>2.5?4716:4715);return g<=0&&g--,this.newDate(g,p,h)},toJSDate:function(a,r,n){var o=this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate),s=new Date(o.year(),o.month()-1,o.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(a){return this.newDate(a.getFullYear(),a.getMonth()+1,a.getDate())}});var t=V.exports=new x;t.cdate=E,t.baseCalendar=l,t.calendars.gregorian=e}}),ZD=Ee({"node_modules/world-calendars/dist/plus.js"(){var J=Lc(),V=kf();J(V.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),V.local=V.regionalOptions[""],J(V.cdate.prototype,{formatDate:function(v,x){return typeof v!="string"&&(x=v,v=""),this._calendar.formatDate(v||"",this,x)}}),J(V.baseCalendar.prototype,{UNIX_EPOCH:V.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:V.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(v,x,E){if(typeof v!="string"&&(E=x,x=v,v=""),!x)return"";if(x.calendar()!==this)throw V.local.invalidFormat||V.regionalOptions[""].invalidFormat;v=v||this.local.dateFormat,E=E||{};for(var k=E.dayNamesShort||this.local.dayNamesShort,l=E.dayNames||this.local.dayNames,e=E.monthNumbers||this.local.monthNumbers,t=E.monthNamesShort||this.local.monthNamesShort,a=E.monthNames||this.local.monthNames,r=E.calculateWeek||this.local.calculateWeek,n=function(M,C){for(var _=1;S+_1},o=function(M,C,_,T){var f=""+C;if(n(M,T))for(;f.length<_;)f="0"+f;return f},s=function(M,C,_,T){return n(M)?T[C]:_[C]},c=this,m=function(M){return typeof e=="function"?e.call(c,M,n("m")):g(o("m",M.month(),2))},h=function(M,C){return C?typeof a=="function"?a.call(c,M):a[M.month()-c.minMonth]:typeof t=="function"?t.call(c,M):t[M.month()-c.minMonth]},p=this.local.digits,g=function(M){return E.localNumbers&&p?p(M):M},i="",w=!1,S=0;S1},w=function(z,I){var N=i(z,I),R=[2,3,N?4:2,N?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],B=new RegExp("^-?\\d{1,"+R+"}"),F=x.substring(f).match(B);if(!F)throw(V.local.missingNumberAt||V.regionalOptions[""].missingNumberAt).replace(/\{0\}/,f);return f+=F[0].length,parseInt(F[0],10)},S=this,M=function(){if(typeof a=="function"){i("m");var z=a.call(S,x.substring(f));return f+=z.length,z}return w("m")},C=function(z,I,N,R){for(var B=i(z,R)?N:I,F=0;F-1){c=1,m=h;for(var b=this.daysInMonth(s,c);m>b;b=this.daysInMonth(s,c))c++,m-=b}return o>-1?this.fromJD(o):this.newDate(s,c,m)},determineDate:function(v,x,E,k,l){E&&typeof E!="object"&&(l=k,k=E,E=null),typeof k!="string"&&(l=k,k="");var e=this,t=function(a){try{return e.parseDate(k,a,l)}catch{}a=a.toLowerCase();for(var r=(a.match(/^c/)&&E?E.newDate():null)||e.today(),n=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=n.exec(a);o;)r.add(parseInt(o[1],10),o[2]||"d"),o=n.exec(a);return r};return x=x?x.newDate():null,v=v==null?x:typeof v=="string"?t(v):typeof v=="number"?isNaN(v)||v===1/0||v===-1/0?x:e.today().add(v,"d"):e.newDate(v),v}})}}),KD=Ee({"node_modules/world-calendars/dist/calendars/chinese.js"(){var J=kf(),V=Lc(),v=J.instance();function x(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}x.prototype=new J.baseCalendar,V(x.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(o,s){if(typeof o=="string"){var c=o.match(k);return c?c[0]:""}var m=this._validateYear(o),h=o.month(),p=""+this.toChineseMonth(m,h);return s&&p.length<2&&(p="0"+p),this.isIntercalaryMonth(m,h)&&(p+="i"),p},monthNames:function(o){if(typeof o=="string"){var s=o.match(l);return s?s[0]:""}var c=this._validateYear(o),m=o.month(),h=this.toChineseMonth(c,m),p=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][h-1];return this.isIntercalaryMonth(c,m)&&(p="\u95F0"+p),p},monthNamesShort:function(o){if(typeof o=="string"){var s=o.match(e);return s?s[0]:""}var c=this._validateYear(o),m=o.month(),h=this.toChineseMonth(c,m),p=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][h-1];return this.isIntercalaryMonth(c,m)&&(p="\u95F0"+p),p},parseMonth:function(o,s){o=this._validateYear(o);var c=parseInt(s),m;if(isNaN(c))s[0]==="\u95F0"&&(m=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),c=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var h=s[s.length-1];m=h==="i"||h==="I"}var p=this.toMonthIndex(o,c,m);return p},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(o,s){if(o.year&&(o=o.year()),typeof o!="number"||o<1888||o>2111)throw s.replace(/\{0\}/,this.local.name);return o},toMonthIndex:function(o,s,c){var m=this.intercalaryMonth(o),h=c&&s!==m;if(h||s<1||s>12)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var p;return m?!c&&s<=m?p=s-1:p=s:p=s-1,p},toChineseMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o),m=c?12:11;if(s<0||s>m)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var h;return c?s>13;return c},isIntercalaryMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o);return!!c&&c===s},leapYear:function(o){return this.intercalaryMonth(o)!==0},weekOfYear:function(o,s,c){var m=this._validateYear(o,J.local.invalidyear),h=a[m-a[0]],p=h>>9&4095,g=h>>5&15,i=h&31,w;w=v.newDate(p,g,i),w.add(4-(w.dayOfWeek()||7),"d");var S=this.toJD(o,s,c)-w.toJD();return 1+Math.floor(S/7)},monthsInYear:function(o){return this.leapYear(o)?13:12},daysInMonth:function(o,s){o.year&&(s=o.month(),o=o.year()),o=this._validateYear(o);var c=t[o-t[0]],m=c>>13,h=m?12:11;if(s>h)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var p=c&1<<12-s?30:29;return p},weekDay:function(o,s,c){return(this.dayOfWeek(o,s,c)||7)<6},toJD:function(o,s,c){var m=this._validate(o,p,c,J.local.invalidDate);o=this._validateYear(m.year()),s=m.month(),c=m.day();var h=this.isIntercalaryMonth(o,s),p=this.toChineseMonth(o,s),g=n(o,p,c,h);return v.toJD(g.year,g.month,g.day)},fromJD:function(o){var s=v.fromJD(o),c=r(s.year(),s.month(),s.day()),m=this.toMonthIndex(c.year,c.month,c.isIntercalary);return this.newDate(c.year,m,c.day)},fromString:function(o){var s=o.match(E),c=this._validateYear(+s[1]),m=+s[2],h=!!s[3],p=this.toMonthIndex(c,m,h),g=+s[4];return this.newDate(c,p,g)},add:function(o,s,c){var m=o.year(),h=o.month(),p=this.isIntercalaryMonth(m,h),g=this.toChineseMonth(m,h),i=Object.getPrototypeOf(x.prototype).add.call(this,o,s,c);if(c==="y"){var w=i.year(),S=i.month(),M=this.isIntercalaryMonth(w,g),C=p&&M?this.toMonthIndex(w,g,!0):this.toMonthIndex(w,g,!1);C!==S&&i.month(C)}return i}});var E=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,k=/^\d?\d[iI]?/m,l=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;J.calendars.chinese=x;var t=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],a=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function r(o,s,c,m){var h,p;if(typeof o=="object")h=o,p=s||{};else{var g=typeof o=="number"&&o>=1888&&o<=2111;if(!g)throw new Error("Solar year outside range 1888-2111");var i=typeof s=="number"&&s>=1&&s<=12;if(!i)throw new Error("Solar month outside range 1 - 12");var w=typeof c=="number"&&c>=1&&c<=31;if(!w)throw new Error("Solar day outside range 1 - 31");h={year:o,month:s,day:c},p=m||{}}var S=a[h.year-a[0]],M=h.year<<9|h.month<<5|h.day;p.year=M>=S?h.year:h.year-1,S=a[p.year-a[0]];var C=S>>9&4095,_=S>>5&15,T=S&31,f,u=new Date(C,_-1,T),A=new Date(h.year,h.month-1,h.day);f=Math.round((A-u)/(24*3600*1e3));var b=t[p.year-t[0]],z;for(z=0;z<13;z++){var I=b&1<<12-z?30:29;if(f>13;return!N||z=1888&&o<=2111;if(!i)throw new Error("Lunar year outside range 1888-2111");var w=typeof s=="number"&&s>=1&&s<=12;if(!w)throw new Error("Lunar month outside range 1 - 12");var S=typeof c=="number"&&c>=1&&c<=30;if(!S)throw new Error("Lunar day outside range 1 - 30");var M;typeof m=="object"?(M=!1,p=m):(M=!!m,p=h||{}),g={year:o,month:s,day:c,isIntercalary:M}}var C;C=g.day-1;var _=t[g.year-t[0]],T=_>>13,f;T&&(g.month>T||g.isIntercalary)?f=g.month:f=g.month-1;for(var u=0;u>9&4095,I=b>>5&15,N=b&31,R=new Date(z,I-1,N+C);return p.year=R.getFullYear(),p.month=1+R.getMonth(),p.day=R.getDate(),p}}}),JD=Ee({"node_modules/world-calendars/dist/calendars/coptic.js"(){var J=kf(),V=Lc();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(x,E,k){var l=this.newDate(x,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(x,E){var k=this._validate(x,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(x,E,k){return(this.dayOfWeek(x,E,k)||7)<6},toJD:function(x,E,k){var l=this._validate(x,E,k,J.local.invalidDate);return x=l.year(),x<0&&x++,l.day()+(l.month()-1)*30+(x-1)*365+Math.floor(x/4)+this.jdEpoch-1},fromJD:function(x){var E=Math.floor(x)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(x)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.coptic=v}}),QD=Ee({"node_modules/world-calendars/dist/calendars/discworld.js"(){var J=kf(),V=Lc();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),!1},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),13},daysInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),400},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return(e.day()+1)%8},weekDay:function(E,k,l){var e=this.dayOfWeek(E,k,l);return e>=2&&e<=6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{century:x[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return E=e.year()+(e.year()<0?1:0),k=e.month(),l=e.day(),l+(k>1?16:0)+(k>2?(k-2)*32:0)+(E-1)*400+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E+.5)-Math.floor(this.jdEpoch)-1;var k=Math.floor(E/400)+1;E-=(k-1)*400,E+=E>15?16:0;var l=Math.floor(E/32)+1,e=E-(l-1)*32+1;return this.newDate(k<=0?k-1:k,l,e)}});var x={20:"Fruitbat",21:"Anchovy"};J.calendars.discworld=v}}),eI=Ee({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var J=kf(),V=Lc();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(x,E,k){var l=this.newDate(x,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(x,E){var k=this._validate(x,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(x,E,k){return(this.dayOfWeek(x,E,k)||7)<6},toJD:function(x,E,k){var l=this._validate(x,E,k,J.local.invalidDate);return x=l.year(),x<0&&x++,l.day()+(l.month()-1)*30+(x-1)*365+Math.floor(x/4)+this.jdEpoch-1},fromJD:function(x){var E=Math.floor(x)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(x)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.ethiopian=v}}),tI=Ee({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var J=kf(),V=Lc();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this._leapYear(k.year())},_leapYear:function(E){return E=E<0?E+1:E,x(E*7+1,19)<7},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),this._leapYear(E.year?E.year():E)?13:12},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return E=k.year(),this.toJD(E===-1?1:E+1,7,1)-this.toJD(E,7,1)},daysInMonth:function(E,k){return E.year&&(k=E.month(),E=E.year()),this._validate(E,k,this.minDay,J.local.invalidMonth),k===12&&this.leapYear(E)||k===8&&x(this.daysInYear(E),10)===5?30:k===9&&x(this.daysInYear(E),10)===3?29:this.daysPerMonth[k-1]},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=E<=0?E+1:E,a=this.jdEpoch+this._delay1(t)+this._delay2(t)+l+1;if(k<7){for(var r=7;r<=this.monthsInYear(E);r++)a+=this.daysInMonth(E,r);for(var r=1;r=this.toJD(k===-1?1:k+1,7,1);)k++;for(var l=Ethis.toJD(k,l,this.daysInMonth(k,l));)l++;var e=E-this.toJD(k,l,1)+1;return this.newDate(k,l,e)}});function x(E,k){return E-k*Math.floor(E/k)}J.calendars.hebrew=v}}),rI=Ee({"node_modules/world-calendars/dist/calendars/islamic.js"(){var J=kf(),V=Lc();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012Bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(x){var E=this._validate(x,this.minMonth,this.minDay,J.local.invalidYear);return(E.year()*11+14)%30<11},weekOfYear:function(x,E,k){var l=this.newDate(x,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(x){return this.leapYear(x)?355:354},daysInMonth:function(x,E){var k=this._validate(x,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===12&&this.leapYear(k.year())?1:0)},weekDay:function(x,E,k){return this.dayOfWeek(x,E,k)!==5},toJD:function(x,E,k){var l=this._validate(x,E,k,J.local.invalidDate);return x=l.year(),E=l.month(),k=l.day(),x=x<=0?x+1:x,k+Math.ceil(29.5*(E-1))+(x-1)*354+Math.floor((3+11*x)/30)+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x)+.5;var E=Math.floor((30*(x-this.jdEpoch)+10646)/10631);E=E<=0?E-1:E;var k=Math.min(12,Math.ceil((x-29-this.toJD(E,1,1))/29.5)+1),l=x-this.toJD(E,k,1)+1;return this.newDate(E,k,l)}}),J.calendars.islamic=v}}),nI=Ee({"node_modules/world-calendars/dist/calendars/julian.js"(){var J=kf(),V=Lc();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()<0?E.year()+1:E.year();return k%4===0},weekOfYear:function(x,E,k){var l=this.newDate(x,E,k);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(x,E){var k=this._validate(x,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===2&&this.leapYear(k.year())?1:0)},weekDay:function(x,E,k){return(this.dayOfWeek(x,E,k)||7)<6},toJD:function(x,E,k){var l=this._validate(x,E,k,J.local.invalidDate);return x=l.year(),E=l.month(),k=l.day(),x<0&&x++,E<=2&&(x--,E+=12),Math.floor(365.25*(x+4716))+Math.floor(30.6001*(E+1))+k-1524.5},fromJD:function(x){var E=Math.floor(x+.5),k=E+1524,l=Math.floor((k-122.1)/365.25),e=Math.floor(365.25*l),t=Math.floor((k-e)/30.6001),a=t-Math.floor(t<14?1:13),r=l-Math.floor(a>2?4716:4715),n=k-e-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,a,n)}}),J.calendars.julian=v}}),aI=Ee({"node_modules/world-calendars/dist/calendars/mayan.js"(){var J=kf(),V=Lc();function v(k){this.local=this.regionalOptions[k||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),!1},formatYear:function(k){var l=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear);k=l.year();var e=Math.floor(k/400);k=k%400,k+=k<0?400:0;var t=Math.floor(k/20);return e+"."+t+"."+k%20},forYear:function(k){if(k=k.split("."),k.length<3)throw"Invalid Mayan year";for(var l=0,e=0;e19||e>0&&t<0)throw"Invalid Mayan year";l=l*20+t}return l},monthsInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),18},weekOfYear:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),0},daysInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),360},daysInMonth:function(k,l){return this._validate(k,l,this.minDay,J.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()},weekDay:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),!0},extraInfo:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate),a=t.toJD(),r=this._toHaab(a),n=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[n[0]-1],tzolkinDay:n[0],tzolkinTrecena:n[1]}},_toHaab:function(k){k-=this.jdEpoch;var l=x(k+8+17*20,365);return[Math.floor(l/20)+1,x(l,20)]},_toTzolkin:function(k){return k-=this.jdEpoch,[E(k+20,20),E(k+4,13)]},toJD:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()+t.month()*20+t.year()*360+this.jdEpoch},fromJD:function(k){k=Math.floor(k)+.5-this.jdEpoch;var l=Math.floor(k/360);k=k%360,k+=k<0?360:0;var e=Math.floor(k/20),t=k%20;return this.newDate(l,e,t)}});function x(k,l){return k-l*Math.floor(k/l)}function E(k,l){return x(k-1,l)+1}J.calendars.mayan=v}}),iI=Ee({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var J=kf(),V=Lc();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar;var x=J.instance("gregorian");V(v.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear);return x.leapYear(k.year()+(k.year()<1?1:0)+1469)},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidMonth),t=e.year();t<0&&t++;for(var a=e.day(),r=1;r=this.toJD(k+1,1,1);)k++;for(var l=E-Math.floor(this.toJD(k,1,1)+.5)+1,e=1;l>this.daysInMonth(k,e);)l-=this.daysInMonth(k,e),e++;return this.newDate(k,e,l)}}),J.calendars.nanakshahi=v}}),oI=Ee({"node_modules/world-calendars/dist/calendars/nepali.js"(){var J=kf(),V=Lc();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(x){return this.daysInYear(x)!==this.daysPerYear},weekOfYear:function(x,E,k){var l=this.newDate(x,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(x){var E=this._validate(x,this.minMonth,this.minDay,J.local.invalidYear);if(x=E.year(),typeof this.NEPALI_CALENDAR_DATA[x]>"u")return this.daysPerYear;for(var k=0,l=this.minMonth;l<=12;l++)k+=this.NEPALI_CALENDAR_DATA[x][l];return k},daysInMonth:function(x,E){return x.year&&(E=x.month(),x=x.year()),this._validate(x,E,this.minDay,J.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[x]>"u"?this.daysPerMonth[E-1]:this.NEPALI_CALENDAR_DATA[x][E]},weekDay:function(x,E,k){return this.dayOfWeek(x,E,k)!==6},toJD:function(x,E,k){var l=this._validate(x,E,k,J.local.invalidDate);x=l.year(),E=l.month(),k=l.day();var e=J.instance(),t=0,a=E,r=x;this._createMissingCalendarData(x);var n=x-(a>9||a===9&&k>=this.NEPALI_CALENDAR_DATA[r][0]?56:57);for(E!==9&&(t=k,a--);a!==9;)a<=0&&(a=12,r--),t+=this.NEPALI_CALENDAR_DATA[r][a],a--;return E===9?(t+=k-this.NEPALI_CALENDAR_DATA[r][0],t<0&&(t+=e.daysInYear(n))):t+=this.NEPALI_CALENDAR_DATA[r][9]-this.NEPALI_CALENDAR_DATA[r][0],e.newDate(n,1,1).add(t,"d").toJD()},fromJD:function(x){var E=J.instance(),k=E.fromJD(x),l=k.year(),e=k.dayOfYear(),t=l+56;this._createMissingCalendarData(t);for(var a=9,r=this.NEPALI_CALENDAR_DATA[t][0],n=this.NEPALI_CALENDAR_DATA[t][a]-r+1;e>n;)a++,a>12&&(a=1,t++),n+=this.NEPALI_CALENDAR_DATA[t][a];var o=this.NEPALI_CALENDAR_DATA[t][a]-(n-e);return this.newDate(t,a,o)},_createMissingCalendarData:function(x){var E=this.daysPerMonth.slice(0);E.unshift(17);for(var k=x-1;k"u"&&(this.NEPALI_CALENDAR_DATA[k]=E)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),J.calendars.nepali=v}}),sI=Ee({"node_modules/world-calendars/dist/calendars/persian.js"(){var J=kf(),V=Lc();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}function x(E){var k=E-475;E<0&&k++;var l=.242197,e=l*k,t=l*(k+1),a=e-Math.floor(e),r=t-Math.floor(t);return a>r}v.prototype=new J.baseCalendar,V(v.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return x(k.year())},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=0;if(E>0)for(var a=1;a0?E-1:E)*365+t+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E)+.5;var k=475+(E-this.toJD(475,1,1))/365.242197,l=Math.floor(k);l<=0&&l--,E>this.toJD(l,12,x(l)?30:29)&&(l++,l===0&&l++);var e=E-this.toJD(l,1,1)+1,t=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),a=E-this.toJD(l,t,1)+1;return this.newDate(l,t,a)}}),J.calendars.persian=v,J.calendars.jalali=v}}),lI=Ee({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var J=kf(),V=Lc(),v=J.instance();function x(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}x.prototype=new J.baseCalendar,V(x.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return v.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return v.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return v.toJD(t,e.month(),e.day())},fromJD:function(E){var k=v.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)},_g2tYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)}}),J.calendars.taiwan=x}}),uI=Ee({"node_modules/world-calendars/dist/calendars/thai.js"(){var J=kf(),V=Lc(),v=J.instance();function x(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}x.prototype=new J.baseCalendar,V(x.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return v.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return v.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return v.toJD(t,e.month(),e.day())},fromJD:function(E){var k=v.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)},_g2tYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)}}),J.calendars.thai=x}}),cI=Ee({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var J=kf(),V=Lc();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this.daysInYear(k.year())===355},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){for(var k=0,l=1;l<=12;l++)k+=this.daysInMonth(E,l);return k},daysInMonth:function(E,k){for(var l=this._validate(E,k,this.minDay,J.local.invalidMonth),e=l.toJD()-24e5+.5,t=0,a=0;ae)return x[t]-x[t-1];t++}return 30},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate),t=12*(e.year()-1)+e.month()-15292,a=e.day()+x[t-1]-1;return a+24e5-.5},fromJD:function(E){for(var k=E-24e5+.5,l=0,e=0;ek);e++)l++;var t=l+15292,a=Math.floor((t-1)/12),r=a+1,n=t-12*a,o=k-x[l-1]+1;return this.newDate(r,n,o)},isValid:function(E,k,l){var e=J.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(E=E.year!=null?E.year:E,e=E>=1276&&E<=1500),e},_validate:function(E,k,l,e){var t=J.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw e.replace(/\{0\}/,this.local.name);return t}}),J.calendars.ummalqura=v;var x=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]}}),fI=Ee({"src/components/calendars/calendars.js"(J,V){"use strict";V.exports=kf(),ZD(),KD(),JD(),QD(),eI(),tI(),rI(),nI(),aI(),iI(),oI(),sI(),lI(),uI(),cI()}}),hI=Ee({"src/components/calendars/index.js"(J,V){"use strict";var v=fI(),x=Vr(),E=Qi(),k=E.EPOCHJD,l=E.ONEDAY,e={valType:"enumerated",values:x.sortObjectKeys(v.calendars),editType:"calc",dflt:"gregorian"},t=function(_,T,f,u){var A={};return A[f]=e,x.coerce(_,T,A,f,u)},a=function(_,T,f,u){for(var A=0;A{Xt.preventDefault(),Xt.stopPropagation(),Xt.clipboardData.setData("text",st),ft.removeEventListener("copy",Lt,!0)};ft.addEventListener("copy",Lt,!0),document.execCommand("copy")}xt.copyText=be})(nA||(nA={}));var Rl;(function(xt){function be(Xt){let Hr=window.getComputedStyle(Xt),Cr=parseFloat(Hr.borderTopWidth)||0,jr=parseFloat(Hr.borderLeftWidth)||0,Jr=parseFloat(Hr.borderRightWidth)||0,zr=parseFloat(Hr.borderBottomWidth)||0,Gr=parseFloat(Hr.paddingTop)||0,tn=parseFloat(Hr.paddingLeft)||0,Yr=parseFloat(Hr.paddingRight)||0,Nr=parseFloat(Hr.paddingBottom)||0,Qr=jr+tn+Yr+Jr,En=Cr+Gr+Nr+zr;return{borderTop:Cr,borderLeft:jr,borderRight:Jr,borderBottom:zr,paddingTop:Gr,paddingLeft:tn,paddingRight:Yr,paddingBottom:Nr,horizontalSum:Qr,verticalSum:En}}xt.boxSizing=be;function st(Xt){let Hr=window.getComputedStyle(Xt),Cr=parseFloat(Hr.minWidth)||0,jr=parseFloat(Hr.minHeight)||0,Jr=parseFloat(Hr.maxWidth)||1/0,zr=parseFloat(Hr.maxHeight)||1/0;return Jr=Math.max(Cr,Jr),zr=Math.max(jr,zr),{minWidth:Cr,minHeight:jr,maxWidth:Jr,maxHeight:zr}}xt.sizeLimits=st;function ft(Xt,Hr,Cr){let jr=Xt.getBoundingClientRect();return Hr>=jr.left&&Hr=jr.top&&Cr=Cr.bottom)){if(jr.topCr.bottom&&jr.height>=Cr.height){Xt.scrollTop-=Cr.top-jr.top;return}if(jr.topCr.height){Xt.scrollTop-=Cr.bottom-jr.bottom;return}if(jr.bottom>Cr.bottom&&jr.height{let zr=Element.prototype;return zr.matches||zr.matchesSelector||zr.mozMatchesSelector||zr.msMatchesSelector||zr.oMatchesSelector||zr.webkitMatchesSelector||function(Gr){let tn=this,Yr=tn.ownerDocument?tn.ownerDocument.querySelectorAll(Gr):[];return Array.prototype.indexOf.call(Yr,tn)!==-1}})();function be(zr){zr=zr.split(",",1)[0];let Gr=0,tn=0,Yr=0;function Nr(Qr){let En=zr.match(Qr);return En===null?!1:(zr=zr.slice(En[0].length),!0)}for(zr=zr.replace(Jr," $1 ");zr.length>0;){if(Nr(st)){Gr++;continue}if(Nr(ft)){tn++;continue}if(Nr(Lt)){tn++;continue}if(Nr(Hr)){Yr++;continue}if(Nr(Cr)){tn++;continue}if(Nr(Xt)){Yr++;continue}if(!Nr(jr))return 0}return Gr=Math.min(Gr,255),tn=Math.min(tn,255),Yr=Math.min(Yr,255),Gr<<16|tn<<8|Yr}xt.calculateSingle=be;let st=/^#[^\s\+>~#\.\[:]+/,ft=/^\.[^\s\+>~#\.\[:]+/,Lt=/^\[[^\]]+\]/,Xt=/^[^\s\+>~#\.\[:]+/,Hr=/^(::[^\s\+>~#\.\[:]+|:first-line|:first-letter|:before|:after)/,Cr=/^:[^\s\+>~#\.\[:]+/,jr=/^[\s\+>~\*]+/,Jr=/:not\(([^\)]+)\)/g})(kh||(kh={}));var ud=sd(yv());var Ep=class{constructor(){this._first=null,this._last=null,this._size=0}get isEmpty(){return this._size===0}get size(){return this._size}get length(){return this._size}get first(){return this._first?this._first.value:void 0}get last(){return this._last?this._last.value:void 0}get firstNode(){return this._first}get lastNode(){return this._last}*[Symbol.iterator](){let be=this._first;for(;be;)yield be.value,be=be.next}*retro(){let be=this._last;for(;be;)yield be.value,be=be.prev}*nodes(){let be=this._first;for(;be;)yield be,be=be.next}*retroNodes(){let be=this._last;for(;be;)yield be,be=be.prev}assign(be){this.clear();for(let st of be)this.addLast(st)}push(be){this.addLast(be)}pop(){return this.removeLast()}shift(be){this.addFirst(be)}unshift(){return this.removeFirst()}addFirst(be){let st=new ld.LinkedListNode(this,be);return this._first?(st.next=this._first,this._first.prev=st,this._first=st):(this._first=st,this._last=st),this._size++,st}addLast(be){let st=new ld.LinkedListNode(this,be);return this._last?(st.prev=this._last,this._last.next=st,this._last=st):(this._first=st,this._last=st),this._size++,st}insertBefore(be,st){if(!st||st===this._first)return this.addFirst(be);if(!(st instanceof ld.LinkedListNode)||st.list!==this)throw new Error("Reference node is not owned by the list.");let ft=new ld.LinkedListNode(this,be),Lt=st,Xt=Lt.prev;return ft.next=Lt,ft.prev=Xt,Lt.prev=ft,Xt.next=ft,this._size++,ft}insertAfter(be,st){if(!st||st===this._last)return this.addLast(be);if(!(st instanceof ld.LinkedListNode)||st.list!==this)throw new Error("Reference node is not owned by the list.");let ft=new ld.LinkedListNode(this,be),Lt=st,Xt=Lt.next;return ft.next=Xt,ft.prev=Lt,Lt.next=ft,Xt.prev=ft,this._size++,ft}removeFirst(){let be=this._first;if(be)return be===this._last?(this._first=null,this._last=null):(this._first=be.next,this._first.prev=null),be.list=null,be.next=null,be.prev=null,this._size--,be.value}removeLast(){let be=this._last;if(be)return be===this._first?(this._first=null,this._last=null):(this._last=be.prev,this._last.next=null),be.list=null,be.next=null,be.prev=null,this._size--,be.value}removeNode(be){if(!(be instanceof ld.LinkedListNode)||be.list!==this)throw new Error("Node is not owned by the list.");let st=be;st===this._first&&st===this._last?(this._first=null,this._last=null):st===this._first?(this._first=st.next,this._first.prev=null):st===this._last?(this._last=st.prev,this._last.next=null):(st.next.prev=st.prev,st.prev.next=st.next),st.list=null,st.next=null,st.prev=null,this._size--}clear(){let be=this._first;for(;be;){let st=be.next;be.list=null,be.prev=null,be.next=null,be=st}this._first=null,this._last=null,this._size=0}};(function(xt){function be(st){let ft=new xt;return ft.assign(st),ft}xt.from=be})(Ep||(Ep={}));var ld;(function(xt){class be{constructor(ft,Lt){this.list=null,this.next=null,this.prev=null,this.list=ft,this.value=Lt}}xt.LinkedListNode=be})(ld||(ld={}));var Xf=class{constructor(be){this.type=be}get isConflatable(){return!1}conflate(be){return!1}},Ud=class extends Xf{get isConflatable(){return!0}conflate(be){return!0}},$i;(function(xt){let be=null,st=(ni=>qi=>{let Ta=!1;return ni.then(()=>!Ta&&qi()),()=>{Ta=!0}})(Promise.resolve());function ft(ni,qi){let Ta=tn.get(ni);if(!Ta||Ta.length===0){In(ni,qi);return}(0,ud.every)((0,ud.retro)(Ta),ki=>ki?En(ki,ni,qi):!0)&&In(ni,qi)}xt.sendMessage=ft;function Lt(ni,qi){if(!qi.isConflatable){Ee(ni,qi);return}(0,ud.some)(Gr,Hn=>Hn.handler!==ni||!Hn.msg||Hn.msg.type!==qi.type||!Hn.msg.isConflatable?!1:Hn.msg.conflate(qi))||Ee(ni,qi)}xt.postMessage=Lt;function Xt(ni,qi){let Ta=tn.get(ni);Ta&&Ta.indexOf(qi)!==-1||(Ta?Ta.push(qi):tn.set(ni,[qi]))}xt.installMessageHook=Xt;function Hr(ni,qi){let Ta=tn.get(ni);if(!Ta)return;let Hn=Ta.indexOf(qi);Hn!==-1&&(Ta[Hn]=null,Wn(Ta))}xt.removeMessageHook=Hr;function Cr(ni){let qi=tn.get(ni);qi&&qi.length>0&&(ud.ArrayExt.fill(qi,null),Wn(qi));for(let Ta of Gr)Ta.handler===ni&&(Ta.handler=null,Ta.msg=null)}xt.clearData=Cr;function jr(){Qr||be===null||(be(),be=null,Qr=!0,yn(),Qr=!1)}xt.flush=jr;function Jr(){return Nr}xt.getExceptionHandler=Jr;function zr(ni){let qi=Nr;return Nr=ni,qi}xt.setExceptionHandler=zr;let Gr=new Ep,tn=new WeakMap,Yr=new Set,Nr=ni=>{console.error(ni)},Qr=!1;function En(ni,qi,Ta){let Hn=!0;try{typeof ni=="function"?Hn=ni(qi,Ta):Hn=ni.messageHook(qi,Ta)}catch(ki){Nr(ki)}return Hn}function In(ni,qi){try{ni.processMessage(qi)}catch(Ta){Nr(Ta)}}function Ee(ni,qi){Gr.addLast({handler:ni,msg:qi}),be===null&&(be=st(yn))}function yn(){if(be=null,Gr.isEmpty)return;let ni={handler:null,msg:null};for(Gr.addLast(ni);;){let qi=Gr.removeFirst();if(qi===ni)return;qi.handler&&qi.msg&&ft(qi.handler,qi.msg)}}function Wn(ni){Yr.size===0&&st(Yn),Yr.add(ni)}function Yn(){Yr.forEach(ra),Yr.clear()}function ra(ni){ud.ArrayExt.removeAllWhere(ni,ri)}function ri(ni){return ni===null}})($i||($i={}));var $f=class{constructor(be){this._pid=_v.nextPID(),this.name=be.name,this._create=be.create,this._coerce=be.coerce||null,this._compare=be.compare||null,this._changed=be.changed||null}get(be){let st,ft=_v.ensureMap(be);return this._pid in ft?st=ft[this._pid]:st=ft[this._pid]=this._createValue(be),st}set(be,st){let ft,Lt=_v.ensureMap(be);this._pid in Lt?ft=Lt[this._pid]:ft=Lt[this._pid]=this._createValue(be);let Xt=this._coerceValue(be,st);this._maybeNotify(be,ft,Lt[this._pid]=Xt)}coerce(be){let st,ft=_v.ensureMap(be);this._pid in ft?st=ft[this._pid]:st=ft[this._pid]=this._createValue(be);let Lt=this._coerceValue(be,st);this._maybeNotify(be,st,ft[this._pid]=Lt)}_createValue(be){let st=this._create;return st(be)}_coerceValue(be,st){let ft=this._coerce;return ft?ft(be,st):st}_compareValue(be,st){let ft=this._compare;return ft?ft(be,st):be===st}_maybeNotify(be,st,ft){let Lt=this._changed;Lt&&!this._compareValue(st,ft)&&Lt(be,st,ft)}};(function(xt){function be(st){_v.ownerData.delete(st)}xt.clearData=be})($f||($f={}));var _v;(function(xt){xt.ownerData=new WeakMap,xt.nextPID=(()=>{let st=0;return()=>`pid-${`${Math.random()}`.slice(2)}-${st++}`})();function be(st){let ft=xt.ownerData.get(st);return ft||(ft=Object.create(null),xt.ownerData.set(st,ft),ft)}xt.ensureMap=be})(_v||(_v={}));var dg=sd(yv()),ZF=sd(hg()),Ml=class{constructor(be){this.sender=be}connect(be,st){return oh.connect(this,be,st)}disconnect(be,st){return oh.disconnect(this,be,st)}emit(be){oh.emit(this,be)}};(function(xt){function be(jr,Jr){oh.disconnectBetween(jr,Jr)}xt.disconnectBetween=be;function st(jr){oh.disconnectSender(jr)}xt.disconnectSender=st;function ft(jr){oh.disconnectReceiver(jr)}xt.disconnectReceiver=ft;function Lt(jr){oh.disconnectAll(jr)}xt.disconnectAll=Lt;function Xt(jr){oh.disconnectAll(jr)}xt.clearData=Xt;function Hr(){return oh.exceptionHandler}xt.getExceptionHandler=Hr;function Cr(jr){let Jr=oh.exceptionHandler;return oh.exceptionHandler=jr,Jr}xt.setExceptionHandler=Cr})(Ml||(Ml={}));var oh;(function(xt){xt.exceptionHandler=Ee=>{console.error(Ee)};function be(Ee,yn,Wn){Wn=Wn||void 0;let Yn=jr.get(Ee.sender);if(Yn||(Yn=[],jr.set(Ee.sender,Yn)),tn(Yn,Ee,yn,Wn))return!1;let ra=Wn||yn,ri=Jr.get(ra);ri||(ri=[],Jr.set(ra,ri));let ni={signal:Ee,slot:yn,thisArg:Wn};return Yn.push(ni),ri.push(ni),!0}xt.connect=be;function st(Ee,yn,Wn){Wn=Wn||void 0;let Yn=jr.get(Ee.sender);if(!Yn||Yn.length===0)return!1;let ra=tn(Yn,Ee,yn,Wn);if(!ra)return!1;let ri=Wn||yn,ni=Jr.get(ri);return ra.signal=null,Nr(Yn),Nr(ni),!0}xt.disconnect=st;function ft(Ee,yn){let Wn=jr.get(Ee);if(!Wn||Wn.length===0)return;let Yn=Jr.get(yn);if(!(!Yn||Yn.length===0)){for(let ra of Yn)ra.signal&&ra.signal.sender===Ee&&(ra.signal=null);Nr(Wn),Nr(Yn)}}xt.disconnectBetween=ft;function Lt(Ee){let yn=jr.get(Ee);if(!(!yn||yn.length===0)){for(let Wn of yn){if(!Wn.signal)continue;let Yn=Wn.thisArg||Wn.slot;Wn.signal=null,Nr(Jr.get(Yn))}Nr(yn)}}xt.disconnectSender=Lt;function Xt(Ee){let yn=Jr.get(Ee);if(!(!yn||yn.length===0)){for(let Wn of yn){if(!Wn.signal)continue;let Yn=Wn.signal.sender;Wn.signal=null,Nr(jr.get(Yn))}Nr(yn)}}xt.disconnectReceiver=Xt;function Hr(Ee){Lt(Ee),Xt(Ee)}xt.disconnectAll=Hr;function Cr(Ee,yn){let Wn=jr.get(Ee.sender);if(!(!Wn||Wn.length===0))for(let Yn=0,ra=Wn.length;Ynra.signal===yn&&ra.slot===Wn&&ra.thisArg===Yn)}function Yr(Ee,yn){let{signal:Wn,slot:Yn,thisArg:ra}=Ee;try{Yn.call(ra,Wn.sender,yn)}catch(ri){xt.exceptionHandler(ri)}}function Nr(Ee){zr.size===0&&Gr(Qr),zr.add(Ee)}function Qr(){zr.forEach(En),zr.clear()}function En(Ee){dg.ArrayExt.removeAllWhere(Ee,In)}function In(Ee){return Ee.signal===null}})(oh||(oh={}));var qd=class{constructor(be){this._fn=be}get isDisposed(){return!this._fn}dispose(){if(!this._fn)return;let be=this._fn;this._fn=null,be()}};var C0=class{constructor(){this._isDisposed=!1,this._items=new Set}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._items.forEach(be=>{be.dispose()}),this._items.clear())}contains(be){return this._items.has(be)}add(be){this._items.add(be)}remove(be){this._items.delete(be)}clear(){this._items.clear()}};(function(xt){function be(st){let ft=new xt;for(let Lt of st)ft.add(Lt);return ft}xt.from=be})(C0||(C0={}));var vg=class extends C0{constructor(){super(...arguments),this._disposed=new Ml(this)}get disposed(){return this._disposed}dispose(){this.isDisposed||(super.dispose(),this._disposed.emit(void 0),Ml.clearData(this))}};(function(xt){function be(st){let ft=new xt;for(let Lt of st)ft.add(Lt);return ft}xt.from=be})(vg||(vg={}));var Zf=class xt{constructor(be){this._onScrollFrame=()=>{if(!this._scrollTarget)return;let{element:st,edge:ft,distance:Lt}=this._scrollTarget,Xt=Uf.SCROLL_EDGE_SIZE-Lt,Hr=Math.pow(Xt/Uf.SCROLL_EDGE_SIZE,2),Cr=Math.max(1,Math.round(Hr*Uf.SCROLL_EDGE_SIZE));switch(ft){case"top":st.scrollTop-=Cr;break;case"left":st.scrollLeft-=Cr;break;case"right":st.scrollLeft+=Cr;break;case"bottom":st.scrollTop+=Cr;break}requestAnimationFrame(this._onScrollFrame)},this._disposed=!1,this._dropAction="none",this._override=null,this._currentTarget=null,this._currentElement=null,this._promise=null,this._scrollTarget=null,this._resolve=null,this.document=be.document||document,this.mimeData=be.mimeData,this.dragImage=be.dragImage||null,this.proposedAction=be.proposedAction||"copy",this.supportedActions=be.supportedActions||"all",this.source=be.source||null}dispose(){if(!this._disposed){if(this._disposed=!0,this._currentTarget){let be=new PointerEvent("pointerup",{bubbles:!0,cancelable:!0,clientX:-1,clientY:-1});Uf.dispatchDragLeave(this,this._currentTarget,null,be)}this._finalize("none")}}get isDisposed(){return this._disposed}start(be,st){if(this._disposed)return Promise.resolve("none");if(this._promise)return this._promise;this._addListeners(),this._attachDragImage(be,st),this._promise=new Promise(Lt=>{this._resolve=Lt});let ft=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:be,clientY:st});return document.dispatchEvent(ft),this._promise}handleEvent(be){switch(be.type){case"pointermove":this._evtPointerMove(be);break;case"pointerup":this._evtPointerUp(be);break;case"keydown":this._evtKeyDown(be);break;default:be.preventDefault(),be.stopPropagation();break}}moveDragImage(be,st){if(!this.dragImage)return;let ft=this.dragImage.style;ft.transform=`translate(${be}px, ${st}px)`}_evtPointerMove(be){be.preventDefault(),be.stopPropagation(),this._updateCurrentTarget(be),this._updateDragScroll(be),this.moveDragImage(be.clientX,be.clientY)}_evtPointerUp(be){if(be.preventDefault(),be.stopPropagation(),be.button!==0)return;if(this._updateCurrentTarget(be),!this._currentTarget){this._finalize("none");return}if(this._dropAction==="none"){Uf.dispatchDragLeave(this,this._currentTarget,null,be),this._finalize("none");return}let st=Uf.dispatchDrop(this,this._currentTarget,be);this._finalize(st)}_evtKeyDown(be){be.preventDefault(),be.stopPropagation(),be.keyCode===27&&this.dispose()}_addListeners(){document.addEventListener("pointerdown",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("pointerup",this,!0),document.addEventListener("pointerenter",this,!0),document.addEventListener("pointerleave",this,!0),document.addEventListener("pointerover",this,!0),document.addEventListener("pointerout",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("keyup",this,!0),document.addEventListener("keypress",this,!0),document.addEventListener("contextmenu",this,!0)}_removeListeners(){document.removeEventListener("pointerdown",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointerenter",this,!0),document.removeEventListener("pointerleave",this,!0),document.removeEventListener("pointerover",this,!0),document.removeEventListener("pointerout",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("keyup",this,!0),document.removeEventListener("keypress",this,!0),document.removeEventListener("contextmenu",this,!0)}_updateDragScroll(be){let st=Uf.findScrollTarget(be);!this._scrollTarget&&!st||(this._scrollTarget||setTimeout(this._onScrollFrame,500),this._scrollTarget=st)}_updateCurrentTarget(be){let st=this._currentTarget,ft=this._currentTarget,Lt=this._currentElement,Xt=Uf.findElementBehindBackdrop(be,this.document);this._currentElement=Xt,Xt!==Lt&&Xt!==ft&&Uf.dispatchDragExit(this,ft,Xt,be),Xt!==Lt&&Xt!==ft&&(ft=Uf.dispatchDragEnter(this,Xt,ft,be)),ft!==st&&(this._currentTarget=ft,Uf.dispatchDragLeave(this,st,ft,be));let Hr=Uf.dispatchDragOver(this,ft,be);this._setDropAction(Hr)}_attachDragImage(be,st){if(!this.dragImage)return;this.dragImage.classList.add("lm-mod-drag-image");let ft=this.dragImage.style;ft.pointerEvents="none",ft.position="fixed",ft.transform=`translate(${be}px, ${st}px)`,(this.document instanceof Document?this.document.body:this.document.firstElementChild).appendChild(this.dragImage)}_detachDragImage(){if(!this.dragImage)return;let be=this.dragImage.parentNode;be&&be.removeChild(this.dragImage)}_setDropAction(be){if(be=Uf.validateAction(be,this.supportedActions),!(this._override&&this._dropAction===be))switch(be){case"none":this._dropAction=be,this._override=xt.overrideCursor("no-drop",this.document);break;case"copy":this._dropAction=be,this._override=xt.overrideCursor("copy",this.document);break;case"link":this._dropAction=be,this._override=xt.overrideCursor("alias",this.document);break;case"move":this._dropAction=be,this._override=xt.overrideCursor("move",this.document);break}}_finalize(be){let st=this._resolve;this._removeListeners(),this._detachDragImage(),this._override&&(this._override.dispose(),this._override=null),this.mimeData.clear(),this._disposed=!0,this._dropAction="none",this._currentTarget=null,this._currentElement=null,this._scrollTarget=null,this._promise=null,this._resolve=null,st&&st(be)}};(function(xt){class be extends DragEvent{constructor(Lt,Xt){super(Xt.type,{bubbles:!0,cancelable:!0,altKey:Lt.altKey,button:Lt.button,clientX:Lt.clientX,clientY:Lt.clientY,ctrlKey:Lt.ctrlKey,detail:0,metaKey:Lt.metaKey,relatedTarget:Xt.related,screenX:Lt.screenX,screenY:Lt.screenY,shiftKey:Lt.shiftKey,view:window});let{drag:Hr}=Xt;this.dropAction="none",this.mimeData=Hr.mimeData,this.proposedAction=Hr.proposedAction,this.supportedActions=Hr.supportedActions,this.source=Hr.source}}xt.Event=be;function st(ft,Lt=document){return Uf.overrideCursor(ft,Lt)}xt.overrideCursor=st})(Zf||(Zf={}));var Uf;(function(xt){xt.SCROLL_EDGE_SIZE=20;function be(Wn,Yn){return Gr[Wn]&tn[Yn]?Wn:"none"}xt.validateAction=be;function st(Wn,Yn=document){if(Wn){if(ft&&Wn==ft.event)return ft.element;xt.cursorBackdrop.style.zIndex="-1000";let ra=Yn.elementFromPoint(Wn.clientX,Wn.clientY);return xt.cursorBackdrop.style.zIndex="",ft={event:Wn,element:ra},ra}else{let ra=xt.cursorBackdrop.style.transform;if(Lt&&ra===Lt.transform)return Lt.element;let ri=xt.cursorBackdrop.getBoundingClientRect();xt.cursorBackdrop.style.zIndex="-1000";let ni=Yn.elementFromPoint(ri.left+ri.width/2,ri.top+ri.height/2);return xt.cursorBackdrop.style.zIndex="",Lt={transform:ra,element:ni},ni}}xt.findElementBehindBackdrop=st;let ft=null,Lt=null;function Xt(Wn){let Yn=Wn.clientX,ra=Wn.clientY,ri=st(Wn);for(;ri;ri=ri.parentElement){if(!ri.hasAttribute("data-lm-dragscroll"))continue;let ni=0,qi=0;ri===document.body&&(ni=window.pageXOffset,qi=window.pageYOffset);let Ta=ri.getBoundingClientRect(),Hn=Ta.top+qi,ki=Ta.left+ni,ji=ki+Ta.width,ls=Hn+Ta.height;if(Yn=ji||ra=ls)continue;let Ys=Yn-ki+1,mi=ra-Hn+1,Qi=ji-Yn,iu=ls-ra,Us=Math.min(Ys,mi,Qi,iu);if(Us>xt.SCROLL_EDGE_SIZE)continue;let vs;switch(Us){case iu:vs="bottom";break;case mi:vs="top";break;case Qi:vs="right";break;case Ys:vs="left";break;default:throw"unreachable"}let dl=ri.scrollWidth-ri.clientWidth,ec=ri.scrollHeight-ri.clientHeight,Ec;switch(vs){case"top":Ec=ec>0&&ri.scrollTop>0;break;case"left":Ec=dl>0&&ri.scrollLeft>0;break;case"right":Ec=dl>0&&ri.scrollLeft0&&ri.scrollTop{ra===yn&&xt.cursorBackdrop.isConnected&&(document.removeEventListener("pointermove",Nr,!0),xt.cursorBackdrop.removeEventListener("scroll",Qr,!0),ri.removeChild(xt.cursorBackdrop))})}xt.overrideCursor=Yr;function Nr(Wn){xt.cursorBackdrop&&(xt.cursorBackdrop.style.transform=`translate(${Wn.clientX}px, ${Wn.clientY}px)`)}function Qr(Wn){if(!xt.cursorBackdrop)return;let Yn=st();if(!Yn)return;let ra=Yn.closest("[data-lm-dragscroll]");ra&&(ra.scrollTop+=xt.cursorBackdrop.scrollTop-In,ra.scrollLeft+=xt.cursorBackdrop.scrollLeft-In,En())}function En(){xt.cursorBackdrop.scrollTop=In,xt.cursorBackdrop.scrollLeft=In}let In=500;function Ee(){let Wn=document.createElement("div");return Wn.classList.add("lm-cursor-backdrop"),Wn}let yn=0;xt.cursorBackdrop=Ee()})(Uf||(Uf={}));var aA=sd(yv()),Af=sd(hg());function kp(){return ib.keyboardLayout}var L0=class xt{constructor(be,st,ft=[]){this.name=be,this._codes=st,this._keys=xt.extractKeys(st),this._modifierKeys=xt.convertToKeySet(ft)}keys(){return Object.keys(this._keys)}isValidKey(be){return be in this._keys}isModifierKey(be){return be in this._modifierKeys}keyForKeydownEvent(be){return this._codes[be.keyCode]||""}};(function(xt){function be(ft){let Lt=Object.create(null);for(let Xt in ft)Lt[ft[Xt]]=!0;return Lt}xt.extractKeys=be;function st(ft){let Lt=Object(null);for(let Xt=0,Hr=ft.length;Xt{this._commands.delete(be),this._commandChanged.emit({id:be,type:"removed"})})}notifyCommandChanged(be){if(be!==void 0&&!this._commands.has(be))throw new Error(`Command '${be}' is not registered.`);this._commandChanged.emit({id:be,type:be?"changed":"many-changed"})}describedBy(be,st=Af.JSONExt.emptyObject){var ft;let Lt=this._commands.get(be);return Promise.resolve((ft=Lt?.describedBy.call(void 0,st))!==null&&ft!==void 0?ft:{args:null})}label(be,st=Af.JSONExt.emptyObject){var ft;let Lt=this._commands.get(be);return(ft=Lt?.label.call(void 0,st))!==null&&ft!==void 0?ft:""}mnemonic(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.mnemonic.call(void 0,st):-1}icon(be,st=Af.JSONExt.emptyObject){var ft;return(ft=this._commands.get(be))===null||ft===void 0?void 0:ft.icon.call(void 0,st)}iconClass(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.iconClass.call(void 0,st):""}iconLabel(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.iconLabel.call(void 0,st):""}caption(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.caption.call(void 0,st):""}usage(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.usage.call(void 0,st):""}className(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.className.call(void 0,st):""}dataset(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.dataset.call(void 0,st):{}}isEnabled(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.isEnabled.call(void 0,st):!1}isToggled(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.isToggled.call(void 0,st):!1}isToggleable(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.isToggleable:!1}isVisible(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.isVisible.call(void 0,st):!1}execute(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);if(!ft)return Promise.reject(new Error(`Command '${be}' not registered.`));let Lt;try{Lt=ft.execute.call(void 0,st)}catch(Hr){Lt=Promise.reject(Hr)}let Xt=Promise.resolve(Lt);return this._commandExecuted.emit({id:be,args:st,result:Xt}),Xt}addKeyBinding(be){let st=Lh.createKeyBinding(be);return this._keyBindings.push(st),this._keyBindingChanged.emit({binding:st,type:"added"}),new qd(()=>{aA.ArrayExt.removeFirstOf(this._keyBindings,st),this._keyBindingChanged.emit({binding:st,type:"removed"})})}processKeydownEvent(be){if(be.defaultPrevented||this._replaying)return;let st=xt.keystrokeForKeydownEvent(be);if(!st){this._replayKeydownEvents(),this._clearPendingState();return}if(xt.isModifierKeyPressed(be)){let{exact:Hr}=Lh.matchKeyBinding(this._keyBindings,[st],be);Hr?(be.preventDefault(),be.stopPropagation(),this._startModifierTimer(Hr)):this._clearModifierTimer();return}this._keystrokes.push(st);let{exact:ft,partial:Lt}=Lh.matchKeyBinding(this._keyBindings,this._keystrokes,be),Xt=Lt.length!==0;if(!ft&&!Xt){this._replayKeydownEvents(),this._clearPendingState();return}if((ft?.preventDefault||Lt.some(Hr=>Hr.preventDefault))&&(be.preventDefault(),be.stopPropagation()),this._keydownEvents.push(be),ft&&!Xt){this._executeKeyBinding(ft),this._clearPendingState();return}ft&&(this._exactKeyMatch=ft),this._startTimer()}holdKeyBindingExecution(be,st){this._holdKeyBindingPromises.set(be,st)}processKeyupEvent(be){this._clearModifierTimer()}_startModifierTimer(be){this._clearModifierTimer(),this._timerModifierID=window.setTimeout(()=>{this._executeKeyBinding(be)},Lh.modifierkeyTimeOut)}_clearModifierTimer(){this._timerModifierID!==0&&(clearTimeout(this._timerModifierID),this._timerModifierID=0)}_startTimer(){this._clearTimer(),this._timerID=window.setTimeout(()=>{this._onPendingTimeout()},Lh.CHORD_TIMEOUT)}_clearTimer(){this._timerID!==0&&(clearTimeout(this._timerID),this._timerID=0)}_replayKeydownEvents(){this._keydownEvents.length!==0&&(this._replaying=!0,this._keydownEvents.forEach(Lh.replayKeyEvent),this._replaying=!1)}async _executeKeyBinding(be){if(this._holdKeyBindingPromises.size!==0){let Xt=[...this._keydownEvents],Hr=(await Promise.race([Promise.all(Xt.map(async Cr=>{var jr;return(jr=this._holdKeyBindingPromises.get(Cr))!==null&&jr!==void 0?jr:Promise.resolve(!0)})),new Promise(Cr=>{setTimeout(()=>Cr([!1]),Lh.KEYBINDING_HOLD_TIMEOUT)})])).every(Boolean);if(this._holdKeyBindingPromises.clear(),!Hr)return}let{command:st,args:ft}=be,Lt={_luminoEvent:{type:"keybinding",keys:be.keys},...ft};if(!this.hasCommand(st)||!this.isEnabled(st,Lt)){let Xt=this.hasCommand(st)?"enabled":"registered",Cr=`Cannot execute key binding '${be.keys.join(", ")}':`,jr=`command '${st}' is not ${Xt}.`;console.warn(`${Cr} ${jr}`);return}await this.execute(st,Lt)}_clearPendingState(){this._clearTimer(),this._clearModifierTimer(),this._exactKeyMatch=null,this._keystrokes.length=0,this._keydownEvents.length=0}_onPendingTimeout(){this._timerID=0,this._exactKeyMatch?this._executeKeyBinding(this._exactKeyMatch):this._replayKeydownEvents(),this._clearPendingState()}};(function(xt){function be(Cr){let jr="",Jr=!1,zr=!1,Gr=!1,tn=!1;for(let Yr of Cr.split(/\s+/))Yr==="Accel"?jf.IS_MAC?zr=!0:Gr=!0:Yr==="Alt"?Jr=!0:Yr==="Cmd"?zr=!0:Yr==="Ctrl"?Gr=!0:Yr==="Shift"?tn=!0:Yr.length>0&&(jr=Yr);return{cmd:zr,ctrl:Gr,alt:Jr,shift:tn,key:jr}}xt.parseKeystroke=be;function st(Cr){let jr="",Jr=be(Cr);return Jr.ctrl&&(jr+="Ctrl "),Jr.alt&&(jr+="Alt "),Jr.shift&&(jr+="Shift "),Jr.cmd&&jf.IS_MAC&&(jr+="Cmd "),Jr.key?jr+Jr.key:jr.trim()}xt.normalizeKeystroke=st;function ft(Cr){let jr;return jf.IS_WIN?jr=Cr.winKeys||Cr.keys:jf.IS_MAC?jr=Cr.macKeys||Cr.keys:jr=Cr.linuxKeys||Cr.keys,jr.map(st)}xt.normalizeKeys=ft;function Lt(Cr){return typeof Cr=="string"?jr(Cr):Cr.map(jr).join(", ");function jr(Jr){let zr=[],Gr=jf.IS_MAC?" ":"+",tn=be(Jr);return tn.ctrl&&zr.push("Ctrl"),tn.alt&&zr.push("Alt"),tn.shift&&zr.push("Shift"),jf.IS_MAC&&tn.cmd&&zr.push("Cmd"),zr.push(tn.key),zr.map(Lh.formatKey).join(Gr)}}xt.formatKeystroke=Lt;function Xt(Cr){let jr=kp(),Jr=jr.keyForKeydownEvent(Cr);return jr.isModifierKey(Jr)}xt.isModifierKeyPressed=Xt;function Hr(Cr){let jr=kp(),Jr=jr.keyForKeydownEvent(Cr),zr=[];return Cr.ctrlKey&&zr.push("Ctrl"),Cr.altKey&&zr.push("Alt"),Cr.shiftKey&&zr.push("Shift"),Cr.metaKey&&jf.IS_MAC&&zr.push("Cmd"),jr.isModifierKey(Jr)||zr.push(Jr),zr.join(" ")}xt.keystrokeForKeydownEvent=Hr})(cd||(cd={}));var Lh;(function(xt){xt.CHORD_TIMEOUT=1e3,xt.KEYBINDING_HOLD_TIMEOUT=1e3,xt.modifierkeyTimeOut=500;function be(yn){return{execute:yn.execute,describedBy:Nr(typeof yn.describedBy=="function"?yn.describedBy:{args:null,...yn.describedBy},()=>({args:null})),label:Nr(yn.label,jr),mnemonic:Nr(yn.mnemonic,Jr),icon:Nr(yn.icon,Yr),iconClass:Nr(yn.iconClass,jr),iconLabel:Nr(yn.iconLabel,jr),caption:Nr(yn.caption,jr),usage:Nr(yn.usage,jr),className:Nr(yn.className,jr),dataset:Nr(yn.dataset,tn),isEnabled:yn.isEnabled||zr,isToggled:yn.isToggled||Gr,isToggleable:yn.isToggleable||!!yn.isToggled,isVisible:yn.isVisible||zr}}xt.createCommand=be;function st(yn){var Wn;return{keys:cd.normalizeKeys(yn),selector:Qr(yn),command:yn.command,args:yn.args||Af.JSONExt.emptyObject,preventDefault:(Wn=yn.preventDefault)!==null&&Wn!==void 0?Wn:!0}}xt.createKeyBinding=st;function ft(yn,Wn,Yn){let ra=null,ri=[],ni=1/0,qi=0;for(let Ta=0,Hn=yn.length;Tani)continue;let Ys=Ch.calculateSpecificity(ki.selector);(!ra||ls=qi)&&(ra=ki,ni=ls,qi=Ys)}return{exact:ra,partial:ri}}xt.matchKeyBinding=ft;function Lt(yn){yn.target.dispatchEvent(Ee(yn))}xt.replayKeyEvent=Lt;function Xt(yn){return jf.IS_MAC?Hr.hasOwnProperty(yn)?Hr[yn]:yn:Cr.hasOwnProperty(yn)?Cr[yn]:yn}xt.formatKey=Xt;let Hr={Backspace:"\u232B",Tab:"\u21E5",Enter:"\u23CE",Shift:"\u21E7",Ctrl:"\u2303",Alt:"\u2325",Escape:"\u238B",PageUp:"\u21DE",PageDown:"\u21DF",End:"\u2198",Home:"\u2196",ArrowLeft:"\u2190",ArrowUp:"\u2191",ArrowRight:"\u2192",ArrowDown:"\u2193",Delete:"\u2326",Cmd:"\u2318"},Cr={Escape:"Esc",PageUp:"Page Up",PageDown:"Page Down",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},jr=()=>"",Jr=()=>-1,zr=()=>!0,Gr=()=>!1,tn=()=>({}),Yr=()=>{};function Nr(yn,Wn){return yn===void 0?Wn:typeof yn=="function"?yn:()=>yn}function Qr(yn){if(yn.selector.indexOf(",")!==-1)throw new Error(`Selector cannot contain commas: ${yn.selector}`);if(!Ch.isValid(yn.selector))throw new Error(`Invalid selector: ${yn.selector}`);return yn.selector}function En(yn,Wn){if(yn.lengthWn.length?2:1}function In(yn,Wn){let Yn=Wn.target,ra=Wn.currentTarget;for(let ri=0;Yn!==null;Yn=Yn.parentElement,++ri){if(Yn.hasAttribute("data-lm-suppress-shortcuts"))return-1;if(Ch.matches(Yn,yn))return ri;if(Yn===ra)return-1}return-1}function Ee(yn){let Wn=document.createEvent("Event"),Yn=yn.bubbles||!0,ra=yn.cancelable||!0;return Wn.initEvent(yn.type||"keydown",Yn,ra),Wn.key=yn.key||"",Wn.keyCode=yn.keyCode||0,Wn.which=yn.keyCode||0,Wn.ctrlKey=yn.ctrlKey||!1,Wn.altKey=yn.altKey||!1,Wn.shiftKey=yn.shiftKey||!1,Wn.metaKey=yn.metaKey||!1,Wn.view=yn.view||window,Wn}})(Lh||(Lh={}));var Cp=sd(yv()),Lp=class{constructor(be){this.type="text",this.content=be}},P0=class{constructor(be,st,ft,Lt){this.type="element",this.tag=be,this.attrs=st,this.children=ft,this.renderer=Lt}};function Sl(xt){let be={},st,ft=[];for(let Xt=1,Hr=arguments.length;Xt=In.length){st(Qr[Wn],Yr);continue}let Yn=In[Wn],ra=Qr[Wn];if(Yn===ra){Ee=Ee.nextSibling;continue}if(Yn.type==="text"&&ra.type==="text"){Ee.textContent!==ra.content&&(Ee.textContent=ra.content),Ee=Ee.nextSibling;continue}if(Yn.type==="text"||ra.type==="text"){Cp.ArrayExt.insert(In,Wn,ra),st(ra,Yr,Ee);continue}if(!Yn.renderer!=!ra.renderer){Cp.ArrayExt.insert(In,Wn,ra),st(ra,Yr,Ee);continue}let ri=ra.attrs.key;if(ri&&ri in En){let qi=En[ri];qi.vNode!==Yn&&(Cp.ArrayExt.move(In,In.indexOf(qi.vNode,Wn+1),Wn),Yr.insertBefore(qi.element,Ee),Yn=qi.vNode,Ee=qi.element)}if(Yn===ra){Ee=Ee.nextSibling;continue}let ni=Yn.attrs.key;if(ni&&ni!==ri){Cp.ArrayExt.insert(In,Wn,ra),st(ra,Yr,Ee);continue}if(Yn.tag!==ra.tag){Cp.ArrayExt.insert(In,Wn,ra),st(ra,Yr,Ee);continue}Cr(Ee,Yn.attrs,ra.attrs),ra.renderer?ra.renderer.render(Ee,{attrs:ra.attrs,children:ra.children}):ft(Ee,Yn.children,ra.children),Ee=Ee.nextSibling}Lt(Yr,In,yn,!0)}xt.updateContent=ft;function Lt(Yr,Nr,Qr,En){for(let In=Nr.length-1;In>=Qr;--In){let Ee=Nr[In],yn=En?Yr.lastChild:Yr.childNodes[In];Ee.type==="text"||(Ee.renderer&&Ee.renderer.unrender?Ee.renderer.unrender(yn,{attrs:Ee.attrs,children:Ee.children}):Lt(yn,Ee.children,0,!1)),En&&Yr.removeChild(yn)}}let Xt={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};function Hr(Yr,Nr){for(let Qr in Nr)Qr in Xt||(Qr.substr(0,2)==="on"?Yr[Qr]=Nr[Qr]:Yr.setAttribute(Qr,Nr[Qr]));Nr.className!==void 0&&Yr.setAttribute("class",Nr.className),Nr.htmlFor!==void 0&&Yr.setAttribute("for",Nr.htmlFor),Nr.dataset&&jr(Yr,Nr.dataset),Nr.style&&zr(Yr,Nr.style)}function Cr(Yr,Nr,Qr){if(Nr===Qr)return;let En;for(En in Nr)En in Xt||En in Qr||(En.substr(0,2)==="on"?Yr[En]=null:Yr.removeAttribute(En));for(En in Qr)En in Xt||Nr[En]===Qr[En]||(En.substr(0,2)==="on"?Yr[En]=Qr[En]:Yr.setAttribute(En,Qr[En]));Nr.className!==Qr.className&&(Qr.className!==void 0?Yr.setAttribute("class",Qr.className):Yr.removeAttribute("class")),Nr.htmlFor!==Qr.htmlFor&&(Qr.htmlFor!==void 0?Yr.setAttribute("for",Qr.htmlFor):Yr.removeAttribute("for")),Nr.dataset!==Qr.dataset&&Jr(Yr,Nr.dataset||{},Qr.dataset||{}),Nr.style!==Qr.style&&Gr(Yr,Nr.style||{},Qr.style||{})}function jr(Yr,Nr){for(let Qr in Nr)Yr.setAttribute(`data-${Qr}`,Nr[Qr])}function Jr(Yr,Nr,Qr){for(let En in Nr)En in Qr||Yr.removeAttribute(`data-${En}`);for(let En in Qr)Nr[En]!==Qr[En]&&Yr.setAttribute(`data-${En}`,Qr[En])}function zr(Yr,Nr){let Qr=Yr.style,En;for(En in Nr)Qr[En]=Nr[En]}function Gr(Yr,Nr,Qr){let En=Yr.style,In;for(In in Nr)In in Qr||(En[In]="");for(In in Qr)Nr[In]!==Qr[In]&&(En[In]=Qr[In])}function tn(Yr,Nr){let Qr=Yr.firstChild,En=Object.create(null);for(let In of Nr)In.type==="element"&&In.attrs.key&&(En[In.attrs.key]={vNode:In,element:Qr}),Qr=Qr.nextSibling;return En}})(bv||(bv={}));var Vh=class{constructor(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1}},sh;(function(xt){function be(Xt,Hr){let Cr=Xt.length;if(Cr===0)return Hr;let jr=0,Jr=0,zr=0,Gr=0,tn=0;for(let Qr=0;Qr0&&(Gr+=En.stretch,tn++)}if(Hr===zr)return 0;if(Hr<=jr){for(let Qr=0;Qr=Jr){for(let Qr=0;Qr0&&Qr>Yr;){let En=Qr,In=Gr;for(let Ee=0;Ee0&&Qr>Yr;){let En=Qr/Nr;for(let In=0;In0&&Qr>Yr;){let En=Qr,In=Gr;for(let Ee=0;Ee=yn.maxSize?(Qr-=yn.maxSize-yn.size,Gr-=yn.stretch,yn.size=yn.maxSize,yn.done=!0,Nr--,tn--):(Qr-=Wn,yn.size+=Wn)}}for(;Nr>0&&Qr>Yr;){let En=Qr/Nr;for(let In=0;In=Ee.maxSize?(Qr-=Ee.maxSize-Ee.size,Ee.size=Ee.maxSize,Ee.done=!0,Nr--):(Qr-=En,Ee.size+=En))}}}return 0}xt.calc=be;function st(Xt,Hr,Cr){Xt.length===0||Cr===0||(Cr>0?ft(Xt,Hr,Cr):Lt(Xt,Hr,-Cr))}xt.adjust=st;function ft(Xt,Hr,Cr){let jr=0;for(let tn=0;tn<=Hr;++tn){let Yr=Xt[tn];jr+=Yr.maxSize-Yr.size}let Jr=0;for(let tn=Hr+1,Yr=Xt.length;tn=0&&zr>0;--tn){let Yr=Xt[tn],Nr=Yr.maxSize-Yr.size;Nr>=zr?(Yr.sizeHint=Yr.size+zr,zr=0):(Yr.sizeHint=Yr.size+Nr,zr-=Nr)}let Gr=Cr;for(let tn=Hr+1,Yr=Xt.length;tn0;++tn){let Nr=Xt[tn],Qr=Nr.size-Nr.minSize;Qr>=Gr?(Nr.sizeHint=Nr.size-Gr,Gr=0):(Nr.sizeHint=Nr.size-Qr,Gr-=Qr)}}function Lt(Xt,Hr,Cr){let jr=0;for(let tn=Hr+1,Yr=Xt.length;tn0;++tn){let Nr=Xt[tn],Qr=Nr.maxSize-Nr.size;Qr>=zr?(Nr.sizeHint=Nr.size+zr,zr=0):(Nr.sizeHint=Nr.size+Qr,zr-=Qr)}let Gr=Cr;for(let tn=Hr;tn>=0&&Gr>0;--tn){let Yr=Xt[tn],Nr=Yr.size-Yr.minSize;Nr>=Gr?(Yr.sizeHint=Yr.size-Gr,Gr=0):(Yr.sizeHint=Yr.size-Nr,Gr-=Nr)}}})(sh||(sh={}));var D0=class{constructor(be){this._label="",this._caption="",this._mnemonic=-1,this._icon=void 0,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new Ml(this),this._isDisposed=!1,this.owner=be.owner,be.label!==void 0&&(this._label=be.label),be.mnemonic!==void 0&&(this._mnemonic=be.mnemonic),be.icon!==void 0&&(this._icon=be.icon),be.iconClass!==void 0&&(this._iconClass=be.iconClass),be.iconLabel!==void 0&&(this._iconLabel=be.iconLabel),be.caption!==void 0&&(this._caption=be.caption),be.className!==void 0&&(this._className=be.className),be.closable!==void 0&&(this._closable=be.closable),this._dataset=be.dataset||{}}get changed(){return this._changed}get label(){return this._label}set label(be){this._label!==be&&(this._label=be,this._changed.emit(void 0))}get mnemonic(){return this._mnemonic}set mnemonic(be){this._mnemonic!==be&&(this._mnemonic=be,this._changed.emit(void 0))}get icon(){return this._icon}set icon(be){this._icon!==be&&(this._icon=be,this._changed.emit(void 0))}get iconClass(){return this._iconClass}set iconClass(be){this._iconClass!==be&&(this._iconClass=be,this._changed.emit(void 0))}get iconLabel(){return this._iconLabel}set iconLabel(be){this._iconLabel!==be&&(this._iconLabel=be,this._changed.emit(void 0))}get caption(){return this._caption}set caption(be){this._caption!==be&&(this._caption=be,this._changed.emit(void 0))}get className(){return this._className}set className(be){this._className!==be&&(this._className=be,this._changed.emit(void 0))}get closable(){return this._closable}set closable(be){this._closable!==be&&(this._closable=be,this._changed.emit(void 0))}get dataset(){return this._dataset}set dataset(be){this._dataset!==be&&(this._dataset=be,this._changed.emit(void 0))}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,Ml.clearData(this))}},to=class xt{constructor(be={}){this._flags=0,this._layout=null,this._parent=null,this._disposed=new Ml(this),this._hiddenMode=xt.HiddenMode.Display,this.node=pg.createNode(be),this.addClass("lm-Widget")}dispose(){this.isDisposed||(this.setFlag(xt.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&&xt.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),this.title.dispose(),Ml.clearData(this),$i.clearData(this),$f.clearData(this))}get disposed(){return this._disposed}get isDisposed(){return this.testFlag(xt.Flag.IsDisposed)}get isAttached(){return this.testFlag(xt.Flag.IsAttached)}get isHidden(){return this.testFlag(xt.Flag.IsHidden)}get isVisible(){return this.testFlag(xt.Flag.IsVisible)}get title(){return pg.titleProperty.get(this)}get id(){return this.node.id}set id(be){this.node.id=be}get dataset(){return this.node.dataset}get hiddenMode(){return this._hiddenMode}set hiddenMode(be){this._hiddenMode!==be&&(this.isHidden&&this._toggleHidden(!1),be==xt.HiddenMode.Scale?this.node.style.willChange="transform":this.node.style.willChange="auto",this._hiddenMode=be,this.isHidden&&this._toggleHidden(!0))}get parent(){return this._parent}set parent(be){if(this._parent!==be){if(be&&this.contains(be))throw new Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){let st=new xt.ChildMessage("child-removed",this);$i.sendMessage(this._parent,st)}if(this._parent=be,this._parent&&!this._parent.isDisposed){let st=new xt.ChildMessage("child-added",this);$i.sendMessage(this._parent,st)}this.isDisposed||$i.sendMessage(this,xt.Msg.ParentChanged)}}get layout(){return this._layout}set layout(be){if(this._layout!==be){if(this.testFlag(xt.Flag.DisallowLayout))throw new Error("Cannot set widget layout.");if(this._layout)throw new Error("Cannot change widget layout.");if(be.parent)throw new Error("Cannot change layout parent.");this._layout=be,be.parent=this}}*children(){this._layout&&(yield*this._layout)}contains(be){for(let st=be;st;st=st._parent)if(st===this)return!0;return!1}hasClass(be){return this.node.classList.contains(be)}addClass(be){this.node.classList.add(be)}removeClass(be){this.node.classList.remove(be)}toggleClass(be,st){return st===!0?(this.node.classList.add(be),!0):st===!1?(this.node.classList.remove(be),!1):this.node.classList.toggle(be)}update(){$i.postMessage(this,xt.Msg.UpdateRequest)}fit(){$i.postMessage(this,xt.Msg.FitRequest)}activate(){$i.postMessage(this,xt.Msg.ActivateRequest)}close(){$i.sendMessage(this,xt.Msg.CloseRequest)}show(){if(this.testFlag(xt.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&$i.sendMessage(this,xt.Msg.BeforeShow),this.clearFlag(xt.Flag.IsHidden),this._toggleHidden(!1),this.isAttached&&(!this.parent||this.parent.isVisible)&&$i.sendMessage(this,xt.Msg.AfterShow),this.parent)){let be=new xt.ChildMessage("child-shown",this);$i.sendMessage(this.parent,be)}}hide(){if(!this.testFlag(xt.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&$i.sendMessage(this,xt.Msg.BeforeHide),this.setFlag(xt.Flag.IsHidden),this._toggleHidden(!0),this.isAttached&&(!this.parent||this.parent.isVisible)&&$i.sendMessage(this,xt.Msg.AfterHide),this.parent)){let be=new xt.ChildMessage("child-hidden",this);$i.sendMessage(this.parent,be)}}setHidden(be){be?this.hide():this.show()}testFlag(be){return(this._flags&be)!==0}setFlag(be){this._flags|=be}clearFlag(be){this._flags&=~be}processMessage(be){switch(be.type){case"resize":this.notifyLayout(be),this.onResize(be);break;case"update-request":this.notifyLayout(be),this.onUpdateRequest(be);break;case"fit-request":this.notifyLayout(be),this.onFitRequest(be);break;case"before-show":this.notifyLayout(be),this.onBeforeShow(be);break;case"after-show":this.setFlag(xt.Flag.IsVisible),this.notifyLayout(be),this.onAfterShow(be);break;case"before-hide":this.notifyLayout(be),this.onBeforeHide(be);break;case"after-hide":this.clearFlag(xt.Flag.IsVisible),this.notifyLayout(be),this.onAfterHide(be);break;case"before-attach":this.notifyLayout(be),this.onBeforeAttach(be);break;case"after-attach":!this.isHidden&&(!this.parent||this.parent.isVisible)&&this.setFlag(xt.Flag.IsVisible),this.setFlag(xt.Flag.IsAttached),this.notifyLayout(be),this.onAfterAttach(be);break;case"before-detach":this.notifyLayout(be),this.onBeforeDetach(be);break;case"after-detach":this.clearFlag(xt.Flag.IsVisible),this.clearFlag(xt.Flag.IsAttached),this.notifyLayout(be),this.onAfterDetach(be);break;case"activate-request":this.notifyLayout(be),this.onActivateRequest(be);break;case"close-request":this.notifyLayout(be),this.onCloseRequest(be);break;case"child-added":this.notifyLayout(be),this.onChildAdded(be);break;case"child-removed":this.notifyLayout(be),this.onChildRemoved(be);break;default:this.notifyLayout(be);break}}notifyLayout(be){this._layout&&this._layout.processParentMessage(be)}onCloseRequest(be){this.parent?this.parent=null:this.isAttached&&xt.detach(this)}onResize(be){}onUpdateRequest(be){}onFitRequest(be){}onActivateRequest(be){}onBeforeShow(be){}onAfterShow(be){}onBeforeHide(be){}onAfterHide(be){}onBeforeAttach(be){}onAfterAttach(be){}onBeforeDetach(be){}onAfterDetach(be){}onChildAdded(be){}onChildRemoved(be){}_toggleHidden(be){if(be)switch(this._hiddenMode){case xt.HiddenMode.Display:this.addClass("lm-mod-hidden");break;case xt.HiddenMode.Scale:this.node.style.transform="scale(0)",this.node.setAttribute("aria-hidden","true");break;case xt.HiddenMode.ContentVisibility:this.node.style.contentVisibility="hidden",this.node.style.zIndex="-1";break}else switch(this._hiddenMode){case xt.HiddenMode.Display:this.removeClass("lm-mod-hidden");break;case xt.HiddenMode.Scale:this.node.style.transform="",this.node.removeAttribute("aria-hidden");break;case xt.HiddenMode.ContentVisibility:this.node.style.contentVisibility="",this.node.style.zIndex="";break}}};(function(xt){(function(Xt){Xt[Xt.Display=0]="Display",Xt[Xt.Scale=1]="Scale",Xt[Xt.ContentVisibility=2]="ContentVisibility"})(xt.HiddenMode||(xt.HiddenMode={})),function(Xt){Xt[Xt.IsDisposed=1]="IsDisposed",Xt[Xt.IsAttached=2]="IsAttached",Xt[Xt.IsHidden=4]="IsHidden",Xt[Xt.IsVisible=8]="IsVisible",Xt[Xt.DisallowLayout=16]="DisallowLayout"}(xt.Flag||(xt.Flag={})),function(Xt){Xt.BeforeShow=new Xf("before-show"),Xt.AfterShow=new Xf("after-show"),Xt.BeforeHide=new Xf("before-hide"),Xt.AfterHide=new Xf("after-hide"),Xt.BeforeAttach=new Xf("before-attach"),Xt.AfterAttach=new Xf("after-attach"),Xt.BeforeDetach=new Xf("before-detach"),Xt.AfterDetach=new Xf("after-detach"),Xt.ParentChanged=new Xf("parent-changed"),Xt.UpdateRequest=new Ud("update-request"),Xt.FitRequest=new Ud("fit-request"),Xt.ActivateRequest=new Ud("activate-request"),Xt.CloseRequest=new Ud("close-request")}(xt.Msg||(xt.Msg={}));class be extends Xf{constructor(Hr,Cr){super(Hr),this.child=Cr}}xt.ChildMessage=be;class st extends Xf{constructor(Hr,Cr){super("resize"),this.width=Hr,this.height=Cr}}xt.ResizeMessage=st,function(Xt){Xt.UnknownSize=new Xt(-1,-1)}(st=xt.ResizeMessage||(xt.ResizeMessage={}));function ft(Xt,Hr,Cr=null){if(Xt.parent)throw new Error("Cannot attach a child widget.");if(Xt.isAttached||Xt.node.isConnected)throw new Error("Widget is already attached.");if(!Hr.isConnected)throw new Error("Host is not attached.");$i.sendMessage(Xt,xt.Msg.BeforeAttach),Hr.insertBefore(Xt.node,Cr),$i.sendMessage(Xt,xt.Msg.AfterAttach)}xt.attach=ft;function Lt(Xt){if(Xt.parent)throw new Error("Cannot detach a child widget.");if(!Xt.isAttached||!Xt.node.isConnected)throw new Error("Widget is not attached.");$i.sendMessage(Xt,xt.Msg.BeforeDetach),Xt.node.parentNode.removeChild(Xt.node),$i.sendMessage(Xt,xt.Msg.AfterDetach)}xt.detach=Lt})(to||(to={}));var pg;(function(xt){xt.titleProperty=new $f({name:"title",create:st=>new D0({owner:st})});function be(st){return st.node||document.createElement(st.tag||"div")}xt.createNode=be})(pg||(pg={}));var pd=class{constructor(be={}){this._disposed=!1,this._parent=null,this._fitPolicy=be.fitPolicy||"set-min-size"}dispose(){this._parent=null,this._disposed=!0,Ml.clearData(this),$f.clearData(this)}get isDisposed(){return this._disposed}get parent(){return this._parent}set parent(be){if(this._parent!==be){if(this._parent)throw new Error("Cannot change parent widget.");if(be.layout!==this)throw new Error("Invalid parent widget.");this._parent=be,this.init()}}get fitPolicy(){return this._fitPolicy}set fitPolicy(be){if(this._fitPolicy!==be&&(this._fitPolicy=be,this._parent)){let st=this._parent.node.style;st.minWidth="",st.minHeight="",st.maxWidth="",st.maxHeight="",this._parent.fit()}}processParentMessage(be){switch(be.type){case"resize":this.onResize(be);break;case"update-request":this.onUpdateRequest(be);break;case"fit-request":this.onFitRequest(be);break;case"before-show":this.onBeforeShow(be);break;case"after-show":this.onAfterShow(be);break;case"before-hide":this.onBeforeHide(be);break;case"after-hide":this.onAfterHide(be);break;case"before-attach":this.onBeforeAttach(be);break;case"after-attach":this.onAfterAttach(be);break;case"before-detach":this.onBeforeDetach(be);break;case"after-detach":this.onAfterDetach(be);break;case"child-removed":this.onChildRemoved(be);break;case"child-shown":this.onChildShown(be);break;case"child-hidden":this.onChildHidden(be);break}}init(){for(let be of this)be.parent=this.parent}onResize(be){for(let st of this)$i.sendMessage(st,to.ResizeMessage.UnknownSize)}onUpdateRequest(be){for(let st of this)$i.sendMessage(st,to.ResizeMessage.UnknownSize)}onBeforeAttach(be){for(let st of this)$i.sendMessage(st,be)}onAfterAttach(be){for(let st of this)$i.sendMessage(st,be)}onBeforeDetach(be){for(let st of this)$i.sendMessage(st,be)}onAfterDetach(be){for(let st of this)$i.sendMessage(st,be)}onBeforeShow(be){for(let st of this)st.isHidden||$i.sendMessage(st,be)}onAfterShow(be){for(let st of this)st.isHidden||$i.sendMessage(st,be)}onBeforeHide(be){for(let st of this)st.isHidden||$i.sendMessage(st,be)}onAfterHide(be){for(let st of this)st.isHidden||$i.sendMessage(st,be)}onChildRemoved(be){this.removeWidget(be.child)}onFitRequest(be){}onChildShown(be){}onChildHidden(be){}};(function(xt){function be(Xt){return Pp.horizontalAlignmentProperty.get(Xt)}xt.getHorizontalAlignment=be;function st(Xt,Hr){Pp.horizontalAlignmentProperty.set(Xt,Hr)}xt.setHorizontalAlignment=st;function ft(Xt){return Pp.verticalAlignmentProperty.get(Xt)}xt.getVerticalAlignment=ft;function Lt(Xt,Hr){Pp.verticalAlignmentProperty.set(Xt,Hr)}xt.setVerticalAlignment=Lt})(pd||(pd={}));var Tv=class{constructor(be){this._top=NaN,this._left=NaN,this._width=NaN,this._height=NaN,this._minWidth=0,this._minHeight=0,this._maxWidth=1/0,this._maxHeight=1/0,this._disposed=!1,this.widget=be,this.widget.node.style.position="absolute",this.widget.node.style.contain="strict"}dispose(){if(this._disposed)return;this._disposed=!0;let be=this.widget.node.style;be.position="",be.top="",be.left="",be.width="",be.height="",be.contain=""}get minWidth(){return this._minWidth}get minHeight(){return this._minHeight}get maxWidth(){return this._maxWidth}get maxHeight(){return this._maxHeight}get isDisposed(){return this._disposed}get isHidden(){return this.widget.isHidden}get isVisible(){return this.widget.isVisible}get isAttached(){return this.widget.isAttached}fit(){let be=Rl.sizeLimits(this.widget.node);this._minWidth=be.minWidth,this._minHeight=be.minHeight,this._maxWidth=be.maxWidth,this._maxHeight=be.maxHeight}update(be,st,ft,Lt){let Xt=Math.max(this._minWidth,Math.min(ft,this._maxWidth)),Hr=Math.max(this._minHeight,Math.min(Lt,this._maxHeight));if(Xt"center",changed:be}),xt.verticalAlignmentProperty=new $f({name:"verticalAlignment",create:()=>"top",changed:be});function be(st){st.parent&&st.parent.layout&&st.parent.update()}})(Pp||(Pp={}));var Dp=class extends pd{constructor(){super(...arguments),this._widgets=[]}dispose(){for(;this._widgets.length>0;)this._widgets.pop().dispose();super.dispose()}get widgets(){return this._widgets}*[Symbol.iterator](){yield*this._widgets}addWidget(be){this.insertWidget(this._widgets.length,be)}insertWidget(be,st){st.parent=this.parent;let ft=this._widgets.indexOf(st),Lt=Math.max(0,Math.min(be,this._widgets.length));if(ft===-1){Fi.ArrayExt.insert(this._widgets,Lt,st),this.parent&&this.attachWidget(Lt,st);return}Lt===this._widgets.length&&Lt--,ft!==Lt&&(Fi.ArrayExt.move(this._widgets,ft,Lt),this.parent&&this.moveWidget(ft,Lt,st))}removeWidget(be){this.removeWidgetAt(this._widgets.indexOf(be))}removeWidgetAt(be){let st=Fi.ArrayExt.removeAt(this._widgets,be);st&&this.parent&&this.detachWidget(be,st)}init(){super.init();let be=0;for(let st of this)this.attachWidget(be++,st)}attachWidget(be,st){let ft=this.parent.node.children[be];this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeAttach),this.parent.node.insertBefore(st.node,ft),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterAttach)}moveWidget(be,st,ft){this.parent.isAttached&&$i.sendMessage(ft,to.Msg.BeforeDetach),this.parent.node.removeChild(ft.node),this.parent.isAttached&&$i.sendMessage(ft,to.Msg.AfterDetach);let Lt=this.parent.node.children[st];this.parent.isAttached&&$i.sendMessage(ft,to.Msg.BeforeAttach),this.parent.node.insertBefore(ft.node,Lt),this.parent.isAttached&&$i.sendMessage(ft,to.Msg.AfterAttach)}detachWidget(be,st){this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeDetach),this.parent.node.removeChild(st.node),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterDetach)}},I0;(function(xt){function be(st){return Math.max(0,Math.floor(st))}xt.clampDimension=be})(I0||(I0={}));var R0=I0,md=class xt extends Dp{constructor(be){super(),this.widgetOffset=0,this._fixed=0,this._spacing=4,this._dirty=!1,this._hasNormedSizes=!1,this._sizers=[],this._items=[],this._handles=[],this._box=null,this._alignment="start",this._orientation="horizontal",this.renderer=be.renderer,be.orientation!==void 0&&(this._orientation=be.orientation),be.alignment!==void 0&&(this._alignment=be.alignment),be.spacing!==void 0&&(this._spacing=I0.clampDimension(be.spacing))}dispose(){for(let be of this._items)be.dispose();this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,super.dispose()}get orientation(){return this._orientation}set orientation(be){this._orientation!==be&&(this._orientation=be,this.parent&&(this.parent.dataset.orientation=be,this.parent.fit()))}get alignment(){return this._alignment}set alignment(be){this._alignment!==be&&(this._alignment=be,this.parent&&(this.parent.dataset.alignment=be,this.parent.update()))}get spacing(){return this._spacing}set spacing(be){be=I0.clampDimension(be),this._spacing!==be&&(this._spacing=be,this.parent&&this.parent.fit())}get handles(){return this._handles}absoluteSizes(){return this._sizers.map(be=>be.size)}relativeSizes(){return dd.normalize(this._sizers.map(be=>be.size))}setRelativeSizes(be,st=!0){let ft=this._sizers.length,Lt=be.slice(0,ft);for(;Lt.length0&&(Xt.sizeHint=Xt.size);sh.adjust(this._sizers,be,Lt),this.parent&&this.parent.update()}}init(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(be,st){let ft=new Tv(st),Lt=dd.createHandle(this.renderer),Xt=dd.averageSize(this._sizers),Hr=dd.createSizer(Xt);Fi.ArrayExt.insert(this._items,be,ft),Fi.ArrayExt.insert(this._sizers,be,Hr),Fi.ArrayExt.insert(this._handles,be,Lt),this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeAttach),this.parent.node.appendChild(st.node),this.parent.node.appendChild(Lt),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterAttach),this.parent.fit()}moveWidget(be,st,ft){Fi.ArrayExt.move(this._items,be,st),Fi.ArrayExt.move(this._sizers,be,st),Fi.ArrayExt.move(this._handles,be,st),this.parent.fit()}detachWidget(be,st){let ft=Fi.ArrayExt.removeAt(this._items,be),Lt=Fi.ArrayExt.removeAt(this._handles,be);Fi.ArrayExt.removeAt(this._sizers,be),this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeDetach),this.parent.node.removeChild(st.node),this.parent.node.removeChild(Lt),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterDetach),ft.dispose(),this.parent.fit()}onBeforeShow(be){super.onBeforeShow(be),this.parent.update()}onBeforeAttach(be){super.onBeforeAttach(be),this.parent.fit()}onChildShown(be){this.parent.fit()}onChildHidden(be){this.parent.fit()}onResize(be){this.parent.isVisible&&this._update(be.width,be.height)}onUpdateRequest(be){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(be){this.parent.isAttached&&this._fit()}updateItemPosition(be,st,ft,Lt,Xt,Hr,Cr){let jr=this._items[be];if(jr.isHidden)return;let Jr=this._handles[be].style;st?(ft+=this.widgetOffset,jr.update(ft,Lt,Cr,Xt),ft+=Cr,Jr.top=`${Lt}px`,Jr.left=`${ft}px`,Jr.width=`${this._spacing}px`,Jr.height=`${Xt}px`):(Lt+=this.widgetOffset,jr.update(ft,Lt,Hr,Cr),Lt+=Cr,Jr.top=`${Lt}px`,Jr.left=`${ft}px`,Jr.width=`${Hr}px`,Jr.height=`${this._spacing}px`)}_fit(){let be=0,st=-1;for(let jr=0,Jr=this._items.length;jr0&&(Gr.sizeHint=Gr.size),zr.isHidden){Gr.minSize=0,Gr.maxSize=0;continue}zr.fit(),Gr.stretch=xt.getStretch(zr.widget),ft?(Gr.minSize=zr.minWidth,Gr.maxSize=zr.maxWidth,Lt+=zr.minWidth,Xt=Math.max(Xt,zr.minHeight)):(Gr.minSize=zr.minHeight,Gr.maxSize=zr.maxHeight,Xt+=zr.minHeight,Lt=Math.max(Lt,zr.minWidth))}let Hr=this._box=Rl.boxSizing(this.parent.node);Lt+=Hr.horizontalSum,Xt+=Hr.verticalSum;let Cr=this.parent.node.style;Cr.minWidth=`${Lt}px`,Cr.minHeight=`${Xt}px`,this._dirty=!0,this.parent.parent&&$i.sendMessage(this.parent.parent,to.Msg.FitRequest),this._dirty&&$i.sendMessage(this.parent,to.Msg.UpdateRequest)}_update(be,st){this._dirty=!1;let ft=0;for(let Gr=0,tn=this._items.length;Gr0){let Gr;if(zr?Gr=Math.max(0,Hr-this._fixed):Gr=Math.max(0,Cr-this._fixed),this._hasNormedSizes){for(let Yr of this._sizers)Yr.sizeHint*=Gr;this._hasNormedSizes=!1}let tn=sh.calc(this._sizers,Gr);if(tn>0)switch(this._alignment){case"start":break;case"center":jr=0,Jr=tn/2;break;case"end":jr=0,Jr=tn;break;case"justify":jr=tn/ft,Jr=0;break;default:throw"unreachable"}}for(let Gr=0,tn=this._items.length;Gr0,coerce:(Hr,Cr)=>Math.max(0,Math.floor(Cr)),changed:Xt});function be(Hr){let Cr=new Vh;return Cr.sizeHint=Math.floor(Hr),Cr}xt.createSizer=be;function st(Hr){let Cr=Hr.createHandle();return Cr.style.position="absolute",Cr.style.contain="style",Cr}xt.createHandle=st;function ft(Hr){return Hr.reduce((Cr,jr)=>Cr+jr.size,0)/Hr.length||0}xt.averageSize=ft;function Lt(Hr){let Cr=Hr.length;if(Cr===0)return[];let jr=Hr.reduce((Jr,zr)=>Jr+Math.abs(zr),0);return jr===0?Hr.map(Jr=>1/Cr):Hr.map(Jr=>Jr/jr)}xt.normalize=Lt;function Xt(Hr){Hr.parent&&Hr.parent.layout instanceof md&&Hr.parent.fit()}})(dd||(dd={}));var ob=class extends md{constructor(be){super({...be,orientation:be.orientation||"vertical"}),this._titles=[],this.titleSpace=be.titleSpace||22}get titleSpace(){return this.widgetOffset}set titleSpace(be){be=R0.clampDimension(be),this.widgetOffset!==be&&(this.widgetOffset=be,this.parent&&this.parent.fit())}get titles(){return this._titles}dispose(){this.isDisposed||(this._titles.length=0,super.dispose())}updateTitle(be,st){let ft=this._titles[be],Lt=ft.classList.contains("lm-mod-expanded"),Xt=mg.createTitle(this.renderer,st.title,Lt);this._titles[be]=Xt,this.parent.node.replaceChild(Xt,ft)}insertWidget(be,st){st.id||(st.id=`id-${vd.UUID.uuid4()}`),super.insertWidget(be,st)}attachWidget(be,st){let ft=mg.createTitle(this.renderer,st.title);Fi.ArrayExt.insert(this._titles,be,ft),this.parent.node.appendChild(ft),st.node.setAttribute("role","region"),st.node.setAttribute("aria-labelledby",ft.id),super.attachWidget(be,st)}moveWidget(be,st,ft){Fi.ArrayExt.move(this._titles,be,st),super.moveWidget(be,st,ft)}detachWidget(be,st){let ft=Fi.ArrayExt.removeAt(this._titles,be);this.parent.node.removeChild(ft),super.detachWidget(be,st)}updateItemPosition(be,st,ft,Lt,Xt,Hr,Cr){let jr=this._titles[be].style;jr.top=`${Lt}px`,jr.left=`${ft}px`,jr.height=`${this.widgetOffset}px`,st?jr.width=`${Xt}px`:jr.width=`${Hr}px`,super.updateItemPosition(be,st,ft,Lt,Xt,Hr,Cr)}},mg;(function(xt){function be(st,ft,Lt=!0){let Xt=st.createSectionTitle(ft);return Xt.style.position="absolute",Xt.style.contain="strict",Xt.setAttribute("aria-label",`${ft.label} Section`),Xt.setAttribute("aria-expanded",Lt?"true":"false"),Xt.setAttribute("aria-controls",ft.owner.id),Lt&&Xt.classList.add("lm-mod-expanded"),Xt}xt.createTitle=be})(mg||(mg={}));var gg=class extends to{constructor(be={}){super(),this.addClass("lm-Panel"),this.layout=sb.createLayout(be)}get widgets(){return this.layout.widgets}addWidget(be){this.layout.addWidget(be)}insertWidget(be,st){this.layout.insertWidget(be,st)}},sb;(function(xt){function be(st){return st.layout||new Dp}xt.createLayout=be})(sb||(sb={}));var Av=class extends gg{constructor(be={}){super({layout:lb.createLayout(be)}),this._handleMoved=new Ml(this),this._pressData=null,this.addClass("lm-SplitPanel")}dispose(){this._releaseMouse(),super.dispose()}get orientation(){return this.layout.orientation}set orientation(be){this.layout.orientation=be}get alignment(){return this.layout.alignment}set alignment(be){this.layout.alignment=be}get spacing(){return this.layout.spacing}set spacing(be){this.layout.spacing=be}get renderer(){return this.layout.renderer}get handleMoved(){return this._handleMoved}get handles(){return this.layout.handles}relativeSizes(){return this.layout.relativeSizes()}setRelativeSizes(be,st=!0){this.layout.setRelativeSizes(be,st)}handleEvent(be){switch(be.type){case"pointerdown":this._evtPointerDown(be);break;case"pointermove":this._evtPointerMove(be);break;case"pointerup":this._evtPointerUp(be);break;case"keydown":this._evtKeyDown(be);break;case"contextmenu":be.preventDefault(),be.stopPropagation();break}}onBeforeAttach(be){this.node.addEventListener("pointerdown",this)}onAfterDetach(be){this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(be){be.child.addClass("lm-SplitPanel-child"),this._releaseMouse()}onChildRemoved(be){be.child.removeClass("lm-SplitPanel-child"),this._releaseMouse()}_evtKeyDown(be){this._pressData&&(be.preventDefault(),be.stopPropagation()),be.keyCode===27&&this._releaseMouse()}_evtPointerDown(be){if(be.button!==0)return;let st=this.layout,ft=Fi.ArrayExt.findFirstIndex(st.handles,Jr=>Jr.contains(be.target));if(ft===-1)return;be.preventDefault(),be.stopPropagation(),document.addEventListener("pointerup",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0);let Lt,Xt=st.handles[ft],Hr=Xt.getBoundingClientRect();st.orientation==="horizontal"?Lt=be.clientX-Hr.left:Lt=be.clientY-Hr.top;let Cr=window.getComputedStyle(Xt),jr=Zf.overrideCursor(Cr.cursor);this._pressData={index:ft,delta:Lt,override:jr}}_evtPointerMove(be){be.preventDefault(),be.stopPropagation();let st,ft=this.layout,Lt=this.node.getBoundingClientRect();ft.orientation==="horizontal"?st=be.clientX-Lt.left-this._pressData.delta:st=be.clientY-Lt.top-this._pressData.delta,ft.moveHandle(this._pressData.index,st)}_evtPointerUp(be){be.button===0&&(be.preventDefault(),be.stopPropagation(),this._releaseMouse())}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._handleMoved.emit(),document.removeEventListener("keydown",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("contextmenu",this,!0))}};(function(xt){class be{createHandle(){let Xt=document.createElement("div");return Xt.className="lm-SplitPanel-handle",Xt}}xt.Renderer=be,xt.defaultRenderer=new be;function st(Lt){return md.getStretch(Lt)}xt.getStretch=st;function ft(Lt,Xt){md.setStretch(Lt,Xt)}xt.setStretch=ft})(Av||(Av={}));var lb;(function(xt){function be(st){return st.layout||new md({renderer:st.renderer||Av.defaultRenderer,orientation:st.orientation,alignment:st.alignment,spacing:st.spacing})}xt.createLayout=be})(lb||(lb={}));var F0=class extends Av{constructor(be={}){super({...be,layout:ub.createLayout(be)}),this._widgetSizesCache=new WeakMap,this._expansionToggled=new Ml(this),this.addClass("lm-AccordionPanel")}get renderer(){return this.layout.renderer}get titleSpace(){return this.layout.titleSpace}set titleSpace(be){this.layout.titleSpace=be}get titles(){return this.layout.titles}get expansionToggled(){return this._expansionToggled}addWidget(be){super.addWidget(be),be.title.changed.connect(this._onTitleChanged,this)}collapse(be){let st=this.layout.widgets[be];st&&!st.isHidden&&this._toggleExpansion(be)}expand(be){let st=this.layout.widgets[be];st&&st.isHidden&&this._toggleExpansion(be)}insertWidget(be,st){super.insertWidget(be,st),st.title.changed.connect(this._onTitleChanged,this)}handleEvent(be){switch(super.handleEvent(be),be.type){case"click":this._evtClick(be);break;case"keydown":this._eventKeyDown(be);break}}onBeforeAttach(be){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),super.onBeforeAttach(be)}onAfterDetach(be){super.onAfterDetach(be),this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this)}_onTitleChanged(be){let st=Fi.ArrayExt.findFirstIndex(this.widgets,ft=>ft.contains(be.owner));st>=0&&(this.layout.updateTitle(st,be.owner),this.update())}_computeWidgetSize(be){let st=this.layout,ft=st.widgets[be];if(!ft)return;let Lt=ft.isHidden,Xt=st.absoluteSizes(),Hr=(Lt?-1:1)*this.spacing,Cr=Xt.reduce((Jr,zr)=>Jr+zr),jr=[...Xt];if(Lt){let Jr=this._widgetSizesCache.get(ft);if(!Jr)return;jr[be]+=Jr;let zr=jr.map(Gr=>Gr-Jr>0).lastIndexOf(!0);zr===-1?jr.forEach((Gr,tn)=>{tn!==be&&(jr[tn]-=Xt[tn]/Cr*(Jr-Hr))}):jr[zr]-=Jr-Hr}else{let Jr=Xt[be];this._widgetSizesCache.set(ft,Jr),jr[be]=0;let zr=jr.map(Gr=>Gr>0).lastIndexOf(!0);if(zr===-1)return;jr[zr]=Xt[zr]+Jr+Hr}return jr.map(Jr=>Jr/(Cr+Hr))}_evtClick(be){let st=be.target;if(st){let ft=Fi.ArrayExt.findFirstIndex(this.titles,Lt=>Lt.contains(st));ft>=0&&(be.preventDefault(),be.stopPropagation(),this._toggleExpansion(ft))}}_eventKeyDown(be){if(be.defaultPrevented)return;let st=be.target,ft=!1;if(st){let Lt=Fi.ArrayExt.findFirstIndex(this.titles,Xt=>Xt.contains(st));if(Lt>=0){let Xt=be.keyCode.toString();if(be.key.match(/Space|Enter/)||Xt.match(/13|32/))st.click(),ft=!0;else if(this.orientation==="horizontal"?be.key.match(/ArrowLeft|ArrowRight/)||Xt.match(/37|39/):be.key.match(/ArrowUp|ArrowDown/)||Xt.match(/38|40/)){let Hr=be.key.match(/ArrowLeft|ArrowUp/)||Xt.match(/37|38/)?-1:1,Cr=this.titles.length,jr=(Lt+Cr+Hr)%Cr;this.titles[jr].focus(),ft=!0}else be.key==="End"||Xt==="35"?(this.titles[this.titles.length-1].focus(),ft=!0):(be.key==="Home"||Xt==="36")&&(this.titles[0].focus(),ft=!0)}ft&&be.preventDefault()}}_toggleExpansion(be){let st=this.titles[be],ft=this.layout.widgets[be],Lt=this._computeWidgetSize(be);Lt&&this.setRelativeSizes(Lt,!1),ft.isHidden?(st.classList.add("lm-mod-expanded"),st.setAttribute("aria-expanded","true"),ft.show()):(st.classList.remove("lm-mod-expanded"),st.setAttribute("aria-expanded","false"),ft.hide()),this._expansionToggled.emit(be)}};(function(xt){class be extends Av.Renderer{constructor(){super(),this.titleClassName="lm-AccordionPanel-title",this._titleID=0,this._titleKeys=new WeakMap,this._uuid=++be._nInstance}createCollapseIcon(ft){return document.createElement("span")}createSectionTitle(ft){let Lt=document.createElement("h3");Lt.setAttribute("tabindex","0"),Lt.id=this.createTitleKey(ft),Lt.className=this.titleClassName;for(let Cr in ft.dataset)Lt.dataset[Cr]=ft.dataset[Cr];let Xt=Lt.appendChild(this.createCollapseIcon(ft));Xt.className="lm-AccordionPanel-titleCollapser";let Hr=Lt.appendChild(document.createElement("span"));return Hr.className="lm-AccordionPanel-titleLabel",Hr.textContent=ft.label,Hr.title=ft.caption||ft.label,Lt}createTitleKey(ft){let Lt=this._titleKeys.get(ft);return Lt===void 0&&(Lt=`title-key-${this._uuid}-${this._titleID++}`,this._titleKeys.set(ft,Lt)),Lt}}be._nInstance=0,xt.Renderer=be,xt.defaultRenderer=new be})(F0||(F0={}));var ub;(function(xt){function be(st){return st.layout||new ob({renderer:st.renderer||F0.defaultRenderer,orientation:st.orientation,alignment:st.alignment,spacing:st.spacing,titleSpace:st.titleSpace})}xt.createLayout=be})(ub||(ub={}));var qh=class xt extends Dp{constructor(be={}){super(),this._fixed=0,this._spacing=4,this._dirty=!1,this._sizers=[],this._items=[],this._box=null,this._alignment="start",this._direction="top-to-bottom",be.direction!==void 0&&(this._direction=be.direction),be.alignment!==void 0&&(this._alignment=be.alignment),be.spacing!==void 0&&(this._spacing=R0.clampDimension(be.spacing))}dispose(){for(let be of this._items)be.dispose();this._box=null,this._items.length=0,this._sizers.length=0,super.dispose()}get direction(){return this._direction}set direction(be){this._direction!==be&&(this._direction=be,this.parent&&(this.parent.dataset.direction=be,this.parent.fit()))}get alignment(){return this._alignment}set alignment(be){this._alignment!==be&&(this._alignment=be,this.parent&&(this.parent.dataset.alignment=be,this.parent.update()))}get spacing(){return this._spacing}set spacing(be){be=R0.clampDimension(be),this._spacing!==be&&(this._spacing=be,this.parent&&this.parent.fit())}init(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(be,st){Fi.ArrayExt.insert(this._items,be,new Tv(st)),Fi.ArrayExt.insert(this._sizers,be,new Vh),this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeAttach),this.parent.node.appendChild(st.node),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterAttach),this.parent.fit()}moveWidget(be,st,ft){Fi.ArrayExt.move(this._items,be,st),Fi.ArrayExt.move(this._sizers,be,st),this.parent.update()}detachWidget(be,st){let ft=Fi.ArrayExt.removeAt(this._items,be);Fi.ArrayExt.removeAt(this._sizers,be),this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeDetach),this.parent.node.removeChild(st.node),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterDetach),ft.dispose(),this.parent.fit()}onBeforeShow(be){super.onBeforeShow(be),this.parent.update()}onBeforeAttach(be){super.onBeforeAttach(be),this.parent.fit()}onChildShown(be){this.parent.fit()}onChildHidden(be){this.parent.fit()}onResize(be){this.parent.isVisible&&this._update(be.width,be.height)}onUpdateRequest(be){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(be){this.parent.isAttached&&this._fit()}_fit(){let be=0;for(let Cr=0,jr=this._items.length;Cr0)switch(this._alignment){case"start":break;case"center":Jr=0,zr=jr/2;break;case"end":Jr=0,zr=jr;break;case"justify":Jr=jr/ft,zr=0;break;default:throw"unreachable"}for(let Gr=0,tn=this._items.length;Gr0,coerce:(Lt,Xt)=>Math.max(0,Math.floor(Xt)),changed:ft}),xt.sizeBasisProperty=new $f({name:"sizeBasis",create:()=>0,coerce:(Lt,Xt)=>Math.max(0,Math.floor(Xt)),changed:ft});function be(Lt){return Lt==="left-to-right"||Lt==="right-to-left"}xt.isHorizontal=be;function st(Lt){return Math.max(0,Math.floor(Lt))}xt.clampSpacing=st;function ft(Lt){Lt.parent&&Lt.parent.layout instanceof qh&&Lt.parent.fit()}})(xv||(xv={}));var yg=class extends gg{constructor(be={}){super({layout:cb.createLayout(be)}),this.addClass("lm-BoxPanel")}get direction(){return this.layout.direction}set direction(be){this.layout.direction=be}get alignment(){return this.layout.alignment}set alignment(be){this.layout.alignment=be}get spacing(){return this.layout.spacing}set spacing(be){this.layout.spacing=be}onChildAdded(be){be.child.addClass("lm-BoxPanel-child")}onChildRemoved(be){be.child.removeClass("lm-BoxPanel-child")}};(function(xt){function be(Xt){return qh.getStretch(Xt)}xt.getStretch=be;function st(Xt,Hr){qh.setStretch(Xt,Hr)}xt.setStretch=st;function ft(Xt){return qh.getSizeBasis(Xt)}xt.getSizeBasis=ft;function Lt(Xt,Hr){qh.setSizeBasis(Xt,Hr)}xt.setSizeBasis=Lt})(yg||(yg={}));var cb;(function(xt){function be(st){return st.layout||new qh(st)}xt.createLayout=be})(cb||(cb={}));var _g=class xt extends to{constructor(be){super({node:hd.createNode()}),this._activeIndex=-1,this._items=[],this._results=null,this.addClass("lm-CommandPalette"),this.setFlag(to.Flag.DisallowLayout),this.commands=be.commands,this.renderer=be.renderer||xt.defaultRenderer,this.commands.commandChanged.connect(this._onGenericChange,this),this.commands.keyBindingChanged.connect(this._onGenericChange,this)}dispose(){this._items.length=0,this._results=null,super.dispose()}get searchNode(){return this.node.getElementsByClassName("lm-CommandPalette-search")[0]}get inputNode(){return this.node.getElementsByClassName("lm-CommandPalette-input")[0]}get contentNode(){return this.node.getElementsByClassName("lm-CommandPalette-content")[0]}get items(){return this._items}addItem(be){let st=hd.createItem(this.commands,be);return this._items.push(st),this.refresh(),st}addItems(be){let st=be.map(ft=>hd.createItem(this.commands,ft));return st.forEach(ft=>this._items.push(ft)),this.refresh(),st}removeItem(be){this.removeItemAt(this._items.indexOf(be))}removeItemAt(be){Fi.ArrayExt.removeAt(this._items,be)&&this.refresh()}clearItems(){this._items.length!==0&&(this._items.length=0,this.refresh())}refresh(){if(this._results=null,this.inputNode.value!==""){let be=this.node.getElementsByClassName("lm-close-icon")[0];be.style.display="inherit"}else{let be=this.node.getElementsByClassName("lm-close-icon")[0];be.style.display="none"}this.update()}handleEvent(be){switch(be.type){case"click":this._evtClick(be);break;case"keydown":this._evtKeyDown(be);break;case"input":this.refresh();break;case"focus":case"blur":this._toggleFocused();break}}onBeforeAttach(be){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),this.node.addEventListener("input",this),this.node.addEventListener("focus",this,!0),this.node.addEventListener("blur",this,!0)}onAfterDetach(be){this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this),this.node.removeEventListener("input",this),this.node.removeEventListener("focus",this,!0),this.node.removeEventListener("blur",this,!0)}onAfterShow(be){this.update(),super.onAfterShow(be)}onActivateRequest(be){if(this.isAttached){let st=this.inputNode;st.focus(),st.select()}}onUpdateRequest(be){if(this.isHidden)return;let st=this.inputNode.value,ft=this.contentNode,Lt=this._results;if(Lt||(Lt=this._results=hd.search(this._items,st),this._activeIndex=st?Fi.ArrayExt.findFirstIndex(Lt,hd.canActivate):-1),!st&&Lt.length===0){fd.render(null,ft);return}if(st&&Lt.length===0){let jr=this.renderer.renderEmptyMessage({query:st});fd.render(jr,ft);return}let Xt=this.renderer,Hr=this._activeIndex,Cr=new Array(Lt.length);for(let jr=0,Jr=Lt.length;jr=Lt.length)ft.scrollTop=0;else{let jr=ft.children[Hr];Rl.scrollIntoViewIfNeeded(ft,jr)}}_evtClick(be){if(be.button!==0)return;if(be.target.classList.contains("lm-close-icon")){this.inputNode.value="",this.refresh();return}let st=Fi.ArrayExt.findFirstIndex(this.contentNode.children,ft=>ft.contains(be.target));st!==-1&&(be.preventDefault(),be.stopPropagation(),this._execute(st))}_evtKeyDown(be){if(!(be.altKey||be.ctrlKey||be.metaKey||be.shiftKey))switch(be.keyCode){case 13:be.preventDefault(),be.stopPropagation(),this._execute(this._activeIndex);break;case 38:be.preventDefault(),be.stopPropagation(),this._activatePreviousItem();break;case 40:be.preventDefault(),be.stopPropagation(),this._activateNextItem();break}}_activateNextItem(){if(!this._results||this._results.length===0)return;let be=this._activeIndex,st=this._results.length,ft=beni-qi),ra=Ee.slice(0,Yn),ri=Ee.slice(Yn);for(let ni=0,qi=ri.length;niQr.command===Yr&&vd.JSONExt.deepEqual(Qr.args,Nr))||null}}})(hd||(hd={}));var wv=class xt extends to{constructor(be){super({node:Kf.createNode()}),this._childIndex=-1,this._activeIndex=-1,this._openTimerID=0,this._closeTimerID=0,this._items=[],this._childMenu=null,this._parentMenu=null,this._aboutToClose=new Ml(this),this._menuRequested=new Ml(this),this.addClass("lm-Menu"),this.setFlag(to.Flag.DisallowLayout),this.commands=be.commands,this.renderer=be.renderer||xt.defaultRenderer}dispose(){this.close(),this._items.length=0,super.dispose()}get aboutToClose(){return this._aboutToClose}get menuRequested(){return this._menuRequested}get parentMenu(){return this._parentMenu}get childMenu(){return this._childMenu}get rootMenu(){let be=this;for(;be._parentMenu;)be=be._parentMenu;return be}get leafMenu(){let be=this;for(;be._childMenu;)be=be._childMenu;return be}get contentNode(){return this.node.getElementsByClassName("lm-Menu-content")[0]}get activeItem(){return this._items[this._activeIndex]||null}set activeItem(be){this.activeIndex=be?this._items.indexOf(be):-1}get activeIndex(){return this._activeIndex}set activeIndex(be){(be<0||be>=this._items.length)&&(be=-1),be!==-1&&!Kf.canActivate(this._items[be])&&(be=-1),this._activeIndex!==be&&(this._activeIndex=be,this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())}get items(){return this._items}activateNextItem(){let be=this._items.length,st=this._activeIndex,ft=st{this.activeIndex=Cr}})}fd.render(Hr,this.contentNode)}onCloseRequest(be){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;let st=this._childMenu;st&&(this._childIndex=-1,this._childMenu=null,st._parentMenu=null,st.close());let ft=this._parentMenu;ft&&(this._parentMenu=null,ft._childIndex=-1,ft._childMenu=null,ft.activate()),this.isAttached&&this._aboutToClose.emit(void 0),super.onCloseRequest(be)}_evtKeyDown(be){be.preventDefault(),be.stopPropagation();let st=be.keyCode;if(st===13){this.triggerActiveItem();return}if(st===27){this.close();return}if(st===37){this._parentMenu?this.close():this._menuRequested.emit("previous");return}if(st===38){this.activatePreviousItem();return}if(st===39){let Hr=this.activeItem;Hr&&Hr.type==="submenu"?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next");return}if(st===40){this.activateNextItem();return}let ft=kp().keyForKeydownEvent(be);if(!ft)return;let Lt=this._activeIndex+1,Xt=Kf.findMnemonic(this._items,ft,Lt);Xt.index!==-1&&!Xt.multiple?(this.activeIndex=Xt.index,this.triggerActiveItem()):Xt.index!==-1?this.activeIndex=Xt.index:Xt.auto!==-1&&(this.activeIndex=Xt.auto)}_evtMouseUp(be){be.button===0&&(be.preventDefault(),be.stopPropagation(),this.triggerActiveItem())}_evtMouseMove(be){let st=Fi.ArrayExt.findFirstIndex(this.contentNode.children,Lt=>Rl.hitTest(Lt,be.clientX,be.clientY));if(st===this._activeIndex)return;if(this.activeIndex=st,st=this.activeIndex,st===this._childIndex){this._cancelOpenTimer(),this._cancelCloseTimer();return}this._childIndex!==-1&&this._startCloseTimer(),this._cancelOpenTimer();let ft=this.activeItem;!ft||ft.type!=="submenu"||!ft.submenu||this._startOpenTimer()}_evtMouseEnter(be){for(let st=this._parentMenu;st;st=st._parentMenu)st._cancelOpenTimer(),st._cancelCloseTimer(),st.activeIndex=st._childIndex}_evtMouseLeave(be){if(this._cancelOpenTimer(),!this._childMenu){this.activeIndex=-1;return}let{clientX:st,clientY:ft}=be;if(Rl.hitTest(this._childMenu.node,st,ft)){this._cancelCloseTimer();return}this.activeIndex=-1,this._startCloseTimer()}_evtMouseDown(be){this._parentMenu||(Kf.hitTestMenus(this,be.clientX,be.clientY)?(be.preventDefault(),be.stopPropagation()):this.close())}_openChildMenu(be=!1){let st=this.activeItem;if(!st||st.type!=="submenu"||!st.submenu){this._closeChildMenu();return}let ft=st.submenu;if(ft===this._childMenu)return;xt.saveWindowData(),this._closeChildMenu(),this._childMenu=ft,this._childIndex=this._activeIndex,ft._parentMenu=this,$i.sendMessage(this,to.Msg.UpdateRequest);let Lt=this.contentNode.children[this._activeIndex];Kf.openSubmenu(ft,Lt),be&&(ft.activeIndex=-1,ft.activateNextItem()),ft.activate()}_closeChildMenu(){this._childMenu&&this._childMenu.close()}_startOpenTimer(){this._openTimerID===0&&(this._openTimerID=window.setTimeout(()=>{this._openTimerID=0,this._openChildMenu()},Kf.TIMER_DELAY))}_startCloseTimer(){this._closeTimerID===0&&(this._closeTimerID=window.setTimeout(()=>{this._closeTimerID=0,this._closeChildMenu()},Kf.TIMER_DELAY))}_cancelOpenTimer(){this._openTimerID!==0&&(clearTimeout(this._openTimerID),this._openTimerID=0)}_cancelCloseTimer(){this._closeTimerID!==0&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)}static saveWindowData(){Kf.saveWindowData()}};(function(xt){class be{renderItem(ft){let Lt=this.createItemClass(ft),Xt=this.createItemDataset(ft),Hr=this.createItemARIA(ft);return Sl.li({className:Lt,dataset:Xt,tabindex:"0",onfocus:ft.onfocus,...Hr},this.renderIcon(ft),this.renderLabel(ft),this.renderShortcut(ft),this.renderSubmenu(ft))}renderIcon(ft){let Lt=this.createIconClass(ft);return Sl.div({className:Lt},ft.item.icon,ft.item.iconLabel)}renderLabel(ft){let Lt=this.formatLabel(ft);return Sl.div({className:"lm-Menu-itemLabel"},Lt)}renderShortcut(ft){let Lt=this.formatShortcut(ft);return Sl.div({className:"lm-Menu-itemShortcut"},Lt)}renderSubmenu(ft){return Sl.div({className:"lm-Menu-itemSubmenuIcon"})}createItemClass(ft){let Lt="lm-Menu-item";ft.item.isEnabled||(Lt+=" lm-mod-disabled"),ft.item.isToggled&&(Lt+=" lm-mod-toggled"),ft.item.isVisible||(Lt+=" lm-mod-hidden"),ft.active&&(Lt+=" lm-mod-active"),ft.collapsed&&(Lt+=" lm-mod-collapsed");let Xt=ft.item.className;return Xt&&(Lt+=` ${Xt}`),Lt}createItemDataset(ft){let Lt,{type:Xt,command:Hr,dataset:Cr}=ft.item;return Xt==="command"?Lt={...Cr,type:Xt,command:Hr}:Lt={...Cr,type:Xt},Lt}createIconClass(ft){let Lt="lm-Menu-itemIcon",Xt=ft.item.iconClass;return Xt?`${Lt} ${Xt}`:Lt}createItemARIA(ft){let Lt={};switch(ft.item.type){case"separator":Lt.role="presentation";break;case"submenu":Lt["aria-haspopup"]="true",ft.item.isEnabled||(Lt["aria-disabled"]="true");break;default:ft.item.isEnabled||(Lt["aria-disabled"]="true"),Lt.role="menuitem"}return Lt}formatLabel(ft){let{label:Lt,mnemonic:Xt}=ft.item;if(Xt<0||Xt>=Lt.length)return Lt;let Hr=Lt.slice(0,Xt),Cr=Lt.slice(Xt+1),jr=Lt[Xt],Jr=Sl.span({className:"lm-Menu-itemMnemonic"},jr);return[Hr,Jr,Cr]}formatShortcut(ft){let Lt=ft.item.keyBinding;return Lt?cd.formatKeystroke(Lt.keys):null}}xt.Renderer=be,xt.defaultRenderer=new be})(wv||(wv={}));var Kf;(function(xt){xt.TIMER_DELAY=300,xt.SUBMENU_OVERLAP=3;let be=null,st=0;function ft(){return st>0?(st--,be):zr()}function Lt(){be=zr(),st++}xt.saveWindowData=Lt;function Xt(){let Qr=document.createElement("div"),En=document.createElement("ul");return En.className="lm-Menu-content",Qr.appendChild(En),En.setAttribute("role","menu"),Qr.tabIndex=0,Qr}xt.createNode=Xt;function Hr(Qr){return Qr.type!=="separator"&&Qr.isEnabled&&Qr.isVisible}xt.canActivate=Hr;function Cr(Qr,En){return new Nr(Qr.commands,En)}xt.createItem=Cr;function jr(Qr,En,In){for(let Ee=Qr;Ee;Ee=Ee.childMenu)if(Rl.hitTest(Ee.node,En,In))return!0;return!1}xt.hitTestMenus=jr;function Jr(Qr){let En=new Array(Qr.length);Fi.ArrayExt.fill(En,!1);let In=0,Ee=Qr.length;for(;In=0;--yn){let Yn=Qr[yn];if(Yn.isVisible){if(Yn.type!=="separator")break;En[yn]=!0}}let Wn=!1;for(;++Inri+qi&&(En=ri+qi-ls),!yn&&In+Ys>ni+Ta&&(In>ni+Ta?In=ni+Ta-Ys:In=In-Ys),ji.transform=`translate(${Math.max(0,En)}px, ${Math.max(0,In)}px`,ji.opacity="1"}xt.openRootMenu=Gr;function tn(Qr,En){let In=ft(),Ee=In.pageXOffset,yn=In.pageYOffset,Wn=In.clientWidth,Yn=In.clientHeight;$i.sendMessage(Qr,to.Msg.UpdateRequest);let ra=Yn,ri=Qr.node,ni=ri.style;ni.opacity="0",ni.maxHeight=`${ra}px`,to.attach(Qr,document.body);let{width:qi,height:Ta}=ri.getBoundingClientRect(),Hn=Rl.boxSizing(Qr.node),ki=En.getBoundingClientRect(),ji=ki.right-xt.SUBMENU_OVERLAP;ji+qi>Ee+Wn&&(ji=ki.left+xt.SUBMENU_OVERLAP-qi);let ls=ki.top-Hn.borderTop-Hn.paddingTop;ls+Ta>yn+Yn&&(ls=ki.bottom+Hn.borderBottom+Hn.paddingBottom-Ta),ni.transform=`translate(${Math.max(0,ji)}px, ${Math.max(0,ls)}px`,ni.opacity="1"}xt.openSubmenu=tn;function Yr(Qr,En,In){let Ee=-1,yn=-1,Wn=!1,Yn=En.toUpperCase();for(let ra=0,ri=Qr.length;ra=0&&HnEe.command===En&&vd.JSONExt.deepEqual(Ee.args,In))||null}return null}}})(Kf||(Kf={}));var iA;(function(xt){function be(Hr,Cr){let jr=ft(Hr.selector),Jr=Hr.rank!==void 0?Hr.rank:1/0;return{...Hr,selector:jr,rank:Jr,id:Cr}}xt.createItem=be;function st(Hr,Cr,jr,Jr){let zr=Cr.target;if(!zr)return null;let Gr=Cr.currentTarget;if(!Gr||!Gr.contains(zr)&&(zr=document.elementFromPoint(Cr.clientX,Cr.clientY),!zr||!Gr.contains(zr)))return null;let tn=[],Yr=Hr.slice();for(;zr!==null;){let Nr=[];for(let Qr=0,En=Yr.length;Qr=this._titles.length)&&(be=-1),this._currentIndex===be)return;let st=this._currentIndex,ft=this._titles[st]||null,Lt=be,Xt=this._titles[Lt]||null;this._currentIndex=Lt,this._previousTitle=ft,this.update(),this._currentChanged.emit({previousIndex:st,previousTitle:ft,currentIndex:Lt,currentTitle:Xt})}get name(){return this._name}set name(be){this._name=be,be?this.contentNode.setAttribute("aria-label",be):this.contentNode.removeAttribute("aria-label")}get orientation(){return this._orientation}set orientation(be){this._orientation!==be&&(this._releaseMouse(),this._orientation=be,this.dataset.orientation=be,this.contentNode.setAttribute("aria-orientation",be))}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(be){this._addButtonEnabled!==be&&(this._addButtonEnabled=be,be?this.addButtonNode.classList.remove("lm-mod-hidden"):this.addButtonNode.classList.add("lm-mod-hidden"))}get titles(){return this._titles}get contentNode(){return this.node.getElementsByClassName("lm-TabBar-content")[0]}get addButtonNode(){return this.node.getElementsByClassName("lm-TabBar-addButton")[0]}addTab(be){return this.insertTab(this._titles.length,be)}insertTab(be,st){this._releaseMouse();let ft=ph.asTitle(st),Lt=this._titles.indexOf(ft),Xt=Math.max(0,Math.min(be,this._titles.length));return Lt===-1?(Fi.ArrayExt.insert(this._titles,Xt,ft),ft.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(Xt,ft),ft):(Xt===this._titles.length&&Xt--,Lt===Xt||(Fi.ArrayExt.move(this._titles,Lt,Xt),this.update(),this._adjustCurrentForMove(Lt,Xt)),ft)}removeTab(be){this.removeTabAt(this._titles.indexOf(be))}removeTabAt(be){this._releaseMouse();let st=Fi.ArrayExt.removeAt(this._titles,be);st&&(st.changed.disconnect(this._onTitleChanged,this),st===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(be,st))}clearTabs(){if(this._titles.length===0)return;this._releaseMouse();for(let ft of this._titles)ft.changed.disconnect(this._onTitleChanged,this);let be=this.currentIndex,st=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),be!==-1&&this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:-1,currentTitle:null})}releaseMouse(){this._releaseMouse()}handleEvent(be){switch(be.type){case"pointerdown":this._evtPointerDown(be);break;case"pointermove":this._evtPointerMove(be);break;case"pointerup":this._evtPointerUp(be);break;case"dblclick":this._evtDblClick(be);break;case"keydown":be.eventPhase===Event.CAPTURING_PHASE?this._evtKeyDownCapturing(be):this._evtKeyDown(be);break;case"contextmenu":be.preventDefault(),be.stopPropagation();break}}onBeforeAttach(be){this.node.addEventListener("pointerdown",this),this.node.addEventListener("dblclick",this),this.node.addEventListener("keydown",this)}onAfterDetach(be){this.node.removeEventListener("pointerdown",this),this.node.removeEventListener("dblclick",this),this.node.removeEventListener("keydown",this),this._releaseMouse()}onUpdateRequest(be){var st;let ft=this._titles,Lt=this.renderer,Xt=this.currentTitle,Hr=new Array(ft.length),Cr=(st=this._getCurrentTabindex())!==null&&st!==void 0?st:this._currentIndex>-1?this._currentIndex:0;for(let jr=0,Jr=ft.length;jrRl.hitTest(Hr,be.clientX,be.clientY));if(ft===-1)return;let Lt=this.titles[ft],Xt=st[ft].querySelector(".lm-TabBar-tabLabel");if(Xt&&Xt.contains(be.target)){let Hr=Lt.label||"",Cr=Xt.innerHTML;Xt.innerHTML="";let jr=document.createElement("input");jr.classList.add("lm-TabBar-tabInput"),jr.value=Hr,Xt.appendChild(jr);let Jr=()=>{jr.removeEventListener("blur",Jr),Xt.innerHTML=Cr,this.node.addEventListener("keydown",this)};jr.addEventListener("dblclick",zr=>zr.stopPropagation()),jr.addEventListener("blur",Jr),jr.addEventListener("keydown",zr=>{zr.key==="Enter"?(jr.value!==""&&(Lt.label=Lt.caption=jr.value),Jr()):zr.key==="Escape"&&Jr()}),this.node.removeEventListener("keydown",this),jr.select(),jr.focus(),Xt.children.length>0&&Xt.children[0].focus()}}_evtKeyDownCapturing(be){be.eventPhase===Event.CAPTURING_PHASE&&(be.preventDefault(),be.stopPropagation(),be.key==="Escape"&&this._releaseMouse())}_evtKeyDown(be){var st,ft,Lt;if(!(be.key==="Tab"||be.eventPhase===Event.CAPTURING_PHASE)){if(be.key==="Enter"||be.key==="Spacebar"||be.key===" "){let Xt=document.activeElement;if(this.addButtonEnabled&&this.addButtonNode.contains(Xt))be.preventDefault(),be.stopPropagation(),this._addRequested.emit();else{let Hr=Fi.ArrayExt.findFirstIndex(this.contentNode.children,Cr=>Cr.contains(Xt));Hr>=0&&(be.preventDefault(),be.stopPropagation(),this.currentIndex=Hr)}}else if(JF.includes(be.key)){let Xt=[...this.contentNode.children];if(this.addButtonEnabled&&Xt.push(this.addButtonNode),Xt.length<=1)return;be.preventDefault(),be.stopPropagation();let Hr=Xt.indexOf(document.activeElement);Hr===-1&&(Hr=this._currentIndex);let Cr;be.key==="ArrowRight"&&this._orientation==="horizontal"||be.key==="ArrowDown"&&this._orientation==="vertical"?Cr=(st=Xt[Hr+1])!==null&&st!==void 0?st:Xt[0]:be.key==="ArrowLeft"&&this._orientation==="horizontal"||be.key==="ArrowUp"&&this._orientation==="vertical"?Cr=(ft=Xt[Hr-1])!==null&&ft!==void 0?ft:Xt[Xt.length-1]:be.key==="Home"?Cr=Xt[0]:be.key==="End"&&(Cr=Xt[Xt.length-1]),Cr&&((Lt=Xt[Hr])===null||Lt===void 0||Lt.setAttribute("tabindex","-1"),Cr?.setAttribute("tabindex","0"),Cr.focus())}}}_evtPointerDown(be){if(be.button!==0&&be.button!==1||this._dragData||be.target.classList.contains("lm-TabBar-tabInput"))return;let st=this.addButtonEnabled&&this.addButtonNode.contains(be.target),ft=this.contentNode.children,Lt=Fi.ArrayExt.findFirstIndex(ft,Hr=>Rl.hitTest(Hr,be.clientX,be.clientY));if(Lt===-1&&!st||(be.preventDefault(),be.stopPropagation(),this._dragData={tab:ft[Lt],index:Lt,pressX:be.clientX,pressY:be.clientY,tabPos:-1,tabSize:-1,tabPressPos:-1,targetIndex:-1,tabLayout:null,contentRect:null,override:null,dragActive:!1,dragAborted:!1,detachRequested:!1},this.document.addEventListener("pointerup",this,!0),be.button===1||st))return;let Xt=ft[Lt].querySelector(this.renderer.closeIconSelector);Xt&&Xt.contains(be.target)||(this.tabsMovable&&(this.document.addEventListener("pointermove",this,!0),this.document.addEventListener("keydown",this,!0),this.document.addEventListener("contextmenu",this,!0)),this.allowDeselect&&this.currentIndex===Lt?this.currentIndex=-1:this.currentIndex=Lt,this.currentIndex!==-1&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}_evtPointerMove(be){let st=this._dragData;if(!st)return;be.preventDefault(),be.stopPropagation();let ft=this.contentNode.children;if(!(!st.dragActive&&!ph.dragExceeded(st,be))){if(!st.dragActive){let Lt=st.tab.getBoundingClientRect();this._orientation==="horizontal"?(st.tabPos=st.tab.offsetLeft,st.tabSize=Lt.width,st.tabPressPos=st.pressX-Lt.left):(st.tabPos=st.tab.offsetTop,st.tabSize=Lt.height,st.tabPressPos=st.pressY-Lt.top),st.tabPressOffset={x:st.pressX-Lt.left,y:st.pressY-Lt.top},st.tabLayout=ph.snapTabLayout(ft,this._orientation),st.contentRect=this.contentNode.getBoundingClientRect(),st.override=Zf.overrideCursor("default"),st.tab.classList.add("lm-mod-dragging"),this.addClass("lm-mod-dragging"),st.dragActive=!0}if(!st.detachRequested&&ph.detachExceeded(st,be)){st.detachRequested=!0;let Lt=st.index,Xt=be.clientX,Hr=be.clientY,Cr=ft[Lt],jr=this._titles[Lt];if(this._tabDetachRequested.emit({index:Lt,title:jr,tab:Cr,clientX:Xt,clientY:Hr,offset:st.tabPressOffset}),st.dragAborted)return}ph.layoutTabs(ft,st,be,this._orientation)}}_evtPointerUp(be){if(be.button!==0&&be.button!==1)return;let st=this._dragData;if(!st)return;if(be.preventDefault(),be.stopPropagation(),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),!st.dragActive){if(this._dragData=null,this.addButtonEnabled&&this.addButtonNode.contains(be.target)){this._addRequested.emit(void 0);return}let Xt=this.contentNode.children,Hr=Fi.ArrayExt.findFirstIndex(Xt,Jr=>Rl.hitTest(Jr,be.clientX,be.clientY));if(Hr!==st.index)return;let Cr=this._titles[Hr];if(!Cr.closable)return;if(be.button===1){this._tabCloseRequested.emit({index:Hr,title:Cr});return}let jr=Xt[Hr].querySelector(this.renderer.closeIconSelector);if(jr&&jr.contains(be.target)){this._tabCloseRequested.emit({index:Hr,title:Cr});return}return}if(be.button!==0)return;ph.finalizeTabPosition(st,this._orientation),st.tab.classList.remove("lm-mod-dragging");let ft=ph.parseTransitionDuration(st.tab);setTimeout(()=>{if(st.dragAborted)return;this._dragData=null,ph.resetTabPositions(this.contentNode.children,this._orientation),st.override.dispose(),this.removeClass("lm-mod-dragging");let Lt=st.index,Xt=st.targetIndex;Xt===-1||Lt===Xt||(Fi.ArrayExt.move(this._titles,Lt,Xt),this._adjustCurrentForMove(Lt,Xt),this._tabMoved.emit({fromIndex:Lt,toIndex:Xt,title:this._titles[Xt]}),$i.sendMessage(this,to.Msg.UpdateRequest))},ft)}_releaseMouse(){let be=this._dragData;be&&(this._dragData=null,this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),be.dragAborted=!0,be.dragActive&&(ph.resetTabPositions(this.contentNode.children,this._orientation),be.override.dispose(),be.tab.classList.remove("lm-mod-dragging"),this.removeClass("lm-mod-dragging")))}_adjustCurrentForInsert(be,st){let ft=this.currentTitle,Lt=this._currentIndex,Xt=this.insertBehavior;if(Xt==="select-tab"||Xt==="select-tab-if-needed"&&Lt===-1){this._currentIndex=be,this._previousTitle=ft,this._currentChanged.emit({previousIndex:Lt,previousTitle:ft,currentIndex:be,currentTitle:st});return}Lt>=be&&this._currentIndex++}_adjustCurrentForMove(be,st){this._currentIndex===be?this._currentIndex=st:this._currentIndex=st?this._currentIndex++:this._currentIndex>be&&this._currentIndex<=st&&this._currentIndex--}_adjustCurrentForRemove(be,st){let ft=this._currentIndex,Lt=this.removeBehavior;if(ft!==be){ft>be&&this._currentIndex--;return}if(this._titles.length===0){this._currentIndex=-1,this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:-1,currentTitle:null});return}if(Lt==="select-tab-after"){this._currentIndex=Math.min(be,this._titles.length-1),this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if(Lt==="select-tab-before"){this._currentIndex=Math.max(0,be-1),this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if(Lt==="select-previous-tab"){this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(be,this._titles.length-1),this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}this._currentIndex=-1,this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:-1,currentTitle:null})}_onTitleChanged(be){this.update()}};(function(xt){class be{constructor(){this.closeIconSelector=".lm-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap,this._uuid=++be._nInstance}renderTab(ft){let Lt=ft.title.caption,Xt=this.createTabKey(ft),Hr=Xt,Cr=this.createTabStyle(ft),jr=this.createTabClass(ft),Jr=this.createTabDataset(ft),zr=this.createTabARIA(ft);return ft.title.closable?Sl.li({id:Hr,key:Xt,className:jr,title:Lt,style:Cr,dataset:Jr,...zr},this.renderIcon(ft),this.renderLabel(ft),this.renderCloseIcon(ft)):Sl.li({id:Hr,key:Xt,className:jr,title:Lt,style:Cr,dataset:Jr,...zr},this.renderIcon(ft),this.renderLabel(ft))}renderIcon(ft){let{title:Lt}=ft,Xt=this.createIconClass(ft);return Sl.div({className:Xt},Lt.icon,Lt.iconLabel)}renderLabel(ft){return Sl.div({className:"lm-TabBar-tabLabel"},ft.title.label)}renderCloseIcon(ft){return Sl.div({className:"lm-TabBar-tabCloseIcon"})}createTabKey(ft){let Lt=this._tabKeys.get(ft.title);return Lt===void 0&&(Lt=`tab-key-${this._uuid}-${this._tabID++}`,this._tabKeys.set(ft.title,Lt)),Lt}createTabStyle(ft){return{zIndex:`${ft.zIndex}`}}createTabClass(ft){let Lt="lm-TabBar-tab";return ft.title.className&&(Lt+=` ${ft.title.className}`),ft.title.closable&&(Lt+=" lm-mod-closable"),ft.current&&(Lt+=" lm-mod-current"),Lt}createTabDataset(ft){return ft.title.dataset}createTabARIA(ft){var Lt;return{role:"tab","aria-selected":ft.current.toString(),tabindex:`${(Lt=ft.tabIndex)!==null&&Lt!==void 0?Lt:"-1"}`}}createIconClass(ft){let Lt="lm-TabBar-tabIcon",Xt=ft.title.iconClass;return Xt?`${Lt} ${Xt}`:Lt}}be._nInstance=0,xt.Renderer=be,xt.defaultRenderer=new be,xt.addButtonSelector=".lm-TabBar-addButton"})(Ip||(Ip={}));var ph;(function(xt){xt.DRAG_THRESHOLD=5,xt.DETACH_THRESHOLD=20;function be(){let zr=document.createElement("div"),Gr=document.createElement("ul");Gr.setAttribute("role","tablist"),Gr.className="lm-TabBar-content",zr.appendChild(Gr);let tn=document.createElement("div");return tn.className="lm-TabBar-addButton lm-mod-hidden",tn.setAttribute("tabindex","-1"),tn.setAttribute("role","button"),zr.appendChild(tn),zr}xt.createNode=be;function st(zr){return zr instanceof D0?zr:new D0(zr)}xt.asTitle=st;function ft(zr){let Gr=window.getComputedStyle(zr);return 1e3*(parseFloat(Gr.transitionDuration)||0)}xt.parseTransitionDuration=ft;function Lt(zr,Gr){let tn=new Array(zr.length);for(let Yr=0,Nr=zr.length;Yr=xt.DRAG_THRESHOLD||Yr>=xt.DRAG_THRESHOLD}xt.dragExceeded=Xt;function Hr(zr,Gr){let tn=zr.contentRect;return Gr.clientX=tn.right+xt.DETACH_THRESHOLD||Gr.clientY=tn.bottom+xt.DETACH_THRESHOLD}xt.detachExceeded=Hr;function Cr(zr,Gr,tn,Yr){let Nr,Qr,En,In;Yr==="horizontal"?(Nr=Gr.pressX,Qr=tn.clientX-Gr.contentRect.left,En=tn.clientX,In=Gr.contentRect.width):(Nr=Gr.pressY,Qr=tn.clientY-Gr.contentRect.top,En=tn.clientY,In=Gr.contentRect.height);let Ee=Gr.index,yn=Qr-Gr.tabPressPos,Wn=yn+Gr.tabSize;for(let Yn=0,ra=zr.length;Yn>1);if(YnGr.index&&Wn>qi)ri=`${-Gr.tabSize-ni.margin}px`,Ee=Math.max(Ee,Yn);else if(Yn===Gr.index){let Ta=En-Nr,Hn=In-(Gr.tabPos+Gr.tabSize);ri=`${Math.max(-Gr.tabPos,Math.min(Ta,Hn))}px`}else ri="";Yr==="horizontal"?zr[Yn].style.left=ri:zr[Yn].style.top=ri}Gr.targetIndex=Ee}xt.layoutTabs=Cr;function jr(zr,Gr){let tn;Gr==="horizontal"?tn=zr.contentRect.width:tn=zr.contentRect.height;let Yr;if(zr.targetIndex===zr.index)Yr=0;else if(zr.targetIndex>zr.index){let En=zr.tabLayout[zr.targetIndex];Yr=En.pos+En.size-zr.tabSize-zr.tabPos}else Yr=zr.tabLayout[zr.targetIndex].pos-zr.tabPos;let Nr=tn-(zr.tabPos+zr.tabSize),Qr=Math.max(-zr.tabPos,Math.min(Yr,Nr));Gr==="horizontal"?zr.tab.style.left=`${Qr}px`:zr.tab.style.top=`${Qr}px`}xt.finalizeTabPosition=jr;function Jr(zr,Gr){for(let tn of zr)Gr==="horizontal"?tn.style.left="":tn.style.top=""}xt.resetTabPositions=Jr})(ph||(ph={}));var fb=class extends pd{constructor(be){super(),this._spacing=4,this._dirty=!1,this._root=null,this._box=null,this._items=new Map,this.renderer=be.renderer,be.spacing!==void 0&&(this._spacing=R0.clampDimension(be.spacing)),this._document=be.document||document,this._hiddenMode=be.hiddenMode!==void 0?be.hiddenMode:to.HiddenMode.Display}dispose(){let be=this[Symbol.iterator]();this._items.forEach(st=>{st.dispose()}),this._box=null,this._root=null,this._items.clear();for(let st of be)st.dispose();super.dispose()}get hiddenMode(){return this._hiddenMode}set hiddenMode(be){if(this._hiddenMode!==be){this._hiddenMode=be;for(let st of this.tabBars())if(st.titles.length>1)for(let ft of st.titles)ft.owner.hiddenMode=this._hiddenMode}}get spacing(){return this._spacing}set spacing(be){be=R0.clampDimension(be),this._spacing!==be&&(this._spacing=be,this.parent&&this.parent.fit())}get isEmpty(){return this._root===null}[Symbol.iterator](){return this._root?this._root.iterAllWidgets():(0,Fi.empty)()}widgets(){return this._root?this._root.iterUserWidgets():(0,Fi.empty)()}selectedWidgets(){return this._root?this._root.iterSelectedWidgets():(0,Fi.empty)()}tabBars(){return this._root?this._root.iterTabBars():(0,Fi.empty)()}handles(){return this._root?this._root.iterHandles():(0,Fi.empty)()}moveHandle(be,st,ft){let Lt=be.classList.contains("lm-mod-hidden");if(!this._root||Lt)return;let Xt=this._root.findSplitNode(be);if(!Xt)return;let Hr;Xt.node.orientation==="horizontal"?Hr=st-be.offsetLeft:Hr=ft-be.offsetTop,Hr!==0&&(Xt.node.holdSizes(),sh.adjust(Xt.node.sizers,Xt.index,Hr),this.parent&&this.parent.update())}saveLayout(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}}restoreLayout(be){let st=new Set,ft;be.main?ft=lc.normalizeAreaConfig(be.main,st):ft=null;let Lt=this.widgets(),Xt=this.tabBars(),Hr=this.handles();this._root=null;for(let Cr of Lt)st.has(Cr)||(Cr.parent=null);for(let Cr of Xt)Cr.dispose();for(let Cr of Hr)Cr.parentNode&&Cr.parentNode.removeChild(Cr);for(let Cr of st)Cr.parent=this.parent;ft?this._root=lc.realizeAreaConfig(ft,{createTabBar:Cr=>this._createTabBar(),createHandle:()=>this._createHandle()},this._document):this._root=null,this.parent&&(st.forEach(Cr=>{this.attachWidget(Cr)}),this.parent.fit())}addWidget(be,st={}){let ft=st.ref||null,Lt=st.mode||"tab-after",Xt=null;if(this._root&&ft&&(Xt=this._root.findTabNode(ft)),ft&&!Xt)throw new Error("Reference widget is not in the layout.");switch(be.parent=this.parent,Lt){case"tab-after":this._insertTab(be,ft,Xt,!0);break;case"tab-before":this._insertTab(be,ft,Xt,!1);break;case"split-top":this._insertSplit(be,ft,Xt,"vertical",!1);break;case"split-left":this._insertSplit(be,ft,Xt,"horizontal",!1);break;case"split-right":this._insertSplit(be,ft,Xt,"horizontal",!0);break;case"split-bottom":this._insertSplit(be,ft,Xt,"vertical",!0);break;case"merge-top":this._insertSplit(be,ft,Xt,"vertical",!1,!0);break;case"merge-left":this._insertSplit(be,ft,Xt,"horizontal",!1,!0);break;case"merge-right":this._insertSplit(be,ft,Xt,"horizontal",!0,!0);break;case"merge-bottom":this._insertSplit(be,ft,Xt,"vertical",!0,!0);break}this.parent&&(this.attachWidget(be),this.parent.fit())}removeWidget(be){this._removeWidget(be),this.parent&&(this.detachWidget(be),this.parent.fit())}hitTestTabAreas(be,st){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=Rl.boxSizing(this.parent.node));let ft=this.parent.node.getBoundingClientRect(),Lt=be-ft.left-this._box.borderLeft,Xt=st-ft.top-this._box.borderTop,Hr=this._root.hitTestTabNodes(Lt,Xt);if(!Hr)return null;let{tabBar:Cr,top:jr,left:Jr,width:zr,height:Gr}=Hr,tn=this._box.borderLeft+this._box.borderRight,Yr=this._box.borderTop+this._box.borderBottom,Nr=ft.width-tn-(Jr+zr),Qr=ft.height-Yr-(jr+Gr);return{tabBar:Cr,x:Lt,y:Xt,top:jr,left:Jr,right:Nr,bottom:Qr,width:zr,height:Gr}}init(){super.init();for(let be of this)this.attachWidget(be);for(let be of this.handles())this.parent.node.appendChild(be);this.parent.fit()}attachWidget(be){this.parent.node!==be.node.parentNode&&(this._items.set(be,new Tv(be)),this.parent.isAttached&&$i.sendMessage(be,to.Msg.BeforeAttach),this.parent.node.appendChild(be.node),this.parent.isAttached&&$i.sendMessage(be,to.Msg.AfterAttach))}detachWidget(be){if(this.parent.node!==be.node.parentNode)return;this.parent.isAttached&&$i.sendMessage(be,to.Msg.BeforeDetach),this.parent.node.removeChild(be.node),this.parent.isAttached&&$i.sendMessage(be,to.Msg.AfterDetach);let st=this._items.get(be);st&&(this._items.delete(be),st.dispose())}onBeforeShow(be){super.onBeforeShow(be),this.parent.update()}onBeforeAttach(be){super.onBeforeAttach(be),this.parent.fit()}onChildShown(be){this.parent.fit()}onChildHidden(be){this.parent.fit()}onResize(be){this.parent.isVisible&&this._update(be.width,be.height)}onUpdateRequest(be){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(be){this.parent.isAttached&&this._fit()}_removeWidget(be){if(!this._root)return;let st=this._root.findTabNode(be);if(!st)return;if(lc.removeAria(be),st.tabBar.titles.length>1){if(st.tabBar.removeTab(be.title),this._hiddenMode===to.HiddenMode.Scale&&st.tabBar.titles.length==1){let tn=st.tabBar.titles[0].owner;tn.hiddenMode=to.HiddenMode.Display}return}if(st.tabBar.dispose(),this._root===st){this._root=null;return}this._root.holdAllSizes();let ft=st.parent;st.parent=null;let Lt=Fi.ArrayExt.removeFirstOf(ft.children,st),Xt=Fi.ArrayExt.removeAt(ft.handles,Lt);if(Fi.ArrayExt.removeAt(ft.sizers,Lt),Xt.parentNode&&Xt.parentNode.removeChild(Xt),ft.children.length>1){ft.syncHandles();return}let Hr=ft.parent;ft.parent=null;let Cr=ft.children[0],jr=ft.handles[0];if(ft.children.length=0,ft.handles.length=0,ft.sizers.length=0,jr.parentNode&&jr.parentNode.removeChild(jr),this._root===ft){Cr.parent=null,this._root=Cr;return}let Jr=Hr,zr=Jr.children.indexOf(ft);if(Cr instanceof lc.TabLayoutNode){Cr.parent=Jr,Jr.children[zr]=Cr;return}let Gr=Fi.ArrayExt.removeAt(Jr.handles,zr);Fi.ArrayExt.removeAt(Jr.children,zr),Fi.ArrayExt.removeAt(Jr.sizers,zr),Gr.parentNode&&Gr.parentNode.removeChild(Gr);for(let tn=0,Yr=Cr.children.length;tn=this._left+this._width||Nr=this._top+this._height?null:this}createConfig(){let Yr=this.tabBar.titles.map(Qr=>Qr.owner),Nr=this.tabBar.currentIndex;return{type:"tab-area",widgets:Yr,currentIndex:Nr}}holdAllSizes(){}fit(Yr,Nr){let Qr=0,En=0,In=1/0,Ee=1/0,yn=Nr.get(this.tabBar),Wn=this.tabBar.currentTitle,Yn=Wn?Nr.get(Wn.owner):void 0,[ra,ri]=this.sizers;return yn&&yn.fit(),Yn&&Yn.fit(),yn&&!yn.isHidden?(Qr=Math.max(Qr,yn.minWidth),En+=yn.minHeight,ra.minSize=yn.minHeight,ra.maxSize=yn.maxHeight):(ra.minSize=0,ra.maxSize=0),Yn&&!Yn.isHidden?(Qr=Math.max(Qr,Yn.minWidth),En+=Yn.minHeight,ri.minSize=Yn.minHeight,ri.maxSize=1/0):(ri.minSize=0,ri.maxSize=1/0),{minWidth:Qr,minHeight:En,maxWidth:In,maxHeight:Ee}}update(Yr,Nr,Qr,En,In,Ee){this._top=Nr,this._left=Yr,this._width=Qr,this._height=En;let yn=Ee.get(this.tabBar),Wn=this.tabBar.currentTitle,Yn=Wn?Ee.get(Wn.owner):void 0;if(sh.calc(this.sizers,En),yn&&!yn.isHidden){let ra=this.sizers[0].size;yn.update(Yr,Nr,Qr,ra),Nr+=ra}if(Yn&&!Yn.isHidden){let ra=this.sizers[1].size;Yn.update(Yr,Nr,Qr,ra)}}}xt.TabLayoutNode=Lt;class Xt{constructor(Yr){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=Yr}*iterAllWidgets(){for(let Yr of this.children)yield*Yr.iterAllWidgets()}*iterUserWidgets(){for(let Yr of this.children)yield*Yr.iterUserWidgets()}*iterSelectedWidgets(){for(let Yr of this.children)yield*Yr.iterSelectedWidgets()}*iterTabBars(){for(let Yr of this.children)yield*Yr.iterTabBars()}*iterHandles(){yield*this.handles;for(let Yr of this.children)yield*Yr.iterHandles()}findTabNode(Yr){for(let Nr=0,Qr=this.children.length;NrEn.createConfig());return{type:"split-area",orientation:Yr,children:Qr,sizes:Nr}}syncHandles(){this.handles.forEach((Yr,Nr)=>{Yr.setAttribute("data-orientation",this.orientation),Nr===this.handles.length-1?Yr.classList.add("lm-mod-hidden"):Yr.classList.remove("lm-mod-hidden")})}holdSizes(){for(let Yr of this.sizers)Yr.sizeHint=Yr.size}holdAllSizes(){for(let Yr of this.children)Yr.holdAllSizes();this.holdSizes()}normalizeSizes(){let Yr=this.sizers.length;if(Yr===0)return;this.holdSizes();let Nr=this.sizers.reduce((Qr,En)=>Qr+En.sizeHint,0);if(Nr===0)for(let Qr of this.sizers)Qr.size=Qr.sizeHint=1/Yr;else for(let Qr of this.sizers)Qr.size=Qr.sizeHint/=Nr;this.normalized=!0}createNormalizedSizes(){let Yr=this.sizers.length;if(Yr===0)return[];let Nr=this.sizers.map(En=>En.size),Qr=Nr.reduce((En,In)=>En+In,0);if(Qr===0)for(let En=Nr.length-1;En>-1;En--)Nr[En]=1/Yr;else for(let En=Nr.length-1;En>-1;En--)Nr[En]/=Qr;return Nr}fit(Yr,Nr){let Qr=this.orientation==="horizontal",En=Math.max(0,this.children.length-1)*Yr,In=Qr?En:0,Ee=Qr?0:En,yn=1/0,Wn=1/0;for(let Yn=0,ra=this.children.length;Yn=Nr.length)&&(Qr=0),{type:"tab-area",widgets:Nr,currentIndex:Qr}}function Jr(tn,Yr){let Nr=tn.orientation,Qr=[],En=[];for(let In=0,Ee=tn.children.length;In{let Ee=ft(En,Yr,Nr),yn=be(tn.sizes[In]),Wn=Yr.createHandle();Qr.children.push(Ee),Qr.handles.push(Wn),Qr.sizers.push(yn),Ee.parent=Qr}),Qr.syncHandles(),Qr.normalizeSizes(),Qr}})(lc||(lc={}));var bg=class xt extends to{constructor(be={}){super(),this._drag=null,this._tabsMovable=!0,this._tabsConstrained=!1,this._addButtonEnabled=!1,this._pressData=null,this._layoutModified=new Ml(this),this._addRequested=new Ml(this),this.addClass("lm-DockPanel"),this._document=be.document||document,this._mode=be.mode||"multiple-document",this._renderer=be.renderer||xt.defaultRenderer,this._edges=be.edges||Qu.DEFAULT_EDGES,be.tabsMovable!==void 0&&(this._tabsMovable=be.tabsMovable),be.tabsConstrained!==void 0&&(this._tabsConstrained=be.tabsConstrained),be.addButtonEnabled!==void 0&&(this._addButtonEnabled=be.addButtonEnabled),this.dataset.mode=this._mode;let st={createTabBar:()=>this._createTabBar(),createHandle:()=>this._createHandle()};this.layout=new fb({document:this._document,renderer:st,spacing:be.spacing,hiddenMode:be.hiddenMode}),this.overlay=be.overlay||new xt.Overlay,this.node.appendChild(this.overlay.node)}dispose(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),super.dispose()}get hiddenMode(){return this.layout.hiddenMode}set hiddenMode(be){this.layout.hiddenMode=be}get layoutModified(){return this._layoutModified}get addRequested(){return this._addRequested}get renderer(){return this.layout.renderer}get spacing(){return this.layout.spacing}set spacing(be){this.layout.spacing=be}get mode(){return this._mode}set mode(be){if(this._mode===be)return;this._mode=be,this.dataset.mode=be;let st=this.layout;switch(be){case"multiple-document":for(let ft of st.tabBars())ft.show();break;case"single-document":st.restoreLayout(Qu.createSingleDocumentConfig(this));break;default:throw"unreachable"}$i.postMessage(this,Qu.LayoutModified)}get tabsMovable(){return this._tabsMovable}set tabsMovable(be){this._tabsMovable=be;for(let st of this.tabBars())st.tabsMovable=be}get tabsConstrained(){return this._tabsConstrained}set tabsConstrained(be){this._tabsConstrained=be}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(be){this._addButtonEnabled=be;for(let st of this.tabBars())st.addButtonEnabled=be}get isEmpty(){return this.layout.isEmpty}*widgets(){yield*this.layout.widgets()}*selectedWidgets(){yield*this.layout.selectedWidgets()}*tabBars(){yield*this.layout.tabBars()}*handles(){yield*this.layout.handles()}selectWidget(be){let st=(0,Fi.find)(this.tabBars(),ft=>ft.titles.indexOf(be.title)!==-1);if(!st)throw new Error("Widget is not contained in the dock panel.");st.currentTitle=be.title}activateWidget(be){this.selectWidget(be),be.activate()}saveLayout(){return this.layout.saveLayout()}restoreLayout(be){this._mode="multiple-document",this.layout.restoreLayout(be),(jf.IS_EDGE||jf.IS_IE)&&$i.flush(),$i.postMessage(this,Qu.LayoutModified)}addWidget(be,st={}){this._mode==="single-document"?this.layout.addWidget(be):this.layout.addWidget(be,st),$i.postMessage(this,Qu.LayoutModified)}processMessage(be){be.type==="layout-modified"?this._layoutModified.emit(void 0):super.processMessage(be)}handleEvent(be){switch(be.type){case"lm-dragenter":this._evtDragEnter(be);break;case"lm-dragleave":this._evtDragLeave(be);break;case"lm-dragover":this._evtDragOver(be);break;case"lm-drop":this._evtDrop(be);break;case"pointerdown":this._evtPointerDown(be);break;case"pointermove":this._evtPointerMove(be);break;case"pointerup":this._evtPointerUp(be);break;case"keydown":this._evtKeyDown(be);break;case"contextmenu":be.preventDefault(),be.stopPropagation();break}}onBeforeAttach(be){this.node.addEventListener("lm-dragenter",this),this.node.addEventListener("lm-dragleave",this),this.node.addEventListener("lm-dragover",this),this.node.addEventListener("lm-drop",this),this.node.addEventListener("pointerdown",this)}onAfterDetach(be){this.node.removeEventListener("lm-dragenter",this),this.node.removeEventListener("lm-dragleave",this),this.node.removeEventListener("lm-dragover",this),this.node.removeEventListener("lm-drop",this),this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(be){Qu.isGeneratedTabBarProperty.get(be.child)||be.child.addClass("lm-DockPanel-widget")}onChildRemoved(be){Qu.isGeneratedTabBarProperty.get(be.child)||(be.child.removeClass("lm-DockPanel-widget"),$i.postMessage(this,Qu.LayoutModified))}_evtDragEnter(be){be.mimeData.hasData("application/vnd.lumino.widget-factory")&&(be.preventDefault(),be.stopPropagation())}_evtDragLeave(be){be.preventDefault(),!(this._tabsConstrained&&be.source!==this)&&(be.stopPropagation(),this.overlay.hide(1))}_evtDragOver(be){be.preventDefault(),this._tabsConstrained&&be.source!==this||this._showOverlay(be.clientX,be.clientY)==="invalid"?be.dropAction="none":(be.stopPropagation(),be.dropAction=be.proposedAction)}_evtDrop(be){if(be.preventDefault(),this.overlay.hide(0),be.proposedAction==="none"){be.dropAction="none";return}let{clientX:st,clientY:ft}=be,{zone:Lt,target:Xt}=Qu.findDropTarget(this,st,ft,this._edges);if(this._tabsConstrained&&be.source!==this||Lt==="invalid"){be.dropAction="none";return}let Cr=be.mimeData.getData("application/vnd.lumino.widget-factory");if(typeof Cr!="function"){be.dropAction="none";return}let jr=Cr();if(!(jr instanceof to)){be.dropAction="none";return}if(jr.contains(this)){be.dropAction="none";return}let Jr=Xt?Qu.getDropRef(Xt.tabBar):null;switch(Lt){case"root-all":this.addWidget(jr);break;case"root-top":this.addWidget(jr,{mode:"split-top"});break;case"root-left":this.addWidget(jr,{mode:"split-left"});break;case"root-right":this.addWidget(jr,{mode:"split-right"});break;case"root-bottom":this.addWidget(jr,{mode:"split-bottom"});break;case"widget-all":this.addWidget(jr,{mode:"tab-after",ref:Jr});break;case"widget-top":this.addWidget(jr,{mode:"split-top",ref:Jr});break;case"widget-left":this.addWidget(jr,{mode:"split-left",ref:Jr});break;case"widget-right":this.addWidget(jr,{mode:"split-right",ref:Jr});break;case"widget-bottom":this.addWidget(jr,{mode:"split-bottom",ref:Jr});break;case"widget-tab":this.addWidget(jr,{mode:"tab-after",ref:Jr});break;default:throw"unreachable"}be.dropAction=be.proposedAction,be.stopPropagation(),this.activateWidget(jr)}_evtKeyDown(be){be.preventDefault(),be.stopPropagation(),be.keyCode===27&&(this._releaseMouse(),$i.postMessage(this,Qu.LayoutModified))}_evtPointerDown(be){if(be.button!==0)return;let st=this.layout,ft=be.target,Lt=(0,Fi.find)(st.handles(),zr=>zr.contains(ft));if(!Lt)return;be.preventDefault(),be.stopPropagation(),this._document.addEventListener("keydown",this,!0),this._document.addEventListener("pointerup",this,!0),this._document.addEventListener("pointermove",this,!0),this._document.addEventListener("contextmenu",this,!0);let Xt=Lt.getBoundingClientRect(),Hr=be.clientX-Xt.left,Cr=be.clientY-Xt.top,jr=window.getComputedStyle(Lt),Jr=Zf.overrideCursor(jr.cursor,this._document);this._pressData={handle:Lt,deltaX:Hr,deltaY:Cr,override:Jr}}_evtPointerMove(be){if(!this._pressData)return;be.preventDefault(),be.stopPropagation();let st=this.node.getBoundingClientRect(),ft=be.clientX-st.left-this._pressData.deltaX,Lt=be.clientY-st.top-this._pressData.deltaY;this.layout.moveHandle(this._pressData.handle,ft,Lt)}_evtPointerUp(be){be.button===0&&(be.preventDefault(),be.stopPropagation(),this._releaseMouse(),$i.postMessage(this,Qu.LayoutModified))}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._document.removeEventListener("keydown",this,!0),this._document.removeEventListener("pointerup",this,!0),this._document.removeEventListener("pointermove",this,!0),this._document.removeEventListener("contextmenu",this,!0))}_showOverlay(be,st){let{zone:ft,target:Lt}=Qu.findDropTarget(this,be,st,this._edges);if(ft==="invalid")return this.overlay.hide(100),ft;let Xt,Hr,Cr,jr,Jr=Rl.boxSizing(this.node),zr=this.node.getBoundingClientRect();switch(ft){case"root-all":Xt=Jr.paddingTop,Hr=Jr.paddingLeft,Cr=Jr.paddingRight,jr=Jr.paddingBottom;break;case"root-top":Xt=Jr.paddingTop,Hr=Jr.paddingLeft,Cr=Jr.paddingRight,jr=zr.height*Qu.GOLDEN_RATIO;break;case"root-left":Xt=Jr.paddingTop,Hr=Jr.paddingLeft,Cr=zr.width*Qu.GOLDEN_RATIO,jr=Jr.paddingBottom;break;case"root-right":Xt=Jr.paddingTop,Hr=zr.width*Qu.GOLDEN_RATIO,Cr=Jr.paddingRight,jr=Jr.paddingBottom;break;case"root-bottom":Xt=zr.height*Qu.GOLDEN_RATIO,Hr=Jr.paddingLeft,Cr=Jr.paddingRight,jr=Jr.paddingBottom;break;case"widget-all":Xt=Lt.top,Hr=Lt.left,Cr=Lt.right,jr=Lt.bottom;break;case"widget-top":Xt=Lt.top,Hr=Lt.left,Cr=Lt.right,jr=Lt.bottom+Lt.height/2;break;case"widget-left":Xt=Lt.top,Hr=Lt.left,Cr=Lt.right+Lt.width/2,jr=Lt.bottom;break;case"widget-right":Xt=Lt.top,Hr=Lt.left+Lt.width/2,Cr=Lt.right,jr=Lt.bottom;break;case"widget-bottom":Xt=Lt.top+Lt.height/2,Hr=Lt.left,Cr=Lt.right,jr=Lt.bottom;break;case"widget-tab":{let Gr=Lt.tabBar.node.getBoundingClientRect().height;Xt=Lt.top,Hr=Lt.left,Cr=Lt.right,jr=Lt.bottom+Lt.height-Gr;break}default:throw"unreachable"}return this.overlay.show({top:Xt,left:Hr,right:Cr,bottom:jr}),ft}_createTabBar(){let be=this._renderer.createTabBar(this._document);return Qu.isGeneratedTabBarProperty.set(be,!0),this._mode==="single-document"&&be.hide(),be.tabsMovable=this._tabsMovable,be.allowDeselect=!1,be.addButtonEnabled=this._addButtonEnabled,be.removeBehavior="select-previous-tab",be.insertBehavior="select-tab-if-needed",be.tabMoved.connect(this._onTabMoved,this),be.currentChanged.connect(this._onCurrentChanged,this),be.tabCloseRequested.connect(this._onTabCloseRequested,this),be.tabDetachRequested.connect(this._onTabDetachRequested,this),be.tabActivateRequested.connect(this._onTabActivateRequested,this),be.addRequested.connect(this._onTabAddRequested,this),be}_createHandle(){return this._renderer.createHandle()}_onTabMoved(){$i.postMessage(this,Qu.LayoutModified)}_onCurrentChanged(be,st){let{previousTitle:ft,currentTitle:Lt}=st;ft&&ft.owner.hide(),Lt&&Lt.owner.show(),(jf.IS_EDGE||jf.IS_IE)&&$i.flush(),$i.postMessage(this,Qu.LayoutModified)}_onTabAddRequested(be){this._addRequested.emit(be)}_onTabActivateRequested(be,st){st.title.owner.activate()}_onTabCloseRequested(be,st){st.title.owner.close()}_onTabDetachRequested(be,st){if(this._drag)return;be.releaseMouse();let{title:ft,tab:Lt,clientX:Xt,clientY:Hr,offset:Cr}=st,jr=new vd.MimeData,Jr=()=>ft.owner;jr.setData("application/vnd.lumino.widget-factory",Jr);let zr=Lt.cloneNode(!0);Cr&&(zr.style.top=`-${Cr.y}px`,zr.style.left=`-${Cr.x}px`),this._drag=new Zf({document:this._document,mimeData:jr,dragImage:zr,proposedAction:"move",supportedActions:"move",source:this}),Lt.classList.add("lm-mod-hidden");let Gr=()=>{this._drag=null,Lt.classList.remove("lm-mod-hidden")};this._drag.start(Xt,Hr).then(Gr)}};(function(xt){class be{constructor(){this._timer=-1,this._hidden=!0,this.node=document.createElement("div"),this.node.classList.add("lm-DockPanel-overlay"),this.node.classList.add("lm-mod-hidden"),this.node.style.position="absolute",this.node.style.contain="strict"}show(Lt){let Xt=this.node.style;Xt.top=`${Lt.top}px`,Xt.left=`${Lt.left}px`,Xt.right=`${Lt.right}px`,Xt.bottom=`${Lt.bottom}px`,clearTimeout(this._timer),this._timer=-1,this._hidden&&(this._hidden=!1,this.node.classList.remove("lm-mod-hidden"))}hide(Lt){if(!this._hidden){if(Lt<=0){clearTimeout(this._timer),this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden");return}this._timer===-1&&(this._timer=window.setTimeout(()=>{this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden")},Lt))}}}xt.Overlay=be;class st{createTabBar(Lt){let Xt=new Ip({document:Lt});return Xt.addClass("lm-DockPanel-tabBar"),Xt}createHandle(){let Lt=document.createElement("div");return Lt.className="lm-DockPanel-handle",Lt}}xt.Renderer=st,xt.defaultRenderer=new st})(bg||(bg={}));var Qu;(function(xt){xt.GOLDEN_RATIO=.618,xt.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},xt.LayoutModified=new Ud("layout-modified"),xt.isGeneratedTabBarProperty=new $f({name:"isGeneratedTabBar",create:()=>!1});function be(Lt){if(Lt.isEmpty)return{main:null};let Xt=Array.from(Lt.widgets()),Hr=Lt.selectedWidgets().next().value,Cr=Hr?Xt.indexOf(Hr):-1;return{main:{type:"tab-area",widgets:Xt,currentIndex:Cr}}}xt.createSingleDocumentConfig=be;function st(Lt,Xt,Hr,Cr){if(!Rl.hitTest(Lt.node,Xt,Hr))return{zone:"invalid",target:null};let jr=Lt.layout;if(jr.isEmpty)return{zone:"root-all",target:null};if(Lt.mode==="multiple-document"){let yn=Lt.node.getBoundingClientRect(),Wn=Xt-yn.left+1,Yn=Hr-yn.top+1,ra=yn.right-Xt,ri=yn.bottom-Hr;switch(Math.min(Yn,ra,ri,Wn)){case Yn:if(YnQr&&tn>Qr&&Gr>En&&Yr>En)return{zone:"widget-all",target:Jr};zr/=Qr,Gr/=En,tn/=Qr,Yr/=En;let In=Math.min(zr,Gr,tn,Yr),Ee;switch(In){case zr:Ee="widget-left";break;case Gr:Ee="widget-top";break;case tn:Ee="widget-right";break;case Yr:Ee="widget-bottom";break;default:throw"unreachable"}return{zone:Ee,target:Jr}}xt.findDropTarget=st;function ft(Lt){return Lt.titles.length===0?null:Lt.currentTitle?Lt.currentTitle.owner:Lt.titles[Lt.titles.length-1].owner}xt.getDropRef=ft})(Qu||(Qu={}));var z0=class xt extends pd{constructor(be={}){super(be),this._dirty=!1,this._rowSpacing=4,this._columnSpacing=4,this._items=[],this._rowStarts=[],this._columnStarts=[],this._rowSizers=[new Vh],this._columnSizers=[new Vh],this._box=null,be.rowCount!==void 0&&Hc.reallocSizers(this._rowSizers,be.rowCount),be.columnCount!==void 0&&Hc.reallocSizers(this._columnSizers,be.columnCount),be.rowSpacing!==void 0&&(this._rowSpacing=Hc.clampValue(be.rowSpacing)),be.columnSpacing!==void 0&&(this._columnSpacing=Hc.clampValue(be.columnSpacing))}dispose(){for(let be of this._items){let st=be.widget;be.dispose(),st.dispose()}this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,super.dispose()}get rowCount(){return this._rowSizers.length}set rowCount(be){be!==this.rowCount&&(Hc.reallocSizers(this._rowSizers,be),this.parent&&this.parent.fit())}get columnCount(){return this._columnSizers.length}set columnCount(be){be!==this.columnCount&&(Hc.reallocSizers(this._columnSizers,be),this.parent&&this.parent.fit())}get rowSpacing(){return this._rowSpacing}set rowSpacing(be){be=Hc.clampValue(be),this._rowSpacing!==be&&(this._rowSpacing=be,this.parent&&this.parent.fit())}get columnSpacing(){return this._columnSpacing}set columnSpacing(be){be=Hc.clampValue(be),this._columnSpacing!==be&&(this._columnSpacing=be,this.parent&&this.parent.fit())}rowStretch(be){let st=this._rowSizers[be];return st?st.stretch:-1}setRowStretch(be,st){let ft=this._rowSizers[be];ft&&(st=Hc.clampValue(st),ft.stretch!==st&&(ft.stretch=st,this.parent&&this.parent.update()))}columnStretch(be){let st=this._columnSizers[be];return st?st.stretch:-1}setColumnStretch(be,st){let ft=this._columnSizers[be];ft&&(st=Hc.clampValue(st),ft.stretch!==st&&(ft.stretch=st,this.parent&&this.parent.update()))}*[Symbol.iterator](){for(let be of this._items)yield be.widget}addWidget(be){Fi.ArrayExt.findFirstIndex(this._items,ft=>ft.widget===be)===-1&&(this._items.push(new Tv(be)),this.parent&&this.attachWidget(be))}removeWidget(be){let st=Fi.ArrayExt.findFirstIndex(this._items,Lt=>Lt.widget===be);if(st===-1)return;let ft=Fi.ArrayExt.removeAt(this._items,st);this.parent&&this.detachWidget(be),ft.dispose()}init(){super.init();for(let be of this)this.attachWidget(be)}attachWidget(be){this.parent.isAttached&&$i.sendMessage(be,to.Msg.BeforeAttach),this.parent.node.appendChild(be.node),this.parent.isAttached&&$i.sendMessage(be,to.Msg.AfterAttach),this.parent.fit()}detachWidget(be){this.parent.isAttached&&$i.sendMessage(be,to.Msg.BeforeDetach),this.parent.node.removeChild(be.node),this.parent.isAttached&&$i.sendMessage(be,to.Msg.AfterDetach),this.parent.fit()}onBeforeShow(be){super.onBeforeShow(be),this.parent.update()}onBeforeAttach(be){super.onBeforeAttach(be),this.parent.fit()}onChildShown(be){this.parent.fit()}onChildHidden(be){this.parent.fit()}onResize(be){this.parent.isVisible&&this._update(be.width,be.height)}onUpdateRequest(be){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(be){this.parent.isAttached&&this._fit()}_fit(){for(let jr=0,Jr=this.rowCount;jr!jr.isHidden);for(let jr=0,Jr=be.length;jr({row:0,column:0,rowSpan:1,columnSpan:1}),changed:Cr});function be(jr){let Jr=Math.max(0,Math.floor(jr.row||0)),zr=Math.max(0,Math.floor(jr.column||0)),Gr=Math.max(1,Math.floor(jr.rowSpan||0)),tn=Math.max(1,Math.floor(jr.columnSpan||0));return{row:Jr,column:zr,rowSpan:Gr,columnSpan:tn}}xt.normalizeConfig=be;function st(jr){return Math.max(0,Math.floor(jr))}xt.clampValue=st;function ft(jr,Jr){let zr=xt.cellConfigProperty.get(jr.widget),Gr=xt.cellConfigProperty.get(Jr.widget);return zr.rowSpan-Gr.rowSpan}xt.rowSpanCmp=ft;function Lt(jr,Jr){let zr=xt.cellConfigProperty.get(jr.widget),Gr=xt.cellConfigProperty.get(Jr.widget);return zr.columnSpan-Gr.columnSpan}xt.columnSpanCmp=Lt;function Xt(jr,Jr){for(Jr=Math.max(1,Math.floor(Jr));jr.lengthJr&&(jr.length=Jr)}xt.reallocSizers=Xt;function Hr(jr,Jr,zr,Gr){if(zr=Gr)return;let Yr=(Gr-tn)/(zr-Jr+1);for(let Nr=Jr;Nr<=zr;++Nr)jr[Nr].minSize+=Yr}xt.distributeMin=Hr;function Cr(jr){jr.parent&&jr.parent.layout instanceof z0&&jr.parent.fit()}})(Hc||(Hc={}));var xg=class xt extends to{constructor(be={}){super({node:wg.createNode()}),this._activeIndex=-1,this._tabFocusIndex=0,this._menus=[],this._childMenu=null,this._overflowMenu=null,this._menuItemSizes=[],this._overflowIndex=-1,this.addClass("lm-MenuBar"),this.setFlag(to.Flag.DisallowLayout),this.renderer=be.renderer||xt.defaultRenderer,this._forceItemsPosition=be.forceItemsPosition||{forceX:!0,forceY:!0},this._overflowMenuOptions=be.overflowMenuOptions||{isVisible:!0}}dispose(){this._closeChildMenu(),this._menus.length=0,super.dispose()}get childMenu(){return this._childMenu}get overflowIndex(){return this._overflowIndex}get overflowMenu(){return this._overflowMenu}get contentNode(){return this.node.getElementsByClassName("lm-MenuBar-content")[0]}get activeMenu(){return this._menus[this._activeIndex]||null}set activeMenu(be){this.activeIndex=be?this._menus.indexOf(be):-1}get activeIndex(){return this._activeIndex}set activeIndex(be){(be<0||be>=this._menus.length)&&(be=-1),be>-1&&this._menus[be].items.length===0&&(be=-1),this._activeIndex!==be&&(this._activeIndex=be,this.update())}get menus(){return this._menus}openActiveMenu(){this._activeIndex!==-1&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))}addMenu(be,st=!0){this.insertMenu(this._menus.length,be,st)}insertMenu(be,st,ft=!0){this._closeChildMenu();let Lt=this._menus.indexOf(st),Xt=Math.max(0,Math.min(be,this._menus.length));if(Lt===-1){Fi.ArrayExt.insert(this._menus,Xt,st),st.addClass("lm-MenuBar-menu"),st.aboutToClose.connect(this._onMenuAboutToClose,this),st.menuRequested.connect(this._onMenuMenuRequested,this),st.title.changed.connect(this._onTitleChanged,this),ft&&this.update();return}Xt===this._menus.length&&Xt--,Lt!==Xt&&(Fi.ArrayExt.move(this._menus,Lt,Xt),ft&&this.update())}removeMenu(be,st=!0){this.removeMenuAt(this._menus.indexOf(be),st)}removeMenuAt(be,st=!0){this._closeChildMenu();let ft=Fi.ArrayExt.removeAt(this._menus,be);ft&&(ft.aboutToClose.disconnect(this._onMenuAboutToClose,this),ft.menuRequested.disconnect(this._onMenuMenuRequested,this),ft.title.changed.disconnect(this._onTitleChanged,this),ft.removeClass("lm-MenuBar-menu"),st&&this.update())}clearMenus(){if(this._menus.length!==0){this._closeChildMenu();for(let be of this._menus)be.aboutToClose.disconnect(this._onMenuAboutToClose,this),be.menuRequested.disconnect(this._onMenuMenuRequested,this),be.title.changed.disconnect(this._onTitleChanged,this),be.removeClass("lm-MenuBar-menu");this._menus.length=0,this.update()}}handleEvent(be){switch(be.type){case"keydown":this._evtKeyDown(be);break;case"mousedown":this._evtMouseDown(be);break;case"mousemove":this._evtMouseMove(be);break;case"focusout":this._evtFocusOut(be);break;case"contextmenu":be.preventDefault(),be.stopPropagation();break}}onBeforeAttach(be){this.node.addEventListener("keydown",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("focusout",this),this.node.addEventListener("contextmenu",this)}onAfterDetach(be){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("focusout",this),this.node.removeEventListener("contextmenu",this),this._closeChildMenu()}onActivateRequest(be){this.isAttached&&this._focusItemAt(0)}onResize(be){this.update(),super.onResize(be)}onUpdateRequest(be){var st;let ft=this._menus,Lt=this.renderer,Xt=this._activeIndex,Hr=this._tabFocusIndex>=0&&this._tabFocusIndex-1?this._overflowIndex:ft.length,jr=0,Jr=!1;Cr=this._overflowMenu!==null?Cr-1:Cr;let zr=new Array(Cr);for(let Gr=0;Gr{this._tabFocusIndex=Gr,this.activeIndex=Gr}}),jr+=this._menuItemSizes[Gr],ft[Gr].title.label===this._overflowMenuOptions.title&&(Jr=!0,Cr--);if(this._overflowMenuOptions.isVisible){if(this._overflowIndex>-1&&!Jr){if(this._overflowMenu===null){let Gr=(st=this._overflowMenuOptions.title)!==null&&st!==void 0?st:"...";this._overflowMenu=new wv({commands:new cd}),this._overflowMenu.title.label=Gr,this._overflowMenu.title.mnemonic=0,this.addMenu(this._overflowMenu,!1)}for(let Gr=ft.length-2;Gr>=Cr;Gr--){let tn=this.menus[Gr];tn.title.mnemonic=0,this._overflowMenu.insertItem(0,{type:"submenu",submenu:tn}),this.removeMenu(tn,!1)}zr[Cr]=Lt.renderItem({title:this._overflowMenu.title,active:Cr===Xt&&ft[Cr].items.length!==0,tabbable:Cr===Hr,disabled:ft[Cr].items.length===0,onfocus:()=>{this._tabFocusIndex=Cr,this.activeIndex=Cr}}),Cr++}else if(this._overflowMenu!==null){let Gr=this._overflowMenu.items,tn=this.node.offsetWidth,Yr=this._overflowMenu.items.length;for(let Nr=0;Nrthis._menuItemSizes[Qr]){let En=Gr[0].submenu;this._overflowMenu.removeItemAt(0),this.insertMenu(Cr,En,!1),zr[Cr]=Lt.renderItem({title:En.title,active:!1,tabbable:Cr===Hr,disabled:ft[Cr].items.length===0,onfocus:()=>{this._tabFocusIndex=Cr,this.activeIndex=Cr}}),Cr++}}this._overflowMenu.items.length===0&&(this.removeMenu(this._overflowMenu,!1),zr.pop(),this._overflowMenu=null,this._overflowIndex=-1)}}fd.render(zr,this.contentNode),this._updateOverflowIndex()}_updateOverflowIndex(){if(!this._overflowMenuOptions.isVisible)return;let be=this.contentNode.childNodes,st=this.node.offsetWidth,ft=0,Lt=-1,Xt=be.length;if(this._menuItemSizes.length==0)for(let Hr=0;Hrst&&Lt===-1&&(Lt=Hr)}else for(let Hr=0;Hrst){Lt=Hr;break}this._overflowIndex=Lt}_evtKeyDown(be){let st=be.keyCode;if(st===9){this.activeIndex=-1;return}if(be.preventDefault(),be.stopPropagation(),st===13||st===32||st===38||st===40){if(this.activeIndex=this._tabFocusIndex,this.activeIndex!==this._tabFocusIndex)return;this.openActiveMenu();return}if(st===27){this._closeChildMenu(),this._focusItemAt(this.activeIndex);return}if(st===37||st===39){let Hr=st===37?-1:1,Cr=this._tabFocusIndex+Hr,jr=this._menus.length;for(let Jr=0;JrRl.hitTest(ft,be.clientX,be.clientY));if(st===-1){this._closeChildMenu();return}if(be.button===0)if(this._childMenu)this._closeChildMenu(),this.activeIndex=st;else{be.preventDefault();let ft=this._positionForMenu(st);wv.saveWindowData(),this.activeIndex=st,this._openChildMenu(ft)}}_evtMouseMove(be){let st=Fi.ArrayExt.findFirstIndex(this.contentNode.children,Lt=>Rl.hitTest(Lt,be.clientX,be.clientY));if(st===this._activeIndex||st===-1&&this._childMenu)return;let ft=st>=0&&this._childMenu?this._positionForMenu(st):null;wv.saveWindowData(),this.activeIndex=st,ft&&this._openChildMenu(ft)}_positionForMenu(be){let st=this.contentNode.children[be],{left:ft,bottom:Lt}=st.getBoundingClientRect();return{top:Lt,left:ft}}_evtFocusOut(be){!this._childMenu&&!this.node.contains(be.relatedTarget)&&(this.activeIndex=-1)}_focusItemAt(be){let st=this.contentNode.childNodes[be];st&&st.focus()}_openChildMenu(be={}){let st=this.activeMenu;if(!st){this._closeChildMenu();return}let ft=this._childMenu;if(ft===st)return;this._childMenu=st,ft?ft.close():document.addEventListener("mousedown",this,!0),this._tabFocusIndex=this.activeIndex,$i.sendMessage(this,to.Msg.UpdateRequest);let{left:Lt,top:Xt}=be;(typeof Lt>"u"||typeof Xt>"u")&&({left:Lt,top:Xt}=this._positionForMenu(this._activeIndex)),ft||this.addClass("lm-mod-active"),st.items.length>0&&st.open(Lt,Xt,this._forceItemsPosition)}_closeChildMenu(){if(!this._childMenu)return;this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0);let be=this._childMenu;this._childMenu=null,be.close(),this.activeIndex=-1}_onMenuAboutToClose(be){be===this._childMenu&&(this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)}_onMenuMenuRequested(be,st){if(be!==this._childMenu)return;let ft=this._activeIndex,Lt=this._menus.length;switch(st){case"next":this.activeIndex=ft===Lt-1?0:ft+1;break;case"previous":this.activeIndex=ft===0?Lt-1:ft-1;break}this.openActiveMenu()}_onTitleChanged(){this.update()}};(function(xt){class be{renderItem(ft){let Lt=this.createItemClass(ft),Xt=this.createItemDataset(ft),Hr=this.createItemARIA(ft);return Sl.li({className:Lt,dataset:Xt,...ft.disabled?{}:{tabindex:ft.tabbable?"0":"-1"},onfocus:ft.onfocus,...Hr},this.renderIcon(ft),this.renderLabel(ft))}renderIcon(ft){let Lt=this.createIconClass(ft);return Sl.div({className:Lt},ft.title.icon,ft.title.iconLabel)}renderLabel(ft){let Lt=this.formatLabel(ft);return Sl.div({className:"lm-MenuBar-itemLabel"},Lt)}createItemClass(ft){let Lt="lm-MenuBar-item";return ft.title.className&&(Lt+=` ${ft.title.className}`),ft.active&&!ft.disabled&&(Lt+=" lm-mod-active"),Lt}createItemDataset(ft){return ft.title.dataset}createItemARIA(ft){return{role:"menuitem","aria-haspopup":"true","aria-disabled":ft.disabled?"true":"false"}}createIconClass(ft){let Lt="lm-MenuBar-itemIcon",Xt=ft.title.iconClass;return Xt?`${Lt} ${Xt}`:Lt}formatLabel(ft){let{label:Lt,mnemonic:Xt}=ft.title;if(Xt<0||Xt>=Lt.length)return Lt;let Hr=Lt.slice(0,Xt),Cr=Lt.slice(Xt+1),jr=Lt[Xt],Jr=Sl.span({className:"lm-MenuBar-itemMnemonic"},jr);return[Hr,Jr,Cr]}}xt.Renderer=be,xt.defaultRenderer=new be})(xg||(xg={}));var wg;(function(xt){function be(){let ft=document.createElement("div"),Lt=document.createElement("ul");return Lt.className="lm-MenuBar-content",ft.appendChild(Lt),Lt.setAttribute("role","menubar"),ft}xt.createNode=be;function st(ft,Lt,Xt){let Hr=-1,Cr=-1,jr=!1,Jr=Lt.toUpperCase();for(let zr=0,Gr=ft.length;zr=0&&Nr1&&this.widgets.forEach(st=>{st.hiddenMode=this._hiddenMode}))}dispose(){for(let be of this._items)be.dispose();this._box=null,this._items.length=0,super.dispose()}attachWidget(be,st){this._hiddenMode===to.HiddenMode.Scale&&this._items.length>0?(this._items.length===1&&(this.widgets[0].hiddenMode=to.HiddenMode.Scale),st.hiddenMode=to.HiddenMode.Scale):st.hiddenMode=to.HiddenMode.Display,Fi.ArrayExt.insert(this._items,be,new Tv(st)),this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeAttach),this.parent.node.appendChild(st.node),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterAttach),this.parent.fit()}moveWidget(be,st,ft){Fi.ArrayExt.move(this._items,be,st),this.parent.update()}detachWidget(be,st){let ft=Fi.ArrayExt.removeAt(this._items,be);this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeDetach),this.parent.node.removeChild(st.node),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterDetach),ft.widget.node.style.zIndex="",this._hiddenMode===to.HiddenMode.Scale&&(st.hiddenMode=to.HiddenMode.Display,this._items.length===1&&(this._items[0].widget.hiddenMode=to.HiddenMode.Display)),ft.dispose(),this.parent.fit()}onBeforeShow(be){super.onBeforeShow(be),this.parent.update()}onBeforeAttach(be){super.onBeforeAttach(be),this.parent.fit()}onChildShown(be){this.parent.fit()}onChildHidden(be){this.parent.fit()}onResize(be){this.parent.isVisible&&this._update(be.width,be.height)}onUpdateRequest(be){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(be){this.parent.isAttached&&this._fit()}_fit(){let be=0,st=0;for(let Xt=0,Hr=this._items.length;Xt{this.createGraph(this._model)})}renderModel(be){if(this.hasGraphElement())return Promise.resolve();this._model=be;let st=be.data["image/png"];return st!=null?(this.updateImage(st),Promise.resolve()):this.createGraph(be)}hasGraphElement(){return this.node.querySelector(".plot-container")!==null}updateImage(be){this.hideGraph(),this._img_el.src="data:image/png;base64,"+be,this.showImage()}hideGraph(){let be=this.node.querySelector(".plot-container");be!=null&&(be.style.display="none")}showGraph(){let be=this.node.querySelector(".plot-container");be!=null&&(be.style.display="block")}hideImage(){let be=this.node.querySelector(".plot-img");be!=null&&(be.style.display="none")}showImage(){let be=this.node.querySelector(".plot-img");be!=null&&(be.style.display="block")}createGraph(be){let{data:st,layout:ft,frames:Lt,config:Xt}=be.data[this._mimeType];return ft.height||(ft.height=360),(async()=>(xt.Plotly===null&&(xt.Plotly=await Promise.resolve().then(()=>sd(fA())),xt._resolveLoadingPlotly()),xt.loadingPlotly))().then(()=>xt.Plotly.react(this.node,st,ft,Xt)).then(Cr=>{this.showGraph(),this.hideImage(),this.update(),Lt&&xt.Plotly.addFrames(this.node,Lt),this.node.offsetWidth>0&&this.node.offsetHeight>0&&xt.Plotly.toImage(Cr,{format:"png",width:this.node.offsetWidth,height:this.node.offsetHeight}).then(jr=>{let Jr=jr.split(",")[1];be.data["image/png"]!==Jr&&be.setData({data:{...be.data,"image/png":Jr}})}),this.node.on("plotly_webglcontextlost",()=>{let jr=be.data["image/png"];if(jr!=null)return this.updateImage(jr),Promise.resolve()})})}onAfterShow(be){this.update()}onResize(be){this.update()}onUpdateRequest(be){xt.Plotly&&this.isVisible&&this.hasGraphElement()&&xt.Plotly.redraw(this.node).then(()=>{xt.Plotly.Plots.resize(this.node)})}static{this.Plotly=null}static{this.loadingPlotly=new Promise(be=>{xt._resolveLoadingPlotly=be})}},tz={safe:!0,mimeTypes:[hA],createRenderer:xt=>new db(xt)},rz=[{id:"@jupyterlab/plotly-extension:factory",rendererFactory:tz,rank:2,dataType:"json",fileTypes:[{name:"plotly",mimeTypes:[hA],extensions:[".plotly",".plotly.json"],iconClass:ez}],documentWidgetFactoryOptions:{name:"Plotly",primaryFileType:"plotly",fileTypes:["plotly","json"],defaultFor:["plotly"]}}],sB=rz;export{hA as MIME_TYPE,db as RenderedPlotly,sB as default,tz as rendererFactory}; +${Ne.shaderPreludeCode.vertexSource}`,define:Ne.shaderDefine},defaultProjectionData:lt},Ft=De.renderingMode?De.renderingMode:"2d";if(de.renderPass==="offscreen"){let Gt=De.prerender;Gt&&(de.setCustomLayerDefaults(),_e.setColorMode(de.colorModeForRenderPass()),Gt.call(De,_e.gl,ct),_e.setDirty(),de.setBaseState())}else if(de.renderPass==="translucent"){de.setCustomLayerDefaults(),_e.setColorMode(de.colorModeForRenderPass()),_e.setStencilMode(go.disabled);let Gt=Ft==="3d"?de.getDepthModeFor3D():de.getDepthModeForSublayer(0,lo.ReadOnly);_e.setDepthMode(Gt),De.render(_e.gl,ct),_e.setDirty(),de.setBaseState(),_e.bindFramebuffer.set(null)}},debug:function(de,y,O){for(let ie of O)Kl(de,y,ie)},debugPadding:function(de){let y=de.transform.padding;Ws(de,de.transform.height-(y.top||0),3,Rs),Ws(de,y.bottom||0,3,ps),Dl(de,y.left||0,3,vi),Dl(de,de.transform.width-(y.right||0),3,Xo);let O=de.transform.centerPoint;(function(ie,ce,_e,De){Nl(ie,ce-1,_e-10,2,20,De),Nl(ie,ce-10,_e-1,20,2,De)})(de,O.x,de.transform.height-O.y,Ss)},terrainDepth:function(de,y){let O=de.context,ie=O.gl,ce=de.transform,_e=wo.unblended,De=new lo(ie.LEQUAL,lo.ReadWrite,[0,1]),Ne=y.tileManager.getRenderableTiles(),Ye=de.useProgram("terrainDepth");O.bindFramebuffer.set(y.getFramebuffer("depth").framebuffer),O.viewport.set([0,0,de.width/devicePixelRatio,de.height/devicePixelRatio]),O.clear({color:e.bo.transparent,depth:1});for(let lt of Ne){let ct=y.getTerrainMesh(lt.tileID),Ft=y.getTerrainData(lt.tileID),Gt=ce.getProjectionData({overscaledTileID:lt.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),Jt={u_ele_delta:y.getMeshFrameDelta(ce.zoom)};Ye.draw(O,ie.TRIANGLES,De,go.disabled,_e,Di.backCCW,Jt,Ft,Gt,"terrain",ct.vertexBuffer,ct.indexBuffer,ct.segments)}O.bindFramebuffer.set(null),O.viewport.set([0,0,de.width,de.height])},terrainCoords:function(de,y){let O=de.context,ie=O.gl,ce=de.transform,_e=wo.unblended,De=new lo(ie.LEQUAL,lo.ReadWrite,[0,1]),Ne=y.getCoordsTexture(),Ye=y.tileManager.getRenderableTiles(),lt=de.useProgram("terrainCoords");O.bindFramebuffer.set(y.getFramebuffer("coords").framebuffer),O.viewport.set([0,0,de.width/devicePixelRatio,de.height/devicePixelRatio]),O.clear({color:e.bo.transparent,depth:1}),y.coordsIndex=[];for(let ct of Ye){let Ft=y.getTerrainMesh(ct.tileID),Gt=y.getTerrainData(ct.tileID);O.activeTexture.set(ie.TEXTURE0),ie.bindTexture(ie.TEXTURE_2D,Ne.texture);let Jt={u_terrain_coords_id:(255-y.coordsIndex.length)/255,u_texture:0,u_ele_delta:y.getMeshFrameDelta(ce.zoom)},it=ce.getProjectionData({overscaledTileID:ct.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});lt.draw(O,ie.TRIANGLES,De,go.disabled,_e,Di.backCCW,Jt,Gt,it,"terrain",Ft.vertexBuffer,Ft.indexBuffer,Ft.segments),y.coordsIndex.push(ct.tileID.key)}O.bindFramebuffer.set(null),O.viewport.set([0,0,de.width,de.height])}};class bu{constructor(y,O){this.drawFunctions=zu,this.context=new rr(y),this.transform=O,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:e.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Sr.maxOverzooming+Sr.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ro}resize(y,O,ie){if(this.width=Math.floor(y*ie),this.height=Math.floor(O*ie),this.pixelRatio=ie,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let ce of this.style._order)this.style._layers[ce].resize()}setup(){let y=this.context,O=new e.aU;O.emplaceBack(0,0),O.emplaceBack(e.a6,0),O.emplaceBack(0,e.a6),O.emplaceBack(e.a6,e.a6),this.tileExtentBuffer=y.createVertexBuffer(O,xo.members),this.tileExtentSegments=e.aV.simpleSegment(0,0,4,2);let ie=new e.aU;ie.emplaceBack(0,0),ie.emplaceBack(e.a6,0),ie.emplaceBack(0,e.a6),ie.emplaceBack(e.a6,e.a6),this.debugBuffer=y.createVertexBuffer(ie,xo.members),this.debugSegments=e.aV.simpleSegment(0,0,4,5);let ce=new e.ch;ce.emplaceBack(0,0,0,0),ce.emplaceBack(e.a6,0,e.a6,0),ce.emplaceBack(0,e.a6,0,e.a6),ce.emplaceBack(e.a6,e.a6,e.a6,e.a6),this.rasterBoundsBuffer=y.createVertexBuffer(ce,fc.members),this.rasterBoundsSegments=e.aV.simpleSegment(0,0,4,2);let _e=new e.aU;_e.emplaceBack(0,0),_e.emplaceBack(e.a6,0),_e.emplaceBack(0,e.a6),_e.emplaceBack(e.a6,e.a6),this.rasterBoundsBufferPosOnly=y.createVertexBuffer(_e,xo.members),this.rasterBoundsSegmentsPosOnly=e.aV.simpleSegment(0,0,4,5);let De=new e.aU;De.emplaceBack(0,0),De.emplaceBack(1,0),De.emplaceBack(0,1),De.emplaceBack(1,1),this.viewportBuffer=y.createVertexBuffer(De,xo.members),this.viewportSegments=e.aV.simpleSegment(0,0,4,2);let Ne=new e.ci;Ne.emplaceBack(0),Ne.emplaceBack(1),Ne.emplaceBack(3),Ne.emplaceBack(2),Ne.emplaceBack(0),this.tileBorderIndexBuffer=y.createIndexBuffer(Ne);let Ye=new e.aW;Ye.emplaceBack(1,0,2),Ye.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=y.createIndexBuffer(Ye);let lt=this.context.gl;this.stencilClearMode=new go({func:lt.ALWAYS,mask:0},0,255,lt.ZERO,lt.ZERO,lt.ZERO),this.tileExtentMesh=new fi(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let y=this.context,O=y.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let ie=e.O();e.c7(ie,0,this.width,this.height,0,0,1),e.S(ie,ie,[O.drawingBufferWidth,O.drawingBufferHeight,0]);let ce={mainMatrix:ie,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:ie};this.useProgram("clippingMask",null,!0).draw(y,O.TRIANGLES,lo.disabled,this.stencilClearMode,wo.disabled,Di.disabled,null,null,ce,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(y,O,ie){if(this.currentStencilSource===y.source||!y.isTileClipped()||!O?.length)return;this.currentStencilSource=y.source,this.nextStencilID+O.length>256&&this.clearStencil();let ce=this.context;ce.setColorMode(wo.disabled),ce.setDepthMode(lo.disabled);let _e={};for(let De of O)_e[De.key]=this.nextStencilID++;this._renderTileMasks(_e,O,ie,!0),this._renderTileMasks(_e,O,ie,!1),this._tileClippingMaskIDs=_e}_renderTileMasks(y,O,ie,ce){var _e;let De=this.context,Ne=De.gl,Ye=this.style.projection,lt=this.transform,ct=this.useProgram("clippingMask");for(let Ft of O){let Gt=y[Ft.key],Jt=(_e=this.style.map.terrain)===null||_e===void 0?void 0:_e.getTerrainData(Ft),it=Ye.getMeshFromTileID(this.context,Ft.canonical,ce,!0,"stencil"),Rt=lt.getProjectionData({overscaledTileID:Ft,applyGlobeMatrix:!ie,applyTerrainMatrix:!0});ct.draw(De,Ne.TRIANGLES,lo.disabled,new go({func:Ne.ALWAYS,mask:0},Gt,255,Ne.KEEP,Ne.KEEP,Ne.REPLACE),wo.disabled,ie?Di.disabled:Di.backCCW,null,Jt,Rt,"$clipping",it.vertexBuffer,it.indexBuffer,it.segments)}}_renderTilesDepthBuffer(){var y;let O=this.context,ie=O.gl,ce=this.style.projection,_e=this.transform,De=this.useProgram("depth"),Ne=this.getDepthModeFor3D(),Ye=Ze(_e,{tileSize:_e.tileSize});for(let lt of Ye){let ct=(y=this.style.map.terrain)===null||y===void 0?void 0:y.getTerrainData(lt),Ft=ce.getMeshFromTileID(this.context,lt.canonical,!0,!0,"raster"),Gt=_e.getProjectionData({overscaledTileID:lt,applyGlobeMatrix:!0,applyTerrainMatrix:!0});De.draw(O,ie.TRIANGLES,Ne,go.disabled,wo.disabled,Di.backCCW,null,ct,Gt,"$clipping",Ft.vertexBuffer,Ft.indexBuffer,Ft.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let y=this.nextStencilID++,O=this.context.gl;return new go({func:O.NOTEQUAL,mask:255},y,255,O.KEEP,O.KEEP,O.REPLACE)}stencilModeForClipping(y){let O=this.context.gl;return new go({func:O.EQUAL,mask:255},this._tileClippingMaskIDs[y.key],0,O.KEEP,O.KEEP,O.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(y){let O=this.context.gl,ie=y.sort((De,Ne)=>Ne.overscaledZ-De.overscaledZ),ce=ie[ie.length-1].overscaledZ,_e=ie[0].overscaledZ-ce+1;if(_e>1){this.currentStencilSource=void 0,this.nextStencilID+_e>256&&this.clearStencil();let De={};for(let Ne=0;Ne<_e;Ne++)De[Ne+ce]=new go({func:O.GEQUAL,mask:255},Ne+this.nextStencilID,255,O.KEEP,O.KEEP,O.REPLACE);return this.nextStencilID+=_e,[De,ie]}return[{[ce]:go.disabled},ie]}stencilConfigForOverlapTwoPass(y){let O=this.context.gl,ie=y.sort((De,Ne)=>Ne.overscaledZ-De.overscaledZ),ce=ie[ie.length-1].overscaledZ,_e=ie[0].overscaledZ-ce+1;if(this.clearStencil(),_e>1){let De={},Ne={};for(let Ye=0;Ye<_e;Ye++)De[Ye+ce]=new go({func:O.GREATER,mask:255},_e+1+Ye,255,O.KEEP,O.KEEP,O.REPLACE),Ne[Ye+ce]=new go({func:O.GREATER,mask:255},1+Ye,255,O.KEEP,O.KEEP,O.REPLACE);return this.nextStencilID=2*_e+1,[De,Ne,ie]}return this.nextStencilID=3,[{[ce]:new go({func:O.GREATER,mask:255},2,255,O.KEEP,O.KEEP,O.REPLACE)},{[ce]:new go({func:O.GREATER,mask:255},1,255,O.KEEP,O.KEEP,O.REPLACE)},ie]}colorModeForRenderPass(){let y=this.context.gl;return this._showOverdrawInspector?new wo([y.CONSTANT_COLOR,y.ONE],new e.bo(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?wo.unblended:wo.alphaBlended}getDepthModeForSublayer(y,O,ie){if(!this.opaquePassEnabledForLayer())return lo.disabled;let ce=1-((1+this.currentLayer)*this.numSublayers+y)*this.depthEpsilon;return new lo(ie||this.context.gl.LEQUAL,O,[ce,ce])}getDepthModeFor3D(){return new lo(this.context.gl.LEQUAL,lo.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer0};for(let Jt in Ne){let it=Ne[Jt];it.used&&it.prepare(this.context),Ye[Jt]=it.getVisibleCoordinates(!1),lt[Jt]=Ye[Jt].slice().reverse(),ct[Jt]=it.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Jt=0;Jtthis.useProgram(Jt)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:O.showOverdrawInspector?e.bo.black:e.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=O.showOverdrawInspector,this.depthRangeFor3D=[0,1-(y._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=De.length-1;this.currentLayer>=0;this.currentLayer--){let Jt=this.style._layers[De[this.currentLayer]],it=Ne[Jt.source],Rt=Ye[Jt.source];this._renderTileClippingMasks(Jt,Rt,!1),this.renderLayer(this,it,Jt,Rt,Ft)}this.renderPass="translucent";let Gt=!1;for(this.currentLayer=0;this.currentLayermr.source&&!mr.isHidden(Rt)?[it.tileManagers[mr.source]]:[]),vr=or.filter(mr=>mr.getSource().type==="vector"),Ar=or.filter(mr=>mr.getSource().type!=="vector"),dr=mr=>{(!qt||qt.getSource().maxzoom0?O.pop():null}isPatternMissing(y){if(!y)return!1;if(!y.from||!y.to)return!0;let O=this.imageManager.getPattern(y.from.toString()),ie=this.imageManager.getPattern(y.to.toString());return!O||!ie}useProgram(y,O,ie=!1,ce=[]){var _e;this.cache||(this.cache={});let De=!!this.style.map.terrain,Ne=this.style.projection,Ye=ie?Gi.projectionMercator:Ne.shaderPreludeCode,lt=ie?zi:Ne.shaderDefine,ct=y+(O?O.cacheKey:"")+`/${ie?so:Ne.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(De?"/terrain":"")+(ce?`/${ce.join("/")}`:"");return(_e=this.cache)[ct]||(_e[ct]=new Lf(this.context,Gi[y],O,pf[y],this._showOverdrawInspector,De,Ye,lt,ce)),this.cache[ct]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let y=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(y.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new e.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var y,O;if(this._tileTextures){for(let ie in this._tileTextures){let ce=this._tileTextures[ie];if(ce)for(let _e of ce)_e.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((y=this.tileExtentMesh.vertexBuffer)===null||y===void 0||y.destroy()),this.tileExtentMesh&&((O=this.tileExtentMesh.indexBuffer)===null||O===void 0||O.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let ie in this.cache){let ce=this.cache[ie];ce?.program&&this.context.gl.deleteProgram(ce.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:y,drawingBufferHeight:O}=this.context.gl;return this.width!==y||this.height!==O}}function ic(de,y){let O,ie=!1,ce=null,_e=()=>{ce=null,ie&&(de(...O),ce=setTimeout(_e,y),ie=!1)};return(...De)=>(ie=!0,O=De,ce||_e(),ce)}bu.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class Oc{constructor(y){this._getCurrentHash=()=>{let O=window.location.hash.replace("#","");if(this._hashName){let ie,ce=O.split("&").map(_e=>_e.split("="));for(let _e of ce)_e[0]===this._hashName&&(ie=_e);return(ie&&ie[1]||"").split("/")}return O.split("/")},this._onHashChange=()=>{let O=this._getCurrentHash();if(!this._isValidHash(O))return!1;let ie=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(O[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+O[2],+O[1]],zoom:+O[0],bearing:ie,pitch:+(O[4]||0)}),!0},this._updateHashUnthrottled=()=>{let O=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,O)},this._removeHash=()=>{let O=this._getCurrentHash();if(O.length===0)return;let ie=O.join("/"),ce=ie;ce.split("&").length>0&&(ce=ce.split("&")[0]),this._hashName&&(ce=`${this._hashName}=${ie}`);let _e=window.location.hash.replace(ce,"");_e.startsWith("#&")?_e=_e.slice(0,1)+_e.slice(2):_e==="#"&&(_e="");let De=window.location.href.replace(/(#.+)?$/,_e);De=De.replace("&&","&"),window.history.replaceState(window.history.state,null,De)},this._updateHash=ic(this._updateHashUnthrottled,300),this._hashName=y&&encodeURIComponent(y)}addTo(y){return this._map=y,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(y){let O=this._map.getCenter(),ie=Math.round(100*this._map.getZoom())/100,ce=Math.ceil((ie*Math.LN2+Math.log(512/360/.5))/Math.LN10),_e=Math.pow(10,ce),De=Math.round(O.lng*_e)/_e,Ne=Math.round(O.lat*_e)/_e,Ye=this._map.getBearing(),lt=this._map.getPitch(),ct="";if(ct+=y?`/${De}/${Ne}/${ie}`:`${ie}/${Ne}/${De}`,(Ye||lt)&&(ct+="/"+Math.round(10*Ye)/10),lt&&(ct+=`/${Math.round(lt)}`),this._hashName){let Ft=this._hashName,Gt=!1,Jt=window.location.hash.slice(1).split("&").map(it=>{let Rt=it.split("=")[0];return Rt===Ft?(Gt=!0,`${Rt}=${ct}`):it}).filter(it=>it);return Gt||Jt.push(`${Ft}=${ct}`),`#${Jt.join("&")}`}return`#${ct}`}_isValidHash(y){if(y.length<3||y.some(isNaN))return!1;try{new e.W(+y[2],+y[1])}catch{return!1}let O=+y[0],ie=+(y[3]||0),ce=+(y[4]||0);return O>=this._map.getMinZoom()&&O<=this._map.getMaxZoom()&&ie>=-180&&ie<=180&&ce>=this._map.getMinPitch()&&ce<=this._map.getMaxPitch()}}let Zu={linearity:.3,easing:e.cv(0,0,.3,1)},hu=e.e({deceleration:2500,maxSpeed:1400},Zu),Jl=e.e({deceleration:20,maxSpeed:1400},Zu),Ql=e.e({deceleration:1e3,maxSpeed:360},Zu),xu=e.e({deceleration:1e3,maxSpeed:90},Zu),rf=e.e({deceleration:1e3,maxSpeed:360},Zu);class Ff{constructor(y){this._map=y,this.clear()}clear(){this._inertiaBuffer=[]}record(y){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:g(),settings:y})}_drainInertiaBuffer(){let y=this._inertiaBuffer,O=g();for(;y.length>0&&O-y[0].time>160;)y.shift()}_onMoveEnd(y){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let O={zoom:0,bearing:0,pitch:0,roll:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:_e}of this._inertiaBuffer)O.zoom+=_e.zoomDelta||0,O.bearing+=_e.bearingDelta||0,O.pitch+=_e.pitchDelta||0,O.roll+=_e.rollDelta||0,_e.panDelta&&O.pan._add(_e.panDelta),_e.around&&(O.around=_e.around),_e.pinchAround&&(O.pinchAround=_e.pinchAround);let ie=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,ce={};if(O.pan.mag()){let _e=rl(O.pan.mag(),ie,e.e({},hu,y||{})),De=O.pan.mult(_e.amount/O.pan.mag()),Ne=this._map.cameraHelper.handlePanInertia(De,this._map.transform);ce.center=Ne.easingCenter,ce.offset=Ne.easingOffset,xc(ce,_e)}if(O.zoom){let _e=rl(O.zoom,ie,Jl);ce.zoom=e.cw(this._map.transform.zoom+_e.amount,this._map.getZoomSnap(),_e.amount),xc(ce,_e)}if(O.bearing){let _e=rl(O.bearing,ie,Ql);ce.bearing=this._map.transform.bearing+e.al(_e.amount,-179,179),xc(ce,_e)}if(O.pitch){let _e=rl(O.pitch,ie,xu);ce.pitch=this._map.transform.pitch+_e.amount,xc(ce,_e)}if(O.roll){let _e=rl(O.roll,ie,rf);ce.roll=this._map.transform.roll+e.al(_e.amount,-179,179),xc(ce,_e)}if(ce.zoom||ce.bearing){let _e=O.pinchAround===void 0?O.around:O.pinchAround;ce.around=_e?this._map.unproject(_e):this._map.getCenter()}return this.clear(),e.e(ce,{noMoveStart:!0})}}function xc(de,y){(!de.duration||de.durationO.unproject(Ye)),Ne=_e.reduce((Ye,lt,ct,Ft)=>Ye.add(lt.div(Ft.length)),new e.P(0,0));super(y,{points:_e,point:Ne,lngLats:De,lngLat:O.unproject(Ne),originalEvent:ie}),this._defaultPrevented=!1}}class af extends e.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(y,O,ie){super(y,{originalEvent:ie}),this._defaultPrevented=!1}}class jc{constructor(y,O){this._map=y,this._clickTolerance=O.clickTolerance}reset(){delete this._mousedownPos}wheel(y){return this._firePreventable(new af(y.type,this._map,y))}mousedown(y,O){return this._mousedownPos=O,this._firePreventable(new Ol(y.type,this._map,y))}mouseup(y){this._map.fire(new Ol(y.type,this._map,y))}click(y,O){this._mousedownPos&&this._mousedownPos.dist(O)>=this._clickTolerance||this._map.fire(new Ol(y.type,this._map,y))}dblclick(y){return this._firePreventable(new Ol(y.type,this._map,y))}mouseover(y){this._map.fire(new Ol(y.type,this._map,y))}mouseout(y){this._map.fire(new Ol(y.type,this._map,y))}touchstart(y){return this._firePreventable(new Bu(y.type,this._map,y))}touchmove(y){this._map.fire(new Bu(y.type,this._map,y))}touchend(y){this._map.fire(new Bu(y.type,this._map,y))}touchcancel(y){this._map.fire(new Bu(y.type,this._map,y))}_firePreventable(y){if(this._map.fire(y),y.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class wu{constructor(y){this._map=y}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(y){this._map.fire(new Ol(y.type,this._map,y))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Ol("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(y){this._delayContextMenu?this._contextMenuEvent=y:this._ignoreContextMenu||this._map.fire(new Ol(y.type,this._map,y)),this._map.listens("contextmenu")&&y.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class jl{constructor(y){this._map=y}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(y){return this.transform.screenPointToLocation(e.P.convert(y),this._map.terrain)}}class Ul{constructor(y,O){this._map=y,this._tr=new jl(y),this._el=y.getCanvasContainer(),this._container=y.getContainer(),this._clickTolerance=O.clickTolerance||1,O.boxZoom&&typeof O.boxZoom=="object"&&(this._boxZoomEnd=O.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(y,O){this.isEnabled()&&y.shiftKey&&y.button===0&&(m.disableDrag(),this._startPos=this._lastPos=O,this._active=!0)}mousemoveWindow(y,O){if(!this._active)return;let ie=O;if(this._lastPos.equals(ie)||!this._box&&ie.dist(this._startPos)_e.fitScreenCoordinates(ie,ce,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",y)}keydown(y){this._active&&y.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",y))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),m.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(y,O){return this._map.fire(new e.n(y,{originalEvent:O}))}}function Ci(de,y){if(de.length!==y.length)throw new Error(`The number of touches and points are not equal - touches ${de.length}, points ${y.length}`);let O={};for(let ie=0;iethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=y.timeStamp),ie.length===this.numTouches&&(this.centroid=function(ce){let _e=new e.P(0,0);for(let De of ce)_e._add(De);return _e.div(ce.length)}(O),this.touches=Ci(ie,O)))}touchmove(y,O,ie){if(this.aborted||!this.centroid)return;let ce=Ci(ie,O);for(let _e in this.touches){let De=ce[_e];(!De||De.dist(this.touches[_e])>30)&&(this.aborted=!0)}}touchend(y,O,ie){if((!this.centroid||y.timeStamp-this.startTime>500)&&(this.aborted=!0),ie.length===0){let ce=!this.aborted&&this.centroid;if(this.reset(),ce)return ce}}}class Xe{constructor(y){this.singleTap=new eu(y),this.numTaps=y.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(y,O,ie){this.singleTap.touchstart(y,O,ie)}touchmove(y,O,ie){this.singleTap.touchmove(y,O,ie)}touchend(y,O,ie){let ce=this.singleTap.touchend(y,O,ie);if(ce){let _e=y.timeStamp-this.lastTime<500,De=!this.lastTap||this.lastTap.dist(ce)<30;if(_e&&De||this.reset(),this.count++,this.lastTime=y.timeStamp,this.lastTap=ce,this.count===this.numTaps)return this.reset(),ce}}}class rt{constructor(y){this._tr=new jl(y),this._zoomIn=new Xe({numTouches:1,numTaps:2}),this._zoomOut=new Xe({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(y,O,ie){this._zoomIn.touchstart(y,O,ie),this._zoomOut.touchstart(y,O,ie)}touchmove(y,O,ie){this._zoomIn.touchmove(y,O,ie),this._zoomOut.touchmove(y,O,ie)}touchend(y,O,ie){let ce=this._zoomIn.touchend(y,O,ie),_e=this._zoomOut.touchend(y,O,ie),De=this._tr;return ce?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Ne=>Ne.easeTo({duration:300,zoom:e.cw(De.zoom+1,Ne.getZoomSnap()),around:De.unproject(ce)},{originalEvent:y})}):_e?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Ne=>Ne.easeTo({duration:300,zoom:e.cw(De.zoom-1,Ne.getZoomSnap()),around:De.unproject(_e)},{originalEvent:y})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class pt{constructor(y){this._enabled=!!y.enable,this._moveStateManager=y.moveStateManager,this._clickTolerance=y.clickTolerance||1,this._moveFunction=y.move,this._activateOnStart=!!y.activateOnStart,y.assignEvents(this),this.reset()}reset(y){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(y)}_move(...y){let O=this._moveFunction(...y);if(O.bearingDelta||O.pitchDelta||O.rollDelta||O.around||O.panDelta)return this._active=!0,O}dragStart(y,O){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(y)&&(this._moveStateManager.startMove(y),this._lastPoint=Array.isArray(O)?O[0]:O,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(y,O){if(!this.isEnabled())return;let ie=this._lastPoint;if(!ie)return;if(y.preventDefault(),!this._moveStateManager.isValidMoveEvent(y))return void this.reset(y);let ce=Array.isArray(O)?O[0]:O;return!this._moved&&ce.dist(ie)!0}),O=new Dr){this.mouseMoveStateManager=y,this.oneFingerTouchMoveStateManager=O}_executeRelevantHandler(y,O,ie){return y instanceof MouseEvent?O(y):typeof TouchEvent<"u"&&y instanceof TouchEvent?ie(y):void 0}startMove(y){this._executeRelevantHandler(y,O=>{this.mouseMoveStateManager.startMove(O)},O=>{this.oneFingerTouchMoveStateManager.startMove(O)})}endMove(y){this._executeRelevantHandler(y,O=>{this.mouseMoveStateManager.endMove(O)},O=>{this.oneFingerTouchMoveStateManager.endMove(O)})}isValidStartEvent(y){return this._executeRelevantHandler(y,O=>this.mouseMoveStateManager.isValidStartEvent(O),O=>this.oneFingerTouchMoveStateManager.isValidStartEvent(O))}isValidMoveEvent(y){return this._executeRelevantHandler(y,O=>this.mouseMoveStateManager.isValidMoveEvent(O),O=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(O))}isValidEndEvent(y){return this._executeRelevantHandler(y,O=>this.mouseMoveStateManager.isValidEndEvent(O),O=>this.oneFingerTouchMoveStateManager.isValidEndEvent(O))}}let kr=de=>{de.mousedown=de.dragStart,de.mousemoveWindow=de.dragMove,de.mouseup=de.dragEnd,de.contextmenu=y=>{y.preventDefault()}};class Wr{constructor(y,O){this._clickTolerance=y.clickTolerance||1,this._map=O,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(y){return y<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(y,O,ie){return this._calculateTransform(y,O,ie)}touchmove(y,O,ie){if(this._active){if(!this._shouldBePrevented(ie.length))return y.preventDefault(),this._calculateTransform(y,O,ie);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",y)}}touchend(y,O,ie){this._calculateTransform(y,O,ie),this._active&&this._shouldBePrevented(ie.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(y,O,ie){ie.length>0&&(this._active=!0);let ce=Ci(ie,O),_e=new e.P(0,0),De=new e.P(0,0),Ne=0;for(let lt in ce){let ct=ce[lt],Ft=this._touches[lt];Ft&&(_e._add(ct),De._add(ct.sub(Ft)),Ne++,ce[lt]=ct)}if(this._touches=ce,this._shouldBePrevented(Ne)||!De.mag())return;let Ye=De.div(Ne);return this._sum._add(Ye),this._sum.mag()Math.abs(de.x)}class Yi extends oa{constructor(y){super(),this._currentTouchCount=0,this._map=y}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(y,O,ie){super.touchstart(y,O,ie),this._currentTouchCount=ie.length}_start(y){this._lastPoints=y,wi(y[0].sub(y[1]))&&(this._valid=!1)}_move(y,O,ie){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let ce=y[0].sub(this._lastPoints[0]),_e=y[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(ce,_e,ie.timeStamp),this._valid?(this._lastPoints=y,this._active=!0,{pitchDelta:(ce.y+_e.y)/2*-.5}):void 0}gestureBeginsVertically(y,O,ie){if(this._valid!==void 0)return this._valid;let ce=y.mag()>=2,_e=O.mag()>=2;if(!ce&&!_e)return;if(!ce||!_e)return this._firstMove===void 0&&(this._firstMove=ie),ie-this._firstMove<100&&void 0;let De=y.y>0==O.y>0;return wi(y)&&wi(O)&&De}}let Ti={panStep:100,bearingStep:15,pitchStep:10};class _o{constructor(y){this._tr=new jl(y);let O=Ti;this._panStep=O.panStep,this._bearingStep=O.bearingStep,this._pitchStep=O.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(y){if(y.altKey||y.ctrlKey||y.metaKey)return;let O=0,ie=0,ce=0,_e=0,De=0;switch(y.keyCode){case 61:case 107:case 171:case 187:O=1;break;case 189:case 109:case 173:O=-1;break;case 37:y.shiftKey?ie=-1:(y.preventDefault(),_e=-1);break;case 39:y.shiftKey?ie=1:(y.preventDefault(),_e=1);break;case 38:y.shiftKey?ce=1:(y.preventDefault(),De=-1);break;case 40:y.shiftKey?ce=-1:(y.preventDefault(),De=1);break;default:return}return this._rotationDisabled&&(ie=0,ce=0),{cameraAnimation:Ne=>{let Ye=this._tr;Ne.easeTo({duration:300,easeId:"keyboardHandler",easing:bo,zoom:O?e.cw(Ye.zoom+O*(y.shiftKey?2:1),Ne.getZoomSnap()):Ye.zoom,bearing:Ye.bearing+ie*this._bearingStep,pitch:Ye.pitch+ce*this._pitchStep,offset:[-_e*this._panStep,-De*this._panStep],center:Ye.center},{originalEvent:y})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function bo(de){return de*(2-de)}let Zo=4.000244140625,fs=1/450;class Po{constructor(y,O){this._onTimeout=ie=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(ie)},this._map=y,this._tr=new jl(y),this._triggerRenderFrame=O,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=fs}setZoomRate(y){this._defaultZoomRate=y}setWheelZoomRate(y){this._wheelZoomRate=y}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(y){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!y&&y.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(y){return!!this._map.cooperativeGestures.isEnabled()&&!(y.ctrlKey||this._map.cooperativeGestures.isBypassed(y))}wheel(y){if(!this.isEnabled())return;if(this._shouldBePrevented(y))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",y);let O=y.deltaMode===WheelEvent.DOM_DELTA_LINE?40*y.deltaY:y.deltaY,ie=g(),ce=ie-(this._lastWheelEventTime||0);this._lastWheelEventTime=ie,O!==0&&O%Zo==0?this._type="wheel":O!==0&&Math.abs(O)<4?this._type="trackpad":ce>400?(this._type=null,this._lastValue=O,this._timeout=setTimeout(this._onTimeout,40,y)):this._type||(this._type=Math.abs(ce*O)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,O+=this._lastValue)),y.shiftKey&&O&&(O/=4),this._type&&(this._lastWheelEvent=y,this._delta-=O,this._active||this._start(y)),y.preventDefault()}_start(y){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let O=m.mousePos(this._map.getCanvas(),y),ie=this._tr;this._aroundPoint=this._aroundCenter?ie.transform.locationToScreenPoint(e.W.convert(ie.center)):O,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let y=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let Ne=y.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=Ne),typeof this._targetZoom=="number"&&(this._targetZoom+=Ne)}if(this._delta!==0){let Ne=this._type==="wheel"&&Math.abs(this._delta)>Zo?this._wheelZoomRate:this._defaultZoomRate,Ye=2/(1+Math.exp(-Math.abs(this._delta*Ne)));this._delta<0&&Ye!==0&&(Ye=1/Ye);let lt=typeof this._targetZoom!="number"?y.scale:e.ao(this._targetZoom),ct=y.applyConstrain(y.getCameraLngLat(),e.ar(lt*Ye)).zoom,Ft=this._map.getZoomSnap();if(this._type==="wheel"&&Ft>0){let Gt=e.cw(y.zoom,Ft);this._targetZoom=e.cw(ct,Ft,ct-Gt)}else this._targetZoom=ct;this._type==="wheel"&&(this._startZoom=y.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let O=typeof this._targetZoom!="number"?y.zoom:this._targetZoom,ie=this._startZoom,ce=this._easing,_e,De=!1;if(this._type==="wheel"&&ie&&ce){let Ne=g()-this._lastWheelEventTime,Ye=Math.min((Ne+5)/200,1),lt=ce(Ye);_e=e.H.number(ie,O,lt),Ye<1?this._needsRerender=!0:De=!0}else _e=O,De=!0;return this._active=!0,De&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=_e,{noInertia:!0,needsRenderFrame:!De,zoomDelta:_e-y.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(y){let O=e.cy;if(this._prevEase){let ie=this._prevEase,ce=(g()-ie.start)/ie.duration,_e=ie.easing(ce+.01)-ie.easing(ce),De=.27/Math.sqrt(_e*_e+1e-4)*.01,Ne=Math.sqrt(.0729-De*De);O=e.cv(De,Ne,.25,1)}return this._prevEase={start:g(),duration:y,easing:O},O}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Es{constructor(y,O){this._clickZoom=y,this._tapZoom=O}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class cl{constructor(y){this._tr=new jl(y),this.reset()}reset(){this._active=!1}dblclick(y,O){return y.preventDefault(),{cameraAnimation:ie=>{ie.easeTo({duration:300,zoom:e.cw(this._tr.zoom+(y.shiftKey?-1:1),ie.getZoomSnap()),around:this._tr.unproject(O)},{originalEvent:y})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ql{constructor(){this._tap=new Xe({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(y){this._zoomRate=y??1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(y,O,ie){if(!this._swipePoint)if(this._tapTime){let ce=O[0],_e=y.timeStamp-this._tapTime<500,De=this._tapPoint.dist(ce)<30;_e&&De?ie.length>0&&(this._swipePoint=ce,this._swipeTouch=ie[0].identifier):this.reset()}else this._tap.touchstart(y,O,ie)}touchmove(y,O,ie){if(this._tapTime){if(this._swipePoint){if(ie[0].identifier!==this._swipeTouch)return;let ce=O[0],_e=ce.y-this._swipePoint.y;return this._swipePoint=ce,y.preventDefault(),this._active=!0,{zoomDelta:_e/128*this._zoomRate}}}else this._tap.touchmove(y,O,ie)}touchend(y,O,ie){if(this._tapTime)this._swipePoint&&ie.length===0&&this.reset();else{let ce=this._tap.touchend(y,O,ie);ce&&(this._tapTime=y.timeStamp,this._tapPoint=ce)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Js{constructor(y,O,ie){this._el=y,this._mousePan=O,this._touchPan=ie}enable(y){this._inertiaOptions=y||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Tu{constructor(y,O,ie,ce){this._pitchWithRotate=y.pitchWithRotate,this._rollEnabled=y.rollEnabled,this._mouseRotate=O,this._mousePitch=ie,this._mouseRoll=ce}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class Li{constructor(y,O,ie,ce){this._el=y,this._touchZoom=O,this._touchRotate=ie,this._tapDragZoom=ce,this._rotationDisabled=!1,this._enabled=!0}enable(y){this._touchZoom.enable(y),this._rotationDisabled||this._touchRotate.enable(y),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}setZoomRate(y){this._touchZoom.setZoomRate(y),this._tapDragZoom.setZoomRate(y)}setZoomThreshold(y){this._touchZoom.setZoomThreshold(y)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Vi{constructor(y,O){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=y,this._options=O,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let y=this._map.getCanvasContainer();y.classList.add("maplibregl-cooperative-gestures"),this._container=m.create("div","maplibregl-cooperative-gesture-screen",y);let O=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(O=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let ie=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),ce=document.createElement("div");ce.className="maplibregl-desktop-message",ce.textContent=O,this._container.appendChild(ce);let _e=document.createElement("div");_e.className="maplibregl-mobile-message",_e.textContent=ie,this._container.appendChild(_e),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(y){return y[this._bypassKey]}notifyGestureBlocked(y,O){this._enabled&&(this._map.fire(new e.n("cooperativegestureprevented",{gestureType:y,originalEvent:O})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let fl=de=>de.zoom||de.drag||de.roll||de.pitch||de.rotate;class Ku extends e.n{}function tu(de){var y;return((y=de.panDelta)===null||y===void 0?void 0:y.mag())||de.zoomDelta||de.bearingDelta||de.pitchDelta||de.rollDelta}class Bs{get _ownerDocument(){var y;return((y=this._el)===null||y===void 0?void 0:y.ownerDocument)||document}get _ownerWindow(){var y,O;return((O=(y=this._el)===null||y===void 0?void 0:y.ownerDocument)===null||O===void 0?void 0:O.defaultView)||window}constructor(y,O){this.handleWindowEvent=ce=>{this.handleEvent(ce,`${ce.type}Window`)},this.handleEvent=(ce,_e)=>{if(ce.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let De=ce.type==="renderFrame"?void 0:ce,Ne={needsRenderFrame:!1},Ye={},lt={};for(let{handlerName:Gt,handler:Jt,allowed:it}of this._handlers){if(!Jt.isEnabled())continue;let Rt;if(this._blockedByActive(lt,it,Gt))Jt.reset();else if(Jt[_e||ce.type]){if(e.cz(ce,_e||ce.type)){let qt=m.mousePos(this._map.getCanvas(),ce);Rt=Jt[_e||ce.type](ce,qt)}else if(e.cA(ce,_e||ce.type)){let qt=this._getMapTouches(ce.touches),or=m.touchPos(this._map.getCanvas(),qt);Rt=Jt[_e||ce.type](ce,or,qt)}else e.cB(_e||ce.type)||(Rt=Jt[_e||ce.type](ce));this.mergeHandlerResult(Ne,Ye,Rt,Gt,De),Rt?.needsRenderFrame&&this._triggerRenderFrame()}(Rt||Jt.isActive())&&(lt[Gt]=Jt)}let ct={};for(let Gt in this._previousActiveHandlers)lt[Gt]||(ct[Gt]=De);this._previousActiveHandlers=lt,(Object.keys(ct).length||tu(Ne))&&(this._changes.push([Ne,Ye,ct]),this._triggerRenderFrame()),(Object.keys(lt).length||tu(Ne))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Ft}=Ne;Ft&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Ft(this._map))},this._map=y,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ff(y),this._bearingSnap=O.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(O);let ie=this._el;this._listeners=[[ie,"touchstart",{passive:!0}],[ie,"touchmove",{passive:!1}],[ie,"touchend",void 0],[ie,"touchcancel",void 0],[ie,"mousedown",void 0],[ie,"mousemove",void 0],[ie,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[ie,"mouseover",void 0],[ie,"mouseout",void 0],[ie,"dblclick",void 0],[ie,"click",void 0],[ie,"keydown",{capture:!1}],[ie,"keyup",void 0],[ie,"wheel",{passive:!1}],[ie,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[ce,_e,De]of this._listeners)ce.addEventListener(_e,ce===this._ownerDocument?this.handleWindowEvent:this.handleEvent,De)}destroy(){for(let[y,O,ie]of this._listeners)y.removeEventListener(O,y===this._ownerDocument?this.handleWindowEvent:this.handleEvent,ie)}_addDefaultHandlers(y){let O=this._map,ie=O.getCanvasContainer();this._add("mapEvent",new jc(O,y));let ce=O.boxZoom=new Ul(O,y);this._add("boxZoom",ce),y.interactive&&y.boxZoom&&ce.enable();let _e=O.cooperativeGestures=new Vi(O,y.cooperativeGestures);this._add("cooperativeGestures",_e),y.cooperativeGestures&&_e.enable();let De=new rt(O),Ne=new cl(O);O.doubleClickZoom=new Es(Ne,De),this._add("tapZoom",De),this._add("clickZoom",Ne),y.interactive&&y.doubleClickZoom&&O.doubleClickZoom.enable();let Ye=new ql;this._add("tapDragZoom",Ye);let lt=O.touchPitch=new Yi(O);this._add("touchPitch",lt),y.interactive&&y.touchPitch&&O.touchPitch.enable(y.touchPitch);let ct=()=>O.project(O.getCenter()),Ft=function({enable:dr,clickTolerance:mr,aroundCenter:qr=!0,minPixelCenterThreshold:Lr=100,rotateDegreesPerPixelMoved:ua=.8},Ba){let Pa=new Yt({checkCorrectEvent:Ua=>Ua.button===0&&Ua.ctrlKey||Ua.button===2&&!Ua.ctrlKey});return new pt({clickTolerance:mr,move:(Ua,ya)=>{let da=Ba();if(qr&&Math.abs(da.y-Ua.y)>Lr)return{bearingDelta:e.cx(new e.P(Ua.x,ya.y),ya,da)};let Ma=(ya.x-Ua.x)*ua;return qr&&ya.yua.button===0&&ua.ctrlKey||ua.button===2});return new pt({clickTolerance:mr,move:(ua,Ba)=>({pitchDelta:(Ba.y-ua.y)*qr}),moveStateManager:Lr,enable:dr,assignEvents:kr})}(y),Jt=function({enable:dr,clickTolerance:mr,rollDegreesPerPixelMoved:qr=.3},Lr){let ua=new Yt({checkCorrectEvent:Ba=>Ba.button===2&&Ba.ctrlKey});return new pt({clickTolerance:mr,move:(Ba,Pa)=>{let Ua=Lr(),ya=(Pa.x-Ba.x)*qr;return Pa.yLr.button===0&&!Lr.ctrlKey});return new pt({clickTolerance:mr,move:(Lr,ua)=>({around:ua,panDelta:ua.sub(Lr)}),activateOnStart:!0,moveStateManager:qr,enable:dr,assignEvents:kr})}(y),Rt=new Wr(y,O);O.dragPan=new Js(ie,it,Rt),this._add("mousePan",it),this._add("touchPan",Rt,["touchZoom","touchRotate"]),y.interactive&&y.dragPan&&O.dragPan.enable(y.dragPan);let qt=new Nn,or=new $a;O.touchZoomRotate=new Li(ie,or,qt,Ye),this._add("touchRotate",qt,["touchPan","touchZoom"]),this._add("touchZoom",or,["touchPan","touchRotate"]),y.interactive&&y.touchZoomRotate&&O.touchZoomRotate.enable(y.touchZoomRotate),this._add("blockableMapEvent",new wu(O));let vr=O.scrollZoom=new Po(O,()=>this._triggerRenderFrame());this._add("scrollZoom",vr,["mousePan"]),y.interactive&&y.scrollZoom&&O.scrollZoom.enable(y.scrollZoom);let Ar=O.keyboard=new _o(O);this._add("keyboard",Ar),y.interactive&&y.keyboard&&O.keyboard.enable()}_add(y,O,ie){this._handlers.push({handlerName:y,handler:O,allowed:ie}),this._handlersById[y]=O}stop(y){if(!this._updatingCamera){for(let{handler:O}of this._handlers)O.reset();this._inertia.clear(),this._fireEvents({},{},y),this._changes=[]}}isActive(){for(let{handler:y}of this._handlers)if(y.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!fl(this._eventsInProgress)||this.isZooming()}_blockedByActive(y,O,ie){for(let ce in y)if(ce!==ie&&!O?.includes(ce))return!0;return!1}_getMapTouches(y){let O=[];for(let ie of y)this._el.contains(ie.target)&&O.push(ie);return O}mergeHandlerResult(y,O,ie,ce,_e){if(!ie)return;e.e(y,ie);let De={handlerName:ce,originalEvent:ie.originalEvent||_e};ie.zoomDelta!==void 0&&(O.zoom=De),ie.panDelta!==void 0&&(O.drag=De),ie.rollDelta!==void 0&&(O.roll=De),ie.pitchDelta!==void 0&&(O.pitch=De),ie.bearingDelta!==void 0&&(O.rotate=De)}_applyChanges(){let y={},O={},ie={};for(let[ce,_e,De]of this._changes)ce.panDelta&&(y.panDelta=(y.panDelta||new e.P(0,0))._add(ce.panDelta)),ce.zoomDelta&&(y.zoomDelta=(y.zoomDelta||0)+ce.zoomDelta),ce.bearingDelta&&(y.bearingDelta=(y.bearingDelta||0)+ce.bearingDelta),ce.pitchDelta&&(y.pitchDelta=(y.pitchDelta||0)+ce.pitchDelta),ce.rollDelta&&(y.rollDelta=(y.rollDelta||0)+ce.rollDelta),ce.around!==void 0&&(y.around=ce.around),ce.pinchAround!==void 0&&(y.pinchAround=ce.pinchAround),ce.noInertia&&(y.noInertia=ce.noInertia),e.e(O,_e),e.e(ie,De);this._updateMapTransform(y,O,ie),this._changes=[]}_updateMapTransform(y,O,ie){let ce=this._map,_e=ce._getTransformForUpdate(),De=ce.terrain;if(!(tu(y)||De&&this._terrainMovement))return void this._fireEvents(O,ie,!0);ce._stop(!0);let{panDelta:Ne,zoomDelta:Ye,bearingDelta:lt,pitchDelta:ct,rollDelta:Ft,around:Gt,pinchAround:Jt}=y;Jt!==void 0&&(Gt=Jt),Gt||(Gt=ce.transform.centerPoint),De&&!_e.isPointOnMapSurface(Gt)&&(Gt=_e.centerPoint);let it={panDelta:Ne,zoomDelta:Ye,rollDelta:Ft,pitchDelta:ct,bearingDelta:lt,around:Gt};this._map.cameraHelper.useGlobeControls&&!_e.isPointOnMapSurface(Gt)&&(Gt=_e.centerPoint);let Rt=Gt.distSqr(_e.centerPoint)<.01?_e.center:_e.screenPointToLocation(Ne?Gt.sub(Ne):Gt);this._handleMapControls({terrain:De,tr:_e,deltasForHelper:it,preZoomAroundLoc:Rt,combinedEventsInProgress:O,panDelta:Ne}),ce._applyUpdatedTransform(_e),this._map._update(),y.noInertia||this._inertia.record(y),this._fireEvents(O,ie,!0)}_handleMapControls({terrain:y,tr:O,deltasForHelper:ie,preZoomAroundLoc:ce,combinedEventsInProgress:_e,panDelta:De}){let Ne=this._map.cameraHelper;if(Ne.handleMapControlsRollPitchBearingZoom(ie,O),y)return Ne.useGlobeControls?(this._terrainMovement||!_e.drag&&!_e.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void Ne.handleMapControlsPan(ie,O,ce)):this._terrainMovement||!_e.drag&&!_e.zoom?void(_e.drag&&this._terrainMovement&&De?O.setCenter(O.screenPointToLocation(O.centerPoint.sub(De))):Ne.handleMapControlsPan(ie,O,ce)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void Ne.handleMapControlsPan(ie,O,ce));Ne.handleMapControlsPan(ie,O,ce)}_fireEvents(y,O,ie){let ce=fl(this._eventsInProgress),_e=fl(y),De={};for(let Ft in y){let{originalEvent:Gt}=y[Ft];this._eventsInProgress[Ft]||(De[`${Ft}start`]=Gt),this._eventsInProgress[Ft]=y[Ft]}!ce&&_e&&this._fireEvent("movestart",_e.originalEvent);for(let Ft in De)this._fireEvent(Ft,De[Ft]);_e&&this._fireEvent("move",_e.originalEvent);for(let Ft in y){let{originalEvent:Gt}=y[Ft];this._fireEvent(Ft,Gt)}let Ne={},Ye;for(let Ft in this._eventsInProgress){let{handlerName:Gt,originalEvent:Jt}=this._eventsInProgress[Ft];this._handlersById[Gt].isActive()||(delete this._eventsInProgress[Ft],Ye=O[Gt]||Jt,Ne[`${Ft}end`]=Ye)}for(let Ft in Ne)this._fireEvent(Ft,Ne[Ft]);let lt=fl(this._eventsInProgress),ct=(ce||_e)&&!lt;if(ct&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Ft=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&Ft.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(Ft)}if(ie&&ct){this._updatingCamera=!0;let Ft=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Gt=Jt=>Jt!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Ku("renderFrame",{timeStamp:y})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class oc extends e.E{constructor(y,O,ie){super(),this._renderFrameCallback=()=>{let ce=Math.min((g()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(ce)),ce<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=y,this._bearingSnap=ie.bearingSnap,this._zoomSnap=ie.zoomSnap,this.cameraHelper=O,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(y,O){y.apply(this.transform,!0),this.transform=y,this.cameraHelper=O}getCenter(){return new e.W(this.transform.center.lng,this.transform.center.lat)}setCenter(y,O){return this.jumpTo({center:y},O)}getCenterElevation(){return this.transform.elevation}setCenterElevation(y,O){return this.jumpTo({elevation:y},O),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(y){this._centerClampedToGround=y}panBy(y,O,ie){return y=e.P.convert(y).mult(-1),this.panTo(this.transform.center,e.e({offset:y},O),ie)}panTo(y,O,ie){return this.easeTo(e.e({center:y},O),ie)}getZoom(){return this.transform.zoom}setZoom(y,O){return this.jumpTo({zoom:y},O),this}zoomTo(y,O,ie){return this.easeTo(e.e({zoom:y},O),ie)}zoomIn(y,O){return this.zoomTo(e.cw(this.getZoom()+1,this._zoomSnap),y,O),this}zoomOut(y,O){return this.zoomTo(e.cw(this.getZoom()-1,this._zoomSnap),y,O),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(y,O){return y!=this.transform.fov&&(this.transform.setFov(y),this.fire(new e.n("movestart",O)).fire(new e.n("move",O)).fire(new e.n("moveend",O))),this}getBearing(){return this.transform.bearing}setZoomSnap(y){return this._zoomSnap=y,this}getZoomSnap(){return this._zoomSnap}setBearing(y,O){return this.jumpTo({bearing:y},O),this}getPadding(){return this.transform.padding}setPadding(y,O){return this.jumpTo({padding:y},O),this}rotateTo(y,O,ie){return this.easeTo(e.e({bearing:y},O),ie)}resetNorth(y,O){return this.rotateTo(0,e.e({duration:1e3},y),O),this}resetNorthPitch(y,O){return this.easeTo(e.e({bearing:0,pitch:0,roll:0,duration:1e3},y),O),this}snapToNorth(y,O){return Math.abs(this.getBearing()){Rt.easeFunc(qt),this.terrain&&!y.freezeElevation&&this._updateElevation(qt),this._applyUpdatedTransform(ie),this._fireMoveEvents(O)},qt=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(O,qt)},y),this}_prepareEase(y,O,ie={}){this._moving=!0,O||ie.moving||this.fire(new e.n("movestart",y)),this._zooming&&!ie.zooming&&this.fire(new e.n("zoomstart",y)),this._rotating&&!ie.rotating&&this.fire(new e.n("rotatestart",y)),this._pitching&&!ie.pitching&&this.fire(new e.n("pitchstart",y)),this._rolling&&!ie.rolling&&this.fire(new e.n("rollstart",y))}_prepareElevation(y){this._elevationCenter=y,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(y,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(y){this._elevationStart!==void 0&&this._elevationCenter!==void 0||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let O=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(y<1&&O!==this._elevationTarget){let ie=this._elevationTarget-this._elevationStart;this._elevationStart+=y*(ie-(O-(ie*y+this._elevationStart))/(1-y)),this._elevationTarget=O}this.transform.setElevation(e.H.number(this._elevationStart,this._elevationTarget,y))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(y){if(!this.terrain&&y.elevation>=0&&y.pitch<=90)return{};let O=y.getCameraLngLat(),ie=y.getCameraAltitude(),ce=this.terrain?this.terrain.getElevationForLngLatZoom(O,y.zoom):0;if(iethis._elevateCameraIfInsideTerrain(ce)),this.transformCameraUpdate&&O.push(ce=>this.transformCameraUpdate(ce)),!O.length)return;let ie=y.clone();for(let ce of O){let _e=ie.clone(),{center:De,zoom:Ne,roll:Ye,pitch:lt,bearing:ct,elevation:Ft}=ce(_e);De&&_e.setCenter(De),Ft!==void 0&&_e.setElevation(Ft),Ne!==void 0&&_e.setZoom(Ne),Ye!==void 0&&_e.setRoll(Ye),lt!==void 0&&_e.setPitch(lt),ct!==void 0&&_e.setBearing(ct),ie.apply(_e,!1)}this.transform.apply(ie,!1)}_fireMoveEvents(y){this.fire(new e.n("move",y)),this._zooming&&this.fire(new e.n("zoom",y)),this._rotating&&this.fire(new e.n("rotate",y)),this._pitching&&this.fire(new e.n("pitch",y)),this._rolling&&this.fire(new e.n("roll",y))}_afterEase(y,O){if(this._easeId&&O&&this._easeId===O)return;delete this._easeId;let ie=this._zooming,ce=this._rotating,_e=this._pitching,De=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,ie&&this.fire(new e.n("zoomend",y)),ce&&this.fire(new e.n("rotateend",y)),_e&&this.fire(new e.n("pitchend",y)),De&&this.fire(new e.n("rollend",y)),this.fire(new e.n("moveend",y))}flyTo(y,O){if(!y.essential&&s.prefersReducedMotion){let ya=e.V(y,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(ya,O)}this.stop(),"zoom"in(y=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.cy},y))&&this._zoomSnap&&(y.zoom=e.cw(y.zoom,this._zoomSnap));let ie=this._getTransformForUpdate(),ce=ie.bearing,_e=ie.pitch,De=ie.roll,Ne=ie.padding,Ye="bearing"in y?this._normalizeBearing(y.bearing,ce):ce,lt="pitch"in y?+y.pitch:_e,ct="roll"in y?this._normalizeBearing(y.roll,De):De,Ft="padding"in y?y.padding:ie.padding,Gt=e.P.convert(y.offset),Jt=ie.centerPoint.add(Gt),it=ie.screenPointToLocation(Jt),Rt=this.cameraHelper.handleFlyTo(ie,{bearing:Ye,pitch:lt,roll:ct,padding:Ft,locationAtOffset:it,offsetAsPoint:Gt,center:y.center,minZoom:y.minZoom,zoom:y.zoom}),qt=y.curve,or=Math.max(ie.width,ie.height),vr=or/Rt.scaleOfZoom,Ar=Rt.pixelPathLength;typeof Rt.scaleOfMinZoom=="number"&&(qt=Math.sqrt(or/Rt.scaleOfMinZoom/Ar*2));let dr=qt*qt;function mr(ya){let da=(vr*vr-or*or+(ya?-1:1)*dr*dr*Ar*Ar)/(2*(ya?vr:or)*dr*Ar);return Math.log(Math.sqrt(da*da+1)-da)}function qr(ya){return(Math.exp(ya)-Math.exp(-ya))/2}function Lr(ya){return(Math.exp(ya)+Math.exp(-ya))/2}let ua=mr(!1),Ba=function(ya){return Lr(ua)/Lr(ua+qt*ya)},Pa=function(ya){return or*((Lr(ua)*(qr(da=ua+qt*ya)/Lr(da))-qr(ua))/dr)/Ar;var da},Ua=(mr(!0)-ua)/qt;if(Math.abs(Ar)<2e-6||!isFinite(Ua)){if(Math.abs(or-vr)<1e-6)return this.easeTo(y,O);let ya=vr0,Ba=da=>Math.exp(ya*qt*da)}return y.duration="duration"in y?+y.duration:1e3*Ua/("screenSpeed"in y?+y.screenSpeed/qt:+y.speed),y.maxDuration&&y.duration>y.maxDuration&&(y.duration=0),this._zooming=!0,this._rotating=ce!==Ye,this._pitching=lt!==_e,this._rolling=ct!==De,this._padding=!ie.isPaddingEqual(Ft),this._prepareEase(O,!1),this.terrain&&this._prepareElevation(Rt.targetCenter),this._ease(ya=>{let da=ya*Ua,Ma=1/Ba(da),wa=Pa(da);this._rotating&&ie.setBearing(e.H.number(ce,Ye,ya)),this._pitching&&ie.setPitch(e.H.number(_e,lt,ya)),this._rolling&&ie.setRoll(e.H.number(De,ct,ya)),this._padding&&(ie.interpolatePadding(Ne,Ft,ya),Jt=ie.centerPoint.add(Gt)),Rt.easeFunc(ya,Ma,wa,Jt),this.terrain&&!y.freezeElevation&&this._updateElevation(ya),this._applyUpdatedTransform(ie),this._fireMoveEvents(O)},()=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(O)},y),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(y,O){var ie;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let ce=this._onEaseEnd;delete this._onEaseEnd,ce.call(this,O)}return y||(ie=this.handlers)===null||ie===void 0||ie.stop(!1),this}_ease(y,O,ie){ie.animate===!1||ie.duration===0?(y(1),O()):(this._easeStart=g(),this._easeOptions=ie,this._onEaseFrame=y,this._onEaseEnd=O,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(y,O){y=e.X(y,-180,180);let ie=Math.abs(y-O);return Math.abs(y-360-O)MapLibre
'};class hl{constructor(y=du){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=O=>{!O||O.sourceDataType!=="metadata"&&O.sourceDataType!=="visibility"&&O.dataType!=="style"&&O.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=y}getDefaultPosition(){return"bottom-right"}onAdd(y){return this._map=y,this._compact=this.options.compact,this._container=m.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=m.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=m.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(y,O){let ie=this._map._getUIString(`AttributionControl.${O}`);y.title=ie,y.setAttribute("aria-label",ie)}_updateAttributions(){if(!this._map.style)return;let y=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?y=y.concat(this.options.customAttribution.map(ce=>typeof ce!="string"?"":ce)):typeof this.options.customAttribution=="string"&&y.push(this.options.customAttribution)),this._map.style.stylesheet){let ce=this._map.style.stylesheet;this.styleOwner=ce.owner,this.styleId=ce.id}let O=this._map.style.tileManagers;for(let ce in O){let _e=O[ce];if(_e.used||_e.usedForTerrain){let De=_e.getSource();De.attribution&&!y.includes(De.attribution)&&y.push(De.attribution)}}y=y.filter(ce=>String(ce).trim()),y.sort((ce,_e)=>ce.length-_e.length),y=y.filter((ce,_e)=>{for(let De=_e+1;De{let O=this._container.children;if(O.length){let ie=O[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&ie.classList.add("maplibregl-compact"):ie.classList.remove("maplibregl-compact")}},this.options=y}getDefaultPosition(){return"bottom-left"}onAdd(y){var O;this._map=y,this._compact=(O=this.options)===null||O===void 0?void 0:O.compact,this._container=m.create("div","maplibregl-ctrl");let ie=m.create("a","maplibregl-ctrl-logo");return ie.target="_blank",ie.rel="noopener nofollow",ie.href="https://maplibre.org/",ie.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ie.setAttribute("rel","noopener nofollow"),this._container.appendChild(ie),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class he{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(y){let O=++this._id;return this._queue.push({callback:y,id:O,cancelled:!1}),O}remove(y){let O=this._currentlyRunning,ie=O?this._queue.concat(O):this._queue;for(let ce of ie)if(ce.id===y)return void(ce.cancelled=!0)}run(y=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let O=this._currentlyRunning=this._queue;this._queue=[];for(let ie of O)if(!ie.cancelled&&(ie.callback(y),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Se=e.aS([{name:"a_pos3d",type:"Int16",components:3}]);class Ue extends e.E{constructor(y){super(),this._lastTilesetChange=g(),this.tileManager=y,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=y._source.tileSize*2**this.deltaZoom,y.usedForTerrain=!0,y.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(y,O){this.tileManager.update(y,O),this._renderableTilesKeys=[];let ie={};for(let ce of Ze(y,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:O,calculateTileZoom:this.tileManager._source.calculateTileZoom}))ie[ce.key]=!0,this._renderableTilesKeys.push(ce.key),this._tiles[ce.key]||(ce.terrainRttPosMatrix32f=new Float64Array(16),e.c7(ce.terrainRttPosMatrix32f,0,e.a6,e.a6,0,0,1),this._tiles[ce.key]=new Tt(ce,this.tileSize),this._lastTilesetChange=g());for(let ce in this._tiles)ie[ce]||delete this._tiles[ce]}freeRtt(y){for(let O in this._tiles){let ie=this._tiles[O];(!y||ie.tileID.equals(y)||ie.tileID.isChildOf(y)||y.isChildOf(ie.tileID))&&(ie.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(y=>this.getTileByID(y))}getTileByID(y){return this._tiles[y]}getTerrainCoords(y,O){return O?this._getTerrainCoordsForTileRanges(y,O):this._getTerrainCoordsForRegularTile(y)}_getTerrainCoordsForRegularTile(y){let O={};for(let ie of this._renderableTilesKeys){let ce=this._tiles[ie].tileID,_e=y.clone(),De=e.bj();if(ce.canonical.equals(y.canonical))e.c7(De,0,e.a6,e.a6,0,0,1);else if(ce.canonical.isChildOf(y.canonical)){let Ne=ce.canonical.z-y.canonical.z,Ye=ce.canonical.x-(ce.canonical.x>>Ne<>Ne<>Ne;e.c7(De,0,ct,ct,0,0,1),e.Q(De,De,[-Ye*ct,-lt*ct,0])}else{if(!y.canonical.isChildOf(ce.canonical))continue;{let Ne=y.canonical.z-ce.canonical.z,Ye=y.canonical.x-(y.canonical.x>>Ne<>Ne<>Ne;e.c7(De,0,e.a6,e.a6,0,0,1),e.Q(De,De,[Ye*ct,lt*ct,0]),e.S(De,De,[1/2**Ne,1/2**Ne,0])}}_e.terrainRttPosMatrix32f=new Float32Array(De),O[ie]=_e}return O}_getTerrainCoordsForTileRanges(y,O){let ie={};for(let ce of this._renderableTilesKeys){let _e=this._tiles[ce].tileID;if(!this._isWithinTileRanges(_e,O))continue;let De=y.clone(),Ne=e.bj();if(_e.canonical.z===y.canonical.z){let Ye=y.canonical.x-_e.canonical.x+y.wrap*(1<y.canonical.z){let Ye=_e.canonical.z-y.canonical.z,lt=_e.canonical.x-(_e.canonical.x>>Ye<>Ye<>Ye),Gt=y.canonical.y-(_e.canonical.y>>Ye),Jt=e.a6>>Ye;e.c7(Ne,0,Jt,Jt,0,0,1),e.Q(Ne,Ne,[-lt*Jt+Ft*e.a6,-ct*Jt+Gt*e.a6,0])}else{let Ye=y.canonical.z-_e.canonical.z,lt=y.canonical.x-(y.canonical.x>>Ye<>Ye<>Ye)-_e.canonical.x,Gt=(y.canonical.y>>Ye)-_e.canonical.y,Jt=e.a6<_e.maxzoom&&(De=_e.maxzoom),De<_e.minzoom)return;(ie=this._sourceTileCache)[ce=y.key]||(ie[ce]=y.scaledTo(De).key);let Ne=this.findTileInCaches(this._sourceTileCache[y.key]);if(!Ne?.dem&&O)for(;De>=_e.minzoom&&!Ne?.dem;)Ne=this.findTileInCaches(y.scaledTo(De--).key);return Ne}findTileInCaches(y){let O=this.tileManager.getTileByID(y);return O||(O=this.tileManager._outOfViewCache.getByKey(y),O)}anyTilesAfterTime(y=Date.now()){return this._lastTilesetChange>=y}_isWithinTileRanges(y,O){let ie=O[y.canonical.z];return!!ie&&(y.wrap>ie.minWrap||y.wrap=ie.minTileXWrapped&&y.canonical.x<=ie.maxTileXWrapped&&y.canonical.y>=ie.minTileY&&y.canonical.y<=ie.maxTileY)}}class Qe{constructor(y,O,ie){this._meshCache={},this.painter=y,this.tileManager=new Ue(O),this.options=ie,this.exaggeration=typeof ie.exaggeration=="number"?ie.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null);for(let y in this._meshCache)this._meshCache[y].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(y,O,ie,ce=e.a6){var _e;let De=y.normalizeCoordinates(O,ie,ce);if(!De)return 0;let Ne=this.getTerrainData(De.tileID),Ye=(_e=Ne.tile)===null||_e===void 0?void 0:_e.dem;if(!Ye)return 0;let lt=e.cC([],[De.x/ce*e.a6,De.y/ce*e.a6],Ne.u_terrain_matrix),ct=[lt[0]*Ye.dim,lt[1]*Ye.dim],Ft=Math.floor(ct[0]),Gt=Math.floor(ct[1]),Jt=ct[0]-Ft,it=ct[1]-Gt;return Ye.get(Ft,Gt)*(1-Jt)*(1-it)+Ye.get(Ft+1,Gt)*Jt*(1-it)+Ye.get(Ft,Gt+1)*(1-Jt)*it+Ye.get(Ft+1,Gt+1)*Jt*it}getElevationForLngLatZoom(y,O){if(!e.cD(O,y.wrap()))return 0;let{tileID:ie,mercatorX:ce,mercatorY:_e}=this._getOverscaledTileIDFromLngLatZoom(y,O);return this.getElevation(ie,ce%e.a6,_e%e.a6,e.a6)}getElevationForLngLat(y,O){let ie=Ze(O,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),ce=0;for(let _e of ie)_e.canonical.z>ce&&(ce=Math.min(_e.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(y,ce)}getElevation(y,O,ie,ce=e.a6){return this.getDEMElevation(y,O,ie,ce)*this.exaggeration}getTerrainData(y){var O,ie;if(!this._emptyDemTexture){let De=this.painter.context,Ne=new e.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new e.T(De,Ne,De.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new e.T(De,new e.R({width:1,height:1}),De.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(De.gl.NEAREST,De.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=e.ap([])}let ce=this.tileManager.getSourceTile(y,!0);if(ce?.dem&&(!ce.demTexture||ce.needsTerrainPrepare)){let De=this.painter.context;ce.demTexture=this.painter.getTileTexture(ce.dem.stride),ce.demTexture?ce.demTexture.update(ce.dem.getPixels(),{premultiply:!1}):ce.demTexture=new e.T(De,ce.dem.getPixels(),De.gl.RGBA,{premultiply:!1}),ce.demTexture.bind(De.gl.NEAREST,De.gl.CLAMP_TO_EDGE),ce.needsTerrainPrepare=!1}let _e=ce&&ce.toString()+ce.tileID.key+y.key;if(_e&&!this._demMatrixCache[_e]){let De=this.tileManager.getSource().maxzoom,Ne=y.canonical.z-ce.tileID.canonical.z;y.overscaledZ>y.canonical.z&&(y.canonical.z>=De?Ne=y.canonical.z-De:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Ye=y.canonical.x-(y.canonical.x>>Ne<>Ne<>8<<4|_e>>8,O[De+3]=0;let ie=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(O.buffer)),ce=new e.T(y,ie,y.gl.RGBA,{premultiply:!1});return ce.bind(y.gl.NEAREST,y.gl.CLAMP_TO_EDGE),this._coordsTexture=ce,ce}pointCoordinate(y){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let O=new Uint8Array(4),ie=this.painter.context,ce=ie.gl,_e=Math.round(y.x*this.painter.pixelRatio/devicePixelRatio),De=Math.round(y.y*this.painter.pixelRatio/devicePixelRatio),Ne=Math.round(this.painter.height/devicePixelRatio);ie.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),ce.readPixels(_e,Ne-De-1,1,1,ce.RGBA,ce.UNSIGNED_BYTE,O),ie.bindFramebuffer.set(null);let Ye=O[0]+(O[2]>>4<<8),lt=O[1]+((15&O[2])<<8),ct=this.coordsIndex[255-O[3]],Ft=ct&&this.tileManager.getTileByID(ct);if(!Ft)return null;let Gt=this._coordsTextureSize,Jt=(1<0,ce=ie&&y.canonical.y===0,_e=ie&&y.canonical.y===(1<y.id!==O),this._recentlyUsed.push(y.id)}stampObject(y){y.stamp=++this._stamp}getOrCreateFreeObject(){for(let O of this._recentlyUsed)if(!this._objects[O].inUse)return this._objects[O];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let y=this._createObject(this._objects.length);return this._objects.push(y),y}freeObject(y){y.inUse=!1}freeAllObjects(){for(let y of this._objects)this.freeObject(y)}isFull(){return!(this._objects.length!y.inUse)===!1}}let ut={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class jt{constructor(y,O){this.painter=y,this.terrain=O,this.pool=new tt(y.context,30,O.tileManager.tileSize*O.qualityFactor)}destruct(){this.pool.destruct()}getTexture(y){return this.pool.getObjectForId(y.rtt[this._stacks.length-1].id).texture}prepareForRender(y,O){var ie,ce,_e;this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=y._order.filter(De=>!y._layers[De].isHidden(O)),this._coordsAscending={};for(let De in y.tileManagers){this._coordsAscending[De]={};let Ne=y.tileManagers[De].getVisibleCoordinates(),Ye=y.tileManagers[De].getSource(),lt=Ye instanceof ke?Ye.terrainTileRanges:null;for(let ct of Ne){let Ft=this.terrain.tileManager.getTerrainCoords(ct,lt);for(let Gt in Ft)(_e=this._coordsAscending[De])[Gt]||(_e[Gt]=[]),this._coordsAscending[De][Gt].push(Ft[Gt])}}this._rttFingerprints={};for(let De of y._order){let Ne=y._layers[De],Ye=Ne.source;if(ut[Ne.type]&&!this._rttFingerprints[Ye]){this._rttFingerprints[Ye]={};let lt=(ce=(ie=y.tileManagers[Ye])===null||ie===void 0?void 0:ie.getState().revision)!==null&&ce!==void 0?ce:0;for(let ct in this._coordsAscending[Ye])this._rttFingerprints[Ye][ct]=`${this._coordsAscending[Ye][ct].map(Ft=>Ft.key).sort().join()}#${lt}`}}for(let De of this._renderableTiles)for(let Ne in this._rttFingerprints){let Ye=this._rttFingerprints[Ne][De.tileID.key];Ye&&Ye!==De.rttFingerprint[Ne]&&(De.rtt=[])}}renderLayer(y,O){if(y.isHidden(this.painter.transform.zoom))return!1;let ie=Object.assign(Object.assign({},O),{isRenderingToTexture:!0}),ce=y.type,_e=this.painter,De=this._renderableLayerIds[this._renderableLayerIds.length-1]===y.id;if(ut[ce]&&(this._prevType&&ut[this._prevType]||this._stacks.push([]),this._prevType=ce,this._stacks[this._stacks.length-1].push(y.id),!De))return!0;if(ut[this._prevType]||ut[ce]&&De){this._prevType=ce;let Ne=this._stacks.length-1,Ye=this._stacks[Ne]||[];for(let lt of this._renderableTiles){if(this.pool.isFull()&&(Fu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(lt),lt.rtt[Ne]){let Ft=this.pool.getObjectForId(lt.rtt[Ne].id);if(Ft.stamp===lt.rtt[Ne].stamp){this.pool.useObject(Ft);continue}}let ct=this.pool.getOrCreateFreeObject();this.pool.useObject(ct),this.pool.stampObject(ct),lt.rtt[Ne]={id:ct.id,stamp:ct.stamp},_e.context.bindFramebuffer.set(ct.fbo.framebuffer),_e.context.clear({color:e.bo.transparent,stencil:0}),_e.currentStencilSource=void 0;for(let Ft of Ye){let Gt=_e.style._layers[Ft],Jt=Gt.source?this._coordsAscending[Gt.source][lt.tileID.key]:[lt.tileID];_e.context.viewport.set([0,0,ct.fbo.width,ct.fbo.height]),_e._renderTileClippingMasks(Gt,Jt,!0),_e.renderLayer(_e,_e.style.tileManagers[Gt.source],Gt,Jt,ie),Gt.source&&(lt.rttFingerprint[Gt.source]=this._rttFingerprints[Gt.source][lt.tileID.key])}}return Fu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects(),ut[ce]}return!1}}let St={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Qt=t,gr={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:du,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:e.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},yr=class extends oc{get _ownerWindow(){var de,y;return((y=(de=this._container)===null||de===void 0?void 0:de.ownerDocument)===null||y===void 0?void 0:y.defaultView)||window}constructor(de){var y,O,ie;let ce=Object.assign(Object.assign(Object.assign({},gr),de),{canvasContextAttributes:Object.assign(Object.assign({},gr.canvasContextAttributes),de.canvasContextAttributes)});if(ce.minZoom!=null&&ce.maxZoom!=null&&ce.minZoom>ce.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(ce.minPitch!=null&&ce.maxPitch!=null&&ce.minPitch>ce.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(ce.minPitch!=null&&ce.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(ce.maxPitch!=null&&ce.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let _e=new qo,De=new as;ce.minZoom!==void 0&&_e.setMinZoom(ce.minZoom),ce.maxZoom!==void 0&&_e.setMaxZoom(ce.maxZoom),ce.minPitch!==void 0&&_e.setMinPitch(ce.minPitch),ce.maxPitch!==void 0&&_e.setMaxPitch(ce.maxPitch),ce.renderWorldCopies!==void 0&&_e.setRenderWorldCopies(ce.renderWorldCopies),ce.transformConstrain!==null&&_e.setConstrainOverride(ce.transformConstrain),super(_e,De,{bearingSnap:ce.bearingSnap,zoomSnap:ce.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new he,this._controls=[],this._mapId=e.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=Ye=>{if(Ye.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let lt of Object.values(this.style._layers))if(lt.type==="custom"&&console.warn(`Custom layer with id '${lt.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),lt._listeners)for(let[ct]of Object.entries(lt._listeners))console.warn(`Custom layer with id '${lt.id}' had event listeners for event '${ct}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new e.n("webglcontextlost",{originalEvent:Ye}))}else this.fire(new e.n("webglcontextlost",{originalEvent:Ye}))},this._contextRestored=Ye=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new e.n("webglcontextrestored",{originalEvent:Ye}))},this._onMapScroll=Ye=>{if(Ye.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=ce.interactive,this._maxTileCacheSize=ce.maxTileCacheSize,this._maxTileCacheZoomLevels=ce.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},ce.canvasContextAttributes),this._trackResize=ce.trackResize===!0,this._bearingSnap=ce.bearingSnap,this._zoomSnap=ce.zoomSnap,this._centerClampedToGround=ce.centerClampedToGround,this._refreshExpiredTiles=ce.refreshExpiredTiles===!0,this._fadeDuration=ce.fadeDuration,this._crossSourceCollisions=ce.crossSourceCollisions===!0,this._collectResourceTiming=ce.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},St),ce.locale),this._clickTolerance=ce.clickTolerance,this._overridePixelRatio=ce.pixelRatio,this._maxCanvasSize=ce.maxCanvasSize,this._zoomLevelsToOverscale=ce.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=ce.transformCameraUpdate,this.transformConstrain=ce.transformConstrain,this.cancelPendingTileRequestsWhileZooming=ce.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(ce.anisotropicFilterPitch),ce.reduceMotion!==void 0&&(s.prefersReducedMotion=ce.reduceMotion),this._imageQueueHandle=p.addThrottleControl(()=>this.isMoving()),this._requestManager=new i(ce.transformRequest),this._container=this._resolveContainer(ce.container),ce.maxBounds&&this.setMaxBounds(ce.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new Bs(this,ce),this._hash=ce.hash?new Oc(typeof ce.hash=="string"&&ce.hash||void 0).addTo(this):void 0,!((y=this._hash)===null||y===void 0)&&y._onHashChange()||(this.jumpTo({center:ce.center,elevation:ce.elevation,zoom:ce.zoom,bearing:ce.bearing,pitch:ce.pitch,roll:ce.roll}),ce.bounds&&(this.resize(),this.fitBounds(ce.bounds,e.e({},ce.fitBoundsOptions,{duration:0}))));let Ne=typeof ce.style=="string"||((ie=(O=ce.style)===null||O===void 0?void 0:O.projection)===null||ie===void 0?void 0:ie.type)!=="globe";this.resize(null,Ne),this._localIdeographFontFamily=ce.localIdeographFontFamily,this._validateStyle=ce.validateStyle,ce.style&&this.setStyle(ce.style,{localIdeographFontFamily:ce.localIdeographFontFamily}),ce.attributionControl&&this.addControl(new hl(typeof ce.attributionControl=="boolean"?void 0:ce.attributionControl)),ce.maplibreLogo&&this.addControl(new Uc,ce.logoPosition),this.on("style.load",()=>{if(Ne||this._resizeTransform(),this.transform.unmodified){let Ye=e.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(Ye)}}),this.on("data",Ye=>{this._update(Ye.dataType==="style"),this.fire(new e.n(`${Ye.dataType}data`,Ye))}),this.on("dataloading",Ye=>{this.fire(new e.n(`${Ye.dataType}dataloading`,Ye))}),this.on("dataabort",Ye=>{this.fire(new e.n("sourcedataabort",Ye))})}_getMapId(){return this._mapId}setGlobalStateProperty(de,y){return this.style.setGlobalStateProperty(de,y),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(de,y){if(y===void 0&&(y=de.getDefaultPosition?de.getDefaultPosition():"top-right"),!de?.onAdd)return this.fire(new e.l(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let O=de.onAdd(this);this._controls.push(de);let ie=this._controlPositions[y];return y.includes("bottom")?ie.insertBefore(O,ie.firstChild):ie.appendChild(O),this}removeControl(de){if(!de?.onRemove)return this.fire(new e.l(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let y=this._controls.indexOf(de);return y>-1&&this._controls.splice(y,1),de.onRemove(this),this}hasControl(de){return this._controls.includes(de)}coveringTiles(de){return Ze(this.transform,de)}calculateCameraOptionsFromTo(de,y,O,ie){return ie==null&&this.terrain&&(ie=this.terrain.getElevationForLngLat(O,this.transform)),super.calculateCameraOptionsFromTo(de,y,O,ie)}resize(de,y=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(y);let O=!this._moving;return O&&(this.stop(),this.fire(new e.n("movestart",de)).fire(new e.n("move",de))),this.fire(new e.n("resize",de)),O&&this.fire(new e.n("moveend",de)),this}_resizeInternal(de=!0){let[y,O]=this._containerDimensions(),ie=this._getClampedPixelRatio(y,O);if(this._resizeCanvas(y,O,ie),this.painter.resize(y,O,ie),this.painter.overLimit()){let ce=this.painter.context.gl;this._maxCanvasSize=[ce.drawingBufferWidth,ce.drawingBufferHeight];let _e=this._getClampedPixelRatio(y,O);this._resizeCanvas(y,O,_e),this.painter.resize(y,O,_e)}this._resizeTransform(de)}_resizeTransform(de=!0){var y;let[O,ie]=this._containerDimensions();this.transform.resize(O,ie,de),(y=this._requestedCameraState)===null||y===void 0||y.resize(O,ie,de)}_getClampedPixelRatio(de,y){let{0:O,1:ie}=this._maxCanvasSize,ce=this.getPixelRatio(),_e=de*ce,De=y*ce;return Math.min(_e>O?O/_e:1,De>ie?ie/De:1)*ce}getPixelRatio(){var de;return(de=this._overridePixelRatio)!==null&&de!==void 0?de:devicePixelRatio}setPixelRatio(de){this._overridePixelRatio=de,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(de){return this.transform.setMaxBounds(q.convert(de)),this._update()}setMinZoom(de){if((de=de??-2)>=-2&&de<=this.transform.maxZoom){let y=this.transform.zoom,O=this._getTransformForUpdate();return O.setMinZoom(de),this._applyUpdatedTransform(O),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(de){if((de=de??22)>=this.transform.minZoom){let y=this.transform.zoom,O=this._getTransformForUpdate();return O.setMaxZoom(de),this._applyUpdatedTransform(O),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(de){if((de=de??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(de>=0&&de<=this.transform.maxPitch){let y=this.transform.pitch,O=this._getTransformForUpdate();return O.setMinPitch(de),this._applyUpdatedTransform(O),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(de){if((de=de??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(de>=this.transform.minPitch){let y=this.transform.pitch,O=this._getTransformForUpdate();return O.setMaxPitch(de),this._applyUpdatedTransform(O),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(de){if((de=de??20)>180)throw new Error("anisotropicFilterPitch must be less than or equal to 180");if(de<0)throw new Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=de,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(de){return this.transform.setRenderWorldCopies(de),this._update()}setTransformConstrain(de){return this.transform.setConstrainOverride(de),this._update()}project(de){return this.transform.locationToScreenPoint(e.W.convert(de),this.style&&this.terrain)}unproject(de){return this.transform.screenPointToLocation(e.P.convert(de),this.terrain)}isMoving(){var de;return this._moving||((de=this.handlers)===null||de===void 0?void 0:de.isMoving())}isZooming(){var de;return this._zooming||((de=this.handlers)===null||de===void 0?void 0:de.isZooming())}isRotating(){var de;return this._rotating||((de=this.handlers)===null||de===void 0?void 0:de.isRotating())}_createDelegatedListener(de,y,O){if(de==="mouseenter"||de==="mouseover"){let ie=!1;return{layers:y,listener:O,delegates:{mousemove:_e=>{let De=y.filter(Ye=>this.getLayer(Ye)),Ne=De.length!==0?this.queryRenderedFeatures(_e.point,{layers:De}):[];Ne.length?ie||(ie=!0,O.call(this,new Ol(de,this,_e.originalEvent,{features:Ne}))):ie=!1},mouseout:()=>{ie=!1}}}}if(de==="mouseleave"||de==="mouseout"){let ie=!1;return{layers:y,listener:O,delegates:{mousemove:De=>{let Ne=y.filter(Ye=>this.getLayer(Ye));(Ne.length!==0?this.queryRenderedFeatures(De.point,{layers:Ne}):[]).length?ie=!0:ie&&(ie=!1,O.call(this,new Ol(de,this,De.originalEvent)))},mouseout:De=>{ie&&(ie=!1,O.call(this,new Ol(de,this,De.originalEvent)))}}}}{let ie=ce=>{let _e=y.filter(Ne=>this.getLayer(Ne)),De=_e.length!==0?this.queryRenderedFeatures(ce.point,{layers:_e}):[];De.length&&(ce.features=De,O.call(this,ce),delete ce.features)};return{layers:y,listener:O,delegates:{[de]:ie}}}}_saveDelegatedListener(de,y){var O;this._delegatedListeners||(this._delegatedListeners={}),(O=this._delegatedListeners)[de]||(O[de]=[]),this._delegatedListeners[de].push(y)}_removeDelegatedListener(de,y,O){var ie;if(!(!((ie=this._delegatedListeners)===null||ie===void 0)&&ie[de]))return;let ce=this._delegatedListeners[de];for(let _e=0;_ey.includes(Ne))){for(let Ne in De.delegates)this.off(Ne,De.delegates[Ne]);return void ce.splice(_e,1)}}}on(de,y,O){if(O===void 0)return super.on(de,y);let ie=typeof y=="string"?[y]:y,ce=this._createDelegatedListener(de,ie,O);this._saveDelegatedListener(de,ce);for(let _e in ce.delegates)this.on(_e,ce.delegates[_e]);return{unsubscribe:()=>{this._removeDelegatedListener(de,ie,O)}}}once(de,y,O){if(O===void 0)return super.once(de,y);let ie=typeof y=="string"?[y]:y,ce=this._createDelegatedListener(de,ie,O);for(let _e in ce.delegates){let De=ce.delegates[_e];ce.delegates[_e]=(...Ne)=>{this._removeDelegatedListener(de,ie,O),De(...Ne)}}this._saveDelegatedListener(de,ce);for(let _e in ce.delegates)this.once(_e,ce.delegates[_e]);return this}off(de,y,O){return O===void 0?super.off(de,y):(this._removeDelegatedListener(de,typeof y=="string"?[y]:y,O),this)}queryRenderedFeatures(de,y){if(!this.style)return[];let O,ie=de instanceof e.P||Array.isArray(de),ce=ie?de:[[0,0],[this.transform.width,this.transform.height]];if(y||(y=(ie?{}:de)||{}),ce instanceof e.P||typeof ce[0]=="number")O=[e.P.convert(ce)];else{let _e=e.P.convert(ce[0]),De=e.P.convert(ce[1]);O=[_e,new e.P(De.x,_e.y),De,new e.P(_e.x,De.y),_e]}return this.style.queryRenderedFeatures(O,y,this.transform)}querySourceFeatures(de,y){return this.style.querySourceFeatures(de,y)}setStyle(de,y){return(y=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},y)).diff!==!1&&y.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&de?(this._diffStyle(de,y),this):(this._localIdeographFontFamily=y.localIdeographFontFamily,this._updateStyle(de,y))}setTransformRequest(de){return this._requestManager.setTransformRequest(de),this}_getUIString(de){let y=this._locale[de];if(y==null)throw new Error(`Missing UI string '${de}'`);return y}_updateStyle(de,y){var O,ie,ce;if((O=this._diffStyleRequest)===null||O===void 0||O.abort(),this._diffStyleRequest=null,y.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(de,y));let _e=this.style&&y.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!de)),de?(this.style=new Uu(this,y||{}),this.style.setEventedParent(this,{style:this.style}),typeof de=="string"?this.style.loadURL(de,y,_e):this.style.loadJSON(de,y,_e),this):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),(ce=(ie=this.style)===null||ie===void 0?void 0:ie.projection)===null||ce===void 0||ce.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Uu(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(de,y){return e._(this,void 0,void 0,function*(){var O;if((O=this._diffStyleRequest)===null||O===void 0||O.abort(),typeof de=="string"){let ie=de;this._diffStyleRequest=new AbortController;let ce=this._diffStyleRequest;try{let _e=yield this._requestManager.transformRequest(ie,"Style");if(ce.signal.aborted)return void(this._diffStyleRequest=null);let De=yield e.k(_e,ce);this._diffStyleRequest=null,this._updateDiff(De.data,y)}catch(_e){this._diffStyleRequest=null,e.$(_e)||this.fire(new e.l(e.d(_e)))}}else typeof de=="object"&&(this._diffStyleRequest=null,this._updateDiff(de,y))})}_updateDiff(de,y){try{this.style.setState(de,y)&&this._update(!0)}catch(O){e.w(`Unable to perform style diff: ${e.d(O).message}. Rebuilding the style from scratch.`),this._updateStyle(de,y)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();e.w("There is no style added to the map.")}addSource(de,y){return this._lazyInitEmptyStyle(),this.style.addSource(de,y),this._update(!0)}isSourceLoaded(de){var y;let O=(y=this.style)===null||y===void 0?void 0:y.tileManagers[de];if(O!==void 0)return O.loaded();this.fire(new e.l(new Error(`There is no tile manager with ID '${de}'`)))}setTerrain(de){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),de){let y=this.style.tileManagers[de.source];if(!y)throw new Error(`cannot load terrain, because there exists no source with ID: ${de.source}`);this.terrain===null&&y.reload();for(let O in this.style._layers){let ie=this.style._layers[O];ie.type==="hillshade"&&ie.source===de.source&&e.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),ie.type==="color-relief"&&ie.source===de.source&&e.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Qe(this.painter,y,de),this.painter.renderToTexture=new jt(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=O=>{var ie;O.dataType==="style"?this.terrain.tileManager.freeRtt():O.dataType==="source"&&O.tile&&(O.sourceId!==de.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((ie=O.source)===null||ie===void 0?void 0:ie.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(O.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new e.n("terrain",{terrain:de})),this}getTerrain(){var de,y;return(y=(de=this.terrain)===null||de===void 0?void 0:de.options)!==null&&y!==void 0?y:null}areTilesLoaded(){var de;let y=(de=this.style)===null||de===void 0?void 0:de.tileManagers;for(let O of Object.values(y))if(!O.areTilesLoaded())return!1;return!0}removeSource(de){return this.style.removeSource(de),this._update(!0)}getSource(de){return this.style.getSource(de)}setSourceTileLodParams(de,y,O){if(O){let ie=this.getSource(O);if(!ie)throw new Error(`There is no source with ID "${O}", cannot set LOD parameters`);ie.calculateTileZoom=Be(Math.max(1,de),Math.max(1,y))}else for(let ie in this.style.tileManagers)this.style.tileManagers[ie].getSource().calculateTileZoom=Be(Math.max(1,de),Math.max(1,y));return this._update(!0),this}refreshTiles(de,y){let O=this.style.tileManagers[de];if(!O)throw new Error(`There is no tile manager with ID "${de}", cannot refresh tile`);y===void 0?O.reload(!0):O.refreshTiles(y.map(ie=>new e.aa(ie.z,ie.x,ie.y)))}addImage(de,y,O={}){let{pixelRatio:ie=1,sdf:ce=!1,stretchX:_e,stretchY:De,content:Ne,textFitWidth:Ye,textFitHeight:lt}=O;if(this._lazyInitEmptyStyle(),!(y instanceof HTMLImageElement||e.b(y))){if(y.width===void 0||y.height===void 0)return this.fire(new e.l(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:ct,height:Ft,data:Gt}=y,Jt=y;return this.style.addImage(de,{data:new e.R({width:ct,height:Ft},new Uint8Array(Gt)),pixelRatio:ie,stretchX:_e,stretchY:De,content:Ne,textFitWidth:Ye,textFitHeight:lt,sdf:ce,version:0,userImage:Jt}),Jt.onAdd&&Jt.onAdd(this,de),this}}{let{width:ct,height:Ft,data:Gt}=s.getImageData(y);this.style.addImage(de,{data:new e.R({width:ct,height:Ft},Gt),pixelRatio:ie,stretchX:_e,stretchY:De,content:Ne,textFitWidth:Ye,textFitHeight:lt,sdf:ce,version:0})}}updateImage(de,y){let O=this.style.getImage(de);if(!O)return this.fire(new e.l(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let ie=y instanceof HTMLImageElement||e.b(y)?s.getImageData(y):y,{width:ce,height:_e,data:De}=ie;if(ce===void 0||_e===void 0)return this.fire(new e.l(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(ce!==O.data.width||_e!==O.data.height)return this.fire(new e.l(new Error("The width and height of the updated image must be that same as the previous version of the image")));let Ne=!(y instanceof HTMLImageElement||e.b(y));return O.data.replace(De,Ne),this.style.updateImage(de,O),this}getImage(de){return this.style.getImage(de)}hasImage(de){return de?!!this.style.getImage(de):(this.fire(new e.l(new Error("Missing required image id"))),!1)}removeImage(de){this.style.removeImage(de)}loadImage(de){return e._(this,void 0,void 0,function*(){return p.getImage(yield this._requestManager.transformRequest(de,"Image"),new AbortController)})}listImages(){return this.style.listImages()}addLayer(de,y){return this._lazyInitEmptyStyle(),this.style.addLayer(de,y),this._update(!0)}moveLayer(de,y){return this.style.moveLayer(de,y),this._update(!0)}removeLayer(de){return this.style.removeLayer(de),this._update(!0)}getLayer(de){return this.style.getLayer(de)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(de,y,O){return this.style.setLayerZoomRange(de,y,O),this._update(!0)}setFilter(de,y,O={}){return this.style.setFilter(de,y,O),this._update(!0)}getFilter(de){return this.style.getFilter(de)}setPaintProperty(de,y,O,ie={}){return this.style.setPaintProperty(de,y,O,ie),this._update(!0)}getPaintProperty(de,y){return this.style.getPaintProperty(de,y)}setLayoutProperty(de,y,O,ie={}){return this.style.setLayoutProperty(de,y,O,ie),this._update(!0)}getLayoutProperty(de,y){return this.style.getLayoutProperty(de,y)}setGlyphs(de,y={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(de,y),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(de,y,O={}){return this._lazyInitEmptyStyle(),this.style.addSprite(de,y,O,ie=>{ie||this._update(!0)}),this}removeSprite(de){return this._lazyInitEmptyStyle(),this.style.removeSprite(de),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(de,y={}){return this._lazyInitEmptyStyle(),this.style.setSprite(de,y,O=>{O||this._update(!0)}),this}setLight(de,y={}){return this._lazyInitEmptyStyle(),this.style.setLight(de,y),this._update(!0)}getLight(){return this.style.getLight()}setSky(de,y={}){return this._lazyInitEmptyStyle(),this.style.setSky(de,y),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(de,y){return this.style.setFeatureState(de,y),this._update()}removeFeatureState(de,y){return this.style.removeFeatureState(de,y),this._update()}getFeatureState(de){return this.style.getFeatureState(de)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let de=0,y=0;return this._container&&(de=this._container.clientWidth||400,y=this._container.clientHeight||300),[de,y]}_setupResizeObserver(){var de;let y=!1,O=ic(ce=>{this._trackResize&&!this._removed&&(this.resize(ce),this.redraw())},50),ie=(de=this._ownerWindow.ResizeObserver)!==null&&de!==void 0?de:ResizeObserver;this._resizeObserver=new ie(ce=>{y?O(ce):y=!0}),this._resizeObserver.observe(this._container)}_resolveContainer(de){if(typeof de=="string"){let y=document.getElementById(de);if(!y)throw new Error(`Container '${de}' not found.`);return y}if(de instanceof HTMLElement||de&&typeof de=="object"&&de.nodeType===1)return de;throw new Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let de=this._container;de.classList.add("maplibregl-map");let y=this._canvasContainer=m.create("div","maplibregl-canvas-container",de);this._interactive&&y.classList.add("maplibregl-interactive"),this._canvas=m.create("canvas","maplibregl-canvas",y),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let O=this._containerDimensions(),ie=this._getClampedPixelRatio(O[0],O[1]);this._resizeCanvas(O[0],O[1],ie);let ce=this._controlContainer=m.create("div","maplibregl-control-container",de),_e=this._controlPositions={};for(let De of["top-left","top-right","bottom-left","bottom-right"])_e[De]=m.create("div",`maplibregl-ctrl-${De} `,ce);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(de,y,O){this._canvas.width=Math.floor(O*de),this._canvas.height=Math.floor(O*y),this._canvas.style.width=`${de}px`,this._canvas.style.height=`${y}px`}_setupPainter(){let de=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),y=null;this._canvas.addEventListener("webglcontextcreationerror",ie=>{y={requestedAttributes:de},ie&&(y.statusMessage=ie.statusMessage,y.type=ie.type)},{once:!0});let O=null;if(O=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,de):this._canvas.getContext("webgl2",de)||this._canvas.getContext("webgl",de),!O){let ie="Failed to initialize WebGL";throw y?(y.message=ie,new Error(JSON.stringify(y))):new Error(ie)}this.painter=new bu(O,this.transform)}migrateProjection(de,y){super.migrateProjection(de,y),this.painter.transform=de,this.fire(new e.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(de){var y;return!((y=this.style)===null||y===void 0)&&y._loaded?(this._styleDirty||(this._styleDirty=de),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(de){return this._update(),this._renderTaskQueue.add(de)}_cancelRenderFrame(de){this._renderTaskQueue.remove(de)}_render(de){var y,O,ie,ce,_e,De;let Ne=this._idleTriggered?this._fadeDuration:0,Ye=((y=this.style.projection)===null||y===void 0?void 0:y.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(de),this._removed)return;let lt=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Gt=this.transform.zoom,Jt=g();this.style.zoomHistory.update(Gt,Jt);let it=new e.J(Gt,{now:Jt,fadeDuration:Ne,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Rt=it.crossFadingFactor();Rt===1&&Rt===this._crossFadingFactor||(lt=!0,this._crossFadingFactor=Rt),this.style.update(it)}let ct=((O=this.style.projection)===null||O===void 0?void 0:O.transitionState)>0!==Ye;(ie=this.style.projection)===null||ie===void 0||ie.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((ce=this.style.projection)===null||ce===void 0?void 0:ce.transitionState,(_e=this.style.projection)===null||_e===void 0?void 0:_e.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||ct)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=(De=this.style)===null||De===void 0?void 0:De._updatePlacement(this.transform,this.showCollisionBoxes,Ne,this._crossSourceCollisions,ct),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:Ne,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new e.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.n("load"))),this.style&&(this.style.hasTransitions()||lt)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Ft=this._sourcesDirty||this._styleDirty||this._placementDirty;return Ft||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.n("idle")),!this._loaded||this._fullyLoaded||Ft||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var de,y;this._hash&&this._hash.remove();for(let ie of this._controls)ie.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),(de=this._diffStyleRequest)===null||de===void 0||de.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),p.removeThrottleControl(this._imageQueueHandle),(y=this._resizeObserver)===null||y===void 0||y.disconnect();let O=this.painter.context.gl.getExtension("WEBGL_lose_context");O?.loseContext&&O.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new e.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,s.frame(this._frameRequest,de=>{this._frameRequest=null;try{this._render(de)}catch(y){if(!e.$(y)&&!function(O){return O.message===nc}(y))throw y}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(de){this._showTileBoundaries!==de&&(this._showTileBoundaries=de,this._update())}get showPadding(){return!!this._showPadding}set showPadding(de){this._showPadding!==de&&(this._showPadding=de,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(de){this._showCollisionBoxes!==de&&(this._showCollisionBoxes=de,de?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(de){this._showOverdrawInspector!==de&&(this._showOverdrawInspector=de,this._update())}get repaint(){return!!this._repaint}set repaint(de){this._repaint!==de&&(this._repaint=de,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(de){this._vertices=de,this._update()}get version(){return Qt}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(de){return this._lazyInitEmptyStyle(),this.style.setProjection(de),this._update(!0)}},Kr={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class $r{constructor(y,O,ie=!1){this.mousedown=_e=>{this.startMove(_e,m.mousePos(this.element,_e)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=_e=>{this.move(_e,m.mousePos(this.element,_e))},this.mouseup=_e=>{this._rotatePitchHandler.dragEnd(_e),this.offTemp()},this.touchstart=_e=>{_e.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=m.touchPos(this.element,_e.targetTouches)[0],this.startMove(_e,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=_e=>{_e.targetTouches.length!==1?this.reset():(this._lastPos=m.touchPos(this.element,_e.targetTouches)[0],this.move(_e,this._lastPos))},this.touchend=_e=>{_e.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=O;let ce=new Ur;this._rotatePitchHandler=new pt({clickTolerance:3,move:(_e,De)=>{let Ne=O.getBoundingClientRect(),Ye=new e.P((Ne.bottom-Ne.top)/2,(Ne.right-Ne.left)/2);return{bearingDelta:e.cx(new e.P(_e.x,De.y),De,Ye),pitchDelta:ie?-.5*(De.y-_e.y):void 0}},moveStateManager:ce,enable:!0,assignEvents:()=>{}}),this.map=y,O.addEventListener("mousedown",this.mousedown),O.addEventListener("touchstart",this.touchstart,{passive:!1}),O.addEventListener("touchcancel",this.reset)}startMove(y,O){this._rotatePitchHandler.dragStart(y,O),m.disableDrag()}move(y,O){let ie=this.map,{bearingDelta:ce,pitchDelta:_e}=this._rotatePitchHandler.dragMove(y,O)||{};ce&&ie.setBearing(ie.getBearing()+ce),_e&&ie.setPitch(ie.getPitch()+_e)}off(){let y=this.element;y.removeEventListener("mousedown",this.mousedown),y.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),y.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){m.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}let _a;function Ia(de,y,O,ie=!1){if(ie||!O.getCoveringTilesDetailsProvider().allowWorldCopies())return de?.wrap();let ce=new e.W(de.lng,de.lat);if(de=new e.W(de.lng,de.lat),y){let _e=new e.W(de.lng-360,de.lat),De=new e.W(de.lng+360,de.lat),Ne=O.locationToScreenPoint(de).distSqr(y);O.locationToScreenPoint(_e).distSqr(y)180;){let _e=O.locationToScreenPoint(de);if(_e.x>=0&&_e.y>=0&&_e.x<=O.width&&_e.y<=O.height)break;de.lng>O.center.lng?de.lng-=360:de.lng+=360}return de.lng!==ce.lng&&O.isPointOnMapSurface(O.locationToScreenPoint(de))?de:ce}let ra={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function va(de,y,O){let ie=de.classList;for(let ce in ra)ie.remove(`maplibregl-${O}-anchor-${ce}`);ie.add(`maplibregl-${O}-anchor-${y}`)}class ba extends e.E{constructor(y){if(super(),this._onClick=O=>{this.fire(new e.n("click",{originalEvent:O}))},this._onKeyPress=O=>{O.code!=="Space"&&O.code!=="Enter"||this.togglePopup()},this._onMapClick=O=>{let ie=O.originalEvent.target,ce=this._element;this._popup&&(ie===ce||ce.contains(ie))&&this.togglePopup()},this._update=O=>{if(!this._map)return;let ie=this._map.loaded()&&!this._map.isMoving();(O?.type==="terrain"||O?.type==="render"&&!ie)&&this._map.once("render",this._update),this._lngLat=Ia(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let ce="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?ce=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(ce=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let _e="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?_e="rotateX(0deg)":this._pitchAlignment==="map"&&(_e=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||O&&O.type!=="moveend"||(this._pos=this._pos.round()),this._element.style.transform=`${ra[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${_e} ${ce}`,s.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity(O?.type==="moveend")}).catch(()=>{})},this._onMove=O=>{if(!this._isDragging){let ie=this._clickTolerance||this._map._clickTolerance;this._isDragging=O.point.dist(this._pointerdownPos)>=ie}this._isDragging&&(this._pos=O.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.n("dragstart"))),this.fire(new e.n("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new e.n("dragend")),this._state="inactive"},this._addDragHandler=O=>{this._element.contains(O.originalEvent.target)&&(O.preventDefault(),this._positionDelta=O.point.sub(this._pos).add(this._offset),this._pointerdownPos=O.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=y?.anchor||"center",this._color=y?.color||"#3FB1CE",this._scale=y?.scale||1,this._draggable=y?.draggable||!1,this._clickTolerance=y?.clickTolerance||0,this._subpixelPositioning=y?.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=y?.rotation||0,this._rotationAlignment=y?.rotationAlignment||"auto",this._pitchAlignment=y?.pitchAlignment&&y.pitchAlignment!=="auto"?y.pitchAlignment:this._rotationAlignment,this.setOpacity(y?.opacity,y?.opacityWhenCovered),y?.element)this._element=y.element,this._offset=e.P.convert(y?.offset||[0,0]);else{this._defaultMarker=!0,this._element=m.create("div");let O=m.createNS("http://www.w3.org/2000/svg","svg"),ie=41,ce=27;O.setAttributeNS(null,"display","block"),O.setAttributeNS(null,"height",`${ie}px`),O.setAttributeNS(null,"width",`${ce}px`),O.setAttributeNS(null,"viewBox",`0 0 ${ce} ${ie}`);let _e=m.createNS("http://www.w3.org/2000/svg","g");_e.setAttributeNS(null,"stroke","none"),_e.setAttributeNS(null,"stroke-width","1"),_e.setAttributeNS(null,"fill","none"),_e.setAttributeNS(null,"fill-rule","evenodd");let De=m.createNS("http://www.w3.org/2000/svg","g");De.setAttributeNS(null,"fill-rule","nonzero");let Ne=m.createNS("http://www.w3.org/2000/svg","g");Ne.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Ne.setAttributeNS(null,"fill","#000000");let Ye=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let or of Ye){let vr=m.createNS("http://www.w3.org/2000/svg","ellipse");vr.setAttributeNS(null,"opacity","0.04"),vr.setAttributeNS(null,"cx","10.5"),vr.setAttributeNS(null,"cy","5.80029008"),vr.setAttributeNS(null,"rx",or.rx),vr.setAttributeNS(null,"ry",or.ry),Ne.appendChild(vr)}let lt=m.createNS("http://www.w3.org/2000/svg","g");lt.setAttributeNS(null,"fill",this._color);let ct=m.createNS("http://www.w3.org/2000/svg","path");ct.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),lt.appendChild(ct);let Ft=m.createNS("http://www.w3.org/2000/svg","g");Ft.setAttributeNS(null,"opacity","0.25"),Ft.setAttributeNS(null,"fill","#000000");let Gt=m.createNS("http://www.w3.org/2000/svg","path");Gt.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ft.appendChild(Gt);let Jt=m.createNS("http://www.w3.org/2000/svg","g");Jt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Jt.setAttributeNS(null,"fill","#FFFFFF");let it=m.createNS("http://www.w3.org/2000/svg","g");it.setAttributeNS(null,"transform","translate(8.0, 8.0)");let Rt=m.createNS("http://www.w3.org/2000/svg","circle");Rt.setAttributeNS(null,"fill","#000000"),Rt.setAttributeNS(null,"opacity","0.25"),Rt.setAttributeNS(null,"cx","5.5"),Rt.setAttributeNS(null,"cy","5.5"),Rt.setAttributeNS(null,"r","5.4999962");let qt=m.createNS("http://www.w3.org/2000/svg","circle");qt.setAttributeNS(null,"fill","#FFFFFF"),qt.setAttributeNS(null,"cx","5.5"),qt.setAttributeNS(null,"cy","5.5"),qt.setAttributeNS(null,"r","5.4999962"),it.appendChild(Rt),it.appendChild(qt),De.appendChild(Ne),De.appendChild(lt),De.appendChild(Ft),De.appendChild(Jt),De.appendChild(it),O.appendChild(De),O.setAttributeNS(null,"height",ie*this._scale+"px"),O.setAttributeNS(null,"width",ce*this._scale+"px"),this._element.appendChild(O),this._offset=e.P.convert(y?.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",O=>{O.preventDefault()}),this._element.addEventListener("mousedown",O=>{O.preventDefault()}),va(this._element,this._anchor,"marker"),y?.className)for(let O of y.className.split(" "))this._element.classList.add(O);this._popup=null}addTo(y){return this.remove(),this._map=y,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",y._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),y.getCanvasContainer().appendChild(this._element),y.on("move",this._update),y.on("moveend",this._update),y.on("terrain",this._update),y.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(y){return this._lngLat=e.W.convert(y),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(y){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),y){if(!("offset"in y.options)){let ce=Math.abs(13.5)/Math.SQRT2;y.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[ce,-1*(38.1-13.5+ce)],"bottom-right":[-ce,-1*(38.1-13.5+ce)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=y,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(y){return this._subpixelPositioning=y,this}getPopup(){return this._popup}togglePopup(){let y=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:y?(y.isOpen()?y.remove():(y.setLngLat(this._lngLat),y.addTo(this._map)),this):this}_updateOpacity(y=!1){var O,ie;let ce=(O=this._map)===null||O===void 0?void 0:O.terrain,_e=this._map.transform.isLocationOccluded(this._lngLat);if(!ce||_e){let Jt=_e?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==Jt&&(this._element.style.opacity=Jt,this._element.classList.toggle("maplibregl-marker-covered",_e)))}if(y)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let De=this._map,Ne=De.terrain.depthAtPoint(this._pos),Ye=De.terrain.getElevationForLngLat(this._lngLat,De.transform);if(De.transform.lngLatToCameraDepth(this._lngLat,Ye)-Ne<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let lt=-this._offset.y/De.transform.pixelsPerMeter,ct=Math.sin(De.getPitch()*Math.PI/180)*lt,Ft=De.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Gt=De.transform.lngLatToCameraDepth(this._lngLat,Ye+ct)-Ft>.006;!((ie=this._popup)===null||ie===void 0)&&ie.isOpen()&&Gt&&this._popup.remove(),this._element.style.opacity=Gt?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",Gt)}getOffset(){return this._offset}setOffset(y){return this._offset=e.P.convert(y),this._update(),this}addClassName(y){this._element.classList.add(y)}removeClassName(y){this._element.classList.remove(y)}toggleClassName(y){return this._element.classList.toggle(y)}setDraggable(y){return this._draggable=!!y,this._map&&(y?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(y){return this._rotation=y||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(y){return this._rotationAlignment=y||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(y){return this._pitchAlignment=y&&y!=="auto"?y:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(y,O){return(this._opacity===void 0||y===void 0&&O===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),y!==void 0&&(this._opacity=String(y)),O!==void 0&&(this._opacityWhenCovered=String(O)),this._map&&this._updateOpacity(!0),this}}let za={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Ra=0,pa=!1,En={maxWidth:100,unit:"metric"};function On(de,y,O){let ie=O?.maxWidth||100,ce=de._container.clientHeight/2,_e=de._container.clientWidth/2,De=de.unproject([_e-ie/2,ce]),Ne=de.unproject([_e+ie/2,ce]),Ye=Math.round(de.project(Ne).x-de.project(De).x),lt=Math.min(ie,Ye,de._container.clientWidth),ct=De.distanceTo(Ne);if(O?.unit==="imperial"){let Ft=3.2808*ct;Ft>5280?Kn(y,lt,Ft/5280,de._getUIString("ScaleControl.Miles")):Kn(y,lt,Ft,de._getUIString("ScaleControl.Feet"))}else O?.unit==="nautical"?Kn(y,lt,ct/1852,de._getUIString("ScaleControl.NauticalMiles")):ct>=1e3?Kn(y,lt,ct/1e3,de._getUIString("ScaleControl.Kilometers")):Kn(y,lt,ct,de._getUIString("ScaleControl.Meters"))}function Kn(de,y,O,ie){let ce=function(_e){let De=Math.pow(10,`${Math.floor(_e)}`.length-1),Ne=_e/De;return Ne=Ne>=10?10:Ne>=5?5:Ne>=3?3:Ne>=2?2:Ne>=1?1:function(Ye){let lt=Math.pow(10,Math.ceil(-Math.log(Ye)/Math.LN10));return Math.round(Ye*lt)/lt}(Ne),De*Ne}(O);de.style.width=y*(ce/O)+"px",de.innerHTML=`${ce} ${ie}`}let di={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},Oi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Pi(de){if(de){if(typeof de=="number"){let y=Math.round(Math.abs(de)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,de),"top-left":new e.P(y,y),"top-right":new e.P(-y,y),bottom:new e.P(0,-de),"bottom-left":new e.P(y,-y),"bottom-right":new e.P(-y,-y),left:new e.P(de,0),right:new e.P(-de,0)}}if(de instanceof e.P||Array.isArray(de)){let y=e.P.convert(de);return{center:y,top:y,"top-left":y,"top-right":y,bottom:y,"bottom-left":y,"bottom-right":y,left:y,right:y}}return{center:e.P.convert(de.center||[0,0]),top:e.P.convert(de.top||[0,0]),"top-left":e.P.convert(de["top-left"]||[0,0]),"top-right":e.P.convert(de["top-right"]||[0,0]),bottom:e.P.convert(de.bottom||[0,0]),"bottom-left":e.P.convert(de["bottom-left"]||[0,0]),"bottom-right":e.P.convert(de["bottom-right"]||[0,0]),left:e.P.convert(de.left||[0,0]),right:e.P.convert(de.right||[0,0])}}return Pi(new e.P(0,0))}let ko=t;l.AJAXError=e.cG,l.EXTENT=e.a6,l.Event=e.n,l.Evented=e.E,l.LngLat=e.W,l.MercatorCoordinate=e.a7,l.Point=e.P,l.addProtocol=e.cH,l.config=e.c,l.removeProtocol=e.cI,l.AttributionControl=hl,l.BoxZoomHandler=Ul,l.CanvasSource=le,l.CooperativeGesturesHandler=Vi,l.DoubleClickZoomHandler=Es,l.DragPanHandler=Js,l.DragRotateHandler=Tu,l.EdgeInsets=So,l.FullscreenControl=class extends e.E{constructor(de={}){var y;super(),this._onFullscreenChange=()=>{var O;let ie=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;!((O=ie?.shadowRoot)===null||O===void 0)&&O.fullscreenElement;)ie=ie.shadowRoot.fullscreenElement;ie===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(y=de.pseudo)!==null&&y!==void 0&&y,de?.container&&(de.container instanceof HTMLElement?this._container=de.container:e.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(de){return this._map=de,this._container||(this._container=this._map.getContainer()),this._controlContainer=m.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 de=this._fullscreenButton=m.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);m.create("span","maplibregl-ctrl-icon",de).setAttribute("aria-hidden","true"),de.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let de=this._getTitle();this._fullscreenButton.setAttribute("aria-label",de),this._fullscreenButton.title=de}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new e.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},l.GeoJSONSource=je,l.GeolocateControl=class extends e.E{constructor(de){super(),this._onSuccess=y=>{if(this._map){if(this._isOutOfMapMaxBounds(y))return this._setErrorState(),this.fire(new e.n("outofmaxbounds",y)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=y,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(y),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(y),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.n("geolocate",y)),this._finish()}},this._updateCamera=y=>{let O=new e.W(y.coords.longitude,y.coords.latitude),ie=y.coords.accuracy,ce=this._map.getBearing(),_e=e.e({bearing:ce},this.options.fitBoundsOptions),De=q.fromLngLat(O,ie);this._map.fitBounds(De,_e,{geolocateSource:!0})},this._updateMarker=y=>{if(y){let O=new e.W(y.coords.longitude,y.coords.latitude);this._accuracyCircleMarker.setLngLat(O).addTo(this._map),this._userLocationDotMarker.setLngLat(O).addTo(this._map),this._accuracy=y.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=y=>{if(this._map){if(y.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let O=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=O,this._geolocateButton.setAttribute("aria-label",O),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(y.code===3&&pa)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.n("error",y)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=y=>{if(!this._map)return;let O=y?.[0]instanceof ResizeObserverEntry;y.geolocateSource||this._watchState!=="ACTIVE_LOCK"||O||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.n("trackuserlocationend")),this.fire(new e.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",y=>{y.preventDefault()}),this._geolocateButton=m.create("button","maplibregl-ctrl-geolocate",this._container),m.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=y=>{if(this._map){if(y===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let O=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=O,this._geolocateButton.setAttribute("aria-label",O)}else{let O=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=O,this._geolocateButton.setAttribute("aria-label",O)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=m.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new ba({element:this._dotElement}),this._circleElement=m.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ba({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=e.e({},za,de)}onAdd(de){return this._map=de,this._container=m.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(y=!1){if(_a!==void 0&&!y)return _a;if(window.navigator.permissions===void 0)return _a=!!window.navigator.geolocation,_a;try{_a=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{_a=!!window.navigator.geolocation}return _a})}().then(y=>this._finishSetupUI(y)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,Ra=0,pa=!1}_isOutOfMapMaxBounds(de){let y=this._map.getMaxBounds(),O=de.coords;return y&&(O.longitudey.getEast()||O.latitudey.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let de=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&de))return;let y=this._map.project(de),O=this._map.unproject([y.x+100,y.y]),ie=de.distanceTo(O)/100,ce=2*this._accuracy/ie;this._circleElement.style.width=`${ce.toFixed(2)}px`,this._circleElement.style.height=`${ce.toFixed(2)}px`}trigger(){if(!this._setup)return e.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ra--,pa=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new e.n("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.n("trackuserlocationstart")),this.fire(new e.n("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let de;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ra++,Ra>1?(de={maximumAge:6e5,timeout:0},pa=!0):(de=this.options.positionOptions,pa=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,de)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},l.GlobeControl=class{constructor(){this._toggleProjection=()=>{var de;let y=(de=this._map.getProjection())===null||de===void 0?void 0:de.type;this._map.setProjection(y!=="mercator"&&y?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var de;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((de=this._map.getProjection())===null||de===void 0?void 0:de.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(de){return this._map=de,this._container=m.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=m.create("button","maplibregl-ctrl-globe",this._container),m.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},l.Hash=Oc,l.ImageSource=ke,l.KeyboardHandler=_o,l.LngLatBounds=q,l.LogoControl=Uc,l.Map=yr,l.MapLibreMap=yr,l.MapMouseEvent=Ol,l.MapTouchEvent=Bu,l.MapWheelEvent=af,l.Marker=ba,l.NavigationControl=class{constructor(de){this._updateZoomButtons=()=>{let y=this._map.getZoom(),O=y===this._map.getMaxZoom(),ie=y===this._map.getMinZoom();this._zoomInButton.disabled=O,this._zoomOutButton.disabled=ie,this._zoomInButton.setAttribute("aria-disabled",O.toString()),this._zoomOutButton.setAttribute("aria-disabled",ie.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(y,O)=>{let ie=this._map._getUIString(`NavigationControl.${O}`);y.title=ie,y.setAttribute("aria-label",ie)},this.options=e.e({},Kr,de),this._container=m.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",y=>y.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",y=>this._map.zoomIn({},{originalEvent:y})),m.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",y=>this._map.zoomOut({},{originalEvent:y})),m.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",y=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:y}):this._map.resetNorth({},{originalEvent:y})}),this._compassIcon=m.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(de){return this._map=de,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new $r(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(de,y){let O=m.create("button",de,this._container);return O.type="button",O.addEventListener("click",y),O}},l.Popup=class extends e.E{constructor(de){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.n("close"))),this),this._update=y=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=m.create("div","maplibregl-popup",this._map.getContainer()),this._tip=m.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let Ne of this.options.className.split(" "))this._container.classList.add(Ne);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}let O;if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Ia(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),y&&"point"in y&&y.point&&(O=y.point),this._trackPointer&&!O)return;let ie=this._flatPos=this._pos=this._trackPointer&&O?O:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&O?O:this._map.transform.locationToScreenPoint(this._lngLat));let ce=this.options.anchor,_e=Pi(this.options.offset);if(!ce){let Ne=this._container.offsetWidth,Ye=this._container.offsetHeight,lt=function(Ft){var Gt,Jt,it,Rt;return Ft?{top:(Gt=Ft.top)!==null&&Gt!==void 0?Gt:0,right:(Jt=Ft.right)!==null&&Jt!==void 0?Jt:0,bottom:(it=Ft.bottom)!==null&&it!==void 0?it:0,left:(Rt=Ft.left)!==null&&Rt!==void 0?Rt:0}:{top:0,right:0,bottom:0,left:0}}(this.options.padding),ct;ct=ie.y+_e.bottom.ythis._map.transform.height-Ye-lt.bottom?["bottom"]:[],ie.xthis._map.transform.width-Ne/2-lt.right&&ct.push("right"),ce=ct.length===0?"bottom":ct.join("-")}let De=ie.add(_e[ce]);this.options.subpixelPositioning||(De=De.round()),this._container.style.transform=`${ra[ce]} translate(${De.x}px,${De.y}px)`,va(this._container,ce,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=e.e(Object.create(di),de)}addTo(de){return this._map&&this.remove(),this._map=de,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new e.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(de){return this._lngLat=e.W.convert(de),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(de){return this.setDOMContent(document.createTextNode(de))}setHTML(de){let y=document.createDocumentFragment(),O=document.createElement("body"),ie;for(O.innerHTML=de;ie=O.firstChild,ie;)y.appendChild(ie);return this.setDOMContent(y)}getMaxWidth(){var de;return(de=this._container)===null||de===void 0?void 0:de.style.maxWidth}setMaxWidth(de){return this.options.maxWidth=de,this._update(),this}setDOMContent(de){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=m.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(de),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(de){return this._container&&this._container.classList.add(de),this}removeClassName(de){return this._container&&this._container.classList.remove(de),this}setOffset(de){return this.options.offset=de,this._update(),this}toggleClassName(de){if(this._container)return this._container.classList.toggle(de)}setSubpixelPositioning(de){this.options.subpixelPositioning=de}setPadding(de){this.options.padding=de,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=m.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 de=this._container.querySelector(Oi);de&&de.focus()}},l.RasterDEMTileSource=fe,l.RasterTileSource=ae,l.ScaleControl=class{constructor(de){this._onMove=()=>{On(this._map,this._container,this.options)},this.setUnit=y=>{this.options.unit=y,On(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},En),de)}getDefaultPosition(){return"bottom-left"}onAdd(de){return this._map=de,this._container=m.create("div","maplibregl-ctrl maplibregl-ctrl-scale",de.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},l.ScrollZoomHandler=Po,l.Style=Uu,l.TerrainControl=class{constructor(de){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=de}onAdd(de){return this._map=de,this._container=m.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=m.create("button","maplibregl-ctrl-terrain",this._container),m.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},l.TwoFingersTouchPitchHandler=Yi,l.TwoFingersTouchRotateHandler=Nn,l.TwoFingersTouchZoomHandler=$a,l.TwoFingersTouchZoomRotateHandler=Li,l.VectorTileSource=ee,l.VideoSource=ge,l.addSourceType=(de,y)=>e._(void 0,void 0,void 0,function*(){if(se(de))throw new Error(`A source type called "${de}" already exists.`);((O,ie)=>{ve[O]=ie})(de,y)}),l.clearPrewarmedResources=function(){let de=Z;de&&(de.isPreloaded()&&de.numActive()===1?(de.release(P),Z=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},l.createTileMesh=Is,l.getGlobalDispatcher=oe,l.getMaxParallelImageRequests=function(){return e.c.MAX_PARALLEL_IMAGE_REQUESTS},l.getRTLTextPluginStatus=function(){return Ge().getRTLTextPluginStatus()},l.getVersion=function(){return ko},l.getWorkerCount=function(){return j.workerCount},l.getWorkerUrl=function(){return e.c.WORKER_URL},l.importScriptInWorkers=function(de){return oe().broadcast("IS",de)},l.isTimeFrozen=function(){return c.isFrozen()},l.now=g,l.prewarm=function(){re().acquire(P)},l.restoreNow=function(){c.restoreNow()},l.setMaxParallelImageRequests=function(de){e.c.MAX_PARALLEL_IMAGE_REQUESTS=de},l.setNow=function(de){c.setNow(de)},l.setRTLTextPlugin=function(de,y){return Ge().setRTLTextPlugin(de,y)},l.setWorkerCount=function(de){j.workerCount=de},l.setWorkerUrl=function(de){e.c.WORKER_URL=de}});var k=v;return k})}}),EL=Ee({"src/plots/map/layers.js"(J,H){"use strict";var v=Vr(),x=Fs().sanitizeHTML,E=c5(),k=cv();function l(a,o){this.subplot=a,this.uid=a.uid+"-"+o,this.index=o,this.idSource="source-"+this.uid,this.idLayer=k.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=l.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=t(o)},e.needsNewImage=function(a){var o=this.subplot.map;return o.getSource(this.idSource)&&this.sourceType==="image"&&a.sourcetype==="image"&&(this.source!==a.source||JSON.stringify(this.coordinates)!==JSON.stringify(a.coordinates))},e.needsNewSource=function(a){return this.sourceType!==a.sourcetype||JSON.stringify(this.source)!==JSON.stringify(a.source)||this.layerType!==a.type},e.needsNewLayer=function(a){return this.layerType!==a.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(a){var o=this.subplot.map;o.getSource(this.idSource).updateImage({url:a.source,coordinates:a.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},e.updateSource=function(a){var o=this.subplot.map;if(o.getSource(this.idSource)&&o.removeSource(this.idSource),this.sourceType=a.sourcetype,this.source=a.source,!!t(a)){var s=r(a);o.addSource(this.idSource,s)}},e.findFollowingMapLayerId=function(a){if(a==="traces")for(var o=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function n(a){var o={},s={};switch(a.type){case"circle":v.extendFlat(s,{"circle-radius":a.circle.radius,"circle-color":a.color,"circle-opacity":a.opacity});break;case"line":v.extendFlat(s,{"line-width":a.line.width,"line-color":a.color,"line-opacity":a.opacity,"line-dasharray":a.line.dash});break;case"fill":v.extendFlat(s,{"fill-color":a.color,"fill-outline-color":a.fill.outlinecolor,"fill-opacity":a.opacity});break;case"symbol":var c=a.symbol,g=E(c.textposition,c.iconsize);v.extendFlat(o,{"icon-image":c.icon,"icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":g.anchor,"text-offset":g.offset,"symbol-placement":c.placement}),v.extendFlat(s,{"icon-color":a.color,"text-color":c.textfont.color,"text-opacity":a.opacity});break;case"raster":v.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":a.opacity});break}return{layout:o,paint:s}}function r(a){var o=a.sourcetype,s=a.source,c={type:o},g;return o==="geojson"?g="data":o==="vector"?g=typeof s=="string"?"url":"tiles":o==="raster"?(g="tiles",c.tileSize=256):o==="image"&&(g="url",c.coordinates=a.coordinates),c[g]=s,a.sourceattribution&&(c.attribution=x(a.sourceattribution)),c}H.exports=function(o,s,c){var g=new l(o,s);return g.update(c),g}}}),kL=Ee({"src/plots/map/map.js"(J,H){"use strict";var v=SL(),x=Vr(),E=Md(),k=Ri(),l=uo(),e=qf(),t=$l(),n=Gh(),r=n.drawMode,a=n.selectMode,o=uc().prepSelect,s=uc().clearOutline,c=uc().clearSelectionsCache,g=uc().selectOnClick,f=cv(),p=EL();function m(w,h){this.id=h,this.gd=w;var u=w._fullLayout,A=w._context;this.container=u._glcontainer.node(),this.isStatic=A.staticPlot,this.uid=u._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(u),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var i=m.prototype;i.plot=function(w,h,u){var A=this,b;A.map?b=new Promise(function(z,I){A.updateMap(w,h,z,I)}):b=new Promise(function(z,I){A.createMap(w,h,z,I)}),u.push(b)},i.createMap=function(w,h,u,A){var b=this,z=h[b.id],I=b.styleObj=C(z.style),N=z.bounds,R=N?[[N.west,N.south],[N.east,N.north]]:null;let B={container:b.div,style:I.style,center:_(z.center),zoom:z.zoom,bearing:z.bearing,pitch:z.pitch,maxBounds:R,interactive:!b.isStatic,canvasContextAttributes:{preserveDrawingBuffer:b.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},F=z._fitBounds;F&&(B.bounds=[[F.west,F.south],[F.east,F.north]],B.fitBoundsOptions={padding:f.fitBoundsPadding});let P=b.map=new v.Map(B).addControl(new v.AttributionControl({compact:!0}));var j={};P.on("styleimagemissing",function(Z){var Q=Z.id;if(!j[Q]&&/^[a-zA-Z0-9-]+$/.test(Q)){j[Q]=!0;var re=new Image(15,15);re.onload=function(){P.addImage(Q,re,{sdf:!0})},re.crossOrigin="Anonymous",re.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+Q+".svg"}}),P.setTransformRequest(function(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}}),P._canvas.style.left="0px",P._canvas.style.top="0px",b.rejectOnError(A),b.isStatic||b.initFx(w,h);var U=[];U.push(new Promise(function(Z){P.once("load",Z)})),U=U.concat(E.fetchTraceGeoData(w)),Promise.all(U).then(function(){F&&T(b,z),S(b,z),b.fillBelowLookup(w,h),b.updateData(w),b.updateLayout(h),b.resolveOnRender(u)}).catch(A)},i.updateMap=function(w,h,u,A){var b=this,z=b.map,I=h[this.id];b.rejectOnError(A);var N=[],R=C(I.style);JSON.stringify(b.styleObj)!==JSON.stringify(R)&&(b.styleObj=R,z.setStyle(R.style),b.traceHash={},N.push(new Promise(function(B){z.once("styledata",B)}))),N=N.concat(E.fetchTraceGeoData(w)),Promise.all(N).then(function(){b.fillBelowLookup(w,h),b.updateData(w);let B=I._fitBounds;B&&(z.fitBounds([[B.west,B.south],[B.east,B.north]],{padding:f.fitBoundsPadding,animate:!1}),T(b,I),S(b,I)),b.updateLayout(h),b.resolveOnRender(u)}).catch(A)};function T(w,h){let{center:u,zoom:A}=w.getView();h._input.center=h.center=u,h._input.zoom=h.zoom=A,h._input._fitView={center:Nr({},u),zoom:A}}function S(w,h){let u=w.getView();w.viewInitial={center:x.extendFlat({},u.center),bearing:h.bearing,pitch:h.pitch,zoom:u.zoom}}i.fillBelowLookup=function(w,h){var u=h[this.id],A=u.layers,b,z,I=this.belowLookup={},N=!1;for(b=0;b1)for(b=0;bh.project(A).x,_subplot:h},h.yaxis={_id:"y",c2p:A=>h.project(A).y,_subplot:h},h.updateFramework(w),h.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},l.setConvert(h.mockAxis,w)},i.initFx=function(w,h){var u=this,A=u.gd,b=u.map;b.on("moveend",function(N){if(u.map){var R=A._fullLayout;if(N.originalEvent||u.wheeling){var B=R[u.id];k.call("_storeDirectGUIEdit",A.layout,R._preGUI,u.getViewEdits(B));var F=u.getView();B._input.center=B.center=F.center,B._input.zoom=B.zoom=F.zoom,B._input.bearing=B.bearing=F.bearing,B._input.pitch=B.pitch=F.pitch,A.emit("plotly_relayout",u.getViewEditsWithDerived(F))}N.originalEvent&&N.originalEvent.type==="mouseup"?u.dragging=!1:u.wheeling&&(u.wheeling=!1),R&&R._rehover&&R._rehover()}}),b.on("wheel",function(){u.wheeling=!0}),b.on("mousemove",function(N){var R=u.div.getBoundingClientRect(),B=[N.originalEvent.offsetX,N.originalEvent.offsetY];N.target.getBoundingClientRect=function(){return R},u.xaxis.p2c=function(){return b.unproject(B).lng},u.yaxis.p2c=function(){return b.unproject(B).lat},A._fullLayout._rehover=function(){A._fullLayout._hoversubplot===u.id&&A._fullLayout[u.id]&&t.hover(A,N,u.id)},t.hover(A,N,u.id),A._fullLayout._hoversubplot=u.id});function z(){t.loneUnhover(h._hoverlayer)}b.on("dragstart",function(){u.dragging=!0,z()}),b.on("zoomstart",z),b.on("mouseout",function(){A._fullLayout._hoversubplot=null});function I(){var N=u.getView();A.emit("plotly_relayouting",u.getViewEditsWithDerived(N))}b.on("drag",I),b.on("zoom",I),b.on("dblclick",function(){var N=A._fullLayout[u.id];k.call("_storeDirectGUIEdit",A.layout,A._fullLayout._preGUI,u.getViewEdits(N));var R=u.viewInitial;b.setCenter(_(R.center)),b.setZoom(R.zoom),b.setBearing(R.bearing),b.setPitch(R.pitch);var B=u.getView();N._input.center=N.center=B.center,N._input.zoom=N.zoom=B.zoom,N._input.bearing=N.bearing=B.bearing,N._input.pitch=N.pitch=B.pitch,A.emit("plotly_doubleclick",null),A.emit("plotly_relayout",u.getViewEditsWithDerived(B))}),u.clearOutline=function(){c(u.dragOptions),s(u.dragOptions.gd)},u.onClickInPanFn=function(N){return function(R){var B=A._fullLayout.clickmode;B.indexOf("select")>-1&&g(R.originalEvent,A,[u.xaxis],[u.yaxis],u.id,N),B.indexOf("event")>-1&&t.click(A,R.originalEvent)}}},i.updateFx=function(w){var h=this,u=h.map,A=h.gd;if(h.isStatic)return;function b(R){var B=h.map.unproject(R);return[B.lng,B.lat]}var z=w.dragmode,I;I=function(R,B){if(B.isRect){var F=R.range={};F[h.id]=[b([B.xmin,B.ymin]),b([B.xmax,B.ymax])]}else{var P=R.lassoPoints={};P[h.id]=B.map(b)}};var N=h.dragOptions;h.dragOptions=x.extendDeep(N||{},{dragmode:w.dragmode,element:h.div,gd:A,plotinfo:{id:h.id,domain:w[h.id].domain,xaxis:h.xaxis,yaxis:h.yaxis,fillRangeItems:I},xaxes:[h.xaxis],yaxes:[h.yaxis],subplot:h.id}),u.off("click",h.onClickInPanHandler),a(z)||r(z)?(u.dragPan.disable(),u.on("zoomstart",h.clearOutline),h.dragOptions.prepFn=function(R,B,F){o(R,B,F,h.dragOptions,z)},e.init(h.dragOptions)):(u.dragPan.enable(),u.off("zoomstart",h.clearOutline),h.div.onmousedown=null,h.div.ontouchstart=null,h.div.removeEventListener("touchstart",h.div._ontouchstart),h.onClickInPanHandler=h.onClickInPanFn(h.dragOptions),u.on("click",h.onClickInPanHandler))},i.updateFramework=function(w){var h=w[this.id].domain,u=w._size,A=this.div.style;A.width=u.w*(h.x[1]-h.x[0])+"px",A.height=u.h*(h.y[1]-h.y[0])+"px",A.left=u.l+h.x[0]*u.w+"px",A.top=u.t+(1-h.y[1])*u.h+"px",this.xaxis._offset=u.l+h.x[0]*u.w,this.xaxis._length=u.w*(h.x[1]-h.x[0]),this.yaxis._offset=u.t+(1-h.y[1])*u.h,this.yaxis._length=u.h*(h.y[1]-h.y[0])},i.updateLayers=function(w){var h=w[this.id],u=h.layers,A=this.layerList,b;if(u.length!==A.length){for(b=0;bCL});function CL(J,H){let v=[];for(let t of J){if(t.subplot!==H||t.visible!==!0)continue;if(t.type==="choroplethmap")return null;let{lat:n,lon:r}=t;if(!r||!n)continue;let a=Math.min(r.length,n.length);for(let o=0;oh/2){var u=M.split("|").join("
");_.text(u).attr("data-unformatted",u).call(t.convertToTspans,a),w=e.bBox(_.node())}_.attr("transform",v(-3,-w.height+8)),C.insert("rect",".static-attribution").attr({x:-w.width-6,y:-w.height-3,width:w.width+6,height:w.height+3,fill:"rgba(255, 255, 255, 0.75)"});var A=1;w.width+6>h&&(A=h/(w.width+6));var b=[c.l+c.w*p.x[1],c.t+c.h*(1-p.y[0])];C.attr("transform",v(b[0],b[1])+x(A))}},J.updateFx=function(a){for(var o=a._fullLayout,s=o._subplots[r],c=0;c=0;n--)e.removeLayer(t[n][1])},l.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},H.exports=function(t,n){var r=n[0].trace,a=new k(t,r.uid),o=a.sourceId,s=v(n),c=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,c),n[0].trace._glTrace=a,a}}}),zL=Ee({"src/traces/choroplethmap/index.js"(J,H){"use strict";H.exports={attributes:d5(),supplyDefaults:RL(),colorbar:Xp(),calc:pw(),plot:FL(),hoverPoints:mw(),eventData:gw(),selectPoints:yw(),styleOnSelect:function(v,x){if(x){var E=x[0].trace;E._glTrace.updateOnSelect(x)}},getBelow:function(v,x){for(var E=x.getMapLayers(),k=E.length-2;k>=0;k--){var l=E[k].id;if(typeof l=="string"&&l.indexOf("water")===0){for(var e=k+1;e0?+p[g]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:S},properties:M})}}var _=k.extractOpts(r),w=_.reversescale?k.flipScale(_.colorscale):_.colorscale,h=w[0][1],u=E.opacity(h)<1?h:E.addOpacity(h,0),A=["interpolate",["linear"],["heatmap-density"],0,u];for(g=1;g=0;t--)l.removeLayer(e[t][1])},k.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},H.exports=function(e,t){var n=t[0].trace,r=new E(e,n.uid),a=r.sourceId,o=v(t),s=r.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(a,{type:"geojson",data:o.geojson}),r._addLayers(o,s),r}}}),qL=Ee({"src/traces/densitymap/hover.js"(J,H){"use strict";var v=uo(),x=Wy().hoverPoints,E=Wy().getExtraText;H.exports=function(l,e,t){var n=x(l,e,t);if(n){var r=n[0],a=r.cd,o=a[0].trace,s=a[r.index];if(delete r.color,"z"in s){var c=r.subplot.mockAxis;r.z=s.z,r.zLabel=v.tickText(c,c.c2l(s.z),"hover").text}return r.extraText=E(o,s,a[0].t.labels),[r]}}}}),VL=Ee({"src/traces/densitymap/event_data.js"(J,H){"use strict";H.exports=function(x,E){return x.lon=E.lon,x.lat=E.lat,x.z=E.z,x}}}),HL=Ee({"src/traces/densitymap/index.js"(J,H){"use strict";H.exports={attributes:p5(),supplyDefaults:NL(),colorbar:Xp(),formatLabels:u5(),calc:OL(),plot:UL(),hoverPoints:qL(),eventData:VL(),getBelow:function(v,x){for(var E=x.getMapLayers(),k=0;kT[z%T.length];i("color",m.label.map((z,I)=>E.addOpacity(S(I),.8))),i("customdata");var M=a.link||{},C=e.newContainer(o,"link");function _(z,I){return v.coerce(M,C,x.link,z,I)}_("label"),_("arrowlen"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",a.hoverinfo),l(M,C,_,f),_("hovertemplate"),_("sort");var w=E.luminosity(c.paper_bgcolor)<.333,h=w?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",u=_("color",h);function A(z){if(!E.isValid(z))return z;let I=E.opacity(z);return I<=.8?E.addOpacity(z,I+.2):w?E.brighten(z,10):E.adjustLightness(z,-10)}_("hovercolor",Array.isArray(u)?u.map(A):A(u)),_("customdata"),t(M,C,{name:"colorscales",handleItemDefaults:n}),k(o,c,g),g("orientation"),g("direction"),g("valueformat"),g("valuesuffix");let b=m.x.length&&m.y.length?"freeform":void 0;g("arrangement",b),v.coerceFont(g,"textfont",c.font,{autoShadowDflt:!0}),o._length=null};function n(r,a){function o(s,c){return v.coerce(r,a,x.link.colorscales,s,c)}o("label"),o("cmin"),o("cmax"),o("colorscale")}}}),g5=Ee({"node_modules/strongly-connected-components/scc.js"(J,H){"use strict";H.exports=v;function v(x){for(var E=x.length,k=new Array(E),l=new Array(E),e=new Array(E),t=new Array(E),n=new Array(E),r=new Array(E),a=0;a0;){i=S[S.length-1];var M=x[i];if(t[i]=0&&r[i].push(n[_])}t[i]=C}else{if(l[i]===k[i]){for(var w=[],h=[],u=0,C=T.length-1;C>=0;--C){var A=T[C];if(e[A]=!1,w.push(A),h.push(r[A]),u+=r[A].length,n[A]=s.length,A===i){T.length=C;break}}s.push(w);for(var b=new Array(u),C=0;C_&&(_=o.source[T]),o.target[T]>_&&(_=o.target[T]);var w=_+1;r.node._count=w;var h,u=r.node.groups,A={};for(T=0;T0&&l(B,w)&&l(F,w)&&!(A.hasOwnProperty(B)&&A.hasOwnProperty(F)&&A[B]===A[F])){A.hasOwnProperty(F)&&(F=A[F]),A.hasOwnProperty(B)&&(B=A[B]),B=+B,F=+F,p[B]=p[F]=!0;var P="";o.label&&o.label[T]&&(P=o.label[T]);var j=null;P&&m.hasOwnProperty(P)&&(j=m[P]),s.push({pointNumber:T,label:P,color:c?o.color[T]:o.color,hovercolor:g?o.hovercolor[T]:o.hovercolor,customdata:f?o.customdata[T]:o.customdata,concentrationscale:j,source:B,target:F,value:+R}),N.source.push(B),N.target.push(F)}}var U=w+u.length,Z=k(a.color),Q=k(a.customdata),re=[];for(T=0;Tw-1,childrenNodes:[],pointNumber:T,label:ne,color:Z?a.color[T]:a.color,customdata:Q?a.customdata[T]:a.customdata})}var oe=!1;return n(U,N.source,N.target)&&(oe=!0),{circular:oe,links:s,nodes:re,groups:u,groupLookup:A}}function n(r,a,o){for(var s=x.init2dArray(r,0),c=0;c1})}H.exports=function(a,o){var s=t(o);return E({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),XL=Ee({"node_modules/d3-quadtree/dist/d3-quadtree.js"(J,H){(function(v,x){typeof J=="object"&&typeof H<"u"?x(J):(v=v||self,x(v.d3=v.d3||{}))})(J,function(v){"use strict";function x(w){var h=+this._x.call(null,w),u=+this._y.call(null,w);return E(this.cover(h,u),h,u,w)}function E(w,h,u,A){if(isNaN(h)||isNaN(u))return w;var b,z=w._root,I={data:A},N=w._x0,R=w._y0,B=w._x1,F=w._y1,P,j,U,Z,Q,re,ne,oe;if(!z)return w._root=I,w;for(;z.length;)if((Q=h>=(P=(N+B)/2))?N=P:B=P,(re=u>=(j=(R+F)/2))?R=j:F=j,b=z,!(z=z[ne=re<<1|Q]))return b[ne]=I,w;if(U=+w._x.call(null,z.data),Z=+w._y.call(null,z.data),h===U&&u===Z)return I.next=z,b?b[ne]=I:w._root=I,w;do b=b?b[ne]=new Array(4):w._root=new Array(4),(Q=h>=(P=(N+B)/2))?N=P:B=P,(re=u>=(j=(R+F)/2))?R=j:F=j;while((ne=re<<1|Q)===(oe=(Z>=j)<<1|U>=P));return b[oe]=z,b[ne]=I,w}function k(w){var h,u,A=w.length,b,z,I=new Array(A),N=new Array(A),R=1/0,B=1/0,F=-1/0,P=-1/0;for(u=0;uF&&(F=b),zP&&(P=z));if(R>F||B>P)return this;for(this.cover(R,B).cover(F,P),u=0;uw||w>=b||A>h||h>=z;)switch(B=(hF||(N=Z.y0)>P||(R=Z.x1)=ne)<<1|w>=re)&&(Z=j[j.length-1],j[j.length-1]=j[j.length-1-Q],j[j.length-1-Q]=Z)}else{var oe=w-+this._x.call(null,U.data),V=h-+this._y.call(null,U.data),$=oe*oe+V*V;if($=(j=(I+R)/2))?I=j:R=j,(Q=P>=(U=(N+B)/2))?N=U:B=U,h=u,!(u=u[re=Q<<1|Z]))return this;if(!u.length)break;(h[re+1&3]||h[re+2&3]||h[re+3&3])&&(A=h,ne=re)}for(;u.data!==w;)if(b=u,!(u=u.next))return this;return(z=u.next)&&delete u.next,b?(z?b.next=z:delete b.next,this):h?(z?h[re]=z:delete h[re],(u=h[0]||h[1]||h[2]||h[3])&&u===(h[3]||h[2]||h[1]||h[0])&&!u.length&&(A?A[ne]=u:this._root=u),this):(this._root=z,this)}function o(w){for(var h=0,u=w.length;h=p.length)return i!=null&&_.sort(i),T!=null?T(_):_;for(var A=-1,b=_.length,z=p[w++],I,N,R=k(),B,F=h();++Ap.length)return _;var h,u=m[w-1];return T!=null&&w>=p.length?h=_.entries():(h=[],_.each(function(A,b){h.push({key:b,values:C(A,w)})})),u!=null?h.sort(function(A,b){return u(A.key,b.key)}):h}return S={object:function(_){return M(_,0,e,t)},map:function(_){return M(_,0,n,r)},entries:function(_){return C(M(_,0,n,r),0)},key:function(_){return p.push(_),S},sortKeys:function(_){return m[p.length-1]=_,S},sortValues:function(_){return i=_,S},rollup:function(_){return T=_,S}}}function e(){return{}}function t(p,m,i){p[m]=i}function n(){return k()}function r(p,m,i){p.set(m,i)}function a(){}var o=k.prototype;a.prototype=s.prototype={constructor:a,has:o.has,add:function(p){return p+="",this[x+p]=p,this},remove:o.remove,clear:o.clear,values:o.keys,size:o.size,empty:o.empty,each:o.each};function s(p,m){var i=new a;if(p instanceof a)p.each(function(M){i.add(M)});else if(p){var T=-1,S=p.length;if(m==null)for(;++T=0&&(o=a.slice(s+1),a=a.slice(0,s)),a&&!r.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:o}})}k.prototype=E.prototype={constructor:k,on:function(n,r){var a=this._,o=l(n+"",a),s,c=-1,g=o.length;if(arguments.length<2){for(;++c0)for(var a=new Array(s),o=0,s,c;o=0&&w._call.call(null,h),w=w._next;--x}function i(){r=(n=o.now())+a,x=E=0;try{m()}finally{x=0,S(),r=0}}function T(){var w=o.now(),h=w-n;h>l&&(a-=h,n=w)}function S(){for(var w,h=e,u,A=1/0;h;)h._call?(A>h._time&&(A=h._time),w=h,h=h._next):(u=h._next,h._next=null,h=w?w._next=u:e=u);t=w,M(A)}function M(w){if(!x){E&&(E=clearTimeout(E));var h=w-r;h>24?(w<1/0&&(E=setTimeout(i,w-o.now()-a)),k&&(k=clearInterval(k))):(k||(n=o.now(),k=setInterval(T,l)),x=1,s(i))}}function C(w,h,u){var A=new f;return h=h==null?0:+h,A.restart(function(b){A.stop(),w(b+h)},h,u),A}function _(w,h,u){var A=new f,b=h;return h==null?(A.restart(w,h,u),A):(h=+h,u=u==null?c():+u,A.restart(function z(I){I+=b,A.restart(z,b+=h,u),w(I)},h,u),A)}v.interval=_,v.now=c,v.timeout=C,v.timer=p,v.timerFlush=m,Object.defineProperty(v,"__esModule",{value:!0})})}}),KL=Ee({"node_modules/d3-force/dist/d3-force.js"(J,H){(function(v,x){typeof J=="object"&&typeof H<"u"?x(J,XL(),y5(),$L(),ZL()):x(v.d3=v.d3||{},v.d3,v.d3,v.d3,v.d3)})(J,function(v,x,E,k,l){"use strict";function e(w,h){var u;w==null&&(w=0),h==null&&(h=0);function A(){var b,z=u.length,I,N=0,R=0;for(b=0;bP.index){var ee=j-X.x-X.vx,ae=U-X.y-X.vy,fe=ee*ee+ae*ae;fej+W||KU+W||GR.r&&(R.r=R[B].r)}function N(){if(h){var R,B=h.length,F;for(u=new Array(B),R=0;R1?(Q==null?N.remove(Z):N.set(Z,U(Q)),h):N.get(Z)},find:function(Z,Q,re){var ne=0,oe=w.length,V,$,K,G,X;for(re==null?re=1/0:re*=re,ne=0;ne1?(B.on(Z,Q),h):B.on(Z)}}}function S(){var w,h,u,A=t(-30),b,z=1,I=1/0,N=.81;function R(j){var U,Z=w.length,Q=x.quadtree(w,f,p).visitAfter(F);for(u=j,U=0;U=I)return;(j.data!==h||j.next)&&(re===0&&(re=n(),V+=re*re),ne===0&&(ne=n(),V+=ne*ne),VIt?1:$t>=It?0:NaN}function E($t){let It=$t,ir=$t;$t.length===1&&(It=(sa,aa)=>$t(sa)-aa,ir=k($t));function cr(sa,aa,xa,ja){for(xa==null&&(xa=0),ja==null&&(ja=sa.length);xa>>1;ir(sa[Oa],aa)<0?xa=Oa+1:ja=Oa}return xa}function fr(sa,aa,xa,ja){for(xa==null&&(xa=0),ja==null&&(ja=sa.length);xa>>1;ir(sa[Oa],aa)>0?ja=Oa:xa=Oa+1}return xa}function Ir(sa,aa,xa,ja){xa==null&&(xa=0),ja==null&&(ja=sa.length);let Oa=cr(sa,aa,xa,ja-1);return Oa>xa&&It(sa[Oa-1],aa)>-It(sa[Oa],aa)?Oa-1:Oa}return{left:cr,center:Ir,right:fr}}function k($t){return(It,ir)=>x($t(It),ir)}function l($t){return $t===null?NaN:+$t}function*e($t,It){if(It===void 0)for(let ir of $t)ir!=null&&(ir=+ir)>=ir&&(yield ir);else{let ir=-1;for(let cr of $t)(cr=It(cr,++ir,$t))!=null&&(cr=+cr)>=cr&&(yield cr)}}let t=E(x),n=t.right,r=t.left,a=E(l).center;function o($t,It){let ir=0;if(It===void 0)for(let cr of $t)cr!=null&&(cr=+cr)>=cr&&++ir;else{let cr=-1;for(let fr of $t)(fr=It(fr,++cr,$t))!=null&&(fr=+fr)>=fr&&++ir}return ir}function s($t){return $t.length|0}function c($t){return!($t>0)}function g($t){return typeof $t!="object"||"length"in $t?$t:Array.from($t)}function f($t){return It=>$t(...It)}function p(...$t){let It=typeof $t[$t.length-1]=="function"&&f($t.pop());$t=$t.map(g);let ir=$t.map(s),cr=$t.length-1,fr=new Array(cr+1).fill(0),Ir=[];if(cr<0||ir.some(c))return Ir;for(;;){Ir.push(fr.map((aa,xa)=>$t[xa][aa]));let sa=cr;for(;++fr[sa]===ir[sa];){if(sa===0)return It?Ir.map(It):Ir;fr[sa--]=0}}}function m($t,It){var ir=0,cr=0;return Float64Array.from($t,It===void 0?fr=>ir+=+fr||0:fr=>ir+=+It(fr,cr++,$t)||0)}function i($t,It){return It<$t?-1:It>$t?1:It>=$t?0:NaN}function T($t,It){let ir=0,cr,fr=0,Ir=0;if(It===void 0)for(let sa of $t)sa!=null&&(sa=+sa)>=sa&&(cr=sa-fr,fr+=cr/++ir,Ir+=cr*(sa-fr));else{let sa=-1;for(let aa of $t)(aa=It(aa,++sa,$t))!=null&&(aa=+aa)>=aa&&(cr=aa-fr,fr+=cr/++ir,Ir+=cr*(aa-fr))}if(ir>1)return Ir/(ir-1)}function S($t,It){let ir=T($t,It);return ir&&Math.sqrt(ir)}function M($t,It){let ir,cr;if(It===void 0)for(let fr of $t)fr!=null&&(ir===void 0?fr>=fr&&(ir=cr=fr):(ir>fr&&(ir=fr),cr=Ir&&(ir=cr=Ir):(ir>Ir&&(ir=Ir),cr0){for(sa=It[--ir];ir>0&&(cr=sa,fr=It[--ir],sa=cr+fr,Ir=fr-(sa-cr),!Ir););ir>0&&(Ir<0&&It[ir-1]<0||Ir>0&&It[ir-1]>0)&&(fr=Ir*2,cr=sa+fr,fr==cr-sa&&(sa=cr))}return sa}}function _($t,It){let ir=new C;if(It===void 0)for(let cr of $t)(cr=+cr)&&ir.add(cr);else{let cr=-1;for(let fr of $t)(fr=+It(fr,++cr,$t))&&ir.add(fr)}return+ir}function w($t,It){let ir=new C,cr=-1;return Float64Array.from($t,It===void 0?fr=>ir.add(+fr||0):fr=>ir.add(+It(fr,++cr,$t)||0))}class h extends Map{constructor(It,ir=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:ir}}),It!=null)for(let[cr,fr]of It)this.set(cr,fr)}get(It){return super.get(A(this,It))}has(It){return super.has(A(this,It))}set(It,ir){return super.set(b(this,It),ir)}delete(It){return super.delete(z(this,It))}}class u extends Set{constructor(It,ir=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:ir}}),It!=null)for(let cr of It)this.add(cr)}has(It){return super.has(A(this,It))}add(It){return super.add(b(this,It))}delete(It){return super.delete(z(this,It))}}function A({_intern:$t,_key:It},ir){let cr=It(ir);return $t.has(cr)?$t.get(cr):ir}function b({_intern:$t,_key:It},ir){let cr=It(ir);return $t.has(cr)?$t.get(cr):($t.set(cr,ir),ir)}function z({_intern:$t,_key:It},ir){let cr=It(ir);return $t.has(cr)&&(ir=$t.get(ir),$t.delete(cr)),ir}function I($t){return $t!==null&&typeof $t=="object"?$t.valueOf():$t}function N($t){return $t}function R($t,...It){return Q($t,N,N,It)}function B($t,...It){return Q($t,Array.from,N,It)}function F($t,It,...ir){return Q($t,N,It,ir)}function P($t,It,...ir){return Q($t,Array.from,It,ir)}function j($t,...It){return Q($t,N,Z,It)}function U($t,...It){return Q($t,Array.from,Z,It)}function Z($t){if($t.length!==1)throw new Error("duplicate key");return $t[0]}function Q($t,It,ir,cr){return function fr(Ir,sa){if(sa>=cr.length)return ir(Ir);let aa=new h,xa=cr[sa++],ja=-1;for(let Oa of Ir){let An=xa(Oa,++ja,Ir),un=aa.get(An);un?un.push(Oa):aa.set(An,[Oa])}for(let[Oa,An]of aa)aa.set(Oa,fr(An,sa));return It(aa)}($t,0)}function re($t,It){return Array.from(It,ir=>$t[ir])}function ne($t,...It){if(typeof $t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");$t=Array.from($t);let[ir=x]=It;if(ir.length===1||It.length>1){let cr=Uint32Array.from($t,(fr,Ir)=>Ir);return It.length>1?(It=It.map(fr=>$t.map(fr)),cr.sort((fr,Ir)=>{for(let sa of It){let aa=x(sa[fr],sa[Ir]);if(aa)return aa}})):(ir=$t.map(ir),cr.sort((fr,Ir)=>x(ir[fr],ir[Ir]))),re($t,cr)}return $t.sort(ir)}function oe($t,It,ir){return(It.length===1?ne(F($t,It,ir),([cr,fr],[Ir,sa])=>x(fr,sa)||x(cr,Ir)):ne(R($t,ir),([cr,fr],[Ir,sa])=>It(fr,sa)||x(cr,Ir))).map(([cr])=>cr)}var V=Array.prototype,$=V.slice;function K($t){return function(){return $t}}var G=Math.sqrt(50),X=Math.sqrt(10),q=Math.sqrt(2);function W($t,It,ir){var cr,fr=-1,Ir,sa,aa;if(It=+It,$t=+$t,ir=+ir,$t===It&&ir>0)return[$t];if((cr=It<$t)&&(Ir=$t,$t=It,It=Ir),(aa=ee($t,It,ir))===0||!isFinite(aa))return[];if(aa>0){let xa=Math.round($t/aa),ja=Math.round(It/aa);for(xa*aa<$t&&++xa,ja*aa>It&&--ja,sa=new Array(Ir=ja-xa+1);++frIt&&--ja,sa=new Array(Ir=ja-xa+1);++fr=0?(Ir>=G?10:Ir>=X?5:Ir>=q?2:1)*Math.pow(10,fr):-Math.pow(10,-fr)/(Ir>=G?10:Ir>=X?5:Ir>=q?2:1)}function ae($t,It,ir){var cr=Math.abs(It-$t)/Math.max(0,ir),fr=Math.pow(10,Math.floor(Math.log(cr)/Math.LN10)),Ir=cr/fr;return Ir>=G?fr*=10:Ir>=X?fr*=5:Ir>=q&&(fr*=2),It<$t?-fr:fr}function fe($t,It,ir){let cr;for(;;){let fr=ee($t,It,ir);if(fr===cr||fr===0||!isFinite(fr))return[$t,It];fr>0?($t=Math.floor($t/fr)*fr,It=Math.ceil(It/fr)*fr):fr<0&&($t=Math.ceil($t*fr)/fr,It=Math.floor(It*fr)/fr),cr=fr}}function ye($t){return Math.ceil(Math.log(o($t))/Math.LN2)+1}function xe(){var $t=N,It=M,ir=ye;function cr(fr){Array.isArray(fr)||(fr=Array.from(fr));var Ir,sa=fr.length,aa,xa=new Array(sa);for(Ir=0;Ir=An)if(ni>=An&&It===M){let ci=ee(Oa,An,Mi);isFinite(ci)&&(ci>0?An=(Math.floor(An/ci)+1)*ci:ci<0&&(An=(Math.ceil(An*-ci)+1)/-ci))}else un.pop()}for(var Ja=un.length;un[0]<=Oa;)un.shift(),--Ja;for(;un[Ja-1]>An;)un.pop(),--Ja;var ei=new Array(Ja+1),Fn;for(Ir=0;Ir<=Ja;++Ir)Fn=ei[Ir]=[],Fn.x0=Ir>0?un[Ir-1]:Oa,Fn.x1=Ir=cr)&&(ir=cr);else{let cr=-1;for(let fr of $t)(fr=It(fr,++cr,$t))!=null&&(ir=fr)&&(ir=fr)}return ir}function Me($t,It){let ir;if(It===void 0)for(let cr of $t)cr!=null&&(ir>cr||ir===void 0&&cr>=cr)&&(ir=cr);else{let cr=-1;for(let fr of $t)(fr=It(fr,++cr,$t))!=null&&(ir>fr||ir===void 0&&fr>=fr)&&(ir=fr)}return ir}function Ie($t,It,ir=0,cr=$t.length-1,fr=x){for(;cr>ir;){if(cr-ir>600){let xa=cr-ir+1,ja=It-ir+1,Oa=Math.log(xa),An=.5*Math.exp(2*Oa/3),un=.5*Math.sqrt(Oa*An*(xa-An)/xa)*(ja-xa/2<0?-1:1),Ja=Math.max(ir,Math.floor(It-ja*An/xa+un)),ei=Math.min(cr,Math.floor(It+(xa-ja)*An/xa+un));Ie($t,It,Ja,ei,fr)}let Ir=$t[It],sa=ir,aa=cr;for(qe($t,ir,It),fr($t[cr],Ir)>0&&qe($t,ir,cr);sa0;)--aa}fr($t[ir],Ir)===0?qe($t,ir,aa):(++aa,qe($t,aa,cr)),aa<=It&&(ir=aa+1),It<=aa&&(cr=aa-1)}return $t}function qe($t,It,ir){let cr=$t[It];$t[It]=$t[ir],$t[ir]=cr}function je($t,It,ir){if($t=Float64Array.from(e($t,ir)),!!(cr=$t.length)){if((It=+It)<=0||cr<2)return Me($t);if(It>=1)return Ae($t);var cr,fr=(cr-1)*It,Ir=Math.floor(fr),sa=Ae(Ie($t,Ir).subarray(0,Ir+1)),aa=Me($t.subarray(Ir+1));return sa+(aa-sa)*(fr-Ir)}}function ke($t,It,ir=l){if(cr=$t.length){if((It=+It)<=0||cr<2)return+ir($t[0],0,$t);if(It>=1)return+ir($t[cr-1],cr-1,$t);var cr,fr=(cr-1)*It,Ir=Math.floor(fr),sa=+ir($t[Ir],Ir,$t),aa=+ir($t[Ir+1],Ir+1,$t);return sa+(aa-sa)*(fr-Ir)}}function ge($t,It,ir){return Math.ceil((ir-It)/(2*(je($t,.75)-je($t,.25))*Math.pow(o($t),-1/3)))}function le($t,It,ir){return Math.ceil((ir-It)/(3.5*S($t)*Math.pow(o($t),-1/3)))}function ve($t,It){let ir,cr=-1,fr=-1;if(It===void 0)for(let Ir of $t)++fr,Ir!=null&&(ir=Ir)&&(ir=Ir,cr=fr);else for(let Ir of $t)(Ir=It(Ir,++fr,$t))!=null&&(ir=Ir)&&(ir=Ir,cr=fr);return cr}function se($t,It){let ir=0,cr=0;if(It===void 0)for(let fr of $t)fr!=null&&(fr=+fr)>=fr&&(++ir,cr+=fr);else{let fr=-1;for(let Ir of $t)(Ir=It(Ir,++fr,$t))!=null&&(Ir=+Ir)>=Ir&&(++ir,cr+=Ir)}if(ir)return cr/ir}function Te($t,It){return je($t,.5,It)}function*Fe($t){for(let It of $t)yield*ai(It)}function We($t){return Array.from(Fe($t))}function Ge($t,It){let ir,cr=-1,fr=-1;if(It===void 0)for(let Ir of $t)++fr,Ir!=null&&(ir>Ir||ir===void 0&&Ir>=Ir)&&(ir=Ir,cr=fr);else for(let Ir of $t)(Ir=It(Ir,++fr,$t))!=null&&(ir>Ir||ir===void 0&&Ir>=Ir)&&(ir=Ir,cr=fr);return cr}function gt($t,It=mt){let ir=[],cr,fr=!1;for(let Ir of $t)fr&&ir.push(It(cr,Ir)),cr=Ir,fr=!0;return ir}function mt($t,It){return[$t,It]}function Tt($t,It,ir){$t=+$t,It=+It,ir=(fr=arguments.length)<2?(It=$t,$t=0,1):fr<3?1:+ir;for(var cr=-1,fr=Math.max(0,Math.ceil((It-$t)/ir))|0,Ir=new Array(fr);++cr0:x(sa,sa)===0)&&(ir=Ir,fr=sa,cr=!0)}}else for(let fr of $t)(cr?It(fr,ir)>0:It(fr,fr)===0)&&(ir=fr,cr=!0);return ir}function _r($t,It=x){if(It.length===1)return ve($t,It);let ir,cr=-1,fr=-1;for(let Ir of $t)++fr,(cr<0?It(Ir,Ir)===0:It(Ir,ir)>0)&&(ir=Ir,cr=fr);return cr}function Zt($t,It){let ir=Kt($t,It);return ir<0?void 0:ir}var sr=Ot(Math.random);function Ot($t){return function(ir,cr=0,fr=ir.length){let Ir=fr-(cr=+cr);for(;Ir;){let sa=$t()*Ir--|0,aa=ir[Ir+cr];ir[Ir+cr]=ir[sa+cr],ir[sa+cr]=aa}return ir}}function vt($t,It){let ir=0;if(It===void 0)for(let cr of $t)(cr=+cr)&&(ir+=cr);else{let cr=-1;for(let fr of $t)(fr=+It(fr,++cr,$t))&&(ir+=fr)}return ir}function ht($t){if(!(Ir=$t.length))return[];for(var It=-1,ir=Me($t,Re),cr=new Array(ir);++ItIt(ir,cr,$t))}function Mt($t,It,ir){if(typeof It!="function")throw new TypeError("reducer is not a function");let cr=$t[Symbol.iterator](),fr,Ir,sa=-1;if(arguments.length<3){if({done:fr,value:ir}=cr.next(),fr)return;++sa}for(;{done:fr,value:Ir}=cr.next(),!fr;)ir=It(ir,Ir,++sa,$t);return ir}function dt($t){if(typeof $t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from($t).reverse()}function Dt($t,...It){$t=new Set($t);for(let ir of It)for(let cr of ir)$t.delete(cr);return $t}function Ct($t,It){let ir=It[Symbol.iterator](),cr=new Set;for(let fr of $t){if(cr.has(fr))return!1;let Ir,sa;for(;({value:Ir,done:sa}=ir.next())&&!sa;){if(Object.is(fr,Ir))return!1;cr.add(Ir)}}return!0}function Vt($t){return $t instanceof Set?$t:new Set($t)}function Ht($t,...It){$t=new Set($t),It=It.map(Vt);e:for(let ir of $t)for(let cr of It)if(!cr.has(ir)){$t.delete(ir);continue e}return $t}function Wt($t,It){let ir=$t[Symbol.iterator](),cr=new Set;for(let fr of It){if(cr.has(fr))continue;let Ir,sa;for(;{value:Ir,done:sa}=ir.next();){if(sa)return!1;if(cr.add(Ir),Object.is(fr,Ir))break}}return!0}function Sr($t,It){return Wt(It,$t)}function ia(...$t){let It=new Set;for(let ir of $t)for(let cr of ir)It.add(cr);return It}v.Adder=C,v.InternMap=h,v.InternSet=u,v.ascending=x,v.bin=xe,v.bisect=n,v.bisectCenter=a,v.bisectLeft=r,v.bisectRight=n,v.bisector=E,v.count=o,v.cross=p,v.cumsum=m,v.descending=i,v.deviation=S,v.difference=Dt,v.disjoint=Ct,v.every=He,v.extent=M,v.fcumsum=w,v.filter=Ze,v.fsum=_,v.greatest=ar,v.greatestIndex=_r,v.group=R,v.groupSort=oe,v.groups=B,v.histogram=xe,v.index=j,v.indexes=U,v.intersection=Ht,v.least=At,v.leastIndex=Kt,v.map=Je,v.max=Ae,v.maxIndex=ve,v.mean=se,v.median=Te,v.merge=We,v.min=Me,v.minIndex=Ge,v.nice=fe,v.pairs=gt,v.permute=re,v.quantile=je,v.quantileSorted=ke,v.quickselect=Ie,v.range=Tt,v.reduce=Mt,v.reverse=dt,v.rollup=F,v.rollups=P,v.scan=Zt,v.shuffle=sr,v.shuffler=Ot,v.some=$e,v.sort=ne,v.subset=Sr,v.sum=vt,v.superset=Wt,v.thresholdFreedmanDiaconis=ge,v.thresholdScott=le,v.thresholdSturges=ye,v.tickIncrement=ee,v.tickStep=ae,v.ticks=W,v.transpose=ht,v.union=ia,v.variance=T,v.zip=Be,Object.defineProperty(v,"__esModule",{value:!0})})}}),QL=Ee({"node_modules/d3-path/dist/d3-path.js"(J,H){(function(v,x){typeof J=="object"&&typeof H<"u"?x(J):(v=v||self,x(v.d3=v.d3||{}))})(J,function(v){"use strict";var x=Math.PI,E=2*x,k=1e-6,l=E-k;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function t(){return new e}e.prototype=t.prototype={constructor:e,moveTo:function(n,r){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+r)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(n,r){this._+="L"+(this._x1=+n)+","+(this._y1=+r)},quadraticCurveTo:function(n,r,a,o){this._+="Q"+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+o)},bezierCurveTo:function(n,r,a,o,s,c){this._+="C"+ +n+","+ +r+","+ +a+","+ +o+","+(this._x1=+s)+","+(this._y1=+c)},arcTo:function(n,r,a,o,s){n=+n,r=+r,a=+a,o=+o,s=+s;var c=this._x1,g=this._y1,f=a-n,p=o-r,m=c-n,i=g-r,T=m*m+i*i;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=n)+","+(this._y1=r);else if(T>k)if(!(Math.abs(i*f-p*m)>k)||!s)this._+="L"+(this._x1=n)+","+(this._y1=r);else{var S=a-c,M=o-g,C=f*f+p*p,_=S*S+M*M,w=Math.sqrt(C),h=Math.sqrt(T),u=s*Math.tan((x-Math.acos((C+T-_)/(2*w*h)))/2),A=u/h,b=u/w;Math.abs(A-1)>k&&(this._+="L"+(n+A*m)+","+(r+A*i)),this._+="A"+s+","+s+",0,0,"+ +(i*S>m*M)+","+(this._x1=n+b*f)+","+(this._y1=r+b*p)}},arc:function(n,r,a,o,s,c){n=+n,r=+r,a=+a,c=!!c;var g=a*Math.cos(o),f=a*Math.sin(o),p=n+g,m=r+f,i=1^c,T=c?o-s:s-o;if(a<0)throw new Error("negative radius: "+a);this._x1===null?this._+="M"+p+","+m:(Math.abs(this._x1-p)>k||Math.abs(this._y1-m)>k)&&(this._+="L"+p+","+m),a&&(T<0&&(T=T%E+E),T>l?this._+="A"+a+","+a+",0,1,"+i+","+(n-g)+","+(r-f)+"A"+a+","+a+",0,1,"+i+","+(this._x1=p)+","+(this._y1=m):T>k&&(this._+="A"+a+","+a+",0,"+ +(T>=x)+","+i+","+(this._x1=n+a*Math.cos(s))+","+(this._y1=r+a*Math.sin(s))))},rect:function(n,r,a,o){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+r)+"h"+ +a+"v"+ +o+"h"+-a+"Z"},toString:function(){return this._}},v.path=t,Object.defineProperty(v,"__esModule",{value:!0})})}}),_5=Ee({"node_modules/d3-shape/dist/d3-shape.js"(J,H){(function(v,x){typeof J=="object"&&typeof H<"u"?x(J,QL()):(v=v||self,x(v.d3=v.d3||{},v.d3))})(J,function(v,x){"use strict";function E(nt){return function(){return nt}}var k=Math.abs,l=Math.atan2,e=Math.cos,t=Math.max,n=Math.min,r=Math.sin,a=Math.sqrt,o=1e-12,s=Math.PI,c=s/2,g=2*s;function f(nt){return nt>1?0:nt<-1?s:Math.acos(nt)}function p(nt){return nt>=1?c:nt<=-1?-c:Math.asin(nt)}function m(nt){return nt.innerRadius}function i(nt){return nt.outerRadius}function T(nt){return nt.startAngle}function S(nt){return nt.endAngle}function M(nt){return nt&&nt.padAngle}function C(nt,kt,Ut,nr,Er,br,Or,Pr){var fa=Ut-nt,Fa=nr-kt,La=Or-Er,Cn=Pr-br,mn=Cn*fa-La*Fa;if(!(mn*mnco*co+Wi*Wi&&(zi=Mo,so=So),{cx:zi,cy:so,x01:-La,y01:-Cn,x11:zi*(Er/ti-1),y11:so*(Er/ti-1)}}function w(){var nt=m,kt=i,Ut=E(0),nr=null,Er=T,br=S,Or=M,Pr=null;function fa(){var Fa,La,Cn=+nt.apply(this,arguments),mn=+kt.apply(this,arguments),bi=Er.apply(this,arguments)-c,gn=br.apply(this,arguments)-c,eo=k(gn-bi),si=gn>bi;if(Pr||(Pr=Fa=x.path()),mno))Pr.moveTo(0,0);else if(eo>g-o)Pr.moveTo(mn*e(bi),mn*r(bi)),Pr.arc(0,0,mn,bi,gn,!si),Cn>o&&(Pr.moveTo(Cn*e(gn),Cn*r(gn)),Pr.arc(0,0,Cn,gn,bi,si));else{var Ao=bi,ro=gn,Sn=bi,Gi=gn,ti=eo,fi=eo,xo=Or.apply(this,arguments)/2,zi=xo>o&&(nr?+nr.apply(this,arguments):a(Cn*Cn+mn*mn)),so=n(k(mn-Cn)/2,+Ut.apply(this,arguments)),Mo=so,So=so,oi,ii;if(zi>o){var co=p(zi/Cn*r(xo)),Wi=p(zi/mn*r(xo));(ti-=co*2)>o?(co*=si?1:-1,Sn+=co,Gi-=co):(ti=0,Sn=Gi=(bi+gn)/2),(fi-=Wi*2)>o?(Wi*=si?1:-1,Ao+=Wi,ro-=Wi):(fi=0,Ao=ro=(bi+gn)/2)}var Ho=mn*e(Ao),Io=mn*r(Ao),qo=Cn*e(Gi),Oo=Cn*r(Gi);if(so>o){var ws=mn*e(ro),Ko=mn*r(ro),as=Cn*e(Sn),wo=Cn*r(Sn),No;if(eoo?So>o?(oi=_(as,wo,Ho,Io,mn,So,si),ii=_(ws,Ko,qo,Oo,mn,So,si),Pr.moveTo(oi.cx+oi.x01,oi.cy+oi.y01),Soo)||!(ti>o)?Pr.lineTo(qo,Oo):Mo>o?(oi=_(qo,Oo,ws,Ko,Cn,-Mo,si),ii=_(Ho,Io,as,wo,Cn,-Mo,si),Pr.lineTo(oi.cx+oi.x01,oi.cy+oi.y01),Mo=mn;--bi)Pr.point(ro[bi],Sn[bi]);Pr.lineEnd(),Pr.areaEnd()}si&&(ro[Cn]=+nt(eo,Cn,La),Sn[Cn]=+Ut(eo,Cn,La),Pr.point(kt?+kt(eo,Cn,La):ro[Cn],nr?+nr(eo,Cn,La):Sn[Cn]))}if(Ao)return Pr=null,Ao+""||null}function Fa(){return z().defined(Er).curve(Or).context(br)}return fa.x=function(La){return arguments.length?(nt=typeof La=="function"?La:E(+La),kt=null,fa):nt},fa.x0=function(La){return arguments.length?(nt=typeof La=="function"?La:E(+La),fa):nt},fa.x1=function(La){return arguments.length?(kt=La==null?null:typeof La=="function"?La:E(+La),fa):kt},fa.y=function(La){return arguments.length?(Ut=typeof La=="function"?La:E(+La),nr=null,fa):Ut},fa.y0=function(La){return arguments.length?(Ut=typeof La=="function"?La:E(+La),fa):Ut},fa.y1=function(La){return arguments.length?(nr=La==null?null:typeof La=="function"?La:E(+La),fa):nr},fa.lineX0=fa.lineY0=function(){return Fa().x(nt).y(Ut)},fa.lineY1=function(){return Fa().x(nt).y(nr)},fa.lineX1=function(){return Fa().x(kt).y(Ut)},fa.defined=function(La){return arguments.length?(Er=typeof La=="function"?La:E(!!La),fa):Er},fa.curve=function(La){return arguments.length?(Or=La,br!=null&&(Pr=Or(br)),fa):Or},fa.context=function(La){return arguments.length?(La==null?br=Pr=null:Pr=Or(br=La),fa):br},fa}function N(nt,kt){return ktnt?1:kt>=nt?0:NaN}function R(nt){return nt}function B(){var nt=R,kt=N,Ut=null,nr=E(0),Er=E(g),br=E(0);function Or(Pr){var fa,Fa=Pr.length,La,Cn,mn=0,bi=new Array(Fa),gn=new Array(Fa),eo=+nr.apply(this,arguments),si=Math.min(g,Math.max(-g,Er.apply(this,arguments)-eo)),Ao,ro=Math.min(Math.abs(si)/Fa,br.apply(this,arguments)),Sn=ro*(si<0?-1:1),Gi;for(fa=0;fa0&&(mn+=Gi);for(kt!=null?bi.sort(function(ti,fi){return kt(gn[ti],gn[fi])}):Ut!=null&&bi.sort(function(ti,fi){return Ut(Pr[ti],Pr[fi])}),fa=0,Cn=mn?(si-Fa*Sn)/mn:0;fa0?Gi*Cn:0)+Sn,gn[La]={data:Pr[La],index:fa,value:Gi,startAngle:eo,endAngle:Ao,padAngle:ro};return gn}return Or.value=function(Pr){return arguments.length?(nt=typeof Pr=="function"?Pr:E(+Pr),Or):nt},Or.sortValues=function(Pr){return arguments.length?(kt=Pr,Ut=null,Or):kt},Or.sort=function(Pr){return arguments.length?(Ut=Pr,kt=null,Or):Ut},Or.startAngle=function(Pr){return arguments.length?(nr=typeof Pr=="function"?Pr:E(+Pr),Or):nr},Or.endAngle=function(Pr){return arguments.length?(Er=typeof Pr=="function"?Pr:E(+Pr),Or):Er},Or.padAngle=function(Pr){return arguments.length?(br=typeof Pr=="function"?Pr:E(+Pr),Or):br},Or}var F=j(u);function P(nt){this._curve=nt}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(nt,kt){this._curve.point(kt*Math.sin(nt),kt*-Math.cos(nt))}};function j(nt){function kt(Ut){return new P(nt(Ut))}return kt._curve=nt,kt}function U(nt){var kt=nt.curve;return nt.angle=nt.x,delete nt.x,nt.radius=nt.y,delete nt.y,nt.curve=function(Ut){return arguments.length?kt(j(Ut)):kt()._curve},nt}function Z(){return U(z().curve(F))}function Q(){var nt=I().curve(F),kt=nt.curve,Ut=nt.lineX0,nr=nt.lineX1,Er=nt.lineY0,br=nt.lineY1;return nt.angle=nt.x,delete nt.x,nt.startAngle=nt.x0,delete nt.x0,nt.endAngle=nt.x1,delete nt.x1,nt.radius=nt.y,delete nt.y,nt.innerRadius=nt.y0,delete nt.y0,nt.outerRadius=nt.y1,delete nt.y1,nt.lineStartAngle=function(){return U(Ut())},delete nt.lineX0,nt.lineEndAngle=function(){return U(nr())},delete nt.lineX1,nt.lineInnerRadius=function(){return U(Er())},delete nt.lineY0,nt.lineOuterRadius=function(){return U(br())},delete nt.lineY1,nt.curve=function(Or){return arguments.length?kt(j(Or)):kt()._curve},nt}function re(nt,kt){return[(kt=+kt)*Math.cos(nt-=Math.PI/2),kt*Math.sin(nt)]}var ne=Array.prototype.slice;function oe(nt){return nt.source}function V(nt){return nt.target}function $(nt){var kt=oe,Ut=V,nr=A,Er=b,br=null;function Or(){var Pr,fa=ne.call(arguments),Fa=kt.apply(this,fa),La=Ut.apply(this,fa);if(br||(br=Pr=x.path()),nt(br,+nr.apply(this,(fa[0]=Fa,fa)),+Er.apply(this,fa),+nr.apply(this,(fa[0]=La,fa)),+Er.apply(this,fa)),Pr)return br=null,Pr+""||null}return Or.source=function(Pr){return arguments.length?(kt=Pr,Or):kt},Or.target=function(Pr){return arguments.length?(Ut=Pr,Or):Ut},Or.x=function(Pr){return arguments.length?(nr=typeof Pr=="function"?Pr:E(+Pr),Or):nr},Or.y=function(Pr){return arguments.length?(Er=typeof Pr=="function"?Pr:E(+Pr),Or):Er},Or.context=function(Pr){return arguments.length?(br=Pr??null,Or):br},Or}function K(nt,kt,Ut,nr,Er){nt.moveTo(kt,Ut),nt.bezierCurveTo(kt=(kt+nr)/2,Ut,kt,Er,nr,Er)}function G(nt,kt,Ut,nr,Er){nt.moveTo(kt,Ut),nt.bezierCurveTo(kt,Ut=(Ut+Er)/2,nr,Ut,nr,Er)}function X(nt,kt,Ut,nr,Er){var br=re(kt,Ut),Or=re(kt,Ut=(Ut+Er)/2),Pr=re(nr,Ut),fa=re(nr,Er);nt.moveTo(br[0],br[1]),nt.bezierCurveTo(Or[0],Or[1],Pr[0],Pr[1],fa[0],fa[1])}function q(){return $(K)}function W(){return $(G)}function ee(){var nt=$(X);return nt.angle=nt.x,delete nt.x,nt.radius=nt.y,delete nt.y,nt}var ae={draw:function(nt,kt){var Ut=Math.sqrt(kt/s);nt.moveTo(Ut,0),nt.arc(0,0,Ut,0,g)}},fe={draw:function(nt,kt){var Ut=Math.sqrt(kt/5)/2;nt.moveTo(-3*Ut,-Ut),nt.lineTo(-Ut,-Ut),nt.lineTo(-Ut,-3*Ut),nt.lineTo(Ut,-3*Ut),nt.lineTo(Ut,-Ut),nt.lineTo(3*Ut,-Ut),nt.lineTo(3*Ut,Ut),nt.lineTo(Ut,Ut),nt.lineTo(Ut,3*Ut),nt.lineTo(-Ut,3*Ut),nt.lineTo(-Ut,Ut),nt.lineTo(-3*Ut,Ut),nt.closePath()}},ye=Math.sqrt(1/3),xe=ye*2,Ae={draw:function(nt,kt){var Ut=Math.sqrt(kt/xe),nr=Ut*ye;nt.moveTo(0,-Ut),nt.lineTo(nr,0),nt.lineTo(0,Ut),nt.lineTo(-nr,0),nt.closePath()}},Me=.8908130915292852,Ie=Math.sin(s/10)/Math.sin(7*s/10),qe=Math.sin(g/10)*Ie,je=-Math.cos(g/10)*Ie,ke={draw:function(nt,kt){var Ut=Math.sqrt(kt*Me),nr=qe*Ut,Er=je*Ut;nt.moveTo(0,-Ut),nt.lineTo(nr,Er);for(var br=1;br<5;++br){var Or=g*br/5,Pr=Math.cos(Or),fa=Math.sin(Or);nt.lineTo(fa*Ut,-Pr*Ut),nt.lineTo(Pr*nr-fa*Er,fa*nr+Pr*Er)}nt.closePath()}},ge={draw:function(nt,kt){var Ut=Math.sqrt(kt),nr=-Ut/2;nt.rect(nr,nr,Ut,Ut)}},le=Math.sqrt(3),ve={draw:function(nt,kt){var Ut=-Math.sqrt(kt/(le*3));nt.moveTo(0,Ut*2),nt.lineTo(-le*Ut,-Ut),nt.lineTo(le*Ut,-Ut),nt.closePath()}},se=-.5,Te=Math.sqrt(3)/2,Fe=1/Math.sqrt(12),We=(Fe/2+1)*3,Ge={draw:function(nt,kt){var Ut=Math.sqrt(kt/We),nr=Ut/2,Er=Ut*Fe,br=nr,Or=Ut*Fe+Ut,Pr=-br,fa=Or;nt.moveTo(nr,Er),nt.lineTo(br,Or),nt.lineTo(Pr,fa),nt.lineTo(se*nr-Te*Er,Te*nr+se*Er),nt.lineTo(se*br-Te*Or,Te*br+se*Or),nt.lineTo(se*Pr-Te*fa,Te*Pr+se*fa),nt.lineTo(se*nr+Te*Er,se*Er-Te*nr),nt.lineTo(se*br+Te*Or,se*Or-Te*br),nt.lineTo(se*Pr+Te*fa,se*fa-Te*Pr),nt.closePath()}},gt=[ae,fe,Ae,ge,ke,ve,Ge];function mt(){var nt=E(ae),kt=E(64),Ut=null;function nr(){var Er;if(Ut||(Ut=Er=x.path()),nt.apply(this,arguments).draw(Ut,+kt.apply(this,arguments)),Er)return Ut=null,Er+""||null}return nr.type=function(Er){return arguments.length?(nt=typeof Er=="function"?Er:E(Er),nr):nt},nr.size=function(Er){return arguments.length?(kt=typeof Er=="function"?Er:E(+Er),nr):kt},nr.context=function(Er){return arguments.length?(Ut=Er??null,nr):Ut},nr}function Tt(){}function At(nt,kt,Ut){nt._context.bezierCurveTo((2*nt._x0+nt._x1)/3,(2*nt._y0+nt._y1)/3,(nt._x0+2*nt._x1)/3,(nt._y0+2*nt._y1)/3,(nt._x0+4*nt._x1+kt)/6,(nt._y0+4*nt._y1+Ut)/6)}function Kt(nt){this._context=nt}Kt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:At(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(nt,kt){switch(nt=+nt,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(nt,kt):this._context.moveTo(nt,kt);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:At(this,nt,kt);break}this._x0=this._x1,this._x1=nt,this._y0=this._y1,this._y1=kt}};function ar(nt){return new Kt(nt)}function _r(nt){this._context=nt}_r.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(nt,kt){switch(nt=+nt,kt=+kt,this._point){case 0:this._point=1,this._x2=nt,this._y2=kt;break;case 1:this._point=2,this._x3=nt,this._y3=kt;break;case 2:this._point=3,this._x4=nt,this._y4=kt,this._context.moveTo((this._x0+4*this._x1+nt)/6,(this._y0+4*this._y1+kt)/6);break;default:At(this,nt,kt);break}this._x0=this._x1,this._x1=nt,this._y0=this._y1,this._y1=kt}};function Zt(nt){return new _r(nt)}function sr(nt){this._context=nt}sr.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(nt,kt){switch(nt=+nt,kt=+kt,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+nt)/6,nr=(this._y0+4*this._y1+kt)/6;this._line?this._context.lineTo(Ut,nr):this._context.moveTo(Ut,nr);break;case 3:this._point=4;default:At(this,nt,kt);break}this._x0=this._x1,this._x1=nt,this._y0=this._y1,this._y1=kt}};function Ot(nt){return new sr(nt)}function vt(nt,kt){this._basis=new Kt(nt),this._beta=kt}vt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var nt=this._x,kt=this._y,Ut=nt.length-1;if(Ut>0)for(var nr=nt[0],Er=kt[0],br=nt[Ut]-nr,Or=kt[Ut]-Er,Pr=-1,fa;++Pr<=Ut;)fa=Pr/Ut,this._basis.point(this._beta*nt[Pr]+(1-this._beta)*(nr+fa*br),this._beta*kt[Pr]+(1-this._beta)*(Er+fa*Or));this._x=this._y=null,this._basis.lineEnd()},point:function(nt,kt){this._x.push(+nt),this._y.push(+kt)}};var ht=function nt(kt){function Ut(nr){return kt===1?new Kt(nr):new vt(nr,kt)}return Ut.beta=function(nr){return nt(+nr)},Ut}(.85);function Re(nt,kt,Ut){nt._context.bezierCurveTo(nt._x1+nt._k*(nt._x2-nt._x0),nt._y1+nt._k*(nt._y2-nt._y0),nt._x2+nt._k*(nt._x1-kt),nt._y2+nt._k*(nt._y1-Ut),nt._x2,nt._y2)}function Be(nt,kt){this._context=nt,this._k=(1-kt)/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:Re(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(nt,kt){switch(nt=+nt,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(nt,kt):this._context.moveTo(nt,kt);break;case 1:this._point=2,this._x1=nt,this._y1=kt;break;case 2:this._point=3;default:Re(this,nt,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=nt,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var He=function nt(kt){function Ut(nr){return new Be(nr,kt)}return Ut.tension=function(nr){return nt(+nr)},Ut}(0);function $e(nt,kt){this._context=nt,this._k=(1-kt)/6}$e.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(nt,kt){switch(nt=+nt,kt=+kt,this._point){case 0:this._point=1,this._x3=nt,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=nt,this._y4=kt);break;case 2:this._point=3,this._x5=nt,this._y5=kt;break;default:Re(this,nt,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=nt,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Ze=function nt(kt){function Ut(nr){return new $e(nr,kt)}return Ut.tension=function(nr){return nt(+nr)},Ut}(0);function Je(nt,kt){this._context=nt,this._k=(1-kt)/6}Je.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(nt,kt){switch(nt=+nt,kt=+kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Re(this,nt,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=nt,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Mt=function nt(kt){function Ut(nr){return new Je(nr,kt)}return Ut.tension=function(nr){return nt(+nr)},Ut}(0);function dt(nt,kt,Ut){var nr=nt._x1,Er=nt._y1,br=nt._x2,Or=nt._y2;if(nt._l01_a>o){var Pr=2*nt._l01_2a+3*nt._l01_a*nt._l12_a+nt._l12_2a,fa=3*nt._l01_a*(nt._l01_a+nt._l12_a);nr=(nr*Pr-nt._x0*nt._l12_2a+nt._x2*nt._l01_2a)/fa,Er=(Er*Pr-nt._y0*nt._l12_2a+nt._y2*nt._l01_2a)/fa}if(nt._l23_a>o){var Fa=2*nt._l23_2a+3*nt._l23_a*nt._l12_a+nt._l12_2a,La=3*nt._l23_a*(nt._l23_a+nt._l12_a);br=(br*Fa+nt._x1*nt._l23_2a-kt*nt._l12_2a)/La,Or=(Or*Fa+nt._y1*nt._l23_2a-Ut*nt._l12_2a)/La}nt._context.bezierCurveTo(nr,Er,br,Or,nt._x2,nt._y2)}function Dt(nt,kt){this._context=nt,this._alpha=kt}Dt.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(nt,kt){if(nt=+nt,kt=+kt,this._point){var Ut=this._x2-nt,nr=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Ut*Ut+nr*nr,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(nt,kt):this._context.moveTo(nt,kt);break;case 1:this._point=2;break;case 2:this._point=3;default:dt(this,nt,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=nt,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Ct=function nt(kt){function Ut(nr){return kt?new Dt(nr,kt):new Be(nr,0)}return Ut.alpha=function(nr){return nt(+nr)},Ut}(.5);function Vt(nt,kt){this._context=nt,this._alpha=kt}Vt.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(nt,kt){if(nt=+nt,kt=+kt,this._point){var Ut=this._x2-nt,nr=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Ut*Ut+nr*nr,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=nt,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=nt,this._y4=kt);break;case 2:this._point=3,this._x5=nt,this._y5=kt;break;default:dt(this,nt,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=nt,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Ht=function nt(kt){function Ut(nr){return kt?new Vt(nr,kt):new $e(nr,0)}return Ut.alpha=function(nr){return nt(+nr)},Ut}(.5);function Wt(nt,kt){this._context=nt,this._alpha=kt}Wt.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(nt,kt){if(nt=+nt,kt=+kt,this._point){var Ut=this._x2-nt,nr=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Ut*Ut+nr*nr,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:dt(this,nt,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=nt,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Sr=function nt(kt){function Ut(nr){return kt?new Wt(nr,kt):new Je(nr,0)}return Ut.alpha=function(nr){return nt(+nr)},Ut}(.5);function ia(nt){this._context=nt}ia.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(nt,kt){nt=+nt,kt=+kt,this._point?this._context.lineTo(nt,kt):(this._point=1,this._context.moveTo(nt,kt))}};function $t(nt){return new ia(nt)}function It(nt){return nt<0?-1:1}function ir(nt,kt,Ut){var nr=nt._x1-nt._x0,Er=kt-nt._x1,br=(nt._y1-nt._y0)/(nr||Er<0&&-0),Or=(Ut-nt._y1)/(Er||nr<0&&-0),Pr=(br*Er+Or*nr)/(nr+Er);return(It(br)+It(Or))*Math.min(Math.abs(br),Math.abs(Or),.5*Math.abs(Pr))||0}function cr(nt,kt){var Ut=nt._x1-nt._x0;return Ut?(3*(nt._y1-nt._y0)/Ut-kt)/2:kt}function fr(nt,kt,Ut){var nr=nt._x0,Er=nt._y0,br=nt._x1,Or=nt._y1,Pr=(br-nr)/3;nt._context.bezierCurveTo(nr+Pr,Er+Pr*kt,br-Pr,Or-Pr*Ut,br,Or)}function Ir(nt){this._context=nt}Ir.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:fr(this,this._t0,cr(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(nt,kt){var Ut=NaN;if(nt=+nt,kt=+kt,!(nt===this._x1&&kt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(nt,kt):this._context.moveTo(nt,kt);break;case 1:this._point=2;break;case 2:this._point=3,fr(this,cr(this,Ut=ir(this,nt,kt)),Ut);break;default:fr(this,this._t0,Ut=ir(this,nt,kt));break}this._x0=this._x1,this._x1=nt,this._y0=this._y1,this._y1=kt,this._t0=Ut}}};function sa(nt){this._context=new aa(nt)}(sa.prototype=Object.create(Ir.prototype)).point=function(nt,kt){Ir.prototype.point.call(this,kt,nt)};function aa(nt){this._context=nt}aa.prototype={moveTo:function(nt,kt){this._context.moveTo(kt,nt)},closePath:function(){this._context.closePath()},lineTo:function(nt,kt){this._context.lineTo(kt,nt)},bezierCurveTo:function(nt,kt,Ut,nr,Er,br){this._context.bezierCurveTo(kt,nt,nr,Ut,br,Er)}};function xa(nt){return new Ir(nt)}function ja(nt){return new sa(nt)}function Oa(nt){this._context=nt}Oa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var nt=this._x,kt=this._y,Ut=nt.length;if(Ut)if(this._line?this._context.lineTo(nt[0],kt[0]):this._context.moveTo(nt[0],kt[0]),Ut===2)this._context.lineTo(nt[1],kt[1]);else for(var nr=An(nt),Er=An(kt),br=0,Or=1;Or=0;--kt)Er[kt]=(Or[kt]-Er[kt+1])/br[kt];for(br[Ut-1]=(nt[Ut]+Er[Ut-1])/2,kt=0;kt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(nt,kt){switch(nt=+nt,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(nt,kt):this._context.moveTo(nt,kt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,kt),this._context.lineTo(nt,kt);else{var Ut=this._x*(1-this._t)+nt*this._t;this._context.lineTo(Ut,this._y),this._context.lineTo(Ut,kt)}break}}this._x=nt,this._y=kt}};function ei(nt){return new Ja(nt,.5)}function Fn(nt){return new Ja(nt,0)}function ni(nt){return new Ja(nt,1)}function Mi(nt,kt){if((Or=nt.length)>1)for(var Ut=1,nr,Er,br=nt[kt[0]],Or,Pr=br.length;Ut=0;)Ut[kt]=kt;return Ut}function bn(nt,kt){return nt[kt]}function pn(){var nt=E([]),kt=ci,Ut=Mi,nr=bn;function Er(br){var Or=nt.apply(this,arguments),Pr,fa=br.length,Fa=Or.length,La=new Array(Fa),Cn;for(Pr=0;Pr0){for(var Ut,nr,Er=0,br=nt[0].length,Or;Er0)for(var Ut,nr=0,Er,br,Or,Pr,fa,Fa=nt[kt[0]].length;nr0?(Er[0]=Or,Er[1]=Or+=br):br<0?(Er[1]=Pr,Er[0]=Pr+=br):(Er[0]=0,Er[1]=br)}function dn(nt,kt){if((Er=nt.length)>0){for(var Ut=0,nr=nt[kt[0]],Er,br=nr.length;Ut0)||!((br=(Er=nt[kt[0]]).length)>0))){for(var Ut=0,nr=1,Er,br,Or;nrbr&&(br=Er,Ut=kt);return Ut}function hr(nt){var kt=nt.map(ur);return ci(nt).sort(function(Ut,nr){return kt[Ut]-kt[nr]})}function ur(nt){for(var kt=0,Ut=-1,nr=nt.length,Er;++Ut[I(qe,je,Ae),qe]));for(let[qe,je]of Me.entries()){je.index=qe;let{source:ke,target:ge}=je;typeof ke!="object"&&(ke=je.source=m(Ie,ke)),typeof ge!="object"&&(ge=je.target=m(Ie,ge)),ke.sourceLinks.push(je),ge.targetLinks.push(je)}if(B!=null)for(let{sourceLinks:qe,targetLinks:je}of Ae)qe.sort(B),je.sort(B)}function re({nodes:Ae}){for(let Me of Ae)Me.value=Me.fixedValue===void 0?Math.max(x.sum(Me.sourceLinks,c),x.sum(Me.targetLinks,c)):Me.fixedValue}function ne({nodes:Ae}){let Me=Ae.length,Ie=new Set(Ae),qe=new Set,je=0;for(;Ie.size;){for(let ke of Ie){ke.depth=je;for(let{target:ge}of ke.sourceLinks)qe.add(ge)}if(++je>Me)throw new Error("circular link");Ie=qe,qe=new Set}}function oe({nodes:Ae}){let Me=Ae.length,Ie=new Set(Ae),qe=new Set,je=0;for(;Ie.size;){for(let ke of Ie){ke.height=je;for(let{source:ge}of ke.targetLinks)qe.add(ge)}if(++je>Me)throw new Error("circular link");Ie=qe,qe=new Set}}function V({nodes:Ae}){let Me=x.max(Ae,je=>je.depth)+1,Ie=(h-_-A)/(Me-1),qe=new Array(Me);for(let je of Ae){let ke=Math.max(0,Math.min(Me-1,Math.floor(N.call(null,je,Me))));je.layer=ke,je.x0=_+ke*Ie,je.x1=je.x0+A,qe[ke]?qe[ke].push(je):qe[ke]=[je]}if(R)for(let je of qe)je.sort(R);return qe}function $(Ae){let Me=x.min(Ae,Ie=>(u-w-(Ie.length-1)*z)/x.sum(Ie,c));for(let Ie of Ae){let qe=w;for(let je of Ie){je.y0=qe,je.y1=qe+je.value*Me,qe=je.y1+z;for(let ke of je.sourceLinks)ke.width=ke.value*Me}qe=(u-qe+z)/(Ie.length+1);for(let je=0;jeIe.length)-1)),$(Me);for(let Ie=0;Ie0))continue;let se=(le/ve-ge.y0)*Me;ge.y0+=se,ge.y1+=se,ae(ge)}R===void 0&&ke.sort(s),q(ke,Ie)}}function X(Ae,Me,Ie){for(let qe=Ae.length,je=qe-2;je>=0;--je){let ke=Ae[je];for(let ge of ke){let le=0,ve=0;for(let{target:Te,value:Fe}of ge.sourceLinks){let We=Fe*(Te.layer-ge.layer);le+=xe(ge,Te)*We,ve+=We}if(!(ve>0))continue;let se=(le/ve-ge.y0)*Me;ge.y0+=se,ge.y1+=se,ae(ge)}R===void 0&&ke.sort(s),q(ke,Ie)}}function q(Ae,Me){let Ie=Ae.length>>1,qe=Ae[Ie];ee(Ae,qe.y0-z,Ie-1,Me),W(Ae,qe.y1+z,Ie+1,Me),ee(Ae,u,Ae.length-1,Me),W(Ae,w,0,Me)}function W(Ae,Me,Ie,qe){for(;Ie1e-6&&(je.y0+=ke,je.y1+=ke),Me=je.y1+z}}function ee(Ae,Me,Ie,qe){for(;Ie>=0;--Ie){let je=Ae[Ie],ke=(je.y1-Me)*qe;ke>1e-6&&(je.y0-=ke,je.y1-=ke),Me=je.y0-z}}function ae({sourceLinks:Ae,targetLinks:Me}){if(B===void 0){for(let{source:{sourceLinks:Ie}}of Me)Ie.sort(o);for(let{target:{targetLinks:Ie}}of Ae)Ie.sort(a)}}function fe(Ae){if(B===void 0)for(let{sourceLinks:Me,targetLinks:Ie}of Ae)Me.sort(o),Ie.sort(a)}function ye(Ae,Me){let Ie=Ae.y0-(Ae.sourceLinks.length-1)*z/2;for(let{target:qe,width:je}of Ae.sourceLinks){if(qe===Me)break;Ie+=je+z}for(let{source:qe,width:je}of Me.targetLinks){if(qe===Ae)break;Ie-=je}return Ie}function xe(Ae,Me){let Ie=Me.y0-(Me.targetLinks.length-1)*z/2;for(let{source:qe,width:je}of Me.targetLinks){if(qe===Ae)break;Ie+=je+z}for(let{target:qe,width:je}of Ae.sourceLinks){if(qe===Me)break;Ie-=je}return Ie}return Z}function S(_){return[_.source.x1,_.y0]}function M(_){return[_.target.x0,_.y1]}function C(){return E.linkHorizontal().source(S).target(M)}v.sankey=T,v.sankeyCenter=n,v.sankeyJustify=t,v.sankeyLeft=l,v.sankeyLinkHorizontal=C,v.sankeyRight=e,Object.defineProperty(v,"__esModule",{value:!0})})}}),tP=Ee({"node_modules/@plotly/d3-sankey-circular/node_modules/d3-array/dist/d3-array.js"(J,H){(function(v,x){x(typeof J=="object"&&typeof H<"u"?J:v.d3=v.d3||{})})(J,function(v){"use strict";function x(K,G){return KG?1:K>=G?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(G,X,q,W){for(q==null&&(q=0),W==null&&(W=G.length);q>>1;K(G[ee],X)<0?q=ee+1:W=ee}return q},right:function(G,X,q,W){for(q==null&&(q=0),W==null&&(W=G.length);q>>1;K(G[ee],X)>0?W=ee:q=ee+1}return q}}}function k(K){return function(G,X){return x(K(G),X)}}var l=E(x),e=l.right,t=l.left;function n(K,G){G==null&&(G=r);for(var X=0,q=K.length-1,W=K[0],ee=new Array(q<0?0:q);XK?1:G>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,G){var X=K.length,q=0,W=-1,ee=0,ae,fe,ye=0;if(G==null)for(;++W1)return ye/(q-1)}function g(K,G){var X=c(K,G);return X&&Math.sqrt(X)}function f(K,G){var X=K.length,q=-1,W,ee,ae;if(G==null){for(;++q=W)for(ee=ae=W;++qW&&(ee=W),ae=W)for(ee=ae=W;++qW&&(ee=W),ae0)return[K];if((q=G0)for(K=Math.ceil(K/fe),G=Math.floor(G/fe),ae=new Array(ee=Math.ceil(G-K+1));++W=0?(ee>=C?10:ee>=_?5:ee>=w?2:1)*Math.pow(10,W):-Math.pow(10,-W)/(ee>=C?10:ee>=_?5:ee>=w?2:1)}function A(K,G,X){var q=Math.abs(G-K)/Math.max(0,X),W=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/W;return ee>=C?W*=10:ee>=_?W*=5:ee>=w&&(W*=2),GMe;)Ie.pop(),--qe;var je=new Array(qe+1),ke;for(ee=0;ee<=qe;++ee)ke=je[ee]=[],ke.x0=ee>0?Ie[ee-1]:Ae,ke.x1=ee=1)return+X(K[q-1],q-1,K);var q,W=(q-1)*G,ee=Math.floor(W),ae=+X(K[ee],ee,K),fe=+X(K[ee+1],ee+1,K);return ae+(fe-ae)*(W-ee)}}function N(K,G,X){return K=i.call(K,s).sort(x),Math.ceil((X-G)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function R(K,G,X){return Math.ceil((X-G)/(3.5*g(K)*Math.pow(K.length,-1/3)))}function B(K,G){var X=K.length,q=-1,W,ee;if(G==null){for(;++q=W)for(ee=W;++qee&&(ee=W)}else for(;++q=W)for(ee=W;++qee&&(ee=W);return ee}function F(K,G){var X=K.length,q=X,W=-1,ee,ae=0;if(G==null)for(;++W=0;)for(ae=K[G],X=ae.length;--X>=0;)ee[--W]=ae[X];return ee}function U(K,G){var X=K.length,q=-1,W,ee;if(G==null){for(;++q=W)for(ee=W;++qW&&(ee=W)}else for(;++q=W)for(ee=W;++qW&&(ee=W);return ee}function Z(K,G){for(var X=G.length,q=new Array(X);X--;)q[X]=K[G[X]];return q}function Q(K,G){if(X=K.length){var X,q=0,W=0,ee,ae=K[W];for(G==null&&(G=x);++q=M})}function f(M){g(M);for(var C=E,_=v(C),w=_.components.filter(function(N){return N.length>1}),h=1/0,u,A=0;A"u"?"undefined":s(Be))!=="object"&&(Be=ht.source=_(vt,Be)),(typeof He>"u"?"undefined":s(He))!=="object"&&(He=ht.target=_(vt,He)),Be.sourceLinks.push(ht),He.targetLinks.push(ht)}),Ot}function At(Ot){Ot.nodes.forEach(function(vt){vt.partOfCycle=!1,vt.value=Math.max(x.sum(vt.sourceLinks,p),x.sum(vt.targetLinks,p)),vt.sourceLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)}),vt.targetLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)})})}function Kt(Ot){var vt=0,ht=0,Re=0,Be=0,He=x.max(Ot.nodes,function($e){return $e.column});return Ot.links.forEach(function($e){$e.circular&&($e.circularLinkType=="top"?vt=vt+$e.width:ht=ht+$e.width,$e.target.column==0&&(Be=Be+$e.width),$e.source.column==He&&(Re=Re+$e.width))}),vt=vt>0?vt+h+u:vt,ht=ht>0?ht+h+u:ht,Re=Re>0?Re+h+u:Re,Be=Be>0?Be+h+u:Be,{top:vt,bottom:ht,left:Be,right:Re}}function ar(Ot,vt){var ht=x.max(Ot.nodes,function(Mt){return Mt.column}),Re=qe-Me,Be=je-Ie,He=Re+vt.right+vt.left,$e=Be+vt.top+vt.bottom,Ze=Re/He,Je=Be/$e;return Me=Me*Ze+vt.left,qe=vt.right==0?qe:qe*Ze,Ie=Ie*Je+vt.top,je=je*Je,Ot.nodes.forEach(function(Mt){Mt.x0=Me+Mt.column*((qe-Me-ke)/ht),Mt.x1=Mt.x0+ke}),Je}function _r(Ot){var vt,ht,Re;for(vt=Ot.nodes,ht=[],Re=0;vt.length;++Re,vt=ht,ht=[])vt.forEach(function(Be){Be.depth=Re,Be.sourceLinks.forEach(function(He){ht.indexOf(He.target)<0&&!He.circular&&ht.push(He.target)})});for(vt=Ot.nodes,ht=[],Re=0;vt.length;++Re,vt=ht,ht=[])vt.forEach(function(Be){Be.height=Re,Be.targetLinks.forEach(function(He){ht.indexOf(He.source)<0&&!He.circular&&ht.push(He.source)})});Ot.nodes.forEach(function(Be){Be.column=Math.floor(ve.call(null,Be,Re))})}function Zt(Ot,vt,ht){var Re=E.nest().key(function(Mt){return Mt.column}).sortKeys(x.ascending).entries(Ot.nodes).map(function(Mt){return Mt.values});$e(ht),Je();for(var Be=1,He=vt;He>0;--He)Ze(Be*=.99,ht),Je();function $e(Mt){if(Ge){var dt=1/0;Re.forEach(function(Ht){var Wt=je*Ge/(Ht.length+1);dt=Wt0))if(Ht==0&&Vt==1)Sr=Wt.y1-Wt.y0,Wt.y0=je/2-Sr/2,Wt.y1=je/2+Sr/2;else if(Ht==Dt-1&&Vt==1)Sr=Wt.y1-Wt.y0,Wt.y0=je/2-Sr/2,Wt.y1=je/2+Sr/2;else{var ia=0,$t=x.mean(Wt.sourceLinks,T),It=x.mean(Wt.targetLinks,i);$t&&It?ia=($t+It)/2:ia=$t||It;var ir=(ia-m(Wt))*Mt;Wt.y0+=ir,Wt.y1+=ir}})})}function Je(){Re.forEach(function(Mt){var dt,Dt,Ct=Ie,Vt=Mt.length,Ht;for(Mt.sort(f),Ht=0;Ht0&&(dt.y0+=Dt,dt.y1+=Dt),Ct=dt.y1+ge;if(Dt=Ct-ge-je,Dt>0)for(Ct=dt.y0-=Dt,dt.y1-=Dt,Ht=Vt-2;Ht>=0;--Ht)dt=Mt[Ht],Dt=dt.y1+ge-Ct,Dt>0&&(dt.y0-=Dt,dt.y1-=Dt),Ct=dt.y0})}}function sr(Ot){Ot.nodes.forEach(function(vt){vt.sourceLinks.sort(g),vt.targetLinks.sort(c)}),Ot.nodes.forEach(function(vt){var ht=vt.y0,Re=ht,Be=vt.y1,He=Be;vt.sourceLinks.forEach(function($e){$e.circular?($e.y0=Be-$e.width/2,Be=Be-$e.width):($e.y0=ht+$e.width/2,ht+=$e.width)}),vt.targetLinks.forEach(function($e){$e.circular?($e.y1=He-$e.width/2,He=He-$e.width):($e.y1=Re+$e.width/2,Re+=$e.width)})})}return mt}function z(Me,Ie,qe){var je=0;if(qe===null){for(var ke=[],ge=0;geIe.source.column)}function B(Me,Ie){var qe=0;Me.sourceLinks.forEach(function(ke){qe=ke.circular&&!xe(ke,Ie)?qe+1:qe});var je=0;return Me.targetLinks.forEach(function(ke){je=ke.circular&&!xe(ke,Ie)?je+1:je}),qe+je}function F(Me){var Ie=Me.source.sourceLinks,qe=0;Ie.forEach(function(ge){qe=ge.circular?qe+1:qe});var je=Me.target.targetLinks,ke=0;return je.forEach(function(ge){ke=ge.circular?ke+1:ke}),!(qe>1||ke>1)}function P(Me,Ie,qe){return Me.sort(Z),Me.forEach(function(je,ke){var ge=0;if(xe(je,qe)&&F(je))je.circularPathData.verticalBuffer=ge+je.width/2;else{var le=0;for(le;lege?ve:ge}je.circularPathData.verticalBuffer=ge+je.width/2}}),Me}function j(Me,Ie,qe,je){var ke=5,ge=x.min(Me.links,function(se){return se.source.y0});Me.links.forEach(function(se){se.circular&&(se.circularPathData={})});var le=Me.links.filter(function(se){return se.circularLinkType=="top"});P(le,Ie,je);var ve=Me.links.filter(function(se){return se.circularLinkType=="bottom"});P(ve,Ie,je),Me.links.forEach(function(se){if(se.circular){if(se.circularPathData.arcRadius=se.width+u,se.circularPathData.leftNodeBuffer=ke,se.circularPathData.rightNodeBuffer=ke,se.circularPathData.sourceWidth=se.source.x1-se.source.x0,se.circularPathData.sourceX=se.source.x0+se.circularPathData.sourceWidth,se.circularPathData.targetX=se.target.x0,se.circularPathData.sourceY=se.y0,se.circularPathData.targetY=se.y1,xe(se,je)&&F(se))se.circularPathData.leftSmallArcRadius=u+se.width/2,se.circularPathData.leftLargeArcRadius=u+se.width/2,se.circularPathData.rightSmallArcRadius=u+se.width/2,se.circularPathData.rightLargeArcRadius=u+se.width/2,se.circularLinkType=="bottom"?(se.circularPathData.verticalFullExtent=se.source.y1+h+se.circularPathData.verticalBuffer,se.circularPathData.verticalLeftInnerExtent=se.circularPathData.verticalFullExtent-se.circularPathData.leftLargeArcRadius,se.circularPathData.verticalRightInnerExtent=se.circularPathData.verticalFullExtent-se.circularPathData.rightLargeArcRadius):(se.circularPathData.verticalFullExtent=se.source.y0-h-se.circularPathData.verticalBuffer,se.circularPathData.verticalLeftInnerExtent=se.circularPathData.verticalFullExtent+se.circularPathData.leftLargeArcRadius,se.circularPathData.verticalRightInnerExtent=se.circularPathData.verticalFullExtent+se.circularPathData.rightLargeArcRadius);else{var Te=se.source.column,Fe=se.circularLinkType,We=Me.links.filter(function(mt){return mt.source.column==Te&&mt.circularLinkType==Fe});se.circularLinkType=="bottom"?We.sort(re):We.sort(Q);var Ge=0;We.forEach(function(mt,Tt){mt.circularLinkID==se.circularLinkID&&(se.circularPathData.leftSmallArcRadius=u+se.width/2+Ge,se.circularPathData.leftLargeArcRadius=u+se.width/2+Tt*Ie+Ge),Ge=Ge+mt.width}),Te=se.target.column,We=Me.links.filter(function(mt){return mt.target.column==Te&&mt.circularLinkType==Fe}),se.circularLinkType=="bottom"?We.sort(oe):We.sort(ne),Ge=0,We.forEach(function(mt,Tt){mt.circularLinkID==se.circularLinkID&&(se.circularPathData.rightSmallArcRadius=u+se.width/2+Ge,se.circularPathData.rightLargeArcRadius=u+se.width/2+Tt*Ie+Ge),Ge=Ge+mt.width}),se.circularLinkType=="bottom"?(se.circularPathData.verticalFullExtent=Math.max(qe,se.source.y1,se.target.y1)+h+se.circularPathData.verticalBuffer,se.circularPathData.verticalLeftInnerExtent=se.circularPathData.verticalFullExtent-se.circularPathData.leftLargeArcRadius,se.circularPathData.verticalRightInnerExtent=se.circularPathData.verticalFullExtent-se.circularPathData.rightLargeArcRadius):(se.circularPathData.verticalFullExtent=ge-h-se.circularPathData.verticalBuffer,se.circularPathData.verticalLeftInnerExtent=se.circularPathData.verticalFullExtent+se.circularPathData.leftLargeArcRadius,se.circularPathData.verticalRightInnerExtent=se.circularPathData.verticalFullExtent+se.circularPathData.rightLargeArcRadius)}se.circularPathData.leftInnerExtent=se.circularPathData.sourceX+se.circularPathData.leftNodeBuffer,se.circularPathData.rightInnerExtent=se.circularPathData.targetX-se.circularPathData.rightNodeBuffer,se.circularPathData.leftFullExtent=se.circularPathData.sourceX+se.circularPathData.leftLargeArcRadius+se.circularPathData.leftNodeBuffer,se.circularPathData.rightFullExtent=se.circularPathData.targetX-se.circularPathData.rightLargeArcRadius-se.circularPathData.rightNodeBuffer}if(se.circular)se.path=U(se);else{var gt=k.linkHorizontal().source(function(mt){var Tt=mt.source.x0+(mt.source.x1-mt.source.x0),At=mt.y0;return[Tt,At]}).target(function(mt){var Tt=mt.target.x0,At=mt.y1;return[Tt,At]});se.path=gt(se)}})}function U(Me){var Ie="";return Me.circularLinkType=="top"?Ie="M"+Me.circularPathData.sourceX+" "+Me.circularPathData.sourceY+" L"+Me.circularPathData.leftInnerExtent+" "+Me.circularPathData.sourceY+" A"+Me.circularPathData.leftLargeArcRadius+" "+Me.circularPathData.leftSmallArcRadius+" 0 0 0 "+Me.circularPathData.leftFullExtent+" "+(Me.circularPathData.sourceY-Me.circularPathData.leftSmallArcRadius)+" L"+Me.circularPathData.leftFullExtent+" "+Me.circularPathData.verticalLeftInnerExtent+" A"+Me.circularPathData.leftLargeArcRadius+" "+Me.circularPathData.leftLargeArcRadius+" 0 0 0 "+Me.circularPathData.leftInnerExtent+" "+Me.circularPathData.verticalFullExtent+" L"+Me.circularPathData.rightInnerExtent+" "+Me.circularPathData.verticalFullExtent+" A"+Me.circularPathData.rightLargeArcRadius+" "+Me.circularPathData.rightLargeArcRadius+" 0 0 0 "+Me.circularPathData.rightFullExtent+" "+Me.circularPathData.verticalRightInnerExtent+" L"+Me.circularPathData.rightFullExtent+" "+(Me.circularPathData.targetY-Me.circularPathData.rightSmallArcRadius)+" A"+Me.circularPathData.rightLargeArcRadius+" "+Me.circularPathData.rightSmallArcRadius+" 0 0 0 "+Me.circularPathData.rightInnerExtent+" "+Me.circularPathData.targetY+" L"+Me.circularPathData.targetX+" "+Me.circularPathData.targetY:Ie="M"+Me.circularPathData.sourceX+" "+Me.circularPathData.sourceY+" L"+Me.circularPathData.leftInnerExtent+" "+Me.circularPathData.sourceY+" A"+Me.circularPathData.leftLargeArcRadius+" "+Me.circularPathData.leftSmallArcRadius+" 0 0 1 "+Me.circularPathData.leftFullExtent+" "+(Me.circularPathData.sourceY+Me.circularPathData.leftSmallArcRadius)+" L"+Me.circularPathData.leftFullExtent+" "+Me.circularPathData.verticalLeftInnerExtent+" A"+Me.circularPathData.leftLargeArcRadius+" "+Me.circularPathData.leftLargeArcRadius+" 0 0 1 "+Me.circularPathData.leftInnerExtent+" "+Me.circularPathData.verticalFullExtent+" L"+Me.circularPathData.rightInnerExtent+" "+Me.circularPathData.verticalFullExtent+" A"+Me.circularPathData.rightLargeArcRadius+" "+Me.circularPathData.rightLargeArcRadius+" 0 0 1 "+Me.circularPathData.rightFullExtent+" "+Me.circularPathData.verticalRightInnerExtent+" L"+Me.circularPathData.rightFullExtent+" "+(Me.circularPathData.targetY+Me.circularPathData.rightSmallArcRadius)+" A"+Me.circularPathData.rightLargeArcRadius+" "+Me.circularPathData.rightSmallArcRadius+" 0 0 1 "+Me.circularPathData.rightInnerExtent+" "+Me.circularPathData.targetY+" L"+Me.circularPathData.targetX+" "+Me.circularPathData.targetY,Ie}function Z(Me,Ie){return V(Me)==V(Ie)?Me.circularLinkType=="bottom"?re(Me,Ie):Q(Me,Ie):V(Ie)-V(Me)}function Q(Me,Ie){return Me.y0-Ie.y0}function re(Me,Ie){return Ie.y0-Me.y0}function ne(Me,Ie){return Me.y1-Ie.y1}function oe(Me,Ie){return Ie.y1-Me.y1}function V(Me){return Me.target.column-Me.source.column}function $(Me){return Me.target.x0-Me.source.x1}function K(Me,Ie){var qe=N(Me),je=$(Ie)/Math.tan(qe),ke=ye(Me)=="up"?Me.y1+je:Me.y1-je;return ke}function G(Me,Ie){var qe=N(Me),je=$(Ie)/Math.tan(qe),ke=ye(Me)=="up"?Me.y1-je:Me.y1+je;return ke}function X(Me,Ie,qe,je){Me.links.forEach(function(ke){if(!ke.circular&&ke.target.column-ke.source.column>1){var ge=ke.source.column+1,le=ke.target.column-1,ve=1,se=le-ge+1;for(ve=1;ge<=le;ge++,ve++)Me.nodes.forEach(function(Te){if(Te.column==ge){var Fe=ve/(se+1),We=Math.pow(1-Fe,3),Ge=3*Fe*Math.pow(1-Fe,2),gt=3*Math.pow(Fe,2)*(1-Fe),mt=Math.pow(Fe,3),Tt=We*ke.y0+Ge*ke.y0+gt*ke.y1+mt*ke.y1,At=Tt-ke.width/2,Kt=Tt+ke.width/2,ar;At>Te.y0&&AtTe.y0&&KtTe.y1&&W(_r,ar,Ie,qe)})):AtTe.y1&&(ar=Kt-Te.y0+10,Te=W(Te,ar,Ie,qe),Me.nodes.forEach(function(_r){w(_r,je)==w(Te,je)||_r.column!=Te.column||_r.y0Te.y1&&W(_r,ar,Ie,qe)}))}})}})}function q(Me,Ie){return Me.y0>Ie.y0&&Me.y0Ie.y0&&Me.y1Ie.y1}function W(Me,Ie,qe,je){return Me.y0+Ie>=qe&&Me.y1+Ie<=je&&(Me.y0=Me.y0+Ie,Me.y1=Me.y1+Ie,Me.targetLinks.forEach(function(ke){ke.y1=ke.y1+Ie}),Me.sourceLinks.forEach(function(ke){ke.y0=ke.y0+Ie})),Me}function ee(Me,Ie,qe,je){Me.nodes.forEach(function(ke){je&&ke.y+(ke.y1-ke.y0)>Ie&&(ke.y=ke.y-(ke.y+(ke.y1-ke.y0)-Ie));var ge=Me.links.filter(function(se){return w(se.source,qe)==w(ke,qe)}),le=ge.length;le>1&&ge.sort(function(se,Te){if(!se.circular&&!Te.circular){if(se.target.column==Te.target.column)return se.y1-Te.y1;if(fe(se,Te)){if(se.target.column>Te.target.column){var Fe=G(Te,se);return se.y1-Fe}if(Te.target.column>se.target.column){var We=G(se,Te);return We-Te.y1}}else return se.y1-Te.y1}if(se.circular&&!Te.circular)return se.circularLinkType=="top"?-1:1;if(Te.circular&&!se.circular)return Te.circularLinkType=="top"?1:-1;if(se.circular&&Te.circular)return se.circularLinkType===Te.circularLinkType&&se.circularLinkType=="top"?se.target.column===Te.target.column?se.target.y1-Te.target.y1:Te.target.column-se.target.column:se.circularLinkType===Te.circularLinkType&&se.circularLinkType=="bottom"?se.target.column===Te.target.column?Te.target.y1-se.target.y1:se.target.column-Te.target.column:se.circularLinkType=="top"?-1:1});var ve=ke.y0;ge.forEach(function(se){se.y0=ve+se.width/2,ve=ve+se.width}),ge.forEach(function(se,Te){if(se.circularLinkType=="bottom"){var Fe=Te+1,We=0;for(Fe;Fe1&&ke.sort(function(ve,se){if(!ve.circular&&!se.circular){if(ve.source.column==se.source.column)return ve.y0-se.y0;if(fe(ve,se)){if(se.source.column0?"up":"down"}function xe(Me,Ie){return w(Me.source,Ie)==w(Me.target,Ie)}function Ae(Me,Ie,qe){var je=Me.nodes,ke=Me.links,ge=!1,le=!1;if(ke.forEach(function(Ge){Ge.circularLinkType=="top"?ge=!0:Ge.circularLinkType=="bottom"&&(le=!0)}),ge==!1||le==!1){var ve=x.min(je,function(Ge){return Ge.y0}),se=x.max(je,function(Ge){return Ge.y1}),Te=se-ve,Fe=qe-Ie,We=Fe/Te;je.forEach(function(Ge){var gt=(Ge.y1-Ge.y0)*We;Ge.y0=(Ge.y0-ve)*We,Ge.y1=Ge.y0+gt}),ke.forEach(function(Ge){Ge.y0=(Ge.y0-ve)*We,Ge.y1=(Ge.y1-ve)*We,Ge.width=Ge.width*We})}}v.sankeyCircular=b,v.sankeyCenter=a,v.sankeyLeft=t,v.sankeyRight=n,v.sankeyJustify=r,Object.defineProperty(v,"__esModule",{value:!0})})}}),b5=Ee({"src/traces/sankey/constants.js"(J,H){"use strict";H.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"}}}}),nP=Ee({"src/traces/sankey/render.js"(J,H){"use strict";var v=KL(),x=(Zv(),tn(iv)).interpolateNumber,E=Va(),k=eP(),l=aP(),e=b5(),t=Qn(),n=mo(),r=Vr(),a=r.strTranslate,o=r.strRotate,s=Qh(),c=s.keyFun,g=s.repeat,f=s.unwrap,p=Fs(),m=Ri(),i=rc(),T=i.CAP_SHIFT,S=i.LINE_SPACING,M=3;function C($,K,G){var X=f(K),q=X.trace,W=q.domain,ee=q.orientation==="h",ae=q.direction==="reversed",fe=q.node.pad,ye=q.node.thickness,xe={justify:k.sankeyJustify,left:k.sankeyLeft,right:k.sankeyRight,center:k.sankeyCenter}[q.node.align],Ae=$.width*(W.x[1]-W.x[0]),Me=$.height*(W.y[1]-W.y[0]),Ie=X._nodes,qe=X._links,je=X.circular,ke;je?ke=l.sankeyCircular().circularLinkGap(0):ke=k.sankey(),ke.iterations(e.sankeyIterations).size(ee?[Ae,Me]:[Me,Ae]).nodeWidth(ye).nodePadding(fe).nodeId(function(Zt){return Zt.pointNumber}).nodeAlign(xe).nodes(Ie).links(qe);function ge(Zt){q[Zt].sort==="input"&&(je?r.warn(`Circular Sankey diagrams do not support the "input" ${Zt}.sort mode; falling back to the default sort.`):ke[`${Zt}Sort`](null))}ge("link"),ge("node");var le=ke();ke.nodePadding()=ht||(vt=ht-Ot.y0,vt>1e-6&&(Ot.y0+=vt,Ot.y1+=vt)),ht=Ot.y1+fe})}function At(Zt){var sr=Zt.map(function($e,Ze){return{x0:$e.x0,index:Ze}}).sort(function($e,Ze){return $e.x0-Ze.x0}),Ot=[],vt=-1,ht,Re=-1/0,Be;for(ve=0;veRe+ye&&(vt+=1,ht=He.x0),Re=He.x0,Ot[vt]||(Ot[vt]=[]),Ot[vt].push(He),Be=ht-He.x0,He.x0+=Be,He.x1+=Be}return Ot}if(q.node.x.length&&q.node.y.length){for(ve=0;ve0?" L "+q.targetX+" "+q.targetY:"")+"Z"):(G="M "+(q.targetX-K)+" "+(q.targetY-X)+" L "+(q.rightInnerExtent-K)+" "+(q.targetY-X)+" A "+(q.rightLargeArcRadius+X)+" "+(q.rightSmallArcRadius+X)+" 0 0 0 "+(q.rightFullExtent-X-K)+" "+(q.targetY+q.rightSmallArcRadius)+" L "+(q.rightFullExtent-X-K)+" "+q.verticalRightInnerExtent,W&&ee?G+=" A "+(q.rightLargeArcRadius+X)+" "+(q.rightLargeArcRadius+X)+" 0 0 0 "+(q.rightInnerExtent-X-K)+" "+(q.verticalFullExtent+X)+" L "+(q.rightFullExtent+X-K-(q.rightLargeArcRadius-X))+" "+(q.verticalFullExtent+X)+" A "+(q.rightLargeArcRadius+X)+" "+(q.rightLargeArcRadius+X)+" 0 0 0 "+(q.leftFullExtent+X)+" "+q.verticalLeftInnerExtent:W?G+=" A "+(q.rightLargeArcRadius-X)+" "+(q.rightSmallArcRadius-X)+" 0 0 1 "+(q.rightFullExtent-K-X-(q.rightLargeArcRadius-X))+" "+(q.verticalFullExtent-X)+" L "+(q.leftFullExtent+X+(q.rightLargeArcRadius-X))+" "+(q.verticalFullExtent-X)+" A "+(q.rightLargeArcRadius-X)+" "+(q.rightSmallArcRadius-X)+" 0 0 1 "+(q.leftFullExtent+X)+" "+q.verticalLeftInnerExtent:G+=" A "+(q.rightLargeArcRadius+X)+" "+(q.rightLargeArcRadius+X)+" 0 0 0 "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent+X)+" L "+q.leftInnerExtent+" "+(q.verticalFullExtent+X)+" A "+(q.leftLargeArcRadius+X)+" "+(q.leftLargeArcRadius+X)+" 0 0 0 "+(q.leftFullExtent+X)+" "+q.verticalLeftInnerExtent,G+=" L "+(q.leftFullExtent+X)+" "+(q.sourceY+q.leftSmallArcRadius)+" A "+(q.leftLargeArcRadius+X)+" "+(q.leftSmallArcRadius+X)+" 0 0 0 "+q.leftInnerExtent+" "+(q.sourceY-X)+" L "+q.sourceX+" "+(q.sourceY-X)+" L "+q.sourceX+" "+(q.sourceY+X)+" L "+q.leftInnerExtent+" "+(q.sourceY+X)+" A "+(q.leftLargeArcRadius-X)+" "+(q.leftSmallArcRadius-X)+" 0 0 1 "+(q.leftFullExtent-X)+" "+(q.sourceY+q.leftSmallArcRadius)+" L "+(q.leftFullExtent-X)+" "+q.verticalLeftInnerExtent,W&&ee?G+=" A "+(q.rightLargeArcRadius-X)+" "+(q.rightSmallArcRadius-X)+" 0 0 1 "+(q.leftFullExtent-X-(q.rightLargeArcRadius-X))+" "+(q.verticalFullExtent-X)+" L "+(q.rightFullExtent+X-K+(q.rightLargeArcRadius-X))+" "+(q.verticalFullExtent-X)+" A "+(q.rightLargeArcRadius-X)+" "+(q.rightSmallArcRadius-X)+" 0 0 1 "+(q.rightFullExtent+X-K)+" "+q.verticalRightInnerExtent:W?G+=" A "+(q.rightLargeArcRadius+X)+" "+(q.rightLargeArcRadius+X)+" 0 0 0 "+(q.leftFullExtent+X)+" "+(q.verticalFullExtent+X)+" L "+(q.rightFullExtent-K-X)+" "+(q.verticalFullExtent+X)+" A "+(q.rightLargeArcRadius+X)+" "+(q.rightLargeArcRadius+X)+" 0 0 0 "+(q.rightFullExtent+X-K)+" "+q.verticalRightInnerExtent:G+=" A "+(q.leftLargeArcRadius-X)+" "+(q.leftLargeArcRadius-X)+" 0 0 1 "+q.leftInnerExtent+" "+(q.verticalFullExtent-X)+" L "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent-X)+" A "+(q.rightLargeArcRadius-X)+" "+(q.rightLargeArcRadius-X)+" 0 0 1 "+(q.rightFullExtent+X-K)+" "+q.verticalRightInnerExtent,G+=" L "+(q.rightFullExtent+X-K)+" "+(q.targetY+q.rightSmallArcRadius)+" A "+(q.rightLargeArcRadius-X)+" "+(q.rightSmallArcRadius-X)+" 0 0 1 "+(q.rightInnerExtent-K)+" "+(q.targetY+X)+" L "+(q.targetX-K)+" "+(q.targetY+X)+(K>0?" L "+q.targetX+" "+q.targetY:"")+"Z"),G}function h(){var $=.5;function K(G){var X=G.linkArrowLength;if(G.link.circular)return w(G.link,X);var q=Math.abs((G.link.target.x0-G.link.source.x1)/2);X>q&&(X=q);var W=G.link.source.x1,ee=G.link.target.x0-X,ae=x(W,ee),fe=ae($),ye=ae(1-$),xe=G.link.y0-G.link.width/2,Ae=G.link.y0+G.link.width/2,Me=G.link.y1-G.link.width/2,Ie=G.link.y1+G.link.width/2,qe="M"+W+","+xe,je="C"+fe+","+xe+" "+ye+","+Me+" "+ee+","+Me,ke="C"+ye+","+Ie+" "+fe+","+Ae+" "+W+","+Ae,ge=X>0?"L"+(ee+X)+","+(Me+G.link.width/2):"";return ge+="L"+ee+","+Ie,qe+je+ge+ke+"Z"}return K}function u($,K){var G=e.nodePadAcross,X=$.nodePad/2;K.dx=K.x1-K.x0,K.dy=K.y1-K.y0;var q=K.dx,W=Math.max(.5,K.dy),ee="node_"+K.pointNumber;return K.group&&(ee=r.randstr()),K.trace=$.trace,K.curveNumber=$.trace.index,{index:K.pointNumber,key:ee,partOfGroup:K.partOfGroup||!1,group:K.group,traceId:$.key,trace:$.trace,node:K,nodePad:$.nodePad,nodeLineColor:$.nodeLineColor,nodeLineWidth:$.nodeLineWidth,textFont:$.textFont,size:$.horizontal?$.height:$.width,visibleWidth:Math.ceil(q),visibleHeight:W,zoneX:-G,zoneY:-X,zoneWidth:q+2*G,zoneHeight:W+2*X,labelY:$.horizontal?K.dy/2+1:K.dx/2+1,left:K.originalLayer===1,sizeAcross:$.width,forceLayouts:$.forceLayouts,horizontal:$.horizontal,reversed:$.reversed,rgb:t.rgb(K.color),alpha:t.parse(K.color).alpha,valueFormat:$.valueFormat,valueSuffix:$.valueSuffix,sankey:$.sankey,graph:$.graph,arrangement:$.arrangement,uniqueNodeLabelPathId:[$.guid,$.key,ee].join("_"),interactionState:$.interactionState,figure:$}}function A($){$.attr("transform",function(K){return a(K.node.x0.toFixed(3),K.node.y0.toFixed(3))})}function b($){$.call(A)}function z($,K){$.call(b),K.attr("d",h())}function I($){$.attr("width",function(K){return K.node.x1-K.node.x0}).attr("height",function(K){return K.visibleHeight})}function N($){return $.link.width>1||$.linkLineWidth>0}function R($){return $.horizontal?$.reversed?a($.translateX+$.width,$.translateY)+"matrix(-1 0 0 1 0 0)":a($.translateX,$.translateY)+"matrix(1 0 0 1 0 0)":$.reversed?a($.translateX,$.translateY+$.height)+"matrix(0 -1 1 0 0 0)":a($.translateX,$.translateY)+"matrix(0 1 1 0 0 0)"}function B($,K,G){$.on(".basic",null).on("mouseover.basic",function(X){!X.interactionState.dragInProgress&&!X.partOfGroup&&(G.hover(this,X,K),X.interactionState.hovered=[this,X])}).on("mousemove.basic",function(X){!X.interactionState.dragInProgress&&!X.partOfGroup&&(G.follow(this,X),X.interactionState.hovered=[this,X])}).on("mouseout.basic",function(X){!X.interactionState.dragInProgress&&!X.partOfGroup&&(G.unhover(this,X,K),X.interactionState.hovered=!1)}).on("click.basic",function(X){X.interactionState.hovered&&(G.unhover(this,X,K),X.interactionState.hovered=!1),!X.interactionState.dragInProgress&&!X.partOfGroup&&G.select(this,X,K)})}function F($,K,G,X){var q=E.behavior.drag().origin(function(W){return{x:W.node.x0+W.visibleWidth/2,y:W.node.y0+W.visibleHeight/2}}).on("dragstart",function(W){if(W.arrangement!=="fixed"&&(r.ensureSingle(X._fullLayout._infolayer,"g","dragcover",function(ae){X._fullLayout._dragCover=ae}),r.raiseToTop(this),W.interactionState.dragInProgress=W.node,re(W.node),W.interactionState.hovered&&(G.nodeEvents.unhover.apply(0,W.interactionState.hovered),W.interactionState.hovered=!1),W.arrangement==="snap")){var ee=W.traceId+"|"+W.key;W.forceLayouts[ee]?W.forceLayouts[ee].alpha(1):P($,ee,W,X),j($,K,W,ee,X)}}).on("drag",function(W){if(W.arrangement!=="fixed"){var ee=E.event.x,ae=E.event.y;W.arrangement==="snap"?(W.node.x0=ee-W.visibleWidth/2,W.node.x1=ee+W.visibleWidth/2,W.node.y0=ae-W.visibleHeight/2,W.node.y1=ae+W.visibleHeight/2):(W.arrangement==="freeform"&&(W.node.x0=ee-W.visibleWidth/2,W.node.x1=ee+W.visibleWidth/2),ae=Math.max(0,Math.min(W.size-W.visibleHeight/2,ae)),W.node.y0=ae-W.visibleHeight/2,W.node.y1=ae+W.visibleHeight/2),re(W.node),W.arrangement!=="snap"&&(W.sankey.update(W.graph),z($.filter(ne(W)),K))}}).on("dragend",function(W){if(W.arrangement!=="fixed"){W.interactionState.dragInProgress=!1;for(var ee=0;ee0)window.requestAnimationFrame(W);else{var fe=G.node.originalX;G.node.x0=fe-G.visibleWidth/2,G.node.x1=fe+G.visibleWidth/2,Z(G,q)}})}function U($,K,G,X){return function(){for(var W=0,ee=0;ee0&&X.forceLayouts[K].alpha(0)}}function Z($,K){for(var G=[],X=[],q=0;q<$.graph.nodes.length;q++){var W=($.graph.nodes[q].x0+$.graph.nodes[q].x1)/2,ee=($.graph.nodes[q].y0+$.graph.nodes[q].y1)/2;G.push(W/$.figure.width),X.push(ee/$.figure.height)}m.call("_guiRestyle",K,{"node.x":[G],"node.y":[X]},$.trace.index).then(function(){K._fullLayout._dragCover&&K._fullLayout._dragCover.remove()})}function Q($){var K=[],G;for(G=0;G<$.length;G++)$[G].originalX=($[G].x0+$[G].x1)/2,$[G].originalY=($[G].y0+$[G].y1)/2,K.indexOf($[G].originalX)===-1&&K.push($[G].originalX);for(K.sort(function(X,q){return X-q}),G=0;G<$.length;G++)$[G].originalLayerIndex=K.indexOf($[G].originalX),$[G].originalLayer=$[G].originalLayerIndex/(K.length-1)}function re($){$.lastDraggedX=$.x0+$.dx/2,$.lastDraggedY=$.y0+$.dy/2}function ne($){return function(K){return K.node.originalX===$.node.originalX}}function oe($){for(var K=0;K<$.length;K++)$[K].y=($[K].y0+$[K].y1)/2,$[K].x=($[K].x0+$[K].x1)/2}function V($){for(var K=0;K<$.length;K++)$[K].y0=$[K].y-$[K].dy/2,$[K].y1=$[K].y0+$[K].dy,$[K].x0=$[K].x-$[K].dx/2,$[K].x1=$[K].x0+$[K].dx}H.exports=function($,K,G,X,q){var W=$._context.staticPlot,ee=!1;r.ensureSingle($._fullLayout._infolayer,"g","first-render",function(){ee=!0});var ae=$._fullLayout._dragCover,fe=G.filter(function(ke){return f(ke).trace.visible}).map(C.bind(null,X)),ye=K.selectAll("."+e.cn.sankey).data(fe,c);ye.exit().remove(),ye.enter().append("g").classed(e.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events",W?"none":"auto").attr("transform",R),ye.each(function(ke,ge){$._fullData[ge]._sankey=ke;var le="bgsankey-"+ke.trace.uid+"-"+ge;r.ensureSingle($._fullLayout._draggers,"rect",le),$._fullData[ge]._bgRect=E.select("."+le),$._fullData[ge]._bgRect.style("pointer-events",W?"none":"all").attr("width",ke.width).attr("height",ke.height).attr("x",ke.translateX).attr("y",ke.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),ye.transition().ease(e.ease).duration(e.duration).attr("transform",R);var xe=ye.selectAll("."+e.cn.sankeyLinks).data(g,c);xe.enter().append("g").classed(e.cn.sankeyLinks,!0).style("fill","none");var Ae=xe.selectAll("."+e.cn.sankeyLink).data(function(ke){var ge=ke.graph.links;return ge.filter(function(le){return le.value}).map(_.bind(null,ke))},c);Ae.enter().append("path").classed(e.cn.sankeyLink,!0).call(B,ye,q.linkEvents),Ae.style("stroke",ke=>N(ke)?t.rgb(ke.linkLineColor):ke.rgb).style("stroke-opacity",ke=>N(ke)?t.opacity(ke.linkLineColor):ke.alpha).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha).style("stroke-width",ke=>N(ke)?ke.linkLineWidth:1).attr("d",h()),Ae.style("opacity",function(){return $._context.staticPlot||ee||ae?1:0}).transition().ease(e.ease).duration(e.duration).style("opacity",1),Ae.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Me=ye.selectAll("."+e.cn.sankeyNodeSet).data(g,c);Me.enter().append("g").classed(e.cn.sankeyNodeSet,!0),Me.style("cursor",function(ke){switch(ke.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var Ie=Me.selectAll("."+e.cn.sankeyNode).data(function(ke){var ge=ke.graph.nodes;return Q(ge),ge.map(u.bind(null,ke))},c);Ie.enter().append("g").classed(e.cn.sankeyNode,!0).call(A).style("opacity",function(ke){return($._context.staticPlot||ee)&&!ke.partOfGroup?1:0}),Ie.call(B,ye,q.nodeEvents).call(F,Ae,q,$),Ie.transition().ease(e.ease).duration(e.duration).call(A).style("opacity",function(ke){return ke.partOfGroup?0:1}),Ie.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var qe=Ie.selectAll("."+e.cn.nodeRect).data(g);qe.enter().append("rect").classed(e.cn.nodeRect,!0).call(I),qe.style("stroke-width",function(ke){return ke.nodeLineWidth}).style("stroke",function(ke){return t.rgb(ke.nodeLineColor)}).style("stroke-opacity",function(ke){return t.opacity(ke.nodeLineColor)}).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha),qe.transition().ease(e.ease).duration(e.duration).call(I);var je=Ie.selectAll("."+e.cn.nodeLabel).data(g);je.enter().append("text").classed(e.cn.nodeLabel,!0).style("cursor","default"),je.attr("data-notex",1).text(function(ke){return ke.node.label}).each(function(ke){var ge=E.select(this);n.font(ge,ke.textFont),p.convertToTspans(ge,$)}).attr("text-anchor",function(ke){return ke.horizontal&&ke.left!==ke.reversed?"end":"start"}).attr("transform",function(ke){var ge=E.select(this),le=p.lineCount(ge),ve=ke.textFont.size*((le-1)*S-T),se=ke.nodeLineWidth/2+M;if(!ke.horizontal){var We=ke.reversed?(ke.visibleWidth+ve)/2:(ke.visibleWidth-ve)/2,Te=ke.reversed?o(90):"scale(-1,1)"+o(90);return a(We,se)+Te}var Fe=se,We=(ke.visibleHeight-ve)/2;return ke.left?Fe=-Fe:Fe+=ke.visibleWidth,a(Fe,We)+(ke.reversed?"scale(-1,1)":"")}),je.transition().ease(e.ease).duration(e.duration)}}}),x5=Ee({"src/traces/sankey/plot.js"(J,H){"use strict";var v=Va(),x=Vr(),E=x.numberFormat,k=nP(),l=$l(),e=Qn(),t=b5().cn,n=x._;function r(S){return S!==""}function a(S,M){return S.filter(function(C){return C.key===M.traceId})}function o(S,M){v.select(S).select("path").style("fill-opacity",M),v.select(S).select("rect").style("fill-opacity",M)}function s(S){v.select(S).select("text.name").style("fill","black")}function c(S){return function(M){return S.node.sourceLinks.indexOf(M.link)!==-1||S.node.targetLinks.indexOf(M.link)!==-1}}function g(S){return function(M){return M.node.sourceLinks.indexOf(S.link)!==-1||M.node.targetLinks.indexOf(S.link)!==-1}}function f(S,M,C){M&&C&&a(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(m.bind(0,M,C,!1))}function p(S,M,C){M&&C&&a(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(i.bind(0,M,C,!1))}function m(S,M,C,_){_.style("fill",function(w){if(!w.link.concentrationscale)return w.hoverRgb}).style("fill-opacity",function(w){if(!w.link.concentrationscale)return w.hoverAlpha}),_.each(function(w){var h=w.link.label;h!==""&&a(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===h}).style("fill",function(u){if(!u.link.concentrationscale)return u.hoverRgb}).style("fill-opacity",function(u){if(!u.link.concentrationscale)return u.hoverAlpha})}),C&&a(M,S).selectAll("."+t.sankeyNode).filter(g(S)).call(f)}function i(S,M,C,_){_.style("fill",function(w){return w.rgb}).style("fill-opacity",function(w){return w.alpha}),_.each(function(w){var h=w.link.label;h!==""&&a(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===h}).style("fill",u=>u.rgb).style("fill-opacity",u=>u.alpha)}),C&&a(M,S).selectAll(t.sankeyNode).filter(g(S)).call(p)}function T(S,M){var C=S.hoverlabel||{},_=x.nestedProperty(C,M).get();return Array.isArray(_)?!1:_}H.exports=function(M,C){for(var _=M._fullLayout,w=_._paper,h=_._size,u=0;u"),color:T(V,"bgcolor")||e.addOpacity(q.color,1),borderColor:T(V,"bordercolor"),fontFamily:T(V,"font.family"),fontSize:T(V,"font.size"),fontColor:T(V,"font.color"),fontWeight:T(V,"font.weight"),fontStyle:T(V,"font.style"),fontVariant:T(V,"font.variant"),fontTextcase:T(V,"font.textcase"),fontLineposition:T(V,"font.lineposition"),fontShadow:T(V,"font.shadow"),nameLength:T(V,"namelength"),textAlign:T(V,"align"),idealAlign:v.event.x"),color:T(V,"bgcolor")||oe.rgb,borderColor:T(V,"bordercolor"),fontFamily:T(V,"font.family"),fontSize:T(V,"font.size"),fontColor:T(V,"font.color"),fontWeight:T(V,"font.weight"),fontStyle:T(V,"font.style"),fontVariant:T(V,"font.variant"),fontTextcase:T(V,"font.textcase"),fontLineposition:T(V,"font.lineposition"),fontShadow:T(V,"font.shadow"),nameLength:T(V,"namelength"),textAlign:T(V,"align"),idealAlign:"left",hovertemplate:V.hovertemplate,hovertemplateLabels:ee,eventData:[oe.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:M});o(ye,.85),s(ye)}}},re=function(ne,oe,V){M._fullLayout.hovermode!==!1&&(v.select(ne).call(p,oe,V),oe.node.trace.node.hoverinfo!=="skip"&&(oe.node.fullData=oe.node.trace,M.emit("plotly_unhover",{event:v.event,points:[oe.node]})),l.loneUnhover(_._hoverlayer.node()))};k(M,w,C,{width:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{linkEvents:{hover:z,follow:P,unhover:j,select:b},nodeEvents:{hover:Z,follow:Q,unhover:re,select:U}})}}}),iP=Ee({"src/traces/sankey/base_plot.js"(J){"use strict";var H=El().overrideAll,v=uf().getModuleCalcData,x=x5(),E=Ei(),k=Dh(),l=qf(),e=uc().prepSelect,t=Vr(),n=Ri(),r="sankey";J.name=r,J.baseLayoutAttrOverrides=H({hoverlabel:E.hoverlabel},"plot","nested"),J.plot=function(o){var s=v(o.calcdata,r)[0];x(o,s),J.updateFx(o)},J.clean=function(o,s,c,g){var f=g._has&&g._has(r),p=s._has&&s._has(r);f&&!p&&(g._paperdiv.selectAll(".sankey").remove(),g._paperdiv.selectAll(".bgsankey").remove())},J.updateFx=function(o){for(var s=0;s0}H.exports=function(R,B,F,P){var j=R._fullLayout,U;S(F)&&P&&(U=P()),k.makeTraceGroups(j._indicatorlayer,B,"trace").each(function(Z){var Q=Z[0],re=Q.trace,ne=v.select(this),oe=re._hasGauge,V=re._isAngular,$=re._isBullet,K=re.domain,G={w:j._size.w*(K.x[1]-K.x[0]),h:j._size.h*(K.y[1]-K.y[0]),l:j._size.l+j._size.w*K.x[0],r:j._size.r+j._size.w*(1-K.x[1]),t:j._size.t+j._size.h*(1-K.y[1]),b:j._size.b+j._size.h*K.y[0]},X=G.l+G.w/2,q=G.t+G.h/2,W=Math.min(G.w/2,G.h),ee=a.innerRadius*W,ae,fe,ye,xe=re.align||"center";if(fe=q,!oe)ae=G.l+i[xe]*G.w,ye=function(se){return A(se,G.w,G.h)};else if(V&&(ae=X,fe=q+W/2,ye=function(se){return b(se,.9*ee)}),$){var Ae=a.bulletPadding,Me=1-a.bulletNumberDomainSize+Ae;ae=G.l+(Me+(1-Me)*i[xe])*G.w,ye=function(se){return A(se,(a.bulletNumberDomainSize-Ae)*G.w,G.h)}}_(R,ne,Z,{numbersX:ae,numbersY:fe,numbersScaler:ye,transitionOpts:F,onComplete:U});var Ie,qe;oe&&(Ie={range:re.gauge.axis.range,color:re.gauge.bgcolor,line:{color:re.gauge.bordercolor,width:0},thickness:1},qe={range:re.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:re.gauge.bordercolor,width:re.gauge.borderwidth},thickness:1});var je=ne.selectAll("g.angular").data(V?Z:[]);je.exit().remove();var ke=ne.selectAll("g.angularaxis").data(V?Z:[]);ke.exit().remove(),V&&C(R,ne,Z,{radius:W,innerRadius:ee,gauge:je,layer:ke,size:G,gaugeBg:Ie,gaugeOutline:qe,transitionOpts:F,onComplete:U});var ge=ne.selectAll("g.bullet").data($?Z:[]);ge.exit().remove();var le=ne.selectAll("g.bulletaxis").data($?Z:[]);le.exit().remove(),$&&M(R,ne,Z,{gauge:ge,layer:le,size:G,gaugeBg:Ie,gaugeOutline:qe,transitionOpts:F,onComplete:U});var ve=ne.selectAll("text.title").data(Z);ve.exit().remove(),ve.enter().append("text").classed("title",!0),ve.attr("text-anchor",function(){return $?m.right:m[re.title.align]}).text(re.title.text).call(r.font,re.title.font).call(o.convertToTspans,R),ve.attr("transform",function(){var se=G.l+G.w*i[re.title.align],Te,Fe=a.titlePadding,We=r.bBox(ve.node());if(oe){if(V)if(re.gauge.axis.visible){var Ge=r.bBox(ke.node());Te=Ge.top-Fe-We.bottom}else Te=G.t+G.h/2-W/2-We.bottom-Fe;$&&(Te=fe-(We.top+We.bottom)/2,se=G.l-a.bulletPadding*G.w)}else Te=re._numbersTop-Fe-We.bottom;return e(se,Te)})})};function M(N,R,B,F){var P=B[0].trace,j=F.gauge,U=F.layer,Z=F.gaugeBg,Q=F.gaugeOutline,re=F.size,ne=P.domain,oe=F.transitionOpts,V=F.onComplete,$,K,G,X,q;j.enter().append("g").classed("bullet",!0),j.attr("transform",e(re.l,re.t)),U.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),U.selectAll("g.xbulletaxistick,path,text").remove();var W=re.h,ee=P.gauge.bar.thickness*W,ae=ne.x[0],fe=ne.x[0]+(ne.x[1]-ne.x[0])*(P._hasNumber||P._hasDelta?1-a.bulletNumberDomainSize:1);$=u(N,P.gauge.axis),$._id="xbulletaxis",$.domain=[ae,fe],$.setScale(),K=s.calcTicks($),G=s.makeTransTickFn($),X=s.getTickSigns($)[2],q=re.t+re.h,$.visible&&(s.drawTicks(N,$,{vals:$.ticks==="inside"?s.clipEnds($,K):K,layer:U,path:s.makeTickPath($,q,X),transFn:G}),s.drawLabels(N,$,{vals:K,layer:U,transFn:G,labelFns:s.makeLabelFns($,q)}));function ye(ke){ke.attr("width",function(ge){return Math.max(0,$.c2p(ge.range[1])-$.c2p(ge.range[0]))}).attr("x",function(ge){return $.c2p(ge.range[0])}).attr("y",function(ge){return .5*(1-ge.thickness)*W}).attr("height",function(ge){return ge.thickness*W})}var xe=[Z].concat(P.gauge.steps),Ae=j.selectAll("g.bg-bullet").data(xe);Ae.enter().append("g").classed("bg-bullet",!0).append("rect"),Ae.select("rect").call(ye).call(w),Ae.exit().remove();var Me=j.selectAll("g.value-bullet").data([P.gauge.bar]);Me.enter().append("g").classed("value-bullet",!0).append("rect"),Me.select("rect").attr("height",ee).attr("y",(W-ee)/2).call(w),S(oe)?Me.select("rect").transition().duration(oe.duration).ease(oe.easing).each("end",function(){V&&V()}).each("interrupt",function(){V&&V()}).attr("width",Math.max(0,$.c2p(Math.min(P.gauge.axis.range[1],B[0].y)))):Me.select("rect").attr("width",typeof B[0].y=="number"?Math.max(0,$.c2p(Math.min(P.gauge.axis.range[1],B[0].y))):0),Me.exit().remove();var Ie=B.filter(function(){return P.gauge.threshold.value||P.gauge.threshold.value===0}),qe=j.selectAll("g.threshold-bullet").data(Ie);qe.enter().append("g").classed("threshold-bullet",!0).append("line"),qe.select("line").attr("x1",$.c2p(P.gauge.threshold.value)).attr("x2",$.c2p(P.gauge.threshold.value)).attr("y1",(1-P.gauge.threshold.thickness)/2*W).attr("y2",(1-(1-P.gauge.threshold.thickness)/2)*W).call(p.stroke,P.gauge.threshold.line.color).style("stroke-width",P.gauge.threshold.line.width),qe.exit().remove();var je=j.selectAll("g.gauge-outline").data([Q]);je.enter().append("g").classed("gauge-outline",!0).append("rect"),je.select("rect").call(ye).call(w),je.exit().remove()}function C(N,R,B,F){var P=B[0].trace,j=F.size,U=F.radius,Z=F.innerRadius,Q=F.gaugeBg,re=F.gaugeOutline,ne=[j.l+j.w/2,j.t+j.h/2+U/2],oe=F.gauge,V=F.layer,$=F.transitionOpts,K=F.onComplete,G=Math.PI/2;function X(gt){var mt=P.gauge.axis.range[0],Tt=P.gauge.axis.range[1],At=(gt-mt)/(Tt-mt)*Math.PI-G;return At<-G?-G:At>G?G:At}function q(gt){return v.svg.arc().innerRadius((Z+U)/2-gt/2*(U-Z)).outerRadius((Z+U)/2+gt/2*(U-Z)).startAngle(-G)}function W(gt){gt.attr("d",function(mt){return q(mt.thickness).startAngle(X(mt.range[0])).endAngle(X(mt.range[1]))()})}var ee,ae,fe,ye;oe.enter().append("g").classed("angular",!0),oe.attr("transform",e(ne[0],ne[1])),V.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),V.selectAll("g.xangularaxistick,path,text").remove(),ee=u(N,P.gauge.axis),ee.type="linear",ee.range=P.gauge.axis.range,ee._id="xangularaxis",ee.ticklabeloverflow="allow",ee.setScale();var xe=function(gt){return(ee.range[0]-gt.x)/(ee.range[1]-ee.range[0])*Math.PI+Math.PI},Ae={},Me=s.makeLabelFns(ee,0),Ie=Me.labelStandoff;Ae.xFn=function(gt){var mt=xe(gt);return Math.cos(mt)*Ie},Ae.yFn=function(gt){var mt=xe(gt),Tt=Math.sin(mt)>0?.2:1;return-Math.sin(mt)*(Ie+gt.fontSize*Tt)+Math.abs(Math.cos(mt))*(gt.fontSize*n)},Ae.anchorFn=function(gt){var mt=xe(gt),Tt=Math.cos(mt);return Math.abs(Tt)<.1?"middle":Tt>0?"start":"end"},Ae.heightFn=function(gt,mt,Tt){var At=xe(gt);return-.5*(1+Math.sin(At))*Tt};var qe=function(gt){return e(ne[0]+U*Math.cos(gt),ne[1]-U*Math.sin(gt))};fe=function(gt){return qe(xe(gt))};var je=function(gt){var mt=xe(gt);return qe(mt)+"rotate("+-t(mt)+")"};if(ae=s.calcTicks(ee),ye=s.getTickSigns(ee)[2],ee.visible){ye=ee.ticks==="inside"?-1:1;var ke=(ee.linewidth||1)/2;s.drawTicks(N,ee,{vals:ae,layer:V,path:"M"+ye*ke+",0h"+ye*ee.ticklen,transFn:je}),s.drawLabels(N,ee,{vals:ae,layer:V,transFn:fe,labelFns:Ae})}var ge=[Q].concat(P.gauge.steps),le=oe.selectAll("g.bg-arc").data(ge);le.enter().append("g").classed("bg-arc",!0).append("path"),le.select("path").call(W).call(w),le.exit().remove();var ve=q(P.gauge.bar.thickness),se=oe.selectAll("g.value-arc").data([P.gauge.bar]);se.enter().append("g").classed("value-arc",!0).append("path");var Te=se.select("path");S($)?(Te.transition().duration($.duration).ease($.easing).each("end",function(){K&&K()}).each("interrupt",function(){K&&K()}).attrTween("d",h(ve,X(B[0].lastY),X(B[0].y))),P._lastValue=B[0].y):Te.attr("d",typeof B[0].y=="number"?ve.endAngle(X(B[0].y)):"M0,0Z"),Te.call(w),se.exit().remove(),ge=[];var Fe=P.gauge.threshold.value;(Fe||Fe===0)&&ge.push({range:[Fe,Fe],color:P.gauge.threshold.color,line:{color:P.gauge.threshold.line.color,width:P.gauge.threshold.line.width},thickness:P.gauge.threshold.thickness});var We=oe.selectAll("g.threshold-arc").data(ge);We.enter().append("g").classed("threshold-arc",!0).append("path"),We.select("path").call(W).call(w),We.exit().remove();var Ge=oe.selectAll("g.gauge-outline").data([re]);Ge.enter().append("g").classed("gauge-outline",!0).append("path"),Ge.select("path").call(W).call(w),Ge.exit().remove()}function _(N,R,B,F){var P=B[0].trace,j=F.numbersX,U=F.numbersY,Z=P.align||"center",Q=m[Z],re=F.transitionOpts,ne=F.onComplete,oe=k.ensureSingle(R,"g","numbers"),V,$,K,G=[];P._hasNumber&&G.push("number"),P._hasDelta&&(G.push("delta"),P.delta.position==="left"&&G.reverse());var X=oe.selectAll("text").data(G);X.enter().append("text"),X.attr("text-anchor",function(){return Q}).attr("class",function(qe){return qe}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),X.exit().remove();function q(qe,je,ke,ge){if(qe.match("s")&&ke>=0!=ge>=0&&!je(ke).slice(-1).match(T)&&!je(ge).slice(-1).match(T)){var le=qe.slice().replace("s","f").replace(/\d+/,function(se){return parseInt(se)-1}),ve=u(N,{tickformat:le});return function(se){return Math.abs(se)<1?s.tickText(ve,se).text:je(se)}}else return je}function W(){var qe=u(N,{tickformat:P.number.valueformat},P._range);qe.setScale(),s.prepTicks(qe);var je=function(se){return s.tickText(qe,se).text},ke=P.number.suffix,ge=P.number.prefix,le=oe.select("text.number");function ve(){var se=typeof B[0].y=="number"?ge+je(B[0].y)+ke:"-";le.text(se).call(r.font,P.number.font).call(o.convertToTspans,N)}return S(re)?le.transition().duration(re.duration).ease(re.easing).each("end",function(){ve(),ne&&ne()}).each("interrupt",function(){ve(),ne&&ne()}).attrTween("text",function(){var se=v.select(this),Te=E(B[0].lastY,B[0].y);P._lastValue=B[0].y;var Fe=q(P.number.valueformat,je,B[0].lastY,B[0].y);return function(We){se.text(ge+Fe(Te(We))+ke)}}):ve(),V=z(ge+je(B[0].y)+ke,P.number.font,Q,N),le}function ee(){var qe=u(N,{tickformat:P.delta.valueformat},P._range);qe.setScale(),s.prepTicks(qe);var je=function(We){return s.tickText(qe,We).text},ke=P.delta.suffix,ge=P.delta.prefix,le=function(We){var Ge=P.delta.relative?We.relativeDelta:We.delta;return Ge},ve=function(We,Ge){return We===0||typeof We!="number"||isNaN(We)?"-":(We>0?P.delta.increasing.symbol:P.delta.decreasing.symbol)+ge+Ge(We)+ke},se=function(We){return We.delta>=0?P.delta.increasing.color:P.delta.decreasing.color};P._deltaLastValue===void 0&&(P._deltaLastValue=le(B[0]));var Te=oe.select("text.delta");Te.call(r.font,P.delta.font).call(p.fill,se({delta:P._deltaLastValue}));function Fe(){Te.text(ve(le(B[0]),je)).call(p.fill,se(B[0])).call(o.convertToTspans,N)}return S(re)?Te.transition().duration(re.duration).ease(re.easing).tween("text",function(){var We=v.select(this),Ge=le(B[0]),gt=P._deltaLastValue,mt=q(P.delta.valueformat,je,gt,Ge),Tt=E(gt,Ge);return P._deltaLastValue=Ge,function(At){We.text(ve(Tt(At),mt)),We.call(p.fill,se({delta:Tt(At)}))}}).each("end",function(){Fe(),ne&&ne()}).each("interrupt",function(){Fe(),ne&&ne()}):Fe(),$=z(ve(le(B[0]),je),P.delta.font,Q,N),Te}var ae=P.mode+P.align,fe;if(P._hasDelta&&(fe=ee(),ae+=P.delta.position+P.delta.font.size+P.delta.font.family+P.delta.valueformat,ae+=P.delta.increasing.symbol+P.delta.decreasing.symbol,K=$),P._hasNumber&&(W(),ae+=P.number.font.size+P.number.font.family+P.number.valueformat+P.number.suffix+P.number.prefix,K=V),P._hasDelta&&P._hasNumber){var ye=[(V.left+V.right)/2,(V.top+V.bottom)/2],xe=[($.left+$.right)/2,($.top+$.bottom)/2],Ae,Me,Ie=.75*P.delta.font.size;P.delta.position==="left"&&(Ae=I(P,"deltaPos",0,-1*(V.width*i[P.align]+$.width*(1-i[P.align])+Ie),ae,Math.min),Me=ye[1]-xe[1],K={width:V.width+$.width+Ie,height:Math.max(V.height,$.height),left:$.left+Ae,right:V.right,top:Math.min(V.top,$.top+Me),bottom:Math.max(V.bottom,$.bottom+Me)}),P.delta.position==="right"&&(Ae=I(P,"deltaPos",0,V.width*(1-i[P.align])+$.width*i[P.align]+Ie,ae,Math.max),Me=ye[1]-xe[1],K={width:V.width+$.width+Ie,height:Math.max(V.height,$.height),left:V.left,right:$.right+Ae,top:Math.min(V.top,$.top+Me),bottom:Math.max(V.bottom,$.bottom+Me)}),P.delta.position==="bottom"&&(Ae=null,Me=$.height,K={width:Math.max(V.width,$.width),height:V.height+$.height,left:Math.min(V.left,$.left),right:Math.max(V.right,$.right),top:V.bottom-V.height,bottom:V.bottom+$.height}),P.delta.position==="top"&&(Ae=null,Me=V.top,K={width:Math.max(V.width,$.width),height:V.height+$.height,left:Math.min(V.left,$.left),right:Math.max(V.right,$.right),top:V.bottom-V.height-$.height,bottom:V.bottom}),fe.attr({dx:Ae,dy:Me})}(P._hasNumber||P._hasDelta)&&oe.attr("transform",function(){var qe=F.numbersScaler(K);ae+=qe[2];var je=I(P,"numbersScale",1,qe[0],ae,Math.min),ke;P._scaleNumbers||(je=1),P._isAngular?ke=U-je*K.bottom:ke=U-je*(K.top+K.bottom)/2,P._numbersTop=je*K.top+ke;var ge=K[Z];Z==="center"&&(ge=(K.left+K.right)/2);var le=j-je*ge;return le=I(P,"numbersTranslate",0,le,ae,Math.max),e(le,ke)+l(je)})}function w(N){N.each(function(R){p.stroke(v.select(this),R.line.color)}).each(function(R){p.fill(v.select(this),R.color)}).style("stroke-width",function(R){return R.line.width})}function h(N,R,B){return function(){var F=x(R,B);return function(P){return N.endAngle(F(P))()}}}function u(N,R,B){var F=N._fullLayout,P=k.extendFlat({type:"linear",ticks:"outside",range:B,showline:!0},R),j={type:"linear",_id:"x"+R._id},U={letter:"x",font:F.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function Z(Q,re){return k.coerce(P,j,f,Q,re)}return c(P,j,Z,U,F),g(P,j,Z,U),j}function A(N,R,B){var F=Math.min(R/N.width,B/N.height);return[F,N,R+"x"+B]}function b(N,R){var B=Math.sqrt(N.width/2*(N.width/2)+N.height*N.height),F=R/B;return[F,N,R]}function z(N,R,B,F){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),j=v.select(P);return j.text(N).attr("x",0).attr("y",0).attr("text-anchor",B).attr("data-unformatted",N).call(o.convertToTspans,F).call(r.font,R),r.bBox(j.node())}function I(N,R,B,F,P,j){var U="_cache"+R;N[U]&&N[U].key===P||(N[U]={key:P,value:B});var Z=k.aggNums(j,null,[N[U].value,F],2);return N[U].value=Z,Z}}}),dP=Ee({"src/traces/indicator/index.js"(J,H){"use strict";H.exports={moduleType:"trace",name:"indicator",basePlotModule:uP(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:w5(),supplyDefaults:cP().supplyDefaults,calc:fP().calc,plot:hP(),meta:{}}}}),vP=Ee({"lib/indicator.js"(J,H){"use strict";H.exports=dP()}}),A5=Ee({"src/traces/table/attributes.js"(J,H){"use strict";var v=Kd(),x=vo().extendFlat,E=El().overrideAll,k=Xs(),l=kl().attributes,e=Fl().descriptionOnlyNumbers,t=H.exports=E({domain:l({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:x({},v.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:x({},k({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:x({},v.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:x({},k({arrayOk:!0}))}},"calc","from-root")}}),pP=Ee({"src/traces/table/defaults.js"(J,H){"use strict";var v=Vr(),x=A5(),E=kl().defaults;function k(l,e){for(var t=l.columnorder||[],n=l.header.values.length,r=t.slice(0,n),a=r.slice().sort(function(c,g){return c-g}),o=r.map(function(c){return a.indexOf(c)}),s=o.length;s",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}}),gP=Ee({"src/traces/table/data_preparation_helper.js"(J,H){"use strict";var v=M5(),x=vo().extendFlat,E=mi(),k=vs().isTypedArray,l=vs().isArrayOrTypedArray;H.exports=function(f,p){var m=n(p.cells.values),i=function(Q){return Q.slice(p.header.values.length,Q.length)},T=n(p.header.values);T.length&&!T[0].length&&(T[0]=[""],T=n(T));var S=T.concat(i(m).map(function(){return r((T[0]||[""]).length)})),M=p.domain,C=Math.floor(f._fullLayout._size.w*(M.x[1]-M.x[0])),_=Math.floor(f._fullLayout._size.h*(M.y[1]-M.y[0])),w=p.header.values.length?S[0].map(function(){return p.header.height}):[v.emptyHeaderHeight],h=m.length?m[0].map(function(){return p.cells.height}):[],u=w.reduce(t,0),A=_-u,b=A+v.uplift,z=s(h,b),I=s(w,u),N=o(I,[]),R=o(z,N),B={},F=p.columnorder;l(F)&&(F=Array.from(F)),F=F.concat(i(m.map(function(Q,re){return re})));var P=S.map(function(Q,re){var ne=l(p.columnwidth)?p.columnwidth[Math.min(re,p.columnwidth.length-1)]:p.columnwidth;return E(ne)?Number(ne):1}),j=P.reduce(t,0);P=P.map(function(Q){return Q/j*C});var U=Math.max(e(p.header.line.width),e(p.cells.line.width)),Z={key:p.uid+f._context.staticPlot,translateX:M.x[0]*f._fullLayout._size.w,translateY:f._fullLayout._size.h*(1-M.y[1]),size:f._fullLayout._size,width:C,maxLineWidth:U,height:_,columnOrder:F,groupHeight:_,rowBlocks:R,headerRowBlocks:N,scrollY:0,cells:x({},p.cells,{values:m}),headerCells:x({},p.header,{values:S}),gdColumns:S.map(function(Q){return Q[0]}),gdColumnsOriginalOrder:S.map(function(Q){return Q[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:S.map(function(Q,re){var ne=B[Q];B[Q]=(ne||0)+1;var oe=Q+"__"+B[Q];return{key:oe,label:Q,specIndex:re,xIndex:F[re],xScale:a,x:void 0,calcdata:void 0,columnWidth:P[re]}})};return Z.columns.forEach(function(Q){Q.calcdata=Z,Q.x=a(Q)}),Z};function e(g){if(l(g)){for(var f=0,p=0;p=f||_===g.length-1)&&(p[i]=S,S.key=C++,S.firstRowIndex=M,S.lastRowIndex=_,S=c(),i+=T,M=_+1,T=0);return p}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),yP=Ee({"src/traces/table/data_split_helpers.js"(J){"use strict";var H=vo().extendFlat;J.splitToPanels=function(x){var E=[0,0],k=H({},x,{key:"header",type:"header",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!0,values:x.calcdata.headerCells.values[x.specIndex],rowBlocks:x.calcdata.headerRowBlocks,calcdata:H({},x.calcdata,{cells:x.calcdata.headerCells})}),l=H({},x,{key:"cells1",type:"cells",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:x.calcdata.cells.values[x.specIndex],rowBlocks:x.calcdata.rowBlocks}),e=H({},x,{key:"cells2",type:"cells",page:1,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:x.calcdata.cells.values[x.specIndex],rowBlocks:x.calcdata.rowBlocks});return[l,e,k]},J.splitToCells=function(x){var E=v(x);return(x.values||[]).slice(E[0],E[1]).map(function(k,l){var e=typeof k=="string"&&k.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:l+e,key:E[0]+l,column:x,calcdata:x.calcdata,page:x.page,rowBlocks:x.rowBlocks,value:k}})};function v(x){var E=x.rowBlocks[x.page],k=E?E.rows[0].rowIndex:0,l=E?k+E.rows.length:0;return[k,l]}}}),S5=Ee({"src/traces/table/plot.js"(J,H){"use strict";var v=M5(),x=Va(),E=Vr(),k=E.numberFormat,l=Qh(),e=mo(),t=Fs(),n=Vr().raiseToTop,r=Vr().strTranslate,a=Vr().cancelTransition,o=gP(),s=yP(),c=Qn();H.exports=function(ae,fe){var ye=!ae._context.staticPlot,xe=ae._fullLayout._paper.selectAll("."+v.cn.table).data(fe.map(function(Ge){var gt=l.unwrap(Ge),mt=gt.trace;return o(ae,mt)}),l.keyFun);xe.exit().remove(),xe.enter().append("g").classed(v.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),xe.attr("width",function(Ge){return Ge.width+Ge.size.l+Ge.size.r}).attr("height",function(Ge){return Ge.height+Ge.size.t+Ge.size.b}).attr("transform",function(Ge){return r(Ge.translateX,Ge.translateY)});var Ae=xe.selectAll("."+v.cn.tableControlView).data(l.repeat,l.keyFun),Me=Ae.enter().append("g").classed(v.cn.tableControlView,!0).style("box-sizing","content-box");if(ye){var Ie="onwheel"in document?"wheel":"mousewheel";Me.on("mousemove",function(Ge){Ae.filter(function(gt){return Ge===gt}).call(i,ae)}).on(Ie,function(Ge){if(!Ge.scrollbarState.wheeling){Ge.scrollbarState.wheeling=!0;var gt=Ge.scrollY+x.event.deltaY,mt=Q(ae,Ae,null,gt)(Ge);mt||(x.event.stopPropagation(),x.event.preventDefault()),Ge.scrollbarState.wheeling=!1}}).call(i,ae,!0)}Ae.attr("transform",function(Ge){return r(Ge.size.l,Ge.size.t)});var qe=Ae.selectAll("."+v.cn.scrollBackground).data(l.repeat,l.keyFun);qe.enter().append("rect").classed(v.cn.scrollBackground,!0).attr("fill","none"),qe.attr("width",function(Ge){return Ge.width}).attr("height",function(Ge){return Ge.height}),Ae.each(function(Ge){e.setClipUrl(x.select(this),f(ae,Ge),ae)});var je=Ae.selectAll("."+v.cn.yColumn).data(function(Ge){return Ge.columns},l.keyFun);je.enter().append("g").classed(v.cn.yColumn,!0),je.exit().remove(),je.attr("transform",function(Ge){return r(Ge.x,0)}),ye&&je.call(x.behavior.drag().origin(function(Ge){var gt=x.select(this);return B(gt,Ge,-v.uplift),n(this),Ge.calcdata.columnDragInProgress=!0,i(Ae.filter(function(mt){return Ge.calcdata.key===mt.key}),ae),Ge}).on("drag",function(Ge){var gt=x.select(this),mt=function(Kt){return(Ge===Kt?x.event.x:Kt.x)+Kt.columnWidth/2};Ge.x=Math.max(-v.overdrag,Math.min(Ge.calcdata.width+v.overdrag-Ge.columnWidth,x.event.x));var Tt=m(je).filter(function(Kt){return Kt.calcdata.key===Ge.calcdata.key}),At=Tt.sort(function(Kt,ar){return mt(Kt)-mt(ar)});At.forEach(function(Kt,ar){Kt.xIndex=ar,Kt.x=Ge===Kt?Kt.x:Kt.xScale(Kt)}),je.filter(function(Kt){return Ge!==Kt}).transition().ease(v.transitionEase).duration(v.transitionDuration).attr("transform",function(Kt){return r(Kt.x,0)}),gt.call(a).attr("transform",r(Ge.x,-v.uplift))}).on("dragend",function(Ge){var gt=x.select(this),mt=Ge.calcdata;Ge.x=Ge.xScale(Ge),Ge.calcdata.columnDragInProgress=!1,B(gt,Ge,0),N(ae,mt,mt.columns.map(function(Tt){return Tt.xIndex}))})),je.each(function(Ge){e.setClipUrl(x.select(this),p(ae,Ge),ae)});var ke=je.selectAll("."+v.cn.columnBlock).data(s.splitToPanels,l.keyFun);ke.enter().append("g").classed(v.cn.columnBlock,!0).attr("id",function(Ge){return Ge.key}),ke.style("cursor",function(Ge){return Ge.dragHandle?"ew-resize":Ge.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var ge=ke.filter(P),le=ke.filter(F);ye&&le.call(x.behavior.drag().origin(function(Ge){return x.event.stopPropagation(),Ge}).on("drag",Q(ae,Ae,-1)).on("dragend",function(){})),T(ae,Ae,ge,ke),T(ae,Ae,le,ke);var ve=Ae.selectAll("."+v.cn.scrollAreaClip).data(l.repeat,l.keyFun);ve.enter().append("clipPath").classed(v.cn.scrollAreaClip,!0).attr("id",function(Ge){return f(ae,Ge)});var se=ve.selectAll("."+v.cn.scrollAreaClipRect).data(l.repeat,l.keyFun);se.enter().append("rect").classed(v.cn.scrollAreaClipRect,!0).attr("x",-v.overdrag).attr("y",-v.uplift).attr("fill","none"),se.attr("width",function(Ge){return Ge.width+2*v.overdrag}).attr("height",function(Ge){return Ge.height+v.uplift});var Te=je.selectAll("."+v.cn.columnBoundary).data(l.repeat,l.keyFun);Te.enter().append("g").classed(v.cn.columnBoundary,!0);var Fe=je.selectAll("."+v.cn.columnBoundaryClippath).data(l.repeat,l.keyFun);Fe.enter().append("clipPath").classed(v.cn.columnBoundaryClippath,!0),Fe.attr("id",function(Ge){return p(ae,Ge)});var We=Fe.selectAll("."+v.cn.columnBoundaryRect).data(l.repeat,l.keyFun);We.enter().append("rect").classed(v.cn.columnBoundaryRect,!0).attr("fill","none"),We.attr("width",function(Ge){return Ge.columnWidth+2*g(Ge)}).attr("height",function(Ge){return Ge.calcdata.height+2*g(Ge)+v.uplift}).attr("x",function(Ge){return-g(Ge)}).attr("y",function(Ge){return-g(Ge)}),Z(null,le,Ae)};function g(ee){return Math.ceil(ee.calcdata.maxLineWidth/2)}function f(ee,ae){return"clip"+ee._fullLayout._uid+"_scrollAreaBottomClip_"+ae.key}function p(ee,ae){return"clip"+ee._fullLayout._uid+"_columnBoundaryClippath_"+ae.calcdata.key+"_"+ae.specIndex}function m(ee){return[].concat.apply([],ee.map(function(ae){return ae})).map(function(ae){return ae.__data__})}function i(ee,ae,fe){function ye(je){var ke=je.rowBlocks;return K(ke,ke.length-1)+(ke.length?G(ke[ke.length-1],1/0):1)}var xe=ee.selectAll("."+v.cn.scrollbarKit).data(l.repeat,l.keyFun);xe.enter().append("g").classed(v.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),xe.each(function(je){var ke=je.scrollbarState;ke.totalHeight=ye(je),ke.scrollableAreaHeight=je.groupHeight-j(je),ke.currentlyVisibleHeight=Math.min(ke.totalHeight,ke.scrollableAreaHeight),ke.ratio=ke.currentlyVisibleHeight/ke.totalHeight,ke.barLength=Math.max(ke.ratio*ke.currentlyVisibleHeight,v.goldenRatio*v.scrollbarWidth),ke.barWiggleRoom=ke.currentlyVisibleHeight-ke.barLength,ke.wiggleRoom=Math.max(0,ke.totalHeight-ke.scrollableAreaHeight),ke.topY=ke.barWiggleRoom===0?0:je.scrollY/ke.wiggleRoom*ke.barWiggleRoom,ke.bottomY=ke.topY+ke.barLength,ke.dragMultiplier=ke.wiggleRoom/ke.barWiggleRoom}).attr("transform",function(je){var ke=je.width+v.scrollbarWidth/2+v.scrollbarOffset;return r(ke,j(je))});var Ae=xe.selectAll("."+v.cn.scrollbar).data(l.repeat,l.keyFun);Ae.enter().append("g").classed(v.cn.scrollbar,!0);var Me=Ae.selectAll("."+v.cn.scrollbarSlider).data(l.repeat,l.keyFun);Me.enter().append("g").classed(v.cn.scrollbarSlider,!0),Me.attr("transform",function(je){return r(0,je.scrollbarState.topY||0)});var Ie=Me.selectAll("."+v.cn.scrollbarGlyph).data(l.repeat,l.keyFun);Ie.enter().append("line").classed(v.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",v.scrollbarWidth).attr("stroke-linecap","round").attr("y1",v.scrollbarWidth/2),Ie.attr("y2",function(je){return je.scrollbarState.barLength-v.scrollbarWidth/2}).attr("stroke-opacity",function(je){return je.columnDragInProgress||!je.scrollbarState.barWiggleRoom||fe?0:.4}),Ie.transition().delay(0).duration(0),Ie.transition().delay(v.scrollbarHideDelay).duration(v.scrollbarHideDuration).attr("stroke-opacity",0);var qe=Ae.selectAll("."+v.cn.scrollbarCaptureZone).data(l.repeat,l.keyFun);qe.enter().append("line").classed(v.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",v.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(je){var ke=x.event.y,ge=this.getBoundingClientRect(),le=je.scrollbarState,ve=ke-ge.top,se=x.scale.linear().domain([0,le.scrollableAreaHeight]).range([0,le.totalHeight]).clamp(!0);le.topY<=ve&&ve<=le.bottomY||Q(ae,ee,null,se(ve-le.barLength/2))(je)}).call(x.behavior.drag().origin(function(je){return x.event.stopPropagation(),je.scrollbarState.scrollbarScrollInProgress=!0,je}).on("drag",Q(ae,ee)).on("dragend",function(){})),qe.attr("y2",function(je){return je.scrollbarState.scrollableAreaHeight}),ae._context.staticPlot&&(Ie.remove(),qe.remove())}function T(ee,ae,fe,ye){var xe=S(fe),Ae=M(xe);h(Ae);var Me=C(Ae);A(Me);var Ie=w(Ae),qe=_(Ie);u(qe),b(qe,ae,ye,ee),$(Ae)}function S(ee){var ae=ee.selectAll("."+v.cn.columnCells).data(l.repeat,l.keyFun);return ae.enter().append("g").classed(v.cn.columnCells,!0),ae.exit().remove(),ae}function M(ee){var ae=ee.selectAll("."+v.cn.columnCell).data(s.splitToCells,function(fe){return fe.keyWithinBlock});return ae.enter().append("g").classed(v.cn.columnCell,!0),ae.exit().remove(),ae}function C(ee){var ae=ee.selectAll("."+v.cn.cellRect).data(l.repeat,function(fe){return fe.keyWithinBlock});return ae.enter().append("rect").classed(v.cn.cellRect,!0),ae}function _(ee){var ae=ee.selectAll("."+v.cn.cellText).data(l.repeat,function(fe){return fe.keyWithinBlock});return ae.enter().append("text").classed(v.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){x.event.stopPropagation()}),ae}function w(ee){var ae=ee.selectAll("."+v.cn.cellTextHolder).data(l.repeat,function(fe){return fe.keyWithinBlock});return ae.enter().append("g").classed(v.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ae}function h(ee){ee.each(function(ae,fe){var ye=ae.calcdata.cells.font,xe=ae.column.specIndex,Ae={size:R(ye.size,xe,fe),color:R(ye.color,xe,fe),family:R(ye.family,xe,fe),weight:R(ye.weight,xe,fe),style:R(ye.style,xe,fe),variant:R(ye.variant,xe,fe),textcase:R(ye.textcase,xe,fe),lineposition:R(ye.lineposition,xe,fe),shadow:R(ye.shadow,xe,fe)};ae.rowNumber=ae.key,ae.align=R(ae.calcdata.cells.align,xe,fe),ae.cellBorderWidth=R(ae.calcdata.cells.line.width,xe,fe),ae.font=Ae})}function u(ee){ee.each(function(ae){e.font(x.select(this),ae.font)})}function A(ee){ee.attr("width",function(ae){return ae.column.columnWidth}).attr("stroke-width",function(ae){return ae.cellBorderWidth}).each(function(ae){var fe=x.select(this);c.stroke(fe,R(ae.calcdata.cells.line.color,ae.column.specIndex,ae.rowNumber)),c.fill(fe,R(ae.calcdata.cells.fill.color,ae.column.specIndex,ae.rowNumber))})}function b(ee,ae,fe,ye){ee.text(function(xe){var Ae=xe.column.specIndex,Me=xe.rowNumber,Ie=xe.value,qe=typeof Ie=="string",je=qe&&Ie.match(/
/i),ke=!qe||je;xe.mayHaveMarkup=qe&&Ie.match(/[<&>]/);var ge=z(Ie);xe.latex=ge;var le=ge?"":R(xe.calcdata.cells.prefix,Ae,Me)||"",ve=ge?"":R(xe.calcdata.cells.suffix,Ae,Me)||"",se=ge?null:R(xe.calcdata.cells.format,Ae,Me)||null,Te=le+(se?k(se)(xe.value):xe.value)+ve,Fe;xe.wrappingNeeded=!xe.wrapped&&!ke&&!ge&&(Fe=I(Te)),xe.cellHeightMayIncrease=je||ge||xe.mayHaveMarkup||(Fe===void 0?I(Te):Fe),xe.needsConvertToTspans=xe.mayHaveMarkup||xe.wrappingNeeded||xe.latex;var We;if(xe.wrappingNeeded){var Ge=v.wrapSplitCharacter===" "?Te.replace(/xe&&ye.push(Ae),xe+=qe}return ye}function Z(ee,ae,fe){var ye=m(ae)[0];if(ye!==void 0){var xe=ye.rowBlocks,Ae=ye.calcdata,Me=K(xe,xe.length),Ie=ye.calcdata.groupHeight-j(ye),qe=Ae.scrollY=Math.max(0,Math.min(Me-Ie,Ae.scrollY)),je=U(xe,qe,Ie);je.length===1&&(je[0]===xe.length-1?je.unshift(je[0]-1):je.push(je[0]+1)),je[0]%2&&je.reverse(),ae.each(function(ke,ge){ke.page=je[ge],ke.scrollY=qe}),ae.attr("transform",function(ke){var ge=K(ke.rowBlocks,ke.page)-ke.scrollY;return r(0,ge)}),ee&&(re(ee,fe,ae,je,ye.prevPages,ye,0),re(ee,fe,ae,je,ye.prevPages,ye,1),i(fe,ee))}}function Q(ee,ae,fe,ye){return function(Ae){var Me=Ae.calcdata?Ae.calcdata:Ae,Ie=ae.filter(function(ge){return Me.key===ge.key}),qe=fe||Me.scrollbarState.dragMultiplier,je=Me.scrollY;Me.scrollY=ye===void 0?Me.scrollY+qe*x.event.dy:ye;var ke=Ie.selectAll("."+v.cn.yColumn).selectAll("."+v.cn.columnBlock).filter(F);return Z(ee,ke,Ie),Me.scrollY===je}}function re(ee,ae,fe,ye,xe,Ae,Me){var Ie=ye[Me]!==xe[Me];Ie&&(clearTimeout(Ae.currentRepaint[Me]),Ae.currentRepaint[Me]=setTimeout(function(){var qe=fe.filter(function(je,ke){return ke===Me&&ye[ke]!==xe[ke]});T(ee,ae,qe,fe),xe[Me]=ye[Me]}))}function ne(ee,ae,fe,ye){return function(){var Ae=x.select(ae.parentNode);Ae.each(function(Me){var Ie=Me.fragments;Ae.selectAll("tspan.line").each(function(Te,Fe){Ie[Fe].width=this.getComputedTextLength()});var qe=Ie[Ie.length-1].width,je=Ie.slice(0,-1),ke=[],ge,le,ve=0,se=Me.column.columnWidth-2*v.cellPad;for(Me.value="";je.length;)ge=je.shift(),le=ge.width+qe,ve+le>se&&(Me.value+=ke.join(v.wrapSpacer)+v.lineBreaker,ke=[],ve=0),ke.push(ge.text),ve+=le;ve&&(Me.value+=ke.join(v.wrapSpacer)),Me.wrapped=!0}),Ae.selectAll("tspan.line").remove(),b(Ae.select("."+v.cn.cellText),fe,ee,ye),x.select(ae.parentNode.parentNode).call($)}}function oe(ee,ae,fe,ye,xe){return function(){if(!xe.settledY){var Me=x.select(ae.parentNode),Ie=q(xe),qe=xe.key-Ie.firstRowIndex,je=Ie.rows[qe].rowHeight,ke=xe.cellHeightMayIncrease?ae.parentNode.getBoundingClientRect().height+2*v.cellPad:je,ge=Math.max(ke,je),le=ge-Ie.rows[qe].rowHeight;le&&(Ie.rows[qe].rowHeight=ge,ee.selectAll("."+v.cn.columnCell).call($),Z(null,ee.filter(F),0),i(fe,ye,!0)),Me.attr("transform",function(){var ve=this,se=ve.parentNode,Te=se.getBoundingClientRect(),Fe=x.select(ve.parentNode).select("."+v.cn.cellRect).node().getBoundingClientRect(),We=ve.transform.baseVal.consolidate(),Ge=Fe.top-Te.top+(We?We.matrix.f:v.cellPad);return r(V(xe,x.select(ve.parentNode).select("."+v.cn.cellTextHolder).node().getBoundingClientRect().width),Ge)}),xe.settledY=!0}}}function V(ee,ae){switch(ee.align){case"left":return v.cellPad;case"right":return ee.column.columnWidth-(ae||0)-v.cellPad;case"center":return(ee.column.columnWidth-(ae||0))/2;default:return v.cellPad}}function $(ee){ee.attr("transform",function(ae){var fe=ae.rowBlocks[0].auxiliaryBlocks.reduce(function(Me,Ie){return Me+G(Ie,1/0)},0),ye=q(ae),xe=G(ye,ae.key),Ae=xe+fe;return r(0,Ae)}).selectAll("."+v.cn.cellRect).attr("height",function(ae){return W(q(ae),ae.key).rowHeight})}function K(ee,ae){for(var fe=0,ye=ae-1;ye>=0;ye--)fe+=X(ee[ye]);return fe}function G(ee,ae){for(var fe=0,ye=0;yek.length&&(E=E.slice(0,k.length)):E=[],e=0;e90&&(f-=180,a=-a),{angle:f,flip:a,p:x.c2p(l,E,k),offsetMultplier:o}}}}),kP=Ee({"src/traces/carpet/plot.js"(J,H){"use strict";var v=Va(),x=mo(),E=E5(),k=k5(),l=EP(),e=Fs(),t=Vr(),n=t.strRotate,r=t.strTranslate,a=rc();H.exports=function(T,S,M,C){var _=T._context.staticPlot,w=S.xaxis,h=S.yaxis,u=T._fullLayout,A=u._clips;t.makeTraceGroups(C,M,"trace").each(function(b){var z=v.select(this),I=b[0],N=I.trace,R=N.aaxis,B=N.baxis,F=t.ensureSingle(z,"g","minorlayer"),P=t.ensureSingle(z,"g","majorlayer"),j=t.ensureSingle(z,"g","boundarylayer"),U=t.ensureSingle(z,"g","labellayer");z.style("opacity",N.opacity),s(w,h,P,R,"a",R._gridlines,!0,_),s(w,h,P,B,"b",B._gridlines,!0,_),s(w,h,F,R,"a",R._minorgridlines,!0,_),s(w,h,F,B,"b",B._minorgridlines,!0,_),s(w,h,j,R,"a-boundary",R._boundarylines,_),s(w,h,j,B,"b-boundary",B._boundarylines,_);var Z=c(T,w,h,N,I,U,R._labels,"a-label"),Q=c(T,w,h,N,I,U,B._labels,"b-label");g(T,U,N,I,w,h,Z,Q),o(N,I,A,w,h)})};function o(i,T,S,M,C){var _,w,h,u,A=S.select("#"+i._clipPathId);A.size()||(A=S.append("clipPath").classed("carpetclip",!0));var b=t.ensureSingle(A,"path","carpetboundary"),z=T.clipsegments,I=[];for(u=0;u0?"start":"end","data-notex":1}).call(x.font,z.font).text(z.text).call(e.convertToTspans,i),P=x.bBox(this);F.attr("transform",r(N.p[0],N.p[1])+n(N.angle)+r(z.axis.labelpadding*B,P.height*.3)),A=Math.max(A,P.width+z.axis.labelpadding)}),u.exit().remove(),b.maxExtent=A,b}function g(i,T,S,M,C,_,w,h){var u,A,b,z,I=t.aggNums(Math.min,null,S.a),N=t.aggNums(Math.max,null,S.a),R=t.aggNums(Math.min,null,S.b),B=t.aggNums(Math.max,null,S.b);u=.5*(I+N),A=R,b=S.ab2xy(u,A,!0),z=S.dxyda_rough(u,A),w.angle===void 0&&t.extendFlat(w,l(S,C,_,b,S.dxydb_rough(u,A))),m(i,T,S,M,b,z,S.aaxis,C,_,w,"a-title"),u=I,A=.5*(R+B),b=S.ab2xy(u,A,!0),z=S.dxydb_rough(u,A),h.angle===void 0&&t.extendFlat(h,l(S,C,_,b,S.dxyda_rough(u,A))),m(i,T,S,M,b,z,S.baxis,C,_,h,"b-title")}var f=a.LINE_SPACING,p=(1-a.MID_SHIFT)/f+1;function m(i,T,S,M,C,_,w,h,u,A,b){var z=[];w.title.text&&z.push(w.title.text);var I=T.selectAll("text."+b).data(z),N=A.maxExtent;I.enter().append("text").classed(b,!0),I.each(function(){var R=l(S,h,u,C,_);["start","both"].indexOf(w.showticklabels)===-1&&(N=0);var B=w.title.font.size;N+=B+w.title.offset;var F=A.angle+(A.flip<0?180:0),P=(F-R.angle+450)%360,j=P>90&&P<270,U=v.select(this);U.text(w.title.text).call(e.convertToTspans,i),j&&(N=(-e.lineCount(U)+p)*f*B-N),U.attr("transform",r(R.p[0],R.p[1])+n(R.angle)+r(0,N)).attr("text-anchor","middle").call(x.font,w.title.font)}),I.exit().remove()}}}),CP=Ee({"src/traces/carpet/cheater_basis.js"(J,H){"use strict";var v=Vr().isArrayOrTypedArray;H.exports=function(x,E,k){var l,e,t,n,r,a,o=[],s=v(x)?x.length:x,c=v(E)?E.length:E,g=v(x)?x:null,f=v(E)?E:null;g&&(t=(g.length-1)/(g[g.length-1]-g[0])/(s-1)),f&&(n=(f.length-1)/(f[f.length-1]-f[0])/(c-1));var p,m=1/0,i=-1/0;for(e=0;e=10)return null;for(var l=1/0,e=-1/0,t=E.length,n=0;n0&&(G=k.dxydi([],Z-1,re,0,ne),ee.push(oe[0]+G[0]/3),ae.push(oe[1]+G[1]/3),X=k.dxydi([],Z-1,re,1,ne),ee.push(K[0]-X[0]/3),ae.push(K[1]-X[1]/3)),ee.push(K[0]),ae.push(K[1]),oe=K;else for(Z=k.a2i(U),V=Math.floor(Math.max(0,Math.min(R-2,Z))),$=Z-V,fe.length=R,fe.crossLength=B,fe.xy=function(ye){return k.evalxy([],Z,ye)},fe.dxy=function(ye,xe){return k.dxydj([],V,ye,$,xe)},Q=0;Q0&&(q=k.dxydj([],V,Q-1,$,0),ee.push(oe[0]+q[0]/3),ae.push(oe[1]+q[1]/3),W=k.dxydj([],V,Q-1,$,1),ee.push(K[0]-W[0]/3),ae.push(K[1]-W[1]/3)),ee.push(K[0]),ae.push(K[1]),oe=K;return fe.axisLetter=l,fe.axis=C,fe.crossAxis=A,fe.value=U,fe.constvar=e,fe.index=g,fe.x=ee,fe.y=ae,fe.smoothing=A.smoothing,fe}function j(U){var Z,Q,re,ne,oe,V=[],$=[],K={};if(K.length=M.length,K.crossLength=u.length,l==="b")for(re=Math.max(0,Math.min(B-2,U)),oe=Math.min(1,Math.max(0,U-re)),K.xy=function(G){return k.evalxy([],G,U)},K.dxy=function(G,X){return k.dxydi([],G,re,X,oe)},Z=0;ZM.length-1)&&_.push(x(j(n),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(g=s;gM.length-1)&&!(m<0||m>M.length-1))for(i=M[r],T=M[m],t=0;tM[M.length-1])&&w.push(x(P(p),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash})));C.startline&&h.push(x(j(0),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&h.push(x(j(M.length-1),{color:C.endlinecolor,width:C.endlinewidth}))}else{for(a=5e-15,o=[Math.floor((M[M.length-1]-C.tick0)/C.dtick*(1+a)),Math.ceil((M[0]-C.tick0)/C.dtick/(1+a))].sort(function(U,Z){return U-Z}),s=o[0],c=o[1],g=s;g<=c;g++)f=C.tick0+C.dtick*g,_.push(x(P(f),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(g=s-1;gM[M.length-1])&&w.push(x(P(p),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash}));C.startline&&h.push(x(P(M[0]),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&h.push(x(P(M[M.length-1]),{color:C.endlinecolor,width:C.endlinewidth}))}}}}),DP=Ee({"src/traces/carpet/calc_labels.js"(J,H){"use strict";var v=uo(),x=vo().extendFlat;H.exports=function(k,l){var e,t,n,r,a,o=l._labels=[],s=l._gridlines;for(e=0;e=0;e--)t[s-e]=x[c][e],n[s-e]=E[c][e];for(r.push({x:t,y:n,bicubic:a}),e=c,t=[],n=[];e>=0;e--)t[c-e]=x[e][0],n[c-e]=E[e][0];return r.push({x:t,y:n,bicubic:o}),r}}}),RP=Ee({"src/traces/carpet/smooth_fill_2d_array.js"(J,H){"use strict";var v=Vr();H.exports=function(E,k,l){var e,t,n,r=[],a=[],o=E[0].length,s=E.length;function c(Q,re){var ne=0,oe,V=0;return Q>0&&(oe=E[re][Q-1])!==void 0&&(V++,ne+=oe),Q0&&(oe=E[re-1][Q])!==void 0&&(V++,ne+=oe),re0&&t0&&eu);return v.log("Smoother converged to",A,"after",z,"iterations"),E}}}),FP=Ee({"src/traces/carpet/constants.js"(J,H){"use strict";H.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),zP=Ee({"src/traces/carpet/catmull_rom.js"(J,H){"use strict";var v=.5;H.exports=function(E,k,l,e){var t=E[0]-k[0],n=E[1]-k[1],r=l[0]-k[0],a=l[1]-k[1],o=Math.pow(t*t+n*n,v/2),s=Math.pow(r*r+a*a,v/2),c=(s*s*t-o*o*r)*e,g=(s*s*n-o*o*a)*e,f=s*(o+s)*3,p=o*(o+s)*3;return[[k[0]+(f&&c/f),k[1]+(f&&g/f)],[k[0]-(p&&c/p),k[1]-(p&&g/p)]]}}}),BP=Ee({"src/traces/carpet/compute_control_points.js"(J,H){"use strict";var v=zP(),x=Vr().ensureArray;function E(k,l,e){var t=-.5*e[0]+1.5*l[0],n=-.5*e[1]+1.5*l[1];return[(2*t+k[0])/3,(2*n+k[1])/3]}H.exports=function(l,e,t,n,r,a){var o,s,c,g,f,p,m,i,T,S,M=t[0].length,C=t.length,_=r?3*M-2:M,w=a?3*C-2:C;for(l=x(l,w),e=x(e,w),c=0;cf&&_m&&wp||wi},n.setScale=function(){var _=n._x,w=n._y,h=E(n._xctrl,n._yctrl,_,w,c.smoothing,g.smoothing);n._xctrl=h[0],n._yctrl=h[1],n.evalxy=k([n._xctrl,n._yctrl],o,s,c.smoothing,g.smoothing),n.dxydi=l([n._xctrl,n._yctrl],c.smoothing,g.smoothing),n.dxydj=e([n._xctrl,n._yctrl],c.smoothing,g.smoothing)},n.i2a=function(_){var w=Math.max(0,Math.floor(_[0]),o-2),h=_[0]-w;return(1-h)*r[w]+h*r[w+1]},n.j2b=function(_){var w=Math.max(0,Math.floor(_[1]),o-2),h=_[1]-w;return(1-h)*a[w]+h*a[w+1]},n.ij2ab=function(_){return[n.i2a(_[0]),n.j2b(_[1])]},n.a2i=function(_){var w=Math.max(0,Math.min(x(_,r),o-2)),h=r[w],u=r[w+1];return Math.max(0,Math.min(o-1,w+(_-h)/(u-h)))},n.b2j=function(_){var w=Math.max(0,Math.min(x(_,a),s-2)),h=a[w],u=a[w+1];return Math.max(0,Math.min(s-1,w+(_-h)/(u-h)))},n.ab2ij=function(_){return[n.a2i(_[0]),n.b2j(_[1])]},n.i2c=function(_,w){return n.evalxy([],_,w)},n.ab2xy=function(_,w,h){if(!h&&(_r[o-1]|wa[s-1]))return[!1,!1];var u=n.a2i(_),A=n.b2j(w),b=n.evalxy([],u,A);if(h){var z=0,I=0,N=[],R,B,F,P;_r[o-1]?(R=o-2,B=1,z=(_-r[o-1])/(r[o-1]-r[o-2])):(R=Math.max(0,Math.min(o-2,Math.floor(u))),B=u-R),wa[s-1]?(F=s-2,P=1,I=(w-a[s-1])/(a[s-1]-a[s-2])):(F=Math.max(0,Math.min(s-2,Math.floor(A))),P=A-F),z&&(n.dxydi(N,R,F,B,P),b[0]+=N[0]*z,b[1]+=N[1]*z),I&&(n.dxydj(N,R,F,B,P),b[0]+=N[0]*I,b[1]+=N[1]*I)}return b},n.c2p=function(_,w,h){return[w.c2p(_[0]),h.c2p(_[1])]},n.p2x=function(_,w,h){return[w.p2c(_[0]),h.p2c(_[1])]},n.dadi=function(_){var w=Math.max(0,Math.min(r.length-2,_));return r[w+1]-r[w]},n.dbdj=function(_){var w=Math.max(0,Math.min(a.length-2,_));return a[w+1]-a[w]},n.dxyda=function(_,w,h,u){var A=n.dxydi(null,_,w,h,u),b=n.dadi(_,h);return[A[0]/b,A[1]/b]},n.dxydb=function(_,w,h,u){var A=n.dxydj(null,_,w,h,u),b=n.dbdj(w,u);return[A[0]/b,A[1]/b]},n.dxyda_rough=function(_,w,h){var u=T*(h||.1),A=n.ab2xy(_+u,w,!0),b=n.ab2xy(_-u,w,!0);return[(A[0]-b[0])*.5/u,(A[1]-b[1])*.5/u]},n.dxydb_rough=function(_,w,h){var u=S*(h||.1),A=n.ab2xy(_,w+u,!0),b=n.ab2xy(_,w-u,!0);return[(A[0]-b[0])*.5/u,(A[1]-b[1])*.5/u]},n.dpdx=function(_){return _._m},n.dpdy=function(_){return _._m}}}}),qP=Ee({"src/traces/carpet/calc.js"(J,H){"use strict";var v=uo(),x=Vr().isArray1D,E=CP(),k=LP(),l=PP(),e=DP(),t=IP(),n=f1(),r=RP(),a=c1(),o=UP();H.exports=function(c,g){var f=v.getFromId(c,g.xaxis),p=v.getFromId(c,g.yaxis),m=g.aaxis,i=g.baxis,T=g.x,S=g.y,M=[];T&&x(T)&&M.push("x"),S&&x(S)&&M.push("y"),M.length&&a(g,m,i,"a","b",M);var C=g._a=g._a||g.a,_=g._b=g._b||g.b;T=g._x||g.x,S=g._y||g.y;var w={};if(g._cheater){var h=m.cheatertype==="index"?C.length:C,u=i.cheatertype==="index"?_.length:_;T=E(h,u,g.cheaterslope)}g._x=T=n(T),g._y=S=n(S),r(T,C,_),r(S,C,_),o(g),g.setScale();var A=k(T),b=k(S),z=.5*(A[1]-A[0]),I=.5*(A[1]+A[0]),N=.5*(b[1]-b[0]),R=.5*(b[1]+b[0]),B=1.3;return A=[I-z*B,I+z*B],b=[R-N*B,R+N*B],g._extremes[f._id]=v.findExtremes(f,A,{padded:!0}),g._extremes[p._id]=v.findExtremes(p,b,{padded:!0}),l(g,"a","b"),l(g,"b","a"),e(g,m),e(g,i),w.clipsegments=t(g._xctrl,g._yctrl,m,i),w.x=T,w.y=S,w.a=C,w.b=_,[w]}}}),VP=Ee({"src/traces/carpet/index.js"(J,H){"use strict";H.exports={attributes:Xy(),supplyDefaults:SP(),plot:kP(),calc:qP(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Mu(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),HP=Ee({"lib/carpet.js"(J,H){"use strict";H.exports=VP()}}),C5=Ee({"src/traces/scattercarpet/attributes.js"(J,H){"use strict";var v=Yh(),x=ou(),E=nn(),{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=Cs(),t=$s(),n=vo().extendFlat,r=x.marker,a=x.line,o=r.line;H.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:n({},x.mode,{dflt:"markers"}),text:n({},x.text,{}),texttemplate:l({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:n({},x.hovertext,{}),line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:n({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:x.connectgaps,fill:n({},x.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:v(),marker:n({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:n({width:o.width,dash:o.dash,editType:"calc"},t("marker.line")),gradient:r.gradient,editType:"calc"},t("marker")),textfont:x.textfont,textposition:x.textposition,selected:x.selected,unselected:x.unselected,hoverinfo:n({},E.hoverinfo,{flags:["a","b","text","name"]}),hoveron:x.hoveron,hovertemplate:k(),hovertemplatefallback:e(),zorder:x.zorder}}}),GP=Ee({"src/traces/scattercarpet/defaults.js"(J,H){"use strict";var v=Vr(),x=Wh(),E=nl(),k=gh(),l=Rh(),e=Up(),t=Fh(),n=Xh(),r=C5();H.exports=function(o,s,c,g){function f(C,_){return v.coerce(o,s,r,C,_)}f("carpet"),s.xaxis="x",s.yaxis="y";var p=f("a"),m=f("b"),i=Math.min(p.length,m.length);if(!i){s.visible=!1;return}s._length=i,f("text"),f("texttemplate"),f("texttemplatefallback"),f("hovertext");var T=i0?w=C.labelprefix.replace(/ = $/,""):w=C._hovertitle,i.push(w+": "+_.toFixed(3)+C.labelsuffix)}if(!f.hovertemplate){var S=g.hi||f.hoverinfo,M=S.split("+");M.indexOf("all")!==-1&&(M=["a","b","text"]),M.indexOf("a")!==-1&&T(p.aaxis,g.a),M.indexOf("b")!==-1&&T(p.baxis,g.b),i.push("y: "+r.yLabel),M.indexOf("text")!==-1&&x(g,f,i),r.extraText=i.join("
")}return n}}}),ZP=Ee({"src/traces/scattercarpet/event_data.js"(J,H){"use strict";H.exports=function(x,E,k,l,e){var t=l[e];return x.a=t.a,x.b=t.b,x.y=t.y,x}}}),KP=Ee({"src/traces/scattercarpet/index.js"(J,H){"use strict";H.exports={attributes:C5(),supplyDefaults:GP(),colorbar:ff(),formatLabels:WP(),calc:YP(),plot:XP(),style:eh().style,styleOnSelect:eh().styleOnSelect,hoverPoints:$P(),selectPoints:Fv(),eventData:ZP(),moduleType:"trace",name:"scattercarpet",basePlotModule:Mu(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),JP=Ee({"lib/scattercarpet.js"(J,H){"use strict";H.exports=KP()}}),L5=Ee({"src/traces/contourcarpet/attributes.js"(J,H){"use strict";var v=Yp(),x=nm(),E=$s(),k=vo().extendFlat,l=x.contours;H.exports=k({carpet:{valType:"string",editType:"calc"},z:v.z,a:v.x,a0:v.x0,da:v.dx,b:v.y,b0:v.y0,db:v.dy,text:v.text,hovertext:v.hovertext,transpose:v.transpose,atype:v.xtype,btype:v.ytype,fillcolor:x.fillcolor,autocontour:x.autocontour,ncontours:x.ncontours,contours:{type:l.type,start:l.start,end:l.end,size:l.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:l.showlines,showlabels:l.showlabels,labelfont:l.labelfont,labelformat:l.labelformat,operation:l.operation,value:l.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:x.line.color,width:x.line.width,dash:x.line.dash,smoothing:x.line.smoothing,editType:"plot"},zorder:x.zorder},E("",{cLetter:"z",autoColorDflt:!1}))}}),P5=Ee({"src/traces/contourcarpet/defaults.js"(J,H){"use strict";var v=Vr(),x=u1(),E=L5(),k=Xx(),l=T1(),e=A1();H.exports=function(n,r,a,o){function s(p,m){return v.coerce(n,r,E,p,m)}function c(p){return v.coerce2(n,r,E,p)}if(s("carpet"),n.a&&n.b){var g=x(n,r,s,o,"a","b");if(!g){r.visible=!1;return}s("text");var f=s("contours.type")==="constraint";f?k(n,r,s,o,a,{hasHover:!1}):(l(n,r,s,c),e(n,r,s,o,{hasHover:!1}))}else r._defaultColor=a,r._length=null;s("zorder")}}}),QP=Ee({"src/traces/contourcarpet/calc.js"(J,H){"use strict";var v=Sf(),x=Vr(),E=c1(),k=f1(),l=h1(),e=d1(),t=Dx(),n=P5(),r=$y(),a=Ox();H.exports=function(c,g){var f=g._carpetTrace=r(c,g);if(!(!f||!f.visible||f.visible==="legendonly")){if(!g.a||!g.b){var p=c.data[f.index],m=c.data[g.index];m.a||(m.a=p.a),m.b||(m.b=p.b),n(m,g,g._defaultColor,c._fullLayout)}var i=o(c,g);return a(g,g._z),i}};function o(s,c){var g=c._carpetTrace,f=g.aaxis,p=g.baxis,m,i,T,S,M,C,_;f._minDtick=0,p._minDtick=0,x.isArray1D(c.z)&&E(c,f,p,"a","b",["z"]),m=c._a=c._a||c.a,S=c._b=c._b||c.b,m=m?f.makeCalcdata(c,"_a"):[],S=S?p.makeCalcdata(c,"_b"):[],i=c.a0||0,T=c.da||1,M=c.b0||0,C=c.db||1,_=c._z=k(c._z||c.z,c.transpose),c._emptypoints=e(_),l(_,c._emptypoints);var w=x.maxRowLength(_),h=c.xtype==="scaled"?"":m,u=t(c,h,i,T,w,f),A=c.ytype==="scaled"?"":S,b=t(c,A,M,C,_.length,p),z={a:u,b,z:_};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&v(s,c,{vals:_,containerStr:"",cLetter:"z"}),[z]}}}),eD=Ee({"src/traces/carpet/axis_aligned_line.js"(J,H){"use strict";var v=Vr().isArrayOrTypedArray;H.exports=function(x,E,k,l){var e,t,n,r,a,o,s,c,g,f,p,m,i,T=v(k)?"a":"b",S=T==="a"?x.aaxis:x.baxis,M=S.smoothing,C=T==="a"?x.a2i:x.b2j,_=T==="a"?k:l,w=T==="a"?l:k,h=T==="a"?E.a.length:E.b.length,u=T==="a"?E.b.length:E.a.length,A=Math.floor(T==="a"?x.b2j(w):x.a2i(w)),b=T==="a"?function(re){return x.evalxy([],re,A)}:function(re){return x.evalxy([],A,re)};M&&(n=Math.max(0,Math.min(u-2,A)),r=A-n,t=T==="a"?function(re,ne){return x.dxydi([],re,n,ne,r)}:function(re,ne){return x.dxydj([],n,re,r,ne)});var z=C(_[0]),I=C(_[1]),N=z0?Math.floor:Math.ceil,F=N>0?Math.ceil:Math.floor,P=N>0?Math.min:Math.max,j=N>0?Math.max:Math.min,U=B(z+R),Z=F(I-R);s=b(z);var Q=[[s]];for(e=U;e*N=0;fe--)W=j.clipsegments[fe],ee=x([],W.x,z.c2p),ae=x([],W.y,I.c2p),ee.reverse(),ae.reverse(),ye.push(E(ee,ae,W.bicubic));var xe="M"+ye.join("L")+"Z";M(R,j.clipsegments,z,I,ne,V),C(F,R,z,I,q,K,$,P,j,V,xe),p(R,re,h,B,Q,u,P),k.setClipUrl(R,P._clipPathId,h)})};function f(w,h){var u,A,b,z,I,N,R,B,F;for(u=0;ure&&(A.max=re),A.len=A.max-A.min}function i(w,h,u){var A=w.getPointAtLength(h),b=w.getPointAtLength(u),z=b.x-A.x,I=b.y-A.y,N=Math.sqrt(z*z+I*I);return[z/N,I/N]}function T(w){var h=Math.sqrt(w[0]*w[0]+w[1]*w[1]);return[w[0]/h,w[1]/h]}function S(w,h){var u=Math.abs(w[0]*h[0]+w[1]*h[1]),A=Math.sqrt(1-u*u);return A/u}function M(w,h,u,A,b,z){var I,N,R,B,F=l.ensureSingle(w,"g","contourbg"),P=F.selectAll("path").data(z==="fill"&&!b?[0]:[]);P.enter().append("path"),P.exit().remove();var j=[];for(B=0;B=0&&(U=ee,Q=re):Math.abs(j[1]-U[1])=0&&(U=ee,Q=re):l.log("endpt to newendpt is not vert. or horz.",j,U,ee)}if(Q>=0)break;B+=q(j,U),j=U}if(Q===h.edgepaths.length){l.log("unclosed perimeter path");break}R=Q,P=F.indexOf(R)===-1,P&&(R=F[0],B+=q(j,U)+"Z",j=null)}for(R=0;R_):C=N>b,_=N;var R=f(b,z,I,N);R.pos=A,R.yc=(b+N)/2,R.i=u,R.dir=C?"increasing":"decreasing",R.x=R.pos,R.y=[I,z],w&&(R.orig_p=s[u]),S&&(R.tx=o.text[u]),M&&(R.htx=o.hovertext[u]),h.push(R)}else h.push({pos:A,empty:!0})}return o._extremes[g._id]=E.findExtremes(g,v.concat(i,m),{padded:!0}),h.length&&(h[0].t={labels:{open:x(a,"open:")+" ",high:x(a,"high:")+" ",low:x(a,"low:")+" ",close:x(a,"close:")+" "}}),h}function r(a,o,s){var c=s._minDiff;if(!c){var g=a._fullData,f=[];c=1/0;var p;for(p=0;p"+T.labels[A]+v.hoverLabelText(m,b,i.yhoverformat)):(I=x.extendFlat({},M),I.y0=I.y1=z,I.yLabelVal=b,I.yLabel=T.labels[A]+v.hoverLabelText(m,b,i.yhoverformat),I.name="",S.push(I),h[b]=I)}return S}function o(s,c,g,f){var p=s.cd,m=s.ya,i=p[0].trace,T=p[0].t,S=r(s,c,g,f);if(!S)return[];var M=S.index,C=p[M],_=S.index=C.i,w=C.dir;function h(R){return T.labels[R]+v.hoverLabelText(m,i[R][_],i.yhoverformat)}var u=C.hi||i.hoverinfo||"",A=u.split("+"),b=u==="all",z=b||A.indexOf("y")!==-1,I=b||A.indexOf("text")!==-1,N=z?[h("open"),h("high"),h("low"),h("close")+" "+t[w]]:[];return I&&l(C,i,N),S.extraText=N.join("
"),S.y0=S.y1=m.c2p(C.yc,!0),[S]}H.exports={hoverPoints:n,hoverSplit:a,hoverOnPoints:o}}}),F5=Ee({"src/traces/ohlc/select.js"(J,H){"use strict";H.exports=function(x,E){var k=x.cd,l=x.xaxis,e=x.yaxis,t=[],n,r=k[0].t.bPos||0;if(E===!1)for(n=0;nc?function(i){return i<=0}:function(i){return i>=0};r.c2g=function(i){var T=r.c2l(i)-s;return(m(T)?T:0)+p},r.g2c=function(i){return r.l2c(i+s-p)},r.g2p=function(i){return i*f},r.c2p=function(i){return r.g2p(r.c2g(i))}}}function e(r,a){return a==="degrees"?E(r):r}function t(r,a){return a==="degrees"?k(r):r}function n(r,a){var o=r.type;if(o==="linear"){var s=r.d2c,c=r.c2d;r.d2c=function(g,f){return e(s(g),f)},r.c2d=function(g,f){return c(t(g,f))}}r.makeCalcdata=function(g,f){var p=g[f],m=g._length,i,T,S=function(h){return r.d2c(h,g.thetaunit)};if(p)for(i=new Array(m),T=0;T0?h:1/0},C=E(S,M),_=v.mod(C+1,S.length);return[S[C],S[_]]}function f(T){return Math.abs(T)>1e-10?T:0}function p(T,S,M){S=S||0,M=M||0;for(var C=T.length,_=new Array(C),w=0;w0?1:0}function x(t){var n=t[0],r=t[1];if(!isFinite(n)||!isFinite(r))return[1,0];var a=(n+1)*(n+1)+r*r;return[(n*n+r*r-1)/a,2*r/a]}function E(t,n){var r=n[0],a=n[1];return[r*t.radius+t.cx,-a*t.radius+t.cy]}function k(t,n){return n*t.radius}function l(t,n,r,a){var o=E(t,x([r,n])),s=o[0],c=o[1],g=E(t,x([a,n])),f=g[0],p=g[1];if(n===0)return["M"+s+","+c,"L"+f+","+p].join(" ");var m=k(t,1/Math.abs(n));return["M"+s+","+c,"A"+m+","+m+" 0 0,"+(n<0?1:0)+" "+f+","+p].join(" ")}function e(t,n,r,a){var o=k(t,1/(n+1)),s=E(t,x([n,r])),c=s[0],g=s[1],f=E(t,x([n,a])),p=f[0],m=f[1];if(v(r)!==v(a)){var i=E(t,x([n,0])),T=i[0],S=i[1];return["M"+c+","+g,"A"+o+","+o+" 0 0,"+(0Ie?(qe=ee,je=ee*Ie,le=(ae-je)/K.h/2,ke=[q[0],q[1]],ge=[W[0]+le,W[1]-le]):(qe=ae/Ie,je=ae,le=(ee-qe)/K.w/2,ke=[q[0]+le,q[1]-le],ge=[W[0],W[1]]),V.xLength2=qe,V.yLength2=je,V.xDomain2=ke,V.yDomain2=ge;var ve=V.xOffset2=K.l+K.w*ke[0],se=V.yOffset2=K.t+K.h*(1-ge[1]),Te=V.radius=qe/xe,Fe=V.innerRadius=V.getHole(oe)*Te,We=V.cx=ve-Te*ye[0],Ge=V.cy=se+Te*ye[3],gt=V.cxx=We-ve,mt=V.cyy=Ge-se,Tt=G.side,At;Tt==="counterclockwise"?(At=Tt,Tt="top"):Tt==="clockwise"&&(At=Tt,Tt="bottom"),V.radialAxis=V.mockAxis(ne,oe,G,{_id:"x",side:Tt,_trueSide:At,domain:[Fe/K.w,Te/K.w]}),V.angularAxis=V.mockAxis(ne,oe,X,{side:"right",domain:[0,Math.PI],autorange:!1}),V.doAutoRange(ne,oe),V.updateAngularAxis(ne,oe),V.updateRadialAxis(ne,oe),V.updateRadialAxisTitle(ne,oe),V.xaxis=V.mockCartesianAxis(ne,oe,{_id:"x",domain:ke}),V.yaxis=V.mockCartesianAxis(ne,oe,{_id:"y",domain:ge});var Kt=V.pathSubplot();V.clipPaths.forTraces.select("path").attr("d",Kt).attr("transform",l(gt,mt)),$.frontplot.attr("transform",l(ve,se)).call(t.setClipUrl,V._hasClipOnAxisFalse?null:V.clipIds.forTraces,V.gd),$.bg.attr("d",Kt).attr("transform",l(We,Ge)).call(e.fill,oe.bgcolor)},j.mockAxis=function(ne,oe,V,$){var K=E.extendFlat({},V,$);return o(K,oe,ne),K},j.mockCartesianAxis=function(ne,oe,V){var $=this,K=$.isSmith,G=V._id,X=E.extendFlat({type:"linear"},V);a(X,ne);var q={x:[0,2],y:[1,3]};return X.setRange=function(){var W=$.sectorBBox,ee=q[G],ae=$.radialAxis._rl,fe=(ae[1]-ae[0])/(1-$.getHole(oe));X.range=[W[ee[0]]*fe,W[ee[1]]*fe]},X.isPtWithinRange=G==="x"&&!K?function(W){return $.isPtInside(W)}:function(){return!0},X.setRange(),X.setScale(),X},j.doAutoRange=function(ne,oe){var V=this,$=V.gd,K=V.radialAxis,G=V.getRadial(oe);s($,K);var X=K.range;if(G.range=X.slice(),G._input.range=X.slice(),K._rl=[K.r2l(X[0],null,"gregorian"),K.r2l(X[1],null,"gregorian")],K.minallowed!==void 0){var q=K.r2l(K.minallowed);K._rl[0]>K._rl[1]?K._rl[1]=Math.max(K._rl[1],q):K._rl[0]=Math.max(K._rl[0],q)}if(K.maxallowed!==void 0){var W=K.r2l(K.maxallowed);K._rl[0]90&&ae<=270&&(fe.tickangle=180);var Ae=xe?function(Te){var Fe=I(V,A([Te.x,0]));return l(Fe[0]-q,Fe[1]-W)}:function(Te){return l(fe.l2p(Te.x)+X,0)},Me=xe?function(Te){return z(V,Te.x,-1/0,1/0)}:function(Te){return V.pathArc(fe.r2p(Te.x)+X)},Ie=U(ee);if(V.radialTickLayout!==Ie&&(K["radial-axis"].selectAll(".xtick").remove(),V.radialTickLayout=Ie),ye){fe.setScale();var qe=0,je=xe?(fe.tickvals||[]).filter(function(Te){return Te>=0}).map(function(Te){return r.tickText(fe,Te,!0,!1)}):r.calcTicks(fe),ke=xe?je:r.clipEnds(fe,je),ge=r.getTickSigns(fe)[2];xe&&((fe.ticks==="top"&&fe.side==="bottom"||fe.ticks==="bottom"&&fe.side==="top")&&(ge=-ge),fe.ticks==="top"&&fe.side==="top"&&(qe=-fe.ticklen),fe.ticks==="bottom"&&fe.side==="bottom"&&(qe=fe.ticklen)),r.drawTicks($,fe,{vals:je,layer:K["radial-axis"],path:r.makeTickPath(fe,0,ge),transFn:Ae,crisp:!1}),r.drawGrid($,fe,{vals:ke,layer:K["radial-grid"],path:Me,transFn:E.noop,crisp:!1}),r.drawLabels($,fe,{vals:je,layer:K["radial-axis"],transFn:Ae,labelFns:r.makeLabelFns(fe,qe)})}var le=V.radialAxisAngle=V.vangles?F(Q(B(ee.angle),V.vangles)):ee.angle,ve=l(q,W),se=ve+k(-le);re(K["radial-axis"],ye&&(ee.showticklabels||ee.ticks),{transform:se}),re(K["radial-grid"],ye&&ee.showgrid,{transform:xe?"":ve}),re(K["radial-line"].select("line"),ye&&ee.showline,{x1:xe?-G:X,y1:0,x2:G,y2:0,transform:se}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateRadialAxisTitle=function(ne,oe,V){if(!this.isSmith){var $=this,K=$.gd,G=$.radius,X=$.cx,q=$.cy,W=$.getRadial(oe),ee=$.id+"title",ae=0;if(W.title){var fe=t.bBox($.layers["radial-axis"].node()).height,ye=W.title.font.size,xe=W.side;ae=xe==="top"?ye:xe==="counterclockwise"?-(fe+ye*.4):fe+ye*.8}var Ae=V!==void 0?V:$.radialAxisAngle,Me=B(Ae),Ie=Math.cos(Me),qe=Math.sin(Me),je=X+G/2*Ie+ae*qe,ke=q-G/2*qe+ae*Ie;$.layers["radial-axis-title"]=p.draw(K,ee,{propContainer:W,propName:$.id+".radialaxis.title.text",placeholder:N(K,"Click to enter radial axis title"),attributes:{x:je,y:ke,"text-anchor":"middle"},transform:{rotate:-Ae}})}},j.updateAngularAxis=function(ne,oe){var V=this,$=V.gd,K=V.layers,G=V.radius,X=V.innerRadius,q=V.cx,W=V.cy,ee=V.getAngular(oe),ae=V.angularAxis,fe=V.isSmith;fe||(V.fillViewInitialKey("angularaxis.rotation",ee.rotation),ae.setGeometry(),ae.setScale());var ye=fe?function(Fe){var We=I(V,A([0,Fe.x]));return Math.atan2(We[0]-q,We[1]-W)-Math.PI/2}:function(Fe){return ae.t2g(Fe.x)};ae.type==="linear"&&ae.thetaunit==="radians"&&(ae.tick0=F(ae.tick0),ae.dtick=F(ae.dtick));var xe=function(Fe){return l(q+G*Math.cos(Fe),W-G*Math.sin(Fe))},Ae=fe?function(Fe){var We=I(V,A([0,Fe.x]));return l(We[0],We[1])}:function(Fe){return xe(ye(Fe))},Me=fe?function(Fe){var We=I(V,A([0,Fe.x])),Ge=Math.atan2(We[0]-q,We[1]-W)-Math.PI/2;return l(We[0],We[1])+k(-F(Ge))}:function(Fe){var We=ye(Fe);return xe(We)+k(-F(We))},Ie=fe?function(Fe){return b(V,Fe.x,0,1/0)}:function(Fe){var We=ye(Fe),Ge=Math.cos(We),gt=Math.sin(We);return"M"+[q+X*Ge,W-X*gt]+"L"+[q+G*Ge,W-G*gt]},qe=r.makeLabelFns(ae,0),je=qe.labelStandoff,ke={};ke.xFn=function(Fe){var We=ye(Fe);return Math.cos(We)*je},ke.yFn=function(Fe){var We=ye(Fe),Ge=Math.sin(We)>0?.2:1;return-Math.sin(We)*(je+Fe.fontSize*Ge)+Math.abs(Math.cos(We))*(Fe.fontSize*_)},ke.anchorFn=function(Fe){var We=ye(Fe),Ge=Math.cos(We);return Math.abs(Ge)<.1?"middle":Ge>0?"start":"end"},ke.heightFn=function(Fe,We,Ge){var gt=ye(Fe);return-.5*(1+Math.sin(gt))*Ge};var ge=U(ee);V.angularTickLayout!==ge&&(K["angular-axis"].selectAll("."+ae._id+"tick").remove(),V.angularTickLayout=ge);var le=fe?[1/0].concat(ae.tickvals||[]).map(function(Fe){return r.tickText(ae,Fe,!0,!1)}):r.calcTicks(ae);fe&&(le[0].text="\u221E",le[0].fontSize*=1.75);var ve;if(oe.gridshape==="linear"?(ve=le.map(ye),E.angleDelta(ve[0],ve[1])<0&&(ve=ve.slice().reverse())):ve=null,V.vangles=ve,ae.type==="category"&&(le=le.filter(function(Fe){return E.isAngleInsideSector(ye(Fe),V.sectorInRad)})),ae.visible){var se=ae.ticks==="inside"?-1:1,Te=(ae.linewidth||1)/2;r.drawTicks($,ae,{vals:le,layer:K["angular-axis"],path:"M"+se*Te+",0h"+se*ae.ticklen,transFn:Me,crisp:!1}),r.drawGrid($,ae,{vals:le,layer:K["angular-grid"],path:Ie,transFn:E.noop,crisp:!1}),r.drawLabels($,ae,{vals:le,layer:K["angular-axis"],repositionOnUpdate:!0,transFn:Ae,labelFns:ke})}re(K["angular-line"].select("path"),ee.showline,{d:V.pathSubplot(),transform:l(q,W)}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateFx=function(ne,oe){if(!this.gd._context.staticPlot){var V=!this.isSmith;V&&(this.updateAngularDrag(ne),this.updateRadialDrag(ne,oe,0),this.updateRadialDrag(ne,oe,1)),this.updateHoverAndMainDrag(ne)}},j.updateHoverAndMainDrag=function(ne){var oe=this,V=oe.isSmith,$=oe.gd,K=oe.layers,G=ne._zoomlayer,X=w.MINZOOM,q=w.OFFEDGE,W=oe.radius,ee=oe.innerRadius,ae=oe.cx,fe=oe.cy,ye=oe.cxx,xe=oe.cyy,Ae=oe.sectorInRad,Me=oe.vangles,Ie=oe.radialAxis,qe=h.clampTiny,je=h.findXYatLength,ke=h.findEnclosingVertexAngles,ge=w.cornerHalfWidth,le=w.cornerLen/2,ve,se,Te=c.makeDragger(K,"path","maindrag",ne.dragmode===!1?"none":"crosshair");v.select(Te).attr("d",oe.pathSubplot()).attr("transform",l(ae,fe)),Te.onmousemove=function(Vt){f.hover($,Vt,oe.id),$._fullLayout._lasthover=Te,$._fullLayout._hoversubplot=oe.id},Te.onmouseout=function(Vt){$._dragging||g.unhover($,Vt)};var Fe={element:Te,gd:$,subplot:oe.id,plotinfo:{id:oe.id,xaxis:oe.xaxis,yaxis:oe.yaxis},xaxes:[oe.xaxis],yaxes:[oe.yaxis]},We,Ge,gt,mt,Tt,At,Kt,ar,_r;function Zt(Vt,Ht){return Math.sqrt(Vt*Vt+Ht*Ht)}function sr(Vt,Ht){return Zt(Vt-ye,Ht-xe)}function Ot(Vt,Ht){return Math.atan2(xe-Ht,Vt-ye)}function vt(Vt,Ht){return[Vt*Math.cos(Ht),Vt*Math.sin(-Ht)]}function ht(Vt,Ht){if(Vt===0)return oe.pathSector(2*ge);var Wt=le/Vt,Sr=Ht-Wt,ia=Ht+Wt,$t=Math.max(0,Math.min(Vt,W)),It=$t-ge,ir=$t+ge;return"M"+vt(It,Sr)+"A"+[It,It]+" 0,0,0 "+vt(It,ia)+"L"+vt(ir,ia)+"A"+[ir,ir]+" 0,0,1 "+vt(ir,Sr)+"Z"}function Re(Vt,Ht,Wt){if(Vt===0)return oe.pathSector(2*ge);var Sr=vt(Vt,Ht),ia=vt(Vt,Wt),$t=qe((Sr[0]+ia[0])/2),It=qe((Sr[1]+ia[1])/2),ir,cr;if($t&&It){var fr=It/$t,Ir=-1/fr,sa=je(ge,fr,$t,It);ir=je(le,Ir,sa[0][0],sa[0][1]),cr=je(le,Ir,sa[1][0],sa[1][1])}else{var aa,xa;It?(aa=le,xa=ge):(aa=ge,xa=le),ir=[[$t-aa,It-xa],[$t+aa,It-xa]],cr=[[$t-aa,It+xa],[$t+aa,It+xa]]}return"M"+ir.join("L")+"L"+cr.reverse().join("L")+"Z"}function Be(){gt=null,mt=null,Tt=oe.pathSubplot(),At=!1;var Vt=$._fullLayout[oe.id];Kt=e.luminosity(Vt.bgcolor),ar=c.makeZoombox(G,Kt,ae,fe,Tt),ar.attr("fill-rule","evenodd"),_r=c.makeCorners(G,ae,fe),T($)}function He(Vt,Ht){return Ht=Math.max(Math.min(Ht,W),ee),VtX?(Vt-1&&Vt===1&&i(Ht,$,[oe.xaxis],[oe.yaxis],oe.id,Fe),Wt.indexOf("event")>-1&&f.click($,Ht,oe.id)}Fe.prepFn=function(Vt,Ht,Wt){var Sr=$._fullLayout.dragmode,ia=Te.getBoundingClientRect();$._fullLayout._calcInverseTransform($);var $t=$._fullLayout._invTransform;ve=$._fullLayout._invScaleX,se=$._fullLayout._invScaleY;var It=E.apply3DTransform($t)(Ht-ia.left,Wt-ia.top);if(We=It[0],Ge=It[1],Me){var ir=h.findPolygonOffset(W,Ae[0],Ae[1],Me);We+=ye+ir[0],Ge+=xe+ir[1]}switch(Sr){case"zoom":Fe.clickFn=Ct,V||(Me?Fe.moveFn=Mt:Fe.moveFn=Ze,Fe.doneFn=dt,Be(Vt,Ht,Wt));break;case"select":case"lasso":m(Vt,Ht,Wt,Fe,Sr);break}},g.init(Fe)},j.updateRadialDrag=function(ne,oe,V){var $=this,K=$.gd,G=$.layers,X=$.radius,q=$.innerRadius,W=$.cx,ee=$.cy,ae=$.radialAxis,fe=w.radialDragBoxSize,ye=fe/2;if(!ae.visible)return;var xe=B($.radialAxisAngle),Ae=ae._rl,Me=Ae[0],Ie=Ae[1],qe=Ae[V],je=.75*(Ae[1]-Ae[0])/(1-$.getHole(oe))/X,ke,ge,le;V?(ke=W+(X+ye)*Math.cos(xe),ge=ee-(X+ye)*Math.sin(xe),le="radialdrag"):(ke=W+(q-ye)*Math.cos(xe),ge=ee-(q-ye)*Math.sin(xe),le="radialdrag-inner");var ve=c.makeRectDragger(G,le,"crosshair",-ye,-ye,fe,fe),se={element:ve,gd:K};ne.dragmode===!1&&(se.dragmode=!1),re(v.select(ve),ae.visible&&q0!=(V?We>Me:We=90||K>90&&G>=450?xe=1:q<=0&&ee<=0?xe=0:xe=Math.max(q,ee),K<=180&&G>=180||K>180&&G>=540?ae=-1:X>=0&&W>=0?ae=0:ae=Math.min(X,W),K<=270&&G>=270||K>270&&G>=630?fe=-1:q>=0&&ee>=0?fe=0:fe=Math.min(q,ee),G>=360?ye=1:X<=0&&W<=0?ye=0:ye=Math.max(X,W),[ae,fe,ye,xe]}function Q(ne,oe){var V=function(K){return E.angleDist(ne,K)},$=E.findIndexOfMin(oe,V);return oe[$]}function re(ne,oe,V){return oe?(ne.attr("display",null),ne.attr(V)):ne&&ne.attr("display","none"),ne}}}),j5=Ee({"src/plots/polar/layout_attributes.js"(J,H){"use strict";var v=rs(),x=Gc(),E=kl().attributes,k=Vr().extendFlat,l=El().overrideAll,e=l({color:x.color,showline:k({},x.showline,{dflt:!0}),linecolor:x.linecolor,linewidth:x.linewidth,showgrid:k({},x.showgrid,{dflt:!0}),gridcolor:x.gridcolor,gridwidth:x.gridwidth,griddash:x.griddash},"plot","from-root"),t=l({tickmode:x.minor.tickmode,nticks:x.nticks,tick0:x.tick0,dtick:x.dtick,tickvals:x.tickvals,ticktext:x.ticktext,ticks:x.ticks,ticklen:x.ticklen,tickwidth:x.tickwidth,tickcolor:x.tickcolor,ticklabelstep:x.ticklabelstep,showticklabels:x.showticklabels,labelalias:x.labelalias,minorloglabels:x.minorloglabels,showtickprefix:x.showtickprefix,tickprefix:x.tickprefix,showticksuffix:x.showticksuffix,ticksuffix:x.ticksuffix,showexponent:x.showexponent,exponentformat:x.exponentformat,minexponent:x.minexponent,separatethousands:x.separatethousands,tickfont:x.tickfont,tickangle:x.tickangle,tickformat:x.tickformat,tickformatstops:x.tickformatstops,layer:x.layer},"plot","from-root"),n={visible:k({},x.visible,{dflt:!0}),type:k({},x.type,{values:["-","linear","log","date","category"]}),autotypenumbers:x.autotypenumbers,autorangeoptions:{minallowed:x.autorangeoptions.minallowed,maxallowed:x.autorangeoptions.maxallowed,clipmin:x.autorangeoptions.clipmin,clipmax:x.autorangeoptions.clipmax,include:x.autorangeoptions.include,editType:"plot"},autorange:k({},x.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:k({},x.minallowed,{editType:"plot"}),maxallowed:k({},x.maxallowed,{editType:"plot"}),range:k({},x.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:x.categoryorder,categoryarray:x.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:x.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:k({},x.title.text,{editType:"plot",dflt:""}),font:k({},x.title.font,{editType:"plot"}),editType:"plot"},hoverformat:x.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(n,e,t);var r={visible:k({},x.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:x.autotypenumbers,categoryorder:x.categoryorder,categoryarray:x.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:x.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(r,e,t),H.exports={domain:E({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:v.background},radialaxis:n,angularaxis:r,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),dD=Ee({"src/plots/polar/layout_defaults.js"(J,H){"use strict";var v=Vr(),x=Qn(),E=xs(),k=Bv(),l=uf().getSubplotData,e=Cv(),t=Np(),n=Wd(),r=Yd(),a=Xg(),o=Z0(),s=Rb(),c=Op(),g=j5(),f=B5(),p=Ky(),m=p.axisNames;function i(S,M,C,_){var w=C("bgcolor");_.bgColor=x.combine(w,_.paper_bgcolor);var h=C("sector");C("hole");var u=l(_.fullData,p.name,_.id),A=_.layoutOut,b;function z(ye,xe){return C(b+"."+ye,xe)}for(var I=0;I")}}H.exports={hoverPoints:x,makeHoverPointText:E}}}),mD=Ee({"src/traces/scatterpolar/index.js"(J,H){"use strict";H.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:Qy(),categories:["polar","symbols","showLegend","scatter-like"],attributes:qm(),supplyDefaults:e_().supplyDefaults,colorbar:ff(),formatLabels:t_(),calc:vD(),plot:pD(),style:eh().style,styleOnSelect:eh().styleOnSelect,hoverPoints:r_().hoverPoints,selectPoints:Fv(),meta:{}}}}),gD=Ee({"lib/scatterpolar.js"(J,H){"use strict";H.exports=mD()}}),U5=Ee({"src/traces/scatterpolargl/attributes.js"(J,H){"use strict";var v=qm(),{cliponaxis:x,hoveron:E}=v,k=Sa(v,["cliponaxis","hoveron"]),{connectgaps:l,line:{color:e,dash:t,width:n},fill:r,fillcolor:a,marker:o,textfont:s,textposition:c}=Rm();H.exports=Qr(Nr({},k),{connectgaps:l,fill:r,fillcolor:a,line:{color:e,dash:t,editType:"calc",width:n},marker:o,textfont:s,textposition:c})}}),yD=Ee({"src/traces/scatterpolargl/defaults.js"(J,H){"use strict";var v=Vr(),x=nl(),E=e_().handleRThetaDefaults,k=gh(),l=Rh(),e=Fh(),t=Xh(),n=Wh().PTS_LINESONLY,r=U5();H.exports=function(o,s,c,g){function f(m,i){return v.coerce(o,s,r,m,i)}var p=E(o,s,g,f);if(!p){s.visible=!1;return}f("thetaunit"),f("mode",p=t&&(_.marker.cluster=T.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=A),_.line&&A.length>1&&e.extendFlat(_.line,l.linePositions(a,i,A)),_.text&&(e.extendFlat(_.text,{positions:A},l.textPosition(a,i,_.text,_.marker)),e.extendFlat(_.textSel,{positions:A},l.textPosition(a,i,_.text,_.markerSel)),e.extendFlat(_.textUnsel,{positions:A},l.textPosition(a,i,_.text,_.markerUnsel))),_.fill&&!f.fill2d&&(f.fill2d=!0),_.marker&&!f.scatter2d&&(f.scatter2d=!0),_.line&&!f.line2d&&(f.line2d=!0),_.text&&!f.glText&&(f.glText=!0),f.lineOptions.push(_.line),f.fillOptions.push(_.fill),f.markerOptions.push(_.marker),f.markerSelectedOptions.push(_.markerSel),f.markerUnselectedOptions.push(_.markerUnsel),f.textOptions.push(_.text),f.textSelectedOptions.push(_.textSel),f.textUnselectedOptions.push(_.textUnsel),f.selectBatch.push([]),f.unselectBatch.push([]),T.x=b,T.y=z,T.rawx=b,T.rawy=z,T.r=M,T.theta=C,T.positions=A,T._scene=f,T.index=f.count,f.count++}}),E(a,o,s)}},H.exports.reglPrecompiled=n}}),AD=Ee({"src/traces/scatterpolargl/index.js"(J,H){"use strict";var v=wD();v.plot=TD(),H.exports=v}}),MD=Ee({"lib/scatterpolargl.js"(J,H){"use strict";H.exports=AD()}}),q5=Ee({"src/traces/barpolar/attributes.js"(J,H){"use strict";var{hovertemplateAttrs:v,templatefallbackAttrs:x}=Cs(),E=vo().extendFlat,k=qm(),l=Zh();H.exports={r:k.r,theta:k.theta,r0:k.r0,dr:k.dr,theta0:k.theta0,dtheta:k.dtheta,thetaunit:k.thetaunit,base:E({},l.base,{}),offset:E({},l.offset,{}),width:E({},l.width,{}),text:E({},l.text,{}),hovertext:E({},l.hovertext,{}),marker:e(),hoverinfo:k.hoverinfo,hovertemplate:v(),hovertemplatefallback:x(),selected:l.selected,unselected:l.unselected};function e(){var t=E({},l.marker);return delete t.cornerradius,t}}}),V5=Ee({"src/traces/barpolar/layout_attributes.js"(J,H){"use strict";H.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),SD=Ee({"src/traces/barpolar/defaults.js"(J,H){"use strict";var v=Vr(),x=e_().handleRThetaDefaults,E=a1(),k=q5();H.exports=function(e,t,n,r){function a(s,c){return v.coerce(e,t,k,s,c)}var o=x(e,t,r,a);if(!o){t.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),E(e,t,a,n,r),v.coerceSelectionMarkerOpacity(t,a)}}}),ED=Ee({"src/traces/barpolar/layout_defaults.js"(J,H){"use strict";var v=Vr(),x=V5();H.exports=function(E,k,l){var e={},t;function n(o,s){return v.coerce(E[t]||{},k[t],x,o,s)}for(var r=0;r0?(g=s,f=c):(g=c,f=s);var p=l.findEnclosingVertexAngles(g,t.vangles)[0],m=l.findEnclosingVertexAngles(f,t.vangles)[1],i=[p,(g+f)/2,m];return l.pathPolygonAnnulus(a,o,g,f,i,n,r)}:function(a,o,s,c){return E.pathAnnulus(a,o,s,c,n,r)}}}}),CD=Ee({"src/traces/barpolar/hover.js"(J,H){"use strict";var v=$l(),x=Vr(),E=Gp().getTraceColor,k=x.fillText,l=r_().makeHoverPointText,e=Jy().isPtInsidePolygon;H.exports=function(n,r,a){var o=n.cd,s=o[0].trace,c=n.subplot,g=c.radialAxis,f=c.angularAxis,p=c.vangles,m=p?e:x.isPtInsideSector,i=n.maxHoverDistance,T=f._period||2*Math.PI,S=Math.abs(g.g2p(Math.sqrt(r*r+a*a))),M=Math.atan2(a,r);g.range[0]>g.range[1]&&(M+=Math.PI);var C=function(u){return m(S,M,[u.rp0,u.rp1],[u.thetag0,u.thetag1],p)?i+Math.min(1,Math.abs(u.thetag1-u.thetag0)/T)-1+(u.rp1-S)/(u.rp1-u.rp0)-1:1/0};if(v.getClosest(o,C,n),n.index!==!1){var _=n.index,w=o[_];n.x0=n.x1=w.ct[0],n.y0=n.y1=w.ct[1];var h=x.extendFlat({},w,{r:w.s,theta:w.p});return k(w,s,n),l(h,s,c,n),n.hovertemplate=s.hovertemplate,n.color=E(s,w),n.xLabelVal=n.yLabelVal=void 0,w.s<0&&(n.idealAlign="left"),[n]}}}}),LD=Ee({"src/traces/barpolar/index.js"(J,H){"use strict";H.exports={moduleType:"trace",name:"barpolar",basePlotModule:Qy(),categories:["polar","bar","showLegend"],attributes:q5(),layoutAttributes:V5(),supplyDefaults:SD(),supplyLayoutDefaults:ED(),calc:H5().calc,crossTraceCalc:H5().crossTraceCalc,plot:kD(),colorbar:ff(),formatLabels:t_(),style:bh().style,styleOnSelect:bh().styleOnSelect,hoverPoints:CD(),selectPoints:Wp(),meta:{}}}}),PD=Ee({"lib/barpolar.js"(J,H){"use strict";H.exports=LD()}}),G5=Ee({"src/plots/smith/constants.js"(J,H){"use strict";H.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),W5=Ee({"src/plots/smith/layout_attributes.js"(J,H){"use strict";var v=rs(),x=Gc(),E=kl().attributes,k=Vr().extendFlat,l=El().overrideAll,e=l({color:x.color,showline:k({},x.showline,{dflt:!0}),linecolor:x.linecolor,linewidth:x.linewidth,showgrid:k({},x.showgrid,{dflt:!0}),gridcolor:x.gridcolor,gridwidth:x.gridwidth,griddash:x.griddash},"plot","from-root"),t=l({ticklen:x.ticklen,tickwidth:k({},x.tickwidth,{dflt:2}),tickcolor:x.tickcolor,showticklabels:x.showticklabels,labelalias:x.labelalias,showtickprefix:x.showtickprefix,tickprefix:x.tickprefix,showticksuffix:x.showticksuffix,ticksuffix:x.ticksuffix,tickfont:x.tickfont,tickformat:x.tickformat,hoverformat:x.hoverformat,layer:x.layer},"plot","from-root"),n=k({visible:k({},x.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:k({},x.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,t),r=k({visible:k({},x.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:x.ticks,editType:"calc"},e,t);H.exports={domain:E({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:v.background},realaxis:n,imaginaryaxis:r,editType:"calc"}}}),DD=Ee({"src/plots/smith/layout_defaults.js"(J,H){"use strict";var v=Vr(),x=Qn(),E=xs(),k=Bv(),l=uf().getSubplotData,e=Yd(),t=Wd(),n=Z0(),r=Hh(),a=W5(),o=G5(),s=o.axisNames,c=f(function(p){return v.isTypedArray(p)&&(p=Array.from(p)),p.slice().reverse().map(function(m){return-m}).concat([0]).concat(p)},String);function g(p,m,i,T){var S=i("bgcolor");T.bgColor=x.combine(S,T.paper_bgcolor);var M=l(T.fullData,o.name,T.id),C=T.layoutOut,_;function w(U,Z){return i(_+"."+U,Z)}for(var h=0;h")}}H.exports={hoverPoints:x,makeHoverPointText:E}}}),OD=Ee({"src/traces/scattersmith/index.js"(J,H){"use strict";H.exports={moduleType:"trace",name:"scattersmith",basePlotModule:ID(),categories:["smith","symbols","showLegend","scatter-like"],attributes:Y5(),supplyDefaults:RD(),colorbar:ff(),formatLabels:FD(),calc:zD(),plot:BD(),style:eh().style,styleOnSelect:eh().styleOnSelect,hoverPoints:ND().hoverPoints,selectPoints:Fv(),meta:{}}}}),jD=Ee({"lib/scattersmith.js"(J,H){"use strict";H.exports=OD()}}),X5=Ee({"src/traces/quiver/attributes.js"(J,H){"use strict";var v=nn(),x=Cs().hovertemplateAttrs,E=Fl().axisHoverFormat,k=vo().extendFlat,l=$s(),e=kc().dash,t=Kd(),n=ou(),r={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:n.x0,dx:n.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:n.y0,dy:n.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},arrowref:{valType:"enumerated",values:["paper","data"],dflt:"data",editType:"calc"},lengthmode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},lengthfactor:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:E("x"),yhoverformat:E("y"),uhoverformat:E("u","noDate"),vhoverformat:E("v","noDate"),hoverinfo:k({},v.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:x({},{keys:["x","y","u","v","text","name"]}),text:n.text,textposition:n.textposition,textfont:n.textfont,marker:k({arrowsize:k({},t.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:e,editType:"style"},editType:"calc"},l("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};H.exports=r}}),UD=Ee({"src/traces/quiver/defaults.js"(J,H){"use strict";var v=Vr(),x=X5(),E=Dv(),k=cf().hasColorscale,l=Cc();H.exports=function(t,n,r,a){function o(S,M){return v.coerce(t,n,x,S,M)}var s=E(t,n,a,o);if(!s){n.visible=!1;return}var c=o("u"),g=o("v");if(!v.isArrayOrTypedArray(c)||c.length===0){n.u=new Array(s);for(var f=0;fN&&(N=c[Q]),g[Q]B&&(B=g[Q]),VP&&(P=V),$U&&(U=$);var K=Math.sqrt(V*V+$*$);if(K>i&&(i=K),KS&&(S=G))}}else re.x=k,re.y=k}if(a._maxNorm=i,u==="scaled"||A==="paper"){let Ae=N-I,Me=B-R;var X;Ae===0&&Me===0?X=1:X=(Ae+Me+Math.sqrt((Ae-Me)*(Ae-Me)+4*Z*Ae*Me))/(2*(Z-1)),X*=t,a._scaleFactor=X/a._maxNorm}else a._scaleFactor=1;a._scaleFactor*=a.lengthfactor;let q=new Array(f),W=new Array(f),ee=new Array(f),ae=new Array(f);for(var fe,ye,Q=0;Qg.i&&isFinite(f[g.i]))p=f[g.i];else{var m=o.u&&o.u[g.i]||0,i=o.v&&o.v[g.i]||0;p=Math.sqrt(m*m+i*i)}return g.mcc=c(p),g.mcc})}function t(a){var o=v.select(a).selectAll("g.trace.quiver");o.each(function(s){r(a,s,v.select(this))})}function n(a,o,s){r(a,o,s)}function r(a,o,s){var c=o[0].trace,g=c.marker||{},f=g.line||{},p=x.isArrayOrTypedArray(g.color)?void 0:g.color,m=c._hasColorscale;if(s)if(c.selectedpoints){var i=(c.selected||{}).marker||{},T=(c.unselected||{}).marker||{},S=i.line||{},M=T.line||{};s.selectAll("path.js-line").each(function(_){var w=v.select(this),h=!_.selected,u=h?T.color:i.color,A=h?M.width!==void 0?M.width:f.width:S.width!==void 0?S.width:f.width;u?(E.lineGroupStyle(w,A,u,f.dash),w.style("stroke-opacity",1)):(E.lineGroupStyle(w,A,p,f.dash),m&&e(w,c),w.style("stroke-opacity",h?l:1))}),E.selectedTextStyle(s.selectAll("text"),c)}else{var C=s.selectAll("path.js-line");C.call(E.lineGroupStyle,f.width,p,f.dash),m&&e(C,c),C.style("stroke-opacity",1),E.textPointStyle(s.selectAll("text"),c,a)}}H.exports={style:t,styleOnSelect:n,colorscaleStroke:e}}}),HD=Ee({"src/traces/quiver/plot.js"(J,H){"use strict";var v=Va(),x=Vr(),E=mo(),k=a_().colorscaleStroke,l=Math.PI/12,e=5.8,t=1.5,n=.7;H.exports=function(o,s,c,g,f,p){var m,i,T=!f,S=!!f&&f.duration>0;if(m=g.selectAll("g.trace").data(c,function(C){return C[0].trace.uid}),m.enter().append("g").attr("class",function(C){return"trace quiver trace"+C[0].trace.uid}).style("stroke-miterlimit",2),m.order(),S){p&&(i=p());var M=v.transition().duration(f.duration).ease(f.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()});M.each(function(){g.selectAll("g.trace").each(function(C,_){r(o,_,s,C,c,this,f)})})}else m.each(function(C,_){r(o,_,s,C,c,this,f)});T&&m.exit().remove()};function r(a,o,s,c,g,f,p){var m=c[0].trace,i=s.xaxis,T=s.yaxis;c[0][s.isRangePlot?"nodeRangePlot3":"node3"]=v.select(f);var S=v.select(f).selectAll("g.lines").data([c]);S.enter().append("g").classed("lines",!0),E.setClipUrl(S,s.layerClipId,a);var M=S.selectAll("path.js-line").data(c);M.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),M.exit().remove();let{anchor:C,maxNorm:_=0,arrowref:w}=m,h=w==="paper"?m._scaleFactor*Math.sqrt(Math.abs(i._m*T._m)):m._scaleFactor,u=m.marker.arrowsize;M.each(function(B){let F=v.select(this);if(B.x===void 0||B.y===void 0){F.attr("d",null);return}let P=(w==="paper"?B._u*Math.sign(i._m):v.round(i._m*B._u))*h,j=(w==="paper"?B._v*Math.sign(T._m):v.round(T._m*B._v))*h,U=(m._input.marker||{}).arrowsize!==void 0;var Z,Q,re,ne;C==="tip"?(Z=i.c2p(B.x)-P,re=T.c2p(B.y)-j,Q=i.c2p(B.x),ne=T.c2p(B.y)):C==="center"?(Z=i.c2p(B.x)-P/2,re=T.c2p(B.y)-j/2,Q=i.c2p(B.x)+P/2,ne=T.c2p(B.y)+j/2):(Z=i.c2p(B.x),re=T.c2p(B.y),Q=i.c2p(B.x)+P,ne=T.c2p(B.y)+j),B._px0=Z,B._py0=re,B._px1=Q,B._py1=ne;var oe=m.marker.line.width;U||(oe=Math.max(oe,t));let V=Math.sqrt((Q-Z)*(Q-Z)+(ne-re)*(ne-re)),$=n*V,K=Math.min(e*u*oe,$),G=Math.atan2(ne-re,Q-Z),X=Q-K*Math.cos(G-l),q=ne-K*Math.sin(G-l),W=Q-K*Math.cos(G+l),ee=ne-K*Math.sin(G+l),ae="M"+Z+","+re+"L"+Q+","+ne+"L"+X+","+q+"L"+Q+","+ne+"L"+W+","+ee;F.attr("d",ae)});var A=m.marker||{},b=A.line||{},z=x.isArrayOrTypedArray(A.color)?void 0:A.color;E.lineGroupStyle(M,b.width,z,b.dash),m._hasColorscale&&k(M,m);var I=v.select(f).selectAll("g.text").data([c]);I.enter().append("g").classed("text",!0),E.setClipUrl(I,s.layerClipId,a);var N=I.selectAll("g.textpoint").data(c);if(N.enter().append("g").classed("textpoint",!0).append("text"),N.exit().remove(),N.each(function(B){var F=v.select(this),P=E.translatePoint(B,F.select("text"),i,T);P||F.remove()}),N.selectAll("text").call(E.textPointStyle,m,a).each(function(B){var F=i.c2p(B.x),P=T.c2p(B.y);v.select(this).selectAll("tspan.line").each(function(){v.select(this).attr({x:F,y:P})})}),p&&p.duration>0){var R=v.transition().duration(p.duration).ease(p.easing);M.transition(R).style("opacity",1)}}}}),GD=Ee({"src/traces/quiver/hover.js"(J,H){"use strict";var v=Vr(),x=$l(),E=Vp();function k(l,e,t,n,r,a){let o=r-t,s=a-n,c=o*o+s*s;if(!c)return Math.sqrt((l-t)*(l-t)+(e-n)*(e-n));var g=((l-t)*o+(e-n)*s)/c;g=Math.max(0,Math.min(1,g));let f=t+g*o,p=n+g*s;return Math.sqrt((l-f)*(l-f)+(e-p)*(e-p))}H.exports=function(e,t,n,r){var a=e.cd,o=a[0].trace,s=e.xa,c=e.ya,g=s.c2p(t),f=c.c2p(n),p=function(w){return w._px0===void 0?1/0:k(g,f,w._px0,w._py0,w._px1,w._py1)};if(x.getClosest(a,p,e),e.index!==!1){var m=a[e.index],i=s.c2p(m.x,!0),T=c.c2p(m.y,!0),S=Math.sqrt((g-i)*(g-i)+(f-T)*(f-T));e.index=m.i;var M=o.u?o.u[m.i]:0,C=o.v?o.v[m.i]:0,_="u: "+M+", v: "+C;return v.extendFlat(e,{color:E(o,m),x0:i-3,x1:i+3,xLabelVal:m.x,y0:T-3,y1:T+3,yLabelVal:m.y,uLabelVal:M,vLabelVal:C,extraText:_,spikeDistance:S,hovertemplate:o.hovertemplate}),v.fillText(m,o,e),[e]}}}}),WD=Ee({"src/traces/quiver/format_labels.js"(J,H){"use strict";var v=uo(),x=Vr();H.exports=function(k,l,e){var t={},n={_fullLayout:e},r=v.getFromTrace(n,l,"x"),a=v.getFromTrace(n,l,"y"),o=k.x,s=k.y;t.xLabel=v.tickText(r,r.c2l(o),!0).text,t.yLabel=v.tickText(a,a.c2l(s),!0).text;var c=l.u?l.u[k.i]:0,g=l.v?l.v[k.i]:0,f=l.uhoverformat,p=l.vhoverformat;return t.uLabel=f?x.numberFormat(f)(c):String(c),t.vLabel=p?x.numberFormat(p)(g):String(g),t}}}),YD=Ee({"src/traces/quiver/event_data.js"(J,H){"use strict";H.exports=function(x,E,k,l,e){return x.x=E.x,x.y=E.y,x.u=k.u?k.u[e]:void 0,x.v=k.v?k.v[e]:void 0,x}}}),XD=Ee({"src/traces/quiver/index.js"(J,H){"use strict";H.exports={moduleType:"trace",name:"quiver",basePlotModule:Mu(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:X5(),supplyDefaults:UD(),calc:qD(),crossTraceCalc:VD(),plot:HD(),style:a_().style,styleOnSelect:a_().styleOnSelect,hoverPoints:GD(),formatLabels:WD(),eventData:YD(),selectPoints:Fv(),colorbar:ff(),animatable:!0,meta:{}}}}),$D=Ee({"lib/quiver.js"(J,H){"use strict";H.exports=XD()}}),kf=Ee({"node_modules/world-calendars/dist/main.js"(J,H){var v=Lc();function x(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}v(x.prototype,{instance:function(n,r){n=(n||"gregorian").toLowerCase(),r=r||"";var a=this._localCals[n+"-"+r];if(!a&&this.calendars[n]&&(a=new this.calendars[n](r),this._localCals[n+"-"+r]=a),!a)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,n);return a},newDate:function(n,r,a,o,s){return o=(n!=null&&n.year?n.calendar():typeof o=="string"?this.instance(o,s):o)||this.instance(),o.newDate(n,r,a)},substituteDigits:function(n){return function(r){return(r+"").replace(/[0-9]/g,function(a){return n[a]})}},substituteChineseDigits:function(n,r){return function(a){for(var o="",s=0;a>0;){var c=a%10;o=(c===0?"":n[c]+r[s])+o,s++,a=Math.floor(a/10)}return o.indexOf(n[1]+r[1])===0&&(o=o.substr(1)),o||n[0]}}});function E(n,r,a,o){if(this._calendar=n,this._year=r,this._month=a,this._day=o,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function k(n,r){return n=""+n,"000000".substring(0,r-n.length)+n}v(E.prototype,{newDate:function(n,r,a){return this._calendar.newDate(n??this,r,a)},year:function(n){return arguments.length===0?this._year:this.set(n,"y")},month:function(n){return arguments.length===0?this._month:this.set(n,"m")},day:function(n){return arguments.length===0?this._day:this.set(n,"d")},date:function(n,r,a){if(!this._calendar.isValid(n,r,a))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=n,this._month=r,this._day=a,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(n,r){return this._calendar.add(this,n,r)},set:function(n,r){return this._calendar.set(this,n,r)},compareTo:function(n){if(this._calendar.name!==n._calendar.name)throw(t.local.differentCalendars||t.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,n._calendar.local.name);var r=this._year!==n._year?this._year-n._year:this._month!==n._month?this.monthOfYear()-n.monthOfYear():this._day-n._day;return r===0?0:r<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(n){return this._calendar.fromJD(n)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(n){return this._calendar.fromJSDate(n)},toString:function(){return(this.year()<0?"-":"")+k(Math.abs(this.year()),4)+"-"+k(this.month(),2)+"-"+k(this.day(),2)}});function l(){this.shortYearCutoff="+10"}v(l.prototype,{_validateLevel:0,newDate:function(n,r,a){return n==null?this.today():(n.year&&(this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),a=n.day(),r=n.month(),n=n.year()),new E(this,n,r,a))},today:function(){return this.fromJSDate(new Date)},epoch:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+k(Math.abs(r.year()),4)},monthsInYear:function(n){return this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear),12},monthOfYear:function(n,r){var a=this._validate(n,r,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth);return(a.month()+this.monthsInYear(a)-this.firstMonth)%this.monthsInYear(a)+this.minMonth},fromMonthOfYear:function(n,r){var a=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(n)+this.minMonth;return this._validate(n,a,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth),a},daysInYear:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate);return o.toJD()-this.newDate(o.year(),this.fromMonthOfYear(o.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(o))+2)%this.daysInWeek()},extraInfo:function(n,r,a){return this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),{}},add:function(n,r,a){return this._validate(n,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate),this._correctAdd(n,this._add(n,r,a),r,a)},_add:function(n,r,a){if(this._validateLevel++,a==="d"||a==="w"){var o=n.toJD()+r*(a==="w"?this.daysInWeek():1),s=n.calendar().fromJD(o);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var c=n.year()+(a==="y"?r:0),g=n.monthOfYear()+(a==="m"?r:0),s=n.day(),f=function(i){for(;gT-1+i.minMonth;)c++,g-=T,T=i.monthsInYear(c)};a==="y"?(n.month()!==this.fromMonthOfYear(c,g)&&(g=this.newDate(c,n.month(),this.minDay).monthOfYear()),g=Math.min(g,this.monthsInYear(c)),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,g)))):a==="m"&&(f(this),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,g))));var p=[c,this.fromMonthOfYear(c,g),s];return this._validateLevel--,p}catch(m){throw this._validateLevel--,m}},_correctAdd:function(n,r,a,o){if(!this.hasYearZero&&(o==="y"||o==="m")&&(r[0]===0||n.year()>0!=r[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[o],c=a<0?-1:1;r=this._add(n,a*s[0]+c*s[1],s[2])}return n.date(r[0],r[1],r[2])},set:function(n,r,a){this._validate(n,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate);var o=a==="y"?r:n.year(),s=a==="m"?r:n.month(),c=a==="d"?r:n.day();return(a==="y"||a==="m")&&(c=Math.min(c,this.daysInMonth(o,s))),n.date(o,s,c)},isValid:function(n,r,a){this._validateLevel++;var o=this.hasYearZero||n!==0;if(o){var s=this.newDate(n,r,this.minDay);o=r>=this.minMonth&&r-this.minMonth=this.minDay&&a-this.minDay13.5?13:1),m=s-(p>2.5?4716:4715);return m<=0&&m--,this.newDate(m,p,f)},toJSDate:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),s=new Date(o.year(),o.month()-1,o.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(n){return this.newDate(n.getFullYear(),n.getMonth()+1,n.getDate())}});var t=H.exports=new x;t.cdate=E,t.baseCalendar=l,t.calendars.gregorian=e}}),ZD=Ee({"node_modules/world-calendars/dist/plus.js"(){var J=Lc(),H=kf();J(H.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"}),H.local=H.regionalOptions[""],J(H.cdate.prototype,{formatDate:function(v,x){return typeof v!="string"&&(x=v,v=""),this._calendar.formatDate(v||"",this,x)}}),J(H.baseCalendar.prototype,{UNIX_EPOCH:H.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:H.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(v,x,E){if(typeof v!="string"&&(E=x,x=v,v=""),!x)return"";if(x.calendar()!==this)throw H.local.invalidFormat||H.regionalOptions[""].invalidFormat;v=v||this.local.dateFormat,E=E||{};for(var k=E.dayNamesShort||this.local.dayNamesShort,l=E.dayNames||this.local.dayNames,e=E.monthNumbers||this.local.monthNumbers,t=E.monthNamesShort||this.local.monthNamesShort,n=E.monthNames||this.local.monthNames,r=E.calculateWeek||this.local.calculateWeek,a=function(M,C){for(var _=1;S+_1},o=function(M,C,_,w){var h=""+C;if(a(M,w))for(;h.length<_;)h="0"+h;return h},s=function(M,C,_,w){return a(M)?w[C]:_[C]},c=this,g=function(M){return typeof e=="function"?e.call(c,M,a("m")):m(o("m",M.month(),2))},f=function(M,C){return C?typeof n=="function"?n.call(c,M):n[M.month()-c.minMonth]:typeof t=="function"?t.call(c,M):t[M.month()-c.minMonth]},p=this.local.digits,m=function(M){return E.localNumbers&&p?p(M):M},i="",T=!1,S=0;S1},T=function(z,I){var N=i(z,I),R=[2,3,N?4:2,N?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],B=new RegExp("^-?\\d{1,"+R+"}"),F=x.substring(h).match(B);if(!F)throw(H.local.missingNumberAt||H.regionalOptions[""].missingNumberAt).replace(/\{0\}/,h);return h+=F[0].length,parseInt(F[0],10)},S=this,M=function(){if(typeof n=="function"){i("m");var z=n.call(S,x.substring(h));return h+=z.length,z}return T("m")},C=function(z,I,N,R){for(var B=i(z,R)?N:I,F=0;F-1){c=1,g=f;for(var b=this.daysInMonth(s,c);g>b;b=this.daysInMonth(s,c))c++,g-=b}return o>-1?this.fromJD(o):this.newDate(s,c,g)},determineDate:function(v,x,E,k,l){E&&typeof E!="object"&&(l=k,k=E,E=null),typeof k!="string"&&(l=k,k="");var e=this,t=function(n){try{return e.parseDate(k,n,l)}catch{}n=n.toLowerCase();for(var r=(n.match(/^c/)&&E?E.newDate():null)||e.today(),a=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=a.exec(n);o;)r.add(parseInt(o[1],10),o[2]||"d"),o=a.exec(n);return r};return x=x?x.newDate():null,v=v==null?x:typeof v=="string"?t(v):typeof v=="number"?isNaN(v)||v===1/0||v===-1/0?x:e.today().add(v,"d"):e.newDate(v),v}})}}),KD=Ee({"node_modules/world-calendars/dist/calendars/chinese.js"(){var J=kf(),H=Lc(),v=J.instance();function x(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}x.prototype=new J.baseCalendar,H(x.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(o,s){if(typeof o=="string"){var c=o.match(k);return c?c[0]:""}var g=this._validateYear(o),f=o.month(),p=""+this.toChineseMonth(g,f);return s&&p.length<2&&(p="0"+p),this.isIntercalaryMonth(g,f)&&(p+="i"),p},monthNames:function(o){if(typeof o=="string"){var s=o.match(l);return s?s[0]:""}var c=this._validateYear(o),g=o.month(),f=this.toChineseMonth(c,g),p=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][f-1];return this.isIntercalaryMonth(c,g)&&(p="\u95F0"+p),p},monthNamesShort:function(o){if(typeof o=="string"){var s=o.match(e);return s?s[0]:""}var c=this._validateYear(o),g=o.month(),f=this.toChineseMonth(c,g),p=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][f-1];return this.isIntercalaryMonth(c,g)&&(p="\u95F0"+p),p},parseMonth:function(o,s){o=this._validateYear(o);var c=parseInt(s),g;if(isNaN(c))s[0]==="\u95F0"&&(g=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),c=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var f=s[s.length-1];g=f==="i"||f==="I"}var p=this.toMonthIndex(o,c,g);return p},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(o,s){if(o.year&&(o=o.year()),typeof o!="number"||o<1888||o>2111)throw s.replace(/\{0\}/,this.local.name);return o},toMonthIndex:function(o,s,c){var g=this.intercalaryMonth(o),f=c&&s!==g;if(f||s<1||s>12)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var p;return g?!c&&s<=g?p=s-1:p=s:p=s-1,p},toChineseMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o),g=c?12:11;if(s<0||s>g)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var f;return c?s>13;return c},isIntercalaryMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o);return!!c&&c===s},leapYear:function(o){return this.intercalaryMonth(o)!==0},weekOfYear:function(o,s,c){var g=this._validateYear(o,J.local.invalidyear),f=n[g-n[0]],p=f>>9&4095,m=f>>5&15,i=f&31,T;T=v.newDate(p,m,i),T.add(4-(T.dayOfWeek()||7),"d");var S=this.toJD(o,s,c)-T.toJD();return 1+Math.floor(S/7)},monthsInYear:function(o){return this.leapYear(o)?13:12},daysInMonth:function(o,s){o.year&&(s=o.month(),o=o.year()),o=this._validateYear(o);var c=t[o-t[0]],g=c>>13,f=g?12:11;if(s>f)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var p=c&1<<12-s?30:29;return p},weekDay:function(o,s,c){return(this.dayOfWeek(o,s,c)||7)<6},toJD:function(o,s,c){var g=this._validate(o,p,c,J.local.invalidDate);o=this._validateYear(g.year()),s=g.month(),c=g.day();var f=this.isIntercalaryMonth(o,s),p=this.toChineseMonth(o,s),m=a(o,p,c,f);return v.toJD(m.year,m.month,m.day)},fromJD:function(o){var s=v.fromJD(o),c=r(s.year(),s.month(),s.day()),g=this.toMonthIndex(c.year,c.month,c.isIntercalary);return this.newDate(c.year,g,c.day)},fromString:function(o){var s=o.match(E),c=this._validateYear(+s[1]),g=+s[2],f=!!s[3],p=this.toMonthIndex(c,g,f),m=+s[4];return this.newDate(c,p,m)},add:function(o,s,c){var g=o.year(),f=o.month(),p=this.isIntercalaryMonth(g,f),m=this.toChineseMonth(g,f),i=Object.getPrototypeOf(x.prototype).add.call(this,o,s,c);if(c==="y"){var T=i.year(),S=i.month(),M=this.isIntercalaryMonth(T,m),C=p&&M?this.toMonthIndex(T,m,!0):this.toMonthIndex(T,m,!1);C!==S&&i.month(C)}return i}});var E=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,k=/^\d?\d[iI]?/m,l=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;J.calendars.chinese=x;var t=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],n=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function r(o,s,c,g){var f,p;if(typeof o=="object")f=o,p=s||{};else{var m=typeof o=="number"&&o>=1888&&o<=2111;if(!m)throw new Error("Solar year outside range 1888-2111");var i=typeof s=="number"&&s>=1&&s<=12;if(!i)throw new Error("Solar month outside range 1 - 12");var T=typeof c=="number"&&c>=1&&c<=31;if(!T)throw new Error("Solar day outside range 1 - 31");f={year:o,month:s,day:c},p=g||{}}var S=n[f.year-n[0]],M=f.year<<9|f.month<<5|f.day;p.year=M>=S?f.year:f.year-1,S=n[p.year-n[0]];var C=S>>9&4095,_=S>>5&15,w=S&31,h,u=new Date(C,_-1,w),A=new Date(f.year,f.month-1,f.day);h=Math.round((A-u)/(24*3600*1e3));var b=t[p.year-t[0]],z;for(z=0;z<13;z++){var I=b&1<<12-z?30:29;if(h>13;return!N||z=1888&&o<=2111;if(!i)throw new Error("Lunar year outside range 1888-2111");var T=typeof s=="number"&&s>=1&&s<=12;if(!T)throw new Error("Lunar month outside range 1 - 12");var S=typeof c=="number"&&c>=1&&c<=30;if(!S)throw new Error("Lunar day outside range 1 - 30");var M;typeof g=="object"?(M=!1,p=g):(M=!!g,p=f||{}),m={year:o,month:s,day:c,isIntercalary:M}}var C;C=m.day-1;var _=t[m.year-t[0]],w=_>>13,h;w&&(m.month>w||m.isIntercalary)?h=m.month:h=m.month-1;for(var u=0;u>9&4095,I=b>>5&15,N=b&31,R=new Date(z,I-1,N+C);return p.year=R.getFullYear(),p.month=1+R.getMonth(),p.day=R.getDate(),p}}}),JD=Ee({"node_modules/world-calendars/dist/calendars/coptic.js"(){var J=kf(),H=Lc();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,H(v.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(x,E,k){var l=this.newDate(x,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(x,E){var k=this._validate(x,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(x,E,k){return(this.dayOfWeek(x,E,k)||7)<6},toJD:function(x,E,k){var l=this._validate(x,E,k,J.local.invalidDate);return x=l.year(),x<0&&x++,l.day()+(l.month()-1)*30+(x-1)*365+Math.floor(x/4)+this.jdEpoch-1},fromJD:function(x){var E=Math.floor(x)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(x)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.coptic=v}}),QD=Ee({"node_modules/world-calendars/dist/calendars/discworld.js"(){var J=kf(),H=Lc();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,H(v.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),!1},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),13},daysInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),400},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return(e.day()+1)%8},weekDay:function(E,k,l){var e=this.dayOfWeek(E,k,l);return e>=2&&e<=6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{century:x[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return E=e.year()+(e.year()<0?1:0),k=e.month(),l=e.day(),l+(k>1?16:0)+(k>2?(k-2)*32:0)+(E-1)*400+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E+.5)-Math.floor(this.jdEpoch)-1;var k=Math.floor(E/400)+1;E-=(k-1)*400,E+=E>15?16:0;var l=Math.floor(E/32)+1,e=E-(l-1)*32+1;return this.newDate(k<=0?k-1:k,l,e)}});var x={20:"Fruitbat",21:"Anchovy"};J.calendars.discworld=v}}),eI=Ee({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var J=kf(),H=Lc();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,H(v.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(x,E,k){var l=this.newDate(x,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(x,E){var k=this._validate(x,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(x,E,k){return(this.dayOfWeek(x,E,k)||7)<6},toJD:function(x,E,k){var l=this._validate(x,E,k,J.local.invalidDate);return x=l.year(),x<0&&x++,l.day()+(l.month()-1)*30+(x-1)*365+Math.floor(x/4)+this.jdEpoch-1},fromJD:function(x){var E=Math.floor(x)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(x)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.ethiopian=v}}),tI=Ee({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var J=kf(),H=Lc();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,H(v.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this._leapYear(k.year())},_leapYear:function(E){return E=E<0?E+1:E,x(E*7+1,19)<7},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),this._leapYear(E.year?E.year():E)?13:12},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return E=k.year(),this.toJD(E===-1?1:E+1,7,1)-this.toJD(E,7,1)},daysInMonth:function(E,k){return E.year&&(k=E.month(),E=E.year()),this._validate(E,k,this.minDay,J.local.invalidMonth),k===12&&this.leapYear(E)||k===8&&x(this.daysInYear(E),10)===5?30:k===9&&x(this.daysInYear(E),10)===3?29:this.daysPerMonth[k-1]},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=E<=0?E+1:E,n=this.jdEpoch+this._delay1(t)+this._delay2(t)+l+1;if(k<7){for(var r=7;r<=this.monthsInYear(E);r++)n+=this.daysInMonth(E,r);for(var r=1;r=this.toJD(k===-1?1:k+1,7,1);)k++;for(var l=Ethis.toJD(k,l,this.daysInMonth(k,l));)l++;var e=E-this.toJD(k,l,1)+1;return this.newDate(k,l,e)}});function x(E,k){return E-k*Math.floor(E/k)}J.calendars.hebrew=v}}),rI=Ee({"node_modules/world-calendars/dist/calendars/islamic.js"(){var J=kf(),H=Lc();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,H(v.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012Bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(x){var E=this._validate(x,this.minMonth,this.minDay,J.local.invalidYear);return(E.year()*11+14)%30<11},weekOfYear:function(x,E,k){var l=this.newDate(x,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(x){return this.leapYear(x)?355:354},daysInMonth:function(x,E){var k=this._validate(x,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===12&&this.leapYear(k.year())?1:0)},weekDay:function(x,E,k){return this.dayOfWeek(x,E,k)!==5},toJD:function(x,E,k){var l=this._validate(x,E,k,J.local.invalidDate);return x=l.year(),E=l.month(),k=l.day(),x=x<=0?x+1:x,k+Math.ceil(29.5*(E-1))+(x-1)*354+Math.floor((3+11*x)/30)+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x)+.5;var E=Math.floor((30*(x-this.jdEpoch)+10646)/10631);E=E<=0?E-1:E;var k=Math.min(12,Math.ceil((x-29-this.toJD(E,1,1))/29.5)+1),l=x-this.toJD(E,k,1)+1;return this.newDate(E,k,l)}}),J.calendars.islamic=v}}),aI=Ee({"node_modules/world-calendars/dist/calendars/julian.js"(){var J=kf(),H=Lc();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,H(v.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()<0?E.year()+1:E.year();return k%4===0},weekOfYear:function(x,E,k){var l=this.newDate(x,E,k);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(x,E){var k=this._validate(x,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===2&&this.leapYear(k.year())?1:0)},weekDay:function(x,E,k){return(this.dayOfWeek(x,E,k)||7)<6},toJD:function(x,E,k){var l=this._validate(x,E,k,J.local.invalidDate);return x=l.year(),E=l.month(),k=l.day(),x<0&&x++,E<=2&&(x--,E+=12),Math.floor(365.25*(x+4716))+Math.floor(30.6001*(E+1))+k-1524.5},fromJD:function(x){var E=Math.floor(x+.5),k=E+1524,l=Math.floor((k-122.1)/365.25),e=Math.floor(365.25*l),t=Math.floor((k-e)/30.6001),n=t-Math.floor(t<14?1:13),r=l-Math.floor(n>2?4716:4715),a=k-e-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,n,a)}}),J.calendars.julian=v}}),nI=Ee({"node_modules/world-calendars/dist/calendars/mayan.js"(){var J=kf(),H=Lc();function v(k){this.local=this.regionalOptions[k||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,H(v.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),!1},formatYear:function(k){var l=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear);k=l.year();var e=Math.floor(k/400);k=k%400,k+=k<0?400:0;var t=Math.floor(k/20);return e+"."+t+"."+k%20},forYear:function(k){if(k=k.split("."),k.length<3)throw"Invalid Mayan year";for(var l=0,e=0;e19||e>0&&t<0)throw"Invalid Mayan year";l=l*20+t}return l},monthsInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),18},weekOfYear:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),0},daysInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),360},daysInMonth:function(k,l){return this._validate(k,l,this.minDay,J.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()},weekDay:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),!0},extraInfo:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate),n=t.toJD(),r=this._toHaab(n),a=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[a[0]-1],tzolkinDay:a[0],tzolkinTrecena:a[1]}},_toHaab:function(k){k-=this.jdEpoch;var l=x(k+8+17*20,365);return[Math.floor(l/20)+1,x(l,20)]},_toTzolkin:function(k){return k-=this.jdEpoch,[E(k+20,20),E(k+4,13)]},toJD:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()+t.month()*20+t.year()*360+this.jdEpoch},fromJD:function(k){k=Math.floor(k)+.5-this.jdEpoch;var l=Math.floor(k/360);k=k%360,k+=k<0?360:0;var e=Math.floor(k/20),t=k%20;return this.newDate(l,e,t)}});function x(k,l){return k-l*Math.floor(k/l)}function E(k,l){return x(k-1,l)+1}J.calendars.mayan=v}}),iI=Ee({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var J=kf(),H=Lc();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar;var x=J.instance("gregorian");H(v.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear);return x.leapYear(k.year()+(k.year()<1?1:0)+1469)},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidMonth),t=e.year();t<0&&t++;for(var n=e.day(),r=1;r=this.toJD(k+1,1,1);)k++;for(var l=E-Math.floor(this.toJD(k,1,1)+.5)+1,e=1;l>this.daysInMonth(k,e);)l-=this.daysInMonth(k,e),e++;return this.newDate(k,e,l)}}),J.calendars.nanakshahi=v}}),oI=Ee({"node_modules/world-calendars/dist/calendars/nepali.js"(){var J=kf(),H=Lc();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,H(v.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(x){return this.daysInYear(x)!==this.daysPerYear},weekOfYear:function(x,E,k){var l=this.newDate(x,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(x){var E=this._validate(x,this.minMonth,this.minDay,J.local.invalidYear);if(x=E.year(),typeof this.NEPALI_CALENDAR_DATA[x]>"u")return this.daysPerYear;for(var k=0,l=this.minMonth;l<=12;l++)k+=this.NEPALI_CALENDAR_DATA[x][l];return k},daysInMonth:function(x,E){return x.year&&(E=x.month(),x=x.year()),this._validate(x,E,this.minDay,J.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[x]>"u"?this.daysPerMonth[E-1]:this.NEPALI_CALENDAR_DATA[x][E]},weekDay:function(x,E,k){return this.dayOfWeek(x,E,k)!==6},toJD:function(x,E,k){var l=this._validate(x,E,k,J.local.invalidDate);x=l.year(),E=l.month(),k=l.day();var e=J.instance(),t=0,n=E,r=x;this._createMissingCalendarData(x);var a=x-(n>9||n===9&&k>=this.NEPALI_CALENDAR_DATA[r][0]?56:57);for(E!==9&&(t=k,n--);n!==9;)n<=0&&(n=12,r--),t+=this.NEPALI_CALENDAR_DATA[r][n],n--;return E===9?(t+=k-this.NEPALI_CALENDAR_DATA[r][0],t<0&&(t+=e.daysInYear(a))):t+=this.NEPALI_CALENDAR_DATA[r][9]-this.NEPALI_CALENDAR_DATA[r][0],e.newDate(a,1,1).add(t,"d").toJD()},fromJD:function(x){var E=J.instance(),k=E.fromJD(x),l=k.year(),e=k.dayOfYear(),t=l+56;this._createMissingCalendarData(t);for(var n=9,r=this.NEPALI_CALENDAR_DATA[t][0],a=this.NEPALI_CALENDAR_DATA[t][n]-r+1;e>a;)n++,n>12&&(n=1,t++),a+=this.NEPALI_CALENDAR_DATA[t][n];var o=this.NEPALI_CALENDAR_DATA[t][n]-(a-e);return this.newDate(t,n,o)},_createMissingCalendarData:function(x){var E=this.daysPerMonth.slice(0);E.unshift(17);for(var k=x-1;k"u"&&(this.NEPALI_CALENDAR_DATA[k]=E)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),J.calendars.nepali=v}}),sI=Ee({"node_modules/world-calendars/dist/calendars/persian.js"(){var J=kf(),H=Lc();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}function x(E){var k=E-475;E<0&&k++;var l=.242197,e=l*k,t=l*(k+1),n=e-Math.floor(e),r=t-Math.floor(t);return n>r}v.prototype=new J.baseCalendar,H(v.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return x(k.year())},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=0;if(E>0)for(var n=1;n0?E-1:E)*365+t+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E)+.5;var k=475+(E-this.toJD(475,1,1))/365.242197,l=Math.floor(k);l<=0&&l--,E>this.toJD(l,12,x(l)?30:29)&&(l++,l===0&&l++);var e=E-this.toJD(l,1,1)+1,t=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),n=E-this.toJD(l,t,1)+1;return this.newDate(l,t,n)}}),J.calendars.persian=v,J.calendars.jalali=v}}),lI=Ee({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var J=kf(),H=Lc(),v=J.instance();function x(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}x.prototype=new J.baseCalendar,H(x.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return v.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return v.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return v.toJD(t,e.month(),e.day())},fromJD:function(E){var k=v.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)},_g2tYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)}}),J.calendars.taiwan=x}}),uI=Ee({"node_modules/world-calendars/dist/calendars/thai.js"(){var J=kf(),H=Lc(),v=J.instance();function x(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}x.prototype=new J.baseCalendar,H(x.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return v.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return v.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return v.toJD(t,e.month(),e.day())},fromJD:function(E){var k=v.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)},_g2tYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)}}),J.calendars.thai=x}}),cI=Ee({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var J=kf(),H=Lc();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,H(v.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this.daysInYear(k.year())===355},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){for(var k=0,l=1;l<=12;l++)k+=this.daysInMonth(E,l);return k},daysInMonth:function(E,k){for(var l=this._validate(E,k,this.minDay,J.local.invalidMonth),e=l.toJD()-24e5+.5,t=0,n=0;ne)return x[t]-x[t-1];t++}return 30},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate),t=12*(e.year()-1)+e.month()-15292,n=e.day()+x[t-1]-1;return n+24e5-.5},fromJD:function(E){for(var k=E-24e5+.5,l=0,e=0;ek);e++)l++;var t=l+15292,n=Math.floor((t-1)/12),r=n+1,a=t-12*n,o=k-x[l-1]+1;return this.newDate(r,a,o)},isValid:function(E,k,l){var e=J.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(E=E.year!=null?E.year:E,e=E>=1276&&E<=1500),e},_validate:function(E,k,l,e){var t=J.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw e.replace(/\{0\}/,this.local.name);return t}}),J.calendars.ummalqura=v;var x=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]}}),fI=Ee({"src/components/calendars/calendars.js"(J,H){"use strict";H.exports=kf(),ZD(),KD(),JD(),QD(),eI(),tI(),rI(),aI(),nI(),iI(),oI(),sI(),lI(),uI(),cI()}}),hI=Ee({"src/components/calendars/index.js"(J,H){"use strict";var v=fI(),x=Vr(),E=Qi(),k=E.EPOCHJD,l=E.ONEDAY,e={valType:"enumerated",values:x.sortObjectKeys(v.calendars),editType:"calc",dflt:"gregorian"},t=function(_,w,h,u){var A={};return A[h]=e,x.coerce(_,w,A,h,u)},n=function(_,w,h,u){for(var A=0;A{Xt.preventDefault(),Xt.stopPropagation(),Xt.clipboardData.setData("text",st),ft.removeEventListener("copy",Lt,!0)};ft.addEventListener("copy",Lt,!0),document.execCommand("copy")}xt.copyText=be})(aA||(aA={}));var Rl;(function(xt){function be(Xt){let Hr=window.getComputedStyle(Xt),Cr=parseFloat(Hr.borderTopWidth)||0,jr=parseFloat(Hr.borderLeftWidth)||0,Jr=parseFloat(Hr.borderRightWidth)||0,zr=parseFloat(Hr.borderBottomWidth)||0,Gr=parseFloat(Hr.paddingTop)||0,ta=parseFloat(Hr.paddingLeft)||0,Yr=parseFloat(Hr.paddingRight)||0,Nr=parseFloat(Hr.paddingBottom)||0,Qr=jr+ta+Yr+Jr,Sa=Cr+Gr+Nr+zr;return{borderTop:Cr,borderLeft:jr,borderRight:Jr,borderBottom:zr,paddingTop:Gr,paddingLeft:ta,paddingRight:Yr,paddingBottom:Nr,horizontalSum:Qr,verticalSum:Sa}}xt.boxSizing=be;function st(Xt){let Hr=window.getComputedStyle(Xt),Cr=parseFloat(Hr.minWidth)||0,jr=parseFloat(Hr.minHeight)||0,Jr=parseFloat(Hr.maxWidth)||1/0,zr=parseFloat(Hr.maxHeight)||1/0;return Jr=Math.max(Cr,Jr),zr=Math.max(jr,zr),{minWidth:Cr,minHeight:jr,maxWidth:Jr,maxHeight:zr}}xt.sizeLimits=st;function ft(Xt,Hr,Cr){let jr=Xt.getBoundingClientRect();return Hr>=jr.left&&Hr=jr.top&&Cr=Cr.bottom)){if(jr.topCr.bottom&&jr.height>=Cr.height){Xt.scrollTop-=Cr.top-jr.top;return}if(jr.topCr.height){Xt.scrollTop-=Cr.bottom-jr.bottom;return}if(jr.bottom>Cr.bottom&&jr.height{let zr=Element.prototype;return zr.matches||zr.matchesSelector||zr.mozMatchesSelector||zr.msMatchesSelector||zr.oMatchesSelector||zr.webkitMatchesSelector||function(Gr){let ta=this,Yr=ta.ownerDocument?ta.ownerDocument.querySelectorAll(Gr):[];return Array.prototype.indexOf.call(Yr,ta)!==-1}})();function be(zr){zr=zr.split(",",1)[0];let Gr=0,ta=0,Yr=0;function Nr(Qr){let Sa=zr.match(Qr);return Sa===null?!1:(zr=zr.slice(Sa[0].length),!0)}for(zr=zr.replace(Jr," $1 ");zr.length>0;){if(Nr(st)){Gr++;continue}if(Nr(ft)){ta++;continue}if(Nr(Lt)){ta++;continue}if(Nr(Hr)){Yr++;continue}if(Nr(Cr)){ta++;continue}if(Nr(Xt)){Yr++;continue}if(!Nr(jr))return 0}return Gr=Math.min(Gr,255),ta=Math.min(ta,255),Yr=Math.min(Yr,255),Gr<<16|ta<<8|Yr}xt.calculateSingle=be;let st=/^#[^\s\+>~#\.\[:]+/,ft=/^\.[^\s\+>~#\.\[:]+/,Lt=/^\[[^\]]+\]/,Xt=/^[^\s\+>~#\.\[:]+/,Hr=/^(::[^\s\+>~#\.\[:]+|:first-line|:first-letter|:before|:after)/,Cr=/^:[^\s\+>~#\.\[:]+/,jr=/^[\s\+>~\*]+/,Jr=/:not\(([^\)]+)\)/g})(kh||(kh={}));var ud=sd(yv());var Ep=class{constructor(){this._first=null,this._last=null,this._size=0}get isEmpty(){return this._size===0}get size(){return this._size}get length(){return this._size}get first(){return this._first?this._first.value:void 0}get last(){return this._last?this._last.value:void 0}get firstNode(){return this._first}get lastNode(){return this._last}*[Symbol.iterator](){let be=this._first;for(;be;)yield be.value,be=be.next}*retro(){let be=this._last;for(;be;)yield be.value,be=be.prev}*nodes(){let be=this._first;for(;be;)yield be,be=be.next}*retroNodes(){let be=this._last;for(;be;)yield be,be=be.prev}assign(be){this.clear();for(let st of be)this.addLast(st)}push(be){this.addLast(be)}pop(){return this.removeLast()}shift(be){this.addFirst(be)}unshift(){return this.removeFirst()}addFirst(be){let st=new ld.LinkedListNode(this,be);return this._first?(st.next=this._first,this._first.prev=st,this._first=st):(this._first=st,this._last=st),this._size++,st}addLast(be){let st=new ld.LinkedListNode(this,be);return this._last?(st.prev=this._last,this._last.next=st,this._last=st):(this._first=st,this._last=st),this._size++,st}insertBefore(be,st){if(!st||st===this._first)return this.addFirst(be);if(!(st instanceof ld.LinkedListNode)||st.list!==this)throw new Error("Reference node is not owned by the list.");let ft=new ld.LinkedListNode(this,be),Lt=st,Xt=Lt.prev;return ft.next=Lt,ft.prev=Xt,Lt.prev=ft,Xt.next=ft,this._size++,ft}insertAfter(be,st){if(!st||st===this._last)return this.addLast(be);if(!(st instanceof ld.LinkedListNode)||st.list!==this)throw new Error("Reference node is not owned by the list.");let ft=new ld.LinkedListNode(this,be),Lt=st,Xt=Lt.next;return ft.next=Xt,ft.prev=Lt,Lt.next=ft,Xt.prev=ft,this._size++,ft}removeFirst(){let be=this._first;if(be)return be===this._last?(this._first=null,this._last=null):(this._first=be.next,this._first.prev=null),be.list=null,be.next=null,be.prev=null,this._size--,be.value}removeLast(){let be=this._last;if(be)return be===this._first?(this._first=null,this._last=null):(this._last=be.prev,this._last.next=null),be.list=null,be.next=null,be.prev=null,this._size--,be.value}removeNode(be){if(!(be instanceof ld.LinkedListNode)||be.list!==this)throw new Error("Node is not owned by the list.");let st=be;st===this._first&&st===this._last?(this._first=null,this._last=null):st===this._first?(this._first=st.next,this._first.prev=null):st===this._last?(this._last=st.prev,this._last.next=null):(st.next.prev=st.prev,st.prev.next=st.next),st.list=null,st.next=null,st.prev=null,this._size--}clear(){let be=this._first;for(;be;){let st=be.next;be.list=null,be.prev=null,be.next=null,be=st}this._first=null,this._last=null,this._size=0}};(function(xt){function be(st){let ft=new xt;return ft.assign(st),ft}xt.from=be})(Ep||(Ep={}));var ld;(function(xt){class be{constructor(ft,Lt){this.list=null,this.next=null,this.prev=null,this.list=ft,this.value=Lt}}xt.LinkedListNode=be})(ld||(ld={}));var Xf=class{constructor(be){this.type=be}get isConflatable(){return!1}conflate(be){return!1}},Ud=class extends Xf{get isConflatable(){return!0}conflate(be){return!0}},$i;(function(xt){let be=null,st=(ai=>qi=>{let Tn=!1;return ai.then(()=>!Tn&&qi()),()=>{Tn=!0}})(Promise.resolve());function ft(ai,qi){let Tn=ta.get(ai);if(!Tn||Tn.length===0){Da(ai,qi);return}(0,ud.every)((0,ud.retro)(Tn),ki=>ki?Sa(ki,ai,qi):!0)&&Da(ai,qi)}xt.sendMessage=ft;function Lt(ai,qi){if(!qi.isConflatable){Ee(ai,qi);return}(0,ud.some)(Gr,Va=>Va.handler!==ai||!Va.msg||Va.msg.type!==qi.type||!Va.msg.isConflatable?!1:Va.msg.conflate(qi))||Ee(ai,qi)}xt.postMessage=Lt;function Xt(ai,qi){let Tn=ta.get(ai);Tn&&Tn.indexOf(qi)!==-1||(Tn?Tn.push(qi):ta.set(ai,[qi]))}xt.installMessageHook=Xt;function Hr(ai,qi){let Tn=ta.get(ai);if(!Tn)return;let Va=Tn.indexOf(qi);Va!==-1&&(Tn[Va]=null,Ga(Tn))}xt.removeMessageHook=Hr;function Cr(ai){let qi=ta.get(ai);qi&&qi.length>0&&(ud.ArrayExt.fill(qi,null),Ga(qi));for(let Tn of Gr)Tn.handler===ai&&(Tn.handler=null,Tn.msg=null)}xt.clearData=Cr;function jr(){Qr||be===null||(be(),be=null,Qr=!0,ga(),Qr=!1)}xt.flush=jr;function Jr(){return Nr}xt.getExceptionHandler=Jr;function zr(ai){let qi=Nr;return Nr=ai,qi}xt.setExceptionHandler=zr;let Gr=new Ep,ta=new WeakMap,Yr=new Set,Nr=ai=>{console.error(ai)},Qr=!1;function Sa(ai,qi,Tn){let Va=!0;try{typeof ai=="function"?Va=ai(qi,Tn):Va=ai.messageHook(qi,Tn)}catch(ki){Nr(ki)}return Va}function Da(ai,qi){try{ai.processMessage(qi)}catch(Tn){Nr(Tn)}}function Ee(ai,qi){Gr.addLast({handler:ai,msg:qi}),be===null&&(be=st(ga))}function ga(){if(be=null,Gr.isEmpty)return;let ai={handler:null,msg:null};for(Gr.addLast(ai);;){let qi=Gr.removeFirst();if(qi===ai)return;qi.handler&&qi.msg&&ft(qi.handler,qi.msg)}}function Ga(ai){Yr.size===0&&st(Wa),Yr.add(ai)}function Wa(){Yr.forEach(tn),Yr.clear()}function tn(ai){ud.ArrayExt.removeAllWhere(ai,ri)}function ri(ai){return ai===null}})($i||($i={}));var $f=class{constructor(be){this._pid=_v.nextPID(),this.name=be.name,this._create=be.create,this._coerce=be.coerce||null,this._compare=be.compare||null,this._changed=be.changed||null}get(be){let st,ft=_v.ensureMap(be);return this._pid in ft?st=ft[this._pid]:st=ft[this._pid]=this._createValue(be),st}set(be,st){let ft,Lt=_v.ensureMap(be);this._pid in Lt?ft=Lt[this._pid]:ft=Lt[this._pid]=this._createValue(be);let Xt=this._coerceValue(be,st);this._maybeNotify(be,ft,Lt[this._pid]=Xt)}coerce(be){let st,ft=_v.ensureMap(be);this._pid in ft?st=ft[this._pid]:st=ft[this._pid]=this._createValue(be);let Lt=this._coerceValue(be,st);this._maybeNotify(be,st,ft[this._pid]=Lt)}_createValue(be){let st=this._create;return st(be)}_coerceValue(be,st){let ft=this._coerce;return ft?ft(be,st):st}_compareValue(be,st){let ft=this._compare;return ft?ft(be,st):be===st}_maybeNotify(be,st,ft){let Lt=this._changed;Lt&&!this._compareValue(st,ft)&&Lt(be,st,ft)}};(function(xt){function be(st){_v.ownerData.delete(st)}xt.clearData=be})($f||($f={}));var _v;(function(xt){xt.ownerData=new WeakMap,xt.nextPID=(()=>{let st=0;return()=>`pid-${`${Math.random()}`.slice(2)}-${st++}`})();function be(st){let ft=xt.ownerData.get(st);return ft||(ft=Object.create(null),xt.ownerData.set(st,ft),ft)}xt.ensureMap=be})(_v||(_v={}));var dg=sd(yv()),ZF=sd(hg()),Ml=class{constructor(be){this.sender=be}connect(be,st){return oh.connect(this,be,st)}disconnect(be,st){return oh.disconnect(this,be,st)}emit(be){oh.emit(this,be)}};(function(xt){function be(jr,Jr){oh.disconnectBetween(jr,Jr)}xt.disconnectBetween=be;function st(jr){oh.disconnectSender(jr)}xt.disconnectSender=st;function ft(jr){oh.disconnectReceiver(jr)}xt.disconnectReceiver=ft;function Lt(jr){oh.disconnectAll(jr)}xt.disconnectAll=Lt;function Xt(jr){oh.disconnectAll(jr)}xt.clearData=Xt;function Hr(){return oh.exceptionHandler}xt.getExceptionHandler=Hr;function Cr(jr){let Jr=oh.exceptionHandler;return oh.exceptionHandler=jr,Jr}xt.setExceptionHandler=Cr})(Ml||(Ml={}));var oh;(function(xt){xt.exceptionHandler=Ee=>{console.error(Ee)};function be(Ee,ga,Ga){Ga=Ga||void 0;let Wa=jr.get(Ee.sender);if(Wa||(Wa=[],jr.set(Ee.sender,Wa)),ta(Wa,Ee,ga,Ga))return!1;let tn=Ga||ga,ri=Jr.get(tn);ri||(ri=[],Jr.set(tn,ri));let ai={signal:Ee,slot:ga,thisArg:Ga};return Wa.push(ai),ri.push(ai),!0}xt.connect=be;function st(Ee,ga,Ga){Ga=Ga||void 0;let Wa=jr.get(Ee.sender);if(!Wa||Wa.length===0)return!1;let tn=ta(Wa,Ee,ga,Ga);if(!tn)return!1;let ri=Ga||ga,ai=Jr.get(ri);return tn.signal=null,Nr(Wa),Nr(ai),!0}xt.disconnect=st;function ft(Ee,ga){let Ga=jr.get(Ee);if(!Ga||Ga.length===0)return;let Wa=Jr.get(ga);if(!(!Wa||Wa.length===0)){for(let tn of Wa)tn.signal&&tn.signal.sender===Ee&&(tn.signal=null);Nr(Ga),Nr(Wa)}}xt.disconnectBetween=ft;function Lt(Ee){let ga=jr.get(Ee);if(!(!ga||ga.length===0)){for(let Ga of ga){if(!Ga.signal)continue;let Wa=Ga.thisArg||Ga.slot;Ga.signal=null,Nr(Jr.get(Wa))}Nr(ga)}}xt.disconnectSender=Lt;function Xt(Ee){let ga=Jr.get(Ee);if(!(!ga||ga.length===0)){for(let Ga of ga){if(!Ga.signal)continue;let Wa=Ga.signal.sender;Ga.signal=null,Nr(jr.get(Wa))}Nr(ga)}}xt.disconnectReceiver=Xt;function Hr(Ee){Lt(Ee),Xt(Ee)}xt.disconnectAll=Hr;function Cr(Ee,ga){let Ga=jr.get(Ee.sender);if(!(!Ga||Ga.length===0))for(let Wa=0,tn=Ga.length;Watn.signal===ga&&tn.slot===Ga&&tn.thisArg===Wa)}function Yr(Ee,ga){let{signal:Ga,slot:Wa,thisArg:tn}=Ee;try{Wa.call(tn,Ga.sender,ga)}catch(ri){xt.exceptionHandler(ri)}}function Nr(Ee){zr.size===0&&Gr(Qr),zr.add(Ee)}function Qr(){zr.forEach(Sa),zr.clear()}function Sa(Ee){dg.ArrayExt.removeAllWhere(Ee,Da)}function Da(Ee){return Ee.signal===null}})(oh||(oh={}));var qd=class{constructor(be){this._fn=be}get isDisposed(){return!this._fn}dispose(){if(!this._fn)return;let be=this._fn;this._fn=null,be()}};var C0=class{constructor(){this._isDisposed=!1,this._items=new Set}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._items.forEach(be=>{be.dispose()}),this._items.clear())}contains(be){return this._items.has(be)}add(be){this._items.add(be)}remove(be){this._items.delete(be)}clear(){this._items.clear()}};(function(xt){function be(st){let ft=new xt;for(let Lt of st)ft.add(Lt);return ft}xt.from=be})(C0||(C0={}));var vg=class extends C0{constructor(){super(...arguments),this._disposed=new Ml(this)}get disposed(){return this._disposed}dispose(){this.isDisposed||(super.dispose(),this._disposed.emit(void 0),Ml.clearData(this))}};(function(xt){function be(st){let ft=new xt;for(let Lt of st)ft.add(Lt);return ft}xt.from=be})(vg||(vg={}));var Zf=class xt{constructor(be){this._onScrollFrame=()=>{if(!this._scrollTarget)return;let{element:st,edge:ft,distance:Lt}=this._scrollTarget,Xt=Uf.SCROLL_EDGE_SIZE-Lt,Hr=Math.pow(Xt/Uf.SCROLL_EDGE_SIZE,2),Cr=Math.max(1,Math.round(Hr*Uf.SCROLL_EDGE_SIZE));switch(ft){case"top":st.scrollTop-=Cr;break;case"left":st.scrollLeft-=Cr;break;case"right":st.scrollLeft+=Cr;break;case"bottom":st.scrollTop+=Cr;break}requestAnimationFrame(this._onScrollFrame)},this._disposed=!1,this._dropAction="none",this._override=null,this._currentTarget=null,this._currentElement=null,this._promise=null,this._scrollTarget=null,this._resolve=null,this.document=be.document||document,this.mimeData=be.mimeData,this.dragImage=be.dragImage||null,this.proposedAction=be.proposedAction||"copy",this.supportedActions=be.supportedActions||"all",this.source=be.source||null}dispose(){if(!this._disposed){if(this._disposed=!0,this._currentTarget){let be=new PointerEvent("pointerup",{bubbles:!0,cancelable:!0,clientX:-1,clientY:-1});Uf.dispatchDragLeave(this,this._currentTarget,null,be)}this._finalize("none")}}get isDisposed(){return this._disposed}start(be,st){if(this._disposed)return Promise.resolve("none");if(this._promise)return this._promise;this._addListeners(),this._attachDragImage(be,st),this._promise=new Promise(Lt=>{this._resolve=Lt});let ft=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:be,clientY:st});return document.dispatchEvent(ft),this._promise}handleEvent(be){switch(be.type){case"pointermove":this._evtPointerMove(be);break;case"pointerup":this._evtPointerUp(be);break;case"keydown":this._evtKeyDown(be);break;default:be.preventDefault(),be.stopPropagation();break}}moveDragImage(be,st){if(!this.dragImage)return;let ft=this.dragImage.style;ft.transform=`translate(${be}px, ${st}px)`}_evtPointerMove(be){be.preventDefault(),be.stopPropagation(),this._updateCurrentTarget(be),this._updateDragScroll(be),this.moveDragImage(be.clientX,be.clientY)}_evtPointerUp(be){if(be.preventDefault(),be.stopPropagation(),be.button!==0)return;if(this._updateCurrentTarget(be),!this._currentTarget){this._finalize("none");return}if(this._dropAction==="none"){Uf.dispatchDragLeave(this,this._currentTarget,null,be),this._finalize("none");return}let st=Uf.dispatchDrop(this,this._currentTarget,be);this._finalize(st)}_evtKeyDown(be){be.preventDefault(),be.stopPropagation(),be.keyCode===27&&this.dispose()}_addListeners(){document.addEventListener("pointerdown",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("pointerup",this,!0),document.addEventListener("pointerenter",this,!0),document.addEventListener("pointerleave",this,!0),document.addEventListener("pointerover",this,!0),document.addEventListener("pointerout",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("keyup",this,!0),document.addEventListener("keypress",this,!0),document.addEventListener("contextmenu",this,!0)}_removeListeners(){document.removeEventListener("pointerdown",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointerenter",this,!0),document.removeEventListener("pointerleave",this,!0),document.removeEventListener("pointerover",this,!0),document.removeEventListener("pointerout",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("keyup",this,!0),document.removeEventListener("keypress",this,!0),document.removeEventListener("contextmenu",this,!0)}_updateDragScroll(be){let st=Uf.findScrollTarget(be);!this._scrollTarget&&!st||(this._scrollTarget||setTimeout(this._onScrollFrame,500),this._scrollTarget=st)}_updateCurrentTarget(be){let st=this._currentTarget,ft=this._currentTarget,Lt=this._currentElement,Xt=Uf.findElementBehindBackdrop(be,this.document);this._currentElement=Xt,Xt!==Lt&&Xt!==ft&&Uf.dispatchDragExit(this,ft,Xt,be),Xt!==Lt&&Xt!==ft&&(ft=Uf.dispatchDragEnter(this,Xt,ft,be)),ft!==st&&(this._currentTarget=ft,Uf.dispatchDragLeave(this,st,ft,be));let Hr=Uf.dispatchDragOver(this,ft,be);this._setDropAction(Hr)}_attachDragImage(be,st){if(!this.dragImage)return;this.dragImage.classList.add("lm-mod-drag-image");let ft=this.dragImage.style;ft.pointerEvents="none",ft.position="fixed",ft.transform=`translate(${be}px, ${st}px)`,(this.document instanceof Document?this.document.body:this.document.firstElementChild).appendChild(this.dragImage)}_detachDragImage(){if(!this.dragImage)return;let be=this.dragImage.parentNode;be&&be.removeChild(this.dragImage)}_setDropAction(be){if(be=Uf.validateAction(be,this.supportedActions),!(this._override&&this._dropAction===be))switch(be){case"none":this._dropAction=be,this._override=xt.overrideCursor("no-drop",this.document);break;case"copy":this._dropAction=be,this._override=xt.overrideCursor("copy",this.document);break;case"link":this._dropAction=be,this._override=xt.overrideCursor("alias",this.document);break;case"move":this._dropAction=be,this._override=xt.overrideCursor("move",this.document);break}}_finalize(be){let st=this._resolve;this._removeListeners(),this._detachDragImage(),this._override&&(this._override.dispose(),this._override=null),this.mimeData.clear(),this._disposed=!0,this._dropAction="none",this._currentTarget=null,this._currentElement=null,this._scrollTarget=null,this._promise=null,this._resolve=null,st&&st(be)}};(function(xt){class be extends DragEvent{constructor(Lt,Xt){super(Xt.type,{bubbles:!0,cancelable:!0,altKey:Lt.altKey,button:Lt.button,clientX:Lt.clientX,clientY:Lt.clientY,ctrlKey:Lt.ctrlKey,detail:0,metaKey:Lt.metaKey,relatedTarget:Xt.related,screenX:Lt.screenX,screenY:Lt.screenY,shiftKey:Lt.shiftKey,view:window});let{drag:Hr}=Xt;this.dropAction="none",this.mimeData=Hr.mimeData,this.proposedAction=Hr.proposedAction,this.supportedActions=Hr.supportedActions,this.source=Hr.source}}xt.Event=be;function st(ft,Lt=document){return Uf.overrideCursor(ft,Lt)}xt.overrideCursor=st})(Zf||(Zf={}));var Uf;(function(xt){xt.SCROLL_EDGE_SIZE=20;function be(Ga,Wa){return Gr[Ga]&ta[Wa]?Ga:"none"}xt.validateAction=be;function st(Ga,Wa=document){if(Ga){if(ft&&Ga==ft.event)return ft.element;xt.cursorBackdrop.style.zIndex="-1000";let tn=Wa.elementFromPoint(Ga.clientX,Ga.clientY);return xt.cursorBackdrop.style.zIndex="",ft={event:Ga,element:tn},tn}else{let tn=xt.cursorBackdrop.style.transform;if(Lt&&tn===Lt.transform)return Lt.element;let ri=xt.cursorBackdrop.getBoundingClientRect();xt.cursorBackdrop.style.zIndex="-1000";let ai=Wa.elementFromPoint(ri.left+ri.width/2,ri.top+ri.height/2);return xt.cursorBackdrop.style.zIndex="",Lt={transform:tn,element:ai},ai}}xt.findElementBehindBackdrop=st;let ft=null,Lt=null;function Xt(Ga){let Wa=Ga.clientX,tn=Ga.clientY,ri=st(Ga);for(;ri;ri=ri.parentElement){if(!ri.hasAttribute("data-lm-dragscroll"))continue;let ai=0,qi=0;ri===document.body&&(ai=window.pageXOffset,qi=window.pageYOffset);let Tn=ri.getBoundingClientRect(),Va=Tn.top+qi,ki=Tn.left+ai,ji=ki+Tn.width,ls=Va+Tn.height;if(Wa=ji||tn=ls)continue;let Ys=Wa-ki+1,mi=tn-Va+1,Qi=ji-Wa,iu=ls-tn,Us=Math.min(Ys,mi,Qi,iu);if(Us>xt.SCROLL_EDGE_SIZE)continue;let vs;switch(Us){case iu:vs="bottom";break;case mi:vs="top";break;case Qi:vs="right";break;case Ys:vs="left";break;default:throw"unreachable"}let dl=ri.scrollWidth-ri.clientWidth,ec=ri.scrollHeight-ri.clientHeight,Ec;switch(vs){case"top":Ec=ec>0&&ri.scrollTop>0;break;case"left":Ec=dl>0&&ri.scrollLeft>0;break;case"right":Ec=dl>0&&ri.scrollLeft0&&ri.scrollTop{tn===ga&&xt.cursorBackdrop.isConnected&&(document.removeEventListener("pointermove",Nr,!0),xt.cursorBackdrop.removeEventListener("scroll",Qr,!0),ri.removeChild(xt.cursorBackdrop))})}xt.overrideCursor=Yr;function Nr(Ga){xt.cursorBackdrop&&(xt.cursorBackdrop.style.transform=`translate(${Ga.clientX}px, ${Ga.clientY}px)`)}function Qr(Ga){if(!xt.cursorBackdrop)return;let Wa=st();if(!Wa)return;let tn=Wa.closest("[data-lm-dragscroll]");tn&&(tn.scrollTop+=xt.cursorBackdrop.scrollTop-Da,tn.scrollLeft+=xt.cursorBackdrop.scrollLeft-Da,Sa())}function Sa(){xt.cursorBackdrop.scrollTop=Da,xt.cursorBackdrop.scrollLeft=Da}let Da=500;function Ee(){let Ga=document.createElement("div");return Ga.classList.add("lm-cursor-backdrop"),Ga}let ga=0;xt.cursorBackdrop=Ee()})(Uf||(Uf={}));var nA=sd(yv()),Af=sd(hg());function kp(){return ib.keyboardLayout}var L0=class xt{constructor(be,st,ft=[]){this.name=be,this._codes=st,this._keys=xt.extractKeys(st),this._modifierKeys=xt.convertToKeySet(ft)}keys(){return Object.keys(this._keys)}isValidKey(be){return be in this._keys}isModifierKey(be){return be in this._modifierKeys}keyForKeydownEvent(be){return this._codes[be.keyCode]||""}};(function(xt){function be(ft){let Lt=Object.create(null);for(let Xt in ft)Lt[ft[Xt]]=!0;return Lt}xt.extractKeys=be;function st(ft){let Lt=Object(null);for(let Xt=0,Hr=ft.length;Xt{this._commands.delete(be),this._commandChanged.emit({id:be,type:"removed"})})}notifyCommandChanged(be){if(be!==void 0&&!this._commands.has(be))throw new Error(`Command '${be}' is not registered.`);this._commandChanged.emit({id:be,type:be?"changed":"many-changed"})}describedBy(be,st=Af.JSONExt.emptyObject){var ft;let Lt=this._commands.get(be);return Promise.resolve((ft=Lt?.describedBy.call(void 0,st))!==null&&ft!==void 0?ft:{args:null})}label(be,st=Af.JSONExt.emptyObject){var ft;let Lt=this._commands.get(be);return(ft=Lt?.label.call(void 0,st))!==null&&ft!==void 0?ft:""}mnemonic(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.mnemonic.call(void 0,st):-1}icon(be,st=Af.JSONExt.emptyObject){var ft;return(ft=this._commands.get(be))===null||ft===void 0?void 0:ft.icon.call(void 0,st)}iconClass(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.iconClass.call(void 0,st):""}iconLabel(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.iconLabel.call(void 0,st):""}caption(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.caption.call(void 0,st):""}usage(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.usage.call(void 0,st):""}className(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.className.call(void 0,st):""}dataset(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.dataset.call(void 0,st):{}}isEnabled(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.isEnabled.call(void 0,st):!1}isToggled(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.isToggled.call(void 0,st):!1}isToggleable(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.isToggleable:!1}isVisible(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.isVisible.call(void 0,st):!1}execute(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);if(!ft)return Promise.reject(new Error(`Command '${be}' not registered.`));let Lt;try{Lt=ft.execute.call(void 0,st)}catch(Hr){Lt=Promise.reject(Hr)}let Xt=Promise.resolve(Lt);return this._commandExecuted.emit({id:be,args:st,result:Xt}),Xt}addKeyBinding(be){let st=Lh.createKeyBinding(be);return this._keyBindings.push(st),this._keyBindingChanged.emit({binding:st,type:"added"}),new qd(()=>{nA.ArrayExt.removeFirstOf(this._keyBindings,st),this._keyBindingChanged.emit({binding:st,type:"removed"})})}processKeydownEvent(be){if(be.defaultPrevented||this._replaying)return;let st=xt.keystrokeForKeydownEvent(be);if(!st){this._replayKeydownEvents(),this._clearPendingState();return}if(xt.isModifierKeyPressed(be)){let{exact:Hr}=Lh.matchKeyBinding(this._keyBindings,[st],be);Hr?(be.preventDefault(),be.stopPropagation(),this._startModifierTimer(Hr)):this._clearModifierTimer();return}this._keystrokes.push(st);let{exact:ft,partial:Lt}=Lh.matchKeyBinding(this._keyBindings,this._keystrokes,be),Xt=Lt.length!==0;if(!ft&&!Xt){this._replayKeydownEvents(),this._clearPendingState();return}if((ft?.preventDefault||Lt.some(Hr=>Hr.preventDefault))&&(be.preventDefault(),be.stopPropagation()),this._keydownEvents.push(be),ft&&!Xt){this._executeKeyBinding(ft),this._clearPendingState();return}ft&&(this._exactKeyMatch=ft),this._startTimer()}holdKeyBindingExecution(be,st){this._holdKeyBindingPromises.set(be,st)}processKeyupEvent(be){this._clearModifierTimer()}_startModifierTimer(be){this._clearModifierTimer(),this._timerModifierID=window.setTimeout(()=>{this._executeKeyBinding(be)},Lh.modifierkeyTimeOut)}_clearModifierTimer(){this._timerModifierID!==0&&(clearTimeout(this._timerModifierID),this._timerModifierID=0)}_startTimer(){this._clearTimer(),this._timerID=window.setTimeout(()=>{this._onPendingTimeout()},Lh.CHORD_TIMEOUT)}_clearTimer(){this._timerID!==0&&(clearTimeout(this._timerID),this._timerID=0)}_replayKeydownEvents(){this._keydownEvents.length!==0&&(this._replaying=!0,this._keydownEvents.forEach(Lh.replayKeyEvent),this._replaying=!1)}async _executeKeyBinding(be){if(this._holdKeyBindingPromises.size!==0){let Xt=[...this._keydownEvents],Hr=(await Promise.race([Promise.all(Xt.map(async Cr=>{var jr;return(jr=this._holdKeyBindingPromises.get(Cr))!==null&&jr!==void 0?jr:Promise.resolve(!0)})),new Promise(Cr=>{setTimeout(()=>Cr([!1]),Lh.KEYBINDING_HOLD_TIMEOUT)})])).every(Boolean);if(this._holdKeyBindingPromises.clear(),!Hr)return}let{command:st,args:ft}=be,Lt={_luminoEvent:{type:"keybinding",keys:be.keys},...ft};if(!this.hasCommand(st)||!this.isEnabled(st,Lt)){let Xt=this.hasCommand(st)?"enabled":"registered",Cr=`Cannot execute key binding '${be.keys.join(", ")}':`,jr=`command '${st}' is not ${Xt}.`;console.warn(`${Cr} ${jr}`);return}await this.execute(st,Lt)}_clearPendingState(){this._clearTimer(),this._clearModifierTimer(),this._exactKeyMatch=null,this._keystrokes.length=0,this._keydownEvents.length=0}_onPendingTimeout(){this._timerID=0,this._exactKeyMatch?this._executeKeyBinding(this._exactKeyMatch):this._replayKeydownEvents(),this._clearPendingState()}};(function(xt){function be(Cr){let jr="",Jr=!1,zr=!1,Gr=!1,ta=!1;for(let Yr of Cr.split(/\s+/))Yr==="Accel"?jf.IS_MAC?zr=!0:Gr=!0:Yr==="Alt"?Jr=!0:Yr==="Cmd"?zr=!0:Yr==="Ctrl"?Gr=!0:Yr==="Shift"?ta=!0:Yr.length>0&&(jr=Yr);return{cmd:zr,ctrl:Gr,alt:Jr,shift:ta,key:jr}}xt.parseKeystroke=be;function st(Cr){let jr="",Jr=be(Cr);return Jr.ctrl&&(jr+="Ctrl "),Jr.alt&&(jr+="Alt "),Jr.shift&&(jr+="Shift "),Jr.cmd&&jf.IS_MAC&&(jr+="Cmd "),Jr.key?jr+Jr.key:jr.trim()}xt.normalizeKeystroke=st;function ft(Cr){let jr;return jf.IS_WIN?jr=Cr.winKeys||Cr.keys:jf.IS_MAC?jr=Cr.macKeys||Cr.keys:jr=Cr.linuxKeys||Cr.keys,jr.map(st)}xt.normalizeKeys=ft;function Lt(Cr){return typeof Cr=="string"?jr(Cr):Cr.map(jr).join(", ");function jr(Jr){let zr=[],Gr=jf.IS_MAC?" ":"+",ta=be(Jr);return ta.ctrl&&zr.push("Ctrl"),ta.alt&&zr.push("Alt"),ta.shift&&zr.push("Shift"),jf.IS_MAC&&ta.cmd&&zr.push("Cmd"),zr.push(ta.key),zr.map(Lh.formatKey).join(Gr)}}xt.formatKeystroke=Lt;function Xt(Cr){let jr=kp(),Jr=jr.keyForKeydownEvent(Cr);return jr.isModifierKey(Jr)}xt.isModifierKeyPressed=Xt;function Hr(Cr){let jr=kp(),Jr=jr.keyForKeydownEvent(Cr),zr=[];return Cr.ctrlKey&&zr.push("Ctrl"),Cr.altKey&&zr.push("Alt"),Cr.shiftKey&&zr.push("Shift"),Cr.metaKey&&jf.IS_MAC&&zr.push("Cmd"),jr.isModifierKey(Jr)||zr.push(Jr),zr.join(" ")}xt.keystrokeForKeydownEvent=Hr})(cd||(cd={}));var Lh;(function(xt){xt.CHORD_TIMEOUT=1e3,xt.KEYBINDING_HOLD_TIMEOUT=1e3,xt.modifierkeyTimeOut=500;function be(ga){return{execute:ga.execute,describedBy:Nr(typeof ga.describedBy=="function"?ga.describedBy:{args:null,...ga.describedBy},()=>({args:null})),label:Nr(ga.label,jr),mnemonic:Nr(ga.mnemonic,Jr),icon:Nr(ga.icon,Yr),iconClass:Nr(ga.iconClass,jr),iconLabel:Nr(ga.iconLabel,jr),caption:Nr(ga.caption,jr),usage:Nr(ga.usage,jr),className:Nr(ga.className,jr),dataset:Nr(ga.dataset,ta),isEnabled:ga.isEnabled||zr,isToggled:ga.isToggled||Gr,isToggleable:ga.isToggleable||!!ga.isToggled,isVisible:ga.isVisible||zr}}xt.createCommand=be;function st(ga){var Ga;return{keys:cd.normalizeKeys(ga),selector:Qr(ga),command:ga.command,args:ga.args||Af.JSONExt.emptyObject,preventDefault:(Ga=ga.preventDefault)!==null&&Ga!==void 0?Ga:!0}}xt.createKeyBinding=st;function ft(ga,Ga,Wa){let tn=null,ri=[],ai=1/0,qi=0;for(let Tn=0,Va=ga.length;Tnai)continue;let Ys=Ch.calculateSpecificity(ki.selector);(!tn||ls=qi)&&(tn=ki,ai=ls,qi=Ys)}return{exact:tn,partial:ri}}xt.matchKeyBinding=ft;function Lt(ga){ga.target.dispatchEvent(Ee(ga))}xt.replayKeyEvent=Lt;function Xt(ga){return jf.IS_MAC?Hr.hasOwnProperty(ga)?Hr[ga]:ga:Cr.hasOwnProperty(ga)?Cr[ga]:ga}xt.formatKey=Xt;let Hr={Backspace:"\u232B",Tab:"\u21E5",Enter:"\u23CE",Shift:"\u21E7",Ctrl:"\u2303",Alt:"\u2325",Escape:"\u238B",PageUp:"\u21DE",PageDown:"\u21DF",End:"\u2198",Home:"\u2196",ArrowLeft:"\u2190",ArrowUp:"\u2191",ArrowRight:"\u2192",ArrowDown:"\u2193",Delete:"\u2326",Cmd:"\u2318"},Cr={Escape:"Esc",PageUp:"Page Up",PageDown:"Page Down",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},jr=()=>"",Jr=()=>-1,zr=()=>!0,Gr=()=>!1,ta=()=>({}),Yr=()=>{};function Nr(ga,Ga){return ga===void 0?Ga:typeof ga=="function"?ga:()=>ga}function Qr(ga){if(ga.selector.indexOf(",")!==-1)throw new Error(`Selector cannot contain commas: ${ga.selector}`);if(!Ch.isValid(ga.selector))throw new Error(`Invalid selector: ${ga.selector}`);return ga.selector}function Sa(ga,Ga){if(ga.lengthGa.length?2:1}function Da(ga,Ga){let Wa=Ga.target,tn=Ga.currentTarget;for(let ri=0;Wa!==null;Wa=Wa.parentElement,++ri){if(Wa.hasAttribute("data-lm-suppress-shortcuts"))return-1;if(Ch.matches(Wa,ga))return ri;if(Wa===tn)return-1}return-1}function Ee(ga){let Ga=document.createEvent("Event"),Wa=ga.bubbles||!0,tn=ga.cancelable||!0;return Ga.initEvent(ga.type||"keydown",Wa,tn),Ga.key=ga.key||"",Ga.keyCode=ga.keyCode||0,Ga.which=ga.keyCode||0,Ga.ctrlKey=ga.ctrlKey||!1,Ga.altKey=ga.altKey||!1,Ga.shiftKey=ga.shiftKey||!1,Ga.metaKey=ga.metaKey||!1,Ga.view=ga.view||window,Ga}})(Lh||(Lh={}));var Cp=sd(yv()),Lp=class{constructor(be){this.type="text",this.content=be}},P0=class{constructor(be,st,ft,Lt){this.type="element",this.tag=be,this.attrs=st,this.children=ft,this.renderer=Lt}};function Sl(xt){let be={},st,ft=[];for(let Xt=1,Hr=arguments.length;Xt=Da.length){st(Qr[Ga],Yr);continue}let Wa=Da[Ga],tn=Qr[Ga];if(Wa===tn){Ee=Ee.nextSibling;continue}if(Wa.type==="text"&&tn.type==="text"){Ee.textContent!==tn.content&&(Ee.textContent=tn.content),Ee=Ee.nextSibling;continue}if(Wa.type==="text"||tn.type==="text"){Cp.ArrayExt.insert(Da,Ga,tn),st(tn,Yr,Ee);continue}if(!Wa.renderer!=!tn.renderer){Cp.ArrayExt.insert(Da,Ga,tn),st(tn,Yr,Ee);continue}let ri=tn.attrs.key;if(ri&&ri in Sa){let qi=Sa[ri];qi.vNode!==Wa&&(Cp.ArrayExt.move(Da,Da.indexOf(qi.vNode,Ga+1),Ga),Yr.insertBefore(qi.element,Ee),Wa=qi.vNode,Ee=qi.element)}if(Wa===tn){Ee=Ee.nextSibling;continue}let ai=Wa.attrs.key;if(ai&&ai!==ri){Cp.ArrayExt.insert(Da,Ga,tn),st(tn,Yr,Ee);continue}if(Wa.tag!==tn.tag){Cp.ArrayExt.insert(Da,Ga,tn),st(tn,Yr,Ee);continue}Cr(Ee,Wa.attrs,tn.attrs),tn.renderer?tn.renderer.render(Ee,{attrs:tn.attrs,children:tn.children}):ft(Ee,Wa.children,tn.children),Ee=Ee.nextSibling}Lt(Yr,Da,ga,!0)}xt.updateContent=ft;function Lt(Yr,Nr,Qr,Sa){for(let Da=Nr.length-1;Da>=Qr;--Da){let Ee=Nr[Da],ga=Sa?Yr.lastChild:Yr.childNodes[Da];Ee.type==="text"||(Ee.renderer&&Ee.renderer.unrender?Ee.renderer.unrender(ga,{attrs:Ee.attrs,children:Ee.children}):Lt(ga,Ee.children,0,!1)),Sa&&Yr.removeChild(ga)}}let Xt={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};function Hr(Yr,Nr){for(let Qr in Nr)Qr in Xt||(Qr.substr(0,2)==="on"?Yr[Qr]=Nr[Qr]:Yr.setAttribute(Qr,Nr[Qr]));Nr.className!==void 0&&Yr.setAttribute("class",Nr.className),Nr.htmlFor!==void 0&&Yr.setAttribute("for",Nr.htmlFor),Nr.dataset&&jr(Yr,Nr.dataset),Nr.style&&zr(Yr,Nr.style)}function Cr(Yr,Nr,Qr){if(Nr===Qr)return;let Sa;for(Sa in Nr)Sa in Xt||Sa in Qr||(Sa.substr(0,2)==="on"?Yr[Sa]=null:Yr.removeAttribute(Sa));for(Sa in Qr)Sa in Xt||Nr[Sa]===Qr[Sa]||(Sa.substr(0,2)==="on"?Yr[Sa]=Qr[Sa]:Yr.setAttribute(Sa,Qr[Sa]));Nr.className!==Qr.className&&(Qr.className!==void 0?Yr.setAttribute("class",Qr.className):Yr.removeAttribute("class")),Nr.htmlFor!==Qr.htmlFor&&(Qr.htmlFor!==void 0?Yr.setAttribute("for",Qr.htmlFor):Yr.removeAttribute("for")),Nr.dataset!==Qr.dataset&&Jr(Yr,Nr.dataset||{},Qr.dataset||{}),Nr.style!==Qr.style&&Gr(Yr,Nr.style||{},Qr.style||{})}function jr(Yr,Nr){for(let Qr in Nr)Yr.setAttribute(`data-${Qr}`,Nr[Qr])}function Jr(Yr,Nr,Qr){for(let Sa in Nr)Sa in Qr||Yr.removeAttribute(`data-${Sa}`);for(let Sa in Qr)Nr[Sa]!==Qr[Sa]&&Yr.setAttribute(`data-${Sa}`,Qr[Sa])}function zr(Yr,Nr){let Qr=Yr.style,Sa;for(Sa in Nr)Qr[Sa]=Nr[Sa]}function Gr(Yr,Nr,Qr){let Sa=Yr.style,Da;for(Da in Nr)Da in Qr||(Sa[Da]="");for(Da in Qr)Nr[Da]!==Qr[Da]&&(Sa[Da]=Qr[Da])}function ta(Yr,Nr){let Qr=Yr.firstChild,Sa=Object.create(null);for(let Da of Nr)Da.type==="element"&&Da.attrs.key&&(Sa[Da.attrs.key]={vNode:Da,element:Qr}),Qr=Qr.nextSibling;return Sa}})(bv||(bv={}));var Vh=class{constructor(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1}},sh;(function(xt){function be(Xt,Hr){let Cr=Xt.length;if(Cr===0)return Hr;let jr=0,Jr=0,zr=0,Gr=0,ta=0;for(let Qr=0;Qr0&&(Gr+=Sa.stretch,ta++)}if(Hr===zr)return 0;if(Hr<=jr){for(let Qr=0;Qr=Jr){for(let Qr=0;Qr0&&Qr>Yr;){let Sa=Qr,Da=Gr;for(let Ee=0;Ee0&&Qr>Yr;){let Sa=Qr/Nr;for(let Da=0;Da0&&Qr>Yr;){let Sa=Qr,Da=Gr;for(let Ee=0;Ee=ga.maxSize?(Qr-=ga.maxSize-ga.size,Gr-=ga.stretch,ga.size=ga.maxSize,ga.done=!0,Nr--,ta--):(Qr-=Ga,ga.size+=Ga)}}for(;Nr>0&&Qr>Yr;){let Sa=Qr/Nr;for(let Da=0;Da=Ee.maxSize?(Qr-=Ee.maxSize-Ee.size,Ee.size=Ee.maxSize,Ee.done=!0,Nr--):(Qr-=Sa,Ee.size+=Sa))}}}return 0}xt.calc=be;function st(Xt,Hr,Cr){Xt.length===0||Cr===0||(Cr>0?ft(Xt,Hr,Cr):Lt(Xt,Hr,-Cr))}xt.adjust=st;function ft(Xt,Hr,Cr){let jr=0;for(let ta=0;ta<=Hr;++ta){let Yr=Xt[ta];jr+=Yr.maxSize-Yr.size}let Jr=0;for(let ta=Hr+1,Yr=Xt.length;ta=0&&zr>0;--ta){let Yr=Xt[ta],Nr=Yr.maxSize-Yr.size;Nr>=zr?(Yr.sizeHint=Yr.size+zr,zr=0):(Yr.sizeHint=Yr.size+Nr,zr-=Nr)}let Gr=Cr;for(let ta=Hr+1,Yr=Xt.length;ta0;++ta){let Nr=Xt[ta],Qr=Nr.size-Nr.minSize;Qr>=Gr?(Nr.sizeHint=Nr.size-Gr,Gr=0):(Nr.sizeHint=Nr.size-Qr,Gr-=Qr)}}function Lt(Xt,Hr,Cr){let jr=0;for(let ta=Hr+1,Yr=Xt.length;ta0;++ta){let Nr=Xt[ta],Qr=Nr.maxSize-Nr.size;Qr>=zr?(Nr.sizeHint=Nr.size+zr,zr=0):(Nr.sizeHint=Nr.size+Qr,zr-=Qr)}let Gr=Cr;for(let ta=Hr;ta>=0&&Gr>0;--ta){let Yr=Xt[ta],Nr=Yr.size-Yr.minSize;Nr>=Gr?(Yr.sizeHint=Yr.size-Gr,Gr=0):(Yr.sizeHint=Yr.size-Nr,Gr-=Nr)}}})(sh||(sh={}));var D0=class{constructor(be){this._label="",this._caption="",this._mnemonic=-1,this._icon=void 0,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new Ml(this),this._isDisposed=!1,this.owner=be.owner,be.label!==void 0&&(this._label=be.label),be.mnemonic!==void 0&&(this._mnemonic=be.mnemonic),be.icon!==void 0&&(this._icon=be.icon),be.iconClass!==void 0&&(this._iconClass=be.iconClass),be.iconLabel!==void 0&&(this._iconLabel=be.iconLabel),be.caption!==void 0&&(this._caption=be.caption),be.className!==void 0&&(this._className=be.className),be.closable!==void 0&&(this._closable=be.closable),this._dataset=be.dataset||{}}get changed(){return this._changed}get label(){return this._label}set label(be){this._label!==be&&(this._label=be,this._changed.emit(void 0))}get mnemonic(){return this._mnemonic}set mnemonic(be){this._mnemonic!==be&&(this._mnemonic=be,this._changed.emit(void 0))}get icon(){return this._icon}set icon(be){this._icon!==be&&(this._icon=be,this._changed.emit(void 0))}get iconClass(){return this._iconClass}set iconClass(be){this._iconClass!==be&&(this._iconClass=be,this._changed.emit(void 0))}get iconLabel(){return this._iconLabel}set iconLabel(be){this._iconLabel!==be&&(this._iconLabel=be,this._changed.emit(void 0))}get caption(){return this._caption}set caption(be){this._caption!==be&&(this._caption=be,this._changed.emit(void 0))}get className(){return this._className}set className(be){this._className!==be&&(this._className=be,this._changed.emit(void 0))}get closable(){return this._closable}set closable(be){this._closable!==be&&(this._closable=be,this._changed.emit(void 0))}get dataset(){return this._dataset}set dataset(be){this._dataset!==be&&(this._dataset=be,this._changed.emit(void 0))}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,Ml.clearData(this))}},to=class xt{constructor(be={}){this._flags=0,this._layout=null,this._parent=null,this._disposed=new Ml(this),this._hiddenMode=xt.HiddenMode.Display,this.node=pg.createNode(be),this.addClass("lm-Widget")}dispose(){this.isDisposed||(this.setFlag(xt.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&&xt.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),this.title.dispose(),Ml.clearData(this),$i.clearData(this),$f.clearData(this))}get disposed(){return this._disposed}get isDisposed(){return this.testFlag(xt.Flag.IsDisposed)}get isAttached(){return this.testFlag(xt.Flag.IsAttached)}get isHidden(){return this.testFlag(xt.Flag.IsHidden)}get isVisible(){return this.testFlag(xt.Flag.IsVisible)}get title(){return pg.titleProperty.get(this)}get id(){return this.node.id}set id(be){this.node.id=be}get dataset(){return this.node.dataset}get hiddenMode(){return this._hiddenMode}set hiddenMode(be){this._hiddenMode!==be&&(this.isHidden&&this._toggleHidden(!1),be==xt.HiddenMode.Scale?this.node.style.willChange="transform":this.node.style.willChange="auto",this._hiddenMode=be,this.isHidden&&this._toggleHidden(!0))}get parent(){return this._parent}set parent(be){if(this._parent!==be){if(be&&this.contains(be))throw new Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){let st=new xt.ChildMessage("child-removed",this);$i.sendMessage(this._parent,st)}if(this._parent=be,this._parent&&!this._parent.isDisposed){let st=new xt.ChildMessage("child-added",this);$i.sendMessage(this._parent,st)}this.isDisposed||$i.sendMessage(this,xt.Msg.ParentChanged)}}get layout(){return this._layout}set layout(be){if(this._layout!==be){if(this.testFlag(xt.Flag.DisallowLayout))throw new Error("Cannot set widget layout.");if(this._layout)throw new Error("Cannot change widget layout.");if(be.parent)throw new Error("Cannot change layout parent.");this._layout=be,be.parent=this}}*children(){this._layout&&(yield*this._layout)}contains(be){for(let st=be;st;st=st._parent)if(st===this)return!0;return!1}hasClass(be){return this.node.classList.contains(be)}addClass(be){this.node.classList.add(be)}removeClass(be){this.node.classList.remove(be)}toggleClass(be,st){return st===!0?(this.node.classList.add(be),!0):st===!1?(this.node.classList.remove(be),!1):this.node.classList.toggle(be)}update(){$i.postMessage(this,xt.Msg.UpdateRequest)}fit(){$i.postMessage(this,xt.Msg.FitRequest)}activate(){$i.postMessage(this,xt.Msg.ActivateRequest)}close(){$i.sendMessage(this,xt.Msg.CloseRequest)}show(){if(this.testFlag(xt.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&$i.sendMessage(this,xt.Msg.BeforeShow),this.clearFlag(xt.Flag.IsHidden),this._toggleHidden(!1),this.isAttached&&(!this.parent||this.parent.isVisible)&&$i.sendMessage(this,xt.Msg.AfterShow),this.parent)){let be=new xt.ChildMessage("child-shown",this);$i.sendMessage(this.parent,be)}}hide(){if(!this.testFlag(xt.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&$i.sendMessage(this,xt.Msg.BeforeHide),this.setFlag(xt.Flag.IsHidden),this._toggleHidden(!0),this.isAttached&&(!this.parent||this.parent.isVisible)&&$i.sendMessage(this,xt.Msg.AfterHide),this.parent)){let be=new xt.ChildMessage("child-hidden",this);$i.sendMessage(this.parent,be)}}setHidden(be){be?this.hide():this.show()}testFlag(be){return(this._flags&be)!==0}setFlag(be){this._flags|=be}clearFlag(be){this._flags&=~be}processMessage(be){switch(be.type){case"resize":this.notifyLayout(be),this.onResize(be);break;case"update-request":this.notifyLayout(be),this.onUpdateRequest(be);break;case"fit-request":this.notifyLayout(be),this.onFitRequest(be);break;case"before-show":this.notifyLayout(be),this.onBeforeShow(be);break;case"after-show":this.setFlag(xt.Flag.IsVisible),this.notifyLayout(be),this.onAfterShow(be);break;case"before-hide":this.notifyLayout(be),this.onBeforeHide(be);break;case"after-hide":this.clearFlag(xt.Flag.IsVisible),this.notifyLayout(be),this.onAfterHide(be);break;case"before-attach":this.notifyLayout(be),this.onBeforeAttach(be);break;case"after-attach":!this.isHidden&&(!this.parent||this.parent.isVisible)&&this.setFlag(xt.Flag.IsVisible),this.setFlag(xt.Flag.IsAttached),this.notifyLayout(be),this.onAfterAttach(be);break;case"before-detach":this.notifyLayout(be),this.onBeforeDetach(be);break;case"after-detach":this.clearFlag(xt.Flag.IsVisible),this.clearFlag(xt.Flag.IsAttached),this.notifyLayout(be),this.onAfterDetach(be);break;case"activate-request":this.notifyLayout(be),this.onActivateRequest(be);break;case"close-request":this.notifyLayout(be),this.onCloseRequest(be);break;case"child-added":this.notifyLayout(be),this.onChildAdded(be);break;case"child-removed":this.notifyLayout(be),this.onChildRemoved(be);break;default:this.notifyLayout(be);break}}notifyLayout(be){this._layout&&this._layout.processParentMessage(be)}onCloseRequest(be){this.parent?this.parent=null:this.isAttached&&xt.detach(this)}onResize(be){}onUpdateRequest(be){}onFitRequest(be){}onActivateRequest(be){}onBeforeShow(be){}onAfterShow(be){}onBeforeHide(be){}onAfterHide(be){}onBeforeAttach(be){}onAfterAttach(be){}onBeforeDetach(be){}onAfterDetach(be){}onChildAdded(be){}onChildRemoved(be){}_toggleHidden(be){if(be)switch(this._hiddenMode){case xt.HiddenMode.Display:this.addClass("lm-mod-hidden");break;case xt.HiddenMode.Scale:this.node.style.transform="scale(0)",this.node.setAttribute("aria-hidden","true");break;case xt.HiddenMode.ContentVisibility:this.node.style.contentVisibility="hidden",this.node.style.zIndex="-1";break}else switch(this._hiddenMode){case xt.HiddenMode.Display:this.removeClass("lm-mod-hidden");break;case xt.HiddenMode.Scale:this.node.style.transform="",this.node.removeAttribute("aria-hidden");break;case xt.HiddenMode.ContentVisibility:this.node.style.contentVisibility="",this.node.style.zIndex="";break}}};(function(xt){(function(Xt){Xt[Xt.Display=0]="Display",Xt[Xt.Scale=1]="Scale",Xt[Xt.ContentVisibility=2]="ContentVisibility"})(xt.HiddenMode||(xt.HiddenMode={})),function(Xt){Xt[Xt.IsDisposed=1]="IsDisposed",Xt[Xt.IsAttached=2]="IsAttached",Xt[Xt.IsHidden=4]="IsHidden",Xt[Xt.IsVisible=8]="IsVisible",Xt[Xt.DisallowLayout=16]="DisallowLayout"}(xt.Flag||(xt.Flag={})),function(Xt){Xt.BeforeShow=new Xf("before-show"),Xt.AfterShow=new Xf("after-show"),Xt.BeforeHide=new Xf("before-hide"),Xt.AfterHide=new Xf("after-hide"),Xt.BeforeAttach=new Xf("before-attach"),Xt.AfterAttach=new Xf("after-attach"),Xt.BeforeDetach=new Xf("before-detach"),Xt.AfterDetach=new Xf("after-detach"),Xt.ParentChanged=new Xf("parent-changed"),Xt.UpdateRequest=new Ud("update-request"),Xt.FitRequest=new Ud("fit-request"),Xt.ActivateRequest=new Ud("activate-request"),Xt.CloseRequest=new Ud("close-request")}(xt.Msg||(xt.Msg={}));class be extends Xf{constructor(Hr,Cr){super(Hr),this.child=Cr}}xt.ChildMessage=be;class st extends Xf{constructor(Hr,Cr){super("resize"),this.width=Hr,this.height=Cr}}xt.ResizeMessage=st,function(Xt){Xt.UnknownSize=new Xt(-1,-1)}(st=xt.ResizeMessage||(xt.ResizeMessage={}));function ft(Xt,Hr,Cr=null){if(Xt.parent)throw new Error("Cannot attach a child widget.");if(Xt.isAttached||Xt.node.isConnected)throw new Error("Widget is already attached.");if(!Hr.isConnected)throw new Error("Host is not attached.");$i.sendMessage(Xt,xt.Msg.BeforeAttach),Hr.insertBefore(Xt.node,Cr),$i.sendMessage(Xt,xt.Msg.AfterAttach)}xt.attach=ft;function Lt(Xt){if(Xt.parent)throw new Error("Cannot detach a child widget.");if(!Xt.isAttached||!Xt.node.isConnected)throw new Error("Widget is not attached.");$i.sendMessage(Xt,xt.Msg.BeforeDetach),Xt.node.parentNode.removeChild(Xt.node),$i.sendMessage(Xt,xt.Msg.AfterDetach)}xt.detach=Lt})(to||(to={}));var pg;(function(xt){xt.titleProperty=new $f({name:"title",create:st=>new D0({owner:st})});function be(st){return st.node||document.createElement(st.tag||"div")}xt.createNode=be})(pg||(pg={}));var pd=class{constructor(be={}){this._disposed=!1,this._parent=null,this._fitPolicy=be.fitPolicy||"set-min-size"}dispose(){this._parent=null,this._disposed=!0,Ml.clearData(this),$f.clearData(this)}get isDisposed(){return this._disposed}get parent(){return this._parent}set parent(be){if(this._parent!==be){if(this._parent)throw new Error("Cannot change parent widget.");if(be.layout!==this)throw new Error("Invalid parent widget.");this._parent=be,this.init()}}get fitPolicy(){return this._fitPolicy}set fitPolicy(be){if(this._fitPolicy!==be&&(this._fitPolicy=be,this._parent)){let st=this._parent.node.style;st.minWidth="",st.minHeight="",st.maxWidth="",st.maxHeight="",this._parent.fit()}}processParentMessage(be){switch(be.type){case"resize":this.onResize(be);break;case"update-request":this.onUpdateRequest(be);break;case"fit-request":this.onFitRequest(be);break;case"before-show":this.onBeforeShow(be);break;case"after-show":this.onAfterShow(be);break;case"before-hide":this.onBeforeHide(be);break;case"after-hide":this.onAfterHide(be);break;case"before-attach":this.onBeforeAttach(be);break;case"after-attach":this.onAfterAttach(be);break;case"before-detach":this.onBeforeDetach(be);break;case"after-detach":this.onAfterDetach(be);break;case"child-removed":this.onChildRemoved(be);break;case"child-shown":this.onChildShown(be);break;case"child-hidden":this.onChildHidden(be);break}}init(){for(let be of this)be.parent=this.parent}onResize(be){for(let st of this)$i.sendMessage(st,to.ResizeMessage.UnknownSize)}onUpdateRequest(be){for(let st of this)$i.sendMessage(st,to.ResizeMessage.UnknownSize)}onBeforeAttach(be){for(let st of this)$i.sendMessage(st,be)}onAfterAttach(be){for(let st of this)$i.sendMessage(st,be)}onBeforeDetach(be){for(let st of this)$i.sendMessage(st,be)}onAfterDetach(be){for(let st of this)$i.sendMessage(st,be)}onBeforeShow(be){for(let st of this)st.isHidden||$i.sendMessage(st,be)}onAfterShow(be){for(let st of this)st.isHidden||$i.sendMessage(st,be)}onBeforeHide(be){for(let st of this)st.isHidden||$i.sendMessage(st,be)}onAfterHide(be){for(let st of this)st.isHidden||$i.sendMessage(st,be)}onChildRemoved(be){this.removeWidget(be.child)}onFitRequest(be){}onChildShown(be){}onChildHidden(be){}};(function(xt){function be(Xt){return Pp.horizontalAlignmentProperty.get(Xt)}xt.getHorizontalAlignment=be;function st(Xt,Hr){Pp.horizontalAlignmentProperty.set(Xt,Hr)}xt.setHorizontalAlignment=st;function ft(Xt){return Pp.verticalAlignmentProperty.get(Xt)}xt.getVerticalAlignment=ft;function Lt(Xt,Hr){Pp.verticalAlignmentProperty.set(Xt,Hr)}xt.setVerticalAlignment=Lt})(pd||(pd={}));var Tv=class{constructor(be){this._top=NaN,this._left=NaN,this._width=NaN,this._height=NaN,this._minWidth=0,this._minHeight=0,this._maxWidth=1/0,this._maxHeight=1/0,this._disposed=!1,this.widget=be,this.widget.node.style.position="absolute",this.widget.node.style.contain="strict"}dispose(){if(this._disposed)return;this._disposed=!0;let be=this.widget.node.style;be.position="",be.top="",be.left="",be.width="",be.height="",be.contain=""}get minWidth(){return this._minWidth}get minHeight(){return this._minHeight}get maxWidth(){return this._maxWidth}get maxHeight(){return this._maxHeight}get isDisposed(){return this._disposed}get isHidden(){return this.widget.isHidden}get isVisible(){return this.widget.isVisible}get isAttached(){return this.widget.isAttached}fit(){let be=Rl.sizeLimits(this.widget.node);this._minWidth=be.minWidth,this._minHeight=be.minHeight,this._maxWidth=be.maxWidth,this._maxHeight=be.maxHeight}update(be,st,ft,Lt){let Xt=Math.max(this._minWidth,Math.min(ft,this._maxWidth)),Hr=Math.max(this._minHeight,Math.min(Lt,this._maxHeight));if(Xt"center",changed:be}),xt.verticalAlignmentProperty=new $f({name:"verticalAlignment",create:()=>"top",changed:be});function be(st){st.parent&&st.parent.layout&&st.parent.update()}})(Pp||(Pp={}));var Dp=class extends pd{constructor(){super(...arguments),this._widgets=[]}dispose(){for(;this._widgets.length>0;)this._widgets.pop().dispose();super.dispose()}get widgets(){return this._widgets}*[Symbol.iterator](){yield*this._widgets}addWidget(be){this.insertWidget(this._widgets.length,be)}insertWidget(be,st){st.parent=this.parent;let ft=this._widgets.indexOf(st),Lt=Math.max(0,Math.min(be,this._widgets.length));if(ft===-1){Fi.ArrayExt.insert(this._widgets,Lt,st),this.parent&&this.attachWidget(Lt,st);return}Lt===this._widgets.length&&Lt--,ft!==Lt&&(Fi.ArrayExt.move(this._widgets,ft,Lt),this.parent&&this.moveWidget(ft,Lt,st))}removeWidget(be){this.removeWidgetAt(this._widgets.indexOf(be))}removeWidgetAt(be){let st=Fi.ArrayExt.removeAt(this._widgets,be);st&&this.parent&&this.detachWidget(be,st)}init(){super.init();let be=0;for(let st of this)this.attachWidget(be++,st)}attachWidget(be,st){let ft=this.parent.node.children[be];this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeAttach),this.parent.node.insertBefore(st.node,ft),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterAttach)}moveWidget(be,st,ft){this.parent.isAttached&&$i.sendMessage(ft,to.Msg.BeforeDetach),this.parent.node.removeChild(ft.node),this.parent.isAttached&&$i.sendMessage(ft,to.Msg.AfterDetach);let Lt=this.parent.node.children[st];this.parent.isAttached&&$i.sendMessage(ft,to.Msg.BeforeAttach),this.parent.node.insertBefore(ft.node,Lt),this.parent.isAttached&&$i.sendMessage(ft,to.Msg.AfterAttach)}detachWidget(be,st){this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeDetach),this.parent.node.removeChild(st.node),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterDetach)}},I0;(function(xt){function be(st){return Math.max(0,Math.floor(st))}xt.clampDimension=be})(I0||(I0={}));var R0=I0,md=class xt extends Dp{constructor(be){super(),this.widgetOffset=0,this._fixed=0,this._spacing=4,this._dirty=!1,this._hasNormedSizes=!1,this._sizers=[],this._items=[],this._handles=[],this._box=null,this._alignment="start",this._orientation="horizontal",this.renderer=be.renderer,be.orientation!==void 0&&(this._orientation=be.orientation),be.alignment!==void 0&&(this._alignment=be.alignment),be.spacing!==void 0&&(this._spacing=I0.clampDimension(be.spacing))}dispose(){for(let be of this._items)be.dispose();this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,super.dispose()}get orientation(){return this._orientation}set orientation(be){this._orientation!==be&&(this._orientation=be,this.parent&&(this.parent.dataset.orientation=be,this.parent.fit()))}get alignment(){return this._alignment}set alignment(be){this._alignment!==be&&(this._alignment=be,this.parent&&(this.parent.dataset.alignment=be,this.parent.update()))}get spacing(){return this._spacing}set spacing(be){be=I0.clampDimension(be),this._spacing!==be&&(this._spacing=be,this.parent&&this.parent.fit())}get handles(){return this._handles}absoluteSizes(){return this._sizers.map(be=>be.size)}relativeSizes(){return dd.normalize(this._sizers.map(be=>be.size))}setRelativeSizes(be,st=!0){let ft=this._sizers.length,Lt=be.slice(0,ft);for(;Lt.length0&&(Xt.sizeHint=Xt.size);sh.adjust(this._sizers,be,Lt),this.parent&&this.parent.update()}}init(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(be,st){let ft=new Tv(st),Lt=dd.createHandle(this.renderer),Xt=dd.averageSize(this._sizers),Hr=dd.createSizer(Xt);Fi.ArrayExt.insert(this._items,be,ft),Fi.ArrayExt.insert(this._sizers,be,Hr),Fi.ArrayExt.insert(this._handles,be,Lt),this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeAttach),this.parent.node.appendChild(st.node),this.parent.node.appendChild(Lt),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterAttach),this.parent.fit()}moveWidget(be,st,ft){Fi.ArrayExt.move(this._items,be,st),Fi.ArrayExt.move(this._sizers,be,st),Fi.ArrayExt.move(this._handles,be,st),this.parent.fit()}detachWidget(be,st){let ft=Fi.ArrayExt.removeAt(this._items,be),Lt=Fi.ArrayExt.removeAt(this._handles,be);Fi.ArrayExt.removeAt(this._sizers,be),this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeDetach),this.parent.node.removeChild(st.node),this.parent.node.removeChild(Lt),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterDetach),ft.dispose(),this.parent.fit()}onBeforeShow(be){super.onBeforeShow(be),this.parent.update()}onBeforeAttach(be){super.onBeforeAttach(be),this.parent.fit()}onChildShown(be){this.parent.fit()}onChildHidden(be){this.parent.fit()}onResize(be){this.parent.isVisible&&this._update(be.width,be.height)}onUpdateRequest(be){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(be){this.parent.isAttached&&this._fit()}updateItemPosition(be,st,ft,Lt,Xt,Hr,Cr){let jr=this._items[be];if(jr.isHidden)return;let Jr=this._handles[be].style;st?(ft+=this.widgetOffset,jr.update(ft,Lt,Cr,Xt),ft+=Cr,Jr.top=`${Lt}px`,Jr.left=`${ft}px`,Jr.width=`${this._spacing}px`,Jr.height=`${Xt}px`):(Lt+=this.widgetOffset,jr.update(ft,Lt,Hr,Cr),Lt+=Cr,Jr.top=`${Lt}px`,Jr.left=`${ft}px`,Jr.width=`${Hr}px`,Jr.height=`${this._spacing}px`)}_fit(){let be=0,st=-1;for(let jr=0,Jr=this._items.length;jr0&&(Gr.sizeHint=Gr.size),zr.isHidden){Gr.minSize=0,Gr.maxSize=0;continue}zr.fit(),Gr.stretch=xt.getStretch(zr.widget),ft?(Gr.minSize=zr.minWidth,Gr.maxSize=zr.maxWidth,Lt+=zr.minWidth,Xt=Math.max(Xt,zr.minHeight)):(Gr.minSize=zr.minHeight,Gr.maxSize=zr.maxHeight,Xt+=zr.minHeight,Lt=Math.max(Lt,zr.minWidth))}let Hr=this._box=Rl.boxSizing(this.parent.node);Lt+=Hr.horizontalSum,Xt+=Hr.verticalSum;let Cr=this.parent.node.style;Cr.minWidth=`${Lt}px`,Cr.minHeight=`${Xt}px`,this._dirty=!0,this.parent.parent&&$i.sendMessage(this.parent.parent,to.Msg.FitRequest),this._dirty&&$i.sendMessage(this.parent,to.Msg.UpdateRequest)}_update(be,st){this._dirty=!1;let ft=0;for(let Gr=0,ta=this._items.length;Gr0){let Gr;if(zr?Gr=Math.max(0,Hr-this._fixed):Gr=Math.max(0,Cr-this._fixed),this._hasNormedSizes){for(let Yr of this._sizers)Yr.sizeHint*=Gr;this._hasNormedSizes=!1}let ta=sh.calc(this._sizers,Gr);if(ta>0)switch(this._alignment){case"start":break;case"center":jr=0,Jr=ta/2;break;case"end":jr=0,Jr=ta;break;case"justify":jr=ta/ft,Jr=0;break;default:throw"unreachable"}}for(let Gr=0,ta=this._items.length;Gr0,coerce:(Hr,Cr)=>Math.max(0,Math.floor(Cr)),changed:Xt});function be(Hr){let Cr=new Vh;return Cr.sizeHint=Math.floor(Hr),Cr}xt.createSizer=be;function st(Hr){let Cr=Hr.createHandle();return Cr.style.position="absolute",Cr.style.contain="style",Cr}xt.createHandle=st;function ft(Hr){return Hr.reduce((Cr,jr)=>Cr+jr.size,0)/Hr.length||0}xt.averageSize=ft;function Lt(Hr){let Cr=Hr.length;if(Cr===0)return[];let jr=Hr.reduce((Jr,zr)=>Jr+Math.abs(zr),0);return jr===0?Hr.map(Jr=>1/Cr):Hr.map(Jr=>Jr/jr)}xt.normalize=Lt;function Xt(Hr){Hr.parent&&Hr.parent.layout instanceof md&&Hr.parent.fit()}})(dd||(dd={}));var ob=class extends md{constructor(be){super({...be,orientation:be.orientation||"vertical"}),this._titles=[],this.titleSpace=be.titleSpace||22}get titleSpace(){return this.widgetOffset}set titleSpace(be){be=R0.clampDimension(be),this.widgetOffset!==be&&(this.widgetOffset=be,this.parent&&this.parent.fit())}get titles(){return this._titles}dispose(){this.isDisposed||(this._titles.length=0,super.dispose())}updateTitle(be,st){let ft=this._titles[be],Lt=ft.classList.contains("lm-mod-expanded"),Xt=mg.createTitle(this.renderer,st.title,Lt);this._titles[be]=Xt,this.parent.node.replaceChild(Xt,ft)}insertWidget(be,st){st.id||(st.id=`id-${vd.UUID.uuid4()}`),super.insertWidget(be,st)}attachWidget(be,st){let ft=mg.createTitle(this.renderer,st.title);Fi.ArrayExt.insert(this._titles,be,ft),this.parent.node.appendChild(ft),st.node.setAttribute("role","region"),st.node.setAttribute("aria-labelledby",ft.id),super.attachWidget(be,st)}moveWidget(be,st,ft){Fi.ArrayExt.move(this._titles,be,st),super.moveWidget(be,st,ft)}detachWidget(be,st){let ft=Fi.ArrayExt.removeAt(this._titles,be);this.parent.node.removeChild(ft),super.detachWidget(be,st)}updateItemPosition(be,st,ft,Lt,Xt,Hr,Cr){let jr=this._titles[be].style;jr.top=`${Lt}px`,jr.left=`${ft}px`,jr.height=`${this.widgetOffset}px`,st?jr.width=`${Xt}px`:jr.width=`${Hr}px`,super.updateItemPosition(be,st,ft,Lt,Xt,Hr,Cr)}},mg;(function(xt){function be(st,ft,Lt=!0){let Xt=st.createSectionTitle(ft);return Xt.style.position="absolute",Xt.style.contain="strict",Xt.setAttribute("aria-label",`${ft.label} Section`),Xt.setAttribute("aria-expanded",Lt?"true":"false"),Xt.setAttribute("aria-controls",ft.owner.id),Lt&&Xt.classList.add("lm-mod-expanded"),Xt}xt.createTitle=be})(mg||(mg={}));var gg=class extends to{constructor(be={}){super(),this.addClass("lm-Panel"),this.layout=sb.createLayout(be)}get widgets(){return this.layout.widgets}addWidget(be){this.layout.addWidget(be)}insertWidget(be,st){this.layout.insertWidget(be,st)}},sb;(function(xt){function be(st){return st.layout||new Dp}xt.createLayout=be})(sb||(sb={}));var Av=class extends gg{constructor(be={}){super({layout:lb.createLayout(be)}),this._handleMoved=new Ml(this),this._pressData=null,this.addClass("lm-SplitPanel")}dispose(){this._releaseMouse(),super.dispose()}get orientation(){return this.layout.orientation}set orientation(be){this.layout.orientation=be}get alignment(){return this.layout.alignment}set alignment(be){this.layout.alignment=be}get spacing(){return this.layout.spacing}set spacing(be){this.layout.spacing=be}get renderer(){return this.layout.renderer}get handleMoved(){return this._handleMoved}get handles(){return this.layout.handles}relativeSizes(){return this.layout.relativeSizes()}setRelativeSizes(be,st=!0){this.layout.setRelativeSizes(be,st)}handleEvent(be){switch(be.type){case"pointerdown":this._evtPointerDown(be);break;case"pointermove":this._evtPointerMove(be);break;case"pointerup":this._evtPointerUp(be);break;case"keydown":this._evtKeyDown(be);break;case"contextmenu":be.preventDefault(),be.stopPropagation();break}}onBeforeAttach(be){this.node.addEventListener("pointerdown",this)}onAfterDetach(be){this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(be){be.child.addClass("lm-SplitPanel-child"),this._releaseMouse()}onChildRemoved(be){be.child.removeClass("lm-SplitPanel-child"),this._releaseMouse()}_evtKeyDown(be){this._pressData&&(be.preventDefault(),be.stopPropagation()),be.keyCode===27&&this._releaseMouse()}_evtPointerDown(be){if(be.button!==0)return;let st=this.layout,ft=Fi.ArrayExt.findFirstIndex(st.handles,Jr=>Jr.contains(be.target));if(ft===-1)return;be.preventDefault(),be.stopPropagation(),document.addEventListener("pointerup",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0);let Lt,Xt=st.handles[ft],Hr=Xt.getBoundingClientRect();st.orientation==="horizontal"?Lt=be.clientX-Hr.left:Lt=be.clientY-Hr.top;let Cr=window.getComputedStyle(Xt),jr=Zf.overrideCursor(Cr.cursor);this._pressData={index:ft,delta:Lt,override:jr}}_evtPointerMove(be){be.preventDefault(),be.stopPropagation();let st,ft=this.layout,Lt=this.node.getBoundingClientRect();ft.orientation==="horizontal"?st=be.clientX-Lt.left-this._pressData.delta:st=be.clientY-Lt.top-this._pressData.delta,ft.moveHandle(this._pressData.index,st)}_evtPointerUp(be){be.button===0&&(be.preventDefault(),be.stopPropagation(),this._releaseMouse())}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._handleMoved.emit(),document.removeEventListener("keydown",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("contextmenu",this,!0))}};(function(xt){class be{createHandle(){let Xt=document.createElement("div");return Xt.className="lm-SplitPanel-handle",Xt}}xt.Renderer=be,xt.defaultRenderer=new be;function st(Lt){return md.getStretch(Lt)}xt.getStretch=st;function ft(Lt,Xt){md.setStretch(Lt,Xt)}xt.setStretch=ft})(Av||(Av={}));var lb;(function(xt){function be(st){return st.layout||new md({renderer:st.renderer||Av.defaultRenderer,orientation:st.orientation,alignment:st.alignment,spacing:st.spacing})}xt.createLayout=be})(lb||(lb={}));var F0=class extends Av{constructor(be={}){super({...be,layout:ub.createLayout(be)}),this._widgetSizesCache=new WeakMap,this._expansionToggled=new Ml(this),this.addClass("lm-AccordionPanel")}get renderer(){return this.layout.renderer}get titleSpace(){return this.layout.titleSpace}set titleSpace(be){this.layout.titleSpace=be}get titles(){return this.layout.titles}get expansionToggled(){return this._expansionToggled}addWidget(be){super.addWidget(be),be.title.changed.connect(this._onTitleChanged,this)}collapse(be){let st=this.layout.widgets[be];st&&!st.isHidden&&this._toggleExpansion(be)}expand(be){let st=this.layout.widgets[be];st&&st.isHidden&&this._toggleExpansion(be)}insertWidget(be,st){super.insertWidget(be,st),st.title.changed.connect(this._onTitleChanged,this)}handleEvent(be){switch(super.handleEvent(be),be.type){case"click":this._evtClick(be);break;case"keydown":this._eventKeyDown(be);break}}onBeforeAttach(be){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),super.onBeforeAttach(be)}onAfterDetach(be){super.onAfterDetach(be),this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this)}_onTitleChanged(be){let st=Fi.ArrayExt.findFirstIndex(this.widgets,ft=>ft.contains(be.owner));st>=0&&(this.layout.updateTitle(st,be.owner),this.update())}_computeWidgetSize(be){let st=this.layout,ft=st.widgets[be];if(!ft)return;let Lt=ft.isHidden,Xt=st.absoluteSizes(),Hr=(Lt?-1:1)*this.spacing,Cr=Xt.reduce((Jr,zr)=>Jr+zr),jr=[...Xt];if(Lt){let Jr=this._widgetSizesCache.get(ft);if(!Jr)return;jr[be]+=Jr;let zr=jr.map(Gr=>Gr-Jr>0).lastIndexOf(!0);zr===-1?jr.forEach((Gr,ta)=>{ta!==be&&(jr[ta]-=Xt[ta]/Cr*(Jr-Hr))}):jr[zr]-=Jr-Hr}else{let Jr=Xt[be];this._widgetSizesCache.set(ft,Jr),jr[be]=0;let zr=jr.map(Gr=>Gr>0).lastIndexOf(!0);if(zr===-1)return;jr[zr]=Xt[zr]+Jr+Hr}return jr.map(Jr=>Jr/(Cr+Hr))}_evtClick(be){let st=be.target;if(st){let ft=Fi.ArrayExt.findFirstIndex(this.titles,Lt=>Lt.contains(st));ft>=0&&(be.preventDefault(),be.stopPropagation(),this._toggleExpansion(ft))}}_eventKeyDown(be){if(be.defaultPrevented)return;let st=be.target,ft=!1;if(st){let Lt=Fi.ArrayExt.findFirstIndex(this.titles,Xt=>Xt.contains(st));if(Lt>=0){let Xt=be.keyCode.toString();if(be.key.match(/Space|Enter/)||Xt.match(/13|32/))st.click(),ft=!0;else if(this.orientation==="horizontal"?be.key.match(/ArrowLeft|ArrowRight/)||Xt.match(/37|39/):be.key.match(/ArrowUp|ArrowDown/)||Xt.match(/38|40/)){let Hr=be.key.match(/ArrowLeft|ArrowUp/)||Xt.match(/37|38/)?-1:1,Cr=this.titles.length,jr=(Lt+Cr+Hr)%Cr;this.titles[jr].focus(),ft=!0}else be.key==="End"||Xt==="35"?(this.titles[this.titles.length-1].focus(),ft=!0):(be.key==="Home"||Xt==="36")&&(this.titles[0].focus(),ft=!0)}ft&&be.preventDefault()}}_toggleExpansion(be){let st=this.titles[be],ft=this.layout.widgets[be],Lt=this._computeWidgetSize(be);Lt&&this.setRelativeSizes(Lt,!1),ft.isHidden?(st.classList.add("lm-mod-expanded"),st.setAttribute("aria-expanded","true"),ft.show()):(st.classList.remove("lm-mod-expanded"),st.setAttribute("aria-expanded","false"),ft.hide()),this._expansionToggled.emit(be)}};(function(xt){class be extends Av.Renderer{constructor(){super(),this.titleClassName="lm-AccordionPanel-title",this._titleID=0,this._titleKeys=new WeakMap,this._uuid=++be._nInstance}createCollapseIcon(ft){return document.createElement("span")}createSectionTitle(ft){let Lt=document.createElement("h3");Lt.setAttribute("tabindex","0"),Lt.id=this.createTitleKey(ft),Lt.className=this.titleClassName;for(let Cr in ft.dataset)Lt.dataset[Cr]=ft.dataset[Cr];let Xt=Lt.appendChild(this.createCollapseIcon(ft));Xt.className="lm-AccordionPanel-titleCollapser";let Hr=Lt.appendChild(document.createElement("span"));return Hr.className="lm-AccordionPanel-titleLabel",Hr.textContent=ft.label,Hr.title=ft.caption||ft.label,Lt}createTitleKey(ft){let Lt=this._titleKeys.get(ft);return Lt===void 0&&(Lt=`title-key-${this._uuid}-${this._titleID++}`,this._titleKeys.set(ft,Lt)),Lt}}be._nInstance=0,xt.Renderer=be,xt.defaultRenderer=new be})(F0||(F0={}));var ub;(function(xt){function be(st){return st.layout||new ob({renderer:st.renderer||F0.defaultRenderer,orientation:st.orientation,alignment:st.alignment,spacing:st.spacing,titleSpace:st.titleSpace})}xt.createLayout=be})(ub||(ub={}));var qh=class xt extends Dp{constructor(be={}){super(),this._fixed=0,this._spacing=4,this._dirty=!1,this._sizers=[],this._items=[],this._box=null,this._alignment="start",this._direction="top-to-bottom",be.direction!==void 0&&(this._direction=be.direction),be.alignment!==void 0&&(this._alignment=be.alignment),be.spacing!==void 0&&(this._spacing=R0.clampDimension(be.spacing))}dispose(){for(let be of this._items)be.dispose();this._box=null,this._items.length=0,this._sizers.length=0,super.dispose()}get direction(){return this._direction}set direction(be){this._direction!==be&&(this._direction=be,this.parent&&(this.parent.dataset.direction=be,this.parent.fit()))}get alignment(){return this._alignment}set alignment(be){this._alignment!==be&&(this._alignment=be,this.parent&&(this.parent.dataset.alignment=be,this.parent.update()))}get spacing(){return this._spacing}set spacing(be){be=R0.clampDimension(be),this._spacing!==be&&(this._spacing=be,this.parent&&this.parent.fit())}init(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(be,st){Fi.ArrayExt.insert(this._items,be,new Tv(st)),Fi.ArrayExt.insert(this._sizers,be,new Vh),this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeAttach),this.parent.node.appendChild(st.node),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterAttach),this.parent.fit()}moveWidget(be,st,ft){Fi.ArrayExt.move(this._items,be,st),Fi.ArrayExt.move(this._sizers,be,st),this.parent.update()}detachWidget(be,st){let ft=Fi.ArrayExt.removeAt(this._items,be);Fi.ArrayExt.removeAt(this._sizers,be),this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeDetach),this.parent.node.removeChild(st.node),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterDetach),ft.dispose(),this.parent.fit()}onBeforeShow(be){super.onBeforeShow(be),this.parent.update()}onBeforeAttach(be){super.onBeforeAttach(be),this.parent.fit()}onChildShown(be){this.parent.fit()}onChildHidden(be){this.parent.fit()}onResize(be){this.parent.isVisible&&this._update(be.width,be.height)}onUpdateRequest(be){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(be){this.parent.isAttached&&this._fit()}_fit(){let be=0;for(let Cr=0,jr=this._items.length;Cr0)switch(this._alignment){case"start":break;case"center":Jr=0,zr=jr/2;break;case"end":Jr=0,zr=jr;break;case"justify":Jr=jr/ft,zr=0;break;default:throw"unreachable"}for(let Gr=0,ta=this._items.length;Gr0,coerce:(Lt,Xt)=>Math.max(0,Math.floor(Xt)),changed:ft}),xt.sizeBasisProperty=new $f({name:"sizeBasis",create:()=>0,coerce:(Lt,Xt)=>Math.max(0,Math.floor(Xt)),changed:ft});function be(Lt){return Lt==="left-to-right"||Lt==="right-to-left"}xt.isHorizontal=be;function st(Lt){return Math.max(0,Math.floor(Lt))}xt.clampSpacing=st;function ft(Lt){Lt.parent&&Lt.parent.layout instanceof qh&&Lt.parent.fit()}})(xv||(xv={}));var yg=class extends gg{constructor(be={}){super({layout:cb.createLayout(be)}),this.addClass("lm-BoxPanel")}get direction(){return this.layout.direction}set direction(be){this.layout.direction=be}get alignment(){return this.layout.alignment}set alignment(be){this.layout.alignment=be}get spacing(){return this.layout.spacing}set spacing(be){this.layout.spacing=be}onChildAdded(be){be.child.addClass("lm-BoxPanel-child")}onChildRemoved(be){be.child.removeClass("lm-BoxPanel-child")}};(function(xt){function be(Xt){return qh.getStretch(Xt)}xt.getStretch=be;function st(Xt,Hr){qh.setStretch(Xt,Hr)}xt.setStretch=st;function ft(Xt){return qh.getSizeBasis(Xt)}xt.getSizeBasis=ft;function Lt(Xt,Hr){qh.setSizeBasis(Xt,Hr)}xt.setSizeBasis=Lt})(yg||(yg={}));var cb;(function(xt){function be(st){return st.layout||new qh(st)}xt.createLayout=be})(cb||(cb={}));var _g=class xt extends to{constructor(be){super({node:hd.createNode()}),this._activeIndex=-1,this._items=[],this._results=null,this.addClass("lm-CommandPalette"),this.setFlag(to.Flag.DisallowLayout),this.commands=be.commands,this.renderer=be.renderer||xt.defaultRenderer,this.commands.commandChanged.connect(this._onGenericChange,this),this.commands.keyBindingChanged.connect(this._onGenericChange,this)}dispose(){this._items.length=0,this._results=null,super.dispose()}get searchNode(){return this.node.getElementsByClassName("lm-CommandPalette-search")[0]}get inputNode(){return this.node.getElementsByClassName("lm-CommandPalette-input")[0]}get contentNode(){return this.node.getElementsByClassName("lm-CommandPalette-content")[0]}get items(){return this._items}addItem(be){let st=hd.createItem(this.commands,be);return this._items.push(st),this.refresh(),st}addItems(be){let st=be.map(ft=>hd.createItem(this.commands,ft));return st.forEach(ft=>this._items.push(ft)),this.refresh(),st}removeItem(be){this.removeItemAt(this._items.indexOf(be))}removeItemAt(be){Fi.ArrayExt.removeAt(this._items,be)&&this.refresh()}clearItems(){this._items.length!==0&&(this._items.length=0,this.refresh())}refresh(){if(this._results=null,this.inputNode.value!==""){let be=this.node.getElementsByClassName("lm-close-icon")[0];be.style.display="inherit"}else{let be=this.node.getElementsByClassName("lm-close-icon")[0];be.style.display="none"}this.update()}handleEvent(be){switch(be.type){case"click":this._evtClick(be);break;case"keydown":this._evtKeyDown(be);break;case"input":this.refresh();break;case"focus":case"blur":this._toggleFocused();break}}onBeforeAttach(be){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),this.node.addEventListener("input",this),this.node.addEventListener("focus",this,!0),this.node.addEventListener("blur",this,!0)}onAfterDetach(be){this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this),this.node.removeEventListener("input",this),this.node.removeEventListener("focus",this,!0),this.node.removeEventListener("blur",this,!0)}onAfterShow(be){this.update(),super.onAfterShow(be)}onActivateRequest(be){if(this.isAttached){let st=this.inputNode;st.focus(),st.select()}}onUpdateRequest(be){if(this.isHidden)return;let st=this.inputNode.value,ft=this.contentNode,Lt=this._results;if(Lt||(Lt=this._results=hd.search(this._items,st),this._activeIndex=st?Fi.ArrayExt.findFirstIndex(Lt,hd.canActivate):-1),!st&&Lt.length===0){fd.render(null,ft);return}if(st&&Lt.length===0){let jr=this.renderer.renderEmptyMessage({query:st});fd.render(jr,ft);return}let Xt=this.renderer,Hr=this._activeIndex,Cr=new Array(Lt.length);for(let jr=0,Jr=Lt.length;jr=Lt.length)ft.scrollTop=0;else{let jr=ft.children[Hr];Rl.scrollIntoViewIfNeeded(ft,jr)}}_evtClick(be){if(be.button!==0)return;if(be.target.classList.contains("lm-close-icon")){this.inputNode.value="",this.refresh();return}let st=Fi.ArrayExt.findFirstIndex(this.contentNode.children,ft=>ft.contains(be.target));st!==-1&&(be.preventDefault(),be.stopPropagation(),this._execute(st))}_evtKeyDown(be){if(!(be.altKey||be.ctrlKey||be.metaKey||be.shiftKey))switch(be.keyCode){case 13:be.preventDefault(),be.stopPropagation(),this._execute(this._activeIndex);break;case 38:be.preventDefault(),be.stopPropagation(),this._activatePreviousItem();break;case 40:be.preventDefault(),be.stopPropagation(),this._activateNextItem();break}}_activateNextItem(){if(!this._results||this._results.length===0)return;let be=this._activeIndex,st=this._results.length,ft=beai-qi),tn=Ee.slice(0,Wa),ri=Ee.slice(Wa);for(let ai=0,qi=ri.length;aiQr.command===Yr&&vd.JSONExt.deepEqual(Qr.args,Nr))||null}}})(hd||(hd={}));var wv=class xt extends to{constructor(be){super({node:Kf.createNode()}),this._childIndex=-1,this._activeIndex=-1,this._openTimerID=0,this._closeTimerID=0,this._items=[],this._childMenu=null,this._parentMenu=null,this._aboutToClose=new Ml(this),this._menuRequested=new Ml(this),this.addClass("lm-Menu"),this.setFlag(to.Flag.DisallowLayout),this.commands=be.commands,this.renderer=be.renderer||xt.defaultRenderer}dispose(){this.close(),this._items.length=0,super.dispose()}get aboutToClose(){return this._aboutToClose}get menuRequested(){return this._menuRequested}get parentMenu(){return this._parentMenu}get childMenu(){return this._childMenu}get rootMenu(){let be=this;for(;be._parentMenu;)be=be._parentMenu;return be}get leafMenu(){let be=this;for(;be._childMenu;)be=be._childMenu;return be}get contentNode(){return this.node.getElementsByClassName("lm-Menu-content")[0]}get activeItem(){return this._items[this._activeIndex]||null}set activeItem(be){this.activeIndex=be?this._items.indexOf(be):-1}get activeIndex(){return this._activeIndex}set activeIndex(be){(be<0||be>=this._items.length)&&(be=-1),be!==-1&&!Kf.canActivate(this._items[be])&&(be=-1),this._activeIndex!==be&&(this._activeIndex=be,this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())}get items(){return this._items}activateNextItem(){let be=this._items.length,st=this._activeIndex,ft=st{this.activeIndex=Cr}})}fd.render(Hr,this.contentNode)}onCloseRequest(be){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;let st=this._childMenu;st&&(this._childIndex=-1,this._childMenu=null,st._parentMenu=null,st.close());let ft=this._parentMenu;ft&&(this._parentMenu=null,ft._childIndex=-1,ft._childMenu=null,ft.activate()),this.isAttached&&this._aboutToClose.emit(void 0),super.onCloseRequest(be)}_evtKeyDown(be){be.preventDefault(),be.stopPropagation();let st=be.keyCode;if(st===13){this.triggerActiveItem();return}if(st===27){this.close();return}if(st===37){this._parentMenu?this.close():this._menuRequested.emit("previous");return}if(st===38){this.activatePreviousItem();return}if(st===39){let Hr=this.activeItem;Hr&&Hr.type==="submenu"?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next");return}if(st===40){this.activateNextItem();return}let ft=kp().keyForKeydownEvent(be);if(!ft)return;let Lt=this._activeIndex+1,Xt=Kf.findMnemonic(this._items,ft,Lt);Xt.index!==-1&&!Xt.multiple?(this.activeIndex=Xt.index,this.triggerActiveItem()):Xt.index!==-1?this.activeIndex=Xt.index:Xt.auto!==-1&&(this.activeIndex=Xt.auto)}_evtMouseUp(be){be.button===0&&(be.preventDefault(),be.stopPropagation(),this.triggerActiveItem())}_evtMouseMove(be){let st=Fi.ArrayExt.findFirstIndex(this.contentNode.children,Lt=>Rl.hitTest(Lt,be.clientX,be.clientY));if(st===this._activeIndex)return;if(this.activeIndex=st,st=this.activeIndex,st===this._childIndex){this._cancelOpenTimer(),this._cancelCloseTimer();return}this._childIndex!==-1&&this._startCloseTimer(),this._cancelOpenTimer();let ft=this.activeItem;!ft||ft.type!=="submenu"||!ft.submenu||this._startOpenTimer()}_evtMouseEnter(be){for(let st=this._parentMenu;st;st=st._parentMenu)st._cancelOpenTimer(),st._cancelCloseTimer(),st.activeIndex=st._childIndex}_evtMouseLeave(be){if(this._cancelOpenTimer(),!this._childMenu){this.activeIndex=-1;return}let{clientX:st,clientY:ft}=be;if(Rl.hitTest(this._childMenu.node,st,ft)){this._cancelCloseTimer();return}this.activeIndex=-1,this._startCloseTimer()}_evtMouseDown(be){this._parentMenu||(Kf.hitTestMenus(this,be.clientX,be.clientY)?(be.preventDefault(),be.stopPropagation()):this.close())}_openChildMenu(be=!1){let st=this.activeItem;if(!st||st.type!=="submenu"||!st.submenu){this._closeChildMenu();return}let ft=st.submenu;if(ft===this._childMenu)return;xt.saveWindowData(),this._closeChildMenu(),this._childMenu=ft,this._childIndex=this._activeIndex,ft._parentMenu=this,$i.sendMessage(this,to.Msg.UpdateRequest);let Lt=this.contentNode.children[this._activeIndex];Kf.openSubmenu(ft,Lt),be&&(ft.activeIndex=-1,ft.activateNextItem()),ft.activate()}_closeChildMenu(){this._childMenu&&this._childMenu.close()}_startOpenTimer(){this._openTimerID===0&&(this._openTimerID=window.setTimeout(()=>{this._openTimerID=0,this._openChildMenu()},Kf.TIMER_DELAY))}_startCloseTimer(){this._closeTimerID===0&&(this._closeTimerID=window.setTimeout(()=>{this._closeTimerID=0,this._closeChildMenu()},Kf.TIMER_DELAY))}_cancelOpenTimer(){this._openTimerID!==0&&(clearTimeout(this._openTimerID),this._openTimerID=0)}_cancelCloseTimer(){this._closeTimerID!==0&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)}static saveWindowData(){Kf.saveWindowData()}};(function(xt){class be{renderItem(ft){let Lt=this.createItemClass(ft),Xt=this.createItemDataset(ft),Hr=this.createItemARIA(ft);return Sl.li({className:Lt,dataset:Xt,tabindex:"0",onfocus:ft.onfocus,...Hr},this.renderIcon(ft),this.renderLabel(ft),this.renderShortcut(ft),this.renderSubmenu(ft))}renderIcon(ft){let Lt=this.createIconClass(ft);return Sl.div({className:Lt},ft.item.icon,ft.item.iconLabel)}renderLabel(ft){let Lt=this.formatLabel(ft);return Sl.div({className:"lm-Menu-itemLabel"},Lt)}renderShortcut(ft){let Lt=this.formatShortcut(ft);return Sl.div({className:"lm-Menu-itemShortcut"},Lt)}renderSubmenu(ft){return Sl.div({className:"lm-Menu-itemSubmenuIcon"})}createItemClass(ft){let Lt="lm-Menu-item";ft.item.isEnabled||(Lt+=" lm-mod-disabled"),ft.item.isToggled&&(Lt+=" lm-mod-toggled"),ft.item.isVisible||(Lt+=" lm-mod-hidden"),ft.active&&(Lt+=" lm-mod-active"),ft.collapsed&&(Lt+=" lm-mod-collapsed");let Xt=ft.item.className;return Xt&&(Lt+=` ${Xt}`),Lt}createItemDataset(ft){let Lt,{type:Xt,command:Hr,dataset:Cr}=ft.item;return Xt==="command"?Lt={...Cr,type:Xt,command:Hr}:Lt={...Cr,type:Xt},Lt}createIconClass(ft){let Lt="lm-Menu-itemIcon",Xt=ft.item.iconClass;return Xt?`${Lt} ${Xt}`:Lt}createItemARIA(ft){let Lt={};switch(ft.item.type){case"separator":Lt.role="presentation";break;case"submenu":Lt["aria-haspopup"]="true",ft.item.isEnabled||(Lt["aria-disabled"]="true");break;default:ft.item.isEnabled||(Lt["aria-disabled"]="true"),Lt.role="menuitem"}return Lt}formatLabel(ft){let{label:Lt,mnemonic:Xt}=ft.item;if(Xt<0||Xt>=Lt.length)return Lt;let Hr=Lt.slice(0,Xt),Cr=Lt.slice(Xt+1),jr=Lt[Xt],Jr=Sl.span({className:"lm-Menu-itemMnemonic"},jr);return[Hr,Jr,Cr]}formatShortcut(ft){let Lt=ft.item.keyBinding;return Lt?cd.formatKeystroke(Lt.keys):null}}xt.Renderer=be,xt.defaultRenderer=new be})(wv||(wv={}));var Kf;(function(xt){xt.TIMER_DELAY=300,xt.SUBMENU_OVERLAP=3;let be=null,st=0;function ft(){return st>0?(st--,be):zr()}function Lt(){be=zr(),st++}xt.saveWindowData=Lt;function Xt(){let Qr=document.createElement("div"),Sa=document.createElement("ul");return Sa.className="lm-Menu-content",Qr.appendChild(Sa),Sa.setAttribute("role","menu"),Qr.tabIndex=0,Qr}xt.createNode=Xt;function Hr(Qr){return Qr.type!=="separator"&&Qr.isEnabled&&Qr.isVisible}xt.canActivate=Hr;function Cr(Qr,Sa){return new Nr(Qr.commands,Sa)}xt.createItem=Cr;function jr(Qr,Sa,Da){for(let Ee=Qr;Ee;Ee=Ee.childMenu)if(Rl.hitTest(Ee.node,Sa,Da))return!0;return!1}xt.hitTestMenus=jr;function Jr(Qr){let Sa=new Array(Qr.length);Fi.ArrayExt.fill(Sa,!1);let Da=0,Ee=Qr.length;for(;Da=0;--ga){let Wa=Qr[ga];if(Wa.isVisible){if(Wa.type!=="separator")break;Sa[ga]=!0}}let Ga=!1;for(;++Dari+qi&&(Sa=ri+qi-ls),!ga&&Da+Ys>ai+Tn&&(Da>ai+Tn?Da=ai+Tn-Ys:Da=Da-Ys),ji.transform=`translate(${Math.max(0,Sa)}px, ${Math.max(0,Da)}px`,ji.opacity="1"}xt.openRootMenu=Gr;function ta(Qr,Sa){let Da=ft(),Ee=Da.pageXOffset,ga=Da.pageYOffset,Ga=Da.clientWidth,Wa=Da.clientHeight;$i.sendMessage(Qr,to.Msg.UpdateRequest);let tn=Wa,ri=Qr.node,ai=ri.style;ai.opacity="0",ai.maxHeight=`${tn}px`,to.attach(Qr,document.body);let{width:qi,height:Tn}=ri.getBoundingClientRect(),Va=Rl.boxSizing(Qr.node),ki=Sa.getBoundingClientRect(),ji=ki.right-xt.SUBMENU_OVERLAP;ji+qi>Ee+Ga&&(ji=ki.left+xt.SUBMENU_OVERLAP-qi);let ls=ki.top-Va.borderTop-Va.paddingTop;ls+Tn>ga+Wa&&(ls=ki.bottom+Va.borderBottom+Va.paddingBottom-Tn),ai.transform=`translate(${Math.max(0,ji)}px, ${Math.max(0,ls)}px`,ai.opacity="1"}xt.openSubmenu=ta;function Yr(Qr,Sa,Da){let Ee=-1,ga=-1,Ga=!1,Wa=Sa.toUpperCase();for(let tn=0,ri=Qr.length;tn=0&&VaEe.command===Sa&&vd.JSONExt.deepEqual(Ee.args,Da))||null}return null}}})(Kf||(Kf={}));var iA;(function(xt){function be(Hr,Cr){let jr=ft(Hr.selector),Jr=Hr.rank!==void 0?Hr.rank:1/0;return{...Hr,selector:jr,rank:Jr,id:Cr}}xt.createItem=be;function st(Hr,Cr,jr,Jr){let zr=Cr.target;if(!zr)return null;let Gr=Cr.currentTarget;if(!Gr||!Gr.contains(zr)&&(zr=document.elementFromPoint(Cr.clientX,Cr.clientY),!zr||!Gr.contains(zr)))return null;let ta=[],Yr=Hr.slice();for(;zr!==null;){let Nr=[];for(let Qr=0,Sa=Yr.length;Qr=this._titles.length)&&(be=-1),this._currentIndex===be)return;let st=this._currentIndex,ft=this._titles[st]||null,Lt=be,Xt=this._titles[Lt]||null;this._currentIndex=Lt,this._previousTitle=ft,this.update(),this._currentChanged.emit({previousIndex:st,previousTitle:ft,currentIndex:Lt,currentTitle:Xt})}get name(){return this._name}set name(be){this._name=be,be?this.contentNode.setAttribute("aria-label",be):this.contentNode.removeAttribute("aria-label")}get orientation(){return this._orientation}set orientation(be){this._orientation!==be&&(this._releaseMouse(),this._orientation=be,this.dataset.orientation=be,this.contentNode.setAttribute("aria-orientation",be))}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(be){this._addButtonEnabled!==be&&(this._addButtonEnabled=be,be?this.addButtonNode.classList.remove("lm-mod-hidden"):this.addButtonNode.classList.add("lm-mod-hidden"))}get titles(){return this._titles}get contentNode(){return this.node.getElementsByClassName("lm-TabBar-content")[0]}get addButtonNode(){return this.node.getElementsByClassName("lm-TabBar-addButton")[0]}addTab(be){return this.insertTab(this._titles.length,be)}insertTab(be,st){this._releaseMouse();let ft=ph.asTitle(st),Lt=this._titles.indexOf(ft),Xt=Math.max(0,Math.min(be,this._titles.length));return Lt===-1?(Fi.ArrayExt.insert(this._titles,Xt,ft),ft.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(Xt,ft),ft):(Xt===this._titles.length&&Xt--,Lt===Xt||(Fi.ArrayExt.move(this._titles,Lt,Xt),this.update(),this._adjustCurrentForMove(Lt,Xt)),ft)}removeTab(be){this.removeTabAt(this._titles.indexOf(be))}removeTabAt(be){this._releaseMouse();let st=Fi.ArrayExt.removeAt(this._titles,be);st&&(st.changed.disconnect(this._onTitleChanged,this),st===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(be,st))}clearTabs(){if(this._titles.length===0)return;this._releaseMouse();for(let ft of this._titles)ft.changed.disconnect(this._onTitleChanged,this);let be=this.currentIndex,st=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),be!==-1&&this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:-1,currentTitle:null})}releaseMouse(){this._releaseMouse()}handleEvent(be){switch(be.type){case"pointerdown":this._evtPointerDown(be);break;case"pointermove":this._evtPointerMove(be);break;case"pointerup":this._evtPointerUp(be);break;case"dblclick":this._evtDblClick(be);break;case"keydown":be.eventPhase===Event.CAPTURING_PHASE?this._evtKeyDownCapturing(be):this._evtKeyDown(be);break;case"contextmenu":be.preventDefault(),be.stopPropagation();break}}onBeforeAttach(be){this.node.addEventListener("pointerdown",this),this.node.addEventListener("dblclick",this),this.node.addEventListener("keydown",this)}onAfterDetach(be){this.node.removeEventListener("pointerdown",this),this.node.removeEventListener("dblclick",this),this.node.removeEventListener("keydown",this),this._releaseMouse()}onUpdateRequest(be){var st;let ft=this._titles,Lt=this.renderer,Xt=this.currentTitle,Hr=new Array(ft.length),Cr=(st=this._getCurrentTabindex())!==null&&st!==void 0?st:this._currentIndex>-1?this._currentIndex:0;for(let jr=0,Jr=ft.length;jrRl.hitTest(Hr,be.clientX,be.clientY));if(ft===-1)return;let Lt=this.titles[ft],Xt=st[ft].querySelector(".lm-TabBar-tabLabel");if(Xt&&Xt.contains(be.target)){let Hr=Lt.label||"",Cr=Xt.innerHTML;Xt.innerHTML="";let jr=document.createElement("input");jr.classList.add("lm-TabBar-tabInput"),jr.value=Hr,Xt.appendChild(jr);let Jr=()=>{jr.removeEventListener("blur",Jr),Xt.innerHTML=Cr,this.node.addEventListener("keydown",this)};jr.addEventListener("dblclick",zr=>zr.stopPropagation()),jr.addEventListener("blur",Jr),jr.addEventListener("keydown",zr=>{zr.key==="Enter"?(jr.value!==""&&(Lt.label=Lt.caption=jr.value),Jr()):zr.key==="Escape"&&Jr()}),this.node.removeEventListener("keydown",this),jr.select(),jr.focus(),Xt.children.length>0&&Xt.children[0].focus()}}_evtKeyDownCapturing(be){be.eventPhase===Event.CAPTURING_PHASE&&(be.preventDefault(),be.stopPropagation(),be.key==="Escape"&&this._releaseMouse())}_evtKeyDown(be){var st,ft,Lt;if(!(be.key==="Tab"||be.eventPhase===Event.CAPTURING_PHASE)){if(be.key==="Enter"||be.key==="Spacebar"||be.key===" "){let Xt=document.activeElement;if(this.addButtonEnabled&&this.addButtonNode.contains(Xt))be.preventDefault(),be.stopPropagation(),this._addRequested.emit();else{let Hr=Fi.ArrayExt.findFirstIndex(this.contentNode.children,Cr=>Cr.contains(Xt));Hr>=0&&(be.preventDefault(),be.stopPropagation(),this.currentIndex=Hr)}}else if(JF.includes(be.key)){let Xt=[...this.contentNode.children];if(this.addButtonEnabled&&Xt.push(this.addButtonNode),Xt.length<=1)return;be.preventDefault(),be.stopPropagation();let Hr=Xt.indexOf(document.activeElement);Hr===-1&&(Hr=this._currentIndex);let Cr;be.key==="ArrowRight"&&this._orientation==="horizontal"||be.key==="ArrowDown"&&this._orientation==="vertical"?Cr=(st=Xt[Hr+1])!==null&&st!==void 0?st:Xt[0]:be.key==="ArrowLeft"&&this._orientation==="horizontal"||be.key==="ArrowUp"&&this._orientation==="vertical"?Cr=(ft=Xt[Hr-1])!==null&&ft!==void 0?ft:Xt[Xt.length-1]:be.key==="Home"?Cr=Xt[0]:be.key==="End"&&(Cr=Xt[Xt.length-1]),Cr&&((Lt=Xt[Hr])===null||Lt===void 0||Lt.setAttribute("tabindex","-1"),Cr?.setAttribute("tabindex","0"),Cr.focus())}}}_evtPointerDown(be){if(be.button!==0&&be.button!==1||this._dragData||be.target.classList.contains("lm-TabBar-tabInput"))return;let st=this.addButtonEnabled&&this.addButtonNode.contains(be.target),ft=this.contentNode.children,Lt=Fi.ArrayExt.findFirstIndex(ft,Hr=>Rl.hitTest(Hr,be.clientX,be.clientY));if(Lt===-1&&!st||(be.preventDefault(),be.stopPropagation(),this._dragData={tab:ft[Lt],index:Lt,pressX:be.clientX,pressY:be.clientY,tabPos:-1,tabSize:-1,tabPressPos:-1,targetIndex:-1,tabLayout:null,contentRect:null,override:null,dragActive:!1,dragAborted:!1,detachRequested:!1},this.document.addEventListener("pointerup",this,!0),be.button===1||st))return;let Xt=ft[Lt].querySelector(this.renderer.closeIconSelector);Xt&&Xt.contains(be.target)||(this.tabsMovable&&(this.document.addEventListener("pointermove",this,!0),this.document.addEventListener("keydown",this,!0),this.document.addEventListener("contextmenu",this,!0)),this.allowDeselect&&this.currentIndex===Lt?this.currentIndex=-1:this.currentIndex=Lt,this.currentIndex!==-1&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}_evtPointerMove(be){let st=this._dragData;if(!st)return;be.preventDefault(),be.stopPropagation();let ft=this.contentNode.children;if(!(!st.dragActive&&!ph.dragExceeded(st,be))){if(!st.dragActive){let Lt=st.tab.getBoundingClientRect();this._orientation==="horizontal"?(st.tabPos=st.tab.offsetLeft,st.tabSize=Lt.width,st.tabPressPos=st.pressX-Lt.left):(st.tabPos=st.tab.offsetTop,st.tabSize=Lt.height,st.tabPressPos=st.pressY-Lt.top),st.tabPressOffset={x:st.pressX-Lt.left,y:st.pressY-Lt.top},st.tabLayout=ph.snapTabLayout(ft,this._orientation),st.contentRect=this.contentNode.getBoundingClientRect(),st.override=Zf.overrideCursor("default"),st.tab.classList.add("lm-mod-dragging"),this.addClass("lm-mod-dragging"),st.dragActive=!0}if(!st.detachRequested&&ph.detachExceeded(st,be)){st.detachRequested=!0;let Lt=st.index,Xt=be.clientX,Hr=be.clientY,Cr=ft[Lt],jr=this._titles[Lt];if(this._tabDetachRequested.emit({index:Lt,title:jr,tab:Cr,clientX:Xt,clientY:Hr,offset:st.tabPressOffset}),st.dragAborted)return}ph.layoutTabs(ft,st,be,this._orientation)}}_evtPointerUp(be){if(be.button!==0&&be.button!==1)return;let st=this._dragData;if(!st)return;if(be.preventDefault(),be.stopPropagation(),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),!st.dragActive){if(this._dragData=null,this.addButtonEnabled&&this.addButtonNode.contains(be.target)){this._addRequested.emit(void 0);return}let Xt=this.contentNode.children,Hr=Fi.ArrayExt.findFirstIndex(Xt,Jr=>Rl.hitTest(Jr,be.clientX,be.clientY));if(Hr!==st.index)return;let Cr=this._titles[Hr];if(!Cr.closable)return;if(be.button===1){this._tabCloseRequested.emit({index:Hr,title:Cr});return}let jr=Xt[Hr].querySelector(this.renderer.closeIconSelector);if(jr&&jr.contains(be.target)){this._tabCloseRequested.emit({index:Hr,title:Cr});return}return}if(be.button!==0)return;ph.finalizeTabPosition(st,this._orientation),st.tab.classList.remove("lm-mod-dragging");let ft=ph.parseTransitionDuration(st.tab);setTimeout(()=>{if(st.dragAborted)return;this._dragData=null,ph.resetTabPositions(this.contentNode.children,this._orientation),st.override.dispose(),this.removeClass("lm-mod-dragging");let Lt=st.index,Xt=st.targetIndex;Xt===-1||Lt===Xt||(Fi.ArrayExt.move(this._titles,Lt,Xt),this._adjustCurrentForMove(Lt,Xt),this._tabMoved.emit({fromIndex:Lt,toIndex:Xt,title:this._titles[Xt]}),$i.sendMessage(this,to.Msg.UpdateRequest))},ft)}_releaseMouse(){let be=this._dragData;be&&(this._dragData=null,this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),be.dragAborted=!0,be.dragActive&&(ph.resetTabPositions(this.contentNode.children,this._orientation),be.override.dispose(),be.tab.classList.remove("lm-mod-dragging"),this.removeClass("lm-mod-dragging")))}_adjustCurrentForInsert(be,st){let ft=this.currentTitle,Lt=this._currentIndex,Xt=this.insertBehavior;if(Xt==="select-tab"||Xt==="select-tab-if-needed"&&Lt===-1){this._currentIndex=be,this._previousTitle=ft,this._currentChanged.emit({previousIndex:Lt,previousTitle:ft,currentIndex:be,currentTitle:st});return}Lt>=be&&this._currentIndex++}_adjustCurrentForMove(be,st){this._currentIndex===be?this._currentIndex=st:this._currentIndex=st?this._currentIndex++:this._currentIndex>be&&this._currentIndex<=st&&this._currentIndex--}_adjustCurrentForRemove(be,st){let ft=this._currentIndex,Lt=this.removeBehavior;if(ft!==be){ft>be&&this._currentIndex--;return}if(this._titles.length===0){this._currentIndex=-1,this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:-1,currentTitle:null});return}if(Lt==="select-tab-after"){this._currentIndex=Math.min(be,this._titles.length-1),this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if(Lt==="select-tab-before"){this._currentIndex=Math.max(0,be-1),this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if(Lt==="select-previous-tab"){this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(be,this._titles.length-1),this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}this._currentIndex=-1,this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:-1,currentTitle:null})}_onTitleChanged(be){this.update()}};(function(xt){class be{constructor(){this.closeIconSelector=".lm-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap,this._uuid=++be._nInstance}renderTab(ft){let Lt=ft.title.caption,Xt=this.createTabKey(ft),Hr=Xt,Cr=this.createTabStyle(ft),jr=this.createTabClass(ft),Jr=this.createTabDataset(ft),zr=this.createTabARIA(ft);return ft.title.closable?Sl.li({id:Hr,key:Xt,className:jr,title:Lt,style:Cr,dataset:Jr,...zr},this.renderIcon(ft),this.renderLabel(ft),this.renderCloseIcon(ft)):Sl.li({id:Hr,key:Xt,className:jr,title:Lt,style:Cr,dataset:Jr,...zr},this.renderIcon(ft),this.renderLabel(ft))}renderIcon(ft){let{title:Lt}=ft,Xt=this.createIconClass(ft);return Sl.div({className:Xt},Lt.icon,Lt.iconLabel)}renderLabel(ft){return Sl.div({className:"lm-TabBar-tabLabel"},ft.title.label)}renderCloseIcon(ft){return Sl.div({className:"lm-TabBar-tabCloseIcon"})}createTabKey(ft){let Lt=this._tabKeys.get(ft.title);return Lt===void 0&&(Lt=`tab-key-${this._uuid}-${this._tabID++}`,this._tabKeys.set(ft.title,Lt)),Lt}createTabStyle(ft){return{zIndex:`${ft.zIndex}`}}createTabClass(ft){let Lt="lm-TabBar-tab";return ft.title.className&&(Lt+=` ${ft.title.className}`),ft.title.closable&&(Lt+=" lm-mod-closable"),ft.current&&(Lt+=" lm-mod-current"),Lt}createTabDataset(ft){return ft.title.dataset}createTabARIA(ft){var Lt;return{role:"tab","aria-selected":ft.current.toString(),tabindex:`${(Lt=ft.tabIndex)!==null&&Lt!==void 0?Lt:"-1"}`}}createIconClass(ft){let Lt="lm-TabBar-tabIcon",Xt=ft.title.iconClass;return Xt?`${Lt} ${Xt}`:Lt}}be._nInstance=0,xt.Renderer=be,xt.defaultRenderer=new be,xt.addButtonSelector=".lm-TabBar-addButton"})(Ip||(Ip={}));var ph;(function(xt){xt.DRAG_THRESHOLD=5,xt.DETACH_THRESHOLD=20;function be(){let zr=document.createElement("div"),Gr=document.createElement("ul");Gr.setAttribute("role","tablist"),Gr.className="lm-TabBar-content",zr.appendChild(Gr);let ta=document.createElement("div");return ta.className="lm-TabBar-addButton lm-mod-hidden",ta.setAttribute("tabindex","-1"),ta.setAttribute("role","button"),zr.appendChild(ta),zr}xt.createNode=be;function st(zr){return zr instanceof D0?zr:new D0(zr)}xt.asTitle=st;function ft(zr){let Gr=window.getComputedStyle(zr);return 1e3*(parseFloat(Gr.transitionDuration)||0)}xt.parseTransitionDuration=ft;function Lt(zr,Gr){let ta=new Array(zr.length);for(let Yr=0,Nr=zr.length;Yr=xt.DRAG_THRESHOLD||Yr>=xt.DRAG_THRESHOLD}xt.dragExceeded=Xt;function Hr(zr,Gr){let ta=zr.contentRect;return Gr.clientX=ta.right+xt.DETACH_THRESHOLD||Gr.clientY=ta.bottom+xt.DETACH_THRESHOLD}xt.detachExceeded=Hr;function Cr(zr,Gr,ta,Yr){let Nr,Qr,Sa,Da;Yr==="horizontal"?(Nr=Gr.pressX,Qr=ta.clientX-Gr.contentRect.left,Sa=ta.clientX,Da=Gr.contentRect.width):(Nr=Gr.pressY,Qr=ta.clientY-Gr.contentRect.top,Sa=ta.clientY,Da=Gr.contentRect.height);let Ee=Gr.index,ga=Qr-Gr.tabPressPos,Ga=ga+Gr.tabSize;for(let Wa=0,tn=zr.length;Wa>1);if(WaGr.index&&Ga>qi)ri=`${-Gr.tabSize-ai.margin}px`,Ee=Math.max(Ee,Wa);else if(Wa===Gr.index){let Tn=Sa-Nr,Va=Da-(Gr.tabPos+Gr.tabSize);ri=`${Math.max(-Gr.tabPos,Math.min(Tn,Va))}px`}else ri="";Yr==="horizontal"?zr[Wa].style.left=ri:zr[Wa].style.top=ri}Gr.targetIndex=Ee}xt.layoutTabs=Cr;function jr(zr,Gr){let ta;Gr==="horizontal"?ta=zr.contentRect.width:ta=zr.contentRect.height;let Yr;if(zr.targetIndex===zr.index)Yr=0;else if(zr.targetIndex>zr.index){let Sa=zr.tabLayout[zr.targetIndex];Yr=Sa.pos+Sa.size-zr.tabSize-zr.tabPos}else Yr=zr.tabLayout[zr.targetIndex].pos-zr.tabPos;let Nr=ta-(zr.tabPos+zr.tabSize),Qr=Math.max(-zr.tabPos,Math.min(Yr,Nr));Gr==="horizontal"?zr.tab.style.left=`${Qr}px`:zr.tab.style.top=`${Qr}px`}xt.finalizeTabPosition=jr;function Jr(zr,Gr){for(let ta of zr)Gr==="horizontal"?ta.style.left="":ta.style.top=""}xt.resetTabPositions=Jr})(ph||(ph={}));var fb=class extends pd{constructor(be){super(),this._spacing=4,this._dirty=!1,this._root=null,this._box=null,this._items=new Map,this.renderer=be.renderer,be.spacing!==void 0&&(this._spacing=R0.clampDimension(be.spacing)),this._document=be.document||document,this._hiddenMode=be.hiddenMode!==void 0?be.hiddenMode:to.HiddenMode.Display}dispose(){let be=this[Symbol.iterator]();this._items.forEach(st=>{st.dispose()}),this._box=null,this._root=null,this._items.clear();for(let st of be)st.dispose();super.dispose()}get hiddenMode(){return this._hiddenMode}set hiddenMode(be){if(this._hiddenMode!==be){this._hiddenMode=be;for(let st of this.tabBars())if(st.titles.length>1)for(let ft of st.titles)ft.owner.hiddenMode=this._hiddenMode}}get spacing(){return this._spacing}set spacing(be){be=R0.clampDimension(be),this._spacing!==be&&(this._spacing=be,this.parent&&this.parent.fit())}get isEmpty(){return this._root===null}[Symbol.iterator](){return this._root?this._root.iterAllWidgets():(0,Fi.empty)()}widgets(){return this._root?this._root.iterUserWidgets():(0,Fi.empty)()}selectedWidgets(){return this._root?this._root.iterSelectedWidgets():(0,Fi.empty)()}tabBars(){return this._root?this._root.iterTabBars():(0,Fi.empty)()}handles(){return this._root?this._root.iterHandles():(0,Fi.empty)()}moveHandle(be,st,ft){let Lt=be.classList.contains("lm-mod-hidden");if(!this._root||Lt)return;let Xt=this._root.findSplitNode(be);if(!Xt)return;let Hr;Xt.node.orientation==="horizontal"?Hr=st-be.offsetLeft:Hr=ft-be.offsetTop,Hr!==0&&(Xt.node.holdSizes(),sh.adjust(Xt.node.sizers,Xt.index,Hr),this.parent&&this.parent.update())}saveLayout(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}}restoreLayout(be){let st=new Set,ft;be.main?ft=lc.normalizeAreaConfig(be.main,st):ft=null;let Lt=this.widgets(),Xt=this.tabBars(),Hr=this.handles();this._root=null;for(let Cr of Lt)st.has(Cr)||(Cr.parent=null);for(let Cr of Xt)Cr.dispose();for(let Cr of Hr)Cr.parentNode&&Cr.parentNode.removeChild(Cr);for(let Cr of st)Cr.parent=this.parent;ft?this._root=lc.realizeAreaConfig(ft,{createTabBar:Cr=>this._createTabBar(),createHandle:()=>this._createHandle()},this._document):this._root=null,this.parent&&(st.forEach(Cr=>{this.attachWidget(Cr)}),this.parent.fit())}addWidget(be,st={}){let ft=st.ref||null,Lt=st.mode||"tab-after",Xt=null;if(this._root&&ft&&(Xt=this._root.findTabNode(ft)),ft&&!Xt)throw new Error("Reference widget is not in the layout.");switch(be.parent=this.parent,Lt){case"tab-after":this._insertTab(be,ft,Xt,!0);break;case"tab-before":this._insertTab(be,ft,Xt,!1);break;case"split-top":this._insertSplit(be,ft,Xt,"vertical",!1);break;case"split-left":this._insertSplit(be,ft,Xt,"horizontal",!1);break;case"split-right":this._insertSplit(be,ft,Xt,"horizontal",!0);break;case"split-bottom":this._insertSplit(be,ft,Xt,"vertical",!0);break;case"merge-top":this._insertSplit(be,ft,Xt,"vertical",!1,!0);break;case"merge-left":this._insertSplit(be,ft,Xt,"horizontal",!1,!0);break;case"merge-right":this._insertSplit(be,ft,Xt,"horizontal",!0,!0);break;case"merge-bottom":this._insertSplit(be,ft,Xt,"vertical",!0,!0);break}this.parent&&(this.attachWidget(be),this.parent.fit())}removeWidget(be){this._removeWidget(be),this.parent&&(this.detachWidget(be),this.parent.fit())}hitTestTabAreas(be,st){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=Rl.boxSizing(this.parent.node));let ft=this.parent.node.getBoundingClientRect(),Lt=be-ft.left-this._box.borderLeft,Xt=st-ft.top-this._box.borderTop,Hr=this._root.hitTestTabNodes(Lt,Xt);if(!Hr)return null;let{tabBar:Cr,top:jr,left:Jr,width:zr,height:Gr}=Hr,ta=this._box.borderLeft+this._box.borderRight,Yr=this._box.borderTop+this._box.borderBottom,Nr=ft.width-ta-(Jr+zr),Qr=ft.height-Yr-(jr+Gr);return{tabBar:Cr,x:Lt,y:Xt,top:jr,left:Jr,right:Nr,bottom:Qr,width:zr,height:Gr}}init(){super.init();for(let be of this)this.attachWidget(be);for(let be of this.handles())this.parent.node.appendChild(be);this.parent.fit()}attachWidget(be){this.parent.node!==be.node.parentNode&&(this._items.set(be,new Tv(be)),this.parent.isAttached&&$i.sendMessage(be,to.Msg.BeforeAttach),this.parent.node.appendChild(be.node),this.parent.isAttached&&$i.sendMessage(be,to.Msg.AfterAttach))}detachWidget(be){if(this.parent.node!==be.node.parentNode)return;this.parent.isAttached&&$i.sendMessage(be,to.Msg.BeforeDetach),this.parent.node.removeChild(be.node),this.parent.isAttached&&$i.sendMessage(be,to.Msg.AfterDetach);let st=this._items.get(be);st&&(this._items.delete(be),st.dispose())}onBeforeShow(be){super.onBeforeShow(be),this.parent.update()}onBeforeAttach(be){super.onBeforeAttach(be),this.parent.fit()}onChildShown(be){this.parent.fit()}onChildHidden(be){this.parent.fit()}onResize(be){this.parent.isVisible&&this._update(be.width,be.height)}onUpdateRequest(be){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(be){this.parent.isAttached&&this._fit()}_removeWidget(be){if(!this._root)return;let st=this._root.findTabNode(be);if(!st)return;if(lc.removeAria(be),st.tabBar.titles.length>1){if(st.tabBar.removeTab(be.title),this._hiddenMode===to.HiddenMode.Scale&&st.tabBar.titles.length==1){let ta=st.tabBar.titles[0].owner;ta.hiddenMode=to.HiddenMode.Display}return}if(st.tabBar.dispose(),this._root===st){this._root=null;return}this._root.holdAllSizes();let ft=st.parent;st.parent=null;let Lt=Fi.ArrayExt.removeFirstOf(ft.children,st),Xt=Fi.ArrayExt.removeAt(ft.handles,Lt);if(Fi.ArrayExt.removeAt(ft.sizers,Lt),Xt.parentNode&&Xt.parentNode.removeChild(Xt),ft.children.length>1){ft.syncHandles();return}let Hr=ft.parent;ft.parent=null;let Cr=ft.children[0],jr=ft.handles[0];if(ft.children.length=0,ft.handles.length=0,ft.sizers.length=0,jr.parentNode&&jr.parentNode.removeChild(jr),this._root===ft){Cr.parent=null,this._root=Cr;return}let Jr=Hr,zr=Jr.children.indexOf(ft);if(Cr instanceof lc.TabLayoutNode){Cr.parent=Jr,Jr.children[zr]=Cr;return}let Gr=Fi.ArrayExt.removeAt(Jr.handles,zr);Fi.ArrayExt.removeAt(Jr.children,zr),Fi.ArrayExt.removeAt(Jr.sizers,zr),Gr.parentNode&&Gr.parentNode.removeChild(Gr);for(let ta=0,Yr=Cr.children.length;ta=this._left+this._width||Nr=this._top+this._height?null:this}createConfig(){let Yr=this.tabBar.titles.map(Qr=>Qr.owner),Nr=this.tabBar.currentIndex;return{type:"tab-area",widgets:Yr,currentIndex:Nr}}holdAllSizes(){}fit(Yr,Nr){let Qr=0,Sa=0,Da=1/0,Ee=1/0,ga=Nr.get(this.tabBar),Ga=this.tabBar.currentTitle,Wa=Ga?Nr.get(Ga.owner):void 0,[tn,ri]=this.sizers;return ga&&ga.fit(),Wa&&Wa.fit(),ga&&!ga.isHidden?(Qr=Math.max(Qr,ga.minWidth),Sa+=ga.minHeight,tn.minSize=ga.minHeight,tn.maxSize=ga.maxHeight):(tn.minSize=0,tn.maxSize=0),Wa&&!Wa.isHidden?(Qr=Math.max(Qr,Wa.minWidth),Sa+=Wa.minHeight,ri.minSize=Wa.minHeight,ri.maxSize=1/0):(ri.minSize=0,ri.maxSize=1/0),{minWidth:Qr,minHeight:Sa,maxWidth:Da,maxHeight:Ee}}update(Yr,Nr,Qr,Sa,Da,Ee){this._top=Nr,this._left=Yr,this._width=Qr,this._height=Sa;let ga=Ee.get(this.tabBar),Ga=this.tabBar.currentTitle,Wa=Ga?Ee.get(Ga.owner):void 0;if(sh.calc(this.sizers,Sa),ga&&!ga.isHidden){let tn=this.sizers[0].size;ga.update(Yr,Nr,Qr,tn),Nr+=tn}if(Wa&&!Wa.isHidden){let tn=this.sizers[1].size;Wa.update(Yr,Nr,Qr,tn)}}}xt.TabLayoutNode=Lt;class Xt{constructor(Yr){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=Yr}*iterAllWidgets(){for(let Yr of this.children)yield*Yr.iterAllWidgets()}*iterUserWidgets(){for(let Yr of this.children)yield*Yr.iterUserWidgets()}*iterSelectedWidgets(){for(let Yr of this.children)yield*Yr.iterSelectedWidgets()}*iterTabBars(){for(let Yr of this.children)yield*Yr.iterTabBars()}*iterHandles(){yield*this.handles;for(let Yr of this.children)yield*Yr.iterHandles()}findTabNode(Yr){for(let Nr=0,Qr=this.children.length;NrSa.createConfig());return{type:"split-area",orientation:Yr,children:Qr,sizes:Nr}}syncHandles(){this.handles.forEach((Yr,Nr)=>{Yr.setAttribute("data-orientation",this.orientation),Nr===this.handles.length-1?Yr.classList.add("lm-mod-hidden"):Yr.classList.remove("lm-mod-hidden")})}holdSizes(){for(let Yr of this.sizers)Yr.sizeHint=Yr.size}holdAllSizes(){for(let Yr of this.children)Yr.holdAllSizes();this.holdSizes()}normalizeSizes(){let Yr=this.sizers.length;if(Yr===0)return;this.holdSizes();let Nr=this.sizers.reduce((Qr,Sa)=>Qr+Sa.sizeHint,0);if(Nr===0)for(let Qr of this.sizers)Qr.size=Qr.sizeHint=1/Yr;else for(let Qr of this.sizers)Qr.size=Qr.sizeHint/=Nr;this.normalized=!0}createNormalizedSizes(){let Yr=this.sizers.length;if(Yr===0)return[];let Nr=this.sizers.map(Sa=>Sa.size),Qr=Nr.reduce((Sa,Da)=>Sa+Da,0);if(Qr===0)for(let Sa=Nr.length-1;Sa>-1;Sa--)Nr[Sa]=1/Yr;else for(let Sa=Nr.length-1;Sa>-1;Sa--)Nr[Sa]/=Qr;return Nr}fit(Yr,Nr){let Qr=this.orientation==="horizontal",Sa=Math.max(0,this.children.length-1)*Yr,Da=Qr?Sa:0,Ee=Qr?0:Sa,ga=1/0,Ga=1/0;for(let Wa=0,tn=this.children.length;Wa=Nr.length)&&(Qr=0),{type:"tab-area",widgets:Nr,currentIndex:Qr}}function Jr(ta,Yr){let Nr=ta.orientation,Qr=[],Sa=[];for(let Da=0,Ee=ta.children.length;Da{let Ee=ft(Sa,Yr,Nr),ga=be(ta.sizes[Da]),Ga=Yr.createHandle();Qr.children.push(Ee),Qr.handles.push(Ga),Qr.sizers.push(ga),Ee.parent=Qr}),Qr.syncHandles(),Qr.normalizeSizes(),Qr}})(lc||(lc={}));var bg=class xt extends to{constructor(be={}){super(),this._drag=null,this._tabsMovable=!0,this._tabsConstrained=!1,this._addButtonEnabled=!1,this._pressData=null,this._layoutModified=new Ml(this),this._addRequested=new Ml(this),this.addClass("lm-DockPanel"),this._document=be.document||document,this._mode=be.mode||"multiple-document",this._renderer=be.renderer||xt.defaultRenderer,this._edges=be.edges||Qu.DEFAULT_EDGES,be.tabsMovable!==void 0&&(this._tabsMovable=be.tabsMovable),be.tabsConstrained!==void 0&&(this._tabsConstrained=be.tabsConstrained),be.addButtonEnabled!==void 0&&(this._addButtonEnabled=be.addButtonEnabled),this.dataset.mode=this._mode;let st={createTabBar:()=>this._createTabBar(),createHandle:()=>this._createHandle()};this.layout=new fb({document:this._document,renderer:st,spacing:be.spacing,hiddenMode:be.hiddenMode}),this.overlay=be.overlay||new xt.Overlay,this.node.appendChild(this.overlay.node)}dispose(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),super.dispose()}get hiddenMode(){return this.layout.hiddenMode}set hiddenMode(be){this.layout.hiddenMode=be}get layoutModified(){return this._layoutModified}get addRequested(){return this._addRequested}get renderer(){return this.layout.renderer}get spacing(){return this.layout.spacing}set spacing(be){this.layout.spacing=be}get mode(){return this._mode}set mode(be){if(this._mode===be)return;this._mode=be,this.dataset.mode=be;let st=this.layout;switch(be){case"multiple-document":for(let ft of st.tabBars())ft.show();break;case"single-document":st.restoreLayout(Qu.createSingleDocumentConfig(this));break;default:throw"unreachable"}$i.postMessage(this,Qu.LayoutModified)}get tabsMovable(){return this._tabsMovable}set tabsMovable(be){this._tabsMovable=be;for(let st of this.tabBars())st.tabsMovable=be}get tabsConstrained(){return this._tabsConstrained}set tabsConstrained(be){this._tabsConstrained=be}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(be){this._addButtonEnabled=be;for(let st of this.tabBars())st.addButtonEnabled=be}get isEmpty(){return this.layout.isEmpty}*widgets(){yield*this.layout.widgets()}*selectedWidgets(){yield*this.layout.selectedWidgets()}*tabBars(){yield*this.layout.tabBars()}*handles(){yield*this.layout.handles()}selectWidget(be){let st=(0,Fi.find)(this.tabBars(),ft=>ft.titles.indexOf(be.title)!==-1);if(!st)throw new Error("Widget is not contained in the dock panel.");st.currentTitle=be.title}activateWidget(be){this.selectWidget(be),be.activate()}saveLayout(){return this.layout.saveLayout()}restoreLayout(be){this._mode="multiple-document",this.layout.restoreLayout(be),(jf.IS_EDGE||jf.IS_IE)&&$i.flush(),$i.postMessage(this,Qu.LayoutModified)}addWidget(be,st={}){this._mode==="single-document"?this.layout.addWidget(be):this.layout.addWidget(be,st),$i.postMessage(this,Qu.LayoutModified)}processMessage(be){be.type==="layout-modified"?this._layoutModified.emit(void 0):super.processMessage(be)}handleEvent(be){switch(be.type){case"lm-dragenter":this._evtDragEnter(be);break;case"lm-dragleave":this._evtDragLeave(be);break;case"lm-dragover":this._evtDragOver(be);break;case"lm-drop":this._evtDrop(be);break;case"pointerdown":this._evtPointerDown(be);break;case"pointermove":this._evtPointerMove(be);break;case"pointerup":this._evtPointerUp(be);break;case"keydown":this._evtKeyDown(be);break;case"contextmenu":be.preventDefault(),be.stopPropagation();break}}onBeforeAttach(be){this.node.addEventListener("lm-dragenter",this),this.node.addEventListener("lm-dragleave",this),this.node.addEventListener("lm-dragover",this),this.node.addEventListener("lm-drop",this),this.node.addEventListener("pointerdown",this)}onAfterDetach(be){this.node.removeEventListener("lm-dragenter",this),this.node.removeEventListener("lm-dragleave",this),this.node.removeEventListener("lm-dragover",this),this.node.removeEventListener("lm-drop",this),this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(be){Qu.isGeneratedTabBarProperty.get(be.child)||be.child.addClass("lm-DockPanel-widget")}onChildRemoved(be){Qu.isGeneratedTabBarProperty.get(be.child)||(be.child.removeClass("lm-DockPanel-widget"),$i.postMessage(this,Qu.LayoutModified))}_evtDragEnter(be){be.mimeData.hasData("application/vnd.lumino.widget-factory")&&(be.preventDefault(),be.stopPropagation())}_evtDragLeave(be){be.preventDefault(),!(this._tabsConstrained&&be.source!==this)&&(be.stopPropagation(),this.overlay.hide(1))}_evtDragOver(be){be.preventDefault(),this._tabsConstrained&&be.source!==this||this._showOverlay(be.clientX,be.clientY)==="invalid"?be.dropAction="none":(be.stopPropagation(),be.dropAction=be.proposedAction)}_evtDrop(be){if(be.preventDefault(),this.overlay.hide(0),be.proposedAction==="none"){be.dropAction="none";return}let{clientX:st,clientY:ft}=be,{zone:Lt,target:Xt}=Qu.findDropTarget(this,st,ft,this._edges);if(this._tabsConstrained&&be.source!==this||Lt==="invalid"){be.dropAction="none";return}let Cr=be.mimeData.getData("application/vnd.lumino.widget-factory");if(typeof Cr!="function"){be.dropAction="none";return}let jr=Cr();if(!(jr instanceof to)){be.dropAction="none";return}if(jr.contains(this)){be.dropAction="none";return}let Jr=Xt?Qu.getDropRef(Xt.tabBar):null;switch(Lt){case"root-all":this.addWidget(jr);break;case"root-top":this.addWidget(jr,{mode:"split-top"});break;case"root-left":this.addWidget(jr,{mode:"split-left"});break;case"root-right":this.addWidget(jr,{mode:"split-right"});break;case"root-bottom":this.addWidget(jr,{mode:"split-bottom"});break;case"widget-all":this.addWidget(jr,{mode:"tab-after",ref:Jr});break;case"widget-top":this.addWidget(jr,{mode:"split-top",ref:Jr});break;case"widget-left":this.addWidget(jr,{mode:"split-left",ref:Jr});break;case"widget-right":this.addWidget(jr,{mode:"split-right",ref:Jr});break;case"widget-bottom":this.addWidget(jr,{mode:"split-bottom",ref:Jr});break;case"widget-tab":this.addWidget(jr,{mode:"tab-after",ref:Jr});break;default:throw"unreachable"}be.dropAction=be.proposedAction,be.stopPropagation(),this.activateWidget(jr)}_evtKeyDown(be){be.preventDefault(),be.stopPropagation(),be.keyCode===27&&(this._releaseMouse(),$i.postMessage(this,Qu.LayoutModified))}_evtPointerDown(be){if(be.button!==0)return;let st=this.layout,ft=be.target,Lt=(0,Fi.find)(st.handles(),zr=>zr.contains(ft));if(!Lt)return;be.preventDefault(),be.stopPropagation(),this._document.addEventListener("keydown",this,!0),this._document.addEventListener("pointerup",this,!0),this._document.addEventListener("pointermove",this,!0),this._document.addEventListener("contextmenu",this,!0);let Xt=Lt.getBoundingClientRect(),Hr=be.clientX-Xt.left,Cr=be.clientY-Xt.top,jr=window.getComputedStyle(Lt),Jr=Zf.overrideCursor(jr.cursor,this._document);this._pressData={handle:Lt,deltaX:Hr,deltaY:Cr,override:Jr}}_evtPointerMove(be){if(!this._pressData)return;be.preventDefault(),be.stopPropagation();let st=this.node.getBoundingClientRect(),ft=be.clientX-st.left-this._pressData.deltaX,Lt=be.clientY-st.top-this._pressData.deltaY;this.layout.moveHandle(this._pressData.handle,ft,Lt)}_evtPointerUp(be){be.button===0&&(be.preventDefault(),be.stopPropagation(),this._releaseMouse(),$i.postMessage(this,Qu.LayoutModified))}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._document.removeEventListener("keydown",this,!0),this._document.removeEventListener("pointerup",this,!0),this._document.removeEventListener("pointermove",this,!0),this._document.removeEventListener("contextmenu",this,!0))}_showOverlay(be,st){let{zone:ft,target:Lt}=Qu.findDropTarget(this,be,st,this._edges);if(ft==="invalid")return this.overlay.hide(100),ft;let Xt,Hr,Cr,jr,Jr=Rl.boxSizing(this.node),zr=this.node.getBoundingClientRect();switch(ft){case"root-all":Xt=Jr.paddingTop,Hr=Jr.paddingLeft,Cr=Jr.paddingRight,jr=Jr.paddingBottom;break;case"root-top":Xt=Jr.paddingTop,Hr=Jr.paddingLeft,Cr=Jr.paddingRight,jr=zr.height*Qu.GOLDEN_RATIO;break;case"root-left":Xt=Jr.paddingTop,Hr=Jr.paddingLeft,Cr=zr.width*Qu.GOLDEN_RATIO,jr=Jr.paddingBottom;break;case"root-right":Xt=Jr.paddingTop,Hr=zr.width*Qu.GOLDEN_RATIO,Cr=Jr.paddingRight,jr=Jr.paddingBottom;break;case"root-bottom":Xt=zr.height*Qu.GOLDEN_RATIO,Hr=Jr.paddingLeft,Cr=Jr.paddingRight,jr=Jr.paddingBottom;break;case"widget-all":Xt=Lt.top,Hr=Lt.left,Cr=Lt.right,jr=Lt.bottom;break;case"widget-top":Xt=Lt.top,Hr=Lt.left,Cr=Lt.right,jr=Lt.bottom+Lt.height/2;break;case"widget-left":Xt=Lt.top,Hr=Lt.left,Cr=Lt.right+Lt.width/2,jr=Lt.bottom;break;case"widget-right":Xt=Lt.top,Hr=Lt.left+Lt.width/2,Cr=Lt.right,jr=Lt.bottom;break;case"widget-bottom":Xt=Lt.top+Lt.height/2,Hr=Lt.left,Cr=Lt.right,jr=Lt.bottom;break;case"widget-tab":{let Gr=Lt.tabBar.node.getBoundingClientRect().height;Xt=Lt.top,Hr=Lt.left,Cr=Lt.right,jr=Lt.bottom+Lt.height-Gr;break}default:throw"unreachable"}return this.overlay.show({top:Xt,left:Hr,right:Cr,bottom:jr}),ft}_createTabBar(){let be=this._renderer.createTabBar(this._document);return Qu.isGeneratedTabBarProperty.set(be,!0),this._mode==="single-document"&&be.hide(),be.tabsMovable=this._tabsMovable,be.allowDeselect=!1,be.addButtonEnabled=this._addButtonEnabled,be.removeBehavior="select-previous-tab",be.insertBehavior="select-tab-if-needed",be.tabMoved.connect(this._onTabMoved,this),be.currentChanged.connect(this._onCurrentChanged,this),be.tabCloseRequested.connect(this._onTabCloseRequested,this),be.tabDetachRequested.connect(this._onTabDetachRequested,this),be.tabActivateRequested.connect(this._onTabActivateRequested,this),be.addRequested.connect(this._onTabAddRequested,this),be}_createHandle(){return this._renderer.createHandle()}_onTabMoved(){$i.postMessage(this,Qu.LayoutModified)}_onCurrentChanged(be,st){let{previousTitle:ft,currentTitle:Lt}=st;ft&&ft.owner.hide(),Lt&&Lt.owner.show(),(jf.IS_EDGE||jf.IS_IE)&&$i.flush(),$i.postMessage(this,Qu.LayoutModified)}_onTabAddRequested(be){this._addRequested.emit(be)}_onTabActivateRequested(be,st){st.title.owner.activate()}_onTabCloseRequested(be,st){st.title.owner.close()}_onTabDetachRequested(be,st){if(this._drag)return;be.releaseMouse();let{title:ft,tab:Lt,clientX:Xt,clientY:Hr,offset:Cr}=st,jr=new vd.MimeData,Jr=()=>ft.owner;jr.setData("application/vnd.lumino.widget-factory",Jr);let zr=Lt.cloneNode(!0);Cr&&(zr.style.top=`-${Cr.y}px`,zr.style.left=`-${Cr.x}px`),this._drag=new Zf({document:this._document,mimeData:jr,dragImage:zr,proposedAction:"move",supportedActions:"move",source:this}),Lt.classList.add("lm-mod-hidden");let Gr=()=>{this._drag=null,Lt.classList.remove("lm-mod-hidden")};this._drag.start(Xt,Hr).then(Gr)}};(function(xt){class be{constructor(){this._timer=-1,this._hidden=!0,this.node=document.createElement("div"),this.node.classList.add("lm-DockPanel-overlay"),this.node.classList.add("lm-mod-hidden"),this.node.style.position="absolute",this.node.style.contain="strict"}show(Lt){let Xt=this.node.style;Xt.top=`${Lt.top}px`,Xt.left=`${Lt.left}px`,Xt.right=`${Lt.right}px`,Xt.bottom=`${Lt.bottom}px`,clearTimeout(this._timer),this._timer=-1,this._hidden&&(this._hidden=!1,this.node.classList.remove("lm-mod-hidden"))}hide(Lt){if(!this._hidden){if(Lt<=0){clearTimeout(this._timer),this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden");return}this._timer===-1&&(this._timer=window.setTimeout(()=>{this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden")},Lt))}}}xt.Overlay=be;class st{createTabBar(Lt){let Xt=new Ip({document:Lt});return Xt.addClass("lm-DockPanel-tabBar"),Xt}createHandle(){let Lt=document.createElement("div");return Lt.className="lm-DockPanel-handle",Lt}}xt.Renderer=st,xt.defaultRenderer=new st})(bg||(bg={}));var Qu;(function(xt){xt.GOLDEN_RATIO=.618,xt.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},xt.LayoutModified=new Ud("layout-modified"),xt.isGeneratedTabBarProperty=new $f({name:"isGeneratedTabBar",create:()=>!1});function be(Lt){if(Lt.isEmpty)return{main:null};let Xt=Array.from(Lt.widgets()),Hr=Lt.selectedWidgets().next().value,Cr=Hr?Xt.indexOf(Hr):-1;return{main:{type:"tab-area",widgets:Xt,currentIndex:Cr}}}xt.createSingleDocumentConfig=be;function st(Lt,Xt,Hr,Cr){if(!Rl.hitTest(Lt.node,Xt,Hr))return{zone:"invalid",target:null};let jr=Lt.layout;if(jr.isEmpty)return{zone:"root-all",target:null};if(Lt.mode==="multiple-document"){let ga=Lt.node.getBoundingClientRect(),Ga=Xt-ga.left+1,Wa=Hr-ga.top+1,tn=ga.right-Xt,ri=ga.bottom-Hr;switch(Math.min(Wa,tn,ri,Ga)){case Wa:if(WaQr&&ta>Qr&&Gr>Sa&&Yr>Sa)return{zone:"widget-all",target:Jr};zr/=Qr,Gr/=Sa,ta/=Qr,Yr/=Sa;let Da=Math.min(zr,Gr,ta,Yr),Ee;switch(Da){case zr:Ee="widget-left";break;case Gr:Ee="widget-top";break;case ta:Ee="widget-right";break;case Yr:Ee="widget-bottom";break;default:throw"unreachable"}return{zone:Ee,target:Jr}}xt.findDropTarget=st;function ft(Lt){return Lt.titles.length===0?null:Lt.currentTitle?Lt.currentTitle.owner:Lt.titles[Lt.titles.length-1].owner}xt.getDropRef=ft})(Qu||(Qu={}));var z0=class xt extends pd{constructor(be={}){super(be),this._dirty=!1,this._rowSpacing=4,this._columnSpacing=4,this._items=[],this._rowStarts=[],this._columnStarts=[],this._rowSizers=[new Vh],this._columnSizers=[new Vh],this._box=null,be.rowCount!==void 0&&Hc.reallocSizers(this._rowSizers,be.rowCount),be.columnCount!==void 0&&Hc.reallocSizers(this._columnSizers,be.columnCount),be.rowSpacing!==void 0&&(this._rowSpacing=Hc.clampValue(be.rowSpacing)),be.columnSpacing!==void 0&&(this._columnSpacing=Hc.clampValue(be.columnSpacing))}dispose(){for(let be of this._items){let st=be.widget;be.dispose(),st.dispose()}this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,super.dispose()}get rowCount(){return this._rowSizers.length}set rowCount(be){be!==this.rowCount&&(Hc.reallocSizers(this._rowSizers,be),this.parent&&this.parent.fit())}get columnCount(){return this._columnSizers.length}set columnCount(be){be!==this.columnCount&&(Hc.reallocSizers(this._columnSizers,be),this.parent&&this.parent.fit())}get rowSpacing(){return this._rowSpacing}set rowSpacing(be){be=Hc.clampValue(be),this._rowSpacing!==be&&(this._rowSpacing=be,this.parent&&this.parent.fit())}get columnSpacing(){return this._columnSpacing}set columnSpacing(be){be=Hc.clampValue(be),this._columnSpacing!==be&&(this._columnSpacing=be,this.parent&&this.parent.fit())}rowStretch(be){let st=this._rowSizers[be];return st?st.stretch:-1}setRowStretch(be,st){let ft=this._rowSizers[be];ft&&(st=Hc.clampValue(st),ft.stretch!==st&&(ft.stretch=st,this.parent&&this.parent.update()))}columnStretch(be){let st=this._columnSizers[be];return st?st.stretch:-1}setColumnStretch(be,st){let ft=this._columnSizers[be];ft&&(st=Hc.clampValue(st),ft.stretch!==st&&(ft.stretch=st,this.parent&&this.parent.update()))}*[Symbol.iterator](){for(let be of this._items)yield be.widget}addWidget(be){Fi.ArrayExt.findFirstIndex(this._items,ft=>ft.widget===be)===-1&&(this._items.push(new Tv(be)),this.parent&&this.attachWidget(be))}removeWidget(be){let st=Fi.ArrayExt.findFirstIndex(this._items,Lt=>Lt.widget===be);if(st===-1)return;let ft=Fi.ArrayExt.removeAt(this._items,st);this.parent&&this.detachWidget(be),ft.dispose()}init(){super.init();for(let be of this)this.attachWidget(be)}attachWidget(be){this.parent.isAttached&&$i.sendMessage(be,to.Msg.BeforeAttach),this.parent.node.appendChild(be.node),this.parent.isAttached&&$i.sendMessage(be,to.Msg.AfterAttach),this.parent.fit()}detachWidget(be){this.parent.isAttached&&$i.sendMessage(be,to.Msg.BeforeDetach),this.parent.node.removeChild(be.node),this.parent.isAttached&&$i.sendMessage(be,to.Msg.AfterDetach),this.parent.fit()}onBeforeShow(be){super.onBeforeShow(be),this.parent.update()}onBeforeAttach(be){super.onBeforeAttach(be),this.parent.fit()}onChildShown(be){this.parent.fit()}onChildHidden(be){this.parent.fit()}onResize(be){this.parent.isVisible&&this._update(be.width,be.height)}onUpdateRequest(be){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(be){this.parent.isAttached&&this._fit()}_fit(){for(let jr=0,Jr=this.rowCount;jr!jr.isHidden);for(let jr=0,Jr=be.length;jr({row:0,column:0,rowSpan:1,columnSpan:1}),changed:Cr});function be(jr){let Jr=Math.max(0,Math.floor(jr.row||0)),zr=Math.max(0,Math.floor(jr.column||0)),Gr=Math.max(1,Math.floor(jr.rowSpan||0)),ta=Math.max(1,Math.floor(jr.columnSpan||0));return{row:Jr,column:zr,rowSpan:Gr,columnSpan:ta}}xt.normalizeConfig=be;function st(jr){return Math.max(0,Math.floor(jr))}xt.clampValue=st;function ft(jr,Jr){let zr=xt.cellConfigProperty.get(jr.widget),Gr=xt.cellConfigProperty.get(Jr.widget);return zr.rowSpan-Gr.rowSpan}xt.rowSpanCmp=ft;function Lt(jr,Jr){let zr=xt.cellConfigProperty.get(jr.widget),Gr=xt.cellConfigProperty.get(Jr.widget);return zr.columnSpan-Gr.columnSpan}xt.columnSpanCmp=Lt;function Xt(jr,Jr){for(Jr=Math.max(1,Math.floor(Jr));jr.lengthJr&&(jr.length=Jr)}xt.reallocSizers=Xt;function Hr(jr,Jr,zr,Gr){if(zr=Gr)return;let Yr=(Gr-ta)/(zr-Jr+1);for(let Nr=Jr;Nr<=zr;++Nr)jr[Nr].minSize+=Yr}xt.distributeMin=Hr;function Cr(jr){jr.parent&&jr.parent.layout instanceof z0&&jr.parent.fit()}})(Hc||(Hc={}));var xg=class xt extends to{constructor(be={}){super({node:wg.createNode()}),this._activeIndex=-1,this._tabFocusIndex=0,this._menus=[],this._childMenu=null,this._overflowMenu=null,this._menuItemSizes=[],this._overflowIndex=-1,this.addClass("lm-MenuBar"),this.setFlag(to.Flag.DisallowLayout),this.renderer=be.renderer||xt.defaultRenderer,this._forceItemsPosition=be.forceItemsPosition||{forceX:!0,forceY:!0},this._overflowMenuOptions=be.overflowMenuOptions||{isVisible:!0}}dispose(){this._closeChildMenu(),this._menus.length=0,super.dispose()}get childMenu(){return this._childMenu}get overflowIndex(){return this._overflowIndex}get overflowMenu(){return this._overflowMenu}get contentNode(){return this.node.getElementsByClassName("lm-MenuBar-content")[0]}get activeMenu(){return this._menus[this._activeIndex]||null}set activeMenu(be){this.activeIndex=be?this._menus.indexOf(be):-1}get activeIndex(){return this._activeIndex}set activeIndex(be){(be<0||be>=this._menus.length)&&(be=-1),be>-1&&this._menus[be].items.length===0&&(be=-1),this._activeIndex!==be&&(this._activeIndex=be,this.update())}get menus(){return this._menus}openActiveMenu(){this._activeIndex!==-1&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))}addMenu(be,st=!0){this.insertMenu(this._menus.length,be,st)}insertMenu(be,st,ft=!0){this._closeChildMenu();let Lt=this._menus.indexOf(st),Xt=Math.max(0,Math.min(be,this._menus.length));if(Lt===-1){Fi.ArrayExt.insert(this._menus,Xt,st),st.addClass("lm-MenuBar-menu"),st.aboutToClose.connect(this._onMenuAboutToClose,this),st.menuRequested.connect(this._onMenuMenuRequested,this),st.title.changed.connect(this._onTitleChanged,this),ft&&this.update();return}Xt===this._menus.length&&Xt--,Lt!==Xt&&(Fi.ArrayExt.move(this._menus,Lt,Xt),ft&&this.update())}removeMenu(be,st=!0){this.removeMenuAt(this._menus.indexOf(be),st)}removeMenuAt(be,st=!0){this._closeChildMenu();let ft=Fi.ArrayExt.removeAt(this._menus,be);ft&&(ft.aboutToClose.disconnect(this._onMenuAboutToClose,this),ft.menuRequested.disconnect(this._onMenuMenuRequested,this),ft.title.changed.disconnect(this._onTitleChanged,this),ft.removeClass("lm-MenuBar-menu"),st&&this.update())}clearMenus(){if(this._menus.length!==0){this._closeChildMenu();for(let be of this._menus)be.aboutToClose.disconnect(this._onMenuAboutToClose,this),be.menuRequested.disconnect(this._onMenuMenuRequested,this),be.title.changed.disconnect(this._onTitleChanged,this),be.removeClass("lm-MenuBar-menu");this._menus.length=0,this.update()}}handleEvent(be){switch(be.type){case"keydown":this._evtKeyDown(be);break;case"mousedown":this._evtMouseDown(be);break;case"mousemove":this._evtMouseMove(be);break;case"focusout":this._evtFocusOut(be);break;case"contextmenu":be.preventDefault(),be.stopPropagation();break}}onBeforeAttach(be){this.node.addEventListener("keydown",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("focusout",this),this.node.addEventListener("contextmenu",this)}onAfterDetach(be){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("focusout",this),this.node.removeEventListener("contextmenu",this),this._closeChildMenu()}onActivateRequest(be){this.isAttached&&this._focusItemAt(0)}onResize(be){this.update(),super.onResize(be)}onUpdateRequest(be){var st;let ft=this._menus,Lt=this.renderer,Xt=this._activeIndex,Hr=this._tabFocusIndex>=0&&this._tabFocusIndex-1?this._overflowIndex:ft.length,jr=0,Jr=!1;Cr=this._overflowMenu!==null?Cr-1:Cr;let zr=new Array(Cr);for(let Gr=0;Gr{this._tabFocusIndex=Gr,this.activeIndex=Gr}}),jr+=this._menuItemSizes[Gr],ft[Gr].title.label===this._overflowMenuOptions.title&&(Jr=!0,Cr--);if(this._overflowMenuOptions.isVisible){if(this._overflowIndex>-1&&!Jr){if(this._overflowMenu===null){let Gr=(st=this._overflowMenuOptions.title)!==null&&st!==void 0?st:"...";this._overflowMenu=new wv({commands:new cd}),this._overflowMenu.title.label=Gr,this._overflowMenu.title.mnemonic=0,this.addMenu(this._overflowMenu,!1)}for(let Gr=ft.length-2;Gr>=Cr;Gr--){let ta=this.menus[Gr];ta.title.mnemonic=0,this._overflowMenu.insertItem(0,{type:"submenu",submenu:ta}),this.removeMenu(ta,!1)}zr[Cr]=Lt.renderItem({title:this._overflowMenu.title,active:Cr===Xt&&ft[Cr].items.length!==0,tabbable:Cr===Hr,disabled:ft[Cr].items.length===0,onfocus:()=>{this._tabFocusIndex=Cr,this.activeIndex=Cr}}),Cr++}else if(this._overflowMenu!==null){let Gr=this._overflowMenu.items,ta=this.node.offsetWidth,Yr=this._overflowMenu.items.length;for(let Nr=0;Nrthis._menuItemSizes[Qr]){let Sa=Gr[0].submenu;this._overflowMenu.removeItemAt(0),this.insertMenu(Cr,Sa,!1),zr[Cr]=Lt.renderItem({title:Sa.title,active:!1,tabbable:Cr===Hr,disabled:ft[Cr].items.length===0,onfocus:()=>{this._tabFocusIndex=Cr,this.activeIndex=Cr}}),Cr++}}this._overflowMenu.items.length===0&&(this.removeMenu(this._overflowMenu,!1),zr.pop(),this._overflowMenu=null,this._overflowIndex=-1)}}fd.render(zr,this.contentNode),this._updateOverflowIndex()}_updateOverflowIndex(){if(!this._overflowMenuOptions.isVisible)return;let be=this.contentNode.childNodes,st=this.node.offsetWidth,ft=0,Lt=-1,Xt=be.length;if(this._menuItemSizes.length==0)for(let Hr=0;Hrst&&Lt===-1&&(Lt=Hr)}else for(let Hr=0;Hrst){Lt=Hr;break}this._overflowIndex=Lt}_evtKeyDown(be){let st=be.keyCode;if(st===9){this.activeIndex=-1;return}if(be.preventDefault(),be.stopPropagation(),st===13||st===32||st===38||st===40){if(this.activeIndex=this._tabFocusIndex,this.activeIndex!==this._tabFocusIndex)return;this.openActiveMenu();return}if(st===27){this._closeChildMenu(),this._focusItemAt(this.activeIndex);return}if(st===37||st===39){let Hr=st===37?-1:1,Cr=this._tabFocusIndex+Hr,jr=this._menus.length;for(let Jr=0;JrRl.hitTest(ft,be.clientX,be.clientY));if(st===-1){this._closeChildMenu();return}if(be.button===0)if(this._childMenu)this._closeChildMenu(),this.activeIndex=st;else{be.preventDefault();let ft=this._positionForMenu(st);wv.saveWindowData(),this.activeIndex=st,this._openChildMenu(ft)}}_evtMouseMove(be){let st=Fi.ArrayExt.findFirstIndex(this.contentNode.children,Lt=>Rl.hitTest(Lt,be.clientX,be.clientY));if(st===this._activeIndex||st===-1&&this._childMenu)return;let ft=st>=0&&this._childMenu?this._positionForMenu(st):null;wv.saveWindowData(),this.activeIndex=st,ft&&this._openChildMenu(ft)}_positionForMenu(be){let st=this.contentNode.children[be],{left:ft,bottom:Lt}=st.getBoundingClientRect();return{top:Lt,left:ft}}_evtFocusOut(be){!this._childMenu&&!this.node.contains(be.relatedTarget)&&(this.activeIndex=-1)}_focusItemAt(be){let st=this.contentNode.childNodes[be];st&&st.focus()}_openChildMenu(be={}){let st=this.activeMenu;if(!st){this._closeChildMenu();return}let ft=this._childMenu;if(ft===st)return;this._childMenu=st,ft?ft.close():document.addEventListener("mousedown",this,!0),this._tabFocusIndex=this.activeIndex,$i.sendMessage(this,to.Msg.UpdateRequest);let{left:Lt,top:Xt}=be;(typeof Lt>"u"||typeof Xt>"u")&&({left:Lt,top:Xt}=this._positionForMenu(this._activeIndex)),ft||this.addClass("lm-mod-active"),st.items.length>0&&st.open(Lt,Xt,this._forceItemsPosition)}_closeChildMenu(){if(!this._childMenu)return;this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0);let be=this._childMenu;this._childMenu=null,be.close(),this.activeIndex=-1}_onMenuAboutToClose(be){be===this._childMenu&&(this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)}_onMenuMenuRequested(be,st){if(be!==this._childMenu)return;let ft=this._activeIndex,Lt=this._menus.length;switch(st){case"next":this.activeIndex=ft===Lt-1?0:ft+1;break;case"previous":this.activeIndex=ft===0?Lt-1:ft-1;break}this.openActiveMenu()}_onTitleChanged(){this.update()}};(function(xt){class be{renderItem(ft){let Lt=this.createItemClass(ft),Xt=this.createItemDataset(ft),Hr=this.createItemARIA(ft);return Sl.li({className:Lt,dataset:Xt,...ft.disabled?{}:{tabindex:ft.tabbable?"0":"-1"},onfocus:ft.onfocus,...Hr},this.renderIcon(ft),this.renderLabel(ft))}renderIcon(ft){let Lt=this.createIconClass(ft);return Sl.div({className:Lt},ft.title.icon,ft.title.iconLabel)}renderLabel(ft){let Lt=this.formatLabel(ft);return Sl.div({className:"lm-MenuBar-itemLabel"},Lt)}createItemClass(ft){let Lt="lm-MenuBar-item";return ft.title.className&&(Lt+=` ${ft.title.className}`),ft.active&&!ft.disabled&&(Lt+=" lm-mod-active"),Lt}createItemDataset(ft){return ft.title.dataset}createItemARIA(ft){return{role:"menuitem","aria-haspopup":"true","aria-disabled":ft.disabled?"true":"false"}}createIconClass(ft){let Lt="lm-MenuBar-itemIcon",Xt=ft.title.iconClass;return Xt?`${Lt} ${Xt}`:Lt}formatLabel(ft){let{label:Lt,mnemonic:Xt}=ft.title;if(Xt<0||Xt>=Lt.length)return Lt;let Hr=Lt.slice(0,Xt),Cr=Lt.slice(Xt+1),jr=Lt[Xt],Jr=Sl.span({className:"lm-MenuBar-itemMnemonic"},jr);return[Hr,Jr,Cr]}}xt.Renderer=be,xt.defaultRenderer=new be})(xg||(xg={}));var wg;(function(xt){function be(){let ft=document.createElement("div"),Lt=document.createElement("ul");return Lt.className="lm-MenuBar-content",ft.appendChild(Lt),Lt.setAttribute("role","menubar"),ft}xt.createNode=be;function st(ft,Lt,Xt){let Hr=-1,Cr=-1,jr=!1,Jr=Lt.toUpperCase();for(let zr=0,Gr=ft.length;zr=0&&Nr1&&this.widgets.forEach(st=>{st.hiddenMode=this._hiddenMode}))}dispose(){for(let be of this._items)be.dispose();this._box=null,this._items.length=0,super.dispose()}attachWidget(be,st){this._hiddenMode===to.HiddenMode.Scale&&this._items.length>0?(this._items.length===1&&(this.widgets[0].hiddenMode=to.HiddenMode.Scale),st.hiddenMode=to.HiddenMode.Scale):st.hiddenMode=to.HiddenMode.Display,Fi.ArrayExt.insert(this._items,be,new Tv(st)),this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeAttach),this.parent.node.appendChild(st.node),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterAttach),this.parent.fit()}moveWidget(be,st,ft){Fi.ArrayExt.move(this._items,be,st),this.parent.update()}detachWidget(be,st){let ft=Fi.ArrayExt.removeAt(this._items,be);this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeDetach),this.parent.node.removeChild(st.node),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterDetach),ft.widget.node.style.zIndex="",this._hiddenMode===to.HiddenMode.Scale&&(st.hiddenMode=to.HiddenMode.Display,this._items.length===1&&(this._items[0].widget.hiddenMode=to.HiddenMode.Display)),ft.dispose(),this.parent.fit()}onBeforeShow(be){super.onBeforeShow(be),this.parent.update()}onBeforeAttach(be){super.onBeforeAttach(be),this.parent.fit()}onChildShown(be){this.parent.fit()}onChildHidden(be){this.parent.fit()}onResize(be){this.parent.isVisible&&this._update(be.width,be.height)}onUpdateRequest(be){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(be){this.parent.isAttached&&this._fit()}_fit(){let be=0,st=0;for(let Xt=0,Hr=this._items.length;Xt{this.createGraph(this._model)})}renderModel(be){if(this.hasGraphElement())return Promise.resolve();this._model=be;let st=be.data["image/png"];return st!=null?(this.updateImage(st),Promise.resolve()):this.createGraph(be)}hasGraphElement(){return this.node.querySelector(".plot-container")!==null}updateImage(be){this.hideGraph(),this._img_el.src="data:image/png;base64,"+be,this.showImage()}hideGraph(){let be=this.node.querySelector(".plot-container");be!=null&&(be.style.display="none")}showGraph(){let be=this.node.querySelector(".plot-container");be!=null&&(be.style.display="block")}hideImage(){let be=this.node.querySelector(".plot-img");be!=null&&(be.style.display="none")}showImage(){let be=this.node.querySelector(".plot-img");be!=null&&(be.style.display="block")}createGraph(be){let{data:st,layout:ft,frames:Lt,config:Xt}=be.data[this._mimeType];return ft.height||(ft.height=360),(async()=>(xt.Plotly===null&&(xt.Plotly=await Promise.resolve().then(()=>sd(fA())),xt._resolveLoadingPlotly()),xt.loadingPlotly))().then(()=>xt.Plotly.react(this.node,st,ft,Xt)).then(Cr=>{this.showGraph(),this.hideImage(),this.update(),Lt&&xt.Plotly.addFrames(this.node,Lt),this.node.offsetWidth>0&&this.node.offsetHeight>0&&xt.Plotly.toImage(Cr,{format:"png",width:this.node.offsetWidth,height:this.node.offsetHeight}).then(jr=>{let Jr=jr.split(",")[1];be.data["image/png"]!==Jr&&be.setData({data:{...be.data,"image/png":Jr}})}),this.node.on("plotly_webglcontextlost",()=>{let jr=be.data["image/png"];if(jr!=null)return this.updateImage(jr),Promise.resolve()})})}onAfterShow(be){this.update()}onResize(be){this.update()}onUpdateRequest(be){xt.Plotly&&this.isVisible&&this.hasGraphElement()&&xt.Plotly.redraw(this.node).then(()=>{xt.Plotly.Plots.resize(this.node)})}static{this.Plotly=null}static{this.loadingPlotly=new Promise(be=>{xt._resolveLoadingPlotly=be})}},tz={safe:!0,mimeTypes:[hA],createRenderer:xt=>new db(xt)},rz=[{id:"@jupyterlab/plotly-extension:factory",rendererFactory:tz,rank:2,dataType:"json",fileTypes:[{name:"plotly",mimeTypes:[hA],extensions:[".plotly",".plotly.json"],iconClass:ez}],documentWidgetFactoryOptions:{name:"Plotly",primaryFileType:"plotly",fileTypes:["plotly","json"],defaultFor:["plotly"]}}],sB=rz;export{hA as MIME_TYPE,db as RenderedPlotly,sB as default,tz as rendererFactory}; /*! Bundled license information: plotly.js/dist/plotly.js: diff --git a/js/package-lock.json b/js/package-lock.json index a8186ce5354..6196ad0ff5d 100644 --- a/js/package-lock.json +++ b/js/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@lumino/widgets": "~2.4.0", "lodash-es": "^4.17.21", - "plotly.js": "4.0.0" + "plotly.js": "4.1.0" }, "devDependencies": { "@jupyter/builder": "^1.2.2", @@ -955,6 +955,12 @@ "tslib": "^2.4.0" } }, + "node_modules/@types/d3": { + "version": "3.5.53", + "resolved": "https://registry.npmjs.org/@types/d3/-/d3-3.5.53.tgz", + "integrity": "sha512-8yKQA9cAS6+wGsJpBysmnhlaaxlN42Qizqkw+h2nILSlS+MAG2z4JdO6p+PJrJ+ACvimkmLJL281h157e52psQ==", + "license": "MIT" + }, "node_modules/@types/eslint": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", @@ -1545,9 +1551,9 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/country-iso-search": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/country-iso-search/-/country-iso-search-0.1.1.tgz", - "integrity": "sha512-JJxdoVmgZW3F4DdQ4Jq3NuVfqsk6XoHq8PE8QXNIv1BVwAKyJum2dahC7hsW+v60xwH7pm7g8BwCJ05aUabApg==", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/country-iso-search/-/country-iso-search-0.1.2.tgz", + "integrity": "sha512-7VMhhWPSNg/ivAUwp3BvxEGDycCfqiTggaV+hAW+N5+F+jzbEuY5HqvSMnGeP9CxKXBWO0fydbUgLUHmKj89vA==", "license": "MIT", "engines": { "node": ">=20" @@ -3048,20 +3054,22 @@ "dev": true }, "node_modules/plotly.js": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-4.0.0.tgz", - "integrity": "sha512-HegSI/5zMSl0vqGfGubSaPgWviSMsIsCI8WjLjCh4W2WOgSfVl2LZ+qbzrRvdshxqUAXAwUnLp45jQ3ph3tzxw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-4.1.0.tgz", + "integrity": "sha512-nALUa7ZYCYy9vvokce4sL+UUgh+Kp+Vz8Fq2ZS4yM7Oqc3ezUHLRJqHN8XkWa1JJrWG8chCujfTE7azQ7RXMxQ==", "license": "MIT", "dependencies": { "@plotly/d3": "3.8.2", "@plotly/d3-sankey": "0.12.3", "@plotly/d3-sankey-circular": "0.33.1", + "@plotly/point-cluster": "^3.1.9", "@plotly/regl": "^2.1.2", "@turf/area": "^7.3.5", "@turf/centroid": "^7.3.5", "@turf/meta": "^7.3.5", + "@types/d3": "^3.5.53", "base64-arraybuffer": "^1.0.2", - "country-iso-search": "^0.1.1", + "country-iso-search": "^0.1.2", "culori": "^4.0.2", "d3-force": "^1.2.1", "d3-format": "^1.4.5", diff --git a/js/package.json b/js/package.json index b7fd95a6c57..c10ced5cd31 100644 --- a/js/package.json +++ b/js/package.json @@ -19,7 +19,7 @@ }, "dependencies": { "lodash-es": "^4.17.21", - "plotly.js": "4.0.0", + "plotly.js": "4.1.0", "@lumino/widgets": "~2.4.0" }, "devDependencies": { diff --git a/plotly/graph_objs/layout/_legend.py b/plotly/graph_objs/layout/_legend.py index 3281187ad47..41f368aa77c 100644 --- a/plotly/graph_objs/layout/_legend.py +++ b/plotly/graph_objs/layout/_legend.py @@ -16,6 +16,7 @@ class Legend(_BaseLayoutHierarchyType): "entrywidthmode", "font", "groupclick", + "groupdoubleclick", "grouptitlefont", "indentation", "itemclick", @@ -198,6 +199,29 @@ def groupclick(self): def groupclick(self, val): self["groupclick"] = val + @property + def groupdoubleclick(self): + """ + Determines the behavior on legend group item double-click. + "toggleitem" toggles the visibility of the individual item + clicked on the graph. "togglegroup" toggles the visibility of + all items in the same legendgroup as the item clicked on the + graph. Defaults to the value of `groupclick`. + + The 'groupdoubleclick' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['toggleitem', 'togglegroup'] + + Returns + ------- + Any + """ + return self["groupdoubleclick"] + + @groupdoubleclick.setter + def groupdoubleclick(self, val): + self["groupdoubleclick"] = val + @property def grouptitlefont(self): """ @@ -702,6 +726,13 @@ def _prop_descriptions(self): item clicked on the graph. "togglegroup" toggles the visibility of all items in the same legendgroup as the item clicked on the graph. + groupdoubleclick + Determines the behavior on legend group item double- + click. "toggleitem" toggles the visibility of the + individual item clicked on the graph. "togglegroup" + toggles the visibility of all items in the same + legendgroup as the item clicked on the graph. Defaults + to the value of `groupclick`. grouptitlefont Sets the font for group titles in legend. Defaults to `legend.font` with its size increased about 10%. @@ -835,6 +866,7 @@ def __init__( entrywidthmode=None, font=None, groupclick=None, + groupdoubleclick=None, grouptitlefont=None, indentation=None, itemclick=None, @@ -889,6 +921,13 @@ def __init__( item clicked on the graph. "togglegroup" toggles the visibility of all items in the same legendgroup as the item clicked on the graph. + groupdoubleclick + Determines the behavior on legend group item double- + click. "toggleitem" toggles the visibility of the + individual item clicked on the graph. "togglegroup" + toggles the visibility of all items in the same + legendgroup as the item clicked on the graph. Defaults + to the value of `groupclick`. grouptitlefont Sets the font for group titles in legend. Defaults to `legend.font` with its size increased about 10%. @@ -1042,6 +1081,7 @@ def __init__( self._set_property("entrywidthmode", arg, entrywidthmode) self._set_property("font", arg, font) self._set_property("groupclick", arg, groupclick) + self._set_property("groupdoubleclick", arg, groupdoubleclick) self._set_property("grouptitlefont", arg, grouptitlefont) self._set_property("indentation", arg, indentation) self._set_property("itemclick", arg, itemclick) diff --git a/plotly/graph_objs/layout/_modebar.py b/plotly/graph_objs/layout/_modebar.py index 6f4cddba8c2..b19690ab530 100644 --- a/plotly/graph_objs/layout/_modebar.py +++ b/plotly/graph_objs/layout/_modebar.py @@ -56,7 +56,8 @@ def add(self): `config.modeBarButtonsToAdd` option. This may include "v1hovermode", "hoverclosest", "hovercompare", "togglehover", "togglespikelines", "drawline", "drawopenpath", - "drawclosedpath", "drawcircle", "drawrect", "eraseshape". + "drawclosedpath", "drawcircle", "drawrect", "eraseshape", + "downloadJson". The 'add' property is a string and must be specified as: - A string @@ -216,7 +217,7 @@ def _prop_descriptions(self): This may include "v1hovermode", "hoverclosest", "hovercompare", "togglehover", "togglespikelines", "drawline", "drawopenpath", "drawclosedpath", - "drawcircle", "drawrect", "eraseshape". + "drawcircle", "drawrect", "eraseshape", "downloadJson". bgcolor Sets the background color of the modebar. color @@ -281,7 +282,7 @@ def __init__( This may include "v1hovermode", "hoverclosest", "hovercompare", "togglehover", "togglespikelines", "drawline", "drawopenpath", "drawclosedpath", - "drawcircle", "drawrect", "eraseshape". + "drawcircle", "drawrect", "eraseshape", "downloadJson". bgcolor Sets the background color of the modebar. color diff --git a/plotly/graph_objs/layout/_xaxis.py b/plotly/graph_objs/layout/_xaxis.py index edc4c73998b..ad9978af648 100644 --- a/plotly/graph_objs/layout/_xaxis.py +++ b/plotly/graph_objs/layout/_xaxis.py @@ -1313,8 +1313,8 @@ def showline(self, val): def showspikes(self): """ Determines whether or not spikes (aka droplines) are drawn for - this axis. Note: This only takes affect when hovermode = - closest + this axis. Note that spikes will never be drawn when + `hovermode` is False. The 'showspikes' property is a boolean and must be specified as: - A boolean value: True or False @@ -2554,8 +2554,8 @@ def _prop_descriptions(self): drawn. showspikes Determines whether or not spikes (aka droplines) are - drawn for this axis. Note: This only takes affect when - hovermode = closest + drawn for this axis. Note that spikes will never be + drawn when `hovermode` is False. showticklabels Determines whether or not the tick labels are drawn. showtickprefix @@ -3186,8 +3186,8 @@ def __init__( drawn. showspikes Determines whether or not spikes (aka droplines) are - drawn for this axis. Note: This only takes affect when - hovermode = closest + drawn for this axis. Note that spikes will never be + drawn when `hovermode` is False. showticklabels Determines whether or not the tick labels are drawn. showtickprefix diff --git a/plotly/graph_objs/layout/_yaxis.py b/plotly/graph_objs/layout/_yaxis.py index 74075d97604..1224ee870b4 100644 --- a/plotly/graph_objs/layout/_yaxis.py +++ b/plotly/graph_objs/layout/_yaxis.py @@ -1321,8 +1321,8 @@ def showline(self, val): def showspikes(self): """ Determines whether or not spikes (aka droplines) are drawn for - this axis. Note: This only takes affect when hovermode = - closest + this axis. Note that spikes will never be drawn when + `hovermode` is False. The 'showspikes' property is a boolean and must be specified as: - A boolean value: True or False @@ -2572,8 +2572,8 @@ def _prop_descriptions(self): drawn. showspikes Determines whether or not spikes (aka droplines) are - drawn for this axis. Note: This only takes affect when - hovermode = closest + drawn for this axis. Note that spikes will never be + drawn when `hovermode` is False. showticklabels Determines whether or not the tick labels are drawn. showtickprefix @@ -3214,8 +3214,8 @@ def __init__( drawn. showspikes Determines whether or not spikes (aka droplines) are - drawn for this axis. Note: This only takes affect when - hovermode = closest + drawn for this axis. Note that spikes will never be + drawn when `hovermode` is False. showticklabels Determines whether or not the tick labels are drawn. showtickprefix diff --git a/plotly/labextension/package.json b/plotly/labextension/package.json index 41da67f6feb..dd3fb7501fb 100644 --- a/plotly/labextension/package.json +++ b/plotly/labextension/package.json @@ -19,7 +19,7 @@ }, "dependencies": { "lodash-es": "^4.17.21", - "plotly.js": "4.0.0", + "plotly.js": "4.1.0", "@lumino/widgets": "~2.4.0" }, "devDependencies": { @@ -33,7 +33,7 @@ "outputDir": "../plotly/labextension", "webpackConfig": "./webpack.config.js", "_build": { - "load": "static/remoteEntry.6f1030bf65ead662.js", + "load": "static/remoteEntry.25fcd7ead727dc9c.js", "mimeExtension": "./mimeExtension" } } diff --git a/plotly/labextension/static/0.e889754e73c03c32.js b/plotly/labextension/static/0.8a60fe48f4849a5c.js similarity index 68% rename from plotly/labextension/static/0.e889754e73c03c32.js rename to plotly/labextension/static/0.8a60fe48f4849a5c.js index 405f47763ba..8935e2d94f5 100644 --- a/plotly/labextension/static/0.e889754e73c03c32.js +++ b/plotly/labextension/static/0.8a60fe48f4849a5c.js @@ -1,14 +1,14 @@ -(self.rspackChunkjupyterlab_plotly=self.rspackChunkjupyterlab_plotly||[]).push([[0],{2(e,t,r){"use strict";let i,n,a,o,s,l,c,u,h,d,f,p;r.r(t);var m,g,y,v,x,b,_,w,T,M,k,A,S=r(3),E=Object.create,C=Object.defineProperty,L=Object.getOwnPropertyDescriptor,P=Object.getOwnPropertyNames,I=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty,D=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),O=(e,t,r)=>(r=null!=e?E(I(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of P(t))z.call(e,i)||void 0===i||C(e,i,{get:()=>t[i],enumerable:!(r=L(t,i))||r.enumerable});return e})(!t&&e&&e.__esModule?r:C(r,"default",{value:e,enumerable:!0}),e)),R=D((e,t)=>{var r,i;r=e,i=function(e){var t;function r(e,t){let r=0;for(let i of e)if(!1===t(i,r++))return!1;return!0}e.ArrayExt=void 0,function(e){function t(e,r,i=0,n=-1){let a,o=e.length;if(0===o)return -1;i=i<0?Math.max(0,i+o):Math.min(i,o-1),a=(n=n<0?Math.max(0,n+o):Math.min(n,o-1))=r)return;let i=e[t];for(let i=t+1;i0;){let i=s>>1,n=o+i;0>r(e[n],t)?(o=n+1,s-=i+1):s=i}return o},e.upperBound=function(e,t,r,i=0,n=-1){let a=e.length;if(0===a)return 0;i=i<0?Math.max(0,i+a):Math.min(i,a-1),n=n<0?Math.max(0,n+a):Math.min(n,a-1);let o=i,s=n-i+1;for(;s>0;){let i=s>>1,n=o+i;r(e[n],t)>0?s=i:(o=n+1,s-=i+1)}return o},e.shallowEqual=function(e,t,r){if(e===t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i=o&&(i=a<0?o-1:o),void 0===n?n=a<0?-1:o:n<0?n=Math.max(n+o,a<0?-1:0):n>=o&&(n=a<0?o-1:o),r=a<0&&n>=i||a>0&&i>=n?0:a<0?Math.floor((n-i+1)/a+1):Math.floor((n-i-1)/a+1);let s=[];for(let t=0;t=(i=i<0?Math.max(0,i+n):Math.min(i,n-1)))return;let o=i-r+1;if(t>0?t%=o:t<0&&(t=(t%o+o)%o),0===t)return;let s=r+t;a(e,r,s-1),a(e,s,i),a(e,r,i)},e.fill=function(e,t,r=0,i=-1){let n,a=e.length;if(0!==a){r=r<0?Math.max(0,r+a):Math.min(r,a-1),n=(i=i<0?Math.max(0,i+a):Math.min(i,a-1))t;--r)e[r]=e[r-1];e[t]=r},e.removeAt=o,e.removeFirstOf=function(e,r,i=0,n=-1){let a=t(e,r,i,n);return -1!==a&&o(e,a),a},e.removeLastOf=function(e,t,i=-1,n=0){let a=r(e,t,i,n);return -1!==a&&o(e,a),a},e.removeAllOf=function(e,t,r=0,i=-1){let n=e.length;if(0===n)return 0;r=r<0?Math.max(0,r+n):Math.min(r,n-1),i=i<0?Math.max(0,i+n):Math.min(i,n-1);let a=0;for(let o=0;o=r&&o<=i&&e[o]===t||i=r)&&e[o]===t?a++:a>0&&(e[o-a]=e[o]);return a>0&&(e.length=n-a),a},e.removeFirstWhere=function(e,t,r=0,n=-1){let a,s=i(e,t,r,n);return -1!==s&&(a=o(e,s)),{index:s,value:a}},e.removeLastWhere=function(e,t,r=-1,i=0){let a,s=n(e,t,r,i);return -1!==s&&(a=o(e,s)),{index:s,value:a}},e.removeAllWhere=function(e,t,r=0,i=-1){let n=e.length;if(0===n)return 0;r=r<0?Math.max(0,r+n):Math.min(r,n-1),i=i<0?Math.max(0,i+n):Math.min(i,n-1);let a=0;for(let o=0;o=r&&o<=i&&t(e[o],o)||i=r)&&t(e[o],o)?a++:a>0&&(e[o-a]=e[o]);return a>0&&(e.length=n-a),a}}(e.ArrayExt||(e.ArrayExt={})),(t||(t={})).rangeLength=function(e,t,r){return 0===r?1/0:e>t&&r>0||et)}}(e.StringExt||(e.StringExt={})),e.chain=function*(...e){for(let t of e)yield*t},e.each=function(e,t){let r=0;for(let i of e)if(!1===t(i,r++))return},e.empty=function*(){},e.enumerate=function*(e,t=0){for(let r of e)yield[t++,r]},e.every=r,e.filter=function*(e,t){let r=0;for(let i of e)t(i,r++)&&(yield i)},e.find=function(e,t){let r=0;for(let i of e)if(t(i,r++))return i},e.findIndex=function(e,t){let r=0;for(let i of e)if(t(i,r++))return r-1;return -1},e.map=function*(e,t){let r=0;for(let i of e)yield t(i,r++)},e.max=function(e,t){let r;for(let i of e){if(void 0===r){r=i;continue}t(i,r)>0&&(r=i)}return r},e.min=function(e,t){let r;for(let i of e){if(void 0===r){r=i;continue}0>t(i,r)&&(r=i)}return r},e.minmax=function(e,t){let r=!0,i,n;for(let a of e)r?(i=a,n=a,r=!1):0>t(a,i)?i=a:t(a,n)>0&&(n=a);return r?void 0:[i,n]},e.once=function*(e){yield e},e.range=function*(e,r,i){void 0===r?(r=e,e=0,i=1):void 0===i&&(i=1);let n=t.rangeLength(e,r,i);for(let t=0;t-1;t--)yield e[t]},e.some=function(e,t){let r=0;for(let i of e)if(t(i,r++))return!0;return!1},e.stride=function*(e,t){let r=0;for(let i of e)r++%t==0&&(yield i)},e.take=function*(e,t){if(t<1)return;let r=e[Symbol.iterator](),i;for(;0e[Symbol.iterator]()),i=t.map(e=>e.next());for(;r(i,e=>!e.done);i=t.map(e=>e.next()))yield i.map(e=>e.value)}},"object"==typeof e&&"u">typeof t?i(e):"function"==typeof define&&define.amd?define(["exports"],i):i((r="u">typeof globalThis?globalThis:r||self).lumino_algorithm={})}),F=D((e,t)=>{var r,i;r=e,i=function(e,t){let r;e.JSONExt=void 0,function(e){function t(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e}function r(e){return Array.isArray(e)}e.emptyObject=Object.freeze({}),e.emptyArray=Object.freeze([]),e.isPrimitive=t,e.isArray=r;e.isObject=function(e){return!t(e)&&!r(e)},e.deepEqual=function e(i,n){if(i===n)return!0;if(t(i)||t(n))return!1;let a=r(i),o=r(n);return a===o&&(a&&o?function(t,r){if(t===r)return!0;if(t.length!==r.length)return!1;for(let i=0,n=t.length;i{if(i===e.provides)return!0;let o=r.get(i);if(!o)return!1;let s=t.get(o),l=[...s.requires,...s.optional];return 0!==l.length&&(a.push(o),!!l.some(n)||(a.pop(),!1))};if(!e.provides||0===i.length)return;let a=[e.id];if(i.some(n))throw ReferenceError(`Cycle detected: ${a.join(" -> ")}.`)},n.findDependents=function(e,r,i){let n=[],a=e=>{let t=r.get(e),a=[...t.requires,...t.optional];n.push(...a.reduce((t,r)=>{let n=i.get(r);return n&&t.push([e,n]),t},[]))};for(let e of r.keys())a(e);let o=n.filter(t=>t[1]===e),s=0;for(;o.length>s;){let e=o.length;for(let e of new Set(o.map(e=>e[0])))n.filter(t=>t[1]===e).forEach(e=>{o.includes(e)||o.push(e)});s=e}let l=t.topologicSort(o),c=l.findIndex(t=>t===e);return -1===c?[e]:l.slice(0,c+1)},n.collectStartupPlugins=function(e,t){let r=new Set;for(let t of e.keys())!0===e.get(t).autoStart&&r.add(t);if(t.startPlugins)for(let e of t.startPlugins)r.add(e);if(t.ignorePlugins)for(let e of t.ignorePlugins)r.delete(e);return Array.from(r)};e.Random=void 0,(e.Random||(e.Random={})).getRandomValues=(r="u">typeof window&&(window.crypto||window.msCrypto)||null)&&"function"==typeof r.getRandomValues?function(e){return r.getRandomValues(e)}:function(e){let t=0;for(let r=0,i=e.length;r>>0),e[r]=255&t,t>>>=8},e.UUID=void 0,(e.UUID||(e.UUID={})).uuid4=function(e){let t=new Uint8Array(16),r=Array(256);for(let e=0;e<16;++e)r[e]="0"+e.toString(16);for(let e=16;e<256;++e)r[e]=e.toString(16);return function(){return e(t),t[6]=64|15&t[6],t[8]=128|63&t[8],r[t[0]]+r[t[1]]+r[t[2]]+r[t[3]]+"-"+r[t[4]]+r[t[5]]+"-"+r[t[6]]+r[t[7]]+"-"+r[t[8]]+r[t[9]]+"-"+r[t[10]]+r[t[11]]+r[t[12]]+r[t[13]]+r[t[14]]+r[t[15]]}}(e.Random.getRandomValues),e.MimeData=class{constructor(){this._types=[],this._values=[]}types(){return this._types.slice()}hasData(e){return -1!==this._types.indexOf(e)}getData(e){let t=this._types.indexOf(e);return -1!==t?this._values[t]:void 0}setData(e,t){this.clearData(e),this._types.push(e),this._values.push(t)}clearData(e){let t=this._types.indexOf(e);-1!==t&&(this._types.splice(t,1),this._values.splice(t,1))}clear(){this._types.length=0,this._values.length=0}},e.PluginRegistry=class{constructor(e={}){this._application=null,this._validatePlugin=()=>!0,this._plugins=new Map,this._services=new Map,e.validatePlugin&&(console.info("Plugins may be rejected by the custom validation plugin method."),this._validatePlugin=e.validatePlugin)}get application(){return this._application}set application(e){if(null!==this._application)throw Error("PluginRegistry.application is already set. It cannot be overridden.");this._application=e}get deferredPlugins(){return Array.from(this._plugins).filter(([e,t])=>"defer"===t.autoStart).map(([e,t])=>e)}getPluginDescription(e){var t,r;return null!=(r=null==(t=this._plugins.get(e))?void 0:t.description)?r:""}hasPlugin(e){return this._plugins.has(e)}isPluginActivated(e){var t,r;return null!=(r=null==(t=this._plugins.get(e))?void 0:t.activated)&&r}listPlugins(){return Array.from(this._plugins.keys())}registerPlugin(e){if(this._plugins.has(e.id))throw TypeError(`Plugin '${e.id}' is already registered.`);if(!this._validatePlugin(e))throw Error(`Plugin '${e.id}' is not valid.`);let t=i.createPluginData(e);i.ensureNoCycle(t,this._plugins,this._services),t.provides&&this._services.set(t.provides,t.id),this._plugins.set(t.id,t)}registerPlugins(e){for(let t of e)this.registerPlugin(t)}deregisterPlugin(e,t){let r=this._plugins.get(e);if(r){if(r.activated&&!t)throw Error(`Plugin '${e}' is still active.`);this._plugins.delete(e)}}async activatePlugin(e){let t=this._plugins.get(e);if(!t)throw ReferenceError(`Plugin '${e}' is not registered.`);if(t.activated)return;if(t.promise)return t.promise;let r=t.requires.map(e=>this.resolveRequiredService(e)),i=t.optional.map(e=>this.resolveOptionalService(e));return t.promise=Promise.all([...r,...i]).then(e=>t.activate.apply(void 0,[this.application,...e])).then(e=>{t.service=e,t.activated=!0,t.promise=null}).catch(e=>{throw t.promise=null,e}),t.promise}async activatePlugins(e,t={}){switch(e){case"defer":{let e=this.deferredPlugins.filter(e=>this._plugins.get(e).autoStart).map(e=>this.activatePlugin(e));await Promise.all(e);break}case"startUp":{let e=i.collectStartupPlugins(this._plugins,t).map(async e=>{try{return await this.activatePlugin(e)}catch(t){console.error(`Plugin '${e}' failed to activate.`,t)}});await Promise.all(e)}}}async deactivatePlugin(e){let t=this._plugins.get(e);if(!t)throw ReferenceError(`Plugin '${e}' is not registered.`);if(!t.activated)return[];if(!t.deactivate)throw TypeError(`Plugin '${e}'#deactivate() method missing`);let r=i.findDependents(e,this._plugins,this._services),n=r.map(e=>this._plugins.get(e));for(let t of n)if(!t.deactivate)throw TypeError(`Plugin ${t.id}#deactivate() method missing (depends on ${e})`);for(let e of n){let t=[...e.requires,...e.optional].map(e=>{let t=this._services.get(e);return t?this._plugins.get(t).service:null});await e.deactivate(this.application,...t),e.service=null,e.activated=!1}return r.pop(),r}async resolveRequiredService(e){let t=this._services.get(e);if(!t)throw TypeError(`No provider for: ${e.name}.`);let r=this._plugins.get(t);return r.activated||await this.activatePlugin(t),r.service}async resolveOptionalService(e){let t=this._services.get(e);if(!t)return null;let r=this._plugins.get(t);if(!r.activated)try{await this.activatePlugin(t)}catch(e){return console.error(e),null}return r.service}},e.PromiseDelegate=class{constructor(){this.promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}resolve(e){(0,this._resolve)(e)}reject(e){(0,this._reject)(e)}},e.Token=class{constructor(e,t){this.name=e,this.description=t??"",this._tokenStructuralPropertyT=null}}},"object"==typeof e&&"u">typeof t?i(e,R()):"function"==typeof define&&define.amd?define(["exports","@lumino/algorithm"],i):i((r="u">typeof globalThis?globalThis:r||self).lumino_coreutils={},r.lumino_algorithm)}),j=D((e,t)=>{var r,i;r="u">typeof self?self:e,i=()=>{var e=(()=>{var e=Object.create,t=Object.defineProperty,r=Object.defineProperties,i=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),h=(e,r,i)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,d=(e,t)=>{for(var r in t||(t={}))l.call(t,r)&&h(e,r,t[r]);if(o)for(var r of o(t))c.call(t,r)&&h(e,r,t[r]);return e},f=(e,t,r)=>function(){if(r)throw r[0];try{return e&&(t=(0,e[a(e)[0]])(e=0)),t}catch(e){throw r=[e],e}},p=(e,t)=>function(){try{return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}},m=(e,r)=>{for(var i in r)t(e,i,{get:r[i],enumerable:!0})},g=(e,r,n,o)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let s of a(r))l.call(e,s)||s===n||t(e,s,{get:()=>r[s],enumerable:!(o=i(r,s))||o.enumerable});return e},y=(r,i,n)=>(n=null!=r?e(s(r)):{},g(!i&&r&&r.__esModule?n:t(n,"default",{value:r,enumerable:!0}),r)),v=e=>g(t({},"__esModule",{value:!0}),e),x=function(e,t){this[0]=e,this[1]=t},b=e=>{var t,r=e[u("asyncIterator")],i=!1,n={};return null==r?(r=e[u("iterator")](),t=e=>n[e]=t=>r[e](t)):(r=r.call(e),t=e=>n[e]=t=>{if(i){if(i=!1,"throw"===e)throw t;return t}return i=!0,{done:!1,value:new x(new Promise(i=>{var n=r[e](t);n instanceof Object||(e=>{throw TypeError(e)})("Object expected"),i(n)}),1)}}),n[u("iterator")]=()=>n,t("next"),"throw"in r?t("throw"):n.throw=e=>{throw e},"return"in r&&t("return"),n},_=p({"src/version.js"(e){e.version="4.0.0"}}),w=p({"node_modules/native-promise-only/lib/npo.src.js"(e,t){var r,i;r="Promise",i="u">typeof window?window:e,i[r]=i[r]||function(){var e,t,r,i=Object.prototype.toString,n="u">typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,r,i){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==i})}}catch{e=function(e,t,r){return e[t]=r,e}}function a(e,i){r.add(e,i),t||(t=n(r.drain))}function o(e){var t,r=typeof e;return null!=e&&("object"==r||"function"==r)&&(t=e.then),"function"==typeof t&&t}function s(){for(var e=0;e0&&a(s,r))}catch(e){c.call(new h(r),e)}}}function c(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&a(s,t))}function u(e,t,r,i){for(var n=0;ntypeof t&&t.exports&&(t.exports=i[r])}}),T=p({"node_modules/@plotly/d3/d3.js"(e,t){(function(){var e={version:"3.8.2"},r=[].slice,i=function(e){return r.call(e)},n=self.document;function a(e){return e&&(e.ownerDocument||e.document||e).documentElement}function o(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(n)try{i(n.documentElement.childNodes)[0].nodeType}catch{i=function(e){for(var t=e.length,r=Array(t);t--;)r[t]=e[t];return r}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch{var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,h=u.setProperty;s.setAttribute=function(e,t){l.call(this,e,t+"")},s.setAttributeNS=function(e,t,r){c.call(this,e,t,r+"")},u.setProperty=function(e,t,r){h.call(this,e,t+"",r)}}function d(e,t){return et?1:e>=t?0:NaN}function f(e){return null===e?NaN:+e}function p(e){return!isNaN(e)}function m(e){return{left:function(t,r,i,n){for(arguments.length<3&&(i=0),arguments.length<4&&(n=t.length);i>>1;0>e(t[a],r)?i=a+1:n=a}return i},right:function(t,r,i,n){for(arguments.length<3&&(i=0),arguments.length<4&&(n=t.length);i>>1;e(t[a],r)>0?n=a:i=a+1}return i}}}e.ascending=d,e.descending=function(e,t){return te?1:t>=e?0:NaN},e.min=function(e,t){var r,i,n=-1,a=e.length;if(1==arguments.length){for(;++n=i){r=i;break}for(;++ni&&(r=i)}else{for(;++n=i){r=i;break}for(;++ni&&(r=i)}return r},e.max=function(e,t){var r,i,n=-1,a=e.length;if(1==arguments.length){for(;++n=i){r=i;break}for(;++nr&&(r=i)}else{for(;++n=i){r=i;break}for(;++nr&&(r=i)}return r},e.extent=function(e,t){var r,i,n,a=-1,o=e.length;if(1==arguments.length){for(;++a=i){r=n=i;break}for(;++ai&&(r=i),n=i){r=n=i;break}for(;++ai&&(r=i),n1)return o/(l-1)},e.deviation=function(){var t=e.variance.apply(this,arguments);return t&&Math.sqrt(t)};var g=m(d);function y(e){return e.length}e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(e){return m(1===e.length?function(t,r){return d(e(t),r)}:e)},e.shuffle=function(e,t,r){(a=arguments.length)<3&&(r=e.length,a<2&&(t=0));for(var i,n,a=r-t;a;)n=Math.random()*a--|0,i=e[a+t],e[a+t]=e[n+t],e[n+t]=i;return e},e.permute=function(e,t){for(var r=t.length,i=Array(r);r--;)i[r]=e[t[r]];return i},e.pairs=function(e){for(var t=0,r=e.length-1,i=e[0],n=Array(r<0?0:r);t=0;)for(t=(i=e[n]).length;--t>=0;)r[--o]=i[t];return r};var v=Math.abs;function x(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function b(){this._=Object.create(null)}function _(e){return"__proto__"==(e+="")||"\0"===e[0]?"\0"+e:e}function w(e){return"\0"===(e+="")[0]?e.slice(1):e}function T(e){return _(e)in this._}function M(e){return(e=_(e))in this._&&delete this._[e]}function k(){var e=[];for(var t in this._)e.push(w(t));return e}function A(){var e=0;for(var t in this._)++e;return e}function S(){for(var e in this._)return!1;return!0}function E(){this._=Object.create(null)}function C(e){return e}function L(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var r=0,i=P.length;rt;)n.push(i/a);else for(;(i=e+r*++o)=n.length)return r?r.call(i,a):t?a.sort(t):a;for(var l,c,u,h,d=-1,f=a.length,p=n[s++],m=new b;++d=n.length)return t;var i=[],o=a[r++];return t.forEach(function(t,n){i.push({key:t,values:e(n,r)})}),o?i.sort(function(e,t){return o(e.key,t.key)}):i}(o(e.map,t,0),0)},i.key=function(e){return n.push(e),i},i.sortKeys=function(e){return a[n.length-1]=e,i},i.sortValues=function(e){return t=e,i},i.rollup=function(e){return r=e,i},i},e.set=function(e){var t=new E;if(e)for(var r=0,i=e.length;r=0&&(i=e.slice(r+1),e=e.slice(0,r)),e)return arguments.length<2?this[e].on(i):this[e].on(i,t);if(2==arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(i,null);return this}},e.event=null,e.requote=function(e){return e.replace(j,"\\$&")};var j=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,B={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function N(e){return B(e,H),e}var U=function(e,t){return t.querySelector(e)},V=function(e,t){return t.querySelectorAll(e)},q=function(e,t){var r=e.matches||e[L(e,"matchesSelector")];return(q=function(e,t){return r.call(e,t)})(e,t)};"function"==typeof Sizzle&&(U=function(e,t){return Sizzle(e,t)[0]||null},V=Sizzle,q=Sizzle.matchesSelector),e.selection=function(){return e.select(n.documentElement)};var H=e.selection.prototype=[];function G(e){return"function"==typeof e?e:function(){return U(e,this)}}function W(e){return"function"==typeof e?e:function(){return V(e,this)}}H.select=function(e){var t,r,i,n,a=[];e=G(e);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),Z.hasOwnProperty(r)?{space:Z[r],local:e}:e}},H.attr=function(t,r){if(arguments.length<2){if("string"==typeof t){var i=this.node();return(t=e.ns.qualify(t)).local?i.getAttributeNS(t.space,t.local):i.getAttribute(t)}for(r in t)this.each($(r,t[r]));return this}return this.each($(t,r))},H.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node(),i=(e=J(e)).length,n=-1;if(t=r.classList){for(;++n=0;)(r=i[n])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},H.sort=function(e){e=es.apply(this,arguments);for(var t=-1,r=this.length;++t0&&(t=t.slice(0,o));var l=ed.get(t);function c(){var e=this[a];e&&(this.removeEventListener(t,e,e.$),delete this[a])}return l&&(t=l,s=ep),o?r?function(){var e=s(r,i(arguments));c.call(this),this.addEventListener(t,this[a]=e,e.$=n),e._=r}:c:r?I:function(){var r,i=RegExp("^__on([^.]+)"+e.requote(t)+"$");for(var n in this)if(r=n.match(i)){var a=this[n];this.removeEventListener(r[1],a,a.$),delete this[n]}}}e.selection.enter=ec,e.selection.enter.prototype=eu,eu.append=H.append,eu.empty=H.empty,eu.node=H.node,eu.call=H.call,eu.size=H.size,eu.select=function(e){for(var t,r,i,n,a,o=[],s=-1,l=this.length;++s=i&&(i=t+1);!(o=s[i])&&++i1?ek:e<-1?-ek:Math.asin(e)}function eC(e){return((e=Math.exp(e))+1/e)/2}var eL=Math.SQRT2;e.interpolateZoom=function(e,t){var r,i,n=e[0],a=e[1],o=e[2],s=t[0],l=t[1],c=t[2],u=s-n,h=l-a,d=u*u+h*h;if(d0&&(t=t.transition().duration(m)),t.call(w.event)}function S(){c&&c.domain(l.range().map(function(e){return(e-d.x)/d.k}).map(l.invert)),h&&h.domain(u.range().map(function(e){return(e-d.y)/d.k}).map(u.invert))}function E(e){g++||e({type:"zoomstart"})}function C(e){S(),e({type:"zoom",scale:d.k,translate:[d.x,d.y]})}function L(e){--g||(e({type:"zoomend"}),r=null)}function P(){var t=this,r=_.of(t,arguments),i=0,n=e.select(o(t)).on(v,function(){i=1,k(e.mouse(t),a),C(r)}).on(x,function(){n.on(v,null).on(x,null),s(i),L(r)}),a=T(e.mouse(t)),s=ey(t);iW.call(t),E(r)}function I(){var t,r=this,i=_.of(r,arguments),n={},a=0,o=".zoom-"+e.event.changedTouches[0].identifier,l="touchmove"+o,c="touchend"+o,u=[],h=e.select(r),f=ey(r);function p(){var i=e.touches(r);return t=d.k,i.forEach(function(e){e.identifier in n&&(n[e.identifier]=T(e))}),i}function m(){var t=e.event.target;e.select(t).on(l,g).on(c,v),u.push(t);for(var i=e.event.changedTouches,o=0,h=i.length;o1){var y=f[0],x=f[1],b=y[0]-x[0],_=y[1]-x[1];a=b*b+_*_}}function g(){var o,l,c,u,h=e.touches(r);iW.call(r);for(var d=0,f=h.length;d360?t-=360:t<0&&(t+=360),t<60?i+(n-i)*t/60:t<180?n:t<240?i+(n-i)*(240-t)/60:i))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,n=(r=r<0?0:r>1?1:r)<=.5?r*(1+t):r+t-r*t,i=2*r-n,new e$(a(e+120),a(e),a(e-120))}function ej(t,r,i){return this instanceof ej?(this.h=+t,this.c=+r,void(this.l=+i)):arguments.length<2?t instanceof ej?new ej(t.h,t.c,t.l):t instanceof eU?eG(t.l,t.a,t.b):eG((t=e2((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ej(t,r,i)}eR.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new eO(this.h,this.s,this.l/e)},eR.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new eO(this.h,this.s,e*this.l)},eR.rgb=function(){return eF(this.h,this.s,this.l)},e.hcl=ej;var eB=ej.prototype=new eD;function eN(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new eU(r,Math.cos(e*=eA)*t,Math.sin(e)*t)}function eU(e,t,r){return this instanceof eU?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof eU?new eU(e.l,e.a,e.b):e instanceof ej?eN(e.h,e.c,e.l):e2((e=e$(e)).r,e.g,e.b):new eU(e,t,r)}eB.brighter=function(e){return new ej(this.h,this.c,Math.min(100,this.l+eV*(arguments.length?e:1)))},eB.darker=function(e){return new ej(this.h,this.c,Math.max(0,this.l-eV*(arguments.length?e:1)))},eB.rgb=function(){return eN(this.h,this.c,this.l).rgb()},e.lab=eU;var eV=18,eq=eU.prototype=new eD;function eH(e,t,r){var i=(e+16)/116,n=i+t/500,a=i-r/200;return n=.95047*eW(n),new e$(eZ(3.2404542*n-1.5371385*(i=+eW(i))-.4985314*(a=1.08883*eW(a))),eZ(-.969266*n+1.8760108*i+.041556*a),eZ(.0556434*n-.2040259*i+1.0572252*a))}function eG(e,t,r){return e>0?new ej(Math.atan2(r,t)*eS,Math.sqrt(t*t+r*r),e):new ej(NaN,NaN,e)}function eW(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function eY(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function eZ(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function e$(e,t,r){return this instanceof e$?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof e$?new e$(e.r,e.g,e.b):e0(""+e,e$,eF):new e$(e,t,r)}function eX(e){return new e$(e>>16,e>>8&255,255&e)}function eK(e){return eX(e)+""}eq.brighter=function(e){return new eU(Math.min(100,this.l+eV*(arguments.length?e:1)),this.a,this.b)},eq.darker=function(e){return new eU(Math.max(0,this.l-eV*(arguments.length?e:1)),this.a,this.b)},eq.rgb=function(){return eH(this.l,this.a,this.b)},e.rgb=e$;var eJ=e$.prototype=new eD;function eQ(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function e0(e,t,r){var i,n,a,o=0,s=0,l=0;if(i=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(n=i[2].split(","),i[1]){case"hsl":return r(parseFloat(n[0]),parseFloat(n[1])/100,parseFloat(n[2])/100);case"rgb":return t(e5(n[0]),e5(n[1]),e5(n[2]))}return(a=e4.get(e))?t(a.r,a.g,a.b):(null==e||"#"!==e.charAt(0)||isNaN(a=parseInt(e.slice(1),16))||(4===e.length?(o=(o=(3840&a)>>4)>>4|o,s=(s=240&a)>>4|s,l=(l=15&a)<<4|l):7===e.length&&(o=(0xff0000&a)>>16,s=(65280&a)>>8,l=255&a)),t(o,s,l))}function e1(e,t,r){var i,n,a=Math.min(e/=255,t/=255,r/=255),o=Math.max(e,t,r),s=o-a,l=(o+a)/2;return s?(n=l<.5?s/(o+a):s/(2-o-a),i=(e==o?(t-r)/s+6*(t0&&l<1?0:i),new eO(i,n,l)}function e2(e,t,r){e=e3(e);var i=eY((.4124564*e+.3575761*(t=e3(t))+.1804375*(r=e3(r)))/.95047),n=eY((.2126729*e+.7151522*t+.072175*r)/1);return eU(116*n-16,500*(i-n),200*(n-eY((.0193339*e+.119192*t+.9503041*r)/1.08883)))}function e3(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function e5(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}eJ.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,i=this.b;return t||r||i?(t&&t<30&&(t=30),r&&r<30&&(r=30),i&&i<30&&(i=30),new e$(Math.min(255,t/e),Math.min(255,r/e),Math.min(255,i/e))):new e$(30,30,30)},eJ.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new e$(e*this.r,e*this.g,e*this.b)},eJ.hsl=function(){return e1(this.r,this.g,this.b)},eJ.toString=function(){return"#"+eQ(this.r)+eQ(this.g)+eQ(this.b)};var e4=e.map({aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32});function e6(e){return"function"==typeof e?e:function(){return e}}function e8(e){return function(t,r,i){return 2==arguments.length&&"function"==typeof r&&(i=r,r=null),e7(t,r,e,i)}}function e7(t,r,n,a){var o,s={},l=e.dispatch("beforesend","progress","load","error"),c={},u=new XMLHttpRequest,h=null;function d(){var e,t,r,i=u.status;if(!i&&((t=(e=u).responseType)&&"text"!==t?e.response:e.responseText)||i>=200&&i<300||304===i){try{r=n.call(s,u)}catch(e){l.error.call(s,e);return}l.load.call(s,r)}else l.error.call(s,u)}return self.XDomainRequest&&!("withCredentials"in u)&&/^(http(s)?:)?\/\//.test(t)&&(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=d:u.onreadystatechange=function(){u.readyState>3&&d()},u.onprogress=function(t){var r=e.event;e.event=t;try{l.progress.call(s,u)}finally{e.event=r}},s.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?c[e]:(null==t?delete c[e]:c[e]=t+"",s)},s.mimeType=function(e){return arguments.length?(r=null==e?null:e+"",s):r},s.responseType=function(e){return arguments.length?(h=e,s):h},s.response=function(e){return n=e,s},["get","post"].forEach(function(e){s[e]=function(){return s.send.apply(s,[e].concat(i(arguments)))}}),s.send=function(e,i,n){if(2==arguments.length&&"function"==typeof i&&(n=i,i=null),u.open(e,t,!0),null==r||"accept"in c||(c.accept=r+",*/*"),u.setRequestHeader)for(var a in c)u.setRequestHeader(a,c[a]);return null!=r&&u.overrideMimeType&&u.overrideMimeType(r),null!=h&&(u.responseType=h),null!=n&&s.on("error",n).on("load",function(e){n(null,e)}),l.beforesend.call(s,u),u.send(i??null),s},s.abort=function(){return u.abort(),s},e.rebind(s,l,"on"),null==a?s:s.get(1===(o=a).length?function(e,t){o(null==e?t:null)}:o)}e4.forEach(function(e,t){e4.set(e,eX(t))}),e.functor=e6,e.xhr=e8(C),e.dsv=function(e,t){var r=RegExp('["'+e+` -]`),i=e.charCodeAt(0);function n(e,r,i){arguments.length<3&&(i=r,r=null);var n=e7(e,t,null==r?a:o(r),i);return n.row=function(e){return arguments.length?n.response(null==(r=e)?a:o(e)):r},n}function a(e){return n.parse(e.responseText)}function o(e){return function(t){return n.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return n.parse=function(e,t){var r;return n.parseRows(e,function(e,i){if(r)return r(e,i-1);var n=function(t){for(var r={},i=e.length,n=0;n=l)return o;if(n)return n=!1,a;var t=c;if(34===e.charCodeAt(t)){for(var r=t;r++()=>(t||e((t={exports:{}}).exports,t),t.exports),O=(e,t,r)=>(r=null!=e?E(I(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of P(t))z.call(e,i)||void 0===i||C(e,i,{get:()=>t[i],enumerable:!(r=L(t,i))||r.enumerable});return e})(!t&&e&&e.__esModule?r:C(r,"default",{value:e,enumerable:!0}),e)),R=D((e,t)=>{var r,i;r=e,i=function(e){var t;function r(e,t){let r=0;for(let i of e)if(!1===t(i,r++))return!1;return!0}e.ArrayExt=void 0,function(e){function t(e,r,i=0,n=-1){let a,o=e.length;if(0===o)return -1;i=i<0?Math.max(0,i+o):Math.min(i,o-1),a=(n=n<0?Math.max(0,n+o):Math.min(n,o-1))=r)return;let i=e[t];for(let i=t+1;i0;){let i=s>>1,n=o+i;0>r(e[n],t)?(o=n+1,s-=i+1):s=i}return o},e.upperBound=function(e,t,r,i=0,n=-1){let a=e.length;if(0===a)return 0;i=i<0?Math.max(0,i+a):Math.min(i,a-1),n=n<0?Math.max(0,n+a):Math.min(n,a-1);let o=i,s=n-i+1;for(;s>0;){let i=s>>1,n=o+i;r(e[n],t)>0?s=i:(o=n+1,s-=i+1)}return o},e.shallowEqual=function(e,t,r){if(e===t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i=o&&(i=a<0?o-1:o),void 0===n?n=a<0?-1:o:n<0?n=Math.max(n+o,a<0?-1:0):n>=o&&(n=a<0?o-1:o),r=a<0&&n>=i||a>0&&i>=n?0:a<0?Math.floor((n-i+1)/a+1):Math.floor((n-i-1)/a+1);let s=[];for(let t=0;t=(i=i<0?Math.max(0,i+n):Math.min(i,n-1)))return;let o=i-r+1;if(t>0?t%=o:t<0&&(t=(t%o+o)%o),0===t)return;let s=r+t;a(e,r,s-1),a(e,s,i),a(e,r,i)},e.fill=function(e,t,r=0,i=-1){let n,a=e.length;if(0!==a){r=r<0?Math.max(0,r+a):Math.min(r,a-1),n=(i=i<0?Math.max(0,i+a):Math.min(i,a-1))t;--r)e[r]=e[r-1];e[t]=r},e.removeAt=o,e.removeFirstOf=function(e,r,i=0,n=-1){let a=t(e,r,i,n);return -1!==a&&o(e,a),a},e.removeLastOf=function(e,t,i=-1,n=0){let a=r(e,t,i,n);return -1!==a&&o(e,a),a},e.removeAllOf=function(e,t,r=0,i=-1){let n=e.length;if(0===n)return 0;r=r<0?Math.max(0,r+n):Math.min(r,n-1),i=i<0?Math.max(0,i+n):Math.min(i,n-1);let a=0;for(let o=0;o=r&&o<=i&&e[o]===t||i=r)&&e[o]===t?a++:a>0&&(e[o-a]=e[o]);return a>0&&(e.length=n-a),a},e.removeFirstWhere=function(e,t,r=0,n=-1){let a,s=i(e,t,r,n);return -1!==s&&(a=o(e,s)),{index:s,value:a}},e.removeLastWhere=function(e,t,r=-1,i=0){let a,s=n(e,t,r,i);return -1!==s&&(a=o(e,s)),{index:s,value:a}},e.removeAllWhere=function(e,t,r=0,i=-1){let n=e.length;if(0===n)return 0;r=r<0?Math.max(0,r+n):Math.min(r,n-1),i=i<0?Math.max(0,i+n):Math.min(i,n-1);let a=0;for(let o=0;o=r&&o<=i&&t(e[o],o)||i=r)&&t(e[o],o)?a++:a>0&&(e[o-a]=e[o]);return a>0&&(e.length=n-a),a}}(e.ArrayExt||(e.ArrayExt={})),(t||(t={})).rangeLength=function(e,t,r){return 0===r?1/0:e>t&&r>0||et)}}(e.StringExt||(e.StringExt={})),e.chain=function*(...e){for(let t of e)yield*t},e.each=function(e,t){let r=0;for(let i of e)if(!1===t(i,r++))return},e.empty=function*(){},e.enumerate=function*(e,t=0){for(let r of e)yield[t++,r]},e.every=r,e.filter=function*(e,t){let r=0;for(let i of e)t(i,r++)&&(yield i)},e.find=function(e,t){let r=0;for(let i of e)if(t(i,r++))return i},e.findIndex=function(e,t){let r=0;for(let i of e)if(t(i,r++))return r-1;return -1},e.map=function*(e,t){let r=0;for(let i of e)yield t(i,r++)},e.max=function(e,t){let r;for(let i of e){if(void 0===r){r=i;continue}t(i,r)>0&&(r=i)}return r},e.min=function(e,t){let r;for(let i of e){if(void 0===r){r=i;continue}0>t(i,r)&&(r=i)}return r},e.minmax=function(e,t){let r=!0,i,n;for(let a of e)r?(i=a,n=a,r=!1):0>t(a,i)?i=a:t(a,n)>0&&(n=a);return r?void 0:[i,n]},e.once=function*(e){yield e},e.range=function*(e,r,i){void 0===r?(r=e,e=0,i=1):void 0===i&&(i=1);let n=t.rangeLength(e,r,i);for(let t=0;t-1;t--)yield e[t]},e.some=function(e,t){let r=0;for(let i of e)if(t(i,r++))return!0;return!1},e.stride=function*(e,t){let r=0;for(let i of e)r++%t==0&&(yield i)},e.take=function*(e,t){if(t<1)return;let r=e[Symbol.iterator](),i;for(;0e[Symbol.iterator]()),i=t.map(e=>e.next());for(;r(i,e=>!e.done);i=t.map(e=>e.next()))yield i.map(e=>e.value)}},"object"==typeof e&&"u">typeof t?i(e):"function"==typeof define&&define.amd?define(["exports"],i):i((r="u">typeof globalThis?globalThis:r||self).lumino_algorithm={})}),F=D((e,t)=>{var r,i;r=e,i=function(e,t){let r;e.JSONExt=void 0,function(e){function t(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e}function r(e){return Array.isArray(e)}e.emptyObject=Object.freeze({}),e.emptyArray=Object.freeze([]),e.isPrimitive=t,e.isArray=r;e.isObject=function(e){return!t(e)&&!r(e)},e.deepEqual=function e(i,n){if(i===n)return!0;if(t(i)||t(n))return!1;let a=r(i),o=r(n);return a===o&&(a&&o?function(t,r){if(t===r)return!0;if(t.length!==r.length)return!1;for(let i=0,n=t.length;i{if(i===e.provides)return!0;let o=r.get(i);if(!o)return!1;let s=t.get(o),l=[...s.requires,...s.optional];return 0!==l.length&&(a.push(o),!!l.some(n)||(a.pop(),!1))};if(!e.provides||0===i.length)return;let a=[e.id];if(i.some(n))throw ReferenceError(`Cycle detected: ${a.join(" -> ")}.`)},n.findDependents=function(e,r,i){let n=[],a=e=>{let t=r.get(e),a=[...t.requires,...t.optional];n.push(...a.reduce((t,r)=>{let n=i.get(r);return n&&t.push([e,n]),t},[]))};for(let e of r.keys())a(e);let o=n.filter(t=>t[1]===e),s=0;for(;o.length>s;){let e=o.length;for(let e of new Set(o.map(e=>e[0])))n.filter(t=>t[1]===e).forEach(e=>{o.includes(e)||o.push(e)});s=e}let l=t.topologicSort(o),c=l.findIndex(t=>t===e);return -1===c?[e]:l.slice(0,c+1)},n.collectStartupPlugins=function(e,t){let r=new Set;for(let t of e.keys())!0===e.get(t).autoStart&&r.add(t);if(t.startPlugins)for(let e of t.startPlugins)r.add(e);if(t.ignorePlugins)for(let e of t.ignorePlugins)r.delete(e);return Array.from(r)};e.Random=void 0,(e.Random||(e.Random={})).getRandomValues=(r="u">typeof window&&(window.crypto||window.msCrypto)||null)&&"function"==typeof r.getRandomValues?function(e){return r.getRandomValues(e)}:function(e){let t=0;for(let r=0,i=e.length;r>>0),e[r]=255&t,t>>>=8},e.UUID=void 0,(e.UUID||(e.UUID={})).uuid4=function(e){let t=new Uint8Array(16),r=Array(256);for(let e=0;e<16;++e)r[e]="0"+e.toString(16);for(let e=16;e<256;++e)r[e]=e.toString(16);return function(){return e(t),t[6]=64|15&t[6],t[8]=128|63&t[8],r[t[0]]+r[t[1]]+r[t[2]]+r[t[3]]+"-"+r[t[4]]+r[t[5]]+"-"+r[t[6]]+r[t[7]]+"-"+r[t[8]]+r[t[9]]+"-"+r[t[10]]+r[t[11]]+r[t[12]]+r[t[13]]+r[t[14]]+r[t[15]]}}(e.Random.getRandomValues),e.MimeData=class{constructor(){this._types=[],this._values=[]}types(){return this._types.slice()}hasData(e){return -1!==this._types.indexOf(e)}getData(e){let t=this._types.indexOf(e);return -1!==t?this._values[t]:void 0}setData(e,t){this.clearData(e),this._types.push(e),this._values.push(t)}clearData(e){let t=this._types.indexOf(e);-1!==t&&(this._types.splice(t,1),this._values.splice(t,1))}clear(){this._types.length=0,this._values.length=0}},e.PluginRegistry=class{constructor(e={}){this._application=null,this._validatePlugin=()=>!0,this._plugins=new Map,this._services=new Map,e.validatePlugin&&(console.info("Plugins may be rejected by the custom validation plugin method."),this._validatePlugin=e.validatePlugin)}get application(){return this._application}set application(e){if(null!==this._application)throw Error("PluginRegistry.application is already set. It cannot be overridden.");this._application=e}get deferredPlugins(){return Array.from(this._plugins).filter(([e,t])=>"defer"===t.autoStart).map(([e,t])=>e)}getPluginDescription(e){var t,r;return null!=(r=null==(t=this._plugins.get(e))?void 0:t.description)?r:""}hasPlugin(e){return this._plugins.has(e)}isPluginActivated(e){var t,r;return null!=(r=null==(t=this._plugins.get(e))?void 0:t.activated)&&r}listPlugins(){return Array.from(this._plugins.keys())}registerPlugin(e){if(this._plugins.has(e.id))throw TypeError(`Plugin '${e.id}' is already registered.`);if(!this._validatePlugin(e))throw Error(`Plugin '${e.id}' is not valid.`);let t=i.createPluginData(e);i.ensureNoCycle(t,this._plugins,this._services),t.provides&&this._services.set(t.provides,t.id),this._plugins.set(t.id,t)}registerPlugins(e){for(let t of e)this.registerPlugin(t)}deregisterPlugin(e,t){let r=this._plugins.get(e);if(r){if(r.activated&&!t)throw Error(`Plugin '${e}' is still active.`);this._plugins.delete(e)}}async activatePlugin(e){let t=this._plugins.get(e);if(!t)throw ReferenceError(`Plugin '${e}' is not registered.`);if(t.activated)return;if(t.promise)return t.promise;let r=t.requires.map(e=>this.resolveRequiredService(e)),i=t.optional.map(e=>this.resolveOptionalService(e));return t.promise=Promise.all([...r,...i]).then(e=>t.activate.apply(void 0,[this.application,...e])).then(e=>{t.service=e,t.activated=!0,t.promise=null}).catch(e=>{throw t.promise=null,e}),t.promise}async activatePlugins(e,t={}){switch(e){case"defer":{let e=this.deferredPlugins.filter(e=>this._plugins.get(e).autoStart).map(e=>this.activatePlugin(e));await Promise.all(e);break}case"startUp":{let e=i.collectStartupPlugins(this._plugins,t).map(async e=>{try{return await this.activatePlugin(e)}catch(t){console.error(`Plugin '${e}' failed to activate.`,t)}});await Promise.all(e)}}}async deactivatePlugin(e){let t=this._plugins.get(e);if(!t)throw ReferenceError(`Plugin '${e}' is not registered.`);if(!t.activated)return[];if(!t.deactivate)throw TypeError(`Plugin '${e}'#deactivate() method missing`);let r=i.findDependents(e,this._plugins,this._services),n=r.map(e=>this._plugins.get(e));for(let t of n)if(!t.deactivate)throw TypeError(`Plugin ${t.id}#deactivate() method missing (depends on ${e})`);for(let e of n){let t=[...e.requires,...e.optional].map(e=>{let t=this._services.get(e);return t?this._plugins.get(t).service:null});await e.deactivate(this.application,...t),e.service=null,e.activated=!1}return r.pop(),r}async resolveRequiredService(e){let t=this._services.get(e);if(!t)throw TypeError(`No provider for: ${e.name}.`);let r=this._plugins.get(t);return r.activated||await this.activatePlugin(t),r.service}async resolveOptionalService(e){let t=this._services.get(e);if(!t)return null;let r=this._plugins.get(t);if(!r.activated)try{await this.activatePlugin(t)}catch(e){return console.error(e),null}return r.service}},e.PromiseDelegate=class{constructor(){this.promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}resolve(e){(0,this._resolve)(e)}reject(e){(0,this._reject)(e)}},e.Token=class{constructor(e,t){this.name=e,this.description=t??"",this._tokenStructuralPropertyT=null}}},"object"==typeof e&&"u">typeof t?i(e,R()):"function"==typeof define&&define.amd?define(["exports","@lumino/algorithm"],i):i((r="u">typeof globalThis?globalThis:r||self).lumino_coreutils={},r.lumino_algorithm)}),j=D((e,t)=>{var r,i;r="u">typeof self?self:e,i=()=>{var e=(()=>{var e=Object.create,t=Object.defineProperty,r=Object.defineProperties,i=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),h=(e,r,i)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,d=(e,t)=>{for(var r in t||(t={}))l.call(t,r)&&h(e,r,t[r]);if(o)for(var r of o(t))c.call(t,r)&&h(e,r,t[r]);return e},f=(e,t,r)=>function(){if(r)throw r[0];try{return e&&(t=(0,e[a(e)[0]])(e=0)),t}catch(e){throw r=[e],e}},p=(e,t)=>function(){try{return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}},m=(e,r)=>{for(var i in r)t(e,i,{get:r[i],enumerable:!0})},g=(e,r,n,o)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let s of a(r))l.call(e,s)||s===n||t(e,s,{get:()=>r[s],enumerable:!(o=i(r,s))||o.enumerable});return e},y=(r,i,n)=>(n=null!=r?e(s(r)):{},g(!i&&r&&r.__esModule?n:t(n,"default",{value:r,enumerable:!0}),r)),v=e=>g(t({},"__esModule",{value:!0}),e),x=function(e,t){this[0]=e,this[1]=t},b=e=>{var t,r=e[u("asyncIterator")],i=!1,n={};return null==r?(r=e[u("iterator")](),t=e=>n[e]=t=>r[e](t)):(r=r.call(e),t=e=>n[e]=t=>{if(i){if(i=!1,"throw"===e)throw t;return t}return i=!0,{done:!1,value:new x(new Promise(i=>{var n=r[e](t);n instanceof Object||(e=>{throw TypeError(e)})("Object expected"),i(n)}),1)}}),n[u("iterator")]=()=>n,t("next"),"throw"in r?t("throw"):n.throw=e=>{throw e},"return"in r&&t("return"),n},_=p({"src/version.js"(e){e.version="4.1.0"}}),w=p({"node_modules/native-promise-only/lib/npo.src.js"(e,t){var r,i;r="Promise",i="u">typeof window?window:e,i[r]=i[r]||function(){var e,t,r,i=Object.prototype.toString,n="u">typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,r,i){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==i})}}catch{e=function(e,t,r){return e[t]=r,e}}function a(e,i){r.add(e,i),t||(t=n(r.drain))}function o(e){var t,r=typeof e;return null!=e&&("object"==r||"function"==r)&&(t=e.then),"function"==typeof t&&t}function s(){for(var e=0;e0&&a(s,r))}catch(e){c.call(new h(r),e)}}}function c(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&a(s,t))}function u(e,t,r,i){for(var n=0;ntypeof t&&t.exports&&(t.exports=i[r])}}),T=p({"node_modules/@plotly/d3/d3.js"(e,t){(function(){var e={version:"3.8.2"},r=[].slice,i=function(e){return r.call(e)},n=self.document;function a(e){return e&&(e.ownerDocument||e.document||e).documentElement}function o(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(n)try{i(n.documentElement.childNodes)[0].nodeType}catch{i=function(e){for(var t=e.length,r=Array(t);t--;)r[t]=e[t];return r}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch{var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,h=u.setProperty;s.setAttribute=function(e,t){l.call(this,e,t+"")},s.setAttributeNS=function(e,t,r){c.call(this,e,t,r+"")},u.setProperty=function(e,t,r){h.call(this,e,t+"",r)}}function d(e,t){return et?1:e>=t?0:NaN}function f(e){return null===e?NaN:+e}function p(e){return!isNaN(e)}function m(e){return{left:function(t,r,i,n){for(arguments.length<3&&(i=0),arguments.length<4&&(n=t.length);i>>1;0>e(t[a],r)?i=a+1:n=a}return i},right:function(t,r,i,n){for(arguments.length<3&&(i=0),arguments.length<4&&(n=t.length);i>>1;e(t[a],r)>0?n=a:i=a+1}return i}}}e.ascending=d,e.descending=function(e,t){return te?1:t>=e?0:NaN},e.min=function(e,t){var r,i,n=-1,a=e.length;if(1==arguments.length){for(;++n=i){r=i;break}for(;++ni&&(r=i)}else{for(;++n=i){r=i;break}for(;++ni&&(r=i)}return r},e.max=function(e,t){var r,i,n=-1,a=e.length;if(1==arguments.length){for(;++n=i){r=i;break}for(;++nr&&(r=i)}else{for(;++n=i){r=i;break}for(;++nr&&(r=i)}return r},e.extent=function(e,t){var r,i,n,a=-1,o=e.length;if(1==arguments.length){for(;++a=i){r=n=i;break}for(;++ai&&(r=i),n=i){r=n=i;break}for(;++ai&&(r=i),n1)return o/(l-1)},e.deviation=function(){var t=e.variance.apply(this,arguments);return t&&Math.sqrt(t)};var g=m(d);function y(e){return e.length}e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(e){return m(1===e.length?function(t,r){return d(e(t),r)}:e)},e.shuffle=function(e,t,r){(a=arguments.length)<3&&(r=e.length,a<2&&(t=0));for(var i,n,a=r-t;a;)n=Math.random()*a--|0,i=e[a+t],e[a+t]=e[n+t],e[n+t]=i;return e},e.permute=function(e,t){for(var r=t.length,i=Array(r);r--;)i[r]=e[t[r]];return i},e.pairs=function(e){for(var t=0,r=e.length-1,i=e[0],n=Array(r<0?0:r);t=0;)for(t=(i=e[n]).length;--t>=0;)r[--o]=i[t];return r};var v=Math.abs;function x(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function b(){this._=Object.create(null)}function _(e){return"__proto__"==(e+="")||"\0"===e[0]?"\0"+e:e}function w(e){return"\0"===(e+="")[0]?e.slice(1):e}function T(e){return _(e)in this._}function M(e){return(e=_(e))in this._&&delete this._[e]}function k(){var e=[];for(var t in this._)e.push(w(t));return e}function A(){var e=0;for(var t in this._)++e;return e}function S(){for(var e in this._)return!1;return!0}function E(){this._=Object.create(null)}function C(e){return e}function L(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var r=0,i=P.length;rt;)n.push(i/a);else for(;(i=e+r*++o)=n.length)return r?r.call(i,a):t?a.sort(t):a;for(var l,c,u,h,d=-1,f=a.length,p=n[s++],m=new b;++d=n.length)return t;var i=[],o=a[r++];return t.forEach(function(t,n){i.push({key:t,values:e(n,r)})}),o?i.sort(function(e,t){return o(e.key,t.key)}):i}(o(e.map,t,0),0)},i.key=function(e){return n.push(e),i},i.sortKeys=function(e){return a[n.length-1]=e,i},i.sortValues=function(e){return t=e,i},i.rollup=function(e){return r=e,i},i},e.set=function(e){var t=new E;if(e)for(var r=0,i=e.length;r=0&&(i=e.slice(r+1),e=e.slice(0,r)),e)return arguments.length<2?this[e].on(i):this[e].on(i,t);if(2==arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(i,null);return this}},e.event=null,e.requote=function(e){return e.replace(j,"\\$&")};var j=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,B={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function N(e){return B(e,H),e}var U=function(e,t){return t.querySelector(e)},V=function(e,t){return t.querySelectorAll(e)},q=function(e,t){var r=e.matches||e[L(e,"matchesSelector")];return(q=function(e,t){return r.call(e,t)})(e,t)};"function"==typeof Sizzle&&(U=function(e,t){return Sizzle(e,t)[0]||null},V=Sizzle,q=Sizzle.matchesSelector),e.selection=function(){return e.select(n.documentElement)};var H=e.selection.prototype=[];function G(e){return"function"==typeof e?e:function(){return U(e,this)}}function W(e){return"function"==typeof e?e:function(){return V(e,this)}}H.select=function(e){var t,r,i,n,a=[];e=G(e);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),Z.hasOwnProperty(r)?{space:Z[r],local:e}:e}},H.attr=function(t,r){if(arguments.length<2){if("string"==typeof t){var i=this.node();return(t=e.ns.qualify(t)).local?i.getAttributeNS(t.space,t.local):i.getAttribute(t)}for(r in t)this.each($(r,t[r]));return this}return this.each($(t,r))},H.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node(),i=(e=J(e)).length,n=-1;if(t=r.classList){for(;++n=0;)(r=i[n])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},H.sort=function(e){e=es.apply(this,arguments);for(var t=-1,r=this.length;++t0&&(t=t.slice(0,o));var l=ed.get(t);function c(){var e=this[a];e&&(this.removeEventListener(t,e,e.$),delete this[a])}return l&&(t=l,s=ep),o?r?function(){var e=s(r,i(arguments));c.call(this),this.addEventListener(t,this[a]=e,e.$=n),e._=r}:c:r?I:function(){var r,i=RegExp("^__on([^.]+)"+e.requote(t)+"$");for(var n in this)if(r=n.match(i)){var a=this[n];this.removeEventListener(r[1],a,a.$),delete this[n]}}}e.selection.enter=ec,e.selection.enter.prototype=eu,eu.append=H.append,eu.empty=H.empty,eu.node=H.node,eu.call=H.call,eu.size=H.size,eu.select=function(e){for(var t,r,i,n,a,o=[],s=-1,l=this.length;++s=i&&(i=t+1);!(o=s[i])&&++i1?ek:e<-1?-ek:Math.asin(e)}function eC(e){return((e=Math.exp(e))+1/e)/2}var eL=Math.SQRT2;e.interpolateZoom=function(e,t){var r,i,n=e[0],a=e[1],o=e[2],s=t[0],l=t[1],c=t[2],u=s-n,h=l-a,d=u*u+h*h;if(d0&&(t=t.transition().duration(m)),t.call(w.event)}function S(){c&&c.domain(l.range().map(function(e){return(e-d.x)/d.k}).map(l.invert)),h&&h.domain(u.range().map(function(e){return(e-d.y)/d.k}).map(u.invert))}function E(e){g++||e({type:"zoomstart"})}function C(e){S(),e({type:"zoom",scale:d.k,translate:[d.x,d.y]})}function L(e){--g||(e({type:"zoomend"}),r=null)}function P(){var t=this,r=_.of(t,arguments),i=0,n=e.select(o(t)).on(v,function(){i=1,k(e.mouse(t),a),C(r)}).on(x,function(){n.on(v,null).on(x,null),s(i),L(r)}),a=T(e.mouse(t)),s=ey(t);iW.call(t),E(r)}function I(){var t,r=this,i=_.of(r,arguments),n={},a=0,o=".zoom-"+e.event.changedTouches[0].identifier,l="touchmove"+o,c="touchend"+o,u=[],h=e.select(r),f=ey(r);function p(){var i=e.touches(r);return t=d.k,i.forEach(function(e){e.identifier in n&&(n[e.identifier]=T(e))}),i}function m(){var t=e.event.target;e.select(t).on(l,g).on(c,v),u.push(t);for(var i=e.event.changedTouches,o=0,h=i.length;o1){var y=f[0],x=f[1],b=y[0]-x[0],_=y[1]-x[1];a=b*b+_*_}}function g(){var o,l,c,u,h=e.touches(r);iW.call(r);for(var d=0,f=h.length;d360?t-=360:t<0&&(t+=360),t<60?i+(n-i)*t/60:t<180?n:t<240?i+(n-i)*(240-t)/60:i))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,n=(r=r<0?0:r>1?1:r)<=.5?r*(1+t):r+t-r*t,i=2*r-n,new e$(a(e+120),a(e),a(e-120))}function ej(t,r,i){return this instanceof ej?(this.h=+t,this.c=+r,void(this.l=+i)):arguments.length<2?t instanceof ej?new ej(t.h,t.c,t.l):t instanceof eU?eG(t.l,t.a,t.b):eG((t=e2((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ej(t,r,i)}eR.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new eO(this.h,this.s,this.l/e)},eR.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new eO(this.h,this.s,e*this.l)},eR.rgb=function(){return eF(this.h,this.s,this.l)},e.hcl=ej;var eB=ej.prototype=new eD;function eN(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new eU(r,Math.cos(e*=eA)*t,Math.sin(e)*t)}function eU(e,t,r){return this instanceof eU?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof eU?new eU(e.l,e.a,e.b):e instanceof ej?eN(e.h,e.c,e.l):e2((e=e$(e)).r,e.g,e.b):new eU(e,t,r)}eB.brighter=function(e){return new ej(this.h,this.c,Math.min(100,this.l+eV*(arguments.length?e:1)))},eB.darker=function(e){return new ej(this.h,this.c,Math.max(0,this.l-eV*(arguments.length?e:1)))},eB.rgb=function(){return eN(this.h,this.c,this.l).rgb()},e.lab=eU;var eV=18,eq=eU.prototype=new eD;function eH(e,t,r){var i=(e+16)/116,n=i+t/500,a=i-r/200;return n=.95047*eW(n),new e$(eZ(3.2404542*n-1.5371385*(i=+eW(i))-.4985314*(a=1.08883*eW(a))),eZ(-.969266*n+1.8760108*i+.041556*a),eZ(.0556434*n-.2040259*i+1.0572252*a))}function eG(e,t,r){return e>0?new ej(Math.atan2(r,t)*eS,Math.sqrt(t*t+r*r),e):new ej(NaN,NaN,e)}function eW(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function eY(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function eZ(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function e$(e,t,r){return this instanceof e$?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof e$?new e$(e.r,e.g,e.b):e0(""+e,e$,eF):new e$(e,t,r)}function eX(e){return new e$(e>>16,e>>8&255,255&e)}function eK(e){return eX(e)+""}eq.brighter=function(e){return new eU(Math.min(100,this.l+eV*(arguments.length?e:1)),this.a,this.b)},eq.darker=function(e){return new eU(Math.max(0,this.l-eV*(arguments.length?e:1)),this.a,this.b)},eq.rgb=function(){return eH(this.l,this.a,this.b)},e.rgb=e$;var eJ=e$.prototype=new eD;function eQ(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function e0(e,t,r){var i,n,a,o=0,s=0,l=0;if(i=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(n=i[2].split(","),i[1]){case"hsl":return r(parseFloat(n[0]),parseFloat(n[1])/100,parseFloat(n[2])/100);case"rgb":return t(e5(n[0]),e5(n[1]),e5(n[2]))}return(a=e4.get(e))?t(a.r,a.g,a.b):(null==e||"#"!==e.charAt(0)||isNaN(a=parseInt(e.slice(1),16))||(4===e.length?(o=(o=(3840&a)>>4)>>4|o,s=(s=240&a)>>4|s,l=(l=15&a)<<4|l):7===e.length&&(o=(0xff0000&a)>>16,s=(65280&a)>>8,l=255&a)),t(o,s,l))}function e1(e,t,r){var i,n,a=Math.min(e/=255,t/=255,r/=255),o=Math.max(e,t,r),s=o-a,l=(o+a)/2;return s?(n=l<.5?s/(o+a):s/(2-o-a),i=(e==o?(t-r)/s+6*(t0&&l<1?0:i),new eO(i,n,l)}function e2(e,t,r){e=e3(e);var i=eY((.4124564*e+.3575761*(t=e3(t))+.1804375*(r=e3(r)))/.95047),n=eY((.2126729*e+.7151522*t+.072175*r)/1);return eU(116*n-16,500*(i-n),200*(n-eY((.0193339*e+.119192*t+.9503041*r)/1.08883)))}function e3(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function e5(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}eJ.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,i=this.b;return t||r||i?(t&&t<30&&(t=30),r&&r<30&&(r=30),i&&i<30&&(i=30),new e$(Math.min(255,t/e),Math.min(255,r/e),Math.min(255,i/e))):new e$(30,30,30)},eJ.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new e$(e*this.r,e*this.g,e*this.b)},eJ.hsl=function(){return e1(this.r,this.g,this.b)},eJ.toString=function(){return"#"+eQ(this.r)+eQ(this.g)+eQ(this.b)};var e4=e.map({aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32});function e6(e){return"function"==typeof e?e:function(){return e}}function e8(e){return function(t,r,i){return 2==arguments.length&&"function"==typeof r&&(i=r,r=null),e9(t,r,e,i)}}function e9(t,r,n,a){var o,s={},l=e.dispatch("beforesend","progress","load","error"),c={},u=new XMLHttpRequest,h=null;function d(){var e,t,r,i=u.status;if(!i&&((t=(e=u).responseType)&&"text"!==t?e.response:e.responseText)||i>=200&&i<300||304===i){try{r=n.call(s,u)}catch(e){l.error.call(s,e);return}l.load.call(s,r)}else l.error.call(s,u)}return self.XDomainRequest&&!("withCredentials"in u)&&/^(http(s)?:)?\/\//.test(t)&&(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=d:u.onreadystatechange=function(){u.readyState>3&&d()},u.onprogress=function(t){var r=e.event;e.event=t;try{l.progress.call(s,u)}finally{e.event=r}},s.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?c[e]:(null==t?delete c[e]:c[e]=t+"",s)},s.mimeType=function(e){return arguments.length?(r=null==e?null:e+"",s):r},s.responseType=function(e){return arguments.length?(h=e,s):h},s.response=function(e){return n=e,s},["get","post"].forEach(function(e){s[e]=function(){return s.send.apply(s,[e].concat(i(arguments)))}}),s.send=function(e,i,n){if(2==arguments.length&&"function"==typeof i&&(n=i,i=null),u.open(e,t,!0),null==r||"accept"in c||(c.accept=r+",*/*"),u.setRequestHeader)for(var a in c)u.setRequestHeader(a,c[a]);return null!=r&&u.overrideMimeType&&u.overrideMimeType(r),null!=h&&(u.responseType=h),null!=n&&s.on("error",n).on("load",function(e){n(null,e)}),l.beforesend.call(s,u),u.send(i??null),s},s.abort=function(){return u.abort(),s},e.rebind(s,l,"on"),null==a?s:s.get(1===(o=a).length?function(e,t){o(null==e?t:null)}:o)}e4.forEach(function(e,t){e4.set(e,eX(t))}),e.functor=e6,e.xhr=e8(C),e.dsv=function(e,t){var r=RegExp('["'+e+` +]`),i=e.charCodeAt(0);function n(e,r,i){arguments.length<3&&(i=r,r=null);var n=e9(e,t,null==r?a:o(r),i);return n.row=function(e){return arguments.length?n.response(null==(r=e)?a:o(e)):r},n}function a(e){return n.parse(e.responseText)}function o(e){return function(t){return n.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return n.parse=function(e,t){var r;return n.parseRows(e,function(e,i){if(r)return r(e,i-1);var n=function(t){for(var r={},i=e.length,n=0;n=l)return o;if(n)return n=!1,a;var t=c;if(34===e.charCodeAt(t)){for(var r=t;r++24?(isFinite(t)&&(clearTimeout(tr),tr=setTimeout(ta,t)),tt=0):(tt=1,ti(ta))}function to(){for(var e=Date.now(),t=e9;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function ts(){for(var e,t=e9,r=1/0;t;)t.c?(t.t1&&0>=(t=e[a[o-2]],r=e[a[o-1]],i=e[s],(r[0]-t[0])*(i[1]-t[1])-(r[1]-t[1])*(i[0]-t[0]));)--o;a[o++]=s}return a.slice(0,o)}function th(e,t){return e[0]-t[0]||e[1]-t[1]}e.timer=function(){tn.apply(this,arguments)},e.timer.flush=function(){to(),ts()},e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},e.geom={},e.geom.hull=function(e){var t=tl,r=tc;if(arguments.length)return i(e);function i(e){if(e.length<3)return[];var i,n=e6(t),a=e6(r),o=e.length,s=[],l=[];for(i=0;i=0;--i)f.push(e[s[c[i]][2]]);for(i=+h;i=-e_)){var f=l*l+c*c,p=u*u+h*h,m=(h*f-c*p)/d,g=(l*p-u*f)/d,h=g+s,y=tw.pop()||new tC;y.arc=e,y.site=n,y.x=m+o,y.y=h+Math.sqrt(m*m+g*g),y.cy=h,e.circle=y;for(var v=null,x=tb._;x;)if(y.y1e-6)s=s.L;else if((n=a-function(e,t){var r=e.N;if(r)return tA(r,t);var i=e.site;return i.y===t?i.x:1/0}(s,o))>1e-6){if(!s.R){t=s;break}s=s.R}else{i>-1e-6?(t=s.P,r=s):n>-1e-6?(t=s,r=s.N):t=r=s;break}var l=tM(e);if(tv.insert(t,l),!(!t&&!r)){if(t===r){tP(t),r=tM(t.site),tv.insert(l,r),l.edge=r.edge=tz(t.site,l.site),tL(t),tL(r);return}if(!r){l.edge=tz(t.site,l.site);return}tP(t),tP(r);var c=t.site,u=c.x,h=c.y,d=e.x-u,f=e.y-h,p=r.site,m=p.x-u,g=p.y-h,y=2*(d*g-f*m),v=d*d+f*f,x=m*m+g*g,b={x:(g*v-f*x)/y+u,y:(d*x-m*v)/y+h};tD(r.edge,c,p,b),l.edge=tz(c,e,null,b),r.edge=tz(e,p,null,b),tL(t),tL(r)}}(a),r=a.x,i=a.y),a=e.pop();else if(n)!function(e){var t=e.circle,r=t.x,i=t.cy,n={x:r,y:i},a=e.P,o=e.N,s=[e];tk(e);for(var l=a;l.circle&&1e-6>v(r-l.circle.x)&&1e-6>v(i-l.circle.cy);)a=l.P,s.unshift(l),tk(l),l=a;s.unshift(l),tP(l);for(var c=o;c.circle&&1e-6>v(r-c.circle.x)&&1e-6>v(i-c.circle.cy);)o=c.N,s.push(c),tk(c),c=o;s.push(c),tP(c);var u,h=s.length;for(u=1;u0)){if(a/=p,p<0){if(a0){if(a>f)return;a>d&&(d=a)}if(a=i-l,!(!p&&a<0)){if(a/=p,p<0){if(a>f)return;a>d&&(d=a)}else if(p>0){if(a0)){if(a/=m,m<0){if(a0){if(a>f)return;a>d&&(d=a)}if(a=n-c,!(!m&&a<0)){if(a/=m,m<0){if(a>f)return;a>d&&(d=a)}else if(m>0){if(a0&&(e.a={x:l+d*p,y:c+d*m}),f<1&&(e.b={x:l+f*p,y:c+f*m}),e}}}}}),l=o.length;l--;)(!function(e,t){var r=e.b;if(r)return!0;var i,n,a=e.a,o=t[0][0],s=t[1][0],l=t[0][1],c=t[1][1],u=e.l,h=e.r,d=u.x,f=u.y,p=h.x,m=h.y,g=(d+p)/2;if(m===f){if(g=s)return;if(d>p){if(a){if(a.y>=c)return}else a={x:g,y:l};r={x:g,y:c}}else{if(a){if(a.y1)if(d>p){if(a){if(a.y>=c)return}else a={x:(l-n)/i,y:l};r={x:(c-n)/i,y:c}}else{if(a){if(a.y=s)return}else a={x:o,y:i*o+n};r={x:s,y:i*s+n}}else{if(a){if(a.xv(a.a.x-a.b.x)&&1e-6>v(a.a.y-a.b.y))&&(a.a=a.b=null,o.splice(l,1))}(t),function(e){for(var t,r,i,n,a,o,s,l,c,u,h=e[0][0],d=e[1][0],f=e[0][1],p=e[1][1],m=ty,g=m.length;g--;)if(!(!(a=m[g])||!a.prepare()))for(l=(s=a.edges).length,o=0;o1e-6||v(n-r)>1e-6)&&(s.splice(o,0,new tO(function(e,t,r){var i=new tI(e,null);return i.a=t,i.b=r,tg.push(i),i}(a.site,u,1e-6>v(i-h)&&p-n>1e-6?{x:h,y:1e-6>v(t-h)?r:p}:1e-6>v(n-p)&&d-i>1e-6?{x:1e-6>v(r-p)?t:d,y:p}:1e-6>v(i-d)&&n-f>1e-6?{x:d,y:1e-6>v(t-d)?r:f}:1e-6>v(n-f)&&i-h>1e-6?{x:1e-6>v(r-f)?t:h,y:f}:null),a.site,null)),++l)}(t));var o={cells:ty,edges:tg};return tv=tb=tg=ty=null,o}function tV(e,t){return t.y-e.y||t.x-e.x}tS.prototype.prepare=function(){for(var e,t=this.edges,r=t.length;r--;)(e=t[r].edge).b&&e.a||t.splice(r,1);return t.sort(tE),t.length},tO.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},tR.prototype={insert:function(e,t){var r,i,n;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;r=e}else this._?(e=tN(this._),t.P=null,t.N=e,e.P=e.L=t,r=e):(t.P=t.N=null,this._=t,r=null);for(t.L=t.R=null,t.U=r,t.C=!0,e=t;r&&r.C;)i=r.U,r===i.L?(n=i.R)&&n.C?(r.C=n.C=!1,i.C=!0,e=i):(e===r.R&&(tj(this,r),r=(e=r).U),r.C=!1,i.C=!0,tB(this,i)):(n=i.L)&&n.C?(r.C=n.C=!1,i.C=!0,e=i):(e===r.L&&(tB(this,r),r=(e=r).U),r.C=!1,i.C=!0,tj(this,i)),r=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,r,i,n=e.U,a=e.L,o=e.R;if(r=a?o?tN(o):a:o,n?n.L===e?n.L=r:n.R=r:this._=r,a&&o?(i=r.C,r.C=e.C,r.L=a,a.U=r,r!==o?(n=r.U,r.U=e.U,e=r.R,n.L=e,r.R=o,o.U=r):(r.U=n,n=r,e=r.R)):(i=e.C,e=r),e&&(e.U=n),!i){if(e&&e.C){e.C=!1;return}do{if(e===this._)break;if(e===n.L){if((t=n.R).C&&(t.C=!1,n.C=!0,tj(this,n),t=n.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,tB(this,t),t=n.R),t.C=n.C,n.C=t.R.C=!1,tj(this,n),e=this._;break}}else if((t=n.L).C&&(t.C=!1,n.C=!0,tB(this,n),t=n.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,tj(this,t),t=n.L),t.C=n.C,n.C=t.L.C=!1,tB(this,n),e=this._;break}t.C=!0,e=n,n=n.U}while(!e.C);e&&(e.C=!1)}}},e.geom.voronoi=function(e){var t=tl,r=tc,i=t,n=r,a=tq;if(e)return o(e);function o(e){var t=Array(e.length),r=a[0][0],i=a[0][1],n=a[1][0],o=a[1][1];return tU(s(e),a).cells.forEach(function(a,s){var l=a.edges,c=a.site;(t[s]=l.length?l.map(function(e){var t=e.start();return[t.x,t.y]}):c.x>=r&&c.x<=n&&c.y>=i&&c.y<=o?[[r,o],[n,o],[n,i],[r,i]]:[]).point=e[s]}),t}function s(e){return e.map(function(e,t){return{x:1e-6*Math.round(i(e,t)/1e-6),y:1e-6*Math.round(n(e,t)/1e-6),i:t}})}return o.links=function(e){return tU(s(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},o.triangles=function(e){var t=[];return tU(s(e)).cells.forEach(function(r,i){for(var n,a,o,s,l=r.site,c=r.edges.sort(tE),u=-1,h=c.length,d=c[h-1].edge,f=d.l===l?d.r:d.l;++u(n=l,a=s,o=f,(n.x-o.x)*(a.y-n.y)-(n.x-a.x)*(o.y-n.y))&&t.push([e[i],e[s.i],e[f.i]])}}),t},o.x=function(e){return arguments.length?(i=e6(t=e),o):t},o.y=function(e){return arguments.length?(n=e6(r=e),o):r},o.clipExtent=function(e){return arguments.length?(a=e??tq,o):a===tq?null:a},o.size=function(e){return arguments.length?o.clipExtent(e&&[[0,0],e]):a===tq?null:a&&a[1]},o};var tq=[[-1e6,-1e6],[1e6,1e6]];function tH(e){return e.x}function tG(e){return e.y}function tW(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function tY(t,r){t=e.rgb(t),r=e.rgb(r);var i=t.r,n=t.g,a=t.b,o=r.r-i,s=r.g-n,l=r.b-a;return function(e){return"#"+eQ(Math.round(i+o*e))+eQ(Math.round(n+s*e))+eQ(Math.round(a+l*e))}}function tZ(e,t){var r,i={},n={};for(r in e)r in t?i[r]=tQ(e[r],t[r]):n[r]=e[r];for(r in t)r in e||(n[r]=t[r]);return function(e){for(r in i)n[r]=i[r](e);return n}}function t$(e,t){return e*=1,t*=1,function(r){return e*(1-r)+t*r}}function tX(e,t){var r,i,n,a=tK.lastIndex=tJ.lastIndex=0,o=-1,s=[],l=[];for(e+="",t+="";(r=tK.exec(e))&&(i=tJ.exec(t));)(n=i.index)>a&&(n=t.slice(a,n),s[o]?s[o]+=n:s[++o]=n),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:t$(r,i)})),a=tJ.lastIndex;return am&&(m=l.x),l.y>g&&(g=l.y),c.push(l.x),u.push(l.y);else for(h=0;hm&&(m=b),_>g&&(g=_),c.push(b),u.push(_)}var w=m-f,T=g-p;function M(e,t,r,i,n,a,o,s){if(!(isNaN(r)||isNaN(i)))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(v(l-r)+v(c-i)<.01)k(e,t,r,i,n,a,o,s);else{var u=e.point;e.x=e.y=e.point=null,k(e,u,l,c,n,a,o,s),k(e,t,r,i,n,a,o,s)}else e.x=r,e.y=i,e.point=t}else k(e,t,r,i,n,a,o,s)}function k(e,t,r,i,n,a,o,s){var l=(n+o)*.5,c=(a+s)*.5,u=r>=l,h=i>=c,d=h<<1|u;e.leaf=!1,e=e.nodes[d]||(e.nodes[d]=tW()),u?n=l:o=l,h?a=c:s=c,M(e,t,r,i,n,a,o,s)}w>T?g=p+w:m=f+T;var A=tW();if(A.add=function(e){M(A,e,+y(e,++h),+x(e,h),f,p,m,g)},A.visit=function(e){!function e(t,r,i,n,a,o){if(!t(r,i,n,a,o)){var s=(i+a)*.5,l=(n+o)*.5,c=r.nodes;c[0]&&e(t,c[0],i,n,s,l),c[1]&&e(t,c[1],s,n,a,l),c[2]&&e(t,c[2],i,l,s,o),c[3]&&e(t,c[3],s,l,a,o)}}(e,A,f,p,m,g)},A.find=function(e){var t,r,i,n,a,o,s,l,c;return t=A,r=e[0],i=e[1],c=1/0,function e(t,u,h,d,f){if(!(u>o||h>s||d=b,T=i>=_,M=T<<1|w,k=M+4;M=0&&!(i=e.interpolators[n](t,r)););return i}function t0(e,t){var r,i=[],n=[],a=e.length,o=t.length,s=Math.min(e.length,t.length);for(r=0;r=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function t9(e){return 1-Math.cos(e*ek)}function re(e){return Math.pow(2,10*(e-1))}function rt(e){return 1-Math.sqrt(1-e*e)}function rr(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function ri(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function rn(e){var t,r,i,n=[e.a,e.b],a=[e.c,e.d],o=ro(n),s=ra(n,a),l=ro((t=a,r=n,i=-s,t[0]+=i*r[0],t[1]+=i*r[1],t))||0;n[0]*a[1]=0?e.slice(0,i):e,a=i>=0?e.slice(i+1):"in";return n=t2.get(n)||t1,t=(a=t3.get(a)||C)(n.apply(null,r.call(arguments,1))),function(e){return e<=0?0:e>=1?1:t(e)}},e.interpolateHcl=function(t,r){t=e.hcl(t),r=e.hcl(r);var i=t.h,n=t.c,a=t.l,o=r.h-i,s=r.c-n,l=r.l-a;return isNaN(s)&&(s=0,n=isNaN(n)?r.c:n),isNaN(o)?(o=0,i=isNaN(i)?r.h:i):o>180?o-=360:o<-180&&(o+=360),function(e){return eN(i+o*e,n+s*e,a+l*e)+""}},e.interpolateHsl=function(t,r){t=e.hsl(t),r=e.hsl(r);var i=t.h,n=t.s,a=t.l,o=r.h-i,s=r.s-n,l=r.l-a;return isNaN(s)&&(s=0,n=isNaN(n)?r.s:n),isNaN(o)?(o=0,i=isNaN(i)?r.h:i):o>180?o-=360:o<-180&&(o+=360),function(e){return eF(i+o*e,n+s*e,a+l*e)+""}},e.interpolateLab=function(t,r){t=e.lab(t),r=e.lab(r);var i=t.l,n=t.a,a=t.b,o=r.l-i,s=r.a-n,l=r.b-a;return function(e){return eH(i+o*e,n+s*e,a+l*e)+""}},e.interpolateRound=ri,e.transform=function(t){var r=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){if(null!=e){r.setAttribute("transform",e);var t=r.transform.baseVal.consolidate()}return new rn(t?t.matrix:rs)})(t)},rn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var rs={a:1,b:0,c:0,d:1,e:0,f:0};function rl(e){return e.length?e.pop()+",":""}function rc(t,r){var i,n,a,o,s=[],l=[];return t=e.transform(t),r=e.transform(r),function(e,t,r,i){if(e[0]!==t[0]||e[1]!==t[1]){var n=r.push("translate(",null,",",null,")");i.push({i:n-4,x:t$(e[0],t[0])},{i:n-2,x:t$(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(t.translate,r.translate,s,l),i=t.rotate,n=r.rotate,i!==n?(i-n>180?n+=360:n-i>180&&(i+=360),l.push({i:s.push(rl(s)+"rotate(",null,")")-2,x:t$(i,n)})):n&&s.push(rl(s)+"rotate("+n+")"),a=t.skew,o=r.skew,a!==o?l.push({i:s.push(rl(s)+"skewX(",null,")")-2,x:t$(a,o)}):o&&s.push(rl(s)+"skewX("+o+")"),function(e,t,r,i){if(e[0]!==t[0]||e[1]!==t[1]){var n=r.push(rl(r)+"scale(",null,",",null,")");i.push({i:n-4,x:t$(e[0],t[0])},{i:n-2,x:t$(e[1],t[1])})}else(1!==t[0]||1!==t[1])&&r.push(rl(r)+"scale("+t+")")}(t.scale,r.scale,s,l),t=r=null,function(e){for(var t,r=-1,i=l.length;++r0?i=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:i=0})):e>0&&(l.start({type:"start",alpha:i=e}),t=tn(s.tick)),s):i},s.start=function(){var e,t,r,i=y.length,l=v.length,u=c[0],p=c[1];for(e=0;e=0;)n.push(i[r])}function rw(e,t){for(var r=[e],i=[];null!=(e=r.pop());)if(i.push(e),(a=e.children)&&(n=a.length))for(var n,a,o=-1;++o=0;)c.push(s=o[a]),s.parent=l,s.depth=l.depth+1;r&&(l.value=0),l.children=o}else r&&(l.value=+r.call(i,l,l.depth)||0),delete l.children;return rw(n,function(t){var i,n;e&&(i=t.children)&&i.sort(e),r&&(n=t.parent)&&(n.value+=t.value)}),u}return i.sort=function(t){return arguments.length?(e=t,i):e},i.children=function(e){return arguments.length?(t=e,i):t},i.value=function(e){return arguments.length?(r=e,i):r},i.revalue=function(e){return r&&(r_(e,function(e){e.children&&(e.value=0)}),rw(e,function(e){var t;e.children||(e.value=+r.call(i,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)})),e},i},e.layout.partition=function(){var t=e.layout.hierarchy(),r=[1,1];function i(e,i){var n=t.call(this,e,i);return function e(t,r,i,n){var a=t.children;if(t.x=r,t.y=t.depth*n,t.dx=i,t.dy=n,a&&(o=a.length)){var o,s,l,c=-1;for(i=t.value?i/t.value:0;++cs&&(s=i),o.push(i)}for(r=0;rn&&(i=r,n=t);return i}function rR(e){return e.reduce(rF,0)}function rF(e,t){return e+t[1]}function rj(e,t){return rB(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function rB(e,t){for(var r=-1,i=+e[0],n=(e[1]-i)/t,a=[];++r<=t;)a[r]=n*r+i;return a}function rN(t){return[e.min(t),e.max(t)]}function rU(e,t){return e.value-t.value}function rV(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function rq(e,t){e._pack_next=t,t._pack_prev=e}function rH(e,t){var r=t.x-e.x,i=t.y-e.y,n=e.r+t.r;return .999*n*n>r*r+i*i}function rG(e){if((t=e.children)&&(l=t.length)){var t,r,i,n,a,o,s,l,c=1/0,u=-1/0,h=1/0,d=-1/0;if(t.forEach(rW),(r=t[0]).x=-r.r,r.y=0,x(r),l>1&&((i=t[1]).x=i.r,i.y=0,x(i),l>2))for(rZ(r,i,n=t[2]),x(n),rV(r,n),r._pack_prev=n,rV(n,i),i=r._pack_next,a=3;a0)for(o=-1;++o=h[0]&&l<=h[1]&&(s=c[e.bisect(d,l,1,p)-1],s.y+=m,s.push(a[o]));return c}return a.value=function(e){return arguments.length?(r=e,a):r},a.range=function(e){return arguments.length?(i=e6(e),a):i},a.bins=function(e){return arguments.length?(n="number"==typeof e?function(t){return rB(t,e)}:e6(e),a):n},a.frequency=function(e){return arguments.length?(t=!!e,a):t},a},e.layout.pack=function(){var t,r=e.layout.hierarchy().sort(rU),i=0,n=[1,1];function a(e,a){var o=r.call(this,e,a),s=o[0],l=n[0],c=n[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,rw(s,function(e){e.r=+u(e.value)}),rw(s,rG),i){var h=i*(t?1:Math.max(2*s.r/l,2*s.r/c))/2;rw(s,function(e){e.r+=h}),rw(s,rG),rw(s,function(e){e.r-=h})}return function e(t,r,i,n){var a=t.children;if(t.x=r+=n*t.x,t.y=i+=n*t.y,t.r*=n,a)for(var o=-1,s=a.length;++of.x&&(f=e),e.depth>p.depth&&(p=e)});var m=r(d,f)/2-d.x,g=i[0]/(f.x+r(f,d)/2+m),y=i[1]/(p.depth||1);r_(u,function(e){e.x=(e.x+m)*g,e.y=e.depth*y})}return c}function o(e){var t=e.children,i=e.parent.children,n=e.i?i[e.i-1]:null;if(t.length){!function(e){for(var t,r=0,i=0,n=e.children,a=n.length;--a>=0;)t=n[a],t.z+=r,t.m+=r,r+=t.s+(i+=t.c)}(e);var a=(t[0].z+t[t.length-1].z)/2;n?(e.z=n.z+r(e._,n._),e.m=e.z-a):e.z=a}else n&&(e.z=n.z+r(e._,n._));e.parent.A=function(e,t,i){if(t){for(var n,a,o,s,l=e,c=e,u=t,h=l.parent.children[0],d=l.m,f=c.m,p=u.m,m=h.m;u=rK(u),l=rX(l),u&&l;){h=rX(h),(c=rK(c)).a=e,(s=u.z+p-l.z-d+r(u._,l._))>0&&(function(e,t,r){var i=r/(t.i-e.i);t.c-=i,t.s+=r,e.c+=i,t.z+=r,t.m+=r}((n=u,a=e,o=i,n.a.parent===a.parent?n.a:o),e,s),d+=s,f+=s),p+=u.m,d+=l.m,m+=h.m,f+=c.m}u&&!rK(c)&&(c.t=u,c.m+=p-f),l&&!rX(h)&&(h.t=l,h.m+=d-m,i=e)}return i}(e,n,e.parent.A||i[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=i[0],e.y=e.depth*i[1]}return a.separation=function(e){return arguments.length?(r=e,a):r},a.size=function(e){return arguments.length?(n=null==(i=e)?l:null,a):n?null:i},a.nodeSize=function(e){return arguments.length?(n=null==(i=e)?null:l,a):n?i:null},rb(a,t)},e.layout.cluster=function(){var t=e.layout.hierarchy().sort(null).value(null),r=r$,i=[1,1],n=!1;function a(a,o){var s,l=t.call(this,a,o),c=l[0],u=0;rw(c,function(t){var i,n,a=t.children;a&&a.length?(t.x=(i=a).reduce(function(e,t){return e+t.x},0)/i.length,n=a,t.y=1+e.max(n,function(e){return e.y})):(t.x=s?u+=r(t,s):0,t.y=0,s=t)});var h=function e(t){var r=t.children;return r&&r.length?e(r[0]):t}(c),d=function e(t){var r,i=t.children;return i&&(r=i.length)?e(i[r-1]):t}(c),f=h.x-r(h,d)/2,p=d.x+r(d,h)/2;return rw(c,n?function(e){e.x=(e.x-c.x)*i[0],e.y=(c.y-e.y)*i[1]}:function(e){e.x=(e.x-f)/(p-f)*i[0],e.y=(1-(c.y?e.y/c.y:1))*i[1]}),l}return a.separation=function(e){return arguments.length?(r=e,a):r},a.size=function(e){return arguments.length?(n=null==(i=e),a):n?null:i},a.nodeSize=function(e){return arguments.length?(n=null!=(i=e),a):n?i:null},rb(a,t)},e.layout.treemap=function(){var t,r=e.layout.hierarchy(),i=Math.round,n=[1,1],a=null,o=rJ,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var r,i,n=-1,a=e.length;++nr.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o0;)d.push(i=f[a-1]),d.area+=i.area,"squarify"!==l||(n=function(e,t){for(var r,i=e.area,n=0,a=1/0,o=-1,s=e.length;++on&&(n=r));return i*=i,t*=t,i?Math.max(t*n*c/i,i/(t*a*c)):1/0}(d,m))<=p?(f.pop(),p=n):(d.area-=d.pop().area,h(d,m,s,!1),m=Math.min(s.dx,s.dy),d.length=d.area=0,p=1/0);d.length&&(h(d,m,s,!0),d.length=d.area=0),r.forEach(e)}})(a),s&&(t=i),i}return d.size=function(e){return arguments.length?(n=e,d):n},d.padding=function(e){var t;return arguments.length?(o=null==(a=e)?rJ:"function"==(t=typeof e)?function(t){var r=e.call(d,t,t.depth);return null==r?rJ(t):rQ(t,"number"==typeof r?[r,r,r,r]:r)}:("number"===t&&(e=[e,e,e,e]),function(t){return rQ(t,e)}),d):a},d.round=function(e){return arguments.length?(i=e?Math.round:Number,d):i!=Number},d.sticky=function(e){return arguments.length?(s=e,t=null,d):s},d.ratio=function(e){return arguments.length?(c=e,d):c},d.mode=function(e){return arguments.length?(l=e+"",d):l},rb(d,r)},e.random={normal:function(e,t){var r=arguments.length;return r<2&&(t=1),r<1&&(e=0),function(){var r,i,n;do n=(r=2*Math.random()-1)*r+(i=2*Math.random()-1)*i;while(!n||n>1);return e+t*r*Math.sqrt(-2*Math.log(n)/n)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},bates:function(t){var r=e.random.irwinHall(t);return function(){return r()/t}},irwinHall:function(e){return function(){for(var t=0,r=0;r2?r6:r2,s=n?rh:ru;return a=e(t,r,s,i),o=e(r,t,s,tQ),l}function l(e){return a(e)}return l.invert=function(e){return o(e)},l.domain=function(e){return arguments.length?(t=e.map(Number),s()):t},l.range=function(e){return arguments.length?(r=e,s()):r},l.rangeRound=function(e){return l.range(e).interpolate(ri)},l.clamp=function(e){return arguments.length?(n=e,s()):n},l.interpolate=function(e){return arguments.length?(i=e,s()):i},l.ticks=function(e){return ie(t,e)},l.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},l.nice=function(e){return r7(t,e),s()},l.copy=function(){return e(t,r,i,n)},s()}([0,1],[0,1],tQ,!1)},e.scale.log=function(){return function e(t,r,i,n){function a(e){return(i?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(r)}function o(e){return i?Math.pow(r,e):-Math.pow(r,-e)}function s(e){return t(a(e))}return s.invert=function(e){return o(t.invert(e))},s.domain=function(e){return arguments.length?(i=e[0]>=0,t.domain((n=e.map(Number)).map(a)),s):n},s.base=function(e){return arguments.length?(r=+e,t.domain(n.map(a)),s):r},s.nice=function(){var e=r3(n.map(a),i?Math:it);return t.domain(e),n=e.map(o),s},s.ticks=function(){var e=r0(n),t=[],s=e[0],l=e[1],c=Math.floor(a(s)),u=Math.ceil(a(l)),h=r%1?2:r;if(isFinite(u-c)){if(i){for(;c0;d--)t.push(o(c)*d);for(c=0;t[c]l;u--);t=t.slice(c,u)}return t},s.copy=function(){return e(t.copy(),r,i,n)},r8(s,t)}(e.scale.linear().domain([0,1]),10,!0,[1,10])};var it={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function ir(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}e.scale.pow=function(){return function e(t,r,i){var n=ir(r),a=ir(1/r);function o(e){return t(n(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(t.domain((i=e.map(Number)).map(n)),o):i},o.ticks=function(e){return ie(i,e)},o.tickFormat=function(e,t){return d3_scale_linearTickFormat(i,e,t)},o.nice=function(e){return o.domain(r7(i,e))},o.exponent=function(e){return arguments.length?(n=ir(r=e),a=ir(1/r),t.domain(i.map(n)),o):r},o.copy=function(){return e(t.copy(),r,i)},r8(o,t)}(e.scale.linear(),1,[0,1])},e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return function t(r,i){var n,a,o;function s(e){return a[((n.get(e)||("range"===i.t?n.set(e,r.push(e)):NaN))-1)%a.length]}function l(t,i){return e.range(r.length).map(function(e){return t+i*e})}return s.domain=function(e){if(!arguments.length)return r;r=[],n=new b;for(var t,a=-1,o=e.length;++a0?n[e-1]:r[0],eh?0:1;if(c=eM)return l(c,f)+(s?l(s,1-f):"")+"Z";var p,m,g,y,v,x,b,_,w,T,M,k,A=0,S=0,E=[];if((y=(+o.apply(this,arguments)||0)/2)&&(g=i===ic?Math.sqrt(s*s+c*c):+i.apply(this,arguments),f||(S*=-1),c&&(S=eE(g/c*Math.sin(y))),s&&(A=eE(g/s*Math.sin(y)))),c){v=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(h-S),_=c*Math.sin(h-S);var C=Math.abs(h-u-2*S)<=ew?0:1;if(S&&ig(v,x,b,_)===f^C){var L=(u+h)/2;v=c*Math.cos(L),x=c*Math.sin(L),b=_=null}}else v=x=0;if(s){w=s*Math.cos(h-A),T=s*Math.sin(h-A),M=s*Math.cos(u+A),k=s*Math.sin(u+A);var P=Math.abs(u-h+2*A)<=ew?0:1;if(A&&ig(w,T,M,k)===1-f^P){var I=(u+h)/2;w=s*Math.cos(I),T=s*Math.sin(I),M=k=null}}else w=T=0;if(d>1e-6&&(p=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){m=s0?0:1}function iy(e,t,r,i,n){var a=e[0]-t[0],o=e[1]-t[1],s=(n?i:-i)/Math.sqrt(a*a+o*o),l=s*o,c=-s*a,u=e[0]+l,h=e[1]+c,d=t[0]+l,f=t[1]+c,p=(u+d)/2,m=(h+f)/2,g=d-u,y=f-h,v=g*g+y*y,x=r-i,b=u*f-d*h,_=(y<0?-1:1)*Math.sqrt(Math.max(0,x*x*v-b*b)),w=(b*y-g*_)/v,T=(-b*g-y*_)/v,M=(b*y+g*_)/v,k=(-b*g+y*_)/v,A=w-p,S=T-m,E=M-p,C=k-m;return A*A+S*S>E*E+C*C&&(w=M,T=k),[[w-l,T-c],[w*r/x,T*r/x]]}function iv(){return!0}function ix(e){var t=tl,r=tc,i=iv,n=i_,a=n.key,o=.7;function s(a){var s,l=[],c=[],u=-1,h=a.length,d=e6(t),f=e6(r);function p(){l.push("M",n(e(c),o))}for(;++u1&&n.push("H",i[0]),n.join("")},"step-before":iT,"step-after":iM,basis:iS,"basis-open":function(e){if(e.length<4)return i_(e);for(var t,r=[],i=-1,n=e.length,a=[0],o=[0];++i<3;)t=e[i],a.push(t[0]),o.push(t[1]);for(r.push(iE(iP,a)+","+iE(iP,o)),--i;++iv(t=iz(e[s],e[s+1]))?o[s]=o[s+1]=0:(n=(r=o[s]/t)*r+(i=o[s+1]/t)*i)>9&&(n=3*t/Math.sqrt(n),o[s]=n*r,o[s+1]=n*i);for(s=-1;++s<=l;)a.push([(n=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])))||0,o[s]*n||0]);return a}(e))}});function i_(e){return e.length>1?e.join("L"):e+"Z"}function iw(e){return e.join("L")+"Z"}function iT(e){for(var t=0,r=e.length,i=e[0],n=[i[0],",",i[1]];++t1){s=t[1],a=e[l],l++,i+="C"+(n[0]+o[0])+","+(n[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var c=2;cew)+",1 "+t}return a.radius=function(e){return arguments.length?(r=e6(e),a):r},a.source=function(t){return arguments.length?(e=e6(t),a):e},a.target=function(e){return arguments.length?(t=e6(e),a):t},a.startAngle=function(e){return arguments.length?(i=e6(e),a):i},a.endAngle=function(e){return arguments.length?(n=e6(e),a):n},a},e.svg.diagonal=function(){var e=iR,t=iF,r=iB;function i(i,n){var a=e.call(this,i,n),o=t.call(this,i,n),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return i.source=function(t){return arguments.length?(e=e6(t),i):e},i.target=function(e){return arguments.length?(t=e6(e),i):t},i.projection=function(e){return arguments.length?(r=e,i):r},i},e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),r=iB,i=t.projection;return t.projection=function(e){var t;return arguments.length?i((t=r=e,function(){var e=t.apply(this,arguments),r=e[0],i=e[1]-ek;return[r*Math.cos(i),r*Math.sin(i)]})):r},t},e.svg.symbol=function(){var e=iU,t=iN;function r(r,i){return(iq.get(e.call(this,r,i))||iV)(t.call(this,r,i))}return r.type=function(t){return arguments.length?(e=e6(t),r):e},r.size=function(e){return arguments.length?(t=e6(e),r):t},r};var iq=e.map({circle:iV,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*iG)),r=t*iG;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/iH),r=t*iH/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/iH),r=t*iH/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});e.svg.symbolTypes=iq.keys();var iH=Math.sqrt(3),iG=Math.tan(30*eA);H.transition=function(e){for(var t,r,i=i$||++iJ,n=i1(e),a=[],o=iX||{time:Date.now(),ease:t7,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--d].call(e,o);if(a>=1)return h.event&&h.event.end.call(e,e.__data__,t),--u.count?delete u[i]:delete e[r],1}h||(o=tn(function(e){var t=h.delay;if(o.t=t+a,t<=e)return d(e-t);o.c=d},0,a=n.time),h=u[i]={tween:new b,time:a,timer:o,delay:n.delay,duration:n.duration,ease:n.ease,index:t},n=null,++u.count)}iK.call=H.call,iK.empty=H.empty,iK.node=H.node,iK.size=H.size,e.transition=function(t,r){return t&&t.transition?i$?t.transition(r):t:e.selection().transition(t)},e.transition.prototype=iK,iK.select=function(e){var t,r,i,n=this.id,a=this.namespace,o=[];e=G(e);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",s[1]-s[0])}function m(e){e.select(".extent").attr("y",l[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function g(){var h,g,y=this,v=e.select(e.event.target),x=i.of(y,arguments),b=e.select(y),_=v.datum(),w=!/^(n|s)$/.test(_)&&n,T=!/^(e|w)$/.test(_)&&a,M=v.classed("extent"),k=ey(y),A=e.mouse(y),S=e.select(o(y)).on("keydown.brush",function(){32==e.event.keyCode&&(M||(h=null,A[0]-=s[1],A[1]-=l[1],M=2),O())}).on("keyup.brush",function(){32==e.event.keyCode&&2==M&&(A[0]+=s[1],A[1]+=l[1],M=0,O())});if(e.event.changedTouches?S.on("touchmove.brush",L).on("touchend.brush",I):S.on("mousemove.brush",L).on("mouseup.brush",I),b.interrupt().selectAll("*").interrupt(),M)A[0]=s[0]-A[0],A[1]=l[0]-A[1];else if(_){var E=+/w$/.test(_),C=+/^n/.test(_);g=[s[1-E]-A[0],l[1-C]-A[1]],A[0]=s[E],A[1]=l[C]}else e.event.altKey&&(h=A.slice());function L(){var t=e.mouse(y),r=!1;g&&(t[0]+=g[0],t[1]+=g[1]),M||(e.event.altKey?(h||(h=[(s[0]+s[1])/2,(l[0]+l[1])/2]),A[0]=s[+(t[0]0))return o;do o.push(a=new Date(+t)),n(t,i),e(t);while(a=r)for(;e(r),!t(r);)r.setTime(r-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;n(e,-1),!t(e););else for(;--r>=0;)for(;n(e,1),!t(e););})},a&&(s.count=function(i,n){return t.setTime(+i),r.setTime(+n),e(t),e(r),Math.floor(a(t,r))},s.every=function(e){return isFinite(e=Math.floor(e))&&e>0?e>1?s.filter(o?function(t){return o(t)%e==0}:function(t){return s.count(0,t)%e==0}):s:null}),s}var n=i(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});n.every=function(e){return isFinite(e=Math.floor(e))&&e>0?e>1?i(function(t){t.setTime(Math.floor(t/e)*e)},function(t,r){t.setTime(+t+r*e)},function(t,r){return(r-t)/e}):n:null};var a=n.range,o=i(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()}),s=o.range,l=i(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4},function(e){return e.getMinutes()}),c=l.range,u=i(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getHours()}),h=u.range,d=i(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5},function(e){return e.getDate()-1}),f=d.range;function p(e){return i(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5})}var m=p(0),g=p(1),y=p(2),v=p(3),x=p(4),b=p(5),_=p(6),w=m.range,T=g.range,M=y.range,k=v.range,A=x.range,S=b.range,E=_.range,C=i(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),L=C.range,P=i(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});P.every=function(e){return isFinite(e=Math.floor(e))&&e>0?i(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)}):null};var I=P.range,z=i(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4},function(e){return e.getUTCMinutes()}),D=z.range,O=i(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getUTCHours()}),R=O.range,F=i(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5},function(e){return e.getUTCDate()-1}),j=F.range;function B(e){return i(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/6048e5})}var N=B(0),U=B(1),V=B(2),q=B(3),H=B(4),G=B(5),W=B(6),Y=N.range,Z=U.range,$=V.range,X=q.range,K=H.range,J=G.range,Q=W.range,ee=i(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()}),et=ee.range,er=i(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});er.every=function(e){return isFinite(e=Math.floor(e))&&e>0?i(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)}):null};var ei=er.range;e.timeDay=d,e.timeDays=f,e.timeFriday=b,e.timeFridays=S,e.timeHour=u,e.timeHours=h,e.timeInterval=i,e.timeMillisecond=n,e.timeMilliseconds=a,e.timeMinute=l,e.timeMinutes=c,e.timeMonday=g,e.timeMondays=T,e.timeMonth=C,e.timeMonths=L,e.timeSaturday=_,e.timeSaturdays=E,e.timeSecond=o,e.timeSeconds=s,e.timeSunday=m,e.timeSundays=w,e.timeThursday=x,e.timeThursdays=A,e.timeTuesday=y,e.timeTuesdays=M,e.timeWednesday=v,e.timeWednesdays=k,e.timeWeek=m,e.timeWeeks=w,e.timeYear=P,e.timeYears=I,e.utcDay=F,e.utcDays=j,e.utcFriday=G,e.utcFridays=J,e.utcHour=O,e.utcHours=R,e.utcMillisecond=n,e.utcMilliseconds=a,e.utcMinute=z,e.utcMinutes=D,e.utcMonday=U,e.utcMondays=Z,e.utcMonth=ee,e.utcMonths=et,e.utcSaturday=W,e.utcSaturdays=Q,e.utcSecond=o,e.utcSeconds=s,e.utcSunday=N,e.utcSundays=Y,e.utcThursday=H,e.utcThursdays=K,e.utcTuesday=V,e.utcTuesdays=$,e.utcWednesday=q,e.utcWednesdays=X,e.utcWeek=N,e.utcWeeks=Y,e.utcYear=er,e.utcYears=ei,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r=r||self).d3=r.d3||{})}}),k=p({"node_modules/d3-time-format/dist/d3-time-format.js"(e,t){var r,i;r=e,i=function(e,t){function r(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function i(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function n(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function a(e){var a=e.dateTime,o=e.date,l=e.time,c=e.periods,u=e.days,h=e.shortDays,d=e.months,W=e.shortMonths,ed=f(c),eM=p(c),ek=f(u),eA=p(u),eS=f(h),eE=p(h),eC=f(d),eL=p(d),eP=f(W),eI=p(W),ez={a:function(e){return h[e.getDay()]},A:function(e){return u[e.getDay()]},b:function(e){return W[e.getMonth()]},B:function(e){return d[e.getMonth()]},c:null,d:O,e:O,f:N,g:K,G:Q,H:R,I:F,j:j,L:B,m:U,M:V,p:function(e){return c[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:ew,s:eT,S:q,u:H,U:G,V:Y,w:Z,W:$,x:null,X:null,y:X,Y:J,Z:ee,"%":e_},eD={a:function(e){return h[e.getUTCDay()]},A:function(e){return u[e.getUTCDay()]},b:function(e){return W[e.getUTCMonth()]},B:function(e){return d[e.getUTCMonth()]},c:null,d:et,e:et,f:eo,g:ey,G:ex,H:er,I:ei,j:en,L:ea,m:es,M:el,p:function(e){return c[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:ew,s:eT,S:ec,u:eu,U:eh,V:ef,w:ep,W:em,x:null,X:null,y:eg,Y:ev,Z:eb,"%":e_},eO={a:function(e,t,r){var i=eS.exec(t.slice(r));return i?(e.w=eE[i[0].toLowerCase()],r+i[0].length):-1},A:function(e,t,r){var i=ek.exec(t.slice(r));return i?(e.w=eA[i[0].toLowerCase()],r+i[0].length):-1},b:function(e,t,r){var i=eP.exec(t.slice(r));return i?(e.m=eI[i[0].toLowerCase()],r+i[0].length):-1},B:function(e,t,r){var i=eC.exec(t.slice(r));return i?(e.m=eL[i[0].toLowerCase()],r+i[0].length):-1},c:function(e,t,r){return ej(e,a,t,r)},d:k,e:k,f:P,g:_,G:b,H:S,I:S,j:A,L:L,m:M,M:E,p:function(e,t,r){var i=ed.exec(t.slice(r));return i?(e.p=eM[i[0].toLowerCase()],r+i[0].length):-1},q:T,Q:z,s:D,S:C,u:g,U:y,V:v,w:m,W:x,x:function(e,t,r){return ej(e,o,t,r)},X:function(e,t,r){return ej(e,l,t,r)},y:_,Y:b,Z:w,"%":I};function eR(e,t){return function(r){var i,n,a,o=[],l=-1,c=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;"w"in c||(c.w=1),"Z"in c?(s=(l=(s=i(n(c.y,0,1))).getUTCDay())>4||0===l?t.utcMonday.ceil(s):t.utcMonday(s),s=t.utcDay.offset(s,(c.V-1)*7),c.y=s.getUTCFullYear(),c.m=s.getUTCMonth(),c.d=s.getUTCDate()+(c.w+6)%7):(s=(l=(s=r(n(c.y,0,1))).getDay())>4||0===l?t.timeMonday.ceil(s):t.timeMonday(s),s=t.timeDay.offset(s,(c.V-1)*7),c.y=s.getFullYear(),c.m=s.getMonth(),c.d=s.getDate()+(c.w+6)%7)}else("W"in c||"U"in c)&&("w"in c||(c.w="u"in c?c.u%7:+("W"in c)),l="Z"in c?i(n(c.y,0,1)).getUTCDay():r(n(c.y,0,1)).getDay(),c.m=0,c.d="W"in c?(c.w+6)%7+7*c.W-(l+5)%7:c.w+7*c.U-(l+6)%7);return"Z"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,i(c)):r(c)}}function ej(e,t,r,i){for(var n,a,o=0,l=t.length,c=r.length;o=c)return -1;if(37===(n=t.charCodeAt(o++))){if(!(a=eO[(n=t.charAt(o++))in s?t.charAt(o++):n])||(i=a(e,r,i))<0)return -1}else if(n!=r.charCodeAt(i++))return -1}return i}return ez.x=eR(o,ez),ez.X=eR(l,ez),ez.c=eR(a,ez),eD.x=eR(o,eD),eD.X=eR(l,eD),eD.c=eR(a,eD),{format:function(e){var t=eR(e+="",ez);return t.toString=function(){return e},t},parse:function(e){var t=eF(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=eR(e+="",eD);return t.toString=function(){return e},t},utcParse:function(e){var t=eF(e+="",!0);return t.toString=function(){return e},t}}}var o,s={"-":"",_:" ",0:"0"},l=/^\s*\d+/,c=/^%/,u=/[\\^$*+?|[\]().{}]/g;function h(e,t,r){var i=e<0?"-":"",n=(i?-e:e)+"",a=n.length;return i+(a68?1900:2e3),r+i[0].length):-1}function w(e,t,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function T(e,t,r){var i=l.exec(t.slice(r,r+1));return i?(e.q=3*i[0]-3,r+i[0].length):-1}function M(e,t,r){var i=l.exec(t.slice(r,r+2));return i?(e.m=i[0]-1,r+i[0].length):-1}function k(e,t,r){var i=l.exec(t.slice(r,r+2));return i?(e.d=+i[0],r+i[0].length):-1}function A(e,t,r){var i=l.exec(t.slice(r,r+3));return i?(e.m=0,e.d=+i[0],r+i[0].length):-1}function S(e,t,r){var i=l.exec(t.slice(r,r+2));return i?(e.H=+i[0],r+i[0].length):-1}function E(e,t,r){var i=l.exec(t.slice(r,r+2));return i?(e.M=+i[0],r+i[0].length):-1}function C(e,t,r){var i=l.exec(t.slice(r,r+2));return i?(e.S=+i[0],r+i[0].length):-1}function L(e,t,r){var i=l.exec(t.slice(r,r+3));return i?(e.L=+i[0],r+i[0].length):-1}function P(e,t,r){var i=l.exec(t.slice(r,r+6));return i?(e.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function I(e,t,r){var i=c.exec(t.slice(r,r+1));return i?r+i[0].length:-1}function z(e,t,r){var i=l.exec(t.slice(r));return i?(e.Q=+i[0],r+i[0].length):-1}function D(e,t,r){var i=l.exec(t.slice(r));return i?(e.s=+i[0],r+i[0].length):-1}function O(e,t){return h(e.getDate(),t,2)}function R(e,t){return h(e.getHours(),t,2)}function F(e,t){return h(e.getHours()%12||12,t,2)}function j(e,r){return h(1+t.timeDay.count(t.timeYear(e),e),r,3)}function B(e,t){return h(e.getMilliseconds(),t,3)}function N(e,t){return B(e,t)+"000"}function U(e,t){return h(e.getMonth()+1,t,2)}function V(e,t){return h(e.getMinutes(),t,2)}function q(e,t){return h(e.getSeconds(),t,2)}function H(e){var t=e.getDay();return 0===t?7:t}function G(e,r){return h(t.timeSunday.count(t.timeYear(e)-1,e),r,2)}function W(e){var r=e.getDay();return r>=4||0===r?t.timeThursday(e):t.timeThursday.ceil(e)}function Y(e,r){return e=W(e),h(t.timeThursday.count(t.timeYear(e),e)+(4===t.timeYear(e).getDay()),r,2)}function Z(e){return e.getDay()}function $(e,r){return h(t.timeMonday.count(t.timeYear(e)-1,e),r,2)}function X(e,t){return h(e.getFullYear()%100,t,2)}function K(e,t){return h((e=W(e)).getFullYear()%100,t,2)}function J(e,t){return h(e.getFullYear()%1e4,t,4)}function Q(e,r){var i=e.getDay();return h((e=i>=4||0===i?t.timeThursday(e):t.timeThursday.ceil(e)).getFullYear()%1e4,r,4)}function ee(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+h(t/60|0,"0",2)+h(t%60,"0",2)}function et(e,t){return h(e.getUTCDate(),t,2)}function er(e,t){return h(e.getUTCHours(),t,2)}function ei(e,t){return h(e.getUTCHours()%12||12,t,2)}function en(e,r){return h(1+t.utcDay.count(t.utcYear(e),e),r,3)}function ea(e,t){return h(e.getUTCMilliseconds(),t,3)}function eo(e,t){return ea(e,t)+"000"}function es(e,t){return h(e.getUTCMonth()+1,t,2)}function el(e,t){return h(e.getUTCMinutes(),t,2)}function ec(e,t){return h(e.getUTCSeconds(),t,2)}function eu(e){var t=e.getUTCDay();return 0===t?7:t}function eh(e,r){return h(t.utcSunday.count(t.utcYear(e)-1,e),r,2)}function ed(e){var r=e.getUTCDay();return r>=4||0===r?t.utcThursday(e):t.utcThursday.ceil(e)}function ef(e,r){return e=ed(e),h(t.utcThursday.count(t.utcYear(e),e)+(4===t.utcYear(e).getUTCDay()),r,2)}function ep(e){return e.getUTCDay()}function em(e,r){return h(t.utcMonday.count(t.utcYear(e)-1,e),r,2)}function eg(e,t){return h(e.getUTCFullYear()%100,t,2)}function ey(e,t){return h((e=ed(e)).getUTCFullYear()%100,t,2)}function ev(e,t){return h(e.getUTCFullYear()%1e4,t,4)}function ex(e,r){var i=e.getUTCDay();return h((e=i>=4||0===i?t.utcThursday(e):t.utcThursday.ceil(e)).getUTCFullYear()%1e4,r,4)}function eb(){return"+0000"}function e_(){return"%"}function ew(e){return+e}function eT(e){return Math.floor(e/1e3)}function eM(t){return e.timeFormat=(o=a(t)).format,e.timeParse=o.parse,e.utcFormat=o.utcFormat,e.utcParse=o.utcParse,o}eM({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"]});var ek="%Y-%m-%dT%H:%M:%S.%LZ",eA=Date.prototype.toISOString?function(e){return e.toISOString()}:e.utcFormat(ek),eS=+new Date("2000-01-01T00:00:00.000Z")?function(e){var t=new Date(e);return isNaN(t)?null:t}:e.utcParse(ek);e.isoFormat=eA,e.isoParse=eS,e.timeFormatDefaultLocale=eM,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&"u">typeof t?i(e,M()):i((r=r||self).d3=r.d3||{},r.d3)}}),A=p({"node_modules/d3-format/dist/d3-format.js"(e,t){var r;r=e,function(e){function t(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}function r(e){return(e=t(Math.abs(e)))?e[1]:NaN}var i,n,a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(e){var t;if(!(t=a.exec(e)))throw Error("invalid format: "+e);return new s({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]})}function s(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function l(e,r){var i=t(e,r);if(!i)return e+"";var n=i[0],a=i[1];return a<0?"0."+Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+Array(a-n.length+2).join("0")}o.prototype=s.prototype,s.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var c={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return l(100*e,t)},r:l,s:function(e,r){var n=t(e,r);if(!n)return e+"";var a=n[0],o=n[1],s=o-(i=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+Array(s-l+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+Array(1-s).join("0")+t(e,Math.max(0,r+s-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function u(e){return e}var h=Array.prototype.map,d=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function f(e){var t,n,a,s=void 0===e.grouping||void 0===e.thousands?u:(t=h.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,a=[],o=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(n)}),l=void 0===e.currency?"":e.currency[0]+"",f=void 0===e.currency?"":e.currency[1]+"",p=void 0===e.decimal?".":e.decimal+"",m=void 0===e.numerals?u:(a=h.call(e.numerals,String),function(e){return e.replace(/[0-9]/g,function(e){return a[+e]})}),g=void 0===e.percent?"%":e.percent+"",y=void 0===e.minus?"-":e.minus+"",v=void 0===e.nan?"NaN":e.nan+"";function x(e){var t=(e=o(e)).fill,r=e.align,n=e.sign,a=e.symbol,u=e.zero,h=e.width,x=e.comma,b=e.precision,_=e.trim,w=e.type;"n"===w?(x=!0,w="g"):c[w]||(void 0===b&&(b=12),_=!0,w="g"),(u||"0"===t&&"="===r)&&(u=!0,t="0",r="=");var T="$"===a?l:"#"===a&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",M="$"===a?f:/[%p]/.test(w)?g:"",k=c[w],A=/[defgprs%]/.test(w);function S(e){var a,o,l,c=T,f=M;if("c"===w)f=k(e)+f,e="";else{var g=(e*=1)<0||1/e<0;if(e=isNaN(e)?v:k(Math.abs(e),b),_&&(e=function(e){e:for(var t,r=e.length,i=1,n=-1;i0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),g&&0==+e&&"+"!==n&&(g=!1),c=(g?"("===n?n:y:"-"===n||"("===n?"":n)+c,f=("s"===w?d[8+i/3]:"")+f+(g&&"("===n?")":""),A){for(a=-1,o=e.length;++a(l=e.charCodeAt(a))||l>57){f=(46===l?p+e.slice(a+1):e.slice(a))+f,e=e.slice(0,a);break}}}x&&!u&&(e=s(e,1/0));var S=c.length+e.length+f.length,E=S>1)+c+e+f+E.slice(S);break;default:e=E+c+e+f}return m(e)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return e+""},S}return{format:x,formatPrefix:function(e,t){var i=x(((e=o(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(r(t)/3))),a=Math.pow(10,-n),s=d[8+n/3];return function(e){return i(a*e)+s}}}}function p(t){return e.format=(n=f(t)).format,e.formatPrefix=n.formatPrefix,n}p({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),e.FormatSpecifier=s,e.formatDefaultLocale=p,e.formatLocale=f,e.formatSpecifier=o,e.precisionFixed=function(e){return Math.max(0,-r(Math.abs(e)))},e.precisionPrefix=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(t)/3)))-r(Math.abs(e)))},e.precisionRound=function(e,t){return Math.max(0,r(t=Math.abs(t)-(e=Math.abs(e)))-r(e))+1},Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r="u">typeof globalThis?globalThis:r||self).d3=r.d3||{})}}),E=p({"node_modules/is-string-blank/index.js"(e,t){t.exports=function(e){for(var t,r=e.length,i=0;i13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}}}),C=p({"node_modules/fast-isnumeric/index.js"(e,t){var r=E();t.exports=function(e){var t=typeof e;if("string"===t){var i=e;if(0==(e*=1)&&r(i))return!1}else if("number"!==t)return!1;return e-e<1}}}),L=p({"src/constants/numerical.js"(e,t){t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,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:2440587.5,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"}}}),P=p({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(e,t){var r;r=e,function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array>"u"?[]:new Uint8Array(256),i=0;i>4,h[c++]=(15&n)<<4|a>>2,h[c++]=(3&a)<<6|63&o;return u},e.encode=function(e){var r,i=new Uint8Array(e),n=i.length,a="";for(r=0;r>2],a+=t[(3&i[r])<<4|i[r+1]>>4],a+=t[(15&i[r+1])<<2|i[r+2]>>6],a+=t[63&i[r+2]];return n%3==2?a=a.substring(0,a.length-1)+"=":n%3==1&&(a=a.substring(0,a.length-2)+"=="),a},Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r="u">typeof globalThis?globalThis:r||self)["base64-arraybuffer"]={})}}),I=p({"src/lib/is_plain_object.js"(e,t){t.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}}}),z=p({"src/lib/array.js"(e){var t=P().decode,r=I(),i=Array.isArray,n=ArrayBuffer,a=DataView;function o(e){return n.isView(e)&&!(e instanceof a)}function s(e){return i(e)||o(e)}e.isTypedArray=o,e.isArrayOrTypedArray=s,e.isArray1D=function(e){return!s(e[0])},e.ensureArray=function(e,t){return i(e)||(e=[]),e.length=t,e};var l={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};function c(e){return e.constructor===ArrayBuffer}function u(e,t,r){if(s(e))if(!s(e[0]))return e.length;else{for(var i=r,n=0;n2)return c[t]=2|c[t],d.set(e,null);if(h){for(o=t;o0)return Math.log(e)/Math.LN10;var i=Math.log(Math.min(t[0],t[1]))/Math.LN10;return r(i)||(i=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),i}}}),j=p({"src/lib/relink_private.js"(e,t){var r=z().isArrayOrTypedArray,i=I();t.exports=function e(t,n){for(var a in n){var o=n[a],s=t[a];if(s!==o)if("_"===a.charAt(0)||"function"==typeof o){if(a in t)continue;t[a]=o}else if(r(o)&&r(s)&&i(o[0])){if("customdata"===a||"ids"===a)continue;for(var l=Math.min(o.length,s.length),c=0;ct/2?e-Math.round(e/t)*t:e}m(B,{mod:()=>N,modHalf:()=>U});var V=f({"src/lib/mod.ts"(){}}),q=p({"src/lib/extend.js"(e){var t=I(),r=Array.isArray;function i(e,n,a,o){var s,l,c,u,h,d,f=e[0],p=e.length;if(2===p&&r(f)&&r(e[1])&&0===f.length){if(function(e,t){var r,i;for(r=0;rtypeof u||a)&&(f[l]=u);return f}e.extendFlat=function(...e){return i(e,!1,!1,!1)},e.extendDeep=function(...e){return i(e,!0,!1,!1)},e.extendDeepAll=function(...e){return i(e,!0,!0,!1)},e.extendDeepNoArrays=function(...e){return i(e,!0,!1,!0)}}}),H=p({"src/plots/font_attributes.js"(e,t){t.exports=function(e){var t=e.variantValues,r=e.editType,i=e.colorEditType;void 0===i&&(i=r);var n={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(n.valType="enumerated",n.values=n.extras,n.extras=void 0,n.min=void 0,n.max=void 0);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:i},weight:n,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(a.size.dflt="auto"),e.autoColor&&(a.color.dflt="auto"),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}}}),G=p({"src/components/fx/constants.js"(e,t){t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}}),W=p({"src/components/fx/layout_attributes.js"(e,t){var r=G(),i=H(),n=i({editType:"none"});n.family.dflt=r.HOVERFONT,n.size.dflt=r.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversort:{valType:"enumerated",values:["trace","value descending","value ascending"],dflt:"trace",editType:"none"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoveranywhere:{valType:"boolean",dflt:!1,editType:"none"},clickanywhere:{valType:"boolean",dflt:!1,editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:n,grouptitlefont:i({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}}}),Y=p({"src/components/fx/attributes.js"(e,t){var r=H(),i=W().hoverlabel,n=q().extendFlat;t.exports={hoverlabel:{bgcolor:n({},i.bgcolor,{arrayOk:!0}),bordercolor:n({},i.bordercolor,{arrayOk:!0}),font:r({arrayOk:!0,editType:"none"}),align:n({},i.align,{arrayOk:!0}),namelength:n({},i.namelength,{arrayOk:!0}),showarrow:n({},i.showarrow),editType:"none"}}}}),Z=p({"src/plots/attributes.js"(e,t){var r=H(),i=Y();t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:r({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:i.hoverlabel,uirevision:{valType:"any",editType:"none"}}}}),$=p({"node_modules/culori/bundled/culori.cjs"(e,t){let i,a,o;var s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,h={};((e,t)=>{for(var r in t)s(e,r,{get:t[r],enumerable:!0})})(h,{a98:()=>i7,average:()=>eW,averageAngle:()=>eH,averageNumber:()=>eG,blend:()=>r7,blerp:()=>ea,clampChroma:()=>iR,clampGamut:()=>iO,clampRgb:()=>iD,colorsNamed:()=>p,convertA98ToXyz65:()=>ed,convertCubehelixToRgb:()=>eI,convertDlchToLab65:()=>e7,convertHsiToRgb:()=>tn,convertHslToRgb:()=>ts,convertHsvToRgb:()=>tf,convertHwbToRgb:()=>tg,convertItpToXyz65:()=>tT,convertJabToJch:()=>tO,convertJabToRgb:()=>tz,convertJabToXyz65:()=>tP,convertJchToJab:()=>tR,convertLab65ToDlch:()=>e9,convertLab65ToRgb:()=>e0,convertLab65ToXyz65:()=>eQ,convertLabToLch:()=>eZ,convertLabToRgb:()=>tU,convertLabToXyz50:()=>tB,convertLchToLab:()=>e$,convertLchuvToLuv:()=>tQ,convertLrgbToOklab:()=>rt,convertLrgbToRgb:()=>ex,convertLuvToLchuv:()=>tJ,convertLuvToXyz50:()=>t8,convertOkhslToOklab:()=>rh,convertOkhsvToOklab:()=>rp,convertOklabToLrgb:()=>ri,convertOklabToOkhsl:()=>ru,convertOklabToOkhsv:()=>rf,convertOklabToRgb:()=>rn,convertP3ToXyz65:()=>rb,convertProphotoToXyz50:()=>rA,convertRec2020ToXyz65:()=>rP,convertRgbToCubehelix:()=>eP,convertRgbToHsi:()=>ta,convertRgbToHsl:()=>tl,convertRgbToHsv:()=>tp,convertRgbToHwb:()=>ty,convertRgbToJab:()=>tI,convertRgbToLab:()=>tG,convertRgbToLab65:()=>e3,convertRgbToLrgb:()=>eg,convertRgbToOklab:()=>rr,convertRgbToXyb:()=>rO,convertRgbToXyz50:()=>tV,convertRgbToXyz65:()=>ey,convertRgbToYiq:()=>rq,convertXybToRgb:()=>rF,convertXyz50ToLab:()=>tH,convertXyz50ToLuv:()=>t5,convertXyz50ToProphoto:()=>rM,convertXyz50ToRgb:()=>tN,convertXyz50ToXyz65:()=>rU,convertXyz65ToA98:()=>ep,convertXyz65ToItp:()=>tk,convertXyz65ToJab:()=>tC,convertXyz65ToLab65:()=>e2,convertXyz65ToP3:()=>r_,convertXyz65ToRec2020:()=>rC,convertXyz65ToRgb:()=>eb,convertXyz65ToXyz50:()=>rN,convertYiqToRgb:()=>rH,converter:()=>E,cubehelix:()=>i9,differenceCie76:()=>eF,differenceCie94:()=>ej,differenceCiede2000:()=>eB,differenceCmc:()=>eN,differenceEuclidean:()=>eR,differenceHueChroma:()=>eO,differenceHueNaive:()=>eD,differenceHueSaturation:()=>ez,differenceHyab:()=>eU,differenceItp:()=>eq,differenceKotsarenkoRamos:()=>eV,displayable:()=>iI,dlab:()=>ne,dlch:()=>nt,easingGamma:()=>iA,easingInOutSine:()=>i4,easingMidpoint:()=>io,easingSmootherstep:()=>i5,easingSmoothstep:()=>i2,easingSmoothstepInverse:()=>i3,filterBrightness:()=>iU,filterContrast:()=>iV,filterDeficiencyDeuter:()=>i0,filterDeficiencyProt:()=>iQ,filterDeficiencyTrit:()=>i1,filterGrayscale:()=>iG,filterHueRotate:()=>iY,filterInvert:()=>iW,filterSaturate:()=>iH,filterSepia:()=>iq,fixupAlpha:()=>ec,fixupHueDecreasing:()=>eS,fixupHueIncreasing:()=>eA,fixupHueLonger:()=>ek,fixupHueShorter:()=>eM,formatCss:()=>r2,formatHex:()=>r3,formatHex8:()=>r5,formatHsl:()=>r6,formatRgb:()=>r4,getMode:()=>O,hsi:()=>nr,hsl:()=>ni,hsv:()=>nn,hwb:()=>na,inGamut:()=>iz,interpolate:()=>il,interpolateWith:()=>ic,interpolateWithPremultipliedAlpha:()=>iu,interpolatorLinear:()=>el,interpolatorPiecewise:()=>es,interpolatorSplineBasis:()=>id,interpolatorSplineBasisClosed:()=>ip,interpolatorSplineMonotone:()=>iT,interpolatorSplineMonotone2:()=>iM,interpolatorSplineMonotoneClosed:()=>ik,interpolatorSplineNatural:()=>ig,interpolatorSplineNaturalClosed:()=>iy,itp:()=>no,jab:()=>ns,jch:()=>nl,lab:()=>nc,lab65:()=>nu,lch:()=>nh,lch65:()=>nd,lchuv:()=>nf,lerp:()=>ei,lrgb:()=>np,luv:()=>nm,mapAlphaDivide:()=>ir,mapAlphaMultiply:()=>it,mapTransferGamma:()=>ia,mapTransferLinear:()=>ii,mapper:()=>ie,modeA98:()=>e_,modeCubehelix:()=>eY,modeDlab:()=>tr,modeDlch:()=>ti,modeHsi:()=>to,modeHsl:()=>td,modeHsv:()=>tm,modeHwb:()=>tx,modeItp:()=>tA,modeJab:()=>tD,modeJch:()=>tF,modeLab:()=>tY,modeLab65:()=>tZ,modeLch:()=>tX,modeLch65:()=>tK,modeLchuv:()=>t7,modeLrgb:()=>t9,modeLuv:()=>re,modeOkhsl:()=>rd,modeOkhsv:()=>rm,modeOklab:()=>ry,modeOklch:()=>rx,modeP3:()=>rw,modeProphoto:()=>rS,modeRec2020:()=>rI,modeRgb:()=>eu,modeXyb:()=>rj,modeXyz50:()=>rB,modeXyz65:()=>rV,modeYiq:()=>rG,nearest:()=>ij,okhsl:()=>ng,okhsv:()=>ny,oklab:()=>nv,oklch:()=>nx,p3:()=>nb,parse:()=>ee,parseHex:()=>y,parseHsl:()=>th,parseHslLegacy:()=>tu,parseHwb:()=>tv,parseLab:()=>tW,parseLch:()=>t$,parseNamed:()=>m,parseOklab:()=>rg,parseOklch:()=>rv,parseRgb:()=>et,parseRgbLegacy:()=>A,parseTransparent:()=>er,prophoto:()=>n_,random:()=>r9,rec2020:()=>nw,removeParser:()=>F,rgb:()=>nT,round:()=>rW,samples:()=>iS,serializeHex:()=>rJ,serializeHex8:()=>rQ,serializeHsl:()=>r1,serializeRgb:()=>r0,toGamut:()=>iF,trilerp:()=>eo,unlerp:()=>en,useMode:()=>D,useParser:()=>R,wcagContrast:()=>i8,wcagLuminance:()=>i6,xyb:()=>nM,xyz50:()=>nk,xyz65:()=>nA,yiq:()=>nS}),t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of c(t))u.call(e,i)||void 0===i||s(e,i,{get:()=>t[i],enumerable:!(r=l(t,i))||r.enumerable});return e})(s({},"__esModule",{value:!0}),h);var f=(e,t)=>{if("number"==typeof e){if(3===t)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|240&e)/255,b:(15&e|e<<4&240)/255};if(4===t)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|240&e)/255,alpha:(15&e|e<<4&240)/255};if(6===t)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(255&e)/255};if(8===t)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(255&e)/255}}},p={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32},m=e=>f(p[e.toLowerCase()],6),g=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,y=e=>{let t;return(t=e.match(g))?f(parseInt(t[1],16),t[1].length):void 0},v="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",x=`${v}%`,b=`(?:${v}%|${v})`,_=`(?:${v}%|${v}|none)`,w=`(?:${v}(deg|grad|rad|turn)|${v})`,T="\\s*,\\s*",M=(RegExp("^"+_+"$"),RegExp(`^rgba?\\(\\s*${v}${T}${v}${T}${v}\\s*(?:,\\s*${b}\\s*)?\\)$`)),k=RegExp(`^rgba?\\(\\s*${x}${T}${x}${T}${x}\\s*(?:,\\s*${b}\\s*)?\\)$`),A=e=>{let t={mode:"rgb"},r;if(r=e.match(M))void 0!==r[1]&&(t.r=r[1]/255),void 0!==r[2]&&(t.g=r[2]/255),void 0!==r[3]&&(t.b=r[3]/255);else{if(!(r=e.match(k)))return;void 0!==r[1]&&(t.r=r[1]/100),void 0!==r[2]&&(t.g=r[2]/100),void 0!==r[3]&&(t.b=r[3]/100)}return void 0!==r[4]?t.alpha=Math.max(0,Math.min(1,r[4]/100)):void 0!==r[5]&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},S=(e,t)=>void 0===e?void 0:"object"!=typeof e?ee(e):void 0!==e.mode?e:t?r(d({},e),n({mode:t})):void 0,E=(e="rgb")=>t=>void 0!==(t=S(t,e))?t.mode===e?t:C[t.mode][e]?C[t.mode][e](t):"rgb"===e?C[t.mode].rgb(t):C.rgb[e](C[t.mode].rgb(t)):void 0,C={},L={},P=[],I={},z=e=>e,D=e=>(C[e.mode]=d(d({},C[e.mode]),e.toMode),Object.keys(e.fromMode||{}).forEach(t=>{C[t]||(C[t]={}),C[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(void 0===e.ranges[t]&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw Error(`Missing interpolator for: ${t}`);"function"==typeof e.interpolate[t]&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=z)}),L[e.mode]=e,(e.parse||[]).forEach(t=>{R(t,e.mode)}),E(e.mode)),O=e=>L[e],R=(e,t)=>{if("string"==typeof e){if(!t)throw Error("'mode' required when 'parser' is a string");I[e]=t}else"function"==typeof e&&0>P.indexOf(e)&&P.push(e)},F=e=>{if("string"==typeof e)delete I[e];else if("function"==typeof e){let t=P.indexOf(e);t>0&&P.splice(t,1)}},j=/[^\x00-\x7F]|[a-zA-Z_]/,B=/[^\x00-\x7F]|[-\w]/,N="function",U="ident",V="number",q="percentage",H="none",G="alpha",W=0;function Y(e){let t=e[W],r=e[W+1];return"-"===t||"+"===t?/\d/.test(r)||"."===r&&/\d/.test(e[W+2]):"."===t?/\d/.test(r):/\d/.test(t)}function Z(e){if(W>=e.length)return!1;let t=e[W];if(j.test(t))return!0;if("-"===t){if(e.length-W<2)return!1;let t=e[W+1];return!!("-"===t||j.test(t))}return!1}var $={deg:1,rad:180/Math.PI,grad:.9,turn:360};function X(e){let t="";if(("-"===e[W]||"+"===e[W])&&(t+=e[W++]),t+=K(e),"."===e[W]&&/\d/.test(e[W+1])&&(t+=e[W++]+K(e)),("e"===e[W]||"E"===e[W])&&(("-"===e[W+1]||"+"===e[W+1])&&/\d/.test(e[W+2])?t+=e[W++]+e[W++]+K(e):/\d/.test(e[W+1])&&(t+=e[W++]+K(e))),Z(e)){let r=J(e);return"deg"===r||"rad"===r||"turn"===r||"grad"===r?{type:"hue",value:t*$[r]}:void 0}return"%"===e[W]?(W++,{type:q,value:+t}):{type:V,value:+t}}function K(e){let t="";for(;/\d/.test(e[W]);)t+=e[W++];return t}function J(e){let t="";for(;W4)){if(4===r.length){if(r[3].type!==G)return;r[3]=r[3].value}return 3===r.length&&r.push({type:H,value:void 0}),r.every(e=>e.type!==G)?r:void 0}}var ee=e=>{if("string"!=typeof e)return;let t=function(e=""){let t=e.trim(),r=[],i;for(W=0;W24?(isFinite(t)&&(clearTimeout(tr),tr=setTimeout(ta,t)),tt=0):(tt=1,ti(ta))}function to(){for(var e=Date.now(),t=e7;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function ts(){for(var e,t=e7,r=1/0;t;)t.c?(t.t1&&0>=(t=e[a[o-2]],r=e[a[o-1]],i=e[s],(r[0]-t[0])*(i[1]-t[1])-(r[1]-t[1])*(i[0]-t[0]));)--o;a[o++]=s}return a.slice(0,o)}function th(e,t){return e[0]-t[0]||e[1]-t[1]}e.timer=function(){tn.apply(this,arguments)},e.timer.flush=function(){to(),ts()},e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},e.geom={},e.geom.hull=function(e){var t=tl,r=tc;if(arguments.length)return i(e);function i(e){if(e.length<3)return[];var i,n=e6(t),a=e6(r),o=e.length,s=[],l=[];for(i=0;i=0;--i)f.push(e[s[c[i]][2]]);for(i=+h;i=-e_)){var f=l*l+c*c,p=u*u+h*h,m=(h*f-c*p)/d,g=(l*p-u*f)/d,h=g+s,y=tw.pop()||new tC;y.arc=e,y.site=n,y.x=m+o,y.y=h+Math.sqrt(m*m+g*g),y.cy=h,e.circle=y;for(var v=null,x=tb._;x;)if(y.y1e-6)s=s.L;else if((n=a-function(e,t){var r=e.N;if(r)return tA(r,t);var i=e.site;return i.y===t?i.x:1/0}(s,o))>1e-6){if(!s.R){t=s;break}s=s.R}else{i>-1e-6?(t=s.P,r=s):n>-1e-6?(t=s,r=s.N):t=r=s;break}var l=tM(e);if(tv.insert(t,l),!(!t&&!r)){if(t===r){tP(t),r=tM(t.site),tv.insert(l,r),l.edge=r.edge=tz(t.site,l.site),tL(t),tL(r);return}if(!r){l.edge=tz(t.site,l.site);return}tP(t),tP(r);var c=t.site,u=c.x,h=c.y,d=e.x-u,f=e.y-h,p=r.site,m=p.x-u,g=p.y-h,y=2*(d*g-f*m),v=d*d+f*f,x=m*m+g*g,b={x:(g*v-f*x)/y+u,y:(d*x-m*v)/y+h};tD(r.edge,c,p,b),l.edge=tz(c,e,null,b),r.edge=tz(e,p,null,b),tL(t),tL(r)}}(a),r=a.x,i=a.y),a=e.pop();else if(n)!function(e){var t=e.circle,r=t.x,i=t.cy,n={x:r,y:i},a=e.P,o=e.N,s=[e];tk(e);for(var l=a;l.circle&&1e-6>v(r-l.circle.x)&&1e-6>v(i-l.circle.cy);)a=l.P,s.unshift(l),tk(l),l=a;s.unshift(l),tP(l);for(var c=o;c.circle&&1e-6>v(r-c.circle.x)&&1e-6>v(i-c.circle.cy);)o=c.N,s.push(c),tk(c),c=o;s.push(c),tP(c);var u,h=s.length;for(u=1;u0)){if(a/=p,p<0){if(a0){if(a>f)return;a>d&&(d=a)}if(a=i-l,!(!p&&a<0)){if(a/=p,p<0){if(a>f)return;a>d&&(d=a)}else if(p>0){if(a0)){if(a/=m,m<0){if(a0){if(a>f)return;a>d&&(d=a)}if(a=n-c,!(!m&&a<0)){if(a/=m,m<0){if(a>f)return;a>d&&(d=a)}else if(m>0){if(a0&&(e.a={x:l+d*p,y:c+d*m}),f<1&&(e.b={x:l+f*p,y:c+f*m}),e}}}}}),l=o.length;l--;)(!function(e,t){var r=e.b;if(r)return!0;var i,n,a=e.a,o=t[0][0],s=t[1][0],l=t[0][1],c=t[1][1],u=e.l,h=e.r,d=u.x,f=u.y,p=h.x,m=h.y,g=(d+p)/2;if(m===f){if(g=s)return;if(d>p){if(a){if(a.y>=c)return}else a={x:g,y:l};r={x:g,y:c}}else{if(a){if(a.y1)if(d>p){if(a){if(a.y>=c)return}else a={x:(l-n)/i,y:l};r={x:(c-n)/i,y:c}}else{if(a){if(a.y=s)return}else a={x:o,y:i*o+n};r={x:s,y:i*s+n}}else{if(a){if(a.xv(a.a.x-a.b.x)&&1e-6>v(a.a.y-a.b.y))&&(a.a=a.b=null,o.splice(l,1))}(t),function(e){for(var t,r,i,n,a,o,s,l,c,u,h=e[0][0],d=e[1][0],f=e[0][1],p=e[1][1],m=ty,g=m.length;g--;)if(!(!(a=m[g])||!a.prepare()))for(l=(s=a.edges).length,o=0;o1e-6||v(n-r)>1e-6)&&(s.splice(o,0,new tO(function(e,t,r){var i=new tI(e,null);return i.a=t,i.b=r,tg.push(i),i}(a.site,u,1e-6>v(i-h)&&p-n>1e-6?{x:h,y:1e-6>v(t-h)?r:p}:1e-6>v(n-p)&&d-i>1e-6?{x:1e-6>v(r-p)?t:d,y:p}:1e-6>v(i-d)&&n-f>1e-6?{x:d,y:1e-6>v(t-d)?r:f}:1e-6>v(n-f)&&i-h>1e-6?{x:1e-6>v(r-f)?t:h,y:f}:null),a.site,null)),++l)}(t));var o={cells:ty,edges:tg};return tv=tb=tg=ty=null,o}function tV(e,t){return t.y-e.y||t.x-e.x}tS.prototype.prepare=function(){for(var e,t=this.edges,r=t.length;r--;)(e=t[r].edge).b&&e.a||t.splice(r,1);return t.sort(tE),t.length},tO.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},tR.prototype={insert:function(e,t){var r,i,n;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;r=e}else this._?(e=tN(this._),t.P=null,t.N=e,e.P=e.L=t,r=e):(t.P=t.N=null,this._=t,r=null);for(t.L=t.R=null,t.U=r,t.C=!0,e=t;r&&r.C;)i=r.U,r===i.L?(n=i.R)&&n.C?(r.C=n.C=!1,i.C=!0,e=i):(e===r.R&&(tj(this,r),r=(e=r).U),r.C=!1,i.C=!0,tB(this,i)):(n=i.L)&&n.C?(r.C=n.C=!1,i.C=!0,e=i):(e===r.L&&(tB(this,r),r=(e=r).U),r.C=!1,i.C=!0,tj(this,i)),r=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,r,i,n=e.U,a=e.L,o=e.R;if(r=a?o?tN(o):a:o,n?n.L===e?n.L=r:n.R=r:this._=r,a&&o?(i=r.C,r.C=e.C,r.L=a,a.U=r,r!==o?(n=r.U,r.U=e.U,e=r.R,n.L=e,r.R=o,o.U=r):(r.U=n,n=r,e=r.R)):(i=e.C,e=r),e&&(e.U=n),!i){if(e&&e.C){e.C=!1;return}do{if(e===this._)break;if(e===n.L){if((t=n.R).C&&(t.C=!1,n.C=!0,tj(this,n),t=n.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,tB(this,t),t=n.R),t.C=n.C,n.C=t.R.C=!1,tj(this,n),e=this._;break}}else if((t=n.L).C&&(t.C=!1,n.C=!0,tB(this,n),t=n.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,tj(this,t),t=n.L),t.C=n.C,n.C=t.L.C=!1,tB(this,n),e=this._;break}t.C=!0,e=n,n=n.U}while(!e.C);e&&(e.C=!1)}}},e.geom.voronoi=function(e){var t=tl,r=tc,i=t,n=r,a=tq;if(e)return o(e);function o(e){var t=Array(e.length),r=a[0][0],i=a[0][1],n=a[1][0],o=a[1][1];return tU(s(e),a).cells.forEach(function(a,s){var l=a.edges,c=a.site;(t[s]=l.length?l.map(function(e){var t=e.start();return[t.x,t.y]}):c.x>=r&&c.x<=n&&c.y>=i&&c.y<=o?[[r,o],[n,o],[n,i],[r,i]]:[]).point=e[s]}),t}function s(e){return e.map(function(e,t){return{x:1e-6*Math.round(i(e,t)/1e-6),y:1e-6*Math.round(n(e,t)/1e-6),i:t}})}return o.links=function(e){return tU(s(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},o.triangles=function(e){var t=[];return tU(s(e)).cells.forEach(function(r,i){for(var n,a,o,s,l=r.site,c=r.edges.sort(tE),u=-1,h=c.length,d=c[h-1].edge,f=d.l===l?d.r:d.l;++u(n=l,a=s,o=f,(n.x-o.x)*(a.y-n.y)-(n.x-a.x)*(o.y-n.y))&&t.push([e[i],e[s.i],e[f.i]])}}),t},o.x=function(e){return arguments.length?(i=e6(t=e),o):t},o.y=function(e){return arguments.length?(n=e6(r=e),o):r},o.clipExtent=function(e){return arguments.length?(a=e??tq,o):a===tq?null:a},o.size=function(e){return arguments.length?o.clipExtent(e&&[[0,0],e]):a===tq?null:a&&a[1]},o};var tq=[[-1e6,-1e6],[1e6,1e6]];function tH(e){return e.x}function tG(e){return e.y}function tW(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function tY(t,r){t=e.rgb(t),r=e.rgb(r);var i=t.r,n=t.g,a=t.b,o=r.r-i,s=r.g-n,l=r.b-a;return function(e){return"#"+eQ(Math.round(i+o*e))+eQ(Math.round(n+s*e))+eQ(Math.round(a+l*e))}}function tZ(e,t){var r,i={},n={};for(r in e)r in t?i[r]=tQ(e[r],t[r]):n[r]=e[r];for(r in t)r in e||(n[r]=t[r]);return function(e){for(r in i)n[r]=i[r](e);return n}}function t$(e,t){return e*=1,t*=1,function(r){return e*(1-r)+t*r}}function tX(e,t){var r,i,n,a=tK.lastIndex=tJ.lastIndex=0,o=-1,s=[],l=[];for(e+="",t+="";(r=tK.exec(e))&&(i=tJ.exec(t));)(n=i.index)>a&&(n=t.slice(a,n),s[o]?s[o]+=n:s[++o]=n),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:t$(r,i)})),a=tJ.lastIndex;return am&&(m=l.x),l.y>g&&(g=l.y),c.push(l.x),u.push(l.y);else for(h=0;hm&&(m=b),_>g&&(g=_),c.push(b),u.push(_)}var w=m-f,T=g-p;function M(e,t,r,i,n,a,o,s){if(!(isNaN(r)||isNaN(i)))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(v(l-r)+v(c-i)<.01)k(e,t,r,i,n,a,o,s);else{var u=e.point;e.x=e.y=e.point=null,k(e,u,l,c,n,a,o,s),k(e,t,r,i,n,a,o,s)}else e.x=r,e.y=i,e.point=t}else k(e,t,r,i,n,a,o,s)}function k(e,t,r,i,n,a,o,s){var l=(n+o)*.5,c=(a+s)*.5,u=r>=l,h=i>=c,d=h<<1|u;e.leaf=!1,e=e.nodes[d]||(e.nodes[d]=tW()),u?n=l:o=l,h?a=c:s=c,M(e,t,r,i,n,a,o,s)}w>T?g=p+w:m=f+T;var A=tW();if(A.add=function(e){M(A,e,+y(e,++h),+x(e,h),f,p,m,g)},A.visit=function(e){!function e(t,r,i,n,a,o){if(!t(r,i,n,a,o)){var s=(i+a)*.5,l=(n+o)*.5,c=r.nodes;c[0]&&e(t,c[0],i,n,s,l),c[1]&&e(t,c[1],s,n,a,l),c[2]&&e(t,c[2],i,l,s,o),c[3]&&e(t,c[3],s,l,a,o)}}(e,A,f,p,m,g)},A.find=function(e){var t,r,i,n,a,o,s,l,c;return t=A,r=e[0],i=e[1],c=1/0,function e(t,u,h,d,f){if(!(u>o||h>s||d=b,T=i>=_,M=T<<1|w,k=M+4;M=0&&!(i=e.interpolators[n](t,r)););return i}function t0(e,t){var r,i=[],n=[],a=e.length,o=t.length,s=Math.min(e.length,t.length);for(r=0;r=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function t7(e){return 1-Math.cos(e*ek)}function re(e){return Math.pow(2,10*(e-1))}function rt(e){return 1-Math.sqrt(1-e*e)}function rr(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function ri(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function rn(e){var t,r,i,n=[e.a,e.b],a=[e.c,e.d],o=ro(n),s=ra(n,a),l=ro((t=a,r=n,i=-s,t[0]+=i*r[0],t[1]+=i*r[1],t))||0;n[0]*a[1]=0?e.slice(0,i):e,a=i>=0?e.slice(i+1):"in";return n=t2.get(n)||t1,t=(a=t3.get(a)||C)(n.apply(null,r.call(arguments,1))),function(e){return e<=0?0:e>=1?1:t(e)}},e.interpolateHcl=function(t,r){t=e.hcl(t),r=e.hcl(r);var i=t.h,n=t.c,a=t.l,o=r.h-i,s=r.c-n,l=r.l-a;return isNaN(s)&&(s=0,n=isNaN(n)?r.c:n),isNaN(o)?(o=0,i=isNaN(i)?r.h:i):o>180?o-=360:o<-180&&(o+=360),function(e){return eN(i+o*e,n+s*e,a+l*e)+""}},e.interpolateHsl=function(t,r){t=e.hsl(t),r=e.hsl(r);var i=t.h,n=t.s,a=t.l,o=r.h-i,s=r.s-n,l=r.l-a;return isNaN(s)&&(s=0,n=isNaN(n)?r.s:n),isNaN(o)?(o=0,i=isNaN(i)?r.h:i):o>180?o-=360:o<-180&&(o+=360),function(e){return eF(i+o*e,n+s*e,a+l*e)+""}},e.interpolateLab=function(t,r){t=e.lab(t),r=e.lab(r);var i=t.l,n=t.a,a=t.b,o=r.l-i,s=r.a-n,l=r.b-a;return function(e){return eH(i+o*e,n+s*e,a+l*e)+""}},e.interpolateRound=ri,e.transform=function(t){var r=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){if(null!=e){r.setAttribute("transform",e);var t=r.transform.baseVal.consolidate()}return new rn(t?t.matrix:rs)})(t)},rn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var rs={a:1,b:0,c:0,d:1,e:0,f:0};function rl(e){return e.length?e.pop()+",":""}function rc(t,r){var i,n,a,o,s=[],l=[];return t=e.transform(t),r=e.transform(r),function(e,t,r,i){if(e[0]!==t[0]||e[1]!==t[1]){var n=r.push("translate(",null,",",null,")");i.push({i:n-4,x:t$(e[0],t[0])},{i:n-2,x:t$(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(t.translate,r.translate,s,l),i=t.rotate,n=r.rotate,i!==n?(i-n>180?n+=360:n-i>180&&(i+=360),l.push({i:s.push(rl(s)+"rotate(",null,")")-2,x:t$(i,n)})):n&&s.push(rl(s)+"rotate("+n+")"),a=t.skew,o=r.skew,a!==o?l.push({i:s.push(rl(s)+"skewX(",null,")")-2,x:t$(a,o)}):o&&s.push(rl(s)+"skewX("+o+")"),function(e,t,r,i){if(e[0]!==t[0]||e[1]!==t[1]){var n=r.push(rl(r)+"scale(",null,",",null,")");i.push({i:n-4,x:t$(e[0],t[0])},{i:n-2,x:t$(e[1],t[1])})}else(1!==t[0]||1!==t[1])&&r.push(rl(r)+"scale("+t+")")}(t.scale,r.scale,s,l),t=r=null,function(e){for(var t,r=-1,i=l.length;++r0?i=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:i=0})):e>0&&(l.start({type:"start",alpha:i=e}),t=tn(s.tick)),s):i},s.start=function(){var e,t,r,i=y.length,l=v.length,u=c[0],p=c[1];for(e=0;e=0;)n.push(i[r])}function rw(e,t){for(var r=[e],i=[];null!=(e=r.pop());)if(i.push(e),(a=e.children)&&(n=a.length))for(var n,a,o=-1;++o=0;)c.push(s=o[a]),s.parent=l,s.depth=l.depth+1;r&&(l.value=0),l.children=o}else r&&(l.value=+r.call(i,l,l.depth)||0),delete l.children;return rw(n,function(t){var i,n;e&&(i=t.children)&&i.sort(e),r&&(n=t.parent)&&(n.value+=t.value)}),u}return i.sort=function(t){return arguments.length?(e=t,i):e},i.children=function(e){return arguments.length?(t=e,i):t},i.value=function(e){return arguments.length?(r=e,i):r},i.revalue=function(e){return r&&(r_(e,function(e){e.children&&(e.value=0)}),rw(e,function(e){var t;e.children||(e.value=+r.call(i,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)})),e},i},e.layout.partition=function(){var t=e.layout.hierarchy(),r=[1,1];function i(e,i){var n=t.call(this,e,i);return function e(t,r,i,n){var a=t.children;if(t.x=r,t.y=t.depth*n,t.dx=i,t.dy=n,a&&(o=a.length)){var o,s,l,c=-1;for(i=t.value?i/t.value:0;++cs&&(s=i),o.push(i)}for(r=0;rn&&(i=r,n=t);return i}function rR(e){return e.reduce(rF,0)}function rF(e,t){return e+t[1]}function rj(e,t){return rB(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function rB(e,t){for(var r=-1,i=+e[0],n=(e[1]-i)/t,a=[];++r<=t;)a[r]=n*r+i;return a}function rN(t){return[e.min(t),e.max(t)]}function rU(e,t){return e.value-t.value}function rV(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function rq(e,t){e._pack_next=t,t._pack_prev=e}function rH(e,t){var r=t.x-e.x,i=t.y-e.y,n=e.r+t.r;return .999*n*n>r*r+i*i}function rG(e){if((t=e.children)&&(l=t.length)){var t,r,i,n,a,o,s,l,c=1/0,u=-1/0,h=1/0,d=-1/0;if(t.forEach(rW),(r=t[0]).x=-r.r,r.y=0,x(r),l>1&&((i=t[1]).x=i.r,i.y=0,x(i),l>2))for(rZ(r,i,n=t[2]),x(n),rV(r,n),r._pack_prev=n,rV(n,i),i=r._pack_next,a=3;a0)for(o=-1;++o=h[0]&&l<=h[1]&&(s=c[e.bisect(d,l,1,p)-1],s.y+=m,s.push(a[o]));return c}return a.value=function(e){return arguments.length?(r=e,a):r},a.range=function(e){return arguments.length?(i=e6(e),a):i},a.bins=function(e){return arguments.length?(n="number"==typeof e?function(t){return rB(t,e)}:e6(e),a):n},a.frequency=function(e){return arguments.length?(t=!!e,a):t},a},e.layout.pack=function(){var t,r=e.layout.hierarchy().sort(rU),i=0,n=[1,1];function a(e,a){var o=r.call(this,e,a),s=o[0],l=n[0],c=n[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,rw(s,function(e){e.r=+u(e.value)}),rw(s,rG),i){var h=i*(t?1:Math.max(2*s.r/l,2*s.r/c))/2;rw(s,function(e){e.r+=h}),rw(s,rG),rw(s,function(e){e.r-=h})}return function e(t,r,i,n){var a=t.children;if(t.x=r+=n*t.x,t.y=i+=n*t.y,t.r*=n,a)for(var o=-1,s=a.length;++of.x&&(f=e),e.depth>p.depth&&(p=e)});var m=r(d,f)/2-d.x,g=i[0]/(f.x+r(f,d)/2+m),y=i[1]/(p.depth||1);r_(u,function(e){e.x=(e.x+m)*g,e.y=e.depth*y})}return c}function o(e){var t=e.children,i=e.parent.children,n=e.i?i[e.i-1]:null;if(t.length){!function(e){for(var t,r=0,i=0,n=e.children,a=n.length;--a>=0;)t=n[a],t.z+=r,t.m+=r,r+=t.s+(i+=t.c)}(e);var a=(t[0].z+t[t.length-1].z)/2;n?(e.z=n.z+r(e._,n._),e.m=e.z-a):e.z=a}else n&&(e.z=n.z+r(e._,n._));e.parent.A=function(e,t,i){if(t){for(var n,a,o,s,l=e,c=e,u=t,h=l.parent.children[0],d=l.m,f=c.m,p=u.m,m=h.m;u=rK(u),l=rX(l),u&&l;){h=rX(h),(c=rK(c)).a=e,(s=u.z+p-l.z-d+r(u._,l._))>0&&(function(e,t,r){var i=r/(t.i-e.i);t.c-=i,t.s+=r,e.c+=i,t.z+=r,t.m+=r}((n=u,a=e,o=i,n.a.parent===a.parent?n.a:o),e,s),d+=s,f+=s),p+=u.m,d+=l.m,m+=h.m,f+=c.m}u&&!rK(c)&&(c.t=u,c.m+=p-f),l&&!rX(h)&&(h.t=l,h.m+=d-m,i=e)}return i}(e,n,e.parent.A||i[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=i[0],e.y=e.depth*i[1]}return a.separation=function(e){return arguments.length?(r=e,a):r},a.size=function(e){return arguments.length?(n=null==(i=e)?l:null,a):n?null:i},a.nodeSize=function(e){return arguments.length?(n=null==(i=e)?null:l,a):n?i:null},rb(a,t)},e.layout.cluster=function(){var t=e.layout.hierarchy().sort(null).value(null),r=r$,i=[1,1],n=!1;function a(a,o){var s,l=t.call(this,a,o),c=l[0],u=0;rw(c,function(t){var i,n,a=t.children;a&&a.length?(t.x=(i=a).reduce(function(e,t){return e+t.x},0)/i.length,n=a,t.y=1+e.max(n,function(e){return e.y})):(t.x=s?u+=r(t,s):0,t.y=0,s=t)});var h=function e(t){var r=t.children;return r&&r.length?e(r[0]):t}(c),d=function e(t){var r,i=t.children;return i&&(r=i.length)?e(i[r-1]):t}(c),f=h.x-r(h,d)/2,p=d.x+r(d,h)/2;return rw(c,n?function(e){e.x=(e.x-c.x)*i[0],e.y=(c.y-e.y)*i[1]}:function(e){e.x=(e.x-f)/(p-f)*i[0],e.y=(1-(c.y?e.y/c.y:1))*i[1]}),l}return a.separation=function(e){return arguments.length?(r=e,a):r},a.size=function(e){return arguments.length?(n=null==(i=e),a):n?null:i},a.nodeSize=function(e){return arguments.length?(n=null!=(i=e),a):n?i:null},rb(a,t)},e.layout.treemap=function(){var t,r=e.layout.hierarchy(),i=Math.round,n=[1,1],a=null,o=rJ,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var r,i,n=-1,a=e.length;++nr.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o0;)d.push(i=f[a-1]),d.area+=i.area,"squarify"!==l||(n=function(e,t){for(var r,i=e.area,n=0,a=1/0,o=-1,s=e.length;++on&&(n=r));return i*=i,t*=t,i?Math.max(t*n*c/i,i/(t*a*c)):1/0}(d,m))<=p?(f.pop(),p=n):(d.area-=d.pop().area,h(d,m,s,!1),m=Math.min(s.dx,s.dy),d.length=d.area=0,p=1/0);d.length&&(h(d,m,s,!0),d.length=d.area=0),r.forEach(e)}})(a),s&&(t=i),i}return d.size=function(e){return arguments.length?(n=e,d):n},d.padding=function(e){var t;return arguments.length?(o=null==(a=e)?rJ:"function"==(t=typeof e)?function(t){var r=e.call(d,t,t.depth);return null==r?rJ(t):rQ(t,"number"==typeof r?[r,r,r,r]:r)}:("number"===t&&(e=[e,e,e,e]),function(t){return rQ(t,e)}),d):a},d.round=function(e){return arguments.length?(i=e?Math.round:Number,d):i!=Number},d.sticky=function(e){return arguments.length?(s=e,t=null,d):s},d.ratio=function(e){return arguments.length?(c=e,d):c},d.mode=function(e){return arguments.length?(l=e+"",d):l},rb(d,r)},e.random={normal:function(e,t){var r=arguments.length;return r<2&&(t=1),r<1&&(e=0),function(){var r,i,n;do n=(r=2*Math.random()-1)*r+(i=2*Math.random()-1)*i;while(!n||n>1);return e+t*r*Math.sqrt(-2*Math.log(n)/n)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},bates:function(t){var r=e.random.irwinHall(t);return function(){return r()/t}},irwinHall:function(e){return function(){for(var t=0,r=0;r2?r6:r2,s=n?rh:ru;return a=e(t,r,s,i),o=e(r,t,s,tQ),l}function l(e){return a(e)}return l.invert=function(e){return o(e)},l.domain=function(e){return arguments.length?(t=e.map(Number),s()):t},l.range=function(e){return arguments.length?(r=e,s()):r},l.rangeRound=function(e){return l.range(e).interpolate(ri)},l.clamp=function(e){return arguments.length?(n=e,s()):n},l.interpolate=function(e){return arguments.length?(i=e,s()):i},l.ticks=function(e){return ie(t,e)},l.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},l.nice=function(e){return r9(t,e),s()},l.copy=function(){return e(t,r,i,n)},s()}([0,1],[0,1],tQ,!1)},e.scale.log=function(){return function e(t,r,i,n){function a(e){return(i?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(r)}function o(e){return i?Math.pow(r,e):-Math.pow(r,-e)}function s(e){return t(a(e))}return s.invert=function(e){return o(t.invert(e))},s.domain=function(e){return arguments.length?(i=e[0]>=0,t.domain((n=e.map(Number)).map(a)),s):n},s.base=function(e){return arguments.length?(r=+e,t.domain(n.map(a)),s):r},s.nice=function(){var e=r3(n.map(a),i?Math:it);return t.domain(e),n=e.map(o),s},s.ticks=function(){var e=r0(n),t=[],s=e[0],l=e[1],c=Math.floor(a(s)),u=Math.ceil(a(l)),h=r%1?2:r;if(isFinite(u-c)){if(i){for(;c0;d--)t.push(o(c)*d);for(c=0;t[c]l;u--);t=t.slice(c,u)}return t},s.copy=function(){return e(t.copy(),r,i,n)},r8(s,t)}(e.scale.linear().domain([0,1]),10,!0,[1,10])};var it={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function ir(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}e.scale.pow=function(){return function e(t,r,i){var n=ir(r),a=ir(1/r);function o(e){return t(n(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(t.domain((i=e.map(Number)).map(n)),o):i},o.ticks=function(e){return ie(i,e)},o.tickFormat=function(e,t){return d3_scale_linearTickFormat(i,e,t)},o.nice=function(e){return o.domain(r9(i,e))},o.exponent=function(e){return arguments.length?(n=ir(r=e),a=ir(1/r),t.domain(i.map(n)),o):r},o.copy=function(){return e(t.copy(),r,i)},r8(o,t)}(e.scale.linear(),1,[0,1])},e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return function t(r,i){var n,a,o;function s(e){return a[((n.get(e)||("range"===i.t?n.set(e,r.push(e)):NaN))-1)%a.length]}function l(t,i){return e.range(r.length).map(function(e){return t+i*e})}return s.domain=function(e){if(!arguments.length)return r;r=[],n=new b;for(var t,a=-1,o=e.length;++a0?n[e-1]:r[0],eh?0:1;if(c=eM)return l(c,f)+(s?l(s,1-f):"")+"Z";var p,m,g,y,v,x,b,_,w,T,M,k,A=0,S=0,E=[];if((y=(+o.apply(this,arguments)||0)/2)&&(g=i===ic?Math.sqrt(s*s+c*c):+i.apply(this,arguments),f||(S*=-1),c&&(S=eE(g/c*Math.sin(y))),s&&(A=eE(g/s*Math.sin(y)))),c){v=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(h-S),_=c*Math.sin(h-S);var C=Math.abs(h-u-2*S)<=ew?0:1;if(S&&ig(v,x,b,_)===f^C){var L=(u+h)/2;v=c*Math.cos(L),x=c*Math.sin(L),b=_=null}}else v=x=0;if(s){w=s*Math.cos(h-A),T=s*Math.sin(h-A),M=s*Math.cos(u+A),k=s*Math.sin(u+A);var P=Math.abs(u-h+2*A)<=ew?0:1;if(A&&ig(w,T,M,k)===1-f^P){var I=(u+h)/2;w=s*Math.cos(I),T=s*Math.sin(I),M=k=null}}else w=T=0;if(d>1e-6&&(p=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){m=s0?0:1}function iy(e,t,r,i,n){var a=e[0]-t[0],o=e[1]-t[1],s=(n?i:-i)/Math.sqrt(a*a+o*o),l=s*o,c=-s*a,u=e[0]+l,h=e[1]+c,d=t[0]+l,f=t[1]+c,p=(u+d)/2,m=(h+f)/2,g=d-u,y=f-h,v=g*g+y*y,x=r-i,b=u*f-d*h,_=(y<0?-1:1)*Math.sqrt(Math.max(0,x*x*v-b*b)),w=(b*y-g*_)/v,T=(-b*g-y*_)/v,M=(b*y+g*_)/v,k=(-b*g+y*_)/v,A=w-p,S=T-m,E=M-p,C=k-m;return A*A+S*S>E*E+C*C&&(w=M,T=k),[[w-l,T-c],[w*r/x,T*r/x]]}function iv(){return!0}function ix(e){var t=tl,r=tc,i=iv,n=i_,a=n.key,o=.7;function s(a){var s,l=[],c=[],u=-1,h=a.length,d=e6(t),f=e6(r);function p(){l.push("M",n(e(c),o))}for(;++u1&&n.push("H",i[0]),n.join("")},"step-before":iT,"step-after":iM,basis:iS,"basis-open":function(e){if(e.length<4)return i_(e);for(var t,r=[],i=-1,n=e.length,a=[0],o=[0];++i<3;)t=e[i],a.push(t[0]),o.push(t[1]);for(r.push(iE(iP,a)+","+iE(iP,o)),--i;++iv(t=iz(e[s],e[s+1]))?o[s]=o[s+1]=0:(n=(r=o[s]/t)*r+(i=o[s+1]/t)*i)>9&&(n=3*t/Math.sqrt(n),o[s]=n*r,o[s+1]=n*i);for(s=-1;++s<=l;)a.push([(n=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])))||0,o[s]*n||0]);return a}(e))}});function i_(e){return e.length>1?e.join("L"):e+"Z"}function iw(e){return e.join("L")+"Z"}function iT(e){for(var t=0,r=e.length,i=e[0],n=[i[0],",",i[1]];++t1){s=t[1],a=e[l],l++,i+="C"+(n[0]+o[0])+","+(n[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var c=2;cew)+",1 "+t}return a.radius=function(e){return arguments.length?(r=e6(e),a):r},a.source=function(t){return arguments.length?(e=e6(t),a):e},a.target=function(e){return arguments.length?(t=e6(e),a):t},a.startAngle=function(e){return arguments.length?(i=e6(e),a):i},a.endAngle=function(e){return arguments.length?(n=e6(e),a):n},a},e.svg.diagonal=function(){var e=iR,t=iF,r=iB;function i(i,n){var a=e.call(this,i,n),o=t.call(this,i,n),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return i.source=function(t){return arguments.length?(e=e6(t),i):e},i.target=function(e){return arguments.length?(t=e6(e),i):t},i.projection=function(e){return arguments.length?(r=e,i):r},i},e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),r=iB,i=t.projection;return t.projection=function(e){var t;return arguments.length?i((t=r=e,function(){var e=t.apply(this,arguments),r=e[0],i=e[1]-ek;return[r*Math.cos(i),r*Math.sin(i)]})):r},t},e.svg.symbol=function(){var e=iU,t=iN;function r(r,i){return(iq.get(e.call(this,r,i))||iV)(t.call(this,r,i))}return r.type=function(t){return arguments.length?(e=e6(t),r):e},r.size=function(e){return arguments.length?(t=e6(e),r):t},r};var iq=e.map({circle:iV,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*iG)),r=t*iG;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/iH),r=t*iH/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/iH),r=t*iH/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});e.svg.symbolTypes=iq.keys();var iH=Math.sqrt(3),iG=Math.tan(30*eA);H.transition=function(e){for(var t,r,i=i$||++iJ,n=i1(e),a=[],o=iX||{time:Date.now(),ease:t9,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--d].call(e,o);if(a>=1)return h.event&&h.event.end.call(e,e.__data__,t),--u.count?delete u[i]:delete e[r],1}h||(o=tn(function(e){var t=h.delay;if(o.t=t+a,t<=e)return d(e-t);o.c=d},0,a=n.time),h=u[i]={tween:new b,time:a,timer:o,delay:n.delay,duration:n.duration,ease:n.ease,index:t},n=null,++u.count)}iK.call=H.call,iK.empty=H.empty,iK.node=H.node,iK.size=H.size,e.transition=function(t,r){return t&&t.transition?i$?t.transition(r):t:e.selection().transition(t)},e.transition.prototype=iK,iK.select=function(e){var t,r,i,n=this.id,a=this.namespace,o=[];e=G(e);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",s[1]-s[0])}function m(e){e.select(".extent").attr("y",l[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function g(){var h,g,y=this,v=e.select(e.event.target),x=i.of(y,arguments),b=e.select(y),_=v.datum(),w=!/^(n|s)$/.test(_)&&n,T=!/^(e|w)$/.test(_)&&a,M=v.classed("extent"),k=ey(y),A=e.mouse(y),S=e.select(o(y)).on("keydown.brush",function(){32==e.event.keyCode&&(M||(h=null,A[0]-=s[1],A[1]-=l[1],M=2),O())}).on("keyup.brush",function(){32==e.event.keyCode&&2==M&&(A[0]+=s[1],A[1]+=l[1],M=0,O())});if(e.event.changedTouches?S.on("touchmove.brush",L).on("touchend.brush",I):S.on("mousemove.brush",L).on("mouseup.brush",I),b.interrupt().selectAll("*").interrupt(),M)A[0]=s[0]-A[0],A[1]=l[0]-A[1];else if(_){var E=+/w$/.test(_),C=+/^n/.test(_);g=[s[1-E]-A[0],l[1-C]-A[1]],A[0]=s[E],A[1]=l[C]}else e.event.altKey&&(h=A.slice());function L(){var t=e.mouse(y),r=!1;g&&(t[0]+=g[0],t[1]+=g[1]),M||(e.event.altKey?(h||(h=[(s[0]+s[1])/2,(l[0]+l[1])/2]),A[0]=s[+(t[0]0))return o;do o.push(a=new Date(+t)),n(t,i),e(t);while(a=r)for(;e(r),!t(r);)r.setTime(r-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;n(e,-1),!t(e););else for(;--r>=0;)for(;n(e,1),!t(e););})},a&&(s.count=function(i,n){return t.setTime(+i),r.setTime(+n),e(t),e(r),Math.floor(a(t,r))},s.every=function(e){return isFinite(e=Math.floor(e))&&e>0?e>1?s.filter(o?function(t){return o(t)%e==0}:function(t){return s.count(0,t)%e==0}):s:null}),s}var n=i(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});n.every=function(e){return isFinite(e=Math.floor(e))&&e>0?e>1?i(function(t){t.setTime(Math.floor(t/e)*e)},function(t,r){t.setTime(+t+r*e)},function(t,r){return(r-t)/e}):n:null};var a=n.range,o=i(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()}),s=o.range,l=i(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4},function(e){return e.getMinutes()}),c=l.range,u=i(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getHours()}),h=u.range,d=i(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5},function(e){return e.getDate()-1}),f=d.range;function p(e){return i(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5})}var m=p(0),g=p(1),y=p(2),v=p(3),x=p(4),b=p(5),_=p(6),w=m.range,T=g.range,M=y.range,k=v.range,A=x.range,S=b.range,E=_.range,C=i(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),L=C.range,P=i(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});P.every=function(e){return isFinite(e=Math.floor(e))&&e>0?i(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)}):null};var I=P.range,z=i(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4},function(e){return e.getUTCMinutes()}),D=z.range,O=i(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getUTCHours()}),R=O.range,F=i(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5},function(e){return e.getUTCDate()-1}),j=F.range;function B(e){return i(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/6048e5})}var N=B(0),U=B(1),V=B(2),q=B(3),H=B(4),G=B(5),W=B(6),Y=N.range,Z=U.range,$=V.range,X=q.range,K=H.range,J=G.range,Q=W.range,ee=i(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()}),et=ee.range,er=i(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});er.every=function(e){return isFinite(e=Math.floor(e))&&e>0?i(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)}):null};var ei=er.range;e.timeDay=d,e.timeDays=f,e.timeFriday=b,e.timeFridays=S,e.timeHour=u,e.timeHours=h,e.timeInterval=i,e.timeMillisecond=n,e.timeMilliseconds=a,e.timeMinute=l,e.timeMinutes=c,e.timeMonday=g,e.timeMondays=T,e.timeMonth=C,e.timeMonths=L,e.timeSaturday=_,e.timeSaturdays=E,e.timeSecond=o,e.timeSeconds=s,e.timeSunday=m,e.timeSundays=w,e.timeThursday=x,e.timeThursdays=A,e.timeTuesday=y,e.timeTuesdays=M,e.timeWednesday=v,e.timeWednesdays=k,e.timeWeek=m,e.timeWeeks=w,e.timeYear=P,e.timeYears=I,e.utcDay=F,e.utcDays=j,e.utcFriday=G,e.utcFridays=J,e.utcHour=O,e.utcHours=R,e.utcMillisecond=n,e.utcMilliseconds=a,e.utcMinute=z,e.utcMinutes=D,e.utcMonday=U,e.utcMondays=Z,e.utcMonth=ee,e.utcMonths=et,e.utcSaturday=W,e.utcSaturdays=Q,e.utcSecond=o,e.utcSeconds=s,e.utcSunday=N,e.utcSundays=Y,e.utcThursday=H,e.utcThursdays=K,e.utcTuesday=V,e.utcTuesdays=$,e.utcWednesday=q,e.utcWednesdays=X,e.utcWeek=N,e.utcWeeks=Y,e.utcYear=er,e.utcYears=ei,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r=r||self).d3=r.d3||{})}}),k=p({"node_modules/d3-time-format/dist/d3-time-format.js"(e,t){var r,i;r=e,i=function(e,t){function r(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function i(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function n(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function a(e){var a=e.dateTime,o=e.date,l=e.time,c=e.periods,u=e.days,h=e.shortDays,d=e.months,W=e.shortMonths,ed=f(c),eM=p(c),ek=f(u),eA=p(u),eS=f(h),eE=p(h),eC=f(d),eL=p(d),eP=f(W),eI=p(W),ez={a:function(e){return h[e.getDay()]},A:function(e){return u[e.getDay()]},b:function(e){return W[e.getMonth()]},B:function(e){return d[e.getMonth()]},c:null,d:O,e:O,f:N,g:K,G:Q,H:R,I:F,j:j,L:B,m:U,M:V,p:function(e){return c[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:ew,s:eT,S:q,u:H,U:G,V:Y,w:Z,W:$,x:null,X:null,y:X,Y:J,Z:ee,"%":e_},eD={a:function(e){return h[e.getUTCDay()]},A:function(e){return u[e.getUTCDay()]},b:function(e){return W[e.getUTCMonth()]},B:function(e){return d[e.getUTCMonth()]},c:null,d:et,e:et,f:eo,g:ey,G:ex,H:er,I:ei,j:en,L:ea,m:es,M:el,p:function(e){return c[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:ew,s:eT,S:ec,u:eu,U:eh,V:ef,w:ep,W:em,x:null,X:null,y:eg,Y:ev,Z:eb,"%":e_},eO={a:function(e,t,r){var i=eS.exec(t.slice(r));return i?(e.w=eE[i[0].toLowerCase()],r+i[0].length):-1},A:function(e,t,r){var i=ek.exec(t.slice(r));return i?(e.w=eA[i[0].toLowerCase()],r+i[0].length):-1},b:function(e,t,r){var i=eP.exec(t.slice(r));return i?(e.m=eI[i[0].toLowerCase()],r+i[0].length):-1},B:function(e,t,r){var i=eC.exec(t.slice(r));return i?(e.m=eL[i[0].toLowerCase()],r+i[0].length):-1},c:function(e,t,r){return ej(e,a,t,r)},d:k,e:k,f:P,g:_,G:b,H:S,I:S,j:A,L:L,m:M,M:E,p:function(e,t,r){var i=ed.exec(t.slice(r));return i?(e.p=eM[i[0].toLowerCase()],r+i[0].length):-1},q:T,Q:z,s:D,S:C,u:g,U:y,V:v,w:m,W:x,x:function(e,t,r){return ej(e,o,t,r)},X:function(e,t,r){return ej(e,l,t,r)},y:_,Y:b,Z:w,"%":I};function eR(e,t){return function(r){var i,n,a,o=[],l=-1,c=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;"w"in c||(c.w=1),"Z"in c?(s=(l=(s=i(n(c.y,0,1))).getUTCDay())>4||0===l?t.utcMonday.ceil(s):t.utcMonday(s),s=t.utcDay.offset(s,(c.V-1)*7),c.y=s.getUTCFullYear(),c.m=s.getUTCMonth(),c.d=s.getUTCDate()+(c.w+6)%7):(s=(l=(s=r(n(c.y,0,1))).getDay())>4||0===l?t.timeMonday.ceil(s):t.timeMonday(s),s=t.timeDay.offset(s,(c.V-1)*7),c.y=s.getFullYear(),c.m=s.getMonth(),c.d=s.getDate()+(c.w+6)%7)}else("W"in c||"U"in c)&&("w"in c||(c.w="u"in c?c.u%7:+("W"in c)),l="Z"in c?i(n(c.y,0,1)).getUTCDay():r(n(c.y,0,1)).getDay(),c.m=0,c.d="W"in c?(c.w+6)%7+7*c.W-(l+5)%7:c.w+7*c.U-(l+6)%7);return"Z"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,i(c)):r(c)}}function ej(e,t,r,i){for(var n,a,o=0,l=t.length,c=r.length;o=c)return -1;if(37===(n=t.charCodeAt(o++))){if(!(a=eO[(n=t.charAt(o++))in s?t.charAt(o++):n])||(i=a(e,r,i))<0)return -1}else if(n!=r.charCodeAt(i++))return -1}return i}return ez.x=eR(o,ez),ez.X=eR(l,ez),ez.c=eR(a,ez),eD.x=eR(o,eD),eD.X=eR(l,eD),eD.c=eR(a,eD),{format:function(e){var t=eR(e+="",ez);return t.toString=function(){return e},t},parse:function(e){var t=eF(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=eR(e+="",eD);return t.toString=function(){return e},t},utcParse:function(e){var t=eF(e+="",!0);return t.toString=function(){return e},t}}}var o,s={"-":"",_:" ",0:"0"},l=/^\s*\d+/,c=/^%/,u=/[\\^$*+?|[\]().{}]/g;function h(e,t,r){var i=e<0?"-":"",n=(i?-e:e)+"",a=n.length;return i+(a68?1900:2e3),r+i[0].length):-1}function w(e,t,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function T(e,t,r){var i=l.exec(t.slice(r,r+1));return i?(e.q=3*i[0]-3,r+i[0].length):-1}function M(e,t,r){var i=l.exec(t.slice(r,r+2));return i?(e.m=i[0]-1,r+i[0].length):-1}function k(e,t,r){var i=l.exec(t.slice(r,r+2));return i?(e.d=+i[0],r+i[0].length):-1}function A(e,t,r){var i=l.exec(t.slice(r,r+3));return i?(e.m=0,e.d=+i[0],r+i[0].length):-1}function S(e,t,r){var i=l.exec(t.slice(r,r+2));return i?(e.H=+i[0],r+i[0].length):-1}function E(e,t,r){var i=l.exec(t.slice(r,r+2));return i?(e.M=+i[0],r+i[0].length):-1}function C(e,t,r){var i=l.exec(t.slice(r,r+2));return i?(e.S=+i[0],r+i[0].length):-1}function L(e,t,r){var i=l.exec(t.slice(r,r+3));return i?(e.L=+i[0],r+i[0].length):-1}function P(e,t,r){var i=l.exec(t.slice(r,r+6));return i?(e.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function I(e,t,r){var i=c.exec(t.slice(r,r+1));return i?r+i[0].length:-1}function z(e,t,r){var i=l.exec(t.slice(r));return i?(e.Q=+i[0],r+i[0].length):-1}function D(e,t,r){var i=l.exec(t.slice(r));return i?(e.s=+i[0],r+i[0].length):-1}function O(e,t){return h(e.getDate(),t,2)}function R(e,t){return h(e.getHours(),t,2)}function F(e,t){return h(e.getHours()%12||12,t,2)}function j(e,r){return h(1+t.timeDay.count(t.timeYear(e),e),r,3)}function B(e,t){return h(e.getMilliseconds(),t,3)}function N(e,t){return B(e,t)+"000"}function U(e,t){return h(e.getMonth()+1,t,2)}function V(e,t){return h(e.getMinutes(),t,2)}function q(e,t){return h(e.getSeconds(),t,2)}function H(e){var t=e.getDay();return 0===t?7:t}function G(e,r){return h(t.timeSunday.count(t.timeYear(e)-1,e),r,2)}function W(e){var r=e.getDay();return r>=4||0===r?t.timeThursday(e):t.timeThursday.ceil(e)}function Y(e,r){return e=W(e),h(t.timeThursday.count(t.timeYear(e),e)+(4===t.timeYear(e).getDay()),r,2)}function Z(e){return e.getDay()}function $(e,r){return h(t.timeMonday.count(t.timeYear(e)-1,e),r,2)}function X(e,t){return h(e.getFullYear()%100,t,2)}function K(e,t){return h((e=W(e)).getFullYear()%100,t,2)}function J(e,t){return h(e.getFullYear()%1e4,t,4)}function Q(e,r){var i=e.getDay();return h((e=i>=4||0===i?t.timeThursday(e):t.timeThursday.ceil(e)).getFullYear()%1e4,r,4)}function ee(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+h(t/60|0,"0",2)+h(t%60,"0",2)}function et(e,t){return h(e.getUTCDate(),t,2)}function er(e,t){return h(e.getUTCHours(),t,2)}function ei(e,t){return h(e.getUTCHours()%12||12,t,2)}function en(e,r){return h(1+t.utcDay.count(t.utcYear(e),e),r,3)}function ea(e,t){return h(e.getUTCMilliseconds(),t,3)}function eo(e,t){return ea(e,t)+"000"}function es(e,t){return h(e.getUTCMonth()+1,t,2)}function el(e,t){return h(e.getUTCMinutes(),t,2)}function ec(e,t){return h(e.getUTCSeconds(),t,2)}function eu(e){var t=e.getUTCDay();return 0===t?7:t}function eh(e,r){return h(t.utcSunday.count(t.utcYear(e)-1,e),r,2)}function ed(e){var r=e.getUTCDay();return r>=4||0===r?t.utcThursday(e):t.utcThursday.ceil(e)}function ef(e,r){return e=ed(e),h(t.utcThursday.count(t.utcYear(e),e)+(4===t.utcYear(e).getUTCDay()),r,2)}function ep(e){return e.getUTCDay()}function em(e,r){return h(t.utcMonday.count(t.utcYear(e)-1,e),r,2)}function eg(e,t){return h(e.getUTCFullYear()%100,t,2)}function ey(e,t){return h((e=ed(e)).getUTCFullYear()%100,t,2)}function ev(e,t){return h(e.getUTCFullYear()%1e4,t,4)}function ex(e,r){var i=e.getUTCDay();return h((e=i>=4||0===i?t.utcThursday(e):t.utcThursday.ceil(e)).getUTCFullYear()%1e4,r,4)}function eb(){return"+0000"}function e_(){return"%"}function ew(e){return+e}function eT(e){return Math.floor(e/1e3)}function eM(t){return e.timeFormat=(o=a(t)).format,e.timeParse=o.parse,e.utcFormat=o.utcFormat,e.utcParse=o.utcParse,o}eM({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"]});var ek="%Y-%m-%dT%H:%M:%S.%LZ",eA=Date.prototype.toISOString?function(e){return e.toISOString()}:e.utcFormat(ek),eS=+new Date("2000-01-01T00:00:00.000Z")?function(e){var t=new Date(e);return isNaN(t)?null:t}:e.utcParse(ek);e.isoFormat=eA,e.isoParse=eS,e.timeFormatDefaultLocale=eM,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&"u">typeof t?i(e,M()):i((r=r||self).d3=r.d3||{},r.d3)}}),A=p({"node_modules/d3-format/dist/d3-format.js"(e,t){var r;r=e,function(e){function t(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}function r(e){return(e=t(Math.abs(e)))?e[1]:NaN}var i,n,a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(e){var t;if(!(t=a.exec(e)))throw Error("invalid format: "+e);return new s({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]})}function s(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function l(e,r){var i=t(e,r);if(!i)return e+"";var n=i[0],a=i[1];return a<0?"0."+Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+Array(a-n.length+2).join("0")}o.prototype=s.prototype,s.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var c={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return l(100*e,t)},r:l,s:function(e,r){var n=t(e,r);if(!n)return e+"";var a=n[0],o=n[1],s=o-(i=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+Array(s-l+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+Array(1-s).join("0")+t(e,Math.max(0,r+s-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function u(e){return e}var h=Array.prototype.map,d=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function f(e){var t,n,a,s=void 0===e.grouping||void 0===e.thousands?u:(t=h.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,a=[],o=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(n)}),l=void 0===e.currency?"":e.currency[0]+"",f=void 0===e.currency?"":e.currency[1]+"",p=void 0===e.decimal?".":e.decimal+"",m=void 0===e.numerals?u:(a=h.call(e.numerals,String),function(e){return e.replace(/[0-9]/g,function(e){return a[+e]})}),g=void 0===e.percent?"%":e.percent+"",y=void 0===e.minus?"-":e.minus+"",v=void 0===e.nan?"NaN":e.nan+"";function x(e){var t=(e=o(e)).fill,r=e.align,n=e.sign,a=e.symbol,u=e.zero,h=e.width,x=e.comma,b=e.precision,_=e.trim,w=e.type;"n"===w?(x=!0,w="g"):c[w]||(void 0===b&&(b=12),_=!0,w="g"),(u||"0"===t&&"="===r)&&(u=!0,t="0",r="=");var T="$"===a?l:"#"===a&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",M="$"===a?f:/[%p]/.test(w)?g:"",k=c[w],A=/[defgprs%]/.test(w);function S(e){var a,o,l,c=T,f=M;if("c"===w)f=k(e)+f,e="";else{var g=(e*=1)<0||1/e<0;if(e=isNaN(e)?v:k(Math.abs(e),b),_&&(e=function(e){e:for(var t,r=e.length,i=1,n=-1;i0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),g&&0==+e&&"+"!==n&&(g=!1),c=(g?"("===n?n:y:"-"===n||"("===n?"":n)+c,f=("s"===w?d[8+i/3]:"")+f+(g&&"("===n?")":""),A){for(a=-1,o=e.length;++a(l=e.charCodeAt(a))||l>57){f=(46===l?p+e.slice(a+1):e.slice(a))+f,e=e.slice(0,a);break}}}x&&!u&&(e=s(e,1/0));var S=c.length+e.length+f.length,E=S>1)+c+e+f+E.slice(S);break;default:e=E+c+e+f}return m(e)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return e+""},S}return{format:x,formatPrefix:function(e,t){var i=x(((e=o(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(r(t)/3))),a=Math.pow(10,-n),s=d[8+n/3];return function(e){return i(a*e)+s}}}}function p(t){return e.format=(n=f(t)).format,e.formatPrefix=n.formatPrefix,n}p({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),e.FormatSpecifier=s,e.formatDefaultLocale=p,e.formatLocale=f,e.formatSpecifier=o,e.precisionFixed=function(e){return Math.max(0,-r(Math.abs(e)))},e.precisionPrefix=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(t)/3)))-r(Math.abs(e)))},e.precisionRound=function(e,t){return Math.max(0,r(t=Math.abs(t)-(e=Math.abs(e)))-r(e))+1},Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r="u">typeof globalThis?globalThis:r||self).d3=r.d3||{})}}),E=p({"node_modules/is-string-blank/index.js"(e,t){t.exports=function(e){for(var t,r=e.length,i=0;i13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}}}),C=p({"node_modules/fast-isnumeric/index.js"(e,t){var r=E();t.exports=function(e){var t=typeof e;if("string"===t){var i=e;if(0==(e*=1)&&r(i))return!1}else if("number"!==t)return!1;return e-e<1}}}),L=p({"src/constants/numerical.js"(e,t){t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,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:2440587.5,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"}}}),P=p({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(e,t){var r;r=e,function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array>"u"?[]:new Uint8Array(256),i=0;i>4,h[c++]=(15&n)<<4|a>>2,h[c++]=(3&a)<<6|63&o;return u},e.encode=function(e){var r,i=new Uint8Array(e),n=i.length,a="";for(r=0;r>2],a+=t[(3&i[r])<<4|i[r+1]>>4],a+=t[(15&i[r+1])<<2|i[r+2]>>6],a+=t[63&i[r+2]];return n%3==2?a=a.substring(0,a.length-1)+"=":n%3==1&&(a=a.substring(0,a.length-2)+"=="),a},Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r="u">typeof globalThis?globalThis:r||self)["base64-arraybuffer"]={})}}),I=p({"src/lib/is_plain_object.js"(e,t){t.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}}}),z=p({"src/lib/array.js"(e){var t=P().decode,r=I(),i=Array.isArray,n=ArrayBuffer,a=DataView;function o(e){return n.isView(e)&&!(e instanceof a)}function s(e){return i(e)||o(e)}e.isTypedArray=o,e.isArrayOrTypedArray=s,e.isArray1D=function(e){return!s(e[0])},e.ensureArray=function(e,t){return i(e)||(e=[]),e.length=t,e};var l={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};function c(e){return e.constructor===ArrayBuffer}function u(e,t,r){if(s(e))if(!s(e[0]))return e.length;else{for(var i=r,n=0;n2)return c[t]=2|c[t],d.set(e,null);if(h){for(o=t;o0)return Math.log(e)/Math.LN10;var i=Math.log(Math.min(t[0],t[1]))/Math.LN10;return r(i)||(i=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),i}}}),j=p({"src/lib/relink_private.js"(e,t){var r=z().isArrayOrTypedArray,i=I();t.exports=function e(t,n){for(var a in n){var o=n[a],s=t[a];if(s!==o)if("_"===a.charAt(0)||"function"==typeof o){if(a in t)continue;t[a]=o}else if(r(o)&&r(s)&&i(o[0])){if("customdata"===a||"ids"===a)continue;for(var l=Math.min(o.length,s.length),c=0;ct/2?e-Math.round(e/t)*t:e}m(B,{mod:()=>N,modHalf:()=>U});var V=f({"src/lib/mod.ts"(){}}),q=p({"src/lib/extend.js"(e){var t=I(),r=Array.isArray;function i(e,n,a,o){var s,l,c,u,h,d,f=e[0],p=e.length;if(2===p&&r(f)&&r(e[1])&&0===f.length){if(function(e,t){var r,i;for(r=0;rtypeof u||a)&&(f[l]=u);return f}e.extendFlat=function(...e){return i(e,!1,!1,!1)},e.extendDeep=function(...e){return i(e,!0,!1,!1)},e.extendDeepAll=function(...e){return i(e,!0,!0,!1)},e.extendDeepNoArrays=function(...e){return i(e,!0,!1,!0)}}}),H=p({"src/plots/font_attributes.js"(e,t){t.exports=function(e){var t=e.variantValues,r=e.editType,i=e.colorEditType;void 0===i&&(i=r);var n={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(n.valType="enumerated",n.values=n.extras,n.extras=void 0,n.min=void 0,n.max=void 0);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:i},weight:n,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(a.size.dflt="auto"),e.autoColor&&(a.color.dflt="auto"),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}}}),G=p({"src/components/fx/constants.js"(e,t){t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}}),W=p({"src/components/fx/layout_attributes.js"(e,t){var r=G(),i=H(),n=i({editType:"none"});n.family.dflt=r.HOVERFONT,n.size.dflt=r.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversort:{valType:"enumerated",values:["trace","value descending","value ascending"],dflt:"trace",editType:"none"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoveranywhere:{valType:"boolean",dflt:!1,editType:"none"},clickanywhere:{valType:"boolean",dflt:!1,editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:n,grouptitlefont:i({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}}}),Y=p({"src/components/fx/attributes.js"(e,t){var r=H(),i=W().hoverlabel,n=q().extendFlat;t.exports={hoverlabel:{bgcolor:n({},i.bgcolor,{arrayOk:!0}),bordercolor:n({},i.bordercolor,{arrayOk:!0}),font:r({arrayOk:!0,editType:"none"}),align:n({},i.align,{arrayOk:!0}),namelength:n({},i.namelength,{arrayOk:!0}),showarrow:n({},i.showarrow),editType:"none"}}}}),Z=p({"src/plots/attributes.js"(e,t){var r=H(),i=Y();t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:r({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:i.hoverlabel,uirevision:{valType:"any",editType:"none"}}}}),$=p({"node_modules/culori/bundled/culori.cjs"(e,t){let i,a,o;var s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,h={};((e,t)=>{for(var r in t)s(e,r,{get:t[r],enumerable:!0})})(h,{a98:()=>i9,average:()=>eW,averageAngle:()=>eH,averageNumber:()=>eG,blend:()=>r9,blerp:()=>ea,clampChroma:()=>iR,clampGamut:()=>iO,clampRgb:()=>iD,colorsNamed:()=>p,convertA98ToXyz65:()=>ed,convertCubehelixToRgb:()=>eI,convertDlchToLab65:()=>e9,convertHsiToRgb:()=>tn,convertHslToRgb:()=>ts,convertHsvToRgb:()=>tf,convertHwbToRgb:()=>tg,convertItpToXyz65:()=>tT,convertJabToJch:()=>tO,convertJabToRgb:()=>tz,convertJabToXyz65:()=>tP,convertJchToJab:()=>tR,convertLab65ToDlch:()=>e7,convertLab65ToRgb:()=>e0,convertLab65ToXyz65:()=>eQ,convertLabToLch:()=>eZ,convertLabToRgb:()=>tU,convertLabToXyz50:()=>tB,convertLchToLab:()=>e$,convertLchuvToLuv:()=>tQ,convertLrgbToOklab:()=>rt,convertLrgbToRgb:()=>ex,convertLuvToLchuv:()=>tJ,convertLuvToXyz50:()=>t8,convertOkhslToOklab:()=>rh,convertOkhsvToOklab:()=>rp,convertOklabToLrgb:()=>ri,convertOklabToOkhsl:()=>ru,convertOklabToOkhsv:()=>rf,convertOklabToRgb:()=>rn,convertP3ToXyz65:()=>rb,convertProphotoToXyz50:()=>rA,convertRec2020ToXyz65:()=>rP,convertRgbToCubehelix:()=>eP,convertRgbToHsi:()=>ta,convertRgbToHsl:()=>tl,convertRgbToHsv:()=>tp,convertRgbToHwb:()=>ty,convertRgbToJab:()=>tI,convertRgbToLab:()=>tG,convertRgbToLab65:()=>e3,convertRgbToLrgb:()=>eg,convertRgbToOklab:()=>rr,convertRgbToXyb:()=>rO,convertRgbToXyz50:()=>tV,convertRgbToXyz65:()=>ey,convertRgbToYiq:()=>rq,convertXybToRgb:()=>rF,convertXyz50ToLab:()=>tH,convertXyz50ToLuv:()=>t5,convertXyz50ToProphoto:()=>rM,convertXyz50ToRgb:()=>tN,convertXyz50ToXyz65:()=>rU,convertXyz65ToA98:()=>ep,convertXyz65ToItp:()=>tk,convertXyz65ToJab:()=>tC,convertXyz65ToLab65:()=>e2,convertXyz65ToP3:()=>r_,convertXyz65ToRec2020:()=>rC,convertXyz65ToRgb:()=>eb,convertXyz65ToXyz50:()=>rN,convertYiqToRgb:()=>rH,converter:()=>E,cubehelix:()=>i7,differenceCie76:()=>eF,differenceCie94:()=>ej,differenceCiede2000:()=>eB,differenceCmc:()=>eN,differenceEuclidean:()=>eR,differenceHueChroma:()=>eO,differenceHueNaive:()=>eD,differenceHueSaturation:()=>ez,differenceHyab:()=>eU,differenceItp:()=>eq,differenceKotsarenkoRamos:()=>eV,displayable:()=>iI,dlab:()=>ne,dlch:()=>nt,easingGamma:()=>iA,easingInOutSine:()=>i4,easingMidpoint:()=>io,easingSmootherstep:()=>i5,easingSmoothstep:()=>i2,easingSmoothstepInverse:()=>i3,filterBrightness:()=>iU,filterContrast:()=>iV,filterDeficiencyDeuter:()=>i0,filterDeficiencyProt:()=>iQ,filterDeficiencyTrit:()=>i1,filterGrayscale:()=>iG,filterHueRotate:()=>iY,filterInvert:()=>iW,filterSaturate:()=>iH,filterSepia:()=>iq,fixupAlpha:()=>ec,fixupHueDecreasing:()=>eS,fixupHueIncreasing:()=>eA,fixupHueLonger:()=>ek,fixupHueShorter:()=>eM,formatCss:()=>r2,formatHex:()=>r3,formatHex8:()=>r5,formatHsl:()=>r6,formatRgb:()=>r4,getMode:()=>O,hsi:()=>nr,hsl:()=>ni,hsv:()=>nn,hwb:()=>na,inGamut:()=>iz,interpolate:()=>il,interpolateWith:()=>ic,interpolateWithPremultipliedAlpha:()=>iu,interpolatorLinear:()=>el,interpolatorPiecewise:()=>es,interpolatorSplineBasis:()=>id,interpolatorSplineBasisClosed:()=>ip,interpolatorSplineMonotone:()=>iT,interpolatorSplineMonotone2:()=>iM,interpolatorSplineMonotoneClosed:()=>ik,interpolatorSplineNatural:()=>ig,interpolatorSplineNaturalClosed:()=>iy,itp:()=>no,jab:()=>ns,jch:()=>nl,lab:()=>nc,lab65:()=>nu,lch:()=>nh,lch65:()=>nd,lchuv:()=>nf,lerp:()=>ei,lrgb:()=>np,luv:()=>nm,mapAlphaDivide:()=>ir,mapAlphaMultiply:()=>it,mapTransferGamma:()=>ia,mapTransferLinear:()=>ii,mapper:()=>ie,modeA98:()=>e_,modeCubehelix:()=>eY,modeDlab:()=>tr,modeDlch:()=>ti,modeHsi:()=>to,modeHsl:()=>td,modeHsv:()=>tm,modeHwb:()=>tx,modeItp:()=>tA,modeJab:()=>tD,modeJch:()=>tF,modeLab:()=>tY,modeLab65:()=>tZ,modeLch:()=>tX,modeLch65:()=>tK,modeLchuv:()=>t9,modeLrgb:()=>t7,modeLuv:()=>re,modeOkhsl:()=>rd,modeOkhsv:()=>rm,modeOklab:()=>ry,modeOklch:()=>rx,modeP3:()=>rw,modeProphoto:()=>rS,modeRec2020:()=>rI,modeRgb:()=>eu,modeXyb:()=>rj,modeXyz50:()=>rB,modeXyz65:()=>rV,modeYiq:()=>rG,nearest:()=>ij,okhsl:()=>ng,okhsv:()=>ny,oklab:()=>nv,oklch:()=>nx,p3:()=>nb,parse:()=>ee,parseHex:()=>y,parseHsl:()=>th,parseHslLegacy:()=>tu,parseHwb:()=>tv,parseLab:()=>tW,parseLch:()=>t$,parseNamed:()=>m,parseOklab:()=>rg,parseOklch:()=>rv,parseRgb:()=>et,parseRgbLegacy:()=>A,parseTransparent:()=>er,prophoto:()=>n_,random:()=>r7,rec2020:()=>nw,removeParser:()=>F,rgb:()=>nT,round:()=>rW,samples:()=>iS,serializeHex:()=>rJ,serializeHex8:()=>rQ,serializeHsl:()=>r1,serializeRgb:()=>r0,toGamut:()=>iF,trilerp:()=>eo,unlerp:()=>en,useMode:()=>D,useParser:()=>R,wcagContrast:()=>i8,wcagLuminance:()=>i6,xyb:()=>nM,xyz50:()=>nk,xyz65:()=>nA,yiq:()=>nS}),t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of c(t))u.call(e,i)||void 0===i||s(e,i,{get:()=>t[i],enumerable:!(r=l(t,i))||r.enumerable});return e})(s({},"__esModule",{value:!0}),h);var f=(e,t)=>{if("number"==typeof e){if(3===t)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|240&e)/255,b:(15&e|e<<4&240)/255};if(4===t)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|240&e)/255,alpha:(15&e|e<<4&240)/255};if(6===t)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(255&e)/255};if(8===t)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(255&e)/255}}},p={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32},m=e=>f(p[e.toLowerCase()],6),g=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,y=e=>{let t;return(t=e.match(g))?f(parseInt(t[1],16),t[1].length):void 0},v="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",x=`${v}%`,b=`(?:${v}%|${v})`,_=`(?:${v}%|${v}|none)`,w=`(?:${v}(deg|grad|rad|turn)|${v})`,T="\\s*,\\s*",M=(RegExp("^"+_+"$"),RegExp(`^rgba?\\(\\s*${v}${T}${v}${T}${v}\\s*(?:,\\s*${b}\\s*)?\\)$`)),k=RegExp(`^rgba?\\(\\s*${x}${T}${x}${T}${x}\\s*(?:,\\s*${b}\\s*)?\\)$`),A=e=>{let t={mode:"rgb"},r;if(r=e.match(M))void 0!==r[1]&&(t.r=r[1]/255),void 0!==r[2]&&(t.g=r[2]/255),void 0!==r[3]&&(t.b=r[3]/255);else{if(!(r=e.match(k)))return;void 0!==r[1]&&(t.r=r[1]/100),void 0!==r[2]&&(t.g=r[2]/100),void 0!==r[3]&&(t.b=r[3]/100)}return void 0!==r[4]?t.alpha=Math.max(0,Math.min(1,r[4]/100)):void 0!==r[5]&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},S=(e,t)=>void 0===e?void 0:"object"!=typeof e?ee(e):void 0!==e.mode?e:t?r(d({},e),n({mode:t})):void 0,E=(e="rgb")=>t=>void 0!==(t=S(t,e))?t.mode===e?t:C[t.mode][e]?C[t.mode][e](t):"rgb"===e?C[t.mode].rgb(t):C.rgb[e](C[t.mode].rgb(t)):void 0,C={},L={},P=[],I={},z=e=>e,D=e=>(C[e.mode]=d(d({},C[e.mode]),e.toMode),Object.keys(e.fromMode||{}).forEach(t=>{C[t]||(C[t]={}),C[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(void 0===e.ranges[t]&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw Error(`Missing interpolator for: ${t}`);"function"==typeof e.interpolate[t]&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=z)}),L[e.mode]=e,(e.parse||[]).forEach(t=>{R(t,e.mode)}),E(e.mode)),O=e=>L[e],R=(e,t)=>{if("string"==typeof e){if(!t)throw Error("'mode' required when 'parser' is a string");I[e]=t}else"function"==typeof e&&0>P.indexOf(e)&&P.push(e)},F=e=>{if("string"==typeof e)delete I[e];else if("function"==typeof e){let t=P.indexOf(e);t>0&&P.splice(t,1)}},j=/[^\x00-\x7F]|[a-zA-Z_]/,B=/[^\x00-\x7F]|[-\w]/,N="function",U="ident",V="number",q="percentage",H="none",G="alpha",W=0;function Y(e){let t=e[W],r=e[W+1];return"-"===t||"+"===t?/\d/.test(r)||"."===r&&/\d/.test(e[W+2]):"."===t?/\d/.test(r):/\d/.test(t)}function Z(e){if(W>=e.length)return!1;let t=e[W];if(j.test(t))return!0;if("-"===t){if(e.length-W<2)return!1;let t=e[W+1];return!!("-"===t||j.test(t))}return!1}var $={deg:1,rad:180/Math.PI,grad:.9,turn:360};function X(e){let t="";if(("-"===e[W]||"+"===e[W])&&(t+=e[W++]),t+=K(e),"."===e[W]&&/\d/.test(e[W+1])&&(t+=e[W++]+K(e)),("e"===e[W]||"E"===e[W])&&(("-"===e[W+1]||"+"===e[W+1])&&/\d/.test(e[W+2])?t+=e[W++]+e[W++]+K(e):/\d/.test(e[W+1])&&(t+=e[W++]+K(e))),Z(e)){let r=J(e);return"deg"===r||"rad"===r||"turn"===r||"grad"===r?{type:"hue",value:t*$[r]}:void 0}return"%"===e[W]?(W++,{type:q,value:+t}):{type:V,value:+t}}function K(e){let t="";for(;/\d/.test(e[W]);)t+=e[W++];return t}function J(e){let t="";for(;W4)){if(4===r.length){if(r[3].type!==G)return;r[3]=r[3].value}return 3===r.length&&r.push({type:H,value:void 0}),r.every(e=>e.type!==G)?r:void 0}}var ee=e=>{if("string"!=typeof e)return;let t=function(e=""){let t=e.trim(),r=[],i;for(W=0;W"transparent"===e?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,ei=(e,t,r)=>e+r*(t-e),en=(e,t,r)=>(r-e)/(t-e),ea=(e,t,r,i,n,a)=>ei(ei(e,t,n),ei(r,i,n),a),eo=(e,t,r,i,n,a,o,s,l,c,u)=>ei(ea(e,t,r,i,l,c),ea(n,a,o,s,l,c),u),es=e=>t=>{let r=(e=>{let t=[];for(let r=0;r{let i=t*r.length,n=t>=1?r.length-1:Math.max(Math.floor(i),0),a=r[n];return void 0===a?void 0:e(a[0],a[1],i-n)}},el=es(ei),ec=e=>{let t=!1,r=e.map(e=>void 0!==e?(t=!0,e):1);return t?r:e},eu={mode:"rgb",channels:["r","g","b","alpha"],parse:[et,y,A,m,er,"srgb"],serialize:"srgb",interpolate:{r:el,g:el,b:el,alpha:{use:el,fixup:ec}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},eh=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),ed=e=>{let t=eh(e.r),r=eh(e.g),i=eh(e.b),n={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*i,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*i,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*i};return void 0!==e.alpha&&(n.alpha=e.alpha),n},ef=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),ep=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"a98",r:ef(2.0415879038107465*e-.5650069742788597*t-.3447313507783297*r),g:ef(-.9692436362808798*e+1.8759675015077206*t+.0415550574071756*r),b:ef(.0134442806320312*e-.1183623922310184*t+1.0151749943912058*r)};return void 0!==i&&(n.alpha=i),n},em=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},eg=({r:e,g:t,b:r,alpha:i})=>{let n={mode:"lrgb",r:em(e),g:em(t),b:em(r)};return void 0!==i&&(n.alpha=i),n},ey=e=>{let{r:t,g:r,b:i,alpha:n}=eg(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*i,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*i,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*i};return void 0!==n&&(a.alpha=n),a},ev=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):12.92*e},ex=({r:e,g:t,b:r,alpha:i},n="rgb")=>{let a={mode:n,r:ev(e),g:ev(t),b:ev(r)};return void 0!==i&&(a.alpha=i),a},eb=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=ex({r:3.2409699419045226*e-1.537383177570094*t-.4986107602930034*r,g:-.9692436362808796*e+1.8759675015077204*t+.0415550574071756*r,b:.0556300796969936*e-.2039769588889765*t+1.0569715142428784*r});return void 0!==i&&(n.alpha=i),n},e_=r(d({},eu),n({mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>ep(ey(e)),xyz65:ep},toMode:{rgb:e=>eb(ed(e)),xyz65:ed}})),ew=e=>(e%=360)<0?e+360:e,eT=(e,t)=>e.map((r,i,n)=>{if(void 0===r)return r;let a=ew(r);return 0===i||void 0===e[i-1]?a:t(a-ew(n[i-1]))}).reduce((e,t)=>(e.length&&void 0!==t&&void 0!==e[e.length-1]?e.push(t+e[e.length-1]):e.push(t),e),[]),eM=e=>eT(e,e=>180>=Math.abs(e)?e:e-360*Math.sign(e)),ek=e=>eT(e,e=>Math.abs(e)>=180||0===e?e:e-360*Math.sign(e)),eA=e=>eT(e,e=>e>=0?e:e+360),eS=e=>eT(e,e=>e<=0?e:e-360),eE=Math.PI/180,eC=180/Math.PI,eL=-1.78277*.29227-.1347134789,eP=({r:e,g:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=(eL*r+-1.7884503806*e-3.5172982438*t)/(eL+-1.7884503806-3.5172982438),a=r-n,o=-((1.97294*(t-n)- -.29227*a)/.90649),s={mode:"cubehelix",l:n,s:0===n||1===n?void 0:Math.sqrt(a*a+o*o)/(1.97294*n*(1-n))};return s.s&&(s.h=Math.atan2(o,a)*eC-120),void 0!==i&&(s.alpha=i),s},eI=({h:e,s:t,l:r,alpha:i})=>{let n={mode:"rgb"};e=(void 0===e?0:e+120)*eE,void 0===r&&(r=0);let a=void 0===t?0:t*r*(1-r),o=Math.cos(e),s=Math.sin(e);return n.r=r+a*(-.14861*o+1.78277*s),n.g=r+a*(-.29227*o+-.90649*s),n.b=r+a*(1.97294*o+0*s),void 0!==i&&(n.alpha=i),n},ez=(e,t)=>{if(void 0===e.h||void 0===t.h||!e.s||!t.s)return 0;let r=ew(e.h),i=Math.sin((ew(t.h)-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*i},eD=(e,t)=>{if(void 0===e.h||void 0===t.h)return 0;let r=ew(e.h),i=ew(t.h);return Math.abs(i-r)>180?r-(i-360*Math.sign(i-r)):i-r},eO=(e,t)=>{if(void 0===e.h||void 0===t.h||!e.c||!t.c)return 0;let r=ew(e.h),i=Math.sin((ew(t.h)-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*i},eR=(e="rgb",t=[1,1,1,0])=>{let r=O(e),i=r.channels,n=r.difference,a=E(e);return(e,r)=>{let o=a(e),s=a(r);return Math.sqrt(i.reduce((e,r,i)=>{let a=n[r]?n[r](o,s):o[r]-s[r];return e+(t[i]||0)*Math.pow(isNaN(a)?0:a,2)},0))}},eF=()=>eR("lab65"),ej=(e=1,t=.045,r=.015)=>{let i=E("lab65");return(n,a)=>{let o=i(n),s=i(a),l=o.l,c=o.a,u=o.b,h=Math.sqrt(c*c+u*u),d=s.l,f=s.a,p=s.b,m=Math.pow(h-Math.sqrt(f*f+p*p),2),g=Math.pow(c-f,2)+Math.pow(u-p,2)-m;return Math.sqrt(Math.pow(l-d,2)/Math.pow(e,2)+m/Math.pow(1+t*h,2)+g/Math.pow(1+r*h,2))}},eB=(e=1,t=1,r=1)=>{let i=E("lab65");return(n,a)=>{let o=i(n),s=i(a),l=o.l,c=o.a,u=o.b,h=Math.sqrt(c*c+u*u),d=s.l,f=s.a,p=s.b,m=(h+Math.sqrt(f*f+p*p))/2,g=.5*(1-Math.sqrt(Math.pow(m,7)/(Math.pow(m,7)+0x16bcc41e9))),y=c*(1+g),v=f*(1+g),x=Math.sqrt(y*y+u*u),b=Math.sqrt(v*v+p*p),_=Math.abs(y)+Math.abs(u)===0?0:Math.atan2(u,y);_+=(_<0)*2*Math.PI;let w=Math.abs(v)+Math.abs(p)===0?0:Math.atan2(p,v);w+=(w<0)*2*Math.PI;let T=b-x,M=x*b==0?0:w-_;M-=(M>Math.PI)*2*Math.PI,M+=(M<-Math.PI)*2*Math.PI;let k=2*Math.sqrt(x*b)*Math.sin(M/2),A=(x+b)/2,S;x*b==0?S=_+w:(S=(_+w)/2-(Math.abs(_-w)>Math.PI)*Math.PI,S+=(S<0)*2*Math.PI);let E=Math.pow((l+d)/2-50,2),C=1-.17*Math.cos(S-Math.PI/6)+.24*Math.cos(2*S)+.32*Math.cos(3*S+Math.PI/30)-.2*Math.cos(4*S-63*Math.PI/180),L=1+.015*E/Math.sqrt(20+E),P=1+.045*A,I=1+.015*A*C,z=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*S-275)/25,2)),D=2*Math.sqrt(Math.pow(A,7)/(Math.pow(A,7)+0x16bcc41e9)),O=-1*Math.sin(2*z)*D;return Math.sqrt(Math.pow((d-l)/(e*L),2)+Math.pow(T/(t*P),2)+Math.pow(k/(r*I),2)+O*T/(t*P)*k/(r*I))}},eN=(e=1,t=1)=>{let r=E("lab65");return(i,n)=>{let a=r(i),o=a.l,s=a.a,l=a.b,c=Math.sqrt(s*s+l*l),u=Math.atan2(l,s);u+=2*Math.PI*(u<0);let h=r(n),d=h.l,f=h.a,p=h.b,m=Math.sqrt(f*f+p*p),g=Math.pow(o-d,2),y=Math.pow(c-m,2),v=Math.pow(s-f,2)+Math.pow(l-p,2)-y,x=Math.sqrt(Math.pow(c,4)/(Math.pow(c,4)+1900)),b=u>=164/180*Math.PI&&u<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(u+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(u+35/180*Math.PI)),_=.0638*c/(1+.0131*c)+.638;return Math.sqrt(g/Math.pow(e*(o<16?.511:.040975*o/(1+.01765*o)),2)+y/Math.pow(t*_,2)+v/Math.pow(_*(x*b+1-x),2))}},eU=()=>{let e=E("lab65");return(t,r)=>{let i=e(t),n=e(r),a=i.l-n.l,o=i.a-n.a,s=i.b-n.b;return Math.abs(a)+Math.sqrt(o*o+s*s)}},eV=()=>eR("yiq",[.5053,.299,.1957]),eq=()=>eR("itp",[518400,129600,518400]),eH=e=>{let t=e.reduce((e,t)=>{if(void 0!==t){let r=t*Math.PI/180;e.sin+=Math.sin(r),e.cos+=Math.cos(r)}return e},{sin:0,cos:0}),r=180*Math.atan2(t.sin,t.cos)/Math.PI;return r<0?360+r:r},eG=e=>{let t=e.filter(e=>void 0!==e);return t.length?t.reduce((e,t)=>e+t,0)/t.length:void 0};function eW(e,t="rgb",r){let i=O(t),n=e.map(E(t));return i.channels.reduce((e,t)=>{let a=n.map(e=>e[t]).filter(e=>void 0!==e);if(a.length){let n;n="function"==typeof r?r:r&&"function"==typeof r[t]?r[t]:i.average&&"function"==typeof i.average[t]?i.average[t]:eG,e[t]=n(a,t)}return e},{mode:t})}var eY={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:eP},toMode:{rgb:eI},interpolate:{h:{use:el,fixup:eM},s:el,l:el,alpha:{use:el,fixup:ec}},difference:{h:ez},average:{h:eH}},eZ=({l:e,a:t,b:r,alpha:i},n="lch")=>{void 0===t&&(t=0),void 0===r&&(r=0);let a=Math.sqrt(t*t+r*r),o={mode:n,l:e,c:a};return a&&(o.h=ew(180*Math.atan2(r,t)/Math.PI)),void 0!==i&&(o.alpha=i),o},e$=({l:e,c:t,h:r,alpha:i},n="lab")=>{void 0===r&&(r=0);let a={mode:n,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return void 0!==i&&(a.alpha=i),a},eX={X:.3457/.3585,Y:1,Z:.8251046025104602},eK={X:.3127/.329,Y:1,Z:.3583/.329},eJ=e=>Math.pow(e,3)>.008856451679035631?Math.pow(e,3):(116*e-16)/903.2962962962963,eQ=({l:e,a:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=(e+16)/116,a=t/500+n,o=n-r/200,s={mode:"xyz65",x:eJ(a)*eK.X,y:eJ(n)*eK.Y,z:eJ(o)*eK.Z};return void 0!==i&&(s.alpha=i),s},e0=e=>eb(eQ(e)),e1=e=>e>.008856451679035631?Math.cbrt(e):(903.2962962962963*e+16)/116,e2=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=e1(e/eK.X),a=e1(t/eK.Y),o={mode:"lab65",l:116*a-16,a:500*(n-a),b:200*(a-e1(r/eK.Z))};return void 0!==i&&(o.alpha=i),o},e3=e=>{let t=e2(ey(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},e5=26/180*Math.PI,e4=Math.cos(e5),e6=Math.sin(e5),e8=100/Math.log(1.39),e7=({l:e,c:t,h:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"lab65",l:(Math.exp(e/e8)-1)/.0039},a=(Math.exp(.0435*t*1)-1)/.075,o=a*Math.cos(r/180*Math.PI-e5),s=a*Math.sin(r/180*Math.PI-e5);return n.a=o*e4-s/.83*e6,n.b=o*e6+s/.83*e4,void 0!==i&&(n.alpha=i),n},e9=({l:e,a:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=t*e4+r*e6,a=.83*(r*e4-t*e6),o={mode:"dlch",l:e8/1*Math.log(1+.0039*e),c:Math.log(1+.075*Math.sqrt(n*n+a*a))/.0435};return o.c&&(o.h=ew((Math.atan2(a,n)+e5)/Math.PI*180)),void 0!==i&&(o.alpha=i),o},te=e=>e7(eZ(e,"dlch")),tt=e=>e$(e9(e),"dlab"),tr={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:te,rgb:e=>e0(te(e))},fromMode:{lab65:tt,rgb:e=>tt(e3(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:el,a:el,b:el,alpha:{use:el,fixup:ec}}},ti={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:e7,dlab:e=>e$(e,"dlab"),rgb:e=>e0(e7(e))},fromMode:{lab65:e9,dlab:e=>eZ(e,"dlch"),rgb:e=>e9(e3(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:el,c:el,h:{use:el,fixup:eM},alpha:{use:el,fixup:ec}},difference:{h:eO},average:{h:eH}};function tn({h:e,s:t,i:r,alpha:i}){e=ew(void 0!==e?e:0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-n)-1)),g:r*(1+t*(3*(1-n)/(2-n)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-n)/(2-n)-1)),g:r*(1+t*(3/(2-n)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-n)-1)),b:r*(1+t*(3*(1-n)/(2-n)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-n)/(2-n)-1)),b:r*(1+t*(3/(2-n)-1))};break;case 4:a={r:r*(1+t*(3*(1-n)/(2-n)-1)),g:r*(1-t),b:r*(1+t*(3/(2-n)-1))};break;case 5:a={r:r*(1+t*(3/(2-n)-1)),g:r*(1-t),b:r*(1+t*(3*(1-n)/(2-n)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",void 0!==i&&(a.alpha=i),a}function ta({r:e,g:t,b:r,alpha:i}){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),o={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return n-a!=0&&(o.h=(n===e?(t-r)/(n-a)+(t{let t=e.match(tc);if(!t)return;let r={mode:"hsl"};return void 0!==t[3]?r.h=+t[3]:void 0!==t[1]&&void 0!==t[2]&&(r.h=((e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return 360*e}})(t[1],t[2])),void 0!==t[4]&&(r.s=Math.min(Math.max(0,t[4]/100),1)),void 0!==t[5]&&(r.l=Math.min(Math.max(0,t[5]/100),1)),void 0!==t[6]?r.alpha=Math.max(0,Math.min(1,t[6]/100)):void 0!==t[7]&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},th=function(e,t){if(!t||"hsl"!==t[0]&&"hsla"!==t[0])return;let r={mode:"hsl"},[,i,n,a,o]=t;if(i.type!==H){if(i.type===q)return;r.h=i.value}if(n.type!==H){if("hue"===n.type)return;r.s=n.value/100}if(a.type!==H){if("hue"===a.type)return;r.l=a.value/100}return o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},td={mode:"hsl",toMode:{rgb:ts},fromMode:{rgb:tl},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[th,tu],serialize:e=>`hsl(${void 0!==e.h?e.h:"none"} ${void 0!==e.s?100*e.s+"%":"none"} ${void 0!==e.l?100*e.l+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:el,fixup:eM},s:el,l:el,alpha:{use:el,fixup:ec}},difference:{h:ez},average:{h:eH}};function tf({h:e,s:t,v:r,alpha:i}){e=ew(void 0!==e?e:0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r,g:r*(1-t*n),b:r*(1-t)};break;case 1:a={r:r*(1-t*n),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*n)};break;case 3:a={r:r*(1-t),g:r*(1-t*n),b:r};break;case 4:a={r:r*(1-t*n),g:r*(1-t),b:r};break;case 5:a={r:r,g:r*(1-t),b:r*(1-t*n)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",void 0!==i&&(a.alpha=i),a}function tp({r:e,g:t,b:r,alpha:i}){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),o={mode:"hsv",s:0===n?0:1-a/n,v:n};return n-a!=0&&(o.h=(n===e?(t-r)/(n-a)+(t1){let e=t+r;t/=e,r/=e}return tf({h:e,s:1===r?1:1-t/(1-r),v:1-r,alpha:i})}function ty(e){let t=tp(e);if(void 0===t)return;let r=void 0!==t.s?t.s:0,i=void 0!==t.v?t.v:0,n={mode:"hwb",w:(1-r)*i,b:1-i};return void 0!==t.h&&(n.h=t.h),void 0!==t.alpha&&(n.alpha=t.alpha),n}var tv=function(e,t){if(!t||"hwb"!==t[0])return;let r={mode:"hwb"},[,i,n,a,o]=t;if(i.type!==H){if(i.type===q)return;r.h=i.value}if(n.type!==H){if("hue"===n.type)return;r.w=n.value/100}if(a.type!==H){if("hue"===a.type)return;r.b=a.value/100}return o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},tx={mode:"hwb",toMode:{rgb:tg},fromMode:{rgb:ty},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[tv],serialize:e=>`hwb(${void 0!==e.h?e.h:"none"} ${void 0!==e.w?100*e.w+"%":"none"} ${void 0!==e.b?100*e.b+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:el,fixup:eM},w:el,b:el,alpha:{use:el,fixup:ec}},difference:{h:eD},average:{h:eH}};function tb(e){if(e<0)return 0;let t=Math.pow(e,.012683313515655966);return 1e4*Math.pow(Math.max(0,t-.8359375)/(18.8515625-18.6875*t),6.277394636015326)}function t_(e){if(e<0)return 0;let t=Math.pow(e/1e4,.1593017578125);return Math.pow((.8359375+18.8515625*t)/(1+18.6875*t),78.84375)}var tw=e=>Math.max(e/203,0),tT=({i:e,t:t,p:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=tb(e+.008609037037932761*t+.11102962500302593*r),a=tb(e-.00860903703793275*t-.11102962500302599*r),o=tb(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:tw(2.070152218389422*n-1.3263473389671556*a+.2066510476294051*o),y:tw(.3647385209748074*n+.680566024947227*a-.0453045459220346*o),z:tw(-.049747207535812*n-.0492609666966138*a+1.1880659249923042*o)};return void 0!==i&&(s.alpha=i),s},tM=(e=0)=>Math.max(203*e,0),tk=({x:e,y:t,z:r,alpha:i})=>{let n=tM(e),a=tM(t),o=tM(r),s=t_(.3592832590121217*n+.6976051147779502*a-.0358915932320289*o),l=t_(-.1920808463704995*n+1.1004767970374323*a+.0753748658519118*o),c=t_(.0070797844607477*n+.0748396662186366*a+.8433265453898765*o),u={mode:"itp",i:.5*s+.5*l,t:1.61376953125*s-3.323486328125*l+1.709716796875*c,p:4.378173828125*s-4.24560546875*l-.132568359375*c};return void 0!==i&&(u.alpha=i),u},tA={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:tT,rgb:e=>eb(tT(e))},fromMode:{xyz65:tk,rgb:e=>tk(ey(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:el,t:el,p:el,alpha:{use:el,fixup:ec}}},tS=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,.1593017578125);return Math.pow((.8359375+18.8515625*t)/(1+18.6875*t),134.03437499999998)},tE=(e=0)=>Math.max(203*e,0),tC=({x:e,y:t,z:r,alpha:i})=>{e=tE(e),t=tE(t);let n=1.15*e-.15*(r=tE(r)),a=.66*t+.34*e,o=tS(.41478972*n+.579999*a+.014648*r),s=tS(-.20151*n+1.120649*a+.0531008*r),l=tS(-.0166008*n+.2648*a+.6684799*r),c=(o+s)/2,u={mode:"jab",j:.44*c/(1-.56*c)-16295499532821565e-27,a:3.524*o-4.066708*s+.542708*l,b:.199076*o+1.096799*s-1.295875*l};return void 0!==i&&(u.alpha=i),u},tL=e=>{if(e<0)return 0;let t=Math.pow(e,.007460772656268216);return 1e4*Math.pow((.8359375-t)/(18.6875*t-18.8515625),6.277394636015326)},tP=({j:e,a:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=(e+16295499532821565e-27)/(.44+.56*(e+16295499532821565e-27)),a=tL(n+.13860504*t+.058047316*r),o=tL(n-.13860504*t-.058047316*r),s=tL(n-.096019242*t-.8118919*r),l={mode:"xyz65",x:(1.661373024652174*a-.914523081304348*o+.23136208173913045*s)/203,y:(-.3250758611844533*a+1.571847026732543*o-.21825383453227928*s)/203,z:(-.090982811*a-.31272829*o+1.5227666*s)/203};return void 0!==i&&(l.alpha=i),l},tI=e=>{let t=tC(ey(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},tz=e=>eb(tP(e)),tD={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:tI,xyz65:tC},toMode:{rgb:tz,xyz65:tP},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:el,a:el,b:el,alpha:{use:el,fixup:ec}}},tO=({j:e,a:t,b:r,alpha:i})=>{void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:n};return n&&(a.h=ew(180*Math.atan2(r,t)/Math.PI)),void 0!==i&&(a.alpha=i),a},tR=({j:e,c:t,h:r,alpha:i})=>{void 0===r&&(r=0);let n={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return void 0!==i&&(n.alpha=i),n},tF={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:tR,rgb:e=>tz(tR(e))},fromMode:{rgb:e=>tO(tI(e)),jab:tO},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:el,fixup:eM},c:el,j:el,alpha:{use:el,fixup:ec}},difference:{h:eO},average:{h:eH}},tj=e=>Math.pow(e,3)>.008856451679035631?Math.pow(e,3):(116*e-16)/903.2962962962963,tB=({l:e,a:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=(e+16)/116,a=t/500+n,o=n-r/200,s={mode:"xyz50",x:tj(a)*eX.X,y:tj(n)*eX.Y,z:tj(o)*eX.Z};return void 0!==i&&(s.alpha=i),s},tN=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=ex({r:3.1341359569958707*e-1.6173863321612538*t-.4906619460083532*r,g:-.978795502912089*e+1.916254567259524*t+.03344273116131949*r,b:.07195537988411677*e-.2289768264158322*t+1.405386058324125*r});return void 0!==i&&(n.alpha=i),n},tU=e=>tN(tB(e)),tV=e=>{let{r:t,g:r,b:i,alpha:n}=eg(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*i,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*i,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*i};return void 0!==n&&(a.alpha=n),a},tq=e=>e>.008856451679035631?Math.cbrt(e):(903.2962962962963*e+16)/116,tH=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=tq(e/eX.X),a=tq(t/eX.Y),o={mode:"lab",l:116*a-16,a:500*(n-a),b:200*(a-tq(r/eX.Z))};return void 0!==i&&(o.alpha=i),o},tG=e=>{let t=tH(tV(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},tW=function(e,t){if(!t||"lab"!==t[0])return;let r={mode:"lab"},[,i,n,a,o]=t;if("hue"!==i.type&&"hue"!==n.type&&"hue"!==a.type)return i.type!==H&&(r.l=Math.min(Math.max(0,i.value),100)),n.type!==H&&(r.a=n.type===V?n.value:125*n.value/100),a.type!==H&&(r.b=a.type===V?a.value:125*a.value/100),o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},tY={mode:"lab",toMode:{xyz50:tB,rgb:tU},fromMode:{xyz50:tH,rgb:tG},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[tW],serialize:e=>`lab(${void 0!==e.l?e.l:"none"} ${void 0!==e.a?e.a:"none"} ${void 0!==e.b?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:el,a:el,b:el,alpha:{use:el,fixup:ec}}},tZ=r(d({},tY),n({mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:eQ,rgb:e0},fromMode:{xyz65:e2,rgb:e3},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}})),t$=function(e,t){if(!t||"lch"!==t[0])return;let r={mode:"lch"},[,i,n,a,o]=t;if(i.type!==H){if("hue"===i.type)return;r.l=Math.min(Math.max(0,i.value),100)}if(n.type!==H&&(r.c=Math.max(0,n.type===V?n.value:150*n.value/100)),a.type!==H){if(a.type===q)return;r.h=a.value}return o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},tX={mode:"lch",toMode:{lab:e$,rgb:e=>tU(e$(e))},fromMode:{rgb:e=>eZ(tG(e)),lab:eZ},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[t$],serialize:e=>`lch(${void 0!==e.l?e.l:"none"} ${void 0!==e.c?e.c:"none"} ${void 0!==e.h?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:el,fixup:eM},c:el,l:el,alpha:{use:el,fixup:ec}},difference:{h:eO},average:{h:eH}},tK=r(d({},tX),n({mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>e$(e,"lab65"),rgb:e=>e0(e$(e,"lab65"))},fromMode:{rgb:e=>eZ(e3(e),"lch65"),lab65:e=>eZ(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}})),tJ=({l:e,u:t,v:r,alpha:i})=>{void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:n};return n&&(a.h=ew(180*Math.atan2(r,t)/Math.PI)),void 0!==i&&(a.alpha=i),a},tQ=({l:e,c:t,h:r,alpha:i})=>{void 0===r&&(r=0);let n={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return void 0!==i&&(n.alpha=i),n},t0=(e,t,r)=>4*e/(e+15*t+3*r),t1=(e,t,r)=>9*t/(e+15*t+3*r),t2=t0(eX.X,eX.Y,eX.Z),t3=t1(eX.X,eX.Y,eX.Z),t5=({x:e,y:t,z:r,alpha:i})=>{let n;void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let a=(n=t/eX.Y)<=.008856451679035631?903.2962962962963*n:116*Math.cbrt(n)-16,o=t0(e,t,r),s=t1(e,t,r);isFinite(o)&&isFinite(s)?(o=13*a*(o-t2),s=13*a*(s-t3)):a=o=s=0;let l={mode:"luv",l:a,u:o,v:s};return void 0!==i&&(l.alpha=i),l},t4=(i=eX.X,4*i/(i+15*eX.Y+3*eX.Z)),t6=(a=eX.X,9*(o=eX.Y)/(a+15*o+3*eX.Z)),t8=({l:e,u:t,v:r,alpha:i})=>{if(void 0===e&&(e=0),0===e)return{mode:"xyz50",x:0,y:0,z:0};void 0===t&&(t=0),void 0===r&&(r=0);let n=t/(13*e)+t4,a=r/(13*e)+t6,o=eX.Y*(e<=8?e/903.2962962962963:Math.pow((e+16)/116,3)),s={mode:"xyz50",x:9*n*o/(4*a),y:o,z:o*(12-3*n-20*a)/(4*a)};return void 0!==i&&(s.alpha=i),s},t7={mode:"lchuv",toMode:{luv:tQ,rgb:e=>tN(t8(tQ(e)))},fromMode:{rgb:e=>tJ(t5(tV(e))),luv:tJ},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:el,fixup:eM},c:el,l:el,alpha:{use:el,fixup:ec}},difference:{h:eO},average:{h:eH}},t9=r(d({},eu),n({mode:"lrgb",toMode:{rgb:ex},fromMode:{rgb:eg},parse:["srgb-linear"],serialize:"srgb-linear"})),re={mode:"luv",toMode:{xyz50:t8,rgb:e=>tN(t8(e))},fromMode:{xyz50:t5,rgb:e=>t5(tV(e))},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:el,u:el,v:el,alpha:{use:el,fixup:ec}}},rt=({r:e,g:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),o=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*n+.7936177747023054*a-.0040720430116193*o,a:1.9779985324311684*n-2.42859224204858*a+.450593709617411*o,b:.0259040424655478*n+.7827717124575296*a-.8086757549230774*o};return void 0!==i&&(s.alpha=i),s},rr=e=>{let t=rt(eg(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},ri=({l:e,a:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),a=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),o=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*n-3.3077115392580616*a+.2309699031821044*o,g:-1.2684379732850317*n+2.6097573492876887*a-.3413193760026573*o,b:-.0041960761386756*n-.7034186179359362*a+1.7076146940746117*o};return void 0!==i&&(s.alpha=i),s},rn=e=>ex(ri(e));function ra(e){return .5*(1.170873786407767*e-.206+Math.sqrt((1.170873786407767*e-.206)*(1.170873786407767*e-.206)+.14050485436893204*e))}function ro(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function rs(e,t){let r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x=(-1.88170328*e-.80936493*t>1?(r=1.19086277,i=1.76576728,n=.59662641,a=.75515197,o=.56771245,s=4.0767416621,l=-3.3077115913,c=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,i=-.45954404,n=.08285427,a=.1254107,o=.14503204,s=-1.2684380046,l=2.6097574011,c=-.3413193965):(r=1.35733652,i=-.00915799,n=-1.1513021,a=-.50559606,o=.00692167,s=-.0041960863,l=-.7034186147,c=1.707614701),u=r+i*e+n*t+a*e*e+o*e*t,h=.3963377774*e+.2158037573*t,d=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,y=s*((p=1+u*h)*p*p)+l*((m=1+u*d)*m*m)+c*((g=1+u*f)*g*g),u-=y*(v=3*h*p*p*s+3*d*m*m*l+3*f*g*g*c)/(v*v-.5*y*(6*h*h*p*s+6*d*d*m*l+6*f*f*g*c))),b=ri({l:1,a:x*e,b:x*t}),_=Math.cbrt(1/Math.max(b.r,b.g,b.b));return[_,_*x]}function rl(e,t,r=null){r||(r=rs(e,t));let i=r[0],n=r[1];return[n/i,n/(1-i)]}function rc(e,t,r){let i=rs(t,r),n=function(e,t,r,i,n=null){let a;if(n||(n=rs(e,t)),(r-i)*n[1]-(n[0]-i)*1<=0)a=n[1]*i/(+n[0]+n[1]*(i-r));else{a=n[1]*(i-1)/(+(n[0]-1)+n[1]*(i-r));{let n=r-i,o=.3963377774*e+.2158037573*t,s=-.1055613458*e-.0638541728*t,l=-.0894841775*e-1.291485548*t,c=n+ +o,u=n+ +s,h=n+ +l;{let e=i*(1-a)+a*r,t=+a,n=e+t*o,d=e+t*s,f=e+t*l,p=n*n*n,m=d*d*d,g=f*f*f,y=3*c*n*n,v=3*u*d*d,x=3*h*f*f,b=6*c*c*n,_=6*u*u*d,w=6*h*h*f,T=4.0767416621*p-3.3077115913*m+.2309699292*g-1,M=4.0767416621*y-3.3077115913*v+.2309699292*x,k=M/(M*M-.5*T*(4.0767416621*b-3.3077115913*_+.2309699292*w)),A=-T*k,S=-1.2684380046*p+2.6097574011*m-.3413193965*g-1,E=-1.2684380046*y+2.6097574011*v-.3413193965*x,C=E/(E*E-.5*S*(-1.2684380046*b+2.6097574011*_-.3413193965*w)),L=-S*C,P=-.0041960863*p-.7034186147*m+1.707614701*g-1,I=-.0041960863*y-.7034186147*v+1.707614701*x,z=I/(I*I-.5*P*(-.0041960863*b-.7034186147*_+1.707614701*w)),D=-P*z;a+=Math.min(A=k>=0?A:1e6,Math.min(L=C>=0?L:1e6,D=z>=0?D:1e6))}}}return a}(t,r,e,e,i),a=rl(t,r,i),o=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),l=n/Math.min(e*a[0],(1-e)*a[1]),c=e*o,u=(1-e)*s,h=.9*l*Math.sqrt(Math.sqrt(1/(1/(c*c*c*c)+1/(u*u*u*u))));return[Math.sqrt(1/(1/((c=.4*e)*c)+1/((u=(1-e)*.8)*u))),h,n]}function ru(e){let t=void 0!==e.l?e.l:0,r=void 0!==e.a?e.a:0,i=void 0!==e.b?e.b:0,n={mode:"okhsl",l:ra(t)};void 0!==e.alpha&&(n.alpha=e.alpha);let a=Math.sqrt(r*r+i*i);if(!a)return n.s=0,n;let[o,s,l]=rc(t,r/a,i/a),c;if(aru(rr(e))},toMode:{oklab:rh,rgb:e=>rn(rh(e))}}));function rf(e){let t=void 0!==e.l?e.l:0,r=void 0!==e.a?e.a:0,i=void 0!==e.b?e.b:0,n=Math.sqrt(r*r+i*i),a=n?r/n:1,o=n?i/n:1,[s,l]=rl(a,o),c=l/(n+t*l),u=c*t,h=c*n,d=ro(u),f=h*d/u,p=ri({l:d,a:a*f,b:o*f}),m=Math.cbrt(1/Math.max(p.r,p.g,p.b,0));t/=m;let g={mode:"okhsv",s:(n=n/m*ra(t)/t)?(.5+l)*h/(.5*l+l*(1-.5/s)*h):0,v:(t=ra(t))?t/u:0};return g.s&&(g.h=ew(180*Math.atan2(i,r)/Math.PI)),void 0!==e.alpha&&(g.alpha=e.alpha),g}function rp(e){let t={mode:"oklab"};void 0!==e.alpha&&(t.alpha=e.alpha);let r=void 0!==e.h?e.h:0,i=void 0!==e.s?e.s:0,n=void 0!==e.v?e.v:0,a=Math.cos(r/180*Math.PI),o=Math.sin(r/180*Math.PI),[s,l]=rl(a,o),c=1-.5/s,u=1-.5*i/(.5+l-l*c*i),h=i*l*.5/(.5+l-l*c*i),d=ro(u),f=h*d/u,p=ri({l:d,a:a*f,b:o*f}),m=Math.cbrt(1/Math.max(p.r,p.g,p.b,0)),g=ro(n*u),y=h*g/u;return t.l=g*m,t.a=y*a*m,t.b=y*o*m,t}var rm=r(d({},tm),n({mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:rf,rgb:e=>rf(rr(e))},toMode:{oklab:rp,rgb:e=>rn(rp(e))}})),rg=function(e,t){if(!t||"oklab"!==t[0])return;let r={mode:"oklab"},[,i,n,a,o]=t;if("hue"!==i.type&&"hue"!==n.type&&"hue"!==a.type)return i.type!==H&&(r.l=Math.min(Math.max(0,i.type===V?i.value:i.value/100),1)),n.type!==H&&(r.a=n.type===V?n.value:.4*n.value/100),a.type!==H&&(r.b=a.type===V?a.value:.4*a.value/100),o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},ry=r(d({},tY),n({mode:"oklab",toMode:{lrgb:ri,rgb:rn},fromMode:{lrgb:rt,rgb:rr},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[rg],serialize:e=>`oklab(${void 0!==e.l?e.l:"none"} ${void 0!==e.a?e.a:"none"} ${void 0!==e.b?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`})),rv=function(e,t){if(!t||"oklch"!==t[0])return;let r={mode:"oklch"},[,i,n,a,o]=t;if(i.type!==H){if("hue"===i.type)return;r.l=Math.min(Math.max(0,i.type===V?i.value:i.value/100),1)}if(n.type!==H&&(r.c=Math.max(0,n.type===V?n.value:.4*n.value/100)),a.type!==H){if(a.type===q)return;r.h=a.value}return o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},rx=r(d({},tX),n({mode:"oklch",toMode:{oklab:e=>e$(e,"oklab"),rgb:e=>rn(e$(e,"oklab"))},fromMode:{rgb:e=>eZ(rr(e),"oklch"),oklab:e=>eZ(e,"oklch")},parse:[rv],serialize:e=>`oklch(${void 0!==e.l?e.l:"none"} ${void 0!==e.c?e.c:"none"} ${void 0!==e.h?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}})),rb=e=>{let{r:t,g:r,b:i,alpha:n}=eg(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*i,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*i,z:0*t+.0451133818589026*r+1.043944368900976*i};return void 0!==n&&(a.alpha=n),a},r_=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=ex({r:2.4934969119414263*e-.9313836179191242*t-.402710784450717*r,g:-.8294889695615749*e+1.7626640603183465*t+.0236246858419436*r,b:.0358458302437845*e-.0761723892680418*t+.9568845240076871*r},"p3");return void 0!==i&&(n.alpha=i),n},rw=r(d({},eu),n({mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>r_(ey(e)),xyz65:r_},toMode:{rgb:e=>eb(rb(e)),xyz65:rb}})),rT=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},rM=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"prophoto",r:rT(1.3457868816471585*e-.2555720873797946*t-.0511018649755453*r),g:rT(-.5446307051249019*e+1.5082477428451466*t+.0205274474364214*r),b:rT(0*e+0*t+1.2119675456389452*r)};return void 0!==i&&(n.alpha=i),n},rk=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},rA=e=>{let t=rk(e.r),r=rk(e.g),i=rk(e.b),n={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*i,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*i,z:0*t+0*r+.8251046025104602*i};return void 0!==e.alpha&&(n.alpha=e.alpha),n},rS=r(d({},eu),n({mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:rM,rgb:e=>rM(tV(e))},toMode:{xyz50:rA,rgb:e=>tN(rA(e))}})),rE=e=>{let t=Math.abs(e);return t>.018053968510807?(Math.sign(e)||1)*(1.09929682680944*Math.pow(t,.45)-(1.09929682680944-1)):4.5*e},rC=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"rec2020",r:rE(1.7166511879712683*e-.3556707837763925*t-.2533662813736599*r),g:rE(-.6666843518324893*e+1.6164812366349395*t+.0157685458139111*r),b:rE(.0176398574453108*e-.0427706132578085*t+.9421031212354739*r)};return void 0!==i&&(n.alpha=i),n},rL=(e=0)=>{let t=Math.abs(e);return t<.08124285829863151?e/4.5:(Math.sign(e)||1)*Math.pow((t+1.09929682680944-1)/1.09929682680944,1/.45)},rP=e=>{let t=rL(e.r),r=rL(e.g),i=rL(e.b),n={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*i,y:.262700212011267*t+.6779980715188708*r+.059301716469862*i,z:0*t+.0280726930490874*r+1.0609850577107909*i};return void 0!==e.alpha&&(n.alpha=e.alpha),n},rI=r(d({},eu),n({mode:"rec2020",fromMode:{xyz65:rC,rgb:e=>rC(ey(e))},toMode:{xyz65:rP,rgb:e=>eb(rP(e))},parse:["rec2020"],serialize:"rec2020"})),rz=Math.cbrt(.0037930732552754493),rD=e=>Math.cbrt(e)-rz,rO=e=>{let{r:t,g:r,b:i,alpha:n}=eg(e),a=rD(.3*t+.622*r+.078*i+.0037930732552754493),o=rD(.23*t+.692*r+.078*i+.0037930732552754493),s={mode:"xyb",x:(a-o)/2,y:(a+o)/2,b:rD(.2434226892454782*t+.2047674442449682*r+.5518098665095535*i+.0037930732552754493)-(a+o)/2};return void 0!==n&&(s.alpha=n),s},rR=e=>Math.pow(e+rz,3),rF=({x:e,y:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=rR(e+t)-.0037930732552754493,a=rR(t-e)-.0037930732552754493,o=rR(r+t)-.0037930732552754493,s=ex({r:11.031566904639861*n-9.866943908131562*a-.16462299650829934*o,g:-3.2541473810744237*n+4.418770377582723*a-.16462299650829934*o,b:-3.6588512867136815*n+2.7129230459360922*a+1.9459282407775895*o});return void 0!==i&&(s.alpha=i),s},rj={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:rF},fromMode:{rgb:rO},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:el,y:el,b:el,alpha:{use:el,fixup:ec}}},rB={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:tN,lab:tH},fromMode:{rgb:tV,lab:tB},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:el,y:el,z:el,alpha:{use:el,fixup:ec}}},rN=e=>{let{x:t,y:r,z:i,alpha:n}=e;void 0===t&&(t=0),void 0===r&&(r=0),void 0===i&&(i=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*i,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*i,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*i};return void 0!==n&&(a.alpha=n),a},rU=e=>{let{x:t,y:r,z:i,alpha:n}=e;void 0===t&&(t=0),void 0===r&&(r=0),void 0===i&&(i=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*i,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*i,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*i};return void 0!==n&&(a.alpha=n),a},rV={mode:"xyz65",toMode:{rgb:eb,xyz50:rN},fromMode:{rgb:ey,xyz50:rU},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:el,y:el,z:el,alpha:{use:el,fixup:ec}}},rq=({r:e,g:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return void 0!==i&&(n.alpha=i),n},rH=({y:e,i:t,q:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return void 0!==i&&(n.alpha=i),n},rG={mode:"yiq",toMode:{rgb:rH},fromMode:{rgb:rq},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:el,i:el,q:el,alpha:{use:el,fixup:ec}}},rW=(e=4)=>t=>{let r;return"number"==typeof t?Math.round(t*(r=Math.pow(10,r=e)))/r:t},rY=rW(2),rZ=e=>Math.max(0,Math.min(1,e||0)),r$=e=>Math.round(255*rZ(e)),rX=E("rgb"),rK=E("hsl"),rJ=e=>{if(void 0!==e)return"#"+(0x1000000|r$(e.r)<<16|r$(e.g)<<8|r$(e.b)).toString(16).slice(1)},rQ=e=>{if(void 0===e)return;let t=r$(void 0!==e.alpha?e.alpha:1);return rJ(e)+(256|t).toString(16).slice(1)},r0=e=>{if(void 0===e)return;let t=r$(e.r),r=r$(e.g),i=r$(e.b);return void 0===e.alpha||1===e.alpha?`rgb(${t}, ${r}, ${i})`:`rgba(${t}, ${r}, ${i}, ${rY(rZ(e.alpha))})`},r1=e=>{if(void 0===e)return;let t=rY(e.h||0),r=rY(100*rZ(e.s))+"%",i=rY(100*rZ(e.l))+"%";return void 0===e.alpha||1===e.alpha?`hsl(${t}, ${r}, ${i})`:`hsla(${t}, ${r}, ${i}, ${rY(rZ(e.alpha))})`},r2=e=>{let t=S(e);if(!t)return;let r=O(t.mode);if(!r.serialize||"string"==typeof r.serialize){let e=`color(${r.serialize||`--${t.mode}`} `;return r.channels.forEach((r,i)=>{"alpha"!==r&&(e+=(i?" ":"")+(void 0!==t[r]?t[r]:"none"))}),void 0!==t.alpha&&t.alpha<1&&(e+=` / ${t.alpha}`),e+")"}if("function"==typeof r.serialize)return r.serialize(t)},r3=e=>rJ(rX(e)),r5=e=>rQ(rX(e)),r4=e=>r0(rX(e)),r6=e=>r1(rK(e)),r8={normal:(e,t)=>t,multiply:(e,t)=>e*t,screen:(e,t)=>e+t-e*t,"hard-light":(e,t)=>t<.5?2*e*t:2*t*(1-e)-1,overlay:(e,t)=>e<.5?2*t*e:2*e*(1-t)-1,darken:(e,t)=>Math.min(e,t),lighten:(e,t)=>Math.max(e,t),"color-dodge":(e,t)=>0===e?0:1===t?1:Math.min(1,e/(1-t)),"color-burn":(e,t)=>1===e?1:0===t?0:1-Math.min(1,(1-e)/t),"soft-light":(e,t)=>t<.5?e-(1-2*t)*e*(1-e):e+(2*t-1)*((e<.25?((16*e-12)*e+4)*e:Math.sqrt(e))-e),difference:(e,t)=>Math.abs(e-t),exclusion:(e,t)=>e+t-2*e*t},r7=(e,t="normal",r="rgb")=>{let i="function"==typeof t?t:r8[t],n=E(r),a=O(r).channels;return e.map(e=>{let t=n(e);return void 0===t.alpha&&(t.alpha=1),t}).reduce((e,t)=>{if(void 0===e)return t;let n=t.alpha+e.alpha*(1-t.alpha);return a.reduce((r,a)=>("alpha"!==a&&(0===n?r[a]=0:(r[a]=t.alpha*(1-e.alpha)*t[a]+t.alpha*e.alpha*i(e[a],t[a])+(1-t.alpha)*e.alpha*e[a],r[a]=Math.max(0,Math.min(1,r[a]/n)))),r),{mode:r,alpha:n})})},r9=(e="rgb",t={})=>{let r=O(e),i=Object.keys(t).reduce((e,r)=>{let i=t[r];return e[r]=Array.isArray(i)?i:[i,i],e},{});return r.channels.reduce((e,t)=>((i.alpha||"alpha"!==t)&&(e[t]=(([e,t])=>e+Math.random()*(t-e))(i[t]||r.ranges[t])),e),{mode:e})},ie=(e,t="rgb",r=!1)=>{let i=t?O(t).channels:null,n=t?E(t):S;return a=>{let o=n(a);if(!o)return;let s=(i||O(o.mode).channels).reduce((r,i)=>{let n=e(o[i],i,o,t);return void 0===n||isNaN(n)||(r[i]=n),r},{mode:o.mode});if(!r)return s;let l=S(a);return l&&l.mode!==s.mode?E(l.mode)(s):s}},it=(e,t,r)=>"alpha"!==t?(e||0)*(void 0!==r.alpha?r.alpha:1):e,ir=(e,t,r)=>"alpha"!==t&&0!==r.alpha?(e||0)/(void 0!==r.alpha?r.alpha:1):e,ii=(e=1,t=0)=>(r,i)=>"alpha"!==i?r*e+t:r,ia=(e=1,t=1,r=0)=>(i,n)=>"alpha"!==n?e*Math.pow(i,t)+r:i,io=(e=.5)=>t=>e<=0?1:e>=1?0:Math.pow(t,Math.log(.5)/Math.log(e)),is=(e,t="rgb",r,i)=>{let n=O(t),a=E(t),o=[],s=[],l={};e.forEach(e=>{Array.isArray(e)?(o.push(a(e[0])),s.push(e[1])):"number"==typeof e||"function"==typeof e?l[s.length]=e:(o.push(a(e)),s.push(void 0))}),(e=>{void 0===e[0]&&(e[0]=0),void 0===e[e.length-1]&&(e[e.length-1]=1);let t=1,r,i,n,a;for(;t{let i,a,s;return i=r&&"object"==typeof r&&(a=r[t])&&"object"==typeof a&&r[t].fixup?r[t].fixup:(s=n.interpolate[t])&&"object"==typeof s&&n.interpolate[t].fixup?n.interpolate[t].fixup:e=>e,e[t]=i(o.map(e=>e[t])),e},{});if(i){let e=o.map((e,r)=>n.channels.reduce((e,t)=>(e[t]=c[t][r],e),{mode:t}));c=n.channels.reduce((r,n)=>(r[n]=e.map(e=>{let r=i(e[n],n,e,t);return isNaN(r)?void 0:r}),r),{})}let u=n.channels.reduce((e,t)=>{let i,a,o;return"function"==typeof r?i=r:r&&"object"==typeof r&&"function"==typeof r[t]?i=r[t]:r&&"object"==typeof r&&(a=r[t])&&"object"==typeof a&&r[t].use?i=r[t].use:"function"==typeof n.interpolate[t]?i=n.interpolate[t]:(o=n.interpolate[t])&&"object"==typeof o&&(i=n.interpolate[t].use),e[t]=i(c[t]),e},{}),h=o.length-1;return e=>{if((e=Math.min(Math.max(0,e),1))<=s[0])return o[0];if(e>s[h])return o[h];let r=0;for(;s[r]{let r=u[t](f);return void 0!==r&&(e[t]=r),e},{mode:t})}},il=(e,t="rgb",r)=>is(e,t,r),ic=(e,t)=>(r,i="rgb",n)=>{let a=t?ie(t,i):void 0,o=is(r,i,n,e);return a?e=>a(o(e)):o},iu=ic(it,ir),ih=(e,t,r,i,n)=>{let a=n*n,o=a*n;return((1-3*n+3*a-o)*e+(4-6*a+3*o)*t+(1+3*n+3*a-3*o)*r+o*i)/6},id=e=>t=>{let r=e.length-1,i=t>=1?r-1:Math.max(0,Math.floor(t*r));return ih(i>0?e[i-1]:2*e[i]-e[i+1],e[i],e[i+1],it=>{let r,i,n,a,o=e.length-1,s=Math.floor(t*o);return ih(e[(s-1+(r=e.length))%r],e[(s+(i=e.length))%i],e[(s+1+(n=e.length))%n],e[(s+2+(a=e.length))%a],(t-s/o)*o)},im=e=>{let t,r=e.length-1,i=Array(r),n=Array(r),a=Array(r);for(i[1]=1/4,n[1]=(6*e[1]-e[0])/4,t=2;t0&&(a[r-1]=n[r-1]),t=r-2;t>0;--t)a[t]=n[t]-i[t]*a[t+1];return a},ig=e=>id(im(e)),iy=e=>ip(im(e)),iv=Math.sign,ix=Math.min,ib=Math.abs,i_=e=>{let t=e.length-1,r=[],i=[],n=[];for(let a=0;a0?.5*(e[a+1]-e[a-1])*t:void 0),n.push(a>0?(iv(r[a-1])+iv(r[a]))*ix(ib(r[a-1]),ib(r[a]),.5*ib(i[a])):void 0);return[r,i,n]},iw=(e,t,r)=>{let i=e.length-1,n=i*i;return a=>{let o;o=a>=1?i-1:Math.max(0,Math.floor(a*i));let s=a-o/i,l=s*s;return(t[o]+t[o+1]-2*r[o])*n*(l*s)+(3*r[o]-2*t[o]-t[o+1])*i*l+t[o]*s+e[o]}},iT=e=>{if(e.length<3)return el(e);let t=e.length-1,[r,,i]=i_(e);return i[0]=r[0],i[t]=r[t-1],iw(e,i,r)},iM=e=>{if(e.length<3)return el(e);let t=e.length-1,[r,i,n]=i_(e);return i[0]=(2*e[1]-1.5*e[0]-.5*e[2])*t,i[t]=(1.5*e[t]-2*e[t-1]+.5*e[t-2])*t,n[0]=i[0]*r[0]<=0?0:ib(i[0])>2*ib(r[0])?2*r[0]:i[0],n[t]=i[t]*r[t-1]<=0?0:ib(i[t])>2*ib(r[t-1])?2*r[t-1]:i[t],iw(e,n,r)},ik=e=>{let t=e.length-1,[r,i,n]=i_(e);i[0]=.5*(e[1]-e[t])*t,i[t]=.5*(e[0]-e[t-1])*t;let a=(e[0]-e[t])*t;return n[0]=(iv(a)+iv(r[0]))*ix(ib(a),ib(r[0]),.5*ib(i[0])),n[t]=(iv(r[t-1])+iv(a))*ix(ib(r[t-1]),ib(a),.5*ib(i[t])),iw(e,n,r)},iA=(e=1)=>1===e?e=>e:t=>Math.pow(t,e),iS=(e=2,t=1)=>{let r=iA(t);if(e<2)return e<1?[]:[r(.5)];let i=[];for(let t=0;t{let t={mode:e.mode,r:Math.max(0,Math.min(void 0!==e.r?e.r:0,1)),g:Math.max(0,Math.min(void 0!==e.g?e.g:0,1)),b:Math.max(0,Math.min(void 0!==e.b?e.b:0,1))};return void 0!==e.alpha&&(t.alpha=e.alpha),t},iL=e=>iC(iE(e)),iP=e=>void 0!==e&&(void 0===e.r||e.r>=0&&e.r<=1)&&(void 0===e.g||e.g>=0&&e.g<=1)&&(void 0===e.b||e.b>=0&&e.b<=1);function iI(e){return iP(iE(e))}function iz(e="rgb"){let{gamut:t}=O(e);if(!t)return e=>!0;let r=E("string"==typeof t?t:e);return e=>iP(r(e))}function iD(e){return void 0===(e=S(e))||iI(e)?e:E(e.mode)(iL(e))}function iO(e="rgb"){let{gamut:t}=O(e);if(!t)return e=>S(e);let r="string"==typeof t?t:e,i=E(r),n=iz(r);return e=>{let t=S(e);if(!t)return;let r=i(t);if(n(r))return t;let a=iC(r);return t.mode===a.mode?a:E(t.mode)(a)}}function iR(e,t="lch",i="rgb"){e=S(e);let a="rgb"===i?iI:iz(i),o="rgb"===i?iL:iO(i);if(void 0===e||a(e))return e;let s=E(e.mode),l=r(d({},e=E(t)(e)),n({c:0}));if(!a(l))return s(o(l));let c=0,u=void 0!==e.c?e.c:0,h=O(t).ranges.c,f=(h[1]-h[0])/8192,p=l.c;for(;u-c>f;)l.c=c+(u-c)*.5,a(l)?(p=l.c,c=l.c):u=l.c;return s(a(l)?l:r(d({},l),n({c:p})))}function iF(e="rgb",t="oklch",i=eR("oklch"),a=.02){let o=E(e),s=O(e);if(!s.gamut)return e=>o(e);let l=iz(e),c=iO(e),u=E(t),{ranges:h}=O(t);if(!h.l||!h.c)throw Error("LCH-like space expected");return t=>{if(void 0===(t=S(t)))return;let f=d({},u(t));if(void 0===f.l&&(f.l=0),void 0===f.c&&(f.c=0),f.l>=h.l[1]){let i=r(d({},s.white),n({mode:e}));return void 0!==t.alpha&&(i.alpha=t.alpha),i}if(f.l<=h.l[0]){let i=r(d({},s.black),n({mode:e}));return void 0!==t.alpha&&(i.alpha=t.alpha),i}if(l(f))return o(f);let p=0,m=f.c,g=(h.c[1]-h.c[0])/4e3,y=c(f);for(;m-p>g;)f.c=(p+m)*.5,y=c(f),l(f)||i&&a>0&&i(f,y)<=a?p=f.c:m=f.c;return o(l(f)?f:y)}}var ij=(e,t=eR(),r=e=>e)=>{let i=e.map((e,t)=>({color:r(e),i:t}));return(r,n=1,a=1/0)=>(isFinite(n)&&(n=Math.max(1,Math.min(n,i.length-1))),i.forEach(e=>{e.d=t(r,e.color)}),i.sort((e,t)=>e.d-t.d).slice(0,n).filter(e=>e.de[t.i]))},iB=e=>Math.max(Math.min(e,1),0),iN=(e,t,r=!1)=>{let i=E(t),n=O(t).channels;return a=>{let o=i(a);if(!o)return;let s={mode:t},l,c=n.length;for(let t=0;tie(ii(Math.max(e,0)),t,!0),iV=(e=1,t="rgb")=>{let r=Math.max(e,0);return ie(ii(r,(1-r)/2),t,!0)},iq=(e=1,t="rgb")=>{let r;return iN([.393+.607*(r=1-iB(e)),.769-.769*r,.189-.189*r,0,.349-.349*r,.686+.314*r,.168-.168*r,0,.272-.272*r,.534-.534*r,.131+.869*r,0,0,0,0,1],t,!0)},iH=(e=1,t="rgb")=>{let r;return iN([.213+.787*(r=Math.max(e,0)),.715-.715*r,.072-.072*r,0,.213-.213*r,.715+.285*r,.072-.072*r,0,.213-.213*r,.715-.715*r,.072+.928*r,0,0,0,0,1],t,!0)},iG=(e=1,t="rgb")=>{let r;return iN([.2126+.7874*(r=1-iB(e)),.7152-.7152*r,.0722-.0722*r,0,.2126-.2126*r,.7152+.2848*r,.0722-.0722*r,0,.2126-.2126*r,.7152-.7152*r,.0722+.9278*r,0,0,0,0,1],t,!0)},iW=(e=1,t="rgb")=>{let r=iB(e);return ie((e,t)=>{let i;return"alpha"===t?e:(i=1-r,void 0===r||void 0===i?void 0:r+e*(i-r))},t,!0)},iY=(e=0,t="rgb")=>{let r,i,n;return iN([.213+.787*(i=Math.cos(r=Math.PI*e/180))-.213*(n=Math.sin(r)),.715-.715*i-.715*n,.072-.072*i+.928*n,0,.213-.213*i+.143*n,.715+.285*i+.14*n,.072-.072*i-.283*n,0,.213-.213*i-.787*n,.715-.715*i+.715*n,.072+.928*i+.072*n,0,0,0,0,1],t,!0)},iZ=E("rgb"),i$=[[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]],iX=[[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]],iK=[[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]],iJ=(e,t)=>{let r=Math.max(0,Math.min(1,t)),i=Math.round(r/.1),n=Math.round(r%.1),a=e[i];if(n>0&&iei(a[r],t[r],n))}return e=>{let t=S(e);if(void 0===t)return;let{r:r,g:i,b:n}=iZ(t),o={mode:"rgb",r:a[0]*r+a[1]*i+a[2]*n,g:a[3]*r+a[4]*i+a[5]*n,b:a[6]*r+a[7]*i+a[8]*n};return void 0!==t.alpha&&(o.alpha=t.alpha),E(t.mode)(o)}},iQ=(e=1)=>iJ(i$,e),i0=(e=1)=>iJ(iX,e),i1=(e=1)=>iJ(iK,e),i2=e=>e*e*(3-2*e),i3=e=>.5-Math.sin(Math.asin(1-2*e)/3),i5=e=>e*e*e*(e*(6*e-15)+10),i4=e=>(1-Math.cos(e*Math.PI))/2;function i6(e){let t=E("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function i8(e,t){let r=i6(e),i=i6(t);return(Math.max(r,i)+.05)/(Math.min(r,i)+.05)}var i7=D(e_),i9=D(eY),ne=D(tr),nt=D(ti),nr=D(to),ni=D(td),nn=D(tm),na=D(tx),no=D(tA),ns=D(tD),nl=D(tF),nc=D(tY),nu=D(tZ),nh=D(tX),nd=D(tK),nf=D(t7),np=D(t9),nm=D(re),ng=D(rd),ny=D(rm),nv=D(ry),nx=D(rx),nb=D(rw),n_=D(rS),nw=D(rI),nT=D(eu),nM=D(rj),nk=D(rB),nA=D(rV),nS=D(rG)}}),X=p({"src/plot_api/plot_config.js"(e,t){var r={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},i={};(function e(t,r){for(var i in t){var n=t[i];n.valType?r[i]=n.dflt:(r[i]||(r[i]={}),e(n,r[i]))}})(r,i),t.exports={configAttributes:r,dfltConfig:i}}}),K=p({"src/lib/notifier.js"(e,t){var r=T(),i=C(),n=[];t.exports=function(e,t,a){if((null==(o=a?._context)?void 0:o.displayNotifier)!==!1&&-1===n.indexOf(e)){n.push(e);var o,s=1e3;i(t)?s=t:"long"===t&&(s=3e3);var l=r.select("body").selectAll(".plotly-notifier").data([0]);l.enter().append("div").classed("plotly-notifier",!0),l.selectAll(".notifier-note").data(n).enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(e){var i=r.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",function(){i.transition().call(c)});for(var n=i.append("p"),a=e.split(//g),o=0;o1){var t=["LOG:"];for(e=0;e1){var n=[];for(e=0;e"),"long")}},n.warn=function(){var e;if(r.logging>0){var t=["WARN:"];for(e=0;e0){var n=[];for(e=0;e"),"stick")}},n.error=function(){var e;if(r.logging>0){var t=["ERROR:"];for(e=0;e0){var n=[];for(e=0;e"),"stick")}}}}),Q=p({"src/components/color/attributes.js"(e){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}}),ee=p({"src/components/color/index.js"(e,t){var{converter:i,formatHex:a,formatRgb:o,wcagContrast:s,wcagLuminance:l}=$(),{isArrayOrTypedArray:c}=z(),{warn:u}=J(),{background:h,defaultLine:f,defaults:p,lightLine:m}=Q(),g=i("rgb"),y=i("hsl"),v=e=>{if("string"!=typeof e)return;let t=e.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(t))try{return g(t)}catch{return}},x=e=>e>0?e>1?1:e:0,b={mode:"rgb",r:0,g:0,b:0,alpha:1},_=e=>Math.round(255e6*e)/255e6,w=e=>r(d({},e),n({r:_(e.r),g:_(e.g),b:_(e.b)})),T=e=>o(w(e)),M=(e,t)=>{let r=v(e);return r?(null!=r.alpha||(r.alpha=1),r):(t||null==e||u(`Invalid color specifier: "${e}". Defaulting to "#000"`),b)},k=e=>T(r(d({},M(e)),n({alpha:1}))),A=e=>c(e)&&e.length>2&&Number.isFinite(e[0])&&Number.isFinite(e[1])&&Number.isFinite(e[2]),S=(e,t)=>{let r=M(e),i=r.alpha;if(1===i)return T(r);let n=M(t||h),a=n.alpha,o=(e,t)=>(1===a?t:1-a+t*a)*(1-i)+e*i;return T({mode:"rgb",r:o(r.r,n.r),g:o(r.g,n.g),b:o(r.b,n.b)})},E=(e,t)=>{let i=M(e),a=y(i)||{mode:"hsl",h:0,s:0,l:0};return T(g(r(d({},a),n({l:x((100*a.l+t)/100),alpha:i.alpha}))))},C=(e,t)=>s(M(e),M(t)),L=e=>C(e,h)>C(e,f),P=T(M(h)),I=T(M(f));t.exports={addOpacity:(e,t)=>T(r(d({},M(e)),n({alpha:x(t)}))),adjustLightness:E,background:h,brighten:(e,t)=>{t=0===t?0:t||10;let i=M(e),a=t/100;return T(r(d({},i),n({r:x(i.r+a),g:x(i.g+a),b:x(i.b+a)})))},combine:S,contrast:(e,t,r)=>(1!==M(e).alpha&&(e=S(e,h)),L(e)?t?E(e,t):P:r?E(e,-r):I),defaultLine:f,defaults:p,equals:(e,t)=>!!(e&&t&&k(e)===k(t)),fill:(e,t)=>{e.style({fill:k(t),"fill-opacity":M(t).alpha})},hexString:e=>a(w(M(e))).toUpperCase(),interpolate:(e,t,r)=>{let i=M(e),n=M(t),a=(e,t)=>r*e+(1-r)*t;return T({mode:"rgb",r:a(i.r,n.r),g:a(i.g,n.g),b:a(i.b,n.b)})},isChannelArray:A,isDark:L,isValid:e=>void 0!==v(e),lightLine:m,luminosity:e=>{let t=M(e);return l({mode:"rgb",r:x(t.r),g:x(t.g),b:x(t.b)})},mix:(e,t,r)=>{let i=M(e),n=M(t),a=r/100,o=n.alpha-i.alpha,s=2*a-1,l=((s*o==-1?s:(s+o)/(1+s*o))+1)/2,c=1-l,u=(e,t)=>c*e+l*t;return T({mode:"rgb",r:u(i.r,n.r),g:u(i.g,n.g),b:u(i.b,n.b),alpha:i.alpha*(1-a)+n.alpha*a})},mostReadable:(e,t=["#000","#fff"])=>{let r,i=-1/0;for(let n of t){let t=C(e,n);t>i&&(i=t,r=T(M(n)))}return r},normalize:(e,t)=>{let r=A(e)?(e=>{let[t,r,i,n]=e,a=Math.max(t,r,i)>1?1/255:1,o=n??1;return{mode:"rgb",r:t*a,g:r*a,b:i*a,alpha:o>1?o/255:o}})(e):M(e,!0),i=[x(r.r),x(r.g),x(r.b),x(r.alpha)];return"uint8"===t||"uint8_clamped"===t?Uint8Array.from(i,e=>Math.round(255*e)):"float32"===t?Float32Array.from(i):"float64"===t?Float64Array.from(i):i},opacity:e=>e?M(e).alpha:0,parse:M,rgb:k,rgbaArray:e=>{let t=M(e);return[255*x(t.r),255*x(t.g),255*x(t.b),x(t.alpha)]},rgbaArrayToString:([e,t,r,i])=>T({mode:"rgb",r:e/255,g:t/255,b:r/255,alpha:i}),rgbaString:e=>T(M(e)),stroke:(e,t)=>{e.style({stroke:k(t),"stroke-opacity":M(t).alpha})},wcagContrast:C}}}),et=p({"src/components/colorscale/scales.js"(e,t){var r=ee(),i={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)"]]},n=i.RdBu;function a(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||0!=+e[0][0]||1!=+e[e.length-1][0])return!1;for(var i=0;ien});var ea,eo=f({"src/lib/regex.ts"(){ea="([2-9]|[1-9][0-9]+)?"}}),es=p({"src/lib/coerce.js"(e){var t=C(),r=q().extendFlat,i=Z(),n=et(),a=ee(),o=er().DESELECTDIM,s=D(),l=(eo(),v(ei)).counter,c=(V(),v(B)).modHalf,u=z().isArrayOrTypedArray,h=z().isTypedArraySpec,d=z().decodeTypedArraySpec;function f(t,r){var i=e.valObjectMeta[r.valType];if(r.arrayOk&&u(t))return!0;if(i.validateFunction)return i.validateFunction(t,r);var n={},a=n;return i.coerceFunction(t,{set:function(e){a=e}},n,r),a!==n}e.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(u(e)?e:h(e)?d(e):r)}},enumerated:{coerceFunction:function(e,t,r,i){i.coerceNumber&&(e*=1),-1===i.values.indexOf(e)?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e*=1);for(var r=t.values,i=0;i!0===e||!1===e;n(e)||i.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(n)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,r,i,n){h(e)&&(e=d(e)),!t(e)||void 0!==n.min&&en.max?r.set(i):r.set(+e)}},integer:{coerceFunction:function(e,r,i,n){-1!==(n.extras||[]).indexOf(e)?r.set(e):(h(e)&&(e=d(e)),e%1||!t(e)||void 0!==n.min&&en.max?r.set(i):r.set(+e))}},string:{coerceFunction:function(e,t,r,i){if("string"!=typeof e){var n="number"==typeof e;!0!==i.strict&&n?t.set(String(e)):t.set(r)}else i.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){h(e)&&(e=d(e)),a.isValid(e)?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){Array.isArray(e)&&e.length&&e.every(e=>a.isValid(e))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(n.get(e,r))}},angle:{coerceFunction:function(e,r,i){h(e)&&(e=d(e)),"auto"===e?r.set("auto"):t(e)?r.set(c(+e,360)):r.set(i)}},subplotid:{coerceFunction:function(e,t,r,i){var n=i.regex||l(r);let a=e=>"string"==typeof e&&n.test(e);a(e)||i.arrayOk&&u(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"==typeof e&&!!l(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,i){if(-1!==(i.extras||[]).indexOf(e))return void t.set(e);if("string"!=typeof e)return void t.set(r);for(var n=e.split("+"),a=0;aMath.abs(P)?null:(E*=P=1/P,C*=P,L*=P,n=Math.sin(r),o=1-(a=Math.cos(r)),s=t[0],l=t[1],c=t[2],u=t[3],h=t[4],d=t[5],f=t[6],p=t[7],m=t[8],g=t[9],y=t[10],v=t[11],x=E*E*o+a,b=C*E*o+L*n,_=L*E*o-C*n,w=E*C*o-L*n,T=C*C*o+a,M=L*C*o+E*n,k=E*L*o+C*n,A=C*L*o-E*n,S=L*L*o+a,e[0]=s*x+h*b+m*_,e[1]=l*x+d*b+g*_,e[2]=c*x+f*b+y*_,e[3]=u*x+p*b+v*_,e[4]=s*w+h*T+m*M,e[5]=l*w+d*T+g*M,e[6]=c*w+f*T+y*M,e[7]=u*w+p*T+v*M,e[8]=s*k+h*A+m*S,e[9]=l*k+d*A+g*S,e[10]=c*k+f*A+y*S,e[11]=u*k+p*A+v*S,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}}}),ew=p({"node_modules/gl-mat4/rotateX.js"(e,t){t.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*n+c*i,e[5]=o*n+u*i,e[6]=s*n+h*i,e[7]=l*n+d*i,e[8]=c*n-a*i,e[9]=u*n-o*i,e[10]=h*n-s*i,e[11]=d*n-l*i,e}}}),eT=p({"node_modules/gl-mat4/rotateY.js"(e,t){t.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n-c*i,e[1]=o*n-u*i,e[2]=s*n-h*i,e[3]=l*n-d*i,e[8]=a*i+c*n,e[9]=o*i+u*n,e[10]=s*i+h*n,e[11]=l*i+d*n,e}}}),eM=p({"node_modules/gl-mat4/rotateZ.js"(e,t){t.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],h=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n+c*i,e[1]=o*n+u*i,e[2]=s*n+h*i,e[3]=l*n+d*i,e[4]=c*n-a*i,e[5]=u*n-o*i,e[6]=h*n-s*i,e[7]=d*n-l*i,e}}}),ek=p({"node_modules/gl-mat4/fromRotation.js"(e,t){t.exports=function(e,t,r){var i,n,a,o=r[0],s=r[1],l=r[2],c=Math.sqrt(o*o+s*s+l*l);return 1e-6>Math.abs(c)?null:(o*=c=1/c,s*=c,l*=c,i=Math.sin(t),a=1-(n=Math.cos(t)),e[0]=o*o*a+n,e[1]=s*o*a+l*i,e[2]=l*o*a-s*i,e[3]=0,e[4]=o*s*a-l*i,e[5]=s*s*a+n,e[6]=l*s*a+o*i,e[7]=0,e[8]=o*l*a+s*i,e[9]=s*l*a-o*i,e[10]=l*l*a+n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}}}),eA=p({"node_modules/gl-mat4/fromRotationTranslation.js"(e,t){t.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=i+i,l=n+n,c=a+a,u=i*s,h=i*l,d=i*c,f=n*l,p=n*c,m=a*c,g=o*s,y=o*l,v=o*c;return e[0]=1-(f+m),e[1]=h+v,e[2]=d-y,e[3]=0,e[4]=h-v,e[5]=1-(u+m),e[6]=p+g,e[7]=0,e[8]=d+y,e[9]=p-g,e[10]=1-(u+f),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}}}),eS=p({"node_modules/gl-mat4/fromScaling.js"(e,t){t.exports=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),eE=p({"node_modules/gl-mat4/fromTranslation.js"(e,t){t.exports=function(e,t){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]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}}}),eC=p({"node_modules/gl-mat4/fromXRotation.js"(e,t){t.exports=function(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),eL=p({"node_modules/gl-mat4/fromYRotation.js"(e,t){t.exports=function(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),eP=p({"node_modules/gl-mat4/fromZRotation.js"(e,t){t.exports=function(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=i,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}}}),eI=p({"node_modules/gl-mat4/fromQuat.js"(e,t){t.exports=function(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r+r,s=i+i,l=n+n,c=r*o,u=i*o,h=i*s,d=n*o,f=n*s,p=n*l,m=a*o,g=a*s,y=a*l;return e[0]=1-h-p,e[1]=u+y,e[2]=d-g,e[3]=0,e[4]=u-y,e[5]=1-c-p,e[6]=f+m,e[7]=0,e[8]=d+g,e[9]=f-m,e[10]=1-c-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),ez=p({"node_modules/gl-mat4/frustum.js"(e,t){t.exports=function(e,t,r,i,n,a,o){var s=1/(r-t),l=1/(n-i),c=1/(a-o);return e[0]=2*a*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*a*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(n+i)*l,e[10]=(o+a)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*c,e[15]=0,e}}}),eD=p({"node_modules/gl-mat4/perspective.js"(e,t){t.exports=function(e,t,r,i,n){var a=1/Math.tan(t/2),o=1/(i-n);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+i)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*i*o,e[15]=0,e}}}),eO=p({"node_modules/gl-mat4/perspectiveFromFieldOfView.js"(e,t){t.exports=function(e,t,r,i){var n=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),c=2/(n+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(n-a)*c*.5,e[10]=i/(r-i),e[11]=-1,e[12]=0,e[13]=0,e[14]=i*r/(r-i),e[15]=0,e}}}),eR=p({"node_modules/gl-mat4/ortho.js"(e,t){t.exports=function(e,t,r,i,n,a,o){var s=1/(t-r),l=1/(i-n),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(n+i)*l,e[14]=(o+a)*c,e[15]=1,e}}}),eF=p({"node_modules/gl-mat4/lookAt.js"(e,t){var r=ef();t.exports=function(e,t,i,n){var a,o,s,l,c,u,h,d,f,p,m=t[0],g=t[1],y=t[2],v=n[0],x=n[1],b=n[2],_=i[0],w=i[1],T=i[2];return 1e-6>Math.abs(m-_)&&1e-6>Math.abs(g-w)&&1e-6>Math.abs(y-T)?r(e):(p=1/Math.sqrt((h=m-_)*h+(d=g-w)*d+(f=y-T)*f),h*=p,d*=p,f*=p,(p=Math.sqrt((a=x*f-b*d)*a+(o=b*h-v*f)*o+(s=v*d-x*h)*s))?(a*=p=1/p,o*=p,s*=p):(a=0,o=0,s=0),(p=Math.sqrt((l=d*s-f*o)*l+(c=f*a-h*s)*c+(u=h*o-d*a)*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0),e[0]=a,e[1]=l,e[2]=h,e[3]=0,e[4]=o,e[5]=c,e[6]=d,e[7]=0,e[8]=s,e[9]=u,e[10]=f,e[11]=0,e[12]=-(a*m+o*g+s*y),e[13]=-(l*m+c*g+u*y),e[14]=-(h*m+d*g+f*y),e[15]=1,e)}}}),ej=p({"node_modules/gl-mat4/str.js"(e,t){t.exports=function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}}}),eB=p({"node_modules/gl-mat4/index.js"(e,t){t.exports={create:eu(),clone:eh(),copy:ed(),identity:ef(),transpose:ep(),invert:em(),adjoint:eg(),determinant:ey(),multiply:ev(),translate:ex(),scale:eb(),rotate:e_(),rotateX:ew(),rotateY:eT(),rotateZ:eM(),fromRotation:ek(),fromRotationTranslation:eA(),fromScaling:eS(),fromTranslation:eE(),fromXRotation:eC(),fromYRotation:eL(),fromZRotation:eP(),fromQuat:eI(),frustum:ez(),perspective:eD(),perspectiveFromFieldOfView:eO(),ortho:eR(),lookAt:eF(),str:ej()}}}),eN=p({"src/lib/matrix.js"(e){var t=eB();e.init2dArray=function(e,t){for(var r=Array(e),i=0;id({valType:"string",dflt:"",editType:e},!1!==t?{arrayOk:!0}:{}),e.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>d({valType:"string",dflt:"",editType:e},!1!==t?{arrayOk:!0}:{}),e.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e}),e.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})}}),eY=p({"src/components/shapes/label_texttemplate.js"(e,t){function r(e,t){return t?t.d2l(e):e}function i(e){return e.x0shift||0}function n(e){return e.x1shift||0}function a(e){return e.y0shift||0}function o(e){return e.y1shift||0}function s(e,t){return r(e.x1,t)+n(e)-r(e.x0,t)-i(e)}function l(e,t,i){return r(e.y1,i)+o(e)-r(e.y0,i)-a(e)}t.exports={x0:function(e){return e.x0},x1:function(e){return e.x1},y0:function(e){return e.y0},y1:function(e){return e.y1},slope:function(e,t,r){return"line"!==e.type?void 0:l(e,t,r)/s(e,t)},dx:s,dy:l,width:function(e,t){return Math.abs(s(e,t))},height:function(e,t,r){return Math.abs(l(e,t,r))},length:function(e,t,r){return"line"!==e.type?void 0:Math.sqrt(Math.pow(s(e,t),2)+Math.pow(l(e,t,r),2))},xcenter:function(e,t){var a;return a=(r(e.x1,t)+n(e)+r(e.x0,t)+i(e))/2,t?t.l2d(a):a},ycenter:function(e,t,i){var n;return n=(r(e.y1,i)+o(e)+r(e.y0,i)+a(e))/2,i?i.l2d(n):n},simpleXVariables:["x0","x1","y0","y1","dy","height","ycenter"],simpleYVariables:["x0","x1","y0","y1","dx","width","xcenter"]}}}),eZ=p({"src/components/shapes/draw_newshape/attributes.js"(e,t){var r=eq().overrideAll,i=Z(),n=H(),a=eH().dash,o=q().extendFlat,{shapeTexttemplateAttrs:s,templatefallbackAttrs:l}=eW(),c=eY();t.exports=r({newshape:{visible:o({},i.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:o({},i.legend,{}),legendgroup:o({},i.legendgroup,{}),legendgrouptitle:{text:o({},i.legendgrouptitle.text,{}),font:n({})},legendrank:o({},i.legendrank,{}),legendwidth:o({},i.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:o({},a,{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:o({},i.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:s({newshape:!0},{keys:Object.keys(c)}),texttemplatefallback:l({editType:"arraydraw"}),font:n({}),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")}}),e$=p({"src/components/selections/draw_newselection/attributes.js"(e,t){var r=eH().dash;t.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:(0,q().extendFlat)({},r,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),eX=p({"src/plots/pad_attributes.js"(e,t){t.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}}}),eK=p({"src/plots/layout_attributes.js"(e,t){var r=H(),i=eV(),n=Q(),a=eZ(),o=e$(),s=eX(),l=q().extendFlat,c=r({editType:"calc"});c.family.dflt='"Open Sans", verdana, arial, sans-serif',c.size.dflt=12,c.color.dflt=n.defaultLine,t.exports={font:c,title:{text:{valType:"string",editType:"layoutstyle"},font:r({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:r({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:l(s({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:n.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:n.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:n.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:a.newshape,activeshape:a.activeshape,newselection:o.newselection,activeselection:o.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:l({},i.transition,{editType:"none"})}}}),eJ=p({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var e=document.createElement("style");e.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",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{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:\"\";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:\"\";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}",document.head.appendChild(e)}}}),eQ=p({"src/registry.js"(e){var t=J(),r=el(),i=ec(),n=(eU().addStyleRule,q()),a=Z(),o=eK(),s=n.extendFlat,l=n.extendDeepAll;function c(t){if(t.layoutAttributes){var r=t.layoutAttributes._arrayAttrRegexps;if(r)for(var n=0;n=t&&i<=r?i:l}if("string"!=typeof i&&"number"!=typeof i)return l;i=String(i);var v=b(n),_=i.charAt(0);v&&("G"===_||"g"===_)&&(i=i.slice(1),n="");var w=v&&"chinese"===n.slice(0,7),T=i.match(w?y:g);if(!T)return l;var M=T[1],k=T[3]||"1",A=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),C=Number(T[11]||0);if(v){if(2===M.length)return l;M=Number(M);try{var L,P=p.getComponentMethod("calendars","getCal")(n);if(w){var I="i"===k.charAt(k.length-1);k=parseInt(k,10),L=P.newDate(M,P.toMonthIndex(M,k,I),A)}else L=P.newDate(M,Number(k),A)}catch{return l}return L?(L.toJD()-f)*c+S*u+E*h+C*d:l}M=2===M.length?(Number(M)+2e3-x)%100+x:Number(M);var z=new Date(Date.UTC(2e3,k-=1,A,S,E));return z.setUTCFullYear(M),z.getUTCMonth()!==k||z.getUTCDate()!==A?l:z.getTime()+C*d},t=e.MIN_MS=e.dateTime2ms("-9999"),r=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(t,r){return e.dateTime2ms(t,r)!==l};var w=90*c,T=3*u,M=5*h;function A(e,t,r,i,n){if((t||r||i||n)&&(e+=" "+_(t,2)+":"+_(r,2),(i||n)&&(e+=":"+_(i,2),n))){for(var a=4;n%10==0;)a-=1,n/=10;e+="."+_(n,a)}return e}e.ms2DateTime=function(e,i,n){if("number"!=typeof e||!(e>=t&&e<=r))return l;i||(i=0);var a,s,g,y,v,x,_=Math.floor(10*o(e+.05,1)),k=Math.round(e-_/10);if(b(n)){var S=Math.floor(k/c)+f,E=Math.floor(o(e,c));try{a=p.getComponentMethod("calendars","getCal")(n).fromJD(S).formatDate("yyyy-mm-dd")}catch{a=m("G%Y-%m-%d")(new Date(k))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.slice(1);else for(;a.length<10;)a="0"+a;s=i=t+c&&e<=r-c))return l;var n=Math.floor(10*o(e+.05,1)),a=new Date(Math.round(e-n/10));return A(i("%Y-%m-%d")(a),a.getHours(),a.getMinutes(),a.getSeconds(),10*a.getUTCMilliseconds()+n)},e.cleanDate=function(t,r,i){if(t===l)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(b(i))return a.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,i))return a.error("unrecognized date",t),r;return t};var S=/%\d?f/g,E=/%h/g,P={1:"1",2:"1",3:"2",4:"2"};function I(e,t,r,i){e=e.replace(S,function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).slice(2).replace(/0+$/,"")||"0"});var n=new Date(Math.floor(t+.05));if(e=e.replace(E,function(){return P[r("%q")(n)]}),b(i))try{e=p.getComponentMethod("calendars","worldCalFmt")(e,t,i)}catch{return"Invalid"}return r(e)(n)}var z=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(e,t,r,i,a,s){if(a=b(a)&&a,!t)if("y"===r)t=s.year;else if("m"===r)t=s.month;else{if("d"!==r)return function(e,t){var r=o(e+.05,c),i=_(Math.floor(r/u),2)+":"+_(o(Math.floor(r/h),60),2);if("M"!==t){n(t)||(t=0);var a=(100+Math.min(o(e/d,60),z[t])).toFixed(t).slice(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),i+=":"+a}return i}(e,r)+` +`||" "===t[W]||" "===t[W]);)W++;if(Y(t)&&"hue"!==(e=X(t)).type){r.push({type:G,value:e});continue}if(Z(t)&&"none"===J(t)){r.push({type:G,value:{type:H,value:void 0}});continue}return}if(/\d/.test(i)){W--,r.push(X(t));continue}if(j.test(i)){W--,r.push(function(e){let t=J(e);return"("===e[W]?(W++,{type:N,value:t}):"none"===t?{type:H,value:void 0}:{type:U,value:t}}(t));continue}return}return r}(e),r=t?function(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==N)return;let i=Q(e,t);if(i)return i.unshift(r.value),i}(t,!0):void 0,i,n=0,a=P.length;for(;n"transparent"===e?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,ei=(e,t,r)=>e+r*(t-e),en=(e,t,r)=>(r-e)/(t-e),ea=(e,t,r,i,n,a)=>ei(ei(e,t,n),ei(r,i,n),a),eo=(e,t,r,i,n,a,o,s,l,c,u)=>ei(ea(e,t,r,i,l,c),ea(n,a,o,s,l,c),u),es=e=>t=>{let r=(e=>{let t=[];for(let r=0;r{let i=t*r.length,n=t>=1?r.length-1:Math.max(Math.floor(i),0),a=r[n];return void 0===a?void 0:e(a[0],a[1],i-n)}},el=es(ei),ec=e=>{let t=!1,r=e.map(e=>void 0!==e?(t=!0,e):1);return t?r:e},eu={mode:"rgb",channels:["r","g","b","alpha"],parse:[et,y,A,m,er,"srgb"],serialize:"srgb",interpolate:{r:el,g:el,b:el,alpha:{use:el,fixup:ec}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},eh=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),ed=e=>{let t=eh(e.r),r=eh(e.g),i=eh(e.b),n={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*i,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*i,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*i};return void 0!==e.alpha&&(n.alpha=e.alpha),n},ef=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),ep=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"a98",r:ef(2.0415879038107465*e-.5650069742788597*t-.3447313507783297*r),g:ef(-.9692436362808798*e+1.8759675015077206*t+.0415550574071756*r),b:ef(.0134442806320312*e-.1183623922310184*t+1.0151749943912058*r)};return void 0!==i&&(n.alpha=i),n},em=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},eg=({r:e,g:t,b:r,alpha:i})=>{let n={mode:"lrgb",r:em(e),g:em(t),b:em(r)};return void 0!==i&&(n.alpha=i),n},ey=e=>{let{r:t,g:r,b:i,alpha:n}=eg(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*i,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*i,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*i};return void 0!==n&&(a.alpha=n),a},ev=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):12.92*e},ex=({r:e,g:t,b:r,alpha:i},n="rgb")=>{let a={mode:n,r:ev(e),g:ev(t),b:ev(r)};return void 0!==i&&(a.alpha=i),a},eb=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=ex({r:3.2409699419045226*e-1.537383177570094*t-.4986107602930034*r,g:-.9692436362808796*e+1.8759675015077204*t+.0415550574071756*r,b:.0556300796969936*e-.2039769588889765*t+1.0569715142428784*r});return void 0!==i&&(n.alpha=i),n},e_=r(d({},eu),n({mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>ep(ey(e)),xyz65:ep},toMode:{rgb:e=>eb(ed(e)),xyz65:ed}})),ew=e=>(e%=360)<0?e+360:e,eT=(e,t)=>e.map((r,i,n)=>{if(void 0===r)return r;let a=ew(r);return 0===i||void 0===e[i-1]?a:t(a-ew(n[i-1]))}).reduce((e,t)=>(e.length&&void 0!==t&&void 0!==e[e.length-1]?e.push(t+e[e.length-1]):e.push(t),e),[]),eM=e=>eT(e,e=>180>=Math.abs(e)?e:e-360*Math.sign(e)),ek=e=>eT(e,e=>Math.abs(e)>=180||0===e?e:e-360*Math.sign(e)),eA=e=>eT(e,e=>e>=0?e:e+360),eS=e=>eT(e,e=>e<=0?e:e-360),eE=Math.PI/180,eC=180/Math.PI,eL=-1.78277*.29227-.1347134789,eP=({r:e,g:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=(eL*r+-1.7884503806*e-3.5172982438*t)/(eL+-1.7884503806-3.5172982438),a=r-n,o=-((1.97294*(t-n)- -.29227*a)/.90649),s={mode:"cubehelix",l:n,s:0===n||1===n?void 0:Math.sqrt(a*a+o*o)/(1.97294*n*(1-n))};return s.s&&(s.h=Math.atan2(o,a)*eC-120),void 0!==i&&(s.alpha=i),s},eI=({h:e,s:t,l:r,alpha:i})=>{let n={mode:"rgb"};e=(void 0===e?0:e+120)*eE,void 0===r&&(r=0);let a=void 0===t?0:t*r*(1-r),o=Math.cos(e),s=Math.sin(e);return n.r=r+a*(-.14861*o+1.78277*s),n.g=r+a*(-.29227*o+-.90649*s),n.b=r+a*(1.97294*o+0*s),void 0!==i&&(n.alpha=i),n},ez=(e,t)=>{if(void 0===e.h||void 0===t.h||!e.s||!t.s)return 0;let r=ew(e.h),i=Math.sin((ew(t.h)-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*i},eD=(e,t)=>{if(void 0===e.h||void 0===t.h)return 0;let r=ew(e.h),i=ew(t.h);return Math.abs(i-r)>180?r-(i-360*Math.sign(i-r)):i-r},eO=(e,t)=>{if(void 0===e.h||void 0===t.h||!e.c||!t.c)return 0;let r=ew(e.h),i=Math.sin((ew(t.h)-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*i},eR=(e="rgb",t=[1,1,1,0])=>{let r=O(e),i=r.channels,n=r.difference,a=E(e);return(e,r)=>{let o=a(e),s=a(r);return Math.sqrt(i.reduce((e,r,i)=>{let a=n[r]?n[r](o,s):o[r]-s[r];return e+(t[i]||0)*Math.pow(isNaN(a)?0:a,2)},0))}},eF=()=>eR("lab65"),ej=(e=1,t=.045,r=.015)=>{let i=E("lab65");return(n,a)=>{let o=i(n),s=i(a),l=o.l,c=o.a,u=o.b,h=Math.sqrt(c*c+u*u),d=s.l,f=s.a,p=s.b,m=Math.pow(h-Math.sqrt(f*f+p*p),2),g=Math.pow(c-f,2)+Math.pow(u-p,2)-m;return Math.sqrt(Math.pow(l-d,2)/Math.pow(e,2)+m/Math.pow(1+t*h,2)+g/Math.pow(1+r*h,2))}},eB=(e=1,t=1,r=1)=>{let i=E("lab65");return(n,a)=>{let o=i(n),s=i(a),l=o.l,c=o.a,u=o.b,h=Math.sqrt(c*c+u*u),d=s.l,f=s.a,p=s.b,m=(h+Math.sqrt(f*f+p*p))/2,g=.5*(1-Math.sqrt(Math.pow(m,7)/(Math.pow(m,7)+0x16bcc41e9))),y=c*(1+g),v=f*(1+g),x=Math.sqrt(y*y+u*u),b=Math.sqrt(v*v+p*p),_=Math.abs(y)+Math.abs(u)===0?0:Math.atan2(u,y);_+=(_<0)*2*Math.PI;let w=Math.abs(v)+Math.abs(p)===0?0:Math.atan2(p,v);w+=(w<0)*2*Math.PI;let T=b-x,M=x*b==0?0:w-_;M-=(M>Math.PI)*2*Math.PI,M+=(M<-Math.PI)*2*Math.PI;let k=2*Math.sqrt(x*b)*Math.sin(M/2),A=(x+b)/2,S;x*b==0?S=_+w:(S=(_+w)/2-(Math.abs(_-w)>Math.PI)*Math.PI,S+=(S<0)*2*Math.PI);let E=Math.pow((l+d)/2-50,2),C=1-.17*Math.cos(S-Math.PI/6)+.24*Math.cos(2*S)+.32*Math.cos(3*S+Math.PI/30)-.2*Math.cos(4*S-63*Math.PI/180),L=1+.015*E/Math.sqrt(20+E),P=1+.045*A,I=1+.015*A*C,z=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*S-275)/25,2)),D=2*Math.sqrt(Math.pow(A,7)/(Math.pow(A,7)+0x16bcc41e9)),O=-1*Math.sin(2*z)*D;return Math.sqrt(Math.pow((d-l)/(e*L),2)+Math.pow(T/(t*P),2)+Math.pow(k/(r*I),2)+O*T/(t*P)*k/(r*I))}},eN=(e=1,t=1)=>{let r=E("lab65");return(i,n)=>{let a=r(i),o=a.l,s=a.a,l=a.b,c=Math.sqrt(s*s+l*l),u=Math.atan2(l,s);u+=2*Math.PI*(u<0);let h=r(n),d=h.l,f=h.a,p=h.b,m=Math.sqrt(f*f+p*p),g=Math.pow(o-d,2),y=Math.pow(c-m,2),v=Math.pow(s-f,2)+Math.pow(l-p,2)-y,x=Math.sqrt(Math.pow(c,4)/(Math.pow(c,4)+1900)),b=u>=164/180*Math.PI&&u<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(u+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(u+35/180*Math.PI)),_=.0638*c/(1+.0131*c)+.638;return Math.sqrt(g/Math.pow(e*(o<16?.511:.040975*o/(1+.01765*o)),2)+y/Math.pow(t*_,2)+v/Math.pow(_*(x*b+1-x),2))}},eU=()=>{let e=E("lab65");return(t,r)=>{let i=e(t),n=e(r),a=i.l-n.l,o=i.a-n.a,s=i.b-n.b;return Math.abs(a)+Math.sqrt(o*o+s*s)}},eV=()=>eR("yiq",[.5053,.299,.1957]),eq=()=>eR("itp",[518400,129600,518400]),eH=e=>{let t=e.reduce((e,t)=>{if(void 0!==t){let r=t*Math.PI/180;e.sin+=Math.sin(r),e.cos+=Math.cos(r)}return e},{sin:0,cos:0}),r=180*Math.atan2(t.sin,t.cos)/Math.PI;return r<0?360+r:r},eG=e=>{let t=e.filter(e=>void 0!==e);return t.length?t.reduce((e,t)=>e+t,0)/t.length:void 0};function eW(e,t="rgb",r){let i=O(t),n=e.map(E(t));return i.channels.reduce((e,t)=>{let a=n.map(e=>e[t]).filter(e=>void 0!==e);if(a.length){let n;n="function"==typeof r?r:r&&"function"==typeof r[t]?r[t]:i.average&&"function"==typeof i.average[t]?i.average[t]:eG,e[t]=n(a,t)}return e},{mode:t})}var eY={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:eP},toMode:{rgb:eI},interpolate:{h:{use:el,fixup:eM},s:el,l:el,alpha:{use:el,fixup:ec}},difference:{h:ez},average:{h:eH}},eZ=({l:e,a:t,b:r,alpha:i},n="lch")=>{void 0===t&&(t=0),void 0===r&&(r=0);let a=Math.sqrt(t*t+r*r),o={mode:n,l:e,c:a};return a&&(o.h=ew(180*Math.atan2(r,t)/Math.PI)),void 0!==i&&(o.alpha=i),o},e$=({l:e,c:t,h:r,alpha:i},n="lab")=>{void 0===r&&(r=0);let a={mode:n,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return void 0!==i&&(a.alpha=i),a},eX={X:.3457/.3585,Y:1,Z:.8251046025104602},eK={X:.3127/.329,Y:1,Z:.3583/.329},eJ=e=>Math.pow(e,3)>.008856451679035631?Math.pow(e,3):(116*e-16)/903.2962962962963,eQ=({l:e,a:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=(e+16)/116,a=t/500+n,o=n-r/200,s={mode:"xyz65",x:eJ(a)*eK.X,y:eJ(n)*eK.Y,z:eJ(o)*eK.Z};return void 0!==i&&(s.alpha=i),s},e0=e=>eb(eQ(e)),e1=e=>e>.008856451679035631?Math.cbrt(e):(903.2962962962963*e+16)/116,e2=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=e1(e/eK.X),a=e1(t/eK.Y),o={mode:"lab65",l:116*a-16,a:500*(n-a),b:200*(a-e1(r/eK.Z))};return void 0!==i&&(o.alpha=i),o},e3=e=>{let t=e2(ey(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},e5=26/180*Math.PI,e4=Math.cos(e5),e6=Math.sin(e5),e8=100/Math.log(1.39),e9=({l:e,c:t,h:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"lab65",l:(Math.exp(e/e8)-1)/.0039},a=(Math.exp(.0435*t*1)-1)/.075,o=a*Math.cos(r/180*Math.PI-e5),s=a*Math.sin(r/180*Math.PI-e5);return n.a=o*e4-s/.83*e6,n.b=o*e6+s/.83*e4,void 0!==i&&(n.alpha=i),n},e7=({l:e,a:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=t*e4+r*e6,a=.83*(r*e4-t*e6),o={mode:"dlch",l:e8/1*Math.log(1+.0039*e),c:Math.log(1+.075*Math.sqrt(n*n+a*a))/.0435};return o.c&&(o.h=ew((Math.atan2(a,n)+e5)/Math.PI*180)),void 0!==i&&(o.alpha=i),o},te=e=>e9(eZ(e,"dlch")),tt=e=>e$(e7(e),"dlab"),tr={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:te,rgb:e=>e0(te(e))},fromMode:{lab65:tt,rgb:e=>tt(e3(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:el,a:el,b:el,alpha:{use:el,fixup:ec}}},ti={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:e9,dlab:e=>e$(e,"dlab"),rgb:e=>e0(e9(e))},fromMode:{lab65:e7,dlab:e=>eZ(e,"dlch"),rgb:e=>e7(e3(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:el,c:el,h:{use:el,fixup:eM},alpha:{use:el,fixup:ec}},difference:{h:eO},average:{h:eH}};function tn({h:e,s:t,i:r,alpha:i}){e=ew(void 0!==e?e:0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-n)-1)),g:r*(1+t*(3*(1-n)/(2-n)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-n)/(2-n)-1)),g:r*(1+t*(3/(2-n)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-n)-1)),b:r*(1+t*(3*(1-n)/(2-n)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-n)/(2-n)-1)),b:r*(1+t*(3/(2-n)-1))};break;case 4:a={r:r*(1+t*(3*(1-n)/(2-n)-1)),g:r*(1-t),b:r*(1+t*(3/(2-n)-1))};break;case 5:a={r:r*(1+t*(3/(2-n)-1)),g:r*(1-t),b:r*(1+t*(3*(1-n)/(2-n)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",void 0!==i&&(a.alpha=i),a}function ta({r:e,g:t,b:r,alpha:i}){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),o={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return n-a!=0&&(o.h=(n===e?(t-r)/(n-a)+(t{let t=e.match(tc);if(!t)return;let r={mode:"hsl"};return void 0!==t[3]?r.h=+t[3]:void 0!==t[1]&&void 0!==t[2]&&(r.h=((e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return 360*e}})(t[1],t[2])),void 0!==t[4]&&(r.s=Math.min(Math.max(0,t[4]/100),1)),void 0!==t[5]&&(r.l=Math.min(Math.max(0,t[5]/100),1)),void 0!==t[6]?r.alpha=Math.max(0,Math.min(1,t[6]/100)):void 0!==t[7]&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},th=function(e,t){if(!t||"hsl"!==t[0]&&"hsla"!==t[0])return;let r={mode:"hsl"},[,i,n,a,o]=t;if(i.type!==H){if(i.type===q)return;r.h=i.value}if(n.type!==H){if("hue"===n.type)return;r.s=n.value/100}if(a.type!==H){if("hue"===a.type)return;r.l=a.value/100}return o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},td={mode:"hsl",toMode:{rgb:ts},fromMode:{rgb:tl},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[th,tu],serialize:e=>`hsl(${void 0!==e.h?e.h:"none"} ${void 0!==e.s?100*e.s+"%":"none"} ${void 0!==e.l?100*e.l+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:el,fixup:eM},s:el,l:el,alpha:{use:el,fixup:ec}},difference:{h:ez},average:{h:eH}};function tf({h:e,s:t,v:r,alpha:i}){e=ew(void 0!==e?e:0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r,g:r*(1-t*n),b:r*(1-t)};break;case 1:a={r:r*(1-t*n),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*n)};break;case 3:a={r:r*(1-t),g:r*(1-t*n),b:r};break;case 4:a={r:r*(1-t*n),g:r*(1-t),b:r};break;case 5:a={r:r,g:r*(1-t),b:r*(1-t*n)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",void 0!==i&&(a.alpha=i),a}function tp({r:e,g:t,b:r,alpha:i}){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),o={mode:"hsv",s:0===n?0:1-a/n,v:n};return n-a!=0&&(o.h=(n===e?(t-r)/(n-a)+(t1){let e=t+r;t/=e,r/=e}return tf({h:e,s:1===r?1:1-t/(1-r),v:1-r,alpha:i})}function ty(e){let t=tp(e);if(void 0===t)return;let r=void 0!==t.s?t.s:0,i=void 0!==t.v?t.v:0,n={mode:"hwb",w:(1-r)*i,b:1-i};return void 0!==t.h&&(n.h=t.h),void 0!==t.alpha&&(n.alpha=t.alpha),n}var tv=function(e,t){if(!t||"hwb"!==t[0])return;let r={mode:"hwb"},[,i,n,a,o]=t;if(i.type!==H){if(i.type===q)return;r.h=i.value}if(n.type!==H){if("hue"===n.type)return;r.w=n.value/100}if(a.type!==H){if("hue"===a.type)return;r.b=a.value/100}return o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},tx={mode:"hwb",toMode:{rgb:tg},fromMode:{rgb:ty},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[tv],serialize:e=>`hwb(${void 0!==e.h?e.h:"none"} ${void 0!==e.w?100*e.w+"%":"none"} ${void 0!==e.b?100*e.b+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:el,fixup:eM},w:el,b:el,alpha:{use:el,fixup:ec}},difference:{h:eD},average:{h:eH}};function tb(e){if(e<0)return 0;let t=Math.pow(e,.012683313515655966);return 1e4*Math.pow(Math.max(0,t-.8359375)/(18.8515625-18.6875*t),6.277394636015326)}function t_(e){if(e<0)return 0;let t=Math.pow(e/1e4,.1593017578125);return Math.pow((.8359375+18.8515625*t)/(1+18.6875*t),78.84375)}var tw=e=>Math.max(e/203,0),tT=({i:e,t:t,p:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=tb(e+.008609037037932761*t+.11102962500302593*r),a=tb(e-.00860903703793275*t-.11102962500302599*r),o=tb(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:tw(2.070152218389422*n-1.3263473389671556*a+.2066510476294051*o),y:tw(.3647385209748074*n+.680566024947227*a-.0453045459220346*o),z:tw(-.049747207535812*n-.0492609666966138*a+1.1880659249923042*o)};return void 0!==i&&(s.alpha=i),s},tM=(e=0)=>Math.max(203*e,0),tk=({x:e,y:t,z:r,alpha:i})=>{let n=tM(e),a=tM(t),o=tM(r),s=t_(.3592832590121217*n+.6976051147779502*a-.0358915932320289*o),l=t_(-.1920808463704995*n+1.1004767970374323*a+.0753748658519118*o),c=t_(.0070797844607477*n+.0748396662186366*a+.8433265453898765*o),u={mode:"itp",i:.5*s+.5*l,t:1.61376953125*s-3.323486328125*l+1.709716796875*c,p:4.378173828125*s-4.24560546875*l-.132568359375*c};return void 0!==i&&(u.alpha=i),u},tA={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:tT,rgb:e=>eb(tT(e))},fromMode:{xyz65:tk,rgb:e=>tk(ey(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:el,t:el,p:el,alpha:{use:el,fixup:ec}}},tS=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,.1593017578125);return Math.pow((.8359375+18.8515625*t)/(1+18.6875*t),134.03437499999998)},tE=(e=0)=>Math.max(203*e,0),tC=({x:e,y:t,z:r,alpha:i})=>{e=tE(e),t=tE(t);let n=1.15*e-.15*(r=tE(r)),a=.66*t+.34*e,o=tS(.41478972*n+.579999*a+.014648*r),s=tS(-.20151*n+1.120649*a+.0531008*r),l=tS(-.0166008*n+.2648*a+.6684799*r),c=(o+s)/2,u={mode:"jab",j:.44*c/(1-.56*c)-16295499532821565e-27,a:3.524*o-4.066708*s+.542708*l,b:.199076*o+1.096799*s-1.295875*l};return void 0!==i&&(u.alpha=i),u},tL=e=>{if(e<0)return 0;let t=Math.pow(e,.007460772656268216);return 1e4*Math.pow((.8359375-t)/(18.6875*t-18.8515625),6.277394636015326)},tP=({j:e,a:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=(e+16295499532821565e-27)/(.44+.56*(e+16295499532821565e-27)),a=tL(n+.13860504*t+.058047316*r),o=tL(n-.13860504*t-.058047316*r),s=tL(n-.096019242*t-.8118919*r),l={mode:"xyz65",x:(1.661373024652174*a-.914523081304348*o+.23136208173913045*s)/203,y:(-.3250758611844533*a+1.571847026732543*o-.21825383453227928*s)/203,z:(-.090982811*a-.31272829*o+1.5227666*s)/203};return void 0!==i&&(l.alpha=i),l},tI=e=>{let t=tC(ey(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},tz=e=>eb(tP(e)),tD={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:tI,xyz65:tC},toMode:{rgb:tz,xyz65:tP},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:el,a:el,b:el,alpha:{use:el,fixup:ec}}},tO=({j:e,a:t,b:r,alpha:i})=>{void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:n};return n&&(a.h=ew(180*Math.atan2(r,t)/Math.PI)),void 0!==i&&(a.alpha=i),a},tR=({j:e,c:t,h:r,alpha:i})=>{void 0===r&&(r=0);let n={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return void 0!==i&&(n.alpha=i),n},tF={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:tR,rgb:e=>tz(tR(e))},fromMode:{rgb:e=>tO(tI(e)),jab:tO},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:el,fixup:eM},c:el,j:el,alpha:{use:el,fixup:ec}},difference:{h:eO},average:{h:eH}},tj=e=>Math.pow(e,3)>.008856451679035631?Math.pow(e,3):(116*e-16)/903.2962962962963,tB=({l:e,a:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=(e+16)/116,a=t/500+n,o=n-r/200,s={mode:"xyz50",x:tj(a)*eX.X,y:tj(n)*eX.Y,z:tj(o)*eX.Z};return void 0!==i&&(s.alpha=i),s},tN=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=ex({r:3.1341359569958707*e-1.6173863321612538*t-.4906619460083532*r,g:-.978795502912089*e+1.916254567259524*t+.03344273116131949*r,b:.07195537988411677*e-.2289768264158322*t+1.405386058324125*r});return void 0!==i&&(n.alpha=i),n},tU=e=>tN(tB(e)),tV=e=>{let{r:t,g:r,b:i,alpha:n}=eg(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*i,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*i,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*i};return void 0!==n&&(a.alpha=n),a},tq=e=>e>.008856451679035631?Math.cbrt(e):(903.2962962962963*e+16)/116,tH=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=tq(e/eX.X),a=tq(t/eX.Y),o={mode:"lab",l:116*a-16,a:500*(n-a),b:200*(a-tq(r/eX.Z))};return void 0!==i&&(o.alpha=i),o},tG=e=>{let t=tH(tV(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},tW=function(e,t){if(!t||"lab"!==t[0])return;let r={mode:"lab"},[,i,n,a,o]=t;if("hue"!==i.type&&"hue"!==n.type&&"hue"!==a.type)return i.type!==H&&(r.l=Math.min(Math.max(0,i.value),100)),n.type!==H&&(r.a=n.type===V?n.value:125*n.value/100),a.type!==H&&(r.b=a.type===V?a.value:125*a.value/100),o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},tY={mode:"lab",toMode:{xyz50:tB,rgb:tU},fromMode:{xyz50:tH,rgb:tG},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[tW],serialize:e=>`lab(${void 0!==e.l?e.l:"none"} ${void 0!==e.a?e.a:"none"} ${void 0!==e.b?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:el,a:el,b:el,alpha:{use:el,fixup:ec}}},tZ=r(d({},tY),n({mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:eQ,rgb:e0},fromMode:{xyz65:e2,rgb:e3},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}})),t$=function(e,t){if(!t||"lch"!==t[0])return;let r={mode:"lch"},[,i,n,a,o]=t;if(i.type!==H){if("hue"===i.type)return;r.l=Math.min(Math.max(0,i.value),100)}if(n.type!==H&&(r.c=Math.max(0,n.type===V?n.value:150*n.value/100)),a.type!==H){if(a.type===q)return;r.h=a.value}return o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},tX={mode:"lch",toMode:{lab:e$,rgb:e=>tU(e$(e))},fromMode:{rgb:e=>eZ(tG(e)),lab:eZ},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[t$],serialize:e=>`lch(${void 0!==e.l?e.l:"none"} ${void 0!==e.c?e.c:"none"} ${void 0!==e.h?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:el,fixup:eM},c:el,l:el,alpha:{use:el,fixup:ec}},difference:{h:eO},average:{h:eH}},tK=r(d({},tX),n({mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>e$(e,"lab65"),rgb:e=>e0(e$(e,"lab65"))},fromMode:{rgb:e=>eZ(e3(e),"lch65"),lab65:e=>eZ(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}})),tJ=({l:e,u:t,v:r,alpha:i})=>{void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:n};return n&&(a.h=ew(180*Math.atan2(r,t)/Math.PI)),void 0!==i&&(a.alpha=i),a},tQ=({l:e,c:t,h:r,alpha:i})=>{void 0===r&&(r=0);let n={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return void 0!==i&&(n.alpha=i),n},t0=(e,t,r)=>4*e/(e+15*t+3*r),t1=(e,t,r)=>9*t/(e+15*t+3*r),t2=t0(eX.X,eX.Y,eX.Z),t3=t1(eX.X,eX.Y,eX.Z),t5=({x:e,y:t,z:r,alpha:i})=>{let n;void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let a=(n=t/eX.Y)<=.008856451679035631?903.2962962962963*n:116*Math.cbrt(n)-16,o=t0(e,t,r),s=t1(e,t,r);isFinite(o)&&isFinite(s)?(o=13*a*(o-t2),s=13*a*(s-t3)):a=o=s=0;let l={mode:"luv",l:a,u:o,v:s};return void 0!==i&&(l.alpha=i),l},t4=(i=eX.X,4*i/(i+15*eX.Y+3*eX.Z)),t6=(a=eX.X,9*(o=eX.Y)/(a+15*o+3*eX.Z)),t8=({l:e,u:t,v:r,alpha:i})=>{if(void 0===e&&(e=0),0===e)return{mode:"xyz50",x:0,y:0,z:0};void 0===t&&(t=0),void 0===r&&(r=0);let n=t/(13*e)+t4,a=r/(13*e)+t6,o=eX.Y*(e<=8?e/903.2962962962963:Math.pow((e+16)/116,3)),s={mode:"xyz50",x:9*n*o/(4*a),y:o,z:o*(12-3*n-20*a)/(4*a)};return void 0!==i&&(s.alpha=i),s},t9={mode:"lchuv",toMode:{luv:tQ,rgb:e=>tN(t8(tQ(e)))},fromMode:{rgb:e=>tJ(t5(tV(e))),luv:tJ},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:el,fixup:eM},c:el,l:el,alpha:{use:el,fixup:ec}},difference:{h:eO},average:{h:eH}},t7=r(d({},eu),n({mode:"lrgb",toMode:{rgb:ex},fromMode:{rgb:eg},parse:["srgb-linear"],serialize:"srgb-linear"})),re={mode:"luv",toMode:{xyz50:t8,rgb:e=>tN(t8(e))},fromMode:{xyz50:t5,rgb:e=>t5(tV(e))},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:el,u:el,v:el,alpha:{use:el,fixup:ec}}},rt=({r:e,g:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),o=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*n+.7936177747023054*a-.0040720430116193*o,a:1.9779985324311684*n-2.42859224204858*a+.450593709617411*o,b:.0259040424655478*n+.7827717124575296*a-.8086757549230774*o};return void 0!==i&&(s.alpha=i),s},rr=e=>{let t=rt(eg(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},ri=({l:e,a:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),a=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),o=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*n-3.3077115392580616*a+.2309699031821044*o,g:-1.2684379732850317*n+2.6097573492876887*a-.3413193760026573*o,b:-.0041960761386756*n-.7034186179359362*a+1.7076146940746117*o};return void 0!==i&&(s.alpha=i),s},rn=e=>ex(ri(e));function ra(e){return .5*(1.170873786407767*e-.206+Math.sqrt((1.170873786407767*e-.206)*(1.170873786407767*e-.206)+.14050485436893204*e))}function ro(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function rs(e,t){let r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x=(-1.88170328*e-.80936493*t>1?(r=1.19086277,i=1.76576728,n=.59662641,a=.75515197,o=.56771245,s=4.0767416621,l=-3.3077115913,c=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,i=-.45954404,n=.08285427,a=.1254107,o=.14503204,s=-1.2684380046,l=2.6097574011,c=-.3413193965):(r=1.35733652,i=-.00915799,n=-1.1513021,a=-.50559606,o=.00692167,s=-.0041960863,l=-.7034186147,c=1.707614701),u=r+i*e+n*t+a*e*e+o*e*t,h=.3963377774*e+.2158037573*t,d=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,y=s*((p=1+u*h)*p*p)+l*((m=1+u*d)*m*m)+c*((g=1+u*f)*g*g),u-=y*(v=3*h*p*p*s+3*d*m*m*l+3*f*g*g*c)/(v*v-.5*y*(6*h*h*p*s+6*d*d*m*l+6*f*f*g*c))),b=ri({l:1,a:x*e,b:x*t}),_=Math.cbrt(1/Math.max(b.r,b.g,b.b));return[_,_*x]}function rl(e,t,r=null){r||(r=rs(e,t));let i=r[0],n=r[1];return[n/i,n/(1-i)]}function rc(e,t,r){let i=rs(t,r),n=function(e,t,r,i,n=null){let a;if(n||(n=rs(e,t)),(r-i)*n[1]-(n[0]-i)*1<=0)a=n[1]*i/(+n[0]+n[1]*(i-r));else{a=n[1]*(i-1)/(+(n[0]-1)+n[1]*(i-r));{let n=r-i,o=.3963377774*e+.2158037573*t,s=-.1055613458*e-.0638541728*t,l=-.0894841775*e-1.291485548*t,c=n+ +o,u=n+ +s,h=n+ +l;{let e=i*(1-a)+a*r,t=+a,n=e+t*o,d=e+t*s,f=e+t*l,p=n*n*n,m=d*d*d,g=f*f*f,y=3*c*n*n,v=3*u*d*d,x=3*h*f*f,b=6*c*c*n,_=6*u*u*d,w=6*h*h*f,T=4.0767416621*p-3.3077115913*m+.2309699292*g-1,M=4.0767416621*y-3.3077115913*v+.2309699292*x,k=M/(M*M-.5*T*(4.0767416621*b-3.3077115913*_+.2309699292*w)),A=-T*k,S=-1.2684380046*p+2.6097574011*m-.3413193965*g-1,E=-1.2684380046*y+2.6097574011*v-.3413193965*x,C=E/(E*E-.5*S*(-1.2684380046*b+2.6097574011*_-.3413193965*w)),L=-S*C,P=-.0041960863*p-.7034186147*m+1.707614701*g-1,I=-.0041960863*y-.7034186147*v+1.707614701*x,z=I/(I*I-.5*P*(-.0041960863*b-.7034186147*_+1.707614701*w)),D=-P*z;a+=Math.min(A=k>=0?A:1e6,Math.min(L=C>=0?L:1e6,D=z>=0?D:1e6))}}}return a}(t,r,e,e,i),a=rl(t,r,i),o=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),l=n/Math.min(e*a[0],(1-e)*a[1]),c=e*o,u=(1-e)*s,h=.9*l*Math.sqrt(Math.sqrt(1/(1/(c*c*c*c)+1/(u*u*u*u))));return[Math.sqrt(1/(1/((c=.4*e)*c)+1/((u=(1-e)*.8)*u))),h,n]}function ru(e){let t=void 0!==e.l?e.l:0,r=void 0!==e.a?e.a:0,i=void 0!==e.b?e.b:0,n={mode:"okhsl",l:ra(t)};void 0!==e.alpha&&(n.alpha=e.alpha);let a=Math.sqrt(r*r+i*i);if(!a)return n.s=0,n;let[o,s,l]=rc(t,r/a,i/a),c;if(aru(rr(e))},toMode:{oklab:rh,rgb:e=>rn(rh(e))}}));function rf(e){let t=void 0!==e.l?e.l:0,r=void 0!==e.a?e.a:0,i=void 0!==e.b?e.b:0,n=Math.sqrt(r*r+i*i),a=n?r/n:1,o=n?i/n:1,[s,l]=rl(a,o),c=l/(n+t*l),u=c*t,h=c*n,d=ro(u),f=h*d/u,p=ri({l:d,a:a*f,b:o*f}),m=Math.cbrt(1/Math.max(p.r,p.g,p.b,0));t/=m;let g={mode:"okhsv",s:(n=n/m*ra(t)/t)?(.5+l)*h/(.5*l+l*(1-.5/s)*h):0,v:(t=ra(t))?t/u:0};return g.s&&(g.h=ew(180*Math.atan2(i,r)/Math.PI)),void 0!==e.alpha&&(g.alpha=e.alpha),g}function rp(e){let t={mode:"oklab"};void 0!==e.alpha&&(t.alpha=e.alpha);let r=void 0!==e.h?e.h:0,i=void 0!==e.s?e.s:0,n=void 0!==e.v?e.v:0,a=Math.cos(r/180*Math.PI),o=Math.sin(r/180*Math.PI),[s,l]=rl(a,o),c=1-.5/s,u=1-.5*i/(.5+l-l*c*i),h=i*l*.5/(.5+l-l*c*i),d=ro(u),f=h*d/u,p=ri({l:d,a:a*f,b:o*f}),m=Math.cbrt(1/Math.max(p.r,p.g,p.b,0)),g=ro(n*u),y=h*g/u;return t.l=g*m,t.a=y*a*m,t.b=y*o*m,t}var rm=r(d({},tm),n({mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:rf,rgb:e=>rf(rr(e))},toMode:{oklab:rp,rgb:e=>rn(rp(e))}})),rg=function(e,t){if(!t||"oklab"!==t[0])return;let r={mode:"oklab"},[,i,n,a,o]=t;if("hue"!==i.type&&"hue"!==n.type&&"hue"!==a.type)return i.type!==H&&(r.l=Math.min(Math.max(0,i.type===V?i.value:i.value/100),1)),n.type!==H&&(r.a=n.type===V?n.value:.4*n.value/100),a.type!==H&&(r.b=a.type===V?a.value:.4*a.value/100),o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},ry=r(d({},tY),n({mode:"oklab",toMode:{lrgb:ri,rgb:rn},fromMode:{lrgb:rt,rgb:rr},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[rg],serialize:e=>`oklab(${void 0!==e.l?e.l:"none"} ${void 0!==e.a?e.a:"none"} ${void 0!==e.b?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`})),rv=function(e,t){if(!t||"oklch"!==t[0])return;let r={mode:"oklch"},[,i,n,a,o]=t;if(i.type!==H){if("hue"===i.type)return;r.l=Math.min(Math.max(0,i.type===V?i.value:i.value/100),1)}if(n.type!==H&&(r.c=Math.max(0,n.type===V?n.value:.4*n.value/100)),a.type!==H){if(a.type===q)return;r.h=a.value}return o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},rx=r(d({},tX),n({mode:"oklch",toMode:{oklab:e=>e$(e,"oklab"),rgb:e=>rn(e$(e,"oklab"))},fromMode:{rgb:e=>eZ(rr(e),"oklch"),oklab:e=>eZ(e,"oklch")},parse:[rv],serialize:e=>`oklch(${void 0!==e.l?e.l:"none"} ${void 0!==e.c?e.c:"none"} ${void 0!==e.h?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}})),rb=e=>{let{r:t,g:r,b:i,alpha:n}=eg(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*i,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*i,z:0*t+.0451133818589026*r+1.043944368900976*i};return void 0!==n&&(a.alpha=n),a},r_=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=ex({r:2.4934969119414263*e-.9313836179191242*t-.402710784450717*r,g:-.8294889695615749*e+1.7626640603183465*t+.0236246858419436*r,b:.0358458302437845*e-.0761723892680418*t+.9568845240076871*r},"p3");return void 0!==i&&(n.alpha=i),n},rw=r(d({},eu),n({mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>r_(ey(e)),xyz65:r_},toMode:{rgb:e=>eb(rb(e)),xyz65:rb}})),rT=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},rM=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"prophoto",r:rT(1.3457868816471585*e-.2555720873797946*t-.0511018649755453*r),g:rT(-.5446307051249019*e+1.5082477428451466*t+.0205274474364214*r),b:rT(0*e+0*t+1.2119675456389452*r)};return void 0!==i&&(n.alpha=i),n},rk=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},rA=e=>{let t=rk(e.r),r=rk(e.g),i=rk(e.b),n={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*i,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*i,z:0*t+0*r+.8251046025104602*i};return void 0!==e.alpha&&(n.alpha=e.alpha),n},rS=r(d({},eu),n({mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:rM,rgb:e=>rM(tV(e))},toMode:{xyz50:rA,rgb:e=>tN(rA(e))}})),rE=e=>{let t=Math.abs(e);return t>.018053968510807?(Math.sign(e)||1)*(1.09929682680944*Math.pow(t,.45)-(1.09929682680944-1)):4.5*e},rC=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"rec2020",r:rE(1.7166511879712683*e-.3556707837763925*t-.2533662813736599*r),g:rE(-.6666843518324893*e+1.6164812366349395*t+.0157685458139111*r),b:rE(.0176398574453108*e-.0427706132578085*t+.9421031212354739*r)};return void 0!==i&&(n.alpha=i),n},rL=(e=0)=>{let t=Math.abs(e);return t<.08124285829863151?e/4.5:(Math.sign(e)||1)*Math.pow((t+1.09929682680944-1)/1.09929682680944,1/.45)},rP=e=>{let t=rL(e.r),r=rL(e.g),i=rL(e.b),n={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*i,y:.262700212011267*t+.6779980715188708*r+.059301716469862*i,z:0*t+.0280726930490874*r+1.0609850577107909*i};return void 0!==e.alpha&&(n.alpha=e.alpha),n},rI=r(d({},eu),n({mode:"rec2020",fromMode:{xyz65:rC,rgb:e=>rC(ey(e))},toMode:{xyz65:rP,rgb:e=>eb(rP(e))},parse:["rec2020"],serialize:"rec2020"})),rz=Math.cbrt(.0037930732552754493),rD=e=>Math.cbrt(e)-rz,rO=e=>{let{r:t,g:r,b:i,alpha:n}=eg(e),a=rD(.3*t+.622*r+.078*i+.0037930732552754493),o=rD(.23*t+.692*r+.078*i+.0037930732552754493),s={mode:"xyb",x:(a-o)/2,y:(a+o)/2,b:rD(.2434226892454782*t+.2047674442449682*r+.5518098665095535*i+.0037930732552754493)-(a+o)/2};return void 0!==n&&(s.alpha=n),s},rR=e=>Math.pow(e+rz,3),rF=({x:e,y:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=rR(e+t)-.0037930732552754493,a=rR(t-e)-.0037930732552754493,o=rR(r+t)-.0037930732552754493,s=ex({r:11.031566904639861*n-9.866943908131562*a-.16462299650829934*o,g:-3.2541473810744237*n+4.418770377582723*a-.16462299650829934*o,b:-3.6588512867136815*n+2.7129230459360922*a+1.9459282407775895*o});return void 0!==i&&(s.alpha=i),s},rj={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:rF},fromMode:{rgb:rO},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:el,y:el,b:el,alpha:{use:el,fixup:ec}}},rB={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:tN,lab:tH},fromMode:{rgb:tV,lab:tB},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:el,y:el,z:el,alpha:{use:el,fixup:ec}}},rN=e=>{let{x:t,y:r,z:i,alpha:n}=e;void 0===t&&(t=0),void 0===r&&(r=0),void 0===i&&(i=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*i,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*i,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*i};return void 0!==n&&(a.alpha=n),a},rU=e=>{let{x:t,y:r,z:i,alpha:n}=e;void 0===t&&(t=0),void 0===r&&(r=0),void 0===i&&(i=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*i,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*i,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*i};return void 0!==n&&(a.alpha=n),a},rV={mode:"xyz65",toMode:{rgb:eb,xyz50:rN},fromMode:{rgb:ey,xyz50:rU},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:el,y:el,z:el,alpha:{use:el,fixup:ec}}},rq=({r:e,g:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return void 0!==i&&(n.alpha=i),n},rH=({y:e,i:t,q:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return void 0!==i&&(n.alpha=i),n},rG={mode:"yiq",toMode:{rgb:rH},fromMode:{rgb:rq},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:el,i:el,q:el,alpha:{use:el,fixup:ec}}},rW=(e=4)=>t=>{let r;return"number"==typeof t?Math.round(t*(r=Math.pow(10,r=e)))/r:t},rY=rW(2),rZ=e=>Math.max(0,Math.min(1,e||0)),r$=e=>Math.round(255*rZ(e)),rX=E("rgb"),rK=E("hsl"),rJ=e=>{if(void 0!==e)return"#"+(0x1000000|r$(e.r)<<16|r$(e.g)<<8|r$(e.b)).toString(16).slice(1)},rQ=e=>{if(void 0===e)return;let t=r$(void 0!==e.alpha?e.alpha:1);return rJ(e)+(256|t).toString(16).slice(1)},r0=e=>{if(void 0===e)return;let t=r$(e.r),r=r$(e.g),i=r$(e.b);return void 0===e.alpha||1===e.alpha?`rgb(${t}, ${r}, ${i})`:`rgba(${t}, ${r}, ${i}, ${rY(rZ(e.alpha))})`},r1=e=>{if(void 0===e)return;let t=rY(e.h||0),r=rY(100*rZ(e.s))+"%",i=rY(100*rZ(e.l))+"%";return void 0===e.alpha||1===e.alpha?`hsl(${t}, ${r}, ${i})`:`hsla(${t}, ${r}, ${i}, ${rY(rZ(e.alpha))})`},r2=e=>{let t=S(e);if(!t)return;let r=O(t.mode);if(!r.serialize||"string"==typeof r.serialize){let e=`color(${r.serialize||`--${t.mode}`} `;return r.channels.forEach((r,i)=>{"alpha"!==r&&(e+=(i?" ":"")+(void 0!==t[r]?t[r]:"none"))}),void 0!==t.alpha&&t.alpha<1&&(e+=` / ${t.alpha}`),e+")"}if("function"==typeof r.serialize)return r.serialize(t)},r3=e=>rJ(rX(e)),r5=e=>rQ(rX(e)),r4=e=>r0(rX(e)),r6=e=>r1(rK(e)),r8={normal:(e,t)=>t,multiply:(e,t)=>e*t,screen:(e,t)=>e+t-e*t,"hard-light":(e,t)=>t<.5?2*e*t:2*t*(1-e)-1,overlay:(e,t)=>e<.5?2*t*e:2*e*(1-t)-1,darken:(e,t)=>Math.min(e,t),lighten:(e,t)=>Math.max(e,t),"color-dodge":(e,t)=>0===e?0:1===t?1:Math.min(1,e/(1-t)),"color-burn":(e,t)=>1===e?1:0===t?0:1-Math.min(1,(1-e)/t),"soft-light":(e,t)=>t<.5?e-(1-2*t)*e*(1-e):e+(2*t-1)*((e<.25?((16*e-12)*e+4)*e:Math.sqrt(e))-e),difference:(e,t)=>Math.abs(e-t),exclusion:(e,t)=>e+t-2*e*t},r9=(e,t="normal",r="rgb")=>{let i="function"==typeof t?t:r8[t],n=E(r),a=O(r).channels;return e.map(e=>{let t=n(e);return void 0===t.alpha&&(t.alpha=1),t}).reduce((e,t)=>{if(void 0===e)return t;let n=t.alpha+e.alpha*(1-t.alpha);return a.reduce((r,a)=>("alpha"!==a&&(0===n?r[a]=0:(r[a]=t.alpha*(1-e.alpha)*t[a]+t.alpha*e.alpha*i(e[a],t[a])+(1-t.alpha)*e.alpha*e[a],r[a]=Math.max(0,Math.min(1,r[a]/n)))),r),{mode:r,alpha:n})})},r7=(e="rgb",t={})=>{let r=O(e),i=Object.keys(t).reduce((e,r)=>{let i=t[r];return e[r]=Array.isArray(i)?i:[i,i],e},{});return r.channels.reduce((e,t)=>((i.alpha||"alpha"!==t)&&(e[t]=(([e,t])=>e+Math.random()*(t-e))(i[t]||r.ranges[t])),e),{mode:e})},ie=(e,t="rgb",r=!1)=>{let i=t?O(t).channels:null,n=t?E(t):S;return a=>{let o=n(a);if(!o)return;let s=(i||O(o.mode).channels).reduce((r,i)=>{let n=e(o[i],i,o,t);return void 0===n||isNaN(n)||(r[i]=n),r},{mode:o.mode});if(!r)return s;let l=S(a);return l&&l.mode!==s.mode?E(l.mode)(s):s}},it=(e,t,r)=>"alpha"!==t?(e||0)*(void 0!==r.alpha?r.alpha:1):e,ir=(e,t,r)=>"alpha"!==t&&0!==r.alpha?(e||0)/(void 0!==r.alpha?r.alpha:1):e,ii=(e=1,t=0)=>(r,i)=>"alpha"!==i?r*e+t:r,ia=(e=1,t=1,r=0)=>(i,n)=>"alpha"!==n?e*Math.pow(i,t)+r:i,io=(e=.5)=>t=>e<=0?1:e>=1?0:Math.pow(t,Math.log(.5)/Math.log(e)),is=(e,t="rgb",r,i)=>{let n=O(t),a=E(t),o=[],s=[],l={};e.forEach(e=>{Array.isArray(e)?(o.push(a(e[0])),s.push(e[1])):"number"==typeof e||"function"==typeof e?l[s.length]=e:(o.push(a(e)),s.push(void 0))}),(e=>{void 0===e[0]&&(e[0]=0),void 0===e[e.length-1]&&(e[e.length-1]=1);let t=1,r,i,n,a;for(;t{let i,a,s;return i=r&&"object"==typeof r&&(a=r[t])&&"object"==typeof a&&r[t].fixup?r[t].fixup:(s=n.interpolate[t])&&"object"==typeof s&&n.interpolate[t].fixup?n.interpolate[t].fixup:e=>e,e[t]=i(o.map(e=>e[t])),e},{});if(i){let e=o.map((e,r)=>n.channels.reduce((e,t)=>(e[t]=c[t][r],e),{mode:t}));c=n.channels.reduce((r,n)=>(r[n]=e.map(e=>{let r=i(e[n],n,e,t);return isNaN(r)?void 0:r}),r),{})}let u=n.channels.reduce((e,t)=>{let i,a,o;return"function"==typeof r?i=r:r&&"object"==typeof r&&"function"==typeof r[t]?i=r[t]:r&&"object"==typeof r&&(a=r[t])&&"object"==typeof a&&r[t].use?i=r[t].use:"function"==typeof n.interpolate[t]?i=n.interpolate[t]:(o=n.interpolate[t])&&"object"==typeof o&&(i=n.interpolate[t].use),e[t]=i(c[t]),e},{}),h=o.length-1;return e=>{if((e=Math.min(Math.max(0,e),1))<=s[0])return o[0];if(e>s[h])return o[h];let r=0;for(;s[r]{let r=u[t](f);return void 0!==r&&(e[t]=r),e},{mode:t})}},il=(e,t="rgb",r)=>is(e,t,r),ic=(e,t)=>(r,i="rgb",n)=>{let a=t?ie(t,i):void 0,o=is(r,i,n,e);return a?e=>a(o(e)):o},iu=ic(it,ir),ih=(e,t,r,i,n)=>{let a=n*n,o=a*n;return((1-3*n+3*a-o)*e+(4-6*a+3*o)*t+(1+3*n+3*a-3*o)*r+o*i)/6},id=e=>t=>{let r=e.length-1,i=t>=1?r-1:Math.max(0,Math.floor(t*r));return ih(i>0?e[i-1]:2*e[i]-e[i+1],e[i],e[i+1],it=>{let r,i,n,a,o=e.length-1,s=Math.floor(t*o);return ih(e[(s-1+(r=e.length))%r],e[(s+(i=e.length))%i],e[(s+1+(n=e.length))%n],e[(s+2+(a=e.length))%a],(t-s/o)*o)},im=e=>{let t,r=e.length-1,i=Array(r),n=Array(r),a=Array(r);for(i[1]=1/4,n[1]=(6*e[1]-e[0])/4,t=2;t0&&(a[r-1]=n[r-1]),t=r-2;t>0;--t)a[t]=n[t]-i[t]*a[t+1];return a},ig=e=>id(im(e)),iy=e=>ip(im(e)),iv=Math.sign,ix=Math.min,ib=Math.abs,i_=e=>{let t=e.length-1,r=[],i=[],n=[];for(let a=0;a0?.5*(e[a+1]-e[a-1])*t:void 0),n.push(a>0?(iv(r[a-1])+iv(r[a]))*ix(ib(r[a-1]),ib(r[a]),.5*ib(i[a])):void 0);return[r,i,n]},iw=(e,t,r)=>{let i=e.length-1,n=i*i;return a=>{let o;o=a>=1?i-1:Math.max(0,Math.floor(a*i));let s=a-o/i,l=s*s;return(t[o]+t[o+1]-2*r[o])*n*(l*s)+(3*r[o]-2*t[o]-t[o+1])*i*l+t[o]*s+e[o]}},iT=e=>{if(e.length<3)return el(e);let t=e.length-1,[r,,i]=i_(e);return i[0]=r[0],i[t]=r[t-1],iw(e,i,r)},iM=e=>{if(e.length<3)return el(e);let t=e.length-1,[r,i,n]=i_(e);return i[0]=(2*e[1]-1.5*e[0]-.5*e[2])*t,i[t]=(1.5*e[t]-2*e[t-1]+.5*e[t-2])*t,n[0]=i[0]*r[0]<=0?0:ib(i[0])>2*ib(r[0])?2*r[0]:i[0],n[t]=i[t]*r[t-1]<=0?0:ib(i[t])>2*ib(r[t-1])?2*r[t-1]:i[t],iw(e,n,r)},ik=e=>{let t=e.length-1,[r,i,n]=i_(e);i[0]=.5*(e[1]-e[t])*t,i[t]=.5*(e[0]-e[t-1])*t;let a=(e[0]-e[t])*t;return n[0]=(iv(a)+iv(r[0]))*ix(ib(a),ib(r[0]),.5*ib(i[0])),n[t]=(iv(r[t-1])+iv(a))*ix(ib(r[t-1]),ib(a),.5*ib(i[t])),iw(e,n,r)},iA=(e=1)=>1===e?e=>e:t=>Math.pow(t,e),iS=(e=2,t=1)=>{let r=iA(t);if(e<2)return e<1?[]:[r(.5)];let i=[];for(let t=0;t{let t={mode:e.mode,r:Math.max(0,Math.min(void 0!==e.r?e.r:0,1)),g:Math.max(0,Math.min(void 0!==e.g?e.g:0,1)),b:Math.max(0,Math.min(void 0!==e.b?e.b:0,1))};return void 0!==e.alpha&&(t.alpha=e.alpha),t},iL=e=>iC(iE(e)),iP=e=>void 0!==e&&(void 0===e.r||e.r>=0&&e.r<=1)&&(void 0===e.g||e.g>=0&&e.g<=1)&&(void 0===e.b||e.b>=0&&e.b<=1);function iI(e){return iP(iE(e))}function iz(e="rgb"){let{gamut:t}=O(e);if(!t)return e=>!0;let r=E("string"==typeof t?t:e);return e=>iP(r(e))}function iD(e){return void 0===(e=S(e))||iI(e)?e:E(e.mode)(iL(e))}function iO(e="rgb"){let{gamut:t}=O(e);if(!t)return e=>S(e);let r="string"==typeof t?t:e,i=E(r),n=iz(r);return e=>{let t=S(e);if(!t)return;let r=i(t);if(n(r))return t;let a=iC(r);return t.mode===a.mode?a:E(t.mode)(a)}}function iR(e,t="lch",i="rgb"){e=S(e);let a="rgb"===i?iI:iz(i),o="rgb"===i?iL:iO(i);if(void 0===e||a(e))return e;let s=E(e.mode),l=r(d({},e=E(t)(e)),n({c:0}));if(!a(l))return s(o(l));let c=0,u=void 0!==e.c?e.c:0,h=O(t).ranges.c,f=(h[1]-h[0])/8192,p=l.c;for(;u-c>f;)l.c=c+(u-c)*.5,a(l)?(p=l.c,c=l.c):u=l.c;return s(a(l)?l:r(d({},l),n({c:p})))}function iF(e="rgb",t="oklch",i=eR("oklch"),a=.02){let o=E(e),s=O(e);if(!s.gamut)return e=>o(e);let l=iz(e),c=iO(e),u=E(t),{ranges:h}=O(t);if(!h.l||!h.c)throw Error("LCH-like space expected");return t=>{if(void 0===(t=S(t)))return;let f=d({},u(t));if(void 0===f.l&&(f.l=0),void 0===f.c&&(f.c=0),f.l>=h.l[1]){let i=r(d({},s.white),n({mode:e}));return void 0!==t.alpha&&(i.alpha=t.alpha),i}if(f.l<=h.l[0]){let i=r(d({},s.black),n({mode:e}));return void 0!==t.alpha&&(i.alpha=t.alpha),i}if(l(f))return o(f);let p=0,m=f.c,g=(h.c[1]-h.c[0])/4e3,y=c(f);for(;m-p>g;)f.c=(p+m)*.5,y=c(f),l(f)||i&&a>0&&i(f,y)<=a?p=f.c:m=f.c;return o(l(f)?f:y)}}var ij=(e,t=eR(),r=e=>e)=>{let i=e.map((e,t)=>({color:r(e),i:t}));return(r,n=1,a=1/0)=>(isFinite(n)&&(n=Math.max(1,Math.min(n,i.length-1))),i.forEach(e=>{e.d=t(r,e.color)}),i.sort((e,t)=>e.d-t.d).slice(0,n).filter(e=>e.de[t.i]))},iB=e=>Math.max(Math.min(e,1),0),iN=(e,t,r=!1)=>{let i=E(t),n=O(t).channels;return a=>{let o=i(a);if(!o)return;let s={mode:t},l,c=n.length;for(let t=0;tie(ii(Math.max(e,0)),t,!0),iV=(e=1,t="rgb")=>{let r=Math.max(e,0);return ie(ii(r,(1-r)/2),t,!0)},iq=(e=1,t="rgb")=>{let r;return iN([.393+.607*(r=1-iB(e)),.769-.769*r,.189-.189*r,0,.349-.349*r,.686+.314*r,.168-.168*r,0,.272-.272*r,.534-.534*r,.131+.869*r,0,0,0,0,1],t,!0)},iH=(e=1,t="rgb")=>{let r;return iN([.213+.787*(r=Math.max(e,0)),.715-.715*r,.072-.072*r,0,.213-.213*r,.715+.285*r,.072-.072*r,0,.213-.213*r,.715-.715*r,.072+.928*r,0,0,0,0,1],t,!0)},iG=(e=1,t="rgb")=>{let r;return iN([.2126+.7874*(r=1-iB(e)),.7152-.7152*r,.0722-.0722*r,0,.2126-.2126*r,.7152+.2848*r,.0722-.0722*r,0,.2126-.2126*r,.7152-.7152*r,.0722+.9278*r,0,0,0,0,1],t,!0)},iW=(e=1,t="rgb")=>{let r=iB(e);return ie((e,t)=>{let i;return"alpha"===t?e:(i=1-r,void 0===r||void 0===i?void 0:r+e*(i-r))},t,!0)},iY=(e=0,t="rgb")=>{let r,i,n;return iN([.213+.787*(i=Math.cos(r=Math.PI*e/180))-.213*(n=Math.sin(r)),.715-.715*i-.715*n,.072-.072*i+.928*n,0,.213-.213*i+.143*n,.715+.285*i+.14*n,.072-.072*i-.283*n,0,.213-.213*i-.787*n,.715-.715*i+.715*n,.072+.928*i+.072*n,0,0,0,0,1],t,!0)},iZ=E("rgb"),i$=[[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]],iX=[[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]],iK=[[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]],iJ=(e,t)=>{let r=Math.max(0,Math.min(1,t)),i=Math.round(r/.1),n=Math.round(r%.1),a=e[i];if(n>0&&iei(a[r],t[r],n))}return e=>{let t=S(e);if(void 0===t)return;let{r:r,g:i,b:n}=iZ(t),o={mode:"rgb",r:a[0]*r+a[1]*i+a[2]*n,g:a[3]*r+a[4]*i+a[5]*n,b:a[6]*r+a[7]*i+a[8]*n};return void 0!==t.alpha&&(o.alpha=t.alpha),E(t.mode)(o)}},iQ=(e=1)=>iJ(i$,e),i0=(e=1)=>iJ(iX,e),i1=(e=1)=>iJ(iK,e),i2=e=>e*e*(3-2*e),i3=e=>.5-Math.sin(Math.asin(1-2*e)/3),i5=e=>e*e*e*(e*(6*e-15)+10),i4=e=>(1-Math.cos(e*Math.PI))/2;function i6(e){let t=E("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function i8(e,t){let r=i6(e),i=i6(t);return(Math.max(r,i)+.05)/(Math.min(r,i)+.05)}var i9=D(e_),i7=D(eY),ne=D(tr),nt=D(ti),nr=D(to),ni=D(td),nn=D(tm),na=D(tx),no=D(tA),ns=D(tD),nl=D(tF),nc=D(tY),nu=D(tZ),nh=D(tX),nd=D(tK),nf=D(t9),np=D(t7),nm=D(re),ng=D(rd),ny=D(rm),nv=D(ry),nx=D(rx),nb=D(rw),n_=D(rS),nw=D(rI),nT=D(eu),nM=D(rj),nk=D(rB),nA=D(rV),nS=D(rG)}}),X=p({"src/plot_api/plot_config.js"(e,t){var r={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:{}}},i={};(function e(t,r){for(var i in t){var n=t[i];n.valType?r[i]=n.dflt:(r[i]||(r[i]={}),e(n,r[i]))}})(r,i),t.exports={configAttributes:r,dfltConfig:i}}}),K=p({"src/lib/notifier.js"(e,t){var r=T(),i=C(),n=[];t.exports=function(e,t,a){if((null==(o=a?._context)?void 0:o.displayNotifier)!==!1&&-1===n.indexOf(e)){n.push(e);var o,s=1e3;i(t)?s=t:"long"===t&&(s=3e3);var l=r.select("body").selectAll(".plotly-notifier").data([0]);l.enter().append("div").classed("plotly-notifier",!0),l.selectAll(".notifier-note").data(n).enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(e){var i=r.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",function(){i.transition().call(c)});for(var n=i.append("p"),a=e.split(//g),o=0;o1){var t=["LOG:"];for(e=0;e1){var n=[];for(e=0;e"),"long")}},n.warn=function(){var e;if(r.logging>0){var t=["WARN:"];for(e=0;e0){var n=[];for(e=0;e"),"stick")}},n.error=function(){var e;if(r.logging>0){var t=["ERROR:"];for(e=0;e0){var n=[];for(e=0;e"),"stick")}}}}),Q=p({"src/components/color/attributes.js"(e){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}}),ee=p({"src/components/color/index.js"(e,t){var{converter:i,formatHex:a,formatRgb:o,wcagContrast:s,wcagLuminance:l}=$(),{isArrayOrTypedArray:c}=z(),{warn:u}=J(),{background:h,defaultLine:f,defaults:p,lightLine:m}=Q(),g=i("rgb"),y=i("hsl"),v=e=>{if("string"!=typeof e)return;let t=e.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(t))try{return g(t)}catch{return}},x=e=>e>0?e>1?1:e:0,b={mode:"rgb",r:0,g:0,b:0,alpha:1},_=e=>Math.round(255e6*e)/255e6,w=e=>r(d({},e),n({r:_(e.r),g:_(e.g),b:_(e.b)})),T=e=>o(w(e)),M=(e,t)=>{var r,i,n,a;let o=v(e);return o?(null!=o.alpha||(o.alpha=1),o):(t||null==e||u(`Invalid color specifier: ${"string"==typeof e?`"${e}"`:c(e)?`${null!=(i=null==(r=e.constructor)?void 0:r.name)?i:"Array"}(${e.length})`:"object"==typeof e?null!=(a=null==(n=e.constructor)?void 0:n.name)?a:"Object":`${typeof e} ${e}`}. Defaulting to "#000"`),b)},k=e=>T(r(d({},M(e)),n({alpha:1}))),A=e=>c(e)&&e.length>2&&Number.isFinite(e[0])&&Number.isFinite(e[1])&&Number.isFinite(e[2]),S=(e,t)=>{let r=M(e),i=r.alpha;if(1===i)return T(r);let n=M(t||h),a=n.alpha,o=(e,t)=>(1===a?t:1-a+t*a)*(1-i)+e*i;return T({mode:"rgb",r:o(r.r,n.r),g:o(r.g,n.g),b:o(r.b,n.b)})},E=(e,t)=>{let i=M(e),a=y(i)||{mode:"hsl",h:0,s:0,l:0};return T(g(r(d({},a),n({l:x((100*a.l+t)/100),alpha:i.alpha}))))},C=(e,t)=>s(M(e),M(t)),L=e=>C(e,h)>C(e,f),P=T(M(h)),I=T(M(f));t.exports={addOpacity:(e,t)=>T(r(d({},M(e)),n({alpha:x(t)}))),adjustLightness:E,background:h,brighten:(e,t)=>{t=0===t?0:t||10;let i=M(e),a=t/100;return T(r(d({},i),n({r:x(i.r+a),g:x(i.g+a),b:x(i.b+a)})))},combine:S,contrast:(e,t,r)=>(1!==M(e).alpha&&(e=S(e,h)),L(e)?t?E(e,t):P:r?E(e,-r):I),defaultLine:f,defaults:p,equals:(e,t)=>!!(e&&t&&k(e)===k(t)),fill:(e,t)=>{e.style({fill:k(t),"fill-opacity":M(t).alpha})},hexString:e=>a(w(M(e))).toUpperCase(),interpolate:(e,t,r)=>{let i=M(e),n=M(t),a=(e,t)=>r*e+(1-r)*t;return T({mode:"rgb",r:a(i.r,n.r),g:a(i.g,n.g),b:a(i.b,n.b)})},isChannelArray:A,isDark:L,isValid:e=>void 0!==v(e),lightLine:m,luminosity:e=>{let t=M(e);return l({mode:"rgb",r:x(t.r),g:x(t.g),b:x(t.b)})},mix:(e,t,r)=>{let i=M(e),n=M(t),a=r/100,o=n.alpha-i.alpha,s=2*a-1,l=((s*o==-1?s:(s+o)/(1+s*o))+1)/2,c=1-l,u=(e,t)=>c*e+l*t;return T({mode:"rgb",r:u(i.r,n.r),g:u(i.g,n.g),b:u(i.b,n.b),alpha:i.alpha*(1-a)+n.alpha*a})},mostReadable:(e,t=["#000","#fff"])=>{let r,i=-1/0;for(let n of t){let t=C(e,n);t>i&&(i=t,r=T(M(n)))}return r},normalize:(e,t)=>{let r=A(e)?(e=>{let[t,r,i,n]=e,a=Math.max(t,r,i)>1?1/255:1,o=n??1;return{mode:"rgb",r:t*a,g:r*a,b:i*a,alpha:o>1?o/255:o}})(e):M(e,!0),i=[x(r.r),x(r.g),x(r.b),x(r.alpha)];return"uint8"===t||"uint8_clamped"===t?Uint8Array.from(i,e=>Math.round(255*e)):"float32"===t?Float32Array.from(i):"float64"===t?Float64Array.from(i):i},opacity:e=>e?M(e).alpha:0,parse:M,rgb:k,rgbaArray:e=>{let t=M(e);return[255*x(t.r),255*x(t.g),255*x(t.b),x(t.alpha)]},rgbaArrayToString:([e,t,r,i])=>T({mode:"rgb",r:e/255,g:t/255,b:r/255,alpha:i}),rgbaString:e=>T(M(e)),stroke:(e,t)=>{e.style({stroke:k(t),"stroke-opacity":M(t).alpha})},wcagContrast:C}}}),et=p({"src/components/colorscale/scales.js"(e,t){var r=ee(),i={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)"]]},n=i.RdBu;function a(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||0!=+e[0][0]||1!=+e[e.length-1][0])return!1;for(var i=0;ien});var ea,eo=f({"src/lib/regex.ts"(){ea="([2-9]|[1-9][0-9]+)?"}}),es=p({"src/lib/coerce.js"(e){var t=C(),r=q().extendFlat,i=Z(),n=et(),a=ee(),o=er().DESELECTDIM,s=D(),l=(eo(),v(ei)).counter,c=(V(),v(B)).modHalf,u=z().isArrayOrTypedArray,h=z().isTypedArraySpec,d=z().decodeTypedArraySpec;function f(t,r){var i=e.valObjectMeta[r.valType];if(r.arrayOk&&u(t))return!0;if(i.validateFunction)return i.validateFunction(t,r);var n={},a=n;return i.coerceFunction(t,{set:function(e){a=e}},n,r),a!==n}e.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(u(e)?e:h(e)?d(e):r)}},enumerated:{coerceFunction:function(e,t,r,i){i.coerceNumber&&(e*=1),-1===i.values.indexOf(e)?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e*=1);for(var r=t.values,i=0;i!0===e||!1===e;n(e)||i.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(n)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,r,i,n){h(e)&&(e=d(e)),!t(e)||void 0!==n.min&&en.max?r.set(i):r.set(+e)}},integer:{coerceFunction:function(e,r,i,n){-1!==(n.extras||[]).indexOf(e)?r.set(e):(h(e)&&(e=d(e)),e%1||!t(e)||void 0!==n.min&&en.max?r.set(i):r.set(+e))}},string:{coerceFunction:function(e,t,r,i){if("string"!=typeof e){var n="number"==typeof e;!0!==i.strict&&n?t.set(String(e)):t.set(r)}else i.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){h(e)&&(e=d(e)),a.isValid(e)?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){Array.isArray(e)&&e.length&&e.every(e=>a.isValid(e))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(n.get(e,r))}},angle:{coerceFunction:function(e,r,i){h(e)&&(e=d(e)),"auto"===e?r.set("auto"):t(e)?r.set(c(+e,360)):r.set(i)}},subplotid:{coerceFunction:function(e,t,r,i){var n=i.regex||l(r);let a=e=>"string"==typeof e&&n.test(e);a(e)||i.arrayOk&&u(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"==typeof e&&!!l(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,i){if(-1!==(i.extras||[]).indexOf(e))return void t.set(e);if("string"!=typeof e)return void t.set(r);for(var n=e.split("+"),a=0;aMath.abs(P)?null:(E*=P=1/P,C*=P,L*=P,n=Math.sin(r),o=1-(a=Math.cos(r)),s=t[0],l=t[1],c=t[2],u=t[3],h=t[4],d=t[5],f=t[6],p=t[7],m=t[8],g=t[9],y=t[10],v=t[11],x=E*E*o+a,b=C*E*o+L*n,_=L*E*o-C*n,w=E*C*o-L*n,T=C*C*o+a,M=L*C*o+E*n,k=E*L*o+C*n,A=C*L*o-E*n,S=L*L*o+a,e[0]=s*x+h*b+m*_,e[1]=l*x+d*b+g*_,e[2]=c*x+f*b+y*_,e[3]=u*x+p*b+v*_,e[4]=s*w+h*T+m*M,e[5]=l*w+d*T+g*M,e[6]=c*w+f*T+y*M,e[7]=u*w+p*T+v*M,e[8]=s*k+h*A+m*S,e[9]=l*k+d*A+g*S,e[10]=c*k+f*A+y*S,e[11]=u*k+p*A+v*S,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}}}),ew=p({"node_modules/gl-mat4/rotateX.js"(e,t){t.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*n+c*i,e[5]=o*n+u*i,e[6]=s*n+h*i,e[7]=l*n+d*i,e[8]=c*n-a*i,e[9]=u*n-o*i,e[10]=h*n-s*i,e[11]=d*n-l*i,e}}}),eT=p({"node_modules/gl-mat4/rotateY.js"(e,t){t.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n-c*i,e[1]=o*n-u*i,e[2]=s*n-h*i,e[3]=l*n-d*i,e[8]=a*i+c*n,e[9]=o*i+u*n,e[10]=s*i+h*n,e[11]=l*i+d*n,e}}}),eM=p({"node_modules/gl-mat4/rotateZ.js"(e,t){t.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],h=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n+c*i,e[1]=o*n+u*i,e[2]=s*n+h*i,e[3]=l*n+d*i,e[4]=c*n-a*i,e[5]=u*n-o*i,e[6]=h*n-s*i,e[7]=d*n-l*i,e}}}),ek=p({"node_modules/gl-mat4/fromRotation.js"(e,t){t.exports=function(e,t,r){var i,n,a,o=r[0],s=r[1],l=r[2],c=Math.sqrt(o*o+s*s+l*l);return 1e-6>Math.abs(c)?null:(o*=c=1/c,s*=c,l*=c,i=Math.sin(t),a=1-(n=Math.cos(t)),e[0]=o*o*a+n,e[1]=s*o*a+l*i,e[2]=l*o*a-s*i,e[3]=0,e[4]=o*s*a-l*i,e[5]=s*s*a+n,e[6]=l*s*a+o*i,e[7]=0,e[8]=o*l*a+s*i,e[9]=s*l*a-o*i,e[10]=l*l*a+n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}}}),eA=p({"node_modules/gl-mat4/fromRotationTranslation.js"(e,t){t.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=i+i,l=n+n,c=a+a,u=i*s,h=i*l,d=i*c,f=n*l,p=n*c,m=a*c,g=o*s,y=o*l,v=o*c;return e[0]=1-(f+m),e[1]=h+v,e[2]=d-y,e[3]=0,e[4]=h-v,e[5]=1-(u+m),e[6]=p+g,e[7]=0,e[8]=d+y,e[9]=p-g,e[10]=1-(u+f),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}}}),eS=p({"node_modules/gl-mat4/fromScaling.js"(e,t){t.exports=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),eE=p({"node_modules/gl-mat4/fromTranslation.js"(e,t){t.exports=function(e,t){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]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}}}),eC=p({"node_modules/gl-mat4/fromXRotation.js"(e,t){t.exports=function(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),eL=p({"node_modules/gl-mat4/fromYRotation.js"(e,t){t.exports=function(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),eP=p({"node_modules/gl-mat4/fromZRotation.js"(e,t){t.exports=function(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=i,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}}}),eI=p({"node_modules/gl-mat4/fromQuat.js"(e,t){t.exports=function(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r+r,s=i+i,l=n+n,c=r*o,u=i*o,h=i*s,d=n*o,f=n*s,p=n*l,m=a*o,g=a*s,y=a*l;return e[0]=1-h-p,e[1]=u+y,e[2]=d-g,e[3]=0,e[4]=u-y,e[5]=1-c-p,e[6]=f+m,e[7]=0,e[8]=d+g,e[9]=f-m,e[10]=1-c-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),ez=p({"node_modules/gl-mat4/frustum.js"(e,t){t.exports=function(e,t,r,i,n,a,o){var s=1/(r-t),l=1/(n-i),c=1/(a-o);return e[0]=2*a*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*a*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(n+i)*l,e[10]=(o+a)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*c,e[15]=0,e}}}),eD=p({"node_modules/gl-mat4/perspective.js"(e,t){t.exports=function(e,t,r,i,n){var a=1/Math.tan(t/2),o=1/(i-n);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+i)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*i*o,e[15]=0,e}}}),eO=p({"node_modules/gl-mat4/perspectiveFromFieldOfView.js"(e,t){t.exports=function(e,t,r,i){var n=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),c=2/(n+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(n-a)*c*.5,e[10]=i/(r-i),e[11]=-1,e[12]=0,e[13]=0,e[14]=i*r/(r-i),e[15]=0,e}}}),eR=p({"node_modules/gl-mat4/ortho.js"(e,t){t.exports=function(e,t,r,i,n,a,o){var s=1/(t-r),l=1/(i-n),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(n+i)*l,e[14]=(o+a)*c,e[15]=1,e}}}),eF=p({"node_modules/gl-mat4/lookAt.js"(e,t){var r=ef();t.exports=function(e,t,i,n){var a,o,s,l,c,u,h,d,f,p,m=t[0],g=t[1],y=t[2],v=n[0],x=n[1],b=n[2],_=i[0],w=i[1],T=i[2];return 1e-6>Math.abs(m-_)&&1e-6>Math.abs(g-w)&&1e-6>Math.abs(y-T)?r(e):(p=1/Math.sqrt((h=m-_)*h+(d=g-w)*d+(f=y-T)*f),h*=p,d*=p,f*=p,(p=Math.sqrt((a=x*f-b*d)*a+(o=b*h-v*f)*o+(s=v*d-x*h)*s))?(a*=p=1/p,o*=p,s*=p):(a=0,o=0,s=0),(p=Math.sqrt((l=d*s-f*o)*l+(c=f*a-h*s)*c+(u=h*o-d*a)*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0),e[0]=a,e[1]=l,e[2]=h,e[3]=0,e[4]=o,e[5]=c,e[6]=d,e[7]=0,e[8]=s,e[9]=u,e[10]=f,e[11]=0,e[12]=-(a*m+o*g+s*y),e[13]=-(l*m+c*g+u*y),e[14]=-(h*m+d*g+f*y),e[15]=1,e)}}}),ej=p({"node_modules/gl-mat4/str.js"(e,t){t.exports=function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}}}),eB=p({"node_modules/gl-mat4/index.js"(e,t){t.exports={create:eu(),clone:eh(),copy:ed(),identity:ef(),transpose:ep(),invert:em(),adjoint:eg(),determinant:ey(),multiply:ev(),translate:ex(),scale:eb(),rotate:e_(),rotateX:ew(),rotateY:eT(),rotateZ:eM(),fromRotation:ek(),fromRotationTranslation:eA(),fromScaling:eS(),fromTranslation:eE(),fromXRotation:eC(),fromYRotation:eL(),fromZRotation:eP(),fromQuat:eI(),frustum:ez(),perspective:eD(),perspectiveFromFieldOfView:eO(),ortho:eR(),lookAt:eF(),str:ej()}}}),eN=p({"src/lib/matrix.js"(e){var t=eB();e.init2dArray=function(e,t){for(var r=Array(e),i=0;id({valType:"string",dflt:"",editType:e},!1!==t?{arrayOk:!0}:{}),e.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>d({valType:"string",dflt:"",editType:e},!1!==t?{arrayOk:!0}:{}),e.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e}),e.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})}}),eY=p({"src/components/shapes/label_texttemplate.js"(e,t){function r(e,t){return t?t.d2l(e):e}function i(e){return e.x0shift||0}function n(e){return e.x1shift||0}function a(e){return e.y0shift||0}function o(e){return e.y1shift||0}function s(e,t){return r(e.x1,t)+n(e)-r(e.x0,t)-i(e)}function l(e,t,i){return r(e.y1,i)+o(e)-r(e.y0,i)-a(e)}t.exports={x0:function(e){return e.x0},x1:function(e){return e.x1},y0:function(e){return e.y0},y1:function(e){return e.y1},slope:function(e,t,r){return"line"!==e.type?void 0:l(e,t,r)/s(e,t)},dx:s,dy:l,width:function(e,t){return Math.abs(s(e,t))},height:function(e,t,r){return Math.abs(l(e,t,r))},length:function(e,t,r){return"line"!==e.type?void 0:Math.sqrt(Math.pow(s(e,t),2)+Math.pow(l(e,t,r),2))},xcenter:function(e,t){var a;return a=(r(e.x1,t)+n(e)+r(e.x0,t)+i(e))/2,t?t.l2d(a):a},ycenter:function(e,t,i){var n;return n=(r(e.y1,i)+o(e)+r(e.y0,i)+a(e))/2,i?i.l2d(n):n},simpleXVariables:["x0","x1","y0","y1","dy","height","ycenter"],simpleYVariables:["x0","x1","y0","y1","dx","width","xcenter"]}}}),eZ=p({"src/components/shapes/draw_newshape/attributes.js"(e,t){var r=eq().overrideAll,i=Z(),n=H(),a=eH().dash,o=q().extendFlat,{shapeTexttemplateAttrs:s,templatefallbackAttrs:l}=eW(),c=eY();t.exports=r({newshape:{visible:o({},i.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:o({},i.legend,{}),legendgroup:o({},i.legendgroup,{}),legendgrouptitle:{text:o({},i.legendgrouptitle.text,{}),font:n({})},legendrank:o({},i.legendrank,{}),legendwidth:o({},i.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:o({},a,{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:o({},i.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:s({newshape:!0},{keys:Object.keys(c)}),texttemplatefallback:l({editType:"arraydraw"}),font:n({}),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")}}),e$=p({"src/components/selections/draw_newselection/attributes.js"(e,t){var r=eH().dash;t.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:(0,q().extendFlat)({},r,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),eX=p({"src/plots/pad_attributes.js"(e,t){t.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}}}),eK=p({"src/plots/layout_attributes.js"(e,t){var r=H(),i=eV(),n=Q(),a=eZ(),o=e$(),s=eX(),l=q().extendFlat,c=r({editType:"calc"});c.family.dflt='"Open Sans", verdana, arial, sans-serif',c.size.dflt=12,c.color.dflt=n.defaultLine,t.exports={font:c,title:{text:{valType:"string",editType:"layoutstyle"},font:r({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:r({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:l(s({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:n.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:n.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:n.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:a.newshape,activeshape:a.activeshape,newselection:o.newselection,activeselection:o.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:l({},i.transition,{editType:"none"})}}}),eJ=p({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var e=document.createElement("style");e.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",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{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:\"\";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:\"\";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}",document.head.appendChild(e)}}}),eQ=p({"src/registry.js"(e){var t=J(),r=el(),i=ec(),n=(eU().addStyleRule,q()),a=Z(),o=eK(),s=n.extendFlat,l=n.extendDeepAll;function c(t){if(t.layoutAttributes){var r=t.layoutAttributes._arrayAttrRegexps;if(r)for(var n=0;n=t&&i<=r?i:l}if("string"!=typeof i&&"number"!=typeof i)return l;i=String(i);var v=b(n),_=i.charAt(0);v&&("G"===_||"g"===_)&&(i=i.slice(1),n="");var w=v&&"chinese"===n.slice(0,7),T=i.match(w?y:g);if(!T)return l;var M=T[1],k=T[3]||"1",A=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),C=Number(T[11]||0);if(v){if(2===M.length)return l;M=Number(M);try{var L,P=p.getComponentMethod("calendars","getCal")(n);if(w){var I="i"===k.charAt(k.length-1);k=parseInt(k,10),L=P.newDate(M,P.toMonthIndex(M,k,I),A)}else L=P.newDate(M,Number(k),A)}catch{return l}return L?(L.toJD()-f)*c+S*u+E*h+C*d:l}M=2===M.length?(Number(M)+2e3-x)%100+x:Number(M);var z=new Date(Date.UTC(2e3,k-=1,A,S,E));return z.setUTCFullYear(M),z.getUTCMonth()!==k||z.getUTCDate()!==A?l:z.getTime()+C*d},t=e.MIN_MS=e.dateTime2ms("-9999"),r=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(t,r){return e.dateTime2ms(t,r)!==l};var w=90*c,T=3*u,M=5*h;function A(e,t,r,i,n){if((t||r||i||n)&&(e+=" "+_(t,2)+":"+_(r,2),(i||n)&&(e+=":"+_(i,2),n))){for(var a=4;n%10==0;)a-=1,n/=10;e+="."+_(n,a)}return e}e.ms2DateTime=function(e,i,n){if("number"!=typeof e||!(e>=t&&e<=r))return l;i||(i=0);var a,s,g,y,v,x,_=Math.floor(10*o(e+.05,1)),k=Math.round(e-_/10);if(b(n)){var S=Math.floor(k/c)+f,E=Math.floor(o(e,c));try{a=p.getComponentMethod("calendars","getCal")(n).fromJD(S).formatDate("yyyy-mm-dd")}catch{a=m("G%Y-%m-%d")(new Date(k))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.slice(1);else for(;a.length<10;)a="0"+a;s=i=t+c&&e<=r-c))return l;var n=Math.floor(10*o(e+.05,1)),a=new Date(Math.round(e-n/10));return A(i("%Y-%m-%d")(a),a.getHours(),a.getMinutes(),a.getSeconds(),10*a.getUTCMilliseconds()+n)},e.cleanDate=function(t,r,i){if(t===l)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(b(i))return a.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,i))return a.error("unrecognized date",t),r;return t};var S=/%\d?f/g,E=/%h/g,P={1:"1",2:"1",3:"2",4:"2"};function I(e,t,r,i){e=e.replace(S,function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).slice(2).replace(/0+$/,"")||"0"});var n=new Date(Math.floor(t+.05));if(e=e.replace(E,function(){return P[r("%q")(n)]}),b(i))try{e=p.getComponentMethod("calendars","worldCalFmt")(e,t,i)}catch{return"Invalid"}return r(e)(n)}var z=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(e,t,r,i,a,s){if(a=b(a)&&a,!t)if("y"===r)t=s.year;else if("m"===r)t=s.month;else{if("d"!==r)return function(e,t){var r=o(e+.05,c),i=_(Math.floor(r/u),2)+":"+_(o(Math.floor(r/h),60),2);if("M"!==t){n(t)||(t=0);var a=(100+Math.min(o(e/d,60),z[t])).toFixed(t).slice(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),i+=":"+a}return i}(e,r)+` `+I(s.dayMonthYear,e,i,a);t=s.dayMonth+` -`+s.year}return I(t,e,i,a)};var D=3*c;e.incrementMonth=function(e,t,r){r=b(r)&&r;var i=o(e,c);if(e=Math.round(e-i),r)try{var n=Math.round(e/c)+f,s=p.getComponentMethod("calendars","getCal")(r),l=s.fromJD(n);return t%12?s.add(l,t,"m"):s.add(l,t/12,"y"),(l.toJD()-f)*c+i}catch{a.error("invalid ms "+e+" in calendar "+r)}var u=new Date(e+D);return u.setUTCMonth(u.getUTCMonth()+t)+i-D},e.findExactDates=function(e,t){for(var r,i,a=0,o=0,s=0,l=0,u=b(t)&&p.getComponentMethod("calendars","getCal")(t),h=0;ht}function l(e,t){return e>=t}e.findBin=function(e,i,n){if(t(i.start))return n?Math.ceil((e-i.start)/i.size-1e-9)-1:Math.floor((e-i.start)/i.size+1e-9);var c,u,h=0,d=i.length,f=0,p=d>1?(i[d-1]-i[0])/(d-1):1;for(u=p>=0?n?a:o:n?l:s,e+=1e-9*p*(n?-1:1)*(p>=0?1:-1);h90&&r.log("Long binary search..."),h-1},e.sorterAsc=function(e,t){return e-t},e.sorterDes=function(e,t){return t-e},e.distinctVals=function(t){var r=t.slice();for(r.sort(e.sorterAsc),i=r.length-1;i>-1&&r[i]===n;i--);for(var i,a,o=r[i]-r[0]||1,s=o/(i||1)/1e4,l=[],c=0;c<=i;c++){var u=r[c],h=u-a;void 0===a?(l.push(u),a=u):h>s&&(o=Math.min(o,h),l.push(u),a=u)}return{vals:l,minDiff:o}},e.roundUp=function(e,t,r){for(var i,n=0,a=t.length-1,o=0,s=+!r,l=+!!r,c=r?Math.ceil:Math.floor;n0&&(i=1),r&&i)return e.sort(t)}return i?e:e.reverse()},e.findIndexOfMin=function(e,t){t=t||i;for(var r,n=1/0,a=0;ae4});var e4,e6=f({"src/lib/sort_object_keys.ts"(){e4=e5}}),e8=p({"src/lib/stats.js"(e){var t=C(),r=z().isArrayOrTypedArray;e.aggNums=function(i,n,a,o){var s,l;if((!o||o>a.length)&&(o=a.length),t(n)||(n=!1),r(a[0])){for(l=Array(o),s=0;se.length-1)return e[e.length-1];var i=r%1;return i*e[Math.ceil(r)]+(1-i)*e[Math.floor(r)]}}}),e7=p({"src/lib/angles.js"(e,t){var r=(V(),v(B)),i=r.mod,n=r.modHalf,a=Math.PI,o=2*a;function s(e){return Math.abs(e[1]-e[0])>o-1e-14}function l(e,t){return n(t-e,o)}function c(e,t){if(s(t))return!0;t[0](n=i(n,o))&&(n+=o);var r,n,a=i(e,o),l=a+o;return a>=r&&a<=n||l>=r&&l<=n}function u(e,t,r,i,n,l,c){n=n||0,l=l||0;var u,h,d,f,p,m,g=s([r,i]);function y(e,t){return[e*Math.cos(t)+n,l-e*Math.sin(t)]}g?(h=0,d=a,f=o):r=n&&e<=a)},pathArc:function(e,t,r,i,n){return u(null,e,t,r,i,n,0)},pathSector:function(e,t,r,i,n){return u(null,e,t,r,i,n,1)},pathAnnulus:function(e,t,r,i,n,a){return u(e,t,r,i,n,a,1)}}}}),e9=p({"src/lib/anchor_utils.js"(e){e.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},e.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},e.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},e.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},e.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},e.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}}}),te=p({"src/lib/geometry2d.js"(e){var t,r,i,n=(V(),v(B)).mod;function a(e,t,r,i,n,a,o,s){var l=r-e,c=n-e,u=o-n,h=i-t,d=a-t,f=s-a,p=l*f-u*h;if(0===p)return null;var m=(c*f-u*d)/p,g=(c*h-l*d)/p;return g<0||g>1||m<0||m>1?null:{x:e+l*m,y:t+h*m}}function o(e,t,r,i,n){var a=i*e+n*t;if(a<0)return i*i+n*n;if(a>r){var o=i-e,s=n-t;return o*o+s*s}var l=i*t-n*e;return l*l/r}e.segmentsIntersect=a,e.segmentDistance=function(e,t,r,i,n,s,l,c){if(a(e,t,r,i,n,s,l,c))return 0;var u=r-e,h=i-t,d=l-n,f=c-s,p=u*u+h*h,m=d*d+f*f;return Math.sqrt(Math.min(o(u,h,p,n-e,s-t),o(u,h,p,l-e,c-t),o(d,f,m,e-n,t-s),o(d,f,m,r-n,i-s)))},e.getTextLocation=function(e,a,o,s){if((e!==r||s!==i)&&(t={},r=e,i=s),t[o])return t[o];var l=e.getPointAtLength(n(o-s/2,a)),c=e.getPointAtLength(n(o+s/2,a)),u=Math.atan((c.y-l.y)/(c.x-l.x)),h=e.getPointAtLength(n(o,a)),d={x:(4*h.x+l.x+c.x)/6,y:(4*h.y+l.y+c.y)/6,theta:u};return t[o]=d,d},e.clearLocationCache=function(){r=null},e.getVisibleSegment=function(e,t,r){var i,n,a=t.left,o=t.right,s=t.top,l=t.bottom,c=0,u=e.getTotalLength(),h=u;function d(t){var r=e.getPointAtLength(t);0===t?i=r:t===u&&(n=r);var c=r.xo?r.x-o:0,h=r.yl?r.y-l:0;return Math.sqrt(c*c+h*h)}for(var f=d(c);f;){if((c+=f+r)>h)return;f=d(c)}for(f=d(h);f;){if(c>(h-=f+r))return;f=d(h)}return{min:c,max:h,len:h-c,total:u,isClosed:0===c&&h===u&&.1>Math.abs(i.x-n.x)&&.1>Math.abs(i.y-n.y)}},e.findPointOnPath=function(e,t,r,i){i=i||{};for(var n,a,o,s=i.pathLength||e.getTotalLength(),l=i.tolerance||.001,c=i.iterationLimit||30,u=e.getPointAtLength(0)[r]>e.getPointAtLength(s)[r]?-1:1,h=0,d=0,f=s;h0?f=n:d=n,h++;return a}}}),tt=p({"src/lib/throttle.js"(e){var t={};function r(e){e&&null!==e.timer&&(clearTimeout(e.timer),e.timer=null)}e.throttle=function(e,i,n){var a=t[e],o=Date.now();if(!a){for(var s in t)t[s].tsa.ts+i)?l():a.timer=setTimeout(function(){l(),a.timer=null},i)},e.done=function(e){var r=t[e];return r&&r.timer?new Promise(function(e){var t=r.onDone;r.onDone=function(){t&&t(),e(),r.onDone=null}}):Promise.resolve()},e.clear=function(i){if(i)r(t[i]),delete t[i];else for(var n in t)e.clear(n)}}}),tr=p({"src/lib/clear_responsive.js"(e,t){t.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}}}),ti=p({"node_modules/is-mobile/index.js"(e,t){t.exports=a,t.exports.isMobile=a,t.exports.default=a;var r=/(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,i=/CrOS/,n=/android|ipad|playbook|silk/i;function a(e){e||(e={});let t=e.ua;if(!t&&"u">typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),"string"!=typeof t)return!1;let a=r.test(t)&&!i.test(t)||!!e.tablet&&n.test(t);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==t.indexOf("Macintosh")&&-1!==t.indexOf("Safari")&&(a=!0),a}}}),tn=p({"src/lib/preserve_drawing_buffer.js"(e,t){var r=C(),i=ti();t.exports=function(e){if("string"!=typeof(n=e&&e.hasOwnProperty("userAgent")?e.userAgent:("u">typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),t)))return!0;var t,n,a=i({ua:{headers:{"user-agent":n}},tablet:!0,featureDetect:!1});if(!a){for(var o=n.split(" "),s=1;s-1;l--){var c=o[l];if("Version/"===c.slice(0,8)){var u=c.slice(8).split(".")[0];if(r(u)&&(u*=1),u>=13)return!0}}}return a}}}),ta=p({"src/lib/make_trace_groups.js"(e,t){var r=T();t.exports=function(e,t,i){var n=e.selectAll("g."+i.replace(/\s/g,".")).data(t,function(e){return e[0].trace.uid});n.exit().remove(),n.enter().append("g").attr("class",i),n.order();var a=e.classed("rangeplot")?"nodeRangePlot3":"node3";return n.each(function(e){e[0][a]=r.select(this)}),n}}}),to=p({"src/lib/localize.js"(e,t){var r=eQ();t.exports=function(e,t){for(var i=e._context.locale,n=0;n<2;n++){for(var a=e._context.locales,o=0;o<2;o++){var s=(a[i]||{}).dictionary;if(s){var l=s[t];if(l)return l}a=r.localeRegistry}var c=i.split("-")[0];if(c===i)break;i=c}return t}}}),ts=p({"src/lib/filter_unique.js"(e,t){t.exports=function(e){for(var t={},r=[],i=0,n=0;n1?(r*e+r*t)/r:e+t,n=String(i).length;if(n>16){var a=String(t).length;if(n>=String(e).length+a){var o=parseFloat(i).toPrecision(12);-1===o.indexOf("e+")&&(i=+o)}}return i}}}),tu={};function th(e){return"string"==typeof e&&(e=e.replace(tp,"")),(0,td.default)(e)?Number(e):tf.BADNUM}m(tu,{default:()=>tm});var td,tf,tp,tm,tg=f({"src/lib/clean_number.ts"(){td=y(C()),tf=y(L()),tp=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,tm=th}}),ty=p({"src/lib/slugify.js"(e,t){var r=/<[^>]*>/g,i=/[\p{S}\p{P}]/gu,n=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,a=/�/g,o=/\s+/g,s="-".replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=RegExp(s+"{3,}","g"),c=RegExp(s+"$","g");t.exports=function(e,t=60){var s,u=("function"==typeof(s=e??"").toWellFormed?s.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(s))).replace(a,"").replace(r," ").replace(i,e=>"-"===e?e:"").toLowerCase().trim().replace(o,"-").replace(n,"").replace(l,"-");return u.length<=t?u:Array.from(u).slice(0,t).join("").replace(c,"")}}}),tv=p({"src/lib/index.js"(e,t){var i=T(),a=k().utcFormat,o=A().format,s=C(),l=L(),c=l.FP_SAFE,u=-c,h=l.BADNUM,f=t.exports={};f.adjustFormat=function(e){if(!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e))return e;if("0.f"===e)return"~f";if(/^\d%/.test(e))return"~%";if(/^\ds/.test(e))return"~s";var t=(e.match(/^[+\-( ]?/)||[""])[0],r=e.slice(t.length);return!/^[~,.0$#]/.test(r)&&/[&fps]/.test(r)?t+"~"+r:e};var p={};f.warnBadFormat=function(e){var t=String(e);p[t]||(p[t]=1,f.warn('encountered bad format: "'+t+'"'))},f.noFormat=function(e){return String(e)},f.numberFormat=function(e){var t;try{t=o(f.adjustFormat(e))}catch{return f.warnBadFormat(e),f.noFormat}return t},f.nestedProperty=D(),f.keyedContainer=O(),f.relativeAttr=R(),f.isPlainObject=I(),f.toLogRange=F(),f.relinkPrivateKeys=j();var m=z();f.isArrayBuffer=m.isArrayBuffer,f.isTypedArray=m.isTypedArray,f.isArrayOrTypedArray=m.isArrayOrTypedArray,f.isArray1D=m.isArray1D,f.ensureArray=m.ensureArray,f.concat=m.concat,f.maxRowLength=m.maxRowLength,f.minRowLength=m.minRowLength;var g=(V(),v(B));f.mod=g.mod,f.modHalf=g.modHalf;var y=es();f.valObjectMeta=y.valObjectMeta,f.coerce=y.coerce,f.coerce2=y.coerce2,f.coerceFont=y.coerceFont,f.coercePattern=y.coercePattern,f.coerceHoverinfo=y.coerceHoverinfo,f.coerceSelectionMarkerOpacity=y.coerceSelectionMarkerOpacity,f.validate=y.validate;var x=e0();f.dateTime2ms=x.dateTime2ms,f.isDateTime=x.isDateTime,f.ms2DateTime=x.ms2DateTime,f.ms2DateTimeLocal=x.ms2DateTimeLocal,f.cleanDate=x.cleanDate,f.isJSDate=x.isJSDate,f.formatDate=x.formatDate,f.incrementMonth=x.incrementMonth,f.dateTick0=x.dateTick0,f.dfltRange=x.dfltRange,f.findExactDates=x.findExactDates,f.MIN_MS=x.MIN_MS,f.MAX_MS=x.MAX_MS;var b=e2();f.findBin=b.findBin,f.sorterAsc=b.sorterAsc,f.sorterDes=b.sorterDes,f.distinctVals=b.distinctVals,f.roundUp=b.roundUp,f.sort=b.sort,f.findIndexOfMin=b.findIndexOfMin,f.sortObjectKeys=(e6(),v(e3)).default;var _=e8();f.aggNums=_.aggNums,f.len=_.len,f.mean=_.mean,f.geometricMean=_.geometricMean,f.median=_.median,f.midRange=_.midRange,f.variance=_.variance,f.stdev=_.stdev,f.interp=_.interp;var w=eN();f.init2dArray=w.init2dArray,f.transposeRagged=w.transposeRagged,f.dot=w.dot,f.translationMatrix=w.translationMatrix,f.rotationMatrix=w.rotationMatrix,f.rotationXYMatrix=w.rotationXYMatrix,f.apply3DTransform=w.apply3DTransform,f.apply2DTransform=w.apply2DTransform,f.apply2DTransform2=w.apply2DTransform2,f.convertCssMatrix=w.convertCssMatrix,f.inverseTransformMatrix=w.inverseTransformMatrix;var M=e7();f.deg2rad=M.deg2rad,f.rad2deg=M.rad2deg,f.angleDelta=M.angleDelta,f.angleDist=M.angleDist,f.isFullCircle=M.isFullCircle,f.isAngleInsideSector=M.isAngleInsideSector,f.isPtInsideSector=M.isPtInsideSector,f.pathArc=M.pathArc,f.pathSector=M.pathSector,f.pathAnnulus=M.pathAnnulus;var S=e9();f.isLeftAnchor=S.isLeftAnchor,f.isCenterAnchor=S.isCenterAnchor,f.isRightAnchor=S.isRightAnchor,f.isTopAnchor=S.isTopAnchor,f.isMiddleAnchor=S.isMiddleAnchor,f.isBottomAnchor=S.isBottomAnchor;var E=te();f.segmentsIntersect=E.segmentsIntersect,f.segmentDistance=E.segmentDistance,f.getTextLocation=E.getTextLocation,f.clearLocationCache=E.clearLocationCache,f.getVisibleSegment=E.getVisibleSegment,f.findPointOnPath=E.findPointOnPath;var P=q();f.extendFlat=P.extendFlat,f.extendDeep=P.extendDeep,f.extendDeepAll=P.extendDeepAll,f.extendDeepNoArrays=P.extendDeepNoArrays;var N=J();f.log=N.log,f.warn=N.warn,f.error=N.error,f.counterRegex=(eo(),v(ei)).counter;var U=tt();f.throttle=U.throttle,f.throttleDone=U.done,f.clearThrottle=U.clear;var H=eU();f.getGraphDiv=H.getGraphDiv,f.isPlotDiv=H.isPlotDiv,f.removeElement=H.removeElement,f.addStyleRule=H.addStyleRule,f.addRelatedStyleRule=H.addRelatedStyleRule,f.deleteRelatedStyleRule=H.deleteRelatedStyleRule,f.setStyleOnHover=H.setStyleOnHover,f.getFullTransformMatrix=H.getFullTransformMatrix,f.getElementTransformMatrix=H.getElementTransformMatrix,f.getElementAndAncestors=H.getElementAndAncestors,f.equalDomRects=H.equalDomRects,f.clearResponsive=tr(),f.preserveDrawingBuffer=tn(),f.makeTraceGroups=ta(),f._=to(),f.notifier=K(),f.filterUnique=ts(),f.filterVisible=tl(),f.pushUnique=ec(),f.increment=tc(),f.cleanNumber=(tg(),v(tu)).default,f.slugify=ty(),f.ensureNumber=function(e){return s(e)?(e=Number(e))>c||e=t))&&s(e)&&e>=0&&e%1==0},f.noop=el(),f.identity=e1(),f.repeat=function(e,t){for(var r=Array(t),i=0;ir?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},f.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},f.simpleMap=function(e,t,r,i,n){for(var a=e.length,o=Array(a),s=0;s=Math.pow(2,r)?n>10?(f.warn("randstr failed uniqueness"),s):e(t,r,i,(n||0)+1):s},f.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(i){i[t]=e,r[i.name]=i,r.optionList.push(i)},r["_"+t]=e,r},f.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,i,n,a,o=e.length,s=2*o,l=2*t-1,c=Array(l),u=Array(o);for(r=0;r=s&&(n-=s*Math.floor(n/s)),n<0?n=-1-n:n>=o&&(n=s-1-n),a+=e[n]*c[i];u[r]=a}return u},f.syncOrAsync=function(e,t,r){var i;function n(){return f.syncOrAsync(e,t,r)}for(;e.length;)if((i=(0,e.splice(0,1)[0])(t))&&i.then)return i.then(n);return r&&r(t)},f.stripTrailingSlash=function(e){return"/"===e.slice(-1)?e.slice(0,-1):e},f.noneOrAll=function(e,t,r){if(e){var i,n=!1,a=!0;for(i=0;i0?t:0})},f.fillArray=function(e,t,r,i){if(i=i||f.identity,f.isArrayOrTypedArray(e))for(var n=0;nY.test(window.navigator.userAgent);var Z=/Firefox\/(\d+)\.\d+/;f.getFirefoxVersion=function(){var e=Z.exec(window.navigator.userAgent);if(e&&2===e.length){var t=parseInt(e[1]);if(!isNaN(t))return t}return null},f.isD3Selection=function(e){return e instanceof i.selection},f.ensureSingle=function(e,t,r,i){var n=e.select(t+(r?"."+r:""));if(n.size())return n;var a=e.append(t);return r&&a.classed(r,!0),i&&a.call(i),a},f.ensureSingleById=function(e,t,r,i){var n=e.select(t+"#"+r);if(n.size())return n;var a=e.append(t).attr("id",r);return i&&a.call(i),a},f.objectFromPath=function(e,t){for(var r,i=e.split("."),n=r={},a=0;a1?n+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;i.test(s);)s=s.replace(i,"$1"+a+"$2");return s+l},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var ee=/^\w*$/;f.templateString=function(e,t){var r={};return e.replace(f.TEMPLATE_STRING_REGEX,function(e,i){var n;return ee.test(i)?n=t[i]:(r[i]=r[i]||f.nestedProperty(t,i).get,n=r[i](!0)),void 0!==n?n:""})};var et={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=e=>eh(r(d({},e),n({opts:et})));var er={max:10,count:0,name:"texttemplate"};f.texttemplateString=e=>eh(r(d({},e),n({opts:er})));var en=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,ea={max:10,count:0,name:"texttemplate",parseMultDiv:!0};f.texttemplateStringForShapes=e=>eh(r(d({},e),n({opts:ea})));var eu=/^[:|\|]/;function eh({data:e=[],locale:t,fallback:r,labels:i={},opts:n,template:o}){return o.replace(f.TEMPLATE_STRING_REGEX,(o,s,l)=>{let c,u=["xother","yother"].includes(s),h=["_xother","_yother"].includes(s),d=["_xother_","_yother_"].includes(s),p=["xother_","yother_"].includes(s),m=u||h||p||d;(h||d)&&(s=s.substring(1)),(p||d)&&(s=s.substring(0,s.length-1));let g=null,y=null;if(n.parseMultDiv){var v,x,b,_=(x=(v=s).match(en))?{key:x[1],op:x[2],number:Number(x[3])}:{key:v,op:null,number:null};s=_.key,g=_.op,y=_.number}if(m){if(void 0===i[s])return"";c=i[s]}else for(let t of e)if(t){if(t.hasOwnProperty(s)){c=t[s];break}if(ee.test(s)||(c=f.nestedProperty(t,s).get(!0)),void 0!==c)break}if(void 0===c){let{count:e,max:t,name:i}=n,a=!1===r?o:r;return e=48&&o<=57,c=s>=48&&s<=57;if(l&&(i=10*i+o-48),c&&(n=10*n+s-48),!l||!c){if(i!==n)return i-n;if(o!==s)return o-s}}return n-i};var ed=2e9;f.seedPseudoRandom=function(){ed=2e9},f.pseudoRandom=function(){var e=ed;return 0x19999999>Math.abs((ed=(69069*ed+1)%0x100000000)-e)?f.pseudoRandom():ed/0x100000000},f.fillText=function(e,t,r){var i=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},n=f.extractOption(e,t,"htx","hovertext");if(f.isValidTextValue(n))return i(n);var a=f.extractOption(e,t,"tx","text");if(f.isValidTextValue(a))return i(a)},f.isValidTextValue=function(e){return e||0===e},f.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",i=0;i1&&(c=1):c=0,f.strTranslate(n-c*(r+o),a-c*(i+s))+f.strScale(c)+(l?"rotate("+l+(t?"":" "+r+" "+i)+")":"")},f.setTransormAndDisplay=function(e,t){e.attr("transform",f.getTextTransform(t)),e.style("display",t.scale?null:"none")},f.ensureUniformFontSize=function(e,t){var r=f.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},f.join2=function(e,t,r){var i=e.length;return i>1?e.slice(0,-1).join(t)+r+e[i-1]:e.join(t)},f.bigFont=function(e){return Math.round(1.2*e)};var ef=f.getFirefoxVersion(),ep=null!==ef&&ef<86;f.getPositionFromD3Event=function(){return ep?[i.event.layerX,i.event.layerY]:[i.event.offsetX,i.event.offsetY]}}}),tx=p({"build/plotcss.js"(){var e,t,r=tv(),i={"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(t in i)e=t.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),r.addStyleRule(e,i[t])}}),tb=p({"node_modules/is-browser/client.js"(e,t){t.exports=!0}}),t_=p({"node_modules/has-hover/index.js"(e,t){var r=tb();t.exports="function"==typeof window.matchMedia?!window.matchMedia("(hover: none)").matches:r}}),tw=p({"node_modules/events/events.js"(e,t){var r,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(e,t){return new Promise(function(r,i){var n,a,o;function s(r){e.removeListener(t,l),i(r)}function l(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}g(e,t,l,{once:!0}),"error"!==t&&(n=e,a=s,o={once:!0},"function"==typeof n.on&&g(n,"error",a,o))})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function l(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,i){var n,a,o;if(l(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),void 0===o)o=a[t]=r,++e._eventsCount;else if("function"==typeof o?o=a[t]=i?[r,o]:[o,r]:i?o.unshift(r):o.push(r),(n=c(e))>0&&o.length>n&&!o.warned){o.warned=!0;var s=Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=h.bind(i);return n.listener=r,i.wrapFn=n,n}function f(e,t,r){var i=e._events;if(void 0===i)return[];var n=i[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(e){for(var t=Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var o,s=Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else for(var c=l.length,u=m(l,c),r=0;r=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,n=a;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}}}),tT=p({"src/lib/events.js"(e,t){var r=tw().EventEmitter;t.exports={init:function(e){if(e._ev instanceof r)return e;var t=new r,i=new r;return e._ev=t,e._internalEv=i,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=i.on.bind(i),e._internalOnce=i.once.bind(i),e._removeInternalListener=i.removeListener.bind(i),e._removeAllInternalListeners=i.removeAllListeners.bind(i),e.emit=function(e,r){t.emit(e,r),i.emit(e,r)},"function"==typeof e.addEventListener&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var i,n=e._ev;if(n){var a=n._events[t];if(a){for(a=Array.isArray(a)?a:[a],i=0;ii.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)},n.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},n.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},n.undo=function(e){var t,r;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=a.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];if(!x(o))return!1;e=a[n][o]}else e=a[n]}else e=a}}return e}function x(e){return e===Math.round(e)&&e>=0}function b(t){var r,i;return r=t,e.crawl(r,function(t,r,i){!e.isValObject(t)&&u(t)&&(t.role="object")}),i=t,e.crawl(i,function(e,t,r){if(e){var i=e[m];i&&(delete e[m],r[t]={items:{}},r[t].items[i]=e,r[t].role="object")}}),!function e(t){for(var r in t)if(u(t[r]))e(t[r]);else if(Array.isArray(t[r]))for(var i=0;i=a&&(n._input||{})._templateitemname;s&&(o=a);var l,c=r+"["+o+"]";function u(){l={},s&&(l[c]={},l[c][i]=s)}function h(e,r){s?t.nestedProperty(l[c],e).set(r):l[c+"."+e]=r}function d(){var e=l;return u(),e}return u(),{modifyBase:function(e,t){l[e]=t},modifyItem:h,getUpdateObj:d,applyUpdate:function(r,i){r&&h(r,i);var n=d();for(var a in n)t.nestedProperty(e,a).set(n[a])}}}}}),tE=p({"src/plots/cartesian/constants.js"(e,t){var r=(eo(),v(ei)).counter;t.exports={idRegex:{x:r("x","( domain)?"),y:r("y","( domain)?")},attrRegex:r("[xy]axis"),xAxisMatch:r("xaxis"),yAxisMatch:r("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"}}}),tC=p({"src/plots/cartesian/axis_ids.js"(e){var t=eQ(),r=tE();function i(e,t){if(t&&t.length){for(var r=0;ri?1:-1:(e.slice(1)||1)-(t.slice(1)||1)},e.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},e.isLinked=function(e,t){return i(t,e._axisMatchGroups)||i(t,e._axisConstraintGroups)}}}),tL=p({"src/components/shapes/handle_outline.js"(e,t){t.exports={clearOutlineControllers:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()},clearOutline:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}}}}),tP=p({"src/traces/scatter/layout_attributes.js"(e,t){t.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}}),tI=p({"src/plots/get_data.js"(e){var t=eQ();tE().SUBPLOT_PATTERN,e.getSubplotCalcData=function(e,r,i){var n=t.subplotsRegistry[r];if(!n)return[];for(var a=n.attr,o=[],s=0;s0?".":"")+a;r.isPlainObject(s)?o(s,t,l,n+1):t(l,a,s)}})}e.manageCommandObserver=function(t,n,a,o){var s={},l=!0;n&&n._commandObserver&&(s=n._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=e.hasSimpleAPICommandBindings(t,a,s.lookupTable);if(n&&n._commandObserver){if(c)return s;if(n._commandObserver.remove)return n._commandObserver.remove(),n._commandObserver=null,s}if(c){i(t,c,s.cache),s.check=function(){if(l){var e=i(t,c,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;h1&&z.length>1){for(s.getComponentMethod("grid","sizeDefaults")(c,l),o=0;o15&&z.length>15&&0===l.shapes.length&&0===l.images.length,w.linkSubplots(d,l,h,a),w.cleanPlot(d,l,h,a);var B=!!(a._has&&a._has("cartesian")),N=!!(l._has&&l._has("cartesian"));B&&!N?a._bgLayer.remove():N&&!B&&(l._shouldCreateBgLayer=!0),a._zoomlayer&&!e._dragging&&p({_fullLayout:a}),function(e,t){var r,i=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var n=0;n0){var h=1-2*s;i=Math.round(h*i),a=Math.round(h*a)}}var d=w.layoutAttributes.width.min,f=w.layoutAttributes.height.min;i1,m=!t.height&&Math.abs(r.height-a)>1;(m||p)&&(p&&(r.width=i),m&&(r.height=a)),e._initialAutoSize||(e._initialAutoSize={width:i,height:a}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(e,t,r,i){var n,a,o,l=s.componentsRegistry,c=t._basePlotModules,h=s.subplotsRegistry.cartesian;for(n in l)(o=l[n]).includeBasePlot&&o.includeBasePlot(e,t);for(var d in c.length||c.push(h),t._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(e,t),h.finalizeSubplots(e,t)),t._subplots)t._subplots[d].sort(u.subplotSort);for(a=0;a1&&(r.l/=y,r.r/=y)}if(f){var v=(r.t+r.b)/f;v>1&&(r.t/=v,r.b/=v)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,T=void 0!==r.yb?r.yb:r.y;p[t]={l:{val:x,size:r.l+g},r:{val:b,size:r.r+g},b:{val:T,size:r.b+g},t:{val:_,size:r.t+g}},m[t]=1}else delete p[t],delete m[t];if(!i._replotting)return w.doAutoMargin(e)}},w.doAutoMargin=function(e){var t,r,i=e._fullLayout,a=i.width,o=i.height;i._size||(i._size={}),D(i);var l=i._size,c=i.margin,h={t:0,b:0,l:0,r:0},d=u.extendFlat({},l),p=c.l,m=c.r,g=c.t,y=c.b,v=i._pushmargin,x=i._pushmarginIds,b=i.minreducedwidth,_=i.minreducedheight;if(!1!==c.autoexpand){for(var T in v)x[T]||delete v[T];var M=e._fullLayout._reservedMargin;for(var k in M)for(var A in M[k]){var S=M[k][A];h[A]=Math.max(h[A],S)}for(var E in v.base={l:{val:0,size:p},r:{val:1,size:m},t:{val:1,size:g},b:{val:0,size:y}},h){var C=0;for(var L in v)"base"!==L&&n(v[L][E].size)&&(C=v[L][E].size>C?v[L][E].size:C);var P=Math.max(0,c[E]-C);h[E]=Math.max(0,h[E]-P)}for(var I in v){var z=v[I].l||{},O=v[I].b||{},R=z.val,F=z.size,j=O.val,B=O.size,N=a-h.r-h.l,U=o-h.t-h.b;for(var V in v){if(n(F)&&v[V].r){var q=v[V].r.val,H=v[V].r.size;if(q>R){var G=(F*q+(H-N)*R)/(q-R),W=(H*(1-R)+(F-N)*(1-q))/(q-R);G+W>p+m&&(p=G,m=W)}}if(n(B)&&v[V].t){var Y=v[V].t.val,Z=v[V].t.size;if(Y>j){var $=(B*Y+(Z-U)*j)/(Y-j),X=(Z*(1-j)+(B-U)*(1-Y))/(Y-j);$+X>y+g&&(y=$,g=X)}}}}}var K=u.constrain(a-c.l-c.r,2,b),J=u.constrain(o-c.t-c.b,2,_),Q=Math.max(0,a-K),ee=Math.max(0,o-J);if(Q){var et=(p+m)/Q;et>1&&(p/=et,m/=et)}if(ee){var er=(y+g)/ee;er>1&&(y/=er,g/=er)}if(l.l=Math.round(p)+h.l,l.r=Math.round(m)+h.r,l.t=Math.round(g)+h.t,l.b=Math.round(y)+h.b,l.p=Math.round(c.pad),l.w=Math.round(a)-l.l-l.r,l.h=Math.round(o)-l.t-l.b,!i._replotting&&(w.didMarginChange(d,l)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=f.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in i?i._redrawFromAutoMarginCount++:i._redrawFromAutoMarginCount=1;var ei=3*(1+Object.keys(x).length);if(i._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){i=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return s.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var a=0,o=0;function l(){return a++,function(){var t;o++,i||o!==a||(t=n,e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return s.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(t)))}}r.runFn(l),setTimeout(l())})}],a=u.syncOrAsync(n,e);return a&&a.then||(a=Promise.resolve()),a.then(function(){return e})}w.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},w.graphJson=function(e,t=!1,r="json",i=!1,n=!1){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&w.supplyDefaults(e);var o=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function c(e,t){if("function"==typeof e)return t?"_function_":null;if(u.isPlainObject(e)){var r={};return Object.keys(e).sort().forEach(function(i){if(-1===["_","["].indexOf(i.charAt(0))){if("function"==typeof e[i]){t&&(r[i]="_function");return}r[i]=c(e[i],t)}}),r}var i=Array.isArray(e),n=u.isTypedArray(e);if((i||n)&&e.dtype&&e.shape){var o=e.bdata;return c({dtype:e.dtype,shape:e.shape,bdata:u.isArrayBuffer(o)?a.encode(o):o},t)}return i?e.map(function(e){return c(e,t)}):n?u.simpleMap(e,u.identity):u.isJSDate(e)?u.ms2DateTimeLocal(+e):e}var h={data:(o||[]).map(function(e){var r=c(e);return t&&delete r.fit,r})};if(!t&&(h.layout=c(s),i)){var d=s._size;h.layout.computed={margin:{b:d.b,l:d.l,r:d.r,t:d.t}}}return l&&(h.frames=c(l)),n&&(h.config=c(e._context,!0)),"object"===r?h:JSON.stringify(h)},w.modifyFrames=function(e,t){var r,i,n,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;re?e.match(o):null;e.matchTex=s,e.convertToTspans=function(o,y,T){let C;var L=o.text(),z=!o.attr("data-notex")&&y&&y._context.typesetMath&&s(L);z&&!(3===(C=h())||4===C||(null===C?d||(d=!0,r.warn("MathJax is not loaded. Math equations will not be rendered.")):f||(f=!0,r.warn("Unsupported MathJax version:",MathJax.version)),0))&&(z=null);var D=t.select(o.node().parentNode);if(!D.empty()){var O=o.attr("class")?o.attr("class").split(" ")[0]:"text";return O+="-math",D.selectAll("svg."+O).remove(),D.selectAll("g."+O+"-group").remove(),o.style("display",null).attr({"data-unformatted":L,"data-math":"N"}),z?(y&&y._promises||[]).push(new Promise(function(e){let n;o.style("display","none");var a,s,d,f,p=parseInt(o.node().style.fontSize,10),m={fontSize:p},g=o.attr("text-anchor");a=z[2],s=m,d=function(t,r,n){D.selectAll("svg."+O).remove(),D.selectAll("g."+O+"-group").remove();var a=t&&t.select("svg");if(!a||!a.node()){R(),e();return}o.style("display","none");var s=D.append("g").classed(O+"-group",!0).attr({"pointer-events":"none","data-unformatted":L,"data-math":"Y"});s.node().appendChild(a.node()),r&&r.node()&&a.node().insertBefore(r.node().cloneNode(!0),a.node().firstChild);var l=n.width,c=n.height;a.attr({class:O,height:c,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":m.fontSize+"px"});var u=o.node().style.fill||"black",h=a.select("g");h.attr({fill:u,stroke:u});var d=h.node().getBoundingClientRect(),f=d.width,y=d.height;(f>l||y>c)&&(a.style("overflow","hidden"),f=(d=a.node().getBoundingClientRect()).width,y=d.height);var v=+o.attr("x"),x=+o.attr("y"),b=-(p||o.node().getBoundingClientRect().height)/4;"y"===O[0]?s.attr({transform:"rotate("+[-90,v,x]+")"+i(-f/2,b-y/2)}):"l"===O[0]?x=b-y/2:"a"===O[0]&&0!==O.indexOf("atitle")?(v=0,x=b):(v-=f*("middle"===g?.5:+("end"===g)),x=x+b-y/2),a.attr({x:v,y:x}),T&&T.call(o,s),e(s)},n=h(),Promise.resolve().then(function(){if(!u){let e=MathJax._.output.svg_ts.SVG,t=r.extendFlat({},MathJax.config.svg,{fontCache:"local"});4===n&&(t.linebreaks=r.extendFlat({},t.linebreaks,{inline:!1})),u=MathJax._.mathjax.mathjax.document(document,r.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new e(t)}))}let e="math-output-"+r.randstr({},64);f=t.select("body").append("div").attr({id:e}).style({visibility:"hidden",position:"absolute","font-size":s.fontSize+"px"});let i=a.replace(l,"\\lt ").replace(c,"\\gt ").replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return u.convert(i,{display:!1})}).then(function(e){f.node().appendChild(e)})}).then(function(){let e=f.select(".MathJax"),t=!e.empty()&&f.select("svg").node();if(t){let r=t.getBoundingClientRect(),i=e.select("defs");d(e,i,r)}else r.log("There was an error in the tex syntax.",a),d();f.remove()}).catch(e=>{r.log("MathJax typesetting failed.",a,e),f&&f.remove(),d()})})):R(),o}function R(){D.empty()||(O=o.attr("class")+"-math",D.select("svg."+O).remove()),o.text("").style("white-space","pre"),function(e,i){i=i.replace(v," ");var o,s=!1,l=[],c=-1;function u(){c++;var r=document.createElementNS(n.svg,"tspan");t.select(r).attr({class:"line",dy:c*a+"em"}),e.appendChild(r),o=r;var i=l;if(l=[{node:r}],i.length>1)for(var s=1;s.",i);var t=l.pop();e!==t.type&&r.log("Start tag <"+t.type+"> doesnt match end tag <"+e+">. Pretending it did match.",i),o=l[l.length-1].node}(L);else{var D=C[4],O={type:L},R=S(D,w);if(R?(R=R.replace(E,"$1 fill:"),z&&(R+=";"+z)):z&&(R=z),R&&(O.style=R),"a"===L){s=!0;var F=S(D,M);if(F){var j=I(F);j&&(O.href=j,O.target=S(D,k)||"_blank",O.popup=S(D,A))}}h(O)}}return s}(o.node(),L)&&o.style("pointer-events","all"),e.positionText(o),T&&T.call(o)}};var l=/(<|<|<)/g,c=/(>|>|>)/g,u=null,h=()=>"u">typeof MathJax&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,d=!1,f=!1,p={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"},m={sub:"0.3em",sup:"-0.6em"},g={sub:"-0.21em",sup:"0.42em"},y=["http:","https:","mailto:","",void 0,":"],v=e.NEWLINES=/(\r\n?|\n)/g,x=/(<[^<>]*>)/,b=/<(\/?)([^ >]*)(\s+(.*))?>/i,_=//i;e.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,M=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,k=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,A=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function S(e,t){if(!e)return null;var r=e.match(t),i=r&&(r[3]||r[4]);return i&&P(i)}var E=/(^|;)\s*color:/;e.plainText=function(e,t){t=t||{};for(var r=void 0!==t.len&&-1!==t.len?t.len:1/0,i=void 0!==t.allowedTags?t.allowedTags:["br"],n=e.split(x),a=[],o="",s=0,l=0;l3?a.push(c.slice(0,Math.max(0,f-3))+"..."):a.push(c.slice(0,f));break}o=""}}return a.join("")};var C={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},L=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function P(e){return e.replace(L,function(e,t){return("#"===t.charAt(0)?function(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r((e>>10)+55232,e%1024+56320)}}("x"===t.charAt(1)?parseInt(t.slice(2),16):parseInt(t.slice(1),10)):C[t])||e})}function I(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),i=document.createElement("a");r.href=e,i.href=t;var n=r.protocol,a=i.protocol;return -1!==y.indexOf(n)&&-1!==y.indexOf(a)?t:""}function z(e,t,i){var n,a,o,s=i.horizontalAlign,l=i.verticalAlign||"top",c=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return a="bottom"===l?function(){return c.bottom-n.height}:"middle"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o="right"===s?function(){return c.right-n.width}:"center"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var e=o()-u.left,t=a()-u.top,s=i.gd||{};if(i.gd){s._fullLayout._calcInverseTransform(s);var l=r.apply3DTransform(s._fullLayout._invTransform)(e,t);e=l[0],t=l[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}e.convertEntities=P,e.sanitizeHTML=function(e){e=e.replace(v," ");for(var r=document.createElement("p"),i=r,n=[],a=e.split(x),o=0;o=0;i--,n++){var a=e[i];r[n]=[1-a[0],a[1]]}return r}function d(e,t){t=t||{};for(var n=e.domain,o=e.range,s=o.length,l=Array(s),c=0;cm-f?f=m-(p-m):p-m=0?s.colorscale.sequential:s.colorscale.sequentialminus,h._sync("colorscale",o))}}}),t3=p({"src/components/colorscale/index.js"(e,t){var r=et(),i=tj();t.exports={moduleType:"component",name:"colorscale",attributes:tV(),layoutAttributes:tq(),supplyLayoutDefaults:t0(),handleDefaults:tQ(),crossTraceDefaults:t1(),calc:t2(),scales:r.scales,defaultScale:r.defaultScale,getScale:r.get,isValidScale:r.isValid,hasColorscale:i.hasColorscale,extractOpts:i.extractOpts,extractScale:i.extractScale,flipScale:i.flipScale,makeColorScaleFunc:i.makeColorScaleFunc,makeColorScaleFuncFromTrace:i.makeColorScaleFuncFromTrace}}}),t5=p({"src/traces/scatter/subtypes.js"(e,t){var r=tv(),i=z().isTypedArraySpec;t.exports={hasLines:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("lines")},hasMarkers:function(e){return e.visible&&(e.mode&&-1!==e.mode.indexOf("markers")||"splom"===e.type)},hasText:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("text")},isBubble:function(e){var t=e.marker;return r.isPlainObject(t)&&(r.isArrayOrTypedArray(t.size)||i(t.size))}}}}),t4=p({"src/traces/scatter/make_bubble_size_func.js"(e,t){var r=C();t.exports=function(e,t){t||(t=2);var i=e.marker,n=i.sizeref||1,a=i.sizemin||0,o="area"===i.sizemode?function(e){return Math.sqrt(e/n)}:function(e){return e/n};return function(e){var i=o(e/t);return r(i)&&i>0?Math.max(i,a):0}}}}),t6=p({"src/components/fx/helpers.js"(e){var t=tv();e.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},e.isTraceInSubplots=function(t,r){if("splom"===t.type){for(var i=t.xaxes||[],n=t.yaxes||[],a=0;a=0&&r.index{let o,s=i.toLowerCase(),l=i,c=(o=a.match(n))?o.map(Number):[];for("m"===s&&c.length>2&&(t.push([l,...c.splice(0,2)]),s="l",l="m"===l?"l":"L");;){if(c.length===r[s])return t.push([l,...c]),"";if(c.length=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}A.symbolNumber=function(e){if(f(e))e*=1;else if("string"==typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=A.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=I||e>=400?0:Math.floor(Math.max(e,0))};var D=d("~f"),O={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}};function R(e,t,r,i,n,a,o,s,l,c){var d,f=n.length;"linear"===i?d={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:c}:"radial"===i&&(d={node:"radialGradient",reversed:c});for(var p=Array(f),g=0;g=0&&void 0===e.i&&(e.i=a.i),t.style("opacity",i.selectedOpacityFn?i.selectedOpacityFn(e):void 0===e.mo?o.opacity:e.mo),i.ms2mrc){l="various"===e.ms||"various"===o.size?3:i.ms2mrc(e.ms),e.mrc=l,i.selectedSizeFn&&(l=e.mrc=i.selectedSizeFn(e));var l,c=A.symbolNumber(e.mx||o.symbol)||0;e.om=c%200>=100;var u=ea(e,r),d=J(e,r);t.attr("d",z(c,l,u,d))}var f,p,g,y=!1;if(e.so)g=s.outlierwidth,p=s.outliercolor,f=o.outliercolor;else{var v=(s||{}).width;g=(e.mlw+1||v+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,p="mlc"in e?e.mlcc=i.lineScale(e.mlc):h.isArrayOrTypedArray(s.color)?m.defaultLine:s.color,h.isArrayOrTypedArray(o.color)&&(f=m.defaultLine,y=!0),f="mc"in e?e.mcc=i.markerScale(e.mc):o.color||o.colors||"rgba(0,0,0,0)",i.selectedColorFn&&(f=i.selectedColorFn(e))}let x=e.mld||(s||{}).dash;if(x&&A.dashLine(t,x,g),e.om)t.call(m.stroke,f).style({"stroke-width":(g||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:g)+"px");var b=o.gradient,_=e.mgt;_?y=!0:_=b&&b.type,h.isArrayOrTypedArray(_)&&(O[_=_[0]]||(_=0));var w=o.pattern,T=A.getPatternAttr,M=w&&(T(w.shape,e.i,"")||T(w.path,e.i,""));if(_&&"none"!==_){var k=e.mgc;k?y=!0:k=b.color;var S=r.uid;y&&(S+="-"+e.i),A.gradient(t,n,S,_,[[0,k],[1,f]],"fill")}else if(M){var E=!1,C=w.fgcolor;!C&&a&&a.color&&(C=a.color,E=!0);var L=T(C,e.i,a&&a.color||null),P=T(w.bgcolor,e.i,null),I=w.fgopacity,D=T(w.size,e.i,8),R=T(w.solidity,e.i,.3);E=E||e.mcc||h.isArrayOrTypedArray(w.shape)||h.isArrayOrTypedArray(w.path)||h.isArrayOrTypedArray(w.bgcolor)||h.isArrayOrTypedArray(w.fgcolor)||h.isArrayOrTypedArray(w.size)||h.isArrayOrTypedArray(w.solidity);var F=r.uid;E&&(F+="-"+e.i),A.pattern(t,"point",n,F,M,D,R,e.mcc,w.fillmode,P,L,I)}else h.isArrayOrTypedArray(f)?m.fill(t,f[e.i]):m.fill(t,f);g&&m.stroke(t,p)}},A.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=A.tryColorscale(r,""),t.lineScale=A.tryColorscale(r,"line"),p.traceIs(e,"symbols")&&(t.ms2mrc=w.isBubble(e)?M(e):function(){return(r.size||6)/2}),e.selectedpoints&&h.extendFlat(t,A.makeSelectedPointStyleFns(e)),t},A.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},i=e.unselected||{},n=e.marker||{},a=r.marker||{},o=i.marker||{},s=n.opacity,l=a.opacity,c=o.opacity,u=void 0!==l,d=void 0!==c;(h.isArrayOrTypedArray(s)||u||d)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?n.opacity:e.mo;return e.selected?u?l:t:d?c:_*t});var f=n.color,m=a.color,g=o.color;(m||g)&&(t.selectedColorFn=function(e){var t=e.mcc||f;return e.selected?m||t:g||t});var y=n.size,v=a.size,x=o.size,b=void 0!==v,w=void 0!==x;return p.traceIs(e,"symbols")&&(b||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||y/2;return e.selected?b?v/2:t:w?x/2:t}),t},A.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},i=e.unselected||{},n=e.textfont||{},a=r.textfont||{},o=i.textfont||{},s=n.color,l=a.color,c=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||s;return e.selected?l||t:c||(l?t:m.addOpacity(t,_))},t},A.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=A.makeSelectedPointStyleFns(t),i=t.marker||{},n=[];r.selectedOpacityFn&&n.push(function(e,t){e.style("opacity",r.selectedOpacityFn(t))}),r.selectedColorFn&&n.push(function(e,t){m.fill(e,r.selectedColorFn(t))}),r.selectedSizeFn&&n.push(function(e,n){var a=n.mx||i.symbol||0,o=r.selectedSizeFn(n);e.attr("d",z(A.symbolNumber(a),o,ea(n,t),J(n,t))),n.mrc2=o}),n.length&&e.each(function(e){for(var t=u.select(this),r=0;r0?r:0}function N(e,t,r){return r&&(e=W(e)),t?V(e[1]):U(e[0])}function U(e){var t=u.round(e,2);return r=t,t}function V(e){var t=u.round(e,2);return i=t,t}function q(e,t,r,i){var n=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(n*n+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*n-l*l*o)*i,h=(c*c*a-l*l*s)*i,d=3*c*(l+c),f=3*l*(l+c);return[[U(t[0]+(d&&u/d)),V(t[1]+(d&&h/d))],[U(t[0]-(f&&u/f)),V(t[1]-(f&&h/f))]]}A.textPointStyle=function(e,t,r){if(e.size()){if(t.selectedpoints){var i;i=A.makeSelectedTextStyleFns(t).selectedTextColorFn}var n=t.texttemplate,a=r._fullLayout;e.each(function(e){var o=u.select(this),s=n?h.extractOption(e,t,"txt","texttemplate"):h.extractOption(e,t,"tx","text");if(!s&&0!==s)return void o.remove();if(n){var l=t._module.formatLabels,c=l?l(e,t,a):{},d={};k(d,t,e.i),s=h.texttemplateString({data:[d,e,t._meta],fallback:t.texttemplatefallback,labels:c,locale:a._d3locale,template:s})}var f=e.tp||t.textposition,p=B(e,t),m=i?i(e):e.tc||t.textfont.color;o.call(A.font,{family:e.tf||t.textfont.family,weight:e.tw||t.textfont.weight,style:e.ty||t.textfont.style,variant:e.tv||t.textfont.variant,textcase:e.tC||t.textfont.textcase,lineposition:e.tE||t.textfont.lineposition,shadow:e.tS||t.textfont.shadow,size:p,color:m}).text(s).call(v.convertToTspans,r).call(j,f,p,e.mrc)})}},A.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=A.makeSelectedTextStyleFns(t);e.each(function(e){var i=u.select(this),n=r.selectedTextColorFn(e),a=e.tp||t.textposition,o=B(e,t);m.fill(i,n);var s=p.traceIs(t,"bar-like");j(i,a,o,e.mrc2||e.mrc,s)})}},A.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,i="M"+e[0],n=[];for(r=1;r=u||_>=f&&_<=u)&&(w<=p&&w>=d||w>=p&&w<=d)&&(e=[_,w])}return e}A.steps=function(e){var t=H[e]||G;return function(e){for(var r="M"+U(e[0][0])+","+V(e[0][1]),i=e.length,n=1;n=1e4&&(A.savedBBoxes={},Y=0),r&&(A.savedBBoxes[r]=m),Y++,h.extendFlat({},m)},A.setClipUrl=function(e,t,r){e.attr("clip-path",$(t,r))},A.getTranslate=function(e){var t=e.attr?"attr":"getAttribute",r=(e[t]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(e,t,r){return[t,r].join(" ")}).split(" ");return{x:+r[0]||0,y:+r[1]||0}},A.setTranslate=function(e,t,r){var i=e.attr?"attr":"getAttribute",n=e.attr?"attr":"setAttribute",a=e[i]("transform")||"";return t=t||0,r=r||0,a=(a=a.replace(/(\btranslate\(.*?\);?)/,"").trim()+y(t,r)).trim(),e[n]("transform",a),a},A.getScale=function(e){var t=e.attr?"attr":"getAttribute",r=(e[t]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(e,t,r){return[t,r].join(" ")}).split(" ");return{x:+r[0]||1,y:+r[1]||1}},A.setScale=function(e,t,r){var i=e.attr?"attr":"getAttribute",n=e.attr?"attr":"setAttribute",a=e[i]("transform")||"";return t=t||1,r=r||1,a=(a=a.replace(/(\bscale\(.*?\);?)/,"").trim()+("scale("+t+","+r)+")").trim(),e[n]("transform",a),a};var X=/\s*sc.*/;A.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var i=1===t&&1===r?"":"scale("+t+","+r+")";e.each(function(){var e=(this.getAttribute("transform")||"").replace(X,"");e+=i,e=e.trim(),this.setAttribute("transform",e)})}};var K=/translate\([^)]*\)\s*$/;function J(e,t){var r;return e&&(r=e.mf),void 0===r&&(r=t.marker&&t.marker.standoff||0),t._geo||t._xA?r:-r}A.setTextPointsScale=function(e,t,r){e&&e.each(function(){var e,i=u.select(this),n=i.select("text");if(n.node()){var a=parseFloat(n.attr("x")||0),o=parseFloat(n.attr("y")||0),s=(i.attr("transform")||"").match(K);e=1===t&&1===r?[]:[y(a,o),"scale("+t+","+r+")",y(-a,-o)],s&&e.push(s),i.attr("transform",e.join(""))}})},A.getMarkerStandoff=J;var Q=Math.atan2,et=Math.cos,ei=Math.sin;function en(e,t){var r=t[0],i=t[1];return[r*et(e)-i*ei(e),r*ei(e)+i*et(e)]}function ea(e,t){var r=e.ma;void 0===r&&(!f(r=t.marker.angle)||h.isArrayOrTypedArray(r))&&(r=0);var i,u,d=t.marker.angleref;if("previous"===d||"north"===d){if(t._geo){var p=t._geo.project(e.lonlat);i=p[0],u=p[1]}else{var m=t._xA,g=t._yA;if(!m||!g)return 90;i=m.c2p(e.x),u=g.c2p(e.y)}if(t._geo){var y,v=e.lonlat[0],x=e.lonlat[1],b=t._geo.project([v,x+1e-5]),_=t._geo.project([v+1e-5,x]),w=Q(_[1]-u,_[0]-i),T=Q(b[1]-u,b[0]-i);if("north"===d)y=r/180*Math.PI;else if("previous"===d){var M=x/180*Math.PI,k=a/180*Math.PI,A=n/180*Math.PI-v/180*Math.PI;y=-Q(et(k)*ei(A),ei(k)*et(M)-et(k)*ei(M)*et(A))-Math.PI,n=v,a=x}var S=en(w,[et(y),0]),E=en(T,[ei(y),0]);r=Q(S[1]+E[1],S[0]+E[0])/Math.PI*180,"previous"===d&&(c!==t.uid||e.i!==l+1)&&(r=null)}if("previous"===d&&!t._geo)if(c===t.uid&&e.i===l+1&&f(i)&&f(u)){var C=i-o,L=u-s,P=t.line&&t.line.shape||"",I=P.slice(P.length-1);"h"===I&&(L=0),"v"===I&&(C=0),r+=Q(L,C)/Math.PI*180+90}else r=null}return o=i,s=u,l=e.i,c=t.uid,r}A.getMarkerAngle=ea}}),re=p({"src/components/titles/index.js"(e,t){var r=T(),i=C(),n=tD(),a=eQ(),o=tv(),s=o.strTranslate,l=t9(),c=ee(),u=tF(),h=er(),d=tR().OPPOSITE_SIDE,f=/ [XY][0-9]* /;t.exports={draw:function(e,t,p){var m,g=e._fullLayout,y=p.propContainer,v=p.propName,x=p.placeholder,b=p.traceIndex,_=p.avoid||{},w=p.attributes,T=p.transform,M=p.containerGroup,k=1,A=y.title,S=(A&&A.text?A.text:"").trim(),E=!1,C=A&&A.font?A.font:{},L=C.family,P=C.size,I=C.color,z=C.weight,D=C.style,O=C.variant,R=C.textcase,F=C.lineposition,j=C.shadow,B=!!p.subtitlePropName,N=p.subtitlePlaceholder,U=(y.title||{}).subtitle||{text:"",font:{}},V=(U.text||"").trim(),q=!1,H=1,G=U.font,W=G.family,Y=G.size,Z=G.color,$=G.weight,X=G.style,K=G.variant,J=G.textcase,Q=G.lineposition,ee=G.shadow;"title.text"===v?m="titleText":-1!==v.indexOf("axis")?m="axisTitleText":-1!==v.indexOf("colorbar")&&(m="colorbarTitleText");var et=e._context.edits[m];function er(e,t){return void 0!==e&&void 0!==t&&e.replace(f," % ")===t.replace(f," % ")}""===S?k=0:er(S,x)&&(et||(S=""),k=.2,E=!0),B&&(""===V?H=0:er(V,N)&&(et||(V=""),H=.2,q=!0)),p._meta?S=o.templateString(S,p._meta):g._meta&&(S=o.templateString(S,g._meta));var ei,en=S||V||et;M||(M=o.ensureSingle(g._infolayer,"g","g-"+t),ei=g._hColorbarMoveTitle);var ea=M.selectAll("text."+t).data(en?[0]:[]);ea.enter().append("text"),ea.text(S).attr("class",t),ea.exit().remove();var eo=null,es=t+"-subtitle",el=V||et;if(B&&((eo=M.selectAll("text."+es).data(el?[0]:[])).enter().append("text"),eo.text(V).attr("class",es),eo.exit().remove()),!en)return M;function ec(e,t){o.syncOrAsync([eu,eh],{title:e,subtitle:t})}function eu(i){var a,h=i.title,d=i.subtitle;if(!T&&ei&&(T={}),T?(a="",T.rotate&&(a+="rotate("+[T.rotate,w.x,w.y]+")"),(T.offset||ei)&&(a+=s(0,(T.offset||0)-(ei||0)))):a=null,h.attr("transform",a),h.style("opacity",k*c.opacity(I)).call(l.font,{color:c.rgb(I),size:r.round(P,2),family:L,weight:z,style:D,variant:O,textcase:R,shadow:j,lineposition:F}).attr(w).call(u.convertToTspans,e,function(e){if(e){var t=r.select(e.node().parentNode).select("."+es);if(!t.empty()){var i=e.node().getBBox();if(i.height){var n=i.y+i.height+1.6*Y;t.attr("y",n)}}}}),d&&!d.empty()){var f=M.select("."+t+"-math-group"),p=h.node().getBBox(),m=f.node()?f.node().getBBox():void 0,g=m?m.y+m.height+1.6*Y:p.y+p.height+1.6*Y,y=o.extendFlat({},w,{y:g});d.attr("transform",a),d.style("opacity",H*c.opacity(Z)).call(l.font,{color:c.rgb(Z),size:r.round(Y,2),family:W,weight:$,style:X,variant:K,textcase:J,shadow:ee,lineposition:Q}).attr(y).call(u.convertToTspans,e)}return n.previousPromises(e)}function eh(t){var n=t.title,a=r.select(n.node().parentNode);if(_&&_.selection&&_.side&&S){a.attr("transform",null);var c=d[_.side],u="left"===_.side||"top"===_.side?-1:1,h=i(_.pad)?_.pad:2,f=l.bBox(a.node()),p={t:0,b:0,l:0,r:0},m=e._fullLayout._reservedMargin;for(var v in m)for(var x in m[v]){var b=m[v][x];p[x]=Math.max(p[x],b)}var w={left:p.l,top:p.t,right:g.width-p.r,bottom:g.height-p.b},T=_.maxShift||u*(w[_.side]-f[_.side]),M=0;if(T<0)M=T;else{var k=_.offsetLeft||0,A=_.offsetTop||0;f.left-=k,f.right-=k,f.top-=A,f.bottom-=A,_.selection.each(function(){var e=l.bBox(this);o.bBoxIntersect(f,e,h)&&(M=Math.max(M,u*(e[_.side]-f[c])+h))}),y._titleScoot=Math.abs(M=Math.min(T,M))}if(M>0||T<0){var E={left:[-M,0],right:[M,0],top:[0,-M],bottom:[0,M]}[_.side];a.attr("transform",s(E[0],E[1]))}}}function ed(e,t){e.text(t).on("mouseover.opacity",function(){r.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){r.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)})}if(ea.call(ec,eo),et&&(S?ea.on(".opacity",null):(ed(ea,x),E=!0),ea.call(u.makeEditable,{gd:e}).on("edit",function(t){void 0!==b?a.call("_guiRestyle",e,v,t,b):a.call("_guiRelayout",e,v,t)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ec)}).on("input",function(e){this.text(e||" ").call(u.positionText,w.x,w.y)}),B)){if(B&&!S){var ef=ea.node().getBBox(),ep=ef.y+ef.height+1.6*Y;eo.attr("y",ep)}V?eo.on(".opacity",null):(ed(eo,N),q=!0),eo.call(u.makeEditable,{gd:e}).on("edit",function(t){a.call("_guiRelayout",e,"title.subtitle.text",t)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ec)}).on("input",function(e){this.text(e||" ").call(u.positionText,eo.attr("x"),eo.attr("y"))})}return ea.classed("js-placeholder",E),eo&&!eo.empty()&&eo.classed("js-placeholder",q),M},SUBTITLE_PADDING_EM:1.6,SUBTITLE_PADDING_MATHJAX_EM:1.6}}}),rt=p({"src/plots/cartesian/set_convert.js"(e,t){var r=T(),i=k().utcFormat,n=tv(),a=n.numberFormat,o=C(),s=n.cleanNumber,l=n.ms2DateTime,c=n.dateTime2ms,u=n.ensureNumber,h=n.isArrayOrTypedArray,d=L(),f=d.FP_SAFE,p=d.BADNUM,m=d.LOG_CLIP,g=d.ONEWEEK,y=d.ONEDAY,v=d.ONEHOUR,x=d.ONEMIN,b=d.ONESEC,_=tC(),w=tE(),M=w.HOUR_PATTERN,A=w.WEEKDAY_PATTERN;function S(e){return Math.pow(10,e)}t.exports=function(e,t){t=t||{};var d=e._id||"x",T=d.charAt(0);function k(t,r){if(t>0)return Math.log(t)/Math.LN10;if(!(t<=0)||!r||!e.range||2!==e.range.length)return p;var i=e.range[0],n=e.range[1];return .5*(i+n-2*m*Math.abs(i-n))}function E(t,r,i,a){if((a||{}).msUTC&&o(t))return+t;var s=c(t,i||e.calendar);if(s===p)if(!o(t))return p;else{t*=1;var l=Math.floor(10*n.mod(t+.05,1));s=c(new Date(Math.round(t-l/10)))+l/10}return s}function C(t,r,i){return l(t,r,i||e.calendar)}function L(t){return e._categories[Math.round(t)]}function P(t){if(null!=t){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"==typeof t?String(t):t);var r=e._categories.length-1;return e._categoriesMap[t]=r,r}return p}function I(t){if(e._categoriesMap)return e._categoriesMap[t]}function z(e){var t=I(e);return void 0!==t?t:o(e)?+e:void 0}function D(e){return o(e)?+e:I(e)}function O(e,t,i){return r.round(i+t*e,2)}var R=function(t){return o(t)?O(t,e._m,e._b):p},F=function(t){var r;return r=e._m,(t-e._b)/r};if(e.rangebreaks){var j="y"===T;R=function(t){if(!o(t))return p;var r=e._rangebreaks.length;if(!r)return O(t,e._m,e._b);var i=j;e.range[0]>e.range[1]&&(i=!i);for(var n=i?-1:1,a=n*t,s=0,l=0;lu)s=l+1;else{s=a<(c+u)/2?l:l+1;break}}var h=e._B[s]||0;return isFinite(h)?O(t,e._m2,h):0},F=function(t){var r,i,n=e._rangebreaks.length;if(!n)return r=e._m,(t-e._b)/r;for(var a=0,o=0;oe._rangebreaks[o].pmax&&(a=o+1);return i=e._m2,(t-e._B[a])/i}}e.c2l="log"===e.type?k:u,e.l2c="log"===e.type?S:u,e.l2p=R,e.p2l=F,e.c2p="log"===e.type?function(e,t){return R(k(e,t))}:R,e.p2c="log"===e.type?function(e){return S(F(e))}:F,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=s,e.c2d=e.c2r=e.l2d=e.l2r=u,e.d2p=e.r2p=function(t){return e.l2p(s(t))},e.p2d=e.p2r=F,e.cleanPos=u):"log"===e.type?(e.d2r=e.d2l=function(e,t){return k(s(e),t)},e.r2d=e.r2c=function(e){return S(s(e))},e.d2c=e.r2l=s,e.c2d=e.l2r=u,e.c2r=k,e.l2d=S,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return S(F(e))},e.r2p=function(t){return e.l2p(s(t))},e.p2r=F,e.cleanPos=u):"date"===e.type?(e.d2r=e.r2d=n.identity,e.d2c=e.r2c=e.d2l=e.r2l=E,e.c2d=e.c2r=e.l2d=e.l2r=C,e.d2p=e.r2p=function(t,r,i){return e.l2p(E(t,0,i))},e.p2d=e.p2r=function(e,t,r){return C(F(e),t,r)},e.cleanPos=function(t){return n.cleanDate(t,p,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=P,e.r2d=e.c2d=e.l2d=L,e.d2r=e.d2l_noadd=z,e.r2c=function(t){var r=D(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=u,e.r2l=D,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return L(F(e))},e.r2p=e.d2p,e.p2r=F,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:u(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=L,e.d2r=e.d2l_noadd=z,e.r2c=function(t){var r=z(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=I,e.l2r=e.c2r=u,e.r2l=z,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return L(F(e))},e.r2p=e.d2p,e.p2r=F,e.cleanPos=function(e){return Array.isArray(e)||"string"==typeof e&&""!==e?e:u(e)},e.setupMultiCategory=function(r){var i,a,o=e._traceIndices,s=e._matchGroup;if(s&&0===e._categories.length){for(var l in s)if(l!==d){var c=t[_.id2name(l)];o=o.concat(c._traceIndices)}}var u=[[0,{}],[0,{}]],f=[];for(i=0;il[1]&&(a[+!s]=i,o[1]=l[1]),o[0]>=o[1])if(void 0!==r){var c=l[0]+1;void 0!==i&&(c=Math.min(c,l[1])),a[+!s]=e.l2r(c)}else void 0!==i&&(a[+!!s]=e.l2r(l[1]-1))}},e.cleanRange=function(t,r){e._cleanRange(t,r),e.limitRange(t)},e._cleanRange=function(t,r){r||(r={}),t||(t="range");var i,a,s=n.nestedProperty(e,t).get();if(a=(a="date"===e.type?n.dfltRange(e.calendar):"y"===T?w.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||w.DFLTRANGEX).slice(),("tozero"===e.rangemode||"nonnegative"===e.rangemode)&&(a[0]=0),!s||2!==s.length)return void n.nestedProperty(e,t).set(a);var l=null===s[0],c=null===s[1];for("date"!==e.type||e.autorange||(s[0]=n.cleanDate(s[0],p,e.calendar),s[1]=n.cleanDate(s[1],p,e.calendar)),i=0;i<2;i++)if("date"===e.type){if(!n.isDateTime(s[i],e.calendar)){e[t]=a;break}if(e.r2l(s[0])===e.r2l(s[1])){var u=n.constrain(e.r2l(s[0]),n.MIN_MS+1e3,n.MAX_MS-1e3);s[0]=e.l2r(u-1e3),s[1]=e.l2r(u+1e3);break}}else{if(!o(s[i]))if(!(l||c)&&o(s[1-i]))s[i]=s[1-i]*(i?10:.1);else{e[t]=a;break}if(s[i]<-f?s[i]=-f:s[i]>f&&(s[i]=f),s[0]===s[1]){var h=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=h,s[1]+=h}}},e.setScale=function(r){var i,n,a=t._size;if(e.overlaying){var o=_.getFromId({_fullLayout:t},e.overlaying);e.domain=o.domain}var s=r&&e._r?"_r":"range",l=e.calendar;e.cleanRange(s);var c=e.r2l(e[s][0],l),u=e.r2l(e[s][1],l),h="y"===T;if(h?(e._offset=a.t+(1-e.domain[1])*a.h,e._length=a.h*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u):(e._offset=a.l+e.domain[0]*a.w,e._length=a.w*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks&&(e._rangebreaks=e.locateBreaks(Math.min(c,u),Math.max(c,u)),e._rangebreaks.length)){for(i=0;iu&&(d=!d),d&&e._rangebreaks.reverse();var f=d?-1:1;for(e._m2=f*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(h?u:c)),i=0;ia&&(a+=7,oa&&(a+=24,o=i&&o=i&&t=s.min&&(es.max&&(s.max=i),a=!1)}a&&c.push({min:e,max:i})}};for(i=0;i2*s}(h,t))return"date";var g="strict"!==i.autotypenumbers;return!function(e,t){for(var r=e.length,i=c(r),a=0,o=0,u={},h=0;h2*a}(h,g)?!function(e,t){for(var i,n=e.length,a=0;a0&&((k=L-s(_)-l(w))>P?A/k>I&&(T=_,M=w,I=A/k):A/L>I&&(T={val:_.val,nopad:1},M={val:w.val,nopad:1},I=A/L));if(m===g){var z=m-1,D=m+1;if(E)if(0===m)a=[0,1];else{var O=(m>0?h:u).reduce(function(e,t){return Math.max(e,l(t))},0),R=m/(1-Math.min(.5,O/L));a=m>0?[0,R]:[R,0]}else a=C?[Math.max(0,z),Math.max(1,D)]:[z,D]}else E?(T.val>=0&&(T={val:0,nopad:1}),M.val<=0&&(M={val:0,nopad:1})):C&&(T.val-I*s(T)<0&&(T={val:0,nopad:1}),M.val<=0&&(M={val:1,nopad:1})),I=(M.val-T.val-d(t,_.val,w.val))/(L-s(T)-l(M)),a=[T.val-I*s(T),M.val+I*l(M)];return a=b(a,t),t.limitRange&&t.limitRange(),v&&a.reverse(),n.simpleMap(a,t.l2r||Number)}function d(e,t,r){var i=0;if(e.rangebreaks)for(var n=e.locateBreaks(t,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),E=A((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=A(r.vpadplus||r.vpad),L=A(r.vpadminus||r.vpad);if(!M){if(d=1/0,f=-1/0,T)for(n=0;n0&&(d=o),o>f&&o-a&&(d=o),o>f&&o=z;n--)I(n);return{min:p,max:x,opts:r}},concatExtremes:p};function m(e,t,r,i,n){for(var a=i.tozero,o=i.extrapad,s=!0,l=0;l=r&&(c.extrapad||!o)){s=!1;break}n(t,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(e.splice(l,1),l--)}if(s){var u=a&&0===t;e.push({val:t,pad:u?0:r,extrapad:!u&&o})}}function g(e){return i(e)&&Math.abs(e)=t}function x(e,t,r){return void 0===t||void 0===r||(t=e.d2l(t))<(r=e.d2l(r))}function b(e,t){if(!t||!t.autorangeoptions)return e;var r,i,a,o,s=e[0],l=e[1],c=t.autorangeoptions.include;if(void 0!==c){var u=t.d2l(s),h=t.d2l(l);n.isArrayOrTypedArray(c)||(c=[c]);for(var d=0;d=f&&(u=f,s=f),h<=f&&(h=f,l=f)}}return r=s,s=(i=t.autorangeoptions)&&void 0!==i.minallowed&&x(t,i.minallowed,i.maxallowed)?i.minallowed:i&&void 0!==i.clipmin&&x(t,i.clipmin,i.clipmax)?Math.max(r,t.d2l(i.clipmin)):r,a=l,[s,l=(o=t.autorangeoptions)&&void 0!==o.maxallowed&&x(t,o.minallowed,o.maxallowed)?o.maxallowed:o&&void 0!==o.clipmax&&x(t,o.clipmin,o.clipmax)?Math.min(a,t.d2l(o.clipmax)):a]}}}),rn=p({"src/plots/cartesian/axes.js"(e,t){var r=T(),i=C(),n=tD(),a=eQ(),o=tv(),s=o.strTranslate,l=tF(),c=re(),u=ee(),h=t9(),d=tN(),f=tG(),p=(tE(),L()),m=p.ONEMAXYEAR,g=p.ONEAVGYEAR,y=p.ONEMINYEAR,v=p.ONEMAXQUARTER,x=p.ONEAVGQUARTER,b=p.ONEMINQUARTER,_=p.ONEMAXMONTH,w=p.ONEAVGMONTH,M=p.ONEMINMONTH,k=p.ONEWEEK,A=p.ONEDAY,S=A/2,E=p.ONEHOUR,P=p.ONEMIN,I=p.ONESEC,z=p.ONEMILLI,D=p.ONEMICROSEC,O=p.MINUS_SIGN,R=p.BADNUM,F={K:"zeroline"},j={K:"gridline",L:"path"},B={K:"minor-gridline",L:"path"},N={K:"tick",L:"path"},U={K:"tick",L:"text"},V={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},q=tR(),H=q.MID_SHIFT,G=q.CAP_SHIFT,W=q.LINE_SPACING,Y=q.OPPOSITE_SIDE,Z=t.exports={};Z.setConvert=rt();var $=rr(),X=tC(),K=X.idSort,J=X.isLinked;Z.id2name=X.id2name,Z.name2id=X.name2id,Z.cleanId=X.cleanId,Z.list=X.list,Z.listIds=X.listIds,Z.getFromId=X.getFromId,Z.getFromTrace=X.getFromTrace;var Q=ri();function et(e){var t=(e[1]-e[0])*1e-4;return[e[0]-t,e[1]+t]}Z.getAutoRange=Q.getAutoRange,Z.findExtremes=Q.findExtremes,Z.coerceRef=function(e,t,r,i,n,a){var s=i.charAt(i.length-1),l=r._fullLayout._subplots[s+"axis"],c=i+"ref",u={};return n||(n=l[0]||("string"==typeof a?a:a[0])),a||(a=n),l=l.concat(l.map(function(e){return e+" domain"})),u[c]={valType:"enumerated",values:l.concat(a?"string"==typeof a?[a]:a:[]),dflt:n},o.coerce(e,t,u,c)},Z.coerceRefArray=function(e,t,r,i,n,a,s){let l=i.charAt(i.length-1);var c=r._fullLayout._subplots[l+"axis"];let u=i+"ref";var h=e[u];n||(n=c[0]||("string"==typeof a?a:a[0])),c=(c=c.concat(c.map(e=>e+" domain"))).concat(a||[]),h.length>s?(o.warn("Array attribute "+u+" has more entries than expected, truncating to "+s),h=h.slice(0,s)):h.lengthMath.abs((e/t+.5)%1-.5)}function eo(e,t){return .001>Math.abs(e/t-1)}function es(e){return+e.substring(1)}function el(e,t){return e.rangebreaks&&(t=t.filter(function(t){return e.maskBreaks(t.x)!==R})),t}function ec(e,t){var r=et(o.simpleMap(e.range,e.r2l)),i=Math.min(r[0],r[1]),n=Math.max(r[0],r[1]),a="category"===e.type?e.d2l_noadd:e.d2l;"log"===e.type&&"L"!==String(e.dtick).charAt(0)&&(e.dtick="L"+Math.pow(10,Math.floor(Math.min(e.range[0],e.range[1]))-1));for(var s=[],l=0;l<=1;l++)if(!(void 0!==t&&(t&&l||!1===t&&!l))&&!(l&&!e.minor)){var c=l?e.minor.tickvals:e.tickvals,u=l?[]:e.ticktext;if(c){o.isArrayOrTypedArray(u)||(u=[]);var h=-1,d=-1;if(!l)for(var f=0;fi&&pi&&g2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},Z.saveRangeInitial=function(e,t){for(var r=Z.list(e,"",!0),i=!1,n=0;n.3*d||u(n)||u(a))){var f=r.dtick/2;e+=e+f.8){var s=Number(r.slice(1));a.exactYears>.8&&s%12==0?e=Z.tickIncrement(e,"M6","reverse")+1.5*A:a.exactMonths>.8?e=Z.tickIncrement(e,"M1","reverse")+15.5*A:e-=S;var l=Z.tickIncrement(e,r);if(l<=i)return l}return e}(v,e,y,l,a)),m=v,g=0;m<=c;)m=Z.tickIncrement(m,y,!1,a),g++;return{start:t.c2r(v,0,a),end:t.c2r(m,0,a),size:y,_dataSpan:c-l}},Z.prepMinorTicks=function(e,t,r){var n,a;if(!(null!=(n=t.minor)&&n.dtick)){delete e.dtick;var s,l=t.dtick&&i(t._tmin);if(l){var c=Z.tickIncrement(t._tmin,t.dtick,!0);s=[t._tmin,.99*c+.01*t._tmin]}else{var u=o.simpleMap(t.range,t.r2l);s=[u[0],.8*u[0]+.2*u[1]]}if(e.range=o.simpleMap(s,t.l2r),e._isMinor=!0,Z.prepTicks(e,r),l){var h=i(t.dtick),d=i(e.dtick),f=h?t.dtick:+t.dtick.substring(1),p=d?e.dtick:+e.dtick.substring(1);h&&d?ea(f,p)?f===2*k&&p===2*A&&(e.dtick=k):f===2*k&&p===3*A?e.dtick=k:f!==k||(t._input.minor||{}).nticks?eo(f/p,2.5)?e.dtick=f/2:e.dtick=f:e.dtick=A:"M"===String(t.dtick).charAt(0)?d?e.dtick="M1":ea(f,p)?f>=12&&2===p&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?ea(f,p)||(e.dtick=eo(f/p,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}(null==(a=t.minor)?void 0:a._tick0Init)===void 0&&(e.tick0=t.tick0)},Z.prepTicks=function(e,t){var r=o.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var n,a=e.nticks;a||("category"===e.type||"multicategory"===e.type?(n=e.tickfont?o.bigFont(e.tickfont.size||12):15,a=e._length/n):(n="y"===e._id.charAt(0)?40:80,a=o.constrain(e._length/n,4,9)+1),"radialaxis"===e._name&&(a*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(a*=100),e._roughDTick=Math.abs(r[1]-r[0])/a,Z.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){function t(){return!(i(e.dtick)||"M"!==e.dtick.charAt(0))}var r,n=t(),a=Z.getTickFormat(e);if(a){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(r=E,o&&!n&&e.dtickes(e.dtick):e.dtickes(e.dtick):e.dtickes(e.dtick):e.dticke.range[1],u=!e.ticklabelindex||o.isArrayOrTypedArray(e.ticklabelindex)?e.ticklabelindex:[e.ticklabelindex],h=o.simpleMap(e.range,e.r2l,void 0,void 0,t),d=h[1]=+!N;U--){var V,q=!U;U?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):N&&(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var H=U?e:o.extendFlat({},e,N?e.minor:{minor:{}});if(q?Z.prepMinorTicks(H,e,t):Z.prepTicks(H,t),"array"===H.tickmode){U?(O=[],C=ec(e,!q)):(F=[],L=ec(e,!q));continue}if("sync"===H.tickmode){O=[],C=function(e){var t=e._mainAxis,r=[];if(t._vals){for(var i=-1,n=-1,a=0;a=Y:ee<=Y;ee=Z.tickIncrement(ee,er,d,a)){if(U&&J++,H.rangebreaks&&!d){if(ee=p)break}if(O.length>T||ee===Q)break;Q=ee;var en={value:function(e,t,r){if(![r,e,t].every(i)||0===r)return e;let n=Math.round((e-t)/r),a=t+n*r;return e!==a&&Math.abs(e-a)<1e-6*Math.abs(r)?a:e}(ee,ei,er)};U?(ee===K&&(en.first=!0),X&&ee!==(0|ee)&&(en.simpleLabel=!0),s>1&&J%s&&(en.skipLabel=!0),O.push(en)):(en.minor=!0,F.push(en))}}if(!F||F.length<3?u=!1:(ex=(F[2].value-F[1].value)*(c?-1:1),eb=e.tickformat,(/%f/.test(eb)?ex>=D:/%L/.test(eb)?ex>=z:/%[SX]/.test(eb)?ex>=I:/%M/.test(eb)?ex>=P:/%[HI]/.test(eb)?ex>=E:/%p/.test(eb)?ex>=S:/%[Aadejuwx]/.test(eb)?ex>=A:/%[UVW]/.test(eb)?ex>=k:/%[Bbm]/.test(eb)?ex>=M:/%[q]/.test(eb)?ex>=b:!/%[Yy]/.test(eb)||ex>=y)||(u=!1,F=F.slice(1))),u){var ea=O.concat(F);l&&O.length&&(ea=ea.slice(1)),(ea=ea.sort(function(e,t){return e.value-t.value}).filter(function(e,t,r){return 0===t||e.value!==r[t-1].value})).map(function(e,t){return void 0!==e.minor||e.skipLabel?null:t}).filter(function(e){return null!==e}).forEach(function(e){u.map(function(t){var r=e+t;r>=0&&r0?i-1:i,s=i);var l=e[o].value,c=Math.abs(e[s].value-l),u=r||c,h=0;u>=y?h=c>=y&&c<=m?c:g:r===x&&u>=b?h=c>=b&&c<=v?c:x:u>=M?h=c>=M&&c<=_?c:w:r===k&&u>=k?h=k:u>=A?h=A:r===S&&u>=S?h=S:r===E&&u>=E&&(h=E),h>=c&&(h=c,n=!0);var d=a+h;if(t.rangebreaks&&h>0){for(var f=0,p=0;p<84;p++){var T=(p+.5)/84;t.maskBreaks(a*(1-T)+T*d)!==R&&f++}(h*=f/84)||(e[i].drop=!0),n&&c>k&&(h=c)}(h>0||0===i)&&(e[i].periodX=a+h/2)}}(j,e,e._definedDelta),e.rangebreaks){var em="y"===e._id.charAt(0),eg=1;"auto"===e.tickmode&&(eg=e.tickfont?e.tickfont.size:12);var ey=NaN;for(e_=O.length-1;e_>-1;e_--){if(O[e_].drop){O.splice(e_,1);continue}O[e_].value=eF(O[e_].value,e);var ev=e.c2p(O[e_].value);(em?ey>ev-eg:eyp||ip&&(r.periodX=p),i10||"01-01"!==n.slice(5)?e._tickround="d":e._tickround=t.slice(1)%12==0?"y":"m";else if(t>=A&&a<=10||t>=15*A)e._tickround="d";else if(t>=P&&a<=16||t>=E)e._tickround="M";else if(t>=I&&a<=19||t>=P)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(a,o)-20,e._tickround<0&&(e._tickround=4)}}else if(i(t)||"L"===t.charAt(0)){var s=e.range.map(e.r2d||Number);i(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var l=Math.floor(Math.log(Math.max(Math.abs(s[0]),Math.abs(s[1])))/Math.LN10+.01);Math.abs(l)>(void 0===e.minexponent?3:e.minexponent)&&(ew(e.exponentformat)&&"SI extended"!==e.exponentformat&&!eT(l)||ew(e.exponentformat)&&"SI extended"===e.exponentformat&&!eM(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}function ex(e,t,r){var i=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:i.size,font:i.family,fontWeight:i.weight,fontStyle:i.style,fontVariant:i.variant,fontTextcase:i.textcase,fontLineposition:i.lineposition,fontShadow:i.shadow,fontColor:i.color}}Z.autoTicks=function(e,t,r){var n;function a(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=o.dateTick0(e.calendar,0);var s=2*t;if(s>g)t/=g,n=a(10),e.dtick="M"+12*ey(t,n,eu);else if(s>w)e.dtick="M"+ey(t/=w,1,eh);else if(s>A){if(e.dtick=ey(t,A,e._hasDayOfWeekBreaks?[1,2,7,14]:ef),!r){var l=Z.getTickFormat(e),c="period"===e.ticklabelmode;c&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=o.dateTick0(e.calendar,2):e.tick0=o.dateTick0(e.calendar,1),c&&(e._dowTick0=e.tick0)}}else s>E?e.dtick=ey(t,E,eh):s>P?e.dtick=ey(t,P,ed):s>I?e.dtick=ey(t,I,ed):(n=a(10),e.dtick=ey(t,n,eu))}else if("log"===e.type){e.tick0=0;var u=o.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(1>Math.abs(u[1]-u[0])){var h=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/h,n=a(10),e.dtick="L"+ey(t,n,eu)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):eR(e)?(e.tick0=0,e.dtick=ey(t,n=1,eg)):(e.tick0=0,n=a(10),e.dtick=ey(t,n,eu));if(0===e.dtick&&(e.dtick=1),!i(e.dtick)&&"string"!=typeof e.dtick){var d=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(d)}},Z.tickIncrement=function(e,t,n,a){var s=n?-1:1;if(i(t))return o.increment(e,s*t);var l=t.charAt(0),c=s*Number(t.slice(1));if("M"===l)return o.incrementMonth(e,c,a);if("L"===l)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===l){var u="D2"===t?em:ep,h=e+.01*s,d=o.roundUp(o.mod(h,1),u,n);return Math.floor(h)+Math.log(r.round(Math.pow(10,d),1))/Math.LN10}throw"unrecognized dtick "+String(t)},Z.tickFirst=function(e,t){var n=e.r2l||Number,a=o.simpleMap(e.range,n,void 0,void 0,t),s=a[1]=0&&r<=e._length?t:null};if(k&&o.isArrayOrTypedArray(e.ticktext)){var L=o.simpleMap(e.range,e.r2l),P=(Math.abs(L[1]-L[0])-(e._lBreaks||0))/1e4;for(_=0;_ ")}else e._prevDateHead=l,c+="
"+l;t.text=c}(e,M,r,A):"log"===S?function(e,t,r,n){var a=e.dtick,s=t.x,l=e.tickformat,c="string"==typeof a&&a.charAt(0);if("never"===n&&(n=""),r&&"L"!==c&&(a="L3",c="L"),l||"L"===c)t.text=ek(Math.pow(10,s),e,n,r);else if(i(a)||"D"===c&&("complete"===e.minorloglabels||.1>o.mod(s+.01,1))){"complete"!==e.minorloglabels||.1>o.mod(s+.01,1)||(t.fontSize*=.75);var u=Math.pow(10,s).toExponential(0).split("e"),h=+u[1],d=Math.abs(h),f=e.exponentformat;"power"===f||ew(f)&&"SI extended"!==f&&eT(h)||ew(f)&&"SI extended"===f&&eM(h)?(t.text=u[0],d>0&&(t.text+="x10"),"1x10"===t.text&&(t.text="10"),0!==h&&1!==h&&(t.text+=""+(h>0?"":O)+d+""),t.fontSize*=1.25):("e"===f||"E"===f)&&d>2?t.text=u[0]+f+(h>0?"+":O)+d:(t.text=ek(Math.pow(10,s),e,"","fakehover"),"D1"===a&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else if("D"===c)t.text="none"===e.minorloglabels?"":String(Math.round(Math.pow(10,o.mod(s,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if("D1"===e.dtick){var p=String(t.text).charAt(0);("0"===p||"1"===p)&&("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(s<0?.5:.25)))}}(e,M,A,z):"category"===S?(s=e,l=M,void 0===(c=s._categories[Math.round(l.x)])&&(c=""),l.text=String(c)):"multicategory"===S?(u=e,h=M,d=r,f=Math.round(h.x),m=void 0===(p=u._categories[f]||[])[1]?"":String(p[1]),g=void 0===p[0]?"":String(p[0]),d?h.text=g+" - "+m:(h.text=m,h.text2=g)):eR(e)?function(e,t,r,i,n){if("radians"!==e.thetaunit||r)t.text=ek(t.x,e,n,i);else{var a=t.x/180;if(0===a)t.text="0";else{var s=function(e){function t(e,t){return 1e-6>=Math.abs(e-t)}var r=function(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}(e),i=e*r,n=Math.abs(function e(r,i){return t(i,0)?r:e(i,r%i)}(i,r));return[Math.round(i/n),Math.round(r/n)]}(a);if(s[1]>=100)t.text=ek(o.deg2rad(t.x),e,n,i);else{var l=t.x<0;1===s[1]?1===s[0]?t.text="π":t.text=s[0]+"π":t.text=["",s[0],"","⁄","",s[1],"","π"].join(""),l&&(t.text=O+t.text)}}}}(e,M,r,A,z):(y=e,v=M,x=A,"never"===(b=z)?b="":"all"===y.showexponent&&1e-6>Math.abs(v.x/y.dtick)&&(b="hide"),v.text=ek(v.x,y,b,x)),n||(e.tickprefix&&!I(e.showtickprefix)&&(M.text=e.tickprefix+M.text),e.ticksuffix&&!I(e.showticksuffix)&&(M.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(M.text)){var D=e.labelalias[M.text];"string"==typeof D&&(M.text=D)}return("boundaries"===e.tickson||e.showdividers)&&(M.xbnd=[C(M.x-.5),C(M.x+e.dtick-.5)]),M},Z.hoverLabelText=function(e,t,r){r&&(e=o.extendFlat({},e,{hoverformat:r}));var i=o.isArrayOrTypedArray(t)?t[0]:t,n=o.isArrayOrTypedArray(t)?t[1]:void 0;if(void 0!==n&&n!==i)return Z.hoverLabelText(e,i,r)+" - "+Z.hoverLabelText(e,n,r);var a="log"===e.type&&i<=0,s=Z.tickText(e,e.c2l(a?-i:i),"hover").text;return a?0===i?"0":O+s:s};var eb=["f","p","n","μ","m","","k","M","G","T"],e_=["q","r","y","z","a",...eb,"P","E","Z","Y","R","Q"],ew=e=>["SI","SI extended","B"].includes(e);function eT(e){return e>14||e<-15}function eM(e){return e>32||e<-30}function ek(e,t,r,n){var a,s,l,c=e<0,u=t._tickround,h=r||t.exponentformat||"B",d=t._tickexponent,f=Z.getTickFormat(t),p=t.separatethousands;if(n){var m={exponentformat:h,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:i(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};ev(m),u=(Number(m._tickround)||0)+4,d=m._tickexponent,t.hoverformat&&(f=t.hoverformat)}if(f)return t._numFormat(f)(e).replace(/-/g,O);"none"===h&&(d=0);let g=Math.pow(10,-u)/2;if((e=Math.abs(e))"+l+"":"B"===h&&9===d?e+="B":ew(h)&&(e+="SI extended"===h?e_[d/3+10]:eb[d/3+5])),c?O+e:e}function eA(e,t){if(e){var r=Object.keys(V).reduce(function(e,r){return -1!==t.indexOf(r)&&V[r].forEach(function(t){e[t]=1}),e},{});Object.keys(e).forEach(function(t){r[t]||(1===t.length?e[t]=0:delete e[t])})}}function eS(e){return void 0!==e.periodX?e.periodX:e.x}function eE(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}function eC(e){var t=e.title.font.size,r=(e.title.text.match(l.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(G+r*W):r?t*(r+1)*W:t}function eL(e,t){var r=e.l2p(t);return r>1&&r=n.min&&e0)switch(e.type){case"date":case"linear":for(t=0;t=i(e))}(e.dtick,i.dtickrange,n)){r=i;break}break;case"log":for(t=0;t=0,o=0>=a(e,t[1]);return(r||n)&&(i||o)}(e.dtick,i.dtickrange)){r=i;break}}return r?r.value:e.tickformat},Z.getSubplots=function(e,t){var r=e._fullLayout._subplots,i=r.cartesian.concat(r.gl2d||[]),n=t?Z.findSubplotsWithAxis(i,t):i;return n.sort(function(e,t){var r=e.slice(1).split("y"),i=t.slice(1).split("y");return r[0]===i[0]?r[1]-i[1]:r[0]-i[0]}),n},Z.findSubplotsWithAxis=function(e,t){for(var r=new RegExp("x"===t._id.charAt(0)?"^"+t._id+"y":t._id+"$"),i=[],n=0;n=0&&n.unshift(n.splice(i,1).shift())}});var s={false:{left:0,right:0}};return o.syncOrAsync(n.map(function(t){return function(){if(t){var i=Z.getFromId(e,t);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=a;var n=Z.drawOne(e,i,r);return i._shiftPusher&&eN(i,i._fullDepth||0,s,!0),i._r=i.range.slice(),i._rl=o.simpleMap(i._r,i.r2l),n}}}))},Z.drawOne=function(e,t,r){var i,s,d,f=(r=r||{}).axShifts||{},p=r.overlayingShiftedAx||[];t.setScale();var m=e._fullLayout,g=t._id,y=g.charAt(0),v=Z.counterLetter(g),x=m._plots[t._mainSubplot],b="above traces"===t.zerolinelayer;if(x){if(t._shiftPusher=t.autoshift||-1!==p.indexOf(t._id)||-1!==p.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var _=t.linewidth/2||0;"inside"===t.ticks&&(_+=t.ticklen),eN(t,_,f,!0),eN(t,t.shift||0,f,!1)}(!0!==r.skipTitle||void 0===t._shift)&&(C=t,L=f,t._shift=C.autoshift?L[C.overlaying][C.side]:C.shift||0);var w=x[y+"axislayer"],T=t._mainLinePosition,M=T+=t._shift,k=t._mainMirrorPosition,A=t._vals=Z.calcTicks(t),S=[t.mirror,M,k].join("_");for(i=0;i0?r.bottom-u:0,h))));var d=0,f=0;if(t._shiftPusher&&(d=Math.max(h,r.height>0?"l"===l?u-r.left:r.right-u:0),t.title.text!==m._dfltTitle[y]&&(f=(t._titleStandoff||0)+(t._titleScoot||0),"l"===l&&(f+=eC(t))),t._fullDepth=Math.max(d,f)),t.automargin){i={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1],g="number"==typeof t._shift?t._shift:0;if("x"===y){if("b"===l?i[l]=t._depth:(i[l]=t._depth=Math.max(r.width>0?u-r.top:0,h),p.reverse()),r.width>0){var x=r.right-(t._offset+t._length);x>0&&(i.xr=1,i.r=x);var b=t._offset-r.left;b>0&&(i.xl=0,i.l=b)}}else if("l"===l?(t._depth=Math.max(r.height>0?u-r.left:0,h),i[l]=t._depth-g):(t._depth=Math.max(r.height>0?r.right-u:0,h),i[l]=t._depth+g,p.reverse()),r.height>0){var _=r.bottom-(t._offset+t._length);_>0&&(i.yb=0,i.b=_);var w=t._offset-r.top;w>0&&(i.yt=1,i.t=w)}i[v]="free"===t.anchor?t.position:t._anchorAxis.domain[p[0]],t.title.text!==m._dfltTitle[y]&&(i[l]+=eC(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((o={x:0,y:0,r:0,l:0,t:0,b:0})[c]=t.linewidth,t.mirror&&!0!==t.mirror&&(o[c]+=h),!0===t.mirror||"ticks"===t.mirror?o[v]=t._anchorAxis.domain[p[1]]:("all"===t.mirror||"allticks"===t.mirror)&&(o[v]=[t._counterDomainMin,t._counterDomainMax][p[1]]))}ep&&(s=a.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"==typeof t.automargin&&(eA(i,t.automargin),eA(o,t.automargin)),n.autoMargin(e,eI(t),i),n.autoMargin(e,ez(t),o),n.autoMargin(e,eD(t),s)}),o.syncOrAsync(ed)}}function em(e){var r=g+(e||"tick");return E[r]||(E[r]=function(e,t,r){var i,n,a,o;if(e._selections[t].size())i=1/0,n=-1/0,a=1/0,o=-1/0,e._selections[t].each(function(){var e=eP(this);if("none"!==e.node().style.display){var t=h.bBox(e.node().parentNode);i=Math.min(i,t.top),n=Math.max(n,t.bottom),a=Math.min(a,t.left),o=Math.max(o,t.right)}});else{var s=Z.makeLabelFns(e,r);i=n=s.yFn({dx:0,dy:0,fontSize:0}),a=o=s.xFn({dx:0,dy:0,fontSize:0})}return{top:i,bottom:n,left:a,right:o,height:n-i,width:o-a}}(t,r,M)),E[r]}},Z.getTickSigns=function(e,t){var r=e._id.charAt(0),i=e.side===({x:"top",y:"right"})[r]?1:-1,n=[-1,1,i,-i];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)==("x"===r)&&(n=n.map(function(e){return-e})),e.side&&n.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),n},Z.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return s(e._offset+e.l2p(t.x),0)}:function(t){return s(0,e._offset+e.l2p(t.x))}},Z.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=e.tickson||"",i=function(e){return -1!==t.indexOf(e)},n=i("top"),a=i("left"),o=i("right"),s=i("bottom"),l=i("inside"),c="boundaries"!==r&&(s||a||n||o);if(!c&&!l)return[0,0];var u=e.side,h=c?(e.tickwidth||0)/2:0,d=3,f=e.tickfont?e.tickfont.size:12;return(s||n)&&(h+=f*G,d+=(e.linewidth||0)/2),(a||o)&&(h+=(e.linewidth||0)/2,d+=3),l&&"top"===u&&(d-=f*(1-G)),(a||n)&&(h=-h),("bottom"===u||"right"===u)&&(d=-d),[c?h:0,l?d:0]}(e),r=e.ticklabelshift||0,i=e.ticklabelstandoff||0,n=t[0],a=t[1],o=e.range[0]>e.range[1],l=e.ticklabelposition&&-1!==e.ticklabelposition.indexOf("inside");if(r&&(r*=o?-1:1),i){var c=e.side;i*=l&&("top"===c||"left"===c)||!l&&("bottom"===c||"right"===c)?1:-1}return"x"===e._id.charAt(0)?function(t){return s(n+e._offset+e.l2p(eS(t))+r,a+i)}:function(t){return s(a+i,n+e._offset+e.l2p(eS(t))+r)}},Z.makeTickPath=function(e,t,r,i){i||(i={});var n=i.minor;if(n&&!e.minor)return"";var a=void 0!==i.len?i.len:n?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+s*r)+"v"+a*r:"M"+(t+s*r)+",0h"+a*r},Z.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",a=e.tickson||"",s=function(e){return -1!==n.indexOf(e)},l=s("top"),c=s("left"),u=s("right"),h=s("bottom"),d="boundaries"!==a&&(h||c||l||u),f=s("inside"),p="inside"===n&&"inside"===e.ticks||!f&&"outside"===e.ticks&&"boundaries"!==a,m=0,g=0,y=p?e.ticklen:0;if(f?y*=-1:d&&(y=0),p&&(m+=y,r)){var v=o.deg2rad(r);m=y*Math.cos(v)+1,g=y*Math.sin(v)}e.showticklabels&&(p||e.showline)&&(m+=.2*e.tickfont.size);var x,b,_,w,T,M={labelStandoff:m+=(e.linewidth||1)/2*(f?-1:1),labelShift:g},k=0,A=e.side,S=e._id.charAt(0),E=e.tickangle;if("x"===S)w=(T=!f&&"bottom"===A||f&&"top"===A)?1:-1,f&&(w*=-1),x=g*w,b=t+m*w,_=T?1:-.2,90===Math.abs(E)&&(f?_+=H:_=-90===E&&"bottom"===A?G:90===E&&"top"===A?H:.5,k=H/2*(E/90)),M.xFn=function(e){return e.dx+x+k*e.fontSize},M.yFn=function(e){return e.dy+b+e.fontSize*_},M.anchorFn=function(e,t){if(d){if(c)return"end";if(u)return"start"}return i(t)&&0!==t&&180!==t?t*w<0!==f?"end":"start":"middle"},M.heightFn=function(t,r,i){return r<-60||r>60?-.5*i:"top"===e.side!==f?-i:0};else if("y"===S){if(w=(T=!f&&"left"===A||f&&"right"===A)?1:-1,f&&(w*=-1),x=m,b=g*w,_=0,f||90!==Math.abs(E)||(_=-90===E&&"left"===A||90===E&&"right"===A?G:.5),f){var C=i(E)?+E:0;0!==C&&(k=Math.abs(Math.sin(o.deg2rad(C)))*G*w,_=0)}M.xFn=function(e){return e.dx+t-(x+e.fontSize*_)*w+k*e.fontSize},M.yFn=function(e){return e.dy+b+e.fontSize*H},M.anchorFn=function(e,t){return i(t)&&90===Math.abs(t)?"middle":T?"end":"start"},M.heightFn=function(t,r,i){return"right"===e.side&&(r*=-1),r<-30?-i:r<30?-.5*i:0}}return M},Z.drawTicks=function(e,t,i){i=i||{};var n=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?i.vals.filter(function(e){return e.minor&&!e.noTick}):[]).concat(t.ticks?i.vals.filter(function(e){return!e.minor&&!e.noTick}):[]),o=i.layer.selectAll("path."+n).data(a,eE);o.exit().remove(),o.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",!1!==i.crisp).each(function(e){return u.stroke(r.select(this),e.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(r){return h.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",i.path).style("display",null),eB(t,[N]),o.attr("transform",i.transFn)},Z.drawGrid=function(e,t,i){if(i=i||{},"sync"!==t.tickmode){var n=t._id+"grid",a=t.minor&&t.minor.showgrid,o=a?i.vals.filter(function(e){return e.minor}):[],s=t.showgrid?i.vals.filter(function(e){return!e.minor}):[],l=i.counterAxis;if(l&&Z.shouldShowZeroLine(e,t,l))for(var c="array"===t.tickmode,d=0;d=0;y--){var v=y?m:g;if(v){var x=v.selectAll("path."+n).data(y?s:o,eE);x.exit().remove(),x.enter().append("path").classed(n,1).classed("crisp",!1!==i.crisp),x.attr("transform",i.transFn).attr("d",i.path).each(function(e){return u.stroke(r.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(e){return h.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(e){return(e.minor?p:t._gw)+"px"}).style("display",null),"function"==typeof i.path&&x.attr("d",i.path)}}eB(t,[j,B])}},Z.drawZeroLine=function(e,t,r){r=r||r;var i=t._id+"zl",n=Z.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll("path."+i).data(n?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append("path").classed(i,1).classed("zl",1).classed("crisp",!1!==r.crisp).each(function(){r.layer.selectAll("path").sort(function(e,t){return K(e.id,t.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(u.stroke,t.zerolinecolor||u.defaultLine).style("stroke-width",h.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),eB(t,[F])},Z.drawLabels=function(e,t,n){n=n||{};var a=e._fullLayout,c=t._id,u="above traces"===t.zerolinelayer,d=n.cls||c+"tick",f=n.vals.filter(function(e){return e.text}),p=n.labelFns,m=n.secondary?0:t.tickangle,g=(t._prevTickAngles||{})[d],y=n.layer.selectAll("g."+d).data(t.showticklabels?f:[],eE),v=[];function x(e,a){e.each(function(e){var o=r.select(this),c=o.select(".text-math-group"),u=p.anchorFn(e,a),d=n.transFn.call(o.node(),e)+(i(a)&&0!=+a?" rotate("+a+","+p.xFn(e)+","+(p.yFn(e)-e.fontSize/2)+")":""),f=l.lineCount(o),m=W*e.fontSize,g=p.heightFn(e,i(a)?+a:0,(f-1)*m);if(g&&(d+=s(0,g)),c.empty()){var y=o.select("text");y.attr({transform:d,"text-anchor":u}),y.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var v=h.bBox(c.node()).width;c.attr("transform",d+s(v*({end:-.5,start:.5})[u],0))}})}y.enter().append("g").classed(d,1).append("text").attr("text-anchor","middle").each(function(t){var i=r.select(this),n=e._promises.length;i.call(l.positionText,p.xFn(t),p.yFn(t)).call(h.font,{family:t.font,size:t.fontSize,color:t.fontColor,weight:t.fontWeight,style:t.fontStyle,variant:t.fontVariant,textcase:t.fontTextcase,lineposition:t.fontLineposition,shadow:t.fontShadow}).text(t.text).call(l.convertToTspans,e),e._promises[n]?v.push(e._promises.pop().then(function(){x(i,m)})):x(i,m)}),eB(t,[U]),y.exit().remove(),n.repositionOnUpdate&&y.each(function(e){r.select(this).select("text").call(l.positionText,p.xFn(e),p.yFn(e))}),t._adjustTickLabelsOverflow=function(){var i=t.ticklabeloverflow;if(!(!i||"allow"===i)){var n=-1!==i.indexOf("hide"),s="x"===t._id.charAt(0),l=0,c=s?e._fullLayout.width:e._fullLayout.height;if(-1!==i.indexOf("domain")){var u=o.simpleMap(t.range,t.r2l);l=t.l2p(u[0])+t._offset,c=t.l2p(u[1])+t._offset}var d=Math.min(l,c),f=Math.max(l,c),p=t.side,m=1/0,g=-1/0;for(var v in y.each(function(e){var i=r.select(this);if(i.select(".text-math-group").empty()){var a=h.bBox(i.node()),o=0;s?(a.right>f||a.leftf||a.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+i._id]?l.style("display","none"):"tick"!==e.K||n||"none"===l.node().style.display||l.style("display",null)})})})})},x(y,g+1?g:m);var b=null;t._selections&&(t._selections[d]=y);var _=[function(){return v.length&&Promise.all(v)}];t.automargin&&a._redrawFromAutoMarginCount&&90===g?(b=g,_.push(function(){x(y,g)})):_.push(function(){if(x(y,m),f.length&&t.autotickangles&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){b=t.autotickangles[0];var e,r=0,i=[],a=1;y.each(function(e){r=Math.max(r,e.fontSize);var n=t.l2p(e.x),o=eP(this),s=h.bBox(o.node());a=Math.max(a,l.lineCount(o)),i.push({top:0,bottom:10,height:10,left:n-s.width/2,right:n+s.width/2+2,width:s.width+2})});var s=("boundaries"===t.tickson||t.showdividers)&&!n.secondary,c=f.length,u=Math.abs((f[c-1].x-f[0].x)*t._m)/(c-1),d=s?u/2:u,p=Math.sqrt(Math.pow(d,2)+Math.pow(s?t.ticklen:1.25*r*a,2)),g=d/p,v=t.autotickangles.map(function(e){return e*Math.PI/180}),_=v.find(function(e){return Math.abs(Math.cos(e))<=g});void 0===_&&(_=v.reduce(function(e,t){return Math.abs(Math.cos(e))R*O&&(I=O,C[E]=L[E]=z[E])}var V=Math.abs(I-P);V-k>0?(V-=k,k*=1+k/V):k=0,"y"!==t._id.charAt(0)&&(k=-k),C[S]=T.p2r(T.r2p(L[S])+A*k),"min"===T.autorange||"max reversed"===T.autorange?(C[0]=null,T._rangeInitial0=void 0,T._rangeInitial1=void 0):("max"===T.autorange||"min reversed"===T.autorange)&&(C[1]=null,T._rangeInitial0=void 0,T._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[T._name+".range"]=C}var q=o.syncOrAsync(_);return q&&q.then&&e._promises.push(q),q},Z.getPxPosition=function(e,t){var r,i=e._fullLayout._size,n=t._id.charAt(0),a=t.side;return("free"!==t.anchor?r=t._anchorAxis:"x"===n?r={_offset:i.t+(1-(t.position||0))*i.h,_length:0}:"y"===n&&(r={_offset:i.l+(t.position||0)*i.w+t._shift,_length:0}),"top"===a||"left"===a)?r._offset:"bottom"===a||"right"===a?r._offset+r._length:void 0},Z.shouldShowZeroLine=function(e,t,r){var i=o.simpleMap(t.range,t.r2l);return i[0]*i[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===R)&&(eL(t,0)||!function(e,t,r,i){var n=r._mainAxis;if(n){var a=e._fullLayout,o=t._id.charAt(0),s=Z.counterLetter(t._id),l=t._offset+(Math.abs(i[0])1)for(i=1;i4/3-s?o:s}}}),ru=p({"src/components/dragelement/cursor.js"(e,t){var r=tv(),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(e,t,n,a){return e="left"===n?0:"center"===n?1:"right"===n?2:r.constrain(Math.floor(3*e),0,2),i[t="bottom"===a?0:"middle"===a?1:"top"===a?2:r.constrain(Math.floor(3*t),0,2)][e]}}}),rh=p({"src/components/dragelement/unhover.js"(e,t){var r=tT(),i=tt(),n=eU().getGraphDiv,a=G(),o=t.exports={};o.wrapped=function(e,t,r){var s;(e=n(e))._fullLayout&&i.clear(e._fullLayout._uid+a.HOVERID);let l=e._hoverdata;o.raw(e,t,r)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,null!=(s=e._fullLayout)&&s.hoveranywhere&&t?.target&&!l&&e.emit("plotly_unhover",{event:t,points:[]}))},o.raw=function(e,t){var i=e._fullLayout,n=e._hoverdata;return t||(t={}),(!t.target||!!e._dragged||!1!==r.triggerHandler(e,"plotly_beforehover",t))&&(i._hoverlayer.selectAll("g").remove(),i._hoverlayer.selectAll("line").remove(),i._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&n&&e.emit("plotly_unhover",{event:t,points:n}),!0)}}}),rd=p({"src/components/dragelement/index.js"(e,t){var r=rs(),i=t_(),n=rl(),a=tv().removeElement,o=tE(),s=t.exports={};s.align=rc(),s.getCursor=ru();var l=rh();function c(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=0x3b9ac9ff,t.background="none",document.body.appendChild(e),e}function u(e){return r(e.changedTouches?e.changedTouches[0]:e,document.body)}s.unhover=l.wrapped,s.unhoverRaw=l.raw,s.init=function(e){var t,r,l,h,d,f,p,m,g=e.gd,y=1,v=g._context.doubleClickDelay,x=e.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,n?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=e.clampFn||function(e,t,r){return Math.abs(e)"u"&&typeof n.clientY>"u"&&(n.clientX=t,n.clientY=r),(l=new Date().getTime())-g._mouseDownTimev&&(y=Math.max(y-1,1)),g._dragged)e.doneFn&&e.doneFn();else{var r;f.target===p?r=f:(r={target:p,srcElement:p,toElement:p},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(e=>{var t=f[e];r[e]||"function"==typeof t||(r[e]=t)})),e.clickFn&&e.clickFn(y,r),m||p.dispatchEvent(new MouseEvent("click",t))}g._dragging=!1,g._dragged=!1}},s.coverSlip=c}}),rf=p({"src/lib/setcursor.js"(e,t){t.exports=function(e,t){(e.attr("class")||"").split(" ").forEach(function(t){0===t.indexOf("cursor-")&&e.classed(t,!1)}),t&&e.classed("cursor-"+t,!0)}}}),rp=p({"src/lib/override_cursor.js"(e,t){var r=rf(),i="data-savedcursor";t.exports=function(e,t){var n=e.attr(i);if(t){if(!n){for(var a=(e.attr("class")||"").split(" "),o=0;ot.legend.length)for(var i=t.legend.length;i+("legend"===e));if(!1===S&&(c[e]=void 0),!(!1===S&&!d.uirevision)&&(p("uirevision",c.uirevision),!1!==S)){p("borderwidth");var E,C,L,P=p("orientation"),I=p("yref"),z=p("xref"),D="h"===P,O="paper"===I,R="paper"===z,F="left";if(D?(E=0,r.getComponentMethod("rangeslider","isVisible")(t.xaxis)?O?(C=1.1,L="bottom"):(C=1,L="top"):O?(C=-.1,L="top"):(C=0,L="bottom")):(C=1,L="auto",R?E=1.02:(E=1,F="right")),i.coerce(d,f,{x:{valType:"number",editType:"legend",min:R?-2:0,max:R?3:1,dflt:E}},"x"),i.coerce(d,f,{y:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:C}},"y"),p("traceorder",w),l.isGrouped(c[e])&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("indentation"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("xanchor",F),p("yanchor",L),p("maxheight"),p("valign"),i.noneOrAll(d,f,["x","y"]),p("title.text")){p("title.side",D?"left":"top");var j=i.extendFlat({},m,{size:i.bigFont(m.size)});i.coerceFont(p,"title.font",j);let e=h>1;p("titleclick",!!e&&"toggle"),p("titledoubleclick",!!e&&"toggleothers")}}}function B(e){return r.traceIs(e,"pie-like")&&null!=e._length&&(Array.isArray(e.legend)||Array.isArray(e.showlegend))}})(g,e,t,h,m.length),t[g]&&(t[g]._id=g),t._legends.push(g)}}}}),rv=p({"src/components/legend/handle_click.js"(e){var t=eQ(),r=tv(),i=r.pushUnique,n=rg(),a=!0;e.handleItemClick=function(e,n,o,s){var l=n._fullLayout;if(n._dragged||n._editing)return;var c=e.data()[0][0];if(c.groupTitle&&c.noClick)return;var u=o.groupclick;"toggle"===s&&"toggleothers"===o.itemdoubleclick&&a&&n.data&&n._context.showTips&&(r.notifier(r._(n,"Double-click on legend to isolate one trace"),"long",n),a=!1);var h="togglegroup"===u,d=l.hiddenlabels?l.hiddenlabels.slice():[],f=n._fullData;let p=(l.shapes||[]).filter(e=>e.showlegend||e.legendgroup);var m=f.concat(p),g=c.trace;g._isShape&&(g=l.shapes[g.index]);var y,v,x,b,_,w=g.legendgroup,T={},M=[],k=[],A=[],S=(l.shapes||[]).map(function(e){return e._input}),E=!1;function C(e,t){if(!(c.groupTitle&&!h)){var r,i,n,a=e._isShape,o=e.index;void 0===o&&(o=e._index);var s=!1!==e.visible&&t;a?(S[o].visible=s,E=!0):(r=o,i=M.indexOf(r),(n=T.visible)||(n=T.visible=[]),-1===M.indexOf(r)&&(M.push(r),i=M.length-1),n[i]=s)}}var L=g.legend;if(!g._isShape&&t.traceIs(g,"pie-like")){var P=c.label,I=d.indexOf(P);if("toggle"===s)-1===I?d.push(P):d.splice(I,1);else if("toggleothers"===s){var z=-1!==I,D=[];for(y=0;ye.showlegend||e.legendgroup),c=o.concat(l);function u(e){return(e.legend||"legend")===s}"toggle"===i?(p=!c.some(function(e){return u(e)&&!0===e.visible}),m=!1):(p=!0,m=!c.some(function(e){return!u(e)&&!0===e.visible&&!1!==e.showlegend}));let h={visible:[]},d=[],f=(a.shapes||[]).map(function(e){return e._input});for(var p,m,g=!1,y=0;yP&&(C=P)}S[o][0]._groupMinRank=C,S[o][0]._preGroupSort=o}var I=function(e,t){return(r(e.trace.legendrank)?e.trace.legendrank[e.i]:e.trace.legendrank)-(r(t.trace.legendrank)?t.trace.legendrank[t.i]:t.trace.legendrank)||e._preSort-t._preSort};for(S.forEach(function(e,t){e[0]._preGroupSort=t}),S.sort(function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort}),o=0;or?r:e}t.exports=function(e,t,g){var y=t._fullLayout;g||(g=y.legend);var v="constant"===g.itemsizing,x=g.itemwidth,b=a((x+2*d.itemGap)/2,0),_=function(e,t,r,i){var n;if(e+1)n=e;else{if(!t||!(t.width>0))return 0;n=t.width}return v?i:Math.min(n,r)};function w(e,n,a){var c=e[0].trace,u=c.marker||{},h=u.line||{},d=u.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",f=a?c.visible&&c.type===a:i.traceIs(c,"bar"),p=r.select(n).select("g.legendpoints").selectAll("path.legend"+a).data(f?[e]:[]);p.enter().append("path").classed("legend"+a,!0).attr("d",d).attr("transform",b),p.exit().remove(),p.each(function(e){var i=r.select(this),n=e[0],a=_(n.mlw,u.line,5,2);i.style("stroke-width",a+"px");var d=n.mcc;if(!g._inHover&&"mc"in n){var f=l(u),p=f.mid;void 0===p&&(p=(f.max+f.min)/2),d=o.tryColorscale(u,"")(p)}var y=d||n.mc||u.color,v=u.pattern,x=o.getPatternAttr,b=v&&(x(v.shape,0,"")||x(v.path,0,""));if(b){var w=x(v.bgcolor,0,null),T=x(v.fgcolor,0,null),M=v.fgopacity,k=m(v.size,8,10),A=m(v.solidity,.5,1),S="legend-"+c.uid;i.call(o.pattern,"legend",t,S,b,k,A,d,v.fillmode,w,T,M)}else i.call(s.fill,y);a&&s.stroke(i,n.mlc||h.color)})}function T(e,a,o){var s=e[0],l=s.trace,c=o?l.visible&&l.type===o:i.traceIs(l,o),d=r.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(c?[e]:[]);if(d.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),d.exit().remove(),d.size()){var f=l.marker||{},p=_(h(f.line.width,s.pts),f.line,5,2),m="pieLike",g=n.minExtend(l,{marker:{line:{width:p}}},m);u(d,n.minExtend(s,{trace:g},m),g,t)}}e.each(function(e){var t=r.select(this),i=n.ensureSingle(t,"g","layers");i.style("opacity",e[0].trace.opacity);var o=g.indentation,s=g.valign,l=e[0].lineHeight,c=e[0].height;if(("middle"!==s||0!==o)&&l&&c){var u=g.indentation;i.attr("transform",a(u,.5*(l-c+3)*({top:1,bottom:-1})[s]||0))}else i.attr("transform",null);i.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var h=i.selectAll("g.legendsymbols").data([e]);h.enter().append("g").classed("legendsymbols",!0),h.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)}).each(function(e){var i,a=e[0].trace,c=[];if(a.visible)switch(a.type){case"histogram2d":case"heatmap":c=[["M-15,-2V4H15V-2Z"]],i=!0;break;case"choropleth":case"choroplethmap":c=[["M-6,-6V6H6V-6Z"]],i=!0;break;case"densitymap":c=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],i="radial";break;case"cone":c=[["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"]],i=!1;break;case"streamtube":c=[["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"]],i=!1;break;case"surface":c=[["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"]],i=!0;break;case"mesh3d":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],i=!1;break;case"volume":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],i=!0;break;case"isosurface":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],i=!1}var u=r.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(c);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",b).style("stroke-miterlimit",1),u.exit().remove(),u.each(function(e,c){var u,h=r.select(this),d=l(a),p=d.colorscale,m=d.reversescale;if(p){if(!i){var g=p.length;u=0===c?p[m?g-1:0][1]:1===c?p[m?0:g-1][1]:p[Math.floor((g-1)/2)][1]}}else{var y=a.vertexcolor||a.facecolor||a.color;u=n.isArrayOrTypedArray(y)?y[c]||y[0]:y}h.attr("d",e[0]),u?h.call(s.fill,u):h.call(function(e){if(e.size()){var r="legendfill-"+a.uid;o.gradient(e,t,r,f(m,"radial"===i),p,"fill")}})})}).each(function(e){var t=e[0].trace,i="waterfall"===t.type;if(e[0]._distinct&&i){var n=e[0].trace[e[0].dir].marker;return e[0].mc=n.color,e[0].mlw=n.line.width,e[0].mlc=n.line.color,w(e,this,"waterfall")}var a=[];t.visible&&i&&(a=e[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 o=r.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(a);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",b).style("stroke-miterlimit",1),o.exit().remove(),o.each(function(e){var i=r.select(this),n=t[e[0]].marker,a=_(void 0,n.line,5,2);i.attr("d",e[1]).style("stroke-width",a+"px").call(s.fill,n.color),a&&i.call(s.stroke,n.line.color)})}).each(function(e){w(e,this,"funnel")}).each(function(e){w(e,this)}).each(function(e){var a=e[0].trace,l=r.select(this).select("g.legendpoints").selectAll("path.legendbox").data(a.visible&&i.traceIs(a,"box-violin")?[e]:[]);l.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),l.exit().remove(),l.each(function(){var e=r.select(this);if(("all"===a.boxpoints||"all"===a.points)&&0===s.opacity(a.fillcolor)&&0===s.opacity((a.line||{}).color)){var i=n.minExtend(a,{marker:{size:v?12:n.constrain(a.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});l.call(o.pointStyle,i,t)}else{var c=_(void 0,a.line,5,2);e.style("stroke-width",c+"px").call(s.fill,a.fillcolor),c&&s.stroke(e,a.line.color)}})}).each(function(e){T(e,this,"funnelarea")}).each(function(e){T(e,this,"pie")}).each(function(e){var i,a,s=p(e),u=s.showFill,h=s.showLine,d=s.showGradientLine,m=s.showGradientFill,g=s.anyFill,y=s.anyLine,v=e[0],b=v.trace,w=l(b),T=w.colorscale,M=w.reversescale,k=c.hasMarkers(b)||!g?"M5,0":y?"M5,-2":"M5,-3",A=r.select(this),S=A.select(".legendfill").selectAll("path").data(u||m?[e]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",k+"h"+x+"v6h-"+x+"z").call(function(e){if(e.size())if(u)o.fillGroupStyle(e,t,!0);else{var r="legendfill-"+b.uid;o.gradient(e,t,r,f(M),T,"fill")}}),h||d){var E=_(void 0,b.line,10,5);a=n.minExtend(b,{line:{width:E}}),i=[n.minExtend(v,{trace:a})]}var C=A.select(".legendlines").selectAll("path").data(h||d?[i]:[]);C.enter().append("path").classed("js-line",!0),C.exit().remove(),C.attr("d",k+(d?"l"+x+",0.0001":"h"+x)).call(h?o.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+b.uid;o.lineGroupStyle(e),o.gradient(e,t,r,f(M),T,"stroke")}})}).each(function(e){var i,a,s=p(e),l=s.anyFill,u=s.anyLine,h=s.showLine,d=s.showMarker,f=e[0],m=f.trace,g=!d&&!u&&!l&&c.hasText(m);function y(e,t,r,i){var a=n.nestedProperty(m,e).get(),o=n.isArrayOrTypedArray(a)&&t?t(a):a;if(v&&o&&void 0!==i&&(o=i),r){if(or[1])return r[1]}return o}function x(e){return f._distinct&&f.index&&e[f.index]?e[f.index]:e[0]}if(d||g||h){var _={},w={};if(d){_.mc=y("marker.color",x),_.mx="scattermap"===m.type?"circle":y("marker.symbol",x),_.mo=y("marker.opacity",n.mean,[.2,1]),_.mlc=y("marker.line.color",x),_.mlw=y("marker.line.width",n.mean,[0,5],2),_.mld=y("marker.line.dash",x),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=y("marker.size",n.mean,[2,16],12);_.ms=T,w.marker.size=T}h&&(w.line={width:y("line.width",x,[0,10],5)}),g&&(_.tx="Aa",_.tp=y("textposition",x),_.ts=10,_.tc=y("textfont.color",x),_.tf=y("textfont.family",x),_.tw=y("textfont.weight",x),_.ty=y("textfont.style",x),_.tv=y("textfont.variant",x),_.tC=y("textfont.textcase",x),_.tE=y("textfont.lineposition",x),_.tS=y("textfont.shadow",x)),i=[n.minExtend(f,_)],(a=n.minExtend(m,w)).selectedpoints=null,a.texttemplate=null}var M=r.select(this).select("g.legendpoints"),k=M.selectAll("path.scatterpts").data(d?i:[]);k.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",b),k.exit().remove(),k.call(o.pointStyle,a,t),d&&(i[0].mrc=3);var A=M.selectAll("g.pointtext").data(g?i:[]);A.enter().append("g").classed("pointtext",!0).append("text").attr("transform",b),A.exit().remove(),A.selectAll("text").call(o.textPointStyle,a,t)}).each(function(e){var t=e[0].trace,i=r.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);i.enter().append("path").classed("legendcandle",!0).attr("d",function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",b).style("stroke-miterlimit",1),i.exit().remove(),i.each(function(e,i){var n=r.select(this),a=t[i?"increasing":"decreasing"],o=_(void 0,a.line,5,2);n.style("stroke-width",o+"px").call(s.fill,a.fillcolor),o&&s.stroke(n,a.line.color)})}).each(function(e){var t=e[0].trace,i=r.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);i.enter().append("path").classed("legendohlc",!0).attr("d",function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",b).style("stroke-miterlimit",1),i.exit().remove(),i.each(function(e,i){var n=r.select(this),a=t[i?"increasing":"decreasing"],l=_(void 0,a.line,5,2);n.style("fill","none").call(o.dashLine,a.line.dash,l),l&&s.stroke(n,a.line.color)})})}}}),rk=p({"src/components/legend/draw.js"(e,t){var r=T(),i=tv(),n=tD(),a=eQ(),o=tT(),s=rd(),l=t9(),c=ee(),u=tF(),h=rv().handleItemClick,d=rv().handleTitleClick,f=rx(),p=tR(),m=p.LINE_SPACING,g=p.FROM_TL,y=p.FROM_BR,v=rb(),x=rM(),b=rg(),_=/^legend[0-9]*$/;function w(e,t){var h,p,_=t||{},w=e._fullLayout,T=b.getId(_),S=_._inHover;if(S?(p=_.layer,h="hover"):(p=w._infolayer,h=T),p){if(h+=w._uid,e._legendMouseDownTime||(e._legendMouseDownTime=0),S){if(!_.entries)return;I=v(_.entries,_)}else{for(var I,z,D=(e.calcdata||[]).slice(),O=w.shapes,R=0;R1)}var B=w.hiddenlabels||[];if(!S&&(!w.showlegend||!I.length))return p.selectAll("."+T).remove(),w._topdefs.select("#"+h).remove(),n.autoMargin(e,T);var N=i.ensureSingle(p,"g",T,function(e){S||e.attr("pointer-events","all")}),U=i.ensureSingleById(w._topdefs,"clipPath",h,function(e){e.append("rect")}),V=i.ensureSingle(N,"rect","bg",function(e){e.attr("shape-rendering","crispEdges")});V.call(c.stroke,_.bordercolor).call(c.fill,_.bgcolor).style("stroke-width",_.borderwidth+"px");var q=i.ensureSingle(N,"g","scrollbox"),H=_.title;_._titleWidth=0,_._titleHeight=0,H.text?((z=i.ensureSingle(q,"text",T+"titletext")).attr("text-anchor","start").call(l.font,H.font).text(H.text),C(z,q,e,_,1),!S&&(_.titleclick||_.titledoubleclick)&&function(e,t,n,s){if(t._fullData.some(function(e){let t=e.legend||"legend";return(Array.isArray(t)?t.includes(s):t===s)&&a.traceIs(e,"pie-like")}))return;let l=t._context.doubleClickDelay;var u,h=1;let f=i.ensureSingle(e,"rect",s+"titletoggle",function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(f.on("mousedown",function(){(u=new Date().getTime())-t._legendMouseDownTimel&&(h=Math.max(h-1,1));let e={event:r.event,legendId:s,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(1===h&&n.titleclick){if(!1===o.triggerHandler(t,"plotly_legendtitleclick",e))return;n._titleClickTimeout=setTimeout(function(){t._fullLayout&&d(t,n,n.titleclick)},l)}else 2===h&&(n._titleClickTimeout&&clearTimeout(n._titleClickTimeout),t._legendMouseDownTime=0,!1!==o.triggerHandler(t,"plotly_legendtitledoubleclick",e)&&n.titledoubleclick&&d(t,n,n.titledoubleclick))}))}(q,e,_,T)):(q.selectAll("."+T+"titletext").remove(),q.selectAll("."+T+"titletoggle").remove());var G=i.ensureSingle(N,"rect","scrollbar",function(e){e.attr(f.scrollBarEnterAttrs).call(c.fill,f.scrollBarColor)}),W=q.selectAll("g.groups").data(I);W.enter().append("g").attr("class","groups"),W.exit().remove();var Y=W.selectAll("g.traces").data(i.identity);Y.enter().append("g").attr("class","traces"),Y.exit().remove(),Y.style("opacity",function(t){let r=t[0],i=r.trace;if(r.groupTitle){let t=i.legendgroup,r=(w.shapes||[]).filter(function(e){return e.showlegend});return e._fullData.concat(r).some(function(e){return e.legendgroup===t&&(e.legend||"legend")===T&&!0===e.visible})?1:.5}return a.traceIs(i,"pie-like")?-1!==B.indexOf(t[0].label)?.5:1:"legendonly"===i.visible?.5:1}).each(function(){r.select(this).call(A,e,_)}).call(x,e,_).each(function(t){S||t[0].groupTitle&&"toggleitem"===_.groupclick||r.select(this).call(E,e,T)}),i.syncOrAsync([n.previousPromises,function(){return function(e,t,i,n,a){var o,s,c,h,d=e._fullLayout,p=b.getId(n);n||(n=d[p]);var g=d._size,y=b.isVertical(n),v=b.isGrouped(n),x="fraction"===n.entrywidthmode,_=n.borderwidth,w=2*_,T=f.itemGap,k=n.indentation+n.itemwidth+2*T,A=2*(_+T),S=P(n),E=n.y<0||0===n.y&&"top"===S,C=n.y>1||1===n.y&&"bottom"===S,I=n.tracegroupgap,z={};let{orientation:D,yref:O}=n,{maxheight:R}=n,F=E||C||"v"!==D||"paper"!==O;R||(R=F?.5:1);let j=F?d.height:g.h;n._maxHeight=Math.max(R>1?R:R*j,30);var B=0;n._width=0,n._height=0;var N=(s=0,c=0,(h=(o=n).title.side)&&(-1!==h.indexOf("left")&&(s=o._titleWidth),-1!==h.indexOf("top")&&(c=o._titleHeight)),[s,c]);if(y)i.each(function(e){var t=e[0].height;l.setTranslate(this,_+N[0],_+N[1]+n._height+t/2+T),n._height+=t,n._width=Math.max(n._width,e[0].width)}),B=k+n._width,n._width+=T+k+w,n._height+=A,v&&(t.each(function(e,t){l.setTranslate(this,0,t*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var U=L(n),V=n.x<0||0===n.x&&"right"===U,q=n.x>1||1===n.x&&"left"===U,H=C||E,G=d.width/2;n._maxWidth=Math.max(V?H&&"left"===U?g.l+g.w:G:q?H&&"right"===U?g.r+g.w:G:g.w,2*k);var W=0,Y=0;i.each(function(e){var t=M(e,n,k);W=Math.max(W,t),Y+=t}),B=null;var Z=0;if(v){var $=0,X=0,K=0;t.each(function(){var e=0,t=0;r.select(this).selectAll("g.traces").each(function(r){var i=M(r,n,k),a=r[0].height;l.setTranslate(this,N[0],N[1]+_+T+a/2+t),t+=a,e=Math.max(e,i),z[r[0].trace.legendgroup]=e});var i=e+T;X>0&&i+_+X>n._maxWidth?(Z=Math.max(Z,X),X=0,K+=$+I,$=t):$=Math.max($,t),l.setTranslate(this,X,K),X+=i}),n._width=Math.max(Z,X)+_,n._height=K+$+A}else{var J=i.size(),Q=Y+w+(J-1)*T=n._maxWidth&&(Z=Math.max(Z,ei),et=0,er+=ee,n._height+=ee,ee=0),l.setTranslate(this,N[0]+_+et,N[1]+_+er+t/2+T),ei=et+r+T,et+=i,ee=Math.max(ee,t)}),Q?(n._width=et+w,n._height=ee+A):(n._width=Math.max(Z,ei)+w,n._height+=ee+A)}}n._width=Math.ceil(Math.max(n._width+N[0],n._titleWidth+2*(_+f.titlePad))),n._height=Math.ceil(Math.max(n._height+N[1],n._titleHeight+2*(_+f.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var en=e._context.edits,ea=en.legendText||en.legendPosition;i.each(function(e){var t=r.select(this).select("."+p+"toggle"),i=e[0].height,a=e[0].trace.legendgroup,o=M(e,n,k);v&&""!==a&&(o=z[a]);var s=ea?k:B||o;y||x||(s+=T/2),l.setRect(t,0,-i/2,s,i)});var eo=a.select("."+p+"titletext");eo.node()&&function(e,t,r){if("top center"===t.title.side||"top right"===t.title.side){var i=t.title.font.size*m,n=0,a=e.node(),o=l.bBox(a).width;"top center"===t.title.side?n=.5*(t._width-2*r-2*f.titlePad-o):"top right"===t.title.side&&(n=t._width-2*r-2*f.titlePad-o),u.positionText(e,r+f.titlePad+n,r+i)}}(eo,n,_);var es=a.select("."+p+"titletoggle");if(es.size()&&eo.node()){var el=eo.attr("x")||0,ec=f.titlePad;l.setRect(es,el-ec,_,n._titleWidth+2*ec,n._titleHeight+2*ec)}}(e,W,Y,_,q)},function(){var t,o,c,u,d=w._size,m=_.borderwidth,v="paper"===_.xref,x="paper"===_.yref;if(H.text){let t=(w.shapes||[]).filter(function(e){return e.showlegend}),r=e._fullData.concat(t).some(function(e){let t=e.legend||"legend";return(Array.isArray(t)?t.includes(T):t===T)&&!0===e.visible});z.style("opacity",r?1:.5)}if(!S){if(function(e,t,r,i){var a=e._fullLayout,o=a[t],s=L(o),l=P(o),c="paper"===o.xref,u="paper"===o.yref;e._fullLayout._reservedMargin[t]={};var h=o.y<.5?"b":"t",d=o.x<.5?"l":"r",f={r:a.width-r,l:r+o._width,b:a.height-i,t:i+o._effHeight};if(c&&u)return n.autoMargin(e,t,{x:o.x,y:o.y,l:o._width*g[s],r:o._width*y[s],b:o._effHeight*y[l],t:o._effHeight*g[l]});c?e._fullLayout._reservedMargin[t][h]=f[h]:u||"v"===o.orientation?e._fullLayout._reservedMargin[t][d]=f[d]:e._fullLayout._reservedMargin[t][h]=f[h]}(e,T,R=v?d.l+d.w*_.x-g[L(_)]*_._width:w.width*_.x-g[L(_)]*_._width,F=x?d.t+d.h*(1-_.y)-g[P(_)]*_._effHeight:w.height*(1-_.y)-g[P(_)]*_._effHeight))return;if(w.margin.autoexpand){var b=R,M=F;R=v?i.constrain(R,0,w.width-_._width):b,F=x?i.constrain(F,0,w.height-_._effHeight):M,R!==b&&i.log("Constrain "+T+".x to make legend fit inside graph"),F!==M&&i.log("Constrain "+T+".y to make legend fit inside graph")}l.setTranslate(N,R,F)}if(G.on(".drag",null),N.on("wheel",null),S||_._height<=_._maxHeight||e._context.staticPlot){var A=_._effHeight;S&&(A=_._height),V.attr({width:_._width-m,height:A-m,x:m/2,y:m/2}),l.setTranslate(q,0,0),U.select("rect").attr({width:_._width-2*m,height:A-2*m,x:m,y:m}),l.setClipUrl(q,h,e),l.setRect(G,0,0,0,0),delete _._scrollY}else{var E=Math.max(f.scrollBarMinHeight,_._effHeight*_._effHeight/_._height),C=_._effHeight-E-2*f.scrollBarMargin,I=_._height-_._effHeight,D=C/I,O=Math.min(_._scrollY||0,I);V.attr({width:_._width-2*m+f.scrollBarWidth+f.scrollBarMargin,height:_._effHeight-m,x:m/2,y:m/2}),U.select("rect").attr({width:_._width-2*m+f.scrollBarWidth+f.scrollBarMargin,height:_._effHeight-2*m,x:m,y:m+O}),l.setClipUrl(q,h,e),K(O,E,D),N.on("wheel",function(){K(O=i.constrain(_._scrollY+r.event.deltaY/I*C,0,I),E,D),0!==O&&O!==I&&r.event.preventDefault()});var R,F,j,B,W,Y=function(e,t,r){var n=(r-t)/D+e;return i.constrain(n,0,I)},Z=function(e,t,r){var n=(t-r)/D+e;return i.constrain(n,0,I)},$=r.behavior.drag().on("dragstart",function(){var e=r.event.sourceEvent;j="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,W=O}).on("drag",function(){var e=r.event.sourceEvent;2===e.buttons||e.ctrlKey||(B="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,K(O=Y(W,j,B),E,D))});G.call($);var X=r.behavior.drag().on("dragstart",function(){var e=r.event.sourceEvent;"touchstart"===e.type&&(j=e.changedTouches[0].clientY,W=O)}).on("drag",function(){var e=r.event.sourceEvent;"touchmove"===e.type&&(B=e.changedTouches[0].clientY,K(O=Z(W,j,B),E,D))});q.call(X)}function K(t,r,i){_._scrollY=e._fullLayout[T]._scrollY=t,l.setTranslate(q,0,-t),l.setRect(G,_._width,f.scrollBarMargin+t*i,f.scrollBarWidth,r),U.select("rect").attr("y",m+t)}e._context.edits.legendPosition&&(N.classed("cursor-move",!0),s.init({element:N.node(),gd:e,prepFn:function(e){if(e.target!==G.node()){var t=l.getTranslate(N);c=t.x,u=t.y}},moveFn:function(e,r){if(void 0!==c&&void 0!==u){var i=c+e,n=u+r;l.setTranslate(N,i,n),t=s.align(i,_._width,d.l,d.l+d.w,_.xanchor),o=s.align(n+_._height,-_._height,d.t+d.h,d.t,_.yanchor)}},doneFn:function(){if(void 0!==t&&void 0!==o){var r={};r[T+".x"]=t,r[T+".y"]=o,a.call("_guiRelayout",e,r)}},clickFn:function(t,r){var i=p.selectAll("g.traces").filter(function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom});i.size()>0&&k(e,_,i,t,r)}}))}],e)}}function M(e,t,r){var i=e[0],n=i.width,a=t.entrywidthmode,o=i.trace.legendwidth||t.entrywidth;return"fraction"===a?t._maxWidth*o:r+(o||n)}function k(e,t,r,i,n){var s=e._fullLayout,l=r.data()[0][0].trace,c=t.itemclick,u=t.itemdoubleclick,d={event:n,node:r.node(),curveNumber:l.index,expandedIndex:l.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:s};l._group&&(d.group=l._group),a.traceIs(l,"pie-like")&&(d.label=r.datum()[0].label);var f=o.triggerHandler(e,"plotly_legendclick",d);if(1===i){if(!1===f)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&c&&h(r,e,t,c)},e._context.doubleClickDelay)}else 2===i&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==o.triggerHandler(e,"plotly_legenddoubleclick",d)&&!1!==f&&u&&h(r,e,t,u))}function A(e,t,r){var n,o,s=b.getId(r),c=e.data()[0][0],h=c.trace,d=a.traceIs(h,"pie-like"),p=!r._inHover&&t._context.edits.legendText&&!d,m=r._maxNameLength;c.groupTitle?(n=c.groupTitle.text,o=c.groupTitle.font):(o=r.font,r.entries?n=c.text:(n=d?c.label:h.name,h._meta&&(n=i.templateString(n,h._meta))));var g=i.ensureSingle(e,"text",s+"text");g.attr("text-anchor","start").call(l.font,o).text(p?S(n,m):n);var y=r.indentation+r.itemwidth+2*f.itemGap;u.positionText(g,y,0),p?g.call(u.makeEditable,{gd:t,text:n}).call(C,e,t,r).on("edit",function(i){this.text(S(i,m)).call(C,e,t,r);var n={};return n.name=i,c.trace._isShape?a.call("_guiRelayout",t,"shapes["+h.index+"].name",n.name):a.call("_guiRestyle",t,n,h.index)}):C(g,e,t,r)}function S(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var i=r-e.length;i>0;i--)e+=" ";return e}function E(e,t,n){var a,o=t._context.doubleClickDelay,s=1,l=i.ensureSingle(e,"rect",n+"toggle",function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){(a=new Date().getTime())-t._legendMouseDownTimeo&&(s=Math.max(s-1,1)),k(t,i,e,s,r.event)}}))}function C(e,t,r,i,n){i._inHover&&e.attr("data-notex",!0),u.convertToTspans(e,r,function(){!function(e,t,r,i){var n=e.data()[0][0],a=n&&n.trace.showlegend;if(Array.isArray(a)&&(a=!1!==a[n.i]),!r._inHover&&n&&!a)return e.remove();var o=e.select("g[class*=math-group]"),s=o.node(),c=b.getId(r);r||(r=t._fullLayout[c]);var h,d,p=r.borderwidth,g=(1===i?r.title.font:n.groupTitle?n.groupTitle.font:r.font).size*m;if(s){var y=l.bBox(s);h=y.height,d=y.width,1===i?l.setTranslate(o,p,p+.75*h):l.setTranslate(o,0,.25*h)}else{var v=e.select("."+c+(1===i?"title":"")+"text"),x=u.lineCount(v),_=v.node();if(h=g*x,d=_?l.bBox(_).width:0,1===i)"left"===r.title.side&&(d+=2*f.itemGap),u.positionText(v,p+f.titlePad,p+g);else{var w=2*f.itemGap+r.indentation+r.itemwidth;n.groupTitle&&(w=f.itemGap,d-=r.indentation+r.itemwidth),u.positionText(v,w,-g*((x-1)/2-.3))}}1===i?(r._titleWidth=d,r._titleHeight=h):(n.lineHeight=g,n.height=Math.max(h,16)+3,n.width=d)}(t,r,i,n)})}function L(e){return i.isRightAnchor(e)?"right":i.isCenterAnchor(e)?"center":"left"}function P(e){return i.isBottomAnchor(e)?"bottom":i.isMiddleAnchor(e)?"middle":"top"}t.exports=function(e,t){if(t)w(e,t);else{var i=e._fullLayout,n=i._legends;i._infolayer.selectAll('[class^="legend"]').each(function(){var e=r.select(this),t=e.attr("class").split(" ")[0];t.match(_)&&-1===n.indexOf(t)&&e.remove()});for(var a=0;a$[0]._length||eb<0||eb>X[0]._length)return d.unhoverRaw(e,a)}else ex="xpx"in a?a.xpx:$[0]._length/2,eb="ypx"in a?a.ypx:X[0]._length/2;if(a.pointerX=ex+$[0]._offset,a.pointerY=eb+X[0]._offset,er="xval"in a?g.flat(b,a.xval):g.p2c($,ex),ei="yval"in a?g.flat(b,a.yval):g.p2c(X,eb),e._hoverPointerX=a.pointerX,e._hoverPointerY=a.pointerY,!r(er[0])||!r(ei[0]))return i.warn("Fx.hover failed",a,e),d.unhoverRaw(e,a)}_.clickanywhere&&(e._hoverXVals=er,e._hoverYVals=ei,e._hoverXAxes=$,e._hoverYAxes=X);var eM=1/0;function ek(t,n){for(ea=0;eaep&&(em.splice(0,ep),eM=em[0].distance),S&&0!==et&&0===em.length){ef.distance=et,ef.index=!1;var u=es._module.hoverPoints(ef,eh,ed,"closest",{hoverLayer:_._hoverlayer});if(u&&(u=u.filter(function(e){return e.spikeDistance<=et})),u&&u.length){var d,p=u.filter(function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap});if(p.length){var m=p[0];r(m.x0)&&r(m.y0)&&(d=eS(m),(!ey.vLinePoint||ey.vLinePoint.spikeDistance>d.spikeDistance)&&(ey.vLinePoint=d))}var y=u.filter(function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap});if(y.length){var v=y[0];r(v.x0)&&r(v.y0)&&(d=eS(v),(!ey.hLinePoint||ey.hLinePoint.spikeDistance>d.spikeDistance)&&(ey.hLinePoint=d))}}}}}function eA(e,t,r){for(var i,n=null,a=1/0,o=0;oe.trace.index===eD.trace.index):[eD]).length;ek(U("x",eD,_),U("y",eD,_));var eR,eF=[],ej={},eB=0,eN=function(e){var t=E[e.trace.type]?I(e):e.trace.index;if(ej[t]){var r=ej[t]-1,i=eF[r];r>0&&Math.abs(e.distance)eO-1;eR--)eN(em[eR]);em=eF,eL()}var eU=e._hoverdata,eV=[],eq=V(e),eH=q(e);for(let e of em){var eG=g.makeEventData(e,e.trace,e.cd);if(!1!==e.hovertemplate){var eW=!1;e.cd[e.index]&&e.cd[e.index].ht&&(eW=e.cd[e.index].ht),e.hovertemplate=eW||e.trace.hovertemplate||!1}if(e.xa&&e.ya){var eY=e.x0+e.xa._offset,eZ=e.x1+e.xa._offset,e$=e.y0+e.ya._offset,eX=e.y1+e.ya._offset;eG.bbox={x0:Math.min(eY,eZ)+eH,x1:Math.max(eY,eZ)+eH,y0:Math.min(e$,eX)+eq,y1:Math.max(e$,eX)+eq},eG.xPixel=(eY+eZ)/2,eG.yPixel=(e$+eX)/2}e.eventData=[eG],eV.push(eG)}e._hoverdata=eV;var eK="y"===C&&(eg.length>1||em.length>1)||"closest"===C&&ev&&em.length>1,eJ=h.combine(_.plot_bgcolor||h.background,_.paper_bgcolor),eQ=D(em,{gd:e,hovermode:C,rotateLabels:eK,bgColor:eJ,container:_._hoverlayer,outerContainer:_._paper.node(),commonLabelOpts:_.hoverlabel,hoverdistance:_.hoverdistance}),e0=eQ.hoverLabels;if(g.isUnifiedHover(C)||(function(e,t,r,i){var n,a,o,s,l,c,u,h=t?"xa":"ya",d=t?"ya":"xa",f=0,p=1,m=e.size(),g=Array(m),y=0,v=i.minX,x=i.maxX,b=i.minY,_=i.maxY,T=function(e){return e*r._invScaleX},M=function(e){return e*r._invScaleY};function k(e){var t=e[0],r=e[e.length-1];if(a=t.pmin-t.pos-t.dp+t.size,o=r.pos+r.dp+r.size-t.pmax,a>.01){for(l=e.length-1;l>=0;l--)e[l].dp+=a;n=!1}if(!(o<.01)){if(a<-.01){for(l=e.length-1;l>=0;l--)e[l].dp-=o;n=!1}if(n){var i=0;for(s=0;st.pmax&&i++;for(s=e.length-1;s>=0&&!(i<=0);s--)(c=e[s]).pos>t.pmax-1&&(c.del=!0,i--);for(s=0;s=0;l--)e[l].dp-=o;for(s=e.length-1;s>=0&&!(i<=0);s--)(c=e[s]).pos+c.dp+c.size>t.pmax&&(c.del=!0,i--)}}}for(e.each(function(e){var i=e[h],n=e[d],a="x"===i._id.charAt(0),o=i.range;0===y&&o&&o[0]>o[1]!==a&&(p=-1);var s=0,l=a?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,u,f=R(e,t),m=e.anchor,k="end"===m?-1:1;if("middle"===m)u=(c=e.crossPos+(a?M(f.y-e.by/2):T(e.bx/2+e.tx2width/2)))+(a?M(e.by):T(e.bx));else if(a)u=(c=e.crossPos+M(A+f.y)-M(e.by/2-A))+M(e.by);else{var S=T(k*A+f.x),E=S+T(k*e.bx);c=e.crossPos+Math.min(S,E),u=e.crossPos+Math.max(S,E)}a?void 0!==b&&void 0!==_&&Math.min(u,_)-Math.max(c,b)>1&&("left"===n.side?(s=n._mainLinePosition,l=r.width):l=n._mainLinePosition):void 0!==v&&void 0!==x&&Math.min(u,x)-Math.max(c,v)>1&&("top"===n.side?(s=n._mainLinePosition,l=r.height):l=n._mainLinePosition)}g[y++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(a?w:1)/2,pmin:s,pmax:l}]}),g.sort(function(e,t){return e[0].posref-t[0].posref||p*(t[0].traceIndex-e[0].traceIndex)});!n&&f<=m;){for(f++,n=!0,s=0;s.01){for(l=E.length-1;l>=0;l--)E[l].dp+=a;for(S.push.apply(S,E),g.splice(s+1,1),u=0,l=S.length-1;l>=0;l--)u+=S[l].dp;for(o=u/S.length,l=S.length-1;l>=0;l--)S[l].dp-=o;n=!1}else s++}g.forEach(k)}for(s=g.length-1;s>=0;s--){var P=g[s];for(l=P.length-1;l>=0;l--){var I=P[l],z=I.datum;z.offset=I.dp,z.del=I.del}}}(e0,eK,_,eQ.commonLabelBoundingBox),F(e0,eK,_._invScaleX,_._invScaleY)),u&&u.tagName){var e1=m.getComponentMethod("annotations","hasClickToShow")(e,eV);c(t.select(u),e1?"pointer":"")}var e2=function(e,t){if(!t||t.length!==e._hoverdata.length)return!0;for(var r=t.length-1;r>=0;r--){var i=t[r],n=e._hoverdata[r];if(i.curveNumber!==n.curveNumber||String(i.pointNumber)!==String(n.pointNumber)||String(i.pointNumbers)!==String(n.pointNumbers)||i.binNumber!==n.binNumber)return!0}return!1}(e,eU);function e3(t){e.emit("plotly_hover",{event:a,points:t,xaxes:$,yaxes:X,xvals:g.c2dApply($,er),yvals:g.c2dApply(X,ei),xPixel:a.pointerX,yPixel:a.pointerY})}u&&!l&&(e2||_.hoveranywhere)&&(eU&&e2&&e.emit("plotly_unhover",{event:a,points:eU}),e3(e._hoverdata))}(e,a,o,l,u)})},e.loneHover=function(e,r){var i=!0;Array.isArray(e)||(i=!1,e=[e]);var n=r.gd,a=V(n),o=q(n),s=D(e.map(function(e){var t=e._x0||e.x0||e.x||0,i=e._x1||e.x1||e.x||0,s=e._y0||e.y0||e.y||0,l=e._y1||e.y1||e.y||0,c=e.eventData;if(c){var u=Math.min(t,i),d=Math.max(t,i),f=Math.min(s,l),p=Math.max(s,l),g=e.trace;if(m.traceIs(g,"gl3d")){var y=n._fullLayout[g.scene]._scene.container,v=y.offsetLeft,x=y.offsetTop;u+=v,d+=v,f+=x,p+=x}c.bbox={x0:u+o,x1:d+o,y0:f+a,y1:p+a},c.xPixel=(t+i)/2,c.yPixel=(s+l)/2,r.inOut_bbox&&r.inOut_bbox.push(c.bbox)}else c=!1;return{color:e.color||h.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontVariant:e.fontVariant,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:c}}),{gd:n,hovermode:"closest",rotateLabels:!1,bgColor:r.bgColor||h.background,container:t.select(r.container),outerContainer:r.outerContainer||r.container}).hoverLabels,l=0,c=0;return s.sort(function(e,t){return e.y0-t.y0}).each(function(e,t){var i=e.y0-e.by/2;i-5([\s\S]*)<\/extra>/;function D(e,r){var n=r.gd,s=n._fullLayout,c=r.hovermode,d=r.rotateLabels,f=r.bgColor,p=r.container,_=r.outerContainer,w=r.commonLabelOpts||{};if(0===e.length)return[[]];var T=r.fontFamily||y.HOVERFONT,M=r.fontSize||y.HOVERFONTSIZE,k=r.fontWeight||s.font.weight,E=r.fontStyle||s.font.style,C=r.fontVariant||s.font.variant,L=r.fontTextcase||s.font.textcase,P=r.fontLineposition||s.font.lineposition,z=r.fontShadow||s.font.shadow,D=e[0],R=D.xa,F=D.ya,j=c.charAt(0),B=j+"Label",N=D[B];if(void 0===N&&"multicategory"===R.type)for(var U=0;Us.width-_&&(I=s.width-_),r.attr("d","M"+(y-I)+",0L"+(y-I+A)+","+b+A+"H"+_+"v"+b+(2*S+x.height)+"H"+-_+"V"+b+A+"H"+(y-I-A)+"Z"),Q.minX=(y=I)-_,Q.maxX=y+_,"top"===R.side?(Q.minY=v-(2*S+x.height),Q.maxY=v-S):(Q.minY=v+S,Q.maxY=v+(2*S+x.height))}else{"right"===F.side?(O="start",j=1,B="",y=R._offset+R._length):(O="end",j=-1,B="-",y=R._offset),v=F._offset+(D.y0+D.y1)/2,o.attr("text-anchor",O),r.attr("d","M0,0L"+B+A+","+A+"V"+(S+x.height/2)+"h"+B+(2*S+x.width)+"V-"+(S+x.height/2)+"H"+B+A+"V-"+A+"Z"),Q.minY=v-(S+x.height/2),Q.maxY=v+(S+x.height/2),"right"===F.side?(Q.minX=y+A,Q.maxX=y+A+(2*S+x.width)):(Q.minX=y-A-(2*S+x.width),Q.maxX=y-A);var O,j,B,U,V=x.height/2,G=q-x.top-V,W="clip"+s._uid+"commonlabel"+F._id;if(y"none"!==e.hoverinfo);if(0===t.length)return[];var ee,et,er,ei,en=s.hoverlabel,ea=en.font,eo=t[0],es=(("x unified"===c?eo.xa:eo.ya).unifiedhovertitle||{}).text,el={showlegend:!0,legend:{title:{text:es?i.hovertemplateString({data:"x unified"===c?[{xa:eo.xa,x:eo.xVal}]:[{ya:eo.ya,y:eo.yVal}],fallback:eo.trace.hovertemplatefallback,locale:s._d3locale,template:es}):N,font:ea},font:ea,bgcolor:en.bgcolor,bordercolor:en.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:s.legend?s.legend.traceorder:void 0,orientation:"v"}},ec={font:ea};v(el,ec,n._fullData);var eu=ec.legend;eu.entries=[];for(var eh=0;eh=0?ee:et+e_=0?et:eS+e_=0?ey:ev+ew=0?ev:eE+ew=0,("top"===e.idealAlign||!K)&&J?(B-=V/2,e.anchor="end"):K?(B+=V/2,e.anchor="start"):e.anchor="middle",e.crossPos=B;else{if(e.pos=B,K=j+U/2+Q<=G,J=j-U/2-Q>=0,("left"===e.idealAlign||!K)&&J)j-=U/2,e.anchor="end";else if(K)j+=U/2,e.anchor="start";else{e.anchor="middle";var ee=Q/2,et=j+ee-G,er=j-ee;et>0&&(j-=et),er<0&&(j+=-er)}e.crossPos=j}w.attr("text-anchor",e.anchor),D&&I.attr("text-anchor",e.anchor),r.attr("transform",a(j,B)+(d?o(b):""))}),{hoverLabels:eC,commonLabelBoundingBox:Q}}function O(e,t,r,n,a,o){var s,l,c="",u="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=i.templateString(e.name,e.trace._meta)),c=N(e.name,e.nameLength));var h=r.charAt(0);void 0!==e.zLabel?(void 0!==e.xLabel&&(u+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(u+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmap"!==e.trace.type&&(u+=(u?"z: ":"")+e.zLabel)):t&&e[h+"Label"]===a?u=e[("x"===h?"y":"x")+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(u=e.yLabel):u=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",(e.text||0===e.text)&&!Array.isArray(e.text)&&(u+=(u?"
":"")+e.text),void 0!==e.extraText&&(u+=(u?"
":"")+e.extraText),o&&""===u&&!e.hovertemplate&&(""===c&&o.remove(),u=c),null!=(l=null==(s=e.trace)?void 0:s.hoverlabel)&&l.split&&(e.hovertemplate="");let{hovertemplate:d=!1}=e;if(d){let t=e.hovertemplateLabels||e;e[h+"Label"]!==a&&(t[h+"other"]=t[h+"Val"],t[h+"otherLabel"]=t[h+"Label"]),u=(u=i.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:t,locale:n._d3locale,template:d})).replace(z,(t,r)=>(c=N(r,e.nameLength),""))}return[u,c]}function R(e,t){var r=0,i=e.offset;return t&&(i*=-k,r=e.offset*M),{x:r,y:i}}function F(e,r,i,n){var a=function(e){return e*i},o=function(e){return e*n};e.each(function(e){var i=t.select(this);if(e.del)return i.remove();var n,s,c,h,d=i.select("text.nums"),f=e.anchor,p="end"===f?-1:1,m=(c=(s=(n=({start:1,end:-1,middle:0})[e.anchor])*(A+S))+n*(e.txwidth+S),"middle"===e.anchor&&(s-=e.tx2width/2,c+=e.txwidth/2+S),{alignShift:n,textShiftX:s,text2ShiftX:c}),g=R(e,r),y=g.x,v=g.y,x="middle"===f,b=!("hoverlabel"in e.trace)||e.trace.hoverlabel.showarrow;h=x?"M-"+a(e.bx/2+e.tx2width/2)+","+o(v-e.by/2)+"h"+a(e.bx)+"v"+o(e.by)+"h-"+a(e.bx)+"Z":b?"M0,0L"+a(p*A+y)+","+o(A+v)+"v"+o(e.by/2-A)+"h"+a(p*e.bx)+"v-"+o(e.by)+"H"+a(p*A+y)+"V"+o(v-A)+"Z":"M"+a(p*A+y)+","+o(v-e.by/2)+"h"+a(p*e.bx)+"v"+o(e.by)+"h"+a(-p*e.bx)+"Z",i.select("path").attr("d",h);var _=y+m.textShiftX,w=v+e.ty0-e.by/2+S,T=e.textAlign||"auto";"auto"!==T&&("left"===T&&"start"!==f?(d.attr("text-anchor","start"),_=x?-e.bx/2-e.tx2width/2+S:-e.bx-S):"right"===T&&"end"!==f&&(d.attr("text-anchor","end"),_=x?e.bx/2-e.tx2width/2-S:e.bx+S)),d.call(l.positionText,a(_),o(w)),e.tx2width&&(i.select("text.name").call(l.positionText,a(m.text2ShiftX+m.alignShift*S+y),o(v+e.ty0-e.by/2+S)),i.select("rect").call(u.setRect,a(m.text2ShiftX+(m.alignShift-1)*e.tx2width/2+y),o(v-e.by/2-1),a(e.tx2width),o(e.by+2)))})}function j(e,t,r){var i,n,a=r.container,o=r.fullLayout,s=o._size,l=r.event,c=!!t.hLinePoint,d=!!t.vLinePoint;if(a.selectAll(".spikeline").remove(),d||c){var p=h.combine(o.plot_bgcolor,o.paper_bgcolor);if(c){var m,g,y=t.hLinePoint;i=y&&y.xa,"cursor"===(n=y&&y.ya).spikesnap?(m=l.pointerX,g=l.pointerY):(m=i._offset+y.x,g=n._offset+y.y);var v,x,b=1.5>h.wcagContrast(y.color,p)?h.contrast(p):y.color,_=n.spikemode,w=n.spikethickness,T=n.spikecolor||b,M=f.getPxPosition(e,n);if(-1!==_.indexOf("toaxis")||-1!==_.indexOf("across")){if(-1!==_.indexOf("toaxis")&&(v=M,x=m),-1!==_.indexOf("across")){var k=n._counterDomainMin,A=n._counterDomainMax;"free"===n.anchor&&(k=Math.min(k,n.position),A=Math.max(A,n.position)),v=s.l+k*s.w,x=s.l+A*s.w}a.insert("line",":first-child").attr({x1:v,x2:x,y1:g,y2:g,"stroke-width":w,stroke:T,"stroke-dasharray":u.dashStyle(n.spikedash,w)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:v,x2:x,y1:g,y2:g,"stroke-width":w+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==_.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:M+("right"!==n.side?w:-w),cy:g,r:w,fill:T}).classed("spikeline",!0)}if(d){var S,E,C=t.vLinePoint;i=C&&C.xa,n=C&&C.ya,"cursor"===i.spikesnap?(S=l.pointerX,E=l.pointerY):(S=i._offset+C.x,E=n._offset+C.y);var L,P,I=1.5>h.wcagContrast(C.color,p)?h.contrast(p):C.color,z=i.spikemode,D=i.spikethickness,O=i.spikecolor||I,R=f.getPxPosition(e,i);if(-1!==z.indexOf("toaxis")||-1!==z.indexOf("across")){if(-1!==z.indexOf("toaxis")&&(L=R,P=E),-1!==z.indexOf("across")){var F=i._counterDomainMin,j=i._counterDomainMax;"free"===i.anchor&&(F=Math.min(F,i.position),j=Math.max(j,i.position)),L=s.t+(1-j)*s.h,P=s.t+(1-F)*s.h}a.insert("line",":first-child").attr({x1:S,x2:S,y1:L,y2:P,"stroke-width":D,stroke:O,"stroke-dasharray":u.dashStyle(i.spikedash,D)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:S,x2:S,y1:L,y2:P,"stroke-width":D+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==z.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:S,cy:R-("top"!==i.side?D:-D),r:D,fill:O}).classed("spikeline",!0)}}}function B(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function N(e,t){return l.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function U(e,t,r){var i=t[e+"a"],n=t[e+"Val"],a=t.cd[0];if("category"===i.type||"multicategory"===i.type)n=i._categoriesMap[n];else if("date"===i.type){var o=t.trace[e+"periodalignment"];if(o){var s=t.cd[t.index],l=s[e+"Start"];void 0===l&&(l=s[e]);var c=s[e+"End"];void 0===c&&(c=s[e]);var u=c-l;"end"===o?n+=u:"middle"===o&&(n+=u/2)}n=i.d2c(n)}return a&&a.t&&a.t.posLetter===i._id&&("group"===r.boxmode||"group"===r.violinmode)&&(n+=a.t.dPos),n}var V=e=>e.offsetTop+e.clientTop,q=e=>e.offsetLeft+e.clientLeft;function H(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),a=n.left,o=n.top,s=a+n.width,l=o+n.height,c=i.apply3DTransform(r._invTransform)(a,o),u=i.apply3DTransform(r._invTransform)(s,l),h=c[0],d=c[1],f=u[0],p=u[1];return{x:h,y:d,width:f-h,height:p-d,top:Math.min(d,p),left:Math.min(h,f),right:Math.max(h,f),bottom:Math.max(d,p)}}}}),rS=p({"src/components/fx/hoverlabel_defaults.js"(e,t){var r=tv(),i=ee(),n=t6().isUnifiedHover;t.exports=function(e,t,a,o){o=o||{};var s=t.legend;function l(e){o.font[e]||(o.font[e]=s?t.legend.font[e]:t.font[e])}t&&n(t.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(o.bgcolor||(o.bgcolor=i.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),a("hoverlabel.bgcolor",o.bgcolor),a("hoverlabel.bordercolor",o.bordercolor),a("hoverlabel.namelength",o.namelength),a("hoverlabel.showarrow",o.showarrow),r.coerceFont(a,"hoverlabel.font",o.font),a("hoverlabel.align",o.align)}}}),rE=p({"src/components/fx/layout_global_defaults.js"(e,t){var r=tv(),i=rS(),n=W();t.exports=function(e,t){i(e,t,function(i,a){return r.coerce(e,t,n,i,a)})}}}),rC=p({"src/components/fx/defaults.js"(e,t){var r=tv(),i=Y(),n=rS();t.exports=function(e,t,a,o){var s=r.extendFlat({},o.hoverlabel);t.hovertemplate&&(s.namelength=-1),n(e,t,function(n,a){return r.coerce(e,t,i,n,a)},s)}}}),rL=p({"src/components/fx/hovermode_defaults.js"(e,t){var r=tv(),i=W();t.exports=function(e,t){function n(n,a){return void 0!==t[n]?t[n]:r.coerce(e,t,i,n,a)}return n("clickmode"),n("hoversubplots"),n("hoveranywhere"),n("clickanywhere"),n("hovermode")}}}),rP=p({"src/components/fx/layout_defaults.js"(e,t){var r=tv(),i=W(),n=rL(),a=rS();t.exports=function(e,t){function o(n,a){return r.coerce(e,t,i,n,a)}var s=n(e,t);s&&(o("hoverdistance"),o("spikedistance"),-1!==s.indexOf("unified")&&o("hoversort")),"select"===o("dragmode")&&o("selectdirection");var l=t._has("map"),c=t._has("geo"),u=t._basePlotModules.length;"zoom"===t.dragmode&&((l||c)&&1===u||l&&c&&2===u)&&(t.dragmode="pan"),a(e,t,o),r.coerceFont(o,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),rI=p({"src/components/fx/calc.js"(e,t){var r=tv(),i=eQ();function n(e,t,i,n){n=n||r.identity,Array.isArray(e)&&(t[0][i]=n(e))}t.exports=function(e){for(var t=e.calcdata,a=e._fullLayout,o=0;o plotly-logomark "}}}}),rj=p({"src/components/shapes/draw_newshape/constants.js"(e,t){t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),rB=p({"src/components/selections/helpers.js"(e,t){var r=tv().strTranslate;function i(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}t.exports={p2r:i,r2p:function(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}},axValue:function(e){var t=+("y"===e._id.charAt(0));return function(r){return i(e,r[t])}},getTransform:function(e){return r(e.xaxis._offset,e.yaxis._offset)}}}}),rN=p({"src/components/shapes/draw_newshape/helpers.js"(e){var t=t8(),r=rj(),i=r.CIRCLE_SIDES,n=r.SQRT2,a=rB(),o=a.p2r,s=a.r2p,l=[0,3,4,5,6,1,2],c=[0,3,4,1,2];function u(e,t){return 1e-6>=Math.abs(e-t)}function h(e,t){var r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+i*i)}e.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",i=0;i0&&ue+ +(void 0!==a[t.charAt(0)].drawn),0)},e.getDataToPixel=function(t,r,i,a,o){var s,l=t._fullLayout._size;if(r)if("domain"===o)s=function(e){return r._length*(a?1-e:e)+r._offset};else{var c=e.shapePositionToRange(r);s=function(e){var t=n(r,i);return r._offset+r.r2p(c(e,!0))+t},"date"===r.type&&(s=e.decodeDate(s))}else s=a?function(e){return l.t+l.h*(1-e)}:function(e){return l.l+l.w*e};return s},e.getPixelToData=function(t,r,i,n){var a,o=t._fullLayout._size;if(r)if("domain"===n)a=function(e){var t=(e-r._offset)/r._length;return i?1-t:t};else{var s=e.rangeToShapePosition(r);a=function(e){return s(r.p2r(e-r._offset))}}else a=i?function(e){return 1-(e-o.t)/o.h}:function(e){return(e-o.l)/o.w};return a},e.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(e);return 1===Math.round(t%2)?r+.5:r},e.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},i=e._fullLayout._plots[r.xref+r.yref];return i?i._hadPlotinfo=!0:(i={},r.xref&&"paper"!==r.xref&&(i.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&"paper"!==r.yref&&(i.yaxis=e._fullLayout[r.yref+"axis"])),i.xsizemode=r.xsizemode,i.ysizemode=r.ysizemode,i.xanchor=r.xanchor,i.yanchor=r.yanchor,{options:r,plotinfo:i}},e.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},i=e._fullLayout._plots[r.xref+r.yref];return i?i._hadPlotinfo=!0:(i={},r.xref&&(i.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(i.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:i}},e.getPathString=function(a,o){let s=o.type,l=i.getRefType(o.xref),c=i.getRefType(o.yref),u=a._fullLayout._size;function h(t,r,i,n){var a;if(t)if("domain"===r)a=n?function(e){return t._offset+t._length*(1-e)}:function(e){return t._offset+t._length*e};else{let r=e.shapePositionToRange(t);a=function(e){return t._offset+t.r2p(r(e,!0))},"path"===i&&"date"===t.type&&(a=e.decodeDate(a))}else a=n?function(e){return u.t+u.h*(1-e)}:function(e){return u.l+u.w*e};return a}if("array"===l?(T=[],y=o.xref.map(function(e){return i.getFromId(a,e)}),T=o.xref.map(function(e,t){return h(y[t],i.getRefType(e),s,!1)})):T=h(y=i.getFromId(a,o.xref),l,s,!1),"array"===c?(M=[],v=o.yref.map(function(e){return i.getFromId(a,e)}),M=o.yref.map(function(e,t){return h(v[t],i.getRefType(e),s,!0)})):M=h(v=i.getFromId(a,o.yref),c,s,!0),"path"===s){var d,f,p,m,g;let e,i,n,a,s,l,c;return d=o,f=T,p=M,e=d.path,i=d.xsizemode,n=d.ysizemode,a=d.xanchor,s=d.yanchor,l=Array.isArray(d.xref),c=Array.isArray(d.yref),m=0,g=0,e.replace(t.segmentRE,function(e){var o=0,u=e.charAt(0),h=t.paramIsX[u],d=t.paramIsY[u],y=t.numParams[u];let v=void 0!==h.drawn,x=void 0!==d.drawn,b=l?f[m]:f,_=c?p[g]:p;var w=e.slice(1).replace(t.paramRE,function(e){return h[o]?e="pixel"===i?b(a)+Number(e):b(e):d[o]&&(e="pixel"===n?_(s)-Number(e):_(e)),++o>y&&(e="X"),e});return o>y&&(w=w.replace(/[\s,]*X.*/,""),r.log("Ignoring extra params in segment "+e)),v&&m++,x&&g++,u+w})}if("array"===l)x=n(y[0],o.x0shift),b=n(y[1],o.x1shift),k=T[0](o.x0)+x,A=T[1](o.x1)+b;else if(x=n(y,o.x0shift),b=n(y,o.x1shift),"pixel"===o.xsizemode){let e=T(o.xanchor);k=e+o.x0+x,A=e+o.x1+b}else k=T(o.x0)+x,A=T(o.x1)+b;if("array"===c)_=n(v[0],o.y0shift),w=n(v[1],o.y1shift),S=M[0](o.y0)+_,E=M[1](o.y1)+w;else if(_=n(v,o.y0shift),w=n(v,o.y1shift),"pixel"===o.ysizemode){let e=M(o.yanchor);S=e-o.y0+_,E=e-o.y1+w}else S=M(o.y0)+_,E=M(o.y1)+w;if("line"===s)return"M"+k+","+S+"L"+A+","+E;if("rect"===s)return"M"+k+","+S+"H"+A+"V"+E+"H"+k+"Z";var y,v,x,b,_,w,T,M,k,A,S,E,C=(k+A)/2,L=(S+E)/2,P=Math.abs(C-k),I=Math.abs(L-S),z="A"+P+","+I,D=C+P+","+L;return"M"+D+z+" 0 1,1 "+C+","+(L-I)+z+" 0 0,1 "+D+"Z"},e.getPixelShift=n}}),rG=p({"src/components/shapes/display_labels.js"(e,t){var r=tv(),i=rn(),n=tF(),a=t9(),o=rN().readPaths,s=rH(),l=s.getPathString,c=eY(),u=tR().FROM_TL;t.exports=function(e,t,h,d){if(d.selectAll(".shape-label").remove(),h.label.text||h.label.texttemplate){if(h.label.texttemplate){var f={};if("path"!==h.type){var p=i.getFromId(e,h.xref),m=i.getFromId(e,h.yref);let t=Array.isArray(h.xref),r=Array.isArray(h.yref);for(var g in c){var y="function"==typeof c[g],v=!t||c.simpleXVariables.includes(g),x=!r||c.simpleYVariables.includes(g);if(y&&v&&x){var b=c[g](h,p,m);void 0!==b&&(f[g]=b)}}}_=r.texttemplateStringForShapes({data:[f],fallback:h.label.texttemplatefallback,locale:e._fullLayout._d3locale,template:h.label.texttemplate})}else _=h.label.text;var _,w,T,M,k,A=h.label.font,S=d.append("g").attr({"data-index":t}).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(_);if(h.path){var E=o(l(e,h),e);w=1/0,M=1/0,T=-1/0,k=-1/0;for(var C=0;Cs.getDataToPixel(e,i,r,!1,n)(t),m=(t,r,i,n)=>s.getDataToPixel(e,i,r,!0,n)(t);if("pixel"===h.xsizemode){let e=p(h.xanchor,void 0,n,c),t=s.getPixelShift(n,h.x0shift),r=s.getPixelShift(n,h.x1shift);w=e+h.x0+t,T=e+h.x1+r}else w=p(h.x0,h.x0shift,n,c),T=p(h.x1,h.x1shift,a,u);if("pixel"===h.ysizemode){let e=m(h.yanchor,void 0,o,d),t=s.getPixelShift(o,h.y0shift),r=s.getPixelShift(o,h.y1shift);M=e-h.y0+t,k=e-h.y1+r}else M=m(h.y0,h.y0shift,o,d),k=m(h.y1,h.y1shift,l,f)}var O=h.label.textangle;"auto"===O&&(O="line"===h.type?function(e,t,r,i){var n;return n=Math.abs(r-e),-180/Math.PI*Math.atan2(r>=e?t-i:i-t,n)}(w,M,T,k):0),S.call(function(t){return t.call(a.font,A).attr({}),n.convertToTspans(t,e),t});var R=function(e,t,r,i,n,a,o){var s,l,c,h,d=n.label.textposition,f=n.label.textangle,p=n.label.padding,m=n.type,g=Math.PI/180*a,y=Math.sin(g),v=Math.cos(g),x=n.label.xanchor,b=n.label.yanchor;if("line"===m){"start"===d?(s=e,l=t):"end"===d?(s=r,l=i):(s=(e+r)/2,l=(t+i)/2),"auto"===x&&(x="start"===d?"auto"===f?r>e?"left":re?"right":re?"right":re?"left":r1&&(2!==e.length||"Z"!==e[1][0])&&(0===S&&(e[0][0]="M"),t[A]=e,L(),P())}}()}}function U(e,r){(function(e,r){if(t.length)for(var i=0;iS?(L=T,D="y0",P=S,O="y1"):(L=S,D="y1",P=T,O="y0"),eo(r),ec(c,o),i=t,n=o,s=e,l=n.xref,u=n.yref,d=a.getFromId(s,l),f=a.getFromId(s,u),p="","paper"===l||d.autorange||(p+=l),"paper"===u||f.autorange||(p+=u),h.setClipUrl(i,p?"clip"+s._fullLayout._uid+p:null,s),ea.moveFn="move"===B?es:el,ea.altKey=r.altKey)},doneFn:function(){b(e)||(m(t),eu(c),M(t,e,o),i.call("_guiRelayout",e,u.getUpdateObj()))},clickFn:function(){b(e)||eu(c)}};function eo(r){if(b(e)){B=null;return}if(V)B="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var i=ea.element.getBoundingClientRect(),n=i.right-i.left,a=i.bottom-i.top,o=r.clientX-i.left,s=r.clientY-i.top,l=!q&&n>10&&a>10&&!r.shiftKey?f.getCursor(o/n,1-s/a):"move";m(t,l),B=l.split("-")[0]}}function es(r,i){if("path"===o.type){var n=function(e){return e},a=n,u=n;N?H("xanchor",o.xanchor=er(E+r)):(a=function(e){return er(ee(e)+r)},W&&"date"===W.type&&(a=y.encodeDate(a))),U?H("yanchor",o.yanchor=ei(C+i)):(u=function(e){return ei(et(e)+i)},Z&&"date"===Z.type&&(u=y.encodeDate(u))),H("path",o.path=k(j,a,u))}else N?H("xanchor",o.xanchor=er(E+r)):(H("x0",o.x0=er(w+r)),H("x1",o.x1=er(A+r))),U?H("yanchor",o.yanchor=ei(C+i)):(H("y0",o.y0=ei(T+i)),H("y1",o.y1=ei(S+i)));t.attr("d",v(e,o)),ec(c,o),l(e,s,o,G)}function el(r,i){if(q){var n=function(e){return e},a=n,u=n;N?H("xanchor",o.xanchor=er(E+r)):(a=function(e){return er(ee(e)+r)},W&&"date"===W.type&&(a=y.encodeDate(a))),U?H("yanchor",o.yanchor=ei(C+i)):(u=function(e){return ei(et(e)+i)},Z&&"date"===Z.type&&(u=y.encodeDate(u))),H("path",o.path=k(j,a,u))}else if(V){if("resize-over-start-point"===B){var h=w+r,d=U?T-i:T+i;H("x0",o.x0=N?h:er(h)),H("y0",o.y0=U?d:ei(d))}else if("resize-over-end-point"===B){var f=A+r,p=U?S-i:S+i;H("x1",o.x1=N?f:er(f)),H("y1",o.y1=U?p:ei(p))}}else{var m=function(e){return -1!==B.indexOf(e)},g=m("n"),x=m("s"),b=m("w"),_=m("e"),M=g?L+i:L,Y=x?P+i:P,$=b?I+r:I,X=_?z+r:z;U&&(g&&(M=L-i),x&&(Y=P-i)),(!U&&Y-M>10||U&&M-Y>10)&&(H(D,o[D]=U?M:ei(M)),H(O,o[O]=U?Y:ei(Y))),X-$>10&&(H(R,o[R]=N?$:er($)),H(F,o[F]=N?X:er(X)))}t.attr("d",v(e,o)),ec(c,o),l(e,s,o,G)}function ec(e,t){(N||U)&&function(){var r="path"!==t.type,i=e.selectAll(".visual-cue").data([0]);i.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var a=ee(N?t.xanchor:n.midRange(r?[t.x0,t.x1]:y.extractPathCoords(t.path,g.paramIsX))),o=et(U?t.yanchor:n.midRange(r?[t.y0,t.y1]:y.extractPathCoords(t.path,g.paramIsY)));if(a=y.roundPositionForSharpStrokeRendering(a,1),o=y.roundPositionForSharpStrokeRendering(o,1),N&&U){var s="M"+(a-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";i.attr("d",s)}else if(N){var l="M"+(a-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";i.attr("d",l)}else{var c="M"+(a-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";i.attr("d",c)}}()}function eu(e){e.selectAll(".visual-cue").remove()}f.init(ea),en.node().onmousemove=eo}(e,j,w,t,c,S):!0===w.editable&&j.style("pointer-events",O||u.opacity(P)*L<=.5?"stroke":"all");j.node().addEventListener("click",function(){var t=e,r=j;if(_(t)){var i=+r.node().getAttribute("data-index");if(i>=0){if(i===t._fullLayout._activeShapeIndex)return void A(t);t._fullLayout._activeShapeIndex=i,t._fullLayout._deactivateShape=A,x(t)}}}),function(e,t,r){if(!r?.id)return;let i=t.node();function n(e){var t;let i=r.mainplotinfo||r,n=null==(t=i?.draglayer)?void 0:t.select(".nsewdrag").node();return n?{clientX:e.clientX,clientY:e.clientY,target:n}:null}i.addEventListener("mousemove",t=>{if(!e._dragging&&e._fullLayout.hoveranywhere){let i=n(t);i&&p.hover(e,i,r.id)}}),i.addEventListener("click",t=>{if(!e._dragged&&e._fullLayout.clickanywhere){let i=n(t);i&&p.click(e,i,r.id)}})}(e,j,T)}("above"===w.layer?e._fullLayout._shapeUpperLayer:w.xref.includes("paper")||w.yref.includes("paper")?e._fullLayout._shapeLowerLayer:"between"!==w.layer||S?T._hadPlotinfo?(T.mainplotinfo||T).shapelayer:e._fullLayout._shapeLowerLayer:T.shapelayerBetween)}function M(e,t,r){let i=r.xref,o=r.yref;if(Array.isArray(i)||Array.isArray(o)){let s="clip"+t._fullLayout._uid+"shape"+r._index,l=function(e,t,r){let i=e._fullLayout._size;function n(t,r){let n=(Array.isArray(t)?t:[t]).map(t=>a.getFromId(e,t)).filter(Boolean);return n.length?[Math.min(...n.map(function(e){return e._offset})),Math.max(...n.map(function(e){return e._offset+e._length}))]:r?[i.t,i.t+i.h]:[i.l,i.l+i.w]}let o=n(t,!1),s=n(r,!0);return{x:o[0],y:s[0],width:o[1]-o[0],height:s[1]-s[0]}}(t,i,o);n.ensureSingleById(t._fullLayout._clips,"clipPath",s,function(e){e.append("rect")}).select("rect").attr(l),h.setClipUrl(e,s,t)}else{let r=(i+o).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");h.setClipUrl(e,r?"clip"+t._fullLayout._uid+r:null,t)}}function k(e,t,r){return e.replace(g.segmentRE,function(e){var i=0,n=e.charAt(0),a=g.paramIsX[n],o=g.paramIsY[n],s=g.numParams[n];return n+e.slice(1).replace(g.paramRE,function(e){return i>=s||(a[i]?e=t(e):o[i]&&(e=r(e)),i++),e})})}function A(e){_(e)&&e._fullLayout._activeShapeIndex>=0&&(c(e),delete e._fullLayout._activeShapeIndex,x(e))}t.exports={draw:x,drawOne:w,eraseActiveShape:function(e){if(_(e)){c(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{let o=r.select(e._fullLayout._paperdiv.node());o.selectAll(".plotly-cloud-dialog").remove();let s=o.append("div").classed("plotly-cloud-dialog",!0),l=()=>{s.remove(),document.removeEventListener("keydown",c)},c=e=>{("Escape"===e.key||27===e.keyCode)&&l()};document.addEventListener("keydown",c),s.on("click",()=>{r.event.target===s.node()&&l()}),((e,t,r,a,o)=>{let s=n(e),l=t.append("div").classed("plotly-cloud-dialog-box",!0);if(l.append("div").classed("plotly-cloud-dialog-title",!0).text(s.DIALOG_TITLE),r===i.plotlyServerURL){let e=l.append("div").classed("plotly-cloud-dialog-message",!0),t=new URL(r).origin,i=s.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),n=i[0],a=i[2],o=i[4];e.append("span").text(n),e.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",t).attr("target","_blank").text(a),e.append("span").text(o),e.append("div").classed("plotly-cloud-dialog-message--account",!0).text(s.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let e=new URL(r),t=e.hostname,i=e.origin,n=s.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),a=n[0],o=n[4],c=l.append("div").classed("plotly-cloud-dialog-message",!0);c.append("span").text(a),c.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",i).attr("target","_blank").text(t),c.append("span").text(o)}let c=l.append("div").classed("plotly-cloud-dialog-buttons",!0);c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(s.DIALOG_CANCEL).on("click",o),c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(s.DIALOG_CONFIRM).on("click",a)})(e,s,t,()=>{l(),a()},l)}}}),rX=p({"src/components/modebar/buttons.js"(e,t){var r=eQ(),i=tD(),n=tC(),a=rF(),o=rY().eraseActiveShape,s=r$(),l=tv(),c=l._,u=t.exports={};function h(e,t){var i,a,o=t.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,c=e._fullLayout,u={},h=n.list(e,null,!0),d=c._cartesianSpikesEnabled;if("zoom"===s){var f,p="in"===l?.5:2,m=(1+p)/2,g=(1-p)/2;for(a=0;a-e),[h,d]=a.invert(l.midPt),{minscale:f}=n.projection,p=null!=(i=n.projection.maxscale)?i:1/0,m=Math.min(f,p),g=Math.max(f,p),y="in"===o?2*s:.5*s;y>g?y=g:yr0});var rQ,r0,r1=f({"src/components/modebar/attributes.ts"(){rQ=y(rK()),r0={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`."},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 *${rQ.default.backButtons.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 *${rQ.default.foreButtons.join("*, *")}*.`}}}}),r2=p({"src/components/modebar/defaults.js"(e,t){var r=tv(),i=ee(),n=tS(),a=(r1(),v(rJ)).default;t.exports=function(e,t){var o=e.modebar||{},s=n.newContainer(t,"modebar");function l(e,t){return r.coerce(o,s,a,e,t)}l("orientation"),l("bgcolor",i.addOpacity(t.paper_bgcolor,.5));var c=i.contrast(i.rgb(t.modebar.bgcolor));l("color",i.addOpacity(c,.3)),l("activecolor",i.addOpacity(c,.7)),l("uirevision",t.uirevision),l("add"),l("remove")}}}),r3=p({"src/components/modebar/modebar.js"(e,t){var r=T(),i=C(),n=tv(),a=rF(),o=_().version,s=new DOMParser;function l(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var c=l.prototype;c.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,i=this.graphInfo._fullLayout,a="modebar-"+i._uid;this.element.setAttribute("id",a),this.element.setAttribute("role","toolbar"),this._uid=a,this.element.className="modebar modebar--custom","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===i.modebar.orientation&&(this.element.className+=" vertical",t=t.reverse());var o=i.modebar;document.querySelectorAll("#"+a+" .modebar-group").forEach(function(e){e.style.backgroundColor=o.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,c=this.locale!==r.locale;if(this.locale=r.locale,(s||l||c)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var u=this.getLogo();r.watermark&&(u.className=u.className+" watermark"),"v"===i.modebar.orientation?this.element.insertBefore(u,this.element.childNodes[0]):this.element.appendChild(u),this.hasLogo=!0}this.updateActiveButton(),n.setStyleOnHover("#"+a+" .modebar-btn",".active",".icon path","fill: "+o.activecolor,"fill: "+o.color,this.element)},c.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(e){var r=t.createGroup();e.forEach(function(e){var i=e.name;if(!i)throw Error("must provide button 'name' in button config");if(-1!==t.buttonsNames.indexOf(i))throw Error("button name '"+i+"' is taken");t.buttonsNames.push(i);var n=t.createButton(e);t.buttonElements.push(n),r.appendChild(n)}),t.element.appendChild(r)})},c.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e},c.createButton=function(e){var t=this,i=document.createElement("button");i.setAttribute("type","button"),i.setAttribute("rel","tooltip"),i.className="modebar-btn";var n=e.title;void 0===n?n=e.name:"function"==typeof n&&(n=n(this.graphInfo)),(n||0===n)&&(i.setAttribute("data-title",n),i.setAttribute("aria-label",n)),void 0!==e.attr&&i.setAttribute("data-attr",e.attr);var o=e.val;if(void 0!==o&&("function"==typeof o&&(o=o(this.graphInfo)),i.setAttribute("data-val",o)),"function"!=typeof e.click)throw Error("must provide button 'click' function in button config");i.addEventListener("click",function(r){e.click(t.graphInfo,r),t.updateActiveButton(r.currentTarget)}),i.setAttribute("data-toggle",e.toggle||!1),e.toggle&&r.select(i).classed("active",!0);var s=e.icon;return"function"==typeof s?i.appendChild(s()):i.appendChild(this.createIcon(s||a.question)),i.setAttribute("data-gravity",e.gravity||"n"),i},c.createIcon=function(e){var t,r=i(e.height)?Number(e.height):e.ascent-e.descent,n="http://www.w3.org/2000/svg";if(e.path){(t=document.createElementNS(n,"svg")).setAttribute("viewBox",["0 0",e.width,r].join(" ")),t.setAttribute("class","icon");var a=document.createElementNS(n,"path");a.setAttribute("d",e.path),e.transform?a.setAttribute("transform",e.transform):void 0!==e.ascent&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),t.appendChild(a)}return e.svg&&(t=s.parseFromString(e.svg,"application/xml").childNodes[0]),t.setAttribute("height","1em"),t.setAttribute("width","1em"),t},c.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,i=void 0!==e?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(e){var a=e.getAttribute("data-val")||!0,o=e.getAttribute("data-attr"),s="true"===e.getAttribute("data-toggle"),l=r.select(e),c=function(e,r){var i=t.modebar,n=e.querySelector(".icon path");n&&(r||e.matches(":hover")?n.style.fill=i.activecolor:n.style.fill=i.color)};if(s){if(o===i){var u=!l.classed("active");l.classed("active",u),c(e,u)}}else{var h=null===o?o:n.nestedProperty(t,o).get();l.classed("active",h===a),c(e,h===a)}})},c.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r1?(P=["toggleHover"],I=["resetViews"]):y?(L=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],I=["resetGeo"]):g?(P=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):_?(L=["zoomInMap","zoomOutMap"],P=["toggleHover"],I=["resetViewMap"]):v?P=["hoverClosestPie"]:M?(P=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):P=["toggleHover"],m&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(function(e){for(var t=0;ti?n.slice(i):a.slice(r))+o:n+a+e*t:o}function f(e,t){var r=e._inputDomain,i=l[e.constraintoward],n=r[0]+(r[1]-r[0])*i;e.domain=e._input.domain=[n+(r[0]-n)/t,n+(r[1]-n)/t],e.setScale()}e.handleDefaults=function(e,r,a){var s,l,d,f,p,m,g,y,v=a.axIds,x=a.axHasImage,b=r._axisConstraintGroups=[],_=r._axisMatchGroups=[];for(s=0;ss*v&&!w)){for(n=0;nI&&RL&&(L=R);d/=(L-C)/(2*P),C=c.l2r(C),L=c.l2r(L),c.range=c._input.range=A=e[1]||n[1]<=e[0])&&a[0]t[0])return!0}return!1}(V,q,N)&&-1===S.indexOf(v)){var G=H.node(),W=E.bg=n.ensureSingle(H,"rect","bg");G.insertBefore(W.node(),G.childNodes[0]),B.push(S)}else H.select("rect.bg").remove(),N.push([V,q]),U||(j.push(S),B.push(S))}var Y=I._bgLayer.selectAll(".bg").data(j);for(Y.enter().append("rect").classed("bg",!0),Y.exit().remove(),Y.each(function(e){I._plots[e].bg=t.select(this)}),A=0;A.5?"t":"b",l=e._fullLayout.margin[s],c=0;return"paper"===t.yref?c=r+t.pad.t+t.pad.b:"container"===t.yref&&(i=e._fullLayout.height,n=0,"middle"===o&&(n+=r/2),"t"===s?("top"===o&&(n+=r),n+=i-a*i):("bottom"===o&&(n+=r),n+=a*i),c=n+t.pad.t+t.pad.b),c>l?c:0}(e,T,P);if(I>0){(function(e,t,r,a){var o,s,l="title.automargin",c=e._fullLayout.title,u=c.y>.5?"t":"b",h={x:c.x,y:c.y,t:0,b:0},d={};"paper"===c.yref&&(o="paper"===c.yref?e._fullLayout._size.h:e._fullLayout.height,s=n.isTopAnchor(c)?t:t-a,!(n.isTopAnchor(c)&&"t"===u||n.isBottomAnchor(c)&&"b"===u)&&("b"===u?o-s:s)=0;T--){var M=n.append("path").attr(m).style("opacity",T?.1:g).call(a.stroke,v).call(a.fill,y).call(o.dashLine,T?"solid":b,T?4+x:x);if(function(e,t,r){var i=r.xref+r.yref;o.setClipUrl(e,"clip"+t._fullLayout._uid+i,t)}(M,e,d),_){var k=s(e.layout,"selections",d);M.style({cursor:"move"});var A={element:M.node(),plotinfo:p,gd:e,editHelpers:k,isActiveSelection:!0};i(r(l,e),M,A)}else M.style("pointer-events",T?"all":"none");w[T]=M}var S=w[0];w[1].node().addEventListener("click",function(){var t=e,r=S;if(h(t)){var i=+r.node().getAttribute("data-index");if(i>=0){if(i===t._fullLayout._activeSelectionIndex)return void f(t);t._fullLayout._activeSelectionIndex=i,t._fullLayout._deactivateSelection=f,u(t)}}})}(e._fullLayout._selectionLayer)}function f(e){h(e)&&e._fullLayout._activeSelectionIndex>=0&&(n(e),delete e._fullLayout._activeSelectionIndex,u(e))}t.exports={draw:u,drawOne:d,activateLastSelection:function(e){if(h(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=f,u(e)}}}}}),ie=p({"node_modules/polybooljs/lib/build-log.js"(e,t){t.exports=function(){var e,t=0,r=!1;function i(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return i("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return i("div_seg",{seg:e,pt:t}),i("chop",{seg:e,pt:t})},statusRemove:function(e){return i("pop_seg",{seg:e})},segmentUpdate:function(e){return i("seg_update",{seg:e})},segmentNew:function(e,t){return i("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return i("rem_seg",{seg:e})},tempStatus:function(e,t,r){return i("temp_status",{seg:e,above:t,below:r})},rewind:function(e){return i("rewind",{seg:e})},status:function(e,t,r){return i("status",{seg:e,above:t,below:r})},vert:function(t){return t===r?e:(r=t,i("vert",{x:t}))},log:function(e){return"string"!=typeof e&&(e=JSON.stringify(e,!1," ")),i("log",{txt:e})},reset:function(){return i("reset")},selected:function(e){return i("selected",{segs:e})},chainStart:function(e){return i("chain_start",{seg:e})},chainRemoveHead:function(e,t){return i("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return i("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return i("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return i("chain_match",{index:e})},chainClose:function(e){return i("chain_close",{index:e})},chainAddHead:function(e,t){return i("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return i("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return i("chain_con",{index1:e,index2:t})},chainReverse:function(e){return i("chain_rev",{index:e})},chainJoin:function(e,t){return i("chain_join",{index1:e,index2:t})},done:function(){return i("done")}}}}}),it=p({"node_modules/polybooljs/lib/epsilon.js"(e,t){t.exports=function(e){"number"!=typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"==typeof t&&(e=t),e},pointAboveOrOnLine:function(t,r,i){var n=r[0],a=r[1],o=i[0],s=i[1],l=t[0];return(o-n)*(t[1]-a)-(s-a)*(l-n)>=-e},pointBetween:function(t,r,i){var n=t[1]-r[1],a=i[0]-r[0],o=t[0]-r[0],s=i[1]-r[1],l=o*a+n*s;return!(l-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])e!=o-n>e&&(a-c)*(n-u)/(o-u)+c-i>e&&(s=!s),a=c,o=u}return s}};return t}}}),ir=p({"node_modules/polybooljs/lib/linked-list.js"(e,t){t.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return null!==t&&t!==e.root},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var i=e.root,n=e.root.next;null!==n;){if(r(n)){t.prev=n.prev,t.next=n,n.prev.next=t,n.prev=t;return}i=n,n=n.next}i.next=t,t.prev=i,t.next=null},findTransition:function(t){for(var r=e.root,i=e.root.next;null!==i&&!t(i);)r=i,i=i.next;return{before:r===e.root?null:r,after:i,insert:function(e){return e.prev=r,e.next=i,r.next=e,null!==i&&(i.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}}}),ii=p({"node_modules/polybooljs/lib/intersecter.js"(e,t){var r=ir();t.exports=function(e,t,i){function n(e,t,r){return{id:i?i.segmentId():-1,start:e,end:t,myFill:{above:r.myFill.above,below:r.myFill.below},otherFill:null}}var a=r.create();function o(e,r){a.insertBefore(e,function(i){var n,a,o,s,l,c;return n=e.isStart,a=e.pt,o=i.isStart,s=i.pt,l=i.other.pt,(0!==(c=t.pointsCompare(a,s))?c:t.pointsSame(r,l)?0:n!==o?n?1:-1:t.pointAboveOrOnLine(r,o?s:l,o?l:s)?1:-1)<0})}function s(e,t){var i,n,a=(o(i=r.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null}),e.end),i);return n=r.node({isStart:!1,pt:e.end,seg:e,primary:t,other:a,status:null}),a.other=n,o(n,a.pt),a}function l(e,t){var r=n(t,e.seg.end,e.seg);return i&&i.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,o(e.other,e.pt),s(r,e.primary)}function c(n,o){var s=r.create();function c(e,r){var n=e.seg,a=r.seg,o=n.start,s=n.end,c=a.start,u=a.end;i&&i.checkIntersection(n,a);var h=t.linesIntersect(o,s,c,u);if(!1===h){if(!t.pointsCollinear(o,s,c)||t.pointsSame(o,u)||t.pointsSame(s,c))return!1;var d=t.pointsSame(o,c),f=t.pointsSame(s,u);if(d&&f)return r;var p=!d&&t.pointBetween(o,c,u),m=!f&&t.pointBetween(s,c,u);if(d)return m?l(r,s):l(e,u),r;p&&(f||(m?l(r,s):l(e,u)),l(r,o))}else 0===h.alongA&&(-1===h.alongB?l(e,c):0===h.alongB?l(e,h.pt):1===h.alongB&&l(e,u)),0===h.alongB&&(-1===h.alongA?l(r,o):0===h.alongA?l(r,h.pt):1===h.alongA&&l(r,s));return!1}for(var u=[];!a.isEmpty();){var h=a.getHead();if(i&&i.vert(h.pt[0]),h.isStart){i&&i.segmentNew(h.seg,h.primary);var d,f,p=function(e){return s.findTransition(function(r){var i,n,a,o,s;return i=r.ev,n=e.seg.start,a=e.seg.end,o=i.seg.start,s=i.seg.end,(t.pointsCollinear(n,o,s)?t.pointsCollinear(a,o,s)||t.pointAboveOrOnLine(a,o,s)?1:-1:t.pointAboveOrOnLine(n,o,s)?1:-1)>0})}(h),m=p.before?p.before.ev:null,g=p.after?p.after.ev:null;i&&i.tempStatus(h.seg,!!m&&m.seg,!!g&&g.seg);var y=function(){if(m){var e=c(h,m);if(e)return e}return!!g&&c(h,g)}();if(y&&(e?(d=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above):y.seg.otherFill=h.seg.myFill,i&&i.segmentUpdate(y.seg),h.other.remove(),h.remove()),a.getHead()!==h){i&&i.rewind(h.seg);continue}e?(d=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,g?h.seg.myFill.below=g.seg.myFill.above:h.seg.myFill.below=n,d?h.seg.myFill.above=!h.seg.myFill.below:h.seg.myFill.above=h.seg.myFill.below):null===h.seg.otherFill&&(f=g?h.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:h.primary?o:n,h.seg.otherFill={above:f,below:f}),i&&i.status(h.seg,!!m&&m.seg,!!g&&g.seg),h.other.status=p.insert(r.node({ev:h}))}else{var v=h.status;if(null===v)throw Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(v.prev)&&s.exists(v.next)&&c(v.prev.ev,v.next.ev),i&&i.statusRemove(v.ev.seg),v.remove(),!h.primary){var x=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=x}u.push(h.seg)}a.getHead().remove()}return i&&i.done(),u}return e?{addRegion:function(e){for(var r,n=e[e.length-1],a=0;aa!=f>a&&n<(d-u)*(a-h)/(f-h)+u&&(o=!o)}return o}}}),iu=p({"src/lib/polygon.js"(e,t){var r=eN().dot,i=L().BADNUM,n=t.exports={};n.tester=function(e){var t,r=e.slice(),n=r[0][0],a=n,o=r[0][1],s=o;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),t=1;ta||c===i||cs||t&&l(e))}:function(e,t){var l=e[0],c=e[1];if(l===i||la||c===i||cs)return!1;var u,h,d,f,p,m=r.length,g=r[0][0],y=r[0][1],v=0;for(u=1;uMath.max(h,g)||c>Math.max(d,y)))if(cu||Math.abs(r(o,d))>n)return!0;return!1},n.filter=function(e,t){var r=[e[0]],i=0,a=0;function o(o){e.push(o);var s=r.length,l=i;r.splice(a+1);for(var c=l+1;c1&&o(e.pop()),{addPt:o,raw:e,filtered:r}}}}),ih=p({"src/components/selections/constants.js"(e,t){t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),id=p({"src/components/selections/select.js"(e,t){var r=il(),i=ic(),n=eQ(),a=t9().dashStyle,o=ee(),s=rD(),l=t6().makeEventData,c=rO(),u=c.freeMode,h=c.rectMode,d=c.drawMode,f=c.openMode,p=c.selectMode,m=rH(),g=rq(),y=rW(),v=tL().clearOutline,x=rN(),b=x.handleEllipse,_=x.readPaths,w=rU().newShapes,T=rV(),M=r9().activateLastSelection,k=tv(),A=k.sorterAsc,S=iu(),E=tt(),C=tC().getFromId,L=rR(),P=r7().redrawReglTraces,I=ih(),z=I.MINSELECT,D=S.filter,O=S.tester,R=rB(),F=R.p2r,j=R.axValue,B=R.getTransform;function N(e){return void 0!==e.subplot}function U(e,t,r,i,n,a,o){var s,l,c,u,h,d,p,m,g,v=t._hoverdata,x=t._fullLayout.clickmode.indexOf("event")>-1,b=[];if((_=v)&&Array.isArray(_)&&!0!==_[0].hoverOnBox){H(e,t,a);var _,w,T=function(e,t){var r,i,n=e[0],a=-1,o=[];for(i=0;i0?function(e,t){var r,i,n,a=[];for(n=0;n0&&a.push(r);if(1===a.length&&a[0]===t.searchInfo&&(i=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(n=0;ni.selectedpoints.indexOf(t.pointNumbers[n]))return!1;return!0}return!1}(s,T):function(e){var t,r,i=0;for(r=0;r1||(i+=t.selectedpoints.length)>1))return!1;return 1===i}(s)&&(d=$(T))){for(o&&o.remove(),g=0;g=0&&a._fullLayout._deactivateShape(a),a._fullLayout._activeSelectionIndex>=0&&a._fullLayout._deactivateSelection(a);var o=a._fullLayout._zoomlayer,s=d(r),l=p(r);if(s||l){var c,u,h=o.selectAll(".select-outline-"+i.id);h&&a._fullLayout._outlining&&(s&&(c=w(h,e)),c&&n.call("_guiRelayout",a,{shapes:c}),l&&!N(e)&&(u=T(h,e)),u&&(a._fullLayout._noEmitSelectedAtStart=!0,n.call("_guiRelayout",a,{selections:u}).then(function(){t&&M(a)})),a._fullLayout._outlining=!1)}i.selection={},i.selection.selectionDefs=e.selectionDefs=[],i.selection.mergedPolygons=e.mergedPolygons=[]}function W(e){return e._id}function Y(e,t,r,i){if(!e.calcdata)return[];var n,a,o,s=[],l=t.map(W),c=r.map(W);for(o=0;o0?i[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(n)>-1}function X(e,t,r){var i,a;for(i=0;i-1&&t;if(!a&&t){var ep=en(e,!0);if(ep.length){var em=ep[0].xref,eg=ep[0].yref;if(em&&eg){var ey=es(ep);el([C(e,em,"x"),C(e,eg,"y")])(ed,ey)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ef&&ec(e,ed),f._reselect=!1}if(!a&&f._deselect){var ev=f._deselect;(function(e,t,r){for(var i=0;i=0)return void S._fullLayout._deactivateShape(S);if(!_){var r=C.clickmode;E.done(eE).then(function(){if(E.clear(eE),2===e){for(ew.remove(),ea=0;ea-1&&U(t,S,i.xaxes,i.yaxes,i.subplot,i,ew),"event"===r&&ec(S,void 0);s.click(S,t,F.id)}).catch(k.error)}},i.doneFn=function(){eA.remove(),E.done(eE).then(function(){E.clear(eE),!L&&en&&i.selectionDefs&&(en.subtract=e_,i.selectionDefs.push(en),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,ee)),(L||_)&&G(i,L),i.doneFnCompleted&&i.doneFnCompleted(eC),w&&ec(S,eh)}).catch(k.error)}},clearOutline:v,clearSelectionsCache:G,selectOnClick:U}}}),ip=p({"src/components/annotations/arrow_paths.js"(e,t){t.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]}}),im=p({"src/constants/axis_placeable_objects.js"(e,t){t.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by *domain* (separated by a space), the position behaves like for *paper*, but refers to the distance in fractions of the domain length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e,"axis and a",e,"position of 0.5 refers to the point between the",t,"and the",r,"of the domain of the second",e,"axis."].join(" ")}}}}),ig=p({"src/components/annotations/attributes.js"(e,t){var r=ip(),i=H(),n=tE(),a=tS().templatedArray;im(),t.exports=a("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:r.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:r.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",n.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",n.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:i({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})}}),iy=p({"src/traces/scatter/constants.js"(e,t){t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}}),iv=p({"src/traces/scatter/fillcolor_attribute.js"(e,t){t.exports=function(e){return{valType:"color",editType:"style",anim:!0}}}}),ix=p({"src/traces/scatter/attributes.js"(e,t){var r=tB().axisHoverFormat,{hovertemplateAttrs:i,texttemplateAttrs:n,templatefallbackAttrs:a}=eW(),o=tV(),s=H(),l=eH().dash,c=eH().pattern,u=t9(),h=iy(),d=q().extendFlat,f=iv();function p(e){return{valType:"any",dflt:0,editType:"calc"}}function m(e){return{valType:"any",editType:"calc"}}function g(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:p("x"),yperiod:p("y"),xperiod0:m("x0"),yperiod0:m("y0"),xperiodalignment:g("x"),yperiodalignment:g("y"),xhoverformat:r("x"),yhoverformat:r("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:n(),texttemplatefallback:a({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:i({},{keys:h.eventDataKeys}),hovertemplatefallback:a(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:d({},l,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:f(!0),fillgradient:d({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:c,marker:d({symbol:{valType:"enumerated",values:u.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:d({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:d({},l,{arrayOk:!0}),editType:"calc"},o("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},o("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:s({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}}),ib=p({"src/components/selections/attributes.js"(e,t){var r=ig(),i=ix().line,n=eH().dash,a=q().extendFlat,o=eq().overrideAll,s=tS().templatedArray;im(),t.exports=o(s("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:a({},r.xref,{}),yref:a({},r.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:i.color,width:a({},i.width,{min:1,dflt:1}),dash:a({},n,{dflt:"dot"})}}),"arraydraw","from-root")}}),i_=p({"src/components/selections/defaults.js"(e,t){var r=tv(),i=rn(),n=t$(),a=ib(),o=rH();function s(e,t,n){function s(i,n){return r.coerce(e,t,a,i,n)}var l=s("path"),c="path"!==s("type",l?"path":"rect");c&&delete t.path,s("opacity"),s("line.color"),s("line.width"),s("line.dash");for(var u=["x","y"],h=0;h<2;h++){var d,f,p,m=u[h],g={_fullLayout:n},y=i.coerceRef(e,t,g,m);if((d=i.getFromId(g,y))._selectionIndices.push(t._index),p=o.rangeToShapePosition(d),f=o.shapePositionToRange(d),c){var v=m+"0",x=m+"1",b=e[v],_=e[x];e[v]=f(e[v],!0),e[x]=f(e[x],!0),i.coercePosition(t,g,s,y,v),i.coercePosition(t,g,s,y,x);var w=t[v],T=t[x];void 0!==w&&void 0!==T&&(t[v]=p(w),t[x]=p(T),e[v]=b,e[x]=_)}}c&&r.noneOrAll(e,t,["x0","x1","y0","y1"])}t.exports=function(e,t){n(e,t,{name:"selections",handleItemDefaults:s});for(var r=t.selections,i=0;i.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",s(r,i)).attr("d",n+"Z")}function j(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("transform",s(t,r)).attr("d","M0,0Z")}function B(e,t,r,i,n,a){e.attr("d",i+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),N(e,t,n,a)}function N(e,t,r,i){r||(e.transition().style("fill",i>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function U(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function V(e){P&&e.data&&e._context.showTips&&(i.notifier(i._(e,"Double-click to zoom back out"),"long",e),P=!1)}function q(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,L)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function H(e,t,r,n,a){for(var o,s,l,c,u=!1,h={},d={},f=(a||{}).xaHash,p=(a||{}).yaHash,m=0;m=0)return void s._fullLayout._deactivateShape(s);var c=s._fullLayout.clickmode;if(U(s),2!==i||eC||function(){if(!e._transitioningWithDuration){var t=e._context.doubleClick,r=[];eg&&(r=r.concat(el)),ey&&(r=r.concat(ec)),em.xaxes&&(r=r.concat(em.xaxes)),em.yaxes&&(r=r.concat(em.yaxes));var i,n,a={};if("reset+autosize"===t)for(t="autosize",n=0;n-1&&A(a,s,el,ec,t.id,eI),c.indexOf("event")>-1&&h.click(s,a,t.id);else if(1===i&&eC){var u,d,f,p,m=T?ea:en,g=+("s"!==T&&"w"!==P),y=m._name+".range["+g+"]",v=(u=m,d=g,p=Math.abs((f=u.range[d])-u.range[1-d]),"date"===u.type?f:"log"===u.type?n("."+(Math.ceil(Math.max(0,-Math.log(p)/Math.LN10))+3)+"g")(Math.pow(10,f)):n("."+String(Math.floor(Math.log(Math.abs(f))/Math.LN10)-Math.floor(Math.log(p)/Math.LN10)+4)+"g")(f)),x="left",b="middle";if(m.fixedrange)return;T?(b="n"===T?"top":"bottom","right"===m.side&&(x="right")):"e"===P&&(x="right"),s._context.showAxisRangeEntryBoxes&&r.select(eP).call(l.makeEditable,{gd:s,immediate:!0,background:s._fullLayout.paper_bgcolor,text:String(v),fill:m.tickfont?m.tickfont.color:"#444",horizontalAlign:x,verticalAlign:b}).on("edit",function(e){var t=m.d2r(e);void 0!==t&&o.call("_guiRelayout",s,y,t)})}}function eO(t,r){if(e._transitioningWithDuration)return!1;var i,n,a,o,s=Math.max(0,Math.min(ed,ek*t+Z)),l=Math.max(0,Math.min(ef,eA*r+$)),c=Math.abs(s-Z),u=Math.abs(l-$);function h(){ee="",X.r=X.l,X.t=X.b,er.attr("d","M0,0Z")}if(X.l=Math.min(Z,s),X.r=Math.max(Z,s),X.t=Math.min($,l),X.b=Math.max($,l),ep.isSubplotConstrained)c>L||u>L?(ee="xy",c/ed>u/ef?(u=c*ef/ed,$>l?X.t=$-u:X.b=$+u):(c=u*ed/ef,Z>s?X.l=Z-c:X.r=Z+c),er.attr("d",q(X))):h();else if(em.isSubplotConstrained)if(c>L||u>L){ee="xy";var d=Math.min(X.l/ed,(ef-X.b)/ef),f=Math.max(X.r/ed,(ef-X.t)/ef);X.l=d*ed,X.r=f*ed,X.b=(1-d)*ef,X.t=(1-f)*ef,er.attr("d",q(X))}else h();else{!ey||u0){if(em.isSubplotConstrained||!eg&&1===ey.length){for(a=0;a=0?Math.min(l,.9):1/(1/Math.max(l,-.3)+3.222)));var l,c=s.l2r(n);!1!==c&&void 0!==c&&(s.range[t]=c)}}return i._length*(i._rl[t]-n)/(i._rl[t]-i._rl[a])}}function eq(e,t){for(var r=em.isSubplotConstrained?({x:ec,y:el})[e]:em[e+"axes"],i=em.isSubplotConstrained?({x:el,y:ec})[e]:[],n=0;n1&&(void 0!==a.maxallowed&&ex===(a.range[0]1&&(void 0!==s.maxallowed&&eb===(s.range[0]1&&i.warn("Full array edits are incompatible with other edits",d);var x=l[""][""];if(s(x))t.set(null);else{if(!Array.isArray(x))return i.warn("Unrecognized full array edit value",d,x),!0;t.set(x)}return!g&&(f(y,v),p(e),!0)}var b,_,w,T,M,k,A,S,E=Object.keys(l).map(Number).sort(n),C=t.get(),L=C||[],P=u(v,d).get(),I=[],z=-1,D=L.length;for(b=0;bL.length-!A){i.warn("index out of range",d,w);continue}if(void 0!==k)M.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",d,w),s(k)?I.push(w):A?("add"===k&&(k={}),L.splice(w,0,k),P&&P.splice(w,0,{})):i.warn("Unrecognized full object edit value",d,w,k),-1===z&&(z=w);else for(_=0;_=0;b--)L.splice(I[b],1),P&&P.splice(I[b],1);if(L.length?C||t.set(L):t.set(null),g)return!1;if(f(y,v),m!==r){if(-1===z)h=E;else{for(D=Math.max(L.length,D),h=[],b=0;b=z);b++)h.push(w);for(b=z;b0&&i.log("Clearing previous rejected promises from queue."),e._promises=[]},e.cleanLayout=function(t){t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var r,a=(n.subplotsRegistry.cartesian||{}).attrRegex,s=((n.subplotsRegistry.polar||{}).attrRegex,(n.subplotsRegistry.ternary||{}).attrRegex,(n.subplotsRegistry.gl3d||{}).attrRegex,Object.keys(t));for(r=0;r3?(v.x=1.02,v.xanchor="left"):v.x<-2&&(v.x=-.02,v.xanchor="right"),v.y>3?(v.y=1.02,v.yanchor="bottom"):v.y<-2&&(v.y=-.02,v.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t},e.cleanData=function(t){for(var a=0;a0)return e.slice(0,t)}e.hasParent=function(e,t){for(var r=m(t);r;){if(r in e)return!0;r=m(r)}return!1},e.clearAxisTypes=function(e,t,r){for(var n=0;n{let r=(...e)=>e.every(e=>i.isPlainObject(e))||e.every(e=>Array.isArray(e));if([e,t].every(e=>Array.isArray(e))){if(e.length!==t.length)return!1;for(let i=0;ii.isPlainObject(e))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let i in e){if(i.startsWith("_"))continue;let n=e[i],a=t[i];if(n!==a&&!(r(n,a)&&g(n,a)))return!1}return!0}return!1};e.collectionsAreEqual=g}}),iL=p({"src/plot_api/plot_api.js"(e){var t=T(),r=C(),i=t_(),n=tv(),a=n.nestedProperty,o=tT(),s=tM(),l=eQ(),c=tA(),u=tD(),h=rn(),d=ro(),f=tN(),p=t9(),m=ee(),g=iA().initInteractions,y=tO(),v=iM().clearOutline,x=X().dfltConfig,b=iE(),_=iC(),w=r7(),M=eq(),k=tE().AX_NAME_PATTERN,A=0;function S(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function E(e,t){try{e._fullLayout._paper.style("background",t)}catch(e){n.error(e)}}function L(e,t){E(e,m.combine(t,"white"))}function P(e,r){if(!e._context){e._context=n.extendDeep({},x);var a=t.select("base");e._context._baseUrl=a.size()&&a.attr("href")?window.location.href.split("#")[0]:""}var o,s,l,c=e._context;if(r){for(s=Object.keys(r),o=0;o=e.data.length||n<-e.data.length)throw Error(r+" must be valid indices for gd.data.");if(t.indexOf(n,i+1)>-1||n>=0&&t.indexOf(-e.data.length+n)>-1||n<0&&t.indexOf(e.data.length+n)>-1)throw Error("each index in "+r+" must be unique.")}}function D(e,t,r){if(!Array.isArray(e.data))throw Error("gd.data must be an array.");if(typeof t>"u")throw Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),z(e,t,"currentIndices"),"u">typeof r&&!Array.isArray(r)&&(r=[r]),"u">typeof r&&z(e,r,"newIndices"),"u">typeof r&&t.length!==r.length)throw Error("current and new indices must be of equal length.")}function O(e,t,i,o,s){var l=n.isPlainObject(o);if(!Array.isArray(e.data))throw Error("gd.data must be an array");if(!n.isPlainObject(t))throw Error("update must be a key:value object");if(typeof i>"u")throw Error("indices must be an integer or array of integers");for(var c in z(e,i,"indices"),t){if(!Array.isArray(t[c])||t[c].length!==i.length)throw Error("attribute "+c+" must be an array of length equal to indices array length");if(l&&(!(c in o)||!Array.isArray(o[c])||o[c].length!==t[c].length))throw 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")}for(var u=function(e,t,i,o){var s,l,c,u,h=n.isPlainObject(o),d=[];for(var f in Array.isArray(i)||(i=[i]),i=I(i,e.data.length-1),t)for(var p=0;p0&&"string"!=typeof z.parts[R];)R--;var F=z.parts[R],N=z.parts[R-1]+"."+F,U=z.parts.slice(0,R).join("."),V=a(e.layout,U).get(),q=a(u,U).get(),H=z.get();if(void 0!==D){A[I]=D,S[I]="reverse"===F?D:j(H);var Z=c.getLayoutValObject(u,z.parts);if(Z&&Z.impliedEdits&&null!==D)for(var X in Z.impliedEdits)E(n.relativeAttr(I,X),Z.impliedEdits[X]);if(-1!==["width","height"].indexOf(I))if(D){E("autosize",null);var K="height"===I?"width":"height";E(K,u[K])}else u[I]=e._initialAutoSize[I];else if("autosize"===I)E("width",D?null:u.width),E("height",D?null:u.height);else if(N.match(G))P(N),a(u,U+"._inputRange").set(null);else if(N.match(W)){P(N),a(u,U+"._inputRange").set(null);var J=a(u,U).get();J._inputDomain&&(J._input.domain=J._inputDomain.slice())}else N.match(Y)&&a(u,U+"._inputDomain").set(null);if("type"===F){C=V;var Q="linear"===q.type&&"log"===D,ee="log"===q.type&&"linear"===D;if(Q||ee){if(C&&C.range)if(q.autorange)Q&&(C.range=C.range[1]>C.range[0]?[1,2]:[2,1]);else{var et=C.range[0],er=C.range[1];Q?(et<=0&&er<=0&&E(U+".autorange",!0),et<=0?et=er/1e6:er<=0&&(er=et/1e6),E(U+".range[0]",Math.log(et)/Math.LN10),E(U+".range[1]",Math.log(er)/Math.LN10)):(E(U+".range[0]",Math.pow(10,et)),E(U+".range[1]",Math.pow(10,er)))}else E(U+".autorange",!0);Array.isArray(u._subplots.polar)&&u._subplots.polar.length&&u[z.parts[0]]&&"radialaxis"===z.parts[1]&&delete u[z.parts[0]]._subplot.viewInitial["radialaxis.range"],l.getComponentMethod("annotations","convertCoords")(e,q,D,E),l.getComponentMethod("images","convertCoords")(e,q,D,E)}else E(U+".autorange",!0),E(U+".range",null);a(u,U+"._inputRange").set(null)}else if(F.match(k)){var ei=a(u,I).get(),en=(D||{}).type;en&&"-"!==en||(en="linear"),l.getComponentMethod("annotations","convertCoords")(e,ei,en,E),l.getComponentMethod("images","convertCoords")(e,ei,en,E)}var ea=b.containerArrayMatch(I);if(ea){r=ea.array,i=ea.index;var eo=ea.property,es=Z||{editType:"calc"};""!==i&&""===eo&&(b.isAddVal(D)?S[I]=null:b.isRemoveVal(D)?S[I]=(a(s,r).get()||[])[i]:n.warn("unrecognized full object value",t)),M.update(T,es),y[r]||(y[r]={});var el=y[r][i];el||(el=y[r][i]={}),el[eo]=D,delete t[I]}else"reverse"===F?(V.range?V.range.reverse():(E(U+".autorange",!0),V.range=[1,0]),q.autorange?T.calc=!0:T.plot=!0):("dragmode"===I&&(!1===D&&!1!==H||!1!==D&&!1===H)||u._has("scatter-like")&&u._has("regl")&&"dragmode"===I&&("lasso"===D||"select"===D)&&"lasso"!==H&&"select"!==H?T.plot=!0:Z?M.update(T,Z):T.calc=!0,z.set(D))}}for(r in y)b.applyContainerArrayChanges(e,f(s,r),y[r],T,f)||(T.plot=!0);for(var ec in L){var eu=(C=h.getFromId(e,ec))&&C._constraintGroup;if(eu)for(var eh in T.calc=!0,eu)L[eh]||(h.getFromId(e,eh)._constraintShrinkable=!0)}($(e)||t.height||t.width)&&(T.plot=!0);var ed=u.shapes;for(i=0;i1;)if(i.pop(),void 0!==(r=a(t,i.join(".")+".uirevision").get()))return r;return t.uirevision}function en(e,t){var r=n.isPlainObject(e),i=Array.isArray(e);return r||i?(r&&n.isPlainObject(t)||i&&Array.isArray(t))&&JSON.stringify(e)===JSON.stringify(t):e===t}function ea(e,t,r,i){var a,o,s,l=i.getValObject,c=i.flags,u=i.immutable,h=i.inArray,d=i.arrayIndex;function f(){var e=a.editType;h&&-1!==e.indexOf("arraydraw")?n.pushUnique(c.arrays[h],d):(M.update(c,a),"none"!==e&&c.nChanges++,i.transition&&a.anim&&c.nChangesAnim++,(G.test(s)||W.test(s))&&(c.rangesAltered[r[0]]=1),"datarevision"===o&&(c.newDataRevision=1))}function p(e){return"data_array"===e.valType||e.arrayOk}for(o in e){if(c.calc&&!i.transition)return;var m=e[o],g=t[o],y=r.concat(o);if(s=y.join("."),"_"!==o.charAt(0)&&"function"!=typeof m&&m!==g){if(("tick0"===o||"dtick"===o)&&"geo"!==r[0]){var v=t.tickmode;if("auto"===v||"array"===v||!v)continue}if(!("range"===o&&t.autorange)&&("zmin"!==o&&"zmax"!==o||"contourcarpet"!==t.type)&&(a=l(y))&&!(a._compareAsJSON&&JSON.stringify(m)===JSON.stringify(g))){var x,b=a.valType,_=p(a),w=Array.isArray(m),T=Array.isArray(g);if(w&&T){var k="_input_"+o,A=e[k],S=t[k];if(Array.isArray(A)&&A===S)continue}if(void 0===g)_&&w?c.calc=!0:f();else if(a._isLinkedToArray){var E=[],C=!1;h||(c.arrays[o]=E);var L=Math.min(m.length,g.length),P=Math.max(m.length,g.length);if(L!==P)if("arraydraw"===a.editType)C=!0;else{f();continue}for(x=0;x=a.length?e.transitionOpts=a[c]:e.transitionOpts=a[0]:e.transitionOpts=a,c++,e}var d,f,p=[],m=null==t,g=Array.isArray(t);if(!m&&!g&&n.isPlainObject(t))p.push({type:"object",data:h(n.extendFlat({},t))});else if(m||-1!==["string","number"].indexOf(typeof t))for(d=0;d0&&xx)&&b.push(f);p=b}}p.length>0?function(t){if(0!==t.length){for(var n,c=0;c=o.length?o[0]:o[h]:o),m=(d=c,Array.isArray(a)?d>=a.length?a[0]:a[d]:a);m.duration=Math.min(m.duration,p.duration);var g={frame:f,name:t[c].name,frameOpts:p,transitionOpts:m};c===t.length-1&&(g.onComplete=function(e){var t=0;return function(){if(e&&2==++t)return e()}}(s),g.onInterrupt=l),i._frameQueue.push(g)}"immediate"===r.mode&&(i._lastFrameAt=-1/0),i._animationRaf||(e.emit("plotly_animating"),i._lastFrameAt=-1/0,i._timeToNext=0,i._runningTransitions=0,i._currentFrame=null,(n=function(){i._animationRaf=window.requestAnimationFrame(n),Date.now()-i._lastFrameAt>i._timeToNext&&function(){i._currentFrame&&i._currentFrame.onComplete&&i._currentFrame.onComplete();var t=i._currentFrame=i._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,i._lastFrameAt=Date.now(),i._timeToNext=t.frameOpts.duration,u.transition(e,t.frame.data,t.frame.layout,_.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then(function(){t.onComplete&&t.onComplete()}),e.emit("plotly_animatingframe",{name:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(i._animationRaf),i._animationRaf=null}()})())}}(p):(e.emit("plotly_animated"),s())})},e.addFrames=function(e,t,r){if(e=n.getGraphDiv(e),null==t)return Promise.resolve();if(!n.isPlotDiv(e))throw Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var i,a,o,l,c=e._transitionData._frames,h=e._transitionData._frameHash;if(!Array.isArray(t))throw Error("addFrames failure: frameList must be an Array of frame definitions"+t);var d=c.length+2*t.length,f=[],p={};for(i=t.length-1;i>=0;i--)if(n.isPlainObject(t[i])){var m=t[i].name,g=(h[m]||p[m]||{}).name,y=t[i].name,v=h[g]||p[g];g&&y&&"number"==typeof y&&v&&A<5&&(A++,n.warn('addFrames: overwriting frame "'+(h[g]||p[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===A&&n.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),p[m]={name:m},f.push({frame:u.supplyFrameDefaults(t[i]),index:r&&void 0!==r[i]&&null!==r[i]?r[i]:d+i})}f.sort(function(e,t){return e.index>t.index?-1:+(e.index=0;i--){if("number"==typeof(a=f[i].frame).name&&n.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;h[a.name="frame "+e._transitionData._counter++];);if(h[a.name]){for(o=0;o=0;r--)i=t[r],o.push({type:"delete",index:i}),l.unshift({type:"insert",index:i,value:a[i]});var c=u.modifyFrames,h=u.modifyFrames,d=[e,l],f=[e,o];return s&&s.add(e,c,d,h,f),u.modifyFrames(e,o)},e.addTraces=function t(r,i,a){r=n.getGraphDiv(r);var o,l,c=[],u=e.deleteTraces,h=[r,c],d=[r,i];for(function(e,t,r){var i,n;if(!Array.isArray(e.data))throw Error("gd.data must be an array.");if(typeof t>"u")throw Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),i=0;itypeof r&&!Array.isArray(r)&&(r=[r]),"u">typeof r&&r.length!==t.length)throw Error("if indices is specified, traces.length must equal indices.length")}(r,i,a),Array.isArray(i)||(i=[i]),i=i.map(function(e){return n.extendFlat({},e)}),_.cleanData(i),o=0;o"u")return l=e.redraw(r),s.add(r,u,h,t,d),l;Array.isArray(a)||(a=[a]);try{D(r,c,a)}catch(e){throw r.data.splice(r.data.length-i.length,i.length),e}return s.startSequence(r),s.add(r,u,h,t,d),l=e.moveTraces(r,c,a),s.stopSequence(r),l},e.deleteTraces=function t(r,i){r=n.getGraphDiv(r);var a,o,l=[],c=e.addTraces,u=[r,l,i],h=[r,i];if(typeof i>"u")throw Error("indices must be an integer or array of integers.");for(Array.isArray(i)||(i=[i]),z(r,i,"indices"),(i=I(i,r.data.length-1)).sort(n.sorterDes),a=0;a=0&&r"u")for(a=[],o=0;o=0&&r[e,t._ev.listeners(e)]);h=e.newPlot(t,r,i,o).then(()=>{for(let[e,r]of n)r.forEach(r=>t.on(e,r));return e.react(t,r,i,o)})}else{t.data=r||[],_.cleanData(t.data),t.layout=i||{},_.cleanLayout(t.layout),function(e,t,r,i){var o,s,l,c,u,h,d,f,p,m,g=i._preGUI,y=[],v={},x={};for(o in g){if(u=er(o,Q)){if(p=u.head,m=u.tail,(c=(l=a(i,s=u.attr||p+".uirevision").get())&&ei(s,t))&&c===l){if(null===(h=g[o])&&(h=void 0),en(f=(d=a(t,o)).get(),h)){void 0===f&&"autorange"===m&&y.push(p),d.set(j(a(i,o).get()));continue}else if("autorange"===m||"range["===m.slice(0,6)){var b=g[p+".range[0]"],_=g[p+".range[1]"],w=g[p+".autorange"];if(w||null===w&&null===b&&null===_){if(!(p in v)){var T=a(t,p).get();v[p]=T&&(T.autorange||!1!==T.autorange&&(!T.range||2!==T.range.length))}if(v[p]){d.set(j(a(i,o).get()));continue}}}}}else n.warn("unrecognized GUI edit: "+o);delete g[o],u&&"range["===u.tail.slice(0,6)&&(x[u.head]=1)}for(var M=0;M(m||t.emit("plotly_react",{config:o,data:r,layout:i}),t))},e.redraw=function(t){if(t=n.getGraphDiv(t),!n.isPlotDiv(t))throw Error("This element is not a Plotly plot: "+t);return _.cleanData(t.data),_.cleanLayout(t.layout),t.calcdata=void 0,e._doPlot(t).then(function(){return t.emit("plotly_redraw"),t})},e.relayout=V,e.restyle=F,e.setPlotConfig=function(e){return n.extendFlat(x,e)},e.update=K,e._guiRelayout=J(V),e._guiRestyle=J(F),e._guiUpdate=J(K),e._storeDirectGUIEdit=function(e,t,r){for(var i in r){var n=a(e,i);N(i,n.get(),r[i],t)}}}}),iP=p({"src/snapshot/helpers.js"(e){var t=eQ();e.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("map"))?500:0},e.getRedrawFunc=function(e){return function(){t.getComponentMethod("colorbar","draw")(e)}},e.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)},e.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var r=window.URL||window.webkitURL;e.createObjectURL=function(e){return r.createObjectURL(e)},e.revokeObjectURL=function(e){return r.revokeObjectURL(e)},e.createBlob=function(e,t){if("svg"===t)return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if("full-json"===t)return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=function(e){for(var t=e.length,r=new ArrayBuffer(t),i=new Uint8Array(r),n=0;n{let t=e.toLowerCase();return l.includes(t)?e:c.includes(t)?"<":u.includes(t)?">":e.includes("<")||e.includes(">")?"":d.html(e).text()}),d.remove(),A=(A=(A=f).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(s,"'")}}}),iz=p({"src/snapshot/svgtoimg.js"(e,t){var r=tv(),i=tw().EventEmitter,n=iP();t.exports=function(e){var t=e.emitter||new i,a=new Promise(function(i,a){var o,s,l=window.Image,c=e.svg,u=e.format||"png",h=e.canvas,d=e.scale||1,f=e.width||300,p=e.height||150,m=d*f,g=d*p,y=h.getContext("2d",{willReadFrequently:!0}),v=new l;"svg"===u||r.isSafari()?s=n.encodeSVG(c):(o=n.createBlob(c,"svg"),s=n.createObjectURL(o)),h.width=m,h.height=g,v.onload=function(){var r;switch(o=null,n.revokeObjectURL(s),"svg"!==u&&y.drawImage(v,0,0,m,g),u){case"jpeg":r=h.toDataURL("image/jpeg");break;case"png":r=h.toDataURL("image/png");break;case"webp":r=h.toDataURL("image/webp");break;case"svg":r=s;break;default:var l="Image format is not jpeg, png, svg or webp.";if(a(Error(l)),!e.promise)return t.emit("error",l)}i(r),e.promise||t.emit("success",r)},v.onerror=function(r){if(o=null,n.revokeObjectURL(s),a(r),!e.promise)return t.emit("error",r)},v.src=s});return e.promise?a:t}}}),iD=p({"src/plot_api/to_image.js"(e,t){var r=C(),i=iL(),n=tD(),a=tv(),o=iP(),s=iI(),l=iz(),c=_().version,u={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};t.exports=function(e,t){function h(e){return!(e in t)||a.validate(t[e],u[e])}if(t=t||{},a.isPlainObject(e)?(d=e.data||[],f=e.layout||{},p=e.config||{},m={}):(e=a.getGraphDiv(e),d=a.extendDeep([],e.data),f=a.extendDeep({},e.layout),p=e._context,m=e._fullLayout||{}),!h("width")&&null!==t.width||!h("height")&&null!==t.height)throw Error("Height and width should be pixel values.");if(!h("format"))throw Error("Export format is not "+a.join2(u.format.values,", "," or ")+".");var d,f,p,m,g={};function y(e,r){return a.coerce(t,g,u,e,r)}var v=y("format"),x=y("width"),b=y("height"),_=y("scale"),w=y("setBackground"),T=y("imageDataOnly"),M=document.createElement("div");M.style.position="absolute",M.style.left="-5000px",document.body.appendChild(M);var k=a.extendFlat({},f);x?k.width=x:null===t.width&&r(m.width)&&(k.width=m.width),b?k.height=b:null===t.height&&r(m.height)&&(k.height=m.height);var A=a.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=o.getRedrawFunc(M);function E(){return new Promise(function(e){setTimeout(e,o.getDelay(M._fullLayout))})}function C(){return new Promise(function(e,t){var r=s(M,v,_),u=M._fullLayout.width,h=M._fullLayout.height;function d(){i.purge(M),document.body.removeChild(M)}if("full-json"===v){var f=n.graphJson(M,!1,"object",!0,!0);return f.version=c,f=JSON.stringify(f),d(),e(T?f:o.encodeJSON(f))}if(d(),"svg"===v)return e(T?r:o.encodeSVG(r));var p=document.createElement("canvas");p.id=a.randstr(),l({format:v,width:u,height:h,scale:_,canvas:p,svg:r,promise:!0}).then(e).catch(t)})}return new Promise(function(e,t){i.newPlot(M,d,k,A).then(S).then(E).then(C).then(function(t){e(T?t.replace(o.IMAGE_URL_PREFIX,""):t)}).catch(function(e){t(e)})})}}}),iO=p({"src/plot_api/validate.js"(e,t){var r=tv(),i=tD(),n=tA(),a=X().dfltConfig,o=r.isPlainObject,s=Array.isArray,l=r.isArrayOrTypedArray;function c(e,t,i,n,a,u){u=u||[];for(var h=Object.keys(e),f=0;fv.length&&n.push(d("unused",a,g.concat(v.length)));var M,k,A,S,E,C,L,P=v.length,I=Array.isArray(T);if(I&&(P=Math.min(P,T.length)),2===x.dimensions)for(S=0;Sv[S].length&&n.push(d("unused",a,g.concat(S,v[S].length)));var z=v[S].length;for(A=0;A<(I?Math.min(z,T[S].length):z);A++)E=I?T[S][A]:T,C=y[S][A],L=v[S][A],r.validate(C,E)?L!==C&&L!==+C&&n.push(d("dynamic",a,g.concat(S,A),C,L)):n.push(d("value",a,g.concat(S,A),C))}else n.push(d("array",a,g.concat(S),y[S]));else for(S=0;S1&&f.push(d("object","layout"))),i.supplyDefaults(p);for(var m=p._fullData,g=l.length,y=0;yw?h.push({code:"unused",traceType:y,templateCount:_,dataCount:w}):w>_&&h.push({code:"reused",traceType:y,templateCount:_,dataCount:w})}}else h.push({code:"data"});if(function e(t,i){for(var n in t)if("_"!==n.charAt(0)){var a=t[n],o=f(t,n,i);r(a)?(Array.isArray(t)&&!1===a._template&&a.templateitemname&&h.push({code:"missing",path:o,templateitemname:a.templateitemname}),e(a,o)):Array.isArray(a)&&function(e){for(var t=0;t=0;h--){var d=e[h];if("scatter"===d.type&&d.xaxis===c.xaxis&&d.yaxis===c.yaxis){d.opacity=void 0;break}}}}}}}),iK=p({"src/traces/scatter/layout_defaults.js"(e,t){var r=tv(),i=tP();t.exports=function(e,t){var n,a="group"===t.barmode;"group"===t.scattermode&&(n=a?t.bargap:.2,r.coerce(e,t,i,"scattergap",n))}}}),iJ=p({"src/plots/cartesian/align_period.js"(e,t){var r=C(),i=tv(),n=i.dateTime2ms,a=i.incrementMonth,o=L().ONEAVGMONTH;t.exports=function(e,t,i,s){if("date"!==t.type)return{vals:s};var l=e[i+"periodalignment"];if(!l)return{vals:s};var c,u=e[i+"period"];if(r(u)){if((u*=1)<=0)return{vals:s}}else if("string"==typeof u&&"M"===u.charAt(0)){var h=+u.substring(1);if(!(h>0)||Math.round(h)!==h)return{vals:s};c=h}for(var d=t.calendar,f="start"===l,p="end"===l,m=e[i+"period0"],g=n(m,d)||0,y=[],v=[],x=[],b=s.length,_=0;_k;)M=a(M,-c,d);for(;M<=k;)M=a(M,c,d);T=a(M,-c,d)}else{for(w=Math.round((k-g)/u),M=g+w*u;M>k;)M-=u;for(;M<=k;)M+=u;T=M-u}y[_]=f?T:p?M:(T+M)/2,v[_]=T,x[_]=M}return{vals:y,starts:v,ends:x}}}}),iQ=p({"src/traces/scatter/colorscale_calc.js"(e,t){var r=tj().hasColorscale,i=t2(),n=t5();t.exports=function(e,t){n.hasLines(t)&&r(t,"line")&&i(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),n.hasMarkers(t)&&(r(t,"marker")&&i(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),r(t,"marker.line")&&i(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),i0=p({"src/traces/scatter/arrays_to_calcdata.js"(e,t){var r=tv();t.exports=function(e,t){for(var i=0;ip&&L[y].gap;)y--;for(x=L[y].s,g=L.length-1;g>y;g--)L[g].s=x;for(;ph+c||!r(u))}for(var f=0;fn(e))):n(e.text);let a=e.outsidetextfont.size*u*r+c;return{ppadplus:t.some(e=>e.s<0)?a:0,ppadminus:t.some(e=>e.s>=0)?a:0}}return{ppadplus:void 0,ppadminus:void 0}}function b(e){return e._id.charAt(0)}t.exports={crossTraceCalc:function(e,t){for(var r=t.xaxis,i=t.yaxis,n=e._fullLayout,o=e._fullData,s=e.calcdata,l=[],c=[],u=0;uS[h]&&h0?o:s)/(C._m*I*(C._m>0?o:s)))),a*=1e3}if(l===n){if(P&&(l=C.c2p(i.y,!0)),l===n)return!1;l*=1e3}return[a,l]}function Y(e,t,r,i){var n=r-e,a=i-t,o=.5-e,s=.5-t,l=n*n+a*a,c=n*o+a*s;if(c>0&&ceo||e[1]el)return[u(e[0],ea,eo),u(e[1],es,el)]}function eh(e,t){if(e[0]===t[0]&&(e[0]===ea||e[0]===eo)||e[1]===t[1]&&(e[1]===es||e[1]===el))return!0}function ed(e,t,r){return function(i,n){var a,o=eu(i),s=eu(n),c=[];if(o&&s&&eh(o,s))return c;o&&c.push(o),s&&c.push(s);var u=2*l.constrain((i[e]+n[e])/2,t,r)-((o||i)[e]+(s||n)[e]);return u&&(a=o&&s?u>0==o[e]>s[e]?o:s:o||s,a[e]+=u),c}}function ef(e){var t=e[0],r=e[1],i=t===H[G-1][0],n=r===H[G-1][1];if(!(i&&n))if(G>1){var a=t===H[G-2][0],o=r===H[G-2][1];i&&(t===ea||t===eo)&&a?o?G--:H[G-1]=e:n&&(r===es||r===el)&&o?a?G--:H[G-1]=e:H[G++]=e}else H[G++]=e}function ep(e){H[G-1][0]!==e[0]&&H[G-1][1]!==e[1]&&ef([ee,et]),ef(e),er=null,ee=et=0}"linear"===j||"spline"===j?i=function(e,t){for(var r=[],i=0,n=0;n<4;n++){var a=ec[n],o=c(e[0],e[1],t[0],t[1],a[0],a[1],a[2],a[3]);o&&(!i||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],i&&$(o,e)<$(r[0],e)?r.unshift(o):r.push(o),i++)}return r}:"hv"===j||"vh"===j?i=function(e,t){var r=[],i=eu(e),n=eu(t);return i&&n&&eh(i,n)||(i&&r.push(i),n&&r.push(n)),r}:"hvh"===j?i=ed(0,ea,eo):"vhv"===j&&(i=ed(1,es,el));var em=l.isArrayOrTypedArray(O);function eg(t){if(t&&D&&(t.i=a,t.d=e,t.trace=S,t.marker=em?O[t.i]:O,t.backoff=D),X=t[0]/I,K=t[1]/z,J=t[0]eo?eo:0,Q=t[1]el?el:0,J||Q){if(G)if(er){var r,n,o,s=i(er,t);s.length>1&&(ep(s[0]),H[G++]=s[1])}else ei=i(H[G-1],t)[0],H[G++]=ei;else H[G++]=[J||t[0],Q||t[1]];var l=H[G-1];J&&Q&&(l[0]!==J||l[1]!==Q)?(er&&(ee!==J&&et!==Q?ef(ee&&et?(r=er,n=t[0]-r[0],o=(t[1]-r[1])/n,(r[1]*t[0]-t[1]*r[0])/n>0?[o>0?ea:eo,el]:[o>0?eo:ea,es]):[ee||J,et||Q]):ee&&et&&ef([ee,et])),ef([J,Q])):ee-J&&et-Q&&ef([J||ee,Q||et]),er=t,ee=J,et=Q}else er&&ep(i(er,t)[0]),H[G++]=t}for(a=0;aZ(g,ey))break;f=g,(T=x[0]*v[0]+x[1]*v[1])>_?(_=T,p=g,y=!1):T=e.length||!g)break;eg(g),d=g}}er&&ef([ee||er[0],et||er[1]]),U.push(H.slice(0,G))}var ev=j.slice(j.length-1);if(D&&"h"!==ev&&"v"!==ev){for(var ex=!1,eb=-1,e_=[],ew=0;ew=0?l=f:(l=f=d,d++),l=c[0]&&e.x<=c[1]&&e.y>=u[0]&&e.y<=u[1]}),p=Math.ceil(f.length/d),m=0;a.forEach(function(t,r){var i=t[0].trace;l.hasMarkers(i)&&i.marker.maxdisplayed>0&&r0;function x(e){return v?e.transition():e}var b=u.xaxis,_=u.yaxis,w=d[0].trace,T=w.line,M=r.select(p),k=a(M,"g","errorbars"),A=a(M,"g","lines"),S=a(M,"g","points"),E=a(M,"g","text");if(i.getComponentMethod("errorbars","plot")(e,k,u,m),!0===w.visible){x(M).style("opacity",w.opacity);var C,L,P=w.fill.charAt(w.fill.length-1);"x"!==P&&"y"!==P&&(P=""),"y"===P?(F=1,j=_.c2p(0,!0)):"x"===P&&(F=0,j=b.c2p(0,!0)),d[0][u.isRangePlot?"nodeRangePlot3":"node3"]=M;var I="",z=[],D=w._prevtrace,O=null,R=null;D&&(I=D._prevRevpath||"",L=D._nextFill,z=D._ownPolygons,O=D._fillsegments,R=D._fillElement);var F,j,B,N,U,V,q,H,G,W="",Y="",Z=[];w._polygons=[];var $=[],X=[],K=n.noop;if(C=w._ownFill,l.hasLines(w)||"none"!==w.fill){L&&L.datum(d),-1!==["hv","vh","hvh","vhv"].indexOf(T.shape)?(U=s.steps(T.shape),V=s.steps(T.shape.split("").reverse().join(""))):U=V="spline"===T.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?s.smoothclosed(e.slice(1),T.smoothing):s.smoothopen(e,T.smoothing)}:function(e){return"M"+e.join("L")},$=Array((X=c(d,{xaxis:b,yaxis:_,trace:w,connectGaps:w.connectgaps,baseTolerance:Math.max(T.width||1,3)/4,shape:T.shape,backoff:T.backoff,simplify:T.simplify,fill:w.fill})).length);var J=0;for(g=0;g0,x=u(e,t,i);((m=n.selectAll("g.trace").data(x,function(e){return e[0].trace.uid})).enter().append("g").attr("class",function(e){return"trace scatter trace"+e[0].trace.uid}).style("stroke-miterlimit",2),m.order(),h=e,f=m,p=t,f.each(function(e){var t=a(r.select(this),"g","fills");s.setClipUrl(t,p.layerClipId,h);var i=e[0].trace;i._ownFill=null,i._nextFill=null;var n=[];i._ownfill&&n.push("_ownFill"),i._nexttrace&&n.push("_nextFill");var l=t.selectAll("g").data(n,o);l.enter().append("g"),l.exit().remove(),l.order().each(function(e){i[e]=a(r.select(this),"path","js-fill")})}),v)?(c&&(g=c()),r.transition().duration(l.duration).ease(l.easing).each("end",function(){g&&g()}).each("interrupt",function(){g&&g()}).each(function(){n.selectAll("g.trace").each(function(r,i){d(e,i,t,r,x,this,l)})})):m.each(function(r,i){d(e,i,t,r,x,this,l)}),y&&m.exit().remove(),n.selectAll("path:not([d])").remove()}}}),ne=p({"src/traces/scatter/marker_colorbar.js"(e,t){t.exports={container:"marker",min:"cmin",max:"cmax"}}}),nt=p({"src/traces/scatter/format_labels.js"(e,t){var r=rn();t.exports=function(e,t,i){var n={},a={_fullLayout:i},o=r.getFromTrace(a,t,"x"),s=r.getFromTrace(a,t,"y"),l=e.orig_x;void 0===l&&(l=e.x);var c=e.orig_y;return void 0===c&&(c=e.y),n.xLabel=r.tickText(o,o.c2l(l),!0).text,n.yLabel=r.tickText(s,s.c2l(c),!0).text,n}}}),nr=p({"src/traces/scatter/style.js"(e,t){var r=T(),i=t9(),n=eQ();function a(e,t,r){i.pointStyle(e.selectAll("path.point"),t,r)}function o(e,t,r){i.textPointStyle(e.selectAll("text"),t,r)}t.exports={style:function(e){var t=r.select(e).selectAll("g.trace.scatter");t.style("opacity",function(e){return e[0].trace.opacity}),t.selectAll("g.points").each(function(t){a(r.select(this),t.trace||t[0].trace,e)}),t.selectAll("g.text").each(function(t){o(r.select(this),t.trace||t[0].trace,e)}),t.selectAll("g.trace path.js-line").call(i.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(i.fillGroupStyle,e,!1),n.getComponentMethod("errorbars","style")(t)},stylePoints:a,styleText:o,styleOnSelect:function(e,t,r){var n=t[0].trace;n.selectedpoints?(i.selectedPointStyle(r.selectAll("path.point"),n),i.selectedTextStyle(r.selectAll("text"),n)):(a(r,n,e),o(r,n,e))}}}}),ni=p({"src/traces/scatter/get_trace_color.js"(e,t){var r=ee(),i=t5();t.exports=function(e,t){if("lines"===e.mode)return(n=e.line.color)&&r.opacity(n)?n:e.fillcolor;if("none"===e.mode)return e.fill?e.fillcolor:"";var n,a,o=t.mcc||(e.marker||{}).color,s=t.mlcc||((e.marker||{}).line||{}).color;return(a=o&&r.opacity(o)?o:s&&r.opacity(s)&&(t.mlw||((e.marker||{}).line||{}).width)?s:"")?.3>r.opacity(a)?r.addOpacity(a,.3):a:(n=(e.line||{}).color)&&r.opacity(n)&&i.hasLines(e)&&e.line.width?n:e.fillcolor}}}),nn=p({"src/traces/scatter/hover.js"(e,t){var r=tv(),i=rD(),n=eQ(),a=ni(),o=ee(),s=r.fillText;t.exports=function(e,t,l,c){var u=e.cd,h=u[0].trace,d=e.xa,f=e.ya,p=d.c2p(t),m=f.c2p(l),g=[p,m],y=h.hoveron||"",v=-1!==h.mode.indexOf("markers")?3:.5,x=!!h.xperiodalignment,b=!!h.yperiodalignment;if(-1!==y.indexOf("points")){var _=function(e){var t=Math.max(v,e.mrc||0),r=d.c2p(e.x)-p,i=f.c2p(e.y)-m;return Math.max(Math.sqrt(r*r+i*i)-t,1-v/t)},w=i.getDistanceFunction(c,function(e){if(x){var t=d.c2p(e.xStart),r=d.c2p(e.xEnd);return p>=Math.min(t,r)&&p<=Math.max(t,r)?0:1/0}var i=Math.max(3,e.mrc||0),n=1-1/i,a=Math.abs(d.c2p(e.x)-p);return a=Math.min(t,r)&&m<=Math.max(t,r)?0:1/0}var i=Math.max(3,e.mrc||0),n=1-1/i,a=Math.abs(f.c2p(e.y)-m);return ac!=(s=r[t][1])>=c&&(n=r[t-1][0],a=r[t][0],s-o&&(h=Math.min(h,i=n+(a-n)*(c-o)/(s-o)),p=Math.max(p,i)));return{x0:h=Math.max(h,0),x1:p=Math.min(p,d._length),y0:c,y1:c}}(h._polygons);null===I&&(I={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var z=o.defaultLine;return o.opacity(h.fillcolor)?z=h.fillcolor:o.opacity((h.line||{}).color)&&(z=h.line.color),r.extendFlat(e,{distance:e.maxHoverDistance,x0:I.x0,x1:I.x1,y0:I.y0,y1:I.y1,color:z,hovertemplate:!1}),delete e.index,h.text&&!r.isArrayOrTypedArray(h.text)?e.text=String(h.text):e.text=h.name,[e]}}}}),na=p({"src/traces/scatter/select.js"(e,t){var r=t5();t.exports=function(e,t){var i,n,a,o,s=e.cd,l=e.xaxis,c=e.yaxis,u=[],h=s[0].trace;if(h.mode&&!r.hasMarkers(h)&&!r.hasText(h))return[];if(!1===t)for(i=0;i0&&(n["_"+r+"axes"]||{})[t]||(n[r+"axis"]||r)===t&&(a(n,r)||(n[r]||[]).length||n[r+"0"]))return n}}(t,s,l);if(c){if("histogram"===c.type&&l===({v:"y",h:"x"})[c.orientation||"v"]){e.type="linear";return}var u=l+"calendar",h=c[u],d={noMultiCategory:!r(c,"cartesian")||r(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&l===({h:"x",v:"y"})[c.orientation||"v"]&&(d.noMultiCategory=!0),d.autotypenumbers=e.autotypenumbers,a(c,l)){var f=n(c),p=[];for(o=0;o0||r(o);s&&(a="array");var l,c=i("categoryorder",a);"array"===c&&(l=i("categoryarray")),s||"array"!==c||(c=t.categoryorder="trace"),"trace"===c?t._initialCategories=[]:"array"===c?t._initialCategories=l.slice():(l=(function(e,t){var r,i,n,a=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],i=0;i=2){var l,c,u="";if(2===o.length){for(l=0;l<2;l++)if(c=b(o[l])){u=g;break}}var h=a("pattern",u);if(h===g)for(l=0;l<2;l++)(c=b(o[l]))&&(t.bounds[l]=o[l]=c-1);if(h)for(l=0;l<2;l++)switch(c=o[l],h){case g:if(!r(c)||(c*=1)!==Math.floor(c)||c<0||c>=7){t.enabled=!1;return}t.bounds[l]=o[l]=c;break;case y:if(!r(c)||(c*=1)<0||c>24){t.enabled=!1;return}t.bounds[l]=o[l]=c}if(!1===i.autorange){var d=i.range;if(d[0]d[1]){t.enabled=!1;return}}else if(o[0]>d[0]&&o[1]b[1]-1/4096&&(t.domain=s),i.noneOrAll(e.domain,t.domain,s),"sync"===t.tickmode&&(t.tickmode="auto")}return n("layer"),t}}}),nd=p({"src/plots/cartesian/layout_defaults.js"(e,t){var r=tv(),i=ee(),n=t6().isUnifiedHover,a=rL(),o=tS(),s=eK(),l=tN(),c=ns(),u=nu(),h=r8(),d=nh(),f=tC(),p=f.id2name,m=f.name2id,g=tE().AX_ID_PATTERN,y=eQ(),v=y.traceIs,x=y.getComponentMethod;function b(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}t.exports=function(e,t,y){var _,w,T=t.autotypenumbers,M={},k={},A={},S={},E={},C={},L={},P={},I={},z={};for(_=0;_ rect").call(a.setTranslate,0,0).call(a.setScale,1,1),e.plot.call(a.setTranslate,t._offset,r._offset).call(a.setScale,1,1);var i=e.plot.selectAll(".scatterlayer .trace");i.selectAll(".point").call(a.setPointGroupScale,1,1),i.selectAll(".textpoint").call(a.setTextPointsScale,1,1),i.call(a.hideOutsideRangePoints,e)}l&&(h=l());var h,d,f,p,m=r.ease(s.easing);return e._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(p),p=null,function(){for(var r={},n=0;ns.duration?(function(){for(var r={},n=0;n1,m=t.mainplotinfo;if(!t.mainplot||p)if(f)t.xlines=u(i,"path","xlines-above"),t.ylines=u(i,"path","ylines-above"),t.xaxislayer=u(i,"g","xaxislayer-above"),t.yaxislayer=u(i,"g","yaxislayer-above");else{if(!a){var g=u(i,"g","layer-subplot");t.shapelayer=u(g,"g","shapelayer"),t.imagelayer=u(g,"g","imagelayer"),m&&p?(t.minorGridlayer=m.minorGridlayer,t.gridlayer=m.gridlayer,t.zerolinelayer=m.zerolinelayer):(t.minorGridlayer=u(i,"g","minor-gridlayer"),t.gridlayer=u(i,"g","gridlayer"),t.zerolinelayer=u(i,"g","zerolinelayer"));var y=u(i,"g","layer-between");t.shapelayerBetween=u(y,"g","shapelayer"),t.imagelayerBetween=u(y,"g","imagelayer"),u(i,"path","xlines-below"),u(i,"path","ylines-below"),t.overlinesBelow=u(i,"g","overlines-below"),u(i,"g","xaxislayer-below"),u(i,"g","yaxislayer-below"),t.overaxesBelow=u(i,"g","overaxes-below")}t.overplot=u(i,"g","overplot"),t.plot=u(t.overplot,"g",n),m&&p?t.zerolinelayerAbove=m.zerolinelayerAbove:t.zerolinelayerAbove=u(i,"g","zerolinelayer-above"),a||(t.xlines=u(i,"path","xlines-above"),t.ylines=u(i,"path","ylines-above"),t.overlinesAbove=u(i,"g","overlines-above"),u(i,"g","xaxislayer-above"),u(i,"g","yaxislayer-above"),t.overaxesAbove=u(i,"g","overaxes-above"),t.xlines=i.select(".xlines-"+o),t.ylines=i.select(".ylines-"+c),t.xaxislayer=i.select(".xaxislayer-"+o),t.yaxislayer=i.select(".yaxislayer-"+c))}else{var v=m.plotgroup,x=n+"-x",b=n+"-y";t.minorGridlayer=m.minorGridlayer,t.gridlayer=m.gridlayer,t.zerolinelayer=m.zerolinelayer,t.zerolinelayerAbove=m.zerolinelayerAbove,u(m.overlinesBelow,"path",x),u(m.overlinesBelow,"path",b),u(m.overaxesBelow,"g",x),u(m.overaxesBelow,"g",b),t.plot=u(m.overplot,"g",n),u(m.overlinesAbove,"path",x),u(m.overlinesAbove,"path",b),u(m.overaxesAbove,"g",x),u(m.overaxesAbove,"g",b),t.xlines=v.select(".overlines-"+o).select("."+x),t.ylines=v.select(".overlines-"+c).select("."+b),t.xaxislayer=v.select(".overaxes-"+o).select("."+x),t.yaxislayer=v.select(".overaxes-"+c).select("."+b)}a||(f||(h(t.minorGridlayer,"g",t.xaxis._id),h(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(e){return e[0]}).sort(s.idSort),h(t.gridlayer,"g",t.xaxis._id),h(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(e){return e[0]}).sort(s.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function m(e,r){if(e){var i={};for(var n in e.each(function(e){var n=e[0];t.select(this).remove(),g(n,r),i[n]=!0}),r._plots)for(var a=r._plots[n],o=a.overlays||[],s=0;s0){var g=m.id;if(-1!==g.indexOf(d))continue;g+=d+(u+1),m=i.extendFlat({},m,{id:g,plot:o._cartesianlayer.selectAll(".subplot").select("."+g)})}for(var y,v=[],x=0;x1&&(w+=d+_),b.push(i+w),r=0;r=0,x=t.indexOf("end")>=0,b=p.backoff*g+a.standoff,_=m.backoff*y+a.startstandoff;if("line"===f.nodeName){c={x:+e.attr("x1"),y:+e.attr("y1")},u={x:+e.attr("x2"),y:+e.attr("y2")};var w=c.x-u.x,T=c.y-u.y;if(d=(h=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void O();if(b){if(b*b>w*w+T*T)return void O();var M=b*Math.cos(h),k=b*Math.sin(h);u.x+=M,u.y+=k,e.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+T*T)return void O();var A=_*Math.cos(h),S=_*Math.sin(h);c.x-=A,c.y-=S,e.attr({x1:c.x,y1:c.y})}}else if("path"===f.nodeName){var E=f.getTotalLength(),C="";if(E2/3?"right":"center"),({center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5})[t]}for(var Z=!1,$=["x","y"],X=0;X<$.length;X++){var K,J,Q,ee,et,er=$[X],ei=t[er+"ref"]||er,en=t["a"+er+"ref"],ea={x:v,y:x}[er],eo=(P+("x"===er?0:-90))*Math.PI/180,es=H*Math.cos(eo),el=W*Math.sin(eo),ec=Math.abs(es)+Math.abs(el),eu=t[er+"anchor"],eh=t[er+"shift"]*("x"===er?1:-1),ed=L[er],ef=s.getRefType(ei);if(ea&&"domain"!==ef){var ep=ea.r2fraction(t[er]);(ep<0||ep>1)&&(en===ei?((ep=ea.r2fraction(t["a"+er]))<0||ep>1)&&(Z=!0):Z=!0),K=ea._offset+ea.r2p(t[er]),ee=.5}else{var em="domain"===ef;"x"===er?(Q=t[er],K=em?ea._offset+ea._length*Q:K=T.l+T.w*Q):(Q=1-t[er],K=em?ea._offset+ea._length*Q:K=T.t+T.h*Q),ee=t.showarrow?.5:Q}if(t.showarrow){ed.head=K;var eg=t["a"+er];if(et=es*Y(.5,t.xanchor)-el*Y(.5,t.yanchor),en===ei){var ey=s.getRefType(en);"domain"===ey?("y"===er&&(eg=1-eg),ed.tail=ea._offset+ea._length*eg):"paper"===ey?"y"===er?(eg=1-eg,ed.tail=T.t+T.h*eg):ed.tail=T.l+T.w*eg:ed.tail=ea._offset+ea.r2p(eg),J=et}else ed.tail=K+eg,J=et+eg;ed.text=ed.tail+et;var ev=w["x"===er?"width":"height"];if("paper"===ei&&(ed.head=a.constrain(ed.head,1,ev-1)),"pixel"===en){var ex=-Math.max(ed.tail-3,ed.text),eb=Math.min(ed.tail+3,ed.text)-ev;ex>0?(ed.tail+=ex,ed.text+=ex):eb>0&&(ed.tail-=eb,ed.text-=eb)}ed.tail+=eh,ed.head+=eh}else J=et=ec*Y(ee,eu),ed.text=K+et;ed.text+=eh,et+=eh,J+=eh,t["_"+er+"padplus"]=ec/2+J,t["_"+er+"padminus"]=ec/2-J,t["_"+er+"size"]=ec,t["_"+er+"shift"]=et}if(Z)return void F.remove();var e_=0,ew=0;if("left"!==t.align&&(e_=(O-_)*("center"===t.align?.5:1)),"top"!==t.valign&&(ew=(q-k)*("middle"===t.valign?.5:1)),p)u.select("svg").attr({x:B+e_-1,y:B+ew}).call(c.setClipUrl,U?C:null,e);else{var eT=B+ew-b.top,eM=B+e_-b.left;G.call(h.positionText,eM,eT).call(c.setClipUrl,U?C:null,e)}V.select("rect").call(c.setRect,B,B,O,q),N.call(c.setRect,j/2,j/2,H-j,W-j),F.call(c.setTranslate,Math.round(L.x.text-H/2),Math.round(L.y.text-W/2)),z.attr({transform:"rotate("+P+","+L.x.text+","+L.y.text+")"});var ek=function(r,n){I.selectAll(".annotation-arrow-g").remove();var s=L.x.head,u=L.y.head,h=L.x.tail+r,d=L.y.tail+n,p=L.x.text+r,b=L.y.text+n,_=a.rotationXYMatrix(P,p,b),w=a.apply2DTransform(_),k=a.apply2DTransform2(_),C=+N.attr("width"),D=+N.attr("height"),O=p-.5*C,R=O+C,j=b-.5*D,B=j+D,U=[[O,j,O,B],[O,B,R,B],[R,B,R,j],[R,j,O,j]].map(k);if(!U.reduce(function(e,t){return!!a.segmentsIntersect(s,u,s+1e6,u+1e6,t[0],t[1],t[2],t[3])^e},!1)){U.forEach(function(e){var t=a.segmentsIntersect(h,d,s,u,e[0],e[1],e[2],e[3]);t&&(h=t.x,d=t.y)});var V=t.arrowwidth,q=t.arrowcolor,H=t.arrowside,G=I.append("g").style({opacity:l.opacity(q)}).classed("annotation-arrow-g",!0),W=G.append("path").attr("d","M"+h+","+d+"L"+s+","+u).style("stroke-width",V+"px").call(l.stroke,l.rgb(q));if(m(W,H,t),M.annotationPosition&&W.node().parentNode&&!g){var Y=s,Z=u;if(t.standoff){var $=Math.sqrt(Math.pow(s-h,2)+Math.pow(u-d,2));Y+=t.standoff*(h-s)/$,Z+=t.standoff*(d-u)/$}var X,K,J=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(h-Y)+","+(d-Z),transform:o(Y,Z)}).style("stroke-width",V+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");f.init({element:J.node(),gd:e,prepFn:function(){var e=c.getTranslate(F);X=e.x,K=e.y,v&&v.autorange&&A(v._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0)},moveFn:function(e,r){var i=w(X,K),n=i[0]+e,a=i[1]+r;F.call(c.setTranslate,n,a),S("x",y(v,e,"x",T,t)),S("y",y(x,r,"y",T,t)),t.axref===t.xref&&S("ax",y(v,e,"ax",T,t)),t.ayref===t.yref&&S("ay",y(x,r,"ay",T,t)),G.attr("transform",o(e,r)),z.attr({transform:"rotate("+P+","+n+","+a+")"})},doneFn:function(){i.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};t.showarrow&&ek(0,0),D&&f.init({element:F.node(),gd:e,prepFn:function(){r=z.attr("transform")},moveFn:function(e,i){var n="pointer";if(t.showarrow)t.axref===t.xref?S("ax",y(v,e,"ax",T,t)):S("ax",t.ax+e),t.ayref===t.yref?S("ay",y(x,i,"ay",T.w,t)):S("ay",t.ay+i),ek(e,i);else{if(g)return;if(v)a=y(v,e,"x",T,t);else{var a,s,l=t._xsize/T.w,c=t.x+(t._xshift-t.xshift)/T.w-l/2;a=f.align(c+e/T.w,l,0,1,t.xanchor)}if(x)s=y(x,i,"y",T,t);else{var u=t._ysize/T.h,h=t.y-(t._yshift+t.yshift)/T.h-u/2;s=f.align(h-i/T.h,u,0,1,t.yanchor)}S("x",a),S("y",s),v&&x||(n=f.getCursor(v?.5:a,x?.5:s,t.xanchor,t.yanchor))}z.attr({transform:o(e,i)+r}),d(F,n)},clickFn:function(r,i){t.captureevents&&e.emit("plotly_clickannotation",R(i))},doneFn:function(){d(F),i.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}M.annotationText?G.call(h.makeEditable,{delegate:F,gd:e}).call(W).on("edit",function(r){t.text=r,this.call(W),S("text",r),v&&v.autorange&&A(v._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0),i.call("_guiRelayout",e,E())}):G.call(W)}t.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r0||r.explicitOff.length>0},onClick:function(e,t){var o,s,l=a(e,t),c=l.on,u=l.off.concat(l.explicitOff),h={},d=e._fullLayout.annotations;if(c.length||u.length){for(o=0;o1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+s+'"]').remove():(l._pdata=i(e.glplot.cameraParams,[t.xaxis.r2l(l.x)*a[0],t.yaxis.r2l(l.y)*a[1],t.zaxis.r2l(l.z)*a[2]]),r(e.graphDiv,l,s,e.id,l._xa,l._ya))}}}}),nC=p({"src/components/annotations3d/index.js"(e,t){var r=eQ(),i=tv();t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:nM()}}},layoutAttributes:nM(),handleDefaults:nk(),includeBasePlot:function(e,t){var n=r.subplotsRegistry.gl3d;if(n)for(var a=n.attrRegex,o=Object.keys(e),s=0;s{var l,g,y,v,x=a+"anchor",b="x"===a?d:f,_={_fullLayout:n};let w=e[a+"ref"];if(Array.isArray(w)&&w.length>0){let r=o.countDefiningCoords(u,c,a);v=i.coerceRefArray(e,t,_,a,void 0,"paper",r),t["_"+a+"refArray"]=!0}else v=i.coerceRef(e,t,_,a,void 0,"paper");if(Array.isArray(v))v.forEach(function(e){"range"===i.getRefType(e)&&(l=i.getFromId(_,e))&&-1===l._shapeIndices.indexOf(t._index)&&l._shapeIndices.push(t._index)}),h&&[0,1].forEach(function(n){let c=v[n];"range"===i.getRefType(c)?(l=i.getFromId(_,c),g=o.shapePositionToRange(l),y=o.rangeToShapePosition(l),("category"===l.type||"multicategory"===l.type)&&s(a+n+"shift")):g=y=r.identity;let u=a+n,h=e[u];if(e[u]=g(e[u],!0),"pixel"===b?s(u,m[n]):i.coercePosition(t,_,s,c,u,p[n]),t[u]=y(t[u]),e[u]=h,0===n&&"pixel"===b){let r=e[x];e[x]=g(e[x],!0),i.coercePosition(t,_,s,c,x,.25),t[x]=y(t[x]),e[x]=r}});else{if("range"===i.getRefType(v)?((l=i.getFromId(_,v))._shapeIndices.push(t._index),y=o.rangeToShapePosition(l),g=o.shapePositionToRange(l),h&&("category"===l.type||"multicategory"===l.type)&&(s(a+"0shift"),s(a+"1shift"))):g=y=r.identity,h){let r=a+"0",n=a+"1",o=e[r],l=e[n];e[r]=g(e[r],!0),e[n]=g(e[n],!0),"pixel"===b?(s(r,m[0]),s(n,m[1])):(i.coercePosition(t,_,s,v,r,p[0]),i.coercePosition(t,_,s,v,n,p[1])),t[r]=y(t[r]),t[n]=y(t[n]),e[r]=o,e[n]=l}if("pixel"===b){let r=e[x];e[x]=g(e[x],!0),i.coercePosition(t,_,s,v,x,.25),t[x]=y(t[x]),e[x]=r}}}),h&&r.noneOrAll(e,t,["x0","x1","y0","y1"]);var g,y,v="line"===u;if(h&&(g=s("label.texttemplate"),s("label.texttemplatefallback")),g||(y=s("label.text")),y||g){s("label.textangle");var x=s("label.textposition",v?"middle":"middle center");s("label.xanchor"),s("label.yanchor",v?"bottom":-1!==x.indexOf("top")?"top":-1!==x.indexOf("bottom")?"bottom":"middle"),s("label.padding"),r.coerceFont(s,"label.font",n.font)}}t.exports=function(e,t){n(e,t,{name:"shapes",handleItemDefaults:s})}}}),nI=p({"src/components/shapes/draw_newshape/defaults.js"(e,t){var r=ee(),i=tv();t.exports=function(e,t,n){if(n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),i.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity"),n("newshape.line.width")){var a=(e||{}).plot_bgcolor||"#FFF";n("newshape.line.color",r.contrast(a)),n("newshape.line.dash")}var o="drawline"===e.dragmode,s=n("newshape.label.text"),l=n("newshape.label.texttemplate");if(n("newshape.label.texttemplatefallback"),s||l){n("newshape.label.textangle");var c=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",o?"bottom":-1!==c.indexOf("top")?"top":-1!==c.indexOf("bottom")?"bottom":"middle"),n("newshape.label.padding"),i.coerceFont(n,"newshape.label.font",t.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}}}),nz=p({"src/components/shapes/calc_autorange.js"(e,t){var r=tv(),i=rn(),n=rq(),a=rH();function o(e,t,r){let o=t[r+"ref"],s="x"===r?n.paramIsX:n.paramIsY;function l(e,t){"paper"===e||"domain"===i.getRefType(e)||(c[e]||(c[e]=[]),c[e].push(t))}let c={};if("path"===t.type&&t.path){let e=t.path.match(n.segmentRE)||[];for(var u=0,h=0;hr&&(l(o[u],i[r]),u++)}}else l(o[0],t[r+"0"]),l(o[1],t[r+"1"]);let d={};for(let t in c){let r=i.getFromId(e,t);if(r){var f="category"===r.type||"multicategory"===r.type?r.r2c:r.d2c;"date"===r.type&&(f=a.decodeDate(f)),d[r._id]=c[t].map(f)}}return d}function s(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function l(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,i,o,s,l){var c=e/2;if("pixel"!==t)return{ppad:c};var u=s?a.extractPathCoords(s,l?n.paramIsY:n.paramIsX):[i,o],h=r.aggNums(Math.max,null,u),d=r.aggNums(Math.min,null,u),f=d<0?Math.abs(d)+c:c,p=h>0?h+c:c;return{ppad:c,ppadplus:l?f:p,ppadminus:l?p:f}}function u(e,t,r){var i,o,s="x"===e._id.charAt(0)?"x":"y",l="category"===e.type||"multicategory"===e.type,c=0,u=0,h=l?e.r2c:e.d2c;if("scaled"===t[s+"sizemode"]?(i=t[s+"0"],o=t[s+"1"],l&&(c=t[s+"0shift"],u=t[s+"1shift"])):(i=t[s+"anchor"],o=t[s+"anchor"]),void 0!==i)return[h(i)+c,h(o)+u];if(t.path){var d,f,p,m,g=1/0,y=-1/0,v=t.path.match(n.segmentRE);for("date"===e.type&&(h=a.decodeDate(h)),d=0;dy&&(y=m));if(y>=g)return[g,y]}}t.exports=function(e){var t=e._fullLayout,a=r.filterVisible(t.shapes);if(!(!a.length||!e._fullData.length))for(var c=0;c{d=i.getFromId(e,t),h._extremes[d._id]=i.findExtremes(d,r,s(h))}):"paper"!==h.xref&&"domain"!==p&&(f=u(d=i.getFromId(e,h.xref),h,n.paramIsX))&&(h._extremes[d._id]=i.findExtremes(d,f,s(h))),"array"===m?Object.entries(o(e,h,"y")).forEach(([t,r])=>{d=i.getFromId(e,t),h._extremes[d._id]=i.findExtremes(d,r,l(h))}):"paper"!==h.yref&&"domain"!==m&&(f=u(d=i.getFromId(e,h.yref),h,n.paramIsY))&&(h._extremes[d._id]=i.findExtremes(d,f,l(h)))}}}}),nD=p({"src/components/shapes/index.js"(e,t){var r=rY();t.exports={moduleType:"component",name:"shapes",layoutAttributes:nL(),supplyLayoutDefaults:nP(),supplyDrawNewShapeDefaults:nI(),includeBasePlot:iT()("shapes"),calcAutorange:nz(),draw:r.draw,drawOne:r.drawOne}}}),nO=p({"src/components/images/attributes.js"(e,t){var r=tE(),i=tS().templatedArray;im(),t.exports=i("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",r.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",r.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),nR=p({"src/components/images/defaults.js"(e,t){var r=tv(),i=rn(),n=t$(),a=nO();function o(e,t,n){function o(i,n){return r.coerce(e,t,a,i,n)}var s=o("source");if(!o("visible",!!s))return t;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var l={_fullLayout:n},c=["x","y"],u=0;u<2;u++){var h=c[u],d=i.coerceRef(e,t,l,h,"paper",void 0);"paper"!==d&&i.getFromId(l,d)._imgIndices.push(t._index),i.coercePosition(t,l,o,d,h,0)}return t}t.exports=function(e,t){n(e,t,{name:"images",handleItemDefaults:o})}}}),nF=p({"src/components/images/draw.js"(e,t){var r=T(),i=t9(),n=rn(),a=tC(),o=tO();t.exports=function(e){var t,s,l=e._fullLayout,c=[],u={},h=[];for(s=0;s0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),r.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),r.coerceFont(o,"font",a.font),o("bgcolor",a.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function l(e,t){function i(i,n){return r.coerce(e,t,o,i,n)}i("visible","skip"===e.method||Array.isArray(e.args))&&(i("method"),i("args"),i("args2"),i("label"),i("execute"))}t.exports=function(e,t){i(e,t,{name:a,handleItemDefaults:s})}}}),nq=p({"src/components/updatemenus/scrollbox.js"(e,t){t.exports=o;var r=T(),i=ee(),n=t9(),a=tv();function o(e,t,r){this.gd=e,this.container=t,this.id=r,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})}o.barWidth=2,o.barLength=20,o.barRadius=2,o.barPad=1,o.barColor="#808BA4",o.prototype.enable=function(e,t,a){var s=this.gd._fullLayout,l=s.width,c=s.height;this.position=e;var u,h,d,f,p=this.position.l,m=this.position.w,g=this.position.t,y=this.position.h,v=this.position.direction,x="down"===v,b="left"===v,_="up"===v,w=m,T=y;x||b||"right"===v||_||(this.position.direction="down",x=!0),x||_?(h=(u=p)+w,x?T=(f=Math.min((d=g)+T,c))-d:(d=Math.max((f=g+T)-T,0),T=f-d)):(f=(d=g)+T,b?(u=Math.max((h=p+w)-w,0),w=h-u):w=(h=Math.min((u=p)+w,l))-u),this._box={l:u,t:d,w:w,h:T};var M=m>w,k=o.barLength+2*o.barPad,A=o.barWidth+2*o.barPad,S=g+y;S+A>c&&(S=c-A);var E=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);E.exit().on(".drag",null).remove(),E.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,o.barColor),M?(this.hbar=E.attr({rx:o.barRadius,ry:o.barRadius,x:p,y:S,width:k,height:A}),this._hbarXMin=p+k/2,this._hbarTranslateMax=w-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=y>T,L=o.barWidth+2*o.barPad,P=o.barLength+2*o.barPad,I=p+m;I+L>l&&(I=l-L);var z=this.container.selectAll("rect.scrollbar-vertical").data(C?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,o.barColor),C?(this.vbar=z.attr({rx:o.barRadius,ry:o.barRadius,x:I,y:g,width:L,height:P}),this._vbarYMin=g+P/2,this._vbarTranslateMax=T-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var D=this.id,O=u-.5,R=C?h+L+.5:h+.5,F=d-.5,j=M?f+A+.5:f+.5,B=s._topdefs.selectAll("#"+D).data(M||C?[0]:[]);if(B.exit().remove(),B.enter().append("clipPath").attr("id",D).append("rect"),M||C?(this._clipRect=B.select("rect").attr({x:Math.floor(O),y:Math.floor(F),width:Math.ceil(R)-Math.floor(O),height:Math.ceil(j)-Math.floor(F)}),this.container.call(n.setClipUrl,D,this.gd),this.bg.attr({x:p,y:g,width:m,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(n.setClipUrl,null),delete this._clipRect),M||C){var N=r.behavior.drag().on("dragstart",function(){r.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(N);var U=r.behavior.drag().on("dragstart",function(){r.event.sourceEvent.preventDefault(),r.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(U),C&&this.vbar.on(".drag",null).call(U)}this.setTranslate(t,a)},o.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(n.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)},o.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=r.event.dx),this.vbar&&(t-=r.event.dy),this.setTranslate(e,t)},o.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=r.event.deltaY),this.vbar&&(t+=r.event.deltaY),this.setTranslate(e,t)},o.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var i=e+this._hbarXMin,n=i+this._hbarTranslateMax;e=(a.constrain(r.event.x,i,n)-i)/(n-i)*(this.position.w-this._box.w)}if(this.vbar){var o=t+this._vbarYMin,s=o+this._vbarTranslateMax;t=(a.constrain(r.event.y,o,s)-o)/(s-o)*(this.position.h-this._box.h)}this.setTranslate(e,t)},o.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,i=this.position.h-this._box.h;if(e=a.constrain(e||0,0,r),t=a.constrain(t||0,0,i),this.translateX=e,this.translateY=t,this.container.call(n.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var o=e/r;this.hbar.call(n.setTranslate,e+o*this._hbarTranslateMax,t)}if(this.vbar){var s=t/i;this.vbar.call(n.setTranslate,e,t+s*this._vbarTranslateMax)}}}}),nH=p({"src/components/updatemenus/draw.js"(e,t){var r=T(),i=tD(),n=ee(),a=t9(),o=tv(),s=tF(),l=tS().arrayEditor,c=tR().LINE_SPACING,u=nN(),h=nq();function d(e){return e._index}function f(e,t){return+e.attr(u.menuIndexAttrName)===t._index}function p(e,t,r,i,n,a,o,s){t.active=o,l(e.layout,u.name,t).applyUpdate("active",o),"buttons"===t.type?g(e,i,null,null,t):"dropdown"===t.type&&(n.attr(u.menuIndexAttrName,"-1"),m(e,i,n,a,t),s||g(e,i,n,a,t))}function m(e,t,r,i,n){var s=o.ensureSingle(t,"g",u.headerClassName,function(e){e.style("pointer-events","all")}),l=n._dims,c=n.active,h=n.buttons[c]||u.blankHeaderOpts,d={y:n.pad.t,yPad:0,x:n.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};s.call(y,n,h,e).call(k,n,d,p),o.ensureSingle(t,"text",u.headerArrowClassName,function(e){e.attr("text-anchor","end").call(a.font,n.font).text(u.arrowSymbol[n.direction])}).attr({x:l.headerWidth-u.arrowOffsetX+n.pad.l,y:l.headerHeight/2+u.textOffsetY+n.pad.t}),s.on("click",function(){r.call(A,String(f(r,n)?-1:n._index)),g(e,t,r,i,n)}),s.on("mouseover",function(){s.call(_)}),s.on("mouseout",function(){s.call(w,n)}),a.setTranslate(t,l.lx,l.ly)}function g(e,t,n,a,s){n||(n=t).attr("pointer-events","all");var l,c,h,d=-1==+n.attr(u.menuIndexAttrName)&&"buttons"!==s.type?[]:s.buttons,f="dropdown"===s.type?u.dropdownButtonClassName:u.buttonClassName,m=n.selectAll("g."+f).data(o.filterVisible(d)),g=m.enter().append("g").classed(f,!0),v=m.exit();"dropdown"===s.type?(g.attr("opacity","0").transition().attr("opacity","1"),v.transition().attr("opacity","0").remove()):v.remove();var x=0,T=0,M=s._dims,A=-1!==["up","down"].indexOf(s.direction);"dropdown"===s.type&&(A?T=M.headerHeight+u.gapButtonHeader:x=M.headerWidth+u.gapButtonHeader),"dropdown"===s.type&&"up"===s.direction&&(T=-u.gapButtonHeader+u.gapButton-M.openHeight),"dropdown"===s.type&&"left"===s.direction&&(x=-u.gapButtonHeader+u.gapButton-M.openWidth);var S={x:M.lx+x+s.pad.l,y:M.ly+T+s.pad.t,yPad:u.gapButton,xPad:u.gapButton,index:0},E={l:S.x+s.borderwidth,t:S.y+s.borderwidth};m.each(function(o,l){var c=r.select(this);c.call(y,s,o,e).call(k,s,S),c.on("click",function(){r.event.defaultPrevented||(o.execute&&(o.args2&&s.active===l?(p(e,s,o,t,n,a,-1),i.executeAPICommand(e,o.method,o.args2)):(p(e,s,o,t,n,a,l),i.executeAPICommand(e,o.method,o.args))),e.emit("plotly_buttonclicked",{menu:s,button:o,active:s.active}))}),c.on("mouseover",function(){c.call(_)}),c.on("mouseout",function(){c.call(w,s),m.call(b,s)})}),m.call(b,s),A?(E.w=Math.max(M.openWidth,M.headerWidth),E.h=S.y-E.t):(E.w=S.x-E.l,E.h=Math.max(M.openHeight,M.headerHeight)),E.direction=s.direction,a&&(m.size()?function(e,t,r){var i,n,a,o=t.direction,s=t._dims,l=t.active;if("up"===o||"down"===o)for(n=0,a=0;a0?[0]:[]);if(v.enter().append("g").classed(u.containerClassName,!0).style("cursor","pointer"),v.exit().each(function(){r.select(this).selectAll("g."+u.headerGroupClassName).each(l)}).remove(),0!==n.length){var x=v.selectAll("g."+u.headerGroupClassName).data(n,d);x.enter().append("g").classed(u.headerGroupClassName,!0);for(var b=o.ensureSingle(v,"g",u.dropdownButtonGroupClassName,function(e){e.style("pointer-events","all")}),_=0;_0&&(l=l.transition().duration(t.transition.duration).ease(t.transition.easing)),l.attr("transform",s(o-.5*u.gripWidth,t._dims.currentValueTotalHeight))}}function S(e,t){var r=e._dims;return r.inputAreaStart+u.stepInset+(r.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,t))}function E(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-u.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*u.stepInset-2*r.inputAreaStart)))}function C(e,t,r){var i=r._dims,s=o.ensureSingle(e,"rect",u.railTouchRectClass,function(i){i.call(M,t,e,r).style("pointer-events","all")});s.attr({width:i.inputAreaLength,height:Math.max(i.inputAreaWidth,u.tickOffset+r.ticklen+i.labelHeight)}).call(n.fill,r.bgcolor).attr("opacity",0),a.setTranslate(s,0,i.currentValueTotalHeight)}function L(e,t){var r=t._dims,i=r.inputAreaLength-2*u.railInset,s=o.ensureSingle(e,"rect",u.railRectClass);s.attr({width:i,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(n.stroke,t.bordercolor).call(n.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),a.setTranslate(s,u.railInset,(r.inputAreaWidth-u.railWidth)*.5+r.currentValueTotalHeight)}t.exports=function(e){var t=e._context.staticPlot,n=e._fullLayout,s=function(e,t){for(var r=e[u.name],i=[],n=0;n0?[0]:[]);function h(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),i.autoMargin(e,m(t))}if(c.enter().append("g").classed(u.containerClassName,!0).style("cursor",t?null:"ew-resize"),c.exit().each(function(){r.select(this).selectAll("g."+u.groupClassName).each(h)}).remove(),0!==s.length){var d=c.selectAll("g."+u.groupClassName).data(s,g);d.enter().append("g").classed(u.groupClassName,!0),d.exit().each(h).remove();for(var _=0;_0?e.touches[0].clientX:0}function g(e,t,r,i){var n=a.ensureSingle(e,"rect",p.bgClassName,function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),c=i.borderwidth%2==0?i.borderwidth:i.borderwidth-1,u=-i._offsetShift,h=s.crispRound(t,i.borderwidth);n.attr({width:i._width+c,height:i._height+c,transform:o(u,u),"stroke-width":h}).call(l.stroke,i.bordercolor).call(l.fill,i.bgcolor)}function y(e,t,r,i){var n=t._fullLayout;a.ensureSingleById(n._topdefs,"clipPath",i._clipId,function(e){e.append("rect").attr({x:0,y:0})}).select("rect").attr({width:i._width,height:i._height})}function v(e,t,i,o){var l,c=t.calcdata,d=e.selectAll("g."+p.rangePlotClassName).data(i._subplotsWith,a.identity);d.enter().append("g").attr("class",function(e){return p.rangePlotClassName+" "+e}).call(s.setClipUrl,o._clipId,t),d.order(),d.exit().remove(),d.each(function(e,a){var s=r.select(this),d=h.getFromId(t,e,"y"),f=d._name,p=o[f],m={data:[],layout:{xaxis:{type:i.type,domain:[0,1],range:o.range.slice(),calendar:i.calendar},width:o._width,height:o._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};i.rangebreaks&&(m.layout.xaxis.rangebreaks=i.rangebreaks),m.layout[f]={type:d.type,domain:[0,1],range:"match"!==p.rangemode?p.range.slice():d.range.slice(),calendar:d.calendar},d.rangebreaks&&(m.layout[f].rangebreaks=d.rangebreaks),n.supplyDefaults(m);var g=m._fullLayout.xaxis,y=m._fullLayout[f];g.clearCalc(),g.setScale(),y.clearCalc(),y.setScale();var v={id:e,plotgroup:s,xaxis:g,yaxis:y,isRangePlot:!0};0===a?l=v:(v.mainplot="xy",v.mainplotinfo=l),u.rangePlot(t,v,function(e,t){for(var r=[],i=0;i=i.max)t=j[r+1];else if(e=i.pmax)t=j[r+1];else if(en._length||v+_<0)return;u=y+_,d=v+_;break;case l:if(b="col-resize",y+_>n._length)return;u=y+_,d=v;break;case c:if(b="col-resize",v+_<0)return;u=y,d=v+_;break;default:b="ew-resize",u=g,d=g+_}if(d0)){var m=function(e,t,r){for(var i=r.filter(function(r){return t[r].anchor===e._id}),n=0,a=0;a1))return void delete t.grid;d||f||p||"independent"===M("pattern")&&(d=!0),g._hasSubplotGrid=d;var x,b,_=M("roworder"),w=d?.2:.1,T=d?.3:.1;m&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),g._domains={x:c("x",M,w,x,v),y:c("y",M,T,b,y,"top to bottom"===_)}}function M(e,t){return r.coerce(i,g,s,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(!(!r||!r._domains)){var i,n,a,o,s,c,h,d=e.grid||{},f=t._subplots,p=r._hasSubplotGrid,m=r.rows,g=r.columns,y="independent"===r.pattern,v=r._axisMap={};if(p){var x=d.subplots||[];c=r.subplots=Array(m);var b=1;for(i=0;i0,h=e._context.staticPlot;t.each(function(t){var d,f=t[0].trace,p=f.error_x||{},m=f.error_y||{};f.ids&&(d=function(e){return e.id});var g=a.hasMarkers(f)&&f.marker.maxdisplayed>0;m.visible||p.visible||(t=[]);var y=r.select(this).selectAll("g.errorbar").data(t,d);if(y.exit().remove(),t.length){p.visible||y.selectAll("path.xerror").remove(),m.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var v=y.enter().append("g").classed("errorbar",!0);u&&v.style("opacity",0).transition().duration(s.duration).style("opacity",1),n.setClipUrl(y,o.layerClipId,e),y.each(function(e){var t=r.select(this),n=(a=e,o=l,d=c,f={x:o.c2p(a.x),y:d.c2p(a.y)},void 0!==a.yh&&(f.yh=d.c2p(a.yh),f.ys=d.c2p(a.ys),i(f.ys)||(f.noYS=!0,f.ys=d.c2p(a.ys,!0))),void 0!==a.xh&&(f.xh=o.c2p(a.xh),f.xs=o.c2p(a.xs),i(f.xs)||(f.noXS=!0,f.xs=o.c2p(a.xs,!0))),f);if(!(g&&!e.vis)){var a,o,d,f,y,v=t.select("path.yerror");if(m.visible&&i(n.x)&&i(n.yh)&&i(n.ys)){var x=m.width;y="M"+(n.x-x)+","+n.yh+"h"+2*x+"m-"+x+",0V"+n.ys,n.noYS||(y+="m-"+x+",0h"+2*x),v.size()?u&&(v=v.transition().duration(s.duration).ease(s.easing)):v=t.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0),v.attr("d",y)}else v.remove();var b=t.select("path.xerror");if(p.visible&&i(n.y)&&i(n.xh)&&i(n.xs)){var _=(p.copy_ystyle?m:p).width;y="M"+n.xh+","+(n.y-_)+"v"+2*_+"m0,-"+_+"H"+n.xs,n.noXS||(y+="m0,-"+_+"v"+2*_),b.size()?u&&(b=b.transition().duration(s.duration).ease(s.easing)):b=t.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0),b.attr("d",y)}else b.remove()}})}})}}}),al=p({"src/components/errorbars/style.js"(e,t){var r=T(),i=ee();t.exports=function(e){e.each(function(e){var t=e[0].trace,n=t.error_y||{},a=t.error_x||{},o=r.select(this);o.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(i.stroke,n.color),a.copy_ystyle&&(a=n),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)})}}}),ac=p({"src/components/errorbars/index.js"(e,t){var r=tv(),i=eq().overrideAll,n=ai(),a={error_x:r.extendFlat({},n),error_y:r.extendFlat({},n)};delete a.error_x.copy_zstyle,delete a.error_y.copy_zstyle,delete a.error_y.copy_ystyle;var o={error_x:r.extendFlat({},n),error_y:r.extendFlat({},n),error_z:r.extendFlat({},n)};delete o.error_x.copy_ystyle,delete o.error_y.copy_ystyle,delete o.error_z.copy_ystyle,delete o.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:a,bar:a,histogram:a,scatter3d:i(o,"calc","nested"),scattergl:i(a,"calc","nested")}},supplyDefaults:an(),calc:ao(),makeComputeError:aa(),plot:as(),style:al(),hoverInfo:function(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}}}}),au=p({"src/components/colorbar/constants.js"(e,t){t.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"}}}}),ah=p({"src/components/colorbar/draw.js"(e,t){var r=T(),i=tD(),n=eQ(),a=rn(),o=rd(),s=tv(),l=s.strTranslate,c=q().extendFlat,u=rf(),h=t9(),d=ee(),f=re(),p=tF(),m=tj().flipScale,g=nu(),y=nh(),v=tN(),x=tR(),b=x.LINE_SPACING,_=x.FROM_TL,w=x.FROM_BR,M=au().cn,k=(e,t)=>[Math.min(e[0]+t,e[1]),e[1]],A=(e,t)=>[e[0],Math.max(e[1]-t,e[0])];t.exports={draw:function(e){var t=e._fullLayout._infolayer.selectAll("g."+M.colorbar).data(function(e){var t,r,i,n,a=e._fullLayout,o=e.calcdata,s=[];function l(e){return c(e,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){"function"==typeof n.calc?n.calc(e,i,t):(t._fillgradient=r.reversescale?m(r.colorscale):r.colorscale,t._zrange=[r[n.min],r[n.max]])}for(var h=0;h0?r>=s:r<=s));i++)r>c&&r0?r>=s:r<=s));i++)r>t[0]&&r1){var ep=Math.pow(10,Math.floor(Math.log(ef)/Math.LN10));eh*=ep*s.roundUp(ef/ep,[2,5,10]),(Math.abs(Y.start)/Y.size+1e-6)%1<2e-6&&(ec.tick0=0)}ec.dtick=eh}var em=o?z/B.h:I/B.w;ec.domain=A(k([es,es+ee],em),em),ec.setScale(),e.attr("transform",l(Math.round(B.l),Math.round(B.t)));var eg,ey=e.select("."+M.cbtitleunshift).attr("transform",l(-Math.round(B.l),-Math.round(B.t))),ev=ec.ticklabelposition,ex=ec.title.font.size,eb=e.select("."+M.cbaxis),e_=0,ew=0;function eT(r,i){var a={propContainer:ec,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:j._dfltTitle.colorbar,containerGroup:e.select("."+M.cbtitle)},o="h"===r.charAt(0)?r.slice(1):"h"+r;e.selectAll("."+o+",."+o+"-math-group").remove(),f.draw(n,r,c(a,i||{}))}return s.syncOrAsync([i.previousPromises,function(){if(o&&eu||!o&&!eu){var e,t;"top"===q&&(e=I+B.l+et*D,t=z+B.t+er*(1-es-ee)+3+.75*ex),"bottom"===q&&(e=I+B.l+et*D,t=z+B.t+er*(1-es)-3-.25*ex),"right"===q&&(t=z+B.t+er*O+3+.75*ex,e=I+B.l+et*es),eT(ec._id+"title",{attributes:{x:e,y:t,"text-anchor":o?"start":"middle"}})}},function(){if(!o&&!eu||o&&eu){var i,c=e.select("."+M.cbtitle),u=c.select("text"),f=[-S/2,S/2],m=c.select(".h"+ec._id+"title-math-group").node(),g=15.6;if(u.node()&&(g=parseInt(u.node().style.fontSize,10)*b),m?(ew=(i=h.bBox(m)).width,(e_=i.height)>g&&(f[1]-=(e_-g)/2)):u.node()&&!u.classed(M.jsPlaceholder)&&(ew=(i=h.bBox(u.node())).width,e_=i.height),o){if(e_){if(e_+=5,"top"===q)ec.domain=A(ec.domain,e_/B.h),f[1]*=-1;else{ec.domain=k(ec.domain,e_/B.h);var y=p.lineCount(u);f[1]+=(1-y)*g}c.attr("transform",l(f[0],f[1])),ec.setScale()}}else ew&&("right"===q&&(ec.domain=k(ec.domain,(ew+ex/2)/B.w)),c.attr("transform",l(f[0],f[1])),ec.setScale())}e.selectAll("."+M.cbfills+",."+M.cblines).attr("transform",o?l(0,Math.round(B.h*(1-ec.domain[1]))):l(Math.round(B.w*ec.domain[0]),0)),eb.attr("transform",o?l(0,Math.round(-B.t)):l(Math.round(-B.l),0));var v=e.select("."+M.cbfills).selectAll("rect."+M.cbfill).attr("style","").data($);v.enter().append("rect").classed(M.cbfill,!0).attr("style",""),v.exit().remove();var x=H.map(ec.c2p).map(Math.round).sort(function(e,t){return e-t});v.each(function(e,i){var a=[0===i?H[0]:($[i]+$[i-1])/2,i===$.length-1?H[1]:($[i]+$[i+1])/2].map(ec.c2p).map(Math.round);o&&(a[1]=s.constrain(a[1]+(a[1]>a[0])?1:-1,x[0],x[1]));var l=r.select(this).attr(o?"x":"y",ei).attr(o?"y":"x",r.min(a)).attr(o?"width":"height",Math.max(K,2)).attr(o?"height":"width",Math.max(r.max(a)-r.min(a),2));if(t._fillgradient)h.gradient(l,n,t._id,o?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var c=W(e).replace("e-","");l.attr("fill",d.hexString(c))}});var _=e.select("."+M.cblines).selectAll("path."+M.cbline).data(U.color&&U.width?X:[]);_.enter().append("path").classed(M.cbline,!0),_.exit().remove(),_.each(function(e){var t=Math.round(ec.c2p(e))+U.width/2%1;r.select(this).attr("d","M"+(o?ei+","+t:t+","+ei)+(o?"h":"v")+K).call(h.lineGroupStyle,U.width,G(e),U.dash)}),eb.selectAll("g."+ec._id+"tick,path").remove();var w=ei+K+(S||0)/2-("outside"===t.ticks),T=a.calcTicks(ec),E=a.getTickSigns(ec)[2];return a.drawTicks(n,ec,{vals:"inside"===ec.ticks?a.clipEnds(ec,T):T,layer:eb,path:a.makeTickPath(ec,w,E),transFn:a.makeTransTickFn(ec)}),a.drawLabels(n,ec,{vals:T,layer:eb,transFn:a.makeTransTickLabelFn(ec),labelFns:a.makeLabelFns(ec,w)})},function(){if(o&&!eu||!o&&eu){var e,i,a=ec.position||0,s=ec._offset+ec._length/2;if("right"===q)i=s,e=B.l+et*a+10+ex*(ec.showticklabels?1:.5);else if(e=s,"bottom"===q&&(i=B.t+er*a+10+(-1===ev.indexOf("inside")?ec.tickfont.size:0)+("inside"!==ec.ticks&&t.ticklen||0)),"top"===q){var l=V.text.split("
").length;i=B.t+er*a+10-K-b*ex*l}eT((o?"h":"v")+ec._id+"title",{avoid:{selection:r.select(n).selectAll("g."+ec._id+"tick"),side:q,offsetTop:o?0:B.t,offsetLeft:o?B.l:0,maxShift:o?j.width:j.height},attributes:{x:e,y:i,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},i.previousPromises,function(){var r,a=K+S/2;-1===ev.indexOf("inside")&&(r=h.bBox(eb.node()),a+=o?r.width:r.height),eg=ey.select("text");var s=0,c=o&&"top"===q,f=!o&&"right"===q,p=0;if(eg.node()&&!eg.classed(M.jsPlaceholder)){var g,y=ey.select(".h"+ec._id+"title-math-group").node();y&&(o&&eu||!o&&!eu)?(s=(r=h.bBox(y)).width,g=r.height):(s=(r=h.bBox(ey.node())).right-B.l-(o?ei:el),g=r.bottom-B.t-(o?el:ei),o||"top"!==q||(a+=r.height,p=r.height)),f&&(eg.attr("transform",l(s/2+ex/2,0)),s*=2),a=Math.max(a,o?s:g)}var v=(o?I:z)*2+a+E+S/2,b=0;!o&&V.text&&"bottom"===P&&O<=0&&(b=v/2,v+=b,p+=b),j._hColorbarMoveTitle=b,j._hColorbarMoveCBTitle=p;var k=E+S,A=(o?ei:el)-k/2-(o?I:0),N=(o?el:ei)-(o?Q:z+p-b);e.select("."+M.cbbg).attr("x",A).attr("y",N).attr(o?"width":"height",Math.max(v-b,2)).attr(o?"height":"width",Math.max(Q+k,2)).call(d.fill,C).call(d.stroke,t.bordercolor).style("stroke-width",E);var U=f?Math.max(s-10,0):0;e.selectAll("."+M.cboutline).attr("x",(o?ei:el+I)+U).attr("y",(o?el+z-Q:ei)+(c?e_:0)).attr(o?"width":"height",Math.max(K,2)).attr(o?"height":"width",Math.max(Q-(o?2*z+e_:2*I+U),2)).call(d.stroke,t.outlinecolor).style({fill:"none","stroke-width":S});var H=o?en*v:0,G=o?0:(1-ea)*v-p;if(H=F?B.l-H:-H,G=R?B.t-G:-G,e.attr("transform",l(H,G)),!o&&(E||d.opacity(C)&&!d.equals(j.paper_bgcolor,C))){var W=eb.selectAll("text"),Y=W[0].length,Z=e.select("."+M.cbbg).node(),$=h.bBox(Z),X=h.getTranslate(e);W.each(function(e,t){var r=Y-1;if(0===t||t===r){var i,n=h.bBox(this),a=h.getTranslate(this);if(t===r){var o=n.right+a.x;(i=$.right+X.x+el-E-2+D-o)>0&&(i=0)}else if(0===t){var s=n.left+a.x;(i=$.left+X.x+el+E+2-s)<0&&(i=0)}i&&(Y<3?this.setAttribute("transform","translate("+i+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var J={},ee=_[L],et=w[L],er=_[P],eo=w[P],es=v-K;o?("pixels"===m?(J.y=O,J.t=Q*er,J.b=Q*eo):(J.t=J.b=0,J.yt=O+u*er,J.yb=O-u*eo),"pixels"===T?(J.x=D,J.l=v*ee,J.r=v*et):(J.l=es*ee,J.r=es*et,J.xl=D-x*ee,J.xr=D+x*et)):("pixels"===m?(J.x=D,J.l=Q*ee,J.r=Q*et):(J.l=J.r=0,J.xl=D+u*ee,J.xr=D-u*et),"pixels"===T?(J.y=1-O,J.t=v*er,J.b=v*eo):(J.t=es*er,J.b=es*eo,J.yt=O-x*er,J.yb=O+x*eo));var eh=t.y<.5?"b":"t",ed=t.x<.5?"l":"r";n._fullLayout._reservedMargin[t._id]={};var ef={r:j.width-A-H,l:A+J.r,b:j.height-N-G,t:N+J.b};F&&R?i.autoMargin(n,t._id,J):F?n._fullLayout._reservedMargin[t._id][eh]=ef[eh]:R||o?n._fullLayout._reservedMargin[t._id][ed]=ef[ed]:n._fullLayout._reservedMargin[t._id][eh]=ef[eh]}],n)}(I,t,e);z&&z.then&&(e._promises||[]).push(z),e._context.edits.colorbarPosition&&(m=I,x=t,T=e,L="v"===x.orientation,P=T._fullLayout._size,o.init({element:m.node(),gd:T,prepFn:function(){S=m.attr("transform"),u(m)},moveFn:function(e,t){m.attr("transform",S+l(e,t)),E=o.align((L?x._uFrac:x._vFrac)+e/P.w,L?x._thickFrac:x._lenFrac,0,1,x.xanchor),C=o.align((L?x._vFrac:1-x._uFrac)-t/P.h,L?x._lenFrac:x._thickFrac,0,1,x.yanchor),u(m,o.getCursor(E,C,x.xanchor,x.yanchor))},doneFn:function(){if(u(m),void 0!==E&&void 0!==C){var e={};e[x._propPrefix+"x"]=E,e[x._propPrefix+"y"]=C,void 0!==x._traceIndex?n.call("_guiRestyle",T,e,x._traceIndex):n.call("_guiRelayout",T,e)}}}))}),t.exit().each(function(t){i.autoMargin(e,t._id)}).remove(),t.order()}}}}),ad=p({"src/components/colorbar/index.js"(e,t){t.exports={moduleType:"component",name:"colorbar",attributes:tU(),supplyDefaults:tJ(),draw:ah().draw,hasColorbar:tH()}}}),af=p({"src/components/legend/index.js"(e,t){t.exports={moduleType:"component",name:"legend",layoutAttributes:rm(),supplyLayoutDefaults:ry(),draw:rk(),style:rM()}}}),ap=p({"src/locale-en.js"(e,t){t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{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"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}}}),am=p({"src/locale-en-us.js"(e,t){t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}}),ag=p({"src/snapshot/cloneplot.js"(e,t){var r=eQ(),i=tv(),n=i.extendFlat,a=i.extendDeep;function o(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}t.exports=function(e,t){var i,s=e.data,l=e.layout,c=a([],s),u=a({},l,o(t.tileClass));if(e._context,t.width&&(u.width=t.width),t.height&&(u.height=t.height),"thumbnail"===t.tileClass||"themes__thumb"===t.tileClass){u.annotations=[];var h=Object.keys(u);for(i=0;i-1&&(u[h[i]].title={text:""});for(i=0;i=0)return e}else if("string"==typeof e&&"%"===(e=e.trim()).slice(-1)&&r(e.slice(0,-1))&&(e=+e.slice(0,-1))>=0)return e+"%"}function f(e,t,r,n,a,o){var s=!1!==(o=o||{}).moduleHasSelected,l=!1!==o.moduleHasUnselected,c=!1!==o.moduleHasConstrain,u=!1!==o.moduleHasCliponaxis,d=!1!==o.moduleHasTextangle,f=!1!==o.moduleHasInsideanchor,p=!!o.hasPathbar,m=Array.isArray(a)||"auto"===a,g=m||"inside"===a,y=m||"outside"===a;if(g||y){var v=h(n,"textfont",r.font),x=i.extendFlat({},v),b=!(e.textfont&&e.textfont.color);if(b&&delete x.color,h(n,"insidetextfont",x),p){var _=i.extendFlat({},v);b&&delete _.color,h(n,"pathbar.textfont",_)}y&&h(n,"outsidetextfont",v),s&&n("selected.textfont.color"),l&&n("unselected.textfont.color"),c&&n("constraintext"),u&&n("cliponaxis"),d&&n("textangle"),n("texttemplate"),n("texttemplatefallback")}g&&f&&n("insidetextanchor")}t.exports={supplyDefaults:function(e,t,r,c){function h(r,n){return i.coerce(e,t,u,r,n)}if(!o(e,t,c,h)){t.visible=!1;return}s(e,t,c,h),h("xhoverformat"),h("yhoverformat"),h("zorder"),h("orientation",t.x&&!t.y?"h":"v"),h("base"),h("offset"),h("width"),h("text"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback");var d=h("textposition");f(e,t,c,h,d,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),l(e,t,h,r,c);var p=(t.marker.line||{}).color,m=a.getComponentMethod("errorbars","supplyDefaults");m(e,t,p||n.defaultLine,{axis:"y"}),m(e,t,p||n.defaultLine,{axis:"x",inherit:"y"}),i.coerceSelectionMarkerOpacity(t,h)},crossTraceDefaults:function(e,t){var r,n;function a(e,t){return i.coerce(n._input,n,u,e,t)}for(var o=0;o0&&!d[y]&&(h=!0)),d[y]=!0,g.visible&&"histogram"===g.type&&"category"!==i.getFromId({_fullLayout:t},g["v"===g.orientation?"xaxis":"yaxis"]).type&&(u=!0)}}c?("overlay"!==f&&l("barnorm"),l("bargap",u&&!h?0:.2),l("bargroupgap"),t.barcornerradius=o(l("barcornerradius"))):delete t.barmode}}}),aA=p({"src/traces/bar/arrays_to_calcdata.js"(e,t){var r=tv();t.exports=function(e,t){for(var i=0;ia))return t}return void 0!==i?i:e.dflt},e.coerceColor=function(e,r,i){return t.isValid(r)?r:void 0!==i?i:e.dflt},e.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t*=1),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},e.getValue=function(e,t){var r;return i(e)?t1||0===n.bargap&&0===n.bargroupgap&&!e[0].trace.marker.line.width)&&r.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(t){f(r.select(this),t[0].trace,e)}),o.getComponentMethod("errorbars","style")(t)},styleTextPoints:p,styleOnSelect:function(e,t,i){var s,l,c,u,h,d,p=t[0].trace;p.selectedpoints?(s=i,l=p,c=e,n.selectedPointStyle(s.selectAll("path"),l),u=s.selectAll("text"),h=l,d=c,u.each(function(e){var t,i=r.select(this);if(e.selected){t=a.ensureUniformFontSize(d,m(i,e,h,d));var o=h.selected.textfont&&h.selected.textfont.color;o&&(t.color=o),n.font(i,t)}else n.selectedTextStyle(i,h)})):(f(i,p,e),o.getComponentMethod("errorbars","style")(i))},getInsideTextFont:y,getOutsideTextFont:v,getBarColor:b,resizeText:s}}}),aP=p({"src/traces/bar/plot.js"(e,t){var r=T(),i=C(),n=tv(),a=tF(),o=ee(),s=t9(),l=eQ(),c=rn().tickText,u=aE(),h=u.recordMinTextSize,d=u.clearMinTextSize,f=aL(),p=aC(),m=i5(),g=a_(),y=g.text,v=g.textposition,x=t6().appendArrayPointValue,b=m.TEXTPAD;function _(e){return e.id}function w(e,t,r,i){var n;return!t.uniformtext.mode&&M(r)?(i&&(n=i()),e.transition().duration(r.duration).ease(r.easing).each("end",function(){n&&n()}).each("interrupt",function(){n&&n()})):e}function M(e){return e&&e.duration>0}function k(e,t,r,i,n){return!(e<0)&&!(t<0)&&(r<=e&&i<=t||r<=t&&i<=e||(n?e>=t/i*r:t>=e/r*i))}function A(e){return"auto"===e?0:e}function S(e,t){var r=Math.PI/180*t,i=Math.abs(Math.sin(r)),n=Math.abs(Math.cos(r));return{x:e.width*n+e.height*i,y:e.width*i+e.height*n}}function E(e,t,r,i,n,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor,u="end"===c,h="start"===c,d=((a.leftToRight||0)+1)/2,f=1-d,p=a.hasB,m=a.r,g=a.overhead,y=n.width,v=n.height,x=Math.abs(t-e),_=Math.abs(i-r),w=x>2*b&&_>2*b?b:0;x-=2*w,_-=2*w;var T=A(l);"auto"===l&&!(y<=x&&v<=_)&&(y>x||v>_)&&(!(y>_||v>x)||yb){var C,L,P,I,z,D,O,R,F,j,B,N,U,V,q,H,G,W=(C=e,L=t,P=r,I=i,z=E,D=m,O=g,R=o,F=p,V=Math.max(0,Math.abs(L-C)-2*b),q=Math.max(0,Math.abs(I-P)-2*b),H=D-b,G=O?H-Math.sqrt(H*H-(H-O)*(H-O)):H,z.y/z.x>=q/(V-(F?2*H:R?H-O:2*G))?N=q/z.y:z.y/z.x<=(q-(F?2*H:R?2*G:H-O))/V?N=V/z.x:!F&&R?(j=z.x*z.x+z.y*z.y/4,N=(-(B=-2*z.x*(V-H)-z.y*(q/2-H))+Math.sqrt(B*B-4*j*((V-H)*(V-H)+(q/2-H)*(q/2-H)-H*H)))/(2*j)):F?(j=(z.x*z.x+z.y*z.y)/4,N=(-(B=-z.x*(V/2-H)-z.y*(q/2-H))+Math.sqrt(B*B-4*j*((V/2-H)*(V/2-H)+(q/2-H)*(q/2-H)-H*H)))/(2*j)):(j=z.x*z.x/4+z.y*z.y,N=(-(B=-z.x*(V/2-H)-2*z.y*(q-H))+Math.sqrt(B*B-4*j*((V/2-H)*(V/2-H)+(q-H)*(q-H)-H*H)))/(2*j)),N=Math.min(1,N),U=R?Math.max(0,H-Math.sqrt(Math.max(0,H*H-(H-(q-z.y*N)/2)*(H-(q-z.y*N)/2)))-O):Math.max(0,H-Math.sqrt(Math.max(0,H*H-(H-(V-z.x*N)/2)*(H-(V-z.x*N)/2)))-O),{scale:N,pad:U});M=W.scale,k=W.pad}else M=1,s&&(M=Math.min(1,x/E.x,_/E.y)),k=0;var Y=n.left*f+n.right*d,Z=(n.top+n.bottom)/2,$=(e+b)*f+(t-b)*d,X=(r+i)/2,K=0,J=0;if(h||u){var Q=(o?E.x:E.y)/2;m&&(u||p)&&(w+=k);var ee=o?eo.opacity(Q)||J>.01?W:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?W(e):e>t?Math.ceil(e):Math.floor(e)};e._context.staticPlot||(D=Y(D,U,B),U=Y(U,D,B),V=Y(V,q,!B),q=Y(q,V,!B));var Z,$,X,K,J,Q,ee,et=B?C.c2p:L.c2p;ee=u.s0>0?u._sMax:u.s0<0?u._sMin:u.s1>0?u._sMax:u._sMin;var er,ei,en=R||O?function(e,t){if(!e)return 0;var r=Math.abs(B?q-V:U-D),i=Math.abs(B?U-D:q-V),n=Y(Math.abs(et(ee,!0)-et(0,!0))),a=u.hasB?Math.min(r/2,i/2):Math.min(r/2,n);return Y(Math.max(Math.min("%"===t?Math.min(50,e)/100*r:e,a),0))}(m.cornerradiusvalue,m.cornerradiusform):0,ea="M"+D+","+V+"V"+q+"H"+U+"V"+V+"Z",eo=0;if(en&&u.s){var es,el,ec,eu=0==((es=u.s0)>0)-(es<0)||((el=u.s)>0)-(el<0)==((ec=u.s0)>0)-(ec<0)?u.s1:u.s0;if((eo=Y(u.hasB?0:Math.abs(et(ee,!0)-et(eu,!0))))0?Math.sqrt(eo*(2*en-eo)):0,eg=eh>0?Math.max:Math.min;er="M"+D+","+V+"V"+(q-ep*ed)+"H"+eg(U-(en-eo)*eh,D)+"A "+en+","+en+" 0 0 "+ef+" "+U+","+(q-en*ed-em)+"V"+(V+en*ed+em)+"A "+en+","+en+" 0 0 "+ef+" "+eg(U-(en-eo)*eh,D)+","+(V+ep*ed)+"Z"}else if(u.hasB)er="M"+(D+en*eh)+","+V+"A "+en+","+en+" 0 0 "+ef+" "+D+","+(V+en*ed)+"V"+(q-en*ed)+"A "+en+","+en+" 0 0 "+ef+" "+(D+en*eh)+","+q+"H"+(U-en*eh)+"A "+en+","+en+" 0 0 "+ef+" "+U+","+(q-en*ed)+"V"+(V+en*ed)+"A "+en+","+en+" 0 0 "+ef+" "+(U-en*eh)+","+V+"Z";else{var ey=(ei=Math.abs(q-V)+eo)0?Math.sqrt(eo*(2*en-eo)):0,ex=ed>0?Math.max:Math.min;er="M"+(D+ey*eh)+","+V+"V"+ex(q-(en-eo)*ed,V)+"A "+en+","+en+" 0 0 "+ef+" "+(D+en*eh-ev)+","+q+"H"+(U-en*eh+ev)+"A "+en+","+en+" 0 0 "+ef+" "+(U-ey*eh)+","+ex(q-(en-eo)*ed,V)+"V"+V+"Z"}}else er=ea}else er=ea;var eb=w(n.ensureSingle(M,"path"),P,g,T);if(eb.style("vector-effect",I?"none":"non-scaling-stroke").attr("d",isNaN((U-D)*(q-V))||H&&e._context.staticPlot?"M0,0Z":er).call(s.setClipUrl,t.layerClipId,e),!P.uniformtext.mode&&N){var e_=s.makePointStyleFns(d);s.singlePointStyle(u,eb,d,e_,e)}(function(e,t,r,i,o,l,u,d,m,g,_,T,M){var C,L,P,I,z,D,O,R,F,j,B,N,U,V,q,H,G,W,Y,Z,$,X,K,J,Q,ee,et=t.xaxis,er=t.yaxis,ei=e._fullLayout;function en(t,r,i){return n.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+ee,"text-anchor":"middle","data-notex":1}).call(s.font,i).call(a.convertToTspans,e)}var ea=i[0].trace,eo="h"===ea.orientation,es=function(e,t,r,i){for(var n=!1,a=!1,o=0;o0?n=!0:s<0&&(a=!0),n&&a)return 0}var l=t?r:i,c=-(l.range[0]1;g("percent initial")&&(h=n.formatPercent(f.begR),b&&(h+=" of initial"),m.push(h)),g("percent previous")&&(h=n.formatPercent(f.difR),b&&(h+=" of previous"),m.push(h)),g("percent total")&&(h=n.formatPercent(f.sumR),b&&(h+=" of total"),m.push(h))}return m.join("
")}(e_,ew,eT,eM):p.getValue(eA.text,ew),p.coerceString(y,ek));eS=ea,eE=o,eC=p.getValue(eS.textposition,eE),ee=p.coerceEnumerated(v,eC);var ec="stack"===T.mode||"relative"===T.mode,eu=i[o],eh=!ec||eu._outmost,ed=eu.hasB,ef=g&&g-_>b;if(!el||"none"===ee||(eu.isBlank||l===u||d===m)&&("auto"===ee||"inside"===ee))return r.select("text").remove();var ep=ei.font,em=f.getBarColor(i[o],ea),eg=f.getInsideTextFont(ea,o,ep,em),ey=f.getOutsideTextFont(ea,o,ep),ev=ea.insidetextanchor||"end",ex=r.datum();eo?"log"===et.type&&ex.s0<=0&&(l=et.range[0]0&&ez>0;eF=ef?ed?k(eO-2*g,eR,eI,ez,eo)||k(eO,eR-2*g,eI,ez,eo):eo?k(eO-(g-_),eR,eI,ez,eo)||k(eO,eR-2*(g-_),eI,ez,eo):k(eO,eR-(g-_),eI,ez,eo)||k(eO-2*(g-_),eR,eI,ez,eo):k(eO,eR,eI,ez,eo),ej&&eF?ee="inside":(ee="outside",eL.remove(),eL=null)}else ee="inside";if(!eL){var eB=(eL=en(r,el,eD=n.ensureUniformFontSize(e,"outside"===ee?ey:eg))).attr("transform");if(eL.attr("transform",""),eI=(eP=s.bBox(eL.node())).width,ez=eP.height,eL.attr("transform",eB),eI<=0||ez<=0)return eL.remove()}var eN,eU=ea.textangle;(eN="outside"===ee?(C=l,L=u,P=d,I=m,z=eP,R=!!(D={isHorizontal:eo,constrained:"both"===ea.constraintext||"outside"===ea.constraintext,angle:eU,zeroBarDir:es}).isHorizontal,F=!!D.constrained,j=D.angle||0,B=z.width,N=z.height,U=Math.abs(L-C),V=Math.abs(I-P),O=R?V>2*b?b:0:U>2*b?b:0,q=1,F&&(q=R?Math.min(1,V/N):Math.min(1,U/B)),W=S(z,G=A(j)),Y=(R?W.x:W.y)/2,Z=(z.left+z.right)/2,$=(z.top+z.bottom)/2,X=(C+L)/2,K=(P+I)/2,J=0,Q=0,H=(R?C===L:P===I)&&D.zeroBarDir?D.zeroBarDir:R?L0?t+=r:u<0&&(t-=r)}return t}function z(e){var t=u,i=e.b,n=I(e);return r.inbox(i-t,n-t,_+(n-t)/(n-i)-1)}var D=e[h+"a"],O=e[d+"a"];m=Math.abs(D.r2c(D.range[1])-D.r2c(D.range[0]));var R=r.getDistanceFunction(n,f,p,function(e){return(f(e)+p(e))/2});if(r.getClosest(g,R,e),!1!==e.index&&g[e.index].p!==l){x||T||(E=function(e){return Math.min(M(e),e.p-v.bargroupwidth/2)},C=function(e){return Math.max(k(e),e.p+v.bargroupwidth/2)});var F,j,B,N=g[e.index],U=y.base?N.b+N.s:N.s;e[d+"0"]=e[d+"1"]=O.c2p(N[d],!0),e[d+"LabelVal"]=U;var V=v.extents[v.extents.round(N.p)];e[h+"0"]=D.c2p(x?E(N):V[0],!0),e[h+"1"]=D.c2p(x?C(N):V[1],!0);var q=void 0!==N.orig_p;return e[h+"LabelVal"]=q?N.orig_p:N.p,e.labelLabel=s(D,e[h+"LabelVal"],y[h+"hoverformat"]),e.valueLabel=s(O,e[d+"LabelVal"],y[d+"hoverformat"]),e.baseLabel=s(O,N.b,y[d+"hoverformat"]),F=u,j=N.b,B=I(N),e.spikeDistance=(r.inbox(j-F,B-F,w+(B-F)/(B-j)-1)+L(M(N),k(N),w))/2,e[h+"Spike"]=D.c2p(N.p,!0),a(N,y,e),e.hovertemplate=y.hovertemplate,e}}function u(e,t){var r=t.mcc||e.marker.color,i=t.mlcc||e.marker.line.color,a=o(e,t);return n.opacity(r)?r:n.opacity(i)&&a?i:void 0}t.exports={hoverPoints:function(e,t,r,n,a){var o=c(e,t,r,n,a);if(o){var s=o.cd,l=s[0].trace,h=s[o.index];return o.color=u(l,h),i.getComponentMethod("errorbars","hoverInfo")(h,l,o),[o]}},hoverOnBars:c,getTraceColor:u}}}),az=p({"src/traces/bar/event_data.js"(e,t){t.exports=function(e,t,r){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),"h"===r.orientation?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}}}),aD=p({"src/traces/bar/select.js"(e,t){t.exports=function(e,t){var r,i=e.cd,n=e.xaxis,a=e.yaxis,o=i[0].trace,s="funnel"===o.type,l="h"===o.orientation,c=[];if(!1===t)for(r=0;r0?(g="v",y=x>0?Math.min(_,b):Math.min(b)):x>0?(g="h",y=Math.min(_)):y=0;if(!y){t.visible=!1;return}t._length=y;var S=n("orientation",g);t._hasPreCompStats?"v"===S&&0===x?(n("x0",0),n("dx",1)):"h"===S&&0===v&&(n("y0",0),n("dy",1)):"v"===S&&0===x?n("x0"):"h"===S&&0===v&&n("y0"),i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],a)}function u(e,t,i,n){var a=n.prefix,o=r.coerce2(e,t,l,"marker.outliercolor"),s=i("marker.line.outliercolor"),c="outliers";t._hasPreCompStats?c="all":(o||s)&&(c="suspectedoutliers");var u=i(a+"points",c);u?(i("jitter",.3*("all"===u)),i("pointpos","all"===u?-1.5:0),i("marker.symbol"),i("marker.opacity"),i("marker.size"),i("marker.angle"),i("marker.color",t.line.color),i("marker.line.color"),i("marker.line.width"),"suspectedoutliers"===u&&(i("marker.line.outliercolor",t.marker.color),i("marker.line.outlierwidth")),i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size"),i("text"),i("hovertext")):delete t.marker;var h=i("hoveron");("all"===h||-1!==h.indexOf("points"))&&(i("hovertemplate"),i("hovertemplatefallback")),r.coerceSelectionMarkerOpacity(t,i)}t.exports={supplyDefaults:function(e,t,i,o){function s(i,n){return r.coerce(e,t,l,i,n)}if(c(e,t,s,o),!1!==t.visible){a(e,t,o,s),s("xhoverformat"),s("yhoverformat");var h=t._hasPreCompStats;h&&(s("lowerfence"),s("upperfence")),s("line.color",(e.marker||{}).color||i),s("line.width"),s("fillcolor",n.addOpacity(t.line.color,.5));var d=!1;if(h){var f=s("mean"),p=s("sd");f&&f.length&&(d=!0,p&&p.length&&(d="sd"))}s("whiskerwidth");var m,g=s("sizemode");"quartiles"===g&&(m=s("boxmean",d)),s("showwhiskers","quartiles"===g),("sd"===g||"sd"===m)&&s("sdmultiple"),s("width"),s("quartilemethod");var y=!1;if(h){var v=s("notchspan");v&&v.length&&(y=!0)}else r.validate(e.notchwidth,l.notchwidth)&&(y=!0);s("notched",y)&&s("notchwidth"),u(e,t,s,{prefix:"box"}),s("zorder")}},crossTraceDefaults:function(e,t){var i,n;function a(e){return r.coerce(n._input,n,l,e)}for(var s=0;sE.uf};if(t._hasPreCompStats){var U=t[x],V=function(e){return v.d2c((t[e]||[])[l])},q=1/0,H=-1/0;for(l=0;l=E.q1&&E.q3>=E.med){var W,Y=V("lowerfence");E.lf=Y!==o&&Y<=E.q1?Y:d(E,L,P);var Z=V("upperfence");E.uf=Z!==o&&Z>=E.q3?Z:f(E,L,P);var $=V("mean");E.mean=$!==o?$:P?a.mean(L,P):(E.q1+E.q3)/2;var X=V("sd");E.sd=$!==o&&X>=0?X:P?a.stdev(L,P,E.mean):E.q3-E.q1,E.lo=p(E),E.uo=m(E);var K=V("notchspan");K=K!==o&&K>0?K:g(E,P),E.ln=E.med-K,E.un=E.med+K;var J=E.lf,Q=E.uf;t.boxpoints&&L.length&&(J=Math.min(J,L[0]),Q=Math.max(Q,L[P-1])),t.notched&&(J=Math.min(J,E.ln),Q=Math.max(Q,E.un)),E.min=J,E.max=Q}else a.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+E.q1,"median = "+E.med,"q3 = "+E.q3].join(` -`)),W=E.med!==o?E.med:E.q1!==o?E.q3!==o?(E.q1+E.q3)/2:E.q1:E.q3!==o?E.q3:0,E.med=W,E.q1=E.q3=W,E.lf=E.uf=W,E.mean=E.sd=W,E.ln=E.un=W,E.min=E.max=W;q=Math.min(q,E.min),H=Math.max(H,E.max),E.pts2=C.filter(N),A.push(E)}}t._extremes[v._id]=i.findExtremes(v,[q,H],{padded:!0})}else{var ee,et,er=v.makeCalcdata(t,x),ei=function(e,t){for(var r=e.length,i=Array(r+1),n=0;n=0&&eo0){((E={}).pos=E[_]=j[l],C=E.pts=ea[l].sort(u),P=(L=E[x]=C.map(h)).length,E.min=L[0],E.max=L[P-1],E.mean=a.mean(L,P),E.sd=a.stdev(L,P,E.mean)*t.sdmultiple,E.med=a.interp(L,.5),P%2&&(eu||eh))?(eu?(ee=L.slice(0,P/2),et=L.slice(P/2+1)):eh&&(ee=L.slice(0,P/2+1),et=L.slice(P/2)),E.q1=a.interp(ee,.5),E.q3=a.interp(et,.5)):(E.q1=a.interp(L,.25),E.q3=a.interp(L,.75)),E.lf=d(E,L,P),E.uf=f(E,L,P),E.lo=p(E),E.uo=m(E);var ed=g(E,P);E.ln=E.med-ed,E.un=E.med+ed,es=Math.min(es,E.ln),el=Math.max(el,E.un),E.pts2=C.filter(N),A.push(E)}t.notched&&a.isTypedArray(er)&&(er=Array.from(er)),t._extremes[v._id]=i.findExtremes(v,t.notched?er.concat([es,el]):er,{padded:!0})}return function(e,t){if(a.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r0?(A[0].t={num:T[S],dPos:B,posLetter:_,valLetter:x,labels:{med:s(e,"median:"),min:s(e,"min:"),q1:s(e,"q1:"),q3:s(e,"q3:"),max:s(e,"max:"),mean:"sd"===t.boxmean||"sd"===t.sizemode?s(e,"mean \xb1 σ:").replace("σ",1===t.sdmultiple?"σ":t.sdmultiple+"σ"):s(e,"mean:"),lf:s(e,"lower fence:"),uf:s(e,"upper fence:")}},T[S]++,A):[{t:{empty:!0}}]};var l={text:"tx",hovertext:"htx"};function c(e,t,r){for(var i in l)a.isArrayOrTypedArray(t[i])&&(Array.isArray(r)?a.isArrayOrTypedArray(t[i][r[0]])&&(e[l[i]]=t[i][r[0]][r[1]]):e[l[i]]=t[i][r])}function u(e,t){return e.v-t.v}function h(e){return e.v}function d(e,t,r){return 0===r?e.q1:Math.min(e.q1,t[Math.min(a.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,r-1)])}function f(e,t,r){return 0===r?e.q3:Math.max(e.q3,t[Math.max(a.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function p(e){return 4*e.q1-3*e.q3}function m(e){return 4*e.q3-3*e.q1}function g(e,t){return 0===t?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}}}),aV=p({"src/traces/box/cross_trace_calc.js"(e,t){var r=rn(),i=tv(),n=r8().getAxisGroup,a=["v","h"];function o(e,t,a,o){var s,l,c,u=t.calcdata,h=t._fullLayout,d=o._id,f=d.charAt(0),p=[],m=0;for(s=0;s1,b=1-h[e+"gap"],_=1-h[e+"groupgap"];for(s=0;s0;if("positive"===C?(D=w*(E?1:.5),R=V,O=R=M):"negative"===C?(D=R=M,O=w*(E?1:.5),F=V):(D=O=w,R=F=V),H){var G=A.pointpos,W=A.jitter,Y=A.marker.size/2,Z=0;G+W>=0&&((Z=V*(G+W))>D?(q=!0,N=Y,j=Z):Z>R&&(N=Y,j=D)),Z<=D&&(j=D);var $=0;G-W<=0&&(($=-V*(G-W))>O?(q=!0,U=Y,B=$):$>F&&(U=Y,B=O)),$<=O&&(B=O)}else j=D,B=O;var X=Array(c.length);for(l=0;le.lo&&(x.so=!0)}return a});d.enter().append("path").classed("point",!0),d.exit().remove(),d.call(n.translatePoints,o,s)}function s(e,t,n,a){var o,s,l=t.val,c=t.pos,u=!!c.rangebreaks,h=a.bPos,d=a.bPosPxOffset||0,f=n.boxmean||(n.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var p=e.selectAll("path.mean").data("box"===n.type&&n.boxmean||"violin"===n.type&&n.box.visible&&n.meanline.visible?i.identity:[]);p.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),p.exit().remove(),p.each(function(e){var t=c.c2l(e.pos+h,!0),i=c.l2p(t-o)+d,a=c.l2p(t+s)+d,p=u?(i+a)/2:c.l2p(t)+d,m=l.c2p(e.mean,!0),g=l.c2p(e.mean-e.sd,!0),y=l.c2p(e.mean+e.sd,!0);"h"===n.orientation?r.select(this).attr("d","M"+m+","+i+"V"+a+("sd"===f?"m0,0L"+g+","+p+"L"+m+","+i+"L"+y+","+p+"Z":"")):r.select(this).attr("d","M"+i+","+m+"H"+a+("sd"===f?"m0,0L"+p+","+g+"L"+i+","+m+"L"+p+","+y+"Z":""))})}t.exports={plot:function(e,t,n,l){var c=e._context.staticPlot,u=t.xaxis,h=t.yaxis;i.makeTraceGroups(l,n,"trace boxes").each(function(e){var t,i,n=r.select(this),l=e[0],d=l.t,f=l.trace;(d.wdPos=d.bdPos*f.whiskerwidth,!0!==f.visible||d.empty)?n.remove():("h"===f.orientation?(t=h,i=u):(t=u,i=h),a(n,{pos:t,val:i},f,d,c),o(n,{x:u,y:h},f,d),s(n,{pos:t,val:i},f,d))})},plotBoxAndWhiskers:a,plotPoints:o,plotBoxMean:s}}}),aH=p({"src/traces/box/style.js"(e,t){var r=T(),i=ee(),n=t9();t.exports={style:function(e,t,a){var o=a||r.select(e).selectAll("g.trace.boxes");o.style("opacity",function(e){return e[0].trace.opacity}),o.each(function(t){var a=r.select(this),o=t[0].trace,s=o.line.width;function l(e,t,r,n){e.style("stroke-width",t+"px").call(i.stroke,r).call(i.fill,n)}var c=a.selectAll("path.box");if("candlestick"===o.type)c.each(function(e){if(!e.empty){var t=r.select(this),i=o[e.dir];l(t,i.line.width,i.line.color,i.fillcolor),t.style("opacity",o.selectedpoints&&!e.selected?.3:1)}});else{l(c,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(i.stroke,o.line.color);var u=a.selectAll("path.point");n.pointStyle(u,o,e)}})},styleOnSelect:function(e,t,r){var i=t[0].trace,a=r.selectAll("path.point");i.selectedpoints?n.selectedPointStyle(a,i):n.pointStyle(a,i,e)}}}}),aG=p({"src/traces/box/hover.js"(e,t){var r=rn(),i=tv(),n=rD(),a=ee(),o=i.fillText;function s(e,t,o,s){var l,c,u,h,d,f,p,m,g,y,v,x,b,_,w=e.cd,T=e.xa,M=e.ya,k=w[0].trace,A=w[0].t,S="violin"===k.type,E=A.bdPos,C=A.wHover,L=function(e){return h.c2l(e.pos)+A.bPos-h.c2l(p)};S&&"both"!==k.side?("positive"===k.side&&(y=function(e){var t=L(e);return n.inbox(t,t+C,v)},b=E,_=0),"negative"===k.side&&(y=function(e){var t=L(e);return n.inbox(t-C,t,v)},b=0,_=E)):(y=function(e){var t=L(e);return n.inbox(t-C,t+C,v)},b=_=E),l=S?function(e){return n.inbox(e.span[0]-f,e.span[1]-f,v)}:function(e){return n.inbox(e.min-f,e.max-f,v)},"h"===k.orientation?(f=t,p=o,m=l,g=y,c="y",h=M,u="x",d=T):(f=o,p=t,m=y,g=l,c="x",h=T,u="y",d=M);var P=Math.min(1,E/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));function I(e){return(m(e)+g(e))/2}v=e.maxHoverDistance-P,x=e.maxSpikeDistance-P;var z=n.getDistanceFunction(s,m,g,I);if(n.getClosest(w,z,e),!1===e.index)return[];var D=w[e.index],O=k.line.color,R=(k.marker||{}).color;a.opacity(O)&&k.line.width?e.color=O:a.opacity(R)&&k.boxpoints?e.color=R:e.color=k.fillcolor,e[c+"0"]=h.c2p(D.pos+A.bPos-_,!0),e[c+"1"]=h.c2p(D.pos+A.bPos+b,!0),e[c+"LabelVal"]=void 0!==D.orig_p?D.orig_p:D.pos;var F=c+"Spike";e.spikeDistance=I(D)*x/v,e[F]=h.c2p(D.pos,!0);var j=k.boxmean||"sd"===k.sizemode||(k.meanline||{}).visible,B=k.boxpoints||k.points,N=B&&j?["max","uf","q3","med","mean","q1","lf","min"]:B&&!j?["max","uf","q3","med","q1","lf","min"]:!B&&j?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],U=d.range[1]0&&(a=!0);for(var l=0;la){var o=a-i[e];return i[e]=a,o}}return 0},max:function(e,t,i,n){var a=n[t];if(r(a)){if(a=Number(a),!r(i[e]))return i[e]=a,a;else if(i[e]a){var l=d(t,o,s),c=d(r,o,s),u=+(e!==i);return l[u]!==c[u]}return Math.floor(r/e)-Math.floor(t/e)>.1}(u,e,t,s,r,n))l=u;else break}return l}function h(e,t){return t&&e>l?e>a?e>1.1*i?i:e>1.1*n?n:a:e>o?o:e>s?s:l:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function d(e,t,r){var n=t.c2d(e,i,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}t.exports=function(e,t,r,n,o){var s,l,h=-1.1*t,d=-.1*t,f=e-d,p=r[0],m=r[1],g=Math.min(u(p+d,p+f,n,o),u(m+d,m+f,n,o)),y=Math.min(u(p+h,p+d,n,o),u(m+h,m+d,n,o));if(g>y&&ya){var v=s===i?1:6,x=s===i?"M12":"M1";return function(t,r){var a=n.c2d(t,i,o),s=a.indexOf("-",v);s>0&&(a=a.slice(0,s));var u=n.d2c(a,0,o);if(uo.r2l(j)&&(N=a.tickIncrement(N,_.size,!0,p)),D.start=o.l2r(N),F||i.nestedProperty(t,v+".start").set(D.start)}var U=_.end,V=o.r2l(z.end),q=void 0!==V;if((_.endFound||q)&&V!==o.r2l(U)){var H=q?V:i.aggNums(Math.max,null,m);D.end=o.l2r(H),q||i.nestedProperty(t,v+".start").set(D.end)}var G="autobin"+s;return!1===t._input[G]&&(t._input[v]=i.extendFlat({},t[v]||{}),delete t._input[G],delete t[G]),[D,m]}t.exports={calc:function(e,t){var n,p,m,g,y,v=[],x=[],b="h"===t.orientation,_=a.getFromId(e,b?t.yaxis:t.xaxis),w=b?"y":"x",T={x:"y",y:"x"}[w],M=t[w+"calendar"],k=t.cumulative,A=f(e,t,_,w),S=A[0],E=A[1],C="string"==typeof S.size,L=[],P=C?L:S,I=[],z=[],D=[],O=0,R=t.histnorm,F=t.histfunc,j=-1!==R.indexOf("density");k.enabled&&j&&(R=R.replace(/ ?density$/,""),j=!1);var B,N="max"===F||"min"===F?null:0,U=c.count,V=u[R],q=!1,H=function(e){return _.r2c(e,0,M)};for(i.isArrayOrTypedArray(t[T])&&"count"!==F&&(B=t[T],q="avg"===F,U=c[F]),p=H(S.start),g=H(S.end)+(p-a.tickIncrement(p,S.size,!1,M))/1e6;p=0&&y=0;i--)s(i);else if("increasing"===t){for(i=1;i=0;i--)e[i]+=e[i+1];"exclude"===r&&(e.push(0),e.shift())}}(x,k.direction,k.currentbin);var Q=Math.min(v.length,x.length),ee=[],et=0,er=Q-1;for(p=0;p=et;p--)if(x[p]){er=p;break}for(p=et;p<=er;p++)if(r(v[p])&&r(x[p])){var ei={p:v[p],s:x[p],b:0};k.enabled||(ei.pts=D[p],Z?ei.ph0=ei.ph1=D[p].length?E[D[p][0]]:v[p]:(t._computePh=!0,ei.ph0=n(L[p]),ei.ph1=n(L[p+1],!0))),ee.push(ei)}return 1===ee.length&&(ee[0].width1=a.tickIncrement(ee[0].p,S.size,!1,M)-ee[0].p),o(t,"marker")&&s(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),o(t,"marker.line")&&s(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),l(ee,t),i.isArrayOrTypedArray(t.selectedpoints)&&i.tagSelected(ee,t,K),ee},calcAllAutoBins:f}}}),a6=p({"src/traces/histogram2d/calc.js"(e,t){var r=tv(),i=rn(),n=a1(),a=a2(),o=a3(),s=a5(),l=a4().calcAllAutoBins;function c(e,t,r,i){var n,a=Array(e);if(i)for(n=0;nC&&k.splice(C,k.length-C),E.length>C&&E.splice(C,E.length-C);var L=[],P=[],I=[],z="string"==typeof M.size,D="string"==typeof S.size,O=[],R=[],F=z?O:M,j=D?R:S,B=0,N=[],U=[],V=t.histnorm,q=t.histfunc,H=-1!==V.indexOf("density"),G="max"===q||"min"===q?null:0,W=n.count,Y=a[V],Z=!1,$=[],X=[],K="z"in t?t.z:"marker"in t&&Array.isArray(t.marker.color)?t.marker.color:"";K&&"count"!==q&&(Z="avg"===q,W=n[q]);var J=M.size,Q=_(M.start),ee=_(M.end)+(Q-i.tickIncrement(Q,J,!1,x))/1e6;for(f=Q;f=0&&m=0&&gm&&(y=Math.max(y,Math.abs(e[a][o]-p)/(g-m))))}return y}t.exports=function(e,t){var i,a=1;for(n(e,t),i=0;i.01;i++)a=n(e,t,.5-.25*Math.min(1,.5*a));return a>.01&&r.log("interp2d didn't converge quickly",a),e}}}),oe=p({"src/traces/heatmap/find_empties.js"(e,t){var r=tv().maxRowLength;t.exports=function(e){var t,i,n,a,o,s,l,c,u=[],h={},d=[],f=e[0],p=[],m=[0,0,0],g=r(e);for(i=0;i=0;o--)(s=((h[[(i=(a=d[o])[0])-1,n=a[1]]]||m)[2]+(h[[i+1,n]]||m)[2]+(h[[i,n-1]]||m)[2]+(h[[i,n+1]]||m)[2])/20)&&(l[a]=[i,n,s],d.splice(o,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(a in l)h[a]=l[a],u.push(l[a])}return u.sort(function(e,t){return t[2]-e[2]})}}}),ot=p({"src/traces/heatmap/make_bound_array.js"(e,t){var r=eQ(),i=tv().isArrayOrTypedArray;t.exports=function(e,t,n,a,o,s){var l,c,u,h=[],d=r.traceIs(e,"contour"),f=r.traceIs(e,"histogram");if(i(t)&&t.length>1&&!f&&"category"!==s.type){var p=t.length;if(!(p<=o))return d?t.slice(0,o):t.slice(0,o+1);if(d)h=Array.from(t).slice(0,o);else if(1===o)h="log"===s.type?[.5*t[0],2*t[0]]:[t[0]-.5,t[0]+.5];else if("log"===s.type){for(h=[Math.pow(t[0],1.5)/Math.pow(t[1],.5)],u=1;u1){var t=(e[e.length-1]-e[0])/(e.length-1),r=Math.abs(t/100);for(M=0;Mr)return!1}return!0}(A.rangebreaks||S.rangebreaks)&&(T=function(e,t,r){for(var i=[],n=-1,a=0;a0;)T=M.c2p(j[C]),C--;for(T0;)E=k.c2p(B[C]),C--;E=M._length||T<=0||S>=k._length||E<=0){I.selectAll("image").data([]).exit().remove(),v(I);return}"fast"===Z?(Q=G,ee=H):(Q=X,ee=K);var J=document.createElement("canvas");J.width=Q,J.height=ee;var Q,ee,et,er,ei=J.getContext("2d",{willReadFrequently:!0}),en=h(D,{noNumericCheck:!0,returnArray:!0});"fast"===Z?(et=W?function(e){return G-1-e}:o.identity,er=Y?function(e){return H-1-e}:o.identity):(et=function(e){return o.constrain(Math.round(M.c2p(j[e])-w),0,X)},er=function(e){return o.constrain(Math.round(k.c2p(B[e])-S),0,K)});var ea,eo,es,el,ec=er(0),eu=[ec,ec],eh=+!W,ed=+!Y,ef=0,ep=0,em=0,eg=0;function ey(e,t=0){if(void 0===e)return[0,0,0,0];var r=en(e);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),ef+=t,ep+=r[0]*t,em+=r[1]*t,eg+=r[2]*t,r}if("default"!==Z){var ev,ex=0;try{ev=new Uint8Array(Q*ee*4)}catch{ev=Array(Q*ee*4)}if("smooth"===Z){var eb,e_,ew,eT=N||j,eM=U||B,ek=Array(eT.length),eA=Array(eM.length),eS=Array(X),eE=N?b:x,eC=U?b:x;for(C=0;CeW||eW>k._length))for(L=eq;Le$||e$>M._length)){var eX=l({x:eZ,y:eY},D,e._fullLayout);eX.x=eZ,eX.y=eY;var eK=z.z[C][L];void 0===eK?(eX.z="",eX.zLabel=""):(eX.z=eK,eX.zLabel=a.tickText(ej,eK,"hover").text);var eJ=z.text&&z.text[C]&&z.text[C][L];(void 0===eJ||!1===eJ)&&(eJ=""),eX.text=eJ;var eQ=o.texttemplateString({data:[eX,D._meta],fallback:D.texttemplatefallback,labels:eX,locale:e._fullLayout._d3locale,template:eR});if(eQ){var e0=eQ.split("
"),e1=e0.length,e2=0;for(P=0;P=_[0].length||f<0||f>_.length)return}else{if(r.inbox(t-x[0],t-x[x.length-1],0)>0||r.inbox(s-b[0],s-b[b.length-1],0)>0)return;if(p){for(A=[2*x[0]-x[1]],E=1;E=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),oS=p({"src/traces/contour/attributes.js"(e,t){var r=aX(),i=ix(),n=tB(),a=n.axisHoverFormat,o=n.descriptionOnlyNumbers,s=tV(),l=eH().dash,c=H(),u=q().extendFlat,h=oA(),d=h.COMPARISON_OPS2,f=h.INTERVAL_OPS,p=i.line;t.exports=u({z:r.z,x:r.x,x0:r.x0,dx:r.dx,y:r.y,y0:r.y0,dy:r.dy,xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:i.xperiod0,yperiod0:i.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,text:r.text,hovertext:r.hovertext,transpose:r.transpose,xtype:r.xtype,ytype:r.ytype,xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:r.hovertemplate,hovertemplatefallback:r.hovertemplatefallback,texttemplate:u({},r.texttemplate,{}),texttemplatefallback:r.texttemplatefallback,textfont:u({},r.textfont,{}),hoverongaps:r.hoverongaps,connectgaps:u({},r.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:c({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:o("contour label")},operation:{valType:"enumerated",values:[].concat(d).concat(f),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:u({},p.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:l,smoothing:u({},p.smoothing,{}),editType:"plot"},zorder:i.zorder},s("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),oE=p({"src/traces/histogram2dcontour/attributes.js"(e,t){var r=ob(),i=oS(),n=tV(),a=tB().axisHoverFormat,o=q().extendFlat;t.exports=o({x:r.x,y:r.y,z:r.z,marker:r.marker,histnorm:r.histnorm,histfunc:r.histfunc,nbinsx:r.nbinsx,xbins:r.xbins,nbinsy:r.nbinsy,ybins:r.ybins,autobinx:r.autobinx,autobiny:r.autobiny,bingroup:r.bingroup,xbingroup:r.xbingroup,ybingroup:r.ybingroup,autocontour:i.autocontour,ncontours:i.ncontours,contours:i.contours,line:{color:i.line.color,width:o({},i.line.width,{dflt:.5}),dash:i.line.dash,smoothing:i.line.smoothing,editType:"plot"},xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:r.hovertemplate,hovertemplatefallback:r.hovertemplatefallback,texttemplate:i.texttemplate,texttemplatefallback:i.texttemplatefallback,textfont:i.textfont},n("",{cLetter:"z",editTypeOverride:"calc"}))}}),oC=p({"src/traces/contour/contours_defaults.js"(e,t){t.exports=function(e,t,r,i){var n=i("contours.start"),a=i("contours.end"),o=r("contours.size");((!1===n||!1===a?t.autocontour=!0:r("autocontour",!1))||!o)&&r("ncontours")}}}),oL=p({"src/traces/contour/label_defaults.js"(e,t){var r=tv();t.exports=function(e,t,i,n){if(n||(n={}),e("contours.showlabels")){var a=t.font;r.coerceFont(e,"contours.labelfont",a,{overrideDflt:{color:i}}),e("contours.labelformat")}!1!==n.hasHover&&e("zhoverformat")}}}),oP=p({"src/traces/contour/style_defaults.js"(e,t){var r=tQ(),i=oL();t.exports=function(e,t,n,a,o){var s,l=n("contours.coloring"),c="";"fill"===l&&(s=n("contours.showlines")),!1!==s&&("lines"!==l&&(c=n("line.color","#000")),n("line.width",.5),n("line.dash")),"none"!==l&&(!0!==e.showlegend&&(t.showlegend=!1),t._dfltShowLegend=!1,r(e,t,a,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),i(n,a,c,o)}}}),oI=p({"src/traces/histogram2dcontour/defaults.js"(e,t){var r=tv(),i=o_(),n=oC(),a=oP(),o=aJ(),s=oE();t.exports=function(e,t,l,c){function u(i,n){return r.coerce(e,t,s,i,n)}i(e,t,u,c),!1!==t.visible&&(n(e,t,u,function(i){return r.coerce2(e,t,s,i)}),a(e,t,u,c),u("xhoverformat"),u("yhoverformat"),u("hovertemplate"),u("hovertemplatefallback"),t.contours&&"heatmap"===t.contours.coloring&&o(u,c))}}}),oz=p({"src/traces/contour/set_contours.js"(e,t){var r=rn(),i=tv();function n(e,t,i){var n={type:"linear",range:[e,t]};return r.autoTicks(n,(t-e)/(i||15)),n}t.exports=function(e,t){var a=e.contours;if(e.autocontour){var o=e.zmin,s=e.zmax;(e.zauto||void 0===o)&&(o=i.aggNums(Math.min,null,t)),(e.zauto||void 0===s)&&(s=i.aggNums(Math.max,null,t));var l=n(o,s,e.ncontours);a.size=l.dtick,a.start=r.tickFirst(l),l.range.reverse(),a.end=r.tickFirst(l),a.start===o&&(a.start+=a.size),a.end===s&&(a.end-=a.size),a.start>a.end&&(a.start=a.end=(a.start+a.end)/2),e._input.contours||(e._input.contours={}),i.extendFlat(e._input.contours,{start:a.start,end:a.end,size:a.size}),e._input.autocontour=!0}else if("constraint"!==a.type){var c=a.start,u=a.end,h=e._input.contours;c>u&&(a.start=h.start=u,u=a.end=h.end=c,c=a.start),a.size>0||(h.size=a.size=c===u?1:n(c,u,e.ncontours).dtick)}}}}),oD=p({"src/traces/contour/end_plus.js"(e,t){t.exports=function(e){return e.end+e.size/1e6}}}),oO=p({"src/traces/contour/calc.js"(e,t){var r=t3(),i=or(),n=oz(),a=oD();t.exports=function(e,t){var o=i(e,t),s=o[0].z;n(t,s);var l,c=t.contours,u=r.extractOpts(t);if("heatmap"===c.coloring&&u.auto&&!1===t.autocontour){var h=c.start,d=a(c),f=c.size||1,p=Math.floor((d-h)/f)+1;isFinite(f)||(f=1,p=1);var m=h-f/2,g=m+p*f;l=[m,g]}else l=s;return r.calc(e,t,{vals:l,cLetter:"z"}),o}}}),oR=p({"src/traces/contour/constants.js"(e,t){t.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}}}}),oF=p({"src/traces/contour/make_crossings.js"(e,t){var r=oR();t.exports=function(e){var t,i,n,a,o,s,l,c,u,h=e[0].z,d=h.length,f=h[0].length,p=2===d||2===f;for(i=0;ie?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);return 5===r||10===r?e>(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}((c=e[u]).level,s))&&(c.crossings[o]=l,-1!==n.indexOf(l)&&(c.starts.push([t,i]),p&&-1!==n.indexOf(l,n.indexOf(l)+1)&&c.starts.push([t,i])))}}}),oj=p({"src/traces/contour/find_all_paths.js"(e,t){var r=tv(),i=oR();function n(e,t,r,i){return Math.abs(e[0]-t[0])20&&u?208===c||1114===c?d=0===h[0]?1:-1:f=0===h[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(c)?f=1:-1!==i.LEFTSTART.indexOf(c)?d=1:-1!==i.TOPSTART.indexOf(c)?f=-1:d=-1,[d,f]),v=[o(e,t,[-y[0],-y[1]])],x=e.z.length,b=e.z[0].length,_=t.slice(),w=y.slice();for(p=0;p<1e4;p++){if(g>20?(g=i.CHOOSESADDLE[g][0>(y[0]||y[1])?0:1],e.crossings[m]=i.SADDLEREMAINDER[g]):delete e.crossings[m],!(y=i.NEWDELTA[g])){r.log("Found bad marching index:",g,t,e.level);break}v.push(o(e,t,y)),t[0]+=y[0],t[1]+=y[1],m=t.join(","),n(v[v.length-1],v[v.length-2],s,l)&&v.pop();var T=y[0]&&(t[0]<0||t[0]>b-2)||y[1]&&(t[1]<0||t[1]>x-2);if(t[0]===_[0]&&t[1]===_[1]&&y[0]===w[0]&&y[1]===w[1]||a&&T)break;g=e.crossings[m]}1e4===p&&r.log("Infinite loop in contour?");var M,k,A,S,E,C,L,P,I,z,D,O=n(v[0],v[v.length-1],s,l),R=0,F=.2*e.smoothing,j=[],B=0;for(p=1;p=B;p--)if((M=j[p])=B&&M+j[k]P&&I--,e.edgepaths[I]=D.concat(v,z));break}q||(e.edgepaths[P]=v.concat(z))}for(P=0;P":o(">"),"<":o("<"),"=":o("=")}}}),oN=p({"src/traces/contour/empty_pathinfo.js"(e,t){var r=tv(),i=oB(),n=oD();t.exports=function(e,t,a){for(var o="constraint"===e.type?i[e._operation](e.value):e,s=o.size,l=[],c=n(o),u=a.trace._carpetTrace,h=u?{xaxis:u.aaxis,yaxis:u.baxis,x:a.a,y:a.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:a.x,y:a.y},d=o.start;d1e3){r.warn("Too many contours, clipping at 1000",e);break}return l}}}),oU=p({"src/traces/contour/convert_to_constraints.js"(e,t){var r=tv();function i(e){return r.extendFlat({},e,{edgepaths:r.extendDeep([],e.edgepaths),paths:r.extendDeep([],e.paths),starts:r.extendDeep([],e.starts)})}t.exports=function(e,t){var n,a,o,s=function(e){return e.reverse()},l=function(e){return e};switch(t){case"=":case"<":return e;case">":for(1!==e.length&&r.warn("Contour data invalid for the specified inequality operation."),a=e[0],n=0;no.level||o.starts.length&&a===o.level)}break;case"constraint":if(i.prefixBoundary=!1,i.edgepaths.length)return;var s=i.x.length,l=i.y.length,c=-1/0,u=1/0;for(r=0;r":f>c&&(i.prefixBoundary=!0);break;case"<":(fc||i.starts.length&&d===u)&&(i.prefixBoundary=!0);break;case"][":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),hc&&(i.prefixBoundary=!0)}}}}}),oq=p({"src/traces/contour/plot.js"(e){var t=T(),r=tv(),i=t9(),n=t3(),a=tF(),o=rn(),s=rt(),l=oa(),c=oF(),u=oj(),h=oN(),d=oU(),f=oV(),p=oR(),m=p.LABELOPTIMIZER;function g(e,t){var n,a,o,s,l,c,u="",h=0,d=e.edgepaths.map(function(e,t){return t}),f=!0;function p(e){return .01>Math.abs(e[0]-t[2][0])}for(;d.length;){for(c=i.smoothopen(e.edgepaths[h],e.smoothing),u+=f?c:c.replace(/^M/,"L"),d.splice(d.indexOf(h),1),n=e.edgepaths[h][e.edgepaths[h].length-1],s=-1,o=0;o<4;o++){if(!n){r.log("Missing end?",h,e);break}for(.01>Math.abs(n[1]-t[0][1])&&!p(n)?a=t[1]:.01>Math.abs(n[0]-t[0][0])?a=t[0]:.01>Math.abs(n[1]-t[2][1])?a=t[3]:p(n)&&(a=t[2]),l=0;lMath.abs(n[0]-a[0])?.01>Math.abs(n[0]-m[0])&&(m[1]-n[1])*(a[1]-m[1])>=0&&(a=m,s=l):.01>Math.abs(n[1]-a[1])?.01>Math.abs(n[1]-m[1])&&(m[0]-n[0])*(a[0]-m[0])>=0&&(a=m,s=l):r.log("endpt to newendpt is not vert. or horz.",n,a,m)}if(n=a,s>=0)break;u+="L"+a}if(s===e.edgepaths.length){r.log("unclosed perimeter path");break}h=s,(f=-1===d.indexOf(h))&&(h=d[0],u+="Z")}for(h=0;hn.center?n.right-s:s-n.left)/(u+Math.abs(Math.sin(c)*o)),f=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(h)+Math.cos(c)*o);if(d<1||f<1)return 1/0;var p=m.EDGECOST*(1/(d-1)+1/(f-1));p+=m.ANGLECOST*c*c;for(var g=s-u,y=l-h,v=s+u,x=l+h,b=0;b2*m.MAXCOST)break;f&&(s/=2),l=(o=c-s/2)+1.5*s}if(d<=m.MAXCOST)return u},e.addLabelData=function(e,t,r,i){var n=t.fontSize,a=t.width+n/3,o=Math.max(0,t.height-n/3),s=e.x,l=e.y,c=e.theta,u=Math.sin(c),h=Math.cos(c),d=function(e,t){return[s+e*h-t*u,l+e*u+t*h]},f=[d(-a/2,-o/2),d(-a/2,o/2),d(a/2,o/2),d(a/2,-o/2)];r.push({text:t.text,x:s,y:l,dy:t.dy,theta:c,level:t.level,width:a,height:o}),i.push(f)},e.drawLabels=function(e,i,n,o,s){var l=e.selectAll("text").data(i,function(e){return e.text+","+e.x+","+e.y+","+e.theta});if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(e){var r=e.x+Math.sin(e.theta)*e.dy,i=e.y-Math.cos(e.theta)*e.dy;t.select(this).text(e.text).attr({x:r,y:i,transform:"rotate("+180*e.theta/Math.PI+" "+r+" "+i+")"}).call(a.convertToTspans,n)}),s){for(var c="",u=0;u=v)&&(a<=y&&(a=y),o>=v&&(o=v),l=Math.floor((o-a)/s)+1,c=0),d=0;dy&&(m.unshift(y),g.unshift(g[0])),m[m.length-1]2?p.value=p.value.slice(2):0===p.length?p.value=[0,1]:p.length<2?(m=parseFloat(p.value[0]),p.value=[m,m+1]):p.value=[parseFloat(p.value[0]),parseFloat(p.value[1])]:r(p.value)&&(m=parseFloat(p.value),p.value=[m,m+1])):(f("contours.value",0),r(p.value)||(l(p.value)?p.value=parseFloat(p.value[0]):p.value=0)),"="===b?g=x.showlines=!0:(g=n("contours.showlines"),v=n("fillcolor",a((e.line||{}).color||h,.5))),g&&(y=n("line.color",v&&o(v)?a(t.fillcolor,1):h),n("line.width",2),n("line.dash")),n("line.smoothing"),i(n,s,y,d)}}}),oK=p({"src/traces/contour/defaults.js"(e,t){var r=tv(),i=aK(),n=iU(),a=oX(),o=oC(),s=oP(),l=aJ(),c=oS();t.exports=function(e,t,u,h){function d(i,n){return r.coerce(e,t,c,i,n)}if(!i(e,t,d,h)){t.visible=!1;return}n(e,t,h,d),d("xhoverformat"),d("yhoverformat"),d("text"),d("hovertext"),d("hoverongaps"),d("hovertemplate"),d("hovertemplatefallback");var f="constraint"===d("contours.type");d("connectgaps",r.isArray1D(t.z)),f?a(e,t,d,h,u):(o(e,t,d,function(i){return r.coerce2(e,t,c,i)}),s(e,t,d,h)),t.contours&&"heatmap"===t.contours.coloring&&l(d,h),d("zorder")}}}),oJ=p({"src/traces/contour/index.js"(e,t){t.exports={attributes:oS(),supplyDefaults:oK(),calc:oO(),plot:oq().plot,style:oG(),colorbar:oW(),hoverPoints:oY(),moduleType:"trace",name:"contour",basePlotModule:np(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),oQ=p({"lib/contour.js"(e,t){t.exports=oJ()}}),o0=p({"src/traces/scatterternary/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:i,templatefallbackAttrs:n}=eW(),a=iv(),o=ix(),s=Z(),l=tV(),c=eH().dash,u=q().extendFlat,h=o.marker,d=o.line,f=h.line;t.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:u({},o.mode,{dflt:"markers"}),text:u({},o.text,{}),texttemplate:i({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:n({editType:"plot"}),hovertext:u({},o.hovertext,{}),line:{color:d.color,width:d.width,dash:c,backoff:d.backoff,shape:u({},d.shape,{values:["linear","spline"]}),smoothing:d.smoothing,editType:"calc"},connectgaps:o.connectgaps,cliponaxis:o.cliponaxis,fill:u({},o.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:a(),marker:u({symbol:h.symbol,opacity:h.opacity,angle:h.angle,angleref:h.angleref,standoff:h.standoff,maxdisplayed:h.maxdisplayed,size:h.size,sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,line:u({width:f.width,dash:f.dash,editType:"calc"},l("marker.line")),gradient:h.gradient,editType:"calc"},l("marker")),textfont:o.textfont,textposition:o.textposition,selected:o.selected,unselected:o.unselected,hoverinfo:u({},s.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:o.hoveron,hovertemplate:r(),hovertemplatefallback:n()}}}),o1=p({"src/traces/scatterternary/defaults.js"(e,t){var r=tv(),i=iy(),n=t5(),a=iq(),o=iH(),s=iG(),l=iW(),c=iY(),u=o0();t.exports=function(e,t,h,d){function f(i,n){return r.coerce(e,t,u,i,n)}var p,m=f("a"),g=f("b"),y=f("c");if(m?(p=m.length,g?(p=Math.min(p,g.length),y&&(p=Math.min(p,y.length))):p=y?Math.min(p,y.length):0):g&&y&&(p=Math.min(g.length,y.length)),!p){t.visible=!1;return}t._length=p,f("sum"),f("text"),f("hovertext"),"fills"!==t.hoveron&&(f("hovertemplate"),f("hovertemplatefallback")),f("mode",p"),o.hovertemplate=d.hovertemplate,a}function x(e,t){y.push(e._hovertitle+": "+t)}}}}),o6=p({"src/traces/scatterternary/event_data.js"(e,t){t.exports=function(e,t,r,i,n){if(t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),i[n]){var a=i[n];e.a=a.a,e.b=a.b,e.c=a.c}else e.a=t.a,e.b=t.b,e.c=t.c;return e}}}),o8=p({"src/plots/ternary/ternary.js"(e,t){var r=T(),i=eQ(),n=tv(),a=n.strTranslate,o=n._,s=ee(),l=t9(),c=rt(),u=q().extendFlat,h=tD(),d=rn(),f=rd(),p=rD(),m=rO(),g=m.freeMode,y=m.rectMode,v=re(),x=iM().prepSelect,b=iM().selectOnClick,_=iM().clearOutline,w=iM().clearSelectionsCache,M=tE();function k(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}t.exports=k;var A=k.prototype;A.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}},A.plot=function(e,t){var r=t[this.id],i=t._size;this._hasClipOnAxisFalse=!1;for(var n=0;nS*b?n=(o=b)*S:o=(n=x)/S,h=y*n/x,d=v*o/b,r=t.l+t.w*m-n/2,i=t.t+t.h*(1-g)-o/2,f.x0=r,f.y0=i,f.w=n,f.h=o,f.sum=_,f.xaxis={type:"linear",range:[w+2*M-_,_-w-2*T],domain:[m-h/2,m+h/2],_id:"x"},c(f.xaxis,f.graphDiv._fullLayout),f.xaxis.setScale(),f.xaxis.isPtWithinRange=function(e){return e.a>=f.aaxis.range[0]&&e.a<=f.aaxis.range[1]&&e.b>=f.baxis.range[1]&&e.b<=f.baxis.range[0]&&e.c>=f.caxis.range[1]&&e.c<=f.caxis.range[0]},f.yaxis={type:"linear",range:[w,_-T-M],domain:[g-d/2,g+d/2],_id:"y"},c(f.yaxis,f.graphDiv._fullLayout),f.yaxis.setScale(),f.yaxis.isPtWithinRange=function(){return!0};var k=f.yaxis.domain[0],A=f.aaxis=u({},e.aaxis,{range:[w,_-T-M],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[k,k+d*S],anchor:"free",position:0,_id:"y",_length:n});c(A,f.graphDiv._fullLayout),A.setScale();var E=f.baxis=u({},e.baxis,{range:[_-w-M,T],side:"bottom",domain:f.xaxis.domain,anchor:"free",position:0,_id:"x",_length:n});c(E,f.graphDiv._fullLayout),E.setScale();var C=f.caxis=u({},e.caxis,{range:[_-w-T,M],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[k,k+d*S],anchor:"free",position:0,_id:"y",_length:n});c(C,f.graphDiv._fullLayout),C.setScale();var L="M"+r+","+(i+o)+"h"+n+"l-"+n/2+",-"+o+"Z";f.clipDef.select("path").attr("d",L),f.layers.plotbg.select("path").attr("d",L);var P="M0,"+o+"h"+n+"l-"+n/2+",-"+o+"Z";f.clipDefRelative.select("path").attr("d",P);var I=a(r,i);f.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",I),f.clipDefRelative.select("path").attr("transform",null);var z=a(r-E._offset,i+o);f.layers.baxis.attr("transform",z),f.layers.bgrid.attr("transform",z);var D=a(r+n/2,i)+"rotate(30)"+a(0,-A._offset);f.layers.aaxis.attr("transform",D),f.layers.agrid.attr("transform",D);var O=a(r+n/2,i)+"rotate(-30)"+a(0,-C._offset);f.layers.caxis.attr("transform",O),f.layers.cgrid.attr("transform",O),f.drawAxes(!0),f.layers.aline.select("path").attr("d",A.showline?"M"+r+","+(i+o)+"l"+n/2+",-"+o:"M0,0").call(s.stroke,A.linecolor||"#000").style("stroke-width",(A.linewidth||0)+"px"),f.layers.bline.select("path").attr("d",E.showline?"M"+r+","+(i+o)+"h"+n:"M0,0").call(s.stroke,E.linecolor||"#000").style("stroke-width",(E.linewidth||0)+"px"),f.layers.cline.select("path").attr("d",C.showline?"M"+(r+n/2)+","+i+"l"+n/2+","+o:"M0,0").call(s.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),f.graphDiv._context.staticPlot||f.initInteractions(),l.setClipUrl(f.layers.frontplot,f._hasClipOnAxisFalse?null:f.clipId,f.graphDiv)},A.drawAxes=function(e){var t=this.graphDiv,r=this.id.slice(7)+"title",i=this.layers,n=this.aaxis,a=this.baxis,s=this.caxis;if(this.drawAx(n),this.drawAx(a),this.drawAx(s),e){var l=Math.max(n.showticklabels?n.tickfont.size/2:0,(s.showticklabels?.75*s.tickfont.size:0)+("outside"===s.ticks?.87*s.ticklen:0)),c=(a.showticklabels?a.tickfont.size:0)+("outside"===a.ticks?a.ticklen:0)+3;i["a-title"]=v.draw(t,"a"+r,{propContainer:n,propName:this.id+".aaxis.title.text",placeholder:o(t,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-n.title.font.size/3-l,"text-anchor":"middle"}}),i["b-title"]=v.draw(t,"b"+r,{propContainer:a,propName:this.id+".baxis.title.text",placeholder:o(t,"Click to enter Component B title"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*a.title.font.size+c,"text-anchor":"middle"}}),i["c-title"]=v.draw(t,"c"+r,{propContainer:s,propName:this.id+".caxis.title.text",placeholder:o(t,"Click to enter Component C title"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*s.title.font.size+c,"text-anchor":"middle"}})}},A.drawAx=function(e){var t,r=this.graphDiv,i=e._name,a=i.charAt(0),o=e._id,s=this.layers[i],l=a+"tickLayout",c=(t=e).ticks+String(t.ticklen)+String(t.showticklabels);this[l]!==c&&(s.selectAll("."+o+"tick").remove(),this[l]=c),e.setScale();var u=d.calcTicks(e),h=d.clipEnds(e,u),f=d.makeTransTickFn(e),p=d.getTickSigns(e)[2],m=n.deg2rad(30),g=p*(e.linewidth||1)/2,y=p*e.ticklen,v=this.w,x=this.h,b="b"===a?"M0,"+g+"l"+Math.sin(m)*y+","+Math.cos(m)*y:"M"+g+",0l"+Math.cos(m)*y+","+-Math.sin(m)*y,_={a:"M0,0l"+x+",-"+v/2,b:"M0,0l-"+v/2+",-"+x,c:"M0,0l-"+x+","+v/2}[a];d.drawTicks(r,e,{vals:"inside"===e.ticks?h:u,layer:s,path:b,transFn:f,crisp:!1}),d.drawGrid(r,e,{vals:h,layer:this.layers[a+"grid"],path:_,transFn:f,crisp:!1}),d.drawLabels(r,e,{vals:u,layer:s,transFn:f,labelFns:d.makeLabelFns(e,0,30)})};var E=M.MINZOOM/2+.87,C="m-0.87,.5h"+E+"v3h-"+(E+5.2)+"l"+(E/2+2.6)+",-"+(.87*E+4.5)+"l2.6,1.5l-"+E/2+","+.87*E+"Z",L="m0.87,.5h-"+E+"v3h"+(E+5.2)+"l-"+(E/2+2.6)+",-"+(.87*E+4.5)+"l-2.6,1.5l"+E/2+","+.87*E+"Z",P="m0,1l"+E/2+","+.87*E+"l2.6,-1.5l-"+(E/2+2.6)+",-"+(.87*E+4.5)+"l-"+(E/2+2.6)+","+(.87*E+4.5)+"l2.6,1.5l"+E/2+",-"+.87*E+"Z",I=!0;function z(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}A.clearOutline=function(){w(this.dragOptions),_(this.dragOptions.gd)},A.initInteractions=function(){var e,t,r,c,u,h,d,m,v,_,w,T,k=this,A=k.layers.plotbg.select("path").node(),E=k.graphDiv,D=E._fullLayout._zoomlayer;function O(e){var t={};return t[k.id+".aaxis.min"]=e.a,t[k.id+".baxis.min"]=e.b,t[k.id+".caxis.min"]=e.c,t}function R(e,t){var r=E._fullLayout.clickmode;z(E),2===e&&(E.emit("plotly_doubleclick",null),i.call("_guiRelayout",E,O({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===e&&b(t,E,[k.xaxis],[k.yaxis],k.id,k.dragOptions),r.indexOf("event")>-1&&p.click(E,t,k.id)}this.dragOptions={element:A,gd:E,plotinfo:{id:k.id,domain:E._fullLayout[k.id].domain,xaxis:k.xaxis,yaxis:k.yaxis},subplot:k.id,prepFn:function(i,o,l){k.dragOptions.xaxes=[k.xaxis],k.dragOptions.yaxes=[k.yaxis],w=E._fullLayout._invScaleX,T=E._fullLayout._invScaleY;var f,p,b,M,S,C=k.dragOptions.dragmode=E._fullLayout.dragmode;g(C)?k.dragOptions.minDrag=1:k.dragOptions.minDrag=void 0,"zoom"===C?(k.dragOptions.moveFn=B,k.dragOptions.clickFn=R,k.dragOptions.doneFn=N,f=o,p=l,e=f-(b=A.getBoundingClientRect()).left,t=p-b.top,E._fullLayout._calcInverseTransform(E),M=E._fullLayout._invTransform,e=(S=n.apply3DTransform(M)(e,t))[0],t=S[1],u=r={a:k.aaxis.range[0],b:k.baxis.range[1],c:k.caxis.range[1]},c=k.aaxis.range[1]-r.a,h=s.luminosity(k.graphDiv._fullLayout[k.id].bgcolor),d="M0,"+k.h+"L"+k.w/2+", 0L"+k.w+","+k.h+"Z",m=!1,v=D.append("path").attr("class","zoombox").attr("transform",a(k.x0,k.y0)).style({fill:h>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",d),_=D.append("path").attr("class","zoombox-corners").attr("transform",a(k.x0,k.y0)).style({fill:s.background,stroke:s.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),k.clearOutline(E)):"pan"===C?(k.dragOptions.moveFn=U,k.dragOptions.clickFn=R,k.dragOptions.doneFn=V,u=r={a:k.aaxis.range[0],b:k.baxis.range[1],c:k.caxis.range[1]},k.clearOutline(E)):(y(C)||g(C))&&x(i,o,l,k.dragOptions,C)}};function F(e,t){return 1-(e+(k.h-t)/Math.sqrt(3))/k.w}function j(e,t){return(e-(k.h-t)/Math.sqrt(3))/k.w}function B(i,n){var a=e+i*w,o=t+n*T,s=Math.max(0,Math.min(1,1-t/k.h,1-o/k.h)),l=Math.max(0,Math.min(1,F(e,t),F(a,o))),f=Math.max(0,Math.min(1,j(e,t),j(a,o))),p=(s/2+f)*k.w,g=(1-s/2-l)*k.w,y=(p+g)/2,x=g-p,b=(1-s)*k.h,A=b-x/S;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),_.transition().style("opacity",1).duration(200),m=!0),E.emit("plotly_relayouting",O(u))}function N(){z(E),u!==r&&(i.call("_guiRelayout",E,O(u)),I&&E.data&&E._context.showTips&&(n.notifier(o(E,"Double-click to zoom back out"),"long",E),I=!1))}function U(e,t){var i=e/k.xaxis._m,o=t/k.yaxis._m,s=[(u={a:r.a-o,b:r.b+(i+o)/2,c:r.c-(i-o)/2}).a,u.b,u.c].sort(n.sorterAsc),c={a:s.indexOf(u.a),b:s.indexOf(u.b),c:s.indexOf(u.c)};s[0]<0&&(s[1]+s[0]/2<0?(s[2]+=s[0]+s[1],s[0]=s[1]=0):(s[2]+=s[0]/2,s[1]+=s[0]/2,s[0]=0),u={a:s[c.a],b:s[c.b],c:s[c.c]},t=(r.a-u.a)*k.yaxis._m,e=(r.c-u.c-r.b+u.b)*k.xaxis._m);var h=a(k.x0+e,k.y0+t);k.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",h);var d=a(-e,-t);k.clipDefRelative.select("path").attr("transform",d),k.aaxis.range=[u.a,k.sum-u.b-u.c],k.baxis.range=[k.sum-u.a-u.c,u.b],k.caxis.range=[k.sum-u.a-u.b,u.c],k.drawAxes(!1),k._hasClipOnAxisFalse&&k.plotContainer.select(".scatterlayer").selectAll(".trace").call(l.hideOutsideRangePoints,k),E.emit("plotly_relayouting",O(u))}function V(){i.call("_guiRelayout",E,O(u))}A.onmousemove=function(e){p.hover(E,e,k.id),E._fullLayout._lasthover=A,E._fullLayout._hoversubplot=k.id},A.onmouseout=function(e){E._dragging||f.unhover(E,e)},f.init(this.dragOptions)}}}),o7=p({"src/plots/ternary/layout_attributes.js"(e,t){var r=Q(),i=at().attributes,n=tN(),a=eq().overrideAll,o=q().extendFlat,s={title:{text:n.title.text,font:n.title.font},color:n.color,tickmode:n.minor.tickmode,nticks:o({},n.nticks,{dflt:6,min:1}),tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:n.ticks,ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,showtickprefix:n.showtickprefix,tickprefix:n.tickprefix,showticksuffix:n.showticksuffix,ticksuffix:n.ticksuffix,showexponent:n.showexponent,exponentformat:n.exponentformat,minexponent:n.minexponent,separatethousands:n.separatethousands,tickfont:n.tickfont,tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,hoverformat:n.hoverformat,showline:o({},n.showline,{dflt:!0}),linecolor:n.linecolor,linewidth:n.linewidth,showgrid:o({},n.showgrid,{dflt:!0}),gridcolor:n.gridcolor,gridwidth:n.gridwidth,griddash:n.griddash,layer:n.layer,min:{valType:"number",dflt:0,min:0}},l=t.exports=a({domain:i({name:"ternary"}),bgcolor:{valType:"color",dflt:r.background},sum:{valType:"number",dflt:1,min:0},aaxis:s,baxis:s,caxis:s},"plot","from-root");l.uirevision={valType:"any",editType:"none"},l.aaxis.uirevision=l.baxis.uirevision=l.caxis.uirevision={valType:"any",editType:"none"}}}),o9=p({"src/plots/subplot_defaults.js"(e,t){var r=tv(),i=tS(),n=at().defaults;t.exports=function(e,t,a,o){var s,l,c=o.type,u=o.attributes,h=o.handleDefaults,d=o.partition||"x",f=t._subplots[c],p=f.length,m=p&&f[0].replace(/\d+$/,"");function g(e,t){return r.coerce(s,l,u,e,t)}for(var y=0;y=m&&(b.min=0,_.min=0,w.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}t.exports=function(e,t,r){a(e,t,r,{type:"ternary",attributes:h,handleDefaults:f,font:t.font,paper_bgcolor:t.paper_bgcolor})}}}),st=p({"src/plots/ternary/index.js"(e){var t=o8(),r=tI().getSubplotCalcData,i=tv().counterRegex,n="ternary";e.name=n;var a=e.attr="subplot";e.idRoot=n,e.idRegex=e.attrRegex=i(n),(e.attributes={})[a]={valType:"subplotid",dflt:"ternary",editType:"calc"},e.layoutAttributes=o7(),e.supplyLayoutDefaults=se(),e.plot=function(e){for(var i=e._fullLayout,a=e.calcdata,o=i._subplots[n],s=0;s0){var b,_,w,T,M,k=e.xa,A=e.ya;"h"===p.orientation?(M=t,b="y",w=A,_="x",T=k):(M=s,b="x",w=k,_="y",T=A);var S=f[e.index];if(M>=S.span[0]&&M<=S.span[1]){var E=i.extendFlat({},e),C=T.c2p(M,!0),L=o.getKdeValue(S,p,M),P=o.getPositionOnKdePath(S,p,C),I=w._offset,z=w._length;E[b+"0"]=P[0],E[b+"1"]=P[1],E[_+"0"]=E[_+"1"]=C,E[_+"Label"]=_+": "+n.hoverLabelText(T,M,p[_+"hoverformat"])+", "+f[0].t.labels.kde+" "+L.toFixed(3);for(var D=0,O=0;O path").each(function(e){if(!e.isBlank){var t=s.marker;r.select(this).call(n.fill,e.mc||t.color).call(n.stroke,e.mlc||t.line.color).call(i.dashLine,t.line.dash,e.mlw||t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}}),l(o,s,e),o.selectAll(".regions").each(function(){r.select(this).selectAll("path").style("stroke-width",0).call(n.fill,s.connector.fillcolor)}),o.selectAll(".lines").each(function(){var e=s.connector.line;i.lineGroupStyle(r.select(this).selectAll("path"),e.width,e.color,e.dash)})})}}}}),sA=p({"src/traces/funnel/hover.js"(e,t){var r=ee().opacity,i=aI().hoverOnBars,n=tv().formatPercent;t.exports=function(e,t,a,o,s){var l=i(e,t,a,o,s);if(l){var c,u,h,d,f,p,m=l.cd,g=m[0].trace,y="h"===g.orientation,v=m[l.index];l[(y?"x":"y")+"LabelVal"]=v.s,l.percentInitial=v.begR,l.percentInitialLabel=n(v.begR,1),l.percentPrevious=v.difR,l.percentPreviousLabel=n(v.difR,1),l.percentTotal=v.sumR,l.percentTotalLabel=n(v.sumR,1);var x=v.hi||g.hoverinfo,b=[];if(x&&"none"!==x&&"skip"!==x){var _="all"===x,w=x.split("+"),T=function(e){return _||-1!==w.indexOf(e)};T("percent initial")&&b.push(l.percentInitialLabel+" of initial"),T("percent previous")&&b.push(l.percentPreviousLabel+" of previous"),T("percent total")&&b.push(l.percentTotalLabel+" of total")}return l.extraText=b.join("
"),c=g,u=v,h=c.marker,d=u.mc||h.color,f=u.mlc||h.line.color,p=u.mlw||h.line.width,l.color=r(d)?d:r(f)&&p?f:void 0,[l]}}}}),sS=p({"src/traces/funnel/event_data.js"(e,t){t.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"percentInitial"in t&&(e.percentInitial=t.percentInitial),"percentPrevious"in t&&(e.percentPrevious=t.percentPrevious),"percentTotal"in t&&(e.percentTotal=t.percentTotal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}}}),sE=p({"src/traces/funnel/index.js"(e,t){t.exports={attributes:sy(),layoutAttributes:sv(),supplyDefaults:sx().supplyDefaults,crossTraceDefaults:sx().crossTraceDefaults,supplyLayoutDefaults:sb(),calc:sw(),crossTraceCalc:sT(),plot:sM(),style:sk().style,hoverPoints:sA(),eventData:sS(),selectPoints:aD(),moduleType:"trace",name:"funnel",basePlotModule:np(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),sC=p({"lib/funnel.js"(e,t){t.exports=sE()}}),sL=p({"src/traces/waterfall/constants.js"(e,t){t.exports={eventDataKeys:["initial","delta","final"]}}}),sP=p({"src/traces/waterfall/attributes.js"(e,t){var r=a_(),i=ix().line,n=Z(),a=tB().axisHoverFormat,{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:l}=eW(),c=sL(),u=q().extendFlat,h=ee();function d(e){return{marker:{color:u({},r.marker.color,{arrayOk:!1,editType:"style"}),line:{color:u({},r.marker.line.color,{arrayOk:!1,editType:"style"}),width:u({},r.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}t.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:r.x,x0:r.x0,dx:r.dx,y:r.y,y0:r.y0,dy:r.dy,xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:r.xperiod0,yperiod0:r.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,xhoverformat:a("x"),yhoverformat:a("y"),hovertext:r.hovertext,hovertemplate:o({},{keys:c.eventDataKeys}),hovertemplatefallback:l(),hoverinfo:u({},n.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:s({editType:"plot"},{keys:c.eventDataKeys.concat(["label"])}),texttemplatefallback:l({editType:"plot"}),text:r.text,textposition:r.textposition,insidetextanchor:r.insidetextanchor,textangle:r.textangle,textfont:r.textfont,insidetextfont:r.insidetextfont,outsidetextfont:r.outsidetextfont,constraintext:r.constraintext,cliponaxis:r.cliponaxis,orientation:r.orientation,offset:r.offset,width:r.width,increasing:d("increasing"),decreasing:d("decreasing"),totals:d("intermediate sums and total"),connector:{line:{color:u({},i.color,{dflt:h.defaultLine}),width:u({},i.width,{editType:"plot"}),dash:i.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:r.offsetgroup,alignmentgroup:r.alignmentgroup,zorder:r.zorder}}}),sI=p({"src/traces/waterfall/layout_attributes.js"(e,t){t.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"}}}}),sz=p({"src/constants/delta.js"(e,t){t.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}}}),sD=p({"src/traces/waterfall/defaults.js"(e,t){var r=tv(),i=i$(),n=aM().handleText,a=iN(),o=iU(),s=sP(),l=ee(),c=sz(),u=c.INCREASING.COLOR,h=c.DECREASING.COLOR;function d(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",l.defaultLine),e(t+".marker.line.width")}t.exports={supplyDefaults:function(e,t,i,l){function c(i,n){return r.coerce(e,t,s,i,n)}if(!a(e,t,l,c)){t.visible=!1;return}o(e,t,l,c),c("xhoverformat"),c("yhoverformat"),c("measure"),c("orientation",t.x&&!t.y?"h":"v"),c("base"),c("offset"),c("width"),c("text"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback");var f=c("textposition");n(e,t,l,c,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),"none"!==t.textposition&&(c("texttemplate"),c("texttemplatefallback"),t.texttemplate||c("textinfo")),d(c,"increasing",u),d(c,"decreasing",h),d(c,"totals","#4499FF"),c("connector.visible")&&(c("connector.mode"),c("connector.line.width")&&(c("connector.line.color"),c("connector.line.dash"))),c("zorder")},crossTraceDefaults:function(e,t){var n;function a(e){return r.coerce(n._input,n,s,e)}if("group"===t.waterfallmode)for(var o=0;o0&&(l?M+="M"+w[0]+","+T[1]+"V"+T[0]:M+="M"+w[1]+","+T[0]+"H"+w[0]),"between"!==c&&(e.isSum||t path").each(function(e){if(!e.isBlank){var t=s[e.dir].marker;r.select(this).call(n.fill,t.color).call(n.stroke,t.line.color).call(i.dashLine,t.line.dash,t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}}),l(o,s,e),o.selectAll(".lines").each(function(){var e=s.connector.line;i.lineGroupStyle(r.select(this).selectAll("path"),e.width,e.color,e.dash)})})}}}}),sN=p({"src/traces/waterfall/hover.js"(e,t){var r=rn().hoverLabelText,i=ee().opacity,n=aI().hoverOnBars,a=sz(),o={increasing:a.INCREASING.SYMBOL,decreasing:a.DECREASING.SYMBOL};t.exports=function(e,t,a,s,l){var c=n(e,t,a,s,l);if(c){var u,h,d,f,p=c.cd,m=p[0].trace,g="h"===m.orientation,y=g?"x":"y",v=g?e.xa:e.ya,x=p[c.index],b=x.isSum?x.b+x.s:x.rawS;c.initial=x.b+x.s-b,c.delta=b,c.final=c.initial+c.delta;var _=S(Math.abs(c.delta));c.deltaLabel=b<0?"("+_+")":_,c.finalLabel=S(c.final),c.initialLabel=S(c.initial);var w=x.hi||m.hoverinfo,T=[];if(w&&"none"!==w&&"skip"!==w){var M="all"===w,k=w.split("+"),A=function(e){return M||-1!==k.indexOf(e)};x.isSum||(!A("final")||A(g?"x":"y")||T.push(c.finalLabel),A("delta")&&(b<0?T.push(c.deltaLabel+" "+o.decreasing):T.push(c.deltaLabel+" "+o.increasing)),A("initial")&&T.push("Initial: "+c.initialLabel))}return T.length&&(c.extraText=T.join("
")),h=(u=m[x.dir].marker).color,d=u.line.color,f=u.line.width,c.color=i(h)?h:i(d)&&f?d:void 0,[c]}function S(e){return r(v,e,m[y+"hoverformat"])}}}}),sU=p({"src/traces/waterfall/event_data.js"(e,t){t.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"initial"in t&&(e.initial=t.initial),"delta"in t&&(e.delta=t.delta),"final"in t&&(e.final=t.final),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}}}),sV=p({"src/traces/waterfall/index.js"(e,t){t.exports={attributes:sP(),layoutAttributes:sI(),supplyDefaults:sD().supplyDefaults,crossTraceDefaults:sD().crossTraceDefaults,supplyLayoutDefaults:sO(),calc:sR(),crossTraceCalc:sF(),plot:sj(),style:sB().style,hoverPoints:sN(),eventData:sU(),selectPoints:aD(),moduleType:"trace",name:"waterfall",basePlotModule:np(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),sq=p({"lib/waterfall.js"(e,t){t.exports=sV()}}),sH=p({"src/traces/image/constants.js"(e,t){t.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.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(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xb0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xb0","%","%",""]}}}}}),sG={};m(sG,{default:()=>s0});var sW,sY,sZ,s$,sX,sK,sJ,sQ,s0,s1=f({"src/traces/image/attributes.ts"(){for(let e of(sW=y(q()),sY=y(Z()),sZ=y(eW()),s$=y(ix()),sX=y(sH()),sJ=[],sQ=[],sK=["rgb","rgba","rgba256","hsl","hsla"])){let t=sX.colormodel[e];sJ.push(`For the \`${e}\` colormodel, it is [${(t.zminDflt||t.min).join(", ")}].`),sQ.push(`For the \`${e}\` colormodel, it is [${(t.zmaxDflt||t.max).join(", ")}].`)}s0={source:{valType:"string",editType:"calc",description:'Specifies the data URI of the image to be visualized. The URI consists of "data:image/[][;base64\\\\],"'},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."},colormodel:{valType:"enumerated",values:sK,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`."},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."},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.",sJ.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.",sQ.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"},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."},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,sW.extendFlat)({},sY.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,sZ.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,sZ.templatefallbackAttrs)(),zorder:s$.zorder}}}),s2=p({"src/traces/image/defaults.js"(e,t){var r=tv(),i=(s1(),v(sG)).default,n=sH(),a=iP().IMAGE_URL_PREFIX;t.exports=function(e,t){function o(n,a){return r.coerce(e,t,i,n,a)}o("source"),t.source&&!t.source.match(a)&&delete t.source,t._hasSource=!!t.source;var s,l=o("z");if(t._hasZ=!(void 0===l||!l.length||!l[0]||!l[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}o("x0"),o("y0"),o("dx"),o("dy"),t._hasZ?(o("colormodel","rgb"),o("zmin",(s=n.colormodel[t.colormodel]).zminDflt||s.min),o("zmax",s.zmaxDflt||s.max)):t._hasSource&&(t.colormodel="rgba256",s=n.colormodel[t.colormodel],t.zmin=s.zminDflt,t.zmax=s.zmaxDflt),o("zsmooth"),o("text"),o("hovertext"),o("hovertemplate"),o("hovertemplatefallback"),t._length=null,o("zorder")}}}),s3=p({"node_modules/inherits/inherits_browser.js"(e,t){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}}}),s5=p({"node_modules/readable-stream/lib/internal/streams/stream-browser.js"(e,t){t.exports=tw().EventEmitter}}),s4=p({"node_modules/base64-js/index.js"(e){e.byteLength=function(e){var t=s(e),r=t[0],i=t[1];return(r+i)*3/4-i},e.toByteArray=function(e){var t,r,i=s(e),o=i[0],l=i[1],c=new a((o+l)*3/4-l),u=0,h=l>0?o-4:o;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},e.fromByteArray=function(e){for(var t,r=e.length,n=r%3,a=[],o=0,s=r-n;o>18&63]+i[n>>12&63]+i[n>>6&63]+i[63&n]);return a.join("")}(e,o,o+16383>s?s:o+16383));return 1===n?a.push(i[(t=e[r-1])>>2]+i[t<<4&63]+"=="):2===n&&a.push(i[(t=(e[r-2]<<8)+e[r-1])>>10]+i[t>>4&63]+i[t<<2&63]+"="),a.join("")};var t,r,i=[],n=[],a="u">typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(t=0,r=o.length;t0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var i=r===t?0:4-r%4;return[r,i]}n[45]=62,n[95]=63}}),s6=p({"node_modules/ieee754/index.js"(e){e.read=function(e,t,r,i,n){var a,o,s=8*n-i-1,l=(1<>1,u=-7,h=r?n-1:0,d=r?-1:1,f=e[t+h];for(h+=d,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=d,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=i;u>0;o=256*o+e[t+h],h+=d,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,i),a-=c}return(f?-1:1)*o*Math.pow(2,a-i)},e.write=function(e,t,r,i,n,a){var o,s,l,c=8*a-n-1,u=(1<>1,d=5960464477539062e-23*(23===n),f=i?0:a-1,p=i?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,n),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,n),o=0));n>=8;e[r+f]=255&s,f+=p,s/=256,n-=8);for(o=o<0;e[r+f]=255&o,f+=p,o/=256,c-=8);e[r+f-p]|=128*m}}}),s8=p({"node_modules/buffer/index.js"(e){var t=s4(),r=s6(),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function n(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return l(e)}return o(e,t,r)}function o(e,t,r){if("string"==typeof e){var i=e,o=t;if(("string"!=typeof o||""===o)&&(o="utf8"),!a.isEncoding(o))throw TypeError("Unknown encoding: "+o);let r=0|d(i,o),s=n(r),l=s.write(i,o);return l!==r&&(s=s.slice(0,l)),s}if(ArrayBuffer.isView(e)){var s=e;if(O(s,Uint8Array)){let e=new Uint8Array(s);return u(e.buffer,e.byteOffset,e.byteLength)}return c(s)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(O(e,ArrayBuffer)||e&&O(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(O(e,SharedArrayBuffer)||e&&O(e.buffer,SharedArrayBuffer)))return u(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let l=e.valueOf&&e.valueOf();if(null!=l&&l!==e)return a.from(l,t,r);let f=function(e){if(a.isBuffer(e)){let t=0|h(e.length),r=n(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?n(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(f)return f;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function s(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return s(e),n(e<0?0:0|h(e))}function c(e){let t=e.length<0?0:0|h(e.length),r=n(t);for(let i=0;i=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function d(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||O(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return I(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(n)return i?-1:I(e).length;t=(""+t).toLowerCase(),n=!0}}function f(e,r,i){let n=!1;if((void 0===r||r<0)&&(r=0),r>this.length||((void 0===i||i>this.length)&&(i=this.length),i<=0)||(i>>>=0)<=(r>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);let n="";for(let i=t;i0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r*=1)!=o&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return -1;r=e.length-1}else if(r<0)if(!n)return -1;else r=0;if("string"==typeof t&&(t=a.from(t,i)),a.isBuffer(t))return 0===t.length?-1:g(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,i,n);throw TypeError("val must be string, number or Buffer")}function g(e,t,r,i,n){let a,o=1,s=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return -1;o=2,s/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){let i=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){let r=!0;for(let i=0;i239?4:t>223?3:t>191?2:1;if(n+o<=r){let r,i,s,l;switch(o){case 1:t<128&&(a=t);break;case 2:(192&(r=e[n+1]))==128&&(l=(31&t)<<6|63&r)>127&&(a=l);break;case 3:r=e[n+1],i=e[n+2],(192&r)==128&&(192&i)==128&&(l=(15&t)<<12|(63&r)<<6|63&i)>2047&&(l<55296||l>57343)&&(a=l);break;case 4:r=e[n+1],i=e[n+2],s=e[n+3],(192&r)==128&&(192&i)==128&&(192&s)==128&&(l=(15&t)<<18|(63&r)<<12|(63&i)<<6|63&s)>65535&&l<1114112&&(a=l)}}null===a?(a=65533,o=1):a>65535&&(a-=65536,i.push(a>>>10&1023|55296),a=56320|1023&a),i.push(a),n+=o}var a=i;let o=a.length;if(o<=4096)return String.fromCharCode.apply(String,a);let s="",l=0;for(;lr)throw RangeError("Trying to access beyond buffer length")}function x(e,t,r,i,n,o){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>n||te.length)throw RangeError("Index out of range")}function b(e,t,r,i,n){E(t,i,n,e,r,7);let a=Number(t&BigInt(0xffffffff));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function _(e,t,r,i,n){E(t,i,n,e,r,7);let a=Number(t&BigInt(0xffffffff));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function w(e,t,r,i,n,a){if(r+i>e.length||r<0)throw RangeError("Index out of range")}function T(e,t,i,n,a){return t*=1,i>>>=0,a||w(e,t,i,4,34028234663852886e22,-34028234663852886e22),r.write(e,t,i,n,23,4),i+4}function M(e,t,i,n,a){return t*=1,i>>>=0,a||w(e,t,i,8,17976931348623157e292,-17976931348623157e292),r.write(e,t,i,n,52,8),i+8}e.Buffer=a,e.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},e.INSPECT_MAX_BYTES=50,e.kMaxLength=0x7fffffff,a.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch{return!1}}(),!a.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&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."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return o(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return s(e),e<=0?n(e):void 0!==t?"string"==typeof r?n(e).fill(t,r):n(e).fill(t):n(e)},a.allocUnsafe=function(e){return l(e)},a.allocUnsafeSlow=function(e){return l(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(O(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),O(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,i=t.length;for(let n=0,a=Math.min(r,i);ni.length?(a.isBuffer(t)||(t=a.from(t)),t.copy(i,n)):Uint8Array.prototype.set.call(i,t,n);else if(a.isBuffer(t))t.copy(i,n);else throw TypeError('"list" argument must be an Array of Buffers');n+=t.length}return i},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(t+=" ... "),""},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(e,t,r,i,n){if(O(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,i>>>=0,n>>>=0,this===e)return 0;let o=n-i,s=r-t,l=Math.min(o,s),c=this.slice(i,n),u=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let d=this.length-t;if((void 0===r||r>d)&&(r=d),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let f=!1;for(;;)switch(i){case"hex":return function(e,t,r,i){let n;r=Number(r)||0;let a=e.length-r;i?(i=Number(i))>a&&(i=a):i=a;let o=t.length;for(i>o/2&&(i=o/2),n=0;n>8,n.push(r%256),n.push(i);return n}(e,this.length-u),this,u,h);default:if(f)throw TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),f=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||v(e,t,this.length);let i=this[e],n=1,a=0;for(;++a>>=0,t>>>=0,r||v(e,t,this.length);let i=this[e+--t],n=1;for(;t>0&&(n*=256);)i+=this[e+--t]*n;return i},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||v(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=F(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&L(e,this.length-8);let i=t+256*this[++e]+65536*this[++e]+0x1000000*this[++e],n=this[++e]+256*this[++e]+65536*this[++e]+0x1000000*r;return BigInt(i)+(BigInt(n)<>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&L(e,this.length-8);let i=0x1000000*t+65536*this[++e]+256*this[++e]+this[++e],n=0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(i)<>>=0,t>>>=0,r||v(e,t,this.length);let i=this[e],n=1,a=0;for(;++a=(n*=128)&&(i-=Math.pow(2,8*t)),i},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||v(e,t,this.length);let i=t,n=1,a=this[e+--i];for(;i>0&&(n*=256);)a+=this[e+--i]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return e>>>=0,t||v(e,1,this.length),128&this[e]?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||v(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||v(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=F(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&L(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&L(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<>>=0,t||v(e,4,this.length),r.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||v(e,4,this.length),r.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||v(e,8,this.length),r.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||v(e,8,this.length),r.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,i){if(e*=1,t>>>=0,r>>>=0,!i){let i=Math.pow(2,8*r)-1;x(this,e,t,r,i,0)}let n=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,!i){let i=Math.pow(2,8*r)-1;x(this,e,t,r,i,0)}let n=r-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigUInt64LE=F(function(e,t=0){return b(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=F(function(e,t=0){return _(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(e,t,r,i){if(e*=1,t>>>=0,!i){let i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}let n=0,a=1,o=0;for(this[t]=255&e;++n>>=0,!i){let i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}let n=r-1,a=1,o=0;for(this[t+n]=255&e;--n>=0&&(a*=256);)e<0&&0===o&&0!==this[t+n+1]&&(o=1),this[t+n]=(e/a|0)-o&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigInt64LE=F(function(e,t=0){return b(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=F(function(e,t=0){return _(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(e,t,r){return T(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return T(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,i){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw RangeError("Index out of range");if(i<0)throw RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function E(e,t,r,i,n,a){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${(a+1)*8}${i}`:`>= -(2${i} ** ${(a+1)*8-1}${i}) and < 2 ** ${(a+1)*8-1}${i}`:`>= ${t}${i} and <= ${r}${i}`,new k.ERR_OUT_OF_RANGE("value",n,e)}C(n,"offset"),(void 0===i[n]||void 0===i[n+a])&&L(n,i.length-(a+1))}function C(e,t){if("number"!=typeof e)throw new k.ERR_INVALID_ARG_TYPE(t,"number",e)}function L(e,t,r){throw Math.floor(e)!==e?(C(e,r),new k.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new k.ERR_BUFFER_OUT_OF_BOUNDS:new k.ERR_OUT_OF_RANGE(r||"offset",`>= ${+!!r} and <= ${t}`,e)}A("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),A("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),A("ERR_OUT_OF_RANGE",function(e,t,r){let i=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?n=S(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=S(n)),n+="n"),i+=` It must be ${t}. Received ${n}`},RangeError);var P=/[^+/0-9A-Za-z-_]/g;function I(e,t){t=t||1/0;let r,i=e.length,n=null,a=[];for(let o=0;o55295&&r<57344){if(!n){if(r>56319||o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function z(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,r,i){let n;for(n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function O(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var R=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let i=16*r;for(let n=0;n<16;++n)t[i+n]=e[r]+e[n]}return t}();function F(e){return typeof BigInt>"u"?j:e}function j(){throw Error("BigInt not supported")}}}),s7=p({"node_modules/has-symbols/shams.js"(e,t){t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var i in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}}}),s9=p({"node_modules/has-tostringtag/shams.js"(e,t){var r=s7();t.exports=function(){return r()&&!!Symbol.toStringTag}}}),le=p({"node_modules/es-object-atoms/index.js"(e,t){t.exports=Object}}),lt=p({"node_modules/es-errors/index.js"(e,t){t.exports=Error}}),lr=p({"node_modules/es-errors/eval.js"(e,t){t.exports=EvalError}}),li=p({"node_modules/es-errors/range.js"(e,t){t.exports=RangeError}}),ln=p({"node_modules/es-errors/ref.js"(e,t){t.exports=ReferenceError}}),la=p({"node_modules/es-errors/syntax.js"(e,t){t.exports=SyntaxError}}),lo=p({"node_modules/es-errors/type.js"(e,t){t.exports=TypeError}}),ls=p({"node_modules/es-errors/uri.js"(e,t){t.exports=URIError}}),ll=p({"node_modules/math-intrinsics/abs.js"(e,t){t.exports=Math.abs}}),lc=p({"node_modules/math-intrinsics/floor.js"(e,t){t.exports=Math.floor}}),lu=p({"node_modules/math-intrinsics/max.js"(e,t){t.exports=Math.max}}),lh=p({"node_modules/math-intrinsics/min.js"(e,t){t.exports=Math.min}}),ld=p({"node_modules/math-intrinsics/pow.js"(e,t){t.exports=Math.pow}}),lf=p({"node_modules/math-intrinsics/round.js"(e,t){t.exports=Math.round}}),lp=p({"node_modules/math-intrinsics/isNaN.js"(e,t){t.exports=Number.isNaN||function(e){return e!=e}}}),lm=p({"node_modules/math-intrinsics/sign.js"(e,t){var r=lp();t.exports=function(e){return r(e)||0===e?e:e<0?-1:1}}}),lg=p({"node_modules/gopd/gOPD.js"(e,t){t.exports=Object.getOwnPropertyDescriptor}}),ly=p({"node_modules/gopd/index.js"(e,t){var r=lg();if(r)try{r([],"length")}catch{r=null}t.exports=r}}),lv=p({"node_modules/es-define-property/index.js"(e,t){var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}t.exports=r}}),lx=p({"node_modules/has-symbols/index.js"(e,t){var r="u">typeof Symbol&&Symbol,i=s7();t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}}}),lb=p({"node_modules/get-proto/Reflect.getPrototypeOf.js"(e,t){t.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null}}),l_=p({"node_modules/get-proto/Object.getPrototypeOf.js"(e,t){t.exports=le().getPrototypeOf||null}}),lw=p({"node_modules/function-bind/implementation.js"(e,t){var r=Object.prototype.toString,i=Math.max,n=function(e,t){for(var r=[],i=0;itypeof Reflect&&Reflect&&Reflect.apply}}),lS=p({"node_modules/call-bind-apply-helpers/actualApply.js"(e,t){var r=lT(),i=lk(),n=lM();t.exports=lA()||r.call(n,i)}}),lE=p({"node_modules/call-bind-apply-helpers/index.js"(e,t){var r=lT(),i=lo(),n=lM(),a=lS();t.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new i("a function is required");return a(r,n,e)}}}),lC=p({"node_modules/dunder-proto/get.js"(e,t){var r,i=lE(),n=ly();try{r=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!r&&n&&n(Object.prototype,"__proto__"),o=Object,s=o.getPrototypeOf;t.exports=a&&"function"==typeof a.get?i([a.get]):"function"==typeof s&&function(e){return s(null==e?e:o(e))}}}),lL=p({"node_modules/get-proto/index.js"(e,t){var r=lb(),i=l_(),n=lC();t.exports=r?function(e){return r(e)}:i?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return i(e)}:n?function(e){return n(e)}:null}}),lP=p({"node_modules/hasown/index.js"(e,t){var r=Function.prototype.call,i=Object.prototype.hasOwnProperty;t.exports=lT().call(r,i)}}),lI=p({"node_modules/get-intrinsic/index.js"(e,t){var r,i=le(),n=lt(),a=lr(),o=li(),s=ln(),l=la(),c=lo(),u=ls(),h=ll(),d=lc(),f=lu(),p=lh(),m=ld(),g=lf(),y=lm(),v=Function,x=function(e){try{return v('"use strict"; return ('+e+").constructor;")()}catch{}},b=ly(),_=lv(),w=function(){throw new c},T=b?function(){try{return arguments.callee,w}catch{try{return b(arguments,"callee").get}catch{return w}}}():w,M=lx()(),k=lL(),A=l_(),S=lb(),E=lk(),C=lM(),L={},P=typeof Uint8Array>"u"||!k?r:k(Uint8Array),I={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":M&&k?k([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":L,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":M&&k?k(k([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":!(typeof Map>"u")&&M&&k?k(new Map()[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":!(typeof Set>"u")&&M&&k?k(new Set()[Symbol.iterator]()):r,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":M&&k?k(""[Symbol.iterator]()):r,"%Symbol%":M?Symbol:r,"%SyntaxError%":l,"%ThrowTypeError%":T,"%TypedArray%":P,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":C,"%Function.prototype.apply%":E,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":A,"%Math.abs%":h,"%Math.floor%":d,"%Math.max%":f,"%Math.min%":p,"%Math.pow%":m,"%Math.round%":g,"%Math.sign%":y,"%Reflect.getPrototypeOf%":S};if(k)try{null.error}catch(e){z=k(k(e)),I["%Error.prototype%"]=z}var z,D=function e(t){var r;if("%AsyncFunction%"===t)r=x("async function () {}");else if("%GeneratorFunction%"===t)r=x("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=x("async function* () {}");else if("%AsyncGenerator%"===t){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var n=e("%AsyncGenerator%");n&&k&&(r=k(n.prototype))}return I[t]=r,r},O={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},R=lT(),F=lP(),j=R.call(C,Array.prototype.concat),B=R.call(E,Array.prototype.splice),N=R.call(C,String.prototype.replace),U=R.call(C,String.prototype.slice),V=R.call(C,RegExp.prototype.exec),q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,G=function(e){var t=U(e,0,1),r=U(e,-1);if("%"===t&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var i=[];return N(e,q,function(e,t,r,n){i[i.length]=r?N(n,H,"$1"):t||e}),i},W=function(e,t){var r,i=e;if(F(O,i)&&(i="%"+(r=O[i])[0]+"%"),F(I,i)){var n=I[i];if(n===L&&(n=D(i)),typeof n>"u"&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:i,value:n}}throw new l("intrinsic "+e+" does not exist!")};t.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===V(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=G(e),i=r.length>0?r[0]:"",n=W("%"+i+"%",t),a=n.name,o=n.value,s=!1,u=n.alias;u&&(i=u[0],B(r,j([0,1],u)));for(var h=1,d=!0;h=r.length){var g=b(o,f);o=(d=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:o[f]}else d=F(o,f),o=o[f];d&&!s&&(I[a]=o)}}return o}}}),lz=p({"node_modules/call-bound/index.js"(e,t){var r=lI(),i=lE(),n=i([r("%String.prototype.indexOf%")]);t.exports=function(e,t){var a=r(e,!!t);return"function"==typeof a&&n(e,".prototype.")>-1?i([a]):a}}}),lD=p({"node_modules/is-arguments/index.js"(e,t){var r=s9()(),i=lz()("Object.prototype.toString"),n=function(e){return(!r||!e||"object"!=typeof e||!(Symbol.toStringTag in e))&&"[object Arguments]"===i(e)},a=function(e){return!!n(e)||null!==e&&"object"==typeof e&&"length"in e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"callee"in e&&"[object Function]"===i(e.callee)},o=function(){return n(arguments)}();n.isLegacyArguments=a,t.exports=o?n:a}}),lO=p({"node_modules/is-regex/index.js"(e,t){var r,i,n,a,o,s,l=lz(),c=s9()(),u=lP(),h=ly();c?(r=l("RegExp.prototype.exec"),i={},a={toString:n=function(){throw i},valueOf:n},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=n),s=function(e){if(!e||"object"!=typeof e)return!1;var t=h(e,"lastIndex");if(!(t&&u(t,"value")))return!1;try{r(e,a)}catch(e){return e===i}}):(o=l("Object.prototype.toString"),s=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"[object RegExp]"===o(e)}),t.exports=s}}),lR=p({"node_modules/safe-regex-test/index.js"(e,t){var r=lz(),i=lO(),n=r("RegExp.prototype.exec"),a=lo();t.exports=function(e){if(!i(e))throw new a("`regex` must be a RegExp");return function(t){return null!==n(e,t)}}}}),lF=p({"node_modules/generator-function/index.js"(e,t){var r=(function*(){}).constructor;t.exports=()=>r}}),lj=p({"node_modules/is-generator-function/index.js"(e,t){var r=lz(),i=lR()(/^\s*(?:function)?\*/),n=s9()(),a=lL(),o=r("Object.prototype.toString"),s=r("Function.prototype.toString"),l=lF();t.exports=function(e){if("function"!=typeof e)return!1;if(i(s(e)))return!0;if(!n)return"[object GeneratorFunction]"===o(e);if(!a)return!1;var t=l();return t&&a(e)===t.prototype}}}),lB=p({"node_modules/is-callable/index.js"(e,t){var r,i,n,a=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{i=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o(function(){throw 42},null,i)}catch(e){e!==n&&(o=null)}else o=null;var s=/^\s*class\b/,l=function(e){try{var t=a.call(e);return s.test(t)}catch{return!1}},c=function(e){try{return!l(e)&&(a.call(e),!0)}catch{return!1}},u=Object.prototype.toString,h="function"==typeof Symbol&&!!Symbol.toStringTag,d=!(0 in[,]),f=function(){return!1};"object"==typeof document&&(r=document.all,u.call(r)===u.call(document.all)&&(f=function(e){if((d||!e)&&(typeof e>"u"||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch{}return!1})),t.exports=o?function(e){if(f(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,i)}catch(e){if(e!==n)return!1}return!l(e)&&c(e)}:function(e){if(f(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;if(h)return c(e);if(l(e))return!1;var t=u.call(e);return("[object Function]"===t||"[object GeneratorFunction]"===t||!!/^\[object HTML/.test(t))&&c(e)}}}),lN=p({"node_modules/for-each/index.js"(e,t){var r=lB(),i=Object.prototype.toString,n=Object.prototype.hasOwnProperty,a=function(e,t,r){for(var i=0,a=e.length;i=3&&(l=n),"[object Array]"===i.call(e)?a(e,t,l):"string"==typeof e?o(e,t,l):s(e,t,l)}}}),lU=p({"node_modules/possible-typed-array-names/index.js"(e,t){t.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}}),lV=p({"node_modules/available-typed-arrays/index.js"(e,t){var r=lU(),i=typeof globalThis>"u"?window:globalThis;t.exports=function(){for(var e=[],t=0;t3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new n("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],h=!!a&&a(e,t);if(r)r(e,t,{configurable:null===c&&h?h.configurable:!c,enumerable:null===s&&h?h.enumerable:!s,value:o,writable:null===l&&h?h.writable:!l});else if(!u&&(s||l||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=o}}}),lH=p({"node_modules/has-property-descriptors/index.js"(e,t){var r=lv(),i=function(){return!!r};i.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch{return!0}},t.exports=i}}),lG=p({"node_modules/set-function-length/index.js"(e,t){var r=lI(),i=lq(),n=lH()(),a=ly(),o=lo(),s=r("%Math.floor%");t.exports=function(e,t){if("function"!=typeof e)throw new o("`fn` is not a function");if("number"!=typeof t||t<0||t>0xffffffff||s(t)!==t)throw new o("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],l=!0,c=!0;if("length"in e&&a){var u=a(e,"length");u&&!u.configurable&&(l=!1),u&&!u.writable&&(c=!1)}return(l||c||!r)&&(n?i(e,"length",t,!0,!0):i(e,"length",t)),e}}}),lW=p({"node_modules/call-bind-apply-helpers/applyBind.js"(e,t){var r=lT(),i=lk(),n=lS();t.exports=function(){return n(r,i,arguments)}}}),lY=p({"node_modules/call-bind/index.js"(e,t){var r=lG(),i=lv(),n=lE(),a=lW();t.exports=function(e){var t=n(arguments),i=1+e.length-(arguments.length-1);return r(t,i>0?i:0,!0)},i?i(t.exports,"apply",{value:a}):t.exports.apply=a}}),lZ=p({"node_modules/which-typed-array/index.js"(e,t){var r=lN(),i=lV(),n=lY(),a=lz(),o=ly(),s=lL(),l=a("Object.prototype.toString"),c=s9()(),u=typeof globalThis>"u"?window:globalThis,h=i(),d=a("String.prototype.slice"),f=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1?n:"Object"===n&&(i=!1,r(p,function(t,r){if(!i)try{t(e),i=d(r,1)}catch{}}),i)}return o?(t=!1,r(p,function(r,i){if(!t)try{"$"+r(e)===i&&(t=d(i,1))}catch{}}),t):null}}}),l$=p({"node_modules/is-typed-array/index.js"(e,t){var r=lZ();t.exports=function(e){return!!r(e)}}}),lX=p({"node_modules/util/support/types.js"(e){var t,r,i=lD(),n=lj(),a=lZ(),o=l$();function s(e){return e.call.bind(e)}var l="u">typeof BigInt,c="u">typeof Symbol,u=s(Object.prototype.toString),h=s(Number.prototype.valueOf),d=s(String.prototype.valueOf),f=s(Boolean.prototype.valueOf);function p(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch{return!1}}function m(e){return"[object Map]"===u(e)}function g(e){return"[object Set]"===u(e)}function y(e){return"[object WeakMap]"===u(e)}function v(e){return"[object WeakSet]"===u(e)}function x(e){return"[object ArrayBuffer]"===u(e)}function b(e){return!(typeof ArrayBuffer>"u")&&(x.working?x(e):e instanceof ArrayBuffer)}function _(e){return"[object DataView]"===u(e)}function w(e){return!(typeof DataView>"u")&&(_.working?_(e):e instanceof DataView)}l&&(t=s(BigInt.prototype.valueOf)),c&&(r=s(Symbol.prototype.valueOf)),e.isArgumentsObject=i,e.isGeneratorFunction=n,e.isTypedArray=o,e.isPromise=function(e){return"u">typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},e.isArrayBufferView=function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):o(e)||w(e)},e.isUint8Array=function(e){return"Uint8Array"===a(e)},e.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===a(e)},e.isUint16Array=function(e){return"Uint16Array"===a(e)},e.isUint32Array=function(e){return"Uint32Array"===a(e)},e.isInt8Array=function(e){return"Int8Array"===a(e)},e.isInt16Array=function(e){return"Int16Array"===a(e)},e.isInt32Array=function(e){return"Int32Array"===a(e)},e.isFloat32Array=function(e){return"Float32Array"===a(e)},e.isFloat64Array=function(e){return"Float64Array"===a(e)},e.isBigInt64Array=function(e){return"BigInt64Array"===a(e)},e.isBigUint64Array=function(e){return"BigUint64Array"===a(e)},m.working="u">typeof Map&&m(new Map),e.isMap=function(e){return!(typeof Map>"u")&&(m.working?m(e):e instanceof Map)},g.working="u">typeof Set&&g(new Set),e.isSet=function(e){return!(typeof Set>"u")&&(g.working?g(e):e instanceof Set)},y.working="u">typeof WeakMap&&y(new WeakMap),e.isWeakMap=function(e){return!(typeof WeakMap>"u")&&(y.working?y(e):e instanceof WeakMap)},v.working="u">typeof WeakSet&&v(new WeakSet),e.isWeakSet=function(e){return v(e)},x.working="u">typeof ArrayBuffer&&x(new ArrayBuffer),e.isArrayBuffer=b,_.working="u">typeof ArrayBuffer&&"u">typeof DataView&&_(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=w;var T="u">typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function M(e){return"[object SharedArrayBuffer]"===u(e)}function k(e){return!(typeof T>"u")&&(typeof M.working>"u"&&(M.working=M(new T)),M.working?M(e):e instanceof T)}function A(e){return p(e,h)}function S(e){return p(e,d)}function E(e){return p(e,f)}function C(e){return l&&p(e,t)}function L(e){return c&&p(e,r)}e.isSharedArrayBuffer=k,e.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},e.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},e.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},e.isGeneratorObject=function(e){return"[object Generator]"===u(e)},e.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},e.isNumberObject=A,e.isStringObject=S,e.isBooleanObject=E,e.isBigIntObject=C,e.isSymbolObject=L,e.isBoxedPrimitive=function(e){return A(e)||S(e)||E(e)||C(e)||L(e)},e.isAnyArrayBuffer=function(e){return"u">typeof Uint8Array&&(b(e)||k(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw Error(t+" is not supported in userland")}})})}}),lK=p({"node_modules/util/support/isBufferBrowser.js"(e,t){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}}}),lJ=p({"(disabled):node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},i=0;i=o)return e;switch(e){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}default:return e}}),l=n[i];itypeof S&&!0===S.noDeprecation)return t;if(typeof S>"u")return function(){return e.deprecate(t,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(S.throwDeprecation)throw Error(r);S.traceDeprecation?console.trace(r):console.error(r),i=!0}return t.apply(this,arguments)}};var i={},n=/^$/;function a(t,r){var i={seen:[],stylize:s};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),d(r)?i.showHidden=r:r&&e._extend(i,r),g(i.showHidden)&&(i.showHidden=!1),g(i.depth)&&(i.depth=2),g(i.colors)&&(i.colors=!1),g(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=o),l(i,t,i.depth)}function o(e,t){var r=a.styles[t];return r?"\x1b["+a.colors[r][0]+"m"+e+"\x1b["+a.colors[r][1]+"m":e}function s(e,t){return e}function l(t,r,i){if(t.customInspect&&r&&_(r.inspect)&&r.inspect!==e.inspect&&!(r.constructor&&r.constructor.prototype===r)){var n,a,o,s,v,w,T=r.inspect(i,t);return m(T)||(T=l(t,T,i)),T}var M=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return p(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):f(t)?e.stylize("null","null"):void 0}(t,r);if(M)return M;var A=Object.keys(r),S=(v={},A.forEach(function(e,t){v[e]=!0}),v);if(t.showHidden&&(A=Object.getOwnPropertyNames(r)),b(r)&&(A.indexOf("message")>=0||A.indexOf("description")>=0))return c(r);if(0===A.length){if(_(r)){var E=r.name?": "+r.name:"";return t.stylize("[Function"+E+"]","special")}if(y(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(x(r))return t.stylize(Date.prototype.toString.call(r),"date");if(b(r))return c(r)}var C="",L=!1,P=["{","}"];return(h(r)&&(L=!0,P=["[","]"]),_(r)&&(C=" [Function"+(r.name?": "+r.name:"")+"]"),y(r)&&(C=" "+RegExp.prototype.toString.call(r)),x(r)&&(C=" "+Date.prototype.toUTCString.call(r)),b(r)&&(C=" "+c(r)),0!==A.length||L&&0!=r.length)?i<0?y(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),w=L?function(e,t,r,i,n){for(var a=[],o=0,s=t.length;ot}function l(e,t){return e>=t}e.findBin=function(e,i,n){if(t(i.start))return n?Math.ceil((e-i.start)/i.size-1e-9)-1:Math.floor((e-i.start)/i.size+1e-9);var c,u,h=0,d=i.length,f=0,p=d>1?(i[d-1]-i[0])/(d-1):1;for(u=p>=0?n?a:o:n?l:s,e+=1e-9*p*(n?-1:1)*(p>=0?1:-1);h90&&r.log("Long binary search..."),h-1},e.sorterAsc=function(e,t){return e-t},e.sorterDes=function(e,t){return t-e},e.distinctVals=function(t){var r=t.slice();for(r.sort(e.sorterAsc),i=r.length-1;i>-1&&r[i]===n;i--);for(var i,a,o=r[i]-r[0]||1,s=o/(i||1)/1e4,l=[],c=0;c<=i;c++){var u=r[c],h=u-a;void 0===a?(l.push(u),a=u):h>s&&(o=Math.min(o,h),l.push(u),a=u)}return{vals:l,minDiff:o}},e.roundUp=function(e,t,r){for(var i,n=0,a=t.length-1,o=0,s=+!r,l=+!!r,c=r?Math.ceil:Math.floor;n0&&(i=1),r&&i)return e.sort(t)}return i?e:e.reverse()},e.findIndexOfMin=function(e,t){t=t||i;for(var r,n=1/0,a=0;ae4});var e4,e6=f({"src/lib/sort_object_keys.ts"(){e4=e5}}),e8=p({"src/lib/stats.js"(e){var t=C(),r=z().isArrayOrTypedArray;e.aggNums=function(i,n,a,o){var s,l;if((!o||o>a.length)&&(o=a.length),t(n)||(n=!1),r(a[0])){for(l=Array(o),s=0;se.length-1)return e[e.length-1];var i=r%1;return i*e[Math.ceil(r)]+(1-i)*e[Math.floor(r)]}}}),e9=p({"src/lib/angles.js"(e,t){var r=(V(),v(B)),i=r.mod,n=r.modHalf,a=Math.PI,o=2*a;function s(e){return Math.abs(e[1]-e[0])>o-1e-14}function l(e,t){return n(t-e,o)}function c(e,t){if(s(t))return!0;t[0](n=i(n,o))&&(n+=o);var r,n,a=i(e,o),l=a+o;return a>=r&&a<=n||l>=r&&l<=n}function u(e,t,r,i,n,l,c){n=n||0,l=l||0;var u,h,d,f,p,m,g=s([r,i]);function y(e,t){return[e*Math.cos(t)+n,l-e*Math.sin(t)]}g?(h=0,d=a,f=o):r=n&&e<=a)},pathArc:function(e,t,r,i,n){return u(null,e,t,r,i,n,0)},pathSector:function(e,t,r,i,n){return u(null,e,t,r,i,n,1)},pathAnnulus:function(e,t,r,i,n,a){return u(e,t,r,i,n,a,1)}}}}),e7=p({"src/lib/anchor_utils.js"(e){e.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},e.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},e.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},e.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},e.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},e.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}}}),te=p({"src/lib/geometry2d.js"(e){var t,r,i,n=(V(),v(B)).mod;function a(e,t,r,i,n,a,o,s){var l=r-e,c=n-e,u=o-n,h=i-t,d=a-t,f=s-a,p=l*f-u*h;if(0===p)return null;var m=(c*f-u*d)/p,g=(c*h-l*d)/p;return g<0||g>1||m<0||m>1?null:{x:e+l*m,y:t+h*m}}function o(e,t,r,i,n){var a=i*e+n*t;if(a<0)return i*i+n*n;if(a>r){var o=i-e,s=n-t;return o*o+s*s}var l=i*t-n*e;return l*l/r}e.segmentsIntersect=a,e.segmentDistance=function(e,t,r,i,n,s,l,c){if(a(e,t,r,i,n,s,l,c))return 0;var u=r-e,h=i-t,d=l-n,f=c-s,p=u*u+h*h,m=d*d+f*f;return Math.sqrt(Math.min(o(u,h,p,n-e,s-t),o(u,h,p,l-e,c-t),o(d,f,m,e-n,t-s),o(d,f,m,r-n,i-s)))},e.getTextLocation=function(e,a,o,s){if((e!==r||s!==i)&&(t={},r=e,i=s),t[o])return t[o];var l=e.getPointAtLength(n(o-s/2,a)),c=e.getPointAtLength(n(o+s/2,a)),u=Math.atan((c.y-l.y)/(c.x-l.x)),h=e.getPointAtLength(n(o,a)),d={x:(4*h.x+l.x+c.x)/6,y:(4*h.y+l.y+c.y)/6,theta:u};return t[o]=d,d},e.clearLocationCache=function(){r=null},e.getVisibleSegment=function(e,t,r){var i,n,a=t.left,o=t.right,s=t.top,l=t.bottom,c=0,u=e.getTotalLength(),h=u;function d(t){var r=e.getPointAtLength(t);0===t?i=r:t===u&&(n=r);var c=r.xo?r.x-o:0,h=r.yl?r.y-l:0;return Math.sqrt(c*c+h*h)}for(var f=d(c);f;){if((c+=f+r)>h)return;f=d(c)}for(f=d(h);f;){if(c>(h-=f+r))return;f=d(h)}return{min:c,max:h,len:h-c,total:u,isClosed:0===c&&h===u&&.1>Math.abs(i.x-n.x)&&.1>Math.abs(i.y-n.y)}},e.findPointOnPath=function(e,t,r,i){i=i||{};for(var n,a,o,s=i.pathLength||e.getTotalLength(),l=i.tolerance||.001,c=i.iterationLimit||30,u=e.getPointAtLength(0)[r]>e.getPointAtLength(s)[r]?-1:1,h=0,d=0,f=s;h0?f=n:d=n,h++;return a}}}),tt=p({"src/lib/throttle.js"(e){var t={};function r(e){e&&null!==e.timer&&(clearTimeout(e.timer),e.timer=null)}e.throttle=function(e,i,n){var a=t[e],o=Date.now();if(!a){for(var s in t)t[s].tsa.ts+i)?l():a.timer=setTimeout(function(){l(),a.timer=null},i)},e.done=function(e){var r=t[e];return r&&r.timer?new Promise(function(e){var t=r.onDone;r.onDone=function(){t&&t(),e(),r.onDone=null}}):Promise.resolve()},e.clear=function(i){if(i)r(t[i]),delete t[i];else for(var n in t)e.clear(n)}}}),tr=p({"src/lib/clear_responsive.js"(e,t){t.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}}}),ti=p({"node_modules/is-mobile/index.js"(e,t){t.exports=a,t.exports.isMobile=a,t.exports.default=a;var r=/(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,i=/CrOS/,n=/android|ipad|playbook|silk/i;function a(e){e||(e={});let t=e.ua;if(!t&&"u">typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),"string"!=typeof t)return!1;let a=r.test(t)&&!i.test(t)||!!e.tablet&&n.test(t);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==t.indexOf("Macintosh")&&-1!==t.indexOf("Safari")&&(a=!0),a}}}),tn=p({"src/lib/preserve_drawing_buffer.js"(e,t){var r=C(),i=ti();t.exports=function(e){if("string"!=typeof(n=e&&e.hasOwnProperty("userAgent")?e.userAgent:("u">typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),t)))return!0;var t,n,a=i({ua:{headers:{"user-agent":n}},tablet:!0,featureDetect:!1});if(!a){for(var o=n.split(" "),s=1;s-1;l--){var c=o[l];if("Version/"===c.slice(0,8)){var u=c.slice(8).split(".")[0];if(r(u)&&(u*=1),u>=13)return!0}}}return a}}}),ta=p({"src/lib/make_trace_groups.js"(e,t){var r=T();t.exports=function(e,t,i){var n=e.selectAll("g."+i.replace(/\s/g,".")).data(t,function(e){return e[0].trace.uid});n.exit().remove(),n.enter().append("g").attr("class",i),n.order();var a=e.classed("rangeplot")?"nodeRangePlot3":"node3";return n.each(function(e){e[0][a]=r.select(this)}),n}}}),to=p({"src/lib/localize.js"(e,t){var r=eQ();t.exports=function(e,t){for(var i=e._context.locale,n=0;n<2;n++){for(var a=e._context.locales,o=0;o<2;o++){var s=(a[i]||{}).dictionary;if(s){var l=s[t];if(l)return l}a=r.localeRegistry}var c=i.split("-")[0];if(c===i)break;i=c}return t}}}),ts=p({"src/lib/filter_unique.js"(e,t){t.exports=function(e){for(var t={},r=[],i=0,n=0;n1?(r*e+r*t)/r:e+t,n=String(i).length;if(n>16){var a=String(t).length;if(n>=String(e).length+a){var o=parseFloat(i).toPrecision(12);-1===o.indexOf("e+")&&(i=+o)}}return i}}}),tu={};function th(e){return"string"==typeof e&&(e=e.replace(tp,"")),(0,td.default)(e)?Number(e):tf.BADNUM}m(tu,{default:()=>tm});var td,tf,tp,tm,tg=f({"src/lib/clean_number.ts"(){td=y(C()),tf=y(L()),tp=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,tm=th}}),ty=p({"src/lib/slugify.js"(e,t){var r=/<[^>]*>/g,i=/[\p{S}\p{P}]/gu,n=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,a=/�/g,o=/\s+/g,s="-".replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=RegExp(s+"{3,}","g"),c=RegExp(s+"$","g");t.exports=function(e,t=60){var s,u=("function"==typeof(s=e??"").toWellFormed?s.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(s))).replace(a,"").replace(r," ").replace(i,e=>"-"===e?e:"").toLowerCase().trim().replace(o,"-").replace(n,"").replace(l,"-");return u.length<=t?u:Array.from(u).slice(0,t).join("").replace(c,"")}}}),tv=p({"src/lib/index.js"(e,t){var i=T(),a=k().utcFormat,o=A().format,s=C(),l=L(),c=l.FP_SAFE,u=-c,h=l.BADNUM,f=t.exports={};f.adjustFormat=function(e){if(!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e))return e;if("0.f"===e)return"~f";if(/^\d%/.test(e))return"~%";if(/^\ds/.test(e))return"~s";var t=(e.match(/^[+\-( ]?/)||[""])[0],r=e.slice(t.length);return!/^[~,.0$#]/.test(r)&&/[&fps]/.test(r)?t+"~"+r:e};var p={};f.warnBadFormat=function(e){var t=String(e);p[t]||(p[t]=1,f.warn('encountered bad format: "'+t+'"'))},f.noFormat=function(e){return String(e)},f.numberFormat=function(e){var t;try{t=o(f.adjustFormat(e))}catch{return f.warnBadFormat(e),f.noFormat}return t},f.nestedProperty=D(),f.keyedContainer=O(),f.relativeAttr=R(),f.isPlainObject=I(),f.toLogRange=F(),f.relinkPrivateKeys=j();var m=z();f.isArrayBuffer=m.isArrayBuffer,f.isTypedArray=m.isTypedArray,f.isArrayOrTypedArray=m.isArrayOrTypedArray,f.isArray1D=m.isArray1D,f.ensureArray=m.ensureArray,f.concat=m.concat,f.maxRowLength=m.maxRowLength,f.minRowLength=m.minRowLength;var g=(V(),v(B));f.mod=g.mod,f.modHalf=g.modHalf;var y=es();f.valObjectMeta=y.valObjectMeta,f.coerce=y.coerce,f.coerce2=y.coerce2,f.coerceFont=y.coerceFont,f.coercePattern=y.coercePattern,f.coerceHoverinfo=y.coerceHoverinfo,f.coerceSelectionMarkerOpacity=y.coerceSelectionMarkerOpacity,f.validate=y.validate;var x=e0();f.dateTime2ms=x.dateTime2ms,f.isDateTime=x.isDateTime,f.ms2DateTime=x.ms2DateTime,f.ms2DateTimeLocal=x.ms2DateTimeLocal,f.cleanDate=x.cleanDate,f.isJSDate=x.isJSDate,f.formatDate=x.formatDate,f.incrementMonth=x.incrementMonth,f.dateTick0=x.dateTick0,f.dfltRange=x.dfltRange,f.findExactDates=x.findExactDates,f.MIN_MS=x.MIN_MS,f.MAX_MS=x.MAX_MS;var b=e2();f.findBin=b.findBin,f.sorterAsc=b.sorterAsc,f.sorterDes=b.sorterDes,f.distinctVals=b.distinctVals,f.roundUp=b.roundUp,f.sort=b.sort,f.findIndexOfMin=b.findIndexOfMin,f.sortObjectKeys=(e6(),v(e3)).default;var _=e8();f.aggNums=_.aggNums,f.len=_.len,f.mean=_.mean,f.geometricMean=_.geometricMean,f.median=_.median,f.midRange=_.midRange,f.variance=_.variance,f.stdev=_.stdev,f.interp=_.interp;var w=eN();f.init2dArray=w.init2dArray,f.transposeRagged=w.transposeRagged,f.dot=w.dot,f.translationMatrix=w.translationMatrix,f.rotationMatrix=w.rotationMatrix,f.rotationXYMatrix=w.rotationXYMatrix,f.apply3DTransform=w.apply3DTransform,f.apply2DTransform=w.apply2DTransform,f.apply2DTransform2=w.apply2DTransform2,f.convertCssMatrix=w.convertCssMatrix,f.inverseTransformMatrix=w.inverseTransformMatrix;var M=e9();f.deg2rad=M.deg2rad,f.rad2deg=M.rad2deg,f.angleDelta=M.angleDelta,f.angleDist=M.angleDist,f.isFullCircle=M.isFullCircle,f.isAngleInsideSector=M.isAngleInsideSector,f.isPtInsideSector=M.isPtInsideSector,f.pathArc=M.pathArc,f.pathSector=M.pathSector,f.pathAnnulus=M.pathAnnulus;var S=e7();f.isLeftAnchor=S.isLeftAnchor,f.isCenterAnchor=S.isCenterAnchor,f.isRightAnchor=S.isRightAnchor,f.isTopAnchor=S.isTopAnchor,f.isMiddleAnchor=S.isMiddleAnchor,f.isBottomAnchor=S.isBottomAnchor;var E=te();f.segmentsIntersect=E.segmentsIntersect,f.segmentDistance=E.segmentDistance,f.getTextLocation=E.getTextLocation,f.clearLocationCache=E.clearLocationCache,f.getVisibleSegment=E.getVisibleSegment,f.findPointOnPath=E.findPointOnPath;var P=q();f.extendFlat=P.extendFlat,f.extendDeep=P.extendDeep,f.extendDeepAll=P.extendDeepAll,f.extendDeepNoArrays=P.extendDeepNoArrays;var N=J();f.log=N.log,f.warn=N.warn,f.error=N.error,f.counterRegex=(eo(),v(ei)).counter;var U=tt();f.throttle=U.throttle,f.throttleDone=U.done,f.clearThrottle=U.clear;var H=eU();f.getGraphDiv=H.getGraphDiv,f.isPlotDiv=H.isPlotDiv,f.removeElement=H.removeElement,f.addStyleRule=H.addStyleRule,f.addRelatedStyleRule=H.addRelatedStyleRule,f.deleteRelatedStyleRule=H.deleteRelatedStyleRule,f.setStyleOnHover=H.setStyleOnHover,f.getFullTransformMatrix=H.getFullTransformMatrix,f.getElementTransformMatrix=H.getElementTransformMatrix,f.getElementAndAncestors=H.getElementAndAncestors,f.equalDomRects=H.equalDomRects,f.clearResponsive=tr(),f.preserveDrawingBuffer=tn(),f.makeTraceGroups=ta(),f._=to(),f.notifier=K(),f.filterUnique=ts(),f.filterVisible=tl(),f.pushUnique=ec(),f.increment=tc(),f.cleanNumber=(tg(),v(tu)).default,f.slugify=ty(),f.ensureNumber=function(e){return s(e)?(e=Number(e))>c||e=t))&&s(e)&&e>=0&&e%1==0},f.noop=el(),f.identity=e1(),f.repeat=function(e,t){for(var r=Array(t),i=0;ir?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},f.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},f.simpleMap=function(e,t,r,i,n){for(var a=e.length,o=Array(a),s=0;s=Math.pow(2,r)?n>10?(f.warn("randstr failed uniqueness"),s):e(t,r,i,(n||0)+1):s},f.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(i){i[t]=e,r[i.name]=i,r.optionList.push(i)},r["_"+t]=e,r},f.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,i,n,a,o=e.length,s=2*o,l=2*t-1,c=Array(l),u=Array(o);for(r=0;r=s&&(n-=s*Math.floor(n/s)),n<0?n=-1-n:n>=o&&(n=s-1-n),a+=e[n]*c[i];u[r]=a}return u},f.syncOrAsync=function(e,t,r){var i;function n(){return f.syncOrAsync(e,t,r)}for(;e.length;)if((i=(0,e.splice(0,1)[0])(t))&&i.then)return i.then(n);return r&&r(t)},f.stripTrailingSlash=function(e){return"/"===e.slice(-1)?e.slice(0,-1):e},f.noneOrAll=function(e,t,r){if(e){var i,n=!1,a=!0;for(i=0;i0?t:0})},f.fillArray=function(e,t,r,i){if(i=i||f.identity,f.isArrayOrTypedArray(e))for(var n=0;nY.test(window.navigator.userAgent);var Z=/Firefox\/(\d+)\.\d+/;f.getFirefoxVersion=function(){var e=Z.exec(window.navigator.userAgent);if(e&&2===e.length){var t=parseInt(e[1]);if(!isNaN(t))return t}return null},f.isD3Selection=function(e){return e instanceof i.selection},f.ensureSingle=function(e,t,r,i){var n=e.select(t+(r?"."+r:""));if(n.size())return n;var a=e.append(t);return r&&a.classed(r,!0),i&&a.call(i),a},f.ensureSingleById=function(e,t,r,i){var n=e.select(t+"#"+r);if(n.size())return n;var a=e.append(t).attr("id",r);return i&&a.call(i),a},f.objectFromPath=function(e,t){for(var r,i=e.split("."),n=r={},a=0;a1?n+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;i.test(s);)s=s.replace(i,"$1"+a+"$2");return s+l},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var ee=/^\w*$/;f.templateString=function(e,t){var r={};return e.replace(f.TEMPLATE_STRING_REGEX,function(e,i){var n;return ee.test(i)?n=t[i]:(r[i]=r[i]||f.nestedProperty(t,i).get,n=r[i](!0)),void 0!==n?n:""})};var et={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=e=>eh(r(d({},e),n({opts:et})));var er={max:10,count:0,name:"texttemplate"};f.texttemplateString=e=>eh(r(d({},e),n({opts:er})));var en=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,ea={max:10,count:0,name:"texttemplate",parseMultDiv:!0};f.texttemplateStringForShapes=e=>eh(r(d({},e),n({opts:ea})));var eu=/^[:|\|]/;function eh({data:e=[],locale:t,fallback:r,labels:i={},opts:n,template:o}){return o.replace(f.TEMPLATE_STRING_REGEX,(o,s,l)=>{let c,u=["xother","yother"].includes(s),h=["_xother","_yother"].includes(s),d=["_xother_","_yother_"].includes(s),p=["xother_","yother_"].includes(s),m=u||h||p||d;(h||d)&&(s=s.substring(1)),(p||d)&&(s=s.substring(0,s.length-1));let g=null,y=null;if(n.parseMultDiv){var v,x,b,_=(x=(v=s).match(en))?{key:x[1],op:x[2],number:Number(x[3])}:{key:v,op:null,number:null};s=_.key,g=_.op,y=_.number}if(m){if(void 0===i[s])return"";c=i[s]}else for(let t of e)if(t){if(t.hasOwnProperty(s)){c=t[s];break}if(ee.test(s)||(c=f.nestedProperty(t,s).get(!0)),void 0!==c)break}if(void 0===c){let{count:e,max:t,name:i}=n,a=!1===r?o:r;return e=48&&o<=57,c=s>=48&&s<=57;if(l&&(i=10*i+o-48),c&&(n=10*n+s-48),!l||!c){if(i!==n)return i-n;if(o!==s)return o-s}}return n-i};var ed=2e9;f.seedPseudoRandom=function(){ed=2e9},f.pseudoRandom=function(){var e=ed;return 0x19999999>Math.abs((ed=(69069*ed+1)%0x100000000)-e)?f.pseudoRandom():ed/0x100000000},f.fillText=function(e,t,r){var i=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},n=f.extractOption(e,t,"htx","hovertext");if(f.isValidTextValue(n))return i(n);var a=f.extractOption(e,t,"tx","text");if(f.isValidTextValue(a))return i(a)},f.isValidTextValue=function(e){return e||0===e},f.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",i=0;i1&&(c=1):c=0,f.strTranslate(n-c*(r+o),a-c*(i+s))+f.strScale(c)+(l?"rotate("+l+(t?"":" "+r+" "+i)+")":"")},f.setTransormAndDisplay=function(e,t){e.attr("transform",f.getTextTransform(t)),e.style("display",t.scale?null:"none")},f.ensureUniformFontSize=function(e,t){var r=f.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},f.join2=function(e,t,r){var i=e.length;return i>1?e.slice(0,-1).join(t)+r+e[i-1]:e.join(t)},f.bigFont=function(e){return Math.round(1.2*e)};var ef=f.getFirefoxVersion(),ep=null!==ef&&ef<86;f.getPositionFromD3Event=function(){return ep?[i.event.layerX,i.event.layerY]:[i.event.offsetX,i.event.offsetY]}}}),tx=p({"build/plotcss.js"(){var e,t,r=tv(),i={"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(t in i)e=t.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),r.addStyleRule(e,i[t])}}),tb=p({"node_modules/is-browser/client.js"(e,t){t.exports=!0}}),t_=p({"node_modules/has-hover/index.js"(e,t){var r=tb();t.exports="function"==typeof window.matchMedia?!window.matchMedia("(hover: none)").matches:r}}),tw=p({"node_modules/events/events.js"(e,t){var r,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(e,t){return new Promise(function(r,i){var n,a,o;function s(r){e.removeListener(t,l),i(r)}function l(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}g(e,t,l,{once:!0}),"error"!==t&&(n=e,a=s,o={once:!0},"function"==typeof n.on&&g(n,"error",a,o))})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function l(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,i){var n,a,o;if(l(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),void 0===o)o=a[t]=r,++e._eventsCount;else if("function"==typeof o?o=a[t]=i?[r,o]:[o,r]:i?o.unshift(r):o.push(r),(n=c(e))>0&&o.length>n&&!o.warned){o.warned=!0;var s=Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=h.bind(i);return n.listener=r,i.wrapFn=n,n}function f(e,t,r){var i=e._events;if(void 0===i)return[];var n=i[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(e){for(var t=Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var o,s=Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else for(var c=l.length,u=m(l,c),r=0;r=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,n=a;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}}}),tT=p({"src/lib/events.js"(e,t){var r=tw().EventEmitter;t.exports={init:function(e){if(e._ev instanceof r)return e;var t=new r,i=new r;return e._ev=t,e._internalEv=i,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=i.on.bind(i),e._internalOnce=i.once.bind(i),e._removeInternalListener=i.removeListener.bind(i),e._removeAllInternalListeners=i.removeAllListeners.bind(i),e.emit=function(e,r){t.emit(e,r),i.emit(e,r)},"function"==typeof e.addEventListener&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var i,n=e._ev;if(n){var a=n._events[t];if(a){for(a=Array.isArray(a)?a:[a],i=0;ii.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)},n.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},n.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},n.undo=function(e){var t,r;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=a.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];if(!x(o))return!1;e=a[n][o]}else e=a[n]}else e=a}}return e}function x(e){return e===Math.round(e)&&e>=0}function b(t){var r,i;return r=t,e.crawl(r,function(t,r,i){!e.isValObject(t)&&u(t)&&(t.role="object")}),i=t,e.crawl(i,function(e,t,r){if(e){var i=e[m];i&&(delete e[m],r[t]={items:{}},r[t].items[i]=e,r[t].role="object")}}),!function e(t){for(var r in t)if(u(t[r]))e(t[r]);else if(Array.isArray(t[r]))for(var i=0;i=a&&(n._input||{})._templateitemname;s&&(o=a);var l,c=r+"["+o+"]";function u(){l={},s&&(l[c]={},l[c][i]=s)}function h(e,r){s?t.nestedProperty(l[c],e).set(r):l[c+"."+e]=r}function d(){var e=l;return u(),e}return u(),{modifyBase:function(e,t){l[e]=t},modifyItem:h,getUpdateObj:d,applyUpdate:function(r,i){r&&h(r,i);var n=d();for(var a in n)t.nestedProperty(e,a).set(n[a])}}}}}),tE=p({"src/plots/cartesian/constants.js"(e,t){var r=(eo(),v(ei)).counter;t.exports={idRegex:{x:r("x","( domain)?"),y:r("y","( domain)?")},attrRegex:r("[xy]axis"),xAxisMatch:r("xaxis"),yAxisMatch:r("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"}}}),tC=p({"src/plots/cartesian/axis_ids.js"(e){var t=eQ(),r=tE();function i(e,t){if(t&&t.length){for(var r=0;ri?1:-1:(e.slice(1)||1)-(t.slice(1)||1)},e.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},e.isLinked=function(e,t){return i(t,e._axisMatchGroups)||i(t,e._axisConstraintGroups)}}}),tL=p({"src/components/shapes/handle_outline.js"(e,t){t.exports={clearOutlineControllers:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()},clearOutline:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}}}}),tP=p({"src/traces/scatter/layout_attributes.js"(e,t){t.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}}),tI=p({"src/plots/get_data.js"(e){var t=eQ();tE().SUBPLOT_PATTERN,e.getSubplotCalcData=function(e,r,i){var n=t.subplotsRegistry[r];if(!n)return[];for(var a=n.attr,o=[],s=0;s0?".":"")+a;r.isPlainObject(s)?o(s,t,l,n+1):t(l,a,s)}})}e.manageCommandObserver=function(t,n,a,o){var s={},l=!0;n&&n._commandObserver&&(s=n._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=e.hasSimpleAPICommandBindings(t,a,s.lookupTable);if(n&&n._commandObserver){if(c)return s;if(n._commandObserver.remove)return n._commandObserver.remove(),n._commandObserver=null,s}if(c){i(t,c,s.cache),s.check=function(){if(l){var e=i(t,c,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;h1&&z.length>1){for(s.getComponentMethod("grid","sizeDefaults")(c,l),o=0;o15&&z.length>15&&0===l.shapes.length&&0===l.images.length,w.linkSubplots(d,l,h,a),w.cleanPlot(d,l,h,a);var B=!!(a._has&&a._has("cartesian")),N=!!(l._has&&l._has("cartesian"));B&&!N?a._bgLayer.remove():N&&!B&&(l._shouldCreateBgLayer=!0),a._zoomlayer&&!e._dragging&&p({_fullLayout:a}),function(e,t){var r,i=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var n=0;n0){var h=1-2*s;i=Math.round(h*i),a=Math.round(h*a)}}var d=w.layoutAttributes.width.min,f=w.layoutAttributes.height.min;i1,m=!t.height&&Math.abs(r.height-a)>1;(m||p)&&(p&&(r.width=i),m&&(r.height=a)),e._initialAutoSize||(e._initialAutoSize={width:i,height:a}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(e,t,r,i){var n,a,o,l=s.componentsRegistry,c=t._basePlotModules,h=s.subplotsRegistry.cartesian;for(n in l)(o=l[n]).includeBasePlot&&o.includeBasePlot(e,t);for(var d in c.length||c.push(h),t._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(e,t),h.finalizeSubplots(e,t)),t._subplots)t._subplots[d].sort(u.subplotSort);for(a=0;a1&&(r.l/=y,r.r/=y)}if(f){var v=(r.t+r.b)/f;v>1&&(r.t/=v,r.b/=v)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,T=void 0!==r.yb?r.yb:r.y;p[t]={l:{val:x,size:r.l+g},r:{val:b,size:r.r+g},b:{val:T,size:r.b+g},t:{val:_,size:r.t+g}},m[t]=1}else delete p[t],delete m[t];if(!i._replotting)return w.doAutoMargin(e)}},w.doAutoMargin=function(e){var t,r,i=e._fullLayout,a=i.width,o=i.height;i._size||(i._size={}),D(i);var l=i._size,c=i.margin,h={t:0,b:0,l:0,r:0},d=u.extendFlat({},l),p=c.l,m=c.r,g=c.t,y=c.b,v=i._pushmargin,x=i._pushmarginIds,b=i.minreducedwidth,_=i.minreducedheight;if(!1!==c.autoexpand){for(var T in v)x[T]||delete v[T];var M=e._fullLayout._reservedMargin;for(var k in M)for(var A in M[k]){var S=M[k][A];h[A]=Math.max(h[A],S)}for(var E in v.base={l:{val:0,size:p},r:{val:1,size:m},t:{val:1,size:g},b:{val:0,size:y}},h){var C=0;for(var L in v)"base"!==L&&n(v[L][E].size)&&(C=v[L][E].size>C?v[L][E].size:C);var P=Math.max(0,c[E]-C);h[E]=Math.max(0,h[E]-P)}for(var I in v){var z=v[I].l||{},O=v[I].b||{},R=z.val,F=z.size,j=O.val,B=O.size,N=a-h.r-h.l,U=o-h.t-h.b;for(var V in v){if(n(F)&&v[V].r){var q=v[V].r.val,H=v[V].r.size;if(q>R){var G=(F*q+(H-N)*R)/(q-R),W=(H*(1-R)+(F-N)*(1-q))/(q-R);G+W>p+m&&(p=G,m=W)}}if(n(B)&&v[V].t){var Y=v[V].t.val,Z=v[V].t.size;if(Y>j){var $=(B*Y+(Z-U)*j)/(Y-j),X=(Z*(1-j)+(B-U)*(1-Y))/(Y-j);$+X>y+g&&(y=$,g=X)}}}}}var K=u.constrain(a-c.l-c.r,2,b),J=u.constrain(o-c.t-c.b,2,_),Q=Math.max(0,a-K),ee=Math.max(0,o-J);if(Q){var et=(p+m)/Q;et>1&&(p/=et,m/=et)}if(ee){var er=(y+g)/ee;er>1&&(y/=er,g/=er)}if(l.l=Math.round(p)+h.l,l.r=Math.round(m)+h.r,l.t=Math.round(g)+h.t,l.b=Math.round(y)+h.b,l.p=Math.round(c.pad),l.w=Math.round(a)-l.l-l.r,l.h=Math.round(o)-l.t-l.b,!i._replotting&&(w.didMarginChange(d,l)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=f.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in i?i._redrawFromAutoMarginCount++:i._redrawFromAutoMarginCount=1;var ei=3*(1+Object.keys(x).length);if(i._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){i=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return s.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var a=0,o=0;function l(){return a++,function(){var t;o++,i||o!==a||(t=n,e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return s.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(t)))}}r.runFn(l),setTimeout(l())})}],a=u.syncOrAsync(n,e);return a&&a.then||(a=Promise.resolve()),a.then(function(){return e})}w.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},w.graphJson=function(e,t=!1,r="json",i=!1,n=!1){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&w.supplyDefaults(e);var o=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function c(e,t){if("function"==typeof e)return t?"_function_":null;if(u.isPlainObject(e)){var r={};return Object.keys(e).sort().forEach(function(i){if(-1===["_","["].indexOf(i.charAt(0))){if("function"==typeof e[i]){t&&(r[i]="_function");return}r[i]=c(e[i],t)}}),r}var i=Array.isArray(e),n=u.isTypedArray(e);if((i||n)&&e.dtype&&e.shape){var o=e.bdata;return c({dtype:e.dtype,shape:e.shape,bdata:u.isArrayBuffer(o)?a.encode(o):o},t)}return i?e.map(function(e){return c(e,t)}):n?u.simpleMap(e,u.identity):u.isJSDate(e)?u.ms2DateTimeLocal(+e):e}var h={data:(o||[]).map(function(e){var r=c(e);return t&&delete r.fit,r})};if(!t&&(h.layout=c(s),i)){var d=s._size;h.layout.computed={margin:{b:d.b,l:d.l,r:d.r,t:d.t}}}return l&&(h.frames=c(l)),n&&(h.config=c(e._context,!0)),"object"===r?h:JSON.stringify(h)},w.modifyFrames=function(e,t){var r,i,n,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;re?e.match(o):null;e.matchTex=s,e.convertToTspans=function(o,y,T){let C;var L=o.text(),z=!o.attr("data-notex")&&y&&y._context.typesetMath&&s(L);z&&!(3===(C=h())||4===C||(null===C?d||(d=!0,r.warn("MathJax is not loaded. Math equations will not be rendered.")):f||(f=!0,r.warn("Unsupported MathJax version:",MathJax.version)),0))&&(z=null);var D=t.select(o.node().parentNode);if(!D.empty()){var O=o.attr("class")?o.attr("class").split(" ")[0]:"text";return O+="-math",D.selectAll("svg."+O).remove(),D.selectAll("g."+O+"-group").remove(),o.style("display",null).attr({"data-unformatted":L,"data-math":"N"}),z?(y&&y._promises||[]).push(new Promise(function(e){let n;o.style("display","none");var a,s,d,f,p=parseInt(o.node().style.fontSize,10),m={fontSize:p},g=o.attr("text-anchor");a=z[2],s=m,d=function(t,r,n){D.selectAll("svg."+O).remove(),D.selectAll("g."+O+"-group").remove();var a=t&&t.select("svg");if(!a||!a.node()){R(),e();return}o.style("display","none");var s=D.append("g").classed(O+"-group",!0).attr({"pointer-events":"none","data-unformatted":L,"data-math":"Y"});s.node().appendChild(a.node()),r&&r.node()&&a.node().insertBefore(r.node().cloneNode(!0),a.node().firstChild);var l=n.width,c=n.height;a.attr({class:O,height:c,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":m.fontSize+"px"});var u=o.node().style.fill||"black",h=a.select("g");h.attr({fill:u,stroke:u});var d=h.node().getBoundingClientRect(),f=d.width,y=d.height;(f>l||y>c)&&(a.style("overflow","hidden"),f=(d=a.node().getBoundingClientRect()).width,y=d.height);var v=+o.attr("x"),x=+o.attr("y"),b=-(p||o.node().getBoundingClientRect().height)/4;"y"===O[0]?s.attr({transform:"rotate("+[-90,v,x]+")"+i(-f/2,b-y/2)}):"l"===O[0]?x=b-y/2:"a"===O[0]&&0!==O.indexOf("atitle")?(v=0,x=b):(v-=f*("middle"===g?.5:+("end"===g)),x=x+b-y/2),a.attr({x:v,y:x}),T&&T.call(o,s),e(s)},n=h(),Promise.resolve().then(function(){if(!u){let e=MathJax._.output.svg_ts.SVG,t=r.extendFlat({},MathJax.config.svg,{fontCache:"local"});4===n&&(t.linebreaks=r.extendFlat({},t.linebreaks,{inline:!1})),u=MathJax._.mathjax.mathjax.document(document,r.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new e(t)}))}let e="math-output-"+r.randstr({},64);f=t.select("body").append("div").attr({id:e}).style({visibility:"hidden",position:"absolute","font-size":s.fontSize+"px"});let i=a.replace(l,"\\lt ").replace(c,"\\gt ").replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return u.convert(i,{display:!1})}).then(function(e){f.node().appendChild(e)})}).then(function(){let e=f.select(".MathJax"),t=!e.empty()&&f.select("svg").node();if(t){let r=t.getBoundingClientRect(),i=e.select("defs");d(e,i,r)}else r.log("There was an error in the tex syntax.",a),d();f.remove()}).catch(e=>{r.log("MathJax typesetting failed.",a,e),f&&f.remove(),d()})})):R(),o}function R(){D.empty()||(O=o.attr("class")+"-math",D.select("svg."+O).remove()),o.text("").style("white-space","pre"),function(e,i){i=i.replace(v," ");var o,s=!1,l=[],c=-1;function u(){c++;var r=document.createElementNS(n.svg,"tspan");t.select(r).attr({class:"line",dy:c*a+"em"}),e.appendChild(r),o=r;var i=l;if(l=[{node:r}],i.length>1)for(var s=1;s.",i);var t=l.pop();e!==t.type&&r.log("Start tag <"+t.type+"> doesnt match end tag <"+e+">. Pretending it did match.",i),o=l[l.length-1].node}(L);else{var D=C[4],O={type:L},R=S(D,w);if(R?(R=R.replace(E,"$1 fill:"),z&&(R+=";"+z)):z&&(R=z),R&&(O.style=R),"a"===L){s=!0;var F=S(D,M);if(F){var j=I(F);j&&(O.href=j,O.target=S(D,k)||"_blank",O.popup=S(D,A))}}h(O)}}return s}(o.node(),L)&&o.style("pointer-events","all"),e.positionText(o),T&&T.call(o)}};var l=/(<|<|<)/g,c=/(>|>|>)/g,u=null,h=()=>"u">typeof MathJax&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,d=!1,f=!1,p={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"},m={sub:"0.3em",sup:"-0.6em"},g={sub:"-0.21em",sup:"0.42em"},y=["http:","https:","mailto:","",void 0,":"],v=e.NEWLINES=/(\r\n?|\n)/g,x=/(<[^<>]*>)/,b=/<(\/?)([^ >]*)(\s+(.*))?>/i,_=//i;e.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,M=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,k=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,A=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function S(e,t){if(!e)return null;var r=e.match(t),i=r&&(r[3]||r[4]);return i&&P(i)}var E=/(^|;)\s*color:/;e.plainText=function(e,t){t=t||{};for(var r=void 0!==t.len&&-1!==t.len?t.len:1/0,i=void 0!==t.allowedTags?t.allowedTags:["br"],n=e.split(x),a=[],o="",s=0,l=0;l3?a.push(c.slice(0,Math.max(0,f-3))+"..."):a.push(c.slice(0,f));break}o=""}}return a.join("")};var C={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},L=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function P(e){return e.replace(L,function(e,t){return("#"===t.charAt(0)?function(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r((e>>10)+55232,e%1024+56320)}}("x"===t.charAt(1)?parseInt(t.slice(2),16):parseInt(t.slice(1),10)):C[t])||e})}function I(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),i=document.createElement("a");r.href=e,i.href=t;var n=r.protocol,a=i.protocol;return -1!==y.indexOf(n)&&-1!==y.indexOf(a)?t:""}function z(e,t,i){var n,a,o,s=i.horizontalAlign,l=i.verticalAlign||"top",c=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return a="bottom"===l?function(){return c.bottom-n.height}:"middle"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o="right"===s?function(){return c.right-n.width}:"center"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var e=o()-u.left,t=a()-u.top,s=i.gd||{};if(i.gd){s._fullLayout._calcInverseTransform(s);var l=r.apply3DTransform(s._fullLayout._invTransform)(e,t);e=l[0],t=l[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}e.convertEntities=P,e.sanitizeHTML=function(e){e=e.replace(v," ");for(var r=document.createElement("p"),i=r,n=[],a=e.split(x),o=0;o=0;i--,n++){var a=e[i];r[n]=[1-a[0],a[1]]}return r}function d(e,t){t=t||{};for(var n=e.domain,o=e.range,s=o.length,l=Array(s),c=0;cm-f?f=m-(p-m):p-m=0?s.colorscale.sequential:s.colorscale.sequentialminus,h._sync("colorscale",o))}}}),t3=p({"src/components/colorscale/index.js"(e,t){var r=et(),i=tj();t.exports={moduleType:"component",name:"colorscale",attributes:tV(),layoutAttributes:tq(),supplyLayoutDefaults:t0(),handleDefaults:tQ(),crossTraceDefaults:t1(),calc:t2(),scales:r.scales,defaultScale:r.defaultScale,getScale:r.get,isValidScale:r.isValid,hasColorscale:i.hasColorscale,extractOpts:i.extractOpts,extractScale:i.extractScale,flipScale:i.flipScale,makeColorScaleFunc:i.makeColorScaleFunc,makeColorScaleFuncFromTrace:i.makeColorScaleFuncFromTrace}}}),t5=p({"src/traces/scatter/subtypes.js"(e,t){var r=tv(),i=z().isTypedArraySpec;t.exports={hasLines:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("lines")},hasMarkers:function(e){return e.visible&&(e.mode&&-1!==e.mode.indexOf("markers")||"splom"===e.type)},hasText:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("text")},isBubble:function(e){var t=e.marker;return r.isPlainObject(t)&&(r.isArrayOrTypedArray(t.size)||i(t.size))}}}}),t4=p({"src/traces/scatter/make_bubble_size_func.js"(e,t){var r=C();t.exports=function(e,t){t||(t=2);var i=e.marker,n=i.sizeref||1,a=i.sizemin||0,o="area"===i.sizemode?function(e){return Math.sqrt(e/n)}:function(e){return e/n};return function(e){var i=o(e/t);return r(i)&&i>0?Math.max(i,a):0}}}}),t6=p({"src/components/fx/helpers.js"(e){var t=tv();e.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},e.isTraceInSubplots=function(t,r){if("splom"===t.type){for(var i=t.xaxes||[],n=t.yaxes||[],a=0;a=0&&r.index{let o,s=i.toLowerCase(),l=i,c=(o=a.match(n))?o.map(Number):[];for("m"===s&&c.length>2&&(t.push([l,...c.splice(0,2)]),s="l",l="m"===l?"l":"L");;){if(c.length===r[s])return t.push([l,...c]),"";if(c.length=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}A.symbolNumber=function(e){if(f(e))e*=1;else if("string"==typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=A.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=I||e>=400?0:Math.floor(Math.max(e,0))};var D=d("~f"),O={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}};function R(e,t,r,i,n,a,o,s,l,c){var d,f=n.length;"linear"===i?d={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:c}:"radial"===i&&(d={node:"radialGradient",reversed:c});for(var p=Array(f),g=0;g=0&&void 0===e.i&&(e.i=a.i),t.style("opacity",i.selectedOpacityFn?i.selectedOpacityFn(e):void 0===e.mo?o.opacity:e.mo),i.ms2mrc){l="various"===e.ms||"various"===o.size?3:i.ms2mrc(e.ms),e.mrc=l,i.selectedSizeFn&&(l=e.mrc=i.selectedSizeFn(e));var l,c=A.symbolNumber(e.mx||o.symbol)||0;e.om=c%200>=100;var u=ea(e,r),d=J(e,r);t.attr("d",z(c,l,u,d))}var f,p,g,y=!1;if(e.so)g=s.outlierwidth,p=s.outliercolor,f=o.outliercolor;else{var v=(s||{}).width;g=(e.mlw+1||v+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,p="mlc"in e?e.mlcc=i.lineScale(e.mlc):h.isArrayOrTypedArray(s.color)?m.defaultLine:s.color,h.isArrayOrTypedArray(o.color)&&(f=m.defaultLine,y=!0),f="mc"in e?e.mcc=i.markerScale(e.mc):o.color||o.colors||"rgba(0,0,0,0)",i.selectedColorFn&&(f=i.selectedColorFn(e))}let x=e.mld||(s||{}).dash;if(x&&A.dashLine(t,x,g),e.om)t.call(m.stroke,f).style({"stroke-width":(g||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:g)+"px");var b=o.gradient,_=e.mgt;_?y=!0:_=b&&b.type,h.isArrayOrTypedArray(_)&&(O[_=_[0]]||(_=0));var w=o.pattern,T=A.getPatternAttr,M=w&&(T(w.shape,e.i,"")||T(w.path,e.i,""));if(_&&"none"!==_){var k=e.mgc;k?y=!0:k=b.color;var S=r.uid;y&&(S+="-"+e.i),A.gradient(t,n,S,_,[[0,k],[1,f]],"fill")}else if(M){var E=!1,C=w.fgcolor;!C&&a&&a.color&&(C=a.color,E=!0);var L=T(C,e.i,a&&a.color||null),P=T(w.bgcolor,e.i,null),I=w.fgopacity,D=T(w.size,e.i,8),R=T(w.solidity,e.i,.3);E=E||e.mcc||h.isArrayOrTypedArray(w.shape)||h.isArrayOrTypedArray(w.path)||h.isArrayOrTypedArray(w.bgcolor)||h.isArrayOrTypedArray(w.fgcolor)||h.isArrayOrTypedArray(w.size)||h.isArrayOrTypedArray(w.solidity);var F=r.uid;E&&(F+="-"+e.i),A.pattern(t,"point",n,F,M,D,R,e.mcc,w.fillmode,P,L,I)}else h.isArrayOrTypedArray(f)?m.fill(t,f[e.i]):m.fill(t,f);g&&m.stroke(t,p)}},A.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=A.tryColorscale(r,""),t.lineScale=A.tryColorscale(r,"line"),p.traceIs(e,"symbols")&&(t.ms2mrc=w.isBubble(e)?M(e):function(){return(r.size||6)/2}),e.selectedpoints&&h.extendFlat(t,A.makeSelectedPointStyleFns(e)),t},A.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},i=e.unselected||{},n=e.marker||{},a=r.marker||{},o=i.marker||{},s=n.opacity,l=a.opacity,c=o.opacity,u=void 0!==l,d=void 0!==c;(h.isArrayOrTypedArray(s)||u||d)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?n.opacity:e.mo;return e.selected?u?l:t:d?c:_*t});var f=n.color,m=a.color,g=o.color;(m||g)&&(t.selectedColorFn=function(e){var t=e.mcc||f;return e.selected?m||t:g||t});var y=n.size,v=a.size,x=o.size,b=void 0!==v,w=void 0!==x;return p.traceIs(e,"symbols")&&(b||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||y/2;return e.selected?b?v/2:t:w?x/2:t}),t},A.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},i=e.unselected||{},n=e.textfont||{},a=r.textfont||{},o=i.textfont||{},s=n.color,l=a.color,c=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||s;return e.selected?l||t:c||(l?t:m.addOpacity(t,_))},t},A.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=A.makeSelectedPointStyleFns(t),i=t.marker||{},n=[];r.selectedOpacityFn&&n.push(function(e,t){e.style("opacity",r.selectedOpacityFn(t))}),r.selectedColorFn&&n.push(function(e,t){m.fill(e,r.selectedColorFn(t))}),r.selectedSizeFn&&n.push(function(e,n){var a=n.mx||i.symbol||0,o=r.selectedSizeFn(n);e.attr("d",z(A.symbolNumber(a),o,ea(n,t),J(n,t))),n.mrc2=o}),n.length&&e.each(function(e){for(var t=u.select(this),r=0;r0?r:0}function N(e,t,r){return r&&(e=W(e)),t?V(e[1]):U(e[0])}function U(e){var t=u.round(e,2);return r=t,t}function V(e){var t=u.round(e,2);return i=t,t}function q(e,t,r,i){var n=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(n*n+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*n-l*l*o)*i,h=(c*c*a-l*l*s)*i,d=3*c*(l+c),f=3*l*(l+c);return[[U(t[0]+(d&&u/d)),V(t[1]+(d&&h/d))],[U(t[0]-(f&&u/f)),V(t[1]-(f&&h/f))]]}A.textPointStyle=function(e,t,r){if(e.size()){if(t.selectedpoints){var i;i=A.makeSelectedTextStyleFns(t).selectedTextColorFn}var n=t.texttemplate,a=r._fullLayout;e.each(function(e){var o=u.select(this),s=n?h.extractOption(e,t,"txt","texttemplate"):h.extractOption(e,t,"tx","text");if(!s&&0!==s)return void o.remove();if(n){var l=t._module.formatLabels,c=l?l(e,t,a):{},d={};k(d,t,e.i),s=h.texttemplateString({data:[d,e,t._meta],fallback:t.texttemplatefallback,labels:c,locale:a._d3locale,template:s})}var f=e.tp||t.textposition,p=B(e,t),m=i?i(e):e.tc||t.textfont.color;o.call(A.font,{family:e.tf||t.textfont.family,weight:e.tw||t.textfont.weight,style:e.ty||t.textfont.style,variant:e.tv||t.textfont.variant,textcase:e.tC||t.textfont.textcase,lineposition:e.tE||t.textfont.lineposition,shadow:e.tS||t.textfont.shadow,size:p,color:m}).text(s).call(v.convertToTspans,r).call(j,f,p,e.mrc)})}},A.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=A.makeSelectedTextStyleFns(t);e.each(function(e){var i=u.select(this),n=r.selectedTextColorFn(e),a=e.tp||t.textposition,o=B(e,t);m.fill(i,n);var s=p.traceIs(t,"bar-like");j(i,a,o,e.mrc2||e.mrc,s)})}},A.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,i="M"+e[0],n=[];for(r=1;r=u||_>=f&&_<=u)&&(w<=p&&w>=d||w>=p&&w<=d)&&(e=[_,w])}return e}A.steps=function(e){var t=H[e]||G;return function(e){for(var r="M"+U(e[0][0])+","+V(e[0][1]),i=e.length,n=1;n=1e4&&(A.savedBBoxes={},Y=0),r&&(A.savedBBoxes[r]=m),Y++,h.extendFlat({},m)},A.setClipUrl=function(e,t,r){e.attr("clip-path",$(t,r))},A.getTranslate=function(e){var t=e.attr?"attr":"getAttribute",r=(e[t]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(e,t,r){return[t,r].join(" ")}).split(" ");return{x:+r[0]||0,y:+r[1]||0}},A.setTranslate=function(e,t,r){var i=e.attr?"attr":"getAttribute",n=e.attr?"attr":"setAttribute",a=e[i]("transform")||"";return t=t||0,r=r||0,a=(a=a.replace(/(\btranslate\(.*?\);?)/,"").trim()+y(t,r)).trim(),e[n]("transform",a),a},A.getScale=function(e){var t=e.attr?"attr":"getAttribute",r=(e[t]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(e,t,r){return[t,r].join(" ")}).split(" ");return{x:+r[0]||1,y:+r[1]||1}},A.setScale=function(e,t,r){var i=e.attr?"attr":"getAttribute",n=e.attr?"attr":"setAttribute",a=e[i]("transform")||"";return t=t||1,r=r||1,a=(a=a.replace(/(\bscale\(.*?\);?)/,"").trim()+("scale("+t+","+r)+")").trim(),e[n]("transform",a),a};var X=/\s*sc.*/;A.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var i=1===t&&1===r?"":"scale("+t+","+r+")";e.each(function(){var e=(this.getAttribute("transform")||"").replace(X,"");e+=i,e=e.trim(),this.setAttribute("transform",e)})}};var K=/translate\([^)]*\)\s*$/;function J(e,t){var r;return e&&(r=e.mf),void 0===r&&(r=t.marker&&t.marker.standoff||0),t._geo||t._xA?r:-r}A.setTextPointsScale=function(e,t,r){e&&e.each(function(){var e,i=u.select(this),n=i.select("text");if(n.node()){var a=parseFloat(n.attr("x")||0),o=parseFloat(n.attr("y")||0),s=(i.attr("transform")||"").match(K);e=1===t&&1===r?[]:[y(a,o),"scale("+t+","+r+")",y(-a,-o)],s&&e.push(s),i.attr("transform",e.join(""))}})},A.getMarkerStandoff=J;var Q=Math.atan2,et=Math.cos,ei=Math.sin;function en(e,t){var r=t[0],i=t[1];return[r*et(e)-i*ei(e),r*ei(e)+i*et(e)]}function ea(e,t){var r=e.ma;void 0===r&&(!f(r=t.marker.angle)||h.isArrayOrTypedArray(r))&&(r=0);var i,u,d=t.marker.angleref;if("previous"===d||"north"===d){if(t._geo){var p=t._geo.project(e.lonlat);i=p[0],u=p[1]}else{var m=t._xA,g=t._yA;if(!m||!g)return 90;i=m.c2p(e.x),u=g.c2p(e.y)}if(t._geo){var y,v=e.lonlat[0],x=e.lonlat[1],b=t._geo.project([v,x+1e-5]),_=t._geo.project([v+1e-5,x]),w=Q(_[1]-u,_[0]-i),T=Q(b[1]-u,b[0]-i);if("north"===d)y=r/180*Math.PI;else if("previous"===d){var M=x/180*Math.PI,k=a/180*Math.PI,A=n/180*Math.PI-v/180*Math.PI;y=-Q(et(k)*ei(A),ei(k)*et(M)-et(k)*ei(M)*et(A))-Math.PI,n=v,a=x}var S=en(w,[et(y),0]),E=en(T,[ei(y),0]);r=Q(S[1]+E[1],S[0]+E[0])/Math.PI*180,"previous"===d&&(c!==t.uid||e.i!==l+1)&&(r=null)}if("previous"===d&&!t._geo)if(c===t.uid&&e.i===l+1&&f(i)&&f(u)){var C=i-o,L=u-s,P=t.line&&t.line.shape||"",I=P.slice(P.length-1);"h"===I&&(L=0),"v"===I&&(C=0),r+=Q(L,C)/Math.PI*180+90}else r=null}return o=i,s=u,l=e.i,c=t.uid,r}A.getMarkerAngle=ea}}),re=p({"src/components/titles/index.js"(e,t){var r=T(),i=C(),n=tD(),a=eQ(),o=tv(),s=o.strTranslate,l=t7(),c=ee(),u=tF(),h=er(),d=tR().OPPOSITE_SIDE,f=/ [XY][0-9]* /;t.exports={draw:function(e,t,p){var m,g=e._fullLayout,y=p.propContainer,v=p.propName,x=p.placeholder,b=p.traceIndex,_=p.avoid||{},w=p.attributes,T=p.transform,M=p.containerGroup,k=1,A=y.title,S=(A&&A.text?A.text:"").trim(),E=!1,C=A&&A.font?A.font:{},L=C.family,P=C.size,I=C.color,z=C.weight,D=C.style,O=C.variant,R=C.textcase,F=C.lineposition,j=C.shadow,B=!!p.subtitlePropName,N=p.subtitlePlaceholder,U=(y.title||{}).subtitle||{text:"",font:{}},V=(U.text||"").trim(),q=!1,H=1,G=U.font,W=G.family,Y=G.size,Z=G.color,$=G.weight,X=G.style,K=G.variant,J=G.textcase,Q=G.lineposition,ee=G.shadow;"title.text"===v?m="titleText":-1!==v.indexOf("axis")?m="axisTitleText":-1!==v.indexOf("colorbar")&&(m="colorbarTitleText");var et=e._context.edits[m];function er(e,t){return void 0!==e&&void 0!==t&&e.replace(f," % ")===t.replace(f," % ")}""===S?k=0:er(S,x)&&(et||(S=""),k=.2,E=!0),B&&(""===V?H=0:er(V,N)&&(et||(V=""),H=.2,q=!0)),p._meta?S=o.templateString(S,p._meta):g._meta&&(S=o.templateString(S,g._meta));var ei,en=S||V||et;M||(M=o.ensureSingle(g._infolayer,"g","g-"+t),ei=g._hColorbarMoveTitle);var ea=M.selectAll("text."+t).data(en?[0]:[]);ea.enter().append("text"),ea.text(S).attr("class",t),ea.exit().remove();var eo=null,es=t+"-subtitle",el=V||et;if(B&&((eo=M.selectAll("text."+es).data(el?[0]:[])).enter().append("text"),eo.text(V).attr("class",es),eo.exit().remove()),!en)return M;function ec(e,t){o.syncOrAsync([eu,eh],{title:e,subtitle:t})}function eu(i){var a,h=i.title,d=i.subtitle;if(!T&&ei&&(T={}),T?(a="",T.rotate&&(a+="rotate("+[T.rotate,w.x,w.y]+")"),(T.offset||ei)&&(a+=s(0,(T.offset||0)-(ei||0)))):a=null,h.attr("transform",a),h.style("opacity",k*c.opacity(I)).call(l.font,{color:c.rgb(I),size:r.round(P,2),family:L,weight:z,style:D,variant:O,textcase:R,shadow:j,lineposition:F}).attr(w).call(u.convertToTspans,e,function(e){if(e){var t=r.select(e.node().parentNode).select("."+es);if(!t.empty()){var i=e.node().getBBox();if(i.height){var n=i.y+i.height+1.6*Y;t.attr("y",n)}}}}),d&&!d.empty()){var f=M.select("."+t+"-math-group"),p=h.node().getBBox(),m=f.node()?f.node().getBBox():void 0,g=m?m.y+m.height+1.6*Y:p.y+p.height+1.6*Y,y=o.extendFlat({},w,{y:g});d.attr("transform",a),d.style("opacity",H*c.opacity(Z)).call(l.font,{color:c.rgb(Z),size:r.round(Y,2),family:W,weight:$,style:X,variant:K,textcase:J,shadow:ee,lineposition:Q}).attr(y).call(u.convertToTspans,e)}return n.previousPromises(e)}function eh(t){var n=t.title,a=r.select(n.node().parentNode);if(_&&_.selection&&_.side&&S){a.attr("transform",null);var c=d[_.side],u="left"===_.side||"top"===_.side?-1:1,h=i(_.pad)?_.pad:2,f=l.bBox(a.node()),p={t:0,b:0,l:0,r:0},m=e._fullLayout._reservedMargin;for(var v in m)for(var x in m[v]){var b=m[v][x];p[x]=Math.max(p[x],b)}var w={left:p.l,top:p.t,right:g.width-p.r,bottom:g.height-p.b},T=_.maxShift||u*(w[_.side]-f[_.side]),M=0;if(T<0)M=T;else{var k=_.offsetLeft||0,A=_.offsetTop||0;f.left-=k,f.right-=k,f.top-=A,f.bottom-=A,_.selection.each(function(){var e=l.bBox(this);o.bBoxIntersect(f,e,h)&&(M=Math.max(M,u*(e[_.side]-f[c])+h))}),y._titleScoot=Math.abs(M=Math.min(T,M))}if(M>0||T<0){var E={left:[-M,0],right:[M,0],top:[0,-M],bottom:[0,M]}[_.side];a.attr("transform",s(E[0],E[1]))}}}function ed(e,t){e.text(t).on("mouseover.opacity",function(){r.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){r.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)})}if(ea.call(ec,eo),et&&(S?ea.on(".opacity",null):(ed(ea,x),E=!0),ea.call(u.makeEditable,{gd:e}).on("edit",function(t){void 0!==b?a.call("_guiRestyle",e,v,t,b):a.call("_guiRelayout",e,v,t)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ec)}).on("input",function(e){this.text(e||" ").call(u.positionText,w.x,w.y)}),B)){if(B&&!S){var ef=ea.node().getBBox(),ep=ef.y+ef.height+1.6*Y;eo.attr("y",ep)}V?eo.on(".opacity",null):(ed(eo,N),q=!0),eo.call(u.makeEditable,{gd:e}).on("edit",function(t){a.call("_guiRelayout",e,"title.subtitle.text",t)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ec)}).on("input",function(e){this.text(e||" ").call(u.positionText,eo.attr("x"),eo.attr("y"))})}return ea.classed("js-placeholder",E),eo&&!eo.empty()&&eo.classed("js-placeholder",q),M},SUBTITLE_PADDING_EM:1.6,SUBTITLE_PADDING_MATHJAX_EM:1.6}}}),rt=p({"src/plots/cartesian/set_convert.js"(e,t){var r=T(),i=k().utcFormat,n=tv(),a=n.numberFormat,o=C(),s=n.cleanNumber,l=n.ms2DateTime,c=n.dateTime2ms,u=n.ensureNumber,h=n.isArrayOrTypedArray,d=L(),f=d.FP_SAFE,p=d.BADNUM,m=d.LOG_CLIP,g=d.ONEWEEK,y=d.ONEDAY,v=d.ONEHOUR,x=d.ONEMIN,b=d.ONESEC,_=tC(),w=tE(),M=w.HOUR_PATTERN,A=w.WEEKDAY_PATTERN;function S(e){return Math.pow(10,e)}t.exports=function(e,t){t=t||{};var d=e._id||"x",T=d.charAt(0);function k(t,r){if(t>0)return Math.log(t)/Math.LN10;if(!(t<=0)||!r||!e.range||2!==e.range.length)return p;var i=e.range[0],n=e.range[1];return .5*(i+n-2*m*Math.abs(i-n))}function E(t,r,i,a){if((a||{}).msUTC&&o(t))return+t;var s=c(t,i||e.calendar);if(s===p)if(!o(t))return p;else{t*=1;var l=Math.floor(10*n.mod(t+.05,1));s=c(new Date(Math.round(t-l/10)))+l/10}return s}function C(t,r,i){return l(t,r,i||e.calendar)}function L(t){return e._categories[Math.round(t)]}function P(t){if(null!=t){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"==typeof t?String(t):t);var r=e._categories.length-1;return e._categoriesMap[t]=r,r}return p}function I(t){if(e._categoriesMap)return e._categoriesMap[t]}function z(e){var t=I(e);return void 0!==t?t:o(e)?+e:void 0}function D(e){return o(e)?+e:I(e)}function O(e,t,i){return r.round(i+t*e,2)}var R=function(t){return o(t)?O(t,e._m,e._b):p},F=function(t){var r;return r=e._m,(t-e._b)/r};if(e.rangebreaks){var j="y"===T;R=function(t){if(!o(t))return p;var r=e._rangebreaks.length;if(!r)return O(t,e._m,e._b);var i=j;e.range[0]>e.range[1]&&(i=!i);for(var n=i?-1:1,a=n*t,s=0,l=0;lu)s=l+1;else{s=a<(c+u)/2?l:l+1;break}}var h=e._B[s]||0;return isFinite(h)?O(t,e._m2,h):0},F=function(t){var r,i,n=e._rangebreaks.length;if(!n)return r=e._m,(t-e._b)/r;for(var a=0,o=0;oe._rangebreaks[o].pmax&&(a=o+1);return i=e._m2,(t-e._B[a])/i}}e.c2l="log"===e.type?k:u,e.l2c="log"===e.type?S:u,e.l2p=R,e.p2l=F,e.c2p="log"===e.type?function(e,t){return R(k(e,t))}:R,e.p2c="log"===e.type?function(e){return S(F(e))}:F,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=s,e.c2d=e.c2r=e.l2d=e.l2r=u,e.d2p=e.r2p=function(t){return e.l2p(s(t))},e.p2d=e.p2r=F,e.cleanPos=u):"log"===e.type?(e.d2r=e.d2l=function(e,t){return k(s(e),t)},e.r2d=e.r2c=function(e){return S(s(e))},e.d2c=e.r2l=s,e.c2d=e.l2r=u,e.c2r=k,e.l2d=S,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return S(F(e))},e.r2p=function(t){return e.l2p(s(t))},e.p2r=F,e.cleanPos=u):"date"===e.type?(e.d2r=e.r2d=n.identity,e.d2c=e.r2c=e.d2l=e.r2l=E,e.c2d=e.c2r=e.l2d=e.l2r=C,e.d2p=e.r2p=function(t,r,i){return e.l2p(E(t,0,i))},e.p2d=e.p2r=function(e,t,r){return C(F(e),t,r)},e.cleanPos=function(t){return n.cleanDate(t,p,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=P,e.r2d=e.c2d=e.l2d=L,e.d2r=e.d2l_noadd=z,e.r2c=function(t){var r=D(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=u,e.r2l=D,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return L(F(e))},e.r2p=e.d2p,e.p2r=F,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:u(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=L,e.d2r=e.d2l_noadd=z,e.r2c=function(t){var r=z(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=I,e.l2r=e.c2r=u,e.r2l=z,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return L(F(e))},e.r2p=e.d2p,e.p2r=F,e.cleanPos=function(e){return Array.isArray(e)||"string"==typeof e&&""!==e?e:u(e)},e.setupMultiCategory=function(r){var i,a,o=e._traceIndices,s=e._matchGroup;if(s&&0===e._categories.length){for(var l in s)if(l!==d){var c=t[_.id2name(l)];o=o.concat(c._traceIndices)}}var u=[[0,{}],[0,{}]],f=[];for(i=0;il[1]&&(a[+!s]=i,o[1]=l[1]),o[0]>=o[1])if(void 0!==r){var c=l[0]+1;void 0!==i&&(c=Math.min(c,l[1])),a[+!s]=e.l2r(c)}else void 0!==i&&(a[+!!s]=e.l2r(l[1]-1))}},e.cleanRange=function(t,r){e._cleanRange(t,r),e.limitRange(t)},e._cleanRange=function(t,r){r||(r={}),t||(t="range");var i,a,s=n.nestedProperty(e,t).get();if(a=(a="date"===e.type?n.dfltRange(e.calendar):"y"===T?w.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||w.DFLTRANGEX).slice(),("tozero"===e.rangemode||"nonnegative"===e.rangemode)&&(a[0]=0),!s||2!==s.length)return void n.nestedProperty(e,t).set(a);var l=null===s[0],c=null===s[1];for("date"!==e.type||e.autorange||(s[0]=n.cleanDate(s[0],p,e.calendar),s[1]=n.cleanDate(s[1],p,e.calendar)),i=0;i<2;i++)if("date"===e.type){if(!n.isDateTime(s[i],e.calendar)){e[t]=a;break}if(e.r2l(s[0])===e.r2l(s[1])){var u=n.constrain(e.r2l(s[0]),n.MIN_MS+1e3,n.MAX_MS-1e3);s[0]=e.l2r(u-1e3),s[1]=e.l2r(u+1e3);break}}else{if(!o(s[i]))if(!(l||c)&&o(s[1-i]))s[i]=s[1-i]*(i?10:.1);else{e[t]=a;break}if(s[i]<-f?s[i]=-f:s[i]>f&&(s[i]=f),s[0]===s[1]){var h=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=h,s[1]+=h}}},e.setScale=function(r){var i,n,a=t._size;if(e.overlaying){var o=_.getFromId({_fullLayout:t},e.overlaying);e.domain=o.domain}var s=r&&e._r?"_r":"range",l=e.calendar;e.cleanRange(s);var c=e.r2l(e[s][0],l),u=e.r2l(e[s][1],l),h="y"===T;if(h?(e._offset=a.t+(1-e.domain[1])*a.h,e._length=a.h*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u):(e._offset=a.l+e.domain[0]*a.w,e._length=a.w*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks&&(e._rangebreaks=e.locateBreaks(Math.min(c,u),Math.max(c,u)),e._rangebreaks.length)){for(i=0;iu&&(d=!d),d&&e._rangebreaks.reverse();var f=d?-1:1;for(e._m2=f*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(h?u:c)),i=0;ia&&(a+=7,oa&&(a+=24,o=i&&o=i&&t=s.min&&(es.max&&(s.max=i),a=!1)}a&&c.push({min:e,max:i})}};for(i=0;i2*s}(h,t))return"date";var g="strict"!==i.autotypenumbers;return!function(e,t){for(var r=e.length,i=c(r),a=0,o=0,u={},h=0;h2*a}(h,g)?!function(e,t){for(var i,n=e.length,a=0;a0&&((k=L-s(_)-l(w))>P?A/k>I&&(T=_,M=w,I=A/k):A/L>I&&(T={val:_.val,nopad:1},M={val:w.val,nopad:1},I=A/L));if(m===g){var z=m-1,D=m+1;if(E)if(0===m)a=[0,1];else{var O=(m>0?h:u).reduce(function(e,t){return Math.max(e,l(t))},0),R=m/(1-Math.min(.5,O/L));a=m>0?[0,R]:[R,0]}else a=C?[Math.max(0,z),Math.max(1,D)]:[z,D]}else E?(T.val>=0&&(T={val:0,nopad:1}),M.val<=0&&(M={val:0,nopad:1})):C&&(T.val-I*s(T)<0&&(T={val:0,nopad:1}),M.val<=0&&(M={val:1,nopad:1})),I=(M.val-T.val-d(t,_.val,w.val))/(L-s(T)-l(M)),a=[T.val-I*s(T),M.val+I*l(M)];return a=b(a,t),t.limitRange&&t.limitRange(),v&&a.reverse(),n.simpleMap(a,t.l2r||Number)}function d(e,t,r){var i=0;if(e.rangebreaks)for(var n=e.locateBreaks(t,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),E=A((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=A(r.vpadplus||r.vpad),L=A(r.vpadminus||r.vpad);if(!M){if(d=1/0,f=-1/0,T)for(n=0;n0&&(d=o),o>f&&o-a&&(d=o),o>f&&o=z;n--)I(n);return{min:p,max:x,opts:r}},concatExtremes:p};function m(e,t,r,i,n){for(var a=i.tozero,o=i.extrapad,s=!0,l=0;l=r&&(c.extrapad||!o)){s=!1;break}n(t,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(e.splice(l,1),l--)}if(s){var u=a&&0===t;e.push({val:t,pad:u?0:r,extrapad:!u&&o})}}function g(e){return i(e)&&Math.abs(e)=t}function x(e,t,r){return void 0===t||void 0===r||(t=e.d2l(t))<(r=e.d2l(r))}function b(e,t){if(!t||!t.autorangeoptions)return e;var r,i,a,o,s=e[0],l=e[1],c=t.autorangeoptions.include;if(void 0!==c){var u=t.d2l(s),h=t.d2l(l);n.isArrayOrTypedArray(c)||(c=[c]);for(var d=0;d=f&&(u=f,s=f),h<=f&&(h=f,l=f)}}return r=s,s=(i=t.autorangeoptions)&&void 0!==i.minallowed&&x(t,i.minallowed,i.maxallowed)?i.minallowed:i&&void 0!==i.clipmin&&x(t,i.clipmin,i.clipmax)?Math.max(r,t.d2l(i.clipmin)):r,a=l,[s,l=(o=t.autorangeoptions)&&void 0!==o.maxallowed&&x(t,o.minallowed,o.maxallowed)?o.maxallowed:o&&void 0!==o.clipmax&&x(t,o.clipmin,o.clipmax)?Math.min(a,t.d2l(o.clipmax)):a]}}}),rn=p({"src/plots/cartesian/axes.js"(e,t){var r=T(),i=C(),n=tD(),a=eQ(),o=tv(),s=o.strTranslate,l=tF(),c=re(),u=ee(),h=t7(),d=tN(),f=tG(),p=(tE(),L()),m=p.ONEMAXYEAR,g=p.ONEAVGYEAR,y=p.ONEMINYEAR,v=p.ONEMAXQUARTER,x=p.ONEAVGQUARTER,b=p.ONEMINQUARTER,_=p.ONEMAXMONTH,w=p.ONEAVGMONTH,M=p.ONEMINMONTH,k=p.ONEWEEK,A=p.ONEDAY,S=A/2,E=p.ONEHOUR,P=p.ONEMIN,I=p.ONESEC,z=p.ONEMILLI,D=p.ONEMICROSEC,O=p.MINUS_SIGN,R=p.BADNUM,F={K:"zeroline"},j={K:"gridline",L:"path"},B={K:"minor-gridline",L:"path"},N={K:"tick",L:"path"},U={K:"tick",L:"text"},V={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},q=tR(),H=q.MID_SHIFT,G=q.CAP_SHIFT,W=q.LINE_SPACING,Y=q.OPPOSITE_SIDE,Z=t.exports={};Z.setConvert=rt();var $=rr(),X=tC(),K=X.idSort,J=X.isLinked;Z.id2name=X.id2name,Z.name2id=X.name2id,Z.cleanId=X.cleanId,Z.list=X.list,Z.listIds=X.listIds,Z.getFromId=X.getFromId,Z.getFromTrace=X.getFromTrace;var Q=ri();function et(e){var t=(e[1]-e[0])*1e-4;return[e[0]-t,e[1]+t]}Z.getAutoRange=Q.getAutoRange,Z.findExtremes=Q.findExtremes,Z.coerceRef=function(e,t,r,i,n,a){var s=i.charAt(i.length-1),l=r._fullLayout._subplots[s+"axis"],c=i+"ref",u={};return n||(n=l[0]||("string"==typeof a?a:a[0])),a||(a=n),l=l.concat(l.map(function(e){return e+" domain"})),u[c]={valType:"enumerated",values:l.concat(a?"string"==typeof a?[a]:a:[]),dflt:n},o.coerce(e,t,u,c)},Z.coerceRefArray=function(e,t,r,i,n,a,s){let l=i.charAt(i.length-1);var c=r._fullLayout._subplots[l+"axis"];let u=i+"ref";var h=e[u];n||(n=c[0]||("string"==typeof a?a:a[0])),c=(c=c.concat(c.map(e=>e+" domain"))).concat(a||[]),h.length>s?(o.warn("Array attribute "+u+" has more entries than expected, truncating to "+s),h=h.slice(0,s)):h.lengthMath.abs((e/t+.5)%1-.5)}function eo(e,t){return .001>Math.abs(e/t-1)}function es(e){return+e.substring(1)}function el(e,t){return e.rangebreaks&&(t=t.filter(function(t){return e.maskBreaks(t.x)!==R})),t}function ec(e,t){var r=et(o.simpleMap(e.range,e.r2l)),i=Math.min(r[0],r[1]),n=Math.max(r[0],r[1]),a="category"===e.type?e.d2l_noadd:e.d2l;"log"===e.type&&"L"!==String(e.dtick).charAt(0)&&(e.dtick="L"+Math.pow(10,Math.floor(Math.min(e.range[0],e.range[1]))-1));for(var s=[],l=0;l<=1;l++)if(!(void 0!==t&&(t&&l||!1===t&&!l))&&!(l&&!e.minor)){var c=l?e.minor.tickvals:e.tickvals,u=l?[]:e.ticktext;if(c){o.isArrayOrTypedArray(u)||(u=[]);var h=-1,d=-1;if(!l)for(var f=0;fi&&pi&&g2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},Z.saveRangeInitial=function(e,t){for(var r=Z.list(e,"",!0),i=!1,n=0;n.3*d||u(n)||u(a))){var f=r.dtick/2;e+=e+f.8){var s=Number(r.slice(1));a.exactYears>.8&&s%12==0?e=Z.tickIncrement(e,"M6","reverse")+1.5*A:a.exactMonths>.8?e=Z.tickIncrement(e,"M1","reverse")+15.5*A:e-=S;var l=Z.tickIncrement(e,r);if(l<=i)return l}return e}(v,e,y,l,a)),m=v,g=0;m<=c;)m=Z.tickIncrement(m,y,!1,a),g++;return{start:t.c2r(v,0,a),end:t.c2r(m,0,a),size:y,_dataSpan:c-l}},Z.prepMinorTicks=function(e,t,r){var n,a;if(!(null!=(n=t.minor)&&n.dtick)){delete e.dtick;var s,l=t.dtick&&i(t._tmin);if(l){var c=Z.tickIncrement(t._tmin,t.dtick,!0);s=[t._tmin,.99*c+.01*t._tmin]}else{var u=o.simpleMap(t.range,t.r2l);s=[u[0],.8*u[0]+.2*u[1]]}if(e.range=o.simpleMap(s,t.l2r),e._isMinor=!0,Z.prepTicks(e,r),l){var h=i(t.dtick),d=i(e.dtick),f=h?t.dtick:+t.dtick.substring(1),p=d?e.dtick:+e.dtick.substring(1);h&&d?ea(f,p)?f===2*k&&p===2*A&&(e.dtick=k):f===2*k&&p===3*A?e.dtick=k:f!==k||(t._input.minor||{}).nticks?eo(f/p,2.5)?e.dtick=f/2:e.dtick=f:e.dtick=A:"M"===String(t.dtick).charAt(0)?d?e.dtick="M1":ea(f,p)?f>=12&&2===p&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?ea(f,p)||(e.dtick=eo(f/p,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}(null==(a=t.minor)?void 0:a._tick0Init)===void 0&&(e.tick0=t.tick0)},Z.prepTicks=function(e,t){var r=o.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var n,a=e.nticks;a||("category"===e.type||"multicategory"===e.type?(n=e.tickfont?o.bigFont(e.tickfont.size||12):15,a=e._length/n):(n="y"===e._id.charAt(0)?40:80,a=o.constrain(e._length/n,4,9)+1),"radialaxis"===e._name&&(a*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(a*=100),e._roughDTick=Math.abs(r[1]-r[0])/a,Z.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){function t(){return!(i(e.dtick)||"M"!==e.dtick.charAt(0))}var r,n=t(),a=Z.getTickFormat(e);if(a){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(r=E,o&&!n&&e.dtickes(e.dtick):e.dtickes(e.dtick):e.dtickes(e.dtick):e.dticke.range[1],u=!e.ticklabelindex||o.isArrayOrTypedArray(e.ticklabelindex)?e.ticklabelindex:[e.ticklabelindex],h=o.simpleMap(e.range,e.r2l,void 0,void 0,t),d=h[1]=+!N;U--){var V,q=!U;U?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):N&&(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var H=U?e:o.extendFlat({},e,N?e.minor:{minor:{}});if(q?Z.prepMinorTicks(H,e,t):Z.prepTicks(H,t),"array"===H.tickmode){U?(O=[],C=ec(e,!q)):(F=[],L=ec(e,!q));continue}if("sync"===H.tickmode){O=[],C=function(e){var t=e._mainAxis,r=[];if(t._vals){for(var i=-1,n=-1,a=0;a=Y:ee<=Y;ee=Z.tickIncrement(ee,er,d,a)){if(U&&J++,H.rangebreaks&&!d){if(ee=p)break}if(O.length>T||ee===Q)break;Q=ee;var en={value:function(e,t,r){if(![r,e,t].every(i)||0===r)return e;let n=Math.round((e-t)/r),a=t+n*r;return e!==a&&Math.abs(e-a)<1e-6*Math.abs(r)?a:e}(ee,ei,er)};U?(ee===K&&(en.first=!0),X&&ee!==(0|ee)&&(en.simpleLabel=!0),s>1&&J%s&&(en.skipLabel=!0),O.push(en)):(en.minor=!0,F.push(en))}}if(!F||F.length<3?u=!1:(ex=(F[2].value-F[1].value)*(c?-1:1),eb=e.tickformat,(/%f/.test(eb)?ex>=D:/%L/.test(eb)?ex>=z:/%[SX]/.test(eb)?ex>=I:/%M/.test(eb)?ex>=P:/%[HI]/.test(eb)?ex>=E:/%p/.test(eb)?ex>=S:/%[Aadejuwx]/.test(eb)?ex>=A:/%[UVW]/.test(eb)?ex>=k:/%[Bbm]/.test(eb)?ex>=M:/%[q]/.test(eb)?ex>=b:!/%[Yy]/.test(eb)||ex>=y)||(u=!1,F=F.slice(1))),u){var ea=O.concat(F);l&&O.length&&(ea=ea.slice(1)),(ea=ea.sort(function(e,t){return e.value-t.value}).filter(function(e,t,r){return 0===t||e.value!==r[t-1].value})).map(function(e,t){return void 0!==e.minor||e.skipLabel?null:t}).filter(function(e){return null!==e}).forEach(function(e){u.map(function(t){var r=e+t;r>=0&&r0?i-1:i,s=i);var l=e[o].value,c=Math.abs(e[s].value-l),u=r||c,h=0;u>=y?h=c>=y&&c<=m?c:g:r===x&&u>=b?h=c>=b&&c<=v?c:x:u>=M?h=c>=M&&c<=_?c:w:r===k&&u>=k?h=k:u>=A?h=A:r===S&&u>=S?h=S:r===E&&u>=E&&(h=E),h>=c&&(h=c,n=!0);var d=a+h;if(t.rangebreaks&&h>0){for(var f=0,p=0;p<84;p++){var T=(p+.5)/84;t.maskBreaks(a*(1-T)+T*d)!==R&&f++}(h*=f/84)||(e[i].drop=!0),n&&c>k&&(h=c)}(h>0||0===i)&&(e[i].periodX=a+h/2)}}(j,e,e._definedDelta),e.rangebreaks){var em="y"===e._id.charAt(0),eg=1;"auto"===e.tickmode&&(eg=e.tickfont?e.tickfont.size:12);var ey=NaN;for(e_=O.length-1;e_>-1;e_--){if(O[e_].drop){O.splice(e_,1);continue}O[e_].value=eF(O[e_].value,e);var ev=e.c2p(O[e_].value);(em?ey>ev-eg:eyp||ip&&(r.periodX=p),i10||"01-01"!==n.slice(5)?e._tickround="d":e._tickround=t.slice(1)%12==0?"y":"m";else if(t>=A&&a<=10||t>=15*A)e._tickround="d";else if(t>=P&&a<=16||t>=E)e._tickround="M";else if(t>=I&&a<=19||t>=P)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(a,o)-20,e._tickround<0&&(e._tickround=4)}}else if(i(t)||"L"===t.charAt(0)){var s=e.range.map(e.r2d||Number);i(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var l=Math.floor(Math.log(Math.max(Math.abs(s[0]),Math.abs(s[1])))/Math.LN10+.01);Math.abs(l)>(void 0===e.minexponent?3:e.minexponent)&&(ew(e.exponentformat)&&"SI extended"!==e.exponentformat&&!eT(l)||ew(e.exponentformat)&&"SI extended"===e.exponentformat&&!eM(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}function ex(e,t,r){var i=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:i.size,font:i.family,fontWeight:i.weight,fontStyle:i.style,fontVariant:i.variant,fontTextcase:i.textcase,fontLineposition:i.lineposition,fontShadow:i.shadow,fontColor:i.color}}Z.autoTicks=function(e,t,r){var n;function a(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=o.dateTick0(e.calendar,0);var s=2*t;if(s>g)t/=g,n=a(10),e.dtick="M"+12*ey(t,n,eu);else if(s>w)e.dtick="M"+ey(t/=w,1,eh);else if(s>A){if(e.dtick=ey(t,A,e._hasDayOfWeekBreaks?[1,2,7,14]:ef),!r){var l=Z.getTickFormat(e),c="period"===e.ticklabelmode;c&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=o.dateTick0(e.calendar,2):e.tick0=o.dateTick0(e.calendar,1),c&&(e._dowTick0=e.tick0)}}else s>E?e.dtick=ey(t,E,eh):s>P?e.dtick=ey(t,P,ed):s>I?e.dtick=ey(t,I,ed):(n=a(10),e.dtick=ey(t,n,eu))}else if("log"===e.type){e.tick0=0;var u=o.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(1>Math.abs(u[1]-u[0])){var h=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/h,n=a(10),e.dtick="L"+ey(t,n,eu)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):eR(e)?(e.tick0=0,e.dtick=ey(t,n=1,eg)):(e.tick0=0,n=a(10),e.dtick=ey(t,n,eu));if(0===e.dtick&&(e.dtick=1),!i(e.dtick)&&"string"!=typeof e.dtick){var d=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(d)}},Z.tickIncrement=function(e,t,n,a){var s=n?-1:1;if(i(t))return o.increment(e,s*t);var l=t.charAt(0),c=s*Number(t.slice(1));if("M"===l)return o.incrementMonth(e,c,a);if("L"===l)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===l){var u="D2"===t?em:ep,h=e+.01*s,d=o.roundUp(o.mod(h,1),u,n);return Math.floor(h)+Math.log(r.round(Math.pow(10,d),1))/Math.LN10}throw"unrecognized dtick "+String(t)},Z.tickFirst=function(e,t){var n=e.r2l||Number,a=o.simpleMap(e.range,n,void 0,void 0,t),s=a[1]=0&&r<=e._length?t:null};if(k&&o.isArrayOrTypedArray(e.ticktext)){var L=o.simpleMap(e.range,e.r2l),P=(Math.abs(L[1]-L[0])-(e._lBreaks||0))/1e4;for(_=0;_ ")}else e._prevDateHead=l,c+="
"+l;t.text=c}(e,M,r,A):"log"===S?function(e,t,r,n){var a=e.dtick,s=t.x,l=e.tickformat,c="string"==typeof a&&a.charAt(0);if("never"===n&&(n=""),r&&"L"!==c&&(a="L3",c="L"),l||"L"===c)t.text=ek(Math.pow(10,s),e,n,r);else if(i(a)||"D"===c&&("complete"===e.minorloglabels||.1>o.mod(s+.01,1))){"complete"!==e.minorloglabels||.1>o.mod(s+.01,1)||(t.fontSize*=.75);var u=Math.pow(10,s).toExponential(0).split("e"),h=+u[1],d=Math.abs(h),f=e.exponentformat;"power"===f||ew(f)&&"SI extended"!==f&&eT(h)||ew(f)&&"SI extended"===f&&eM(h)?(t.text=u[0],d>0&&(t.text+="x10"),"1x10"===t.text&&(t.text="10"),0!==h&&1!==h&&(t.text+=""+(h>0?"":O)+d+""),t.fontSize*=1.25):("e"===f||"E"===f)&&d>2?t.text=u[0]+f+(h>0?"+":O)+d:(t.text=ek(Math.pow(10,s),e,"","fakehover"),"D1"===a&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else if("D"===c)t.text="none"===e.minorloglabels?"":String(Math.round(Math.pow(10,o.mod(s,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if("D1"===e.dtick){var p=String(t.text).charAt(0);("0"===p||"1"===p)&&("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(s<0?.5:.25)))}}(e,M,A,z):"category"===S?(s=e,l=M,void 0===(c=s._categories[Math.round(l.x)])&&(c=""),l.text=String(c)):"multicategory"===S?(u=e,h=M,d=r,f=Math.round(h.x),m=void 0===(p=u._categories[f]||[])[1]?"":String(p[1]),g=void 0===p[0]?"":String(p[0]),d?h.text=g+" - "+m:(h.text=m,h.text2=g)):eR(e)?function(e,t,r,i,n){if("radians"!==e.thetaunit||r)t.text=ek(t.x,e,n,i);else{var a=t.x/180;if(0===a)t.text="0";else{var s=function(e){function t(e,t){return 1e-6>=Math.abs(e-t)}var r=function(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}(e),i=e*r,n=Math.abs(function e(r,i){return t(i,0)?r:e(i,r%i)}(i,r));return[Math.round(i/n),Math.round(r/n)]}(a);if(s[1]>=100)t.text=ek(o.deg2rad(t.x),e,n,i);else{var l=t.x<0;1===s[1]?1===s[0]?t.text="π":t.text=s[0]+"π":t.text=["",s[0],"","⁄","",s[1],"","π"].join(""),l&&(t.text=O+t.text)}}}}(e,M,r,A,z):(y=e,v=M,x=A,"never"===(b=z)?b="":"all"===y.showexponent&&1e-6>Math.abs(v.x/y.dtick)&&(b="hide"),v.text=ek(v.x,y,b,x)),n||(e.tickprefix&&!I(e.showtickprefix)&&(M.text=e.tickprefix+M.text),e.ticksuffix&&!I(e.showticksuffix)&&(M.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(M.text)){var D=e.labelalias[M.text];"string"==typeof D&&(M.text=D)}return("boundaries"===e.tickson||e.showdividers)&&(M.xbnd=[C(M.x-.5),C(M.x+e.dtick-.5)]),M},Z.hoverLabelText=function(e,t,r){r&&(e=o.extendFlat({},e,{hoverformat:r}));var i=o.isArrayOrTypedArray(t)?t[0]:t,n=o.isArrayOrTypedArray(t)?t[1]:void 0;if(void 0!==n&&n!==i)return Z.hoverLabelText(e,i,r)+" - "+Z.hoverLabelText(e,n,r);var a="log"===e.type&&i<=0,s=Z.tickText(e,e.c2l(a?-i:i),"hover").text;return a?0===i?"0":O+s:s};var eb=["f","p","n","μ","m","","k","M","G","T"],e_=["q","r","y","z","a",...eb,"P","E","Z","Y","R","Q"],ew=e=>["SI","SI extended","B"].includes(e);function eT(e){return e>14||e<-15}function eM(e){return e>32||e<-30}function ek(e,t,r,n){var a,s,l,c=e<0,u=t._tickround,h=r||t.exponentformat||"B",d=t._tickexponent,f=Z.getTickFormat(t),p=t.separatethousands;if(n){var m={exponentformat:h,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:i(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};ev(m),u=(Number(m._tickround)||0)+4,d=m._tickexponent,t.hoverformat&&(f=t.hoverformat)}if(f)return t._numFormat(f)(e).replace(/-/g,O);"none"===h&&(d=0);let g=Math.pow(10,-u)/2;if((e=Math.abs(e))"+l+"":"B"===h&&9===d?e+="B":ew(h)&&(e+="SI extended"===h?e_[d/3+10]:eb[d/3+5])),c?O+e:e}function eA(e,t){if(e){var r=Object.keys(V).reduce(function(e,r){return -1!==t.indexOf(r)&&V[r].forEach(function(t){e[t]=1}),e},{});Object.keys(e).forEach(function(t){r[t]||(1===t.length?e[t]=0:delete e[t])})}}function eS(e){return void 0!==e.periodX?e.periodX:e.x}function eE(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}function eC(e){var t=e.title.font.size,r=(e.title.text.match(l.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(G+r*W):r?t*(r+1)*W:t}function eL(e,t){var r=e.l2p(t);return r>1&&r=n.min&&e0)switch(e.type){case"date":case"linear":for(t=0;t=i(e))}(e.dtick,i.dtickrange,n)){r=i;break}break;case"log":for(t=0;t=0,o=0>=a(e,t[1]);return(r||n)&&(i||o)}(e.dtick,i.dtickrange)){r=i;break}}return r?r.value:e.tickformat},Z.getSubplots=function(e,t){var r=e._fullLayout._subplots,i=r.cartesian.concat(r.gl2d||[]),n=t?Z.findSubplotsWithAxis(i,t):i;return n.sort(function(e,t){var r=e.slice(1).split("y"),i=t.slice(1).split("y");return r[0]===i[0]?r[1]-i[1]:r[0]-i[0]}),n},Z.findSubplotsWithAxis=function(e,t){for(var r=new RegExp("x"===t._id.charAt(0)?"^"+t._id+"y":t._id+"$"),i=[],n=0;n=0&&n.unshift(n.splice(i,1).shift())}});var s={false:{left:0,right:0}};return o.syncOrAsync(n.map(function(t){return function(){if(t){var i=Z.getFromId(e,t);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=a;var n=Z.drawOne(e,i,r);return i._shiftPusher&&eN(i,i._fullDepth||0,s,!0),i._r=i.range.slice(),i._rl=o.simpleMap(i._r,i.r2l),n}}}))},Z.drawOne=function(e,t,r){var i,s,d,f=(r=r||{}).axShifts||{},p=r.overlayingShiftedAx||[];t.setScale();var m=e._fullLayout,g=t._id,y=g.charAt(0),v=Z.counterLetter(g),x=m._plots[t._mainSubplot],b="above traces"===t.zerolinelayer;if(x){if(t._shiftPusher=t.autoshift||-1!==p.indexOf(t._id)||-1!==p.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var _=t.linewidth/2||0;"inside"===t.ticks&&(_+=t.ticklen),eN(t,_,f,!0),eN(t,t.shift||0,f,!1)}(!0!==r.skipTitle||void 0===t._shift)&&(C=t,L=f,t._shift=C.autoshift?L[C.overlaying][C.side]:C.shift||0);var w=x[y+"axislayer"],T=t._mainLinePosition,M=T+=t._shift,k=t._mainMirrorPosition,A=t._vals=Z.calcTicks(t),S=[t.mirror,M,k].join("_");for(i=0;i0?r.bottom-u:0,h))));var d=0,f=0;if(t._shiftPusher&&(d=Math.max(h,r.height>0?"l"===l?u-r.left:r.right-u:0),t.title.text!==m._dfltTitle[y]&&(f=(t._titleStandoff||0)+(t._titleScoot||0),"l"===l&&(f+=eC(t))),t._fullDepth=Math.max(d,f)),t.automargin){i={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1],g="number"==typeof t._shift?t._shift:0;if("x"===y){if("b"===l?i[l]=t._depth:(i[l]=t._depth=Math.max(r.width>0?u-r.top:0,h),p.reverse()),r.width>0){var x=r.right-(t._offset+t._length);x>0&&(i.xr=1,i.r=x);var b=t._offset-r.left;b>0&&(i.xl=0,i.l=b)}}else if("l"===l?(t._depth=Math.max(r.height>0?u-r.left:0,h),i[l]=t._depth-g):(t._depth=Math.max(r.height>0?r.right-u:0,h),i[l]=t._depth+g,p.reverse()),r.height>0){var _=r.bottom-(t._offset+t._length);_>0&&(i.yb=0,i.b=_);var w=t._offset-r.top;w>0&&(i.yt=1,i.t=w)}i[v]="free"===t.anchor?t.position:t._anchorAxis.domain[p[0]],t.title.text!==m._dfltTitle[y]&&(i[l]+=eC(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((o={x:0,y:0,r:0,l:0,t:0,b:0})[c]=t.linewidth,t.mirror&&!0!==t.mirror&&(o[c]+=h),!0===t.mirror||"ticks"===t.mirror?o[v]=t._anchorAxis.domain[p[1]]:("all"===t.mirror||"allticks"===t.mirror)&&(o[v]=[t._counterDomainMin,t._counterDomainMax][p[1]]))}ep&&(s=a.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"==typeof t.automargin&&(eA(i,t.automargin),eA(o,t.automargin)),n.autoMargin(e,eI(t),i),n.autoMargin(e,ez(t),o),n.autoMargin(e,eD(t),s)}),o.syncOrAsync(ed)}}function em(e){var r=g+(e||"tick");return E[r]||(E[r]=function(e,t,r){var i,n,a,o;if(e._selections[t].size())i=1/0,n=-1/0,a=1/0,o=-1/0,e._selections[t].each(function(){var e=eP(this);if("none"!==e.node().style.display){var t=h.bBox(e.node().parentNode);i=Math.min(i,t.top),n=Math.max(n,t.bottom),a=Math.min(a,t.left),o=Math.max(o,t.right)}});else{var s=Z.makeLabelFns(e,r);i=n=s.yFn({dx:0,dy:0,fontSize:0}),a=o=s.xFn({dx:0,dy:0,fontSize:0})}return{top:i,bottom:n,left:a,right:o,height:n-i,width:o-a}}(t,r,M)),E[r]}},Z.getTickSigns=function(e,t){var r=e._id.charAt(0),i=e.side===({x:"top",y:"right"})[r]?1:-1,n=[-1,1,i,-i];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)==("x"===r)&&(n=n.map(function(e){return-e})),e.side&&n.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),n},Z.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return s(e._offset+e.l2p(t.x),0)}:function(t){return s(0,e._offset+e.l2p(t.x))}},Z.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=e.tickson||"",i=function(e){return -1!==t.indexOf(e)},n=i("top"),a=i("left"),o=i("right"),s=i("bottom"),l=i("inside"),c="boundaries"!==r&&(s||a||n||o);if(!c&&!l)return[0,0];var u=e.side,h=c?(e.tickwidth||0)/2:0,d=3,f=e.tickfont?e.tickfont.size:12;return(s||n)&&(h+=f*G,d+=(e.linewidth||0)/2),(a||o)&&(h+=(e.linewidth||0)/2,d+=3),l&&"top"===u&&(d-=f*(1-G)),(a||n)&&(h=-h),("bottom"===u||"right"===u)&&(d=-d),[c?h:0,l?d:0]}(e),r=e.ticklabelshift||0,i=e.ticklabelstandoff||0,n=t[0],a=t[1],o=e.range[0]>e.range[1],l=e.ticklabelposition&&-1!==e.ticklabelposition.indexOf("inside");if(r&&(r*=o?-1:1),i){var c=e.side;i*=l&&("top"===c||"left"===c)||!l&&("bottom"===c||"right"===c)?1:-1}return"x"===e._id.charAt(0)?function(t){return s(n+e._offset+e.l2p(eS(t))+r,a+i)}:function(t){return s(a+i,n+e._offset+e.l2p(eS(t))+r)}},Z.makeTickPath=function(e,t,r,i){i||(i={});var n=i.minor;if(n&&!e.minor)return"";var a=void 0!==i.len?i.len:n?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+s*r)+"v"+a*r:"M"+(t+s*r)+",0h"+a*r},Z.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",a=e.tickson||"",s=function(e){return -1!==n.indexOf(e)},l=s("top"),c=s("left"),u=s("right"),h=s("bottom"),d="boundaries"!==a&&(h||c||l||u),f=s("inside"),p="inside"===n&&"inside"===e.ticks||!f&&"outside"===e.ticks&&"boundaries"!==a,m=0,g=0,y=p?e.ticklen:0;if(f?y*=-1:d&&(y=0),p&&(m+=y,r)){var v=o.deg2rad(r);m=y*Math.cos(v)+1,g=y*Math.sin(v)}e.showticklabels&&(p||e.showline)&&(m+=.2*e.tickfont.size);var x,b,_,w,T,M={labelStandoff:m+=(e.linewidth||1)/2*(f?-1:1),labelShift:g},k=0,A=e.side,S=e._id.charAt(0),E=e.tickangle;if("x"===S)w=(T=!f&&"bottom"===A||f&&"top"===A)?1:-1,f&&(w*=-1),x=g*w,b=t+m*w,_=T?1:-.2,90===Math.abs(E)&&(f?_+=H:_=-90===E&&"bottom"===A?G:90===E&&"top"===A?H:.5,k=H/2*(E/90)),M.xFn=function(e){return e.dx+x+k*e.fontSize},M.yFn=function(e){return e.dy+b+e.fontSize*_},M.anchorFn=function(e,t){if(d){if(c)return"end";if(u)return"start"}return i(t)&&0!==t&&180!==t?t*w<0!==f?"end":"start":"middle"},M.heightFn=function(t,r,i){return r<-60||r>60?-.5*i:"top"===e.side!==f?-i:0};else if("y"===S){if(w=(T=!f&&"left"===A||f&&"right"===A)?1:-1,f&&(w*=-1),x=m,b=g*w,_=0,f||90!==Math.abs(E)||(_=-90===E&&"left"===A||90===E&&"right"===A?G:.5),f){var C=i(E)?+E:0;0!==C&&(k=Math.abs(Math.sin(o.deg2rad(C)))*G*w,_=0)}M.xFn=function(e){return e.dx+t-(x+e.fontSize*_)*w+k*e.fontSize},M.yFn=function(e){return e.dy+b+e.fontSize*H},M.anchorFn=function(e,t){return i(t)&&90===Math.abs(t)?"middle":T?"end":"start"},M.heightFn=function(t,r,i){return"right"===e.side&&(r*=-1),r<-30?-i:r<30?-.5*i:0}}return M},Z.drawTicks=function(e,t,i){i=i||{};var n=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?i.vals.filter(function(e){return e.minor&&!e.noTick}):[]).concat(t.ticks?i.vals.filter(function(e){return!e.minor&&!e.noTick}):[]),o=i.layer.selectAll("path."+n).data(a,eE);o.exit().remove(),o.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",!1!==i.crisp).each(function(e){return u.stroke(r.select(this),e.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(r){return h.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",i.path).style("display",null),eB(t,[N]),o.attr("transform",i.transFn)},Z.drawGrid=function(e,t,i){if(i=i||{},"sync"!==t.tickmode){var n=t._id+"grid",a=t.minor&&t.minor.showgrid,o=a?i.vals.filter(function(e){return e.minor}):[],s=t.showgrid?i.vals.filter(function(e){return!e.minor}):[],l=i.counterAxis;if(l&&Z.shouldShowZeroLine(e,t,l))for(var c="array"===t.tickmode,d=0;d=0;y--){var v=y?m:g;if(v){var x=v.selectAll("path."+n).data(y?s:o,eE);x.exit().remove(),x.enter().append("path").classed(n,1).classed("crisp",!1!==i.crisp),x.attr("transform",i.transFn).attr("d",i.path).each(function(e){return u.stroke(r.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(e){return h.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(e){return(e.minor?p:t._gw)+"px"}).style("display",null),"function"==typeof i.path&&x.attr("d",i.path)}}eB(t,[j,B])}},Z.drawZeroLine=function(e,t,r){r=r||r;var i=t._id+"zl",n=Z.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll("path."+i).data(n?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append("path").classed(i,1).classed("zl",1).classed("crisp",!1!==r.crisp).each(function(){r.layer.selectAll("path").sort(function(e,t){return K(e.id,t.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(u.stroke,t.zerolinecolor||u.defaultLine).style("stroke-width",h.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),eB(t,[F])},Z.drawLabels=function(e,t,n){n=n||{};var a=e._fullLayout,c=t._id,u="above traces"===t.zerolinelayer,d=n.cls||c+"tick",f=n.vals.filter(function(e){return e.text}),p=n.labelFns,m=n.secondary?0:t.tickangle,g=(t._prevTickAngles||{})[d],y=n.layer.selectAll("g."+d).data(t.showticklabels?f:[],eE),v=[];function x(e,a){e.each(function(e){var o=r.select(this),c=o.select(".text-math-group"),u=p.anchorFn(e,a),d=n.transFn.call(o.node(),e)+(i(a)&&0!=+a?" rotate("+a+","+p.xFn(e)+","+(p.yFn(e)-e.fontSize/2)+")":""),f=l.lineCount(o),m=W*e.fontSize,g=p.heightFn(e,i(a)?+a:0,(f-1)*m);if(g&&(d+=s(0,g)),c.empty()){var y=o.select("text");y.attr({transform:d,"text-anchor":u}),y.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var v=h.bBox(c.node()).width;c.attr("transform",d+s(v*({end:-.5,start:.5})[u],0))}})}y.enter().append("g").classed(d,1).append("text").attr("text-anchor","middle").each(function(t){var i=r.select(this),n=e._promises.length;i.call(l.positionText,p.xFn(t),p.yFn(t)).call(h.font,{family:t.font,size:t.fontSize,color:t.fontColor,weight:t.fontWeight,style:t.fontStyle,variant:t.fontVariant,textcase:t.fontTextcase,lineposition:t.fontLineposition,shadow:t.fontShadow}).text(t.text).call(l.convertToTspans,e),e._promises[n]?v.push(e._promises.pop().then(function(){x(i,m)})):x(i,m)}),eB(t,[U]),y.exit().remove(),n.repositionOnUpdate&&y.each(function(e){r.select(this).select("text").call(l.positionText,p.xFn(e),p.yFn(e))}),t._adjustTickLabelsOverflow=function(){var i=t.ticklabeloverflow;if(!(!i||"allow"===i)){var n=-1!==i.indexOf("hide"),s="x"===t._id.charAt(0),l=0,c=s?e._fullLayout.width:e._fullLayout.height;if(-1!==i.indexOf("domain")){var u=o.simpleMap(t.range,t.r2l);l=t.l2p(u[0])+t._offset,c=t.l2p(u[1])+t._offset}var d=Math.min(l,c),f=Math.max(l,c),p=t.side,m=1/0,g=-1/0;for(var v in y.each(function(e){var i=r.select(this);if(i.select(".text-math-group").empty()){var a=h.bBox(i.node()),o=0;s?(a.right>f||a.leftf||a.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+i._id]?l.style("display","none"):"tick"!==e.K||n||"none"===l.node().style.display||l.style("display",null)})})})})},x(y,g+1?g:m);var b=null;t._selections&&(t._selections[d]=y);var _=[function(){return v.length&&Promise.all(v)}];t.automargin&&a._redrawFromAutoMarginCount&&90===g?(b=g,_.push(function(){x(y,g)})):_.push(function(){if(x(y,m),f.length&&t.autotickangles&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){b=t.autotickangles[0];var e,r=0,i=[],a=1;y.each(function(e){r=Math.max(r,e.fontSize);var n=t.l2p(e.x),o=eP(this),s=h.bBox(o.node());a=Math.max(a,l.lineCount(o)),i.push({top:0,bottom:10,height:10,left:n-s.width/2,right:n+s.width/2+2,width:s.width+2})});var s=("boundaries"===t.tickson||t.showdividers)&&!n.secondary,c=f.length,u=Math.abs((f[c-1].x-f[0].x)*t._m)/(c-1),d=s?u/2:u,p=Math.sqrt(Math.pow(d,2)+Math.pow(s?t.ticklen:1.25*r*a,2)),g=d/p,v=t.autotickangles.map(function(e){return e*Math.PI/180}),_=v.find(function(e){return Math.abs(Math.cos(e))<=g});void 0===_&&(_=v.reduce(function(e,t){return Math.abs(Math.cos(e))R*O&&(I=O,C[E]=L[E]=z[E])}var V=Math.abs(I-P);V-k>0?(V-=k,k*=1+k/V):k=0,"y"!==t._id.charAt(0)&&(k=-k),C[S]=T.p2r(T.r2p(L[S])+A*k),"min"===T.autorange||"max reversed"===T.autorange?(C[0]=null,T._rangeInitial0=void 0,T._rangeInitial1=void 0):("max"===T.autorange||"min reversed"===T.autorange)&&(C[1]=null,T._rangeInitial0=void 0,T._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[T._name+".range"]=C}var q=o.syncOrAsync(_);return q&&q.then&&e._promises.push(q),q},Z.getPxPosition=function(e,t){var r,i=e._fullLayout._size,n=t._id.charAt(0),a=t.side;return("free"!==t.anchor?r=t._anchorAxis:"x"===n?r={_offset:i.t+(1-(t.position||0))*i.h,_length:0}:"y"===n&&(r={_offset:i.l+(t.position||0)*i.w+t._shift,_length:0}),"top"===a||"left"===a)?r._offset:"bottom"===a||"right"===a?r._offset+r._length:void 0},Z.shouldShowZeroLine=function(e,t,r){var i=o.simpleMap(t.range,t.r2l);return i[0]*i[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===R)&&(eL(t,0)||!function(e,t,r,i){var n=r._mainAxis;if(n){var a=e._fullLayout,o=t._id.charAt(0),s=Z.counterLetter(t._id),l=t._offset+(Math.abs(i[0])1)for(i=1;i4/3-s?o:s}}}),ru=p({"src/components/dragelement/cursor.js"(e,t){var r=tv(),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(e,t,n,a){return e="left"===n?0:"center"===n?1:"right"===n?2:r.constrain(Math.floor(3*e),0,2),i[t="bottom"===a?0:"middle"===a?1:"top"===a?2:r.constrain(Math.floor(3*t),0,2)][e]}}}),rh=p({"src/components/dragelement/unhover.js"(e,t){var r=tT(),i=tt(),n=eU().getGraphDiv,a=G(),o=t.exports={};o.wrapped=function(e,t,r){var s;(e=n(e))._fullLayout&&i.clear(e._fullLayout._uid+a.HOVERID);let l=e._hoverdata;o.raw(e,t,r)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,null!=(s=e._fullLayout)&&s.hoveranywhere&&t?.target&&!l&&e.emit("plotly_unhover",{event:t,points:[]}))},o.raw=function(e,t){var i=e._fullLayout,n=e._hoverdata;return t||(t={}),(!t.target||!!e._dragged||!1!==r.triggerHandler(e,"plotly_beforehover",t))&&(i._hoverlayer.selectAll("g").remove(),i._hoverlayer.selectAll("line").remove(),i._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&n&&e.emit("plotly_unhover",{event:t,points:n}),!0)}}}),rd=p({"src/components/dragelement/index.js"(e,t){var r=rs(),i=t_(),n=rl(),a=tv().removeElement,o=tE(),s=t.exports={};s.align=rc(),s.getCursor=ru();var l=rh();function c(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=0x3b9ac9ff,t.background="none",document.body.appendChild(e),e}function u(e){return r(e.changedTouches?e.changedTouches[0]:e,document.body)}s.unhover=l.wrapped,s.unhoverRaw=l.raw,s.init=function(e){var t,r,l,h,d,f,p,m,g=e.gd,y=1,v=g._context.doubleClickDelay,x=e.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,n?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=e.clampFn||function(e,t,r){return Math.abs(e)"u"&&typeof n.clientY>"u"&&(n.clientX=t,n.clientY=r),(l=new Date().getTime())-g._mouseDownTimev&&(y=Math.max(y-1,1)),g._dragged)e.doneFn&&e.doneFn();else{var r;f.target===p?r=f:(r={target:p,srcElement:p,toElement:p},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(e=>{var t=f[e];r[e]||"function"==typeof t||(r[e]=t)})),e.clickFn&&e.clickFn(y,r),m||p.dispatchEvent(new MouseEvent("click",t))}g._dragging=!1,g._dragged=!1}},s.coverSlip=c}}),rf=p({"src/lib/setcursor.js"(e,t){t.exports=function(e,t){(e.attr("class")||"").split(" ").forEach(function(t){0===t.indexOf("cursor-")&&e.classed(t,!1)}),t&&e.classed("cursor-"+t,!0)}}}),rp=p({"src/lib/override_cursor.js"(e,t){var r=rf(),i="data-savedcursor";t.exports=function(e,t){var n=e.attr(i);if(t){if(!n){for(var a=(e.attr("class")||"").split(" "),o=0;ot.legend.length)for(var i=t.legend.length;i+("legend"===e));if(!1===E&&(c[e]=void 0),!1===E&&!d.uirevision||(p("uirevision",c.uirevision),!1===E))return;p("borderwidth");var C,L,P,I=p("orientation"),z=p("yref"),D=p("xref"),O="h"===I,R="paper"===z,F="paper"===D,j="left";O?(C=0,r.getComponentMethod("rangeslider","isVisible")(t.xaxis)?R?(L=1.1,P="bottom"):(L=1,P="top"):R?(L=-.1,P="top"):(L=0,P="bottom")):(L=1,P="auto",F?C=1.02:(C=1,j="right")),i.coerce(d,f,{x:{valType:"number",editType:"legend",min:F?-2:0,max:F?3:1,dflt:C}},"x"),i.coerce(d,f,{y:{valType:"number",editType:"legend",min:R?-2:0,max:R?3:1,dflt:L}},"y"),p("traceorder",w),l.isGrouped(c[e])&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("indentation"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick");let B=p("groupclick");if(p("groupdoubleclick",B),p("xanchor",j),p("yanchor",P),p("maxheight"),p("valign"),i.noneOrAll(d,f,["x","y"]),p("title.text")){p("title.side",O?"left":"top");var N=i.extendFlat({},m,{size:i.bigFont(m.size)});i.coerceFont(p,"title.font",N);let e=h>1;p("titleclick",!!e&&"toggle"),p("titledoubleclick",!!e&&"toggleothers")}})(g,e,t,h,m.length),t[g]&&(t[g]._id=g),t._legends.push(g)}}}}),rv=p({"src/components/legend/handle_click.js"(e){var t=eQ(),r=tv(),i=r.pushUnique,n=rg(),a=!0;e.handleItemClick=function(e,n,o,s,l){var c=n._fullLayout;if(n._dragged||n._editing)return;var u=e.data()[0][0];if(u.groupTitle&&u.noClick)return;let h=2===l?o.groupdoubleclick:o.groupclick;"toggle"===s&&"toggleothers"===o.itemdoubleclick&&a&&n.data&&n._context.showTips&&(r.notifier(r._(n,"Double-click on legend to isolate one trace"),"long",n),a=!1);var d="togglegroup"===h,f=c.hiddenlabels?c.hiddenlabels.slice():[],p=n._fullData;let m=(c.shapes||[]).filter(e=>e.showlegend||e.legendgroup);var g=p.concat(m),y=u.trace;y._isShape&&(y=c.shapes[y.index]);var v,x,b,_,w,T=y.legendgroup,M={},k=[],A=[],S=[],E=(c.shapes||[]).map(function(e){return e._input}),C=!1;function L(e,t){if(!(u.groupTitle&&!d)){var r,i,n,a=e._isShape,o=e.index;void 0===o&&(o=e._index);var s=!1!==e.visible&&t;a?(E[o].visible=s,C=!0):(r=o,i=k.indexOf(r),(n=M.visible)||(n=M.visible=[]),-1===k.indexOf(r)&&(k.push(r),i=k.length-1),n[i]=s)}}var P=y.legend;if(!y._isShape&&t.traceIs(y,"pie-like")){var I=u.label,z=f.indexOf(I);if("toggle"===s)-1===z?f.push(I):f.splice(z,1);else if("toggleothers"===s){var D=-1!==z,O=[];for(v=0;ve.showlegend||e.legendgroup),c=o.concat(l);function u(e){return(e.legend||"legend")===s}"toggle"===i?(p=!c.some(function(e){return u(e)&&!0===e.visible}),m=!1):(p=!0,m=!c.some(function(e){return!u(e)&&!0===e.visible&&!1!==e.showlegend}));let h={visible:[]},d=[],f=(a.shapes||[]).map(function(e){return e._input});for(var p,m,g=!1,y=0;yP&&(C=P)}S[o][0]._groupMinRank=C,S[o][0]._preGroupSort=o}var I=function(e,t){return(r(e.trace.legendrank)?e.trace.legendrank[e.i]:e.trace.legendrank)-(r(t.trace.legendrank)?t.trace.legendrank[t.i]:t.trace.legendrank)||e._preSort-t._preSort};for(S.forEach(function(e,t){e[0]._preGroupSort=t}),S.sort(function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort}),o=0;or?r:e}t.exports=function(e,t,g){var y=t._fullLayout;g||(g=y.legend);var v="constant"===g.itemsizing,x=g.itemwidth,b=a((x+2*d.itemGap)/2,0),_=function(e,t,r,i){var n;if(e+1)n=e;else{if(!t||!(t.width>0))return 0;n=t.width}return v?i:Math.min(n,r)};function w(e,n,a){var c=e[0].trace,u=c.marker||{},h=u.line||{},d=u.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",f=a?c.visible&&c.type===a:i.traceIs(c,"bar"),p=r.select(n).select("g.legendpoints").selectAll("path.legend"+a).data(f?[e]:[]);p.enter().append("path").classed("legend"+a,!0).attr("d",d).attr("transform",b),p.exit().remove(),p.each(function(e){var i=r.select(this),n=e[0],a=_(n.mlw,u.line,5,2);i.style("stroke-width",a+"px");var d=n.mcc;if(!g._inHover&&"mc"in n){var f=l(u),p=f.mid;void 0===p&&(p=(f.max+f.min)/2),d=o.tryColorscale(u,"")(p)}var y=d||n.mc||u.color,v=u.pattern,x=o.getPatternAttr,b=v&&(x(v.shape,0,"")||x(v.path,0,""));if(b){var w=x(v.bgcolor,0,null),T=x(v.fgcolor,0,null),M=v.fgopacity,k=m(v.size,8,10),A=m(v.solidity,.5,1),S="legend-"+c.uid;i.call(o.pattern,"legend",t,S,b,k,A,d,v.fillmode,w,T,M)}else i.call(s.fill,y);a&&s.stroke(i,n.mlc||h.color)})}function T(e,a,o){var s=e[0],l=s.trace,c=o?l.visible&&l.type===o:i.traceIs(l,o),d=r.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(c?[e]:[]);if(d.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),d.exit().remove(),d.size()){var f=l.marker||{},p=_(h(f.line.width,s.pts),f.line,5,2),m="pieLike",g=n.minExtend(l,{marker:{line:{width:p}}},m);u(d,n.minExtend(s,{trace:g},m),g,t)}}e.each(function(e){var t=r.select(this),i=n.ensureSingle(t,"g","layers");i.style("opacity",e[0].trace.opacity);var o=g.indentation,s=g.valign,l=e[0].lineHeight,c=e[0].height;if(("middle"!==s||0!==o)&&l&&c){var u=g.indentation;i.attr("transform",a(u,.5*(l-c+3)*({top:1,bottom:-1})[s]||0))}else i.attr("transform",null);i.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var h=i.selectAll("g.legendsymbols").data([e]);h.enter().append("g").classed("legendsymbols",!0),h.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)}).each(function(e){var i,a=e[0].trace,c=[];if(a.visible)switch(a.type){case"histogram2d":case"heatmap":c=[["M-15,-2V4H15V-2Z"]],i=!0;break;case"choropleth":case"choroplethmap":c=[["M-6,-6V6H6V-6Z"]],i=!0;break;case"densitymap":c=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],i="radial";break;case"cone":c=[["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"]],i=!1;break;case"streamtube":c=[["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"]],i=!1;break;case"surface":c=[["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"]],i=!0;break;case"mesh3d":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],i=!1;break;case"volume":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],i=!0;break;case"isosurface":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],i=!1}var u=r.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(c);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",b).style("stroke-miterlimit",1),u.exit().remove(),u.each(function(e,c){var u,h=r.select(this),d=l(a),p=d.colorscale,m=d.reversescale;if(p){if(!i){var g=p.length;u=0===c?p[m?g-1:0][1]:1===c?p[m?0:g-1][1]:p[Math.floor((g-1)/2)][1]}}else{var y=a.vertexcolor||a.facecolor||a.color;u=n.isArrayOrTypedArray(y)?y[c]||y[0]:y}h.attr("d",e[0]),u?h.call(s.fill,u):h.call(function(e){if(e.size()){var r="legendfill-"+a.uid;o.gradient(e,t,r,f(m,"radial"===i),p,"fill")}})})}).each(function(e){var t=e[0].trace,i="waterfall"===t.type;if(e[0]._distinct&&i){var n=e[0].trace[e[0].dir].marker;return e[0].mc=n.color,e[0].mlw=n.line.width,e[0].mlc=n.line.color,w(e,this,"waterfall")}var a=[];t.visible&&i&&(a=e[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 o=r.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(a);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",b).style("stroke-miterlimit",1),o.exit().remove(),o.each(function(e){var i=r.select(this),n=t[e[0]].marker,a=_(void 0,n.line,5,2);i.attr("d",e[1]).style("stroke-width",a+"px").call(s.fill,n.color),a&&i.call(s.stroke,n.line.color)})}).each(function(e){w(e,this,"funnel")}).each(function(e){w(e,this)}).each(function(e){var a=e[0].trace,l=r.select(this).select("g.legendpoints").selectAll("path.legendbox").data(a.visible&&i.traceIs(a,"box-violin")?[e]:[]);l.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),l.exit().remove(),l.each(function(){var e=r.select(this);if(("all"===a.boxpoints||"all"===a.points)&&0===s.opacity(a.fillcolor)&&0===s.opacity((a.line||{}).color)){var i=n.minExtend(a,{marker:{size:v?12:n.constrain(a.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});l.call(o.pointStyle,i,t)}else{var c=_(void 0,a.line,5,2);e.style("stroke-width",c+"px").call(s.fill,a.fillcolor),c&&s.stroke(e,a.line.color)}})}).each(function(e){T(e,this,"funnelarea")}).each(function(e){T(e,this,"pie")}).each(function(e){var i,a,s=p(e),u=s.showFill,h=s.showLine,d=s.showGradientLine,m=s.showGradientFill,g=s.anyFill,y=s.anyLine,v=e[0],b=v.trace,w=l(b),T=w.colorscale,M=w.reversescale,k=c.hasMarkers(b)||!g?"M5,0":y?"M5,-2":"M5,-3",A=r.select(this),S=A.select(".legendfill").selectAll("path").data(u||m?[e]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",k+"h"+x+"v6h-"+x+"z").call(function(e){if(e.size())if(u)o.fillGroupStyle(e,t,!0);else{var r="legendfill-"+b.uid;o.gradient(e,t,r,f(M),T,"fill")}}),h||d){var E=_(void 0,b.line,10,5);a=n.minExtend(b,{line:{width:E}}),i=[n.minExtend(v,{trace:a})]}var C=A.select(".legendlines").selectAll("path").data(h||d?[i]:[]);C.enter().append("path").classed("js-line",!0),C.exit().remove(),C.attr("d",k+(d?"l"+x+",0.0001":"h"+x)).call(h?o.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+b.uid;o.lineGroupStyle(e),o.gradient(e,t,r,f(M),T,"stroke")}})}).each(function(e){var i,a,s=p(e),l=s.anyFill,u=s.anyLine,h=s.showLine,d=s.showMarker,f=e[0],m=f.trace,g=!d&&!u&&!l&&c.hasText(m);function y(e,t,r,i){var a=n.nestedProperty(m,e).get(),o=n.isArrayOrTypedArray(a)&&t?t(a):a;if(v&&o&&void 0!==i&&(o=i),r){if(or[1])return r[1]}return o}function x(e){return f._distinct&&f.index&&e[f.index]?e[f.index]:e[0]}if(d||g||h){var _={},w={};if(d){_.mc=y("marker.color",x),_.mx="scattermap"===m.type?"circle":y("marker.symbol",x),_.mo=y("marker.opacity",n.mean,[.2,1]),_.mlc=y("marker.line.color",x),_.mlw=y("marker.line.width",n.mean,[0,5],2),_.mld=y("marker.line.dash",x),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=y("marker.size",n.mean,[2,16],12);_.ms=T,w.marker.size=T}h&&(w.line={width:y("line.width",x,[0,10],5)}),g&&(_.tx="Aa",_.tp=y("textposition",x),_.ts=10,_.tc=y("textfont.color",x),_.tf=y("textfont.family",x),_.tw=y("textfont.weight",x),_.ty=y("textfont.style",x),_.tv=y("textfont.variant",x),_.tC=y("textfont.textcase",x),_.tE=y("textfont.lineposition",x),_.tS=y("textfont.shadow",x)),i=[n.minExtend(f,_)],(a=n.minExtend(m,w)).selectedpoints=null,a.texttemplate=null}var M=r.select(this).select("g.legendpoints"),k=M.selectAll("path.scatterpts").data(d?i:[]);k.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",b),k.exit().remove(),k.call(o.pointStyle,a,t),d&&(i[0].mrc=3);var A=M.selectAll("g.pointtext").data(g?i:[]);A.enter().append("g").classed("pointtext",!0).append("text").attr("transform",b),A.exit().remove(),A.selectAll("text").call(o.textPointStyle,a,t)}).each(function(e){var t=e[0].trace,i=r.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);i.enter().append("path").classed("legendcandle",!0).attr("d",function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",b).style("stroke-miterlimit",1),i.exit().remove(),i.each(function(e,i){var n=r.select(this),a=t[i?"increasing":"decreasing"],o=_(void 0,a.line,5,2);n.style("stroke-width",o+"px").call(s.fill,a.fillcolor),o&&s.stroke(n,a.line.color)})}).each(function(e){var t=e[0].trace,i=r.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);i.enter().append("path").classed("legendohlc",!0).attr("d",function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",b).style("stroke-miterlimit",1),i.exit().remove(),i.each(function(e,i){var n=r.select(this),a=t[i?"increasing":"decreasing"],l=_(void 0,a.line,5,2);n.style("fill","none").call(o.dashLine,a.line.dash,l),l&&s.stroke(n,a.line.color)})})}}}),rk=p({"src/components/legend/draw.js"(e,t){var r=T(),i=tv(),n=tD(),a=eQ(),o=tT(),s=rd(),l=t7(),c=ee(),u=tF(),h=rv().handleItemClick,d=rv().handleTitleClick,f=rx(),p=tR(),m=p.LINE_SPACING,g=p.FROM_TL,y=p.FROM_BR,v=rb(),x=rM(),b=rg(),_=/^legend[0-9]*$/;function w(e,t){var h,p,_=t||{},w=e._fullLayout,T=b.getId(_),S=_._inHover;if(S?(p=_.layer,h="hover"):(p=w._infolayer,h=T),p){if(h+=w._uid,e._legendMouseDownTime||(e._legendMouseDownTime=0),S){if(!_.entries)return;I=v(_.entries,_)}else{for(var I,z,D=(e.calcdata||[]).slice(),O=w.shapes,R=0;R1)}var B=w.hiddenlabels||[];if(!S&&(!w.showlegend||!I.length))return p.selectAll("."+T).remove(),w._topdefs.select("#"+h).remove(),n.autoMargin(e,T);var N=i.ensureSingle(p,"g",T,function(e){S||e.attr("pointer-events","all")}),U=i.ensureSingleById(w._topdefs,"clipPath",h,function(e){e.append("rect")}),V=i.ensureSingle(N,"rect","bg",function(e){e.attr("shape-rendering","crispEdges")});V.call(c.stroke,_.bordercolor).call(c.fill,_.bgcolor).style("stroke-width",_.borderwidth+"px");var q=i.ensureSingle(N,"g","scrollbox"),H=_.title;_._titleWidth=0,_._titleHeight=0,H.text?((z=i.ensureSingle(q,"text",T+"titletext")).attr("text-anchor","start").call(l.font,H.font).text(H.text),C(z,q,e,_,1),!S&&(_.titleclick||_.titledoubleclick)&&function(e,t,n,s){if(t._fullData.some(function(e){let t=e.legend||"legend";return(Array.isArray(t)?t.includes(s):t===s)&&a.traceIs(e,"pie-like")}))return;let l=t._context.doubleClickDelay;var u,h=1;let f=i.ensureSingle(e,"rect",s+"titletoggle",function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(f.on("mousedown",function(){(u=new Date().getTime())-t._legendMouseDownTimel&&(h=Math.max(h-1,1));let e={event:r.event,legendId:s,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(1===h&&n.titleclick){if(!1===o.triggerHandler(t,"plotly_legendtitleclick",e))return;n._titleClickTimeout=setTimeout(function(){t._fullLayout&&d(t,n,n.titleclick)},l)}else 2===h&&(n._titleClickTimeout&&clearTimeout(n._titleClickTimeout),t._legendMouseDownTime=0,!1!==o.triggerHandler(t,"plotly_legendtitledoubleclick",e)&&n.titledoubleclick&&d(t,n,n.titledoubleclick))}))}(q,e,_,T)):(q.selectAll("."+T+"titletext").remove(),q.selectAll("."+T+"titletoggle").remove());var G=i.ensureSingle(N,"rect","scrollbar",function(e){e.attr(f.scrollBarEnterAttrs).call(c.fill,f.scrollBarColor)}),W=q.selectAll("g.groups").data(I);W.enter().append("g").attr("class","groups"),W.exit().remove();var Y=W.selectAll("g.traces").data(i.identity);Y.enter().append("g").attr("class","traces"),Y.exit().remove(),Y.style("opacity",function(t){let r=t[0],i=r.trace;if(r.groupTitle){let t=i.legendgroup,r=(w.shapes||[]).filter(function(e){return e.showlegend});return e._fullData.concat(r).some(function(e){return e.legendgroup===t&&(e.legend||"legend")===T&&!0===e.visible})?1:.5}return a.traceIs(i,"pie-like")?-1!==B.indexOf(t[0].label)?.5:1:"legendonly"===i.visible?.5:1}).each(function(){r.select(this).call(A,e,_)}).call(x,e,_).each(function(t){S||t[0].groupTitle&&"toggleitem"===_.groupclick||r.select(this).call(E,e,T)}),i.syncOrAsync([n.previousPromises,function(){return function(e,t,i,n,a){var o,s,c,h,d=e._fullLayout,p=b.getId(n);n||(n=d[p]);var g=d._size,y=b.isVertical(n),v=b.isGrouped(n),x="fraction"===n.entrywidthmode,_=n.borderwidth,w=2*_,T=f.itemGap,k=n.indentation+n.itemwidth+2*T,A=2*(_+T),S=P(n),E=n.y<0||0===n.y&&"top"===S,C=n.y>1||1===n.y&&"bottom"===S,I=n.tracegroupgap,z={};let{orientation:D,yref:O}=n,{maxheight:R}=n,F=E||C||"v"!==D||"paper"!==O;R||(R=F?.5:1);let j=F?d.height:g.h;n._maxHeight=Math.max(R>1?R:R*j,30);var B=0;n._width=0,n._height=0;var N=(s=0,c=0,(h=(o=n).title.side)&&(-1!==h.indexOf("left")&&(s=o._titleWidth),-1!==h.indexOf("top")&&(c=o._titleHeight)),[s,c]);if(y)i.each(function(e){var t=e[0].height;l.setTranslate(this,_+N[0],_+N[1]+n._height+t/2+T),n._height+=t,n._width=Math.max(n._width,e[0].width)}),B=k+n._width,n._width+=T+k+w,n._height+=A,v&&(t.each(function(e,t){l.setTranslate(this,0,t*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var U=L(n),V=n.x<0||0===n.x&&"right"===U,q=n.x>1||1===n.x&&"left"===U,H=C||E,G=d.width/2;n._maxWidth=Math.max(V?H&&"left"===U?g.l+g.w:G:q?H&&"right"===U?g.r+g.w:G:g.w,2*k);var W=0,Y=0;i.each(function(e){var t=M(e,n,k);W=Math.max(W,t),Y+=t}),B=null;var Z=0;if(v){var $=0,X=0,K=0;t.each(function(){var e=0,t=0;r.select(this).selectAll("g.traces").each(function(r){var i=M(r,n,k),a=r[0].height;l.setTranslate(this,N[0],N[1]+_+T+a/2+t),t+=a,e=Math.max(e,i),z[r[0].trace.legendgroup]=e});var i=e+T;X>0&&i+_+X>n._maxWidth?(Z=Math.max(Z,X),X=0,K+=$+I,$=t):$=Math.max($,t),l.setTranslate(this,X,K),X+=i}),n._width=Math.max(Z,X)+_,n._height=K+$+A}else{var J=i.size(),Q=Y+w+(J-1)*T=n._maxWidth&&(Z=Math.max(Z,ei),et=0,er+=ee,n._height+=ee,ee=0),l.setTranslate(this,N[0]+_+et,N[1]+_+er+t/2+T),ei=et+r+T,et+=i,ee=Math.max(ee,t)}),Q?(n._width=et+w,n._height=ee+A):(n._width=Math.max(Z,ei)+w,n._height+=ee+A)}}n._width=Math.ceil(Math.max(n._width+N[0],n._titleWidth+2*(_+f.titlePad))),n._height=Math.ceil(Math.max(n._height+N[1],n._titleHeight+2*(_+f.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var en=e._context.edits,ea=en.legendText||en.legendPosition;i.each(function(e){var t=r.select(this).select("."+p+"toggle"),i=e[0].height,a=e[0].trace.legendgroup,o=M(e,n,k);v&&""!==a&&(o=z[a]);var s=ea?k:B||o;y||x||(s+=T/2),l.setRect(t,0,-i/2,s,i)});var eo=a.select("."+p+"titletext");eo.node()&&function(e,t,r){if("top center"===t.title.side||"top right"===t.title.side){var i=t.title.font.size*m,n=0,a=e.node(),o=l.bBox(a).width;"top center"===t.title.side?n=.5*(t._width-2*r-2*f.titlePad-o):"top right"===t.title.side&&(n=t._width-2*r-2*f.titlePad-o),u.positionText(e,r+f.titlePad+n,r+i)}}(eo,n,_);var es=a.select("."+p+"titletoggle");if(es.size()&&eo.node()){var el=eo.attr("x")||0,ec=f.titlePad;l.setRect(es,el-ec,_,n._titleWidth+2*ec,n._titleHeight+2*ec)}}(e,W,Y,_,q)},function(){var t,o,c,u,d=w._size,m=_.borderwidth,v="paper"===_.xref,x="paper"===_.yref;if(H.text){let t=(w.shapes||[]).filter(function(e){return e.showlegend}),r=e._fullData.concat(t).some(function(e){let t=e.legend||"legend";return(Array.isArray(t)?t.includes(T):t===T)&&!0===e.visible});z.style("opacity",r?1:.5)}if(!S){if(function(e,t,r,i){var a=e._fullLayout,o=a[t],s=L(o),l=P(o),c="paper"===o.xref,u="paper"===o.yref;e._fullLayout._reservedMargin[t]={};var h=o.y<.5?"b":"t",d=o.x<.5?"l":"r",f={r:a.width-r,l:r+o._width,b:a.height-i,t:i+o._effHeight};if(c&&u)return n.autoMargin(e,t,{x:o.x,y:o.y,l:o._width*g[s],r:o._width*y[s],b:o._effHeight*y[l],t:o._effHeight*g[l]});c?e._fullLayout._reservedMargin[t][h]=f[h]:u||"v"===o.orientation?e._fullLayout._reservedMargin[t][d]=f[d]:e._fullLayout._reservedMargin[t][h]=f[h]}(e,T,R=v?d.l+d.w*_.x-g[L(_)]*_._width:w.width*_.x-g[L(_)]*_._width,F=x?d.t+d.h*(1-_.y)-g[P(_)]*_._effHeight:w.height*(1-_.y)-g[P(_)]*_._effHeight))return;if(w.margin.autoexpand){var b=R,M=F;R=v?i.constrain(R,0,w.width-_._width):b,F=x?i.constrain(F,0,w.height-_._effHeight):M,R!==b&&i.log("Constrain "+T+".x to make legend fit inside graph"),F!==M&&i.log("Constrain "+T+".y to make legend fit inside graph")}l.setTranslate(N,R,F)}if(G.on(".drag",null),N.on("wheel",null),S||_._height<=_._maxHeight||e._context.staticPlot){var A=_._effHeight;S&&(A=_._height),V.attr({width:_._width-m,height:A-m,x:m/2,y:m/2}),l.setTranslate(q,0,0),U.select("rect").attr({width:_._width-2*m,height:A-2*m,x:m,y:m}),l.setClipUrl(q,h,e),l.setRect(G,0,0,0,0),delete _._scrollY}else{var E=Math.max(f.scrollBarMinHeight,_._effHeight*_._effHeight/_._height),C=_._effHeight-E-2*f.scrollBarMargin,I=_._height-_._effHeight,D=C/I,O=Math.min(_._scrollY||0,I);V.attr({width:_._width-2*m+f.scrollBarWidth+f.scrollBarMargin,height:_._effHeight-m,x:m/2,y:m/2}),U.select("rect").attr({width:_._width-2*m+f.scrollBarWidth+f.scrollBarMargin,height:_._effHeight-2*m,x:m,y:m+O}),l.setClipUrl(q,h,e),K(O,E,D),N.on("wheel",function(){K(O=i.constrain(_._scrollY+r.event.deltaY/I*C,0,I),E,D),0!==O&&O!==I&&r.event.preventDefault()});var R,F,j,B,W,Y=function(e,t,r){var n=(r-t)/D+e;return i.constrain(n,0,I)},Z=function(e,t,r){var n=(t-r)/D+e;return i.constrain(n,0,I)},$=r.behavior.drag().on("dragstart",function(){var e=r.event.sourceEvent;j="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,W=O}).on("drag",function(){var e=r.event.sourceEvent;2===e.buttons||e.ctrlKey||(B="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,K(O=Y(W,j,B),E,D))});G.call($);var X=r.behavior.drag().on("dragstart",function(){var e=r.event.sourceEvent;"touchstart"===e.type&&(j=e.changedTouches[0].clientY,W=O)}).on("drag",function(){var e=r.event.sourceEvent;"touchmove"===e.type&&(B=e.changedTouches[0].clientY,K(O=Z(W,j,B),E,D))});q.call(X)}function K(t,r,i){_._scrollY=e._fullLayout[T]._scrollY=t,l.setTranslate(q,0,-t),l.setRect(G,_._width,f.scrollBarMargin+t*i,f.scrollBarWidth,r),U.select("rect").attr("y",m+t)}e._context.edits.legendPosition&&(N.classed("cursor-move",!0),s.init({element:N.node(),gd:e,prepFn:function(e){if(e.target!==G.node()){var t=l.getTranslate(N);c=t.x,u=t.y}},moveFn:function(e,r){if(void 0!==c&&void 0!==u){var i=c+e,n=u+r;l.setTranslate(N,i,n),t=s.align(i,_._width,d.l,d.l+d.w,_.xanchor),o=s.align(n+_._height,-_._height,d.t+d.h,d.t,_.yanchor)}},doneFn:function(){if(void 0!==t&&void 0!==o){var r={};r[T+".x"]=t,r[T+".y"]=o,a.call("_guiRelayout",e,r)}},clickFn:function(t,r){var i=p.selectAll("g.traces").filter(function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom});i.size()>0&&k(e,_,i,t,r)}}))}],e)}}function M(e,t,r){var i=e[0],n=i.width,a=t.entrywidthmode,o=i.trace.legendwidth||t.entrywidth;return"fraction"===a?t._maxWidth*o:r+(o||n)}function k(e,t,r,i,n){var s=e._fullLayout,l=r.data()[0][0].trace,c=t.itemclick,u=t.itemdoubleclick,d={event:n,node:r.node(),curveNumber:l.index,expandedIndex:l.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:s};l._group&&(d.group=l._group),a.traceIs(l,"pie-like")&&(d.label=r.datum()[0].label);var f=o.triggerHandler(e,"plotly_legendclick",d);if(1===i){if(!1===f)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&c&&h(r,e,t,c,i)},e._context.doubleClickDelay)}else 2===i&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==o.triggerHandler(e,"plotly_legenddoubleclick",d)&&!1!==f&&u&&h(r,e,t,u,i))}function A(e,t,r){var n,o,s=b.getId(r),c=e.data()[0][0],h=c.trace,d=a.traceIs(h,"pie-like"),p=!r._inHover&&t._context.edits.legendText&&!d,m=r._maxNameLength;c.groupTitle?(n=c.groupTitle.text,o=c.groupTitle.font):(o=r.font,r.entries?n=c.text:(n=d?c.label:h.name,h._meta&&(n=i.templateString(n,h._meta))));var g=i.ensureSingle(e,"text",s+"text");g.attr("text-anchor","start").call(l.font,o).text(p?S(n,m):n);var y=r.indentation+r.itemwidth+2*f.itemGap;u.positionText(g,y,0),p?g.call(u.makeEditable,{gd:t,text:n}).call(C,e,t,r).on("edit",function(i){this.text(S(i,m)).call(C,e,t,r);var n={};return n.name=i,c.trace._isShape?a.call("_guiRelayout",t,"shapes["+h.index+"].name",n.name):a.call("_guiRestyle",t,n,h.index)}):C(g,e,t,r)}function S(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var i=r-e.length;i>0;i--)e+=" ";return e}function E(e,t,n){var a,o=t._context.doubleClickDelay,s=1,l=i.ensureSingle(e,"rect",n+"toggle",function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){(a=new Date().getTime())-t._legendMouseDownTimeo&&(s=Math.max(s-1,1)),k(t,i,e,s,r.event)}}))}function C(e,t,r,i,n){i._inHover&&e.attr("data-notex",!0),u.convertToTspans(e,r,function(){!function(e,t,r,i){var n=e.data()[0][0],a=n&&n.trace.showlegend;if(Array.isArray(a)&&(a=!1!==a[n.i]),!r._inHover&&n&&!a)return e.remove();var o=e.select("g[class*=math-group]"),s=o.node(),c=b.getId(r);r||(r=t._fullLayout[c]);var h,d,p=r.borderwidth,g=(1===i?r.title.font:n.groupTitle?n.groupTitle.font:r.font).size*m;if(s){var y=l.bBox(s);h=y.height,d=y.width,1===i?l.setTranslate(o,p,p+.75*h):l.setTranslate(o,0,.25*h)}else{var v=e.select("."+c+(1===i?"title":"")+"text"),x=u.lineCount(v),_=v.node();if(h=g*x,d=_?l.bBox(_).width:0,1===i)"left"===r.title.side&&(d+=2*f.itemGap),u.positionText(v,p+f.titlePad,p+g);else{var w=2*f.itemGap+r.indentation+r.itemwidth;n.groupTitle&&(w=f.itemGap,d-=r.indentation+r.itemwidth),u.positionText(v,w,-g*((x-1)/2-.3))}}1===i?(r._titleWidth=d,r._titleHeight=h):(n.lineHeight=g,n.height=Math.max(h,16)+3,n.width=d)}(t,r,i,n)})}function L(e){return i.isRightAnchor(e)?"right":i.isCenterAnchor(e)?"center":"left"}function P(e){return i.isBottomAnchor(e)?"bottom":i.isMiddleAnchor(e)?"middle":"top"}t.exports=function(e,t){if(t)w(e,t);else{var i=e._fullLayout,n=i._legends;i._infolayer.selectAll('[class^="legend"]').each(function(){var e=r.select(this),t=e.attr("class").split(" ")[0];t.match(_)&&-1===n.indexOf(t)&&e.remove()});for(var a=0;a$[0]._length||eb<0||eb>X[0]._length)return d.unhoverRaw(e,a)}else ex="xpx"in a?a.xpx:$[0]._length/2,eb="ypx"in a?a.ypx:X[0]._length/2;if(a.pointerX=ex+$[0]._offset,a.pointerY=eb+X[0]._offset,er="xval"in a?g.flat(b,a.xval):g.p2c($,ex),ei="yval"in a?g.flat(b,a.yval):g.p2c(X,eb),e._hoverPointerX=a.pointerX,e._hoverPointerY=a.pointerY,!r(er[0])||!r(ei[0]))return i.warn("Fx.hover failed",a,e),d.unhoverRaw(e,a)}_.clickanywhere&&(e._hoverXVals=er,e._hoverYVals=ei,e._hoverXAxes=$,e._hoverYAxes=X);var eM=1/0;function ek(t,n){for(ea=0;eaep&&(em.splice(0,ep),eM=em[0].distance),S&&0!==et&&0===em.length){ef.distance=et,ef.index=!1;var u=es._module.hoverPoints(ef,eh,ed,"closest",{hoverLayer:_._hoverlayer});if(u&&(u=u.filter(function(e){return e.spikeDistance<=et})),u&&u.length){var d,p=u.filter(function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap});if(p.length){var m=p[0];r(m.x0)&&r(m.y0)&&(d=eS(m),(!ey.vLinePoint||ey.vLinePoint.spikeDistance>d.spikeDistance)&&(ey.vLinePoint=d))}var y=u.filter(function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap});if(y.length){var v=y[0];r(v.x0)&&r(v.y0)&&(d=eS(v),(!ey.hLinePoint||ey.hLinePoint.spikeDistance>d.spikeDistance)&&(ey.hLinePoint=d))}}}}}function eA(e,t,r){for(var i,n=null,a=1/0,o=0;oe.trace.index===eD.trace.index):[eD]).length;ek(U("x",eD,_),U("y",eD,_));var eR,eF=[],ej={},eB=0,eN=function(e){var t=E[e.trace.type]?I(e):e.trace.index;if(ej[t]){var r=ej[t]-1,i=eF[r];r>0&&Math.abs(e.distance)eO-1;eR--)eN(em[eR]);em=eF,eL()}var eU=e._hoverdata,eV=[],eq=V(e),eH=q(e);for(let e of em){var eG=g.makeEventData(e,e.trace,e.cd);if(!1!==e.hovertemplate){var eW=!1;e.cd[e.index]&&e.cd[e.index].ht&&(eW=e.cd[e.index].ht),e.hovertemplate=eW||e.trace.hovertemplate||!1}if(e.xa&&e.ya){var eY=e.x0+e.xa._offset,eZ=e.x1+e.xa._offset,e$=e.y0+e.ya._offset,eX=e.y1+e.ya._offset;eG.bbox={x0:Math.min(eY,eZ)+eH,x1:Math.max(eY,eZ)+eH,y0:Math.min(e$,eX)+eq,y1:Math.max(e$,eX)+eq},eG.xPixel=(eY+eZ)/2,eG.yPixel=(e$+eX)/2}e.eventData=[eG],eV.push(eG)}e._hoverdata=eV;var eK="y"===C&&(eg.length>1||em.length>1)||"closest"===C&&ev&&em.length>1,eJ=h.combine(_.plot_bgcolor||h.background,_.paper_bgcolor),eQ=D(em,{gd:e,hovermode:C,rotateLabels:eK,bgColor:eJ,container:_._hoverlayer,outerContainer:_._paper.node(),commonLabelOpts:_.hoverlabel,hoverdistance:_.hoverdistance}),e0=eQ.hoverLabels;if(g.isUnifiedHover(C)||(function(e,t,r,i){var n,a,o,s,l,c,u,h=t?"xa":"ya",d=t?"ya":"xa",f=0,p=1,m=e.size(),g=Array(m),y=0,v=i.minX,x=i.maxX,b=i.minY,_=i.maxY,T=function(e){return e*r._invScaleX},M=function(e){return e*r._invScaleY};function k(e){var t=e[0],r=e[e.length-1];if(a=t.pmin-t.pos-t.dp+t.size,o=r.pos+r.dp+r.size-t.pmax,a>.01){for(l=e.length-1;l>=0;l--)e[l].dp+=a;n=!1}if(!(o<.01)){if(a<-.01){for(l=e.length-1;l>=0;l--)e[l].dp-=o;n=!1}if(n){var i=0;for(s=0;st.pmax&&i++;for(s=e.length-1;s>=0&&!(i<=0);s--)(c=e[s]).pos>t.pmax-1&&(c.del=!0,i--);for(s=0;s=0;l--)e[l].dp-=o;for(s=e.length-1;s>=0&&!(i<=0);s--)(c=e[s]).pos+c.dp+c.size>t.pmax&&(c.del=!0,i--)}}}for(e.each(function(e){var i=e[h],n=e[d],a="x"===i._id.charAt(0),o=i.range;0===y&&o&&o[0]>o[1]!==a&&(p=-1);var s=0,l=a?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,u,f=R(e,t),m=e.anchor,k="end"===m?-1:1;if("middle"===m)u=(c=e.crossPos+(a?M(f.y-e.by/2):T(e.bx/2+e.tx2width/2)))+(a?M(e.by):T(e.bx));else if(a)u=(c=e.crossPos+M(A+f.y)-M(e.by/2-A))+M(e.by);else{var S=T(k*A+f.x),E=S+T(k*e.bx);c=e.crossPos+Math.min(S,E),u=e.crossPos+Math.max(S,E)}a?void 0!==b&&void 0!==_&&Math.min(u,_)-Math.max(c,b)>1&&("left"===n.side?(s=n._mainLinePosition,l=r.width):l=n._mainLinePosition):void 0!==v&&void 0!==x&&Math.min(u,x)-Math.max(c,v)>1&&("top"===n.side?(s=n._mainLinePosition,l=r.height):l=n._mainLinePosition)}g[y++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(a?w:1)/2,pmin:s,pmax:l}]}),g.sort(function(e,t){return e[0].posref-t[0].posref||p*(t[0].traceIndex-e[0].traceIndex)});!n&&f<=m;){for(f++,n=!0,s=0;s.01){for(l=E.length-1;l>=0;l--)E[l].dp+=a;for(S.push.apply(S,E),g.splice(s+1,1),u=0,l=S.length-1;l>=0;l--)u+=S[l].dp;for(o=u/S.length,l=S.length-1;l>=0;l--)S[l].dp-=o;n=!1}else s++}g.forEach(k)}for(s=g.length-1;s>=0;s--){var P=g[s];for(l=P.length-1;l>=0;l--){var I=P[l],z=I.datum;z.offset=I.dp,z.del=I.del}}}(e0,eK,_,eQ.commonLabelBoundingBox),F(e0,eK,_._invScaleX,_._invScaleY)),u&&u.tagName){var e1=m.getComponentMethod("annotations","hasClickToShow")(e,eV);c(t.select(u),e1?"pointer":"")}var e2=function(e,t){if(!t||t.length!==e._hoverdata.length)return!0;for(var r=t.length-1;r>=0;r--){var i=t[r],n=e._hoverdata[r];if(i.curveNumber!==n.curveNumber||String(i.pointNumber)!==String(n.pointNumber)||String(i.pointNumbers)!==String(n.pointNumbers)||i.binNumber!==n.binNumber)return!0}return!1}(e,eU);function e3(t){e.emit("plotly_hover",{event:a,points:t,xaxes:$,yaxes:X,xvals:g.c2dApply($,er),yvals:g.c2dApply(X,ei),xPixel:a.pointerX,yPixel:a.pointerY})}u&&!l&&(e2||_.hoveranywhere)&&(eU&&e2&&e.emit("plotly_unhover",{event:a,points:eU}),e3(e._hoverdata))}(e,a,o,l,u)})},e.loneHover=function(e,r){var i=!0;Array.isArray(e)||(i=!1,e=[e]);var n=r.gd,a=V(n),o=q(n),s=D(e.map(function(e){var t=e._x0||e.x0||e.x||0,i=e._x1||e.x1||e.x||0,s=e._y0||e.y0||e.y||0,l=e._y1||e.y1||e.y||0,c=e.eventData;if(c){var u=Math.min(t,i),d=Math.max(t,i),f=Math.min(s,l),p=Math.max(s,l),g=e.trace;if(m.traceIs(g,"gl3d")){var y=n._fullLayout[g.scene]._scene.container,v=y.offsetLeft,x=y.offsetTop;u+=v,d+=v,f+=x,p+=x}c.bbox={x0:u+o,x1:d+o,y0:f+a,y1:p+a},c.xPixel=(t+i)/2,c.yPixel=(s+l)/2,r.inOut_bbox&&r.inOut_bbox.push(c.bbox)}else c=!1;return{color:e.color||h.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontVariant:e.fontVariant,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:c}}),{gd:n,hovermode:"closest",rotateLabels:!1,bgColor:r.bgColor||h.background,container:t.select(r.container),outerContainer:r.outerContainer||r.container}).hoverLabels,l=0,c=0;return s.sort(function(e,t){return e.y0-t.y0}).each(function(e,t){var i=e.y0-e.by/2;i-5([\s\S]*)<\/extra>/;function D(e,r){var n=r.gd,s=n._fullLayout,c=r.hovermode,d=r.rotateLabels,f=r.bgColor,p=r.container,_=r.outerContainer,w=r.commonLabelOpts||{};if(0===e.length)return[[]];var T=r.fontFamily||y.HOVERFONT,M=r.fontSize||y.HOVERFONTSIZE,k=r.fontWeight||s.font.weight,E=r.fontStyle||s.font.style,C=r.fontVariant||s.font.variant,L=r.fontTextcase||s.font.textcase,P=r.fontLineposition||s.font.lineposition,z=r.fontShadow||s.font.shadow,D=e[0],R=D.xa,F=D.ya,j=c.charAt(0),B=j+"Label",N=D[B];if(void 0===N&&"multicategory"===R.type)for(var U=0;Us.width-_&&(I=s.width-_),r.attr("d","M"+(y-I)+",0L"+(y-I+A)+","+b+A+"H"+_+"v"+b+(2*S+x.height)+"H"+-_+"V"+b+A+"H"+(y-I-A)+"Z"),Q.minX=(y=I)-_,Q.maxX=y+_,"top"===R.side?(Q.minY=v-(2*S+x.height),Q.maxY=v-S):(Q.minY=v+S,Q.maxY=v+(2*S+x.height))}else{"right"===F.side?(O="start",j=1,B="",y=R._offset+R._length):(O="end",j=-1,B="-",y=R._offset),v=F._offset+(D.y0+D.y1)/2,o.attr("text-anchor",O),r.attr("d","M0,0L"+B+A+","+A+"V"+(S+x.height/2)+"h"+B+(2*S+x.width)+"V-"+(S+x.height/2)+"H"+B+A+"V-"+A+"Z"),Q.minY=v-(S+x.height/2),Q.maxY=v+(S+x.height/2),"right"===F.side?(Q.minX=y+A,Q.maxX=y+A+(2*S+x.width)):(Q.minX=y-A-(2*S+x.width),Q.maxX=y-A);var O,j,B,U,V=x.height/2,G=q-x.top-V,W="clip"+s._uid+"commonlabel"+F._id;if(y"none"!==e.hoverinfo);if(0===t.length)return[];var ee,et,er,ei,en=s.hoverlabel,ea=en.font,eo=t[0],es=(("x unified"===c?eo.xa:eo.ya).unifiedhovertitle||{}).text,el={showlegend:!0,legend:{title:{text:es?i.hovertemplateString({data:"x unified"===c?[{xa:eo.xa,x:eo.xVal}]:[{ya:eo.ya,y:eo.yVal}],fallback:eo.trace.hovertemplatefallback,locale:s._d3locale,template:es}):N,font:ea},font:ea,bgcolor:en.bgcolor,bordercolor:en.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:s.legend?s.legend.traceorder:void 0,orientation:"v"}},ec={font:ea};v(el,ec,n._fullData);var eu=ec.legend;eu.entries=[];for(var eh=0;eh=0?ee:et+e_=0?et:eS+e_=0?ey:ev+ew=0?ev:eE+ew=0,("top"===e.idealAlign||!K)&&J?(B-=V/2,e.anchor="end"):K?(B+=V/2,e.anchor="start"):e.anchor="middle",e.crossPos=B;else{if(e.pos=B,K=j+U/2+Q<=G,J=j-U/2-Q>=0,("left"===e.idealAlign||!K)&&J)j-=U/2,e.anchor="end";else if(K)j+=U/2,e.anchor="start";else{e.anchor="middle";var ee=Q/2,et=j+ee-G,er=j-ee;et>0&&(j-=et),er<0&&(j+=-er)}e.crossPos=j}w.attr("text-anchor",e.anchor),D&&I.attr("text-anchor",e.anchor),r.attr("transform",a(j,B)+(d?o(b):""))}),{hoverLabels:eC,commonLabelBoundingBox:Q}}function O(e,t,r,n,a,o){var s,l,c="",u="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=i.templateString(e.name,e.trace._meta)),c=N(e.name,e.nameLength));var h=r.charAt(0);void 0!==e.zLabel?(void 0!==e.xLabel&&(u+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(u+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmap"!==e.trace.type&&(u+=(u?"z: ":"")+e.zLabel)):t&&e[h+"Label"]===a?u=e[("x"===h?"y":"x")+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(u=e.yLabel):u=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",(e.text||0===e.text)&&!Array.isArray(e.text)&&(u+=(u?"
":"")+e.text),void 0!==e.extraText&&(u+=(u?"
":"")+e.extraText),o&&""===u&&!e.hovertemplate&&(""===c&&o.remove(),u=c),null!=(l=null==(s=e.trace)?void 0:s.hoverlabel)&&l.split&&(e.hovertemplate="");let{hovertemplate:d=!1}=e;if(d){let t=e.hovertemplateLabels||e;e[h+"Label"]!==a&&(t[h+"other"]=t[h+"Val"],t[h+"otherLabel"]=t[h+"Label"]),u=(u=i.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:t,locale:n._d3locale,template:d})).replace(z,(t,r)=>(c=N(r,e.nameLength),""))}return[u,c]}function R(e,t){var r=0,i=e.offset;return t&&(i*=-k,r=e.offset*M),{x:r,y:i}}function F(e,r,i,n){var a=function(e){return e*i},o=function(e){return e*n};e.each(function(e){var i=t.select(this);if(e.del)return i.remove();var n,s,c,h,d=i.select("text.nums"),f=e.anchor,p="end"===f?-1:1,m=(c=(s=(n=({start:1,end:-1,middle:0})[e.anchor])*(A+S))+n*(e.txwidth+S),"middle"===e.anchor&&(s-=e.tx2width/2,c+=e.txwidth/2+S),{alignShift:n,textShiftX:s,text2ShiftX:c}),g=R(e,r),y=g.x,v=g.y,x="middle"===f,b=!("hoverlabel"in e.trace)||e.trace.hoverlabel.showarrow;h=x?"M-"+a(e.bx/2+e.tx2width/2)+","+o(v-e.by/2)+"h"+a(e.bx)+"v"+o(e.by)+"h-"+a(e.bx)+"Z":b?"M0,0L"+a(p*A+y)+","+o(A+v)+"v"+o(e.by/2-A)+"h"+a(p*e.bx)+"v-"+o(e.by)+"H"+a(p*A+y)+"V"+o(v-A)+"Z":"M"+a(p*A+y)+","+o(v-e.by/2)+"h"+a(p*e.bx)+"v"+o(e.by)+"h"+a(-p*e.bx)+"Z",i.select("path").attr("d",h);var _=y+m.textShiftX,w=v+e.ty0-e.by/2+S,T=e.textAlign||"auto";"auto"!==T&&("left"===T&&"start"!==f?(d.attr("text-anchor","start"),_=x?-e.bx/2-e.tx2width/2+S:-e.bx-S):"right"===T&&"end"!==f&&(d.attr("text-anchor","end"),_=x?e.bx/2-e.tx2width/2-S:e.bx+S)),d.call(l.positionText,a(_),o(w)),e.tx2width&&(i.select("text.name").call(l.positionText,a(m.text2ShiftX+m.alignShift*S+y),o(v+e.ty0-e.by/2+S)),i.select("rect").call(u.setRect,a(m.text2ShiftX+(m.alignShift-1)*e.tx2width/2+y),o(v-e.by/2-1),a(e.tx2width),o(e.by+2)))})}function j(e,t,r){var i,n,a=r.container,o=r.fullLayout,s=o._size,l=r.event,c=!!t.hLinePoint,d=!!t.vLinePoint;if(a.selectAll(".spikeline").remove(),d||c){var p=h.combine(o.plot_bgcolor,o.paper_bgcolor);if(c){var m,g,y=t.hLinePoint;i=y&&y.xa,"cursor"===(n=y&&y.ya).spikesnap?(m=l.pointerX,g=l.pointerY):(m=i._offset+y.x,g=n._offset+y.y);var v,x,b=1.5>h.wcagContrast(y.color,p)?h.contrast(p):y.color,_=n.spikemode,w=n.spikethickness,T=n.spikecolor||b,M=f.getPxPosition(e,n);if(-1!==_.indexOf("toaxis")||-1!==_.indexOf("across")){if(-1!==_.indexOf("toaxis")&&(v=M,x=m),-1!==_.indexOf("across")){var k=n._counterDomainMin,A=n._counterDomainMax;"free"===n.anchor&&(k=Math.min(k,n.position),A=Math.max(A,n.position)),v=s.l+k*s.w,x=s.l+A*s.w}a.insert("line",":first-child").attr({x1:v,x2:x,y1:g,y2:g,"stroke-width":w,stroke:T,"stroke-dasharray":u.dashStyle(n.spikedash,w)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:v,x2:x,y1:g,y2:g,"stroke-width":w+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==_.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:M+("right"!==n.side?w:-w),cy:g,r:w,fill:T}).classed("spikeline",!0)}if(d){var S,E,C=t.vLinePoint;i=C&&C.xa,n=C&&C.ya,"cursor"===i.spikesnap?(S=l.pointerX,E=l.pointerY):(S=i._offset+C.x,E=n._offset+C.y);var L,P,I=1.5>h.wcagContrast(C.color,p)?h.contrast(p):C.color,z=i.spikemode,D=i.spikethickness,O=i.spikecolor||I,R=f.getPxPosition(e,i);if(-1!==z.indexOf("toaxis")||-1!==z.indexOf("across")){if(-1!==z.indexOf("toaxis")&&(L=R,P=E),-1!==z.indexOf("across")){var F=i._counterDomainMin,j=i._counterDomainMax;"free"===i.anchor&&(F=Math.min(F,i.position),j=Math.max(j,i.position)),L=s.t+(1-j)*s.h,P=s.t+(1-F)*s.h}a.insert("line",":first-child").attr({x1:S,x2:S,y1:L,y2:P,"stroke-width":D,stroke:O,"stroke-dasharray":u.dashStyle(i.spikedash,D)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:S,x2:S,y1:L,y2:P,"stroke-width":D+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==z.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:S,cy:R-("top"!==i.side?D:-D),r:D,fill:O}).classed("spikeline",!0)}}}function B(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function N(e,t){return l.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function U(e,t,r){var i=t[e+"a"],n=t[e+"Val"],a=t.cd[0];if("category"===i.type||"multicategory"===i.type)n=i._categoriesMap[n];else if("date"===i.type){var o=t.trace[e+"periodalignment"];if(o){var s=t.cd[t.index],l=s[e+"Start"];void 0===l&&(l=s[e]);var c=s[e+"End"];void 0===c&&(c=s[e]);var u=c-l;"end"===o?n+=u:"middle"===o&&(n+=u/2)}n=i.d2c(n)}return a&&a.t&&a.t.posLetter===i._id&&("group"===r.boxmode||"group"===r.violinmode)&&(n+=a.t.dPos),n}var V=e=>e.offsetTop+e.clientTop,q=e=>e.offsetLeft+e.clientLeft;function H(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),a=n.left,o=n.top,s=a+n.width,l=o+n.height,c=i.apply3DTransform(r._invTransform)(a,o),u=i.apply3DTransform(r._invTransform)(s,l),h=c[0],d=c[1],f=u[0],p=u[1];return{x:h,y:d,width:f-h,height:p-d,top:Math.min(d,p),left:Math.min(h,f),right:Math.max(h,f),bottom:Math.max(d,p)}}}}),rS=p({"src/components/fx/hoverlabel_defaults.js"(e,t){var r=tv(),i=ee(),n=t6().isUnifiedHover;t.exports=function(e,t,a,o){o=o||{};var s=t.legend;function l(e){o.font[e]||(o.font[e]=s?t.legend.font[e]:t.font[e])}t&&n(t.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(o.bgcolor||(o.bgcolor=i.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),a("hoverlabel.bgcolor",o.bgcolor),a("hoverlabel.bordercolor",o.bordercolor),a("hoverlabel.namelength",o.namelength),a("hoverlabel.showarrow",o.showarrow),r.coerceFont(a,"hoverlabel.font",o.font),a("hoverlabel.align",o.align)}}}),rE=p({"src/components/fx/layout_global_defaults.js"(e,t){var r=tv(),i=rS(),n=W();t.exports=function(e,t){i(e,t,function(i,a){return r.coerce(e,t,n,i,a)})}}}),rC=p({"src/components/fx/defaults.js"(e,t){var r=tv(),i=Y(),n=rS();t.exports=function(e,t,a,o){var s=r.extendFlat({},o.hoverlabel);t.hovertemplate&&(s.namelength=-1),n(e,t,function(n,a){return r.coerce(e,t,i,n,a)},s)}}}),rL=p({"src/components/fx/hovermode_defaults.js"(e,t){var r=tv(),i=W();t.exports=function(e,t){function n(n,a){return void 0!==t[n]?t[n]:r.coerce(e,t,i,n,a)}return n("clickmode"),n("hoversubplots"),n("hoveranywhere"),n("clickanywhere"),n("hovermode")}}}),rP=p({"src/components/fx/layout_defaults.js"(e,t){var r=tv(),i=W(),n=rL(),a=rS();t.exports=function(e,t){function o(n,a){return r.coerce(e,t,i,n,a)}var s=n(e,t);s&&(o("hoverdistance"),o("spikedistance"),-1!==s.indexOf("unified")&&o("hoversort")),"select"===o("dragmode")&&o("selectdirection");var l=t._has("map"),c=t._has("geo"),u=t._basePlotModules.length;"zoom"===t.dragmode&&((l||c)&&1===u||l&&c&&2===u)&&(t.dragmode="pan"),a(e,t,o),r.coerceFont(o,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),rI=p({"src/components/fx/calc.js"(e,t){var r=tv(),i=eQ();function n(e,t,i,n){n=n||r.identity,Array.isArray(e)&&(t[0][i]=n(e))}t.exports=function(e){for(var t=e.calcdata,a=e._fullLayout,o=0;o plotly-logomark "}}}}),rj=p({"src/components/shapes/draw_newshape/constants.js"(e,t){t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),rB=p({"src/components/selections/helpers.js"(e,t){var r=tv().strTranslate;function i(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}t.exports={p2r:i,r2p:function(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}},axValue:function(e){var t=+("y"===e._id.charAt(0));return function(r){return i(e,r[t])}},getTransform:function(e){return r(e.xaxis._offset,e.yaxis._offset)}}}}),rN=p({"src/components/shapes/draw_newshape/helpers.js"(e){var t=t8(),r=rj(),i=r.CIRCLE_SIDES,n=r.SQRT2,a=rB(),o=a.p2r,s=a.r2p,l=[0,3,4,5,6,1,2],c=[0,3,4,1,2];function u(e,t){return 1e-6>=Math.abs(e-t)}function h(e,t){var r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+i*i)}e.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",i=0;i0&&ue+ +(void 0!==a[t.charAt(0)].drawn),0)},e.getDataToPixel=function(t,r,i,a,o){var s,l=t._fullLayout._size;if(r)if("domain"===o)s=function(e){return r._length*(a?1-e:e)+r._offset};else{var c=e.shapePositionToRange(r);s=function(e){var t=n(r,i);return r._offset+r.r2p(c(e,!0))+t},"date"===r.type&&(s=e.decodeDate(s))}else s=a?function(e){return l.t+l.h*(1-e)}:function(e){return l.l+l.w*e};return s},e.getPixelToData=function(t,r,i,n){var a,o=t._fullLayout._size;if(r)if("domain"===n)a=function(e){var t=(e-r._offset)/r._length;return i?1-t:t};else{var s=e.rangeToShapePosition(r);a=function(e){return s(r.p2r(e-r._offset))}}else a=i?function(e){return 1-(e-o.t)/o.h}:function(e){return(e-o.l)/o.w};return a},e.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(e);return 1===Math.round(t%2)?r+.5:r},e.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},i=e._fullLayout._plots[r.xref+r.yref];return i?i._hadPlotinfo=!0:(i={},r.xref&&"paper"!==r.xref&&(i.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&"paper"!==r.yref&&(i.yaxis=e._fullLayout[r.yref+"axis"])),i.xsizemode=r.xsizemode,i.ysizemode=r.ysizemode,i.xanchor=r.xanchor,i.yanchor=r.yanchor,{options:r,plotinfo:i}},e.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},i=e._fullLayout._plots[r.xref+r.yref];return i?i._hadPlotinfo=!0:(i={},r.xref&&(i.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(i.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:i}},e.getPathString=function(a,o){let s=o.type,l=i.getRefType(o.xref),c=i.getRefType(o.yref),u=a._fullLayout._size;function h(t,r,i,n){var a;if(t)if("domain"===r)a=n?function(e){return t._offset+t._length*(1-e)}:function(e){return t._offset+t._length*e};else{let r=e.shapePositionToRange(t);a=function(e){return t._offset+t.r2p(r(e,!0))},"path"===i&&"date"===t.type&&(a=e.decodeDate(a))}else a=n?function(e){return u.t+u.h*(1-e)}:function(e){return u.l+u.w*e};return a}if("array"===l?(T=[],y=o.xref.map(function(e){return i.getFromId(a,e)}),T=o.xref.map(function(e,t){return h(y[t],i.getRefType(e),s,!1)})):T=h(y=i.getFromId(a,o.xref),l,s,!1),"array"===c?(M=[],v=o.yref.map(function(e){return i.getFromId(a,e)}),M=o.yref.map(function(e,t){return h(v[t],i.getRefType(e),s,!0)})):M=h(v=i.getFromId(a,o.yref),c,s,!0),"path"===s){var d,f,p,m,g;let e,i,n,a,s,l,c;return d=o,f=T,p=M,e=d.path,i=d.xsizemode,n=d.ysizemode,a=d.xanchor,s=d.yanchor,l=Array.isArray(d.xref),c=Array.isArray(d.yref),m=0,g=0,e.replace(t.segmentRE,function(e){var o=0,u=e.charAt(0),h=t.paramIsX[u],d=t.paramIsY[u],y=t.numParams[u];let v=void 0!==h.drawn,x=void 0!==d.drawn,b=l?f[m]:f,_=c?p[g]:p;var w=e.slice(1).replace(t.paramRE,function(e){return h[o]?e="pixel"===i?b(a)+Number(e):b(e):d[o]&&(e="pixel"===n?_(s)-Number(e):_(e)),++o>y&&(e="X"),e});return o>y&&(w=w.replace(/[\s,]*X.*/,""),r.log("Ignoring extra params in segment "+e)),v&&m++,x&&g++,u+w})}if("array"===l)x=n(y[0],o.x0shift),b=n(y[1],o.x1shift),k=T[0](o.x0)+x,A=T[1](o.x1)+b;else if(x=n(y,o.x0shift),b=n(y,o.x1shift),"pixel"===o.xsizemode){let e=T(o.xanchor);k=e+o.x0+x,A=e+o.x1+b}else k=T(o.x0)+x,A=T(o.x1)+b;if("array"===c)_=n(v[0],o.y0shift),w=n(v[1],o.y1shift),S=M[0](o.y0)+_,E=M[1](o.y1)+w;else if(_=n(v,o.y0shift),w=n(v,o.y1shift),"pixel"===o.ysizemode){let e=M(o.yanchor);S=e-o.y0+_,E=e-o.y1+w}else S=M(o.y0)+_,E=M(o.y1)+w;if("line"===s)return"M"+k+","+S+"L"+A+","+E;if("rect"===s)return"M"+k+","+S+"H"+A+"V"+E+"H"+k+"Z";var y,v,x,b,_,w,T,M,k,A,S,E,C=(k+A)/2,L=(S+E)/2,P=Math.abs(C-k),I=Math.abs(L-S),z="A"+P+","+I,D=C+P+","+L;return"M"+D+z+" 0 1,1 "+C+","+(L-I)+z+" 0 0,1 "+D+"Z"},e.getPixelShift=n}}),rG=p({"src/components/shapes/display_labels.js"(e,t){var r=tv(),i=rn(),n=tF(),a=t7(),o=rN().readPaths,s=rH(),l=s.getPathString,c=eY(),u=tR().FROM_TL;t.exports=function(e,t,h,d){if(d.selectAll(".shape-label").remove(),h.label.text||h.label.texttemplate){if(h.label.texttemplate){var f={};if("path"!==h.type){var p=i.getFromId(e,h.xref),m=i.getFromId(e,h.yref);let t=Array.isArray(h.xref),r=Array.isArray(h.yref);for(var g in c){var y="function"==typeof c[g],v=!t||c.simpleXVariables.includes(g),x=!r||c.simpleYVariables.includes(g);if(y&&v&&x){var b=c[g](h,p,m);void 0!==b&&(f[g]=b)}}}_=r.texttemplateStringForShapes({data:[f],fallback:h.label.texttemplatefallback,locale:e._fullLayout._d3locale,template:h.label.texttemplate})}else _=h.label.text;var _,w,T,M,k,A=h.label.font,S=d.append("g").attr({"data-index":t}).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(_);if(h.path){var E=o(l(e,h),e);w=1/0,M=1/0,T=-1/0,k=-1/0;for(var C=0;Cs.getDataToPixel(e,i,r,!1,n)(t),m=(t,r,i,n)=>s.getDataToPixel(e,i,r,!0,n)(t);if("pixel"===h.xsizemode){let e=p(h.xanchor,void 0,n,c),t=s.getPixelShift(n,h.x0shift),r=s.getPixelShift(n,h.x1shift);w=e+h.x0+t,T=e+h.x1+r}else w=p(h.x0,h.x0shift,n,c),T=p(h.x1,h.x1shift,a,u);if("pixel"===h.ysizemode){let e=m(h.yanchor,void 0,o,d),t=s.getPixelShift(o,h.y0shift),r=s.getPixelShift(o,h.y1shift);M=e-h.y0+t,k=e-h.y1+r}else M=m(h.y0,h.y0shift,o,d),k=m(h.y1,h.y1shift,l,f)}var O=h.label.textangle;"auto"===O&&(O="line"===h.type?function(e,t,r,i){var n;return n=Math.abs(r-e),-180/Math.PI*Math.atan2(r>=e?t-i:i-t,n)}(w,M,T,k):0),S.call(function(t){return t.call(a.font,A).attr({}),n.convertToTspans(t,e),t});var R=function(e,t,r,i,n,a,o){var s,l,c,h,d=n.label.textposition,f=n.label.textangle,p=n.label.padding,m=n.type,g=Math.PI/180*a,y=Math.sin(g),v=Math.cos(g),x=n.label.xanchor,b=n.label.yanchor;if("line"===m){"start"===d?(s=e,l=t):"end"===d?(s=r,l=i):(s=(e+r)/2,l=(t+i)/2),"auto"===x&&(x="start"===d?"auto"===f?r>e?"left":re?"right":re?"right":re?"left":r1&&(2!==e.length||"Z"!==e[1][0])&&(0===S&&(e[0][0]="M"),t[A]=e,L(),P())}}()}}function U(e,r){(function(e,r){if(t.length)for(var i=0;iS?(L=T,D="y0",P=S,O="y1"):(L=S,D="y1",P=T,O="y0"),eo(r),ec(c,o),i=t,n=o,s=e,l=n.xref,u=n.yref,d=a.getFromId(s,l),f=a.getFromId(s,u),p="","paper"===l||d.autorange||(p+=l),"paper"===u||f.autorange||(p+=u),h.setClipUrl(i,p?"clip"+s._fullLayout._uid+p:null,s),ea.moveFn="move"===B?es:el,ea.altKey=r.altKey)},doneFn:function(){b(e)||(m(t),eu(c),M(t,e,o),i.call("_guiRelayout",e,u.getUpdateObj()))},clickFn:function(){b(e)||eu(c)}};function eo(r){if(b(e)){B=null;return}if(V)B="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var i=ea.element.getBoundingClientRect(),n=i.right-i.left,a=i.bottom-i.top,o=r.clientX-i.left,s=r.clientY-i.top,l=!q&&n>10&&a>10&&!r.shiftKey?f.getCursor(o/n,1-s/a):"move";m(t,l),B=l.split("-")[0]}}function es(r,i){if("path"===o.type){var n=function(e){return e},a=n,u=n;N?H("xanchor",o.xanchor=er(E+r)):(a=function(e){return er(ee(e)+r)},W&&"date"===W.type&&(a=y.encodeDate(a))),U?H("yanchor",o.yanchor=ei(C+i)):(u=function(e){return ei(et(e)+i)},Z&&"date"===Z.type&&(u=y.encodeDate(u))),H("path",o.path=k(j,a,u))}else N?H("xanchor",o.xanchor=er(E+r)):(H("x0",o.x0=er(w+r)),H("x1",o.x1=er(A+r))),U?H("yanchor",o.yanchor=ei(C+i)):(H("y0",o.y0=ei(T+i)),H("y1",o.y1=ei(S+i)));t.attr("d",v(e,o)),ec(c,o),l(e,s,o,G)}function el(r,i){if(q){var n=function(e){return e},a=n,u=n;N?H("xanchor",o.xanchor=er(E+r)):(a=function(e){return er(ee(e)+r)},W&&"date"===W.type&&(a=y.encodeDate(a))),U?H("yanchor",o.yanchor=ei(C+i)):(u=function(e){return ei(et(e)+i)},Z&&"date"===Z.type&&(u=y.encodeDate(u))),H("path",o.path=k(j,a,u))}else if(V){if("resize-over-start-point"===B){var h=w+r,d=U?T-i:T+i;H("x0",o.x0=N?h:er(h)),H("y0",o.y0=U?d:ei(d))}else if("resize-over-end-point"===B){var f=A+r,p=U?S-i:S+i;H("x1",o.x1=N?f:er(f)),H("y1",o.y1=U?p:ei(p))}}else{var m=function(e){return -1!==B.indexOf(e)},g=m("n"),x=m("s"),b=m("w"),_=m("e"),M=g?L+i:L,Y=x?P+i:P,$=b?I+r:I,X=_?z+r:z;U&&(g&&(M=L-i),x&&(Y=P-i)),(!U&&Y-M>10||U&&M-Y>10)&&(H(D,o[D]=U?M:ei(M)),H(O,o[O]=U?Y:ei(Y))),X-$>10&&(H(R,o[R]=N?$:er($)),H(F,o[F]=N?X:er(X)))}t.attr("d",v(e,o)),ec(c,o),l(e,s,o,G)}function ec(e,t){(N||U)&&function(){var r="path"!==t.type,i=e.selectAll(".visual-cue").data([0]);i.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var a=ee(N?t.xanchor:n.midRange(r?[t.x0,t.x1]:y.extractPathCoords(t.path,g.paramIsX))),o=et(U?t.yanchor:n.midRange(r?[t.y0,t.y1]:y.extractPathCoords(t.path,g.paramIsY)));if(a=y.roundPositionForSharpStrokeRendering(a,1),o=y.roundPositionForSharpStrokeRendering(o,1),N&&U){var s="M"+(a-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";i.attr("d",s)}else if(N){var l="M"+(a-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";i.attr("d",l)}else{var c="M"+(a-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";i.attr("d",c)}}()}function eu(e){e.selectAll(".visual-cue").remove()}f.init(ea),en.node().onmousemove=eo}(e,j,w,t,c,S):!0===w.editable&&j.style("pointer-events",O||u.opacity(P)*L<=.5?"stroke":"all");j.node().addEventListener("click",function(){var t=e,r=j;if(_(t)){var i=+r.node().getAttribute("data-index");if(i>=0){if(i===t._fullLayout._activeShapeIndex)return void A(t);t._fullLayout._activeShapeIndex=i,t._fullLayout._deactivateShape=A,x(t)}}}),function(e,t,r){if(!r?.id)return;let i=t.node();function n(e){var t;let i=r.mainplotinfo||r,n=null==(t=i?.draglayer)?void 0:t.select(".nsewdrag").node();return n?{clientX:e.clientX,clientY:e.clientY,target:n}:null}i.addEventListener("mousemove",t=>{if(!e._dragging&&e._fullLayout.hoveranywhere){let i=n(t);i&&p.hover(e,i,r.id)}}),i.addEventListener("click",t=>{if(!e._dragged&&e._fullLayout.clickanywhere){let i=n(t);i&&p.click(e,i,r.id)}})}(e,j,T)}("above"===w.layer?e._fullLayout._shapeUpperLayer:w.xref.includes("paper")||w.yref.includes("paper")?e._fullLayout._shapeLowerLayer:"between"!==w.layer||S?T._hadPlotinfo?(T.mainplotinfo||T).shapelayer:e._fullLayout._shapeLowerLayer:T.shapelayerBetween)}function M(e,t,r){let i=r.xref,o=r.yref;if(Array.isArray(i)||Array.isArray(o)){let s="clip"+t._fullLayout._uid+"shape"+r._index,l=function(e,t,r){let i=e._fullLayout._size;function n(t,r){let n=(Array.isArray(t)?t:[t]).map(t=>a.getFromId(e,t)).filter(Boolean);return n.length?[Math.min(...n.map(function(e){return e._offset})),Math.max(...n.map(function(e){return e._offset+e._length}))]:r?[i.t,i.t+i.h]:[i.l,i.l+i.w]}let o=n(t,!1),s=n(r,!0);return{x:o[0],y:s[0],width:o[1]-o[0],height:s[1]-s[0]}}(t,i,o);n.ensureSingleById(t._fullLayout._clips,"clipPath",s,function(e){e.append("rect")}).select("rect").attr(l),h.setClipUrl(e,s,t)}else{let r=(i+o).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");h.setClipUrl(e,r?"clip"+t._fullLayout._uid+r:null,t)}}function k(e,t,r){return e.replace(g.segmentRE,function(e){var i=0,n=e.charAt(0),a=g.paramIsX[n],o=g.paramIsY[n],s=g.numParams[n];return n+e.slice(1).replace(g.paramRE,function(e){return i>=s||(a[i]?e=t(e):o[i]&&(e=r(e)),i++),e})})}function A(e){_(e)&&e._fullLayout._activeShapeIndex>=0&&(c(e),delete e._fullLayout._activeShapeIndex,x(e))}t.exports={draw:x,drawOne:w,eraseActiveShape:function(e){if(_(e)){c(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{let o=r.select(e._fullLayout._paperdiv.node());o.selectAll(".plotly-cloud-dialog").remove();let s=o.append("div").classed("plotly-cloud-dialog",!0),l=()=>{s.remove(),document.removeEventListener("keydown",c)},c=e=>{("Escape"===e.key||27===e.keyCode)&&l()};document.addEventListener("keydown",c),s.on("click",()=>{r.event.target===s.node()&&l()}),((e,t,r,a,o)=>{let s=n(e),l=t.append("div").classed("plotly-cloud-dialog-box",!0);if(l.append("div").classed("plotly-cloud-dialog-title",!0).text(s.DIALOG_TITLE),r===i.plotlyServerURL){let e=l.append("div").classed("plotly-cloud-dialog-message",!0),t=new URL(r).origin,i=s.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),n=i[0],a=i[2],o=i[4];e.append("span").text(n),e.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",t).attr("target","_blank").text(a),e.append("span").text(o),e.append("div").classed("plotly-cloud-dialog-message--account",!0).text(s.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let e=new URL(r),t=e.hostname,i=e.origin,n=s.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),a=n[0],o=n[4],c=l.append("div").classed("plotly-cloud-dialog-message",!0);c.append("span").text(a),c.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",i).attr("target","_blank").text(t),c.append("span").text(o)}let c=l.append("div").classed("plotly-cloud-dialog-buttons",!0);c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(s.DIALOG_CANCEL).on("click",o),c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(s.DIALOG_CONFIRM).on("click",a)})(e,s,t,()=>{l(),a()},l)}}}),rX=p({"src/components/modebar/buttons.js"(e,t){var r=eQ(),i=tD(),n=tC(),a=rF(),o=rY().eraseActiveShape,s=r$(),l=tv(),c=l._,u=t.exports={};function h(e,t){var i,a,o=t.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,c=e._fullLayout,u={},h=n.list(e,null,!0),d=c._cartesianSpikesEnabled;if("zoom"===s){var f,p="in"===l?.5:2,m=(1+p)/2,g=(1-p)/2;for(a=0;a-e),[h,d]=a.invert(l.midPt),{minscale:f}=n.projection,p=null!=(i=n.projection.maxscale)?i:1/0,m=Math.min(f,p),g=Math.max(f,p),y="in"===o?2*s:.5*s;y>g?y=g:yr0});var rQ,r0,r1=f({"src/components/modebar/attributes.ts"(){rQ=y(rK()),r0={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`."},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 *${rQ.default.backButtons.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 *${rQ.default.foreButtons.join("*, *")}*.`}}}}),r2=p({"src/components/modebar/defaults.js"(e,t){var r=tv(),i=ee(),n=tS(),a=(r1(),v(rJ)).default;t.exports=function(e,t){var o=e.modebar||{},s=n.newContainer(t,"modebar");function l(e,t){return r.coerce(o,s,a,e,t)}l("orientation"),l("bgcolor",i.addOpacity(t.paper_bgcolor,.5));var c=i.contrast(i.rgb(t.modebar.bgcolor));l("color",i.addOpacity(c,.3)),l("activecolor",i.addOpacity(c,.7)),l("uirevision",t.uirevision),l("add"),l("remove")}}}),r3=p({"src/components/modebar/modebar.js"(e,t){var r=T(),i=C(),n=tv(),a=rF(),o=_().version,s=new DOMParser;function l(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var c=l.prototype;c.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,i=this.graphInfo._fullLayout,a="modebar-"+i._uid;this.element.setAttribute("id",a),this.element.setAttribute("role","toolbar"),this._uid=a,this.element.className="modebar modebar--custom","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===i.modebar.orientation&&(this.element.className+=" vertical",t=t.reverse());var o=i.modebar;document.querySelectorAll("#"+a+" .modebar-group").forEach(function(e){e.style.backgroundColor=o.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,c=this.locale!==r.locale;if(this.locale=r.locale,(s||l||c)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var u=this.getLogo();r.watermark&&(u.className=u.className+" watermark"),"v"===i.modebar.orientation?this.element.insertBefore(u,this.element.childNodes[0]):this.element.appendChild(u),this.hasLogo=!0}this.updateActiveButton(),n.setStyleOnHover("#"+a+" .modebar-btn",".active",".icon path","fill: "+o.activecolor,"fill: "+o.color,this.element)},c.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(e){var r=t.createGroup();e.forEach(function(e){var i=e.name;if(!i)throw Error("must provide button 'name' in button config");if(-1!==t.buttonsNames.indexOf(i))throw Error("button name '"+i+"' is taken");t.buttonsNames.push(i);var n=t.createButton(e);t.buttonElements.push(n),r.appendChild(n)}),t.element.appendChild(r)})},c.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e},c.createButton=function(e){var t=this,i=document.createElement("button");i.setAttribute("type","button"),i.setAttribute("rel","tooltip"),i.className="modebar-btn";var n=e.title;void 0===n?n=e.name:"function"==typeof n&&(n=n(this.graphInfo)),(n||0===n)&&(i.setAttribute("data-title",n),i.setAttribute("aria-label",n)),void 0!==e.attr&&i.setAttribute("data-attr",e.attr);var o=e.val;if(void 0!==o&&("function"==typeof o&&(o=o(this.graphInfo)),i.setAttribute("data-val",o)),"function"!=typeof e.click)throw Error("must provide button 'click' function in button config");i.addEventListener("click",function(r){e.click(t.graphInfo,r),t.updateActiveButton(r.currentTarget)}),i.setAttribute("data-toggle",e.toggle||!1),e.toggle&&r.select(i).classed("active",!0);var s=e.icon;return"function"==typeof s?i.appendChild(s()):i.appendChild(this.createIcon(s||a.question)),i.setAttribute("data-gravity",e.gravity||"n"),i},c.createIcon=function(e){var t,r=i(e.height)?Number(e.height):e.ascent-e.descent,n="http://www.w3.org/2000/svg";if(e.path){(t=document.createElementNS(n,"svg")).setAttribute("viewBox",["0 0",e.width,r].join(" ")),t.setAttribute("class","icon");var a=document.createElementNS(n,"path");a.setAttribute("d",e.path),e.transform?a.setAttribute("transform",e.transform):void 0!==e.ascent&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),t.appendChild(a)}return e.svg&&(t=s.parseFromString(e.svg,"application/xml").childNodes[0]),t.setAttribute("height","1em"),t.setAttribute("width","1em"),t},c.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,i=void 0!==e?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(e){var a=e.getAttribute("data-val")||!0,o=e.getAttribute("data-attr"),s="true"===e.getAttribute("data-toggle"),l=r.select(e),c=function(e,r){var i=t.modebar,n=e.querySelector(".icon path");n&&(r||e.matches(":hover")?n.style.fill=i.activecolor:n.style.fill=i.color)};if(s){if(o===i){var u=!l.classed("active");l.classed("active",u),c(e,u)}}else{var h=null===o?o:n.nestedProperty(t,o).get();l.classed("active",h===a),c(e,h===a)}})},c.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r1?(P=["toggleHover"],I=["resetViews"]):y?(L=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],I=["resetGeo"]):g?(P=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):_?(L=["zoomInMap","zoomOutMap"],P=["toggleHover"],I=["resetViewMap"]):v?P=["hoverClosestPie"]:M?(P=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):P=["toggleHover"],m&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(function(e){for(var t=0;ti?n.slice(i):a.slice(r))+o:n+a+e*t:o}function f(e,t){var r=e._inputDomain,i=l[e.constraintoward],n=r[0]+(r[1]-r[0])*i;e.domain=e._input.domain=[n+(r[0]-n)/t,n+(r[1]-n)/t],e.setScale()}e.handleDefaults=function(e,r,a){var s,l,d,f,p,m,g,y,v=a.axIds,x=a.axHasImage,b=r._axisConstraintGroups=[],_=r._axisMatchGroups=[];for(s=0;ss*v&&!w)){for(n=0;nI&&RL&&(L=R);d/=(L-C)/(2*P),C=c.l2r(C),L=c.l2r(L),c.range=c._input.range=A=e[1]||n[1]<=e[0])&&a[0]t[0])return!0}return!1}(V,q,N)&&-1===S.indexOf(v)){var G=H.node(),W=E.bg=n.ensureSingle(H,"rect","bg");G.insertBefore(W.node(),G.childNodes[0]),B.push(S)}else H.select("rect.bg").remove(),N.push([V,q]),U||(j.push(S),B.push(S))}var Y=I._bgLayer.selectAll(".bg").data(j);for(Y.enter().append("rect").classed("bg",!0),Y.exit().remove(),Y.each(function(e){I._plots[e].bg=t.select(this)}),A=0;A.5?"t":"b",l=e._fullLayout.margin[s],c=0;return"paper"===t.yref?c=r+t.pad.t+t.pad.b:"container"===t.yref&&(i=e._fullLayout.height,n=0,"middle"===o&&(n+=r/2),"t"===s?("top"===o&&(n+=r),n+=i-a*i):("bottom"===o&&(n+=r),n+=a*i),c=n+t.pad.t+t.pad.b),c>l?c:0}(e,T,P);if(I>0){(function(e,t,r,a){var o,s,l="title.automargin",c=e._fullLayout.title,u=c.y>.5?"t":"b",h={x:c.x,y:c.y,t:0,b:0},d={};"paper"===c.yref&&(o="paper"===c.yref?e._fullLayout._size.h:e._fullLayout.height,s=n.isTopAnchor(c)?t:t-a,!(n.isTopAnchor(c)&&"t"===u||n.isBottomAnchor(c)&&"b"===u)&&("b"===u?o-s:s)=0;T--){var M=n.append("path").attr(m).style("opacity",T?.1:g).call(a.stroke,v).call(a.fill,y).call(o.dashLine,T?"solid":b,T?4+x:x);if(function(e,t,r){var i=r.xref+r.yref;o.setClipUrl(e,"clip"+t._fullLayout._uid+i,t)}(M,e,d),_){var k=s(e.layout,"selections",d);M.style({cursor:"move"});var A={element:M.node(),plotinfo:p,gd:e,editHelpers:k,isActiveSelection:!0};i(r(l,e),M,A)}else M.style("pointer-events",T?"all":"none");w[T]=M}var S=w[0];w[1].node().addEventListener("click",function(){var t=e,r=S;if(h(t)){var i=+r.node().getAttribute("data-index");if(i>=0){if(i===t._fullLayout._activeSelectionIndex)return void f(t);t._fullLayout._activeSelectionIndex=i,t._fullLayout._deactivateSelection=f,u(t)}}})}(e._fullLayout._selectionLayer)}function f(e){h(e)&&e._fullLayout._activeSelectionIndex>=0&&(n(e),delete e._fullLayout._activeSelectionIndex,u(e))}t.exports={draw:u,drawOne:d,activateLastSelection:function(e){if(h(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=f,u(e)}}}}}),ie=p({"node_modules/polybooljs/lib/build-log.js"(e,t){t.exports=function(){var e,t=0,r=!1;function i(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return i("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return i("div_seg",{seg:e,pt:t}),i("chop",{seg:e,pt:t})},statusRemove:function(e){return i("pop_seg",{seg:e})},segmentUpdate:function(e){return i("seg_update",{seg:e})},segmentNew:function(e,t){return i("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return i("rem_seg",{seg:e})},tempStatus:function(e,t,r){return i("temp_status",{seg:e,above:t,below:r})},rewind:function(e){return i("rewind",{seg:e})},status:function(e,t,r){return i("status",{seg:e,above:t,below:r})},vert:function(t){return t===r?e:(r=t,i("vert",{x:t}))},log:function(e){return"string"!=typeof e&&(e=JSON.stringify(e,!1," ")),i("log",{txt:e})},reset:function(){return i("reset")},selected:function(e){return i("selected",{segs:e})},chainStart:function(e){return i("chain_start",{seg:e})},chainRemoveHead:function(e,t){return i("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return i("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return i("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return i("chain_match",{index:e})},chainClose:function(e){return i("chain_close",{index:e})},chainAddHead:function(e,t){return i("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return i("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return i("chain_con",{index1:e,index2:t})},chainReverse:function(e){return i("chain_rev",{index:e})},chainJoin:function(e,t){return i("chain_join",{index1:e,index2:t})},done:function(){return i("done")}}}}}),it=p({"node_modules/polybooljs/lib/epsilon.js"(e,t){t.exports=function(e){"number"!=typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"==typeof t&&(e=t),e},pointAboveOrOnLine:function(t,r,i){var n=r[0],a=r[1],o=i[0],s=i[1],l=t[0];return(o-n)*(t[1]-a)-(s-a)*(l-n)>=-e},pointBetween:function(t,r,i){var n=t[1]-r[1],a=i[0]-r[0],o=t[0]-r[0],s=i[1]-r[1],l=o*a+n*s;return!(l-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])e!=o-n>e&&(a-c)*(n-u)/(o-u)+c-i>e&&(s=!s),a=c,o=u}return s}};return t}}}),ir=p({"node_modules/polybooljs/lib/linked-list.js"(e,t){t.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return null!==t&&t!==e.root},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var i=e.root,n=e.root.next;null!==n;){if(r(n)){t.prev=n.prev,t.next=n,n.prev.next=t,n.prev=t;return}i=n,n=n.next}i.next=t,t.prev=i,t.next=null},findTransition:function(t){for(var r=e.root,i=e.root.next;null!==i&&!t(i);)r=i,i=i.next;return{before:r===e.root?null:r,after:i,insert:function(e){return e.prev=r,e.next=i,r.next=e,null!==i&&(i.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}}}),ii=p({"node_modules/polybooljs/lib/intersecter.js"(e,t){var r=ir();t.exports=function(e,t,i){function n(e,t,r){return{id:i?i.segmentId():-1,start:e,end:t,myFill:{above:r.myFill.above,below:r.myFill.below},otherFill:null}}var a=r.create();function o(e,r){a.insertBefore(e,function(i){var n,a,o,s,l,c;return n=e.isStart,a=e.pt,o=i.isStart,s=i.pt,l=i.other.pt,(0!==(c=t.pointsCompare(a,s))?c:t.pointsSame(r,l)?0:n!==o?n?1:-1:t.pointAboveOrOnLine(r,o?s:l,o?l:s)?1:-1)<0})}function s(e,t){var i,n,a=(o(i=r.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null}),e.end),i);return n=r.node({isStart:!1,pt:e.end,seg:e,primary:t,other:a,status:null}),a.other=n,o(n,a.pt),a}function l(e,t){var r=n(t,e.seg.end,e.seg);return i&&i.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,o(e.other,e.pt),s(r,e.primary)}function c(n,o){var s=r.create();function c(e,r){var n=e.seg,a=r.seg,o=n.start,s=n.end,c=a.start,u=a.end;i&&i.checkIntersection(n,a);var h=t.linesIntersect(o,s,c,u);if(!1===h){if(!t.pointsCollinear(o,s,c)||t.pointsSame(o,u)||t.pointsSame(s,c))return!1;var d=t.pointsSame(o,c),f=t.pointsSame(s,u);if(d&&f)return r;var p=!d&&t.pointBetween(o,c,u),m=!f&&t.pointBetween(s,c,u);if(d)return m?l(r,s):l(e,u),r;p&&(f||(m?l(r,s):l(e,u)),l(r,o))}else 0===h.alongA&&(-1===h.alongB?l(e,c):0===h.alongB?l(e,h.pt):1===h.alongB&&l(e,u)),0===h.alongB&&(-1===h.alongA?l(r,o):0===h.alongA?l(r,h.pt):1===h.alongA&&l(r,s));return!1}for(var u=[];!a.isEmpty();){var h=a.getHead();if(i&&i.vert(h.pt[0]),h.isStart){i&&i.segmentNew(h.seg,h.primary);var d,f,p=function(e){return s.findTransition(function(r){var i,n,a,o,s;return i=r.ev,n=e.seg.start,a=e.seg.end,o=i.seg.start,s=i.seg.end,(t.pointsCollinear(n,o,s)?t.pointsCollinear(a,o,s)||t.pointAboveOrOnLine(a,o,s)?1:-1:t.pointAboveOrOnLine(n,o,s)?1:-1)>0})}(h),m=p.before?p.before.ev:null,g=p.after?p.after.ev:null;i&&i.tempStatus(h.seg,!!m&&m.seg,!!g&&g.seg);var y=function(){if(m){var e=c(h,m);if(e)return e}return!!g&&c(h,g)}();if(y&&(e?(d=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above):y.seg.otherFill=h.seg.myFill,i&&i.segmentUpdate(y.seg),h.other.remove(),h.remove()),a.getHead()!==h){i&&i.rewind(h.seg);continue}e?(d=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,g?h.seg.myFill.below=g.seg.myFill.above:h.seg.myFill.below=n,d?h.seg.myFill.above=!h.seg.myFill.below:h.seg.myFill.above=h.seg.myFill.below):null===h.seg.otherFill&&(f=g?h.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:h.primary?o:n,h.seg.otherFill={above:f,below:f}),i&&i.status(h.seg,!!m&&m.seg,!!g&&g.seg),h.other.status=p.insert(r.node({ev:h}))}else{var v=h.status;if(null===v)throw Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(v.prev)&&s.exists(v.next)&&c(v.prev.ev,v.next.ev),i&&i.statusRemove(v.ev.seg),v.remove(),!h.primary){var x=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=x}u.push(h.seg)}a.getHead().remove()}return i&&i.done(),u}return e?{addRegion:function(e){for(var r,n=e[e.length-1],a=0;aa!=f>a&&n<(d-u)*(a-h)/(f-h)+u&&(o=!o)}return o}}}),iu=p({"src/lib/polygon.js"(e,t){var r=eN().dot,i=L().BADNUM,n=t.exports={};n.tester=function(e){var t,r=e.slice(),n=r[0][0],a=n,o=r[0][1],s=o;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),t=1;ta||c===i||cs||t&&l(e))}:function(e,t){var l=e[0],c=e[1];if(l===i||la||c===i||cs)return!1;var u,h,d,f,p,m=r.length,g=r[0][0],y=r[0][1],v=0;for(u=1;uMath.max(h,g)||c>Math.max(d,y)))if(cu||Math.abs(r(o,d))>n)return!0;return!1},n.filter=function(e,t){var r=[e[0]],i=0,a=0;function o(o){e.push(o);var s=r.length,l=i;r.splice(a+1);for(var c=l+1;c1&&o(e.pop()),{addPt:o,raw:e,filtered:r}}}}),ih=p({"src/components/selections/constants.js"(e,t){t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),id=p({"src/components/selections/select.js"(e,t){var r=il(),i=ic(),n=eQ(),a=t7().dashStyle,o=ee(),s=rD(),l=t6().makeEventData,c=rO(),u=c.freeMode,h=c.rectMode,d=c.drawMode,f=c.openMode,p=c.selectMode,m=rH(),g=rq(),y=rW(),v=tL().clearOutline,x=rN(),b=x.handleEllipse,_=x.readPaths,w=rU().newShapes,T=rV(),M=r7().activateLastSelection,k=tv(),A=k.sorterAsc,S=iu(),E=tt(),C=tC().getFromId,L=rR(),P=r9().redrawReglTraces,I=ih(),z=I.MINSELECT,D=S.filter,O=S.tester,R=rB(),F=R.p2r,j=R.axValue,B=R.getTransform;function N(e){return void 0!==e.subplot}function U(e,t,r,i,n,a,o){var s,l,c,u,h,d,p,m,g,v=t._hoverdata,x=t._fullLayout.clickmode.indexOf("event")>-1,b=[];if((_=v)&&Array.isArray(_)&&!0!==_[0].hoverOnBox){H(e,t,a);var _,w,T=function(e,t){var r,i,n=e[0],a=-1,o=[];for(i=0;i0?function(e,t){var r,i,n,a=[];for(n=0;n0&&a.push(r);if(1===a.length&&a[0]===t.searchInfo&&(i=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(n=0;ni.selectedpoints.indexOf(t.pointNumbers[n]))return!1;return!0}return!1}(s,T):function(e){var t,r,i=0;for(r=0;r1||(i+=t.selectedpoints.length)>1))return!1;return 1===i}(s)&&(d=$(T))){for(o&&o.remove(),g=0;g=0&&a._fullLayout._deactivateShape(a),a._fullLayout._activeSelectionIndex>=0&&a._fullLayout._deactivateSelection(a);var o=a._fullLayout._zoomlayer,s=d(r),l=p(r);if(s||l){var c,u,h=o.selectAll(".select-outline-"+i.id);h&&a._fullLayout._outlining&&(s&&(c=w(h,e)),c&&n.call("_guiRelayout",a,{shapes:c}),l&&!N(e)&&(u=T(h,e)),u&&(a._fullLayout._noEmitSelectedAtStart=!0,n.call("_guiRelayout",a,{selections:u}).then(function(){t&&M(a)})),a._fullLayout._outlining=!1)}i.selection={},i.selection.selectionDefs=e.selectionDefs=[],i.selection.mergedPolygons=e.mergedPolygons=[]}function W(e){return e._id}function Y(e,t,r,i){if(!e.calcdata)return[];var n,a,o,s=[],l=t.map(W),c=r.map(W);for(o=0;o0?i[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(n)>-1}function X(e,t,r){var i,a;for(i=0;i-1&&t;if(!a&&t){var ep=en(e,!0);if(ep.length){var em=ep[0].xref,eg=ep[0].yref;if(em&&eg){var ey=es(ep);el([C(e,em,"x"),C(e,eg,"y")])(ed,ey)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ef&&ec(e,ed),f._reselect=!1}if(!a&&f._deselect){var ev=f._deselect;(function(e,t,r){for(var i=0;i=0)return void S._fullLayout._deactivateShape(S);if(!_){var r=C.clickmode;E.done(eE).then(function(){if(E.clear(eE),2===e){for(ew.remove(),ea=0;ea-1&&U(t,S,i.xaxes,i.yaxes,i.subplot,i,ew),"event"===r&&ec(S,void 0);s.click(S,t,F.id)}).catch(k.error)}},i.doneFn=function(){eA.remove(),E.done(eE).then(function(){E.clear(eE),!L&&en&&i.selectionDefs&&(en.subtract=e_,i.selectionDefs.push(en),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,ee)),(L||_)&&G(i,L),i.doneFnCompleted&&i.doneFnCompleted(eC),w&&ec(S,eh)}).catch(k.error)}},clearOutline:v,clearSelectionsCache:G,selectOnClick:U}}}),ip=p({"src/components/annotations/arrow_paths.js"(e,t){t.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]}}),im=p({"src/constants/axis_placeable_objects.js"(e,t){t.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by *domain* (separated by a space), the position behaves like for *paper*, but refers to the distance in fractions of the domain length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e,"axis and a",e,"position of 0.5 refers to the point between the",t,"and the",r,"of the domain of the second",e,"axis."].join(" ")}}}}),ig=p({"src/components/annotations/attributes.js"(e,t){var r=ip(),i=H(),n=tE(),a=tS().templatedArray;im(),t.exports=a("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:r.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:r.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",n.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",n.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:i({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})}}),iy=p({"src/traces/scatter/constants.js"(e,t){t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}}),iv=p({"src/traces/scatter/fillcolor_attribute.js"(e,t){t.exports=function(e){return{valType:"color",editType:"style",anim:!0}}}}),ix=p({"src/traces/scatter/attributes.js"(e,t){var r=tB().axisHoverFormat,{hovertemplateAttrs:i,texttemplateAttrs:n,templatefallbackAttrs:a}=eW(),o=tV(),s=H(),l=eH().dash,c=eH().pattern,u=t7(),h=iy(),d=q().extendFlat,f=iv();function p(e){return{valType:"any",dflt:0,editType:"calc"}}function m(e){return{valType:"any",editType:"calc"}}function g(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:p("x"),yperiod:p("y"),xperiod0:m("x0"),yperiod0:m("y0"),xperiodalignment:g("x"),yperiodalignment:g("y"),xhoverformat:r("x"),yhoverformat:r("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:n(),texttemplatefallback:a({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:i({},{keys:h.eventDataKeys}),hovertemplatefallback:a(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:d({},l,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:f(!0),fillgradient:d({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:c,marker:d({symbol:{valType:"enumerated",values:u.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:d({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:d({},l,{arrayOk:!0}),editType:"calc"},o("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},o("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:s({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}}),ib=p({"src/components/selections/attributes.js"(e,t){var r=ig(),i=ix().line,n=eH().dash,a=q().extendFlat,o=eq().overrideAll,s=tS().templatedArray;im(),t.exports=o(s("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:a({},r.xref,{}),yref:a({},r.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:i.color,width:a({},i.width,{min:1,dflt:1}),dash:a({},n,{dflt:"dot"})}}),"arraydraw","from-root")}}),i_=p({"src/components/selections/defaults.js"(e,t){var r=tv(),i=rn(),n=t$(),a=ib(),o=rH();function s(e,t,n){function s(i,n){return r.coerce(e,t,a,i,n)}var l=s("path"),c="path"!==s("type",l?"path":"rect");c&&delete t.path,s("opacity"),s("line.color"),s("line.width"),s("line.dash");for(var u=["x","y"],h=0;h<2;h++){var d,f,p,m=u[h],g={_fullLayout:n},y=i.coerceRef(e,t,g,m);if((d=i.getFromId(g,y))._selectionIndices.push(t._index),p=o.rangeToShapePosition(d),f=o.shapePositionToRange(d),c){var v=m+"0",x=m+"1",b=e[v],_=e[x];e[v]=f(e[v],!0),e[x]=f(e[x],!0),i.coercePosition(t,g,s,y,v),i.coercePosition(t,g,s,y,x);var w=t[v],T=t[x];void 0!==w&&void 0!==T&&(t[v]=p(w),t[x]=p(T),e[v]=b,e[x]=_)}}c&&r.noneOrAll(e,t,["x0","x1","y0","y1"])}t.exports=function(e,t){n(e,t,{name:"selections",handleItemDefaults:s});for(var r=t.selections,i=0;i.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",s(r,i)).attr("d",n+"Z")}function j(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("transform",s(t,r)).attr("d","M0,0Z")}function B(e,t,r,i,n,a){e.attr("d",i+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),N(e,t,n,a)}function N(e,t,r,i){r||(e.transition().style("fill",i>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function U(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function V(e){P&&e.data&&e._context.showTips&&(i.notifier(i._(e,"Double-click to zoom back out"),"long",e),P=!1)}function q(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,L)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function H(e,t,r,n,a){for(var o,s,l,c,u=!1,h={},d={},f=(a||{}).xaHash,p=(a||{}).yaHash,m=0;m=0)return void s._fullLayout._deactivateShape(s);var c=s._fullLayout.clickmode;if(U(s),2!==i||eC||function(){if(!e._transitioningWithDuration){var t=e._context.doubleClick,r=[];eg&&(r=r.concat(el)),ey&&(r=r.concat(ec)),em.xaxes&&(r=r.concat(em.xaxes)),em.yaxes&&(r=r.concat(em.yaxes));var i,n,a={};if("reset+autosize"===t)for(t="autosize",n=0;n-1&&A(a,s,el,ec,t.id,eI),c.indexOf("event")>-1&&h.click(s,a,t.id);else if(1===i&&eC){var u,d,f,p,m=T?ea:en,g=+("s"!==T&&"w"!==P),y=m._name+".range["+g+"]",v=(u=m,d=g,p=Math.abs((f=u.range[d])-u.range[1-d]),"date"===u.type?f:"log"===u.type?n("."+(Math.ceil(Math.max(0,-Math.log(p)/Math.LN10))+3)+"g")(Math.pow(10,f)):n("."+String(Math.floor(Math.log(Math.abs(f))/Math.LN10)-Math.floor(Math.log(p)/Math.LN10)+4)+"g")(f)),x="left",b="middle";if(m.fixedrange)return;T?(b="n"===T?"top":"bottom","right"===m.side&&(x="right")):"e"===P&&(x="right"),s._context.showAxisRangeEntryBoxes&&r.select(eP).call(l.makeEditable,{gd:s,immediate:!0,background:s._fullLayout.paper_bgcolor,text:String(v),fill:m.tickfont?m.tickfont.color:"#444",horizontalAlign:x,verticalAlign:b}).on("edit",function(e){var t=m.d2r(e);void 0!==t&&o.call("_guiRelayout",s,y,t)})}}function eO(t,r){if(e._transitioningWithDuration)return!1;var i,n,a,o,s=Math.max(0,Math.min(ed,ek*t+Z)),l=Math.max(0,Math.min(ef,eA*r+$)),c=Math.abs(s-Z),u=Math.abs(l-$);function h(){ee="",X.r=X.l,X.t=X.b,er.attr("d","M0,0Z")}if(X.l=Math.min(Z,s),X.r=Math.max(Z,s),X.t=Math.min($,l),X.b=Math.max($,l),ep.isSubplotConstrained)c>L||u>L?(ee="xy",c/ed>u/ef?(u=c*ef/ed,$>l?X.t=$-u:X.b=$+u):(c=u*ed/ef,Z>s?X.l=Z-c:X.r=Z+c),er.attr("d",q(X))):h();else if(em.isSubplotConstrained)if(c>L||u>L){ee="xy";var d=Math.min(X.l/ed,(ef-X.b)/ef),f=Math.max(X.r/ed,(ef-X.t)/ef);X.l=d*ed,X.r=f*ed,X.b=(1-d)*ef,X.t=(1-f)*ef,er.attr("d",q(X))}else h();else{!ey||u0){if(em.isSubplotConstrained||!eg&&1===ey.length){for(a=0;a=0?Math.min(l,.9):1/(1/Math.max(l,-.3)+3.222)));var l,c=s.l2r(n);!1!==c&&void 0!==c&&(s.range[t]=c)}}return i._length*(i._rl[t]-n)/(i._rl[t]-i._rl[a])}}function eq(e,t){for(var r=em.isSubplotConstrained?({x:ec,y:el})[e]:em[e+"axes"],i=em.isSubplotConstrained?({x:el,y:ec})[e]:[],n=0;n1&&(void 0!==a.maxallowed&&ex===(a.range[0]1&&(void 0!==s.maxallowed&&eb===(s.range[0]1&&i.warn("Full array edits are incompatible with other edits",d);var x=l[""][""];if(s(x))t.set(null);else{if(!Array.isArray(x))return i.warn("Unrecognized full array edit value",d,x),!0;t.set(x)}return!g&&(f(y,v),p(e),!0)}var b,_,w,T,M,k,A,S,E=Object.keys(l).map(Number).sort(n),C=t.get(),L=C||[],P=u(v,d).get(),I=[],z=-1,D=L.length;for(b=0;bL.length-!A){i.warn("index out of range",d,w);continue}if(void 0!==k)M.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",d,w),s(k)?I.push(w):A?("add"===k&&(k={}),L.splice(w,0,k),P&&P.splice(w,0,{})):i.warn("Unrecognized full object edit value",d,w,k),-1===z&&(z=w);else for(_=0;_=0;b--)L.splice(I[b],1),P&&P.splice(I[b],1);if(L.length?C||t.set(L):t.set(null),g)return!1;if(f(y,v),m!==r){if(-1===z)h=E;else{for(D=Math.max(L.length,D),h=[],b=0;b=z);b++)h.push(w);for(b=z;b0&&i.log("Clearing previous rejected promises from queue."),e._promises=[]},e.cleanLayout=function(t){t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var r,a=(n.subplotsRegistry.cartesian||{}).attrRegex,s=((n.subplotsRegistry.polar||{}).attrRegex,(n.subplotsRegistry.ternary||{}).attrRegex,(n.subplotsRegistry.gl3d||{}).attrRegex,Object.keys(t));for(r=0;r3?(v.x=1.02,v.xanchor="left"):v.x<-2&&(v.x=-.02,v.xanchor="right"),v.y>3?(v.y=1.02,v.yanchor="bottom"):v.y<-2&&(v.y=-.02,v.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t},e.cleanData=function(t){for(var a=0;a0)return e.slice(0,t)}e.hasParent=function(e,t){for(var r=m(t);r;){if(r in e)return!0;r=m(r)}return!1},e.clearAxisTypes=function(e,t,r){for(var n=0;n{let r=(...e)=>e.every(e=>i.isPlainObject(e))||e.every(e=>Array.isArray(e));if([e,t].every(e=>Array.isArray(e))){if(e.length!==t.length)return!1;for(let i=0;ii.isPlainObject(e))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let i in e){if(i.startsWith("_"))continue;let n=e[i],a=t[i];if(n!==a&&!(r(n,a)&&g(n,a)))return!1}return!0}return!1};e.collectionsAreEqual=g}}),iL=p({"src/plot_api/plot_api.js"(e){var t=T(),r=C(),i=t_(),n=tv(),a=n.nestedProperty,o=tT(),s=tM(),l=eQ(),c=tA(),u=tD(),h=rn(),d=ro(),f=tN(),p=t7(),m=ee(),g=iA().initInteractions,y=tO(),v=iM().clearOutline,x=X().dfltConfig,b=iE(),_=iC(),w=r9(),M=eq(),k=tE().AX_NAME_PATTERN,A=0;function S(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function E(e,t){try{e._fullLayout._paper.style("background",t)}catch(e){n.error(e)}}function L(e,t){E(e,m.combine(t,"white"))}function P(e,r){if(!e._context){e._context=n.extendDeep({},x);var a=t.select("base");e._context._baseUrl=a.size()&&a.attr("href")?window.location.href.split("#")[0]:""}var o,s,l,c=e._context;if(r){for(s=Object.keys(r),o=0;o=e.data.length||n<-e.data.length)throw Error(r+" must be valid indices for gd.data.");if(t.indexOf(n,i+1)>-1||n>=0&&t.indexOf(-e.data.length+n)>-1||n<0&&t.indexOf(e.data.length+n)>-1)throw Error("each index in "+r+" must be unique.")}}function D(e,t,r){if(!Array.isArray(e.data))throw Error("gd.data must be an array.");if(typeof t>"u")throw Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),z(e,t,"currentIndices"),"u">typeof r&&!Array.isArray(r)&&(r=[r]),"u">typeof r&&z(e,r,"newIndices"),"u">typeof r&&t.length!==r.length)throw Error("current and new indices must be of equal length.")}function O(e,t,i,o,s){var l=n.isPlainObject(o);if(!Array.isArray(e.data))throw Error("gd.data must be an array");if(!n.isPlainObject(t))throw Error("update must be a key:value object");if(typeof i>"u")throw Error("indices must be an integer or array of integers");for(var c in z(e,i,"indices"),t){if(!Array.isArray(t[c])||t[c].length!==i.length)throw Error("attribute "+c+" must be an array of length equal to indices array length");if(l&&(!(c in o)||!Array.isArray(o[c])||o[c].length!==t[c].length))throw 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")}for(var u=function(e,t,i,o){var s,l,c,u,h=n.isPlainObject(o),d=[];for(var f in Array.isArray(i)||(i=[i]),i=I(i,e.data.length-1),t)for(var p=0;p0&&"string"!=typeof z.parts[R];)R--;var F=z.parts[R],N=z.parts[R-1]+"."+F,U=z.parts.slice(0,R).join("."),V=a(e.layout,U).get(),q=a(u,U).get(),H=z.get();if(void 0!==D){A[I]=D,S[I]="reverse"===F?D:j(H);var Z=c.getLayoutValObject(u,z.parts);if(Z&&Z.impliedEdits&&null!==D)for(var X in Z.impliedEdits)E(n.relativeAttr(I,X),Z.impliedEdits[X]);if(-1!==["width","height"].indexOf(I))if(D){E("autosize",null);var K="height"===I?"width":"height";E(K,u[K])}else u[I]=e._initialAutoSize[I];else if("autosize"===I)E("width",D?null:u.width),E("height",D?null:u.height);else if(N.match(G))P(N),a(u,U+"._inputRange").set(null);else if(N.match(W)){P(N),a(u,U+"._inputRange").set(null);var J=a(u,U).get();J._inputDomain&&(J._input.domain=J._inputDomain.slice())}else N.match(Y)&&a(u,U+"._inputDomain").set(null);if("type"===F){C=V;var Q="linear"===q.type&&"log"===D,ee="log"===q.type&&"linear"===D;if(Q||ee){if(C&&C.range)if(q.autorange)Q&&(C.range=C.range[1]>C.range[0]?[1,2]:[2,1]);else{var et=C.range[0],er=C.range[1];Q?(et<=0&&er<=0&&E(U+".autorange",!0),et<=0?et=er/1e6:er<=0&&(er=et/1e6),E(U+".range[0]",Math.log(et)/Math.LN10),E(U+".range[1]",Math.log(er)/Math.LN10)):(E(U+".range[0]",Math.pow(10,et)),E(U+".range[1]",Math.pow(10,er)))}else E(U+".autorange",!0);Array.isArray(u._subplots.polar)&&u._subplots.polar.length&&u[z.parts[0]]&&"radialaxis"===z.parts[1]&&delete u[z.parts[0]]._subplot.viewInitial["radialaxis.range"],l.getComponentMethod("annotations","convertCoords")(e,q,D,E),l.getComponentMethod("images","convertCoords")(e,q,D,E)}else E(U+".autorange",!0),E(U+".range",null);a(u,U+"._inputRange").set(null)}else if(F.match(k)){var ei=a(u,I).get(),en=(D||{}).type;en&&"-"!==en||(en="linear"),l.getComponentMethod("annotations","convertCoords")(e,ei,en,E),l.getComponentMethod("images","convertCoords")(e,ei,en,E)}var ea=b.containerArrayMatch(I);if(ea){r=ea.array,i=ea.index;var eo=ea.property,es=Z||{editType:"calc"};""!==i&&""===eo&&(b.isAddVal(D)?S[I]=null:b.isRemoveVal(D)?S[I]=(a(s,r).get()||[])[i]:n.warn("unrecognized full object value",t)),M.update(T,es),y[r]||(y[r]={});var el=y[r][i];el||(el=y[r][i]={}),el[eo]=D,delete t[I]}else"reverse"===F?(V.range?V.range.reverse():(E(U+".autorange",!0),V.range=[1,0]),q.autorange?T.calc=!0:T.plot=!0):("dragmode"===I&&(!1===D&&!1!==H||!1!==D&&!1===H)||u._has("scatter-like")&&u._has("regl")&&"dragmode"===I&&("lasso"===D||"select"===D)&&"lasso"!==H&&"select"!==H?T.plot=!0:Z?M.update(T,Z):T.calc=!0,z.set(D))}}for(r in y)b.applyContainerArrayChanges(e,f(s,r),y[r],T,f)||(T.plot=!0);for(var ec in L){var eu=(C=h.getFromId(e,ec))&&C._constraintGroup;if(eu)for(var eh in T.calc=!0,eu)L[eh]||(h.getFromId(e,eh)._constraintShrinkable=!0)}($(e)||t.height||t.width)&&(T.plot=!0);var ed=u.shapes;for(i=0;i1;)if(i.pop(),void 0!==(r=a(t,i.join(".")+".uirevision").get()))return r;return t.uirevision}function en(e,t){var r=n.isPlainObject(e),i=Array.isArray(e);return r||i?(r&&n.isPlainObject(t)||i&&Array.isArray(t))&&JSON.stringify(e)===JSON.stringify(t):e===t}function ea(e,t,r,i){var a,o,s,l=i.getValObject,c=i.flags,u=i.immutable,h=i.inArray,d=i.arrayIndex;function f(){var e=a.editType;h&&-1!==e.indexOf("arraydraw")?n.pushUnique(c.arrays[h],d):(M.update(c,a),"none"!==e&&c.nChanges++,i.transition&&a.anim&&c.nChangesAnim++,(G.test(s)||W.test(s))&&(c.rangesAltered[r[0]]=1),"datarevision"===o&&(c.newDataRevision=1))}function p(e){return"data_array"===e.valType||e.arrayOk}for(o in e){if(c.calc&&!i.transition)return;var m=e[o],g=t[o],y=r.concat(o);if(s=y.join("."),"_"!==o.charAt(0)&&"function"!=typeof m&&m!==g){if(("tick0"===o||"dtick"===o)&&"geo"!==r[0]){var v=t.tickmode;if("auto"===v||"array"===v||!v)continue}if(!("range"===o&&t.autorange)&&("zmin"!==o&&"zmax"!==o||"contourcarpet"!==t.type)&&(a=l(y))&&!(a._compareAsJSON&&JSON.stringify(m)===JSON.stringify(g))){var x,b=a.valType,_=p(a),w=Array.isArray(m),T=Array.isArray(g);if(w&&T){var k="_input_"+o,A=e[k],S=t[k];if(Array.isArray(A)&&A===S)continue}if(void 0===g)_&&w?c.calc=!0:f();else if(a._isLinkedToArray){var E=[],C=!1;h||(c.arrays[o]=E);var L=Math.min(m.length,g.length),P=Math.max(m.length,g.length);if(L!==P)if("arraydraw"===a.editType)C=!0;else{f();continue}for(x=0;x=a.length?e.transitionOpts=a[c]:e.transitionOpts=a[0]:e.transitionOpts=a,c++,e}var d,f,p=[],m=null==t,g=Array.isArray(t);if(!m&&!g&&n.isPlainObject(t))p.push({type:"object",data:h(n.extendFlat({},t))});else if(m||-1!==["string","number"].indexOf(typeof t))for(d=0;d0&&xx)&&b.push(f);p=b}}p.length>0?function(t){if(0!==t.length){for(var n,c=0;c=o.length?o[0]:o[h]:o),m=(d=c,Array.isArray(a)?d>=a.length?a[0]:a[d]:a);m.duration=Math.min(m.duration,p.duration);var g={frame:f,name:t[c].name,frameOpts:p,transitionOpts:m};c===t.length-1&&(g.onComplete=function(e){var t=0;return function(){if(e&&2==++t)return e()}}(s),g.onInterrupt=l),i._frameQueue.push(g)}"immediate"===r.mode&&(i._lastFrameAt=-1/0),i._animationRaf||(e.emit("plotly_animating"),i._lastFrameAt=-1/0,i._timeToNext=0,i._runningTransitions=0,i._currentFrame=null,(n=function(){i._animationRaf=window.requestAnimationFrame(n),Date.now()-i._lastFrameAt>i._timeToNext&&function(){i._currentFrame&&i._currentFrame.onComplete&&i._currentFrame.onComplete();var t=i._currentFrame=i._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,i._lastFrameAt=Date.now(),i._timeToNext=t.frameOpts.duration,u.transition(e,t.frame.data,t.frame.layout,_.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then(function(){t.onComplete&&t.onComplete()}),e.emit("plotly_animatingframe",{name:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(i._animationRaf),i._animationRaf=null}()})())}}(p):(e.emit("plotly_animated"),s())})},e.addFrames=function(e,t,r){if(e=n.getGraphDiv(e),null==t)return Promise.resolve();if(!n.isPlotDiv(e))throw Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var i,a,o,l,c=e._transitionData._frames,h=e._transitionData._frameHash;if(!Array.isArray(t))throw Error("addFrames failure: frameList must be an Array of frame definitions"+t);var d=c.length+2*t.length,f=[],p={};for(i=t.length-1;i>=0;i--)if(n.isPlainObject(t[i])){var m=t[i].name,g=(h[m]||p[m]||{}).name,y=t[i].name,v=h[g]||p[g];g&&y&&"number"==typeof y&&v&&A<5&&(A++,n.warn('addFrames: overwriting frame "'+(h[g]||p[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===A&&n.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),p[m]={name:m},f.push({frame:u.supplyFrameDefaults(t[i]),index:r&&void 0!==r[i]&&null!==r[i]?r[i]:d+i})}f.sort(function(e,t){return e.index>t.index?-1:+(e.index=0;i--){if("number"==typeof(a=f[i].frame).name&&n.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;h[a.name="frame "+e._transitionData._counter++];);if(h[a.name]){for(o=0;o=0;r--)i=t[r],o.push({type:"delete",index:i}),l.unshift({type:"insert",index:i,value:a[i]});var c=u.modifyFrames,h=u.modifyFrames,d=[e,l],f=[e,o];return s&&s.add(e,c,d,h,f),u.modifyFrames(e,o)},e.addTraces=function t(r,i,a){r=n.getGraphDiv(r);var o,l,c=[],u=e.deleteTraces,h=[r,c],d=[r,i];for(function(e,t,r){var i,n;if(!Array.isArray(e.data))throw Error("gd.data must be an array.");if(typeof t>"u")throw Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),i=0;itypeof r&&!Array.isArray(r)&&(r=[r]),"u">typeof r&&r.length!==t.length)throw Error("if indices is specified, traces.length must equal indices.length")}(r,i,a),Array.isArray(i)||(i=[i]),i=i.map(function(e){return n.extendFlat({},e)}),_.cleanData(i),o=0;o"u")return l=e.redraw(r),s.add(r,u,h,t,d),l;Array.isArray(a)||(a=[a]);try{D(r,c,a)}catch(e){throw r.data.splice(r.data.length-i.length,i.length),e}return s.startSequence(r),s.add(r,u,h,t,d),l=e.moveTraces(r,c,a),s.stopSequence(r),l},e.deleteTraces=function t(r,i){r=n.getGraphDiv(r);var a,o,l=[],c=e.addTraces,u=[r,l,i],h=[r,i];if(typeof i>"u")throw Error("indices must be an integer or array of integers.");for(Array.isArray(i)||(i=[i]),z(r,i,"indices"),(i=I(i,r.data.length-1)).sort(n.sorterDes),a=0;a=0&&r"u")for(a=[],o=0;o=0&&r[e,t._ev.listeners(e)]);h=e.newPlot(t,r,i,o).then(()=>{for(let[e,r]of n)r.forEach(r=>t.on(e,r));return e.react(t,r,i,o)})}else{t.data=r||[],_.cleanData(t.data),t.layout=i||{},_.cleanLayout(t.layout),function(e,t,r,i){var o,s,l,c,u,h,d,f,p,m,g=i._preGUI,y=[],v={},x={};for(o in g){if(u=er(o,Q)){if(p=u.head,m=u.tail,(c=(l=a(i,s=u.attr||p+".uirevision").get())&&ei(s,t))&&c===l){if(null===(h=g[o])&&(h=void 0),en(f=(d=a(t,o)).get(),h)){void 0===f&&"autorange"===m&&y.push(p),d.set(j(a(i,o).get()));continue}else if("autorange"===m||"range["===m.slice(0,6)){var b=g[p+".range[0]"],_=g[p+".range[1]"],w=g[p+".autorange"];if(w||null===w&&null===b&&null===_){if(!(p in v)){var T=a(t,p).get();v[p]=T&&(T.autorange||!1!==T.autorange&&(!T.range||2!==T.range.length))}if(v[p]){d.set(j(a(i,o).get()));continue}}}}}else n.warn("unrecognized GUI edit: "+o);delete g[o],u&&"range["===u.tail.slice(0,6)&&(x[u.head]=1)}for(var M=0;M(m||t.emit("plotly_react",{config:o,data:r,layout:i}),t))},e.redraw=function(t){if(t=n.getGraphDiv(t),!n.isPlotDiv(t))throw Error("This element is not a Plotly plot: "+t);return _.cleanData(t.data),_.cleanLayout(t.layout),t.calcdata=void 0,e._doPlot(t).then(function(){return t.emit("plotly_redraw"),t})},e.relayout=V,e.restyle=F,e.setPlotConfig=function(e){return n.extendFlat(x,e)},e.update=K,e._guiRelayout=J(V),e._guiRestyle=J(F),e._guiUpdate=J(K),e._storeDirectGUIEdit=function(e,t,r){for(var i in r){var n=a(e,i);N(i,n.get(),r[i],t)}}}}),iP=p({"src/snapshot/helpers.js"(e){var t=eQ();e.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("map"))?500:0},e.getRedrawFunc=function(e){return function(){t.getComponentMethod("colorbar","draw")(e)}},e.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)},e.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var r=window.URL||window.webkitURL;e.createObjectURL=function(e){return r.createObjectURL(e)},e.revokeObjectURL=function(e){return r.revokeObjectURL(e)},e.createBlob=function(e,t){if("svg"===t)return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if("full-json"===t)return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=function(e){for(var t=e.length,r=new ArrayBuffer(t),i=new Uint8Array(r),n=0;n{let t=e.toLowerCase();return l.includes(t)?e:c.includes(t)?"<":u.includes(t)?">":e.includes("<")||e.includes(">")?"":d.html(e).text()}),d.remove(),A=(A=(A=f).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(s,"'")}}}),iz=p({"src/snapshot/svgtoimg.js"(e,t){var r=tv(),i=tw().EventEmitter,n=iP();t.exports=function(e){var t=e.emitter||new i,a=new Promise(function(i,a){var o,s,l=window.Image,c=e.svg,u=e.format||"png",h=e.canvas,d=e.scale||1,f=e.width||300,p=e.height||150,m=d*f,g=d*p,y=h.getContext("2d",{willReadFrequently:!0}),v=new l;"svg"===u||r.isSafari()?s=n.encodeSVG(c):(o=n.createBlob(c,"svg"),s=n.createObjectURL(o)),h.width=m,h.height=g,v.onload=function(){var r;switch(o=null,n.revokeObjectURL(s),"svg"!==u&&y.drawImage(v,0,0,m,g),u){case"jpeg":r=h.toDataURL("image/jpeg");break;case"png":r=h.toDataURL("image/png");break;case"webp":r=h.toDataURL("image/webp");break;case"svg":r=s;break;default:var l="Image format is not jpeg, png, svg or webp.";if(a(Error(l)),!e.promise)return t.emit("error",l)}i(r),e.promise||t.emit("success",r)},v.onerror=function(r){if(o=null,n.revokeObjectURL(s),a(r),!e.promise)return t.emit("error",r)},v.src=s});return e.promise?a:t}}}),iD=p({"src/plot_api/to_image.js"(e,t){var r=C(),i=iL(),n=tD(),a=tv(),o=iP(),s=iI(),l=iz(),c=_().version,u={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};t.exports=function(e,t){function h(e){return!(e in t)||a.validate(t[e],u[e])}if(t=t||{},a.isPlainObject(e)?(d=e.data||[],f=e.layout||{},p=e.config||{},m={}):(e=a.getGraphDiv(e),d=a.extendDeep([],e.data),f=a.extendDeep({},e.layout),p=e._context,m=e._fullLayout||{}),!h("width")&&null!==t.width||!h("height")&&null!==t.height)throw Error("Height and width should be pixel values.");if(!h("format"))throw Error("Export format is not "+a.join2(u.format.values,", "," or ")+".");var d,f,p,m,g={};function y(e,r){return a.coerce(t,g,u,e,r)}var v=y("format"),x=y("width"),b=y("height"),_=y("scale"),w=y("setBackground"),T=y("imageDataOnly"),M=document.createElement("div");M.style.position="absolute",M.style.left="-5000px",document.body.appendChild(M);var k=a.extendFlat({},f);x?k.width=x:null===t.width&&r(m.width)&&(k.width=m.width),b?k.height=b:null===t.height&&r(m.height)&&(k.height=m.height);var A=a.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=o.getRedrawFunc(M);function E(){return new Promise(function(e){setTimeout(e,o.getDelay(M._fullLayout))})}function C(){return new Promise(function(e,t){var r=s(M,v,_),u=M._fullLayout.width,h=M._fullLayout.height;function d(){i.purge(M),document.body.removeChild(M)}if("full-json"===v){var f=n.graphJson(M,!1,"object",!0,!0);return f.version=c,f=JSON.stringify(f),d(),e(T?f:o.encodeJSON(f))}if(d(),"svg"===v)return e(T?r:o.encodeSVG(r));var p=document.createElement("canvas");p.id=a.randstr(),l({format:v,width:u,height:h,scale:_,canvas:p,svg:r,promise:!0}).then(e).catch(t)})}return new Promise(function(e,t){i.newPlot(M,d,k,A).then(S).then(E).then(C).then(function(t){e(T?t.replace(o.IMAGE_URL_PREFIX,""):t)}).catch(function(e){t(e)})})}}}),iO=p({"src/plot_api/validate.js"(e,t){var r=tv(),i=tD(),n=tA(),a=X().dfltConfig,o=r.isPlainObject,s=Array.isArray,l=r.isArrayOrTypedArray;function c(e,t,i,n,a,u){u=u||[];for(var h=Object.keys(e),f=0;fv.length&&n.push(d("unused",a,g.concat(v.length)));var M,k,A,S,E,C,L,P=v.length,I=Array.isArray(T);if(I&&(P=Math.min(P,T.length)),2===x.dimensions)for(S=0;Sv[S].length&&n.push(d("unused",a,g.concat(S,v[S].length)));var z=v[S].length;for(A=0;A<(I?Math.min(z,T[S].length):z);A++)E=I?T[S][A]:T,C=y[S][A],L=v[S][A],r.validate(C,E)?L!==C&&L!==+C&&n.push(d("dynamic",a,g.concat(S,A),C,L)):n.push(d("value",a,g.concat(S,A),C))}else n.push(d("array",a,g.concat(S),y[S]));else for(S=0;S1&&f.push(d("object","layout"))),i.supplyDefaults(p);for(var m=p._fullData,g=l.length,y=0;yw?h.push({code:"unused",traceType:y,templateCount:_,dataCount:w}):w>_&&h.push({code:"reused",traceType:y,templateCount:_,dataCount:w})}}else h.push({code:"data"});if(function e(t,i){for(var n in t)if("_"!==n.charAt(0)){var a=t[n],o=f(t,n,i);r(a)?(Array.isArray(t)&&!1===a._template&&a.templateitemname&&h.push({code:"missing",path:o,templateitemname:a.templateitemname}),e(a,o)):Array.isArray(a)&&function(e){for(var t=0;t=0;h--){var d=e[h];if("scatter"===d.type&&d.xaxis===c.xaxis&&d.yaxis===c.yaxis){d.opacity=void 0;break}}}}}}}),iK=p({"src/traces/scatter/layout_defaults.js"(e,t){var r=tv(),i=tP();t.exports=function(e,t){var n,a="group"===t.barmode;"group"===t.scattermode&&(n=a?t.bargap:.2,r.coerce(e,t,i,"scattergap",n))}}}),iJ=p({"src/plots/cartesian/align_period.js"(e,t){var r=C(),i=tv(),n=i.dateTime2ms,a=i.incrementMonth,o=L().ONEAVGMONTH;t.exports=function(e,t,i,s){if("date"!==t.type)return{vals:s};var l=e[i+"periodalignment"];if(!l)return{vals:s};var c,u=e[i+"period"];if(r(u)){if((u*=1)<=0)return{vals:s}}else if("string"==typeof u&&"M"===u.charAt(0)){var h=+u.substring(1);if(!(h>0)||Math.round(h)!==h)return{vals:s};c=h}for(var d=t.calendar,f="start"===l,p="end"===l,m=e[i+"period0"],g=n(m,d)||0,y=[],v=[],x=[],b=s.length,_=0;_k;)M=a(M,-c,d);for(;M<=k;)M=a(M,c,d);T=a(M,-c,d)}else{for(w=Math.round((k-g)/u),M=g+w*u;M>k;)M-=u;for(;M<=k;)M+=u;T=M-u}y[_]=f?T:p?M:(T+M)/2,v[_]=T,x[_]=M}return{vals:y,starts:v,ends:x}}}}),iQ=p({"src/traces/scatter/colorscale_calc.js"(e,t){var r=tj().hasColorscale,i=t2(),n=t5();t.exports=function(e,t){n.hasLines(t)&&r(t,"line")&&i(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),n.hasMarkers(t)&&(r(t,"marker")&&i(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),r(t,"marker.line")&&i(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),i0=p({"src/traces/scatter/arrays_to_calcdata.js"(e,t){var r=tv();t.exports=function(e,t){for(var i=0;ip&&L[y].gap;)y--;for(x=L[y].s,g=L.length-1;g>y;g--)L[g].s=x;for(;ph+c||!r(u))}for(var f=0;fn(e))):n(e.text);let a=e.outsidetextfont.size*u*r+c;return{ppadplus:t.some(e=>e.s<0)?a:0,ppadminus:t.some(e=>e.s>=0)?a:0}}return{ppadplus:void 0,ppadminus:void 0}}function b(e){return e._id.charAt(0)}t.exports={crossTraceCalc:function(e,t){for(var r=t.xaxis,i=t.yaxis,n=e._fullLayout,o=e._fullData,s=e.calcdata,l=[],c=[],u=0;uS[h]&&h0?o:s)/(C._m*I*(C._m>0?o:s)))),a*=1e3}if(l===n){if(P&&(l=C.c2p(i.y,!0)),l===n)return!1;l*=1e3}return[a,l]}function Y(e,t,r,i){var n=r-e,a=i-t,o=.5-e,s=.5-t,l=n*n+a*a,c=n*o+a*s;if(c>0&&ceo||e[1]el)return[u(e[0],ea,eo),u(e[1],es,el)]}function eh(e,t){if(e[0]===t[0]&&(e[0]===ea||e[0]===eo)||e[1]===t[1]&&(e[1]===es||e[1]===el))return!0}function ed(e,t,r){return function(i,n){var a,o=eu(i),s=eu(n),c=[];if(o&&s&&eh(o,s))return c;o&&c.push(o),s&&c.push(s);var u=2*l.constrain((i[e]+n[e])/2,t,r)-((o||i)[e]+(s||n)[e]);return u&&(a=o&&s?u>0==o[e]>s[e]?o:s:o||s,a[e]+=u),c}}function ef(e){var t=e[0],r=e[1],i=t===H[G-1][0],n=r===H[G-1][1];if(!(i&&n))if(G>1){var a=t===H[G-2][0],o=r===H[G-2][1];i&&(t===ea||t===eo)&&a?o?G--:H[G-1]=e:n&&(r===es||r===el)&&o?a?G--:H[G-1]=e:H[G++]=e}else H[G++]=e}function ep(e){H[G-1][0]!==e[0]&&H[G-1][1]!==e[1]&&ef([ee,et]),ef(e),er=null,ee=et=0}"linear"===j||"spline"===j?i=function(e,t){for(var r=[],i=0,n=0;n<4;n++){var a=ec[n],o=c(e[0],e[1],t[0],t[1],a[0],a[1],a[2],a[3]);o&&(!i||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],i&&$(o,e)<$(r[0],e)?r.unshift(o):r.push(o),i++)}return r}:"hv"===j||"vh"===j?i=function(e,t){var r=[],i=eu(e),n=eu(t);return i&&n&&eh(i,n)||(i&&r.push(i),n&&r.push(n)),r}:"hvh"===j?i=ed(0,ea,eo):"vhv"===j&&(i=ed(1,es,el));var em=l.isArrayOrTypedArray(O);function eg(t){if(t&&D&&(t.i=a,t.d=e,t.trace=S,t.marker=em?O[t.i]:O,t.backoff=D),X=t[0]/I,K=t[1]/z,J=t[0]eo?eo:0,Q=t[1]el?el:0,J||Q){if(G)if(er){var r,n,o,s=i(er,t);s.length>1&&(ep(s[0]),H[G++]=s[1])}else ei=i(H[G-1],t)[0],H[G++]=ei;else H[G++]=[J||t[0],Q||t[1]];var l=H[G-1];J&&Q&&(l[0]!==J||l[1]!==Q)?(er&&(ee!==J&&et!==Q?ef(ee&&et?(r=er,n=t[0]-r[0],o=(t[1]-r[1])/n,(r[1]*t[0]-t[1]*r[0])/n>0?[o>0?ea:eo,el]:[o>0?eo:ea,es]):[ee||J,et||Q]):ee&&et&&ef([ee,et])),ef([J,Q])):ee-J&&et-Q&&ef([J||ee,Q||et]),er=t,ee=J,et=Q}else er&&ep(i(er,t)[0]),H[G++]=t}for(a=0;aZ(g,ey))break;f=g,(T=x[0]*v[0]+x[1]*v[1])>_?(_=T,p=g,y=!1):T=e.length||!g)break;eg(g),d=g}}er&&ef([ee||er[0],et||er[1]]),U.push(H.slice(0,G))}var ev=j.slice(j.length-1);if(D&&"h"!==ev&&"v"!==ev){for(var ex=!1,eb=-1,e_=[],ew=0;ew=0?l=f:(l=f=d,d++),l=c[0]&&e.x<=c[1]&&e.y>=u[0]&&e.y<=u[1]}),p=Math.ceil(f.length/d),m=0;a.forEach(function(t,r){var i=t[0].trace;l.hasMarkers(i)&&i.marker.maxdisplayed>0&&r0;function x(e){return v?e.transition():e}var b=u.xaxis,_=u.yaxis,w=d[0].trace,T=w.line,M=r.select(p),k=a(M,"g","errorbars"),A=a(M,"g","lines"),S=a(M,"g","points"),E=a(M,"g","text");if(i.getComponentMethod("errorbars","plot")(e,k,u,m),!0===w.visible){x(M).style("opacity",w.opacity);var C,L,P=w.fill.charAt(w.fill.length-1);"x"!==P&&"y"!==P&&(P=""),"y"===P?(F=1,j=_.c2p(0,!0)):"x"===P&&(F=0,j=b.c2p(0,!0)),d[0][u.isRangePlot?"nodeRangePlot3":"node3"]=M;var I="",z=[],D=w._prevtrace,O=null,R=null;D&&(I=D._prevRevpath||"",L=D._nextFill,z=D._ownPolygons,O=D._fillsegments,R=D._fillElement);var F,j,B,N,U,V,q,H,G,W="",Y="",Z=[];w._polygons=[];var $=[],X=[],K=n.noop;if(C=w._ownFill,l.hasLines(w)||"none"!==w.fill){L&&L.datum(d),-1!==["hv","vh","hvh","vhv"].indexOf(T.shape)?(U=s.steps(T.shape),V=s.steps(T.shape.split("").reverse().join(""))):U=V="spline"===T.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?s.smoothclosed(e.slice(1),T.smoothing):s.smoothopen(e,T.smoothing)}:function(e){return"M"+e.join("L")},$=Array((X=c(d,{xaxis:b,yaxis:_,trace:w,connectGaps:w.connectgaps,baseTolerance:Math.max(T.width||1,3)/4,shape:T.shape,backoff:T.backoff,simplify:T.simplify,fill:w.fill})).length);var J=0;for(g=0;g0,x=u(e,t,i);((m=n.selectAll("g.trace").data(x,function(e){return e[0].trace.uid})).enter().append("g").attr("class",function(e){return"trace scatter trace"+e[0].trace.uid}).style("stroke-miterlimit",2),m.order(),h=e,f=m,p=t,f.each(function(e){var t=a(r.select(this),"g","fills");s.setClipUrl(t,p.layerClipId,h);var i=e[0].trace;i._ownFill=null,i._nextFill=null;var n=[];i._ownfill&&n.push("_ownFill"),i._nexttrace&&n.push("_nextFill");var l=t.selectAll("g").data(n,o);l.enter().append("g"),l.exit().remove(),l.order().each(function(e){i[e]=a(r.select(this),"path","js-fill")})}),v)?(c&&(g=c()),r.transition().duration(l.duration).ease(l.easing).each("end",function(){g&&g()}).each("interrupt",function(){g&&g()}).each(function(){n.selectAll("g.trace").each(function(r,i){d(e,i,t,r,x,this,l)})})):m.each(function(r,i){d(e,i,t,r,x,this,l)}),y&&m.exit().remove(),n.selectAll("path:not([d])").remove()}}}),ne=p({"src/traces/scatter/marker_colorbar.js"(e,t){t.exports={container:"marker",min:"cmin",max:"cmax"}}}),nt=p({"src/traces/scatter/format_labels.js"(e,t){var r=rn();t.exports=function(e,t,i){var n={},a={_fullLayout:i},o=r.getFromTrace(a,t,"x"),s=r.getFromTrace(a,t,"y"),l=e.orig_x;void 0===l&&(l=e.x);var c=e.orig_y;return void 0===c&&(c=e.y),n.xLabel=r.tickText(o,o.c2l(l),!0).text,n.yLabel=r.tickText(s,s.c2l(c),!0).text,n}}}),nr=p({"src/traces/scatter/style.js"(e,t){var r=T(),i=t7(),n=eQ();function a(e,t,r){i.pointStyle(e.selectAll("path.point"),t,r)}function o(e,t,r){i.textPointStyle(e.selectAll("text"),t,r)}t.exports={style:function(e){var t=r.select(e).selectAll("g.trace.scatter");t.style("opacity",function(e){return e[0].trace.opacity}),t.selectAll("g.points").each(function(t){a(r.select(this),t.trace||t[0].trace,e)}),t.selectAll("g.text").each(function(t){o(r.select(this),t.trace||t[0].trace,e)}),t.selectAll("g.trace path.js-line").call(i.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(i.fillGroupStyle,e,!1),n.getComponentMethod("errorbars","style")(t)},stylePoints:a,styleText:o,styleOnSelect:function(e,t,r){var n=t[0].trace;n.selectedpoints?(i.selectedPointStyle(r.selectAll("path.point"),n),i.selectedTextStyle(r.selectAll("text"),n)):(a(r,n,e),o(r,n,e))}}}}),ni=p({"src/traces/scatter/get_trace_color.js"(e,t){var r=ee(),i=t5();t.exports=function(e,t){if("lines"===e.mode)return(n=e.line.color)&&r.opacity(n)?n:e.fillcolor;if("none"===e.mode)return e.fill?e.fillcolor:"";var n,a,o=t.mcc||t.mc||(e.marker||{}).color,s=t.mlcc||((e.marker||{}).line||{}).color;return(a=o&&r.opacity(o)?o:s&&r.opacity(s)&&(t.mlw||((e.marker||{}).line||{}).width)?s:"")?.3>r.opacity(a)?r.addOpacity(a,.3):a:(n=(e.line||{}).color)&&r.opacity(n)&&i.hasLines(e)&&e.line.width?n:e.fillcolor}}}),nn=p({"src/traces/scatter/hover.js"(e,t){var r=tv(),i=rD(),n=eQ(),a=ni(),o=ee(),s=r.fillText;t.exports=function(e,t,l,c){var u=e.cd,h=u[0].trace,d=e.xa,f=e.ya,p=d.c2p(t),m=f.c2p(l),g=[p,m],y=h.hoveron||"",v=-1!==h.mode.indexOf("markers")?3:.5,x=!!h.xperiodalignment,b=!!h.yperiodalignment;if(-1!==y.indexOf("points")){var _=function(e){var t=Math.max(v,e.mrc||0),r=d.c2p(e.x)-p,i=f.c2p(e.y)-m;return Math.max(Math.sqrt(r*r+i*i)-t,1-v/t)},w=i.getDistanceFunction(c,function(e){if(x){var t=d.c2p(e.xStart),r=d.c2p(e.xEnd);return p>=Math.min(t,r)&&p<=Math.max(t,r)?0:1/0}var i=Math.max(3,e.mrc||0),n=1-1/i,a=Math.abs(d.c2p(e.x)-p);return a=Math.min(t,r)&&m<=Math.max(t,r)?0:1/0}var i=Math.max(3,e.mrc||0),n=1-1/i,a=Math.abs(f.c2p(e.y)-m);return ac!=(s=r[t][1])>=c&&(n=r[t-1][0],a=r[t][0],s-o&&(h=Math.min(h,i=n+(a-n)*(c-o)/(s-o)),p=Math.max(p,i)));return{x0:h=Math.max(h,0),x1:p=Math.min(p,d._length),y0:c,y1:c}}(h._polygons);null===I&&(I={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var z=o.defaultLine;return o.opacity(h.fillcolor)?z=h.fillcolor:o.opacity((h.line||{}).color)&&(z=h.line.color),r.extendFlat(e,{distance:e.maxHoverDistance,x0:I.x0,x1:I.x1,y0:I.y0,y1:I.y1,color:z,hovertemplate:!1}),delete e.index,h.text&&!r.isArrayOrTypedArray(h.text)?e.text=String(h.text):e.text=h.name,[e]}}}}),na=p({"src/traces/scatter/select.js"(e,t){var r=t5();t.exports=function(e,t){var i,n,a,o,s=e.cd,l=e.xaxis,c=e.yaxis,u=[],h=s[0].trace;if(h.mode&&!r.hasMarkers(h)&&!r.hasText(h))return[];if(!1===t)for(i=0;i0&&(n["_"+r+"axes"]||{})[t]||(n[r+"axis"]||r)===t&&(a(n,r)||(n[r]||[]).length||n[r+"0"]))return n}}(t,s,l);if(c){if("histogram"===c.type&&l===({v:"y",h:"x"})[c.orientation||"v"]){e.type="linear";return}var u=l+"calendar",h=c[u],d={noMultiCategory:!r(c,"cartesian")||r(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&l===({h:"x",v:"y"})[c.orientation||"v"]&&(d.noMultiCategory=!0),d.autotypenumbers=e.autotypenumbers,a(c,l)){var f=n(c),p=[];for(o=0;o0||r(o);s&&(a="array");var l,c=i("categoryorder",a);"array"===c&&(l=i("categoryarray")),s||"array"!==c||(c=t.categoryorder="trace"),"trace"===c?t._initialCategories=[]:"array"===c?t._initialCategories=l.slice():(l=(function(e,t){var r,i,n,a=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],i=0;i=2){var l,c,u="";if(2===o.length){for(l=0;l<2;l++)if(c=b(o[l])){u=g;break}}var h=a("pattern",u);if(h===g)for(l=0;l<2;l++)(c=b(o[l]))&&(t.bounds[l]=o[l]=c-1);if(h)for(l=0;l<2;l++)switch(c=o[l],h){case g:if(!r(c)||(c*=1)!==Math.floor(c)||c<0||c>=7){t.enabled=!1;return}t.bounds[l]=o[l]=c;break;case y:if(!r(c)||(c*=1)<0||c>24){t.enabled=!1;return}t.bounds[l]=o[l]=c}if(!1===i.autorange){var d=i.range;if(d[0]d[1]){t.enabled=!1;return}}else if(o[0]>d[0]&&o[1]b[1]-1/4096&&(t.domain=s),i.noneOrAll(e.domain,t.domain,s),"sync"===t.tickmode&&(t.tickmode="auto")}return n("layer"),t}}}),nd=p({"src/plots/cartesian/layout_defaults.js"(e,t){var r=tv(),i=ee(),n=t6().isUnifiedHover,a=rL(),o=tS(),s=eK(),l=tN(),c=ns(),u=nu(),h=r8(),d=nh(),f=tC(),p=f.id2name,m=f.name2id,g=tE().AX_ID_PATTERN,y=eQ(),v=y.traceIs,x=y.getComponentMethod;function b(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}t.exports=function(e,t,y){var _,w,T=t.autotypenumbers,M={},k={},A={},S={},E={},C={},L={},P={},I={},z={};for(_=0;_ rect").call(a.setTranslate,0,0).call(a.setScale,1,1),e.plot.call(a.setTranslate,t._offset,r._offset).call(a.setScale,1,1);var i=e.plot.selectAll(".scatterlayer .trace");i.selectAll(".point").call(a.setPointGroupScale,1,1),i.selectAll(".textpoint").call(a.setTextPointsScale,1,1),i.call(a.hideOutsideRangePoints,e)}l&&(h=l());var h,d,f,p,m=r.ease(s.easing);return e._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(p),p=null,function(){for(var r={},n=0;ns.duration?(function(){for(var r={},n=0;n1,m=t.mainplotinfo;if(!t.mainplot||p)if(f)t.xlines=u(i,"path","xlines-above"),t.ylines=u(i,"path","ylines-above"),t.xaxislayer=u(i,"g","xaxislayer-above"),t.yaxislayer=u(i,"g","yaxislayer-above");else{if(!a){var g=u(i,"g","layer-subplot");t.shapelayer=u(g,"g","shapelayer"),t.imagelayer=u(g,"g","imagelayer"),m&&p?(t.minorGridlayer=m.minorGridlayer,t.gridlayer=m.gridlayer,t.zerolinelayer=m.zerolinelayer):(t.minorGridlayer=u(i,"g","minor-gridlayer"),t.gridlayer=u(i,"g","gridlayer"),t.zerolinelayer=u(i,"g","zerolinelayer"));var y=u(i,"g","layer-between");t.shapelayerBetween=u(y,"g","shapelayer"),t.imagelayerBetween=u(y,"g","imagelayer"),u(i,"path","xlines-below"),u(i,"path","ylines-below"),t.overlinesBelow=u(i,"g","overlines-below"),u(i,"g","xaxislayer-below"),u(i,"g","yaxislayer-below"),t.overaxesBelow=u(i,"g","overaxes-below")}t.overplot=u(i,"g","overplot"),t.plot=u(t.overplot,"g",n),m&&p?t.zerolinelayerAbove=m.zerolinelayerAbove:t.zerolinelayerAbove=u(i,"g","zerolinelayer-above"),a||(t.xlines=u(i,"path","xlines-above"),t.ylines=u(i,"path","ylines-above"),t.overlinesAbove=u(i,"g","overlines-above"),u(i,"g","xaxislayer-above"),u(i,"g","yaxislayer-above"),t.overaxesAbove=u(i,"g","overaxes-above"),t.xlines=i.select(".xlines-"+o),t.ylines=i.select(".ylines-"+c),t.xaxislayer=i.select(".xaxislayer-"+o),t.yaxislayer=i.select(".yaxislayer-"+c))}else{var v=m.plotgroup,x=n+"-x",b=n+"-y";t.minorGridlayer=m.minorGridlayer,t.gridlayer=m.gridlayer,t.zerolinelayer=m.zerolinelayer,t.zerolinelayerAbove=m.zerolinelayerAbove,u(m.overlinesBelow,"path",x),u(m.overlinesBelow,"path",b),u(m.overaxesBelow,"g",x),u(m.overaxesBelow,"g",b),t.plot=u(m.overplot,"g",n),u(m.overlinesAbove,"path",x),u(m.overlinesAbove,"path",b),u(m.overaxesAbove,"g",x),u(m.overaxesAbove,"g",b),t.xlines=v.select(".overlines-"+o).select("."+x),t.ylines=v.select(".overlines-"+c).select("."+b),t.xaxislayer=v.select(".overaxes-"+o).select("."+x),t.yaxislayer=v.select(".overaxes-"+c).select("."+b)}a||(f||(h(t.minorGridlayer,"g",t.xaxis._id),h(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(e){return e[0]}).sort(s.idSort),h(t.gridlayer,"g",t.xaxis._id),h(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(e){return e[0]}).sort(s.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function m(e,r){if(e){var i={};for(var n in e.each(function(e){var n=e[0];t.select(this).remove(),g(n,r),i[n]=!0}),r._plots)for(var a=r._plots[n],o=a.overlays||[],s=0;s0){var g=m.id;if(-1!==g.indexOf(d))continue;g+=d+(u+1),m=i.extendFlat({},m,{id:g,plot:o._cartesianlayer.selectAll(".subplot").select("."+g)})}for(var y,v=[],x=0;x1&&(w+=d+_),b.push(i+w),r=0;r=0,x=t.indexOf("end")>=0,b=p.backoff*g+a.standoff,_=m.backoff*y+a.startstandoff;if("line"===f.nodeName){c={x:+e.attr("x1"),y:+e.attr("y1")},u={x:+e.attr("x2"),y:+e.attr("y2")};var w=c.x-u.x,T=c.y-u.y;if(d=(h=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void O();if(b){if(b*b>w*w+T*T)return void O();var M=b*Math.cos(h),k=b*Math.sin(h);u.x+=M,u.y+=k,e.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+T*T)return void O();var A=_*Math.cos(h),S=_*Math.sin(h);c.x-=A,c.y-=S,e.attr({x1:c.x,y1:c.y})}}else if("path"===f.nodeName){var E=f.getTotalLength(),C="";if(E2/3?"right":"center"),({center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5})[t]}for(var Z=!1,$=["x","y"],X=0;X<$.length;X++){var K,J,Q,ee,et,er=$[X],ei=t[er+"ref"]||er,en=t["a"+er+"ref"],ea={x:v,y:x}[er],eo=(P+("x"===er?0:-90))*Math.PI/180,es=H*Math.cos(eo),el=W*Math.sin(eo),ec=Math.abs(es)+Math.abs(el),eu=t[er+"anchor"],eh=t[er+"shift"]*("x"===er?1:-1),ed=L[er],ef=s.getRefType(ei);if(ea&&"domain"!==ef){var ep=ea.r2fraction(t[er]);(ep<0||ep>1)&&(en===ei?((ep=ea.r2fraction(t["a"+er]))<0||ep>1)&&(Z=!0):Z=!0),K=ea._offset+ea.r2p(t[er]),ee=.5}else{var em="domain"===ef;"x"===er?(Q=t[er],K=em?ea._offset+ea._length*Q:K=T.l+T.w*Q):(Q=1-t[er],K=em?ea._offset+ea._length*Q:K=T.t+T.h*Q),ee=t.showarrow?.5:Q}if(t.showarrow){ed.head=K;var eg=t["a"+er];if(et=es*Y(.5,t.xanchor)-el*Y(.5,t.yanchor),en===ei){var ey=s.getRefType(en);"domain"===ey?("y"===er&&(eg=1-eg),ed.tail=ea._offset+ea._length*eg):"paper"===ey?"y"===er?(eg=1-eg,ed.tail=T.t+T.h*eg):ed.tail=T.l+T.w*eg:ed.tail=ea._offset+ea.r2p(eg),J=et}else ed.tail=K+eg,J=et+eg;ed.text=ed.tail+et;var ev=w["x"===er?"width":"height"];if("paper"===ei&&(ed.head=a.constrain(ed.head,1,ev-1)),"pixel"===en){var ex=-Math.max(ed.tail-3,ed.text),eb=Math.min(ed.tail+3,ed.text)-ev;ex>0?(ed.tail+=ex,ed.text+=ex):eb>0&&(ed.tail-=eb,ed.text-=eb)}ed.tail+=eh,ed.head+=eh}else J=et=ec*Y(ee,eu),ed.text=K+et;ed.text+=eh,et+=eh,J+=eh,t["_"+er+"padplus"]=ec/2+J,t["_"+er+"padminus"]=ec/2-J,t["_"+er+"size"]=ec,t["_"+er+"shift"]=et}if(Z)return void F.remove();var e_=0,ew=0;if("left"!==t.align&&(e_=(O-_)*("center"===t.align?.5:1)),"top"!==t.valign&&(ew=(q-k)*("middle"===t.valign?.5:1)),p)u.select("svg").attr({x:B+e_-1,y:B+ew}).call(c.setClipUrl,U?C:null,e);else{var eT=B+ew-b.top,eM=B+e_-b.left;G.call(h.positionText,eM,eT).call(c.setClipUrl,U?C:null,e)}V.select("rect").call(c.setRect,B,B,O,q),N.call(c.setRect,j/2,j/2,H-j,W-j),F.call(c.setTranslate,Math.round(L.x.text-H/2),Math.round(L.y.text-W/2)),z.attr({transform:"rotate("+P+","+L.x.text+","+L.y.text+")"});var ek=function(r,n){I.selectAll(".annotation-arrow-g").remove();var s=L.x.head,u=L.y.head,h=L.x.tail+r,d=L.y.tail+n,p=L.x.text+r,b=L.y.text+n,_=a.rotationXYMatrix(P,p,b),w=a.apply2DTransform(_),k=a.apply2DTransform2(_),C=+N.attr("width"),D=+N.attr("height"),O=p-.5*C,R=O+C,j=b-.5*D,B=j+D,U=[[O,j,O,B],[O,B,R,B],[R,B,R,j],[R,j,O,j]].map(k);if(!U.reduce(function(e,t){return!!a.segmentsIntersect(s,u,s+1e6,u+1e6,t[0],t[1],t[2],t[3])^e},!1)){U.forEach(function(e){var t=a.segmentsIntersect(h,d,s,u,e[0],e[1],e[2],e[3]);t&&(h=t.x,d=t.y)});var V=t.arrowwidth,q=t.arrowcolor,H=t.arrowside,G=I.append("g").style({opacity:l.opacity(q)}).classed("annotation-arrow-g",!0),W=G.append("path").attr("d","M"+h+","+d+"L"+s+","+u).style("stroke-width",V+"px").call(l.stroke,l.rgb(q));if(m(W,H,t),M.annotationPosition&&W.node().parentNode&&!g){var Y=s,Z=u;if(t.standoff){var $=Math.sqrt(Math.pow(s-h,2)+Math.pow(u-d,2));Y+=t.standoff*(h-s)/$,Z+=t.standoff*(d-u)/$}var X,K,J=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(h-Y)+","+(d-Z),transform:o(Y,Z)}).style("stroke-width",V+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");f.init({element:J.node(),gd:e,prepFn:function(){var e=c.getTranslate(F);X=e.x,K=e.y,v&&v.autorange&&A(v._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0)},moveFn:function(e,r){var i=w(X,K),n=i[0]+e,a=i[1]+r;F.call(c.setTranslate,n,a),S("x",y(v,e,"x",T,t)),S("y",y(x,r,"y",T,t)),t.axref===t.xref&&S("ax",y(v,e,"ax",T,t)),t.ayref===t.yref&&S("ay",y(x,r,"ay",T,t)),G.attr("transform",o(e,r)),z.attr({transform:"rotate("+P+","+n+","+a+")"})},doneFn:function(){i.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};t.showarrow&&ek(0,0),D&&f.init({element:F.node(),gd:e,prepFn:function(){r=z.attr("transform")},moveFn:function(e,i){var n="pointer";if(t.showarrow)t.axref===t.xref?S("ax",y(v,e,"ax",T,t)):S("ax",t.ax+e),t.ayref===t.yref?S("ay",y(x,i,"ay",T.w,t)):S("ay",t.ay+i),ek(e,i);else{if(g)return;if(v)a=y(v,e,"x",T,t);else{var a,s,l=t._xsize/T.w,c=t.x+(t._xshift-t.xshift)/T.w-l/2;a=f.align(c+e/T.w,l,0,1,t.xanchor)}if(x)s=y(x,i,"y",T,t);else{var u=t._ysize/T.h,h=t.y-(t._yshift+t.yshift)/T.h-u/2;s=f.align(h-i/T.h,u,0,1,t.yanchor)}S("x",a),S("y",s),v&&x||(n=f.getCursor(v?.5:a,x?.5:s,t.xanchor,t.yanchor))}z.attr({transform:o(e,i)+r}),d(F,n)},clickFn:function(r,i){t.captureevents&&e.emit("plotly_clickannotation",R(i))},doneFn:function(){d(F),i.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}M.annotationText?G.call(h.makeEditable,{delegate:F,gd:e}).call(W).on("edit",function(r){t.text=r,this.call(W),S("text",r),v&&v.autorange&&A(v._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0),i.call("_guiRelayout",e,E())}):G.call(W)}t.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r0||r.explicitOff.length>0},onClick:function(e,t){var o,s,l=a(e,t),c=l.on,u=l.off.concat(l.explicitOff),h={},d=e._fullLayout.annotations;if(c.length||u.length){for(o=0;o1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+s+'"]').remove():(l._pdata=i(e.glplot.cameraParams,[t.xaxis.r2l(l.x)*a[0],t.yaxis.r2l(l.y)*a[1],t.zaxis.r2l(l.z)*a[2]]),r(e.graphDiv,l,s,e.id,l._xa,l._ya))}}}}),nC=p({"src/components/annotations3d/index.js"(e,t){var r=eQ(),i=tv();t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:nM()}}},layoutAttributes:nM(),handleDefaults:nk(),includeBasePlot:function(e,t){var n=r.subplotsRegistry.gl3d;if(n)for(var a=n.attrRegex,o=Object.keys(e),s=0;s{var l,g,y,v,x=a+"anchor",b="x"===a?d:f,_={_fullLayout:n};let w=e[a+"ref"];if(Array.isArray(w)&&w.length>0){let r=o.countDefiningCoords(u,c,a);v=i.coerceRefArray(e,t,_,a,void 0,"paper",r),t["_"+a+"refArray"]=!0}else v=i.coerceRef(e,t,_,a,void 0,"paper");if(Array.isArray(v))v.forEach(function(e){"range"===i.getRefType(e)&&(l=i.getFromId(_,e))&&-1===l._shapeIndices.indexOf(t._index)&&l._shapeIndices.push(t._index)}),h&&[0,1].forEach(function(n){let c=v[n];"range"===i.getRefType(c)?(l=i.getFromId(_,c),g=o.shapePositionToRange(l),y=o.rangeToShapePosition(l),("category"===l.type||"multicategory"===l.type)&&s(a+n+"shift")):g=y=r.identity;let u=a+n,h=e[u];if(e[u]=g(e[u],!0),"pixel"===b?s(u,m[n]):i.coercePosition(t,_,s,c,u,p[n]),t[u]=y(t[u]),e[u]=h,0===n&&"pixel"===b){let r=e[x];e[x]=g(e[x],!0),i.coercePosition(t,_,s,c,x,.25),t[x]=y(t[x]),e[x]=r}});else{if("range"===i.getRefType(v)?((l=i.getFromId(_,v))._shapeIndices.push(t._index),y=o.rangeToShapePosition(l),g=o.shapePositionToRange(l),h&&("category"===l.type||"multicategory"===l.type)&&(s(a+"0shift"),s(a+"1shift"))):g=y=r.identity,h){let r=a+"0",n=a+"1",o=e[r],l=e[n];e[r]=g(e[r],!0),e[n]=g(e[n],!0),"pixel"===b?(s(r,m[0]),s(n,m[1])):(i.coercePosition(t,_,s,v,r,p[0]),i.coercePosition(t,_,s,v,n,p[1])),t[r]=y(t[r]),t[n]=y(t[n]),e[r]=o,e[n]=l}if("pixel"===b){let r=e[x];e[x]=g(e[x],!0),i.coercePosition(t,_,s,v,x,.25),t[x]=y(t[x]),e[x]=r}}}),h&&r.noneOrAll(e,t,["x0","x1","y0","y1"]);var g,y,v="line"===u;if(h&&(g=s("label.texttemplate"),s("label.texttemplatefallback")),g||(y=s("label.text")),y||g){s("label.textangle");var x=s("label.textposition",v?"middle":"middle center");s("label.xanchor"),s("label.yanchor",v?"bottom":-1!==x.indexOf("top")?"top":-1!==x.indexOf("bottom")?"bottom":"middle"),s("label.padding"),r.coerceFont(s,"label.font",n.font)}}t.exports=function(e,t){n(e,t,{name:"shapes",handleItemDefaults:s})}}}),nI=p({"src/components/shapes/draw_newshape/defaults.js"(e,t){var r=ee(),i=tv();t.exports=function(e,t,n){if(n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),i.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity"),n("newshape.line.width")){var a=(e||{}).plot_bgcolor||"#FFF";n("newshape.line.color",r.contrast(a)),n("newshape.line.dash")}var o="drawline"===e.dragmode,s=n("newshape.label.text"),l=n("newshape.label.texttemplate");if(n("newshape.label.texttemplatefallback"),s||l){n("newshape.label.textangle");var c=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",o?"bottom":-1!==c.indexOf("top")?"top":-1!==c.indexOf("bottom")?"bottom":"middle"),n("newshape.label.padding"),i.coerceFont(n,"newshape.label.font",t.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}}}),nz=p({"src/components/shapes/calc_autorange.js"(e,t){var r=tv(),i=rn(),n=rq(),a=rH();function o(e,t,r){let o=t[r+"ref"],s="x"===r?n.paramIsX:n.paramIsY;function l(e,t){"paper"===e||"domain"===i.getRefType(e)||(c[e]||(c[e]=[]),c[e].push(t))}let c={};if("path"===t.type&&t.path){let e=t.path.match(n.segmentRE)||[];for(var u=0,h=0;hr&&(l(o[u],i[r]),u++)}}else l(o[0],t[r+"0"]),l(o[1],t[r+"1"]);let d={};for(let t in c){let r=i.getFromId(e,t);if(r){var f="category"===r.type||"multicategory"===r.type?r.r2c:r.d2c;"date"===r.type&&(f=a.decodeDate(f)),d[r._id]=c[t].map(f)}}return d}function s(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function l(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,i,o,s,l){var c=e/2;if("pixel"!==t)return{ppad:c};var u=s?a.extractPathCoords(s,l?n.paramIsY:n.paramIsX):[i,o],h=r.aggNums(Math.max,null,u),d=r.aggNums(Math.min,null,u),f=d<0?Math.abs(d)+c:c,p=h>0?h+c:c;return{ppad:c,ppadplus:l?f:p,ppadminus:l?p:f}}function u(e,t,r){var i,o,s="x"===e._id.charAt(0)?"x":"y",l="category"===e.type||"multicategory"===e.type,c=0,u=0,h=l?e.r2c:e.d2c;if("scaled"===t[s+"sizemode"]?(i=t[s+"0"],o=t[s+"1"],l&&(c=t[s+"0shift"],u=t[s+"1shift"])):(i=t[s+"anchor"],o=t[s+"anchor"]),void 0!==i)return[h(i)+c,h(o)+u];if(t.path){var d,f,p,m,g=1/0,y=-1/0,v=t.path.match(n.segmentRE);for("date"===e.type&&(h=a.decodeDate(h)),d=0;dy&&(y=m));if(y>=g)return[g,y]}}t.exports=function(e){var t=e._fullLayout,a=r.filterVisible(t.shapes);if(!(!a.length||!e._fullData.length))for(var c=0;c{d=i.getFromId(e,t),h._extremes[d._id]=i.findExtremes(d,r,s(h))}):"paper"!==h.xref&&"domain"!==p&&(f=u(d=i.getFromId(e,h.xref),h,n.paramIsX))&&(h._extremes[d._id]=i.findExtremes(d,f,s(h))),"array"===m?Object.entries(o(e,h,"y")).forEach(([t,r])=>{d=i.getFromId(e,t),h._extremes[d._id]=i.findExtremes(d,r,l(h))}):"paper"!==h.yref&&"domain"!==m&&(f=u(d=i.getFromId(e,h.yref),h,n.paramIsY))&&(h._extremes[d._id]=i.findExtremes(d,f,l(h)))}}}}),nD=p({"src/components/shapes/index.js"(e,t){var r=rY();t.exports={moduleType:"component",name:"shapes",layoutAttributes:nL(),supplyLayoutDefaults:nP(),supplyDrawNewShapeDefaults:nI(),includeBasePlot:iT()("shapes"),calcAutorange:nz(),draw:r.draw,drawOne:r.drawOne}}}),nO=p({"src/components/images/attributes.js"(e,t){var r=tE(),i=tS().templatedArray;im(),t.exports=i("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",r.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",r.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),nR=p({"src/components/images/defaults.js"(e,t){var r=tv(),i=rn(),n=t$(),a=nO();function o(e,t,n){function o(i,n){return r.coerce(e,t,a,i,n)}var s=o("source");if(!o("visible",!!s))return t;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var l={_fullLayout:n},c=["x","y"],u=0;u<2;u++){var h=c[u],d=i.coerceRef(e,t,l,h,"paper",void 0);"paper"!==d&&i.getFromId(l,d)._imgIndices.push(t._index),i.coercePosition(t,l,o,d,h,0)}return t}t.exports=function(e,t){n(e,t,{name:"images",handleItemDefaults:o})}}}),nF=p({"src/components/images/draw.js"(e,t){var r=T(),i=t7(),n=rn(),a=tC(),o=tO();t.exports=function(e){var t,s,l=e._fullLayout,c=[],u={},h=[];for(s=0;s0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),r.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),r.coerceFont(o,"font",a.font),o("bgcolor",a.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function l(e,t){function i(i,n){return r.coerce(e,t,o,i,n)}i("visible","skip"===e.method||Array.isArray(e.args))&&(i("method"),i("args"),i("args2"),i("label"),i("execute"))}t.exports=function(e,t){i(e,t,{name:a,handleItemDefaults:s})}}}),nq=p({"src/components/updatemenus/scrollbox.js"(e,t){t.exports=o;var r=T(),i=ee(),n=t7(),a=tv();function o(e,t,r){this.gd=e,this.container=t,this.id=r,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})}o.barWidth=2,o.barLength=20,o.barRadius=2,o.barPad=1,o.barColor="#808BA4",o.prototype.enable=function(e,t,a){var s=this.gd._fullLayout,l=s.width,c=s.height;this.position=e;var u,h,d,f,p=this.position.l,m=this.position.w,g=this.position.t,y=this.position.h,v=this.position.direction,x="down"===v,b="left"===v,_="up"===v,w=m,T=y;x||b||"right"===v||_||(this.position.direction="down",x=!0),x||_?(h=(u=p)+w,x?T=(f=Math.min((d=g)+T,c))-d:(d=Math.max((f=g+T)-T,0),T=f-d)):(f=(d=g)+T,b?(u=Math.max((h=p+w)-w,0),w=h-u):w=(h=Math.min((u=p)+w,l))-u),this._box={l:u,t:d,w:w,h:T};var M=m>w,k=o.barLength+2*o.barPad,A=o.barWidth+2*o.barPad,S=g+y;S+A>c&&(S=c-A);var E=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);E.exit().on(".drag",null).remove(),E.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,o.barColor),M?(this.hbar=E.attr({rx:o.barRadius,ry:o.barRadius,x:p,y:S,width:k,height:A}),this._hbarXMin=p+k/2,this._hbarTranslateMax=w-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=y>T,L=o.barWidth+2*o.barPad,P=o.barLength+2*o.barPad,I=p+m;I+L>l&&(I=l-L);var z=this.container.selectAll("rect.scrollbar-vertical").data(C?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,o.barColor),C?(this.vbar=z.attr({rx:o.barRadius,ry:o.barRadius,x:I,y:g,width:L,height:P}),this._vbarYMin=g+P/2,this._vbarTranslateMax=T-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var D=this.id,O=u-.5,R=C?h+L+.5:h+.5,F=d-.5,j=M?f+A+.5:f+.5,B=s._topdefs.selectAll("#"+D).data(M||C?[0]:[]);if(B.exit().remove(),B.enter().append("clipPath").attr("id",D).append("rect"),M||C?(this._clipRect=B.select("rect").attr({x:Math.floor(O),y:Math.floor(F),width:Math.ceil(R)-Math.floor(O),height:Math.ceil(j)-Math.floor(F)}),this.container.call(n.setClipUrl,D,this.gd),this.bg.attr({x:p,y:g,width:m,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(n.setClipUrl,null),delete this._clipRect),M||C){var N=r.behavior.drag().on("dragstart",function(){r.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(N);var U=r.behavior.drag().on("dragstart",function(){r.event.sourceEvent.preventDefault(),r.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(U),C&&this.vbar.on(".drag",null).call(U)}this.setTranslate(t,a)},o.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(n.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)},o.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=r.event.dx),this.vbar&&(t-=r.event.dy),this.setTranslate(e,t)},o.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=r.event.deltaY),this.vbar&&(t+=r.event.deltaY),this.setTranslate(e,t)},o.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var i=e+this._hbarXMin,n=i+this._hbarTranslateMax;e=(a.constrain(r.event.x,i,n)-i)/(n-i)*(this.position.w-this._box.w)}if(this.vbar){var o=t+this._vbarYMin,s=o+this._vbarTranslateMax;t=(a.constrain(r.event.y,o,s)-o)/(s-o)*(this.position.h-this._box.h)}this.setTranslate(e,t)},o.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,i=this.position.h-this._box.h;if(e=a.constrain(e||0,0,r),t=a.constrain(t||0,0,i),this.translateX=e,this.translateY=t,this.container.call(n.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var o=e/r;this.hbar.call(n.setTranslate,e+o*this._hbarTranslateMax,t)}if(this.vbar){var s=t/i;this.vbar.call(n.setTranslate,e,t+s*this._vbarTranslateMax)}}}}),nH=p({"src/components/updatemenus/draw.js"(e,t){var r=T(),i=tD(),n=ee(),a=t7(),o=tv(),s=tF(),l=tS().arrayEditor,c=tR().LINE_SPACING,u=nN(),h=nq();function d(e){return e._index}function f(e,t){return+e.attr(u.menuIndexAttrName)===t._index}function p(e,t,r,i,n,a,o,s){t.active=o,l(e.layout,u.name,t).applyUpdate("active",o),"buttons"===t.type?g(e,i,null,null,t):"dropdown"===t.type&&(n.attr(u.menuIndexAttrName,"-1"),m(e,i,n,a,t),s||g(e,i,n,a,t))}function m(e,t,r,i,n){var s=o.ensureSingle(t,"g",u.headerClassName,function(e){e.style("pointer-events","all")}),l=n._dims,c=n.active,h=n.buttons[c]||u.blankHeaderOpts,d={y:n.pad.t,yPad:0,x:n.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};s.call(y,n,h,e).call(k,n,d,p),o.ensureSingle(t,"text",u.headerArrowClassName,function(e){e.attr("text-anchor","end").call(a.font,n.font).text(u.arrowSymbol[n.direction])}).attr({x:l.headerWidth-u.arrowOffsetX+n.pad.l,y:l.headerHeight/2+u.textOffsetY+n.pad.t}),s.on("click",function(){r.call(A,String(f(r,n)?-1:n._index)),g(e,t,r,i,n)}),s.on("mouseover",function(){s.call(_)}),s.on("mouseout",function(){s.call(w,n)}),a.setTranslate(t,l.lx,l.ly)}function g(e,t,n,a,s){n||(n=t).attr("pointer-events","all");var l,c,h,d=-1==+n.attr(u.menuIndexAttrName)&&"buttons"!==s.type?[]:s.buttons,f="dropdown"===s.type?u.dropdownButtonClassName:u.buttonClassName,m=n.selectAll("g."+f).data(o.filterVisible(d)),g=m.enter().append("g").classed(f,!0),v=m.exit();"dropdown"===s.type?(g.attr("opacity","0").transition().attr("opacity","1"),v.transition().attr("opacity","0").remove()):v.remove();var x=0,T=0,M=s._dims,A=-1!==["up","down"].indexOf(s.direction);"dropdown"===s.type&&(A?T=M.headerHeight+u.gapButtonHeader:x=M.headerWidth+u.gapButtonHeader),"dropdown"===s.type&&"up"===s.direction&&(T=-u.gapButtonHeader+u.gapButton-M.openHeight),"dropdown"===s.type&&"left"===s.direction&&(x=-u.gapButtonHeader+u.gapButton-M.openWidth);var S={x:M.lx+x+s.pad.l,y:M.ly+T+s.pad.t,yPad:u.gapButton,xPad:u.gapButton,index:0},E={l:S.x+s.borderwidth,t:S.y+s.borderwidth};m.each(function(o,l){var c=r.select(this);c.call(y,s,o,e).call(k,s,S),c.on("click",function(){r.event.defaultPrevented||(o.execute&&(o.args2&&s.active===l?(p(e,s,o,t,n,a,-1),i.executeAPICommand(e,o.method,o.args2)):(p(e,s,o,t,n,a,l),i.executeAPICommand(e,o.method,o.args))),e.emit("plotly_buttonclicked",{menu:s,button:o,active:s.active}))}),c.on("mouseover",function(){c.call(_)}),c.on("mouseout",function(){c.call(w,s),m.call(b,s)})}),m.call(b,s),A?(E.w=Math.max(M.openWidth,M.headerWidth),E.h=S.y-E.t):(E.w=S.x-E.l,E.h=Math.max(M.openHeight,M.headerHeight)),E.direction=s.direction,a&&(m.size()?function(e,t,r){var i,n,a,o=t.direction,s=t._dims,l=t.active;if("up"===o||"down"===o)for(n=0,a=0;a0?[0]:[]);if(v.enter().append("g").classed(u.containerClassName,!0).style("cursor","pointer"),v.exit().each(function(){r.select(this).selectAll("g."+u.headerGroupClassName).each(l)}).remove(),0!==n.length){var x=v.selectAll("g."+u.headerGroupClassName).data(n,d);x.enter().append("g").classed(u.headerGroupClassName,!0);for(var b=o.ensureSingle(v,"g",u.dropdownButtonGroupClassName,function(e){e.style("pointer-events","all")}),_=0;_0&&(l=l.transition().duration(t.transition.duration).ease(t.transition.easing)),l.attr("transform",s(o-.5*u.gripWidth,t._dims.currentValueTotalHeight))}}function S(e,t){var r=e._dims;return r.inputAreaStart+u.stepInset+(r.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,t))}function E(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-u.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*u.stepInset-2*r.inputAreaStart)))}function C(e,t,r){var i=r._dims,s=o.ensureSingle(e,"rect",u.railTouchRectClass,function(i){i.call(M,t,e,r).style("pointer-events","all")});s.attr({width:i.inputAreaLength,height:Math.max(i.inputAreaWidth,u.tickOffset+r.ticklen+i.labelHeight)}).call(n.fill,r.bgcolor).attr("opacity",0),a.setTranslate(s,0,i.currentValueTotalHeight)}function L(e,t){var r=t._dims,i=r.inputAreaLength-2*u.railInset,s=o.ensureSingle(e,"rect",u.railRectClass);s.attr({width:i,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(n.stroke,t.bordercolor).call(n.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),a.setTranslate(s,u.railInset,(r.inputAreaWidth-u.railWidth)*.5+r.currentValueTotalHeight)}t.exports=function(e){var t=e._context.staticPlot,n=e._fullLayout,s=function(e,t){for(var r=e[u.name],i=[],n=0;n0?[0]:[]);function h(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),i.autoMargin(e,m(t))}if(c.enter().append("g").classed(u.containerClassName,!0).style("cursor",t?null:"ew-resize"),c.exit().each(function(){r.select(this).selectAll("g."+u.groupClassName).each(h)}).remove(),0!==s.length){var d=c.selectAll("g."+u.groupClassName).data(s,g);d.enter().append("g").classed(u.groupClassName,!0),d.exit().each(h).remove();for(var _=0;_0?e.touches[0].clientX:0}function g(e,t,r,i){var n=a.ensureSingle(e,"rect",p.bgClassName,function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),c=i.borderwidth%2==0?i.borderwidth:i.borderwidth-1,u=-i._offsetShift,h=s.crispRound(t,i.borderwidth);n.attr({width:i._width+c,height:i._height+c,transform:o(u,u),"stroke-width":h}).call(l.stroke,i.bordercolor).call(l.fill,i.bgcolor)}function y(e,t,r,i){var n=t._fullLayout;a.ensureSingleById(n._topdefs,"clipPath",i._clipId,function(e){e.append("rect").attr({x:0,y:0})}).select("rect").attr({width:i._width,height:i._height})}function v(e,t,i,o){var l,c=t.calcdata,d=e.selectAll("g."+p.rangePlotClassName).data(i._subplotsWith,a.identity);d.enter().append("g").attr("class",function(e){return p.rangePlotClassName+" "+e}).call(s.setClipUrl,o._clipId,t),d.order(),d.exit().remove(),d.each(function(e,a){var s=r.select(this),d=h.getFromId(t,e,"y"),f=d._name,p=o[f],m={data:[],layout:{xaxis:{type:i.type,domain:[0,1],range:o.range.slice(),calendar:i.calendar},width:o._width,height:o._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};i.rangebreaks&&(m.layout.xaxis.rangebreaks=i.rangebreaks),m.layout[f]={type:d.type,domain:[0,1],range:"match"!==p.rangemode?p.range.slice():d.range.slice(),calendar:d.calendar},d.rangebreaks&&(m.layout[f].rangebreaks=d.rangebreaks),n.supplyDefaults(m);var g=m._fullLayout.xaxis,y=m._fullLayout[f];g.clearCalc(),g.setScale(),y.clearCalc(),y.setScale();var v={id:e,plotgroup:s,xaxis:g,yaxis:y,isRangePlot:!0};0===a?l=v:(v.mainplot="xy",v.mainplotinfo=l),u.rangePlot(t,v,function(e,t){for(var r=[],i=0;i=i.max)t=j[r+1];else if(e=i.pmax)t=j[r+1];else if(en._length||v+_<0)return;u=y+_,d=v+_;break;case l:if(b="col-resize",y+_>n._length)return;u=y+_,d=v;break;case c:if(b="col-resize",v+_<0)return;u=y,d=v+_;break;default:b="ew-resize",u=g,d=g+_}if(d0)){var m=function(e,t,r){for(var i=r.filter(function(r){return t[r].anchor===e._id}),n=0,a=0;a1))return void delete t.grid;d||f||p||"independent"===M("pattern")&&(d=!0),g._hasSubplotGrid=d;var x,b,_=M("roworder"),w=d?.2:.1,T=d?.3:.1;m&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),g._domains={x:c("x",M,w,x,v),y:c("y",M,T,b,y,"top to bottom"===_)}}function M(e,t){return r.coerce(i,g,s,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(!(!r||!r._domains)){var i,n,a,o,s,c,h,d=e.grid||{},f=t._subplots,p=r._hasSubplotGrid,m=r.rows,g=r.columns,y="independent"===r.pattern,v=r._axisMap={};if(p){var x=d.subplots||[];c=r.subplots=Array(m);var b=1;for(i=0;i0,h=e._context.staticPlot;t.each(function(t){var d,f=t[0].trace,p=f.error_x||{},m=f.error_y||{};f.ids&&(d=function(e){return e.id});var g=a.hasMarkers(f)&&f.marker.maxdisplayed>0;m.visible||p.visible||(t=[]);var y=r.select(this).selectAll("g.errorbar").data(t,d);if(y.exit().remove(),t.length){p.visible||y.selectAll("path.xerror").remove(),m.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var v=y.enter().append("g").classed("errorbar",!0);u&&v.style("opacity",0).transition().duration(s.duration).style("opacity",1),n.setClipUrl(y,o.layerClipId,e),y.each(function(e){var t=r.select(this),n=(a=e,o=l,d=c,f={x:o.c2p(a.x),y:d.c2p(a.y)},void 0!==a.yh&&(f.yh=d.c2p(a.yh),f.ys=d.c2p(a.ys),i(f.ys)||(f.noYS=!0,f.ys=d.c2p(a.ys,!0))),void 0!==a.xh&&(f.xh=o.c2p(a.xh),f.xs=o.c2p(a.xs),i(f.xs)||(f.noXS=!0,f.xs=o.c2p(a.xs,!0))),f);if(!(g&&!e.vis)){var a,o,d,f,y,v=t.select("path.yerror");if(m.visible&&i(n.x)&&i(n.yh)&&i(n.ys)){var x=m.width;y="M"+(n.x-x)+","+n.yh+"h"+2*x+"m-"+x+",0V"+n.ys,n.noYS||(y+="m-"+x+",0h"+2*x),v.size()?u&&(v=v.transition().duration(s.duration).ease(s.easing)):v=t.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0),v.attr("d",y)}else v.remove();var b=t.select("path.xerror");if(p.visible&&i(n.y)&&i(n.xh)&&i(n.xs)){var _=(p.copy_ystyle?m:p).width;y="M"+n.xh+","+(n.y-_)+"v"+2*_+"m0,-"+_+"H"+n.xs,n.noXS||(y+="m0,-"+_+"v"+2*_),b.size()?u&&(b=b.transition().duration(s.duration).ease(s.easing)):b=t.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0),b.attr("d",y)}else b.remove()}})}})}}}),al=p({"src/components/errorbars/style.js"(e,t){var r=T(),i=ee();t.exports=function(e){e.each(function(e){var t=e[0].trace,n=t.error_y||{},a=t.error_x||{},o=r.select(this);o.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(i.stroke,n.color),a.copy_ystyle&&(a=n),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)})}}}),ac=p({"src/components/errorbars/index.js"(e,t){var r=tv(),i=eq().overrideAll,n=ai(),a={error_x:r.extendFlat({},n),error_y:r.extendFlat({},n)};delete a.error_x.copy_zstyle,delete a.error_y.copy_zstyle,delete a.error_y.copy_ystyle;var o={error_x:r.extendFlat({},n),error_y:r.extendFlat({},n),error_z:r.extendFlat({},n)};delete o.error_x.copy_ystyle,delete o.error_y.copy_ystyle,delete o.error_z.copy_ystyle,delete o.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:a,bar:a,histogram:a,scatter3d:i(o,"calc","nested"),scattergl:i(a,"calc","nested")}},supplyDefaults:an(),calc:ao(),makeComputeError:aa(),plot:as(),style:al(),hoverInfo:function(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}}}}),au=p({"src/components/colorbar/constants.js"(e,t){t.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"}}}}),ah=p({"src/components/colorbar/draw.js"(e,t){var r=T(),i=tD(),n=eQ(),a=rn(),o=rd(),s=tv(),l=s.strTranslate,c=q().extendFlat,u=rf(),h=t7(),d=ee(),f=re(),p=tF(),m=tj().flipScale,g=nu(),y=nh(),v=tN(),x=tR(),b=x.LINE_SPACING,_=x.FROM_TL,w=x.FROM_BR,M=au().cn,k=(e,t)=>[Math.min(e[0]+t,e[1]),e[1]],A=(e,t)=>[e[0],Math.max(e[1]-t,e[0])];t.exports={draw:function(e){var t=e._fullLayout._infolayer.selectAll("g."+M.colorbar).data(function(e){var t,r,i,n,a=e._fullLayout,o=e.calcdata,s=[];function l(e){return c(e,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){"function"==typeof n.calc?n.calc(e,i,t):(t._fillgradient=r.reversescale?m(r.colorscale):r.colorscale,t._zrange=[r[n.min],r[n.max]])}for(var h=0;h0?r>=s:r<=s));i++)r>c&&r0?r>=s:r<=s));i++)r>t[0]&&r1){var ep=Math.pow(10,Math.floor(Math.log(ef)/Math.LN10));eh*=ep*s.roundUp(ef/ep,[2,5,10]),(Math.abs(Y.start)/Y.size+1e-6)%1<2e-6&&(ec.tick0=0)}ec.dtick=eh}var em=o?z/B.h:I/B.w;ec.domain=A(k([es,es+ee],em),em),ec.setScale(),e.attr("transform",l(Math.round(B.l),Math.round(B.t)));var eg,ey=e.select("."+M.cbtitleunshift).attr("transform",l(-Math.round(B.l),-Math.round(B.t))),ev=ec.ticklabelposition,ex=ec.title.font.size,eb=e.select("."+M.cbaxis),e_=0,ew=0;function eT(r,i){var a={propContainer:ec,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:j._dfltTitle.colorbar,containerGroup:e.select("."+M.cbtitle)},o="h"===r.charAt(0)?r.slice(1):"h"+r;e.selectAll("."+o+",."+o+"-math-group").remove(),f.draw(n,r,c(a,i||{}))}return s.syncOrAsync([i.previousPromises,function(){if(o&&eu||!o&&!eu){var e,t;"top"===q&&(e=I+B.l+et*D,t=z+B.t+er*(1-es-ee)+3+.75*ex),"bottom"===q&&(e=I+B.l+et*D,t=z+B.t+er*(1-es)-3-.25*ex),"right"===q&&(t=z+B.t+er*O+3+.75*ex,e=I+B.l+et*es),eT(ec._id+"title",{attributes:{x:e,y:t,"text-anchor":o?"start":"middle"}})}},function(){if(!o&&!eu||o&&eu){var i,c=e.select("."+M.cbtitle),u=c.select("text"),f=[-S/2,S/2],m=c.select(".h"+ec._id+"title-math-group").node(),g=15.6;if(u.node()&&(g=parseInt(u.node().style.fontSize,10)*b),m?(ew=(i=h.bBox(m)).width,(e_=i.height)>g&&(f[1]-=(e_-g)/2)):u.node()&&!u.classed(M.jsPlaceholder)&&(ew=(i=h.bBox(u.node())).width,e_=i.height),o){if(e_){if(e_+=5,"top"===q)ec.domain=A(ec.domain,e_/B.h),f[1]*=-1;else{ec.domain=k(ec.domain,e_/B.h);var y=p.lineCount(u);f[1]+=(1-y)*g}c.attr("transform",l(f[0],f[1])),ec.setScale()}}else ew&&("right"===q&&(ec.domain=k(ec.domain,(ew+ex/2)/B.w)),c.attr("transform",l(f[0],f[1])),ec.setScale())}e.selectAll("."+M.cbfills+",."+M.cblines).attr("transform",o?l(0,Math.round(B.h*(1-ec.domain[1]))):l(Math.round(B.w*ec.domain[0]),0)),eb.attr("transform",o?l(0,Math.round(-B.t)):l(Math.round(-B.l),0));var v=e.select("."+M.cbfills).selectAll("rect."+M.cbfill).attr("style","").data($);v.enter().append("rect").classed(M.cbfill,!0).attr("style",""),v.exit().remove();var x=H.map(ec.c2p).map(Math.round).sort(function(e,t){return e-t});v.each(function(e,i){var a=[0===i?H[0]:($[i]+$[i-1])/2,i===$.length-1?H[1]:($[i]+$[i+1])/2].map(ec.c2p).map(Math.round);o&&(a[1]=s.constrain(a[1]+(a[1]>a[0])?1:-1,x[0],x[1]));var l=r.select(this).attr(o?"x":"y",ei).attr(o?"y":"x",r.min(a)).attr(o?"width":"height",Math.max(K,2)).attr(o?"height":"width",Math.max(r.max(a)-r.min(a),2));if(t._fillgradient)h.gradient(l,n,t._id,o?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var c=W(e).replace("e-","");l.attr("fill",d.hexString(c))}});var _=e.select("."+M.cblines).selectAll("path."+M.cbline).data(U.color&&U.width?X:[]);_.enter().append("path").classed(M.cbline,!0),_.exit().remove(),_.each(function(e){var t=Math.round(ec.c2p(e))+U.width/2%1;r.select(this).attr("d","M"+(o?ei+","+t:t+","+ei)+(o?"h":"v")+K).call(h.lineGroupStyle,U.width,G(e),U.dash)}),eb.selectAll("g."+ec._id+"tick,path").remove();var w=ei+K+(S||0)/2-("outside"===t.ticks),T=a.calcTicks(ec),E=a.getTickSigns(ec)[2];return a.drawTicks(n,ec,{vals:"inside"===ec.ticks?a.clipEnds(ec,T):T,layer:eb,path:a.makeTickPath(ec,w,E),transFn:a.makeTransTickFn(ec)}),a.drawLabels(n,ec,{vals:T,layer:eb,transFn:a.makeTransTickLabelFn(ec),labelFns:a.makeLabelFns(ec,w)})},function(){if(o&&!eu||!o&&eu){var e,i,a=ec.position||0,s=ec._offset+ec._length/2;if("right"===q)i=s,e=B.l+et*a+10+ex*(ec.showticklabels?1:.5);else if(e=s,"bottom"===q&&(i=B.t+er*a+10+(-1===ev.indexOf("inside")?ec.tickfont.size:0)+("inside"!==ec.ticks&&t.ticklen||0)),"top"===q){var l=V.text.split("
").length;i=B.t+er*a+10-K-b*ex*l}eT((o?"h":"v")+ec._id+"title",{avoid:{selection:r.select(n).selectAll("g."+ec._id+"tick"),side:q,offsetTop:o?0:B.t,offsetLeft:o?B.l:0,maxShift:o?j.width:j.height},attributes:{x:e,y:i,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},i.previousPromises,function(){var r,a=K+S/2;-1===ev.indexOf("inside")&&(r=h.bBox(eb.node()),a+=o?r.width:r.height),eg=ey.select("text");var s=0,c=o&&"top"===q,f=!o&&"right"===q,p=0;if(eg.node()&&!eg.classed(M.jsPlaceholder)){var g,y=ey.select(".h"+ec._id+"title-math-group").node();y&&(o&&eu||!o&&!eu)?(s=(r=h.bBox(y)).width,g=r.height):(s=(r=h.bBox(ey.node())).right-B.l-(o?ei:el),g=r.bottom-B.t-(o?el:ei),o||"top"!==q||(a+=r.height,p=r.height)),f&&(eg.attr("transform",l(s/2+ex/2,0)),s*=2),a=Math.max(a,o?s:g)}var v=(o?I:z)*2+a+E+S/2,b=0;!o&&V.text&&"bottom"===P&&O<=0&&(b=v/2,v+=b,p+=b),j._hColorbarMoveTitle=b,j._hColorbarMoveCBTitle=p;var k=E+S,A=(o?ei:el)-k/2-(o?I:0),N=(o?el:ei)-(o?Q:z+p-b);e.select("."+M.cbbg).attr("x",A).attr("y",N).attr(o?"width":"height",Math.max(v-b,2)).attr(o?"height":"width",Math.max(Q+k,2)).call(d.fill,C).call(d.stroke,t.bordercolor).style("stroke-width",E);var U=f?Math.max(s-10,0):0;e.selectAll("."+M.cboutline).attr("x",(o?ei:el+I)+U).attr("y",(o?el+z-Q:ei)+(c?e_:0)).attr(o?"width":"height",Math.max(K,2)).attr(o?"height":"width",Math.max(Q-(o?2*z+e_:2*I+U),2)).call(d.stroke,t.outlinecolor).style({fill:"none","stroke-width":S});var H=o?en*v:0,G=o?0:(1-ea)*v-p;if(H=F?B.l-H:-H,G=R?B.t-G:-G,e.attr("transform",l(H,G)),!o&&(E||d.opacity(C)&&!d.equals(j.paper_bgcolor,C))){var W=eb.selectAll("text"),Y=W[0].length,Z=e.select("."+M.cbbg).node(),$=h.bBox(Z),X=h.getTranslate(e);W.each(function(e,t){var r=Y-1;if(0===t||t===r){var i,n=h.bBox(this),a=h.getTranslate(this);if(t===r){var o=n.right+a.x;(i=$.right+X.x+el-E-2+D-o)>0&&(i=0)}else if(0===t){var s=n.left+a.x;(i=$.left+X.x+el+E+2-s)<0&&(i=0)}i&&(Y<3?this.setAttribute("transform","translate("+i+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var J={},ee=_[L],et=w[L],er=_[P],eo=w[P],es=v-K;o?("pixels"===m?(J.y=O,J.t=Q*er,J.b=Q*eo):(J.t=J.b=0,J.yt=O+u*er,J.yb=O-u*eo),"pixels"===T?(J.x=D,J.l=v*ee,J.r=v*et):(J.l=es*ee,J.r=es*et,J.xl=D-x*ee,J.xr=D+x*et)):("pixels"===m?(J.x=D,J.l=Q*ee,J.r=Q*et):(J.l=J.r=0,J.xl=D+u*ee,J.xr=D-u*et),"pixels"===T?(J.y=1-O,J.t=v*er,J.b=v*eo):(J.t=es*er,J.b=es*eo,J.yt=O-x*er,J.yb=O+x*eo));var eh=t.y<.5?"b":"t",ed=t.x<.5?"l":"r";n._fullLayout._reservedMargin[t._id]={};var ef={r:j.width-A-H,l:A+J.r,b:j.height-N-G,t:N+J.b};F&&R?i.autoMargin(n,t._id,J):F?n._fullLayout._reservedMargin[t._id][eh]=ef[eh]:R||o?n._fullLayout._reservedMargin[t._id][ed]=ef[ed]:n._fullLayout._reservedMargin[t._id][eh]=ef[eh]}],n)}(I,t,e);z&&z.then&&(e._promises||[]).push(z),e._context.edits.colorbarPosition&&(m=I,x=t,T=e,L="v"===x.orientation,P=T._fullLayout._size,o.init({element:m.node(),gd:T,prepFn:function(){S=m.attr("transform"),u(m)},moveFn:function(e,t){m.attr("transform",S+l(e,t)),E=o.align((L?x._uFrac:x._vFrac)+e/P.w,L?x._thickFrac:x._lenFrac,0,1,x.xanchor),C=o.align((L?x._vFrac:1-x._uFrac)-t/P.h,L?x._lenFrac:x._thickFrac,0,1,x.yanchor),u(m,o.getCursor(E,C,x.xanchor,x.yanchor))},doneFn:function(){if(u(m),void 0!==E&&void 0!==C){var e={};e[x._propPrefix+"x"]=E,e[x._propPrefix+"y"]=C,void 0!==x._traceIndex?n.call("_guiRestyle",T,e,x._traceIndex):n.call("_guiRelayout",T,e)}}}))}),t.exit().each(function(t){i.autoMargin(e,t._id)}).remove(),t.order()}}}}),ad=p({"src/components/colorbar/index.js"(e,t){t.exports={moduleType:"component",name:"colorbar",attributes:tU(),supplyDefaults:tJ(),draw:ah().draw,hasColorbar:tH()}}}),af=p({"src/components/legend/index.js"(e,t){t.exports={moduleType:"component",name:"legend",layoutAttributes:rm(),supplyLayoutDefaults:ry(),draw:rk(),style:rM()}}}),ap=p({"src/locale-en.js"(e,t){t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{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"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}}}),am=p({"src/locale-en-us.js"(e,t){t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}}),ag=p({"src/snapshot/cloneplot.js"(e,t){var r=eQ(),i=tv(),n=i.extendFlat,a=i.extendDeep;function o(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}t.exports=function(e,t){var i,s=e.data,l=e.layout,c=a([],s),u=a({},l,o(t.tileClass));if(e._context,t.width&&(u.width=t.width),t.height&&(u.height=t.height),"thumbnail"===t.tileClass||"themes__thumb"===t.tileClass){u.annotations=[];var h=Object.keys(u);for(i=0;i-1&&(u[h[i]].title={text:""});for(i=0;i=0)return e}else if("string"==typeof e&&"%"===(e=e.trim()).slice(-1)&&r(e.slice(0,-1))&&(e=+e.slice(0,-1))>=0)return e+"%"}function f(e,t,r,n,a,o){var s=!1!==(o=o||{}).moduleHasSelected,l=!1!==o.moduleHasUnselected,c=!1!==o.moduleHasConstrain,u=!1!==o.moduleHasCliponaxis,d=!1!==o.moduleHasTextangle,f=!1!==o.moduleHasInsideanchor,p=!!o.hasPathbar,m=Array.isArray(a)||"auto"===a,g=m||"inside"===a,y=m||"outside"===a;if(g||y){var v=h(n,"textfont",r.font),x=i.extendFlat({},v),b=!(e.textfont&&e.textfont.color);if(b&&delete x.color,h(n,"insidetextfont",x),p){var _=i.extendFlat({},v);b&&delete _.color,h(n,"pathbar.textfont",_)}y&&h(n,"outsidetextfont",v),s&&n("selected.textfont.color"),l&&n("unselected.textfont.color"),c&&n("constraintext"),u&&n("cliponaxis"),d&&n("textangle"),n("texttemplate"),n("texttemplatefallback")}g&&f&&n("insidetextanchor")}t.exports={supplyDefaults:function(e,t,r,c){function h(r,n){return i.coerce(e,t,u,r,n)}if(!o(e,t,c,h)){t.visible=!1;return}s(e,t,c,h),h("xhoverformat"),h("yhoverformat"),h("zorder"),h("orientation",t.x&&!t.y?"h":"v"),h("base"),h("offset"),h("width"),h("text"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback");var d=h("textposition");f(e,t,c,h,d,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),l(e,t,h,r,c);var p=(t.marker.line||{}).color,m=a.getComponentMethod("errorbars","supplyDefaults");m(e,t,p||n.defaultLine,{axis:"y"}),m(e,t,p||n.defaultLine,{axis:"x",inherit:"y"}),i.coerceSelectionMarkerOpacity(t,h)},crossTraceDefaults:function(e,t){var r,n;function a(e,t){return i.coerce(n._input,n,u,e,t)}for(var o=0;o0&&!d[y]&&(h=!0)),d[y]=!0,g.visible&&"histogram"===g.type&&"category"!==i.getFromId({_fullLayout:t},g["v"===g.orientation?"xaxis":"yaxis"]).type&&(u=!0)}}c?("overlay"!==f&&l("barnorm"),l("bargap",u&&!h?0:.2),l("bargroupgap"),t.barcornerradius=o(l("barcornerradius"))):delete t.barmode}}}),aA=p({"src/traces/bar/arrays_to_calcdata.js"(e,t){var r=tv();t.exports=function(e,t){for(var i=0;ia))return t}return void 0!==i?i:e.dflt},e.coerceColor=function(e,r,i){return t.isValid(r)?r:void 0!==i?i:e.dflt},e.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t*=1),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},e.getValue=function(e,t){var r;return i(e)?t1||0===n.bargap&&0===n.bargroupgap&&!e[0].trace.marker.line.width)&&r.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(t){f(r.select(this),t[0].trace,e)}),o.getComponentMethod("errorbars","style")(t)},styleTextPoints:p,styleOnSelect:function(e,t,i){var s,l,c,u,h,d,p=t[0].trace;p.selectedpoints?(s=i,l=p,c=e,n.selectedPointStyle(s.selectAll("path"),l),u=s.selectAll("text"),h=l,d=c,u.each(function(e){var t,i=r.select(this);if(e.selected){t=a.ensureUniformFontSize(d,m(i,e,h,d));var o=h.selected.textfont&&h.selected.textfont.color;o&&(t.color=o),n.font(i,t)}else n.selectedTextStyle(i,h)})):(f(i,p,e),o.getComponentMethod("errorbars","style")(i))},getInsideTextFont:y,getOutsideTextFont:v,getBarColor:b,resizeText:s}}}),aP=p({"src/traces/bar/plot.js"(e,t){var r=T(),i=C(),n=tv(),a=tF(),o=ee(),s=t7(),l=eQ(),c=rn().tickText,u=aE(),h=u.recordMinTextSize,d=u.clearMinTextSize,f=aL(),p=aC(),m=i5(),g=a_(),y=g.text,v=g.textposition,x=t6().appendArrayPointValue,b=m.TEXTPAD;function _(e){return e.id}function w(e,t,r,i){var n;return!t.uniformtext.mode&&M(r)?(i&&(n=i()),e.transition().duration(r.duration).ease(r.easing).each("end",function(){n&&n()}).each("interrupt",function(){n&&n()})):e}function M(e){return e&&e.duration>0}function k(e,t,r,i,n){return!(e<0)&&!(t<0)&&(r<=e&&i<=t||r<=t&&i<=e||(n?e>=t/i*r:t>=e/r*i))}function A(e){return"auto"===e?0:e}function S(e,t){var r=Math.PI/180*t,i=Math.abs(Math.sin(r)),n=Math.abs(Math.cos(r));return{x:e.width*n+e.height*i,y:e.width*i+e.height*n}}function E(e,t,r,i,n,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor,u="end"===c,h="start"===c,d=((a.leftToRight||0)+1)/2,f=1-d,p=a.hasB,m=a.r,g=a.overhead,y=n.width,v=n.height,x=Math.abs(t-e),_=Math.abs(i-r),w=x>2*b&&_>2*b?b:0;x-=2*w,_-=2*w;var T=A(l);"auto"===l&&!(y<=x&&v<=_)&&(y>x||v>_)&&(!(y>_||v>x)||yb){var C,L,P,I,z,D,O,R,F,j,B,N,U,V,q,H,G,W=(C=e,L=t,P=r,I=i,z=E,D=m,O=g,R=o,F=p,V=Math.max(0,Math.abs(L-C)-2*b),q=Math.max(0,Math.abs(I-P)-2*b),H=D-b,G=O?H-Math.sqrt(H*H-(H-O)*(H-O)):H,z.y/z.x>=q/(V-(F?2*H:R?H-O:2*G))?N=q/z.y:z.y/z.x<=(q-(F?2*H:R?2*G:H-O))/V?N=V/z.x:!F&&R?(j=z.x*z.x+z.y*z.y/4,N=(-(B=-2*z.x*(V-H)-z.y*(q/2-H))+Math.sqrt(B*B-4*j*((V-H)*(V-H)+(q/2-H)*(q/2-H)-H*H)))/(2*j)):F?(j=(z.x*z.x+z.y*z.y)/4,N=(-(B=-z.x*(V/2-H)-z.y*(q/2-H))+Math.sqrt(B*B-4*j*((V/2-H)*(V/2-H)+(q/2-H)*(q/2-H)-H*H)))/(2*j)):(j=z.x*z.x/4+z.y*z.y,N=(-(B=-z.x*(V/2-H)-2*z.y*(q-H))+Math.sqrt(B*B-4*j*((V/2-H)*(V/2-H)+(q-H)*(q-H)-H*H)))/(2*j)),N=Math.min(1,N),U=R?Math.max(0,H-Math.sqrt(Math.max(0,H*H-(H-(q-z.y*N)/2)*(H-(q-z.y*N)/2)))-O):Math.max(0,H-Math.sqrt(Math.max(0,H*H-(H-(V-z.x*N)/2)*(H-(V-z.x*N)/2)))-O),{scale:N,pad:U});M=W.scale,k=W.pad}else M=1,s&&(M=Math.min(1,x/E.x,_/E.y)),k=0;var Y=n.left*f+n.right*d,Z=(n.top+n.bottom)/2,$=(e+b)*f+(t-b)*d,X=(r+i)/2,K=0,J=0;if(h||u){var Q=(o?E.x:E.y)/2;m&&(u||p)&&(w+=k);var ee=o?eo.opacity(Q)||J>.01?W:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?W(e):e>t?Math.ceil(e):Math.floor(e)};e._context.staticPlot||(D=Y(D,U,B),U=Y(U,D,B),V=Y(V,q,!B),q=Y(q,V,!B));var Z,$,X,K,J,Q,ee,et=B?C.c2p:L.c2p;ee=u.s0>0?u._sMax:u.s0<0?u._sMin:u.s1>0?u._sMax:u._sMin;var er,ei,en=R||O?function(e,t){if(!e)return 0;var r=Math.abs(B?q-V:U-D),i=Math.abs(B?U-D:q-V),n=Y(Math.abs(et(ee,!0)-et(0,!0))),a=u.hasB?Math.min(r/2,i/2):Math.min(r/2,n);return Y(Math.max(Math.min("%"===t?Math.min(50,e)/100*r:e,a),0))}(m.cornerradiusvalue,m.cornerradiusform):0,ea="M"+D+","+V+"V"+q+"H"+U+"V"+V+"Z",eo=0;if(en&&u.s){var es,el,ec,eu=0==((es=u.s0)>0)-(es<0)||((el=u.s)>0)-(el<0)==((ec=u.s0)>0)-(ec<0)?u.s1:u.s0;if((eo=Y(u.hasB?0:Math.abs(et(ee,!0)-et(eu,!0))))0?Math.sqrt(eo*(2*en-eo)):0,eg=eh>0?Math.max:Math.min;er="M"+D+","+V+"V"+(q-ep*ed)+"H"+eg(U-(en-eo)*eh,D)+"A "+en+","+en+" 0 0 "+ef+" "+U+","+(q-en*ed-em)+"V"+(V+en*ed+em)+"A "+en+","+en+" 0 0 "+ef+" "+eg(U-(en-eo)*eh,D)+","+(V+ep*ed)+"Z"}else if(u.hasB)er="M"+(D+en*eh)+","+V+"A "+en+","+en+" 0 0 "+ef+" "+D+","+(V+en*ed)+"V"+(q-en*ed)+"A "+en+","+en+" 0 0 "+ef+" "+(D+en*eh)+","+q+"H"+(U-en*eh)+"A "+en+","+en+" 0 0 "+ef+" "+U+","+(q-en*ed)+"V"+(V+en*ed)+"A "+en+","+en+" 0 0 "+ef+" "+(U-en*eh)+","+V+"Z";else{var ey=(ei=Math.abs(q-V)+eo)0?Math.sqrt(eo*(2*en-eo)):0,ex=ed>0?Math.max:Math.min;er="M"+(D+ey*eh)+","+V+"V"+ex(q-(en-eo)*ed,V)+"A "+en+","+en+" 0 0 "+ef+" "+(D+en*eh-ev)+","+q+"H"+(U-en*eh+ev)+"A "+en+","+en+" 0 0 "+ef+" "+(U-ey*eh)+","+ex(q-(en-eo)*ed,V)+"V"+V+"Z"}}else er=ea}else er=ea;var eb=w(n.ensureSingle(M,"path"),P,g,T);if(eb.style("vector-effect",I?"none":"non-scaling-stroke").attr("d",isNaN((U-D)*(q-V))||H&&e._context.staticPlot?"M0,0Z":er).call(s.setClipUrl,t.layerClipId,e),!P.uniformtext.mode&&N){var e_=s.makePointStyleFns(d);s.singlePointStyle(u,eb,d,e_,e)}(function(e,t,r,i,o,l,u,d,m,g,_,T,M){var C,L,P,I,z,D,O,R,F,j,B,N,U,V,q,H,G,W,Y,Z,$,X,K,J,Q,ee,et=t.xaxis,er=t.yaxis,ei=e._fullLayout;function en(t,r,i){return n.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+ee,"text-anchor":"middle","data-notex":1}).call(s.font,i).call(a.convertToTspans,e)}var ea=i[0].trace,eo="h"===ea.orientation,es=function(e,t,r,i){for(var n=!1,a=!1,o=0;o0?n=!0:s<0&&(a=!0),n&&a)return 0}var l=t?r:i,c=-(l.range[0]1;g("percent initial")&&(h=n.formatPercent(f.begR),b&&(h+=" of initial"),m.push(h)),g("percent previous")&&(h=n.formatPercent(f.difR),b&&(h+=" of previous"),m.push(h)),g("percent total")&&(h=n.formatPercent(f.sumR),b&&(h+=" of total"),m.push(h))}return m.join("
")}(e_,ew,eT,eM):p.getValue(eA.text,ew),p.coerceString(y,ek));eS=ea,eE=o,eC=p.getValue(eS.textposition,eE),ee=p.coerceEnumerated(v,eC);var ec="stack"===T.mode||"relative"===T.mode,eu=i[o],eh=!ec||eu._outmost,ed=eu.hasB,ef=g&&g-_>b;if(!el||"none"===ee||(eu.isBlank||l===u||d===m)&&("auto"===ee||"inside"===ee))return r.select("text").remove();var ep=ei.font,em=f.getBarColor(i[o],ea),eg=f.getInsideTextFont(ea,o,ep,em),ey=f.getOutsideTextFont(ea,o,ep),ev=ea.insidetextanchor||"end",ex=r.datum();eo?"log"===et.type&&ex.s0<=0&&(l=et.range[0]0&&ez>0;eF=ef?ed?k(eO-2*g,eR,eI,ez,eo)||k(eO,eR-2*g,eI,ez,eo):eo?k(eO-(g-_),eR,eI,ez,eo)||k(eO,eR-2*(g-_),eI,ez,eo):k(eO,eR-(g-_),eI,ez,eo)||k(eO-2*(g-_),eR,eI,ez,eo):k(eO,eR,eI,ez,eo),ej&&eF?ee="inside":(ee="outside",eL.remove(),eL=null)}else ee="inside";if(!eL){var eB=(eL=en(r,el,eD=n.ensureUniformFontSize(e,"outside"===ee?ey:eg))).attr("transform");if(eL.attr("transform",""),eI=(eP=s.bBox(eL.node())).width,ez=eP.height,eL.attr("transform",eB),eI<=0||ez<=0)return eL.remove()}var eN,eU=ea.textangle;(eN="outside"===ee?(C=l,L=u,P=d,I=m,z=eP,R=!!(D={isHorizontal:eo,constrained:"both"===ea.constraintext||"outside"===ea.constraintext,angle:eU,zeroBarDir:es}).isHorizontal,F=!!D.constrained,j=D.angle||0,B=z.width,N=z.height,U=Math.abs(L-C),V=Math.abs(I-P),O=R?V>2*b?b:0:U>2*b?b:0,q=1,F&&(q=R?Math.min(1,V/N):Math.min(1,U/B)),W=S(z,G=A(j)),Y=(R?W.x:W.y)/2,Z=(z.left+z.right)/2,$=(z.top+z.bottom)/2,X=(C+L)/2,K=(P+I)/2,J=0,Q=0,H=(R?C===L:P===I)&&D.zeroBarDir?D.zeroBarDir:R?L0?t+=r:u<0&&(t-=r)}return t}function z(e){var t=u,i=e.b,n=I(e);return r.inbox(i-t,n-t,_+(n-t)/(n-i)-1)}var D=e[h+"a"],O=e[d+"a"];m=Math.abs(D.r2c(D.range[1])-D.r2c(D.range[0]));var R=r.getDistanceFunction(n,f,p,function(e){return(f(e)+p(e))/2});if(r.getClosest(g,R,e),!1!==e.index&&g[e.index].p!==l){x||T||(E=function(e){return Math.min(M(e),e.p-v.bargroupwidth/2)},C=function(e){return Math.max(k(e),e.p+v.bargroupwidth/2)});var F,j,B,N=g[e.index],U=y.base?N.b+N.s:N.s;e[d+"0"]=e[d+"1"]=O.c2p(N[d],!0),e[d+"LabelVal"]=U;var V=v.extents[v.extents.round(N.p)];e[h+"0"]=D.c2p(x?E(N):V[0],!0),e[h+"1"]=D.c2p(x?C(N):V[1],!0);var q=void 0!==N.orig_p;return e[h+"LabelVal"]=q?N.orig_p:N.p,e.labelLabel=s(D,e[h+"LabelVal"],y[h+"hoverformat"]),e.valueLabel=s(O,e[d+"LabelVal"],y[d+"hoverformat"]),e.baseLabel=s(O,N.b,y[d+"hoverformat"]),F=u,j=N.b,B=I(N),e.spikeDistance=(r.inbox(j-F,B-F,w+(B-F)/(B-j)-1)+L(M(N),k(N),w))/2,e[h+"Spike"]=D.c2p(N.p,!0),a(N,y,e),e.hovertemplate=y.hovertemplate,e}}function u(e,t){var r=t.mcc||e.marker.color,i=t.mlcc||e.marker.line.color,a=o(e,t);return n.opacity(r)?r:n.opacity(i)&&a?i:void 0}t.exports={hoverPoints:function(e,t,r,n,a){var o=c(e,t,r,n,a);if(o){var s=o.cd,l=s[0].trace,h=s[o.index];return o.color=u(l,h),i.getComponentMethod("errorbars","hoverInfo")(h,l,o),[o]}},hoverOnBars:c,getTraceColor:u}}}),az=p({"src/traces/bar/event_data.js"(e,t){t.exports=function(e,t,r){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),"h"===r.orientation?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}}}),aD=p({"src/traces/bar/select.js"(e,t){t.exports=function(e,t){var r,i=e.cd,n=e.xaxis,a=e.yaxis,o=i[0].trace,s="funnel"===o.type,l="h"===o.orientation,c=[];if(!1===t)for(r=0;r0?(g="v",y=x>0?Math.min(_,b):Math.min(b)):x>0?(g="h",y=Math.min(_)):y=0;if(!y){t.visible=!1;return}t._length=y;var S=n("orientation",g);t._hasPreCompStats?"v"===S&&0===x?(n("x0",0),n("dx",1)):"h"===S&&0===v&&(n("y0",0),n("dy",1)):"v"===S&&0===x?n("x0"):"h"===S&&0===v&&n("y0"),i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],a)}function u(e,t,i,n){var a=n.prefix,o=r.coerce2(e,t,l,"marker.outliercolor"),s=i("marker.line.outliercolor"),c="outliers";t._hasPreCompStats?c="all":(o||s)&&(c="suspectedoutliers");var u=i(a+"points",c);u?(i("jitter",.3*("all"===u)),i("pointpos","all"===u?-1.5:0),i("marker.symbol"),i("marker.opacity"),i("marker.size"),i("marker.angle"),i("marker.color",t.line.color),i("marker.line.color"),i("marker.line.width"),"suspectedoutliers"===u&&(i("marker.line.outliercolor",t.marker.color),i("marker.line.outlierwidth")),i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size"),i("text"),i("hovertext")):delete t.marker;var h=i("hoveron");("all"===h||-1!==h.indexOf("points"))&&(i("hovertemplate"),i("hovertemplatefallback")),r.coerceSelectionMarkerOpacity(t,i)}t.exports={supplyDefaults:function(e,t,i,o){function s(i,n){return r.coerce(e,t,l,i,n)}if(c(e,t,s,o),!1!==t.visible){a(e,t,o,s),s("xhoverformat"),s("yhoverformat");var h=t._hasPreCompStats;h&&(s("lowerfence"),s("upperfence")),s("line.color",(e.marker||{}).color||i),s("line.width"),s("fillcolor",n.addOpacity(t.line.color,.5));var d=!1;if(h){var f=s("mean"),p=s("sd");f&&f.length&&(d=!0,p&&p.length&&(d="sd"))}s("whiskerwidth");var m,g=s("sizemode");"quartiles"===g&&(m=s("boxmean",d)),s("showwhiskers","quartiles"===g),("sd"===g||"sd"===m)&&s("sdmultiple"),s("width"),s("quartilemethod");var y=!1;if(h){var v=s("notchspan");v&&v.length&&(y=!0)}else r.validate(e.notchwidth,l.notchwidth)&&(y=!0);s("notched",y)&&s("notchwidth"),u(e,t,s,{prefix:"box"}),s("zorder")}},crossTraceDefaults:function(e,t){var i,n;function a(e){return r.coerce(n._input,n,l,e)}for(var s=0;sE.uf};if(t._hasPreCompStats){var U=t[x],V=function(e){return v.d2c((t[e]||[])[l])},q=1/0,H=-1/0;for(l=0;l=E.q1&&E.q3>=E.med){var W,Y=V("lowerfence");E.lf=Y!==o&&Y<=E.q1?Y:d(E,L,P);var Z=V("upperfence");E.uf=Z!==o&&Z>=E.q3?Z:f(E,L,P);var $=V("mean");E.mean=$!==o?$:P?a.mean(L,P):(E.q1+E.q3)/2;var X=V("sd");E.sd=$!==o&&X>=0?X:P?a.stdev(L,P,E.mean):E.q3-E.q1,E.lo=p(E),E.uo=m(E);var K=V("notchspan");K=K!==o&&K>0?K:g(E,P),E.ln=E.med-K,E.un=E.med+K;var J=E.lf,Q=E.uf;t.boxpoints&&L.length&&(J=Math.min(J,L[0]),Q=Math.max(Q,L[P-1])),t.notched&&(J=Math.min(J,E.ln),Q=Math.max(Q,E.un)),E.min=J,E.max=Q}else a.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+E.q1,"median = "+E.med,"q3 = "+E.q3].join(` +`)),W=E.med!==o?E.med:E.q1!==o?E.q3!==o?(E.q1+E.q3)/2:E.q1:E.q3!==o?E.q3:0,E.med=W,E.q1=E.q3=W,E.lf=E.uf=W,E.mean=E.sd=W,E.ln=E.un=W,E.min=E.max=W;q=Math.min(q,E.min),H=Math.max(H,E.max),E.pts2=C.filter(N),A.push(E)}}t._extremes[v._id]=i.findExtremes(v,[q,H],{padded:!0})}else{var ee,et,er=v.makeCalcdata(t,x),ei=function(e,t){for(var r=e.length,i=Array(r+1),n=0;n=0&&eo0){((E={}).pos=E[_]=j[l],C=E.pts=ea[l].sort(u),P=(L=E[x]=C.map(h)).length,E.min=L[0],E.max=L[P-1],E.mean=a.mean(L,P),E.sd=a.stdev(L,P,E.mean)*t.sdmultiple,E.med=a.interp(L,.5),P%2&&(eu||eh))?(eu?(ee=L.slice(0,P/2),et=L.slice(P/2+1)):eh&&(ee=L.slice(0,P/2+1),et=L.slice(P/2)),E.q1=a.interp(ee,.5),E.q3=a.interp(et,.5)):(E.q1=a.interp(L,.25),E.q3=a.interp(L,.75)),E.lf=d(E,L,P),E.uf=f(E,L,P),E.lo=p(E),E.uo=m(E);var ed=g(E,P);E.ln=E.med-ed,E.un=E.med+ed,es=Math.min(es,E.ln),el=Math.max(el,E.un),E.pts2=C.filter(N),A.push(E)}t.notched&&a.isTypedArray(er)&&(er=Array.from(er)),t._extremes[v._id]=i.findExtremes(v,t.notched?er.concat([es,el]):er,{padded:!0})}return function(e,t){if(a.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r0?(A[0].t={num:T[S],dPos:B,posLetter:_,valLetter:x,labels:{med:s(e,"median:"),min:s(e,"min:"),q1:s(e,"q1:"),q3:s(e,"q3:"),max:s(e,"max:"),mean:"sd"===t.boxmean||"sd"===t.sizemode?s(e,"mean \xb1 σ:").replace("σ",1===t.sdmultiple?"σ":t.sdmultiple+"σ"):s(e,"mean:"),lf:s(e,"lower fence:"),uf:s(e,"upper fence:")}},T[S]++,A):[{t:{empty:!0}}]};var l={text:"tx",hovertext:"htx"};function c(e,t,r){for(var i in l)a.isArrayOrTypedArray(t[i])&&(Array.isArray(r)?a.isArrayOrTypedArray(t[i][r[0]])&&(e[l[i]]=t[i][r[0]][r[1]]):e[l[i]]=t[i][r])}function u(e,t){return e.v-t.v}function h(e){return e.v}function d(e,t,r){return 0===r?e.q1:Math.min(e.q1,t[Math.min(a.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,r-1)])}function f(e,t,r){return 0===r?e.q3:Math.max(e.q3,t[Math.max(a.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function p(e){return 4*e.q1-3*e.q3}function m(e){return 4*e.q3-3*e.q1}function g(e,t){return 0===t?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}}}),aV=p({"src/traces/box/cross_trace_calc.js"(e,t){var r=rn(),i=tv(),n=r8().getAxisGroup,a=["v","h"];function o(e,t,a,o){var s,l,c,u=t.calcdata,h=t._fullLayout,d=o._id,f=d.charAt(0),p=[],m=0;for(s=0;s1,b=1-h[e+"gap"],_=1-h[e+"groupgap"];for(s=0;s0;if("positive"===C?(D=w*(E?1:.5),R=V,O=R=M):"negative"===C?(D=R=M,O=w*(E?1:.5),F=V):(D=O=w,R=F=V),H){var G=A.pointpos,W=A.jitter,Y=A.marker.size/2,Z=0;G+W>=0&&((Z=V*(G+W))>D?(q=!0,N=Y,j=Z):Z>R&&(N=Y,j=D)),Z<=D&&(j=D);var $=0;G-W<=0&&(($=-V*(G-W))>O?(q=!0,U=Y,B=$):$>F&&(U=Y,B=O)),$<=O&&(B=O)}else j=D,B=O;var X=Array(c.length);for(l=0;le.lo&&(x.so=!0)}return a});d.enter().append("path").classed("point",!0),d.exit().remove(),d.call(n.translatePoints,o,s)}function s(e,t,n,a){var o,s,l=t.val,c=t.pos,u=!!c.rangebreaks,h=a.bPos,d=a.bPosPxOffset||0,f=n.boxmean||(n.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var p=e.selectAll("path.mean").data("box"===n.type&&n.boxmean||"violin"===n.type&&n.box.visible&&n.meanline.visible?i.identity:[]);p.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),p.exit().remove(),p.each(function(e){var t=c.c2l(e.pos+h,!0),i=c.l2p(t-o)+d,a=c.l2p(t+s)+d,p=u?(i+a)/2:c.l2p(t)+d,m=l.c2p(e.mean,!0),g=l.c2p(e.mean-e.sd,!0),y=l.c2p(e.mean+e.sd,!0);"h"===n.orientation?r.select(this).attr("d","M"+m+","+i+"V"+a+("sd"===f?"m0,0L"+g+","+p+"L"+m+","+i+"L"+y+","+p+"Z":"")):r.select(this).attr("d","M"+i+","+m+"H"+a+("sd"===f?"m0,0L"+p+","+g+"L"+i+","+m+"L"+p+","+y+"Z":""))})}t.exports={plot:function(e,t,n,l){var c=e._context.staticPlot,u=t.xaxis,h=t.yaxis;i.makeTraceGroups(l,n,"trace boxes").each(function(e){var t,i,n=r.select(this),l=e[0],d=l.t,f=l.trace;(d.wdPos=d.bdPos*f.whiskerwidth,!0!==f.visible||d.empty)?n.remove():("h"===f.orientation?(t=h,i=u):(t=u,i=h),a(n,{pos:t,val:i},f,d,c),o(n,{x:u,y:h},f,d),s(n,{pos:t,val:i},f,d))})},plotBoxAndWhiskers:a,plotPoints:o,plotBoxMean:s}}}),aH=p({"src/traces/box/style.js"(e,t){var r=T(),i=ee(),n=t7();t.exports={style:function(e,t,a){var o=a||r.select(e).selectAll("g.trace.boxes");o.style("opacity",function(e){return e[0].trace.opacity}),o.each(function(t){var a=r.select(this),o=t[0].trace,s=o.line.width;function l(e,t,r,n){e.style("stroke-width",t+"px").call(i.stroke,r).call(i.fill,n)}var c=a.selectAll("path.box");if("candlestick"===o.type)c.each(function(e){if(!e.empty){var t=r.select(this),i=o[e.dir];l(t,i.line.width,i.line.color,i.fillcolor),t.style("opacity",o.selectedpoints&&!e.selected?.3:1)}});else{l(c,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(i.stroke,o.line.color);var u=a.selectAll("path.point");n.pointStyle(u,o,e)}})},styleOnSelect:function(e,t,r){var i=t[0].trace,a=r.selectAll("path.point");i.selectedpoints?n.selectedPointStyle(a,i):n.pointStyle(a,i,e)}}}}),aG=p({"src/traces/box/hover.js"(e,t){var r=rn(),i=tv(),n=rD(),a=ee(),o=i.fillText;function s(e,t,o,s){var l,c,u,h,d,f,p,m,g,y,v,x,b,_,w=e.cd,T=e.xa,M=e.ya,k=w[0].trace,A=w[0].t,S="violin"===k.type,E=A.bdPos,C=A.wHover,L=function(e){return h.c2l(e.pos)+A.bPos-h.c2l(p)};S&&"both"!==k.side?("positive"===k.side&&(y=function(e){var t=L(e);return n.inbox(t,t+C,v)},b=E,_=0),"negative"===k.side&&(y=function(e){var t=L(e);return n.inbox(t-C,t,v)},b=0,_=E)):(y=function(e){var t=L(e);return n.inbox(t-C,t+C,v)},b=_=E),l=S?function(e){return n.inbox(e.span[0]-f,e.span[1]-f,v)}:function(e){return n.inbox(e.min-f,e.max-f,v)},"h"===k.orientation?(f=t,p=o,m=l,g=y,c="y",h=M,u="x",d=T):(f=o,p=t,m=y,g=l,c="x",h=T,u="y",d=M);var P=Math.min(1,E/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));function I(e){return(m(e)+g(e))/2}v=e.maxHoverDistance-P,x=e.maxSpikeDistance-P;var z=n.getDistanceFunction(s,m,g,I);if(n.getClosest(w,z,e),!1===e.index)return[];var D=w[e.index],O=k.line.color,R=(k.marker||{}).color;a.opacity(O)&&k.line.width?e.color=O:a.opacity(R)&&k.boxpoints?e.color=R:e.color=k.fillcolor,e[c+"0"]=h.c2p(D.pos+A.bPos-_,!0),e[c+"1"]=h.c2p(D.pos+A.bPos+b,!0),e[c+"LabelVal"]=void 0!==D.orig_p?D.orig_p:D.pos;var F=c+"Spike";e.spikeDistance=I(D)*x/v,e[F]=h.c2p(D.pos,!0);var j=k.boxmean||"sd"===k.sizemode||(k.meanline||{}).visible,B=k.boxpoints||k.points,N=B&&j?["max","uf","q3","med","mean","q1","lf","min"]:B&&!j?["max","uf","q3","med","q1","lf","min"]:!B&&j?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],U=d.range[1]0&&(a=!0);for(var l=0;la){var o=a-i[e];return i[e]=a,o}}return 0},max:function(e,t,i,n){var a=n[t];if(r(a)){if(a=Number(a),!r(i[e]))return i[e]=a,a;else if(i[e]a){var l=d(t,o,s),c=d(r,o,s),u=+(e!==i);return l[u]!==c[u]}return Math.floor(r/e)-Math.floor(t/e)>.1}(u,e,t,s,r,n))l=u;else break}return l}function h(e,t){return t&&e>l?e>a?e>1.1*i?i:e>1.1*n?n:a:e>o?o:e>s?s:l:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function d(e,t,r){var n=t.c2d(e,i,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}t.exports=function(e,t,r,n,o){var s,l,h=-1.1*t,d=-.1*t,f=e-d,p=r[0],m=r[1],g=Math.min(u(p+d,p+f,n,o),u(m+d,m+f,n,o)),y=Math.min(u(p+h,p+d,n,o),u(m+h,m+d,n,o));if(g>y&&ya){var v=s===i?1:6,x=s===i?"M12":"M1";return function(t,r){var a=n.c2d(t,i,o),s=a.indexOf("-",v);s>0&&(a=a.slice(0,s));var u=n.d2c(a,0,o);if(uo.r2l(j)&&(N=a.tickIncrement(N,_.size,!0,p)),D.start=o.l2r(N),F||i.nestedProperty(t,v+".start").set(D.start)}var U=_.end,V=o.r2l(z.end),q=void 0!==V;if((_.endFound||q)&&V!==o.r2l(U)){var H=q?V:i.aggNums(Math.max,null,m);D.end=o.l2r(H),q||i.nestedProperty(t,v+".start").set(D.end)}var G="autobin"+s;return!1===t._input[G]&&(t._input[v]=i.extendFlat({},t[v]||{}),delete t._input[G],delete t[G]),[D,m]}t.exports={calc:function(e,t){var n,p,m,g,y,v=[],x=[],b="h"===t.orientation,_=a.getFromId(e,b?t.yaxis:t.xaxis),w=b?"y":"x",T={x:"y",y:"x"}[w],M=t[w+"calendar"],k=t.cumulative,A=f(e,t,_,w),S=A[0],E=A[1],C="string"==typeof S.size,L=[],P=C?L:S,I=[],z=[],D=[],O=0,R=t.histnorm,F=t.histfunc,j=-1!==R.indexOf("density");k.enabled&&j&&(R=R.replace(/ ?density$/,""),j=!1);var B,N="max"===F||"min"===F?null:0,U=c.count,V=u[R],q=!1,H=function(e){return _.r2c(e,0,M)};for(i.isArrayOrTypedArray(t[T])&&"count"!==F&&(B=t[T],q="avg"===F,U=c[F]),p=H(S.start),g=H(S.end)+(p-a.tickIncrement(p,S.size,!1,M))/1e6;p=0&&y=0;i--)s(i);else if("increasing"===t){for(i=1;i=0;i--)e[i]+=e[i+1];"exclude"===r&&(e.push(0),e.shift())}}(x,k.direction,k.currentbin);var Q=Math.min(v.length,x.length),ee=[],et=0,er=Q-1;for(p=0;p=et;p--)if(x[p]){er=p;break}for(p=et;p<=er;p++)if(r(v[p])&&r(x[p])){var ei={p:v[p],s:x[p],b:0};k.enabled||(ei.pts=D[p],Z?ei.ph0=ei.ph1=D[p].length?E[D[p][0]]:v[p]:(t._computePh=!0,ei.ph0=n(L[p]),ei.ph1=n(L[p+1],!0))),ee.push(ei)}return 1===ee.length&&(ee[0].width1=a.tickIncrement(ee[0].p,S.size,!1,M)-ee[0].p),o(t,"marker")&&s(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),o(t,"marker.line")&&s(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),l(ee,t),i.isArrayOrTypedArray(t.selectedpoints)&&i.tagSelected(ee,t,K),ee},calcAllAutoBins:f}}}),a6=p({"src/traces/histogram2d/calc.js"(e,t){var r=tv(),i=rn(),n=a1(),a=a2(),o=a3(),s=a5(),l=a4().calcAllAutoBins;function c(e,t,r,i){var n,a=Array(e);if(i)for(n=0;nC&&k.splice(C,k.length-C),E.length>C&&E.splice(C,E.length-C);var L=[],P=[],I=[],z="string"==typeof M.size,D="string"==typeof S.size,O=[],R=[],F=z?O:M,j=D?R:S,B=0,N=[],U=[],V=t.histnorm,q=t.histfunc,H=-1!==V.indexOf("density"),G="max"===q||"min"===q?null:0,W=n.count,Y=a[V],Z=!1,$=[],X=[],K="z"in t?t.z:"marker"in t&&Array.isArray(t.marker.color)?t.marker.color:"";K&&"count"!==q&&(Z="avg"===q,W=n[q]);var J=M.size,Q=_(M.start),ee=_(M.end)+(Q-i.tickIncrement(Q,J,!1,x))/1e6;for(f=Q;f=0&&m=0&&gm&&(y=Math.max(y,Math.abs(e[a][o]-p)/(g-m))))}return y}t.exports=function(e,t){var i,a=1;for(n(e,t),i=0;i.01;i++)a=n(e,t,.5-.25*Math.min(1,.5*a));return a>.01&&r.log("interp2d didn't converge quickly",a),e}}}),oe=p({"src/traces/heatmap/find_empties.js"(e,t){var r=tv().maxRowLength;t.exports=function(e){var t,i,n,a,o,s,l,c,u=[],h={},d=[],f=e[0],p=[],m=[0,0,0],g=r(e);for(i=0;i=0;o--)(s=((h[[(i=(a=d[o])[0])-1,n=a[1]]]||m)[2]+(h[[i+1,n]]||m)[2]+(h[[i,n-1]]||m)[2]+(h[[i,n+1]]||m)[2])/20)&&(l[a]=[i,n,s],d.splice(o,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(a in l)h[a]=l[a],u.push(l[a])}return u.sort(function(e,t){return t[2]-e[2]})}}}),ot=p({"src/traces/heatmap/make_bound_array.js"(e,t){var r=eQ(),i=tv().isArrayOrTypedArray;t.exports=function(e,t,n,a,o,s){var l,c,u,h=[],d=r.traceIs(e,"contour"),f=r.traceIs(e,"histogram");if(i(t)&&t.length>1&&!f&&"category"!==s.type){var p=t.length;if(!(p<=o))return d?t.slice(0,o):t.slice(0,o+1);if(d)h=Array.from(t).slice(0,o);else if(1===o)h="log"===s.type?[.5*t[0],2*t[0]]:[t[0]-.5,t[0]+.5];else if("log"===s.type){for(h=[Math.pow(t[0],1.5)/Math.pow(t[1],.5)],u=1;u1){var t=(e[e.length-1]-e[0])/(e.length-1),r=Math.abs(t/100);for(M=0;Mr)return!1}return!0}(A.rangebreaks||S.rangebreaks)&&(T=function(e,t,r){for(var i=[],n=-1,a=0;a0;)T=M.c2p(j[C]),C--;for(T0;)E=k.c2p(B[C]),C--;E=M._length||T<=0||S>=k._length||E<=0){I.selectAll("image").data([]).exit().remove(),v(I);return}"fast"===Z?(Q=G,ee=H):(Q=X,ee=K);var J=document.createElement("canvas");J.width=Q,J.height=ee;var Q,ee,et,er,ei=J.getContext("2d",{willReadFrequently:!0}),en=h(D,{noNumericCheck:!0,returnArray:!0});"fast"===Z?(et=W?function(e){return G-1-e}:o.identity,er=Y?function(e){return H-1-e}:o.identity):(et=function(e){return o.constrain(Math.round(M.c2p(j[e])-w),0,X)},er=function(e){return o.constrain(Math.round(k.c2p(B[e])-S),0,K)});var ea,eo,es,el,ec=er(0),eu=[ec,ec],eh=+!W,ed=+!Y,ef=0,ep=0,em=0,eg=0;function ey(e,t=0){if(void 0===e)return[0,0,0,0];var r=en(e);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),ef+=t,ep+=r[0]*t,em+=r[1]*t,eg+=r[2]*t,r}if("default"!==Z){var ev,ex=0;try{ev=new Uint8Array(Q*ee*4)}catch{ev=Array(Q*ee*4)}if("smooth"===Z){var eb,e_,ew,eT=N||j,eM=U||B,ek=Array(eT.length),eA=Array(eM.length),eS=Array(X),eE=N?b:x,eC=U?b:x;for(C=0;CeW||eW>k._length))for(L=eq;Le$||e$>M._length)){var eX=l({x:eZ,y:eY},D,e._fullLayout);eX.x=eZ,eX.y=eY;var eK=z.z[C][L];void 0===eK?(eX.z="",eX.zLabel=""):(eX.z=eK,eX.zLabel=a.tickText(ej,eK,"hover").text);var eJ=z.text&&z.text[C]&&z.text[C][L];(void 0===eJ||!1===eJ)&&(eJ=""),eX.text=eJ;var eQ=o.texttemplateString({data:[eX,D._meta],fallback:D.texttemplatefallback,labels:eX,locale:e._fullLayout._d3locale,template:eR});if(eQ){var e0=eQ.split("
"),e1=e0.length,e2=0;for(P=0;P=_[0].length||f<0||f>_.length)return}else{if(r.inbox(t-x[0],t-x[x.length-1],0)>0||r.inbox(s-b[0],s-b[b.length-1],0)>0)return;if(p){for(A=[2*x[0]-x[1]],E=1;E=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),oS=p({"src/traces/contour/attributes.js"(e,t){var r=aX(),i=ix(),n=tB(),a=n.axisHoverFormat,o=n.descriptionOnlyNumbers,s=tV(),l=eH().dash,c=H(),u=q().extendFlat,h=oA(),d=h.COMPARISON_OPS2,f=h.INTERVAL_OPS,p=i.line;t.exports=u({z:r.z,x:r.x,x0:r.x0,dx:r.dx,y:r.y,y0:r.y0,dy:r.dy,xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:i.xperiod0,yperiod0:i.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,text:r.text,hovertext:r.hovertext,transpose:r.transpose,xtype:r.xtype,ytype:r.ytype,xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:r.hovertemplate,hovertemplatefallback:r.hovertemplatefallback,texttemplate:u({},r.texttemplate,{}),texttemplatefallback:r.texttemplatefallback,textfont:u({},r.textfont,{}),hoverongaps:r.hoverongaps,connectgaps:u({},r.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:c({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:o("contour label")},operation:{valType:"enumerated",values:[].concat(d).concat(f),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:u({},p.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:l,smoothing:u({},p.smoothing,{}),editType:"plot"},zorder:i.zorder},s("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),oE=p({"src/traces/histogram2dcontour/attributes.js"(e,t){var r=ob(),i=oS(),n=tV(),a=tB().axisHoverFormat,o=q().extendFlat;t.exports=o({x:r.x,y:r.y,z:r.z,marker:r.marker,histnorm:r.histnorm,histfunc:r.histfunc,nbinsx:r.nbinsx,xbins:r.xbins,nbinsy:r.nbinsy,ybins:r.ybins,autobinx:r.autobinx,autobiny:r.autobiny,bingroup:r.bingroup,xbingroup:r.xbingroup,ybingroup:r.ybingroup,autocontour:i.autocontour,ncontours:i.ncontours,contours:i.contours,line:{color:i.line.color,width:o({},i.line.width,{dflt:.5}),dash:i.line.dash,smoothing:i.line.smoothing,editType:"plot"},xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:r.hovertemplate,hovertemplatefallback:r.hovertemplatefallback,texttemplate:i.texttemplate,texttemplatefallback:i.texttemplatefallback,textfont:i.textfont},n("",{cLetter:"z",editTypeOverride:"calc"}))}}),oC=p({"src/traces/contour/contours_defaults.js"(e,t){t.exports=function(e,t,r,i){var n=i("contours.start"),a=i("contours.end"),o=r("contours.size");((!1===n||!1===a?t.autocontour=!0:r("autocontour",!1))||!o)&&r("ncontours")}}}),oL=p({"src/traces/contour/label_defaults.js"(e,t){var r=tv();t.exports=function(e,t,i,n){if(n||(n={}),e("contours.showlabels")){var a=t.font;r.coerceFont(e,"contours.labelfont",a,{overrideDflt:{color:i}}),e("contours.labelformat")}!1!==n.hasHover&&e("zhoverformat")}}}),oP=p({"src/traces/contour/style_defaults.js"(e,t){var r=tQ(),i=oL();t.exports=function(e,t,n,a,o){var s,l=n("contours.coloring"),c="";"fill"===l&&(s=n("contours.showlines")),!1!==s&&("lines"!==l&&(c=n("line.color","#000")),n("line.width",.5),n("line.dash")),"none"!==l&&(!0!==e.showlegend&&(t.showlegend=!1),t._dfltShowLegend=!1,r(e,t,a,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),i(n,a,c,o)}}}),oI=p({"src/traces/histogram2dcontour/defaults.js"(e,t){var r=tv(),i=o_(),n=oC(),a=oP(),o=aJ(),s=oE();t.exports=function(e,t,l,c){function u(i,n){return r.coerce(e,t,s,i,n)}i(e,t,u,c),!1!==t.visible&&(n(e,t,u,function(i){return r.coerce2(e,t,s,i)}),a(e,t,u,c),u("xhoverformat"),u("yhoverformat"),u("hovertemplate"),u("hovertemplatefallback"),t.contours&&"heatmap"===t.contours.coloring&&o(u,c))}}}),oz=p({"src/traces/contour/set_contours.js"(e,t){var r=rn(),i=tv();function n(e,t,i){var n={type:"linear",range:[e,t]};return r.autoTicks(n,(t-e)/(i||15)),n}t.exports=function(e,t){var a=e.contours;if(e.autocontour){var o=e.zmin,s=e.zmax;(e.zauto||void 0===o)&&(o=i.aggNums(Math.min,null,t)),(e.zauto||void 0===s)&&(s=i.aggNums(Math.max,null,t));var l=n(o,s,e.ncontours);a.size=l.dtick,a.start=r.tickFirst(l),l.range.reverse(),a.end=r.tickFirst(l),a.start===o&&(a.start+=a.size),a.end===s&&(a.end-=a.size),a.start>a.end&&(a.start=a.end=(a.start+a.end)/2),e._input.contours||(e._input.contours={}),i.extendFlat(e._input.contours,{start:a.start,end:a.end,size:a.size}),e._input.autocontour=!0}else if("constraint"!==a.type){var c=a.start,u=a.end,h=e._input.contours;c>u&&(a.start=h.start=u,u=a.end=h.end=c,c=a.start),a.size>0||(h.size=a.size=c===u?1:n(c,u,e.ncontours).dtick)}}}}),oD=p({"src/traces/contour/end_plus.js"(e,t){t.exports=function(e){return e.end+e.size/1e6}}}),oO=p({"src/traces/contour/calc.js"(e,t){var r=t3(),i=or(),n=oz(),a=oD();t.exports=function(e,t){var o=i(e,t),s=o[0].z;n(t,s);var l,c=t.contours,u=r.extractOpts(t);if("heatmap"===c.coloring&&u.auto&&!1===t.autocontour){var h=c.start,d=a(c),f=c.size||1,p=Math.floor((d-h)/f)+1;isFinite(f)||(f=1,p=1);var m=h-f/2,g=m+p*f;l=[m,g]}else l=s;return r.calc(e,t,{vals:l,cLetter:"z"}),o}}}),oR=p({"src/traces/contour/constants.js"(e,t){t.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}}}}),oF=p({"src/traces/contour/make_crossings.js"(e,t){var r=oR();t.exports=function(e){var t,i,n,a,o,s,l,c,u,h=e[0].z,d=h.length,f=h[0].length,p=2===d||2===f;for(i=0;ie?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);return 5===r||10===r?e>(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}((c=e[u]).level,s))&&(c.crossings[o]=l,-1!==n.indexOf(l)&&(c.starts.push([t,i]),p&&-1!==n.indexOf(l,n.indexOf(l)+1)&&c.starts.push([t,i])))}}}),oj=p({"src/traces/contour/find_all_paths.js"(e,t){var r=tv(),i=oR();function n(e,t,r,i){return Math.abs(e[0]-t[0])20&&u?208===c||1114===c?d=0===h[0]?1:-1:f=0===h[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(c)?f=1:-1!==i.LEFTSTART.indexOf(c)?d=1:-1!==i.TOPSTART.indexOf(c)?f=-1:d=-1,[d,f]),v=[o(e,t,[-y[0],-y[1]])],x=e.z.length,b=e.z[0].length,_=t.slice(),w=y.slice();for(p=0;p<1e4;p++){if(g>20?(g=i.CHOOSESADDLE[g][0>(y[0]||y[1])?0:1],e.crossings[m]=i.SADDLEREMAINDER[g]):delete e.crossings[m],!(y=i.NEWDELTA[g])){r.log("Found bad marching index:",g,t,e.level);break}v.push(o(e,t,y)),t[0]+=y[0],t[1]+=y[1],m=t.join(","),n(v[v.length-1],v[v.length-2],s,l)&&v.pop();var T=y[0]&&(t[0]<0||t[0]>b-2)||y[1]&&(t[1]<0||t[1]>x-2);if(t[0]===_[0]&&t[1]===_[1]&&y[0]===w[0]&&y[1]===w[1]||a&&T)break;g=e.crossings[m]}1e4===p&&r.log("Infinite loop in contour?");var M,k,A,S,E,C,L,P,I,z,D,O=n(v[0],v[v.length-1],s,l),R=0,F=.2*e.smoothing,j=[],B=0;for(p=1;p=B;p--)if((M=j[p])=B&&M+j[k]P&&I--,e.edgepaths[I]=D.concat(v,z));break}q||(e.edgepaths[P]=v.concat(z))}for(P=0;P":o(">"),"<":o("<"),"=":o("=")}}}),oN=p({"src/traces/contour/empty_pathinfo.js"(e,t){var r=tv(),i=oB(),n=oD();t.exports=function(e,t,a){for(var o="constraint"===e.type?i[e._operation](e.value):e,s=o.size,l=[],c=n(o),u=a.trace._carpetTrace,h=u?{xaxis:u.aaxis,yaxis:u.baxis,x:a.a,y:a.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:a.x,y:a.y},d=o.start;d1e3){r.warn("Too many contours, clipping at 1000",e);break}return l}}}),oU=p({"src/traces/contour/convert_to_constraints.js"(e,t){var r=tv();function i(e){return r.extendFlat({},e,{edgepaths:r.extendDeep([],e.edgepaths),paths:r.extendDeep([],e.paths),starts:r.extendDeep([],e.starts)})}t.exports=function(e,t){var n,a,o,s=function(e){return e.reverse()},l=function(e){return e};switch(t){case"=":case"<":return e;case">":for(1!==e.length&&r.warn("Contour data invalid for the specified inequality operation."),a=e[0],n=0;no.level||o.starts.length&&a===o.level)}break;case"constraint":if(i.prefixBoundary=!1,i.edgepaths.length)return;var s=i.x.length,l=i.y.length,c=-1/0,u=1/0;for(r=0;r":f>c&&(i.prefixBoundary=!0);break;case"<":(fc||i.starts.length&&d===u)&&(i.prefixBoundary=!0);break;case"][":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),hc&&(i.prefixBoundary=!0)}}}}}),oq=p({"src/traces/contour/plot.js"(e){var t=T(),r=tv(),i=t7(),n=t3(),a=tF(),o=rn(),s=rt(),l=oa(),c=oF(),u=oj(),h=oN(),d=oU(),f=oV(),p=oR(),m=p.LABELOPTIMIZER;function g(e,t){var n,a,o,s,l,c,u="",h=0,d=e.edgepaths.map(function(e,t){return t}),f=!0;function p(e){return .01>Math.abs(e[0]-t[2][0])}for(;d.length;){for(c=i.smoothopen(e.edgepaths[h],e.smoothing),u+=f?c:c.replace(/^M/,"L"),d.splice(d.indexOf(h),1),n=e.edgepaths[h][e.edgepaths[h].length-1],s=-1,o=0;o<4;o++){if(!n){r.log("Missing end?",h,e);break}for(.01>Math.abs(n[1]-t[0][1])&&!p(n)?a=t[1]:.01>Math.abs(n[0]-t[0][0])?a=t[0]:.01>Math.abs(n[1]-t[2][1])?a=t[3]:p(n)&&(a=t[2]),l=0;lMath.abs(n[0]-a[0])?.01>Math.abs(n[0]-m[0])&&(m[1]-n[1])*(a[1]-m[1])>=0&&(a=m,s=l):.01>Math.abs(n[1]-a[1])?.01>Math.abs(n[1]-m[1])&&(m[0]-n[0])*(a[0]-m[0])>=0&&(a=m,s=l):r.log("endpt to newendpt is not vert. or horz.",n,a,m)}if(n=a,s>=0)break;u+="L"+a}if(s===e.edgepaths.length){r.log("unclosed perimeter path");break}h=s,(f=-1===d.indexOf(h))&&(h=d[0],u+="Z")}for(h=0;hn.center?n.right-s:s-n.left)/(u+Math.abs(Math.sin(c)*o)),f=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(h)+Math.cos(c)*o);if(d<1||f<1)return 1/0;var p=m.EDGECOST*(1/(d-1)+1/(f-1));p+=m.ANGLECOST*c*c;for(var g=s-u,y=l-h,v=s+u,x=l+h,b=0;b2*m.MAXCOST)break;f&&(s/=2),l=(o=c-s/2)+1.5*s}if(d<=m.MAXCOST)return u},e.addLabelData=function(e,t,r,i){var n=t.fontSize,a=t.width+n/3,o=Math.max(0,t.height-n/3),s=e.x,l=e.y,c=e.theta,u=Math.sin(c),h=Math.cos(c),d=function(e,t){return[s+e*h-t*u,l+e*u+t*h]},f=[d(-a/2,-o/2),d(-a/2,o/2),d(a/2,o/2),d(a/2,-o/2)];r.push({text:t.text,x:s,y:l,dy:t.dy,theta:c,level:t.level,width:a,height:o}),i.push(f)},e.drawLabels=function(e,i,n,o,s){var l=e.selectAll("text").data(i,function(e){return e.text+","+e.x+","+e.y+","+e.theta});if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(e){var r=e.x+Math.sin(e.theta)*e.dy,i=e.y-Math.cos(e.theta)*e.dy;t.select(this).text(e.text).attr({x:r,y:i,transform:"rotate("+180*e.theta/Math.PI+" "+r+" "+i+")"}).call(a.convertToTspans,n)}),s){for(var c="",u=0;u=v)&&(a<=y&&(a=y),o>=v&&(o=v),l=Math.floor((o-a)/s)+1,c=0),d=0;dy&&(m.unshift(y),g.unshift(g[0])),m[m.length-1]2?p.value=p.value.slice(2):0===p.length?p.value=[0,1]:p.length<2?(m=parseFloat(p.value[0]),p.value=[m,m+1]):p.value=[parseFloat(p.value[0]),parseFloat(p.value[1])]:r(p.value)&&(m=parseFloat(p.value),p.value=[m,m+1])):(f("contours.value",0),r(p.value)||(l(p.value)?p.value=parseFloat(p.value[0]):p.value=0)),"="===b?g=x.showlines=!0:(g=n("contours.showlines"),v=n("fillcolor",a((e.line||{}).color||h,.5))),g&&(y=n("line.color",v&&o(v)?a(t.fillcolor,1):h),n("line.width",2),n("line.dash")),n("line.smoothing"),i(n,s,y,d)}}}),oK=p({"src/traces/contour/defaults.js"(e,t){var r=tv(),i=aK(),n=iU(),a=oX(),o=oC(),s=oP(),l=aJ(),c=oS();t.exports=function(e,t,u,h){function d(i,n){return r.coerce(e,t,c,i,n)}if(!i(e,t,d,h)){t.visible=!1;return}n(e,t,h,d),d("xhoverformat"),d("yhoverformat"),d("text"),d("hovertext"),d("hoverongaps"),d("hovertemplate"),d("hovertemplatefallback");var f="constraint"===d("contours.type");d("connectgaps",r.isArray1D(t.z)),f?a(e,t,d,h,u):(o(e,t,d,function(i){return r.coerce2(e,t,c,i)}),s(e,t,d,h)),t.contours&&"heatmap"===t.contours.coloring&&l(d,h),d("zorder")}}}),oJ=p({"src/traces/contour/index.js"(e,t){t.exports={attributes:oS(),supplyDefaults:oK(),calc:oO(),plot:oq().plot,style:oG(),colorbar:oW(),hoverPoints:oY(),moduleType:"trace",name:"contour",basePlotModule:np(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),oQ=p({"lib/contour.js"(e,t){t.exports=oJ()}}),o0=p({"src/traces/scatterternary/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:i,templatefallbackAttrs:n}=eW(),a=iv(),o=ix(),s=Z(),l=tV(),c=eH().dash,u=q().extendFlat,h=o.marker,d=o.line,f=h.line;t.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:u({},o.mode,{dflt:"markers"}),text:u({},o.text,{}),texttemplate:i({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:n({editType:"plot"}),hovertext:u({},o.hovertext,{}),line:{color:d.color,width:d.width,dash:c,backoff:d.backoff,shape:u({},d.shape,{values:["linear","spline"]}),smoothing:d.smoothing,editType:"calc"},connectgaps:o.connectgaps,cliponaxis:o.cliponaxis,fill:u({},o.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:a(),marker:u({symbol:h.symbol,opacity:h.opacity,angle:h.angle,angleref:h.angleref,standoff:h.standoff,maxdisplayed:h.maxdisplayed,size:h.size,sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,line:u({width:f.width,dash:f.dash,editType:"calc"},l("marker.line")),gradient:h.gradient,editType:"calc"},l("marker")),textfont:o.textfont,textposition:o.textposition,selected:o.selected,unselected:o.unselected,hoverinfo:u({},s.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:o.hoveron,hovertemplate:r(),hovertemplatefallback:n()}}}),o1=p({"src/traces/scatterternary/defaults.js"(e,t){var r=tv(),i=iy(),n=t5(),a=iq(),o=iH(),s=iG(),l=iW(),c=iY(),u=o0();t.exports=function(e,t,h,d){function f(i,n){return r.coerce(e,t,u,i,n)}var p,m=f("a"),g=f("b"),y=f("c");if(m?(p=m.length,g?(p=Math.min(p,g.length),y&&(p=Math.min(p,y.length))):p=y?Math.min(p,y.length):0):g&&y&&(p=Math.min(g.length,y.length)),!p){t.visible=!1;return}t._length=p,f("sum"),f("text"),f("hovertext"),"fills"!==t.hoveron&&(f("hovertemplate"),f("hovertemplatefallback")),f("mode",p"),o.hovertemplate=d.hovertemplate,a}function x(e,t){y.push(e._hovertitle+": "+t)}}}}),o6=p({"src/traces/scatterternary/event_data.js"(e,t){t.exports=function(e,t,r,i,n){if(t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),i[n]){var a=i[n];e.a=a.a,e.b=a.b,e.c=a.c}else e.a=t.a,e.b=t.b,e.c=t.c;return e}}}),o8=p({"src/plots/ternary/ternary.js"(e,t){var r=T(),i=eQ(),n=tv(),a=n.strTranslate,o=n._,s=ee(),l=t7(),c=rt(),u=q().extendFlat,h=tD(),d=rn(),f=rd(),p=rD(),m=rO(),g=m.freeMode,y=m.rectMode,v=re(),x=iM().prepSelect,b=iM().selectOnClick,_=iM().clearOutline,w=iM().clearSelectionsCache,M=tE();function k(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}t.exports=k;var A=k.prototype;A.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}},A.plot=function(e,t){var r=t[this.id],i=t._size;this._hasClipOnAxisFalse=!1;for(var n=0;nS*b?n=(o=b)*S:o=(n=x)/S,h=y*n/x,d=v*o/b,r=t.l+t.w*m-n/2,i=t.t+t.h*(1-g)-o/2,f.x0=r,f.y0=i,f.w=n,f.h=o,f.sum=_,f.xaxis={type:"linear",range:[w+2*M-_,_-w-2*T],domain:[m-h/2,m+h/2],_id:"x"},c(f.xaxis,f.graphDiv._fullLayout),f.xaxis.setScale(),f.xaxis.isPtWithinRange=function(e){return e.a>=f.aaxis.range[0]&&e.a<=f.aaxis.range[1]&&e.b>=f.baxis.range[1]&&e.b<=f.baxis.range[0]&&e.c>=f.caxis.range[1]&&e.c<=f.caxis.range[0]},f.yaxis={type:"linear",range:[w,_-T-M],domain:[g-d/2,g+d/2],_id:"y"},c(f.yaxis,f.graphDiv._fullLayout),f.yaxis.setScale(),f.yaxis.isPtWithinRange=function(){return!0};var k=f.yaxis.domain[0],A=f.aaxis=u({},e.aaxis,{range:[w,_-T-M],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[k,k+d*S],anchor:"free",position:0,_id:"y",_length:n});c(A,f.graphDiv._fullLayout),A.setScale();var E=f.baxis=u({},e.baxis,{range:[_-w-M,T],side:"bottom",domain:f.xaxis.domain,anchor:"free",position:0,_id:"x",_length:n});c(E,f.graphDiv._fullLayout),E.setScale();var C=f.caxis=u({},e.caxis,{range:[_-w-T,M],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[k,k+d*S],anchor:"free",position:0,_id:"y",_length:n});c(C,f.graphDiv._fullLayout),C.setScale();var L="M"+r+","+(i+o)+"h"+n+"l-"+n/2+",-"+o+"Z";f.clipDef.select("path").attr("d",L),f.layers.plotbg.select("path").attr("d",L);var P="M0,"+o+"h"+n+"l-"+n/2+",-"+o+"Z";f.clipDefRelative.select("path").attr("d",P);var I=a(r,i);f.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",I),f.clipDefRelative.select("path").attr("transform",null);var z=a(r-E._offset,i+o);f.layers.baxis.attr("transform",z),f.layers.bgrid.attr("transform",z);var D=a(r+n/2,i)+"rotate(30)"+a(0,-A._offset);f.layers.aaxis.attr("transform",D),f.layers.agrid.attr("transform",D);var O=a(r+n/2,i)+"rotate(-30)"+a(0,-C._offset);f.layers.caxis.attr("transform",O),f.layers.cgrid.attr("transform",O),f.drawAxes(!0),f.layers.aline.select("path").attr("d",A.showline?"M"+r+","+(i+o)+"l"+n/2+",-"+o:"M0,0").call(s.stroke,A.linecolor||"#000").style("stroke-width",(A.linewidth||0)+"px"),f.layers.bline.select("path").attr("d",E.showline?"M"+r+","+(i+o)+"h"+n:"M0,0").call(s.stroke,E.linecolor||"#000").style("stroke-width",(E.linewidth||0)+"px"),f.layers.cline.select("path").attr("d",C.showline?"M"+(r+n/2)+","+i+"l"+n/2+","+o:"M0,0").call(s.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),f.graphDiv._context.staticPlot||f.initInteractions(),l.setClipUrl(f.layers.frontplot,f._hasClipOnAxisFalse?null:f.clipId,f.graphDiv)},A.drawAxes=function(e){var t=this.graphDiv,r=this.id.slice(7)+"title",i=this.layers,n=this.aaxis,a=this.baxis,s=this.caxis;if(this.drawAx(n),this.drawAx(a),this.drawAx(s),e){var l=Math.max(n.showticklabels?n.tickfont.size/2:0,(s.showticklabels?.75*s.tickfont.size:0)+("outside"===s.ticks?.87*s.ticklen:0)),c=(a.showticklabels?a.tickfont.size:0)+("outside"===a.ticks?a.ticklen:0)+3;i["a-title"]=v.draw(t,"a"+r,{propContainer:n,propName:this.id+".aaxis.title.text",placeholder:o(t,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-n.title.font.size/3-l,"text-anchor":"middle"}}),i["b-title"]=v.draw(t,"b"+r,{propContainer:a,propName:this.id+".baxis.title.text",placeholder:o(t,"Click to enter Component B title"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*a.title.font.size+c,"text-anchor":"middle"}}),i["c-title"]=v.draw(t,"c"+r,{propContainer:s,propName:this.id+".caxis.title.text",placeholder:o(t,"Click to enter Component C title"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*s.title.font.size+c,"text-anchor":"middle"}})}},A.drawAx=function(e){var t,r=this.graphDiv,i=e._name,a=i.charAt(0),o=e._id,s=this.layers[i],l=a+"tickLayout",c=(t=e).ticks+String(t.ticklen)+String(t.showticklabels);this[l]!==c&&(s.selectAll("."+o+"tick").remove(),this[l]=c),e.setScale();var u=d.calcTicks(e),h=d.clipEnds(e,u),f=d.makeTransTickFn(e),p=d.getTickSigns(e)[2],m=n.deg2rad(30),g=p*(e.linewidth||1)/2,y=p*e.ticklen,v=this.w,x=this.h,b="b"===a?"M0,"+g+"l"+Math.sin(m)*y+","+Math.cos(m)*y:"M"+g+",0l"+Math.cos(m)*y+","+-Math.sin(m)*y,_={a:"M0,0l"+x+",-"+v/2,b:"M0,0l-"+v/2+",-"+x,c:"M0,0l-"+x+","+v/2}[a];d.drawTicks(r,e,{vals:"inside"===e.ticks?h:u,layer:s,path:b,transFn:f,crisp:!1}),d.drawGrid(r,e,{vals:h,layer:this.layers[a+"grid"],path:_,transFn:f,crisp:!1}),d.drawLabels(r,e,{vals:u,layer:s,transFn:f,labelFns:d.makeLabelFns(e,0,30)})};var E=M.MINZOOM/2+.87,C="m-0.87,.5h"+E+"v3h-"+(E+5.2)+"l"+(E/2+2.6)+",-"+(.87*E+4.5)+"l2.6,1.5l-"+E/2+","+.87*E+"Z",L="m0.87,.5h-"+E+"v3h"+(E+5.2)+"l-"+(E/2+2.6)+",-"+(.87*E+4.5)+"l-2.6,1.5l"+E/2+","+.87*E+"Z",P="m0,1l"+E/2+","+.87*E+"l2.6,-1.5l-"+(E/2+2.6)+",-"+(.87*E+4.5)+"l-"+(E/2+2.6)+","+(.87*E+4.5)+"l2.6,1.5l"+E/2+",-"+.87*E+"Z",I=!0;function z(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}A.clearOutline=function(){w(this.dragOptions),_(this.dragOptions.gd)},A.initInteractions=function(){var e,t,r,c,u,h,d,m,v,_,w,T,k=this,A=k.layers.plotbg.select("path").node(),E=k.graphDiv,D=E._fullLayout._zoomlayer;function O(e){var t={};return t[k.id+".aaxis.min"]=e.a,t[k.id+".baxis.min"]=e.b,t[k.id+".caxis.min"]=e.c,t}function R(e,t){var r=E._fullLayout.clickmode;z(E),2===e&&(E.emit("plotly_doubleclick",null),i.call("_guiRelayout",E,O({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===e&&b(t,E,[k.xaxis],[k.yaxis],k.id,k.dragOptions),r.indexOf("event")>-1&&p.click(E,t,k.id)}this.dragOptions={element:A,gd:E,plotinfo:{id:k.id,domain:E._fullLayout[k.id].domain,xaxis:k.xaxis,yaxis:k.yaxis},subplot:k.id,prepFn:function(i,o,l){k.dragOptions.xaxes=[k.xaxis],k.dragOptions.yaxes=[k.yaxis],w=E._fullLayout._invScaleX,T=E._fullLayout._invScaleY;var f,p,b,M,S,C=k.dragOptions.dragmode=E._fullLayout.dragmode;g(C)?k.dragOptions.minDrag=1:k.dragOptions.minDrag=void 0,"zoom"===C?(k.dragOptions.moveFn=B,k.dragOptions.clickFn=R,k.dragOptions.doneFn=N,f=o,p=l,e=f-(b=A.getBoundingClientRect()).left,t=p-b.top,E._fullLayout._calcInverseTransform(E),M=E._fullLayout._invTransform,e=(S=n.apply3DTransform(M)(e,t))[0],t=S[1],u=r={a:k.aaxis.range[0],b:k.baxis.range[1],c:k.caxis.range[1]},c=k.aaxis.range[1]-r.a,h=s.luminosity(k.graphDiv._fullLayout[k.id].bgcolor),d="M0,"+k.h+"L"+k.w/2+", 0L"+k.w+","+k.h+"Z",m=!1,v=D.append("path").attr("class","zoombox").attr("transform",a(k.x0,k.y0)).style({fill:h>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",d),_=D.append("path").attr("class","zoombox-corners").attr("transform",a(k.x0,k.y0)).style({fill:s.background,stroke:s.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),k.clearOutline(E)):"pan"===C?(k.dragOptions.moveFn=U,k.dragOptions.clickFn=R,k.dragOptions.doneFn=V,u=r={a:k.aaxis.range[0],b:k.baxis.range[1],c:k.caxis.range[1]},k.clearOutline(E)):(y(C)||g(C))&&x(i,o,l,k.dragOptions,C)}};function F(e,t){return 1-(e+(k.h-t)/Math.sqrt(3))/k.w}function j(e,t){return(e-(k.h-t)/Math.sqrt(3))/k.w}function B(i,n){var a=e+i*w,o=t+n*T,s=Math.max(0,Math.min(1,1-t/k.h,1-o/k.h)),l=Math.max(0,Math.min(1,F(e,t),F(a,o))),f=Math.max(0,Math.min(1,j(e,t),j(a,o))),p=(s/2+f)*k.w,g=(1-s/2-l)*k.w,y=(p+g)/2,x=g-p,b=(1-s)*k.h,A=b-x/S;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),_.transition().style("opacity",1).duration(200),m=!0),E.emit("plotly_relayouting",O(u))}function N(){z(E),u!==r&&(i.call("_guiRelayout",E,O(u)),I&&E.data&&E._context.showTips&&(n.notifier(o(E,"Double-click to zoom back out"),"long",E),I=!1))}function U(e,t){var i=e/k.xaxis._m,o=t/k.yaxis._m,s=[(u={a:r.a-o,b:r.b+(i+o)/2,c:r.c-(i-o)/2}).a,u.b,u.c].sort(n.sorterAsc),c={a:s.indexOf(u.a),b:s.indexOf(u.b),c:s.indexOf(u.c)};s[0]<0&&(s[1]+s[0]/2<0?(s[2]+=s[0]+s[1],s[0]=s[1]=0):(s[2]+=s[0]/2,s[1]+=s[0]/2,s[0]=0),u={a:s[c.a],b:s[c.b],c:s[c.c]},t=(r.a-u.a)*k.yaxis._m,e=(r.c-u.c-r.b+u.b)*k.xaxis._m);var h=a(k.x0+e,k.y0+t);k.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",h);var d=a(-e,-t);k.clipDefRelative.select("path").attr("transform",d),k.aaxis.range=[u.a,k.sum-u.b-u.c],k.baxis.range=[k.sum-u.a-u.c,u.b],k.caxis.range=[k.sum-u.a-u.b,u.c],k.drawAxes(!1),k._hasClipOnAxisFalse&&k.plotContainer.select(".scatterlayer").selectAll(".trace").call(l.hideOutsideRangePoints,k),E.emit("plotly_relayouting",O(u))}function V(){i.call("_guiRelayout",E,O(u))}A.onmousemove=function(e){p.hover(E,e,k.id),E._fullLayout._lasthover=A,E._fullLayout._hoversubplot=k.id},A.onmouseout=function(e){E._dragging||f.unhover(E,e)},f.init(this.dragOptions)}}}),o9=p({"src/plots/ternary/layout_attributes.js"(e,t){var r=Q(),i=at().attributes,n=tN(),a=eq().overrideAll,o=q().extendFlat,s={title:{text:n.title.text,font:n.title.font},color:n.color,tickmode:n.minor.tickmode,nticks:o({},n.nticks,{dflt:6,min:1}),tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:n.ticks,ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,showtickprefix:n.showtickprefix,tickprefix:n.tickprefix,showticksuffix:n.showticksuffix,ticksuffix:n.ticksuffix,showexponent:n.showexponent,exponentformat:n.exponentformat,minexponent:n.minexponent,separatethousands:n.separatethousands,tickfont:n.tickfont,tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,hoverformat:n.hoverformat,showline:o({},n.showline,{dflt:!0}),linecolor:n.linecolor,linewidth:n.linewidth,showgrid:o({},n.showgrid,{dflt:!0}),gridcolor:n.gridcolor,gridwidth:n.gridwidth,griddash:n.griddash,layer:n.layer,min:{valType:"number",dflt:0,min:0}},l=t.exports=a({domain:i({name:"ternary"}),bgcolor:{valType:"color",dflt:r.background},sum:{valType:"number",dflt:1,min:0},aaxis:s,baxis:s,caxis:s},"plot","from-root");l.uirevision={valType:"any",editType:"none"},l.aaxis.uirevision=l.baxis.uirevision=l.caxis.uirevision={valType:"any",editType:"none"}}}),o7=p({"src/plots/subplot_defaults.js"(e,t){var r=tv(),i=tS(),n=at().defaults;t.exports=function(e,t,a,o){var s,l,c=o.type,u=o.attributes,h=o.handleDefaults,d=o.partition||"x",f=t._subplots[c],p=f.length,m=p&&f[0].replace(/\d+$/,"");function g(e,t){return r.coerce(s,l,u,e,t)}for(var y=0;y=m&&(b.min=0,_.min=0,w.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}t.exports=function(e,t,r){a(e,t,r,{type:"ternary",attributes:h,handleDefaults:f,font:t.font,paper_bgcolor:t.paper_bgcolor})}}}),st=p({"src/plots/ternary/index.js"(e){var t=o8(),r=tI().getSubplotCalcData,i=tv().counterRegex,n="ternary";e.name=n;var a=e.attr="subplot";e.idRoot=n,e.idRegex=e.attrRegex=i(n),(e.attributes={})[a]={valType:"subplotid",dflt:"ternary",editType:"calc"},e.layoutAttributes=o9(),e.supplyLayoutDefaults=se(),e.plot=function(e){for(var i=e._fullLayout,a=e.calcdata,o=i._subplots[n],s=0;s0){var b,_,w,T,M,k=e.xa,A=e.ya;"h"===p.orientation?(M=t,b="y",w=A,_="x",T=k):(M=s,b="x",w=k,_="y",T=A);var S=f[e.index];if(M>=S.span[0]&&M<=S.span[1]){var E=i.extendFlat({},e),C=T.c2p(M,!0),L=o.getKdeValue(S,p,M),P=o.getPositionOnKdePath(S,p,C),I=w._offset,z=w._length;E[b+"0"]=P[0],E[b+"1"]=P[1],E[_+"0"]=E[_+"1"]=C,E[_+"Label"]=_+": "+n.hoverLabelText(T,M,p[_+"hoverformat"])+", "+f[0].t.labels.kde+" "+L.toFixed(3);for(var D=0,O=0;O path").each(function(e){if(!e.isBlank){var t=s.marker;r.select(this).call(n.fill,e.mc||t.color).call(n.stroke,e.mlc||t.line.color).call(i.dashLine,t.line.dash,e.mlw||t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}}),l(o,s,e),o.selectAll(".regions").each(function(){r.select(this).selectAll("path").style("stroke-width",0).call(n.fill,s.connector.fillcolor)}),o.selectAll(".lines").each(function(){var e=s.connector.line;i.lineGroupStyle(r.select(this).selectAll("path"),e.width,e.color,e.dash)})})}}}}),sA=p({"src/traces/funnel/hover.js"(e,t){var r=ee().opacity,i=aI().hoverOnBars,n=tv().formatPercent;t.exports=function(e,t,a,o,s){var l=i(e,t,a,o,s);if(l){var c,u,h,d,f,p,m=l.cd,g=m[0].trace,y="h"===g.orientation,v=m[l.index];l[(y?"x":"y")+"LabelVal"]=v.s,l.percentInitial=v.begR,l.percentInitialLabel=n(v.begR,1),l.percentPrevious=v.difR,l.percentPreviousLabel=n(v.difR,1),l.percentTotal=v.sumR,l.percentTotalLabel=n(v.sumR,1);var x=v.hi||g.hoverinfo,b=[];if(x&&"none"!==x&&"skip"!==x){var _="all"===x,w=x.split("+"),T=function(e){return _||-1!==w.indexOf(e)};T("percent initial")&&b.push(l.percentInitialLabel+" of initial"),T("percent previous")&&b.push(l.percentPreviousLabel+" of previous"),T("percent total")&&b.push(l.percentTotalLabel+" of total")}return l.extraText=b.join("
"),c=g,u=v,h=c.marker,d=u.mc||h.color,f=u.mlc||h.line.color,p=u.mlw||h.line.width,l.color=r(d)?d:r(f)&&p?f:void 0,[l]}}}}),sS=p({"src/traces/funnel/event_data.js"(e,t){t.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"percentInitial"in t&&(e.percentInitial=t.percentInitial),"percentPrevious"in t&&(e.percentPrevious=t.percentPrevious),"percentTotal"in t&&(e.percentTotal=t.percentTotal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}}}),sE=p({"src/traces/funnel/index.js"(e,t){t.exports={attributes:sy(),layoutAttributes:sv(),supplyDefaults:sx().supplyDefaults,crossTraceDefaults:sx().crossTraceDefaults,supplyLayoutDefaults:sb(),calc:sw(),crossTraceCalc:sT(),plot:sM(),style:sk().style,hoverPoints:sA(),eventData:sS(),selectPoints:aD(),moduleType:"trace",name:"funnel",basePlotModule:np(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),sC=p({"lib/funnel.js"(e,t){t.exports=sE()}}),sL=p({"src/traces/waterfall/constants.js"(e,t){t.exports={eventDataKeys:["initial","delta","final"]}}}),sP=p({"src/traces/waterfall/attributes.js"(e,t){var r=a_(),i=ix().line,n=Z(),a=tB().axisHoverFormat,{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:l}=eW(),c=sL(),u=q().extendFlat,h=ee();function d(e){return{marker:{color:u({},r.marker.color,{arrayOk:!1,editType:"style"}),line:{color:u({},r.marker.line.color,{arrayOk:!1,editType:"style"}),width:u({},r.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}t.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:r.x,x0:r.x0,dx:r.dx,y:r.y,y0:r.y0,dy:r.dy,xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:r.xperiod0,yperiod0:r.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,xhoverformat:a("x"),yhoverformat:a("y"),hovertext:r.hovertext,hovertemplate:o({},{keys:c.eventDataKeys}),hovertemplatefallback:l(),hoverinfo:u({},n.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:s({editType:"plot"},{keys:c.eventDataKeys.concat(["label"])}),texttemplatefallback:l({editType:"plot"}),text:r.text,textposition:r.textposition,insidetextanchor:r.insidetextanchor,textangle:r.textangle,textfont:r.textfont,insidetextfont:r.insidetextfont,outsidetextfont:r.outsidetextfont,constraintext:r.constraintext,cliponaxis:r.cliponaxis,orientation:r.orientation,offset:r.offset,width:r.width,increasing:d("increasing"),decreasing:d("decreasing"),totals:d("intermediate sums and total"),connector:{line:{color:u({},i.color,{dflt:h.defaultLine}),width:u({},i.width,{editType:"plot"}),dash:i.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:r.offsetgroup,alignmentgroup:r.alignmentgroup,zorder:r.zorder}}}),sI=p({"src/traces/waterfall/layout_attributes.js"(e,t){t.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"}}}}),sz=p({"src/constants/delta.js"(e,t){t.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}}}),sD=p({"src/traces/waterfall/defaults.js"(e,t){var r=tv(),i=i$(),n=aM().handleText,a=iN(),o=iU(),s=sP(),l=ee(),c=sz(),u=c.INCREASING.COLOR,h=c.DECREASING.COLOR;function d(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",l.defaultLine),e(t+".marker.line.width")}t.exports={supplyDefaults:function(e,t,i,l){function c(i,n){return r.coerce(e,t,s,i,n)}if(!a(e,t,l,c)){t.visible=!1;return}o(e,t,l,c),c("xhoverformat"),c("yhoverformat"),c("measure"),c("orientation",t.x&&!t.y?"h":"v"),c("base"),c("offset"),c("width"),c("text"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback");var f=c("textposition");n(e,t,l,c,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),"none"!==t.textposition&&(c("texttemplate"),c("texttemplatefallback"),t.texttemplate||c("textinfo")),d(c,"increasing",u),d(c,"decreasing",h),d(c,"totals","#4499FF"),c("connector.visible")&&(c("connector.mode"),c("connector.line.width")&&(c("connector.line.color"),c("connector.line.dash"))),c("zorder")},crossTraceDefaults:function(e,t){var n;function a(e){return r.coerce(n._input,n,s,e)}if("group"===t.waterfallmode)for(var o=0;o0&&(l?M+="M"+w[0]+","+T[1]+"V"+T[0]:M+="M"+w[1]+","+T[0]+"H"+w[0]),"between"!==c&&(e.isSum||t path").each(function(e){if(!e.isBlank){var t=s[e.dir].marker;r.select(this).call(n.fill,t.color).call(n.stroke,t.line.color).call(i.dashLine,t.line.dash,t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}}),l(o,s,e),o.selectAll(".lines").each(function(){var e=s.connector.line;i.lineGroupStyle(r.select(this).selectAll("path"),e.width,e.color,e.dash)})})}}}}),sN=p({"src/traces/waterfall/hover.js"(e,t){var r=rn().hoverLabelText,i=ee().opacity,n=aI().hoverOnBars,a=sz(),o={increasing:a.INCREASING.SYMBOL,decreasing:a.DECREASING.SYMBOL};t.exports=function(e,t,a,s,l){var c=n(e,t,a,s,l);if(c){var u,h,d,f,p=c.cd,m=p[0].trace,g="h"===m.orientation,y=g?"x":"y",v=g?e.xa:e.ya,x=p[c.index],b=x.isSum?x.b+x.s:x.rawS;c.initial=x.b+x.s-b,c.delta=b,c.final=c.initial+c.delta;var _=S(Math.abs(c.delta));c.deltaLabel=b<0?"("+_+")":_,c.finalLabel=S(c.final),c.initialLabel=S(c.initial);var w=x.hi||m.hoverinfo,T=[];if(w&&"none"!==w&&"skip"!==w){var M="all"===w,k=w.split("+"),A=function(e){return M||-1!==k.indexOf(e)};x.isSum||(!A("final")||A(g?"x":"y")||T.push(c.finalLabel),A("delta")&&(b<0?T.push(c.deltaLabel+" "+o.decreasing):T.push(c.deltaLabel+" "+o.increasing)),A("initial")&&T.push("Initial: "+c.initialLabel))}return T.length&&(c.extraText=T.join("
")),h=(u=m[x.dir].marker).color,d=u.line.color,f=u.line.width,c.color=i(h)?h:i(d)&&f?d:void 0,[c]}function S(e){return r(v,e,m[y+"hoverformat"])}}}}),sU=p({"src/traces/waterfall/event_data.js"(e,t){t.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"initial"in t&&(e.initial=t.initial),"delta"in t&&(e.delta=t.delta),"final"in t&&(e.final=t.final),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}}}),sV=p({"src/traces/waterfall/index.js"(e,t){t.exports={attributes:sP(),layoutAttributes:sI(),supplyDefaults:sD().supplyDefaults,crossTraceDefaults:sD().crossTraceDefaults,supplyLayoutDefaults:sO(),calc:sR(),crossTraceCalc:sF(),plot:sj(),style:sB().style,hoverPoints:sN(),eventData:sU(),selectPoints:aD(),moduleType:"trace",name:"waterfall",basePlotModule:np(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),sq=p({"lib/waterfall.js"(e,t){t.exports=sV()}}),sH=p({"src/traces/image/constants.js"(e,t){t.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.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(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xb0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xb0","%","%",""]}}}}}),sG={};m(sG,{default:()=>s0});var sW,sY,sZ,s$,sX,sK,sJ,sQ,s0,s1=f({"src/traces/image/attributes.ts"(){for(let e of(sW=y(q()),sY=y(Z()),sZ=y(eW()),s$=y(ix()),sX=y(sH()),sJ=[],sQ=[],sK=["rgb","rgba","rgba256","hsl","hsla"])){let t=sX.colormodel[e];sJ.push(`For the \`${e}\` colormodel, it is [${(t.zminDflt||t.min).join(", ")}].`),sQ.push(`For the \`${e}\` colormodel, it is [${(t.zmaxDflt||t.max).join(", ")}].`)}s0={source:{valType:"string",editType:"calc",description:'Specifies the data URI of the image to be visualized. The URI consists of "data:image/[][;base64\\\\],"'},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."},colormodel:{valType:"enumerated",values:sK,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`."},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."},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.",sJ.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.",sQ.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"},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."},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,sW.extendFlat)({},sY.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,sZ.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,sZ.templatefallbackAttrs)(),zorder:s$.zorder}}}),s2=p({"src/traces/image/defaults.js"(e,t){var r=tv(),i=(s1(),v(sG)).default,n=sH(),a=iP().IMAGE_URL_PREFIX;t.exports=function(e,t){function o(n,a){return r.coerce(e,t,i,n,a)}o("source"),t.source&&!t.source.match(a)&&delete t.source,t._hasSource=!!t.source;var s,l=o("z");if(t._hasZ=!(void 0===l||!l.length||!l[0]||!l[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}o("x0"),o("y0"),o("dx"),o("dy"),t._hasZ?(o("colormodel","rgb"),o("zmin",(s=n.colormodel[t.colormodel]).zminDflt||s.min),o("zmax",s.zmaxDflt||s.max)):t._hasSource&&(t.colormodel="rgba256",s=n.colormodel[t.colormodel],t.zmin=s.zminDflt,t.zmax=s.zmaxDflt),o("zsmooth"),o("text"),o("hovertext"),o("hovertemplate"),o("hovertemplatefallback"),t._length=null,o("zorder")}}}),s3=p({"node_modules/inherits/inherits_browser.js"(e,t){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}}}),s5=p({"node_modules/readable-stream/lib/internal/streams/stream-browser.js"(e,t){t.exports=tw().EventEmitter}}),s4=p({"node_modules/base64-js/index.js"(e){e.byteLength=function(e){var t=s(e),r=t[0],i=t[1];return(r+i)*3/4-i},e.toByteArray=function(e){var t,r,i=s(e),o=i[0],l=i[1],c=new a((o+l)*3/4-l),u=0,h=l>0?o-4:o;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},e.fromByteArray=function(e){for(var t,r=e.length,n=r%3,a=[],o=0,s=r-n;o>18&63]+i[n>>12&63]+i[n>>6&63]+i[63&n]);return a.join("")}(e,o,o+16383>s?s:o+16383));return 1===n?a.push(i[(t=e[r-1])>>2]+i[t<<4&63]+"=="):2===n&&a.push(i[(t=(e[r-2]<<8)+e[r-1])>>10]+i[t>>4&63]+i[t<<2&63]+"="),a.join("")};var t,r,i=[],n=[],a="u">typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(t=0,r=o.length;t0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var i=r===t?0:4-r%4;return[r,i]}n[45]=62,n[95]=63}}),s6=p({"node_modules/ieee754/index.js"(e){e.read=function(e,t,r,i,n){var a,o,s=8*n-i-1,l=(1<>1,u=-7,h=r?n-1:0,d=r?-1:1,f=e[t+h];for(h+=d,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=d,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=i;u>0;o=256*o+e[t+h],h+=d,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,i),a-=c}return(f?-1:1)*o*Math.pow(2,a-i)},e.write=function(e,t,r,i,n,a){var o,s,l,c=8*a-n-1,u=(1<>1,d=5960464477539062e-23*(23===n),f=i?0:a-1,p=i?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,n),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,n),o=0));n>=8;e[r+f]=255&s,f+=p,s/=256,n-=8);for(o=o<0;e[r+f]=255&o,f+=p,o/=256,c-=8);e[r+f-p]|=128*m}}}),s8=p({"node_modules/buffer/index.js"(e){var t=s4(),r=s6(),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function n(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return l(e)}return o(e,t,r)}function o(e,t,r){if("string"==typeof e){var i=e,o=t;if(("string"!=typeof o||""===o)&&(o="utf8"),!a.isEncoding(o))throw TypeError("Unknown encoding: "+o);let r=0|d(i,o),s=n(r),l=s.write(i,o);return l!==r&&(s=s.slice(0,l)),s}if(ArrayBuffer.isView(e)){var s=e;if(O(s,Uint8Array)){let e=new Uint8Array(s);return u(e.buffer,e.byteOffset,e.byteLength)}return c(s)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(O(e,ArrayBuffer)||e&&O(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(O(e,SharedArrayBuffer)||e&&O(e.buffer,SharedArrayBuffer)))return u(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let l=e.valueOf&&e.valueOf();if(null!=l&&l!==e)return a.from(l,t,r);let f=function(e){if(a.isBuffer(e)){let t=0|h(e.length),r=n(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?n(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(f)return f;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function s(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return s(e),n(e<0?0:0|h(e))}function c(e){let t=e.length<0?0:0|h(e.length),r=n(t);for(let i=0;i=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function d(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||O(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return I(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(n)return i?-1:I(e).length;t=(""+t).toLowerCase(),n=!0}}function f(e,r,i){let n=!1;if((void 0===r||r<0)&&(r=0),r>this.length||((void 0===i||i>this.length)&&(i=this.length),i<=0)||(i>>>=0)<=(r>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);let n="";for(let i=t;i0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r*=1)!=o&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return -1;r=e.length-1}else if(r<0)if(!n)return -1;else r=0;if("string"==typeof t&&(t=a.from(t,i)),a.isBuffer(t))return 0===t.length?-1:g(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,i,n);throw TypeError("val must be string, number or Buffer")}function g(e,t,r,i,n){let a,o=1,s=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return -1;o=2,s/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){let i=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){let r=!0;for(let i=0;i239?4:t>223?3:t>191?2:1;if(n+o<=r){let r,i,s,l;switch(o){case 1:t<128&&(a=t);break;case 2:(192&(r=e[n+1]))==128&&(l=(31&t)<<6|63&r)>127&&(a=l);break;case 3:r=e[n+1],i=e[n+2],(192&r)==128&&(192&i)==128&&(l=(15&t)<<12|(63&r)<<6|63&i)>2047&&(l<55296||l>57343)&&(a=l);break;case 4:r=e[n+1],i=e[n+2],s=e[n+3],(192&r)==128&&(192&i)==128&&(192&s)==128&&(l=(15&t)<<18|(63&r)<<12|(63&i)<<6|63&s)>65535&&l<1114112&&(a=l)}}null===a?(a=65533,o=1):a>65535&&(a-=65536,i.push(a>>>10&1023|55296),a=56320|1023&a),i.push(a),n+=o}var a=i;let o=a.length;if(o<=4096)return String.fromCharCode.apply(String,a);let s="",l=0;for(;lr)throw RangeError("Trying to access beyond buffer length")}function x(e,t,r,i,n,o){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>n||te.length)throw RangeError("Index out of range")}function b(e,t,r,i,n){E(t,i,n,e,r,7);let a=Number(t&BigInt(0xffffffff));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function _(e,t,r,i,n){E(t,i,n,e,r,7);let a=Number(t&BigInt(0xffffffff));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function w(e,t,r,i,n,a){if(r+i>e.length||r<0)throw RangeError("Index out of range")}function T(e,t,i,n,a){return t*=1,i>>>=0,a||w(e,t,i,4,34028234663852886e22,-34028234663852886e22),r.write(e,t,i,n,23,4),i+4}function M(e,t,i,n,a){return t*=1,i>>>=0,a||w(e,t,i,8,17976931348623157e292,-17976931348623157e292),r.write(e,t,i,n,52,8),i+8}e.Buffer=a,e.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},e.INSPECT_MAX_BYTES=50,e.kMaxLength=0x7fffffff,a.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch{return!1}}(),!a.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&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."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return o(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return s(e),e<=0?n(e):void 0!==t?"string"==typeof r?n(e).fill(t,r):n(e).fill(t):n(e)},a.allocUnsafe=function(e){return l(e)},a.allocUnsafeSlow=function(e){return l(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(O(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),O(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,i=t.length;for(let n=0,a=Math.min(r,i);ni.length?(a.isBuffer(t)||(t=a.from(t)),t.copy(i,n)):Uint8Array.prototype.set.call(i,t,n);else if(a.isBuffer(t))t.copy(i,n);else throw TypeError('"list" argument must be an Array of Buffers');n+=t.length}return i},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(t+=" ... "),""},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(e,t,r,i,n){if(O(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,i>>>=0,n>>>=0,this===e)return 0;let o=n-i,s=r-t,l=Math.min(o,s),c=this.slice(i,n),u=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let d=this.length-t;if((void 0===r||r>d)&&(r=d),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let f=!1;for(;;)switch(i){case"hex":return function(e,t,r,i){let n;r=Number(r)||0;let a=e.length-r;i?(i=Number(i))>a&&(i=a):i=a;let o=t.length;for(i>o/2&&(i=o/2),n=0;n>8,n.push(r%256),n.push(i);return n}(e,this.length-u),this,u,h);default:if(f)throw TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),f=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||v(e,t,this.length);let i=this[e],n=1,a=0;for(;++a>>=0,t>>>=0,r||v(e,t,this.length);let i=this[e+--t],n=1;for(;t>0&&(n*=256);)i+=this[e+--t]*n;return i},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||v(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=F(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&L(e,this.length-8);let i=t+256*this[++e]+65536*this[++e]+0x1000000*this[++e],n=this[++e]+256*this[++e]+65536*this[++e]+0x1000000*r;return BigInt(i)+(BigInt(n)<>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&L(e,this.length-8);let i=0x1000000*t+65536*this[++e]+256*this[++e]+this[++e],n=0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(i)<>>=0,t>>>=0,r||v(e,t,this.length);let i=this[e],n=1,a=0;for(;++a=(n*=128)&&(i-=Math.pow(2,8*t)),i},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||v(e,t,this.length);let i=t,n=1,a=this[e+--i];for(;i>0&&(n*=256);)a+=this[e+--i]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return e>>>=0,t||v(e,1,this.length),128&this[e]?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||v(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||v(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=F(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&L(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&L(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<>>=0,t||v(e,4,this.length),r.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||v(e,4,this.length),r.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||v(e,8,this.length),r.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||v(e,8,this.length),r.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,i){if(e*=1,t>>>=0,r>>>=0,!i){let i=Math.pow(2,8*r)-1;x(this,e,t,r,i,0)}let n=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,!i){let i=Math.pow(2,8*r)-1;x(this,e,t,r,i,0)}let n=r-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigUInt64LE=F(function(e,t=0){return b(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=F(function(e,t=0){return _(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(e,t,r,i){if(e*=1,t>>>=0,!i){let i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}let n=0,a=1,o=0;for(this[t]=255&e;++n>>=0,!i){let i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}let n=r-1,a=1,o=0;for(this[t+n]=255&e;--n>=0&&(a*=256);)e<0&&0===o&&0!==this[t+n+1]&&(o=1),this[t+n]=(e/a|0)-o&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigInt64LE=F(function(e,t=0){return b(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=F(function(e,t=0){return _(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(e,t,r){return T(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return T(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,i){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw RangeError("Index out of range");if(i<0)throw RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function E(e,t,r,i,n,a){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${(a+1)*8}${i}`:`>= -(2${i} ** ${(a+1)*8-1}${i}) and < 2 ** ${(a+1)*8-1}${i}`:`>= ${t}${i} and <= ${r}${i}`,new k.ERR_OUT_OF_RANGE("value",n,e)}C(n,"offset"),(void 0===i[n]||void 0===i[n+a])&&L(n,i.length-(a+1))}function C(e,t){if("number"!=typeof e)throw new k.ERR_INVALID_ARG_TYPE(t,"number",e)}function L(e,t,r){throw Math.floor(e)!==e?(C(e,r),new k.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new k.ERR_BUFFER_OUT_OF_BOUNDS:new k.ERR_OUT_OF_RANGE(r||"offset",`>= ${+!!r} and <= ${t}`,e)}A("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),A("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),A("ERR_OUT_OF_RANGE",function(e,t,r){let i=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?n=S(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=S(n)),n+="n"),i+=` It must be ${t}. Received ${n}`},RangeError);var P=/[^+/0-9A-Za-z-_]/g;function I(e,t){t=t||1/0;let r,i=e.length,n=null,a=[];for(let o=0;o55295&&r<57344){if(!n){if(r>56319||o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function z(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,r,i){let n;for(n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function O(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var R=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let i=16*r;for(let n=0;n<16;++n)t[i+n]=e[r]+e[n]}return t}();function F(e){return typeof BigInt>"u"?j:e}function j(){throw Error("BigInt not supported")}}}),s9=p({"node_modules/has-symbols/shams.js"(e,t){t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var i in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}}}),s7=p({"node_modules/has-tostringtag/shams.js"(e,t){var r=s9();t.exports=function(){return r()&&!!Symbol.toStringTag}}}),le=p({"node_modules/es-object-atoms/index.js"(e,t){t.exports=Object}}),lt=p({"node_modules/es-errors/index.js"(e,t){t.exports=Error}}),lr=p({"node_modules/es-errors/eval.js"(e,t){t.exports=EvalError}}),li=p({"node_modules/es-errors/range.js"(e,t){t.exports=RangeError}}),ln=p({"node_modules/es-errors/ref.js"(e,t){t.exports=ReferenceError}}),la=p({"node_modules/es-errors/syntax.js"(e,t){t.exports=SyntaxError}}),lo=p({"node_modules/es-errors/type.js"(e,t){t.exports=TypeError}}),ls=p({"node_modules/es-errors/uri.js"(e,t){t.exports=URIError}}),ll=p({"node_modules/math-intrinsics/abs.js"(e,t){t.exports=Math.abs}}),lc=p({"node_modules/math-intrinsics/floor.js"(e,t){t.exports=Math.floor}}),lu=p({"node_modules/math-intrinsics/max.js"(e,t){t.exports=Math.max}}),lh=p({"node_modules/math-intrinsics/min.js"(e,t){t.exports=Math.min}}),ld=p({"node_modules/math-intrinsics/pow.js"(e,t){t.exports=Math.pow}}),lf=p({"node_modules/math-intrinsics/round.js"(e,t){t.exports=Math.round}}),lp=p({"node_modules/math-intrinsics/isNaN.js"(e,t){t.exports=Number.isNaN||function(e){return e!=e}}}),lm=p({"node_modules/math-intrinsics/sign.js"(e,t){var r=lp();t.exports=function(e){return r(e)||0===e?e:e<0?-1:1}}}),lg=p({"node_modules/gopd/gOPD.js"(e,t){t.exports=Object.getOwnPropertyDescriptor}}),ly=p({"node_modules/gopd/index.js"(e,t){var r=lg();if(r)try{r([],"length")}catch{r=null}t.exports=r}}),lv=p({"node_modules/es-define-property/index.js"(e,t){var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}t.exports=r}}),lx=p({"node_modules/has-symbols/index.js"(e,t){var r="u">typeof Symbol&&Symbol,i=s9();t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}}}),lb=p({"node_modules/get-proto/Reflect.getPrototypeOf.js"(e,t){t.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null}}),l_=p({"node_modules/get-proto/Object.getPrototypeOf.js"(e,t){t.exports=le().getPrototypeOf||null}}),lw=p({"node_modules/function-bind/implementation.js"(e,t){var r=Object.prototype.toString,i=Math.max,n=function(e,t){for(var r=[],i=0;itypeof Reflect&&Reflect&&Reflect.apply}}),lS=p({"node_modules/call-bind-apply-helpers/actualApply.js"(e,t){var r=lT(),i=lk(),n=lM();t.exports=lA()||r.call(n,i)}}),lE=p({"node_modules/call-bind-apply-helpers/index.js"(e,t){var r=lT(),i=lo(),n=lM(),a=lS();t.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new i("a function is required");return a(r,n,e)}}}),lC=p({"node_modules/dunder-proto/get.js"(e,t){var r,i=lE(),n=ly();try{r=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!r&&n&&n(Object.prototype,"__proto__"),o=Object,s=o.getPrototypeOf;t.exports=a&&"function"==typeof a.get?i([a.get]):"function"==typeof s&&function(e){return s(null==e?e:o(e))}}}),lL=p({"node_modules/get-proto/index.js"(e,t){var r=lb(),i=l_(),n=lC();t.exports=r?function(e){return r(e)}:i?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return i(e)}:n?function(e){return n(e)}:null}}),lP=p({"node_modules/hasown/index.js"(e,t){var r=Function.prototype.call,i=Object.prototype.hasOwnProperty;t.exports=lT().call(r,i)}}),lI=p({"node_modules/get-intrinsic/index.js"(e,t){var r,i=le(),n=lt(),a=lr(),o=li(),s=ln(),l=la(),c=lo(),u=ls(),h=ll(),d=lc(),f=lu(),p=lh(),m=ld(),g=lf(),y=lm(),v=Function,x=function(e){try{return v('"use strict"; return ('+e+").constructor;")()}catch{}},b=ly(),_=lv(),w=function(){throw new c},T=b?function(){try{return arguments.callee,w}catch{try{return b(arguments,"callee").get}catch{return w}}}():w,M=lx()(),k=lL(),A=l_(),S=lb(),E=lk(),C=lM(),L={},P=typeof Uint8Array>"u"||!k?r:k(Uint8Array),I={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":M&&k?k([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":L,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":M&&k?k(k([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":!(typeof Map>"u")&&M&&k?k(new Map()[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":!(typeof Set>"u")&&M&&k?k(new Set()[Symbol.iterator]()):r,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":M&&k?k(""[Symbol.iterator]()):r,"%Symbol%":M?Symbol:r,"%SyntaxError%":l,"%ThrowTypeError%":T,"%TypedArray%":P,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":C,"%Function.prototype.apply%":E,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":A,"%Math.abs%":h,"%Math.floor%":d,"%Math.max%":f,"%Math.min%":p,"%Math.pow%":m,"%Math.round%":g,"%Math.sign%":y,"%Reflect.getPrototypeOf%":S};if(k)try{null.error}catch(e){z=k(k(e)),I["%Error.prototype%"]=z}var z,D=function e(t){var r;if("%AsyncFunction%"===t)r=x("async function () {}");else if("%GeneratorFunction%"===t)r=x("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=x("async function* () {}");else if("%AsyncGenerator%"===t){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var n=e("%AsyncGenerator%");n&&k&&(r=k(n.prototype))}return I[t]=r,r},O={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},R=lT(),F=lP(),j=R.call(C,Array.prototype.concat),B=R.call(E,Array.prototype.splice),N=R.call(C,String.prototype.replace),U=R.call(C,String.prototype.slice),V=R.call(C,RegExp.prototype.exec),q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,G=function(e){var t=U(e,0,1),r=U(e,-1);if("%"===t&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var i=[];return N(e,q,function(e,t,r,n){i[i.length]=r?N(n,H,"$1"):t||e}),i},W=function(e,t){var r,i=e;if(F(O,i)&&(i="%"+(r=O[i])[0]+"%"),F(I,i)){var n=I[i];if(n===L&&(n=D(i)),typeof n>"u"&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:i,value:n}}throw new l("intrinsic "+e+" does not exist!")};t.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===V(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=G(e),i=r.length>0?r[0]:"",n=W("%"+i+"%",t),a=n.name,o=n.value,s=!1,u=n.alias;u&&(i=u[0],B(r,j([0,1],u)));for(var h=1,d=!0;h=r.length){var g=b(o,f);o=(d=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:o[f]}else d=F(o,f),o=o[f];d&&!s&&(I[a]=o)}}return o}}}),lz=p({"node_modules/call-bound/index.js"(e,t){var r=lI(),i=lE(),n=i([r("%String.prototype.indexOf%")]);t.exports=function(e,t){var a=r(e,!!t);return"function"==typeof a&&n(e,".prototype.")>-1?i([a]):a}}}),lD=p({"node_modules/is-arguments/index.js"(e,t){var r=s7()(),i=lz()("Object.prototype.toString"),n=function(e){return(!r||!e||"object"!=typeof e||!(Symbol.toStringTag in e))&&"[object Arguments]"===i(e)},a=function(e){return!!n(e)||null!==e&&"object"==typeof e&&"length"in e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"callee"in e&&"[object Function]"===i(e.callee)},o=function(){return n(arguments)}();n.isLegacyArguments=a,t.exports=o?n:a}}),lO=p({"node_modules/is-regex/index.js"(e,t){var r,i,n,a,o,s,l=lz(),c=s7()(),u=lP(),h=ly();c?(r=l("RegExp.prototype.exec"),i={},a={toString:n=function(){throw i},valueOf:n},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=n),s=function(e){if(!e||"object"!=typeof e)return!1;var t=h(e,"lastIndex");if(!(t&&u(t,"value")))return!1;try{r(e,a)}catch(e){return e===i}}):(o=l("Object.prototype.toString"),s=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"[object RegExp]"===o(e)}),t.exports=s}}),lR=p({"node_modules/safe-regex-test/index.js"(e,t){var r=lz(),i=lO(),n=r("RegExp.prototype.exec"),a=lo();t.exports=function(e){if(!i(e))throw new a("`regex` must be a RegExp");return function(t){return null!==n(e,t)}}}}),lF=p({"node_modules/generator-function/index.js"(e,t){var r=(function*(){}).constructor;t.exports=()=>r}}),lj=p({"node_modules/is-generator-function/index.js"(e,t){var r=lz(),i=lR()(/^\s*(?:function)?\*/),n=s7()(),a=lL(),o=r("Object.prototype.toString"),s=r("Function.prototype.toString"),l=lF();t.exports=function(e){if("function"!=typeof e)return!1;if(i(s(e)))return!0;if(!n)return"[object GeneratorFunction]"===o(e);if(!a)return!1;var t=l();return t&&a(e)===t.prototype}}}),lB=p({"node_modules/is-callable/index.js"(e,t){var r,i,n,a=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{i=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o(function(){throw 42},null,i)}catch(e){e!==n&&(o=null)}else o=null;var s=/^\s*class\b/,l=function(e){try{var t=a.call(e);return s.test(t)}catch{return!1}},c=function(e){try{return!l(e)&&(a.call(e),!0)}catch{return!1}},u=Object.prototype.toString,h="function"==typeof Symbol&&!!Symbol.toStringTag,d=!(0 in[,]),f=function(){return!1};"object"==typeof document&&(r=document.all,u.call(r)===u.call(document.all)&&(f=function(e){if((d||!e)&&(typeof e>"u"||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch{}return!1})),t.exports=o?function(e){if(f(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,i)}catch(e){if(e!==n)return!1}return!l(e)&&c(e)}:function(e){if(f(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;if(h)return c(e);if(l(e))return!1;var t=u.call(e);return("[object Function]"===t||"[object GeneratorFunction]"===t||!!/^\[object HTML/.test(t))&&c(e)}}}),lN=p({"node_modules/for-each/index.js"(e,t){var r=lB(),i=Object.prototype.toString,n=Object.prototype.hasOwnProperty,a=function(e,t,r){for(var i=0,a=e.length;i=3&&(l=n),"[object Array]"===i.call(e)?a(e,t,l):"string"==typeof e?o(e,t,l):s(e,t,l)}}}),lU=p({"node_modules/possible-typed-array-names/index.js"(e,t){t.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}}),lV=p({"node_modules/available-typed-arrays/index.js"(e,t){var r=lU(),i=typeof globalThis>"u"?window:globalThis;t.exports=function(){for(var e=[],t=0;t3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new n("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],h=!!a&&a(e,t);if(r)r(e,t,{configurable:null===c&&h?h.configurable:!c,enumerable:null===s&&h?h.enumerable:!s,value:o,writable:null===l&&h?h.writable:!l});else if(!u&&(s||l||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=o}}}),lH=p({"node_modules/has-property-descriptors/index.js"(e,t){var r=lv(),i=function(){return!!r};i.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch{return!0}},t.exports=i}}),lG=p({"node_modules/set-function-length/index.js"(e,t){var r=lI(),i=lq(),n=lH()(),a=ly(),o=lo(),s=r("%Math.floor%");t.exports=function(e,t){if("function"!=typeof e)throw new o("`fn` is not a function");if("number"!=typeof t||t<0||t>0xffffffff||s(t)!==t)throw new o("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],l=!0,c=!0;if("length"in e&&a){var u=a(e,"length");u&&!u.configurable&&(l=!1),u&&!u.writable&&(c=!1)}return(l||c||!r)&&(n?i(e,"length",t,!0,!0):i(e,"length",t)),e}}}),lW=p({"node_modules/call-bind-apply-helpers/applyBind.js"(e,t){var r=lT(),i=lk(),n=lS();t.exports=function(){return n(r,i,arguments)}}}),lY=p({"node_modules/call-bind/index.js"(e,t){var r=lG(),i=lv(),n=lE(),a=lW();t.exports=function(e){var t=n(arguments),i=1+e.length-(arguments.length-1);return r(t,i>0?i:0,!0)},i?i(t.exports,"apply",{value:a}):t.exports.apply=a}}),lZ=p({"node_modules/which-typed-array/index.js"(e,t){var r=lN(),i=lV(),n=lY(),a=lz(),o=ly(),s=lL(),l=a("Object.prototype.toString"),c=s7()(),u=typeof globalThis>"u"?window:globalThis,h=i(),d=a("String.prototype.slice"),f=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1?n:"Object"===n&&(i=!1,r(p,function(t,r){if(!i)try{t(e),i=d(r,1)}catch{}}),i)}return o?(t=!1,r(p,function(r,i){if(!t)try{"$"+r(e)===i&&(t=d(i,1))}catch{}}),t):null}}}),l$=p({"node_modules/is-typed-array/index.js"(e,t){var r=lZ();t.exports=function(e){return!!r(e)}}}),lX=p({"node_modules/util/support/types.js"(e){var t,r,i=lD(),n=lj(),a=lZ(),o=l$();function s(e){return e.call.bind(e)}var l="u">typeof BigInt,c="u">typeof Symbol,u=s(Object.prototype.toString),h=s(Number.prototype.valueOf),d=s(String.prototype.valueOf),f=s(Boolean.prototype.valueOf);function p(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch{return!1}}function m(e){return"[object Map]"===u(e)}function g(e){return"[object Set]"===u(e)}function y(e){return"[object WeakMap]"===u(e)}function v(e){return"[object WeakSet]"===u(e)}function x(e){return"[object ArrayBuffer]"===u(e)}function b(e){return!(typeof ArrayBuffer>"u")&&(x.working?x(e):e instanceof ArrayBuffer)}function _(e){return"[object DataView]"===u(e)}function w(e){return!(typeof DataView>"u")&&(_.working?_(e):e instanceof DataView)}l&&(t=s(BigInt.prototype.valueOf)),c&&(r=s(Symbol.prototype.valueOf)),e.isArgumentsObject=i,e.isGeneratorFunction=n,e.isTypedArray=o,e.isPromise=function(e){return"u">typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},e.isArrayBufferView=function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):o(e)||w(e)},e.isUint8Array=function(e){return"Uint8Array"===a(e)},e.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===a(e)},e.isUint16Array=function(e){return"Uint16Array"===a(e)},e.isUint32Array=function(e){return"Uint32Array"===a(e)},e.isInt8Array=function(e){return"Int8Array"===a(e)},e.isInt16Array=function(e){return"Int16Array"===a(e)},e.isInt32Array=function(e){return"Int32Array"===a(e)},e.isFloat32Array=function(e){return"Float32Array"===a(e)},e.isFloat64Array=function(e){return"Float64Array"===a(e)},e.isBigInt64Array=function(e){return"BigInt64Array"===a(e)},e.isBigUint64Array=function(e){return"BigUint64Array"===a(e)},m.working="u">typeof Map&&m(new Map),e.isMap=function(e){return!(typeof Map>"u")&&(m.working?m(e):e instanceof Map)},g.working="u">typeof Set&&g(new Set),e.isSet=function(e){return!(typeof Set>"u")&&(g.working?g(e):e instanceof Set)},y.working="u">typeof WeakMap&&y(new WeakMap),e.isWeakMap=function(e){return!(typeof WeakMap>"u")&&(y.working?y(e):e instanceof WeakMap)},v.working="u">typeof WeakSet&&v(new WeakSet),e.isWeakSet=function(e){return v(e)},x.working="u">typeof ArrayBuffer&&x(new ArrayBuffer),e.isArrayBuffer=b,_.working="u">typeof ArrayBuffer&&"u">typeof DataView&&_(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=w;var T="u">typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function M(e){return"[object SharedArrayBuffer]"===u(e)}function k(e){return!(typeof T>"u")&&(typeof M.working>"u"&&(M.working=M(new T)),M.working?M(e):e instanceof T)}function A(e){return p(e,h)}function S(e){return p(e,d)}function E(e){return p(e,f)}function C(e){return l&&p(e,t)}function L(e){return c&&p(e,r)}e.isSharedArrayBuffer=k,e.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},e.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},e.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},e.isGeneratorObject=function(e){return"[object Generator]"===u(e)},e.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},e.isNumberObject=A,e.isStringObject=S,e.isBooleanObject=E,e.isBigIntObject=C,e.isSymbolObject=L,e.isBoxedPrimitive=function(e){return A(e)||S(e)||E(e)||C(e)||L(e)},e.isAnyArrayBuffer=function(e){return"u">typeof Uint8Array&&(b(e)||k(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw Error(t+" is not supported in userland")}})})}}),lK=p({"node_modules/util/support/isBufferBrowser.js"(e,t){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}}}),lJ=p({"(disabled):node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},i=0;i=o)return e;switch(e){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}default:return e}}),l=n[i];itypeof S&&!0===S.noDeprecation)return t;if(typeof S>"u")return function(){return e.deprecate(t,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(S.throwDeprecation)throw Error(r);S.traceDeprecation?console.trace(r):console.error(r),i=!0}return t.apply(this,arguments)}};var i={},n=/^$/;function a(t,r){var i={seen:[],stylize:s};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),d(r)?i.showHidden=r:r&&e._extend(i,r),g(i.showHidden)&&(i.showHidden=!1),g(i.depth)&&(i.depth=2),g(i.colors)&&(i.colors=!1),g(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=o),l(i,t,i.depth)}function o(e,t){var r=a.styles[t];return r?"\x1b["+a.colors[r][0]+"m"+e+"\x1b["+a.colors[r][1]+"m":e}function s(e,t){return e}function l(t,r,i){if(t.customInspect&&r&&_(r.inspect)&&r.inspect!==e.inspect&&!(r.constructor&&r.constructor.prototype===r)){var n,a,o,s,v,w,T=r.inspect(i,t);return m(T)||(T=l(t,T,i)),T}var M=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return p(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):f(t)?e.stylize("null","null"):void 0}(t,r);if(M)return M;var A=Object.keys(r),S=(v={},A.forEach(function(e,t){v[e]=!0}),v);if(t.showHidden&&(A=Object.getOwnPropertyNames(r)),b(r)&&(A.indexOf("message")>=0||A.indexOf("description")>=0))return c(r);if(0===A.length){if(_(r)){var E=r.name?": "+r.name:"";return t.stylize("[Function"+E+"]","special")}if(y(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(x(r))return t.stylize(Date.prototype.toString.call(r),"date");if(b(r))return c(r)}var C="",L=!1,P=["{","}"];return(h(r)&&(L=!0,P=["[","]"]),_(r)&&(C=" [Function"+(r.name?": "+r.name:"")+"]"),y(r)&&(C=" "+RegExp.prototype.toString.call(r)),x(r)&&(C=" "+Date.prototype.toUTCString.call(r)),b(r)&&(C=" "+c(r)),0!==A.length||L&&0!=r.length)?i<0?y(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),w=L?function(e,t,r,i,n){for(var a=[],o=0,s=t.length;o=0&&s++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?o[0]+(""===a?"":a+` `)+" "+n.join(`, `)+" "+o[1]:o[0]+a+" "+n.join(", ")+" "+o[1]):P[0]+C+P[1]}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,r,i,n,a){var o,s,c;if((c=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),k(i,n)||(o="["+n+"]"),s||(0>e.seen.indexOf(c.value)?(s=f(r)?l(e,c.value,null):l(e,c.value,r-1)).indexOf(` @@ -17,7 +17,7 @@ `).slice(2):` `+s.split(` `).map(function(e){return" "+e}).join(` -`)):s=e.stylize("[Circular]","special")),g(o)){if(a&&n.match(/^\d+$/))return s;(o=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function h(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function f(e){return null===e}function p(e){return"number"==typeof e}function m(e){return"string"==typeof e}function g(e){return void 0===e}function y(e){return v(e)&&"[object RegExp]"===w(e)}function v(e){return"object"==typeof e&&null!==e}function x(e){return v(e)&&"[object Date]"===w(e)}function b(e){return v(e)&&("[object Error]"===w(e)||e instanceof Error)}function _(e){return"function"==typeof e}function w(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}n=RegExp("^"+"false".replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase()+"$","i"),e.debuglog=function(t){if(!i[t=t.toUpperCase()])if(n.test(t)){var r=S.pid;i[t]=function(){var i=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,i)}}else i[t]=function(){};return i[t]},e.inspect=a,a.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]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=lX(),e.isArray=h,e.isBoolean=d,e.isNull=f,e.isNullOrUndefined=function(e){return null==e},e.isNumber=p,e.isString=m,e.isSymbol=function(e){return"symbol"==typeof e},e.isUndefined=g,e.isRegExp=y,e.types.isRegExp=y,e.isObject=v,e.isDate=x,e.types.isDate=x,e.isError=b,e.types.isNativeError=b,e.isFunction=_,e.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||typeof e>"u"},e.isBuffer=lK();var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.log=function(){var t,r;console.log("%s - %s",(r=[T((t=new Date).getHours()),T(t.getMinutes()),T(t.getSeconds())].join(":"),[t.getDate(),M[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=s3(),e._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};var A="u">typeof Symbol?Symbol("util.promisify.custom"):void 0;function E(e,t){if(!e){var r=Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}e.promisify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');if(A&&e[A]){var r=e[A];if("function"!=typeof r)throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,A,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var t,r,i=new Promise(function(e,i){t=e,r=i}),n=[],a=0;a0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,i=a.allocUnsafe(e>>>0),n=this.head,o=0;n;)t=n.data,r=o,a.prototype.copy.call(t,i,r),o+=n.data.length,n=n.next;return i}},{key:"consume",value:function(e,t){var r;return en.length?n.length:e;if(a===n.length?i+=n:i+=n.slice(0,e),0==(e-=a)){a===n.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(a));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var n=r.data,o=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,o),0==(e-=o)){o===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(o));break}++i}return this.length-=i,t}},{key:s,value:function(e,t){return o(this,i(i({},t),{},{depth:0,customInspect:!1}))}}],function(e,t){for(var r=0;r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}i("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(e,t,r){if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(l="must not be",t=t.replace(/^not /,"")):l="must be",a=" argument",(void 0===o||o>e.length)&&(o=e.length),e.substring(o-a.length,o)===a)c="The ".concat(e," ").concat(l," ").concat(n(t,"type"));else{var i,a,o,s,l,c,u=("number"!=typeof s&&(s=0),s+1>e.length||-1===e.indexOf(".",s))?"argument":"property";c='The "'.concat(e,'" ').concat(u," ").concat(l," ").concat(n(t,"type"))}return c+". Received type ".concat(typeof r)},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r}}),l2=p({"node_modules/readable-stream/lib/internal/streams/state.js"(e,t){var r=l1().codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,i,n){var a=null!=t.highWaterMark?t.highWaterMark:n?t[i]:null;if(null!=a){if(!(isFinite(a)&&Math.floor(a)===a)||a<0)throw new r(n?i:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}}}),l3=p({"node_modules/util-deprecate/browser.js"(e,t){t.exports=function(e,t){if(r("noDeprecation"))return e;var i=!1;return function(){if(!i){if(r("throwDeprecation"))throw Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}};function r(e){try{if(!window.localStorage)return!1}catch{return!1}var t=window.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}}}),l5=p({"node_modules/readable-stream/lib/_stream_writable.js"(e,t){function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){var r=t,i=e,n=r.entry;for(r.entry=null;n;){var a=n.callback;i.pendingcb--,a(void 0),n=n.next}i.corkedRequestsFree.next=r}}t.exports=T,T.WritableState=w;var i,n,a={deprecate:l3()},o=s5(),s=s8().Buffer,l=("u">typeof window||"u">typeof window?window:"u">typeof self?self:{}).Uint8Array||function(){},c=l0(),u=l2().getHighWaterMark,h=l1().codes,d=h.ERR_INVALID_ARG_TYPE,f=h.ERR_METHOD_NOT_IMPLEMENTED,p=h.ERR_MULTIPLE_CALLBACK,m=h.ERR_STREAM_CANNOT_PIPE,g=h.ERR_STREAM_DESTROYED,y=h.ERR_STREAM_NULL_VALUES,v=h.ERR_STREAM_WRITE_AFTER_END,x=h.ERR_UNKNOWN_ENCODING,b=c.errorOrDestroy;function _(){}function w(e,t,n){i=i||l4(),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=u(this,e,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if("function"!=typeof n)throw new p;if(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)--r.pendingcb,i?(S.nextTick(n,t),S.nextTick(L,e,r),e._writableState.errorEmitted=!0,b(e,t)):(n(t),e._writableState.errorEmitted=!0,b(e,t),L(e,r));else{var a=E(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||A(e,r),i?S.nextTick(k,e,r,a,n):k(e,r,a,n)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function T(e){var t=this instanceof(i=i||l4());if(!t&&!n.call(T,this))return new T(e);this._writableState=new w(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function M(e,t,r,i,n,a,o){t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new g("write")):r?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function k(e,t,r,i){var n,a;r||(n=e,0===(a=t).length&&a.needDrain&&(a.needDrain=!1,n.emit("drain"))),t.pendingcb--,i(),L(e,t)}function A(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var n=Array(t.bufferedRequestCount),a=t.corkedRequestsFree;a.entry=i;for(var o=0,s=!0;i;)n[o]=i,i.isBuf||(s=!1),i=i.next,o+=1;n.allBuffers=s,M(e,t,!0,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;i;){var l=i.chunk,c=i.encoding,u=i.callback,h=t.objectMode?1:l.length;if(M(e,t,!1,h,l,c,u),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final(function(r){t.pendingcb--,r&&b(e,r),t.prefinished=!0,e.emit("prefinish"),L(e,t)})}function L(e,t){var r=E(t);if(r&&(t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,S.nextTick(C,e,t))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}s3()(T,o),w.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(w.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(n=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(e){return!!n.call(this,e)||this===T&&e&&e._writableState instanceof w}})):n=function(e){return e instanceof this},T.prototype.pipe=function(){b(this,new m)},T.prototype.write=function(e,t,r){var i,n,a,o,c,u,h,f=this._writableState,p=!1,m=!f.objectMode&&(i=e,s.isBuffer(i)||i instanceof l);return m&&!s.isBuffer(e)&&(n=e,e=s.from(n)),"function"==typeof t&&(r=t,t=null),m?t="buffer":t||(t=f.defaultEncoding),"function"!=typeof r&&(r=_),f.ending?(a=r,b(this,o=new v),S.nextTick(a,o)):(m||(c=e,u=r,null===c?h=new y:"string"==typeof c||f.objectMode||(h=new d("chunk",["string","Buffer"],c)),!h||(b(this,h),S.nextTick(u,h),0)))&&(f.pendingcb++,p=function(e,t,r,i,n,a){if(!r){var o,l,c=(o=i,l=n,t.objectMode||!1===t.decodeStrings||"string"!=typeof o||(o=s.from(o,l)),o);i!==c&&(r=!0,n="buffer",i=c)}var u=t.objectMode?1:i.length;t.length+=u;var h=t.length-1))throw new x(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(e,t,r){r(new f("_write()"))},T.prototype._writev=null,T.prototype.end=function(e,t,r){var i,n,a,o=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||(i=this,n=o,a=r,n.ending=!0,L(i,n),a&&(n.finished?S.nextTick(a):i.once("finish",a)),n.ended=!0,i.writable=!1),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),T.prototype.destroy=c.destroy,T.prototype._undestroy=c.undestroy,T.prototype._destroy=function(e,t){t(e)}}}),l4=p({"node_modules/readable-stream/lib/_stream_duplex.js"(e,t){var r,i,n,a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=l;var o=ct(),s=l5();for(s3()(l,o),r=a(s.prototype),n=0;n>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function o(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function s(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}e.StringDecoder=i,i.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(a>0&&(e.lastNeed=a-1),a):--i=0?(a>0&&(e.lastNeed=a-2),a):--i=0?(a>0&&(2===a?a=0:e.lastNeed=a-3),a):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}),l7=p({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(e,t){var r=l1().codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,n,a){if("function"==typeof n)return e(t,null,n);n||(n={}),o=a||i,s=!1,a=function(){if(!s){s=!0;for(var e=arguments.length,t=Array(e),r=0;rtypeof window||"u">typeof window?window:"u">typeof self?self:{}).Uint8Array||function(){},l=lJ();i=l&&l.debuglog?l.debuglog("stream"):function(){};var c,u,h,d=lQ(),f=l0(),p=l2().getHighWaterMark,m=l1().codes,g=m.ERR_INVALID_ARG_TYPE,y=m.ERR_STREAM_PUSH_AFTER_EOF,v=m.ERR_METHOD_NOT_IMPLEMENTED,x=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;s3()(T,a);var b=f.errorOrDestroy,_=["error","close","destroy","pause","resume"];function w(e,t,i){r=r||l4(),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=p(this,e,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(c||(c=l8().StringDecoder),this.decoder=new c(e.encoding),this.encoding=e.encoding)}function T(e){if(r=r||l4(),!(this instanceof T))return new T(e);var t=this instanceof r;this._readableState=new w(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function M(e,t,r,n,a){i("readableAddChunk",t);var l,c,u=e._readableState;if(null===t)u.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?E(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,C(e)))}}(e,u);else if(a||(c=function(e,t){var r;return o.isBuffer(t)||t instanceof s||"string"==typeof t||void 0===t||e.objectMode||(r=new g("chunk",["string","Buffer","Uint8Array"],t)),r}(u,t)),c)b(e,c);else if(u.objectMode||t&&t.length>0)if("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===o.prototype||(l=t,t=o.from(l)),n)u.endEmitted?b(e,new x):k(e,u,t,!0);else if(u.ended)b(e,new y);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(t=u.decoder.write(t),u.objectMode||0!==t.length?k(e,u,t,!1):L(e,u)):k(e,u,t,!1)}else n||(u.reading=!1,L(e,u));return!u.ended&&(u.lengtht.highWaterMark&&((r=e)>=0x40000000?r=0x40000000:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),t.highWaterMark=r),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,S.nextTick(C,e))}function C(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,O(e)}function L(e,t){t.readingMore||(t.readingMore=!0,S.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function z(e){i("readable nexttick read 0"),e.read(0)}function D(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),O(e),t.flowing&&!t.reading&&e.read(0)}function O(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function R(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function F(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,S.nextTick(j,t,e))}function j(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function B(e,t){for(var r=0,i=e.length;r=r.highWaterMark:r.length>0)||r.ended))return i("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?F(this):E(this),null;if(0===(e=A(e,r))&&r.ended)return 0===r.length&&F(this),null;var a=r.needReadable;return i("need readable",a),(0===r.length||r.length-e0?R(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&F(this)),null!==t&&this.emit("data",t),t},T.prototype._read=function(e){b(this,new v("_read()"))},T.prototype.pipe=function(e,t){var r,a=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,i("pipe count=%d opts=%j",o.pipesCount,t);var s=t&&!1===t.end||e===S.stdout||e===S.stderr?m:l;function l(){i("onend"),e.end()}o.endEmitted?S.nextTick(s):a.once("end",s),e.on("unpipe",function t(r,n){i("onunpipe"),r===a&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,i("cleanup"),e.removeListener("close",f),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",d),e.removeListener("unpipe",t),a.removeListener("end",l),a.removeListener("end",m),a.removeListener("data",h),u=!0,o.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&c())});var c=(r=a,function(){var e=r._readableState;i("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&n(r,"data")&&(e.flowing=!0,O(r))});e.on("drain",c);var u=!1;function h(t){i("ondata");var r=e.write(t);i("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==B(o.pipes,e))&&!u&&(i("false write response, pause",o.awaitDrain),o.awaitDrain++),a.pause())}function d(t){i("onerror",t),m(),e.removeListener("error",d),0===n(e,"error")&&b(e,t)}function f(){e.removeListener("finish",p),m()}function p(){i("onfinish"),e.removeListener("close",f),m()}function m(){i("unpipe"),a.unpipe(e)}return a.on("data",h),!function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",f),e.once("finish",p),e.emit("pipe",a),o.flowing||(i("pipe resume"),a.resume()),e},T.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?E(this):n.reading||S.nextTick(z,this)),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&S.nextTick(I,this),r},T.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&S.nextTick(I,this),t},T.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(i("resume"),r.flowing=!r.readableListening,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,S.nextTick(D,e,t))),r.paused=!1,this},T.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var a in e.on("end",function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(a){i("wrapped data"),r.decoder&&(a=r.decoder.write(a)),r.objectMode&&null==a||!r.objectMode&&(!a||!a.length)||t.push(a)||(n=!0,e.pause())}),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var o=0;o<_.length;o++)e.on(_[o],this.emit.bind(this,_[o]));return this._read=function(t){i("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===u&&(u=l9()),u(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),T._fromList=R,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(e,t){return void 0===h&&(h=ce()),h(T,e,t)})}}),cr=p({"node_modules/readable-stream/lib/_stream_transform.js"(e,t){t.exports=c;var r=l1().codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,n=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=r.ERR_TRANSFORM_WITH_LENGTH_0,s=l4();function l(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new n);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),i(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length0,l=o=function(e){h||(h=e),e&&d.forEach(s),m||(d.forEach(s),c(h))},u=!1,o=function(){u||(u=!0,l.apply(void 0,arguments))},f=!1,e.on("close",function(){f=!0}),void 0===r&&(r=l7()),r(e,{readable:m,writable:n},function(e){if(e)return o(e);f=!0,o()}),p=!1,function(t){if(!f&&!p){if(p=!0,e.setHeader&&"function"==typeof e.abort)return e.abort();if("function"==typeof e.destroy)return e.destroy();o(t||new a("pipe"))}}});return t.reduce(l)}}}),ca=p({"node_modules/stream-browserify/index.js"(e,t){t.exports=i;var r=tw().EventEmitter;function i(){r.call(this)}s3()(i,r),i.Readable=ct(),i.Writable=l5(),i.Duplex=l4(),i.Transform=cr(),i.PassThrough=ci(),i.finished=l7(),i.pipeline=cn(),i.Stream=i,i.prototype.pipe=function(e,t){var i=this;function n(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function a(){i.readable&&i.resume&&i.resume()}i.on("data",n),e.on("drain",a),e._isStdio||t&&!1===t.end||(i.on("end",s),i.on("close",l));var o=!1;function s(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){i.removeListener("data",n),e.removeListener("drain",a),i.removeListener("end",s),i.removeListener("close",l),i.removeListener("error",c),e.removeListener("error",c),i.removeListener("end",u),i.removeListener("close",u),e.removeListener("close",u)}return i.on("error",c),e.on("error",c),i.on("end",u),i.on("close",u),e.on("close",u),e.emit("pipe",i),e}}}),co=p({"node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},i=0;i=o)return e;switch(e){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}default:return e}}),l=n[i];itypeof S&&!0===S.noDeprecation)return t;if(typeof S>"u")return function(){return e.deprecate(t,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(S.throwDeprecation)throw Error(r);S.traceDeprecation?console.trace(r):console.error(r),i=!0}return t.apply(this,arguments)}};var i={},n=/^$/;function a(t,r){var i={seen:[],stylize:s};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),d(r)?i.showHidden=r:r&&e._extend(i,r),g(i.showHidden)&&(i.showHidden=!1),g(i.depth)&&(i.depth=2),g(i.colors)&&(i.colors=!1),g(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=o),l(i,t,i.depth)}function o(e,t){var r=a.styles[t];return r?"\x1b["+a.colors[r][0]+"m"+e+"\x1b["+a.colors[r][1]+"m":e}function s(e,t){return e}function l(t,r,i){if(t.customInspect&&r&&_(r.inspect)&&r.inspect!==e.inspect&&!(r.constructor&&r.constructor.prototype===r)){var n,a,o,s,v,w,T=r.inspect(i,t);return m(T)||(T=l(t,T,i)),T}var M=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return p(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):f(t)?e.stylize("null","null"):void 0}(t,r);if(M)return M;var A=Object.keys(r),S=(v={},A.forEach(function(e,t){v[e]=!0}),v);if(t.showHidden&&(A=Object.getOwnPropertyNames(r)),b(r)&&(A.indexOf("message")>=0||A.indexOf("description")>=0))return c(r);if(0===A.length){if(_(r)){var E=r.name?": "+r.name:"";return t.stylize("[Function"+E+"]","special")}if(y(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(x(r))return t.stylize(Date.prototype.toString.call(r),"date");if(b(r))return c(r)}var C="",L=!1,P=["{","}"];return(h(r)&&(L=!0,P=["[","]"]),_(r)&&(C=" [Function"+(r.name?": "+r.name:"")+"]"),y(r)&&(C=" "+RegExp.prototype.toString.call(r)),x(r)&&(C=" "+Date.prototype.toUTCString.call(r)),b(r)&&(C=" "+c(r)),0!==A.length||L&&0!=r.length)?i<0?y(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),w=L?function(e,t,r,i,n){for(var a=[],o=0,s=t.length;o"u"},e.isBuffer=lK();var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.log=function(){var t,r;console.log("%s - %s",(r=[T((t=new Date).getHours()),T(t.getMinutes()),T(t.getSeconds())].join(":"),[t.getDate(),M[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=s3(),e._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};var A="u">typeof Symbol?Symbol("util.promisify.custom"):void 0;function E(e,t){if(!e){var r=Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}e.promisify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');if(A&&e[A]){var r=e[A];if("function"!=typeof r)throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,A,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var t,r,i=new Promise(function(e,i){t=e,r=i}),n=[],a=0;a0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,i=a.allocUnsafe(e>>>0),n=this.head,o=0;n;)t=n.data,r=o,a.prototype.copy.call(t,i,r),o+=n.data.length,n=n.next;return i}},{key:"consume",value:function(e,t){var r;return en.length?n.length:e;if(a===n.length?i+=n:i+=n.slice(0,e),0==(e-=a)){a===n.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(a));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var n=r.data,o=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,o),0==(e-=o)){o===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(o));break}++i}return this.length-=i,t}},{key:s,value:function(e,t){return o(this,i(i({},t),{},{depth:0,customInspect:!1}))}}],function(e,t){for(var r=0;r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}i("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(e,t,r){if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(l="must not be",t=t.replace(/^not /,"")):l="must be",a=" argument",(void 0===o||o>e.length)&&(o=e.length),e.substring(o-a.length,o)===a)c="The ".concat(e," ").concat(l," ").concat(n(t,"type"));else{var i,a,o,s,l,c,u=("number"!=typeof s&&(s=0),s+1>e.length||-1===e.indexOf(".",s))?"argument":"property";c='The "'.concat(e,'" ').concat(u," ").concat(l," ").concat(n(t,"type"))}return c+". Received type ".concat(typeof r)},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r}}),l2=p({"node_modules/readable-stream/lib/internal/streams/state.js"(e,t){var r=l1().codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,i,n){var a=null!=t.highWaterMark?t.highWaterMark:n?t[i]:null;if(null!=a){if(!(isFinite(a)&&Math.floor(a)===a)||a<0)throw new r(n?i:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}}}),l3=p({"node_modules/util-deprecate/browser.js"(e,t){t.exports=function(e,t){if(r("noDeprecation"))return e;var i=!1;return function(){if(!i){if(r("throwDeprecation"))throw Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}};function r(e){try{if(!window.localStorage)return!1}catch{return!1}var t=window.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}}}),l5=p({"node_modules/readable-stream/lib/_stream_writable.js"(e,t){function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){var r=t,i=e,n=r.entry;for(r.entry=null;n;){var a=n.callback;i.pendingcb--,a(void 0),n=n.next}i.corkedRequestsFree.next=r}}t.exports=T,T.WritableState=w;var i,n,a={deprecate:l3()},o=s5(),s=s8().Buffer,l=("u">typeof window||"u">typeof window?window:"u">typeof self?self:{}).Uint8Array||function(){},c=l0(),u=l2().getHighWaterMark,h=l1().codes,d=h.ERR_INVALID_ARG_TYPE,f=h.ERR_METHOD_NOT_IMPLEMENTED,p=h.ERR_MULTIPLE_CALLBACK,m=h.ERR_STREAM_CANNOT_PIPE,g=h.ERR_STREAM_DESTROYED,y=h.ERR_STREAM_NULL_VALUES,v=h.ERR_STREAM_WRITE_AFTER_END,x=h.ERR_UNKNOWN_ENCODING,b=c.errorOrDestroy;function _(){}function w(e,t,n){i=i||l4(),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=u(this,e,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if("function"!=typeof n)throw new p;if(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)--r.pendingcb,i?(S.nextTick(n,t),S.nextTick(L,e,r),e._writableState.errorEmitted=!0,b(e,t)):(n(t),e._writableState.errorEmitted=!0,b(e,t),L(e,r));else{var a=E(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||A(e,r),i?S.nextTick(k,e,r,a,n):k(e,r,a,n)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function T(e){var t=this instanceof(i=i||l4());if(!t&&!n.call(T,this))return new T(e);this._writableState=new w(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function M(e,t,r,i,n,a,o){t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new g("write")):r?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function k(e,t,r,i){var n,a;r||(n=e,0===(a=t).length&&a.needDrain&&(a.needDrain=!1,n.emit("drain"))),t.pendingcb--,i(),L(e,t)}function A(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var n=Array(t.bufferedRequestCount),a=t.corkedRequestsFree;a.entry=i;for(var o=0,s=!0;i;)n[o]=i,i.isBuf||(s=!1),i=i.next,o+=1;n.allBuffers=s,M(e,t,!0,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;i;){var l=i.chunk,c=i.encoding,u=i.callback,h=t.objectMode?1:l.length;if(M(e,t,!1,h,l,c,u),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final(function(r){t.pendingcb--,r&&b(e,r),t.prefinished=!0,e.emit("prefinish"),L(e,t)})}function L(e,t){var r=E(t);if(r&&(t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,S.nextTick(C,e,t))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}s3()(T,o),w.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(w.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(n=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(e){return!!n.call(this,e)||this===T&&e&&e._writableState instanceof w}})):n=function(e){return e instanceof this},T.prototype.pipe=function(){b(this,new m)},T.prototype.write=function(e,t,r){var i,n,a,o,c,u,h,f=this._writableState,p=!1,m=!f.objectMode&&(i=e,s.isBuffer(i)||i instanceof l);return m&&!s.isBuffer(e)&&(n=e,e=s.from(n)),"function"==typeof t&&(r=t,t=null),m?t="buffer":t||(t=f.defaultEncoding),"function"!=typeof r&&(r=_),f.ending?(a=r,b(this,o=new v),S.nextTick(a,o)):(m||(c=e,u=r,null===c?h=new y:"string"==typeof c||f.objectMode||(h=new d("chunk",["string","Buffer"],c)),!h||(b(this,h),S.nextTick(u,h),0)))&&(f.pendingcb++,p=function(e,t,r,i,n,a){if(!r){var o,l,c=(o=i,l=n,t.objectMode||!1===t.decodeStrings||"string"!=typeof o||(o=s.from(o,l)),o);i!==c&&(r=!0,n="buffer",i=c)}var u=t.objectMode?1:i.length;t.length+=u;var h=t.length-1))throw new x(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(e,t,r){r(new f("_write()"))},T.prototype._writev=null,T.prototype.end=function(e,t,r){var i,n,a,o=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||(i=this,n=o,a=r,n.ending=!0,L(i,n),a&&(n.finished?S.nextTick(a):i.once("finish",a)),n.ended=!0,i.writable=!1),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),T.prototype.destroy=c.destroy,T.prototype._undestroy=c.undestroy,T.prototype._destroy=function(e,t){t(e)}}}),l4=p({"node_modules/readable-stream/lib/_stream_duplex.js"(e,t){var r,i,n,a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=l;var o=ct(),s=l5();for(s3()(l,o),r=a(s.prototype),n=0;n>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function o(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function s(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}e.StringDecoder=i,i.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(a>0&&(e.lastNeed=a-1),a):--i=0?(a>0&&(e.lastNeed=a-2),a):--i=0?(a>0&&(2===a?a=0:e.lastNeed=a-3),a):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}),l9=p({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(e,t){var r=l1().codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,n,a){if("function"==typeof n)return e(t,null,n);n||(n={}),o=a||i,s=!1,a=function(){if(!s){s=!0;for(var e=arguments.length,t=Array(e),r=0;rtypeof window||"u">typeof window?window:"u">typeof self?self:{}).Uint8Array||function(){},l=lJ();i=l&&l.debuglog?l.debuglog("stream"):function(){};var c,u,h,d=lQ(),f=l0(),p=l2().getHighWaterMark,m=l1().codes,g=m.ERR_INVALID_ARG_TYPE,y=m.ERR_STREAM_PUSH_AFTER_EOF,v=m.ERR_METHOD_NOT_IMPLEMENTED,x=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;s3()(T,a);var b=f.errorOrDestroy,_=["error","close","destroy","pause","resume"];function w(e,t,i){r=r||l4(),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=p(this,e,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(c||(c=l8().StringDecoder),this.decoder=new c(e.encoding),this.encoding=e.encoding)}function T(e){if(r=r||l4(),!(this instanceof T))return new T(e);var t=this instanceof r;this._readableState=new w(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function M(e,t,r,n,a){i("readableAddChunk",t);var l,c,u=e._readableState;if(null===t)u.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?E(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,C(e)))}}(e,u);else if(a||(c=function(e,t){var r;return o.isBuffer(t)||t instanceof s||"string"==typeof t||void 0===t||e.objectMode||(r=new g("chunk",["string","Buffer","Uint8Array"],t)),r}(u,t)),c)b(e,c);else if(u.objectMode||t&&t.length>0)if("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===o.prototype||(l=t,t=o.from(l)),n)u.endEmitted?b(e,new x):k(e,u,t,!0);else if(u.ended)b(e,new y);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(t=u.decoder.write(t),u.objectMode||0!==t.length?k(e,u,t,!1):L(e,u)):k(e,u,t,!1)}else n||(u.reading=!1,L(e,u));return!u.ended&&(u.lengtht.highWaterMark&&((r=e)>=0x40000000?r=0x40000000:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),t.highWaterMark=r),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,S.nextTick(C,e))}function C(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,O(e)}function L(e,t){t.readingMore||(t.readingMore=!0,S.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function z(e){i("readable nexttick read 0"),e.read(0)}function D(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),O(e),t.flowing&&!t.reading&&e.read(0)}function O(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function R(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function F(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,S.nextTick(j,t,e))}function j(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function B(e,t){for(var r=0,i=e.length;r=r.highWaterMark:r.length>0)||r.ended))return i("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?F(this):E(this),null;if(0===(e=A(e,r))&&r.ended)return 0===r.length&&F(this),null;var a=r.needReadable;return i("need readable",a),(0===r.length||r.length-e0?R(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&F(this)),null!==t&&this.emit("data",t),t},T.prototype._read=function(e){b(this,new v("_read()"))},T.prototype.pipe=function(e,t){var r,a=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,i("pipe count=%d opts=%j",o.pipesCount,t);var s=t&&!1===t.end||e===S.stdout||e===S.stderr?m:l;function l(){i("onend"),e.end()}o.endEmitted?S.nextTick(s):a.once("end",s),e.on("unpipe",function t(r,n){i("onunpipe"),r===a&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,i("cleanup"),e.removeListener("close",f),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",d),e.removeListener("unpipe",t),a.removeListener("end",l),a.removeListener("end",m),a.removeListener("data",h),u=!0,o.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&c())});var c=(r=a,function(){var e=r._readableState;i("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&n(r,"data")&&(e.flowing=!0,O(r))});e.on("drain",c);var u=!1;function h(t){i("ondata");var r=e.write(t);i("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==B(o.pipes,e))&&!u&&(i("false write response, pause",o.awaitDrain),o.awaitDrain++),a.pause())}function d(t){i("onerror",t),m(),e.removeListener("error",d),0===n(e,"error")&&b(e,t)}function f(){e.removeListener("finish",p),m()}function p(){i("onfinish"),e.removeListener("close",f),m()}function m(){i("unpipe"),a.unpipe(e)}return a.on("data",h),!function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",f),e.once("finish",p),e.emit("pipe",a),o.flowing||(i("pipe resume"),a.resume()),e},T.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?E(this):n.reading||S.nextTick(z,this)),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&S.nextTick(I,this),r},T.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&S.nextTick(I,this),t},T.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(i("resume"),r.flowing=!r.readableListening,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,S.nextTick(D,e,t))),r.paused=!1,this},T.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var a in e.on("end",function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(a){i("wrapped data"),r.decoder&&(a=r.decoder.write(a)),r.objectMode&&null==a||!r.objectMode&&(!a||!a.length)||t.push(a)||(n=!0,e.pause())}),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var o=0;o<_.length;o++)e.on(_[o],this.emit.bind(this,_[o]));return this._read=function(t){i("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===u&&(u=l7()),u(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),T._fromList=R,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(e,t){return void 0===h&&(h=ce()),h(T,e,t)})}}),cr=p({"node_modules/readable-stream/lib/_stream_transform.js"(e,t){t.exports=c;var r=l1().codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,n=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=r.ERR_TRANSFORM_WITH_LENGTH_0,s=l4();function l(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new n);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),i(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length0,l=o=function(e){h||(h=e),e&&d.forEach(s),m||(d.forEach(s),c(h))},u=!1,o=function(){u||(u=!0,l.apply(void 0,arguments))},f=!1,e.on("close",function(){f=!0}),void 0===r&&(r=l9()),r(e,{readable:m,writable:n},function(e){if(e)return o(e);f=!0,o()}),p=!1,function(t){if(!f&&!p){if(p=!0,e.setHeader&&"function"==typeof e.abort)return e.abort();if("function"==typeof e.destroy)return e.destroy();o(t||new a("pipe"))}}});return t.reduce(l)}}}),ca=p({"node_modules/stream-browserify/index.js"(e,t){t.exports=i;var r=tw().EventEmitter;function i(){r.call(this)}s3()(i,r),i.Readable=ct(),i.Writable=l5(),i.Duplex=l4(),i.Transform=cr(),i.PassThrough=ci(),i.finished=l9(),i.pipeline=cn(),i.Stream=i,i.prototype.pipe=function(e,t){var i=this;function n(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function a(){i.readable&&i.resume&&i.resume()}i.on("data",n),e.on("drain",a),e._isStdio||t&&!1===t.end||(i.on("end",s),i.on("close",l));var o=!1;function s(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){i.removeListener("data",n),e.removeListener("drain",a),i.removeListener("end",s),i.removeListener("close",l),i.removeListener("error",c),e.removeListener("error",c),i.removeListener("end",u),i.removeListener("close",u),e.removeListener("close",u)}return i.on("error",c),e.on("error",c),i.on("end",u),i.on("close",u),e.on("close",u),e.emit("pipe",i),e}}}),co=p({"node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},i=0;i=o)return e;switch(e){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}default:return e}}),l=n[i];itypeof S&&!0===S.noDeprecation)return t;if(typeof S>"u")return function(){return e.deprecate(t,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(S.throwDeprecation)throw Error(r);S.traceDeprecation?console.trace(r):console.error(r),i=!0}return t.apply(this,arguments)}};var i={},n=/^$/;function a(t,r){var i={seen:[],stylize:s};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),d(r)?i.showHidden=r:r&&e._extend(i,r),g(i.showHidden)&&(i.showHidden=!1),g(i.depth)&&(i.depth=2),g(i.colors)&&(i.colors=!1),g(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=o),l(i,t,i.depth)}function o(e,t){var r=a.styles[t];return r?"\x1b["+a.colors[r][0]+"m"+e+"\x1b["+a.colors[r][1]+"m":e}function s(e,t){return e}function l(t,r,i){if(t.customInspect&&r&&_(r.inspect)&&r.inspect!==e.inspect&&!(r.constructor&&r.constructor.prototype===r)){var n,a,o,s,v,w,T=r.inspect(i,t);return m(T)||(T=l(t,T,i)),T}var M=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return p(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):f(t)?e.stylize("null","null"):void 0}(t,r);if(M)return M;var A=Object.keys(r),S=(v={},A.forEach(function(e,t){v[e]=!0}),v);if(t.showHidden&&(A=Object.getOwnPropertyNames(r)),b(r)&&(A.indexOf("message")>=0||A.indexOf("description")>=0))return c(r);if(0===A.length){if(_(r)){var E=r.name?": "+r.name:"";return t.stylize("[Function"+E+"]","special")}if(y(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(x(r))return t.stylize(Date.prototype.toString.call(r),"date");if(b(r))return c(r)}var C="",L=!1,P=["{","}"];return(h(r)&&(L=!0,P=["[","]"]),_(r)&&(C=" [Function"+(r.name?": "+r.name:"")+"]"),y(r)&&(C=" "+RegExp.prototype.toString.call(r)),x(r)&&(C=" "+Date.prototype.toUTCString.call(r)),b(r)&&(C=" "+c(r)),0!==A.length||L&&0!=r.length)?i<0?y(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),w=L?function(e,t,r,i,n){for(var a=[],o=0,s=t.length;o=0&&s++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?o[0]+(""===a?"":a+` `)+" "+n.join(`, `)+" "+o[1]:o[0]+a+" "+n.join(", ")+" "+o[1]):P[0]+C+P[1]}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,r,i,n,a){var o,s,c;if((c=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),k(i,n)||(o="["+n+"]"),s||(0>e.seen.indexOf(c.value)?(s=f(r)?l(e,c.value,null):l(e,c.value,r-1)).indexOf(` @@ -72,7 +72,7 @@ should equal -`):k=" ".concat(i," ").concat(k)),t=l.call(this,"".concat(M).concat(k))}return Error.stackTraceLimit=u,t.generatedMessage=!r,Object.defineProperty(o(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=s,t.expected=c,t.operator=i,Error.captureStackTrace&&Error.captureStackTrace(o(t),n),t.stack,t.name="AssertionError",a(t)}return s=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return f(this,i(i({},t),{},{customInspect:!1,depth:0}))}}],function(e,t){for(var r=0;r=0&&"[object Function]"===r.call(e.callee)),i}}}),cu=p({"node_modules/object-keys/implementation.js"(e,t){var r,i,n,a,o,s,l,c,u,h,d,f;Object.keys||(i=Object.prototype.hasOwnProperty,n=Object.prototype.toString,a=cc(),s=!(o=Object.prototype.propertyIsEnumerable).call({toString:null},"toString"),l=o.call(function(){},"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(e){var t=e.constructor;return t&&t.prototype===e},h={$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},d=function(){if(typeof window>"u")return!1;for(var e in window)try{if(!h["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{u(window[e])}catch{return!0}}catch{return!0}return!1}(),f=function(e){if(typeof window>"u"||!d)return u(e);try{return u(e)}catch{return!1}},r=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===n.call(e),o=a(e),u=t&&"[object String]"===n.call(e),h=[];if(!t&&!r&&!o)throw TypeError("Object.keys called on a non-object");var d=l&&r;if(u&&e.length>0&&!i.call(e,0))for(var p=0;p0)for(var m=0;m-1?i(a):a}}}),cy=p({"node_modules/define-properties/index.js"(e,t){var r=ch(),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),n=Object.prototype.toString,a=Array.prototype.concat,o=lq(),s=lH()(),l=function(e,t,r,i){if(t in e){if(!0===i){if(e[t]===r)return}else if("function"!=typeof i||"[object Function]"!==n.call(i)||!i())return}s?o(e,t,r,!0):o(e,t,r)},c=function(e,t){var n=arguments.length>2?arguments[2]:{},o=r(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;stypeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,n,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=a.call(r)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw n}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}}(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +`):k=" ".concat(i," ").concat(k)),t=l.call(this,"".concat(M).concat(k))}return Error.stackTraceLimit=u,t.generatedMessage=!r,Object.defineProperty(o(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=s,t.expected=c,t.operator=i,Error.captureStackTrace&&Error.captureStackTrace(o(t),n),t.stack,t.name="AssertionError",a(t)}return s=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return f(this,i(i({},t),{},{customInspect:!1,depth:0}))}}],function(e,t){for(var r=0;r=0&&"[object Function]"===r.call(e.callee)),i}}}),cu=p({"node_modules/object-keys/implementation.js"(e,t){var r,i,n,a,o,s,l,c,u,h,d,f;Object.keys||(i=Object.prototype.hasOwnProperty,n=Object.prototype.toString,a=cc(),s=!(o=Object.prototype.propertyIsEnumerable).call({toString:null},"toString"),l=o.call(function(){},"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(e){var t=e.constructor;return t&&t.prototype===e},h={$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},d=function(){if(typeof window>"u")return!1;for(var e in window)try{if(!h["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{u(window[e])}catch{return!0}}catch{return!0}return!1}(),f=function(e){if(typeof window>"u"||!d)return u(e);try{return u(e)}catch{return!1}},r=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===n.call(e),o=a(e),u=t&&"[object String]"===n.call(e),h=[];if(!t&&!r&&!o)throw TypeError("Object.keys called on a non-object");var d=l&&r;if(u&&e.length>0&&!i.call(e,0))for(var p=0;p0)for(var m=0;m-1?i(a):a}}}),cy=p({"node_modules/define-properties/index.js"(e,t){var r=ch(),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),n=Object.prototype.toString,a=Array.prototype.concat,o=lq(),s=lH()(),l=function(e,t,r,i){if(t in e){if(!0===i){if(e[t]===r)return}else if("function"!=typeof i||"[object Function]"!==n.call(i)||!i())return}s?o(e,t,r,!0):o(e,t,r)},c=function(e,t){var n=arguments.length>2?arguments[2]:{},o=r(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;stypeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,n,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=a.call(r)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw n}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}}(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=0x100000000}function I(e){return Object.keys(e).filter(P).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function z(e,t){if(e===t)return 0;for(var r=e.length,i=t.length,n=0,a=Math.min(r,i);n0){var o=e;if(!((o=String(o)).length>100)){var s=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(o);if(s){var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*l;case"days":case"day":case"d":return 864e5*l;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*l;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*l;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*l;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:break}}}return}if("number"===a&&!1===isNaN(e)){return t.long?r(i=e,864e5,"day")||r(i,36e5,"hour")||r(i,6e4,"minute")||r(i,1e3,"second")||i+" ms":(n=e)>=864e5?Math.round(n/864e5)+"d":n>=36e5?Math.round(n/36e5)+"h":n>=6e4?Math.round(n/6e4)+"m":n>=1e3?Math.round(n/1e3)+"s":n+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}}),cS=p({"node_modules/debug/src/debug.js"(e,t){var r;function i(t){function i(){if(i.enabled){var t=+new Date;i.diff=t-(r||t),i.prev=r,i.curr=t,r=t;for(var n=Array(arguments.length),a=0;atypeof S&&"env"in S&&(t=S.env.DEBUG),t}(e=t.exports=cS()).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),r){var i="color: "+this.color;t.splice(1,0,i,"color: inherit");var n=0,a=0;t[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(n++,"%c"===e&&(a=n))}),t.splice(a,0,i)}},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch{}},e.load=r,e.useColors=function(){return"u">typeof window&&!!window.process&&"renderer"===window.process.type||"u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage="u">typeof chrome&&"u">typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch{}}(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(r())}}),cC=p({"node_modules/stream-parser/index.js"(e,t){var r=ck(),i=cE()("stream-parser");function n(e){i("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=-1,e._parserCallback=null,"function"==typeof e.push&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function a(e,t){r(!this._parserCallback,'there is already a "callback" set!'),r(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||n(this),i("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=0}function o(e,t){r(!this._parserCallback,'there is already a "callback" set!'),r(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||n(this),i("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=1}function s(e,t){r(!this._parserCallback,'There is already a "callback" set!'),r(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||n(this),i("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=2}function l(e,t,r){this._parserInit||n(this),i("write(%o bytes)",e.length),"function"==typeof t&&(r=t),h(this,e,null,r)}function c(e,t,r){this._parserInit||n(this),i("transform(%o bytes)",e.length),"function"!=typeof t&&(t=this._parserOutput),h(this,e,t,r)}function u(e,t,r,n){if(e._parserBytesLeft-=t.length,i("%o bytes left for stream piece",e._parserBytesLeft),0===e._parserState?(e._parserBuffers.push(t),e._parserBuffered+=t.length):2===e._parserState&&r(t),0!==e._parserBytesLeft)return n;var a=e._parserCallback;if(a&&0===e._parserState&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),0!==e._parserState&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=-1,e._parserBuffers.splice(0),a){var o=[];t&&o.push(t),r&&o.push(r);var s=a.length>o.length;s&&o.push(d(n));var l=a.apply(e,o);if(!s||n===l)return n}}t.exports=function(e){var t=e&&"function"==typeof e._transform,r=e&&"function"==typeof e._write;if(!t&&!r)throw Error("must pass a Writable or Transform stream in");i("extending Parser into stream"),e._bytes=a,e._skipBytes=o,t&&(e._passthrough=s),t?e._transform=c:e._write=l};var h=d(function e(t,r,i,n){return t._parserBytesLeft<=0?n(Error("got data but not currently parsing anything")):r.length<=t._parserBytesLeft?function(){return u(t,r,i,n)}:function(){var a=r.slice(0,t._parserBytesLeft);return u(t,a,i,function(o){return o?n(o):r.length>a.length?function(){return e(t,r.slice(a.length),i,n)}:void 0})}});function d(e){return function(){for(var t=e.apply(this,arguments);"function"==typeof t;)t=t();return t}}}}),cL=p({"node_modules/probe-image-size/lib/common.js"(e){var t=ca().Transform,r=cC();function i(){t.call(this,{readableObjectMode:!0})}function n(e,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||"",this.name=this.constructor.name,this.message=e,t&&(this.code=t),r&&(this.statusCode=r)}i.prototype=Object.create(t.prototype),i.prototype.constructor=i,r(i.prototype),e.ParserStream=i,e.sliceEq=function(e,t,r){for(var i=t,n=0;n>16},e.readInt16BE=function(t,r){return e.readUInt16BE(t,r)<<16>>16},e.readUInt32LE=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+0x1000000*e[t+3]},e.readUInt32BE=function(e,t){return 0x1000000*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3])},e.readInt32LE=function(t,r){return 0|e.readUInt32LE(t,r)},e.readInt32BE=function(t,r){return 0|e.readUInt32BE(t,r)},n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,e.ProbeError=n}}),cP=p({"node_modules/probe-image-size/lib/miaf_utils.js"(e,t){var r=cL().readUInt16BE,i=cL().readUInt32BE;function n(e,t){if(e.length<4+t)return null;var r=i(e,t);return e.length>4&15,n=15&e[4],o=e[5]>>4&15,s=r(e,6),l=8,c=0;ct.width||e.width===t.width&&e.height>t.height?e:t}),l=o.reduce(function(e,t){return e.height>t.height||e.height===t.height&&e.width>t.width?e:t}),s.width>l.height||s.width===l.height&&s.height>l.width?s:l),u=1;t.transforms.forEach(function(e){var t={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if("imir"===e.type&&(0===e.value?u=r[u]:(u=t[u=r[u]],u=t[u])),"irot"===e.type)for(var i=0;i0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}},i.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw r("unexpected EOF","EBADDATA");return this.big_endian?256*t[e]+t[e+1]:t[e]+256*t[e+1]},i.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw r("unexpected EOF","EBADDATA");return this.big_endian?0x1000000*t[e]+65536*t[e+1]+256*t[e+2]+t[e+3]:t[e]+256*t[e+1]+65536*t[e+2]+0x1000000*t[e+3]},i.prototype.is_subifd_link=function(e,t){return 0===e&&34665===t||0===e&&34853===t||34665===e&&40965===t},i.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},i.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return this.input[t];case 6:return(r=this.input[t])|(128&r)*0x1fffffe;case 3:return this.read_uint16(t);case 8:return(r=this.read_uint16(t))|(32768&r)*131070;case 4:return this.read_uint32(t);case 9:return 0|(r=this.read_uint32(t));default:return null}},i.prototype.scan_ifd=function(e,t,i){var n=this.read_uint16(t);t+=2;for(var a=0;athis.input.length)throw r("unexpected EOF","EBADDATA");for(var f=[],p=h,m=0;m0&&(this.ifds_to_read.push({id:o,offset:f[0]}),d=!0),!1===i({is_big_endian:this.big_endian,ifd:e,tag:o,format:s,count:l,entry_offset:t+this.start,data_length:u,data_offset:h+this.start,value:f,is_subifd_link:d})){this.aborted=!0;return}t+=12}0===e&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})},t.exports.ExifParser=i,t.exports.get_orientation=function(e){var t=0;try{return new i(e,0,e.length).each(function(e){if(0===e.ifd&&274===e.tag&&Array.isArray(e.value))return t=e.value[0],!1}),t}catch{return -1}}}}),cz=p({"node_modules/probe-image-size/lib/parse_sync/avif.js"(e,t){var r=cL().str2arr,i=cL().sliceEq,n=cL().readUInt32BE,a=cP(),o=cI(),s=r("ftyp");t.exports=function(e){if(i(e,4,s)){var t=a.unbox(e,0);if(t){var r=a.getMimeType(t.data);if(r){for(var l,c=t.end;;){var u=a.unbox(e,c);if(!u)break;if(c=u.end,"mdat"===u.boxtype)return;if("meta"===u.boxtype){l=u.data;break}}if(l){var h=a.readSizeFromMeta(l);if(h){var d={width:h.width,height:h.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(h.variants.length>1&&(d.variants=h.variants),h.orientation&&(d.orientation=h.orientation),h.exif_location&&h.exif_location.offset+h.exif_location.length<=e.length){var f=n(e,h.exif_location.offset),p=e.slice(h.exif_location.offset+f+4,h.exif_location.offset+h.exif_location.length),m=o.get_orientation(p);m>0&&(d.orientation=m)}return d}}}}}}}}),cD=p({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(e,t){var r=cL().str2arr,i=cL().sliceEq,n=cL().readInt16LE,a=cL().readInt32LE,o=cL().readUInt32LE,s=r("BM");t.exports=function(e){if(!(e.length<26)&&i(e,0,s)){var t,r,l=o(e,14);if(12===l)r=n(e,18),t=n(e,20);else{if(!(l>12))return;r=a(e,18),t=a(e,22)}return{width:r,height:Math.abs(t),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}}),cO=p({"node_modules/probe-image-size/lib/parse_sync/gif.js"(e,t){var r=cL().str2arr,i=cL().sliceEq,n=cL().readUInt16LE,a=r("GIF87a"),o=r("GIF89a");t.exports=function(e){if(!(e.length<10)&&!(!i(e,0,a)&&!i(e,0,o)))return{width:n(e,6),height:n(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),cR=p({"node_modules/probe-image-size/lib/parse_sync/ico.js"(e,t){var r=cL().readUInt16LE;t.exports=function(e){var t=r(e,0),i=r(e,2),n=r(e,4);if(!(0!==t||1!==i||!n)&&!(e.length<6+16*n)){for(var a=[],o={width:0,height:0},s=0;so.width||c>o.height)&&(o=u)}return{width:o.width,height:o.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),cF=p({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(e,t){var r=cL().readUInt16BE,i=cL().str2arr,n=cL().sliceEq,a=cI(),o=i("Exif\0\0");t.exports=function(e){if(!(e.length<2)&&255===e[0]&&216===e[1]&&255===e[2])for(var t=2;;){for(;;){if(e.length-t<2)return;if(255===e[t++])break}for(var i,s,l=e[t++];255===l;)l=e[t++];if(l>=208&&l<=217||1===l)s=0;else{if(!(l>=192)||!(l<=254)||e.length-t<2)return;s=r(e,t)-2,t+=2}if(217===l||218===l)return;if(225===l&&s>=10&&n(e,t,o)&&(i=a.get_orientation(e.slice(t+6,t+s))),s>=5&&l>=192&&l<=207&&196!==l&&200!==l&&204!==l){if(e.length-t0&&(c.orientation=i),c}t+=s}}}}),cj=p({"node_modules/probe-image-size/lib/parse_sync/png.js"(e,t){var r=cL().str2arr,i=cL().sliceEq,n=cL().readUInt32BE,a=r(`\x89PNG\r  -`),o=r("IHDR");t.exports=function(e){if(!(e.length<24)&&i(e,0,a)&&i(e,12,o))return{width:n(e,16),height:n(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),cB=p({"node_modules/probe-image-size/lib/parse_sync/psd.js"(e,t){var r=cL().str2arr,i=cL().sliceEq,n=cL().readUInt32BE,a=r("8BPS\0\x01");t.exports=function(e){if(!(e.length<22)&&i(e,0,a))return{width:n(e,18),height:n(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),cN=p({"node_modules/probe-image-size/lib/parse_sync/svg.js"(e,t){function r(e){return"number"==typeof e&&isFinite(e)&&e>0}var i=/<[-_.:a-zA-Z0-9][^>]*>/,n=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,a=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,o=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,s=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,l=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function c(e){return l.test(e)?e.match(l)[0]:"px"}t.exports=function(e){if(function(e){var t,r=0,i=e.length;for(239===e[0]&&187===e[1]&&191===e[2]&&(r=3);re.length)){for(;t+8=10?r=r||function(e,t){if(157===e[t+3]&&1===e[t+4]&&42===e[t+5])return{width:16383&n(e,t+6),height:16383&n(e,t+8),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}(e,t+8):"VP8L"===d&&f>=5?r=r||function(e,t){if(47===e[t]){var r=a(e,t+1);return{width:(16383&r)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}(e,t+8):"VP8X"===d&&f>=10?r=r||{width:(e[(h=t+8)+6]<<16|e[h+5]<<8|e[h+4])+1,height:(e[h+9]<<16|e[h+8]<<8|e[h+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}:"EXIF"===d&&(c=o.get_orientation(e.slice(t+8,t+8+f)),t=1/0),t+=8+f}if(r)return c>0&&(r.orientation=c),r}}}}}),cq=p({"node_modules/probe-image-size/lib/parsers_sync.js"(e,t){t.exports={avif:cz(),bmp:cD(),gif:cO(),ico:cR(),jpeg:cF(),png:cj(),psd:cB(),svg:cN(),tiff:cU(),webp:cV()}}}),cH=p({"node_modules/probe-image-size/sync.js"(e,t){var r=cq();t.exports=function(e){for(var t=Object.keys(r),i=0;i0&&n.height>0?n:null}return null},t.exports.parsers=r}}),cG=p({"src/traces/image/helpers.js"(e){var t=cH(),r=iP().IMAGE_URL_PREFIX,i=s8().Buffer;e.getImageSize=function(e){return t(new i(e.replace(r,""),"base64"))}}}),cW=p({"src/traces/image/calc.js"(e,t){var r=tv(),i=sH(),n=C(),a=rn(),o=tv().maxRowLength,s=cG().getImageSize;t.exports=function(e,t){if(t._hasZ)c=t.z.length,u=o(t.z);else if(t._hasSource){var l=s(t.source);c=l.height,u=l.width}var c,u,h,d=a.getFromId(e,t.xaxis||"x"),f=a.getFromId(e,t.yaxis||"y"),p=d.d2c(t.x0)-t.dx/2,m=f.d2c(t.y0)-t.dy/2,g=[p,p+u*t.dx],y=[m,m+c*t.dy];if(d&&"log"===d.type)for(h=0;h0;)g=h.c2p(w+b*A),b--;for(b=0;void 0===v&&b0;)x=d.c2p(T+b*S),b--;gD[0];if(O||R){var F=m+E/2,j=v+C/2;I+="transform:"+n(F+"px",j+"px")+"scale("+(O?-1:1)+","+(R?-1:1)+")"+n(-F+"px",-j+"px")+";"}}P.attr("style",I);var B=new Promise(function(e){if(u._hasZ)e();else if(u._hasSource)if(u._canvas&&u._canvas.el.width===M&&u._canvas.el.height===k&&u._canvas.source===u.source)e();else{var t=document.createElement("canvas");t.width=M,t.height=k;var r=t.getContext("2d",{willReadFrequently:!0});u._image=u._image||new Image;var i=u._image;i.onload=function(){r.drawImage(i,0,0),u._canvas={el:t,source:u.source},e()},i.setAttribute("src",u.source)}}).then(function(){var e;if(u._hasZ)e=L(function(e,t){var r=_[t][e];return i.isTypedArray(r)&&(r=Array.from(r)),r}).toDataURL("image/png");else if(u._hasSource)if(p)e=u.source;else{var t=u._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,M,k).data;e=L(function(e,r){var i=4*(r*M+e);return[t[i],t[i+1],t[i+2],t[i+3]]}).toDataURL("image/png")}P.attr({"xlink:href":e,height:C,width:E,x:m,y:v})});e._promises.push(B)})}}}),cZ=p({"src/traces/image/style.js"(e,t){var r=T();t.exports=function(e){r.select(e).selectAll(".im image").style("opacity",function(e){return e[0].trace.opacity})}}}),c$=p({"src/traces/image/hover.js"(e,t){var r=rD(),i=tv(),n=i.isArrayOrTypedArray,a=sH();t.exports=function(e,t,o){var s=e.cd[0],l=s.trace,c=e.xa,u=e.ya;if(!(r.inbox(t-s.x0,t-(s.x0+s.w*l.dx),0)>0||r.inbox(o-s.y0,o-(s.y0+s.h*l.dy),0)>0)){var h,d=Math.floor((t-s.x0)/l.dx),f=Math.floor(Math.abs(o-s.y0)/l.dy);if(l._hasZ?h=s.z[f][d]:l._hasSource&&(h=l._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(d,f,1,1).data),h){var p,m,g=s.hi||l.hoverinfo;if(g){var y=g.split("+");-1!==y.indexOf("all")&&(y=["color"]),-1!==y.indexOf("color")&&(m=!0)}var v=a.colormodel[l.colormodel],x=v.colormodel||l.colormodel,b=x.length,_=l._scaler(h),w=v.suffix,T=[];(l.hovertemplate||m)&&(T.push("["+[_[0]+w[0],_[1]+w[1],_[2]+w[2]].join(", ")),4===b&&T.push(", "+_[3]+w[3]),T.push("]"),T=T.join(""),e.extraText=x.toUpperCase()+": "+T),n(l.hovertext)&&n(l.hovertext[f])?p=l.hovertext[f][d]:n(l.text)&&n(l.text[f])&&(p=l.text[f][d]);var M=u.c2p(s.y0+(f+.5)*l.dy),k=s.x0+(d+.5)*l.dx,A=s.y0+(f+.5)*l.dy,S="["+h.slice(0,l.colormodel.length).join(", ")+"]";return[i.extendFlat(e,{index:[f,d],x0:c.c2p(s.x0+d*l.dx),x1:c.c2p(s.x0+(d+1)*l.dx),y0:M,y1:M,color:_,xVal:k,xLabelVal:k,yVal:A,yLabelVal:A,zLabelVal:S,text:p,hovertemplateLabels:{zLabel:S,colorLabel:T,"color[0]Label":_[0]+w[0],"color[1]Label":_[1]+w[1],"color[2]Label":_[2]+w[2],"color[3]Label":_[3]+w[3]}})]}}}}}),cX=p({"src/traces/image/event_data.js"(e,t){t.exports=function(e,t){return"xVal"in t&&(e.x=t.xVal),"yVal"in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e.color=t.color,e.colormodel=t.trace.colormodel,e.z||(e.z=t.color),e}}}),cK=p({"src/traces/image/index.js"(e,t){t.exports={attributes:(s1(),v(sG)).default,supplyDefaults:s2(),calc:cW(),plot:cY(),style:cZ(),hoverPoints:c$(),eventData:cX(),moduleType:"trace",name:"image",basePlotModule:np(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),cJ=p({"lib/image.js"(e,t){t.exports=cK()}}),cQ=p({"src/traces/pie/attributes.js"(e,t){var r=Z(),i=at().attributes,n=H(),a=Q(),{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:l}=eW(),c=q().extendFlat,u=eH().pattern,h=n({editType:"plot",arrayOk:!0,colorEditType:"plot"});t.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:a.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:u,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:c({},r.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:l(),texttemplate:s({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:l({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:c({},h,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:c({},h,{}),outsidetextfont:c({},h,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:c({},r.showlegend,{arrayOk:!0}),legend:c({},r.legend,{arrayOk:!0}),legendrank:c({},r.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},h,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:i({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"}}}}),c0=p({"src/traces/pie/defaults.js"(e,t){var r=C(),i=tv(),n=cQ(),a=at().defaults,o=aM().handleText,s=tv().coercePattern;function l(e,t){var n=i.isArrayOrTypedArray(e),a=i.isArrayOrTypedArray(t),o=Math.min(n?e.length:1/0,a?t.length:1/0);if(isFinite(o)||(o=0),o&&a){for(var s,l=0;l0){s=!0;break}}s||(o=0)}return{hasLabels:n,hasValues:a,len:o}}function c(e,t,r,i,n){i("marker.line.width")&&i("marker.line.color",n?void 0:r.paper_bgcolor);var a=i("marker.colors");s(i,"marker.pattern",a),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}t.exports={handleLabelsAndValues:l,handleMarkerDefaults:c,supplyDefaults:function(e,t,r,s){function u(r,a){return i.coerce(e,t,n,r,a)}var h,d=l(u("labels"),u("values")),f=d.len;if(t._hasLabels=d.hasLabels,t._hasValues=d.hasValues,!t._hasLabels&&t._hasValues&&(u("label0"),u("dlabel")),!f){t.visible=!1;return}t._length=f,c(e,t,s,u,!0),u("scalegroup");var p=u("text"),m=u("texttemplate");if(u("texttemplatefallback"),m||(h=u("textinfo",i.isArrayOrTypedArray(p)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),m||h&&"none"!==h){var g=u("textposition");o(e,t,s,u,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&u("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&u("insidetextorientation")}else"none"===h&&u("textposition","none");a(t,s,u);var y=u("hole");if(u("title.text")){var v=u("title.position",y?"middle center":"top center");y||"middle center"!==v||(t.title.position="top center"),i.coerceFont(u,"title.font",s.font)}u("sort"),u("direction"),u("rotation"),u("pull")}}}}),c1=p({"src/traces/pie/layout_attributes.js"(e,t){t.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),c2=p({"src/traces/pie/layout_defaults.js"(e,t){var r=tv(),i=c1();t.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("hiddenlabels"),n("piecolorway",t.colorway),n("extendpiecolors")}}}),c3=p({"src/traces/pie/calc.js"(e,t){var r=C(),i=ee(),n={};function a(e){return function(t,r){if(!t||!i.isValid(t))return!1;let n=i.rgbaString(t);return e[r]||(e[r]=n),n}}function o(e,t){var r,n=JSON.stringify(e),a=t[n];if(!a){for(a=e.slice(),r=0;r=0}),("funnelarea"===t.type?y:t.sort)&&o.sort(function(e,t){return t.v-e.v}),o[0]&&(o[0].vTotal=g),o},crossTraceCalc:function(e,t){var r=(t||{}).type;r||(r="pie");var i=e._fullLayout,a=e.calcdata,s=i[r+"colorway"],l=i["_"+r+"colormap"];i["extend"+r+"colors"]&&(s=o(s,n));for(var c=0,u=0;u"),name:h.hovertemplate||-1!==d.indexOf("name")?h.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:m.castOption(_.bgcolor,e.pts)||e.color,borderColor:m.castOption(_.bordercolor,e.pts),fontFamily:m.castOption(w.family,e.pts),fontSize:m.castOption(w.size,e.pts),fontColor:m.castOption(w.color,e.pts),nameLength:m.castOption(_.namelength,e.pts),textAlign:m.castOption(_.align,e.pts),hovertemplate:m.castOption(h.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[g(e,h)]},{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:t,inOut_bbox:T}),e.bbox=T[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,t.emit("plotly_hover",{points:[g(e,h)],event:r.event})}}),e.on("mouseout",function(e){var i=t._fullLayout,a=t._fullData[c.index],o=r.select(this).datum();c._hasHoverEvent&&(e.originalEvent=r.event,t.emit("plotly_unhover",{points:[g(o,a)],event:r.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(n.loneUnhover(i._hoverlayer.node()),c._hasHoverLabel=!1)}),e.on("click",function(e){var i=t._fullLayout,a=t._fullData[c.index];t._dragging||!1===i.hovermode||(t._hoverdata=[g(e,a)],n.click(t,r.event))})}function x(e,t,r){var i=m.castOption(e.insidetextfont.color,t.pts);!i&&e._input.textfont&&(i=m.castOption(e._input.textfont.color,t.pts));var n=m.castOption(e.insidetextfont.family,t.pts)||m.castOption(e.textfont.family,t.pts)||r.family,o=m.castOption(e.insidetextfont.size,t.pts)||m.castOption(e.textfont.size,t.pts)||r.size,s=m.castOption(e.insidetextfont.weight,t.pts)||m.castOption(e.textfont.weight,t.pts)||r.weight,l=m.castOption(e.insidetextfont.style,t.pts)||m.castOption(e.textfont.style,t.pts)||r.style,c=m.castOption(e.insidetextfont.variant,t.pts)||m.castOption(e.textfont.variant,t.pts)||r.variant,u=m.castOption(e.insidetextfont.textcase,t.pts)||m.castOption(e.textfont.textcase,t.pts)||r.textcase,h=m.castOption(e.insidetextfont.lineposition,t.pts)||m.castOption(e.textfont.lineposition,t.pts)||r.lineposition,d=m.castOption(e.insidetextfont.shadow,t.pts)||m.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:i||a.contrast(t.color),family:n,size:o,weight:s,style:l,variant:c,textcase:u,lineposition:h,shadow:d}}function b(e,t){for(var r,i,n=0;nl&&l>u||c=-4;g-=2)y(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)y(Math.PI*(g+1),"tan")}if(h||f){for(g=4;g>=-4;g-=2)y(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)y(Math.PI*(g+.5),"rad")}}if(s||p||h){if((a={scale:n*i*2/Math.sqrt(e.width*e.width+e.height*e.height),rCenter:1-n,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,a.scale>=1)return a;m.push(a)}(p||f)&&((a=w(e,i,o,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(a)),(p||d)&&((a=M(e,i,o,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(a));for(var v=0,x=0,b=0;b=1)break}return m[v]}function w(e,t,r,i,n){t=Math.max(0,t-2*p);var a=e.width/e.height,o=S(a,i,t,r);return{scale:2*o/e.height,rCenter:k(a,o/t),rotate:A(n)}}function M(e,t,r,i,n){t=Math.max(0,t-2*p);var a=e.height/e.width,o=S(a,i,t,r);return{scale:2*o/e.width,rCenter:k(a,o/t),rotate:A(n+Math.PI/2)}}function k(e,t){return Math.cos(t)-e*t}function A(e){return(180/Math.PI*e+720)%180-90}function S(e,t,r,i){var n=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(n*n+.5)+n),i/(Math.sqrt(e*e+i/2)+e))}function E(e,t){var r=t.pxmid[0],i=t.pxmid[1],n=e.width/2,a=e.height/2;return r<0&&(n*=-1),i<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:n+Math.abs(a)*(n>0?1:-1)/2,y:a/(1+r*r/(i*i)),outside:!0}}function C(e,t){var r,i,n,a=1,o=1,s=e.trace,l={x:e.cx,y:e.cy},c={tx:0,ty:0};c.ty+=s.title.font.size,n=P(s),-1!==s.title.position.indexOf("top")?(l.y-=(1+n)*e.r,c.ty-=e.titleBox.height):-1!==s.title.position.indexOf("bottom")&&(l.y+=(1+n)*e.r);var u=(r=e.r,r/(void 0===(i=e.trace.aspectratio)?1:i)),h=t.w*(s.domain.x[1]-s.domain.x[0])/2;return -1!==s.title.position.indexOf("left")?(h+=u,l.x-=(1+n)*u,c.tx+=e.titleBox.width/2):-1!==s.title.position.indexOf("center")?h*=2:-1!==s.title.position.indexOf("right")&&(h+=u,l.x+=(1+n)*u,c.tx-=e.titleBox.width/2),a=h/e.titleBox.width,o=L(e,t)/e.titleBox.height,{x:l.x,y:l.y,scale:Math.min(a,o),tx:c.tx,ty:c.ty}}function L(e,t){var r=e.trace,i=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,i/2)}function P(e){var t,r=e.pull;if(!r)return 0;if(s.isArrayOrTypedArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function I(e,t){for(var r=[],i=0;i1?l=(s=r.r)/n.aspectratio:s=(l=r.r)*n.aspectratio,s*=(1+n.baseratio)/2,o=s*l),c=Math.min(c,o/r.vTotal));for(i=0;i")}if(a){var x=s.castOption(n,t.i,"texttemplate");if(x){var b={label:t.label,value:t.v,valueLabel:m.formatPieValue(t.v,i.separators),percent:t.v/r.vTotal,percentLabel:m.formatPiePercent(t.v/r.vTotal,i.separators),color:t.color,text:t.text,customdata:s.castOption(n,t.i,"customdata")},_=m.getFirstFilled(n.text,t.pts);(y(_)||""===_)&&(b.text=_),t.text=s.texttemplateString({data:[b,n._meta],fallback:n.texttemplatefallback,labels:b,locale:e._fullLayout._d3locale,template:x})}else t.text=""}}function O(e,t){var r=e.rotate*Math.PI/180,i=Math.cos(r),n=Math.sin(r),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*i-o*n,e.textY=a*n+o*i,e.noCenter=!0}t.exports={plot:function(e,t){var n=e._context.staticPlot,h=e._fullLayout,p=h._size;f("pie",h),b(t,e),I(t,p);var g=s.makeTraceGroups(h._pielayer,t,"trace").each(function(t){var f=r.select(this),g=t[0],y=g.trace;(function(e){var t,r,i,n=e[0],a=n.r,o=n.trace,s=m.getRotationAngle(o.rotation),l=2*Math.PI/n.vTotal,c="px0",u="px1";if("counterclockwise"===o.direction){for(t=0;tn.vTotal/2),r.halfangle=Math.PI*Math.min(r.v/n.vTotal,.5),r.ring=1-o.hole,r.rInscribed=r.v!==n.vTotal||n.trace.hole?Math.min(1/(1+1/Math.sin(r.halfangle)),r.ring/2):1)})(t),f.attr("stroke-linejoin","round"),f.each(function(){var b,w,T=r.select(this).selectAll("g.slice").data(t);T.enter().append("g").classed("slice",!0),T.exit().remove();var M=[[[],[]],[[],[]]],k=!1;T.each(function(i,a){if(i.hidden)return void r.select(this).selectAll("path,g").remove();i.pointNumber=i.i,i.curveNumber=y.index,M[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var l=g.cx,c=g.cy,f=r.select(this),p=f.selectAll("path.surface").data([i]);if(p.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),f.call(v,e,t),y.pull){var b=+m.castOption(y.pull,i.pts)||0;b>0&&(l+=b*i.pxmid[0],c+=b*i.pxmid[1])}function w(e,t,r,n){var a=n*(t[0]-e[0]),o=n*(t[1]-e[1]);return"a"+n*g.r+","+n*g.r+" 0 "+i.largeArc+(r?" 1 ":" 0 ")+a+","+o}i.cxFinal=l,i.cyFinal=c;var T=y.hole;if(i.v===g.vTotal){var A="M"+(l+i.px0[0])+","+(c+i.px0[1])+w(i.px0,i.pxmid,!0,1)+w(i.pxmid,i.px0,!0,1)+"Z";T?p.attr("d","M"+(l+T*i.px0[0])+","+(c+T*i.px0[1])+w(i.px0,i.pxmid,!1,T)+w(i.pxmid,i.px0,!1,T)+"Z"+A):p.attr("d",A)}else{var S=w(i.px0,i.px1,!0,1);if(T){var C=1-T;p.attr("d","M"+(l+T*i.px1[0])+","+(c+T*i.px1[1])+w(i.px1,i.px0,!1,T)+"l"+C*i.px0[0]+","+C*i.px0[1]+S+"Z")}else p.attr("d","M"+l+","+c+"l"+i.px0[0]+","+i.px0[1]+S+"Z")}D(e,i,g);var L=m.castOption(y.textposition,i.pts),P=f.selectAll("g.slicetext").data(i.text&&"none"!==L?[0]:[]);P.enter().append("g").classed("slicetext",!0),P.exit().remove(),P.each(function(){var n=s.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),f=s.ensureUniformFontSize(e,"outside"===L?(p=y,v=i,b=h.font,{color:m.castOption(p.outsidetextfont.color,v.pts)||m.castOption(p.textfont.color,v.pts)||b.color,family:m.castOption(p.outsidetextfont.family,v.pts)||m.castOption(p.textfont.family,v.pts)||b.family,size:m.castOption(p.outsidetextfont.size,v.pts)||m.castOption(p.textfont.size,v.pts)||b.size,weight:m.castOption(p.outsidetextfont.weight,v.pts)||m.castOption(p.textfont.weight,v.pts)||b.weight,style:m.castOption(p.outsidetextfont.style,v.pts)||m.castOption(p.textfont.style,v.pts)||b.style,variant:m.castOption(p.outsidetextfont.variant,v.pts)||m.castOption(p.textfont.variant,v.pts)||b.variant,textcase:m.castOption(p.outsidetextfont.textcase,v.pts)||m.castOption(p.textfont.textcase,v.pts)||b.textcase,lineposition:m.castOption(p.outsidetextfont.lineposition,v.pts)||m.castOption(p.textfont.lineposition,v.pts)||b.lineposition,shadow:m.castOption(p.outsidetextfont.shadow,v.pts)||m.castOption(p.textfont.shadow,v.pts)||b.shadow}):x(y,i,h.font));n.text(i.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(o.font,f).call(u.convertToTspans,e);var p,v,b,w,T=o.bBox(n.node());if("outside"===L)w=E(T,i);else if(w=_(T,i,g),"auto"===L&&w.scale<1){var M=s.ensureUniformFontSize(e,y.outsidetextfont);n.call(o.font,M),w=E(T=o.bBox(n.node()),i)}var A=w.textPosAngle,S=void 0===A?i.pxmid:z(g.r,A);if(w.targetX=l+S[0]*w.rCenter+(w.x||0),w.targetY=c+S[1]*w.rCenter+(w.y||0),O(w,T),w.outside){var C=w.targetY;i.yLabelMin=C-T.height/2,i.yLabelMid=C,i.yLabelMax=C+T.height/2,i.labelExtraX=0,i.labelExtraY=0,k=!0}w.fontSize=f.size,d(y.type,w,h),t[a].transform=w,s.setTransormAndDisplay(n,w)})});var A=r.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);if(A.enter().append("g").classed("titletext",!0),A.exit().remove(),A.each(function(){var t,i,n,a=s.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),h=y.title.text;y._meta&&(h=s.templateString(h,y._meta)),a.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(o.font,y.title.font).call(u.convertToTspans,e),n="middle center"===y.title.position?(i=Math.sqrt((t=g).titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height),{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/i,tx:0,ty:-t.titleBox.height/2+t.trace.title.font.size}):C(g,p),a.attr("transform",c(n.x,n.y)+l(Math.min(1,n.scale))+c(n.tx,n.ty))}),k&&function(e,t){var r,i,n,a,o,l,c,u,h,d,f,p,g;function y(e,t){return e.pxmid[1]-t.pxmid[1]}function v(e,t){return t.pxmid[1]-e.pxmid[1]}for(i=0;i<2;i++)for(n=i?y:v,o=i?Math.max:Math.min,c=i?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,l=r?1:-1,(u=e[i][r]).sort(n),d=(h=e[1-i][r]).concat(u),p=[],f=0;f0&&(e.labelExtraY=x),s.isArrayOrTypedArray(t.pull))for(u=0;u=(m.castOption(t.pull,h.pts)||0))&&((e.pxmid[1]-h.pxmid[1])*c>0?(x=h.cyFinal+o(h.px0[1],h.px1[1])-g-e.labelExtraY)*c>0&&(e.labelExtraY+=x):(y+e.labelExtraY-v)*c>0&&(n=3*l*Math.abs(u-d.indexOf(e)),(f=h.cxFinal+a(h.px0[0],h.px1[0])+n-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*l>0&&(e.labelExtraX+=f)))}(p[f],x)}}}(M,y),b=T,w=y,b.each(function(e){var t=r.select(this);if(!e.labelExtraX&&!e.labelExtraY)return void t.select("path.textline").remove();var i=t.select("g.slicetext text");e.transform.targetX+=e.labelExtraX,e.transform.targetY+=e.labelExtraY,s.setTransormAndDisplay(i,e.transform);var n=e.cxFinal+e.pxmid[0],o="M"+n+","+(e.cyFinal+e.pxmid[1]),l=(e.yLabelMax-e.yLabelMin)*(e.pxmid[0]<0?-1:1)/4;if(e.labelExtraX){var c=e.labelExtraX*e.pxmid[1]/e.pxmid[0],u=e.yLabelMid+e.labelExtraY-(e.cyFinal+e.pxmid[1]);Math.abs(c)>Math.abs(u)?o+="l"+u*e.pxmid[0]/e.pxmid[1]+","+u+"H"+(n+e.labelExtraX+l):o+="l"+e.labelExtraX+","+c+"v"+(u-c)+"h"+l}else o+="V"+(e.yLabelMid+e.labelExtraY)+"h"+l;s.ensureSingle(t,"path","textline").call(a.stroke,w.outsidetextfont.color).attr({"stroke-width":Math.min(2,w.outsidetextfont.size/8),d:o,fill:"none"})}),k&&y.automargin){var S=o.bBox(f.node()),L=y.domain,P=p.w*(L.x[1]-L.x[0]),I=p.h*(L.y[1]-L.y[0]),R=(.5*P-g.r)/p.w,F=(.5*I-g.r)/p.h;i.autoMargin(e,"pie."+y.uid+".automargin",{xl:L.x[0]-R,xr:L.x[1]+R,yb:L.y[0]-F,yt:L.y[1]+F,l:Math.max(g.cx-g.r-S.left,0),r:Math.max(S.right-(g.cx+g.r),0),b:Math.max(S.bottom-(g.cy+g.r),0),t:Math.max(g.cy-g.r-S.top,0),pad:5})}})});setTimeout(function(){g.selectAll("tspan").each(function(){var e=r.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))})},0)},formatSliceLabel:D,transformInsideText:_,determineInsideTextFont:x,positionTitleOutside:C,prerenderTitles:b,layoutAreas:I,attachFxHandlers:v,computeTransform:O}}}),c6=p({"src/traces/pie/style.js"(e,t){var r=T(),i=rT(),n=aE().resizeText;t.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");n(e,t,"pie"),t.each(function(t){var n=t[0].trace,a=r.select(this);a.style({opacity:n.opacity}),a.selectAll("path.surface").each(function(t){r.select(this).call(i,t,n,e)})})}}}),c8=p({"src/traces/pie/base_plot.js"(e){var t=tD();e.name="pie",e.plot=function(r,i,n,a){t.plotBasePlot(e.name,r,i,n,a)},e.clean=function(r,i,n,a){t.cleanBasePlot(e.name,r,i,n,a)}}}),c7=p({"src/traces/pie/index.js"(e,t){t.exports={attributes:cQ(),supplyDefaults:c0().supplyDefaults,supplyLayoutDefaults:c2(),layoutAttributes:c1(),calc:c3().calc,crossTraceCalc:c3().crossTraceCalc,plot:c4().plot,style:c6(),styleOne:rT(),moduleType:"trace",name:"pie",basePlotModule:c8(),categories:["pie-like","pie","showLegend"],meta:{}}}}),c9=p({"lib/pie.js"(e,t){t.exports=c7()}}),ue=p({"src/traces/sunburst/base_plot.js"(e){var t=tD();e.name="sunburst",e.plot=function(r,i,n,a){t.plotBasePlot(e.name,r,i,n,a)},e.clean=function(r,i,n,a){t.cleanBasePlot(e.name,r,i,n,a)}}}),ut=p({"src/traces/sunburst/constants.js"(e,t){t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),ur=p({"src/traces/sunburst/attributes.js"(e,t){var r=Z(),{hovertemplateAttrs:i,texttemplateAttrs:n,templatefallbackAttrs:a}=eW(),o=tV(),s=at().attributes,l=cQ(),c=ut(),u=q().extendFlat,h=eH().pattern;t.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:u({colors:{valType:"data_array",editType:"calc"},line:{color:u({},l.marker.line.color,{dflt:null}),width:u({},l.marker.line.width,{dflt:1}),editType:"calc"},pattern:h,editType:"calc"},o("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:l.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:n({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),texttemplatefallback:a({editType:"plot"}),hovertext:l.hovertext,hoverinfo:u({},r.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:i({},{keys:c.eventDataKeys}),hovertemplatefallback:a(),textfont:l.textfont,insidetextorientation:l.insidetextorientation,insidetextfont:l.insidetextfont,outsidetextfont:u({},l.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:l.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:s({name:"sunburst",trace:!0,editType:"calc"})}}}),ui=p({"src/traces/sunburst/layout_attributes.js"(e,t){t.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),un=p({"src/traces/sunburst/defaults.js"(e,t){var r=tv(),i=ur(),n=at().defaults,a=aM().handleText,o=c0().handleMarkerDefaults,s=t3(),l=s.hasColorscale,c=s.handleDefaults;t.exports=function(e,t,s,u){function h(n,a){return r.coerce(e,t,i,n,a)}var d=h("labels"),f=h("parents");if(!d||!d.length||!f||!f.length){t.visible=!1;return}var p=h("values");h(p&&p.length?"branchvalues":"count"),h("level"),h("maxdepth"),o(e,t,u,h);var m=t._hasColorscale=l(e,"marker","colors")||(e.marker||{}).coloraxis;m&&c(e,t,u,h,{prefix:"marker.",cLetter:"c"}),h("leaf.opacity",m?1:.7);var g=h("text");h("texttemplate"),h("texttemplatefallback"),t.texttemplate||h("textinfo",r.isArrayOrTypedArray(g)?"text+label":"label"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),a(e,t,u,h,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("insidetextorientation"),h("sort"),h("rotation"),h("root.color"),n(t,u,h),t._length=null}}}),ua=p({"src/traces/sunburst/layout_defaults.js"(e,t){var r=tv(),i=ui();t.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("sunburstcolorway",t.colorway),n("extendsunburstcolors")}}}),uo=p({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(e,t){var r;r=e,function(e){function t(e,t){return e.parent===t.parent?1:2}function r(e,t){return e+t.x}function i(e,t){return Math.max(e,t.y)}function n(e){var t=0,r=e.children,i=r&&r.length;if(i)for(;--i>=0;)t+=r[i].value;else t=1;e.value=t}function a(e,t){var r,i,n,a,s,u=new c(e),h=+e.value&&(u.value=e.value),d=[u];for(null==t&&(t=o);r=d.pop();)if(h&&(r.value=+r.data.value),(n=t(r.data))&&(s=n.length))for(r.children=Array(s),a=s-1;a>=0;--a)d.push(i=r.children[a]=new c(n[a])),i.parent=r,i.depth=r.depth+1;return u.eachBefore(l)}function o(e){return e.children}function s(e){e.data=e.data.data}function l(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function c(e){this.data=e,this.depth=this.height=0,this.parent=null}c.prototype=a.prototype={constructor:c,count:function(){return this.eachAfter(n)},each:function(e){var t,r,i,n,a=this,o=[a];do for(t=o.reverse(),o=[];a=t.pop();)if(e(a),r=a.children)for(i=0,n=r.length;i=0;--r)n.push(t[r]);return this},sum:function(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,i=t.children,n=i&&i.length;--n>=0;)r+=i[n].value;t.value=r})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),i=t.ancestors(),n=null;for(e=r.pop(),t=i.pop();e===t;)n=e,e=r.pop(),t=i.pop();return n}(t,e),i=[t];t!==r;)i.push(t=t.parent);for(var n=i.length;e!==r;)i.splice(n,0,e),e=e.parent;return i},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each(function(t){e.push(t)}),e},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t},copy:function(){return a(this).eachBefore(s)}};var u=Array.prototype.slice;function h(e){for(var t,r,i=0,n=(e=function(e){for(var t,r,i=e.length;i;)r=Math.random()*i--|0,t=e[i],e[i]=e[r],e[r]=t;return e}(u.call(e))).length,a=[];i0&&r*r>i*i+n*n}function p(e,t){for(var r=0;r(o*=o)?(i=(c+o-n)/(2*c),a=Math.sqrt(Math.max(0,o/c-i*i)),r.x=e.x-i*s-a*l,r.y=e.y-i*l+a*s):(i=(c+n-o)/(2*c),a=Math.sqrt(Math.max(0,n/c-i*i)),r.x=t.x+i*s-a*l,r.y=t.y+i*l+a*s)):(r.x=t.x+r.r,r.y=t.y)}function v(e,t){var r=e.r+t.r-1e-6,i=t.x-e.x,n=t.y-e.y;return r>0&&r*r>i*i+n*n}function x(e){var t=e._,r=e.next._,i=t.r+r.r,n=(t.x*r.r+r.x*t.r)/i,a=(t.y*r.r+r.y*t.r)/i;return n*n+a*a}function b(e){this._=e,this.next=null,this.previous=null}function _(e){var t,r,i,n,a,o,s,l,c,u,d;if(!(n=e.length))return 0;if((t=e[0]).x=0,t.y=0,!(n>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(n>2))return t.r+r.r;y(r,t,i=e[2]),t=new b(t),r=new b(r),i=new b(i),t.next=i.previous=r,r.next=t.previous=i,i.next=r.previous=t;e:for(s=3;sd&&(d=s),(f=Math.max(d/(g=u*u*m),g/h))>p){u-=s;break}p=f}y.push(o={value:u,dice:l1?t:1)},r}(N),q=function e(t){function r(e,r,i,n,a){if((o=e._squarify)&&o.ratio===t)for(var o,s,l,c,u,h=-1,d=o.length,f=e.value;++h1?t:1)},r}(N);e.cluster=function(){var e=t,n=1,a=1,o=!1;function s(t){var s,l=0;t.eachAfter(function(t){var n=t.children;n?(t.x=n.reduce(r,0)/n.length,t.y=1+n.reduce(i,0)):(t.x=s?l+=e(t,s):0,t.y=0,s=t)});var c=function(e){for(var t;t=e.children;)e=t[0];return e}(t),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(t),h=c.x-e(c,u)/2,d=u.x+e(u,c)/2;return t.eachAfter(o?function(e){e.x=(e.x-t.x)*n,e.y=(t.y-e.y)*a}:function(e){e.x=(e.x-h)/(d-h)*n,e.y=(1-(t.y?e.y/t.y:1))*a})}return s.separation=function(t){return arguments.length?(e=t,s):e},s.size=function(e){return arguments.length?(o=!1,n=+e[0],a=+e[1],s):o?null:[n,a]},s.nodeSize=function(e){return arguments.length?(o=!0,n=+e[0],a=+e[1],s):o?[n,a]:null},s},e.hierarchy=a,e.pack=function(){var e=null,t=1,r=1,i=T;function n(n){return n.x=t/2,n.y=r/2,e?n.eachBefore(A(e)).eachAfter(S(i,.5)).eachBefore(E(1)):n.eachBefore(A(k)).eachAfter(S(T,1)).eachAfter(S(i,n.r/Math.min(t,r))).eachBefore(E(Math.min(t,r)/(2*n.r))),n}return n.radius=function(t){return arguments.length?(e=null==t?null:w(t),n):e},n.size=function(e){return arguments.length?(t=+e[0],r=+e[1],n):[t,r]},n.padding=function(e){return arguments.length?(i="function"==typeof e?e:M(+e),n):i},n},e.packEnclose=h,e.packSiblings=function(e){return _(e),e},e.partition=function(){var e=1,t=1,r=0,i=!1;function n(n){var a,o,s=n.height+1;return n.x0=n.y0=r,n.x1=e,n.y1=t/s,n.eachBefore((a=t,o=s,function(e){e.children&&L(e,e.x0,a*(e.depth+1)/o,e.x1,a*(e.depth+2)/o);var t=e.x0,i=e.y0,n=e.x1-r,s=e.y1-r;n0)throw Error("cycle");return a}return r.id=function(t){return arguments.length?(e=w(t),r):e},r.parentId=function(e){return arguments.length?(t=w(e),r):t},r},e.tree=function(){var e=O,t=1,r=1,i=null;function n(n){var l=function(e){for(var t,r,i,n,a,o=new j(e,0),s=[o];t=s.pop();)if(i=t._.children)for(t.children=Array(a=i.length),n=a-1;n>=0;--n)s.push(r=t.children[n]=new j(i[n],n)),r.parent=t;return(o.parent=new j(null,0)).children=[o],o}(n);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),i)n.eachBefore(s);else{var c=n,u=n,h=n;n.eachBefore(function(e){e.xu.x&&(u=e),e.depth>h.depth&&(h=e)});var d=c===u?1:e(c,u)/2,f=d-c.x,p=t/(u.x+d+f),m=r/(h.depth||1);n.eachBefore(function(e){e.x=(e.x+f)*p,e.y=e.depth*m})}return n}function a(t){var r=t.children,i=t.parent.children,n=t.i?i[t.i-1]:null;if(r){!function(e){for(var t,r=0,i=0,n=e.children,a=n.length;--a>=0;)t=n[a],t.z+=r,t.m+=r,r+=t.s+(i+=t.c)}(t);var a=(r[0].z+r[r.length-1].z)/2;n?(t.z=n.z+e(t._,n._),t.m=t.z-a):t.z=a}else n&&(t.z=n.z+e(t._,n._));t.parent.A=function(t,r,i){if(r){for(var n,a,o,s=t,l=t,c=r,u=s.parent.children[0],h=s.m,d=l.m,f=c.m,p=u.m;c=F(c),s=R(s),c&&s;)u=R(u),(l=F(l)).a=t,(o=c.z+f-s.z-h+e(c._,s._))>0&&(function(e,t,r){var i=r/(t.i-e.i);t.c-=i,t.s+=r,e.c+=i,t.z+=r,t.m+=r}((n=c,a=i,n.a.parent===t.parent?n.a:a),t,o),h+=o,d+=o),f+=c.m,h+=s.m,p+=u.m,d+=l.m;c&&!F(l)&&(l.t=c,l.m+=f-d),s&&!R(u)&&(u.t=s,u.m+=h-p,i=t)}return i}(t,n,t.parent.A||i[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*r}return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(e){return arguments.length?(i=!1,t=+e[0],r=+e[1],n):i?null:[t,r]},n.nodeSize=function(e){return arguments.length?(i=!0,t=+e[0],r=+e[1],n):i?[t,r]:null},n},e.treemap=function(){var e=V,t=!1,r=1,i=1,n=[0],a=T,o=T,s=T,l=T,c=T;function u(e){return e.x0=e.y0=0,e.x1=r,e.y1=i,e.eachBefore(h),n=[0],t&&e.eachBefore(C),e}function h(t){var r=n[t.depth],i=t.x0+r,u=t.y0+r,h=t.x1-r,d=t.y1-r;h=r-1){var u=s[t];u.x0=n,u.y0=a,u.x1=o,u.y1=l;return}for(var h=c[t],d=i/2+h,f=t+1,p=r-1;f>>1;c[m]l-a){var v=(n*y+o*g)/i;e(t,f,g,n,a,v,l),e(f,r,y,v,a,o,l)}else{var x=(a*y+l*g)/i;e(t,f,g,n,a,o,x),e(f,r,y,n,x,o,l)}}(0,l,e.value,t,r,i,n)},e.treemapDice=L,e.treemapResquarify=q,e.treemapSlice=B,e.treemapSliceDice=function(e,t,r,i,n){(1&e.depth?B:L)(e,t,r,i,n)},e.treemapSquarify=V,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r=r||self).d3=r.d3||{})}}),us=p({"src/traces/sunburst/calc.js"(e){var t=uo(),r=C(),i=tv(),n=t3().makeColorScaleFuncFromTrace,a=c3().makePullColorFn,o=c3().generateExtendedColors,s=t3().calc,l=L().ALMOST_EQUAL,c={},u={},h={};e.calc=function(e,o){var c,u,h,d=e._fullLayout,f=o.ids,p=i.isArrayOrTypedArray(f),m=o.labels,g=o.parents,y=o.values,v=i.isArrayOrTypedArray(y),x=[],b={},_={},w=function(e){return e||"number"==typeof e},T=function(e){return!v||r(y[e])&&y[e]>=0};p?(c=Math.min(f.length,g.length),u=function(e){return w(f[e])&&T(e)},h=function(e){return String(f[e])}):(c=Math.min(m.length,g.length),u=function(e){return w(m[e])&&T(e)},h=function(e){return String(m[e])}),v&&(c=Math.min(c,y.length));for(var M=0;M1){for(var E=i.randstr(),C=0;C0}var i=/<[-_.:a-zA-Z0-9][^>]*>/,n=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,a=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,o=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,s=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,l=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function c(e){return l.test(e)?e.match(l)[0]:"px"}t.exports=function(e){if(function(e){var t,r=0,i=e.length;for(239===e[0]&&187===e[1]&&191===e[2]&&(r=3);re.length)){for(;t+8=10?r=r||function(e,t){if(157===e[t+3]&&1===e[t+4]&&42===e[t+5])return{width:16383&n(e,t+6),height:16383&n(e,t+8),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}(e,t+8):"VP8L"===d&&f>=5?r=r||function(e,t){if(47===e[t]){var r=a(e,t+1);return{width:(16383&r)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}(e,t+8):"VP8X"===d&&f>=10?r=r||{width:(e[(h=t+8)+6]<<16|e[h+5]<<8|e[h+4])+1,height:(e[h+9]<<16|e[h+8]<<8|e[h+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}:"EXIF"===d&&(c=o.get_orientation(e.slice(t+8,t+8+f)),t=1/0),t+=8+f}if(r)return c>0&&(r.orientation=c),r}}}}}),cq=p({"node_modules/probe-image-size/lib/parsers_sync.js"(e,t){t.exports={avif:cz(),bmp:cD(),gif:cO(),ico:cR(),jpeg:cF(),png:cj(),psd:cB(),svg:cN(),tiff:cU(),webp:cV()}}}),cH=p({"node_modules/probe-image-size/sync.js"(e,t){var r=cq();t.exports=function(e){for(var t=Object.keys(r),i=0;i0&&n.height>0?n:null}return null},t.exports.parsers=r}}),cG=p({"src/traces/image/helpers.js"(e){var t=cH(),r=iP().IMAGE_URL_PREFIX,i=s8().Buffer;e.getImageSize=function(e){return t(new i(e.replace(r,""),"base64"))}}}),cW=p({"src/traces/image/calc.js"(e,t){var r=tv(),i=sH(),n=C(),a=rn(),o=tv().maxRowLength,s=cG().getImageSize;t.exports=function(e,t){if(t._hasZ)c=t.z.length,u=o(t.z);else if(t._hasSource){var l=s(t.source);c=l.height,u=l.width}var c,u,h,d=a.getFromId(e,t.xaxis||"x"),f=a.getFromId(e,t.yaxis||"y"),p=d.d2c(t.x0)-t.dx/2,m=f.d2c(t.y0)-t.dy/2,g=[p,p+u*t.dx],y=[m,m+c*t.dy];if(d&&"log"===d.type)for(h=0;h0;)g=h.c2p(w+b*A),b--;for(b=0;void 0===v&&b0;)x=d.c2p(T+b*S),b--;gD[0];if(O||R){var F=m+E/2,j=v+C/2;I+="transform:"+n(F+"px",j+"px")+"scale("+(O?-1:1)+","+(R?-1:1)+")"+n(-F+"px",-j+"px")+";"}}P.attr("style",I);var B=new Promise(function(e){if(u._hasZ)e();else if(u._hasSource)if(u._canvas&&u._canvas.el.width===M&&u._canvas.el.height===k&&u._canvas.source===u.source)e();else{var t=document.createElement("canvas");t.width=M,t.height=k;var r=t.getContext("2d",{willReadFrequently:!0});u._image=u._image||new Image;var i=u._image;i.onload=function(){r.drawImage(i,0,0),u._canvas={el:t,source:u.source},e()},i.setAttribute("src",u.source)}}).then(function(){var e;if(u._hasZ)e=L(function(e,t){var r=_[t][e];return i.isTypedArray(r)&&(r=Array.from(r)),r}).toDataURL("image/png");else if(u._hasSource)if(p)e=u.source;else{var t=u._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,M,k).data;e=L(function(e,r){var i=4*(r*M+e);return[t[i],t[i+1],t[i+2],t[i+3]]}).toDataURL("image/png")}P.attr({"xlink:href":e,height:C,width:E,x:m,y:v})});e._promises.push(B)})}}}),cZ=p({"src/traces/image/style.js"(e,t){var r=T();t.exports=function(e){r.select(e).selectAll(".im image").style("opacity",function(e){return e[0].trace.opacity})}}}),c$=p({"src/traces/image/hover.js"(e,t){var r=rD(),i=tv(),n=i.isArrayOrTypedArray,a=sH();t.exports=function(e,t,o){var s=e.cd[0],l=s.trace,c=e.xa,u=e.ya;if(!(r.inbox(t-s.x0,t-(s.x0+s.w*l.dx),0)>0||r.inbox(o-s.y0,o-(s.y0+s.h*l.dy),0)>0)){var h,d=Math.floor((t-s.x0)/l.dx),f=Math.floor(Math.abs(o-s.y0)/l.dy);if(l._hasZ?h=s.z[f][d]:l._hasSource&&(h=l._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(d,f,1,1).data),h){var p,m,g=s.hi||l.hoverinfo;if(g){var y=g.split("+");-1!==y.indexOf("all")&&(y=["color"]),-1!==y.indexOf("color")&&(m=!0)}var v=a.colormodel[l.colormodel],x=v.colormodel||l.colormodel,b=x.length,_=l._scaler(h),w=v.suffix,T=[];(l.hovertemplate||m)&&(T.push("["+[_[0]+w[0],_[1]+w[1],_[2]+w[2]].join(", ")),4===b&&T.push(", "+_[3]+w[3]),T.push("]"),T=T.join(""),e.extraText=x.toUpperCase()+": "+T),n(l.hovertext)&&n(l.hovertext[f])?p=l.hovertext[f][d]:n(l.text)&&n(l.text[f])&&(p=l.text[f][d]);var M=u.c2p(s.y0+(f+.5)*l.dy),k=s.x0+(d+.5)*l.dx,A=s.y0+(f+.5)*l.dy,S="["+h.slice(0,l.colormodel.length).join(", ")+"]";return[i.extendFlat(e,{index:[f,d],x0:c.c2p(s.x0+d*l.dx),x1:c.c2p(s.x0+(d+1)*l.dx),y0:M,y1:M,color:_,xVal:k,xLabelVal:k,yVal:A,yLabelVal:A,zLabelVal:S,text:p,hovertemplateLabels:{zLabel:S,colorLabel:T,"color[0]Label":_[0]+w[0],"color[1]Label":_[1]+w[1],"color[2]Label":_[2]+w[2],"color[3]Label":_[3]+w[3]}})]}}}}}),cX=p({"src/traces/image/event_data.js"(e,t){t.exports=function(e,t){return"xVal"in t&&(e.x=t.xVal),"yVal"in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e.color=t.color,e.colormodel=t.trace.colormodel,e.z||(e.z=t.color),e}}}),cK=p({"src/traces/image/index.js"(e,t){t.exports={attributes:(s1(),v(sG)).default,supplyDefaults:s2(),calc:cW(),plot:cY(),style:cZ(),hoverPoints:c$(),eventData:cX(),moduleType:"trace",name:"image",basePlotModule:np(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),cJ=p({"lib/image.js"(e,t){t.exports=cK()}}),cQ=p({"src/traces/pie/attributes.js"(e,t){var r=Z(),i=at().attributes,n=H(),a=Q(),{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:l}=eW(),c=q().extendFlat,u=eH().pattern,h=n({editType:"plot",arrayOk:!0,colorEditType:"plot"});t.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:a.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:u,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:c({},r.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:l(),texttemplate:s({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:l({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:c({},h,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:c({},h,{}),outsidetextfont:c({},h,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:c({},r.showlegend,{arrayOk:!0}),legend:c({},r.legend,{arrayOk:!0}),legendrank:c({},r.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},h,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:i({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"}}}}),c0=p({"src/traces/pie/defaults.js"(e,t){var r=C(),i=tv(),n=cQ(),a=at().defaults,o=aM().handleText,s=tv().coercePattern;function l(e,t){var n=i.isArrayOrTypedArray(e),a=i.isArrayOrTypedArray(t),o=Math.min(n?e.length:1/0,a?t.length:1/0);if(isFinite(o)||(o=0),o&&a){for(var s,l=0;l0){s=!0;break}}s||(o=0)}return{hasLabels:n,hasValues:a,len:o}}function c(e,t,r,i,n){i("marker.line.width")&&i("marker.line.color",n?void 0:r.paper_bgcolor);var a=i("marker.colors");s(i,"marker.pattern",a),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}t.exports={handleLabelsAndValues:l,handleMarkerDefaults:c,supplyDefaults:function(e,t,r,s){function u(r,a){return i.coerce(e,t,n,r,a)}var h,d=l(u("labels"),u("values")),f=d.len;if(t._hasLabels=d.hasLabels,t._hasValues=d.hasValues,!t._hasLabels&&t._hasValues&&(u("label0"),u("dlabel")),!f){t.visible=!1;return}t._length=f,c(e,t,s,u,!0),u("scalegroup");var p=u("text"),m=u("texttemplate");if(u("texttemplatefallback"),m||(h=u("textinfo",i.isArrayOrTypedArray(p)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),m||h&&"none"!==h){var g=u("textposition");o(e,t,s,u,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&u("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&u("insidetextorientation")}else"none"===h&&u("textposition","none");a(t,s,u);var y=u("hole");if(u("title.text")){var v=u("title.position",y?"middle center":"top center");y||"middle center"!==v||(t.title.position="top center"),i.coerceFont(u,"title.font",s.font)}u("sort"),u("direction"),u("rotation"),u("pull")}}}}),c1=p({"src/traces/pie/layout_attributes.js"(e,t){t.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),c2=p({"src/traces/pie/layout_defaults.js"(e,t){var r=tv(),i=c1();t.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("hiddenlabels"),n("piecolorway",t.colorway),n("extendpiecolors")}}}),c3=p({"src/traces/pie/calc.js"(e,t){var r=C(),i=ee(),n={};function a(e){return function(t,r){if(!t||!i.isValid(t))return!1;let n=i.rgbaString(t);return e[r]||(e[r]=n),n}}function o(e,t){var r,n=JSON.stringify(e),a=t[n];if(!a){for(a=e.slice(),r=0;r=0}),("funnelarea"===t.type?y:t.sort)&&o.sort(function(e,t){return t.v-e.v}),o[0]&&(o[0].vTotal=g),o},crossTraceCalc:function(e,t){var r=(t||{}).type;r||(r="pie");var i=e._fullLayout,a=e.calcdata,s=i[r+"colorway"],l=i["_"+r+"colormap"];i["extend"+r+"colors"]&&(s=o(s,n));for(var c=0,u=0;u"),name:h.hovertemplate||-1!==d.indexOf("name")?h.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:m.castOption(_.bgcolor,e.pts)||e.color,borderColor:m.castOption(_.bordercolor,e.pts),fontFamily:m.castOption(w.family,e.pts),fontSize:m.castOption(w.size,e.pts),fontColor:m.castOption(w.color,e.pts),nameLength:m.castOption(_.namelength,e.pts),textAlign:m.castOption(_.align,e.pts),hovertemplate:m.castOption(h.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[g(e,h)]},{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:t,inOut_bbox:T}),e.bbox=T[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,t.emit("plotly_hover",{points:[g(e,h)],event:r.event})}}),e.on("mouseout",function(e){var i=t._fullLayout,a=t._fullData[c.index],o=r.select(this).datum();c._hasHoverEvent&&(e.originalEvent=r.event,t.emit("plotly_unhover",{points:[g(o,a)],event:r.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(n.loneUnhover(i._hoverlayer.node()),c._hasHoverLabel=!1)}),e.on("click",function(e){var i=t._fullLayout,a=t._fullData[c.index];t._dragging||!1===i.hovermode||(t._hoverdata=[g(e,a)],n.click(t,r.event))})}function x(e,t,r){var i=m.castOption(e.insidetextfont.color,t.pts);!i&&e._input.textfont&&(i=m.castOption(e._input.textfont.color,t.pts));var n=m.castOption(e.insidetextfont.family,t.pts)||m.castOption(e.textfont.family,t.pts)||r.family,o=m.castOption(e.insidetextfont.size,t.pts)||m.castOption(e.textfont.size,t.pts)||r.size,s=m.castOption(e.insidetextfont.weight,t.pts)||m.castOption(e.textfont.weight,t.pts)||r.weight,l=m.castOption(e.insidetextfont.style,t.pts)||m.castOption(e.textfont.style,t.pts)||r.style,c=m.castOption(e.insidetextfont.variant,t.pts)||m.castOption(e.textfont.variant,t.pts)||r.variant,u=m.castOption(e.insidetextfont.textcase,t.pts)||m.castOption(e.textfont.textcase,t.pts)||r.textcase,h=m.castOption(e.insidetextfont.lineposition,t.pts)||m.castOption(e.textfont.lineposition,t.pts)||r.lineposition,d=m.castOption(e.insidetextfont.shadow,t.pts)||m.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:i||a.contrast(t.color),family:n,size:o,weight:s,style:l,variant:c,textcase:u,lineposition:h,shadow:d}}function b(e,t){for(var r,i,n=0;nl&&l>u||c=-4;g-=2)y(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)y(Math.PI*(g+1),"tan")}if(h||f){for(g=4;g>=-4;g-=2)y(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)y(Math.PI*(g+.5),"rad")}}if(s||p||h){if((a={scale:n*i*2/Math.sqrt(e.width*e.width+e.height*e.height),rCenter:1-n,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,a.scale>=1)return a;m.push(a)}(p||f)&&((a=w(e,i,o,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(a)),(p||d)&&((a=M(e,i,o,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(a));for(var v=0,x=0,b=0;b=1)break}return m[v]}function w(e,t,r,i,n){t=Math.max(0,t-2*p);var a=e.width/e.height,o=S(a,i,t,r);return{scale:2*o/e.height,rCenter:k(a,o/t),rotate:A(n)}}function M(e,t,r,i,n){t=Math.max(0,t-2*p);var a=e.height/e.width,o=S(a,i,t,r);return{scale:2*o/e.width,rCenter:k(a,o/t),rotate:A(n+Math.PI/2)}}function k(e,t){return Math.cos(t)-e*t}function A(e){return(180/Math.PI*e+720)%180-90}function S(e,t,r,i){var n=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(n*n+.5)+n),i/(Math.sqrt(e*e+i/2)+e))}function E(e,t){var r=t.pxmid[0],i=t.pxmid[1],n=e.width/2,a=e.height/2;return r<0&&(n*=-1),i<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:n+Math.abs(a)*(n>0?1:-1)/2,y:a/(1+r*r/(i*i)),outside:!0}}function C(e,t){var r,i,n,a=1,o=1,s=e.trace,l={x:e.cx,y:e.cy},c={tx:0,ty:0};c.ty+=s.title.font.size,n=P(s),-1!==s.title.position.indexOf("top")?(l.y-=(1+n)*e.r,c.ty-=e.titleBox.height):-1!==s.title.position.indexOf("bottom")&&(l.y+=(1+n)*e.r);var u=(r=e.r,r/(void 0===(i=e.trace.aspectratio)?1:i)),h=t.w*(s.domain.x[1]-s.domain.x[0])/2;return -1!==s.title.position.indexOf("left")?(h+=u,l.x-=(1+n)*u,c.tx+=e.titleBox.width/2):-1!==s.title.position.indexOf("center")?h*=2:-1!==s.title.position.indexOf("right")&&(h+=u,l.x+=(1+n)*u,c.tx-=e.titleBox.width/2),a=h/e.titleBox.width,o=L(e,t)/e.titleBox.height,{x:l.x,y:l.y,scale:Math.min(a,o),tx:c.tx,ty:c.ty}}function L(e,t){var r=e.trace,i=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,i/2)}function P(e){var t,r=e.pull;if(!r)return 0;if(s.isArrayOrTypedArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function I(e,t){for(var r=[],i=0;i1?l=(s=r.r)/n.aspectratio:s=(l=r.r)*n.aspectratio,s*=(1+n.baseratio)/2,o=s*l),c=Math.min(c,o/r.vTotal));for(i=0;i")}if(a){var x=s.castOption(n,t.i,"texttemplate");if(x){var b={label:t.label,value:t.v,valueLabel:m.formatPieValue(t.v,i.separators),percent:t.v/r.vTotal,percentLabel:m.formatPiePercent(t.v/r.vTotal,i.separators),color:t.color,text:t.text,customdata:s.castOption(n,t.i,"customdata")},_=m.getFirstFilled(n.text,t.pts);(y(_)||""===_)&&(b.text=_),t.text=s.texttemplateString({data:[b,n._meta],fallback:n.texttemplatefallback,labels:b,locale:e._fullLayout._d3locale,template:x})}else t.text=""}}function O(e,t){var r=e.rotate*Math.PI/180,i=Math.cos(r),n=Math.sin(r),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*i-o*n,e.textY=a*n+o*i,e.noCenter=!0}t.exports={plot:function(e,t){var n=e._context.staticPlot,h=e._fullLayout,p=h._size;f("pie",h),b(t,e),I(t,p);var g=s.makeTraceGroups(h._pielayer,t,"trace").each(function(t){var f=r.select(this),g=t[0],y=g.trace;(function(e){var t,r,i,n=e[0],a=n.r,o=n.trace,s=m.getRotationAngle(o.rotation),l=2*Math.PI/n.vTotal,c="px0",u="px1";if("counterclockwise"===o.direction){for(t=0;tn.vTotal/2),r.halfangle=Math.PI*Math.min(r.v/n.vTotal,.5),r.ring=1-o.hole,r.rInscribed=r.v!==n.vTotal||n.trace.hole?Math.min(1/(1+1/Math.sin(r.halfangle)),r.ring/2):1)})(t),f.attr("stroke-linejoin","round"),f.each(function(){var b,w,T=r.select(this).selectAll("g.slice").data(t);T.enter().append("g").classed("slice",!0),T.exit().remove();var M=[[[],[]],[[],[]]],k=!1;T.each(function(i,a){if(i.hidden)return void r.select(this).selectAll("path,g").remove();i.pointNumber=i.i,i.curveNumber=y.index,M[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var l=g.cx,c=g.cy,f=r.select(this),p=f.selectAll("path.surface").data([i]);if(p.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),f.call(v,e,t),y.pull){var b=+m.castOption(y.pull,i.pts)||0;b>0&&(l+=b*i.pxmid[0],c+=b*i.pxmid[1])}function w(e,t,r,n){var a=n*(t[0]-e[0]),o=n*(t[1]-e[1]);return"a"+n*g.r+","+n*g.r+" 0 "+i.largeArc+(r?" 1 ":" 0 ")+a+","+o}i.cxFinal=l,i.cyFinal=c;var T=y.hole;if(i.v===g.vTotal){var A="M"+(l+i.px0[0])+","+(c+i.px0[1])+w(i.px0,i.pxmid,!0,1)+w(i.pxmid,i.px0,!0,1)+"Z";T?p.attr("d","M"+(l+T*i.px0[0])+","+(c+T*i.px0[1])+w(i.px0,i.pxmid,!1,T)+w(i.pxmid,i.px0,!1,T)+"Z"+A):p.attr("d",A)}else{var S=w(i.px0,i.px1,!0,1);if(T){var C=1-T;p.attr("d","M"+(l+T*i.px1[0])+","+(c+T*i.px1[1])+w(i.px1,i.px0,!1,T)+"l"+C*i.px0[0]+","+C*i.px0[1]+S+"Z")}else p.attr("d","M"+l+","+c+"l"+i.px0[0]+","+i.px0[1]+S+"Z")}D(e,i,g);var L=m.castOption(y.textposition,i.pts),P=f.selectAll("g.slicetext").data(i.text&&"none"!==L?[0]:[]);P.enter().append("g").classed("slicetext",!0),P.exit().remove(),P.each(function(){var n=s.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),f=s.ensureUniformFontSize(e,"outside"===L?(p=y,v=i,b=h.font,{color:m.castOption(p.outsidetextfont.color,v.pts)||m.castOption(p.textfont.color,v.pts)||b.color,family:m.castOption(p.outsidetextfont.family,v.pts)||m.castOption(p.textfont.family,v.pts)||b.family,size:m.castOption(p.outsidetextfont.size,v.pts)||m.castOption(p.textfont.size,v.pts)||b.size,weight:m.castOption(p.outsidetextfont.weight,v.pts)||m.castOption(p.textfont.weight,v.pts)||b.weight,style:m.castOption(p.outsidetextfont.style,v.pts)||m.castOption(p.textfont.style,v.pts)||b.style,variant:m.castOption(p.outsidetextfont.variant,v.pts)||m.castOption(p.textfont.variant,v.pts)||b.variant,textcase:m.castOption(p.outsidetextfont.textcase,v.pts)||m.castOption(p.textfont.textcase,v.pts)||b.textcase,lineposition:m.castOption(p.outsidetextfont.lineposition,v.pts)||m.castOption(p.textfont.lineposition,v.pts)||b.lineposition,shadow:m.castOption(p.outsidetextfont.shadow,v.pts)||m.castOption(p.textfont.shadow,v.pts)||b.shadow}):x(y,i,h.font));n.text(i.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(o.font,f).call(u.convertToTspans,e);var p,v,b,w,T=o.bBox(n.node());if("outside"===L)w=E(T,i);else if(w=_(T,i,g),"auto"===L&&w.scale<1){var M=s.ensureUniformFontSize(e,y.outsidetextfont);n.call(o.font,M),w=E(T=o.bBox(n.node()),i)}var A=w.textPosAngle,S=void 0===A?i.pxmid:z(g.r,A);if(w.targetX=l+S[0]*w.rCenter+(w.x||0),w.targetY=c+S[1]*w.rCenter+(w.y||0),O(w,T),w.outside){var C=w.targetY;i.yLabelMin=C-T.height/2,i.yLabelMid=C,i.yLabelMax=C+T.height/2,i.labelExtraX=0,i.labelExtraY=0,k=!0}w.fontSize=f.size,d(y.type,w,h),t[a].transform=w,s.setTransormAndDisplay(n,w)})});var A=r.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);if(A.enter().append("g").classed("titletext",!0),A.exit().remove(),A.each(function(){var t,i,n,a=s.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),h=y.title.text;y._meta&&(h=s.templateString(h,y._meta)),a.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(o.font,y.title.font).call(u.convertToTspans,e),n="middle center"===y.title.position?(i=Math.sqrt((t=g).titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height),{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/i,tx:0,ty:-t.titleBox.height/2+t.trace.title.font.size}):C(g,p),a.attr("transform",c(n.x,n.y)+l(Math.min(1,n.scale))+c(n.tx,n.ty))}),k&&function(e,t){var r,i,n,a,o,l,c,u,h,d,f,p,g;function y(e,t){return e.pxmid[1]-t.pxmid[1]}function v(e,t){return t.pxmid[1]-e.pxmid[1]}for(i=0;i<2;i++)for(n=i?y:v,o=i?Math.max:Math.min,c=i?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,l=r?1:-1,(u=e[i][r]).sort(n),d=(h=e[1-i][r]).concat(u),p=[],f=0;f0&&(e.labelExtraY=x),s.isArrayOrTypedArray(t.pull))for(u=0;u=(m.castOption(t.pull,h.pts)||0))&&((e.pxmid[1]-h.pxmid[1])*c>0?(x=h.cyFinal+o(h.px0[1],h.px1[1])-g-e.labelExtraY)*c>0&&(e.labelExtraY+=x):(y+e.labelExtraY-v)*c>0&&(n=3*l*Math.abs(u-d.indexOf(e)),(f=h.cxFinal+a(h.px0[0],h.px1[0])+n-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*l>0&&(e.labelExtraX+=f)))}(p[f],x)}}}(M,y),b=T,w=y,b.each(function(e){var t=r.select(this);if(!e.labelExtraX&&!e.labelExtraY)return void t.select("path.textline").remove();var i=t.select("g.slicetext text");e.transform.targetX+=e.labelExtraX,e.transform.targetY+=e.labelExtraY,s.setTransormAndDisplay(i,e.transform);var n=e.cxFinal+e.pxmid[0],o="M"+n+","+(e.cyFinal+e.pxmid[1]),l=(e.yLabelMax-e.yLabelMin)*(e.pxmid[0]<0?-1:1)/4;if(e.labelExtraX){var c=e.labelExtraX*e.pxmid[1]/e.pxmid[0],u=e.yLabelMid+e.labelExtraY-(e.cyFinal+e.pxmid[1]);Math.abs(c)>Math.abs(u)?o+="l"+u*e.pxmid[0]/e.pxmid[1]+","+u+"H"+(n+e.labelExtraX+l):o+="l"+e.labelExtraX+","+c+"v"+(u-c)+"h"+l}else o+="V"+(e.yLabelMid+e.labelExtraY)+"h"+l;s.ensureSingle(t,"path","textline").call(a.stroke,w.outsidetextfont.color).attr({"stroke-width":Math.min(2,w.outsidetextfont.size/8),d:o,fill:"none"})}),k&&y.automargin){var S=o.bBox(f.node()),L=y.domain,P=p.w*(L.x[1]-L.x[0]),I=p.h*(L.y[1]-L.y[0]),R=(.5*P-g.r)/p.w,F=(.5*I-g.r)/p.h;i.autoMargin(e,"pie."+y.uid+".automargin",{xl:L.x[0]-R,xr:L.x[1]+R,yb:L.y[0]-F,yt:L.y[1]+F,l:Math.max(g.cx-g.r-S.left,0),r:Math.max(S.right-(g.cx+g.r),0),b:Math.max(S.bottom-(g.cy+g.r),0),t:Math.max(g.cy-g.r-S.top,0),pad:5})}})});setTimeout(function(){g.selectAll("tspan").each(function(){var e=r.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))})},0)},formatSliceLabel:D,transformInsideText:_,determineInsideTextFont:x,positionTitleOutside:C,prerenderTitles:b,layoutAreas:I,attachFxHandlers:v,computeTransform:O}}}),c6=p({"src/traces/pie/style.js"(e,t){var r=T(),i=rT(),n=aE().resizeText;t.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");n(e,t,"pie"),t.each(function(t){var n=t[0].trace,a=r.select(this);a.style({opacity:n.opacity}),a.selectAll("path.surface").each(function(t){r.select(this).call(i,t,n,e)})})}}}),c8=p({"src/traces/pie/base_plot.js"(e){var t=tD();e.name="pie",e.plot=function(r,i,n,a){t.plotBasePlot(e.name,r,i,n,a)},e.clean=function(r,i,n,a){t.cleanBasePlot(e.name,r,i,n,a)}}}),c9=p({"src/traces/pie/index.js"(e,t){t.exports={attributes:cQ(),supplyDefaults:c0().supplyDefaults,supplyLayoutDefaults:c2(),layoutAttributes:c1(),calc:c3().calc,crossTraceCalc:c3().crossTraceCalc,plot:c4().plot,style:c6(),styleOne:rT(),moduleType:"trace",name:"pie",basePlotModule:c8(),categories:["pie-like","pie","showLegend"],meta:{}}}}),c7=p({"lib/pie.js"(e,t){t.exports=c9()}}),ue=p({"src/traces/sunburst/base_plot.js"(e){var t=tD();e.name="sunburst",e.plot=function(r,i,n,a){t.plotBasePlot(e.name,r,i,n,a)},e.clean=function(r,i,n,a){t.cleanBasePlot(e.name,r,i,n,a)}}}),ut=p({"src/traces/sunburst/constants.js"(e,t){t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),ur=p({"src/traces/sunburst/attributes.js"(e,t){var r=Z(),{hovertemplateAttrs:i,texttemplateAttrs:n,templatefallbackAttrs:a}=eW(),o=tV(),s=at().attributes,l=cQ(),c=ut(),u=q().extendFlat,h=eH().pattern;t.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:u({colors:{valType:"data_array",editType:"calc"},line:{color:u({},l.marker.line.color,{dflt:null}),width:u({},l.marker.line.width,{dflt:1}),editType:"calc"},pattern:h,editType:"calc"},o("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:l.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:n({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),texttemplatefallback:a({editType:"plot"}),hovertext:l.hovertext,hoverinfo:u({},r.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:i({},{keys:c.eventDataKeys}),hovertemplatefallback:a(),textfont:l.textfont,insidetextorientation:l.insidetextorientation,insidetextfont:l.insidetextfont,outsidetextfont:u({},l.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:l.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:s({name:"sunburst",trace:!0,editType:"calc"})}}}),ui=p({"src/traces/sunburst/layout_attributes.js"(e,t){t.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),un=p({"src/traces/sunburst/defaults.js"(e,t){var r=tv(),i=ur(),n=at().defaults,a=aM().handleText,o=c0().handleMarkerDefaults,s=t3(),l=s.hasColorscale,c=s.handleDefaults;t.exports=function(e,t,s,u){function h(n,a){return r.coerce(e,t,i,n,a)}var d=h("labels"),f=h("parents");if(!d||!d.length||!f||!f.length){t.visible=!1;return}var p=h("values");h(p&&p.length?"branchvalues":"count"),h("level"),h("maxdepth"),o(e,t,u,h);var m=t._hasColorscale=l(e,"marker","colors")||(e.marker||{}).coloraxis;m&&c(e,t,u,h,{prefix:"marker.",cLetter:"c"}),h("leaf.opacity",m?1:.7);var g=h("text");h("texttemplate"),h("texttemplatefallback"),t.texttemplate||h("textinfo",r.isArrayOrTypedArray(g)?"text+label":"label"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),a(e,t,u,h,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("insidetextorientation"),h("sort"),h("rotation"),h("root.color"),n(t,u,h),t._length=null}}}),ua=p({"src/traces/sunburst/layout_defaults.js"(e,t){var r=tv(),i=ui();t.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("sunburstcolorway",t.colorway),n("extendsunburstcolors")}}}),uo=p({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(e,t){var r;r=e,function(e){function t(e,t){return e.parent===t.parent?1:2}function r(e,t){return e+t.x}function i(e,t){return Math.max(e,t.y)}function n(e){var t=0,r=e.children,i=r&&r.length;if(i)for(;--i>=0;)t+=r[i].value;else t=1;e.value=t}function a(e,t){var r,i,n,a,s,u=new c(e),h=+e.value&&(u.value=e.value),d=[u];for(null==t&&(t=o);r=d.pop();)if(h&&(r.value=+r.data.value),(n=t(r.data))&&(s=n.length))for(r.children=Array(s),a=s-1;a>=0;--a)d.push(i=r.children[a]=new c(n[a])),i.parent=r,i.depth=r.depth+1;return u.eachBefore(l)}function o(e){return e.children}function s(e){e.data=e.data.data}function l(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function c(e){this.data=e,this.depth=this.height=0,this.parent=null}c.prototype=a.prototype={constructor:c,count:function(){return this.eachAfter(n)},each:function(e){var t,r,i,n,a=this,o=[a];do for(t=o.reverse(),o=[];a=t.pop();)if(e(a),r=a.children)for(i=0,n=r.length;i=0;--r)n.push(t[r]);return this},sum:function(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,i=t.children,n=i&&i.length;--n>=0;)r+=i[n].value;t.value=r})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),i=t.ancestors(),n=null;for(e=r.pop(),t=i.pop();e===t;)n=e,e=r.pop(),t=i.pop();return n}(t,e),i=[t];t!==r;)i.push(t=t.parent);for(var n=i.length;e!==r;)i.splice(n,0,e),e=e.parent;return i},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each(function(t){e.push(t)}),e},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t},copy:function(){return a(this).eachBefore(s)}};var u=Array.prototype.slice;function h(e){for(var t,r,i=0,n=(e=function(e){for(var t,r,i=e.length;i;)r=Math.random()*i--|0,t=e[i],e[i]=e[r],e[r]=t;return e}(u.call(e))).length,a=[];i0&&r*r>i*i+n*n}function p(e,t){for(var r=0;r(o*=o)?(i=(c+o-n)/(2*c),a=Math.sqrt(Math.max(0,o/c-i*i)),r.x=e.x-i*s-a*l,r.y=e.y-i*l+a*s):(i=(c+n-o)/(2*c),a=Math.sqrt(Math.max(0,n/c-i*i)),r.x=t.x+i*s-a*l,r.y=t.y+i*l+a*s)):(r.x=t.x+r.r,r.y=t.y)}function v(e,t){var r=e.r+t.r-1e-6,i=t.x-e.x,n=t.y-e.y;return r>0&&r*r>i*i+n*n}function x(e){var t=e._,r=e.next._,i=t.r+r.r,n=(t.x*r.r+r.x*t.r)/i,a=(t.y*r.r+r.y*t.r)/i;return n*n+a*a}function b(e){this._=e,this.next=null,this.previous=null}function _(e){var t,r,i,n,a,o,s,l,c,u,d;if(!(n=e.length))return 0;if((t=e[0]).x=0,t.y=0,!(n>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(n>2))return t.r+r.r;y(r,t,i=e[2]),t=new b(t),r=new b(r),i=new b(i),t.next=i.previous=r,r.next=t.previous=i,i.next=r.previous=t;e:for(s=3;sd&&(d=s),(f=Math.max(d/(g=u*u*m),g/h))>p){u-=s;break}p=f}y.push(o={value:u,dice:l1?t:1)},r}(N),q=function e(t){function r(e,r,i,n,a){if((o=e._squarify)&&o.ratio===t)for(var o,s,l,c,u,h=-1,d=o.length,f=e.value;++h1?t:1)},r}(N);e.cluster=function(){var e=t,n=1,a=1,o=!1;function s(t){var s,l=0;t.eachAfter(function(t){var n=t.children;n?(t.x=n.reduce(r,0)/n.length,t.y=1+n.reduce(i,0)):(t.x=s?l+=e(t,s):0,t.y=0,s=t)});var c=function(e){for(var t;t=e.children;)e=t[0];return e}(t),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(t),h=c.x-e(c,u)/2,d=u.x+e(u,c)/2;return t.eachAfter(o?function(e){e.x=(e.x-t.x)*n,e.y=(t.y-e.y)*a}:function(e){e.x=(e.x-h)/(d-h)*n,e.y=(1-(t.y?e.y/t.y:1))*a})}return s.separation=function(t){return arguments.length?(e=t,s):e},s.size=function(e){return arguments.length?(o=!1,n=+e[0],a=+e[1],s):o?null:[n,a]},s.nodeSize=function(e){return arguments.length?(o=!0,n=+e[0],a=+e[1],s):o?[n,a]:null},s},e.hierarchy=a,e.pack=function(){var e=null,t=1,r=1,i=T;function n(n){return n.x=t/2,n.y=r/2,e?n.eachBefore(A(e)).eachAfter(S(i,.5)).eachBefore(E(1)):n.eachBefore(A(k)).eachAfter(S(T,1)).eachAfter(S(i,n.r/Math.min(t,r))).eachBefore(E(Math.min(t,r)/(2*n.r))),n}return n.radius=function(t){return arguments.length?(e=null==t?null:w(t),n):e},n.size=function(e){return arguments.length?(t=+e[0],r=+e[1],n):[t,r]},n.padding=function(e){return arguments.length?(i="function"==typeof e?e:M(+e),n):i},n},e.packEnclose=h,e.packSiblings=function(e){return _(e),e},e.partition=function(){var e=1,t=1,r=0,i=!1;function n(n){var a,o,s=n.height+1;return n.x0=n.y0=r,n.x1=e,n.y1=t/s,n.eachBefore((a=t,o=s,function(e){e.children&&L(e,e.x0,a*(e.depth+1)/o,e.x1,a*(e.depth+2)/o);var t=e.x0,i=e.y0,n=e.x1-r,s=e.y1-r;n0)throw Error("cycle");return a}return r.id=function(t){return arguments.length?(e=w(t),r):e},r.parentId=function(e){return arguments.length?(t=w(e),r):t},r},e.tree=function(){var e=O,t=1,r=1,i=null;function n(n){var l=function(e){for(var t,r,i,n,a,o=new j(e,0),s=[o];t=s.pop();)if(i=t._.children)for(t.children=Array(a=i.length),n=a-1;n>=0;--n)s.push(r=t.children[n]=new j(i[n],n)),r.parent=t;return(o.parent=new j(null,0)).children=[o],o}(n);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),i)n.eachBefore(s);else{var c=n,u=n,h=n;n.eachBefore(function(e){e.xu.x&&(u=e),e.depth>h.depth&&(h=e)});var d=c===u?1:e(c,u)/2,f=d-c.x,p=t/(u.x+d+f),m=r/(h.depth||1);n.eachBefore(function(e){e.x=(e.x+f)*p,e.y=e.depth*m})}return n}function a(t){var r=t.children,i=t.parent.children,n=t.i?i[t.i-1]:null;if(r){!function(e){for(var t,r=0,i=0,n=e.children,a=n.length;--a>=0;)t=n[a],t.z+=r,t.m+=r,r+=t.s+(i+=t.c)}(t);var a=(r[0].z+r[r.length-1].z)/2;n?(t.z=n.z+e(t._,n._),t.m=t.z-a):t.z=a}else n&&(t.z=n.z+e(t._,n._));t.parent.A=function(t,r,i){if(r){for(var n,a,o,s=t,l=t,c=r,u=s.parent.children[0],h=s.m,d=l.m,f=c.m,p=u.m;c=F(c),s=R(s),c&&s;)u=R(u),(l=F(l)).a=t,(o=c.z+f-s.z-h+e(c._,s._))>0&&(function(e,t,r){var i=r/(t.i-e.i);t.c-=i,t.s+=r,e.c+=i,t.z+=r,t.m+=r}((n=c,a=i,n.a.parent===t.parent?n.a:a),t,o),h+=o,d+=o),f+=c.m,h+=s.m,p+=u.m,d+=l.m;c&&!F(l)&&(l.t=c,l.m+=f-d),s&&!R(u)&&(u.t=s,u.m+=h-p,i=t)}return i}(t,n,t.parent.A||i[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*r}return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(e){return arguments.length?(i=!1,t=+e[0],r=+e[1],n):i?null:[t,r]},n.nodeSize=function(e){return arguments.length?(i=!0,t=+e[0],r=+e[1],n):i?[t,r]:null},n},e.treemap=function(){var e=V,t=!1,r=1,i=1,n=[0],a=T,o=T,s=T,l=T,c=T;function u(e){return e.x0=e.y0=0,e.x1=r,e.y1=i,e.eachBefore(h),n=[0],t&&e.eachBefore(C),e}function h(t){var r=n[t.depth],i=t.x0+r,u=t.y0+r,h=t.x1-r,d=t.y1-r;h=r-1){var u=s[t];u.x0=n,u.y0=a,u.x1=o,u.y1=l;return}for(var h=c[t],d=i/2+h,f=t+1,p=r-1;f>>1;c[m]l-a){var v=(n*y+o*g)/i;e(t,f,g,n,a,v,l),e(f,r,y,v,a,o,l)}else{var x=(a*y+l*g)/i;e(t,f,g,n,a,o,x),e(f,r,y,n,x,o,l)}}(0,l,e.value,t,r,i,n)},e.treemapDice=L,e.treemapResquarify=q,e.treemapSlice=B,e.treemapSliceDice=function(e,t,r,i,n){(1&e.depth?B:L)(e,t,r,i,n)},e.treemapSquarify=V,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r=r||self).d3=r.d3||{})}}),us=p({"src/traces/sunburst/calc.js"(e){var t=uo(),r=C(),i=tv(),n=t3().makeColorScaleFuncFromTrace,a=c3().makePullColorFn,o=c3().generateExtendedColors,s=t3().calc,l=L().ALMOST_EQUAL,c={},u={},h={};e.calc=function(e,o){var c,u,h,d=e._fullLayout,f=o.ids,p=i.isArrayOrTypedArray(f),m=o.labels,g=o.parents,y=o.values,v=i.isArrayOrTypedArray(y),x=[],b={},_={},w=function(e){return e||"number"==typeof e},T=function(e){return!v||r(y[e])&&y[e]>=0};p?(c=Math.min(f.length,g.length),u=function(e){return w(f[e])&&T(e)},h=function(e){return String(f[e])}):(c=Math.min(m.length,g.length),u=function(e){return w(m[e])&&T(e)},h=function(e){return String(m[e])}),v&&(c=Math.min(c,y.length));for(var M=0;M1){for(var E=i.randstr(),C=0;C>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?uv(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?uv(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=uU.exec(e))?new u_(t[1],t[2],t[3],1):(t=uV.exec(e))?new u_(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=uq.exec(e))?uv(t[1],t[2],t[3],t[4]):(t=uH.exec(e))?uv(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=uG.exec(e))?uE(t[1],t[2]/100,t[3]/100,1):(t=uW.exec(e))?uE(t[1],t[2]/100,t[3]/100,t[4]):uY.hasOwnProperty(e)?uy(uY[e]):"transparent"===e?new u_(NaN,NaN,NaN,0):null}function uy(e){return new u_(e>>16&255,e>>8&255,255&e,1)}function uv(e,t,r,i){return i<=0&&(e=t=r=NaN),new u_(e,t,r,i)}function ux(e){return e instanceof uh||(e=ug(e)),e?new u_((e=e.rgb()).r,e.g,e.b,e.opacity):new u_}function ub(e,t,r,i){return 1==arguments.length?ux(e):new u_(e,t,r,i??1)}function u_(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}function uw(){return`#${uS(this.r)}${uS(this.g)}${uS(this.b)}`}function uT(){return`#${uS(this.r)}${uS(this.g)}${uS(this.b)}${uS((isNaN(this.opacity)?1:this.opacity)*255)}`}function uM(){let e=uk(this.opacity);return`${1===e?"rgb(":"rgba("}${uA(this.r)}, ${uA(this.g)}, ${uA(this.b)}${1===e?")":`, ${e})`}`}function uk(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function uA(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function uS(e){return((e=uA(e))<16?"0":"")+e.toString(16)}function uE(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new uP(e,t,r,i)}function uC(e){if(e instanceof uP)return new uP(e.h,e.s,e.l,e.opacity);if(e instanceof uh||(e=ug(e)),!e)return new uP;if(e instanceof uP)return e;var t=(e=e.rgb()).r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,s=a-n,l=(a+n)/2;return s?(o=t===a?(r-i)/s+(r0&&l<1?0:o,new uP(o,s,l,e.opacity)}function uL(e,t,r,i){return 1==arguments.length?uC(e):new uP(e,t,r,i??1)}function uP(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}function uI(e){return(e=(e||0)%360)<0?e+360:e}function uz(e){return Math.max(0,Math.min(1,e||0))}function uD(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var uO,uR,uF,uj,uB,uN,uU,uV,uq,uH,uG,uW,uY,uZ,u$,uX=f({"node_modules/d3-color/src/color.js"(){uu(),uR=1/(uO=.7),uF="\\s*([+-]?\\d+)\\s*",uj="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",uB="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",uN=/^#([0-9a-f]{3,8})$/,uU=RegExp(`^rgb\\(${uF},${uF},${uF}\\)$`),uV=RegExp(`^rgb\\(${uB},${uB},${uB}\\)$`),uq=RegExp(`^rgba\\(${uF},${uF},${uF},${uj}\\)$`),uH=RegExp(`^rgba\\(${uB},${uB},${uB},${uj}\\)$`),uG=RegExp(`^hsl\\(${uj},${uB},${uB}\\)$`),uW=RegExp(`^hsla\\(${uj},${uB},${uB},${uj}\\)$`),uY={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32},ul(uh,ug,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ud,formatHex:ud,formatHex8:uf,formatHsl:up,formatRgb:um,toString:um}),ul(u_,ub,uc(uh,{brighter(e){return e=null==e?uR:Math.pow(uR,e),new u_(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?uO:Math.pow(uO,e),new u_(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new u_(uA(this.r),uA(this.g),uA(this.b),uk(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:uw,formatHex:uw,formatHex8:uT,formatRgb:uM,toString:uM})),ul(uP,uL,uc(uh,{brighter(e){return e=null==e?uR:Math.pow(uR,e),new uP(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?uO:Math.pow(uO,e),new uP(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new u_(uD(e>=240?e-240:e+120,n,i),uD(e,n,i),uD(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new uP(uI(this.h),uz(this.s),uz(this.l),uk(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=uk(this.opacity);return`${1===e?"hsl(":"hsla("}${uI(this.h)}, ${100*uz(this.s)}%, ${100*uz(this.l)}%${1===e?")":`, ${e})`}`}}))}}),uK=f({"node_modules/d3-color/src/math.js"(){uZ=Math.PI/180,u$=180/Math.PI}});function uJ(e){if(e instanceof u0)return new u0(e.l,e.a,e.b,e.opacity);if(e instanceof u6)return u8(e);e instanceof u_||(e=ux(e));var t,r,i=u5(e.r),n=u5(e.g),a=u5(e.b),o=u1((.2225045*i+.7168786*n+.0606169*a)/u9);return i===n&&n===a?t=r=o:(t=u1((.4360747*i+.3850649*n+.1430804*a)/u7),r=u1((.0139322*i+.0971045*n+.7141733*a)/he)),new u0(116*o-16,500*(t-o),200*(o-r),e.opacity)}function uQ(e,t,r,i){return 1==arguments.length?uJ(e):new u0(e,t,r,i??1)}function u0(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}function u1(e){return e>hn?Math.pow(e,.3333333333333333):e/hi+ht}function u2(e){return e>hr?e*e*e:hi*(e-ht)}function u3(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,.4166666666666667)-.055)}function u5(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function u4(e,t,r,i){return 1==arguments.length?function(e){if(e instanceof u6)return new u6(e.h,e.c,e.l,e.opacity);if(e instanceof u0||(e=uJ(e)),0===e.a&&0===e.b)return new u6(NaN,0=1?(r=1,t-1):Math.floor(r*t),n=e[i],a=e[i+1],o=i>0?e[i-1]:2*n-a,s=i()=>e}});function hT(e,t){return function(r){return e+r*t}}function hM(e,t){var r=t-e;return r?hT(e,r>180||r<-180?r-360*Math.round(r/360):r):hb(isNaN(e)?t:e)}function hk(e,t){var r=t-e;return r?hT(e,r):hb(isNaN(e)?t:e)}var hA=f({"node_modules/d3-interpolate/src/color.js"(){hw()}});function hS(e){return function(t){var r,i,n=t.length,a=Array(n),o=Array(n),s=Array(n);for(r=0;rs&&(o=t.slice(s,o),c[l]?c[l]+=o:c[++l]=o),(n=n[0])===(a=a[0])?c[l]?c[l]+=a:c[++l]=a:(c[++l]=null,u.push({i:l,x:hN(n,a)})),s=hW.lastIndex;return s180?l+=360:l-s>180&&(s+=360),d.push({i:h.push(n(h)+"rotate(",null,i)-2,x:hN(s,l)})):l&&h.push(n(h)+"rotate("+l+i),c=a.skewX,u=o.skewX,c!==u?d.push({i:h.push(n(h)+"skewX(",null,i)-2,x:hN(c,u)}):u&&h.push(n(h)+"skewX("+u+i),function(e,t,r,i,a,o){if(e!==r||t!==i){var s=a.push(n(a)+"scale(",null,",",null,")");o.push({i:s-4,x:hN(e,r)},{i:s-2,x:hN(t,i)})}else(1!==r||1!==i)&&a.push(n(a)+"scale("+r+","+i+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,h,d),a=o=null,function(e){for(var t,r=-1,i=d.length;++rhZ,interpolateArray:()=>hO,interpolateBasis:()=>hy,interpolateBasisClosed:()=>hx,interpolateCubehelix:()=>db,interpolateCubehelixLong:()=>d_,interpolateDate:()=>hj,interpolateDiscrete:()=>hX,interpolateHcl:()=>dg,interpolateHclLong:()=>dy,interpolateHsl:()=>du,interpolateHslLong:()=>dh,interpolateHue:()=>hJ,interpolateLab:()=>df,interpolateNumber:()=>hN,interpolateNumberArray:()=>hI,interpolateObject:()=>hV,interpolateRgb:()=>hE,interpolateRgbBasis:()=>hC,interpolateRgbBasisClosed:()=>hL,interpolateRound:()=>h0,interpolateString:()=>hH,interpolateTransformCss:()=>dr,interpolateTransformSvg:()=>di,interpolateZoom:()=>ds,piecewise:()=>dT,quantize:()=>dk});var dE=f({"node_modules/d3-interpolate/src/index.js"(){h$(),hF(),hv(),h_(),hB(),hK(),hQ(),hU(),hD(),hq(),h1(),hY(),dn(),dl(),hP(),dd(),dp(),dv(),dw(),dM(),dA()}}),dC=p({"src/traces/sunburst/fill_one.js"(e,t){var r=t9(),i=ee();t.exports=function(e,t,n,a,o){var s=t.data.data,l=s.i,c=o||s.color;if(l>=0){t.i=s.i;var u=n.marker;u.pattern&&u.colors&&u.pattern.shape||(u.color=c,t.color=c),r.pointStyle(e,n,a,t)}else i.fill(e,c)}}}),dL=p({"src/traces/sunburst/style.js"(e,t){var r=T(),i=ee(),n=tv(),a=aE().resizeText,o=dC();function s(e,t,r,a){var s=t.data.data,l=!t.children,c=s.i,u=n.castOption(r,c,"marker.line.color")||i.defaultLine,h=n.castOption(r,c,"marker.line.width")||0;e.call(o,t,r,a).style("stroke-width",h).call(i.stroke,u).style("opacity",l?r.leaf.opacity:null)}t.exports={style:function(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");a(e,t,"sunburst"),t.each(function(t){var i=r.select(this),n=t[0].trace;i.style("opacity",n.opacity),i.selectAll("path.surface").each(function(t){r.select(this).call(s,t,n,e)})})},styleOne:s}}}),dP=p({"src/traces/sunburst/helpers.js"(e){var t=tv(),r=ee(),i=rf(),n=r_();function a(e){return e.data.data.pid}e.findEntryWithLevel=function(t,r){var i;return r&&t.eachAfter(function(t){if(e.getPtId(t)===r)return i=t.copy()}),i||t},e.findEntryWithChild=function(t,r){var i;return t.eachAfter(function(t){for(var n=t.children||[],a=0;a0)},e.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0},e.isHeader=function(t,r){return!(e.isLeaf(t)||t.depth===r._maxDepth-1)},e.getParent=function(t,r){return e.findEntryWithLevel(t,a(r))},e.listPath=function(t,r){var i=t.parent;if(!i)return[];var n=r?[i.data[r]]:[i];return e.listPath(i,r).concat(n)},e.getPath=function(t){return e.listPath(t,"label").join("/")+"/"},e.formatValue=n.formatPieValue,e.formatPercent=function(e,r){var i=t.formatPercent(e,0);return"0%"===i&&(i=n.formatPiePercent(e,r)),i}}}),dI=p({"src/traces/sunburst/fx.js"(e,t){var r=T(),i=eQ(),n=t6().appendArrayPointValue,a=rD(),o=tv(),s=tT(),l=dP(),c=r_().formatPieValue;function u(e,t,r){for(var i=e.data.data,a={curveNumber:t.index,pointNumber:i.i,data:t._input,fullData:t},o=0;o"),name:k||P("name")?v.name:void 0,color:M("hoverlabel.bgcolor")||x.color,borderColor:M("hoverlabel.bordercolor"),fontFamily:M("hoverlabel.font.family"),fontSize:M("hoverlabel.font.size"),fontColor:M("hoverlabel.font.color"),fontWeight:M("hoverlabel.font.weight"),fontStyle:M("hoverlabel.font.style"),fontVariant:M("hoverlabel.font.variant"),nameLength:M("hoverlabel.namelength"),textAlign:M("hoverlabel.align"),hovertemplate:k,hovertemplateLabels:E,eventData:h};g&&(F.x0=I-i.rInscribed*i.rpx1,F.x1=I+i.rInscribed*i.rpx1,F.idealAlign=i.pxmid[0]<0?"left":"right"),y&&(F.x=I,F.idealAlign=I<0?"left":"right");var j=[];a.loneHover(F,{container:s._hoverlayer.node(),outerContainer:s._paper.node(),gd:n,inOut_bbox:j}),h[0].bbox=j[0],p._hasHoverLabel=!0}if(y){var B=e.select("path.surface");d.styleOne(B,i,v,n,{hovered:!0})}p._hasHoverEvent=!0,n.emit("plotly_hover",{points:h||[u(i,v,d.eventDataKeys)],event:r.event})}}),e.on("mouseout",function(t){var i=n._fullLayout,o=n._fullData[p.index],s=r.select(this).datum();if(p._hasHoverEvent&&(t.originalEvent=r.event,n.emit("plotly_unhover",{points:[u(s,o,d.eventDataKeys)],event:r.event}),p._hasHoverEvent=!1),p._hasHoverLabel&&(a.loneUnhover(i._hoverlayer.node()),p._hasHoverLabel=!1),y){var l=e.select("path.surface");d.styleOne(l,s,o,n,{hovered:!1})}}),e.on("click",function(e){var t=n._fullLayout,o=n._fullData[p.index],c=g&&(l.isHierarchyRoot(e)||l.isLeaf(e)),h=l.getPtId(e),f=l.isEntry(e)?l.findEntryWithChild(m,h):l.findEntryWithLevel(m,h),y=l.getPtId(f),v={points:[u(e,o,d.eventDataKeys)],event:r.event};c||(v.nextLevel=y);var x=s.triggerHandler(n,"plotly_"+p.type+"click",v);if(!1!==x&&t.hovermode&&(n._hoverdata=[u(e,o,d.eventDataKeys)],a.click(n,r.event)),!c&&!1!==x&&!n._dragging&&!n._transitioning){i.call("_storeDirectGUIEdit",o,t._tracePreGUI[o.uid],{level:o.level});var b={data:[{level:y}],traces:[p.index]},_={frame:{redraw:!1,duration:d.transitionTime},transition:{duration:d.transitionTime,easing:d.transitionEasing},mode:"immediate",fromcurrent:!0};a.loneUnhover(t._hoverlayer.node()),i.call("animate",n,b,_)}})}}}),dz=p({"src/traces/sunburst/plot.js"(e){var t=T(),r=uo(),i=(dE(),v(dS)).interpolate,n=t9(),a=tv(),o=tF(),s=aE(),l=s.recordMinTextSize,c=s.clearMinTextSize,u=c4(),h=r_().getRotationAngle,d=u.computeTransform,f=u.transformInsideText,p=dL().styleOne,m=aL().resizeText,g=dI(),y=ut(),x=dP();function b(s,c,u,m){var v,b=s._context.staticPlot,w=s._fullLayout,T=!w.uniformtext.mode&&x.hasTransition(m),M=t.select(u).selectAll("g.slice"),k=c[0],A=k.trace,S=k.hierarchy,E=x.findEntryWithLevel(S,A.level),C=x.getMaxDepth(A),L=w._size,P=A.domain,I=L.w*(P.x[1]-P.x[0]),z=L.h*(P.y[1]-P.y[0]),D=.5*Math.min(I,z),O=k.cx=L.l+L.w*(P.x[1]+P.x[0])/2,R=k.cy=L.t+L.h*(1-P.y[0])-z/2;if(!E)return M.remove();var F=null,j={};T&&M.each(function(e){j[x.getPtId(e)]={rpx0:e.rpx0,rpx1:e.rpx1,x0:e.x0,x1:e.x1,transform:e.transform},!F&&x.isEntry(e)&&(F=e)});var B=(v=E,r.partition().size([2*Math.PI,v.height+1])(v)).descendants(),N=E.height+1,U=0,V=C;k.hasMultipleRoots&&x.isHierarchyRoot(E)&&(B=B.slice(1),N-=1,U=1,V+=1),B=B.filter(function(e){return e.y1<=V});var q=h(A.rotation);q&&B.forEach(function(e){e.x0+=q,e.x1+=q});var H=Math.min(N,C),G=function(e){return(e-U)/H*D},W=function(e,t){return[e*Math.cos(t),-e*Math.sin(t)]},Y=function(e){return a.pathAnnulus(e.rpx0,e.rpx1,e.x0,e.x1,O,R)},Z=function(e){return O+_(e)[0]*(e.transform.rCenter||0)+(e.transform.x||0)},$=function(e){return R+_(e)[1]*(e.transform.rCenter||0)+(e.transform.y||0)};(M=M.data(B,x.getPtId)).enter().append("g").classed("slice",!0),T?M.exit().transition().each(function(){var e=t.select(this);e.select("path.surface").transition().attrTween("d",function(e){var t=function(e){var t,r=x.getPtId(e),n=j[r],a=j[x.getPtId(E)];if(a){var o=(e.x1>a.x1?2*Math.PI:0)+q;t=e.rpx1X?2*Math.PI:0)+q;t={x0:o,x1:o}}else t={rpx0:D,rpx1:D},a.extendFlat(t,Q(e));else t={rpx0:0,rpx1:0};else t={x0:q,x1:q};return i(t,n)}(e);return function(e){return Y(t(e))}}):m.attr("d",Y),h.call(g,E,s,c,{eventDataKeys:y.eventDataKeys,transitionTime:y.CLICK_TRANSITION_TIME,transitionEasing:y.CLICK_TRANSITION_EASING}).call(x.setSliceCursor,s,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:s._transitioning}),m.call(p,r,A,s);var v=a.ensureSingle(h,"g","slicetext"),_=a.ensureSingle(v,"text","",function(e){e.attr("data-notex",1)}),M=a.ensureUniformFontSize(s,x.determineTextFont(A,r,w.font));_.text(e.formatSliceLabel(r,E,A,c,w)).classed("slicetext",!0).attr("text-anchor","middle").call(n.font,M).call(o.convertToTspans,s);var S=n.bBox(_.node());r.transform=f(S,r,k),r.transform.targetX=Z(r),r.transform.targetY=$(r);var C=function(e,t){var r=e.transform;return d(r,t),r.fontSize=M.size,l(A.type,r,w),a.getTextTransform(r)};T?_.transition().attrTween("transform",function(e){var t=function(e){var t,r=j[x.getPtId(e)],n=e.transform;if(r)t=r;else if(t={rpx1:e.rpx1,transform:{textPosAngle:n.textPosAngle,scale:0,rotate:n.rotate,rCenter:n.rCenter,x:n.x,y:n.y}},F)if(e.parent)if(X){var o=e.x1>X?2*Math.PI:0;t.x0=t.x1=o}else a.extendFlat(t,Q(e));else t.x0=t.x1=q;else t.x0=t.x1=q;var s=i(t.transform.textPosAngle,e.transform.textPosAngle),c=i(t.rpx1,e.rpx1),u=i(t.x0,e.x0),h=i(t.x1,e.x1),d=i(t.transform.scale,n.scale),f=i(t.transform.rotate,n.rotate),p=0===n.rCenter?3:0===t.transform.rCenter?1/3:1,m=i(t.transform.rCenter,n.rCenter);return function(e){var t=c(e),r=u(e),i=h(e),a=m(Math.pow(e,p)),o={pxmid:W(t,(r+i)/2),rpx1:t,transform:{textPosAngle:s(e),rCenter:a,x:n.x,y:n.y}};return l(A.type,n,w),{transform:{targetX:Z(o),targetY:$(o),scale:d(e),rotate:f(e),rCenter:a}}}}(e);return function(e){return C(t(e),S)}}):_.attr("transform",C(r,S))})}function _(e){var t,r;return t=e.rpx1,[t*Math.sin(r=e.transform.textPosAngle),-t*Math.cos(r)]}e.plot=function(e,r,i,n){var a,o,s=e._fullLayout,l=s._sunburstlayer,u=!i,h=!s.uniformtext.mode&&x.hasTransition(i);(c("sunburst",s),(a=l.selectAll("g.trace.sunburst").data(r,function(e){return e[0].trace.uid})).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),a.order(),h)?(n&&(o=n()),t.transition().duration(i.duration).ease(i.easing).each("end",function(){o&&o()}).each("interrupt",function(){o&&o()}).each(function(){l.selectAll("g.trace").each(function(t){b(e,t,this,i)})})):(a.each(function(t){b(e,t,this,i)}),s.uniformtext.mode&&m(e,s._sunburstlayer.selectAll(".trace"),"sunburst")),u&&a.exit().remove()},e.formatSliceLabel=function(e,t,r,i,n){var o=r.texttemplate,s=r.textinfo;if(!o&&(!s||"none"===s))return"";var l=n.separators,c=i[0],u=e.data.data,h=c.hierarchy,d=x.isHierarchyRoot(e),f=x.getParent(h,e),p=x.getValue(e);if(!o){var m,g=s.split("+"),y=function(e){return -1!==g.indexOf(e)},v=[];if(y("label")&&u.label&&v.push(u.label),u.hasOwnProperty("v")&&y("value")&&v.push(x.formatValue(u.v,l)),!d){y("current path")&&v.push(x.getPath(e.data));var b=0;y("percent parent")&&b++,y("percent entry")&&b++,y("percent root")&&b++;var _=b>1;if(b){var w,T=function(e){m=x.formatPercent(w,l),_&&(m+=" of "+e),v.push(m)};y("percent parent")&&!d&&(w=p/x.getValue(f),T("parent")),y("percent entry")&&(w=p/x.getValue(t),T("entry")),y("percent root")&&(w=p/x.getValue(h),T("root"))}}return y("text")&&(m=a.castOption(r,u.i,"text"),a.isValidTextValue(m)&&v.push(m)),v.join("
")}var M=a.castOption(r,u.i,"texttemplate");if(!M)return"";var k={};u.label&&(k.label=u.label),u.hasOwnProperty("v")&&(k.value=u.v,k.valueLabel=x.formatValue(u.v,l)),k.currentPath=x.getPath(e.data),d||(k.percentParent=p/x.getValue(f),k.percentParentLabel=x.formatPercent(k.percentParent,l),k.parent=x.getPtLabel(f)),k.percentEntry=p/x.getValue(t),k.percentEntryLabel=x.formatPercent(k.percentEntry,l),k.entry=x.getPtLabel(t),k.percentRoot=p/x.getValue(h),k.percentRootLabel=x.formatPercent(k.percentRoot,l),k.root=x.getPtLabel(h),u.hasOwnProperty("color")&&(k.color=u.color);var A=a.castOption(r,u.i,"text");return(a.isValidTextValue(A)||""===A)&&(k.text=A),k.customdata=a.castOption(r,u.i,"customdata"),a.texttemplateString({data:[k,r._meta],fallback:r.texttemplatefallback,labels:k,locale:n._d3locale,template:M})}}}),dD=p({"src/traces/sunburst/index.js"(e,t){t.exports={moduleType:"trace",name:"sunburst",basePlotModule:ue(),categories:[],animatable:!0,attributes:ur(),layoutAttributes:ui(),supplyDefaults:un(),supplyLayoutDefaults:ua(),calc:us().calc,crossTraceCalc:us().crossTraceCalc,plot:dz().plot,style:dL().style,colorbar:ne(),meta:{}}}}),dO=p({"lib/sunburst.js"(e,t){t.exports=dD()}}),dR=p({"src/traces/treemap/base_plot.js"(e){var t=tD();e.name="treemap",e.plot=function(r,i,n,a){t.plotBasePlot(e.name,r,i,n,a)},e.clean=function(r,i,n,a){t.cleanBasePlot(e.name,r,i,n,a)}}}),dF=p({"src/traces/treemap/constants.js"(e,t){t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),dj=p({"src/traces/treemap/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:i,templatefallbackAttrs:n}=eW(),a=tV(),o=at().attributes,s=cQ(),l=ur(),c=dF(),u=q().extendFlat,h=eH().pattern;t.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.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:u({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:l.marker.colors,pattern:h,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:l.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},a("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:u({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),texttemplatefallback:n({editType:"plot"}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:r({},{keys:c.eventDataKeys}),hovertemplatefallback:n(),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.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:s.sort,root:l.root,domain:o({name:"treemap",trace:!0,editType:"calc"})}}}),dB=p({"src/traces/treemap/layout_attributes.js"(e,t){t.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),dN=p({"src/traces/treemap/defaults.js"(e,t){var r=tv(),i=dj(),n=ee(),a=at().defaults,o=aM().handleText,s=i5().TEXTPAD,l=c0().handleMarkerDefaults,c=t3(),u=c.hasColorscale,h=c.handleDefaults;t.exports=function(e,t,c,d){function f(n,a){return r.coerce(e,t,i,n,a)}var p=f("labels"),m=f("parents");if(!p||!p.length||!m||!m.length){t.visible=!1;return}var g=f("values");f(g&&g.length?"branchvalues":"count"),f("level"),f("maxdepth"),"squarify"===f("tiling.packing")&&f("tiling.squarifyratio"),f("tiling.flip"),f("tiling.pad");var y=f("text");f("texttemplate"),f("texttemplatefallback"),t.texttemplate||f("textinfo",r.isArrayOrTypedArray(y)?"text+label":"label"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback");var v=f("pathbar.visible");o(e,t,d,f,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("textposition");var x=-1!==t.textposition.indexOf("bottom");l(e,t,d,f),(t._hasColorscale=u(e,"marker","colors")||(e.marker||{}).coloraxis)?h(e,t,d,f,{prefix:"marker.",cLetter:"c"}):f("marker.depthfade",!(t.marker.colors||[]).length);var b=2*t.textfont.size;f("marker.pad.t",x?b/4:b),f("marker.pad.l",b/4),f("marker.pad.r",b/4),f("marker.pad.b",x?b:b/4),f("marker.cornerradius"),t._hovered={marker:{line:{width:2,color:n.contrast(d.paper_bgcolor)}}},v&&(f("pathbar.thickness",t.pathbar.textfont.size+2*s),f("pathbar.side"),f("pathbar.edgeshape")),f("sort"),f("root.color"),a(t,d,f),t._length=null}}}),dU=p({"src/traces/treemap/layout_defaults.js"(e,t){var r=tv(),i=dB();t.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("treemapcolorway",t.colorway),n("extendtreemapcolors")}}}),dV=p({"src/traces/treemap/calc.js"(e){var t=us();e.calc=function(e,r){return t.calc(e,r)},e.crossTraceCalc=function(e){return t._runCrossTraceCalc("treemap",e)}}}),dq=p({"src/traces/treemap/flip_tree.js"(e,t){t.exports=function e(t,r,i){i.swapXY&&(n=t.x0,t.x0=t.y0,t.y0=n,n=t.x1,t.x1=t.y1,t.y1=n),i.flipX&&(n=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-n),i.flipY&&(n=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-n);var n,a=t.children;if(a)for(var o=0;o0)for(var b=0;b").join(" ")||"";var p=i.ensureSingle(d,"g","slicetext"),T=i.ensureSingle(p,"text","",function(e){e.attr("data-notex",1)}),C=i.ensureUniformFontSize(e,c.determineTextFont(L,o,E.font,{onPathbar:!0}));T.text(o._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(n.font,C).call(a.convertToTspans,e),o.textBB=n.bBox(T.node()),o.transform=b(o,{fontSize:C.size,onPathbar:!0}),o.transform.fontSize=C.size,w?T.transition().attrTween("transform",function(e){var t=k(e,!0,A,[m,g]);return function(e){return _(t(e))}}):T.attr("transform",_(o))})}}}),dY=p({"src/traces/treemap/plot_one.js"(e,t){var r=T(),i=(dE(),v(dS)).interpolate,n=dP(),a=tv(),o=i5().TEXTPAD,s=aP().toMoveInsideBar,l=aE().recordMinTextSize,c=dF(),u=dW();function h(e){return n.isHierarchyRoot(e)?"":n.getPtId(e)}t.exports=function(e,t,d,f,p){var m=e._fullLayout,g=t[0],y=g.trace,v="icicle"===y.type,x=g.hierarchy,b=n.findEntryWithLevel(x,y.level),_=r.select(d),w=_.selectAll("g.pathbar"),T=_.selectAll("g.slice");if(!b){w.remove(),T.remove();return}var M=n.isHierarchyRoot(b),k=!m.uniformtext.mode&&n.hasTransition(f),A=n.getMaxDepth(y),S=m._size,E=y.domain,C=S.w*(E.x[1]-E.x[0]),L=S.h*(E.y[1]-E.y[0]),P=y.pathbar.thickness,I=y.marker.line.width+c.gapWithPathbar,z=y.pathbar.visible?y.pathbar.side.indexOf("bottom")>-1?L+I:-(P+I):0,D={x0:C,x1:C,y0:z,y1:z+P},O=function(e,t,r){var i=y.tiling.pad,n=function(e){return e-i<=t.x0},a=function(e){return e+i>=t.x1},o=function(e){return e-i<=t.y0},s=function(e){return e+i>=t.y1};return e.x0===t.x0&&e.x1===t.x1&&e.y0===t.y0&&e.y1===t.y1?{x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1}:{x0:n(e.x0-i)?0:a(e.x0-i)?r[0]:e.x0,x1:n(e.x1+i)?0:a(e.x1+i)?r[0]:e.x1,y0:o(e.y0-i)?0:s(e.y0-i)?r[1]:e.y0,y1:o(e.y1+i)?0:s(e.y1+i)?r[1]:e.y1}},R=null,F={},j={},B=null,N=function(e,t){return t?F[h(e)]:j[h(e)]},U=function(e,t,r,i){if(t)return F[h(x)]||D;var n=j[y.level]||r;return e.data.depth-b.data.depth=(i-=(v?Q:Q.r)-o)){var f,p=(r+i)/2;r=p,i=p}en?n<(f=a-(v?Q:Q.b))&&f"===J?(l.x-=a,c.x-=a,u.x-=a,h.x-=a):"/"===J?(u.x-=a,h.x-=a,o.x-=a/2,s.x-=a/2):"\\"===J?(l.x-=a,c.x-=a,o.x-=a/2,s.x-=a/2):"<"===J&&(o.x-=a,s.x-=a),K(l),K(h),K(o),K(c),K(u),K(s),"M"+(l.x+",")+l.y+"L"+(c.x+",")+c.y+"L"+(s.x+",")+s.y+"L"+(u.x+",")+u.y+"L"+(h.x+",")+h.y+"L"+(o.x+",")+o.y+"Z"},toMoveInsideSlice:ea,makeUpdateSliceInterpolator:el,makeUpdateTextInterpolator:ec,handleSlicesExit:eu,hasTransition:k,strTransform:eh}):w.remove()}}}),dZ=p({"src/traces/treemap/draw.js"(e,t){var r=T(),i=dP(),n=aE().clearMinTextSize,a=aL().resizeText,o=dY();t.exports=function(e,t,s,l,c){var u,h,d=c.type,f=c.drawDescendants,p=e._fullLayout,m=p["_"+d+"layer"],g=!s;(n(d,p),(u=m.selectAll("g.trace."+d).data(t,function(e){return e[0].trace.uid})).enter().append("g").classed("trace",!0).classed(d,!0),u.order(),!p.uniformtext.mode&&i.hasTransition(s))?(l&&(h=l()),r.transition().duration(s.duration).ease(s.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).each(function(){m.selectAll("g.trace").each(function(t){o(e,t,this,s,f)})})):(u.each(function(t){o(e,t,this,s,f)}),p.uniformtext.mode&&a(e,m.selectAll(".trace"),d)),g&&u.exit().remove()}}}),d$=p({"src/traces/treemap/draw_descendants.js"(e,t){var r=T(),i=tv(),n=t9(),a=tF(),o=dH(),s=dG().styleOne,l=dF(),c=dP(),u=dI(),h=dz().formatSliceLabel;t.exports=function(e,t,d,f,p){var m=p.width,g=p.height,y=p.viewX,v=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,T=p.handleSlicesExit,M=p.makeUpdateSliceInterpolator,k=p.makeUpdateTextInterpolator,A=p.prevEntry,S=e._context.staticPlot,E=e._fullLayout,C=t[0].trace,L=-1!==C.textposition.indexOf("left"),P=-1!==C.textposition.indexOf("right"),I=-1!==C.textposition.indexOf("bottom"),z=!I&&!C.marker.pad.t||I&&!C.marker.pad.b,D=o(d,[m,g],{packing:C.tiling.packing,squarifyratio:C.tiling.squarifyratio,flipX:C.tiling.flip.indexOf("x")>-1,flipY:C.tiling.flip.indexOf("y")>-1,pad:{inner:C.tiling.pad,top:C.marker.pad.t,left:C.marker.pad.l,right:C.marker.pad.r,bottom:C.marker.pad.b}}).descendants(),O=1/0,R=-1/0;D.forEach(function(e){var t=e.depth;t>=C._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(O=Math.min(O,t),R=Math.max(R,t))}),f=f.data(D,c.getPtId),C._maxVisibleLayers=isFinite(R)?R-O+1:0,f.enter().append("g").classed("slice",!0),T(f,!1,{},[m,g],x),f.order();var F=null;if(w&&A){var j=c.getPtId(A);f.each(function(e){null===F&&c.getPtId(e)===j&&(F={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})})}var B=function(){return F||{x0:0,x1:m,y0:0,y1:g}},N=f;return w&&(N=N.transition().each("end",function(){var t=r.select(this);c.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),N.each(function(o){var f=c.isHeader(o,C);o._x0=y(o.x0),o._x1=y(o.x1),o._y0=v(o.y0),o._y1=v(o.y1),o._hoverX=y(o.x1-C.marker.pad.r),o._hoverY=v(I?o.y1-C.marker.pad.b/2:o.y0+C.marker.pad.t/2);var p=r.select(this),T=i.ensureSingle(p,"path","surface",function(e){e.style("pointer-events",S?"none":"all")});w?T.transition().attrTween("d",function(e){var t=M(e,!1,B(),[m,g]);return function(e){return x(t(e))}}):T.attr("d",x),p.call(u,d,e,t,{styleOne:s,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{isTransitioning:e._transitioning}),T.call(s,o,C,e,{hovered:!1}),o.x0===o.x1||o.y0===o.y1?o._text="":f?o._text=z?"":c.getPtLabel(o)||"":o._text=h(o,d,C,t,E)||"";var A=i.ensureSingle(p,"g","slicetext"),D=i.ensureSingle(A,"text","",function(e){e.attr("data-notex",1)}),O=i.ensureUniformFontSize(e,c.determineTextFont(C,o,E.font)),R=o._text||" ",F=f&&-1===R.indexOf("
");D.text(R).classed("slicetext",!0).attr("text-anchor",P?"end":L||F?"start":"middle").call(n.font,O).call(a.convertToTspans,e),o.textBB=n.bBox(D.node()),o.transform=b(o,{fontSize:O.size,isHeader:f}),o.transform.fontSize=O.size,w?D.transition().attrTween("transform",function(e){var t=k(e,!1,B(),[m,g]);return function(e){return _(t(e))}}):D.attr("transform",_(o))}),F}}}),dX=p({"src/traces/treemap/plot.js"(e,t){var r=dZ(),i=d$();t.exports=function(e,t,n,a){return r(e,t,n,a,{type:"treemap",drawDescendants:i})}}}),dK=p({"src/traces/treemap/index.js"(e,t){t.exports={moduleType:"trace",name:"treemap",basePlotModule:dR(),categories:[],animatable:!0,attributes:dj(),layoutAttributes:dB(),supplyDefaults:dN(),supplyLayoutDefaults:dU(),calc:dV().calc,crossTraceCalc:dV().crossTraceCalc,plot:dX(),style:dG().style,colorbar:ne(),meta:{}}}}),dJ=p({"lib/treemap.js"(e,t){t.exports=dK()}}),dQ=p({"src/traces/icicle/base_plot.js"(e){var t=tD();e.name="icicle",e.plot=function(r,i,n,a){t.plotBasePlot(e.name,r,i,n,a)},e.clean=function(r,i,n,a){t.cleanBasePlot(e.name,r,i,n,a)}}}),d0=p({"src/traces/icicle/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:i,templatefallbackAttrs:n}=eW(),a=tV(),o=at().attributes,s=cQ(),l=ur(),c=dj(),u=dF(),h=q().extendFlat,d=eH().pattern;t.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:c.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:h({colors:l.marker.colors,line:l.marker.line,pattern:d,editType:"calc"},a("marker",{colorAttr:"colors",anim:!1})),leaf:l.leaf,pathbar:c.pathbar,text:s.text,textinfo:l.textinfo,texttemplate:i({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),texttemplatefallback:n({editType:"plot"}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:r({},{keys:u.eventDataKeys}),hovertemplatefallback:n(),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:c.outsidetextfont,textposition:c.textposition,sort:s.sort,root:l.root,domain:o({name:"icicle",trace:!0,editType:"calc"})}}}),d1=p({"src/traces/icicle/layout_attributes.js"(e,t){t.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),d2=p({"src/traces/icicle/defaults.js"(e,t){var r=tv(),i=d0(),n=ee(),a=at().defaults,o=aM().handleText,s=i5().TEXTPAD,l=c0().handleMarkerDefaults,c=t3(),u=c.hasColorscale,h=c.handleDefaults;t.exports=function(e,t,c,d){function f(n,a){return r.coerce(e,t,i,n,a)}var p=f("labels"),m=f("parents");if(!p||!p.length||!m||!m.length){t.visible=!1;return}var g=f("values");f(g&&g.length?"branchvalues":"count"),f("level"),f("maxdepth"),f("tiling.orientation"),f("tiling.flip"),f("tiling.pad");var y=f("text");f("texttemplate"),f("texttemplatefallback"),t.texttemplate||f("textinfo",r.isArrayOrTypedArray(y)?"text+label":"label"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback");var v=f("pathbar.visible");o(e,t,d,f,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("textposition"),l(e,t,d,f);var x=t._hasColorscale=u(e,"marker","colors")||(e.marker||{}).coloraxis;x&&h(e,t,d,f,{prefix:"marker.",cLetter:"c"}),f("leaf.opacity",x?1:.7),t._hovered={marker:{line:{width:2,color:n.contrast(d.paper_bgcolor)}}},v&&(f("pathbar.thickness",t.pathbar.textfont.size+2*s),f("pathbar.side"),f("pathbar.edgeshape")),f("sort"),f("root.color"),a(t,d,f),t._length=null}}}),d3=p({"src/traces/icicle/layout_defaults.js"(e,t){var r=tv(),i=d1();t.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("iciclecolorway",t.colorway),n("extendiciclecolors")}}}),d5=p({"src/traces/icicle/calc.js"(e){var t=us();e.calc=function(e,r){return t.calc(e,r)},e.crossTraceCalc=function(e){return t._runCrossTraceCalc("icicle",e)}}}),d4=p({"src/traces/icicle/partition.js"(e,t){var r=uo(),i=dq();t.exports=function(e,t,n){var a=n.flipX,o=n.flipY,s="h"===n.orientation,l=n.maxDepth,c=t[0],u=t[1];l&&(c=(e.height+1)*t[0]/Math.min(e.height+1,l),u=(e.height+1)*t[1]/Math.min(e.height+1,l));var h=r.partition().padding(n.pad.inner).size(s?[t[1],c]:[t[0],u])(e);return(s||a||o)&&i(h,t,{swapXY:s,flipX:a,flipY:o}),h}}}),d6=p({"src/traces/icicle/style.js"(e,t){var r=T(),i=ee(),n=tv(),a=aE().resizeText,o=dC();function s(e,t,r,a){var s=t.data.data,l=!t.children,c=s.i,u=n.castOption(r,c,"marker.line.color")||i.defaultLine,h=n.castOption(r,c,"marker.line.width")||0;e.call(o,t,r,a).style("stroke-width",h).call(i.stroke,u).style("opacity",l?r.leaf.opacity:null)}t.exports={style:function(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");a(e,t,"icicle"),t.each(function(t){var i=r.select(this),n=t[0].trace;i.style("opacity",n.opacity),i.selectAll("path.surface").each(function(t){r.select(this).call(s,t,n,e)})})},styleOne:s}}}),d8=p({"src/traces/icicle/draw_descendants.js"(e,t){var r=T(),i=tv(),n=t9(),a=tF(),o=d4(),s=d6().styleOne,l=dF(),c=dP(),u=dI(),h=dz().formatSliceLabel;t.exports=function(e,t,d,f,p){var m=p.width,g=p.height,y=p.viewX,v=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,T=p.handleSlicesExit,M=p.makeUpdateSliceInterpolator,k=p.makeUpdateTextInterpolator,A=p.prevEntry,S=e._context.staticPlot,E=e._fullLayout,C=t[0].trace,L=-1!==C.textposition.indexOf("left"),P=-1!==C.textposition.indexOf("right"),I=-1!==C.textposition.indexOf("bottom"),z=o(d,[m,g],{flipX:C.tiling.flip.indexOf("x")>-1,flipY:C.tiling.flip.indexOf("y")>-1,orientation:C.tiling.orientation,pad:{inner:C.tiling.pad},maxDepth:C._maxDepth}).descendants(),D=1/0,O=-1/0;z.forEach(function(e){var t=e.depth;t>=C._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(D=Math.min(D,t),O=Math.max(O,t))}),f=f.data(z,c.getPtId),C._maxVisibleLayers=isFinite(O)?O-D+1:0,f.enter().append("g").classed("slice",!0),T(f,!1,{},[m,g],x),f.order();var R=null;if(w&&A){var F=c.getPtId(A);f.each(function(e){null===R&&c.getPtId(e)===F&&(R={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})})}var j=function(){return R||{x0:0,x1:m,y0:0,y1:g}},B=f;return w&&(B=B.transition().each("end",function(){var t=r.select(this);c.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),B.each(function(o){o._x0=y(o.x0),o._x1=y(o.x1),o._y0=v(o.y0),o._y1=v(o.y1),o._hoverX=y(o.x1-C.tiling.pad),o._hoverY=v(I?o.y1-C.tiling.pad/2:o.y0+C.tiling.pad/2);var f=r.select(this),p=i.ensureSingle(f,"path","surface",function(e){e.style("pointer-events",S?"none":"all")});w?p.transition().attrTween("d",function(e){var t=M(e,!1,j(),[m,g],{orientation:C.tiling.orientation,flipX:C.tiling.flip.indexOf("x")>-1,flipY:C.tiling.flip.indexOf("y")>-1});return function(e){return x(t(e))}}):p.attr("d",x),f.call(u,d,e,t,{styleOne:s,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{isTransitioning:e._transitioning}),p.call(s,o,C,e,{hovered:!1}),o.x0===o.x1||o.y0===o.y1?o._text="":o._text=h(o,d,C,t,E)||"";var T=i.ensureSingle(f,"g","slicetext"),A=i.ensureSingle(T,"text","",function(e){e.attr("data-notex",1)}),z=i.ensureUniformFontSize(e,c.determineTextFont(C,o,E.font));A.text(o._text||" ").classed("slicetext",!0).attr("text-anchor",P?"end":L?"start":"middle").call(n.font,z).call(a.convertToTspans,e),o.textBB=n.bBox(A.node()),o.transform=b(o,{fontSize:z.size}),o.transform.fontSize=z.size,w?A.transition().attrTween("transform",function(e){var t=k(e,!1,j(),[m,g]);return function(e){return _(t(e))}}):A.attr("transform",_(o))}),R}}}),d7=p({"src/traces/icicle/plot.js"(e,t){var r=dZ(),i=d8();t.exports=function(e,t,n,a){return r(e,t,n,a,{type:"icicle",drawDescendants:i})}}}),d9=p({"src/traces/icicle/index.js"(e,t){t.exports={moduleType:"trace",name:"icicle",basePlotModule:dQ(),categories:[],animatable:!0,attributes:d0(),layoutAttributes:d1(),supplyDefaults:d2(),supplyLayoutDefaults:d3(),calc:d5().calc,crossTraceCalc:d5().crossTraceCalc,plot:d7(),style:d6().style,colorbar:ne(),meta:{}}}}),fe=p({"lib/icicle.js"(e,t){t.exports=d9()}}),ft=p({"src/traces/funnelarea/base_plot.js"(e){var t=tD();e.name="funnelarea",e.plot=function(r,i,n,a){t.plotBasePlot(e.name,r,i,n,a)},e.clean=function(r,i,n,a){t.cleanBasePlot(e.name,r,i,n,a)}}}),fr=p({"src/traces/funnelarea/attributes.js"(e,t){var r=cQ(),i=Z(),n=at().attributes,{hovertemplateAttrs:a,texttemplateAttrs:o,templatefallbackAttrs:s}=eW(),l=q().extendFlat;t.exports={labels:r.labels,label0:r.label0,dlabel:r.dlabel,values:r.values,marker:{colors:r.marker.colors,line:{color:l({},r.marker.line.color,{dflt:null}),width:l({},r.marker.line.width,{dflt:1}),editType:"calc"},pattern:r.marker.pattern,editType:"calc"},text:r.text,hovertext:r.hovertext,scalegroup:l({},r.scalegroup,{}),textinfo:l({},r.textinfo,{flags:["label","text","value","percent"]}),texttemplate:o({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:s({editType:"plot"}),hoverinfo:l({},i.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:a({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:s(),textposition:l({},r.textposition,{values:["inside","none"],dflt:"inside"}),textfont:r.textfont,insidetextfont:r.insidetextfont,title:{text:r.title.text,font:r.title.font,position:l({},r.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:n({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"}}}}),fi=p({"src/traces/funnelarea/layout_attributes.js"(e,t){t.exports={hiddenlabels:c1().hiddenlabels,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),fn=p({"src/traces/funnelarea/defaults.js"(e,t){var r=tv(),i=fr(),n=at().defaults,a=aM().handleText,o=c0().handleLabelsAndValues,s=c0().handleMarkerDefaults;t.exports=function(e,t,l,c){function u(n,a){return r.coerce(e,t,i,n,a)}var h,d=o(u("labels"),u("values")),f=d.len;if(t._hasLabels=d.hasLabels,t._hasValues=d.hasValues,!t._hasLabels&&t._hasValues&&(u("label0"),u("dlabel")),!f){t.visible=!1;return}t._length=f,s(e,t,c,u),u("scalegroup");var p=u("text"),m=u("texttemplate");if(u("texttemplatefallback"),m||(h=u("textinfo",Array.isArray(p)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),m||h&&"none"!==h){var g=u("textposition");a(e,t,c,u,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else"none"===h&&u("textposition","none");n(t,c,u),u("title.text")&&(u("title.position"),r.coerceFont(u,"title.font",c.font)),u("aspectratio"),u("baseratio")}}}),fa=p({"src/traces/funnelarea/layout_defaults.js"(e,t){var r=tv(),i=fi();t.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("hiddenlabels"),n("funnelareacolorway",t.colorway),n("extendfunnelareacolors")}}}),fo=p({"src/traces/funnelarea/calc.js"(e,t){var r=c3();t.exports={calc:function(e,t){return r.calc(e,t)},crossTraceCalc:function(e){r.crossTraceCalc(e,{type:"funnelarea"})}}}}),fs=p({"src/traces/funnelarea/plot.js"(e,t){var r=T(),i=t9(),n=tv(),a=n.strScale,o=n.strTranslate,s=tF(),l=aP().toMoveInsideBar,c=aE(),u=c.recordMinTextSize,h=c.clearMinTextSize,d=r_(),f=c4(),p=f.attachFxHandlers,m=f.determineInsideTextFont,g=f.layoutAreas,y=f.prerenderTitles,v=f.positionTitleOutside,x=f.formatSliceLabel;function b(e,t){return"l"+(t[0]-e[0])+","+(t[1]-e[1])}t.exports=function(e,t){var c=e._context.staticPlot,f=e._fullLayout;h("funnelarea",f),y(t,e),g(t,f._size),n.makeTraceGroups(f._funnelarealayer,t,"trace").each(function(t){var h=r.select(this),g=t[0],y=g.trace;(function(e){if(e.length){var t,r,i=e[0],n=i.trace,a=n.aspectratio,o=n.baseratio;o>.999&&(o=.999);var s,l=Math.pow(o,2),c=i.vTotal,u=c*l/(1-l)/c,h=[];for(h.push(S()),t=e.length-1;t>-1;t--)if(!(r=e[t]).hidden){var d=r.v/c;u+=d,h.push(S())}var f=1/0,p=-1/0;for(t=0;t-1;t--)if(!(r=e[t]).hidden){var T,M,k=h[w+=1][0],A=h[w][1];r.TL=[-k,A],r.TR=[k,A],r.BL=b,r.BR=_,r.pxmid=(T=r.TR,M=r.BR,[.5*(T[0]+M[0]),.5*(T[1]+M[1])]),b=r.TL,_=r.TR}}function S(){var e,t={x:e=Math.sqrt(u),y:-e};return[t.x,t.y]}})(t),h.each(function(){var h=r.select(this).selectAll("g.slice").data(t);h.enter().append("g").classed("slice",!0),h.exit().remove(),h.each(function(a,o){if(a.hidden)return void r.select(this).selectAll("path,g").remove();a.pointNumber=a.i,a.curveNumber=y.index;var h=g.cx,v=g.cy,_=r.select(this),w=_.selectAll("path.surface").data([a]);w.enter().append("path").classed("surface",!0).style({"pointer-events":c?"none":"all"}),_.call(p,e,t);var T="M"+(h+a.TR[0])+","+(v+a.TR[1])+b(a.TR,a.BR)+b(a.BR,a.BL)+b(a.BL,a.TL)+"Z";w.attr("d",T),x(e,a,g);var M=d.castOption(y.textposition,a.pts),k=_.selectAll("g.slicetext").data(a.text&&"none"!==M?[0]:[]);k.enter().append("g").classed("slicetext",!0),k.exit().remove(),k.each(function(){var c=n.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),d=n.ensureUniformFontSize(e,m(y,a,f.font));c.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(i.font,d).call(s.convertToTspans,e);var p,g=i.bBox(c.node()),x=Math.min(a.BL[1],a.BR[1])+v,b=Math.max(a.TL[1],a.TR[1])+v;(p=l(Math.max(a.TL[0],a.BL[0])+h,Math.min(a.TR[0],a.BR[0])+h,x,b,g,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=d.size,u(y.type,p,f),t[o].transform=p,n.setTransormAndDisplay(c,p)})});var _=r.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);_.enter().append("g").classed("titletext",!0),_.exit().remove(),_.each(function(){var t=n.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),l=y.title.text;y._meta&&(l=n.templateString(l,y._meta)),t.text(l).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(i.font,y.title.font).call(s.convertToTspans,e);var c=v(g,f._size);t.attr("transform",o(c.x,c.y)+a(Math.min(1,c.scale))+o(c.tx,c.ty))})})})}}}),fl=p({"src/traces/funnelarea/style.js"(e,t){var r=T(),i=rT(),n=aE().resizeText;t.exports=function(e){var t=e._fullLayout._funnelarealayer.selectAll(".trace");n(e,t,"funnelarea"),t.each(function(t){var n=t[0].trace,a=r.select(this);a.style({opacity:n.opacity}),a.selectAll("path.surface").each(function(t){r.select(this).call(i,t,n,e)})})}}}),fc=p({"src/traces/funnelarea/index.js"(e,t){t.exports={moduleType:"trace",name:"funnelarea",basePlotModule:ft(),categories:["pie-like","funnelarea","showLegend"],attributes:fr(),layoutAttributes:fi(),supplyDefaults:fn(),supplyLayoutDefaults:fa(),calc:fo().calc,crossTraceCalc:fo().crossTraceCalc,plot:fs(),style:fl(),styleOne:rT(),meta:{}}}}),fu=p({"lib/funnelarea.js"(e,t){t.exports=fc()}}),fh=p({"stackgl_modules/index.js"(e,t){var r={1964:function(e,t,r){e.exports={alpha_shape:r(3502),convex_hull:r(7352),delaunay_triangulate:r(7642),gl_cone3d:r(6405),gl_error3d:r(9165),gl_line3d:r(5714),gl_mesh3d:r(7201),gl_plot3d:r(4100),gl_scatter3d:r(8418),gl_streamtube3d:r(7815),gl_surface3d:r(9499),ndarray:r(9618),ndarray_linear_interpolate:r(4317)}},4793:function(e,t,r){var i=r(7507),n=r(3778),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var i=e,n=t;if(("string"!=typeof n||""===n)&&(n="utf8"),!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);var a=0|p(i,n),l=o(a),c=l.write(i,n);return c!==a&&(l=l.slice(0,c)),l}if(ArrayBuffer.isView(e)){var u=e;if(C(u,Uint8Array)){var m=new Uint8Array(u);return d(m.buffer,m.byteOffset,m.byteLength)}return h(u)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(C(e,ArrayBuffer)||e&&C(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(C(e,SharedArrayBuffer)||e&&C(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var g=e.valueOf&&e.valueOf();if(null!=g&&g!==e)return s.from(g,t,r);var y=function(e){if(s.isBuffer(e)){var t=0|f(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?o(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(y)return y;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),o(e<0?0:0|f(e))}function h(e){for(var t=e.length<0?0:0|f(e.length),r=o(t),i=0;i=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||C(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return A(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return S(e).length;default:if(n)return i?-1:A(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){var n,a,o,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var n="",a=t;a0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(a=r*=1)!=a&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return -1;r=e.length-1}else if(r<0)if(!n)return -1;else r=0;if("string"==typeof t&&(t=s.from(t,i)),s.isBuffer(t))return 0===t.length?-1:v(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,i,n);throw TypeError("val must be string, number or Buffer")}function v(e,t,r,i,n){var a,o=1,s=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return -1;o=2,s/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){var u=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var h=!0,d=0;d239?4:c>223?3:c>191?2:1;if(n+h<=r)switch(h){case 1:c<128&&(u=c);break;case 2:(192&(a=e[n+1]))==128&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[n+1],o=e[n+2],(192&a)==128&&(192&o)==128&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[n+1],o=e[n+2],s=e[n+3],(192&a)==128&&(192&o)==128&&(192&s)==128&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|1023&u),i.push(u),n+=h}var d=i,f=d.length;if(f<=4096)return String.fromCharCode.apply(String,d);for(var p="",m=0;mr)throw RangeError("Trying to access beyond buffer length")}function _(e,t,r,i,n,a){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>n||te.length)throw RangeError("Index out of range")}function w(e,t,r,i,n,a){if(r+i>e.length||r<0)throw RangeError("Index out of range")}function T(e,t,r,i,a){return t*=1,r>>>=0,a||w(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,i,23,4),r+4}function M(e,t,r,i,a){return t*=1,r>>>=0,a||w(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,i,52,8),r+8}t.hp=s,t.IS=50,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch{return!1}}(),!s.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&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."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return c(e),e<=0?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)},s.allocUnsafe=function(e){return u(e)},s.allocUnsafeSlow=function(e){return u(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(C(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),C(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,i=t.length,n=0,a=Math.min(r,i);ni.length?s.from(a).copy(i,n):Uint8Array.prototype.set.call(i,a,n);else if(s.isBuffer(a))a.copy(i,n);else throw TypeError('"list" argument must be an Array of Buffers');n+=a.length}return i},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},a&&(s.prototype[a]=s.prototype.inspect),s.prototype.compare=function(e,t,r,i,n){if(C(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,i>>>=0,n>>>=0,this===e)return 0;for(var a=n-i,o=r-t,l=Math.min(a,o),c=this.slice(i,n),u=e.slice(t,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var n,a,o,s,l,c,u,h,d=this.length-t;if((void 0===r||r>d)&&(r=d),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var f=!1;;)switch(i){case"hex":return function(e,t,r,i){r=Number(r)||0;var n=e.length-r;i?(i=Number(i))>n&&(i=n):i=n;var a=t.length;i>a/2&&(i=a/2);for(var o=0;o>8,n.push(r%256),n.push(i);return n}(e,this.length-u),this,u,h);default:if(f)throw TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),f=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||b(e,t,this.length);for(var i=this[e],n=1,a=0;++a>>=0,t>>>=0,r||b(e,t,this.length);for(var i=this[e+--t],n=1;t>0&&(n*=256);)i+=this[e+--t]*n;return i},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var i=this[e],n=1,a=0;++a=(n*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var i=t,n=1,a=this[e+--i];i>0&&(n*=256);)a+=this[e+--i]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),128&this[e]?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),n.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,r,i){if(e*=1,t>>>=0,r>>>=0,!i){var n=Math.pow(2,8*r)-1;_(this,e,t,r,n,0)}var a=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!i){var n=Math.pow(2,8*r)-1;_(this,e,t,r,n,0)}var a=r-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,i){if(e*=1,t>>>=0,!i){var n=Math.pow(2,8*r-1);_(this,e,t,r,n-1,-n)}var a=0,o=1,s=0;for(this[t]=255&e;++a>>=0,!i){var n=Math.pow(2,8*r-1);_(this,e,t,r,n-1,-n)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return T(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return T(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,i){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw RangeError("Index out of range");if(i<0)throw RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n55295&&r<57344){if(!n){if(r>56319||o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function S(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(k,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function E(e,t,r,i){for(var n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function C(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var L=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var i=16*r,n=0;n<16;++n)t[i+n]=e[r]+e[n];return t}()},9216:function(e){e.exports=n,e.exports.isMobile=n,e.exports.default=n;let t=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,i=/android|ipad|playbook|silk/i;function n(e){e||(e={});let n=e.ua;if(!n&&"u">typeof navigator&&(n=navigator.userAgent),n&&n.headers&&"string"==typeof n.headers["user-agent"]&&(n=n.headers["user-agent"]),"string"!=typeof n)return!1;let a=t.test(n)&&!r.test(n)||!!e.tablet&&i.test(n);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==n.indexOf("Macintosh")&&-1!==n.indexOf("Safari")&&(a=!0),a}},6296:function(e,t,r){e.exports=function(e){var t=(e=e||{}).eye||[0,0,1],r=e.center||[0,0,0],s=e.up||[0,1,0],l=e.distanceLimits||[0,1/0],c=e.mode||"turntable",u=i(),h=n(),d=a();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,t,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,t,r,s),d.setDistanceLimits(l[0],l[1]),d.lookAt(0,t,r,s),new o({turntable:u,orbit:h,matrix:d},c)};var i=r(7261),n=r(9977),a=r(1811);function o(e,t){this._controllerNames=Object.keys(e),this._controllerList=this._controllerNames.map(function(t){return e[t]}),this._mode=t,this._active=e[t],this._active||(this._mode="turntable",this._active=e.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;s.flush=function(e){for(var t=this._controllerList,r=0;r"u"?r(1538):WeakMap,n=r(2762),a=r(8116),o=new i;e.exports=function(e){var t=o.get(e),r=t&&(t._triangleBuffer.handle||t._triangleBuffer.buffer);if(!r||!e.isBuffer(r)){var i=n(e,new Float32Array([-1,-1,-1,4,4,-1]));(t=a(e,[{buffer:i,type:e.FLOAT,size:2}]))._triangleBuffer=i,o.set(e,t)}t.bind(),e.drawArrays(e.TRIANGLES,0,3),t.unbind()}},1085:function(e,t,r){var i=r(1371);e.exports=function(e,t,r){t="number"==typeof t?t:1,r=r||": ";var n=e.split(/\r?\n/),a=String(n.length+t-1).length;return n.map(function(e,n){var o=n+t,s=String(o).length;return i(o,a-s)+r+e}).join(` -`)}},3952:function(e,t,r){e.exports=function(e){var t=e.length;if(0===t)return[];if(1===t)return[0];for(var r=e[0].length,n=[e[0]],a=[0],o=1;o0?o-4:o;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,i=e.length,n=i%3,a=[],o=0,s=i-n;o>18&63]+r[n>>12&63]+r[n>>6&63]+r[63&n]);return a.join("")}(e,o,o+16383>s?s:o+16383));return 1===n?a.push(r[(t=e[i-1])>>2]+r[t<<4&63]+"=="):2===n&&a.push(r[(t=(e[i-2]<<8)+e[i-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),a.join("")};for(var r=[],i=[],n="u">typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var i=r===t?0:4-r%4;return[r,i]}i[45]=62,i[95]=63},3865:function(e,t,r){var i=r(869);e.exports=function(e,t){return i(e[0].mul(t[1]).add(t[0].mul(e[1])),e[1].mul(t[1]))}},1318:function(e){e.exports=function(e,t){return e[0].mul(t[1]).cmp(t[0].mul(e[1]))}},8697:function(e,t,r){var i=r(869);e.exports=function(e,t){return i(e[0].mul(t[1]),e[1].mul(t[0]))}},7842:function(e,t,r){var i=r(6330),n=r(1533),a=r(2651),o=r(6768),s=r(869),l=r(8697);e.exports=function e(t,r){if(i(t))return r?l(t,e(r)):[t[0].clone(),t[1].clone()];var c,u,h=0;if(n(t))c=t.clone();else if("string"==typeof t)c=o(t);else{if(0===t)return[a(0),a(1)];if(t===Math.floor(t))c=a(t);else{for(;t!==Math.floor(t);)t*=1157920892373162e62,h-=256;c=a(t)}}if(i(r))c.mul(r[1]),u=r[0].clone();else if(n(r))u=r.clone();else if("string"==typeof r)u=o(r);else if(r)if(r===Math.floor(r))u=a(r);else{for(;r!==Math.floor(r);)r*=1157920892373162e62,h+=256;u=a(r)}else u=a(1);return h>0?c=c.ushln(h):h<0&&(u=u.ushln(-h)),s(c,u)}},6330:function(e,t,r){var i=r(1533);e.exports=function(e){return Array.isArray(e)&&2===e.length&&i(e[0])&&i(e[1])}},5716:function(e,t,r){var i=r(6859);e.exports=function(e){return e.cmp(new i(0))}},1369:function(e,t,r){var i=r(5716);e.exports=function(e){var t=e.length,r=e.words,n=0;if(1===t)n=r[0];else if(2===t)n=r[0]+0x4000000*r[1];else for(var a=0;a20?52:r+32}},1533:function(e,t,r){r(6859),e.exports=function(e){return e&&"object"==typeof e&&!!e.words}},2651:function(e,t,r){var i=r(6859),n=r(2361);e.exports=function(e){var t=n.exponent(e);return t<52?new i(e):new i(e*Math.pow(2,52-t)).ushln(t-52)}},869:function(e,t,r){var i=r(2651),n=r(5716);e.exports=function(e,t){var r=n(e),a=n(t);if(0===r)return[i(0),i(1)];if(0===a)return[i(0),i(0)];a<0&&(e=e.neg(),t=t.neg());var o=e.gcd(t);return o.cmpn(1)?[e.div(o),t.div(o)]:[e,t]}},6768:function(e,t,r){var i=r(6859);e.exports=function(e){return new i(e)}},6504:function(e,t,r){var i=r(869);e.exports=function(e,t){return i(e[0].mul(t[0]),e[1].mul(t[1]))}},7721:function(e,t,r){var i=r(5716);e.exports=function(e){return i(e[0])*i(e[1])}},5572:function(e,t,r){var i=r(869);e.exports=function(e,t){return i(e[0].mul(t[1]).sub(e[1].mul(t[0])),e[1].mul(t[1]))}},946:function(e,t,r){var i=r(1369),n=r(4025);e.exports=function(e){var t=e[0],r=e[1];if(0===t.cmpn(0))return 0;var a=t.abs().divmod(r.abs()),o=i(a.div),s=a.mod,l=t.negative!==r.negative?-1:1;if(0===s.cmpn(0))return l*o;if(o){var c=n(o)+4,u=i(s.ushln(c).divRound(r));return l*(o+u*Math.pow(2,-c))}var h=r.bitLength()-s.bitLength()+53,u=i(s.ushln(h).divRound(r));return h<1023?l*u*Math.pow(2,-h):l*(u*=11125369292536007e-324)*Math.pow(2,1023-h)}},2478:function(e){function t(e,t,r,i,n){for(var a=n+1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>=0?(a=o,n=o-1):i=o+1}return a}function r(e,t,r,i,n){for(var a=n+1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>0?(a=o,n=o-1):i=o+1}return a}function i(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<0?(a=o,i=o+1):n=o-1}return a}function n(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<=0?(a=o,i=o+1):n=o-1}return a}function a(e,t,r,i,n){for(;i<=n;){var a=i+n>>>1,o=e[a],s=void 0!==r?r(o,t):o-t;if(0===s)return a;s<=0?i=a+1:n=a-1}return -1}function o(e,t,r,i,n,a){return"function"==typeof r?a(e,t,r,void 0===i?0:0|i,void 0===n?e.length-1:0|n):a(e,t,void 0,void 0===r?0:0|r,void 0===i?e.length-1:0|i)}e.exports={ge:function(e,r,i,n,a){return o(e,r,i,n,a,t)},gt:function(e,t,i,n,a){return o(e,t,i,n,a,r)},lt:function(e,t,r,n,a){return o(e,t,r,n,a,i)},le:function(e,t,r,i,a){return o(e,t,r,i,a,n)},eq:function(e,t,r,i,n){return o(e,t,r,i,n,a)}}},8828:function(e,t){function r(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),0xff00ff&e&&(t-=8),0xf0f0f0f&e&&(t-=4),0x33333333&e&&(t-=2),0x55555555&e&&(t-=1),t}t.INT_BITS=32,t.INT_MAX=0x7fffffff,t.INT_MIN=-0x80000000,t.sign=function(e){return(e>0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:+(e>=10)},t.popCount=function(e){return e-=e>>>1&0x55555555,((e=(0x33333333&e)+(e>>>2&0x33333333))+(e>>>4)&0xf0f0f0f)*0x1010101>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var i=Array(256);(function(e){for(var t=0;t<256;++t){var r=t,i=t,n=7;for(r>>>=1;r;r>>>=1)i<<=1,i|=1&r,--n;e[t]=i<>>8&255]<<16|i[e>>>16&255]<<8|i[e>>>24&255]},t.interleave2=function(e,t){return e&=65535,t&=65535,(e=((e=((e=((e=(e|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=(t|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1},t.deinterleave2=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x55555555)|e>>>1)&0x33333333)|e>>>2)&0xf0f0f0f)|e>>>4)&0xff00ff)|e>>>16)&65535)<<16>>16},t.interleave3=function(e,t,r){return e&=1023,t&=1023,r&=1023,r=((r=((r=((r=(r|r<<16)&0xff0000ff)|r<<8)&0xf00f00f)|r<<4)&0xc30c30c3)|r<<2)&0x49249249,(e=((e=((e=((e=(e|e<<16)&0xff0000ff)|e<<8)&0xf00f00f)|e<<4)&0xc30c30c3)|e<<2)&0x49249249|(t=((t=((t=((t=(t|t<<16)&0xff0000ff)|t<<8)&0xf00f00f)|t<<4)&0xc30c30c3)|t<<2)&0x49249249)<<1)|r<<2},t.deinterleave3=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x49249249)|e>>>2)&0xc30c30c3)|e>>>4)&0xf00f00f)|e>>>8)&0xff0000ff)|e>>>16)&1023)<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},6859:function(e,t,r){!function(e,t){function i(e,t){if(!e)throw Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{c="u">typeof window&&"u">typeof window.Buffer?window.Buffer:r(7790).Buffer}catch{}function o(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var i=o(e,r);return r-1>=t&&(i|=o(e,r-1)<<4),i}function l(e,t,r,i){for(var n=0,a=Math.min(e.length,r),o=t;o=49?n+=s-49+10:s>=17?n+=s-17+10:n+=s}return n}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return 0>e.cmp(t)?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)o=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=o<>>26-s&0x3ffffff,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(n=0,a=0;n>>26-s&0x3ffffff,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var i=0;i=t;i-=2)n=s(e,t,i)<=18?(a-=18,o+=1,this.words[o]|=n>>>26):a+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(a-=18,o+=1,this.words[o]|=n>>>26):a+=8;this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=0x3ffffff;n*=t)i++;i--,n=n/t|0;for(var a=e.length-r,o=a%i,s=Math.min(a,a-o)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var c,u=["","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"],h=[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],d=[0,0,0x2000000,0x290d741,0x1000000,0x2e90edd,0x39aa400,0x267bf47,0x1000000,0x290d741,1e7,0x12959c3,0x222c000,0x3bd7765,7529536,0xadcea1,0x1000000,0x1704f61,0x206fc40,0x2cddcf9,64e6,4084101,5153632,6436343,7962624,9765625,0xb54ba0,0xdaf26b,0x1069c00,0x138f9ad,243e5,0x1b4d89f,0x2000000,0x25528a1,0x2b54a20,0x3216b93,0x39aa400];function f(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],a=0|t.words[0],o=n*a,s=0x3ffffff&o,l=o/0x4000000|0;r.words[0]=s;for(var c=1;c>>26,h=0x3ffffff&l,d=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=d;f++){var p=c-f|0;u+=(o=(n=0|e.words[p])*(a=0|t.words[f])+h)/0x4000000|0,h=0x3ffffff&o}r.words[c]=0|h,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}a.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,n=0,a=0,o=0;o>>24-n&0xffffff,(n+=2)>=26&&(n-=26,o--),r=0!==a||o!==this.length-1?u[6-l.length]+l+r:l+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],f=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);r=(p=p.idivn(f)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=0x4000000*this.words[1]:3===this.length&&1===this.words[2]?e+=0x10000000000000+0x4000000*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return i("u">typeof c),this.toArrayLike(c,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var o,s,l=new e(a),c=this.clone();if("le"===t){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),l[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&0x3ffffff>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<e.length?(r=this,i=e):(r=e,i=this);for(var t,r,i,n=0,a=0;a>>26;for(;0!==n&&a>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,i=this.iadd(e);return e.negative=1,i._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=e):(t=e,r=this);for(var a=0,o=0;o>26,this.words[o]=0x3ffffff&i;for(;0!==a&&o>26,this.words[o]=0x3ffffff&i;if(0===a&&o>>13,f=0|o[1],p=8191&f,m=f>>>13,g=0|o[2],y=8191&g,v=g>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],T=8191&w,M=w>>>13,k=0|o[5],A=8191&k,S=k>>>13,E=0|o[6],C=8191&E,L=E>>>13,P=0|o[7],I=8191&P,z=P>>>13,D=0|o[8],O=8191&D,R=D>>>13,F=0|o[9],j=8191&F,B=F>>>13,N=0|s[0],U=8191&N,V=N>>>13,q=0|s[1],H=8191&q,G=q>>>13,W=0|s[2],Y=8191&W,Z=W>>>13,$=0|s[3],X=8191&$,K=$>>>13,J=0|s[4],Q=8191&J,ee=J>>>13,et=0|s[5],er=8191&et,ei=et>>>13,en=0|s[6],ea=8191&en,eo=en>>>13,es=0|s[7],el=8191&es,ec=es>>>13,eu=0|s[8],eh=8191&eu,ed=eu>>>13,ef=0|s[9],ep=8191&ef,em=ef>>>13;r.negative=e.negative^t.negative,r.length=19,i=Math.imul(h,U),n=(n=Math.imul(h,V))+Math.imul(d,U)|0,a=Math.imul(d,V);var eg=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eg>>>26)|0,eg&=0x3ffffff,i=Math.imul(p,U),n=(n=Math.imul(p,V))+Math.imul(m,U)|0,a=Math.imul(m,V),i=i+Math.imul(h,H)|0,n=(n=n+Math.imul(h,G)|0)+Math.imul(d,H)|0,a=a+Math.imul(d,G)|0;var ey=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ey>>>26)|0,ey&=0x3ffffff,i=Math.imul(y,U),n=(n=Math.imul(y,V))+Math.imul(v,U)|0,a=Math.imul(v,V),i=i+Math.imul(p,H)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,G)|0,i=i+Math.imul(h,Y)|0,n=(n=n+Math.imul(h,Z)|0)+Math.imul(d,Y)|0,a=a+Math.imul(d,Z)|0;var ev=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ev>>>26)|0,ev&=0x3ffffff,i=Math.imul(b,U),n=(n=Math.imul(b,V))+Math.imul(_,U)|0,a=Math.imul(_,V),i=i+Math.imul(y,H)|0,n=(n=n+Math.imul(y,G)|0)+Math.imul(v,H)|0,a=a+Math.imul(v,G)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,Z)|0,i=i+Math.imul(h,X)|0,n=(n=n+Math.imul(h,K)|0)+Math.imul(d,X)|0,a=a+Math.imul(d,K)|0;var ex=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ex>>>26)|0,ex&=0x3ffffff,i=Math.imul(T,U),n=(n=Math.imul(T,V))+Math.imul(M,U)|0,a=Math.imul(M,V),i=i+Math.imul(b,H)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(_,H)|0,a=a+Math.imul(_,G)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,Z)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,K)|0)+Math.imul(m,X)|0,a=a+Math.imul(m,K)|0,i=i+Math.imul(h,Q)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(d,Q)|0,a=a+Math.imul(d,ee)|0;var eb=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eb>>>26)|0,eb&=0x3ffffff,i=Math.imul(A,U),n=(n=Math.imul(A,V))+Math.imul(S,U)|0,a=Math.imul(S,V),i=i+Math.imul(T,H)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(M,H)|0,a=a+Math.imul(M,G)|0,i=i+Math.imul(b,Y)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,Z)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,K)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,K)|0,i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,i=i+Math.imul(h,er)|0,n=(n=n+Math.imul(h,ei)|0)+Math.imul(d,er)|0,a=a+Math.imul(d,ei)|0;var e_=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(e_>>>26)|0,e_&=0x3ffffff,i=Math.imul(C,U),n=(n=Math.imul(C,V))+Math.imul(L,U)|0,a=Math.imul(L,V),i=i+Math.imul(A,H)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,i=i+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,Z)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,Z)|0,i=i+Math.imul(b,X)|0,n=(n=n+Math.imul(b,K)|0)+Math.imul(_,X)|0,a=a+Math.imul(_,K)|0,i=i+Math.imul(y,Q)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,ee)|0,i=i+Math.imul(p,er)|0,n=(n=n+Math.imul(p,ei)|0)+Math.imul(m,er)|0,a=a+Math.imul(m,ei)|0,i=i+Math.imul(h,ea)|0,n=(n=n+Math.imul(h,eo)|0)+Math.imul(d,ea)|0,a=a+Math.imul(d,eo)|0;var ew=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ew>>>26)|0,ew&=0x3ffffff,i=Math.imul(I,U),n=(n=Math.imul(I,V))+Math.imul(z,U)|0,a=Math.imul(z,V),i=i+Math.imul(C,H)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,G)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,Z)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,Z)|0,i=i+Math.imul(T,X)|0,n=(n=n+Math.imul(T,K)|0)+Math.imul(M,X)|0,a=a+Math.imul(M,K)|0,i=i+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,ee)|0,i=i+Math.imul(y,er)|0,n=(n=n+Math.imul(y,ei)|0)+Math.imul(v,er)|0,a=a+Math.imul(v,ei)|0,i=i+Math.imul(p,ea)|0,n=(n=n+Math.imul(p,eo)|0)+Math.imul(m,ea)|0,a=a+Math.imul(m,eo)|0,i=i+Math.imul(h,el)|0,n=(n=n+Math.imul(h,ec)|0)+Math.imul(d,el)|0,a=a+Math.imul(d,ec)|0;var eT=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eT>>>26)|0,eT&=0x3ffffff,i=Math.imul(O,U),n=(n=Math.imul(O,V))+Math.imul(R,U)|0,a=Math.imul(R,V),i=i+Math.imul(I,H)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(z,H)|0,a=a+Math.imul(z,G)|0,i=i+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,Z)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,Z)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,K)|0)+Math.imul(S,X)|0,a=a+Math.imul(S,K)|0,i=i+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,i=i+Math.imul(b,er)|0,n=(n=n+Math.imul(b,ei)|0)+Math.imul(_,er)|0,a=a+Math.imul(_,ei)|0,i=i+Math.imul(y,ea)|0,n=(n=n+Math.imul(y,eo)|0)+Math.imul(v,ea)|0,a=a+Math.imul(v,eo)|0,i=i+Math.imul(p,el)|0,n=(n=n+Math.imul(p,ec)|0)+Math.imul(m,el)|0,a=a+Math.imul(m,ec)|0,i=i+Math.imul(h,eh)|0,n=(n=n+Math.imul(h,ed)|0)+Math.imul(d,eh)|0,a=a+Math.imul(d,ed)|0;var eM=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eM>>>26)|0,eM&=0x3ffffff,i=Math.imul(j,U),n=(n=Math.imul(j,V))+Math.imul(B,U)|0,a=Math.imul(B,V),i=i+Math.imul(O,H)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,G)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(z,Y)|0,a=a+Math.imul(z,Z)|0,i=i+Math.imul(C,X)|0,n=(n=n+Math.imul(C,K)|0)+Math.imul(L,X)|0,a=a+Math.imul(L,K)|0,i=i+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,ee)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,i=i+Math.imul(T,er)|0,n=(n=n+Math.imul(T,ei)|0)+Math.imul(M,er)|0,a=a+Math.imul(M,ei)|0,i=i+Math.imul(b,ea)|0,n=(n=n+Math.imul(b,eo)|0)+Math.imul(_,ea)|0,a=a+Math.imul(_,eo)|0,i=i+Math.imul(y,el)|0,n=(n=n+Math.imul(y,ec)|0)+Math.imul(v,el)|0,a=a+Math.imul(v,ec)|0,i=i+Math.imul(p,eh)|0,n=(n=n+Math.imul(p,ed)|0)+Math.imul(m,eh)|0,a=a+Math.imul(m,ed)|0,i=i+Math.imul(h,ep)|0,n=(n=n+Math.imul(h,em)|0)+Math.imul(d,ep)|0,a=a+Math.imul(d,em)|0;var ek=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ek>>>26)|0,ek&=0x3ffffff,i=Math.imul(j,H),n=(n=Math.imul(j,G))+Math.imul(B,H)|0,a=Math.imul(B,G),i=i+Math.imul(O,Y)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,Z)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,K)|0)+Math.imul(z,X)|0,a=a+Math.imul(z,K)|0,i=i+Math.imul(C,Q)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,i=i+Math.imul(A,er)|0,n=(n=n+Math.imul(A,ei)|0)+Math.imul(S,er)|0,a=a+Math.imul(S,ei)|0,i=i+Math.imul(T,ea)|0,n=(n=n+Math.imul(T,eo)|0)+Math.imul(M,ea)|0,a=a+Math.imul(M,eo)|0,i=i+Math.imul(b,el)|0,n=(n=n+Math.imul(b,ec)|0)+Math.imul(_,el)|0,a=a+Math.imul(_,ec)|0,i=i+Math.imul(y,eh)|0,n=(n=n+Math.imul(y,ed)|0)+Math.imul(v,eh)|0,a=a+Math.imul(v,ed)|0,i=i+Math.imul(p,ep)|0,n=(n=n+Math.imul(p,em)|0)+Math.imul(m,ep)|0,a=a+Math.imul(m,em)|0;var eA=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eA>>>26)|0,eA&=0x3ffffff,i=Math.imul(j,Y),n=(n=Math.imul(j,Z))+Math.imul(B,Y)|0,a=Math.imul(B,Z),i=i+Math.imul(O,X)|0,n=(n=n+Math.imul(O,K)|0)+Math.imul(R,X)|0,a=a+Math.imul(R,K)|0,i=i+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(z,Q)|0,a=a+Math.imul(z,ee)|0,i=i+Math.imul(C,er)|0,n=(n=n+Math.imul(C,ei)|0)+Math.imul(L,er)|0,a=a+Math.imul(L,ei)|0,i=i+Math.imul(A,ea)|0,n=(n=n+Math.imul(A,eo)|0)+Math.imul(S,ea)|0,a=a+Math.imul(S,eo)|0,i=i+Math.imul(T,el)|0,n=(n=n+Math.imul(T,ec)|0)+Math.imul(M,el)|0,a=a+Math.imul(M,ec)|0,i=i+Math.imul(b,eh)|0,n=(n=n+Math.imul(b,ed)|0)+Math.imul(_,eh)|0,a=a+Math.imul(_,ed)|0,i=i+Math.imul(y,ep)|0,n=(n=n+Math.imul(y,em)|0)+Math.imul(v,ep)|0,a=a+Math.imul(v,em)|0;var eS=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eS>>>26)|0,eS&=0x3ffffff,i=Math.imul(j,X),n=(n=Math.imul(j,K))+Math.imul(B,X)|0,a=Math.imul(B,K),i=i+Math.imul(O,Q)|0,n=(n=n+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,i=i+Math.imul(I,er)|0,n=(n=n+Math.imul(I,ei)|0)+Math.imul(z,er)|0,a=a+Math.imul(z,ei)|0,i=i+Math.imul(C,ea)|0,n=(n=n+Math.imul(C,eo)|0)+Math.imul(L,ea)|0,a=a+Math.imul(L,eo)|0,i=i+Math.imul(A,el)|0,n=(n=n+Math.imul(A,ec)|0)+Math.imul(S,el)|0,a=a+Math.imul(S,ec)|0,i=i+Math.imul(T,eh)|0,n=(n=n+Math.imul(T,ed)|0)+Math.imul(M,eh)|0,a=a+Math.imul(M,ed)|0,i=i+Math.imul(b,ep)|0,n=(n=n+Math.imul(b,em)|0)+Math.imul(_,ep)|0,a=a+Math.imul(_,em)|0;var eE=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eE>>>26)|0,eE&=0x3ffffff,i=Math.imul(j,Q),n=(n=Math.imul(j,ee))+Math.imul(B,Q)|0,a=Math.imul(B,ee),i=i+Math.imul(O,er)|0,n=(n=n+Math.imul(O,ei)|0)+Math.imul(R,er)|0,a=a+Math.imul(R,ei)|0,i=i+Math.imul(I,ea)|0,n=(n=n+Math.imul(I,eo)|0)+Math.imul(z,ea)|0,a=a+Math.imul(z,eo)|0,i=i+Math.imul(C,el)|0,n=(n=n+Math.imul(C,ec)|0)+Math.imul(L,el)|0,a=a+Math.imul(L,ec)|0,i=i+Math.imul(A,eh)|0,n=(n=n+Math.imul(A,ed)|0)+Math.imul(S,eh)|0,a=a+Math.imul(S,ed)|0,i=i+Math.imul(T,ep)|0,n=(n=n+Math.imul(T,em)|0)+Math.imul(M,ep)|0,a=a+Math.imul(M,em)|0;var eC=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eC>>>26)|0,eC&=0x3ffffff,i=Math.imul(j,er),n=(n=Math.imul(j,ei))+Math.imul(B,er)|0,a=Math.imul(B,ei),i=i+Math.imul(O,ea)|0,n=(n=n+Math.imul(O,eo)|0)+Math.imul(R,ea)|0,a=a+Math.imul(R,eo)|0,i=i+Math.imul(I,el)|0,n=(n=n+Math.imul(I,ec)|0)+Math.imul(z,el)|0,a=a+Math.imul(z,ec)|0,i=i+Math.imul(C,eh)|0,n=(n=n+Math.imul(C,ed)|0)+Math.imul(L,eh)|0,a=a+Math.imul(L,ed)|0,i=i+Math.imul(A,ep)|0,n=(n=n+Math.imul(A,em)|0)+Math.imul(S,ep)|0,a=a+Math.imul(S,em)|0;var eL=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eL>>>26)|0,eL&=0x3ffffff,i=Math.imul(j,ea),n=(n=Math.imul(j,eo))+Math.imul(B,ea)|0,a=Math.imul(B,eo),i=i+Math.imul(O,el)|0,n=(n=n+Math.imul(O,ec)|0)+Math.imul(R,el)|0,a=a+Math.imul(R,ec)|0,i=i+Math.imul(I,eh)|0,n=(n=n+Math.imul(I,ed)|0)+Math.imul(z,eh)|0,a=a+Math.imul(z,ed)|0,i=i+Math.imul(C,ep)|0,n=(n=n+Math.imul(C,em)|0)+Math.imul(L,ep)|0,a=a+Math.imul(L,em)|0;var eP=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eP>>>26)|0,eP&=0x3ffffff,i=Math.imul(j,el),n=(n=Math.imul(j,ec))+Math.imul(B,el)|0,a=Math.imul(B,ec),i=i+Math.imul(O,eh)|0,n=(n=n+Math.imul(O,ed)|0)+Math.imul(R,eh)|0,a=a+Math.imul(R,ed)|0,i=i+Math.imul(I,ep)|0,n=(n=n+Math.imul(I,em)|0)+Math.imul(z,ep)|0,a=a+Math.imul(z,em)|0;var eI=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eI>>>26)|0,eI&=0x3ffffff,i=Math.imul(j,eh),n=(n=Math.imul(j,ed))+Math.imul(B,eh)|0,a=Math.imul(B,ed),i=i+Math.imul(O,ep)|0,n=(n=n+Math.imul(O,em)|0)+Math.imul(R,ep)|0,a=a+Math.imul(R,em)|0;var ez=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ez>>>26)|0,ez&=0x3ffffff,i=Math.imul(j,ep),n=(n=Math.imul(j,em))+Math.imul(B,ep)|0,a=Math.imul(B,em);var eD=(c+i|0)+((8191&n)<<13)|0;return c=(a+(n>>>13)|0)+(eD>>>26)|0,eD&=0x3ffffff,l[0]=eg,l[1]=ey,l[2]=ev,l[3]=ex,l[4]=eb,l[5]=e_,l[6]=ew,l[7]=eT,l[8]=eM,l[9]=ek,l[10]=eA,l[11]=eS,l[12]=eE,l[13]=eC,l[14]=eL,l[15]=eP,l[16]=eI,l[17]=ez,l[18]=eD,0!==c&&(l[19]=c,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=f),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?f(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,a=0;a>>26)|0)>>>26,o&=0x3ffffff}r.words[a]=s,i=o,o=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,e,t):m(this,e,t)},g.prototype.makeRBT=function(e){for(var t=Array(e),r=a.prototype._countBits(e)-1,i=0;i>=1;return i},g.prototype.permute=function(e,t,r,i,n,a){for(var o=0;o>>=1)n++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=(n/0x4000000|0)+(a>>>26),this.words[r]=0x3ffffff&a}return 0!==t&&(this.words[r]=t,this.length++),this.length=0===e?1:this.length,this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=Array(e.bitLength()),r=0;r>>n}return t}(e);if(0===t.length)return new a(1);for(var r=this,i=0;i=0);var t,r=e%26,n=(e-r)/26,a=0x3ffffff>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0);var n=t?(t-t%26)/26:0,a=e%26,o=Math.min((e-a)/26,this.length),s=0x3ffffff^0x3ffffff>>>a<o)for(this.length-=o,l=0;l=0&&(0!==c||l>=n);l--){var u=0|this.words[l];this.words[l]=c<<26-a|u>>>a,c=u&s}return r&&0!==c&&(r.words[r.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return!(this.length<=r)&&!!(this.words[r]&1<=0);var t=e%26,r=(e-t)/26;return(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==t&&r++,this.length=Math.min(r,this.length),0!==t&&(this.words[this.length-1]&=0x3ffffff^0x3ffffff>>>t<=0x4000000;t++)this.words[t]-=0x4000000,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(i("number"==typeof e),i(e<0x4000000),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/0x4000000|0),this.words[n+r]=0x3ffffff&o}for(;n>26,this.words[n+r]=0x3ffffff&o;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n>26,this.words[n]=0x3ffffff&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,i=this.clone(),n=e,o=0|n.words[n.length-1];0!=(r=26-this._countBits(o))&&(n=n.ushln(r),i.iushln(r),o=0|n.words[n.length-1]);var s,l=i.length-n.length;if("mod"!==t){(s=new a(null)).length=l+1,s.words=Array(s.length);for(var c=0;c=0;h--){var d=(0|i.words[n.length+h])*0x4000000+(0|i.words[n.length+h-1]);for(d=Math.min(d/o|0,0x3ffffff),i._ishlnsubmul(n,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(n,1,h),i.isZero()||(i.negative^=1);s&&(s.words[h]=d)}return s&&s.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},a.prototype.divmod=function(e,t,r){var n,o,s;return(i(!e.isZero()),this.isZero())?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:n,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):this.negative&e.negative?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||0>this.cmp(e)?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){i(e<=0x3ffffff);for(var t=0x4000000%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e;return r},a.prototype.idivn=function(e){i(e<=0x3ffffff);for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+0x4000000*t;this.words[r]=n/e|0,t=n%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(u),o.isub(h)),n.iushrn(1),o.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(h)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(s),o.isub(l)):(r.isub(t),s.isub(n),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},a.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t,r=this,n=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var o=new a(1),s=new a(0),l=n.clone();r.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;!(r.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(r.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);r.cmp(n)>=0?(r.isub(n),o.isub(s)):(n.isub(r),s.isub(o))}return 0>(t=0===r.cmpn(1)?o:s).cmpn(0)&&t.iadd(e),t},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var a=t;t=r,r=a}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return(1&this.words[0])==0},a.prototype.isOdd=function(){return(1&this.words[0])==1},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<>>26,s&=0x3ffffff,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=0x3ffffff,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){in&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return -1===this.cmpn(e)},a.prototype.lt=function(e){return -1===this.cmp(e)},a.prototype.lten=function(e){return 0>=this.cmpn(e)},a.prototype.lte=function(e){return 0>=this.cmp(e)},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new T(e)},a.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}v.prototype._tmp=function(){var e=new a(null);return e.words=Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(t>this.n);var i=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},n(x,v),x.prototype.split=function(e,t){for(var r=Math.min(e.length,9),i=0;i>>22,n=a}n>>>=22,e.words[i-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){var t;if(y[e])return y[e];if("k256"===e)t=new x;else if("p224"===e)t=new b;else if("p192"===e)t=new _;else if("p25519"===e)t=new w;else throw Error("Unknown prime "+e);return y[e]=t,t},T.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){i((e.negative|t.negative)==0,"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);i(!n.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,n),d=this.pow(e,n.addn(1).iushrn(1)),f=this.pow(e,n),p=o;0!==f.cmp(s);){for(var m=f,g=0;0!==m.cmp(s);g++)m=m.redSqr();i(g=0;i--){for(var c=t.words[i],u=l-1;u>=0;u--){var h=c>>u&1;if(n!==r[0]&&(n=this.sqr(n)),0===h&&0===o){s=0;continue}o<<=1,o|=h,(4==++s||0===i&&0===u)&&(n=this.mul(n,r[o]),s=0,o=0)}l=26}return n},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new M(e)},n(M,T),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):0>n.cmpn(0)&&(a=n.iadd(this.m)),a._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):0>n.cmpn(0)&&(o=n.iadd(this.m)),o._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},6204:function(e){e.exports=function(e){var t,r,i,n=e.length,a=0;for(t=0;t>>1;if(!(u<=0)){var h,d=n.mallocDouble(2*u*l),f=n.mallocInt32(l);if((l=s(e,u,d,f))>0){if(1===u&&i)a.init(l),h=a.sweepComplete(u,r,0,l,d,f,0,l,d,f);else{var p=n.mallocDouble(2*u*c),m=n.mallocInt32(c);(c=s(t,u,p,m))>0&&(a.init(l+c),h=1===u?a.sweepBipartite(u,r,0,l,d,f,0,c,p,m):o(u,r,i,l,d,f,c,p,m),n.free(p),n.free(m))}n.free(d),n.free(f)}return h}}}function c(e,t){i.push([e,t])}},2455:function(e,t){function r(e){return e?function(e,t,r,i,n,a,o,s,l,c,u){return n-i>l-s?function(e,t,r,i,n,a,o,s,l,c,u){for(var h=2*e,d=i,f=h*i;dc-l?i?function(e,t,r,i,n,a,o,s,l,c,u){for(var h=2*e,d=i,f=h*i;d0;){var P=6*(C-=1),I=y[P],z=y[P+1],D=y[P+2],O=y[P+3],R=y[P+4],F=y[P+5],j=2*C,B=v[j],N=v[j+1],U=1&F,V=!!(16&F),q=u,H=b,G=w,W=T;if(U&&(q=w,H=T,G=u,W=b),!(2&F&&(D=f(e,I,z,D,q,H,N),z>=D))&&!(4&F&&(z=p(e,I,z,D,q,H,B))>=D)){var Y=D-z,Z=R-O;if(V){if(e*Y*(Y+Z)<4194304){if(void 0!==(E=l.scanComplete(e,I,t,z,D,q,H,O,R,G,W)))return E;continue}}else if(e*Math.min(Y,Z)<128){if(void 0!==(E=o(e,I,t,U,z,D,q,H,O,R,G,W)))return E;continue}else if(e*Y*Z<4194304){if(void 0!==(E=l.scanBipartite(e,I,t,U,z,D,q,H,O,R,G,W)))return E;continue}var $=h(e,I,z,D,q,H,B,N);if(z<$)if(e*($-z)<128){if(void 0!==(E=s(e,I+1,t,z,$,q,H,O,R,G,W)))return E}else if(I===e-2){if(void 0!==(E=U?l.sweepBipartite(e,t,O,R,G,W,z,$,q,H):l.sweepBipartite(e,t,z,$,q,H,O,R,G,W)))return E}else x(C++,I+1,z,$,O,R,U,-1/0,1/0),x(C++,I+1,O,R,z,$,1^U,-1/0,1/0);if($=p0)&&!(p1>=hi)"),d=u("lo===p0"),f=u("lo>>1,u=2*e,h=c,d=a[u*c+t];sr&&n[h+t]>c;--u,h-=o){for(var d=h,f=h+o,p=0;p=y?(h=g,d=y):m>=x?(h=p,d=m):(h=v,d=x):y>=x?(h=g,d=y):x>=m?(h=p,d=m):(h=v,d=x);for(var b=u*(l-1),_=u*h,w=0;wh;++h,l+=s)if(n[l+t]===o)if(u===h)u+=1,c+=s;else{for(var d=0;s>d;++d){var f=n[l+d];n[l+d]=n[c],n[c++]=f}var p=a[h];a[h]=a[u],a[u++]=p}return u},"loh;++h,l+=s)if(n[l+t]d;++d){var f=n[l+d];n[l+d]=n[c],n[c++]=f}var p=a[h];a[h]=a[u],a[u++]=p}return u},"lo<=p0":function(e,t,r,i,n,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=e+t,d=r;i>d;++d,l+=s)if(n[l+h]<=o)if(u===d)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=n[l+f];n[l+f]=n[c],n[c++]=p}var m=a[d];a[d]=a[u],a[u++]=m}return u},"hi<=p0":function(e,t,r,i,n,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=e+t,d=r;i>d;++d,l+=s)if(n[l+h]<=o)if(u===d)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=n[l+f];n[l+f]=n[c],n[c++]=p}var m=a[d];a[d]=a[u],a[u++]=m}return u},"lod;++d,l+=s){var f=n[l+t],p=n[l+h];if(fm;++m){var g=n[l+m];n[l+m]=n[c],n[c++]=g}var y=a[d];a[d]=a[u],a[u++]=y}}return u},"lo<=p0&&p0<=hi":function(e,t,r,i,n,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=e+t,d=r;i>d;++d,l+=s){var f=n[l+t],p=n[l+h];if(f<=o&&o<=p)if(u===d)u+=1,c+=s;else{for(var m=0;s>m;++m){var g=n[l+m];n[l+m]=n[c],n[c++]=g}var y=a[d];a[d]=a[u],a[u++]=y}}return u},"!(lo>=p0)&&!(p1>=hi)":function(e,t,r,i,n,a,o,s){for(var l=2*e,c=l*r,u=c,h=r,d=e+t,f=r;i>f;++f,c+=l){var p=n[c+t],m=n[c+d];if(!(p>=o)&&!(s>=m))if(h===f)h+=1,u+=l;else{for(var g=0;l>g;++g){var y=n[c+g];n[c+g]=n[u],n[u++]=y}var v=a[f];a[f]=a[h],a[h++]=v}}return h}}},4192:function(e){function t(e,t,r){for(var i=2*(e+1),n=e+1;n<=t;++n){for(var a=r[i++],o=r[i++],s=n,l=i-2;s-- >e;){var c=r[l-2],u=r[l-1];if(cr[t+1])}function o(e,t,r,i){var n=i[e*=2];return n>1,p=f-u,m=f+u,g=h,y=p,v=f,x=m,b=d,_=s+1,w=l-1,T=0;a(g,y,c)&&(T=g,g=y,y=T),a(x,b,c)&&(T=x,x=b,b=T),a(g,v,c)&&(T=g,g=v,v=T),a(y,v,c)&&(T=y,y=v,v=T),a(g,x,c)&&(T=g,g=x,x=T),a(v,x,c)&&(T=v,v=x,x=T),a(y,b,c)&&(T=y,y=b,b=T),a(y,v,c)&&(T=y,y=v,v=T),a(x,b,c)&&(T=x,x=b,b=T);for(var M=c[2*y],k=c[2*y+1],A=c[2*x],S=c[2*x+1],E=2*g,C=2*v,L=2*b,P=2*h,I=2*f,z=2*d,D=0;D<2;++D){var O=c[E+D],R=c[C+D],F=c[L+D];c[P+D]=O,c[I+D]=R,c[z+D]=F}i(p,s,c),i(m,l,c);for(var j=_;j<=w;++j)if(o(j,M,k,c))j!==_&&r(j,_,c),++_;else if(!o(j,A,S,c))for(;;)if(o(w,A,S,c)){o(w,M,k,c)?(function(e,t,r,i){e*=2,t*=2,r*=2;var n=i[e],a=i[e+1];i[e]=i[t],i[e+1]=i[t+1],i[t]=i[r],i[t+1]=i[r+1],i[r]=n,i[r+1]=a}(j,_,w,c),++_):r(j,w,c),--w;break}else{if(--w>>1;a(d,A);for(var S=0,E=0,w=0;w=0x10000000)C=C-0x10000000|0,f(l,c,E--,C);else if(C>=0)f(o,s,S--,C);else if(C<=-0x10000000){C=-C-0x10000000|0;for(var L=0;L>>1;a(d,E);for(var C=0,L=0,P=0,M=0;M>1==d[2*M+3]>>1&&(z=2,M+=1),I<0){for(var D=-(I>>1)-1,O=0;O>1)-1;0===z?f(o,s,C--,D):1===z?f(l,c,L--,D):2===z&&f(u,h,P--,D)}}},scanBipartite:function(e,t,r,i,n,l,c,u,h,m,g,y){var v=0,x=2*e,b=t+e,_=1,w=1;i?w=0x10000000:_=0x10000000;for(var T=n;T>>1;a(d,S);for(var E=0,T=0;T=0x10000000?(L=!i,M-=0x10000000):(L=!!i,M-=1),L)p(o,s,E++,M);else{var P=y[M],I=x*M,z=g[I+t+1],D=g[I+t+1+e];e:for(var O=0;O>>1;a(d,_);for(var w=0,y=0;y<_;++y){var T=0|d[2*y+1];if(T<0){var v=-T;if(v>=0x10000000)o[w++]=v-0x10000000;else{var M=f[v-=1],k=m*v,A=h[k+t+1],S=h[k+t+1+e];e:for(var E=0;E=0;--E)if(o[E]===v){for(var I=E+1;Ii(e[n],e[a],e[o],e[s])&&r.push(n,a)}}r(2478),e.exports=function(e,t){for(var r=[],a=e.length,o=t.stars,s=0;si(e[s],e[u],e[h],e[d])&&r.push(s,u)}}for(;r.length>0;){for(var u=r.pop(),s=r.pop(),h=-1,d=-1,l=o[s],p=1;p=0||(t.flip(s,u),n(e,t,r,h,s,d),n(e,t,r,s,d,h),n(e,t,r,d,u,h),n(e,t,r,u,h,d))}}},5023:function(e,t,r){var i,n=r(2478);function a(e,t,r,i,n,a,o){this.cells=e,this.neighbor=t,this.flags=i,this.constraint=r,this.active=n,this.next=a,this.boundary=o}function o(e,t){return e[0]-t[0]||e[1]-t[1]||e[2]-t[2]}e.exports=function(e,t,r){var i=function(e,t){for(var r=e.cells(),i=r.length,n=0;n0||l.length>0;){for(;s.length>0;){var f=s.pop();if(c[f]!==-n){c[f]=n,u[f];for(var p=0;p<3;++p){var m=d[3*f+p];m>=0&&0===c[m]&&(h[3*f+p]?l.push(m):(s.push(m),c[m]=n))}}}var g=l;l=s,s=g,l.length=0,n=-n}var y=function(e,t,r){for(var i=0,n=0;nm[0]&&h.push(new o(m,p,2,d),new o(p,m,1,d))}h.sort(s);for(var g=h[0].a[0]-(1+Math.abs(h[0].a[0]))*2220446049250313e-31,y=[new a([g,1],[g,0],-1,[],[],[],[])],v=[],d=0,x=h.length;d1&&n(r[d[f-2]],r[d[f-1]],a)>0;)e.push([d[f-1],d[f-2],o]),f-=1;d.length=f,d.push(o);for(var p=h.upperIds,f=p.length;f>1&&0>n(r[p[f-2]],r[p[f-1]],a);)e.push([p[f-2],p[f-1],o]),f-=1;p.length=f,p.push(o)}}(v,y,e,b.a,b.idx):2===_?function(e,t){var r=i.le(e,t,c),n=e[r],o=n.upperIds,s=o[o.length-1];n.upperIds=[s],e.splice(r+1,0,new a(t.a,t.b,t.idx,[s],o))}(y,b):function(e,t){var r=t.a;t.a=t.b,t.b=r;var n=i.eq(e,t,c),a=e[n];e[n-1].upperIds=a.upperIds,e.splice(n,1)}(y,b)}return v}},5542:function(e,t,r){var i=r(2478);function n(e,t){this.stars=e,this.edges=t}e.exports=function(e,t){for(var r=Array(e),i=0;i=0}}(),a.removeTriangle=function(e,t,r){var i=this.stars;o(i[e],t,r),o(i[t],r,e),o(i[r],e,t)},a.addTriangle=function(e,t,r){var i=this.stars;i[e].push(t,r),i[t].push(r,e),i[r].push(e,t)},a.opposite=function(e,t){for(var r=this.stars[t],i=1,n=r.length;i=0;--a){var x=i[a],b=t[u=x[0]],_=b[0],w=b[1],T=e[_],M=e[w];if(0>(T[0]-M[0]||T[1]-M[1])){var k=_;_=w,w=k}b[0]=_;var A,S=b[1]=x[1];for(n&&(A=b[2]);a>0&&i[a-1][0]===u;){var x=i[--a],E=x[1];n?t.push([S,E,A]):t.push([S,E]),S=E}n?t.push([S,w,A]):t.push([S,w])}return d}(e,v,T,k=_,x),y(v,S=p(e,A,M),x),S||T.length>0||k.length>0;)P=!0;if(r&&P){i.length=0,r.length=0;for(var C=0;Ct[2]))}function y(e,t,r){if(0!==e.length){if(t)for(var i=0;if+1)throw Error(h+" map requires nshades to be at least size "+u.length);m=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"==typeof e.alpha?[e.alpha,e.alpha]:[1,1],t=u.map(function(e){return Math.round(e.index*f)}),m[0]=Math.min(Math.max(m[0],0),1),m[1]=Math.min(Math.max(m[1],0),1);var t,r,l,c,u,h,d,f,p,m,g,y=u.map(function(e,t){var r=u[t].index,i=u[t].rgb.slice();return 4===i.length&&i[3]>=0&&i[3]<=1||(i[3]=m[0]+(m[1]-m[0])*r),i}),p=[];for(g=0;g0||l(e,t,a)?-1:1:0===s?c>0||l(e,t,r)?1:-1:n(c-s)}var h=i(e,t,r);return h>0?o>0&&i(e,t,a)>0?1:-1:h<0?o>0||i(e,t,a)>0?1:-1:i(e,t,a)>0||l(e,t,r)?1:-1};var i=r(3250),n=r(8572),a=r(9362),o=r(5382),s=r(8210);function l(e,t,r){var i=a(e[0],-t[0]),n=a(e[1],-t[1]),l=a(r[0],-t[0]),c=a(r[1],-t[1]),u=s(o(i,l),o(n,c));return u[u.length-1]>=0}},8572:function(e){e.exports=function(e){return e<0?-1:+(e>0)}},8507:function(e){e.exports=function(e,i){var n=e.length,a=e.length-i.length;if(a)return a;switch(n){case 0:return 0;case 1:return e[0]-i[0];case 2:return e[0]+e[1]-i[0]-i[1]||t(e[0],e[1])-t(i[0],i[1]);case 3:var o=e[0]+e[1],s=i[0]+i[1];if(a=o+e[2]-(s+i[2]))return a;var l=t(e[0],e[1]),c=t(i[0],i[1]);return t(l,e[2])-t(c,i[2])||t(l+e[2],o)-t(c+i[2],s);case 4:var u=e[0],h=e[1],d=e[2],f=e[3],p=i[0],m=i[1],g=i[2],y=i[3];return u+h+d+f-(p+m+g+y)||t(u,h,d,f)-t(p,m,g,y,p)||t(u+h,u+d,u+f,h+d,h+f,d+f)-t(p+m,p+g,p+y,m+g,m+y,g+y)||t(u+h+d,u+h+f,u+d+f,h+d+f)-t(p+m+g,p+m+y,p+g+y,m+g+y);default:for(var v=e.slice().sort(r),x=i.slice().sort(r),b=0;be[r][0]&&(r=i);return tr?[[r],[t]]:[[t]]}},4750:function(e,t,r){e.exports=function(e){var t=i(e),r=t.length;if(r<=2)return[];for(var n=Array(r),a=t[r-1],o=0;o=t[l]&&(s+=1);a[o]=s}}return e}(i(function(e,t){for(var r=e.length,i=Array(r),n=0;nt.indexOf(n)&&(i[a++]=e[n]);return i}(e,r),!0),r)}};var i=r(8954),n=r(3952)},4769:function(e){e.exports=function(e,t,r,i,n,a){var o=n-1,s=n*n,l=o*o,c=(1+2*n)*l,u=n*l,h=s*(3-2*n),d=s*o;if(e.length){a||(a=Array(e.length));for(var f=e.length-1;f>=0;--f)a[f]=c*e[f]+u*t[f]+h*r[f]+d*i[f];return a}return c*e+u*t+h*r+d*i},e.exports.derivative=function(e,t,r,i,n,a){var o=6*n*n-6*n,s=3*n*n-4*n+1,l=-6*n*n+6*n,c=3*n*n-2*n;if(e.length){a||(a=Array(e.length));for(var u=e.length-1;u>=0;--u)a[u]=o*e[u]+s*t[u]+l*r[u]+c*i[u];return a}return o*e+s*t+l*r[u]+c*i}},7642:function(e,t,r){var i=r(8954),n=r(1682);function a(e,t){this.point=e,this.index=t}function o(e,t){for(var r=e.point,i=t.point,n=r.length,a=0;a=2)return!1;e[r]=i}return!0}):_.filter(function(e){for(var t=0;t<=s;++t){var r=y[e[t]];if(r<0)return!1;e[t]=r}return!0}),1&s)for(var u=0;u<_.length;++u){var b=_[u],d=b[0];b[0]=b[1],b[1]=d}return _}},2361:function(e){var t=!1;if("u">typeof Float64Array){var r=new Float64Array(1),i=new Uint32Array(r.buffer);(r[0]=1,t=!0,0x3ff00000===i[1])?(e.exports=function(e){return r[0]=e,[i[0],i[1]]},e.exports.pack=function(e,t){return i[0]=e,i[1]=t,r[0]},e.exports.lo=function(e){return r[0]=e,i[0]},e.exports.hi=function(e){return r[0]=e,i[1]}):0x3ff00000===i[0]?(e.exports=function(e){return r[0]=e,[i[1],i[0]]},e.exports.pack=function(e,t){return i[1]=e,i[0]=t,r[0]},e.exports.lo=function(e){return r[0]=e,i[1]},e.exports.hi=function(e){return r[0]=e,i[0]}):t=!1}if(!t){var n=new Buffer(8);e.exports=function(e){return n.writeDoubleLE(e,0,!0),[n.readUInt32LE(0,!0),n.readUInt32LE(4,!0)]},e.exports.pack=function(e,t){return n.writeUInt32LE(e,0,!0),n.writeUInt32LE(t,4,!0),n.readDoubleLE(0,!0)},e.exports.lo=function(e){return n.writeDoubleLE(e,0,!0),n.readUInt32LE(0,!0)},e.exports.hi=function(e){return n.writeDoubleLE(e,0,!0),n.readUInt32LE(4,!0)}}e.exports.sign=function(t){return e.exports.hi(t)>>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),i=e.exports.hi(t),n=1048575&i;return 0x7ff00000&i&&(n+=1048576),[r,n]},e.exports.denormalized=function(t){return!(0x7ff00000&e.exports.hi(t))}},1338:function(e){e.exports=function(e,t){switch(typeof t>"u"&&(t=0),typeof e){case"number":if(e>0){var r,i,n=0|e,a=t;for(r=Array(n),i=0;i=r-1)for(var d=l.length-1,p=e-t[r-1],f=0;f=r-1)for(var u=s.length-1,h=(t[r-1],0);h=0;--r)if(e[--t])return!1;return!0},s.jump=function(e){var t=this.lastT(),r=this.dimension;if(!(e0;--h)i.push(a(l[h-1],c[h-1],arguments[h])),n.push(0)}},s.push=function(e){var t=this.lastT(),r=this.dimension;if(!(e1e-6?1/s:0;this._time.push(e);for(var d=r;d>0;--d){var f=a(c[d-1],u[d-1],arguments[d]);i.push(f),n.push((f-i[o++])*h)}}},s.set=function(e){var t=this.dimension;if(!(e0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),i.push(0)}},s.move=function(e){var t=this.lastT(),r=this.dimension;if(!(e<=t||arguments.length!==r+1)){var i=this._state,n=this._velocity,o=i.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=e-t,h=u>1e-6?1/u:0;this._time.push(e);for(var d=r;d>0;--d){var f=arguments[d];i.push(a(l[d-1],c[d-1],i[o++]+f)),n.push(f*h)}}},s.idle=function(e){var t=this.lastT();if(!(e=0;--h)i.push(a(l[h],c[h],i[o]+u*n[o])),n.push(0),o+=1}}},3840:function(e){function t(e,t,r,i,n,a){this._color=e,this.key=t,this.value=r,this.left=i,this.right=n,this._count=a}function r(e){return new t(e._color,e.key,e.value,e.left,e.right,e._count)}function i(e,r){return new t(e,r.key,r.value,r.left,r.right,r._count)}function n(e){e._count=1+(e.left?e.left._count:0)+(e.right?e.right._count:0)}function a(e,t){this._compare=e,this.root=t}e.exports=function(e){return new a(e||u,null)};var o=a.prototype;function s(e,t){this.tree=e,this._stack=t}Object.defineProperty(o,"keys",{get:function(){var e=[];return this.forEach(function(t,r){e.push(t)}),e}}),Object.defineProperty(o,"values",{get:function(){var e=[];return this.forEach(function(t,r){e.push(r)}),e}}),Object.defineProperty(o,"length",{get:function(){return this.root?this.root._count:0}}),o.insert=function(e,r){for(var o=this._compare,s=this.root,l=[],c=[];s;){var u=o(e,s.key);l.push(s),c.push(u),s=u<=0?s.left:s.right}l.push(new t(0,e,r,null,null,1));for(var h=l.length-2;h>=0;--h){var s=l[h];c[h]<=0?l[h]=new t(s._color,s.key,s.value,l[h+1],s.right,s._count+1):l[h]=new t(s._color,s.key,s.value,s.left,l[h+1],s._count+1)}for(var h=l.length-1;h>1;--h){var d=l[h-1],s=l[h];if(1===d._color||1===s._color)break;var f=l[h-2];if(f.left===d)if(d.left===s){var p=f.right;if(p&&0===p._color)d._color=1,f.right=i(1,p),f._color=0,h-=1;else{if(f._color=0,f.left=d.right,d._color=1,d.right=f,l[h-2]=d,l[h-1]=s,n(f),n(d),h>=3){var m=l[h-3];m.left===f?m.left=d:m.right=d}break}}else{var p=f.right;if(p&&0===p._color)d._color=1,f.right=i(1,p),f._color=0,h-=1;else{if(d.right=s.left,f._color=0,f.left=s.right,s._color=1,s.left=d,s.right=f,l[h-2]=s,l[h-1]=d,n(f),n(d),n(s),h>=3){var m=l[h-3];m.left===f?m.left=s:m.right=s}break}}else if(d.right===s){var p=f.left;if(p&&0===p._color)d._color=1,f.left=i(1,p),f._color=0,h-=1;else{if(f._color=0,f.right=d.left,d._color=1,d.left=f,l[h-2]=d,l[h-1]=s,n(f),n(d),h>=3){var m=l[h-3];m.right===f?m.right=d:m.left=d}break}}else{var p=f.left;if(p&&0===p._color)d._color=1,f.left=i(1,p),f._color=0,h-=1;else{if(d.left=s.right,f._color=0,f.right=s.left,s._color=1,s.right=d,s.left=f,l[h-2]=s,l[h-1]=d,n(f),n(d),n(s),h>=3){var m=l[h-3];m.right===f?m.right=s:m.left=s}break}}}return l[0]._color=1,new a(o,l[0])},o.forEach=function(e,t,r){if(this.root)switch(arguments.length){case 1:return function e(t,r){if(r.left){var i=e(t,r.left);if(i)return i}var i=t(r.key,r.value);return i||(r.right?e(t,r.right):void 0)}(e,this.root);case 2:return function e(t,r,i,n){if(0>=r(t,n.key)){if(n.left){var a=e(t,r,i,n.left);if(a)return a}var a=i(n.key,n.value);if(a)return a}if(n.right)return e(t,r,i,n.right)}(t,this._compare,e,this.root);case 3:return this._compare(t,r)>=0?void 0:function e(t,r,i,n,a){var o,s=i(t,a.key),l=i(r,a.key);return s<=0&&(a.left&&(o=e(t,r,i,n,a.left))||l>0&&(o=n(a.key,a.value)))?o:l>0&&a.right?e(t,r,i,n,a.right):void 0}(t,r,this._compare,e,this.root)}},Object.defineProperty(o,"begin",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.left;return new s(this,e)}}),Object.defineProperty(o,"end",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.right;return new s(this,e)}}),o.at=function(e){if(e<0)return new s(this,[]);for(var t=this.root,r=[];;){if(r.push(t),t.left){if(e=t.right._count)break;t=t.right}else break}return new s(this,[])},o.ge=function(e){for(var t=this._compare,r=this.root,i=[],n=0;r;){var a=t(e,r.key);i.push(r),a<=0&&(n=i.length),r=a<=0?r.left:r.right}return i.length=n,new s(this,i)},o.gt=function(e){for(var t=this._compare,r=this.root,i=[],n=0;r;){var a=t(e,r.key);i.push(r),a<0&&(n=i.length),r=a<0?r.left:r.right}return i.length=n,new s(this,i)},o.lt=function(e){for(var t=this._compare,r=this.root,i=[],n=0;r;){var a=t(e,r.key);i.push(r),a>0&&(n=i.length),r=a<=0?r.left:r.right}return i.length=n,new s(this,i)},o.le=function(e){for(var t=this._compare,r=this.root,i=[],n=0;r;){var a=t(e,r.key);i.push(r),a>=0&&(n=i.length),r=a<0?r.left:r.right}return i.length=n,new s(this,i)},o.find=function(e){for(var t=this._compare,r=this.root,i=[];r;){var n=t(e,r.key);if(i.push(r),0===n)return new s(this,i);r=n<=0?r.left:r.right}return new s(this,[])},o.remove=function(e){var t=this.find(e);return t?t.remove():this},o.get=function(e){for(var t=this._compare,r=this.root;r;){var i=t(e,r.key);if(0===i)return r.value;r=i<=0?r.left:r.right}};var l=s.prototype;function c(e,t){e.key=t.key,e.value=t.value,e.left=t.left,e.right=t.right,e._color=t._color,e._count=t._count}function u(e,t){return et)}Object.defineProperty(l,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(l,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),l.clone=function(){return new s(this.tree,this._stack.slice())},l.remove=function(){var e=this._stack;if(0===e.length)return this.tree;var o=Array(e.length),s=e[e.length-1];o[o.length-1]=new t(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=e.length-2;l>=0;--l){var s=e[l];s.left===e[l+1]?o[l]=new t(s._color,s.key,s.value,o[l+1],s.right,s._count):o[l]=new t(s._color,s.key,s.value,s.left,o[l+1],s._count)}if((s=o[o.length-1]).left&&s.right){var u=o.length;for(s=s.left;s.right;)o.push(s),s=s.right;var h=o[u-1];o.push(new t(s._color,h.key,h.value,s.left,s.right,s._count)),o[u-1].key=s.key,o[u-1].value=s.value;for(var l=o.length-2;l>=u;--l)s=o[l],o[l]=new t(s._color,s.key,s.value,s.left,o[l+1],s._count);o[u-1].left=o[u]}if(0===(s=o[o.length-1])._color){var d=o[o.length-2];d.left===s?d.left=null:d.right===s&&(d.right=null),o.pop();for(var l=0;l=0;--l){if(t=e[l],0===l){t._color=1;return}if((a=e[l-1]).left===t){if((o=a.right).right&&0===o.right._color){if(s=(o=a.right=r(o)).right=r(o.right),a.right=o.left,o.left=a,o.right=s,o._color=a._color,t._color=1,a._color=1,s._color=1,n(a),n(o),l>1){var c=e[l-2];c.left===a?c.left=o:c.right=o}e[l-1]=o;return}if(o.left&&0===o.left._color){if(s=(o=a.right=r(o)).left=r(o.left),a.right=s.left,o.left=s.right,s.left=a,s.right=o,s._color=a._color,a._color=1,o._color=1,t._color=1,n(a),n(o),n(s),l>1){var c=e[l-2];c.left===a?c.left=s:c.right=s}e[l-1]=s;return}if(1===o._color)if(0===a._color){a._color=1,a.right=i(0,o);return}else{a.right=i(0,o);continue}if(a.right=(o=r(o)).left,o.left=a,o._color=a._color,a._color=0,n(a),n(o),l>1){var c=e[l-2];c.left===a?c.left=o:c.right=o}e[l-1]=o,e[l]=a,l+11){var c=e[l-2];c.right===a?c.right=o:c.left=o}e[l-1]=o;return}if(o.right&&0===o.right._color){if(s=(o=a.left=r(o)).right=r(o.right),a.left=s.right,o.right=s.left,s.right=a,s.left=o,s._color=a._color,a._color=1,o._color=1,t._color=1,n(a),n(o),n(s),l>1){var c=e[l-2];c.right===a?c.right=s:c.left=s}e[l-1]=s;return}if(1===o._color)if(0===a._color){a._color=1,a.left=i(0,o);return}else{a.left=i(0,o);continue}if(a.left=(o=r(o)).right,o.right=a,o._color=a._color,a._color=0,n(a),n(o),l>1){var c=e[l-2];c.right===a?c.right=o:c.left=o}e[l-1]=o,e[l]=a,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(l,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(l,"index",{get:function(){var e=0,t=this._stack;if(0===t.length){var r=this.tree.root;return r?r._count:0}t[t.length-1].left&&(e=t[t.length-1].left._count);for(var i=t.length-2;i>=0;--i)t[i+1]===t[i].right&&(++e,t[i].left&&(e+=t[i].left._count));return e},enumerable:!0}),l.next=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.right)for(t=t.right;t;)e.push(t),t=t.left;else for(e.pop();e.length>0&&e[e.length-1].right===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(l,"hasNext",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].right)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].left===e[t])return!0;return!1}}),l.update=function(e){var r=this._stack;if(0===r.length)throw Error("Can't update empty node!");var i=Array(r.length),n=r[r.length-1];i[i.length-1]=new t(n._color,n.key,e,n.left,n.right,n._count);for(var o=r.length-2;o>=0;--o)(n=r[o]).left===r[o+1]?i[o]=new t(n._color,n.key,n.value,i[o+1],n.right,n._count):i[o]=new t(n._color,n.key,n.value,n.left,i[o+1],n._count);return new a(this.tree._compare,i[0])},l.prev=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.left)for(t=t.left;t;)e.push(t),t=t.right;else for(e.pop();e.length>0&&e[e.length-1].left===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(l,"hasPrev",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].left)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].right===e[t])return!0;return!1}})},3837:function(e,t,r){e.exports=function(e,t){var r=new f(e);return r.update(t),r};var i=r(4935),n=r(501),a=r(5304),o=r(6429),s=r(6444),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),c=ArrayBuffer,u=DataView;function h(e){return Array.isArray(e)||c.isView(e)&&!(e instanceof u)}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function f(e){this.gl=e,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(e)}var p=f.prototype;function m(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}p.update=function(e){function t(t,r,i){if(i in e){var n,a=e[i],o=this[i];(t?h(a)&&h(a[0]):h(a))?this[i]=n=[r(a[0]),r(a[1]),r(a[2])]:this[i]=n=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(n[s]!==o[s])return!0}return!1}e=e||{};var r,a=t.bind(this,!1,Number),o=t.bind(this,!1,Boolean),l=t.bind(this,!1,String),c=t.bind(this,!0,function(e){if(h(e)){if(3===e.length)return[+e[0],+e[1],+e[2],1];if(4===e.length)return[+e[0],+e[1],+e[2],+e[3]]}return[0,0,0,1]}),u=!1,d=!1;if("bounds"in e)for(var f=e.bounds,p=0;p<2;++p)for(var m=0;m<3;++m)f[p][m]!==this.bounds[p][m]&&(d=!0),this.bounds[p][m]=f[p][m];if("ticks"in e){r=e.ticks,u=!0,this.autoTicks=!1;for(var p=0;p<3;++p)this.tickSpacing[p]=0}else a("tickSpacing")&&(this.autoTicks=!0,d=!0);if(this._firstInit&&("ticks"in e||"tickSpacing"in e||(this.autoTicks=!0),d=!0,u=!0,this._firstInit=!1),d&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),u=!0),u){for(var p=0;p<3;++p)r[p].sort(function(e,t){return e.x-t.x});s.equal(r,this.ticks)?u=!1:this.ticks=r}o("tickEnable"),l("tickFont")&&(u=!0),l("tickFontStyle")&&(u=!0),l("tickFontWeight")&&(u=!0),l("tickFontVariant")&&(u=!0),a("tickSize"),a("tickAngle"),a("tickPad"),c("tickColor");var g=l("labels");l("labelFont")&&(g=!0),l("labelFontStyle")&&(g=!0),l("labelFontWeight")&&(g=!0),l("labelFontVariant")&&(g=!0),o("labelEnable"),a("labelSize"),a("labelPad"),c("labelColor"),o("lineEnable"),o("lineMirror"),a("lineWidth"),c("lineColor"),o("lineTickEnable"),o("lineTickMirror"),a("lineTickLength"),a("lineTickWidth"),c("lineTickColor"),o("gridEnable"),a("gridWidth"),c("gridColor"),o("zeroEnable"),c("zeroLineColor"),a("zeroLineWidth"),o("backgroundEnable"),c("backgroundColor");var y=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],v=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(g||u)&&this._text.update(this.bounds,this.labels,y,this.ticks,v):this._text=i(this.gl,this.bounds,this.labels,y,this.ticks,v),this._lines&&u&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=n(this.gl,this.bounds,this.ticks))};var g=[new m,new m,new m],y=[0,0,0],v={model:l,view:l,projection:l,_ortho:!1};p.isOpaque=function(){return!0},p.isTransparent=function(){return!1},p.drawTransparent=function(e){};var x=[0,0,0],b=[0,0,0],_=[0,0,0];p.draw=function(e){e=e||v;for(var t,r,i,n=this.gl,a=e.model||l,s=e.view||l,c=e.projection||l,u=this.bounds,h=e._ortho||!1,f=o(a,s,c,u,h),p=f.cubeEdges,m=f.axis,w=s[12],T=s[13],M=s[14],k=s[15],A=h?2:1,S=A*this.pixelRatio*(c[3]*w+c[7]*T+c[11]*M+c[15]*k)/n.drawingBufferHeight,E=0;E<3;++E)this.lastCubeProps.cubeEdges[E]=p[E],this.lastCubeProps.axis[E]=m[E];for(var E=0;E<3;++E)!function(e,t,r,i,n){for(var a=e.primalOffset,o=e.primalMinor,s=e.mirrorOffset,l=e.mirrorMinor,c=i[t],u=0;u<3;++u)if(t!==u){var h=a,d=s,f=o,p=l;c&1<0?(f[u]=-1,p[u]=0):(f[u]=0,p[u]=1)}}(g[E],E,this.bounds,p,m);for(var n=this.gl,E=0;E<3;++E)this.backgroundEnable[E]?y[E]=m[E]:y[E]=0;this._background.draw(a,s,c,u,y,this.backgroundColor),this._lines.bind(a,s,c,this);for(var E=0;E<3;++E){var C=[0,0,0];m[E]>0?C[E]=u[1][E]:C[E]=u[0][E];for(var L=0;L<2;++L){var P=(E+1+L)%3,I=(E+1+(1^L))%3;this.gridEnable[P]&&this._lines.drawGrid(P,I,this.bounds,C,this.gridColor[P],this.gridWidth[P]*this.pixelRatio)}for(var L=0;L<2;++L){var P=(E+1+L)%3,I=(E+1+(1^L))%3;this.zeroEnable[I]&&0>=Math.min(u[0][I],u[1][I])&&Math.max(u[0][I],u[1][I])>=0&&this._lines.drawZero(P,I,this.bounds,C,this.zeroLineColor[I],this.zeroLineWidth[I]*this.pixelRatio)}}for(var E=0;E<3;++E){this.lineEnable[E]&&this._lines.drawAxisLine(E,this.bounds,g[E].primalOffset,this.lineColor[E],this.lineWidth[E]*this.pixelRatio),this.lineMirror[E]&&this._lines.drawAxisLine(E,this.bounds,g[E].mirrorOffset,this.lineColor[E],this.lineWidth[E]*this.pixelRatio);for(var z=d(x,g[E].primalMinor),D=d(b,g[E].mirrorMinor),O=this.lineTickLength,L=0;L<3;++L){var R=S/a[5*L];z[L]*=O[L]*R,D[L]*=O[L]*R}this.lineTickEnable[E]&&this._lines.drawAxisTicks(E,g[E].primalOffset,z,this.lineTickColor[E],this.lineTickWidth[E]*this.pixelRatio),this.lineTickMirror[E]&&this._lines.drawAxisTicks(E,g[E].mirrorOffset,D,this.lineTickColor[E],this.lineTickWidth[E]*this.pixelRatio)}function F(e){(i=[0,0,0])[e]=1}this._lines.unbind(),this._text.bind(a,s,c,this.pixelRatio);for(var E=0;E<3;++E){for(var j=g[E].primalMinor,B=g[E].mirrorMinor,N=d(_,g[E].primalOffset),L=0;L<3;++L)this.lineTickEnable[E]&&(N[L]+=S*j[L]*Math.max(this.lineTickLength[L],0)/a[5*L]);var U=[0,0,0];if(U[E]=1,this.tickEnable[E]){-3600===this.tickAngle[E]?(this.tickAngle[E]=0,this.tickAlign[E]="auto"):this.tickAlign[E]=-1,r=1,"auto"===(t=[this.tickAlign[E],.5,r])[0]?t[0]=0:t[0]=parseInt(""+t[0]),i=[0,0,0],function(e,t,r){var i=(e+1)%3,n=(e+2)%3,a=t[i],o=t[n],s=r[i],l=r[n];if(a>0&&l>0||a>0&&l<0)return F(i);a<0&&l>0||a<0&&l<0?F(i):o>0&&s>0||o>0&&s<0||o<0&&s>0?F(n):o<0&&s<0&&F(n)}(E,j,B);for(var L=0;L<3;++L)N[L]+=S*j[L]*this.tickPad[L]/a[5*L];this._text.drawTicks(E,this.tickSize[E],this.tickAngle[E],N,this.tickColor[E],U,i,t)}if(this.labelEnable[E]){r=0,i=[0,0,0],this.labels[E].length>4&&(F(E),r=1),"auto"===(t=[this.labelAlign[E],.5,r])[0]?t[0]=0:t[0]=parseInt(""+t[0]);for(var L=0;L<3;++L)N[L]+=S*j[L]*this.labelPad[L]/a[5*L];N[E]+=.5*(u[0][E]+u[1][E]),this._text.drawLabel(E,this.labelSize[E],this.labelAngle[E],N,this.labelColor[E],[0,0,0],i,t)}}this._text.unbind()},p.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},5304:function(e,t,r){e.exports=function(e){for(var t=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,h=[0,0,0],d=[0,0,0],f=-1;f<=1;f+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),h[l]=f,d[l]=f;for(var p=-1;p<=1;p+=2){h[c]=p;for(var m=-1;m<=1;m+=2)h[u]=m,t.push(h[0],h[1],h[2],d[0],d[1],d[2]),s+=1}var g=c;c=u,u=g}var y=i(e,new Float32Array(t)),v=i(e,new Uint16Array(r),e.ELEMENT_ARRAY_BUFFER),x=n(e,[{buffer:y,type:e.FLOAT,size:3,offset:0,stride:24},{buffer:y,type:e.FLOAT,size:3,offset:12,stride:24}],v),b=a(e);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(e,y,x,b)};var i=r(2762),n=r(8116),a=r(1879).bg;function o(e,t,r,i){this.gl=e,this.buffer=t,this.vao=r,this.shader=i}var s=o.prototype;s.draw=function(e,t,r,i,n,a){for(var o=!1,s=0;s<3;++s)o=o||n[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:e,view:t,projection:r,bounds:i,enable:n,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},6429:function(e,t,r){e.exports=function(e,t,r,d,y){n(s,t,e),n(s,r,s);for(var v=0,x=0;x<2;++x){u[2]=d[x][2];for(var b=0;b<2;++b){u[1]=d[b][1];for(var _=0;_<2;++_)u[0]=d[_][0],function(e,t,r){for(var i=0;i<4;++i){e[i]=r[12+i];for(var n=0;n<3;++n)e[i]+=t[n]*r[4*n+i]}}(l[v],u,s),v+=1}}for(var w=-1,x=0;x<8;++x){for(var T=l[x][3],M=0;M<3;++M)c[x][M]=l[x][M]/T;y&&(c[x][2]*=-1),T<0&&(w<0||c[x][2]o(c[P],c[I],c[z],h)||(L?E=1:C=1)}if(E<0||C<0){C>E&&(w|=1<E){w|=1<c[x][1])&&(R=x);for(var F=-1,x=0;x<3;++x){var j=R^1<c[B][0]&&(B=j)}}p[0]=p[1]=p[2]=0,p[i.log2(F^R)]=R&F,p[i.log2(R^B)]=R&B;var N=7^B;N===w||N===O?(N=7^F,p[i.log2(B^N)]=N&B):p[i.log2(F^N)]=N&F;for(var U=w,k=0;k<3;++k)U&1<>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?uv(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?uv(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=uU.exec(e))?new u_(t[1],t[2],t[3],1):(t=uV.exec(e))?new u_(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=uq.exec(e))?uv(t[1],t[2],t[3],t[4]):(t=uH.exec(e))?uv(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=uG.exec(e))?uE(t[1],t[2]/100,t[3]/100,1):(t=uW.exec(e))?uE(t[1],t[2]/100,t[3]/100,t[4]):uY.hasOwnProperty(e)?uy(uY[e]):"transparent"===e?new u_(NaN,NaN,NaN,0):null}function uy(e){return new u_(e>>16&255,e>>8&255,255&e,1)}function uv(e,t,r,i){return i<=0&&(e=t=r=NaN),new u_(e,t,r,i)}function ux(e){return e instanceof uh||(e=ug(e)),e?new u_((e=e.rgb()).r,e.g,e.b,e.opacity):new u_}function ub(e,t,r,i){return 1==arguments.length?ux(e):new u_(e,t,r,i??1)}function u_(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}function uw(){return`#${uS(this.r)}${uS(this.g)}${uS(this.b)}`}function uT(){return`#${uS(this.r)}${uS(this.g)}${uS(this.b)}${uS((isNaN(this.opacity)?1:this.opacity)*255)}`}function uM(){let e=uk(this.opacity);return`${1===e?"rgb(":"rgba("}${uA(this.r)}, ${uA(this.g)}, ${uA(this.b)}${1===e?")":`, ${e})`}`}function uk(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function uA(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function uS(e){return((e=uA(e))<16?"0":"")+e.toString(16)}function uE(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new uP(e,t,r,i)}function uC(e){if(e instanceof uP)return new uP(e.h,e.s,e.l,e.opacity);if(e instanceof uh||(e=ug(e)),!e)return new uP;if(e instanceof uP)return e;var t=(e=e.rgb()).r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,s=a-n,l=(a+n)/2;return s?(o=t===a?(r-i)/s+(r0&&l<1?0:o,new uP(o,s,l,e.opacity)}function uL(e,t,r,i){return 1==arguments.length?uC(e):new uP(e,t,r,i??1)}function uP(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}function uI(e){return(e=(e||0)%360)<0?e+360:e}function uz(e){return Math.max(0,Math.min(1,e||0))}function uD(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var uO,uR,uF,uj,uB,uN,uU,uV,uq,uH,uG,uW,uY,uZ,u$,uX=f({"node_modules/d3-color/src/color.js"(){uu(),uR=1/(uO=.7),uF="\\s*([+-]?\\d+)\\s*",uj="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",uB="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",uN=/^#([0-9a-f]{3,8})$/,uU=RegExp(`^rgb\\(${uF},${uF},${uF}\\)$`),uV=RegExp(`^rgb\\(${uB},${uB},${uB}\\)$`),uq=RegExp(`^rgba\\(${uF},${uF},${uF},${uj}\\)$`),uH=RegExp(`^rgba\\(${uB},${uB},${uB},${uj}\\)$`),uG=RegExp(`^hsl\\(${uj},${uB},${uB}\\)$`),uW=RegExp(`^hsla\\(${uj},${uB},${uB},${uj}\\)$`),uY={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32},ul(uh,ug,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ud,formatHex:ud,formatHex8:uf,formatHsl:up,formatRgb:um,toString:um}),ul(u_,ub,uc(uh,{brighter(e){return e=null==e?uR:Math.pow(uR,e),new u_(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?uO:Math.pow(uO,e),new u_(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new u_(uA(this.r),uA(this.g),uA(this.b),uk(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:uw,formatHex:uw,formatHex8:uT,formatRgb:uM,toString:uM})),ul(uP,uL,uc(uh,{brighter(e){return e=null==e?uR:Math.pow(uR,e),new uP(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?uO:Math.pow(uO,e),new uP(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new u_(uD(e>=240?e-240:e+120,n,i),uD(e,n,i),uD(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new uP(uI(this.h),uz(this.s),uz(this.l),uk(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=uk(this.opacity);return`${1===e?"hsl(":"hsla("}${uI(this.h)}, ${100*uz(this.s)}%, ${100*uz(this.l)}%${1===e?")":`, ${e})`}`}}))}}),uK=f({"node_modules/d3-color/src/math.js"(){uZ=Math.PI/180,u$=180/Math.PI}});function uJ(e){if(e instanceof u0)return new u0(e.l,e.a,e.b,e.opacity);if(e instanceof u6)return u8(e);e instanceof u_||(e=ux(e));var t,r,i=u5(e.r),n=u5(e.g),a=u5(e.b),o=u1((.2225045*i+.7168786*n+.0606169*a)/u7);return i===n&&n===a?t=r=o:(t=u1((.4360747*i+.3850649*n+.1430804*a)/u9),r=u1((.0139322*i+.0971045*n+.7141733*a)/he)),new u0(116*o-16,500*(t-o),200*(o-r),e.opacity)}function uQ(e,t,r,i){return 1==arguments.length?uJ(e):new u0(e,t,r,i??1)}function u0(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}function u1(e){return e>hn?Math.pow(e,.3333333333333333):e/hi+ht}function u2(e){return e>hr?e*e*e:hi*(e-ht)}function u3(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,.4166666666666667)-.055)}function u5(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function u4(e,t,r,i){return 1==arguments.length?function(e){if(e instanceof u6)return new u6(e.h,e.c,e.l,e.opacity);if(e instanceof u0||(e=uJ(e)),0===e.a&&0===e.b)return new u6(NaN,0=1?(r=1,t-1):Math.floor(r*t),n=e[i],a=e[i+1],o=i>0?e[i-1]:2*n-a,s=i()=>e}});function hT(e,t){return function(r){return e+r*t}}function hM(e,t){var r=t-e;return r?hT(e,r>180||r<-180?r-360*Math.round(r/360):r):hb(isNaN(e)?t:e)}function hk(e,t){var r=t-e;return r?hT(e,r):hb(isNaN(e)?t:e)}var hA=f({"node_modules/d3-interpolate/src/color.js"(){hw()}});function hS(e){return function(t){var r,i,n=t.length,a=Array(n),o=Array(n),s=Array(n);for(r=0;rs&&(o=t.slice(s,o),c[l]?c[l]+=o:c[++l]=o),(n=n[0])===(a=a[0])?c[l]?c[l]+=a:c[++l]=a:(c[++l]=null,u.push({i:l,x:hN(n,a)})),s=hW.lastIndex;return s180?l+=360:l-s>180&&(s+=360),d.push({i:h.push(n(h)+"rotate(",null,i)-2,x:hN(s,l)})):l&&h.push(n(h)+"rotate("+l+i),c=a.skewX,u=o.skewX,c!==u?d.push({i:h.push(n(h)+"skewX(",null,i)-2,x:hN(c,u)}):u&&h.push(n(h)+"skewX("+u+i),function(e,t,r,i,a,o){if(e!==r||t!==i){var s=a.push(n(a)+"scale(",null,",",null,")");o.push({i:s-4,x:hN(e,r)},{i:s-2,x:hN(t,i)})}else(1!==r||1!==i)&&a.push(n(a)+"scale("+r+","+i+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,h,d),a=o=null,function(e){for(var t,r=-1,i=d.length;++rhZ,interpolateArray:()=>hO,interpolateBasis:()=>hy,interpolateBasisClosed:()=>hx,interpolateCubehelix:()=>db,interpolateCubehelixLong:()=>d_,interpolateDate:()=>hj,interpolateDiscrete:()=>hX,interpolateHcl:()=>dg,interpolateHclLong:()=>dy,interpolateHsl:()=>du,interpolateHslLong:()=>dh,interpolateHue:()=>hJ,interpolateLab:()=>df,interpolateNumber:()=>hN,interpolateNumberArray:()=>hI,interpolateObject:()=>hV,interpolateRgb:()=>hE,interpolateRgbBasis:()=>hC,interpolateRgbBasisClosed:()=>hL,interpolateRound:()=>h0,interpolateString:()=>hH,interpolateTransformCss:()=>dr,interpolateTransformSvg:()=>di,interpolateZoom:()=>ds,piecewise:()=>dT,quantize:()=>dk});var dE=f({"node_modules/d3-interpolate/src/index.js"(){h$(),hF(),hv(),h_(),hB(),hK(),hQ(),hU(),hD(),hq(),h1(),hY(),dn(),dl(),hP(),dd(),dp(),dv(),dw(),dM(),dA()}}),dC=p({"src/traces/sunburst/fill_one.js"(e,t){var r=t7(),i=ee();t.exports=function(e,t,n,a,o){var s=t.data.data,l=s.i,c=o||s.color;if(l>=0){t.i=s.i;var u=n.marker;u.pattern&&u.colors&&u.pattern.shape||(u.color=c,t.color=c),r.pointStyle(e,n,a,t)}else i.fill(e,c)}}}),dL=p({"src/traces/sunburst/style.js"(e,t){var r=T(),i=ee(),n=tv(),a=aE().resizeText,o=dC();function s(e,t,r,a){var s=t.data.data,l=!t.children,c=s.i,u=n.castOption(r,c,"marker.line.color")||i.defaultLine,h=n.castOption(r,c,"marker.line.width")||0;e.call(o,t,r,a).style("stroke-width",h).call(i.stroke,u).style("opacity",l?r.leaf.opacity:null)}t.exports={style:function(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");a(e,t,"sunburst"),t.each(function(t){var i=r.select(this),n=t[0].trace;i.style("opacity",n.opacity),i.selectAll("path.surface").each(function(t){r.select(this).call(s,t,n,e)})})},styleOne:s}}}),dP=p({"src/traces/sunburst/helpers.js"(e){var t=tv(),r=ee(),i=rf(),n=r_();function a(e){return e.data.data.pid}e.findEntryWithLevel=function(t,r){var i;return r&&t.eachAfter(function(t){if(e.getPtId(t)===r)return i=t.copy()}),i||t},e.findEntryWithChild=function(t,r){var i;return t.eachAfter(function(t){for(var n=t.children||[],a=0;a0)},e.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0},e.isHeader=function(t,r){return!(e.isLeaf(t)||t.depth===r._maxDepth-1)},e.getParent=function(t,r){return e.findEntryWithLevel(t,a(r))},e.listPath=function(t,r){var i=t.parent;if(!i)return[];var n=r?[i.data[r]]:[i];return e.listPath(i,r).concat(n)},e.getPath=function(t){return e.listPath(t,"label").join("/")+"/"},e.formatValue=n.formatPieValue,e.formatPercent=function(e,r){var i=t.formatPercent(e,0);return"0%"===i&&(i=n.formatPiePercent(e,r)),i}}}),dI=p({"src/traces/sunburst/fx.js"(e,t){var r=T(),i=eQ(),n=t6().appendArrayPointValue,a=rD(),o=tv(),s=tT(),l=dP(),c=r_().formatPieValue;function u(e,t,r){for(var i=e.data.data,a={curveNumber:t.index,pointNumber:i.i,data:t._input,fullData:t},o=0;o"),name:k||P("name")?v.name:void 0,color:M("hoverlabel.bgcolor")||x.color,borderColor:M("hoverlabel.bordercolor"),fontFamily:M("hoverlabel.font.family"),fontSize:M("hoverlabel.font.size"),fontColor:M("hoverlabel.font.color"),fontWeight:M("hoverlabel.font.weight"),fontStyle:M("hoverlabel.font.style"),fontVariant:M("hoverlabel.font.variant"),nameLength:M("hoverlabel.namelength"),textAlign:M("hoverlabel.align"),hovertemplate:k,hovertemplateLabels:E,eventData:h};g&&(F.x0=I-i.rInscribed*i.rpx1,F.x1=I+i.rInscribed*i.rpx1,F.idealAlign=i.pxmid[0]<0?"left":"right"),y&&(F.x=I,F.idealAlign=I<0?"left":"right");var j=[];a.loneHover(F,{container:s._hoverlayer.node(),outerContainer:s._paper.node(),gd:n,inOut_bbox:j}),h[0].bbox=j[0],p._hasHoverLabel=!0}if(y){var B=e.select("path.surface");d.styleOne(B,i,v,n,{hovered:!0})}p._hasHoverEvent=!0,n.emit("plotly_hover",{points:h||[u(i,v,d.eventDataKeys)],event:r.event})}}),e.on("mouseout",function(t){var i=n._fullLayout,o=n._fullData[p.index],s=r.select(this).datum();if(p._hasHoverEvent&&(t.originalEvent=r.event,n.emit("plotly_unhover",{points:[u(s,o,d.eventDataKeys)],event:r.event}),p._hasHoverEvent=!1),p._hasHoverLabel&&(a.loneUnhover(i._hoverlayer.node()),p._hasHoverLabel=!1),y){var l=e.select("path.surface");d.styleOne(l,s,o,n,{hovered:!1})}}),e.on("click",function(e){var t=n._fullLayout,o=n._fullData[p.index],c=g&&(l.isHierarchyRoot(e)||l.isLeaf(e)),h=l.getPtId(e),f=l.isEntry(e)?l.findEntryWithChild(m,h):l.findEntryWithLevel(m,h),y=l.getPtId(f),v={points:[u(e,o,d.eventDataKeys)],event:r.event};c||(v.nextLevel=y);var x=s.triggerHandler(n,"plotly_"+p.type+"click",v);if(!1!==x&&t.hovermode&&(n._hoverdata=[u(e,o,d.eventDataKeys)],a.click(n,r.event)),!c&&!1!==x&&!n._dragging&&!n._transitioning){i.call("_storeDirectGUIEdit",o,t._tracePreGUI[o.uid],{level:o.level});var b={data:[{level:y}],traces:[p.index]},_={frame:{redraw:!1,duration:d.transitionTime},transition:{duration:d.transitionTime,easing:d.transitionEasing},mode:"immediate",fromcurrent:!0};a.loneUnhover(t._hoverlayer.node()),i.call("animate",n,b,_)}})}}}),dz=p({"src/traces/sunburst/plot.js"(e){var t=T(),r=uo(),i=(dE(),v(dS)).interpolate,n=t7(),a=tv(),o=tF(),s=aE(),l=s.recordMinTextSize,c=s.clearMinTextSize,u=c4(),h=r_().getRotationAngle,d=u.computeTransform,f=u.transformInsideText,p=dL().styleOne,m=aL().resizeText,g=dI(),y=ut(),x=dP();function b(s,c,u,m){var v,b=s._context.staticPlot,w=s._fullLayout,T=!w.uniformtext.mode&&x.hasTransition(m),M=t.select(u).selectAll("g.slice"),k=c[0],A=k.trace,S=k.hierarchy,E=x.findEntryWithLevel(S,A.level),C=x.getMaxDepth(A),L=w._size,P=A.domain,I=L.w*(P.x[1]-P.x[0]),z=L.h*(P.y[1]-P.y[0]),D=.5*Math.min(I,z),O=k.cx=L.l+L.w*(P.x[1]+P.x[0])/2,R=k.cy=L.t+L.h*(1-P.y[0])-z/2;if(!E)return M.remove();var F=null,j={};T&&M.each(function(e){j[x.getPtId(e)]={rpx0:e.rpx0,rpx1:e.rpx1,x0:e.x0,x1:e.x1,transform:e.transform},!F&&x.isEntry(e)&&(F=e)});var B=(v=E,r.partition().size([2*Math.PI,v.height+1])(v)).descendants(),N=E.height+1,U=0,V=C;k.hasMultipleRoots&&x.isHierarchyRoot(E)&&(B=B.slice(1),N-=1,U=1,V+=1),B=B.filter(function(e){return e.y1<=V});var q=h(A.rotation);q&&B.forEach(function(e){e.x0+=q,e.x1+=q});var H=Math.min(N,C),G=function(e){return(e-U)/H*D},W=function(e,t){return[e*Math.cos(t),-e*Math.sin(t)]},Y=function(e){return a.pathAnnulus(e.rpx0,e.rpx1,e.x0,e.x1,O,R)},Z=function(e){return O+_(e)[0]*(e.transform.rCenter||0)+(e.transform.x||0)},$=function(e){return R+_(e)[1]*(e.transform.rCenter||0)+(e.transform.y||0)};(M=M.data(B,x.getPtId)).enter().append("g").classed("slice",!0),T?M.exit().transition().each(function(){var e=t.select(this);e.select("path.surface").transition().attrTween("d",function(e){var t=function(e){var t,r=x.getPtId(e),n=j[r],a=j[x.getPtId(E)];if(a){var o=(e.x1>a.x1?2*Math.PI:0)+q;t=e.rpx1X?2*Math.PI:0)+q;t={x0:o,x1:o}}else t={rpx0:D,rpx1:D},a.extendFlat(t,Q(e));else t={rpx0:0,rpx1:0};else t={x0:q,x1:q};return i(t,n)}(e);return function(e){return Y(t(e))}}):m.attr("d",Y),h.call(g,E,s,c,{eventDataKeys:y.eventDataKeys,transitionTime:y.CLICK_TRANSITION_TIME,transitionEasing:y.CLICK_TRANSITION_EASING}).call(x.setSliceCursor,s,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:s._transitioning}),m.call(p,r,A,s);var v=a.ensureSingle(h,"g","slicetext"),_=a.ensureSingle(v,"text","",function(e){e.attr("data-notex",1)}),M=a.ensureUniformFontSize(s,x.determineTextFont(A,r,w.font));_.text(e.formatSliceLabel(r,E,A,c,w)).classed("slicetext",!0).attr("text-anchor","middle").call(n.font,M).call(o.convertToTspans,s);var S=n.bBox(_.node());r.transform=f(S,r,k),r.transform.targetX=Z(r),r.transform.targetY=$(r);var C=function(e,t){var r=e.transform;return d(r,t),r.fontSize=M.size,l(A.type,r,w),a.getTextTransform(r)};T?_.transition().attrTween("transform",function(e){var t=function(e){var t,r=j[x.getPtId(e)],n=e.transform;if(r)t=r;else if(t={rpx1:e.rpx1,transform:{textPosAngle:n.textPosAngle,scale:0,rotate:n.rotate,rCenter:n.rCenter,x:n.x,y:n.y}},F)if(e.parent)if(X){var o=e.x1>X?2*Math.PI:0;t.x0=t.x1=o}else a.extendFlat(t,Q(e));else t.x0=t.x1=q;else t.x0=t.x1=q;var s=i(t.transform.textPosAngle,e.transform.textPosAngle),c=i(t.rpx1,e.rpx1),u=i(t.x0,e.x0),h=i(t.x1,e.x1),d=i(t.transform.scale,n.scale),f=i(t.transform.rotate,n.rotate),p=0===n.rCenter?3:0===t.transform.rCenter?1/3:1,m=i(t.transform.rCenter,n.rCenter);return function(e){var t=c(e),r=u(e),i=h(e),a=m(Math.pow(e,p)),o={pxmid:W(t,(r+i)/2),rpx1:t,transform:{textPosAngle:s(e),rCenter:a,x:n.x,y:n.y}};return l(A.type,n,w),{transform:{targetX:Z(o),targetY:$(o),scale:d(e),rotate:f(e),rCenter:a}}}}(e);return function(e){return C(t(e),S)}}):_.attr("transform",C(r,S))})}function _(e){var t,r;return t=e.rpx1,[t*Math.sin(r=e.transform.textPosAngle),-t*Math.cos(r)]}e.plot=function(e,r,i,n){var a,o,s=e._fullLayout,l=s._sunburstlayer,u=!i,h=!s.uniformtext.mode&&x.hasTransition(i);(c("sunburst",s),(a=l.selectAll("g.trace.sunburst").data(r,function(e){return e[0].trace.uid})).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),a.order(),h)?(n&&(o=n()),t.transition().duration(i.duration).ease(i.easing).each("end",function(){o&&o()}).each("interrupt",function(){o&&o()}).each(function(){l.selectAll("g.trace").each(function(t){b(e,t,this,i)})})):(a.each(function(t){b(e,t,this,i)}),s.uniformtext.mode&&m(e,s._sunburstlayer.selectAll(".trace"),"sunburst")),u&&a.exit().remove()},e.formatSliceLabel=function(e,t,r,i,n){var o=r.texttemplate,s=r.textinfo;if(!o&&(!s||"none"===s))return"";var l=n.separators,c=i[0],u=e.data.data,h=c.hierarchy,d=x.isHierarchyRoot(e),f=x.getParent(h,e),p=x.getValue(e);if(!o){var m,g=s.split("+"),y=function(e){return -1!==g.indexOf(e)},v=[];if(y("label")&&u.label&&v.push(u.label),u.hasOwnProperty("v")&&y("value")&&v.push(x.formatValue(u.v,l)),!d){y("current path")&&v.push(x.getPath(e.data));var b=0;y("percent parent")&&b++,y("percent entry")&&b++,y("percent root")&&b++;var _=b>1;if(b){var w,T=function(e){m=x.formatPercent(w,l),_&&(m+=" of "+e),v.push(m)};y("percent parent")&&!d&&(w=p/x.getValue(f),T("parent")),y("percent entry")&&(w=p/x.getValue(t),T("entry")),y("percent root")&&(w=p/x.getValue(h),T("root"))}}return y("text")&&(m=a.castOption(r,u.i,"text"),a.isValidTextValue(m)&&v.push(m)),v.join("
")}var M=a.castOption(r,u.i,"texttemplate");if(!M)return"";var k={};u.label&&(k.label=u.label),u.hasOwnProperty("v")&&(k.value=u.v,k.valueLabel=x.formatValue(u.v,l)),k.currentPath=x.getPath(e.data),d||(k.percentParent=p/x.getValue(f),k.percentParentLabel=x.formatPercent(k.percentParent,l),k.parent=x.getPtLabel(f)),k.percentEntry=p/x.getValue(t),k.percentEntryLabel=x.formatPercent(k.percentEntry,l),k.entry=x.getPtLabel(t),k.percentRoot=p/x.getValue(h),k.percentRootLabel=x.formatPercent(k.percentRoot,l),k.root=x.getPtLabel(h),u.hasOwnProperty("color")&&(k.color=u.color);var A=a.castOption(r,u.i,"text");return(a.isValidTextValue(A)||""===A)&&(k.text=A),k.customdata=a.castOption(r,u.i,"customdata"),a.texttemplateString({data:[k,r._meta],fallback:r.texttemplatefallback,labels:k,locale:n._d3locale,template:M})}}}),dD=p({"src/traces/sunburst/index.js"(e,t){t.exports={moduleType:"trace",name:"sunburst",basePlotModule:ue(),categories:[],animatable:!0,attributes:ur(),layoutAttributes:ui(),supplyDefaults:un(),supplyLayoutDefaults:ua(),calc:us().calc,crossTraceCalc:us().crossTraceCalc,plot:dz().plot,style:dL().style,colorbar:ne(),meta:{}}}}),dO=p({"lib/sunburst.js"(e,t){t.exports=dD()}}),dR=p({"src/traces/treemap/base_plot.js"(e){var t=tD();e.name="treemap",e.plot=function(r,i,n,a){t.plotBasePlot(e.name,r,i,n,a)},e.clean=function(r,i,n,a){t.cleanBasePlot(e.name,r,i,n,a)}}}),dF=p({"src/traces/treemap/constants.js"(e,t){t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),dj=p({"src/traces/treemap/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:i,templatefallbackAttrs:n}=eW(),a=tV(),o=at().attributes,s=cQ(),l=ur(),c=dF(),u=q().extendFlat,h=eH().pattern;t.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.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:u({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:l.marker.colors,pattern:h,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:l.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},a("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:u({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),texttemplatefallback:n({editType:"plot"}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:r({},{keys:c.eventDataKeys}),hovertemplatefallback:n(),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.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:s.sort,root:l.root,domain:o({name:"treemap",trace:!0,editType:"calc"})}}}),dB=p({"src/traces/treemap/layout_attributes.js"(e,t){t.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),dN=p({"src/traces/treemap/defaults.js"(e,t){var r=tv(),i=dj(),n=ee(),a=at().defaults,o=aM().handleText,s=i5().TEXTPAD,l=c0().handleMarkerDefaults,c=t3(),u=c.hasColorscale,h=c.handleDefaults;t.exports=function(e,t,c,d){function f(n,a){return r.coerce(e,t,i,n,a)}var p=f("labels"),m=f("parents");if(!p||!p.length||!m||!m.length){t.visible=!1;return}var g=f("values");f(g&&g.length?"branchvalues":"count"),f("level"),f("maxdepth"),"squarify"===f("tiling.packing")&&f("tiling.squarifyratio"),f("tiling.flip"),f("tiling.pad");var y=f("text");f("texttemplate"),f("texttemplatefallback"),t.texttemplate||f("textinfo",r.isArrayOrTypedArray(y)?"text+label":"label"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback");var v=f("pathbar.visible");o(e,t,d,f,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("textposition");var x=-1!==t.textposition.indexOf("bottom");l(e,t,d,f),(t._hasColorscale=u(e,"marker","colors")||(e.marker||{}).coloraxis)?h(e,t,d,f,{prefix:"marker.",cLetter:"c"}):f("marker.depthfade",!(t.marker.colors||[]).length);var b=2*t.textfont.size;f("marker.pad.t",x?b/4:b),f("marker.pad.l",b/4),f("marker.pad.r",b/4),f("marker.pad.b",x?b:b/4),f("marker.cornerradius"),t._hovered={marker:{line:{width:2,color:n.contrast(d.paper_bgcolor)}}},v&&(f("pathbar.thickness",t.pathbar.textfont.size+2*s),f("pathbar.side"),f("pathbar.edgeshape")),f("sort"),f("root.color"),a(t,d,f),t._length=null}}}),dU=p({"src/traces/treemap/layout_defaults.js"(e,t){var r=tv(),i=dB();t.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("treemapcolorway",t.colorway),n("extendtreemapcolors")}}}),dV=p({"src/traces/treemap/calc.js"(e){var t=us();e.calc=function(e,r){return t.calc(e,r)},e.crossTraceCalc=function(e){return t._runCrossTraceCalc("treemap",e)}}}),dq=p({"src/traces/treemap/flip_tree.js"(e,t){t.exports=function e(t,r,i){i.swapXY&&(n=t.x0,t.x0=t.y0,t.y0=n,n=t.x1,t.x1=t.y1,t.y1=n),i.flipX&&(n=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-n),i.flipY&&(n=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-n);var n,a=t.children;if(a)for(var o=0;o0)for(var b=0;b").join(" ")||"";var p=i.ensureSingle(d,"g","slicetext"),T=i.ensureSingle(p,"text","",function(e){e.attr("data-notex",1)}),C=i.ensureUniformFontSize(e,c.determineTextFont(L,o,E.font,{onPathbar:!0}));T.text(o._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(n.font,C).call(a.convertToTspans,e),o.textBB=n.bBox(T.node()),o.transform=b(o,{fontSize:C.size,onPathbar:!0}),o.transform.fontSize=C.size,w?T.transition().attrTween("transform",function(e){var t=k(e,!0,A,[m,g]);return function(e){return _(t(e))}}):T.attr("transform",_(o))})}}}),dY=p({"src/traces/treemap/plot_one.js"(e,t){var r=T(),i=(dE(),v(dS)).interpolate,n=dP(),a=tv(),o=i5().TEXTPAD,s=aP().toMoveInsideBar,l=aE().recordMinTextSize,c=dF(),u=dW();function h(e){return n.isHierarchyRoot(e)?"":n.getPtId(e)}t.exports=function(e,t,d,f,p){var m=e._fullLayout,g=t[0],y=g.trace,v="icicle"===y.type,x=g.hierarchy,b=n.findEntryWithLevel(x,y.level),_=r.select(d),w=_.selectAll("g.pathbar"),T=_.selectAll("g.slice");if(!b){w.remove(),T.remove();return}var M=n.isHierarchyRoot(b),k=!m.uniformtext.mode&&n.hasTransition(f),A=n.getMaxDepth(y),S=m._size,E=y.domain,C=S.w*(E.x[1]-E.x[0]),L=S.h*(E.y[1]-E.y[0]),P=y.pathbar.thickness,I=y.marker.line.width+c.gapWithPathbar,z=y.pathbar.visible?y.pathbar.side.indexOf("bottom")>-1?L+I:-(P+I):0,D={x0:C,x1:C,y0:z,y1:z+P},O=function(e,t,r){var i=y.tiling.pad,n=function(e){return e-i<=t.x0},a=function(e){return e+i>=t.x1},o=function(e){return e-i<=t.y0},s=function(e){return e+i>=t.y1};return e.x0===t.x0&&e.x1===t.x1&&e.y0===t.y0&&e.y1===t.y1?{x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1}:{x0:n(e.x0-i)?0:a(e.x0-i)?r[0]:e.x0,x1:n(e.x1+i)?0:a(e.x1+i)?r[0]:e.x1,y0:o(e.y0-i)?0:s(e.y0-i)?r[1]:e.y0,y1:o(e.y1+i)?0:s(e.y1+i)?r[1]:e.y1}},R=null,F={},j={},B=null,N=function(e,t){return t?F[h(e)]:j[h(e)]},U=function(e,t,r,i){if(t)return F[h(x)]||D;var n=j[y.level]||r;return e.data.depth-b.data.depth=(i-=(v?Q:Q.r)-o)){var f,p=(r+i)/2;r=p,i=p}en?n<(f=a-(v?Q:Q.b))&&f"===J?(l.x-=a,c.x-=a,u.x-=a,h.x-=a):"/"===J?(u.x-=a,h.x-=a,o.x-=a/2,s.x-=a/2):"\\"===J?(l.x-=a,c.x-=a,o.x-=a/2,s.x-=a/2):"<"===J&&(o.x-=a,s.x-=a),K(l),K(h),K(o),K(c),K(u),K(s),"M"+(l.x+",")+l.y+"L"+(c.x+",")+c.y+"L"+(s.x+",")+s.y+"L"+(u.x+",")+u.y+"L"+(h.x+",")+h.y+"L"+(o.x+",")+o.y+"Z"},toMoveInsideSlice:ea,makeUpdateSliceInterpolator:el,makeUpdateTextInterpolator:ec,handleSlicesExit:eu,hasTransition:k,strTransform:eh}):w.remove()}}}),dZ=p({"src/traces/treemap/draw.js"(e,t){var r=T(),i=dP(),n=aE().clearMinTextSize,a=aL().resizeText,o=dY();t.exports=function(e,t,s,l,c){var u,h,d=c.type,f=c.drawDescendants,p=e._fullLayout,m=p["_"+d+"layer"],g=!s;(n(d,p),(u=m.selectAll("g.trace."+d).data(t,function(e){return e[0].trace.uid})).enter().append("g").classed("trace",!0).classed(d,!0),u.order(),!p.uniformtext.mode&&i.hasTransition(s))?(l&&(h=l()),r.transition().duration(s.duration).ease(s.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).each(function(){m.selectAll("g.trace").each(function(t){o(e,t,this,s,f)})})):(u.each(function(t){o(e,t,this,s,f)}),p.uniformtext.mode&&a(e,m.selectAll(".trace"),d)),g&&u.exit().remove()}}}),d$=p({"src/traces/treemap/draw_descendants.js"(e,t){var r=T(),i=tv(),n=t7(),a=tF(),o=dH(),s=dG().styleOne,l=dF(),c=dP(),u=dI(),h=dz().formatSliceLabel;t.exports=function(e,t,d,f,p){var m=p.width,g=p.height,y=p.viewX,v=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,T=p.handleSlicesExit,M=p.makeUpdateSliceInterpolator,k=p.makeUpdateTextInterpolator,A=p.prevEntry,S=e._context.staticPlot,E=e._fullLayout,C=t[0].trace,L=-1!==C.textposition.indexOf("left"),P=-1!==C.textposition.indexOf("right"),I=-1!==C.textposition.indexOf("bottom"),z=!I&&!C.marker.pad.t||I&&!C.marker.pad.b,D=o(d,[m,g],{packing:C.tiling.packing,squarifyratio:C.tiling.squarifyratio,flipX:C.tiling.flip.indexOf("x")>-1,flipY:C.tiling.flip.indexOf("y")>-1,pad:{inner:C.tiling.pad,top:C.marker.pad.t,left:C.marker.pad.l,right:C.marker.pad.r,bottom:C.marker.pad.b}}).descendants(),O=1/0,R=-1/0;D.forEach(function(e){var t=e.depth;t>=C._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(O=Math.min(O,t),R=Math.max(R,t))}),f=f.data(D,c.getPtId),C._maxVisibleLayers=isFinite(R)?R-O+1:0,f.enter().append("g").classed("slice",!0),T(f,!1,{},[m,g],x),f.order();var F=null;if(w&&A){var j=c.getPtId(A);f.each(function(e){null===F&&c.getPtId(e)===j&&(F={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})})}var B=function(){return F||{x0:0,x1:m,y0:0,y1:g}},N=f;return w&&(N=N.transition().each("end",function(){var t=r.select(this);c.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),N.each(function(o){var f=c.isHeader(o,C);o._x0=y(o.x0),o._x1=y(o.x1),o._y0=v(o.y0),o._y1=v(o.y1),o._hoverX=y(o.x1-C.marker.pad.r),o._hoverY=v(I?o.y1-C.marker.pad.b/2:o.y0+C.marker.pad.t/2);var p=r.select(this),T=i.ensureSingle(p,"path","surface",function(e){e.style("pointer-events",S?"none":"all")});w?T.transition().attrTween("d",function(e){var t=M(e,!1,B(),[m,g]);return function(e){return x(t(e))}}):T.attr("d",x),p.call(u,d,e,t,{styleOne:s,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{isTransitioning:e._transitioning}),T.call(s,o,C,e,{hovered:!1}),o.x0===o.x1||o.y0===o.y1?o._text="":f?o._text=z?"":c.getPtLabel(o)||"":o._text=h(o,d,C,t,E)||"";var A=i.ensureSingle(p,"g","slicetext"),D=i.ensureSingle(A,"text","",function(e){e.attr("data-notex",1)}),O=i.ensureUniformFontSize(e,c.determineTextFont(C,o,E.font)),R=o._text||" ",F=f&&-1===R.indexOf("
");D.text(R).classed("slicetext",!0).attr("text-anchor",P?"end":L||F?"start":"middle").call(n.font,O).call(a.convertToTspans,e),o.textBB=n.bBox(D.node()),o.transform=b(o,{fontSize:O.size,isHeader:f}),o.transform.fontSize=O.size,w?D.transition().attrTween("transform",function(e){var t=k(e,!1,B(),[m,g]);return function(e){return _(t(e))}}):D.attr("transform",_(o))}),F}}}),dX=p({"src/traces/treemap/plot.js"(e,t){var r=dZ(),i=d$();t.exports=function(e,t,n,a){return r(e,t,n,a,{type:"treemap",drawDescendants:i})}}}),dK=p({"src/traces/treemap/index.js"(e,t){t.exports={moduleType:"trace",name:"treemap",basePlotModule:dR(),categories:[],animatable:!0,attributes:dj(),layoutAttributes:dB(),supplyDefaults:dN(),supplyLayoutDefaults:dU(),calc:dV().calc,crossTraceCalc:dV().crossTraceCalc,plot:dX(),style:dG().style,colorbar:ne(),meta:{}}}}),dJ=p({"lib/treemap.js"(e,t){t.exports=dK()}}),dQ=p({"src/traces/icicle/base_plot.js"(e){var t=tD();e.name="icicle",e.plot=function(r,i,n,a){t.plotBasePlot(e.name,r,i,n,a)},e.clean=function(r,i,n,a){t.cleanBasePlot(e.name,r,i,n,a)}}}),d0=p({"src/traces/icicle/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:i,templatefallbackAttrs:n}=eW(),a=tV(),o=at().attributes,s=cQ(),l=ur(),c=dj(),u=dF(),h=q().extendFlat,d=eH().pattern;t.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:c.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:h({colors:l.marker.colors,line:l.marker.line,pattern:d,editType:"calc"},a("marker",{colorAttr:"colors",anim:!1})),leaf:l.leaf,pathbar:c.pathbar,text:s.text,textinfo:l.textinfo,texttemplate:i({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),texttemplatefallback:n({editType:"plot"}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:r({},{keys:u.eventDataKeys}),hovertemplatefallback:n(),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:c.outsidetextfont,textposition:c.textposition,sort:s.sort,root:l.root,domain:o({name:"icicle",trace:!0,editType:"calc"})}}}),d1=p({"src/traces/icicle/layout_attributes.js"(e,t){t.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),d2=p({"src/traces/icicle/defaults.js"(e,t){var r=tv(),i=d0(),n=ee(),a=at().defaults,o=aM().handleText,s=i5().TEXTPAD,l=c0().handleMarkerDefaults,c=t3(),u=c.hasColorscale,h=c.handleDefaults;t.exports=function(e,t,c,d){function f(n,a){return r.coerce(e,t,i,n,a)}var p=f("labels"),m=f("parents");if(!p||!p.length||!m||!m.length){t.visible=!1;return}var g=f("values");f(g&&g.length?"branchvalues":"count"),f("level"),f("maxdepth"),f("tiling.orientation"),f("tiling.flip"),f("tiling.pad");var y=f("text");f("texttemplate"),f("texttemplatefallback"),t.texttemplate||f("textinfo",r.isArrayOrTypedArray(y)?"text+label":"label"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback");var v=f("pathbar.visible");o(e,t,d,f,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("textposition"),l(e,t,d,f);var x=t._hasColorscale=u(e,"marker","colors")||(e.marker||{}).coloraxis;x&&h(e,t,d,f,{prefix:"marker.",cLetter:"c"}),f("leaf.opacity",x?1:.7),t._hovered={marker:{line:{width:2,color:n.contrast(d.paper_bgcolor)}}},v&&(f("pathbar.thickness",t.pathbar.textfont.size+2*s),f("pathbar.side"),f("pathbar.edgeshape")),f("sort"),f("root.color"),a(t,d,f),t._length=null}}}),d3=p({"src/traces/icicle/layout_defaults.js"(e,t){var r=tv(),i=d1();t.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("iciclecolorway",t.colorway),n("extendiciclecolors")}}}),d5=p({"src/traces/icicle/calc.js"(e){var t=us();e.calc=function(e,r){return t.calc(e,r)},e.crossTraceCalc=function(e){return t._runCrossTraceCalc("icicle",e)}}}),d4=p({"src/traces/icicle/partition.js"(e,t){var r=uo(),i=dq();t.exports=function(e,t,n){var a=n.flipX,o=n.flipY,s="h"===n.orientation,l=n.maxDepth,c=t[0],u=t[1];l&&(c=(e.height+1)*t[0]/Math.min(e.height+1,l),u=(e.height+1)*t[1]/Math.min(e.height+1,l));var h=r.partition().padding(n.pad.inner).size(s?[t[1],c]:[t[0],u])(e);return(s||a||o)&&i(h,t,{swapXY:s,flipX:a,flipY:o}),h}}}),d6=p({"src/traces/icicle/style.js"(e,t){var r=T(),i=ee(),n=tv(),a=aE().resizeText,o=dC();function s(e,t,r,a){var s=t.data.data,l=!t.children,c=s.i,u=n.castOption(r,c,"marker.line.color")||i.defaultLine,h=n.castOption(r,c,"marker.line.width")||0;e.call(o,t,r,a).style("stroke-width",h).call(i.stroke,u).style("opacity",l?r.leaf.opacity:null)}t.exports={style:function(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");a(e,t,"icicle"),t.each(function(t){var i=r.select(this),n=t[0].trace;i.style("opacity",n.opacity),i.selectAll("path.surface").each(function(t){r.select(this).call(s,t,n,e)})})},styleOne:s}}}),d8=p({"src/traces/icicle/draw_descendants.js"(e,t){var r=T(),i=tv(),n=t7(),a=tF(),o=d4(),s=d6().styleOne,l=dF(),c=dP(),u=dI(),h=dz().formatSliceLabel;t.exports=function(e,t,d,f,p){var m=p.width,g=p.height,y=p.viewX,v=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,T=p.handleSlicesExit,M=p.makeUpdateSliceInterpolator,k=p.makeUpdateTextInterpolator,A=p.prevEntry,S=e._context.staticPlot,E=e._fullLayout,C=t[0].trace,L=-1!==C.textposition.indexOf("left"),P=-1!==C.textposition.indexOf("right"),I=-1!==C.textposition.indexOf("bottom"),z=o(d,[m,g],{flipX:C.tiling.flip.indexOf("x")>-1,flipY:C.tiling.flip.indexOf("y")>-1,orientation:C.tiling.orientation,pad:{inner:C.tiling.pad},maxDepth:C._maxDepth}).descendants(),D=1/0,O=-1/0;z.forEach(function(e){var t=e.depth;t>=C._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(D=Math.min(D,t),O=Math.max(O,t))}),f=f.data(z,c.getPtId),C._maxVisibleLayers=isFinite(O)?O-D+1:0,f.enter().append("g").classed("slice",!0),T(f,!1,{},[m,g],x),f.order();var R=null;if(w&&A){var F=c.getPtId(A);f.each(function(e){null===R&&c.getPtId(e)===F&&(R={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})})}var j=function(){return R||{x0:0,x1:m,y0:0,y1:g}},B=f;return w&&(B=B.transition().each("end",function(){var t=r.select(this);c.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),B.each(function(o){o._x0=y(o.x0),o._x1=y(o.x1),o._y0=v(o.y0),o._y1=v(o.y1),o._hoverX=y(o.x1-C.tiling.pad),o._hoverY=v(I?o.y1-C.tiling.pad/2:o.y0+C.tiling.pad/2);var f=r.select(this),p=i.ensureSingle(f,"path","surface",function(e){e.style("pointer-events",S?"none":"all")});w?p.transition().attrTween("d",function(e){var t=M(e,!1,j(),[m,g],{orientation:C.tiling.orientation,flipX:C.tiling.flip.indexOf("x")>-1,flipY:C.tiling.flip.indexOf("y")>-1});return function(e){return x(t(e))}}):p.attr("d",x),f.call(u,d,e,t,{styleOne:s,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{isTransitioning:e._transitioning}),p.call(s,o,C,e,{hovered:!1}),o.x0===o.x1||o.y0===o.y1?o._text="":o._text=h(o,d,C,t,E)||"";var T=i.ensureSingle(f,"g","slicetext"),A=i.ensureSingle(T,"text","",function(e){e.attr("data-notex",1)}),z=i.ensureUniformFontSize(e,c.determineTextFont(C,o,E.font));A.text(o._text||" ").classed("slicetext",!0).attr("text-anchor",P?"end":L?"start":"middle").call(n.font,z).call(a.convertToTspans,e),o.textBB=n.bBox(A.node()),o.transform=b(o,{fontSize:z.size}),o.transform.fontSize=z.size,w?A.transition().attrTween("transform",function(e){var t=k(e,!1,j(),[m,g]);return function(e){return _(t(e))}}):A.attr("transform",_(o))}),R}}}),d9=p({"src/traces/icicle/plot.js"(e,t){var r=dZ(),i=d8();t.exports=function(e,t,n,a){return r(e,t,n,a,{type:"icicle",drawDescendants:i})}}}),d7=p({"src/traces/icicle/index.js"(e,t){t.exports={moduleType:"trace",name:"icicle",basePlotModule:dQ(),categories:[],animatable:!0,attributes:d0(),layoutAttributes:d1(),supplyDefaults:d2(),supplyLayoutDefaults:d3(),calc:d5().calc,crossTraceCalc:d5().crossTraceCalc,plot:d9(),style:d6().style,colorbar:ne(),meta:{}}}}),fe=p({"lib/icicle.js"(e,t){t.exports=d7()}}),ft=p({"src/traces/funnelarea/base_plot.js"(e){var t=tD();e.name="funnelarea",e.plot=function(r,i,n,a){t.plotBasePlot(e.name,r,i,n,a)},e.clean=function(r,i,n,a){t.cleanBasePlot(e.name,r,i,n,a)}}}),fr=p({"src/traces/funnelarea/attributes.js"(e,t){var r=cQ(),i=Z(),n=at().attributes,{hovertemplateAttrs:a,texttemplateAttrs:o,templatefallbackAttrs:s}=eW(),l=q().extendFlat;t.exports={labels:r.labels,label0:r.label0,dlabel:r.dlabel,values:r.values,marker:{colors:r.marker.colors,line:{color:l({},r.marker.line.color,{dflt:null}),width:l({},r.marker.line.width,{dflt:1}),editType:"calc"},pattern:r.marker.pattern,editType:"calc"},text:r.text,hovertext:r.hovertext,scalegroup:l({},r.scalegroup,{}),textinfo:l({},r.textinfo,{flags:["label","text","value","percent"]}),texttemplate:o({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:s({editType:"plot"}),hoverinfo:l({},i.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:a({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:s(),textposition:l({},r.textposition,{values:["inside","none"],dflt:"inside"}),textfont:r.textfont,insidetextfont:r.insidetextfont,title:{text:r.title.text,font:r.title.font,position:l({},r.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:n({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"}}}}),fi=p({"src/traces/funnelarea/layout_attributes.js"(e,t){t.exports={hiddenlabels:c1().hiddenlabels,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),fn=p({"src/traces/funnelarea/defaults.js"(e,t){var r=tv(),i=fr(),n=at().defaults,a=aM().handleText,o=c0().handleLabelsAndValues,s=c0().handleMarkerDefaults;t.exports=function(e,t,l,c){function u(n,a){return r.coerce(e,t,i,n,a)}var h,d=o(u("labels"),u("values")),f=d.len;if(t._hasLabels=d.hasLabels,t._hasValues=d.hasValues,!t._hasLabels&&t._hasValues&&(u("label0"),u("dlabel")),!f){t.visible=!1;return}t._length=f,s(e,t,c,u),u("scalegroup");var p=u("text"),m=u("texttemplate");if(u("texttemplatefallback"),m||(h=u("textinfo",Array.isArray(p)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),m||h&&"none"!==h){var g=u("textposition");a(e,t,c,u,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else"none"===h&&u("textposition","none");n(t,c,u),u("title.text")&&(u("title.position"),r.coerceFont(u,"title.font",c.font)),u("aspectratio"),u("baseratio")}}}),fa=p({"src/traces/funnelarea/layout_defaults.js"(e,t){var r=tv(),i=fi();t.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("hiddenlabels"),n("funnelareacolorway",t.colorway),n("extendfunnelareacolors")}}}),fo=p({"src/traces/funnelarea/calc.js"(e,t){var r=c3();t.exports={calc:function(e,t){return r.calc(e,t)},crossTraceCalc:function(e){r.crossTraceCalc(e,{type:"funnelarea"})}}}}),fs=p({"src/traces/funnelarea/plot.js"(e,t){var r=T(),i=t7(),n=tv(),a=n.strScale,o=n.strTranslate,s=tF(),l=aP().toMoveInsideBar,c=aE(),u=c.recordMinTextSize,h=c.clearMinTextSize,d=r_(),f=c4(),p=f.attachFxHandlers,m=f.determineInsideTextFont,g=f.layoutAreas,y=f.prerenderTitles,v=f.positionTitleOutside,x=f.formatSliceLabel;function b(e,t){return"l"+(t[0]-e[0])+","+(t[1]-e[1])}t.exports=function(e,t){var c=e._context.staticPlot,f=e._fullLayout;h("funnelarea",f),y(t,e),g(t,f._size),n.makeTraceGroups(f._funnelarealayer,t,"trace").each(function(t){var h=r.select(this),g=t[0],y=g.trace;(function(e){if(e.length){var t,r,i=e[0],n=i.trace,a=n.aspectratio,o=n.baseratio;o>.999&&(o=.999);var s,l=Math.pow(o,2),c=i.vTotal,u=c*l/(1-l)/c,h=[];for(h.push(S()),t=e.length-1;t>-1;t--)if(!(r=e[t]).hidden){var d=r.v/c;u+=d,h.push(S())}var f=1/0,p=-1/0;for(t=0;t-1;t--)if(!(r=e[t]).hidden){var T,M,k=h[w+=1][0],A=h[w][1];r.TL=[-k,A],r.TR=[k,A],r.BL=b,r.BR=_,r.pxmid=(T=r.TR,M=r.BR,[.5*(T[0]+M[0]),.5*(T[1]+M[1])]),b=r.TL,_=r.TR}}function S(){var e,t={x:e=Math.sqrt(u),y:-e};return[t.x,t.y]}})(t),h.each(function(){var h=r.select(this).selectAll("g.slice").data(t);h.enter().append("g").classed("slice",!0),h.exit().remove(),h.each(function(a,o){if(a.hidden)return void r.select(this).selectAll("path,g").remove();a.pointNumber=a.i,a.curveNumber=y.index;var h=g.cx,v=g.cy,_=r.select(this),w=_.selectAll("path.surface").data([a]);w.enter().append("path").classed("surface",!0).style({"pointer-events":c?"none":"all"}),_.call(p,e,t);var T="M"+(h+a.TR[0])+","+(v+a.TR[1])+b(a.TR,a.BR)+b(a.BR,a.BL)+b(a.BL,a.TL)+"Z";w.attr("d",T),x(e,a,g);var M=d.castOption(y.textposition,a.pts),k=_.selectAll("g.slicetext").data(a.text&&"none"!==M?[0]:[]);k.enter().append("g").classed("slicetext",!0),k.exit().remove(),k.each(function(){var c=n.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),d=n.ensureUniformFontSize(e,m(y,a,f.font));c.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(i.font,d).call(s.convertToTspans,e);var p,g=i.bBox(c.node()),x=Math.min(a.BL[1],a.BR[1])+v,b=Math.max(a.TL[1],a.TR[1])+v;(p=l(Math.max(a.TL[0],a.BL[0])+h,Math.min(a.TR[0],a.BR[0])+h,x,b,g,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=d.size,u(y.type,p,f),t[o].transform=p,n.setTransormAndDisplay(c,p)})});var _=r.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);_.enter().append("g").classed("titletext",!0),_.exit().remove(),_.each(function(){var t=n.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),l=y.title.text;y._meta&&(l=n.templateString(l,y._meta)),t.text(l).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(i.font,y.title.font).call(s.convertToTspans,e);var c=v(g,f._size);t.attr("transform",o(c.x,c.y)+a(Math.min(1,c.scale))+o(c.tx,c.ty))})})})}}}),fl=p({"src/traces/funnelarea/style.js"(e,t){var r=T(),i=rT(),n=aE().resizeText;t.exports=function(e){var t=e._fullLayout._funnelarealayer.selectAll(".trace");n(e,t,"funnelarea"),t.each(function(t){var n=t[0].trace,a=r.select(this);a.style({opacity:n.opacity}),a.selectAll("path.surface").each(function(t){r.select(this).call(i,t,n,e)})})}}}),fc=p({"src/traces/funnelarea/index.js"(e,t){t.exports={moduleType:"trace",name:"funnelarea",basePlotModule:ft(),categories:["pie-like","funnelarea","showLegend"],attributes:fr(),layoutAttributes:fi(),supplyDefaults:fn(),supplyLayoutDefaults:fa(),calc:fo().calc,crossTraceCalc:fo().crossTraceCalc,plot:fs(),style:fl(),styleOne:rT(),meta:{}}}}),fu=p({"lib/funnelarea.js"(e,t){t.exports=fc()}}),fh=p({"stackgl_modules/index.js"(e,t){var r={3065(e,t,r){e.exports={alpha_shape:r(3502),convex_hull:r(7352),delaunay_triangulate:r(7642),gl_cone3d:r(6405),gl_error3d:r(9165),gl_line3d:r(5714),gl_mesh3d:r(7201),gl_plot3d:r(4100),gl_scatter3d:r(8418),gl_streamtube3d:r(7815),gl_surface3d:r(9499),ndarray:r(9618),ndarray_linear_interpolate:r(4317)}},6296(e,t,r){e.exports=function(e){var t=(e=e||{}).eye||[0,0,1],r=e.center||[0,0,0],s=e.up||[0,1,0],l=e.distanceLimits||[0,1/0],c=e.mode||"turntable",u=i(),h=n(),d=a();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,t,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,t,r,s),d.setDistanceLimits(l[0],l[1]),d.lookAt(0,t,r,s),new o({turntable:u,orbit:h,matrix:d},c)};var i=r(7261),n=r(9977),a=r(1811);function o(e,t){this._controllerNames=Object.keys(e),this._controllerList=this._controllerNames.map(function(t){return e[t]}),this._mode=t,this._active=e[t],this._active||(this._mode="turntable",this._active=e.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;s.flush=function(e){for(var t=this._controllerList,r=0;r"u"?r(1538):WeakMap,n=r(2762),a=r(8116),o=new i;e.exports=function(e){var t=o.get(e),r=t&&(t._triangleBuffer.handle||t._triangleBuffer.buffer);if(!r||!e.isBuffer(r)){var i=n(e,new Float32Array([-1,-1,-1,4,4,-1]));(t=a(e,[{buffer:i,type:e.FLOAT,size:2}]))._triangleBuffer=i,o.set(e,t)}t.bind(),e.drawArrays(e.TRIANGLES,0,3),t.unbind()}},1085(e,t,r){var i=r(1371);e.exports=function(e,t,r){t="number"==typeof t?t:1,r=r||": ";var n=e.split(/\r?\n/),a=String(n.length+t-1).length;return n.map(function(e,n){var o=n+t,s=String(o).length;return i(o,a-s)+r+e}).join(` +`)}},3952(e,t,r){e.exports=function(e){var t=e.length;if(0===t)return[];if(1===t)return[0];for(var r=e[0].length,n=[e[0]],a=[0],o=1;o0?o-4:o;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,i=e.length,n=i%3,a=[],o=0,s=i-n;o>18&63]+r[n>>12&63]+r[n>>6&63]+r[63&n]);return a.join("")}(e,o,o+16383>s?s:o+16383));return 1===n?a.push(r[(t=e[i-1])>>2]+r[t<<4&63]+"=="):2===n&&a.push(r[(t=(e[i-2]<<8)+e[i-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),a.join("")};for(var r=[],i=[],n="u">typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var i=r===t?0:4-r%4;return[r,i]}i[45]=62,i[95]=63},3865(e,t,r){var i=r(869);e.exports=function(e,t){return i(e[0].mul(t[1]).add(t[0].mul(e[1])),e[1].mul(t[1]))}},1318(e){e.exports=function(e,t){return e[0].mul(t[1]).cmp(t[0].mul(e[1]))}},8697(e,t,r){var i=r(869);e.exports=function(e,t){return i(e[0].mul(t[1]),e[1].mul(t[0]))}},7842(e,t,r){var i=r(6330),n=r(1533),a=r(2651),o=r(6768),s=r(869),l=r(8697);e.exports=function e(t,r){if(i(t))return r?l(t,e(r)):[t[0].clone(),t[1].clone()];var c,u,h=0;if(n(t))c=t.clone();else if("string"==typeof t)c=o(t);else{if(0===t)return[a(0),a(1)];if(t===Math.floor(t))c=a(t);else{for(;t!==Math.floor(t);)t*=1157920892373162e62,h-=256;c=a(t)}}if(i(r))c.mul(r[1]),u=r[0].clone();else if(n(r))u=r.clone();else if("string"==typeof r)u=o(r);else if(r)if(r===Math.floor(r))u=a(r);else{for(;r!==Math.floor(r);)r*=1157920892373162e62,h+=256;u=a(r)}else u=a(1);return h>0?c=c.ushln(h):h<0&&(u=u.ushln(-h)),s(c,u)}},6330(e,t,r){var i=r(1533);e.exports=function(e){return Array.isArray(e)&&2===e.length&&i(e[0])&&i(e[1])}},5716(e,t,r){var i=r(6859);e.exports=function(e){return e.cmp(new i(0))}},1369(e,t,r){var i=r(5716);e.exports=function(e){var t=e.length,r=e.words,n=0;if(1===t)n=r[0];else if(2===t)n=r[0]+0x4000000*r[1];else for(var a=0;a20?52:r+32}},1533(e,t,r){r(6859),e.exports=function(e){return e&&"object"==typeof e&&!!e.words}},2651(e,t,r){var i=r(6859),n=r(2361);e.exports=function(e){var t=n.exponent(e);return t<52?new i(e):new i(e*Math.pow(2,52-t)).ushln(t-52)}},869(e,t,r){var i=r(2651),n=r(5716);e.exports=function(e,t){var r=n(e),a=n(t);if(0===r)return[i(0),i(1)];if(0===a)return[i(0),i(0)];a<0&&(e=e.neg(),t=t.neg());var o=e.gcd(t);return o.cmpn(1)?[e.div(o),t.div(o)]:[e,t]}},6768(e,t,r){var i=r(6859);e.exports=function(e){return new i(e)}},6504(e,t,r){var i=r(869);e.exports=function(e,t){return i(e[0].mul(t[0]),e[1].mul(t[1]))}},7721(e,t,r){var i=r(5716);e.exports=function(e){return i(e[0])*i(e[1])}},5572(e,t,r){var i=r(869);e.exports=function(e,t){return i(e[0].mul(t[1]).sub(e[1].mul(t[0])),e[1].mul(t[1]))}},946(e,t,r){var i=r(1369),n=r(4025);e.exports=function(e){var t=e[0],r=e[1];if(0===t.cmpn(0))return 0;var a=t.abs().divmod(r.abs()),o=i(a.div),s=a.mod,l=t.negative!==r.negative?-1:1;if(0===s.cmpn(0))return l*o;if(o){var c=n(o)+4,u=i(s.ushln(c).divRound(r));return l*(o+u*Math.pow(2,-c))}var h=r.bitLength()-s.bitLength()+53,u=i(s.ushln(h).divRound(r));return h<1023?l*u*Math.pow(2,-h):l*(u*=11125369292536007e-324)*Math.pow(2,1023-h)}},2478(e){function t(e,t,r,i,n){for(var a=n+1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>=0?(a=o,n=o-1):i=o+1}return a}function r(e,t,r,i,n){for(var a=n+1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>0?(a=o,n=o-1):i=o+1}return a}function i(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<0?(a=o,i=o+1):n=o-1}return a}function n(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<=0?(a=o,i=o+1):n=o-1}return a}function a(e,t,r,i,n){for(;i<=n;){var a=i+n>>>1,o=e[a],s=void 0!==r?r(o,t):o-t;if(0===s)return a;s<=0?i=a+1:n=a-1}return -1}function o(e,t,r,i,n,a){return"function"==typeof r?a(e,t,r,void 0===i?0:0|i,void 0===n?e.length-1:0|n):a(e,t,void 0,void 0===r?0:0|r,void 0===i?e.length-1:0|i)}e.exports={ge:function(e,r,i,n,a){return o(e,r,i,n,a,t)},gt:function(e,t,i,n,a){return o(e,t,i,n,a,r)},lt:function(e,t,r,n,a){return o(e,t,r,n,a,i)},le:function(e,t,r,i,a){return o(e,t,r,i,a,n)},eq:function(e,t,r,i,n){return o(e,t,r,i,n,a)}}},8828(e,t){function r(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),0xff00ff&e&&(t-=8),0xf0f0f0f&e&&(t-=4),0x33333333&e&&(t-=2),0x55555555&e&&(t-=1),t}t.INT_BITS=32,t.INT_MAX=0x7fffffff,t.INT_MIN=-0x80000000,t.sign=function(e){return(e>0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:+(e>=10)},t.popCount=function(e){return e-=e>>>1&0x55555555,((e=(0x33333333&e)+(e>>>2&0x33333333))+(e>>>4)&0xf0f0f0f)*0x1010101>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var i=Array(256);(function(e){for(var t=0;t<256;++t){var r=t,i=t,n=7;for(r>>>=1;r;r>>>=1)i<<=1,i|=1&r,--n;e[t]=i<>>8&255]<<16|i[e>>>16&255]<<8|i[e>>>24&255]},t.interleave2=function(e,t){return e&=65535,t&=65535,(e=((e=((e=((e=(e|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=(t|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1},t.deinterleave2=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x55555555)|e>>>1)&0x33333333)|e>>>2)&0xf0f0f0f)|e>>>4)&0xff00ff)|e>>>16)&65535)<<16>>16},t.interleave3=function(e,t,r){return e&=1023,t&=1023,r&=1023,r=((r=((r=((r=(r|r<<16)&0xff0000ff)|r<<8)&0xf00f00f)|r<<4)&0xc30c30c3)|r<<2)&0x49249249,(e=((e=((e=((e=(e|e<<16)&0xff0000ff)|e<<8)&0xf00f00f)|e<<4)&0xc30c30c3)|e<<2)&0x49249249|(t=((t=((t=((t=(t|t<<16)&0xff0000ff)|t<<8)&0xf00f00f)|t<<4)&0xc30c30c3)|t<<2)&0x49249249)<<1)|r<<2},t.deinterleave3=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x49249249)|e>>>2)&0xc30c30c3)|e>>>4)&0xf00f00f)|e>>>8)&0xff0000ff)|e>>>16)&1023)<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},6859(e,t,r){!function(e,t){function i(e,t){if(!e)throw Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{c="u">typeof window&&"u">typeof window.Buffer?window.Buffer:r(7790).Buffer}catch{}function o(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var i=o(e,r);return r-1>=t&&(i|=o(e,r-1)<<4),i}function l(e,t,r,i){for(var n=0,a=Math.min(e.length,r),o=t;o=49?n+=s-49+10:s>=17?n+=s-17+10:n+=s}return n}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return 0>e.cmp(t)?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)o=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=o<>>26-s&0x3ffffff,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(n=0,a=0;n>>26-s&0x3ffffff,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var i=0;i=t;i-=2)n=s(e,t,i)<=18?(a-=18,o+=1,this.words[o]|=n>>>26):a+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(a-=18,o+=1,this.words[o]|=n>>>26):a+=8;this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=0x3ffffff;n*=t)i++;i--,n=n/t|0;for(var a=e.length-r,o=a%i,s=Math.min(a,a-o)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var c,u=["","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"],h=[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],d=[0,0,0x2000000,0x290d741,0x1000000,0x2e90edd,0x39aa400,0x267bf47,0x1000000,0x290d741,1e7,0x12959c3,0x222c000,0x3bd7765,7529536,0xadcea1,0x1000000,0x1704f61,0x206fc40,0x2cddcf9,64e6,4084101,5153632,6436343,7962624,9765625,0xb54ba0,0xdaf26b,0x1069c00,0x138f9ad,243e5,0x1b4d89f,0x2000000,0x25528a1,0x2b54a20,0x3216b93,0x39aa400];function f(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],a=0|t.words[0],o=n*a,s=0x3ffffff&o,l=o/0x4000000|0;r.words[0]=s;for(var c=1;c>>26,h=0x3ffffff&l,d=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=d;f++){var p=c-f|0;u+=(o=(n=0|e.words[p])*(a=0|t.words[f])+h)/0x4000000|0,h=0x3ffffff&o}r.words[c]=0|h,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}a.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,n=0,a=0,o=0;o>>24-n&0xffffff,(n+=2)>=26&&(n-=26,o--),r=0!==a||o!==this.length-1?u[6-l.length]+l+r:l+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],f=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);r=(p=p.idivn(f)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=0x4000000*this.words[1]:3===this.length&&1===this.words[2]?e+=0x10000000000000+0x4000000*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return i("u">typeof c),this.toArrayLike(c,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var o,s,l=new e(a),c=this.clone();if("le"===t){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),l[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&0x3ffffff>>26-r,n++);n=0);var r=e/26|0,n=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<e.length?(r=this,i=e):(r=e,i=this);for(var t,r,i,n=0,a=0;a>>26;for(;0!==n&&a>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,i=this.iadd(e);return e.negative=1,i._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=e):(t=e,r=this);for(var a=0,o=0;o>26,this.words[o]=0x3ffffff&i;for(;0!==a&&o>26,this.words[o]=0x3ffffff&i;if(0===a&&o>>13,f=0|o[1],p=8191&f,m=f>>>13,g=0|o[2],y=8191&g,v=g>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],T=8191&w,M=w>>>13,k=0|o[5],A=8191&k,S=k>>>13,E=0|o[6],C=8191&E,L=E>>>13,P=0|o[7],I=8191&P,z=P>>>13,D=0|o[8],O=8191&D,R=D>>>13,F=0|o[9],j=8191&F,B=F>>>13,N=0|s[0],U=8191&N,V=N>>>13,q=0|s[1],H=8191&q,G=q>>>13,W=0|s[2],Y=8191&W,Z=W>>>13,$=0|s[3],X=8191&$,K=$>>>13,J=0|s[4],Q=8191&J,ee=J>>>13,et=0|s[5],er=8191&et,ei=et>>>13,en=0|s[6],ea=8191&en,eo=en>>>13,es=0|s[7],el=8191&es,ec=es>>>13,eu=0|s[8],eh=8191&eu,ed=eu>>>13,ef=0|s[9],ep=8191&ef,em=ef>>>13;r.negative=e.negative^t.negative,r.length=19,i=Math.imul(h,U),n=(n=Math.imul(h,V))+Math.imul(d,U)|0,a=Math.imul(d,V);var eg=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eg>>>26)|0,eg&=0x3ffffff,i=Math.imul(p,U),n=(n=Math.imul(p,V))+Math.imul(m,U)|0,a=Math.imul(m,V),i=i+Math.imul(h,H)|0,n=(n=n+Math.imul(h,G)|0)+Math.imul(d,H)|0,a=a+Math.imul(d,G)|0;var ey=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ey>>>26)|0,ey&=0x3ffffff,i=Math.imul(y,U),n=(n=Math.imul(y,V))+Math.imul(v,U)|0,a=Math.imul(v,V),i=i+Math.imul(p,H)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,G)|0,i=i+Math.imul(h,Y)|0,n=(n=n+Math.imul(h,Z)|0)+Math.imul(d,Y)|0,a=a+Math.imul(d,Z)|0;var ev=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ev>>>26)|0,ev&=0x3ffffff,i=Math.imul(b,U),n=(n=Math.imul(b,V))+Math.imul(_,U)|0,a=Math.imul(_,V),i=i+Math.imul(y,H)|0,n=(n=n+Math.imul(y,G)|0)+Math.imul(v,H)|0,a=a+Math.imul(v,G)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,Z)|0,i=i+Math.imul(h,X)|0,n=(n=n+Math.imul(h,K)|0)+Math.imul(d,X)|0,a=a+Math.imul(d,K)|0;var ex=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ex>>>26)|0,ex&=0x3ffffff,i=Math.imul(T,U),n=(n=Math.imul(T,V))+Math.imul(M,U)|0,a=Math.imul(M,V),i=i+Math.imul(b,H)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(_,H)|0,a=a+Math.imul(_,G)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,Z)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,K)|0)+Math.imul(m,X)|0,a=a+Math.imul(m,K)|0,i=i+Math.imul(h,Q)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(d,Q)|0,a=a+Math.imul(d,ee)|0;var eb=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eb>>>26)|0,eb&=0x3ffffff,i=Math.imul(A,U),n=(n=Math.imul(A,V))+Math.imul(S,U)|0,a=Math.imul(S,V),i=i+Math.imul(T,H)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(M,H)|0,a=a+Math.imul(M,G)|0,i=i+Math.imul(b,Y)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,Z)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,K)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,K)|0,i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,i=i+Math.imul(h,er)|0,n=(n=n+Math.imul(h,ei)|0)+Math.imul(d,er)|0,a=a+Math.imul(d,ei)|0;var e_=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(e_>>>26)|0,e_&=0x3ffffff,i=Math.imul(C,U),n=(n=Math.imul(C,V))+Math.imul(L,U)|0,a=Math.imul(L,V),i=i+Math.imul(A,H)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,i=i+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,Z)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,Z)|0,i=i+Math.imul(b,X)|0,n=(n=n+Math.imul(b,K)|0)+Math.imul(_,X)|0,a=a+Math.imul(_,K)|0,i=i+Math.imul(y,Q)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,ee)|0,i=i+Math.imul(p,er)|0,n=(n=n+Math.imul(p,ei)|0)+Math.imul(m,er)|0,a=a+Math.imul(m,ei)|0,i=i+Math.imul(h,ea)|0,n=(n=n+Math.imul(h,eo)|0)+Math.imul(d,ea)|0,a=a+Math.imul(d,eo)|0;var ew=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ew>>>26)|0,ew&=0x3ffffff,i=Math.imul(I,U),n=(n=Math.imul(I,V))+Math.imul(z,U)|0,a=Math.imul(z,V),i=i+Math.imul(C,H)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,G)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,Z)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,Z)|0,i=i+Math.imul(T,X)|0,n=(n=n+Math.imul(T,K)|0)+Math.imul(M,X)|0,a=a+Math.imul(M,K)|0,i=i+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,ee)|0,i=i+Math.imul(y,er)|0,n=(n=n+Math.imul(y,ei)|0)+Math.imul(v,er)|0,a=a+Math.imul(v,ei)|0,i=i+Math.imul(p,ea)|0,n=(n=n+Math.imul(p,eo)|0)+Math.imul(m,ea)|0,a=a+Math.imul(m,eo)|0,i=i+Math.imul(h,el)|0,n=(n=n+Math.imul(h,ec)|0)+Math.imul(d,el)|0,a=a+Math.imul(d,ec)|0;var eT=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eT>>>26)|0,eT&=0x3ffffff,i=Math.imul(O,U),n=(n=Math.imul(O,V))+Math.imul(R,U)|0,a=Math.imul(R,V),i=i+Math.imul(I,H)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(z,H)|0,a=a+Math.imul(z,G)|0,i=i+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,Z)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,Z)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,K)|0)+Math.imul(S,X)|0,a=a+Math.imul(S,K)|0,i=i+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,i=i+Math.imul(b,er)|0,n=(n=n+Math.imul(b,ei)|0)+Math.imul(_,er)|0,a=a+Math.imul(_,ei)|0,i=i+Math.imul(y,ea)|0,n=(n=n+Math.imul(y,eo)|0)+Math.imul(v,ea)|0,a=a+Math.imul(v,eo)|0,i=i+Math.imul(p,el)|0,n=(n=n+Math.imul(p,ec)|0)+Math.imul(m,el)|0,a=a+Math.imul(m,ec)|0,i=i+Math.imul(h,eh)|0,n=(n=n+Math.imul(h,ed)|0)+Math.imul(d,eh)|0,a=a+Math.imul(d,ed)|0;var eM=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eM>>>26)|0,eM&=0x3ffffff,i=Math.imul(j,U),n=(n=Math.imul(j,V))+Math.imul(B,U)|0,a=Math.imul(B,V),i=i+Math.imul(O,H)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,G)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(z,Y)|0,a=a+Math.imul(z,Z)|0,i=i+Math.imul(C,X)|0,n=(n=n+Math.imul(C,K)|0)+Math.imul(L,X)|0,a=a+Math.imul(L,K)|0,i=i+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,ee)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,i=i+Math.imul(T,er)|0,n=(n=n+Math.imul(T,ei)|0)+Math.imul(M,er)|0,a=a+Math.imul(M,ei)|0,i=i+Math.imul(b,ea)|0,n=(n=n+Math.imul(b,eo)|0)+Math.imul(_,ea)|0,a=a+Math.imul(_,eo)|0,i=i+Math.imul(y,el)|0,n=(n=n+Math.imul(y,ec)|0)+Math.imul(v,el)|0,a=a+Math.imul(v,ec)|0,i=i+Math.imul(p,eh)|0,n=(n=n+Math.imul(p,ed)|0)+Math.imul(m,eh)|0,a=a+Math.imul(m,ed)|0,i=i+Math.imul(h,ep)|0,n=(n=n+Math.imul(h,em)|0)+Math.imul(d,ep)|0,a=a+Math.imul(d,em)|0;var ek=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ek>>>26)|0,ek&=0x3ffffff,i=Math.imul(j,H),n=(n=Math.imul(j,G))+Math.imul(B,H)|0,a=Math.imul(B,G),i=i+Math.imul(O,Y)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,Z)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,K)|0)+Math.imul(z,X)|0,a=a+Math.imul(z,K)|0,i=i+Math.imul(C,Q)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,i=i+Math.imul(A,er)|0,n=(n=n+Math.imul(A,ei)|0)+Math.imul(S,er)|0,a=a+Math.imul(S,ei)|0,i=i+Math.imul(T,ea)|0,n=(n=n+Math.imul(T,eo)|0)+Math.imul(M,ea)|0,a=a+Math.imul(M,eo)|0,i=i+Math.imul(b,el)|0,n=(n=n+Math.imul(b,ec)|0)+Math.imul(_,el)|0,a=a+Math.imul(_,ec)|0,i=i+Math.imul(y,eh)|0,n=(n=n+Math.imul(y,ed)|0)+Math.imul(v,eh)|0,a=a+Math.imul(v,ed)|0,i=i+Math.imul(p,ep)|0,n=(n=n+Math.imul(p,em)|0)+Math.imul(m,ep)|0,a=a+Math.imul(m,em)|0;var eA=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eA>>>26)|0,eA&=0x3ffffff,i=Math.imul(j,Y),n=(n=Math.imul(j,Z))+Math.imul(B,Y)|0,a=Math.imul(B,Z),i=i+Math.imul(O,X)|0,n=(n=n+Math.imul(O,K)|0)+Math.imul(R,X)|0,a=a+Math.imul(R,K)|0,i=i+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(z,Q)|0,a=a+Math.imul(z,ee)|0,i=i+Math.imul(C,er)|0,n=(n=n+Math.imul(C,ei)|0)+Math.imul(L,er)|0,a=a+Math.imul(L,ei)|0,i=i+Math.imul(A,ea)|0,n=(n=n+Math.imul(A,eo)|0)+Math.imul(S,ea)|0,a=a+Math.imul(S,eo)|0,i=i+Math.imul(T,el)|0,n=(n=n+Math.imul(T,ec)|0)+Math.imul(M,el)|0,a=a+Math.imul(M,ec)|0,i=i+Math.imul(b,eh)|0,n=(n=n+Math.imul(b,ed)|0)+Math.imul(_,eh)|0,a=a+Math.imul(_,ed)|0,i=i+Math.imul(y,ep)|0,n=(n=n+Math.imul(y,em)|0)+Math.imul(v,ep)|0,a=a+Math.imul(v,em)|0;var eS=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eS>>>26)|0,eS&=0x3ffffff,i=Math.imul(j,X),n=(n=Math.imul(j,K))+Math.imul(B,X)|0,a=Math.imul(B,K),i=i+Math.imul(O,Q)|0,n=(n=n+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,i=i+Math.imul(I,er)|0,n=(n=n+Math.imul(I,ei)|0)+Math.imul(z,er)|0,a=a+Math.imul(z,ei)|0,i=i+Math.imul(C,ea)|0,n=(n=n+Math.imul(C,eo)|0)+Math.imul(L,ea)|0,a=a+Math.imul(L,eo)|0,i=i+Math.imul(A,el)|0,n=(n=n+Math.imul(A,ec)|0)+Math.imul(S,el)|0,a=a+Math.imul(S,ec)|0,i=i+Math.imul(T,eh)|0,n=(n=n+Math.imul(T,ed)|0)+Math.imul(M,eh)|0,a=a+Math.imul(M,ed)|0,i=i+Math.imul(b,ep)|0,n=(n=n+Math.imul(b,em)|0)+Math.imul(_,ep)|0,a=a+Math.imul(_,em)|0;var eE=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eE>>>26)|0,eE&=0x3ffffff,i=Math.imul(j,Q),n=(n=Math.imul(j,ee))+Math.imul(B,Q)|0,a=Math.imul(B,ee),i=i+Math.imul(O,er)|0,n=(n=n+Math.imul(O,ei)|0)+Math.imul(R,er)|0,a=a+Math.imul(R,ei)|0,i=i+Math.imul(I,ea)|0,n=(n=n+Math.imul(I,eo)|0)+Math.imul(z,ea)|0,a=a+Math.imul(z,eo)|0,i=i+Math.imul(C,el)|0,n=(n=n+Math.imul(C,ec)|0)+Math.imul(L,el)|0,a=a+Math.imul(L,ec)|0,i=i+Math.imul(A,eh)|0,n=(n=n+Math.imul(A,ed)|0)+Math.imul(S,eh)|0,a=a+Math.imul(S,ed)|0,i=i+Math.imul(T,ep)|0,n=(n=n+Math.imul(T,em)|0)+Math.imul(M,ep)|0,a=a+Math.imul(M,em)|0;var eC=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eC>>>26)|0,eC&=0x3ffffff,i=Math.imul(j,er),n=(n=Math.imul(j,ei))+Math.imul(B,er)|0,a=Math.imul(B,ei),i=i+Math.imul(O,ea)|0,n=(n=n+Math.imul(O,eo)|0)+Math.imul(R,ea)|0,a=a+Math.imul(R,eo)|0,i=i+Math.imul(I,el)|0,n=(n=n+Math.imul(I,ec)|0)+Math.imul(z,el)|0,a=a+Math.imul(z,ec)|0,i=i+Math.imul(C,eh)|0,n=(n=n+Math.imul(C,ed)|0)+Math.imul(L,eh)|0,a=a+Math.imul(L,ed)|0,i=i+Math.imul(A,ep)|0,n=(n=n+Math.imul(A,em)|0)+Math.imul(S,ep)|0,a=a+Math.imul(S,em)|0;var eL=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eL>>>26)|0,eL&=0x3ffffff,i=Math.imul(j,ea),n=(n=Math.imul(j,eo))+Math.imul(B,ea)|0,a=Math.imul(B,eo),i=i+Math.imul(O,el)|0,n=(n=n+Math.imul(O,ec)|0)+Math.imul(R,el)|0,a=a+Math.imul(R,ec)|0,i=i+Math.imul(I,eh)|0,n=(n=n+Math.imul(I,ed)|0)+Math.imul(z,eh)|0,a=a+Math.imul(z,ed)|0,i=i+Math.imul(C,ep)|0,n=(n=n+Math.imul(C,em)|0)+Math.imul(L,ep)|0,a=a+Math.imul(L,em)|0;var eP=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eP>>>26)|0,eP&=0x3ffffff,i=Math.imul(j,el),n=(n=Math.imul(j,ec))+Math.imul(B,el)|0,a=Math.imul(B,ec),i=i+Math.imul(O,eh)|0,n=(n=n+Math.imul(O,ed)|0)+Math.imul(R,eh)|0,a=a+Math.imul(R,ed)|0,i=i+Math.imul(I,ep)|0,n=(n=n+Math.imul(I,em)|0)+Math.imul(z,ep)|0,a=a+Math.imul(z,em)|0;var eI=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eI>>>26)|0,eI&=0x3ffffff,i=Math.imul(j,eh),n=(n=Math.imul(j,ed))+Math.imul(B,eh)|0,a=Math.imul(B,ed),i=i+Math.imul(O,ep)|0,n=(n=n+Math.imul(O,em)|0)+Math.imul(R,ep)|0,a=a+Math.imul(R,em)|0;var ez=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ez>>>26)|0,ez&=0x3ffffff,i=Math.imul(j,ep),n=(n=Math.imul(j,em))+Math.imul(B,ep)|0,a=Math.imul(B,em);var eD=(c+i|0)+((8191&n)<<13)|0;return c=(a+(n>>>13)|0)+(eD>>>26)|0,eD&=0x3ffffff,l[0]=eg,l[1]=ey,l[2]=ev,l[3]=ex,l[4]=eb,l[5]=e_,l[6]=ew,l[7]=eT,l[8]=eM,l[9]=ek,l[10]=eA,l[11]=eS,l[12]=eE,l[13]=eC,l[14]=eL,l[15]=eP,l[16]=eI,l[17]=ez,l[18]=eD,0!==c&&(l[19]=c,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=f),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?f(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,a=0;a>>26)|0)>>>26,o&=0x3ffffff}r.words[a]=s,i=o,o=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,e,t):m(this,e,t)},g.prototype.makeRBT=function(e){for(var t=Array(e),r=a.prototype._countBits(e)-1,i=0;i>=1;return i},g.prototype.permute=function(e,t,r,i,n,a){for(var o=0;o>>=1)n++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=(n/0x4000000|0)+(a>>>26),this.words[r]=0x3ffffff&a}return 0!==t&&(this.words[r]=t,this.length++),0===e&&(this.length=1,this._normSign()),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=Array(e.bitLength()),r=0;r>>n}return t}(e);if(0===t.length)return new a(1);for(var r=this,i=0;i=0);var t,r=e%26,n=(e-r)/26,a=0x3ffffff>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0);var n=t?(t-t%26)/26:0,a=e%26,o=Math.min((e-a)/26,this.length),s=0x3ffffff^0x3ffffff>>>a<o)for(this.length-=o,l=0;l=0&&(0!==c||l>=n);l--){var u=0|this.words[l];this.words[l]=c<<26-a|u>>>a,c=u&s}return r&&0!==c&&(r.words[r.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return!(this.length<=r)&&!!(this.words[r]&1<=0);var t=e%26,r=(e-t)/26;return(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==t&&r++,this.length=Math.min(r,this.length),0!==t&&(this.words[this.length-1]&=0x3ffffff^0x3ffffff>>>t<=0x4000000;t++)this.words[t]-=0x4000000,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(i("number"==typeof e),i(e<0x4000000),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/0x4000000|0),this.words[n+r]=0x3ffffff&o}for(;n>26,this.words[n+r]=0x3ffffff&o;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n>26,this.words[n]=0x3ffffff&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,i=this.clone(),n=e,o=0|n.words[n.length-1];0!=(r=26-this._countBits(o))&&(n=n.ushln(r),i.iushln(r),o=0|n.words[n.length-1]);var s,l=i.length-n.length;if("mod"!==t){(s=new a(null)).length=l+1,s.words=Array(s.length);for(var c=0;c=0;h--){var d=(0|i.words[n.length+h])*0x4000000+(0|i.words[n.length+h-1]);for(d=Math.min(d/o|0,0x3ffffff),i._ishlnsubmul(n,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(n,1,h),i.isZero()||(i.negative^=1);s&&(s.words[h]=d)}return s&&s.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},a.prototype.divmod=function(e,t,r){var n,o,s;return(i(!e.isZero()),this.isZero())?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:n,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):this.negative&e.negative?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||0>this.cmp(e)?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=t.mod.abs(),i=e.abs().iushrn(1),n=1&e.words[0],o=r.cmp(i);if(o<0||1===n&&0===o)return t.div;var s=new a(1);return s.negative=this.negative^e.negative,t.div.iadd(s)},a.prototype.modn=function(e){i(e<=0x3ffffff);for(var t=0x4000000%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e;return r},a.prototype.idivn=function(e){i(e<=0x3ffffff);for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+0x4000000*t;this.words[r]=n/e|0,t=n%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(u),o.isub(h)),n.iushrn(1),o.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(h)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(s),o.isub(l)):(r.isub(t),s.isub(n),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},a.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t,r=this,n=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var o=new a(1),s=new a(0),l=n.clone();r.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;!(r.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(r.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);r.cmp(n)>=0?(r.isub(n),o.isub(s)):(n.isub(r),s.isub(o))}return 0>(t=0===r.cmpn(1)?o:s).cmpn(0)&&t.iadd(e),t},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var a=t;t=r,r=a}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return(1&this.words[0])==0},a.prototype.isOdd=function(){return(1&this.words[0])==1},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<>>26,s&=0x3ffffff,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=0x3ffffff,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){in&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return -1===this.cmpn(e)},a.prototype.lt=function(e){return -1===this.cmp(e)},a.prototype.lten=function(e){return 0>=this.cmpn(e)},a.prototype.lte=function(e){return 0>=this.cmp(e)},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new T(e)},a.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}v.prototype._tmp=function(){var e=new a(null);return e.words=Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(t>this.n);var i=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},n(x,v),x.prototype.split=function(e,t){for(var r=Math.min(e.length,9),i=0;i>>22,n=a}n>>>=22,e.words[i-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){var t;if(y[e])return y[e];if("k256"===e)t=new x;else if("p224"===e)t=new b;else if("p192"===e)t=new _;else if("p25519"===e)t=new w;else throw Error("Unknown prime "+e);return y[e]=t,t},T.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){i((e.negative|t.negative)==0,"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);i(!n.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,n),d=this.pow(e,n.addn(1).iushrn(1)),f=this.pow(e,n),p=o;0!==f.cmp(s);){for(var m=f,g=0;0!==m.cmp(s);g++)m=m.redSqr();i(g=0;i--){for(var c=t.words[i],u=l-1;u>=0;u--){var h=c>>u&1;if(n!==r[0]&&(n=this.sqr(n)),0===h&&0===o){s=0;continue}o<<=1,o|=h,(4==++s||0===i&&0===u)&&(n=this.mul(n,r[o]),s=0,o=0)}l=26}return n},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new M(e)},n(M,T),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):0>n.cmpn(0)&&(a=n.iadd(this.m)),a._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):0>n.cmpn(0)&&(o=n.iadd(this.m)),o._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},6204(e){e.exports=function(e){var t,r,i,n=e.length,a=0;for(t=0;t>>1;if(!(u<=0)){var h,d=n.mallocDouble(2*u*l),f=n.mallocInt32(l);if((l=s(e,u,d,f))>0){if(1===u&&i)a.init(l),h=a.sweepComplete(u,r,0,l,d,f,0,l,d,f);else{var p=n.mallocDouble(2*u*c),m=n.mallocInt32(c);(c=s(t,u,p,m))>0&&(a.init(l+c),h=1===u?a.sweepBipartite(u,r,0,l,d,f,0,c,p,m):o(u,r,i,l,d,f,c,p,m),n.free(p),n.free(m))}n.free(d),n.free(f)}return h}}}function c(e,t){i.push([e,t])}},2455(e,t){function r(e){return e?function(e,t,r,i,n,a,o,s,l,c,u){return n-i>l-s?function(e,t,r,i,n,a,o,s,l,c,u){for(var h=2*e,d=i,f=h*i;dc-l?i?function(e,t,r,i,n,a,o,s,l,c,u){for(var h=2*e,d=i,f=h*i;d0;){var P=6*(C-=1),I=y[P],z=y[P+1],D=y[P+2],O=y[P+3],R=y[P+4],F=y[P+5],j=2*C,B=v[j],N=v[j+1],U=1&F,V=!!(16&F),q=u,H=b,G=w,W=T;if(U&&(q=w,H=T,G=u,W=b),!(2&F&&(D=f(e,I,z,D,q,H,N),z>=D))&&!(4&F&&(z=p(e,I,z,D,q,H,B))>=D)){var Y=D-z,Z=R-O;if(V){if(e*Y*(Y+Z)<4194304){if(void 0!==(E=l.scanComplete(e,I,t,z,D,q,H,O,R,G,W)))return E;continue}}else if(e*Math.min(Y,Z)<128){if(void 0!==(E=o(e,I,t,U,z,D,q,H,O,R,G,W)))return E;continue}else if(e*Y*Z<4194304){if(void 0!==(E=l.scanBipartite(e,I,t,U,z,D,q,H,O,R,G,W)))return E;continue}var $=h(e,I,z,D,q,H,B,N);if(z<$)if(e*($-z)<128){if(void 0!==(E=s(e,I+1,t,z,$,q,H,O,R,G,W)))return E}else if(I===e-2){if(void 0!==(E=U?l.sweepBipartite(e,t,O,R,G,W,z,$,q,H):l.sweepBipartite(e,t,z,$,q,H,O,R,G,W)))return E}else x(C++,I+1,z,$,O,R,U,-1/0,1/0),x(C++,I+1,O,R,z,$,1^U,-1/0,1/0);if($=p0)&&!(p1>=hi)"),d=u("lo===p0"),f=u("lo>>1,u=2*e,h=c,d=a[u*c+t];sr&&n[h+t]>c;--u,h-=o){for(var d=h,f=h+o,p=0;p=y?(h=g,d=y):m>=x?(h=p,d=m):(h=v,d=x):y>=x?(h=g,d=y):x>=m?(h=p,d=m):(h=v,d=x);for(var b=u*(l-1),_=u*h,w=0;wh;++h,l+=s)if(n[l+t]===o)if(u===h)u+=1,c+=s;else{for(var d=0;s>d;++d){var f=n[l+d];n[l+d]=n[c],n[c++]=f}var p=a[h];a[h]=a[u],a[u++]=p}return u},"loh;++h,l+=s)if(n[l+t]d;++d){var f=n[l+d];n[l+d]=n[c],n[c++]=f}var p=a[h];a[h]=a[u],a[u++]=p}return u},"lo<=p0":function(e,t,r,i,n,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=e+t,d=r;i>d;++d,l+=s)if(n[l+h]<=o)if(u===d)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=n[l+f];n[l+f]=n[c],n[c++]=p}var m=a[d];a[d]=a[u],a[u++]=m}return u},"hi<=p0":function(e,t,r,i,n,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=e+t,d=r;i>d;++d,l+=s)if(n[l+h]<=o)if(u===d)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=n[l+f];n[l+f]=n[c],n[c++]=p}var m=a[d];a[d]=a[u],a[u++]=m}return u},"lod;++d,l+=s){var f=n[l+t],p=n[l+h];if(fm;++m){var g=n[l+m];n[l+m]=n[c],n[c++]=g}var y=a[d];a[d]=a[u],a[u++]=y}}return u},"lo<=p0&&p0<=hi":function(e,t,r,i,n,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=e+t,d=r;i>d;++d,l+=s){var f=n[l+t],p=n[l+h];if(f<=o&&o<=p)if(u===d)u+=1,c+=s;else{for(var m=0;s>m;++m){var g=n[l+m];n[l+m]=n[c],n[c++]=g}var y=a[d];a[d]=a[u],a[u++]=y}}return u},"!(lo>=p0)&&!(p1>=hi)":function(e,t,r,i,n,a,o,s){for(var l=2*e,c=l*r,u=c,h=r,d=e+t,f=r;i>f;++f,c+=l){var p=n[c+t],m=n[c+d];if(!(p>=o)&&!(s>=m))if(h===f)h+=1,u+=l;else{for(var g=0;l>g;++g){var y=n[c+g];n[c+g]=n[u],n[u++]=y}var v=a[f];a[f]=a[h],a[h++]=v}}return h}}},4192(e){function t(e,t,r){for(var i=2*(e+1),n=e+1;n<=t;++n){for(var a=r[i++],o=r[i++],s=n,l=i-2;s-- >e;){var c=r[l-2],u=r[l-1];if(cr[t+1])}function o(e,t,r,i){var n=i[e*=2];return n>1,p=f-u,m=f+u,g=h,y=p,v=f,x=m,b=d,_=s+1,w=l-1,T=0;a(g,y,c)&&(T=g,g=y,y=T),a(x,b,c)&&(T=x,x=b,b=T),a(g,v,c)&&(T=g,g=v,v=T),a(y,v,c)&&(T=y,y=v,v=T),a(g,x,c)&&(T=g,g=x,x=T),a(v,x,c)&&(T=v,v=x,x=T),a(y,b,c)&&(T=y,y=b,b=T),a(y,v,c)&&(T=y,y=v,v=T),a(x,b,c)&&(T=x,x=b,b=T);for(var M=c[2*y],k=c[2*y+1],A=c[2*x],S=c[2*x+1],E=2*g,C=2*v,L=2*b,P=2*h,I=2*f,z=2*d,D=0;D<2;++D){var O=c[E+D],R=c[C+D],F=c[L+D];c[P+D]=O,c[I+D]=R,c[z+D]=F}i(p,s,c),i(m,l,c);for(var j=_;j<=w;++j)if(o(j,M,k,c))j!==_&&r(j,_,c),++_;else if(!o(j,A,S,c))for(;;)if(o(w,A,S,c)){o(w,M,k,c)?(function(e,t,r,i){e*=2,t*=2,r*=2;var n=i[e],a=i[e+1];i[e]=i[t],i[e+1]=i[t+1],i[t]=i[r],i[t+1]=i[r+1],i[r]=n,i[r+1]=a}(j,_,w,c),++_):r(j,w,c),--w;break}else{if(--w>>1;a(d,A);for(var S=0,E=0,w=0;w=0x10000000)C=C-0x10000000|0,f(l,c,E--,C);else if(C>=0)f(o,s,S--,C);else if(C<=-0x10000000){C=-C-0x10000000|0;for(var L=0;L>>1;a(d,E);for(var C=0,L=0,P=0,M=0;M>1==d[2*M+3]>>1&&(z=2,M+=1),I<0){for(var D=-(I>>1)-1,O=0;O>1)-1;0===z?f(o,s,C--,D):1===z?f(l,c,L--,D):2===z&&f(u,h,P--,D)}}},scanBipartite:function(e,t,r,i,n,l,c,u,h,m,g,y){var v=0,x=2*e,b=t+e,_=1,w=1;i?w=0x10000000:_=0x10000000;for(var T=n;T>>1;a(d,S);for(var E=0,T=0;T=0x10000000?(L=!i,M-=0x10000000):(L=!!i,M-=1),L)p(o,s,E++,M);else{var P=y[M],I=x*M,z=g[I+t+1],D=g[I+t+1+e];e:for(var O=0;O>>1;a(d,_);for(var w=0,y=0;y<_;++y){var T=0|d[2*y+1];if(T<0){var v=-T;if(v>=0x10000000)o[w++]=v-0x10000000;else{var M=f[v-=1],k=m*v,A=h[k+t+1],S=h[k+t+1+e];e:for(var E=0;E=0;--E)if(o[E]===v){for(var I=E+1;I0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var i=e,n=t;if(("string"!=typeof n||""===n)&&(n="utf8"),!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);var a=0|p(i,n),l=o(a),c=l.write(i,n);return c!==a&&(l=l.slice(0,c)),l}if(ArrayBuffer.isView(e)){var u=e;if(C(u,Uint8Array)){var m=new Uint8Array(u);return d(m.buffer,m.byteOffset,m.byteLength)}return h(u)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(C(e,ArrayBuffer)||e&&C(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(C(e,SharedArrayBuffer)||e&&C(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var g=e.valueOf&&e.valueOf();if(null!=g&&g!==e)return s.from(g,t,r);var y=function(e){if(s.isBuffer(e)){var t=0|f(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?o(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(y)return y;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),o(e<0?0:0|f(e))}function h(e){for(var t=e.length<0?0:0|f(e.length),r=o(t),i=0;i=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||C(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return A(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return S(e).length;default:if(n)return i?-1:A(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){var n,a,o,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var n="",a=t;a0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(a=r*=1)!=a&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return -1;r=e.length-1}else if(r<0)if(!n)return -1;else r=0;if("string"==typeof t&&(t=s.from(t,i)),s.isBuffer(t))return 0===t.length?-1:v(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,i,n);throw TypeError("val must be string, number or Buffer")}function v(e,t,r,i,n){var a,o=1,s=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return -1;o=2,s/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){var u=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var h=!0,d=0;d239?4:c>223?3:c>191?2:1;if(n+h<=r)switch(h){case 1:c<128&&(u=c);break;case 2:(192&(a=e[n+1]))==128&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[n+1],o=e[n+2],(192&a)==128&&(192&o)==128&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[n+1],o=e[n+2],s=e[n+3],(192&a)==128&&(192&o)==128&&(192&s)==128&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|1023&u),i.push(u),n+=h}var d=i,f=d.length;if(f<=4096)return String.fromCharCode.apply(String,d);for(var p="",m=0;mr)throw RangeError("Trying to access beyond buffer length")}function _(e,t,r,i,n,a){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>n||te.length)throw RangeError("Index out of range")}function w(e,t,r,i,n,a){if(r+i>e.length||r<0)throw RangeError("Index out of range")}function T(e,t,r,i,a){return t*=1,r>>>=0,a||w(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,i,23,4),r+4}function M(e,t,r,i,a){return t*=1,r>>>=0,a||w(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,i,52,8),r+8}t.hp=s,t.IS=50,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch{return!1}}(),!s.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&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."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return c(e),e<=0?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)},s.allocUnsafe=function(e){return u(e)},s.allocUnsafeSlow=function(e){return u(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(C(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),C(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,i=t.length,n=0,a=Math.min(r,i);ni.length?s.from(a).copy(i,n):Uint8Array.prototype.set.call(i,a,n);else if(s.isBuffer(a))a.copy(i,n);else throw TypeError('"list" argument must be an Array of Buffers');n+=a.length}return i},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},a&&(s.prototype[a]=s.prototype.inspect),s.prototype.compare=function(e,t,r,i,n){if(C(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,i>>>=0,n>>>=0,this===e)return 0;for(var a=n-i,o=r-t,l=Math.min(a,o),c=this.slice(i,n),u=e.slice(t,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var n,a,o,s,l,c,u,h,d=this.length-t;if((void 0===r||r>d)&&(r=d),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var f=!1;;)switch(i){case"hex":return function(e,t,r,i){r=Number(r)||0;var n=e.length-r;i?(i=Number(i))>n&&(i=n):i=n;var a=t.length;i>a/2&&(i=a/2);for(var o=0;o>8,n.push(r%256),n.push(i);return n}(e,this.length-u),this,u,h);default:if(f)throw TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),f=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||b(e,t,this.length);for(var i=this[e],n=1,a=0;++a>>=0,t>>>=0,r||b(e,t,this.length);for(var i=this[e+--t],n=1;t>0&&(n*=256);)i+=this[e+--t]*n;return i},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var i=this[e],n=1,a=0;++a=(n*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var i=t,n=1,a=this[e+--i];i>0&&(n*=256);)a+=this[e+--i]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),128&this[e]?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),n.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,r,i){if(e*=1,t>>>=0,r>>>=0,!i){var n=Math.pow(2,8*r)-1;_(this,e,t,r,n,0)}var a=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!i){var n=Math.pow(2,8*r)-1;_(this,e,t,r,n,0)}var a=r-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,i){if(e*=1,t>>>=0,!i){var n=Math.pow(2,8*r-1);_(this,e,t,r,n-1,-n)}var a=0,o=1,s=0;for(this[t]=255&e;++a>>=0,!i){var n=Math.pow(2,8*r-1);_(this,e,t,r,n-1,-n)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return T(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return T(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,i){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw RangeError("Index out of range");if(i<0)throw RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n55295&&r<57344){if(!n){if(r>56319||o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function S(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(k,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function E(e,t,r,i){for(var n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function C(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var L=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var i=16*r,n=0;n<16;++n)t[i+n]=e[r]+e[n];return t}()},2538(e,t,r){var i=r(8902),n=r(5542),a=r(2272),o=r(5023);function s(e){return[Math.min(e[0],e[1]),Math.max(e[0],e[1])]}function l(e,t){return e[0]-t[0]||e[1]-t[1]}function c(e,t,r){return t in e?e[t]:r}e.exports=function(e,t,r){Array.isArray(t)?(r=r||{},t=t||[]):(r=t||{},t=[]);var u=!!c(r,"delaunay",!0),h=!!c(r,"interior",!0),d=!!c(r,"exterior",!0),f=!!c(r,"infinity",!1);if(!h&&!d||0===e.length)return[];var p=i(e,t);if(!u&&h===d&&!f)return p;for(var m=n(e.length,t.map(s).sort(l)),g=0;gi(e[n],e[a],e[o],e[s])&&r.push(n,a)}}r(2478),e.exports=function(e,t){for(var r=[],a=e.length,o=t.stars,s=0;si(e[s],e[u],e[h],e[d])&&r.push(s,u)}}for(;r.length>0;){for(var u=r.pop(),s=r.pop(),h=-1,d=-1,l=o[s],p=1;p=0||(t.flip(s,u),n(e,t,r,h,s,d),n(e,t,r,s,d,h),n(e,t,r,d,u,h),n(e,t,r,u,h,d))}}},5023(e,t,r){var i,n=r(2478);function a(e,t,r,i,n,a,o){this.cells=e,this.neighbor=t,this.flags=i,this.constraint=r,this.active=n,this.next=a,this.boundary=o}function o(e,t){return e[0]-t[0]||e[1]-t[1]||e[2]-t[2]}e.exports=function(e,t,r){var i=function(e,t){for(var r=e.cells(),i=r.length,n=0;n0||l.length>0;){for(;s.length>0;){var f=s.pop();if(c[f]!==-n){c[f]=n,u[f];for(var p=0;p<3;++p){var m=d[3*f+p];m>=0&&0===c[m]&&(h[3*f+p]?l.push(m):(s.push(m),c[m]=n))}}}var g=l;l=s,s=g,l.length=0,n=-n}var y=function(e,t,r){for(var i=0,n=0;nm[0]&&h.push(new o(m,p,2,d),new o(p,m,1,d))}h.sort(s);for(var g=h[0].a[0]-(1+Math.abs(h[0].a[0]))*2220446049250313e-31,y=[new a([g,1],[g,0],-1,[],[],[],[])],v=[],d=0,x=h.length;d1&&n(r[d[f-2]],r[d[f-1]],a)>0;)e.push([d[f-1],d[f-2],o]),f-=1;d.length=f,d.push(o);for(var p=h.upperIds,f=p.length;f>1&&0>n(r[p[f-2]],r[p[f-1]],a);)e.push([p[f-2],p[f-1],o]),f-=1;p.length=f,p.push(o)}}(v,y,e,b.a,b.idx):2===_?function(e,t){var r=i.le(e,t,c),n=e[r],o=n.upperIds,s=o[o.length-1];n.upperIds=[s],e.splice(r+1,0,new a(t.a,t.b,t.idx,[s],o))}(y,b):function(e,t){var r=t.a;t.a=t.b,t.b=r;var n=i.eq(e,t,c),a=e[n];e[n-1].upperIds=a.upperIds,e.splice(n,1)}(y,b)}return v}},5542(e,t,r){var i=r(2478);function n(e,t){this.stars=e,this.edges=t}e.exports=function(e,t){for(var r=Array(e),i=0;i=0}}(),a.removeTriangle=function(e,t,r){var i=this.stars;o(i[e],t,r),o(i[t],r,e),o(i[r],e,t)},a.addTriangle=function(e,t,r){var i=this.stars;i[e].push(t,r),i[t].push(r,e),i[r].push(e,t)},a.opposite=function(e,t){for(var r=this.stars[t],i=1,n=r.length;i=0;--a){var x=i[a],b=t[u=x[0]],_=b[0],w=b[1],T=e[_],M=e[w];if(0>(T[0]-M[0]||T[1]-M[1])){var k=_;_=w,w=k}b[0]=_;var A,S=b[1]=x[1];for(n&&(A=b[2]);a>0&&i[a-1][0]===u;){var x=i[--a],E=x[1];n?t.push([S,E,A]):t.push([S,E]),S=E}n?t.push([S,w,A]):t.push([S,w])}return d}(e,v,T,k=_,x),y(v,S=p(e,A,M),x),S||T.length>0||k.length>0;)P=!0;if(r&&P){i.length=0,r.length=0;for(var C=0;Ct[2]))}function y(e,t,r){if(0!==e.length){if(t)for(var i=0;if+1)throw Error(h+" map requires nshades to be at least size "+u.length);m=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"==typeof e.alpha?[e.alpha,e.alpha]:[1,1],t=u.map(function(e){return Math.round(e.index*f)}),m[0]=Math.min(Math.max(m[0],0),1),m[1]=Math.min(Math.max(m[1],0),1);var t,r,l,c,u,h,d,f,p,m,g,y=u.map(function(e,t){var r=u[t].index,i=u[t].rgb.slice();return 4===i.length&&i[3]>=0&&i[3]<=1||(i[3]=m[0]+(m[1]-m[0])*r),i}),p=[];for(g=0;g0||l(e,t,a)?-1:1:0===s?c>0||l(e,t,r)?1:-1:n(c-s)}var h=i(e,t,r);return h>0?o>0&&i(e,t,a)>0?1:-1:h<0?o>0||i(e,t,a)>0?1:-1:i(e,t,a)>0||l(e,t,r)?1:-1};var i=r(3250),n=r(8572),a=r(9362),o=r(5382),s=r(8210);function l(e,t,r){var i=a(e[0],-t[0]),n=a(e[1],-t[1]),l=a(r[0],-t[0]),c=a(r[1],-t[1]),u=s(o(i,l),o(n,c));return u[u.length-1]>=0}},8572(e){e.exports=function(e){return e<0?-1:+(e>0)}},8507(e){e.exports=function(e,i){var n=e.length,a=e.length-i.length;if(a)return a;switch(n){case 0:return 0;case 1:return e[0]-i[0];case 2:return e[0]+e[1]-i[0]-i[1]||t(e[0],e[1])-t(i[0],i[1]);case 3:var o=e[0]+e[1],s=i[0]+i[1];if(a=o+e[2]-(s+i[2]))return a;var l=t(e[0],e[1]),c=t(i[0],i[1]);return t(l,e[2])-t(c,i[2])||t(l+e[2],o)-t(c+i[2],s);case 4:var u=e[0],h=e[1],d=e[2],f=e[3],p=i[0],m=i[1],g=i[2],y=i[3];return u+h+d+f-(p+m+g+y)||t(u,h,d,f)-t(p,m,g,y,p)||t(u+h,u+d,u+f,h+d,h+f,d+f)-t(p+m,p+g,p+y,m+g,m+y,g+y)||t(u+h+d,u+h+f,u+d+f,h+d+f)-t(p+m+g,p+m+y,p+g+y,m+g+y);default:for(var v=e.slice().sort(r),x=i.slice().sort(r),b=0;be[r][0]&&(r=i);return tr?[[r],[t]]:[[t]]}},4750(e,t,r){e.exports=function(e){var t=i(e),r=t.length;if(r<=2)return[];for(var n=Array(r),a=t[r-1],o=0;o=t[l]&&(s+=1);a[o]=s}}return e}(i(function(e,t){for(var r=e.length,i=Array(r),n=0;nt.indexOf(n)&&(i[a++]=e[n]);return i}(e,r),!0),r)}};var i=r(8954),n=r(3952)},4769(e){e.exports=function(e,t,r,i,n,a){var o=n-1,s=n*n,l=o*o,c=(1+2*n)*l,u=n*l,h=s*(3-2*n),d=s*o;if(e.length){a||(a=Array(e.length));for(var f=e.length-1;f>=0;--f)a[f]=c*e[f]+u*t[f]+h*r[f]+d*i[f];return a}return c*e+u*t+h*r+d*i},e.exports.derivative=function(e,t,r,i,n,a){var o=6*n*n-6*n,s=3*n*n-4*n+1,l=-6*n*n+6*n,c=3*n*n-2*n;if(e.length){a||(a=Array(e.length));for(var u=e.length-1;u>=0;--u)a[u]=o*e[u]+s*t[u]+l*r[u]+c*i[u];return a}return o*e+s*t+l*r[u]+c*i}},7642(e,t,r){var i=r(8954),n=r(1682);function a(e,t){this.point=e,this.index=t}function o(e,t){for(var r=e.point,i=t.point,n=r.length,a=0;a=2)return!1;e[r]=i}return!0}):_.filter(function(e){for(var t=0;t<=s;++t){var r=y[e[t]];if(r<0)return!1;e[t]=r}return!0}),1&s)for(var u=0;u<_.length;++u){var b=_[u],d=b[0];b[0]=b[1],b[1]=d}return _}},2361(e){var t=!1;if("u">typeof Float64Array){var r=new Float64Array(1),i=new Uint32Array(r.buffer);(r[0]=1,t=!0,0x3ff00000===i[1])?(e.exports=function(e){return r[0]=e,[i[0],i[1]]},e.exports.pack=function(e,t){return i[0]=e,i[1]=t,r[0]},e.exports.lo=function(e){return r[0]=e,i[0]},e.exports.hi=function(e){return r[0]=e,i[1]}):0x3ff00000===i[0]?(e.exports=function(e){return r[0]=e,[i[1],i[0]]},e.exports.pack=function(e,t){return i[1]=e,i[0]=t,r[0]},e.exports.lo=function(e){return r[0]=e,i[1]},e.exports.hi=function(e){return r[0]=e,i[0]}):t=!1}if(!t){var n=new Buffer(8);e.exports=function(e){return n.writeDoubleLE(e,0,!0),[n.readUInt32LE(0,!0),n.readUInt32LE(4,!0)]},e.exports.pack=function(e,t){return n.writeUInt32LE(e,0,!0),n.writeUInt32LE(t,4,!0),n.readDoubleLE(0,!0)},e.exports.lo=function(e){return n.writeDoubleLE(e,0,!0),n.readUInt32LE(0,!0)},e.exports.hi=function(e){return n.writeDoubleLE(e,0,!0),n.readUInt32LE(4,!0)}}e.exports.sign=function(t){return e.exports.hi(t)>>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),i=e.exports.hi(t),n=1048575&i;return 0x7ff00000&i&&(n+=1048576),[r,n]},e.exports.denormalized=function(t){return!(0x7ff00000&e.exports.hi(t))}},1338(e){e.exports=function(e,t){switch(typeof t>"u"&&(t=0),typeof e){case"number":if(e>0){var r,i,n=0|e,a=t;for(r=Array(n),i=0;i=r-1)for(var d=l.length-1,p=e-t[r-1],f=0;f=r-1)for(var u=s.length-1,h=(t[r-1],0);h=0;--r)if(e[--t])return!1;return!0},s.jump=function(e){var t=this.lastT(),r=this.dimension;if(!(e0;--h)i.push(a(l[h-1],c[h-1],arguments[h])),n.push(0)}},s.push=function(e){var t=this.lastT(),r=this.dimension;if(!(e1e-6?1/s:0;this._time.push(e);for(var d=r;d>0;--d){var f=a(c[d-1],u[d-1],arguments[d]);i.push(f),n.push((f-i[o++])*h)}}},s.set=function(e){var t=this.dimension;if(!(e0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),i.push(0)}},s.move=function(e){var t=this.lastT(),r=this.dimension;if(!(e<=t||arguments.length!==r+1)){var i=this._state,n=this._velocity,o=i.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=e-t,h=u>1e-6?1/u:0;this._time.push(e);for(var d=r;d>0;--d){var f=arguments[d];i.push(a(l[d-1],c[d-1],i[o++]+f)),n.push(f*h)}}},s.idle=function(e){var t=this.lastT();if(!(e=0;--h)i.push(a(l[h],c[h],i[o]+u*n[o])),n.push(0),o+=1}}},3840(e){function t(e,t,r,i,n,a){this._color=e,this.key=t,this.value=r,this.left=i,this.right=n,this._count=a}function r(e){return new t(e._color,e.key,e.value,e.left,e.right,e._count)}function i(e,r){return new t(e,r.key,r.value,r.left,r.right,r._count)}function n(e){e._count=1+(e.left?e.left._count:0)+(e.right?e.right._count:0)}function a(e,t){this._compare=e,this.root=t}e.exports=function(e){return new a(e||u,null)};var o=a.prototype;function s(e,t){this.tree=e,this._stack=t}Object.defineProperty(o,"keys",{get:function(){var e=[];return this.forEach(function(t,r){e.push(t)}),e}}),Object.defineProperty(o,"values",{get:function(){var e=[];return this.forEach(function(t,r){e.push(r)}),e}}),Object.defineProperty(o,"length",{get:function(){return this.root?this.root._count:0}}),o.insert=function(e,r){for(var o=this._compare,s=this.root,l=[],c=[];s;){var u=o(e,s.key);l.push(s),c.push(u),s=u<=0?s.left:s.right}l.push(new t(0,e,r,null,null,1));for(var h=l.length-2;h>=0;--h){var s=l[h];c[h]<=0?l[h]=new t(s._color,s.key,s.value,l[h+1],s.right,s._count+1):l[h]=new t(s._color,s.key,s.value,s.left,l[h+1],s._count+1)}for(var h=l.length-1;h>1;--h){var d=l[h-1],s=l[h];if(1===d._color||1===s._color)break;var f=l[h-2];if(f.left===d)if(d.left===s){var p=f.right;if(p&&0===p._color)d._color=1,f.right=i(1,p),f._color=0,h-=1;else{if(f._color=0,f.left=d.right,d._color=1,d.right=f,l[h-2]=d,l[h-1]=s,n(f),n(d),h>=3){var m=l[h-3];m.left===f?m.left=d:m.right=d}break}}else{var p=f.right;if(p&&0===p._color)d._color=1,f.right=i(1,p),f._color=0,h-=1;else{if(d.right=s.left,f._color=0,f.left=s.right,s._color=1,s.left=d,s.right=f,l[h-2]=s,l[h-1]=d,n(f),n(d),n(s),h>=3){var m=l[h-3];m.left===f?m.left=s:m.right=s}break}}else if(d.right===s){var p=f.left;if(p&&0===p._color)d._color=1,f.left=i(1,p),f._color=0,h-=1;else{if(f._color=0,f.right=d.left,d._color=1,d.left=f,l[h-2]=d,l[h-1]=s,n(f),n(d),h>=3){var m=l[h-3];m.right===f?m.right=d:m.left=d}break}}else{var p=f.left;if(p&&0===p._color)d._color=1,f.left=i(1,p),f._color=0,h-=1;else{if(d.left=s.right,f._color=0,f.right=s.left,s._color=1,s.right=d,s.left=f,l[h-2]=s,l[h-1]=d,n(f),n(d),n(s),h>=3){var m=l[h-3];m.right===f?m.right=s:m.left=s}break}}}return l[0]._color=1,new a(o,l[0])},o.forEach=function(e,t,r){if(this.root)switch(arguments.length){case 1:return function e(t,r){if(r.left){var i=e(t,r.left);if(i)return i}var i=t(r.key,r.value);return i||(r.right?e(t,r.right):void 0)}(e,this.root);case 2:return function e(t,r,i,n){if(0>=r(t,n.key)){if(n.left){var a=e(t,r,i,n.left);if(a)return a}var a=i(n.key,n.value);if(a)return a}if(n.right)return e(t,r,i,n.right)}(t,this._compare,e,this.root);case 3:return this._compare(t,r)>=0?void 0:function e(t,r,i,n,a){var o,s=i(t,a.key),l=i(r,a.key);return s<=0&&(a.left&&(o=e(t,r,i,n,a.left))||l>0&&(o=n(a.key,a.value)))?o:l>0&&a.right?e(t,r,i,n,a.right):void 0}(t,r,this._compare,e,this.root)}},Object.defineProperty(o,"begin",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.left;return new s(this,e)}}),Object.defineProperty(o,"end",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.right;return new s(this,e)}}),o.at=function(e){if(e<0)return new s(this,[]);for(var t=this.root,r=[];;){if(r.push(t),t.left){if(e=t.right._count)break;t=t.right}else break}return new s(this,[])},o.ge=function(e){for(var t=this._compare,r=this.root,i=[],n=0;r;){var a=t(e,r.key);i.push(r),a<=0&&(n=i.length),r=a<=0?r.left:r.right}return i.length=n,new s(this,i)},o.gt=function(e){for(var t=this._compare,r=this.root,i=[],n=0;r;){var a=t(e,r.key);i.push(r),a<0&&(n=i.length),r=a<0?r.left:r.right}return i.length=n,new s(this,i)},o.lt=function(e){for(var t=this._compare,r=this.root,i=[],n=0;r;){var a=t(e,r.key);i.push(r),a>0&&(n=i.length),r=a<=0?r.left:r.right}return i.length=n,new s(this,i)},o.le=function(e){for(var t=this._compare,r=this.root,i=[],n=0;r;){var a=t(e,r.key);i.push(r),a>=0&&(n=i.length),r=a<0?r.left:r.right}return i.length=n,new s(this,i)},o.find=function(e){for(var t=this._compare,r=this.root,i=[];r;){var n=t(e,r.key);if(i.push(r),0===n)return new s(this,i);r=n<=0?r.left:r.right}return new s(this,[])},o.remove=function(e){var t=this.find(e);return t?t.remove():this},o.get=function(e){for(var t=this._compare,r=this.root;r;){var i=t(e,r.key);if(0===i)return r.value;r=i<=0?r.left:r.right}};var l=s.prototype;function c(e,t){e.key=t.key,e.value=t.value,e.left=t.left,e.right=t.right,e._color=t._color,e._count=t._count}function u(e,t){return et)}Object.defineProperty(l,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(l,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),l.clone=function(){return new s(this.tree,this._stack.slice())},l.remove=function(){var e=this._stack;if(0===e.length)return this.tree;var o=Array(e.length),s=e[e.length-1];o[o.length-1]=new t(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=e.length-2;l>=0;--l){var s=e[l];s.left===e[l+1]?o[l]=new t(s._color,s.key,s.value,o[l+1],s.right,s._count):o[l]=new t(s._color,s.key,s.value,s.left,o[l+1],s._count)}if((s=o[o.length-1]).left&&s.right){var u=o.length;for(s=s.left;s.right;)o.push(s),s=s.right;var h=o[u-1];o.push(new t(s._color,h.key,h.value,s.left,s.right,s._count)),o[u-1].key=s.key,o[u-1].value=s.value;for(var l=o.length-2;l>=u;--l)s=o[l],o[l]=new t(s._color,s.key,s.value,s.left,o[l+1],s._count);o[u-1].left=o[u]}if(0===(s=o[o.length-1])._color){var d=o[o.length-2];d.left===s?d.left=null:d.right===s&&(d.right=null),o.pop();for(var l=0;l=0;--l){if(t=e[l],0===l){t._color=1;return}if((a=e[l-1]).left===t){if((o=a.right).right&&0===o.right._color){if(s=(o=a.right=r(o)).right=r(o.right),a.right=o.left,o.left=a,o.right=s,o._color=a._color,t._color=1,a._color=1,s._color=1,n(a),n(o),l>1){var c=e[l-2];c.left===a?c.left=o:c.right=o}e[l-1]=o;return}if(o.left&&0===o.left._color){if(s=(o=a.right=r(o)).left=r(o.left),a.right=s.left,o.left=s.right,s.left=a,s.right=o,s._color=a._color,a._color=1,o._color=1,t._color=1,n(a),n(o),n(s),l>1){var c=e[l-2];c.left===a?c.left=s:c.right=s}e[l-1]=s;return}if(1===o._color)if(0===a._color){a._color=1,a.right=i(0,o);return}else{a.right=i(0,o);continue}if(a.right=(o=r(o)).left,o.left=a,o._color=a._color,a._color=0,n(a),n(o),l>1){var c=e[l-2];c.left===a?c.left=o:c.right=o}e[l-1]=o,e[l]=a,l+11){var c=e[l-2];c.right===a?c.right=o:c.left=o}e[l-1]=o;return}if(o.right&&0===o.right._color){if(s=(o=a.left=r(o)).right=r(o.right),a.left=s.right,o.right=s.left,s.right=a,s.left=o,s._color=a._color,a._color=1,o._color=1,t._color=1,n(a),n(o),n(s),l>1){var c=e[l-2];c.right===a?c.right=s:c.left=s}e[l-1]=s;return}if(1===o._color)if(0===a._color){a._color=1,a.left=i(0,o);return}else{a.left=i(0,o);continue}if(a.left=(o=r(o)).right,o.right=a,o._color=a._color,a._color=0,n(a),n(o),l>1){var c=e[l-2];c.right===a?c.right=o:c.left=o}e[l-1]=o,e[l]=a,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(l,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(l,"index",{get:function(){var e=0,t=this._stack;if(0===t.length){var r=this.tree.root;return r?r._count:0}t[t.length-1].left&&(e=t[t.length-1].left._count);for(var i=t.length-2;i>=0;--i)t[i+1]===t[i].right&&(++e,t[i].left&&(e+=t[i].left._count));return e},enumerable:!0}),l.next=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.right)for(t=t.right;t;)e.push(t),t=t.left;else for(e.pop();e.length>0&&e[e.length-1].right===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(l,"hasNext",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].right)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].left===e[t])return!0;return!1}}),l.update=function(e){var r=this._stack;if(0===r.length)throw Error("Can't update empty node!");var i=Array(r.length),n=r[r.length-1];i[i.length-1]=new t(n._color,n.key,e,n.left,n.right,n._count);for(var o=r.length-2;o>=0;--o)(n=r[o]).left===r[o+1]?i[o]=new t(n._color,n.key,n.value,i[o+1],n.right,n._count):i[o]=new t(n._color,n.key,n.value,n.left,i[o+1],n._count);return new a(this.tree._compare,i[0])},l.prev=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.left)for(t=t.left;t;)e.push(t),t=t.right;else for(e.pop();e.length>0&&e[e.length-1].left===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(l,"hasPrev",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].left)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].right===e[t])return!0;return!1}})},3837(e,t,r){e.exports=function(e,t){var r=new f(e);return r.update(t),r};var i=r(4935),n=r(501),a=r(5304),o=r(6429),s=r(6444),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),c=ArrayBuffer,u=DataView;function h(e){return Array.isArray(e)||c.isView(e)&&!(e instanceof u)}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function f(e){this.gl=e,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(e)}var p=f.prototype;function m(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}p.update=function(e){function t(t,r,i){if(i in e){var n,a=e[i],o=this[i];(t?h(a)&&h(a[0]):h(a))?this[i]=n=[r(a[0]),r(a[1]),r(a[2])]:this[i]=n=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(n[s]!==o[s])return!0}return!1}e=e||{};var r,a=t.bind(this,!1,Number),o=t.bind(this,!1,Boolean),l=t.bind(this,!1,String),c=t.bind(this,!0,function(e){if(h(e)){if(3===e.length)return[+e[0],+e[1],+e[2],1];if(4===e.length)return[+e[0],+e[1],+e[2],+e[3]]}return[0,0,0,1]}),u=!1,d=!1;if("bounds"in e)for(var f=e.bounds,p=0;p<2;++p)for(var m=0;m<3;++m)f[p][m]!==this.bounds[p][m]&&(d=!0),this.bounds[p][m]=f[p][m];if("ticks"in e){r=e.ticks,u=!0,this.autoTicks=!1;for(var p=0;p<3;++p)this.tickSpacing[p]=0}else a("tickSpacing")&&(this.autoTicks=!0,d=!0);if(this._firstInit&&("ticks"in e||"tickSpacing"in e||(this.autoTicks=!0),d=!0,u=!0,this._firstInit=!1),d&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),u=!0),u){for(var p=0;p<3;++p)r[p].sort(function(e,t){return e.x-t.x});s.equal(r,this.ticks)?u=!1:this.ticks=r}o("tickEnable"),l("tickFont")&&(u=!0),l("tickFontStyle")&&(u=!0),l("tickFontWeight")&&(u=!0),l("tickFontVariant")&&(u=!0),a("tickSize"),a("tickAngle"),a("tickPad"),c("tickColor");var g=l("labels");l("labelFont")&&(g=!0),l("labelFontStyle")&&(g=!0),l("labelFontWeight")&&(g=!0),l("labelFontVariant")&&(g=!0),o("labelEnable"),a("labelSize"),a("labelPad"),c("labelColor"),o("lineEnable"),o("lineMirror"),a("lineWidth"),c("lineColor"),o("lineTickEnable"),o("lineTickMirror"),a("lineTickLength"),a("lineTickWidth"),c("lineTickColor"),o("gridEnable"),a("gridWidth"),c("gridColor"),o("zeroEnable"),c("zeroLineColor"),a("zeroLineWidth"),o("backgroundEnable"),c("backgroundColor");var y=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],v=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(g||u)&&this._text.update(this.bounds,this.labels,y,this.ticks,v):this._text=i(this.gl,this.bounds,this.labels,y,this.ticks,v),this._lines&&u&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=n(this.gl,this.bounds,this.ticks))};var g=[new m,new m,new m],y=[0,0,0],v={model:l,view:l,projection:l,_ortho:!1};p.isOpaque=function(){return!0},p.isTransparent=function(){return!1},p.drawTransparent=function(e){};var x=[0,0,0],b=[0,0,0],_=[0,0,0];p.draw=function(e){e=e||v;for(var t,r,i,n=this.gl,a=e.model||l,s=e.view||l,c=e.projection||l,u=this.bounds,h=e._ortho||!1,f=o(a,s,c,u,h),p=f.cubeEdges,m=f.axis,w=s[12],T=s[13],M=s[14],k=s[15],A=h?2:1,S=A*this.pixelRatio*(c[3]*w+c[7]*T+c[11]*M+c[15]*k)/n.drawingBufferHeight,E=0;E<3;++E)this.lastCubeProps.cubeEdges[E]=p[E],this.lastCubeProps.axis[E]=m[E];for(var E=0;E<3;++E)!function(e,t,r,i,n){for(var a=e.primalOffset,o=e.primalMinor,s=e.mirrorOffset,l=e.mirrorMinor,c=i[t],u=0;u<3;++u)if(t!==u){var h=a,d=s,f=o,p=l;c&1<0?(f[u]=-1,p[u]=0):(f[u]=0,p[u]=1)}}(g[E],E,this.bounds,p,m);for(var n=this.gl,E=0;E<3;++E)this.backgroundEnable[E]?y[E]=m[E]:y[E]=0;this._background.draw(a,s,c,u,y,this.backgroundColor),this._lines.bind(a,s,c,this);for(var E=0;E<3;++E){var C=[0,0,0];m[E]>0?C[E]=u[1][E]:C[E]=u[0][E];for(var L=0;L<2;++L){var P=(E+1+L)%3,I=(E+1+(1^L))%3;this.gridEnable[P]&&this._lines.drawGrid(P,I,this.bounds,C,this.gridColor[P],this.gridWidth[P]*this.pixelRatio)}for(var L=0;L<2;++L){var P=(E+1+L)%3,I=(E+1+(1^L))%3;this.zeroEnable[I]&&0>=Math.min(u[0][I],u[1][I])&&Math.max(u[0][I],u[1][I])>=0&&this._lines.drawZero(P,I,this.bounds,C,this.zeroLineColor[I],this.zeroLineWidth[I]*this.pixelRatio)}}for(var E=0;E<3;++E){this.lineEnable[E]&&this._lines.drawAxisLine(E,this.bounds,g[E].primalOffset,this.lineColor[E],this.lineWidth[E]*this.pixelRatio),this.lineMirror[E]&&this._lines.drawAxisLine(E,this.bounds,g[E].mirrorOffset,this.lineColor[E],this.lineWidth[E]*this.pixelRatio);for(var z=d(x,g[E].primalMinor),D=d(b,g[E].mirrorMinor),O=this.lineTickLength,L=0;L<3;++L){var R=S/a[5*L];z[L]*=O[L]*R,D[L]*=O[L]*R}this.lineTickEnable[E]&&this._lines.drawAxisTicks(E,g[E].primalOffset,z,this.lineTickColor[E],this.lineTickWidth[E]*this.pixelRatio),this.lineTickMirror[E]&&this._lines.drawAxisTicks(E,g[E].mirrorOffset,D,this.lineTickColor[E],this.lineTickWidth[E]*this.pixelRatio)}function F(e){(i=[0,0,0])[e]=1}this._lines.unbind(),this._text.bind(a,s,c,this.pixelRatio);for(var E=0;E<3;++E){for(var j=g[E].primalMinor,B=g[E].mirrorMinor,N=d(_,g[E].primalOffset),L=0;L<3;++L)this.lineTickEnable[E]&&(N[L]+=S*j[L]*Math.max(this.lineTickLength[L],0)/a[5*L]);var U=[0,0,0];if(U[E]=1,this.tickEnable[E]){-3600===this.tickAngle[E]?(this.tickAngle[E]=0,this.tickAlign[E]="auto"):this.tickAlign[E]=-1,r=1,"auto"===(t=[this.tickAlign[E],.5,r])[0]?t[0]=0:t[0]=parseInt(""+t[0]),i=[0,0,0],function(e,t,r){var i=(e+1)%3,n=(e+2)%3,a=t[i],o=t[n],s=r[i],l=r[n];if(a>0&&l>0||a>0&&l<0)return F(i);a<0&&l>0||a<0&&l<0?F(i):o>0&&s>0||o>0&&s<0||o<0&&s>0?F(n):o<0&&s<0&&F(n)}(E,j,B);for(var L=0;L<3;++L)N[L]+=S*j[L]*this.tickPad[L]/a[5*L];this._text.drawTicks(E,this.tickSize[E],this.tickAngle[E],N,this.tickColor[E],U,i,t)}if(this.labelEnable[E]){r=0,i=[0,0,0],this.labels[E].length>4&&(F(E),r=1),"auto"===(t=[this.labelAlign[E],.5,r])[0]?t[0]=0:t[0]=parseInt(""+t[0]);for(var L=0;L<3;++L)N[L]+=S*j[L]*this.labelPad[L]/a[5*L];N[E]+=.5*(u[0][E]+u[1][E]),this._text.drawLabel(E,this.labelSize[E],this.labelAngle[E],N,this.labelColor[E],[0,0,0],i,t)}}this._text.unbind()},p.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},5304(e,t,r){e.exports=function(e){for(var t=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,h=[0,0,0],d=[0,0,0],f=-1;f<=1;f+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),h[l]=f,d[l]=f;for(var p=-1;p<=1;p+=2){h[c]=p;for(var m=-1;m<=1;m+=2)h[u]=m,t.push(h[0],h[1],h[2],d[0],d[1],d[2]),s+=1}var g=c;c=u,u=g}var y=i(e,new Float32Array(t)),v=i(e,new Uint16Array(r),e.ELEMENT_ARRAY_BUFFER),x=n(e,[{buffer:y,type:e.FLOAT,size:3,offset:0,stride:24},{buffer:y,type:e.FLOAT,size:3,offset:12,stride:24}],v),b=a(e);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(e,y,x,b)};var i=r(2762),n=r(8116),a=r(1879).bg;function o(e,t,r,i){this.gl=e,this.buffer=t,this.vao=r,this.shader=i}var s=o.prototype;s.draw=function(e,t,r,i,n,a){for(var o=!1,s=0;s<3;++s)o=o||n[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:e,view:t,projection:r,bounds:i,enable:n,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},6429(e,t,r){e.exports=function(e,t,r,d,y){n(s,t,e),n(s,r,s);for(var v=0,x=0;x<2;++x){u[2]=d[x][2];for(var b=0;b<2;++b){u[1]=d[b][1];for(var _=0;_<2;++_)u[0]=d[_][0],function(e,t,r){for(var i=0;i<4;++i){e[i]=r[12+i];for(var n=0;n<3;++n)e[i]+=t[n]*r[4*n+i]}}(l[v],u,s),v+=1}}for(var w=-1,x=0;x<8;++x){for(var T=l[x][3],M=0;M<3;++M)c[x][M]=l[x][M]/T;y&&(c[x][2]*=-1),T<0&&(w<0||c[x][2]o(c[P],c[I],c[z],h)||(L?E=1:C=1)}if(E<0||C<0){C>E&&(w|=1<E){w|=1<c[x][1])&&(R=x);for(var F=-1,x=0;x<3;++x){var j=R^1<c[B][0]&&(B=j)}}p[0]=p[1]=p[2]=0,p[i.log2(F^R)]=R&F,p[i.log2(R^B)]=R&B;var N=7^B;N===w||N===O?(N=7^F,p[i.log2(B^N)]=N&B):p[i.log2(F^N)]=N&F;for(var U=w,k=0;k<3;++k)U&1<=0;--v){var x=f[y[v]];o.push(d*x[0],-d*x[1],e)}}for(var c=[0,0,0],u=[0,0,0],h=[0,0,0],d=[0,0,0],f={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},p=0;p<3;++p){h[p]=o.length/3|0,s(.5*(e[0][p]+e[1][p]),t[p],r[p],12,1.25,f),d[p]=(o.length/3|0)-h[p],c[p]=o.length/3|0;for(var m=0;m=0&&(n=r.length-i-1);var a=Math.pow(10,n),o=Math.round(e*t*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,c=o%a;o<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(o<0&&(u="-"+u),!n)return u;for(var h=""+c;h.length=e[0][n];--o)a.push({x:o*t[n],text:r(t[n],o)});i.push(a)}return i},t.equal=function(e,t){for(var r=0;r<3;++r){if(e[r].length!==t[r].length)return!1;for(var i=0;ir)throw Error("gl-buffer: If resizing buffer, must not specify offset");return e.bufferSubData(t,a,n),r}function u(e,t){for(var r=i.malloc(e.length,t),n=e.length,a=0;atypeof e.shape){var r,s=e.dtype;if(0>o.indexOf(s)&&(s="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER&&(s=gl.getExtension("OES_element_index_uint")&&"uint16"!==s?"uint32":"uint16"),s===e.dtype&&function(e,t){for(var r=1,i=t.length-1;i>=0;--i){if(t[i]!==r)return!1;r*=e[i]}return!0}(e.shape,e.stride))0===e.offset&&e.data.length===e.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,e.data,t):this.length=c(this.gl,this.type,this.length,this.usage,e.data.subarray(e.offset,e.shape[0]),t);else{var l=i.malloc(e.size,s),h=a(l,e.shape);n.assign(h,e),t<0?this.length=c(this.gl,this.type,this.length,this.usage,l,t):this.length=c(this.gl,this.type,this.length,this.usage,l.subarray(0,e.size),t),i.free(l)}}else if(Array.isArray(e))r=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(e,"uint16"):u(e,"float32"),t<0?this.length=c(this.gl,this.type,this.length,this.usage,r,t):this.length=c(this.gl,this.type,this.length,this.usage,r.subarray(0,e.length),t),i.free(r);else if("object"==typeof e&&"number"==typeof e.length)this.length=c(this.gl,this.type,this.length,this.usage,e,t);else if("number"==typeof e||void 0===e){if(t>=0)throw Error("gl-buffer: Cannot specify offset when resizing buffer");(e|=0)<=0&&(e=1),this.gl.bufferData(this.type,0|e,this.usage),this.length=e}else throw Error("gl-buffer: Invalid data type")},e.exports=function(e,t,r,i){if(r=r||e.ARRAY_BUFFER,i=i||e.DYNAMIC_DRAW,r!==e.ARRAY_BUFFER&&r!==e.ELEMENT_ARRAY_BUFFER)throw Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(i!==e.DYNAMIC_DRAW&&i!==e.STATIC_DRAW&&i!==e.STREAM_DRAW)throw Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var n=e.createBuffer(),a=new s(e,r,n,0,i);return a.update(t),a}},6405:function(e,t,r){var i=r(2931);e.exports=function(e,t){var r=e.positions,n=e.vectors,a={positions:[],vertexIntensity:[],vertexIntensityBounds:e.vertexIntensityBounds,vectors:[],cells:[],coneOffset:e.coneOffset,colormap:e.colormap};if(0===e.positions.length)return t&&(t[0]=[0,0,0],t[1]=[0,0,0]),a;for(var o=0,s=1/0,l=-1/0,c=1/0,u=-1/0,h=1/0,d=-1/0,f=null,p=null,m=[],g=1/0,y=!1,v="raw"===e.coneSizemode,x=0;xo&&(o=i.length(_)),x&&!v){var w=2*i.distance(f,b)/(i.length(p)+i.length(_));w?(g=Math.min(g,w),y=!1):y=!0}y||(f=b,p=_),m.push(_)}var T=[s,c,h],M=[l,u,d];t&&(t[0]=T,t[1]=M),0===o&&(o=1);var k=1/o;isFinite(g)||(g=1),a.vectorScale=g;var A=e.coneSize||(v?1:.5);e.absoluteConeSize&&(A=e.absoluteConeSize*k),a.coneScale=A;for(var x=0,S=0;x=1},f.isTransparent=function(){return this.opacity<1},f.pickSlots=1,f.setPickBase=function(e){this.pickId=e},f.update=function(e){e=e||{};var t=this.gl;this.dirty=!0,"lightPosition"in e&&(this.lightPosition=e.lightPosition),"opacity"in e&&(this.opacity=e.opacity),"ambient"in e&&(this.ambientLight=e.ambient),"diffuse"in e&&(this.diffuseLight=e.diffuse),"specular"in e&&(this.specularLight=e.specular),"roughness"in e&&(this.roughness=e.roughness),"fresnel"in e&&(this.fresnel=e.fresnel),void 0!==e.tubeScale&&(this.tubeScale=e.tubeScale),void 0!==e.vectorScale&&(this.vectorScale=e.vectorScale),void 0!==e.coneScale&&(this.coneScale=e.coneScale),void 0!==e.coneOffset&&(this.coneOffset=e.coneOffset),e.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=t.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=t.LINEAR,this.texture.setPixels(function(e){for(var t=u({colormap:e,nshades:256,format:"rgba"}),r=new Uint8Array(1024),i=0;i<256;++i){for(var n=t[i],a=0;a<3;++a)r[4*i+a]=n[a];r[4*i+3]=255*n[3]}return c(r,[256,256,4],[4,0,1])}(e.colormap)),this.texture.generateMipmap());var r=e.cells,i=e.positions,n=e.vectors;if(!(!i||!r||!n)){var a=[],o=[],s=[],l=[],h=[];this.cells=r,this.positions=i,this.vectors=n;var d=e.meshColor||[1,1,1,1],f=e.vertexIntensity,p=1/0,m=-1/0;if(f)if(e.vertexIntensityBounds)p=+e.vertexIntensityBounds[0],m=+e.vertexIntensityBounds[1];else for(var g=0;g0){var m=this.triShader;m.bind(),m.uniforms=c,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},f.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||h,i=e.view||h,n=e.projection||h,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(i),this._projection=[].slice.call(n),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:r,view:i,projection:n,clipBounds:a,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},f.pick=function(e){if(!e||e.id!==this.pickId)return null;var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],i=this.positions[r[1]].slice(0,3),n={position:i,dataCoordinate:i,index:Math.floor(r[1]/48)};return"cone"===this.traceType?n.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(n.intensity=this.intensity[r[1]],n.velocity=this.vectors[r[1]].slice(0,3),n.divergence=this.vectors[r[1]][3],n.index=t),n},f.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},e.exports=function(e,t,r){var s,l,u=r.shaders;1==arguments.length&&(e=(t=e).gl);var h=((s=i(e,u.meshShader.vertex,u.meshShader.fragment,null,u.meshShader.attributes)).attributes.position.location=0,s.attributes.color.location=2,s.attributes.uv.location=3,s.attributes.vector.location=4,s),f=((l=i(e,u.pickShader.vertex,u.pickShader.fragment,null,u.pickShader.attributes)).attributes.position.location=0,l.attributes.id.location=1,l.attributes.vector.location=4,l),p=o(e,c(new Uint8Array([255,255,255,255]),[1,1,4]));p.generateMipmap(),p.minFilter=e.LINEAR_MIPMAP_LINEAR,p.magFilter=e.LINEAR;var m=n(e),g=n(e),y=n(e),v=n(e),x=n(e),b=a(e,[{buffer:m,type:e.FLOAT,size:4},{buffer:x,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:y,type:e.FLOAT,size:4},{buffer:v,type:e.FLOAT,size:2},{buffer:g,type:e.FLOAT,size:4}]),_=new d(e,p,h,f,m,g,x,y,v,b,r.traceType||"cone");return _.update(t),_}},614:function(e,t,r){var i=r(3236),n=i([`precision highp float; +}`]);t.bg=function(e){return n(e,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935(e,t,r){e.exports=function(e,t,r,a,s,l){var u=i(e),h=n(e,[{buffer:u,size:3}]),d=o(e);d.attributes.position.location=0;var f=new c(e,d,u,h);return f.update(t,r,a,s,l),f};var i=r(2762),n=r(8116),a=r(4359),o=r(1879).Q,s=window||S.global||{},l=s.__TEXT_CACHE||{};function c(e,t,r,i){this.gl=e,this.shader=t,this.buffer=r,this.vao=i,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}s.__TEXT_CACHE={};var u=c.prototype,h=[0,0];u.bind=function(e,t,r,i){this.vao.bind(),this.shader.bind();var n=this.shader.uniforms;n.model=e,n.view=t,n.projection=r,n.pixelScale=i,h[0]=this.gl.drawingBufferWidth,h[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=h},u.unbind=function(){this.vao.unbind()},u.update=function(e,t,r,i,n){var o=[];function s(e,t,r,i,n,s){var c=[r.style,r.weight,r.variant,r.family].join("_"),u=l[c];u||(u=l[c]={});var h=u[t];h||(h=u[t]=function(e,t){try{return a(e,t)}catch(t){return console.warn('error vectorizing text:"'+e+'" error:',t),{cells:[],positions:[]}}}(t,{triangles:!0,font:r.family,fontStyle:r.style,fontWeight:r.weight,fontVariant:r.variant,textAlign:"center",textBaseline:"middle",lineSpacing:n,styletags:s}));for(var d=(i||12)/12,f=h.positions,p=h.cells,m=0,g=p.length;m=0;--v){var x=f[y[v]];o.push(d*x[0],-d*x[1],e)}}for(var c=[0,0,0],u=[0,0,0],h=[0,0,0],d=[0,0,0],f={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},p=0;p<3;++p){h[p]=o.length/3|0,s(.5*(e[0][p]+e[1][p]),t[p],r[p],12,1.25,f),d[p]=(o.length/3|0)-h[p],c[p]=o.length/3|0;for(var m=0;m=0&&(n=r.length-i-1);var a=Math.pow(10,n),o=Math.round(e*t*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,c=o%a;o<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(o<0&&(u="-"+u),!n)return u;for(var h=""+c;h.length=e[0][n];--o)a.push({x:o*t[n],text:r(t[n],o)});i.push(a)}return i},t.equal=function(e,t){for(var r=0;r<3;++r){if(e[r].length!==t[r].length)return!1;for(var i=0;ir)throw Error("gl-buffer: If resizing buffer, must not specify offset");return e.bufferSubData(t,a,n),r}function u(e,t){for(var r=i.malloc(e.length,t),n=e.length,a=0;atypeof e.shape){var r,s=e.dtype;if(0>o.indexOf(s)&&(s="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER&&(s=gl.getExtension("OES_element_index_uint")&&"uint16"!==s?"uint32":"uint16"),s===e.dtype&&function(e,t){for(var r=1,i=t.length-1;i>=0;--i){if(t[i]!==r)return!1;r*=e[i]}return!0}(e.shape,e.stride))0===e.offset&&e.data.length===e.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,e.data,t):this.length=c(this.gl,this.type,this.length,this.usage,e.data.subarray(e.offset,e.shape[0]),t);else{var l=i.malloc(e.size,s),h=a(l,e.shape);n.assign(h,e),t<0?this.length=c(this.gl,this.type,this.length,this.usage,l,t):this.length=c(this.gl,this.type,this.length,this.usage,l.subarray(0,e.size),t),i.free(l)}}else if(Array.isArray(e))r=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(e,"uint16"):u(e,"float32"),t<0?this.length=c(this.gl,this.type,this.length,this.usage,r,t):this.length=c(this.gl,this.type,this.length,this.usage,r.subarray(0,e.length),t),i.free(r);else if("object"==typeof e&&"number"==typeof e.length)this.length=c(this.gl,this.type,this.length,this.usage,e,t);else if("number"==typeof e||void 0===e){if(t>=0)throw Error("gl-buffer: Cannot specify offset when resizing buffer");(e|=0)<=0&&(e=1),this.gl.bufferData(this.type,0|e,this.usage),this.length=e}else throw Error("gl-buffer: Invalid data type")},e.exports=function(e,t,r,i){if(r=r||e.ARRAY_BUFFER,i=i||e.DYNAMIC_DRAW,r!==e.ARRAY_BUFFER&&r!==e.ELEMENT_ARRAY_BUFFER)throw Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(i!==e.DYNAMIC_DRAW&&i!==e.STATIC_DRAW&&i!==e.STREAM_DRAW)throw Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var n=e.createBuffer(),a=new s(e,r,n,0,i);return a.update(t),a}},6405(e,t,r){var i=r(2931);e.exports=function(e,t){var r=e.positions,n=e.vectors,a={positions:[],vertexIntensity:[],vertexIntensityBounds:e.vertexIntensityBounds,vectors:[],cells:[],coneOffset:e.coneOffset,colormap:e.colormap};if(0===e.positions.length)return t&&(t[0]=[0,0,0],t[1]=[0,0,0]),a;for(var o=0,s=1/0,l=-1/0,c=1/0,u=-1/0,h=1/0,d=-1/0,f=null,p=null,m=[],g=1/0,y=!1,v="raw"===e.coneSizemode,x=0;xo&&(o=i.length(_)),x&&!v){var w=2*i.distance(f,b)/(i.length(p)+i.length(_));w?(g=Math.min(g,w),y=!1):y=!0}y||(f=b,p=_),m.push(_)}var T=[s,c,h],M=[l,u,d];t&&(t[0]=T,t[1]=M),0===o&&(o=1);var k=1/o;isFinite(g)||(g=1),a.vectorScale=g;var A=e.coneSize||(v?1:.5);e.absoluteConeSize&&(A=e.absoluteConeSize*k),a.coneScale=A;for(var x=0,S=0;x=1},f.isTransparent=function(){return this.opacity<1},f.pickSlots=1,f.setPickBase=function(e){this.pickId=e},f.update=function(e){e=e||{};var t=this.gl;this.dirty=!0,"lightPosition"in e&&(this.lightPosition=e.lightPosition),"opacity"in e&&(this.opacity=e.opacity),"ambient"in e&&(this.ambientLight=e.ambient),"diffuse"in e&&(this.diffuseLight=e.diffuse),"specular"in e&&(this.specularLight=e.specular),"roughness"in e&&(this.roughness=e.roughness),"fresnel"in e&&(this.fresnel=e.fresnel),void 0!==e.tubeScale&&(this.tubeScale=e.tubeScale),void 0!==e.vectorScale&&(this.vectorScale=e.vectorScale),void 0!==e.coneScale&&(this.coneScale=e.coneScale),void 0!==e.coneOffset&&(this.coneOffset=e.coneOffset),e.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=t.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=t.LINEAR,this.texture.setPixels(function(e){for(var t=u({colormap:e,nshades:256,format:"rgba"}),r=new Uint8Array(1024),i=0;i<256;++i){for(var n=t[i],a=0;a<3;++a)r[4*i+a]=n[a];r[4*i+3]=255*n[3]}return c(r,[256,256,4],[4,0,1])}(e.colormap)),this.texture.generateMipmap());var r=e.cells,i=e.positions,n=e.vectors;if(!(!i||!r||!n)){var a=[],o=[],s=[],l=[],h=[];this.cells=r,this.positions=i,this.vectors=n;var d=e.meshColor||[1,1,1,1],f=e.vertexIntensity,p=1/0,m=-1/0;if(f)if(e.vertexIntensityBounds)p=+e.vertexIntensityBounds[0],m=+e.vertexIntensityBounds[1];else for(var g=0;g0){var m=this.triShader;m.bind(),m.uniforms=c,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},f.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||h,i=e.view||h,n=e.projection||h,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(i),this._projection=[].slice.call(n),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:r,view:i,projection:n,clipBounds:a,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},f.pick=function(e){if(!e||e.id!==this.pickId)return null;var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],i=this.positions[r[1]].slice(0,3),n={position:i,dataCoordinate:i,index:Math.floor(r[1]/48)};return"cone"===this.traceType?n.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(n.intensity=this.intensity[r[1]],n.velocity=this.vectors[r[1]].slice(0,3),n.divergence=this.vectors[r[1]][3],n.index=t),n},f.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},e.exports=function(e,t,r){var s,l,u=r.shaders;1==arguments.length&&(e=(t=e).gl);var h=((s=i(e,u.meshShader.vertex,u.meshShader.fragment,null,u.meshShader.attributes)).attributes.position.location=0,s.attributes.color.location=2,s.attributes.uv.location=3,s.attributes.vector.location=4,s),f=((l=i(e,u.pickShader.vertex,u.pickShader.fragment,null,u.pickShader.attributes)).attributes.position.location=0,l.attributes.id.location=1,l.attributes.vector.location=4,l),p=o(e,c(new Uint8Array([255,255,255,255]),[1,1,4]));p.generateMipmap(),p.minFilter=e.LINEAR_MIPMAP_LINEAR,p.magFilter=e.LINEAR;var m=n(e),g=n(e),y=n(e),v=n(e),x=n(e),b=a(e,[{buffer:m,type:e.FLOAT,size:4},{buffer:x,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:y,type:e.FLOAT,size:4},{buffer:v,type:e.FLOAT,size:2},{buffer:g,type:e.FLOAT,size:4}]),_=new d(e,p,h,f,m,g,x,y,v,b,r.traceType||"cone");return _.update(t),_}},614(e,t,r){var i=r(3236),n=i([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -642,7 +642,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]);t.meshShader={vertex:n,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},t.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(e){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(e,t,r){var i=r(737);e.exports=function(e){return i[e]}},9165:function(e,t,r){e.exports=function(e){var t=e.gl,r=i(t),o=n(t,[{buffer:r,type:t.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:t.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:t.FLOAT,size:3,offset:28,stride:40}]),l=a(t);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(t,r,o,l);return c.update(e),c};var i=r(2762),n=r(8116),a=r(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(e,t,r,i){this.gl=e,this.shader=i,this.buffer=t,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(e,t){for(var r=0;r<3;++r)e[0][r]=Math.min(e[0][r],t[r]),e[1][r]=Math.max(e[1][r],t[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(e){var t=this.gl,r=this.shader.uniforms;this.shader.bind();var i=r.view=e.view||o,n=r.projection=e.projection||o;r.model=e.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=i[12],s=i[13],l=i[14],c=i[15],u=(e._ortho?2:1)*this.pixelRatio*(n[3]*a+n[7]*s+n[11]*l+n[15]*c)/t.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)t.lineWidth(this.lineWidth[h]*this.pixelRatio),r.capSize=this.capSize[h]*u,this.lineCount[h]&&t.drawArrays(t.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var u=function(){for(var e=[,,,],t=0;t<3;++t){for(var r=[],i=1;i<=2;++i)for(var n=-1;n<=1;n+=2){var a=[0,0,0];a[(i+t)%3]=n,r.push(a)}e[t]=r}return e}();function h(e,t,r,i){for(var n=u[i],a=0;a0){var m=u.slice();m[s]+=f[1][s],n.push(u[0],u[1],u[2],p[0],p[1],p[2],p[3],0,0,0,m[0],m[1],m[2],p[0],p[1],p[2],p[3],0,0,0),c(this.bounds,m),o+=2+h(n,m,p,s)}}}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(n)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},3436:function(e,t,r){var i=r(3236),n=r(9405),a=i([`precision highp float; +}`]);t.meshShader={vertex:n,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},t.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737(e){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171(e,t,r){var i=r(737);e.exports=function(e){return i[e]}},9165(e,t,r){e.exports=function(e){var t=e.gl,r=i(t),o=n(t,[{buffer:r,type:t.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:t.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:t.FLOAT,size:3,offset:28,stride:40}]),l=a(t);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(t,r,o,l);return c.update(e),c};var i=r(2762),n=r(8116),a=r(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(e,t,r,i){this.gl=e,this.shader=i,this.buffer=t,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(e,t){for(var r=0;r<3;++r)e[0][r]=Math.min(e[0][r],t[r]),e[1][r]=Math.max(e[1][r],t[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(e){var t=this.gl,r=this.shader.uniforms;this.shader.bind();var i=r.view=e.view||o,n=r.projection=e.projection||o;r.model=e.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=i[12],s=i[13],l=i[14],c=i[15],u=(e._ortho?2:1)*this.pixelRatio*(n[3]*a+n[7]*s+n[11]*l+n[15]*c)/t.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)t.lineWidth(this.lineWidth[h]*this.pixelRatio),r.capSize=this.capSize[h]*u,this.lineCount[h]&&t.drawArrays(t.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var u=function(){for(var e=[,,,],t=0;t<3;++t){for(var r=[],i=1;i<=2;++i)for(var n=-1;n<=1;n+=2){var a=[0,0,0];a[(i+t)%3]=n,r.push(a)}e[t]=r}return e}();function h(e,t,r,i){for(var n=u[i],a=0;a0){var m=u.slice();m[s]+=f[1][s],n.push(u[0],u[1],u[2],p[0],p[1],p[2],p[3],0,0,0,m[0],m[1],m[2],p[0],p[1],p[2],p[3],0,0,0),c(this.bounds,m),o+=2+h(n,m,p,s)}}}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(n)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},3436(e,t,r){var i=r(3236),n=r(9405),a=i([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; @@ -693,13 +693,13 @@ void main() { ) discard; gl_FragColor = opacity * fragColor; -}`]);e.exports=function(e){return n(e,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(e,t,r){var i=r(7766);e.exports=function(e,t,r,i){n||(n=e.FRAMEBUFFER_UNSUPPORTED,a=e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=e.getExtension("WEBGL_draw_buffers");if(!l&&c&&function(e,t){var r=e.getParameter(t.MAX_COLOR_ATTACHMENTS_WEBGL);l=Array(r+1);for(var i=0;i<=r;++i){for(var n=Array(r),a=0;au||r<0||r>u)throw Error("gl-fbo: Parameters are too large for FBO");var h=1;if("color"in(i=i||{})){if((h=Math.max(0|i.color,0))<0)throw Error("gl-fbo: Must specify a nonnegative number of colors");if(h>1)if(c){if(h>e.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw Error("gl-fbo: Context does not support "+h+" draw buffers")}else throw Error("gl-fbo: Multiple draw buffer extension not supported")}var d=e.UNSIGNED_BYTE,f=e.getExtension("OES_texture_float");if(i.float&&h>0){if(!f)throw Error("gl-fbo: Context does not support floating point textures");d=e.FLOAT}else i.preferFloat&&h>0&&f&&(d=e.FLOAT);var m=!0;"depth"in i&&(m=!!i.depth);var g=!1;return"stencil"in i&&(g=!!i.stencil),new p(e,t,r,d,h,m,g,c)};var n,a,o,s,l=null;function c(e){return[e.getParameter(e.FRAMEBUFFER_BINDING),e.getParameter(e.RENDERBUFFER_BINDING),e.getParameter(e.TEXTURE_BINDING_2D)]}function u(e,t){e.bindFramebuffer(e.FRAMEBUFFER,t[0]),e.bindRenderbuffer(e.RENDERBUFFER,t[1]),e.bindTexture(e.TEXTURE_2D,t[2])}function h(e){switch(e){case n:throw Error("gl-fbo: Framebuffer unsupported");case a:throw Error("gl-fbo: Framebuffer incomplete attachment");case o:throw Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw Error("gl-fbo: Framebuffer failed for unspecified reason")}}function d(e,t,r,n,a,o){if(!n)return null;var s=i(e,t,r,a,n);return s.magFilter=e.NEAREST,s.minFilter=e.NEAREST,s.mipSamples=1,s.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,o,e.TEXTURE_2D,s.handle,0),s}function f(e,t,r,i,n){var a=e.createRenderbuffer();return e.bindRenderbuffer(e.RENDERBUFFER,a),e.renderbufferStorage(e.RENDERBUFFER,i,t,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,a),a}function p(e,t,r,i,n,a,o,s){this.gl=e,this._shape=[0|t,0|r],this._destroyed=!1,this._ext=s,this.color=Array(n);for(var p=0;p1&&s.drawBuffersWEBGL(l[o]);var v=r.getExtension("WEBGL_depth_texture");v?p?e.depth=d(r,n,a,v.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m&&(e.depth=d(r,n,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):m&&p?e._depth_rb=f(r,n,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m?e._depth_rb=f(r,n,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):p&&(e._depth_rb=f(r,n,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){e._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(e.handle),e.handle=null,e.depth&&(e.depth.dispose(),e.depth=null),e._depth_rb&&(r.deleteRenderbuffer(e._depth_rb),e._depth_rb=null);for(var y=0;yn||r<0||r>n)throw Error("gl-fbo: Can't resize FBO, invalid dimensions");e._shape[0]=t,e._shape[1]=r;for(var a=c(i),o=0;ou||r<0||r>u)throw Error("gl-fbo: Parameters are too large for FBO");var h=1;if("color"in(i=i||{})){if((h=Math.max(0|i.color,0))<0)throw Error("gl-fbo: Must specify a nonnegative number of colors");if(h>1)if(c){if(h>e.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw Error("gl-fbo: Context does not support "+h+" draw buffers")}else throw Error("gl-fbo: Multiple draw buffer extension not supported")}var d=e.UNSIGNED_BYTE,f=e.getExtension("OES_texture_float");if(i.float&&h>0){if(!f)throw Error("gl-fbo: Context does not support floating point textures");d=e.FLOAT}else i.preferFloat&&h>0&&f&&(d=e.FLOAT);var m=!0;"depth"in i&&(m=!!i.depth);var g=!1;return"stencil"in i&&(g=!!i.stencil),new p(e,t,r,d,h,m,g,c)};var n,a,o,s,l=null;function c(e){return[e.getParameter(e.FRAMEBUFFER_BINDING),e.getParameter(e.RENDERBUFFER_BINDING),e.getParameter(e.TEXTURE_BINDING_2D)]}function u(e,t){e.bindFramebuffer(e.FRAMEBUFFER,t[0]),e.bindRenderbuffer(e.RENDERBUFFER,t[1]),e.bindTexture(e.TEXTURE_2D,t[2])}function h(e){switch(e){case n:throw Error("gl-fbo: Framebuffer unsupported");case a:throw Error("gl-fbo: Framebuffer incomplete attachment");case o:throw Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw Error("gl-fbo: Framebuffer failed for unspecified reason")}}function d(e,t,r,n,a,o){if(!n)return null;var s=i(e,t,r,a,n);return s.magFilter=e.NEAREST,s.minFilter=e.NEAREST,s.mipSamples=1,s.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,o,e.TEXTURE_2D,s.handle,0),s}function f(e,t,r,i,n){var a=e.createRenderbuffer();return e.bindRenderbuffer(e.RENDERBUFFER,a),e.renderbufferStorage(e.RENDERBUFFER,i,t,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,a),a}function p(e,t,r,i,n,a,o,s){this.gl=e,this._shape=[0|t,0|r],this._destroyed=!1,this._ext=s,this.color=Array(n);for(var p=0;p1&&s.drawBuffersWEBGL(l[o]);var v=r.getExtension("WEBGL_depth_texture");v?p?e.depth=d(r,n,a,v.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m&&(e.depth=d(r,n,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):m&&p?e._depth_rb=f(r,n,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m?e._depth_rb=f(r,n,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):p&&(e._depth_rb=f(r,n,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){e._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(e.handle),e.handle=null,e.depth&&(e.depth.dispose(),e.depth=null),e._depth_rb&&(r.deleteRenderbuffer(e._depth_rb),e._depth_rb=null);for(var y=0;yn||r<0||r>n)throw Error("gl-fbo: Can't resize FBO, invalid dimensions");e._shape[0]=t,e._shape[1]=r;for(var a=c(i),o=0;o0){for(var _=0;_<24;++_)r.push(r[r.length-12]);o+=2,f=!0}continue e}s[0][m]=Math.min(s[0][m],x[m],b[m]),s[1][m]=Math.max(s[1][m],x[m],b[m])}Array.isArray(h[0])?(g=h.length>p-1?h[p-1]:h.length>0?h[h.length-1]:[0,0,0,1],y=h.length>p?h[p]:h.length>0?h[h.length-1]:[0,0,0,1]):g=y=h,3===g.length&&(g=[g[0],g[1],g[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&g[3]<1&&(this.hasAlpha=!0),v=Array.isArray(d)?d.length>p-1?d[p-1]:d.length>0?d[d.length-1]:[0,0,0,1]:d;var w=a;if(a+=function(e,t){for(var r=0,i=0;i<3;++i){var n=e[i]-t[i];r+=n*n}return Math.sqrt(r)}(x,b),f){for(m=0;m<2;++m)r.push(x[0],x[1],x[2],b[0],b[1],b[2],w,v,g[0],g[1],g[2],g[3]);o+=2,f=!1}r.push(x[0],x[1],x[2],b[0],b[1],b[2],w,v,g[0],g[1],g[2],g[3],x[0],x[1],x[2],b[0],b[1],b[2],w,-v,g[0],g[1],g[2],g[3],b[0],b[1],b[2],x[0],x[1],x[2],a,-v,y[0],y[1],y[2],y[3],b[0],b[1],b[2],x[0],x[1],x[2],a,v,y[0],y[1],y[2],y[3]),o+=4}}if(this.buffer.update(r),i.push(a),n.push(u[u.length-1].slice()),this.bounds=s,this.vertexCount=o,this.points=n,this.arcLength=i,"dashes"in e){var T=e.dashes.slice();for(T.unshift(0),p=1;pMath.abs(m-_)&&1e-6>Math.abs(g-w)&&1e-6>Math.abs(y-T)?i(e):(p=1/Math.sqrt((h=m-_)*h+(d=g-w)*d+(f=y-T)*f),h*=p,d*=p,f*=p,(p=Math.sqrt((a=x*f-b*d)*a+(o=b*h-v*f)*o+(s=v*d-x*h)*s))?(a*=p=1/p,o*=p,s*=p):(a=0,o=0,s=0),(p=Math.sqrt((l=d*s-f*o)*l+(c=f*a-h*s)*c+(u=h*o-d*a)*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0),e[0]=a,e[1]=l,e[2]=h,e[3]=0,e[4]=o,e[5]=c,e[6]=d,e[7]=0,e[8]=s,e[9]=u,e[10]=f,e[11]=0,e[12]=-(a*m+o*g+s*y),e[13]=-(l*m+c*g+u*y),e[14]=-(h*m+d*g+f*y),e[15]=1,e)}},6760:function(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],m=t[12],g=t[13],y=t[14],v=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*i+b*s+_*h+w*m,e[1]=x*n+b*l+_*d+w*g,e[2]=x*a+b*c+_*f+w*y,e[3]=x*o+b*u+_*p+w*v,x=r[4],b=r[5],_=r[6],w=r[7],e[4]=x*i+b*s+_*h+w*m,e[5]=x*n+b*l+_*d+w*g,e[6]=x*a+b*c+_*f+w*y,e[7]=x*o+b*u+_*p+w*v,x=r[8],b=r[9],_=r[10],w=r[11],e[8]=x*i+b*s+_*h+w*m,e[9]=x*n+b*l+_*d+w*g,e[10]=x*a+b*c+_*f+w*y,e[11]=x*o+b*u+_*p+w*v,x=r[12],b=r[13],_=r[14],w=r[15],e[12]=x*i+b*s+_*h+w*m,e[13]=x*n+b*l+_*d+w*g,e[14]=x*a+b*c+_*f+w*y,e[15]=x*o+b*u+_*p+w*v,e}},4040:function(e){e.exports=function(e,t,r,i,n,a,o){var s=1/(t-r),l=1/(i-n),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(n+i)*l,e[14]=(o+a)*c,e[15]=1,e}},4772:function(e){e.exports=function(e,t,r,i,n){var a=1/Math.tan(t/2),o=1/(i-n);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+i)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*i*o,e[15]=0,e}},6079:function(e){e.exports=function(e,t,r,i){var n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w,T,M,k,A,S,E=i[0],C=i[1],L=i[2],P=Math.sqrt(E*E+C*C+L*L);return 1e-6>Math.abs(P)?null:(E*=P=1/P,C*=P,L*=P,n=Math.sin(r),o=1-(a=Math.cos(r)),s=t[0],l=t[1],c=t[2],u=t[3],h=t[4],d=t[5],f=t[6],p=t[7],m=t[8],g=t[9],y=t[10],v=t[11],x=E*E*o+a,b=C*E*o+L*n,_=L*E*o-C*n,w=E*C*o-L*n,T=C*C*o+a,M=L*C*o+E*n,k=E*L*o+C*n,A=C*L*o-E*n,S=L*L*o+a,e[0]=s*x+h*b+m*_,e[1]=l*x+d*b+g*_,e[2]=c*x+f*b+y*_,e[3]=u*x+p*b+v*_,e[4]=s*w+h*T+m*M,e[5]=l*w+d*T+g*M,e[6]=c*w+f*T+y*M,e[7]=u*w+p*T+v*M,e[8]=s*k+h*A+m*S,e[9]=l*k+d*A+g*S,e[10]=c*k+f*A+y*S,e[11]=u*k+p*A+v*S,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}},5567:function(e){e.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*n+c*i,e[5]=o*n+u*i,e[6]=s*n+h*i,e[7]=l*n+d*i,e[8]=c*n-a*i,e[9]=u*n-o*i,e[10]=h*n-s*i,e[11]=d*n-l*i,e}},2408:function(e){e.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n-c*i,e[1]=o*n-u*i,e[2]=s*n-h*i,e[3]=l*n-d*i,e[8]=a*i+c*n,e[9]=o*i+u*n,e[10]=s*i+h*n,e[11]=l*i+d*n,e}},7089:function(e){e.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],h=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n+c*i,e[1]=o*n+u*i,e[2]=s*n+h*i,e[3]=l*n+d*i,e[4]=c*n-a*i,e[5]=u*n-o*i,e[6]=h*n-s*i,e[7]=d*n-l*i,e}},2504:function(e){e.exports=function(e,t,r){var i=r[0],n=r[1],a=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},7656:function(e){e.exports=function(e,t,r){var i,n,a,o,s,l,c,u,h,d,f,p,m=r[0],g=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*y+t[12],e[13]=t[1]*m+t[5]*g+t[9]*y+t[13],e[14]=t[2]*m+t[6]*g+t[10]*y+t[14],e[15]=t[3]*m+t[7]*g+t[11]*y+t[15]):(i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=i,e[1]=n,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=i*m+s*g+h*y+t[12],e[13]=n*m+l*g+d*y+t[13],e[14]=a*m+c*g+f*y+t[14],e[15]=o*m+u*g+p*y+t[15]),e}},5665:function(e){e.exports=function(e,t){if(e===t){var r=t[1],i=t[2],n=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=i,e[9]=a,e[11]=t[14],e[12]=n,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},7626:function(e,t,r){var i=r(2642),n=r(9346);function a(e,t){for(var r=[0,0,0,0],i=0;i<4;++i)for(var n=0;n<4;++n)r[n]+=e[4*i+n]*t[i];return r}e.exports=function(e,t,r,o,s,l){if(1===e.length)return[0,e[0].slice()];for(var c=Array(e.length),u=0;u1.0001)return null;g+=m[u]}return Math.abs(g-1)>.001?null:[h,function(e,t){for(var r=[0,0,0],i=0;i0){for(var _=0;_<24;++_)r.push(r[r.length-12]);o+=2,f=!0}continue e}s[0][m]=Math.min(s[0][m],x[m],b[m]),s[1][m]=Math.max(s[1][m],x[m],b[m])}Array.isArray(h[0])?(g=h.length>p-1?h[p-1]:h.length>0?h[h.length-1]:[0,0,0,1],y=h.length>p?h[p]:h.length>0?h[h.length-1]:[0,0,0,1]):g=y=h,3===g.length&&(g=[g[0],g[1],g[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&g[3]<1&&(this.hasAlpha=!0),v=Array.isArray(d)?d.length>p-1?d[p-1]:d.length>0?d[d.length-1]:[0,0,0,1]:d;var w=a;if(a+=function(e,t){for(var r=0,i=0;i<3;++i){var n=e[i]-t[i];r+=n*n}return Math.sqrt(r)}(x,b),f){for(m=0;m<2;++m)r.push(x[0],x[1],x[2],b[0],b[1],b[2],w,v,g[0],g[1],g[2],g[3]);o+=2,f=!1}r.push(x[0],x[1],x[2],b[0],b[1],b[2],w,v,g[0],g[1],g[2],g[3],x[0],x[1],x[2],b[0],b[1],b[2],w,-v,g[0],g[1],g[2],g[3],b[0],b[1],b[2],x[0],x[1],x[2],a,-v,y[0],y[1],y[2],y[3],b[0],b[1],b[2],x[0],x[1],x[2],a,v,y[0],y[1],y[2],y[3]),o+=4}}if(this.buffer.update(r),i.push(a),n.push(u[u.length-1].slice()),this.bounds=s,this.vertexCount=o,this.points=n,this.arcLength=i,"dashes"in e){var T=e.dashes.slice();for(T.unshift(0),p=1;pMath.abs(m-_)&&1e-6>Math.abs(g-w)&&1e-6>Math.abs(y-T)?i(e):(p=1/Math.sqrt((h=m-_)*h+(d=g-w)*d+(f=y-T)*f),h*=p,d*=p,f*=p,(p=Math.sqrt((a=x*f-b*d)*a+(o=b*h-v*f)*o+(s=v*d-x*h)*s))?(a*=p=1/p,o*=p,s*=p):(a=0,o=0,s=0),(p=Math.sqrt((l=d*s-f*o)*l+(c=f*a-h*s)*c+(u=h*o-d*a)*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0),e[0]=a,e[1]=l,e[2]=h,e[3]=0,e[4]=o,e[5]=c,e[6]=d,e[7]=0,e[8]=s,e[9]=u,e[10]=f,e[11]=0,e[12]=-(a*m+o*g+s*y),e[13]=-(l*m+c*g+u*y),e[14]=-(h*m+d*g+f*y),e[15]=1,e)}},6760(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],m=t[12],g=t[13],y=t[14],v=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*i+b*s+_*h+w*m,e[1]=x*n+b*l+_*d+w*g,e[2]=x*a+b*c+_*f+w*y,e[3]=x*o+b*u+_*p+w*v,x=r[4],b=r[5],_=r[6],w=r[7],e[4]=x*i+b*s+_*h+w*m,e[5]=x*n+b*l+_*d+w*g,e[6]=x*a+b*c+_*f+w*y,e[7]=x*o+b*u+_*p+w*v,x=r[8],b=r[9],_=r[10],w=r[11],e[8]=x*i+b*s+_*h+w*m,e[9]=x*n+b*l+_*d+w*g,e[10]=x*a+b*c+_*f+w*y,e[11]=x*o+b*u+_*p+w*v,x=r[12],b=r[13],_=r[14],w=r[15],e[12]=x*i+b*s+_*h+w*m,e[13]=x*n+b*l+_*d+w*g,e[14]=x*a+b*c+_*f+w*y,e[15]=x*o+b*u+_*p+w*v,e}},4040(e){e.exports=function(e,t,r,i,n,a,o){var s=1/(t-r),l=1/(i-n),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(n+i)*l,e[14]=(o+a)*c,e[15]=1,e}},4772(e){e.exports=function(e,t,r,i,n){var a=1/Math.tan(t/2),o=1/(i-n);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+i)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*i*o,e[15]=0,e}},6079(e){e.exports=function(e,t,r,i){var n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w,T,M,k,A,S,E=i[0],C=i[1],L=i[2],P=Math.sqrt(E*E+C*C+L*L);return 1e-6>Math.abs(P)?null:(E*=P=1/P,C*=P,L*=P,n=Math.sin(r),o=1-(a=Math.cos(r)),s=t[0],l=t[1],c=t[2],u=t[3],h=t[4],d=t[5],f=t[6],p=t[7],m=t[8],g=t[9],y=t[10],v=t[11],x=E*E*o+a,b=C*E*o+L*n,_=L*E*o-C*n,w=E*C*o-L*n,T=C*C*o+a,M=L*C*o+E*n,k=E*L*o+C*n,A=C*L*o-E*n,S=L*L*o+a,e[0]=s*x+h*b+m*_,e[1]=l*x+d*b+g*_,e[2]=c*x+f*b+y*_,e[3]=u*x+p*b+v*_,e[4]=s*w+h*T+m*M,e[5]=l*w+d*T+g*M,e[6]=c*w+f*T+y*M,e[7]=u*w+p*T+v*M,e[8]=s*k+h*A+m*S,e[9]=l*k+d*A+g*S,e[10]=c*k+f*A+y*S,e[11]=u*k+p*A+v*S,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}},5567(e){e.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*n+c*i,e[5]=o*n+u*i,e[6]=s*n+h*i,e[7]=l*n+d*i,e[8]=c*n-a*i,e[9]=u*n-o*i,e[10]=h*n-s*i,e[11]=d*n-l*i,e}},2408(e){e.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n-c*i,e[1]=o*n-u*i,e[2]=s*n-h*i,e[3]=l*n-d*i,e[8]=a*i+c*n,e[9]=o*i+u*n,e[10]=s*i+h*n,e[11]=l*i+d*n,e}},7089(e){e.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],h=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n+c*i,e[1]=o*n+u*i,e[2]=s*n+h*i,e[3]=l*n+d*i,e[4]=c*n-a*i,e[5]=u*n-o*i,e[6]=h*n-s*i,e[7]=d*n-l*i,e}},2504(e){e.exports=function(e,t,r){var i=r[0],n=r[1],a=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},7656(e){e.exports=function(e,t,r){var i,n,a,o,s,l,c,u,h,d,f,p,m=r[0],g=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*y+t[12],e[13]=t[1]*m+t[5]*g+t[9]*y+t[13],e[14]=t[2]*m+t[6]*g+t[10]*y+t[14],e[15]=t[3]*m+t[7]*g+t[11]*y+t[15]):(i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=i,e[1]=n,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=i*m+s*g+h*y+t[12],e[13]=n*m+l*g+d*y+t[13],e[14]=a*m+c*g+f*y+t[14],e[15]=o*m+u*g+p*y+t[15]),e}},5665(e){e.exports=function(e,t){if(e===t){var r=t[1],i=t[2],n=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=i,e[9]=a,e[11]=t[14],e[12]=n,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},7626(e,t,r){var i=r(2642),n=r(9346);function a(e,t){for(var r=[0,0,0,0],i=0;i<4;++i)for(var n=0;n<4;++n)r[n]+=e[4*i+n]*t[i];return r}e.exports=function(e,t,r,o,s,l){if(1===e.length)return[0,e[0].slice()];for(var c=Array(e.length),u=0;u1.0001)return null;g+=m[u]}return Math.abs(g-1)>.001?null:[h,function(e,t){for(var r=[0,0,0],i=0;ie&&r>0){var i=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-i)+i*t[r-1][1]}}return 1}M.isOpaque=function(){return!this.hasAlpha},M.isTransparent=function(){return this.hasAlpha},M.pickSlots=1,M.setPickBase=function(e){this.pickId=e},M.highlight=function(e){if(!e||!this.contourEnable){this.contourCount=0;return}for(var t=d(this.cells,this.intensity,e.intensity),r=t.cells,i=t.vertexIds,n=t.vertexWeights,a=r.length,o=f.mallocFloat32(6*a),s=0,l=0;l0){var p=this.triShader;p.bind(),p.uniforms=s,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var p=this.lineShader;p.bind(),p.uniforms=s,this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()}if(this.pointCount>0){var p=this.pointShader;p.bind(),p.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var p=this.contourShader;p.bind(),p.uniforms=s,this.contourVAO.bind(),t.drawArrays(t.LINES,0,this.contourCount),this.contourVAO.unbind()}},M.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||w,i=e.view||w,n=e.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(i),this._projection=[].slice.call(n),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:r,view:i,projection:n,clipBounds:a,pickId:this.pickId/255},l=this.pickShader;if(l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0){var l=this.pointPickShader;l.bind(),l.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind()}},M.pick=function(e){if(!e||e.id!==this.pickId)return null;for(var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],i=this.positions,n=Array(r.length),a=0;aMath.abs(t))c.rotate(a,0,0,-e*r*Math.PI*p.rotateSpeed/window.innerWidth);else if(!p._ortho){var o=-p.zoomSpeed*n*t/window.innerHeight*(a-c.lastT())/20;c.pan(a,0,0,h*(Math.exp(o)-1))}}},!0)},p.enableMouseListeners(),p};var i=r(3025),n=r(6296),a=r(351),o=r(8512),s=r(24),l=r(7520)},799:function(e,t,r){var i=r(3236),n=r(9405),a=i([`precision mediump float; +`]);t.meshShader={vertex:n,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},t.pickShader={vertex:u,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},t.pointPickShader={vertex:d,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},t.contourShader={vertex:f,fragment:p,attributes:[{name:"position",type:"vec3"}]}},7201(e,t,r){var i=r(9405),n=r(2762),a=r(8116),o=r(7766),s=r(8406),l=r(6760),c=r(7608),u=r(9618),h=r(6729),d=r(7765),f=r(1888),p=r(840),m=r(7626),g=p.meshShader,y=p.wireShader,v=p.pointShader,x=p.pickShader,b=p.pointPickShader,_=p.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function T(e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,T,M,k,A,S){this.gl=e,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=t,this.dirty=!0,this.triShader=r,this.lineShader=i,this.pointShader=n,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=d,this.triangleUVs=h,this.triangleIds=c,this.triangleVAO=f,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=g,this.edgeUVs=y,this.edgeIds=m,this.edgeVAO=v,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=T,this.pointSizes=M,this.pointIds=b,this.pointVAO=k,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=A,this.contourVAO=S,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=w,this._view=w,this._projection=w,this._resolution=[1,1]}var M=T.prototype;function k(e,t){if(!t||!t.length)return 1;for(var r=0;re&&r>0){var i=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-i)+i*t[r-1][1]}}return 1}M.isOpaque=function(){return!this.hasAlpha},M.isTransparent=function(){return this.hasAlpha},M.pickSlots=1,M.setPickBase=function(e){this.pickId=e},M.highlight=function(e){if(!e||!this.contourEnable){this.contourCount=0;return}for(var t=d(this.cells,this.intensity,e.intensity),r=t.cells,i=t.vertexIds,n=t.vertexWeights,a=r.length,o=f.mallocFloat32(6*a),s=0,l=0;l0){var p=this.triShader;p.bind(),p.uniforms=s,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var p=this.lineShader;p.bind(),p.uniforms=s,this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()}if(this.pointCount>0){var p=this.pointShader;p.bind(),p.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var p=this.contourShader;p.bind(),p.uniforms=s,this.contourVAO.bind(),t.drawArrays(t.LINES,0,this.contourCount),this.contourVAO.unbind()}},M.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||w,i=e.view||w,n=e.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(i),this._projection=[].slice.call(n),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:r,view:i,projection:n,clipBounds:a,pickId:this.pickId/255},l=this.pickShader;if(l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0){var l=this.pointPickShader;l.bind(),l.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind()}},M.pick=function(e){if(!e||e.id!==this.pickId)return null;for(var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],i=this.positions,n=Array(r.length),a=0;aMath.abs(t))c.rotate(a,0,0,-e*r*Math.PI*p.rotateSpeed/window.innerWidth);else if(!p._ortho){var o=-p.zoomSpeed*n*t/window.innerHeight*(a-c.lastT())/20;c.pan(a,0,0,h*(Math.exp(o)-1))}}},!0)},p.enableMouseListeners(),p};var i=r(3025),n=r(6296),a=r(351),o=r(8512),s=r(24),l=r(7520)},799(e,t,r){var i=r(3236),n=r(9405),a=i([`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); -}`]);e.exports=function(e){return n(e,a,o,null,[{name:"position",type:"vec2"}])}},4100:function(e,t,r){var i=r(4437),n=r(3837),a=r(5445),o=r(4449),s=r(3589),l=r(2260),c=r(7169),u=r(351),h=r(4772),d=r(4040),f=r(799),p=r(9216)({tablet:!0,featureDetect:!0});function m(){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 g(e){return"boolean"!=typeof e||e}e.exports={createScene:function(e){(e=e||{}).camera=e.camera||{};var t=e.canvas;t||((t=document.createElement("canvas"),e.container)?e.container.appendChild(t):document.body.appendChild(t));var r=e.gl;if(r||(e.glOptions&&(p=!!e.glOptions.preserveDrawingBuffer),r=function(e,t){var r=null;try{(r=e.getContext("webgl",t))||(r=e.getContext("experimental-webgl",t))}catch{return null}return r}(t,e.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:p})),!r)throw Error("webgl not supported");var y=e.bounds||[[-10,-10,-10],[10,10,10]],v=new m,x=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!p}),b=f(r),_=e.cameraObject&&!0===e.cameraObject._ortho||e.camera.projection&&"orthographic"===e.camera.projection.type||!1,w={eye:e.camera.eye||[2,0,0],center:e.camera.center||[0,0,0],up:e.camera.up||[0,1,0],zoomMin:e.camera.zoomMax||.1,zoomMax:e.camera.zoomMin||100,mode:e.camera.mode||"turntable",_ortho:_},T=e.axes||{},M=n(r,T);M.enable=!T.disable;var k=e.spikes||{},A=o(r,k),S=[],E=[],C=[],L=[],P=!0,I=!0,z={view:null,projection:Array(16),model:Array(16),_ortho:!1},I=!0,D=[r.drawingBufferWidth,r.drawingBufferHeight],O=e.cameraObject||i(t,w),R={gl:r,contextLost:!1,pixelRatio:e.pixelRatio||1,canvas:t,selection:v,camera:O,axes:M,axesPixels:null,spikes:A,bounds:y,objects:S,shape:D,aspect:e.aspectRatio||[1,1,1],pickRadius:e.pickRadius||10,zNear:e.zNear||.01,zFar:e.zFar||1e3,fovy:e.fovy||Math.PI/4,clearColor:e.clearColor||[0,0,0,0],autoResize:g(e.autoResize),autoBounds:g(e.autoBounds),autoScale:!!e.autoScale,autoCenter:g(e.autoCenter),clipToBounds:g(e.clipToBounds),snapToData:!!e.snapToData,onselect:e.onselect||null,onrender:e.onrender||null,onclick:e.onclick||null,cameraParams:z,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(e){this.aspect[0]=e.x,this.aspect[1]=e.y,this.aspect[2]=e.z,I=!0},setBounds:function(e,t){this.bounds[0][e]=t.min,this.bounds[1][e]=t.max},setClearColor:function(e){this.clearColor=e},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},F=[r.drawingBufferWidth/R.pixelRatio|0,r.drawingBufferHeight/R.pixelRatio|0];function j(){if(!R._stopped&&R.autoResize){var e=t.parentNode,r=1,i=1;e&&e!==document.body?(r=e.clientWidth,i=e.clientHeight):(r=window.innerWidth,i=window.innerHeight);var n=0|Math.ceil(r*R.pixelRatio),a=0|Math.ceil(i*R.pixelRatio);if(n!==t.width||a!==t.height){t.width=n,t.height=a;var o=t.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=i+"px",P=!0}}}function B(){for(var e=S.length,t=L.length,i=0;i0&&0===C[t-1];)C.pop(),L.pop().dispose()}function N(){if(R.contextLost)return!0;r.isContextLost()&&(R.contextLost=!0,R.mouseListener.enabled=!1,R.selection.object=null,R.oncontextloss&&R.oncontextloss())}R.autoResize&&j(),window.addEventListener("resize",j),R.update=function(e){R._stopped||(e=e||{},P=!0,I=!0)},R.add=function(e){R._stopped||(e.axes=M,S.push(e),E.push(-1),P=!0,I=!0,B())},R.remove=function(e){if(!R._stopped){var t=S.indexOf(e);t<0||(S.splice(t,1),E.pop(),P=!0,I=!0,B())}},R.dispose=function(){if(!R._stopped&&(R._stopped=!0,window.removeEventListener("resize",j),t.removeEventListener("webglcontextlost",N),R.mouseListener.enabled=!1,!R.contextLost)){M.dispose(),A.dispose();for(var e=0;ev.distance)continue;for(var c=0;c0){var r=Math.round(Math.pow(10,t));return Math.ceil(e/r)*r}return Math.ceil(e)}((m[1][o]-m[0][o])/10);M.autoTicks?M.update({bounds:m,tickSpacing:w}):M.update({bounds:m})}var T=r.drawingBufferWidth,k=r.drawingBufferHeight;D[0]=T,D[1]=k,F[0]=0|Math.max(T/R.pixelRatio,1),F[1]=0|Math.max(k/R.pixelRatio,1),function(e,t){var r=e.bounds,i=e.cameraParams,n=i.projection,a=i.model,o=e.gl.drawingBufferWidth,s=e.gl.drawingBufferHeight,l=e.zNear,c=e.zFar,u=e.fovy,f=o/s;t?(d(n,-f,f,-1,1,l,c),i._ortho=!0):(h(n,u,f,l,c),i._ortho=!1);for(var p=0;p<16;++p)a[p]=0;a[15]=1;for(var m=0,p=0;p<3;++p)m=Math.max(m,r[1][p]-r[0][p]);for(var p=0;p<3;++p)e.autoScale?a[5*p]=e.aspect[p]/(r[1][p]-r[0][p]):a[5*p]=1/m,e.autoCenter&&(a[12+p]=-(.5*a[5*p])*(r[0][p]+r[1][p]))}(R,_);for(var o=0;o1e-6?(o=Math.sin(n=Math.acos(a)),s=Math.sin((1-i)*n)/o,l=Math.sin(i*n)/o):(s=1-i,l=i),e[0]=s*c+l*f,e[1]=s*u+l*p,e[2]=s*h+l*m,e[3]=s*d+l*g,e}},5964:function(e){e.exports=function(e){return e||0===e?e.toString():""}},9366:function(e,t,r){var i=r(4359);e.exports=function(e,t,r){var a=[t.style,t.weight,t.variant,t.family].join("_"),o=n[a];if(o||(o=n[a]={}),e in o)return o[e];var s={textAlign:"center",textBaseline:"middle",lineHeight:1,font:t.family,fontStyle:t.style,fontWeight:t.weight,fontVariant:t.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};s.triangles=!0;var l=i(e,s);s.triangles=!1;var c,u,h=i(e,s);if(r&&1!==r){for(c=0;c0&&0===C[t-1];)C.pop(),L.pop().dispose()}function N(){if(R.contextLost)return!0;r.isContextLost()&&(R.contextLost=!0,R.mouseListener.enabled=!1,R.selection.object=null,R.oncontextloss&&R.oncontextloss())}R.autoResize&&j(),window.addEventListener("resize",j),R.update=function(e){R._stopped||(e=e||{},P=!0,I=!0)},R.add=function(e){R._stopped||(e.axes=M,S.push(e),E.push(-1),P=!0,I=!0,B())},R.remove=function(e){if(!R._stopped){var t=S.indexOf(e);t<0||(S.splice(t,1),E.pop(),P=!0,I=!0,B())}},R.dispose=function(){if(!R._stopped&&(R._stopped=!0,window.removeEventListener("resize",j),t.removeEventListener("webglcontextlost",N),R.mouseListener.enabled=!1,!R.contextLost)){M.dispose(),A.dispose();for(var e=0;ev.distance)continue;for(var c=0;c0){var r=Math.round(Math.pow(10,t));return Math.ceil(e/r)*r}return Math.ceil(e)}((m[1][o]-m[0][o])/10);M.autoTicks?M.update({bounds:m,tickSpacing:w}):M.update({bounds:m})}var T=r.drawingBufferWidth,k=r.drawingBufferHeight;D[0]=T,D[1]=k,F[0]=0|Math.max(T/R.pixelRatio,1),F[1]=0|Math.max(k/R.pixelRatio,1),function(e,t){var r=e.bounds,i=e.cameraParams,n=i.projection,a=i.model,o=e.gl.drawingBufferWidth,s=e.gl.drawingBufferHeight,l=e.zNear,c=e.zFar,u=e.fovy,f=o/s;t?(d(n,-f,f,-1,1,l,c),i._ortho=!0):(h(n,u,f,l,c),i._ortho=!1);for(var p=0;p<16;++p)a[p]=0;a[15]=1;for(var m=0,p=0;p<3;++p)m=Math.max(m,r[1][p]-r[0][p]);for(var p=0;p<3;++p)e.autoScale?a[5*p]=e.aspect[p]/(r[1][p]-r[0][p]):a[5*p]=1/m,e.autoCenter&&(a[12+p]=-(.5*a[5*p])*(r[0][p]+r[1][p]))}(R,_);for(var o=0;o1e-6?(o=Math.sin(n=Math.acos(a)),s=Math.sin((1-i)*n)/o,l=Math.sin(i*n)/o):(s=1-i,l=i),e[0]=s*c+l*f,e[1]=s*u+l*p,e[2]=s*h+l*m,e[3]=s*d+l*g,e}},5964(e){e.exports=function(e){return e||0===e?e.toString():""}},9366(e,t,r){var i=r(4359);e.exports=function(e,t,r){var a=[t.style,t.weight,t.variant,t.family].join("_"),o=n[a];if(o||(o=n[a]={}),e in o)return o[e];var s={textAlign:"center",textBaseline:"middle",lineHeight:1,font:t.family,fontStyle:t.style,fontWeight:t.weight,fontVariant:t.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};s.triangles=!0;var l=i(e,s);s.triangles=!1;var c,u,h=i(e,s);if(r&&1!==r){for(c=0;c1?1:e}function x(e,t,r,i,n,a,o,s,l,c,u,h){this.gl=e,this.pixelRatio=1,this.shader=t,this.orthoShader=r,this.projectShader=i,this.pointBuffer=n,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,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=c,this.pickOrthoShader=u,this.pickProjectShader=h,this.points=[],this._selectResult=new y(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}e.exports=function(e){var t=e.gl,r=l.createPerspective(t),i=l.createOrtho(t),o=l.createProject(t),s=l.createPickPerspective(t),c=l.createPickOrtho(t),u=l.createPickProject(t),h=n(t),d=n(t),f=n(t),p=n(t),m=a(t,[{buffer:h,size:3,type:t.FLOAT},{buffer:d,size:4,type:t.FLOAT},{buffer:f,size:2,type:t.FLOAT},{buffer:p,size:4,type:t.UNSIGNED_BYTE,normalized:!0}]),g=new x(t,r,i,o,h,d,f,p,m,s,c,u);return g.update(e),g};var b=x.prototype;b.pickSlots=1,b.setPickBase=function(e){this.pickId=e},b.isTransparent=function(){if(this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&this.projectHasAlpha)return!0;return!1},b.isOpaque=function(){if(!this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&!this.projectHasAlpha)return!0;return!1};var _=[0,0],w=[0,0,0],T=[0,0,0],M=[0,0,0,1],k=[0,0,0,1],A=h.slice(),S=[0,0,0],E=[[0,0,0],[0,0,0]];function C(e){return e[0]=e[1]=e[2]=0,e}function L(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=1,e}function P(e,t,r,i){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[r]=i,e}var I=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function z(e,t,r,i,n,a,o){var l=r.gl;if((a===r.projectHasAlpha||o)&&function(e,t,r,i){var n,a=t.axesProject,o=t.gl,l=e.uniforms,c=r.model||h,u=r.view||h,d=r.projection||h,f=t.axesBounds,p=function(e){for(var t=0;t<2;++t)for(var r=0;r<3;++r)E[t][r]=Math.max(Math.min(e[t][r],1e8),-1e8);return E}(t.clipBounds);n=t.axes&&t.axes.lastCubeProps?t.axes.lastCubeProps.axis:[1,1,1],_[0]=2/o.drawingBufferWidth,_[1]=2/o.drawingBufferHeight,e.bind(),l.view=u,l.projection=d,l.screenSize=_,l.highlightId=t.highlightId,l.highlightScale=t.highlightScale,l.clipBounds=p,l.pickGroup=t.pickId/255,l.pixelRatio=i;for(var m=0;m<3;++m)if(a[m]){l.scale=t.projectScale[m],l.opacity=t.projectOpacity[m];for(var y=0;y<16;++y)A[y]=0;for(var y=0;y<4;++y)A[5*y]=1;A[5*m]=0,n[m]<0?A[12+m]=f[0][m]:A[12+m]=f[1][m],s(A,c,A),l.model=A;var v=(m+1)%3,x=(m+2)%3,b=C(w),I=C(T);b[v]=1,I[x]=1;var z=g(d,u,c,L(M,b)),D=g(d,u,c,L(k,I));if(Math.abs(z[1])>Math.abs(D[1])){var O=z;z=D,D=O,O=b,b=I,I=O;var R=v;v=x,x=R}z[0]<0&&(b[v]=-1),D[1]>0&&(I[x]=-1);for(var F=0,j=0,y=0;y<4;++y)F+=Math.pow(c[4*v+y],2),j+=Math.pow(c[4*x+y],2);b[v]/=Math.sqrt(F),I[x]/=Math.sqrt(j),l.axes[0]=b,l.axes[1]=I,l.fragClipBounds[0]=P(S,p[0],m,-1e8),l.fragClipBounds[1]=P(S,p[1],m,1e8),t.vao.bind(),t.vao.draw(o.TRIANGLES,t.vertexCount),t.lineWidth>0&&(o.lineWidth(t.lineWidth*i),t.vao.draw(o.LINES,t.lineVertexCount,t.vertexCount)),t.vao.unbind()}}(t,r,i,n),a===r.hasAlpha||o){e.bind();var c=e.uniforms;c.model=i.model||h,c.view=i.view||h,c.projection=i.projection||h,_[0]=2/l.drawingBufferWidth,_[1]=2/l.drawingBufferHeight,c.screenSize=_,c.highlightId=r.highlightId,c.highlightScale=r.highlightScale,c.fragClipBounds=I,c.clipBounds=r.axes.bounds,c.opacity=r.opacity,c.pickGroup=r.pickId/255,c.pixelRatio=n,r.vao.bind(),r.vao.draw(l.TRIANGLES,r.vertexCount),r.lineWidth>0&&(l.lineWidth(r.lineWidth*n),r.vao.draw(l.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function D(e,t,r,n){var a=u(a=p(e)?t=this.pointCount||t<0)return null;var r=this.points[t],i=this._selectResult;i.index=t;for(var n=0;n<3;++n)i.position[n]=i.dataCoordinate[n]=r[n];return i},b.highlight=function(e){if(e){var t=e.index;this.highlightId=[(255&t)/255,(t>>8&255)/255,(t>>16&255)/255,0]}else this.highlightId=[1,1,1,1]},b.update=function(e){if("perspective"in(e=e||{})&&(this.useOrtho=!e.perspective),"orthographic"in e&&(this.useOrtho=!!e.orthographic),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"project"in e)if(p(e.project))this.axesProject=e.project;else{var t=!!e.project;this.axesProject=[t,t,t]}if("projectScale"in e)if(p(e.projectScale))this.projectScale=e.projectScale.slice();else{var r=+e.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in e){if(p(e.projectOpacity))this.projectOpacity=e.projectOpacity.slice();else{var r=+e.projectOpacity;this.projectOpacity=[r,r,r]}for(var i=0;i<3;++i)this.projectOpacity[i]=v(this.projectOpacity[i]),this.projectOpacity[i]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in e&&(this.opacity=v(e.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var n,a,s=e.position,l={family:e.font||"normal",style:e.fontStyle||"normal",weight:e.fontWeight||"normal",variant:e.fontVariant||"normal"},c=e.alignment||[0,0];if(2===c.length)n=c[0],a=c[1];else{n=[],a=[];for(var i=0;i0){var O=0,R=b,F=[0,0,0,1],j=[0,0,0,1],B=p(f)&&p(f[0]),N=p(y)&&p(y[0]);e:for(var i=0;i0?1-E[0][0]:Z<0?1+E[1][0]:1,Y*=Y>0?1-E[0][1]:Y<0?1+E[1][1]:1;for(var $=[Z,Y],X=A.cells||[],K=A.positions||[],M=0;Mthis.buffer.length){n.free(this.buffer);for(var i=this.buffer=n.mallocUint8(o(r*t*4)),a=0;ar)for(e=r;et)for(e=t;e=0){for(var T=0|w.type.charAt(w.type.length-1),M=Array(T),k=0;k=0;)A+=1;_[v]=A}var S=Array(r.length);function E(){d.program=o.program(f,d._vref,d._fref,b,_);for(var e=0;e=0){var f=h.charCodeAt(h.length-1)-48;if(f<2||f>4)throw new i("","Invalid data type for attribute "+u+": "+h);s(e,t,d[0],n,f,a,u)}else if(h.indexOf("mat")>=0){var f=h.charCodeAt(h.length-1)-48;if(f<2||f>4)throw new i("","Invalid data type for attribute "+u+": "+h);!function(e,t,r,i,n,a,o){for(var l=Array(n),c=Array(n),u=0;u4)throw new n("","Invalid data type");switch(y.charAt(0)){case"b":case"i":e["uniform"+g+"iv"](s[u],h);break;case"v":e["uniform"+g+"fv"](s[u],h);break;default:throw new n("","Unrecognized data type for vector "+name+": "+y)}}else if(0===y.indexOf("mat")&&4===y.length){if((g=y.charCodeAt(y.length-1)-48)<2||g>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+y);e["uniformMatrix"+g+"fv"](s[u],!1,h);break}else throw new n("","Unknown uniform data type for "+name+": "+y)}}}}}function c(e,t,i){if("object"==typeof i)Object.defineProperty(e,t,{get:a(u(i)),set:l(i),enumerable:!0,configurable:!1});else s[i]?Object.defineProperty(e,t,{get:function(e,t,r){return e.getUniform(t.program,r[i])},set:l(i),enumerable:!0,configurable:!1}):e[t]=function(e){switch(e){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var t=e.indexOf("vec");if(0<=t&&t<=1&&e.length===4+t){var r=e.charCodeAt(e.length-1)-48;if(r<2||r>4)throw new n("","Invalid data type");return"b"===e.charAt(0)?o(r,!1):o(r,0)}if(0===e.indexOf("mat")&&4===e.length){var r=e.charCodeAt(e.length-1)-48;if(r<2||r>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+e);return o(r*r,0)}throw new n("","Unknown uniform data type for "+name+": "+e)}}(r[i].type)}function u(e){var t;if(Array.isArray(e)){t=Array(e.length);for(var r=0;r1){l[0]in o||(o[l[0]]=[]),o=o[l[0]];for(var c=1;c1)for(var l=0;l"u"?r(606):WeakMap),o=0;function s(e,t,r,i,n,a,o){this.id=e,this.src=t,this.type=r,this.shader=i,this.count=a,this.programs=[],this.cache=o}function l(e){this.gl=e,this.shaders=[{},{}],this.programs={}}s.prototype.dispose=function(){if(0==--this.count){for(var e=this.cache,t=e.gl,r=this.programs,i=0,n=r.length;i1?1:e}function x(e,t,r,i,n,a,o,s,l,c,u,h){this.gl=e,this.pixelRatio=1,this.shader=t,this.orthoShader=r,this.projectShader=i,this.pointBuffer=n,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,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=c,this.pickOrthoShader=u,this.pickProjectShader=h,this.points=[],this._selectResult=new y(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}e.exports=function(e){var t=e.gl,r=l.createPerspective(t),i=l.createOrtho(t),o=l.createProject(t),s=l.createPickPerspective(t),c=l.createPickOrtho(t),u=l.createPickProject(t),h=n(t),d=n(t),f=n(t),p=n(t),m=a(t,[{buffer:h,size:3,type:t.FLOAT},{buffer:d,size:4,type:t.FLOAT},{buffer:f,size:2,type:t.FLOAT},{buffer:p,size:4,type:t.UNSIGNED_BYTE,normalized:!0}]),g=new x(t,r,i,o,h,d,f,p,m,s,c,u);return g.update(e),g};var b=x.prototype;b.pickSlots=1,b.setPickBase=function(e){this.pickId=e},b.isTransparent=function(){if(this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&this.projectHasAlpha)return!0;return!1},b.isOpaque=function(){if(!this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&!this.projectHasAlpha)return!0;return!1};var _=[0,0],w=[0,0,0],T=[0,0,0],M=[0,0,0,1],k=[0,0,0,1],A=h.slice(),S=[0,0,0],E=[[0,0,0],[0,0,0]];function C(e){return e[0]=e[1]=e[2]=0,e}function L(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=1,e}function P(e,t,r,i){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[r]=i,e}var I=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function z(e,t,r,i,n,a,o){var l=r.gl;if((a===r.projectHasAlpha||o)&&function(e,t,r,i){var n,a=t.axesProject,o=t.gl,l=e.uniforms,c=r.model||h,u=r.view||h,d=r.projection||h,f=t.axesBounds,p=function(e){for(var t=0;t<2;++t)for(var r=0;r<3;++r)E[t][r]=Math.max(Math.min(e[t][r],1e8),-1e8);return E}(t.clipBounds);n=t.axes&&t.axes.lastCubeProps?t.axes.lastCubeProps.axis:[1,1,1],_[0]=2/o.drawingBufferWidth,_[1]=2/o.drawingBufferHeight,e.bind(),l.view=u,l.projection=d,l.screenSize=_,l.highlightId=t.highlightId,l.highlightScale=t.highlightScale,l.clipBounds=p,l.pickGroup=t.pickId/255,l.pixelRatio=i;for(var m=0;m<3;++m)if(a[m]){l.scale=t.projectScale[m],l.opacity=t.projectOpacity[m];for(var y=0;y<16;++y)A[y]=0;for(var y=0;y<4;++y)A[5*y]=1;A[5*m]=0,n[m]<0?A[12+m]=f[0][m]:A[12+m]=f[1][m],s(A,c,A),l.model=A;var v=(m+1)%3,x=(m+2)%3,b=C(w),I=C(T);b[v]=1,I[x]=1;var z=g(d,u,c,L(M,b)),D=g(d,u,c,L(k,I));if(Math.abs(z[1])>Math.abs(D[1])){var O=z;z=D,D=O,O=b,b=I,I=O;var R=v;v=x,x=R}z[0]<0&&(b[v]=-1),D[1]>0&&(I[x]=-1);for(var F=0,j=0,y=0;y<4;++y)F+=Math.pow(c[4*v+y],2),j+=Math.pow(c[4*x+y],2);b[v]/=Math.sqrt(F),I[x]/=Math.sqrt(j),l.axes[0]=b,l.axes[1]=I,l.fragClipBounds[0]=P(S,p[0],m,-1e8),l.fragClipBounds[1]=P(S,p[1],m,1e8),t.vao.bind(),t.vao.draw(o.TRIANGLES,t.vertexCount),t.lineWidth>0&&(o.lineWidth(t.lineWidth*i),t.vao.draw(o.LINES,t.lineVertexCount,t.vertexCount)),t.vao.unbind()}}(t,r,i,n),a===r.hasAlpha||o){e.bind();var c=e.uniforms;c.model=i.model||h,c.view=i.view||h,c.projection=i.projection||h,_[0]=2/l.drawingBufferWidth,_[1]=2/l.drawingBufferHeight,c.screenSize=_,c.highlightId=r.highlightId,c.highlightScale=r.highlightScale,c.fragClipBounds=I,c.clipBounds=r.axes.bounds,c.opacity=r.opacity,c.pickGroup=r.pickId/255,c.pixelRatio=n,r.vao.bind(),r.vao.draw(l.TRIANGLES,r.vertexCount),r.lineWidth>0&&(l.lineWidth(r.lineWidth*n),r.vao.draw(l.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function D(e,t,r,n){var a=u(a=p(e)?t=this.pointCount||t<0)return null;var r=this.points[t],i=this._selectResult;i.index=t;for(var n=0;n<3;++n)i.position[n]=i.dataCoordinate[n]=r[n];return i},b.highlight=function(e){if(e){var t=e.index;this.highlightId=[(255&t)/255,(t>>8&255)/255,(t>>16&255)/255,0]}else this.highlightId=[1,1,1,1]},b.update=function(e){if("perspective"in(e=e||{})&&(this.useOrtho=!e.perspective),"orthographic"in e&&(this.useOrtho=!!e.orthographic),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"project"in e)if(p(e.project))this.axesProject=e.project;else{var t=!!e.project;this.axesProject=[t,t,t]}if("projectScale"in e)if(p(e.projectScale))this.projectScale=e.projectScale.slice();else{var r=+e.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in e){if(p(e.projectOpacity))this.projectOpacity=e.projectOpacity.slice();else{var r=+e.projectOpacity;this.projectOpacity=[r,r,r]}for(var i=0;i<3;++i)this.projectOpacity[i]=v(this.projectOpacity[i]),this.projectOpacity[i]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in e&&(this.opacity=v(e.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var n,a,s=e.position,l={family:e.font||"normal",style:e.fontStyle||"normal",weight:e.fontWeight||"normal",variant:e.fontVariant||"normal"},c=e.alignment||[0,0];if(2===c.length)n=c[0],a=c[1];else{n=[],a=[];for(var i=0;i0){var O=0,R=b,F=[0,0,0,1],j=[0,0,0,1],B=p(f)&&p(f[0]),N=p(y)&&p(y[0]);e:for(var i=0;i0?1-E[0][0]:Z<0?1+E[1][0]:1,Y*=Y>0?1-E[0][1]:Y<0?1+E[1][1]:1;for(var $=[Z,Y],X=A.cells||[],K=A.positions||[],M=0;Mthis.buffer.length){n.free(this.buffer);for(var i=this.buffer=n.mallocUint8(o(r*t*4)),a=0;ar)for(e=r;et)for(e=t;e=0){for(var T=0|w.type.charAt(w.type.length-1),M=Array(T),k=0;k=0;)A+=1;_[v]=A}var S=Array(r.length);function E(){d.program=o.program(f,d._vref,d._fref,b,_);for(var e=0;e=0){var f=h.charCodeAt(h.length-1)-48;if(f<2||f>4)throw new i("","Invalid data type for attribute "+u+": "+h);s(e,t,d[0],n,f,a,u)}else if(h.indexOf("mat")>=0){var f=h.charCodeAt(h.length-1)-48;if(f<2||f>4)throw new i("","Invalid data type for attribute "+u+": "+h);!function(e,t,r,i,n,a,o){for(var l=Array(n),c=Array(n),u=0;u4)throw new n("","Invalid data type");switch(y.charAt(0)){case"b":case"i":e["uniform"+g+"iv"](s[u],h);break;case"v":e["uniform"+g+"fv"](s[u],h);break;default:throw new n("","Unrecognized data type for vector "+name+": "+y)}}else if(0===y.indexOf("mat")&&4===y.length){if((g=y.charCodeAt(y.length-1)-48)<2||g>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+y);e["uniformMatrix"+g+"fv"](s[u],!1,h);break}else throw new n("","Unknown uniform data type for "+name+": "+y)}}}}}function c(e,t,i){if("object"==typeof i)Object.defineProperty(e,t,{get:a(u(i)),set:l(i),enumerable:!0,configurable:!1});else s[i]?Object.defineProperty(e,t,{get:function(e,t,r){return e.getUniform(t.program,r[i])},set:l(i),enumerable:!0,configurable:!1}):e[t]=function(e){switch(e){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var t=e.indexOf("vec");if(0<=t&&t<=1&&e.length===4+t){var r=e.charCodeAt(e.length-1)-48;if(r<2||r>4)throw new n("","Invalid data type");return"b"===e.charAt(0)?o(r,!1):o(r,0)}if(0===e.indexOf("mat")&&4===e.length){var r=e.charCodeAt(e.length-1)-48;if(r<2||r>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+e);return o(r*r,0)}throw new n("","Unknown uniform data type for "+name+": "+e)}}(r[i].type)}function u(e){var t;if(Array.isArray(e)){t=Array(e.length);for(var r=0;r1){l[0]in o||(o[l[0]]=[]),o=o[l[0]];for(var c=1;c1)for(var l=0;l"u"?r(606):WeakMap),o=0;function s(e,t,r,i,n,a,o){this.id=e,this.src=t,this.type=r,this.shader=i,this.count=a,this.programs=[],this.cache=o}function l(e){this.gl=e,this.shaders=[{},{}],this.programs={}}s.prototype.dispose=function(){if(0==--this.count){for(var e=this.cache,t=e.gl,r=this.programs,i=0,n=r.length;i0)for(var T=0;T<8;T++){var M=(T+1)%8;c.push(d[T],f[T],f[M],f[M],d[M],d[T]),h.push(v,y,y,y,v,v),p.push(m,g,g,g,m,m);var k=c.length;u.push([k-6,k-5,k-4],[k-3,k-2,k-1])}var A=d;d=f,f=A;var S=v;v=y,y=S;var E=m;m=g,g=E}return{positions:c,cells:u,vectors:h,vertexIntensity:p}},s=function(e,t,r,n){for(var a=0,s=0;st)return r-1}return r},c=function(e,t,r){return er?r:e},u=function(e,t,r){var n,a,o,s,u,h,d=t.vectors,f=t.meshgrid,p=e[0],m=e[1],g=e[2],y=f[0].length,v=f[1].length,x=f[2].length,b=l(f[0],p),_=l(f[1],m),w=l(f[2],g),T=b+1,M=_+1,k=w+1;if(b=c(b,0,y-1),T=c(T,0,y-1),_=c(_,0,v-1),M=c(M,0,v-1),w=c(w,0,x-1),k=c(k,0,x-1),b<0||_<0||w<0||T>y-1||M>v-1||k>x-1)return i.create();var A=f[0][b],S=f[0][T],E=f[1][_],C=f[1][M],L=f[2][w],P=f[2][k],I=(p-A)/(S-A),z=(m-E)/(C-E),D=(g-L)/(P-L);switch(isFinite(I)||(I=.5),isFinite(z)||(z=.5),isFinite(D)||(D=.5),r.reversedX&&(b=y-1-b,T=y-1-T),r.reversedY&&(_=v-1-_,M=v-1-M),r.reversedZ&&(w=x-1-w,k=x-1-k),r.filled){case 5:u=w,h=k,o=_*x,s=M*x,n=b*x*v,a=T*x*v;break;case 4:u=w,h=k,n=b*x,a=T*x,o=_*x*y,s=M*x*y;break;case 3:o=_,s=M,u=w*v,h=k*v,n=b*v*x,a=T*v*x;break;case 2:o=_,s=M,n=b*v,a=T*v,u=w*v*y,h=k*v*y;break;case 1:n=b,a=T,u=w*y,h=k*y,o=_*y*x,s=M*y*x;break;default:n=b,a=T,o=_*y,s=M*y,u=w*y*v,h=k*y*v}var O=d[n+o+u],R=d[n+o+h],F=d[n+s+u],j=d[n+s+h],B=d[a+o+u],N=d[a+o+h],U=d[a+s+u],V=d[a+s+h],q=i.create(),H=i.create(),G=i.create(),W=i.create();i.lerp(q,O,B,I),i.lerp(H,R,N,I),i.lerp(G,F,U,I),i.lerp(W,j,V,I);var Y=i.create(),Z=i.create();i.lerp(Y,q,G,z),i.lerp(Z,H,W,z);var $=i.create();return i.lerp($,Y,Z,D),$},h=function(e){var t=1/0;e.sort(function(e,t){return e-t});for(var r=e.length,i=1;i1&&(M=d(r));for(var S=0;Sk&&(k=O),z.push(O),m.push({points:C,velocities:L,divergences:z});for(var R=0;R<100*n&&C.lengthx||rb||i_)}(E);){R++;var F=i.clone(P),j=i.squaredLength(F);if(0===j)break;if(j>T&&i.scale(F,F,w/Math.sqrt(j)),i.add(F,F,E),P=f(F),i.squaredDistance(I,F)-T>-1e-4*T){C.push(F),I=F,L.push(P);var D=p(F,P),O=i.length(D);isFinite(O)&&O>k&&(k=O),z.push(O)}E=F}}var B=s(m,e.colormap,k,M);return l?B.tubeScale=l:(0===k&&(k=1),B.tubeScale=.5*o*M/k),B};var f=r(6740),p=r(6405).createMesh;e.exports.createTubeMesh=function(e,t){return p(e,t,{shaders:f,traceType:"streamtube"})}},990:function(e,t,r){var i=r(9405),n=r(3236),a=n([`precision highp float; +}`]);t.meshShader={vertex:n,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},t.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815(e,t,r){var i=r(2931),n=r(9970),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(e,t,r,a){for(var o=e.points,s=e.velocities,l=e.divergences,c=[],u=[],h=[],d=[],f=[],p=[],m=0,g=0,y=n.create(),v=n.create(),x=0;x0)for(var T=0;T<8;T++){var M=(T+1)%8;c.push(d[T],f[T],f[M],f[M],d[M],d[T]),h.push(v,y,y,y,v,v),p.push(m,g,g,g,m,m);var k=c.length;u.push([k-6,k-5,k-4],[k-3,k-2,k-1])}var A=d;d=f,f=A;var S=v;v=y,y=S;var E=m;m=g,g=E}return{positions:c,cells:u,vectors:h,vertexIntensity:p}},s=function(e,t,r,n){for(var a=0,s=0;st)return r-1}return r},c=function(e,t,r){return er?r:e},u=function(e,t,r){var n,a,o,s,u,h,d=t.vectors,f=t.meshgrid,p=e[0],m=e[1],g=e[2],y=f[0].length,v=f[1].length,x=f[2].length,b=l(f[0],p),_=l(f[1],m),w=l(f[2],g),T=b+1,M=_+1,k=w+1;if(b=c(b,0,y-1),T=c(T,0,y-1),_=c(_,0,v-1),M=c(M,0,v-1),w=c(w,0,x-1),k=c(k,0,x-1),b<0||_<0||w<0||T>y-1||M>v-1||k>x-1)return i.create();var A=f[0][b],S=f[0][T],E=f[1][_],C=f[1][M],L=f[2][w],P=f[2][k],I=(p-A)/(S-A),z=(m-E)/(C-E),D=(g-L)/(P-L);switch(isFinite(I)||(I=.5),isFinite(z)||(z=.5),isFinite(D)||(D=.5),r.reversedX&&(b=y-1-b,T=y-1-T),r.reversedY&&(_=v-1-_,M=v-1-M),r.reversedZ&&(w=x-1-w,k=x-1-k),r.filled){case 5:u=w,h=k,o=_*x,s=M*x,n=b*x*v,a=T*x*v;break;case 4:u=w,h=k,n=b*x,a=T*x,o=_*x*y,s=M*x*y;break;case 3:o=_,s=M,u=w*v,h=k*v,n=b*v*x,a=T*v*x;break;case 2:o=_,s=M,n=b*v,a=T*v,u=w*v*y,h=k*v*y;break;case 1:n=b,a=T,u=w*y,h=k*y,o=_*y*x,s=M*y*x;break;default:n=b,a=T,o=_*y,s=M*y,u=w*y*v,h=k*y*v}var O=d[n+o+u],R=d[n+o+h],F=d[n+s+u],j=d[n+s+h],B=d[a+o+u],N=d[a+o+h],U=d[a+s+u],V=d[a+s+h],q=i.create(),H=i.create(),G=i.create(),W=i.create();i.lerp(q,O,B,I),i.lerp(H,R,N,I),i.lerp(G,F,U,I),i.lerp(W,j,V,I);var Y=i.create(),Z=i.create();i.lerp(Y,q,G,z),i.lerp(Z,H,W,z);var $=i.create();return i.lerp($,Y,Z,D),$},h=function(e){var t=1/0;e.sort(function(e,t){return e-t});for(var r=e.length,i=1;i1&&(M=d(r));for(var S=0;Sk&&(k=O),z.push(O),m.push({points:C,velocities:L,divergences:z});for(var R=0;R<100*n&&C.lengthx||rb||i_)}(E);){R++;var F=i.clone(P),j=i.squaredLength(F);if(0===j)break;if(j>T&&i.scale(F,F,w/Math.sqrt(j)),i.add(F,F,E),P=f(F),i.squaredDistance(I,F)-T>-1e-4*T){C.push(F),I=F,L.push(P);var D=p(F,P),O=i.length(D);isFinite(O)&&O>k&&(k=O),z.push(O)}E=F}}var B=s(m,e.colormap,k,M);return l?B.tubeScale=l:(0===k&&(k=1),B.tubeScale=.5*o*M/k),B};var f=r(6740),p=r(6405).createMesh;e.exports.createTubeMesh=function(e,t){return p(e,t,{shaders:f,traceType:"streamtube"})}},990(e,t,r){var i=r(9405),n=r(3236),a=n([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; @@ -1988,13 +1988,13 @@ void main() { vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } -`]);t.createShader=function(e){var t=i(e,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createPickShader=function(e){var t=i(e,a,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createContourShader=function(e){var t=i(e,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t},t.createPickContourShader=function(e){var t=i(e,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t}},9499:function(e,t,r){e.exports=function(e){var t=e.gl,r=v(t),i=b(t),s=x(t),l=_(t),c=n(t),u=a(t,[{buffer:c,size:4,stride:40,offset:0},{buffer:c,size:3,stride:40,offset:16},{buffer:c,size:3,stride:40,offset:28}]),h=n(t),d=a(t,[{buffer:h,size:4,stride:20,offset:0},{buffer:h,size:1,stride:20,offset:16}]),f=n(t),p=a(t,[{buffer:f,size:2,type:t.FLOAT}]),m=o(t,1,256,t.RGBA,t.UNSIGNED_BYTE);m.minFilter=t.LINEAR,m.magFilter=t.LINEAR;var g=new L(t,[0,0],[[0,0,0],[0,0,0]],r,i,c,u,m,s,l,h,d,f,p,[0,0,0]),y={levels:[[],[],[]]};for(var w in e)y[w]=e[w];return y.colormap=y.colormap||"jet",g.update(y),g};for(var i=r(8828),n=r(2762),a=r(8116),o=r(7766),s=r(1888),l=r(6729),c=r(5298),u=r(9994),h=r(9618),d=r(3711),f=r(6760),p=r(7608),m=r(2478),g=r(6199),y=r(990),v=y.createShader,x=y.createContourShader,b=y.createPickShader,_=y.createPickContourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],M=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],k=0;k<3;++k){var A=M[k],S=(k+1)%3,E=(k+2)%3;A[S+0]=1,A[E+3]=1,A[k+6]=1}function C(e,t,r,i,n){this.position=e,this.index=t,this.uv=r,this.level=i,this.dataCoordinate=n}function L(e,t,r,i,n,a,o,l,c,u,d,f,p,m,g){this.gl=e,this.shape=t,this.bounds=r,this.objectOffset=g,this.intensityBounds=[],this._shader=i,this._pickShader=n,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=d,this._contourVAO=f,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new C([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=p,this._dynamicVAO=m,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var P=L.prototype;P.genColormap=function(e,t){var r=!1,i=u([l({colormap:e,nshades:256,format:"rgba"}).map(function(e,i){var n=t?function(e,t){if(!t||!t.length)return 1;for(var r=0;re&&r>0){var i=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-i)+i*t[r-1][1]}}return 1}(i/255,t):e[3];return n<1&&(r=!0),[e[0],e[1],e[2],255*n]})]);return c.divseq(i,255),this.hasAlphaScale=r,i},P.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},P.isOpaque=function(){return!this.isTransparent()},P.pickSlots=1,P.setPickBase=function(e){this.pickId=e};var I=[0,0,0],z={showSurface:!1,showContour:!1,projections:[w.slice(),w.slice(),w.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function D(e,t){var r,i,n,a=t.axes&&t.axes.lastCubeProps.axis||I,o=t.showSurface,s=t.showContour;for(r=0;r<3;++r)for(o=o||t.surfaceProject[r],i=0;i<3;++i)s=s||t.contourProject[r][i];for(r=0;r<3;++r){var l=z.projections[r];for(i=0;i<16;++i)l[i]=0;for(i=0;i<4;++i)l[5*i]=1;l[5*r]=0,l[12+r]=t.axesBounds[+(a[r]>0)][r],f(l,e.model,l);var c=z.clipBounds[r];for(n=0;n<2;++n)for(i=0;i<3;++i)c[n][i]=e.clipBounds[n][i];c[0][r]=-1e8,c[1][r]=1e8}return z.showSurface=o,z.showContour=s,z}var O={model:w,view:w,projection:w,inverseModel:w.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},R=w.slice(),F=[1,0,0,0,1,0,0,0,1];function j(e,t){e=e||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0),O.model=e.model||w,O.view=e.view||w,O.projection=e.projection||w,O.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],O.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],O.objectOffset=this.objectOffset,O.contourColor=this.contourColor[0],O.inverseModel=p(O.inverseModel,O.model);for(var i=0;i<2;++i)for(var n=O.clipBounds[i],a=0;a<3;++a)n[a]=Math.min(Math.max(this.clipBounds[i][a],-1e8),1e8);for(O.kambient=this.ambientLight,O.kdiffuse=this.diffuseLight,O.kspecular=this.specularLight,O.roughness=this.roughness,O.fresnel=this.fresnel,O.opacity=this.opacity,O.height=0,O.permutation=F,O.vertexColor=this.vertexColor,f(R,O.view,O.model),f(R,O.projection,R),p(R,R),i=0;i<3;++i)O.eyePosition[i]=R[12+i]/R[15];var o=R[15];for(i=0;i<3;++i)o+=this.lightPosition[i]*R[4*i+3];for(i=0;i<3;++i){var s=R[12+i];for(a=0;a<3;++a)s+=R[4*a+i]*this.lightPosition[a];O.lightPosition[i]=s/o}var l=D(O,this);if(l.showSurface){for(this._shader.bind(),this._shader.uniforms=O,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=l.projections[i],this._shader.uniforms.clipBounds=l.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(l.showContour){var c=this._contourShader;O.kambient=1,O.kdiffuse=0,O.kspecular=0,O.opacity=1,c.bind(),c.uniforms=O;var u=this._contourVAO;for(u.bind(),i=0;i<3;++i)for(c.uniforms.permutation=M[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),a=0;a>4)/16)/255,n=Math.floor(i),a=i-n,o=t[1]*(e.value[1]+(15&e.value[2])/16)/255,s=Math.floor(o),l=o-s;n+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var h=u?a:1-a,d=0;d<2;++d)for(var f=d?l:1-l,p=n+u,g=s+d,y=h*f,v=0;v<3;++v)c[v]+=this._field[v].get(p,g)*y;for(var x=this._pickResult.level,b=0;b<3;++b)if(x[b]=m.le(this.contourLevels[b],c[b]),x[b]<0)this.contourLevels[b].length>0&&(x[b]=0);else if(x[b]Math.abs(w-c[b])&&(x[b]+=1)}for(r.index[0]=a<.5?n:n+1,r.index[1]=l<.5?s:s+1,r.uv[0]=i/t[0],r.uv[1]=o/t[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},P.padField=function(e,t){var r=t.shape.slice(),i=e.shape.slice();c.assign(e.lo(1,1).hi(r[0],r[1]),t),c.assign(e.lo(1).hi(r[0],1),t.hi(r[0],1)),c.assign(e.lo(1,i[1]-1).hi(r[0],1),t.lo(0,r[1]-1).hi(r[0],1)),c.assign(e.lo(0,1).hi(1,r[1]),t.hi(1)),c.assign(e.lo(i[0]-1,1).hi(1,r[1]),t.lo(r[0]-1)),e.set(0,0,t.get(0,0)),e.set(0,i[1]-1,t.get(0,r[1]-1)),e.set(i[0]-1,0,t.get(r[0]-1,0)),e.set(i[0]-1,i[1]-1,t.get(r[0]-1,r[1]-1))},P.update=function(e){e=e||{},this.objectOffset=e.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in e&&(this.contourWidth=N(e.contourWidth,Number)),"showContour"in e&&(this.showContour=N(e.showContour,Boolean)),"showSurface"in e&&(this.showSurface=!!e.showSurface),"contourTint"in e&&(this.contourTint=N(e.contourTint,Boolean)),"contourColor"in e&&(this.contourColor=V(e.contourColor)),"contourProject"in e&&(this.contourProject=N(e.contourProject,function(e){return N(e,Boolean)})),"surfaceProject"in e&&(this.surfaceProject=e.surfaceProject),"dynamicColor"in e&&(this.dynamicColor=V(e.dynamicColor)),"dynamicTint"in e&&(this.dynamicTint=N(e.dynamicTint,Number)),"dynamicWidth"in e&&(this.dynamicWidth=N(e.dynamicWidth,Number)),"opacity"in e&&(this.opacity=e.opacity),"opacityscale"in e&&(this.opacityscale=e.opacityscale),"colorBounds"in e&&(this.colorBounds=e.colorBounds),"vertexColor"in e&&(this.vertexColor=+!!e.vertexColor),"colormap"in e&&this._colorMap.setPixels(this.genColormap(e.colormap,this.opacityscale));var t=e.field||e.coords&&e.coords[2]||null,r=!1;if(t||(t=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in e||"coords"in e){var n=(t.shape[0]+2)*(t.shape[1]+2);n>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(i.nextPow2(n))),this._field[2]=h(this._field[2].data,[t.shape[0]+2,t.shape[1]+2]),this.padField(this._field[2],t),this.shape=t.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=h(this._field[o].data,[a[0]+2,a[1]+2]);if(e.coords){var l=e.coords;if(!Array.isArray(l)||3!==l.length)throw Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var c=l[o];for(y=0;y<2;++y)if(c.shape[y]!==a[y])throw Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],c)}}else if(e.ticks){var u=e.ticks;if(!Array.isArray(u)||2!==u.length)throw Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var f=u[o];if((Array.isArray(f)||f.length)&&(f=h(f)),f.shape[0]!==a[o])throw Error("gl-surface: invalid tick length");var p=h(f.data,a);p.stride[o]=f.stride[0],p.stride[1^o]=0,this.padField(this._field[o],p)}}else{for(o=0;o<2;++o){var m=[0,0];m[o]=1,this._field[o]=h(this._field[o].data,[a[0]+2,a[1]+2],m,0)}this._field[0].set(0,0,0);for(var y=0;y0){for(var ex=0;ex<5;++ex)J.pop();B-=1}continue e}J.push(ei[0],ei[1],eo[0],eo[1],ei[2]),B+=1}}er.push(B)}this._contourOffsets[Q]=et,this._contourCounts[Q]=er}var eb=s.mallocFloat(J.length);for(o=0;os||o[1]<0||o[1]>s)throw Error("gl-texture2d: Invalid texture size");var l=p(o,t.stride.slice()),c=0;"float32"===r?c=e.FLOAT:"float64"===r?(c=e.FLOAT,l=!1,r="float32"):"uint8"===r?c=e.UNSIGNED_BYTE:(c=e.UNSIGNED_BYTE,l=!1,r="uint8");var h=0;if(2===o.length)h=e.LUMINANCE,o=[o[0],o[1],1],t=i(t.data,o,[t.stride[0],t.stride[1],1],t.offset);else if(3===o.length)if(1===o[2])h=e.ALPHA;else if(2===o[2])h=e.LUMINANCE_ALPHA;else if(3===o[2])h=e.RGB;else if(4===o[2])h=e.RGBA;else throw Error("gl-texture2d: Invalid shape for pixel coords");else throw Error("gl-texture2d: Invalid shape for texture");c!==e.FLOAT||e.getExtension("OES_texture_float")||(c=e.UNSIGNED_BYTE,l=!1);var f,g,y=t.size;if(l)f=0===t.offset&&t.data.length===y?t.data:t.data.subarray(t.offset,t.offset+y);else{var v=[o[2],o[2]*o[0],1],x=i(g=a.malloc(y,r),o,v,0);("float32"===r||"float64"===r)&&c===e.UNSIGNED_BYTE?u(x,t):n.assign(x,t),f=g.subarray(0,y)}var b=m(e);return e.texImage2D(e.TEXTURE_2D,0,h,o[0],o[1],0,h,c,f),l||a.free(g),new d(e,b,o[0],o[1],h,c)}(e,v)}throw Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function c(e){return"u">typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"u">typeof HTMLImageElement&&e instanceof HTMLImageElement||"u">typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"u">typeof ImageData&&e instanceof ImageData}var u=function(e,t){n.muls(e,t,255)};function h(e,t,r){var i=e.gl,n=i.getParameter(i.MAX_TEXTURE_SIZE);if(t<0||t>n||r<0||r>n)throw Error("gl-texture2d: Invalid texture size");return e._shape=[t,r],e.bind(),i.texImage2D(i.TEXTURE_2D,0,e.format,t,r,0,e.format,e.type,null),e._mipLevels=[0],e}function d(e,t,r,i,n,a){this.gl=e,this.handle=t,this.format=n,this.type=a,this._shape=[r,i],this._mipLevels=[0],this._magFilter=e.NEAREST,this._minFilter=e.NEAREST,this._wrapS=e.CLAMP_TO_EDGE,this._wrapT=e.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(e){return o.wrapS=e}},{get:function(){return o._wrapT},set:function(e){return o.wrapT=e}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(e){return o.width=e}},{get:function(){return o._shape[1]},set:function(e){return o.height=e}}]),this._shapeVector=l}var f=d.prototype;function p(e,t){return 3===e.length?1===t[2]&&t[1]===e[0]*e[2]&&t[0]===e[2]:1===t[0]&&t[1]===e[0]}function m(e){var t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function g(e,t,r,i,n){var a=e.getParameter(e.MAX_TEXTURE_SIZE);if(t<0||t>a||r<0||r>a)throw Error("gl-texture2d: Invalid texture shape");if(n===e.FLOAT&&!e.getExtension("OES_texture_float"))throw Error("gl-texture2d: Floating point textures not supported on this platform");var o=m(e);return e.texImage2D(e.TEXTURE_2D,0,i,t,r,0,i,n,null),new d(e,o,t,r,i,n)}Object.defineProperties(f,{minFilter:{get:function(){return this._minFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),0>s.indexOf(e))throw Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),this._minFilter=e}},magFilter:{get:function(){return this._magFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),0>s.indexOf(e))throw Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e),this._magFilter=e}},mipSamples:{get:function(){return this._anisoSamples},set:function(e){var t=this._anisoSamples;if(this._anisoSamples=0|Math.max(e,1),t!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(e){if(this.bind(),0>l.indexOf(e))throw Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,e),this._wrapS=e}},wrapT:{get:function(){return this._wrapT},set:function(e){if(this.bind(),0>l.indexOf(e))throw Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,e),this._wrapT=e}},wrap:{get:function(){return this._wrapVector},set:function(e){if(Array.isArray(e)||(e=[e,e]),2!==e.length)throw Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var t=0;t<2;++t)if(0>l.indexOf(e[t]))throw Error("gl-texture2d: Unknown wrap mode "+e);this._wrapS=e[0],this._wrapT=e[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),e}},shape:{get:function(){return this._shapeVector},set:function(e){if(Array.isArray(e)){if(2!==e.length)throw Error("gl-texture2d: Invalid texture shape")}else e=[0|e,0|e];return h(this,0|e[0],0|e[1]),[0|e[0],0|e[1]]}},width:{get:function(){return this._shape[0]},set:function(e){return h(this,e|=0,this._shape[1]),e}},height:{get:function(){return this._shape[1]},set:function(e){return e|=0,h(this,this._shape[0],e),e}}}),f.bind=function(e){var t=this.gl;return void 0!==e&&t.activeTexture(t.TEXTURE0+(0|e)),t.bindTexture(t.TEXTURE_2D,this.handle),void 0!==e?0|e:t.getParameter(t.ACTIVE_TEXTURE)-t.TEXTURE0},f.dispose=function(){this.gl.deleteTexture(this.handle)},f.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var e=Math.min(this._shape[0],this._shape[1]),t=0;e>0;++t,e>>>=1)0>this._mipLevels.indexOf(t)&&this._mipLevels.push(t)},f.setPixels=function(e,t,r,o){var s=this.gl;this.bind(),Array.isArray(t)?(o=r,r=0|t[1],t=0|t[0]):(t=t||0,r=r||0),o=o||0;var l=c(e)?e:e.raw;if(l)0>this._mipLevels.indexOf(o)?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,t,r,this.format,this.type,l);else if(e.shape&&e.stride&&e.data){if(e.shape.length<2||t+e.shape[1]>this._shape[1]>>>o||r+e.shape[0]>this._shape[0]>>>o||t<0||r<0)throw Error("gl-texture2d: Texture dimensions are out of bounds");!function(e,t,r,o,s,l,c,h){var d=h.dtype,f=h.shape.slice();if(f.length<2||f.length>3)throw Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var m=0,g=0,y=p(f,h.stride.slice());"float32"===d?m=e.FLOAT:"float64"===d?(m=e.FLOAT,y=!1,d="float32"):"uint8"===d?m=e.UNSIGNED_BYTE:(m=e.UNSIGNED_BYTE,y=!1,d="uint8");if(2===f.length)g=e.LUMINANCE,f=[f[0],f[1],1],h=i(h.data,f,[h.stride[0],h.stride[1],1],h.offset);else if(3===f.length){if(1===f[2])g=e.ALPHA;else if(2===f[2])g=e.LUMINANCE_ALPHA;else if(3===f[2])g=e.RGB;else if(4===f[2])g=e.RGBA;else throw Error("gl-texture2d: Invalid shape for pixel coords");f[2]}else throw Error("gl-texture2d: Invalid shape for texture");if((g===e.LUMINANCE||g===e.ALPHA)&&(s===e.LUMINANCE||s===e.ALPHA)&&(g=s),g!==s)throw Error("gl-texture2d: Incompatible texture format for setPixels");var v=h.size,x=0>c.indexOf(o);if(x&&c.push(o),m===l&&y)0===h.offset&&h.data.length===v?x?e.texImage2D(e.TEXTURE_2D,o,s,f[0],f[1],0,s,l,h.data):e.texSubImage2D(e.TEXTURE_2D,o,t,r,f[0],f[1],s,l,h.data):x?e.texImage2D(e.TEXTURE_2D,o,s,f[0],f[1],0,s,l,h.data.subarray(h.offset,h.offset+v)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,f[0],f[1],s,l,h.data.subarray(h.offset,h.offset+v));else{var b=l===e.FLOAT?a.mallocFloat32(v):a.mallocUint8(v),_=i(b,f,[f[2],f[2]*f[0],1]);m===e.FLOAT&&l===e.UNSIGNED_BYTE?u(_,h):n.assign(_,h),x?e.texImage2D(e.TEXTURE_2D,o,s,f[0],f[1],0,s,l,b.subarray(0,v)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,f[0],f[1],s,l,b.subarray(0,v)),l===e.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,t,r,o,this.format,this.type,this._mipLevels,e)}else throw Error("gl-texture2d: Unsupported data type")}},1433:function(e){e.exports=function(e,t,r){t?t.bind():e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null);var i=0|e.getParameter(e.MAX_VERTEX_ATTRIBS);if(r){if(r.length>i)throw Error("gl-vao: Too many vertex attributes");for(var n=0;n1?0:Math.acos(s)};var i=r(2825),n=r(3536),a=r(244)},9226:function(e){e.exports=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}},3126:function(e){e.exports=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},3990:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},1091:function(e){e.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},5911:function(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=n*l-a*s,e[1]=a*o-i*l,e[2]=i*s-n*o,e}},5455:function(e,t,r){e.exports=r(7056)},7056:function(e){e.exports=function(e,t){var r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+i*i+n*n)}},4008:function(e,t,r){e.exports=r(6690)},6690:function(e){e.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}},244:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}},2613:function(e){e.exports=1e-6},9922:function(e,t,r){e.exports=function(e,t){var r=e[0],n=e[1],a=e[2],o=t[0],s=t[1],l=t[2];return Math.abs(r-o)<=i*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-s)<=i*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(a-l)<=i*Math.max(1,Math.abs(a),Math.abs(l))};var i=r(2613)},9265:function(e){e.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}},2681:function(e){e.exports=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}},5137:function(e,t,r){e.exports=function(e,t,r,n,a,o){var s,l;for(t||(t=3),r||(r=0),l=n?Math.min(n*t+r,e.length):e.length,s=r;s0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a),e}},7636:function(e){e.exports=function(e,t){var r=2*Math.random()*Math.PI,i=2*Math.random()-1,n=Math.sqrt(1-i*i)*(t=t||1);return e[0]=Math.cos(r)*n,e[1]=Math.sin(r)*n,e[2]=i*t,e}},6894:function(e){e.exports=function(e,t,r,i){var n=r[1],a=r[2],o=t[1]-n,s=t[2]-a,l=Math.sin(i),c=Math.cos(i);return e[0]=t[0],e[1]=n+o*c-s*l,e[2]=a+o*l+s*c,e}},109:function(e){e.exports=function(e,t,r,i){var n=r[0],a=r[2],o=t[0]-n,s=t[2]-a,l=Math.sin(i),c=Math.cos(i);return e[0]=n+s*l+o*c,e[1]=t[1],e[2]=a+s*c-o*l,e}},8692:function(e){e.exports=function(e,t,r,i){var n=r[0],a=r[1],o=t[0]-n,s=t[1]-a,l=Math.sin(i),c=Math.cos(i);return e[0]=n+o*c-s*l,e[1]=a+o*l+s*c,e[2]=t[2],e}},2447:function(e){e.exports=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}},6621:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}},8489:function(e){e.exports=function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e}},1463:function(e){e.exports=function(e,t,r,i){return e[0]=t,e[1]=r,e[2]=i,e}},6141:function(e,t,r){e.exports=r(2953)},5486:function(e,t,r){e.exports=r(3066)},2953:function(e){e.exports=function(e,t){var r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return r*r+i*i+n*n}},3066:function(e){e.exports=function(e){var t=e[0],r=e[1],i=e[2];return t*t+r*r+i*i}},2229:function(e,t,r){e.exports=r(6843)},6843:function(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}},492:function(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2];return e[0]=i*r[0]+n*r[3]+a*r[6],e[1]=i*r[1]+n*r[4]+a*r[7],e[2]=i*r[2]+n*r[5]+a*r[8],e}},5673:function(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[3]*i+r[7]*n+r[11]*a+r[15];return o=o||1,e[0]=(r[0]*i+r[4]*n+r[8]*a+r[12])/o,e[1]=(r[1]*i+r[5]*n+r[9]*a+r[13])/o,e[2]=(r[2]*i+r[6]*n+r[10]*a+r[14])/o,e}},264:function(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*i+s*a-l*n,h=c*n+l*i-o*a,d=c*a+o*n-s*i,f=-o*i-s*n-l*a;return e[0]=u*c+-(f*o)+-(h*l)- -(d*s),e[1]=h*c+-(f*s)+-(d*o)- -(u*l),e[2]=d*c+-(f*l)+-(u*s)- -(h*o),e}},4361:function(e){e.exports=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}},2335:function(e){e.exports=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},2933:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},7536:function(e){e.exports=function(){var e=new Float32Array(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}},4691:function(e){e.exports=function(e,t){var r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(r*r+i*i+n*n+a*a)}},1373:function(e){e.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}},3750:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}},3390:function(e){e.exports=function(e,t,r,i){var n=new Float32Array(4);return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n}},9970:function(e,t,r){e.exports={create:r(7536),clone:r(2335),fromValues:r(3390),copy:r(2933),set:r(4578),add:r(4361),subtract:r(6860),multiply:r(3576),divide:r(1373),min:r(2334),max:r(160),scale:r(9288),scaleAndAdd:r(4844),distance:r(4691),squaredDistance:r(7960),length:r(6808),squaredLength:r(483),negate:r(1498),inverse:r(4494),normalize:r(5177),dot:r(3750),lerp:r(2573),random:r(9131),transformMat4:r(5352),transformQuat:r(4041)}},4494:function(e){e.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}},6808:function(e){e.exports=function(e){var t=e[0],r=e[1],i=e[2],n=e[3];return Math.sqrt(t*t+r*r+i*i+n*n)}},2573:function(e){e.exports=function(e,t,r,i){var n=t[0],a=t[1],o=t[2],s=t[3];return e[0]=n+i*(r[0]-n),e[1]=a+i*(r[1]-a),e[2]=o+i*(r[2]-o),e[3]=s+i*(r[3]-s),e}},160:function(e){e.exports=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}},2334:function(e){e.exports=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}},3576:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}},1498:function(e){e.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}},5177:function(e){e.exports=function(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r*r+i*i+n*n+a*a;return o>0&&(o=1/Math.sqrt(o),e[0]=r*o,e[1]=i*o,e[2]=n*o,e[3]=a*o),e}},9131:function(e,t,r){var i=r(5177),n=r(9288);e.exports=function(e,t){return t=t||1,e[0]=Math.random(),e[1]=Math.random(),e[2]=Math.random(),e[3]=Math.random(),i(e,e),n(e,e,t),e}},9288:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}},4844:function(e){e.exports=function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e}},4578:function(e){e.exports=function(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e}},7960:function(e){e.exports=function(e,t){var r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],a=t[3]-e[3];return r*r+i*i+n*n+a*a}},483:function(e){e.exports=function(e){var t=e[0],r=e[1],i=e[2],n=e[3];return t*t+r*r+i*i+n*n}},6860:function(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}},5352:function(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3];return e[0]=r[0]*i+r[4]*n+r[8]*a+r[12]*o,e[1]=r[1]*i+r[5]*n+r[9]*a+r[13]*o,e[2]=r[2]*i+r[6]*n+r[10]*a+r[14]*o,e[3]=r[3]*i+r[7]*n+r[11]*a+r[15]*o,e}},4041:function(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*i+s*a-l*n,h=c*n+l*i-o*a,d=c*a+o*n-s*i,f=-o*i-s*n-l*a;return e[0]=u*c+-(f*o)+-(h*l)- -(d*s),e[1]=h*c+-(f*s)+-(d*o)- -(u*l),e[2]=d*c+-(f*l)+-(u*s)- -(h*o),e[3]=t[3],e}},1848:function(e,t,r){var i=r(4905),n=r(6468);e.exports=function(e){for(var t=Array.isArray(e)?e:i(e),r=0;re&&r>0){var i=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-i)+i*t[r-1][1]}}return 1}(i/255,t):e[3];return n<1&&(r=!0),[e[0],e[1],e[2],255*n]})]);return c.divseq(i,255),this.hasAlphaScale=r,i},P.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},P.isOpaque=function(){return!this.isTransparent()},P.pickSlots=1,P.setPickBase=function(e){this.pickId=e};var I=[0,0,0],z={showSurface:!1,showContour:!1,projections:[w.slice(),w.slice(),w.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function D(e,t){var r,i,n,a=t.axes&&t.axes.lastCubeProps.axis||I,o=t.showSurface,s=t.showContour;for(r=0;r<3;++r)for(o=o||t.surfaceProject[r],i=0;i<3;++i)s=s||t.contourProject[r][i];for(r=0;r<3;++r){var l=z.projections[r];for(i=0;i<16;++i)l[i]=0;for(i=0;i<4;++i)l[5*i]=1;l[5*r]=0,l[12+r]=t.axesBounds[+(a[r]>0)][r],f(l,e.model,l);var c=z.clipBounds[r];for(n=0;n<2;++n)for(i=0;i<3;++i)c[n][i]=e.clipBounds[n][i];c[0][r]=-1e8,c[1][r]=1e8}return z.showSurface=o,z.showContour=s,z}var O={model:w,view:w,projection:w,inverseModel:w.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},R=w.slice(),F=[1,0,0,0,1,0,0,0,1];function j(e,t){e=e||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0),O.model=e.model||w,O.view=e.view||w,O.projection=e.projection||w,O.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],O.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],O.objectOffset=this.objectOffset,O.contourColor=this.contourColor[0],O.inverseModel=p(O.inverseModel,O.model);for(var i=0;i<2;++i)for(var n=O.clipBounds[i],a=0;a<3;++a)n[a]=Math.min(Math.max(this.clipBounds[i][a],-1e8),1e8);for(O.kambient=this.ambientLight,O.kdiffuse=this.diffuseLight,O.kspecular=this.specularLight,O.roughness=this.roughness,O.fresnel=this.fresnel,O.opacity=this.opacity,O.height=0,O.permutation=F,O.vertexColor=this.vertexColor,f(R,O.view,O.model),f(R,O.projection,R),p(R,R),i=0;i<3;++i)O.eyePosition[i]=R[12+i]/R[15];var o=R[15];for(i=0;i<3;++i)o+=this.lightPosition[i]*R[4*i+3];for(i=0;i<3;++i){var s=R[12+i];for(a=0;a<3;++a)s+=R[4*a+i]*this.lightPosition[a];O.lightPosition[i]=s/o}var l=D(O,this);if(l.showSurface){for(this._shader.bind(),this._shader.uniforms=O,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=l.projections[i],this._shader.uniforms.clipBounds=l.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(l.showContour){var c=this._contourShader;O.kambient=1,O.kdiffuse=0,O.kspecular=0,O.opacity=1,c.bind(),c.uniforms=O;var u=this._contourVAO;for(u.bind(),i=0;i<3;++i)for(c.uniforms.permutation=M[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),a=0;a>4)/16)/255,n=Math.floor(i),a=i-n,o=t[1]*(e.value[1]+(15&e.value[2])/16)/255,s=Math.floor(o),l=o-s;n+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var h=u?a:1-a,d=0;d<2;++d)for(var f=d?l:1-l,p=n+u,g=s+d,y=h*f,v=0;v<3;++v)c[v]+=this._field[v].get(p,g)*y;for(var x=this._pickResult.level,b=0;b<3;++b)if(x[b]=m.le(this.contourLevels[b],c[b]),x[b]<0)this.contourLevels[b].length>0&&(x[b]=0);else if(x[b]Math.abs(w-c[b])&&(x[b]+=1)}for(r.index[0]=a<.5?n:n+1,r.index[1]=l<.5?s:s+1,r.uv[0]=i/t[0],r.uv[1]=o/t[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},P.padField=function(e,t){var r=t.shape.slice(),i=e.shape.slice();c.assign(e.lo(1,1).hi(r[0],r[1]),t),c.assign(e.lo(1).hi(r[0],1),t.hi(r[0],1)),c.assign(e.lo(1,i[1]-1).hi(r[0],1),t.lo(0,r[1]-1).hi(r[0],1)),c.assign(e.lo(0,1).hi(1,r[1]),t.hi(1)),c.assign(e.lo(i[0]-1,1).hi(1,r[1]),t.lo(r[0]-1)),e.set(0,0,t.get(0,0)),e.set(0,i[1]-1,t.get(0,r[1]-1)),e.set(i[0]-1,0,t.get(r[0]-1,0)),e.set(i[0]-1,i[1]-1,t.get(r[0]-1,r[1]-1))},P.update=function(e){e=e||{},this.objectOffset=e.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in e&&(this.contourWidth=N(e.contourWidth,Number)),"showContour"in e&&(this.showContour=N(e.showContour,Boolean)),"showSurface"in e&&(this.showSurface=!!e.showSurface),"contourTint"in e&&(this.contourTint=N(e.contourTint,Boolean)),"contourColor"in e&&(this.contourColor=V(e.contourColor)),"contourProject"in e&&(this.contourProject=N(e.contourProject,function(e){return N(e,Boolean)})),"surfaceProject"in e&&(this.surfaceProject=e.surfaceProject),"dynamicColor"in e&&(this.dynamicColor=V(e.dynamicColor)),"dynamicTint"in e&&(this.dynamicTint=N(e.dynamicTint,Number)),"dynamicWidth"in e&&(this.dynamicWidth=N(e.dynamicWidth,Number)),"opacity"in e&&(this.opacity=e.opacity),"opacityscale"in e&&(this.opacityscale=e.opacityscale),"colorBounds"in e&&(this.colorBounds=e.colorBounds),"vertexColor"in e&&(this.vertexColor=+!!e.vertexColor),"colormap"in e&&this._colorMap.setPixels(this.genColormap(e.colormap,this.opacityscale));var t=e.field||e.coords&&e.coords[2]||null,r=!1;if(t||(t=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in e||"coords"in e){var n=(t.shape[0]+2)*(t.shape[1]+2);n>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(i.nextPow2(n))),this._field[2]=h(this._field[2].data,[t.shape[0]+2,t.shape[1]+2]),this.padField(this._field[2],t),this.shape=t.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=h(this._field[o].data,[a[0]+2,a[1]+2]);if(e.coords){var l=e.coords;if(!Array.isArray(l)||3!==l.length)throw Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var c=l[o];for(y=0;y<2;++y)if(c.shape[y]!==a[y])throw Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],c)}}else if(e.ticks){var u=e.ticks;if(!Array.isArray(u)||2!==u.length)throw Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var f=u[o];if((Array.isArray(f)||f.length)&&(f=h(f)),f.shape[0]!==a[o])throw Error("gl-surface: invalid tick length");var p=h(f.data,a);p.stride[o]=f.stride[0],p.stride[1^o]=0,this.padField(this._field[o],p)}}else{for(o=0;o<2;++o){var m=[0,0];m[o]=1,this._field[o]=h(this._field[o].data,[a[0]+2,a[1]+2],m,0)}this._field[0].set(0,0,0);for(var y=0;y0){for(var ex=0;ex<5;++ex)J.pop();B-=1}continue e}J.push(ei[0],ei[1],eo[0],eo[1],ei[2]),B+=1}}er.push(B)}this._contourOffsets[Q]=et,this._contourCounts[Q]=er}var eb=s.mallocFloat(J.length);for(o=0;os||o[1]<0||o[1]>s)throw Error("gl-texture2d: Invalid texture size");var l=p(o,t.stride.slice()),c=0;"float32"===r?c=e.FLOAT:"float64"===r?(c=e.FLOAT,l=!1,r="float32"):"uint8"===r?c=e.UNSIGNED_BYTE:(c=e.UNSIGNED_BYTE,l=!1,r="uint8");var h=0;if(2===o.length)h=e.LUMINANCE,o=[o[0],o[1],1],t=i(t.data,o,[t.stride[0],t.stride[1],1],t.offset);else if(3===o.length)if(1===o[2])h=e.ALPHA;else if(2===o[2])h=e.LUMINANCE_ALPHA;else if(3===o[2])h=e.RGB;else if(4===o[2])h=e.RGBA;else throw Error("gl-texture2d: Invalid shape for pixel coords");else throw Error("gl-texture2d: Invalid shape for texture");c!==e.FLOAT||e.getExtension("OES_texture_float")||(c=e.UNSIGNED_BYTE,l=!1);var f,g,y=t.size;if(l)f=0===t.offset&&t.data.length===y?t.data:t.data.subarray(t.offset,t.offset+y);else{var v=[o[2],o[2]*o[0],1],x=i(g=a.malloc(y,r),o,v,0);("float32"===r||"float64"===r)&&c===e.UNSIGNED_BYTE?u(x,t):n.assign(x,t),f=g.subarray(0,y)}var b=m(e);return e.texImage2D(e.TEXTURE_2D,0,h,o[0],o[1],0,h,c,f),l||a.free(g),new d(e,b,o[0],o[1],h,c)}(e,v)}throw Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function c(e){return"u">typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"u">typeof HTMLImageElement&&e instanceof HTMLImageElement||"u">typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"u">typeof ImageData&&e instanceof ImageData}var u=function(e,t){n.muls(e,t,255)};function h(e,t,r){var i=e.gl,n=i.getParameter(i.MAX_TEXTURE_SIZE);if(t<0||t>n||r<0||r>n)throw Error("gl-texture2d: Invalid texture size");return e._shape=[t,r],e.bind(),i.texImage2D(i.TEXTURE_2D,0,e.format,t,r,0,e.format,e.type,null),e._mipLevels=[0],e}function d(e,t,r,i,n,a){this.gl=e,this.handle=t,this.format=n,this.type=a,this._shape=[r,i],this._mipLevels=[0],this._magFilter=e.NEAREST,this._minFilter=e.NEAREST,this._wrapS=e.CLAMP_TO_EDGE,this._wrapT=e.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(e){return o.wrapS=e}},{get:function(){return o._wrapT},set:function(e){return o.wrapT=e}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(e){return o.width=e}},{get:function(){return o._shape[1]},set:function(e){return o.height=e}}]),this._shapeVector=l}var f=d.prototype;function p(e,t){return 3===e.length?1===t[2]&&t[1]===e[0]*e[2]&&t[0]===e[2]:1===t[0]&&t[1]===e[0]}function m(e){var t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function g(e,t,r,i,n){var a=e.getParameter(e.MAX_TEXTURE_SIZE);if(t<0||t>a||r<0||r>a)throw Error("gl-texture2d: Invalid texture shape");if(n===e.FLOAT&&!e.getExtension("OES_texture_float"))throw Error("gl-texture2d: Floating point textures not supported on this platform");var o=m(e);return e.texImage2D(e.TEXTURE_2D,0,i,t,r,0,i,n,null),new d(e,o,t,r,i,n)}Object.defineProperties(f,{minFilter:{get:function(){return this._minFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),0>s.indexOf(e))throw Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),this._minFilter=e}},magFilter:{get:function(){return this._magFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),0>s.indexOf(e))throw Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e),this._magFilter=e}},mipSamples:{get:function(){return this._anisoSamples},set:function(e){var t=this._anisoSamples;if(this._anisoSamples=0|Math.max(e,1),t!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(e){if(this.bind(),0>l.indexOf(e))throw Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,e),this._wrapS=e}},wrapT:{get:function(){return this._wrapT},set:function(e){if(this.bind(),0>l.indexOf(e))throw Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,e),this._wrapT=e}},wrap:{get:function(){return this._wrapVector},set:function(e){if(Array.isArray(e)||(e=[e,e]),2!==e.length)throw Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var t=0;t<2;++t)if(0>l.indexOf(e[t]))throw Error("gl-texture2d: Unknown wrap mode "+e);this._wrapS=e[0],this._wrapT=e[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),e}},shape:{get:function(){return this._shapeVector},set:function(e){if(Array.isArray(e)){if(2!==e.length)throw Error("gl-texture2d: Invalid texture shape")}else e=[0|e,0|e];return h(this,0|e[0],0|e[1]),[0|e[0],0|e[1]]}},width:{get:function(){return this._shape[0]},set:function(e){return h(this,e|=0,this._shape[1]),e}},height:{get:function(){return this._shape[1]},set:function(e){return e|=0,h(this,this._shape[0],e),e}}}),f.bind=function(e){var t=this.gl;return void 0!==e&&t.activeTexture(t.TEXTURE0+(0|e)),t.bindTexture(t.TEXTURE_2D,this.handle),void 0!==e?0|e:t.getParameter(t.ACTIVE_TEXTURE)-t.TEXTURE0},f.dispose=function(){this.gl.deleteTexture(this.handle)},f.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var e=Math.min(this._shape[0],this._shape[1]),t=0;e>0;++t,e>>>=1)0>this._mipLevels.indexOf(t)&&this._mipLevels.push(t)},f.setPixels=function(e,t,r,o){var s=this.gl;this.bind(),Array.isArray(t)?(o=r,r=0|t[1],t=0|t[0]):(t=t||0,r=r||0),o=o||0;var l=c(e)?e:e.raw;if(l)0>this._mipLevels.indexOf(o)?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,t,r,this.format,this.type,l);else if(e.shape&&e.stride&&e.data){if(e.shape.length<2||t+e.shape[1]>this._shape[1]>>>o||r+e.shape[0]>this._shape[0]>>>o||t<0||r<0)throw Error("gl-texture2d: Texture dimensions are out of bounds");!function(e,t,r,o,s,l,c,h){var d=h.dtype,f=h.shape.slice();if(f.length<2||f.length>3)throw Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var m=0,g=0,y=p(f,h.stride.slice());"float32"===d?m=e.FLOAT:"float64"===d?(m=e.FLOAT,y=!1,d="float32"):"uint8"===d?m=e.UNSIGNED_BYTE:(m=e.UNSIGNED_BYTE,y=!1,d="uint8");if(2===f.length)g=e.LUMINANCE,f=[f[0],f[1],1],h=i(h.data,f,[h.stride[0],h.stride[1],1],h.offset);else if(3===f.length){if(1===f[2])g=e.ALPHA;else if(2===f[2])g=e.LUMINANCE_ALPHA;else if(3===f[2])g=e.RGB;else if(4===f[2])g=e.RGBA;else throw Error("gl-texture2d: Invalid shape for pixel coords");f[2]}else throw Error("gl-texture2d: Invalid shape for texture");if((g===e.LUMINANCE||g===e.ALPHA)&&(s===e.LUMINANCE||s===e.ALPHA)&&(g=s),g!==s)throw Error("gl-texture2d: Incompatible texture format for setPixels");var v=h.size,x=0>c.indexOf(o);if(x&&c.push(o),m===l&&y)0===h.offset&&h.data.length===v?x?e.texImage2D(e.TEXTURE_2D,o,s,f[0],f[1],0,s,l,h.data):e.texSubImage2D(e.TEXTURE_2D,o,t,r,f[0],f[1],s,l,h.data):x?e.texImage2D(e.TEXTURE_2D,o,s,f[0],f[1],0,s,l,h.data.subarray(h.offset,h.offset+v)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,f[0],f[1],s,l,h.data.subarray(h.offset,h.offset+v));else{var b=l===e.FLOAT?a.mallocFloat32(v):a.mallocUint8(v),_=i(b,f,[f[2],f[2]*f[0],1]);m===e.FLOAT&&l===e.UNSIGNED_BYTE?u(_,h):n.assign(_,h),x?e.texImage2D(e.TEXTURE_2D,o,s,f[0],f[1],0,s,l,b.subarray(0,v)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,f[0],f[1],s,l,b.subarray(0,v)),l===e.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,t,r,o,this.format,this.type,this._mipLevels,e)}else throw Error("gl-texture2d: Unsupported data type")}},1433(e){e.exports=function(e,t,r){t?t.bind():e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null);var i=0|e.getParameter(e.MAX_VERTEX_ATTRIBS);if(r){if(r.length>i)throw Error("gl-vao: Too many vertex attributes");for(var n=0;n1?0:Math.acos(s)};var i=r(2825),n=r(3536),a=r(244)},9226(e){e.exports=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}},3126(e){e.exports=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},3990(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},1091(e){e.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},5911(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=n*l-a*s,e[1]=a*o-i*l,e[2]=i*s-n*o,e}},5455(e,t,r){e.exports=r(7056)},7056(e){e.exports=function(e,t){var r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+i*i+n*n)}},4008(e,t,r){e.exports=r(6690)},6690(e){e.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}},244(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}},2613(e){e.exports=1e-6},9922(e,t,r){e.exports=function(e,t){var r=e[0],n=e[1],a=e[2],o=t[0],s=t[1],l=t[2];return Math.abs(r-o)<=i*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-s)<=i*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(a-l)<=i*Math.max(1,Math.abs(a),Math.abs(l))};var i=r(2613)},9265(e){e.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}},2681(e){e.exports=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}},5137(e,t,r){e.exports=function(e,t,r,n,a,o){var s,l;for(t||(t=3),r||(r=0),l=n?Math.min(n*t+r,e.length):e.length,s=r;s0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a),e}},7636(e){e.exports=function(e,t){var r=2*Math.random()*Math.PI,i=2*Math.random()-1,n=Math.sqrt(1-i*i)*(t=t||1);return e[0]=Math.cos(r)*n,e[1]=Math.sin(r)*n,e[2]=i*t,e}},6894(e){e.exports=function(e,t,r,i){var n=r[1],a=r[2],o=t[1]-n,s=t[2]-a,l=Math.sin(i),c=Math.cos(i);return e[0]=t[0],e[1]=n+o*c-s*l,e[2]=a+o*l+s*c,e}},109(e){e.exports=function(e,t,r,i){var n=r[0],a=r[2],o=t[0]-n,s=t[2]-a,l=Math.sin(i),c=Math.cos(i);return e[0]=n+s*l+o*c,e[1]=t[1],e[2]=a+s*c-o*l,e}},8692(e){e.exports=function(e,t,r,i){var n=r[0],a=r[1],o=t[0]-n,s=t[1]-a,l=Math.sin(i),c=Math.cos(i);return e[0]=n+o*c-s*l,e[1]=a+o*l+s*c,e[2]=t[2],e}},2447(e){e.exports=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}},6621(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}},8489(e){e.exports=function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e}},1463(e){e.exports=function(e,t,r,i){return e[0]=t,e[1]=r,e[2]=i,e}},6141(e,t,r){e.exports=r(2953)},5486(e,t,r){e.exports=r(3066)},2953(e){e.exports=function(e,t){var r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return r*r+i*i+n*n}},3066(e){e.exports=function(e){var t=e[0],r=e[1],i=e[2];return t*t+r*r+i*i}},2229(e,t,r){e.exports=r(6843)},6843(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}},492(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2];return e[0]=i*r[0]+n*r[3]+a*r[6],e[1]=i*r[1]+n*r[4]+a*r[7],e[2]=i*r[2]+n*r[5]+a*r[8],e}},5673(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[3]*i+r[7]*n+r[11]*a+r[15];return o=o||1,e[0]=(r[0]*i+r[4]*n+r[8]*a+r[12])/o,e[1]=(r[1]*i+r[5]*n+r[9]*a+r[13])/o,e[2]=(r[2]*i+r[6]*n+r[10]*a+r[14])/o,e}},264(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[0],s=r[1],l=r[2],c=r[3],u=s*a-l*n,h=l*i-o*a,d=o*n-s*i;return u*=2,h*=2,d*=2,e[0]=i+c*u+s*d-l*h,e[1]=n+c*h+l*u-o*d,e[2]=a+c*d+o*h-s*u,e}},4361(e){e.exports=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}},2335(e){e.exports=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},2933(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},7536(e){e.exports=function(){var e=new Float32Array(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}},4691(e){e.exports=function(e,t){var r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(r*r+i*i+n*n+a*a)}},1373(e){e.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}},3750(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}},3390(e){e.exports=function(e,t,r,i){var n=new Float32Array(4);return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n}},9970(e,t,r){e.exports={create:r(7536),clone:r(2335),fromValues:r(3390),copy:r(2933),set:r(4578),add:r(4361),subtract:r(6860),multiply:r(3576),divide:r(1373),min:r(2334),max:r(160),scale:r(9288),scaleAndAdd:r(4844),distance:r(4691),squaredDistance:r(7960),length:r(6808),squaredLength:r(483),negate:r(1498),inverse:r(4494),normalize:r(5177),dot:r(3750),lerp:r(2573),random:r(9131),transformMat4:r(5352),transformQuat:r(4041)}},4494(e){e.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}},6808(e){e.exports=function(e){var t=e[0],r=e[1],i=e[2],n=e[3];return Math.sqrt(t*t+r*r+i*i+n*n)}},2573(e){e.exports=function(e,t,r,i){var n=t[0],a=t[1],o=t[2],s=t[3];return e[0]=n+i*(r[0]-n),e[1]=a+i*(r[1]-a),e[2]=o+i*(r[2]-o),e[3]=s+i*(r[3]-s),e}},160(e){e.exports=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}},2334(e){e.exports=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}},3576(e){e.exports=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}},1498(e){e.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}},5177(e){e.exports=function(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r*r+i*i+n*n+a*a;return o>0&&(o=1/Math.sqrt(o),e[0]=r*o,e[1]=i*o,e[2]=n*o,e[3]=a*o),e}},9131(e,t,r){var i=r(5177),n=r(9288);e.exports=function(e,t){return t=t||1,e[0]=Math.random(),e[1]=Math.random(),e[2]=Math.random(),e[3]=Math.random(),i(e,e),n(e,e,t),e}},9288(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}},4844(e){e.exports=function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e}},4578(e){e.exports=function(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e}},7960(e){e.exports=function(e,t){var r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],a=t[3]-e[3];return r*r+i*i+n*n+a*a}},483(e){e.exports=function(e){var t=e[0],r=e[1],i=e[2],n=e[3];return t*t+r*r+i*i+n*n}},6860(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}},5352(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3];return e[0]=r[0]*i+r[4]*n+r[8]*a+r[12]*o,e[1]=r[1]*i+r[5]*n+r[9]*a+r[13]*o,e[2]=r[2]*i+r[6]*n+r[10]*a+r[14]*o,e[3]=r[3]*i+r[7]*n+r[11]*a+r[15]*o,e}},4041(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*i+s*a-l*n,h=c*n+l*i-o*a,d=c*a+o*n-s*i,f=-o*i-s*n-l*a;return e[0]=u*c+-(f*o)+-(h*l)- -(d*s),e[1]=h*c+-(f*s)+-(d*o)- -(u*l),e[2]=d*c+-(f*l)+-(u*s)- -(h*o),e[3]=t[3],e}},1848(e,t,r){var i=r(4905),n=r(6468);e.exports=function(e){for(var t=Array.isArray(e)?e:i(e),r=0;r0)continue;r=e.slice(0,1).join("")}return k(r),y+=r.length,(f=f.slice(r.length)).length}}};var i=r(620),n=r(7827),a=r(6852),o=r(7932),s=r(3508),l=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3508:function(e,t,r){var i=r(6852);e.exports=(i=i.slice().filter(function(e){return!/^(gl\_|texture)/.test(e)})).concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(e){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(e,t,r){e.exports=r(620).slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(e){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(e){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(e,t,r){var i=r(5874);e.exports=function(e,t){var r=i(t),n=[];return(n=n.concat(r(e))).concat(r(null))}},3236:function(e){e.exports=function(e){"string"==typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],i=0;i>1,u=-7,h=r?n-1:0,d=r?-1:1,f=e[t+h];for(h+=d,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=d,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=i;u>0;o=256*o+e[t+h],h+=d,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,i),a-=c}return(f?-1:1)*o*Math.pow(2,a-i)},t.write=function(e,t,r,i,n,a){var o,s,l,c=8*a-n-1,u=(1<>1,d=5960464477539062e-23*(23===n),f=i?0:a-1,p=i?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,n),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,n),o=0));n>=8;e[r+f]=255&s,f+=p,s/=256,n-=8);for(o=o<0;e[r+f]=255&o,f+=p,o/=256,c-=8);e[r+f-p]|=128*m}},8954:function(e,t,r){e.exports=function(e,t){var r=e.length;if(0===r)throw Error("Must have at least d+1 points");var n=e[0].length;if(r<=n)throw Error("Must input at least d+1 points");var o=e.slice(0,n+1),s=i.apply(void 0,o);if(0===s)throw Error("Input not in general position");for(var l=Array(n+1),u=0;u<=n;++u)l[u]=u;s<0&&(l[0]=1,l[1]=0);for(var h=new a(l,Array(n+1),!1),d=h.adjacent,f=Array(n+2),u=0;u<=n;++u){for(var p=l.slice(),m=0;m<=n;++m)m===u&&(p[m]=-1);var g=p[0];p[0]=p[1],p[1]=g;var y=new a(p,Array(n+1),!0);d[u]=y,f[u]=y}f[n+1]=h;for(var u=0;u<=n;++u)for(var p=d[u].vertices,v=d[u].adjacent,m=0;m<=n;++m){var x=p[m];if(x<0){v[m]=h;continue}for(var b=0;b<=n;++b)0>d[b].vertices.indexOf(x)&&(v[m]=d[b])}for(var _=new c(n,o,f),w=!!t,u=n+1;u0;){e=o.pop();for(var s=e.adjacent,l=0;l<=r;++l){var c=s[l];if(!(!c.boundary||c.lastVisited<=-i)){for(var u=c.vertices,h=0;h<=r;++h){var d=u[h];d<0?n[h]=t:n[h]=a[d]}var f=this.orient();if(f>0)return c;c.lastVisited=-i,0===f&&o.push(c)}}}return null},u.walk=function(e,t){var r=this.vertices.length-1,i=this.dimension,n=this.vertices,a=this.tuple,o=t?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];e:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=i;++u)a[u]=n[l[u]];s.lastVisited=r;for(var u=0;u<=i;++u){var h=c[u];if(!(h.lastVisited>=r)){var d=a[u];a[u]=e;var f=this.orient();if(a[u]=d,f<0){s=h;continue e}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},u.addPeaks=function(e,t){var r=this.vertices.length-1,i=this.dimension,n=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,h=[t];t.lastVisited=r,t.vertices[t.vertices.indexOf(-1)]=r,t.boundary=!1,c.push(t);for(var d=[];h.length>0;){var t=h.pop(),f=t.vertices,p=t.adjacent,m=f.indexOf(r);if(!(m<0)){for(var g=0;g<=i;++g)if(g!==m){var y=p[g];if(!(!y.boundary||y.lastVisited>=r)){var v=y.vertices;if(y.lastVisited!==-r){for(var x=0,b=0;b<=i;++b)v[b]<0?(x=b,l[b]=e):l[b]=n[v[b]];if(this.orient()>0){v[x]=r,y.boundary=!1,c.push(y),h.push(y),y.lastVisited=r;continue}y.lastVisited=-r}var _=y.adjacent,w=f.slice(),T=p.slice(),M=new a(w,T,!0);u.push(M);var k=_.indexOf(t);if(!(k<0)){_[k]=M,T[m]=y,w[g]=-1,T[g]=t,p[g]=M,M.flip();for(var b=0;b<=i;++b){var A=w[b];if(!(A<0||A===r)){for(var S=Array(i-1),E=0,C=0;C<=i;++C){var L=w[C];L<0||C===b||(S[E++]=L)}d.push(new o(S,M,b))}}}}}}}d.sort(s);for(var g=0;g+1=0?o[l++]=s[u]:c=1&u;if(c===(1&e)){var h=o[0];o[0]=o[1],o[1]=h}t.push(o)}}return t}},3352:function(e,t,r){var i=r(2478);function n(e,t,r,i,n){this.mid=e,this.left=t,this.right=r,this.leftPoints=i,this.rightPoints=n,this.count=(t?t.count:0)+(r?r.count:0)+i.length}e.exports=function(e){return new y(e&&0!==e.length?g(e):null)};var a=n.prototype;function o(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function s(e,t){var r=g(t);e.mid=r.mid,e.left=r.left,e.right=r.right,e.leftPoints=r.leftPoints,e.rightPoints=r.rightPoints,e.count=r.count}function l(e,t){var r=e.intervals([]);r.push(t),s(e,r)}function c(e,t){var r=e.intervals([]),i=r.indexOf(t);return i<0?0:(r.splice(i,1),s(e,r),1)}function u(e,t,r){for(var i=0;i=0&&e[i][1]>=t;--i){var n=r(e[i]);if(n)return n}}function d(e,t){for(var r=0;r>1],a=[],o=[],s=[],r=0;r3*(t+1)?l(this,e):this.left.insert(e):this.left=g([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?l(this,e):this.right.insert(e):this.right=g([e]);else{var r=i.ge(this.leftPoints,e,p),n=i.ge(this.rightPoints,e,m);this.leftPoints.splice(r,0,e),this.rightPoints.splice(n,0,e)}},a.remove=function(e){var t=this.count-this.leftPoints;if(e[1]3*(t-1))return c(this,e);var r=this.left.remove(e);return 2===r?(this.left=null,this.count-=1,1):(1===r&&(this.count-=1),r)}if(e[0]>this.mid){if(!this.right)return 0;if(4*(this.left?this.left.count:0)>3*(t-1))return c(this,e);var r=this.right.remove(e);return 2===r?(this.right=null,this.count-=1,1):(1===r&&(this.count-=1),r)}if(1===this.count)return 2*(this.leftPoints[0]===e);if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var n=this,a=this.left;a.right;)n=a,a=a.right;if(n===this)a.right=this.right;else{var s=this.left,r=this.right;n.count-=a.count,n.right=a.left,a.left=s,a.right=r}o(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(var s=i.ge(this.leftPoints,e,p);sthis.mid))return d(this.leftPoints,t);if(this.right){var r=this.right.queryPoint(e,t);if(r)return r}return h(this.rightPoints,e,t)},a.queryInterval=function(e,t,r){if(ethis.mid&&this.right){var i=this.right.queryInterval(e,t,r);if(i)return i}return tthis.mid?h(this.rightPoints,e,r):d(this.leftPoints,r)};var v=y.prototype;v.insert=function(e){this.root?this.root.insert(e):this.root=new n(e[0],null,null,[e],[e])},v.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},v.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},v.queryInterval=function(e,t,r){if(e<=t&&this.root)return this.root.queryInterval(e,t,r)},Object.defineProperty(v,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(v,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},9507:function(e){e.exports=!0},7163:function(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){var r;return null!=e&&(t(e)||"function"==typeof(r=e).readFloatLE&&"function"==typeof r.slice&&t(r.slice(0,0))||!!e._isBuffer)}},5219:function(e){e.exports=function(e){for(var t,r=e.length,i=0;i13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},395:function(e){e.exports=function(e,t,r){return e*(1-r)+t*r}},2652:function(e,t,r){var i=r(4335),n=r(6864),a=r(1903),o=r(9921),s=r(7608),l=r(5665),c={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},u=n(),h=n(),d=[0,0,0,0],f=[[0,0,0],[0,0,0],[0,0,0]],p=[0,0,0];function m(e,t,r,i,n){e[0]=t[0]*i+r[0]*n,e[1]=t[1]*i+r[1]*n,e[2]=t[2]*i+r[2]*n}e.exports=function(e,t,r,n,g,y){if(t||(t=[0,0,0]),r||(r=[0,0,0]),n||(n=[0,0,0]),g||(g=[0,0,0,1]),y||(y=[0,0,0,1]),!i(u,e)||(a(h,u),h[3]=0,h[7]=0,h[11]=0,h[15]=1,Math.abs(1e-8>o(h))))return!1;var v,x,b,_,w,T,M,k,A,S=u[3],E=u[7],C=u[11],L=u[12],P=u[13],I=u[14],z=u[15];if(0!==S||0!==E||0!==C){if(d[0]=S,d[1]=E,d[2]=C,d[3]=z,!s(h,h))return!1;l(h,h),v=g,x=d,b=h,_=x[0],w=x[1],T=x[2],M=x[3],v[0]=b[0]*_+b[4]*w+b[8]*T+b[12]*M,v[1]=b[1]*_+b[5]*w+b[9]*T+b[13]*M,v[2]=b[2]*_+b[6]*w+b[10]*T+b[14]*M,v[3]=b[3]*_+b[7]*w+b[11]*T+b[15]*M}else g[0]=g[1]=g[2]=0,g[3]=1;if(t[0]=L,t[1]=P,t[2]=I,k=f,A=u,k[0][0]=A[0],k[0][1]=A[1],k[0][2]=A[2],k[1][0]=A[4],k[1][1]=A[5],k[1][2]=A[6],k[2][0]=A[8],k[2][1]=A[9],k[2][2]=A[10],r[0]=c.length(f[0]),c.normalize(f[0],f[0]),n[0]=c.dot(f[0],f[1]),m(f[1],f[1],f[0],1,-n[0]),r[1]=c.length(f[1]),c.normalize(f[1],f[1]),n[0]/=r[1],n[1]=c.dot(f[0],f[2]),m(f[2],f[2],f[0],1,-n[1]),n[2]=c.dot(f[1],f[2]),m(f[2],f[2],f[1],1,-n[2]),r[2]=c.length(f[2]),c.normalize(f[2],f[2]),n[1]/=r[2],n[2]/=r[2],c.cross(p,f[1],f[2]),0>c.dot(f[0],p))for(var D=0;D<3;D++)r[D]*=-1,f[D][0]*=-1,f[D][1]*=-1,f[D][2]*=-1;return y[0]=.5*Math.sqrt(Math.max(1+f[0][0]-f[1][1]-f[2][2],0)),y[1]=.5*Math.sqrt(Math.max(1-f[0][0]+f[1][1]-f[2][2],0)),y[2]=.5*Math.sqrt(Math.max(1-f[0][0]-f[1][1]+f[2][2],0)),y[3]=.5*Math.sqrt(Math.max(1+f[0][0]+f[1][1]+f[2][2],0)),f[2][1]>f[1][2]&&(y[0]=-y[0]),f[0][2]>f[2][0]&&(y[1]=-y[1]),f[1][0]>f[0][1]&&(y[2]=-y[2]),!0}},4335:function(e){e.exports=function(e,t){var r=t[15];if(0===r)return!1;for(var i=1/r,n=0;n<16;n++)e[n]=t[n]*i;return!0}},7442:function(e,t,r){var i=r(6658),n=r(7182),a=r(2652),o=r(9921),s=r(8648),l=h(),c=h(),u=h();function h(){return{translate:d(),scale:d(1),skew:d(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function d(e){return[e||0,e||0,e||0]}e.exports=function(e,t,r,h){if(0===o(t)||0===o(r))return!1;var d=a(t,l.translate,l.scale,l.skew,l.perspective,l.quaternion),f=a(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!!d&&!!f&&(i(u.translate,l.translate,c.translate,h),i(u.skew,l.skew,c.skew,h),i(u.scale,l.scale,c.scale,h),i(u.perspective,l.perspective,c.perspective,h),s(u.quaternion,l.quaternion,c.quaternion,h),n(e,u.translate,u.scale,u.skew,u.perspective,u.quaternion),!0)}},7182:function(e,t,r){var i={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)},n=(i.create(),i.create());e.exports=function(e,t,r,a,o,s){return i.identity(e),i.fromRotationTranslation(e,s,t),e[3]=o[0],e[7]=o[1],e[11]=o[2],e[15]=o[3],i.identity(n),0!==a[2]&&(n[9]=a[2],i.multiply(e,e,n)),0!==a[1]&&(n[9]=0,n[8]=a[1],i.multiply(e,e,n)),0!==a[0]&&(n[8]=0,n[4]=a[0],i.multiply(e,e,n)),i.scale(e,e,r),e}},1811:function(e,t,r){var i=r(2478),n=r(7442),a=r(7608),o=r(5567),s=r(2408),l=r(7089),c=r(6582),u=r(7656),h=(r(2504),r(3536)),d=[0,0,0];function f(e){this._components=e.slice(),this._time=[0],this.prevMatrix=e.slice(),this.nextMatrix=e.slice(),this.computedMatrix=e.slice(),this.computedInverse=e.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]}e.exports=function(e){return new f((e=e||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var p=f.prototype;p.recalcMatrix=function(e){var t=this._time,r=i.le(t,e),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===t.length-1)for(var l=16*r,c=0;c<16;++c)o[c]=s[l++];else{for(var u=t[r+1]-t[r],l=16*r,d=this.prevMatrix,f=!0,c=0;c<16;++c)d[c]=s[l++];for(var p=this.nextMatrix,c=0;c<16;++c)p[c]=s[l++],f=f&&d[c]===p[c];if(u<1e-6||f)for(var c=0;c<16;++c)o[c]=d[c];else n(o,d,p,(e-t[r])/u)}var m=this.computedUp;m[0]=o[1],m[1]=o[5],m[2]=o[9],h(m,m);var g=this.computedInverse;a(g,o);var y=this.computedEye,v=g[15];y[0]=g[12]/v,y[1]=g[13]/v,y[2]=g[14]/v;for(var x=this.computedCenter,b=Math.exp(this.computedRadius[0]),c=0;c<3;++c)x[c]=y[c]-o[2+4*c]*b}},p.idle=function(e){if(!(e1&&0>=i(e[o[u-2]],e[o[u-1]],c);)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&i(e[s[u-2]],e[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}for(var r=Array(s.length+o.length-2),h=0,n=0,d=o.length;n0;--f)r[h++]=s[f];return r};var i=r(3250)[3]},351:function(e,t,r){e.exports=function(e,t){t||(t=e,e=window);var r=0,n=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==o.alt,o.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==o.shift,o.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==o.control,o.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==o.meta,o.meta=!!e.metaKey),t}function c(e,s){var c=i.x(s),u=i.y(s);"buttons"in s&&(e=0|s.buttons),(e!==r||c!==n||u!==a||l(s))&&(r=0|e,n=c||0,a=u||0,t&&t(r,n,a,o))}function u(e){c(0,e)}function h(){(r||n||a||o.shift||o.alt||o.meta||o.control)&&(n=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,t&&t(0,0,0,o))}function d(e){l(e)&&t&&t(r,n,a,o)}function f(e){0===i.buttons(e)?c(0,e):c(r,e)}function p(e){c(r|i.buttons(e),e)}function m(e){c(r&~i.buttons(e),e)}function g(){s||(s=!0,e.addEventListener("mousemove",f),e.addEventListener("mousedown",p),e.addEventListener("mouseup",m),e.addEventListener("mouseleave",u),e.addEventListener("mouseenter",u),e.addEventListener("mouseout",u),e.addEventListener("mouseover",u),e.addEventListener("blur",h),e.addEventListener("keyup",d),e.addEventListener("keydown",d),e.addEventListener("keypress",d),e!==window&&(window.addEventListener("blur",h),window.addEventListener("keyup",d),window.addEventListener("keydown",d),window.addEventListener("keypress",d)))}g();var y={element:e};return Object.defineProperties(y,{enabled:{get:function(){return s},set:function(t){t?g():s&&(s=!1,e.removeEventListener("mousemove",f),e.removeEventListener("mousedown",p),e.removeEventListener("mouseup",m),e.removeEventListener("mouseleave",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseout",u),e.removeEventListener("mouseover",u),e.removeEventListener("blur",h),e.removeEventListener("keyup",d),e.removeEventListener("keydown",d),e.removeEventListener("keypress",d),e!==window&&(window.removeEventListener("blur",h),window.removeEventListener("keyup",d),window.removeEventListener("keydown",d),window.removeEventListener("keypress",d)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return n},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),y};var i=r(4687)},24:function(e){var t={left:0,top:0};e.exports=function(e,r,i){r=r||e.currentTarget||e.srcElement,Array.isArray(i)||(i=[0,0]);var n,a=e.clientX||0,o=e.clientY||0,s=(n=r)===window||n===document||n===document.body?t:n.getBoundingClientRect();return i[0]=a-s.left,i[1]=o-s.top,i}},4687:function(e,t){function r(e){return e.target||e.srcElement||window}t.buttons=function(e){if("object"==typeof e){if("buttons"in e)return e.buttons;if("which"in e){var t=e.which;if(2===t)return 4;if(3===t)return 2;if(t>0)return 1<=0)return 1<(e.scalarArguments||0)&&t("Scalar arg count must be > 0"),"function"!=typeof e.vertex&&t("Must specify vertex creation function"),"function"!=typeof e.cell&&t("Must specify cell creation function"),"function"!=typeof e.phase&&t("Must specify phase function");for(var c=e.getters||[],u=Array(l),h=0;h=0?u[h]=!0:u[h]=!1;return r=e.vertex,a=e.cell,o=e.phase,(0,n[[u,s].join(",")])(r,a,o,i.mallocUint32,i.freeUint32)};var n={"false,0,1":function(e,t,r,i,n){return function(a,o,s,l){var c,u=0|a.shape[0],h=0|a.shape[1],d=a.data,f=0|a.offset,p=0|a.stride[0],m=0|a.stride[1],g=f,y=0|-p,v=0,x=0|-m,b=0,_=-p-m|0,w=0,T=0|p,M=m-p*u|0,k=0,A=0,S=0,E=2*u|0,C=i(E),L=i(E),P=0,I=0,z=-1,D=-1,O=0,R=0|-u,F=0|u,j=0,B=-u-1|0,N=u-1|0,U=0,V=0,q=0;for(k=0;k0){if(A=1,C[P++]=r(d[g],o,s,l),g+=T,u>0)for(k=1,c=d[g],I=C[P]=r(c,o,s,l),O=C[P+z],j=C[P+R],U=C[P+B],(I!==O||I!==j||I!==U)&&(v=d[g+y],e(k,A,c,v,b=d[g+x],w=d[g+_],I,O,j,U,o,s,l),V=L[P]=S++),P+=1,g+=T,k=2;k0)for(k=1,c=d[g],I=C[P]=r(c,o,s,l),O=C[P+z],j=C[P+R],U=C[P+B],(I!==O||I!==j||I!==U)&&(v=d[g+y],e(k,A,c,v,b=d[g+x],w=d[g+_],I,O,j,U,o,s,l),V=L[P]=S++,U!==j&&t(L[P+R],V,b,w,j,U,o,s,l)),P+=1,g+=T,k=2;k0){if(k=1,C[P++]=r(d[g],o,s,l),g+=T,h>0)for(A=1,c=d[g],I=C[P]=r(c,o,s,l),j=C[P+R],O=C[P+z],U=C[P+B],(I!==j||I!==O||I!==U)&&(v=d[g+y],e(k,A,c,v,b=d[g+x],w=d[g+_],I,j,O,U,o,s,l),V=L[P]=S++),P+=1,g+=T,A=2;A0)for(A=1,c=d[g],I=C[P]=r(c,o,s,l),j=C[P+R],O=C[P+z],U=C[P+B],(I!==j||I!==O||I!==U)&&(v=d[g+y],e(k,A,c,v,b=d[g+x],w=d[g+_],I,j,O,U,o,s,l),V=L[P]=S++,U!==j&&t(L[P+R],V,w,v,U,j,o,s,l)),P+=1,g+=T,A=2;A2&&a[1]>2&&i(n.pick(-1,-1).lo(1,1).hi(a[0]-2,a[1]-2),e.pick(-1,-1,0).lo(1,1).hi(a[0]-2,a[1]-2),e.pick(-1,-1,1).lo(1,1).hi(a[0]-2,a[1]-2)),a[1]>2&&(r(n.pick(0,-1).lo(1).hi(a[1]-2),e.pick(0,-1,1).lo(1).hi(a[1]-2)),t(e.pick(0,-1,0).lo(1).hi(a[1]-2))),a[1]>2&&(r(n.pick(a[0]-1,-1).lo(1).hi(a[1]-2),e.pick(a[0]-1,-1,1).lo(1).hi(a[1]-2)),t(e.pick(a[0]-1,-1,0).lo(1).hi(a[1]-2))),a[0]>2&&(r(n.pick(-1,0).lo(1).hi(a[0]-2),e.pick(-1,0,0).lo(1).hi(a[0]-2)),t(e.pick(-1,0,1).lo(1).hi(a[0]-2))),a[0]>2&&(r(n.pick(-1,a[1]-1).lo(1).hi(a[0]-2),e.pick(-1,a[1]-1,0).lo(1).hi(a[0]-2)),t(e.pick(-1,a[1]-1,1).lo(1).hi(a[0]-2))),e.set(0,0,0,0),e.set(0,0,1,0),e.set(a[0]-1,0,0,0),e.set(a[0]-1,0,1,0),e.set(0,a[1]-1,0,0),e.set(0,a[1]-1,1,0),e.set(a[0]-1,a[1]-1,0,0),e.set(a[0]-1,a[1]-1,1,0),e}}e.exports=function(e,t,r){return(Array.isArray(r)||(r="string"==typeof r?i(t.dimension,r):i(t.dimension,"clamp")),0===t.size)?e:0===t.dimension?(e.set(0),e):(function(e){var t,r=e.join(),i=c[r];if(i)return i;for(var n=e.length,a=[u,h],o=1;o<=n;++o)a.push((t=o)in l?l[t]:l[t]=s({funcName:"fdTemplate"+t}));var i=d.apply(void 0,a);return c[r]=i,i})(r)(e,t)}},4317:function(e){function t(e,t){var r=Math.floor(t),i=t-r,n=0<=r&&r0;){x<64?(l=x,x=0):(l=64,x-=64);for(var b=0|e[1];b>0;){b<64?(c=b,b=0):(c=64,b-=64),i=y+x*h+b*d,o=v+x*p+b*m;var _=0,w=0,T=0,M=h-u*f,k=d-l*h,A=p-u*g,S=m-l*p;for(T=0;T0;){m<64?(l=m,m=0):(l=64,m-=64);for(var g=0|e[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),i=f+m*u+g*c,o=p+m*d+g*h;var y=0,v=0,x=c-l*u,b=h-l*d;for(v=0;v0;){v<64?(c=v,v=0):(c=64,v-=64);for(var x=0|e[0];x>0;){x<64?(s=x,x=0):(s=64,x-=64);for(var b=0|e[1];b>0;){b<64?(l=b,b=0):(l=64,b-=64),i=g+v*d+x*u+b*h,o=y+v*m+x*f+b*p;var _=0,w=0,T=0,M=u-c*d,k=h-s*u,A=f-c*m,S=p-s*f;for(T=0;Tr;){for(y=0,v=m-o,g=0;gb)break;v+=h,y+=d}for(y=m,v=m-o,g=0;g>1,H=q-N,G=q+N,W=U,Y=H,Z=q,$=G,X=V,K=n+1,J=a-1,Q=!0,ee=0,et=0,er=0,ei=t(h),en=t(h);for(k=l*W,A=l*Y,B=s,M=0;M0){g=W,W=Y,Y=g;break}if(er<0)break;B+=f}for(k=l*$,A=l*X,B=s,M=0;M0){g=$,$=X,X=g;break}if(er<0)break;B+=f}for(k=l*W,A=l*Z,B=s,M=0;M0){g=W,W=Z,Z=g;break}if(er<0)break;B+=f}for(k=l*Y,A=l*Z,B=s,M=0;M0){g=Y,Y=Z,Z=g;break}if(er<0)break;B+=f}for(k=l*W,A=l*$,B=s,M=0;M0){g=W,W=$,$=g;break}if(er<0)break;B+=f}for(k=l*Z,A=l*$,B=s,M=0;M0){g=Z,Z=$,$=g;break}if(er<0)break;B+=f}for(k=l*Y,A=l*X,B=s,M=0;M0){g=Y,Y=X,X=g;break}if(er<0)break;B+=f}for(k=l*Y,A=l*Z,B=s,M=0;M0){g=Y,Y=Z,Z=g;break}if(er<0)break;B+=f}for(k=l*$,A=l*X,B=s,M=0;M0){g=$,$=X,X=g;break}if(er<0)break;B+=f}for(k=l*W,A=l*Y,S=l*Z,E=l*$,C=l*X,L=l*U,P=l*q,I=l*V,j=0,B=s,M=0;M0)J--;else if(er<0){for(k=l*b,A=l*K,S=l*J,B=s,M=0;M0)for(;;){for(_=s+J*l,j=0,M=0;M0){if(--JV){e:for(;;){for(_=s+K*l,j=0,B=s,M=0;M1&&l?c(h,l[0],l[1]):c(h));return u(h,d)}},446:function(e,t,r){var i=r(7640),n={};e.exports=function(e){var t=e.order,r=e.dtype,a=[t,r].join(":"),o=n[a];return o||(n[a]=o=i(t,r)),o(e),e}},9618:function(e,t,r){var i=r(7163),n="u">typeof Float64Array;function a(e,t){return e[0]-t[0]}function o(){var e,t=this.stride,r=Array(t.length);for(e=0;e=0&&(t+=a*(r=0|e),n-=r),new i(this.data,n,a,t)},n.step=function(e){var t=this.shape[0],r=this.stride[0],n=this.offset,a=0,o=Math.ceil;return"number"==typeof e&&((a=0|e)<0?(n+=r*(t-1),t=o(-t/a)):t=o(t/a),r*=a),new i(this.data,t,r,n)},n.transpose=function(e){e=void 0===e?0:0|e;var t=this.shape,r=this.stride;return new i(this.data,t[e],r[e],this.offset)},n.pick=function(e){var r=[],i=[],n=this.offset;return"number"==typeof e&&e>=0?n=n+this.stride[0]*e|0:(r.push(this.shape[0]),i.push(this.stride[0])),(0,t[r.length+1])(this.data,r,i,n)},function(e,t,r,n){return new i(e,t[0],r[0],n)}},2:function(e,t,r){function i(e,t,r,i,n,a){this.data=e,this.shape=[t,r],this.stride=[i,n],this.offset=0|a}var n=i.prototype;return n.dtype=e,n.dimension=2,Object.defineProperty(n,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(n,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),n.set=function(t,r,i){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r,i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]=i},n.get=function(t,r){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]},n.index=function(e,t){return this.offset+this.stride[0]*e+this.stride[1]*t},n.hi=function(e,t){return new i(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,this.stride[0],this.stride[1],this.offset)},n.lo=function(e,t){var r=this.offset,n=0,a=this.shape[0],o=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"==typeof e&&e>=0&&(r+=s*(n=0|e),a-=n),"number"==typeof t&&t>=0&&(r+=l*(n=0|t),o-=n),new i(this.data,a,o,s,l,r)},n.step=function(e,t){var r=this.shape[0],n=this.shape[1],a=this.stride[0],o=this.stride[1],s=this.offset,l=0,c=Math.ceil;return"number"==typeof e&&((l=0|e)<0?(s+=a*(r-1),r=c(-r/l)):r=c(r/l),a*=l),"number"==typeof t&&((l=0|t)<0?(s+=o*(n-1),n=c(-n/l)):n=c(n/l),o*=l),new i(this.data,r,n,a,o,s)},n.transpose=function(e,t){e=void 0===e?0:0|e,t=void 0===t?1:0|t;var r=this.shape,n=this.stride;return new i(this.data,r[e],r[t],n[e],n[t],this.offset)},n.pick=function(e,r){var i=[],n=[],a=this.offset;return"number"==typeof e&&e>=0?a=a+this.stride[0]*e|0:(i.push(this.shape[0]),n.push(this.stride[0])),"number"==typeof r&&r>=0?a=a+this.stride[1]*r|0:(i.push(this.shape[1]),n.push(this.stride[1])),(0,t[i.length+1])(this.data,i,n,a)},function(e,t,r,n){return new i(e,t[0],t[1],r[0],r[1],n)}},3:function(e,t,r){function i(e,t,r,i,n,a,o,s){this.data=e,this.shape=[t,r,i],this.stride=[n,a,o],this.offset=0|s}var n=i.prototype;return n.dtype=e,n.dimension=3,Object.defineProperty(n,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(n,"order",{get:function(){var e=Math.abs(this.stride[0]),t=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return e>t?t>r?[2,1,0]:e>r?[1,2,0]:[1,0,2]:e>r?[2,0,1]:r>t?[0,1,2]:[0,2,1]}}),n.set=function(t,r,i,n){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i,n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i]=n},n.get=function(t,r,i){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i]},n.index=function(e,t,r){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r},n.hi=function(e,t,r){return new i(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},n.lo=function(e,t,r){var n=this.offset,a=0,o=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.stride[0],u=this.stride[1],h=this.stride[2];return"number"==typeof e&&e>=0&&(n+=c*(a=0|e),o-=a),"number"==typeof t&&t>=0&&(n+=u*(a=0|t),s-=a),"number"==typeof r&&r>=0&&(n+=h*(a=0|r),l-=a),new i(this.data,o,s,l,c,u,h,n)},n.step=function(e,t,r){var n=this.shape[0],a=this.shape[1],o=this.shape[2],s=this.stride[0],l=this.stride[1],c=this.stride[2],u=this.offset,h=0,d=Math.ceil;return"number"==typeof e&&((h=0|e)<0?(u+=s*(n-1),n=d(-n/h)):n=d(n/h),s*=h),"number"==typeof t&&((h=0|t)<0?(u+=l*(a-1),a=d(-a/h)):a=d(a/h),l*=h),"number"==typeof r&&((h=0|r)<0?(u+=c*(o-1),o=d(-o/h)):o=d(o/h),c*=h),new i(this.data,n,a,o,s,l,c,u)},n.transpose=function(e,t,r){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r;var n=this.shape,a=this.stride;return new i(this.data,n[e],n[t],n[r],a[e],a[t],a[r],this.offset)},n.pick=function(e,r,i){var n=[],a=[],o=this.offset;return"number"==typeof e&&e>=0?o=o+this.stride[0]*e|0:(n.push(this.shape[0]),a.push(this.stride[0])),"number"==typeof r&&r>=0?o=o+this.stride[1]*r|0:(n.push(this.shape[1]),a.push(this.stride[1])),"number"==typeof i&&i>=0?o=o+this.stride[2]*i|0:(n.push(this.shape[2]),a.push(this.stride[2])),(0,t[n.length+1])(this.data,n,a,o)},function(e,t,r,n){return new i(e,t[0],t[1],t[2],r[0],r[1],r[2],n)}},4:function(e,t,r){function i(e,t,r,i,n,a,o,s,l,c){this.data=e,this.shape=[t,r,i,n],this.stride=[a,o,s,l],this.offset=0|c}var n=i.prototype;return n.dtype=e,n.dimension=4,Object.defineProperty(n,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(n,"order",{get:r}),n.set=function(t,r,i,n,a){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n,a):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n]=a},n.get=function(t,r,i,n){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n]},n.index=function(e,t,r,i){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*i},n.hi=function(e,t,r,n){return new i(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof n||n<0?this.shape[3]:0|n,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},n.lo=function(e,t,r,n){var a=this.offset,o=0,s=this.shape[0],l=this.shape[1],c=this.shape[2],u=this.shape[3],h=this.stride[0],d=this.stride[1],f=this.stride[2],p=this.stride[3];return"number"==typeof e&&e>=0&&(a+=h*(o=0|e),s-=o),"number"==typeof t&&t>=0&&(a+=d*(o=0|t),l-=o),"number"==typeof r&&r>=0&&(a+=f*(o=0|r),c-=o),"number"==typeof n&&n>=0&&(a+=p*(o=0|n),u-=o),new i(this.data,s,l,c,u,h,d,f,p,a)},n.step=function(e,t,r,n){var a=this.shape[0],o=this.shape[1],s=this.shape[2],l=this.shape[3],c=this.stride[0],u=this.stride[1],h=this.stride[2],d=this.stride[3],f=this.offset,p=0,m=Math.ceil;return"number"==typeof e&&((p=0|e)<0?(f+=c*(a-1),a=m(-a/p)):a=m(a/p),c*=p),"number"==typeof t&&((p=0|t)<0?(f+=u*(o-1),o=m(-o/p)):o=m(o/p),u*=p),"number"==typeof r&&((p=0|r)<0?(f+=h*(s-1),s=m(-s/p)):s=m(s/p),h*=p),"number"==typeof n&&((p=0|n)<0?(f+=d*(l-1),l=m(-l/p)):l=m(l/p),d*=p),new i(this.data,a,o,s,l,c,u,h,d,f)},n.transpose=function(e,t,r,n){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,n=void 0===n?3:0|n;var a=this.shape,o=this.stride;return new i(this.data,a[e],a[t],a[r],a[n],o[e],o[t],o[r],o[n],this.offset)},n.pick=function(e,r,i,n){var a=[],o=[],s=this.offset;return"number"==typeof e&&e>=0?s=s+this.stride[0]*e|0:(a.push(this.shape[0]),o.push(this.stride[0])),"number"==typeof r&&r>=0?s=s+this.stride[1]*r|0:(a.push(this.shape[1]),o.push(this.stride[1])),"number"==typeof i&&i>=0?s=s+this.stride[2]*i|0:(a.push(this.shape[2]),o.push(this.stride[2])),"number"==typeof n&&n>=0?s=s+this.stride[3]*n|0:(a.push(this.shape[3]),o.push(this.stride[3])),(0,t[a.length+1])(this.data,a,o,s)},function(e,t,r,n){return new i(e,t[0],t[1],t[2],t[3],r[0],r[1],r[2],r[3],n)}},5:function(e,t,r){function i(e,t,r,i,n,a,o,s,l,c,u,h){this.data=e,this.shape=[t,r,i,n,a],this.stride=[o,s,l,c,u],this.offset=0|h}var n=i.prototype;return n.dtype=e,n.dimension=5,Object.defineProperty(n,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(n,"order",{get:r}),n.set=function(t,r,i,n,a,o){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n+this.stride[4]*a,o):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n+this.stride[4]*a]=o},n.get=function(t,r,i,n,a){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n+this.stride[4]*a):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n+this.stride[4]*a]},n.index=function(e,t,r,i,n){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*i+this.stride[4]*n},n.hi=function(e,t,r,n,a){return new i(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof n||n<0?this.shape[3]:0|n,"number"!=typeof a||a<0?this.shape[4]:0|a,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},n.lo=function(e,t,r,n,a){var o=this.offset,s=0,l=this.shape[0],c=this.shape[1],u=this.shape[2],h=this.shape[3],d=this.shape[4],f=this.stride[0],p=this.stride[1],m=this.stride[2],g=this.stride[3],y=this.stride[4];return"number"==typeof e&&e>=0&&(o+=f*(s=0|e),l-=s),"number"==typeof t&&t>=0&&(o+=p*(s=0|t),c-=s),"number"==typeof r&&r>=0&&(o+=m*(s=0|r),u-=s),"number"==typeof n&&n>=0&&(o+=g*(s=0|n),h-=s),"number"==typeof a&&a>=0&&(o+=y*(s=0|a),d-=s),new i(this.data,l,c,u,h,d,f,p,m,g,y,o)},n.step=function(e,t,r,n,a){var o=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.shape[3],u=this.shape[4],h=this.stride[0],d=this.stride[1],f=this.stride[2],p=this.stride[3],m=this.stride[4],g=this.offset,y=0,v=Math.ceil;return"number"==typeof e&&((y=0|e)<0?(g+=h*(o-1),o=v(-o/y)):o=v(o/y),h*=y),"number"==typeof t&&((y=0|t)<0?(g+=d*(s-1),s=v(-s/y)):s=v(s/y),d*=y),"number"==typeof r&&((y=0|r)<0?(g+=f*(l-1),l=v(-l/y)):l=v(l/y),f*=y),"number"==typeof n&&((y=0|n)<0?(g+=p*(c-1),c=v(-c/y)):c=v(c/y),p*=y),"number"==typeof a&&((y=0|a)<0?(g+=m*(u-1),u=v(-u/y)):u=v(u/y),m*=y),new i(this.data,o,s,l,c,u,h,d,f,p,m,g)},n.transpose=function(e,t,r,n,a){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,n=void 0===n?3:0|n,a=void 0===a?4:0|a;var o=this.shape,s=this.stride;return new i(this.data,o[e],o[t],o[r],o[n],o[a],s[e],s[t],s[r],s[n],s[a],this.offset)},n.pick=function(e,r,i,n,a){var o=[],s=[],l=this.offset;return"number"==typeof e&&e>=0?l=l+this.stride[0]*e|0:(o.push(this.shape[0]),s.push(this.stride[0])),"number"==typeof r&&r>=0?l=l+this.stride[1]*r|0:(o.push(this.shape[1]),s.push(this.stride[1])),"number"==typeof i&&i>=0?l=l+this.stride[2]*i|0:(o.push(this.shape[2]),s.push(this.stride[2])),"number"==typeof n&&n>=0?l=l+this.stride[3]*n|0:(o.push(this.shape[3]),s.push(this.stride[3])),"number"==typeof a&&a>=0?l=l+this.stride[4]*a|0:(o.push(this.shape[4]),s.push(this.stride[4])),(0,t[o.length+1])(this.data,o,s,l)},function(e,t,r,n){return new i(e,t[0],t[1],t[2],t[3],t[4],r[0],r[1],r[2],r[3],r[4],n)}}},l={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};e.exports=function(e,t,r,a){if(void 0===e){var c=l.array[0];return c([])}"number"==typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var u=t.length;if(void 0===r){r=Array(u);for(var h=u-1,d=1;h>=0;--h)r[h]=d,d*=t[h]}if(void 0===a){a=0;for(var h=0;he==e>0?0xffffffff===n?(r+=1,n=0):n+=1:0===n?(n=0xffffffff,r-=1):n-=1,i.pack(n,r)}},8406:function(e,t){t.vertexNormals=function(e,t,r){for(var i=t.length,n=Array(i),a=void 0===r?1e-6:r,o=0;oa)for(var b=n[c],_=1/Math.sqrt(g*v),x=0;x<3;++x){var w=(x+1)%3,T=(x+2)%3;b[x]+=_*(y[w]*m[T]-y[T]*m[w])}}for(var o=0;oa)for(var _=1/Math.sqrt(M),x=0;x<3;++x)b[x]*=_;else for(var x=0;x<3;++x)b[x]=0}return n},t.faceNormals=function(e,t,r){for(var i=e.length,n=Array(i),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(f):0;for(var c=0;c<3;++c)d[c]*=f;n[o]=d}return n}},4081:function(e){e.exports=function(e,t,r,i,n,a,o,s,l,c){var u=t+a+c;if(h>0){var h=Math.sqrt(u+1);e[0]=.5*(o-l)/h,e[1]=.5*(s-i)/h,e[2]=.5*(r-a)/h,e[3]=.5*h}else{var d=Math.max(t,a,c),h=Math.sqrt(2*d-u+1);t>=d?(e[0]=.5*h,e[1]=.5*(n+r)/h,e[2]=.5*(s+i)/h,e[3]=.5*(o-l)/h):a>=d?(e[0]=.5*(r+n)/h,e[1]=.5*h,e[2]=.5*(l+o)/h,e[3]=.5*(s-i)/h):(e[0]=.5*(i+s)/h,e[1]=.5*(o+l)/h,e[2]=.5*h,e[3]=.5*(r-n)/h)}return e}},9977:function(e,t,r){e.exports=function(e){var t=(e=e||{}).center||[0,0,0],r=e.rotation||[0,0,0,1],i=e.radius||1;t=[].slice.call(t,0,3),u(r=[].slice.call(r,0,4),r);var n=new h(r,t,Math.log(i));return n.setDistanceLimits(e.zoomMin,e.zoomMax),("eye"in e||"up"in e)&&n.lookAt(0,e.eye,e.center,e.up),n};var i=r(9215),n=r(6582),a=r(7399),o=r(7608),s=r(4081);function l(e,t,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2))}function c(e,t,r,i){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2)+Math.pow(i,2))}function u(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=c(r,i,n,a);o>1e-6?(e[0]=r/o,e[1]=i/o,e[2]=n/o,e[3]=a/o):(e[0]=e[1]=e[2]=0,e[3]=1)}function h(e,t,r){this.radius=i([r]),this.center=i(t),this.rotation=i(e),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 d=h.prototype;d.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},d.recalcMatrix=function(e){this.radius.curve(e),this.center.curve(e),this.rotation.curve(e);var t=this.computedRotation;u(t,t);var r=this.computedMatrix;a(r,t);var i=this.computedCenter,n=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);n[0]=i[0]+s*r[2],n[1]=i[1]+s*r[6],n[2]=i[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var c=0,h=0;h<3;++h)c+=r[l+4*h]*n[h];r[12+l]=-c}},d.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var i=0;i<16;++i)t[i]=r[i];return t}return r},d.idle=function(e){this.center.idle(e),this.radius.idle(e),this.rotation.idle(e)},d.flush=function(e){this.center.flush(e),this.radius.flush(e),this.rotation.flush(e)},d.pan=function(e,t,r,i){t=t||0,r=r||0,i=i||0,this.recalcMatrix(e);var n=this.computedMatrix,a=n[1],o=n[5],s=n[9],c=l(a,o,s);a/=c,o/=c,s/=c;var u=n[0],h=n[4],d=n[8],f=u*a+h*o+d*s;u-=a*f;var p=l(u,h-=o*f,d-=s*f);u/=p,h/=p,d/=p;var m=n[2],g=n[6],y=n[10],v=m*a+g*o+y*s,x=m*u+g*h+y*d;m-=v*a+x*u;var b=l(m,g-=v*o+x*h,y-=v*s+x*d);m/=b,g/=b,y/=b;var _=u*t+a*r,w=h*t+o*r,T=d*t+s*r;this.center.move(e,_,w,T);var M=Math.exp(this.computedRadius[0]);M=Math.max(1e-4,M+i),this.radius.set(e,Math.log(M))},d.rotate=function(e,t,r,i){this.recalcMatrix(e),t=t||0,r=r||0;var n=this.computedMatrix,a=n[0],o=n[4],s=n[8],u=n[1],h=n[5],d=n[9],f=n[2],p=n[6],m=n[10],g=t*a+r*u,y=t*o+r*h,v=t*s+r*d,x=-(p*v-m*y),b=-(m*g-f*v),_=-(f*y-p*g),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),T=c(x,b,_,w);T>1e-6?(x/=T,b/=T,_/=T,w/=T):(x=b=_=0,w=1);var M=this.computedRotation,k=M[0],A=M[1],S=M[2],E=M[3],C=k*w+E*x+A*_-S*b,L=A*w+E*b+S*x-k*_,P=S*w+E*_+k*b-A*x,I=E*w-k*x-A*b-S*_;if(i){x=f;var z=Math.sin(i)/l(x,b=p,_=m);x*=z,b*=z,_*=z,C=C*(w=Math.cos(t))+I*x+L*_-P*b,L=L*w+I*b+P*x-C*_,P=P*w+I*_+C*b-L*x,I=I*w-C*x-L*b-P*_}var D=c(C,L,P,I);D>1e-6?(C/=D,L/=D,P/=D,I/=D):(C=L=P=0,I=1),this.rotation.set(e,C,L,P,I)},d.lookAt=function(e,t,r,i){this.recalcMatrix(e),r=r||this.computedCenter,t=t||this.computedEye,i=i||this.computedUp;var a=this.computedMatrix;n(a,t,r,i);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),u(o,o),this.rotation.set(e,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-t[c],2);this.radius.set(e,.5*Math.log(Math.max(l,1e-6))),this.center.set(e,r[0],r[1],r[2])},d.translate=function(e,t,r,i){this.center.move(e,t||0,r||0,i||0)},d.setMatrix=function(e,t){var r=this.computedRotation;s(r,t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]),u(r,r),this.rotation.set(e,r[0],r[1],r[2],r[3]);var i=this.computedMatrix;o(i,t);var n=i[15];if(Math.abs(n)>1e-6){var a=i[12]/n,l=i[13]/n,c=i[14]/n;this.recalcMatrix(e);var h=Math.exp(this.computedRadius[0]);this.center.set(e,a-i[2]*h,l-i[6]*h,c-i[10]*h),this.radius.idle(e)}else this.center.idle(e),this.radius.idle(e)},d.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},d.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=Math.max(t=t>0?Math.log(t):1/0,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},d.getDistanceLimits=function(e){var t=this.radius.bounds;return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},d.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]}},d.fromJSON=function(e){var t=this.lastT(),r=e.center;r&&this.center.set(t,r[0],r[1],r[2]);var i=e.rotation;i&&this.rotation.set(t,i[0],i[1],i[2],i[3]);var n=e.distance;n&&n>0&&this.radius.set(t,Math.log(n)),this.setDistanceLimits(e.zoomMin,e.zoomMax)}},1371:function(e,t,r){var i=r(3233);e.exports=function(e,t,r){return i(r="u">typeof r?r+"":" ",t)+e}},3202:function(e){e.exports=function(e,t){t||(t=[0,""]);var r=parseFloat(e=String(e),10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},3088:function(e,t,r){e.exports=function(e,t){for(var r=0|t.length,n=e.length,a=[Array(r),Array(r)],o=0;o0){o=a[u][r][0],l=u;break}s=o[1^l];for(var h=0;h<2;++h)for(var d=a[h][r],f=0;f0&&(o=p,s=m,l=h)}return n||o&&c(o,l),s}for(var o=0;o0;){a[0][o].length;var f=function(e,r){var n=a[r][e][0],o=[e];c(n,r);for(var s=n[1^r];;){for(;s!==e;)o.push(s),s=u(o[o.length-2],s,!1);if(a[0][e].length+a[1][e].length===0)break;var l=o[o.length-1],h=o[1],d=u(l,e,!0);if(0>i(t[l],t[e],t[h],t[d]))break;o.push(e),s=u(l,e)}return o}(o,h);f[1]===f[f.length-1]?d.push.apply(d,f):(d.length>0&&l.push(d),d=f)}d.length>0&&l.push(d)}return l};var i=r(3140)},5609:function(e,t,r){e.exports=function(e,t){for(var r=i(e,t.length),n=Array(t.length),a=Array(t.length),o=[],s=0;s0;){var c=o.pop();n[c]=!1;for(var u=r[c],s=0;s0});for(var m=p.length,g=Array(m),y=Array(m),f=0;f0;){var j=R.pop(),B=E[j];l(B,function(e,t){return e-t});var N,U=B.length,V=F[j];if(0===V){var w=p[j];N=[w]}for(var f=0;f=0)&&(F[q]=1^V,R.push(q),0===V)){var w=p[q];O(w)||(w.reverse(),N.push(w))}}0===V&&r.push(N)}return r};var i=r(3134),n=r(3088),a=r(5085),o=r(5250),s=r(8210),l=r(1682),c=r(5609);function u(e,t){for(var r=Array(e),i=0;i0)||a[t]!==e[0])return 1;else n=r[t-1];for(var s=1;n;){var l=n.key,c=i(e,l[0],l[1]);if(l[0][0]0))return 0;s=-1,n=n.right}else if(c>0)n=n.left;else{if(!(c<0))return 0;s=1,n=n.right}}return s});return 0===d.length?_:(s=l(d),function(e){return s(e[0],e[1])?0:_(e)})};var i=r(3250)[3],n=r(4209),a=r(3352),o=r(2478);function s(){return!0}function l(e){for(var t={},r=0;r=f?(M=1,w=f+2*g+v):(M=-g/f,w=g*M+v)):(M=0,y>=0?(k=0,w=v):-y>=m?(k=1,w=m+2*y+v):(k=-y/m,w=y*k+v));else if(k<0)k=0,g>=0?(M=0,w=v):-g>=f?(M=1,w=f+2*g+v):(M=-g/f,w=g*M+v);else{var A=1/T;M*=A,k*=A,w=M*(f*M+p*k+2*g)+k*(p*M+m*k+2*y)+v}else M<0?(l=p+g,(c=m+y)>l?(u=c-l)>=(h=f-2*p+m)?(M=1,k=0,w=f+2*g+v):(k=1-(M=u/h),w=M*(f*M+p*k+2*g)+k*(p*M+m*k+2*y)+v):(M=0,c<=0?(k=1,w=m+2*y+v):y>=0?(k=0,w=v):(k=-y/m,w=y*k+v))):k<0?(l=p+y,(c=f+g)>l?(u=c-l)>=(h=f-2*p+m)?(k=1,M=0,w=m+2*y+v):w=(M=1-(k=u/h))*(f*M+p*k+2*g)+k*(p*M+m*k+2*y)+v:(k=0,c<=0?(M=1,w=f+2*g+v):g>=0?(M=0,w=v):(M=-g/f,w=g*M+v))):(u=m+y-p-g)<=0?(M=0,k=1,w=m+2*y+v):u>=(h=f-2*p+m)?(M=1,k=0,w=f+2*g+v):(k=1-(M=u/h),w=M*(f*M+p*k+2*g)+k*(p*M+m*k+2*y)+v);for(var S=1-M-k,d=0;d0){var c=e[r-1];if(0===i(s,c)&&a(c)!==l){r-=1;continue}}e[r++]=s}}return e.length=r,e}},3233:function(e){var t,r="";e.exports=function(e,i){if("string"!=typeof e)throw TypeError("expected a string");if(1===i)return e;if(2===i)return e+e;var n=e.length*i;if(t!==e||typeof t>"u")t=e,r="";else if(r.length>=n)return r.substr(0,n);for(;n>r.length&&i>1;)1&i&&(r+=e),i>>=1,e+=e;return r+=e,r=r.substr(0,n)}},3025:function(e,t,r){e.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(e){e.exports=function(e){for(var t=e.length,r=e[e.length-1],i=t,n=t-2;n>=0;--n){var a=r,o=e[n],s=(r=a+o)-a,l=o-s;l&&(e[--i]=r,r=l)}for(var c=0,n=i;n0){if(a<=0)return o;i=n+a}else{if(!(n<0)||a>=0)return o;i=-(n+a)}var l=s*i;return o>=l||o<=-l?o:u(e,t,r)},function(e,t,r,i){var n=e[0]-i[0],a=t[0]-i[0],o=r[0]-i[0],s=e[1]-i[1],c=t[1]-i[1],u=r[1]-i[1],d=e[2]-i[2],f=t[2]-i[2],p=r[2]-i[2],m=a*u,g=o*c,y=o*s,v=n*u,x=n*c,b=a*s,_=d*(m-g)+f*(y-v)+p*(x-b),w=l*((Math.abs(m)+Math.abs(g))*Math.abs(d)+(Math.abs(y)+Math.abs(v))*Math.abs(f)+(Math.abs(x)+Math.abs(b))*Math.abs(p));return _>w||-_>w?_:h(e,t,r,i)}];d.length<=5;)d.push(c(d.length));e.exports=(function(e,t,r,i,n,a,o){return function(t,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return i(t,r);case 3:return n(t,r,s);case 4:return a(t,r,s,l);case 5:return o(t,r,s,l,c)}for(var u=Array(arguments.length),h=0;h0&&o>0||a<0&&o<0)return!1;var s=i(r,e,t),l=i(n,e,t);return(!(s>0)||!(l>0))&&(!(s<0)||!(l<0))&&(0!==a||0!==o||0!==s||0!==l||function(e,t,r,i){for(var n=0;n<2;++n){var a=e[n],o=t[n],s=Math.min(a,o),l=Math.max(a,o),c=r[n],u=i[n],h=Math.min(c,u);if(Math.max(c,u)=i?(c=g,(f+=1)=i?(c=g,(f+=1)"u"&&(s=function(e){for(var t=e.length,r=0,i=0;i>1,c=t[2*l+1];if(c===a)return l;a>1,c=t[2*l+1];if(c===a)return l;a>1,c=t[2*l+1];if(c===a)return l;a0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:+(e>=10)},t.popCount=function(e){return e-=e>>>1&0x55555555,((e=(0x33333333&e)+(e>>>2&0x33333333))+(e>>>4)&0xf0f0f0f)*0x1010101>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var i=Array(256);(function(e){for(var t=0;t<256;++t){var r=t,i=t,n=7;for(r>>>=1;r;r>>>=1)i<<=1,i|=1&r,--n;e[t]=i<>>8&255]<<16|i[e>>>16&255]<<8|i[e>>>24&255]},t.interleave2=function(e,t){return e&=65535,t&=65535,(e=((e=((e=((e=(e|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=(t|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1},t.deinterleave2=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x55555555)|e>>>1)&0x33333333)|e>>>2)&0xf0f0f0f)|e>>>4)&0xff00ff)|e>>>16)&65535)<<16>>16},t.interleave3=function(e,t,r){return e&=1023,t&=1023,r&=1023,r=((r=((r=((r=(r|r<<16)&0xff0000ff)|r<<8)&0xf00f00f)|r<<4)&0xc30c30c3)|r<<2)&0x49249249,(e=((e=((e=((e=(e|e<<16)&0xff0000ff)|e<<8)&0xf00f00f)|e<<4)&0xc30c30c3)|e<<2)&0x49249249|(t=((t=((t=((t=(t|t<<16)&0xff0000ff)|t<<8)&0xf00f00f)|t<<4)&0xc30c30c3)|t<<2)&0x49249249)<<1)|r<<2},t.deinterleave3=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x49249249)|e>>>2)&0xc30c30c3)|e>>>4)&0xf00f00f)|e>>>8)&0xff0000ff)|e>>>16)&1023)<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},2014:function(e,t,r){var i=r(3105),n=r(4623);function a(e,t){var r=e.length,i=e.length-t.length,n=Math.min;if(i)return i;switch(r){case 0:return 0;case 1:return e[0]-t[0];case 2:var a=e[0]+e[1]-t[0]-t[1];return a||n(e[0],e[1])-n(t[0],t[1]);case 3:var o=e[0]+e[1],s=t[0]+t[1];if(a=o+e[2]-(s+t[2]))return a;var l=n(e[0],e[1]),c=n(t[0],t[1]),a=n(l,e[2])-n(c,t[2]);return a||n(l+e[2],o)-n(c+t[2],s);default:var u=e.slice(0);u.sort();var h=t.slice(0);h.sort();for(var d=0;d>1,s=a(e[o],t);s<=0?(0===s&&(n=o),r=o+1):s>0&&(i=o-1)}return n}function u(e,t){for(var r=Array(e.length),n=0,o=r.length;n=e.length||0!==a(e[g],s)););}return r}function h(e,t){if(t<0)return[];for(var r=[],n=(1<>>u&1&&c.push(n[u]);t.push(c)}return s(t)},t.skeleton=h,t.boundary=function(e){for(var t=[],r=0,i=e.length;r0;){var r,i=1&(r=e)?r-1>>1:(r>>1)-1;if(i>=0&&t0){var e=w[0];return g(0,M-1),M-=1,v(0),e}return -1}function _(e,t){var r=w[e];return c[r]===t?e:(c[r]=-1/0,x(e),b(),c[r]=t,x((M+=1)-1))}for(var w=[],T=Array(a),h=0;h>1;h>=0;--h)v(h);for(;;){var k=b();if(k<0||c[k]>r)break;!function(e){if(!u[e]){u[e]=!0;var t=s[e],r=l[e];s[r]>=0&&(s[r]=t),l[t]>=0&&(l[t]=r),T[t]>=0&&_(T[t],m(t)),T[r]>=0&&_(T[r],m(r))}}(k)}for(var A=[],h=0;h=0&&r>=0&&t!==r){var i=T[t],n=T[r];i!==n&&E.push([i,n])}}),n.unique(n.normalize(E)),{positions:A,edges:E}};var i=r(3250),n=r(2014)},1303:function(e,t,r){e.exports=function(e,t){if(t[0][0]t[1][0]))return n(t,e);r=t[1],a=t[0]}if(e[0][0]e[1][0]))return-n(e,t);o=e[1],s=e[0]}var r,a,o,s,l=i(r,a,s),c=i(r,a,o);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=i(s,o,a),c=i(s,o,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return a[0]-s[0]};var i=r(3250);function n(e,t){if(t[0][0]t[1][0])r=t[1],n=t[0];else{var r,n,a,o,s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]),c=Math.min(t[0][1],t[1][1]),u=Math.max(t[0][1],t[1][1]);return lu?s-u:l-u}e[0][1]0)if(t[0]!==o[1][0])r=e,e=e.right;else{var l=c(e.right,t);if(l)return l;e=e.left}else{if(t[0]!==o[1][0])return e;var l=c(e.right,t);if(l)return l;e=e.left}}return r}function u(e,t,r,i){this.y=e,this.index=t,this.start=r,this.closed=i}function h(e,t,r,i){this.x=e,this.segment=t,this.create=r,this.index=i}s.prototype.castUp=function(e){var t=i.le(this.coordinates,e[0]);if(t<0)return -1;this.slabs[t];var r=c(this.slabs[t],e),n=-1;if(r&&(n=r.value),this.coordinates[t]===e[0]){var s=null;if(r&&(s=r.key),t>0){var u=c(this.slabs[t-1],e);u&&(s?o(u.key,s)>0&&(s=u.key,n=u.value):(n=u.value,s=u.key))}var h=this.horizontal[t];if(h.length>0){var d=i.ge(h,e[1],l);if(d=h.length)return n;f=h[d]}}if(f.start)if(s){var p=a(s[0],s[1],[e[0],f.y]);s[0][0]>s[1][0]&&(p=-p),p>0&&(n=f.index)}else n=f.index;else f.y!==e[1]&&(n=f.index)}}}return n}},5202:function(e,t,r){var i=r(1944),n=r(8210);function a(e,t){var r=n(i(e,t),[t[t.length-1]]);return r[r.length-1]}function o(e,t,r,i){var n=-t/(i-t);n<0?n=0:n>1&&(n=1);for(var a=1-n,o=e.length,s=Array(o),l=0;l0||n>0&&u<0){var h=o(s,u,l,n);r.push(h),i.push(h.slice())}u<0?i.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),i.push(l.slice())),n=u}return{positive:r,negative:i}},e.exports.positive=function(e,t){for(var r=[],i=a(e[e.length-1],t),n=e[e.length-1],s=e[0],l=0;l0||i>0&&c<0)&&r.push(o(n,c,s,i)),c>=0&&r.push(s.slice()),i=c}return r},e.exports.negative=function(e,t){for(var r=[],i=a(e[e.length-1],t),n=e[e.length-1],s=e[0],l=0;l0||i>0&&c<0)&&r.push(o(n,c,s,i)),c<=0&&r.push(s.slice()),i=c}return r}},3387:function(e,t,r){var i;!function(){var n=/[^T]/,a=/[^v]/,o=/[diefg]/,s=/[bcdiefguxX]/,l=/[j]/,c=/^[^\x25]+/,u=/^\x25{2}/,h=/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,d=/^([a-z_][a-z_\d]*)/i,f=/^\.([a-z_][a-z_\d]*)/i,p=/^\[(\d+)\]/,m=/^[+-]/;function g(e){return function(e,t){var r,i,c,u,h,d,f,p,y,v=1,x=e.length,b="";for(i=0;i=0),u.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,u.width?parseInt(u.width):0);break;case"e":r=u.precision?parseFloat(r).toExponential(u.precision):parseFloat(r).toExponential();break;case"f":r=u.precision?parseFloat(r).toFixed(u.precision):parseFloat(r);break;case"g":r=u.precision?String(Number(r.toPrecision(u.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=u.precision?r.substring(0,u.precision):r;break;case"t":r=String(!!r),r=u.precision?r.substring(0,u.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=u.precision?r.substring(0,u.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=u.precision?r.substring(0,u.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}l.test(u.type)?b+=r:(o.test(u.type)&&(!p||u.sign)?(y=p?"+":"-",r=r.toString().replace(m,"")):y="",d=u.pad_char?"0"===u.pad_char?"0":u.pad_char.charAt(1):" ",f=u.width-(y+r).length,h=u.width&&f>0?d.repeat(f):"",b+=u.align?y+r+h:"0"===d?y+h+r:h+y+r)}return b}(function(e){if(v[e])return v[e];for(var t,r=e,i=[],n=0;r;){if(null!==(t=c.exec(r)))i.push(t[0]);else if(null!==(t=u.exec(r)))i.push("%");else if(null!==(t=h.exec(r))){if(t[2]){n|=1;var a=[],o=t[2],s=[];if(null!==(s=d.exec(o)))for(a.push(s[1]);""!==(o=o.substring(s[0].length));)if(null!==(s=f.exec(o)))a.push(s[1]);else if(null!==(s=p.exec(o)))a.push(s[1]);else throw SyntaxError("[sprintf] failed to parse named argument key");else throw SyntaxError("[sprintf] failed to parse named argument key");t[2]=a}else n|=2;if(3===n)throw Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}else throw SyntaxError("[sprintf] unexpected placeholder");r=r.substring(t[0].length)}return v[e]=i}(e),arguments)}function y(e,t){return g.apply(null,[e].concat(t||[]))}var v=Object.create(null);t.sprintf=g,t.vsprintf=y,"u">typeof window&&(window.sprintf=g,window.vsprintf=y,void 0!==(i=(function(){return{sprintf:g,vsprintf:y}}).call(t,r,t,e))&&(e.exports=i))}()},3711:function(e,t,r){e.exports=function(e,t){if(e.dimension<=0)return{positions:[],cells:[]};if(1===e.dimension)return function(e,t){for(var r=n(e,t),i=r.length,a=Array(i),o=Array(i),s=0;si|0},vertex:function(e,t,r,i,n,a,o,s,l,c,u,h,d){var f=(0|o)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==f&&15!==f)switch(f){case 0:case 15:u.push([e-.5,t-.5]);break;case 1:u.push([e-.25-.25*(i+r-2*d)/(r-i),t-.25-.25*(n+r-2*d)/(r-n)]);break;case 2:u.push([e-.75-.25*(-i-r+2*d)/(i-r),t-.25-.25*(a+i-2*d)/(i-a)]);break;case 3:u.push([e-.5,t-.5-.5*(n+r+a+i-4*d)/(r-n+i-a)]);break;case 4:u.push([e-.25-.25*(a+n-2*d)/(n-a),t-.75-.25*(-n-r+2*d)/(n-r)]);break;case 5:u.push([e-.5-.5*(i+r+a+n-4*d)/(r-i+n-a),t-.5]);break;case 6:u.push([e-.5-.25*(-i-r+a+n)/(i-r+n-a),t-.5-.25*(-n-r+a+i)/(n-r+i-a)]);break;case 7:u.push([e-.75-.25*(a+n-2*d)/(n-a),t-.75-.25*(a+i-2*d)/(i-a)]);break;case 8:u.push([e-.75-.25*(-a-n+2*d)/(a-n),t-.75-.25*(-a-i+2*d)/(a-i)]);break;case 9:u.push([e-.5-.25*(i+r+-a-n)/(r-i+a-n),t-.5-.25*(n+r+-a-i)/(r-n+a-i)]);break;case 10:u.push([e-.5-.5*(-i-r+-a-n+4*d)/(i-r+a-n),t-.5]);break;case 11:u.push([e-.25-.25*(-a-n+2*d)/(a-n),t-.75-.25*(n+r-2*d)/(r-n)]);break;case 12:u.push([e-.5,t-.5-.5*(-n-r+-a-i+4*d)/(n-r+a-i)]);break;case 13:u.push([e-.75-.25*(i+r-2*d)/(r-i),t-.25-.25*(-a-i+2*d)/(a-i)]);break;case 14:u.push([e-.25-.25*(-i-r+2*d)/(i-r),t-.25-.25*(-n-r+2*d)/(n-r)])}},cell:function(e,t,r,i,n,a,o,s,l){n?s.push([e,t]):s.push([t,e])}});return function(e,t){var r=[],n=[];return i(e,r,n,t),{positions:r,cells:n}}}},o={}},665:function(e,t,r){var i=r(3202);function n(e,t){var r=i(getComputedStyle(e).getPropertyValue(t));return r[0]*a(r[1],e)}function a(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":var r,i,a,o;return r=e,i=t,(a=document.createElement("div")).style["font-size"]="128"+r,i.appendChild(a),o=n(a,"font-size")/128,i.removeChild(a),o;case"em":return n(t,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return 96;case"cm":return 96/2.54;case"mm":return 96/25.4;case"pt":return 96/72;case"pc":return 16}return 1}e.exports=a},7261:function(e,t,r){e.exports=function(e){var t=(e=e||{}).center||[0,0,0],r=e.up||[0,1,0],i=e.right||h(r),n=e.radius||1,a=e.theta||0,u=e.phi||0;if(t=[].slice.call(t,0,3),s(r=[].slice.call(r,0,3),r),s(i=[].slice.call(i,0,3),i),"eye"in e){var f=e.eye,p=[f[0]-t[0],f[1]-t[1],f[2]-t[2]];o(i,p,r),1e-6>c(i[0],i[1],i[2])?i=h(r):s(i,i),n=c(p[0],p[1],p[2]);var m=l(r,p)/n,g=l(i,p)/n;u=Math.acos(m),a=Math.acos(g)}return n=Math.log(n),new d(e.zoomMin,e.zoomMax,t,r,i,n,a,u)};var i=r(9215),n=r(7608),a=r(6079),o=r(5911),s=r(3536),l=r(244);function c(e,t,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2))}function u(e){return Math.min(1,Math.max(-1,e))}function h(e){var t=Math.abs(e[0]),r=Math.abs(e[1]),i=Math.abs(e[2]),n=[0,0,0];t>Math.max(r,i)?n[2]=1:r>Math.max(t,i)?n[0]=1:n[1]=1;for(var a=0,o=0,l=0;l<3;++l)a+=e[l]*e[l],o+=n[l]*e[l];for(var l=0;l<3;++l)n[l]-=o/a*e[l];return s(n,n),n}function d(e,t,r,n,a,o,s,l){this.center=i(r),this.up=i(n),this.right=i(a),this.radius=i([o]),this.angle=i([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(e,t),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=Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var f=d.prototype;f.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=Math.max(t=t>0?Math.log(t):1/0,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},f.getDistanceLimits=function(e){var t=this.radius.bounds[0];return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},f.recalcMatrix=function(e){this.center.curve(e),this.up.curve(e),this.right.curve(e),this.radius.curve(e),this.angle.curve(e);for(var t=this.computedUp,r=this.computedRight,i=0,n=0,a=0;a<3;++a)n+=t[a]*r[a],i+=t[a]*t[a];for(var l=Math.sqrt(i),u=0,a=0;a<3;++a)r[a]-=t[a]*n/i,u+=r[a]*r[a],t[a]/=l;for(var h=Math.sqrt(u),a=0;a<3;++a)r[a]/=h;var d=this.computedToward;o(d,t,r),s(d,d);for(var f=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(p),y=Math.sin(p),v=Math.cos(m),x=Math.sin(m),b=this.computedCenter,_=g*v,w=y*v,T=-g*x,M=-y*x,k=this.computedEye,A=this.computedMatrix,a=0;a<3;++a){var S=_*r[a]+w*d[a]+x*t[a];A[4*a+1]=T*r[a]+M*d[a]+v*t[a],A[4*a+2]=S,A[4*a+3]=0}var E=A[1],C=A[5],L=A[9],P=A[2],I=A[6],z=A[10],D=C*z-L*I,O=L*P-E*z,R=E*I-C*P,F=c(D,O,R);D/=F,O/=F,R/=F,A[0]=D,A[4]=O,A[8]=R;for(var a=0;a<3;++a)k[a]=b[a]+A[2+4*a]*f;for(var a=0;a<3;++a){for(var u=0,j=0;j<3;++j)u+=A[a+4*j]*k[j];A[12+a]=-u}A[15]=1},f.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var i=0;i<16;++i)t[i]=r[i];return t}return r};var p=[0,0,0];f.rotate=function(e,t,r,i){if(this.angle.move(e,t,r),i){this.recalcMatrix(e);var n=this.computedMatrix;p[0]=n[2],p[1]=n[6],p[2]=n[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)n[4*c]=o[c],n[4*c+1]=s[c],n[4*c+2]=l[c];a(n,n,i,p);for(var c=0;c<3;++c)o[c]=n[4*c],s[c]=n[4*c+1];this.up.set(e,o[0],o[1],o[2]),this.right.set(e,s[0],s[1],s[2])}},f.pan=function(e,t,r,i){t=t||0,r=r||0,i=i||0,this.recalcMatrix(e);var n=this.computedMatrix,a=(this.computedRadius[0],n[1]),o=n[5],s=n[9],l=c(a,o,s);a/=l,o/=l,s/=l;var u=n[0],h=n[4],d=n[8],f=u*a+h*o+d*s;u-=a*f;var p=c(u,h-=o*f,d-=s*f);u/=p,h/=p,d/=p;var m=u*t+a*r,g=h*t+o*r,y=d*t+s*r;this.center.move(e,m,g,y);var v=Math.exp(this.computedRadius[0]);v=Math.max(1e-4,v+i),this.radius.set(e,Math.log(v))},f.translate=function(e,t,r,i){this.center.move(e,t||0,r||0,i||0)},f.setMatrix=function(e,t,r,i){var a,o,s=1;"number"==typeof r&&(s=0|r),(s<0||s>3)&&(s=1);var l=(s+2)%3;t||(this.recalcMatrix(e),t=this.computedMatrix);var h=t[s],d=t[s+4],f=t[s+8];if(i){var p=Math.abs(h),m=Math.abs(f),g=Math.max(p,Math.abs(d),m);p===g?(h=h<0?-1:1,d=f=0):m===g?(f=f<0?-1:1,h=d=0):(d=d<0?-1:1,h=f=0)}else{var y=c(h,d,f);h/=y,d/=y,f/=y}var v=t[l],x=t[l+4],b=t[l+8],_=v*h+x*d+b*f;v-=h*_;var w=c(v,x-=d*_,b-=f*_);v/=w,x/=w;var T=d*(b/=w)-f*x,M=f*v-h*b,k=h*x-d*v,A=c(T,M,k);if(T/=A,M/=A,k/=A,this.center.jump(e,q,H,G),this.radius.idle(e),this.up.jump(e,h,d,f),this.right.jump(e,v,x,b),2===s){var S=t[1],E=t[5],C=t[9],L=S*v+E*x+C*b,P=S*T+E*M+C*k;a=O<0?-Math.PI/2:Math.PI/2,o=Math.atan2(P,L)}else{var I=t[2],z=t[6],D=t[10],O=I*h+z*d+D*f,R=I*v+z*x+D*b,F=I*T+z*M+D*k;a=Math.asin(u(O)),o=Math.atan2(F,R)}this.angle.jump(e,o,a),this.recalcMatrix(e);var j=t[2],B=t[6],N=t[10],U=this.computedMatrix;n(U,t);var V=U[15],q=U[12]/V,H=U[13]/V,G=U[14]/V,W=Math.exp(this.computedRadius[0]);this.center.jump(e,q-j*W,H-B*W,G-N*W)},f.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},f.idle=function(e){this.center.idle(e),this.up.idle(e),this.right.idle(e),this.radius.idle(e),this.angle.idle(e)},f.flush=function(e){this.center.flush(e),this.up.flush(e),this.right.flush(e),this.radius.flush(e),this.angle.flush(e)},f.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},f.lookAt=function(e,t,r,i){this.recalcMatrix(e),t=t||this.computedEye,r=r||this.computedCenter;var n=(i=i||this.computedUp)[0],a=i[1],o=i[2],s=c(n,a,o);if(!(s<1e-6)){n/=s,a/=s,o/=s;var l=t[0]-r[0],h=t[1]-r[1],d=t[2]-r[2],f=c(l,h,d);if(!(f<1e-6)){l/=f,h/=f,d/=f;var p=this.computedRight,m=p[0],g=p[1],y=p[2],v=n*m+a*g+o*y;m-=v*n;var x=c(m,g-=v*a,y-=v*o);if(!(x<.01&&(x=c(m=a*d-o*h,g=o*l-n*d,y=n*h-a*l))<1e-6)){m/=x,g/=x,y/=x,this.up.set(e,n,a,o),this.right.set(e,m,g,y),this.center.set(e,r[0],r[1],r[2]),this.radius.set(e,Math.log(f));var b=a*y-o*g,_=o*m-n*y,w=n*g-a*m,T=c(b,_,w);b/=T;var M=n*l+a*h+o*d,k=m*l+g*h+y*d,A=b*l+(_/=T)*h+(w/=T)*d,S=Math.asin(u(M)),E=Math.atan2(A,k),C=this.angle._state,L=C[C.length-1],P=C[C.length-2],I=Math.abs((L%=2*Math.PI)+2*Math.PI-E),z=Math.abs(L-E),D=Math.abs(L-2*Math.PI-E);Itypeof Uint8ClampedArray,s="u">typeof BigUint64Array,l="u">typeof BigInt64Array,c=r.g.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=n([32,0])),c.BIGUINT64||(c.BIGUINT64=n([32,0])),c.BIGINT64||(c.BIGINT64=n([32,0])),c.BUFFER||(c.BUFFER=n([32,0]));var u=c.DATA,h=c.BUFFER;function d(e){if(e){var t=e.length||e.byteLength;u[i.log2(t)].push(e)}}function f(e){var e=i.nextPow2(e),t=u[i.log2(e)];return t.length>0?t.pop():new ArrayBuffer(e)}function p(e){return new Uint8Array(f(e),0,e)}function m(e){return new Uint16Array(f(2*e),0,e)}function g(e){return new Uint32Array(f(4*e),0,e)}function y(e){return new Int8Array(f(e),0,e)}function v(e){return new Int16Array(f(2*e),0,e)}function x(e){return new Int32Array(f(4*e),0,e)}function b(e){return new Float32Array(f(4*e),0,e)}function _(e){return new Float64Array(f(8*e),0,e)}function w(e){return o?new Uint8ClampedArray(f(e),0,e):p(e)}function T(e){return s?new BigUint64Array(f(8*e),0,e):null}function M(e){return l?new BigInt64Array(f(8*e),0,e):null}function k(e){return new DataView(f(e),0,e)}function A(e){e=i.nextPow2(e);var t=h[i.log2(e)];return t.length>0?t.pop():new a(e)}t.free=function(e){if(a.isBuffer(e))h[i.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength;u[0|i.log2(t)].push(e)}},t.freeUint8=t.freeUint16=t.freeUint32=t.freeBigUint64=t.freeInt8=t.freeInt16=t.freeInt32=t.freeBigInt64=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=function(e){d(e.buffer)},t.freeArrayBuffer=d,t.freeBuffer=function(e){h[i.log2(e.length)].push(e)},t.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return f(e);switch(t){case"uint8":return p(e);case"uint16":return m(e);case"uint32":return g(e);case"int8":return y(e);case"int16":return v(e);case"int32":return x(e);case"float":case"float32":return b(e);case"double":case"float64":return _(e);case"uint8_clamped":return w(e);case"bigint64":return M(e);case"biguint64":return T(e);case"buffer":return A(e);case"data":case"dataview":return k(e);default:return null}},t.mallocArrayBuffer=f,t.mallocUint8=p,t.mallocUint16=m,t.mallocUint32=g,t.mallocInt8=y,t.mallocInt16=v,t.mallocInt32=x,t.mallocFloat32=t.mallocFloat=b,t.mallocFloat64=t.mallocDouble=_,t.mallocUint8Clamped=w,t.mallocBigUint64=T,t.mallocBigInt64=M,t.mallocDataView=k,t.mallocBuffer=A,t.clearCache=function(){for(var e=0;e<32;++e)c.UINT8[e].length=0,c.UINT16[e].length=0,c.UINT32[e].length=0,c.INT8[e].length=0,c.INT16[e].length=0,c.INT32[e].length=0,c.FLOAT[e].length=0,c.DOUBLE[e].length=0,c.BIGUINT64[e].length=0,c.BIGINT64[e].length=0,c.UINT8C[e].length=0,u[e].length=0,h[e].length=0}},1755:function(e){function t(e){this.roots=Array(e),this.ranks=Array(e);for(var t=0;ttypeof document&&((n=document.createElement("canvas")).width=8192,n.height=1024,a=n.getContext("2d"))},7718:function(e,t,r){e.exports=function(e,t,r,i){var a=64,o=1.25,s={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};return i&&(i.size&&i.size>0&&(a=i.size),i.lineSpacing&&i.lineSpacing>0&&(o=i.lineSpacing),i.styletags&&i.styletags.breaklines&&(s.breaklines=!!i.styletags.breaklines),i.styletags&&i.styletags.bolds&&(s.bolds=!!i.styletags.bolds),i.styletags&&i.styletags.italics&&(s.italics=!!i.styletags.italics),i.styletags&&i.styletags.subscripts&&(s.subscripts=!!i.styletags.subscripts),i.styletags&&i.styletags.superscripts&&(s.superscripts=!!i.styletags.superscripts)),r.font=[i.fontStyle,i.fontVariant,i.fontWeight,a+"px",i.font].filter(function(e){return e}).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",h(function(e,t,r,i,a,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\/g,` +`)&&"\\"!==r?(k(f.join("")),d=999,u):(f.push(t),r=t,u+1)}function S(e){for(var t,r,i=0;;){if(t=n.indexOf(e.slice(0,e.length+i).join("")),r=n[t],-1===t){if(i--+e.length>0)continue;r=e.slice(0,1).join("")}return k(r),y+=r.length,(f=f.slice(r.length)).length}}};var i=r(620),n=r(7827),a=r(6852),o=r(7932),s=r(3508),l=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3508(e,t,r){var i=r(6852);e.exports=(i=i.slice().filter(function(e){return!/^(gl\_|texture)/.test(e)})).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(e){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932(e,t,r){e.exports=r(620).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(e){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827(e){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905(e,t,r){var i=r(5874);e.exports=function(e,t){var r=i(t),n=[];return(n=n.concat(r(e))).concat(r(null))}},3236(e){e.exports=function(e){"string"==typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],i=0;i>1,u=-7,h=r?n-1:0,d=r?-1:1,f=e[t+h];for(h+=d,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=d,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=i;u>0;o=256*o+e[t+h],h+=d,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,i),a-=c}return(f?-1:1)*o*Math.pow(2,a-i)},t.write=function(e,t,r,i,n,a){var o,s,l,c=8*a-n-1,u=(1<>1,d=5960464477539062e-23*(23===n),f=i?0:a-1,p=i?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,n),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,n),o=0));n>=8;e[r+f]=255&s,f+=p,s/=256,n-=8);for(o=o<0;e[r+f]=255&o,f+=p,o/=256,c-=8);e[r+f-p]|=128*m}},8954(e,t,r){e.exports=function(e,t){var r=e.length;if(0===r)throw Error("Must have at least d+1 points");var n=e[0].length;if(r<=n)throw Error("Must input at least d+1 points");var o=e.slice(0,n+1),s=i.apply(void 0,o);if(0===s)throw Error("Input not in general position");for(var l=Array(n+1),u=0;u<=n;++u)l[u]=u;s<0&&(l[0]=1,l[1]=0);for(var h=new a(l,Array(n+1),!1),d=h.adjacent,f=Array(n+2),u=0;u<=n;++u){for(var p=l.slice(),m=0;m<=n;++m)m===u&&(p[m]=-1);var g=p[0];p[0]=p[1],p[1]=g;var y=new a(p,Array(n+1),!0);d[u]=y,f[u]=y}f[n+1]=h;for(var u=0;u<=n;++u)for(var p=d[u].vertices,v=d[u].adjacent,m=0;m<=n;++m){var x=p[m];if(x<0){v[m]=h;continue}for(var b=0;b<=n;++b)0>d[b].vertices.indexOf(x)&&(v[m]=d[b])}for(var _=new c(n,o,f),w=!!t,u=n+1;u0;){e=o.pop();for(var s=e.adjacent,l=0;l<=r;++l){var c=s[l];if(!(!c.boundary||c.lastVisited<=-i)){for(var u=c.vertices,h=0;h<=r;++h){var d=u[h];d<0?n[h]=t:n[h]=a[d]}var f=this.orient();if(f>0)return c;c.lastVisited=-i,0===f&&o.push(c)}}}return null},u.walk=function(e,t){var r=this.vertices.length-1,i=this.dimension,n=this.vertices,a=this.tuple,o=t?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];e:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=i;++u)a[u]=n[l[u]];s.lastVisited=r;for(var u=0;u<=i;++u){var h=c[u];if(!(h.lastVisited>=r)){var d=a[u];a[u]=e;var f=this.orient();if(a[u]=d,f<0){s=h;continue e}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},u.addPeaks=function(e,t){var r=this.vertices.length-1,i=this.dimension,n=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,h=[t];t.lastVisited=r,t.vertices[t.vertices.indexOf(-1)]=r,t.boundary=!1,c.push(t);for(var d=[];h.length>0;){var t=h.pop(),f=t.vertices,p=t.adjacent,m=f.indexOf(r);if(!(m<0)){for(var g=0;g<=i;++g)if(g!==m){var y=p[g];if(!(!y.boundary||y.lastVisited>=r)){var v=y.vertices;if(y.lastVisited!==-r){for(var x=0,b=0;b<=i;++b)v[b]<0?(x=b,l[b]=e):l[b]=n[v[b]];if(this.orient()>0){v[x]=r,y.boundary=!1,c.push(y),h.push(y),y.lastVisited=r;continue}y.lastVisited=-r}var _=y.adjacent,w=f.slice(),T=p.slice(),M=new a(w,T,!0);u.push(M);var k=_.indexOf(t);if(!(k<0)){_[k]=M,T[m]=y,w[g]=-1,T[g]=t,p[g]=M,M.flip();for(var b=0;b<=i;++b){var A=w[b];if(!(A<0||A===r)){for(var S=Array(i-1),E=0,C=0;C<=i;++C){var L=w[C];L<0||C===b||(S[E++]=L)}d.push(new o(S,M,b))}}}}}}}d.sort(s);for(var g=0;g+1=0?o[l++]=s[u]:c=1&u;if(c===(1&e)){var h=o[0];o[0]=o[1],o[1]=h}t.push(o)}}return t}},3352(e,t,r){var i=r(2478);function n(e,t,r,i,n){this.mid=e,this.left=t,this.right=r,this.leftPoints=i,this.rightPoints=n,this.count=(t?t.count:0)+(r?r.count:0)+i.length}e.exports=function(e){return new y(e&&0!==e.length?g(e):null)};var a=n.prototype;function o(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function s(e,t){var r=g(t);e.mid=r.mid,e.left=r.left,e.right=r.right,e.leftPoints=r.leftPoints,e.rightPoints=r.rightPoints,e.count=r.count}function l(e,t){var r=e.intervals([]);r.push(t),s(e,r)}function c(e,t){var r=e.intervals([]),i=r.indexOf(t);return i<0?0:(r.splice(i,1),s(e,r),1)}function u(e,t,r){for(var i=0;i=0&&e[i][1]>=t;--i){var n=r(e[i]);if(n)return n}}function d(e,t){for(var r=0;r>1],a=[],o=[],s=[],r=0;r3*(t+1)?l(this,e):this.left.insert(e):this.left=g([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?l(this,e):this.right.insert(e):this.right=g([e]);else{var r=i.ge(this.leftPoints,e,p),n=i.ge(this.rightPoints,e,m);this.leftPoints.splice(r,0,e),this.rightPoints.splice(n,0,e)}},a.remove=function(e){var t=this.count-this.leftPoints;if(e[1]3*(t-1))return c(this,e);var r=this.left.remove(e);return 2===r?(this.left=null,this.count-=1,1):(1===r&&(this.count-=1),r)}if(e[0]>this.mid){if(!this.right)return 0;if(4*(this.left?this.left.count:0)>3*(t-1))return c(this,e);var r=this.right.remove(e);return 2===r?(this.right=null,this.count-=1,1):(1===r&&(this.count-=1),r)}if(1===this.count)return 2*(this.leftPoints[0]===e);if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var n=this,a=this.left;a.right;)n=a,a=a.right;if(n===this)a.right=this.right;else{var s=this.left,r=this.right;n.count-=a.count,n.right=a.left,a.left=s,a.right=r}o(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(var s=i.ge(this.leftPoints,e,p);sthis.mid))return d(this.leftPoints,t);if(this.right){var r=this.right.queryPoint(e,t);if(r)return r}return h(this.rightPoints,e,t)},a.queryInterval=function(e,t,r){if(ethis.mid&&this.right){var i=this.right.queryInterval(e,t,r);if(i)return i}return tthis.mid?h(this.rightPoints,e,r):d(this.leftPoints,r)};var v=y.prototype;v.insert=function(e){this.root?this.root.insert(e):this.root=new n(e[0],null,null,[e],[e])},v.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},v.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},v.queryInterval=function(e,t,r){if(e<=t&&this.root)return this.root.queryInterval(e,t,r)},Object.defineProperty(v,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(v,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},9507(e){e.exports=!0},7163(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){var r;return null!=e&&(t(e)||"function"==typeof(r=e).readFloatLE&&"function"==typeof r.slice&&t(r.slice(0,0))||!!e._isBuffer)}},2431(e){e.exports=n,e.exports.isMobile=n,e.exports.default=n;let 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,r=/CrOS/,i=/android|ipad|playbook|silk/i;function n(e){e||(e={});let n=e.ua;if(!n&&"u">typeof navigator&&(n=navigator.userAgent),n&&n.headers&&"string"==typeof n.headers["user-agent"]&&(n=n.headers["user-agent"]),"string"!=typeof n)return!1;let a=t.test(n)&&!r.test(n)||!!e.tablet&&i.test(n);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==n.indexOf("Macintosh")&&-1!==n.indexOf("Safari")&&(a=!0),a}},5219(e){e.exports=function(e){for(var t,r=e.length,i=0;i13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},395(e){e.exports=function(e,t,r){return e*(1-r)+t*r}},2652(e,t,r){var i=r(4335),n=r(6864),a=r(1903),o=r(9921),s=r(7608),l=r(5665),c={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},u=n(),h=n(),d=[0,0,0,0],f=[[0,0,0],[0,0,0],[0,0,0]],p=[0,0,0];function m(e,t,r,i,n){e[0]=t[0]*i+r[0]*n,e[1]=t[1]*i+r[1]*n,e[2]=t[2]*i+r[2]*n}e.exports=function(e,t,r,n,g,y){if(t||(t=[0,0,0]),r||(r=[0,0,0]),n||(n=[0,0,0]),g||(g=[0,0,0,1]),y||(y=[0,0,0,1]),!i(u,e)||(a(h,u),h[3]=0,h[7]=0,h[11]=0,h[15]=1,Math.abs(1e-8>o(h))))return!1;var v,x,b,_,w,T,M,k,A,S=u[3],E=u[7],C=u[11],L=u[12],P=u[13],I=u[14],z=u[15];if(0!==S||0!==E||0!==C){if(d[0]=S,d[1]=E,d[2]=C,d[3]=z,!s(h,h))return!1;l(h,h),v=g,x=d,b=h,_=x[0],w=x[1],T=x[2],M=x[3],v[0]=b[0]*_+b[4]*w+b[8]*T+b[12]*M,v[1]=b[1]*_+b[5]*w+b[9]*T+b[13]*M,v[2]=b[2]*_+b[6]*w+b[10]*T+b[14]*M,v[3]=b[3]*_+b[7]*w+b[11]*T+b[15]*M}else g[0]=g[1]=g[2]=0,g[3]=1;if(t[0]=L,t[1]=P,t[2]=I,k=f,A=u,k[0][0]=A[0],k[0][1]=A[1],k[0][2]=A[2],k[1][0]=A[4],k[1][1]=A[5],k[1][2]=A[6],k[2][0]=A[8],k[2][1]=A[9],k[2][2]=A[10],r[0]=c.length(f[0]),c.normalize(f[0],f[0]),n[0]=c.dot(f[0],f[1]),m(f[1],f[1],f[0],1,-n[0]),r[1]=c.length(f[1]),c.normalize(f[1],f[1]),n[0]/=r[1],n[1]=c.dot(f[0],f[2]),m(f[2],f[2],f[0],1,-n[1]),n[2]=c.dot(f[1],f[2]),m(f[2],f[2],f[1],1,-n[2]),r[2]=c.length(f[2]),c.normalize(f[2],f[2]),n[1]/=r[2],n[2]/=r[2],c.cross(p,f[1],f[2]),0>c.dot(f[0],p))for(var D=0;D<3;D++)r[D]*=-1,f[D][0]*=-1,f[D][1]*=-1,f[D][2]*=-1;return y[0]=.5*Math.sqrt(Math.max(1+f[0][0]-f[1][1]-f[2][2],0)),y[1]=.5*Math.sqrt(Math.max(1-f[0][0]+f[1][1]-f[2][2],0)),y[2]=.5*Math.sqrt(Math.max(1-f[0][0]-f[1][1]+f[2][2],0)),y[3]=.5*Math.sqrt(Math.max(1+f[0][0]+f[1][1]+f[2][2],0)),f[2][1]>f[1][2]&&(y[0]=-y[0]),f[0][2]>f[2][0]&&(y[1]=-y[1]),f[1][0]>f[0][1]&&(y[2]=-y[2]),!0}},4335(e){e.exports=function(e,t){var r=t[15];if(0===r)return!1;for(var i=1/r,n=0;n<16;n++)e[n]=t[n]*i;return!0}},7442(e,t,r){var i=r(6658),n=r(7182),a=r(2652),o=r(9921),s=r(8648),l=h(),c=h(),u=h();function h(){return{translate:d(),scale:d(1),skew:d(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function d(e){return[e||0,e||0,e||0]}e.exports=function(e,t,r,h){if(0===o(t)||0===o(r))return!1;var d=a(t,l.translate,l.scale,l.skew,l.perspective,l.quaternion),f=a(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!!d&&!!f&&(i(u.translate,l.translate,c.translate,h),i(u.skew,l.skew,c.skew,h),i(u.scale,l.scale,c.scale,h),i(u.perspective,l.perspective,c.perspective,h),s(u.quaternion,l.quaternion,c.quaternion,h),n(e,u.translate,u.scale,u.skew,u.perspective,u.quaternion),!0)}},7182(e,t,r){var i={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)},n=(i.create(),i.create());e.exports=function(e,t,r,a,o,s){return i.identity(e),i.fromRotationTranslation(e,s,t),e[3]=o[0],e[7]=o[1],e[11]=o[2],e[15]=o[3],i.identity(n),0!==a[2]&&(n[9]=a[2],i.multiply(e,e,n)),0!==a[1]&&(n[9]=0,n[8]=a[1],i.multiply(e,e,n)),0!==a[0]&&(n[8]=0,n[4]=a[0],i.multiply(e,e,n)),i.scale(e,e,r),e}},1811(e,t,r){var i=r(2478),n=r(7442),a=r(7608),o=r(5567),s=r(2408),l=r(7089),c=r(6582),u=r(7656),h=(r(2504),r(3536)),d=[0,0,0];function f(e){this._components=e.slice(),this._time=[0],this.prevMatrix=e.slice(),this.nextMatrix=e.slice(),this.computedMatrix=e.slice(),this.computedInverse=e.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]}e.exports=function(e){return new f((e=e||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var p=f.prototype;p.recalcMatrix=function(e){var t=this._time,r=i.le(t,e),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===t.length-1)for(var l=16*r,c=0;c<16;++c)o[c]=s[l++];else{for(var u=t[r+1]-t[r],l=16*r,d=this.prevMatrix,f=!0,c=0;c<16;++c)d[c]=s[l++];for(var p=this.nextMatrix,c=0;c<16;++c)p[c]=s[l++],f=f&&d[c]===p[c];if(u<1e-6||f)for(var c=0;c<16;++c)o[c]=d[c];else n(o,d,p,(e-t[r])/u)}var m=this.computedUp;m[0]=o[1],m[1]=o[5],m[2]=o[9],h(m,m);var g=this.computedInverse;a(g,o);var y=this.computedEye,v=g[15];y[0]=g[12]/v,y[1]=g[13]/v,y[2]=g[14]/v;for(var x=this.computedCenter,b=Math.exp(this.computedRadius[0]),c=0;c<3;++c)x[c]=y[c]-o[2+4*c]*b}},p.idle=function(e){if(!(e1&&0>=i(e[o[u-2]],e[o[u-1]],c);)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&i(e[s[u-2]],e[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}for(var r=Array(s.length+o.length-2),h=0,n=0,d=o.length;n0;--f)r[h++]=s[f];return r};var i=r(3250)[3]},351(e,t,r){e.exports=function(e,t){t||(t=e,e=window);var r=0,n=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==o.alt,o.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==o.shift,o.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==o.control,o.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==o.meta,o.meta=!!e.metaKey),t}function c(e,s){var c=i.x(s),u=i.y(s);"buttons"in s&&(e=0|s.buttons),(e!==r||c!==n||u!==a||l(s))&&(r=0|e,n=c||0,a=u||0,t&&t(r,n,a,o))}function u(e){c(0,e)}function h(){(r||n||a||o.shift||o.alt||o.meta||o.control)&&(n=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,t&&t(0,0,0,o))}function d(e){l(e)&&t&&t(r,n,a,o)}function f(e){0===i.buttons(e)?c(0,e):c(r,e)}function p(e){c(r|i.buttons(e),e)}function m(e){c(r&~i.buttons(e),e)}function g(){s||(s=!0,e.addEventListener("mousemove",f),e.addEventListener("mousedown",p),e.addEventListener("mouseup",m),e.addEventListener("mouseleave",u),e.addEventListener("mouseenter",u),e.addEventListener("mouseout",u),e.addEventListener("mouseover",u),e.addEventListener("blur",h),e.addEventListener("keyup",d),e.addEventListener("keydown",d),e.addEventListener("keypress",d),e!==window&&(window.addEventListener("blur",h),window.addEventListener("keyup",d),window.addEventListener("keydown",d),window.addEventListener("keypress",d)))}g();var y={element:e};return Object.defineProperties(y,{enabled:{get:function(){return s},set:function(t){t?g():s&&(s=!1,e.removeEventListener("mousemove",f),e.removeEventListener("mousedown",p),e.removeEventListener("mouseup",m),e.removeEventListener("mouseleave",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseout",u),e.removeEventListener("mouseover",u),e.removeEventListener("blur",h),e.removeEventListener("keyup",d),e.removeEventListener("keydown",d),e.removeEventListener("keypress",d),e!==window&&(window.removeEventListener("blur",h),window.removeEventListener("keyup",d),window.removeEventListener("keydown",d),window.removeEventListener("keypress",d)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return n},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),y};var i=r(4687)},24(e){var t={left:0,top:0};e.exports=function(e,r,i){r=r||e.currentTarget||e.srcElement,Array.isArray(i)||(i=[0,0]);var n,a=e.clientX||0,o=e.clientY||0,s=(n=r)===window||n===document||n===document.body?t:n.getBoundingClientRect();return i[0]=a-s.left,i[1]=o-s.top,i}},4687(e,t){function r(e){return e.target||e.srcElement||window}t.buttons=function(e){if("object"==typeof e){if("buttons"in e)return e.buttons;if("which"in e){var t=e.which;if(2===t)return 4;if(3===t)return 2;if(t>0)return 1<=0)return 1<(e.scalarArguments||0)&&t("Scalar arg count must be > 0"),"function"!=typeof e.vertex&&t("Must specify vertex creation function"),"function"!=typeof e.cell&&t("Must specify cell creation function"),"function"!=typeof e.phase&&t("Must specify phase function");for(var c=e.getters||[],u=Array(l),h=0;h=0?u[h]=!0:u[h]=!1;return r=e.vertex,a=e.cell,o=e.phase,(0,n[[u,s].join(",")])(r,a,o,i.mallocUint32,i.freeUint32)};var n={"false,0,1":function(e,t,r,i,n){return function(a,o,s,l){var c,u=0|a.shape[0],h=0|a.shape[1],d=a.data,f=0|a.offset,p=0|a.stride[0],m=0|a.stride[1],g=f,y=0|-p,v=0,x=0|-m,b=0,_=-p-m|0,w=0,T=0|p,M=m-p*u|0,k=0,A=0,S=0,E=2*u|0,C=i(E),L=i(E),P=0,I=0,z=-1,D=-1,O=0,R=0|-u,F=0|u,j=0,B=-u-1|0,N=u-1|0,U=0,V=0,q=0;for(k=0;k0){if(A=1,C[P++]=r(d[g],o,s,l),g+=T,u>0)for(k=1,c=d[g],I=C[P]=r(c,o,s,l),O=C[P+z],j=C[P+R],U=C[P+B],(I!==O||I!==j||I!==U)&&(v=d[g+y],e(k,A,c,v,b=d[g+x],w=d[g+_],I,O,j,U,o,s,l),V=L[P]=S++),P+=1,g+=T,k=2;k0)for(k=1,c=d[g],I=C[P]=r(c,o,s,l),O=C[P+z],j=C[P+R],U=C[P+B],(I!==O||I!==j||I!==U)&&(v=d[g+y],e(k,A,c,v,b=d[g+x],w=d[g+_],I,O,j,U,o,s,l),V=L[P]=S++,U!==j&&t(L[P+R],V,b,w,j,U,o,s,l)),P+=1,g+=T,k=2;k0){if(k=1,C[P++]=r(d[g],o,s,l),g+=T,h>0)for(A=1,c=d[g],I=C[P]=r(c,o,s,l),j=C[P+R],O=C[P+z],U=C[P+B],(I!==j||I!==O||I!==U)&&(v=d[g+y],e(k,A,c,v,b=d[g+x],w=d[g+_],I,j,O,U,o,s,l),V=L[P]=S++),P+=1,g+=T,A=2;A0)for(A=1,c=d[g],I=C[P]=r(c,o,s,l),j=C[P+R],O=C[P+z],U=C[P+B],(I!==j||I!==O||I!==U)&&(v=d[g+y],e(k,A,c,v,b=d[g+x],w=d[g+_],I,j,O,U,o,s,l),V=L[P]=S++,U!==j&&t(L[P+R],V,w,v,U,j,o,s,l)),P+=1,g+=T,A=2;A2&&a[1]>2&&i(n.pick(-1,-1).lo(1,1).hi(a[0]-2,a[1]-2),e.pick(-1,-1,0).lo(1,1).hi(a[0]-2,a[1]-2),e.pick(-1,-1,1).lo(1,1).hi(a[0]-2,a[1]-2)),a[1]>2&&(r(n.pick(0,-1).lo(1).hi(a[1]-2),e.pick(0,-1,1).lo(1).hi(a[1]-2)),t(e.pick(0,-1,0).lo(1).hi(a[1]-2))),a[1]>2&&(r(n.pick(a[0]-1,-1).lo(1).hi(a[1]-2),e.pick(a[0]-1,-1,1).lo(1).hi(a[1]-2)),t(e.pick(a[0]-1,-1,0).lo(1).hi(a[1]-2))),a[0]>2&&(r(n.pick(-1,0).lo(1).hi(a[0]-2),e.pick(-1,0,0).lo(1).hi(a[0]-2)),t(e.pick(-1,0,1).lo(1).hi(a[0]-2))),a[0]>2&&(r(n.pick(-1,a[1]-1).lo(1).hi(a[0]-2),e.pick(-1,a[1]-1,0).lo(1).hi(a[0]-2)),t(e.pick(-1,a[1]-1,1).lo(1).hi(a[0]-2))),e.set(0,0,0,0),e.set(0,0,1,0),e.set(a[0]-1,0,0,0),e.set(a[0]-1,0,1,0),e.set(0,a[1]-1,0,0),e.set(0,a[1]-1,1,0),e.set(a[0]-1,a[1]-1,0,0),e.set(a[0]-1,a[1]-1,1,0),e}}e.exports=function(e,t,r){return(Array.isArray(r)||(r="string"==typeof r?i(t.dimension,r):i(t.dimension,"clamp")),0===t.size)?e:0===t.dimension?(e.set(0),e):(function(e){var t,r=e.join(),i=c[r];if(i)return i;for(var n=e.length,a=[u,h],o=1;o<=n;++o)a.push((t=o)in l?l[t]:l[t]=s({funcName:"fdTemplate"+t}));var i=d.apply(void 0,a);return c[r]=i,i})(r)(e,t)}},4317(e){function t(e,t){var r=Math.floor(t),i=t-r,n=0<=r&&r0;){x<64?(l=x,x=0):(l=64,x-=64);for(var b=0|e[1];b>0;){b<64?(c=b,b=0):(c=64,b-=64),i=y+x*h+b*d,o=v+x*p+b*m;var _=0,w=0,T=0,M=h-u*f,k=d-l*h,A=p-u*g,S=m-l*p;for(T=0;T0;){m<64?(l=m,m=0):(l=64,m-=64);for(var g=0|e[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),i=f+m*u+g*c,o=p+m*d+g*h;var y=0,v=0,x=c-l*u,b=h-l*d;for(v=0;v0;){v<64?(c=v,v=0):(c=64,v-=64);for(var x=0|e[0];x>0;){x<64?(s=x,x=0):(s=64,x-=64);for(var b=0|e[1];b>0;){b<64?(l=b,b=0):(l=64,b-=64),i=g+v*d+x*u+b*h,o=y+v*m+x*f+b*p;var _=0,w=0,T=0,M=u-c*d,k=h-s*u,A=f-c*m,S=p-s*f;for(T=0;Tr;){for(y=0,v=m-o,g=0;gb)break;v+=h,y+=d}for(y=m,v=m-o,g=0;g>1,H=q-N,G=q+N,W=U,Y=H,Z=q,$=G,X=V,K=n+1,J=a-1,Q=!0,ee=0,et=0,er=0,ei=t(h),en=t(h);for(k=l*W,A=l*Y,B=s,M=0;M0){g=W,W=Y,Y=g;break}if(er<0)break;B+=f}for(k=l*$,A=l*X,B=s,M=0;M0){g=$,$=X,X=g;break}if(er<0)break;B+=f}for(k=l*W,A=l*Z,B=s,M=0;M0){g=W,W=Z,Z=g;break}if(er<0)break;B+=f}for(k=l*Y,A=l*Z,B=s,M=0;M0){g=Y,Y=Z,Z=g;break}if(er<0)break;B+=f}for(k=l*W,A=l*$,B=s,M=0;M0){g=W,W=$,$=g;break}if(er<0)break;B+=f}for(k=l*Z,A=l*$,B=s,M=0;M0){g=Z,Z=$,$=g;break}if(er<0)break;B+=f}for(k=l*Y,A=l*X,B=s,M=0;M0){g=Y,Y=X,X=g;break}if(er<0)break;B+=f}for(k=l*Y,A=l*Z,B=s,M=0;M0){g=Y,Y=Z,Z=g;break}if(er<0)break;B+=f}for(k=l*$,A=l*X,B=s,M=0;M0){g=$,$=X,X=g;break}if(er<0)break;B+=f}for(k=l*W,A=l*Y,S=l*Z,E=l*$,C=l*X,L=l*U,P=l*q,I=l*V,j=0,B=s,M=0;M0)J--;else if(er<0){for(k=l*b,A=l*K,S=l*J,B=s,M=0;M0)for(;;){for(_=s+J*l,j=0,M=0;M0){if(--JV){e:for(;;){for(_=s+K*l,j=0,B=s,M=0;M1&&l?c(h,l[0],l[1]):c(h));return u(h,d)}},446(e,t,r){var i=r(7640),n={};e.exports=function(e){var t=e.order,r=e.dtype,a=[t,r].join(":"),o=n[a];return o||(n[a]=o=i(t,r)),o(e),e}},9618(e,t,r){var i=r(7163),n="u">typeof Float64Array;function a(e,t){return e[0]-t[0]}function o(){var e,t=this.stride,r=Array(t.length);for(e=0;e=0&&(t+=a*(r=0|e),n-=r),new i(this.data,n,a,t)},n.step=function(e){var t=this.shape[0],r=this.stride[0],n=this.offset,a=0,o=Math.ceil;return"number"==typeof e&&((a=0|e)<0?(n+=r*(t-1),t=o(-t/a)):t=o(t/a),r*=a),new i(this.data,t,r,n)},n.transpose=function(e){e=void 0===e?0:0|e;var t=this.shape,r=this.stride;return new i(this.data,t[e],r[e],this.offset)},n.pick=function(e){var r=[],i=[],n=this.offset;return"number"==typeof e&&e>=0?n=n+this.stride[0]*e|0:(r.push(this.shape[0]),i.push(this.stride[0])),(0,t[r.length+1])(this.data,r,i,n)},function(e,t,r,n){return new i(e,t[0],r[0],n)}},2:function(e,t,r){function i(e,t,r,i,n,a){this.data=e,this.shape=[t,r],this.stride=[i,n],this.offset=0|a}var n=i.prototype;return n.dtype=e,n.dimension=2,Object.defineProperty(n,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(n,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),n.set=function(t,r,i){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r,i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]=i},n.get=function(t,r){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]},n.index=function(e,t){return this.offset+this.stride[0]*e+this.stride[1]*t},n.hi=function(e,t){return new i(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,this.stride[0],this.stride[1],this.offset)},n.lo=function(e,t){var r=this.offset,n=0,a=this.shape[0],o=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"==typeof e&&e>=0&&(r+=s*(n=0|e),a-=n),"number"==typeof t&&t>=0&&(r+=l*(n=0|t),o-=n),new i(this.data,a,o,s,l,r)},n.step=function(e,t){var r=this.shape[0],n=this.shape[1],a=this.stride[0],o=this.stride[1],s=this.offset,l=0,c=Math.ceil;return"number"==typeof e&&((l=0|e)<0?(s+=a*(r-1),r=c(-r/l)):r=c(r/l),a*=l),"number"==typeof t&&((l=0|t)<0?(s+=o*(n-1),n=c(-n/l)):n=c(n/l),o*=l),new i(this.data,r,n,a,o,s)},n.transpose=function(e,t){e=void 0===e?0:0|e,t=void 0===t?1:0|t;var r=this.shape,n=this.stride;return new i(this.data,r[e],r[t],n[e],n[t],this.offset)},n.pick=function(e,r){var i=[],n=[],a=this.offset;return"number"==typeof e&&e>=0?a=a+this.stride[0]*e|0:(i.push(this.shape[0]),n.push(this.stride[0])),"number"==typeof r&&r>=0?a=a+this.stride[1]*r|0:(i.push(this.shape[1]),n.push(this.stride[1])),(0,t[i.length+1])(this.data,i,n,a)},function(e,t,r,n){return new i(e,t[0],t[1],r[0],r[1],n)}},3:function(e,t,r){function i(e,t,r,i,n,a,o,s){this.data=e,this.shape=[t,r,i],this.stride=[n,a,o],this.offset=0|s}var n=i.prototype;return n.dtype=e,n.dimension=3,Object.defineProperty(n,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(n,"order",{get:function(){var e=Math.abs(this.stride[0]),t=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return e>t?t>r?[2,1,0]:e>r?[1,2,0]:[1,0,2]:e>r?[2,0,1]:r>t?[0,1,2]:[0,2,1]}}),n.set=function(t,r,i,n){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i,n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i]=n},n.get=function(t,r,i){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i]},n.index=function(e,t,r){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r},n.hi=function(e,t,r){return new i(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},n.lo=function(e,t,r){var n=this.offset,a=0,o=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.stride[0],u=this.stride[1],h=this.stride[2];return"number"==typeof e&&e>=0&&(n+=c*(a=0|e),o-=a),"number"==typeof t&&t>=0&&(n+=u*(a=0|t),s-=a),"number"==typeof r&&r>=0&&(n+=h*(a=0|r),l-=a),new i(this.data,o,s,l,c,u,h,n)},n.step=function(e,t,r){var n=this.shape[0],a=this.shape[1],o=this.shape[2],s=this.stride[0],l=this.stride[1],c=this.stride[2],u=this.offset,h=0,d=Math.ceil;return"number"==typeof e&&((h=0|e)<0?(u+=s*(n-1),n=d(-n/h)):n=d(n/h),s*=h),"number"==typeof t&&((h=0|t)<0?(u+=l*(a-1),a=d(-a/h)):a=d(a/h),l*=h),"number"==typeof r&&((h=0|r)<0?(u+=c*(o-1),o=d(-o/h)):o=d(o/h),c*=h),new i(this.data,n,a,o,s,l,c,u)},n.transpose=function(e,t,r){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r;var n=this.shape,a=this.stride;return new i(this.data,n[e],n[t],n[r],a[e],a[t],a[r],this.offset)},n.pick=function(e,r,i){var n=[],a=[],o=this.offset;return"number"==typeof e&&e>=0?o=o+this.stride[0]*e|0:(n.push(this.shape[0]),a.push(this.stride[0])),"number"==typeof r&&r>=0?o=o+this.stride[1]*r|0:(n.push(this.shape[1]),a.push(this.stride[1])),"number"==typeof i&&i>=0?o=o+this.stride[2]*i|0:(n.push(this.shape[2]),a.push(this.stride[2])),(0,t[n.length+1])(this.data,n,a,o)},function(e,t,r,n){return new i(e,t[0],t[1],t[2],r[0],r[1],r[2],n)}},4:function(e,t,r){function i(e,t,r,i,n,a,o,s,l,c){this.data=e,this.shape=[t,r,i,n],this.stride=[a,o,s,l],this.offset=0|c}var n=i.prototype;return n.dtype=e,n.dimension=4,Object.defineProperty(n,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(n,"order",{get:r}),n.set=function(t,r,i,n,a){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n,a):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n]=a},n.get=function(t,r,i,n){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n]},n.index=function(e,t,r,i){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*i},n.hi=function(e,t,r,n){return new i(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof n||n<0?this.shape[3]:0|n,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},n.lo=function(e,t,r,n){var a=this.offset,o=0,s=this.shape[0],l=this.shape[1],c=this.shape[2],u=this.shape[3],h=this.stride[0],d=this.stride[1],f=this.stride[2],p=this.stride[3];return"number"==typeof e&&e>=0&&(a+=h*(o=0|e),s-=o),"number"==typeof t&&t>=0&&(a+=d*(o=0|t),l-=o),"number"==typeof r&&r>=0&&(a+=f*(o=0|r),c-=o),"number"==typeof n&&n>=0&&(a+=p*(o=0|n),u-=o),new i(this.data,s,l,c,u,h,d,f,p,a)},n.step=function(e,t,r,n){var a=this.shape[0],o=this.shape[1],s=this.shape[2],l=this.shape[3],c=this.stride[0],u=this.stride[1],h=this.stride[2],d=this.stride[3],f=this.offset,p=0,m=Math.ceil;return"number"==typeof e&&((p=0|e)<0?(f+=c*(a-1),a=m(-a/p)):a=m(a/p),c*=p),"number"==typeof t&&((p=0|t)<0?(f+=u*(o-1),o=m(-o/p)):o=m(o/p),u*=p),"number"==typeof r&&((p=0|r)<0?(f+=h*(s-1),s=m(-s/p)):s=m(s/p),h*=p),"number"==typeof n&&((p=0|n)<0?(f+=d*(l-1),l=m(-l/p)):l=m(l/p),d*=p),new i(this.data,a,o,s,l,c,u,h,d,f)},n.transpose=function(e,t,r,n){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,n=void 0===n?3:0|n;var a=this.shape,o=this.stride;return new i(this.data,a[e],a[t],a[r],a[n],o[e],o[t],o[r],o[n],this.offset)},n.pick=function(e,r,i,n){var a=[],o=[],s=this.offset;return"number"==typeof e&&e>=0?s=s+this.stride[0]*e|0:(a.push(this.shape[0]),o.push(this.stride[0])),"number"==typeof r&&r>=0?s=s+this.stride[1]*r|0:(a.push(this.shape[1]),o.push(this.stride[1])),"number"==typeof i&&i>=0?s=s+this.stride[2]*i|0:(a.push(this.shape[2]),o.push(this.stride[2])),"number"==typeof n&&n>=0?s=s+this.stride[3]*n|0:(a.push(this.shape[3]),o.push(this.stride[3])),(0,t[a.length+1])(this.data,a,o,s)},function(e,t,r,n){return new i(e,t[0],t[1],t[2],t[3],r[0],r[1],r[2],r[3],n)}},5:function(e,t,r){function i(e,t,r,i,n,a,o,s,l,c,u,h){this.data=e,this.shape=[t,r,i,n,a],this.stride=[o,s,l,c,u],this.offset=0|h}var n=i.prototype;return n.dtype=e,n.dimension=5,Object.defineProperty(n,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(n,"order",{get:r}),n.set=function(t,r,i,n,a,o){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n+this.stride[4]*a,o):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n+this.stride[4]*a]=o},n.get=function(t,r,i,n,a){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n+this.stride[4]*a):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n+this.stride[4]*a]},n.index=function(e,t,r,i,n){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*i+this.stride[4]*n},n.hi=function(e,t,r,n,a){return new i(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof n||n<0?this.shape[3]:0|n,"number"!=typeof a||a<0?this.shape[4]:0|a,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},n.lo=function(e,t,r,n,a){var o=this.offset,s=0,l=this.shape[0],c=this.shape[1],u=this.shape[2],h=this.shape[3],d=this.shape[4],f=this.stride[0],p=this.stride[1],m=this.stride[2],g=this.stride[3],y=this.stride[4];return"number"==typeof e&&e>=0&&(o+=f*(s=0|e),l-=s),"number"==typeof t&&t>=0&&(o+=p*(s=0|t),c-=s),"number"==typeof r&&r>=0&&(o+=m*(s=0|r),u-=s),"number"==typeof n&&n>=0&&(o+=g*(s=0|n),h-=s),"number"==typeof a&&a>=0&&(o+=y*(s=0|a),d-=s),new i(this.data,l,c,u,h,d,f,p,m,g,y,o)},n.step=function(e,t,r,n,a){var o=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.shape[3],u=this.shape[4],h=this.stride[0],d=this.stride[1],f=this.stride[2],p=this.stride[3],m=this.stride[4],g=this.offset,y=0,v=Math.ceil;return"number"==typeof e&&((y=0|e)<0?(g+=h*(o-1),o=v(-o/y)):o=v(o/y),h*=y),"number"==typeof t&&((y=0|t)<0?(g+=d*(s-1),s=v(-s/y)):s=v(s/y),d*=y),"number"==typeof r&&((y=0|r)<0?(g+=f*(l-1),l=v(-l/y)):l=v(l/y),f*=y),"number"==typeof n&&((y=0|n)<0?(g+=p*(c-1),c=v(-c/y)):c=v(c/y),p*=y),"number"==typeof a&&((y=0|a)<0?(g+=m*(u-1),u=v(-u/y)):u=v(u/y),m*=y),new i(this.data,o,s,l,c,u,h,d,f,p,m,g)},n.transpose=function(e,t,r,n,a){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,n=void 0===n?3:0|n,a=void 0===a?4:0|a;var o=this.shape,s=this.stride;return new i(this.data,o[e],o[t],o[r],o[n],o[a],s[e],s[t],s[r],s[n],s[a],this.offset)},n.pick=function(e,r,i,n,a){var o=[],s=[],l=this.offset;return"number"==typeof e&&e>=0?l=l+this.stride[0]*e|0:(o.push(this.shape[0]),s.push(this.stride[0])),"number"==typeof r&&r>=0?l=l+this.stride[1]*r|0:(o.push(this.shape[1]),s.push(this.stride[1])),"number"==typeof i&&i>=0?l=l+this.stride[2]*i|0:(o.push(this.shape[2]),s.push(this.stride[2])),"number"==typeof n&&n>=0?l=l+this.stride[3]*n|0:(o.push(this.shape[3]),s.push(this.stride[3])),"number"==typeof a&&a>=0?l=l+this.stride[4]*a|0:(o.push(this.shape[4]),s.push(this.stride[4])),(0,t[o.length+1])(this.data,o,s,l)},function(e,t,r,n){return new i(e,t[0],t[1],t[2],t[3],t[4],r[0],r[1],r[2],r[3],r[4],n)}}},l={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};e.exports=function(e,t,r,a){if(void 0===e){var c=l.array[0];return c([])}"number"==typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var u=t.length;if(void 0===r){r=Array(u);for(var h=u-1,d=1;h>=0;--h)r[h]=d,d*=t[h]}if(void 0===a){a=0;for(var h=0;he==e>0?0xffffffff===n?(r+=1,n=0):n+=1:0===n?(n=0xffffffff,r-=1):n-=1,i.pack(n,r)}},8406(e,t){t.vertexNormals=function(e,t,r){for(var i=t.length,n=Array(i),a=void 0===r?1e-6:r,o=0;oa)for(var b=n[c],_=1/Math.sqrt(g*v),x=0;x<3;++x){var w=(x+1)%3,T=(x+2)%3;b[x]+=_*(y[w]*m[T]-y[T]*m[w])}}for(var o=0;oa)for(var _=1/Math.sqrt(M),x=0;x<3;++x)b[x]*=_;else for(var x=0;x<3;++x)b[x]=0}return n},t.faceNormals=function(e,t,r){for(var i=e.length,n=Array(i),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(f):0;for(var c=0;c<3;++c)d[c]*=f;n[o]=d}return n}},4081(e){e.exports=function(e,t,r,i,n,a,o,s,l,c){var u=t+a+c;if(h>0){var h=Math.sqrt(u+1);e[0]=.5*(o-l)/h,e[1]=.5*(s-i)/h,e[2]=.5*(r-a)/h,e[3]=.5*h}else{var d=Math.max(t,a,c),h=Math.sqrt(2*d-u+1);t>=d?(e[0]=.5*h,e[1]=.5*(n+r)/h,e[2]=.5*(s+i)/h,e[3]=.5*(o-l)/h):a>=d?(e[0]=.5*(r+n)/h,e[1]=.5*h,e[2]=.5*(l+o)/h,e[3]=.5*(s-i)/h):(e[0]=.5*(i+s)/h,e[1]=.5*(o+l)/h,e[2]=.5*h,e[3]=.5*(r-n)/h)}return e}},9977(e,t,r){e.exports=function(e){var t=(e=e||{}).center||[0,0,0],r=e.rotation||[0,0,0,1],i=e.radius||1;t=[].slice.call(t,0,3),u(r=[].slice.call(r,0,4),r);var n=new h(r,t,Math.log(i));return n.setDistanceLimits(e.zoomMin,e.zoomMax),("eye"in e||"up"in e)&&n.lookAt(0,e.eye,e.center,e.up),n};var i=r(9215),n=r(6582),a=r(7399),o=r(7608),s=r(4081);function l(e,t,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2))}function c(e,t,r,i){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2)+Math.pow(i,2))}function u(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=c(r,i,n,a);o>1e-6?(e[0]=r/o,e[1]=i/o,e[2]=n/o,e[3]=a/o):(e[0]=e[1]=e[2]=0,e[3]=1)}function h(e,t,r){this.radius=i([r]),this.center=i(t),this.rotation=i(e),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 d=h.prototype;d.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},d.recalcMatrix=function(e){this.radius.curve(e),this.center.curve(e),this.rotation.curve(e);var t=this.computedRotation;u(t,t);var r=this.computedMatrix;a(r,t);var i=this.computedCenter,n=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);n[0]=i[0]+s*r[2],n[1]=i[1]+s*r[6],n[2]=i[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var c=0,h=0;h<3;++h)c+=r[l+4*h]*n[h];r[12+l]=-c}},d.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var i=0;i<16;++i)t[i]=r[i];return t}return r},d.idle=function(e){this.center.idle(e),this.radius.idle(e),this.rotation.idle(e)},d.flush=function(e){this.center.flush(e),this.radius.flush(e),this.rotation.flush(e)},d.pan=function(e,t,r,i){t=t||0,r=r||0,i=i||0,this.recalcMatrix(e);var n=this.computedMatrix,a=n[1],o=n[5],s=n[9],c=l(a,o,s);a/=c,o/=c,s/=c;var u=n[0],h=n[4],d=n[8],f=u*a+h*o+d*s;u-=a*f;var p=l(u,h-=o*f,d-=s*f);u/=p,h/=p,d/=p;var m=n[2],g=n[6],y=n[10],v=m*a+g*o+y*s,x=m*u+g*h+y*d;m-=v*a+x*u;var b=l(m,g-=v*o+x*h,y-=v*s+x*d);m/=b,g/=b,y/=b;var _=u*t+a*r,w=h*t+o*r,T=d*t+s*r;this.center.move(e,_,w,T);var M=Math.exp(this.computedRadius[0]);M=Math.max(1e-4,M+i),this.radius.set(e,Math.log(M))},d.rotate=function(e,t,r,i){this.recalcMatrix(e),t=t||0,r=r||0;var n=this.computedMatrix,a=n[0],o=n[4],s=n[8],u=n[1],h=n[5],d=n[9],f=n[2],p=n[6],m=n[10],g=t*a+r*u,y=t*o+r*h,v=t*s+r*d,x=-(p*v-m*y),b=-(m*g-f*v),_=-(f*y-p*g),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),T=c(x,b,_,w);T>1e-6?(x/=T,b/=T,_/=T,w/=T):(x=b=_=0,w=1);var M=this.computedRotation,k=M[0],A=M[1],S=M[2],E=M[3],C=k*w+E*x+A*_-S*b,L=A*w+E*b+S*x-k*_,P=S*w+E*_+k*b-A*x,I=E*w-k*x-A*b-S*_;if(i){x=f;var z=Math.sin(i)/l(x,b=p,_=m);x*=z,b*=z,_*=z,C=C*(w=Math.cos(t))+I*x+L*_-P*b,L=L*w+I*b+P*x-C*_,P=P*w+I*_+C*b-L*x,I=I*w-C*x-L*b-P*_}var D=c(C,L,P,I);D>1e-6?(C/=D,L/=D,P/=D,I/=D):(C=L=P=0,I=1),this.rotation.set(e,C,L,P,I)},d.lookAt=function(e,t,r,i){this.recalcMatrix(e),r=r||this.computedCenter,t=t||this.computedEye,i=i||this.computedUp;var a=this.computedMatrix;n(a,t,r,i);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),u(o,o),this.rotation.set(e,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-t[c],2);this.radius.set(e,.5*Math.log(Math.max(l,1e-6))),this.center.set(e,r[0],r[1],r[2])},d.translate=function(e,t,r,i){this.center.move(e,t||0,r||0,i||0)},d.setMatrix=function(e,t){var r=this.computedRotation;s(r,t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]),u(r,r),this.rotation.set(e,r[0],r[1],r[2],r[3]);var i=this.computedMatrix;o(i,t);var n=i[15];if(Math.abs(n)>1e-6){var a=i[12]/n,l=i[13]/n,c=i[14]/n;this.recalcMatrix(e);var h=Math.exp(this.computedRadius[0]);this.center.set(e,a-i[2]*h,l-i[6]*h,c-i[10]*h),this.radius.idle(e)}else this.center.idle(e),this.radius.idle(e)},d.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},d.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=Math.max(t=t>0?Math.log(t):1/0,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},d.getDistanceLimits=function(e){var t=this.radius.bounds;return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},d.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]}},d.fromJSON=function(e){var t=this.lastT(),r=e.center;r&&this.center.set(t,r[0],r[1],r[2]);var i=e.rotation;i&&this.rotation.set(t,i[0],i[1],i[2],i[3]);var n=e.distance;n&&n>0&&this.radius.set(t,Math.log(n)),this.setDistanceLimits(e.zoomMin,e.zoomMax)}},1371(e,t,r){var i=r(3233);e.exports=function(e,t,r){return i(r="u">typeof r?r+"":" ",t)+e}},3202(e){e.exports=function(e,t){t||(t=[0,""]);var r=parseFloat(e=String(e),10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},3088(e,t,r){e.exports=function(e,t){for(var r=0|t.length,n=e.length,a=[Array(r),Array(r)],o=0;o0){o=a[u][r][0],l=u;break}s=o[1^l];for(var h=0;h<2;++h)for(var d=a[h][r],f=0;f0&&(o=p,s=m,l=h)}return n||o&&c(o,l),s}for(var o=0;o0;){a[0][o].length;var f=function(e,r){var n=a[r][e][0],o=[e];c(n,r);for(var s=n[1^r];;){for(;s!==e;)o.push(s),s=u(o[o.length-2],s,!1);if(a[0][e].length+a[1][e].length===0)break;var l=o[o.length-1],h=o[1],d=u(l,e,!0);if(0>i(t[l],t[e],t[h],t[d]))break;o.push(e),s=u(l,e)}return o}(o,h);f[1]===f[f.length-1]?d.push.apply(d,f):(d.length>0&&l.push(d),d=f)}d.length>0&&l.push(d)}return l};var i=r(3140)},5609(e,t,r){e.exports=function(e,t){for(var r=i(e,t.length),n=Array(t.length),a=Array(t.length),o=[],s=0;s0;){var c=o.pop();n[c]=!1;for(var u=r[c],s=0;s0});for(var m=p.length,g=Array(m),y=Array(m),f=0;f0;){var j=R.pop(),B=E[j];l(B,function(e,t){return e-t});var N,U=B.length,V=F[j];if(0===V){var w=p[j];N=[w]}for(var f=0;f=0)&&(F[q]=1^V,R.push(q),0===V)){var w=p[q];O(w)||(w.reverse(),N.push(w))}}0===V&&r.push(N)}return r};var i=r(3134),n=r(3088),a=r(5085),o=r(5250),s=r(8210),l=r(1682),c=r(5609);function u(e,t){for(var r=Array(e),i=0;i0)||a[t]!==e[0])return 1;else n=r[t-1];for(var s=1;n;){var l=n.key,c=i(e,l[0],l[1]);if(l[0][0]0))return 0;s=-1,n=n.right}else if(c>0)n=n.left;else{if(!(c<0))return 0;s=1,n=n.right}}return s});return 0===d.length?_:(s=l(d),function(e){return s(e[0],e[1])?0:_(e)})};var i=r(3250)[3],n=r(4209),a=r(3352),o=r(2478);function s(){return!0}function l(e){for(var t={},r=0;r=f?(M=1,w=f+2*g+v):(M=-g/f,w=g*M+v)):(M=0,y>=0?(k=0,w=v):-y>=m?(k=1,w=m+2*y+v):(k=-y/m,w=y*k+v));else if(k<0)k=0,g>=0?(M=0,w=v):-g>=f?(M=1,w=f+2*g+v):(M=-g/f,w=g*M+v);else{var A=1/T;M*=A,k*=A,w=M*(f*M+p*k+2*g)+k*(p*M+m*k+2*y)+v}else M<0?(l=p+g,(c=m+y)>l?(u=c-l)>=(h=f-2*p+m)?(M=1,k=0,w=f+2*g+v):(k=1-(M=u/h),w=M*(f*M+p*k+2*g)+k*(p*M+m*k+2*y)+v):(M=0,c<=0?(k=1,w=m+2*y+v):y>=0?(k=0,w=v):(k=-y/m,w=y*k+v))):k<0?(l=p+y,(c=f+g)>l?(u=c-l)>=(h=f-2*p+m)?(k=1,M=0,w=m+2*y+v):w=(M=1-(k=u/h))*(f*M+p*k+2*g)+k*(p*M+m*k+2*y)+v:(k=0,c<=0?(M=1,w=f+2*g+v):g>=0?(M=0,w=v):(M=-g/f,w=g*M+v))):(u=m+y-p-g)<=0?(M=0,k=1,w=m+2*y+v):u>=(h=f-2*p+m)?(M=1,k=0,w=f+2*g+v):(k=1-(M=u/h),w=M*(f*M+p*k+2*g)+k*(p*M+m*k+2*y)+v);for(var S=1-M-k,d=0;d0){var c=e[r-1];if(0===i(s,c)&&a(c)!==l){r-=1;continue}}e[r++]=s}}return e.length=r,e}},3233(e){var t,r="";e.exports=function(e,i){if("string"!=typeof e)throw TypeError("expected a string");if(1===i)return e;if(2===i)return e+e;var n=e.length*i;if(t!==e||typeof t>"u")t=e,r="";else if(r.length>=n)return r.substr(0,n);for(;n>r.length&&i>1;)1&i&&(r+=e),i>>=1,e+=e;return r+=e,r=r.substr(0,n)}},3025(e,t,r){e.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004(e){e.exports=function(e){for(var t=e.length,r=e[e.length-1],i=t,n=t-2;n>=0;--n){var a=r,o=e[n],s=(r=a+o)-a,l=o-s;l&&(e[--i]=r,r=l)}for(var c=0,n=i;n0){if(a<=0)return o;i=n+a}else{if(!(n<0)||a>=0)return o;i=-(n+a)}var l=s*i;return o>=l||o<=-l?o:u(e,t,r)},function(e,t,r,i){var n=e[0]-i[0],a=t[0]-i[0],o=r[0]-i[0],s=e[1]-i[1],c=t[1]-i[1],u=r[1]-i[1],d=e[2]-i[2],f=t[2]-i[2],p=r[2]-i[2],m=a*u,g=o*c,y=o*s,v=n*u,x=n*c,b=a*s,_=d*(m-g)+f*(y-v)+p*(x-b),w=l*((Math.abs(m)+Math.abs(g))*Math.abs(d)+(Math.abs(y)+Math.abs(v))*Math.abs(f)+(Math.abs(x)+Math.abs(b))*Math.abs(p));return _>w||-_>w?_:h(e,t,r,i)}];d.length<=5;)d.push(c(d.length));e.exports=(function(e,t,r,i,n,a,o){return function(t,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return i(t,r);case 3:return n(t,r,s);case 4:return a(t,r,s,l);case 5:return o(t,r,s,l,c)}for(var u=Array(arguments.length),h=0;h0&&o>0||a<0&&o<0)return!1;var s=i(r,e,t),l=i(n,e,t);return(!(s>0)||!(l>0))&&(!(s<0)||!(l<0))&&(0!==a||0!==o||0!==s||0!==l||function(e,t,r,i){for(var n=0;n<2;++n){var a=e[n],o=t[n],s=Math.min(a,o),l=Math.max(a,o),c=r[n],u=i[n],h=Math.min(c,u);if(Math.max(c,u)=i?(c=g,(f+=1)=i?(c=g,(f+=1)"u"&&(s=function(e){for(var t=e.length,r=0,i=0;i>1,c=t[2*l+1];if(c===a)return l;a>1,c=t[2*l+1];if(c===a)return l;a>1,c=t[2*l+1];if(c===a)return l;a0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:+(e>=10)},t.popCount=function(e){return e-=e>>>1&0x55555555,((e=(0x33333333&e)+(e>>>2&0x33333333))+(e>>>4)&0xf0f0f0f)*0x1010101>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var i=Array(256);(function(e){for(var t=0;t<256;++t){var r=t,i=t,n=7;for(r>>>=1;r;r>>>=1)i<<=1,i|=1&r,--n;e[t]=i<>>8&255]<<16|i[e>>>16&255]<<8|i[e>>>24&255]},t.interleave2=function(e,t){return e&=65535,t&=65535,(e=((e=((e=((e=(e|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=(t|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1},t.deinterleave2=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x55555555)|e>>>1)&0x33333333)|e>>>2)&0xf0f0f0f)|e>>>4)&0xff00ff)|e>>>16)&65535)<<16>>16},t.interleave3=function(e,t,r){return e&=1023,t&=1023,r&=1023,r=((r=((r=((r=(r|r<<16)&0xff0000ff)|r<<8)&0xf00f00f)|r<<4)&0xc30c30c3)|r<<2)&0x49249249,(e=((e=((e=((e=(e|e<<16)&0xff0000ff)|e<<8)&0xf00f00f)|e<<4)&0xc30c30c3)|e<<2)&0x49249249|(t=((t=((t=((t=(t|t<<16)&0xff0000ff)|t<<8)&0xf00f00f)|t<<4)&0xc30c30c3)|t<<2)&0x49249249)<<1)|r<<2},t.deinterleave3=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x49249249)|e>>>2)&0xc30c30c3)|e>>>4)&0xf00f00f)|e>>>8)&0xff0000ff)|e>>>16)&1023)<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},2014(e,t,r){var i=r(3105),n=r(4623);function a(e,t){var r=e.length,i=e.length-t.length,n=Math.min;if(i)return i;switch(r){case 0:return 0;case 1:return e[0]-t[0];case 2:var a=e[0]+e[1]-t[0]-t[1];return a||n(e[0],e[1])-n(t[0],t[1]);case 3:var o=e[0]+e[1],s=t[0]+t[1];if(a=o+e[2]-(s+t[2]))return a;var l=n(e[0],e[1]),c=n(t[0],t[1]),a=n(l,e[2])-n(c,t[2]);return a||n(l+e[2],o)-n(c+t[2],s);default:var u=e.slice(0);u.sort();var h=t.slice(0);h.sort();for(var d=0;d>1,s=a(e[o],t);s<=0?(0===s&&(n=o),r=o+1):s>0&&(i=o-1)}return n}function u(e,t){for(var r=Array(e.length),n=0,o=r.length;n=e.length||0!==a(e[g],s)););}return r}function h(e,t){if(t<0)return[];for(var r=[],n=(1<>>u&1&&c.push(n[u]);t.push(c)}return s(t)},t.skeleton=h,t.boundary=function(e){for(var t=[],r=0,i=e.length;r0;){var r,i=1&(r=e)?r-1>>1:(r>>1)-1;if(i>=0&&t0){var e=w[0];return g(0,M-1),M-=1,v(0),e}return -1}function _(e,t){var r=w[e];return c[r]===t?e:(c[r]=-1/0,x(e),b(),c[r]=t,x((M+=1)-1))}for(var w=[],T=Array(a),h=0;h>1;h>=0;--h)v(h);for(;;){var k=b();if(k<0||c[k]>r)break;!function(e){if(!u[e]){u[e]=!0;var t=s[e],r=l[e];s[r]>=0&&(s[r]=t),l[t]>=0&&(l[t]=r),T[t]>=0&&_(T[t],m(t)),T[r]>=0&&_(T[r],m(r))}}(k)}for(var A=[],h=0;h=0&&r>=0&&t!==r){var i=T[t],n=T[r];i!==n&&E.push([i,n])}}),n.unique(n.normalize(E)),{positions:A,edges:E}};var i=r(3250),n=r(2014)},1303(e,t,r){e.exports=function(e,t){if(t[0][0]t[1][0]))return n(t,e);r=t[1],a=t[0]}if(e[0][0]e[1][0]))return-n(e,t);o=e[1],s=e[0]}var r,a,o,s,l=i(r,a,s),c=i(r,a,o);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=i(s,o,a),c=i(s,o,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return a[0]-s[0]};var i=r(3250);function n(e,t){if(t[0][0]t[1][0])r=t[1],n=t[0];else{var r,n,a,o,s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]),c=Math.min(t[0][1],t[1][1]),u=Math.max(t[0][1],t[1][1]);return lu?s-u:l-u}e[0][1]0)if(t[0]!==o[1][0])r=e,e=e.right;else{var l=c(e.right,t);if(l)return l;e=e.left}else{if(t[0]!==o[1][0])return e;var l=c(e.right,t);if(l)return l;e=e.left}}return r}function u(e,t,r,i){this.y=e,this.index=t,this.start=r,this.closed=i}function h(e,t,r,i){this.x=e,this.segment=t,this.create=r,this.index=i}s.prototype.castUp=function(e){var t=i.le(this.coordinates,e[0]);if(t<0)return -1;this.slabs[t];var r=c(this.slabs[t],e),n=-1;if(r&&(n=r.value),this.coordinates[t]===e[0]){var s=null;if(r&&(s=r.key),t>0){var u=c(this.slabs[t-1],e);u&&(s?o(u.key,s)>0&&(s=u.key,n=u.value):(n=u.value,s=u.key))}var h=this.horizontal[t];if(h.length>0){var d=i.ge(h,e[1],l);if(d=h.length)return n;f=h[d]}}if(f.start)if(s){var p=a(s[0],s[1],[e[0],f.y]);s[0][0]>s[1][0]&&(p=-p),p>0&&(n=f.index)}else n=f.index;else f.y!==e[1]&&(n=f.index)}}}return n}},5202(e,t,r){var i=r(1944),n=r(8210);function a(e,t){var r=n(i(e,t),[t[t.length-1]]);return r[r.length-1]}function o(e,t,r,i){var n=-t/(i-t);n<0?n=0:n>1&&(n=1);for(var a=1-n,o=e.length,s=Array(o),l=0;l0||n>0&&u<0){var h=o(s,u,l,n);r.push(h),i.push(h.slice())}u<0?i.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),i.push(l.slice())),n=u}return{positive:r,negative:i}},e.exports.positive=function(e,t){for(var r=[],i=a(e[e.length-1],t),n=e[e.length-1],s=e[0],l=0;l0||i>0&&c<0)&&r.push(o(n,c,s,i)),c>=0&&r.push(s.slice()),i=c}return r},e.exports.negative=function(e,t){for(var r=[],i=a(e[e.length-1],t),n=e[e.length-1],s=e[0],l=0;l0||i>0&&c<0)&&r.push(o(n,c,s,i)),c<=0&&r.push(s.slice()),i=c}return r}},3387(e,t,r){var i;!function(){var n=/[^T]/,a=/[^v]/,o=/[diefg]/,s=/[bcdiefguxX]/,l=/[j]/,c=/^[^\x25]+/,u=/^\x25{2}/,h=/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,d=/^([a-z_][a-z_\d]*)/i,f=/^\.([a-z_][a-z_\d]*)/i,p=/^\[(\d+)\]/,m=/^[+-]/;function g(e){return function(e,t){var r,i,c,u,h,d,f,p,y,v=1,x=e.length,b="";for(i=0;i=0),u.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,u.width?parseInt(u.width):0);break;case"e":r=u.precision?parseFloat(r).toExponential(u.precision):parseFloat(r).toExponential();break;case"f":r=u.precision?parseFloat(r).toFixed(u.precision):parseFloat(r);break;case"g":r=u.precision?String(Number(r.toPrecision(u.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=u.precision?r.substring(0,u.precision):r;break;case"t":r=String(!!r),r=u.precision?r.substring(0,u.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=u.precision?r.substring(0,u.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=u.precision?r.substring(0,u.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}l.test(u.type)?b+=r:(o.test(u.type)&&(!p||u.sign)?(y=p?"+":"-",r=r.toString().replace(m,"")):y="",d=u.pad_char?"0"===u.pad_char?"0":u.pad_char.charAt(1):" ",f=u.width-(y+r).length,h=u.width&&f>0?d.repeat(f):"",b+=u.align?y+r+h:"0"===d?y+h+r:h+y+r)}return b}(function(e){if(v[e])return v[e];for(var t,r=e,i=[],n=0;r;){if(null!==(t=c.exec(r)))i.push(t[0]);else if(null!==(t=u.exec(r)))i.push("%");else if(null!==(t=h.exec(r))){if(t[2]){n|=1;var a=[],o=t[2],s=[];if(null!==(s=d.exec(o)))for(a.push(s[1]);""!==(o=o.substring(s[0].length));)if(null!==(s=f.exec(o)))a.push(s[1]);else if(null!==(s=p.exec(o)))a.push(s[1]);else throw SyntaxError("[sprintf] failed to parse named argument key");else throw SyntaxError("[sprintf] failed to parse named argument key");t[2]=a}else n|=2;if(3===n)throw Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}else throw SyntaxError("[sprintf] unexpected placeholder");r=r.substring(t[0].length)}return v[e]=i}(e),arguments)}function y(e,t){return g.apply(null,[e].concat(t||[]))}var v=Object.create(null);t.sprintf=g,t.vsprintf=y,"u">typeof window&&(window.sprintf=g,window.vsprintf=y,void 0!==(i=(function(){return{sprintf:g,vsprintf:y}}).call(t,r,t,e))&&(e.exports=i))}()},3711(e,t,r){e.exports=function(e,t){if(e.dimension<=0)return{positions:[],cells:[]};if(1===e.dimension)return function(e,t){for(var r=n(e,t),i=r.length,a=Array(i),o=Array(i),s=0;si|0},vertex:function(e,t,r,i,n,a,o,s,l,c,u,h,d){var f=(0|o)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==f&&15!==f)switch(f){case 0:case 15:u.push([e-.5,t-.5]);break;case 1:u.push([e-.25-.25*(i+r-2*d)/(r-i),t-.25-.25*(n+r-2*d)/(r-n)]);break;case 2:u.push([e-.75-.25*(-i-r+2*d)/(i-r),t-.25-.25*(a+i-2*d)/(i-a)]);break;case 3:u.push([e-.5,t-.5-.5*(n+r+a+i-4*d)/(r-n+i-a)]);break;case 4:u.push([e-.25-.25*(a+n-2*d)/(n-a),t-.75-.25*(-n-r+2*d)/(n-r)]);break;case 5:u.push([e-.5-.5*(i+r+a+n-4*d)/(r-i+n-a),t-.5]);break;case 6:u.push([e-.5-.25*(-i-r+a+n)/(i-r+n-a),t-.5-.25*(-n-r+a+i)/(n-r+i-a)]);break;case 7:u.push([e-.75-.25*(a+n-2*d)/(n-a),t-.75-.25*(a+i-2*d)/(i-a)]);break;case 8:u.push([e-.75-.25*(-a-n+2*d)/(a-n),t-.75-.25*(-a-i+2*d)/(a-i)]);break;case 9:u.push([e-.5-.25*(i+r+-a-n)/(r-i+a-n),t-.5-.25*(n+r+-a-i)/(r-n+a-i)]);break;case 10:u.push([e-.5-.5*(-i-r+-a-n+4*d)/(i-r+a-n),t-.5]);break;case 11:u.push([e-.25-.25*(-a-n+2*d)/(a-n),t-.75-.25*(n+r-2*d)/(r-n)]);break;case 12:u.push([e-.5,t-.5-.5*(-n-r+-a-i+4*d)/(n-r+a-i)]);break;case 13:u.push([e-.75-.25*(i+r-2*d)/(r-i),t-.25-.25*(-a-i+2*d)/(a-i)]);break;case 14:u.push([e-.25-.25*(-i-r+2*d)/(i-r),t-.25-.25*(-n-r+2*d)/(n-r)])}},cell:function(e,t,r,i,n,a,o,s,l){n?s.push([e,t]):s.push([t,e])}});return function(e,t){var r=[],n=[];return i(e,r,n,t),{positions:r,cells:n}}}},o={}},7261(e,t,r){e.exports=function(e){var t=(e=e||{}).center||[0,0,0],r=e.up||[0,1,0],i=e.right||h(r),n=e.radius||1,a=e.theta||0,u=e.phi||0;if(t=[].slice.call(t,0,3),s(r=[].slice.call(r,0,3),r),s(i=[].slice.call(i,0,3),i),"eye"in e){var f=e.eye,p=[f[0]-t[0],f[1]-t[1],f[2]-t[2]];o(i,p,r),1e-6>c(i[0],i[1],i[2])?i=h(r):s(i,i),n=c(p[0],p[1],p[2]);var m=l(r,p)/n,g=l(i,p)/n;u=Math.acos(m),a=Math.acos(g)}return n=Math.log(n),new d(e.zoomMin,e.zoomMax,t,r,i,n,a,u)};var i=r(9215),n=r(7608),a=r(6079),o=r(5911),s=r(3536),l=r(244);function c(e,t,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2))}function u(e){return Math.min(1,Math.max(-1,e))}function h(e){var t=Math.abs(e[0]),r=Math.abs(e[1]),i=Math.abs(e[2]),n=[0,0,0];t>Math.max(r,i)?n[2]=1:r>Math.max(t,i)?n[0]=1:n[1]=1;for(var a=0,o=0,l=0;l<3;++l)a+=e[l]*e[l],o+=n[l]*e[l];for(var l=0;l<3;++l)n[l]-=o/a*e[l];return s(n,n),n}function d(e,t,r,n,a,o,s,l){this.center=i(r),this.up=i(n),this.right=i(a),this.radius=i([o]),this.angle=i([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(e,t),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=Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var f=d.prototype;f.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=Math.max(t=t>0?Math.log(t):1/0,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},f.getDistanceLimits=function(e){var t=this.radius.bounds[0];return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},f.recalcMatrix=function(e){this.center.curve(e),this.up.curve(e),this.right.curve(e),this.radius.curve(e),this.angle.curve(e);for(var t=this.computedUp,r=this.computedRight,i=0,n=0,a=0;a<3;++a)n+=t[a]*r[a],i+=t[a]*t[a];for(var l=Math.sqrt(i),u=0,a=0;a<3;++a)r[a]-=t[a]*n/i,u+=r[a]*r[a],t[a]/=l;for(var h=Math.sqrt(u),a=0;a<3;++a)r[a]/=h;var d=this.computedToward;o(d,t,r),s(d,d);for(var f=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(p),y=Math.sin(p),v=Math.cos(m),x=Math.sin(m),b=this.computedCenter,_=g*v,w=y*v,T=-g*x,M=-y*x,k=this.computedEye,A=this.computedMatrix,a=0;a<3;++a){var S=_*r[a]+w*d[a]+x*t[a];A[4*a+1]=T*r[a]+M*d[a]+v*t[a],A[4*a+2]=S,A[4*a+3]=0}var E=A[1],C=A[5],L=A[9],P=A[2],I=A[6],z=A[10],D=C*z-L*I,O=L*P-E*z,R=E*I-C*P,F=c(D,O,R);D/=F,O/=F,R/=F,A[0]=D,A[4]=O,A[8]=R;for(var a=0;a<3;++a)k[a]=b[a]+A[2+4*a]*f;for(var a=0;a<3;++a){for(var u=0,j=0;j<3;++j)u+=A[a+4*j]*k[j];A[12+a]=-u}A[15]=1},f.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var i=0;i<16;++i)t[i]=r[i];return t}return r};var p=[0,0,0];f.rotate=function(e,t,r,i){if(this.angle.move(e,t,r),i){this.recalcMatrix(e);var n=this.computedMatrix;p[0]=n[2],p[1]=n[6],p[2]=n[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)n[4*c]=o[c],n[4*c+1]=s[c],n[4*c+2]=l[c];a(n,n,i,p);for(var c=0;c<3;++c)o[c]=n[4*c],s[c]=n[4*c+1];this.up.set(e,o[0],o[1],o[2]),this.right.set(e,s[0],s[1],s[2])}},f.pan=function(e,t,r,i){t=t||0,r=r||0,i=i||0,this.recalcMatrix(e);var n=this.computedMatrix,a=(this.computedRadius[0],n[1]),o=n[5],s=n[9],l=c(a,o,s);a/=l,o/=l,s/=l;var u=n[0],h=n[4],d=n[8],f=u*a+h*o+d*s;u-=a*f;var p=c(u,h-=o*f,d-=s*f);u/=p,h/=p,d/=p;var m=u*t+a*r,g=h*t+o*r,y=d*t+s*r;this.center.move(e,m,g,y);var v=Math.exp(this.computedRadius[0]);v=Math.max(1e-4,v+i),this.radius.set(e,Math.log(v))},f.translate=function(e,t,r,i){this.center.move(e,t||0,r||0,i||0)},f.setMatrix=function(e,t,r,i){var a,o,s=1;"number"==typeof r&&(s=0|r),(s<0||s>3)&&(s=1);var l=(s+2)%3;t||(this.recalcMatrix(e),t=this.computedMatrix);var h=t[s],d=t[s+4],f=t[s+8];if(i){var p=Math.abs(h),m=Math.abs(f),g=Math.max(p,Math.abs(d),m);p===g?(h=h<0?-1:1,d=f=0):m===g?(f=f<0?-1:1,h=d=0):(d=d<0?-1:1,h=f=0)}else{var y=c(h,d,f);h/=y,d/=y,f/=y}var v=t[l],x=t[l+4],b=t[l+8],_=v*h+x*d+b*f;v-=h*_;var w=c(v,x-=d*_,b-=f*_);v/=w,x/=w;var T=d*(b/=w)-f*x,M=f*v-h*b,k=h*x-d*v,A=c(T,M,k);if(T/=A,M/=A,k/=A,this.center.jump(e,q,H,G),this.radius.idle(e),this.up.jump(e,h,d,f),this.right.jump(e,v,x,b),2===s){var S=t[1],E=t[5],C=t[9],L=S*v+E*x+C*b,P=S*T+E*M+C*k;a=O<0?-Math.PI/2:Math.PI/2,o=Math.atan2(P,L)}else{var I=t[2],z=t[6],D=t[10],O=I*h+z*d+D*f,R=I*v+z*x+D*b,F=I*T+z*M+D*k;a=Math.asin(u(O)),o=Math.atan2(F,R)}this.angle.jump(e,o,a),this.recalcMatrix(e);var j=t[2],B=t[6],N=t[10],U=this.computedMatrix;n(U,t);var V=U[15],q=U[12]/V,H=U[13]/V,G=U[14]/V,W=Math.exp(this.computedRadius[0]);this.center.jump(e,q-j*W,H-B*W,G-N*W)},f.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},f.idle=function(e){this.center.idle(e),this.up.idle(e),this.right.idle(e),this.radius.idle(e),this.angle.idle(e)},f.flush=function(e){this.center.flush(e),this.up.flush(e),this.right.flush(e),this.radius.flush(e),this.angle.flush(e)},f.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},f.lookAt=function(e,t,r,i){this.recalcMatrix(e),t=t||this.computedEye,r=r||this.computedCenter;var n=(i=i||this.computedUp)[0],a=i[1],o=i[2],s=c(n,a,o);if(!(s<1e-6)){n/=s,a/=s,o/=s;var l=t[0]-r[0],h=t[1]-r[1],d=t[2]-r[2],f=c(l,h,d);if(!(f<1e-6)){l/=f,h/=f,d/=f;var p=this.computedRight,m=p[0],g=p[1],y=p[2],v=n*m+a*g+o*y;m-=v*n;var x=c(m,g-=v*a,y-=v*o);if(!(x<.01&&(x=c(m=a*d-o*h,g=o*l-n*d,y=n*h-a*l))<1e-6)){m/=x,g/=x,y/=x,this.up.set(e,n,a,o),this.right.set(e,m,g,y),this.center.set(e,r[0],r[1],r[2]),this.radius.set(e,Math.log(f));var b=a*y-o*g,_=o*m-n*y,w=n*g-a*m,T=c(b,_,w);b/=T;var M=n*l+a*h+o*d,k=m*l+g*h+y*d,A=b*l+(_/=T)*h+(w/=T)*d,S=Math.asin(u(M)),E=Math.atan2(A,k),C=this.angle._state,L=C[C.length-1],P=C[C.length-2],I=Math.abs((L%=2*Math.PI)+2*Math.PI-E),z=Math.abs(L-E),D=Math.abs(L-2*Math.PI-E);Itypeof Uint8ClampedArray,s="u">typeof BigUint64Array,l="u">typeof BigInt64Array,c=r.g.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=n([32,0])),c.BIGUINT64||(c.BIGUINT64=n([32,0])),c.BIGINT64||(c.BIGINT64=n([32,0])),c.BUFFER||(c.BUFFER=n([32,0]));var u=c.DATA,h=c.BUFFER;function d(e){if(e){var t=e.length||e.byteLength;u[i.log2(t)].push(e)}}function f(e){var e=i.nextPow2(e),t=u[i.log2(e)];return t.length>0?t.pop():new ArrayBuffer(e)}function p(e){return new Uint8Array(f(e),0,e)}function m(e){return new Uint16Array(f(2*e),0,e)}function g(e){return new Uint32Array(f(4*e),0,e)}function y(e){return new Int8Array(f(e),0,e)}function v(e){return new Int16Array(f(2*e),0,e)}function x(e){return new Int32Array(f(4*e),0,e)}function b(e){return new Float32Array(f(4*e),0,e)}function _(e){return new Float64Array(f(8*e),0,e)}function w(e){return o?new Uint8ClampedArray(f(e),0,e):p(e)}function T(e){return s?new BigUint64Array(f(8*e),0,e):null}function M(e){return l?new BigInt64Array(f(8*e),0,e):null}function k(e){return new DataView(f(e),0,e)}function A(e){e=i.nextPow2(e);var t=h[i.log2(e)];return t.length>0?t.pop():new a(e)}t.free=function(e){if(a.isBuffer(e))h[i.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength;u[0|i.log2(t)].push(e)}},t.freeUint8=t.freeUint16=t.freeUint32=t.freeBigUint64=t.freeInt8=t.freeInt16=t.freeInt32=t.freeBigInt64=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=function(e){d(e.buffer)},t.freeArrayBuffer=d,t.freeBuffer=function(e){h[i.log2(e.length)].push(e)},t.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return f(e);switch(t){case"uint8":return p(e);case"uint16":return m(e);case"uint32":return g(e);case"int8":return y(e);case"int16":return v(e);case"int32":return x(e);case"float":case"float32":return b(e);case"double":case"float64":return _(e);case"uint8_clamped":return w(e);case"bigint64":return M(e);case"biguint64":return T(e);case"buffer":return A(e);case"data":case"dataview":return k(e);default:return null}},t.mallocArrayBuffer=f,t.mallocUint8=p,t.mallocUint16=m,t.mallocUint32=g,t.mallocInt8=y,t.mallocInt16=v,t.mallocInt32=x,t.mallocFloat32=t.mallocFloat=b,t.mallocFloat64=t.mallocDouble=_,t.mallocUint8Clamped=w,t.mallocBigUint64=T,t.mallocBigInt64=M,t.mallocDataView=k,t.mallocBuffer=A,t.clearCache=function(){for(var e=0;e<32;++e)c.UINT8[e].length=0,c.UINT16[e].length=0,c.UINT32[e].length=0,c.INT8[e].length=0,c.INT16[e].length=0,c.INT32[e].length=0,c.FLOAT[e].length=0,c.DOUBLE[e].length=0,c.BIGUINT64[e].length=0,c.BIGINT64[e].length=0,c.UINT8C[e].length=0,u[e].length=0,h[e].length=0}},1755(e){function t(e){this.roots=Array(e),this.ranks=Array(e);for(var t=0;ttypeof document&&((n=document.createElement("canvas")).width=8192,n.height=1024,a=n.getContext("2d"))},7718(e,t,r){e.exports=function(e,t,r,i){var a=64,o=1.25,s={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};return i&&(i.size&&i.size>0&&(a=i.size),i.lineSpacing&&i.lineSpacing>0&&(o=i.lineSpacing),i.styletags&&i.styletags.breaklines&&(s.breaklines=!!i.styletags.breaklines),i.styletags&&i.styletags.bolds&&(s.bolds=!!i.styletags.bolds),i.styletags&&i.styletags.italics&&(s.italics=!!i.styletags.italics),i.styletags&&i.styletags.subscripts&&(s.subscripts=!!i.styletags.subscripts),i.styletags&&i.styletags.superscripts&&(s.superscripts=!!i.styletags.superscripts)),r.font=[i.fontStyle,i.fontVariant,i.fontWeight,a+"px",i.font].filter(function(e){return e}).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",h(function(e,t,r,i,a,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\/g,` `):r.replace(/\/g," ");var s="",l=[];for(x=0;x-1?parseInt(e[1+n]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(i=i.replace(A(),"?px "),w*=Math.pow(.75,l-s),i=i.replace("?px ",A())),_+=.25*p*(l-s)}if(!0===o.superscripts){var c=e.indexOf("+"),u=r.indexOf("+"),h=c>-1?parseInt(e[1+c]):0,d=u>-1?parseInt(r[1+u]):0;h!==d&&(i=i.replace(A(),"?px "),w*=Math.pow(.75,d-h),i=i.replace("?px ",A())),_-=.25*p*(d-h)}if(!0===o.bolds){var f=e.indexOf("b|")>-1,m=r.indexOf("b|")>-1;!f&&m&&(i=g?i.replace("italic ","italic bold "):"bold "+i),f&&!m&&(i=i.replace("bold ",""))}if(!0===o.italics){var g=e.indexOf("i|")>-1,y=r.indexOf("i|")>-1;!g&&y&&(i="italic "+i),g&&!y&&(i=i.replace("italic ",""))}t.font=i}(s,E),s=E))}k(),T+=S.length;var C=0|Math.round(b+2*i);g",a="",o=n.length,s=a.length,l="+"===t[0]||"-"===t[0],c=0,u=-s;c>-1&&!(-1===(c=r.indexOf(n,c))||-1===(u=r.indexOf(a,c+o))||u<=c);){for(var h=c;h=u)i[h]=null,r=r.substr(0,h)+" "+r.substr(h+1);else if(null!==i[h]){var d=i[h].indexOf(t[0]);-1===d?i[h]+=t:l&&(i[h]=i[h].substr(0,d+1)+(1+parseInt(i[h][d+1]))+i[h].substr(d+2))}var f=c+o,p=r.substr(f,u-f).indexOf(n);c=-1!==p?p:u+s}return i}function u(e,t,r,n){var c,u=(c=i(e,128),n?a(c.cells,c.positions,.25):{edges:c.cells,positions:c.positions}),h=function(e,t,r){for(var i=t.textAlign||"start",n=t.textBaseline||"alphabetic",a=[0x40000000,0x40000000],o=[0,0],s=e.length,l=0;ltypeof ses)||!ses.ok||ses.ok()){"u">typeof ses&&(ses.weakMapPermitHostObjects=v);var t,r,i,n=!1;if("function"==typeof WeakMap){var a=WeakMap;if(!("u">typeof navigator&&/Firefox/.test(navigator.userAgent))){var o=new a,s=Object.freeze({});if(o.set(s,1),1!==o.get(s))n=!0;else{e.exports=WeakMap;return}}}Object.prototype.hasOwnProperty;var l=Object.getOwnPropertyNames,c=Object.defineProperty,u=Object.isExtensible,h="weakmap:",d=h+"ident:"+Math.random()+"___";if("u">typeof crypto&&"function"==typeof crypto.getRandomValues&&"function"==typeof ArrayBuffer&&"function"==typeof Uint8Array){var f=new Uint8Array(new ArrayBuffer(25));crypto.getRandomValues(f),d=h+"rand:"+Array.prototype.map.call(f,function(e){return(e%36).toString(36)}).join("")+"___"}if(c(Object,"getOwnPropertyNames",{value:function(e){return l(e).filter(x)}}),"getPropertyNames"in Object){var p=Object.getPropertyNames;c(Object,"getPropertyNames",{value:function(e){return p(e).filter(x)}})}t=Object.freeze,c(Object,"freeze",{value:function(e){return b(e),t(e)}}),r=Object.seal,c(Object,"seal",{value:function(e){return b(e),r(e)}}),i=Object.preventExtensions,c(Object,"preventExtensions",{value:function(e){return b(e),i(e)}});var m=!1,g=0,y=function(){this instanceof y||w();var e=[],t=[],r=g++;return Object.create(y.prototype,{get___:{value:_(function(i,n){var a,o=b(i);return o?r in o?o[r]:n:(a=e.indexOf(i))>=0?t[a]:n})},has___:{value:_(function(t){var i=b(t);return i?r in i:e.indexOf(t)>=0})},set___:{value:_(function(i,n){var a,o=b(i);return o?o[r]=n:(a=e.indexOf(i))>=0?t[a]=n:(t[a=e.length]=n,e[a]=i),this})},delete___:{value:_(function(i){var n,a,o=b(i);return o?r in o&&delete o[r]:!((n=e.indexOf(i))<0)&&(a=e.length-1,e[n]=void 0,t[n]=t[a],e[n]=e[a],e.length=a,t.length=a,!0)})}})};y.prototype=Object.create(Object.prototype,{get:{value:function(e,t){return this.get___(e,t)},writable:!0,configurable:!0},has:{value:function(e){return this.has___(e)},writable:!0,configurable:!0},set:{value:function(e,t){return this.set___(e,t)},writable:!0,configurable:!0},delete:{value:function(e){return this.delete___(e)},writable:!0,configurable:!0}}),"function"==typeof a?function(){function t(){this instanceof y||w();var e,t=new a,r=void 0,i=!1;return e=n?function(e,i){return t.set(e,i),t.has(e)||(r||(r=new y),r.set(e,i)),this}:function(e,n){if(i)try{t.set(e,n)}catch{r||(r=new y),r.set___(e,n)}else t.set(e,n);return this},Object.create(y.prototype,{get___:{value:_(function(e,i){return r?t.has(e)?t.get(e):r.get___(e,i):t.get(e,i)})},has___:{value:_(function(e){return t.has(e)||!!r&&r.has___(e)})},set___:{value:_(e)},delete___:{value:_(function(e){var i=!!t.delete(e);return r&&r.delete___(e)||i})},permitHostObjects___:{value:_(function(e){if(e===v)i=!0;else throw Error("bogus call to permitHostObjects___")})}})}n&&"u">typeof Proxy&&(Proxy=void 0),t.prototype=y.prototype,e.exports=t,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("u">typeof Proxy&&(Proxy=void 0),e.exports=y)}function v(e){e.permitHostObjects___&&e.permitHostObjects___(v)}function x(e){return e.substr(0,h.length)!=h||"___"!==e.substr(e.length-3)}function b(e){if(e!==Object(e))throw TypeError("Not an object: "+e);var t=e[d];if(t&&t.key===e)return t;if(u(e)){t={key:e};try{return c(e,d,{value:t,writable:!1,enumerable:!1,configurable:!1}),t}catch{return}}}function _(e){return e.prototype=null,Object.freeze(e)}function w(){!m&&"u">typeof console&&(m=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},236:function(e,t,r){var i=r(8284);e.exports=function(){var e={};return function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)throw Error("Weakmap-shim: Key must be object");var r=t.valueOf(e);return r&&r.identity===e?r:i(t,e)}}},8284:function(e){e.exports=function(e,t){var r={identity:t},i=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?i.apply(this,arguments):r},writable:!0}),r}},606:function(e,t,r){var i=r(236);e.exports=function(){var e=i();return{get:function(t,r){var i=e(t);return i.hasOwnProperty("value")?i.value:r},set:function(t,r){return e(t).value=r,this},has:function(t){return"value"in e(t)},delete:function(t){return delete e(t).value}}}},3349:function(e){var t,r;t=(function(){return function(e,t,r,i,n,a){var o=e[0],s=r[0],l=[0];i|=0;var c=0;for(c=0;c=0!=h>=0&&n.push(l[0]+.5+.5*(u+h)/(u-h)),i+=s,++l[0]}}}).bind(void 0,{funcName:"zeroCrossings"}),r={},e.exports=function(e,i,n){var a=e.dtype,o=e.order,s=[a,o.join()].join(),l=r[s];return l||(r[s]=l=t([a,o])),l(e.shape.slice(0),e.data,e.stride,0|e.offset,i,n)}},781:function(e,t,r){e.exports=function(e,t){var r=[];return t=+t||0,i(e.hi(e.shape[0]-1),r,t),r};var i=r(3349)},7790:function(){}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var a=i[e]={id:e,loaded:!1,exports:{}};return r[e].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch{if("object"==typeof window)return window}}(),n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},t.exports=n(1964)}}),fd=p({"src/lib/str2rgbarray.js"(e,t){var{normalize:r}=ee();t.exports=function(e){return e?r(e):[0,0,0,1]}}}),ff=p({"src/lib/gl_format_color.js"(e,t){var r=C(),i=t3(),n=ee(),a=Q().defaultLine,o=z().isArrayOrTypedArray,s=n.normalize(a);function l(e,t){return[e[0],e[1],e[2],e[3]*t]}function c(e){return!r(e)&&(n.isChannelArray(e)||n.isValid(e))?n.normalize(e):s}function u(e){return r(e)?e:1}t.exports={formatColor:function(e,t,r){var a=e.color;a&&a._inputArray&&(a=a._inputArray);var h,d,f,p,m,g=o(a),y=o(t),v=i.extractOpts(e),x=[];if(h=void 0!==v.colorscale?i.makeColorScaleFuncFromTrace(e):c,d=g?(e,t)=>void 0===e[t]?s:void 0===v.colorscale?h(e[t]):n.normalize(h(e[t])):c,f=y?function(e,t){return void 0===e[t]?1:u(e[t])}:u,g||y)for(var b=0;b0){var d=n.c2l(u);n._lowerLogErrorBound||(n._lowerLogErrorBound=d),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,d)}}else o[s]=[-l[0]*i,l[1]*i]}return o}t.exports=function(e,t,r){var n=[i(e.x,e.error_x,t[0],r.xaxis),i(e.y,e.error_y,t[1],r.yaxis),i(e.z,e.error_z,t[2],r.zaxis)],a=function(e){for(var t=0;t-1?-1:+(e.indexOf("right")>-1)}function x(e){return null==e?0:e.indexOf("top")>-1?-1:+(e.indexOf("bottom")>-1)}function b(e,t){return t(4*e)}function _(e){return d[e]}function w(e,t,r,i,n){var a=null;if(s.isArrayOrTypedArray(e)){a=[];for(var o=0;o=0){var E=function(e,t,r){var i,n=(r+1)%3,a=(r+2)%3,s=[],l=[];for(i=0;i=0&&h("surfacecolor",b||_);for(var w=["x","y","z"],T=0;T<3;++T){var M="projection."+w[T];h(M+".show")&&(h(M+".opacity"),h(M+".scale"))}var k=r.getComponentMethod("errorbars","supplyDefaults");k(e,t,b||_||c,{axis:"z"}),k(e,t,b||_||c,{axis:"y",inherit:"z"}),k(e,t,b||_||c,{axis:"x",inherit:"z"})}}}),fb=p({"src/traces/scatter3d/calc.js"(e,t){var r=i0(),i=iQ();t.exports=function(e,t){var n=[{x:!1,y:!1,trace:t,t:{}}];return r(n,t),i(e,t),n}}}),f_=p({"node_modules/get-canvas-context/index.js"(e,t){t.exports=function(e,t){if("string"!=typeof e)throw TypeError("must specify type string");if(t=t||{},typeof document>"u"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");"number"==typeof t.width&&(r.width=t.width),"number"==typeof t.height&&(r.height=t.height);var i,n=t;try{var a=[e];0===e.indexOf("webgl")&&a.push("experimental-"+e);for(var o=0;o/g," "));l[c]=f,u.tickmode=h}}t.ticks=l;for(var c=0;c<3;++c){a[c]=.5*(e.glplot.bounds[0][c]+e.glplot.bounds[1][c]);for(var p=0;p<2;++p)t.bounds[p][c]=e.glplot.bounds[p][c]}e.contourLevels=function(e){for(var t=[,,,],r=0;r<3;++r){for(var i=e[r],n=Array(i.length),a=0;ar.deltaY?1.1:.9090909090909091,a=e.glplot.getAspectratio();e.glplot.setAspectratio({x:i*a.x,y:i*a.y,z:i*a.z})}n(e)}},!!l&&{passive:!1}),e.glplot.canvas.addEventListener("mousemove",function(){if(!1!==e.fullSceneLayout.dragmode&&0!==e.camera.mouseListener.buttons){var t=i();e.graphDiv.emit("plotly_relayouting",t)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(r){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:r,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0},T.render=function(){var e,t=this,r=t.graphDiv,i=t.svgContainer,n=t.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=n.width*a,l=n.height*o;i.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),i.setAttributeNS(null,"width",s),i.setAttributeNS(null,"height",l),x(t),t.glplot.axes.update(t.axesOptions);for(var c=Object.keys(t.traces),h=null,p=t.glplot.selection,m=0;m")):"isosurface"===e.type||"volume"===e.type?(T.valueLabel=d.hoverLabelText(t._mockAxis,t._mockAxis.d2l(p.traceCoordinate[3]),e.valuehoverformat),E.push("value: "+T.valueLabel),p.textLabel&&E.push(p.textLabel),S=E.join("
")):S=p.textLabel;var C={x:p.traceCoordinate[0],y:p.traceCoordinate[1],z:p.traceCoordinate[2],data:b._input,fullData:b,curveNumber:b.index,pointNumber:w};f.appendArrayPointValue(C,b,w),e._module.eventData&&(C=b._module.eventData(C,p,b,{},w));var L={points:[C]};if(t.fullSceneLayout.hovermode){var P=[];f.loneHover({trace:b,x:(.5+.5*v[0]/v[3])*s,y:(.5-.5*v[1]/v[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:S,name:h.name,color:f.castHoverOption(b,w,"bgcolor")||h.color,borderColor:f.castHoverOption(b,w,"bordercolor"),fontFamily:f.castHoverOption(b,w,"font.family"),fontSize:f.castHoverOption(b,w,"font.size"),fontColor:f.castHoverOption(b,w,"font.color"),nameLength:f.castHoverOption(b,w,"namelength"),textAlign:f.castHoverOption(b,w,"align"),hovertemplate:u.castOption(b,w,"hovertemplate"),hovertemplateLabels:u.extendFlat({},C,T),eventData:[C]},{container:i,gd:r,inOut_bbox:P}),C.bbox=P[0]}p.distance<5&&(p.buttons||_)?r.emit("plotly_click",L):r.emit("plotly_hover",L),this.oldEventData=L}else f.loneUnhover(i),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;t.drawAnnotations(t)},T.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){e.glplot.gl.isContextLost()?requestAnimationFrame(t):e.initializeGLPlot()?e.plot.apply(e,e.plotArgs):u.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(t)};var k=["xaxis","yaxis","zaxis"];T.plot=function(e,t,r){if(this.plotArgs=[e,t,r],!this.glplot.contextLost){var i,n,a,o,s,l,c=t[this.id],h=r[this.id];this.fullLayout=t,this.fullSceneLayout=c,this.axesOptions.merge(t,c),this.spikeOptions.merge(c),this.setViewport(c),this.updateFx(c.dragmode,c.hovermode),this.camera.enableWheel=this.graphDiv._context._scrollZoom.gl3d,this.glplot.setClearColor(p(c.bgcolor)),this.setConvert(s),e?Array.isArray(e)||(e=[e]):e=[];var d=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(a=0;ag[1][a])g[0][a]=-1,g[1][a]=1;else{var L=g[1][a]-g[0][a];g[0][a]-=L/32,g[1][a]+=L/32}if(x=b(x=[g[0][a],g[1][a]],s),g[0][a]=x[0],g[1][a]=x[1],s.isReversed()){var P=g[0][a];g[0][a]=g[1][a],g[1][a]=P}}else x=s.range,g[0][a]=s.r2l(x[0]),g[1][a]=s.r2l(x[1]);g[0][a]===g[1][a]&&(g[0][a]-=1,g[1][a]+=1),y[a]=g[1][a]-g[0][a],s.range=[g[0][a],g[1][a]],s.limitRange(),this.glplot.setBounds(a,{min:s.range[0]*f[a],max:s.range[1]*f[a]})}var I,z=c.aspectmode;if("cube"===z)I=[1,1,1];else if("manual"===z){var D=c.aspectratio;I=[D.x,D.y,D.z]}else if("auto"===z||"data"===z){var O=[1,1,1];for(a=0;a<3;++a){var R=v[l=(s=c[k[a]]).type];O[a]=Math.pow(R.acc,1/R.count)/f[a]}I="data"===z||Math.max.apply(null,O)/Math.min.apply(null,O)<=4?O:[1,1,1]}else throw Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=h.aspectratio.x=I[0],c.aspectratio.y=h.aspectratio.y=I[1],c.aspectratio.z=h.aspectratio.z=I[2],this.glplot.setAspectratio(c.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=c.aspectmode);var F=c.domain||null,j=t._size||null;if(F&&j){var B=this.container.style;B.position="absolute",B.left=j.l+F.x[0]*j.w+"px",B.top=j.t+(1-F.y[1])*j.h+"px",B.width=j.w*(F.x[1]-F.x[0])+"px",B.height=j.h*(F.y[1]-F.y[0])+"px"}this.glplot.redraw()}},T.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener("wheel",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},T.getCamera=function(){var e;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(e=this.camera).up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:!0===e._ortho?"orthographic":"perspective"}}},T.setViewport=function(e){var t=e.camera;this.camera.lookAt.apply(this,[[t.eye.x,t.eye.y,t.eye.z],[t.center.x,t.center.y,t.center.z],[t.up.x,t.up.y,t.up.z]]),this.glplot.setAspectratio(e.aspectratio),"orthographic"===t.projection.type!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},T.isCameraChanged=function(e){var t=this.getCamera(),r=u.nestedProperty(e,this.id+".camera").get(),i=!1;if(void 0===r)i=!0;else{for(var n=0;n<3;n++)for(var a=0;a<3;a++)if(!function(e,t,r,i){var n=["up","center","eye"],a=["x","y","z"];return t[n[r]]&&e[n[r]][a[i]]===t[n[r]][a[i]]}(t,r,n,a)){i=!0;break}(!r.projection||t.projection&&t.projection.type!==r.projection.type)&&(i=!0)}return i},T.isAspectChanged=function(e){var t=this.glplot.getAspectratio(),r=u.nestedProperty(e,this.id+".aspectratio").get();return void 0===r||r.x!==t.x||r.y!==t.y||r.z!==t.z},T.saveLayout=function(e){var t,r,i,n,a,o,s=this.fullLayout,l=this.isCameraChanged(e),h=this.isAspectChanged(e),d=l||h;if(d){var f={};l&&(t=this.getCamera(),i=(r=u.nestedProperty(e,this.id+".camera")).get(),f[this.id+".camera"]=i),h&&(n=this.glplot.getAspectratio(),o=(a=u.nestedProperty(e,this.id+".aspectratio")).get(),f[this.id+".aspectratio"]=o),c.call("_storeDirectGUIEdit",e,s._preGUI,f),l&&(r.set(t),u.nestedProperty(s,this.id+".camera").set(t)),h&&(a.set(n),u.nestedProperty(s,this.id+".aspectratio").set(n),this.glplot.redraw())}return d},T.updateFx=function(e,t){var r=this.camera;if(r)if("orbit"===e)r.mode="orbit",r.keyBindingMode="rotate";else if("turntable"===e){r.up=[0,0,1],r.mode="turntable",r.keyBindingMode="rotate";var i=this.graphDiv,n=i._fullLayout,a=this.fullSceneLayout.camera,o=a.up.x,s=a.up.y,l=a.up.z;if(l/Math.sqrt(o*o+s*s+l*l)<.999){var h=this.id+".camera.up",d={x:0,y:0,z:1},f={};f[h]=d;var p=i.layout;c.call("_storeDirectGUIEdit",p,n._preGUI,f),a.up=d,u.nestedProperty(p,h).set(d)}}else r.keyBindingMode=e;this.fullSceneLayout.hovermode=t},T.toImage=function(e){e||(e="png"),this.staticMode&&this.container.appendChild(r),this.glplot.redraw();var t,i=this.glplot.gl,n=i.drawingBufferWidth,a=i.drawingBufferHeight;i.bindFramebuffer(i.FRAMEBUFFER,null);var o=new Uint8Array(n*a*4);i.readPixels(0,0,n,a,i.RGBA,i.UNSIGNED_BYTE,o),function(e,t,r){for(var i=0,n=r-1;i0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}(o,n,a);var s=document.createElement("canvas");s.width=n,s.height=a;var l=s.getContext("2d",{willReadFrequently:!0}),c=l.createImageData(n,a);switch(c.data.set(o),l.putImageData(c,0,0),e){case"jpeg":t=s.toDataURL("image/jpeg");break;case"webp":t=s.toDataURL("image/webp");break;default:t=s.toDataURL("image/png")}return this.staticMode&&this.container.removeChild(r),t},T.setConvert=function(){for(var e=0;e<3;e++){var t=this.fullSceneLayout[k[e]];d.setConvert(t,this.fullLayout),t.setScale=u.noop}},T.make4thDimension=function(){var e=this.graphDiv._fullLayout;this._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},d.setConvert(this._mockAxis,e)},t.exports=w}}),fE=p({"src/plots/gl3d/layout/attributes.js"(e,t){t.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),fC=p({"src/plots/gl3d/layout/axis_attributes.js"(e,t){var r=ee(),i=tN(),n=q().extendFlat;t.exports=(0,eq().overrideAll)({visible:i.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:r.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:{text:i.title.text,font:i.title.font},type:n({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorange:i.autorange,autorangeoptions:{minallowed:i.autorangeoptions.minallowed,maxallowed:i.autorangeoptions.maxallowed,clipmin:i.autorangeoptions.clipmin,clipmax:i.autorangeoptions.clipmax,include:i.autorangeoptions.include,editType:"plot"},rangemode:i.rangemode,minallowed:i.minallowed,maxallowed:i.maxallowed,range:n({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:i.minor.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,labelalias:i.labelalias,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:n({},i.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth},"plot","from-root")}}),fL=p({"src/plots/gl3d/layout/layout_attributes.js"(e,t){var r=fC(),i=at().attributes,n=q().extendFlat;function a(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[(0,tv().counterRegex)("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:n(a(0,0,1),{}),center:n(a(0,0,0),{}),eye:n(a(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:i({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:r,yaxis:r,zaxis:r,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"}}}),fP=p({"src/plots/gl3d/layout/axis_defaults.js"(e,t){var r=ee(),i=tv(),n=tS(),a=fC(),o=ns(),s=nu(),l=["xaxis","yaxis","zaxis"],c=13600/187;t.exports=function(e,t,u){var h,d;function f(e,t){return i.coerce(h,d,a,e,t)}for(var p=0;p.999)&&(g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",a.getDfltFromLayout("hovermode"))}t.exports=function(e,t,i){var n=t._basePlotModules.length>1;a(e,t,i,{type:c,attributes:s,handleDefaults:u,fullLayout:t,font:t.font,fullData:i,getDfltFromLayout:function(t){if(!n&&r.validate(e[t],s[t]))return e[t]},autotypenumbersDflt:t.autotypenumbers,paper_bgcolor:t.paper_bgcolor,calendar:t.calendar})}}}),fz=p({"src/plots/gl3d/index.js"(e){var t=eq().overrideAll,r=W(),i=fS(),n=tI().getSubplotData,a=tv(),o=tO(),s="gl3d",l="scene";e.name=s,e.attr=l,e.idRoot=l,e.idRegex=e.attrRegex=a.counterRegex("scene"),e.attributes=fE(),e.layoutAttributes=fL(),e.baseLayoutAttrOverrides=t({hoverlabel:r.hoverlabel},"plot","nested"),e.supplyLayoutDefaults=fI(),e.plot=function(e){for(var t=e._fullLayout,r=e._fullData,a=t._subplots[s],o=0;o720;)i--,i/=function(e){for(var t=p(e),r=e,i=0;i0){r=f[i];break}return r}(i),++i<120&&(i=720);var n=Math.round(i/e);return n>1?n:1},d.refineCoords=function(e){for(var t=this.dataScaleX,r=this.dataScaleY,a=e[0].shape[0],o=e[0].shape[1],s=0|Math.floor(e[0].shape[0]*t+1),l=0|Math.floor(e[0].shape[1]*r+1),c=1+a+1,u=1+o+1,h=i(new Float32Array(c*u),[c,u]),d=[1/t,0,0,0,1/r,0,0,0,1],f=0;f0&&null!==this.contourStart[e]&&null!==this.contourEnd[e]&&this.contourEnd[e]>this.contourStart[e]))for(n[e]=!0,t=this.contourStart[e];tb&&(this.minValues[y]=b),this.maxValues[y]l&&(t.isomin=null,t.isomax=null);var c=o("x"),u=o("y"),h=o("z"),d=o("value");if(!c||!c.length||!u||!u.length||!h||!h.length||!d||!d.length){t.visible=!1;return}i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],n),o("valuehoverformat"),["x","y","z"].forEach(function(e){o(e+"hoverformat");var t="caps."+e;o(t+".show")&&o(t+".fill");var r="slices."+e;o(r+".show")&&(o(r+".fill"),o(r+".locations"))}),o("spaceframe.show")&&o("spaceframe.fill"),o("surface.show")&&(o("surface.count"),o("surface.fill"),o("surface.pattern")),o("contour.show")&&(o("contour.color"),o("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(e){o(e)}),a(e,t,n,o,{prefix:"",cLetter:"c"}),t._length=null}t.exports={supplyDefaults:function(e,t,i,a){o(e,t,i,a,function(i,a){return r.coerce(e,t,n,i,a)})},supplyIsoDefaults:o}}}),fG=p({"src/traces/streamtube/calc.js"(e,t){var r=tv(),i=t2();function n(e){var t,i,n,o,s,l,c,u,h,d,f,p,m=e._x,g=e._y,y=e._z,v=e._len,x=-1/0,b=1/0,_=-1/0,w=1/0,T=-1/0,M=1/0,k="";for(v&&(c=m[0],h=g[0],f=y[0]),v>1&&(u=m[v-1],d=g[v-1],p=y[v-1]),t=0;tu?"-":"+")+"x")).replace("y",(h>d?"-":"+")+"y")).replace("z",(f>p?"-":"+")+"z");var C=function(){v=0,A=[],S=[],E=[]};(!v||v0;r--){var i=Math.min(t[r],t[r-1]),n=Math.max(t[r],t[r-1]);if(n>i&&i-1}function z(l,c,u){i=r;var h=[c],d=[u];if(t>=1)h=[c],d=[u];else if(t>0){var f,p,m,y,v,x,b,_,w,T,M,k,A,S=(f=c,p=u,m=f[0],_=P(x=function(e,t,r){for(var i=[],n=0;n-1?u[O]:function(e,t,r){for(var l=s.length,c=i;c-1?D[O]=N:D[O]=L(R,F,j,null===l?B:l)}C=D[0],I=D[1],z=D[2],e._meshI.push(C),e._meshJ.push(I),e._meshK.push(z),++g}}function D(e,t,r,i){var n=e[3];ni&&(n=i);for(var a=(e[3]-n)/(e[3]-t[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*e[s]+a*t[s];return o}function O(e){var t=.001*(E-S);return e>=S-t&&e<=E+t}function R(t){for(var r=[],i=0;i<4;i++){var n=t[i];r.push([e._x[n],e._y[n],e._z[n],e._value[n]])}return r}function F(e,t,r,i,n,a){a||(a=1),r=[-1,-1,-1];var o,s,l,c=!1,u=[(o=t[0][3],o>=i&&o<=n),(s=t[1][3],s>=i&&s<=n),(l=t[2][3],l>=i&&l<=n)];if(!u[0]&&!u[1]&&!u[2])return!1;var h=function(e,t,r){return O(t[0][3])&&O(t[1][3])&&O(t[2][3])?(z(e,t,r),!0):a<3&&F(e,t,r,S,E,++a)};if(u[0]&&u[1]&&u[2])return h(e,t,r)||c;var d=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(a){if(u[a[0]]&&u[a[1]]&&!u[a[2]]){var o=t[a[0]],s=t[a[1]],l=t[a[2]],f=D(l,o,i,n),p=D(l,s,i,n);c=h(e,[p,f,o],[-1,-1,r[a[0]]])||c,c=h(e,[o,s,p],[r[a[0]],r[a[1]],-1])||c,d=!0}}),d||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(a){if(u[a[0]]&&!u[a[1]]&&!u[a[2]]){var o=t[a[0]],s=t[a[1]],l=t[a[2]],f=D(s,o,i,n);c=h(e,[D(l,o,i,n),f,o],[-1,-1,r[a[0]]])||c,d=!0}}),c}function j(e,t,r,i){var n,a,o,s,l,c=!1,u=R(t),h=[(n=u[0][3],n>=r&&n<=i),(a=u[1][3],a>=r&&a<=i),(o=u[2][3],o>=r&&o<=i),(s=u[3][3],s>=r&&s<=i)];if(!h[0]&&!h[1]&&!h[2]&&!h[3])return c;if(h[0]&&h[1]&&h[2]&&h[3])return m&&((l=function(r,i,n){z(e,[u[r],u[i],u[n]],[t[r],t[i],t[n]])})(0,1,2),l(3,0,1),l(2,3,0),l(1,2,3)),c;var d=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(n){if(h[n[0]]&&h[n[1]]&&h[n[2]]&&!h[n[3]]){var a=u[n[0]],o=u[n[1]],s=u[n[2]],l=u[n[3]];c=m?z(e,[a,o,s],[t[n[0]],t[n[1]],t[n[2]]])||c:z(null,[D(l,a,r,i),D(l,o,r,i),D(l,s,r,i)],[-1,-1,-1])||c,d=!0}}),d||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(n){if(h[n[0]]&&h[n[1]]&&!h[n[2]]&&!h[n[3]]){var a,o,s,l=u[n[0]],f=u[n[1]],p=u[n[2]],g=u[n[3]],y=D(p,l,r,i),v=D(p,f,r,i),x=D(g,f,r,i),b=D(g,l,r,i);m?(c=z(e,[l,b,y],[t[n[0]],-1,-1])||c,c=z(e,[f,v,x],[t[n[1]],-1,-1])||c):(a=[y,v,x,b],o=[-1,-1,-1,-1],(s=function(e,t,r){z(null,[a[e],a[t],a[r]],[o[e],o[t],o[r]])})(0,1,2),s(2,3,0)),d=!0}}),d)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(n){if(h[n[0]]&&!h[n[1]]&&!h[n[2]]&&!h[n[3]]){var a=u[n[0]],o=u[n[1]],s=u[n[2]],l=u[n[3]],f=D(o,a,r,i),p=D(s,a,r,i),g=D(l,a,r,i);m?(c=z(e,[a,f,p],[t[n[0]],-1,-1])||c,c=z(e,[a,p,g],[t[n[0]],-1,-1])||c,c=z(e,[a,g,f],[t[n[0]],-1,-1])||c):c=z(null,[f,p,g],[-1,-1,-1])||c,d=!0}}),c}function B(e,t,r,i,n,a,o,s,l,c,u){var h=!1;return p&&(I(e,"A")&&(h=j(null,[t,r,i,a],c,u)||h),I(e,"B")&&(h=j(null,[r,i,n,l],c,u)||h),I(e,"C")&&(h=j(null,[r,a,o,l],c,u)||h),I(e,"D")&&(h=j(null,[i,a,s,l],c,u)||h),I(e,"E")&&(h=j(null,[r,i,a,l],c,u)||h)),m&&(h=j(e,[r,i,a,l],c,u)||h),h}function N(e,t,r,i,n,a,o,s){return[!0===s[0]||F(e,R([t,r,i]),[t,r,i],a,o),!0===s[1]||F(e,R([i,n,t]),[i,n,t],a,o)]}function U(e,t,r,i,n,a,o,s,l){return s?N(e,t,r,n,i,a,o,l):N(e,r,n,i,t,a,o,l)}function V(e,t,r,i,n,a,o){var s,l,c,u,h=!1,d=function(){h=F(e,[s,l,c],[-1,-1,-1],n,a)||h,h=F(e,[c,u,s],[-1,-1,-1],n,a)||h},f=o[0],p=o[1],m=o[2];return f&&(s=P(R([M(t,r-0,i-0)])[0],R([M(t-1,r-0,i-0)])[0],f),l=P(R([M(t,r-0,i-1)])[0],R([M(t-1,r-0,i-1)])[0],f),c=P(R([M(t,r-1,i-1)])[0],R([M(t-1,r-1,i-1)])[0],f),u=P(R([M(t,r-1,i-0)])[0],R([M(t-1,r-1,i-0)])[0],f),d()),p&&(s=P(R([M(t-0,r,i-0)])[0],R([M(t-0,r-1,i-0)])[0],p),l=P(R([M(t-0,r,i-1)])[0],R([M(t-0,r-1,i-1)])[0],p),c=P(R([M(t-1,r,i-1)])[0],R([M(t-1,r-1,i-1)])[0],p),u=P(R([M(t-1,r,i-0)])[0],R([M(t-1,r-1,i-0)])[0],p),d()),m&&(s=P(R([M(t-0,r-0,i)])[0],R([M(t-0,r-0,i-1)])[0],m),l=P(R([M(t-0,r-1,i)])[0],R([M(t-0,r-1,i-1)])[0],m),c=P(R([M(t-1,r-1,i)])[0],R([M(t-1,r-1,i-1)])[0],m),u=P(R([M(t-1,r-0,i)])[0],R([M(t-1,r-0,i-1)])[0],m),d()),h}function q(e,t,r,i,n){for(var a=[],o=0,s=0;sMath.abs(z-A)?[k,z]:[z,A];T=D[0],P=D[1],p=!0,W(r,T,P),p=!1}}var O=[[Math.min(S,A),Math.max(S,A)],[Math.min(k,E),Math.max(k,E)]];["x","y","z"].forEach(function(r){for(var i=[],n=0;n0&&(h.push(p.id),"x"===r?d.push([p.distRatio,0,0]):"y"===r?d.push([0,p.distRatio,0]):d.push([0,0,p.distRatio]))}else u="x"===r?Y(1,b-1):"y"===r?Y(1,_-1):Y(1,w-1);h.length>0&&("x"===r?i[a]=function(e,t,r,i,n){for(var a=[],o=0,s=0;s0&&("x"===r?i[a]=q(null,u,o,s,i[a]):"y"===r?i[a]=H(null,u,o,s,i[a]):i[a]=G(null,u,o,s,i[a]),a++)}var m=e.caps[r];m.show&&m.fill&&(t=m.fill,"x"===r?i[a]=q(null,[0,b-1],o,s,i[a]):"y"===r?i[a]=H(null,[0,_-1],o,s,i[a]):i[a]=G(null,[0,w-1],o,s,i[a]),a++)}}),0===g&&C(),e._meshX=n,e._meshY=a,e._meshZ=o,e._meshIntensity=s,e._Xs=y,e._Ys=v,e._Zs=x}(),e}t.exports={findNearestOnAxis:l,generateIsoMeshes:d,createIsosurfaceTrace:function(e,t){var i=r({gl:e.glplot.gl}),n=new c(e,i,t.uid);return i._trace=n,n.update(t),e.glplot.add(i),n}}}}),f$=p({"src/traces/isosurface/index.js"(e,t){t.exports={attributes:fq(),supplyDefaults:fH().supplyDefaults,calc:fW(),colorbar:{min:"cmin",max:"cmax"},plot:fZ().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:fz(),categories:["gl3d","showLegend"],meta:{}}}}),fX=p({"lib/isosurface.js"(e,t){t.exports=f$()}}),fK=p({"src/traces/volume/attributes.js"(e,t){var r=tV(),i=fq(),n=fR(),a=Z(),o=q().extendFlat,s=t.exports=(0,eq().overrideAll)(o({x:i.x,y:i.y,z:i.z,value:i.value,isomin:i.isomin,isomax:i.isomax,surface:i.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:i.slices,caps:i.caps,text:i.text,hovertext:i.hovertext,xhoverformat:i.xhoverformat,yhoverformat:i.yhoverformat,zhoverformat:i.zhoverformat,valuehoverformat:i.valuehoverformat,hovertemplate:i.hovertemplate,hovertemplatefallback:i.hovertemplatefallback},r("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:i.colorbar,opacity:i.opacity,opacityscale:n.opacityscale,lightposition:i.lightposition,lighting:i.lighting,flatshading:i.flatshading,contour:i.contour,hoverinfo:o({},a.hoverinfo),showlegend:o({},a.showlegend,{dflt:!1})}),"calc","nested");s.x.editType=s.y.editType=s.z.editType=s.value.editType="calc+clearAxisTypes"}}),fJ=p({"src/traces/volume/defaults.js"(e,t){var r=tv(),i=fK(),n=fH().supplyIsoDefaults,a=fF().opacityscaleDefaults;t.exports=function(e,t,o,s){function l(n,a){return r.coerce(e,t,i,n,a)}n(e,t,o,s,l),a(e,t,s,l)}}}),fQ=p({"src/traces/volume/convert.js"(e,t){var r=fh().gl_mesh3d,i=ff().parseColorScale,n=tv().isArrayOrTypedArray,a=fd(),o=t3().extractOpts,s=fY(),l=fZ().findNearestOnAxis,c=fZ().generateIsoMeshes;function u(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var h=u.prototype;h.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],i=this.data._meshY[t],a=this.data._meshZ[t],o=this.data._Ys.length,s=this.data._Zs.length,c=l(r,this.data._Xs).id,u=l(i,this.data._Ys).id,h=e.index=l(a,this.data._Zs).id+s*u+s*o*c;e.traceCoordinate=[this.data._meshX[h],this.data._meshY[h],this.data._meshZ[h],this.data._value[h]];var d=this.data.hovertext||this.data.text;return n(d)&&void 0!==d[h]?e.textLabel=d[h]:d&&(e.textLabel=d),!0}},h.update=function(e){var t=this.scene,r=t.fullSceneLayout;function n(e,t,r,i){return t.map(function(t){return e.d2l(t,0,i)*r})}this.data=c(e);var l={positions:s(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),cells:s(e._meshI,e._meshJ,e._meshK),lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:a(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},u=o(e);l.vertexIntensity=e._meshIntensity,l.vertexIntensityBounds=[u.min,u.max],l.colormap=i(e),this.mesh.update(l)},h.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(e,t){var i=r({gl:e.glplot.gl}),n=new u(e,i,t.uid);return i._trace=n,n.update(t),e.glplot.add(i),n}}}),f0=p({"src/traces/volume/index.js"(e,t){t.exports={attributes:fK(),supplyDefaults:fJ(),calc:fW(),colorbar:{min:"cmin",max:"cmax"},plot:fQ(),moduleType:"trace",name:"volume",basePlotModule:fz(),categories:["gl3d","showLegend"],meta:{}}}}),f1=p({"lib/volume.js"(e,t){t.exports=f0()}}),f2=p({"src/traces/mesh3d/defaults.js"(e,t){var r=eQ(),i=tv(),n=tQ(),a=fV();t.exports=function(e,t,o,s){function l(r,n){return i.coerce(e,t,a,r,n)}function c(e){var t=e.map(function(e){var t=l(e);return t&&i.isArrayOrTypedArray(t)?t:null});return t.every(function(e){return e&&e.length===t[0].length})&&t}if(!c(["x","y","z"])||(c(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j))){t.visible=!1;return}r.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],s),["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(e){l(e)}),l("contour.show")&&(l("contour.color"),l("contour.width")),"intensity"in e?(l("intensity"),l("intensitymode"),n(e,t,s,l,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?l("facecolor"):"vertexcolor"in e?l("vertexcolor"):l("color",o)),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),t._length=null}}}),f3=p({"src/traces/mesh3d/calc.js"(e,t){var r=t2();t.exports=function(e,t){t.intensity&&r(e,t,{vals:t.intensity,containerStr:"",cLetter:"c"})}}}),f5=p({"src/traces/mesh3d/convert.js"(e,t){var r=fh().gl_mesh3d,i=fh().delaunay_triangulate,n=fh().alpha_shape,a=fh().convex_hull,o=ff().parseColorScale,s=tv().isArrayOrTypedArray,l=fd(),c=t3().extractOpts,u=fY();function h(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var d=h.prototype;function f(e){for(var t=[],r=e.length,i=0;i=t-.5)return!1;return!0}d.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return s(r)&&void 0!==r[t]?e.textLabel=r[t]:r&&(e.textLabel=r),!0}},d.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var s,h=e.x.length,d=u(p(r.xaxis,e.x,t.dataScale[0],e.xcalendar),p(r.yaxis,e.y,t.dataScale[1],e.ycalendar),p(r.zaxis,e.z,t.dataScale[2],e.zcalendar));if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!g(e.i,h)||!g(e.j,h)||!g(e.k,h))return;s=u(m(e.i),m(e.j),m(e.k))}else s=0===e.alphahull?a(d):e.alphahull>0?n(e.alphahull,d):function(e,t){for(var r=["x","y","z"].indexOf(e),n=[],a=t.length,o=0;o2?e.slice(1,t-1):2===t?[(e[0]+e[1])/2]:e}function d(e){var t=e.length;return 1===t?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function f(e,t){var i=e.fullSceneLayout,c=e.dataScale,u=t._len,f={};function p(e,t){var r=i[t],a=c[l[t]];return n.simpleMap(e,function(e){return r.d2l(e)*a})}if(f.vectors=s(p(t._u,"xaxis"),p(t._v,"yaxis"),p(t._w,"zaxis"),u),!u)return{positions:[],cells:[]};var m=p(t._Xs,"xaxis"),g=p(t._Ys,"yaxis"),y=p(t._Zs,"zaxis");if(f.meshgrid=[m,g,y],f.gridFill=t._gridFill,t._slen)f.startingPositions=s(p(t._startsX,"xaxis"),p(t._startsY,"yaxis"),p(t._startsZ,"zaxis"));else{for(var v=g[0],x=h(m),b=h(y),_=Array(x.length*b.length),w=0,T=0;To&&(o=e[0]),e[1]s&&(s=e[1])}for(t in e.arcs.forEach(function(e){for(var t,r=-1,l=e.length;++ro&&(o=t[0]),t[1]s&&(s=t[1])}),e.objects)!function e(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"Point":l(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(l)}}(e.objects[t]);return[n,a,o,s]}function n(e,t){var r=t.id,i=t.bbox,n=null==t.properties?{}:t.properties,o=a(e,t);return null==r&&null==i?{type:"Feature",properties:n,geometry:o}:null==i?{type:"Feature",id:r,properties:n,geometry:o}:{type:"Feature",id:r,bbox:i,properties:n,geometry:o}}function a(e,t){var i=r(e.transform),n=e.arcs;function a(e){return i(e)}function o(e){for(var t=[],r=0,a=e.length;r1)i=function(e,t){var r,i=[],n=[];function a(e){var t=e<0?~e:e;(n[t]||(n[t]=[])).push({i:e,g:r})}function o(e){e.forEach(a)}function s(e){e.forEach(o)}return function e(t){switch(r=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":o(t.arcs);break;case"MultiLineString":case"Polygon":s(t.arcs);break;case"MultiPolygon":t.arcs.forEach(s)}}(e),n.forEach(null==t?function(e){i.push(e[0].i)}:function(e){t(e[0].g,e[e.length-1].g)&&i.push(e[0].i)}),i}(t,r);else for(n=0,i=Array(a=e.arcs.length);n1)for(var a,s,c=1,u=l(n[0]);cu&&(s=n[0],n[0]=n[c],n[c]=s,u=a);return n}).filter(function(e){return e.length>0})}}function c(e,t){for(var r=0,i=e.length;r>>1;e[n]=2))throw Error("n must be ≥2");var r,n=(l=e.bbox||i(e))[0],a=l[1],o=l[2],s=l[3];t={scale:[o-n?(o-n)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[n,a]}}var l,c,h=u(t),d=e.objects,f={};function p(e){return h(e)}for(c in d)f[c]=function e(t){var r;switch(t.type){case"GeometryCollection":r={type:"GeometryCollection",geometries:t.geometries.map(e)};break;case"Point":r={type:"Point",coordinates:p(t.coordinates)};break;case"MultiPoint":r={type:"MultiPoint",coordinates:t.coordinates.map(p)};break;default:return t}return null!=t.id&&(r.id=t.id),null!=t.bbox&&(r.bbox=t.bbox),null!=t.properties&&(r.properties=t.properties),r}(d[c]);return{type:"Topology",bbox:l,transform:t,objects:f,arcs:e.arcs.map(function(e){var t,r=0,i=1,n=e.length,a=Array(n);for(a[0]=h(e[0],0);++rtypeof t?e:(r=r||self).topojson=r.topojson||{})}}),pp=p({"src/lib/topojson_utils.js"(e,t){var r=t.exports={},i=pd().locationmodeToLayer,n=pf().feature;r.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")},r.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`},r.getTopojsonFeatures=function(e,t){var r=i[e.locationmode],a=t.objects[r];return n(t,a).features}}}),pm=p({"src/lib/geojson_utils.js"(e){var t=L().BADNUM;e.calcTraceToLineCoords=function(e){for(var r=e[0].trace,i=r.connectgaps,n=[],a=[],o=0;o0&&(n.push(a),a=[])}return a.length>0&&n.push(a),n},e.makeLine=function(e){return 1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}},e.makePolygon=function(e){if(1===e.length)return{type:"Polygon",coordinates:e};for(var t=Array(e.length),r=0;r{for(var i in t)r(e,i,{get:t[i],enumerable:!0})})(o,{COUNTRIES:()=>s,byAlpha2:()=>p,byAlpha3:()=>f,byM49:()=>m,createLookup:()=>c,lookup:()=>h,lookupAlpha3:()=>d,sanitize:()=>l}),t.exports=((e,t,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of n(t))a.call(e,s)||void 0===s||r(e,s,{get:()=>t[s],enumerable:!(o=i(t,s))||o.enumerable});return e})(r({},"__esModule",{value:!0}),o);var s=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\uD83C\uDDE6\uD83C\uDDFC","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\uD83C\uDDE6\uD83C\uDDEB","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","афғонистон","أفغانستان","افغانستان","د افغانستان اسلامی جمهوریت"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\uD83C\uDDE6\uD83C\uDDF4","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\uD83C\uDDE6\uD83C\uDDEE","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xc5land Islands",aliases:["\uD83C\uDDE6\uD83C\uDDFD","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\uD83C\uDDE6\uD83C\uDDF1","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:["\uD83C\uDDE6\uD83C\uDDE9","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:["\uD83C\uDDE6\uD83C\uDDEA","emirates","uae","الإمارات","الإمارات العربية المتحدة","الامارات","الامارات العربية المتحدة","دولة الإمارات العربية المتحدة"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\uD83C\uDDE6\uD83C\uDDF7","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\uD83C\uDDE6\uD83C\uDDF2","hayastan","hayastani hanrapetutyun","republic of armenia","հայաստան","հայաստանի հանրապետություն","հայք","հհ"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\uD83C\uDDE6\uD83C\uDDF8","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\uD83C\uDDE6\uD83C\uDDF6","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\uD83C\uDDF9\uD83C\uDDEB","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:["\uD83C\uDDE6\uD83C\uDDEC","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\uD83C\uDDE6\uD83C\uDDFA","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\uD83C\uDDE6\uD83C\uDDF9","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\uD83C\uDDE6\uD83C\uDDFF","azərbaycan","azərbaycan respublikası","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\uD83C\uDDE7\uD83C\uDDEE","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:["\uD83C\uDDE7\uD83C\uDDEA","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\uD83C\uDDE7\uD83C\uDDEF","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\uD83C\uDDE7\uD83C\uDDF6","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:["\uD83C\uDDE7\uD83C\uDDEB","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\uD83C\uDDE7\uD83C\uDDE9","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","গণপ্রজাতন্ত্রী বাংলাদেশ","বাংলা দেশ","বাংলাদেশ","বিডি"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\uD83C\uDDE7\uD83C\uDDEC","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","бг","българия","република българия"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\uD83C\uDDE7\uD83C\uDDED","bahrein islands","kingdom of bahrain","البحرين","دولة البحرين","مملكة البحرين"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\uD83C\uDDE7\uD83C\uDDF8","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\uD83C\uDDE7\uD83C\uDDE6","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","бих","босна","босна и херцеговина","бх"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xe9lemy",aliases:["\uD83C\uDDE7\uD83C\uDDF1","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:["\uD83C\uDDE7\uD83C\uDDFE","republic of belarus","respublika belarus","respublika byelarus","беларуская рэспубліка","беларусь","белая русь","белоруссия","рб","республика беларусь","рэспубліка беларусь"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\uD83C\uDDE7\uD83C\uDDFF"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\uD83C\uDDE7\uD83C\uDDF2","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:["\uD83C\uDDE7\uD83C\uDDF4","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:["\uD83C\uDDE7\uD83C\uDDF7","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\uD83C\uDDE7\uD83C\uDDE7","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\uD83C\uDDE7\uD83C\uDDF3","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\uD83C\uDDE7\uD83C\uDDF9","kingdom of bhutan","འབྲུག","འབྲུག་ཡུལ་","འབྲུགཡུལ་་"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\uD83C\uDDE7\uD83C\uDDFB"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\uD83C\uDDE7\uD83C\uDDFC","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\uD83C\uDDE8\uD83C\uDDEB","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\uD83C\uDDE8\uD83C\uDDE6","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\uD83C\uDDE8\uD83C\uDDE8","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\uD83C\uDDE8\uD83C\uDDED","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","confœderatio 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:["\uD83C\uDDE8\uD83C\uDDF1","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\uD83C\uDDE8\uD83C\uDDF3","china pr","peoples republic of china","pr china","prc","中华人民共和国","中国"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xf4te d'Ivoire",aliases:["\uD83C\uDDE8\uD83C\uDDEE","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:["\uD83C\uDDE8\uD83C\uDDF2","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\uD83C\uDDE8\uD83C\uDDE9","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\uD83C\uDDE8\uD83C\uDDEC","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\uD83C\uDDE8\uD83C\uDDF0","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\uD83C\uDDE8\uD83C\uDDF4","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\uD83C\uDDF0\uD83C\uDDF2","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","إتحاد القمر","اتحاد جزر القمر","الاتحاد القمري","القمر","جزر القمر","جمهورية القمر المتحدة","جمهورية جزر القمر الاتحادية الإسلامية","جمهورية جزرالقمر المتحدة"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\uD83C\uDDE8\uD83C\uDDFB","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:["\uD83C\uDDE8\uD83C\uDDF7","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\uD83C\uDDE8\uD83C\uDDFA","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xe7ao",aliases:["\uD83C\uDDE8\uD83C\uDDFC","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","curaςao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\uD83C\uDDE8\uD83C\uDDFD","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\uD83C\uDDF0\uD83C\uDDFE","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\uD83C\uDDE8\uD83C\uDDFE","greek administration of southern cyprus","greek cypriot state","guney kıbrıs","guney kıbrıs rum cumhuriyeti","guney kıbrıs rum kesimi","guney kıbrıs rum yonetimi","kipriaki dhimokratia","kıbrıs","kıbrıs cumhuriyeti","kıbrıs rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","κυπριακη δημοκρατια","κυπρος"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\uD83C\uDDE8\uD83C\uDDFF","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\uD83C\uDDE9\uD83C\uDDEA","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\uD83C\uDDE9\uD83C\uDDEF","la republique de djibouti","republic of djibouti","republique de djibouti","جمهورية جيبوتي","جيبوتي"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\uD83C\uDDE9\uD83C\uDDF2","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\uD83C\uDDE9\uD83C\uDDF0","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\uD83C\uDDE9\uD83C\uDDF4","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\uD83C\uDDE9\uD83C\uDDFF","peoples democratic republic of algeria","الجزائر","الجزاير","الجمهورية الجزائرية الديمقراطية الشعبية","الدزاير","دزاير"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\uD83C\uDDEA\uD83C\uDDE8","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:["\uD83C\uDDEA\uD83C\uDDEC","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","جمهورية مصر العربية","مصر"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\uD83C\uDDEA\uD83C\uDDF7","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","إرتريا","إريتريا","ارتريا","ارتيريا","اريتريا","دولة إرتريا","دولة إريتريا","ሃገረ ኤርትራ","ኤርትራ"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\uD83C\uDDEA\uD83C\uDDED","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\uD83C\uDDEA\uD83C\uDDF8","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\uD83C\uDDEA\uD83C\uDDEA","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\uD83C\uDDEA\uD83C\uDDF9","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","ኢትዮጵያ","የኢትዮጵያ ፌዴራላዊ ዴሞክራሲያዊ ሪፐብሊክ"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\uD83C\uDDEB\uD83C\uDDEE","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\uD83C\uDDEB\uD83C\uDDEF","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:["\uD83C\uDDEB\uD83C\uDDF0","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\uD83C\uDDEB\uD83C\uDDF7","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\uD83C\uDDEB\uD83C\uDDF4","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:["\uD83C\uDDEB\uD83C\uDDF2","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:["\uD83C\uDDEC\uD83C\uDDE6","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:["\uD83C\uDDEC\uD83C\uDDE7","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:["\uD83C\uDDEC\uD83C\uDDEA","georgia country","republic of georgia","sakartvelo","қырҭтәыла","საქართველო","საქართველოს რესპუბლიკა"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\uD83C\uDDEC\uD83C\uDDEC","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\uD83C\uDDEC\uD83C\uDDED","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\uD83C\uDDEC\uD83C\uDDEE","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\uD83C\uDDEC\uD83C\uDDF3","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\uD83C\uDDEC\uD83C\uDDF5"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\uD83C\uDDEC\uD83C\uDDF2","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\uD83C\uDDEC\uD83C\uDDFC","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\uD83C\uDDEC\uD83C\uDDF6","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:["\uD83C\uDDEC\uD83C\uDDF7","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","δημοκρατια της ελλαδας","δημοκρατια της ελλαδος","ελλαδα","ελλας","ελλας ελλαδα","ελληνικη δημοκρατια"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\uD83C\uDDEC\uD83C\uDDE9"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\uD83C\uDDEC\uD83C\uDDF1","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\uD83C\uDDEC\uD83C\uDDF9","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\uD83C\uDDEC\uD83C\uDDEB","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\uD83C\uDDEC\uD83C\uDDFA","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\uD83C\uDDEC\uD83C\uDDFE","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\uD83C\uDDED\uD83C\uDDF0","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:["\uD83C\uDDED\uD83C\uDDF2","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:["\uD83C\uDDED\uD83C\uDDF3","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\uD83C\uDDED\uD83C\uDDF7","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\uD83C\uDDED\uD83C\uDDF9","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\uD83C\uDDED\uD83C\uDDFA","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\uD83C\uDDEE\uD83C\uDDE9","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\uD83C\uDDEE\uD83C\uDDF2","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\uD83C\uDDEE\uD83C\uDDF3","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","आर्यवर्त","इंडिया","इण्डिया","भारत","भारत गणराज्य","भारतवर्ष","हिंदुस्तान","हिन्दुस्तान","हिन्दोस्तान"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\uD83C\uDDEE\uD83C\uDDF4","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\uD83C\uDDEE\uD83C\uDDEA","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\uD83C\uDDEE\uD83C\uDDF7","iran","islamic rep iran","islamic republic of iran","persia","ایران","ایرانزمین","پارس","جمهوری اسلامی ايران","جمهوری اسلامی ایران","كشور شاهنشاهی ايران"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\uD83C\uDDEE\uD83C\uDDF6","eraq","iraqe","komar i eraq","republic of iraq","الجمهورية العراقية","العراق","جمهورية العراق","عراق","عێراق"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\uD83C\uDDEE\uD83C\uDDF8","icelandic republic","island","ly\xf0veldi\xf0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\uD83C\uDDEE\uD83C\uDDF1","erez yisrael","medinat yisrael","state of israel","yisrael","ישראל","מדינת ישראל"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\uD83C\uDDEE\uD83C\uDDF9","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\uD83C\uDDEF\uD83C\uDDF2","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\uD83C\uDDEF\uD83C\uDDEA","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:["\uD83C\uDDEF\uD83C\uDDF4","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","الأردن","الاردن","المملكة الأردنية الهاشمية","المملكة الاردنية الهاشمية"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\uD83C\uDDEF\uD83C\uDDF5","state of japan","あきつしま","おおやしま","しきしま","ジャパン","しんしゅう","にっぽん","にっぽんこく","にほん","にほんこく","ひいずるくに","ふそう","大八州","扶木之地","扶桑","扶桑国","敷島","日出る国","日本","榑木之地","瑞穂国","神州","秋津島","葦原中国"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\uD83C\uDDF0\uD83C\uDDFF","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","казахстан","қазақстан","қазақстан республикасы","республика казахстан","рк"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\uD83C\uDDF0\uD83C\uDDEA","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\uD83C\uDDF0\uD83C\uDDEC","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","кр","кыргыз республикасы","кыргызстан"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\uD83C\uDDF0\uD83C\uDDED","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","កម្ពុជា","ព្រះរាជាណាចក្រកម្ពុជា"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\uD83C\uDDF0\uD83C\uDDEE","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\uD83C\uDDF0\uD83C\uDDF3","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:["\uD83C\uDDF0\uD83C\uDDF7","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","남조선","남한","대한","대한민국","코리아","한국"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\uD83C\uDDF0\uD83C\uDDFC","state of kuwait","الكويت","دولة الكويت"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\uD83C\uDDF1\uD83C\uDDE6","laos","sathalanalat paxathipatai paxaxon lao","ສາທາລະນະລັດ ປະຊາທິປະໄຕ ປະຊາຊົນລາວ","ປະເທດລາວ","ລາວ"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\uD83C\uDDF1\uD83C\uDDE7","lebanese republic","republic of lebanon","state of lebanon","الجمهورية اللبنانية","لبنان"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\uD83C\uDDF1\uD83C\uDDF7","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\uD83C\uDDF1\uD83C\uDDFE","state of libya","الجماهيرية العربية الليبية الشعبية الإشتراكية","الجمهورية الليبية","الليبي","الليبية","الليبين","دولة ليبيا","ليببيا","ليبي","ليبيا","ليبية"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\uD83C\uDDF1\uD83C\uDDE8","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\uD83C\uDDF1\uD83C\uDDEE","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\uD83C\uDDF1\uD83C\uDDF0","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","இலங்கை","இலங்கை சனநாயக சோசலிசக் குடியரசு","இலங்கை சனநாயக சோஷலிசக் குடியரசு","ஈழம்","சிலோன்","ලංකාව","ශ්රී ලංකා ප්රජාතන්ත්රවාදී සමාජවාදී ජනරජය","ශ්රී ලංකාව","ශ්‍රී ලංකාව"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\uD83C\uDDF1\uD83C\uDDF8","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\uD83C\uDDF1\uD83C\uDDF9","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\uD83C\uDDF1\uD83C\uDDFA","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:["\uD83C\uDDF1\uD83C\uDDFB","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letmо","letmо vabamо","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\uD83C\uDDF2\uD83C\uDDF4","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","中國澳門特別行政區","澳門"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\uD83C\uDDF2\uD83C\uDDEB","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:["\uD83C\uDDF2\uD83C\uDDE6","kingdom of morocco","المغرب","المملكة المغربية","ⴰⵎⵓⵔ ⵏ ⵡⴰⴽⵓⵛ","ⴰⵎⵕⵕⵓⴽ","ⵍⵎⵕⵕⵓⴽ","ⵍⵎⵖⵔⵉⴱ","ⵜⴰⴳⵍⴷⵉⵜ ⵏ ⵍⵎⵖⵔⵉⴱ"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\uD83C\uDDF2\uD83C\uDDE8","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:["\uD83C\uDDF2\uD83C\uDDE9","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","молдова"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\uD83C\uDDF2\uD83C\uDDEC","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\uD83C\uDDF2\uD83C\uDDFB","dhivehi raajjeyge jumhooriyyaa","republic of maldives","ދިވެހި ރާއްޖެ","ދިވެހިރާއްޖެ","ދިވެހިރާއްޖޭގެ ޖުމުހޫރިއްޔާ","ދިވެހިރާއްޖޭގެ ޖުމްހޫރިއްޔާ"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\uD83C\uDDF2\uD83C\uDDFD","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:["\uD83C\uDDF2\uD83C\uDDED","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:["\uD83C\uDDF2\uD83C\uDDF0","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","македонија","република македонија","република северна македонија","рм","рсм","северна македонија"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\uD83C\uDDF2\uD83C\uDDF1","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\uD83C\uDDF2\uD83C\uDDF9","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\uD83C\uDDF2\uD83C\uDDF2","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","ပြည်ထောင်စု မြန်မာနိုင်ငံ","ပြည်ထောင်စု မြန်မာနိုင်ငံတော်","ပြည်ထောင်စု သမ္မတ မြန်မာနိုင်ငံ","ပြည်ထောင်စု သမ္မတ မြန်မာနိုင်ငံတော်","ပြည်ထောင်စုမြန်မာနိုင်ငံတော်","ပြည်ထောင်စုသမ္မတမြန်မာနိုင်ငံ","ပြ‌ည်ထောင်စုသမ္မတမြန်မာနိုင်ငံ","ပြည်ထောင်စုသမ္မတမြန်မာနိုင်ငံတော်","ဗမာပြည်","မြန်မာ","မြန်မာနိုင်ငံ","မြန်မာနိုင်ငံတော်","မြန်မာပြည်"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\uD83C\uDDF2\uD83C\uDDEA","crna cora","црна гора"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\uD83C\uDDF2\uD83C\uDDF3","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","монгол","монгол улс","ᠮᠤᠩᠭᠤᠯ ᠤᠯᠤᠰ"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\uD83C\uDDF2\uD83C\uDDF5","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:["\uD83C\uDDF2\uD83C\uDDFF","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\uD83C\uDDF2\uD83C\uDDF7","islamic republic of mauritania","الجمهورية الإسلامية الموريتانية","موريتانيا"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\uD83C\uDDF2\uD83C\uDDF8","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\uD83C\uDDF2\uD83C\uDDF6","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\uD83C\uDDF2\uD83C\uDDFA","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\uD83C\uDDF2\uD83C\uDDFC","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\uD83C\uDDF2\uD83C\uDDFE","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\uD83C\uDDFE\uD83C\uDDF9","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\uD83C\uDDF3\uD83C\uDDE6","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\uD83C\uDDF3\uD83C\uDDE8","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:["\uD83C\uDDF3\uD83C\uDDEA","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\uD83C\uDDF3\uD83C\uDDEB","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:["\uD83C\uDDF3\uD83C\uDDEC","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\uD83C\uDDF3\uD83C\uDDEE","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\uD83C\uDDF3\uD83C\uDDFA"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\uD83C\uDDF3\uD83C\uDDF1","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\uD83C\uDDF3\uD83C\uDDF4","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\uD83C\uDDF3\uD83C\uDDF5","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","नेपाल","संघिय लोकतान्त्रिक गणतन्त्र नेपाल","संघिय लोकतान्त्रिक गणतन्त्रात्मक नेपाल","संघीय लोकतान्त्रिक गणतन्त्र नेपाल"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\uD83C\uDDF3\uD83C\uDDF7","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\uD83C\uDDF3\uD83C\uDDFF","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\uD83C\uDDF4\uD83C\uDDF2","sultanate of oman","uman","سلطنة عمان","عمان"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\uD83C\uDDF5\uD83C\uDDF0","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","اسلامی جمہوریہ پاکستان","باکستان","پاکستان"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\uD83C\uDDF5\uD83C\uDDE6","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\uD83C\uDDF5\uD83C\uDDF3","occas island","pisskern aliеn","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\uD83C\uDDF5\uD83C\uDDEA","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\uD83C\uDDF5\uD83C\uDDED","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\uD83C\uDDF5\uD83C\uDDFC","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","パラオ","パラオ共和国"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\uD83C\uDDF5\uD83C\uDDEC","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\uD83C\uDDF5\uD83C\uDDF1","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\uD83C\uDDF5\uD83C\uDDF7","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:["\uD83C\uDDF0\uD83C\uDDF5","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","공화국","북조선","북한","조선","조선민주주의인민공화국"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\uD83C\uDDF5\uD83C\uDDF9","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\uD83C\uDDF5\uD83C\uDDFE","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\uD83C\uDDF5\uD83C\uDDF8","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","أراضي فلسطينية","الأراضي الفلسطينية","الدولة الفلسطينية","السلطة الفلسطينية","السلطة الوطنية الفلسطينية","الضفة الغربية وقطاع غزة","دولة فلسطين","فلسطين"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\uD83C\uDDF5\uD83C\uDDEB","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:["\uD83C\uDDF6\uD83C\uDDE6","state of qatar","إمارة قطر","دولة قطر","قطر"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xe9union",aliases:["\uD83C\uDDF7\uD83C\uDDEA","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\uD83C\uDDF7\uD83C\uDDF4"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\uD83C\uDDF7\uD83C\uDDFA","federation of russia","russia","россииская федерация","россия","рф"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\uD83C\uDDF7\uD83C\uDDFC","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:["\uD83C\uDDF8\uD83C\uDDE6","kingdom of saudi arabia","الدولة السعودية","الدوله السعوديه","السعودية","السعوديه","العربية السعودية","المملكة","المملكة السعودية","المملكة العربية","المملكة العربية السعودية","المملكه","المملكه العربيه السعوديه","بلاد الحرمين الشريفين","دولة آل سعود","سعودية","سعوديه","منبع الرسالة","مهبط الوحي"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\uD83C\uDDF8\uD83C\uDDE9","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","السودان","جمهورية السودان"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\uD83C\uDDF8\uD83C\uDDF3","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\uD83C\uDDF8\uD83C\uDDEC","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","சிங்கப்பூர்","சிங்கப்பூர் குடியரசு","சிங்கை","ஸிங்கபூர்"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\uD83C\uDDEC\uD83C\uDDF8","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\uD83C\uDDF8\uD83C\uDDED","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:["\uD83C\uDDF8\uD83C\uDDEF","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\uD83C\uDDF8\uD83C\uDDE7"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\uD83C\uDDF8\uD83C\uDDF1","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\uD83C\uDDF8\uD83C\uDDFB","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\uD83C\uDDF8\uD83C\uDDF2","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\uD83C\uDDF8\uD83C\uDDF4","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","الصومال","جمهورية الصومال","جمهورية الصومال الديموقراطية","جمهورية الصومال الفيدرالية","صومال"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\uD83C\uDDF5\uD83C\uDDF2","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:["\uD83C\uDDF7\uD83C\uDDF8","republic of serbia","republika srbija","република србија","србија"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\uD83C\uDDF8\uD83C\uDDF8","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\uD83C\uDDF8\uD83C\uDDF9","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:["\uD83C\uDDF8\uD83C\uDDF7","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\uD83C\uDDF8\uD83C\uDDF0","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\uD83C\uDDF8\uD83C\uDDEE","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\uD83C\uDDF8\uD83C\uDDEA","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\uD83C\uDDF8\uD83C\uDDFF","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\uD83C\uDDF8\uD83C\uDDFD","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:["\uD83C\uDDF8\uD83C\uDDE8","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\uD83C\uDDF8\uD83C\uDDFE","surya","syria","الجمهورية العربية السورية","الشام","سوريا","سورية"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\uD83C\uDDF9\uD83C\uDDE8","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\uD83C\uDDF9\uD83C\uDDE9","la republique du tchad","republic of chad","republique du tchad","tchad","تشاد","جمهورية تشاد"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\uD83C\uDDF9\uD83C\uDDEC","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\uD83C\uDDF9\uD83C\uDDED","kingdom of siam","kingdom of thailand","siam","thai","ไทย","ประเทศไทย","ประเทศสยาม","เมืองไทย","ราชอาณาจักรไทย","ราชอาณาจักรสยาม","สยาม"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\uD83C\uDDF9\uD83C\uDDEF","jumhurii tojikiston","republic of tajikistan","тоҷикистон","тҷ","тҷк","ҷт","ҷумҳурии тоҷикистон"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\uD83C\uDDF9\uD83C\uDDF0","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\uD83C\uDDF9\uD83C\uDDF2"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\uD83C\uDDF9\uD83C\uDDF1","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:["\uD83C\uDDF9\uD83C\uDDF4","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\uD83C\uDDF9\uD83C\uDDF9","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\uD83C\uDDF9\uD83C\uDDF3","republic of tunisia","tunisian republic","الجمهورية التونسية","تونس","تونس الخضراء"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xfcrkiye",aliases:["\uD83C\uDDF9\uD83C\uDDF7","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\uD83C\uDDF9\uD83C\uDDFB","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\uD83C\uDDF9\uD83C\uDDFC","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","中華民國","中華民國(臺灣)","中華臺北","台灣","臺澎金馬","臺灣"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\uD83C\uDDF9\uD83C\uDDFF","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:["\uD83C\uDDFA\uD83C\uDDEC","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\uD83C\uDDFA\uD83C\uDDE6","ukr","ukraina","ukrainia","ukrayina","вкраіна","украіна"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\uD83C\uDDFA\uD83C\uDDF2","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\uD83C\uDDFA\uD83C\uDDFE","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\uD83C\uDDFA\uD83C\uDDF8","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:["\uD83C\uDDFA\uD83C\uDDFF","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\uD83C\uDDFB\uD83C\uDDE6","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:["\uD83C\uDDFB\uD83C\uDDE8","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\uD83C\uDDFB\uD83C\uDDEA","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:["\uD83C\uDDFB\uD83C\uDDEC","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:["\uD83C\uDDFB\uD83C\uDDEE","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:["\uD83C\uDDFB\uD83C\uDDF3","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:["\uD83C\uDDFB\uD83C\uDDFA","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:["\uD83C\uDDFC\uD83C\uDDEB","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:["\uD83C\uDDFC\uD83C\uDDF8","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\uD83C\uDDFE\uD83C\uDDEA","rep yemen","republic of yemen","الجمهورية اليمنية","اليمن","دولة اليمن"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\uD83C\uDDFF\uD83C\uDDE6","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:["\uD83C\uDDFF\uD83C\uDDF2","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\uD83C\uDDFF\uD83C\uDDFC","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function l(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function c(e){let t=new Map,r=new Map,i=new Map;for(let n of e)t.set(n.iso3,n),n.iso2&&r.set(n.iso2,n),n.m49&&i.set(n.m49,n);let n=new Map;for(let t of e)for(let e of[t.name,...t.aliases]){let r=l(e),i=n.get(r);if(void 0!==i&&i!==t.iso3)throw Error(`Duplicate name/alias "${r}": ${i} vs ${t.iso3}`);n.set(r,t.iso3)}function a(e){if(null==e)return;let a=String(e).trim();if(!a)return;if(/^\d+$/.test(a)){let e=i.get(String(parseInt(a,10)).padStart(3,"0"));if(e)return e}if(/^[A-Za-z]{2}$/.test(a)){let e=r.get(a.toUpperCase());if(e)return e}if(/^[A-Za-z]{3}$/.test(a)){let e=t.get(a.toUpperCase());if(e)return e}let o=n.get(l(a));return void 0===o?void 0:t.get(o)}return{lookup:a,lookupAlpha3:function(e){var t;return null==(t=a(e))?void 0:t.iso3},byAlpha3:t,byAlpha2:r,byM49:i}}var u=c(s),h=u.lookup,d=u.lookupAlpha3,f=u.byAlpha3,p=u.byAlpha2,m=u.byM49}}),py=p({"node_modules/@turf/helpers/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t={centimeters:0x25f96350,centimetres:0x25f96350,degrees:360/(2*Math.PI),feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:6371008.8,metres:6371008.8,miles:3958.761333810546,millimeters:0x17bbde120,millimetres:0x17bbde120,nauticalmiles:6371008.8/1852,radians:1,yards:6967335.223679999},r={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(e,t,r={}){let n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function n(e,t,r={}){if(!e)throw Error("coordinates is required");if(!Array.isArray(e))throw Error("coordinates must be an Array");if(e.length<2)throw Error("coordinates must be at least 2 numbers long");if(!p(e[0])||!p(e[1]))throw Error("coordinates must contain numbers");return i({type:"Point",coordinates:e},t,r)}function a(e,t,r={}){for(let t of e){if(t.length<4)throw Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(t[t.length-1].length!==t[0].length)throw Error("First and last Position are not equivalent.");for(let e=0;e180?e-360:e<-180?e+360:e},e.bearingToAzimuth=function(e){let t=e%360;return t<0&&(t+=360),t},e.convertArea=function(e,t="meters",i="kilometers"){if(!(e>=0))throw Error("area must be a positive number");let n=r[t];if(!n)throw Error("invalid original units");let a=r[i];if(!a)throw Error("invalid final units");return e/n*a},e.convertLength=function(e,t="kilometers",r="kilometers"){if(!(e>=0))throw Error("length must be a positive number");return h(d(e,t),r)},e.degreesToRadians=function(e){return e%360*Math.PI/180},e.earthRadius=6371008.8,e.factors=t,e.feature=i,e.featureCollection=s,e.geometry=function(e,t,r={}){switch(e){case"Point":return n(t).geometry;case"LineString":return o(t).geometry;case"Polygon":return a(t).geometry;case"MultiPoint":return c(t).geometry;case"MultiLineString":return l(t).geometry;case"MultiPolygon":return u(t).geometry;default:throw Error(e+" is invalid")}},e.geometryCollection=function(e,t,r={}){return i({type:"GeometryCollection",geometries:e},t,r)},e.isNumber=p,e.isObject=function(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)},e.lengthToDegrees=function(e,t){return f(d(e,t))},e.lengthToRadians=d,e.lineString=o,e.lineStrings=function(e,t,r={}){return s(e.map(e=>o(e,t)),r)},e.multiLineString=l,e.multiPoint=c,e.multiPolygon=u,e.point=n,e.points=function(e,t,r={}){return s(e.map(e=>n(e,t)),r)},e.polygon=a,e.polygons=function(e,t,r={}){return s(e.map(e=>a(e,t)),r)},e.radiansToDegrees=f,e.radiansToLength=h,e.round=function(e,t=0){if(t&&!(t>=0))throw Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r},e.validateBBox=function(e){if(!e)throw Error("bbox is required");if(!Array.isArray(e))throw Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw Error("bbox must be an Array of 4 or 6 numbers");e.forEach(e=>{if(!p(e))throw Error("bbox must only contain numbers")})},e.validateId=function(e){if(!e)throw Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw Error("id must be a number or a string")}}}),pv=p({"node_modules/@turf/meta/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=py();function r(e,t,i){if(null!==e)for(var n,a,o,s,l,c,u,h,d=0,f=0,p=e.type,m="FeatureCollection"===p,g="Feature"===p,y=m?e.features.length:1,v=0;vc||f>u||p>h){l=r,c=n,u=f,h=p,o=0;return}if(!1===i(t.lineString.call(void 0,[l,r],e.properties),n,a,p,o))return!1;o++,l=r}))return!1}}})}function l(e,r){if(!e)throw Error("geojson is required");o(e,function(e,i,n){if(null!==e.geometry){var a=e.geometry.type,o=e.geometry.coordinates;switch(a){case"LineString":if(!1===r(e,i,n,0,0))return!1;break;case"Polygon":for(var s=0;se+function(e){let t=0,r;switch(e.type){case"Polygon":return n(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(s(e[0]));for(let r=1;r=t?(i+2)%t:i+2],l=n[0]*o,c=a[1]*o;r+=(s[0]*o-l)*Math.sin(c),i++}return r*a}e.area=i,e.default=i}}),pb=p({"node_modules/@turf/centroid/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=py(),r=pv();function i(e,n={}){let a=0,o=0,s=0;return r.coordEach.call(void 0,e,function(e){a+=e[0],o+=e[1],s++},!0),t.point.call(void 0,[a/s,o/s],n.properties)}e.centroid=i,e.default=i}}),p_=p({"node_modules/d3-geo/node_modules/d3-array/dist/d3-array.js"(e,t){(function(e){function t(e,t){return et?1:e>=t?0:NaN}function r(e){var r;return 1===e.length&&(r=e,e=function(e,i){return t(r(e),i)}),{left:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;0>e(t[a],r)?i=a+1:n=a}return i},right:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;e(t[a],r)>0?n=a:i=a+1}return i}}}var i=r(t),n=i.right,a=i.left;function o(e,t){return[e,t]}function s(e){return null===e?NaN:+e}function l(e,t){var r,i,n=e.length,a=0,o=-1,l=0,c=0;if(null==t)for(;++o1)return c/(a-1)}function c(e,t){var r=l(e,t);return r&&Math.sqrt(r)}function u(e,t){var r,i,n,a=e.length,o=-1;if(null==t){for(;++o=r)for(i=n=r;++or&&(i=r),n=r)for(i=n=r;++or&&(i=r),n=0?(a>=y?10:a>=v?5:a>=x?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(a>=y?10:a>=v?5:a>=x?2:1)}function _(e,t,r){var i=Math.abs(t-e)/Math.max(0,r),n=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),a=i/n;return a>=y?n*=10:a>=v?n*=5:a>=x&&(n*=2),t=1)return+r(e[i-1],i-1,e);var i,n=(i-1)*t,a=Math.floor(n),o=+r(e[a],a,e);return o+(r(e[a+1],a+1,e)-o)*(n-a)}}function M(e,t){var r,i,n=e.length,a=-1;if(null==t){for(;++a=r)for(i=r;++ar&&(i=r)}else for(;++a=r)for(i=r;++ar&&(i=r);return i}function k(e){if(!(n=e.length))return[];for(var t=-1,r=M(e,A),i=Array(r);++te?1:t>=e?0:NaN},e.deviation=c,e.extent=u,e.histogram=function(){var e=m,t=u,r=w;function i(i){var a,o,s=i.length,l=Array(s);for(a=0;ah;)d.pop(),--f;var p,m=Array(f+1);for(a=0;a<=f;++a)(p=m[a]=[]).x0=a>0?d[a-1]:u,p.x1=a=r)for(i=r;++ai&&(i=r)}else for(;++a=r)for(i=r;++ai&&(i=r);return i},e.mean=function(e,t){var r,i=e.length,n=i,a=-1,o=0;if(null==t)for(;++a=0;)for(t=(i=e[n]).length;--t>=0;)r[--o]=i[t];return r},e.min=M,e.pairs=function(e,t){null==t&&(t=o);for(var r=0,i=e.length-1,n=e[0],a=Array(i<0?0:i);rr(n=e[a],s)||0!==r(s,s))&&(s=n,o=a);if(0===r(s,s))return o}},e.shuffle=function(e,t,r){for(var i,n,a=(r??e.length)-(t=null==t?0:+t);a;)n=Math.random()*a--|0,i=e[a+t],e[a+t]=e[n+t],e[n+t]=i;return e},e.sum=function(e,t){var r,i=e.length,n=-1,a=0;if(null==t)for(;++n0)return[e];if((i=t0)for(e=Math.ceil(e/o),a=Array(n=Math.ceil((t=Math.floor(t/o))-e+1));++stypeof t?e:e.d3=e.d3||{})}}),pw=p({"node_modules/d3-geo/dist/d3-geo.js"(e,t){var r,i;r=e,i=function(e,t){function r(){return new i}function i(){this.reset()}i.prototype={constructor:i,reset:function(){this.s=this.t=0},add:function(e){a(n,e,this.t),a(this,n.s,this.s),this.s?this.t+=n.t:this.s=n.t},valueOf:function(){return this.s}};var n=new i;function a(e,t,r){var i=e.s=t+r,n=i-t;e.t=t-(i-n)+(r-n)}var o=Math.PI,s=o/2,l=o/4,c=2*o,u=180/o,h=o/180,d=Math.abs,f=Math.atan,p=Math.atan2,m=Math.cos,g=Math.ceil,y=Math.exp,v=Math.log,x=Math.pow,b=Math.sin,_=Math.sign||function(e){return e>0?1:e<0?-1:0},w=Math.sqrt,T=Math.tan;function M(e){return e>1?0:e<-1?o:Math.acos(e)}function k(e){return e>1?s:e<-1?-s:Math.asin(e)}function A(){}function S(e,t){e&&C.hasOwnProperty(e.type)&&C[e.type](e,t)}var E={Feature:function(e,t){S(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,i=-1,n=r.length;++i=0?1:-1,n=i*r,a=m(t),o=b(t),s=F*o,c=R*a+s*m(n),u=s*i*b(n);j.add(p(u,c)),O=e,R=a,F=o}function G(e){return[p(e[1],e[0]),k(e[2])]}function W(e){var t=e[0],r=e[1],i=m(r);return[i*m(t),i*b(t),b(r)]}function Y(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Z(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function $(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function X(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function K(e){var t=w(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var J,Q,ee,et,er,ei,en,ea,eo,es,el=r(),ec={point:eu,lineStart:ed,lineEnd:ef,polygonStart:function(){ec.point=ep,ec.lineStart=em,ec.lineEnd=eg,el.reset(),N.polygonStart()},polygonEnd:function(){N.polygonEnd(),ec.point=eu,ec.lineStart=ed,ec.lineEnd=ef,j<0?(J=-(ee=180),Q=-(et=90)):el>1e-6?et=90:el<-1e-6&&(Q=-90),es[0]=J,es[1]=ee},sphere:function(){J=-(ee=180),Q=-(et=90)}};function eu(e,t){eo.push(es=[J=e,ee=e]),tet&&(et=t)}function eh(e,t){var r=W([e*h,t*h]);if(ea){var i=Z(ea,r),n=Z([i[1],-i[0],0],i);K(n),n=G(n);var a,o=e-er,s=o>0?1:-1,l=n[0]*u*s,c=d(o)>180;c^(s*eret&&(et=a):c^(s*er<(l=(l+360)%360-180)&&let&&(et=t)),c?eey(J,ee)&&(ee=e):ey(e,ee)>ey(J,ee)&&(J=e):ee>=J?(eee&&(ee=e)):e>er?ey(J,e)>ey(J,ee)&&(ee=e):ey(e,ee)>ey(J,ee)&&(J=e)}else eo.push(es=[J=e,ee=e]);tet&&(et=t),ea=r,er=e}function ed(){ec.point=eh}function ef(){es[0]=J,es[1]=ee,ec.point=eu,ea=null}function ep(e,t){if(ea){var r=e-er;el.add(d(r)>180?r+(r>0?360:-360):r)}else ei=e,en=t;N.point(e,t),eh(e,t)}function em(){N.lineStart()}function eg(){ep(ei,en),N.lineEnd(),d(el)>1e-6&&(J=-(ee=180)),es[0]=J,es[1]=ee,ea=null}function ey(e,t){return(t-=e)<0?t+360:t}function ev(e,t){return e[0]-t[0]}function ex(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:to?e+Math.round(-e/c)*c:e,t]}function eX(e,t,r){return(e%=c)?t||r?eZ(eJ(e),eQ(t,r)):eJ(e):t||r?eQ(t,r):e$}function eK(e){return function(t,r){return[(t+=e)>o?t-c:t<-o?t+c:t,r]}}function eJ(e){var t=eK(e);return t.invert=eK(-e),t}function eQ(e,t){var r=m(e),i=b(e),n=m(t),a=b(t);function o(e,t){var o=m(t),s=m(e)*o,l=b(e)*o,c=b(t),u=c*r+s*i;return[p(l*n-u*a,s*r-c*i),k(u*n+l*a)]}return o.invert=function(e,t){var o=m(t),s=m(e)*o,l=b(e)*o,c=b(t),u=c*n-l*a;return[p(l*n+c*a,s*r+u*i),k(u*r-s*i)]},o}function e0(e){function t(t){return t=e(t[0]*h,t[1]*h),t[0]*=u,t[1]*=u,t}return e=eX(e[0]*h,e[1]*h,e.length>2?e[2]*h:0),t.invert=function(t){return t=e.invert(t[0]*h,t[1]*h),t[0]*=u,t[1]*=u,t},t}function e1(e,t,r,i,n,a){if(r){var o=m(t),s=b(t),l=i*r;null==n?(n=t+i*c,a=t-l/2):(n=e2(o,n),a=e2(o,a),(i>0?na)&&(n+=i*c));for(var u,h=n;i>0?h>a:h-t[2]?-r:r)+c-1e-6)%c}function e3(){var e,t=[];return{point:function(t,r,i){e.push([t,r,i])},lineStart:function(){t.push(e=[])},lineEnd:A,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],e=null,r}}}function e5(e,t){return 1e-6>d(e[0]-t[0])&&1e-6>d(e[1]-t[1])}function e4(e,t,r,i){this.x=e,this.z=t,this.o=r,this.e=i,this.v=!1,this.n=this.p=null}function e6(e,t,r,i,n){var a,o,s=[],l=[];if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,r,i=e[0],o=e[t];if(e5(i,o)){if(!i[2]&&!o[2]){for(n.lineStart(),a=0;a=0;--a)n.point((u=c[a])[0],u[1]);else i(d.x,d.p.x,-1,n);d=d.p}c=(d=d.o).z,f=!f}while(!d.v);n.lineEnd()}}}function e8(e){if(t=e.length){for(var t,r,i=0,n=e[0];++i=0?1:-1,z=I*P,D=z>o,O=w*C;if(e7.add(p(O*I*b(z),T*L+O*m(z))),u+=D?P+I*c:P,D^x>=r^S>=r){var R=Z(W(v),W(A));K(R);var F=Z(a,R);K(F);var j=(D^P>=0?-1:1)*k(F[2]);(i>j||i===j&&(R[0]||R[1]))&&(h+=D^P>=0?1:-1)}}return(u<-1e-6||u<1e-6&&e7<-1e-6)^1&h}function tt(e,r,i,n){return function(a){var o,s,l,c=r(a),u=e3(),h=r(u),d=!1,f={point:p,lineStart:g,lineEnd:y,polygonStart:function(){f.point=v,f.lineStart=x,f.lineEnd=b,s=[],o=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=y,s=t.merge(s);var e=te(o,n);s.length?(d||(a.polygonStart(),d=!0),e6(s,ti,e,i,a)):e&&(d||(a.polygonStart(),d=!0),a.lineStart(),i(null,null,1,a),a.lineEnd()),d&&(a.polygonEnd(),d=!1),s=o=null},sphere:function(){a.polygonStart(),a.lineStart(),i(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function p(t,r){e(t,r)&&a.point(t,r)}function m(e,t){c.point(e,t)}function g(){f.point=m,c.lineStart()}function y(){f.point=p,c.lineEnd()}function v(e,t){l.push([e,t]),h.point(e,t)}function x(){h.lineStart(),l=[]}function b(){v(l[0][0],l[0][1]),h.lineEnd();var e,t,r,i,n=h.clean(),c=u.result(),f=c.length;if(l.pop(),o.push(l),l=null,f){if(1&n){if((t=(r=c[0]).length-1)>0){for(d||(a.polygonStart(),d=!0),a.lineStart(),e=0;e1&&2&n&&c.push(c.pop().concat(c.shift())),s.push(c.filter(tr))}}return f}}function tr(e){return e.length>1}function ti(e,t){return((e=e.x)[0]<0?e[1]-s-1e-6:s-e[1])-((t=t.x)[0]<0?t[1]-s-1e-6:s-t[1])}var tn=tt(function(){return!0},function(e){var t,r=NaN,i=NaN,n=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(a,l){var c,u,h,p,g,y,v,x=a>0?o:-o,_=d(a-r);1e-6>d(_-o)?(e.point(r,i=(i+l)/2>0?s:-s),e.point(n,i),e.lineEnd(),e.lineStart(),e.point(x,i),e.point(a,i),t=0):n!==x&&_>=o&&(1e-6>d(r-n)&&(r-=1e-6*n),1e-6>d(a-x)&&(a-=1e-6*x),c=r,u=i,h=a,p=l,i=d(v=b(c-h))>1e-6?f((b(u)*(y=m(p))*b(h)-b(p)*(g=m(u))*b(c))/(g*y*v)):(u+p)/2,e.point(n,i),e.lineEnd(),e.lineStart(),e.point(x,i),t=0),e.point(r=a,i=l),n=x},lineEnd:function(){e.lineEnd(),r=i=NaN},clean:function(){return 2-t}}},function(e,t,r,i){var n;if(null==e)n=r*s,i.point(-o,n),i.point(0,n),i.point(o,n),i.point(o,0),i.point(o,-n),i.point(0,-n),i.point(-o,-n),i.point(-o,0),i.point(-o,n);else if(d(e[0]-t[0])>1e-6){var a=e[0]0,n=d(t)>1e-6;function a(e,r){return m(e)*m(r)>t}function s(e,r,i){var n=W(e),a=W(r),s=[1,0,0],l=Z(n,a),c=Y(l,l),u=l[0],h=c-u*u;if(!h)return!i&&e;var f=Z(s,l),p=X(s,t*c/h);$(p,X(l,-t*u/h));var m=Y(p,f),g=Y(f,f),y=m*m-g*(Y(p,p)-1);if(!(y<0)){var v=w(y),x=X(f,(-m-v)/g);if($(x,p),x=G(x),!i)return x;var b,_=e[0],T=r[0],M=e[1],k=r[1];T<_&&(b=_,_=T,T=b);var A=T-_,S=1e-6>d(A-o);if(!S&&k0^x[1]<(1e-6>d(x[0]-_)?M:k):M<=x[1]&&x[1]<=k:A>o^(_<=x[0]&&x[0]<=T)){var E=X(f,(-m+v)/g);return $(E,p),[x,G(E)]}}}function l(t,r){var n=i?e:o-e,a=0;return t<-n?a|=1:t>n&&(a|=2),r<-n?a|=4:r>n&&(a|=8),a}return tt(a,function(e){var t,r,c,u,h;return{lineStart:function(){u=c=!1,h=1},point:function(d,f){var p,m,g=[d,f],y=a(d,f),v=i?y?0:l(d,f):y?l(d+(d<0?o:-o),f):0;(!t&&(u=c=y)&&e.lineStart(),y!==c&&(!(m=s(t,g))||e5(t,m)||e5(g,m))&&(g[2]=1),y!==c)?(h=0,y?(e.lineStart(),m=s(g,t),e.point(m[0],m[1])):(m=s(t,g),e.point(m[0],m[1],2),e.lineEnd()),t=m):n&&t&&i^y&&!(v&r)&&(p=s(g,t,!0))&&(h=0,i?(e.lineStart(),e.point(p[0][0],p[0][1]),e.point(p[1][0],p[1][1]),e.lineEnd()):(e.point(p[1][0],p[1][1]),e.lineEnd(),e.lineStart(),e.point(p[0][0],p[0][1],3))),!y||t&&e5(t,g)||e.point(g[0],g[1]),t=g,c=y,r=v},lineEnd:function(){c&&e.lineEnd(),t=null},clean:function(){return h|(u&&c)<<1}}},function(t,i,n,a){e1(a,e,r,n,t,i)},i?[0,-e]:[-o,e-o])}function to(e,r,i,n){function a(t,a){return e<=t&&t<=i&&r<=a&&a<=n}function o(t,a,o,l){var u=0,h=0;if(null==t||(u=s(t,o))!==(h=s(a,o))||0>c(t,a)^o>0)do l.point(0===u||3===u?e:i,u>1?n:r);while((u=(u+o+4)%4)!==h);else l.point(a[0],a[1])}function s(t,n){return 1e-6>d(t[0]-e)?n>0?0:3:1e-6>d(t[0]-i)?n>0?2:1:1e-6>d(t[1]-r)?+(n>0):n>0?3:2}function l(e,t){return c(e.x,t.x)}function c(e,t){var r=s(e,1),i=s(t,1);return r!==i?r-i:0===r?t[1]-e[1]:1===r?e[0]-t[0]:2===r?e[1]-t[1]:t[0]-e[0]}return function(s){var c,u,h,d,f,p,m,g,y,v,x,b=s,_=e3(),w={point:T,lineStart:function(){w.point=M,u&&u.push(h=[]),v=!0,y=!1,m=g=NaN},lineEnd:function(){c&&(M(d,f),p&&y&&_.rejoin(),c.push(_.result())),w.point=T,y&&b.lineEnd()},polygonStart:function(){b=_,c=[],u=[],x=!0},polygonEnd:function(){var r=function(){for(var t=0,r=0,i=u.length;rn&&(d-a)*(n-o)>(f-o)*(e-a)&&++t:f<=n&&(d-a)*(n-o)<(f-o)*(e-a)&&--t;return t}(),i=x&&r,a=(c=t.merge(c)).length;(i||a)&&(s.polygonStart(),i&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),a&&e6(c,l,r,o,s),s.polygonEnd()),b=s,c=u=h=null}};function T(e,t){a(e,t)&&b.point(e,t)}function M(t,o){var s=a(t,o);if(u&&h.push([t,o]),v)d=t,f=o,p=s,v=!1,s&&(b.lineStart(),b.point(t,o));else if(s&&y)b.point(t,o);else{var l=[m=Math.max(-1e9,Math.min(1e9,m)),g=Math.max(-1e9,Math.min(1e9,g))],c=[t=Math.max(-1e9,Math.min(1e9,t)),o=Math.max(-1e9,Math.min(1e9,o))];!function(e,t,r,i,n,a){var o,s=e[0],l=e[1],c=t[0],u=t[1],h=0,d=1,f=c-s,p=u-l;if(o=r-s,!(!f&&o>0)){if(o/=f,f<0){if(o0){if(o>d)return;o>h&&(h=o)}if(o=n-s,!(!f&&o<0)){if(o/=f,f<0){if(o>d)return;o>h&&(h=o)}else if(f>0){if(o0)){if(o/=p,p<0){if(o0){if(o>d)return;o>h&&(h=o)}if(o=a-l,!(!p&&o<0)){if(o/=p,p<0){if(o>d)return;o>h&&(h=o)}else if(p>0){if(o0&&(e[0]=s+h*f,e[1]=l+h*p),d<1&&(t[0]=s+d*f,t[1]=l+d*p),!0}}}}}(l,c,e,r,i,n)?s&&(b.lineStart(),b.point(t,o),x=!1):(y||(b.lineStart(),b.point(l[0],l[1])),b.point(c[0],c[1]),s||b.lineEnd(),x=!1)}m=t,g=o,y=s}return w}}var ts,tl,tc,tu=r(),th={sphere:A,point:A,lineStart:function(){th.point=tf,th.lineEnd=td},lineEnd:A,polygonStart:A,polygonEnd:A};function td(){th.point=th.lineEnd=A}function tf(e,t){e*=h,t*=h,ts=e,tl=b(t),tc=m(t),th.point=tp}function tp(e,t){e*=h;var r=b(t*=h),i=m(t),n=d(e-ts),a=m(n),o=i*b(n),s=tc*r-tl*i*a,l=tl*r+tc*i*a;tu.add(p(w(o*o+s*s),l)),ts=e,tl=r,tc=i}function tm(e){return tu.reset(),I(e,th),+tu}var tg=[null,null],ty={type:"LineString",coordinates:tg};function tv(e,t){return tg[0]=e,tg[1]=t,tm(ty)}var tx={Feature:function(e,t){return t_(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,i=-1,n=r.length;++i0&&(n=tv(e[a],e[a-1]))>0&&r<=n&&i<=n&&(r+i-n)*(1-Math.pow((r-i)/n,2))<1e-12*n)return!0;r=i}return!1}function tT(e,t){return!!te(e.map(tM),tk(t))}function tM(e){return(e=e.map(tk)).pop(),e}function tk(e){return[e[0]*h,e[1]*h]}function tA(e,r,i){var n=t.range(e,r-1e-6,i).concat(r);return function(e){return n.map(function(t){return[e,t]})}}function tS(e,r,i){var n=t.range(e,r-1e-6,i).concat(r);return function(e){return n.map(function(t){return[t,e]})}}function tE(){var e,r,i,n,a,o,s,l,c,u,h,f,p=10,m=10,y=90,v=360,x=2.5;function b(){return{type:"MultiLineString",coordinates:_()}}function _(){return t.range(g(n/y)*y,i,y).map(h).concat(t.range(g(l/v)*v,s,v).map(f)).concat(t.range(g(r/p)*p,e,p).filter(function(e){return d(e%y)>1e-6}).map(c)).concat(t.range(g(o/m)*m,a,m).filter(function(e){return d(e%v)>1e-6}).map(u))}return b.lines=function(){return _().map(function(e){return{type:"LineString",coordinates:e}})},b.outline=function(){return{type:"Polygon",coordinates:[h(n).concat(f(s).slice(1),h(i).reverse().slice(1),f(l).reverse().slice(1))]}},b.extent=function(e){return arguments.length?b.extentMajor(e).extentMinor(e):b.extentMinor()},b.extentMajor=function(e){return arguments.length?(n=+e[0][0],i=+e[1][0],l=+e[0][1],s=+e[1][1],n>i&&(e=n,n=i,i=e),l>s&&(e=l,l=s,s=e),b.precision(x)):[[n,l],[i,s]]},b.extentMinor=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),b.precision(x)):[[r,o],[e,a]]},b.step=function(e){return arguments.length?b.stepMajor(e).stepMinor(e):b.stepMinor()},b.stepMajor=function(e){return arguments.length?(y=+e[0],v=+e[1],b):[y,v]},b.stepMinor=function(e){return arguments.length?(p=+e[0],m=+e[1],b):[p,m]},b.precision=function(t){return arguments.length?(x=+t,c=tA(o,a,90),u=tS(r,e,x),h=tA(l,s,90),f=tS(n,i,x),b):x},b.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function tC(e){return e}var tL,tP,tI,tz,tD=r(),tO=r(),tR={point:A,lineStart:A,lineEnd:A,polygonStart:function(){tR.lineStart=tF,tR.lineEnd=tN},polygonEnd:function(){tR.lineStart=tR.lineEnd=tR.point=A,tD.add(d(tO)),tO.reset()},result:function(){var e=tD/2;return tD.reset(),e}};function tF(){tR.point=tj}function tj(e,t){tR.point=tB,tL=tI=e,tP=tz=t}function tB(e,t){tO.add(tz*e-tI*t),tI=e,tz=t}function tN(){tB(tL,tP)}var tU,tV,tq,tH,tG=1/0,tW=1/0,tY=-1/0,tZ=tY,t$={point:function(e,t){etY&&(tY=e),ttZ&&(tZ=t)},lineStart:A,lineEnd:A,polygonStart:A,polygonEnd:A,result:function(){var e=[[tG,tW],[tY,tZ]];return tY=tZ=-(tW=tG=1/0),e}},tX=0,tK=0,tJ=0,tQ=0,t0=0,t1=0,t2=0,t3=0,t5=0,t4={point:t6,lineStart:t8,lineEnd:re,polygonStart:function(){t4.lineStart=rt,t4.lineEnd=rr},polygonEnd:function(){t4.point=t6,t4.lineStart=t8,t4.lineEnd=re},result:function(){var e=t5?[t2/t5,t3/t5]:t1?[tQ/t1,t0/t1]:tJ?[tX/tJ,tK/tJ]:[NaN,NaN];return tX=tK=tJ=tQ=t0=t1=t2=t3=t5=0,e}};function t6(e,t){tX+=e,tK+=t,++tJ}function t8(){t4.point=t7}function t7(e,t){t4.point=t9,t6(tq=e,tH=t)}function t9(e,t){var r=e-tq,i=t-tH,n=w(r*r+i*i);tQ+=n*(tq+e)/2,t0+=n*(tH+t)/2,t1+=n,t6(tq=e,tH=t)}function re(){t4.point=t6}function rt(){t4.point=ri}function rr(){rn(tU,tV)}function ri(e,t){t4.point=rn,t6(tU=tq=e,tV=tH=t)}function rn(e,t){var r=e-tq,i=t-tH,n=w(r*r+i*i);tQ+=n*(tq+e)/2,t0+=n*(tH+t)/2,t1+=n,t2+=(n=tH*e-tq*t)*(tq+e),t3+=n*(tH+t),t5+=3*n,t6(tq=e,tH=t)}function ra(e){this._context=e}ra.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,c)}},result:A};var ro,rs,rl,rc,ru,rh=r(),rd={point:A,lineStart:function(){rd.point=rf},lineEnd:function(){ro&&rp(rs,rl),rd.point=A},polygonStart:function(){ro=!0},polygonEnd:function(){ro=null},result:function(){var e=+rh;return rh.reset(),e}};function rf(e,t){rd.point=rp,rs=rc=e,rl=ru=t}function rp(e,t){rc-=e,ru-=t,rh.add(w(rc*rc+ru*ru)),rc=e,ru=t}function rm(){this._string=[]}function rg(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function ry(e){return function(t){var r=new rv;for(var i in e)r[i]=e[i];return r.stream=t,r}}function rv(){}function rx(e,t,r){var i=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=i&&e.clipExtent(null),I(r,e.stream(t$)),t(t$.result()),null!=i&&e.clipExtent(i),e}function rb(e,t,r){return rx(e,function(r){var i=t[1][0]-t[0][0],n=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),n/(r[1][1]-r[0][1])),o=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,s=+t[0][1]+(n-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([o,s])},r)}function r_(e,t,r){return rb(e,[[0,0],t],r)}function rw(e,t,r){return rx(e,function(r){var i=+t,n=i/(r[1][0]-r[0][0]),a=(i-n*(r[1][0]+r[0][0]))/2,o=-n*r[0][1];e.scale(150*n).translate([a,o])},r)}function rT(e,t,r){return rx(e,function(r){var i=+t,n=i/(r[1][1]-r[0][1]),a=-n*r[0][0],o=(i-n*(r[1][1]+r[0][1]))/2;e.scale(150*n).translate([a,o])},r)}rm.prototype={_radius:4.5,_circle:rg(4.5),pointRadius:function(e){return(e*=1)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=rg(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(!this._string.length)return null;var e=this._string.join("");return this._string=[],e}},rv.prototype={constructor:rv,point:function(e,t){this.stream.point(e,t)},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()}};var rM=m(30*h);function rk(e,t){var r;return+t?function(e,t){function r(i,n,a,o,s,l,c,u,h,f,m,g,y,v){var x=c-i,b=u-n,_=x*x+b*b;if(_>4*t&&y--){var T=o+f,M=s+m,A=l+g,S=w(T*T+M*M+A*A),E=k(A/=S),C=1e-6>d(d(A)-1)||1e-6>d(a-h)?(a+h)/2:p(M,T),L=e(C,E),P=L[0],I=L[1],z=P-i,D=I-n,O=b*z-x*D;(O*O/_>t||d((x*z+b*D)/_-.5)>.3||o*f+s*m+l*g2?e[2]%360*h:0,I()):[v*u,x*u,b*u]},L.angle=function(e){return arguments.length?(_=e%360*h,I()):_*u},L.reflectX=function(e){return arguments.length?(T=e?-1:1,I()):T<0},L.reflectY=function(e){return arguments.length?(M=e?-1:1,I()):M<0},L.precision=function(e){return arguments.length?(o=rk(s,C=e*e),z()):w(C)},L.fitExtent=function(e,t){return rb(L,e,t)},L.fitSize=function(e,t){return r_(L,e,t)},L.fitWidth=function(e,t){return rw(L,e,t)},L.fitHeight=function(e,t){return rT(L,e,t)},function(){return t=e.apply(this,arguments),L.invert=t.invert&&P,I()}}function rL(e){var t=0,r=o/3,i=rC(e),n=i(t,r);return n.parallels=function(e){return arguments.length?i(t=e[0]*h,r=e[1]*h):[t*u,r*u]},n}function rP(e,t){var r=b(e),i=(r+b(t))/2;if(1e-6>d(i)){var n=m(e);function a(e,t){return[e*n,b(t)/n]}return a.invert=function(e,t){return[e/n,k(t*n)]},a}var s=1+r*(2*i-r),l=w(s)/i;function c(e,t){var r=w(s-2*i*b(t))/i;return[r*b(e*=i),l-r*m(e)]}return c.invert=function(e,t){var r=l-t,n=p(e,d(r))*_(r);return r*i<0&&(n-=o*_(e)*_(r)),[n/i,k((s-(e*e+r*r)*i*i)/(2*i))]},c}function rI(){return rL(rP).scale(155.424).center([0,33.6442])}function rz(){return rI().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function rD(e){return function(t,r){var i=m(t),n=m(r),a=e(i*n);return[a*n*b(t),a*b(r)]}}function rO(e){return function(t,r){var i=w(t*t+r*r),n=e(i),a=b(n);return[p(t*a,i*m(n)),k(i&&r*a/i)]}}var rR=rD(function(e){return w(2/(1+e))});rR.invert=rO(function(e){return 2*k(e/2)});var rF=rD(function(e){return(e=M(e))&&e/b(e)});function rj(e,t){return[e,v(T((s+t)/2))]}function rB(e){var t,r,i,n=rE(e),a=n.center,s=n.scale,l=n.translate,c=n.clipExtent,u=null;function h(){var a=o*s(),l=n(e0(n.rotate()).invert([0,0]));return c(null==u?[[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]]:e===rj?[[Math.max(l[0]-a,u),t],[Math.min(l[0]+a,r),i]]:[[u,Math.max(l[1]-a,t)],[r,Math.min(l[1]+a,i)]])}return n.scale=function(e){return arguments.length?(s(e),h()):s()},n.translate=function(e){return arguments.length?(l(e),h()):l()},n.center=function(e){return arguments.length?(a(e),h()):a()},n.clipExtent=function(e){return arguments.length?(null==e?u=t=r=i=null:(u=+e[0][0],t=+e[0][1],r=+e[1][0],i=+e[1][1]),h()):null==u?null:[[u,t],[r,i]]},h()}function rN(e){return T((s+e)/2)}function rU(e,t){var r=m(e),i=e===t?b(e):v(r/m(t))/v(rN(t)/rN(e)),n=r*x(rN(e),i)/i;if(!i)return rj;function a(e,t){n>0?t<-s+1e-6&&(t=-s+1e-6):t>s-1e-6&&(t=s-1e-6);var r=n/x(rN(t),i);return[r*b(i*e),n-r*m(i*e)]}return a.invert=function(e,t){var r=n-t,a=_(i)*w(e*e+r*r),l=p(e,d(r))*_(r);return r*i<0&&(l-=o*_(e)*_(r)),[l/i,2*f(x(n/a,1/i))-s]},a}function rV(e,t){return[e,t]}function rq(e,t){var r=m(e),i=e===t?b(e):(r-m(t))/(t-e),n=r/i+e;if(1e-6>d(i))return rV;function a(e,t){var r=n-t,a=i*e;return[r*b(a),n-r*m(a)]}return a.invert=function(e,t){var r=n-t,a=p(e,d(r))*_(r);return r*i<0&&(a-=o*_(e)*_(r)),[a/i,n-_(i)*w(e*e+r*r)]},a}rF.invert=rO(function(e){return e}),rj.invert=function(e,t){return[e,2*f(y(t))-s]},rV.invert=rV;var rH=w(3)/2;function rG(e,t){var r=k(rH*b(t)),i=r*r,n=i*i*i;return[e*m(r)/(rH*(1.340264+-.24331799999999998*i+n*(.0062510000000000005+.034164*i))),r*(1.340264+-.081106*i+n*(893e-6+.003796*i))]}function rW(e,t){var r=m(t),i=m(e)*r;return[r*b(e)/i,b(t)/i]}function rY(e,t){var r=t*t,i=r*r;return[e*(.8707-.131979*r+i*(-.013791+i*(.003971*r-.001529*i))),t*(1.007226+r*(.015085+i*(-.044475+.028874*r-.005916*i)))]}function rZ(e,t){return[m(t)*b(e),b(t)]}function r$(e,t){var r=m(t),i=1+m(e)*r;return[r*b(e)/i,b(t)/i]}function rX(e,t){return[v(T((s+t)/2)),-e]}rG.invert=function(e,t){for(var r,i,n=t,a=n*n,o=a*a*a,s=0;s<12&&(i=n*(1.340264+-.081106*a+o*(893e-6+.003796*a))-t,n-=r=i/(1.340264+-.24331799999999998*a+o*(.0062510000000000005+.034164*a)),o=(a=n*n)*a*a,!(1e-12>d(r)));++s);return[rH*e*(1.340264+-.24331799999999998*a+o*(.0062510000000000005+.034164*a))/m(n),k(b(n)/rH)]},rW.invert=rO(f),rY.invert=function(e,t){var r,i=t,n=25;do{var a=i*i,o=a*a;i-=r=(i*(1.007226+a*(.015085+o*(-.044475+.028874*a-.005916*o)))-t)/(1.007226+a*(.045255+o*(-.311325+.259866*a-.005916*11*o)))}while(d(r)>1e-6&&--n>0);return[e/(.8707+(a=i*i)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),i]},rZ.invert=rO(k),r$.invert=rO(function(e){return 2*f(e)}),rX.invert=function(e,t){return[-t,2*f(y(e))-s]},e.geoAlbers=rz,e.geoAlbersUsa=function(){var e,t,r,i,n,a,o=rz(),s=rI().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=rI().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(e,t){a=[e,t]}};function u(e){var t=e[0],o=e[1];return a=null,r.point(t,o),a||(i.point(t,o),a)||(n.point(t,o),a)}function h(){return e=t=null,u}return u.invert=function(e){var t=o.scale(),r=o.translate(),i=(e[0]-r[0])/t,n=(e[1]-r[1])/t;return(n>=.12&&n<.234&&i>=-.425&&i<-.214?s:n>=.166&&n<.234&&i>=-.214&&i<-.115?l:o).invert(e)},u.stream=function(r){var i,n;return e&&t===r?e:(n=(i=[o.stream(t=r),s.stream(r),l.stream(r)]).length,e={point:function(e,t){for(var r=-1;++rey(i[0],i[1])&&(i[1]=n[1]),ey(n[0],i[1])>ey(i[0],i[1])&&(i[0]=n[0])):a.push(i=n);for(o=-1/0,r=a.length-1,t=0,i=a[r];t<=r;i=n,++t)n=a[t],(s=ey(i[1],n[0]))>o&&(o=s,J=n[0],ee=i[1])}return eo=es=null,J===1/0||Q===1/0?[[NaN,NaN],[NaN,NaN]]:[[J,Q],[ee,et]]},e.geoCentroid=function(e){eb=e_=ew=eT=eM=ek=eA=eS=eE=eC=eL=0,I(e,eR);var t=eE,r=eC,i=eL,n=t*t+r*r+i*i;return n<1e-12&&(t=ek,r=eA,i=eS,e_<1e-6&&(t=ew,r=eT,i=eM),(n=t*t+r*r+i*i)<1e-12)?[NaN,NaN]:[p(r,t)*u,k(i/w(n))*u]},e.geoCircle=function(){var e,t,r=eY([0,0]),i=eY(90),n=eY(6),a={point:function(r,i){e.push(r=t(r,i)),r[0]*=u,r[1]*=u}};function o(){var o=r.apply(this,arguments),s=i.apply(this,arguments)*h,l=n.apply(this,arguments)*h;return e=[],t=eX(-o[0]*h,-o[1]*h,0).invert,e1(a,s,l,1),o={type:"Polygon",coordinates:[e]},e=t=null,o}return o.center=function(e){return arguments.length?(r="function"==typeof e?e:eY([+e[0],+e[1]]),o):r},o.radius=function(e){return arguments.length?(i="function"==typeof e?e:eY(+e),o):i},o.precision=function(e){return arguments.length?(n="function"==typeof e?e:eY(+e),o):n},o},e.geoClipAntimeridian=tn,e.geoClipCircle=ta,e.geoClipExtent=function(){var e,t,r,i=0,n=0,a=960,o=500;return r={stream:function(r){return e&&t===r?e:e=to(i,n,a,o)(t=r)},extent:function(s){return arguments.length?(i=+s[0][0],n=+s[0][1],a=+s[1][0],o=+s[1][1],e=t=null,r):[[i,n],[a,o]]}}},e.geoClipRectangle=to,e.geoConicConformal=function(){return rL(rU).scale(109.5).parallels([30,30])},e.geoConicConformalRaw=rU,e.geoConicEqualArea=rI,e.geoConicEqualAreaRaw=rP,e.geoConicEquidistant=function(){return rL(rq).scale(131.154).center([0,13.9389])},e.geoConicEquidistantRaw=rq,e.geoContains=function(e,t){return(e&&tx.hasOwnProperty(e.type)?tx[e.type]:t_)(e,t)},e.geoDistance=tv,e.geoEqualEarth=function(){return rE(rG).scale(177.158)},e.geoEqualEarthRaw=rG,e.geoEquirectangular=function(){return rE(rV).scale(152.63)},e.geoEquirectangularRaw=rV,e.geoGnomonic=function(){return rE(rW).scale(144.049).clipAngle(60)},e.geoGnomonicRaw=rW,e.geoGraticule=tE,e.geoGraticule10=function(){return tE()()},e.geoIdentity=function(){var e,t,r,i,n,a,o,s=1,l=0,c=0,d=1,f=1,p=0,g=null,y=1,v=1,x=ry({point:function(e,t){var r=T([e,t]);this.stream.point(r[0],r[1])}}),_=tC;function w(){return y=s*d,v=s*f,a=o=null,T}function T(r){var i=r[0]*y,n=r[1]*v;if(p){var a=n*e-i*t;i=i*e+n*t,n=a}return[i+l,n+c]}return T.invert=function(r){var i=r[0]-l,n=r[1]-c;if(p){var a=n*e+i*t;i=i*e-n*t,n=a}return[i/y,n/v]},T.stream=function(e){return a&&o===e?a:a=x(_(o=e))},T.postclip=function(e){return arguments.length?(_=e,g=r=i=n=null,w()):_},T.clipExtent=function(e){return arguments.length?(_=null==e?(g=r=i=n=null,tC):to(g=+e[0][0],r=+e[0][1],i=+e[1][0],n=+e[1][1]),w()):null==g?null:[[g,r],[i,n]]},T.scale=function(e){return arguments.length?(s=+e,w()):s},T.translate=function(e){return arguments.length?(l=+e[0],c=+e[1],w()):[l,c]},T.angle=function(r){return arguments.length?(t=b(p=r%360*h),e=m(p),w()):p*u},T.reflectX=function(e){return arguments.length?(d=e?-1:1,w()):d<0},T.reflectY=function(e){return arguments.length?(f=e?-1:1,w()):f<0},T.fitExtent=function(e,t){return rb(T,e,t)},T.fitSize=function(e,t){return r_(T,e,t)},T.fitWidth=function(e,t){return rw(T,e,t)},T.fitHeight=function(e,t){return rT(T,e,t)},T},e.geoInterpolate=function(e,t){var r,i,n=e[0]*h,a=e[1]*h,o=t[0]*h,s=t[1]*h,l=m(a),c=b(a),d=m(s),f=b(s),g=l*m(n),y=l*b(n),v=d*m(o),x=d*b(o),_=2*k(w((r=b((r=s-a)/2))*r+l*d*((i=b((i=o-n)/2))*i))),T=b(_),M=_?function(e){var t=b(e*=_)/T,r=b(_-e)/T,i=r*g+t*v,n=r*y+t*x;return[p(n,i)*u,p(r*c+t*f,w(i*i+n*n))*u]}:function(){return[n*u,a*u]};return M.distance=_,M},e.geoLength=tm,e.geoMercator=function(){return rB(rj).scale(961/c)},e.geoMercatorRaw=rj,e.geoNaturalEarth1=function(){return rE(rY).scale(175.295)},e.geoNaturalEarth1Raw=rY,e.geoOrthographic=function(){return rE(rZ).scale(249.5).clipAngle(90.000001)},e.geoOrthographicRaw=rZ,e.geoPath=function(e,t){var r,i,n=4.5;function a(e){return e&&("function"==typeof n&&i.pointRadius(+n.apply(this,arguments)),I(e,r(i))),i.result()}return a.area=function(e){return I(e,r(tR)),tR.result()},a.measure=function(e){return I(e,r(rd)),rd.result()},a.bounds=function(e){return I(e,r(t$)),t$.result()},a.centroid=function(e){return I(e,r(t4)),t4.result()},a.projection=function(t){return arguments.length?(r=null==t?(e=null,tC):(e=t).stream,a):e},a.context=function(e){return arguments.length?(i=null==e?(t=null,new rm):new ra(t=e),"function"!=typeof n&&i.pointRadius(n),a):t},a.pointRadius=function(e){return arguments.length?(n="function"==typeof e?e:(i.pointRadius(+e),+e),a):n},a.projection(e).context(t)},e.geoProjection=rE,e.geoProjectionMutator=rC,e.geoRotation=e0,e.geoStereographic=function(){return rE(r$).scale(250).clipAngle(142)},e.geoStereographicRaw=r$,e.geoStream=I,e.geoTransform=function(e){return{stream:ry(e)}},e.geoTransverseMercator=function(){var e=rB(rX),t=e.center,r=e.rotate;return e.center=function(e){return arguments.length?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return arguments.length?r([e[0],e[1],e.length>2?e[2]+90:90]):[(e=r())[0],e[1],e[2]-90]},r([0,0,90]).scale(159.155)},e.geoTransverseMercatorRaw=rX,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&"u">typeof t?i(e,p_()):i((r=r||self).d3=r.d3||{},r.d3)}}),pT=p({"src/lib/usa_location_names.js"(e,t){var r={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"};t.exports={usaLocationAbbreviations:new Set(Object.values(r)),usaLocationList:r}}}),pM={};m(pM,{COUNTRIES_X:()=>pk});var pk,pA=f({"src/lib/custom_country_codes.ts"(){pk=[{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:[]}]}}),pS=p({"src/lib/geo_location_utils.js"(e,t){var r=T(),{COUNTRIES:i,createLookup:n}=pg(),{area:a}=px(),{centroid:o}=pb(),{coordAll:s}=pv(),{geoBounds:l}=pw(),c=e1(),u=J(),h=I(),d=D(),f=iu(),{usaLocationAbbreviations:p,usaLocationList:m}=pT(),{COUNTRIES_X:g}=(pA(),v(pM)),{lookupAlpha3:y}=n([...i,...g]),x={"ISO-3":c,"USA-states":function(e){return e=e.trim(),(p.has(e.toUpperCase())?e.toUpperCase():m[e.toLowerCase()])||(u.log("Unrecognized US location: "+e+"."),!1)},"country names":function(e){return y(e)||(u.log("Unrecognized country name: "+e+"."),!1)}};function b(e){for(let t=0;t0&&e[t+1][0]<0)return t;return null}function _(e){var t=e.geojson,r=window.PlotlyGeoAssets||{},i="string"==typeof t?r[t]:t;return h(i)?i:(u.error("Oops ... something went wrong when fetching "+t),!1)}function w(e){try{return s(e)}catch{return[]}}function M(e){if(0===e.length)return null;if(1===e.length){let[t,r]=e[0];return[t,r,t,r]}let[[t,r],[i,n]]=l({type:"MultiPoint",coordinates:e});return[t,r,A([t,i])[1],n]}var k=(e,t)=>"geojson"===t.fitbounds&&"geojson-id"===e.locationmode?w(_(e)):[];function A([e,t]){return[e,e>t?t+360:t]}t.exports={locationToFeature:function(e,t,r){var i;if(!t||"string"!=typeof t)return!1;let n=x[e](t);if(n){let t;if("USA-states"===e)for(let e of(t=[],r))(null==(i=e?.properties)?void 0:i.gu)==="USA"&&t.push(e);else t=r;for(let e of t)if(e.id===n)return e;u.log(`Location with id ${n} does not have a matching topojson feature at this resolution.`)}return!1},feature2polygons:function(e){var t,r,i,n,a=e.geometry,o=a.coordinates,s=e.id,l=[];switch(t="RUS"===s||"FJI"===s?function(e){var t;if(null===b(e))t=e;else for(t=Array(e.length),n=0;nt?r[i++]=[e[n][0]+360,e[n][1]]:n===t?(r[i++]=e[n],r[i++]=[e[n][0],-90]):r[i++]=e[n];var a=f.tester(r);a.pts.pop(),l.push(a)}:function(e){l.push(f.tester(e))},a.type){case"MultiPolygon":for(r=0;rn&&(n=c,t=l)}else t=r;return t&&t.coordinates.some(e=>e.length>0)?o(t).geometry.coordinates:[NaN,NaN]}(c),isNaN(c.properties.ct[0])&&u.log(["Location",i.loc,"has no polygon with positive area. Its centroid could not be computed, so hover and selection will not work for it."].join(" ")),i.fIn=e,i.fOut=c,s.push(c)}else u.log(["Location",i.loc,"does not have a valid GeoJSON geometry. Traces with locationmode *geojson-id* only support *Polygon* and *MultiPolygon* geometries."].join(" "))}delete n[r]}switch(r.type){case"FeatureCollection":var h=r.features;for(i=0;i100?(clearInterval(a),i("Unexpected error while fetching from "+e)):void n++},50)})}(a)):(t[a]="pending",i.push(function(e){return new Promise(function(i,n){r.json(e,function(r,a){return r?(delete t[e],n(Error(404===r.status?'GeoJSON at URL "'+e+'" does not exist.':"Unexpected error while fetching from "+e))):(t[e]=a,i(a))})})}(a))))}return i},boundsOfCoords:M,computeBbox:e=>M(w(e)),coordsOf:w,doesCrossAntiMeridian:b,fitGeojsonBbox:(e,t)=>M(k(e,t)),fitGeojsonCoords:k,unwrapLonRange:A,ANTIMERIDIAN_LON_SHIFT:360}}}),pE=p({"src/traces/scattergeo/style.js"(e,t){var r=T(),i=t9(),n=ee(),a=nr(),o=a.stylePoints,s=a.styleText;t.exports=function(e,t){var a,l,c,u;t&&(a=e,c=(l=t)[0].trace,(u=l[0].node3).style("opacity",l[0].trace.opacity),o(u,c,a),s(u,c,a),u.selectAll("path.js-line").style("fill","none").each(function(e){var t=r.select(this),a=e.trace,o=a.line||{};t.call(n.stroke,o.color).call(i.dashLine,o.dash||"",o.width||0),"none"!==a.fill&&t.call(n.fill,a.fillcolor)}))}}}),pC=p({"src/traces/scattergeo/plot.js"(e,t){var r=T(),i=tv(),n=pp().getTopojsonFeatures,a=pm(),o=pS(),s=ri().findExtremes,l=L().BADNUM,c=i2().calcMarkerSize,u=t5(),h=pE();t.exports={calcGeoJSON:function(e,t){var r,a,u=e[0].trace,h=t[u.geo],d=h._subplot,f=u._length;if(i.isArrayOrTypedArray(u.locations)){var p=u.locationmode,m="geojson-id"===p?o.extractTraceFeature(e):n(u,d.topojson);for(r=0;r")}}(c,m,e,l[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}}}}),pP=p({"src/traces/scattergeo/event_data.js"(e,t){t.exports=function(e,t,r,i,n){e.lon=t.lon,e.lat=t.lat,e.location=t.loc?t.loc:null;var a=i[n];return a.fIn&&a.fIn.properties&&(e.properties=a.fIn.properties),e}}}),pI=p({"src/traces/scattergeo/select.js"(e,t){var r=t5(),i=L().BADNUM;t.exports=function(e,t){var n,a,o,s,l,c=e.cd,u=e.xaxis,h=e.yaxis,d=[],f=c[0].trace;if(!r.hasMarkers(f)&&!r.hasText(f))return[];if(!1===t)for(l=0;lt?1:e>=t?0:NaN}function r(e){var r;return 1===e.length&&(r=e,e=function(e,i){return t(r(e),i)}),{left:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;0>e(t[a],r)?i=a+1:n=a}return i},right:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;e(t[a],r)>0?n=a:i=a+1}return i}}}var i=r(t),n=i.right,a=i.left;function o(e,t){return[e,t]}function s(e){return null===e?NaN:+e}function l(e,t){var r,i,n=e.length,a=0,o=-1,l=0,c=0;if(null==t)for(;++o1)return c/(a-1)}function c(e,t){var r=l(e,t);return r&&Math.sqrt(r)}function u(e,t){var r,i,n,a=e.length,o=-1;if(null==t){for(;++o=r)for(i=n=r;++or&&(i=r),n=r)for(i=n=r;++or&&(i=r),n=0?(a>=y?10:a>=v?5:a>=x?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(a>=y?10:a>=v?5:a>=x?2:1)}function _(e,t,r){var i=Math.abs(t-e)/Math.max(0,r),n=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),a=i/n;return a>=y?n*=10:a>=v?n*=5:a>=x&&(n*=2),t=1)return+r(e[i-1],i-1,e);var i,n=(i-1)*t,a=Math.floor(n),o=+r(e[a],a,e);return o+(r(e[a+1],a+1,e)-o)*(n-a)}}function M(e,t){var r,i,n=e.length,a=-1;if(null==t){for(;++a=r)for(i=r;++ar&&(i=r)}else for(;++a=r)for(i=r;++ar&&(i=r);return i}function k(e){if(!(n=e.length))return[];for(var t=-1,r=M(e,A),i=Array(r);++te?1:t>=e?0:NaN},e.deviation=c,e.extent=u,e.histogram=function(){var e=m,t=u,r=w;function i(i){var a,o,s=i.length,l=Array(s);for(a=0;ah;)d.pop(),--f;var p,m=Array(f+1);for(a=0;a<=f;++a)(p=m[a]=[]).x0=a>0?d[a-1]:u,p.x1=a=r)for(i=r;++ai&&(i=r)}else for(;++a=r)for(i=r;++ai&&(i=r);return i},e.mean=function(e,t){var r,i=e.length,n=i,a=-1,o=0;if(null==t)for(;++a=0;)for(t=(i=e[n]).length;--t>=0;)r[--o]=i[t];return r},e.min=M,e.pairs=function(e,t){null==t&&(t=o);for(var r=0,i=e.length-1,n=e[0],a=Array(i<0?0:i);rr(n=e[a],s)||0!==r(s,s))&&(s=n,o=a);if(0===r(s,s))return o}},e.shuffle=function(e,t,r){for(var i,n,a=(r??e.length)-(t=null==t?0:+t);a;)n=Math.random()*a--|0,i=e[a+t],e[a+t]=e[n+t],e[n+t]=i;return e},e.sum=function(e,t){var r,i=e.length,n=-1,a=0;if(null==t)for(;++n0)return[e];if((i=t0)for(e=Math.ceil(e/o),a=Array(n=Math.ceil((t=Math.floor(t/o))-e+1));++stypeof t?e:e.d3=e.d3||{})}}),pD=p({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(e,t){var r;r=function(e,t,r){var i=Math.abs,n=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,c=Math.log,u=Math.max,h=Math.min,d=Math.pow,f=Math.round,p=Math.sign||function(e){return e>0?1:e<0?-1:0},m=Math.sin,g=Math.tan,y=Math.PI,v=y/2,x=y/4,b=Math.SQRT1_2,_=E(2),w=E(y),T=2*y,M=180/y,k=y/180;function A(e){return e>1?v:e<-1?-v:Math.asin(e)}function S(e){return e>1?0:e<-1?y:Math.acos(e)}function E(e){return e>0?Math.sqrt(e):0}function C(e){return(s(e)-s(-e))/2}function L(e){return(s(e)+s(-e))/2}function P(e){var t=g(e/2),r=2*c(o(e/2))/(t*t);function n(e,t){var i=o(e),n=o(t),a=m(t),s=n*i,l=-((1-s?c((1+s)/2)/(1-s):-.5)+r/(1+s));return[l*n*m(e),l*a]}return n.invert=function(t,n){var s,l=E(t*t+n*n),u=-e/2,h=50;if(!l)return[0,0];do{var d=u/2,f=o(d),p=m(d),g=p/f,y=-c(i(f));u-=s=(2/g*y-r*g-l)/(-y/(p*p)+1-r/(2*f*f))*(f<0?.7:1)}while(i(s)>1e-6&&--h>0);var v=m(u);return[a(t*v,l*o(u)),A(n*v/l)]},n}function I(e,t){var r,i=o(t),n=(r=S(i*o(e/=2)))?r/Math.sin(r):1;return[2*i*m(e)*n,m(t)*n]}function z(e){var t=m(e),r=o(e),n=e>=0?1:-1,s=g(n*e),l=(1+t-r)/2;function c(e,i){var c=o(i),u=o(e/=2);return[(1+c)*m(e),(n*i>-a(u,s)-.001?0:-(10*n))+l+m(i)*r-(1+c)*t*u]}return c.invert=function(e,c){var u=0,h=0,d=50;do{var f=o(u),p=m(u),g=o(h),y=m(h),v=1+g,x=v*p-e,b=l+y*r-v*t*f-c,_=v*f/2,w=-p*y,T=t*v*p/2,M=r*g+t*f*y,k=w*T-M*_,A=(b*w-x*M)/k/2,S=(x*T-b*_)/k;i(S)>2&&(S/=2),u-=A,h-=S}while((i(A)>1e-6||i(S)>1e-6)&&--d>0);return n*h>-a(o(u),s)-.001?[2*u,h]:null},c}function D(e,t){var r=g(t/2),i=E(1-r*r),n=1+i*o(e/=2),a=m(e)*i/n,s=r/n,l=a*a,c=s*s;return[4/3*a*(3+l-3*c),4/3*s*(3+3*l-c)]}I.invert=function(e,t){if(!(e*e+4*t*t>y*y+1e-6)){var r=e,n=t,a=25;do{var s,l=m(r),c=m(r/2),u=o(r/2),h=m(n),d=o(n),f=m(2*n),p=h*h,g=d*d,v=c*c,x=1-g*u*u,b=x?S(d*u)*E(s=1/x):s=0,_=2*b*d*c-e,w=b*h-t,T=s*(g*v+b*d*u*p),M=s*(.5*l*f-2*b*h*c),k=.25*s*(f*c-b*h*g*l),A=s*(p*u+b*v*d),C=M*k-A*T;if(!C)break;var L=(w*M-_*A)/C,P=(_*k-w*T)/C;r-=L,n-=P}while((i(L)>1e-6||i(P)>1e-6)&&--a>0);return[r,n]}},D.invert=function(e,t){if(t*=3/8,!(e*=3/8)&&i(t)>1)return null;var r,n,s=1+e*e+t*t,l=E((s-E(s*s-4*t*t))/2),u=A(l)/3,h=l?c((r=i(t/l))+E(r*r-1))/3:c((n=i(e))+E(n*n+1))/3,d=o(u),f=L(h),g=f*f-d*d;return[2*p(e)*a(C(h)*d,.25-g),2*p(t)*a(f*m(u),.25+g)]};var O=E(8),R=c(1+_);function F(e,t){var r=i(t);return rv){var l=a(s[1],s[0]),c=E(s[0]*s[0]+s[1]*s[1]),u=r*f((l-v)/r)+v,h=a(m(l-=u),2-o(l));l=u+A(y/c*m(h))-h,s[0]=c*o(l),s[1]=c*m(l)}return s}return s.invert=function(e,i){var s=E(e*e+i*i);if(s>v){var l=a(i,e),c=r*f((l-v)/r)+v,u=l>c?-1:1,h=s*o(c-l),d=1/g(u*S((h-y)/E(y*(y-2*h)+s*s)));e=s*o(l=c+2*n((d+u*E(d*d-3))/3)),i=s*m(l)}return t.geoAzimuthalEquidistantRaw.invert(e,i)},s}function B(e,r){if(arguments.length<2&&(r=e),1===r)return t.geoAzimuthalEqualAreaRaw;if(r===1/0)return N;function i(i,n){var a=t.geoAzimuthalEqualAreaRaw(i/r,n);return a[0]*=e,a}return i.invert=function(i,n){var a=t.geoAzimuthalEqualAreaRaw.invert(i/e,n);return a[0]*=r,a},i}function N(e,t){return[e*o(t)/o(t/=2),2*m(t)]}function U(e,t,r){var n,a,o,s=100;r=void 0===r?0:+r,t*=1;do(a=e(r))===(o=e(r+1e-6))&&(o=a+1e-6),r-=n=-1e-6*(a-t)/(a-o);while(s-- >0&&i(n)>1e-6);return s<0?NaN:r}function V(e,t,r){return void 0===t&&(t=40),void 0===r&&(r=1e-12),function(n,a,o,s){var l,c,u;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var h=0;hl){o-=c/=2,s-=u/=2;continue}l=m;var g=(o>0?-1:1)*r,y=(s>0?-1:1)*r,v=e(o+g,s),x=e(o,s+y),b=(v[0]-d[0])/g,_=(v[1]-d[1])/g,w=(x[0]-d[0])/y,T=(x[1]-d[1])/y,M=T*b-_*w,k=(.5>i(M)?.5:1)/M;if(c=(p*w-f*T)*k,u=(f*_-p*b)*k,o+=c,s+=u,i(c)0&&(n[1]*=1+a/1.5*n[0]*n[0]),n}return t.invert=V(t),t}function H(e,t){var r,n=e*m(t),a=30;do t-=r=(t+m(t)-n)/(1+o(t));while(i(r)>1e-6&&--a>0);return t/2}function G(e,t,r){function i(i,n){return[e*i*o(n=H(r,n)),t*m(n)]}return i.invert=function(i,n){return[i/(e*o(n=A(n/t))),A((2*n+m(2*n))/r)]},i}F.invert=function(e,t){if((a=i(t))1e-12&&--u>0);return[e/(o(l)*(O-1/m(l))),p(t)*l]},N.invert=function(e,t){var r=2*A(t/2);return[e*o(r/2)/o(r),r]};var W=G(_/v,_,y);function Y(e,t){var r=H(y,t);return[2.00276*e/(1/o(t)+1.11072/o(r)),(t+_*m(r))/2.00276]}function Z(e){var r=0,i=t.geoProjectionMutator(e),n=i(r);return n.parallel=function(e){return arguments.length?i(r=e*k):r*M},n}function $(e,t){return[e*o(t),t]}function X(e){if(!e)return $;var t=1/g(e);function r(r,i){var n=t+e-i,a=n&&r*o(i)/n;return[n*m(a),t-n*o(a)]}return r.invert=function(r,i){var n=E(r*r+(i=t-i)*i),s=t+e-n;return[n/o(s)*a(r,i),s]},r}function K(e){function t(t,r){var i=v-r,n=i&&t*e*m(i)/i;return[i*m(n)/e,v-i*o(n)]}return t.invert=function(t,r){var i=t*e,n=v-r,o=E(i*i+n*n),s=a(i,n);return[(o?o/m(o):1)*s/e,v-o]},t}Y.invert=function(e,t){var r,n,a=2.00276*t,s=t<0?-x:x,l=25;do n=a-_*m(s),s-=r=(m(2*s)+2*s-y*m(n))/(2*o(2*s)+2+y*o(n)*_*o(s));while(i(r)>1e-6&&--l>0);return[e*(1/o(n=a-_*m(s))+1.11072/o(s))/2.00276,n]},$.invert=function(e,t){return[e/o(t),t]};var J=G(1,4/y,y);function Q(e,t,r,n,s,l){var c,u=o(l);if(i(e)>1||i(l)>1)c=S(r*s+t*n*u);else{var h=m(e/2),d=m(l/2);c=2*A(E(h*h+t*n*d*d))}return i(c)>1e-6?[c,a(n*m(l),t*s-r*n*u)]:[0,0]}function ee(e,t,r){return S((e*e+t*t-r*r)/(2*e*t))}function et(e,t,r){for(var i,n=[[e[0],e[1],m(e[1]),o(e[1])],[t[0],t[1],m(t[1]),o(t[1])],[r[0],r[1],m(r[1]),o(r[1])]],a=n[2],s=0;s<3;++s,a=i)i=n[s],a.v=Q(i[1]-a[1],a[3],a[2],i[3],i[2],i[0]-a[0]),a.point=[0,0];var c=ee(n[0].v[0],n[2].v[0],n[1].v[0]),u=ee(n[0].v[0],n[1].v[0],n[2].v[0]),h=y-c;n[2].point[1]=0,n[0].point[0]=-(n[1].point[0]=n[0].v[0]/2);var d=[n[2].point[0]=n[0].point[0]+n[2].v[0]*o(c),2*(n[0].point[1]=n[1].point[1]=n[2].v[0]*m(c))];return function(e,t){var r,i=m(t),a=o(t),s=[,,,];for(r=0;r<3;++r){var c,f=n[r];if(s[r]=Q(t-f[1],f[3],f[2],a,i,e-f[0]),!s[r][0])return f.point;s[r][1]=(c=s[r][1]-f.v[1])-2*y*l((c+y)/(2*y))}var p=d.slice();for(r=0;r<3;++r){var g=2==r?0:r+1,v=ee(n[r].v[0],s[r][0],s[g][0]);s[r][1]<0&&(v=-v),r?1==r?(v=u-v,p[0]-=s[r][0]*o(v),p[1]-=s[r][0]*m(v)):(v=h-v,p[0]+=s[r][0]*o(v),p[1]+=s[r][0]*m(v)):(p[0]+=s[r][0]*o(v),p[1]-=s[r][0]*m(v))}return p[0]/=3,p[1]/=3,p}}function er(e){return e[0]*=k,e[1]*=k,e}function ei(e,r,i){var n=t.geoCentroid({type:"MultiPoint",coordinates:[e,r,i]}),a=[-n[0],-n[1]],o=t.geoRotation(a),s=et(er(o(e)),er(o(r)),er(o(i)));s.invert=V(s);var l=t.geoProjection(s).rotate(a),c=l.center;return delete l.rotate,l.center=function(e){return arguments.length?c(o(e)):o.invert(c())},l.clipAngle(90)}function en(e,t){var r=E(1-m(t));return[2/w*e*r,w*(1-r)]}function ea(e){var t=g(e);function r(e,r){return[e,(e?e/m(e):1)*(m(r)*o(e)-t*o(r))]}return r.invert=t?function(e,r){e&&(r*=m(e)/e);var i=o(e);return[e,2*a(E(i*i+t*t-r*r)-i,t-r)]}:function(e,t){return[e,A(e?t*g(e)/e:t)]},r}en.invert=function(e,t){var r=(r=t/w-1)*r;return[r>0?e*E(y/r)/2:0,A(1-r)]};var eo=E(3);function es(e,t){return[eo*e*(2*o(2*t/3)-1)/w,eo*w*m(t/3)]}function el(e){var t=o(e);function r(e,r){return[e*t,m(r)/t]}return r.invert=function(e,r){return[e/t,A(r*t)]},r}function ec(e){var t=o(e);function r(e,r){return[e*t,(1+t)*g(r/2)]}return r.invert=function(e,r){return[e/t,2*n(r/(1+t))]},r}function eu(e,t){var r=E(8/(3*y));return[r*e*(1-i(t)/y),r*t]}function eh(e,t){var r=E(4-3*m(i(t)));return[2/E(6*y)*e*r,p(t)*E(2*y/3)*(2-r)]}function ed(e,t){var r=E(y*(4+y));return[2/r*e*(1+E(1-4*t*t/(y*y))),4/r*t]}function ef(e,t){var r=(2+v)*m(t);t/=2;for(var n=0,a=1/0;n<10&&i(a)>1e-6;n++){var s=o(t);t-=a=(t+m(t)*(s+2)-r)/(2*s*(1+s))}return[2/E(y*(4+y))*e*(1+o(t)),2*E(y/(4+y))*m(t)]}function ep(e,t){return[e*(1+o(t))/E(2+y),2*t/E(2+y)]}function em(e,t){for(var r=(1+v)*m(t),n=0,a=1/0;n<10&&i(a)>1e-6;n++)t-=a=(t+m(t)-r)/(1+o(t));return r=E(2+y),[e*(1+o(t))/r,2*t/r]}es.invert=function(e,t){var r=3*A(t/(eo*w));return[w*e/(eo*(2*o(2*r/3)-1)),r]},eu.invert=function(e,t){var r=E(8/(3*y)),n=t/r;return[e/(r*(1-i(n)/y)),n]},eh.invert=function(e,t){var r=2-i(t)/E(2*y/3);return[e*E(6*y)/(2*r),p(t)*A((4-r*r)/3)]},ed.invert=function(e,t){var r=E(y*(4+y))/2;return[e*r/(1+E(1-t*t*(4+y)/(4*y))),t*r/2]},ef.invert=function(e,t){var r=t*E((4+y)/y)/2,i=A(r),n=o(i);return[e/(2/E(y*(4+y))*(1+n)),A((i+r*(n+2))/(2+v))]},ep.invert=function(e,t){var r=E(2+y),i=t*r/2;return[r*e/(1+o(i)),i]},em.invert=function(e,t){var r=1+v,i=E(r/2);return[2*e*i/(1+o(t*=i)),A((t+m(t))/r)]};var eg=3+2*_;function ey(e,t){var r=m(e/=2),i=o(e),a=E(o(t)),s=o(t/=2),l=m(t)/(s+_*i*a),u=E(2/(1+l*l)),h=E((_*s+(i+r)*a)/(_*s+(i-r)*a));return[eg*(u*(h-1/h)-2*c(h)),eg*(u*l*(h+1/h)-2*n(l))]}ey.invert=function(e,t){if(!(r=D.invert(e/1.2,1.065*t)))return null;var r,a=r[0],s=r[1],l=20;e/=eg,t/=eg;do{var d=a/2,f=s/2,p=m(d),g=o(d),y=m(f),x=o(f),w=o(s),T=E(w),M=y/(x+_*g*T),k=M*M,A=E(2/(1+k)),S=(_*x+(g+p)*T)/(_*x+(g-p)*T),C=E(S),L=C-1/C,P=C+1/C,I=A*L-2*c(C)-e,z=A*M*P-2*n(M)-t,O=y&&b*T*p*k/y,R=(_*g*x+T)/(2*(x+_*g*T)*(x+_*g*T)*T),F=-.5*M*A*A*A,j=F*O,B=F*R,N=(N=2*x+_*T*(g-p))*N*C,U=(_*g*x*T+w)/N,V=-(_*p*y)/(T*N),q=L*j-2*U/C+A*(U+U/S),H=L*B-2*V/C+A*(V+V/S),G=M*P*j-2*O/(1+k)+A*P*O+A*M*(U-U/S),W=M*P*B-2*R/(1+k)+A*P*R+A*M*(V-V/S),Y=H*G-W*q;if(!Y)break;var Z=(z*H-I*W)/Y,$=(I*G-z*q)/Y;a-=Z,s=u(-v,h(v,s-$))}while((i(Z)>1e-6||i($)>1e-6)&&--l>0);return 1e-6>i(i(s)-v)?[0,s]:l&&[a,s]};var ev=o(35*k);function ex(e,t){var r=g(t/2);return[e*ev*E(1-r*r),(1+ev)*r]}function eb(e,t){var r=t/2,i=o(r);return[2*e/w*o(t)*i*i,w*g(r)]}function e_(e){var t=1-e,r=n(y,0)[0]-n(-y,0)[0],i=E(2*(n(0,v)[1]-n(0,-v)[1])/r);function n(r,i){var n=o(i),a=m(i);return[n/(t+e*n)*r,t*i+e*a]}function a(e,t){var r=n(e,t);return[r[0]*i,r[1]/i]}function s(e){return a(0,e)[1]}return a.invert=function(r,n){var a=U(s,n);return[r/i*(e+t/o(a)),a]},a}function ew(e){return[e[0]/2,A(g(e[1]/2*k))*M]}function eT(e){return[2*e[0],2*n(m(e[1]*k))*M]}function eM(e,r){var n=2*y/r,s=e*e;function l(r,l){var c=t.geoAzimuthalEquidistantRaw(r,l),u=c[0],h=c[1],d=u*u+h*h;if(d>s){var p=E(d),g=a(h,u),x=n*f(g/n),b=g-x,_=e*o(b),w=(e*m(b)-b*m(_))/(v-_),T=ek(b,w),M=(y-e)/eA(T,_,y);u=p;var k,A=50;do u-=k=(e+eA(T,_,u)*M-p)/(T(u)*M);while(i(k)>1e-6&&--A>0);h=b*m(u),us){var u=E(c),h=a(l,r),d=n*f(h/n),p=h-d;r=u*o(p),l=u*m(p);for(var g=r-v,x=m(r),b=l/x,_=ri(_)||!--w)break;b-=_=(b*x-S*g-l)/(x-2*g*(A*(M+b*T*o(M)-k)-T*(T-b*k))/(A*A))}r=(u=e+eA(C,M,r)*(y-e)/eA(C,M,y))*o(h=d+b),l=u*m(h)}return t.geoAzimuthalEquidistantRaw.invert(r,l)},l}function ek(e,t){return function(r){var i=e*o(r);return r1e-6||i(f)>1e-6)&&--v>0);return[p,g]},u}ex.invert=function(e,t){var r=t/(1+ev);return[e&&e/(ev*E(1-r*r)),2*n(r)]},eb.invert=function(e,t){var r=n(t/w),i=o(r),a=2*r;return[e*w/2/(o(a)*i*i),a]};var eE=eS(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555),eC=eS(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742),eL=eS(5/6*y,-.62636,-.0344,0,1.3493,-.05524,0,.045);function eP(e,t){var r=e*e,i=t*t;return[e*(1-.162388*i)*(.87-952426e-9*r*r),t*(1+i/12)]}eP.invert=function(e,t){var r,n=e,a=t,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-t)/(1+s/4)}while(i(r)>1e-6&&--o>0);o=50,e/=1-.162388*s;do{var l=(l=n*n)*l;n-=r=(n*(.87-952426e-9*l)-e)/(.87-.00476213*l)}while(i(r)>1e-6&&--o>0);return[n,a]};var eI=eS(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function ez(e){var t=e(v,0)[0]-e(-v,0)[0];function r(r,i){var n=r>0?-.5:.5,a=e(r+n*y,i);return a[0]-=n*t,a}return e.invert&&(r.invert=function(r,i){var n=r>0?-.5:.5,a=e.invert(r+n*t,i),o=a[0]-n*y;return o<-y?o+=2*y:o>y&&(o-=2*y),a[0]=o,a}),r}function eD(e,t){var r=p(e),n=p(t),s=o(t),l=o(e)*s,c=m(e)*s,u=m(n*t);e=i(a(c,u)),t=A(l),i(e-v)>1e-6&&(e%=v);var h=function(e,t){if(t===v)return[0,0];var r,n,a=m(t),s=a*a,l=s*s,c=1+l,u=1+3*l,h=1-l,d=A(1/E(c)),f=h+s*c*d,p=(1-a)/f,g=E(p),x=p*c,b=E(x),_=g*h;if(0===e)return[0,-(_+s*b)];var w,T=o(t),M=1/T,k=2*a*T,S=(-f*T-(-3*s+d*u)*k*(1-a))/(f*f),C=s*c*S+p*u*k,L=-M*k,P=-M*C,I=-2*M*(.5*S/g*h-2*s*g*k),z=4*e/y;if(e>.222*y||t.175*y){if(r=(_+s*E(x*(1+l)-_*_))/(1+l),e>y/4)return[r,r];var D=r,O=.5*r;r=.5*(O+D),n=50;do{var R=E(x-r*r),F=r*(I+L*R)+P*A(r/b)-z;if(!F)break;F<0?O=r:D=r,r=.5*(O+D)}while(i(D-O)>1e-6&&--n>0)}else{r=1e-6,n=25;do{var j=r*r,B=E(x-j),N=I+L*B,U=r*N+P*A(r/b)-z,V=N+(P-L*j)/B;r-=w=B?U/V:0}while(i(w)>1e-6&&--n>0)}return[r,-_-s*E(x-r*r)]}(e>y/4?v-e:e,t);return e>y/4&&(u=h[0],h[0]=-h[1],h[1]=-u),h[0]*=r,h[1]*=-n,h}function eO(e,t){if(t<1e-6)return u=m(e),l=o(e),a=t*(e-u*l)/4,[u-a*l,l+a*u,1-t*u*u/2,e-a];if(t>=.999999){var r;return a=(1-t)/4,l=L(e),u=((r=s(2*(r=e)))-1)/(r+1),c=1/l,[u+a*((h=l*C(e))-e)/(l*l),c-a*u*c*(h-e),c+a*u*c*(h+e),2*n(s(e))-v+a*(h-e)/l]}var a,l,c,u,h,d=[1,0,0,0,0,0,0,0,0],f=[E(t),0,0,0,0,0,0,0,0],p=0;for(l=E(1-t),h=1;i(f[p]/d[p])>1e-6&&p<8;)a=d[p++],f[p]=(a-l)/2,d[p]=(a+l)/2,l=E(a*l),h*=2;c=h*d[p]*e;do c=(A(u=f[p]*m(l=c)/d[p])+c)/2;while(--p);return[m(c),u=o(c),u/o(c-l),c]}function eR(e,t){if(!t)return e;if(1===t)return c(g(e/2+x));for(var r=1,a=E(1-t),o=E(t),s=0;i(o)>1e-6;s++){if(e%y){var l=n(a*g(e)/r);l<0&&(l+=y),e+=l+~~(e/y)*y}else e+=e;o=(r+a)/2,a=E(r*a),o=((r=o)-a)/2}return e/(d(2,s)*r)}function eF(e,t){var r,l,u,h,d,f=(_-1)/(_+1),x=E(1-f*f),b=eR(v,x*x),w=s(-1*c(g(y/4+i(t)/2)))/E(f),T=(r=w*o(-1*e),l=w*m(-1*e),u=r*r,h=l+1,[.5*((r>=0?v:-v)-a(d=1-u-l*l,2*r)),-.25*c(d*d+4*u)+.5*c(h*h+u)]),M=function(e,t,r){var a=i(e),o=C(i(t));if(a){var s=1/m(a),l=1/(g(a)*g(a)),c=-(l+o*o*s*s*r-1+r),u=(-c+E(c*c-(r-1)*l*4))/2;return[eR(n(1/E(u)),r)*p(e),eR(n(E((u/l-1)/r)),1-r)*p(t)]}return[0,eR(n(o),1-r)*p(t)]}(T[0],T[1],x*x);return[-M[1],(t>=0?1:-1)*(.5*b-M[0])]}function ej(e){var t=m(e),r=o(e),n=eB(e);function s(e,a){var s=n(e,a);e=s[0];var l=m(a=s[1]),c=o(a),u=o(e),h=S(t*l+r*c*u),d=m(h),f=i(d)>1e-6?h/d:1;return[f*r*m(e),(i(e)>v?f:-f)*(t*c-r*l*u)]}return n.invert=eB(-e),s.invert=function(e,r){var i=E(e*e+r*r),s=-m(i),l=o(i),c=i*l,u=-r*s,h=i*t,d=E(c*c+u*u-h*h),f=a(c*h+u*d,u*h-c*d),p=(i>v?-1:1)*a(e*s,i*o(f)*l+r*m(f)*s);return n.invert(p,f)},s}function eB(e){var t=m(e),r=o(e);return function(e,i){var n=o(i),s=o(e)*n,l=m(e)*n,c=m(i);return[a(l,s*r-c*t),A(c*r+s*t)]}}eD.invert=function(e,t){i(e)>1&&(e=2*p(e)-e),i(t)>1&&(t=2*p(t)-t);var r=p(e),n=p(t),s=-r*e,l=-n*t,c=l/s<1,u=function(e,t){for(var r=0,n=1,a=.5,s=50;;){var l=a*a,c=E(a),u=A(1/E(1+l)),h=1-l+a*(1+l)*u,d=(1-c)/h,f=E(d),p=d*(1+l),m=f*(1-l),g=E(p-e*e),v=t+m+a*g;if(1e-12>i(n-r)||0==--s||0===v)break;v>0?r=a:n=a,a=.5*(r+n)}if(!s)return null;var x=A(c),b=o(x),_=1/b,w=2*c*b,T=(-h*b-(-3*a+u*(1+3*l))*w*(1-c))/(h*h),M=.5*T/f*(1-l)-2*a*f*w,k=-_*(a*(1+l)*T+d*(1+3*l)*w);return[y/4*(e*(-2*_*M+-_*w*g)+k*A(e/E(p))),x]}(c?l:s,c?s:l),h=u[0],d=u[1],f=o(d);return c&&(h=-v-h),[r*(a(m(h)*f,-m(d))+y),n*A(o(h)*f)]},eF.invert=function(e,t){var r,i,o,l,u,h,d,f,p,m=(_-1)/(_+1),g=E(1-m*m),y=(r=.5*eR(v,g*g)-t,i=-e,o=g*g,r?(l=eO(r,o),i?(h=(u=eO(i,1-o))[1]*u[1]+o*l[0]*l[0]*u[0]*u[0],[[l[0]*u[2]/h,l[1]*l[2]*u[0]*u[1]/h],[l[1]*u[1]/h,-l[0]*l[2]*u[0]*u[2]/h],[l[2]*u[1]*u[2]/h,-o*l[0]*l[1]*u[0]/h]]):[[l[0],0],[l[1],0],[l[2],0]]):[[0,(u=eO(i,1-o))[0]/u[1]],[1/u[1],0],[u[2]/u[1],0]]),x=(d=y[0],p=(f=y[1])[0]*f[0]+f[1]*f[1],[(d[0]*f[0]+d[1]*f[1])/p,(d[1]*f[0]-d[0]*f[1])/p]);return[-(a(x[1],x[0])/1),2*n(s(-.5*c(m*x[0]*x[0]+m*x[1]*x[1])))-v]};var eN=A(1-.3333333333333333)*M,eU=el(0);function eV(e){var t=eN*k,r=en(y,t)[0]-en(-y,t)[0],n=eU(0,t)[1],a=en(0,t)[1],o=w-a,s=T/e,c=4/T,d=n+o*o*4/T;function f(f,p){var m,g=i(p);if(g>t){var v=h(e-1,u(0,l((f+y)/s)));f+=y*(e-1)/e-v*s,(m=en(f,g))[0]=m[0]*T/r-T*(e-1)/(2*e)+v*T/e,m[1]=n+(m[1]-a)*4*o/T,p<0&&(m[1]=-m[1])}else m=eU(f,p);return m[0]*=c,m[1]/=d,m}return f.invert=function(t,f){t/=c;var p=i(f*=d);if(p>n){var m=h(e-1,u(0,l((t+y)/s)));t=(t+y*(e-1)/e-m*s)*r/T;var g=en.invert(t,.25*(p-n)*T/o+a);return g[0]-=y*(e-1)/e-m*s,f<0&&(g[1]=-g[1]),g}return eU.invert(t,f)},f}function eq(e,t){return[e,1&t?89.999999:eN]}function eH(e,t){return[e,1&t?-89.999999:-eN]}function eG(e){return[.999999*e[0],e[1]]}function eW(e){var t,r=1+e,n=A(m(1/r)),s=2*E(y/(t=y+4*n*r)),l=.5*s*(r+E(e*(2+e))),c=e*e,u=r*r;function h(h,d){var f,p,g=1-m(d);if(g&&g<2){var x,b=v-d,_=25;do{var w=m(b),T=o(b),M=n+a(w,r-T),k=1+u-2*r*T;b-=x=(b-c*n-r*w+k*M-.5*g*t)/(2*r*w*M)}while(i(x)>1e-12&&--_>0);f=s*E(k),p=h*M/y}else f=s*(e+g),p=h*n/y;return[f*m(p),l-f*o(p)]}return h.invert=function(e,i){var o=e*e+(i-=l)*i,h=(1+u-o/(s*s))/(2*r),d=S(h),f=m(d),p=n+a(f,r-h);return[A(e/E(o))*y/p,A(1-2*(d-c*n-r*f+(1+u-2*r*h)*p)/t)]},h}function eY(e,t){return t>-.7109889596207567?(e=W(e,t),e[1]+=.0528035274542,e):$(e,t)}function eZ(e,t){return i(t)>.7109889596207567?(e=W(e,t),e[1]-=t>0?.0528035274542:-.0528035274542,e):$(e,t)}function e$(e,t,r,i){var n=E(4*y/(2*r+(1+e-t/2)*m(2*r)+(e+t)/2*m(4*r)+t/2*m(6*r))),a=E(i*m(r)*E((1+e*o(2*r)+t*o(4*r))/(1+e+t))),s=r*c(1);function l(r){return E(1+e*o(2*r)+t*o(4*r))}function c(i){var n=i*r;return(2*n+(1+e-t/2)*m(2*n)+(e+t)/2*m(4*n)+t/2*m(6*n))/r}function u(e){return l(e)*m(e)}var h=function(e,t){var i=r*U(c,s*m(t)/r,t/y);isNaN(i)&&(i=r*p(t));var u=n*l(i);return[u*a*e/y*o(i),u/a*m(i)]};return h.invert=function(e,t){var i=U(u,t*a/n);return[e*y/(o(i)*n*a*l(i)),A(r*c(i/r)/s)]},0===r&&(n=E(i/y),(h=function(e,t){return[e*n,m(t)/n]}).invert=function(e,t){return[e/n,A(t*n)]}),h}function eX(e,t,r){function n(r){return e+(1-e)*d(1-d(r,t),1/t)}function a(e){var t,r,i,a,o;return void 0===t&&(t=20),r=n(0),o=(r+4*(i=n(.5*(0+e)))+(a=n(e)))*(e-0)/6,function e(t,r,i,n,a,o,s,l,c,u,h){var d,f,p,m,g,y,v,x,b,_;if(h.nanEncountered)return NaN;if(d=i-r,f=t(r+.25*d),p=t(i-.25*d),isNaN(f)||isNaN(p)){h.nanEncountered=!0;return}return _=((y=(m=d*(n+4*f+a)/12)+(g=d*(a+4*p+o)/12))-s)/15,u>c?(h.maxDepthCount++,y+_):Math.abs(_)e?r=i:t=i,i=t+r>>1;while(i>t);var n=l[i+1]-l[i];return n&&(n=(e-l[i+1])/n),(i+1+n)/1e3}var h=2*u(1)/y*o/r,f=function(e,t){var r=u(i(m(t))),a=n(r)*e;return r/=h,[a,t>=0?r:-r]};return f.invert=function(e,t){var r;return 1>i(t*=h)&&(r=p(t)*A(a(i(t))*o)),[e/n(i(t)),r]},f}function eK(e,t){for(var r,i,n,a=-1,o=e.length,s=e[0],l=[];++aa[o][2][0];++o);var l=e(t-a[o][1][0],r);return l[0]+=e(a[o][1][0],i*r>i*a[o][0][1]?a[o][0][1]:r)[0],l}a?o.invert=a(o):e.invert&&(o.invert=function(t,r){for(var a=l[+(r<0)],s=n[+(r<0)],c=0,u=a.length;ci(d[0]-f[0])&&1e-6>i(d[1]-f[1]))?p:null}}});var s,l,c=t.geoProjection(o),u=c.stream;return c.stream=function(e){var r=c.rotate(),i=u(e),n=(c.rotate([0,0]),u(e));return c.rotate(r),i.sphere=function(){t.geoStream(s,n)},i},c.lobes=function(t){return arguments.length?(s=function(e){var t,i,n,a,o,s,l,c=[],u=e[0].length;for(l=0;l=0;--l)i=(t=e[1][l])[0][0],n=t[0][1],a=t[1][1],o=t[2][0],s=t[2][1],c.push(eK([[o-1e-6,s-1e-6],[o-1e-6,a+1e-6],[i+1e-6,a+1e-6],[i+1e-6,n-1e-6]],30));return{type:"Polygon",coordinates:[r.merge(c)]}}(t),l=(n=t.map(function(e){return e.map(function(e){return[[e[0][0]*k,e[0][1]*k],[e[1][0]*k,e[1][1]*k],[e[2][0]*k,e[2][1]*k]]})})).map(function(t){return t.map(function(t){var r,i=e(t[0][0],t[0][1])[0],n=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[i,a],[n,o]]})}),c):n.map(function(e){return e.map(function(e){return[[e[0][0]*M,e[0][1]*M],[e[1][0]*M,e[1][1]*M],[e[2][0]*M,e[2][1]*M]]})})},null!=n&&c.lobes(n),c}eY.invert=function(e,t){return t>-.7109889596207567?W.invert(e,t-.0528035274542):$.invert(e,t)},eZ.invert=function(e,t){return i(t)>.7109889596207567?W.invert(e,t+(t>0?.0528035274542:-.0528035274542)):$.invert(e,t)};var eQ=[[[[-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]]]],e0=[[[[-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]]]],e1=[[[[-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]]]],e2=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]],e3=[[[[-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]]]],e5=[[[[-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 e4(e,t){return[3/T*e*E(y*y/3-t*t),t]}function e6(e){function t(t,r){if(1e-6>i(i(r)-v))return[0,r<0?-2:2];var n=m(r),a=d((1+n)/(1-n),e/2),s=.5*(a+1/a)+o(t*=e);return[2*m(t)/s,(a-1/a)/s]}return t.invert=function(t,r){var n=i(r);if(1e-6>i(n-2))return t?null:[0,p(r)*v];if(n>2)return null;t/=2,r/=2;var o=t*t,s=r*r,l=2*r/(1+o+s);return l=d((1+l)/(1-l),1/e),[a(2*t,1-o-s)/e,A((l-1)/(l+1))]},t}e4.invert=function(e,t){return[T/3*e/E(y*y/3-t*t),t]};var e8=y/_;function e7(e,t){return[e*(1+E(o(t)))/2,t/(o(t/2)*o(e/6))]}function e9(e,t){var r=e*e,i=t*t;return[e*(.975534+i*(-.119161+-.0143059*r+-.0547009*i)),t*(1.00384+r*(.0802894+-.02855*i+199025e-9*r)+i*(.0998909+-.0491032*i))]}function te(e,t){return[m(e)/o(t),g(t)*o(e)]}function tt(e){var t=o(e),r=g(x+e/2);function n(n,a){var o=a-e,s=1e-6>i(o)?n*t:1e-6>i(s=x+a/2)||1e-6>i(i(s)-v)?0:n*o/c(g(s)/r);return[s,o]}return n.invert=function(n,a){var o,s=a+e;return[1e-6>i(a)?n/t:1e-6>i(o=x+s/2)||1e-6>i(i(o)-v)?0:n*c(g(o)/r)/a,s]},n}function tr(e,t){return[e,1.25*c(g(x+.4*t))]}function ti(e){var t=e.length-1;function r(r,i){for(var n,a=o(i),s=2/(1+a*o(r)),l=s*a*m(r),c=s*m(i),u=t,h=e[u],d=h[0],f=h[1];--u>=0;)d=(h=e[u])[0]+l*(n=d)-c*f,f=h[1]+l*f+c*n;return[d=l*(n=d)-c*f,f=l*f+c*n]}return r.invert=function(r,s){var l=20,c=r,u=s;do{for(var h,d=t,f=e[d],p=f[0],g=f[1],y=0,v=0;--d>=0;)f=e[d],y=p+c*(h=y)-u*v,v=g+c*v+u*h,p=f[0]+c*(h=p)-u*g,g=f[1]+c*g+u*h;y=p+c*(h=y)-u*v,v=g+c*v+u*h,p=c*(h=p)-u*g-r,g=c*g+u*h-s;var x,b,_=y*y+v*v;c-=x=(p*y+g*v)/_,u-=b=(g*y-p*v)/_}while(i(x)+i(b)>1e-6*1e-6&&--l>0);if(l){var w=E(c*c+u*u),T=2*n(.5*w),M=m(T);return[a(c*M,w*o(T)),w?A(u*M/w):0]}},r}e7.invert=function(e,t){var r=i(e),n=i(t),a=1e-6,s=v;ni(M)&&1e-6>i(k))break}return[e<0?-a:a,t<0?-s:s]},e9.invert=function(e,t){var r=p(e)*y,n=t/2,a=50;do{var o=r*r,s=n*n,l=r*n,c=r*(.975534+s*(-.119161+-.0143059*o+-.0547009*s))-e,u=n*(1.00384+o*(.0802894+-.02855*s+199025e-9*o)+s*(.0998909+-.0491032*s))-t,h=.975534-s*(.119161+3*o*.0143059+.0547009*s),d=-l*(.238322+.2188036*s+.0286118*o),f=l*(.1605788+7961e-7*o+-.0571*s),m=1.00384+o*(.0802894+199025e-9*o)+s*(3*(.0998909-.02855*o)-.245516*s),g=d*f-m*h,v=(u*d-c*m)/g,x=(c*f-u*h)/g;r-=v,n-=x}while((i(v)>1e-6||i(x)>1e-6)&&--a>0);return a&&[r,n]},te.invert=function(e,t){var r=e*e,i=t*t+1,n=r+i,a=e?b*E((n-E(n*n-4*r))/r):1/E(i);return[A(e*a),p(t)*S(a)]},tr.invert=function(e,t){return[e,2.5*n(s(.8*t))-.625*y]};var tn=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],ta=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],to=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ts=[[.9245,0],[0,0],[.01943,0]],tl=[[.721316,0],[0,0],[-.00881625,-.00617325]];function tc(e,r){var i=t.geoProjection(ti(e)).rotate(r).clipAngle(90),n=t.geoRotation(r),a=i.center;return delete i.rotate,i.center=function(e){return arguments.length?a(n(e)):n.invert(a())},i}var tu=E(6),th=E(7);function td(e,t){var r=A(7*m(t)/(3*tu));return[tu*e*(2*o(2*r/3)-1)/th,9*m(r/3)/th]}function tf(e,t){for(var r,n=(1+b)*m(t),a=t,s=0;s<25&&(a-=r=(m(a/2)+m(a)-n)/(.5*o(a/2)+o(a)),!(1e-6>i(r)));s++);return[e*(1+2*o(a)/o(a/2))/(3*_),2*E(3)*m(a/2)/E(2+_)]}function tp(e,t){for(var r,n=E(6/(4+y)),a=(1+y/4)*m(t),s=t/2,l=0;l<25&&(s-=r=(s/2+m(s)-a)/(.5+o(s)),!(1e-6>i(r)));l++);return[n*(.5+o(s))*e/1.5,n*s]}function tm(e,t){var r=t*t,i=r*r,n=r*i;return[e*(.84719-.13063*r+n*n*(-.04515+.05494*r-.02326*i+.00331*n)),t*(1.01183+i*i*(-.02625+.01926*r-.00396*i))]}function tg(e,t){return[e*(1+o(t))/2,2*(t-g(t/2))]}td.invert=function(e,t){var r=3*A(t*th/9);return[e*th/(tu*(2*o(2*r/3)-1)),A(3*m(r)*tu/7)]},tf.invert=function(e,t){var r=t*E(2+_)/(2*E(3)),i=2*A(r);return[3*_*e/(1+2*o(i)/o(i/2)),A((r+m(i))/(1+b))]},tp.invert=function(e,t){var r=E(6/(4+y)),n=t/r;return 1e-6>i(i(n)-v)&&(n=n<0?-v:v),[1.5*e/(r*(.5+o(n))),A((n/2+m(n))/(1+y/4))]},tm.invert=function(e,t){var r,n,a,o,s=t,l=25;do a=(n=s*s)*n,s-=r=(s*(1.01183+a*a*(-.02625+.01926*n-.00396*a))-t)/(1.01183+a*a*(-.23625+.21186*n+-.05148*a));while(i(r)>1e-12&&--l>0);return a=(n=s*s)*n,o=n*a,[e/(.84719-.13063*n+o*o*(-.04515+.05494*n-.02326*a+.00331*o)),s]},tg.invert=function(e,t){for(var r=t/2,n=0,a=1/0;n<10&&i(a)>1e-6;++n){var s=o(t/2);t-=a=(t-g(t/2)-r)/(1-.5/(s*s))}return[2*e/(1+o(t)),t]};var ty=[[[[-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 tv(e,t){var r=m(t),n=o(t),a=p(e);if(0===e||i(t)===v)return[0,t];if(0===t)return[e,0];if(i(e)===v)return[e*n,v*r];var s=y/(2*e)-2*e/y,l=2*t/y,c=(1-l*l)/(r-l),u=s*s,h=c*c,d=1+u/h,f=1+h/u,g=(s*r/c-s/2)/d,x=(h*r/u+c/2)/f,b=x*x-(h*r*r/u+c*r-1)/f;return[v*(g+E(g*g+n*n/d)*a),v*(x+E(b<0?0:b)*p(-t*s)*a)]}tv.invert=function(e,t){e/=v,t/=v;var r=e*e,i=r+t*t,n=y*y;return[e?(i-1+E((1-i)*(1-i)+4*r))/(2*e)*v:0,U(function(e){return i*(y*m(e)-2*e)*y+4*e*e*(t-m(e))+2*y*e-n*t},0)]};function tx(e,t){var r=t*t;return[e,t*(1.0148+r*r*(.23185+r*(-.14499+.02406*r)))]}function tb(e,t){if(1e-6>i(t))return[e,0];var r=g(t),n=e*m(t);return[m(n)/r,t+(1-o(n))/r]}function t_(e,t){return[e[0]*t[0]+e[1]*t[3],e[0]*t[1]+e[1]*t[4],e[0]*t[2]+e[1]*t[5]+e[2],e[3]*t[0]+e[4]*t[3],e[3]*t[1]+e[4]*t[4],e[3]*t[2]+e[4]*t[5]+e[5]]}function tw(e,t){return[e[0]-t[0],e[1]-t[1]]}function tT(e){return E(e[0]*e[0]+e[1]*e[1])}function tM(e,r,n){function s(e,t){var i,n=r(e,t),a=n.project([e*M,t*M]);return(i=n.transform)?[i[0]*a[0]+i[1]*a[1]+i[2],-(i[3]*a[0]+i[4]*a[1]+i[5])]:(a[1]=-a[1],a)}!function e(t,r){if(t.edges=function(e){for(var t=e.length,r=[],i=e[t-1],n=0;n=0;)if(i=t[s],r[0]===i[0]&&r[1]===i[1]){if(a)return[a,r];a=r}}}(t.face,r.face),p=(s=f.map(r.project),l=f.map(t.project),i=c=tw(s[1],s[0]),n=u=tw(l[1],l[0]),h=a(i[0]*n[1]-i[1]*n[0],i[0]*n[0]+i[1]*n[1]),d=tT(c)/tT(u),t_([1,0,s[0][0],0,1,s[0][1]],t_([d,0,0,0,d,0],t_([o(h),m(h),0,-m(h),o(h),0],[1,0,-l[0][0],0,1,-l[0][1]]))));t.transform=r.transform?t_(r.transform,p):p;for(var g=r.edges,y=0,v=g.length;y1.790857183?t=1.790857183:t<-1.790857183&&(t=-1.790857183);var r,n=t;do{var a=n*n;n-=r=(n*(1.0148+a*a*(.23185+a*(-.14499+.02406*a)))-t)/(1.0148+a*a*(1.1592500000000001+a*(-1.01493+.21654*a)))}while(i(r)>1e-6);return[e,n]},tb.invert=function(e,t){if(1e-6>i(t))return[e,0];var r,n=e*e+t*t,a=.5*t,s=10;do{var l=g(a),c=1/o(a),u=n-2*t*a+a*a;a-=r=(l*u+2*(a-t))/(2+u*c*c+2*(a-t)*l)}while(i(r)>1e-6&&--s>0);return l=g(a),[(i(t)i^f>i&&r<(d-c)*(i-u)/(f-u)+c&&(n=!n)}return n}(e[0],r))return e.push(t),!0})||e.push([t])}),tj=[],e.length?e.length>1?{type:"MultiPolygon",coordinates:e}:{type:"Polygon",coordinates:e[0]}:null}};function tV(e){var r=e(v,0)[0]-e(-v,0)[0];function n(t,n){var a=i(t)0?t-y:t+y,n),s=(o[0]-o[1])*b,l=(o[0]+o[1])*b;if(a)return[s,l];var c=r*b,u=s>0^l>0?-1:1;return[u*s-p(l)*c,u*l-p(s)*c]}return e.invert&&(n.invert=function(t,n){var a=(t+n)*b,o=(n-t)*b,s=i(a)<.5*r&&i(o)<.5*r;if(!s){var l=r*b,c=a>0^o>0?-1:1,u=-c*t+(o>0?1:-1)*l,h=-c*n+(a>0?1:-1)*l;a=(-u-h)*b,o=(u-h)*b}var d=e.invert(a,o);return s||(d[0]+=a>0?y:-y),d}),t.geoProjection(n).rotate([-90,-90,45]).clipAngle(179.999)}function tq(){return tV(eF).scale(111.48)}function tH(e){var t=m(e);function r(r,i){var a=t?g(r*t/2)/t:r/2;if(!i)return[2*a,-e];var s=2*n(a*m(i)),l=1/g(i);return[m(s)*l,i+(1-o(s))*l-e]}return r.invert=function(r,a){if(1e-6>i(a+=e))return[t?2*n(t*r/2)/t:r,0];var s,l=r*r+a*a,c=0,u=10;do{var h=g(c),d=1/o(c),f=l-2*a*c+c*c;c-=s=(h*f+2*(c-a))/(2+f*d*d+2*(c-a)*h)}while(i(s)>1e-6&&--u>0);var p=r*(h=g(c)),v=g(i(a)0?v:-v)*(d+o*(p-c)/2+o*o*(p-2*d+c)/2)]}function tY(e,t){var r=function(e){function t(t,r){var i=o(r),n=(e-1)/(e-i*o(t));return[n*i*m(t),n*m(r)]}return t.invert=function(t,r){var i=t*t+r*r,n=E(i),o=(e-E(1-i*(e+1)/(e-1)))/((e-1)/n+n/(e-1));return[a(t*o,n*E(1-o*o)),n?A(r*o/n):0]},t}(e);if(!t)return r;var i=o(t),n=m(t);function s(t,a){var o=r(t,a),s=o[1],l=s*n/(e-1)+i;return[o[0]*i/l,s/l]}return s.invert=function(t,a){var o=(e-1)/(e-1-a*n);return r.invert(o*t,o*a*i)},s}tG.forEach(function(e){e[1]*=1.0144}),tW.invert=function(e,t){var r=t/v,n=90*r,a=h(18,i(n/5)),o=u(0,l(a));do{var s=tG[o][1],c=tG[o+1][1],d=tG[h(19,o+2)][1],f=d-s,p=d-2*c+s,m=2*(i(r)-c)/f,g=p/f,y=m*(1-g*m*(1-2*g*m));if(y>=0||1===o){n=(t>=0?5:-5)*(y+a);var x,b=50;do o=l(a=h(18,i(n)/5)),y=a-o,s=tG[o][1],n-=(x=(t>=0?v:-v)*((c=tG[o+1][1])+y*((d=tG[h(19,o+2)][1])-s)/2+y*y*(d-2*c+s)/2)-t)*M;while(i(x)>1e-12&&--b>0);break}}while(--o>=0);var _=tG[o][0],w=tG[o+1][0],T=tG[h(19,o+2)][0];return[e/(w+y*(T-_)/2+y*y*(T-2*w+_)/2),n*k]};function tZ(e){return e.length>0}function t$(e){return -90===e||90===e?[0,e]:[-180,Math.floor(1e4*e)/1e4]}function tX(e){var t=e[0],r=e[1],i=!1;return t<=-179.9999?(t=-180,i=!0):t>=179.9999&&(t=180,i=!0),r<=-89.9999?(r=-90,i=!0):r>=89.9999&&(r=90,i=!0),i?[t,r]:e}function tK(e){return e.map(tX)}function tJ(e,t,r){for(var i=0,n=e.length;i=179.9999||u<=-89.9999||u>=89.9999){a[o]=tX(l);for(var h=o+1;h-179.9999&&f<179.9999&&p>-89.9999&&p<89.9999)break}if(h===o+1)continue;if(o){var m={index:-1,polygon:t,ring:a.slice(0,o+1)};m.ring[m.ring.length-1]=t$(u),r[r.length-1]=m}else r.pop();if(h>=s)break;r.push({index:-1,polygon:t,ring:a=a.slice(h-1)}),a[0]=t$(a[0][1]),o=-1,s=a.length}}}}function tQ(e){var t,r,i,n,a,o,s=e.length,l={},c={};for(t=0;t0?y-l:l)*M],u=t.geoProjection(e(s)).rotate(c),h=t.geoRotation(c),d=u.center;return delete u.rotate,u.center=function(e){return arguments.length?d(h(e)):h.invert(d())},u.clipAngle(90)}function t5(e){var r=o(e);function i(e,i){var n=t.geoGnomonicRaw(e,i);return n[0]*=r,n}return i.invert=function(e,i){return t.geoGnomonicRaw.invert(e/r,i)},i}function t4(e,t){return t3(t5,e,t)}function t6(e){if(!(e*=2))return t.geoAzimuthalEquidistantRaw;var r=-e/2,i=-r,n=e*e,s=g(i),l=.5/m(i);function c(t,a){var s=S(o(a)*o(t-r)),l=S(o(a)*o(t-i)),c=a<0?-1:1;return s*=s,l*=l,[(s-l)/(2*e),c*E(4*n*l-(n-s+l)*(n-s+l))/(2*e)]}return c.invert=function(e,t){var n,c,u=t*t,h=o(E(u+(n=e+r)*n)),d=o(E(u+(n=e+i)*n));return[a(c=h-d,n=(h+d)*s),(t<0?-1:1)*S(E(n*n+c*c)*l)]},c}function t8(e,t){return t3(t6,e,t)}function t7(e,t){if(1e-6>i(t))return[e,0];var r=i(t/v),n=A(r);if(1e-6>i(e)||1e-6>i(i(t)-v))return[0,p(t)*y*g(n/2)];var a=o(n),s=i(y/e-e/y)/2,l=s*s,c=a/(r+a-1),u=c*(2/r-1),h=u*u,d=h+l,f=c-h,m=l+c;return[p(e)*y*(s*f+E(l*f*f-d*(c*c-h)))/d,p(t)*y*(u*m-s*E((l+1)*d-m*m))/d]}function t9(e,t){if(1e-6>i(t))return[e,0];var r=i(t/v),n=A(r);if(1e-6>i(e)||1e-6>i(i(t)-v))return[0,p(t)*y*g(n/2)];var a=o(n),s=i(y/e-e/y)/2,l=s*s,c=a*(E(1+l)-s*a)/(1+l*r*r);return[p(e)*y*c,p(t)*y*E(1-c*(2*s+c))]}function re(e,t){if(1e-6>i(t))return[e,0];var r=t/v,n=A(r);if(1e-6>i(e)||1e-6>i(i(t)-v))return[0,y*g(n/2)];var a=(y/e-e/y)/2,s=r/(1+o(n));return[y*(p(e)*E(a*a+1-s*s)-a),y*s]}function rt(e,t){if(!t)return[e,0];var r=i(t);if(!e||r===v)return[0,t];var n=r/v,a=n*n,o=(8*n-a*(a+2)-5)/(2*a*(n-1)),s=o*o,l=n*o,c=a+s+2*l,u=n+3*o,h=e/v,d=h+1/h,f=p(i(e)-v)*E(d*d-4),m=f*f,g=c*(a+s*m-1)+(1-a)*(a*(u*u+4*s)+12*l*s+4*s*s),y=(f*(c+s-1)+2*E(g))/(4*c+m);return[p(e)*v*y,p(t)*v*E(1+f*i(y)-y*y)]}function rr(e,t,r,i){var n=y/3;e=u(e,1e-6),t=u(t,1e-6),e=h(e,v),t=h(t,y-1e-6),r=h(r=u(r,0),99.999999);var s=(i=u(i,1e-6))/100,l=S((r/100+1)*o(n))/n,c=m(e)/m(l*v),d=t/y,f=E(s*m(e/2)/m(t/2)),p=f/E(d*c*l),x=1/(f*E(d*c*l));function b(e,t){var r=c*m(l*t),i=E(1-r*r),n=E(2/(1+i*o(e*=d)));return[p*i*n*m(e),x*r*n]}return b.invert=function(e,t){var r=e/p,i=t/x,n=E(r*r+i*i),o=2*A(n/2);return[a(e*g(o),p*n)/d,n&&A(t*m(o)/(x*c*n))/l]},b}function ri(){var e=65*k,r=60*k,i=20,n=200,a=t.geoProjectionMutator(rr),o=a(e,r,i,n);return o.poleline=function(t){return arguments.length?a(e=t*k,r,i,n):e*M},o.parallels=function(t){return arguments.length?a(e,r=t*k,i,n):r*M},o.inflation=function(t){return arguments.length?a(e,r,i=+t,n):i},o.ratio=function(t){return arguments.length?a(e,r,i,n=+t):n},o.scale(163.775)}t2.invert=function(e,t){var r=t/1.70711,i=m(x*r);return[e/(.74482-.34588*i*i),2*n(r)]},t7.invert=function(e,t){if(1e-6>i(t))return[e,0];if(1e-6>i(e))return[0,v*m(2*n(t/y))];var r=(e/=y)*e,a=(t/=y)*t,s=r+a,l=s*s,c=-i(t)*(1+s),u=c-2*a+r,h=-2*c+1+2*a+l,d=a/h+(2*u*u*u/(h*h*h)-9*c*u/(h*h))/27,f=(c-u*u/(3*h))/h,g=2*E(-f/3),x=S(3*d/(f*g))/3;return[y*(s-1+E(1+2*(r-a)+l))/(2*e),p(t)*y*(-g*o(x+y/3)-u/(3*h))]},t9.invert=function(e,t){if(!e)return[0,v*m(2*n(t/y))];var r=i(e/y),o=(1-r*r-(t/=y)*t)/(2*r),s=E(o*o+1);return[p(e)*y*(s-o),p(t)*v*m(2*a(E((1-2*o*r)*(o+s)-r),E(s+o+r)))]},re.invert=function(e,t){if(!t)return[e,0];var r=t/y,i=(y*y*(1-r*r)-e*e)/(2*y*e);return[e?y*(p(e)*E(i*i+1)-i):0,v*m(2*n(r))]},rt.invert=function(e,t){if(!e||!t)return[e,t];t/=y;var r,n=p(e)*e/v,a=(n*n-1+4*t*t)/i(n),o=a*a,s=2*t,l=50;do{var c=s*s,u=(8*s-c*(c+2)-5)/(2*c*(s-1)),h=(3*s-c*s-10)/(2*c*s),d=u*u,f=s*u,m=s+u,g=m*m,x=s+3*u,b=g*(c+d*o-1)+(1-c)*(c*(x*x+4*d)+d*(12*f+4*d)),_=-2*m*(4*f*d+(1-4*c+3*c*c)*(1+h)+d*(-6+14*c-o+(-8+8*c-2*o)*h)+f*(-8+12*c+(-10+10*c-o)*h)),w=E(b);s-=r=(a*(g+d-1)+2*w-n*(4*g+o))/(a*(2*u*h+2*m*(1+h))+_/w-8*m*(a*(-1+d+g)+2*w)*(1+h)/(o+4*g))}while(r>1e-6&&--l>0);return[p(e)*(E(a*a+4)+a)*y/4,v*s]};var rn=4*y+3*E(3),ra=2*E(2*y*E(3)/rn),ro=G(ra*E(3)/y,ra,rn/6);function rs(e,t){return[e*E(1-3*t*t/(y*y)),t]}function rl(e,t){var r=o(t),i=o(e)*r,n=1-i,s=o(e=a(m(e)*r,-m(t))),l=m(e);return[l*(r=E(1-i*i))-s*n,-s*r-l*n]}function rc(e,t){var r=I(e,t);return[(r[0]+e/v)/2,(r[1]+t)/2]}rs.invert=function(e,t){return[e/E(1-3*t*t/(y*y)),t]},rl.invert=function(e,t){var r=-((e*e+t*t)/2),i=E(-r*(2+r)),n=t*r+e*i,o=e*r-t*i,s=E(o*o+n*n);return[a(i*n,s*(1+r)),s?-A(i*o/s):0]},rc.invert=function(e,t){var r=e,n=t,a=25;do{var s,l=o(n),c=m(n),u=m(2*n),h=c*c,d=l*l,f=m(r),p=o(r/2),g=m(r/2),y=g*g,x=1-d*p*p,b=x?S(l*p)*E(s=1/x):s=0,_=.5*(2*b*l*g+r/v)-e,w=.5*(b*c+n)-t,T=.5*s*(d*y+b*l*p*h)+.5/v,M=s*(f*u/4-b*c*g),k=.125*s*(u*g-b*c*d*f),A=.5*s*(h*p+b*y*l)+.5,C=M*k-A*T,L=(w*M-_*A)/C,P=(_*k-w*T)/C;r-=L,n-=P}while((i(L)>1e-6||i(P)>1e-6)&&--a>0);return[r,n]},e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=function(){var e=v,r=t.geoProjectionMutator(P),i=r(e);return i.radius=function(t){return arguments.length?r(e=t*k):e*M},i.scale(179.976).clipAngle(147)},e.geoAiryRaw=P,e.geoAitoff=function(){return t.geoProjection(I).scale(152.63)},e.geoAitoffRaw=I,e.geoArmadillo=function(){var e=20*k,r=e>=0?1:-1,i=g(r*e),n=t.geoProjectionMutator(z),s=n(e),l=s.stream;return s.parallel=function(t){return arguments.length?(i=g((r=(e=t*k)>=0?1:-1)*e),n(e)):e*M},s.stream=function(t){var n=s.rotate(),c=l(t),u=(s.rotate([0,0]),l(t)),h=s.precision();return s.rotate(n),c.sphere=function(){u.polygonStart(),u.lineStart();for(var t=-180*r;r*t<180;t+=90*r)u.point(t,90*r);if(e)for(;r*(t-=3*r*h)>=-180;)u.point(t,-(r*a(o(t*k/2),i))*M);u.lineEnd(),u.polygonEnd()},c},s.scale(218.695).center([0,28.0974])},e.geoArmadilloRaw=z,e.geoAugust=function(){return t.geoProjection(D).scale(66.1603)},e.geoAugustRaw=D,e.geoBaker=function(){return t.geoProjection(F).scale(112.314)},e.geoBakerRaw=F,e.geoBerghaus=function(){var e=5,r=t.geoProjectionMutator(j),i=r(e),n=i.stream,s=-o(.01*k),l=m(.01*k);return i.lobes=function(t){return arguments.length?r(e=+t):e},i.stream=function(t){var r=i.rotate(),c=n(t),u=(i.rotate([0,0]),n(t));return i.rotate(r),c.sphere=function(){u.polygonStart(),u.lineStart();for(var t=0,r=360/e,i=2*y/e,n=90-180/e,c=v;t=0;)e.point((t=r[n])[0],t[1]);e.lineEnd(),e.polygonEnd()},e},i.scale(79.4187).parallel(45).clipAngle(179.999)},e.geoHammerRetroazimuthalRaw=ej,e.geoHealpix=function(){var e=4,i=t.geoProjectionMutator(eV),n=i(e),a=n.stream;return n.lobes=function(t){return arguments.length?i(e=+t):e},n.stream=function(i){var o=n.rotate(),s=a(i),l=(n.rotate([0,0]),a(i));return n.rotate(o),s.sphere=function(){var i,n;t.geoStream((i=180/e,n=[].concat(r.range(-180,180+i/2,i).map(eq),r.range(180,-180-i/2,-i).map(eH)),{type:"Polygon",coordinates:[180===i?n.map(eG):n]}),l)},s},n.scale(239.75)},e.geoHealpixRaw=eV,e.geoHill=function(){var e=1,r=t.geoProjectionMutator(eW),i=r(e);return i.ratio=function(t){return arguments.length?r(e=+t):e},i.scale(167.774).center([0,18.67])},e.geoHillRaw=eW,e.geoHomolosine=function(){return t.geoProjection(eZ).scale(152.63)},e.geoHomolosineRaw=eZ,e.geoHufnagel=function(){var e=1,r=0,i=45*k,n=2,a=t.geoProjectionMutator(e$),o=a(e,r,i,n);return o.a=function(t){return arguments.length?a(e=+t,r,i,n):e},o.b=function(t){return arguments.length?a(e,r=+t,i,n):r},o.psiMax=function(t){return arguments.length?a(e,r,i=t*k,n):i*M},o.ratio=function(t){return arguments.length?a(e,r,i,n=+t):n},o.scale(180.739)},e.geoHufnagelRaw=e$,e.geoHyperelliptical=function(){var e=0,r=2.5,i=1.183136,n=t.geoProjectionMutator(eX),a=n(e,r,i);return a.alpha=function(t){return arguments.length?n(e=+t,r,i):e},a.k=function(t){return arguments.length?n(e,r=+t,i):r},a.gamma=function(t){return arguments.length?n(e,r,i=+t):i},a.scale(152.63)},e.geoHyperellipticalRaw=eX,e.geoInterrupt=eJ,e.geoInterruptedBoggs=function(){return eJ(Y,eQ).scale(160.857)},e.geoInterruptedHomolosine=function(){return eJ(eZ,e0).scale(152.63)},e.geoInterruptedMollweide=function(){return eJ(W,e1).scale(169.529)},e.geoInterruptedMollweideHemispheres=function(){return eJ(W,e2).scale(169.529).rotate([20,0])},e.geoInterruptedSinuMollweide=function(){return eJ(eY,e3,V).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},e.geoInterruptedSinusoidal=function(){return eJ($,e5).scale(152.63).rotate([-20,0])},e.geoKavrayskiy7=function(){return t.geoProjection(e4).scale(158.837)},e.geoKavrayskiy7Raw=e4,e.geoLagrange=function(){var e=.5,r=t.geoProjectionMutator(e6),i=r(e);return i.spacing=function(t){return arguments.length?r(e=+t):e},i.scale(124.75)},e.geoLagrangeRaw=e6,e.geoLarrivee=function(){return t.geoProjection(e7).scale(97.2672)},e.geoLarriveeRaw=e7,e.geoLaskowski=function(){return t.geoProjection(e9).scale(139.98)},e.geoLaskowskiRaw=e9,e.geoLittrow=function(){return t.geoProjection(te).scale(144.049).clipAngle(89.999)},e.geoLittrowRaw=te,e.geoLoximuthal=function(){return Z(tt).parallel(40).scale(158.837)},e.geoLoximuthalRaw=tt,e.geoMiller=function(){return t.geoProjection(tr).scale(108.318)},e.geoMillerRaw=tr,e.geoModifiedStereographic=tc,e.geoModifiedStereographicRaw=ti,e.geoModifiedStereographicAlaska=function(){return tc(tn,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},e.geoModifiedStereographicGs48=function(){return tc(ta,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},e.geoModifiedStereographicGs50=function(){return tc(to,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},e.geoModifiedStereographicMiller=function(){return tc(ts,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},e.geoModifiedStereographicLee=function(){return tc(tl,[165,10]).scale(250).clipAngle(130).center([-165,-10])},e.geoMollweide=function(){return t.geoProjection(W).scale(169.529)},e.geoMollweideRaw=W,e.geoMtFlatPolarParabolic=function(){return t.geoProjection(td).scale(164.859)},e.geoMtFlatPolarParabolicRaw=td,e.geoMtFlatPolarQuartic=function(){return t.geoProjection(tf).scale(188.209)},e.geoMtFlatPolarQuarticRaw=tf,e.geoMtFlatPolarSinusoidal=function(){return t.geoProjection(tp).scale(166.518)},e.geoMtFlatPolarSinusoidalRaw=tp,e.geoNaturalEarth2=function(){return t.geoProjection(tm).scale(175.295)},e.geoNaturalEarth2Raw=tm,e.geoNellHammer=function(){return t.geoProjection(tg).scale(152.63)},e.geoNellHammerRaw=tg,e.geoInterruptedQuarticAuthalic=function(){return eJ(B(1/0),ty).rotate([20,0]).scale(152.63)},e.geoNicolosi=function(){return t.geoProjection(tv).scale(127.267)},e.geoNicolosiRaw=tv,e.geoPatterson=function(){return t.geoProjection(tx).scale(139.319)},e.geoPattersonRaw=tx,e.geoPolyconic=function(){return t.geoProjection(tb).scale(103.74)},e.geoPolyconicRaw=tb,e.geoPolyhedral=tM,e.geoPolyhedralButterfly=function(e){e=e||function(e){var r=t.geoCentroid({type:"MultiPoint",coordinates:e});return t.geoGnomonic().scale(1).translate([0,0]).rotate([-r[0],-r[1]])};var r=tS.map(function(t){return{face:t,project:e(t)}});return[-1,0,0,1,0,1,4,5].forEach(function(e,t){var i=r[e];i&&(i.children||(i.children=[])).push(r[t])}),tM(r[0],function(e,t){return r[e<-y/2?t<0?6:4:e<0?2*(t<0):e0?[-r[0],0]:[180-r[0],180])};var r=tS.map(function(t){return{face:t,project:e(t)}});return[-1,0,0,1,0,1,4,5].forEach(function(e,t){var i=r[e];i&&(i.children||(i.children=[])).push(r[t])}),tM(r[0],function(e,t){return r[e<-y/2?t<0?6:4:e<0?2*(t<0):etL(l[0],n)?8+3*s:0>tL(l[1],n)?8+3*s+1:0>tL(l[2],n)?8+3*s+2:s]}).angle(-30).scale(110.625).center([0,45])},e.geoProject=function(e,t){var r,i=t.stream;if(!i)throw Error("invalid projection");switch(e&&e.type){case"Feature":r=tO;break;case"FeatureCollection":r=tD;break;default:r=tR}return r(e,i)},e.geoGringortenQuincuncial=function(){return tV(eD).scale(176.423)},e.geoPeirceQuincuncial=tq,e.geoPierceQuincuncial=tq,e.geoQuantize=function(e,t){if(!(0<=(t*=1)&&t<=20))throw Error("invalid digits");function r(e){var r=e.length,i=2,n=Array(r);for(n[0]=+e[0].toFixed(t),n[1]=+e[1].toFixed(t);i2||a[0]!=t[0]||a[1]!=t[1])&&(i.push(a),t=a)}return 1===i.length&&e.length>1&&i.push(r(e[e.length-1])),i}function n(e){return e.map(i)}function a(e){var t;if(null==e)return e;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(a)};break;case"Point":t={type:"Point",coordinates:r(e.coordinates)};break;case"MultiPoint":t={type:e.type,coordinates:e.coordinates.map(r)};break;case"LineString":t={type:e.type,coordinates:i(e.coordinates)};break;case"MultiLineString":case"Polygon":t={type:e.type,coordinates:n(e.coordinates)};break;case"MultiPolygon":t={type:"MultiPolygon",coordinates:e.coordinates.map(n)};break;default:return e}return null!=e.bbox&&(t.bbox=e.bbox),t}function o(e){var t={type:"Feature",properties:e.properties,geometry:a(e.geometry)};return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),t}if(null!=e)switch(e.type){case"Feature":return o(e);case"FeatureCollection":var s={type:"FeatureCollection",features:e.features.map(o)};return null!=e.bbox&&(s.bbox=e.bbox),s;default:return a(e)}return e},e.geoQuincuncial=tV,e.geoRectangularPolyconic=function(){return Z(tH).scale(131.215)},e.geoRectangularPolyconicRaw=tH,e.geoRobinson=function(){return t.geoProjection(tW).scale(152.63)},e.geoRobinsonRaw=tW,e.geoSatellite=function(){var e=2,r=0,i=t.geoProjectionMutator(tY),n=i(e,r);return n.distance=function(t){return arguments.length?i(e=+t,r):e},n.tilt=function(t){return arguments.length?i(e,r=t*k):r*M},n.scale(432.147).clipAngle(S(1/e)*M-1e-6)},e.geoSatelliteRaw=tY,e.geoSinuMollweide=function(){return t.geoProjection(eY).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},e.geoSinuMollweideRaw=eY,e.geoSinusoidal=function(){return t.geoProjection($).scale(152.63)},e.geoSinusoidalRaw=$,e.geoStitch=function(e){if(null==e)return e;switch(e.type){case"Feature":return t0(e);case"FeatureCollection":var t={type:"FeatureCollection",features:e.features.map(t0)};return null!=e.bbox&&(t.bbox=e.bbox),t;default:return t1(e)}},e.geoTimes=function(){return t.geoProjection(t2).scale(146.153)},e.geoTimesRaw=t2,e.geoTwoPointAzimuthal=t4,e.geoTwoPointAzimuthalRaw=t5,e.geoTwoPointAzimuthalUsa=function(){return t4([-158,21.5],[-77,39]).clipAngle(60).scale(400)},e.geoTwoPointEquidistant=t8,e.geoTwoPointEquidistantRaw=t6,e.geoTwoPointEquidistantUsa=function(){return t8([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},e.geoVanDerGrinten=function(){return t.geoProjection(t7).scale(79.4183)},e.geoVanDerGrintenRaw=t7,e.geoVanDerGrinten2=function(){return t.geoProjection(t9).scale(79.4183)},e.geoVanDerGrinten2Raw=t9,e.geoVanDerGrinten3=function(){return t.geoProjection(re).scale(79.4183)},e.geoVanDerGrinten3Raw=re,e.geoVanDerGrinten4=function(){return t.geoProjection(rt).scale(127.16)},e.geoVanDerGrinten4Raw=rt,e.geoWagner=ri,e.geoWagner7=function(){return ri().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},e.geoWagnerRaw=rr,e.geoWagner4=function(){return t.geoProjection(ro).scale(176.84)},e.geoWagner4Raw=ro,e.geoWagner6=function(){return t.geoProjection(rs).scale(152.63)},e.geoWagner6Raw=rs,e.geoWiechel=function(){return t.geoProjection(rl).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},e.geoWiechelRaw=rl,e.geoWinkel3=function(){return t.geoProjection(rc).scale(158.837)},e.geoWinkel3Raw=rc,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&"u">typeof t?r(e,pw(),pz()):r(e.d3=e.d3||{},e.d3,e.d3)}}),pO=p({"src/plots/geo/zoom.js"(e,t){var r=T(),i=tv(),n=eQ(),a=Math.PI/180,o=180/Math.PI,s={cursor:"pointer"},l={cursor:"auto"};function c(e,t){return r.behavior.zoom().translate(t.translate()).scaleExtent(t.scaleExtent()).scale(t.scale())}function u(e,t,r){var a=e.id,o=e.graphDiv,s=o.layout,l=s[a],c=o._fullLayout,u=c[a],h={},d={};function f(e,t){h[a+"."+e]=i.nestedProperty(l,e).get(),n.call("_storeDirectGUIEdit",s,c._preGUI,h);var r=i.nestedProperty(u,e);r.get()!==t&&(r.set(t),i.nestedProperty(l,e).set(t),d[a+"."+e]=t)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),o.emit("plotly_relayout",d)}function h(e,t){var i=c(e,t);function n(r){var i=t.invert(e.midPt);r("center.lon",i[0]),r("center.lat",i[1])}return i.on("zoomstart",function(){r.select(this).style(s)}).on("zoom",function(){t.scale(r.event.scale).translate(r.event.translate),e.render(!0);var i=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":i[0],"geo.center.lat":i[1]})}).on("zoomend",function(){r.select(this).style(l),u(e,t,n)}),i}function d(e,t){var i,n,a,o,h,d,f,p,m,g=c(e,t);function y(e){return t.invert(e)}function v(r){var i=t.rotate(),n=t.invert(e.midPt);r("projection.rotation.lon",-i[0]),r("center.lon",n[0]),r("center.lat",n[1])}return g.on("zoomstart",function(){r.select(this).style(s);let{x:e,y:l,width:c,height:u}=this.getBBox();i=r.event.sourceEvent?r.mouse(this):[e+c/2,l+u/2],n=t.rotate(),a=t.translate(),o=n,h=y(i)}).on("zoom",function(){let{x:s,y:l,width:c,height:u}=this.getBBox();if(d=r.event.sourceEvent?r.mouse(this):[s+c/2,l+u/2],function(e){var r=y(e);if(!r)return!0;var i=t(r);return Math.abs(i[0]-e[0])>2||Math.abs(i[1]-e[1])>2}(i)){g.scale(t.scale()),g.translate(t.translate());return}t.scale(r.event.scale),t.translate([a[0],r.event.translate[1]]),h?y(d)&&(p=y(d),f=[o[0]+(p[0]-h[0]),n[1],n[2]],t.rotate(f),o=f):h=y(i=d),m=!0,e.render(!0);var v=t.rotate(),x=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":x[0],"geo.center.lat":x[1],"geo.projection.rotation.lon":-v[0]})}).on("zoomend",function(){r.select(this).style(l),m&&u(e,t,v)}),g}function f(e,t){var i,n={r:t.rotate(),k:t.scale()},h=c(e,t),d=function(e){for(var t=0,i=arguments.length,n=[];++t(G=Math.sqrt(j*j+B*B))?(F=(V>0?90:-90)-H,R=0):(F=Math.asin(V/G)*o-H,R=Math.sqrt(G*G-V*V)),W=180-F-2*H,Y=(Math.atan2(q,U)-Math.atan2(N,R))*o,Z=(Math.atan2(q,U)-Math.atan2(N,-R))*o,n.r=m(C[0],C[1],F,Y)<=m(C[0],C[1],W,Z)?[F,Y,C[2]]:[W,Z,C[2]]);isFinite(X[0])&&isFinite(X[1])&&isFinite(X[2])||(X=I),t.rotate(X),I=X}}else i=p(t,L=c);u=d.of(this,arguments),u({type:"zoom"})}),k=d.of(this,arguments),f++||k({type:"zoomstart"})}).on("zoomend",function(){var i;r.select(this).style(l),g.call(h,"zoom",null),i=d.of(this,arguments),--f||i({type:"zoomend"}),u(e,t,x)}).on("zoom.redraw",function(){e.render(!0);var r=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})}),r.rebind(h,d,"on")}function p(e,t){var r,i,n,o,s=e.invert(t);return s&&isFinite(s[0])&&isFinite(s[1])&&(i=(r=s)[0]*a,[(o=Math.cos(n=r[1]*a))*Math.cos(i),o*Math.sin(i),Math.sin(n)])}function m(e,t,r,i){var n=g(r-e),a=g(i-t);return Math.sqrt(n*n+a*a)}function g(e){return(e%360+540)%360-180}function y(e,t,r){var i=r*a,n=e.slice(),o=+(0===t),s=2===t?1:2,l=Math.cos(i),c=Math.sin(i);return n[o]=e[o]*l-e[s]*c,n[s]=e[s]*l+e[o]*c,n}function v(e,t){for(var r=0,i=0,n=e.length;i0&&o._module.calcGeoJSON(a,t)}if(!r){if(this.updateProjection(e,t))return;this.viewInitial&&this.scope===i.scope||this.saveViewInitial(i)}this.scope=i.scope,this.updateBaseLayers(t,i),this.updateDims(t,i),this.updateFx(t,i),f.generalUpdatePerTraceModule(this.graphDiv,this,e,i);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()},L.updateProjection=function(e,t){var r=this.graphDiv,s=t[this.id],c=t._size,u=s.domain,h=s.projection,d=s.lonaxis,f=s.lataxis,p=d._ax,v=f._ax,x=this.projection=function(e){var t=e.projection,r=t.type,s=M.projNames[r];s="geo"+l.titleCase(s);for(var c=i[s]||o[s],u=c(),h=e._isSatellite?180*Math.acos(1/t.distance)/Math.PI:e._isClipped?M.lonaxisSpan[r]/2:null,d=["center","rotate","parallels","clipExtent"],f=function(e){return e?u:[]},p=0;ph*Math.PI/180},u.getPath=function(){return n().projection(u)},u.getBounds=function(e){return u.getPath().bounds(e)},u.precision(M.precision),e._isSatellite&&u.tilt(t.tilt).distance(t.distance),h&&u.clipAngle(h-M.clipPad),u}(s),b=[[c.l+c.w*u.x[0],c.t+c.h*(1-u.y[1])],[c.l+c.w*u.x[1],c.t+c.h*(1-u.y[0])]],_=s.center||{},w=h.rotation||{},T=d.range||[],A=f.range||[];if(s.fitbounds){p._length=b[1][0]-b[0][0],v._length=b[1][1]-b[0][1],p.range=g(r,p),v.range=g(r,v);let i=[];for(let t of e){let e=t[0].trace;!0===e.visible&&e._module.fitCoords&&i.push(e._module.fitCoords(t,s))}let n=m(r,p),a=n.min.reduce((e,{val:t})=>Math.min(e,t),1/0),o=n.max.reduce((e,{val:t})=>Math.max(e,t),-1/0)-a,l=k.boundsOfCoords(i.flat()),[c,,u]=l||[],d=u-c;if(l&&(o>360||o<360&&dMath.max(t,e(r)),0),a=n.max.reduce((e,t)=>Math.max(e,r(t)),0),o=p._length-i-a,s=o>p._length/10?d*p._length/o:d,l=(c+u)/2;p.range=[l-s/2,l+s/2]}var S=(p.range[0]+p.range[1])/2,E=(v.range[0]+v.range[1])/2;if(s._isScoped)_={lon:S,lat:E};else if(s._isClipped){_={lon:S,lat:E},w={lon:S,lat:E,roll:w.roll};var C=h.type,L=M.lonaxisSpan[C]/2||180,I=M.lataxisSpan[C]/2||90;T=[S-L,S+L],A=[E-I,E+I]}else _={lon:S,lat:E},w={lon:S,lat:w.lat,roll:w.roll}}x.center([_.lon-w.lon,_.lat-w.lat]).rotate([-w.lon,-w.lat,w.roll]).parallels(h.parallels);var z=P(T,A);x.fitExtent(b,z);var D=this.bounds=x.getBounds(z),O=this.fitScale=x.scale(),R=x.translate();if(x.scaleExtent=()=>{var e;let{minscale:t}=h,r=null!=(e=h.maxscale)?e:1/0;return[O*Math.min(t,r),O*Math.max(t,r)]},s.fitbounds){var F=x.getBounds(P(p.range,v.range)),j=Math.min((D[1][0]-D[0][0])/(F[1][0]-F[0][0]),(D[1][1]-D[0][1])/(F[1][1]-F[0][1]));isFinite(j)?x.scale(j*O):l.warn("Something went wrong during"+this.id+"fitbounds computations.")}else x.scale(h.scale*O);var B=this.midPt=[(D[0][0]+D[1][0])/2,(D[0][1]+D[1][1])/2];if(x.translate([R[0]+(B[0]-R[0]),R[1]+(B[1]-R[1])]).clipExtent(D),s._isAlbersUsa){var N=x([_.lon,_.lat]);if(N){var U=x.translate();x.translate([U[0]-(N[0]-U[0]),U[1]-(N[1]-U[1])])}}},L.updateBaseLayers=function(e,t){var i=this,n=i.topojson,a=i.layers,o=i.basePaths;function s(e){return"lonaxis"===e||"lataxis"===e}function l(e){return!!M.lineLayers[e]}function c(e){return!!M.fillLayers[e]}var d=(this.hasChoropleth?M.layersForChoropleth:M.layers).filter(function(e){return l(e)||c(e)?t["show"+e]:!s(e)||t[e].showgrid}),f=i.framework.selectAll(".layer").data(d,String);f.exit().each(function(e){delete a[e],delete o[e],r.select(this).remove()}),f.enter().append("g").attr("class",function(e){return"layer "+e}).each(function(e){var t=a[e]=r.select(this);"bg"===e?i.bgRect=t.append("rect").style("pointer-events","all"):s(e)?o[e]=t.append("path").style("fill","none"):"backplot"===e?t.append("g").classed("choroplethlayer",!0):"frontplot"===e?t.append("g").classed("scatterlayer",!0):l(e)?o[e]=t.append("path").style("fill","none").style("stroke-miterlimit",2):c(e)&&(o[e]=t.append("path").style("stroke","none"))}),f.order(),f.each(function(r){var i=o[r],a=M.layerNameToAdjective[r];"frame"===r?i.datum(M.sphereSVG):l(r)||c(r)?i.datum(E(n,n.objects[r])):s(r)&&i.datum(function(e,t,r){var i,n,a,o=t[e],s=M.scopeDefaults[t.scope];"lonaxis"===e?(i=s.lonaxisRange,n=s.lataxisRange,a=function(e,t){return[e,t]}):"lataxis"===e&&(i=s.lataxisRange,n=s.lonaxisRange,a=function(e,t){return[t,e]});var l={type:"linear",range:[i[0],i[1]-1e-6],tick0:o.tick0,dtick:o.dtick};p.setConvert(l,r);var c=p.calcTicks(l);t.isScoped||"lonaxis"!==e||c.pop();for(var u=c.length,h=Array(u),d=0;dn)&&e.event(a)}a.on("dblclick.zoom",function(){var e=i.viewInitial,t={};for(var r in e)t[i.id+"."+r]=e[r];s.call("_guiRelayout",n,t),n.emit("plotly_doubleclick",null)}),n._context._scrollZoom.geo||a.on("wheel.zoom",null)}else("select"===o||"lasso"===o)&&(a.on(".zoom",null),u.prepFn=function(e,t,r){x(e,t,r,u,o)},v.init(u));a.on("mousemove",function(){var e=i.projection.invert(l.getPositionFromD3Event());if(!e)return v.unhover(n,r.event);i.xaxis.p2c=function(){return e[0]},i.yaxis.p2c=function(){return e[1]},d.hover(n,r.event,i.id)}),a.on("mouseout",function(){n._dragging||v.unhover(n,r.event)}),a.on("click",function(){"select"!==o&&"lasso"!==o&&(c.indexOf("select")>-1&&_(r.event,n,[i.xaxis],[i.yaxis],i.id,u),c.indexOf("event")>-1&&d.click(n,r.event))})}function h(e){return i.projection.invert([e[0]+i.xaxis._offset,e[1]+i.yaxis._offset])}},L.makeFramework=function(){var e=this,t=e.graphDiv,i=t._fullLayout,n="clip"+i._uid+e.id;e.clipDef=i._clips.append("clipPath").attr("id",n),e.clipRect=e.clipDef.append("rect"),e.framework=r.select(e.container).append("g").attr("class","geo "+e.id).call(h.setClipUrl,n,t),e.project=function(t){var r=e.projection(t);return r?[r[0]-e.xaxis._offset,r[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(t){return e.project(t)[0]}},e.yaxis={_id:"y",c2p:function(t){return e.project(t)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(e.mockAxis,i)},L.saveViewInitial=function(e){var t,r=e.center||{},i=e.projection,n=i.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":i.scale},t=e._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:e._isClipped?{"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat,"center.lon":r.lon,"center.lat":r.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":n.lon},l.extendFlat(this.viewInitial,t)},L.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},L._render=function(){var e,t=this.projection,r=t.getPath();function i(e){var r=t(e.lonlat);return r?c(r[0],r[1]):null}function n(e){return t.isLonLatOverEdges(e.lonlat)?"none":null}for(e in this.basePaths)this.basePaths[e].attr("d",r);for(e in this.dataPaths)this.dataPaths[e].attr("d",function(e){return r(e.geojson)});for(e in this.dataPoints)this.dataPoints[e].attr("display",n).attr("transform",i)}}}),pF=p({"src/plots/geo/layout_attributes.js"(e,t){var r=Q(),i=at().attributes,n=eH().dash,a=pd(),o=eq().overrideAll,s=(e6(),v(e3)).default,l={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:r.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:n};(t.exports=o({domain:i({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:"locations",editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:s(a.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:s(a.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1},minscale:{valType:"number",min:0,dflt:0},maxscale:{valType:"number",min:0,dflt:null}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:r.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:a.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:a.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:a.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:a.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:r.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:r.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:r.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:r.background},lonaxis:l,lataxis:l},"plot","from-root")).uirevision={valType:"any",editType:"none"}}}),pj=p({"src/plots/geo/layout_defaults.js"(e,t){var r=tv(),i=o9(),n=tI().getSubplotData,{unwrapLonRange:a}=pS(),o=pd(),s=pF(),l=o.axesNames;function c(e,t,i,s){var c,u,h=n(s.fullData,"geo",s.id).map(function(e){return e.index}),d=i("resolution"),f=i("scope"),p=o.scopeDefaults[f],m=i("projection.type",p.projType),g=t._isAlbersUsa="albers usa"===m;g&&(f=t.scope="usa");var y=t._isScoped="world"!==f,v=t._isSatellite="satellite"===m,x=t._isConic=-1!==m.indexOf("conic")||"albers"===m,b=t._isClipped=!!o.lonaxisSpan[m];if(!1===e.visible){var _=r.extendDeep({},t._template);_.showcoastlines=!1,_.showcountries=!1,_.showframe=!1,_.showlakes=!1,_.showland=!1,_.showocean=!1,_.showrivers=!1,_.showsubunits=!1,_.lonaxis&&(_.lonaxis.showgrid=!1),_.lataxis&&(_.lataxis.showgrid=!1),t._template=_}for(var w,T=i("visible"),M=0;Mnull!=e[t])||o.fitboundsIncompatible.has(m)?t.fitbounds=!1:l.forEach(({dst:e,key:t})=>e&&(e[t]=null))}}t.exports=function(e,t,r){i(e,t,r,{type:"geo",attributes:s,handleDefaults:c,fullData:r,partition:"y"})}}}),pB=p({"src/plots/geo/index.js"(e,t){var r=tI().getSubplotCalcData,i=tv().counterRegex,n=pR(),a=i("geo"),o={};o.geo={valType:"subplotid",dflt:"geo",editType:"calc"},t.exports={attr:"geo",name:"geo",idRoot:"geo",idRegex:a,attrRegex:a,attributes:o,layoutAttributes:pF(),supplyLayoutDefaults:pj(),plot:function(e){for(var t=e._fullLayout,i=e.calcdata,a=t._subplots.geo,o=0;o")}}(e,d,s),[e]}}}),pZ=p({"src/traces/choropleth/event_data.js"(e,t){t.exports=function(e,t,r,i,n){e.location=t.location,e.z=t.z;var a=i[n];return a.fIn&&a.fIn.properties&&(e.properties=a.fIn.properties),e.ct=a.ct,e}}}),p$=p({"src/traces/choropleth/select.js"(e,t){t.exports=function(e,t){var r,i,n,a,o,s=e.cd,l=e.xaxis,c=e.yaxis,u=[];if(!1===t)for(r=0;r=Math.min(I,z)&&f<=Math.max(I,z)?0:1/0}if(k=Math.min(D,O)&&p<=Math.max(D,O)?0:1/0}E=Math.sqrt(k*k+A*A),_=n[M]}}}else for(M=n.length-1;M>-1;M--)w=h[b=n[M]],T=d[b],(S=Math.sqrt((k=c.c2p(w)-f)*k+(A=u.c2p(T)-p)*A))100},e.isDotSymbol=function(e){return"string"==typeof e?t.DOT_RE.test(e):e>200}}}),p2=p({"src/traces/scattergl/defaults.js"(e,t){var r=tv(),i=eQ(),n=p1(),a=p0(),o=iy(),s=t5(),l=iN(),c=iU(),u=iq(),h=iH(),d=iY(),f=iW();t.exports=function(e,t,p,m){function g(i,n){return r.coerce(e,t,a,i,n)}var y=!!e.marker&&n.isOpenSymbol(e.marker.symbol),v=s.isBubble(e),x=l(e,t,m,g);if(!x){t.visible=!1;return}c(e,t,m,g),g("xhoverformat"),g("yhoverformat");var b=x>>1,s=e[o];(void 0!==r?r(s,t):s-t)>=0?(a=o,n=o-1):i=o+1}return a}function i(e,t,r,i,n){for(var a=n+1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>0?(a=o,n=o-1):i=o+1}return a}function n(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<0?(a=o,i=o+1):n=o-1}return a}function a(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<=0?(a=o,i=o+1):n=o-1}return a}function o(e,t,r,i,n){for(;i<=n;){var a=i+n>>>1,o=e[a],s=void 0!==r?r(o,t):o-t;if(0===s)return a;s<=0?i=a+1:n=a-1}return -1}function s(e,t,r,i,n,a){return"function"==typeof r?a(e,t,r,void 0===i?0:0|i,void 0===n?e.length-1:0|n):a(e,t,void 0,void 0===r?0:0|r,void 0===i?e.length-1:0|i)}t.exports={ge:function(e,t,i,n,a){return s(e,t,i,n,a,r)},gt:function(e,t,r,n,a){return s(e,t,r,n,a,i)},lt:function(e,t,r,i,a){return s(e,t,r,i,a,n)},le:function(e,t,r,i,n){return s(e,t,r,i,n,a)},eq:function(e,t,r,i,n){return s(e,t,r,i,n,o)}}}}),p4=p({"node_modules/clamp/index.js"(e,t){t.exports=function(e,t,r){return tr?r:e:et?t:e}}}),p6=p({"node_modules/pick-by-alias/index.js"(e,t){t.exports=function(e,t,r){var n,a,o={};if("string"==typeof t&&(t=i(t)),Array.isArray(t)){var s={};for(a=0;a1&&(e=arguments),"string"==typeof e?e=e.split(/\s/).map(parseFloat):"number"==typeof e&&(e=[e]),e.length&&"number"==typeof e[0]?t=1===e.length?{width:e[0],height:e[0],x:0,y:0}:2===e.length?{width:e[0],height:e[1],x:0,y:0}:{x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(t={x:(e=r(e,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"})).left||0,y:e.top||0},null==e.width?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,null==e.height?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}}}),p7=p({"node_modules/array-bounds/index.js"(e,t){t.exports=function(e,t){if(!e||null==e.length)throw Error("Argument should be an array");t=null==t?1:Math.floor(t);for(var r=Array(2*t),i=0;in&&(n=e[o]),e[o]typeof arguments[e])return arguments[e]}}}),me=p({"node_modules/dtype/index.js"(e,t){t.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}}}),mt=p({"node_modules/flatten-vertex-data/index.js"(e,t){var r=me();t.exports=function(e,t,i){if(!e)throw TypeError("must specify data as first parameter");if(i=0|(i||0),Array.isArray(e)&&e[0]&&"number"==typeof e[0][0]){var n,a,o,s,l=e[0].length,c=e.length*l;t&&"string"!=typeof t||(t=new(r(t||"float32"))(c+i));var u=t.length-i;if(c!==u)throw Error("source length "+c+" ("+l+"x"+e.length+") does not match destination length "+u);for(n=0,o=i;n>>1,g;t.dtype||(t.dtype="array"),"string"==typeof t.dtype?g=new(u(t.dtype))(m):t.dtype&&Array.isArray(g=t.dtype)&&(g.length=m);for(let e=0;ei||s>0x40000000){for(let e=0;ec||_>h||T=k||o===s)return;let d=y[a];void 0===s&&(s=d.length);for(let t=o;t=l&&i<=p&&n>=u&&n<=m&&A.push(r)}let f=v[a],x=f[4*o+0],b=f[4*o+1],w=f[4*o+2],S=f[4*o+3],E=function(e,t){let r=null,i=0;for(;null===r;)if(r=e[4*t+i],++i>e.length)return null;return r}(f,o+1),C=.5*n,L=a+1;t(r,i,C,L,x,b||w||S||E),t(r,i+C,C,L,b,w||S||E),t(r+C,i,C,L,w,S||E),t(r+C,i+C,C,L,S,E)}(0,0,1,0,0,1),A},g;function w(e,t,r){let i=1,n=.5,a=.5,o=.5;for(let s=0;s2&&(t.push([i].concat(a.splice(0,2))),s="l",i="m"==i?"l":"L");;){if(a.length==r[s])return a.unshift(i),t.push(a);if(a.length1&&(n=1),n<-1&&(n=-1),(e*i-t*r<0?-1:1)*Math.acos(n)},s=function(e,t,r,n,a,s,l,c,u,h,d,f){var p=Math.pow(a,2),m=Math.pow(s,2),g=Math.pow(d,2),y=Math.pow(f,2),v=p*m-p*y-m*g;v<0&&(v=0),v/=p*y+m*g;var x=(v=Math.sqrt(v)*(l===c?-1:1))*a/s*f,b=-(v*s)/a*d,_=(d-x)/a,w=(f-b)/s,T=o(1,0,_,w),M=o(_,w,(-d-x)/a,(-f-b)/s);return 0===c&&M>0&&(M-=i),1===c&&M<0&&(M+=i),[h*x-u*b+(e+r)/2,u*x+h*b+(t+n)/2,T,M]};e.default=function(e){var t=e.px,o=e.py,l=e.cx,c=e.cy,u=e.rx,h=e.ry,d=e.xAxisRotation,f=void 0===d?0:d,p=e.largeArcFlag,m=e.sweepFlag,g=[];if(0===u||0===h)return[];var y=Math.sin(f*i/360),v=Math.cos(f*i/360),x=v*(t-l)/2+y*(o-c)/2,b=-y*(t-l)/2+v*(o-c)/2;if(0===x&&0===b)return[];var _=Math.pow(x,2)/Math.pow(u=Math.abs(u),2)+Math.pow(b,2)/Math.pow(h=Math.abs(h),2);_>1&&(u*=Math.sqrt(_),h*=Math.sqrt(_));var w=r(s(t,o,l,c,u,h,void 0===p?0:p,void 0===m?0:m,y,v,x,b),4),T=w[0],M=w[1],k=w[2],A=w[3],S=Math.abs(A)/(i/4);1e-7>Math.abs(1-S)&&(S=1);var E=Math.max(Math.ceil(S),1);A/=E;for(var C=0;C4?(o=g[g.length-4],s=g[g.length-3]):(o=d,s=f),a.push(g)}return a};var r=ml();function i(e,t,r,i){return["C",e,t,r,i,r,i]}function n(e,t,r,i,n,a){return["C",e/3+2/3*r,t/3+2/3*i,n/3+2/3*r,a/3+2/3*i,n,a]}}}),mu=p({"node_modules/is-svg-path/index.js"(e,t){t.exports=function(e){return"string"==typeof e&&(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}}}),mh=p({"node_modules/svg-path-bounds/index.js"(e,t){var r=mo(),i=ms(),n=mc(),a=mu();t.exports=function(e){if(Array.isArray(e)&&1===e.length&&"string"==typeof e[0]&&(e=e[0]),"string"==typeof e){if(!a(e))throw Error("String is not an SVG path.");e=r(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(!(e=n(e=i(e))).length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],o=0,s=e.length;ot[2]&&(t[2]=l[c+0]),l[c+1]>t[3]&&(t[3]=l[c+1]);return t}}}),md=p({"node_modules/bitmap-sdf/index.js"(e,t){function r(e,t,r,n,a,o,s){for(var l=0;l0?"white":"black",mx.lineWidth=Math.abs(a)),mx.translate(.5*r,.5*i),mx.scale(l,l);let c=new Path2D(e);return mx.fill(c),a&&mx.stroke(c),mx.setTransform(1,0,0,1,0,0),(0,my.default)(mx,{cutoff:null!=t.cutoff?t.cutoff:.5,radius:null!=t.radius?t.radius:.5*n})}m(mf,{default:()=>mp});var mm,mg,my,mv,mx,mb=f({"node_modules/svg-path-sdf/svg-path-sdf.js"(){mm=y(mh()),mg=y(mu()),my=y(md()),mx=(mv=document.createElement("canvas")).getContext("2d",{willReadFrequently:!0})}}),m_=p({"src/traces/scattergl/convert.js"(e,t){var r=C(),i=(mb(),v(mf)).default,{normalize:n}=ee(),a=eQ(),o=tv(),s=o.isArrayOrTypedArray,l=t9(),c=tC(),u=ff().formatColor,h=t5(),d=t4(),f=p1(),p=pQ(),m=er().DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},y=t6().appendArrayPointValue;function x(e,t){var i,n=e._fullLayout,a=t._length,l=t.textfont,c=t.textposition,u=s(c)?c:[c],h=l.color,d=l.size,f=l.family,p=l.weight,m=l.style,g=l.variant,v={},x=e._context.plotGlPixelRatio,_=t.texttemplate;if(_){v.text=[];var w=n._d3locale,T=Array.isArray(_),M=T?Math.min(_.length,a):a,k=T?function(e){return _[e]}:function(){return _};for(i=0;i500?"bold":"normal":e}function _(e,t){var r,i,a=t._length,o=t.marker,l={},c=s(o.symbol),h=s(o.angle),p=s(o.color),m=s(o.line.color),g=s(o.opacity),y=s(o.size),v=s(o.line.width);if(c||(i=f.isOpenSymbol(o.symbol)),c||p||m||g||h){l.symbols=Array(a),l.angles=Array(a),l.colors=Array(a),l.borderColors=Array(a);var x=o.symbol,b=o.angle,_=u(o,o.opacity,a),w=u(o.line,o.opacity,a);if(!s(w[0])){var T=w;for(w=Array(a),r=0;rp.TOO_MANY_POINTS||h.hasMarkers(t)?"rect":"round";if(c&&t.connectgaps){var d=i[0],f=i[1];for(n=0;n1?c[n]:c[0]:c,m=s(u)?u.length>1?u[n]:u[0]:u,y=g[p],v=g[m],x=d?d/.8+1:0,b=-v*x-.5*v;o.offset[n]=[y*x/f,b/f]}}return o}}}}),mw=p({"src/traces/scattergl/scene_update.js"(e,t){var r=tv();t.exports=function(e,t){var i=t._scene,n={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return t._scene||((i=t._scene={}).init=function(){r.extendFlat(i,a,n)},i.init(),i.update=function(e){var t=r.repeat(e,i.count);if(i.fill2d&&i.fill2d.update(t),i.scatter2d&&i.scatter2d.update(t),i.line2d&&i.line2d.update(t),i.error2d&&i.error2d.update(t.concat(t)),i.select2d&&i.select2d.update(t),i.glText)for(var n=0;n=m,T=2*_,M={},k=v.makeCalcdata(t,"x"),A=x.makeCalcdata(t,"y"),S=o(t,v,"x",k),E=o(t,x,"y",A),C=S.vals,L=E.vals;t._x=C,t._y=L,t.xperiodalignment&&(t._origX=k,t._xStarts=S.starts,t._xEnds=S.ends),t.yperiodalignment&&(t._origY=A,t._yStarts=E.starts,t._yEnds=E.ends);var P=Array(T),I=Array(_);for(s=0;s<_;s++)P[2*s]=C[s]===p?NaN:C[s],P[2*s+1]=L[s]===p?NaN:L[s],I[s]=s;if("log"===v.type)for(s=0;s1&&i.extendFlat(o.line,d.linePositions(e,t,r)),o.errorX||o.errorY){var s=d.errorBarPositions(e,t,r,n,a);o.errorX&&i.extendFlat(o.errorX,s.x),o.errorY&&i.extendFlat(o.errorY,s.y)}return o.text&&(i.extendFlat(o.text,{positions:r},d.textPosition(e,t,o.text,o.marker)),i.extendFlat(o.textSel,{positions:r},d.textPosition(e,t,o.text,o.markerSel)),i.extendFlat(o.textUnsel,{positions:r},d.textPosition(e,t,o.text,o.markerUnsel))),o}(e,t,P,C,L),D=f(e,b);return u(y,t),w?z.marker&&(a=z.marker.sizeAvg||Math.max(z.marker.size,3)):a=l(t,_),c(e,t,v,x,C,L,a),z.errorX&&g(t,v,z.errorX),z.errorY&&g(t,x,z.errorY),z.fill&&!D.fill2d&&(D.fill2d=!0),z.marker&&!D.scatter2d&&(D.scatter2d=!0),z.line&&!D.line2d&&(D.line2d=!0),(z.errorX||z.errorY)&&!D.error2d&&(D.error2d=!0),z.text&&!D.glText&&(D.glText=!0),z.marker&&(z.marker.snap=_),D.lineOptions.push(z.line),D.errorXOptions.push(z.errorX),D.errorYOptions.push(z.errorY),D.fillOptions.push(z.fill),D.markerOptions.push(z.marker),D.markerSelectedOptions.push(z.markerSel),D.markerUnselectedOptions.push(z.markerUnsel),D.textOptions.push(z.text),D.textSelectedOptions.push(z.textSel),D.textUnselectedOptions.push(z.textUnsel),D.selectBatch.push([]),D.unselectBatch.push([]),M._scene=D,M.index=D.count,M.x=C,M.y=L,M.positions=P,D.count++,[{x:!1,y:!1,t:M,trace:t}]}}}),mM=p({"src/traces/scattergl/edit_style.js"(e,t){var r=tv(),i=ee(),n=er().DESELECTDIM;t.exports={styleTextSelection:function(e){var t,a,o=e[0],s=o.trace,l=o.t,c=l._scene,u=l.index,h=c.selectBatch[u],d=c.unselectBatch[u],f=c.textOptions[u],p=c.textSelectedOptions[u]||{},m=c.textUnselectedOptions[u]||{},g=r.extendFlat({},f);if(h.length||d.length){var y=p.color,v=m.color,x=f.color,b=r.isArrayOrTypedArray(x);for(g.color=Array(s._length),t=0;t10&&/[0-9](?:\s|\/)/.test(e)&&(a=e.match(/([0-9]+)/g).map(function(e){return parseFloat(e)}),n=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(a=[e[0],e[1],e[2]],n="rgb",o=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(n="rgb",a=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(n="hsl",a=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),o=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(o/=100)):(n="rgb",a=[e>>>16,(65280&e)>>>8,255&e]);return{space:n,values:a,alpha:o}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),mC=p({"node_modules/color-rgba/index.js"(e,t){var r=mE();t.exports=function(e){Array.isArray(e)&&e.raw&&(e=String.raw.apply(null,arguments));var t,i=r(e);if(!i.space)return[];var n="h"===i.space[0]?[360,100,100]:[255,255,255];return(t=[,,,])[0]=Math.min(Math.max(i.values[0],0),n[0]),t[1]=Math.min(Math.max(i.values[1],0),n[1]),t[2]=Math.min(Math.max(i.values[2],0),n[2]),"h"===i.space[0]&&(t=function(e){var t,r,i,n,a,o=e[0]/360,s=e[1]/100,l=e[2]/100,c=0;if(0===s)return[a=255*l,a,a];for(r=l<.5?l*(1+s):l+s-l*s,t=2*l-r,n=[0,0,0];c<3;)(i=o+-(1/3*(c-1)))<0?i++:i>1&&i--,a=6*i<1?t+(r-t)*6*i:2*i<1?r:3*i<2?t+(r-t)*(2/3-i)*6:t,n[c++]=255*a;return n}(t)),t.push(Math.min(Math.max(i.alpha,0),1)),t}}}),mL=p({"node_modules/color-normalize/index.js"(e,t){var r=mC(),i=me();t.exports=function(e,t){"float"!==t&&t||(t="array"),"uint"===t&&(t="uint8"),"uint_clamped"===t&&(t="uint8_clamped");var n,a=new(i(t))(4),o="uint8"!==t&&"uint8_clamped"!==t;return e.length&&"string"!=typeof e||(e=r(e),e[0]/=255,e[1]/=255,e[2]/=255),(n=e)instanceof Uint8Array||n instanceof Uint8ClampedArray||Array.isArray(n)&&(n[0]>1||0===n[0])&&(n[1]>1||0===n[1])&&(n[2]>1||0===n[2])&&(!n[3]||n[3]>1)?(a[0]=e[0],a[1]=e[1],a[2]=e[2],a[3]=null!=e[3]?e[3]:255,o&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255)):o?(a[0]=e[0],a[1]=e[1],a[2]=e[2],a[3]=null!=e[3]?e[3]:1):(a[0]=Math.min(Math.max(Math.floor(255*e[0]),0),255),a[1]=Math.min(Math.max(Math.floor(255*e[1]),0),255),a[2]=Math.min(Math.max(Math.floor(255*e[2]),0),255),a[3]=null==e[3]?255:Math.min(Math.max(Math.floor(255*e[3]),0),255)),a}}}),mP=p({"node_modules/color-id/index.js"(e,t){var r=p4();function i(e,t){null==t&&(t=!0);var i=e[0],n=e[1],a=e[2],o=e[3];return null==o&&(o=t?1:255),t&&(i*=255,n*=255,a*=255,o*=255),i=255&r(i,0,255),n=255&r(n,0,255),0x1000000*i+(n<<16)+((a=255&r(a,0,255))<<8)+(o=255&r(o,0,255))}t.exports=i,t.exports.to=i,t.exports.from=function(e,t){var r=(e*=1)>>>24,i=(0xff0000&e)>>>16,n=(65280&e)>>>8,a=255&e;return!1===t?[r,i,n,a]:[r/255,i/255,n/255,a/255]}}}),mI=p({"node_modules/glslify/browser.js"(e,t){t.exports=function(e){"string"==typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],i=0;i[255*!this.tooManyColors,i.height],pixelRatio:e.context("pixelRatio"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translate:e.prop("translate"),translateFract:e.prop("translateFract"),markerTexture:e.prop("markerTexture"),paletteTexture:i},attributes:{x:(e,t)=>t.xAttr||{buffer:t.positionBuffer,stride:8,offset:0},y:(e,t)=>t.yAttr||{buffer:t.positionBuffer,stride:8,offset:4},xFract:(e,t)=>t.xAttr?{constant:[0,0]}:{buffer:t.positionFractBuffer,stride:8,offset:0},yFract:(e,t)=>t.yAttr?{constant:[0,0]}:{buffer:t.positionFractBuffer,stride:8,offset:4},size:(e,t)=>t.size.length?{buffer:t.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(255*t.size/this.maxSize)]},borderSize:(e,t)=>t.borderSize.length?{buffer:t.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(255*t.borderSize/this.maxSize)]},colorId:(e,t)=>t.color.length?{buffer:t.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?n.slice(4*t.color,4*t.color+4):[t.color]},borderColorId:(e,t)=>t.borderColor.length?{buffer:t.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?n.slice(4*t.borderColor,4*t.borderColor+4):[t.borderColor]},isActive:(e,t)=>!0===t.activation?{constant:[1]}:t.activation?t.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:e.prop("viewport")},viewport:e.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:e.prop("elements"),count:e.prop("count"),offset:e.prop("offset"),primitive:"points"},s=Object.assign({},a);s.frag=o([`precision highp float; +`;for(b=0,_=v*p,w=i,M="",x=0;x-1?parseInt(e[1+n]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(i=i.replace(A(),"?px "),w*=Math.pow(.75,l-s),i=i.replace("?px ",A())),_+=.25*p*(l-s)}if(!0===o.superscripts){var c=e.indexOf("+"),u=r.indexOf("+"),h=c>-1?parseInt(e[1+c]):0,d=u>-1?parseInt(r[1+u]):0;h!==d&&(i=i.replace(A(),"?px "),w*=Math.pow(.75,d-h),i=i.replace("?px ",A())),_-=.25*p*(d-h)}if(!0===o.bolds){var f=e.indexOf("b|")>-1,m=r.indexOf("b|")>-1;!f&&m&&(i=g?i.replace("italic ","italic bold "):"bold "+i),f&&!m&&(i=i.replace("bold ",""))}if(!0===o.italics){var g=e.indexOf("i|")>-1,y=r.indexOf("i|")>-1;!g&&y&&(i="italic "+i),g&&!y&&(i=i.replace("italic ",""))}t.font=i}(s,E),s=E))}k(),T+=S.length;var C=0|Math.round(b+2*i);g",a="",o=n.length,s=a.length,l="+"===t[0]||"-"===t[0],c=0,u=-s;c>-1&&!(-1===(c=r.indexOf(n,c))||-1===(u=r.indexOf(a,c+o))||u<=c);){for(var h=c;h=u)i[h]=null,r=r.substr(0,h)+" "+r.substr(h+1);else if(null!==i[h]){var d=i[h].indexOf(t[0]);-1===d?i[h]+=t:l&&(i[h]=i[h].substr(0,d+1)+(1+parseInt(i[h][d+1]))+i[h].substr(d+2))}var f=c+o,p=r.substr(f,u-f).indexOf(n);c=-1!==p?p:u+s}return i}function u(e,t,r,n){var c,u=(c=i(e,128),n?a(c.cells,c.positions,.25):{edges:c.cells,positions:c.positions}),h=function(e,t,r){for(var i=t.textAlign||"start",n=t.textBaseline||"alphabetic",a=[0x40000000,0x40000000],o=[0,0],s=e.length,l=0;ltypeof ses)||!ses.ok||ses.ok()){"u">typeof ses&&(ses.weakMapPermitHostObjects=v);var t,r,i,n=!1;if("function"==typeof WeakMap){var a=WeakMap;if(!("u">typeof navigator&&/Firefox/.test(navigator.userAgent))){var o=new a,s=Object.freeze({});if(o.set(s,1),1!==o.get(s))n=!0;else{e.exports=WeakMap;return}}}Object.prototype.hasOwnProperty;var l=Object.getOwnPropertyNames,c=Object.defineProperty,u=Object.isExtensible,h="weakmap:",d=h+"ident:"+Math.random()+"___";if("u">typeof crypto&&"function"==typeof crypto.getRandomValues&&"function"==typeof ArrayBuffer&&"function"==typeof Uint8Array){var f=new Uint8Array(new ArrayBuffer(25));crypto.getRandomValues(f),d=h+"rand:"+Array.prototype.map.call(f,function(e){return(e%36).toString(36)}).join("")+"___"}if(c(Object,"getOwnPropertyNames",{value:function(e){return l(e).filter(x)}}),"getPropertyNames"in Object){var p=Object.getPropertyNames;c(Object,"getPropertyNames",{value:function(e){return p(e).filter(x)}})}t=Object.freeze,c(Object,"freeze",{value:function(e){return b(e),t(e)}}),r=Object.seal,c(Object,"seal",{value:function(e){return b(e),r(e)}}),i=Object.preventExtensions,c(Object,"preventExtensions",{value:function(e){return b(e),i(e)}});var m=!1,g=0,y=function(){this instanceof y||w();var e=[],t=[],r=g++;return Object.create(y.prototype,{get___:{value:_(function(i,n){var a,o=b(i);return o?r in o?o[r]:n:(a=e.indexOf(i))>=0?t[a]:n})},has___:{value:_(function(t){var i=b(t);return i?r in i:e.indexOf(t)>=0})},set___:{value:_(function(i,n){var a,o=b(i);return o?o[r]=n:(a=e.indexOf(i))>=0?t[a]=n:(t[a=e.length]=n,e[a]=i),this})},delete___:{value:_(function(i){var n,a,o=b(i);return o?r in o&&delete o[r]:!((n=e.indexOf(i))<0)&&(a=e.length-1,e[n]=void 0,t[n]=t[a],e[n]=e[a],e.length=a,t.length=a,!0)})}})};y.prototype=Object.create(Object.prototype,{get:{value:function(e,t){return this.get___(e,t)},writable:!0,configurable:!0},has:{value:function(e){return this.has___(e)},writable:!0,configurable:!0},set:{value:function(e,t){return this.set___(e,t)},writable:!0,configurable:!0},delete:{value:function(e){return this.delete___(e)},writable:!0,configurable:!0}}),"function"==typeof a?function(){function t(){this instanceof y||w();var e,t=new a,r=void 0,i=!1;return e=n?function(e,i){return t.set(e,i),t.has(e)||(r||(r=new y),r.set(e,i)),this}:function(e,n){if(i)try{t.set(e,n)}catch{r||(r=new y),r.set___(e,n)}else t.set(e,n);return this},Object.create(y.prototype,{get___:{value:_(function(e,i){return r?t.has(e)?t.get(e):r.get___(e,i):t.get(e,i)})},has___:{value:_(function(e){return t.has(e)||!!r&&r.has___(e)})},set___:{value:_(e)},delete___:{value:_(function(e){var i=!!t.delete(e);return r&&r.delete___(e)||i})},permitHostObjects___:{value:_(function(e){if(e===v)i=!0;else throw Error("bogus call to permitHostObjects___")})}})}n&&"u">typeof Proxy&&(Proxy=void 0),t.prototype=y.prototype,e.exports=t,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("u">typeof Proxy&&(Proxy=void 0),e.exports=y)}function v(e){e.permitHostObjects___&&e.permitHostObjects___(v)}function x(e){return e.substr(0,h.length)!=h||"___"!==e.substr(e.length-3)}function b(e){if(e!==Object(e))throw TypeError("Not an object: "+e);var t=e[d];if(t&&t.key===e)return t;if(u(e)){t={key:e};try{return c(e,d,{value:t,writable:!1,enumerable:!1,configurable:!1}),t}catch{return}}}function _(e){return e.prototype=null,Object.freeze(e)}function w(){!m&&"u">typeof console&&(m=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},236(e,t,r){var i=r(8284);e.exports=function(){var e={};return function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)throw Error("Weakmap-shim: Key must be object");var r=t.valueOf(e);return r&&r.identity===e?r:i(t,e)}}},8284(e){e.exports=function(e,t){var r={identity:t},i=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?i.apply(this,arguments):r},writable:!0}),r}},606(e,t,r){var i=r(236);e.exports=function(){var e=i();return{get:function(t,r){var i=e(t);return i.hasOwnProperty("value")?i.value:r},set:function(t,r){return e(t).value=r,this},has:function(t){return"value"in e(t)},delete:function(t){return delete e(t).value}}}},3349(e){var t,r;t=(function(){return function(e,t,r,i,n,a){var o=e[0],s=r[0],l=[0];i|=0;var c=0;for(c=0;c=0!=h>=0&&n.push(l[0]+.5+.5*(u+h)/(u-h)),i+=s,++l[0]}}}).bind(void 0,{funcName:"zeroCrossings"}),r={},e.exports=function(e,i,n){var a=e.dtype,o=e.order,s=[a,o.join()].join(),l=r[s];return l||(r[s]=l=t([a,o])),l(e.shape.slice(0),e.data,e.stride,0|e.offset,i,n)}},781(e,t,r){e.exports=function(e,t){var r=[];return t=+t||0,i(e.hi(e.shape[0]-1),r,t),r};var i=r(3349)},7790(){}};let i={};function n(e){let t=i[e];if(void 0!==t)return t.exports;let a=i[e]={id:e,loaded:!1,exports:{}};return r[e].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch{if("object"==typeof window)return window}}(),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),t.exports=n(3065)}}),fd=p({"src/lib/str2rgbarray.js"(e,t){var{normalize:r}=ee();t.exports=function(e){return e?r(e):[0,0,0,1]}}}),ff=p({"src/lib/gl_format_color.js"(e,t){var r=C(),i=t3(),n=ee(),a=Q().defaultLine,o=z().isArrayOrTypedArray,s=n.normalize(a);function l(e,t){return[e[0],e[1],e[2],e[3]*t]}function c(e){return!r(e)&&(n.isChannelArray(e)||n.isValid(e))?n.normalize(e):s}function u(e){return r(e)?e:1}t.exports={formatColor:function(e,t,r){var a=e.color;a&&a._inputArray&&(a=a._inputArray);var h,d,f,p,m,g=o(a),y=o(t),v=i.extractOpts(e),x=[];if(h=void 0!==v.colorscale?i.makeColorScaleFuncFromTrace(e):c,d=g?(e,t)=>void 0===e[t]?s:void 0===v.colorscale?h(e[t]):n.normalize(h(e[t])):c,f=y?function(e,t){return void 0===e[t]?1:u(e[t])}:u,g||y)for(var b=0;b0){var d=n.c2l(u);n._lowerLogErrorBound||(n._lowerLogErrorBound=d),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,d)}}else o[s]=[-l[0]*i,l[1]*i]}return o}t.exports=function(e,t,r){var n=[i(e.x,e.error_x,t[0],r.xaxis),i(e.y,e.error_y,t[1],r.yaxis),i(e.z,e.error_z,t[2],r.zaxis)],a=function(e){for(var t=0;t-1?-1:+(e.indexOf("right")>-1)}function x(e){return null==e?0:e.indexOf("top")>-1?-1:+(e.indexOf("bottom")>-1)}function b(e,t){return t(4*e)}function _(e){return d[e]}function w(e,t,r,i,n){var a=null;if(s.isArrayOrTypedArray(e)){a=[];for(var o=0;o=0){var E=function(e,t,r){var i,n=(r+1)%3,a=(r+2)%3,s=[],l=[];for(i=0;i=0&&h("surfacecolor",b||_);for(var w=["x","y","z"],T=0;T<3;++T){var M="projection."+w[T];h(M+".show")&&(h(M+".opacity"),h(M+".scale"))}var k=r.getComponentMethod("errorbars","supplyDefaults");k(e,t,b||_||c,{axis:"z"}),k(e,t,b||_||c,{axis:"y",inherit:"z"}),k(e,t,b||_||c,{axis:"x",inherit:"z"})}}}),fb=p({"src/traces/scatter3d/calc.js"(e,t){var r=i0(),i=iQ();t.exports=function(e,t){var n=[{x:!1,y:!1,trace:t,t:{}}];return r(n,t),i(e,t),n}}}),f_=p({"node_modules/get-canvas-context/index.js"(e,t){t.exports=function(e,t){if("string"!=typeof e)throw TypeError("must specify type string");if(t=t||{},typeof document>"u"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");"number"==typeof t.width&&(r.width=t.width),"number"==typeof t.height&&(r.height=t.height);var i,n=t;try{var a=[e];0===e.indexOf("webgl")&&a.push("experimental-"+e);for(var o=0;o/g," "));l[c]=f,u.tickmode=h}}t.ticks=l;for(var c=0;c<3;++c){a[c]=.5*(e.glplot.bounds[0][c]+e.glplot.bounds[1][c]);for(var p=0;p<2;++p)t.bounds[p][c]=e.glplot.bounds[p][c]}e.contourLevels=function(e){for(var t=[,,,],r=0;r<3;++r){for(var i=e[r],n=Array(i.length),a=0;ar.deltaY?1.1:.9090909090909091,a=e.glplot.getAspectratio();e.glplot.setAspectratio({x:i*a.x,y:i*a.y,z:i*a.z})}n(e)}},!!l&&{passive:!1}),e.glplot.canvas.addEventListener("mousemove",function(){if(!1!==e.fullSceneLayout.dragmode&&0!==e.camera.mouseListener.buttons){var t=i();e.graphDiv.emit("plotly_relayouting",t)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(r){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:r,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0},T.render=function(){var e,t=this,r=t.graphDiv,i=t.svgContainer,n=t.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=n.width*a,l=n.height*o;i.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),i.setAttributeNS(null,"width",s),i.setAttributeNS(null,"height",l),x(t),t.glplot.axes.update(t.axesOptions);for(var c=Object.keys(t.traces),h=null,p=t.glplot.selection,m=0;m")):"isosurface"===e.type||"volume"===e.type?(T.valueLabel=d.hoverLabelText(t._mockAxis,t._mockAxis.d2l(p.traceCoordinate[3]),e.valuehoverformat),E.push("value: "+T.valueLabel),p.textLabel&&E.push(p.textLabel),S=E.join("
")):S=p.textLabel;var C={x:p.traceCoordinate[0],y:p.traceCoordinate[1],z:p.traceCoordinate[2],data:b._input,fullData:b,curveNumber:b.index,pointNumber:w};f.appendArrayPointValue(C,b,w),e._module.eventData&&(C=b._module.eventData(C,p,b,{},w));var L={points:[C]};if(t.fullSceneLayout.hovermode){var P=[];f.loneHover({trace:b,x:(.5+.5*v[0]/v[3])*s,y:(.5-.5*v[1]/v[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:S,name:h.name,color:f.castHoverOption(b,w,"bgcolor")||h.color,borderColor:f.castHoverOption(b,w,"bordercolor"),fontFamily:f.castHoverOption(b,w,"font.family"),fontSize:f.castHoverOption(b,w,"font.size"),fontColor:f.castHoverOption(b,w,"font.color"),nameLength:f.castHoverOption(b,w,"namelength"),textAlign:f.castHoverOption(b,w,"align"),hovertemplate:u.castOption(b,w,"hovertemplate"),hovertemplateLabels:u.extendFlat({},C,T),eventData:[C]},{container:i,gd:r,inOut_bbox:P}),C.bbox=P[0]}p.distance<5&&(p.buttons||_)?r.emit("plotly_click",L):r.emit("plotly_hover",L),this.oldEventData=L}else f.loneUnhover(i),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;t.drawAnnotations(t)},T.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){e.glplot.gl.isContextLost()?requestAnimationFrame(t):e.initializeGLPlot()?e.plot.apply(e,e.plotArgs):u.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(t)};var k=["xaxis","yaxis","zaxis"];T.plot=function(e,t,r){if(this.plotArgs=[e,t,r],!this.glplot.contextLost){var i,n,a,o,s,l,c=t[this.id],h=r[this.id];this.fullLayout=t,this.fullSceneLayout=c,this.axesOptions.merge(t,c),this.spikeOptions.merge(c),this.setViewport(c),this.updateFx(c.dragmode,c.hovermode),this.camera.enableWheel=this.graphDiv._context._scrollZoom.gl3d,this.glplot.setClearColor(p(c.bgcolor)),this.setConvert(s),e?Array.isArray(e)||(e=[e]):e=[];var d=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(a=0;ag[1][a])g[0][a]=-1,g[1][a]=1;else{var L=g[1][a]-g[0][a];g[0][a]-=L/32,g[1][a]+=L/32}if(x=b(x=[g[0][a],g[1][a]],s),g[0][a]=x[0],g[1][a]=x[1],s.isReversed()){var P=g[0][a];g[0][a]=g[1][a],g[1][a]=P}}else x=s.range,g[0][a]=s.r2l(x[0]),g[1][a]=s.r2l(x[1]);g[0][a]===g[1][a]&&(g[0][a]-=1,g[1][a]+=1),y[a]=g[1][a]-g[0][a],s.range=[g[0][a],g[1][a]],s.limitRange(),this.glplot.setBounds(a,{min:s.range[0]*f[a],max:s.range[1]*f[a]})}var I,z=c.aspectmode;if("cube"===z)I=[1,1,1];else if("manual"===z){var D=c.aspectratio;I=[D.x,D.y,D.z]}else if("auto"===z||"data"===z){var O=[1,1,1];for(a=0;a<3;++a){var R=v[l=(s=c[k[a]]).type];O[a]=Math.pow(R.acc,1/R.count)/f[a]}I="data"===z||Math.max.apply(null,O)/Math.min.apply(null,O)<=4?O:[1,1,1]}else throw Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=h.aspectratio.x=I[0],c.aspectratio.y=h.aspectratio.y=I[1],c.aspectratio.z=h.aspectratio.z=I[2],this.glplot.setAspectratio(c.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=c.aspectmode);var F=c.domain||null,j=t._size||null;if(F&&j){var B=this.container.style;B.position="absolute",B.left=j.l+F.x[0]*j.w+"px",B.top=j.t+(1-F.y[1])*j.h+"px",B.width=j.w*(F.x[1]-F.x[0])+"px",B.height=j.h*(F.y[1]-F.y[0])+"px"}this.glplot.redraw()}},T.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener("wheel",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},T.getCamera=function(){var e;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(e=this.camera).up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:!0===e._ortho?"orthographic":"perspective"}}},T.setViewport=function(e){var t=e.camera;this.camera.lookAt.apply(this,[[t.eye.x,t.eye.y,t.eye.z],[t.center.x,t.center.y,t.center.z],[t.up.x,t.up.y,t.up.z]]),this.glplot.setAspectratio(e.aspectratio),"orthographic"===t.projection.type!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},T.isCameraChanged=function(e){var t=this.getCamera(),r=u.nestedProperty(e,this.id+".camera").get(),i=!1;if(void 0===r)i=!0;else{for(var n=0;n<3;n++)for(var a=0;a<3;a++)if(!function(e,t,r,i){var n=["up","center","eye"],a=["x","y","z"];return t[n[r]]&&e[n[r]][a[i]]===t[n[r]][a[i]]}(t,r,n,a)){i=!0;break}(!r.projection||t.projection&&t.projection.type!==r.projection.type)&&(i=!0)}return i},T.isAspectChanged=function(e){var t=this.glplot.getAspectratio(),r=u.nestedProperty(e,this.id+".aspectratio").get();return void 0===r||r.x!==t.x||r.y!==t.y||r.z!==t.z},T.saveLayout=function(e){var t,r,i,n,a,o,s=this.fullLayout,l=this.isCameraChanged(e),h=this.isAspectChanged(e),d=l||h;if(d){var f={};l&&(t=this.getCamera(),i=(r=u.nestedProperty(e,this.id+".camera")).get(),f[this.id+".camera"]=i),h&&(n=this.glplot.getAspectratio(),o=(a=u.nestedProperty(e,this.id+".aspectratio")).get(),f[this.id+".aspectratio"]=o),c.call("_storeDirectGUIEdit",e,s._preGUI,f),l&&(r.set(t),u.nestedProperty(s,this.id+".camera").set(t)),h&&(a.set(n),u.nestedProperty(s,this.id+".aspectratio").set(n),this.glplot.redraw())}return d},T.updateFx=function(e,t){var r=this.camera;if(r)if("orbit"===e)r.mode="orbit",r.keyBindingMode="rotate";else if("turntable"===e){r.up=[0,0,1],r.mode="turntable",r.keyBindingMode="rotate";var i=this.graphDiv,n=i._fullLayout,a=this.fullSceneLayout.camera,o=a.up.x,s=a.up.y,l=a.up.z;if(l/Math.sqrt(o*o+s*s+l*l)<.999){var h=this.id+".camera.up",d={x:0,y:0,z:1},f={};f[h]=d;var p=i.layout;c.call("_storeDirectGUIEdit",p,n._preGUI,f),a.up=d,u.nestedProperty(p,h).set(d)}}else r.keyBindingMode=e;this.fullSceneLayout.hovermode=t},T.toImage=function(e){e||(e="png"),this.staticMode&&this.container.appendChild(r),this.glplot.redraw();var t,i=this.glplot.gl,n=i.drawingBufferWidth,a=i.drawingBufferHeight;i.bindFramebuffer(i.FRAMEBUFFER,null);var o=new Uint8Array(n*a*4);i.readPixels(0,0,n,a,i.RGBA,i.UNSIGNED_BYTE,o),function(e,t,r){for(var i=0,n=r-1;i0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}(o,n,a);var s=document.createElement("canvas");s.width=n,s.height=a;var l=s.getContext("2d",{willReadFrequently:!0}),c=l.createImageData(n,a);switch(c.data.set(o),l.putImageData(c,0,0),e){case"jpeg":t=s.toDataURL("image/jpeg");break;case"webp":t=s.toDataURL("image/webp");break;default:t=s.toDataURL("image/png")}return this.staticMode&&this.container.removeChild(r),t},T.setConvert=function(){for(var e=0;e<3;e++){var t=this.fullSceneLayout[k[e]];d.setConvert(t,this.fullLayout),t.setScale=u.noop}},T.make4thDimension=function(){var e=this.graphDiv._fullLayout;this._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},d.setConvert(this._mockAxis,e)},t.exports=w}}),fE=p({"src/plots/gl3d/layout/attributes.js"(e,t){t.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),fC=p({"src/plots/gl3d/layout/axis_attributes.js"(e,t){var r=ee(),i=tN(),n=q().extendFlat;t.exports=(0,eq().overrideAll)({visible:i.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:r.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:{text:i.title.text,font:i.title.font},type:n({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorange:i.autorange,autorangeoptions:{minallowed:i.autorangeoptions.minallowed,maxallowed:i.autorangeoptions.maxallowed,clipmin:i.autorangeoptions.clipmin,clipmax:i.autorangeoptions.clipmax,include:i.autorangeoptions.include,editType:"plot"},rangemode:i.rangemode,minallowed:i.minallowed,maxallowed:i.maxallowed,range:n({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:i.minor.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,labelalias:i.labelalias,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:n({},i.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth},"plot","from-root")}}),fL=p({"src/plots/gl3d/layout/layout_attributes.js"(e,t){var r=fC(),i=at().attributes,n=q().extendFlat;function a(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[(0,tv().counterRegex)("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:n(a(0,0,1),{}),center:n(a(0,0,0),{}),eye:n(a(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:i({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:r,yaxis:r,zaxis:r,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"}}}),fP=p({"src/plots/gl3d/layout/axis_defaults.js"(e,t){var r=ee(),i=tv(),n=tS(),a=fC(),o=ns(),s=nu(),l=["xaxis","yaxis","zaxis"],c=13600/187;t.exports=function(e,t,u){var h,d;function f(e,t){return i.coerce(h,d,a,e,t)}for(var p=0;p.999)&&(g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",a.getDfltFromLayout("hovermode"))}t.exports=function(e,t,i){var n=t._basePlotModules.length>1;a(e,t,i,{type:c,attributes:s,handleDefaults:u,fullLayout:t,font:t.font,fullData:i,getDfltFromLayout:function(t){if(!n&&r.validate(e[t],s[t]))return e[t]},autotypenumbersDflt:t.autotypenumbers,paper_bgcolor:t.paper_bgcolor,calendar:t.calendar})}}}),fz=p({"src/plots/gl3d/index.js"(e){var t=eq().overrideAll,r=W(),i=fS(),n=tI().getSubplotData,a=tv(),o=tO(),s="gl3d",l="scene";e.name=s,e.attr=l,e.idRoot=l,e.idRegex=e.attrRegex=a.counterRegex("scene"),e.attributes=fE(),e.layoutAttributes=fL(),e.baseLayoutAttrOverrides=t({hoverlabel:r.hoverlabel},"plot","nested"),e.supplyLayoutDefaults=fI(),e.plot=function(e){for(var t=e._fullLayout,r=e._fullData,a=t._subplots[s],o=0;o720;)i--,i/=function(e){for(var t=p(e),r=e,i=0;i0){r=f[i];break}return r}(i),++i<120&&(i=720);var n=Math.round(i/e);return n>1?n:1},d.refineCoords=function(e){for(var t=this.dataScaleX,r=this.dataScaleY,a=e[0].shape[0],o=e[0].shape[1],s=0|Math.floor(e[0].shape[0]*t+1),l=0|Math.floor(e[0].shape[1]*r+1),c=1+a+1,u=1+o+1,h=i(new Float32Array(c*u),[c,u]),d=[1/t,0,0,0,1/r,0,0,0,1],f=0;f0&&null!==this.contourStart[e]&&null!==this.contourEnd[e]&&this.contourEnd[e]>this.contourStart[e]))for(n[e]=!0,t=this.contourStart[e];tb&&(this.minValues[y]=b),this.maxValues[y]l&&(t.isomin=null,t.isomax=null);var c=o("x"),u=o("y"),h=o("z"),d=o("value");if(!c||!c.length||!u||!u.length||!h||!h.length||!d||!d.length){t.visible=!1;return}i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],n),o("valuehoverformat"),["x","y","z"].forEach(function(e){o(e+"hoverformat");var t="caps."+e;o(t+".show")&&o(t+".fill");var r="slices."+e;o(r+".show")&&(o(r+".fill"),o(r+".locations"))}),o("spaceframe.show")&&o("spaceframe.fill"),o("surface.show")&&(o("surface.count"),o("surface.fill"),o("surface.pattern")),o("contour.show")&&(o("contour.color"),o("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(e){o(e)}),a(e,t,n,o,{prefix:"",cLetter:"c"}),t._length=null}t.exports={supplyDefaults:function(e,t,i,a){o(e,t,i,a,function(i,a){return r.coerce(e,t,n,i,a)})},supplyIsoDefaults:o}}}),fG=p({"src/traces/streamtube/calc.js"(e,t){var r=tv(),i=t2();function n(e){var t,i,n,o,s,l,c,u,h,d,f,p,m=e._x,g=e._y,y=e._z,v=e._len,x=-1/0,b=1/0,_=-1/0,w=1/0,T=-1/0,M=1/0,k="";for(v&&(c=m[0],h=g[0],f=y[0]),v>1&&(u=m[v-1],d=g[v-1],p=y[v-1]),t=0;tu?"-":"+")+"x")).replace("y",(h>d?"-":"+")+"y")).replace("z",(f>p?"-":"+")+"z");var C=function(){v=0,A=[],S=[],E=[]};(!v||v0;r--){var i=Math.min(t[r],t[r-1]),n=Math.max(t[r],t[r-1]);if(n>i&&i-1}function z(l,c,u){i=r;var h=[c],d=[u];if(t>=1)h=[c],d=[u];else if(t>0){var f,p,m,y,v,x,b,_,w,T,M,k,A,S=(f=c,p=u,m=f[0],_=P(x=function(e,t,r){for(var i=[],n=0;n-1?u[O]:function(e,t,r){for(var l=s.length,c=i;c-1?D[O]=N:D[O]=L(R,F,j,null===l?B:l)}C=D[0],I=D[1],z=D[2],e._meshI.push(C),e._meshJ.push(I),e._meshK.push(z),++g}}function D(e,t,r,i){var n=e[3];ni&&(n=i);for(var a=(e[3]-n)/(e[3]-t[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*e[s]+a*t[s];return o}function O(e){var t=.001*(E-S);return e>=S-t&&e<=E+t}function R(t){for(var r=[],i=0;i<4;i++){var n=t[i];r.push([e._x[n],e._y[n],e._z[n],e._value[n]])}return r}function F(e,t,r,i,n,a){a||(a=1),r=[-1,-1,-1];var o,s,l,c=!1,u=[(o=t[0][3],o>=i&&o<=n),(s=t[1][3],s>=i&&s<=n),(l=t[2][3],l>=i&&l<=n)];if(!u[0]&&!u[1]&&!u[2])return!1;var h=function(e,t,r){return O(t[0][3])&&O(t[1][3])&&O(t[2][3])?(z(e,t,r),!0):a<3&&F(e,t,r,S,E,++a)};if(u[0]&&u[1]&&u[2])return h(e,t,r)||c;var d=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(a){if(u[a[0]]&&u[a[1]]&&!u[a[2]]){var o=t[a[0]],s=t[a[1]],l=t[a[2]],f=D(l,o,i,n),p=D(l,s,i,n);c=h(e,[p,f,o],[-1,-1,r[a[0]]])||c,c=h(e,[o,s,p],[r[a[0]],r[a[1]],-1])||c,d=!0}}),d||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(a){if(u[a[0]]&&!u[a[1]]&&!u[a[2]]){var o=t[a[0]],s=t[a[1]],l=t[a[2]],f=D(s,o,i,n);c=h(e,[D(l,o,i,n),f,o],[-1,-1,r[a[0]]])||c,d=!0}}),c}function j(e,t,r,i){var n,a,o,s,l,c=!1,u=R(t),h=[(n=u[0][3],n>=r&&n<=i),(a=u[1][3],a>=r&&a<=i),(o=u[2][3],o>=r&&o<=i),(s=u[3][3],s>=r&&s<=i)];if(!h[0]&&!h[1]&&!h[2]&&!h[3])return c;if(h[0]&&h[1]&&h[2]&&h[3])return m&&((l=function(r,i,n){z(e,[u[r],u[i],u[n]],[t[r],t[i],t[n]])})(0,1,2),l(3,0,1),l(2,3,0),l(1,2,3)),c;var d=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(n){if(h[n[0]]&&h[n[1]]&&h[n[2]]&&!h[n[3]]){var a=u[n[0]],o=u[n[1]],s=u[n[2]],l=u[n[3]];c=m?z(e,[a,o,s],[t[n[0]],t[n[1]],t[n[2]]])||c:z(null,[D(l,a,r,i),D(l,o,r,i),D(l,s,r,i)],[-1,-1,-1])||c,d=!0}}),d||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(n){if(h[n[0]]&&h[n[1]]&&!h[n[2]]&&!h[n[3]]){var a,o,s,l=u[n[0]],f=u[n[1]],p=u[n[2]],g=u[n[3]],y=D(p,l,r,i),v=D(p,f,r,i),x=D(g,f,r,i),b=D(g,l,r,i);m?(c=z(e,[l,b,y],[t[n[0]],-1,-1])||c,c=z(e,[f,v,x],[t[n[1]],-1,-1])||c):(a=[y,v,x,b],o=[-1,-1,-1,-1],(s=function(e,t,r){z(null,[a[e],a[t],a[r]],[o[e],o[t],o[r]])})(0,1,2),s(2,3,0)),d=!0}}),d)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(n){if(h[n[0]]&&!h[n[1]]&&!h[n[2]]&&!h[n[3]]){var a=u[n[0]],o=u[n[1]],s=u[n[2]],l=u[n[3]],f=D(o,a,r,i),p=D(s,a,r,i),g=D(l,a,r,i);m?(c=z(e,[a,f,p],[t[n[0]],-1,-1])||c,c=z(e,[a,p,g],[t[n[0]],-1,-1])||c,c=z(e,[a,g,f],[t[n[0]],-1,-1])||c):c=z(null,[f,p,g],[-1,-1,-1])||c,d=!0}}),c}function B(e,t,r,i,n,a,o,s,l,c,u){var h=!1;return p&&(I(e,"A")&&(h=j(null,[t,r,i,a],c,u)||h),I(e,"B")&&(h=j(null,[r,i,n,l],c,u)||h),I(e,"C")&&(h=j(null,[r,a,o,l],c,u)||h),I(e,"D")&&(h=j(null,[i,a,s,l],c,u)||h),I(e,"E")&&(h=j(null,[r,i,a,l],c,u)||h)),m&&(h=j(e,[r,i,a,l],c,u)||h),h}function N(e,t,r,i,n,a,o,s){return[!0===s[0]||F(e,R([t,r,i]),[t,r,i],a,o),!0===s[1]||F(e,R([i,n,t]),[i,n,t],a,o)]}function U(e,t,r,i,n,a,o,s,l){return s?N(e,t,r,n,i,a,o,l):N(e,r,n,i,t,a,o,l)}function V(e,t,r,i,n,a,o){var s,l,c,u,h=!1,d=function(){h=F(e,[s,l,c],[-1,-1,-1],n,a)||h,h=F(e,[c,u,s],[-1,-1,-1],n,a)||h},f=o[0],p=o[1],m=o[2];return f&&(s=P(R([M(t,r-0,i-0)])[0],R([M(t-1,r-0,i-0)])[0],f),l=P(R([M(t,r-0,i-1)])[0],R([M(t-1,r-0,i-1)])[0],f),c=P(R([M(t,r-1,i-1)])[0],R([M(t-1,r-1,i-1)])[0],f),u=P(R([M(t,r-1,i-0)])[0],R([M(t-1,r-1,i-0)])[0],f),d()),p&&(s=P(R([M(t-0,r,i-0)])[0],R([M(t-0,r-1,i-0)])[0],p),l=P(R([M(t-0,r,i-1)])[0],R([M(t-0,r-1,i-1)])[0],p),c=P(R([M(t-1,r,i-1)])[0],R([M(t-1,r-1,i-1)])[0],p),u=P(R([M(t-1,r,i-0)])[0],R([M(t-1,r-1,i-0)])[0],p),d()),m&&(s=P(R([M(t-0,r-0,i)])[0],R([M(t-0,r-0,i-1)])[0],m),l=P(R([M(t-0,r-1,i)])[0],R([M(t-0,r-1,i-1)])[0],m),c=P(R([M(t-1,r-1,i)])[0],R([M(t-1,r-1,i-1)])[0],m),u=P(R([M(t-1,r-0,i)])[0],R([M(t-1,r-0,i-1)])[0],m),d()),h}function q(e,t,r,i,n){for(var a=[],o=0,s=0;sMath.abs(z-A)?[k,z]:[z,A];T=D[0],P=D[1],p=!0,W(r,T,P),p=!1}}var O=[[Math.min(S,A),Math.max(S,A)],[Math.min(k,E),Math.max(k,E)]];["x","y","z"].forEach(function(r){for(var i=[],n=0;n0&&(h.push(p.id),"x"===r?d.push([p.distRatio,0,0]):"y"===r?d.push([0,p.distRatio,0]):d.push([0,0,p.distRatio]))}else u="x"===r?Y(1,b-1):"y"===r?Y(1,_-1):Y(1,w-1);h.length>0&&("x"===r?i[a]=function(e,t,r,i,n){for(var a=[],o=0,s=0;s0&&("x"===r?i[a]=q(null,u,o,s,i[a]):"y"===r?i[a]=H(null,u,o,s,i[a]):i[a]=G(null,u,o,s,i[a]),a++)}var m=e.caps[r];m.show&&m.fill&&(t=m.fill,"x"===r?i[a]=q(null,[0,b-1],o,s,i[a]):"y"===r?i[a]=H(null,[0,_-1],o,s,i[a]):i[a]=G(null,[0,w-1],o,s,i[a]),a++)}}),0===g&&C(),e._meshX=n,e._meshY=a,e._meshZ=o,e._meshIntensity=s,e._Xs=y,e._Ys=v,e._Zs=x}(),e}t.exports={findNearestOnAxis:l,generateIsoMeshes:d,createIsosurfaceTrace:function(e,t){var i=r({gl:e.glplot.gl}),n=new c(e,i,t.uid);return i._trace=n,n.update(t),e.glplot.add(i),n}}}}),f$=p({"src/traces/isosurface/index.js"(e,t){t.exports={attributes:fq(),supplyDefaults:fH().supplyDefaults,calc:fW(),colorbar:{min:"cmin",max:"cmax"},plot:fZ().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:fz(),categories:["gl3d","showLegend"],meta:{}}}}),fX=p({"lib/isosurface.js"(e,t){t.exports=f$()}}),fK=p({"src/traces/volume/attributes.js"(e,t){var r=tV(),i=fq(),n=fR(),a=Z(),o=q().extendFlat,s=t.exports=(0,eq().overrideAll)(o({x:i.x,y:i.y,z:i.z,value:i.value,isomin:i.isomin,isomax:i.isomax,surface:i.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:i.slices,caps:i.caps,text:i.text,hovertext:i.hovertext,xhoverformat:i.xhoverformat,yhoverformat:i.yhoverformat,zhoverformat:i.zhoverformat,valuehoverformat:i.valuehoverformat,hovertemplate:i.hovertemplate,hovertemplatefallback:i.hovertemplatefallback},r("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:i.colorbar,opacity:i.opacity,opacityscale:n.opacityscale,lightposition:i.lightposition,lighting:i.lighting,flatshading:i.flatshading,contour:i.contour,hoverinfo:o({},a.hoverinfo),showlegend:o({},a.showlegend,{dflt:!1})}),"calc","nested");s.x.editType=s.y.editType=s.z.editType=s.value.editType="calc+clearAxisTypes"}}),fJ=p({"src/traces/volume/defaults.js"(e,t){var r=tv(),i=fK(),n=fH().supplyIsoDefaults,a=fF().opacityscaleDefaults;t.exports=function(e,t,o,s){function l(n,a){return r.coerce(e,t,i,n,a)}n(e,t,o,s,l),a(e,t,s,l)}}}),fQ=p({"src/traces/volume/convert.js"(e,t){var r=fh().gl_mesh3d,i=ff().parseColorScale,n=tv().isArrayOrTypedArray,a=fd(),o=t3().extractOpts,s=fY(),l=fZ().findNearestOnAxis,c=fZ().generateIsoMeshes;function u(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var h=u.prototype;h.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],i=this.data._meshY[t],a=this.data._meshZ[t],o=this.data._Ys.length,s=this.data._Zs.length,c=l(r,this.data._Xs).id,u=l(i,this.data._Ys).id,h=e.index=l(a,this.data._Zs).id+s*u+s*o*c;e.traceCoordinate=[this.data._meshX[h],this.data._meshY[h],this.data._meshZ[h],this.data._value[h]];var d=this.data.hovertext||this.data.text;return n(d)&&void 0!==d[h]?e.textLabel=d[h]:d&&(e.textLabel=d),!0}},h.update=function(e){var t=this.scene,r=t.fullSceneLayout;function n(e,t,r,i){return t.map(function(t){return e.d2l(t,0,i)*r})}this.data=c(e);var l={positions:s(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),cells:s(e._meshI,e._meshJ,e._meshK),lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:a(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},u=o(e);l.vertexIntensity=e._meshIntensity,l.vertexIntensityBounds=[u.min,u.max],l.colormap=i(e),this.mesh.update(l)},h.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(e,t){var i=r({gl:e.glplot.gl}),n=new u(e,i,t.uid);return i._trace=n,n.update(t),e.glplot.add(i),n}}}),f0=p({"src/traces/volume/index.js"(e,t){t.exports={attributes:fK(),supplyDefaults:fJ(),calc:fW(),colorbar:{min:"cmin",max:"cmax"},plot:fQ(),moduleType:"trace",name:"volume",basePlotModule:fz(),categories:["gl3d","showLegend"],meta:{}}}}),f1=p({"lib/volume.js"(e,t){t.exports=f0()}}),f2=p({"src/traces/mesh3d/defaults.js"(e,t){var r=eQ(),i=tv(),n=tQ(),a=fV();t.exports=function(e,t,o,s){function l(r,n){return i.coerce(e,t,a,r,n)}function c(e){var t=e.map(function(e){var t=l(e);return t&&i.isArrayOrTypedArray(t)?t:null});return t.every(function(e){return e&&e.length===t[0].length})&&t}if(!c(["x","y","z"])||(c(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j))){t.visible=!1;return}r.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],s),["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(e){l(e)}),l("contour.show")&&(l("contour.color"),l("contour.width")),"intensity"in e?(l("intensity"),l("intensitymode"),n(e,t,s,l,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?l("facecolor"):"vertexcolor"in e?l("vertexcolor"):l("color",o)),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),t._length=null}}}),f3=p({"src/traces/mesh3d/calc.js"(e,t){var r=t2();t.exports=function(e,t){t.intensity&&r(e,t,{vals:t.intensity,containerStr:"",cLetter:"c"})}}}),f5=p({"src/traces/mesh3d/convert.js"(e,t){var r=fh().gl_mesh3d,i=fh().delaunay_triangulate,n=fh().alpha_shape,a=fh().convex_hull,o=ff().parseColorScale,s=tv().isArrayOrTypedArray,l=fd(),c=t3().extractOpts,u=fY();function h(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var d=h.prototype;function f(e){for(var t=[],r=e.length,i=0;i=t-.5)return!1;return!0}d.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return s(r)&&void 0!==r[t]?e.textLabel=r[t]:r&&(e.textLabel=r),!0}},d.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var s,h=e.x.length,d=u(p(r.xaxis,e.x,t.dataScale[0],e.xcalendar),p(r.yaxis,e.y,t.dataScale[1],e.ycalendar),p(r.zaxis,e.z,t.dataScale[2],e.zcalendar));if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!g(e.i,h)||!g(e.j,h)||!g(e.k,h))return;s=u(m(e.i),m(e.j),m(e.k))}else s=0===e.alphahull?a(d):e.alphahull>0?n(e.alphahull,d):function(e,t){for(var r=["x","y","z"].indexOf(e),n=[],a=t.length,o=0;o2?e.slice(1,t-1):2===t?[(e[0]+e[1])/2]:e}function d(e){var t=e.length;return 1===t?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function f(e,t){var i=e.fullSceneLayout,c=e.dataScale,u=t._len,f={};function p(e,t){var r=i[t],a=c[l[t]];return n.simpleMap(e,function(e){return r.d2l(e)*a})}if(f.vectors=s(p(t._u,"xaxis"),p(t._v,"yaxis"),p(t._w,"zaxis"),u),!u)return{positions:[],cells:[]};var m=p(t._Xs,"xaxis"),g=p(t._Ys,"yaxis"),y=p(t._Zs,"zaxis");if(f.meshgrid=[m,g,y],f.gridFill=t._gridFill,t._slen)f.startingPositions=s(p(t._startsX,"xaxis"),p(t._startsY,"yaxis"),p(t._startsZ,"zaxis"));else{for(var v=g[0],x=h(m),b=h(y),_=Array(x.length*b.length),w=0,T=0;To&&(o=e[0]),e[1]s&&(s=e[1])}for(t in e.arcs.forEach(function(e){for(var t,r=-1,l=e.length;++ro&&(o=t[0]),t[1]s&&(s=t[1])}),e.objects)!function e(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"Point":l(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(l)}}(e.objects[t]);return[n,a,o,s]}function n(e,t){var r=t.id,i=t.bbox,n=null==t.properties?{}:t.properties,o=a(e,t);return null==r&&null==i?{type:"Feature",properties:n,geometry:o}:null==i?{type:"Feature",id:r,properties:n,geometry:o}:{type:"Feature",id:r,bbox:i,properties:n,geometry:o}}function a(e,t){var i=r(e.transform),n=e.arcs;function a(e){return i(e)}function o(e){for(var t=[],r=0,a=e.length;r1)i=function(e,t){var r,i=[],n=[];function a(e){var t=e<0?~e:e;(n[t]||(n[t]=[])).push({i:e,g:r})}function o(e){e.forEach(a)}function s(e){e.forEach(o)}return function e(t){switch(r=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":o(t.arcs);break;case"MultiLineString":case"Polygon":s(t.arcs);break;case"MultiPolygon":t.arcs.forEach(s)}}(e),n.forEach(null==t?function(e){i.push(e[0].i)}:function(e){t(e[0].g,e[e.length-1].g)&&i.push(e[0].i)}),i}(t,r);else for(n=0,i=Array(a=e.arcs.length);n1)for(var a,s,c=1,u=l(n[0]);cu&&(s=n[0],n[0]=n[c],n[c]=s,u=a);return n}).filter(function(e){return e.length>0})}}function c(e,t){for(var r=0,i=e.length;r>>1;e[n]=2))throw Error("n must be ≥2");var r,n=(l=e.bbox||i(e))[0],a=l[1],o=l[2],s=l[3];t={scale:[o-n?(o-n)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[n,a]}}var l,c,h=u(t),d=e.objects,f={};function p(e){return h(e)}for(c in d)f[c]=function e(t){var r;switch(t.type){case"GeometryCollection":r={type:"GeometryCollection",geometries:t.geometries.map(e)};break;case"Point":r={type:"Point",coordinates:p(t.coordinates)};break;case"MultiPoint":r={type:"MultiPoint",coordinates:t.coordinates.map(p)};break;default:return t}return null!=t.id&&(r.id=t.id),null!=t.bbox&&(r.bbox=t.bbox),null!=t.properties&&(r.properties=t.properties),r}(d[c]);return{type:"Topology",bbox:l,transform:t,objects:f,arcs:e.arcs.map(function(e){var t,r=0,i=1,n=e.length,a=Array(n);for(a[0]=h(e[0],0);++rtypeof t?e:(r=r||self).topojson=r.topojson||{})}}),pp=p({"src/lib/topojson_utils.js"(e,t){var r=t.exports={},i=pd().locationmodeToLayer,n=pf().feature;r.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")},r.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`},r.getTopojsonFeatures=function(e,t){var r=i[e.locationmode],a=t.objects[r];return n(t,a).features}}}),pm=p({"src/lib/geojson_utils.js"(e){var t=L().BADNUM;e.calcTraceToLineCoords=function(e){for(var r=e[0].trace,i=r.connectgaps,n=[],a=[],o=0;o0&&(n.push(a),a=[])}return a.length>0&&n.push(a),n},e.makeLine=function(e){return 1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}},e.makePolygon=function(e){if(1===e.length)return{type:"Polygon",coordinates:e};for(var t=Array(e.length),r=0;r{for(var i in t)r(e,i,{get:t[i],enumerable:!0})})(o,{COUNTRIES:()=>s,byAlpha2:()=>p,byAlpha3:()=>f,byM49:()=>m,createLookup:()=>c,lookup:()=>h,lookupAlpha3:()=>d,sanitize:()=>l}),t.exports=((e,t,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of n(t))a.call(e,s)||void 0===s||r(e,s,{get:()=>t[s],enumerable:!(o=i(t,s))||o.enumerable});return e})(r({},"__esModule",{value:!0}),o);var s=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\uD83C\uDDE6\uD83C\uDDFC","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\uD83C\uDDE6\uD83C\uDDEB","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","афғонистон","أفغانستان","افغانستان","د افغانستان اسلامی جمهوریت"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\uD83C\uDDE6\uD83C\uDDF4","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\uD83C\uDDE6\uD83C\uDDEE","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xc5land Islands",aliases:["\uD83C\uDDE6\uD83C\uDDFD","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\uD83C\uDDE6\uD83C\uDDF1","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:["\uD83C\uDDE6\uD83C\uDDE9","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:["\uD83C\uDDE6\uD83C\uDDEA","emirates","uae","الإمارات","الإمارات العربية المتحدة","الامارات","الامارات العربية المتحدة","دولة الإمارات العربية المتحدة"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\uD83C\uDDE6\uD83C\uDDF7","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\uD83C\uDDE6\uD83C\uDDF2","hayastan","hayastani hanrapetutyun","republic of armenia","հայաստան","հայաստանի հանրապետություն","հայք","հհ"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\uD83C\uDDE6\uD83C\uDDF8","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\uD83C\uDDE6\uD83C\uDDF6","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\uD83C\uDDF9\uD83C\uDDEB","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:["\uD83C\uDDE6\uD83C\uDDEC","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\uD83C\uDDE6\uD83C\uDDFA","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\uD83C\uDDE6\uD83C\uDDF9","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\uD83C\uDDE6\uD83C\uDDFF","azərbaycan","azərbaycan respublikası","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\uD83C\uDDE7\uD83C\uDDEE","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:["\uD83C\uDDE7\uD83C\uDDEA","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\uD83C\uDDE7\uD83C\uDDEF","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\uD83C\uDDE7\uD83C\uDDF6","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:["\uD83C\uDDE7\uD83C\uDDEB","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\uD83C\uDDE7\uD83C\uDDE9","bangla desh","east pakistan","gonaoprojatontri bangladesh","peoples republic of bangladesh","গণপ্রজাতন্ত্রী বাংলাদেশ","বাংলা দেশ","বাংলাদেশ","বিডি"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\uD83C\uDDE7\uD83C\uDDEC","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","бг","българия","република българия"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\uD83C\uDDE7\uD83C\uDDED","bahrein islands","kingdom of bahrain","البحرين","دولة البحرين","مملكة البحرين"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\uD83C\uDDE7\uD83C\uDDF8","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\uD83C\uDDE7\uD83C\uDDE6","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","бих","босна","босна и херцеговина","бх"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xe9lemy",aliases:["\uD83C\uDDE7\uD83C\uDDF1","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:["\uD83C\uDDE7\uD83C\uDDFE","republic of belarus","respublika belarus","respublika byelarus","беларуская рэспубліка","беларусь","белая русь","белоруссия","рб","республика беларусь","рэспубліка беларусь"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\uD83C\uDDE7\uD83C\uDDFF"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\uD83C\uDDE7\uD83C\uDDF2","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:["\uD83C\uDDE7\uD83C\uDDF4","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:["\uD83C\uDDE7\uD83C\uDDF7","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\uD83C\uDDE7\uD83C\uDDE7","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\uD83C\uDDE7\uD83C\uDDF3","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\uD83C\uDDE7\uD83C\uDDF9","kingdom of bhutan","འབྲུག","འབྲུག་ཡུལ་","འབྲུགཡུལ་་"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\uD83C\uDDE7\uD83C\uDDFB"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\uD83C\uDDE7\uD83C\uDDFC","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\uD83C\uDDE8\uD83C\uDDEB","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\uD83C\uDDE8\uD83C\uDDE6","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\uD83C\uDDE8\uD83C\uDDE8","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\uD83C\uDDE8\uD83C\uDDED","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","confœderatio 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:["\uD83C\uDDE8\uD83C\uDDF1","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\uD83C\uDDE8\uD83C\uDDF3","china pr","peoples republic of china","pr china","prc","中华人民共和国","中国"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xf4te d'Ivoire",aliases:["\uD83C\uDDE8\uD83C\uDDEE","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:["\uD83C\uDDE8\uD83C\uDDF2","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\uD83C\uDDE8\uD83C\uDDE9","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:["\uD83C\uDDE8\uD83C\uDDEC","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\uD83C\uDDE8\uD83C\uDDF0","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\uD83C\uDDE8\uD83C\uDDF4","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\uD83C\uDDF0\uD83C\uDDF2","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","إتحاد القمر","اتحاد جزر القمر","الاتحاد القمري","القمر","جزر القمر","جمهورية القمر المتحدة","جمهورية جزر القمر الاتحادية الإسلامية","جمهورية جزرالقمر المتحدة"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\uD83C\uDDE8\uD83C\uDDFB","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:["\uD83C\uDDE8\uD83C\uDDF7","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\uD83C\uDDE8\uD83C\uDDFA","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xe7ao",aliases:["\uD83C\uDDE8\uD83C\uDDFC","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","curaςao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\uD83C\uDDE8\uD83C\uDDFD","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\uD83C\uDDF0\uD83C\uDDFE","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\uD83C\uDDE8\uD83C\uDDFE","greek administration of southern cyprus","greek cypriot state","guney kıbrıs","guney kıbrıs rum cumhuriyeti","guney kıbrıs rum kesimi","guney kıbrıs rum yonetimi","kipriaki dhimokratia","kıbrıs","kıbrıs cumhuriyeti","kıbrıs rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","κυπριακη δημοκρατια","κυπρος"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\uD83C\uDDE8\uD83C\uDDFF","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\uD83C\uDDE9\uD83C\uDDEA","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\uD83C\uDDE9\uD83C\uDDEF","la republique de djibouti","republic of djibouti","republique de djibouti","جمهورية جيبوتي","جيبوتي"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\uD83C\uDDE9\uD83C\uDDF2","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\uD83C\uDDE9\uD83C\uDDF0","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\uD83C\uDDE9\uD83C\uDDF4","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\uD83C\uDDE9\uD83C\uDDFF","peoples democratic republic of algeria","الجزائر","الجزاير","الجمهورية الجزائرية الديمقراطية الشعبية","الدزاير","دزاير"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\uD83C\uDDEA\uD83C\uDDE8","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:["\uD83C\uDDEA\uD83C\uDDEC","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","جمهورية مصر العربية","مصر"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\uD83C\uDDEA\uD83C\uDDF7","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","إرتريا","إريتريا","ارتريا","ارتيريا","اريتريا","دولة إرتريا","دولة إريتريا","ሃገረ ኤርትራ","ኤርትራ"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\uD83C\uDDEA\uD83C\uDDED","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\uD83C\uDDEA\uD83C\uDDF8","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\uD83C\uDDEA\uD83C\uDDEA","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\uD83C\uDDEA\uD83C\uDDF9","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","ኢትዮጵያ","የኢትዮጵያ ፌዴራላዊ ዴሞክራሲያዊ ሪፐብሊክ"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\uD83C\uDDEB\uD83C\uDDEE","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\uD83C\uDDEB\uD83C\uDDEF","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:["\uD83C\uDDEB\uD83C\uDDF0","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\uD83C\uDDEB\uD83C\uDDF7","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\uD83C\uDDEB\uD83C\uDDF4","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:["\uD83C\uDDEB\uD83C\uDDF2","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:["\uD83C\uDDEC\uD83C\uDDE6","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:["\uD83C\uDDEC\uD83C\uDDE7","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:["\uD83C\uDDEC\uD83C\uDDEA","georgia country","republic of georgia","sakartvelo","қырҭтәыла","საქართველო","საქართველოს რესპუბლიკა"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\uD83C\uDDEC\uD83C\uDDEC","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\uD83C\uDDEC\uD83C\uDDED","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\uD83C\uDDEC\uD83C\uDDEE","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\uD83C\uDDEC\uD83C\uDDF3","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\uD83C\uDDEC\uD83C\uDDF5"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\uD83C\uDDEC\uD83C\uDDF2","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\uD83C\uDDEC\uD83C\uDDFC","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\uD83C\uDDEC\uD83C\uDDF6","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:["\uD83C\uDDEC\uD83C\uDDF7","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","δημοκρατια της ελλαδας","δημοκρατια της ελλαδος","ελλαδα","ελλας","ελλας ελλαδα","ελληνικη δημοκρατια"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\uD83C\uDDEC\uD83C\uDDE9"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\uD83C\uDDEC\uD83C\uDDF1","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\uD83C\uDDEC\uD83C\uDDF9","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\uD83C\uDDEC\uD83C\uDDEB","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\uD83C\uDDEC\uD83C\uDDFA","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\uD83C\uDDEC\uD83C\uDDFE","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\uD83C\uDDED\uD83C\uDDF0","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:["\uD83C\uDDED\uD83C\uDDF2","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:["\uD83C\uDDED\uD83C\uDDF3","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\uD83C\uDDED\uD83C\uDDF7","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\uD83C\uDDED\uD83C\uDDF9","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\uD83C\uDDED\uD83C\uDDFA","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\uD83C\uDDEE\uD83C\uDDE9","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\uD83C\uDDEE\uD83C\uDDF2","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\uD83C\uDDEE\uD83C\uDDF3","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","आर्यवर्त","इंडिया","इण्डिया","भारत","भारत गणराज्य","भारतवर्ष","हिंदुस्तान","हिन्दुस्तान","हिन्दोस्तान"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\uD83C\uDDEE\uD83C\uDDF4","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\uD83C\uDDEE\uD83C\uDDEA","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\uD83C\uDDEE\uD83C\uDDF7","iran","islamic rep iran","islamic republic of iran","persia","ایران","ایرانزمین","پارس","جمهوری اسلامی ايران","جمهوری اسلامی ایران","كشور شاهنشاهی ايران"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\uD83C\uDDEE\uD83C\uDDF6","eraq","iraqe","komar i eraq","republic of iraq","الجمهورية العراقية","العراق","جمهورية العراق","عراق","عێراق"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\uD83C\uDDEE\uD83C\uDDF8","icelandic republic","island","ly\xf0veldi\xf0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\uD83C\uDDEE\uD83C\uDDF1","erez yisrael","medinat yisrael","state of israel","yisrael","ישראל","מדינת ישראל"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\uD83C\uDDEE\uD83C\uDDF9","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\uD83C\uDDEF\uD83C\uDDF2","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\uD83C\uDDEF\uD83C\uDDEA","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:["\uD83C\uDDEF\uD83C\uDDF4","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","الأردن","الاردن","المملكة الأردنية الهاشمية","المملكة الاردنية الهاشمية"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\uD83C\uDDEF\uD83C\uDDF5","state of japan","あきつしま","おおやしま","しきしま","ジャパン","しんしゅう","にっぽん","にっぽんこく","にほん","にほんこく","ひいずるくに","ふそう","大八州","扶木之地","扶桑","扶桑国","敷島","日出る国","日本","榑木之地","瑞穂国","神州","秋津島","葦原中国"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\uD83C\uDDF0\uD83C\uDDFF","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","казахстан","қазақстан","қазақстан республикасы","республика казахстан","рк"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\uD83C\uDDF0\uD83C\uDDEA","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\uD83C\uDDF0\uD83C\uDDEC","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","кр","кыргыз республикасы","кыргызстан"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\uD83C\uDDF0\uD83C\uDDED","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","កម្ពុជា","ព្រះរាជាណាចក្រកម្ពុជា"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\uD83C\uDDF0\uD83C\uDDEE","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\uD83C\uDDF0\uD83C\uDDF3","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:["\uD83C\uDDF0\uD83C\uDDF7","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","남조선","남한","대한","대한민국","코리아","한국"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\uD83C\uDDF0\uD83C\uDDFC","state of kuwait","الكويت","دولة الكويت"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\uD83C\uDDF1\uD83C\uDDE6","laos","sathalanalat paxathipatai paxaxon lao","ສາທາລະນະລັດ ປະຊາທິປະໄຕ ປະຊາຊົນລາວ","ປະເທດລາວ","ລາວ"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\uD83C\uDDF1\uD83C\uDDE7","lebanese republic","republic of lebanon","state of lebanon","الجمهورية اللبنانية","لبنان"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\uD83C\uDDF1\uD83C\uDDF7","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\uD83C\uDDF1\uD83C\uDDFE","state of libya","الجماهيرية العربية الليبية الشعبية الإشتراكية","الجمهورية الليبية","الليبي","الليبية","الليبين","دولة ليبيا","ليببيا","ليبي","ليبيا","ليبية"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\uD83C\uDDF1\uD83C\uDDE8","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\uD83C\uDDF1\uD83C\uDDEE","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\uD83C\uDDF1\uD83C\uDDF0","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","இலங்கை","இலங்கை சனநாயக சோசலிசக் குடியரசு","இலங்கை சனநாயக சோஷலிசக் குடியரசு","ஈழம்","சிலோன்","ලංකාව","ශ්රී ලංකා ප්රජාතන්ත්රවාදී සමාජවාදී ජනරජය","ශ්රී ලංකාව","ශ්‍රී ලංකාව"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\uD83C\uDDF1\uD83C\uDDF8","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\uD83C\uDDF1\uD83C\uDDF9","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\uD83C\uDDF1\uD83C\uDDFA","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:["\uD83C\uDDF1\uD83C\uDDFB","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letmо","letmо vabamо","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\uD83C\uDDF2\uD83C\uDDF4","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","中國澳門特別行政區","澳門"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\uD83C\uDDF2\uD83C\uDDEB","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:["\uD83C\uDDF2\uD83C\uDDE6","kingdom of morocco","المغرب","المملكة المغربية","ⴰⵎⵓⵔ ⵏ ⵡⴰⴽⵓⵛ","ⴰⵎⵕⵕⵓⴽ","ⵍⵎⵕⵕⵓⴽ","ⵍⵎⵖⵔⵉⴱ","ⵜⴰⴳⵍⴷⵉⵜ ⵏ ⵍⵎⵖⵔⵉⴱ"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\uD83C\uDDF2\uD83C\uDDE8","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:["\uD83C\uDDF2\uD83C\uDDE9","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","молдова"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\uD83C\uDDF2\uD83C\uDDEC","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\uD83C\uDDF2\uD83C\uDDFB","dhivehi raajjeyge jumhooriyyaa","republic of maldives","ދިވެހި ރާއްޖެ","ދިވެހިރާއްޖެ","ދިވެހިރާއްޖޭގެ ޖުމުހޫރިއްޔާ","ދިވެހިރާއްޖޭގެ ޖުމްހޫރިއްޔާ"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\uD83C\uDDF2\uD83C\uDDFD","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:["\uD83C\uDDF2\uD83C\uDDED","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:["\uD83C\uDDF2\uD83C\uDDF0","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","македонија","република македонија","република северна македонија","рм","рсм","северна македонија"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\uD83C\uDDF2\uD83C\uDDF1","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\uD83C\uDDF2\uD83C\uDDF9","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\uD83C\uDDF2\uD83C\uDDF2","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","ပြည်ထောင်စု မြန်မာနိုင်ငံ","ပြည်ထောင်စု မြန်မာနိုင်ငံတော်","ပြည်ထောင်စု သမ္မတ မြန်မာနိုင်ငံ","ပြည်ထောင်စု သမ္မတ မြန်မာနိုင်ငံတော်","ပြည်ထောင်စုမြန်မာနိုင်ငံတော်","ပြည်ထောင်စုသမ္မတမြန်မာနိုင်ငံ","ပြ‌ည်ထောင်စုသမ္မတမြန်မာနိုင်ငံ","ပြည်ထောင်စုသမ္မတမြန်မာနိုင်ငံတော်","ဗမာပြည်","မြန်မာ","မြန်မာနိုင်ငံ","မြန်မာနိုင်ငံတော်","မြန်မာပြည်"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\uD83C\uDDF2\uD83C\uDDEA","crna cora","црна гора"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\uD83C\uDDF2\uD83C\uDDF3","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","монгол","монгол улс","ᠮᠤᠩᠭᠤᠯ ᠤᠯᠤᠰ"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\uD83C\uDDF2\uD83C\uDDF5","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:["\uD83C\uDDF2\uD83C\uDDFF","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\uD83C\uDDF2\uD83C\uDDF7","islamic republic of mauritania","الجمهورية الإسلامية الموريتانية","موريتانيا"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\uD83C\uDDF2\uD83C\uDDF8","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\uD83C\uDDF2\uD83C\uDDF6","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\uD83C\uDDF2\uD83C\uDDFA","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\uD83C\uDDF2\uD83C\uDDFC","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\uD83C\uDDF2\uD83C\uDDFE","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\uD83C\uDDFE\uD83C\uDDF9","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\uD83C\uDDF3\uD83C\uDDE6","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\uD83C\uDDF3\uD83C\uDDE8","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:["\uD83C\uDDF3\uD83C\uDDEA","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\uD83C\uDDF3\uD83C\uDDEB","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:["\uD83C\uDDF3\uD83C\uDDEC","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\uD83C\uDDF3\uD83C\uDDEE","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\uD83C\uDDF3\uD83C\uDDFA"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\uD83C\uDDF3\uD83C\uDDF1","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\uD83C\uDDF3\uD83C\uDDF4","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\uD83C\uDDF3\uD83C\uDDF5","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","नेपाल","संघिय लोकतान्त्रिक गणतन्त्र नेपाल","संघिय लोकतान्त्रिक गणतन्त्रात्मक नेपाल","संघीय लोकतान्त्रिक गणतन्त्र नेपाल"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Naoero",aliases:["\uD83C\uDDF3\uD83C\uDDF7","nauru","pleasant island","republic of naoero","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\uD83C\uDDF3\uD83C\uDDFF","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\uD83C\uDDF4\uD83C\uDDF2","sultanate of oman","uman","سلطنة عمان","عمان"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\uD83C\uDDF5\uD83C\uDDF0","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","اسلامی جمہوریہ پاکستان","باکستان","پاکستان"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\uD83C\uDDF5\uD83C\uDDE6","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\uD83C\uDDF5\uD83C\uDDF3","occas island","pisskern aliеn","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\uD83C\uDDF5\uD83C\uDDEA","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\uD83C\uDDF5\uD83C\uDDED","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\uD83C\uDDF5\uD83C\uDDFC","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","パラオ","パラオ共和国"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\uD83C\uDDF5\uD83C\uDDEC","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\uD83C\uDDF5\uD83C\uDDF1","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\uD83C\uDDF5\uD83C\uDDF7","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:["\uD83C\uDDF0\uD83C\uDDF5","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","공화국","북조선","북한","조선","조선민주주의인민공화국"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\uD83C\uDDF5\uD83C\uDDF9","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\uD83C\uDDF5\uD83C\uDDFE","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\uD83C\uDDF5\uD83C\uDDF8","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","أراضي فلسطينية","الأراضي الفلسطينية","الدولة الفلسطينية","السلطة الفلسطينية","السلطة الوطنية الفلسطينية","الضفة الغربية وقطاع غزة","دولة فلسطين","فلسطين"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\uD83C\uDDF5\uD83C\uDDEB","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:["\uD83C\uDDF6\uD83C\uDDE6","state of qatar","إمارة قطر","دولة قطر","قطر"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xe9union",aliases:["\uD83C\uDDF7\uD83C\uDDEA","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\uD83C\uDDF7\uD83C\uDDF4"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\uD83C\uDDF7\uD83C\uDDFA","federation of russia","russia","россииская федерация","россия","рф"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\uD83C\uDDF7\uD83C\uDDFC","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:["\uD83C\uDDF8\uD83C\uDDE6","kingdom of saudi arabia","الدولة السعودية","الدوله السعوديه","السعودية","السعوديه","العربية السعودية","المملكة","المملكة السعودية","المملكة العربية","المملكة العربية السعودية","المملكه","المملكه العربيه السعوديه","بلاد الحرمين الشريفين","دولة آل سعود","سعودية","سعوديه","منبع الرسالة","مهبط الوحي"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\uD83C\uDDF8\uD83C\uDDE9","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","السودان","جمهورية السودان"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\uD83C\uDDF8\uD83C\uDDF3","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\uD83C\uDDF8\uD83C\uDDEC","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","சிங்கப்பூர்","சிங்கப்பூர் குடியரசு","சிங்கை","ஸிங்கபூர்"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\uD83C\uDDEC\uD83C\uDDF8","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\uD83C\uDDF8\uD83C\uDDED","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:["\uD83C\uDDF8\uD83C\uDDEF","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\uD83C\uDDF8\uD83C\uDDE7"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\uD83C\uDDF8\uD83C\uDDF1","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\uD83C\uDDF8\uD83C\uDDFB","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\uD83C\uDDF8\uD83C\uDDF2","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\uD83C\uDDF8\uD83C\uDDF4","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","الصومال","جمهورية الصومال","جمهورية الصومال الديموقراطية","جمهورية الصومال الفيدرالية","صومال"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\uD83C\uDDF5\uD83C\uDDF2","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:["\uD83C\uDDF7\uD83C\uDDF8","republic of serbia","republika srbija","република србија","србија"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\uD83C\uDDF8\uD83C\uDDF8","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\uD83C\uDDF8\uD83C\uDDF9","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:["\uD83C\uDDF8\uD83C\uDDF7","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\uD83C\uDDF8\uD83C\uDDF0","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\uD83C\uDDF8\uD83C\uDDEE","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\uD83C\uDDF8\uD83C\uDDEA","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\uD83C\uDDF8\uD83C\uDDFF","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\uD83C\uDDF8\uD83C\uDDFD","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:["\uD83C\uDDF8\uD83C\uDDE8","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\uD83C\uDDF8\uD83C\uDDFE","surya","syria","الجمهورية العربية السورية","الشام","سوريا","سورية"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\uD83C\uDDF9\uD83C\uDDE8","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\uD83C\uDDF9\uD83C\uDDE9","la republique du tchad","republic of chad","republique du tchad","tchad","تشاد","جمهورية تشاد"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\uD83C\uDDF9\uD83C\uDDEC","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\uD83C\uDDF9\uD83C\uDDED","kingdom of siam","kingdom of thailand","siam","thai","ไทย","ประเทศไทย","ประเทศสยาม","เมืองไทย","ราชอาณาจักรไทย","ราชอาณาจักรสยาม","สยาม"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\uD83C\uDDF9\uD83C\uDDEF","jumhurii tojikiston","republic of tajikistan","тоҷикистон","тҷ","тҷк","ҷт","ҷумҳурии тоҷикистон"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\uD83C\uDDF9\uD83C\uDDF0","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\uD83C\uDDF9\uD83C\uDDF2"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\uD83C\uDDF9\uD83C\uDDF1","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:["\uD83C\uDDF9\uD83C\uDDF4","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\uD83C\uDDF9\uD83C\uDDF9","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\uD83C\uDDF9\uD83C\uDDF3","republic of tunisia","tunisian republic","الجمهورية التونسية","تونس","تونس الخضراء"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xfcrkiye",aliases:["\uD83C\uDDF9\uD83C\uDDF7","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\uD83C\uDDF9\uD83C\uDDFB","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\uD83C\uDDF9\uD83C\uDDFC","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","中華民國","中華民國(臺灣)","中華臺北","台灣","臺澎金馬","臺灣"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\uD83C\uDDF9\uD83C\uDDFF","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:["\uD83C\uDDFA\uD83C\uDDEC","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\uD83C\uDDFA\uD83C\uDDE6","ukr","ukraina","ukrainia","ukrayina","вкраіна","украіна"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\uD83C\uDDFA\uD83C\uDDF2","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\uD83C\uDDFA\uD83C\uDDFE","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\uD83C\uDDFA\uD83C\uDDF8","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:["\uD83C\uDDFA\uD83C\uDDFF","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\uD83C\uDDFB\uD83C\uDDE6","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:["\uD83C\uDDFB\uD83C\uDDE8","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\uD83C\uDDFB\uD83C\uDDEA","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:["\uD83C\uDDFB\uD83C\uDDEC","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:["\uD83C\uDDFB\uD83C\uDDEE","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:["\uD83C\uDDFB\uD83C\uDDF3","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:["\uD83C\uDDFB\uD83C\uDDFA","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:["\uD83C\uDDFC\uD83C\uDDEB","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:["\uD83C\uDDFC\uD83C\uDDF8","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\uD83C\uDDFE\uD83C\uDDEA","rep yemen","republic of yemen","الجمهورية اليمنية","اليمن","دولة اليمن"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\uD83C\uDDFF\uD83C\uDDE6","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:["\uD83C\uDDFF\uD83C\uDDF2","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\uD83C\uDDFF\uD83C\uDDFC","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function l(e){return e.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 c(e){let t=new Map,r=new Map,i=new Map;for(let n of e)t.set(n.iso3,n),n.iso2&&r.set(n.iso2,n),n.m49&&i.set(n.m49,n);let n=new Map;for(let t of e)for(let e of[t.name,...t.aliases]){let r=l(e),i=n.get(r);if(void 0!==i&&i!==t.iso3)throw Error(`Duplicate name/alias "${r}": ${i} vs ${t.iso3}`);n.set(r,t.iso3)}function a(e){if(null==e)return;let a=String(e).trim();if(!a)return;if(/^\d+$/.test(a)){let e=i.get(String(parseInt(a,10)).padStart(3,"0"));if(e)return e}if(/^[A-Za-z]{2}$/.test(a)){let e=r.get(a.toUpperCase());if(e)return e}if(/^[A-Za-z]{3}$/.test(a)){let e=t.get(a.toUpperCase());if(e)return e}let o=n.get(l(a));return void 0===o?void 0:t.get(o)}return{lookup:a,lookupAlpha3:function(e){var t;return null==(t=a(e))?void 0:t.iso3},byAlpha3:t,byAlpha2:r,byM49:i}}var u=c(s),h=u.lookup,d=u.lookupAlpha3,f=u.byAlpha3,p=u.byAlpha2,m=u.byM49}}),py=p({"node_modules/@turf/helpers/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t={centimeters:0x25f96350,centimetres:0x25f96350,degrees:360/(2*Math.PI),feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:6371008.8,metres:6371008.8,miles:3958.761333810546,millimeters:0x17bbde120,millimetres:0x17bbde120,nauticalmiles:6371008.8/1852,radians:1,yards:6967335.223679999},r={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(e,t,r={}){let n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function n(e,t,r={}){if(!e)throw Error("coordinates is required");if(!Array.isArray(e))throw Error("coordinates must be an Array");if(e.length<2)throw Error("coordinates must be at least 2 numbers long");if(!p(e[0])||!p(e[1]))throw Error("coordinates must contain numbers");return i({type:"Point",coordinates:e},t,r)}function a(e,t,r={}){for(let t of e){if(t.length<4)throw Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(t[t.length-1].length!==t[0].length)throw Error("First and last Position are not equivalent.");for(let e=0;e180?e-360:e<-180?e+360:e},e.bearingToAzimuth=function(e){let t=e%360;return t<0&&(t+=360),t},e.convertArea=function(e,t="meters",i="kilometers"){if(!(e>=0))throw Error("area must be a positive number");let n=r[t];if(!n)throw Error("invalid original units");let a=r[i];if(!a)throw Error("invalid final units");return e/n*a},e.convertLength=function(e,t="kilometers",r="kilometers"){if(!(e>=0))throw Error("length must be a positive number");return h(d(e,t),r)},e.degreesToRadians=function(e){return e%360*Math.PI/180},e.earthRadius=6371008.8,e.factors=t,e.feature=i,e.featureCollection=s,e.geometry=function(e,t,r={}){switch(e){case"Point":return n(t).geometry;case"LineString":return o(t).geometry;case"Polygon":return a(t).geometry;case"MultiPoint":return c(t).geometry;case"MultiLineString":return l(t).geometry;case"MultiPolygon":return u(t).geometry;default:throw Error(e+" is invalid")}},e.geometryCollection=function(e,t,r={}){return i({type:"GeometryCollection",geometries:e},t,r)},e.isNumber=p,e.isObject=function(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)},e.lengthToDegrees=function(e,t){return f(d(e,t))},e.lengthToRadians=d,e.lineString=o,e.lineStrings=function(e,t,r={}){return s(e.map(e=>o(e,t)),r)},e.multiLineString=l,e.multiPoint=c,e.multiPolygon=u,e.point=n,e.points=function(e,t,r={}){return s(e.map(e=>n(e,t)),r)},e.polygon=a,e.polygons=function(e,t,r={}){return s(e.map(e=>a(e,t)),r)},e.radiansToDegrees=f,e.radiansToLength=h,e.round=function(e,t=0){if(t&&!(t>=0))throw Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r},e.validateBBox=function(e){if(!e)throw Error("bbox is required");if(!Array.isArray(e))throw Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw Error("bbox must be an Array of 4 or 6 numbers");e.forEach(e=>{if(!p(e))throw Error("bbox must only contain numbers")})},e.validateId=function(e){if(!e)throw Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw Error("id must be a number or a string")}}}),pv=p({"node_modules/@turf/meta/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=py();function r(e,t,i){if(null!==e)for(var n,a,o,s,l,c,u,h,d=0,f=0,p=e.type,m="FeatureCollection"===p,g="Feature"===p,y=m?e.features.length:1,v=0;vc||f>u||p>h){l=r,c=n,u=f,h=p,o=0;return}if(!1===i(t.lineString.call(void 0,[l,r],e.properties),n,a,p,o))return!1;o++,l=r}))return!1}}})}function l(e,r){if(!e)throw Error("geojson is required");o(e,function(e,i,n){if(null!==e.geometry){var a=e.geometry.type,o=e.geometry.coordinates;switch(a){case"LineString":if(!1===r(e,i,n,0,0))return!1;break;case"Polygon":for(var s=0;se+function(e){let t=0,r;switch(e.type){case"Polygon":return n(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(s(e[0]));for(let r=1;r=t?(i+2)%t:i+2],l=n[0]*o,c=a[1]*o;r+=(s[0]*o-l)*Math.sin(c),i++}return r*a}e.area=i,e.default=i}}),pb=p({"node_modules/@turf/centroid/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=py(),r=pv();function i(e,n={}){let a=0,o=0,s=0;return r.coordEach.call(void 0,e,function(e){a+=e[0],o+=e[1],s++},!0),t.point.call(void 0,[a/s,o/s],n.properties)}e.centroid=i,e.default=i}}),p_=p({"node_modules/d3-geo/node_modules/d3-array/dist/d3-array.js"(e,t){(function(e){function t(e,t){return et?1:e>=t?0:NaN}function r(e){var r;return 1===e.length&&(r=e,e=function(e,i){return t(r(e),i)}),{left:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;0>e(t[a],r)?i=a+1:n=a}return i},right:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;e(t[a],r)>0?n=a:i=a+1}return i}}}var i=r(t),n=i.right,a=i.left;function o(e,t){return[e,t]}function s(e){return null===e?NaN:+e}function l(e,t){var r,i,n=e.length,a=0,o=-1,l=0,c=0;if(null==t)for(;++o1)return c/(a-1)}function c(e,t){var r=l(e,t);return r&&Math.sqrt(r)}function u(e,t){var r,i,n,a=e.length,o=-1;if(null==t){for(;++o=r)for(i=n=r;++or&&(i=r),n=r)for(i=n=r;++or&&(i=r),n=0?(a>=y?10:a>=v?5:a>=x?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(a>=y?10:a>=v?5:a>=x?2:1)}function _(e,t,r){var i=Math.abs(t-e)/Math.max(0,r),n=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),a=i/n;return a>=y?n*=10:a>=v?n*=5:a>=x&&(n*=2),t=1)return+r(e[i-1],i-1,e);var i,n=(i-1)*t,a=Math.floor(n),o=+r(e[a],a,e);return o+(r(e[a+1],a+1,e)-o)*(n-a)}}function M(e,t){var r,i,n=e.length,a=-1;if(null==t){for(;++a=r)for(i=r;++ar&&(i=r)}else for(;++a=r)for(i=r;++ar&&(i=r);return i}function k(e){if(!(n=e.length))return[];for(var t=-1,r=M(e,A),i=Array(r);++te?1:t>=e?0:NaN},e.deviation=c,e.extent=u,e.histogram=function(){var e=m,t=u,r=w;function i(i){var a,o,s=i.length,l=Array(s);for(a=0;ah;)d.pop(),--f;var p,m=Array(f+1);for(a=0;a<=f;++a)(p=m[a]=[]).x0=a>0?d[a-1]:u,p.x1=a=r)for(i=r;++ai&&(i=r)}else for(;++a=r)for(i=r;++ai&&(i=r);return i},e.mean=function(e,t){var r,i=e.length,n=i,a=-1,o=0;if(null==t)for(;++a=0;)for(t=(i=e[n]).length;--t>=0;)r[--o]=i[t];return r},e.min=M,e.pairs=function(e,t){null==t&&(t=o);for(var r=0,i=e.length-1,n=e[0],a=Array(i<0?0:i);rr(n=e[a],s)||0!==r(s,s))&&(s=n,o=a);if(0===r(s,s))return o}},e.shuffle=function(e,t,r){for(var i,n,a=(r??e.length)-(t=null==t?0:+t);a;)n=Math.random()*a--|0,i=e[a+t],e[a+t]=e[n+t],e[n+t]=i;return e},e.sum=function(e,t){var r,i=e.length,n=-1,a=0;if(null==t)for(;++n0)return[e];if((i=t0)for(e=Math.ceil(e/o),a=Array(n=Math.ceil((t=Math.floor(t/o))-e+1));++stypeof t?e:e.d3=e.d3||{})}}),pw=p({"node_modules/d3-geo/dist/d3-geo.js"(e,t){var r,i;r=e,i=function(e,t){function r(){return new i}function i(){this.reset()}i.prototype={constructor:i,reset:function(){this.s=this.t=0},add:function(e){a(n,e,this.t),a(this,n.s,this.s),this.s?this.t+=n.t:this.s=n.t},valueOf:function(){return this.s}};var n=new i;function a(e,t,r){var i=e.s=t+r,n=i-t;e.t=t-(i-n)+(r-n)}var o=Math.PI,s=o/2,l=o/4,c=2*o,u=180/o,h=o/180,d=Math.abs,f=Math.atan,p=Math.atan2,m=Math.cos,g=Math.ceil,y=Math.exp,v=Math.log,x=Math.pow,b=Math.sin,_=Math.sign||function(e){return e>0?1:e<0?-1:0},w=Math.sqrt,T=Math.tan;function M(e){return e>1?0:e<-1?o:Math.acos(e)}function k(e){return e>1?s:e<-1?-s:Math.asin(e)}function A(){}function S(e,t){e&&C.hasOwnProperty(e.type)&&C[e.type](e,t)}var E={Feature:function(e,t){S(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,i=-1,n=r.length;++i=0?1:-1,n=i*r,a=m(t),o=b(t),s=F*o,c=R*a+s*m(n),u=s*i*b(n);j.add(p(u,c)),O=e,R=a,F=o}function G(e){return[p(e[1],e[0]),k(e[2])]}function W(e){var t=e[0],r=e[1],i=m(r);return[i*m(t),i*b(t),b(r)]}function Y(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Z(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function $(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function X(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function K(e){var t=w(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var J,Q,ee,et,er,ei,en,ea,eo,es,el=r(),ec={point:eu,lineStart:ed,lineEnd:ef,polygonStart:function(){ec.point=ep,ec.lineStart=em,ec.lineEnd=eg,el.reset(),N.polygonStart()},polygonEnd:function(){N.polygonEnd(),ec.point=eu,ec.lineStart=ed,ec.lineEnd=ef,j<0?(J=-(ee=180),Q=-(et=90)):el>1e-6?et=90:el<-1e-6&&(Q=-90),es[0]=J,es[1]=ee},sphere:function(){J=-(ee=180),Q=-(et=90)}};function eu(e,t){eo.push(es=[J=e,ee=e]),tet&&(et=t)}function eh(e,t){var r=W([e*h,t*h]);if(ea){var i=Z(ea,r),n=Z([i[1],-i[0],0],i);K(n),n=G(n);var a,o=e-er,s=o>0?1:-1,l=n[0]*u*s,c=d(o)>180;c^(s*eret&&(et=a):c^(s*er<(l=(l+360)%360-180)&&let&&(et=t)),c?eey(J,ee)&&(ee=e):ey(e,ee)>ey(J,ee)&&(J=e):ee>=J?(eee&&(ee=e)):e>er?ey(J,e)>ey(J,ee)&&(ee=e):ey(e,ee)>ey(J,ee)&&(J=e)}else eo.push(es=[J=e,ee=e]);tet&&(et=t),ea=r,er=e}function ed(){ec.point=eh}function ef(){es[0]=J,es[1]=ee,ec.point=eu,ea=null}function ep(e,t){if(ea){var r=e-er;el.add(d(r)>180?r+(r>0?360:-360):r)}else ei=e,en=t;N.point(e,t),eh(e,t)}function em(){N.lineStart()}function eg(){ep(ei,en),N.lineEnd(),d(el)>1e-6&&(J=-(ee=180)),es[0]=J,es[1]=ee,ea=null}function ey(e,t){return(t-=e)<0?t+360:t}function ev(e,t){return e[0]-t[0]}function ex(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:to?e+Math.round(-e/c)*c:e,t]}function eX(e,t,r){return(e%=c)?t||r?eZ(eJ(e),eQ(t,r)):eJ(e):t||r?eQ(t,r):e$}function eK(e){return function(t,r){return[(t+=e)>o?t-c:t<-o?t+c:t,r]}}function eJ(e){var t=eK(e);return t.invert=eK(-e),t}function eQ(e,t){var r=m(e),i=b(e),n=m(t),a=b(t);function o(e,t){var o=m(t),s=m(e)*o,l=b(e)*o,c=b(t),u=c*r+s*i;return[p(l*n-u*a,s*r-c*i),k(u*n+l*a)]}return o.invert=function(e,t){var o=m(t),s=m(e)*o,l=b(e)*o,c=b(t),u=c*n-l*a;return[p(l*n+c*a,s*r+u*i),k(u*r-s*i)]},o}function e0(e){function t(t){return t=e(t[0]*h,t[1]*h),t[0]*=u,t[1]*=u,t}return e=eX(e[0]*h,e[1]*h,e.length>2?e[2]*h:0),t.invert=function(t){return t=e.invert(t[0]*h,t[1]*h),t[0]*=u,t[1]*=u,t},t}function e1(e,t,r,i,n,a){if(r){var o=m(t),s=b(t),l=i*r;null==n?(n=t+i*c,a=t-l/2):(n=e2(o,n),a=e2(o,a),(i>0?na)&&(n+=i*c));for(var u,h=n;i>0?h>a:h-t[2]?-r:r)+c-1e-6)%c}function e3(){var e,t=[];return{point:function(t,r,i){e.push([t,r,i])},lineStart:function(){t.push(e=[])},lineEnd:A,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],e=null,r}}}function e5(e,t){return 1e-6>d(e[0]-t[0])&&1e-6>d(e[1]-t[1])}function e4(e,t,r,i){this.x=e,this.z=t,this.o=r,this.e=i,this.v=!1,this.n=this.p=null}function e6(e,t,r,i,n){var a,o,s=[],l=[];if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,r,i=e[0],o=e[t];if(e5(i,o)){if(!i[2]&&!o[2]){for(n.lineStart(),a=0;a=0;--a)n.point((u=c[a])[0],u[1]);else i(d.x,d.p.x,-1,n);d=d.p}c=(d=d.o).z,f=!f}while(!d.v);n.lineEnd()}}}function e8(e){if(t=e.length){for(var t,r,i=0,n=e[0];++i=0?1:-1,z=I*P,D=z>o,O=w*C;if(e9.add(p(O*I*b(z),T*L+O*m(z))),u+=D?P+I*c:P,D^x>=r^S>=r){var R=Z(W(v),W(A));K(R);var F=Z(a,R);K(F);var j=(D^P>=0?-1:1)*k(F[2]);(i>j||i===j&&(R[0]||R[1]))&&(h+=D^P>=0?1:-1)}}return(u<-1e-6||u<1e-6&&e9<-1e-6)^1&h}function tt(e,r,i,n){return function(a){var o,s,l,c=r(a),u=e3(),h=r(u),d=!1,f={point:p,lineStart:g,lineEnd:y,polygonStart:function(){f.point=v,f.lineStart=x,f.lineEnd=b,s=[],o=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=y,s=t.merge(s);var e=te(o,n);s.length?(d||(a.polygonStart(),d=!0),e6(s,ti,e,i,a)):e&&(d||(a.polygonStart(),d=!0),a.lineStart(),i(null,null,1,a),a.lineEnd()),d&&(a.polygonEnd(),d=!1),s=o=null},sphere:function(){a.polygonStart(),a.lineStart(),i(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function p(t,r){e(t,r)&&a.point(t,r)}function m(e,t){c.point(e,t)}function g(){f.point=m,c.lineStart()}function y(){f.point=p,c.lineEnd()}function v(e,t){l.push([e,t]),h.point(e,t)}function x(){h.lineStart(),l=[]}function b(){v(l[0][0],l[0][1]),h.lineEnd();var e,t,r,i,n=h.clean(),c=u.result(),f=c.length;if(l.pop(),o.push(l),l=null,f){if(1&n){if((t=(r=c[0]).length-1)>0){for(d||(a.polygonStart(),d=!0),a.lineStart(),e=0;e1&&2&n&&c.push(c.pop().concat(c.shift())),s.push(c.filter(tr))}}return f}}function tr(e){return e.length>1}function ti(e,t){return((e=e.x)[0]<0?e[1]-s-1e-6:s-e[1])-((t=t.x)[0]<0?t[1]-s-1e-6:s-t[1])}var tn=tt(function(){return!0},function(e){var t,r=NaN,i=NaN,n=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(a,l){var c,u,h,p,g,y,v,x=a>0?o:-o,_=d(a-r);1e-6>d(_-o)?(e.point(r,i=(i+l)/2>0?s:-s),e.point(n,i),e.lineEnd(),e.lineStart(),e.point(x,i),e.point(a,i),t=0):n!==x&&_>=o&&(1e-6>d(r-n)&&(r-=1e-6*n),1e-6>d(a-x)&&(a-=1e-6*x),c=r,u=i,h=a,p=l,i=d(v=b(c-h))>1e-6?f((b(u)*(y=m(p))*b(h)-b(p)*(g=m(u))*b(c))/(g*y*v)):(u+p)/2,e.point(n,i),e.lineEnd(),e.lineStart(),e.point(x,i),t=0),e.point(r=a,i=l),n=x},lineEnd:function(){e.lineEnd(),r=i=NaN},clean:function(){return 2-t}}},function(e,t,r,i){var n;if(null==e)n=r*s,i.point(-o,n),i.point(0,n),i.point(o,n),i.point(o,0),i.point(o,-n),i.point(0,-n),i.point(-o,-n),i.point(-o,0),i.point(-o,n);else if(d(e[0]-t[0])>1e-6){var a=e[0]0,n=d(t)>1e-6;function a(e,r){return m(e)*m(r)>t}function s(e,r,i){var n=W(e),a=W(r),s=[1,0,0],l=Z(n,a),c=Y(l,l),u=l[0],h=c-u*u;if(!h)return!i&&e;var f=Z(s,l),p=X(s,t*c/h);$(p,X(l,-t*u/h));var m=Y(p,f),g=Y(f,f),y=m*m-g*(Y(p,p)-1);if(!(y<0)){var v=w(y),x=X(f,(-m-v)/g);if($(x,p),x=G(x),!i)return x;var b,_=e[0],T=r[0],M=e[1],k=r[1];T<_&&(b=_,_=T,T=b);var A=T-_,S=1e-6>d(A-o);if(!S&&k0^x[1]<(1e-6>d(x[0]-_)?M:k):M<=x[1]&&x[1]<=k:A>o^(_<=x[0]&&x[0]<=T)){var E=X(f,(-m+v)/g);return $(E,p),[x,G(E)]}}}function l(t,r){var n=i?e:o-e,a=0;return t<-n?a|=1:t>n&&(a|=2),r<-n?a|=4:r>n&&(a|=8),a}return tt(a,function(e){var t,r,c,u,h;return{lineStart:function(){u=c=!1,h=1},point:function(d,f){var p,m,g=[d,f],y=a(d,f),v=i?y?0:l(d,f):y?l(d+(d<0?o:-o),f):0;(!t&&(u=c=y)&&e.lineStart(),y!==c&&(!(m=s(t,g))||e5(t,m)||e5(g,m))&&(g[2]=1),y!==c)?(h=0,y?(e.lineStart(),m=s(g,t),e.point(m[0],m[1])):(m=s(t,g),e.point(m[0],m[1],2),e.lineEnd()),t=m):n&&t&&i^y&&!(v&r)&&(p=s(g,t,!0))&&(h=0,i?(e.lineStart(),e.point(p[0][0],p[0][1]),e.point(p[1][0],p[1][1]),e.lineEnd()):(e.point(p[1][0],p[1][1]),e.lineEnd(),e.lineStart(),e.point(p[0][0],p[0][1],3))),!y||t&&e5(t,g)||e.point(g[0],g[1]),t=g,c=y,r=v},lineEnd:function(){c&&e.lineEnd(),t=null},clean:function(){return h|(u&&c)<<1}}},function(t,i,n,a){e1(a,e,r,n,t,i)},i?[0,-e]:[-o,e-o])}function to(e,r,i,n){function a(t,a){return e<=t&&t<=i&&r<=a&&a<=n}function o(t,a,o,l){var u=0,h=0;if(null==t||(u=s(t,o))!==(h=s(a,o))||0>c(t,a)^o>0)do l.point(0===u||3===u?e:i,u>1?n:r);while((u=(u+o+4)%4)!==h);else l.point(a[0],a[1])}function s(t,n){return 1e-6>d(t[0]-e)?n>0?0:3:1e-6>d(t[0]-i)?n>0?2:1:1e-6>d(t[1]-r)?+(n>0):n>0?3:2}function l(e,t){return c(e.x,t.x)}function c(e,t){var r=s(e,1),i=s(t,1);return r!==i?r-i:0===r?t[1]-e[1]:1===r?e[0]-t[0]:2===r?e[1]-t[1]:t[0]-e[0]}return function(s){var c,u,h,d,f,p,m,g,y,v,x,b=s,_=e3(),w={point:T,lineStart:function(){w.point=M,u&&u.push(h=[]),v=!0,y=!1,m=g=NaN},lineEnd:function(){c&&(M(d,f),p&&y&&_.rejoin(),c.push(_.result())),w.point=T,y&&b.lineEnd()},polygonStart:function(){b=_,c=[],u=[],x=!0},polygonEnd:function(){var r=function(){for(var t=0,r=0,i=u.length;rn&&(d-a)*(n-o)>(f-o)*(e-a)&&++t:f<=n&&(d-a)*(n-o)<(f-o)*(e-a)&&--t;return t}(),i=x&&r,a=(c=t.merge(c)).length;(i||a)&&(s.polygonStart(),i&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),a&&e6(c,l,r,o,s),s.polygonEnd()),b=s,c=u=h=null}};function T(e,t){a(e,t)&&b.point(e,t)}function M(t,o){var s=a(t,o);if(u&&h.push([t,o]),v)d=t,f=o,p=s,v=!1,s&&(b.lineStart(),b.point(t,o));else if(s&&y)b.point(t,o);else{var l=[m=Math.max(-1e9,Math.min(1e9,m)),g=Math.max(-1e9,Math.min(1e9,g))],c=[t=Math.max(-1e9,Math.min(1e9,t)),o=Math.max(-1e9,Math.min(1e9,o))];!function(e,t,r,i,n,a){var o,s=e[0],l=e[1],c=t[0],u=t[1],h=0,d=1,f=c-s,p=u-l;if(o=r-s,!(!f&&o>0)){if(o/=f,f<0){if(o0){if(o>d)return;o>h&&(h=o)}if(o=n-s,!(!f&&o<0)){if(o/=f,f<0){if(o>d)return;o>h&&(h=o)}else if(f>0){if(o0)){if(o/=p,p<0){if(o0){if(o>d)return;o>h&&(h=o)}if(o=a-l,!(!p&&o<0)){if(o/=p,p<0){if(o>d)return;o>h&&(h=o)}else if(p>0){if(o0&&(e[0]=s+h*f,e[1]=l+h*p),d<1&&(t[0]=s+d*f,t[1]=l+d*p),!0}}}}}(l,c,e,r,i,n)?s&&(b.lineStart(),b.point(t,o),x=!1):(y||(b.lineStart(),b.point(l[0],l[1])),b.point(c[0],c[1]),s||b.lineEnd(),x=!1)}m=t,g=o,y=s}return w}}var ts,tl,tc,tu=r(),th={sphere:A,point:A,lineStart:function(){th.point=tf,th.lineEnd=td},lineEnd:A,polygonStart:A,polygonEnd:A};function td(){th.point=th.lineEnd=A}function tf(e,t){e*=h,t*=h,ts=e,tl=b(t),tc=m(t),th.point=tp}function tp(e,t){e*=h;var r=b(t*=h),i=m(t),n=d(e-ts),a=m(n),o=i*b(n),s=tc*r-tl*i*a,l=tl*r+tc*i*a;tu.add(p(w(o*o+s*s),l)),ts=e,tl=r,tc=i}function tm(e){return tu.reset(),I(e,th),+tu}var tg=[null,null],ty={type:"LineString",coordinates:tg};function tv(e,t){return tg[0]=e,tg[1]=t,tm(ty)}var tx={Feature:function(e,t){return t_(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,i=-1,n=r.length;++i0&&(n=tv(e[a],e[a-1]))>0&&r<=n&&i<=n&&(r+i-n)*(1-Math.pow((r-i)/n,2))<1e-12*n)return!0;r=i}return!1}function tT(e,t){return!!te(e.map(tM),tk(t))}function tM(e){return(e=e.map(tk)).pop(),e}function tk(e){return[e[0]*h,e[1]*h]}function tA(e,r,i){var n=t.range(e,r-1e-6,i).concat(r);return function(e){return n.map(function(t){return[e,t]})}}function tS(e,r,i){var n=t.range(e,r-1e-6,i).concat(r);return function(e){return n.map(function(t){return[t,e]})}}function tE(){var e,r,i,n,a,o,s,l,c,u,h,f,p=10,m=10,y=90,v=360,x=2.5;function b(){return{type:"MultiLineString",coordinates:_()}}function _(){return t.range(g(n/y)*y,i,y).map(h).concat(t.range(g(l/v)*v,s,v).map(f)).concat(t.range(g(r/p)*p,e,p).filter(function(e){return d(e%y)>1e-6}).map(c)).concat(t.range(g(o/m)*m,a,m).filter(function(e){return d(e%v)>1e-6}).map(u))}return b.lines=function(){return _().map(function(e){return{type:"LineString",coordinates:e}})},b.outline=function(){return{type:"Polygon",coordinates:[h(n).concat(f(s).slice(1),h(i).reverse().slice(1),f(l).reverse().slice(1))]}},b.extent=function(e){return arguments.length?b.extentMajor(e).extentMinor(e):b.extentMinor()},b.extentMajor=function(e){return arguments.length?(n=+e[0][0],i=+e[1][0],l=+e[0][1],s=+e[1][1],n>i&&(e=n,n=i,i=e),l>s&&(e=l,l=s,s=e),b.precision(x)):[[n,l],[i,s]]},b.extentMinor=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),b.precision(x)):[[r,o],[e,a]]},b.step=function(e){return arguments.length?b.stepMajor(e).stepMinor(e):b.stepMinor()},b.stepMajor=function(e){return arguments.length?(y=+e[0],v=+e[1],b):[y,v]},b.stepMinor=function(e){return arguments.length?(p=+e[0],m=+e[1],b):[p,m]},b.precision=function(t){return arguments.length?(x=+t,c=tA(o,a,90),u=tS(r,e,x),h=tA(l,s,90),f=tS(n,i,x),b):x},b.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function tC(e){return e}var tL,tP,tI,tz,tD=r(),tO=r(),tR={point:A,lineStart:A,lineEnd:A,polygonStart:function(){tR.lineStart=tF,tR.lineEnd=tN},polygonEnd:function(){tR.lineStart=tR.lineEnd=tR.point=A,tD.add(d(tO)),tO.reset()},result:function(){var e=tD/2;return tD.reset(),e}};function tF(){tR.point=tj}function tj(e,t){tR.point=tB,tL=tI=e,tP=tz=t}function tB(e,t){tO.add(tz*e-tI*t),tI=e,tz=t}function tN(){tB(tL,tP)}var tU,tV,tq,tH,tG=1/0,tW=1/0,tY=-1/0,tZ=tY,t$={point:function(e,t){etY&&(tY=e),ttZ&&(tZ=t)},lineStart:A,lineEnd:A,polygonStart:A,polygonEnd:A,result:function(){var e=[[tG,tW],[tY,tZ]];return tY=tZ=-(tW=tG=1/0),e}},tX=0,tK=0,tJ=0,tQ=0,t0=0,t1=0,t2=0,t3=0,t5=0,t4={point:t6,lineStart:t8,lineEnd:re,polygonStart:function(){t4.lineStart=rt,t4.lineEnd=rr},polygonEnd:function(){t4.point=t6,t4.lineStart=t8,t4.lineEnd=re},result:function(){var e=t5?[t2/t5,t3/t5]:t1?[tQ/t1,t0/t1]:tJ?[tX/tJ,tK/tJ]:[NaN,NaN];return tX=tK=tJ=tQ=t0=t1=t2=t3=t5=0,e}};function t6(e,t){tX+=e,tK+=t,++tJ}function t8(){t4.point=t9}function t9(e,t){t4.point=t7,t6(tq=e,tH=t)}function t7(e,t){var r=e-tq,i=t-tH,n=w(r*r+i*i);tQ+=n*(tq+e)/2,t0+=n*(tH+t)/2,t1+=n,t6(tq=e,tH=t)}function re(){t4.point=t6}function rt(){t4.point=ri}function rr(){rn(tU,tV)}function ri(e,t){t4.point=rn,t6(tU=tq=e,tV=tH=t)}function rn(e,t){var r=e-tq,i=t-tH,n=w(r*r+i*i);tQ+=n*(tq+e)/2,t0+=n*(tH+t)/2,t1+=n,t2+=(n=tH*e-tq*t)*(tq+e),t3+=n*(tH+t),t5+=3*n,t6(tq=e,tH=t)}function ra(e){this._context=e}ra.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,c)}},result:A};var ro,rs,rl,rc,ru,rh=r(),rd={point:A,lineStart:function(){rd.point=rf},lineEnd:function(){ro&&rp(rs,rl),rd.point=A},polygonStart:function(){ro=!0},polygonEnd:function(){ro=null},result:function(){var e=+rh;return rh.reset(),e}};function rf(e,t){rd.point=rp,rs=rc=e,rl=ru=t}function rp(e,t){rc-=e,ru-=t,rh.add(w(rc*rc+ru*ru)),rc=e,ru=t}function rm(){this._string=[]}function rg(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function ry(e){return function(t){var r=new rv;for(var i in e)r[i]=e[i];return r.stream=t,r}}function rv(){}function rx(e,t,r){var i=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=i&&e.clipExtent(null),I(r,e.stream(t$)),t(t$.result()),null!=i&&e.clipExtent(i),e}function rb(e,t,r){return rx(e,function(r){var i=t[1][0]-t[0][0],n=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),n/(r[1][1]-r[0][1])),o=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,s=+t[0][1]+(n-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([o,s])},r)}function r_(e,t,r){return rb(e,[[0,0],t],r)}function rw(e,t,r){return rx(e,function(r){var i=+t,n=i/(r[1][0]-r[0][0]),a=(i-n*(r[1][0]+r[0][0]))/2,o=-n*r[0][1];e.scale(150*n).translate([a,o])},r)}function rT(e,t,r){return rx(e,function(r){var i=+t,n=i/(r[1][1]-r[0][1]),a=-n*r[0][0],o=(i-n*(r[1][1]+r[0][1]))/2;e.scale(150*n).translate([a,o])},r)}rm.prototype={_radius:4.5,_circle:rg(4.5),pointRadius:function(e){return(e*=1)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=rg(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(!this._string.length)return null;var e=this._string.join("");return this._string=[],e}},rv.prototype={constructor:rv,point:function(e,t){this.stream.point(e,t)},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()}};var rM=m(30*h);function rk(e,t){var r;return+t?function(e,t){function r(i,n,a,o,s,l,c,u,h,f,m,g,y,v){var x=c-i,b=u-n,_=x*x+b*b;if(_>4*t&&y--){var T=o+f,M=s+m,A=l+g,S=w(T*T+M*M+A*A),E=k(A/=S),C=1e-6>d(d(A)-1)||1e-6>d(a-h)?(a+h)/2:p(M,T),L=e(C,E),P=L[0],I=L[1],z=P-i,D=I-n,O=b*z-x*D;(O*O/_>t||d((x*z+b*D)/_-.5)>.3||o*f+s*m+l*g2?e[2]%360*h:0,I()):[v*u,x*u,b*u]},L.angle=function(e){return arguments.length?(_=e%360*h,I()):_*u},L.reflectX=function(e){return arguments.length?(T=e?-1:1,I()):T<0},L.reflectY=function(e){return arguments.length?(M=e?-1:1,I()):M<0},L.precision=function(e){return arguments.length?(o=rk(s,C=e*e),z()):w(C)},L.fitExtent=function(e,t){return rb(L,e,t)},L.fitSize=function(e,t){return r_(L,e,t)},L.fitWidth=function(e,t){return rw(L,e,t)},L.fitHeight=function(e,t){return rT(L,e,t)},function(){return t=e.apply(this,arguments),L.invert=t.invert&&P,I()}}function rL(e){var t=0,r=o/3,i=rC(e),n=i(t,r);return n.parallels=function(e){return arguments.length?i(t=e[0]*h,r=e[1]*h):[t*u,r*u]},n}function rP(e,t){var r=b(e),i=(r+b(t))/2;if(1e-6>d(i)){var n=m(e);function a(e,t){return[e*n,b(t)/n]}return a.invert=function(e,t){return[e/n,k(t*n)]},a}var s=1+r*(2*i-r),l=w(s)/i;function c(e,t){var r=w(s-2*i*b(t))/i;return[r*b(e*=i),l-r*m(e)]}return c.invert=function(e,t){var r=l-t,n=p(e,d(r))*_(r);return r*i<0&&(n-=o*_(e)*_(r)),[n/i,k((s-(e*e+r*r)*i*i)/(2*i))]},c}function rI(){return rL(rP).scale(155.424).center([0,33.6442])}function rz(){return rI().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function rD(e){return function(t,r){var i=m(t),n=m(r),a=e(i*n);return[a*n*b(t),a*b(r)]}}function rO(e){return function(t,r){var i=w(t*t+r*r),n=e(i),a=b(n);return[p(t*a,i*m(n)),k(i&&r*a/i)]}}var rR=rD(function(e){return w(2/(1+e))});rR.invert=rO(function(e){return 2*k(e/2)});var rF=rD(function(e){return(e=M(e))&&e/b(e)});function rj(e,t){return[e,v(T((s+t)/2))]}function rB(e){var t,r,i,n=rE(e),a=n.center,s=n.scale,l=n.translate,c=n.clipExtent,u=null;function h(){var a=o*s(),l=n(e0(n.rotate()).invert([0,0]));return c(null==u?[[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]]:e===rj?[[Math.max(l[0]-a,u),t],[Math.min(l[0]+a,r),i]]:[[u,Math.max(l[1]-a,t)],[r,Math.min(l[1]+a,i)]])}return n.scale=function(e){return arguments.length?(s(e),h()):s()},n.translate=function(e){return arguments.length?(l(e),h()):l()},n.center=function(e){return arguments.length?(a(e),h()):a()},n.clipExtent=function(e){return arguments.length?(null==e?u=t=r=i=null:(u=+e[0][0],t=+e[0][1],r=+e[1][0],i=+e[1][1]),h()):null==u?null:[[u,t],[r,i]]},h()}function rN(e){return T((s+e)/2)}function rU(e,t){var r=m(e),i=e===t?b(e):v(r/m(t))/v(rN(t)/rN(e)),n=r*x(rN(e),i)/i;if(!i)return rj;function a(e,t){n>0?t<-s+1e-6&&(t=-s+1e-6):t>s-1e-6&&(t=s-1e-6);var r=n/x(rN(t),i);return[r*b(i*e),n-r*m(i*e)]}return a.invert=function(e,t){var r=n-t,a=_(i)*w(e*e+r*r),l=p(e,d(r))*_(r);return r*i<0&&(l-=o*_(e)*_(r)),[l/i,2*f(x(n/a,1/i))-s]},a}function rV(e,t){return[e,t]}function rq(e,t){var r=m(e),i=e===t?b(e):(r-m(t))/(t-e),n=r/i+e;if(1e-6>d(i))return rV;function a(e,t){var r=n-t,a=i*e;return[r*b(a),n-r*m(a)]}return a.invert=function(e,t){var r=n-t,a=p(e,d(r))*_(r);return r*i<0&&(a-=o*_(e)*_(r)),[a/i,n-_(i)*w(e*e+r*r)]},a}rF.invert=rO(function(e){return e}),rj.invert=function(e,t){return[e,2*f(y(t))-s]},rV.invert=rV;var rH=w(3)/2;function rG(e,t){var r=k(rH*b(t)),i=r*r,n=i*i*i;return[e*m(r)/(rH*(1.340264+-.24331799999999998*i+n*(.0062510000000000005+.034164*i))),r*(1.340264+-.081106*i+n*(893e-6+.003796*i))]}function rW(e,t){var r=m(t),i=m(e)*r;return[r*b(e)/i,b(t)/i]}function rY(e,t){var r=t*t,i=r*r;return[e*(.8707-.131979*r+i*(-.013791+i*(.003971*r-.001529*i))),t*(1.007226+r*(.015085+i*(-.044475+.028874*r-.005916*i)))]}function rZ(e,t){return[m(t)*b(e),b(t)]}function r$(e,t){var r=m(t),i=1+m(e)*r;return[r*b(e)/i,b(t)/i]}function rX(e,t){return[v(T((s+t)/2)),-e]}rG.invert=function(e,t){for(var r,i,n=t,a=n*n,o=a*a*a,s=0;s<12&&(i=n*(1.340264+-.081106*a+o*(893e-6+.003796*a))-t,n-=r=i/(1.340264+-.24331799999999998*a+o*(.0062510000000000005+.034164*a)),o=(a=n*n)*a*a,!(1e-12>d(r)));++s);return[rH*e*(1.340264+-.24331799999999998*a+o*(.0062510000000000005+.034164*a))/m(n),k(b(n)/rH)]},rW.invert=rO(f),rY.invert=function(e,t){var r,i=t,n=25;do{var a=i*i,o=a*a;i-=r=(i*(1.007226+a*(.015085+o*(-.044475+.028874*a-.005916*o)))-t)/(1.007226+a*(.045255+o*(-.311325+.259866*a-.005916*11*o)))}while(d(r)>1e-6&&--n>0);return[e/(.8707+(a=i*i)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),i]},rZ.invert=rO(k),r$.invert=rO(function(e){return 2*f(e)}),rX.invert=function(e,t){return[-t,2*f(y(e))-s]},e.geoAlbers=rz,e.geoAlbersUsa=function(){var e,t,r,i,n,a,o=rz(),s=rI().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=rI().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(e,t){a=[e,t]}};function u(e){var t=e[0],o=e[1];return a=null,r.point(t,o),a||(i.point(t,o),a)||(n.point(t,o),a)}function h(){return e=t=null,u}return u.invert=function(e){var t=o.scale(),r=o.translate(),i=(e[0]-r[0])/t,n=(e[1]-r[1])/t;return(n>=.12&&n<.234&&i>=-.425&&i<-.214?s:n>=.166&&n<.234&&i>=-.214&&i<-.115?l:o).invert(e)},u.stream=function(r){var i,n;return e&&t===r?e:(n=(i=[o.stream(t=r),s.stream(r),l.stream(r)]).length,e={point:function(e,t){for(var r=-1;++rey(i[0],i[1])&&(i[1]=n[1]),ey(n[0],i[1])>ey(i[0],i[1])&&(i[0]=n[0])):a.push(i=n);for(o=-1/0,r=a.length-1,t=0,i=a[r];t<=r;i=n,++t)n=a[t],(s=ey(i[1],n[0]))>o&&(o=s,J=n[0],ee=i[1])}return eo=es=null,J===1/0||Q===1/0?[[NaN,NaN],[NaN,NaN]]:[[J,Q],[ee,et]]},e.geoCentroid=function(e){eb=e_=ew=eT=eM=ek=eA=eS=eE=eC=eL=0,I(e,eR);var t=eE,r=eC,i=eL,n=t*t+r*r+i*i;return n<1e-12&&(t=ek,r=eA,i=eS,e_<1e-6&&(t=ew,r=eT,i=eM),(n=t*t+r*r+i*i)<1e-12)?[NaN,NaN]:[p(r,t)*u,k(i/w(n))*u]},e.geoCircle=function(){var e,t,r=eY([0,0]),i=eY(90),n=eY(6),a={point:function(r,i){e.push(r=t(r,i)),r[0]*=u,r[1]*=u}};function o(){var o=r.apply(this,arguments),s=i.apply(this,arguments)*h,l=n.apply(this,arguments)*h;return e=[],t=eX(-o[0]*h,-o[1]*h,0).invert,e1(a,s,l,1),o={type:"Polygon",coordinates:[e]},e=t=null,o}return o.center=function(e){return arguments.length?(r="function"==typeof e?e:eY([+e[0],+e[1]]),o):r},o.radius=function(e){return arguments.length?(i="function"==typeof e?e:eY(+e),o):i},o.precision=function(e){return arguments.length?(n="function"==typeof e?e:eY(+e),o):n},o},e.geoClipAntimeridian=tn,e.geoClipCircle=ta,e.geoClipExtent=function(){var e,t,r,i=0,n=0,a=960,o=500;return r={stream:function(r){return e&&t===r?e:e=to(i,n,a,o)(t=r)},extent:function(s){return arguments.length?(i=+s[0][0],n=+s[0][1],a=+s[1][0],o=+s[1][1],e=t=null,r):[[i,n],[a,o]]}}},e.geoClipRectangle=to,e.geoConicConformal=function(){return rL(rU).scale(109.5).parallels([30,30])},e.geoConicConformalRaw=rU,e.geoConicEqualArea=rI,e.geoConicEqualAreaRaw=rP,e.geoConicEquidistant=function(){return rL(rq).scale(131.154).center([0,13.9389])},e.geoConicEquidistantRaw=rq,e.geoContains=function(e,t){return(e&&tx.hasOwnProperty(e.type)?tx[e.type]:t_)(e,t)},e.geoDistance=tv,e.geoEqualEarth=function(){return rE(rG).scale(177.158)},e.geoEqualEarthRaw=rG,e.geoEquirectangular=function(){return rE(rV).scale(152.63)},e.geoEquirectangularRaw=rV,e.geoGnomonic=function(){return rE(rW).scale(144.049).clipAngle(60)},e.geoGnomonicRaw=rW,e.geoGraticule=tE,e.geoGraticule10=function(){return tE()()},e.geoIdentity=function(){var e,t,r,i,n,a,o,s=1,l=0,c=0,d=1,f=1,p=0,g=null,y=1,v=1,x=ry({point:function(e,t){var r=T([e,t]);this.stream.point(r[0],r[1])}}),_=tC;function w(){return y=s*d,v=s*f,a=o=null,T}function T(r){var i=r[0]*y,n=r[1]*v;if(p){var a=n*e-i*t;i=i*e+n*t,n=a}return[i+l,n+c]}return T.invert=function(r){var i=r[0]-l,n=r[1]-c;if(p){var a=n*e+i*t;i=i*e-n*t,n=a}return[i/y,n/v]},T.stream=function(e){return a&&o===e?a:a=x(_(o=e))},T.postclip=function(e){return arguments.length?(_=e,g=r=i=n=null,w()):_},T.clipExtent=function(e){return arguments.length?(_=null==e?(g=r=i=n=null,tC):to(g=+e[0][0],r=+e[0][1],i=+e[1][0],n=+e[1][1]),w()):null==g?null:[[g,r],[i,n]]},T.scale=function(e){return arguments.length?(s=+e,w()):s},T.translate=function(e){return arguments.length?(l=+e[0],c=+e[1],w()):[l,c]},T.angle=function(r){return arguments.length?(t=b(p=r%360*h),e=m(p),w()):p*u},T.reflectX=function(e){return arguments.length?(d=e?-1:1,w()):d<0},T.reflectY=function(e){return arguments.length?(f=e?-1:1,w()):f<0},T.fitExtent=function(e,t){return rb(T,e,t)},T.fitSize=function(e,t){return r_(T,e,t)},T.fitWidth=function(e,t){return rw(T,e,t)},T.fitHeight=function(e,t){return rT(T,e,t)},T},e.geoInterpolate=function(e,t){var r,i,n=e[0]*h,a=e[1]*h,o=t[0]*h,s=t[1]*h,l=m(a),c=b(a),d=m(s),f=b(s),g=l*m(n),y=l*b(n),v=d*m(o),x=d*b(o),_=2*k(w((r=b((r=s-a)/2))*r+l*d*((i=b((i=o-n)/2))*i))),T=b(_),M=_?function(e){var t=b(e*=_)/T,r=b(_-e)/T,i=r*g+t*v,n=r*y+t*x;return[p(n,i)*u,p(r*c+t*f,w(i*i+n*n))*u]}:function(){return[n*u,a*u]};return M.distance=_,M},e.geoLength=tm,e.geoMercator=function(){return rB(rj).scale(961/c)},e.geoMercatorRaw=rj,e.geoNaturalEarth1=function(){return rE(rY).scale(175.295)},e.geoNaturalEarth1Raw=rY,e.geoOrthographic=function(){return rE(rZ).scale(249.5).clipAngle(90.000001)},e.geoOrthographicRaw=rZ,e.geoPath=function(e,t){var r,i,n=4.5;function a(e){return e&&("function"==typeof n&&i.pointRadius(+n.apply(this,arguments)),I(e,r(i))),i.result()}return a.area=function(e){return I(e,r(tR)),tR.result()},a.measure=function(e){return I(e,r(rd)),rd.result()},a.bounds=function(e){return I(e,r(t$)),t$.result()},a.centroid=function(e){return I(e,r(t4)),t4.result()},a.projection=function(t){return arguments.length?(r=null==t?(e=null,tC):(e=t).stream,a):e},a.context=function(e){return arguments.length?(i=null==e?(t=null,new rm):new ra(t=e),"function"!=typeof n&&i.pointRadius(n),a):t},a.pointRadius=function(e){return arguments.length?(n="function"==typeof e?e:(i.pointRadius(+e),+e),a):n},a.projection(e).context(t)},e.geoProjection=rE,e.geoProjectionMutator=rC,e.geoRotation=e0,e.geoStereographic=function(){return rE(r$).scale(250).clipAngle(142)},e.geoStereographicRaw=r$,e.geoStream=I,e.geoTransform=function(e){return{stream:ry(e)}},e.geoTransverseMercator=function(){var e=rB(rX),t=e.center,r=e.rotate;return e.center=function(e){return arguments.length?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return arguments.length?r([e[0],e[1],e.length>2?e[2]+90:90]):[(e=r())[0],e[1],e[2]-90]},r([0,0,90]).scale(159.155)},e.geoTransverseMercatorRaw=rX,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&"u">typeof t?i(e,p_()):i((r=r||self).d3=r.d3||{},r.d3)}}),pT=p({"src/lib/usa_location_names.js"(e,t){var r={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"};t.exports={usaLocationAbbreviations:new Set(Object.values(r)),usaLocationList:r}}}),pM={};m(pM,{COUNTRIES_X:()=>pk});var pk,pA=f({"src/lib/custom_country_codes.ts"(){pk=[{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:[]}]}}),pS=p({"src/lib/geo_location_utils.js"(e,t){var r=T(),{COUNTRIES:i,createLookup:n}=pg(),{area:a}=px(),{centroid:o}=pb(),{coordAll:s}=pv(),{geoBounds:l}=pw(),c=e1(),u=J(),h=I(),d=D(),f=iu(),{usaLocationAbbreviations:p,usaLocationList:m}=pT(),{COUNTRIES_X:g}=(pA(),v(pM)),{lookupAlpha3:y}=n([...i,...g]),x={"ISO-3":c,"USA-states":function(e){return e=e.trim(),(p.has(e.toUpperCase())?e.toUpperCase():m[e.toLowerCase()])||(u.log("Unrecognized US location: "+e+"."),!1)},"country names":function(e){return y(e)||(u.log("Unrecognized country name: "+e+"."),!1)}};function b(e){for(let t=0;t0&&e[t+1][0]<0)return t;return null}function _(e){var t=e.geojson,r=window.PlotlyGeoAssets||{},i="string"==typeof t?r[t]:t;return h(i)?i:(u.error("Oops ... something went wrong when fetching "+t),!1)}function w(e){try{return s(e)}catch{return[]}}function M(e){if(0===e.length)return null;if(1===e.length){let[t,r]=e[0];return[t,r,t,r]}let[[t,r],[i,n]]=l({type:"MultiPoint",coordinates:e});return[t,r,A([t,i])[1],n]}var k=(e,t)=>"geojson"===t.fitbounds&&"geojson-id"===e.locationmode?w(_(e)):[];function A([e,t]){return[e,e>t?t+360:t]}t.exports={locationToFeature:function(e,t,r){var i;if(!t||"string"!=typeof t)return!1;let n=x[e](t);if(n){let t;if("USA-states"===e)for(let e of(t=[],r))(null==(i=e?.properties)?void 0:i.gu)==="USA"&&t.push(e);else t=r;for(let e of t)if(e.id===n)return e;u.log(`Location with id ${n} does not have a matching topojson feature at this resolution.`)}return!1},feature2polygons:function(e){var t,r,i,n,a=e.geometry,o=a.coordinates,s=e.id,l=[];switch(t="RUS"===s||"FJI"===s?function(e){var t;if(null===b(e))t=e;else for(t=Array(e.length),n=0;nt?r[i++]=[e[n][0]+360,e[n][1]]:n===t?(r[i++]=e[n],r[i++]=[e[n][0],-90]):r[i++]=e[n];var a=f.tester(r);a.pts.pop(),l.push(a)}:function(e){l.push(f.tester(e))},a.type){case"MultiPolygon":for(r=0;rn&&(n=c,t=l)}else t=r;return t&&t.coordinates.some(e=>e.length>0)?o(t).geometry.coordinates:[NaN,NaN]}(c),isNaN(c.properties.ct[0])&&u.log(["Location",i.loc,"has no polygon with positive area. Its centroid could not be computed, so hover and selection will not work for it."].join(" ")),i.fIn=e,i.fOut=c,s.push(c)}else u.log(["Location",i.loc,"does not have a valid GeoJSON geometry. Traces with locationmode *geojson-id* only support *Polygon* and *MultiPolygon* geometries."].join(" "))}delete n[r]}switch(r.type){case"FeatureCollection":var h=r.features;for(i=0;i100?(clearInterval(a),i("Unexpected error while fetching from "+e)):void n++},50)})}(a)):(t[a]="pending",i.push(function(e){return new Promise(function(i,n){r.json(e,function(r,a){return r?(delete t[e],n(Error(404===r.status?'GeoJSON at URL "'+e+'" does not exist.':"Unexpected error while fetching from "+e))):(t[e]=a,i(a))})})}(a))))}return i},boundsOfCoords:M,computeBbox:e=>M(w(e)),coordsOf:w,doesCrossAntiMeridian:b,fitGeojsonBbox:(e,t)=>M(k(e,t)),fitGeojsonCoords:k,unwrapLonRange:A,ANTIMERIDIAN_LON_SHIFT:360}}}),pE=p({"src/traces/scattergeo/style.js"(e,t){var r=T(),i=t7(),n=ee(),a=nr(),o=a.stylePoints,s=a.styleText;t.exports=function(e,t){var a,l,c,u;t&&(a=e,c=(l=t)[0].trace,(u=l[0].node3).style("opacity",l[0].trace.opacity),o(u,c,a),s(u,c,a),u.selectAll("path.js-line").style("fill","none").each(function(e){var t=r.select(this),a=e.trace,o=a.line||{};t.call(n.stroke,o.color).call(i.dashLine,o.dash||"",o.width||0),"none"!==a.fill&&t.call(n.fill,a.fillcolor)}))}}}),pC=p({"src/traces/scattergeo/plot.js"(e,t){var r=T(),i=tv(),n=pp().getTopojsonFeatures,a=pm(),o=pS(),s=ri().findExtremes,l=L().BADNUM,c=i2().calcMarkerSize,u=t5(),h=pE();t.exports={calcGeoJSON:function(e,t){var r,a,u=e[0].trace,h=t[u.geo],d=h._subplot,f=u._length;if(i.isArrayOrTypedArray(u.locations)){var p=u.locationmode,m="geojson-id"===p?o.extractTraceFeature(e):n(u,d.topojson);for(r=0;r")}}(c,m,e,l[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}}}}),pP=p({"src/traces/scattergeo/event_data.js"(e,t){t.exports=function(e,t,r,i,n){e.lon=t.lon,e.lat=t.lat,e.location=t.loc?t.loc:null;var a=i[n];return a.fIn&&a.fIn.properties&&(e.properties=a.fIn.properties),e}}}),pI=p({"src/traces/scattergeo/select.js"(e,t){var r=t5(),i=L().BADNUM;t.exports=function(e,t){var n,a,o,s,l,c=e.cd,u=e.xaxis,h=e.yaxis,d=[],f=c[0].trace;if(!r.hasMarkers(f)&&!r.hasText(f))return[];if(!1===t)for(l=0;lt?1:e>=t?0:NaN}function r(e){var r;return 1===e.length&&(r=e,e=function(e,i){return t(r(e),i)}),{left:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;0>e(t[a],r)?i=a+1:n=a}return i},right:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;e(t[a],r)>0?n=a:i=a+1}return i}}}var i=r(t),n=i.right,a=i.left;function o(e,t){return[e,t]}function s(e){return null===e?NaN:+e}function l(e,t){var r,i,n=e.length,a=0,o=-1,l=0,c=0;if(null==t)for(;++o1)return c/(a-1)}function c(e,t){var r=l(e,t);return r&&Math.sqrt(r)}function u(e,t){var r,i,n,a=e.length,o=-1;if(null==t){for(;++o=r)for(i=n=r;++or&&(i=r),n=r)for(i=n=r;++or&&(i=r),n=0?(a>=y?10:a>=v?5:a>=x?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(a>=y?10:a>=v?5:a>=x?2:1)}function _(e,t,r){var i=Math.abs(t-e)/Math.max(0,r),n=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),a=i/n;return a>=y?n*=10:a>=v?n*=5:a>=x&&(n*=2),t=1)return+r(e[i-1],i-1,e);var i,n=(i-1)*t,a=Math.floor(n),o=+r(e[a],a,e);return o+(r(e[a+1],a+1,e)-o)*(n-a)}}function M(e,t){var r,i,n=e.length,a=-1;if(null==t){for(;++a=r)for(i=r;++ar&&(i=r)}else for(;++a=r)for(i=r;++ar&&(i=r);return i}function k(e){if(!(n=e.length))return[];for(var t=-1,r=M(e,A),i=Array(r);++te?1:t>=e?0:NaN},e.deviation=c,e.extent=u,e.histogram=function(){var e=m,t=u,r=w;function i(i){var a,o,s=i.length,l=Array(s);for(a=0;ah;)d.pop(),--f;var p,m=Array(f+1);for(a=0;a<=f;++a)(p=m[a]=[]).x0=a>0?d[a-1]:u,p.x1=a=r)for(i=r;++ai&&(i=r)}else for(;++a=r)for(i=r;++ai&&(i=r);return i},e.mean=function(e,t){var r,i=e.length,n=i,a=-1,o=0;if(null==t)for(;++a=0;)for(t=(i=e[n]).length;--t>=0;)r[--o]=i[t];return r},e.min=M,e.pairs=function(e,t){null==t&&(t=o);for(var r=0,i=e.length-1,n=e[0],a=Array(i<0?0:i);rr(n=e[a],s)||0!==r(s,s))&&(s=n,o=a);if(0===r(s,s))return o}},e.shuffle=function(e,t,r){for(var i,n,a=(r??e.length)-(t=null==t?0:+t);a;)n=Math.random()*a--|0,i=e[a+t],e[a+t]=e[n+t],e[n+t]=i;return e},e.sum=function(e,t){var r,i=e.length,n=-1,a=0;if(null==t)for(;++n0)return[e];if((i=t0)for(e=Math.ceil(e/o),a=Array(n=Math.ceil((t=Math.floor(t/o))-e+1));++stypeof t?e:e.d3=e.d3||{})}}),pD=p({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(e,t){var r;r=function(e,t,r){var i=Math.abs,n=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,c=Math.log,u=Math.max,h=Math.min,d=Math.pow,f=Math.round,p=Math.sign||function(e){return e>0?1:e<0?-1:0},m=Math.sin,g=Math.tan,y=Math.PI,v=y/2,x=y/4,b=Math.SQRT1_2,_=E(2),w=E(y),T=2*y,M=180/y,k=y/180;function A(e){return e>1?v:e<-1?-v:Math.asin(e)}function S(e){return e>1?0:e<-1?y:Math.acos(e)}function E(e){return e>0?Math.sqrt(e):0}function C(e){return(s(e)-s(-e))/2}function L(e){return(s(e)+s(-e))/2}function P(e){var t=g(e/2),r=2*c(o(e/2))/(t*t);function n(e,t){var i=o(e),n=o(t),a=m(t),s=n*i,l=-((1-s?c((1+s)/2)/(1-s):-.5)+r/(1+s));return[l*n*m(e),l*a]}return n.invert=function(t,n){var s,l=E(t*t+n*n),u=-e/2,h=50;if(!l)return[0,0];do{var d=u/2,f=o(d),p=m(d),g=p/f,y=-c(i(f));u-=s=(2/g*y-r*g-l)/(-y/(p*p)+1-r/(2*f*f))*(f<0?.7:1)}while(i(s)>1e-6&&--h>0);var v=m(u);return[a(t*v,l*o(u)),A(n*v/l)]},n}function I(e,t){var r,i=o(t),n=(r=S(i*o(e/=2)))?r/Math.sin(r):1;return[2*i*m(e)*n,m(t)*n]}function z(e){var t=m(e),r=o(e),n=e>=0?1:-1,s=g(n*e),l=(1+t-r)/2;function c(e,i){var c=o(i),u=o(e/=2);return[(1+c)*m(e),(n*i>-a(u,s)-.001?0:-(10*n))+l+m(i)*r-(1+c)*t*u]}return c.invert=function(e,c){var u=0,h=0,d=50;do{var f=o(u),p=m(u),g=o(h),y=m(h),v=1+g,x=v*p-e,b=l+y*r-v*t*f-c,_=v*f/2,w=-p*y,T=t*v*p/2,M=r*g+t*f*y,k=w*T-M*_,A=(b*w-x*M)/k/2,S=(x*T-b*_)/k;i(S)>2&&(S/=2),u-=A,h-=S}while((i(A)>1e-6||i(S)>1e-6)&&--d>0);return n*h>-a(o(u),s)-.001?[2*u,h]:null},c}function D(e,t){var r=g(t/2),i=E(1-r*r),n=1+i*o(e/=2),a=m(e)*i/n,s=r/n,l=a*a,c=s*s;return[4/3*a*(3+l-3*c),4/3*s*(3+3*l-c)]}I.invert=function(e,t){if(!(e*e+4*t*t>y*y+1e-6)){var r=e,n=t,a=25;do{var s,l=m(r),c=m(r/2),u=o(r/2),h=m(n),d=o(n),f=m(2*n),p=h*h,g=d*d,v=c*c,x=1-g*u*u,b=x?S(d*u)*E(s=1/x):s=0,_=2*b*d*c-e,w=b*h-t,T=s*(g*v+b*d*u*p),M=s*(.5*l*f-2*b*h*c),k=.25*s*(f*c-b*h*g*l),A=s*(p*u+b*v*d),C=M*k-A*T;if(!C)break;var L=(w*M-_*A)/C,P=(_*k-w*T)/C;r-=L,n-=P}while((i(L)>1e-6||i(P)>1e-6)&&--a>0);return[r,n]}},D.invert=function(e,t){if(t*=3/8,!(e*=3/8)&&i(t)>1)return null;var r,n,s=1+e*e+t*t,l=E((s-E(s*s-4*t*t))/2),u=A(l)/3,h=l?c((r=i(t/l))+E(r*r-1))/3:c((n=i(e))+E(n*n+1))/3,d=o(u),f=L(h),g=f*f-d*d;return[2*p(e)*a(C(h)*d,.25-g),2*p(t)*a(f*m(u),.25+g)]};var O=E(8),R=c(1+_);function F(e,t){var r=i(t);return rv){var l=a(s[1],s[0]),c=E(s[0]*s[0]+s[1]*s[1]),u=r*f((l-v)/r)+v,h=a(m(l-=u),2-o(l));l=u+A(y/c*m(h))-h,s[0]=c*o(l),s[1]=c*m(l)}return s}return s.invert=function(e,i){var s=E(e*e+i*i);if(s>v){var l=a(i,e),c=r*f((l-v)/r)+v,u=l>c?-1:1,h=s*o(c-l),d=1/g(u*S((h-y)/E(y*(y-2*h)+s*s)));e=s*o(l=c+2*n((d+u*E(d*d-3))/3)),i=s*m(l)}return t.geoAzimuthalEquidistantRaw.invert(e,i)},s}function B(e,r){if(arguments.length<2&&(r=e),1===r)return t.geoAzimuthalEqualAreaRaw;if(r===1/0)return N;function i(i,n){var a=t.geoAzimuthalEqualAreaRaw(i/r,n);return a[0]*=e,a}return i.invert=function(i,n){var a=t.geoAzimuthalEqualAreaRaw.invert(i/e,n);return a[0]*=r,a},i}function N(e,t){return[e*o(t)/o(t/=2),2*m(t)]}function U(e,t,r){var n,a,o,s=100;r=void 0===r?0:+r,t*=1;do(a=e(r))===(o=e(r+1e-6))&&(o=a+1e-6),r-=n=-1e-6*(a-t)/(a-o);while(s-- >0&&i(n)>1e-6);return s<0?NaN:r}function V(e,t,r){return void 0===t&&(t=40),void 0===r&&(r=1e-12),function(n,a,o,s){var l,c,u;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var h=0;hl){o-=c/=2,s-=u/=2;continue}l=m;var g=(o>0?-1:1)*r,y=(s>0?-1:1)*r,v=e(o+g,s),x=e(o,s+y),b=(v[0]-d[0])/g,_=(v[1]-d[1])/g,w=(x[0]-d[0])/y,T=(x[1]-d[1])/y,M=T*b-_*w,k=(.5>i(M)?.5:1)/M;if(c=(p*w-f*T)*k,u=(f*_-p*b)*k,o+=c,s+=u,i(c)0&&(n[1]*=1+a/1.5*n[0]*n[0]),n}return t.invert=V(t),t}function H(e,t){var r,n=e*m(t),a=30;do t-=r=(t+m(t)-n)/(1+o(t));while(i(r)>1e-6&&--a>0);return t/2}function G(e,t,r){function i(i,n){return[e*i*o(n=H(r,n)),t*m(n)]}return i.invert=function(i,n){return[i/(e*o(n=A(n/t))),A((2*n+m(2*n))/r)]},i}F.invert=function(e,t){if((a=i(t))1e-12&&--u>0);return[e/(o(l)*(O-1/m(l))),p(t)*l]},N.invert=function(e,t){var r=2*A(t/2);return[e*o(r/2)/o(r),r]};var W=G(_/v,_,y);function Y(e,t){var r=H(y,t);return[2.00276*e/(1/o(t)+1.11072/o(r)),(t+_*m(r))/2.00276]}function Z(e){var r=0,i=t.geoProjectionMutator(e),n=i(r);return n.parallel=function(e){return arguments.length?i(r=e*k):r*M},n}function $(e,t){return[e*o(t),t]}function X(e){if(!e)return $;var t=1/g(e);function r(r,i){var n=t+e-i,a=n&&r*o(i)/n;return[n*m(a),t-n*o(a)]}return r.invert=function(r,i){var n=E(r*r+(i=t-i)*i),s=t+e-n;return[n/o(s)*a(r,i),s]},r}function K(e){function t(t,r){var i=v-r,n=i&&t*e*m(i)/i;return[i*m(n)/e,v-i*o(n)]}return t.invert=function(t,r){var i=t*e,n=v-r,o=E(i*i+n*n),s=a(i,n);return[(o?o/m(o):1)*s/e,v-o]},t}Y.invert=function(e,t){var r,n,a=2.00276*t,s=t<0?-x:x,l=25;do n=a-_*m(s),s-=r=(m(2*s)+2*s-y*m(n))/(2*o(2*s)+2+y*o(n)*_*o(s));while(i(r)>1e-6&&--l>0);return[e*(1/o(n=a-_*m(s))+1.11072/o(s))/2.00276,n]},$.invert=function(e,t){return[e/o(t),t]};var J=G(1,4/y,y);function Q(e,t,r,n,s,l){var c,u=o(l);if(i(e)>1||i(l)>1)c=S(r*s+t*n*u);else{var h=m(e/2),d=m(l/2);c=2*A(E(h*h+t*n*d*d))}return i(c)>1e-6?[c,a(n*m(l),t*s-r*n*u)]:[0,0]}function ee(e,t,r){return S((e*e+t*t-r*r)/(2*e*t))}function et(e,t,r){for(var i,n=[[e[0],e[1],m(e[1]),o(e[1])],[t[0],t[1],m(t[1]),o(t[1])],[r[0],r[1],m(r[1]),o(r[1])]],a=n[2],s=0;s<3;++s,a=i)i=n[s],a.v=Q(i[1]-a[1],a[3],a[2],i[3],i[2],i[0]-a[0]),a.point=[0,0];var c=ee(n[0].v[0],n[2].v[0],n[1].v[0]),u=ee(n[0].v[0],n[1].v[0],n[2].v[0]),h=y-c;n[2].point[1]=0,n[0].point[0]=-(n[1].point[0]=n[0].v[0]/2);var d=[n[2].point[0]=n[0].point[0]+n[2].v[0]*o(c),2*(n[0].point[1]=n[1].point[1]=n[2].v[0]*m(c))];return function(e,t){var r,i=m(t),a=o(t),s=[,,,];for(r=0;r<3;++r){var c,f=n[r];if(s[r]=Q(t-f[1],f[3],f[2],a,i,e-f[0]),!s[r][0])return f.point;s[r][1]=(c=s[r][1]-f.v[1])-2*y*l((c+y)/(2*y))}var p=d.slice();for(r=0;r<3;++r){var g=2==r?0:r+1,v=ee(n[r].v[0],s[r][0],s[g][0]);s[r][1]<0&&(v=-v),r?1==r?(v=u-v,p[0]-=s[r][0]*o(v),p[1]-=s[r][0]*m(v)):(v=h-v,p[0]+=s[r][0]*o(v),p[1]+=s[r][0]*m(v)):(p[0]+=s[r][0]*o(v),p[1]-=s[r][0]*m(v))}return p[0]/=3,p[1]/=3,p}}function er(e){return e[0]*=k,e[1]*=k,e}function ei(e,r,i){var n=t.geoCentroid({type:"MultiPoint",coordinates:[e,r,i]}),a=[-n[0],-n[1]],o=t.geoRotation(a),s=et(er(o(e)),er(o(r)),er(o(i)));s.invert=V(s);var l=t.geoProjection(s).rotate(a),c=l.center;return delete l.rotate,l.center=function(e){return arguments.length?c(o(e)):o.invert(c())},l.clipAngle(90)}function en(e,t){var r=E(1-m(t));return[2/w*e*r,w*(1-r)]}function ea(e){var t=g(e);function r(e,r){return[e,(e?e/m(e):1)*(m(r)*o(e)-t*o(r))]}return r.invert=t?function(e,r){e&&(r*=m(e)/e);var i=o(e);return[e,2*a(E(i*i+t*t-r*r)-i,t-r)]}:function(e,t){return[e,A(e?t*g(e)/e:t)]},r}en.invert=function(e,t){var r=(r=t/w-1)*r;return[r>0?e*E(y/r)/2:0,A(1-r)]};var eo=E(3);function es(e,t){return[eo*e*(2*o(2*t/3)-1)/w,eo*w*m(t/3)]}function el(e){var t=o(e);function r(e,r){return[e*t,m(r)/t]}return r.invert=function(e,r){return[e/t,A(r*t)]},r}function ec(e){var t=o(e);function r(e,r){return[e*t,(1+t)*g(r/2)]}return r.invert=function(e,r){return[e/t,2*n(r/(1+t))]},r}function eu(e,t){var r=E(8/(3*y));return[r*e*(1-i(t)/y),r*t]}function eh(e,t){var r=E(4-3*m(i(t)));return[2/E(6*y)*e*r,p(t)*E(2*y/3)*(2-r)]}function ed(e,t){var r=E(y*(4+y));return[2/r*e*(1+E(1-4*t*t/(y*y))),4/r*t]}function ef(e,t){var r=(2+v)*m(t);t/=2;for(var n=0,a=1/0;n<10&&i(a)>1e-6;n++){var s=o(t);t-=a=(t+m(t)*(s+2)-r)/(2*s*(1+s))}return[2/E(y*(4+y))*e*(1+o(t)),2*E(y/(4+y))*m(t)]}function ep(e,t){return[e*(1+o(t))/E(2+y),2*t/E(2+y)]}function em(e,t){for(var r=(1+v)*m(t),n=0,a=1/0;n<10&&i(a)>1e-6;n++)t-=a=(t+m(t)-r)/(1+o(t));return r=E(2+y),[e*(1+o(t))/r,2*t/r]}es.invert=function(e,t){var r=3*A(t/(eo*w));return[w*e/(eo*(2*o(2*r/3)-1)),r]},eu.invert=function(e,t){var r=E(8/(3*y)),n=t/r;return[e/(r*(1-i(n)/y)),n]},eh.invert=function(e,t){var r=2-i(t)/E(2*y/3);return[e*E(6*y)/(2*r),p(t)*A((4-r*r)/3)]},ed.invert=function(e,t){var r=E(y*(4+y))/2;return[e*r/(1+E(1-t*t*(4+y)/(4*y))),t*r/2]},ef.invert=function(e,t){var r=t*E((4+y)/y)/2,i=A(r),n=o(i);return[e/(2/E(y*(4+y))*(1+n)),A((i+r*(n+2))/(2+v))]},ep.invert=function(e,t){var r=E(2+y),i=t*r/2;return[r*e/(1+o(i)),i]},em.invert=function(e,t){var r=1+v,i=E(r/2);return[2*e*i/(1+o(t*=i)),A((t+m(t))/r)]};var eg=3+2*_;function ey(e,t){var r=m(e/=2),i=o(e),a=E(o(t)),s=o(t/=2),l=m(t)/(s+_*i*a),u=E(2/(1+l*l)),h=E((_*s+(i+r)*a)/(_*s+(i-r)*a));return[eg*(u*(h-1/h)-2*c(h)),eg*(u*l*(h+1/h)-2*n(l))]}ey.invert=function(e,t){if(!(r=D.invert(e/1.2,1.065*t)))return null;var r,a=r[0],s=r[1],l=20;e/=eg,t/=eg;do{var d=a/2,f=s/2,p=m(d),g=o(d),y=m(f),x=o(f),w=o(s),T=E(w),M=y/(x+_*g*T),k=M*M,A=E(2/(1+k)),S=(_*x+(g+p)*T)/(_*x+(g-p)*T),C=E(S),L=C-1/C,P=C+1/C,I=A*L-2*c(C)-e,z=A*M*P-2*n(M)-t,O=y&&b*T*p*k/y,R=(_*g*x+T)/(2*(x+_*g*T)*(x+_*g*T)*T),F=-.5*M*A*A*A,j=F*O,B=F*R,N=(N=2*x+_*T*(g-p))*N*C,U=(_*g*x*T+w)/N,V=-(_*p*y)/(T*N),q=L*j-2*U/C+A*(U+U/S),H=L*B-2*V/C+A*(V+V/S),G=M*P*j-2*O/(1+k)+A*P*O+A*M*(U-U/S),W=M*P*B-2*R/(1+k)+A*P*R+A*M*(V-V/S),Y=H*G-W*q;if(!Y)break;var Z=(z*H-I*W)/Y,$=(I*G-z*q)/Y;a-=Z,s=u(-v,h(v,s-$))}while((i(Z)>1e-6||i($)>1e-6)&&--l>0);return 1e-6>i(i(s)-v)?[0,s]:l&&[a,s]};var ev=o(35*k);function ex(e,t){var r=g(t/2);return[e*ev*E(1-r*r),(1+ev)*r]}function eb(e,t){var r=t/2,i=o(r);return[2*e/w*o(t)*i*i,w*g(r)]}function e_(e){var t=1-e,r=n(y,0)[0]-n(-y,0)[0],i=E(2*(n(0,v)[1]-n(0,-v)[1])/r);function n(r,i){var n=o(i),a=m(i);return[n/(t+e*n)*r,t*i+e*a]}function a(e,t){var r=n(e,t);return[r[0]*i,r[1]/i]}function s(e){return a(0,e)[1]}return a.invert=function(r,n){var a=U(s,n);return[r/i*(e+t/o(a)),a]},a}function ew(e){return[e[0]/2,A(g(e[1]/2*k))*M]}function eT(e){return[2*e[0],2*n(m(e[1]*k))*M]}function eM(e,r){var n=2*y/r,s=e*e;function l(r,l){var c=t.geoAzimuthalEquidistantRaw(r,l),u=c[0],h=c[1],d=u*u+h*h;if(d>s){var p=E(d),g=a(h,u),x=n*f(g/n),b=g-x,_=e*o(b),w=(e*m(b)-b*m(_))/(v-_),T=ek(b,w),M=(y-e)/eA(T,_,y);u=p;var k,A=50;do u-=k=(e+eA(T,_,u)*M-p)/(T(u)*M);while(i(k)>1e-6&&--A>0);h=b*m(u),us){var u=E(c),h=a(l,r),d=n*f(h/n),p=h-d;r=u*o(p),l=u*m(p);for(var g=r-v,x=m(r),b=l/x,_=ri(_)||!--w)break;b-=_=(b*x-S*g-l)/(x-2*g*(A*(M+b*T*o(M)-k)-T*(T-b*k))/(A*A))}r=(u=e+eA(C,M,r)*(y-e)/eA(C,M,y))*o(h=d+b),l=u*m(h)}return t.geoAzimuthalEquidistantRaw.invert(r,l)},l}function ek(e,t){return function(r){var i=e*o(r);return r1e-6||i(f)>1e-6)&&--v>0);return[p,g]},u}ex.invert=function(e,t){var r=t/(1+ev);return[e&&e/(ev*E(1-r*r)),2*n(r)]},eb.invert=function(e,t){var r=n(t/w),i=o(r),a=2*r;return[e*w/2/(o(a)*i*i),a]};var eE=eS(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555),eC=eS(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742),eL=eS(5/6*y,-.62636,-.0344,0,1.3493,-.05524,0,.045);function eP(e,t){var r=e*e,i=t*t;return[e*(1-.162388*i)*(.87-952426e-9*r*r),t*(1+i/12)]}eP.invert=function(e,t){var r,n=e,a=t,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-t)/(1+s/4)}while(i(r)>1e-6&&--o>0);o=50,e/=1-.162388*s;do{var l=(l=n*n)*l;n-=r=(n*(.87-952426e-9*l)-e)/(.87-.00476213*l)}while(i(r)>1e-6&&--o>0);return[n,a]};var eI=eS(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function ez(e){var t=e(v,0)[0]-e(-v,0)[0];function r(r,i){var n=r>0?-.5:.5,a=e(r+n*y,i);return a[0]-=n*t,a}return e.invert&&(r.invert=function(r,i){var n=r>0?-.5:.5,a=e.invert(r+n*t,i),o=a[0]-n*y;return o<-y?o+=2*y:o>y&&(o-=2*y),a[0]=o,a}),r}function eD(e,t){var r=p(e),n=p(t),s=o(t),l=o(e)*s,c=m(e)*s,u=m(n*t);e=i(a(c,u)),t=A(l),i(e-v)>1e-6&&(e%=v);var h=function(e,t){if(t===v)return[0,0];var r,n,a=m(t),s=a*a,l=s*s,c=1+l,u=1+3*l,h=1-l,d=A(1/E(c)),f=h+s*c*d,p=(1-a)/f,g=E(p),x=p*c,b=E(x),_=g*h;if(0===e)return[0,-(_+s*b)];var w,T=o(t),M=1/T,k=2*a*T,S=(-f*T-(-3*s+d*u)*k*(1-a))/(f*f),C=s*c*S+p*u*k,L=-M*k,P=-M*C,I=-2*M*(.5*S/g*h-2*s*g*k),z=4*e/y;if(e>.222*y||t.175*y){if(r=(_+s*E(x*(1+l)-_*_))/(1+l),e>y/4)return[r,r];var D=r,O=.5*r;r=.5*(O+D),n=50;do{var R=E(x-r*r),F=r*(I+L*R)+P*A(r/b)-z;if(!F)break;F<0?O=r:D=r,r=.5*(O+D)}while(i(D-O)>1e-6&&--n>0)}else{r=1e-6,n=25;do{var j=r*r,B=E(x-j),N=I+L*B,U=r*N+P*A(r/b)-z,V=N+(P-L*j)/B;r-=w=B?U/V:0}while(i(w)>1e-6&&--n>0)}return[r,-_-s*E(x-r*r)]}(e>y/4?v-e:e,t);return e>y/4&&(u=h[0],h[0]=-h[1],h[1]=-u),h[0]*=r,h[1]*=-n,h}function eO(e,t){if(t<1e-6)return u=m(e),l=o(e),a=t*(e-u*l)/4,[u-a*l,l+a*u,1-t*u*u/2,e-a];if(t>=.999999){var r;return a=(1-t)/4,l=L(e),u=((r=s(2*(r=e)))-1)/(r+1),c=1/l,[u+a*((h=l*C(e))-e)/(l*l),c-a*u*c*(h-e),c+a*u*c*(h+e),2*n(s(e))-v+a*(h-e)/l]}var a,l,c,u,h,d=[1,0,0,0,0,0,0,0,0],f=[E(t),0,0,0,0,0,0,0,0],p=0;for(l=E(1-t),h=1;i(f[p]/d[p])>1e-6&&p<8;)a=d[p++],f[p]=(a-l)/2,d[p]=(a+l)/2,l=E(a*l),h*=2;c=h*d[p]*e;do c=(A(u=f[p]*m(l=c)/d[p])+c)/2;while(--p);return[m(c),u=o(c),u/o(c-l),c]}function eR(e,t){if(!t)return e;if(1===t)return c(g(e/2+x));for(var r=1,a=E(1-t),o=E(t),s=0;i(o)>1e-6;s++){if(e%y){var l=n(a*g(e)/r);l<0&&(l+=y),e+=l+~~(e/y)*y}else e+=e;o=(r+a)/2,a=E(r*a),o=((r=o)-a)/2}return e/(d(2,s)*r)}function eF(e,t){var r,l,u,h,d,f=(_-1)/(_+1),x=E(1-f*f),b=eR(v,x*x),w=s(-1*c(g(y/4+i(t)/2)))/E(f),T=(r=w*o(-1*e),l=w*m(-1*e),u=r*r,h=l+1,[.5*((r>=0?v:-v)-a(d=1-u-l*l,2*r)),-.25*c(d*d+4*u)+.5*c(h*h+u)]),M=function(e,t,r){var a=i(e),o=C(i(t));if(a){var s=1/m(a),l=1/(g(a)*g(a)),c=-(l+o*o*s*s*r-1+r),u=(-c+E(c*c-(r-1)*l*4))/2;return[eR(n(1/E(u)),r)*p(e),eR(n(E((u/l-1)/r)),1-r)*p(t)]}return[0,eR(n(o),1-r)*p(t)]}(T[0],T[1],x*x);return[-M[1],(t>=0?1:-1)*(.5*b-M[0])]}function ej(e){var t=m(e),r=o(e),n=eB(e);function s(e,a){var s=n(e,a);e=s[0];var l=m(a=s[1]),c=o(a),u=o(e),h=S(t*l+r*c*u),d=m(h),f=i(d)>1e-6?h/d:1;return[f*r*m(e),(i(e)>v?f:-f)*(t*c-r*l*u)]}return n.invert=eB(-e),s.invert=function(e,r){var i=E(e*e+r*r),s=-m(i),l=o(i),c=i*l,u=-r*s,h=i*t,d=E(c*c+u*u-h*h),f=a(c*h+u*d,u*h-c*d),p=(i>v?-1:1)*a(e*s,i*o(f)*l+r*m(f)*s);return n.invert(p,f)},s}function eB(e){var t=m(e),r=o(e);return function(e,i){var n=o(i),s=o(e)*n,l=m(e)*n,c=m(i);return[a(l,s*r-c*t),A(c*r+s*t)]}}eD.invert=function(e,t){i(e)>1&&(e=2*p(e)-e),i(t)>1&&(t=2*p(t)-t);var r=p(e),n=p(t),s=-r*e,l=-n*t,c=l/s<1,u=function(e,t){for(var r=0,n=1,a=.5,s=50;;){var l=a*a,c=E(a),u=A(1/E(1+l)),h=1-l+a*(1+l)*u,d=(1-c)/h,f=E(d),p=d*(1+l),m=f*(1-l),g=E(p-e*e),v=t+m+a*g;if(1e-12>i(n-r)||0==--s||0===v)break;v>0?r=a:n=a,a=.5*(r+n)}if(!s)return null;var x=A(c),b=o(x),_=1/b,w=2*c*b,T=(-h*b-(-3*a+u*(1+3*l))*w*(1-c))/(h*h),M=.5*T/f*(1-l)-2*a*f*w,k=-_*(a*(1+l)*T+d*(1+3*l)*w);return[y/4*(e*(-2*_*M+-_*w*g)+k*A(e/E(p))),x]}(c?l:s,c?s:l),h=u[0],d=u[1],f=o(d);return c&&(h=-v-h),[r*(a(m(h)*f,-m(d))+y),n*A(o(h)*f)]},eF.invert=function(e,t){var r,i,o,l,u,h,d,f,p,m=(_-1)/(_+1),g=E(1-m*m),y=(r=.5*eR(v,g*g)-t,i=-e,o=g*g,r?(l=eO(r,o),i?(h=(u=eO(i,1-o))[1]*u[1]+o*l[0]*l[0]*u[0]*u[0],[[l[0]*u[2]/h,l[1]*l[2]*u[0]*u[1]/h],[l[1]*u[1]/h,-l[0]*l[2]*u[0]*u[2]/h],[l[2]*u[1]*u[2]/h,-o*l[0]*l[1]*u[0]/h]]):[[l[0],0],[l[1],0],[l[2],0]]):[[0,(u=eO(i,1-o))[0]/u[1]],[1/u[1],0],[u[2]/u[1],0]]),x=(d=y[0],p=(f=y[1])[0]*f[0]+f[1]*f[1],[(d[0]*f[0]+d[1]*f[1])/p,(d[1]*f[0]-d[0]*f[1])/p]);return[-(a(x[1],x[0])/1),2*n(s(-.5*c(m*x[0]*x[0]+m*x[1]*x[1])))-v]};var eN=A(1-.3333333333333333)*M,eU=el(0);function eV(e){var t=eN*k,r=en(y,t)[0]-en(-y,t)[0],n=eU(0,t)[1],a=en(0,t)[1],o=w-a,s=T/e,c=4/T,d=n+o*o*4/T;function f(f,p){var m,g=i(p);if(g>t){var v=h(e-1,u(0,l((f+y)/s)));f+=y*(e-1)/e-v*s,(m=en(f,g))[0]=m[0]*T/r-T*(e-1)/(2*e)+v*T/e,m[1]=n+(m[1]-a)*4*o/T,p<0&&(m[1]=-m[1])}else m=eU(f,p);return m[0]*=c,m[1]/=d,m}return f.invert=function(t,f){t/=c;var p=i(f*=d);if(p>n){var m=h(e-1,u(0,l((t+y)/s)));t=(t+y*(e-1)/e-m*s)*r/T;var g=en.invert(t,.25*(p-n)*T/o+a);return g[0]-=y*(e-1)/e-m*s,f<0&&(g[1]=-g[1]),g}return eU.invert(t,f)},f}function eq(e,t){return[e,1&t?89.999999:eN]}function eH(e,t){return[e,1&t?-89.999999:-eN]}function eG(e){return[.999999*e[0],e[1]]}function eW(e){var t,r=1+e,n=A(m(1/r)),s=2*E(y/(t=y+4*n*r)),l=.5*s*(r+E(e*(2+e))),c=e*e,u=r*r;function h(h,d){var f,p,g=1-m(d);if(g&&g<2){var x,b=v-d,_=25;do{var w=m(b),T=o(b),M=n+a(w,r-T),k=1+u-2*r*T;b-=x=(b-c*n-r*w+k*M-.5*g*t)/(2*r*w*M)}while(i(x)>1e-12&&--_>0);f=s*E(k),p=h*M/y}else f=s*(e+g),p=h*n/y;return[f*m(p),l-f*o(p)]}return h.invert=function(e,i){var o=e*e+(i-=l)*i,h=(1+u-o/(s*s))/(2*r),d=S(h),f=m(d),p=n+a(f,r-h);return[A(e/E(o))*y/p,A(1-2*(d-c*n-r*f+(1+u-2*r*h)*p)/t)]},h}function eY(e,t){return t>-.7109889596207567?(e=W(e,t),e[1]+=.0528035274542,e):$(e,t)}function eZ(e,t){return i(t)>.7109889596207567?(e=W(e,t),e[1]-=t>0?.0528035274542:-.0528035274542,e):$(e,t)}function e$(e,t,r,i){var n=E(4*y/(2*r+(1+e-t/2)*m(2*r)+(e+t)/2*m(4*r)+t/2*m(6*r))),a=E(i*m(r)*E((1+e*o(2*r)+t*o(4*r))/(1+e+t))),s=r*c(1);function l(r){return E(1+e*o(2*r)+t*o(4*r))}function c(i){var n=i*r;return(2*n+(1+e-t/2)*m(2*n)+(e+t)/2*m(4*n)+t/2*m(6*n))/r}function u(e){return l(e)*m(e)}var h=function(e,t){var i=r*U(c,s*m(t)/r,t/y);isNaN(i)&&(i=r*p(t));var u=n*l(i);return[u*a*e/y*o(i),u/a*m(i)]};return h.invert=function(e,t){var i=U(u,t*a/n);return[e*y/(o(i)*n*a*l(i)),A(r*c(i/r)/s)]},0===r&&(n=E(i/y),(h=function(e,t){return[e*n,m(t)/n]}).invert=function(e,t){return[e/n,A(t*n)]}),h}function eX(e,t,r){function n(r){return e+(1-e)*d(1-d(r,t),1/t)}function a(e){var t,r,i,a,o;return void 0===t&&(t=20),r=n(0),o=(r+4*(i=n(.5*(0+e)))+(a=n(e)))*(e-0)/6,function e(t,r,i,n,a,o,s,l,c,u,h){var d,f,p,m,g,y,v,x,b,_;if(h.nanEncountered)return NaN;if(d=i-r,f=t(r+.25*d),p=t(i-.25*d),isNaN(f)||isNaN(p)){h.nanEncountered=!0;return}return _=((y=(m=d*(n+4*f+a)/12)+(g=d*(a+4*p+o)/12))-s)/15,u>c?(h.maxDepthCount++,y+_):Math.abs(_)e?r=i:t=i,i=t+r>>1;while(i>t);var n=l[i+1]-l[i];return n&&(n=(e-l[i+1])/n),(i+1+n)/1e3}var h=2*u(1)/y*o/r,f=function(e,t){var r=u(i(m(t))),a=n(r)*e;return r/=h,[a,t>=0?r:-r]};return f.invert=function(e,t){var r;return 1>i(t*=h)&&(r=p(t)*A(a(i(t))*o)),[e/n(i(t)),r]},f}function eK(e,t){for(var r,i,n,a=-1,o=e.length,s=e[0],l=[];++aa[o][2][0];++o);var l=e(t-a[o][1][0],r);return l[0]+=e(a[o][1][0],i*r>i*a[o][0][1]?a[o][0][1]:r)[0],l}a?o.invert=a(o):e.invert&&(o.invert=function(t,r){for(var a=l[+(r<0)],s=n[+(r<0)],c=0,u=a.length;ci(d[0]-f[0])&&1e-6>i(d[1]-f[1]))?p:null}}});var s,l,c=t.geoProjection(o),u=c.stream;return c.stream=function(e){var r=c.rotate(),i=u(e),n=(c.rotate([0,0]),u(e));return c.rotate(r),i.sphere=function(){t.geoStream(s,n)},i},c.lobes=function(t){return arguments.length?(s=function(e){var t,i,n,a,o,s,l,c=[],u=e[0].length;for(l=0;l=0;--l)i=(t=e[1][l])[0][0],n=t[0][1],a=t[1][1],o=t[2][0],s=t[2][1],c.push(eK([[o-1e-6,s-1e-6],[o-1e-6,a+1e-6],[i+1e-6,a+1e-6],[i+1e-6,n-1e-6]],30));return{type:"Polygon",coordinates:[r.merge(c)]}}(t),l=(n=t.map(function(e){return e.map(function(e){return[[e[0][0]*k,e[0][1]*k],[e[1][0]*k,e[1][1]*k],[e[2][0]*k,e[2][1]*k]]})})).map(function(t){return t.map(function(t){var r,i=e(t[0][0],t[0][1])[0],n=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[i,a],[n,o]]})}),c):n.map(function(e){return e.map(function(e){return[[e[0][0]*M,e[0][1]*M],[e[1][0]*M,e[1][1]*M],[e[2][0]*M,e[2][1]*M]]})})},null!=n&&c.lobes(n),c}eY.invert=function(e,t){return t>-.7109889596207567?W.invert(e,t-.0528035274542):$.invert(e,t)},eZ.invert=function(e,t){return i(t)>.7109889596207567?W.invert(e,t+(t>0?.0528035274542:-.0528035274542)):$.invert(e,t)};var eQ=[[[[-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]]]],e0=[[[[-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]]]],e1=[[[[-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]]]],e2=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]],e3=[[[[-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]]]],e5=[[[[-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 e4(e,t){return[3/T*e*E(y*y/3-t*t),t]}function e6(e){function t(t,r){if(1e-6>i(i(r)-v))return[0,r<0?-2:2];var n=m(r),a=d((1+n)/(1-n),e/2),s=.5*(a+1/a)+o(t*=e);return[2*m(t)/s,(a-1/a)/s]}return t.invert=function(t,r){var n=i(r);if(1e-6>i(n-2))return t?null:[0,p(r)*v];if(n>2)return null;t/=2,r/=2;var o=t*t,s=r*r,l=2*r/(1+o+s);return l=d((1+l)/(1-l),1/e),[a(2*t,1-o-s)/e,A((l-1)/(l+1))]},t}e4.invert=function(e,t){return[T/3*e/E(y*y/3-t*t),t]};var e8=y/_;function e9(e,t){return[e*(1+E(o(t)))/2,t/(o(t/2)*o(e/6))]}function e7(e,t){var r=e*e,i=t*t;return[e*(.975534+i*(-.119161+-.0143059*r+-.0547009*i)),t*(1.00384+r*(.0802894+-.02855*i+199025e-9*r)+i*(.0998909+-.0491032*i))]}function te(e,t){return[m(e)/o(t),g(t)*o(e)]}function tt(e){var t=o(e),r=g(x+e/2);function n(n,a){var o=a-e,s=1e-6>i(o)?n*t:1e-6>i(s=x+a/2)||1e-6>i(i(s)-v)?0:n*o/c(g(s)/r);return[s,o]}return n.invert=function(n,a){var o,s=a+e;return[1e-6>i(a)?n/t:1e-6>i(o=x+s/2)||1e-6>i(i(o)-v)?0:n*c(g(o)/r)/a,s]},n}function tr(e,t){return[e,1.25*c(g(x+.4*t))]}function ti(e){var t=e.length-1;function r(r,i){for(var n,a=o(i),s=2/(1+a*o(r)),l=s*a*m(r),c=s*m(i),u=t,h=e[u],d=h[0],f=h[1];--u>=0;)d=(h=e[u])[0]+l*(n=d)-c*f,f=h[1]+l*f+c*n;return[d=l*(n=d)-c*f,f=l*f+c*n]}return r.invert=function(r,s){var l=20,c=r,u=s;do{for(var h,d=t,f=e[d],p=f[0],g=f[1],y=0,v=0;--d>=0;)f=e[d],y=p+c*(h=y)-u*v,v=g+c*v+u*h,p=f[0]+c*(h=p)-u*g,g=f[1]+c*g+u*h;y=p+c*(h=y)-u*v,v=g+c*v+u*h,p=c*(h=p)-u*g-r,g=c*g+u*h-s;var x,b,_=y*y+v*v;c-=x=(p*y+g*v)/_,u-=b=(g*y-p*v)/_}while(i(x)+i(b)>1e-6*1e-6&&--l>0);if(l){var w=E(c*c+u*u),T=2*n(.5*w),M=m(T);return[a(c*M,w*o(T)),w?A(u*M/w):0]}},r}e9.invert=function(e,t){var r=i(e),n=i(t),a=1e-6,s=v;ni(M)&&1e-6>i(k))break}return[e<0?-a:a,t<0?-s:s]},e7.invert=function(e,t){var r=p(e)*y,n=t/2,a=50;do{var o=r*r,s=n*n,l=r*n,c=r*(.975534+s*(-.119161+-.0143059*o+-.0547009*s))-e,u=n*(1.00384+o*(.0802894+-.02855*s+199025e-9*o)+s*(.0998909+-.0491032*s))-t,h=.975534-s*(.119161+3*o*.0143059+.0547009*s),d=-l*(.238322+.2188036*s+.0286118*o),f=l*(.1605788+7961e-7*o+-.0571*s),m=1.00384+o*(.0802894+199025e-9*o)+s*(3*(.0998909-.02855*o)-.245516*s),g=d*f-m*h,v=(u*d-c*m)/g,x=(c*f-u*h)/g;r-=v,n-=x}while((i(v)>1e-6||i(x)>1e-6)&&--a>0);return a&&[r,n]},te.invert=function(e,t){var r=e*e,i=t*t+1,n=r+i,a=e?b*E((n-E(n*n-4*r))/r):1/E(i);return[A(e*a),p(t)*S(a)]},tr.invert=function(e,t){return[e,2.5*n(s(.8*t))-.625*y]};var tn=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],ta=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],to=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ts=[[.9245,0],[0,0],[.01943,0]],tl=[[.721316,0],[0,0],[-.00881625,-.00617325]];function tc(e,r){var i=t.geoProjection(ti(e)).rotate(r).clipAngle(90),n=t.geoRotation(r),a=i.center;return delete i.rotate,i.center=function(e){return arguments.length?a(n(e)):n.invert(a())},i}var tu=E(6),th=E(7);function td(e,t){var r=A(7*m(t)/(3*tu));return[tu*e*(2*o(2*r/3)-1)/th,9*m(r/3)/th]}function tf(e,t){for(var r,n=(1+b)*m(t),a=t,s=0;s<25&&(a-=r=(m(a/2)+m(a)-n)/(.5*o(a/2)+o(a)),!(1e-6>i(r)));s++);return[e*(1+2*o(a)/o(a/2))/(3*_),2*E(3)*m(a/2)/E(2+_)]}function tp(e,t){for(var r,n=E(6/(4+y)),a=(1+y/4)*m(t),s=t/2,l=0;l<25&&(s-=r=(s/2+m(s)-a)/(.5+o(s)),!(1e-6>i(r)));l++);return[n*(.5+o(s))*e/1.5,n*s]}function tm(e,t){var r=t*t,i=r*r,n=r*i;return[e*(.84719-.13063*r+n*n*(-.04515+.05494*r-.02326*i+.00331*n)),t*(1.01183+i*i*(-.02625+.01926*r-.00396*i))]}function tg(e,t){return[e*(1+o(t))/2,2*(t-g(t/2))]}td.invert=function(e,t){var r=3*A(t*th/9);return[e*th/(tu*(2*o(2*r/3)-1)),A(3*m(r)*tu/7)]},tf.invert=function(e,t){var r=t*E(2+_)/(2*E(3)),i=2*A(r);return[3*_*e/(1+2*o(i)/o(i/2)),A((r+m(i))/(1+b))]},tp.invert=function(e,t){var r=E(6/(4+y)),n=t/r;return 1e-6>i(i(n)-v)&&(n=n<0?-v:v),[1.5*e/(r*(.5+o(n))),A((n/2+m(n))/(1+y/4))]},tm.invert=function(e,t){var r,n,a,o,s=t,l=25;do a=(n=s*s)*n,s-=r=(s*(1.01183+a*a*(-.02625+.01926*n-.00396*a))-t)/(1.01183+a*a*(-.23625+.21186*n+-.05148*a));while(i(r)>1e-12&&--l>0);return a=(n=s*s)*n,o=n*a,[e/(.84719-.13063*n+o*o*(-.04515+.05494*n-.02326*a+.00331*o)),s]},tg.invert=function(e,t){for(var r=t/2,n=0,a=1/0;n<10&&i(a)>1e-6;++n){var s=o(t/2);t-=a=(t-g(t/2)-r)/(1-.5/(s*s))}return[2*e/(1+o(t)),t]};var ty=[[[[-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 tv(e,t){var r=m(t),n=o(t),a=p(e);if(0===e||i(t)===v)return[0,t];if(0===t)return[e,0];if(i(e)===v)return[e*n,v*r];var s=y/(2*e)-2*e/y,l=2*t/y,c=(1-l*l)/(r-l),u=s*s,h=c*c,d=1+u/h,f=1+h/u,g=(s*r/c-s/2)/d,x=(h*r/u+c/2)/f,b=x*x-(h*r*r/u+c*r-1)/f;return[v*(g+E(g*g+n*n/d)*a),v*(x+E(b<0?0:b)*p(-t*s)*a)]}tv.invert=function(e,t){e/=v,t/=v;var r=e*e,i=r+t*t,n=y*y;return[e?(i-1+E((1-i)*(1-i)+4*r))/(2*e)*v:0,U(function(e){return i*(y*m(e)-2*e)*y+4*e*e*(t-m(e))+2*y*e-n*t},0)]};function tx(e,t){var r=t*t;return[e,t*(1.0148+r*r*(.23185+r*(-.14499+.02406*r)))]}function tb(e,t){if(1e-6>i(t))return[e,0];var r=g(t),n=e*m(t);return[m(n)/r,t+(1-o(n))/r]}function t_(e,t){return[e[0]*t[0]+e[1]*t[3],e[0]*t[1]+e[1]*t[4],e[0]*t[2]+e[1]*t[5]+e[2],e[3]*t[0]+e[4]*t[3],e[3]*t[1]+e[4]*t[4],e[3]*t[2]+e[4]*t[5]+e[5]]}function tw(e,t){return[e[0]-t[0],e[1]-t[1]]}function tT(e){return E(e[0]*e[0]+e[1]*e[1])}function tM(e,r,n){function s(e,t){var i,n=r(e,t),a=n.project([e*M,t*M]);return(i=n.transform)?[i[0]*a[0]+i[1]*a[1]+i[2],-(i[3]*a[0]+i[4]*a[1]+i[5])]:(a[1]=-a[1],a)}!function e(t,r){if(t.edges=function(e){for(var t=e.length,r=[],i=e[t-1],n=0;n=0;)if(i=t[s],r[0]===i[0]&&r[1]===i[1]){if(a)return[a,r];a=r}}}(t.face,r.face),p=(s=f.map(r.project),l=f.map(t.project),i=c=tw(s[1],s[0]),n=u=tw(l[1],l[0]),h=a(i[0]*n[1]-i[1]*n[0],i[0]*n[0]+i[1]*n[1]),d=tT(c)/tT(u),t_([1,0,s[0][0],0,1,s[0][1]],t_([d,0,0,0,d,0],t_([o(h),m(h),0,-m(h),o(h),0],[1,0,-l[0][0],0,1,-l[0][1]]))));t.transform=r.transform?t_(r.transform,p):p;for(var g=r.edges,y=0,v=g.length;y1.790857183?t=1.790857183:t<-1.790857183&&(t=-1.790857183);var r,n=t;do{var a=n*n;n-=r=(n*(1.0148+a*a*(.23185+a*(-.14499+.02406*a)))-t)/(1.0148+a*a*(1.1592500000000001+a*(-1.01493+.21654*a)))}while(i(r)>1e-6);return[e,n]},tb.invert=function(e,t){if(1e-6>i(t))return[e,0];var r,n=e*e+t*t,a=.5*t,s=10;do{var l=g(a),c=1/o(a),u=n-2*t*a+a*a;a-=r=(l*u+2*(a-t))/(2+u*c*c+2*(a-t)*l)}while(i(r)>1e-6&&--s>0);return l=g(a),[(i(t)i^f>i&&r<(d-c)*(i-u)/(f-u)+c&&(n=!n)}return n}(e[0],r))return e.push(t),!0})||e.push([t])}),tj=[],e.length?e.length>1?{type:"MultiPolygon",coordinates:e}:{type:"Polygon",coordinates:e[0]}:null}};function tV(e){var r=e(v,0)[0]-e(-v,0)[0];function n(t,n){var a=i(t)0?t-y:t+y,n),s=(o[0]-o[1])*b,l=(o[0]+o[1])*b;if(a)return[s,l];var c=r*b,u=s>0^l>0?-1:1;return[u*s-p(l)*c,u*l-p(s)*c]}return e.invert&&(n.invert=function(t,n){var a=(t+n)*b,o=(n-t)*b,s=i(a)<.5*r&&i(o)<.5*r;if(!s){var l=r*b,c=a>0^o>0?-1:1,u=-c*t+(o>0?1:-1)*l,h=-c*n+(a>0?1:-1)*l;a=(-u-h)*b,o=(u-h)*b}var d=e.invert(a,o);return s||(d[0]+=a>0?y:-y),d}),t.geoProjection(n).rotate([-90,-90,45]).clipAngle(179.999)}function tq(){return tV(eF).scale(111.48)}function tH(e){var t=m(e);function r(r,i){var a=t?g(r*t/2)/t:r/2;if(!i)return[2*a,-e];var s=2*n(a*m(i)),l=1/g(i);return[m(s)*l,i+(1-o(s))*l-e]}return r.invert=function(r,a){if(1e-6>i(a+=e))return[t?2*n(t*r/2)/t:r,0];var s,l=r*r+a*a,c=0,u=10;do{var h=g(c),d=1/o(c),f=l-2*a*c+c*c;c-=s=(h*f+2*(c-a))/(2+f*d*d+2*(c-a)*h)}while(i(s)>1e-6&&--u>0);var p=r*(h=g(c)),v=g(i(a)0?v:-v)*(d+o*(p-c)/2+o*o*(p-2*d+c)/2)]}function tY(e,t){var r=function(e){function t(t,r){var i=o(r),n=(e-1)/(e-i*o(t));return[n*i*m(t),n*m(r)]}return t.invert=function(t,r){var i=t*t+r*r,n=E(i),o=(e-E(1-i*(e+1)/(e-1)))/((e-1)/n+n/(e-1));return[a(t*o,n*E(1-o*o)),n?A(r*o/n):0]},t}(e);if(!t)return r;var i=o(t),n=m(t);function s(t,a){var o=r(t,a),s=o[1],l=s*n/(e-1)+i;return[o[0]*i/l,s/l]}return s.invert=function(t,a){var o=(e-1)/(e-1-a*n);return r.invert(o*t,o*a*i)},s}tG.forEach(function(e){e[1]*=1.0144}),tW.invert=function(e,t){var r=t/v,n=90*r,a=h(18,i(n/5)),o=u(0,l(a));do{var s=tG[o][1],c=tG[o+1][1],d=tG[h(19,o+2)][1],f=d-s,p=d-2*c+s,m=2*(i(r)-c)/f,g=p/f,y=m*(1-g*m*(1-2*g*m));if(y>=0||1===o){n=(t>=0?5:-5)*(y+a);var x,b=50;do o=l(a=h(18,i(n)/5)),y=a-o,s=tG[o][1],n-=(x=(t>=0?v:-v)*((c=tG[o+1][1])+y*((d=tG[h(19,o+2)][1])-s)/2+y*y*(d-2*c+s)/2)-t)*M;while(i(x)>1e-12&&--b>0);break}}while(--o>=0);var _=tG[o][0],w=tG[o+1][0],T=tG[h(19,o+2)][0];return[e/(w+y*(T-_)/2+y*y*(T-2*w+_)/2),n*k]};function tZ(e){return e.length>0}function t$(e){return -90===e||90===e?[0,e]:[-180,Math.floor(1e4*e)/1e4]}function tX(e){var t=e[0],r=e[1],i=!1;return t<=-179.9999?(t=-180,i=!0):t>=179.9999&&(t=180,i=!0),r<=-89.9999?(r=-90,i=!0):r>=89.9999&&(r=90,i=!0),i?[t,r]:e}function tK(e){return e.map(tX)}function tJ(e,t,r){for(var i=0,n=e.length;i=179.9999||u<=-89.9999||u>=89.9999){a[o]=tX(l);for(var h=o+1;h-179.9999&&f<179.9999&&p>-89.9999&&p<89.9999)break}if(h===o+1)continue;if(o){var m={index:-1,polygon:t,ring:a.slice(0,o+1)};m.ring[m.ring.length-1]=t$(u),r[r.length-1]=m}else r.pop();if(h>=s)break;r.push({index:-1,polygon:t,ring:a=a.slice(h-1)}),a[0]=t$(a[0][1]),o=-1,s=a.length}}}}function tQ(e){var t,r,i,n,a,o,s=e.length,l={},c={};for(t=0;t0?y-l:l)*M],u=t.geoProjection(e(s)).rotate(c),h=t.geoRotation(c),d=u.center;return delete u.rotate,u.center=function(e){return arguments.length?d(h(e)):h.invert(d())},u.clipAngle(90)}function t5(e){var r=o(e);function i(e,i){var n=t.geoGnomonicRaw(e,i);return n[0]*=r,n}return i.invert=function(e,i){return t.geoGnomonicRaw.invert(e/r,i)},i}function t4(e,t){return t3(t5,e,t)}function t6(e){if(!(e*=2))return t.geoAzimuthalEquidistantRaw;var r=-e/2,i=-r,n=e*e,s=g(i),l=.5/m(i);function c(t,a){var s=S(o(a)*o(t-r)),l=S(o(a)*o(t-i)),c=a<0?-1:1;return s*=s,l*=l,[(s-l)/(2*e),c*E(4*n*l-(n-s+l)*(n-s+l))/(2*e)]}return c.invert=function(e,t){var n,c,u=t*t,h=o(E(u+(n=e+r)*n)),d=o(E(u+(n=e+i)*n));return[a(c=h-d,n=(h+d)*s),(t<0?-1:1)*S(E(n*n+c*c)*l)]},c}function t8(e,t){return t3(t6,e,t)}function t9(e,t){if(1e-6>i(t))return[e,0];var r=i(t/v),n=A(r);if(1e-6>i(e)||1e-6>i(i(t)-v))return[0,p(t)*y*g(n/2)];var a=o(n),s=i(y/e-e/y)/2,l=s*s,c=a/(r+a-1),u=c*(2/r-1),h=u*u,d=h+l,f=c-h,m=l+c;return[p(e)*y*(s*f+E(l*f*f-d*(c*c-h)))/d,p(t)*y*(u*m-s*E((l+1)*d-m*m))/d]}function t7(e,t){if(1e-6>i(t))return[e,0];var r=i(t/v),n=A(r);if(1e-6>i(e)||1e-6>i(i(t)-v))return[0,p(t)*y*g(n/2)];var a=o(n),s=i(y/e-e/y)/2,l=s*s,c=a*(E(1+l)-s*a)/(1+l*r*r);return[p(e)*y*c,p(t)*y*E(1-c*(2*s+c))]}function re(e,t){if(1e-6>i(t))return[e,0];var r=t/v,n=A(r);if(1e-6>i(e)||1e-6>i(i(t)-v))return[0,y*g(n/2)];var a=(y/e-e/y)/2,s=r/(1+o(n));return[y*(p(e)*E(a*a+1-s*s)-a),y*s]}function rt(e,t){if(!t)return[e,0];var r=i(t);if(!e||r===v)return[0,t];var n=r/v,a=n*n,o=(8*n-a*(a+2)-5)/(2*a*(n-1)),s=o*o,l=n*o,c=a+s+2*l,u=n+3*o,h=e/v,d=h+1/h,f=p(i(e)-v)*E(d*d-4),m=f*f,g=c*(a+s*m-1)+(1-a)*(a*(u*u+4*s)+12*l*s+4*s*s),y=(f*(c+s-1)+2*E(g))/(4*c+m);return[p(e)*v*y,p(t)*v*E(1+f*i(y)-y*y)]}function rr(e,t,r,i){var n=y/3;e=u(e,1e-6),t=u(t,1e-6),e=h(e,v),t=h(t,y-1e-6),r=h(r=u(r,0),99.999999);var s=(i=u(i,1e-6))/100,l=S((r/100+1)*o(n))/n,c=m(e)/m(l*v),d=t/y,f=E(s*m(e/2)/m(t/2)),p=f/E(d*c*l),x=1/(f*E(d*c*l));function b(e,t){var r=c*m(l*t),i=E(1-r*r),n=E(2/(1+i*o(e*=d)));return[p*i*n*m(e),x*r*n]}return b.invert=function(e,t){var r=e/p,i=t/x,n=E(r*r+i*i),o=2*A(n/2);return[a(e*g(o),p*n)/d,n&&A(t*m(o)/(x*c*n))/l]},b}function ri(){var e=65*k,r=60*k,i=20,n=200,a=t.geoProjectionMutator(rr),o=a(e,r,i,n);return o.poleline=function(t){return arguments.length?a(e=t*k,r,i,n):e*M},o.parallels=function(t){return arguments.length?a(e,r=t*k,i,n):r*M},o.inflation=function(t){return arguments.length?a(e,r,i=+t,n):i},o.ratio=function(t){return arguments.length?a(e,r,i,n=+t):n},o.scale(163.775)}t2.invert=function(e,t){var r=t/1.70711,i=m(x*r);return[e/(.74482-.34588*i*i),2*n(r)]},t9.invert=function(e,t){if(1e-6>i(t))return[e,0];if(1e-6>i(e))return[0,v*m(2*n(t/y))];var r=(e/=y)*e,a=(t/=y)*t,s=r+a,l=s*s,c=-i(t)*(1+s),u=c-2*a+r,h=-2*c+1+2*a+l,d=a/h+(2*u*u*u/(h*h*h)-9*c*u/(h*h))/27,f=(c-u*u/(3*h))/h,g=2*E(-f/3),x=S(3*d/(f*g))/3;return[y*(s-1+E(1+2*(r-a)+l))/(2*e),p(t)*y*(-g*o(x+y/3)-u/(3*h))]},t7.invert=function(e,t){if(!e)return[0,v*m(2*n(t/y))];var r=i(e/y),o=(1-r*r-(t/=y)*t)/(2*r),s=E(o*o+1);return[p(e)*y*(s-o),p(t)*v*m(2*a(E((1-2*o*r)*(o+s)-r),E(s+o+r)))]},re.invert=function(e,t){if(!t)return[e,0];var r=t/y,i=(y*y*(1-r*r)-e*e)/(2*y*e);return[e?y*(p(e)*E(i*i+1)-i):0,v*m(2*n(r))]},rt.invert=function(e,t){if(!e||!t)return[e,t];t/=y;var r,n=p(e)*e/v,a=(n*n-1+4*t*t)/i(n),o=a*a,s=2*t,l=50;do{var c=s*s,u=(8*s-c*(c+2)-5)/(2*c*(s-1)),h=(3*s-c*s-10)/(2*c*s),d=u*u,f=s*u,m=s+u,g=m*m,x=s+3*u,b=g*(c+d*o-1)+(1-c)*(c*(x*x+4*d)+d*(12*f+4*d)),_=-2*m*(4*f*d+(1-4*c+3*c*c)*(1+h)+d*(-6+14*c-o+(-8+8*c-2*o)*h)+f*(-8+12*c+(-10+10*c-o)*h)),w=E(b);s-=r=(a*(g+d-1)+2*w-n*(4*g+o))/(a*(2*u*h+2*m*(1+h))+_/w-8*m*(a*(-1+d+g)+2*w)*(1+h)/(o+4*g))}while(r>1e-6&&--l>0);return[p(e)*(E(a*a+4)+a)*y/4,v*s]};var rn=4*y+3*E(3),ra=2*E(2*y*E(3)/rn),ro=G(ra*E(3)/y,ra,rn/6);function rs(e,t){return[e*E(1-3*t*t/(y*y)),t]}function rl(e,t){var r=o(t),i=o(e)*r,n=1-i,s=o(e=a(m(e)*r,-m(t))),l=m(e);return[l*(r=E(1-i*i))-s*n,-s*r-l*n]}function rc(e,t){var r=I(e,t);return[(r[0]+e/v)/2,(r[1]+t)/2]}rs.invert=function(e,t){return[e/E(1-3*t*t/(y*y)),t]},rl.invert=function(e,t){var r=-((e*e+t*t)/2),i=E(-r*(2+r)),n=t*r+e*i,o=e*r-t*i,s=E(o*o+n*n);return[a(i*n,s*(1+r)),s?-A(i*o/s):0]},rc.invert=function(e,t){var r=e,n=t,a=25;do{var s,l=o(n),c=m(n),u=m(2*n),h=c*c,d=l*l,f=m(r),p=o(r/2),g=m(r/2),y=g*g,x=1-d*p*p,b=x?S(l*p)*E(s=1/x):s=0,_=.5*(2*b*l*g+r/v)-e,w=.5*(b*c+n)-t,T=.5*s*(d*y+b*l*p*h)+.5/v,M=s*(f*u/4-b*c*g),k=.125*s*(u*g-b*c*d*f),A=.5*s*(h*p+b*y*l)+.5,C=M*k-A*T,L=(w*M-_*A)/C,P=(_*k-w*T)/C;r-=L,n-=P}while((i(L)>1e-6||i(P)>1e-6)&&--a>0);return[r,n]},e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=function(){var e=v,r=t.geoProjectionMutator(P),i=r(e);return i.radius=function(t){return arguments.length?r(e=t*k):e*M},i.scale(179.976).clipAngle(147)},e.geoAiryRaw=P,e.geoAitoff=function(){return t.geoProjection(I).scale(152.63)},e.geoAitoffRaw=I,e.geoArmadillo=function(){var e=20*k,r=e>=0?1:-1,i=g(r*e),n=t.geoProjectionMutator(z),s=n(e),l=s.stream;return s.parallel=function(t){return arguments.length?(i=g((r=(e=t*k)>=0?1:-1)*e),n(e)):e*M},s.stream=function(t){var n=s.rotate(),c=l(t),u=(s.rotate([0,0]),l(t)),h=s.precision();return s.rotate(n),c.sphere=function(){u.polygonStart(),u.lineStart();for(var t=-180*r;r*t<180;t+=90*r)u.point(t,90*r);if(e)for(;r*(t-=3*r*h)>=-180;)u.point(t,-(r*a(o(t*k/2),i))*M);u.lineEnd(),u.polygonEnd()},c},s.scale(218.695).center([0,28.0974])},e.geoArmadilloRaw=z,e.geoAugust=function(){return t.geoProjection(D).scale(66.1603)},e.geoAugustRaw=D,e.geoBaker=function(){return t.geoProjection(F).scale(112.314)},e.geoBakerRaw=F,e.geoBerghaus=function(){var e=5,r=t.geoProjectionMutator(j),i=r(e),n=i.stream,s=-o(.01*k),l=m(.01*k);return i.lobes=function(t){return arguments.length?r(e=+t):e},i.stream=function(t){var r=i.rotate(),c=n(t),u=(i.rotate([0,0]),n(t));return i.rotate(r),c.sphere=function(){u.polygonStart(),u.lineStart();for(var t=0,r=360/e,i=2*y/e,n=90-180/e,c=v;t=0;)e.point((t=r[n])[0],t[1]);e.lineEnd(),e.polygonEnd()},e},i.scale(79.4187).parallel(45).clipAngle(179.999)},e.geoHammerRetroazimuthalRaw=ej,e.geoHealpix=function(){var e=4,i=t.geoProjectionMutator(eV),n=i(e),a=n.stream;return n.lobes=function(t){return arguments.length?i(e=+t):e},n.stream=function(i){var o=n.rotate(),s=a(i),l=(n.rotate([0,0]),a(i));return n.rotate(o),s.sphere=function(){var i,n;t.geoStream((i=180/e,n=[].concat(r.range(-180,180+i/2,i).map(eq),r.range(180,-180-i/2,-i).map(eH)),{type:"Polygon",coordinates:[180===i?n.map(eG):n]}),l)},s},n.scale(239.75)},e.geoHealpixRaw=eV,e.geoHill=function(){var e=1,r=t.geoProjectionMutator(eW),i=r(e);return i.ratio=function(t){return arguments.length?r(e=+t):e},i.scale(167.774).center([0,18.67])},e.geoHillRaw=eW,e.geoHomolosine=function(){return t.geoProjection(eZ).scale(152.63)},e.geoHomolosineRaw=eZ,e.geoHufnagel=function(){var e=1,r=0,i=45*k,n=2,a=t.geoProjectionMutator(e$),o=a(e,r,i,n);return o.a=function(t){return arguments.length?a(e=+t,r,i,n):e},o.b=function(t){return arguments.length?a(e,r=+t,i,n):r},o.psiMax=function(t){return arguments.length?a(e,r,i=t*k,n):i*M},o.ratio=function(t){return arguments.length?a(e,r,i,n=+t):n},o.scale(180.739)},e.geoHufnagelRaw=e$,e.geoHyperelliptical=function(){var e=0,r=2.5,i=1.183136,n=t.geoProjectionMutator(eX),a=n(e,r,i);return a.alpha=function(t){return arguments.length?n(e=+t,r,i):e},a.k=function(t){return arguments.length?n(e,r=+t,i):r},a.gamma=function(t){return arguments.length?n(e,r,i=+t):i},a.scale(152.63)},e.geoHyperellipticalRaw=eX,e.geoInterrupt=eJ,e.geoInterruptedBoggs=function(){return eJ(Y,eQ).scale(160.857)},e.geoInterruptedHomolosine=function(){return eJ(eZ,e0).scale(152.63)},e.geoInterruptedMollweide=function(){return eJ(W,e1).scale(169.529)},e.geoInterruptedMollweideHemispheres=function(){return eJ(W,e2).scale(169.529).rotate([20,0])},e.geoInterruptedSinuMollweide=function(){return eJ(eY,e3,V).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},e.geoInterruptedSinusoidal=function(){return eJ($,e5).scale(152.63).rotate([-20,0])},e.geoKavrayskiy7=function(){return t.geoProjection(e4).scale(158.837)},e.geoKavrayskiy7Raw=e4,e.geoLagrange=function(){var e=.5,r=t.geoProjectionMutator(e6),i=r(e);return i.spacing=function(t){return arguments.length?r(e=+t):e},i.scale(124.75)},e.geoLagrangeRaw=e6,e.geoLarrivee=function(){return t.geoProjection(e9).scale(97.2672)},e.geoLarriveeRaw=e9,e.geoLaskowski=function(){return t.geoProjection(e7).scale(139.98)},e.geoLaskowskiRaw=e7,e.geoLittrow=function(){return t.geoProjection(te).scale(144.049).clipAngle(89.999)},e.geoLittrowRaw=te,e.geoLoximuthal=function(){return Z(tt).parallel(40).scale(158.837)},e.geoLoximuthalRaw=tt,e.geoMiller=function(){return t.geoProjection(tr).scale(108.318)},e.geoMillerRaw=tr,e.geoModifiedStereographic=tc,e.geoModifiedStereographicRaw=ti,e.geoModifiedStereographicAlaska=function(){return tc(tn,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},e.geoModifiedStereographicGs48=function(){return tc(ta,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},e.geoModifiedStereographicGs50=function(){return tc(to,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},e.geoModifiedStereographicMiller=function(){return tc(ts,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},e.geoModifiedStereographicLee=function(){return tc(tl,[165,10]).scale(250).clipAngle(130).center([-165,-10])},e.geoMollweide=function(){return t.geoProjection(W).scale(169.529)},e.geoMollweideRaw=W,e.geoMtFlatPolarParabolic=function(){return t.geoProjection(td).scale(164.859)},e.geoMtFlatPolarParabolicRaw=td,e.geoMtFlatPolarQuartic=function(){return t.geoProjection(tf).scale(188.209)},e.geoMtFlatPolarQuarticRaw=tf,e.geoMtFlatPolarSinusoidal=function(){return t.geoProjection(tp).scale(166.518)},e.geoMtFlatPolarSinusoidalRaw=tp,e.geoNaturalEarth2=function(){return t.geoProjection(tm).scale(175.295)},e.geoNaturalEarth2Raw=tm,e.geoNellHammer=function(){return t.geoProjection(tg).scale(152.63)},e.geoNellHammerRaw=tg,e.geoInterruptedQuarticAuthalic=function(){return eJ(B(1/0),ty).rotate([20,0]).scale(152.63)},e.geoNicolosi=function(){return t.geoProjection(tv).scale(127.267)},e.geoNicolosiRaw=tv,e.geoPatterson=function(){return t.geoProjection(tx).scale(139.319)},e.geoPattersonRaw=tx,e.geoPolyconic=function(){return t.geoProjection(tb).scale(103.74)},e.geoPolyconicRaw=tb,e.geoPolyhedral=tM,e.geoPolyhedralButterfly=function(e){e=e||function(e){var r=t.geoCentroid({type:"MultiPoint",coordinates:e});return t.geoGnomonic().scale(1).translate([0,0]).rotate([-r[0],-r[1]])};var r=tS.map(function(t){return{face:t,project:e(t)}});return[-1,0,0,1,0,1,4,5].forEach(function(e,t){var i=r[e];i&&(i.children||(i.children=[])).push(r[t])}),tM(r[0],function(e,t){return r[e<-y/2?t<0?6:4:e<0?2*(t<0):e0?[-r[0],0]:[180-r[0],180])};var r=tS.map(function(t){return{face:t,project:e(t)}});return[-1,0,0,1,0,1,4,5].forEach(function(e,t){var i=r[e];i&&(i.children||(i.children=[])).push(r[t])}),tM(r[0],function(e,t){return r[e<-y/2?t<0?6:4:e<0?2*(t<0):etL(l[0],n)?8+3*s:0>tL(l[1],n)?8+3*s+1:0>tL(l[2],n)?8+3*s+2:s]}).angle(-30).scale(110.625).center([0,45])},e.geoProject=function(e,t){var r,i=t.stream;if(!i)throw Error("invalid projection");switch(e&&e.type){case"Feature":r=tO;break;case"FeatureCollection":r=tD;break;default:r=tR}return r(e,i)},e.geoGringortenQuincuncial=function(){return tV(eD).scale(176.423)},e.geoPeirceQuincuncial=tq,e.geoPierceQuincuncial=tq,e.geoQuantize=function(e,t){if(!(0<=(t*=1)&&t<=20))throw Error("invalid digits");function r(e){var r=e.length,i=2,n=Array(r);for(n[0]=+e[0].toFixed(t),n[1]=+e[1].toFixed(t);i2||a[0]!=t[0]||a[1]!=t[1])&&(i.push(a),t=a)}return 1===i.length&&e.length>1&&i.push(r(e[e.length-1])),i}function n(e){return e.map(i)}function a(e){var t;if(null==e)return e;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(a)};break;case"Point":t={type:"Point",coordinates:r(e.coordinates)};break;case"MultiPoint":t={type:e.type,coordinates:e.coordinates.map(r)};break;case"LineString":t={type:e.type,coordinates:i(e.coordinates)};break;case"MultiLineString":case"Polygon":t={type:e.type,coordinates:n(e.coordinates)};break;case"MultiPolygon":t={type:"MultiPolygon",coordinates:e.coordinates.map(n)};break;default:return e}return null!=e.bbox&&(t.bbox=e.bbox),t}function o(e){var t={type:"Feature",properties:e.properties,geometry:a(e.geometry)};return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),t}if(null!=e)switch(e.type){case"Feature":return o(e);case"FeatureCollection":var s={type:"FeatureCollection",features:e.features.map(o)};return null!=e.bbox&&(s.bbox=e.bbox),s;default:return a(e)}return e},e.geoQuincuncial=tV,e.geoRectangularPolyconic=function(){return Z(tH).scale(131.215)},e.geoRectangularPolyconicRaw=tH,e.geoRobinson=function(){return t.geoProjection(tW).scale(152.63)},e.geoRobinsonRaw=tW,e.geoSatellite=function(){var e=2,r=0,i=t.geoProjectionMutator(tY),n=i(e,r);return n.distance=function(t){return arguments.length?i(e=+t,r):e},n.tilt=function(t){return arguments.length?i(e,r=t*k):r*M},n.scale(432.147).clipAngle(S(1/e)*M-1e-6)},e.geoSatelliteRaw=tY,e.geoSinuMollweide=function(){return t.geoProjection(eY).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},e.geoSinuMollweideRaw=eY,e.geoSinusoidal=function(){return t.geoProjection($).scale(152.63)},e.geoSinusoidalRaw=$,e.geoStitch=function(e){if(null==e)return e;switch(e.type){case"Feature":return t0(e);case"FeatureCollection":var t={type:"FeatureCollection",features:e.features.map(t0)};return null!=e.bbox&&(t.bbox=e.bbox),t;default:return t1(e)}},e.geoTimes=function(){return t.geoProjection(t2).scale(146.153)},e.geoTimesRaw=t2,e.geoTwoPointAzimuthal=t4,e.geoTwoPointAzimuthalRaw=t5,e.geoTwoPointAzimuthalUsa=function(){return t4([-158,21.5],[-77,39]).clipAngle(60).scale(400)},e.geoTwoPointEquidistant=t8,e.geoTwoPointEquidistantRaw=t6,e.geoTwoPointEquidistantUsa=function(){return t8([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},e.geoVanDerGrinten=function(){return t.geoProjection(t9).scale(79.4183)},e.geoVanDerGrintenRaw=t9,e.geoVanDerGrinten2=function(){return t.geoProjection(t7).scale(79.4183)},e.geoVanDerGrinten2Raw=t7,e.geoVanDerGrinten3=function(){return t.geoProjection(re).scale(79.4183)},e.geoVanDerGrinten3Raw=re,e.geoVanDerGrinten4=function(){return t.geoProjection(rt).scale(127.16)},e.geoVanDerGrinten4Raw=rt,e.geoWagner=ri,e.geoWagner7=function(){return ri().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},e.geoWagnerRaw=rr,e.geoWagner4=function(){return t.geoProjection(ro).scale(176.84)},e.geoWagner4Raw=ro,e.geoWagner6=function(){return t.geoProjection(rs).scale(152.63)},e.geoWagner6Raw=rs,e.geoWiechel=function(){return t.geoProjection(rl).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},e.geoWiechelRaw=rl,e.geoWinkel3=function(){return t.geoProjection(rc).scale(158.837)},e.geoWinkel3Raw=rc,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&"u">typeof t?r(e,pw(),pz()):r(e.d3=e.d3||{},e.d3,e.d3)}}),pO=p({"src/plots/geo/zoom.js"(e,t){var r=T(),i=tv(),n=eQ(),a=Math.PI/180,o=180/Math.PI,s={cursor:"pointer"},l={cursor:"auto"};function c(e,t){return r.behavior.zoom().translate(t.translate()).scaleExtent(t.scaleExtent()).scale(t.scale())}function u(e,t,r){var a=e.id,o=e.graphDiv,s=o.layout,l=s[a],c=o._fullLayout,u=c[a],h={},d={};function f(e,t){h[a+"."+e]=i.nestedProperty(l,e).get(),n.call("_storeDirectGUIEdit",s,c._preGUI,h);var r=i.nestedProperty(u,e);r.get()!==t&&(r.set(t),i.nestedProperty(l,e).set(t),d[a+"."+e]=t)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),o.emit("plotly_relayout",d)}function h(e,t){var i=c(e,t);function n(r){var i=t.invert(e.midPt);r("center.lon",i[0]),r("center.lat",i[1])}return i.on("zoomstart",function(){r.select(this).style(s)}).on("zoom",function(){t.scale(r.event.scale).translate(r.event.translate),e.render(!0);var i=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":i[0],"geo.center.lat":i[1]})}).on("zoomend",function(){r.select(this).style(l),u(e,t,n)}),i}function d(e,t){var i,n,a,o,h,d,f,p,m,g=c(e,t);function y(e){return t.invert(e)}function v(r){var i=t.rotate(),n=t.invert(e.midPt);r("projection.rotation.lon",-i[0]),r("center.lon",n[0]),r("center.lat",n[1])}return g.on("zoomstart",function(){r.select(this).style(s);let{x:e,y:l,width:c,height:u}=this.getBBox();i=r.event.sourceEvent?r.mouse(this):[e+c/2,l+u/2],n=t.rotate(),a=t.translate(),o=n,h=y(i)}).on("zoom",function(){let{x:s,y:l,width:c,height:u}=this.getBBox();if(d=r.event.sourceEvent?r.mouse(this):[s+c/2,l+u/2],function(e){var r=y(e);if(!r)return!0;var i=t(r);return Math.abs(i[0]-e[0])>2||Math.abs(i[1]-e[1])>2}(i)){g.scale(t.scale()),g.translate(t.translate());return}t.scale(r.event.scale),t.translate([a[0],r.event.translate[1]]),h?y(d)&&(p=y(d),f=[o[0]+(p[0]-h[0]),n[1],n[2]],t.rotate(f),o=f):h=y(i=d),m=!0,e.render(!0);var v=t.rotate(),x=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":x[0],"geo.center.lat":x[1],"geo.projection.rotation.lon":-v[0]})}).on("zoomend",function(){r.select(this).style(l),m&&u(e,t,v)}),g}function f(e,t){var i,n={r:t.rotate(),k:t.scale()},h=c(e,t),d=function(e){for(var t=0,i=arguments.length,n=[];++t(G=Math.sqrt(j*j+B*B))?(F=(V>0?90:-90)-H,R=0):(F=Math.asin(V/G)*o-H,R=Math.sqrt(G*G-V*V)),W=180-F-2*H,Y=(Math.atan2(q,U)-Math.atan2(N,R))*o,Z=(Math.atan2(q,U)-Math.atan2(N,-R))*o,n.r=m(C[0],C[1],F,Y)<=m(C[0],C[1],W,Z)?[F,Y,C[2]]:[W,Z,C[2]]);isFinite(X[0])&&isFinite(X[1])&&isFinite(X[2])||(X=I),t.rotate(X),I=X}}else i=p(t,L=c);u=d.of(this,arguments),u({type:"zoom"})}),k=d.of(this,arguments),f++||k({type:"zoomstart"})}).on("zoomend",function(){var i;r.select(this).style(l),g.call(h,"zoom",null),i=d.of(this,arguments),--f||i({type:"zoomend"}),u(e,t,x)}).on("zoom.redraw",function(){e.render(!0);var r=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})}),r.rebind(h,d,"on")}function p(e,t){var r,i,n,o,s=e.invert(t);return s&&isFinite(s[0])&&isFinite(s[1])&&(i=(r=s)[0]*a,[(o=Math.cos(n=r[1]*a))*Math.cos(i),o*Math.sin(i),Math.sin(n)])}function m(e,t,r,i){var n=g(r-e),a=g(i-t);return Math.sqrt(n*n+a*a)}function g(e){return(e%360+540)%360-180}function y(e,t,r){var i=r*a,n=e.slice(),o=+(0===t),s=2===t?1:2,l=Math.cos(i),c=Math.sin(i);return n[o]=e[o]*l-e[s]*c,n[s]=e[s]*l+e[o]*c,n}function v(e,t){for(var r=0,i=0,n=e.length;i0&&o._module.calcGeoJSON(a,t)}if(!r){if(this.updateProjection(e,t))return;this.viewInitial&&this.scope===i.scope||this.saveViewInitial(i)}this.scope=i.scope,this.updateBaseLayers(t,i),this.updateDims(t,i),this.updateFx(t,i),f.generalUpdatePerTraceModule(this.graphDiv,this,e,i);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()},L.updateProjection=function(e,t){var r=this.graphDiv,s=t[this.id],c=t._size,u=s.domain,h=s.projection,d=s.lonaxis,f=s.lataxis,p=d._ax,v=f._ax,x=this.projection=function(e){var t=e.projection,r=t.type,s=M.projNames[r];s="geo"+l.titleCase(s);for(var c=i[s]||o[s],u=c(),h=e._isSatellite?180*Math.acos(1/t.distance)/Math.PI:e._isClipped?M.lonaxisSpan[r]/2:null,d=["center","rotate","parallels","clipExtent"],f=function(e){return e?u:[]},p=0;ph*Math.PI/180},u.getPath=function(){return n().projection(u)},u.getBounds=function(e){return u.getPath().bounds(e)},u.precision(M.precision),e._isSatellite&&u.tilt(t.tilt).distance(t.distance),h&&u.clipAngle(h-M.clipPad),u}(s),b=[[c.l+c.w*u.x[0],c.t+c.h*(1-u.y[1])],[c.l+c.w*u.x[1],c.t+c.h*(1-u.y[0])]],_=s.center||{},w=h.rotation||{},T=d.range||[],A=f.range||[];if(s.fitbounds){p._length=b[1][0]-b[0][0],v._length=b[1][1]-b[0][1],p.range=g(r,p),v.range=g(r,v);let i=[];for(let t of e){let e=t[0].trace;!0===e.visible&&e._module.fitCoords&&i.push(e._module.fitCoords(t,s))}let n=m(r,p),a=n.min.reduce((e,{val:t})=>Math.min(e,t),1/0),o=n.max.reduce((e,{val:t})=>Math.max(e,t),-1/0)-a,l=k.boundsOfCoords(i.flat()),[c,,u]=l||[],d=u-c;if(l&&(o>360||o<360&&dMath.max(t,e(r)),0),a=n.max.reduce((e,t)=>Math.max(e,r(t)),0),o=p._length-i-a,s=o>p._length/10?d*p._length/o:d,l=(c+u)/2;p.range=[l-s/2,l+s/2]}var S=(p.range[0]+p.range[1])/2,E=(v.range[0]+v.range[1])/2;if(s._isScoped)_={lon:S,lat:E};else if(s._isClipped){_={lon:S,lat:E},w={lon:S,lat:E,roll:w.roll};var C=h.type,L=M.lonaxisSpan[C]/2||180,I=M.lataxisSpan[C]/2||90;T=[S-L,S+L],A=[E-I,E+I]}else _={lon:S,lat:E},w={lon:S,lat:w.lat,roll:w.roll}}x.center([_.lon-w.lon,_.lat-w.lat]).rotate([-w.lon,-w.lat,w.roll]).parallels(h.parallels);var z=P(T,A);x.fitExtent(b,z);var D=this.bounds=x.getBounds(z),O=this.fitScale=x.scale(),R=x.translate();if(x.scaleExtent=()=>{var e;let{minscale:t}=h,r=null!=(e=h.maxscale)?e:1/0;return[O*Math.min(t,r),O*Math.max(t,r)]},s.fitbounds){var F=x.getBounds(P(p.range,v.range)),j=Math.min((D[1][0]-D[0][0])/(F[1][0]-F[0][0]),(D[1][1]-D[0][1])/(F[1][1]-F[0][1]));isFinite(j)?x.scale(j*O):l.warn("Something went wrong during"+this.id+"fitbounds computations.")}else x.scale(h.scale*O);var B=this.midPt=[(D[0][0]+D[1][0])/2,(D[0][1]+D[1][1])/2];if(x.translate([R[0]+(B[0]-R[0]),R[1]+(B[1]-R[1])]).clipExtent(D),s._isAlbersUsa){var N=x([_.lon,_.lat]);if(N){var U=x.translate();x.translate([U[0]-(N[0]-U[0]),U[1]-(N[1]-U[1])])}}},L.updateBaseLayers=function(e,t){var i=this,n=i.topojson,a=i.layers,o=i.basePaths;function s(e){return"lonaxis"===e||"lataxis"===e}function l(e){return!!M.lineLayers[e]}function c(e){return!!M.fillLayers[e]}var d=(this.hasChoropleth?M.layersForChoropleth:M.layers).filter(function(e){return l(e)||c(e)?t["show"+e]:!s(e)||t[e].showgrid}),f=i.framework.selectAll(".layer").data(d,String);f.exit().each(function(e){delete a[e],delete o[e],r.select(this).remove()}),f.enter().append("g").attr("class",function(e){return"layer "+e}).each(function(e){var t=a[e]=r.select(this);"bg"===e?i.bgRect=t.append("rect").style("pointer-events","all"):s(e)?o[e]=t.append("path").style("fill","none"):"backplot"===e?t.append("g").classed("choroplethlayer",!0):"frontplot"===e?t.append("g").classed("scatterlayer",!0):l(e)?o[e]=t.append("path").style("fill","none").style("stroke-miterlimit",2):c(e)&&(o[e]=t.append("path").style("stroke","none"))}),f.order(),f.each(function(r){var i=o[r],a=M.layerNameToAdjective[r];"frame"===r?i.datum(M.sphereSVG):l(r)||c(r)?i.datum(E(n,n.objects[r])):s(r)&&i.datum(function(e,t,r){var i,n,a,o=t[e],s=M.scopeDefaults[t.scope];"lonaxis"===e?(i=s.lonaxisRange,n=s.lataxisRange,a=function(e,t){return[e,t]}):"lataxis"===e&&(i=s.lataxisRange,n=s.lonaxisRange,a=function(e,t){return[t,e]});var l={type:"linear",range:[i[0],i[1]-1e-6],tick0:o.tick0,dtick:o.dtick};p.setConvert(l,r);var c=p.calcTicks(l);t.isScoped||"lonaxis"!==e||c.pop();for(var u=c.length,h=Array(u),d=0;dn)&&e.event(a)}a.on("dblclick.zoom",function(){var e=i.viewInitial,t={};for(var r in e)t[i.id+"."+r]=e[r];s.call("_guiRelayout",n,t),n.emit("plotly_doubleclick",null)}),n._context._scrollZoom.geo||a.on("wheel.zoom",null)}else("select"===o||"lasso"===o)&&(a.on(".zoom",null),u.prepFn=function(e,t,r){x(e,t,r,u,o)},v.init(u));a.on("mousemove",function(){var e=i.projection.invert(l.getPositionFromD3Event());if(!e)return v.unhover(n,r.event);i.xaxis.p2c=function(){return e[0]},i.yaxis.p2c=function(){return e[1]},d.hover(n,r.event,i.id)}),a.on("mouseout",function(){n._dragging||v.unhover(n,r.event)}),a.on("click",function(){"select"!==o&&"lasso"!==o&&(c.indexOf("select")>-1&&_(r.event,n,[i.xaxis],[i.yaxis],i.id,u),c.indexOf("event")>-1&&d.click(n,r.event))})}function h(e){return i.projection.invert([e[0]+i.xaxis._offset,e[1]+i.yaxis._offset])}},L.makeFramework=function(){var e=this,t=e.graphDiv,i=t._fullLayout,n="clip"+i._uid+e.id;e.clipDef=i._clips.append("clipPath").attr("id",n),e.clipRect=e.clipDef.append("rect"),e.framework=r.select(e.container).append("g").attr("class","geo "+e.id).call(h.setClipUrl,n,t),e.project=function(t){var r=e.projection(t);return r?[r[0]-e.xaxis._offset,r[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(t){return e.project(t)[0]}},e.yaxis={_id:"y",c2p:function(t){return e.project(t)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(e.mockAxis,i)},L.saveViewInitial=function(e){var t,r=e.center||{},i=e.projection,n=i.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":i.scale},t=e._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:e._isClipped?{"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat,"center.lon":r.lon,"center.lat":r.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":n.lon},l.extendFlat(this.viewInitial,t)},L.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},L._render=function(){var e,t=this.projection,r=t.getPath();function i(e){var r=t(e.lonlat);return r?c(r[0],r[1]):null}function n(e){return t.isLonLatOverEdges(e.lonlat)?"none":null}for(e in this.basePaths)this.basePaths[e].attr("d",r);for(e in this.dataPaths)this.dataPaths[e].attr("d",function(e){return r(e.geojson)});for(e in this.dataPoints)this.dataPoints[e].attr("display",n).attr("transform",i)}}}),pF=p({"src/plots/geo/layout_attributes.js"(e,t){var r=Q(),i=at().attributes,n=eH().dash,a=pd(),o=eq().overrideAll,s=(e6(),v(e3)).default,l={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:r.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:n};(t.exports=o({domain:i({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:"locations",editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:s(a.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:s(a.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1},minscale:{valType:"number",min:0,dflt:0},maxscale:{valType:"number",min:0,dflt:null}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:r.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:a.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:a.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:a.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:a.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:r.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:r.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:r.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:r.background},lonaxis:l,lataxis:l},"plot","from-root")).uirevision={valType:"any",editType:"none"}}}),pj=p({"src/plots/geo/layout_defaults.js"(e,t){var r=tv(),i=o7(),n=tI().getSubplotData,{unwrapLonRange:a}=pS(),o=pd(),s=pF(),l=o.axesNames;function c(e,t,i,s){var c,u,h=n(s.fullData,"geo",s.id).map(function(e){return e.index}),d=i("resolution"),f=i("scope"),p=o.scopeDefaults[f],m=i("projection.type",p.projType),g=t._isAlbersUsa="albers usa"===m;g&&(f=t.scope="usa");var y=t._isScoped="world"!==f,v=t._isSatellite="satellite"===m,x=t._isConic=-1!==m.indexOf("conic")||"albers"===m,b=t._isClipped=!!o.lonaxisSpan[m];if(!1===e.visible){var _=r.extendDeep({},t._template);_.showcoastlines=!1,_.showcountries=!1,_.showframe=!1,_.showlakes=!1,_.showland=!1,_.showocean=!1,_.showrivers=!1,_.showsubunits=!1,_.lonaxis&&(_.lonaxis.showgrid=!1),_.lataxis&&(_.lataxis.showgrid=!1),t._template=_}for(var w,T=i("visible"),M=0;Mnull!=e[t])||o.fitboundsIncompatible.has(m)?t.fitbounds=!1:l.forEach(({dst:e,key:t})=>e&&(e[t]=null))}}t.exports=function(e,t,r){i(e,t,r,{type:"geo",attributes:s,handleDefaults:c,fullData:r,partition:"y"})}}}),pB=p({"src/plots/geo/index.js"(e,t){var r=tI().getSubplotCalcData,i=tv().counterRegex,n=pR(),a=i("geo"),o={};o.geo={valType:"subplotid",dflt:"geo",editType:"calc"},t.exports={attr:"geo",name:"geo",idRoot:"geo",idRegex:a,attrRegex:a,attributes:o,layoutAttributes:pF(),supplyLayoutDefaults:pj(),plot:function(e){for(var t=e._fullLayout,i=e.calcdata,a=t._subplots.geo,o=0;o")}}(e,d,s),[e]}}}),pZ=p({"src/traces/choropleth/event_data.js"(e,t){t.exports=function(e,t,r,i,n){e.location=t.location,e.z=t.z;var a=i[n];return a.fIn&&a.fIn.properties&&(e.properties=a.fIn.properties),e.ct=a.ct,e}}}),p$=p({"src/traces/choropleth/select.js"(e,t){t.exports=function(e,t){var r,i,n,a,o,s=e.cd,l=e.xaxis,c=e.yaxis,u=[];if(!1===t)for(r=0;r=Math.min(I,z)&&f<=Math.max(I,z)?0:1/0}if(k=Math.min(D,O)&&p<=Math.max(D,O)?0:1/0}E=Math.sqrt(k*k+A*A),_=n[M]}}}else for(M=n.length-1;M>-1;M--)w=h[b=n[M]],T=d[b],(S=Math.sqrt((k=c.c2p(w)-f)*k+(A=u.c2p(T)-p)*A))100},e.isDotSymbol=function(e){return"string"==typeof e?t.DOT_RE.test(e):e>200}}}),p2=p({"src/traces/scattergl/defaults.js"(e,t){var r=tv(),i=eQ(),n=p1(),a=p0(),o=iy(),s=t5(),l=iN(),c=iU(),u=iq(),h=iH(),d=iY(),f=iW();t.exports=function(e,t,p,m){function g(i,n){return r.coerce(e,t,a,i,n)}var y=!!e.marker&&n.isOpenSymbol(e.marker.symbol),v=s.isBubble(e),x=l(e,t,m,g);if(!x){t.visible=!1;return}c(e,t,m,g),g("xhoverformat"),g("yhoverformat");var b=x>>1,s=e[o];(void 0!==r?r(s,t):s-t)>=0?(a=o,n=o-1):i=o+1}return a}function i(e,t,r,i,n){for(var a=n+1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>0?(a=o,n=o-1):i=o+1}return a}function n(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<0?(a=o,i=o+1):n=o-1}return a}function a(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<=0?(a=o,i=o+1):n=o-1}return a}function o(e,t,r,i,n){for(;i<=n;){var a=i+n>>>1,o=e[a],s=void 0!==r?r(o,t):o-t;if(0===s)return a;s<=0?i=a+1:n=a-1}return -1}function s(e,t,r,i,n,a){return"function"==typeof r?a(e,t,r,void 0===i?0:0|i,void 0===n?e.length-1:0|n):a(e,t,void 0,void 0===r?0:0|r,void 0===i?e.length-1:0|i)}t.exports={ge:function(e,t,i,n,a){return s(e,t,i,n,a,r)},gt:function(e,t,r,n,a){return s(e,t,r,n,a,i)},lt:function(e,t,r,i,a){return s(e,t,r,i,a,n)},le:function(e,t,r,i,n){return s(e,t,r,i,n,a)},eq:function(e,t,r,i,n){return s(e,t,r,i,n,o)}}}}),p4=p({"node_modules/clamp/index.js"(e,t){t.exports=function(e,t,r){return tr?r:e:et?t:e}}}),p6=p({"node_modules/pick-by-alias/index.js"(e,t){t.exports=function(e,t,r){var n,a,o={};if("string"==typeof t&&(t=i(t)),Array.isArray(t)){var s={};for(a=0;a1&&(e=arguments),"string"==typeof e?e=e.split(/\s/).map(parseFloat):"number"==typeof e&&(e=[e]),e.length&&"number"==typeof e[0]?t=1===e.length?{width:e[0],height:e[0],x:0,y:0}:2===e.length?{width:e[0],height:e[1],x:0,y:0}:{x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(t={x:(e=r(e,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"})).left||0,y:e.top||0},null==e.width?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,null==e.height?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}}}),p9=p({"node_modules/array-bounds/index.js"(e,t){t.exports=function(e,t){if(!e||null==e.length)throw Error("Argument should be an array");t=null==t?1:Math.floor(t);for(var r=Array(2*t),i=0;in&&(n=e[o]),e[o]typeof arguments[e])return arguments[e]}}}),me=p({"node_modules/dtype/index.js"(e,t){t.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}}}),mt=p({"node_modules/flatten-vertex-data/index.js"(e,t){var r=me();t.exports=function(e,t,i){if(!e)throw TypeError("must specify data as first parameter");if(i=0|(i||0),Array.isArray(e)&&e[0]&&"number"==typeof e[0][0]){var n,a,o,s,l=e[0].length,c=e.length*l;t&&"string"!=typeof t||(t=new(r(t||"float32"))(c+i));var u=t.length-i;if(c!==u)throw Error("source length "+c+" ("+l+"x"+e.length+") does not match destination length "+u);for(n=0,o=i;n>>1,g;t.dtype||(t.dtype="array"),"string"==typeof t.dtype?g=new(u(t.dtype))(m):t.dtype&&Array.isArray(g=t.dtype)&&(g.length=m);for(let e=0;ei||s>0x40000000){for(let e=0;ec||_>h||T=k||o===s)return;let d=y[a];void 0===s&&(s=d.length);for(let t=o;t=l&&i<=p&&n>=u&&n<=m&&A.push(r)}let f=v[a],x=f[4*o+0],b=f[4*o+1],w=f[4*o+2],S=f[4*o+3],E=function(e,t){let r=null,i=0;for(;null===r;)if(r=e[4*t+i],++i>e.length)return null;return r}(f,o+1),C=.5*n,L=a+1;t(r,i,C,L,x,b||w||S||E),t(r,i+C,C,L,b,w||S||E),t(r+C,i,C,L,w,S||E),t(r+C,i+C,C,L,S,E)}(0,0,1,0,0,1),A},g;function w(e,t,r){let i=1,n=.5,a=.5,o=.5;for(let s=0;s2&&(t.push([i].concat(a.splice(0,2))),s="l",i="m"==i?"l":"L");;){if(a.length==r[s])return a.unshift(i),t.push(a);if(a.length1&&(n=1),n<-1&&(n=-1),(e*i-t*r<0?-1:1)*Math.acos(n)},s=function(e,t,r,n,a,s,l,c,u,h,d,f){var p=Math.pow(a,2),m=Math.pow(s,2),g=Math.pow(d,2),y=Math.pow(f,2),v=p*m-p*y-m*g;v<0&&(v=0),v/=p*y+m*g;var x=(v=Math.sqrt(v)*(l===c?-1:1))*a/s*f,b=-(v*s)/a*d,_=(d-x)/a,w=(f-b)/s,T=o(1,0,_,w),M=o(_,w,(-d-x)/a,(-f-b)/s);return 0===c&&M>0&&(M-=i),1===c&&M<0&&(M+=i),[h*x-u*b+(e+r)/2,u*x+h*b+(t+n)/2,T,M]};e.default=function(e){var t=e.px,o=e.py,l=e.cx,c=e.cy,u=e.rx,h=e.ry,d=e.xAxisRotation,f=void 0===d?0:d,p=e.largeArcFlag,m=e.sweepFlag,g=[];if(0===u||0===h)return[];var y=Math.sin(f*i/360),v=Math.cos(f*i/360),x=v*(t-l)/2+y*(o-c)/2,b=-y*(t-l)/2+v*(o-c)/2;if(0===x&&0===b)return[];var _=Math.pow(x,2)/Math.pow(u=Math.abs(u),2)+Math.pow(b,2)/Math.pow(h=Math.abs(h),2);_>1&&(u*=Math.sqrt(_),h*=Math.sqrt(_));var w=r(s(t,o,l,c,u,h,void 0===p?0:p,void 0===m?0:m,y,v,x,b),4),T=w[0],M=w[1],k=w[2],A=w[3],S=Math.abs(A)/(i/4);1e-7>Math.abs(1-S)&&(S=1);var E=Math.max(Math.ceil(S),1);A/=E;for(var C=0;C4?(o=g[g.length-4],s=g[g.length-3]):(o=d,s=f),a.push(g)}return a};var r=ml();function i(e,t,r,i){return["C",e,t,r,i,r,i]}function n(e,t,r,i,n,a){return["C",e/3+2/3*r,t/3+2/3*i,n/3+2/3*r,a/3+2/3*i,n,a]}}}),mu=p({"node_modules/is-svg-path/index.js"(e,t){t.exports=function(e){return"string"==typeof e&&(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}}}),mh=p({"node_modules/svg-path-bounds/index.js"(e,t){var r=mo(),i=ms(),n=mc(),a=mu();t.exports=function(e){if(Array.isArray(e)&&1===e.length&&"string"==typeof e[0]&&(e=e[0]),"string"==typeof e){if(!a(e))throw Error("String is not an SVG path.");e=r(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(!(e=n(e=i(e))).length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],o=0,s=e.length;ot[2]&&(t[2]=l[c+0]),l[c+1]>t[3]&&(t[3]=l[c+1]);return t}}}),md=p({"node_modules/bitmap-sdf/index.js"(e,t){function r(e,t,r,n,a,o,s){for(var l=0;l0?"white":"black",mx.lineWidth=Math.abs(a)),mx.translate(.5*r,.5*i),mx.scale(l,l);let c=new Path2D(e);return mx.fill(c),a&&mx.stroke(c),mx.setTransform(1,0,0,1,0,0),(0,my.default)(mx,{cutoff:null!=t.cutoff?t.cutoff:.5,radius:null!=t.radius?t.radius:.5*n})}m(mf,{default:()=>mp});var mm,mg,my,mv,mx,mb=f({"node_modules/svg-path-sdf/svg-path-sdf.js"(){mm=y(mh()),mg=y(mu()),my=y(md()),mx=(mv=document.createElement("canvas")).getContext("2d",{willReadFrequently:!0})}}),m_=p({"src/traces/scattergl/convert.js"(e,t){var r=C(),i=(mb(),v(mf)).default,{normalize:n}=ee(),a=eQ(),o=tv(),s=o.isArrayOrTypedArray,l=t7(),c=tC(),u=ff().formatColor,h=t5(),d=t4(),f=p1(),p=pQ(),m=er().DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},y=t6().appendArrayPointValue;function x(e,t){var i,n=e._fullLayout,a=t._length,l=t.textfont,c=t.textposition,u=s(c)?c:[c],h=l.color,d=l.size,f=l.family,p=l.weight,m=l.style,g=l.variant,v={},x=e._context.plotGlPixelRatio,_=t.texttemplate;if(_){v.text=[];var w=n._d3locale,T=Array.isArray(_),M=T?Math.min(_.length,a):a,k=T?function(e){return _[e]}:function(){return _};for(i=0;i500?"bold":"normal":e}function _(e,t){var r,i,a=t._length,o=t.marker,l={},c=s(o.symbol),h=s(o.angle),p=s(o.color),m=s(o.line.color),g=s(o.opacity),y=s(o.size),v=s(o.line.width);if(c||(i=f.isOpenSymbol(o.symbol)),c||p||m||g||h){l.symbols=Array(a),l.angles=Array(a),l.colors=Array(a),l.borderColors=Array(a);var x=o.symbol,b=o.angle,_=u(o,o.opacity,a),w=u(o.line,o.opacity,a);if(!s(w[0])){var T=w;for(w=Array(a),r=0;rp.TOO_MANY_POINTS||h.hasMarkers(t)?"rect":"round";if(c&&t.connectgaps){var d=i[0],f=i[1];for(n=0;n1?c[n]:c[0]:c,m=s(u)?u.length>1?u[n]:u[0]:u,y=g[p],v=g[m],x=d?d/.8+1:0,b=-v*x-.5*v;o.offset[n]=[y*x/f,b/f]}}return o}}}}),mw=p({"src/traces/scattergl/scene_update.js"(e,t){var r=tv();t.exports=function(e,t){var i=t._scene,n={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return t._scene||((i=t._scene={}).init=function(){r.extendFlat(i,a,n)},i.init(),i.update=function(e){var t=r.repeat(e,i.count);if(i.fill2d&&i.fill2d.update(t),i.scatter2d&&i.scatter2d.update(t),i.line2d&&i.line2d.update(t),i.error2d&&i.error2d.update(t.concat(t)),i.select2d&&i.select2d.update(t),i.glText)for(var n=0;n=m,T=2*_,M={},k=v.makeCalcdata(t,"x"),A=x.makeCalcdata(t,"y"),S=o(t,v,"x",k),E=o(t,x,"y",A),C=S.vals,L=E.vals;t._x=C,t._y=L,t.xperiodalignment&&(t._origX=k,t._xStarts=S.starts,t._xEnds=S.ends),t.yperiodalignment&&(t._origY=A,t._yStarts=E.starts,t._yEnds=E.ends);var P=Array(T),I=Array(_);for(s=0;s<_;s++)P[2*s]=C[s]===p?NaN:C[s],P[2*s+1]=L[s]===p?NaN:L[s],I[s]=s;if("log"===v.type)for(s=0;s1&&i.extendFlat(o.line,d.linePositions(e,t,r)),o.errorX||o.errorY){var s=d.errorBarPositions(e,t,r,n,a);o.errorX&&i.extendFlat(o.errorX,s.x),o.errorY&&i.extendFlat(o.errorY,s.y)}return o.text&&(i.extendFlat(o.text,{positions:r},d.textPosition(e,t,o.text,o.marker)),i.extendFlat(o.textSel,{positions:r},d.textPosition(e,t,o.text,o.markerSel)),i.extendFlat(o.textUnsel,{positions:r},d.textPosition(e,t,o.text,o.markerUnsel))),o}(e,t,P,C,L),D=f(e,b);return u(y,t),w?z.marker&&(a=z.marker.sizeAvg||Math.max(z.marker.size,3)):a=l(t,_),c(e,t,v,x,C,L,a),z.errorX&&g(t,v,z.errorX),z.errorY&&g(t,x,z.errorY),z.fill&&!D.fill2d&&(D.fill2d=!0),z.marker&&!D.scatter2d&&(D.scatter2d=!0),z.line&&!D.line2d&&(D.line2d=!0),(z.errorX||z.errorY)&&!D.error2d&&(D.error2d=!0),z.text&&!D.glText&&(D.glText=!0),z.marker&&(z.marker.snap=_),D.lineOptions.push(z.line),D.errorXOptions.push(z.errorX),D.errorYOptions.push(z.errorY),D.fillOptions.push(z.fill),D.markerOptions.push(z.marker),D.markerSelectedOptions.push(z.markerSel),D.markerUnselectedOptions.push(z.markerUnsel),D.textOptions.push(z.text),D.textSelectedOptions.push(z.textSel),D.textUnselectedOptions.push(z.textUnsel),D.selectBatch.push([]),D.unselectBatch.push([]),M._scene=D,M.index=D.count,M.x=C,M.y=L,M.positions=P,D.count++,[{x:!1,y:!1,t:M,trace:t}]}}}),mM=p({"src/traces/scattergl/edit_style.js"(e,t){var r=tv(),i=ee(),n=er().DESELECTDIM;t.exports={styleTextSelection:function(e){var t,a,o=e[0],s=o.trace,l=o.t,c=l._scene,u=l.index,h=c.selectBatch[u],d=c.unselectBatch[u],f=c.textOptions[u],p=c.textSelectedOptions[u]||{},m=c.textUnselectedOptions[u]||{},g=r.extendFlat({},f);if(h.length||d.length){var y=p.color,v=m.color,x=f.color,b=r.isArrayOrTypedArray(x);for(g.color=Array(s._length),t=0;t10&&/[0-9](?:\s|\/)/.test(e)&&(a=e.match(/([0-9]+)/g).map(function(e){return parseFloat(e)}),n=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(a=[e[0],e[1],e[2]],n="rgb",o=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(n="rgb",a=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(n="hsl",a=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),o=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(o/=100)):(n="rgb",a=[e>>>16,(65280&e)>>>8,255&e]);return{space:n,values:a,alpha:o}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),mC=p({"node_modules/color-rgba/index.js"(e,t){var r=mE();t.exports=function(e){Array.isArray(e)&&e.raw&&(e=String.raw.apply(null,arguments));var t,i=r(e);if(!i.space)return[];var n="h"===i.space[0]?[360,100,100]:[255,255,255];return(t=[,,,])[0]=Math.min(Math.max(i.values[0],0),n[0]),t[1]=Math.min(Math.max(i.values[1],0),n[1]),t[2]=Math.min(Math.max(i.values[2],0),n[2]),"h"===i.space[0]&&(t=function(e){var t,r,i,n,a,o=e[0]/360,s=e[1]/100,l=e[2]/100,c=0;if(0===s)return[a=255*l,a,a];for(r=l<.5?l*(1+s):l+s-l*s,t=2*l-r,n=[0,0,0];c<3;)(i=o+-(1/3*(c-1)))<0?i++:i>1&&i--,a=6*i<1?t+(r-t)*6*i:2*i<1?r:3*i<2?t+(r-t)*(2/3-i)*6:t,n[c++]=255*a;return n}(t)),t.push(Math.min(Math.max(i.alpha,0),1)),t}}}),mL=p({"node_modules/color-normalize/index.js"(e,t){var r=mC(),i=me();t.exports=function(e,t){"float"!==t&&t||(t="array"),"uint"===t&&(t="uint8"),"uint_clamped"===t&&(t="uint8_clamped");var n,a=new(i(t))(4),o="uint8"!==t&&"uint8_clamped"!==t;return e.length&&"string"!=typeof e||(e=r(e),e[0]/=255,e[1]/=255,e[2]/=255),(n=e)instanceof Uint8Array||n instanceof Uint8ClampedArray||Array.isArray(n)&&(n[0]>1||0===n[0])&&(n[1]>1||0===n[1])&&(n[2]>1||0===n[2])&&(!n[3]||n[3]>1)?(a[0]=e[0],a[1]=e[1],a[2]=e[2],a[3]=null!=e[3]?e[3]:255,o&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255)):o?(a[0]=e[0],a[1]=e[1],a[2]=e[2],a[3]=null!=e[3]?e[3]:1):(a[0]=Math.min(Math.max(Math.floor(255*e[0]),0),255),a[1]=Math.min(Math.max(Math.floor(255*e[1]),0),255),a[2]=Math.min(Math.max(Math.floor(255*e[2]),0),255),a[3]=null==e[3]?255:Math.min(Math.max(Math.floor(255*e[3]),0),255)),a}}}),mP=p({"node_modules/color-id/index.js"(e,t){var r=p4();function i(e,t){null==t&&(t=!0);var i=e[0],n=e[1],a=e[2],o=e[3];return null==o&&(o=t?1:255),t&&(i*=255,n*=255,a*=255,o*=255),i=255&r(i,0,255),n=255&r(n,0,255),0x1000000*i+(n<<16)+((a=255&r(a,0,255))<<8)+(o=255&r(o,0,255))}t.exports=i,t.exports.to=i,t.exports.from=function(e,t){var r=(e*=1)>>>24,i=(0xff0000&e)>>>16,n=(65280&e)>>>8,a=255&e;return!1===t?[r,i,n,a]:[r/255,i/255,n/255,a/255]}}}),mI=p({"node_modules/glslify/browser.js"(e,t){t.exports=function(e){"string"==typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],i=0;i[255*!this.tooManyColors,i.height],pixelRatio:e.context("pixelRatio"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translate:e.prop("translate"),translateFract:e.prop("translateFract"),markerTexture:e.prop("markerTexture"),paletteTexture:i},attributes:{x:(e,t)=>t.xAttr||{buffer:t.positionBuffer,stride:8,offset:0},y:(e,t)=>t.yAttr||{buffer:t.positionBuffer,stride:8,offset:4},xFract:(e,t)=>t.xAttr?{constant:[0,0]}:{buffer:t.positionFractBuffer,stride:8,offset:0},yFract:(e,t)=>t.yAttr?{constant:[0,0]}:{buffer:t.positionFractBuffer,stride:8,offset:4},size:(e,t)=>t.size.length?{buffer:t.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(255*t.size/this.maxSize)]},borderSize:(e,t)=>t.borderSize.length?{buffer:t.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(255*t.borderSize/this.maxSize)]},colorId:(e,t)=>t.color.length?{buffer:t.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?n.slice(4*t.color,4*t.color+4):[t.color]},borderColorId:(e,t)=>t.borderColor.length?{buffer:t.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?n.slice(4*t.borderColor,4*t.borderColor+4):[t.borderColor]},isActive:(e,t)=>!0===t.activation?{constant:[1]}:t.activation?t.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:e.prop("viewport")},viewport:e.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:e.prop("elements"),count:e.prop("count"),offset:e.prop("offset"),primitive:"points"},s=Object.assign({},a);s.frag=o([`precision highp float; #define GLSLIFY 1 uniform float opacity; @@ -2194,8 +2194,8 @@ void main() { fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; fragWidth = 1. / gl_PointSize; } -`]),this.drawCircle=e(l)}d.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},d.prototype.render=function(){return arguments.length&&this.update(...arguments),this.draw(),this},d.prototype.draw=function(){for(var e=arguments.length,t=Array(e),r=0;r{this.drawItem(t)});return this},d.prototype.drawItem=function(e,t){let{groups:r}=this,i=r[e];if("number"==typeof t&&(e=t,i=r[t],t=null),!(i&&i.count&&i.opacity))return;i.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,i,t));let n=[];for(let e=1;e{let r=n[t];if(void 0===e)return r;null===e?e={positions:null}:"function"==typeof e?e={ondraw:e}:"number"==typeof e[0]&&(e={positions:e}),null===(e=s(e,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"})).positions&&(e.positions=[]),null!=e.tooManyColors&&(this.tooManyColors=e.tooManyColors),r||(n[t]=r={id:t,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:f.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:f.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:f.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:f.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:f.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},e=Object.assign({},d.defaults,e)),!e.positions||"marker"in e||(e.marker=r.marker,delete r.marker),!e.marker||"positions"in e||(e.positions=r.positions,delete r.positions);let y=0,v=0;if(l(r,e,[{snap:!0,size:(e,t)=>(null==e&&(e=d.defaults.size),y+=e&&e.length?1:0,e),borderSize:(e,t)=>(null==e&&(e=d.defaults.borderSize),y+=e&&e.length?1:0,e),opacity:parseFloat,color:(e,t)=>(null==e&&(e=d.defaults.color),e=this.updateColor(e),v++,e),borderColor:(e,t)=>(null==e&&(e=d.defaults.borderColor),e=this.updateColor(e),v++,e),bounds:(e,t,r)=>("range"in r||(r.range=null),e),positions:(e,t,r)=>{let{snap:n}=t,{positionBuffer:o,positionFractBuffer:s,selectionBuffer:l}=t;if(e.x||e.y)return e.x.length?t.xAttr={buffer:f.buffer(e.x),offset:0,stride:4,count:e.x.length}:t.xAttr={buffer:e.x.buffer,offset:4*e.x.offset||0,stride:4*(e.x.stride||1),count:e.x.count},e.y.length?t.yAttr={buffer:f.buffer(e.y),offset:0,stride:4,count:e.y.length}:t.yAttr={buffer:e.y.buffer,offset:4*e.y.offset||0,stride:4*(e.y.stride||1),count:e.y.count},t.count=Math.max(t.xAttr.count,t.yAttr.count),e;let h=t.count=Math.floor((e=c(e,"float64")).length/2),d=t.bounds=h?i(e,2):null;if(r.range||t.range||(delete t.range,r.range=d),r.marker||t.marker||(delete t.marker,r.marker=null),n&&(!0===n||h>n)?t.tree=a(e,{bounds:d}):n&&n.length&&(t.tree=n),t.tree){let e={primitive:"points",usage:"static",data:t.tree,type:"uint32"};t.elements?t.elements(e):t.elements=f.elements(e)}var p=u.float32(e);return o({data:p,usage:"dynamic"}),s({data:u.fract32(e,p),usage:"dynamic"}),l({data:new Uint8Array(h),type:"uint8",usage:"stream"}),e}},{marker:(e,t,r)=>{let{activation:i}=t;if(i.forEach(e=>e&&e.destroy&&e.destroy()),i.length=0,e&&"number"!=typeof e[0]){let r=[];for(let i=0,n=Math.min(e.length,t.count);i{let i=t.bounds;if(i)return e||(e=i),t.scale=[1/(e[2]-e[0]),1/(e[3]-e[1])],t.translate=[-e[0],-e[1]],t.scaleFract=u.fract(t.scale),t.translateFract=u.fract(t.translate),e},viewport:e=>h(e||[o.drawingBufferWidth,o.drawingBufferHeight])}]),y){let{count:e,size:t,borderSize:i,sizeBuffer:n}=r,a=new Uint8Array(2*e);if(t.length||i.length)for(let r=0;r=0)return a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)t=e;else{t=new Uint8Array(e.length);for(let r=0,i=e.length;r4*a&&(this.tooManyColors=!0),this.updatePalette(i),1===o.length?o[0]:o},d.prototype.updatePalette=function(e){if(this.tooManyColors)return;let{maxColors:t,paletteTexture:r}=this,i=Math.ceil(.25*e.length/t);if(i>1){e=e.slice();for(let r=.25*e.length%t;r{e.sizeBuffer.destroy(),e.positionBuffer.destroy(),e.positionFractBuffer.destroy(),e.colorBuffer.destroy(),e.activation.forEach(e=>e&&e.destroy&&e.destroy()),e.selectionBuffer.destroy(),e.elements&&e.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(e=>e&&e.destroy&&e.destroy()),this},t.exports=function(e,t){var r=new d(e,t),i=r.render.bind(r);return Object.assign(i,{render:i,update:r.update.bind(r),draw:r.draw.bind(r),destroy:r.destroy.bind(r),regl:r.regl,gl:r.gl,canvas:r.gl.canvas,groups:r.groups,markers:r.markerCache,palette:r.palette}),i}}}),mR=p({"node_modules/object-assign/index.js"(e,t){var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;t.exports=!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var i=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==i.join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch{return!1}}()?function(e,t){for(var a,o,s=function(e){if(null==e)throw TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l=a.next.y&&a.next.y!==a.y){var h=a.x+(c-a.y)*(a.next.x-a.x)/(a.next.y-a.y);if(h<=o&&h>u&&(u=h,n=a.x=a.x&&a.x>=m&&o!==a.x&&s(cn.x||a.x===n.x&&(r=n,i=a,0>l(r.prev,r,i.prev)&&0>l(i.next,r,r.next))))&&(n=a,y=d)),a=a.next}while(a!==p);return n}(e,t);if(!r)return t;var i=p(r,e);return n(i,i.next),n(r,r.next)}(g[c],r);return r}(e,t,T,r)),e.length>80*r){h=m=e[0],d=y=e[1];for(var k=r;km&&(m=v),x>y&&(y=x);b=0!==(b=Math.max(m-h,y-d))?32767/b:0}return function e(t,r,i,a,h,d,m){if(t){!m&&d&&function(e,t,r,i){var n=e;do 0===n.z&&(n.z=o(n.x,n.y,t,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==e);n.prevZ.nextZ=null,n.prevZ=null,function(e){var t,r,i,n,a,o,s,l,c=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,i=r,s=0,t=0;t0||l>0&&i;)0!==s&&(0===l||!i||r.z<=i.z)?(n=r,r=r.nextZ,s--):(n=i,i=i.nextZ,l--),a?a.nextZ=n:e=n,n.prevZ=a,a=n;r=i}a.nextZ=null,c*=2}while(o>1)}(n)}(t,a,h,d);for(var y,v,x=t;t.prev!==t.next;){if(y=t.prev,v=t.next,d?function(e,t,r,i){var n=e.prev,a=e.next;if(l(n,e,a)>=0)return!1;for(var c=n.x,u=e.x,h=a.x,d=n.y,f=e.y,p=a.y,m=cu?c>h?c:h:u>h?u:h,v=d>f?d>p?d:p:f>p?f:p,x=o(m,g,t,r,i),b=o(y,v,t,r,i),_=e.prevZ,w=e.nextZ;_&&_.z>=x&&w&&w.z<=b;){if(_.x>=m&&_.x<=y&&_.y>=g&&_.y<=v&&_!==n&&_!==a&&s(c,d,u,f,h,p,_.x,_.y)&&l(_.prev,_,_.next)>=0||(_=_.prevZ,w.x>=m&&w.x<=y&&w.y>=g&&w.y<=v&&w!==n&&w!==a&&s(c,d,u,f,h,p,w.x,w.y)&&l(w.prev,w,w.next)>=0))return!1;w=w.nextZ}for(;_&&_.z>=x;){if(_.x>=m&&_.x<=y&&_.y>=g&&_.y<=v&&_!==n&&_!==a&&s(c,d,u,f,h,p,_.x,_.y)&&l(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;w&&w.z<=b;){if(w.x>=m&&w.x<=y&&w.y>=g&&w.y<=v&&w!==n&&w!==a&&s(c,d,u,f,h,p,w.x,w.y)&&l(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}(t,a,h,d):function(e){var t=e.prev,r=e.next;if(l(t,e,r)>=0)return!1;for(var i=t.x,n=e.x,a=r.x,o=t.y,c=e.y,u=r.y,h=in?i>a?i:a:n>a?n:a,p=o>c?o>u?o:u:c>u?c:u,m=r.next;m!==t;){if(m.x>=h&&m.x<=f&&m.y>=d&&m.y<=p&&s(i,o,n,c,a,u,m.x,m.y)&&l(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}(t)){r.push(y.i/i|0),r.push(t.i/i|0),r.push(v.i/i|0),g(t),t=v.next,x=v.next;continue}if((t=v)===x){m?1===m?e(t=function(e,t,r){var i=e;do{var a=i.prev,o=i.next.next;!c(a,o)&&u(a,i,i.next,o)&&f(a,o)&&f(o,a)&&(t.push(a.i/r|0),t.push(i.i/r|0),t.push(o.i/r|0),g(i),g(i.next),i=e=o),i=i.next}while(i!==e);return n(i)}(n(t),r,i),r,i,a,h,d,2):2===m&&function(t,r,i,a,o,s){var h=t;do{for(var d,m,g=h.next.next;g!==h.prev;){if(h.i!==g.i&&(d=h,m=g,d.next.i!==m.i&&d.prev.i!==m.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&u(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(d,m)&&(f(d,m)&&f(m,d)&&function(e,t){var r=e,i=!1,n=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&n<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==e);return i}(d,m)&&(l(d.prev,d,m.prev)||l(d,m.prev,m))||c(d,m)&&l(d.prev,d,d.next)>0&&l(m.prev,m,m.next)>0))){var y=p(h,g);h=n(h,h.next),y=n(y,y.next),e(h,r,i,a,o,s,0),e(y,r,i,a,o,s,0);return}g=g.next}h=h.next}while(h!==t)}(t,r,i,a,h,d):e(n(t),r,i,a,h,d,1);break}}}}(T,M,r,h,d,b,0),M}function i(e,t,r,i,n){var a,o;if(n===v(e,t,r,i)>0)for(a=t;a=t;a-=i)o=m(a,e[a],e[a+1],o);return o&&c(o,o.next)&&(g(o),o=o.next),o}function n(e,t){if(!e)return e;t||(t=e);var r,i=e;do if(r=!1,!i.steiner&&(c(i,i.next)||0===l(i.prev,i,i.next))){if(g(i),(i=t=i.prev)===i.next)break;r=!0}else i=i.next;while(r||i!==t);return t}function a(e,t){return e.x-t.x}function o(e,t,r,i,n){return(e=((e=((e=((e=((e=(e-r)*n|0)|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=((t=(t-i)*n|0)|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1}function s(e,t,r,i,n,a,o,s){return(n-o)*(t-s)>=(e-o)*(a-s)&&(e-o)*(i-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(n-o)*(i-s)}function l(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function c(e,t){return e.x===t.x&&e.y===t.y}function u(e,t,r,i){var n=d(l(e,t,r)),a=d(l(e,t,i)),o=d(l(r,i,e)),s=d(l(r,i,t));return!!(n!==a&&o!==s||0===n&&h(e,r,t)||0===a&&h(e,i,t)||0===o&&h(r,e,i)||0===s&&h(r,t,i))}function h(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function d(e){return e>0?1:e<0?-1:0}function f(e,t){return 0>l(e.prev,e,e.next)?l(e,t,e.next)>=0&&l(e,e.prev,t)>=0:0>l(e,t,e.prev)||0>l(e,e.next,t)}function p(e,t){var r=new y(e.i,e.x,e.y),i=new y(t.i,t.x,t.y),n=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function m(e,t,r,i){var n=new y(e,t,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 g(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)}function y(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function v(e,t,r,i){for(var n=0,a=t,o=r-i;a0&&(i+=e[n-1].length,r.holes.push(i))}return r}}}),mj=p({"node_modules/array-normalize/index.js"(e,t){var r=p7();t.exports=function(e,t,i){if(!e||null==e.length)throw Error("Argument should be an array");null==t&&(t=1),null==i&&(i=r(e,t));for(var n=0;n-1}}}),ge=p({"node_modules/es5-ext/string/#/contains/index.js"(e,t){t.exports=m7()()?String.prototype.contains:m9()}}),gt=p({"node_modules/d/index.js"(e,t){var r=mX(),i=m0(),n=m6(),a=m8(),o=ge();(t.exports=function(e,t){var i,s,l,c,u;return arguments.length<2||"string"!=typeof e?(c=t,t=e,e=null):c=arguments[2],r(e)?(i=o.call(e,"c"),s=o.call(e,"e"),l=o.call(e,"w")):(i=l=!0,s=!1),u={value:t,configurable:i,enumerable:s,writable:l},c?n(a(c),u):u}).gs=function(e,t,s){var l,c,u,h;return"string"!=typeof e?(u=s,s=t,t=e,e=null):u=arguments[3],r(t)?i(t)?r(s)?i(s)||(u=s,s=void 0):s=void 0:(u=t,t=s=void 0):t=void 0,r(e)?(l=o.call(e,"c"),c=o.call(e,"e")):(l=!0,c=!1),h={get:t,set:s,configurable:l,enumerable:c},u?n(a(u),h):h}}}),gr=p({"node_modules/es5-ext/function/is-arguments.js"(e,t){var r=Object.prototype.toString,i=r.call(function(){return arguments}());t.exports=function(e){return r.call(e)===i}}}),gi=p({"node_modules/es5-ext/string/is-string.js"(e,t){var r=Object.prototype.toString,i=r.call("");t.exports=function(e){return"string"==typeof e||e&&"object"==typeof e&&(e instanceof String||r.call(e)===i)||!1}}}),gn=p({"node_modules/ext/global-this/is-implemented.js"(e,t){t.exports=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}}}),ga=p({"node_modules/ext/global-this/implementation.js"(e,t){var r=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return r()}try{return __global__||r()}finally{delete Object.prototype.__global__}}()}}),go=p({"node_modules/ext/global-this/index.js"(e,t){t.exports=gn()()?globalThis:ga()}}),gs=p({"node_modules/es6-symbol/is-implemented.js"(e,t){var r=go(),i={object:!0,symbol:!0};t.exports=function(){var e,t=r.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch{return!1}return!(!i[typeof t.iterator]||!i[typeof t.toPrimitive]||!i[typeof t.toStringTag])}}}),gc=p({"node_modules/es6-symbol/is-symbol.js"(e,t){t.exports=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])}}}),gu=p({"node_modules/es6-symbol/validate-symbol.js"(e,t){var r=gc();t.exports=function(e){if(!r(e))throw TypeError(e+" is not a symbol");return e}}}),gh=p({"node_modules/es6-symbol/lib/private/generate-name.js"(e,t){var r=gt(),i=Object.defineProperty,n=Object.prototype,a=(0,Object.create)(null);t.exports=function(e){for(var t,o,s=0;a[e+(s||"")];)++s;return a[e+=s||""]=!0,i(n,t="@@"+e,r.gs(null,function(e){o||(o=!0,i(this,t,r(e)),o=!1)})),t}}}),gd=p({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(e,t){var r=gt(),i=go().Symbol;t.exports=function(e){return Object.defineProperties(e,{hasInstance:r("",i&&i.hasInstance||e("hasInstance")),isConcatSpreadable:r("",i&&i.isConcatSpreadable||e("isConcatSpreadable")),iterator:r("",i&&i.iterator||e("iterator")),match:r("",i&&i.match||e("match")),replace:r("",i&&i.replace||e("replace")),search:r("",i&&i.search||e("search")),species:r("",i&&i.species||e("species")),split:r("",i&&i.split||e("split")),toPrimitive:r("",i&&i.toPrimitive||e("toPrimitive")),toStringTag:r("",i&&i.toStringTag||e("toStringTag")),unscopables:r("",i&&i.unscopables||e("unscopables"))})}}}),gf=p({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(e,t){var r=gt(),i=gu(),n=Object.create(null);t.exports=function(e){return Object.defineProperties(e,{for:r(function(t){return n[t]?n[t]:n[t]=e(String(t))}),keyFor:r(function(e){var t;for(t in i(e),n)if(n[t]===e)return t})})}}}),gp=p({"node_modules/es6-symbol/polyfill.js"(e,t){var r,i,n,a=gt(),o=gu(),s=go().Symbol,l=gh(),c=gd(),u=gf(),h=Object.create,d=Object.defineProperties,f=Object.defineProperty;if("function"==typeof s)try{String(s()),n=!0}catch{}else s=null;i=function(e){if(this instanceof i)throw TypeError("Symbol is not a constructor");return r(e)},t.exports=r=function e(t){if(this instanceof e)throw TypeError("Symbol is not a constructor");return n?s(t):d(h(i.prototype),{__description__:a("",t=void 0===t?"":String(t)),__name__:a("",l(t))})},c(r),u(r),d(i.prototype,{constructor:a(r),toString:a("",function(){return this.__name__})}),d(r.prototype,{toString:a(function(){return"Symbol ("+o(this).__description__+")"}),valueOf:a(function(){return o(this)})}),f(r.prototype,r.toPrimitive,a("",function(){var e=o(this);return"symbol"==typeof e?e:e.toString()})),f(r.prototype,r.toStringTag,a("c","Symbol")),f(i.prototype,r.toStringTag,a("c",r.prototype[r.toStringTag])),f(i.prototype,r.toPrimitive,a("c",r.prototype[r.toPrimitive]))}}),gm=p({"node_modules/es6-symbol/index.js"(e,t){t.exports=gs()()?go().Symbol:gp()}}),gg=p({"node_modules/es5-ext/array/#/clear.js"(e,t){var r=mH();t.exports=function(){return r(this).length=0,this}}}),gy=p({"node_modules/es5-ext/object/valid-callable.js"(e,t){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function");return e}}}),gv=p({"node_modules/type/string/coerce.js"(e,t){var r=mX(),i=mK(),n=Object.prototype.toString;t.exports=function(e){if(!r(e))return null;if(i(e)){var t=e.toString;if("function"!=typeof t||t===n)return null}try{return""+e}catch{return null}}}}),gx=p({"node_modules/type/lib/safe-to-string.js"(e,t){t.exports=function(e){try{return e.toString()}catch{try{return String(e)}catch{return null}}}}}),gb=p({"node_modules/type/lib/to-short-string.js"(e,t){var r=gx(),i=/[\n\r\u2028\u2029]/g;t.exports=function(e){var t=r(e);return null===t?"":(t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(i,function(e){switch(e){case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("Unexpected character")}}))}}}),g_=p({"node_modules/type/lib/resolve-error-message.js"(e,t){var r=gv(),i=gb();t.exports=function(e,t,n){n&&n.errorMessage&&(e=r(n.errorMessage));var a=e.indexOf("%v"),o=a>-1?i(t):null;if(n&&n.name){var s,l,c,u,h=e.indexOf("%n");if(h>-1)return a>-1?(h>a?(s=o,c=a,l=n.name,u=h):(s=n.name,c=h,l=o,u=a),e.slice(0,c)+s+e.slice(c+2,u)+l+e.slice(u+2)):e.slice(0,h)+n.name+e.slice(h+2)}return a>-1?e.slice(0,a)+o+e.slice(a+2):e}}}),gw=p({"node_modules/type/lib/resolve-exception.js"(e,t){var r=mX(),i=g_();t.exports=function(e,t,n){if(n&&!r(e)){if("default"in n)return n.default;if(n.isOptional)return null}var a=new(n&&n.Error||TypeError)(i(t,e,n));throw n&&n.errorCode&&(a.code=n.errorCode),a}}}),gT=p({"node_modules/type/value/ensure.js"(e,t){var r=gw(),i=mX();t.exports=function(e){if(i(e))return e;var t=arguments[1];return r(e,t&&t.name?"Expected a value for %n, received %v":"Cannot use %v",t)}}}),gM=p({"node_modules/type/plain-function/ensure.js"(e,t){var r=gw(),i=m0();t.exports=function(e){if(i(e))return e;var t=arguments[1];return r(e,t&&t.name?"Expected a plain function for %n, received %v":"%v is not a plain function",t)}}}),gk=p({"node_modules/es5-ext/array/from/is-implemented.js"(e,t){t.exports=function(){var e,t,r=Array.from;return"function"==typeof r&&!!((t=r(e=["raz","dwa"]))&&t!==e&&"dwa"===t[1])}}}),gA=p({"node_modules/es5-ext/function/is-function.js"(e,t){var r=Object.prototype.toString,i=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);t.exports=function(e){return"function"==typeof e&&i(r.call(e))}}}),gS=p({"node_modules/es5-ext/math/sign/is-implemented.js"(e,t){t.exports=function(){var e=Math.sign;return"function"==typeof e&&1===e(10)&&-1===e(-20)}}}),gE=p({"node_modules/es5-ext/math/sign/shim.js"(e,t){t.exports=function(e){return isNaN(e=Number(e))||0===e?e:e>0?1:-1}}}),gC=p({"node_modules/es5-ext/math/sign/index.js"(e,t){t.exports=gS()()?Math.sign:gE()}}),gL=p({"node_modules/es5-ext/number/to-integer.js"(e,t){var r=gC(),i=Math.abs,n=Math.floor;t.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?r(e)*n(i(e)):e}}}),gP=p({"node_modules/es5-ext/number/to-pos-integer.js"(e,t){var r=gL(),i=Math.max;t.exports=function(e){return i(0,r(e))}}}),gI=p({"node_modules/es5-ext/array/from/shim.js"(e,t){var r=gm().iterator,i=gr(),n=gA(),a=gP(),o=gy(),s=mH(),l=mU(),c=gi(),u=Array.isArray,h=Function.prototype.call,d={configurable:!0,enumerable:!0,writable:!0,value:null},f=Object.defineProperty;t.exports=function(e){var t,p,m,g,y,v,x,b,_,w,T=arguments[1],M=arguments[2];if(e=Object(s(e)),l(T)&&o(T),this&&this!==Array&&n(this))t=this;else{if(!T){if(i(e))return 1!==(y=e.length)?Array.apply(null,e):((g=[,])[0]=e[0],g);if(u(e)){for(g=Array(y=e.length),p=0;p=55296&&v<=56319&&(w+=e[++p]),w=T?h.call(T,M,w,m):w,t?(d.value=w,f(g,m,d)):g[m]=w,++m;y=m}}if(void 0===y)for(y=a(e.length),t&&(g=new t(y)),p=0;p=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void u(this,"__redo__",s("c",[e]));this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:s(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach(function(t,r){t>e&&(this.__redo__[r]=--t)},this)))}),_onClear:s(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),u(r.prototype,c.iterator,s(function(){return this}))}}),gN=p({"node_modules/es6-iterator/array.js"(e,t){var r,i=mY(),n=ge(),a=gt(),o=gm(),s=gB(),l=Object.defineProperty;r=t.exports=function(e,t){if(!(this instanceof r))throw TypeError("Constructor requires 'new'");s.call(this,e),l(this,"__kind__",a("",t=t?n.call(t,"key+value")?"key+value":n.call(t,"key")?"key":"value":"value"))},i&&i(r,s),delete r.prototype.constructor,r.prototype=Object.create(s.prototype,{_resolve:a(function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e})}),l(r.prototype,o.toStringTag,a("c","Array Iterator"))}}),gU=p({"node_modules/es6-iterator/string.js"(e,t){var r,i=mY(),n=gt(),a=gm(),o=gB(),s=Object.defineProperty;r=t.exports=function(e){if(!(this instanceof r))throw TypeError("Constructor requires 'new'");e=String(e),o.call(this,e),s(this,"__length__",n("",e.length))},i&&i(r,o),delete r.prototype.constructor,r.prototype=Object.create(o.prototype,{_next:n(function(){if(this.__list__){if(this.__nextIndex__=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r})}),s(r.prototype,a.toStringTag,n("c","String Iterator"))}}),gV=p({"node_modules/es6-iterator/is-iterable.js"(e,t){var r=gr(),i=mU(),n=gi(),a=gm().iterator,o=Array.isArray;t.exports=function(e){return!!i(e)&&(!!(o(e)||n(e)||r(e))||"function"==typeof e[a])}}}),gq=p({"node_modules/es6-iterator/valid-iterable.js"(e,t){var r=gV();t.exports=function(e){if(!r(e))throw TypeError(e+" is not iterable");return e}}}),gH=p({"node_modules/es6-iterator/get.js"(e,t){var r=gr(),i=gi(),n=gN(),a=gU(),o=gq(),s=gm().iterator;t.exports=function(e){return"function"==typeof o(e)[s]?e[s]():r(e)?new n(e):i(e)?new a(e):new n(e)}}}),gG=p({"node_modules/es6-iterator/for-of.js"(e,t){var r=gr(),i=gy(),n=gi(),a=gH(),o=Array.isArray,s=Function.prototype.call,l=Array.prototype.some;t.exports=function(e,t){var c,u,h,d,f,p,m,g,y=arguments[2];if(o(e)||r(e)?c="array":n(e)?c="string":e=a(e),i(t),h=function(){d=!0},"array"===c)return void l.call(e,function(e){return s.call(t,y,e,h),d});if("string"===c){for(p=e.length,f=0;f=55296&&g<=56319&&(m+=e[++f]),s.call(t,y,m,h),!d);++f);return}for(u=e.next();!u.done;){if(s.call(t,y,u.value,h),d)return;u=e.next()}}}}),gW=p({"node_modules/es6-weak-map/is-native-implemented.js"(e,t){t.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)}}),gY=p({"node_modules/es6-weak-map/polyfill.js"(e,t){var r,i=mU(),n=mY(),a=mZ(),o=mH(),s=m$(),l=gt(),c=gH(),u=gG(),h=gm().toStringTag,d=gW(),f=Array.isArray,p=Object.defineProperty,m=Object.prototype.hasOwnProperty,g=Object.getPrototypeOf;t.exports=r=function(){var e,t=arguments[0];if(!(this instanceof r))throw TypeError("Constructor requires 'new'");return e=d&&n&&WeakMap!==r?n(new WeakMap,g(this)):this,i(t)&&(f(t)||(t=c(t))),p(e,"__weakMapData__",l("c","$weakMap$"+s())),t&&u(t,function(t){o(t),e.set(t[0],t[1])}),e},d&&(n&&n(r,WeakMap),r.prototype=Object.create(WeakMap.prototype,{constructor:l(r)})),Object.defineProperties(r.prototype,{delete:l(function(e){return!!m.call(a(e),this.__weakMapData__)&&(delete e[this.__weakMapData__],!0)}),get:l(function(e){if(m.call(a(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:l(function(e){return m.call(a(e),this.__weakMapData__)}),set:l(function(e,t){return p(a(e),this.__weakMapData__,l("c",t)),this}),toString:l(function(){return"[object WeakMap]"})}),p(r.prototype,h,l("c","WeakMap"))}}),gZ=p({"node_modules/es6-weak-map/index.js"(e,t){t.exports=mB()()?WeakMap:gY()}}),g$=p({"node_modules/array-find-index/index.js"(e,t){t.exports=function(e,t,r){if("function"==typeof Array.prototype.findIndex)return e.findIndex(t,r);if("function"!=typeof t)throw TypeError("predicate must be a function");var i=Object(e),n=i.length;if(0===n)return -1;for(var a=0;a{this.drawItem(t)});return this},d.prototype.drawItem=function(e,t){let{groups:r}=this,i=r[e];if("number"==typeof t&&(e=t,i=r[t],t=null),!(i&&i.count&&i.opacity))return;i.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,i,t));let n=[];for(let e=1;e{let r=n[t];if(void 0===e)return r;null===e?e={positions:null}:"function"==typeof e?e={ondraw:e}:"number"==typeof e[0]&&(e={positions:e}),null===(e=s(e,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"})).positions&&(e.positions=[]),null!=e.tooManyColors&&(this.tooManyColors=e.tooManyColors),r||(n[t]=r={id:t,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:f.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:f.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:f.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:f.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:f.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},e=Object.assign({},d.defaults,e)),!e.positions||"marker"in e||(e.marker=r.marker,delete r.marker),!e.marker||"positions"in e||(e.positions=r.positions,delete r.positions);let y=0,v=0;if(l(r,e,[{snap:!0,size:(e,t)=>(null==e&&(e=d.defaults.size),y+=e&&e.length?1:0,e),borderSize:(e,t)=>(null==e&&(e=d.defaults.borderSize),y+=e&&e.length?1:0,e),opacity:parseFloat,color:(e,t)=>(null==e&&(e=d.defaults.color),e=this.updateColor(e),v++,e),borderColor:(e,t)=>(null==e&&(e=d.defaults.borderColor),e=this.updateColor(e),v++,e),bounds:(e,t,r)=>("range"in r||(r.range=null),e),positions:(e,t,r)=>{let{snap:n}=t,{positionBuffer:o,positionFractBuffer:s,selectionBuffer:l}=t;if(e.x||e.y)return e.x.length?t.xAttr={buffer:f.buffer(e.x),offset:0,stride:4,count:e.x.length}:t.xAttr={buffer:e.x.buffer,offset:4*e.x.offset||0,stride:4*(e.x.stride||1),count:e.x.count},e.y.length?t.yAttr={buffer:f.buffer(e.y),offset:0,stride:4,count:e.y.length}:t.yAttr={buffer:e.y.buffer,offset:4*e.y.offset||0,stride:4*(e.y.stride||1),count:e.y.count},t.count=Math.max(t.xAttr.count,t.yAttr.count),e;let h=t.count=Math.floor((e=c(e,"float64")).length/2),d=t.bounds=h?i(e,2):null;if(r.range||t.range||(delete t.range,r.range=d),r.marker||t.marker||(delete t.marker,r.marker=null),n&&(!0===n||h>n)?t.tree=a(e,{bounds:d}):n&&n.length&&(t.tree=n),t.tree){let e={primitive:"points",usage:"static",data:t.tree,type:"uint32"};t.elements?t.elements(e):t.elements=f.elements(e)}var p=u.float32(e);return o({data:p,usage:"dynamic"}),s({data:u.fract32(e,p),usage:"dynamic"}),l({data:new Uint8Array(h),type:"uint8",usage:"stream"}),e}},{marker:(e,t,r)=>{let{activation:i}=t;if(i.forEach(e=>e&&e.destroy&&e.destroy()),i.length=0,e&&"number"!=typeof e[0]){let r=[];for(let i=0,n=Math.min(e.length,t.count);i{let i=t.bounds;if(i)return e||(e=i),t.scale=[1/(e[2]-e[0]),1/(e[3]-e[1])],t.translate=[-e[0],-e[1]],t.scaleFract=u.fract(t.scale),t.translateFract=u.fract(t.translate),e},viewport:e=>h(e||[o.drawingBufferWidth,o.drawingBufferHeight])}]),y){let{count:e,size:t,borderSize:i,sizeBuffer:n}=r,a=new Uint8Array(2*e);if(t.length||i.length)for(let r=0;r=0)return a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)t=e;else{t=new Uint8Array(e.length);for(let r=0,i=e.length;r4*a&&(this.tooManyColors=!0),this.updatePalette(i),1===o.length?o[0]:o},d.prototype.updatePalette=function(e){if(this.tooManyColors)return;let{maxColors:t,paletteTexture:r}=this,i=Math.ceil(.25*e.length/t);if(i>1){e=e.slice();for(let r=.25*e.length%t;r{e.sizeBuffer.destroy(),e.positionBuffer.destroy(),e.positionFractBuffer.destroy(),e.colorBuffer.destroy(),e.activation.forEach(e=>e&&e.destroy&&e.destroy()),e.selectionBuffer.destroy(),e.elements&&e.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(e=>e&&e.destroy&&e.destroy()),this},t.exports=function(e,t){var r=new d(e,t),i=r.render.bind(r);return Object.assign(i,{render:i,update:r.update.bind(r),draw:r.draw.bind(r),destroy:r.destroy.bind(r),regl:r.regl,gl:r.gl,canvas:r.gl.canvas,groups:r.groups,markers:r.markerCache,palette:r.palette}),i}}}),mR=p({"node_modules/object-assign/index.js"(e,t){var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;t.exports=!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var i=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==i.join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch{return!1}}()?function(e,t){for(var a,o,s=function(e){if(null==e)throw TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l=a.next.y&&a.next.y!==a.y){var h=a.x+(c-a.y)*(a.next.x-a.x)/(a.next.y-a.y);if(h<=o&&h>u&&(u=h,n=a.x=a.x&&a.x>=m&&o!==a.x&&s(cn.x||a.x===n.x&&(r=n,i=a,0>l(r.prev,r,i.prev)&&0>l(i.next,r,r.next))))&&(n=a,y=d)),a=a.next}while(a!==p);return n}(e,t);if(!r)return t;var i=p(r,e);return n(i,i.next),n(r,r.next)}(g[c],r);return r}(e,t,T,r)),e.length>80*r){h=m=e[0],d=y=e[1];for(var k=r;km&&(m=v),x>y&&(y=x);b=0!==(b=Math.max(m-h,y-d))?32767/b:0}return function e(t,r,i,a,h,d,m){if(t){!m&&d&&function(e,t,r,i){var n=e;do 0===n.z&&(n.z=o(n.x,n.y,t,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==e);n.prevZ.nextZ=null,n.prevZ=null,function(e){var t,r,i,n,a,o,s,l,c=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,i=r,s=0,t=0;t0||l>0&&i;)0!==s&&(0===l||!i||r.z<=i.z)?(n=r,r=r.nextZ,s--):(n=i,i=i.nextZ,l--),a?a.nextZ=n:e=n,n.prevZ=a,a=n;r=i}a.nextZ=null,c*=2}while(o>1)}(n)}(t,a,h,d);for(var y,v,x=t;t.prev!==t.next;){if(y=t.prev,v=t.next,d?function(e,t,r,i){var n=e.prev,a=e.next;if(l(n,e,a)>=0)return!1;for(var c=n.x,u=e.x,h=a.x,d=n.y,f=e.y,p=a.y,m=cu?c>h?c:h:u>h?u:h,v=d>f?d>p?d:p:f>p?f:p,x=o(m,g,t,r,i),b=o(y,v,t,r,i),_=e.prevZ,w=e.nextZ;_&&_.z>=x&&w&&w.z<=b;){if(_.x>=m&&_.x<=y&&_.y>=g&&_.y<=v&&_!==n&&_!==a&&s(c,d,u,f,h,p,_.x,_.y)&&l(_.prev,_,_.next)>=0||(_=_.prevZ,w.x>=m&&w.x<=y&&w.y>=g&&w.y<=v&&w!==n&&w!==a&&s(c,d,u,f,h,p,w.x,w.y)&&l(w.prev,w,w.next)>=0))return!1;w=w.nextZ}for(;_&&_.z>=x;){if(_.x>=m&&_.x<=y&&_.y>=g&&_.y<=v&&_!==n&&_!==a&&s(c,d,u,f,h,p,_.x,_.y)&&l(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;w&&w.z<=b;){if(w.x>=m&&w.x<=y&&w.y>=g&&w.y<=v&&w!==n&&w!==a&&s(c,d,u,f,h,p,w.x,w.y)&&l(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}(t,a,h,d):function(e){var t=e.prev,r=e.next;if(l(t,e,r)>=0)return!1;for(var i=t.x,n=e.x,a=r.x,o=t.y,c=e.y,u=r.y,h=in?i>a?i:a:n>a?n:a,p=o>c?o>u?o:u:c>u?c:u,m=r.next;m!==t;){if(m.x>=h&&m.x<=f&&m.y>=d&&m.y<=p&&s(i,o,n,c,a,u,m.x,m.y)&&l(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}(t)){r.push(y.i/i|0),r.push(t.i/i|0),r.push(v.i/i|0),g(t),t=v.next,x=v.next;continue}if((t=v)===x){m?1===m?e(t=function(e,t,r){var i=e;do{var a=i.prev,o=i.next.next;!c(a,o)&&u(a,i,i.next,o)&&f(a,o)&&f(o,a)&&(t.push(a.i/r|0),t.push(i.i/r|0),t.push(o.i/r|0),g(i),g(i.next),i=e=o),i=i.next}while(i!==e);return n(i)}(n(t),r,i),r,i,a,h,d,2):2===m&&function(t,r,i,a,o,s){var h=t;do{for(var d,m,g=h.next.next;g!==h.prev;){if(h.i!==g.i&&(d=h,m=g,d.next.i!==m.i&&d.prev.i!==m.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&u(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(d,m)&&(f(d,m)&&f(m,d)&&function(e,t){var r=e,i=!1,n=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&n<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==e);return i}(d,m)&&(l(d.prev,d,m.prev)||l(d,m.prev,m))||c(d,m)&&l(d.prev,d,d.next)>0&&l(m.prev,m,m.next)>0))){var y=p(h,g);h=n(h,h.next),y=n(y,y.next),e(h,r,i,a,o,s,0),e(y,r,i,a,o,s,0);return}g=g.next}h=h.next}while(h!==t)}(t,r,i,a,h,d):e(n(t),r,i,a,h,d,1);break}}}}(T,M,r,h,d,b,0),M}function i(e,t,r,i,n){var a,o;if(n===v(e,t,r,i)>0)for(a=t;a=t;a-=i)o=m(a,e[a],e[a+1],o);return o&&c(o,o.next)&&(g(o),o=o.next),o}function n(e,t){if(!e)return e;t||(t=e);var r,i=e;do if(r=!1,!i.steiner&&(c(i,i.next)||0===l(i.prev,i,i.next))){if(g(i),(i=t=i.prev)===i.next)break;r=!0}else i=i.next;while(r||i!==t);return t}function a(e,t){return e.x-t.x}function o(e,t,r,i,n){return(e=((e=((e=((e=((e=(e-r)*n|0)|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=((t=(t-i)*n|0)|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1}function s(e,t,r,i,n,a,o,s){return(n-o)*(t-s)>=(e-o)*(a-s)&&(e-o)*(i-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(n-o)*(i-s)}function l(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function c(e,t){return e.x===t.x&&e.y===t.y}function u(e,t,r,i){var n=d(l(e,t,r)),a=d(l(e,t,i)),o=d(l(r,i,e)),s=d(l(r,i,t));return!!(n!==a&&o!==s||0===n&&h(e,r,t)||0===a&&h(e,i,t)||0===o&&h(r,e,i)||0===s&&h(r,t,i))}function h(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function d(e){return e>0?1:e<0?-1:0}function f(e,t){return 0>l(e.prev,e,e.next)?l(e,t,e.next)>=0&&l(e,e.prev,t)>=0:0>l(e,t,e.prev)||0>l(e,e.next,t)}function p(e,t){var r=new y(e.i,e.x,e.y),i=new y(t.i,t.x,t.y),n=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function m(e,t,r,i){var n=new y(e,t,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 g(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)}function y(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function v(e,t,r,i){for(var n=0,a=t,o=r-i;a0&&(i+=e[n-1].length,r.holes.push(i))}return r}}}),mj=p({"node_modules/array-normalize/index.js"(e,t){var r=p9();t.exports=function(e,t,i){if(!e||null==e.length)throw Error("Argument should be an array");null==t&&(t=1),null==i&&(i=r(e,t));for(var n=0;n-1}}}),ge=p({"node_modules/es5-ext/string/#/contains/index.js"(e,t){t.exports=m9()()?String.prototype.contains:m7()}}),gt=p({"node_modules/d/index.js"(e,t){var r=mX(),i=m0(),n=m6(),a=m8(),o=ge();(t.exports=function(e,t){var i,s,l,c,u;return arguments.length<2||"string"!=typeof e?(c=t,t=e,e=null):c=arguments[2],r(e)?(i=o.call(e,"c"),s=o.call(e,"e"),l=o.call(e,"w")):(i=l=!0,s=!1),u={value:t,configurable:i,enumerable:s,writable:l},c?n(a(c),u):u}).gs=function(e,t,s){var l,c,u,h;return"string"!=typeof e?(u=s,s=t,t=e,e=null):u=arguments[3],r(t)?i(t)?r(s)?i(s)||(u=s,s=void 0):s=void 0:(u=t,t=s=void 0):t=void 0,r(e)?(l=o.call(e,"c"),c=o.call(e,"e")):(l=!0,c=!1),h={get:t,set:s,configurable:l,enumerable:c},u?n(a(u),h):h}}}),gr=p({"node_modules/es5-ext/function/is-arguments.js"(e,t){var r=Object.prototype.toString,i=r.call(function(){return arguments}());t.exports=function(e){return r.call(e)===i}}}),gi=p({"node_modules/es5-ext/string/is-string.js"(e,t){var r=Object.prototype.toString,i=r.call("");t.exports=function(e){return"string"==typeof e||e&&"object"==typeof e&&(e instanceof String||r.call(e)===i)||!1}}}),gn=p({"node_modules/ext/global-this/is-implemented.js"(e,t){t.exports=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}}}),ga=p({"node_modules/ext/global-this/implementation.js"(e,t){var r=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return r()}try{return __global__||r()}finally{delete Object.prototype.__global__}}()}}),go=p({"node_modules/ext/global-this/index.js"(e,t){t.exports=gn()()?globalThis:ga()}}),gs=p({"node_modules/es6-symbol/is-implemented.js"(e,t){var r=go(),i={object:!0,symbol:!0};t.exports=function(){var e,t=r.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch{return!1}return!(!i[typeof t.iterator]||!i[typeof t.toPrimitive]||!i[typeof t.toStringTag])}}}),gc=p({"node_modules/es6-symbol/is-symbol.js"(e,t){t.exports=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])}}}),gu=p({"node_modules/es6-symbol/validate-symbol.js"(e,t){var r=gc();t.exports=function(e){if(!r(e))throw TypeError(e+" is not a symbol");return e}}}),gh=p({"node_modules/es6-symbol/lib/private/generate-name.js"(e,t){var r=gt(),i=Object.defineProperty,n=Object.prototype,a=(0,Object.create)(null);t.exports=function(e){for(var t,o,s=0;a[e+(s||"")];)++s;return a[e+=s||""]=!0,i(n,t="@@"+e,r.gs(null,function(e){o||(o=!0,i(this,t,r(e)),o=!1)})),t}}}),gd=p({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(e,t){var r=gt(),i=go().Symbol;t.exports=function(e){return Object.defineProperties(e,{hasInstance:r("",i&&i.hasInstance||e("hasInstance")),isConcatSpreadable:r("",i&&i.isConcatSpreadable||e("isConcatSpreadable")),iterator:r("",i&&i.iterator||e("iterator")),match:r("",i&&i.match||e("match")),replace:r("",i&&i.replace||e("replace")),search:r("",i&&i.search||e("search")),species:r("",i&&i.species||e("species")),split:r("",i&&i.split||e("split")),toPrimitive:r("",i&&i.toPrimitive||e("toPrimitive")),toStringTag:r("",i&&i.toStringTag||e("toStringTag")),unscopables:r("",i&&i.unscopables||e("unscopables"))})}}}),gf=p({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(e,t){var r=gt(),i=gu(),n=Object.create(null);t.exports=function(e){return Object.defineProperties(e,{for:r(function(t){return n[t]?n[t]:n[t]=e(String(t))}),keyFor:r(function(e){var t;for(t in i(e),n)if(n[t]===e)return t})})}}}),gp=p({"node_modules/es6-symbol/polyfill.js"(e,t){var r,i,n,a=gt(),o=gu(),s=go().Symbol,l=gh(),c=gd(),u=gf(),h=Object.create,d=Object.defineProperties,f=Object.defineProperty;if("function"==typeof s)try{String(s()),n=!0}catch{}else s=null;i=function(e){if(this instanceof i)throw TypeError("Symbol is not a constructor");return r(e)},t.exports=r=function e(t){if(this instanceof e)throw TypeError("Symbol is not a constructor");return n?s(t):d(h(i.prototype),{__description__:a("",t=void 0===t?"":String(t)),__name__:a("",l(t))})},c(r),u(r),d(i.prototype,{constructor:a(r),toString:a("",function(){return this.__name__})}),d(r.prototype,{toString:a(function(){return"Symbol ("+o(this).__description__+")"}),valueOf:a(function(){return o(this)})}),f(r.prototype,r.toPrimitive,a("",function(){var e=o(this);return"symbol"==typeof e?e:e.toString()})),f(r.prototype,r.toStringTag,a("c","Symbol")),f(i.prototype,r.toStringTag,a("c",r.prototype[r.toStringTag])),f(i.prototype,r.toPrimitive,a("c",r.prototype[r.toPrimitive]))}}),gm=p({"node_modules/es6-symbol/index.js"(e,t){t.exports=gs()()?go().Symbol:gp()}}),gg=p({"node_modules/es5-ext/array/#/clear.js"(e,t){var r=mH();t.exports=function(){return r(this).length=0,this}}}),gy=p({"node_modules/es5-ext/object/valid-callable.js"(e,t){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function");return e}}}),gv=p({"node_modules/type/string/coerce.js"(e,t){var r=mX(),i=mK(),n=Object.prototype.toString;t.exports=function(e){if(!r(e))return null;if(i(e)){var t=e.toString;if("function"!=typeof t||t===n)return null}try{return""+e}catch{return null}}}}),gx=p({"node_modules/type/lib/safe-to-string.js"(e,t){t.exports=function(e){try{return e.toString()}catch{try{return String(e)}catch{return null}}}}}),gb=p({"node_modules/type/lib/to-short-string.js"(e,t){var r=gx(),i=/[\n\r\u2028\u2029]/g;t.exports=function(e){var t=r(e);return null===t?"":(t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(i,function(e){switch(e){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("Unexpected character")}}))}}}),g_=p({"node_modules/type/lib/resolve-error-message.js"(e,t){var r=gv(),i=gb();t.exports=function(e,t,n){n&&n.errorMessage&&(e=r(n.errorMessage));var a=e.indexOf("%v"),o=a>-1?i(t):null;if(n&&n.name){var s,l,c,u,h=e.indexOf("%n");if(h>-1)return a>-1?(h>a?(s=o,c=a,l=n.name,u=h):(s=n.name,c=h,l=o,u=a),e.slice(0,c)+s+e.slice(c+2,u)+l+e.slice(u+2)):e.slice(0,h)+n.name+e.slice(h+2)}return a>-1?e.slice(0,a)+o+e.slice(a+2):e}}}),gw=p({"node_modules/type/lib/resolve-exception.js"(e,t){var r=mX(),i=g_();t.exports=function(e,t,n){if(n&&!r(e)){if("default"in n)return n.default;if(n.isOptional)return null}var a=new(n&&n.Error||TypeError)(i(t,e,n));throw n&&n.errorCode&&(a.code=n.errorCode),a}}}),gT=p({"node_modules/type/value/ensure.js"(e,t){var r=gw(),i=mX();t.exports=function(e){if(i(e))return e;var t=arguments[1];return r(e,t&&t.name?"Expected a value for %n, received %v":"Cannot use %v",t)}}}),gM=p({"node_modules/type/plain-function/ensure.js"(e,t){var r=gw(),i=m0();t.exports=function(e){if(i(e))return e;var t=arguments[1];return r(e,t&&t.name?"Expected a plain function for %n, received %v":"%v is not a plain function",t)}}}),gk=p({"node_modules/es5-ext/array/from/is-implemented.js"(e,t){t.exports=function(){var e,t,r=Array.from;return"function"==typeof r&&!!((t=r(e=["raz","dwa"]))&&t!==e&&"dwa"===t[1])}}}),gA=p({"node_modules/es5-ext/function/is-function.js"(e,t){var r=Object.prototype.toString,i=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);t.exports=function(e){return"function"==typeof e&&i(r.call(e))}}}),gS=p({"node_modules/es5-ext/math/sign/is-implemented.js"(e,t){t.exports=function(){var e=Math.sign;return"function"==typeof e&&1===e(10)&&-1===e(-20)}}}),gE=p({"node_modules/es5-ext/math/sign/shim.js"(e,t){t.exports=function(e){return isNaN(e=Number(e))||0===e?e:e>0?1:-1}}}),gC=p({"node_modules/es5-ext/math/sign/index.js"(e,t){t.exports=gS()()?Math.sign:gE()}}),gL=p({"node_modules/es5-ext/number/to-integer.js"(e,t){var r=gC(),i=Math.abs,n=Math.floor;t.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?r(e)*n(i(e)):e}}}),gP=p({"node_modules/es5-ext/number/to-pos-integer.js"(e,t){var r=gL(),i=Math.max;t.exports=function(e){return i(0,r(e))}}}),gI=p({"node_modules/es5-ext/array/from/shim.js"(e,t){var r=gm().iterator,i=gr(),n=gA(),a=gP(),o=gy(),s=mH(),l=mU(),c=gi(),u=Array.isArray,h=Function.prototype.call,d={configurable:!0,enumerable:!0,writable:!0,value:null},f=Object.defineProperty;t.exports=function(e){var t,p,m,g,y,v,x,b,_,w,T=arguments[1],M=arguments[2];if(e=Object(s(e)),l(T)&&o(T),this&&this!==Array&&n(this))t=this;else{if(!T){if(i(e))return 1!==(y=e.length)?Array.apply(null,e):((g=[,])[0]=e[0],g);if(u(e)){for(g=Array(y=e.length),p=0;p=55296&&v<=56319&&(w+=e[++p]),w=T?h.call(T,M,w,m):w,t?(d.value=w,f(g,m,d)):g[m]=w,++m;y=m}}if(void 0===y)for(y=a(e.length),t&&(g=new t(y)),p=0;p=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void u(this,"__redo__",s("c",[e]));this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:s(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach(function(t,r){t>e&&(this.__redo__[r]=--t)},this)))}),_onClear:s(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),u(r.prototype,c.iterator,s(function(){return this}))}}),gN=p({"node_modules/es6-iterator/array.js"(e,t){var r,i=mY(),n=ge(),a=gt(),o=gm(),s=gB(),l=Object.defineProperty;r=t.exports=function(e,t){if(!(this instanceof r))throw TypeError("Constructor requires 'new'");s.call(this,e),l(this,"__kind__",a("",t=t?n.call(t,"key+value")?"key+value":n.call(t,"key")?"key":"value":"value"))},i&&i(r,s),delete r.prototype.constructor,r.prototype=Object.create(s.prototype,{_resolve:a(function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e})}),l(r.prototype,o.toStringTag,a("c","Array Iterator"))}}),gU=p({"node_modules/es6-iterator/string.js"(e,t){var r,i=mY(),n=gt(),a=gm(),o=gB(),s=Object.defineProperty;r=t.exports=function(e){if(!(this instanceof r))throw TypeError("Constructor requires 'new'");e=String(e),o.call(this,e),s(this,"__length__",n("",e.length))},i&&i(r,o),delete r.prototype.constructor,r.prototype=Object.create(o.prototype,{_next:n(function(){if(this.__list__){if(this.__nextIndex__=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r})}),s(r.prototype,a.toStringTag,n("c","String Iterator"))}}),gV=p({"node_modules/es6-iterator/is-iterable.js"(e,t){var r=gr(),i=mU(),n=gi(),a=gm().iterator,o=Array.isArray;t.exports=function(e){return!!i(e)&&(!!(o(e)||n(e)||r(e))||"function"==typeof e[a])}}}),gq=p({"node_modules/es6-iterator/valid-iterable.js"(e,t){var r=gV();t.exports=function(e){if(!r(e))throw TypeError(e+" is not iterable");return e}}}),gH=p({"node_modules/es6-iterator/get.js"(e,t){var r=gr(),i=gi(),n=gN(),a=gU(),o=gq(),s=gm().iterator;t.exports=function(e){return"function"==typeof o(e)[s]?e[s]():r(e)?new n(e):i(e)?new a(e):new n(e)}}}),gG=p({"node_modules/es6-iterator/for-of.js"(e,t){var r=gr(),i=gy(),n=gi(),a=gH(),o=Array.isArray,s=Function.prototype.call,l=Array.prototype.some;t.exports=function(e,t){var c,u,h,d,f,p,m,g,y=arguments[2];if(o(e)||r(e)?c="array":n(e)?c="string":e=a(e),i(t),h=function(){d=!0},"array"===c)return void l.call(e,function(e){return s.call(t,y,e,h),d});if("string"===c){for(p=e.length,f=0;f=55296&&g<=56319&&(m+=e[++f]),s.call(t,y,m,h),!d);++f);return}for(u=e.next();!u.done;){if(s.call(t,y,u.value,h),d)return;u=e.next()}}}}),gW=p({"node_modules/es6-weak-map/is-native-implemented.js"(e,t){t.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)}}),gY=p({"node_modules/es6-weak-map/polyfill.js"(e,t){var r,i=mU(),n=mY(),a=mZ(),o=mH(),s=m$(),l=gt(),c=gH(),u=gG(),h=gm().toStringTag,d=gW(),f=Array.isArray,p=Object.defineProperty,m=Object.prototype.hasOwnProperty,g=Object.getPrototypeOf;t.exports=r=function(){var e,t=arguments[0];if(!(this instanceof r))throw TypeError("Constructor requires 'new'");return e=d&&n&&WeakMap!==r?n(new WeakMap,g(this)):this,i(t)&&(f(t)||(t=c(t))),p(e,"__weakMapData__",l("c","$weakMap$"+s())),t&&u(t,function(t){o(t),e.set(t[0],t[1])}),e},d&&(n&&n(r,WeakMap),r.prototype=Object.create(WeakMap.prototype,{constructor:l(r)})),Object.defineProperties(r.prototype,{delete:l(function(e){return!!m.call(a(e),this.__weakMapData__)&&(delete e[this.__weakMapData__],!0)}),get:l(function(e){if(m.call(a(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:l(function(e){return m.call(a(e),this.__weakMapData__)}),set:l(function(e,t){return p(a(e),this.__weakMapData__,l("c",t)),this}),toString:l(function(){return"[object WeakMap]"})}),p(r.prototype,h,l("c","WeakMap"))}}),gZ=p({"node_modules/es6-weak-map/index.js"(e,t){t.exports=mB()()?WeakMap:gY()}}),g$=p({"node_modules/array-find-index/index.js"(e,t){t.exports=function(e,t,r){if("function"==typeof Array.prototype.findIndex)return e.findIndex(t,r);if("function"!=typeof t)throw TypeError("predicate must be a function");var i=Object(e),n=i.length;if(0===n)return -1;for(var a=0;a"round"===t.join?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(e,t)=>!t.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},i=e(n({vert:p,frag:m,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r)),a;try{a=e(n({cull:{enable:!0,face:"back"},vert:v,frag:x,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch{a=i}return{fill:e({primitive:"triangle",elements:(e,t)=>t.triangles,offset:0,vert:g,frag:y,uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:i,miter:a}},b.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},b.prototype.render=function(...e){e.length&&this.update(...e),this.draw()},b.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((e,t)=>{if(e&&Array.isArray(e))return this.draw(...e);"number"==typeof e&&(e=this.passes[e]),e&&e.count>1&&e.opacity&&(this.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&this.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>b.precisionThreshold||e.scale[1]*e.viewport.height>b.precisionThreshold||"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=b.maxPoints)?this.shaders.rect(e):this.shaders.miter(e)))}),this},b.prototype.update=function(e){if(!e)return;null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:h}=this;if(e.forEach((e,p)=>{let m=this.passes[p];if(void 0!==e){if(null===e){this.passes[p]=null;return}if("number"==typeof e[0]&&(e={positions:e}),e=a(e,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),m||(this.passes[p]=m={id:p,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},e=n({},b.defaults,e)),null!=e.thickness&&(m.thickness=parseFloat(e.thickness)),null!=e.opacity&&(m.opacity=parseFloat(e.opacity)),null!=e.miterLimit&&(m.miterLimit=parseFloat(e.miterLimit)),null!=e.overlay&&(m.overlay=!!e.overlay,pe-t),t=[],n=0,a=null!=m.hole?m.hole[0]:null;if(null!=a){let t=f(e,e=>e>=a);(e=e.slice(0,t)).push(a)}for(let i=0;it-a+(e[i]-n)));o=o.map(t=>t+n+(t+n{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}}}),gK=p({"node_modules/regl-error2d/index.js"(e,t){var r=p7(),i=mL(),n=mz(),a=p6(),o=mR(),s=mt(),{float32:l,fract32:c}=mD();t.exports=function(e,t){if("function"==typeof e?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),!(e=t.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let h=e._gl,d,f,p,m,g,y,v={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return m=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),f=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),y=e.buffer({usage:"static",type:"float",data:u}),T(t),d=e({vert:` +`;function b(e,t){if(!(this instanceof b))return new b(e,t);if("function"==typeof e?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),!(e=t.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=b.shaders.has(e)?b.shaders.get(e):b.shaders.set(e,b.createShaders(e)).get(e),this.update(t)}t.exports=b,b.dashMult=2,b.maxPatternLength=256,b.precisionThreshold=3e6,b.maxPoints=1e4,b.maxLines=2048,b.shaders=new h,b.createShaders=function(e){let t=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),r={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(e,t)=>"round"===t.join?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(e,t)=>!t.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},i=e(n({vert:p,frag:m,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r)),a;try{a=e(n({cull:{enable:!0,face:"back"},vert:v,frag:x,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch{a=i}return{fill:e({primitive:"triangle",elements:(e,t)=>t.triangles,offset:0,vert:g,frag:y,uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:i,miter:a}},b.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},b.prototype.render=function(...e){e.length&&this.update(...e),this.draw()},b.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((e,t)=>{if(e&&Array.isArray(e))return this.draw(...e);"number"==typeof e&&(e=this.passes[e]),e&&e.count>1&&e.opacity&&(this.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&this.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>b.precisionThreshold||e.scale[1]*e.viewport.height>b.precisionThreshold||"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=b.maxPoints)?this.shaders.rect(e):this.shaders.miter(e)))}),this},b.prototype.update=function(e){if(!e)return;null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:h}=this;if(e.forEach((e,p)=>{let m=this.passes[p];if(void 0!==e){if(null===e){this.passes[p]=null;return}if("number"==typeof e[0]&&(e={positions:e}),e=a(e,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),m||(this.passes[p]=m={id:p,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},e=n({},b.defaults,e)),null!=e.thickness&&(m.thickness=parseFloat(e.thickness)),null!=e.opacity&&(m.opacity=parseFloat(e.opacity)),null!=e.miterLimit&&(m.miterLimit=parseFloat(e.miterLimit)),null!=e.overlay&&(m.overlay=!!e.overlay,pe-t),t=[],n=0,a=null!=m.hole?m.hole[0]:null;if(null!=a){let t=f(e,e=>e>=a);(e=e.slice(0,t)).push(a)}for(let i=0;it-a+(e[i]-n)));o=o.map(t=>t+n+(t+n{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}}}),gK=p({"node_modules/regl-error2d/index.js"(e,t){var r=p9(),i=mL(),n=mz(),a=p6(),o=mR(),s=mt(),{float32:l,fract32:c}=mD();t.exports=function(e,t){if("function"==typeof e?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),!(e=t.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let h=e._gl,d,f,p,m,g,y,v={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return m=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),f=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),y=e.buffer({usage:"static",type:"float",data:u}),T(t),d=e({vert:` precision highp float; attribute vec2 position, positionFract; @@ -2615,10 +2615,10 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } - `,uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]},attributes:{color:{buffer:m,offset:(e,t)=>4*t.offset,divisor:1},position:{buffer:f,offset:(e,t)=>8*t.offset,divisor:1},positionFract:{buffer:p,offset:(e,t)=>8*t.offset,divisor:1},error:{buffer:g,offset:(e,t)=>16*t.offset,divisor:1},direction:{buffer:y,stride:24,offset:0},lineOffset:{buffer:y,stride:24,offset:8},capOffset:{buffer:y,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:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:u.length}),o(b,{update:T,draw:_,destroy:M,regl:e,gl:h,canvas:h.canvas,groups:x}),b;function b(e){e?T(e):null===e&&M(),_()}function _(t){if("number"==typeof t)return w(t);t&&!Array.isArray(t)&&(t=[t]),e._refresh(),x.forEach((e,r)=>{if(e){if(t&&(t[r]?e.draw=!0:e.draw=!1),!e.draw){e.draw=!0;return}w(r)}})}function w(e){"number"==typeof e&&(e=x[e]),null!=e&&e&&e.count&&e.color&&e.opacity&&e.positions&&e.positions.length>1&&(e.scaleRatio=[e.scale[0]*e.viewport.width,e.scale[1]*e.viewport.height],d(e),e.after&&e.after(e))}function T(e){if(!e)return;null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let t=0,u=0;if(b.groups=x=e.map((e,l)=>{let d=x[l];return e&&("function"==typeof e?e={after:e}:"number"==typeof e[0]&&(e={positions:e}),e=a(e,{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"}),d||(x[l]=d={id:l,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},e=o({},v,e)),n(d,e,[{lineWidth:e=>.5*e,capSize:e=>.5*e,opacity:parseFloat,errors:e=>(e=s(e),u+=e.length,e),positions:(e,i)=>(i.count=Math.floor((e=s(e,"float64")).length/2),i.bounds=r(e,2),i.offset=t,t+=i.count,e)},{color:(e,t)=>{let r=t.count;if(e||(e="transparent"),!Array.isArray(e)||"number"==typeof e[0]){let t=e;e=Array(r);for(let i=0;i{let i=t.bounds;return e||(e=i),t.scale=[1/(e[2]-e[0]),1/(e[3]-e[1])],t.translate=[-e[0],-e[1]],t.scaleFract=c(t.scale),t.translateFract=c(t.translate),e},viewport:e=>{let t;return Array.isArray(e)?t={x:e[0],y:e[1],width:e[2]-e[0],height:e[3]-e[1]}:e?(t={x:e.x||e.left||0,y:e.y||e.top||0},e.right?t.width=e.right-t.x:t.width=e.w||e.width||0,e.bottom?t.height=e.bottom-t.y:t.height=e.h||e.height||0):t={x:0,y:0,width:h.drawingBufferWidth,height:h.drawingBufferHeight},t}}])),d}),t||u){let e=x.reduce((e,t,r)=>e+(t?t.count:0),0),t=new Float64Array(2*e),r=new Uint8Array(4*e),i=new Float32Array(4*e);x.forEach((e,n)=>{if(!e)return;let{positions:a,count:o,offset:s,color:l,errors:c}=e;o&&(r.set(l,4*s),i.set(c,4*s),t.set(a,2*s))});var d=l(t);f(d),p(c(t,d)),m(r),g(i)}}function M(){f.destroy(),p.destroy(),m.destroy(),g.destroy(),y.destroy()}};var u=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]]}}),gJ=p({"node_modules/unquote/index.js"(e,t){var r=/[\'\"]/;t.exports=function(e){return e?(r.test(e.charAt(0))&&(e=e.substr(1)),r.test(e.charAt(e.length-1))&&(e=e.substr(0,e.length-1)),e):""}}}),gQ=p({"node_modules/css-global-keywords/index.json"(e,t){t.exports=["inherit","initial","unset"]}}),g0=p({"node_modules/css-system-font-keywords/index.json"(e,t){t.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),g1=p({"node_modules/css-font-weight-keywords/index.json"(e,t){t.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),g2=p({"node_modules/css-font-style-keywords/index.json"(e,t){t.exports=["normal","italic","oblique"]}}),g3=p({"node_modules/css-font-stretch-keywords/index.json"(e,t){t.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),g5=p({"node_modules/parenthesis/index.js"(e,t){function r(e,t){if("string"!=typeof e)return[e];var r=[e];"string"==typeof t||Array.isArray(t)?t={brackets:t}:t||(t={});var i=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],n=t.escape||"___",a=!!t.flat;i.forEach(function(e){var t=new RegExp(["\\",e[0],"[^\\",e[0],"\\",e[1],"]*\\",e[1]].join("")),i=[];function a(t,a,o){var s=r.push(t.slice(e[0].length,-e[1].length))-1;return i.push(s),n+s+n}r.forEach(function(e,i){for(var n,o=0;e!=n;)if(n=e,e=e.replace(t,a),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[i]=e}),i=i.reverse(),r=r.map(function(t){return i.forEach(function(r){t=t.replace(RegExp("(\\"+n+r+"\\"+n+")","g"),e[0]+"$1"+e[1])}),t})});var o=RegExp("\\"+n+"([0-9]+)\\"+n);return a?r:function e(t,r,i){for(var n,a=[],s=0;n=o.exec(t);){if(s++>1e4)throw Error("Circular references in parenthesis");a.push(t.slice(0,n.index)),a.push(e(r[n[1]],r)),t=t.slice(n.index+n[0].length)}return a.push(t),a}(r[0],r)}function i(e,t){if(t&&t.flat){var r,i=t&&t.escape||"___",n=e[0];if(!n)return"";for(var a=RegExp("\\"+i+"([0-9]+)\\"+i),o=0;n!=r;){if(o++>1e4)throw Error("Circular references in "+e);r=n,n=n.replace(a,s)}return n}return e.reduce(function e(t,r){return Array.isArray(r)&&(r=r.reduce(e,"")),t+r},"");function s(t,r){if(null==e[r])throw Error("Reference "+r+"is undefined");return e[r]}}function n(e,t){return Array.isArray(e)?i(e,t):r(e,t)}n.parse=r,n.stringify=i,t.exports=n}}),g4=p({"node_modules/string-split-by/index.js"(e,t){var r=g5();t.exports=function(e,t,i){if(null==e)throw Error("First argument should be a string");if(null==t)throw Error("Separator should be a string or a RegExp");i?("string"==typeof i||Array.isArray(i))&&(i={ignore:i}):i={},null==i.escape&&(i.escape=!0),null==i.ignore?i.ignore=["[]","()","{}","<>",'""',"''","``","“”","\xab\xbb"]:("string"==typeof i.ignore&&(i.ignore=[i.ignore]),i.ignore=i.ignore.map(function(e){return 1===e.length&&(e+=e),e}));var n=r.parse(e,{flat:!0,brackets:i.ignore}),a=n[0].split(t);if(i.escape){for(var o=[],s=0;s1&&r===n&&('"'===r||"'"===r))return['"'+i(t.substr(1,t.length-2))+'"'];var a=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(t);if(a)return e(t.substr(0,a.index)).concat(e(a[1])).concat(e(t.substr(a.index+a[0].length)));var o=t.split(".");if(1===o.length)return['"'+i(t)+'"'];for(var s=[],l=0;ltypeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date};function c(e){return"string"==typeof e?e.split():e}function u(e){return"string"==typeof e?document.querySelector(e):e}function h(e,t){for(var r=Array(e),i=0;i65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1}function f(){var e=h(8,function(){return[]});function t(t){var r=function(e){for(var t=16;t<=0x10000000;t*=16)if(e<=t)return t;return 0}(t),i=e[d(r)>>2];return i.length>0?i.pop():new ArrayBuffer(r)}function r(t){e[d(t.byteLength)>>2].push(t)}return{alloc:t,free:r,allocType:function(e,r){var i=null;switch(e){case 5120:i=new Int8Array(t(r),0,r);break;case 5121:i=new Uint8Array(t(r),0,r);break;case 5122:i=new Int16Array(t(2*r),0,r);break;case 5123:i=new Uint16Array(t(2*r),0,r);break;case 5124:i=new Int32Array(t(4*r),0,r);break;case 5125:i=new Uint32Array(t(4*r),0,r);break;case 5126:i=new Float32Array(t(4*r),0,r);break;default:return null}return i.length!==r?i.subarray(0,r):i},freeType:function(e){r(e.buffer)}}}var p=f();p.zero=f();var m=function(e,t){var r=1;t.ext_texture_filter_anisotropic&&(r=e.getParameter(34047));var i=1,n=1;t.webgl_draw_buffers&&(i=e.getParameter(34852),n=e.getParameter(36063));var a=!!t.oes_texture_float;if(a){var o=e.createTexture();e.bindTexture(3553,o),e.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var s=e.createFramebuffer();if(e.bindFramebuffer(36160,s),e.framebufferTexture2D(36160,36064,3553,o,0),e.bindTexture(3553,null),36053!==e.checkFramebufferStatus(36160))a=!1;else{e.viewport(0,0,1,1),e.clearColor(1,0,0,1),e.clear(16384);var l=p.allocType(5126,4);e.readPixels(0,0,1,1,6408,5126,l),e.getError()?a=!1:(e.deleteFramebuffer(s),e.deleteTexture(o),a=1===l[0]),p.freeType(l)}}var c="u">typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),u=!0;if(!c){var h=e.createTexture(),d=p.allocType(5121,36);e.activeTexture(33984),e.bindTexture(34067,h),e.texImage2D(34069,0,6408,3,3,0,6408,5121,d),p.freeType(d),e.bindTexture(34067,null),e.deleteTexture(h),u=!e.getError()}return{colorBits:[e.getParameter(3410),e.getParameter(3411),e.getParameter(3412),e.getParameter(3413)],depthBits:e.getParameter(3414),stencilBits:e.getParameter(3415),subpixelBits:e.getParameter(3408),extensions:Object.keys(t).filter(function(e){return!!t[e]}),maxAnisotropic:r,maxDrawbuffers:i,maxColorAttachments:n,pointSizeDims:e.getParameter(33901),lineWidthDims:e.getParameter(33902),maxViewportDims:e.getParameter(3386),maxCombinedTextureUnits:e.getParameter(35661),maxCubeMapSize:e.getParameter(34076),maxRenderbufferSize:e.getParameter(34024),maxTextureUnits:e.getParameter(34930),maxTextureSize:e.getParameter(3379),maxAttributes:e.getParameter(34921),maxVertexUniforms:e.getParameter(36347),maxVertexTextureUnits:e.getParameter(35660),maxVaryingVectors:e.getParameter(36348),maxFragmentUniforms:e.getParameter(36349),glsl:e.getParameter(35724),renderer:e.getParameter(7937),vendor:e.getParameter(7936),version:e.getParameter(7938),readFloat:a,npotTextureCube:u}},g=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray};function y(e){return!!e&&"object"==typeof e&&Array.isArray(e.shape)&&Array.isArray(e.stride)&&"number"==typeof e.offset&&e.shape.length===e.stride.length&&(Array.isArray(e.data)||g(e.data))}var v=function(e){return Object.keys(e).map(function(t){return e[t]})},x=function(e){for(var t=[],r=e;r.length;r=r[0])t.push(r.length);return t},b=function(e,t,r,i){var n=1;if(t.length)for(var a=0;a>>31<<15,a=(i<<1>>>24)-127,o=i>>13&1023;if(a<-24)t[r]=n;else if(a<-14){var s=-14-a;t[r]=n+(o+1024>>s)}else a>15?t[r]=n+31744:t[r]=n+(a+15<<10)+o}return t}function z(e){return Array.isArray(e)||g(e)}var D=[9984,9986,9985,9987],O=[0,6409,6410,6407,6408],R={};function F(e){return"[object "+e+"]"}R[6409]=R[6406]=R[6402]=1,R[34041]=R[6410]=2,R[6407]=R[35904]=3,R[6408]=R[35906]=4;var j=F("HTMLCanvasElement"),B=F("OffscreenCanvas"),N=F("CanvasRenderingContext2D"),U=F("ImageBitmap"),V=F("HTMLImageElement"),q=F("HTMLVideoElement"),H=Object.keys(w).concat([j,B,N,U,V,q]),G=[];G[5121]=1,G[5126]=4,G[36193]=2,G[5123]=2,G[5125]=4;var W=[];function Y(e){return Array.isArray(e)&&(0===e.length||"number"==typeof e[0])}function Z(e){return!!Array.isArray(e)&&!(0===e.length||!z(e[0]))}function $(e){return Object.prototype.toString.call(e)}function X(e){if(!e)return!1;var t=$(e);return H.indexOf(t)>=0||Y(e)||Z(e)||y(e)}function K(e){return 0|w[Object.prototype.toString.call(e)]}function J(e,t){return p.allocType(36193===e.type?5126:e.type,t)}function Q(e,t){36193===e.type?(e.data=I(t),p.freeType(t)):e.data=t}function ee(e,t,r,i,n,a){var o;if(o="u">typeof W[e]?W[e]:R[e]*G[t],a&&(o*=6),!n)return o*r*i;for(var s=0,l=r;l>=1;)s+=o*l*l,l/=2;return s}W[32854]=2,W[32855]=2,W[36194]=2,W[34041]=4,W[33776]=.5,W[33777]=.5,W[33778]=1,W[33779]=1,W[35986]=.5,W[35987]=1,W[34798]=1,W[35840]=.5,W[35841]=.25,W[35842]=.5,W[35843]=.25,W[36196]=.5;var et=[];et[32854]=2,et[32855]=2,et[36194]=2,et[33189]=2,et[36168]=1,et[34041]=4,et[35907]=4,et[34836]=16,et[34842]=8,et[34843]=6;var er=function(e,t,r,i,n){var a={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};t.ext_srgb&&(a.srgba=35907),t.ext_color_buffer_half_float&&(a.rgba16f=34842,a.rgb16f=34843),t.webgl_color_buffer_float&&(a.rgba32f=34836);var o=[];Object.keys(a).forEach(function(e){o[a[e]]=e});var s=0,l={};function c(e){this.id=s++,this.refCount=1,this.renderbuffer=e,this.format=32854,this.width=0,this.height=0,n.profile&&(this.stats={size:0})}function u(t){var r=t.renderbuffer;e.bindRenderbuffer(36161,null),e.deleteRenderbuffer(r),t.renderbuffer=null,t.refCount=0,delete l[t.id],i.renderbufferCount--}return c.prototype.decRef=function(){--this.refCount<=0&&u(this)},n.profile&&(i.getTotalRenderbufferSize=function(){var e=0;return Object.keys(l).forEach(function(t){e+=l[t].stats.size}),e}),{create:function(t,r){var s=new c(e.createRenderbuffer());function u(t,r){var i,l,c,h=0,d=0,f=32854;if("object"==typeof t&&t){if("shape"in t){var p=t.shape;h=0|p[0],d=0|p[1]}else"radius"in t&&(h=d=0|t.radius),"width"in t&&(h=0|t.width),"height"in t&&(d=0|t.height);"format"in t&&(f=a[t.format])}else"number"==typeof t?(h=0|t,d="number"==typeof r?0|r:h):t||(h=d=1);if(h!==s.width||d!==s.height||f!==s.format)return u.width=s.width=h,u.height=s.height=d,s.format=f,e.bindRenderbuffer(36161,s.renderbuffer),e.renderbufferStorage(36161,f,h,d),n.profile&&(s.stats.size=(i=s.format,l=s.width,c=s.height,et[i]*l*c)),u.format=o[s.format],u}return l[s.id]=s,i.renderbufferCount++,u(t,r),u.resize=function(t,r){var i,a,o,l=0|t,c=0|r||l;return l===s.width&&c===s.height||(u.width=s.width=l,u.height=s.height=c,e.bindRenderbuffer(36161,s.renderbuffer),e.renderbufferStorage(36161,s.format,l,c),n.profile&&(s.stats.size=(i=s.format,a=s.width,o=s.height,et[i]*a*o))),u},u._reglType="renderbuffer",u._renderbuffer=s,n.profile&&(u.stats=s.stats),u.destroy=function(){s.decRef()},u},clear:function(){v(l).forEach(u)},restore:function(){v(l).forEach(function(t){t.renderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,t.renderbuffer),e.renderbufferStorage(36161,t.format,t.width,t.height)}),e.bindRenderbuffer(36161,null)}}},ei=[];ei[6408]=4,ei[6407]=3;var en=[];function ea(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.offset=0,this.stride=0,this.divisor=0}function eo(e,t){return e>>>t|e<<32-t}en[5121]=1,en[5126]=4,en[36193]=2;var es=[0x428a2f98,0x71374491,-0x4a3f0431,-0x164a245b,0x3956c25b,0x59f111f1,-0x6dc07d5c,-0x54e3a12b,-0x27f85568,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,-0x7f214e02,-0x6423f959,-0x3e640e8c,-0x1b64963f,-0x1041b87a,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,-0x67c1aeae,-0x57ce3993,-0x4ffcd838,-0x40a68039,-0x391ff40d,-0x2a586eb9,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,-0x7e3d36d2,-0x6d8dd37b,-0x5d40175f,-0x57e599b5,-0x3db47490,-0x3893ae5d,-0x2e6d17e7,-0x2966f9dc,-0xbf1ca7b,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,-0x7b3787ec,-0x7338fdf8,-0x6f410006,-0x5baf9315,-0x41065c09,-0x398e870e];function el(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function ec(e){return Array.prototype.slice.call(e)}function eu(e){return ec(e).join("")}var eh="xyzw".split(""),ed="dither",ef="blend.enable",ep="blend.color",em="blend.equation",eg="blend.func",ey="depth.enable",ev="depth.func",ex="depth.range",eb="depth.mask",e_="colorMask",ew="cull.enable",eT="cull.face",eM="frontFace",ek="lineWidth",eA="polygonOffset.enable",eS="polygonOffset.offset",eE="sample.alpha",eC="sample.enable",eL="sample.coverage",eP="stencil.enable",eI="stencil.mask",ez="stencil.func",eD="stencil.opFront",eO="stencil.opBack",eR="scissor.enable",eF="scissor.box",ej="viewport",eB="profile",eN="framebuffer",eU="vert",eV="frag",eq="elements",eH="primitive",eG="count",eW="offset",eY="instances",eZ="Width",e$="Height",eX=eN+eZ,eK=eN+e$,eJ=ej+eZ,eQ=ej+e$,e0="drawingBuffer",e1=e0+eZ,e2=e0+e$,e3=[eg,em,ez,eD,eO,eL,ej,eF,eS],e5={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},e4={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},e6={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},e8={cw:2304,ccw:2305};function e7(e){return Array.isArray(e)||g(e)||y(e)}function e9(e){return e.sort(function(e,t){return e===ej?-1:t===ej?1:e=1,i>=2,t)}if(4===r){var n=e.data;return new te(n.thisDep,n.contextDep,n.propDep,t)}if(5===r)return new te(!1,!1,!1,t);if(6!==r)return new te(3===r,2===r,1===r,t);for(var a=!1,o=!1,s=!1,l=0;l=1&&(o=!0),u>=2&&(s=!0)}else 4===c.type&&(a=a||c.data.thisDep,o=o||c.data.contextDep,s=s||c.data.propDep)}return new te(a,o,s,t)}var tn=new te(!1,!1,!1,function(){}),ta=function(e,t){if(!t.ext_disjoint_timer_query)return null;var r=[],i=[];function n(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var a=[],o=[];function s(e,t,r){var i=a.pop()||new n;i.startQueryIndex=e,i.endQueryIndex=t,i.sum=0,i.stats=r,o.push(i)}var l=[],c=[];return{beginQuery:function(e){var n=r.pop()||t.ext_disjoint_timer_query.createQueryEXT();t.ext_disjoint_timer_query.beginQueryEXT(35007,n),i.push(n),s(i.length-1,i.length,e)},endQuery:function(){t.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:s,update:function(){var e,n,s=i.length;if(0!==s){c.length=Math.max(c.length,s+1),l.length=Math.max(l.length,s+1),l[0]=0,c[0]=0;var u=0;for(e=0,n=0;n"u"?1:window.devicePixelRatio,f=!1,p={},m=function(e){},g=function(){};if("string"==typeof o?r=document.querySelector(o):"object"==typeof o&&("string"==typeof o.nodeName&&"function"==typeof o.appendChild&&"function"==typeof o.getBoundingClientRect?r=o:"function"==typeof o.drawArrays||"function"==typeof o.drawElements?n=(a=o).canvas:("gl"in o?a=o.gl:"canvas"in o?n=u(o.canvas):"container"in o&&(i=u(o.container)),"attributes"in o&&(s=o.attributes),"extensions"in o&&(l=c(o.extensions)),"optionalExtensions"in o&&(h=c(o.optionalExtensions)),"onDone"in o&&(m=o.onDone),"profile"in o&&(f=!!o.profile),"pixelRatio"in o&&(d=+o.pixelRatio),"cachedCode"in o&&(p=o.cachedCode))),r&&("canvas"===r.nodeName.toLowerCase()?n=r:i=r),!a){if(!n){var y=function(t,r){var i,n=document.createElement("canvas");function a(){var e=window.innerWidth,i=window.innerHeight;if(t!==document.body){var a=n.getBoundingClientRect();e=a.right-a.left,i=a.bottom-a.top}n.width=r*e,n.height=r*i}return e(n.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),t.appendChild(n),t===document.body&&(n.style.position="absolute",e(t.style,{margin:0,padding:0})),t!==document.body&&"function"==typeof ResizeObserver?(i=new ResizeObserver(function(){setTimeout(a)})).observe(t):window.addEventListener("resize",a,!1),a(),{canvas:n,onDestroy:function(){i?i.disconnect():window.removeEventListener("resize",a),t.removeChild(n)}}}(i||document.body,d);if(!y)return null;n=y.canvas,g=y.onDestroy}void 0===s.premultipliedAlpha&&(s.premultipliedAlpha=!0),a=function(e,t){function r(r){try{return e.getContext(r,t)}catch{return null}}return r("webgl")||r("experimental-webgl")||r("webgl-experimental")}(n,s)}return a?{gl:a,canvas:n,container:i,extensions:l,optionalExtensions:h,pixelRatio:d,profile:f,cachedCode:p,onDone:m,onDestroy:g}:(g(),m("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}(t);if(!f)return null;var _=f.gl,w=_.getContextAttributes(),L=(_.isContextLost(),function(e,t){var r={};function i(t){var i,n=t.toLowerCase();try{i=r[n]=e.getExtension(n)}catch{}return!!i}for(var n=0;n0)if(Array.isArray(t[0])){o=x(t);for(var o,s,c=1,u=1;u0){if("number"==typeof e[0]){var n=p.allocType(h.dtype,e.length);S(n,e),f(n,i),p.freeType(n)}else if(Array.isArray(e[0])||g(e[0])){r=x(e);var a=b(e,r,h.dtype);f(a,i),p.freeType(a)}}}else if(y(e)){r=e.shape;var o=e.stride,s=0,l=0,c=0,u=0;1===r.length?(s=r[0],l=1,c=o[0],u=0):2===r.length&&(s=r[0],l=r[1],c=o[0],u=o[1]);var m=Array.isArray(e.data)?h.dtype:A(e.data),v=p.allocType(m,s*l);E(v,e.data,s,l,c,u,e.offset),f(v,i),p.freeType(v)}return d},r.profile&&(d.stats=h.stats),d.destroy=function(){u(h)},d},createStream:function(e,t){var r=s.pop();return r||(r=new o(e)),r.bind(),c(r,t,35040,0,1,!1),r},destroyStream:function(e){s.push(e)},clear:function(){v(a).forEach(u),s.forEach(u)},getBuffer:function(e){return e&&e._buffer instanceof o?e._buffer:null},restore:function(){v(a).forEach(function(t){t.buffer=e.createBuffer(),e.bindBuffer(t.type,t.buffer),e.bufferData(t.type,t.persistentData||t.byteLength,t.usage)})},_initBuffer:c}}(_,F,f,function(e){return tf.destroyBuffer(e)}),td=function(e,t,r,i){var n={},a=0,o={uint8:5121,uint16:5123};function s(e){this.id=a++,n[this.id]=this,this.buffer=e,this.primType=4,this.vertCount=0,this.type=0}t.oes_element_index_uint&&(o.uint32=5125),s.prototype.bind=function(){this.buffer.bind()};var l=[];function c(i,n,a,o,s,l,c){if(i.buffer.bind(),n){var u,h=c;!c&&(!g(n)||y(n)&&!g(n.data))&&(h=t.oes_element_index_uint?5125:5123),r._initBuffer(i.buffer,n,a,h,3)}else e.bufferData(34963,l,a),i.buffer.dtype=u||5121,i.buffer.usage=a,i.buffer.dimension=3,i.buffer.byteLength=l;if(u=c,!c){switch(i.buffer.dtype){case 5121:case 5120:u=5121;break;case 5123:case 5122:u=5123;break;case 5125:case 5124:u=5125}i.buffer.dtype=u}i.type=u;var d=s;d<0&&(d=i.buffer.byteLength,5123===u?d>>=1:5125===u&&(d>>=2)),i.vertCount=d;var f=o;if(o<0){f=4;var p=i.buffer.dimension;1===p&&(f=0),2===p&&(f=1),3===p&&(f=4)}i.primType=f}function u(e){i.elementsCount--,delete n[e.id],e.buffer.destroy(),e.buffer=null}return{create:function(e,t){var n=r.create(null,34963,!0),a=new s(n._buffer);function l(e){if(e)if("number"==typeof e)n(e),a.primType=4,a.vertCount=0|e,a.type=5121;else{var t=null,r=35044,i=-1,s=-1,u=0,h=0;Array.isArray(e)||g(e)||y(e)?t=e:("data"in e&&(t=e.data),"usage"in e&&(r=M[e.usage]),"primitive"in e&&(i=C[e.primitive]),"count"in e&&(s=0|e.count),"type"in e&&(h=o[e.type]),"length"in e?u=0|e.length:(u=s,5123===h||5122===h?u*=2:(5125===h||5124===h)&&(u*=4))),c(a,t,r,i,s,u,h)}else n(),a.primType=4,a.vertCount=0,a.type=5121;return l}return i.elementsCount++,l(e),l._reglType="elements",l._elements=a,l.subdata=function(e,t){return n.subdata(e,t),l},l.destroy=function(){u(a)},l},createStream:function(e){var t=l.pop();return t||(t=new s(r.create(null,34963,!0,!1)._buffer)),c(t,e,35040,-1,-1,0,0),t},destroyStream:function(e){l.push(e)},getElements:function(e){return"function"==typeof e&&e._elements instanceof s?e._elements:null},clear:function(){v(n).forEach(u)}}}(_,G,th,F),tf=function(e,t,r,i,n,a,o){for(var s=r.maxAttributes,l=Array(s),c=0;c=f.byteLength?u.subdata(f):(u.destroy(),t.buffers[l]=null)),t.buffers[l]||(u=t.buffers[l]=n.create(h,34962,!1,!0)),d.buffer=n.getBuffer(u),d.size=0|d.buffer.dimension,d.normalized=!1,d.type=d.buffer.dtype,d.offset=0,d.stride=0,d.divisor=0,d.state=1,o[l]=1):n.getBuffer(h)?(d.buffer=n.getBuffer(h),d.size=0|d.buffer.dimension,d.normalized=!1,d.type=d.buffer.dtype,d.offset=0,d.stride=0,d.divisor=0,d.state=1):n.getBuffer(h.buffer)?(d.buffer=n.getBuffer(h.buffer),d.size=0|(+h.size||d.buffer.dimension),d.normalized=!!h.normalized,"type"in h?d.type=T[h.type]:d.type=d.buffer.dtype,d.offset=0|(h.offset||0),d.stride=0|(h.stride||0),d.divisor=0|(h.divisor||0),d.state=1):"x"in h&&(d.x=+h.x||0,d.y=+h.y||0,d.z=+h.z||0,d.w=+h.w||0,d.state=2)}for(var p=0;p1)for(var y=0;ye&&(e=t.stats.uniformsCount)}),e},i.getMaxAttributesCount=function(){var e=0;return h.forEach(function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)}),e}),{clear:function(){var e=t.deleteShader.bind(t);v(a).forEach(e),a={},v(o).forEach(e),o={},h.forEach(function(e){t.deleteProgram(e.program)}),h.length=0,u={},i.shaderCount=0},program:function(r,n,s,l){var c=u[n];c||(c=u[n]={});var d=c[r];if(d&&(d.refCount++,!l))return d;var m=new f(n,r);return i.shaderCount++,p(m,s,l),d||(c[r]=m),h.push(m),e(m,{destroy:function(){if(m.refCount--,m.refCount<=0){t.deleteProgram(m.program);var e=h.indexOf(m);h.splice(e,1),i.shaderCount--}c[m.vertId].refCount<=0&&(t.deleteShader(o[m.vertId]),delete o[m.vertId],delete u[m.fragId][m.vertId]),Object.keys(u[m.fragId]).length||(t.deleteShader(a[m.fragId]),delete a[m.fragId],delete u[m.fragId])}})},restore:function(){a={},o={};for(var e=0;e=0&&(m[e]=t)});var T=Object.keys(m);i.textureFormats=T;var M=[];Object.keys(m).forEach(function(e){M[m[e]]=e});var k=[];Object.keys(f).forEach(function(e){k[f[e]]=e});var A=[];Object.keys(u).forEach(function(e){A[u[e]]=e});var S=[];Object.keys(h).forEach(function(e){S[h[e]]=e});var E=[];Object.keys(c).forEach(function(e){E[c[e]]=e});var C=T.reduce(function(e,t){var i=m[t];return 6409===i||6406===i||6409===i||6410===i||6402===i||34041===i||r.ext_srgb&&(35904===i||35906===i)?e[i]=i:32855===i||t.indexOf("rgba")>=0?e[i]=6408:e[i]=6407,e},{});function L(){this.internalformat=6408,this.format=6408,this.type=5121,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=37444,this.width=0,this.height=0,this.channels=0}function P(e,t){e.internalformat=t.internalformat,e.format=t.format,e.type=t.type,e.compressed=t.compressed,e.premultiplyAlpha=t.premultiplyAlpha,e.flipY=t.flipY,e.unpackAlignment=t.unpackAlignment,e.colorSpace=t.colorSpace,e.width=t.width,e.height=t.height,e.channels=t.channels}function F(e,t){if(!("object"!=typeof t||!t)){"premultiplyAlpha"in t&&(e.premultiplyAlpha=t.premultiplyAlpha),"flipY"in t&&(e.flipY=t.flipY),"alignment"in t&&(e.unpackAlignment=t.alignment),"colorSpace"in t&&(e.colorSpace=d[t.colorSpace]),"type"in t&&(e.type=f[t.type]);var r=e.width,i=e.height,n=e.channels,a=!1;"shape"in t?(r=t.shape[0],i=t.shape[1],3===t.shape.length&&(n=t.shape[2],a=!0)):("radius"in t&&(r=i=t.radius),"width"in t&&(r=t.width),"height"in t&&(i=t.height),"channels"in t&&(n=t.channels,a=!0)),e.width=0|r,e.height=0|i,e.channels=0|n;var o=!1;if("format"in t){var s=t.format,l=e.internalformat=m[s];e.format=C[l],s in f&&("type"in t||(e.type=f[s])),s in _&&(e.compressed=!0),o=!0}!a&&o?e.channels=R[e.format]:a&&!o&&e.channels!==O[e.format]&&(e.format=e.internalformat=O[e.channels])}}function H(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function G(){L.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function W(e,t){var r=null;if(X(t)?r=t:t&&(F(e,t),"x"in t&&(e.xOffset=0|t.x),"y"in t&&(e.yOffset=0|t.y),X(t.data)&&(r=t.data)),t.copy){var i=a.viewportWidth,n=a.viewportHeight;e.width=e.width||i-e.xOffset,e.height=e.height||n-e.yOffset,e.needsCopy=!0}else if(r){if(g(r))e.channels=e.channels||4,e.data=r,"type"in t||5121!==e.type||(e.type=K(r));else if(Y(r))e.channels=e.channels||4,function(e,t){var r=t.length;switch(e.type){case 5121:case 5123:case 5125:case 5126:var i=p.allocType(e.type,r);i.set(t),e.data=i;break;case 36193:e.data=I(t)}}(e,r),e.alignment=1,e.needsFree=!0;else if(y(r)){var o=r.data;Array.isArray(o)||5121!==e.type||(e.type=K(o));var s,l,c,u,h,d,f=r.shape,m=r.stride;3===f.length?(c=f[2],d=m[2]):(c=1,d=1),s=f[0],l=f[1],u=m[0],h=m[1],e.alignment=1,e.width=s,e.height=l,e.channels=c,e.format=e.internalformat=O[c],e.needsFree=!0,function(e,t,r,i,n,a){for(var o=e.width,s=e.height,l=e.channels,c=J(e,o*s*l),u=0,h=0;h>=n,r.height>>=n,W(r,i[n]),e.mipmask|=1<=0)||"faces"in t||(e.genMipmaps=!0)),"mag"in t&&(e.magFilter=u[t.mag]);var r=e.wrapS,i=e.wrapT;if("wrap"in t){var n=t.wrap;"string"==typeof n?r=i=c[n]:Array.isArray(n)&&(r=c[n[0]],i=c[n[1]])}else"wrapS"in t&&(r=c[t.wrapS]),"wrapT"in t&&(i=c[t.wrapT]);if(e.wrapS=r,e.wrapT=i,"anisotropic"in t&&(t.anisotropic,e.anisotropic=t.anisotropic),"mipmap"in t){var a=!1;switch(typeof t.mipmap){case"string":e.mipmapHint=l[t.mipmap],e.genMipmaps=!0,a=!0;break;case"boolean":a=e.genMipmaps=t.mipmap;break;case"object":e.genMipmaps=!1,a=!0}!a||"min"in t||(e.minFilter=9984)}}function ep(e,i){t.texParameteri(i,10241,e.minFilter),t.texParameteri(i,10240,e.magFilter),t.texParameteri(i,10242,e.wrapS),t.texParameteri(i,10243,e.wrapT),r.ext_texture_filter_anisotropic&&t.texParameteri(i,34046,e.anisotropic),e.genMipmaps&&(t.hint(33170,e.mipmapHint),t.generateMipmap(i))}var em=0,eg={},ey=i.maxTextureUnits,ev=Array(ey).map(function(){return null});function ex(e){L.call(this),this.mipmask=0,this.internalformat=6408,this.id=em++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new ed,s.profile&&(this.stats={size:0})}function eb(e){t.activeTexture(33984),t.bindTexture(e.target,e.texture)}function e_(){var e=ev[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(3553,null)}function ew(e){var r=e.texture,i=e.unit,n=e.target;i>=0&&(t.activeTexture(33984+i),t.bindTexture(n,null),ev[i]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete eg[e.id],o.textureCount--}return e(ex.prototype,{bind:function(){this.bindCount+=1;var e=this.unit;if(e<0){for(var r=0;r0)continue;i.unit=-1}ev[r]=this,e=r;break}s.profile&&o.maxTextureUnits>l)-o,c.height=c.height||(i.height>>l)-s,eb(i),et(c,3553,o,s,l),e_(),en(c),n},n.resize=function(e,r){var a=0|e,o=0|r||a;if(a===i.width&&o===i.height)return n;n.width=i.width=a,n.height=i.height=o,eb(i);for(var l=0;i.mipmask>>l;++l){var c=a>>l,u=o>>l;if(!c||!u)break;t.texImage2D(3553,l,i.format,c,u,0,i.format,i.type,null)}return e_(),s.profile&&(i.stats.size=ee(i.internalformat,i.type,a,o,!1,!1)),n},n._reglType="texture2d",n._texture=i,s.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,i,n,a,l){var c=new ex(34067);eg[c.id]=c,o.cubeCount++;var u=Array(6);function h(e,t,r,i,n,a){var o,l=c.texInfo;for(ed.call(l),o=0;o<6;++o)u[o]=eu();if("number"!=typeof e&&e){if("object"==typeof e)if(t)es(u[0],e),es(u[1],t),es(u[2],r),es(u[3],i),es(u[4],n),es(u[5],a);else if(ef(l,e),F(c,e),"faces"in e){var d=e.faces;for(o=0;o<6;++o)P(u[o],c),es(u[o],d[o])}else for(o=0;o<6;++o)es(u[o],e)}else{var f=0|e||1;for(o=0;o<6;++o)eo(u[o],f,f)}for(P(c,u[0]),l.genMipmaps?c.mipmask=(u[0].width<<1)-1:c.mipmask=u[0].mipmask,c.internalformat=u[0].internalformat,h.width=u[0].width,h.height=u[0].height,eb(c),o=0;o<6;++o)el(u[o],34069+o);for(ep(l,34067),e_(),s.profile&&(c.stats.size=ee(c.internalformat,c.type,h.width,h.height,l.genMipmaps,!0)),h.format=M[c.internalformat],h.type=k[c.type],h.mag=A[l.magFilter],h.min=S[l.minFilter],h.wrapS=E[l.wrapS],h.wrapT=E[l.wrapT],o=0;o<6;++o)eh(u[o]);return h}return h(e,r,i,n,a,l),h.subimage=function(e,t,r,i,n){var a=0|r,o=0|i,s=0|n,l=ei();return P(l,c),l.width=0,l.height=0,W(l,t),l.width=l.width||(c.width>>s)-a,l.height=l.height||(c.height>>s)-o,eb(c),et(l,34069+e,a,o,s),e_(),en(l),h},h.resize=function(e){var r=0|e;if(r!==c.width){h.width=c.width=r,h.height=c.height=r,eb(c);for(var i=0;i<6;++i)for(var n=0;c.mipmask>>n;++n)t.texImage2D(34069+i,n,c.format,r>>n,r>>n,0,c.format,c.type,null);return e_(),s.profile&&(c.stats.size=ee(c.internalformat,c.type,h.width,h.height,!1,!0)),h}},h._reglType="textureCube",h._texture=c,s.profile&&(h.stats=c.stats),h.destroy=function(){c.decRef()},h},clear:function(){for(var e=0;e>r,e.height>>r,0,e.internalformat,e.type,null);else for(var i=0;i<6;++i)t.texImage2D(34069+i,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);ep(e.texInfo,e.target)})},refresh:function(){for(var e=0;e=0?d=!0:c.indexOf(p)>=0&&(d=!1))),("depthTexture"in e||"depthStencilTexture"in e)&&(M=!!(e.depthTexture||e.depthStencilTexture)),"depth"in e&&("boolean"==typeof e.depth?s=e.depth:(b=e.depth,u=!1)),"stencil"in e&&("boolean"==typeof e.stencil?u=e.stencil:(_=e.stencil,s=!1)),"depthStencil"in e&&("boolean"==typeof e.depthStencil?s=u=e.depthStencil:(w=e.depthStencil,s=!1,u=!1))}else a=o=1;var S=null,E=null,C=null,L=null;if(Array.isArray(h))S=h.map(m);else if(h)S=[m(h)];else for(S=Array(x),r=0;r0&&(s.depth=r[0].depth,s.stencil=r[0].stencil,s.depthStencil=r[0].depthStencil),r[o]?r[o](s):r[o]=A(s)}return e(i,{width:l,height:l,color:a})}return i(t),e(i,{faces:r,resize:function(e){var t,n=0|e;if(n===i.width)return i;var a=i.color;for(t=0;t0&&(t.push(e,"="),t.push.apply(t,ec(arguments)),t.push(";")),e},toString:function(){return eu([r.length>0?"var "+r.join(",")+";":"",eu(t)])}})}function l(){var t=s(),r=s(),i=t.toString,n=r.toString;function a(e,i){r(e,i,"=",t.def(e,i),";")}return e(function(){t.apply(t,ec(arguments))},{def:t.def,entry:t,exit:r,save:a,set:function(e,r,i){a(e,r),t(e,r,"=",i,";")},toString:function(){return i()+n()}})}var c=s(),u={};return{global:c,link:function(e,t){var r=t&&t.stable;if(!r){for(var s=0;s[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]},attributes:{color:{buffer:m,offset:(e,t)=>4*t.offset,divisor:1},position:{buffer:f,offset:(e,t)=>8*t.offset,divisor:1},positionFract:{buffer:p,offset:(e,t)=>8*t.offset,divisor:1},error:{buffer:g,offset:(e,t)=>16*t.offset,divisor:1},direction:{buffer:y,stride:24,offset:0},lineOffset:{buffer:y,stride:24,offset:8},capOffset:{buffer:y,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:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:u.length}),o(b,{update:T,draw:_,destroy:M,regl:e,gl:h,canvas:h.canvas,groups:x}),b;function b(e){e?T(e):null===e&&M(),_()}function _(t){if("number"==typeof t)return w(t);t&&!Array.isArray(t)&&(t=[t]),e._refresh(),x.forEach((e,r)=>{if(e){if(t&&(t[r]?e.draw=!0:e.draw=!1),!e.draw){e.draw=!0;return}w(r)}})}function w(e){"number"==typeof e&&(e=x[e]),null!=e&&e&&e.count&&e.color&&e.opacity&&e.positions&&e.positions.length>1&&(e.scaleRatio=[e.scale[0]*e.viewport.width,e.scale[1]*e.viewport.height],d(e),e.after&&e.after(e))}function T(e){if(!e)return;null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let t=0,u=0;if(b.groups=x=e.map((e,l)=>{let d=x[l];return e&&("function"==typeof e?e={after:e}:"number"==typeof e[0]&&(e={positions:e}),e=a(e,{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"}),d||(x[l]=d={id:l,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},e=o({},v,e)),n(d,e,[{lineWidth:e=>.5*e,capSize:e=>.5*e,opacity:parseFloat,errors:e=>(e=s(e),u+=e.length,e),positions:(e,i)=>(i.count=Math.floor((e=s(e,"float64")).length/2),i.bounds=r(e,2),i.offset=t,t+=i.count,e)},{color:(e,t)=>{let r=t.count;if(e||(e="transparent"),!Array.isArray(e)||"number"==typeof e[0]){let t=e;e=Array(r);for(let i=0;i{let i=t.bounds;return e||(e=i),t.scale=[1/(e[2]-e[0]),1/(e[3]-e[1])],t.translate=[-e[0],-e[1]],t.scaleFract=c(t.scale),t.translateFract=c(t.translate),e},viewport:e=>{let t;return Array.isArray(e)?t={x:e[0],y:e[1],width:e[2]-e[0],height:e[3]-e[1]}:e?(t={x:e.x||e.left||0,y:e.y||e.top||0},e.right?t.width=e.right-t.x:t.width=e.w||e.width||0,e.bottom?t.height=e.bottom-t.y:t.height=e.h||e.height||0):t={x:0,y:0,width:h.drawingBufferWidth,height:h.drawingBufferHeight},t}}])),d}),t||u){let e=x.reduce((e,t,r)=>e+(t?t.count:0),0),t=new Float64Array(2*e),r=new Uint8Array(4*e),i=new Float32Array(4*e);x.forEach((e,n)=>{if(!e)return;let{positions:a,count:o,offset:s,color:l,errors:c}=e;o&&(r.set(l,4*s),i.set(c,4*s),t.set(a,2*s))});var d=l(t);f(d),p(c(t,d)),m(r),g(i)}}function M(){f.destroy(),p.destroy(),m.destroy(),g.destroy(),y.destroy()}};var u=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]]}}),gJ=p({"node_modules/unquote/index.js"(e,t){var r=/[\'\"]/;t.exports=function(e){return e?(r.test(e.charAt(0))&&(e=e.substr(1)),r.test(e.charAt(e.length-1))&&(e=e.substr(0,e.length-1)),e):""}}}),gQ=p({"node_modules/css-global-keywords/index.json"(e,t){t.exports=["inherit","initial","unset"]}}),g0=p({"node_modules/css-system-font-keywords/index.json"(e,t){t.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),g1=p({"node_modules/css-font-weight-keywords/index.json"(e,t){t.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),g2=p({"node_modules/css-font-style-keywords/index.json"(e,t){t.exports=["normal","italic","oblique"]}}),g3=p({"node_modules/css-font-stretch-keywords/index.json"(e,t){t.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),g5=p({"node_modules/parenthesis/index.js"(e,t){function r(e,t){if("string"!=typeof e)return[e];var r=[e];"string"==typeof t||Array.isArray(t)?t={brackets:t}:t||(t={});var i=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],n=t.escape||"___",a=!!t.flat;i.forEach(function(e){var t=new RegExp(["\\",e[0],"[^\\",e[0],"\\",e[1],"]*\\",e[1]].join("")),i=[];function a(t,a,o){var s=r.push(t.slice(e[0].length,-e[1].length))-1;return i.push(s),n+s+n}r.forEach(function(e,i){for(var n,o=0;e!=n;)if(n=e,e=e.replace(t,a),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[i]=e}),i=i.reverse(),r=r.map(function(t){return i.forEach(function(r){t=t.replace(RegExp("(\\"+n+r+"\\"+n+")","g"),e[0]+"$1"+e[1])}),t})});var o=RegExp("\\"+n+"([0-9]+)\\"+n);return a?r:function e(t,r,i){for(var n,a=[],s=0;n=o.exec(t);){if(s++>1e4)throw Error("Circular references in parenthesis");a.push(t.slice(0,n.index)),a.push(e(r[n[1]],r)),t=t.slice(n.index+n[0].length)}return a.push(t),a}(r[0],r)}function i(e,t){if(t&&t.flat){var r,i=t&&t.escape||"___",n=e[0];if(!n)return"";for(var a=RegExp("\\"+i+"([0-9]+)\\"+i),o=0;n!=r;){if(o++>1e4)throw Error("Circular references in "+e);r=n,n=n.replace(a,s)}return n}return e.reduce(function e(t,r){return Array.isArray(r)&&(r=r.reduce(e,"")),t+r},"");function s(t,r){if(null==e[r])throw Error("Reference "+r+"is undefined");return e[r]}}function n(e,t){return Array.isArray(e)?i(e,t):r(e,t)}n.parse=r,n.stringify=i,t.exports=n}}),g4=p({"node_modules/string-split-by/index.js"(e,t){var r=g5();t.exports=function(e,t,i){if(null==e)throw Error("First argument should be a string");if(null==t)throw Error("Separator should be a string or a RegExp");i?("string"==typeof i||Array.isArray(i))&&(i={ignore:i}):i={},null==i.escape&&(i.escape=!0),null==i.ignore?i.ignore=["[]","()","{}","<>",'""',"''","``","“”","\xab\xbb"]:("string"==typeof i.ignore&&(i.ignore=[i.ignore]),i.ignore=i.ignore.map(function(e){return 1===e.length&&(e+=e),e}));var n=r.parse(e,{flat:!0,brackets:i.ignore}),a=n[0].split(t);if(i.escape){for(var o=[],s=0;s1&&r===n&&('"'===r||"'"===r))return['"'+i(t.substr(1,t.length-2))+'"'];var a=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(t);if(a)return e(t.substr(0,a.index)).concat(e(a[1])).concat(e(t.substr(a.index+a[0].length)));var o=t.split(".");if(1===o.length)return['"'+i(t)+'"'];for(var s=[],l=0;ltypeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date};function c(e){return"string"==typeof e?e.split():e}function u(e){return"string"==typeof e?document.querySelector(e):e}function h(e,t){for(var r=Array(e),i=0;i65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1}function f(){var e=h(8,function(){return[]});function t(t){var r=function(e){for(var t=16;t<=0x10000000;t*=16)if(e<=t)return t;return 0}(t),i=e[d(r)>>2];return i.length>0?i.pop():new ArrayBuffer(r)}function r(t){e[d(t.byteLength)>>2].push(t)}return{alloc:t,free:r,allocType:function(e,r){var i=null;switch(e){case 5120:i=new Int8Array(t(r),0,r);break;case 5121:i=new Uint8Array(t(r),0,r);break;case 5122:i=new Int16Array(t(2*r),0,r);break;case 5123:i=new Uint16Array(t(2*r),0,r);break;case 5124:i=new Int32Array(t(4*r),0,r);break;case 5125:i=new Uint32Array(t(4*r),0,r);break;case 5126:i=new Float32Array(t(4*r),0,r);break;default:return null}return i.length!==r?i.subarray(0,r):i},freeType:function(e){r(e.buffer)}}}var p=f();p.zero=f();var m=function(e,t){var r=1;t.ext_texture_filter_anisotropic&&(r=e.getParameter(34047));var i=1,n=1;t.webgl_draw_buffers&&(i=e.getParameter(34852),n=e.getParameter(36063));var a=!!t.oes_texture_float;if(a){var o=e.createTexture();e.bindTexture(3553,o),e.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var s=e.createFramebuffer();if(e.bindFramebuffer(36160,s),e.framebufferTexture2D(36160,36064,3553,o,0),e.bindTexture(3553,null),36053!==e.checkFramebufferStatus(36160))a=!1;else{e.viewport(0,0,1,1),e.clearColor(1,0,0,1),e.clear(16384);var l=p.allocType(5126,4);e.readPixels(0,0,1,1,6408,5126,l),e.getError()?a=!1:(e.deleteFramebuffer(s),e.deleteTexture(o),a=1===l[0]),p.freeType(l)}}var c="u">typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),u=!0;if(!c){var h=e.createTexture(),d=p.allocType(5121,36);e.activeTexture(33984),e.bindTexture(34067,h),e.texImage2D(34069,0,6408,3,3,0,6408,5121,d),p.freeType(d),e.bindTexture(34067,null),e.deleteTexture(h),u=!e.getError()}return{colorBits:[e.getParameter(3410),e.getParameter(3411),e.getParameter(3412),e.getParameter(3413)],depthBits:e.getParameter(3414),stencilBits:e.getParameter(3415),subpixelBits:e.getParameter(3408),extensions:Object.keys(t).filter(function(e){return!!t[e]}),maxAnisotropic:r,maxDrawbuffers:i,maxColorAttachments:n,pointSizeDims:e.getParameter(33901),lineWidthDims:e.getParameter(33902),maxViewportDims:e.getParameter(3386),maxCombinedTextureUnits:e.getParameter(35661),maxCubeMapSize:e.getParameter(34076),maxRenderbufferSize:e.getParameter(34024),maxTextureUnits:e.getParameter(34930),maxTextureSize:e.getParameter(3379),maxAttributes:e.getParameter(34921),maxVertexUniforms:e.getParameter(36347),maxVertexTextureUnits:e.getParameter(35660),maxVaryingVectors:e.getParameter(36348),maxFragmentUniforms:e.getParameter(36349),glsl:e.getParameter(35724),renderer:e.getParameter(7937),vendor:e.getParameter(7936),version:e.getParameter(7938),readFloat:a,npotTextureCube:u}},g=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray};function y(e){return!!e&&"object"==typeof e&&Array.isArray(e.shape)&&Array.isArray(e.stride)&&"number"==typeof e.offset&&e.shape.length===e.stride.length&&(Array.isArray(e.data)||g(e.data))}var v=function(e){return Object.keys(e).map(function(t){return e[t]})},x=function(e){for(var t=[],r=e;r.length;r=r[0])t.push(r.length);return t},b=function(e,t,r,i){var n=1;if(t.length)for(var a=0;a>>31<<15,a=(i<<1>>>24)-127,o=i>>13&1023;if(a<-24)t[r]=n;else if(a<-14){var s=-14-a;t[r]=n+(o+1024>>s)}else a>15?t[r]=n+31744:t[r]=n+(a+15<<10)+o}return t}function z(e){return Array.isArray(e)||g(e)}var D=[9984,9986,9985,9987],O=[0,6409,6410,6407,6408],R={};function F(e){return"[object "+e+"]"}R[6409]=R[6406]=R[6402]=1,R[34041]=R[6410]=2,R[6407]=R[35904]=3,R[6408]=R[35906]=4;var j=F("HTMLCanvasElement"),B=F("OffscreenCanvas"),N=F("CanvasRenderingContext2D"),U=F("ImageBitmap"),V=F("HTMLImageElement"),q=F("HTMLVideoElement"),H=Object.keys(w).concat([j,B,N,U,V,q]),G=[];G[5121]=1,G[5126]=4,G[36193]=2,G[5123]=2,G[5125]=4;var W=[];function Y(e){return Array.isArray(e)&&(0===e.length||"number"==typeof e[0])}function Z(e){return!!Array.isArray(e)&&!(0===e.length||!z(e[0]))}function $(e){return Object.prototype.toString.call(e)}function X(e){if(!e)return!1;var t=$(e);return H.indexOf(t)>=0||Y(e)||Z(e)||y(e)}function K(e){return 0|w[Object.prototype.toString.call(e)]}function J(e,t){return p.allocType(36193===e.type?5126:e.type,t)}function Q(e,t){36193===e.type?(e.data=I(t),p.freeType(t)):e.data=t}function ee(e,t,r,i,n,a){var o;if(o="u">typeof W[e]?W[e]:R[e]*G[t],a&&(o*=6),!n)return o*r*i;for(var s=0,l=r;l>=1;)s+=o*l*l,l/=2;return s}W[32854]=2,W[32855]=2,W[36194]=2,W[34041]=4,W[33776]=.5,W[33777]=.5,W[33778]=1,W[33779]=1,W[35986]=.5,W[35987]=1,W[34798]=1,W[35840]=.5,W[35841]=.25,W[35842]=.5,W[35843]=.25,W[36196]=.5;var et=[];et[32854]=2,et[32855]=2,et[36194]=2,et[33189]=2,et[36168]=1,et[34041]=4,et[35907]=4,et[34836]=16,et[34842]=8,et[34843]=6;var er=function(e,t,r,i,n){var a={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};t.ext_srgb&&(a.srgba=35907),t.ext_color_buffer_half_float&&(a.rgba16f=34842,a.rgb16f=34843),t.webgl_color_buffer_float&&(a.rgba32f=34836);var o=[];Object.keys(a).forEach(function(e){o[a[e]]=e});var s=0,l={};function c(e){this.id=s++,this.refCount=1,this.renderbuffer=e,this.format=32854,this.width=0,this.height=0,n.profile&&(this.stats={size:0})}function u(t){var r=t.renderbuffer;e.bindRenderbuffer(36161,null),e.deleteRenderbuffer(r),t.renderbuffer=null,t.refCount=0,delete l[t.id],i.renderbufferCount--}return c.prototype.decRef=function(){--this.refCount<=0&&u(this)},n.profile&&(i.getTotalRenderbufferSize=function(){var e=0;return Object.keys(l).forEach(function(t){e+=l[t].stats.size}),e}),{create:function(t,r){var s=new c(e.createRenderbuffer());function u(t,r){var i,l,c,h=0,d=0,f=32854;if("object"==typeof t&&t){if("shape"in t){var p=t.shape;h=0|p[0],d=0|p[1]}else"radius"in t&&(h=d=0|t.radius),"width"in t&&(h=0|t.width),"height"in t&&(d=0|t.height);"format"in t&&(f=a[t.format])}else"number"==typeof t?(h=0|t,d="number"==typeof r?0|r:h):t||(h=d=1);if(h!==s.width||d!==s.height||f!==s.format)return u.width=s.width=h,u.height=s.height=d,s.format=f,e.bindRenderbuffer(36161,s.renderbuffer),e.renderbufferStorage(36161,f,h,d),n.profile&&(s.stats.size=(i=s.format,l=s.width,c=s.height,et[i]*l*c)),u.format=o[s.format],u}return l[s.id]=s,i.renderbufferCount++,u(t,r),u.resize=function(t,r){var i,a,o,l=0|t,c=0|r||l;return l===s.width&&c===s.height||(u.width=s.width=l,u.height=s.height=c,e.bindRenderbuffer(36161,s.renderbuffer),e.renderbufferStorage(36161,s.format,l,c),n.profile&&(s.stats.size=(i=s.format,a=s.width,o=s.height,et[i]*a*o))),u},u._reglType="renderbuffer",u._renderbuffer=s,n.profile&&(u.stats=s.stats),u.destroy=function(){s.decRef()},u},clear:function(){v(l).forEach(u)},restore:function(){v(l).forEach(function(t){t.renderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,t.renderbuffer),e.renderbufferStorage(36161,t.format,t.width,t.height)}),e.bindRenderbuffer(36161,null)}}},ei=[];ei[6408]=4,ei[6407]=3;var en=[];function ea(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.offset=0,this.stride=0,this.divisor=0}function eo(e,t){return e>>>t|e<<32-t}en[5121]=1,en[5126]=4,en[36193]=2;var es=[0x428a2f98,0x71374491,-0x4a3f0431,-0x164a245b,0x3956c25b,0x59f111f1,-0x6dc07d5c,-0x54e3a12b,-0x27f85568,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,-0x7f214e02,-0x6423f959,-0x3e640e8c,-0x1b64963f,-0x1041b87a,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,-0x67c1aeae,-0x57ce3993,-0x4ffcd838,-0x40a68039,-0x391ff40d,-0x2a586eb9,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,-0x7e3d36d2,-0x6d8dd37b,-0x5d40175f,-0x57e599b5,-0x3db47490,-0x3893ae5d,-0x2e6d17e7,-0x2966f9dc,-0xbf1ca7b,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,-0x7b3787ec,-0x7338fdf8,-0x6f410006,-0x5baf9315,-0x41065c09,-0x398e870e];function el(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function ec(e){return Array.prototype.slice.call(e)}function eu(e){return ec(e).join("")}var eh="xyzw".split(""),ed="dither",ef="blend.enable",ep="blend.color",em="blend.equation",eg="blend.func",ey="depth.enable",ev="depth.func",ex="depth.range",eb="depth.mask",e_="colorMask",ew="cull.enable",eT="cull.face",eM="frontFace",ek="lineWidth",eA="polygonOffset.enable",eS="polygonOffset.offset",eE="sample.alpha",eC="sample.enable",eL="sample.coverage",eP="stencil.enable",eI="stencil.mask",ez="stencil.func",eD="stencil.opFront",eO="stencil.opBack",eR="scissor.enable",eF="scissor.box",ej="viewport",eB="profile",eN="framebuffer",eU="vert",eV="frag",eq="elements",eH="primitive",eG="count",eW="offset",eY="instances",eZ="Width",e$="Height",eX=eN+eZ,eK=eN+e$,eJ=ej+eZ,eQ=ej+e$,e0="drawingBuffer",e1=e0+eZ,e2=e0+e$,e3=[eg,em,ez,eD,eO,eL,ej,eF,eS],e5={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},e4={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},e6={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},e8={cw:2304,ccw:2305};function e9(e){return Array.isArray(e)||g(e)||y(e)}function e7(e){return e.sort(function(e,t){return e===ej?-1:t===ej?1:e=1,i>=2,t)}if(4===r){var n=e.data;return new te(n.thisDep,n.contextDep,n.propDep,t)}if(5===r)return new te(!1,!1,!1,t);if(6!==r)return new te(3===r,2===r,1===r,t);for(var a=!1,o=!1,s=!1,l=0;l=1&&(o=!0),u>=2&&(s=!0)}else 4===c.type&&(a=a||c.data.thisDep,o=o||c.data.contextDep,s=s||c.data.propDep)}return new te(a,o,s,t)}var tn=new te(!1,!1,!1,function(){}),ta=function(e,t){if(!t.ext_disjoint_timer_query)return null;var r=[],i=[];function n(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var a=[],o=[];function s(e,t,r){var i=a.pop()||new n;i.startQueryIndex=e,i.endQueryIndex=t,i.sum=0,i.stats=r,o.push(i)}var l=[],c=[];return{beginQuery:function(e){var n=r.pop()||t.ext_disjoint_timer_query.createQueryEXT();t.ext_disjoint_timer_query.beginQueryEXT(35007,n),i.push(n),s(i.length-1,i.length,e)},endQuery:function(){t.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:s,update:function(){var e,n,s=i.length;if(0!==s){c.length=Math.max(c.length,s+1),l.length=Math.max(l.length,s+1),l[0]=0,c[0]=0;var u=0;for(e=0,n=0;n"u"?1:window.devicePixelRatio,f=!1,p={},m=function(e){},g=function(){};if("string"==typeof o?r=document.querySelector(o):"object"==typeof o&&("string"==typeof o.nodeName&&"function"==typeof o.appendChild&&"function"==typeof o.getBoundingClientRect?r=o:"function"==typeof o.drawArrays||"function"==typeof o.drawElements?n=(a=o).canvas:("gl"in o?a=o.gl:"canvas"in o?n=u(o.canvas):"container"in o&&(i=u(o.container)),"attributes"in o&&(s=o.attributes),"extensions"in o&&(l=c(o.extensions)),"optionalExtensions"in o&&(h=c(o.optionalExtensions)),"onDone"in o&&(m=o.onDone),"profile"in o&&(f=!!o.profile),"pixelRatio"in o&&(d=+o.pixelRatio),"cachedCode"in o&&(p=o.cachedCode))),r&&("canvas"===r.nodeName.toLowerCase()?n=r:i=r),!a){if(!n){var y=function(t,r){var i,n=document.createElement("canvas");function a(){var e=window.innerWidth,i=window.innerHeight;if(t!==document.body){var a=n.getBoundingClientRect();e=a.right-a.left,i=a.bottom-a.top}n.width=r*e,n.height=r*i}return e(n.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),t.appendChild(n),t===document.body&&(n.style.position="absolute",e(t.style,{margin:0,padding:0})),t!==document.body&&"function"==typeof ResizeObserver?(i=new ResizeObserver(function(){setTimeout(a)})).observe(t):window.addEventListener("resize",a,!1),a(),{canvas:n,onDestroy:function(){i?i.disconnect():window.removeEventListener("resize",a),t.removeChild(n)}}}(i||document.body,d);if(!y)return null;n=y.canvas,g=y.onDestroy}void 0===s.premultipliedAlpha&&(s.premultipliedAlpha=!0),a=function(e,t){function r(r){try{return e.getContext(r,t)}catch{return null}}return r("webgl")||r("experimental-webgl")||r("webgl-experimental")}(n,s)}return a?{gl:a,canvas:n,container:i,extensions:l,optionalExtensions:h,pixelRatio:d,profile:f,cachedCode:p,onDone:m,onDestroy:g}:(g(),m("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}(t);if(!f)return null;var _=f.gl,w=_.getContextAttributes(),L=(_.isContextLost(),function(e,t){var r={};function i(t){var i,n=t.toLowerCase();try{i=r[n]=e.getExtension(n)}catch{}return!!i}for(var n=0;n0)if(Array.isArray(t[0])){o=x(t);for(var o,s,c=1,u=1;u0){if("number"==typeof e[0]){var n=p.allocType(h.dtype,e.length);S(n,e),f(n,i),p.freeType(n)}else if(Array.isArray(e[0])||g(e[0])){r=x(e);var a=b(e,r,h.dtype);f(a,i),p.freeType(a)}}}else if(y(e)){r=e.shape;var o=e.stride,s=0,l=0,c=0,u=0;1===r.length?(s=r[0],l=1,c=o[0],u=0):2===r.length&&(s=r[0],l=r[1],c=o[0],u=o[1]);var m=Array.isArray(e.data)?h.dtype:A(e.data),v=p.allocType(m,s*l);E(v,e.data,s,l,c,u,e.offset),f(v,i),p.freeType(v)}return d},r.profile&&(d.stats=h.stats),d.destroy=function(){u(h)},d},createStream:function(e,t){var r=s.pop();return r||(r=new o(e)),r.bind(),c(r,t,35040,0,1,!1),r},destroyStream:function(e){s.push(e)},clear:function(){v(a).forEach(u),s.forEach(u)},getBuffer:function(e){return e&&e._buffer instanceof o?e._buffer:null},restore:function(){v(a).forEach(function(t){t.buffer=e.createBuffer(),e.bindBuffer(t.type,t.buffer),e.bufferData(t.type,t.persistentData||t.byteLength,t.usage)})},_initBuffer:c}}(_,F,f,function(e){return tf.destroyBuffer(e)}),td=function(e,t,r,i){var n={},a=0,o={uint8:5121,uint16:5123};function s(e){this.id=a++,n[this.id]=this,this.buffer=e,this.primType=4,this.vertCount=0,this.type=0}t.oes_element_index_uint&&(o.uint32=5125),s.prototype.bind=function(){this.buffer.bind()};var l=[];function c(i,n,a,o,s,l,c){if(i.buffer.bind(),n){var u,h=c;!c&&(!g(n)||y(n)&&!g(n.data))&&(h=t.oes_element_index_uint?5125:5123),r._initBuffer(i.buffer,n,a,h,3)}else e.bufferData(34963,l,a),i.buffer.dtype=u||5121,i.buffer.usage=a,i.buffer.dimension=3,i.buffer.byteLength=l;if(u=c,!c){switch(i.buffer.dtype){case 5121:case 5120:u=5121;break;case 5123:case 5122:u=5123;break;case 5125:case 5124:u=5125}i.buffer.dtype=u}i.type=u;var d=s;d<0&&(d=i.buffer.byteLength,5123===u?d>>=1:5125===u&&(d>>=2)),i.vertCount=d;var f=o;if(o<0){f=4;var p=i.buffer.dimension;1===p&&(f=0),2===p&&(f=1),3===p&&(f=4)}i.primType=f}function u(e){i.elementsCount--,delete n[e.id],e.buffer.destroy(),e.buffer=null}return{create:function(e,t){var n=r.create(null,34963,!0),a=new s(n._buffer);function l(e){if(e)if("number"==typeof e)n(e),a.primType=4,a.vertCount=0|e,a.type=5121;else{var t=null,r=35044,i=-1,s=-1,u=0,h=0;Array.isArray(e)||g(e)||y(e)?t=e:("data"in e&&(t=e.data),"usage"in e&&(r=M[e.usage]),"primitive"in e&&(i=C[e.primitive]),"count"in e&&(s=0|e.count),"type"in e&&(h=o[e.type]),"length"in e?u=0|e.length:(u=s,5123===h||5122===h?u*=2:(5125===h||5124===h)&&(u*=4))),c(a,t,r,i,s,u,h)}else n(),a.primType=4,a.vertCount=0,a.type=5121;return l}return i.elementsCount++,l(e),l._reglType="elements",l._elements=a,l.subdata=function(e,t){return n.subdata(e,t),l},l.destroy=function(){u(a)},l},createStream:function(e){var t=l.pop();return t||(t=new s(r.create(null,34963,!0,!1)._buffer)),c(t,e,35040,-1,-1,0,0),t},destroyStream:function(e){l.push(e)},getElements:function(e){return"function"==typeof e&&e._elements instanceof s?e._elements:null},clear:function(){v(n).forEach(u)}}}(_,G,th,F),tf=function(e,t,r,i,n,a,o){for(var s=r.maxAttributes,l=Array(s),c=0;c=f.byteLength?u.subdata(f):(u.destroy(),t.buffers[l]=null)),t.buffers[l]||(u=t.buffers[l]=n.create(h,34962,!1,!0)),d.buffer=n.getBuffer(u),d.size=0|d.buffer.dimension,d.normalized=!1,d.type=d.buffer.dtype,d.offset=0,d.stride=0,d.divisor=0,d.state=1,o[l]=1):n.getBuffer(h)?(d.buffer=n.getBuffer(h),d.size=0|d.buffer.dimension,d.normalized=!1,d.type=d.buffer.dtype,d.offset=0,d.stride=0,d.divisor=0,d.state=1):n.getBuffer(h.buffer)?(d.buffer=n.getBuffer(h.buffer),d.size=0|(+h.size||d.buffer.dimension),d.normalized=!!h.normalized,"type"in h?d.type=T[h.type]:d.type=d.buffer.dtype,d.offset=0|(h.offset||0),d.stride=0|(h.stride||0),d.divisor=0|(h.divisor||0),d.state=1):"x"in h&&(d.x=+h.x||0,d.y=+h.y||0,d.z=+h.z||0,d.w=+h.w||0,d.state=2)}for(var p=0;p1)for(var y=0;ye&&(e=t.stats.uniformsCount)}),e},i.getMaxAttributesCount=function(){var e=0;return h.forEach(function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)}),e}),{clear:function(){var e=t.deleteShader.bind(t);v(a).forEach(e),a={},v(o).forEach(e),o={},h.forEach(function(e){t.deleteProgram(e.program)}),h.length=0,u={},i.shaderCount=0},program:function(r,n,s,l){var c=u[n];c||(c=u[n]={});var d=c[r];if(d&&(d.refCount++,!l))return d;var m=new f(n,r);return i.shaderCount++,p(m,s,l),d||(c[r]=m),h.push(m),e(m,{destroy:function(){if(m.refCount--,m.refCount<=0){t.deleteProgram(m.program);var e=h.indexOf(m);h.splice(e,1),i.shaderCount--}c[m.vertId].refCount<=0&&(t.deleteShader(o[m.vertId]),delete o[m.vertId],delete u[m.fragId][m.vertId]),Object.keys(u[m.fragId]).length||(t.deleteShader(a[m.fragId]),delete a[m.fragId],delete u[m.fragId])}})},restore:function(){a={},o={};for(var e=0;e=0&&(m[e]=t)});var T=Object.keys(m);i.textureFormats=T;var M=[];Object.keys(m).forEach(function(e){M[m[e]]=e});var k=[];Object.keys(f).forEach(function(e){k[f[e]]=e});var A=[];Object.keys(u).forEach(function(e){A[u[e]]=e});var S=[];Object.keys(h).forEach(function(e){S[h[e]]=e});var E=[];Object.keys(c).forEach(function(e){E[c[e]]=e});var C=T.reduce(function(e,t){var i=m[t];return 6409===i||6406===i||6409===i||6410===i||6402===i||34041===i||r.ext_srgb&&(35904===i||35906===i)?e[i]=i:32855===i||t.indexOf("rgba")>=0?e[i]=6408:e[i]=6407,e},{});function L(){this.internalformat=6408,this.format=6408,this.type=5121,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=37444,this.width=0,this.height=0,this.channels=0}function P(e,t){e.internalformat=t.internalformat,e.format=t.format,e.type=t.type,e.compressed=t.compressed,e.premultiplyAlpha=t.premultiplyAlpha,e.flipY=t.flipY,e.unpackAlignment=t.unpackAlignment,e.colorSpace=t.colorSpace,e.width=t.width,e.height=t.height,e.channels=t.channels}function F(e,t){if(!("object"!=typeof t||!t)){"premultiplyAlpha"in t&&(e.premultiplyAlpha=t.premultiplyAlpha),"flipY"in t&&(e.flipY=t.flipY),"alignment"in t&&(e.unpackAlignment=t.alignment),"colorSpace"in t&&(e.colorSpace=d[t.colorSpace]),"type"in t&&(e.type=f[t.type]);var r=e.width,i=e.height,n=e.channels,a=!1;"shape"in t?(r=t.shape[0],i=t.shape[1],3===t.shape.length&&(n=t.shape[2],a=!0)):("radius"in t&&(r=i=t.radius),"width"in t&&(r=t.width),"height"in t&&(i=t.height),"channels"in t&&(n=t.channels,a=!0)),e.width=0|r,e.height=0|i,e.channels=0|n;var o=!1;if("format"in t){var s=t.format,l=e.internalformat=m[s];e.format=C[l],s in f&&("type"in t||(e.type=f[s])),s in _&&(e.compressed=!0),o=!0}!a&&o?e.channels=R[e.format]:a&&!o&&e.channels!==O[e.format]&&(e.format=e.internalformat=O[e.channels])}}function H(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function G(){L.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function W(e,t){var r=null;if(X(t)?r=t:t&&(F(e,t),"x"in t&&(e.xOffset=0|t.x),"y"in t&&(e.yOffset=0|t.y),X(t.data)&&(r=t.data)),t.copy){var i=a.viewportWidth,n=a.viewportHeight;e.width=e.width||i-e.xOffset,e.height=e.height||n-e.yOffset,e.needsCopy=!0}else if(r){if(g(r))e.channels=e.channels||4,e.data=r,"type"in t||5121!==e.type||(e.type=K(r));else if(Y(r))e.channels=e.channels||4,function(e,t){var r=t.length;switch(e.type){case 5121:case 5123:case 5125:case 5126:var i=p.allocType(e.type,r);i.set(t),e.data=i;break;case 36193:e.data=I(t)}}(e,r),e.alignment=1,e.needsFree=!0;else if(y(r)){var o=r.data;Array.isArray(o)||5121!==e.type||(e.type=K(o));var s,l,c,u,h,d,f=r.shape,m=r.stride;3===f.length?(c=f[2],d=m[2]):(c=1,d=1),s=f[0],l=f[1],u=m[0],h=m[1],e.alignment=1,e.width=s,e.height=l,e.channels=c,e.format=e.internalformat=O[c],e.needsFree=!0,function(e,t,r,i,n,a){for(var o=e.width,s=e.height,l=e.channels,c=J(e,o*s*l),u=0,h=0;h>=n,r.height>>=n,W(r,i[n]),e.mipmask|=1<=0)||"faces"in t||(e.genMipmaps=!0)),"mag"in t&&(e.magFilter=u[t.mag]);var r=e.wrapS,i=e.wrapT;if("wrap"in t){var n=t.wrap;"string"==typeof n?r=i=c[n]:Array.isArray(n)&&(r=c[n[0]],i=c[n[1]])}else"wrapS"in t&&(r=c[t.wrapS]),"wrapT"in t&&(i=c[t.wrapT]);if(e.wrapS=r,e.wrapT=i,"anisotropic"in t&&(t.anisotropic,e.anisotropic=t.anisotropic),"mipmap"in t){var a=!1;switch(typeof t.mipmap){case"string":e.mipmapHint=l[t.mipmap],e.genMipmaps=!0,a=!0;break;case"boolean":a=e.genMipmaps=t.mipmap;break;case"object":e.genMipmaps=!1,a=!0}!a||"min"in t||(e.minFilter=9984)}}function ep(e,i){t.texParameteri(i,10241,e.minFilter),t.texParameteri(i,10240,e.magFilter),t.texParameteri(i,10242,e.wrapS),t.texParameteri(i,10243,e.wrapT),r.ext_texture_filter_anisotropic&&t.texParameteri(i,34046,e.anisotropic),e.genMipmaps&&(t.hint(33170,e.mipmapHint),t.generateMipmap(i))}var em=0,eg={},ey=i.maxTextureUnits,ev=Array(ey).map(function(){return null});function ex(e){L.call(this),this.mipmask=0,this.internalformat=6408,this.id=em++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new ed,s.profile&&(this.stats={size:0})}function eb(e){t.activeTexture(33984),t.bindTexture(e.target,e.texture)}function e_(){var e=ev[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(3553,null)}function ew(e){var r=e.texture,i=e.unit,n=e.target;i>=0&&(t.activeTexture(33984+i),t.bindTexture(n,null),ev[i]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete eg[e.id],o.textureCount--}return e(ex.prototype,{bind:function(){this.bindCount+=1;var e=this.unit;if(e<0){for(var r=0;r0)continue;i.unit=-1}ev[r]=this,e=r;break}s.profile&&o.maxTextureUnits>l)-o,c.height=c.height||(i.height>>l)-s,eb(i),et(c,3553,o,s,l),e_(),en(c),n},n.resize=function(e,r){var a=0|e,o=0|r||a;if(a===i.width&&o===i.height)return n;n.width=i.width=a,n.height=i.height=o,eb(i);for(var l=0;i.mipmask>>l;++l){var c=a>>l,u=o>>l;if(!c||!u)break;t.texImage2D(3553,l,i.format,c,u,0,i.format,i.type,null)}return e_(),s.profile&&(i.stats.size=ee(i.internalformat,i.type,a,o,!1,!1)),n},n._reglType="texture2d",n._texture=i,s.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,i,n,a,l){var c=new ex(34067);eg[c.id]=c,o.cubeCount++;var u=Array(6);function h(e,t,r,i,n,a){var o,l=c.texInfo;for(ed.call(l),o=0;o<6;++o)u[o]=eu();if("number"!=typeof e&&e){if("object"==typeof e)if(t)es(u[0],e),es(u[1],t),es(u[2],r),es(u[3],i),es(u[4],n),es(u[5],a);else if(ef(l,e),F(c,e),"faces"in e){var d=e.faces;for(o=0;o<6;++o)P(u[o],c),es(u[o],d[o])}else for(o=0;o<6;++o)es(u[o],e)}else{var f=0|e||1;for(o=0;o<6;++o)eo(u[o],f,f)}for(P(c,u[0]),l.genMipmaps?c.mipmask=(u[0].width<<1)-1:c.mipmask=u[0].mipmask,c.internalformat=u[0].internalformat,h.width=u[0].width,h.height=u[0].height,eb(c),o=0;o<6;++o)el(u[o],34069+o);for(ep(l,34067),e_(),s.profile&&(c.stats.size=ee(c.internalformat,c.type,h.width,h.height,l.genMipmaps,!0)),h.format=M[c.internalformat],h.type=k[c.type],h.mag=A[l.magFilter],h.min=S[l.minFilter],h.wrapS=E[l.wrapS],h.wrapT=E[l.wrapT],o=0;o<6;++o)eh(u[o]);return h}return h(e,r,i,n,a,l),h.subimage=function(e,t,r,i,n){var a=0|r,o=0|i,s=0|n,l=ei();return P(l,c),l.width=0,l.height=0,W(l,t),l.width=l.width||(c.width>>s)-a,l.height=l.height||(c.height>>s)-o,eb(c),et(l,34069+e,a,o,s),e_(),en(l),h},h.resize=function(e){var r=0|e;if(r!==c.width){h.width=c.width=r,h.height=c.height=r,eb(c);for(var i=0;i<6;++i)for(var n=0;c.mipmask>>n;++n)t.texImage2D(34069+i,n,c.format,r>>n,r>>n,0,c.format,c.type,null);return e_(),s.profile&&(c.stats.size=ee(c.internalformat,c.type,h.width,h.height,!1,!0)),h}},h._reglType="textureCube",h._texture=c,s.profile&&(h.stats=c.stats),h.destroy=function(){c.decRef()},h},clear:function(){for(var e=0;e>r,e.height>>r,0,e.internalformat,e.type,null);else for(var i=0;i<6;++i)t.texImage2D(34069+i,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);ep(e.texInfo,e.target)})},refresh:function(){for(var e=0;e=0?d=!0:c.indexOf(p)>=0&&(d=!1))),("depthTexture"in e||"depthStencilTexture"in e)&&(M=!!(e.depthTexture||e.depthStencilTexture)),"depth"in e&&("boolean"==typeof e.depth?s=e.depth:(b=e.depth,u=!1)),"stencil"in e&&("boolean"==typeof e.stencil?u=e.stencil:(_=e.stencil,s=!1)),"depthStencil"in e&&("boolean"==typeof e.depthStencil?s=u=e.depthStencil:(w=e.depthStencil,s=!1,u=!1))}else a=o=1;var S=null,E=null,C=null,L=null;if(Array.isArray(h))S=h.map(m);else if(h)S=[m(h)];else for(S=Array(x),r=0;r0&&(s.depth=r[0].depth,s.stencil=r[0].stencil,s.depthStencil=r[0].depthStencil),r[o]?r[o](s):r[o]=A(s)}return e(i,{width:l,height:l,color:a})}return i(t),e(i,{faces:r,resize:function(e){var t,n=0|e;if(n===i.width)return i;var a=i.color;for(t=0;t0&&(t.push(e,"="),t.push.apply(t,ec(arguments)),t.push(";")),e},toString:function(){return eu([r.length>0?"var "+r.join(",")+";":"",eu(t)])}})}function l(){var t=s(),r=s(),i=t.toString,n=r.toString;function a(e,i){r(e,i,"=",t.def(e,i),";")}return e(function(){t.apply(t,ec(arguments))},{def:t.def,entry:t,exit:r,save:a,set:function(e,r,i){a(e,r),t(e,r,"=",i,";")},toString:function(){return i()+n()}})}var c=s(),u={};return{global:c,link:function(e,t){var r=t&&t.stable;if(!r){for(var s=0;s>>4&15)+r.charAt(15&t);return i}(function(e){for(var t=function(e,t){var r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w=[0x6a09e667,-0x4498517b,0x3c6ef372,-0x5ab00ac6,0x510e527f,-0x64fa9774,0x1f83d9ab,0x5be0cd19],T=Array(64);for(e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t,v=0;v>>10,T[x-7]),eo(i=T[x-15],7)^eo(i,18)^i>>>3),T[x-16]),b=el(el(el(el(y,eo(n=p,6)^eo(n,11)^eo(n,25)),(a=p)&m^~a&g),es[x]),T[x]),_=el(eo(o=u,2)^eo(o,13)^eo(o,22),(s=u)&(l=h)^s&(c=d)^l&c),y=g,g=m,m=p,p=el(f,b),f=d,d=h,h=u,u=el(b,_)}w[0]=el(u,w[0]),w[1]=el(h,w[1]),w[2]=el(d,w[2]),w[3]=el(f,w[3]),w[4]=el(p,w[4]),w[5]=el(m,w[5]),w[6]=el(g,w[6]),w[7]=el(y,w[7])}return w}(function(e){for(var t=Array(e.length>>2),r=0;r>5]|=(255&e.charCodeAt(r/8))<<24-r%32;return t}(e),8*e.length),r="",i=0;i<32*t.length;i+=8)r+=String.fromCharCode(t[i>>5]>>>24-i%32&255);return r}(function(e){for(var t,r,i="",n=-1;++n>>6&31,128|63&t):t<=65535?i+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(i+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return i}(i)))])return r[t].apply(null,a);var o=Function.apply(null,n.concat(i));return r&&(r[t]=o),o.apply(null,a)}}}({cache:v}),r=t.link,n=t.global;t.id=J++,t.batchId="0";var a=r(X),o=t.shared={props:"a0"};Object.keys(X).forEach(function(e){o[e]=n.def(a,".",e)});var s=t.next={},l=t.current={};Object.keys(G).forEach(function(e){Array.isArray(U[e])&&(s[e]=n.def(o.next,".",e),l[e]=n.def(o.current,".",e))});var c=t.constants={};Object.keys(K).forEach(function(e){c[e]=n.def(JSON.stringify(K[e]))}),t.invoke=function(e,i){switch(i.type){case 0:var n=["this",o.context,o.props,t.batchId];return e.def(r(i.data),".call(",n.slice(0,Math.max(i.data.length+1,4)),")");case 1:return e.def(o.props,i.data);case 2:return e.def(o.context,i.data);case 3:return e.def("this",i.data);case 4:return i.data.append(t,e),i.data.ref;case 5:return i.data.toString();case 6:return i.data.map(function(r){return t.invoke(e,r)})}},t.attribCache={};var u={};return t.scopeAttrib=function(e){var t=i.id(e);if(t in u)return u[t];var n=f.scope[t];return n||(n=f.scope[t]=new R),u[t]=r(n)},t}function ee(e,t,r){var i=e.shared.context,n=e.scope();Object.keys(r).forEach(function(a){t.save(i,"."+a);var o=r[a].append(e,t);Array.isArray(o)?n(i,".",a,"=[",o.join(),"];"):n(i,".",a,"=",o,";")}),t(n)}function et(e,t,r,i){var n,a=e.shared,o=a.gl,s=a.framebuffer;B&&(n=t.def(a.extensions,".webgl_draw_buffers"));var l,c=e.constants,u=c.drawBuffer,h=c.backBuffer;l=r?r.append(e,t):t.def(s,".next"),i||t("if(",l,"!==",s,".cur){"),t("if(",l,"){",o,".bindFramebuffer(",36160,",",l,".framebuffer);"),B&&t(n,".drawBuffersWEBGL(",u,"[",l,".colorAttachments.length]);"),t("}else{",o,".bindFramebuffer(",36160,",null);"),B&&t(n,".drawBuffersWEBGL(",h,");"),t("}",s,".cur=",l,";"),i||t("}")}function er(e,t,r){var i=e.shared,n=i.gl,a=e.current,o=e.next,s=i.current,l=i.next,c=e.cond(s,".dirty");q.forEach(function(t){var i,u,d=W(t);if(!(d in r.state))if(d in o){i=o[d],u=a[d];var f=h(U[d].length,function(e){return c.def(i,"[",e,"]")});c(e.cond(f.map(function(e,t){return e+"!=="+u+"["+t+"]"}).join("||")).then(n,".",G[d],"(",f,");",f.map(function(e,t){return u+"["+t+"]="+e}).join(";"),";"))}else{i=c.def(l,".",d);var p=e.cond(i,"!==",s,".",d);c(p),d in H?p(e.cond(i).then(n,".enable(",H[d],");").else(n,".disable(",H[d],");"),s,".",d,"=",i,";"):p(n,".",G[d],"(",i,");",s,".",d,"=",i,";")}}),0===Object.keys(r.state).length&&c(s,".dirty=false;"),t(c)}function ei(e,t,r,i){var n,a=e.shared,o=e.current,s=a.current,l=a.gl;e9(Object.keys(r)).forEach(function(a){var c=r[a];if(!(i&&!i(c))){var u=c.append(e,t);if(H[a]){var h=H[a];tt(c)?(n=e.link(u,{stable:!0}),t(e.cond(n).then(l,".enable(",h,");").else(l,".disable(",h,");")),t(s,".",a,"=",n,";")):(t(e.cond(u).then(l,".enable(",h,");").else(l,".disable(",h,");")),t(s,".",a,"=",u,";"))}else if(z(u)){var d=o[a];t(l,".",G[a],"(",u,");",u.map(function(e,t){return d+"["+t+"]="+e}).join(";"),";")}else tt(c)?(n=e.link(u,{stable:!0}),t(l,".",G[a],"(",n,");",s,".",a,"=",n,";")):t(l,".",G[a],"(",u,");",s,".",a,"=",u,";")}})}function en(e,t){j&&(e.instancing=t.def(e.shared.extensions,".angle_instanced_arrays"))}function ea(e,t,r,i,n){var a,o,s,l=e.shared,c=e.stats,u=l.current,h=l.timer,d=r.profile;function f(){return typeof performance>"u"?"Date.now()":"performance.now()"}function p(e){e(a=t.def(),"=",f(),";"),"string"==typeof n?e(c,".count+=",n,";"):e(c,".count++;"),y&&(i?e(o=t.def(),"=",h,".getNumPendingQueries();"):e(h,".beginQuery(",c,");"))}function m(e){e(c,".cpuTime+=",f(),"-",a,";"),y&&(i?e(h,".pushScopeStats(",o,",",h,".getNumPendingQueries(),",c,");"):e(h,".endQuery();"))}function g(e){var r=t.def(u,".profile");t(u,".profile=",e,";"),t.exit(u,".profile=",r,";")}if(d){if(tt(d))return void(d.enable?(p(t),m(t.exit),g("true")):g("false"));g(s=d.append(e,t))}else s=t.def(u,".profile");var v=e.block();p(v),t("if(",s,"){",v,"}");var x=e.block();m(x),t.exit("if(",s,"){",x,"}")}function eZ(e,t,r,i,n){var a=e.shared;i.forEach(function(i){var o,s=i.name,l=r.attributes[s];if(l){if(!n(l))return;o=l.append(e,t)}else{if(!n(tn))return;var c=e.scopeAttrib(s);o={},Object.keys(new R).forEach(function(e){o[e]=t.def(c,".",e)})}!function(r,i,n){var o=a.gl,s=t.def(r,".location"),l=t.def(a.attributes,"[",s,"]"),c=n.state,u=n.buffer,h=[n.x,n.y,n.z,n.w],d=["buffer","normalized","offset","stride"];function f(){t("if(!",l,".buffer){",o,".enableVertexAttribArray(",s,");}");var r,a=n.type;if(r=n.size?t.def(n.size,"||",i):i,t("if(",l,".type!==",a,"||",l,".size!==",r,"||",d.map(function(e){return l+"."+e+"!=="+n[e]}).join("||"),"){",o,".bindBuffer(",34962,",",u,".buffer);",o,".vertexAttribPointer(",[s,r,a,n.normalized,n.stride,n.offset],");",l,".type=",a,";",l,".size=",r,";",d.map(function(e){return l+"."+e+"="+n[e]+";"}).join(""),"}"),j){var c=n.divisor;t("if(",l,".divisor!==",c,"){",e.instancing,".vertexAttribDivisorANGLE(",[s,c],");",l,".divisor=",c,";}")}}function p(){t("if(",l,".buffer){",o,".disableVertexAttribArray(",s,");",l,".buffer=null;","}if(",eh.map(function(e,t){return l+"."+e+"!=="+h[t]}).join("||"),"){",o,".vertexAttrib4f(",s,",",h,");",eh.map(function(e,t){return l+"."+e+"="+h[t]+";"}).join(""),"}")}1===c?f():2===c?p():(t("if(",c,"===",1,"){"),f(),t("}else{"),p(),t("}"))}(e.link(i),function(e){switch(e){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(i.info.type),o)})}function e$(e,t,r,n,a,o){for(var s,l=e.shared,c=l.gl,u=0;u1){for(var A=[],S=[],E=0;E>1)",u],");")}function t(){r(h,".drawArraysInstancedANGLE(",[v,x,b,u],");")}g&&"null"!==g?w?e():(r("if(",g,"){"),e(),r("}else{"),t(),r("}")):t()}function M(){function e(){r(f+".drawElements("+[v,b,_,x+"<<(("+_+"-5121)>>1)"]+");")}function t(){r(f+".drawArrays("+[v,x,b]+");")}g&&"null"!==g?w?e():(r("if(",g,"){"),e(),r("}else{"),t(),r("}")):t()}j&&("number"!=typeof u||u>=0)?"string"==typeof u?(r("if(",u,">0){"),T(),r("}else if(",u,"<0){"),M(),r("}")):T():M()}function ta(e,t,r,i,n){var a=Q(),o=a.proc("body",n);return j&&(a.instancing=o.def(a.shared.extensions,".angle_instanced_arrays")),e(a,o,r,i),a.compile().body}function to(e,t,r,i){en(e,t),r.useVAO?r.drawVAO?t(e.shared.vao,".setVAO(",r.drawVAO.append(e,t),");"):t(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(t(e.shared.vao,".setVAO(null);"),eZ(e,t,r,i.attributes,function(){return!0})),e$(e,t,r,i.uniforms,function(){return!0},!1),e0(e,t,t,r)}function ts(e,t,r,i){function n(){return!0}e.batchId="a1",en(e,t),eZ(e,t,r,i.attributes,n),e$(e,t,r,i.uniforms,n,!1),e0(e,t,t,r)}function tl(e,t,r,i){en(e,t);var n=r.contextDep,a=t.def(),o=t.def();e.shared.props=o,e.batchId=a;var s=e.scope(),l=e.scope();function c(e){return e.contextDep&&n||e.propDep}function u(e){return!c(e)}if(t(s.entry,"for(",a,"=0;",a,"<","a1",";++",a,"){",o,"=","a0","[",a,"];",l,"}",s.exit),r.needsContext&&ee(e,l,r.context),r.needsFramebuffer&&et(e,l,r.framebuffer),ei(e,l,r.state,c),r.profile&&c(r.profile)&&ea(e,l,r,!1,!0),i)r.useVAO?r.drawVAO?c(r.drawVAO)?l(e.shared.vao,".setVAO(",r.drawVAO.append(e,l),");"):s(e.shared.vao,".setVAO(",r.drawVAO.append(e,s),");"):s(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(s(e.shared.vao,".setVAO(null);"),eZ(e,s,r,i.attributes,u),eZ(e,l,r,i.attributes,c)),e$(e,s,r,i.uniforms,u,!1),e$(e,l,r,i.uniforms,c,!0),e0(e,s,l,r);else{var h=e.global.def("{}"),d=r.shader.progVar.append(e,l),f=l.def(d,".id"),p=l.def(h,"[",f,"]");l(e.shared.gl,".useProgram(",d,".program);","if(!",p,"){",p,"=",h,"[",f,"]=",e.link(function(t){return ta(ts,e,r,t,2)}),"(",d,");}",p,".call(this,a0[",a,"],",a,");")}}function tc(e,t,i){var n=t.static[i];if(n&&function(e){if(!("object"!=typeof e||z(e))){for(var t=Object.keys(e),r=0;r0)return null;var i=t.static,n=Object.keys(i);if(n.length>0&&"number"==typeof i[n[0]]){for(var a=[],o=0;o0,O={framebuffer:A,draw:E,shader:P,state:L,dirty:D,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(O.profile=function(e){var t,r=e.static,i=e.dynamic;if(eB in r){var n=!!r[eB];(t=tr(function(e,t){return n})).enable=n}else if(eB in i){var a=i[eB];t=ti(a,function(e,t){return e.invoke(t,a)})}return t}(e),m=r.static,g=r.dynamic,y={},Object.keys(m).forEach(function(e){var t,r=m[e];if("number"==typeof r||"boolean"==typeof r)t=tr(function(){return r});else if("function"==typeof r){var i=r._reglType;"texture2d"===i||"textureCube"===i?t=tr(function(e){return e.link(r)}):("framebuffer"===i||"framebufferCube"===i)&&(t=tr(function(e){return e.link(r.color[0])}))}else z(r)&&(t=tr(function(e){return e.global.def("[",h(r.length,function(e){return r[e]}),"]")}));t.value=r,y[e]=t}),Object.keys(g).forEach(function(e){var t=g[e];y[e]=ti(t,function(e,r){return e.invoke(r,t)})}),O.uniforms=y,O.drawVAO=O.scopeVAO=E.vao,!O.drawVAO&&P.program&&!k&&n.angle_instanced_arrays&&E.static.elements){var j=!0,B=P.program.attributes.map(function(e){var r=t.static[e];return j=j&&!!r,r});if(j&&B.length>0){var N=f.getVAO(f.createVAO({attributes:B,elements:E.static.elements}));O.drawVAO=new te(null,null,null,function(e,t){return e.link(N)}),O.useVAO=!0}}return k?O.useVAO=!0:(v=t.static,x=t.dynamic,b={},Object.keys(v).forEach(function(e){var t=v[e],r=i.id(e),n=new R;if(e7(t))n.state=1,n.buffer=l.getBuffer(l.create(t,34962,!1,!0)),n.type=0;else{var a=l.getBuffer(t);if(a)n.state=1,n.buffer=a,n.type=0;else if("constant"in t){var o=t.constant;n.buffer="null",n.state=2,"number"==typeof o?n.x=o:eh.forEach(function(e,t){t"+t+"?"+i+".constant["+t+"]:0;"}).join(""),"}}else{","if(",o,"(",i,".buffer)){",u,"=",s,".createStream(",34962,",",i,".buffer);","}else{",u,"=",s,".getBuffer(",i,".buffer);","}",h,'="type" in ',i,"?",a.glTypes,"[",i,".type]:",u,".dtype;",l.normalized,"=!!",i,".normalized;"),d("size"),d("offset"),d("stride"),d("divisor"),r("}}"),r.exit("if(",l.isStream,"){",s,".destroyStream(",u,");","}"),l})}),O.attributes=b),_=a.static,w=a.dynamic,M={},Object.keys(_).forEach(function(e){var t=_[e];M[e]=tr(function(e,r){return"number"==typeof t||"boolean"==typeof t?""+t:e.link(t)})}),Object.keys(w).forEach(function(e){var t=w[e];M[e]=ti(t,function(e,r){return e.invoke(r,t)})}),O.context=M,O}(t,r,a,o);return m.shader.program&&(m.shader.program.attributes.sort(function(e,t){return e.name0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(d,m),function(e,t){var r=e.proc("scope",3);e.batchId="a2";var n=e.shared,a=n.current;if(ee(e,r,t.context),t.framebuffer&&t.framebuffer.append(e,r),e9(Object.keys(t.state)).forEach(function(i){var a=t.state[i],o=a.append(e,r);z(o)?o.forEach(function(t,n){$(t)?r.set(e.next[i],"["+n+"]",t):r.set(e.next[i],"["+n+"]",e.link(t,{stable:!0}))}):tt(a)?r.set(n.next,"."+i,e.link(o,{stable:!0})):r.set(n.next,"."+i,o)}),ea(e,r,t,!0,!0),[eq,eW,eG,eY,eH].forEach(function(i){var a=t.draw[i];if(a){var o=a.append(e,r);$(o)?r.set(n.draw,"."+i,o):r.set(n.draw,"."+i,e.link(o),{stable:!0})}}),Object.keys(t.uniforms).forEach(function(a){var o=t.uniforms[a].append(e,r);Array.isArray(o)&&(o="["+o.map(function(t){return $(t)?t:e.link(t,{stable:!0})})+"]"),r.set(n.uniforms,"["+e.link(i.id(a),{stable:!0})+"]",o)}),Object.keys(t.attributes).forEach(function(i){var n=t.attributes[i].append(e,r),a=e.scopeAttrib(i);Object.keys(new R).forEach(function(e){r.set(a,"."+e,n[e])})}),t.scopeVAO){var o=t.scopeVAO.append(e,r);$(o)?r.set(n.vao,".targetVAO",o):r.set(n.vao,".targetVAO",e.link(o,{stable:!0}))}function s(i){var a=t.shader[i];if(a){var o=a.append(e,r);$(o)?r.set(n.shader,"."+i,o):r.set(n.shader,"."+i,e.link(o,{stable:!0}))}}s(eU),s(eV),Object.keys(t.state).length>0&&(r(a,".dirty=true;"),r.exit(a,".dirty=true;")),r("a1(",e.shared.context,",a0,",e.batchId,");")}(d,m),function(e,t){var r=e.proc("batch",2);e.batchId="0",en(e,r);var i=!1,n=!0;Object.keys(t.context).forEach(function(e){i=i||t.context[e].propDep}),i||(ee(e,r,t.context),n=!1);var a=t.framebuffer,o=!1;function s(e){return e.contextDep&&i||e.propDep}a?(a.propDep?i=o=!0:a.contextDep&&i&&(o=!0),o||et(e,r,a)):et(e,r,null),t.state.viewport&&t.state.viewport.propDep&&(i=!0),er(e,r,t),ei(e,r,t.state,function(e){return!s(e)}),t.profile&&s(t.profile)||ea(e,r,t,!1,"a1"),t.contextDep=i,t.needsContext=n,t.needsFramebuffer=o;var l=t.shader.progVar;if(l.contextDep&&i||l.propDep)tl(e,r,t,null);else{var c=l.append(e,r);if(r(e.shared.gl,".useProgram(",c,".program);"),t.shader.program)tl(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var u=e.global.def("{}"),h=r.def(c,".id"),d=r.def(u,"[",h,"]");r(e.cond(d).then(d,".call(this,a0,a1);").else(d,"=",u,"[",h,"]=",e.link(function(r){return ta(tl,e,t,r,2)}),"(",c,");",d,".call(this,a0,a1);"))}}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(d,m),e(d.compile(),{destroy:function(){m.shader.program.destroy()}})}}}(_,P,G,tu,th,td,ty,{},tf,tp,tc,e0,W,H,f),tx=function(e,t,r,i){function n(n){var a=null===t.next?5121:t.next.colorAttachments[0].texture._texture.type,o=0,s=0,l=i.framebufferWidth,c=i.framebufferHeight,u=null;g(n)?u=n:n&&(o=0|n.x,s=0|n.y,l=0|(n.width||i.framebufferWidth-o),c=0|(n.height||i.framebufferHeight-s),u=n.data||null),r();var h=l*c*4;return u||(5121===a?u=new Uint8Array(h):5126===a&&(u=u||new Float32Array(h))),e.pixelStorei(3333,4),e.readPixels(o,s,l,c,6408,a,u),u}return function(e){var r;return e&&"framebuffer"in e?(t.setFBO({framebuffer:e.framebuffer},function(){r=n(e)}),r):n(e)}}(_,ty,tv.procs.poll,e0),tb=tv.next,t_=_.canvas,tw=[],tT=[],tM=[],tk=[f.onDestroy],tA=null;function tS(){if(0===tw.length){W&&W.update(),tA=null;return}tA=s.next(tS),tF();for(var e=tw.length-1;e>=0;--e){var t=tw[e];t&&t(e0,null,0)}_.flush(),W&&W.update()}function tE(){!tA&&tw.length>0&&(tA=s.next(tS))}function tC(){tA&&(s.cancel(tS),tA=null)}function tL(e){e.preventDefault(),tC(),tT.forEach(function(e){e()})}function tP(e){_.getError(),L.restore(),tp.restore(),th.restore(),tm.restore(),tg.restore(),ty.restore(),tf.restore(),W&&W.restore(),tv.procs.refresh(),tE(),tM.forEach(function(e){e()})}function tI(t){function r(e,t){var r={},i={};return Object.keys(e).forEach(function(n){var s=e[n];if(a(s)){i[n]=o(s,n);return}if(t&&Array.isArray(s)){for(var l=0;l0)return d.call(this,function(e){for(;p.length=0},read:tx,destroy:function(){tw.length=0,tC(),t_&&(t_.removeEventListener(to,tL),t_.removeEventListener(ts,tP)),tp.clear(),ty.clear(),tg.clear(),tf.clear(),tm.clear(),td.clear(),th.clear(),W&&W.clear(),tk.forEach(function(e){e()})},_gl:_,_refresh:tj,poll:function(){tF(),W&&W.update()},now:tB,stats:F,getCachedCode:function(){return H},preloadCachedCode:function(e){Object.entries(e).forEach(function(e){H[e[0]]=e[1]})}});return f.onDone(null,tN),tN}},"object"==typeof e&&"u">typeof t?t.exports=r():e.createREGL=r()}}),yr=p({"node_modules/gl-util/context.js"(e,t){var r=p6();function i(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function n(e){return"function"==typeof e.getContext&&"width"in e&&"height"in e}function a(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}t.exports=function(e){if(e?"string"==typeof e&&(e={container:e}):e={},(e=n(e)||"string"==typeof(t=e).nodeName&&"function"==typeof t.appendChild&&"function"==typeof t.getBoundingClientRect?{container:e}:"function"==typeof(o=e).drawArrays||"function"==typeof o.drawElements?{gl:e}:r(e,{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)).pixelRatio||(e.pixelRatio=window.pixelRatio||1),e.gl)return e.gl;if(e.canvas&&(e.container=e.canvas.parentNode),e.container){if("string"==typeof e.container){var t,o,s=document.querySelector(e.container);if(!s)throw Error("Element "+e.container+" is not found");e.container=s}n(e.container)?(e.canvas=e.container,e.container=e.canvas.parentNode):e.canvas||(e.canvas=a(),e.container.appendChild(e.canvas),i(e))}else if(!e.canvas)if("u">typeof document)e.container=document.body||document.documentElement,e.canvas=a(),e.container.appendChild(e.canvas),i(e);else throw Error("Not DOM environment. Use headless-gl.");return e.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(t){try{e.gl=e.canvas.getContext(t,e.attrs)}catch{}return e.gl}),e.gl}}}),yi=p({"node_modules/font-atlas/index.js"(e,t){var r=g9(),i=[32,126];t.exports=function(e){var t=(e=e||{}).shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],n=e.canvas||document.createElement("canvas"),a=e.font,o="number"==typeof e.step?[e.step,e.step]:e.step||[32,32],s=e.chars||i;if(a&&"string"!=typeof a&&(a=r(a)),Array.isArray(s)){if(2===s.length&&"number"==typeof s[0]&&"number"==typeof s[1]){for(var l=[],c=s[0],u=0;c<=s[1];c++)l[u++]=String.fromCharCode(c);s=l}}else s=String(s).split("");n.width=(t=t.slice())[0],n.height=t[1];var h=n.getContext("2d");h.fillStyle="#000",h.fillRect(0,0,n.width,n.height),h.font=a,h.textAlign="center",h.textBaseline="middle",h.fillStyle="#fff";for(var d=o[0]/2,f=o[1]/2,c=0;ct[0]-o[0]/2&&(d=o[0]/2,f+=o[1]);return n}}}),yn=p({"node_modules/bit-twiddle/twiddle.js"(e){function t(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),0xff00ff&e&&(t-=8),0xf0f0f0f&e&&(t-=4),0x33333333&e&&(t-=2),0x55555555&e&&(t-=1),t}e.INT_BITS=32,e.INT_MAX=0x7fffffff,e.INT_MIN=-0x80000000,e.sign=function(e){return(e>0)-(e<0)},e.abs=function(e){var t=e>>31;return(e^t)-t},e.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1},e.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:+(e>=10)},e.popCount=function(e){return e-=e>>>1&0x55555555,((e=(0x33333333&e)+(e>>>2&0x33333333))+(e>>>4)&0xf0f0f0f)*0x1010101>>>24},e.countTrailingZeros=t,e.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},e.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},e.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var r=Array(256);(function(e){for(var t=0;t<256;++t){var r=t,i=t,n=7;for(r>>>=1;r;r>>>=1)i<<=1,i|=1&r,--n;e[t]=i<>>8&255]<<16|r[e>>>16&255]<<8|r[e>>>24&255]},e.interleave2=function(e,t){return e&=65535,t&=65535,(e=((e=((e=((e=(e|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=(t|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1},e.deinterleave2=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x55555555)|e>>>1)&0x33333333)|e>>>2)&0xf0f0f0f)|e>>>4)&0xff00ff)|e>>>16)&65535)<<16>>16},e.interleave3=function(e,t,r){return e&=1023,t&=1023,r&=1023,r=((r=((r=((r=(r|r<<16)&0xff0000ff)|r<<8)&0xf00f00f)|r<<4)&0xc30c30c3)|r<<2)&0x49249249,(e=((e=((e=((e=(e|e<<16)&0xff0000ff)|e<<8)&0xf00f00f)|e<<4)&0xc30c30c3)|e<<2)&0x49249249|(t=((t=((t=((t=(t|t<<16)&0xff0000ff)|t<<8)&0xf00f00f)|t<<4)&0xc30c30c3)|t<<2)&0x49249249)<<1)|r<<2},e.deinterleave3=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x49249249)|e>>>2)&0xc30c30c3)|e>>>4)&0xf00f00f)|e>>>8)&0xff0000ff)|e>>>16)&1023)<<22>>22},e.nextCombination=function(e){var r=e|e-1;return r+1|(~r&-~r)-1>>>t(e)+1}}}),ya=p({"node_modules/dup/dup.js"(e,t){t.exports=function(e,t){switch(typeof t>"u"&&(t=0),typeof e){case"number":if(e>0){var r,i,n=0|e,a=t;for(r=Array(n),i=0;itypeof Uint8ClampedArray,a="u">typeof BigUint64Array,o="u">typeof BigInt64Array,s=window.__TYPEDARRAY_POOL;s.UINT8C||(s.UINT8C=r([32,0])),s.BIGUINT64||(s.BIGUINT64=r([32,0])),s.BIGINT64||(s.BIGINT64=r([32,0])),s.BUFFER||(s.BUFFER=r([32,0]));var l=s.DATA,c=s.BUFFER;function u(e){if(e){var r=e.length||e.byteLength;l[t.log2(r)].push(e)}}function h(e){var e=t.nextPow2(e),r=l[t.log2(e)];return r.length>0?r.pop():new ArrayBuffer(e)}function d(e){return new Uint8Array(h(e),0,e)}function f(e){return new Uint16Array(h(2*e),0,e)}function p(e){return new Uint32Array(h(4*e),0,e)}function m(e){return new Int8Array(h(e),0,e)}function g(e){return new Int16Array(h(2*e),0,e)}function y(e){return new Int32Array(h(4*e),0,e)}function v(e){return new Float32Array(h(4*e),0,e)}function x(e){return new Float64Array(h(8*e),0,e)}function b(e){return n?new Uint8ClampedArray(h(e),0,e):d(e)}function _(e){return a?new BigUint64Array(h(8*e),0,e):null}function w(e){return o?new BigInt64Array(h(8*e),0,e):null}function T(e){return new DataView(h(e),0,e)}function M(e){e=t.nextPow2(e);var r=c[t.log2(e)];return r.length>0?r.pop():new i(e)}e.free=function(e){if(i.isBuffer(e))c[t.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var r=e.length||e.byteLength;l[0|t.log2(r)].push(e)}},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=function(e){u(e.buffer)},e.freeArrayBuffer=u,e.freeBuffer=function(e){c[t.log2(e.length)].push(e)},e.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return h(e);switch(t){case"uint8":return d(e);case"uint16":return f(e);case"uint32":return p(e);case"int8":return m(e);case"int16":return g(e);case"int32":return y(e);case"float":case"float32":return v(e);case"double":case"float64":return x(e);case"uint8_clamped":return b(e);case"bigint64":return w(e);case"biguint64":return _(e);case"buffer":return M(e);case"data":case"dataview":return T(e);default:return null}},e.mallocArrayBuffer=h,e.mallocUint8=d,e.mallocUint16=f,e.mallocUint32=p,e.mallocInt8=m,e.mallocInt16=g,e.mallocInt32=y,e.mallocFloat32=e.mallocFloat=v,e.mallocFloat64=e.mallocDouble=x,e.mallocUint8Clamped=b,e.mallocBigUint64=_,e.mallocBigInt64=w,e.mallocDataView=T,e.mallocBuffer=M,e.clearCache=function(){for(var e=0;e<32;++e)s.UINT8[e].length=0,s.UINT16[e].length=0,s.UINT32[e].length=0,s.INT8[e].length=0,s.INT16[e].length=0,s.INT32[e].length=0,s.FLOAT[e].length=0,s.DOUBLE[e].length=0,s.BIGUINT64[e].length=0,s.BIGINT64[e].length=0,s.UINT8C[e].length=0,l[e].length=0,c[e].length=0}}}),ys=p({"node_modules/is-plain-obj/index.js"(e,t){var r=Object.prototype.toString;t.exports=function(e){var t;return"[object Object]"===r.call(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))}}}),yl=p({"node_modules/parse-unit/index.js"(e,t){t.exports=function(e,t){t||(t=[0,""]);var r=parseFloat(e=String(e),10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}}}),yc=p({"node_modules/gl-text/node_modules/to-px/topx.js"(e,t){var r=yl();function i(e,t){var i=r(getComputedStyle(e).getPropertyValue(t));return i[0]*n(i[1],e)}function n(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":var r,n,a,o;return r=e,n=t,(a=document.createElement("div")).style["font-size"]="128"+r,n.appendChild(a),o=i(a,"font-size")/128,n.removeChild(a),o;case"em":return i(t,"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 96;case"cm":return 96/2.54;case"mm":return 96/25.4;case"pt":return 96/72;case"pc":return 16}return 1}t.exports=n}}),yu=p({"node_modules/detect-kerning/index.js"(e,t){t.exports=n;var r=(n.canvas=document.createElement("canvas")).getContext("2d"),i=a([32,126]);function n(e,t){Array.isArray(e)&&(e=e.join(", "));var n,o={},s=16,l=.05;t&&(2===t.length&&"number"==typeof t[0]?n=a(t):Array.isArray(t)?n=t:(t.o?n=a(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(s=t.fontSize),null!=t.threshold&&(l=t.threshold))),n||(n=i),r.font=s+"px "+e;for(var c=0;cs*l){var f=(d-h)/s;o[u]=1e3*f}}return o}function a(e){for(var t=[],r=e[0];r<=e[1];r++)for(var i=String.fromCharCode(r),n=e[0];n0;i-=4)if(0!==r[i])return Math.floor((i-3)*.25/t)}t.exports=r,r.canvas=document.createElement("canvas"),r.cache={}}}),yd=p({"node_modules/gl-text/dist.js"(e,t){var r=ye(),i=p6(),n=yt(),a=yr(),o=gZ(),s=mL(),l=yi(),c=yo(),u=p8(),h=ys(),d=yl(),f=yc(),p=yu(),m=mR(),g=yh(),y=mt(),v=yn().nextPow2,x=new o,b=!1;document.body&&((_=document.body.appendChild(document.createElement("div"))).style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(_).fontStretch&&(b=!0),document.body.removeChild(_));var _,w=function(e){var t;"function"==typeof(t=e)&&t._gl&&t.prop&&t.texture&&t.buffer?(e={regl:e},this.gl=e.regl._gl):this.gl=a(e),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=e.regl||n({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(h(e)?e:{})};w.prototype.createShader=function(){var e=this.regl,t=e({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:e.prop("count"),offset:e.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:e.this("sizeBuffer")},width:{offset:0,stride:8,buffer:e.this("sizeBuffer")},char:e.this("charBuffer"),position:e.this("position")},uniforms:{atlasSize:function(e,t){return[t.atlas.width,t.atlas.height]},atlasDim:function(e,t){return[t.atlas.cols,t.atlas.rows]},atlas:function(e,t){return t.atlas.texture},charStep:function(e,t){return t.atlas.step},em:function(e,t){return t.atlas.em},color:e.prop("color"),opacity:e.prop("opacity"),viewport:e.this("viewportArray"),scale:e.this("scale"),align:e.prop("align"),baseline:e.prop("baseline"),translate:e.this("translate"),positionOffset:e.prop("positionOffset")},primitive:"points",viewport:e.this("viewport"),vert:` +`);if(r&&r[t=function(e){for(var t,r="0123456789abcdef",i="",n=0;n>>4&15)+r.charAt(15&t);return i}(function(e){for(var t=function(e,t){var r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w=[0x6a09e667,-0x4498517b,0x3c6ef372,-0x5ab00ac6,0x510e527f,-0x64fa9774,0x1f83d9ab,0x5be0cd19],T=Array(64);for(e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t,v=0;v>>10,T[x-7]),eo(i=T[x-15],7)^eo(i,18)^i>>>3),T[x-16]),b=el(el(el(el(y,eo(n=p,6)^eo(n,11)^eo(n,25)),(a=p)&m^~a&g),es[x]),T[x]),_=el(eo(o=u,2)^eo(o,13)^eo(o,22),(s=u)&(l=h)^s&(c=d)^l&c),y=g,g=m,m=p,p=el(f,b),f=d,d=h,h=u,u=el(b,_)}w[0]=el(u,w[0]),w[1]=el(h,w[1]),w[2]=el(d,w[2]),w[3]=el(f,w[3]),w[4]=el(p,w[4]),w[5]=el(m,w[5]),w[6]=el(g,w[6]),w[7]=el(y,w[7])}return w}(function(e){for(var t=Array(e.length>>2),r=0;r>5]|=(255&e.charCodeAt(r/8))<<24-r%32;return t}(e),8*e.length),r="",i=0;i<32*t.length;i+=8)r+=String.fromCharCode(t[i>>5]>>>24-i%32&255);return r}(function(e){for(var t,r,i="",n=-1;++n>>6&31,128|63&t):t<=65535?i+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(i+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return i}(i)))])return r[t].apply(null,a);var o=Function.apply(null,n.concat(i));return r&&(r[t]=o),o.apply(null,a)}}}({cache:v}),r=t.link,n=t.global;t.id=J++,t.batchId="0";var a=r(X),o=t.shared={props:"a0"};Object.keys(X).forEach(function(e){o[e]=n.def(a,".",e)});var s=t.next={},l=t.current={};Object.keys(G).forEach(function(e){Array.isArray(U[e])&&(s[e]=n.def(o.next,".",e),l[e]=n.def(o.current,".",e))});var c=t.constants={};Object.keys(K).forEach(function(e){c[e]=n.def(JSON.stringify(K[e]))}),t.invoke=function(e,i){switch(i.type){case 0:var n=["this",o.context,o.props,t.batchId];return e.def(r(i.data),".call(",n.slice(0,Math.max(i.data.length+1,4)),")");case 1:return e.def(o.props,i.data);case 2:return e.def(o.context,i.data);case 3:return e.def("this",i.data);case 4:return i.data.append(t,e),i.data.ref;case 5:return i.data.toString();case 6:return i.data.map(function(r){return t.invoke(e,r)})}},t.attribCache={};var u={};return t.scopeAttrib=function(e){var t=i.id(e);if(t in u)return u[t];var n=f.scope[t];return n||(n=f.scope[t]=new R),u[t]=r(n)},t}function ee(e,t,r){var i=e.shared.context,n=e.scope();Object.keys(r).forEach(function(a){t.save(i,"."+a);var o=r[a].append(e,t);Array.isArray(o)?n(i,".",a,"=[",o.join(),"];"):n(i,".",a,"=",o,";")}),t(n)}function et(e,t,r,i){var n,a=e.shared,o=a.gl,s=a.framebuffer;B&&(n=t.def(a.extensions,".webgl_draw_buffers"));var l,c=e.constants,u=c.drawBuffer,h=c.backBuffer;l=r?r.append(e,t):t.def(s,".next"),i||t("if(",l,"!==",s,".cur){"),t("if(",l,"){",o,".bindFramebuffer(",36160,",",l,".framebuffer);"),B&&t(n,".drawBuffersWEBGL(",u,"[",l,".colorAttachments.length]);"),t("}else{",o,".bindFramebuffer(",36160,",null);"),B&&t(n,".drawBuffersWEBGL(",h,");"),t("}",s,".cur=",l,";"),i||t("}")}function er(e,t,r){var i=e.shared,n=i.gl,a=e.current,o=e.next,s=i.current,l=i.next,c=e.cond(s,".dirty");q.forEach(function(t){var i,u,d=W(t);if(!(d in r.state))if(d in o){i=o[d],u=a[d];var f=h(U[d].length,function(e){return c.def(i,"[",e,"]")});c(e.cond(f.map(function(e,t){return e+"!=="+u+"["+t+"]"}).join("||")).then(n,".",G[d],"(",f,");",f.map(function(e,t){return u+"["+t+"]="+e}).join(";"),";"))}else{i=c.def(l,".",d);var p=e.cond(i,"!==",s,".",d);c(p),d in H?p(e.cond(i).then(n,".enable(",H[d],");").else(n,".disable(",H[d],");"),s,".",d,"=",i,";"):p(n,".",G[d],"(",i,");",s,".",d,"=",i,";")}}),0===Object.keys(r.state).length&&c(s,".dirty=false;"),t(c)}function ei(e,t,r,i){var n,a=e.shared,o=e.current,s=a.current,l=a.gl;e7(Object.keys(r)).forEach(function(a){var c=r[a];if(!(i&&!i(c))){var u=c.append(e,t);if(H[a]){var h=H[a];tt(c)?(n=e.link(u,{stable:!0}),t(e.cond(n).then(l,".enable(",h,");").else(l,".disable(",h,");")),t(s,".",a,"=",n,";")):(t(e.cond(u).then(l,".enable(",h,");").else(l,".disable(",h,");")),t(s,".",a,"=",u,";"))}else if(z(u)){var d=o[a];t(l,".",G[a],"(",u,");",u.map(function(e,t){return d+"["+t+"]="+e}).join(";"),";")}else tt(c)?(n=e.link(u,{stable:!0}),t(l,".",G[a],"(",n,");",s,".",a,"=",n,";")):t(l,".",G[a],"(",u,");",s,".",a,"=",u,";")}})}function en(e,t){j&&(e.instancing=t.def(e.shared.extensions,".angle_instanced_arrays"))}function ea(e,t,r,i,n){var a,o,s,l=e.shared,c=e.stats,u=l.current,h=l.timer,d=r.profile;function f(){return typeof performance>"u"?"Date.now()":"performance.now()"}function p(e){e(a=t.def(),"=",f(),";"),"string"==typeof n?e(c,".count+=",n,";"):e(c,".count++;"),y&&(i?e(o=t.def(),"=",h,".getNumPendingQueries();"):e(h,".beginQuery(",c,");"))}function m(e){e(c,".cpuTime+=",f(),"-",a,";"),y&&(i?e(h,".pushScopeStats(",o,",",h,".getNumPendingQueries(),",c,");"):e(h,".endQuery();"))}function g(e){var r=t.def(u,".profile");t(u,".profile=",e,";"),t.exit(u,".profile=",r,";")}if(d){if(tt(d))return void(d.enable?(p(t),m(t.exit),g("true")):g("false"));g(s=d.append(e,t))}else s=t.def(u,".profile");var v=e.block();p(v),t("if(",s,"){",v,"}");var x=e.block();m(x),t.exit("if(",s,"){",x,"}")}function eZ(e,t,r,i,n){var a=e.shared;i.forEach(function(i){var o,s=i.name,l=r.attributes[s];if(l){if(!n(l))return;o=l.append(e,t)}else{if(!n(tn))return;var c=e.scopeAttrib(s);o={},Object.keys(new R).forEach(function(e){o[e]=t.def(c,".",e)})}!function(r,i,n){var o=a.gl,s=t.def(r,".location"),l=t.def(a.attributes,"[",s,"]"),c=n.state,u=n.buffer,h=[n.x,n.y,n.z,n.w],d=["buffer","normalized","offset","stride"];function f(){t("if(!",l,".buffer){",o,".enableVertexAttribArray(",s,");}");var r,a=n.type;if(r=n.size?t.def(n.size,"||",i):i,t("if(",l,".type!==",a,"||",l,".size!==",r,"||",d.map(function(e){return l+"."+e+"!=="+n[e]}).join("||"),"){",o,".bindBuffer(",34962,",",u,".buffer);",o,".vertexAttribPointer(",[s,r,a,n.normalized,n.stride,n.offset],");",l,".type=",a,";",l,".size=",r,";",d.map(function(e){return l+"."+e+"="+n[e]+";"}).join(""),"}"),j){var c=n.divisor;t("if(",l,".divisor!==",c,"){",e.instancing,".vertexAttribDivisorANGLE(",[s,c],");",l,".divisor=",c,";}")}}function p(){t("if(",l,".buffer){",o,".disableVertexAttribArray(",s,");",l,".buffer=null;","}if(",eh.map(function(e,t){return l+"."+e+"!=="+h[t]}).join("||"),"){",o,".vertexAttrib4f(",s,",",h,");",eh.map(function(e,t){return l+"."+e+"="+h[t]+";"}).join(""),"}")}1===c?f():2===c?p():(t("if(",c,"===",1,"){"),f(),t("}else{"),p(),t("}"))}(e.link(i),function(e){switch(e){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(i.info.type),o)})}function e$(e,t,r,n,a,o){for(var s,l=e.shared,c=l.gl,u=0;u1){for(var A=[],S=[],E=0;E>1)",u],");")}function t(){r(h,".drawArraysInstancedANGLE(",[v,x,b,u],");")}g&&"null"!==g?w?e():(r("if(",g,"){"),e(),r("}else{"),t(),r("}")):t()}function M(){function e(){r(f+".drawElements("+[v,b,_,x+"<<(("+_+"-5121)>>1)"]+");")}function t(){r(f+".drawArrays("+[v,x,b]+");")}g&&"null"!==g?w?e():(r("if(",g,"){"),e(),r("}else{"),t(),r("}")):t()}j&&("number"!=typeof u||u>=0)?"string"==typeof u?(r("if(",u,">0){"),T(),r("}else if(",u,"<0){"),M(),r("}")):T():M()}function ta(e,t,r,i,n){var a=Q(),o=a.proc("body",n);return j&&(a.instancing=o.def(a.shared.extensions,".angle_instanced_arrays")),e(a,o,r,i),a.compile().body}function to(e,t,r,i){en(e,t),r.useVAO?r.drawVAO?t(e.shared.vao,".setVAO(",r.drawVAO.append(e,t),");"):t(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(t(e.shared.vao,".setVAO(null);"),eZ(e,t,r,i.attributes,function(){return!0})),e$(e,t,r,i.uniforms,function(){return!0},!1),e0(e,t,t,r)}function ts(e,t,r,i){function n(){return!0}e.batchId="a1",en(e,t),eZ(e,t,r,i.attributes,n),e$(e,t,r,i.uniforms,n,!1),e0(e,t,t,r)}function tl(e,t,r,i){en(e,t);var n=r.contextDep,a=t.def(),o=t.def();e.shared.props=o,e.batchId=a;var s=e.scope(),l=e.scope();function c(e){return e.contextDep&&n||e.propDep}function u(e){return!c(e)}if(t(s.entry,"for(",a,"=0;",a,"<","a1",";++",a,"){",o,"=","a0","[",a,"];",l,"}",s.exit),r.needsContext&&ee(e,l,r.context),r.needsFramebuffer&&et(e,l,r.framebuffer),ei(e,l,r.state,c),r.profile&&c(r.profile)&&ea(e,l,r,!1,!0),i)r.useVAO?r.drawVAO?c(r.drawVAO)?l(e.shared.vao,".setVAO(",r.drawVAO.append(e,l),");"):s(e.shared.vao,".setVAO(",r.drawVAO.append(e,s),");"):s(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(s(e.shared.vao,".setVAO(null);"),eZ(e,s,r,i.attributes,u),eZ(e,l,r,i.attributes,c)),e$(e,s,r,i.uniforms,u,!1),e$(e,l,r,i.uniforms,c,!0),e0(e,s,l,r);else{var h=e.global.def("{}"),d=r.shader.progVar.append(e,l),f=l.def(d,".id"),p=l.def(h,"[",f,"]");l(e.shared.gl,".useProgram(",d,".program);","if(!",p,"){",p,"=",h,"[",f,"]=",e.link(function(t){return ta(ts,e,r,t,2)}),"(",d,");}",p,".call(this,a0[",a,"],",a,");")}}function tc(e,t,i){var n=t.static[i];if(n&&function(e){if(!("object"!=typeof e||z(e))){for(var t=Object.keys(e),r=0;r0)return null;var i=t.static,n=Object.keys(i);if(n.length>0&&"number"==typeof i[n[0]]){for(var a=[],o=0;o0,O={framebuffer:A,draw:E,shader:P,state:L,dirty:D,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(O.profile=function(e){var t,r=e.static,i=e.dynamic;if(eB in r){var n=!!r[eB];(t=tr(function(e,t){return n})).enable=n}else if(eB in i){var a=i[eB];t=ti(a,function(e,t){return e.invoke(t,a)})}return t}(e),m=r.static,g=r.dynamic,y={},Object.keys(m).forEach(function(e){var t,r=m[e];if("number"==typeof r||"boolean"==typeof r)t=tr(function(){return r});else if("function"==typeof r){var i=r._reglType;"texture2d"===i||"textureCube"===i?t=tr(function(e){return e.link(r)}):("framebuffer"===i||"framebufferCube"===i)&&(t=tr(function(e){return e.link(r.color[0])}))}else z(r)&&(t=tr(function(e){return e.global.def("[",h(r.length,function(e){return r[e]}),"]")}));t.value=r,y[e]=t}),Object.keys(g).forEach(function(e){var t=g[e];y[e]=ti(t,function(e,r){return e.invoke(r,t)})}),O.uniforms=y,O.drawVAO=O.scopeVAO=E.vao,!O.drawVAO&&P.program&&!k&&n.angle_instanced_arrays&&E.static.elements){var j=!0,B=P.program.attributes.map(function(e){var r=t.static[e];return j=j&&!!r,r});if(j&&B.length>0){var N=f.getVAO(f.createVAO({attributes:B,elements:E.static.elements}));O.drawVAO=new te(null,null,null,function(e,t){return e.link(N)}),O.useVAO=!0}}return k?O.useVAO=!0:(v=t.static,x=t.dynamic,b={},Object.keys(v).forEach(function(e){var t=v[e],r=i.id(e),n=new R;if(e9(t))n.state=1,n.buffer=l.getBuffer(l.create(t,34962,!1,!0)),n.type=0;else{var a=l.getBuffer(t);if(a)n.state=1,n.buffer=a,n.type=0;else if("constant"in t){var o=t.constant;n.buffer="null",n.state=2,"number"==typeof o?n.x=o:eh.forEach(function(e,t){t"+t+"?"+i+".constant["+t+"]:0;"}).join(""),"}}else{","if(",o,"(",i,".buffer)){",u,"=",s,".createStream(",34962,",",i,".buffer);","}else{",u,"=",s,".getBuffer(",i,".buffer);","}",h,'="type" in ',i,"?",a.glTypes,"[",i,".type]:",u,".dtype;",l.normalized,"=!!",i,".normalized;"),d("size"),d("offset"),d("stride"),d("divisor"),r("}}"),r.exit("if(",l.isStream,"){",s,".destroyStream(",u,");","}"),l})}),O.attributes=b),_=a.static,w=a.dynamic,M={},Object.keys(_).forEach(function(e){var t=_[e];M[e]=tr(function(e,r){return"number"==typeof t||"boolean"==typeof t?""+t:e.link(t)})}),Object.keys(w).forEach(function(e){var t=w[e];M[e]=ti(t,function(e,r){return e.invoke(r,t)})}),O.context=M,O}(t,r,a,o);return m.shader.program&&(m.shader.program.attributes.sort(function(e,t){return e.name0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(d,m),function(e,t){var r=e.proc("scope",3);e.batchId="a2";var n=e.shared,a=n.current;if(ee(e,r,t.context),t.framebuffer&&t.framebuffer.append(e,r),e7(Object.keys(t.state)).forEach(function(i){var a=t.state[i],o=a.append(e,r);z(o)?o.forEach(function(t,n){$(t)?r.set(e.next[i],"["+n+"]",t):r.set(e.next[i],"["+n+"]",e.link(t,{stable:!0}))}):tt(a)?r.set(n.next,"."+i,e.link(o,{stable:!0})):r.set(n.next,"."+i,o)}),ea(e,r,t,!0,!0),[eq,eW,eG,eY,eH].forEach(function(i){var a=t.draw[i];if(a){var o=a.append(e,r);$(o)?r.set(n.draw,"."+i,o):r.set(n.draw,"."+i,e.link(o),{stable:!0})}}),Object.keys(t.uniforms).forEach(function(a){var o=t.uniforms[a].append(e,r);Array.isArray(o)&&(o="["+o.map(function(t){return $(t)?t:e.link(t,{stable:!0})})+"]"),r.set(n.uniforms,"["+e.link(i.id(a),{stable:!0})+"]",o)}),Object.keys(t.attributes).forEach(function(i){var n=t.attributes[i].append(e,r),a=e.scopeAttrib(i);Object.keys(new R).forEach(function(e){r.set(a,"."+e,n[e])})}),t.scopeVAO){var o=t.scopeVAO.append(e,r);$(o)?r.set(n.vao,".targetVAO",o):r.set(n.vao,".targetVAO",e.link(o,{stable:!0}))}function s(i){var a=t.shader[i];if(a){var o=a.append(e,r);$(o)?r.set(n.shader,"."+i,o):r.set(n.shader,"."+i,e.link(o,{stable:!0}))}}s(eU),s(eV),Object.keys(t.state).length>0&&(r(a,".dirty=true;"),r.exit(a,".dirty=true;")),r("a1(",e.shared.context,",a0,",e.batchId,");")}(d,m),function(e,t){var r=e.proc("batch",2);e.batchId="0",en(e,r);var i=!1,n=!0;Object.keys(t.context).forEach(function(e){i=i||t.context[e].propDep}),i||(ee(e,r,t.context),n=!1);var a=t.framebuffer,o=!1;function s(e){return e.contextDep&&i||e.propDep}a?(a.propDep?i=o=!0:a.contextDep&&i&&(o=!0),o||et(e,r,a)):et(e,r,null),t.state.viewport&&t.state.viewport.propDep&&(i=!0),er(e,r,t),ei(e,r,t.state,function(e){return!s(e)}),t.profile&&s(t.profile)||ea(e,r,t,!1,"a1"),t.contextDep=i,t.needsContext=n,t.needsFramebuffer=o;var l=t.shader.progVar;if(l.contextDep&&i||l.propDep)tl(e,r,t,null);else{var c=l.append(e,r);if(r(e.shared.gl,".useProgram(",c,".program);"),t.shader.program)tl(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var u=e.global.def("{}"),h=r.def(c,".id"),d=r.def(u,"[",h,"]");r(e.cond(d).then(d,".call(this,a0,a1);").else(d,"=",u,"[",h,"]=",e.link(function(r){return ta(tl,e,t,r,2)}),"(",c,");",d,".call(this,a0,a1);"))}}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(d,m),e(d.compile(),{destroy:function(){m.shader.program.destroy()}})}}}(_,P,G,tu,th,td,ty,{},tf,tp,tc,e0,W,H,f),tx=function(e,t,r,i){function n(n){var a=null===t.next?5121:t.next.colorAttachments[0].texture._texture.type,o=0,s=0,l=i.framebufferWidth,c=i.framebufferHeight,u=null;g(n)?u=n:n&&(o=0|n.x,s=0|n.y,l=0|(n.width||i.framebufferWidth-o),c=0|(n.height||i.framebufferHeight-s),u=n.data||null),r();var h=l*c*4;return u||(5121===a?u=new Uint8Array(h):5126===a&&(u=u||new Float32Array(h))),e.pixelStorei(3333,4),e.readPixels(o,s,l,c,6408,a,u),u}return function(e){var r;return e&&"framebuffer"in e?(t.setFBO({framebuffer:e.framebuffer},function(){r=n(e)}),r):n(e)}}(_,ty,tv.procs.poll,e0),tb=tv.next,t_=_.canvas,tw=[],tT=[],tM=[],tk=[f.onDestroy],tA=null;function tS(){if(0===tw.length){W&&W.update(),tA=null;return}tA=s.next(tS),tF();for(var e=tw.length-1;e>=0;--e){var t=tw[e];t&&t(e0,null,0)}_.flush(),W&&W.update()}function tE(){!tA&&tw.length>0&&(tA=s.next(tS))}function tC(){tA&&(s.cancel(tS),tA=null)}function tL(e){e.preventDefault(),tC(),tT.forEach(function(e){e()})}function tP(e){_.getError(),L.restore(),tp.restore(),th.restore(),tm.restore(),tg.restore(),ty.restore(),tf.restore(),W&&W.restore(),tv.procs.refresh(),tE(),tM.forEach(function(e){e()})}function tI(t){function r(e,t){var r={},i={};return Object.keys(e).forEach(function(n){var s=e[n];if(a(s)){i[n]=o(s,n);return}if(t&&Array.isArray(s)){for(var l=0;l0)return d.call(this,function(e){for(;p.length=0},read:tx,destroy:function(){tw.length=0,tC(),t_&&(t_.removeEventListener(to,tL),t_.removeEventListener(ts,tP)),tp.clear(),ty.clear(),tg.clear(),tf.clear(),tm.clear(),td.clear(),th.clear(),W&&W.clear(),tk.forEach(function(e){e()})},_gl:_,_refresh:tj,poll:function(){tF(),W&&W.update()},now:tB,stats:F,getCachedCode:function(){return H},preloadCachedCode:function(e){Object.entries(e).forEach(function(e){H[e[0]]=e[1]})}});return f.onDone(null,tN),tN}},"object"==typeof e&&"u">typeof t?t.exports=r():e.createREGL=r()}}),yr=p({"node_modules/gl-util/context.js"(e,t){var r=p6();function i(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function n(e){return"function"==typeof e.getContext&&"width"in e&&"height"in e}function a(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}t.exports=function(e){if(e?"string"==typeof e&&(e={container:e}):e={},(e=n(e)||"string"==typeof(t=e).nodeName&&"function"==typeof t.appendChild&&"function"==typeof t.getBoundingClientRect?{container:e}:"function"==typeof(o=e).drawArrays||"function"==typeof o.drawElements?{gl:e}:r(e,{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)).pixelRatio||(e.pixelRatio=window.pixelRatio||1),e.gl)return e.gl;if(e.canvas&&(e.container=e.canvas.parentNode),e.container){if("string"==typeof e.container){var t,o,s=document.querySelector(e.container);if(!s)throw Error("Element "+e.container+" is not found");e.container=s}n(e.container)?(e.canvas=e.container,e.container=e.canvas.parentNode):e.canvas||(e.canvas=a(),e.container.appendChild(e.canvas),i(e))}else if(!e.canvas)if("u">typeof document)e.container=document.body||document.documentElement,e.canvas=a(),e.container.appendChild(e.canvas),i(e);else throw Error("Not DOM environment. Use headless-gl.");return e.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(t){try{e.gl=e.canvas.getContext(t,e.attrs)}catch{}return e.gl}),e.gl}}}),yi=p({"node_modules/font-atlas/index.js"(e,t){var r=g7(),i=[32,126];t.exports=function(e){var t=(e=e||{}).shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],n=e.canvas||document.createElement("canvas"),a=e.font,o="number"==typeof e.step?[e.step,e.step]:e.step||[32,32],s=e.chars||i;if(a&&"string"!=typeof a&&(a=r(a)),Array.isArray(s)){if(2===s.length&&"number"==typeof s[0]&&"number"==typeof s[1]){for(var l=[],c=s[0],u=0;c<=s[1];c++)l[u++]=String.fromCharCode(c);s=l}}else s=String(s).split("");n.width=(t=t.slice())[0],n.height=t[1];var h=n.getContext("2d");h.fillStyle="#000",h.fillRect(0,0,n.width,n.height),h.font=a,h.textAlign="center",h.textBaseline="middle",h.fillStyle="#fff";for(var d=o[0]/2,f=o[1]/2,c=0;ct[0]-o[0]/2&&(d=o[0]/2,f+=o[1]);return n}}}),yn=p({"node_modules/bit-twiddle/twiddle.js"(e){function t(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),0xff00ff&e&&(t-=8),0xf0f0f0f&e&&(t-=4),0x33333333&e&&(t-=2),0x55555555&e&&(t-=1),t}e.INT_BITS=32,e.INT_MAX=0x7fffffff,e.INT_MIN=-0x80000000,e.sign=function(e){return(e>0)-(e<0)},e.abs=function(e){var t=e>>31;return(e^t)-t},e.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1},e.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:+(e>=10)},e.popCount=function(e){return e-=e>>>1&0x55555555,((e=(0x33333333&e)+(e>>>2&0x33333333))+(e>>>4)&0xf0f0f0f)*0x1010101>>>24},e.countTrailingZeros=t,e.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},e.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},e.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var r=Array(256);(function(e){for(var t=0;t<256;++t){var r=t,i=t,n=7;for(r>>>=1;r;r>>>=1)i<<=1,i|=1&r,--n;e[t]=i<>>8&255]<<16|r[e>>>16&255]<<8|r[e>>>24&255]},e.interleave2=function(e,t){return e&=65535,t&=65535,(e=((e=((e=((e=(e|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=(t|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1},e.deinterleave2=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x55555555)|e>>>1)&0x33333333)|e>>>2)&0xf0f0f0f)|e>>>4)&0xff00ff)|e>>>16)&65535)<<16>>16},e.interleave3=function(e,t,r){return e&=1023,t&=1023,r&=1023,r=((r=((r=((r=(r|r<<16)&0xff0000ff)|r<<8)&0xf00f00f)|r<<4)&0xc30c30c3)|r<<2)&0x49249249,(e=((e=((e=((e=(e|e<<16)&0xff0000ff)|e<<8)&0xf00f00f)|e<<4)&0xc30c30c3)|e<<2)&0x49249249|(t=((t=((t=((t=(t|t<<16)&0xff0000ff)|t<<8)&0xf00f00f)|t<<4)&0xc30c30c3)|t<<2)&0x49249249)<<1)|r<<2},e.deinterleave3=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x49249249)|e>>>2)&0xc30c30c3)|e>>>4)&0xf00f00f)|e>>>8)&0xff0000ff)|e>>>16)&1023)<<22>>22},e.nextCombination=function(e){var r=e|e-1;return r+1|(~r&-~r)-1>>>t(e)+1}}}),ya=p({"node_modules/dup/dup.js"(e,t){t.exports=function(e,t){switch(typeof t>"u"&&(t=0),typeof e){case"number":if(e>0){var r,i,n=0|e,a=t;for(r=Array(n),i=0;itypeof Uint8ClampedArray,a="u">typeof BigUint64Array,o="u">typeof BigInt64Array,s=window.__TYPEDARRAY_POOL;s.UINT8C||(s.UINT8C=r([32,0])),s.BIGUINT64||(s.BIGUINT64=r([32,0])),s.BIGINT64||(s.BIGINT64=r([32,0])),s.BUFFER||(s.BUFFER=r([32,0]));var l=s.DATA,c=s.BUFFER;function u(e){if(e){var r=e.length||e.byteLength;l[t.log2(r)].push(e)}}function h(e){var e=t.nextPow2(e),r=l[t.log2(e)];return r.length>0?r.pop():new ArrayBuffer(e)}function d(e){return new Uint8Array(h(e),0,e)}function f(e){return new Uint16Array(h(2*e),0,e)}function p(e){return new Uint32Array(h(4*e),0,e)}function m(e){return new Int8Array(h(e),0,e)}function g(e){return new Int16Array(h(2*e),0,e)}function y(e){return new Int32Array(h(4*e),0,e)}function v(e){return new Float32Array(h(4*e),0,e)}function x(e){return new Float64Array(h(8*e),0,e)}function b(e){return n?new Uint8ClampedArray(h(e),0,e):d(e)}function _(e){return a?new BigUint64Array(h(8*e),0,e):null}function w(e){return o?new BigInt64Array(h(8*e),0,e):null}function T(e){return new DataView(h(e),0,e)}function M(e){e=t.nextPow2(e);var r=c[t.log2(e)];return r.length>0?r.pop():new i(e)}e.free=function(e){if(i.isBuffer(e))c[t.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var r=e.length||e.byteLength;l[0|t.log2(r)].push(e)}},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=function(e){u(e.buffer)},e.freeArrayBuffer=u,e.freeBuffer=function(e){c[t.log2(e.length)].push(e)},e.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return h(e);switch(t){case"uint8":return d(e);case"uint16":return f(e);case"uint32":return p(e);case"int8":return m(e);case"int16":return g(e);case"int32":return y(e);case"float":case"float32":return v(e);case"double":case"float64":return x(e);case"uint8_clamped":return b(e);case"bigint64":return w(e);case"biguint64":return _(e);case"buffer":return M(e);case"data":case"dataview":return T(e);default:return null}},e.mallocArrayBuffer=h,e.mallocUint8=d,e.mallocUint16=f,e.mallocUint32=p,e.mallocInt8=m,e.mallocInt16=g,e.mallocInt32=y,e.mallocFloat32=e.mallocFloat=v,e.mallocFloat64=e.mallocDouble=x,e.mallocUint8Clamped=b,e.mallocBigUint64=_,e.mallocBigInt64=w,e.mallocDataView=T,e.mallocBuffer=M,e.clearCache=function(){for(var e=0;e<32;++e)s.UINT8[e].length=0,s.UINT16[e].length=0,s.UINT32[e].length=0,s.INT8[e].length=0,s.INT16[e].length=0,s.INT32[e].length=0,s.FLOAT[e].length=0,s.DOUBLE[e].length=0,s.BIGUINT64[e].length=0,s.BIGINT64[e].length=0,s.UINT8C[e].length=0,l[e].length=0,c[e].length=0}}}),ys=p({"node_modules/is-plain-obj/index.js"(e,t){var r=Object.prototype.toString;t.exports=function(e){var t;return"[object Object]"===r.call(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))}}}),yl=p({"node_modules/parse-unit/index.js"(e,t){t.exports=function(e,t){t||(t=[0,""]);var r=parseFloat(e=String(e),10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}}}),yc=p({"node_modules/gl-text/node_modules/to-px/topx.js"(e,t){var r=yl();function i(e,t){var i=r(getComputedStyle(e).getPropertyValue(t));return i[0]*n(i[1],e)}function n(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":var r,n,a,o;return r=e,n=t,(a=document.createElement("div")).style["font-size"]="128"+r,n.appendChild(a),o=i(a,"font-size")/128,n.removeChild(a),o;case"em":return i(t,"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 96;case"cm":return 96/2.54;case"mm":return 96/25.4;case"pt":return 96/72;case"pc":return 16}return 1}t.exports=n}}),yu=p({"node_modules/detect-kerning/index.js"(e,t){t.exports=n;var r=(n.canvas=document.createElement("canvas")).getContext("2d"),i=a([32,126]);function n(e,t){Array.isArray(e)&&(e=e.join(", "));var n,o={},s=16,l=.05;t&&(2===t.length&&"number"==typeof t[0]?n=a(t):Array.isArray(t)?n=t:(t.o?n=a(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(s=t.fontSize),null!=t.threshold&&(l=t.threshold))),n||(n=i),r.font=s+"px "+e;for(var c=0;cs*l){var f=(d-h)/s;o[u]=1e3*f}}return o}function a(e){for(var t=[],r=e[0];r<=e[1];r++)for(var i=String.fromCharCode(r),n=e[0];n0;i-=4)if(0!==r[i])return Math.floor((i-3)*.25/t)}t.exports=r,r.canvas=document.createElement("canvas"),r.cache={}}}),yd=p({"node_modules/gl-text/dist.js"(e,t){var r=ye(),i=p6(),n=yt(),a=yr(),o=gZ(),s=mL(),l=yi(),c=yo(),u=p8(),h=ys(),d=yl(),f=yc(),p=yu(),m=mR(),g=yh(),y=mt(),v=yn().nextPow2,x=new o,b=!1;document.body&&((_=document.body.appendChild(document.createElement("div"))).style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(_).fontStretch&&(b=!0),document.body.removeChild(_));var _,w=function(e){var t;"function"==typeof(t=e)&&t._gl&&t.prop&&t.texture&&t.buffer?(e={regl:e},this.gl=e.regl._gl):this.gl=a(e),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=e.regl||n({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(h(e)?e:{})};w.prototype.createShader=function(){var e=this.regl,t=e({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:e.prop("count"),offset:e.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:e.this("sizeBuffer")},width:{offset:0,stride:8,buffer:e.this("sizeBuffer")},char:e.this("charBuffer"),position:e.this("position")},uniforms:{atlasSize:function(e,t){return[t.atlas.width,t.atlas.height]},atlasDim:function(e,t){return[t.atlas.cols,t.atlas.rows]},atlas:function(e,t){return t.atlas.texture},charStep:function(e,t){return t.atlas.step},em:function(e,t){return t.atlas.em},color:e.prop("color"),opacity:e.prop("opacity"),viewport:e.this("viewportArray"),scale:e.this("scale"),align:e.prop("align"),baseline:e.prop("baseline"),translate:e.this("translate"),positionOffset:e.prop("positionOffset")},primitive:"points",viewport:e.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -2692,9 +2692,9 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`});return{regl:e,draw:t,atlas:{}}},w.prototype.update=function(e){var t,n,a=this;if("string"==typeof e)e={text:e};else if(!e)return;null!=(e=i(e,{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)).opacity&&(Array.isArray(e.opacity)?this.opacity=e.opacity.map(function(e){return parseFloat(e)}):this.opacity=parseFloat(e.opacity)),null!=e.viewport&&(this.viewport=u(e.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(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]),null!=e.kerning&&(this.kerning=e.kerning),null!=e.offset&&("number"==typeof e.offset&&(e.offset=[e.offset,0]),this.positionOffset=y(e.offset)),e.direction&&(this.direction=e.direction),e.range&&(this.range=e.range,this.scale=[1/(e.range[2]-e.range[0]),1/(e.range[3]-e.range[1])],this.translate=[-e.range[0],-e.range[1]]),e.scale&&(this.scale=e.scale),e.translate&&(this.translate=e.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||e.font||(e.font=w.baseFontSize+"px sans-serif");var o=!1,h=!1;if(e.font&&(Array.isArray(e.font)?e.font:[e.font]).forEach(function(e,t){if("string"==typeof e)try{e=r.parse(e)}catch{e=r.parse(w.baseFontSize+"px "+e)}else{var i=e.style,n=e.weight,s=e.stretch,l=e.variant;e=r.parse(r.stringify(e)),i&&(e.style=i),n&&(e.weight=n),s&&(e.stretch=s),l&&(e.variant=l)}var c=r.stringify({size:w.baseFontSize,family:e.family,stretch:b?e.stretch:void 0,variant:e.variant,weight:e.weight,style:e.style}),u=d(e.size),p=Math.round(u[0]*f(u[1]));if(p!==a.fontSize[t]&&(h=!0,a.fontSize[t]=p),(!a.font[t]||c!=a.font[t].baseString)&&(o=!0,a.font[t]=w.fonts[c],!a.font[t])){var m=e.family.join(", "),y=[e.style];e.style!=e.variant&&y.push(e.variant),e.variant!=e.weight&&y.push(e.weight),b&&e.weight!=e.stretch&&y.push(e.stretch),a.font[t]={baseString:c,family:m,weight:e.weight,stretch:e.stretch,style:e.style,variant:e.variant,width:{},kerning:{},metrics:g(m,{origin:"top",fontSize:w.baseFontSize,fontStyle:y.join(" ")})},w.fonts[c]=a.font[t]}}),(o||h)&&this.font.forEach(function(t,i){var n=r.stringify({size:a.fontSize[i],family:t.family,stretch:b?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style});if(a.fontAtlas[i]=a.shader.atlas[n],!a.fontAtlas[i]){var o=t.metrics;a.shader.atlas[n]=a.fontAtlas[i]={fontString:n,step:2*Math.ceil(a.fontSize[i]*o.bottom*.5),em:a.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:a.regl.texture()}}null==e.text&&(e.text=a.text)}),"string"==typeof e.text&&e.position&&e.position.length>2){for(var x=Array(.5*e.position.length),_=0;_2){for(var M=!e.position[0].length,k=c.mallocFloat(2*this.count),A=0,S=0;A1?a.align[t]:a.align[0]:a.align;if("number"==typeof r)return r;switch(r){case"right":case"end":return-e;case"center":case"centre":case"middle":return-(.5*e)}return 0})),null==this.baseline&&null==e.baseline&&(e.baseline=0),null!=e.baseline&&(this.baseline=e.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(e,t){var r,i=(a.font[t]||a.font[0]).metrics;return r=0+.5*i.bottom,"number"==typeof e?r+=e-i.baseline:r+=-i[e],r*=-1})),null!=e.color)if(e.color||(e.color="transparent"),"string"!=typeof e.color&&isNaN(e.color)){if("number"==typeof e.color[0]&&e.color.length>this.counts.length){var G=e.color.length;n=c.mallocUint8(G);for(var W=(e.color.subarray||e.color.slice).bind(e.color),Y=0;Y4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var X=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(X);for(var K=0;K1?this.counts[K]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[K]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*K,4*K+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[K]:this.opacity,baseline:null!=this.baselineOffset[K]?this.baselineOffset[K]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[K]?this.alignOffset[K]:this.alignOffset[0]:0,atlas:this.fontAtlas[K]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*K,2*K+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=[]},w.prototype.destroy=function(){},w.prototype.kerning=!0,w.prototype.position={constant:new Float32Array(2)},w.prototype.translate=null,w.prototype.scale=null,w.prototype.font=null,w.prototype.text="",w.prototype.positionOffset=[0,0],w.prototype.opacity=1,w.prototype.color=new Uint8Array([0,0,0,255]),w.prototype.alignOffset=[0,0],w.maxAtlasSize=1024,w.atlasCanvas=document.createElement("canvas"),w.atlasContext=w.atlasCanvas.getContext("2d",{alpha:!1}),w.baseFontSize=64,w.fonts={},t.exports=w}}),yf=p({"src/lib/prepare_regl.js"(e,t){var r=fT(),i=yt();t.exports=function(e,t,n){var a=e._fullLayout,o=!0;return a._glcanvas.each(function(r){if(r.regl)return void r.regl.preloadCachedCode(n);if(!(r.pick&&!a._has("parcoords"))){try{r.regl=i({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||window.devicePixelRatio,extensions:t||[],cachedCode:n||{}})}catch{o=!1}r.regl||(o=!1),o&&this.addEventListener("webglcontextlost",function(t){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:t,layer:r.key})},!1)}}),o||r({container:a._glcontainer.node()}),o}}}),yp=p({"src/traces/scattergl/plot.js"(e,t){var r=mO(),i=gX(),n=gK(),a=yd(),o=tv(),s=rO().selectMode,l=yf(),c=t5(),u=i7(),h=mM().styleTextSelection,d={},e=t.exports=function(e,t,f){if(f.length){var p,m,g=e._fullLayout,y=t._scene,v=t.xaxis,x=t.yaxis;if(y){if(!l(e,["ANGLE_instanced_arrays","OES_element_index_uint"],d))return void y.init();var b,_,w,T,M,k,A,S,E,C,L=y.count,P=g._glcanvas.data()[0].regl;if(u(e,t,f),y.dirty){if((y.line2d||y.error2d)&&!(y.scatter2d||y.fill2d||y.glText)&&P.clear({color:!0,depth:!0}),!0===y.error2d&&(y.error2d=n(P)),!0===y.line2d&&(y.line2d=i(P)),!0===y.scatter2d&&(y.scatter2d=r(P)),!0===y.fill2d&&(y.fill2d=i(P)),!0===y.glText)for(y.glText=Array(L),p=0;py.glText.length){var I=L-y.glText.length;for(p=0;pr&&(isNaN(t[i])||isNaN(t[i+1]));)i-=2;e.positions=t.slice(r,i+2)}return e}),y.line2d.update(y.lineOptions)),y.error2d){var D=(y.errorXOptions||[]).concat(y.errorYOptions||[]).map(function(e){return e||{positions:[],errors:[]}});y.error2d.update(D)}y.scatter2d&&y.scatter2d.update(y.markerOptions),y.fillOrder=o.repeat(null,L),y.fill2d&&(y.fillOptions=y.fillOptions.map(function(e,t){var r=f[t];if(!(!e||!r||!r[0]||!r[0].trace)){var i,n,a=r[0],o=a.trace,s=a.t,l=y.lineOptions[t],c=[];o._ownfill&&c.push(t),o._nexttrace&&c.push(t+1),c.length&&(y.fillOrder[t]=c);var u,h,d=[],p=l&&l.positions||s.positions;if("tozeroy"===o.fill){for(u=0;uu&&isNaN(p[h+1]);)h-=2;0!==p[u+1]&&(d=[p[u],0]),d=d.concat(p.slice(u,h+2)),0!==p[h+1]&&(d=d.concat([p[h],0]))}else if("tozerox"===o.fill){for(u=0;uu&&isNaN(p[h]);)h-=2;0!==p[u]&&(d=[0,p[u+1]]),d=d.concat(p.slice(u,h+2)),0!==p[h]&&(d=d.concat([0,p[h+1]]))}else if("toself"===o.fill||"tonext"===o.fill){for(d=[],i=0,e.splitNull=!0,n=0;n-1;for(let[e]of f)if(e){var F=e.trace,j=e.t,B=j.index,N=F._length,U=j.x,V=j.y;if(F.selectedpoints||O||R){if(O||(O=!0),F.selectedpoints){var q=y.selectBatch[B]=F.selectedpoints,H={};for(m=0;mn&&s||ih?b.sizeAvg||Math.max(b.size,3):n(t,x),p=0;ptypeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:"u">typeof S&&null!==S&&S.hrtime?(t.exports=function(){return(e()-n)/1e6},r=S.hrtime,n=(e=function(){var e;return 1e9*(e=r())[0]+e[1]})()-1e9*S.uptime()):Date.now?(t.exports=function(){return Date.now()-i},i=Date.now()):(t.exports=function(){return new Date().getTime()-i},i=new Date().getTime())}).call(e)}}),yT=p({"node_modules/raf/index.js"(e,t){var r,i,n,a,o,s=yw(),l=window,c=["moz","webkit"],u="AnimationFrame",h=l["request"+u],d=l["cancel"+u]||l["cancelRequest"+u];for(r=0;!h&&r2?(s[0],s[2],i=s[1],n=s[3]):s.length?(i=s[0],n=s[1]):(s.x,i=s.y,s.x+s.width,n=s.y+s.height),l.length>2?(a=l[0],o=l[2],l[1],l[3]):l.length?(a=l[0],o=l[1]):(a=l.x,l.y,o=l.x+l.width,l.y+l.height),[a,i,o,n]}function h(e){if("number"==typeof e)return[e,e,e,e];if(2===e.length)return[e[0],e[1],e[0],e[1]];{let t=s(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}t.exports=c,c.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=a(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,a(()=>{this.dirty=!1})),this)},c.prototype.update=function(...e){if(!e.length)return;for(let t=0;tt||!c.lower&&e{t[a+r]=i})}this.scatter.draw(...t)}else this.scatter.draw();return this},c.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this}}}),yA=p({"src/traces/splom/plot.js"(e,t){var r=yk(),i=tv(),n=tC(),a=rO().selectMode;t.exports=function(e,t,o){if(o.length)for(var s=0;s-1,C=a(x)||!!f.selectedpoints||E,L=!0;if(C){var P=f._length;if(f.selectedpoints){m.selectBatch=f.selectedpoints;var I=f.selectedpoints,z={};for(l=0;l=t[r][0]&&e<=t[r][1])return!0;return!1}(r,i))return r;var n=e?-1:1,a=0,o=t.length-1;if(n<0){var s=a;a=o,o=s}for(var u=t[a],h=u,d=a;n*dt){f=i;break}}if(isNaN(o=h)&&(o=isNaN(d)||isNaN(f)?isNaN(d)?f:d:t-u[d][1]e[1]+i||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}(g,t);y&&(s.interval=c[o],s.intervalPix=g,s.region=y)}}if(e.ordinal&&!s.region){var v=e.unitTickvals,x=e.unitToPaddedPx.invert(t);for(i=0;i=b[0]&&x<=b[1]){s.clickableOrdinalRange=b;break}}}return s}function x(e,t){i.event.sourceEvent.stopPropagation();var n=t.height-i.mouse(e)[1]-2*r.verticalPadding,a=t.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[n-a.grabPoint,n+a.barLength-a.grabPoint].map(t.unitToPaddedPx.invert):a.newExtent=[a.startExtent,t.unitToPaddedPx.invert(n)].sort(o),t.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(t),y(e.parentNode)}function b(e,t){var n=t.height-i.mouse(e)[1]-2*r.verticalPadding,a=v(t,n),o="crosshair";a.clickableOrdinalRange?o="pointer":a.region&&(o=a.region+"-resize"),i.select(document.body).style("cursor",o)}function _(e){e.on("mousemove",function(e){i.event.preventDefault(),e.parent.inBrushDrag||b(this,e)}).on("mouseleave",function(e){e.parent.inBrushDrag||m()}).call(i.behavior.drag().on("dragstart",function(e){!function(e,t){i.event.sourceEvent.stopPropagation();var n=t.height-i.mouse(e)[1]-2*r.verticalPadding,a=t.unitToPaddedPx.invert(n),o=t.brush,s=v(t,n),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar="ns"===s.region,c.grabbingBar){var u=l.map(t.unitToPaddedPx);c.grabPoint=n-u[0]-r.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=t.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter(function(e){return e[0]!==l[0]&&e[1]!==l[1]})),c.startExtent=s.region?l[+("s"===s.region)]:a,t.parent.inBrushDrag=!0,c.brushStartCallback()}(this,e)}).on("drag",function(e){x(this,e)}).on("dragend",function(e){!function(e,t){var r=t.brush,n=r.filter,a=r.svgBrush;a._dragging||(b(e,t),x(e,t),t.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,t.parent.inBrushDrag=!1,m(),!a.wasDragged){a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&t.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&M(r)):M(r),a.brushCallback(t),y(e.parentNode),a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(c?[a.newExtent]:[]),a.extent.length||M(r),a.brushCallback(t),c?y(e.parentNode,s):(s(),y(e.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,e)}))}function w(e,t){return e[0]-t[0]}function M(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function k(e){for(var t,r=e.slice(),i=[],n=r.shift();n;){for(t=n.slice();(n=r.shift())&&n[0]<=t[1];)t[1]=Math.max(t[1],n[1]);i.push(t)}return 1===i.length&&i[0][0]>i[0][1]&&(i=[]),i}t.exports={makeBrush:function(e,t,r,i,n,a){var s,l,c,u=(c=[],{set:function(e){1===(c=e.map(function(e){return e.slice().sort(o)}).sort(w)).length&&c[0][0]===-1/0&&c[0][1]===1/0&&(c=[[0,-1]]),s=k(c),l=c.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0])},get:function(){return c.slice()},getConsolidated:function(){return s},getBounds:function(){return l}});return u.set(r),{filter:u,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:i,brushCallback:function(e){var t=e.brush,r=t.svgBrush.extent.map(function(e){return e.slice()}).slice();t.filter.set(r),n()},brushEndCallback:a}}},ensureAxisBrush:function(e,t,i){var o,l,c,u,f=e.selectAll("."+r.cn.axisBrush).data(a,n);f.enter().append("g").classed(r.cn.axisBrush,!0),o=i._context.staticPlot,(l=f.selectAll(".background").data(a)).enter().append("rect").classed("background",!0).call(h).call(d).style("pointer-events",o?"none":"auto").attr("transform",s(0,r.verticalPadding)),l.call(_).attr("height",function(e){return e.height-r.verticalPadding}),(c=f.selectAll(".highlight-shadow").data(a)).enter().append("line").classed("highlight-shadow",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width+r.bar.strokeWidth).attr("stroke",t).attr("opacity",r.bar.strokeOpacity).attr("stroke-linecap","butt"),c.attr("y1",function(e){return e.height}).call(g),(u=f.selectAll(".highlight").data(a)).enter().append("line").classed("highlight",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width-r.bar.strokeWidth).attr("stroke",r.bar.fillColor).attr("opacity",r.bar.fillOpacity).attr("stroke-linecap","butt"),u.attr("y1",function(e){return e.height}).call(g)},cleanRanges:function(e,t){if(Array.isArray(e[0])?(e=e.map(function(e){return e.sort(o)}),e=t.multiselect?k(e.sort(w)):[e[0]]):e=[e.sort(o)],t.tickvals){var r=t.tickvals.slice().sort(o);if(!(e=e.map(function(e){var t=[u(0,r,e[0],[]),u(1,r,e[1],[])];if(t[1]>t[0])return t}).filter(function(e){return e})).length)return}return e.length>1?e:e[0]}}}}),yB=p({"src/traces/parcoords/defaults.js"(e,t){var r=tv(),i=tj().hasColorscale,n=tQ(),a=at().defaults,o=t$(),s=rn(),l=yO(),c=yj(),u=yR().maxDimensionCount,h=yv();function d(e,t,i,n){function a(i,n){return r.coerce(e,t,l.dimensions,i,n)}var o=a("values"),u=a("visible");if(o&&o.length||(u=t.visible=!1),u){a("label"),a("tickvals"),a("ticktext"),a("tickformat"),t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:a("range")},s.setConvert(t._ax,n.layout),a("multiselect");var h=a("constraintrange");h&&(t.constraintrange=c.cleanRanges(h,t))}}t.exports=function(e,t,s,c){function f(i,n){return r.coerce(e,t,l,i,n)}var p=e.dimensions;Array.isArray(p)&&p.length>u&&(r.log("parcoords traces support up to "+u+" dimensions at the moment"),p.splice(u));var m=o(e,t,{name:"dimensions",layout:c,handleItemDefaults:d}),g=function(e,t,a,o,s){var l=s("line.color",a);if(i(e,"line")&&r.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),n(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=a}return 1/0}(e,t,s,c,f);a(t,c,f),Array.isArray(m)&&m.length||(t.visible=!1),h(t,m,"values",g);var y=r.extendFlat({},c.font,{size:Math.round(c.font.size/1.2)});r.coerceFont(f,"labelfont",y),r.coerceFont(f,"tickfont",y,{autoShadowDflt:!0}),r.coerceFont(f,"rangefont",y),f("labelangle"),f("labelside"),f("unselected.line.color"),f("unselected.line.opacity")}}}),yN=p({"src/traces/parcoords/calc.js"(e,t){var r=tv().isArrayOrTypedArray,i=t3(),n=yF().wrap;t.exports=function(e,t){var a,o;return i.hasColorscale(t,"line")&&r(t.line.color)?(a=t.line.color,o=i.extractOpts(t.line).colorscale,i.calc(e,t,{vals:a,containerStr:"line",cLetter:"c"})):(a=function(e){for(var t=Array(e),r=0;r 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(` + }`});return{regl:e,draw:t,atlas:{}}},w.prototype.update=function(e){var t,n,a=this;if("string"==typeof e)e={text:e};else if(!e)return;null!=(e=i(e,{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)).opacity&&(Array.isArray(e.opacity)?this.opacity=e.opacity.map(function(e){return parseFloat(e)}):this.opacity=parseFloat(e.opacity)),null!=e.viewport&&(this.viewport=u(e.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(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]),null!=e.kerning&&(this.kerning=e.kerning),null!=e.offset&&("number"==typeof e.offset&&(e.offset=[e.offset,0]),this.positionOffset=y(e.offset)),e.direction&&(this.direction=e.direction),e.range&&(this.range=e.range,this.scale=[1/(e.range[2]-e.range[0]),1/(e.range[3]-e.range[1])],this.translate=[-e.range[0],-e.range[1]]),e.scale&&(this.scale=e.scale),e.translate&&(this.translate=e.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||e.font||(e.font=w.baseFontSize+"px sans-serif");var o=!1,h=!1;if(e.font&&(Array.isArray(e.font)?e.font:[e.font]).forEach(function(e,t){if("string"==typeof e)try{e=r.parse(e)}catch{e=r.parse(w.baseFontSize+"px "+e)}else{var i=e.style,n=e.weight,s=e.stretch,l=e.variant;e=r.parse(r.stringify(e)),i&&(e.style=i),n&&(e.weight=n),s&&(e.stretch=s),l&&(e.variant=l)}var c=r.stringify({size:w.baseFontSize,family:e.family,stretch:b?e.stretch:void 0,variant:e.variant,weight:e.weight,style:e.style}),u=d(e.size),p=Math.round(u[0]*f(u[1]));if(p!==a.fontSize[t]&&(h=!0,a.fontSize[t]=p),(!a.font[t]||c!=a.font[t].baseString)&&(o=!0,a.font[t]=w.fonts[c],!a.font[t])){var m=e.family.join(", "),y=[e.style];e.style!=e.variant&&y.push(e.variant),e.variant!=e.weight&&y.push(e.weight),b&&e.weight!=e.stretch&&y.push(e.stretch),a.font[t]={baseString:c,family:m,weight:e.weight,stretch:e.stretch,style:e.style,variant:e.variant,width:{},kerning:{},metrics:g(m,{origin:"top",fontSize:w.baseFontSize,fontStyle:y.join(" ")})},w.fonts[c]=a.font[t]}}),(o||h)&&this.font.forEach(function(t,i){var n=r.stringify({size:a.fontSize[i],family:t.family,stretch:b?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style});if(a.fontAtlas[i]=a.shader.atlas[n],!a.fontAtlas[i]){var o=t.metrics;a.shader.atlas[n]=a.fontAtlas[i]={fontString:n,step:2*Math.ceil(a.fontSize[i]*o.bottom*.5),em:a.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:a.regl.texture()}}null==e.text&&(e.text=a.text)}),"string"==typeof e.text&&e.position&&e.position.length>2){for(var x=Array(.5*e.position.length),_=0;_2){for(var M=!e.position[0].length,k=c.mallocFloat(2*this.count),A=0,S=0;A1?a.align[t]:a.align[0]:a.align;if("number"==typeof r)return r;switch(r){case"right":case"end":return-e;case"center":case"centre":case"middle":return-(.5*e)}return 0})),null==this.baseline&&null==e.baseline&&(e.baseline=0),null!=e.baseline&&(this.baseline=e.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(e,t){var r,i=(a.font[t]||a.font[0]).metrics;return r=0+.5*i.bottom,"number"==typeof e?r+=e-i.baseline:r+=-i[e],r*=-1})),null!=e.color)if(e.color||(e.color="transparent"),"string"!=typeof e.color&&isNaN(e.color)){if("number"==typeof e.color[0]&&e.color.length>this.counts.length){var G=e.color.length;n=c.mallocUint8(G);for(var W=(e.color.subarray||e.color.slice).bind(e.color),Y=0;Y4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var X=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(X);for(var K=0;K1?this.counts[K]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[K]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*K,4*K+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[K]:this.opacity,baseline:null!=this.baselineOffset[K]?this.baselineOffset[K]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[K]?this.alignOffset[K]:this.alignOffset[0]:0,atlas:this.fontAtlas[K]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*K,2*K+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=[]},w.prototype.destroy=function(){},w.prototype.kerning=!0,w.prototype.position={constant:new Float32Array(2)},w.prototype.translate=null,w.prototype.scale=null,w.prototype.font=null,w.prototype.text="",w.prototype.positionOffset=[0,0],w.prototype.opacity=1,w.prototype.color=new Uint8Array([0,0,0,255]),w.prototype.alignOffset=[0,0],w.maxAtlasSize=1024,w.atlasCanvas=document.createElement("canvas"),w.atlasContext=w.atlasCanvas.getContext("2d",{alpha:!1}),w.baseFontSize=64,w.fonts={},t.exports=w}}),yf=p({"src/lib/prepare_regl.js"(e,t){var r=fT(),i=yt();t.exports=function(e,t,n){var a=e._fullLayout,o=!0;return a._glcanvas.each(function(r){if(r.regl)return void r.regl.preloadCachedCode(n);if(!(r.pick&&!a._has("parcoords"))){try{r.regl=i({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||window.devicePixelRatio,extensions:t||[],cachedCode:n||{}})}catch{o=!1}r.regl||(o=!1),o&&this.addEventListener("webglcontextlost",function(t){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:t,layer:r.key})},!1)}}),o||r({container:a._glcontainer.node()}),o}}}),yp=p({"src/traces/scattergl/plot.js"(e,t){var r=mO(),i=gX(),n=gK(),a=yd(),o=tv(),s=rO().selectMode,l=yf(),c=t5(),u=i9(),h=mM().styleTextSelection,d={},e=t.exports=function(e,t,f){if(f.length){var p,m,g=e._fullLayout,y=t._scene,v=t.xaxis,x=t.yaxis;if(y){if(!l(e,["ANGLE_instanced_arrays","OES_element_index_uint"],d))return void y.init();var b,_,w,T,M,k,A,S,E,C,L=y.count,P=g._glcanvas.data()[0].regl;if(u(e,t,f),y.dirty){if((y.line2d||y.error2d)&&!(y.scatter2d||y.fill2d||y.glText)&&P.clear({color:!0,depth:!0}),!0===y.error2d&&(y.error2d=n(P)),!0===y.line2d&&(y.line2d=i(P)),!0===y.scatter2d&&(y.scatter2d=r(P)),!0===y.fill2d&&(y.fill2d=i(P)),!0===y.glText)for(y.glText=Array(L),p=0;py.glText.length){var I=L-y.glText.length;for(p=0;pr&&(isNaN(t[i])||isNaN(t[i+1]));)i-=2;e.positions=t.slice(r,i+2)}return e}),y.line2d.update(y.lineOptions)),y.error2d){var D=(y.errorXOptions||[]).concat(y.errorYOptions||[]).map(function(e){return e||{positions:[],errors:[]}});y.error2d.update(D)}y.scatter2d&&y.scatter2d.update(y.markerOptions),y.fillOrder=o.repeat(null,L),y.fill2d&&(y.fillOptions=y.fillOptions.map(function(e,t){var r=f[t];if(!(!e||!r||!r[0]||!r[0].trace)){var i,n,a=r[0],o=a.trace,s=a.t,l=y.lineOptions[t],c=[];o._ownfill&&c.push(t),o._nexttrace&&c.push(t+1),c.length&&(y.fillOrder[t]=c);var u,h,d=[],p=l&&l.positions||s.positions;if("tozeroy"===o.fill){for(u=0;uu&&isNaN(p[h+1]);)h-=2;0!==p[u+1]&&(d=[p[u],0]),d=d.concat(p.slice(u,h+2)),0!==p[h+1]&&(d=d.concat([p[h],0]))}else if("tozerox"===o.fill){for(u=0;uu&&isNaN(p[h]);)h-=2;0!==p[u]&&(d=[0,p[u+1]]),d=d.concat(p.slice(u,h+2)),0!==p[h]&&(d=d.concat([0,p[h+1]]))}else if("toself"===o.fill||"tonext"===o.fill){for(d=[],i=0,e.splitNull=!0,n=0;n-1;for(let[e]of f)if(e){var F=e.trace,j=e.t,B=j.index,N=F._length,U=j.x,V=j.y;if(F.selectedpoints||O||R){if(O||(O=!0),F.selectedpoints){var q=y.selectBatch[B]=F.selectedpoints,H={};for(m=0;mn&&s||ih?b.sizeAvg||Math.max(b.size,3):n(t,x),p=0;ptypeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:"u">typeof S&&null!==S&&S.hrtime?(t.exports=function(){return(e()-n)/1e6},r=S.hrtime,n=(e=function(){var e;return 1e9*(e=r())[0]+e[1]})()-1e9*S.uptime()):Date.now?(t.exports=function(){return Date.now()-i},i=Date.now()):(t.exports=function(){return new Date().getTime()-i},i=new Date().getTime())}).call(e)}}),yT=p({"node_modules/raf/index.js"(e,t){var r,i,n,a,o,s=yw(),l=window,c=["moz","webkit"],u="AnimationFrame",h=l["request"+u],d=l["cancel"+u]||l["cancelRequest"+u];for(r=0;!h&&r2?(s[0],s[2],i=s[1],n=s[3]):s.length?(i=s[0],n=s[1]):(s.x,i=s.y,s.x+s.width,n=s.y+s.height),l.length>2?(a=l[0],o=l[2],l[1],l[3]):l.length?(a=l[0],o=l[1]):(a=l.x,l.y,o=l.x+l.width,l.y+l.height),[a,i,o,n]}function h(e){if("number"==typeof e)return[e,e,e,e];if(2===e.length)return[e[0],e[1],e[0],e[1]];{let t=s(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}t.exports=c,c.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=a(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,a(()=>{this.dirty=!1})),this)},c.prototype.update=function(...e){if(!e.length)return;for(let t=0;tt||!c.lower&&e{t[a+r]=i})}this.scatter.draw(...t)}else this.scatter.draw();return this},c.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this}}}),yA=p({"src/traces/splom/plot.js"(e,t){var r=yk(),i=tv(),n=tC(),a=rO().selectMode;t.exports=function(e,t,o){if(o.length)for(var s=0;s-1,C=a(x)||!!f.selectedpoints||E,L=!0;if(C){var P=f._length;if(f.selectedpoints){m.selectBatch=f.selectedpoints;var I=f.selectedpoints,z={};for(l=0;l=t[r][0]&&e<=t[r][1])return!0;return!1}(r,i))return r;var n=e?-1:1,a=0,o=t.length-1;if(n<0){var s=a;a=o,o=s}for(var u=t[a],h=u,d=a;n*dt){f=i;break}}if(isNaN(o=h)&&(o=isNaN(d)||isNaN(f)?isNaN(d)?f:d:t-u[d][1]e[1]+i||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}(g,t);y&&(s.interval=c[o],s.intervalPix=g,s.region=y)}}if(e.ordinal&&!s.region){var v=e.unitTickvals,x=e.unitToPaddedPx.invert(t);for(i=0;i=b[0]&&x<=b[1]){s.clickableOrdinalRange=b;break}}}return s}function x(e,t){i.event.sourceEvent.stopPropagation();var n=t.height-i.mouse(e)[1]-2*r.verticalPadding,a=t.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[n-a.grabPoint,n+a.barLength-a.grabPoint].map(t.unitToPaddedPx.invert):a.newExtent=[a.startExtent,t.unitToPaddedPx.invert(n)].sort(o),t.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(t),y(e.parentNode)}function b(e,t){var n=t.height-i.mouse(e)[1]-2*r.verticalPadding,a=v(t,n),o="crosshair";a.clickableOrdinalRange?o="pointer":a.region&&(o=a.region+"-resize"),i.select(document.body).style("cursor",o)}function _(e){e.on("mousemove",function(e){i.event.preventDefault(),e.parent.inBrushDrag||b(this,e)}).on("mouseleave",function(e){e.parent.inBrushDrag||m()}).call(i.behavior.drag().on("dragstart",function(e){!function(e,t){i.event.sourceEvent.stopPropagation();var n=t.height-i.mouse(e)[1]-2*r.verticalPadding,a=t.unitToPaddedPx.invert(n),o=t.brush,s=v(t,n),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar="ns"===s.region,c.grabbingBar){var u=l.map(t.unitToPaddedPx);c.grabPoint=n-u[0]-r.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=t.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter(function(e){return e[0]!==l[0]&&e[1]!==l[1]})),c.startExtent=s.region?l[+("s"===s.region)]:a,t.parent.inBrushDrag=!0,c.brushStartCallback()}(this,e)}).on("drag",function(e){x(this,e)}).on("dragend",function(e){!function(e,t){var r=t.brush,n=r.filter,a=r.svgBrush;a._dragging||(b(e,t),x(e,t),t.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,t.parent.inBrushDrag=!1,m(),!a.wasDragged){a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&t.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&M(r)):M(r),a.brushCallback(t),y(e.parentNode),a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(c?[a.newExtent]:[]),a.extent.length||M(r),a.brushCallback(t),c?y(e.parentNode,s):(s(),y(e.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,e)}))}function w(e,t){return e[0]-t[0]}function M(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function k(e){for(var t,r=e.slice(),i=[],n=r.shift();n;){for(t=n.slice();(n=r.shift())&&n[0]<=t[1];)t[1]=Math.max(t[1],n[1]);i.push(t)}return 1===i.length&&i[0][0]>i[0][1]&&(i=[]),i}t.exports={makeBrush:function(e,t,r,i,n,a){var s,l,c,u=(c=[],{set:function(e){1===(c=e.map(function(e){return e.slice().sort(o)}).sort(w)).length&&c[0][0]===-1/0&&c[0][1]===1/0&&(c=[[0,-1]]),s=k(c),l=c.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0])},get:function(){return c.slice()},getConsolidated:function(){return s},getBounds:function(){return l}});return u.set(r),{filter:u,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:i,brushCallback:function(e){var t=e.brush,r=t.svgBrush.extent.map(function(e){return e.slice()}).slice();t.filter.set(r),n()},brushEndCallback:a}}},ensureAxisBrush:function(e,t,i){var o,l,c,u,f=e.selectAll("."+r.cn.axisBrush).data(a,n);f.enter().append("g").classed(r.cn.axisBrush,!0),o=i._context.staticPlot,(l=f.selectAll(".background").data(a)).enter().append("rect").classed("background",!0).call(h).call(d).style("pointer-events",o?"none":"auto").attr("transform",s(0,r.verticalPadding)),l.call(_).attr("height",function(e){return e.height-r.verticalPadding}),(c=f.selectAll(".highlight-shadow").data(a)).enter().append("line").classed("highlight-shadow",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width+r.bar.strokeWidth).attr("stroke",t).attr("opacity",r.bar.strokeOpacity).attr("stroke-linecap","butt"),c.attr("y1",function(e){return e.height}).call(g),(u=f.selectAll(".highlight").data(a)).enter().append("line").classed("highlight",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width-r.bar.strokeWidth).attr("stroke",r.bar.fillColor).attr("opacity",r.bar.fillOpacity).attr("stroke-linecap","butt"),u.attr("y1",function(e){return e.height}).call(g)},cleanRanges:function(e,t){if(Array.isArray(e[0])?(e=e.map(function(e){return e.sort(o)}),e=t.multiselect?k(e.sort(w)):[e[0]]):e=[e.sort(o)],t.tickvals){var r=t.tickvals.slice().sort(o);if(!(e=e.map(function(e){var t=[u(0,r,e[0],[]),u(1,r,e[1],[])];if(t[1]>t[0])return t}).filter(function(e){return e})).length)return}return e.length>1?e:e[0]}}}}),yB=p({"src/traces/parcoords/defaults.js"(e,t){var r=tv(),i=tj().hasColorscale,n=tQ(),a=at().defaults,o=t$(),s=rn(),l=yO(),c=yj(),u=yR().maxDimensionCount,h=yv();function d(e,t,i,n){function a(i,n){return r.coerce(e,t,l.dimensions,i,n)}var o=a("values"),u=a("visible");if(o&&o.length||(u=t.visible=!1),u){a("label"),a("tickvals"),a("ticktext"),a("tickformat"),t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:a("range")},s.setConvert(t._ax,n.layout),a("multiselect");var h=a("constraintrange");h&&(t.constraintrange=c.cleanRanges(h,t))}}t.exports=function(e,t,s,c){function f(i,n){return r.coerce(e,t,l,i,n)}var p=e.dimensions;Array.isArray(p)&&p.length>u&&(r.log("parcoords traces support up to "+u+" dimensions at the moment"),p.splice(u));var m=o(e,t,{name:"dimensions",layout:c,handleItemDefaults:d}),g=function(e,t,a,o,s){var l=s("line.color",a);if(i(e,"line")&&r.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),n(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=a}return 1/0}(e,t,s,c,f);a(t,c,f),Array.isArray(m)&&m.length||(t.visible=!1),h(t,m,"values",g);var y=r.extendFlat({},c.font,{size:Math.round(c.font.size/1.2)});r.coerceFont(f,"labelfont",y),r.coerceFont(f,"tickfont",y,{autoShadowDflt:!0}),r.coerceFont(f,"rangefont",y),f("labelangle"),f("labelside"),f("unselected.line.color"),f("unselected.line.opacity")}}}),yN=p({"src/traces/parcoords/calc.js"(e,t){var r=tv().isArrayOrTypedArray,i=t3(),n=yF().wrap;t.exports=function(e,t){var a,o;return i.hasColorscale(t,"line")&&r(t.line.color)?(a=t.line.color,o=i.extractOpts(t.line).colorscale,i.calc(e,t,{vals:a,containerStr:"line",cLetter:"c"})):(a=function(e){for(var t=Array(e),r=0;r 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(` `),i=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),n=yR().maxDimensionCount,a=tv(),o=new Uint8Array(4),s=new Uint8Array(4),l={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function c(e,t,r,i,n){var a=e._gl;a.enable(a.SCISSOR_TEST),a.scissor(t,r,i,n),e.clear({color:[0,0,0,0],depth:1})}function u(e,t){return(e>>>8*t)%256/255}function h(e){return("0"+e).slice(-2)}function d(e){return ed&&(d=e[i].dim1.canvasX,s=i);0===l&&c(x,0,0,h.canvasWidth,h.canvasHeight);var b=function(e){var t,r,i,n=[[],[]];for(i=0;i<64;i++){var a=!e&&is._length&&(I=I.slice(0,s._length));var z,D=s.tickvals;function O(e,t){return{val:e,text:z[t]}}function R(e,t){return e.val-t.val}if(n(D)&&D.length){i.isTypedArray(D)&&(D=Array.from(D)),n(z=s.ticktext)&&z.length?z.length>D.length?z=z.slice(0,D.length):D.length>z.length&&(D=D.slice(0,z.length)):z=D.map(a(s.tickformat));for(var F=1;F=i)&&!(l>=n)){var c=e.lineLayer.readPixel(s,n-1-l),u=0!==c[3],h=u?c[2]+256*(c[1]+256*c[0]):null,d={x:s,y:l,clientX:t.clientX,clientY:t.clientY,dataIndex:e.model.key,curveNumber:h};h!==B&&(u?a.hover(d):a.unhover&&a.unhover(d),B=h)}}}),j.style("opacity",function(e){return+!e.pick}),T.style("background","rgba(255, 255, 255, 0)");var N=T.selectAll("."+v.cn.parcoords).data(F,p);N.exit().remove(),N.enter().append("g").classed(v.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),N.attr("transform",function(e){return c(e.model.translateX,e.model.translateY)});var U=N.selectAll("."+v.cn.parcoordsControlView).data(m,p);U.enter().append("g").classed(v.cn.parcoordsControlView,!0),U.attr("transform",function(e){return c(e.model.pad.l,e.model.pad.t)});var V=U.selectAll("."+v.cn.yAxis).data(function(e){return e.dimensions},p);V.enter().append("g").classed(v.cn.yAxis,!0),U.each(function(e){P(V,e,D)}),j.each(function(e){if(e.viewModel){!e.lineLayer||a?e.lineLayer=b(this,e):e.lineLayer.update(e),(e.key||0===e.key)&&(e.viewModel[e.key]=e.lineLayer);var t=!e.context||a;e.lineLayer.render(e.viewModel.panels,t)}}),V.attr("transform",function(e){return c(e.xScale(e.xIndex),0)}),V.call(r.behavior.drag().origin(function(e){return e}).on("drag",function(e){var t=e.parent;R.linePickActive(!1),e.x=Math.max(-v.overdrag,Math.min(e.model.width+v.overdrag,r.event.x)),e.canvasX=e.x*e.model.canvasPixelRatio,V.sort(function(e,t){return e.x-t.x}).each(function(t,r){t.xIndex=r,t.x=e===t?t.x:t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio}),P(V,t,D),V.filter(function(t){return 0!==Math.abs(e.xIndex-t.xIndex)}).attr("transform",function(e){return c(e.xScale(e.xIndex),0)}),r.select(this).attr("transform",c(e.x,0)),V.each(function(r,i,n){n===e.parent.key&&(t.dimensions[i]=r)}),t.contextLayer&&t.contextLayer.render(t.panels,!1,!A(t)),t.focusLayer.render&&t.focusLayer.render(t.panels)}).on("dragend",function(e){var t=e.parent;e.x=e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio,P(V,t,D),r.select(this).attr("transform",function(e){return c(e.x,0)}),t.contextLayer&&t.contextLayer.render(t.panels,!1,!A(t)),t.focusLayer&&t.focusLayer.render(t.panels),t.pickLayer&&t.pickLayer.render(t.panels,!0),R.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(t.key,t.dimensions.map(function(e){return e.crossfilterDimensionIndex}))})),V.exit().remove();var q=V.selectAll("."+v.cn.axisOverlays).data(m,p);q.enter().append("g").classed(v.cn.axisOverlays,!0),q.selectAll("."+v.cn.axis).remove();var H=q.selectAll("."+v.cn.axis).data(m,p);H.enter().append("g").classed(v.cn.axis,!0),H.each(function(e){var t=e.model.height/e.model.tickDistance,i=e.domainScale,n=i.domain();r.select(this).call(r.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(t,e.tickFormat).tickValues(e.ordinal?n:null).tickFormat(function(t){return y.isOrdinal(e)?t:I(e.model.dimensions[e.visibleIndex],t)}).scale(i)),h.font(H.selectAll("text"),e.model.tickFont)}),H.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),H.selectAll("text").style("cursor","default");var G=q.selectAll("."+v.cn.axisHeading).data(m,p);G.enter().append("g").classed(v.cn.axisHeading,!0);var W=G.selectAll("."+v.cn.axisTitle).data(m,p);W.enter().append("text").classed(v.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",f?"none":"auto"),W.text(function(e){return e.label}).each(function(t){var i=r.select(this);h.font(i,t.model.labelFont),u.convertToTspans(i,e)}).attr("transform",function(e){var t=L(e.model.labelAngle,e.model.labelSide),r=v.axisTitleOffset;return(t.dir>0?"":c(0,2*r+e.model.height))+l(t.degrees)+c(-r*t.dx,-r*t.dy)}).attr("text-anchor",function(e){var t=L(e.model.labelAngle,e.model.labelSide);return 2*Math.abs(t.dx)>Math.abs(t.dy)?t.dir*t.dx<0?"start":"end":"middle"});var Y=q.selectAll("."+v.cn.axisExtent).data(m,p);Y.enter().append("g").classed(v.cn.axisExtent,!0);var Z=Y.selectAll("."+v.cn.axisExtentTop).data(m,p);Z.enter().append("g").classed(v.cn.axisExtentTop,!0),Z.attr("transform",c(0,-v.axisExtentOffset));var $=Z.selectAll("."+v.cn.axisExtentTopText).data(m,p);$.enter().append("text").classed(v.cn.axisExtentTopText,!0).call(C),$.text(function(e){return z(e,!0)}).each(function(e){h.font(r.select(this),e.model.rangeFont)});var X=Y.selectAll("."+v.cn.axisExtentBottom).data(m,p);X.enter().append("g").classed(v.cn.axisExtentBottom,!0),X.attr("transform",function(e){return c(0,e.model.height+v.axisExtentOffset)});var K=X.selectAll("."+v.cn.axisExtentBottomText).data(m,p);K.enter().append("text").classed(v.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(C),K.text(function(e){return z(e,!1)}).each(function(e){h.font(r.select(this),e.model.rangeFont)}),x.ensureAxisBrush(q,O,e)}}}),yH=p({"src/traces/parcoords/plot.js"(e,t){var r=yq(),i=yf(),n=yU().isVisible,a={};function o(e,t,r){var i=t.indexOf(r),n=e.indexOf(i);return -1===n&&(n+=t.length),n}var e=t.exports=function(e,t){var s=e._fullLayout;if(i(e,[],a)){var l={},c={},u={},h=s._size;t.forEach(function(t,r){var i=t[0].trace,n=u[r]=i.index;l[r]=e.data[n].dimensions,c[r]=e.data[n].dimensions.slice()}),r(e,t,{width:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{filterChanged:function(t,r,i){var n=c[t][r],a=i.map(function(e){return e.slice()}),o="dimensions["+r+"].constraintrange",l=s._tracePreGUI[e._fullData[u[t]].uid];if(void 0===l[o]){var h=n.constraintrange;l[o]=h||null}var d=e._fullData[u[t]].dimensions[r];a.length?(1===a.length&&(a=a[0]),n.constraintrange=a,d.constraintrange=a.slice(),a=[a]):(delete n.constraintrange,delete d.constraintrange,a=null);var f={};f[o]=a,e.emit("plotly_restyle",[f,[u[t]]])},hover:function(t){e.emit("plotly_hover",t)},unhover:function(t){e.emit("plotly_unhover",t)},axesMoved:function(t,r){var i,a=(i=c[t].filter(n),function(e,t){return o(r,i,e)-o(r,i,t)});l[t].sort(a),c[t].filter(function(e){return!n(e)}).sort(function(e){return c[t].indexOf(e)}).forEach(function(e){l[t].splice(l[t].indexOf(e),1),l[t].splice(c[t].indexOf(e),0,e)}),e.emit("plotly_restyle",[{dimensions:[l[t]]},[u[t]]])}})}};e.reglPrecompiled=a}}),yG=p({"src/traces/parcoords/base_plot.js"(e){var t=T(),r=tI().getModuleCalcData,i=yH(),n=tO();e.name="parcoords",e.plot=function(e){var t=r(e.calcdata,"parcoords")[0];t.length&&i(e,t)},e.clean=function(e,t,r,i){var n=i._has&&i._has("parcoords"),a=t._has&&t._has("parcoords");n&&!a&&(i._paperdiv.selectAll(".parcoords").remove(),i._glimages.selectAll("*").remove())},e.toSVG=function(e){var r=e._fullLayout._glimages,i=t.select(e).selectAll(".svg-container");i.filter(function(e,t){return t===i.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var e=this.toDataURL("image/png");r.append("svg:image").attr({xmlns:n.svg,"xlink:href":e,preserveAspectRatio:"none",x:0,y:0,width:this.style.width,height:this.style.height})}),window.setTimeout(function(){t.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),yW=p({"src/traces/parcoords/base_index.js"(e,t){t.exports={attributes:yO(),supplyDefaults:yB(),calc:yN(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:yG(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),yY=p({"src/traces/parcoords/index.js"(e,t){var r=yW();r.plot=yH(),t.exports=r}}),yZ=p({"lib/parcoords.js"(e,t){t.exports=yY()}}),y$=p({"src/traces/parcats/attributes.js"(e,t){var r=q().extendFlat,i=Z(),n=H(),a=tV(),{hovertemplateAttrs:o,templatefallbackAttrs:s}=eW(),l=at().attributes,c=r({editType:"calc"},a("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:o({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:s({editType:"plot"})});t.exports={domain:l({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:r({},i.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:o({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:s({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:n({editType:"calc"}),tickfont:n({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:c,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}}}),yX=p({"src/traces/parcats/defaults.js"(e,t){var r=tv(),i=tj().hasColorscale,n=tQ(),a=at().defaults,o=t$(),s=y$(),l=yv(),c=z().isTypedArraySpec;function u(e,t){function i(i,n){return r.coerce(e,t,s.dimensions,i,n)}var n=i("values"),a=i("visible");if(n&&n.length||(a=t.visible=!1),a){i("label"),i("displayindex",t._index);var o,l=e.categoryarray,u=r.isArrayOrTypedArray(l)&&l.length>0||c(l);u&&(o="array");var h=i("categoryorder",o);"array"===h?(i("categoryarray"),i("ticktext")):(delete e.categoryarray,delete e.ticktext),u||"array"!==h||(t.categoryorder="trace")}}t.exports=function(e,t,c,h){function d(i,n){return r.coerce(e,t,s,i,n)}var f=o(e,t,{name:"dimensions",handleItemDefaults:u}),p=function(e,t,a,o,s){s("line.shape"),s("line.hovertemplate"),s("line.hovertemplatefallback");var l=s("line.color",o.colorway[0]);if(i(e,"line")&&r.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),n(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=a}return 1/0}(e,t,c,h,d);a(t,h,d),Array.isArray(f)&&f.length||(t.visible=!1),l(t,f,"values",p),d("hoveron"),d("hovertemplate"),d("hovertemplatefallback"),d("arrangement"),d("bundlecolors"),d("sortpaths"),d("counts");var m=h.font;r.coerceFont(d,"labelfont",m,{overrideDflt:{size:Math.round(m.size)}}),r.coerceFont(d,"tickfont",m,{autoShadowDflt:!0,overrideDflt:{size:Math.round(m.size/1.2)}})}}}),yK=p({"src/traces/parcats/calc.js"(e,t){var r=yF().wrap,i=tj().hasColorscale,n=t2(),a=ts(),o=t9(),s=tv(),l=C();t.exports=function(e,t){var c,u,h,d,f,p,m=s.filterVisible(t.dimensions);if(0===m.length)return[];var g,y,v,x=m.map(function(e){var t;if("trace"===e.categoryorder)t=null;else if("array"===e.categoryorder)t=e.categoryarray;else{t=a(e.values);for(var r=!0,i=0;i=e.length||void 0!==t[e[r]])return!1;t[e[r]]=!0}return!0}(e.map(function(e){return e.displayindex})))for(t=0;tt.model.rawColor?1:e.model.rawColor"),C=r.mouse(h)[0];o.loneHover({trace:d,x:b-p.left+m.left,y:w-p.top+m.top,text:E,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:T,idealAlign:Ca.mostReadable(e.model.color)).attr("stroke-width",.3)}function w(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function M(e){e.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function k(e){var t=e.parcatsViewModel.pathSelection,r=e.categoryViewModel.model.dimensionInd,i=e.categoryViewModel.model.categoryInd;return t.filter(function(t){return t.model.categoryInds[r]===i&&t.model.color===e.color})}function A(e,t,i){var n=r.select(e).datum(),a=n.categoryViewModel.model,o=n.parcatsViewModel.graphDiv,s=r.select(e.parentNode).selectAll("rect.bandrect"),l=[];s.each(function(e){k(e).each(function(e){Array.prototype.push.apply(l,g(e))})});var c={};c[a.dimensionInd]=a.categoryValue,o.emit(t,{points:l,event:i,constraints:c})}function S(e,t,i){var n=r.select(e).datum(),a=n.categoryViewModel.model,o=n.parcatsViewModel.graphDiv,s=k(n),l=[];s.each(function(e){Array.prototype.push.apply(l,g(e))});var c={};c[a.dimensionInd]=a.categoryValue,void 0!==n.rawColor&&(c.color=n.rawColor),o.emit(t,{points:l,event:i,constraints:c})}function E(e,t,i){e._fullLayout._calcInverseTransform(e);var n,a,o=e._fullLayout._invScaleX,s=e._fullLayout._invScaleY,l=r.select(i.parentNode).select("rect.catrect"),c=l.node().getBoundingClientRect(),u=l.datum(),h=u.parcatsViewModel,d=h.model.dimensions[u.model.dimensionInd],f=h.trace,p=c.top+c.height/2;h.dimensions.length>1&&d.displayInd===h.dimensions.length-1?(n=c.left,a="left"):(n=c.left+c.width,a="right");var m=u.model.count,g=u.model.categoryLabel,y=m/u.parcatsViewModel.model.count,v={countLabel:m,categoryLabel:g,probabilityLabel:y.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf("count")&&x.push(["Count:",v.countLabel].join(" ")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf("probability")&&x.push(["P("+v.categoryLabel+"):",v.probabilityLabel].join(" "));var b=x.join("
");return{trace:f,x:o*(n-t.left),y:s*(p-t.top),text:b,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:f.hovertemplate,hovertemplateLabels:v,eventData:[{data:f._input,fullData:f,count:m,category:g,probability:y}]}}function C(e){if(!e.parcatsViewModel.dragDimension&&-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){var t;if(!(r.mouse(this)[1]<-1)){var i,n,l,c,u,h,d,f,p,m,g,y,v,x,b,w,T,M,C,L,P,I,z,D,O,R,F,j=e.parcatsViewModel.graphDiv,B=j._fullLayout,N=B._paperdiv.node().getBoundingClientRect(),U=e.parcatsViewModel.hoveron;("color"===U?(_(l=k(n=r.select(this).datum())),l.each(function(){s.raiseToTop(this)}),r.select(this.parentNode).selectAll("rect.bandrect").filter(function(e){return e.color===n.color}).each(function(){s.raiseToTop(this),r.select(this).attr("stroke","black").attr("stroke-width",1.5)}),S(this,"plotly_hover",r.event)):(i=this,r.select(i.parentNode).selectAll("rect.bandrect").each(function(e){var t=k(e);_(t),t.each(function(){s.raiseToTop(this)})}),r.select(i.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5),A(this,"plotly_hover",r.event)),-1===e.parcatsViewModel.hoverinfoItems.indexOf("none"))&&("category"===U?t=E(j,N,this):"color"===U?(j._fullLayout._calcInverseTransform(j),h=j._fullLayout._invScaleX,d=j._fullLayout._invScaleY,f=this.getBoundingClientRect(),y=(g=(m=(p=r.select(this).datum()).categoryViewModel).parcatsViewModel).model.dimensions[m.model.dimensionInd],v=g.trace,x=f.y+f.height/2,g.dimensions.length>1&&y.displayInd===g.dimensions.length-1?(c=f.left,u="left"):(c=f.left+f.width,u="right"),b=m.model.categoryLabel,w=p.parcatsViewModel.model.count,T=0,p.categoryViewModel.bands.forEach(function(e){e.color===p.color&&(T+=e.count)}),M=m.model.count,C=0,g.pathSelection.each(function(e){e.model.color===p.color&&(C+=e.model.count)}),L=T/w,P=T/C,I=T/M,z={countLabel:T,categoryLabel:b,probabilityLabel:L.toFixed(3)},D=[],-1!==m.parcatsViewModel.hoverinfoItems.indexOf("count")&&D.push(["Count:",z.countLabel].join(" ")),-1!==m.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(D.push("P(color ∩ "+b+"): "+z.probabilityLabel),D.push("P("+b+" | color): "+P.toFixed(3)),D.push("P(color | "+b+"): "+I.toFixed(3))),O=D.join("
"),R=a.mostReadable(p.color),t={trace:v,x:h*(c-N.left),y:d*(x-N.top),text:O,color:p.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:R,fontSize:10,idealAlign:u,hovertemplate:v.hovertemplate,hovertemplateLabels:z,eventData:[{data:v._input,fullData:v,category:b,count:w,probability:L,categorycount:M,colorcount:C,bandcolorcount:T}]}):"dimension"===U&&(F=[],r.select(this.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){F.push(E(j,N,this))}),t=F),t&&o.loneHover(t,{container:B._hoverlayer.node(),outerContainer:B._paper.node(),gd:j}))}}}function L(e){var t=e.parcatsViewModel;t.dragDimension||(b(t.pathSelection),w(t.dimensionSelection.selectAll("g.category")),M(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),o.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(f),-1!==t.hoverinfoItems.indexOf("skip"))||("color"===e.parcatsViewModel.hoveron?S(this,"plotly_unhover",r.event):A(this,"plotly_unhover",r.event))}function P(e){"fixed"!==e.parcatsViewModel.arrangement&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(e){return e.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,r.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var i=r.mouse(this)[0],n=r.mouse(this)[1];-2<=i&&i<=t.width+2&&-2<=n&&n<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(e){return e.displayInd}),t.model.dragY=t.y,s.raiseToTop(this.parentNode),r.select(this.parentNode).selectAll("rect.bandrect").each(function(t){t.yc.y+c.height/2&&(n.model.displayInd=c.model.displayInd,c.model.displayInd=o),e.dragCategoryDisplayInd=n.model.displayInd}if(null===e.dragCategoryDisplayInd||"freeform"===e.parcatsViewModel.arrangement){i.model.dragX=r.event.x;var u=e.parcatsViewModel.dimensions[t-1],h=e.parcatsViewModel.dimensions[t+1];void 0!==u&&i.model.dragXh.x&&(i.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=i.model.displayInd}N(e.parcatsViewModel),B(e.parcatsViewModel),R(e.parcatsViewModel),O(e.parcatsViewModel)}}function z(e){if("fixed"!==e.parcatsViewModel.arrangement&&null!==e.dragDimensionDisplayInd){r.select(this).selectAll("text").attr("font-weight","normal");var t={},i=D(e.parcatsViewModel),a=e.parcatsViewModel.model.dimensions.map(function(e){return e.displayInd}),o=e.initialDragDimensionDisplayInds.some(function(e,t){return e!==a[t]});o&&a.forEach(function(r,i){t["dimensions["+e.parcatsViewModel.model.dimensions[i].containerInd+"].displayindex"]=r});var s=!1;if(null!==e.dragCategoryDisplayInd){var l=e.model.categories.map(function(e){return e.displayInd});if(s=e.initialDragCategoryDisplayInds.some(function(e,t){return e!==l[t]})){var c=e.model.categories.slice().sort(function(e,t){return e.displayInd-t.displayInd}),u=c.map(function(e){return e.categoryValue}),h=c.map(function(e){return e.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[u],t["dimensions["+e.model.containerInd+"].ticktext"]=[h],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!e.dragHasMoved&&e.potentialClickBand&&("color"===e.parcatsViewModel.hoveron?S(e.potentialClickBand,"plotly_click",r.event.sourceEvent):A(e.potentialClickBand,"plotly_click",r.event.sourceEvent)),e.model.dragX=null,null!==e.dragCategoryDisplayInd&&(e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd].model.dragY=null,e.dragCategoryDisplayInd=null),e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,N(e.parcatsViewModel),B(e.parcatsViewModel),r.transition().duration(300).ease("cubic-in-out").each(function(){R(e.parcatsViewModel,!0),O(e.parcatsViewModel,!0)}).each("end",function(){(o||s)&&n.restyle(e.parcatsViewModel.graphDiv,t,[i])})}}function D(e){for(var t,r=e.graphDiv._fullData,i=0;i=0;s--)u+="C"+c[s]+","+(t[s+1]+n)+" "+l[s]+","+(t[s]+n)+" "+(e[s]+r[s])+","+(t[s]+n)+("l-"+r[s])+",0 ";return u+"Z"}function B(e){var t=e.dimensions,r=e.model,i=t.map(function(e){return e.categories.map(function(e){return e.y})}),n=e.model.dimensions.map(function(e){return e.categories.map(function(e){return e.displayInd})}),a=e.model.dimensions.map(function(e){return e.displayInd}),o=e.dimensions.map(function(e){return e.model.dimensionInd}),s=t.map(function(e){return e.x}),l=t.map(function(e){return e.width}),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function h(e){var t=e.categoryInds.map(function(e,t){return n[t][e]});return o.map(function(e){return t[e]})}c.sort(function(t,r){var i=h(t),n=h(r);return"backward"===e.sortpaths&&(i.reverse(),n.reverse()),i.push(t.valueInds[0]),n.push(r.valueInds[0]),e.bundlecolors&&(i.unshift(t.rawColor),n.unshift(r.rawColor)),function(e,t){for(var r=0;rn)return 1;if(i!==n){var a=isNaN(i);if(a!==isNaN(n))return a?1:-1}}return e.length-t.length}(i,n)});for(var d=Array(c.length),f=t[0].model.count,p=t[0].categories.map(function(e){return e.height}).reduce(function(e,t){return e+t}),m=0;m0?p*(v.count/f):0;for(var x=Array(i.length),b=0;b1?(e.width-80-16)/(i-1):0)*n;var a,o,s,l,c,u=[],h=e.model.maxCats,d=t.categories.length,f=t.count,p=e.height-8*(h-1),m=(h-d)*8/2,g=t.categories.map(function(e){return{displayInd:e.displayInd,categoryInd:e.categoryInd}});for(g.sort(function(e,t){return e.displayInd-t.displayInd}),c=0;c0?o.count/f*p:0,s={key:o.valueInds[0],model:o,width:16,height:a,y:null!==o.dragY?o.dragY:m,bands:[],parcatsViewModel:e},m=m+a+8,u.push(s);return{key:t.dimensionInd,x:null!==t.dragX?t.dragX:r,y:0,width:16,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}(e,a))}e.dimensions=r}t.exports=function(e,t,i,n){var a,o,g,y,v,_,T,k,A,S,E,D;a=e._context.staticPlot,o=i.map(F.bind(0,e,n)),(g=t.selectAll("g.parcatslayer").data([null])).enter().append("g").attr("class","parcatslayer").style("pointer-events",a?"none":"all"),v=(y=g.selectAll("g.trace.parcats").data(o,h)).enter().append("g").attr("class","trace parcats"),y.attr("transform",function(e){return l(e.x,e.y)}),v.append("g").attr("class","paths"),(_=y.select("g.paths").selectAll("path.path").data(function(e){return e.paths},h)).attr("fill",function(e){return e.model.color}),b(T=_.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(e){return e.model.color}).attr("fill-opacity",0)),_.attr("d",function(e){return e.svgD}),T.empty()||_.sort(f),_.exit().remove(),_.on("mouseover",p).on("mouseout",m).on("click",x),v.append("g").attr("class","dimensions"),(k=y.select("g.dimensions").selectAll("g.dimension").data(function(e){return e.dimensions},h)).enter().append("g").attr("class","dimension"),k.attr("transform",function(e){return l(e.x,0)}),k.exit().remove(),S=(A=k.selectAll("g.category").data(function(e){return e.categories},h)).enter().append("g").attr("class","category"),A.attr("transform",function(e){return l(0,e.y)}),S.append("rect").attr("class","catrect").attr("pointer-events","none"),A.select("rect.catrect").attr("fill","none").attr("width",function(e){return e.width}).attr("height",function(e){return e.height}),w(S),(E=A.selectAll("rect.bandrect").data(function(e){return e.bands},h)).each(function(){s.raiseToTop(this)}),E.attr("fill",function(e){return e.color}),D=E.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(e){return e.color}).attr("fill-opacity",0),E.attr("fill",function(e){return e.color}).attr("width",function(e){return e.width}).attr("height",function(e){return e.height}).attr("y",function(e){return e.y}).attr("cursor",function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"perpendicular"===e.parcatsViewModel.arrangement?"ns-resize":"move"}),M(D),E.exit().remove(),S.append("text").attr("class","catlabel").attr("pointer-events","none"),A.select("text.catlabel").attr("text-anchor",function(e){return d(e)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(e){return d(e)?e.width+5:-5}).attr("y",function(e){return e.height/2}).text(function(e){return e.model.categoryLabel}).each(function(t){c.font(r.select(this),t.parcatsViewModel.categorylabelfont),u.convertToTspans(r.select(this),e)}),S.append("text").attr("class","dimlabel"),A.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"ew-resize"}).attr("x",function(e){return e.width/2}).attr("y",-5).text(function(e,t){return 0===t?e.parcatsViewModel.model.dimensions[e.model.dimensionInd].dimensionLabel:null}).each(function(e){c.font(r.select(this),e.parcatsViewModel.labelfont)}),A.selectAll("rect.bandrect").on("mouseover",C).on("mouseout",L),A.exit().remove(),k.call(r.behavior.drag().origin(function(e){return{x:e.x,y:0}}).on("dragstart",P).on("drag",I).on("dragend",z)),y.each(function(e){e.traceSelection=r.select(this),e.pathSelection=r.select(this).selectAll("g.paths").selectAll("path.path"),e.dimensionSelection=r.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),y.exit().remove()}}}),yQ=p({"src/traces/parcats/plot.js"(e,t){var r=yJ();t.exports=function(e,t,i,n){var a=e._fullLayout,o=a._paper,s=a._size;r(e,o,t,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},i,n)}}}),y0=p({"src/traces/parcats/base_plot.js"(e){var t=tI().getModuleCalcData,r=yQ(),i="parcats";e.name=i,e.plot=function(e,n,a,o){var s=t(e.calcdata,i);s.length&&r(e,s[0],a,o)},e.clean=function(e,t,r,i){var n=i._has&&i._has("parcats"),a=t._has&&t._has("parcats");n&&!a&&i._paperdiv.selectAll(".parcats").remove()}}}),y1=p({"src/traces/parcats/index.js"(e,t){t.exports={attributes:y$(),supplyDefaults:yX(),calc:yK(),plot:yQ(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:y0(),categories:["noOpacity"],meta:{}}}}),y2=p({"lib/parcats.js"(e,t){t.exports=y1()}}),y3=p({"src/plots/map/styles/arcgis-sat-hybrid.js"(e,t){t.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} +`),n=yR().maxDimensionCount,a=tv(),o=new Uint8Array(4),s=new Uint8Array(4),l={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function c(e,t,r,i,n){var a=e._gl;a.enable(a.SCISSOR_TEST),a.scissor(t,r,i,n),e.clear({color:[0,0,0,0],depth:1})}function u(e,t){return(e>>>8*t)%256/255}function h(e){return("0"+e).slice(-2)}function d(e){return ed&&(d=e[i].dim1.canvasX,s=i);0===l&&c(x,0,0,h.canvasWidth,h.canvasHeight);var b=function(e){var t,r,i,n=[[],[]];for(i=0;i<64;i++){var a=!e&&is._length&&(I=I.slice(0,s._length));var z,D=s.tickvals;function O(e,t){return{val:e,text:z[t]}}function R(e,t){return e.val-t.val}if(n(D)&&D.length){i.isTypedArray(D)&&(D=Array.from(D)),n(z=s.ticktext)&&z.length?z.length>D.length?z=z.slice(0,D.length):D.length>z.length&&(D=D.slice(0,z.length)):z=D.map(a(s.tickformat));for(var F=1;F=i)&&!(l>=n)){var c=e.lineLayer.readPixel(s,n-1-l),u=0!==c[3],h=u?c[2]+256*(c[1]+256*c[0]):null,d={x:s,y:l,clientX:t.clientX,clientY:t.clientY,dataIndex:e.model.key,curveNumber:h};h!==B&&(u?a.hover(d):a.unhover&&a.unhover(d),B=h)}}}),j.style("opacity",function(e){return+!e.pick}),T.style("background","rgba(255, 255, 255, 0)");var N=T.selectAll("."+v.cn.parcoords).data(F,p);N.exit().remove(),N.enter().append("g").classed(v.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),N.attr("transform",function(e){return c(e.model.translateX,e.model.translateY)});var U=N.selectAll("."+v.cn.parcoordsControlView).data(m,p);U.enter().append("g").classed(v.cn.parcoordsControlView,!0),U.attr("transform",function(e){return c(e.model.pad.l,e.model.pad.t)});var V=U.selectAll("."+v.cn.yAxis).data(function(e){return e.dimensions},p);V.enter().append("g").classed(v.cn.yAxis,!0),U.each(function(e){P(V,e,D)}),j.each(function(e){if(e.viewModel){!e.lineLayer||a?e.lineLayer=b(this,e):e.lineLayer.update(e),(e.key||0===e.key)&&(e.viewModel[e.key]=e.lineLayer);var t=!e.context||a;e.lineLayer.render(e.viewModel.panels,t)}}),V.attr("transform",function(e){return c(e.xScale(e.xIndex),0)}),V.call(r.behavior.drag().origin(function(e){return e}).on("drag",function(e){var t=e.parent;R.linePickActive(!1),e.x=Math.max(-v.overdrag,Math.min(e.model.width+v.overdrag,r.event.x)),e.canvasX=e.x*e.model.canvasPixelRatio,V.sort(function(e,t){return e.x-t.x}).each(function(t,r){t.xIndex=r,t.x=e===t?t.x:t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio}),P(V,t,D),V.filter(function(t){return 0!==Math.abs(e.xIndex-t.xIndex)}).attr("transform",function(e){return c(e.xScale(e.xIndex),0)}),r.select(this).attr("transform",c(e.x,0)),V.each(function(r,i,n){n===e.parent.key&&(t.dimensions[i]=r)}),t.contextLayer&&t.contextLayer.render(t.panels,!1,!A(t)),t.focusLayer.render&&t.focusLayer.render(t.panels)}).on("dragend",function(e){var t=e.parent;e.x=e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio,P(V,t,D),r.select(this).attr("transform",function(e){return c(e.x,0)}),t.contextLayer&&t.contextLayer.render(t.panels,!1,!A(t)),t.focusLayer&&t.focusLayer.render(t.panels),t.pickLayer&&t.pickLayer.render(t.panels,!0),R.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(t.key,t.dimensions.map(function(e){return e.crossfilterDimensionIndex}))})),V.exit().remove();var q=V.selectAll("."+v.cn.axisOverlays).data(m,p);q.enter().append("g").classed(v.cn.axisOverlays,!0),q.selectAll("."+v.cn.axis).remove();var H=q.selectAll("."+v.cn.axis).data(m,p);H.enter().append("g").classed(v.cn.axis,!0),H.each(function(e){var t=e.model.height/e.model.tickDistance,i=e.domainScale,n=i.domain();r.select(this).call(r.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(t,e.tickFormat).tickValues(e.ordinal?n:null).tickFormat(function(t){return y.isOrdinal(e)?t:I(e.model.dimensions[e.visibleIndex],t)}).scale(i)),h.font(H.selectAll("text"),e.model.tickFont)}),H.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),H.selectAll("text").style("cursor","default");var G=q.selectAll("."+v.cn.axisHeading).data(m,p);G.enter().append("g").classed(v.cn.axisHeading,!0);var W=G.selectAll("."+v.cn.axisTitle).data(m,p);W.enter().append("text").classed(v.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",f?"none":"auto"),W.text(function(e){return e.label}).each(function(t){var i=r.select(this);h.font(i,t.model.labelFont),u.convertToTspans(i,e)}).attr("transform",function(e){var t=L(e.model.labelAngle,e.model.labelSide),r=v.axisTitleOffset;return(t.dir>0?"":c(0,2*r+e.model.height))+l(t.degrees)+c(-r*t.dx,-r*t.dy)}).attr("text-anchor",function(e){var t=L(e.model.labelAngle,e.model.labelSide);return 2*Math.abs(t.dx)>Math.abs(t.dy)?t.dir*t.dx<0?"start":"end":"middle"});var Y=q.selectAll("."+v.cn.axisExtent).data(m,p);Y.enter().append("g").classed(v.cn.axisExtent,!0);var Z=Y.selectAll("."+v.cn.axisExtentTop).data(m,p);Z.enter().append("g").classed(v.cn.axisExtentTop,!0),Z.attr("transform",c(0,-v.axisExtentOffset));var $=Z.selectAll("."+v.cn.axisExtentTopText).data(m,p);$.enter().append("text").classed(v.cn.axisExtentTopText,!0).call(C),$.text(function(e){return z(e,!0)}).each(function(e){h.font(r.select(this),e.model.rangeFont)});var X=Y.selectAll("."+v.cn.axisExtentBottom).data(m,p);X.enter().append("g").classed(v.cn.axisExtentBottom,!0),X.attr("transform",function(e){return c(0,e.model.height+v.axisExtentOffset)});var K=X.selectAll("."+v.cn.axisExtentBottomText).data(m,p);K.enter().append("text").classed(v.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(C),K.text(function(e){return z(e,!1)}).each(function(e){h.font(r.select(this),e.model.rangeFont)}),x.ensureAxisBrush(q,O,e)}}}),yH=p({"src/traces/parcoords/plot.js"(e,t){var r=yq(),i=yf(),n=yU().isVisible,a={};function o(e,t,r){var i=t.indexOf(r),n=e.indexOf(i);return -1===n&&(n+=t.length),n}var e=t.exports=function(e,t){var s=e._fullLayout;if(i(e,[],a)){var l={},c={},u={},h=s._size;t.forEach(function(t,r){var i=t[0].trace,n=u[r]=i.index;l[r]=e.data[n].dimensions,c[r]=e.data[n].dimensions.slice()}),r(e,t,{width:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{filterChanged:function(t,r,i){var n=c[t][r],a=i.map(function(e){return e.slice()}),o="dimensions["+r+"].constraintrange",l=s._tracePreGUI[e._fullData[u[t]].uid];if(void 0===l[o]){var h=n.constraintrange;l[o]=h||null}var d=e._fullData[u[t]].dimensions[r];a.length?(1===a.length&&(a=a[0]),n.constraintrange=a,d.constraintrange=a.slice(),a=[a]):(delete n.constraintrange,delete d.constraintrange,a=null);var f={};f[o]=a,e.emit("plotly_restyle",[f,[u[t]]])},hover:function(t){e.emit("plotly_hover",t)},unhover:function(t){e.emit("plotly_unhover",t)},axesMoved:function(t,r){var i,a=(i=c[t].filter(n),function(e,t){return o(r,i,e)-o(r,i,t)});l[t].sort(a),c[t].filter(function(e){return!n(e)}).sort(function(e){return c[t].indexOf(e)}).forEach(function(e){l[t].splice(l[t].indexOf(e),1),l[t].splice(c[t].indexOf(e),0,e)}),e.emit("plotly_restyle",[{dimensions:[l[t]]},[u[t]]])}})}};e.reglPrecompiled=a}}),yG=p({"src/traces/parcoords/base_plot.js"(e){var t=T(),r=tI().getModuleCalcData,i=yH(),n=tO();e.name="parcoords",e.plot=function(e){var t=r(e.calcdata,"parcoords")[0];t.length&&i(e,t)},e.clean=function(e,t,r,i){var n=i._has&&i._has("parcoords"),a=t._has&&t._has("parcoords");n&&!a&&(i._paperdiv.selectAll(".parcoords").remove(),i._glimages.selectAll("*").remove())},e.toSVG=function(e){var r=e._fullLayout._glimages,i=t.select(e).selectAll(".svg-container");i.filter(function(e,t){return t===i.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var e=this.toDataURL("image/png");r.append("svg:image").attr({xmlns:n.svg,"xlink:href":e,preserveAspectRatio:"none",x:0,y:0,width:this.style.width,height:this.style.height})}),window.setTimeout(function(){t.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),yW=p({"src/traces/parcoords/base_index.js"(e,t){t.exports={attributes:yO(),supplyDefaults:yB(),calc:yN(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:yG(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),yY=p({"src/traces/parcoords/index.js"(e,t){var r=yW();r.plot=yH(),t.exports=r}}),yZ=p({"lib/parcoords.js"(e,t){t.exports=yY()}}),y$=p({"src/traces/parcats/attributes.js"(e,t){var r=q().extendFlat,i=Z(),n=H(),a=tV(),{hovertemplateAttrs:o,templatefallbackAttrs:s}=eW(),l=at().attributes,c=r({editType:"calc"},a("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:o({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:s({editType:"plot"})});t.exports={domain:l({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:r({},i.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:o({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:s({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:n({editType:"calc"}),tickfont:n({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:c,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}}}),yX=p({"src/traces/parcats/defaults.js"(e,t){var r=tv(),i=tj().hasColorscale,n=tQ(),a=at().defaults,o=t$(),s=y$(),l=yv(),c=z().isTypedArraySpec;function u(e,t){function i(i,n){return r.coerce(e,t,s.dimensions,i,n)}var n=i("values"),a=i("visible");if(n&&n.length||(a=t.visible=!1),a){i("label"),i("displayindex",t._index);var o,l=e.categoryarray,u=r.isArrayOrTypedArray(l)&&l.length>0||c(l);u&&(o="array");var h=i("categoryorder",o);"array"===h?(i("categoryarray"),i("ticktext")):(delete e.categoryarray,delete e.ticktext),u||"array"!==h||(t.categoryorder="trace")}}t.exports=function(e,t,c,h){function d(i,n){return r.coerce(e,t,s,i,n)}var f=o(e,t,{name:"dimensions",handleItemDefaults:u}),p=function(e,t,a,o,s){s("line.shape"),s("line.hovertemplate"),s("line.hovertemplatefallback");var l=s("line.color",o.colorway[0]);if(i(e,"line")&&r.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),n(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=a}return 1/0}(e,t,c,h,d);a(t,h,d),Array.isArray(f)&&f.length||(t.visible=!1),l(t,f,"values",p),d("hoveron"),d("hovertemplate"),d("hovertemplatefallback"),d("arrangement"),d("bundlecolors"),d("sortpaths"),d("counts");var m=h.font;r.coerceFont(d,"labelfont",m,{overrideDflt:{size:Math.round(m.size)}}),r.coerceFont(d,"tickfont",m,{autoShadowDflt:!0,overrideDflt:{size:Math.round(m.size/1.2)}})}}}),yK=p({"src/traces/parcats/calc.js"(e,t){var r=yF().wrap,i=tj().hasColorscale,n=t2(),a=ts(),o=t7(),s=tv(),l=C();t.exports=function(e,t){var c,u,h,d,f,p,m=s.filterVisible(t.dimensions);if(0===m.length)return[];var g,y,v,x=m.map(function(e){var t;if("trace"===e.categoryorder)t=null;else if("array"===e.categoryorder)t=e.categoryarray;else{t=a(e.values);for(var r=!0,i=0;i=e.length||void 0!==t[e[r]])return!1;t[e[r]]=!0}return!0}(e.map(function(e){return e.displayindex})))for(t=0;tt.model.rawColor?1:e.model.rawColor"),C=r.mouse(h)[0];o.loneHover({trace:d,x:b-p.left+m.left,y:w-p.top+m.top,text:E,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:T,idealAlign:Ca.mostReadable(e.model.color)).attr("stroke-width",.3)}function w(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function M(e){e.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function k(e){var t=e.parcatsViewModel.pathSelection,r=e.categoryViewModel.model.dimensionInd,i=e.categoryViewModel.model.categoryInd;return t.filter(function(t){return t.model.categoryInds[r]===i&&t.model.color===e.color})}function A(e,t,i){var n=r.select(e).datum(),a=n.categoryViewModel.model,o=n.parcatsViewModel.graphDiv,s=r.select(e.parentNode).selectAll("rect.bandrect"),l=[];s.each(function(e){k(e).each(function(e){Array.prototype.push.apply(l,g(e))})});var c={};c[a.dimensionInd]=a.categoryValue,o.emit(t,{points:l,event:i,constraints:c})}function S(e,t,i){var n=r.select(e).datum(),a=n.categoryViewModel.model,o=n.parcatsViewModel.graphDiv,s=k(n),l=[];s.each(function(e){Array.prototype.push.apply(l,g(e))});var c={};c[a.dimensionInd]=a.categoryValue,void 0!==n.rawColor&&(c.color=n.rawColor),o.emit(t,{points:l,event:i,constraints:c})}function E(e,t,i){e._fullLayout._calcInverseTransform(e);var n,a,o=e._fullLayout._invScaleX,s=e._fullLayout._invScaleY,l=r.select(i.parentNode).select("rect.catrect"),c=l.node().getBoundingClientRect(),u=l.datum(),h=u.parcatsViewModel,d=h.model.dimensions[u.model.dimensionInd],f=h.trace,p=c.top+c.height/2;h.dimensions.length>1&&d.displayInd===h.dimensions.length-1?(n=c.left,a="left"):(n=c.left+c.width,a="right");var m=u.model.count,g=u.model.categoryLabel,y=m/u.parcatsViewModel.model.count,v={countLabel:m,categoryLabel:g,probabilityLabel:y.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf("count")&&x.push(["Count:",v.countLabel].join(" ")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf("probability")&&x.push(["P("+v.categoryLabel+"):",v.probabilityLabel].join(" "));var b=x.join("
");return{trace:f,x:o*(n-t.left),y:s*(p-t.top),text:b,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:f.hovertemplate,hovertemplateLabels:v,eventData:[{data:f._input,fullData:f,count:m,category:g,probability:y}]}}function C(e){if(!e.parcatsViewModel.dragDimension&&-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){var t;if(!(r.mouse(this)[1]<-1)){var i,n,l,c,u,h,d,f,p,m,g,y,v,x,b,w,T,M,C,L,P,I,z,D,O,R,F,j=e.parcatsViewModel.graphDiv,B=j._fullLayout,N=B._paperdiv.node().getBoundingClientRect(),U=e.parcatsViewModel.hoveron;("color"===U?(_(l=k(n=r.select(this).datum())),l.each(function(){s.raiseToTop(this)}),r.select(this.parentNode).selectAll("rect.bandrect").filter(function(e){return e.color===n.color}).each(function(){s.raiseToTop(this),r.select(this).attr("stroke","black").attr("stroke-width",1.5)}),S(this,"plotly_hover",r.event)):(i=this,r.select(i.parentNode).selectAll("rect.bandrect").each(function(e){var t=k(e);_(t),t.each(function(){s.raiseToTop(this)})}),r.select(i.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5),A(this,"plotly_hover",r.event)),-1===e.parcatsViewModel.hoverinfoItems.indexOf("none"))&&("category"===U?t=E(j,N,this):"color"===U?(j._fullLayout._calcInverseTransform(j),h=j._fullLayout._invScaleX,d=j._fullLayout._invScaleY,f=this.getBoundingClientRect(),y=(g=(m=(p=r.select(this).datum()).categoryViewModel).parcatsViewModel).model.dimensions[m.model.dimensionInd],v=g.trace,x=f.y+f.height/2,g.dimensions.length>1&&y.displayInd===g.dimensions.length-1?(c=f.left,u="left"):(c=f.left+f.width,u="right"),b=m.model.categoryLabel,w=p.parcatsViewModel.model.count,T=0,p.categoryViewModel.bands.forEach(function(e){e.color===p.color&&(T+=e.count)}),M=m.model.count,C=0,g.pathSelection.each(function(e){e.model.color===p.color&&(C+=e.model.count)}),L=T/w,P=T/C,I=T/M,z={countLabel:T,categoryLabel:b,probabilityLabel:L.toFixed(3)},D=[],-1!==m.parcatsViewModel.hoverinfoItems.indexOf("count")&&D.push(["Count:",z.countLabel].join(" ")),-1!==m.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(D.push("P(color ∩ "+b+"): "+z.probabilityLabel),D.push("P("+b+" | color): "+P.toFixed(3)),D.push("P(color | "+b+"): "+I.toFixed(3))),O=D.join("
"),R=a.mostReadable(p.color),t={trace:v,x:h*(c-N.left),y:d*(x-N.top),text:O,color:p.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:R,fontSize:10,idealAlign:u,hovertemplate:v.hovertemplate,hovertemplateLabels:z,eventData:[{data:v._input,fullData:v,category:b,count:w,probability:L,categorycount:M,colorcount:C,bandcolorcount:T}]}):"dimension"===U&&(F=[],r.select(this.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){F.push(E(j,N,this))}),t=F),t&&o.loneHover(t,{container:B._hoverlayer.node(),outerContainer:B._paper.node(),gd:j}))}}}function L(e){var t=e.parcatsViewModel;t.dragDimension||(b(t.pathSelection),w(t.dimensionSelection.selectAll("g.category")),M(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),o.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(f),-1!==t.hoverinfoItems.indexOf("skip"))||("color"===e.parcatsViewModel.hoveron?S(this,"plotly_unhover",r.event):A(this,"plotly_unhover",r.event))}function P(e){"fixed"!==e.parcatsViewModel.arrangement&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(e){return e.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,r.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var i=r.mouse(this)[0],n=r.mouse(this)[1];-2<=i&&i<=t.width+2&&-2<=n&&n<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(e){return e.displayInd}),t.model.dragY=t.y,s.raiseToTop(this.parentNode),r.select(this.parentNode).selectAll("rect.bandrect").each(function(t){t.yc.y+c.height/2&&(n.model.displayInd=c.model.displayInd,c.model.displayInd=o),e.dragCategoryDisplayInd=n.model.displayInd}if(null===e.dragCategoryDisplayInd||"freeform"===e.parcatsViewModel.arrangement){i.model.dragX=r.event.x;var u=e.parcatsViewModel.dimensions[t-1],h=e.parcatsViewModel.dimensions[t+1];void 0!==u&&i.model.dragXh.x&&(i.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=i.model.displayInd}N(e.parcatsViewModel),B(e.parcatsViewModel),R(e.parcatsViewModel),O(e.parcatsViewModel)}}function z(e){if("fixed"!==e.parcatsViewModel.arrangement&&null!==e.dragDimensionDisplayInd){r.select(this).selectAll("text").attr("font-weight","normal");var t={},i=D(e.parcatsViewModel),a=e.parcatsViewModel.model.dimensions.map(function(e){return e.displayInd}),o=e.initialDragDimensionDisplayInds.some(function(e,t){return e!==a[t]});o&&a.forEach(function(r,i){t["dimensions["+e.parcatsViewModel.model.dimensions[i].containerInd+"].displayindex"]=r});var s=!1;if(null!==e.dragCategoryDisplayInd){var l=e.model.categories.map(function(e){return e.displayInd});if(s=e.initialDragCategoryDisplayInds.some(function(e,t){return e!==l[t]})){var c=e.model.categories.slice().sort(function(e,t){return e.displayInd-t.displayInd}),u=c.map(function(e){return e.categoryValue}),h=c.map(function(e){return e.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[u],t["dimensions["+e.model.containerInd+"].ticktext"]=[h],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!e.dragHasMoved&&e.potentialClickBand&&("color"===e.parcatsViewModel.hoveron?S(e.potentialClickBand,"plotly_click",r.event.sourceEvent):A(e.potentialClickBand,"plotly_click",r.event.sourceEvent)),e.model.dragX=null,null!==e.dragCategoryDisplayInd&&(e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd].model.dragY=null,e.dragCategoryDisplayInd=null),e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,N(e.parcatsViewModel),B(e.parcatsViewModel),r.transition().duration(300).ease("cubic-in-out").each(function(){R(e.parcatsViewModel,!0),O(e.parcatsViewModel,!0)}).each("end",function(){(o||s)&&n.restyle(e.parcatsViewModel.graphDiv,t,[i])})}}function D(e){for(var t,r=e.graphDiv._fullData,i=0;i=0;s--)u+="C"+c[s]+","+(t[s+1]+n)+" "+l[s]+","+(t[s]+n)+" "+(e[s]+r[s])+","+(t[s]+n)+("l-"+r[s])+",0 ";return u+"Z"}function B(e){var t=e.dimensions,r=e.model,i=t.map(function(e){return e.categories.map(function(e){return e.y})}),n=e.model.dimensions.map(function(e){return e.categories.map(function(e){return e.displayInd})}),a=e.model.dimensions.map(function(e){return e.displayInd}),o=e.dimensions.map(function(e){return e.model.dimensionInd}),s=t.map(function(e){return e.x}),l=t.map(function(e){return e.width}),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function h(e){var t=e.categoryInds.map(function(e,t){return n[t][e]});return o.map(function(e){return t[e]})}c.sort(function(t,r){var i=h(t),n=h(r);return"backward"===e.sortpaths&&(i.reverse(),n.reverse()),i.push(t.valueInds[0]),n.push(r.valueInds[0]),e.bundlecolors&&(i.unshift(t.rawColor),n.unshift(r.rawColor)),function(e,t){for(var r=0;rn)return 1;if(i!==n){var a=isNaN(i);if(a!==isNaN(n))return a?1:-1}}return e.length-t.length}(i,n)});for(var d=Array(c.length),f=t[0].model.count,p=t[0].categories.map(function(e){return e.height}).reduce(function(e,t){return e+t}),m=0;m0?p*(v.count/f):0;for(var x=Array(i.length),b=0;b1?(e.width-80-16)/(i-1):0)*n;var a,o,s,l,c,u=[],h=e.model.maxCats,d=t.categories.length,f=t.count,p=e.height-8*(h-1),m=(h-d)*8/2,g=t.categories.map(function(e){return{displayInd:e.displayInd,categoryInd:e.categoryInd}});for(g.sort(function(e,t){return e.displayInd-t.displayInd}),c=0;c0?o.count/f*p:0,s={key:o.valueInds[0],model:o,width:16,height:a,y:null!==o.dragY?o.dragY:m,bands:[],parcatsViewModel:e},m=m+a+8,u.push(s);return{key:t.dimensionInd,x:null!==t.dragX?t.dragX:r,y:0,width:16,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}(e,a))}e.dimensions=r}t.exports=function(e,t,i,n){var a,o,g,y,v,_,T,k,A,S,E,D;a=e._context.staticPlot,o=i.map(F.bind(0,e,n)),(g=t.selectAll("g.parcatslayer").data([null])).enter().append("g").attr("class","parcatslayer").style("pointer-events",a?"none":"all"),v=(y=g.selectAll("g.trace.parcats").data(o,h)).enter().append("g").attr("class","trace parcats"),y.attr("transform",function(e){return l(e.x,e.y)}),v.append("g").attr("class","paths"),(_=y.select("g.paths").selectAll("path.path").data(function(e){return e.paths},h)).attr("fill",function(e){return e.model.color}),b(T=_.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(e){return e.model.color}).attr("fill-opacity",0)),_.attr("d",function(e){return e.svgD}),T.empty()||_.sort(f),_.exit().remove(),_.on("mouseover",p).on("mouseout",m).on("click",x),v.append("g").attr("class","dimensions"),(k=y.select("g.dimensions").selectAll("g.dimension").data(function(e){return e.dimensions},h)).enter().append("g").attr("class","dimension"),k.attr("transform",function(e){return l(e.x,0)}),k.exit().remove(),S=(A=k.selectAll("g.category").data(function(e){return e.categories},h)).enter().append("g").attr("class","category"),A.attr("transform",function(e){return l(0,e.y)}),S.append("rect").attr("class","catrect").attr("pointer-events","none"),A.select("rect.catrect").attr("fill","none").attr("width",function(e){return e.width}).attr("height",function(e){return e.height}),w(S),(E=A.selectAll("rect.bandrect").data(function(e){return e.bands},h)).each(function(){s.raiseToTop(this)}),E.attr("fill",function(e){return e.color}),D=E.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(e){return e.color}).attr("fill-opacity",0),E.attr("fill",function(e){return e.color}).attr("width",function(e){return e.width}).attr("height",function(e){return e.height}).attr("y",function(e){return e.y}).attr("cursor",function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"perpendicular"===e.parcatsViewModel.arrangement?"ns-resize":"move"}),M(D),E.exit().remove(),S.append("text").attr("class","catlabel").attr("pointer-events","none"),A.select("text.catlabel").attr("text-anchor",function(e){return d(e)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(e){return d(e)?e.width+5:-5}).attr("y",function(e){return e.height/2}).text(function(e){return e.model.categoryLabel}).each(function(t){c.font(r.select(this),t.parcatsViewModel.categorylabelfont),u.convertToTspans(r.select(this),e)}),S.append("text").attr("class","dimlabel"),A.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"ew-resize"}).attr("x",function(e){return e.width/2}).attr("y",-5).text(function(e,t){return 0===t?e.parcatsViewModel.model.dimensions[e.model.dimensionInd].dimensionLabel:null}).each(function(e){c.font(r.select(this),e.parcatsViewModel.labelfont)}),A.selectAll("rect.bandrect").on("mouseover",C).on("mouseout",L),A.exit().remove(),k.call(r.behavior.drag().origin(function(e){return{x:e.x,y:0}}).on("dragstart",P).on("drag",I).on("dragend",z)),y.each(function(e){e.traceSelection=r.select(this),e.pathSelection=r.select(this).selectAll("g.paths").selectAll("path.path"),e.dimensionSelection=r.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),y.exit().remove()}}}),yQ=p({"src/traces/parcats/plot.js"(e,t){var r=yJ();t.exports=function(e,t,i,n){var a=e._fullLayout,o=a._paper,s=a._size;r(e,o,t,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},i,n)}}}),y0=p({"src/traces/parcats/base_plot.js"(e){var t=tI().getModuleCalcData,r=yQ(),i="parcats";e.name=i,e.plot=function(e,n,a,o){var s=t(e.calcdata,i);s.length&&r(e,s[0],a,o)},e.clean=function(e,t,r,i){var n=i._has&&i._has("parcats"),a=t._has&&t._has("parcats");n&&!a&&i._paperdiv.selectAll(".parcats").remove()}}}),y1=p({"src/traces/parcats/index.js"(e,t){t.exports={attributes:y$(),supplyDefaults:yX(),calc:yK(),plot:yQ(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:y0(),categories:["noOpacity"],meta:{}}}}),y2=p({"lib/parcats.js"(e,t){t.exports=y1()}}),y3=p({"src/plots/map/styles/arcgis-sat-hybrid.js"(e,t){t.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} @@ -2706,9 +2706,9 @@ void main() { {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}}),y5=p({"src/plots/map/styles/arcgis-sat.js"(e,t){t.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"}}]}}}),y4=p({"src/plots/map/constants.js"(e,t){var r=(e6(),v(e3)).default,i=y3(),n=y5(),a="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",o="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",s="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",l={basic:s,streets:s,outdoors:s,light:a,dark:o,satellite:n,"satellite-streets":i,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:'\xa9 OpenStreetMap contributors',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":a,"carto-darkmatter":o,"carto-voyager":s,"carto-positron-nolabels":"https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json","carto-darkmatter-nolabels":"https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json","carto-voyager-nolabels":"https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json"},c=r(l);t.exports={styleValueDflt:"basic",stylesMap:l,styleValuesMap:c,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",c.join(", "),"or use a tile service."].join(` -`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}}}),y6=p({"src/plots/map/layout_attributes.js"(e,t){var r=tv(),i=ee().defaultLine,n=at().attributes,a=H(),o=ix().textposition,s=eq().overrideAll,l=tS().templatedArray,c=y4(),u=a({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});u.family.dflt="Open Sans Regular, Arial Unicode MS Regular",(t.exports=s({_arrayAttrRegexps:[r.counterRegex("map",".layers",!0)],domain:n({name:"map"}),style:{valType:"any",values:c.styleValuesMap,dflt:c.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:l("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:i},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:i}},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:u,textposition:r.extendFlat({},o,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none"}}}),y8=p({"src/traces/scattermap/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:i,templatefallbackAttrs:n}=eW(),a=iv(),o=pl(),s=ix(),l=y6(),c=Z(),u=tV(),h=q().extendFlat,d=eq().overrideAll,f=y6(),p=o.line,m=o.marker;t.exports=d({lon:o.lon,lat:o.lat,cluster:{enabled:{valType:"boolean"},maxzoom:h({},f.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:h({},m.opacity,{dflt:1})},mode:h({},s.mode,{dflt:"markers"}),text:h({},s.text,{}),texttemplate:i({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:n({editType:"plot"}),hovertext:h({},s.hovertext,{}),line:{color:p.color,width:p.width},connectgaps:s.connectgaps,marker:h({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:m.opacity,size:m.size,sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode},u("marker")),fill:o.fill,fillcolor:a(),textfont:l.layers.symbol.textfont,textposition:l.layers.symbol.textposition,below:{valType:"string"},selected:{marker:s.selected.marker},unselected:{marker:s.unselected.marker},hoverinfo:h({},c.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:r(),hovertemplatefallback:n()},"calc","nested")}}),y7=p({"src/traces/scattermap/constants.js"(e,t){var r=["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"];t.exports={isSupportedFont:function(e){return -1!==r.indexOf(e)}}}}),y9=p({"src/traces/scattermap/defaults.js"(e,t){var r=tv(),i=t5(),n=iq(),a=iH(),o=iW(),s=iY(),l=y8(),c=y7().isSupportedFont;t.exports=function(e,t,u,h){function d(i,n){return r.coerce(e,t,l,i,n)}function f(i,n){return r.coerce2(e,t,l,i,n)}if(p=t,g=(m=d)("lon")||[],y=m("lat")||[],p._length=v=Math.min(g.length,y.length),!v){t.visible=!1;return}if(d("text"),d("texttemplate"),d("texttemplatefallback"),d("hovertext"),d("hovertemplate"),d("hovertemplatefallback"),d("mode"),d("below"),i.hasMarkers(t)){n(e,t,u,h,d,{noLine:!0,noAngle:!0}),d("marker.allowoverlap"),d("marker.angle");var p,m,g,y,v,x=t.marker;"circle"!==x.symbol&&(r.isArrayOrTypedArray(x.size)&&(x.size=x.size[0]),r.isArrayOrTypedArray(x.color)&&(x.color=x.color[0]))}i.hasLines(t)&&(a(e,t,u,h,d,{noDash:!0}),d("connectgaps"));var b=f("cluster.maxzoom"),_=f("cluster.step"),w=f("cluster.color",t.marker&&t.marker.color||u),T=f("cluster.size"),M=f("cluster.opacity");if(d("cluster.enabled",!1!==b||!1!==_||!1!==w||!1!==T||!1!==M)||i.hasText(t)){var k=h.font.family;o(e,t,h,d,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:c(k)?k:"Open Sans Regular",weight:h.font.weight,style:h.font.style,size:h.font.size,color:h.font.color}})}d("fill"),"none"!==t.fill&&s(e,t,u,d),r.coerceSelectionMarkerOpacity(t,d)}}}),ve=p({"src/traces/scattermap/format_labels.js"(e,t){var r=rn();t.exports=function(e,t,i){var n={},a=i[t.subplot]._subplot.mockAxis,o=e.lonlat;return n.lonLabel=r.tickText(a,a.c2l(o[0]),!0).text,n.latLabel=r.tickText(a,a.c2l(o[1]),!0).text,n}}}),vt=p({"src/plots/map/convert_text_opts.js"(e,t){var r=tv();t.exports=function(e,t){var i=e.split(" "),n=i[0],a=i[1],o=r.isArrayOrTypedArray(t)?r.mean(t):t,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(n){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(a){case"left":c[1]="right",u[0]=-s;break;case"right":c[1]="left",u[0]=s}return{anchor:c[0]&&c[1]?c.join("-"):c[0]?c[0]:c[1]?c[1]:"center",offset:u}}}}),vr=p({"src/traces/scattermap/convert.js"(e,t){var r=C(),i=tv(),n=L().BADNUM,a=pm(),o=t3(),s=t9(),l=t4(),c=t5(),u=y7().isSupportedFont,h=vt(),d=t6().appendArrayPointValue,f=tF().NEWLINES,p=tF().BR_TAG_ALL;function m(e){return{type:e,geojson:a.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function g(e,t){return i.isArrayOrTypedArray(e)?t?function(t){return r(e[t])?+e[t]:0}:function(t){return e[t]}:e?function(){return e}:y}function y(){return""}function v(e,t){var r;if(i.isArrayOrTypedArray(e)&&i.isArrayOrTypedArray(t)){r=["step",["get","point_count"],e[0]];for(var n=1;n850?s+=" Black":n>750?s+=" Extra Bold":n>650?s+=" Bold":n>550?s+=" Semi Bold":n>450?s+=" Medium":n>350?s+=" Regular":n>250?s+=" Light":n>150?s+=" Extra Light":s+=" Thin"):"Open Sans"===a.slice(0,2).join(" ")?(s="Open Sans",n>750?s+=" Extrabold":n>650?s+=" Bold":n>550?s+=" Semibold":n>350?s+=" Regular":s+=" Light"):"Klokantech Noto Sans"===a.slice(0,3).join(" ")&&(s="Klokantech Noto Sans","CJK"===a[3]&&(s+=" CJK"),s+=n>500?" Bold":" Regular")),o&&(s+=" Italic"),"Open Sans Regular Italic"===s?s="Open Sans Italic":"Open Sans Regular Bold"===s?s="Open Sans Bold":"Open Sans Regular Bold Italic"===s?s="Open Sans Bold Italic":"Klokantech Noto Sans Regular Italic"===s&&(s="Klokantech Noto Sans Italic"),u(s)||(s=r),s.split(", ")}t.exports=function(e,t){var u,b=t[0].trace,_=!0===b.visible&&0!==b._length,w="none"!==b.fill,T=c.hasLines(b),M=c.hasMarkers(b),k=c.hasText(b),A=M&&"circle"===b.marker.symbol,S=M&&"circle"!==b.marker.symbol,E=b.cluster&&b.cluster.enabled,C=m("fill"),L=m("line"),P=m("circle"),I=m("symbol"),z={fill:C,line:L,circle:P,symbol:I};if(!_)return z;if((w||T)&&(u=a.calcTraceToLineCoords(t)),w&&(C.geojson=a.makePolygon(u),C.layout.visibility="visible",i.extendFlat(C.paint,{"fill-color":b.fillcolor})),T&&(L.geojson=a.makeLine(u),L.layout.visibility="visible",i.extendFlat(L.paint,{"line-width":b.line.width,"line-color":b.line.color,"line-opacity":b.opacity})),A){var D=function(e){var t,a,c,u,h,d=e[0].trace,f=d.marker,p=d.selectedpoints,m=i.isArrayOrTypedArray(f.color),g=i.isArrayOrTypedArray(f.size),y=i.isArrayOrTypedArray(f.opacity);function v(e){return d.opacity*e}m&&(t=o.hasColorscale(d,"marker")?o.makeColorScaleFuncFromTrace(f):i.identity),g&&(a=l(d)),y&&(c=function(e){return v(r(e)?+i.constrain(e,0,1):0)});var x=[];for(h=0;h=0;t--){var r=a[t];n.removeLayer(h.layerIds[r])}e||n.removeSource(h.sourceIds.circle)}(e):function(e){for(var t=o.length-1;t>=0;t--){var r=o[t];n.removeLayer(h.layerIds[r]),e||n.removeSource(h.sourceIds[r])}}(e)}function f(e){c?function(e){e||h.addSource("circle",s.circle,t.cluster);for(var r=0;r=0;r--){var i=t[r];e.removeLayer(this.layerIds[i]),e.removeSource(this.sourceIds[i])}},t.exports=function(e,t){var r,n,l,c=t[0].trace,u=c.cluster&&c.cluster.enabled,h=!0!==c.visible,d=new s(e,c.uid,u,h),f=i(e.gd,t),p=d.below=e.belowLookup["trace-"+c.uid];if(u)for(d.addSource("circle",f.circle,c.cluster),r=0;r")}}t.exports={hoverPoints:function(e,t,a){var c=e.cd,u=c[0].trace,h=e.xa,d=e.ya,f=e.subplot,p=[],m=s+u.uid+"-circle",g=u.cluster&&u.cluster.enabled;g&&(p=f.map.queryRenderedFeatures(null,{layers:[m]}).map(function(e){return e.id}));var y=360*(t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360)),v=t-y;if(r.getClosest(c,function(e){var t=e.lonlat;if(t[0]===o||g&&-1===p.indexOf(e.i+1))return 1/0;var r=i.modHalf(t[0],360),n=t[1],s=f.project([r,n]),l=s.x-h.c2p([v,n]),c=s.y-d.c2p([r,a]),u=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-u,1-3/u)},e),!1!==e.index){var x=c[e.index],b=x.lonlat,_=[i.modHalf(b[0],360)+y,b[1]],w=h.c2p(_),T=d.c2p(_),M=x.mrc||1;e.x0=w-M,e.x1=w+M,e.y0=T-M,e.y1=T+M;var k={};k[u.subplot]={_subplot:f};var A=u._module.formatLabels(x,u,k);return e.lonLabel=A.lonLabel,e.latLabel=A.latLabel,e.color=n(u,x),e.extraText=l(u,x,c[0].t.labels),e.hovertemplate=u.hovertemplate,[e]}},getExtraText:l}}}),va=p({"src/traces/scattermap/event_data.js"(e,t){t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e}}}),vo=p({"src/traces/scattermap/select.js"(e,t){var r=tv(),i=t5(),{BADNUM:n}=L();t.exports=function(e,t){var a;let{cd:o,xaxis:s,yaxis:l}=e,{trace:c}=o[0];if(!i.hasMarkers(c))return[];if(!1===t){for(let e of o)e.selected=0;return[]}let u=null==(a=s._subplot)?void 0:a.map,h=u?.getRenderWorldCopies()&&t.xmax>t.xmin?u.transform.worldSize:0,d=[];for(let i=0;itypeof window&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([a],{type:"text/javascript"}))),e}}return r("shared",["exports"],function(e){let t,r,i,n,a,o,s,l,c,u,h,f,p,m,g,y,v,x,b;function _(e,t,r,i){return new(r||(r=Promise))(function(n,a){function o(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,s)}l((i=i.apply(e,t||[])).next())})}function w(e,t){this.x=e,this.y=t}function T(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError,w.prototype={clone(){return new w(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,t){return this.clone()._rotateAround(e,t)},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 t=e.x-this.x,r=e.y-this.y;return t*t+r*r},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,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult(e){let t=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,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 t=Math.cos(e),r=Math.sin(e),i=r*this.x+t*this.y;return this.x=t*this.x-r*this.y,this.y=i,this},_rotateAround(e,t){let r=Math.cos(e),i=Math.sin(e),n=t.y+i*(this.x-t.x)+r*(this.y-t.y);return this.x=t.x+r*(this.x-t.x)-i*(this.y-t.y),this.y=n,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:w},w.convert=function(e){if(e instanceof w)return e;if(Array.isArray(e))return new w(+e[0],+e[1]);if(void 0!==e.x&&void 0!==e.y)return new w(+e.x,+e.y);throw Error("Expected [x, y] or {x, y} point format")};var M,k,A,S,E,C,L,P,I,z,D,O,R,F,j,B,N,U,V,q,H,G,W,Y,Z=T(function(){if(rd)return rh;function e(e,t,r,i){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(i-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=i}return rd=1,rh=e,e.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var r=e,i=0;i<8;i++){var n=this.sampleCurveX(r)-e;if(Math.abs(n)Math.abs(a))break;r-=n/a}var o=0,s=1;for(r=e,i=0;i<20&&!(Math.abs((n=this.sampleCurveX(r))-e)n?o=r:s=r,r=.5*(s-o)+o;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}},rh}());function $(){return null!=t||(t="u">typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),t}function X(){if(null==r&&(r=!1,$())){let e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let t=0;t<25;t++){let r=4*t;e.fillStyle=`rgb(${r},${r+1},${r+2})`,e.fillRect(t%5,Math.floor(t/5),1,1)}let t=e.getImageData(0,0,5,5).data;for(let e=0;e<100;e++)if(e%4!=3&&t[e]!==e){r=!0;break}}}return r||!1}var K="u">typeof Float32Array?Float32Array:Array;function J(){var e=new K(9);return K!=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 Q(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 ee(){var e=new K(3);return K!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function et(e){var t=e[0],r=e[1],i=e[2];return Math.sqrt(t*t+r*r+i*i)}function er(e,t,r){var i=new K(3);return i[0]=e,i[1]=t,i[2]=r,i}function ei(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function en(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function ea(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=n*l-a*s,e[1]=a*o-i*l,e[2]=i*s-n*o,e}function eo(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3];return e[0]=r[0]*i+r[4]*n+r[8]*a+r[12]*o,e[1]=r[1]*i+r[5]*n+r[9]*a+r[13]*o,e[2]=r[2]*i+r[6]*n+r[10]*a+r[14]*o,e[3]=r[3]*i+r[7]*n+r[11]*a+r[15]*o,e}function es(){var e=new K(4);return K!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function el(e,t,r,i){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"zyx",a=Math.PI/360;t*=a,i*=a,r*=a;var o=Math.sin(t),s=Math.cos(t),l=Math.sin(r),c=Math.cos(r),u=Math.sin(i),h=Math.cos(i);switch(n){case"xyz":e[0]=o*c*h+s*l*u,e[1]=s*l*h-o*c*u,e[2]=s*c*u+o*l*h,e[3]=s*c*h-o*l*u;break;case"xzy":e[0]=o*c*h-s*l*u,e[1]=s*l*h-o*c*u,e[2]=s*c*u+o*l*h,e[3]=s*c*h+o*l*u;break;case"yxz":e[0]=o*c*h+s*l*u,e[1]=s*l*h-o*c*u,e[2]=s*c*u-o*l*h,e[3]=s*c*h+o*l*u;break;case"yzx":e[0]=o*c*h+s*l*u,e[1]=s*l*h+o*c*u,e[2]=s*c*u-o*l*h,e[3]=s*c*h-o*l*u;break;case"zxy":e[0]=o*c*h-s*l*u,e[1]=s*l*h+o*c*u,e[2]=s*c*u+o*l*h,e[3]=s*c*h-o*l*u;break;case"zyx":e[0]=o*c*h-s*l*u,e[1]=s*l*h+o*c*u,e[2]=s*c*u-o*l*h,e[3]=s*c*h+o*l*u;break;default:throw Error("Unknown angle order "+n)}return e}function ec(){var e=new K(2);return K!=Float32Array&&(e[0]=0,e[1]=0),e}function eu(e,t){var r=new K(2);return r[0]=e,r[1]=t,r}function eh(e,t,r){return t*(8192/(e.tileSize*Math.pow(2,r-e.tileID.overscaledZ)))}function ed(e){return e instanceof Error?e:Error("string"==typeof e?e:String(e))}function ef(e,t){return(e%t+t)%t}function ep(e,t,r){return e*(1-r)+t*r}function em(e){if(e<=0)return 0;if(e>=1)return 1;let t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function eg(e,t,r,i){let n=new Z(e,t,r,i);return e=>n.solve(e)}ee(),rf=new K(4),K!=Float32Array&&(rf[0]=0,rf[1]=0,rf[2]=0,rf[3]=0),ee(),er(1,0,0),er(0,1,0),es(),es(),J(),ec();let ey=eg(.25,.1,.25,1);function ev(e,t,r){return Math.min(r,Math.max(t,e))}function ex(e,t,r){let i=r-t,n=((e-t)%i+i)%i+t;return n===t?r:n}function eb(e,...t){for(let r of t)for(let t in r)e[t]=r[t];return e}let e_=1;function ew(e,t,r){let i={};for(let r in e)i[r]=t.call(this,e[r],r,e);return i}function eT(e,t,r){let i={};for(let r in e)t.call(this,e[r],r,e)&&(i[r]=e[r]);return i}function eM(e){return Array.isArray(e)?e.map(eM):"object"==typeof e&&e?ew(e,eM):e}let ek={};function eA(e){ek[e]||("u">typeof console&&console.warn(e),ek[e]=!0)}function eS(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function eE(e){return"u">typeof WorkerGlobalScope&&void 0!==e&&e instanceof WorkerGlobalScope}let eC=null;function eL(e){return"u">typeof ImageBitmap&&e instanceof ImageBitmap}let eP="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function eI(e,t,r,i,n){return _(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw Error("VideoFrame not supported");let a=new VideoFrame(e,{timestamp:0});try{let o,s,l,c,u=a?.format;if(!u||!u.startsWith("BGR")&&!u.startsWith("RGB"))throw Error(`Unrecognized format ${u}`);let h=u.startsWith("BGR"),d=new Uint8ClampedArray(i*n*4);if(yield a.copyTo(d,(o=4*Math.max(-t,0),s=(Math.max(0,r)-r)*i*4+o,l=Math.max(0,t),c=Math.max(0,r),{rect:{x:l,y:c,width:Math.min(e.width,t+i)-l,height:Math.min(e.height,r+n)-c},layout:[{offset:s,stride:4*i}]})),h)for(let e=0;e{e.removeEventListener(t,r,i)}}}function eD(e){return e*Math.PI/180}function eO(e){return e/Math.PI*180}let eR={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},eF={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},ej="AbortError";class eB extends Error{constructor(e=ej){super(e instanceof Error?e.message:e),this.name=ej,e instanceof Error&&e.stack&&(this.stack=e.stack)}}function eN(e){return e instanceof Error&&e.name===ej}function eU(e){if(e.aborted)throw new eB(e.reason)}let eV={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function eq(e){return eV.REGISTERED_PROTOCOLS[e.substring(0,e.indexOf("://"))]}let eH="global-dispatcher";class eG extends Error{constructor(e,t,r,i){super(`AJAXError: ${t} (${e}): ${r}`),this.status=e,this.statusText=t,this.url=r,this.body=i}}let eW=()=>{var e;return eE(self)?null==(e=self.worker)?void 0:e.referrer:("blob:"===window.location.protocol?window.parent:window).location.href},eY=function(e,t){return _(this,void 0,void 0,function*(){var r,i,n,a;if(e.url.includes("://")&&!/^https?:|^file:/.test(e.url)){let i=eq(e.url);if(i){let r=yield i(e,t);return r.data||"arrayBuffer"!==e.type?r:eb(r,{data:new ArrayBuffer(0)})}if(eE(self)&&null!=(r=self.worker)&&r.actor)return self.worker.actor.sendAsync({type:"GR",data:e,targetMapId:eH},t)}if(!((n=e.url).startsWith("file:")||(null==(a=eW())?void 0:a.startsWith("file:"))&&!/^\w+:/.test(n))){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return function(e,t){return _(this,void 0,void 0,function*(){let r=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,cache:e.cache,referrer:eW(),referrerPolicy:e.referrerPolicy,signal:t.signal}),i,n;"json"!==e.type||r.headers.has("Accept")||r.headers.set("Accept","application/json");try{i=yield fetch(r)}catch(t){throw eN(t)?t:new eG(0,ed(t).message,e.url,new Blob)}if(!i.ok){let t=yield i.blob();throw new eG(i.status,i.statusText,e.url,t)}n="arrayBuffer"===e.type||"image"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text();let a=yield n;return eU(t.signal),{data:a,cacheControl:i.headers.get("Cache-Control"),expires:i.headers.get("Expires"),etag:i.headers.get("ETag")}})}(e,t);if(eE(self)&&null!=(i=self.worker)&&i.actor)return self.worker.actor.sendAsync({type:"GR",data:e,mustQueue:!0,targetMapId:eH},t)}return new Promise((r,i)=>{var n;let a=new XMLHttpRequest;for(let t in a.open(e.method||"GET",e.url,!0),"arrayBuffer"!==e.type&&"image"!==e.type||(a.responseType="arraybuffer"),e.headers)a.setRequestHeader(t,e.headers[t]);"json"===e.type&&(a.responseType="text",null!=(n=e.headers)&&n.Accept||a.setRequestHeader("Accept","application/json")),a.withCredentials="include"===e.credentials,a.onerror=()=>{i(Error(a.statusText))},a.onload=()=>{if(!t.signal.aborted)if((a.status>=200&&a.status<300||0===a.status)&&null!==a.response){let t=a.response;if("json"===e.type)try{t=JSON.parse(a.response)}catch(e){return void i(e)}r({data:t,cacheControl:a.getResponseHeader("Cache-Control"),expires:a.getResponseHeader("Expires"),etag:a.getResponseHeader("ETag")})}else{let t=new Blob([a.response],{type:a.getResponseHeader("Content-Type")});i(new eG(a.status,a.statusText,e.url,t))}},t.signal.addEventListener("abort",()=>{a.abort(),i(new eB(t.signal.reason))}),a.send(e.body)})})};function eZ(e){if(!e||0>=e.indexOf("://")||e.startsWith("data:image/")||e.startsWith("blob:"))return!0;let t=new URL(e),r=window.location;return t.protocol===r.protocol&&t.host===r.host}function e$(e,t,r){var i;null!=(i=r[e])&&i.includes(t)||(r[e]||(r[e]=[]),r[e].push(t))}function eX(e,t,r){if(r?.[e]){let i=r[e].indexOf(t);-1!==i&&r[e].splice(i,1)}}class eK{constructor(e,t={}){eb(this,t),this.type=e}}class eJ extends eK{constructor(e,t={}){super("error",eb({error:e},t))}}class eQ{on(e,t){return this._listeners||(this._listeners={}),e$(e,t,this._listeners),{unsubscribe:()=>{this.off(e,t)}}}off(e,t){return eX(e,t,this._listeners),eX(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners||(this._oneTimeListeners={}),e$(e,t,this._oneTimeListeners),this):new Promise(t=>this.once(e,t))}fire(e,t){var r,i;"string"==typeof e&&(e=new eK(e,t||{}));let n=e.type;if(this.listens(n)){for(let t of(e.target=this,null!=(r=this._listeners)&&r[n]?this._listeners[n].slice():[]))t.call(this,e);for(let t of null!=(i=this._oneTimeListeners)&&i[n]?this._oneTimeListeners[n].slice():[])eX(n,t,this._oneTimeListeners),t.call(this,e);let t=this._eventedParent;t&&(eb(e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),t.fire(e))}else e instanceof eJ&&console.error(e.error);return this}listens(e){var t,r,i,n,a;return(null==(r=null==(t=this._listeners)?void 0:t[e])?void 0:r.length)>0||(null==(n=null==(i=this._oneTimeListeners)?void 0:i[e])?void 0:n.length)>0||(null==(a=this._eventedParent)?void 0:a.listens(e))}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}}var e0={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let e1=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function e2(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}let tb=[ti,tn,ta,to,ts,tl,td,tc,tv(tu),tf,tm,tp,tg,ty];function t_(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!t_(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind){for(let e of tb)if(!t_(e,t))return null}}return`Expected ${tx(e)} but found ${tx(t)} instead.`}function tw(e,t){return t.some(t=>t.kind===e.kind)}function tT(e,t){return t.some(t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e)}function tM(e,t){return"array"===e.kind&&"array"===t.kind?e.itemType.kind===t.itemType.kind&&"number"==typeof e.N:e.kind===t.kind}let tk=4/29,tA=6/29,tS=6/29*3*(6/29),tE=6/29*(6/29)*(6/29),tC=Math.PI/180,tL=180/Math.PI;function tP(e){return(e%=360)<0&&(e+=360),e}function tI([e,t,r,i]){let n,a,o=tD((.2225045*(e=tz(e))+.7168786*(t=tz(t))+.0606169*(r=tz(r)))/1);e===t&&t===r?n=a=o:(n=tD((.4360747*e+.3850649*t+.1430804*r)/.96422),a=tD((.0139322*e+.0971045*t+.7141733*r)/.82521));let s=116*o-16;return[s<0?0:s,500*(n-o),200*(o-a),i]}function tz(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function tD(e){return e>tE?Math.pow(e,1/3):e/tS+tk}function tO([e,t,r,i]){let n=(e+16)/116,a=isNaN(t)?n:n+t/500,o=isNaN(r)?n:n-r/200;return n=+tF(n),[tR(3.1338561*(a=.96422*tF(a))-1.6168667*n-.4906146*(o=.82521*tF(o))),tR(-.9787684*a+1.9161415*n+.033454*o),tR(.0719453*a-.2289914*n+1.4052427*o),i]}function tR(e){return(e=e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055)<0?0:e>1?1:e}function tF(e){return e>tA?e*e*e:tS*(e-tk)}let tj=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};function tB(e,t){return tj(e,t)?e[t]:void 0}function tN(e){return parseInt(e.padEnd(2,e),16)/255}function tU(e,t){return tV(t?e/100:e,0,1)}function tV(e,t,r){return Math.min(Math.max(t,e),r)}function tq(e){return!e.some(Number.isNaN)}let tH={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 tG(e,t,r){return e.map((e,i)=>e+r*(t[i]-e))}class tW{constructor(e,t,r,i=1,n=!0){this.r=e,this.g=t,this.b=r,this.a=i,n||(this.r*=i,this.g*=i,this.b*=i,i||this.overwriteGetter("rgb",[e,t,r,i]))}static parse(e){if(e instanceof tW)return e;if("string"!=typeof e)return;let t=function(e){if("transparent"===(e=e.toLowerCase().trim()))return[0,0,0,0];let t=tB(tH,e);if(t){let[e,r,i]=t;return[e/255,r/255,i/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){let t=e.length<6?1:2,r=1;return[tN(e.slice(r,r+=t)),tN(e.slice(r,r+=t)),tN(e.slice(r,r+=t)),tN(e.slice(r,r+t)||"ff")]}if(e.startsWith("rgb")){let t=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(t){let[e,r,i,n,a,o,s,l,c,u,h,d]=t,f=[n||" ",s||" ",u].join("");if(" "===f||" /"===f||",,"===f||",,,"===f){let e=[i,o,c].join(""),t="%%%"===e?100:255*(""===e);if(t){let e=[tV(r/t,0,1),tV(a/t,0,1),tV(l/t,0,1),h?tU(+h,d):1];if(tq(e))return e}}return}}let r=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(r){let[e,t,i,n,a,o,s,l,c]=r,u=[i||" ",a||" ",s].join("");if(" "===u||" /"===u||",,"===u||",,,"===u){let e=[+t,tV(+n,0,100),tV(+o,0,100),l?tU(+l,c):1];if(tq(e))return function([e,t,r,i]){function n(i){let n=(i+e/30)%12,a=t*Math.min(r,1-r);return r-a*Math.max(-1,Math.min(n-3,9-n,1))}return e=tP(e),t/=100,r/=100,[n(0),n(8),n(4),i]}(e)}}}(e);return t?new tW(...t,!1):void 0}get rgb(){let{r:e,g:t,b:r,a:i}=this,n=i||1/0;return this.overwriteGetter("rgb",[e/n,t/n,r/n,i])}get hcl(){return this.overwriteGetter("hcl",function(e){let[t,r,i,n]=tI(e),a=Math.sqrt(r*r+i*i);return[Math.round(1e4*a)?tP(Math.atan2(i,r)*tL):NaN,a,t,n]}(this.rgb))}get lab(){return this.overwriteGetter("lab",tI(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){let[e,t,r,i]=this.rgb;return`rgba(${[e,t,r].map(e=>Math.round(255*e)).join(",")},${i})`}static interpolate(e,t,r,i="rgb"){switch(i){case"rgb":{let[i,n,a,o]=tG(e.rgb,t.rgb,r);return new tW(i,n,a,o,!1)}case"hcl":{let[i,n,a,o]=e.hcl,[s,l,c,u]=t.hcl,h,d;if(isNaN(i)||isNaN(s))isNaN(i)?isNaN(s)?h=NaN:(h=s,1!==a&&0!==a||(d=l)):(h=i,1!==c&&0!==c||(d=n));else{let e=s-i;s>i&&e>180?e-=360:s180&&(e+=360),h=i+r*e}let[f,p,m,g]=function([e,t,r,i]){return tO([r,Math.cos(e=isNaN(e)?0:e*tC)*t,Math.sin(e)*t,i])}([h,d??n+r*(l-n),a+r*(c-a),o+r*(u-o)]);return new tW(f,p,m,g,!1)}case"lab":{let[i,n,a,o]=tO(tG(e.lab,t.lab,r));return new tW(i,n,a,o,!1)}}}}tW.black=new tW(0,0,0,1),tW.white=new tW(1,1,1,1),tW.transparent=new tW(0,0,0,0),tW.red=new tW(1,0,0,1);class tY{constructor(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let tZ=["bottom","center","top"];class t${constructor(e,t,r,i,n,a){this.text=e,this.image=t,this.scale=r,this.fontStack=i,this.textColor=n,this.verticalAlign=a}}class tX{constructor(e){this.sections=e}static fromString(e){return new tX([new t$(e,null,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(e=>0!==e.text.length||e.image&&0!==e.image.name.length)}static factory(e){return e instanceof tX?e:tX.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map(e=>e.text).join("")}}class tK{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tK)return e;if("number"==typeof e)return new tK([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(let t of e)if("number"!=typeof t)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 tK(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){return new tK(tG(e.values,t.values,r))}}class tJ{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tJ)return e;if("number"==typeof e)return new tJ([e]);if(Array.isArray(e)){for(let t of e)if("number"!=typeof t)return;return new tJ(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){return new tJ(tG(e.values,t.values,r))}}class tQ{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tQ)return e;if("string"==typeof e){let t=tW.parse(e);return t?new tQ([t]):void 0}if(!Array.isArray(e))return;let t=[];for(let r of e){if("string"!=typeof r)return;let e=tW.parse(r);if(!e)return;t.push(e)}return new tQ(t)}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r,i="rgb"){let n=[];if(e.values.length!=t.values.length)throw Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${t.values.length}), cannot interpolate.`);for(let a=0;a=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===i||"number"==typeof i&&i>=0&&i<=1?null:`Invalid rgba value [${[e,t,r,i].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof i?[e,t,r,i]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function t6(e){if(null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||e instanceof t5||e instanceof tW||e instanceof tY||e instanceof tX||e instanceof tK||e instanceof tJ||e instanceof tQ||e instanceof t2||e instanceof t3)return!0;if(Array.isArray(e)){for(let t of e)if(!t6(t))return!1;return!0}if("object"==typeof e){for(let t in e)if(!t6(e[t]))return!1;return!0}return!1}function t8(e){if(null===e)return ti;if("string"==typeof e)return ta;if("boolean"==typeof e)return to;if("number"==typeof e)return tn;if(e instanceof tW)return ts;if(e instanceof t5)return tl;if(e instanceof tY)return th;if(e instanceof tX)return td;if(e instanceof tK)return tf;if(e instanceof tJ)return tm;if(e instanceof tQ)return tp;if(e instanceof t2)return ty;if(e instanceof t3)return tg;if(Array.isArray(e)){let t=e.length,r;for(let t of e){let e=t8(t);if(r){if(r===e)continue;r=tu;break}r=e}return tv(r||tu,t)}return tc}function t7(e){let t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof tW||e instanceof t5||e instanceof tX||e instanceof tK||e instanceof tJ||e instanceof tQ||e instanceof t2||e instanceof t3?e.toString():JSON.stringify(e)}class t9{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!t6(e[1]))return t.error("invalid value");let r=e[1],i=t8(r),n=t.expectedType;return"array"===i.kind&&0===i.N&&n&&"array"===n.kind&&("number"!=typeof n.N||0===n.N)&&(i=n),new t9(i,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let re={string:ta,number:tn,boolean:to,object:tc};class rt{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r,i=1,n=e[0];if("array"===n){let n,a;if(e.length>2){let r=e[1];if("string"!=typeof r||!(r in re)||"object"===r)return t.error('The item type argument of "array" must be one of string, number, boolean',1);n=re[r],i++}else n=tu;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],i++}r=tv(n,a)}else{if(!re[n])throw Error(`Types doesn't contain name = ${n}`);r=re[n]}let a=[];for(;ie.outputDefined())}}let rr={"to-boolean":to,"to-color":ts,"to-number":tn,"to-string":ta};class ri{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=e[0];if(!rr[r])throw Error(`Can't parse ${r} as it is not part of the known types`);if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");let i=rr[r],n=[];for(let r=1;r4?`Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:t4(t[0],t[1],t[2],t[3])))return new tW(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new t0(r||`Could not parse color from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"padding":{let t;for(let r of this.args){t=r.evaluate(e);let i=tK.parse(t);if(i)return i}throw new t0(`Could not parse padding from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"numberArray":{let t;for(let r of this.args){t=r.evaluate(e);let i=tJ.parse(t);if(i)return i}throw new t0(`Could not parse numberArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"colorArray":{let t;for(let r of this.args){t=r.evaluate(e);let i=tQ.parse(t);if(i)return i}throw new t0(`Could not parse colorArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"variableAnchorOffsetCollection":{let t;for(let r of this.args){t=r.evaluate(e);let i=t2.parse(t);if(i)return i}throw new t0(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"number":{let t=null;for(let r of this.args){if(null===(t=r.evaluate(e)))return 0;let i=Number(t);if(!isNaN(i))return i}throw new t0(`Could not convert ${JSON.stringify(t)} to number.`)}case"formatted":return tX.fromString(t7(this.args[0].evaluate(e)));case"resolvedImage":return t3.fromString(t7(this.args[0].evaluate(e)));case"projectionDefinition":return this.args[0].evaluate(e);default:return t7(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}let rn=["Unknown","Point","LineString","Polygon"];class ra{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?"number"==typeof this.feature.type?rn[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(e){let t=this._parseColorCache.get(e);return t||(t=tW.parse(e),this._parseColorCache.set(e,t)),t}}class ro{constructor(e,t,r=[],i,n=new tr,a=[]){this.registry=e,this.path=r,this.key=r.map(e=>`[${e}]`).join(""),this.scope=n,this.errors=a,this.expectedType=i,this._isConstant=t}parse(e,t,r,i,n={}){return t?this.concat(t,r,i)._parse(e,n):this._parse(e,n)}_parse(e,t){function r(e,t,r){return"assert"===r?new rt(t,[e]):"coerce"===r?new ri(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let i=e[0];if("string"!=typeof i)return this.error(`Expression name must be a string, but found ${typeof i} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let n=this.registry[i];if(n){let i=n.parse(e,this);if(!i)return null;if(this.expectedType){let e=this.expectedType,n=i.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==n.kind){if("projectionDefinition"===e.kind&&["string","array"].includes(n.kind)||["color","formatted","resolvedImage"].includes(e.kind)&&["value","string"].includes(n.kind)||["padding","numberArray"].includes(e.kind)&&["value","number","array"].includes(n.kind)||"colorArray"===e.kind&&["value","string","array"].includes(n.kind)||"variableAnchorOffsetCollection"===e.kind&&["value","array"].includes(n.kind))i=r(i,e,t.typeAnnotation||"coerce");else if(this.checkSubtype(e,n))return null}else i=r(i,e,t.typeAnnotation||"assert")}if(!(i instanceof t9)&&"resolvedImage"!==i.type.kind&&this._isConstant(i)){let e=new ra;try{i=new t9(i.type,i.evaluate(e))}catch(e){return this.error(e.message),null}}return i}return this.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===e?"'undefined' value invalid. Use null instead.":"object"==typeof e?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,t,r){let i="number"==typeof e?this.path.concat(e):this.path,n=r?this.scope.concat(r):this.scope;return new ro(this.registry,this._isConstant,i,t||null,n,this.errors)}error(e,...t){let r=`${this.key}${t.map(e=>`[${e}]`).join("")}`;this.errors.push(new tt(r,e))}checkSubtype(e,t){let r=t_(e,t);return r&&this.error(r),r}}class rs{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);let r=[];for(let i=1;it))throw new t0("Input is not a number.");o=s-1}return 0}class ru{constructor(e,t,r){for(let[i,n]of(this.type=e,this.input=t,this.labels=[],this.outputs=[],r))this.labels.push(i),this.outputs.push(n)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");let r=t.parse(e[1],1,tn);if(!r)return null;let i=[],n=null;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(let r=1;r=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);let c=t.parse(o,l,n);if(!c)return null;n=n||c.type,i.push([a,c])}return new ru(n,r,i)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let i=this.input.evaluate(e);if(i<=t[0])return r[0].evaluate(e);let n=t.length;return i>=t[n-1]?r[n-1].evaluate(e):r[rc(t,i)].evaluate(e)}eachChild(e){for(let t of(e(this.input),this.outputs))e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}var rh,rd,rf,rp,rm,rg,ry=(rp=function(){if(rg)return rm;function e(e,t,r,i){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(i-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=i}return rg=1,rm=e,e.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var r=e,i=0;i<8;i++){var n=this.sampleCurveX(r)-e;if(Math.abs(n)Math.abs(a))break;r-=n/a}var o=0,s=1;for(r=e,i=0;i<20&&!(Math.abs((n=this.sampleCurveX(r))-e)n?o=r:s=r,r=.5*(s-o)+o;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}},rm}())&&rp.__esModule&&Object.prototype.hasOwnProperty.call(rp,"default")?rp.default:rp;class rv{constructor(e,t,r,i,n){for(let[a,o]of(this.type=e,this.operator=t,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[],n))this.labels.push(a),this.outputs.push(o)}static interpolationFactor(e,t,r,i){let n=0;if("exponential"===e.name)n=rx(t,e.base,r,i);else if("linear"===e.name)n=rx(t,1,r,i);else if("cubic-bezier"===e.name){let a=e.controlPoints;n=new ry(a[0],a[1],a[2],a[3]).solve(rx(t,1,r,i))}return n}static parse(e,t){let[r,i,n,...a]=e;if(!Array.isArray(i)||0===i.length)return t.error("Expected an interpolation type expression.",1);if("linear"===i[0])i={name:"linear"};else if("exponential"===i[0]){let e=i[1];if("number"!=typeof e)return t.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:e}}else{if("cubic-bezier"!==i[0])return t.error(`Unknown interpolation type ${String(i[0])}`,1,0);{let e=i.slice(1);if(4!==e.length||e.some(e=>"number"!=typeof e||e<0||e>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:e}}}if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(n=t.parse(n,2,tn)))return null;let o=[],s=null;"interpolate-hcl"!==r&&"interpolate-lab"!==r||t.expectedType==tp?t.expectedType&&"value"!==t.expectedType.kind&&(s=t.expectedType):s=ts;for(let e=0;e=r)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',n);let c=t.parse(i,l,s);if(!c)return null;s=s||c.type,o.push([r,c])}return tM(s,tn)||tM(s,tl)||tM(s,ts)||tM(s,tf)||tM(s,tm)||tM(s,tp)||tM(s,ty)||tM(s,tv(tn))?new rv(s,r,i,n,o):t.error(`Type ${tx(s)} is not interpolatable.`)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let i=this.input.evaluate(e);if(i<=t[0])return r[0].evaluate(e);let n=t.length;if(i>=t[n-1])return r[n-1].evaluate(e);let a=rc(t,i),o=rv.interpolationFactor(this.interpolation,i,t[a],t[a+1]),s=r[a].evaluate(e),l=r[a+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return s+o*(l-s);case"color":return tW.interpolate(s,l,o);case"padding":return tK.interpolate(s,l,o);case"colorArray":return tQ.interpolate(s,l,o);case"numberArray":return tJ.interpolate(s,l,o);case"variableAnchorOffsetCollection":return t2.interpolate(s,l,o);case"array":return tG(s,l,o);case"projectionDefinition":return t5.interpolate(s,l,o)}case"interpolate-hcl":switch(this.type.kind){case"color":return tW.interpolate(s,l,o,"hcl");case"colorArray":return tQ.interpolate(s,l,o,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return tW.interpolate(s,l,o,"lab");case"colorArray":return tQ.interpolate(s,l,o,"lab")}}}eachChild(e){for(let t of(e(this.input),this.outputs))e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function rx(e,t,r,i){let n=i-r,a=e-r;return 0===n?0:1===t?a/n:(Math.pow(t,a)-1)/(Math.pow(t,n)-1)}let rb={color:tW.interpolate,number:function(e,t,r){return e+r*(t-e)},padding:tK.interpolate,numberArray:tJ.interpolate,colorArray:tQ.interpolate,variableAnchorOffsetCollection:t2.interpolate,array:tG};class r_{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=null,i=t.expectedType;i&&"value"!==i.kind&&(r=i);let n=[];for(let i of e.slice(1)){let e=t.parse(i,1+n.length,r,void 0,{typeAnnotation:"omit"});if(!e)return null;r=r||e.type,n.push(e)}if(!r)throw Error("No output type");return new r_(i&&n.some(e=>t_(i,e.type))?tu:r,n)}evaluate(e){let t,r=null,i=0;for(let n of this.args)if(i++,(r=n.evaluate(e))&&r instanceof t3&&!r.available&&(t||(t=r.name),r=null,i===this.args.length&&(r=t)),null!==r)break;return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}function rw(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function rT(e,t,r,i){return 0===i.compare(t,r)}function rM(e,t,r){let i="=="!==e&&"!="!==e;return class n{constructor(e,t,r){this.type=to,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");let r=e[0],a=t.parse(e[1],1,tu);if(!a)return null;if(!rw(r,a.type))return t.concat(1).error(`"${r}" comparisons are not supported for type '${tx(a.type)}'.`);let o=t.parse(e[2],2,tu);if(!o)return null;if(!rw(r,o.type))return t.concat(2).error(`"${r}" comparisons are not supported for type '${tx(o.type)}'.`);if(a.type.kind!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error(`Cannot compare types '${tx(a.type)}' and '${tx(o.type)}'.`);i&&("value"===a.type.kind&&"value"!==o.type.kind?a=new rt(o.type,[a]):"value"!==a.type.kind&&"value"===o.type.kind&&(o=new rt(a.type,[o])));let s=null;if(4===e.length){if("string"!==a.type.kind&&"string"!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,th)))return null}return new n(a,o,s)}evaluate(n){let a=this.lhs.evaluate(n),o=this.rhs.evaluate(n);if(i&&this.hasUntypedArgument){let t=t8(a),r=t8(o);if(t.kind!==r.kind||"string"!==t.kind&&"number"!==t.kind)throw new t0(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${r.kind}) instead.`)}if(this.collator&&!i&&this.hasUntypedArgument){let e=t8(a),r=t8(o);if("string"!==e.kind||"string"!==r.kind)return t(n,a,o)}return this.collator?r(n,a,o,this.collator.evaluate(n)):t(n,a,o)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}}}let rk=rM("==",function(e,t,r){return t===r},rT),rA=rM("!=",function(e,t,r){return t!==r},function(e,t,r,i){return!rT(0,t,r,i)}),rS=rM("<",function(e,t,r){return ti.compare(t,r)}),rE=rM(">",function(e,t,r){return t>r},function(e,t,r,i){return i.compare(t,r)>0}),rC=rM("<=",function(e,t,r){return t<=r},function(e,t,r,i){return 0>=i.compare(t,r)}),rL=rM(">=",function(e,t,r){return t>=r},function(e,t,r,i){return i.compare(t,r)>=0});class rP{constructor(e,t,r){this.type=th,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(2!==e.length)return t.error("Expected one argument.");let r=e[1];if("object"!=typeof r||Array.isArray(r))return t.error("Collator options argument must be an object.");let i=t.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,to);if(!i)return null;let n=t.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,to);if(!n)return null;let a=null;return!r.locale||(a=t.parse(r.locale,1,ta))?new rP(i,n,a):null}evaluate(e){return new tY(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}}class rI{constructor(e){this.type=td,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=e[1];if(!Array.isArray(r)&&"object"==typeof r)return t.error("First argument must be an image or text section.");let i=[],n=!1;for(let r=1;r<=e.length-1;++r){let a=e[r];if(n&&"object"==typeof a&&!Array.isArray(a)){n=!1;let e=null;if(a["font-scale"]&&!(e=t.parse(a["font-scale"],1,tn)))return null;let r=null;if(a["text-font"]&&!(r=t.parse(a["text-font"],1,tv(ta))))return null;let o=null;if(a["text-color"]&&!(o=t.parse(a["text-color"],1,ts)))return null;let s=null;if(a["vertical-align"]){if("string"==typeof a["vertical-align"]&&!tZ.includes(a["vertical-align"]))return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${a["vertical-align"]}' instead.`);if(!(s=t.parse(a["vertical-align"],1,ta)))return null}let l=i[i.length-1];l.scale=e,l.font=r,l.textColor=o,l.verticalAlign=s}else{let a=t.parse(e[r],1,tu);if(!a)return null;let o=a.type.kind;if("string"!==o&&"value"!==o&&"null"!==o&&"resolvedImage"!==o)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,i.push({content:a,scale:null,font:null,textColor:null,verticalAlign:null})}}return new rI(i)}evaluate(e){return new tX(this.sections.map(t=>{let r=t.content.evaluate(e);return t8(r)===tg?new t$("",r,null,null,null,t.verticalAlign?t.verticalAlign.evaluate(e):null):new t$(t7(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null,t.verticalAlign?t.verticalAlign.evaluate(e):null)}))}eachChild(e){for(let t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor),t.verticalAlign&&e(t.verticalAlign)}outputDefined(){return!1}}function rz(e,t){let r=Math.pow(2,t.z);return[360*((e[0]/8192+t.x)/r)-180,360/Math.PI*Math.atan(Math.exp((180-360*((e[1]/8192+t.y)/r))*Math.PI/180))-90]}function rD(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function rO(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function rR(e,t,r,i){var n,a;return(a=[i[0]-r[0],i[1]-r[1]])[0]*(n=[t[0]-e[0],t[1]-e[1]])[1]-a[1]*n[0]!=0&&!(!rB(e,t,r,i)||!rB(r,i,e,t))}function rF(e,t,r=!1){var i,n;let a=!1;for(let o of t)for(let t=0;te[1]!=(n=o[t+1])[1]>e[1]&&e[0]<(n[0]-i[0])*(e[1]-i[1])/(n[1]-i[1])+i[0]&&(a=!a)}return a}function rj(e,t){for(let r of e)if(!rF(r,t))return!1;for(let r=0;r0&&s<0||o<0&&s>0}function rN(e,t,r){let i=[];for(let n=0;nr[2]){let t=.5*i,n=e[0]-r[0]>t?-i:r[0]-e[0]>t?i:0;0===n&&(n=e[0]-r[2]>t?-i:r[2]-e[0]>t?i:0),e[0]+=n}rD(t,e)}function rq(e,t,r,i){let n=8192*Math.pow(2,i.z),a=[8192*i.x,8192*i.y],o=[];for(let i of e)for(let e of i){let i=[e.x+a[0],e.y+a[1]];rV(i,t,r,n),o.push(i)}return o}function rH(e,t,r,i){let n=8192*Math.pow(2,i.z),a=[8192*i.x,8192*i.y],o=[];for(let r of e){let e=[];for(let i of r){let r=[i.x+a[0],i.y+a[1]];rD(t,r),e.push(r)}o.push(e)}if(t[2]-t[0]<=n/2)for(let e of(t[0]=t[1]=1/0,t[2]=t[3]=-1/0,o))for(let i of e)rV(i,t,r,n);return o}class rG{constructor(e,t){this.type=to,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(t6(e[1])){let t=e[1];if("FeatureCollection"===t.type){let e=[];for(let r of t.features){let{type:t,coordinates:i}=r.geometry;"Polygon"===t&&e.push(i),"MultiPolygon"===t&&e.push(...i)}if(e.length)return new rG(t,{type:"MultiPolygon",coordinates:e})}else if("Feature"===t.type){let e=t.geometry.type;if("Polygon"===e||"MultiPolygon"===e)return new rG(t,t.geometry)}else if("Polygon"===t.type||"MultiPolygon"===t.type)return new rG(t,t)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=e.canonicalID();if("Polygon"===t.type){let a=rN(t.coordinates,i,n),o=rq(e.geometry(),r,i,n);if(!rO(r,i))return!1;for(let e of o)if(!rF(e,a))return!1}if("MultiPolygon"===t.type){let a=rU(t.coordinates,i,n),o=rq(e.geometry(),r,i,n);if(!rO(r,i))return!1;for(let e of o)if(!function(e,t){for(let r of t)if(rF(e,r))return!0;return!1}(e,a))return!1}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=e.canonicalID();if("Polygon"===t.type){let a=rN(t.coordinates,i,n),o=rH(e.geometry(),r,i,n);if(!rO(r,i))return!1;for(let e of o)if(!rj(e,a))return!1}if("MultiPolygon"===t.type){let a=rU(t.coordinates,i,n),o=rH(e.geometry(),r,i,n);if(!rO(r,i))return!1;for(let e of o)if(!function(e,t){for(let r of t)if(rj(e,r))return!0;return!1}(e,a))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let rW=class{constructor(e=[],t=(e,t)=>et)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,i=t[e];for(;e>0;){let n=e-1>>1,a=t[n];if(r(i,a)>=0)break;t[e]=a,e=n}t[e]=i}_down(e){let{data:t,compare:r}=this,i=this.length>>1,n=t[e];for(;er(t[a],t[i])&&(i=a),r(t[i],n)>=0)break;t[e]=t[i],e=i}t[e]=n}};function rY(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function rZ(e,t){if(e.length<=1)return[e];let r=[],i,n;for(let t of e){let e=function(e){let t=0;for(let r,i,n=0,a=e.length,o=a-1;n1)for(let e=0;et)}){for(;n>i;){if(n-i>600){let o=n-i+1,s=r-i+1,l=Math.log(o),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1);e(t,r,Math.max(i,Math.floor(r-s*c/o+u)),Math.min(n,Math.floor(r+(o-s)*c/o+u)),a)}let o=t[r],s=i,l=n;for(rY(t,i,r),a(t[n],o)>0&&rY(t,i,n);sa(t[s],o);)s++;for(;a(t[l],o)>0;)l--}0===a(t[i],o)?rY(t,i,l):rY(t,++l,n),l<=r&&(i=l+1),r<=l&&(n=l-1)}}(r[e],t,1,r[e].length-1,r$),r[e]=r[e].slice(0,t));return r}function r$(e,t){return t.area-e.area}let rX=1/298.257223563*(2-1/298.257223563),rK=Math.PI/180;class rJ{constructor(e){let t=6378.137*rK*1e3,r=Math.cos(e*rK),i=1/(1-rX*(1-r*r)),n=Math.sqrt(i);this.kx=t*n*r,this.ky=t*n*i*(1-rX)}distance(e,t){let r=this.wrap(e[0]-t[0])*this.kx,i=(e[1]-t[1])*this.ky;return Math.sqrt(r*r+i*i)}pointOnLine(e,t){let r,i,n,a,o=1/0;for(let s=0;s1?(l=e[s+1][0],c=e[s+1][1]):d>0&&(l+=u/this.kx*d,c+=h/this.ky*d));let f=(u=this.wrap(t[0]-l)*this.kx)*u+(h=(t[1]-c)*this.ky)*h;f180;)e-=360;return e}}function rQ(e,t){return t[0]-e[0]}function r0(e){return e[1]-e[0]+1}function r1(e,t){return e[1]>=e[0]&&e[1]e[1])return[null,null];let r=r0(e);if(t){if(2===r)return[e,null];let t=Math.floor(r/2);return[[e[0],e[0]+t],[e[0]+t,e[1]]]}if(1===r)return[e,null];let i=Math.floor(r/2)-1;return[[e[0],e[0]+i],[e[0]+i+1,e[1]]]}function r3(e,t){if(!r1(t,e.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let i=t[0];i<=t[1];++i)rD(r,e[i]);return r}function r5(e){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)for(let e of r)rD(t,e);return t}function r4(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function r6(e,t,r){if(!r4(e)||!r4(t))return NaN;let i=0,n=0;return e[2]t[2]&&(i=e[0]-t[2]),e[1]>t[3]&&(n=e[1]-t[3]),e[3]0;){let n=o.pop();if(n[0]>=a)continue;let l=n[1],c=t?50:100;if(r0(l)<=c){if(!r1(l,e.length))return NaN;if(t){let t=function(e,t,r,i){if(!r1(t,e.length))return NaN;for(let i=t[0];i<=t[1];++i)if(rF(e[i],r,!0))return 0;let n=1/0;for(let a=t[0];a0;){let a=s.pop();if(a[0]>=o)continue;let l=a[1],c=a[2],u=t?50:100,h=i?50:100;if(r0(l)<=u&&r0(c)<=h){if(!r1(l,e.length)&&r1(c,r.length))return NaN;if(t&&i)o=Math.min(o,function(e,t,r,i,n){if(!r1(t,e.length)||!r1(i,r.length))return 1/0;let a=1/0;for(let o=t[0];o({type:"Polygon",coordinates:e})):"MultiLineString"===e.type?e.coordinates.map(e=>({type:"LineString",coordinates:e})):"MultiPoint"===e.type?e.coordinates.map(e=>({type:"Point",coordinates:e})):[e]}class io{constructor(e,t){this.type=tn,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'distance' expression requires exactly one argument, but found ${e.length-1} instead.`);if(t6(e[1])){let t=e[1];if("FeatureCollection"===t.type)return new io(t,t.features.map(e=>ia(e.geometry)).flat());if("Feature"===t.type)return new io(t,ia(t.geometry));if("type"in t&&"coordinates"in t)return new io(t,ia(t))}return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=e.geometry(),i=r.flat().map(t=>rz([t.x,t.y],e.canonical));if(0===r.length)return NaN;let n=new rJ(i[0][1]),a=1/0;for(let e of t){switch(e.type){case"Point":a=Math.min(a,ii(i,!1,[e.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,ii(i,!1,e.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,ir(i,!1,e.coordinates,n,a))}if(0===a)break}return a}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=e.geometry(),i=r.flat().map(t=>rz([t.x,t.y],e.canonical));if(0===r.length)return NaN;let n=new rJ(i[0][1]),a=1/0;for(let e of t){switch(e.type){case"Point":a=Math.min(a,ii(i,!0,[e.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,ii(i,!0,e.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,ir(i,!0,e.coordinates,n,a))}if(0===a)break}return a}(e,this.geometries);if("Polygon"===e.geometryType())return function(e,t){let r=e.geometry();if(0===r.length||0===r[0].length)return NaN;let i=rZ(r,0).map(t=>t.map(t=>t.map(t=>rz([t.x,t.y],e.canonical)))),n=new rJ(i[0][0][0][1]),a=1/0;for(let e of t)for(let t of i){switch(e.type){case"Point":a=Math.min(a,ir([e.coordinates],!1,t,n,a));break;case"LineString":a=Math.min(a,ir(e.coordinates,!0,t,n,a));break;case"Polygon":a=Math.min(a,function(e,t,r,i=1/0){let n=r5(e),a=r5(t);if(i!==1/0&&r6(n,a,r)>=i)return i;if(rO(n,a)){if(r9(e,t))return 0}else if(r9(t,e))return 0;let o=1/0;for(let i of e)for(let e=0,n=i.length,a=n-1;e":rE,"<":rS,">=":rL,"<=":rC,array:rt,at:class e{constructor(e,t,r){this.type=e,this.index=t,this.input=r}static parse(t,r){if(3!==t.length)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,tn),n=r.parse(t[2],2,tv(r.expectedType||tu));return i&&n?new e(n.type.itemType,i,n):null}evaluate(e){let t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new t0(`Array index out of bounds: ${t} < 0.`);if(t>=r.length)throw new t0(`Array index out of bounds: ${t} > ${r.length-1}.`);if(t!==Math.floor(t))throw new t0(`Array index must be an integer, but found ${t} instead.`);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}},boolean:rt,case:class e{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(t,r){let i;if(t.length<4)return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return r.error("Expected an odd number of arguments.");r.expectedType&&"value"!==r.expectedType.kind&&(i=r.expectedType);let n=[];for(let e=1;et.outputDefined())&&this.otherwise.outputDefined()}},coalesce:r_,collator:rP,format:rI,image:class e{constructor(e){this.type=tg,this.input=e}static parse(t,r){if(2!==t.length)return r.error("Expected two arguments.");let i=r.parse(t[1],1,ta);return i?new e(i):r.error("No image name provided.")}evaluate(e){let t=this.input.evaluate(e),r=t3.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}},in:class e{constructor(e,t){this.type=to,this.needle=e,this.haystack=t}static parse(t,r){if(3!==t.length)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,tu),n=r.parse(t[2],2,tu);return i&&n?tw(i.type,[to,ta,tn,ti,tu])?new e(i,n):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${tx(i.type)} instead`):null}evaluate(e){let t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!tT(t,["boolean","string","number","null"]))throw new t0(`Expected first argument to be of type boolean, string, number or null, but found ${tx(t8(t))} instead.`);if(!tT(r,["string","array"]))throw new t0(`Expected second argument to be of type array or string, but found ${tx(t8(r))} instead.`);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}},"index-of":class e{constructor(e,t,r){this.type=tn,this.needle=e,this.haystack=t,this.fromIndex=r}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,tu),n=r.parse(t[2],2,tu);if(!i||!n)return null;if(!tw(i.type,[to,ta,tn,ti,tu]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${tx(i.type)} instead`);if(4===t.length){let a=r.parse(t[3],3,tn);return a?new e(i,n,a):null}return new e(i,n)}evaluate(e){let t,r=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!tT(r,["boolean","string","number","null"]))throw new t0(`Expected first argument to be of type boolean, string, number or null, but found ${tx(t8(r))} instead.`);if(this.fromIndex&&(t=this.fromIndex.evaluate(e)),tT(i,["string"])){let e=i.indexOf(r,t);return -1===e?-1:[...i.slice(0,e)].length}if(tT(i,["array"]))return i.indexOf(r,t);throw new t0(`Expected second argument to be of type array or string, but found ${tx(t8(i))} instead.`)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}},interpolate:rv,"interpolate-hcl":rv,"interpolate-lab":rv,length:class e{constructor(e){this.type=tn,this.input=e}static parse(t,r){if(2!==t.length)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);let i=r.parse(t[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?r.error(`Expected argument of type string or array, but found ${tx(i.type)} instead.`):new e(i):null}evaluate(e){let t=this.input.evaluate(e);if("string"==typeof t)return[...t].length;if(Array.isArray(t))return t.length;throw new t0(`Expected value to be of type string or array, but found ${tx(t8(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}},let:rs,literal:t9,match:class e{constructor(e,t,r,i,n,a){this.inputType=e,this.type=t,this.input=r,this.cases=i,this.outputs=n,this.otherwise=a}static parse(t,r){let i,n;if(t.length<5)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return r.error("Expected an even number of arguments.");r.expectedType&&"value"!==r.expectedType.kind&&(n=r.expectedType);let a={},o=[];for(let e=2;eNumber.MAX_SAFE_INTEGER)return c.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return c.error("Numeric branch labels must be integer values.");if(i){if(c.checkSubtype(i,t8(e)))return null}else i=t8(e);if(void 0!==a[String(e)])return c.error("Branch labels must be unique.");a[String(e)]=o.length}let u=r.parse(l,e,n);if(!u)return null;n=n||u.type,o.push(u)}let s=r.parse(t[1],1,tu);if(!s)return null;let l=r.parse(t[t.length-1],t.length-1,n);return l?"value"!==s.type.kind&&r.concat(1).checkSubtype(i,s.type)?null:new e(i,n,s,a,o,l):null}evaluate(e){let t=this.input.evaluate(e);return(t8(t)===this.inputType&&this.outputs[this.cases[t]]||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()}},number:rt,"number-format":class e{constructor(e,t,r,i,n,a){this.type=ta,this.number=e,this.locale=t,this.currency=r,this.unit=i,this.minFractionDigits=n,this.maxFractionDigits=a}static parse(t,r){if(3!==t.length)return r.error("Expected two arguments.");let i=r.parse(t[1],1,tn);if(!i)return null;let n=t[2];if("object"!=typeof n||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,ta)))return null;let o=null;if(n.currency&&!(o=r.parse(n.currency,1,ta)))return null;let s=null;if(n.unit&&!(s=r.parse(n.unit,1,ta)))return null;if(o&&s)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,tn)))return null;let c=null;return!n["max-fraction-digits"]||(c=r.parse(n["max-fraction-digits"],1,tn))?new e(i,a,o,s,l,c):null}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}},object:rt,slice:class e{constructor(e,t,r,i){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=i}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,tu),n=r.parse(t[2],2,tn);if(!i||!n)return null;if(!tw(i.type,[tv(tu),ta,tu]))return r.error(`Expected first argument to be of type array or string, but found ${tx(i.type)} instead`);if(4===t.length){let a=r.parse(t[3],3,tn);return a?new e(i.type,i,n,a):null}return new e(i.type,i,n)}evaluate(e){let t=this.input.evaluate(e),r=this.beginIndex.evaluate(e),i;if(this.endIndex&&(i=this.endIndex.evaluate(e)),tT(t,["string"]))return[...t].slice(r,i).join("");if(tT(t,["array"]))return t.slice(r,i);throw new t0(`Expected first argument to be of type array or string, but found ${tx(t8(t))} instead.`)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}},step:ru,string:rt,"to-boolean":ri,"to-color":ri,"to-number":ri,"to-string":ri,var:rl,within:rG,distance:io,"global-state":is};class ic{constructor(e,t,r,i){this.name=e,this.type=t,this._evaluate=r,this.args=i}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,t){let r=e[0],i=ic.definitions[r];if(!i)return t.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);let n=Array.isArray(i)?i[0]:i.type,a=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,o=a.filter(([t])=>!Array.isArray(t)||t.length===e.length-1),s=null;for(let[i,a]of o){s=new ro(t.registry,ip,t.path,null,t.scope);let o=[],l=!1;for(let t=1;tArray.isArray(e)?`(${e.map(tx).join(", ")})`:`(${tx(e.type)}...)`).join(" | "),i=[];for(let r=1;r{r=t?r&&ip(e):r&&e instanceof t9}),!!r&&im(e)&&iy(e,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function im(e){if(e instanceof ic&&("get"===e.name&&1===e.args.length||"feature-state"===e.name||"has"===e.name&&1===e.args.length||"properties"===e.name||"geometry-type"===e.name||"id"===e.name||/^filter-/.test(e.name))||e instanceof rG||e instanceof io)return!1;let t=!0;return e.eachChild(e=>{t&&!im(e)&&(t=!1)}),t}function ig(e){if(e instanceof ic&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild(e=>{t&&!ig(e)&&(t=!1)}),t}function iy(e,t){if(e instanceof ic&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild(e=>{r&&!iy(e,t)&&(r=!1)}),r}function iv(e){return{result:"success",value:e}}function ix(e){return{result:"error",value:e}}function ib(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function i_(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function iw(e){return!!e.expression&&e.expression.interpolated}function iT(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function iM(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&t8(e)===tc}function ik(e){return e}function iA(e,t,r){return void 0!==e?e:void 0!==t?t:void 0!==r?r:void 0}function iS(e,t,r,i,n){return iA(typeof r===n?i[r]:void 0,e.default,t.default)}function iE(e,t,r){if("number"!==iT(r))return iA(e.default,t.default);let i=e.stops.length;if(1===i||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[i-1][0])return e.stops[i-1][1];let n=rc(e.stops.map(e=>e[0]),r);return e.stops[n][1]}function iC(e,t,r){var i;let n,a,o=void 0!==e.base?e.base:1;if("number"!==iT(r))return iA(e.default,t.default);let s=e.stops.length;if(1===s||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[s-1][0])return e.stops[s-1][1];let l=rc(e.stops.map(e=>e[0]),r),c=(i=e.stops[l][0],n=e.stops[l+1][0]-i,a=r-i,0===n?0:1===o?a/n:(Math.pow(o,a)-1)/(Math.pow(o,n)-1)),u=e.stops[l][1],h=e.stops[l+1][1],d=rb[t.type]||ik;return"function"==typeof u.evaluate?{evaluate(...t){let r=u.evaluate.apply(void 0,t),i=h.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==i)return d(r,i,c,e.colorSpace)}}:d(u,h,c,e.colorSpace)}function iL(e,t,r){switch(t.type){case"color":r=tW.parse(r);break;case"formatted":r=tX.fromString(r.toString());break;case"resolvedImage":r=t3.fromString(r.toString());break;case"padding":r=tK.parse(r);break;case"colorArray":r=tQ.parse(r);break;case"numberArray":r=tJ.parse(r);break;default:iT(r)===t.type||"enum"===t.type&&t.values[r]||(r=void 0)}return iA(r,e.default,t.default)}ic.register(il,{error:[{kind:"error"},[ta],(e,[t])=>{throw new t0(t.evaluate(e))}],typeof:[ta,[tu],(e,[t])=>tx(t8(t.evaluate(e)))],"to-rgba":[tv(tn,4),[ts],(e,[t])=>{let[r,i,n,a]=t.evaluate(e).rgb;return[255*r,255*i,255*n,a]}],rgb:[ts,[tn,tn,tn],iu],rgba:[ts,[tn,tn,tn,tn],iu],has:{type:to,overloads:[[[ta],(e,[t])=>t.evaluate(e)in e.properties()],[[ta,tc],(e,[t,r])=>t.evaluate(e)in r.evaluate(e)]]},get:{type:tu,overloads:[[[ta],(e,[t])=>ih(t.evaluate(e),e.properties())],[[ta,tc],(e,[t,r])=>ih(t.evaluate(e),r.evaluate(e))]]},"feature-state":[tu,[ta],(e,[t])=>ih(t.evaluate(e),e.featureState||{})],properties:[tc,[],e=>e.properties()],"geometry-type":[ta,[],e=>e.geometryType()],id:[tu,[],e=>e.id()],zoom:[tn,[],e=>e.globals.zoom],"heatmap-density":[tn,[],e=>e.globals.heatmapDensity||0],elevation:[tn,[],e=>e.globals.elevation||0],"line-progress":[tn,[],e=>e.globals.lineProgress||0],accumulated:[tu,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[tn,id(tn),(e,t)=>{let r=0;for(let i of t)r+=i.evaluate(e);return r}],"*":[tn,id(tn),(e,t)=>{let r=1;for(let i of t)r*=i.evaluate(e);return r}],"-":{type:tn,overloads:[[[tn,tn],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[tn],(e,[t])=>-t.evaluate(e)]]},"/":[tn,[tn,tn],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[tn,[tn,tn],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[tn,[],()=>Math.LN2],pi:[tn,[],()=>Math.PI],e:[tn,[],()=>Math.E],"^":[tn,[tn,tn],(e,[t,r])=>Math.pow(t.evaluate(e),r.evaluate(e))],sqrt:[tn,[tn],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[tn,[tn],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[tn,[tn],(e,[t])=>Math.log(t.evaluate(e))],log2:[tn,[tn],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[tn,[tn],(e,[t])=>Math.sin(t.evaluate(e))],cos:[tn,[tn],(e,[t])=>Math.cos(t.evaluate(e))],tan:[tn,[tn],(e,[t])=>Math.tan(t.evaluate(e))],asin:[tn,[tn],(e,[t])=>Math.asin(t.evaluate(e))],acos:[tn,[tn],(e,[t])=>Math.acos(t.evaluate(e))],atan:[tn,[tn],(e,[t])=>Math.atan(t.evaluate(e))],min:[tn,id(tn),(e,t)=>Math.min(...t.map(t=>t.evaluate(e)))],max:[tn,id(tn),(e,t)=>Math.max(...t.map(t=>t.evaluate(e)))],abs:[tn,[tn],(e,[t])=>Math.abs(t.evaluate(e))],round:[tn,[tn],(e,[t])=>{let r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[tn,[tn],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[tn,[tn],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[to,[ta,tu],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[to,[tu],(e,[t])=>e.id()===t.value],"filter-type-==":[to,[ta],(e,[t])=>e.geometryType()===t.value],"filter-<":[to,[ta,tu],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i{let r=e.id(),i=t.value;return typeof r==typeof i&&r":[to,[ta,tu],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i>n}],"filter-id->":[to,[tu],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r>i}],"filter-<=":[to,[ta,tu],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i<=n}],"filter-id-<=":[to,[tu],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r<=i}],"filter->=":[to,[ta,tu],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i>=n}],"filter-id->=":[to,[tu],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r>=i}],"filter-has":[to,[tu],(e,[t])=>t.value in e.properties()],"filter-has-id":[to,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[to,[tv(ta)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[to,[tv(tu)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[to,[ta,tv(tu)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[to,[ta,tv(tu)],(e,[t,r])=>(function(e,t,r,i){for(;r<=i;){let n=r+i>>1;if(t[n]===e)return!0;t[n]>e?i=n-1:r=n+1}return!1})(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:to,overloads:[[[to,to],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[id(to),(e,t)=>{for(let r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:to,overloads:[[[to,to],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[id(to),(e,t)=>{for(let r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[to,[to],(e,[t])=>!t.evaluate(e)],"is-supported-script":[to,[ta],(e,[t])=>{let r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[ta,[ta],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[ta,[ta],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[ta,id(tu),(e,t)=>t.map(t=>t7(t.evaluate(e))).join("")],split:[tv(ta),[ta,ta],(e,[t,r])=>t.evaluate(e).split(r.evaluate(e))],join:[ta,[tv(ta),ta],(e,[t,r])=>t.evaluate(e).join(r.evaluate(e))],"resolved-locale":[ta,[th],(e,[t])=>t.evaluate(e).resolvedLocale()]});class iP{constructor(e,t,r){this.expression=e,this._warningHistory={},this._evaluator=new ra,this._defaultValue=t?function(e){if("color"===e.type&&iM(e.default))return new tW(0,0,0,0);switch(e.type){case"color":return tW.parse(e.default)||null;case"padding":return tK.parse(e.default)||null;case"numberArray":return tJ.parse(e.default)||null;case"colorArray":return tQ.parse(e.default)||null;case"variableAnchorOffsetCollection":return t2.parse(e.default)||null;case"projectionDefinition":return t5.parse(e.default)||null;default:return void 0===e.default?null:e.default}}(t):null,this._enumValues=t&&"enum"===t.type?t.values:null,this._globalState=r}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=iB(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,i,n,a){this._globalState&&(e=iB(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a||null;try{let e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new t0(`Expected value to be one of ${Object.keys(this._enumValues).map(e=>JSON.stringify(e)).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"u">typeof console&&console.warn(e.message)),this._defaultValue}}}function iI(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in il}function iz(e,t,r){let i,n=new ro(il,ip,[],t?(i={color:ts,string:ta,number:tn,enum:ta,boolean:to,formatted:td,padding:tf,numberArray:tm,colorArray:tp,projectionDefinition:tl,resolvedImage:tg,variableAnchorOffsetCollection:ty},"array"===t.type?tv(i[t.value]||tu,t.length):i[t.type]):void 0),a=n.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return a?iv(new iP(a,t,r)):ix(n.errors)}class iD{constructor(e,t,r){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!ig(t.expression),this.globalStateRefs=ij(t.expression),this._globalState=r}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=iB(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,n,a)}evaluate(e,t,r,i,n,a){return this._globalState&&(e=iB(e,this._globalState)),this._styleExpression.evaluate(e,t,r,i,n,a)}}class iO{constructor(e,t,r,i,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!ig(t.expression),this.globalStateRefs=ij(t.expression),this.interpolationType=i,this._globalState=n}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=iB(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,n,a)}evaluate(e,t,r,i,n,a){return this._globalState&&(e=iB(e,this._globalState)),this._styleExpression.evaluate(e,t,r,i,n,a)}interpolationFactor(e,t,r){return this.interpolationType?rv.interpolationFactor(this.interpolationType,e,t,r):0}}function iR(e,t,r){let i=iz(e,t,r);if("error"===i.result)return i;let n=i.value.expression,a=im(n);if(!a&&!ib(t))return ix([new tt("","data expressions not supported")]);let o=iy(n,["zoom"]);if(!o&&!i_(t))return ix([new tt("","zoom expressions not supported")]);let s=function e(t){let r=null;if(t instanceof rs)r=e(t.result);else if(t instanceof r_){for(let i of t.args)if(r=e(i))break}else(t instanceof ru||t instanceof rv)&&t.input instanceof ic&&"zoom"===t.input.name&&(r=t);return r instanceof tt||t.eachChild(t=>{let i=e(t);i instanceof tt?r=i:!r&&i?r=new tt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&i&&r!==i&&(r=new tt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),r}(n);return s||o?s instanceof tt?ix([s]):s instanceof rv&&!iw(t)?ix([new tt("",'"interpolate" expressions cannot be used with this property')]):iv(s?new iO(a?"camera":"composite",i.value,s.labels,s instanceof rv?s.interpolation:void 0,r):new iD(a?"constant":"source",i.value,r)):ix([new tt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class iF{constructor(e,t){this._parameters=e,this._specification=t,te(this,function e(t,r){var i;let n=t.stops&&"object"==typeof t.stops[0][0],a=n||!(n||void 0!==t.property),o=t.type||(iw(r)?"exponential":"interval"),s=function(e){switch(e.type){case"color":return tW.parse;case"padding":return tK.parse;case"numberArray":return tJ.parse;case"colorArray":return tQ.parse;default:return null}}(r);if(s&&((t=te({},t)).stops&&(t.stops=t.stops.map(e=>[e[0],s(e[1])])),t.default=s(t.default?t.default:r.default)),t.colorSpace&&"rgb"!==(i=t.colorSpace)&&"hcl"!==i&&"lab"!==i)throw Error(`Unknown color space: "${t.colorSpace}"`);let l=function(e){switch(e){case"exponential":return iC;case"interval":return iE;case"categorical":return iS;case"identity":return iL;default:throw Error(`Unknown function type "${e}"`)}}(o),c,u;if("categorical"===o){for(let e of(c=Object.create(null),t.stops))c[e[0]]=e[1];u=typeof t.stops[0][0]}if(n){let i={},n=[];for(let e=0;ee[0]),evaluate:({zoom:e},i)=>iC({stops:a,base:t.base},r,e).evaluate(e,i)}}if(a){let e="exponential"===o?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:e,interpolationFactor:rv.interpolationFactor.bind(void 0,e),zoomStops:t.stops.map(e=>e[0]),evaluate:({zoom:e})=>l(t,r,e,c,u)}}return{kind:"source",evaluate(e,i){let n=i&&i.properties?i.properties[t.property]:void 0;return void 0===n?iA(t.default,r.default):l(t,r,n,c,u)}}}(this._parameters,this._specification))}static deserialize(e){return new iF(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function ij(e,t=new Set){return e instanceof is&&t.add(e.key),e.eachChild(e=>{ij(e,t)}),t}function iB(e,t){let{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:o,accumulated:s}=e??{};return{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:o,accumulated:s,globalState:t}}function iN(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(let t of e.slice(1))if(!iN(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}let iU={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function iV(e,t){if(null==e)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};iN(e)||(e=function e(t){if(!t)return!0;let r=t[0];return t.length<=1?"any"!==r:"=="===r?iH(t[1],t[2],"=="):"!="===r?iY(iH(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?iH(t[1],t[2],r):"any"===r?["any"].concat(t.slice(1).map(e)):"all"===r?["all"].concat(t.slice(1).map(e)):"none"===r?["all"].concat(t.slice(1).map(e).map(iY)):"in"===r?iG(t[1],t.slice(2)):"!in"===r?iY(iG(t[1],t.slice(2))):"has"===r?iW(t[1]):"!has"!==r||iY(iW(t[1]))}(e));let r=iz(e,iU,t);if("error"===r.result)throw Error(r.value.map(e=>`${e.key}: ${e.message}`).join(", "));return{filter:(e,t,i)=>r.value.evaluate(e,t,{},i),needGeometry:function e(t){if(!Array.isArray(t))return!1;if("within"===t[0]||"distance"===t[0])return!0;for(let r=1;rij(r.value.expression)}}function iq(e,t){return et)}function iH(e,t,r){switch(e){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,e,t]}}function iG(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(e=>typeof e!=typeof t[0])?["filter-in-large",e,["literal",t.sort(iq)]]:["filter-in-small",e,["literal",t]]}}function iW(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function iY(e){return["!",e]}function iZ(e){let t=e.value;return t?[new e9(e.key,t,"constants have been deprecated as of v8")]:[]}function i$(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function iX(e){if(Array.isArray(e))return e.map(iX);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){let t={};for(let r in e)t[r]=iX(e[r]);return t}return i$(e)}function iK(e){let t=e.key,r=e.value,i=e.valueSpec||{},n=e.objectElementValidators||{},a=e.style,o=e.styleSpec,s=e.validateSpec,l=[],c=iT(r);if("object"!==c)return[new e9(t,r,`object expected, ${c} found`)];for(let e in r){let c=e.split(".")[0],u=tB(i,c)||i["*"],h;if(tB(n,c))h=n[c];else if(tB(i,c)){if(void 0===r[e])continue;h=s}else if(n["*"])h=n["*"];else{if(!i["*"]){l.push(new e9(t,r[e],`unknown property "${e}"`));continue}h=s}l=l.concat(h({key:(t&&`${t}.`)+e,value:r[e],valueSpec:u,style:a,styleSpec:o,object:r,objectKey:e,validateSpec:s},r))}for(let e in i)n[e]||i[e].required&&void 0===i[e].default&&void 0===r[e]&&l.push(new e9(t,r,`missing required property "${e}"`));return l}function iJ(e){let t=e.value,r=e.valueSpec,i=e.style,n=e.styleSpec,a=e.key,o=e.arrayElementValidator||e.validateSpec;if("array"!==iT(t))return[new e9(a,t,`array expected, ${iT(t)} found`)];if(r.length&&t.length!==r.length)return[new e9(a,t,`array length ${r.length} expected, length ${t.length} found`)];let s={type:r.value,values:r.values};n.$version<7&&(s.function=r.function),"object"===iT(r.value)&&(s=r.value);let l=[];for(let r=0;ri.maximum?[new e9(t,r,`${r} is greater than the maximum value ${i.maximum}`)]:[]}function i0(e){let t=e.valueSpec,r=i$(e.value.type),i,n,a,o={},s="categorical"!==r&&void 0===e.value.property,l="array"===iT(e.value.stops)&&"array"===iT(e.value.stops[0])&&"object"===iT(e.value.stops[0][0]),c=iK({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===r)return[new e9(e.key,e.value,'identity function may not have a "stops" property')];let t=[],i=e.value;return t=t.concat(iJ({key:e.key,value:i,valueSpec:e.valueSpec,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:u})),"array"===iT(i)&&0===i.length&&t.push(new e9(e.key,i,"array must have at least one stop")),t},default:function(e){return e.validateSpec({key:e.key,value:e.value,valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===r&&s&&c.push(new e9(e.key,e.value,'missing required property "property"')),"identity"===r||e.value.stops||c.push(new e9(e.key,e.value,'missing required property "stops"')),"exponential"===r&&e.valueSpec.expression&&!iw(e.valueSpec)&&c.push(new e9(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(s||ib(e.valueSpec)?s&&!i_(e.valueSpec)&&c.push(new e9(e.key,e.value,"zoom functions not supported")):c.push(new e9(e.key,e.value,"property functions not supported"))),("categorical"===r||l)&&void 0===e.value.property&&c.push(new e9(e.key,e.value,'"property" property is required')),c;function u(e){let r=[],i=e.value,s=e.key;if("array"!==iT(i))return[new e9(s,i,`array expected, ${iT(i)} found`)];if(2!==i.length)return[new e9(s,i,`array length 2 expected, length ${i.length} found`)];if(l){if("object"!==iT(i[0]))return[new e9(s,i,`object expected, ${iT(i[0])} found`)];if(void 0===i[0].zoom)return[new e9(s,i,"object stop key must have zoom")];if(void 0===i[0].value)return[new e9(s,i,"object stop key must have value")];if(a&&a>i$(i[0].zoom))return[new e9(s,i[0].zoom,"stop zoom values must appear in ascending order")];i$(i[0].zoom)!==a&&(a=i$(i[0].zoom),n=void 0,o={}),r=r.concat(iK({key:`${s}[0]`,value:i[0],valueSpec:{zoom:{}},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:iQ,value:h}}))}else r=r.concat(h({key:`${s}[0]`,value:i[0],validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec},i));return iI(iX(i[1]))?r.concat([new e9(`${s}[1]`,i[1],"expressions are not allowed in function stops.")]):r.concat(e.validateSpec({key:`${s}[1]`,value:i[1],valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec}))}function h(e,a){let s=iT(e.value),l=i$(e.value),c=null!==e.value?e.value:a;if(i){if(s!==i)return[new e9(e.key,c,`${s} stop domain type must match previous stop domain type ${i}`)]}else i=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new e9(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==r){let i=`number expected, ${s} found`;return ib(t)&&void 0===r&&(i+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new e9(e.key,c,i)]}return"categorical"!==r||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==r&&"number"===s&&void 0!==n&&lnew e9(`${e.key}${t.key}`,e.value,t.message));let r=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!r.outputDefined())return[new e9(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!ig(r))return[new e9(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!ig(r))return[new e9(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!iy(r,["zoom","feature-state"]))return[new e9(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!im(r))return[new e9(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function i2(e){let t=e.key,r=e.value,i=iT(r);return"string"!==i?[new e9(t,r,`color expected, ${i} found`)]:tW.parse(String(r))?[]:[new e9(t,r,`color expected, "${r}" found`)]}function i3(e){let t=e.key,r=e.value,i=e.valueSpec,n=[];return Array.isArray(i.values)?-1===i.values.indexOf(i$(r))&&n.push(new e9(t,r,`expected one of [${i.values.join(", ")}], ${JSON.stringify(r)} found`)):-1===Object.keys(i.values).indexOf(i$(r))&&n.push(new e9(t,r,`expected one of [${Object.keys(i.values).join(", ")}], ${JSON.stringify(r)} found`)),n}function i5(e){return iN(iX(e.value))?i1(te({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function e(t){let r=t.value,i=t.key;if("array"!==iT(r))return[new e9(i,r,`array expected, ${iT(r)} found`)];let n=t.styleSpec,a,o=[];if(r.length<1)return[new e9(i,r,"filter array must have at least 1 element")];switch(o=o.concat(i3({key:`${i}[0]`,value:r[0],valueSpec:n.filter_operator,style:t.style,styleSpec:t.styleSpec})),i$(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===i$(r[1])&&o.push(new e9(i,r,`"$type" cannot be use with operator "${r[0]}"`));case"==":case"!=":3!==r.length&&o.push(new e9(i,r,`filter array for operator "${r[0]}" must have 3 elements`));case"in":case"!in":r.length>=2&&"string"!==(a=iT(r[1]))&&o.push(new e9(`${i}[1]`,r[1],`string expected, ${a} found`));for(let e=2;e{e in n&&i.push(new e9(a,n[e],`"${e}" is prohibited for ref layers`))}),o.layers.forEach(t=>{i$(t.id)===c&&(e=t)}),e?e.ref?i.push(new e9(a,n.ref,"ref cannot reference another ref layer")):l=i$(e.type):i.push(new e9(a,n.ref,`ref layer "${c}" not found`))}else if("background"!==l)if(n.source){let e=o.sources&&o.sources[n.source],t=e&&i$(e.type);e?"vector"===t&&"raster"===l?i.push(new e9(a,n.source,`layer "${n.id}" requires a raster source`)):"raster-dem"!==t&&"hillshade"===l||"raster-dem"!==t&&"color-relief"===l?i.push(new e9(a,n.source,`layer "${n.id}" requires a raster-dem source`)):"raster"===t&&"raster"!==l?i.push(new e9(a,n.source,`layer "${n.id}" requires a vector source`)):"vector"!==t||n["source-layer"]?"raster-dem"===t&&"hillshade"!==l&&"color-relief"!==l?i.push(new e9(a,n.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):"line"===l&&n.paint&&n.paint["line-gradient"]&&("geojson"!==t||!e.lineMetrics)&&i.push(new e9(a,n,`layer "${n.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):i.push(new e9(a,n,`layer "${n.id}" must specify a "source-layer"`)):i.push(new e9(a,n.source,`source "${n.source}" not found`))}else i.push(new e9(a,n,'missing required property "source"'));return"raster"===l&&null!=(t=n.paint)&&t.resampling&&null!=(r=n.paint)&&r["raster-resampling"]&&i.push(new e9(a,n.paint,`layer "${n.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),i=i.concat(iK({key:a,value:n,valueSpec:s.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":()=>[],type:()=>e.validateSpec({key:`${a}.type`,value:n.type,valueSpec:s.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:n,objectKey:"type"}),filter:i5,layout:e=>iK({layer:n,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>i8(te({layerType:l},e))}}),paint:e=>iK({layer:n,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>i6(te({layerType:l},e))}})}}))}function i9(e){let t=e.value,r=e.key,i=iT(t);return"string"!==i?[new e9(r,t,`string expected, ${i} found`)]:[]}let ne={promoteId:function({key:e,value:t}){if("string"===iT(t))return i9({key:e,value:t});{let r=[];for(let i in t)r.push(...i9({key:`${e}.${i}`,value:t[i]}));return r}}};function nt(e){let t=e.value,r=e.key,i=e.styleSpec,n=e.style,a=e.validateSpec;if(!t.type)return[new e9(r,t,'"type" is required')];let o=i$(t.type),s;switch(o){case"vector":case"raster":return iK({key:r,value:t,valueSpec:i[`source_${o.replace("-","_")}`],style:e.style,styleSpec:i,objectElementValidators:ne,validateSpec:a});case"raster-dem":return function(e){var t;let r=null!=(t=e.sourceName)?t:"",i=e.value,n=e.styleSpec,a=n.source_raster_dem,o=e.style,s=[],l=iT(i);if(void 0===i)return s;if("object"!==l)return s.push(new e9("source_raster_dem",i,`object expected, ${l} found`)),s;let c="custom"===i$(i.encoding),u=["redFactor","greenFactor","blueFactor","baseShift"],h=e.value.encoding?`"${e.value.encoding}"`:"Default";for(let t in i)!c&&u.includes(t)?s.push(new e9(t,i[t],`In "${r}": "${t}" is only valid when "encoding" is set to "custom". ${h} encoding found`)):a[t]?s=s.concat(e.validateSpec({key:t,value:i[t],valueSpec:a[t],validateSpec:e.validateSpec,style:o,styleSpec:n})):s.push(new e9(t,i[t],`unknown property "${t}"`));return s}({sourceName:r,value:t,style:e.style,styleSpec:i,validateSpec:a});case"geojson":if(s=iK({key:r,value:t,valueSpec:i.source_geojson,style:n,styleSpec:i,validateSpec:a,objectElementValidators:ne}),t.cluster)for(let e in t.clusterProperties){let[i,n]=t.clusterProperties[e],a="string"==typeof i?[i,["accumulated"],["get",e]]:i;s.push(...i1({key:`${r}.${e}.map`,value:n,expressionContext:"cluster-map"})),s.push(...i1({key:`${r}.${e}.reduce`,value:a,expressionContext:"cluster-reduce"}))}return s;case"video":return iK({key:r,value:t,valueSpec:i.source_video,style:n,validateSpec:a,styleSpec:i});case"image":return iK({key:r,value:t,valueSpec:i.source_image,style:n,validateSpec:a,styleSpec:i});case"canvas":return[new e9(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return i3({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function nr(e){let t=e.value,r=e.styleSpec,i=r.light,n=e.style,a=[],o=iT(t);if(void 0===t)return a;if("object"!==o)return a.concat([new e9("light",t,`object expected, ${o} found`)]);for(let o in t){let s=o.match(/^(.*)-transition$/);a=a.concat(s&&i[s[1]]&&i[s[1]].transition?e.validateSpec({key:o,value:t[o],valueSpec:r.transition,validateSpec:e.validateSpec,style:n,styleSpec:r}):i[o]?e.validateSpec({key:o,value:t[o],valueSpec:i[o],validateSpec:e.validateSpec,style:n,styleSpec:r}):[new e9(o,t[o],`unknown property "${o}"`)])}return a}function ni(e){let t=e.value,r=e.styleSpec,i=r.sky,n=e.style,a=iT(t);if(void 0===t)return[];if("object"!==a)return[new e9("sky",t,`object expected, ${a} found`)];let o=[];for(let a in t)o=o.concat(i[a]?e.validateSpec({key:a,value:t[a],valueSpec:i[a],style:n,styleSpec:r}):[new e9(a,t[a],`unknown property "${a}"`)]);return o}function nn(e){let t=e.value,r=e.styleSpec,i=r.terrain,n=e.style,a=[],o=iT(t);if(void 0===t)return a;if("object"!==o)return a.concat([new e9("terrain",t,`object expected, ${o} found`)]);for(let o in t)a=a.concat(i[o]?e.validateSpec({key:o,value:t[o],valueSpec:i[o],validateSpec:e.validateSpec,style:n,styleSpec:r}):[new e9(o,t[o],`unknown property "${o}"`)]);return a}function na(e){let t=[],r=e.value,i=e.key;if(Array.isArray(r)){let n=[],a=[];for(let o in r)r[o].id&&n.includes(r[o].id)&&t.push(new e9(i,r,`all the sprites' ids must be unique, but ${r[o].id} is duplicated`)),n.push(r[o].id),r[o].url&&a.includes(r[o].url)&&t.push(new e9(i,r,`all the sprites' URLs must be unique, but ${r[o].url} is duplicated`)),a.push(r[o].url),t=t.concat(iK({key:`${i}[${o}]`,value:r[o],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:e.validateSpec}));return t}return i9({key:i,value:r})}function no(e){return!!e&&e.constructor===Object}function ns(e){return no(e.value)?[]:[new e9(e.key,e.value,`object expected, ${iT(e.value)} found`)]}let nl={"*":()=>[],array:iJ,boolean:function(e){let t=e.value,r=e.key,i=iT(t);return"boolean"!==i?[new e9(r,t,`boolean expected, ${i} found`)]:[]},number:iQ,color:i2,constants:iZ,enum:i3,filter:i5,function:i0,layer:i7,object:iK,source:nt,light:nr,sky:ni,terrain:nn,projection:function(e){let t=e.value,r=e.styleSpec,i=r.projection,n=e.style,a=iT(t);if(void 0===t)return[];if("object"!==a)return[new e9("projection",t,`object expected, ${a} found`)];let o=[];for(let a in t)o=o.concat(i[a]?e.validateSpec({key:a,value:t[a],valueSpec:i[a],style:n,styleSpec:r}):[new e9(a,t[a],`unknown property "${a}"`)]);return o},projectionDefinition:function(e){var t;let r=e.key,i=e.value,n=iT(i=i instanceof String?i.valueOf():i);return"array"!==n||Array.isArray(t=i)&&3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]&&"number"==typeof t[2]||["interpolate","step","literal"].includes(i[0])?["array","string"].includes(n)?[]:[new e9(r,i,`projection expected, invalid type "${n}" found`)]:[new e9(r,i,`projection expected, invalid array ${JSON.stringify(i)} found`)]},string:i9,formatted:function(e){return 0===i9(e).length?[]:i1(e)},resolvedImage:function(e){return 0===i9(e).length?[]:i1(e)},padding:function(e){let t=e.key,r=e.value;if("array"===iT(r)){if(r.length<1||r.length>4)return[new e9(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];let i={type:"number"},n=[];for(let a=0;a[]}})),e.constants&&(r=r.concat(iZ({key:"constants",value:e.constants}))),nf(r)}function nd(e){return function(t){return e(Object.assign({},t,{validateSpec:nc}))}}function nf(e){return[].concat(e).sort((e,t)=>e.line-t.line)}function np(e){return function(...t){return nf(e.apply(this,t))}}nh.source=np(nd(nt)),nh.sprite=np(nd(na)),nh.glyphs=np(nd(nu)),nh.light=np(nd(nr)),nh.sky=np(nd(ni)),nh.terrain=np(nd(nn)),nh.state=np(nd(ns)),nh.layer=np(nd(i7)),nh.filter=np(nd(i5)),nh.paintProperty=np(nd(i6)),nh.layoutProperty=np(nd(i8));let nm={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class ng{constructor(e,t){this._globalState=t,this.setValue(e)}evaluate(){var e;return null!=(e=this._literalValue)?e:this._compiledValue.evaluate({})}setValue(e){if(null==e||"visible"===e||"none"===e)return this._literalValue="none"===e?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let t=iz(e,nm,this._globalState);if("error"===t.result)throw this._literalValue="visible",this._compiledValue=void 0,Error(t.value.map(e=>`${e.key}: ${e.message}`).join(", "));this._literalValue=void 0,this._compiledValue=t.value,this._globalStateRefs=ij(t.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let ny=nh.light,nv=nh.sky,nx=nh.paintProperty,nb=nh.layoutProperty;function n_(e,t){let r=!1;if(t?.length)for(let i of t)e.fire(new eJ(Error(i.message))),r=!0;return r}class nw{constructor(e,t,r){let i=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;let n=new Int32Array(this.arrayBuffer);e=n[0],this.d=(t=n[1])+2*(r=n[2]);for(let e=0;e=c[l+0]&&i>=c[l+1])?(o[u]=!0,a.push(n[u])):o[u]=!1}}}_forEachCell(e,t,r,i,n,a,o,s){let l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(r),h=this._convertToCellCoord(i);for(let d=l;d<=u;d++)for(let l=c;l<=h;l++){let c=this.d*l+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(l),this._convertFromCellCoord(d+1),this._convertFromCellCoord(l+1)))&&n.call(this,e,t,r,i,c,a,o,s))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,t=3+this.cells.length+1+1,r=0;for(let e of this.cells)r+=e.length;let i=new Int32Array(t+r+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;let n=t;for(let t=0;ttypeof ArrayBuffer&&(e instanceof ArrayBuffer||(null==(t=e.constructor)?void 0:t.name)==="ArrayBuffer")}function nA(e){return e.$name||e.constructor._classRegistryKey}function nS(e){return!function(e){if(null===e||"object"!=typeof e)return!1;let t=nA(e);return t&&"Object"!==t}(e)&&(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof Blob||e instanceof Error||nk(e)||eL(e)||ArrayBuffer.isView(e)||e instanceof ImageData)}function nE(e,t){if(nS(e))return(nk(e)||eL(e))&&t&&t.push(e),ArrayBuffer.isView(e)&&t&&t.push(e.buffer),e instanceof ImageData&&t&&t.push(e.data.buffer),e;if(Array.isArray(e)){let r=[];for(let i of e)r.push(nE(i,t));return r}if("object"!=typeof e)throw Error("can't serialize object of type "+typeof e);let r=nA(e);if(!r)throw Error(`can't serialize object of unregistered class ${e.constructor.name}`);if(!nT[r])throw Error(`${r} is not registered.`);let{klass:i}=nT[r],n=i.serialize?i.serialize(e,t):{};if(i.serialize){if(n===t?.[t.length-1])throw Error("statically serialized object won't survive transfer of $name property")}else{for(let i in e){if(!e.hasOwnProperty(i)||nT[r].omit.includes(i))continue;let a=e[i];n[i]=nT[r].shallow.includes(i)?a:nE(a,t)}e instanceof Error&&(n.message=e.message)}if(n.$name)throw Error("$name property is reserved for worker serialization logic.");return"Object"!==r&&(n.$name=r),n}function nC(e){if(nS(e))return e;if(Array.isArray(e))return e.map(nC);if("object"!=typeof e)throw Error("can't deserialize object of type "+typeof e);let t=nA(e)||"Object";if(!nT[t])throw Error(`can't deserialize unregistered class ${t}`);let{klass:r}=nT[t];if(!r)throw Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(e);let i=Object.create(r.prototype);for(let r of Object.keys(e)){if("$name"===r)continue;let n=e[r];i[r]=nT[t].shallow.includes(r)?n:nC(n)}return i}class nL{constructor(){this.first=!0}update(e,t){let r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoom{try{return RegExp(`\\p{sc=${e}}`,"u").source}catch{return null}}).filter(e=>e).join("|"),"u")}let nO=nD(["Arab","Dupl","Mong","Ougr","Syrc"]);function nR(e){return!(nP(e)||/[\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)))}let nF=nD(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function nj(e){return nF.test(String.fromCodePoint(e))}let nB=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(nB.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=e.applyArabicShaping,this.processBidirectionalText=e.processBidirectionalText,this.processStyledBidirectionalText=e.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getRTLTextPluginStatus(){return this.pluginStatus}syncState(e,t){return _(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if("loading"!==e.pluginStatus)return this.setState(e),e;let r=e.pluginURL,i=new Promise(e=>{this.loadScriptResolve=e});t(r);let n=new Promise(e=>setTimeout(()=>e(),this.TIMEOUT));if(yield Promise.race([i,n]),this.isParsed()){let e={pluginStatus:"loaded",pluginURL:r};return this.setState(e),e}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${r}`)})}};class nN{constructor(e,t){this.isSupportedScript=nU,this.zoom=e,t?(this.now=t.now||0,this.fadeDuration=t.fadeDuration||0,this.zoomHistory=t.zoomHistory||new nL,this.transition=t.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new nL,this.transition={})}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let e=this.zoom,t=e-Math.floor(e),r=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}}}function nU(e){var t,r="loaded"===nB.getRTLTextPluginStatus();for(let i of e)if(t=i.codePointAt(0),!r&&nj(t)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(t)))return!1;return!0}let nV="-transition";class nq{constructor(e,t,r){this.property=e,this.value=t,this.expression=function(e,t,r){if(iM(e))return new iF(e,t);if(iI(e)){let i=iR(e,t,r);if("error"===i.result)throw Error(i.value.map(e=>`${e.key}: ${e.message}`).join(", "));return i.value}{let r=e;return"color"===t.type&&"string"==typeof e?r=tW.parse(e):"padding"===t.type&&("number"==typeof e||Array.isArray(e))?r=tK.parse(e):"numberArray"===t.type&&("number"==typeof e||Array.isArray(e))?r=tJ.parse(e):"colorArray"===t.type&&("string"==typeof e||Array.isArray(e))?r=tQ.parse(e):"variableAnchorOffsetCollection"===t.type&&Array.isArray(e)?r=t2.parse(e):"projectionDefinition"===t.type&&"string"==typeof e&&(r=t5.parse(e)),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>r}}}(void 0===t?e.specification.default:t,e.specification,r)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)}}class nH{constructor(e,t){this.property=e,this.value=new nq(e,void 0,t)}transitioned(e,t){return new nW(this.property,this.value,t,eb({},e.transition,this.transition),e.now)}untransitioned(){return new nW(this.property,this.value,null,{},0)}}class nG{constructor(e,t){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues),this._globalState=t}hasProperty(e){return e in this._properties.defaultTransitionablePropertyValues}getValue(e){return eM(this._values[e].value.value)}setValue(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new nH(this._values[e].property,this._globalState)),this._values[e].value=new nq(this._values[e].property,null===t?void 0:eM(t),this._globalState)}getTransition(e){return eM(this._values[e].transition)}setTransition(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new nH(this._values[e].property,this._globalState)),this._values[e].transition=eM(t)||void 0}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);void 0!==r&&(e[t]=r);let i=this.getTransition(t);void 0!==i&&(e[`${t}${nV}`]=i)}return e}transitioned(e,t){let r=new nY(this._properties);for(let i of Object.keys(this._values))r._values[i]=this._values[i].transitioned(e,t._values[i]);return r}untransitioned(){let e=new nY(this._properties);for(let t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}}class nW{constructor(e,t,r,i,n){this.property=e,this.value=t,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,e.specification.transition&&(i.delay||i.duration)&&(this.prior=r)}possiblyEvaluate(e,t,r){let i=e.now||0,n=this.value.possiblyEvaluate(e,t,r),a=this.prior;if(a){if(i>this.end||this.value.isDataDriven())return this.prior=null,n;if(ii.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}}class n0{constructor(e){this.specification=e}possiblyEvaluate(e,t,r,i){if(void 0!==e.value){if("constant"===e.expression.kind){let n=e.expression.evaluate(t,null,{},r,i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new nN(Math.floor(t.zoom-1),t)),e.expression.evaluate(new nN(Math.floor(t.zoom),t)),e.expression.evaluate(new nN(Math.floor(t.zoom+1),t)),t)}}_calculate(e,t,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}}class n1{constructor(e){this.specification=e}possiblyEvaluate(e,t,r,i){return!!e.expression.evaluate(t,null,{},r,i)}interpolate(){return!1}}class n2{constructor(e){for(let t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){let r=e[t];r.specification.overridable&&this.overridableProperties.push(t);let i=this.defaultPropertyValues[t]=new nq(r,void 0,void 0),n=this.defaultTransitionablePropertyValues[t]=new nH(r,void 0);this.defaultTransitioningPropertyValues[t]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=i.possiblyEvaluate({})}}}nM("DataDrivenProperty",nJ),nM("DataConstantProperty",nK),nM("CrossFadedDataDrivenProperty",nQ),nM("CrossFadedProperty",n0),nM("ColorRampProperty",n1);let n3=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",n5=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class n4 extends eQ{constructor(e,t,r){if(super(),this.id=e.id,this.type=e.type,this._globalState=r,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=function(e,t){return new ng(e,t)}(this.visibility,r),"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter,this._featureFilter=iV(e.filter,r)),t.layout&&(this._unevaluatedLayout=new nZ(t.layout,r)),t.paint)){for(let i in this._transitionablePaint=new nG(t.paint,r),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(let t in e.layout)this.setLayoutProperty(t,e.layout[t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new nX(t.paint)}}setFilter(e){this.filter=e,this._featureFilter=iV(e,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){var t;if("visibility"===e)return this.visibility;if(null!=(t=this._transitionablePaint)&&t.hasProperty(e))throw Error(e+n3);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 t of this._visibilityExpression.getGlobalStateRefs())e.add(t);if(this._unevaluatedLayout)for(let t in this._unevaluatedLayout._values)for(let r of this._unevaluatedLayout._values[t].getGlobalStateRefs())e.add(r);for(let t of this._featureFilter.getGlobalStateRefs())e.add(t);return e}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=null!=(e=t.get(n))?e:[];a.push({name:r,value:i.value}),t.set(n,a)}}return t}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(e,t,r={}){var i;"visibility"===e?(this.visibility=t,this._visibilityExpression.setValue(t),this.recalculateVisibility()):null!=(i=this._transitionablePaint)&&i.hasProperty(e)?this.fire(new eJ(Error(e+n3))):null!=t&&this._validate(nb,`layers.${this.id}.layout.${e}`,e,t,r)||this._unevaluatedLayout.setValue(e,t)}getPaintProperty(e){var t,r;if(e.endsWith(nV)){let r=e.slice(0,-11);if("visibility"===r||null!=(t=this._unevaluatedLayout)&&t.hasProperty(r))throw Error(e+n5);return this._transitionablePaint.getTransition(r)}if("visibility"===e||null!=(r=this._unevaluatedLayout)&&r.hasProperty(e))throw Error(e+n5);return this._transitionablePaint.getValue(e)}setPaintProperty(e,t,r={}){var i;if("visibility"===e||null!=(i=this._unevaluatedLayout)&&i.hasProperty(e))return this.fire(new eJ(Error(e+n5))),!1;if(null!=t&&this._validate(nx,`layers.${this.id}.paint.${e}`,e,t,r))return!1;if(e.endsWith(nV))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;{let r=this._transitionablePaint._values[e],i="cross-faded-data-driven"===r.property.specification["property-type"],n=r.value.isDataDriven(),a=r.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);let o=this._transitionablePaint._values[e].value;return o.isDataDriven()||n||i||this._handleOverridablePaintPropertyUpdate(e,a,o)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,t,r){return!1}isHidden(e=this.minzoom,t=!1){return!!(this.minzoom&&e<(t?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&e>=this.maxzoom)||"none"===this._evaluatedVisibility}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}serialize(){var e,t;let r={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:null==(e=this._unevaluatedLayout)?void 0:e.serialize(),paint:null==(t=this._transitionablePaint)?void 0:t.serialize()};return this.visibility&&(r.layout||(r.layout={}),r.layout.visibility=this.visibility),eT(r,(e,t)=>!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length))}_validate(e,t,r,i,n={}){return n?.validate!==!1&&n_(this,e.call(nh,{key:t,layerType:this.type,objectKey:r,value:i,styleSpec:e0,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let e in this.paint._values){let t=this.paint.get(e);if(t instanceof n$&&ib(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1}}var n6={get paint(){return a=a||new n2({"raster-opacity":new nK(e0.paint_raster["raster-opacity"]),"raster-hue-rotate":new nK(e0.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new nK(e0.paint_raster["raster-brightness-min"]),"raster-brightness-max":new nK(e0.paint_raster["raster-brightness-max"]),"raster-saturation":new nK(e0.paint_raster["raster-saturation"]),"raster-contrast":new nK(e0.paint_raster["raster-contrast"]),resampling:new nK(e0.paint_raster.resampling),"raster-resampling":new nK(e0.paint_raster["raster-resampling"]),"raster-fade-duration":new nK(e0.paint_raster["raster-fade-duration"])})}};class n8 extends n4{constructor(e,t){super(e,n6,t)}}let n7={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class n9{constructor(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class ae{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){let t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t}_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(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function at(e,t=1){let r=0,i=0;return{members:e.map(e=>{let n=n7[e.type].BYTES_PER_ELEMENT,a=r=ar(r,Math.max(t,n)),o=e.components||1;return i=Math.max(i,n),r+=n*o,{name:e.name,type:e.type,components:o,offset:a}}),size:ar(r,Math.max(i,t)),alignment:t}}function ar(e,t){return Math.ceil(e/t)*t}class ai extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=2*e;return this.int16[i+0]=t,this.int16[i+1]=r,e}}ai.prototype.bytesPerElement=4,nM("StructArrayLayout2i4",ai);class an extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=3*e;return this.int16[n+0]=t,this.int16[n+1]=r,this.int16[n+2]=i,e}}an.prototype.bytesPerElement=6,nM("StructArrayLayout3i6",an);class aa extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r,i)}emplace(e,t,r,i,n){let a=4*e;return this.int16[a+0]=t,this.int16[a+1]=r,this.int16[a+2]=i,this.int16[a+3]=n,e}}aa.prototype.bytesPerElement=8,nM("StructArrayLayout4i8",aa);class ao extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=a,this.int16[s+5]=o,e}}ao.prototype.bytesPerElement=12,nM("StructArrayLayout2i4i12",ao);class as extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.uint8[l+4]=i,this.uint8[l+5]=n,this.uint8[l+6]=a,this.uint8[l+7]=o,e}}as.prototype.bytesPerElement=8,nM("StructArrayLayout2i4ub8",as);class al extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=2*e;return this.float32[i+0]=t,this.float32[i+1]=r,e}}al.prototype.bytesPerElement=8,nM("StructArrayLayout2f8",al);class ac extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s,l,c){let u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,i,n,a,o,s,l,c)}emplace(e,t,r,i,n,a,o,s,l,c,u){let h=10*e;return this.uint16[h+0]=t,this.uint16[h+1]=r,this.uint16[h+2]=i,this.uint16[h+3]=n,this.uint16[h+4]=a,this.uint16[h+5]=o,this.uint16[h+6]=s,this.uint16[h+7]=l,this.uint16[h+8]=c,this.uint16[h+9]=u,e}}ac.prototype.bytesPerElement=20,nM("StructArrayLayout10ui20",ac);class au extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s){let l=this.length;return this.resize(l+1),this.emplace(l,e,t,r,i,n,a,o,s)}emplace(e,t,r,i,n,a,o,s,l){let c=8*e;return this.uint16[c+0]=t,this.uint16[c+1]=r,this.uint16[c+2]=i,this.uint16[c+3]=n,this.uint16[c+4]=a,this.uint16[c+5]=o,this.uint16[c+6]=s,this.uint16[c+7]=l,e}}au.prototype.bytesPerElement=16,nM("StructArrayLayout8ui16",au);class ah extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s,l,c,u,h){let d=this.length;return this.resize(d+1),this.emplace(d,e,t,r,i,n,a,o,s,l,c,u,h)}emplace(e,t,r,i,n,a,o,s,l,c,u,h,d){let f=12*e;return this.int16[f+0]=t,this.int16[f+1]=r,this.int16[f+2]=i,this.int16[f+3]=n,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=c,this.int16[f+9]=u,this.int16[f+10]=h,this.int16[f+11]=d,e}}ah.prototype.bytesPerElement=24,nM("StructArrayLayout4i4ui4i24",ah);class ad extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=3*e;return this.float32[n+0]=t,this.float32[n+1]=r,this.float32[n+2]=i,e}}ad.prototype.bytesPerElement=12,nM("StructArrayLayout3f12",ad);class af extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint32[+e+0]=t,e}}af.prototype.bytesPerElement=4,nM("StructArrayLayout1ul4",af);class ap extends ae{_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,t,r,i,n,a,o,s,l){let c=this.length;return this.resize(c+1),this.emplace(c,e,t,r,i,n,a,o,s,l)}emplace(e,t,r,i,n,a,o,s,l,c){let u=10*e;return this.int16[u+0]=t,this.int16[u+1]=r,this.int16[u+2]=i,this.int16[u+3]=n,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[5*e+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,e}}ap.prototype.bytesPerElement=20,nM("StructArrayLayout6i1ul2ui20",ap);class am extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=a,this.int16[s+5]=o,e}}am.prototype.bytesPerElement=12,nM("StructArrayLayout2i2i2i12",am);class ag extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n){let a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,i,n)}emplace(e,t,r,i,n,a){let o=4*e,s=8*e;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=i,this.int16[s+6]=n,this.int16[s+7]=a,e}}ag.prototype.bytesPerElement=16,nM("StructArrayLayout2f1f2i16",ag);class ay extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=16*e,l=4*e,c=8*e;return this.uint8[s+0]=t,this.uint8[s+1]=r,this.float32[l+1]=i,this.float32[l+2]=n,this.int16[c+6]=a,this.int16[c+7]=o,e}}ay.prototype.bytesPerElement=16,nM("StructArrayLayout2ub2f2i16",ay);class av extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=3*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,this.uint16[n+2]=i,e}}av.prototype.bytesPerElement=6,nM("StructArrayLayout3ui6",av);class ax extends ae{_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,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g){let y=this.length;return this.resize(y+1),this.emplace(y,e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g)}emplace(e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y){let v=24*e,x=12*e,b=48*e;return this.int16[v+0]=t,this.int16[v+1]=r,this.uint16[v+2]=i,this.uint16[v+3]=n,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[v+10]=l,this.uint16[v+11]=c,this.uint16[v+12]=u,this.float32[x+7]=h,this.float32[x+8]=d,this.uint8[b+36]=f,this.uint8[b+37]=p,this.uint8[b+38]=m,this.uint32[x+10]=g,this.int16[v+22]=y,e}}ax.prototype.bytesPerElement=48,nM("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ax);class ab extends ae{_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,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w,T,M,k,A,S){let E=this.length;return this.resize(E+1),this.emplace(E,e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w,T,M,k,A,S)}emplace(e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w,T,M,k,A,S,E){let C=32*e,L=16*e;return this.int16[C+0]=t,this.int16[C+1]=r,this.int16[C+2]=i,this.int16[C+3]=n,this.int16[C+4]=a,this.int16[C+5]=o,this.int16[C+6]=s,this.int16[C+7]=l,this.uint16[C+8]=c,this.uint16[C+9]=u,this.uint16[C+10]=h,this.uint16[C+11]=d,this.uint16[C+12]=f,this.uint16[C+13]=p,this.uint16[C+14]=m,this.uint16[C+15]=g,this.uint16[C+16]=y,this.uint16[C+17]=v,this.uint16[C+18]=x,this.uint16[C+19]=b,this.uint16[C+20]=_,this.uint16[C+21]=w,this.uint16[C+22]=T,this.uint32[L+12]=M,this.float32[L+13]=k,this.float32[L+14]=A,this.uint16[C+30]=S,this.uint16[C+31]=E,e}}ab.prototype.bytesPerElement=64,nM("StructArrayLayout8i15ui1ul2f2ui64",ab);class a_ extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.float32[+e+0]=t,e}}a_.prototype.bytesPerElement=4,nM("StructArrayLayout1f4",a_);class aw extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=3*e;return this.uint16[6*e+0]=t,this.float32[n+1]=r,this.float32[n+2]=i,e}}aw.prototype.bytesPerElement=12,nM("StructArrayLayout1ui2f12",aw);class aT extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=4*e;return this.uint32[2*e+0]=t,this.uint16[n+2]=r,this.uint16[n+3]=i,e}}aT.prototype.bytesPerElement=8,nM("StructArrayLayout1ul2ui8",aT);class aM extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=2*e;return this.uint16[i+0]=t,this.uint16[i+1]=r,e}}aM.prototype.bytesPerElement=4,nM("StructArrayLayout2ui4",aM);class ak extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint16[+e+0]=t,e}}ak.prototype.bytesPerElement=2,nM("StructArrayLayout1ui2",ak);class aA extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r,i)}emplace(e,t,r,i,n){let a=4*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=i,this.float32[a+3]=n,e}}aA.prototype.bytesPerElement=16,nM("StructArrayLayout4f16",aA);class aS extends n9{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 w(this.anchorPointX,this.anchorPointY)}}aS.prototype.size=20;class aE extends ap{get(e){return new aS(this,e)}}nM("CollisionBoxArray",aE);class aC extends n9{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]}}aC.prototype.size=48;class aL extends ax{get(e){return new aC(this,e)}}nM("PlacedSymbolArray",aL);class aP extends n9{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]}}aP.prototype.size=64;class aI extends ab{get(e){return new aP(this,e)}}nM("SymbolInstanceArray",aI);class az extends a_{getoffsetX(e){return this.float32[+e+0]}}nM("GlyphOffsetArray",az);class aD extends an{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}}nM("SymbolLineVertexArray",aD);class aO extends n9{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]}}aO.prototype.size=12;class aR extends aw{get(e){return new aO(this,e)}}nM("TextAnchorOffsetArray",aR);class aF extends n9{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]}}aF.prototype.size=8;class aj extends aT{get(e){return new aF(this,e)}}nM("FeatureIndexArray",aj);class aB extends ai{}class aN extends ai{}class aU extends ai{}class aV extends ao{}class aq extends as{}class aH extends al{}class aG extends ac{}class aW extends au{}class aY extends ah{}class aZ extends ad{}class a$ extends af{}class aX extends am{}class aK extends ay{}class aJ extends av{}class aQ extends aM{}let{members:a0}=at([{name:"a_pos",components:2,type:"Int16"}],4);class a1{constructor(e=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=e}prepareSegment(e,t,r,i){let n=this.segments[this.segments.length-1];return e>a1.MAX_VERTEX_ARRAY_LENGTH&&eA(`Max vertices per segment is ${a1.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${a1.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!n||n.vertexLength+e>a1.MAX_VERTEX_ARRAY_LENGTH||n.sortKey!==i?this.createNewSegment(t,r,i):n}createNewSegment(e,t,r){let i={vertexOffset:e.length,primitiveOffset:t.length,vertexLength:0,primitiveLength:0,vaos:{}};return void 0!==r&&(i.sortKey=r),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(i),i}getOrCreateLatestSegment(e,t,r){return this.prepareSegment(0,e,t,r)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let e of this.segments)for(let t in e.vaos)e.vaos[t].destroy()}static simpleSegment(e,t,r,i){return new a1([{vertexOffset:e,primitiveOffset:t,vertexLength:r,primitiveLength:i,vaos:{},sortKey:0}])}}function a2(e,t){return 256*(e=ev(Math.floor(e),0,255))+ev(Math.floor(t),0,255)}a1.MAX_VERTEX_ARRAY_LENGTH=65535,nM("SegmentVector",a1);let a3=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"}]),a5=at([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var a4,a6,a8,a7={exports:{}},a9={exports:{}},oe={exports:{}},ot=T(function(){if(a8)return a7.exports;a8=1;var e=(a4||(a4=1,a9.exports=function(e,t){var r,i,n,a,o,s;for(i=e.length-(r=3&e.length),n=t,s=0;s>>16)*0xcc9e2d51&65535)<<16)|0)<<15|o>>>17))*0x1b873593+(((o>>>16)*0x1b873593&65535)<<16)|0)<<13|n>>>19))+((5*(n>>>16)&65535)<<16)|0))+((58964+(a>>>16)&65535)<<16);switch(o=0,r){case 3:o^=(255&e.charCodeAt(s+2))<<16;case 2:o^=(255&e.charCodeAt(s+1))<<8;case 1:n^=o=(65535&(o=(o=(65535&(o^=255&e.charCodeAt(s)))*0xcc9e2d51+(((o>>>16)*0xcc9e2d51&65535)<<16)|0)<<15|o>>>17))*0x1b873593+(((o>>>16)*0x1b873593&65535)<<16)|0}return n^=e.length,n=0x85ebca6b*(65535&(n^=n>>>16))+((0x85ebca6b*(n>>>16)&65535)<<16)|0,n=0xc2b2ae35*(65535&(n^=n>>>13))+((0xc2b2ae35*(n>>>16)&65535)<<16)|0,(n^=n>>>16)>>>0}),a9.exports),t=(a6||(a6=1,oe.exports=function(e,t){for(var r,i=e.length,n=t^i,a=0;i>=4;)r=0x5bd1e995*(65535&(r=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+((0x5bd1e995*(r>>>16)&65535)<<16),n=0x5bd1e995*(65535&n)+((0x5bd1e995*(n>>>16)&65535)<<16)^(r=0x5bd1e995*(65535&(r^=r>>>24))+((0x5bd1e995*(r>>>16)&65535)<<16)),i-=4,++a;switch(i){case 3:n^=(255&e.charCodeAt(a+2))<<16;case 2:n^=(255&e.charCodeAt(a+1))<<8;case 1:n=0x5bd1e995*(65535&(n^=255&e.charCodeAt(a)))+((0x5bd1e995*(n>>>16)&65535)<<16)}return n=0x5bd1e995*(65535&(n^=n>>>13))+((0x5bd1e995*(n>>>16)&65535)<<16),(n^=n>>>15)>>>0}),oe.exports);return a7.exports=e,a7.exports.murmur3=e,a7.exports.murmur2=t,a7.exports}());class or{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,t,r,i){this.ids.push(oi(e)),this.positions.push(t,r,i)}getPositions(e){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let t=oi(e),r=0,i=this.ids.length-1;for(;r>1;this.ids[e]>=t?i=e:r=e+1}let n=[];for(;this.ids[r]===t;)n.push({index:this.positions[3*r],start:this.positions[3*r+1],end:this.positions[3*r+2]}),r++;return n}static serialize(e,t){let r=new Float64Array(e.ids),i=new Uint32Array(e.positions);return function e(t,r,i,n){for(;i>1],o=i-1,s=n+1;for(;;){do o++;while(t[o]a);if(o>=s)break;on(t,o,s),on(r,3*o,3*s),on(r,3*o+1,3*s+1),on(r,3*o+2,3*s+2)}s-i`u_${e}`),this.type=r}setUniform(e,t,r){e.set(r.constantOr(this.value))}getBinding(e,t,r){return"color"===this.type?new ol(e,t):new oo(e,t)}}class od{constructor(e,t){this.uniformNames=t.map(e=>`u_${e}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr}setConstantDashPositions(e,t){this.dashTo=[0,e.y,e.height,e.width],this.dashFrom=[0,t.y,t.height,t.width]}setUniform(e,t,r,i){let n=null;"u_pattern_to"===i?n=this.patternTo:"u_pattern_from"===i?n=this.patternFrom:"u_dasharray_to"===i?n=this.dashTo:"u_dasharray_from"===i?n=this.dashFrom:"u_pixel_ratio_to"===i?n=this.pixelRatioTo:"u_pixel_ratio_from"===i&&(n=this.pixelRatioFrom),null!==n&&e.set(n)}getBinding(e,t,r){return r.startsWith("u_pattern")||r.startsWith("u_dasharray_")?new os(e,t):new oo(e,t)}}class of{constructor(e,t,r,i){this.expression=e,this.type=r,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===r?2:1,offset:0})),this.paintVertexArray=new i}populatePaintArray(e,t,r){let i=this.paintVertexArray.length,n=this.expression.evaluate(new nN(0,r),t,{},r.canonical,[],r.formattedSection);this.paintVertexArray.resize(e),this._setPaintValue(i,e,n)}updatePaintArray(e,t,r,i,n){let a=this.expression.evaluate(new nN(0,n),r,i);this._setPaintValue(e,t,a)}_setPaintValue(e,t,r){if("color"===this.type){let i=ou(r);for(let r=e;r`u_${e}_t`),this.type=r,this.useIntegerZoom=i,this.zoom=n,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===r?4:2,offset:0})),this.paintVertexArray=new a}populatePaintArray(e,t,r){let i=this.expression.evaluate(new nN(this.zoom,r),t,{},r.canonical,[],r.formattedSection),n=this.expression.evaluate(new nN(this.zoom+1,r),t,{},r.canonical,[],r.formattedSection),a=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(a,e,i,n)}updatePaintArray(e,t,r,i,n){let a=this.expression.evaluate(new nN(this.zoom,n),r,i),o=this.expression.evaluate(new nN(this.zoom+1,n),r,i);this._setPaintValue(e,t,a,o)}_setPaintValue(e,t,r,i){if("color"===this.type){let n=ou(r),a=ou(i);for(let r=e;r`#define HAS_UNIFORM_${e}`))}return e}getBinderAttributes(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof of||r instanceof op)for(let t of r.paintVertexAttributes)e.push(t.name);else if(r instanceof om)for(let t of r.getVertexAttributes())e.push(t.name)}return e}getBinderUniforms(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof oh||r instanceof od||r instanceof op)for(let t of r.uniformNames)e.push(t)}return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){let r=[];for(let i in this.binders){let n=this.binders[i];if(n instanceof oh||n instanceof od||n instanceof op){for(let a of n.uniformNames)if(t[a]){let o=n.getBinding(e,t[a],a);r.push({name:a,property:i,binding:o})}}}return r}setUniforms(e,t,r,i){for(let{name:e,property:n,binding:a}of t)this.binders[n].setUniform(a,i,r.get(n),e)}updatePaintBuffers(e){for(let t in this._buffers=[],this.binders){let r=this.binders[t];if(e&&r instanceof om){let t=2===e.fromScale?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;t&&this._buffers.push(t)}else(r instanceof of||r instanceof op)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}}upload(e){for(let t in this.binders){let r=this.binders[t];(r instanceof of||r instanceof op||r instanceof om)&&r.upload(e)}this.updatePaintBuffers()}destroy(){for(let e in this.binders){let t=this.binders[e];(t instanceof of||t instanceof op||t instanceof om)&&t.destroy()}}}class ox{constructor(e,t,r=()=>!0){for(let i of(this.programConfigurations={},e))this.programConfigurations[i.id]=new ov(i,t,r);this.needsUpload=!1,this._featureMap=new or,this._bufferOffset=0}populatePaintArrays(e,t,r,i){for(let r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(e,t,i);void 0!==t.id&&this._featureMap.add(t.id,r,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,r,i){for(let n of r)this.needsUpload=this.programConfigurations[n.id].updatePaintArrays(e,this._featureMap,t,n,i)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(let t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(let e in this.programConfigurations)this.programConfigurations[e].destroy()}}function ob(e,t,r){let i={"line-pattern":{source:aG,composite:aG},"fill-pattern":{source:aG,composite:aG},"fill-extrusion-pattern":{source:aG,composite:aG},"line-dasharray":{source:aW,composite:aW}}[e];return i?.[r]||({color:{source:al,composite:aA},number:{source:a_,composite:al}})[t][r]}nM("ConstantBinder",oh),nM("CrossFadedConstantBinder",od),nM("SourceExpressionBinder",of),nM("CrossFadedPatternBinder",og),nM("CrossFadedDasharrayBinder",oy),nM("CompositeExpressionBinder",op),nM("ProgramConfiguration",ov,{omit:["_buffers"]}),nM("ProgramConfigurationSet",ox);let o_=-16383-1;function ow(e){let t=8192/e.extent,r=e.loadGeometry();for(let e of r)for(let r of e){let e=Math.round(r.x*t),i=Math.round(r.y*t);r.x=ev(e,o_,16383),r.y=ev(i,o_,16383),(er.x+1||ir.y+1)&&eA("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function oT(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?ow(e):[]}}class oM{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new aN,this.indexArray=new aJ,this.segments=new a1,this.programConfigurations=new ox(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){let i=this.layers[0],n=[],a=null,o=!1,s="heatmap"===i.type;"circle"===i.type&&(o=!(a=i.layout.get("circle-sort-key")).isConstant(),s||(s="map"===i.paint.get("circle-pitch-alignment")));let l=s?t.subdivisionGranularity.circle:1;for(let{feature:t,id:i,index:s,sourceLayerIndex:l}of e){let e=this.layers[0]._featureFilter.needGeometry,c=oT(t,e);if(!this.layers[0]._featureFilter.filter(new nN(this.zoom),c,r))continue;let u=o?a.evaluate(c,{},r):void 0,h={id:i,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:ow(t),patterns:{},sortKey:u};n.push(h)}for(let i of(o&&n.sort((e,t)=>e.sortKey-t.sortKey),n)){let{geometry:n,index:a,sourceLayerIndex:o}=i,s=e[a].feature;this.addFeature(i,n,a,r,l),t.featureIndex.insert(s,n,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,a0),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,t,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 o=a.length;for(let r of t)for(let t of r){let r=t.x,i=t.y;if(r<0||r>=8192||i<0||i>=8192)continue;let n=this.segments.prepareSegment(o*o,this.layoutVertexArray,this.indexArray,e.sortKey),u=n.vertexLength;for(let e=0;e1?r:r.sub(t)._mult(n)._add(t))}function oP(e,t){let r,i,n=!1;for(let a of e)for(let e=0,o=a.length-1;et.y!=i.y>t.y&&t.x<(i.x-r.x)*(t.y-r.y)/(i.y-r.y)+r.x&&(n=!n);return n}function oI(e,t){let r=!1;for(let i=0,n=e.length-1;it.y!=o.y>t.y&&t.x<(o.x-a.x)*(t.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function oz(e,t,r){let i=t.paint.get(e).value;return"constant"===i.kind?i.value:r.programConfigurations.get(t.id).getMaxValue(e)}function oD(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function oO(e,t,r,i,n){if(!t[0]&&!t[1])return e;let a=w.convert(t)._mult(n);"viewport"===r&&a._rotate(-i);let o=[];for(let t of e)o.push(t.sub(a));return o}function oR({queryGeometry:e,size:t},r){return oA(e,r,t)}function oF({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n},a){return oA(e,a,t*(r.projectTileCoordinates(a.x,a.y,i,n).signedDistanceFromCamera/r.cameraToCenterDistance))}function oj({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n},a){let o=r.projectTileCoordinates(a.x,a.y,i,n).signedDistanceFromCamera,s=t*(r.cameraToCenterDistance/o);return oA(e,oU(a,r,i,n),s)}function oB({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n},a){return oA(e,oU(a,r,i,n),t)}function oN({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n,pitchAlignment:a="map",pitchScale:o="map"},s){let l="map"===a?"map"===o?oR:oF:"map"===o?oj:oB,c={queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n};for(let e of s)for(let t of e)if(l(c,t))return!0;return!1}function oU(e,t,r,i){let n=t.projectTileCoordinates(e.x,e.y,r,i).point;return new w((.5*n.x+.5)*t.width,(-(.5*n.y)+.5)*t.height)}nM("CircleBucket",oM,{omit:["layers"]});var oV={get paint(){return s=s||new n2({"circle-radius":new nJ(e0.paint_circle["circle-radius"]),"circle-color":new nJ(e0.paint_circle["circle-color"]),"circle-blur":new nJ(e0.paint_circle["circle-blur"]),"circle-opacity":new nJ(e0.paint_circle["circle-opacity"]),"circle-translate":new nK(e0.paint_circle["circle-translate"]),"circle-translate-anchor":new nK(e0.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new nK(e0.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new nK(e0.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new nJ(e0.paint_circle["circle-stroke-width"]),"circle-stroke-color":new nJ(e0.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new nJ(e0.paint_circle["circle-stroke-opacity"])})},get layout(){return o=o||new n2({"circle-sort-key":new nJ(e0.layout_circle["circle-sort-key"])})}};class oq extends n4{constructor(e,t){super(e,oV,t)}createBucket(e){return new oM(e)}queryRadius(e){return oz("circle-radius",this,e)+oz("circle-stroke-width",this,e)+oD(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,unwrappedTileID:o,getElevation:s}){let l=oO(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-n.bearingInRadians,a),c=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),u=this.paint.get("circle-pitch-scale"),h=this.paint.get("circle-pitch-alignment"),d,f;return"map"===h?(d=l,f=c*a):(d=l.map(e=>oU(e,n,o,s)),f=c),oN({queryGeometry:d,size:f,transform:n,unwrappedTileID:o,getElevation:s,pitchAlignment:h,pitchScale:u},i)}}class oH extends oM{}nM("HeatmapBucket",oH,{omit:["layers"]});var oG={get paint(){return l=l||new n2({"heatmap-radius":new nJ(e0.paint_heatmap["heatmap-radius"]),"heatmap-weight":new nJ(e0.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new nK(e0.paint_heatmap["heatmap-intensity"]),"heatmap-color":new n1(e0.paint_heatmap["heatmap-color"]),"heatmap-opacity":new nK(e0.paint_heatmap["heatmap-opacity"])})}};function oW(e,{width:t,height:r},i,n){if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==t*r*i)throw RangeError(`mismatched image size. expected: ${n.length} but got: ${t*r*i}`)}else n=new Uint8Array(t*r*i);return e.width=t,e.height=r,e.data=n,e}function oY(e,{width:t,height:r},i){if(t===e.width&&r===e.height)return;let n=oW({},{width:t,height:r},i);oZ(e,n,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,t),height:Math.min(e.height,r)},i),e.width=t,e.height=r,e.data=n.data}function oZ(e,t,r,i,n,a){if(0===n.width||0===n.height)return t;if(n.width>e.width||n.height>e.height||r.x>e.width-n.width||r.y>e.height-n.height)throw RangeError("out of range source coordinates for image copy");if(n.width>t.width||n.height>t.height||i.x>t.width-n.width||i.y>t.height-n.height)throw RangeError("out of range destination coordinates for image copy");let o=e.data,s=t.data;if(o===s)throw Error("srcData equals dstData, so image is already copied");for(let l=0;l{t[e.evaluationKey]=o;let s=e.expression.evaluate(t);n.setPixel(i/4/r,a/4,s)};if(e.clips)for(let t=0,n=0;tthis.max&&(this.max=r),r=this.dim+1||t<-1||t>=this.dim+1)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${t}, dim: ${this.dim}`);return(t+1)*this.stride+(e+1)}unpack(e,t,r){return e*this.redFactor+t*this.greenFactor+r*this.blueFactor-this.baseShift}pack(e){return o6(e,this.getUnpackVector())}getPixels(){return new oX({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(e,t,r){if(this.dim!==e.dim)throw Error("dem dimension mismatch");let i=t*this.dim,n=t*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(t){case -1:i=n-1;break;case 1:n=i+1}switch(r){case -1:a=o-1;break;case 1:o=a+1}let s=-t*this.dim,l=-r*this.dim;for(let t=a;t0)for(let n=t;n=t;n-=i)a=sp(n/i|0,e[n],e[n+1],a);return a&&sl(a,a.next)&&(sm(a),a=a.next),a}function sr(e,t){if(!e)return e;t||(t=e);let r,i=e;do if(r=!1,i.steiner||!sl(i,i.next)&&0!==ss(i.prev,i,i.next))i=i.next;else{if(sm(i),(i=t=i.prev)===i.next)break;r=!0}while(r||i!==t);return t}function si(e,t){let r=e.x-t.x;return 0===r&&0==(r=e.y-t.y)&&(r=(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)),r}function sn(e,t,r,i,n){return(e=0x55555555&((e=0x33333333&((e=0xf0f0f0f&((e=0xff00ff&((e=(e-r)*n|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=0x55555555&((t=0x33333333&((t=0xf0f0f0f&((t=0xff00ff&((t=(t-i)*n|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function sa(e,t,r,i,n,a,o,s){return(n-o)*(t-s)>=(e-o)*(a-s)&&(e-o)*(i-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(n-o)*(i-s)}function so(e,t,r,i,n,a,o,s){return(e!==o||t!==s)&&sa(e,t,r,i,n,a,o,s)}function ss(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function sl(e,t){return e.x===t.x&&e.y===t.y}function sc(e,t,r,i){let n=sh(ss(e,t,r)),a=sh(ss(e,t,i)),o=sh(ss(r,i,e)),s=sh(ss(r,i,t));return n!==a&&o!==s||!(0!==n||!su(e,r,t))||!(0!==a||!su(e,i,t))||!(0!==o||!su(r,e,i))||!(0!==s||!su(r,t,i))}function su(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function sh(e){return e>0?1:e<0?-1:0}function sd(e,t){return 0>ss(e.prev,e,e.next)?ss(e,t,e.next)>=0&&ss(e,e.prev,t)>=0:0>ss(e,t,e.prev)||0>ss(e,e.next,t)}function sf(e,t){let r=sg(e.i,e.x,e.y),i=sg(t.i,t.x,t.y),n=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function sp(e,t,r,i){let n=sg(e,t,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 sm(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)}function sg(e,t,r){return{i:e,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class sy{constructor(e,t){if(t>e)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=e,this._minGranularity=t}getGranularityForZoomLevel(e){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||t>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let r=0|Math.round(e),i=0|Math.round(t),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(e){if(this._granularity<2)return function(e,t){let r=[];for(let i=0;i0?(r.push(n),r.push(o),r.push(a)):(r.push(n),r.push(a),r.push(o))}return r}(this._vertexBuffer,e);let t=[],r=e.length;for(let i=0;i=0?o-1:a-1,n=(s+1)%a,l=e[2*t[i]],c=e[2*t[n]],u=e[2*t[o]],h=e[2*t[o]+1],d=e[2*t[s]+1],f=!1;if(lc)f=!1;else{let r=d-h,a=-(e[2*t[s]]-u),o=h((c-u)*r+(e[2*t[n]+1]-h)*a)*o&&(f=!0)}if(f){let e=t[i],n=t[o],l=t[s];e!==n&&e!==l&&n!==l&&r.push(l,n,e),--o<0&&(o=a-1)}else{let e=t[n],i=t[o],l=t[s];e!==i&&e!==l&&i!==l&&r.push(l,i,e),++s>=a&&(s=0)}if(i===n)break}}(this._vertexBuffer,i,t)}else t.push(...r)}return t}_scanlineGenerateVertexRingForCellRow(e,t,r){let i=e*this._granularityCellSize,n=i+this._granularityCellSize,a=[];for(let e=0;e<3;e++){let o=t[2*e],s=t[2*e+1],l=t[2*(e+1)%6],c=t[(2*(e+1)+1)%6],u=t[2*(e+2)%6],h=t[(2*(e+2)+1)%6],d=l-o,f=c-s,p=0===d,m=0===f,g=(i-s)/f,y=(n-s)/f,v=Math.min(g,y),x=Math.max(g,y);if(!m&&(v>=1||x<=0)||m&&(sn)){c>=i&&c<=n&&a.push(r[(e+1)%3]);continue}!m&&v>0&&a.push(this._vertexToIndex(o+d*v,s+f*v));let b=o+d*Math.max(v,0),_=o+d*Math.min(x,1);p||this._generateIntraEdgeVertices(a,o,s,l,c,b,_),!m&&x<1&&a.push(this._vertexToIndex(o+d*x,s+f*x)),(m||c>=i&&c<=n)&&a.push(r[(e+1)%3]),!m&&(c<=i||c>=n)&&this._generateInterEdgeVertices(a,o,s,l,c,u,h,_,i,n)}return a}_generateIntraEdgeVertices(e,t,r,i,n,a,o){let s=i-t,l=n-r,c=0===l,u=c?Math.min(t,i):Math.min(a,o),h=c?Math.max(t,i):Math.max(a,o),d=Math.floor(u/this._granularityCellSize)+1,f=Math.ceil(h/this._granularityCellSize)-1;if(c?t=d;i--){let n=i*this._granularityCellSize;e.push(this._vertexToIndex(n,r+l*(n-t)/s))}}_generateInterEdgeVertices(e,t,r,i,n,a,o,s,l,c){let u=o-n,h=(l-n)/u,d=(c-n)/u,f=Math.min(h,d),p=Math.max(h,d),m=i+(a-i)*f,g=Math.floor(Math.min(m,s)/this._granularityCellSize)+1,y=Math.ceil(Math.max(m,s)/this._granularityCellSize)-1,v=s=1||p<=0){let e=r-o,i=a+(t-a)*Math.min((l-o)/e,(c-o)/e);g=Math.floor(Math.min(i,s)/this._granularityCellSize)+1,y=Math.ceil(Math.max(i,s)/this._granularityCellSize)-1,v=s0?c:l;if(v)for(let t=g;t<=y;t++)e.push(this._vertexToIndex(t*this._granularityCellSize,b));else for(let t=y;t>=g;t--)e.push(this._vertexToIndex(t*this._granularityCellSize,b))}_generateOutline(e){let t=[];for(let r of e){let e=s_(r,this._granularity,!0),i=this._pointArrayToIndices(e),n=[];for(let e=1;en!=(-32768===a)?(e.push(t),e.push(r),e.push(this._vertexToIndex(i,a)),e.push(r),e.push(this._vertexToIndex(n,a))):(e.push(r),e.push(t),e.push(this._vertexToIndex(i,a)),e.push(this._vertexToIndex(n,a)),e.push(r)),e.push(this._vertexToIndex(i,a))}_fillPoles(e,t,r){let i=this._vertexBuffer,n=e.length;for(let a=2;a=r.next.y&&r.next.y!==r.y){let e=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=i&&e>o&&(o=e,a=r.x=r.x&&r.x>=l&&i!==r.x&&sa(na.x||r.x===a.x&&(h=a,d=r,0>ss(h.prev,h,d.prev)&&0>ss(d.next,h,h.next))))&&(a=r,u=t)}r=r.next}while(r!==s);return a}(e,t);if(!r)return t;let i=sf(r,e);return sr(i,i.next),sr(r,r.next)}(n[e],r);return r}(e,t,l,r)),e.length>80*r){i=e[0],n=e[1];let t=i,o=n;for(let a=r;at&&(t=r),s>o&&(o=s)}a=Math.max(t-i,o-n),a=0!==a?32767/a:0}return function e(t,r,i,n,a,o,s){if(!t)return;!s&&o&&function(e,t,r,i){let n=e;do 0===n.z&&(n.z=sn(n.x,n.y,t,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==e);n.prevZ.nextZ=null,n.prevZ=null,function(e){let t,r=1;do{let i,n=e;e=null;let a=null;for(t=0;n;){t++;let o=n,s=0;for(let e=0;e0||l>0&&o;)0!==s&&(0===l||!o||n.z<=o.z)?(i=n,n=n.nextZ,s--):(i=o,o=o.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=o}a.nextZ=null,r*=2}while(t>1)}(n)}(t,n,a,o);let l=t;for(;t.prev!==t.next;){let c=t.prev,u=t.next;if(o?function(e,t,r,i){let n=e.prev,a=e.next;if(ss(n,e,a)>=0)return!1;let o=n.x,s=e.x,l=a.x,c=n.y,u=e.y,h=a.y,d=Math.min(o,s,l),f=Math.min(c,u,h),p=Math.max(o,s,l),m=Math.max(c,u,h),g=sn(d,f,t,r,i),y=sn(p,m,t,r,i),v=e.prevZ,x=e.nextZ;for(;v&&v.z>=g&&x&&x.z<=y;){if(v.x>=d&&v.x<=p&&v.y>=f&&v.y<=m&&v!==n&&v!==a&&so(o,c,s,u,l,h,v.x,v.y)&&ss(v.prev,v,v.next)>=0||(v=v.prevZ,x.x>=d&&x.x<=p&&x.y>=f&&x.y<=m&&x!==n&&x!==a&&so(o,c,s,u,l,h,x.x,x.y)&&ss(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;v&&v.z>=g;){if(v.x>=d&&v.x<=p&&v.y>=f&&v.y<=m&&v!==n&&v!==a&&so(o,c,s,u,l,h,v.x,v.y)&&ss(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;x&&x.z<=y;){if(x.x>=d&&x.x<=p&&x.y>=f&&x.y<=m&&x!==n&&x!==a&&so(o,c,s,u,l,h,x.x,x.y)&&ss(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}(t,n,a,o):function(e){let t=e.prev,r=e.next;if(ss(t,e,r)>=0)return!1;let i=t.x,n=e.x,a=r.x,o=t.y,s=e.y,l=r.y,c=Math.min(i,n,a),u=Math.min(o,s,l),h=Math.max(i,n,a),d=Math.max(o,s,l),f=r.next;for(;f!==t;){if(f.x>=c&&f.x<=h&&f.y>=u&&f.y<=d&&so(i,o,n,s,a,l,f.x,f.y)&&ss(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}(t))r.push(c.i,t.i,u.i),sm(t),t=u.next,l=u.next;else if((t=u)===l){s?1===s?e(t=function(e,t){let r=e;do{let i=r.prev,n=r.next.next;!sl(i,n)&&sc(i,r,r.next,n)&&sd(i,n)&&sd(n,i)&&(t.push(i.i,r.i,n.i),sm(r),sm(r.next),r=e=n),r=r.next}while(r!==e);return sr(r)}(sr(t),r),r,i,n,a,o,2):2===s&&function(t,r,i,n,a,o){let s=t;do{let t=s.next.next;for(;t!==s.prev;){var l,c;if(s.i!==t.i&&(l=s,c=t,l.next.i!==c.i&&l.prev.i!==c.i&&!function(e,t){let r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&sc(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(l,c)&&(sd(l,c)&&sd(c,l)&&function(e,t){let r=e,i=!1,n=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&n<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==e);return i}(l,c)&&(ss(l.prev,l,c.prev)||ss(l,c.prev,c))||sl(l,c)&&ss(l.prev,l,l.next)>0&&ss(c.prev,c,c.next)>0))){let l=sf(s,t);return s=sr(s,s.next),l=sr(l,l.next),e(s,r,i,n,a,o,0),void e(l,r,i,n,a,o,0)}t=t.next}s=s.next}while(s!==t)}(t,r,i,n,a,o):e(sr(t),r,i,n,a,o,1);break}}}(l,c,r,i,n,a,0),c}(r,i),t=this._convertIndices(r,e);n=this._subdivideTrianglesScanline(t)}catch(e){console.error(e)}let a=[];return t&&(a=this._generateOutline(e)),this._ensureNoPoleVertices(),this._handlePoles(n),{verticesFlattened:this._vertexBuffer,indicesTriangles:n,indicesLineList:a}}_convertIndices(e,t){let r=[];for(let i of t)r.push(this._vertexToIndex(e[2*i],e[2*i+1]));return r}_pointArrayToIndices(e){let t=[];for(let r of e)t.push(this._vertexToIndex(r.x,r.y));return t}}function sb(e,t,r,i=!0){return new sx(r,t).subdividePolygonInternal(e,i)}function s_(e,t,r=!1){if(!e||e.length<1||e.length<2)return[];let i=e[0],n=e[e.length-1],a=r&&(i.x!==n.x||i.y!==n.y);if(t<2)return a?[...e,e[0]]:[...e];let o=Math.floor(8192/t),s=[];s.push(new w(e[0].x,e[0].y));let l=e.length,c=a?l:l-1;for(let t=0;t0?(Math.floor(y/o)+1)*o:(Math.ceil(y/o)-1)*o,t=p>0?(Math.floor(v/o)+1)*o:(Math.ceil(v/o)-1)*o,r=Math.abs(y-e),i=Math.abs(v-t),n=Math.abs(v-u),a=h?r/m:1/0,l=d?i/g:1/0;if((Math.abs(y-c)<=r||!h)&&(n<=i||!d))break;if(aa1.MAX_VERTEX_ARRAY_LENGTH&&(c=e.createNewSegment(t,r),l=s.count,m=!0,g=!0,y=!0,u=0);let v=sT(o,i,a,s,d,m,c),x=sT(o,i,a,s,f,g,c),b=sT(o,i,a,s,p,y,c);r.emplaceBack(u+v-l,u+x-l,u+b-l),c.primitiveLength++}})(t,r,i,n,a,e),u&&function(e,t,r,i,n,a){let o=[];for(let e=0;ea1.MAX_VERTEX_ARRAY_LENGTH&&(c=e.createNewSegment(t,r),l=s.count,p=!0,m=!0,u=0);let g=sT(o,i,a,s,d,p,c),y=sT(o,i,a,s,f,m,c);r.emplaceBack(u+g-l,u+y-l),c.primitiveLength++}}(o,r,s,n,l,e),t.forceNewSegmentOnNextPrepare(),o?.forceNewSegmentOnNextPrepare()}function sT(e,t,r,i,n,a,o){if(a){let a=i.count;return r(t[2*n],t[2*n+1]),e[n]=i.count,i.count++,o.vertexLength++,a}return e[n]}class sM{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new aU,this.indexArray=new aJ,this.indexArray2=new aQ,this.programConfigurations=new ox(e.layers,e.zoom),this.segments=new a1,this.segments2=new a1,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){this.hasDependencies=o9("fill",this.layers,t);let i=this.layers[0].layout.get("fill-sort-key"),n=!i.isConstant(),a=[];for(let{feature:o,id:s,index:l,sourceLayerIndex:c}of e){let e=this.layers[0]._featureFilter.needGeometry,u=oT(o,e);if(!this.layers[0]._featureFilter.filter(new nN(this.zoom),u,r))continue;let h=n?i.evaluate(u,{},r,t.availableImages):void 0,d={id:s,properties:o.properties,type:o.type,sourceLayerIndex:c,index:l,geometry:e?u.geometry:ow(o),patterns:{},sortKey:h};a.push(d)}for(let i of(n&&a.sort((e,t)=>e.sortKey-t.sortKey),a)){let{geometry:n,index:a,sourceLayerIndex:o}=i;if(this.hasDependencies){let e=se("fill",this.layers,i,{zoom:this.zoom},t);this.patternFeatures.push(e)}else this.addFeature(i,n,a,r,{},t.subdivisionGranularity);t.featureIndex.insert(e[a].feature,n,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}addFeatures(e,t,r){for(let i of this.patternFeatures)this.addFeature(i,i.geometry,i.index,t,r,e.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,o7),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,t,r,i,n,a){for(let e of rZ(t,500)){let t=sb(e,i,a.fill.getGranularityForZoomLevel(i.z)),r=this.layoutVertexArray;sw((e,t)=>{r.emplaceBack(e,t)},this.segments,this.layoutVertexArray,this.indexArray,t.verticesFlattened,t.indicesTriangles,this.segments2,this.indexArray2,t.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:n,canonical:i})}}nM("FillBucket",sM,{omit:["layers","patternFeatures"]});var sk={get paint(){return f=f||new n2({"fill-antialias":new nK(e0.paint_fill["fill-antialias"]),"fill-opacity":new nJ(e0.paint_fill["fill-opacity"]),"fill-color":new nJ(e0.paint_fill["fill-color"]),"fill-outline-color":new nJ(e0.paint_fill["fill-outline-color"]),"fill-translate":new nK(e0.paint_fill["fill-translate"]),"fill-translate-anchor":new nK(e0.paint_fill["fill-translate-anchor"]),"fill-pattern":new nQ(e0.paint_fill["fill-pattern"])})},get layout(){return h=h||new n2({"fill-sort-key":new nJ(e0.layout_fill["fill-sort-key"])})}};class sA extends n4{constructor(e,t){super(e,sk,t)}recalculate(e,t){super.recalculate(e,t);let r=this.paint._values["fill-outline-color"];"constant"===r.value.kind&&void 0===r.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(e){return new sM(e)}queryRadius(){return oD(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:e,geometry:t,transform:r,pixelsToTileUnits:i}){return oS(oO(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-r.bearingInRadians,i),t)}isTileClipped(){return!0}}let sS=at([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),sE=at([{name:"a_centroid",components:2,type:"Int16"}],4),{members:sC}=sS;class sL{constructor(e,t,r,i,n){this.properties={},this.extent=r,this.type=0,this.id=void 0,this._pbf=e,this._geometry=-1,this._keys=i,this._values=n,e.readFields(sP,this,t)}loadGeometry(){let e=this._pbf;e.pos=this._geometry;let t=e.readVarint()+e.pos,r=[],i,n=1,a=0,o=0,s=0;for(;e.pos>3}if(a--,1===n||2===n)o+=e.readSVarint(),s+=e.readSVarint(),1===n&&(i&&r.push(i),i=[]),i&&i.push(new w(o,s));else{if(7!==n)throw Error(`unknown command ${n}`);i&&i.push(i[0].clone())}}return i&&r.push(i),r}bbox(){let e=this._pbf;e.pos=this._geometry;let t=e.readVarint()+e.pos,r=1,i=0,n=0,a=0,o=1/0,s=-1/0,l=1/0,c=-1/0;for(;e.pos>3}if(i--,1===r||2===r)n+=e.readSVarint(),a+=e.readSVarint(),ns&&(s=n),ac&&(c=a);else if(7!==r)throw Error(`unknown command ${r}`)}return[o,l,s,c]}toGeoJSON(e,t,r){let i,n=this.extent*Math.pow(2,r),a=this.extent*e,o=this.extent*t,s=this.loadGeometry();function l(e){return[360*(e.x+a)/n-180,360/Math.PI*Math.atan(Math.exp((1-2*(e.y+o)/n)*Math.PI))-90]}function c(e){return e.map(l)}if(1===this.type){let e=[];for(let t of s)e.push(t[0]);let t=c(e);i=1===e.length?{type:"Point",coordinates:t[0]}:{type:"MultiPoint",coordinates:t}}else if(2===this.type){let e=s.map(c);i=1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}}else{if(3!==this.type)throw Error("unknown feature type");{let e=sI(s),t=[];for(let r of e)t.push(r.map(c));i=1===t.length?{type:"Polygon",coordinates:t[0]}:{type:"MultiPolygon",coordinates:t}}}let u={type:"Feature",geometry:i,properties:this.properties};return null!=this.id&&(u.id=this.id),u}}function sP(e,t,r){1===e?t.id=r.readVarint():2===e?function(e,t){let r=e.readVarint()+e.pos;for(;e.pos=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[e];let t=this._pbf.readVarint()+this._pbf.pos;return new sL(this._pbf,t,this.extent,this._keys,this._values)}}function sD(e,t,r){15===e?t.version=r.readVarint():1===e?t.name=r.readString():5===e?t.extent=r.readVarint():2===e?t._features.push(r.pos):3===e?t._keys.push(r.readString()):4===e&&t._values.push(function(e){let t=null,r=e.readVarint()+e.pos;for(;e.pos>3;t=1===r?e.readString():2===r?e.readFloat():3===r?e.readDouble():4===r?e.readVarint64():5===r?e.readVarint():6===r?e.readSVarint():7===r?e.readBoolean():null}if(null==t)throw Error("unknown feature value");return t}(r))}class sO{constructor(e,t){this.layers=e.readFields(sR,{},t)}}function sR(e,t,r){if(3===e){let e=new sz(r,r.readVarint()+r.pos);e.length&&(t[e.name]=e)}}function sF(e,t,r,i,n,a,o,s){e.emplaceBack(t,r,2*Math.floor(8192*i)+o,8192*n*2,8192*a*2,Math.round(s))}class sj{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new aV,this.centroidVertexArray=new aB,this.indexArray=new aJ,this.programConfigurations=new ox(e.layers,e.zoom),this.segments=new a1,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){for(let{feature:i,id:n,index:a,sourceLayerIndex:o}of(this.features=[],this.hasDependencies=o9("fill-extrusion",this.layers,t),e)){let e=this.layers[0]._featureFilter.needGeometry,s=oT(i,e);if(!this.layers[0]._featureFilter.filter(new nN(this.zoom),s,r))continue;let l={id:n,sourceLayerIndex:o,index:a,geometry:e?s.geometry:ow(i),properties:i.properties,type:i.type,patterns:{}};this.hasDependencies?this.features.push(se("fill-extrusion",this.layers,l,{zoom:this.zoom},t)):this.addFeature(l,l.geometry,a,r,{},t.subdivisionGranularity),t.featureIndex.insert(i,l.geometry,a,o,this.index,!0)}}addFeatures(e,t,r){for(let i of this.features){let{geometry:n}=i;this.addFeature(i,n,i.index,t,r,e.subdivisionGranularity)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,sC),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,sE.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,t,r,i,n,a){for(let r of rZ(t,500)){let t={x:0,y:0,sampleCount:0},n=this.layoutVertexArray.length;this.processPolygon(t,i,e,r,a);let o=this.layoutVertexArray.length-n,s=Math.floor(t.x/t.sampleCount),l=Math.floor(t.y/t.sampleCount);for(let e=0;e{sF(c,e,t,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(e,t){let r=0;for(let a=1;a8192)||i.y===n.y&&(i.y<0||i.y>8192))continue;t.segment.vertexLength+4>a1.MAX_VERTEX_ARRAY_LENGTH&&(t.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let l=o.sub(s)._perp()._unit(),c=s.dist(o);r+c>32768&&(r=0),sF(this.layoutVertexArray,o.x,o.y,l.x,l.y,0,0,r),sF(this.layoutVertexArray,o.x,o.y,l.x,l.y,0,1,r),r+=c,sF(this.layoutVertexArray,s.x,s.y,l.x,l.y,0,0,r),sF(this.layoutVertexArray,s.x,s.y,l.x,l.y,0,1,r);let u=t.segment.vertexLength;this.indexArray.emplaceBack(u,u+2,u+1),this.indexArray.emplaceBack(u+1,u+2,u+3),t.segment.vertexLength+=4,t.segment.primitiveLength+=2}}}function sB(e){return e.every(e=>e.x<0)||e.every(e=>e.x>8192)||e.every(e=>e.y<0)||e.every(e=>e.y>8192)}nM("FillExtrusionBucket",sj,{omit:["layers","features"]});var sN={get paint(){return p=p||new n2({"fill-extrusion-opacity":new nK(e0["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new nJ(e0["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new nK(e0["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new nK(e0["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new nQ(e0["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new nJ(e0["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new nJ(e0["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new nK(e0["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class sU extends n4{constructor(e,t){super(e,sN,t)}createBucket(e){return new sj(e)}queryRadius(){return oD(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,pixelPosMatrix:o}){let s=oO(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-n.bearingInRadians,a),l=this.paint.get("fill-extrusion-height").evaluate(t,r),c=this.paint.get("fill-extrusion-base").evaluate(t,r),u=function(e,t){let r=[];for(let i of e){let e=[i.x,i.y,0,1];eo(e,e,t),r.push(new w(e[0]/e[3],e[1]/e[3]))}return r}(s,o),h=function(e,t,r,i){let n=[],a=[],o=i[8]*t,s=i[9]*t,l=i[10]*t,c=i[11]*t,u=i[8]*r,h=i[9]*r,d=i[10]*r,f=i[11]*r;for(let t of e){let e=[],r=[];for(let n of t){let t=n.x,a=n.y,p=i[0]*t+i[4]*a+i[12],m=i[1]*t+i[5]*a+i[13],g=i[2]*t+i[6]*a+i[14],y=i[3]*t+i[7]*a+i[15],v=g+l,x=y+c,b=p+u,_=m+h,T=g+d,M=y+f,k=new w((p+o)/x,(m+s)/x);k.z=v/x,e.push(k);let A=new w(b/M,_/M);A.z=T/M,r.push(A)}n.push(e),a.push(r)}return[n,a]}(i,c,l,o);return function(e,t,r){let i=1/0;oS(r,t)&&(i=sq(r,t[0]));for(let n=0;n>4;if(1!==i)throw Error(`Got v${i} data when expected v1.`);let n=sH[15&r];if(!n)throw Error("Unrecognized array type.");let[a]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new sG(o,a,n,e)}constructor(e,t=64,r=Float64Array,i){if(isNaN(e)||e<0)throw Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let n=sH.indexOf(this.ArrayType),a=2*e*this.ArrayType.BYTES_PER_ELEMENT,o=e*this.IndexArrayType.BYTES_PER_ELEMENT,s=(8-o%8)%8;if(n<0)throw Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+s,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+a+o+s),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+s,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+n]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){let r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=t,r}finish(){let e=this._pos>>1;if(e!==this.numItems)throw Error(`Added ${e} items when expected ${this.numItems}.`);return function e(t,r,i,n,a,o){if(a-n<=i)return;let s=n+a>>1;(function e(t,r,i,n,a,o){for(;a>n;){if(a-n>600){let s=a-n+1,l=i-n+1,c=Math.log(s),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);e(t,r,i,Math.max(n,Math.floor(i-l*u/s+h)),Math.min(a,Math.floor(i+(s-l)*u/s+h)),o)}let s=r[2*i+o],l=n,c=a;for(sW(t,r,n,i),r[2*a+o]>s&&sW(t,r,n,a);ls;)c--}r[2*n+o]===s?sW(t,r,n,c):sW(t,r,++c,a),c<=i&&(n=c+1),i<=c&&(a=c-1)}})(t,r,s,n,a,o),e(t,r,i,n,s-1,1-o),e(t,r,i,s+1,a,1-o)}(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,i){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:n,coords:a,nodeSize:o}=this,s=[0,n.length-1,0],l=[];for(;s.length;){let c=s.pop()||0,u=s.pop()||0,h=s.pop()||0;if(u-h<=o){for(let o=h;o<=u;o++){let s=a[2*o],c=a[2*o+1];s>=e&&s<=r&&c>=t&&c<=i&&l.push(n[o])}continue}let d=h+u>>1,f=a[2*d],p=a[2*d+1];f>=e&&f<=r&&p>=t&&p<=i&&l.push(n[d]),(0===c?e<=f:t<=p)&&(s.push(h),s.push(d-1),s.push(1-c)),(0===c?r>=f:i>=p)&&(s.push(d+1),s.push(u),s.push(1-c))}return l}within(e,t,r){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:i,coords:n,nodeSize:a}=this,o=[0,i.length-1,0],s=[],l=r*r;for(;o.length;){let c=o.pop()||0,u=o.pop()||0,h=o.pop()||0;if(u-h<=a){for(let r=h;r<=u;r++)sZ(n[2*r],n[2*r+1],e,t)<=l&&s.push(i[r]);continue}let d=h+u>>1,f=n[2*d],p=n[2*d+1];sZ(f,p,e,t)<=l&&s.push(i[d]),(0===c?e-r<=f:t-r<=p)&&(o.push(h),o.push(d-1),o.push(1-c)),(0===c?e+r>=f:t+r>=p)&&(o.push(d+1),o.push(u),o.push(1-c))}return s}}function sW(e,t,r,i){sY(e,r,i),sY(t,2*r,2*i),sY(t,2*r+1,2*i+1)}function sY(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function sZ(e,t,r,i){let n=e-r,a=t-i;return n*n+a*a}function s$(e,t,r,i){let n={id:e??null,type:t,geometry:r,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(t){case"Point":case"MultiPoint":sK(n,r);break;case"LineString":sK(n,r.points);break;case"Polygon":sK(n,r[0].points);break;case"MultiLineString":for(let e of r)sK(n,e.points);break;case"MultiPolygon":for(let e of r)sK(n,e[0].points)}return n}function sX(e){e.points.length>64&&(e.points=new Float64Array(e.points))}function sK(e,t){for(let r=0;r0&&(o+=i?(n*l-s*a)/2:Math.sqrt(Math.pow(s-n,2)+Math.pow(l-a,2))),n=s,a=l}let s=t.points.length-3;t.points[2]=1,r>0&&function e(t,r,i,n){let a=n,o=r+(i-r>>1),s,l=i-r,c=t[r],u=t[r+1],h=t[i],d=t[i+1];for(let e=r+3;e1?(r=n,i=a):l>0&&(r+=o*l,i+=s*l)}return(o=e-r)*o+(s=t-i)*s}(t[e],t[e+1],c,u,h,d);if(r>a)s=e,a=r;else if(r===a){let t=Math.abs(e-o);tn&&(s-r>3&&e(t,r,s,n),t[s+2]=a,i-s>3&&e(t,s,i,n))}(t.points,0,s,r),t.points[s+2]=1,sX(t),t.size=Math.abs(o),t.start=0,t.end=t.size}function s1(e,t,r,i){for(let n=0;n1?1:r}function s5(e){let t={type:"Feature",geometry:function(e){let{type:t,geometry:r}=e;switch(t){case"Point":return{type:t,coordinates:function(e,t){return[s6(e),s8(t)]}(r[0],r[1])};case"MultiPoint":return{type:t,coordinates:s4(r)};case"LineString":return{type:t,coordinates:s4(r.points)};case"MultiLineString":case"Polygon":return{type:t,coordinates:r.map(e=>s4(e.points))};case"MultiPolygon":return{type:t,coordinates:r.map(e=>e.map(e=>s4(e.points)))}}}(e),properties:e.tags};return null!=e.id&&(t.id=e.id),t}function s4(e){let t=[];for(let n=0;n=(r/=t)&&o=i)return null;let l=[];for(let t of e){let e=n===O.X?t.minX:t.minY,a=n===O.X?t.maxX:t.maxY;if(e>=r&&a=i))switch(t.type){case"Point":case"MultiPoint":!function(e,t,r,i,n){let a=[];(function(e,t,r,i,n){for(let a=0;a=r&&o<=i&&lr(t,e[a],e[a+1],e[a+2])}})(e.geometry,a,r,i,n),a.length&&t.push(s$(e.id,3===a.length?"Point":"MultiPoint",a,e.tags))}(t,l,r,i,n);continue;case"LineString":!function(e,t,r,i,n,a){let o=[];if(s9(e.geometry,o,r,i,n,!1,a.lineMetrics),o.length)if(a.lineMetrics)for(let r of o)t.push(s$(e.id,"LineString",r,e.tags));else t.push(o.length>1?s$(e.id,"MultiLineString",o,e.tags):s$(e.id,"LineString",o[0],e.tags))}(t,l,r,i,n,s);continue;case"MultiLineString":!function(e,t,r,i,n){let a=[];lt(e.geometry,a,r,i,n,!1),a.length&&t.push(1!==a.length?s$(e.id,"MultiLineString",a,e.tags):s$(e.id,"LineString",a[0],e.tags))}(t,l,r,i,n);continue;case"Polygon":!function(e,t,r,i,n){let a=[];lt(e.geometry,a,r,i,n,!0),a.length&&t.push(s$(e.id,"Polygon",a,e.tags))}(t,l,r,i,n);continue;case"MultiPolygon":!function(e,t,r,i,n){let a=[];for(let t of e.geometry){let e=[];lt(t,e,r,i,n,!0),e.length&&a.push(e)}a.length&&t.push(s$(e.id,"MultiPolygon",a,e.tags))}(t,l,r,i,n);continue}}return l.length?l:null}function s9(e,t,r,i,n,a,o){let s=le(e),l=n===O.X?li:ln,c,u,h=e.start;for(let d=0;dr&&(u=l(s,f,p,g,y,r),o&&(s.start=h+c*u)):v>i?x=r&&(u=l(s,f,p,g,y,r),b=!0),x>i&&v<=i&&(u=l(s,f,p,g,y,i),b=!0),!a&&b&&(o&&(s.end=h+c*u),t.push(s),s=le(e)),o&&(h+=c)}let d=e.points.length-3,f=e.points[d],p=e.points[d+1],m=n===O.X?f:p;m>=r&&m<=i&&lr(s.points,f,p,e.points[d+2]),d=s.points.length-3,a&&d>=3&&(s.points[d]!==s.points[0]||s.points[d+1]!==s.points[1])&&lr(s.points,s.points[0],s.points[1],s.points[2]),s.points.length&&(sX(s),t.push(s))}function le(e){return{points:[],size:e.size,start:e.start,end:e.end}}function lt(e,t,r,i,n,a){for(let o of e)s9(o,t,r,i,n,a,!1)}function lr(e,t,r,i){e.push(t,r,i)}function li(e,t,r,i,n,a){let o=(a-t)/(i-t);return lr(e.points,a,r+(n-r)*o,1),o}function ln(e,t,r,i,n,a){let o=(a-r)/(n-r);return lr(e.points,t+(i-t)*o,a,1),o}function la(e,t){let r=t.buffer/t.extent,i=e,n=s7(e,1,-1-r,r,O.X,-1,2,t),a=s7(e,1,1-r,2+r,O.X,-1,2,t);return(n||a)&&(i=s7(e,1,-r,1+r,O.X,-1,2,t)||[],n&&(i=lo(n,1).concat(i)),a&&(i=i.concat(lo(a,-1)))),i}function lo(e,t){let r=[];for(let i of e)switch(i.type){case"Point":case"MultiPoint":{let e=function(e,t){let r=[];for(let i=0;ie};class lu{constructor(e){this.options=Object.assign(Object.create(lc),e),this.trees=Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(e){let t=[];for(let r of e){if(!r.geometry)continue;let[e,i]=r.geometry.coordinates,[n,a]=[s2(e),s3(i)];t.push({id:r.id,type:"Point",geometry:[n,a],tags:r.properties})}this.createIndex(t)}initialize(e){let t=[];for(let r of e)"Point"===r.type&&t.push(r);this.createIndex(t)}updateIndex(e,t,r){this.options=Object.assign(Object.create(lc),r.clusterOptions),this.initialize(e)}createIndex(e){let{log:t,minZoom:r,maxZoom:i}=this.options;t&&console.time("total time");let n=`prepare ${e.length} points`;t&&console.time(n),this.points=e;let a=[];for(let t=0;t=r;e--){let r=Date.now();o=this.trees[e]=this.createTree(this.cluster(o,e)),t&&console.log("z%d: %d clusters in %dms",e,o.numItems,Date.now()-r)}t&&console.timeEnd("total time")}getClusters(e,t){return this.getClustersInternal(e,t).map(e=>s5(e))}getClustersInternal(e,t){let r=((e[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,e[1])),n=180===e[2]?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,n=180;else if(r>n){let e=this.getClustersInternal([r,i,180,a],t),o=this.getClustersInternal([-180,i,n,a],t);return e.concat(o)}let o=this.trees[this.limitZoom(t)],s=o.range(s2(r),s3(a),s2(n),s3(i)),l=o.flatData,c=[];for(let e of s){var u,h,d;let t=this.stride*e;c.push(l[t+5]>1?(u=l,h=t,d=this.clusterProps,{id:u[h+3],type:"Point",tags:lh(u,h,d),geometry:[u[h],u[h+1]]}):this.points[l[t+3]])}return c}getChildren(e){let t=this.getOriginId(e),r=this.getOriginZoom(e),i=Error("No cluster with the specified id: "+e),n=this.trees[r];if(!n)throw i;let a=n.flatData;if(t*this.stride>=a.length)throw i;let o=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=n.within(a[t*this.stride],a[t*this.stride+1],o),l=[];for(let t of s){var c,u,h;let r=t*this.stride;a[r+4]===e&&l.push(a[r+5]>1?(c=a,u=r,h=this.clusterProps,{type:"Feature",id:c[u+3],properties:lh(c,u,h),geometry:{type:"Point",coordinates:[s6(c[u]),s8(c[u+1])]}}):s5(this.points[a[r+3]]))}if(0===l.length)throw i;return l}getLeaves(e,t,r){let i=[];return this.appendLeaves(i,e,t=t||10,r=r||0,0),i}getTile(e,t,r){let i=this.trees[this.limitZoom(e)];if(!i)return null;let n=Math.pow(2,e),{extent:a,radius:o}=this.options,s=o/a,l=(r-s)/n,c=(r+1+s)/n,u={transformed:!0,features:[],source:null,x:t,y:r,z:e};return this.addTileFeatures(i.range((t-s)/n,l,(t+1+s)/n,c),i.flatData,t,r,n,u),0===t&&this.addTileFeatures(i.range(1-s/n,l,1,c),i.flatData,n,r,n,u),t===n-1&&this.addTileFeatures(i.range(0,l,s/n,c),i.flatData,-1,r,n,u),u}getClusterExpansionZoom(e){return this.getOriginZoom(e)}appendLeaves(e,t,r,i,n){for(let a of this.getChildren(t)){let t=a.properties;if(t?.cluster?n+t.point_count<=i?n+=t.point_count:n=this.appendLeaves(e,t.cluster_id,r,i,n):n1,l,c,u;if(s)l=lh(t,e,this.clusterProps),c=t[e],u=t[e+1];else{let r=this.points[t[e+3]];l=r.tags,[c,u]=r.geometry}let h={type:1,geometry:[[Math.round(this.options.extent*(c*n-r)),Math.round(this.options.extent*(u*n-i))]],tags:l},d;void 0!==(d=s||this.options.generateId?t[e+3]:this.points[t[e+3]].id)&&(h.id=d),a.features.push(h)}}limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}cluster(e,t){let{radius:r,extent:i,reduce:n,minPoints:a}=this.options,o=r/(i*Math.pow(2,t)),s=e.flatData,l=[],c=this.stride;for(let r=0;rt&&(f+=s[r+5])}if(f>d&&f>=a){let e,a=i*d,o=u*d,p=-1,m=(r/c<<5)+(t+1)+this.points.length;for(let i of h){let l=i*c;if(s[l+2]<=t)continue;s[l+2]=t;let u=s[l+5];a+=s[l]*u,o+=s[l+1]*u,s[l+4]=m,n&&(e||(e=this.map(s,r,!0),p=this.clusterProps.length,this.clusterProps.push(e)),n(e,this.map(s,l)))}s[r+4]=m,l.push(a/f,o/f,1/0,m,-1,f),n&&l.push(p)}else{for(let e=0;e1)for(let e of h){let r=e*c;if(!(s[r+2]<=t)){s[r+2]=t;for(let e=0;e>5}getOriginZoom(e){return(e-this.points.length)%32}map(e,t,r){if(e[t+5]>1){let i=this.clusterProps[e[t+6]];return r?Object.assign({},i):i}let i=this.points[e[t+3]].tags,n=this.options.map(i);return r&&n===i?Object.assign({},n):n}}function lh(e,t,r){let i=e[t+5],n=i>=1e4?`${Math.round(i/1e3)}k`:i>=1e3?Math.round(i/100)/10+"k":i,a=e[t+6];return Object.assign(-1===a?{}:Object.assign({},r[a]),{cluster:!0,cluster_id:e[t+3],point_count:i,point_count_abbreviated:n})}let ld="geojsonvt_clip_start",lf="geojsonvt_clip_end";function lp(e,t,r,i,n){let a=t===n.maxZoom?0:n.tolerance/((1<0&&t.size<(n?o:i))return void(r.numPoints+=t.points.length/3);let s=[];for(let e=0;eo)&&(r.numSimplified++,s.push(t.points[e],t.points[e+1])),r.numPoints++;n&&function(e,t){let r=0;for(let t=0,i=e.length,n=i-2;t0===t)for(let t=0,r=e.length;t1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(t),r.debug>1&&console.timeEnd("invalidating");let[i,n,a]=[0,0,0],o=lp(e,i,n,a,r);o.source=e;let s=lx(i,n,a);if(this.tiles[s]=o,this.tileCoords.push({z:i,x:n,y:a,id:s}),r.debug){let e=`z${i}`;this.stats[e]=(this.stats[e]||0)+1,this.total++}}getClusterExpansionZoom(e){return null}getChildren(e){return null}getLeaves(e,t,r){return null}getTile(e,t,r){let{extent:i,debug:n}=this.options,a=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);let s,l=e,c=t,u=r;for(;!s&&l>0;)l--,c>>=1,u>>=1,s=this.tiles[lx(l,c,u)];return s?.source?(n>1&&(console.log("found parent tile z%d-%d-%d",l,c,u),console.time("drilling down")),this.splitTile(s.source,l,c,u,e,t,r),n>1&&console.timeEnd("drilling down"),this.tiles[o]?lg(this.tiles[o],i):null):null}splitTile(e,t,r,i,n,a,o){let s=[e,t,r,i],l=this.options,c=l.debug;for(;s.length;){i=s.pop(),r=s.pop(),t=s.pop(),e=s.pop();let u=1<1&&console.time("creation"),d=this.tiles[h]=lp(e,t,r,i,l),this.tileCoords.push({z:t,x:r,y:i,id:h}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,i,d.numFeatures,d.numPoints,d.numSimplified),console.timeEnd("creation"));let e=`z${t}`;this.stats[e]=(this.stats[e]||0)+1,this.total++}if(d.source=e,null==n){if(t===l.indexMaxZoom||d.numPoints<=l.indexMaxPoints)continue}else{if(t===l.maxZoom||t===n)continue;if(null!=n){let e=n-t;if(r!==a>>e||i!==o>>e)continue}}if(d.source=null,!e.length)continue;c>1&&console.time("clipping");let f=.5*l.buffer/l.extent,p=.5-f,m=.5+f,g=1+f,y=null,v=null,x=null,b=null,_=s7(e,u,r-f,r+m,O.X,d.minX,d.maxX,l),w=s7(e,u,r+p,r+g,O.X,d.minX,d.maxX,l);_&&(y=s7(_,u,i-f,i+m,O.Y,d.minY,d.maxY,l),v=s7(_,u,i+p,i+g,O.Y,d.minY,d.maxY,l)),w&&(x=s7(w,u,i-f,i+m,O.Y,d.minY,d.maxY,l),b=s7(w,u,i+p,i+g,O.Y,d.minY,d.maxY,l)),c>1&&console.timeEnd("clipping"),s.push(y||[],t+1,2*r,2*i),s.push(v||[],t+1,2*r,2*i+1),s.push(x||[],t+1,2*r+1,2*i),s.push(b||[],t+1,2*r+1,2*i+1)}}invalidateTiles(e){if(!e.length)return;let t=this.options,{debug:r}=t,i=1/0,n=-1/0,a=1/0,o=-1/0;for(let t of e)i=Math.min(i,t.minX),n=Math.max(n,t.maxX),a=Math.min(a,t.minY),o=Math.max(o,t.maxY);let s=t.buffer/t.extent,l=new Set;for(let t in this.tiles){let c=this.tiles[t],u=1<=d||o=p)continue;let m=!1;for(let t of e)if(t.maxX>=h&&t.minX=f&&t.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",c.z,c.x,c.y,c.numFeatures,c.numPoints,c.numSimplified);let e=`z${c.z}`;this.stats[e]=(this.stats[e]||0)-1,this.total--}delete this.tiles[t],l.add(t)}}l.size&&(this.tileCoords=this.tileCoords.filter(e=>!l.has(e.id)))}}function lx(e,t,r){return 32*((1<e.id),this.index=e.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers))this.gradients[t.id]={};this.layoutVertexArray=new aq,this.layoutVertexArray2=new aH,this.indexArray=new aJ,this.programConfigurations=new ox(e.layers,e.zoom),this.segments=new a1,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){this.hasDependencies=o9("line",this.layers,t)||this.hasLineDasharray(this.layers);let i=this.layers[0].layout.get("line-sort-key"),n=!i.isConstant(),a=[];for(let{feature:t,id:o,index:s,sourceLayerIndex:l}of e){let e=this.layers[0]._featureFilter.needGeometry,c=oT(t,e);if(!this.layers[0]._featureFilter.filter(new nN(this.zoom),c,r))continue;let u=n?i.evaluate(c,{},r):void 0,h={id:o,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:ow(t),patterns:{},dashes:{},sortKey:u};a.push(h)}for(let i of(n&&a.sort((e,t)=>e.sortKey-t.sortKey),a)){let{geometry:n,index:a,sourceLayerIndex:o}=i;this.hasDependencies?(o9("line",this.layers,t)?se("line",this.layers,i,{zoom:this.zoom},t):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,i,this.zoom,t),this.patternFeatures.push(i)):this.addFeature(i,n,a,r,{},{},t.subdivisionGranularity),t.featureIndex.insert(e[a].feature,n,a,o,this.index)}}update(e,t,r,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r,dashPositions:i})}addFeatures(e,t,r,i){for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,t,r,i,e.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,lw)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,l_),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,ld)&&Object.hasOwn(e.properties,lf))return{start:+e.properties[ld],end:+e.properties[lf]}}addFeature(e,t,r,i,n,a,o){let s=this.layers[0].layout,l=s.get("line-join").evaluate(e,{}),c=s.get("line-cap").evaluate(e,{}),u=s.get("line-miter-limit").evaluate(e,{}),h=s.get("line-round-limit").evaluate(e,{});for(let r of(this.lineClips=this.lineFeatureClips(e),t))this.addLine(r,e,l,c,u,h,i,o);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:n,dashPositions:a,canonical:i})}addLine(e,t,r,i,n,a,o,s){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,e=s_(e,o?s.line.getGranularityForZoomLevel(o.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let t=0;t=2&&e[c-1].equals(e[c-2]);)c--;let u=0;for(;u0;if(_&&t>u){let e=f.dist(p);if(e>2*h){let t=f.sub(f.sub(p)._mult(h/e)._round());this.updateDistance(p,t),this.addCurrentVertex(t,g,0,0,d),p=t}}let T=p&&m,M=T?r:l?"butt":i;if(T&&"round"===M&&(xn&&(M="bevel"),"bevel"===M&&(x>2&&(M="flipbevel"),x100)o=y.mult(-1);else{let e=x*g.add(y).mag()/g.sub(y).mag();o._perp()._mult(e*(w?-1:1))}this.addCurrentVertex(f,o,0,0,d),this.addCurrentVertex(f,o.mult(-1),0,0,d)}else if("bevel"===M||"fakeround"===M){let e=-Math.sqrt(x*x-1),t=w?e:0,r=w?0:e;if(p&&this.addCurrentVertex(f,g,t,r,d),"fakeround"===M){let e=Math.round(180*b/Math.PI/20);for(let t=1;t2*h){let t=f.add(m.sub(f)._mult(h/e)._round());this.updateDistance(f,t),this.addCurrentVertex(t,y,0,0,d),f=t}}}}addCurrentVertex(e,t,r,i,n,a=!1){let o=t.y*i-t.x,s=-t.y-t.x*i;this.addHalfVertex(e,t.x+t.y*r,t.y-t.x*r,a,!1,r,n),this.addHalfVertex(e,o,s,a,!0,-i,n),this.distance>16384&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,t,r,i,n,a))}addHalfVertex({x:e,y:t},r,i,n,a,o,s){let l=.5*(this.lineClips?32767*this.scaledDistance:this.scaledDistance);this.layoutVertexArray.emplaceBack((e<<1)+ +!!n,(t<<1)+ +!!a,Math.round(63*r)+128,Math.round(63*i)+128,1+(0===o?0:o<0?-1:1)|(63&l)<<2,l>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let c=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,c,this.e2),s.primitiveLength++),a?this.e2=c:this.e1=c}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}hasLineDasharray(e){for(let t of e){let e=t.paint.get("line-dasharray");if(e&&!e.isConstant())return!0}return!1}addLineDashDependencies(e,t,r,i){for(let n of e){let e=n.paint.get("line-dasharray");if(!e||"constant"===e.value.kind)continue;let a="round"===n.layout.get("line-cap").evaluate(t,{}),o={dasharray:e.value.evaluate({zoom:r-1},t,{}),round:a},s={dasharray:e.value.evaluate({zoom:r},t,{}),round:a},l={dasharray:e.value.evaluate({zoom:r+1},t,{}),round:a},c=`${o.dasharray.join(",")},${o.round}`,u=`${s.dasharray.join(",")},${s.round}`,h=`${l.dasharray.join(",")},${l.round}`;i.dashDependencies[c]=o,i.dashDependencies[u]=s,i.dashDependencies[h]=l,t.dashes[n.id]={min:c,mid:u,max:h}}}}nM("LineBucket",lM,{omit:["layers","patternFeatures"]});var lk={get paint(){return g=g||new n2({"line-opacity":new nJ(e0.paint_line["line-opacity"]),"line-color":new nJ(e0.paint_line["line-color"]),"line-translate":new nK(e0.paint_line["line-translate"]),"line-translate-anchor":new nK(e0.paint_line["line-translate-anchor"]),"line-width":new nJ(e0.paint_line["line-width"]),"line-gap-width":new nJ(e0.paint_line["line-gap-width"]),"line-offset":new nJ(e0.paint_line["line-offset"]),"line-blur":new nJ(e0.paint_line["line-blur"]),"line-dasharray":new nQ(e0.paint_line["line-dasharray"]),"line-pattern":new nQ(e0.paint_line["line-pattern"]),"line-gradient":new n1(e0.paint_line["line-gradient"])})},get layout(){return m=m||new n2({"line-cap":new nJ(e0.layout_line["line-cap"]),"line-join":new nJ(e0.layout_line["line-join"]),"line-miter-limit":new nJ(e0.layout_line["line-miter-limit"]),"line-round-limit":new nJ(e0.layout_line["line-round-limit"]),"line-sort-key":new nJ(e0.layout_line["line-sort-key"])})}};class lA extends nJ{possiblyEvaluate(e,t){return t=new nN(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,zoomHistory:t.zoomHistory,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,r,i){return t=eb({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,r,i)}}class lS extends n4{constructor(e,t){super(e,lk,t),this.gradientVersion=0,y||((y=new lA(lk.paint.properties["line-width"].specification)).useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if("line-gradient"===e){let e=this.gradientExpression();this.stepInterpolant=void 0!==e._styleExpression&&e._styleExpression.expression instanceof ru,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,t){super.recalculate(e,t),this.paint._values["line-floorwidth"]=y.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new lM(e)}queryRadius(e){var t,r;return t=oz("line-width",this,e),((r=oz("line-gap-width",this,e))>0?r+2*t:t)/2+Math.abs(oz("line-offset",this,e))+oD(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a}){var o,s;let l=oO(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-n.bearingInRadians,a),c=a/2*(o=this.paint.get("line-width").evaluate(t,r),(s=this.paint.get("line-gap-width").evaluate(t,r))>0?s+2*o:o),u=this.paint.get("line-offset").evaluate(t,r);return u&&(i=function(e,t){let r=[];for(let i of e){let e=function(e){let t=[];for(let r=0;r=3){for(let t of i)if(oI(e,t))return!0}if(function(e,t,r){if(e.length>1){if(oE(e,t))return!0;for(let i of t)if(oC(i,e,r))return!0}for(let i of e)if(oC(i,t,r))return!0;return!1}(e,i,r))return!0}return!1}(l,i,c)}isTileClipped(){return!0}}let lE=at([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),lC=at([{name:"a_projected_pos",components:3,type:"Float32"}],4);at([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let lL=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"}]);let lP=at([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),lI=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"}]),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"}]),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"}]);let lz={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","\xa2":"¢","\xa3":"£","\xa5":"¥","\xa6":"¦","\xac":"¬","\xaf":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","⋯":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},lD={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},lO={40:!0};function lR(e,t,r,i,n,a){if("fontStack"in t){let i=r[t.fontStack],a=i?.[e];return a?a.metrics.advance*t.scale+n:0}{let e=i[t.imageName];return e?e.displaySize[0]*t.scale*24/a+n:0}}function lF(e,t,r,i){let n=Math.pow(e-t,2);return i?eMath.max(e,this.sections[t].scale),0)}getMaxImageSize(e){let t=0,r=0;for(let i=0;ir))}addImageSection(e){let t=e.image?e.image.name:"";if(0===t.length)return void eA("Can't add FormattedSection with an empty image.");let r=this.getNextImageSectionCharCode();r?(this.text+=String.fromCharCode(r),this.sections.push({scale:1,verticalAlign:e.verticalAlign||"bottom",imageName:t}),this.sectionIndex.push(this.sections.length-1)):eA("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(e,t,r,i,n){let a=[],o=this.determineAverageLineWidth(e,t,r,i,n),s=this.hasZeroWidthSpaces(),l=0,c=0,u=this.text[Symbol.iterator](),h=u.next(),d=this.text[Symbol.iterator]();d.next();let f=d.next(),p=this.text[Symbol.iterator]();p.next(),p.next();let m=p.next();for(;!h.done;){let t=this.getSection(c),g=h.value.codePointAt(0);if(nI(g)||(l+=lR(g,t,r,i,e,n)),!f.done){let e=/[\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(g)),r=f.value.codePointAt(0);(lD[g]||e||"imageName"in t||!m.done&&lO[r])&&a.push(lj(c+1,l,o,a,function(e,t,r){let i=0;return 10===e&&(i-=1e4),r&&(i+=150),40!==e&&65288!==e||(i+=50),41!==t&&65289!==t||(i+=50),i}(g,r,e&&s),!1))}c++,h=u.next(),f=d.next(),m=p.next()}return function e(t){return t?e(t.priorBreak).concat(t.index):[]}(lj(this.length(),l,o,a,0,!0))}determineAverageLineWidth(e,t,r,i,n){let a=0,o=0;for(let t of this.text){let s=this.getSection(o);a+=lR(t.codePointAt(0),s,r,i,e,n),o++}return a/Math.max(1,Math.ceil(a/t))}}let lN=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class lU{constructor(e=new Uint8Array(16)){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(e,t,r=this.length){for(;this.pos>3,n=this.pos;this.type=7&r,e(i,t,this),this.pos===n&&this.skip(r)}return t}readMessage(e,t){return this.readFields(e,t,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)+0x100000000*this.dataView.getUint32(this.pos+4,!0);return this.pos+=8,e}readSFixed64(){let e=this.dataView.getUint32(this.pos,!0)+0x100000000*this.dataView.getInt32(this.pos+4,!0);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 t=this.buf,r,i;return r=127&(i=t[this.pos++]),i<128?r:(r|=(127&(i=t[this.pos++]))<<7,i<128?r:(r|=(127&(i=t[this.pos++]))<<14,i<128?r:(r|=(127&(i=t[this.pos++]))<<21,i<128?r:function(e,t,r){let i=r.buf,n,a;if(n=(112&(a=i[r.pos++]))>>4,a<128||(n|=(127&(a=i[r.pos++]))<<3,a<128)||(n|=(127&(a=i[r.pos++]))<<10,a<128)||(n|=(127&(a=i[r.pos++]))<<17,a<128)||(n|=(127&(a=i[r.pos++]))<<24,a<128)||(n|=(1&(a=i[r.pos++]))<<31,a<128)){var o,s;return o=e,s=n,t?0x100000000*s+(o>>>0):0x100000000*(s>>>0)+(o>>>0)}throw Error("Expected varint not more than 10 bytes")}(r|=(15&(i=t[this.pos]))<<28,e,this))))}readVarint64(){return this.readVarint(!0)}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,t=this.pos;return this.pos=e,e-t>=12&&lN?lN.decode(this.buf.subarray(t,e)):function(e,t,r){let i="",n=t;for(;n239?4:t>223?3:t>191?2:1;if(n+c>r)break;1===c?t<128&&(l=t):2===c?(192&(a=e[n+1]))==128&&(l=(31&t)<<6|63&a)<=127&&(l=null):3===c?(a=e[n+1],o=e[n+2],(192&a)==128&&(192&o)==128&&((l=(15&t)<<12|(63&a)<<6|63&o)<=2047||l>=55296&&l<=57343)&&(l=null)):4===c&&(a=e[n+1],o=e[n+2],s=e[n+3],(192&a)==128&&(192&o)==128&&(192&s)==128&&((l=(15&t)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,c=1):l>65535&&(l-=65536,i+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),i+=String.fromCharCode(l),n+=c}return i}(this.buf,t,e)}readBytes(){let e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t}readPackedVarint(e=[],t){let r=this.readPackedEnd();for(;this.pos127;);else if(2===t)this.pos=this.readVarint()+this.pos;else if(5===t)this.pos+=4;else{if(1!==t)throw Error(`Unimplemented type: ${t}`);this.pos+=8}}writeTag(e,t){this.writeVarint(e<<3|t)}realloc(e){let t=this.length||16;for(;t0xfffffff||e<0?function(e,t){var r,i;let n,a,o;if(e>=0?(n=e%0x100000000|0,a=e/0x100000000|0):(n=~(-e%0x100000000),a=~(-e/0x100000000),0xffffffff^n?n=n+1|0:(n=0,a=a+1|0)),e>=0xffffffffffffffff||e<-0xffffffffffffffff)throw Error("Given varint doesn't fit into 10 bytes");t.realloc(10),r=n,t.buf[t.pos++]=127&r|128,r>>>=7,t.buf[t.pos++]=127&r|128,r>>>=7,t.buf[t.pos++]=127&r|128,r>>>=7,t.buf[t.pos++]=127&r|128,t.buf[t.pos]=127&(r>>>=7),o=(7&(i=a))<<4,t.buf[t.pos++]|=o|128*!!(i>>>=3),i&&(t.buf[t.pos++]=127&i|128*!!(i>>>=7),i&&(t.buf[t.pos++]=127&i|128*!!(i>>>=7),i&&(t.buf[t.pos++]=127&i|128*!!(i>>>=7),i&&(t.buf[t.pos++]=127&i|128*!!(i>>>=7),i&&(t.buf[t.pos++]=127&i)))))}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|128*(e>127),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|128*(e>127),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|128*(e>127),e<=127||(this.buf[this.pos++]=e>>>7&127))))}writeSVarint(e){this.writeVarint(e<0?-(2*e)-1:2*e)}writeBoolean(e){this.writeVarint(+e)}writeString(e){e=String(e),this.realloc(4*e.length),this.pos++;let t=this.pos;this.pos=function(e,t,r){for(let i,n,a=0;a55295&&i<57344){if(!n){i>56319||a+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):n=i;continue}if(i<56320){e[r++]=239,e[r++]=191,e[r++]=189,n=i;continue}i=n-55296<<10|i-56320|65536,n=null}else n&&(e[r++]=239,e[r++]=191,e[r++]=189,n=null);i<128?e[r++]=i:(i<2048?e[r++]=i>>6|192:(i<65536?e[r++]=i>>12|224:(e[r++]=i>>18|240,e[r++]=i>>12&63|128),e[r++]=i>>6&63|128),e[r++]=63&i|128)}return r}(this.buf,e,this.pos);let r=this.pos-t;r>=128&&lV(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r}writeFloat(e){this.realloc(4),this.dataView.setFloat32(this.pos,e,!0),this.pos+=4}writeDouble(e){this.realloc(8),this.dataView.setFloat64(this.pos,e,!0),this.pos+=8}writeBytes(e){let t=e.length;this.writeVarint(t),this.realloc(t);for(let r=0;r=128&&lV(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i}writeMessage(e,t,r){this.writeTag(e,2),this.writeRawMessage(t,r)}writePackedVarint(e,t){t.length&&this.writeMessage(e,lq,t)}writePackedSVarint(e,t){t.length&&this.writeMessage(e,lH,t)}writePackedBoolean(e,t){t.length&&this.writeMessage(e,lY,t)}writePackedFloat(e,t){t.length&&this.writeMessage(e,lG,t)}writePackedDouble(e,t){t.length&&this.writeMessage(e,lW,t)}writePackedFixed32(e,t){t.length&&this.writeMessage(e,lZ,t)}writePackedSFixed32(e,t){t.length&&this.writeMessage(e,l$,t)}writePackedFixed64(e,t){t.length&&this.writeMessage(e,lX,t)}writePackedSFixed64(e,t){t.length&&this.writeMessage(e,lK,t)}writeBytesField(e,t){this.writeTag(e,2),this.writeBytes(t)}writeFixed32Field(e,t){this.writeTag(e,5),this.writeFixed32(t)}writeSFixed32Field(e,t){this.writeTag(e,5),this.writeSFixed32(t)}writeFixed64Field(e,t){this.writeTag(e,1),this.writeFixed64(t)}writeSFixed64Field(e,t){this.writeTag(e,1),this.writeSFixed64(t)}writeVarintField(e,t){this.writeTag(e,0),this.writeVarint(t)}writeSVarintField(e,t){this.writeTag(e,0),this.writeSVarint(t)}writeStringField(e,t){this.writeTag(e,2),this.writeString(t)}writeFloatField(e,t){this.writeTag(e,5),this.writeFloat(t)}writeDoubleField(e,t){this.writeTag(e,1),this.writeDouble(t)}writeBooleanField(e,t){this.writeVarintField(e,+t)}}function lV(e,t,r){let i=t<=16383?1:t<=2097151?2:t<=0xfffffff?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(i);for(let t=r.pos-1;t>=e;t--)r.buf[t+i]=r.buf[t]}function lq(e,t){for(let r=0;rt.h-e.h);let i=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}],n=0,a=0;for(let t of e)for(let e=i.length-1;e>=0;e--){let r=i[e];if(!(t.w>r.w||t.h>r.h)){if(t.x=r.x,t.y=r.y,a=Math.max(a,t.y+t.h),n=Math.max(n,t.x+t.w),t.w===r.w&&t.h===r.h){let t=i.pop();t&&eg.toCodeUnitIndex(e)),x(g.toString(),v))){let t=[...e].map(()=>0);y.push(new lB(e,g.sections,t))}else if(b){y=[],v=v.map(e=>g.toCodeUnitIndex(e));let e=0,t=[];for(let r of g.text)t.push(...Array(r.length).fill(g.sectionIndex[e])),e++;for(let e of b(g.text,t,v)){let t=[],r="";for(let i of e[0])t.push(e[1][r.length]),r+=i;y.push(new lB(e[0],g.sections,t))}}else y=function(e,t){let r=[],i=0;for(let n of t)r.push(e.substring(i,n)),i=n;return ic){let e=Math.ceil(a/c);n*=e/o,o=e}return{x1:i,y1:n,x2:i+a,y2:n+o}}function l7(e,t,r,i,n,a){let o=e.image,s;if(o.content){let e=o.content,t=o.pixelRatio||1;s=[e[0]/t,e[1]/t,o.displaySize[0]-e[2]/t,o.displaySize[1]-e[3]/t]}let l=t.left*a,c=t.right*a,u,h,d,f;"width"===r||"both"===r?(f=n[0]+l-i[3],h=n[0]+c+i[1]):h=(f=n[0]+(l+c-o.displaySize[0])/2)+o.displaySize[0];let p=t.top*a,m=t.bottom*a;return"height"===r||"both"===r?(u=n[1]+p-i[0],d=n[1]+m+i[2]):d=(u=n[1]+(p+m-o.displaySize[1])/2)+o.displaySize[1],{image:o,top:u,right:h,bottom:d,left:f,collisionPadding:s}}function l9(e,t){let{expression:r}=t;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new nN(e+1))};if("source"===r.kind)return{kind:"source"};{let{zoomStops:t,interpolationType:i}=r,n=0;for(;ne.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=l9(this.zoom,r["text-size"]),this.iconSizeData=l9(this.zoom,r["icon-size"]);let i=this.layers[0].layout,n=i.get("symbol-sort-key"),a=i.get("symbol-z-order");this.canOverlap="never"!==ce(i,"text-overlap","text-allow-overlap")||"never"!==ce(i,"icon-overlap","icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==a&&!n.isConstant(),this.sortFeaturesByY=("viewport-y"===a||"auto"===a&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map(t=>e.ax[t])),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.sourceID=t.sourceID}createArrays(){this.text=new cn(new ox(this.layers,this.zoom,e=>e.startsWith("text"))),this.icon=new cn(new ox(this.layers,this.zoom,e=>e.startsWith("icon"))),this.glyphOffsetArray=new az,this.lineVertexArray=new aD,this.symbolInstances=new aI,this.textAnchorOffsets=new aR}calculateGlyphDependencies(e,t,r,i,n){for(let a of e)if(t[a.codePointAt(0)]=!0,(r||i)&&n){let e=lz[a];e&&(t[e.codePointAt(0)]=!0)}}populate(t,r,i){var n;let a=this.layers[0],o=a.layout,s=o.get("text-font"),l=o.get("text-field"),c=o.get("icon-image"),u=("constant"!==l.value.kind||l.value.value instanceof tX&&!l.value.value.isEmpty()||l.value.value.toString().length>0)&&("constant"!==s.value.kind||s.value.value.length>0),h="constant"!==c.value.kind||!!c.value.value||Object.keys(c.parameters).length>0,d=o.get("symbol-sort-key");if(this.features=[],!u&&!h)return;let f=r.iconDependencies,p=r.glyphDependencies,m=r.availableImages,g=new nN(this.zoom);for(let{feature:r,id:l,index:c,sourceLayerIndex:y}of t){let t,v,x=a._featureFilter.needGeometry,b=oT(r,x);if(!a._featureFilter.filter(g,b,i))continue;if(x||(b.geometry=ow(r)),u){let e=a.getValueAndResolveTokens("text-field",b,i,m),r=tX.factory(e);this.hasRTLText||(this.hasRTLText=function(e){for(let t of e.sections)if(function(e){for(let t of e)if(nj(t.codePointAt(0)))return!0;return!1}(t.text))return!0;return!1}(r)),(!this.hasRTLText||"unavailable"===nB.getRTLTextPluginStatus()||this.hasRTLText&&nB.isParsed())&&(t=function(e,t,r){for(let i of e.sections)i.text=function(e,t,r){let i=t.layout.get("text-transform").evaluate(r,{});return"uppercase"===i?e=e.toLocaleUpperCase():"lowercase"===i&&(e=e.toLocaleLowerCase()),nB.applyArabicShaping&&(e=nB.applyArabicShaping(e)),e}(i.text,t,r);return e}(r,a,b))}if(h){let e=a.getValueAndResolveTokens("icon-image",b,i,m);v=e instanceof t3?e:t3.fromString(e)}if(!t&&!v)continue;let _=this.sortFeaturesByKey?d.evaluate(b,{},i):void 0;if(this.features.push({id:l,text:t,icon:v,index:c,sourceLayerIndex:y,geometry:b.geometry,properties:r.properties,type:sL.types[r.type],sortKey:_}),v&&(f[v.name]=!0),t){let r=s.evaluate(b,{},i).join(","),a="viewport"!==o.get("text-rotation-alignment")&&"point"!==o.get("symbol-placement");for(let i of(this.allowVerticalPlacement=null==(n=this.writingModes)?void 0:n.includes(e.ax.vertical),t.sections))if(i.image)f[i.image.name]=!0;else{let e=nz(t.toString()),n=i.fontStack||r;p[n]||(p[n]={}),this.calculateGlyphDependencies(i.text,p[n],a,this.allowVerticalPlacement,e)}}}"line"===o.get("symbol-placement")&&(this.features=function(e){let t={},r={},i=[],n=0;function a(t){i.push(e[t]),n++}function o(e,t,n){let a=r[e];return delete r[e],r[t]=a,i[a].geometry[0].pop(),i[a].geometry[0]=i[a].geometry[0].concat(n[0]),a}function s(e,r,n){let a=t[r];return delete t[r],t[e]=a,i[a].geometry[0].shift(),i[a].geometry[0]=n[0].concat(i[a].geometry[0]),a}function l(e,t,r){let i=r?t[0][t[0].length-1]:t[0][0];return`${e}:${i.x}:${i.y}`}for(let c=0;ce.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((e,t)=>e.sortKey-t.sortKey)}update(e,t,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,{imagePositions:r}),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,{imagePositions:r}))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}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,t){let r=this.lineVertexArray.length;if(void 0!==e.segment){let r=e.dist(t[e.segment+1]),i=e.dist(t[e.segment]),n={};for(let i=e.segment+1;i=0;r--)n[r]={x:t[r].x,y:t[r].y,tileUnitDistanceFromAnchor:i},r>0&&(i+=t[r-1].dist(t[r]));for(let e=0;e0}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,t){let r=e.placedSymbolArray.get(t),i=r.vertexStartIndex+4*r.numGlyphs;for(let t=r.vertexStartIndex;ti[e]-i[t]||n[t]-n[e]),a}addToSortKeyRanges(e,t){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];r?.sortKey===t?r.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,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)){for(let t of(this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[],this.symbolInstanceIndexes)){let e=this.symbolInstances.get(t);this.featureSortOrder.push(e.featureIndex);let r=[e.rightJustifiedTextSymbolIndex,e.centerJustifiedTextSymbolIndex,e.leftJustifiedTextSymbolIndex];for(let e=0;e=0&&r.indexOf(t)===e&&this.addIndicesForPlacedSymbol(this.text,t)}e.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,e.verticalPlacedTextSymbolIndex),e.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.placedIconSymbolIndex),e.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}nM("SymbolBucket",co,{omit:["layers","collisionBoxArray","features","compareText"]}),co.MAX_GLYPHS=65535,co.addDynamicAttributes=ci;var cs={get paint(){return x=x||new n2({"icon-opacity":new nJ(e0.paint_symbol["icon-opacity"]),"icon-color":new nJ(e0.paint_symbol["icon-color"]),"icon-halo-color":new nJ(e0.paint_symbol["icon-halo-color"]),"icon-halo-width":new nJ(e0.paint_symbol["icon-halo-width"]),"icon-halo-blur":new nJ(e0.paint_symbol["icon-halo-blur"]),"icon-translate":new nK(e0.paint_symbol["icon-translate"]),"icon-translate-anchor":new nK(e0.paint_symbol["icon-translate-anchor"]),"text-opacity":new nJ(e0.paint_symbol["text-opacity"]),"text-color":new nJ(e0.paint_symbol["text-color"],{runtimeType:ts,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new nJ(e0.paint_symbol["text-halo-color"]),"text-halo-width":new nJ(e0.paint_symbol["text-halo-width"]),"text-halo-blur":new nJ(e0.paint_symbol["text-halo-blur"]),"text-translate":new nK(e0.paint_symbol["text-translate"]),"text-translate-anchor":new nK(e0.paint_symbol["text-translate-anchor"])})},get layout(){return v=v||new n2({"symbol-placement":new nK(e0.layout_symbol["symbol-placement"]),"symbol-spacing":new nK(e0.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new nK(e0.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new nJ(e0.layout_symbol["symbol-sort-key"]),"symbol-z-order":new nK(e0.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new nK(e0.layout_symbol["icon-allow-overlap"]),"icon-overlap":new nK(e0.layout_symbol["icon-overlap"]),"icon-ignore-placement":new nK(e0.layout_symbol["icon-ignore-placement"]),"icon-optional":new nK(e0.layout_symbol["icon-optional"]),"icon-rotation-alignment":new nK(e0.layout_symbol["icon-rotation-alignment"]),"icon-size":new nJ(e0.layout_symbol["icon-size"]),"icon-text-fit":new nK(e0.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new nK(e0.layout_symbol["icon-text-fit-padding"]),"icon-image":new nJ(e0.layout_symbol["icon-image"]),"icon-rotate":new nJ(e0.layout_symbol["icon-rotate"]),"icon-padding":new nJ(e0.layout_symbol["icon-padding"]),"icon-keep-upright":new nK(e0.layout_symbol["icon-keep-upright"]),"icon-offset":new nJ(e0.layout_symbol["icon-offset"]),"icon-anchor":new nJ(e0.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new nK(e0.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new nK(e0.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new nK(e0.layout_symbol["text-rotation-alignment"]),"text-field":new nJ(e0.layout_symbol["text-field"]),"text-font":new nJ(e0.layout_symbol["text-font"]),"text-size":new nJ(e0.layout_symbol["text-size"]),"text-max-width":new nJ(e0.layout_symbol["text-max-width"]),"text-line-height":new nK(e0.layout_symbol["text-line-height"]),"text-letter-spacing":new nJ(e0.layout_symbol["text-letter-spacing"]),"text-justify":new nJ(e0.layout_symbol["text-justify"]),"text-radial-offset":new nJ(e0.layout_symbol["text-radial-offset"]),"text-variable-anchor":new nK(e0.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new nJ(e0.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new nJ(e0.layout_symbol["text-anchor"]),"text-max-angle":new nK(e0.layout_symbol["text-max-angle"]),"text-writing-mode":new nK(e0.layout_symbol["text-writing-mode"]),"text-rotate":new nJ(e0.layout_symbol["text-rotate"]),"text-padding":new nK(e0.layout_symbol["text-padding"]),"text-keep-upright":new nK(e0.layout_symbol["text-keep-upright"]),"text-transform":new nJ(e0.layout_symbol["text-transform"]),"text-offset":new nJ(e0.layout_symbol["text-offset"]),"text-allow-overlap":new nK(e0.layout_symbol["text-allow-overlap"]),"text-overlap":new nK(e0.layout_symbol["text-overlap"]),"text-ignore-placement":new nK(e0.layout_symbol["text-ignore-placement"]),"text-optional":new nK(e0.layout_symbol["text-optional"])})}};class cl{constructor(e){if(void 0===e.property.overrides)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:ti,this.defaultValue=e}evaluate(e){if(e.formattedSection){let t=this.defaultValue.property.overrides;if(t?.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}nM("FormatSectionOverride",cl,{omit:["defaultValue"]});class cc extends n4{constructor(e,t){super(e,cs,t)}recalculate(e,t){if(super.recalculate(e,t),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){let e=this.layout.get("text-writing-mode");if(e){let t=[];for(let r of e)t.includes(r)||t.push(r);this.layout._values["text-writing-mode"]=t}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,t,r,i){var n;let a=this.layout.get(e).evaluate(t,{},r,i),o=this._unevaluatedLayout._values[e];return o.isDataDriven()||iI(o.value)||!a?a:(n=t.properties,a.replace(/{([^{}]+)}/g,(e,t)=>n&&t in n?String(n[t]):""))}createBucket(e){return new co(e)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let e of cs.paint.overridableProperties){if(!cc.hasPaintOverride(this.layout,e))continue;let t=this.paint.get(e),r=new iP(new cl(t),t.property.specification),i=null;i="constant"===t.value.kind||"source"===t.value.kind?new iD("source",r):new iO("composite",r,t.value.zoomStops),this.paint._values[e]=new n$(t.property,i,t.parameters)}}_handleOverridablePaintPropertyUpdate(e,t,r){return!(!this.layout||t.isDataDriven()||r.isDataDriven())&&cc.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,t){let r=e.get("text-field"),i=cs.paint.properties[t],n=!1,a=e=>{var t;for(let r of e)if(null!=(t=i.overrides)&&t.hasOverride(r))return void(n=!0)};if("constant"===r.value.kind&&r.value.value instanceof tX)a(r.value.value.sections);else if("source"===r.value.kind||"composite"===r.value.kind){let e=t=>{n||(t instanceof t9&&t8(t.value)===td?a(t.value.sections):t instanceof rI?a(t.sections):t.eachChild(e))},t=r.value;t._styleExpression&&e(t._styleExpression.expression)}return n}}var cu={get paint(){return b=b||new n2({"background-color":new nK(e0.paint_background["background-color"]),"background-pattern":new n0(e0.paint_background["background-pattern"]),"background-opacity":new nK(e0.paint_background["background-opacity"])})}};class ch extends n4{constructor(e,t){super(e,cu,t)}}class cd extends n4{constructor(e,t){super(e,{},t),this.onAdd=e=>{this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)},this.onRemove=e=>{this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)},this.implementation=e}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}}class cf{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,null==(e=this._channel)||e.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let cp={once:!0};class cm{constructor(e,t){if(isNaN(e)||isNaN(t))throw Error(`Invalid LngLat object: (${e}, ${t})`);if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new cm(ex(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){let t=Math.PI/180,r=this.lat*t,i=e.lat*t;return 6371008.8*Math.acos(Math.min(Math.sin(r)*Math.sin(i)+Math.cos(r)*Math.cos(i)*Math.cos((e.lng-this.lng)*t),1))}static convert(e){if(e instanceof cm)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new cm(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new cm(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 [, ]")}}let cg=2*Math.PI*6371008.8;function cy(e){return cg*Math.cos(e*Math.PI/180)}function cv(e){return(180+e)/360}function cx(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function cb(e){return 360*e-180}function c_(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}function cw(e,t){return e*cy(c_(t))}class cT{constructor(e,t,r=0){this.x=+e,this.y=+t,this.z=+r}static fromLngLat(e,t=0){let r=cm.convert(e);return new cT(cv(r.lng),cx(r.lat),t/cy(r.lat))}toLngLat(){return new cm(cb(this.x),c_(this.y))}toAltitude(){return cw(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/cg*(1/Math.cos(c_(this.y)*Math.PI/180))}}function cM(e,t,r){var i=2*Math.PI*6378137/256/Math.pow(2,r);return[e*i-2*Math.PI*6378137/2,t*i-2*Math.PI*6378137/2]}class ck{constructor(e,t,r){if(!function(e,t,r){return!(e<0||e>25||r<0||r>=Math.pow(2,e)||t<0||t>=Math.pow(2,e))}(e,t,r))throw Error(`x=${t}, y=${r}, z=${e} outside of bounds. 0<=x<${Math.pow(2,e)}, 0<=y<${Math.pow(2,e)} 0<=z<=25 `);this.z=e,this.x=t,this.y=r,this.key=cE(0,e,e,t,r)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t,r){var i,n,a,o,s;let l=(n=this.y,a=this.z,o=cM(256*(i=this.x),256*(n=Math.pow(2,a)-n-1),a),s=cM(256*(i+1),256*(n+1),a),o[0]+","+o[1]+","+s[0]+","+s[1]),c=function(e,t,r){let i="";for(let n=e;n>0;n--){let e=1<1?"@2x":"").replace(/{quadkey}/g,c).replace(/{bbox-epsg-3857}/g,l)}isChildOf(e){let t=this.z-e.z;return t>0&&e.x===this.x>>t&&e.y===this.y>>t}getTilePoint(e){let t=Math.pow(2,this.z);return new w((e.x*t-this.x)*8192,(e.y*t-this.y)*8192)}toString(){return`${this.z}/${this.x}/${this.y}`}}class cA{constructor(e,t){this.wrap=e,this.canonical=t,this.key=cE(e,t.z,t.z,t.x,t.y)}}class cS{constructor(e,t,r,i,n){if(this.terrainRttPosMatrix32f=null,e= z; overscaledZ = ${e}; z = ${r}`);this.overscaledZ=e,this.wrap=t,this.canonical=new ck(r,+i,+n),this.key=cE(t,e,r,i,n)}clone(){return new cS(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 t=this.canonical.z-e;return e>this.canonical.z?new cS(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new cS(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(e,t){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?cE(this.wrap*t,e,this.canonical.z,this.canonical.x,this.canonical.y):cE(this.wrap*t,e,e,this.canonical.x>>r,this.canonical.y>>r)}isChildOf(e){if(e.wrap!==this.wrap||this.overscaledZ-e.overscaledZ<=0)return!1;if(0===e.overscaledZ)return this.overscaledZ>0;let t=this.canonical.z-e.canonical.z;return!(t<0)&&e.canonical.x===this.canonical.x>>t&&e.canonical.y===this.canonical.y>>t}children(e){if(this.overscaledZ>=e)return[new cS(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let t=this.canonical.z+1,r=2*this.canonical.x,i=2*this.canonical.y;return[new cS(t,this.wrap,t,r,i),new cS(t,this.wrap,t,r+1,i),new cS(t,this.wrap,t,r,i+1),new cS(t,this.wrap,t,r+1,i+1)]}isLessThan(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.y=0&&e=0&&t=o)return null;let l=this.canonical.x+i,c=this.wrap;return l<0?(c-=Math.ceil(-l/o),l=(l%o+o)%o):l>=o&&(c+=Math.floor(l/o),l%=o),{tileID:new cS(this.overscaledZ,c,a,l,s),x:e-i*r,y:t-n*r}}}function cE(e,t,r,i,n){(e*=2)<0&&(e=-1*e-1);let a=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(e){return this.expandBy(-e)}map(e){let t=new cC;return t.extend(e(new w(this.minX,this.minY))),t.extend(e(new w(this.maxX,this.minY))),t.extend(e(new w(this.minX,this.maxY))),t.extend(e(new w(this.maxX,this.maxY))),t}static fromPoints(e){let t=new cC;for(let r of e)t.extend(r);return t}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}}class cL{constructor(e){this._stringToNumber={},this._numberToString=[];for(let t=0;t=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]}}class cP{constructor(e,t,r,i,n){this.type="Feature",this._vectorTileFeature=e,this._x=r,this._y=i,this._z=t,this.properties=e.properties,this.id=n}projectPoint(e,t,r,i){return[360*(e.x+t)/i-180,360/Math.PI*Math.atan(Math.exp((1-2*(e.y+r)/i)*Math.PI))-90]}projectLine(e,t,r,i){return e.map(e=>this.projectPoint(e,t,r,i))}get geometry(){if(this._geometry)return this._geometry;let e=this._vectorTileFeature,t=e.extent*Math.pow(2,this._z),r=e.extent*this._x,i=e.extent*this._y,n=e.loadGeometry();switch(e.type){case 1:{let e=[];for(let t of n)e.push(t[0]);let a=this.projectLine(e,r,i,t);this._geometry=1===e.length?{type:"Point",coordinates:a[0]}:{type:"MultiPoint",coordinates:a};break}case 2:{let e=n.map(e=>this.projectLine(e,r,i,t));this._geometry=1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e};break}case 3:{let e=sI(n),a=[];for(let n of e)a.push(n.map(e=>this.projectLine(e,r,i,t)));this._geometry=1===a.length?{type:"Polygon",coordinates:a[0]}:{type:"MultiPolygon",coordinates:a};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 t in this)"_geometry"!==t&&"_vectorTileFeature"!==t&&"_x"!==t&&"_y"!==t&&"_z"!==t&&(e[t]=this[t]);return e}}class cI{constructor(e,t,r){this._name=e,this.dataBuffer=t,"number"==typeof r?this._size=r:(this.nullabilityBuffer=r,this._size=r.size())}getValue(e){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(e)?null:this.getValueFromBuffer(e)}has(e){var t;return(null==(t=this.nullabilityBuffer)?void 0:t.get(e))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class cz extends cI{}class cD extends cz{getValueFromBuffer(e){return this.dataBuffer[e]}}class cO extends cz{getValueFromBuffer(e){return this.dataBuffer[e]}}class cR extends cI{constructor(e,t,r,i){super(e,t,i),this.delta=r}}class cF extends cR{constructor(e,t,r,i){super(e,Int32Array.of(t),r,i)}getValueFromBuffer(e){return this.dataBuffer[0]+e*this.delta}}class cj extends cI{constructor(e,t,r,i){super(e,i?Int32Array.of(t):Uint32Array.of(t),r)}getValueFromBuffer(e){return this.dataBuffer[0]}}class cB{constructor(e,t,r,i,n=4096){this._name=e,this._geometryVector=t,this._idVector=r,this._propertyVectors=i,this._extent=n}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(e){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map(e=>[e.name,e]))),this.propertyVectorsMap.get(e)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let e=[],t=this.geometryVector.getGeometries();for(let r=0;r>>32-e;let cV=function(){var e;if(!Number.isFinite(65536))return 65536;let t=(e=Math.floor(65536))-e%256;return 0===t?256:t}(),cq=3*cV/256+cV|0;function cH(){let e=new Uint8Array(cq);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 cG(e,t,r){let i=new Uint32Array(r),n=0,a=t.get();for(let t=0;t=64)throw Error("Varint too long")}return t.set(n),r}(e,t);return i}function cY(e){return e>>>1^-(1&e)}function cZ(e){return e>>BigInt("1")^-(BigInt("1")&e)}function c$(e){return e%2==1?-((e+1)/2):e/2}function cX(e,t,r){if(void 0===r){r=0;for(let i=0;i=4)for(;i=4)for(;i=4)for(let i=e[0];r>4],n=null;switch(i){case B.DATA:n={dictionaryType:Object.values(N)[15&r]};break;case B.OFFSET:n={offsetType:Object.values(U)[15&r]};break;case B.LENGTH:n={lengthType:Object.values(V)[15&r]}}t.increment();let a=e[t.get()],o=Object.values(F)[a>>5],s=Object.values(F)[a>>2&7],l=Object.values(j)[3&a];t.increment();let c=cG(e,t,2),u=c[0];return{physicalStreamType:i,logicalStreamType:n,logicalLevelTechnique1:o,logicalLevelTechnique2:s,physicalLevelTechnique:l,numValues:u,byteLength:c[1],decompressedCount:u}}(e,t);return n.logicalLevelTechnique1===F.MORTON?(r=cG(e,t,2),{physicalStreamType:n.physicalStreamType,logicalStreamType:n.logicalStreamType,logicalLevelTechnique1:n.logicalLevelTechnique1,logicalLevelTechnique2:n.logicalLevelTechnique2,physicalLevelTechnique:n.physicalLevelTechnique,numValues:n.numValues,byteLength:n.byteLength,decompressedCount:n.decompressedCount,numBits:r[0],coordinateShift:r[1]}):F.RLE!==n.logicalLevelTechnique1&&F.RLE!==n.logicalLevelTechnique2||j.NONE===n.physicalLevelTechnique?n:(i=cG(e,t,2),{physicalStreamType:n.physicalStreamType,logicalStreamType:n.logicalStreamType,logicalLevelTechnique1:n.logicalLevelTechnique1,logicalLevelTechnique2:n.logicalLevelTechnique2,physicalLevelTechnique:n.physicalLevelTechnique,numValues:n.numValues,byteLength:n.byteLength,decompressedCount:i[1],runs:i[0],numRleValues:i[1]})}(S=B||(B={})).PRESENT="PRESENT",S.DATA="DATA",S.OFFSET="OFFSET",S.LENGTH="LENGTH",(E=N||(N={})).NONE="NONE",E.SINGLE="SINGLE",E.SHARED="SHARED",E.VERTEX="VERTEX",E.MORTON="MORTON",E.FSST="FSST",(C=U||(U={})).VERTEX="VERTEX",C.INDEX="INDEX",C.STRING="STRING",C.KEY="KEY",(L=V||(V={})).VAR_BINARY="VAR_BINARY",L.GEOMETRIES="GEOMETRIES",L.PARTS="PARTS",L.RINGS="RINGS",L.TRIANGLES="TRIANGLES",L.SYMBOL="SYMBOL",L.DICTIONARY="DICTIONARY",(P=q||(q={}))[P.FLAT=0]="FLAT",P[P.CONST=1]="CONST",P[P.SEQUENCE=2]="SEQUENCE",P[P.DICTIONARY=3]="DICTIONARY",P[P.FSST_DICTIONARY=4]="FSST_DICTIONARY";class c3{constructor(e,t){this.values=e,this._size=t}get(e){let t=Math.floor(e/8);return(this.values[t]>>e%8&1)==1}set(e,t){let r=Math.floor(e/8);this.values[r]=this.values[r]|!!t<>e%8&1}size(){return this._size}getBuffer(){return this.values}}function c5(e,t,r){if(!t)return e;let i=t.size(),n=new e.constructor(i),a=0;for(let o=0;o=4)for(;i>>0;for(let r=1;r>>0;return t}(r.logicalLevelTechnique2===F.RLE?cX(o,r.runs,r.numRleValues):o);break;case F.RLE:a=cX(o,r.runs,r.numRleValues);break;case F.MORTON:c1(o),a=o;break;case F.COMPONENTWISE_DELTA:a=function(e){if(e.length<2)return new Uint32Array(e);let t=new Uint32Array(e.length);t[0]=cY(e[0])>>>0,t[1]=cY(e[1])>>>0;for(let r=2;r>>0,t[r+1]=t[r-1]+cY(e[r+1])>>>0;return t}(o);break;case F.NONE:a=o;break;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}return n?c5(a,n,0):a}function c8(e,t,r){return function(e,t){if(t.logicalLevelTechnique1===F.DELTA&&t.logicalLevelTechnique2===F.NONE){let t=new Int32Array(e.length+1);t[0]=0,t[1]=cY(e[0]);let r=t[1];for(let i=2;i!==t.length;++i)r+=cY(e[i-1]),t[i]=t[i-1]+r;return new Uint32Array(t)}if(t.logicalLevelTechnique1===F.RLE&&t.logicalLevelTechnique2===F.NONE)return function(e,t,r){let i=new Uint32Array(r+1);i[0]=0;let n=1,a=i[0];for(let r=0;r>>2,s=function(e,t){if(t<=e.encodedWords.length)return e.encodedWords;let r=new Uint32Array(Math.max(16,2*t));return e.encodedWords=r,r}(n,o);!function(e,t,r,i){if(t<0||r<0||t+r>e.length)throw RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${t}, byteLength=${r}, bytes.length=${e.length})`);let n=Math.floor(r/4),a=r%4!=0,o=a?n+1:n;if(i.length0){let r=e.byteOffset+t;if(3&r)for(let r=0;r>>0;return((255&t)<<24|(65280&t)<<8|t>>>8&65280|t>>>24&255)>>>0}(t[e])}}if(a){let a=t+4*n,o=r-4*n,s=0;for(let t=0;t0){let t=0|e[i];if(i=i+1|0,255&t)throw Error(`FastPFOR decode: invalid alignedLength=${t} (expected multiple of 256)`);if(n+t>a.length)throw Error(`FastPFOR decode: output buffer too small (outPos=${n}, alignedLength=${t}, out.length=${a.length})`);i=function(e,t,r,i,n,a){let o=i+(n-n%256),s=i,l=r;for(;s!==o;){let r=Math.min(cV,o-s);l=function(e,t,r,i,n,a){let o=0|r,s=0|e[o];if(s<=0||o+s>e.length-1)throw Error(`FastPFOR decode: invalid whereMeta=${s} at pageStart=${o} (expected > 0 and pageStart+whereMeta < encoded.length=${e.length})`);let l=o+s|0,c=e[l]>>>0,u=c+3>>>2,h=l+1,d=h+u;if(d>=e.length)throw Error(`FastPFOR decode: invalid byteSize=${c} (metaInts=${u}, pageStart=${o}, packedEnd=${l}, byteContainerStart=${h}) causes bitmapPos=${d} out of bounds (encoded.length=${e.length})`);let f=function(e,t,r,i){i.byteContainer.length>>2;if(3&n.byteOffset)for(let r=0;r>>8&255,n[a+2|0]=i>>>16&255,n[a+3|0]=i>>>24&255}else{let r=i.byteContainerI32;(!r||r.buffer!==n.buffer||r.byteOffset!==n.byteOffset||r.length>>2)),r.set(e.subarray(t,t+a))}let o=3&r;if(o>0){let r=0|e[t+a|0],i=a<<2;for(let e=0;e>>(e<<3)&255}return n}(e,h,c,a),p=function(e,t,r){let i=0|e[t++],n=r.dataToBePacked;for(let o=2;o<=32;o=o+1|0){var a;if(!(i>>>o-1&1))continue;if(t>=e.length)throw Error(`FastPFOR decode: truncated exception stream header (bitWidth=${o}, streamWordIndex=${t}, needWords=1, availableWords=${e.length-t}, encodedWords=${e.length})`);let s=e[t++]>>>0,l=(a=s+31)-a%32,c=s*o+31>>>5;if(t+c>e.length)throw Error(`FastPFOR decode: truncated exception stream (bitWidth=${o}, size=${s}, streamWordIndex=${t}, needWords=${c}, availableWords=${e.length-t}, encodedWords=${e.length})`);let u=n[o];(!u||u.length>>0,s=e[t+1]>>>0,r[a++]=o>>>0&3,r[a++]=o>>>2&3,r[a++]=o>>>4&3,r[a++]=o>>>6&3,r[a++]=o>>>8&3,r[a++]=o>>>10&3,r[a++]=o>>>12&3,r[a++]=o>>>14&3,r[a++]=o>>>16&3,r[a++]=o>>>18&3,r[a++]=o>>>20&3,r[a++]=o>>>22&3,r[a++]=o>>>24&3,r[a++]=o>>>26&3,r[a++]=o>>>28&3,r[a++]=o>>>30&3,r[a++]=s>>>0&3,r[a++]=s>>>2&3,r[a++]=s>>>4&3,r[a++]=s>>>6&3,r[a++]=s>>>8&3,r[a++]=s>>>10&3,r[a++]=s>>>12&3,r[a++]=s>>>14&3,r[a++]=s>>>16&3,r[a++]=s>>>18&3,r[a++]=s>>>20&3,r[a++]=s>>>22&3,r[a++]=s>>>24&3,r[a++]=s>>>26&3,r[a++]=s>>>28&3,r[a]=s>>>30&3;case 3:let l,c,u,h;return l=i,c=e[t]>>>0,u=e[t+1]>>>0,h=e[t+2]>>>0,r[l++]=c>>>0&7,r[l++]=c>>>3&7,r[l++]=c>>>6&7,r[l++]=c>>>9&7,r[l++]=c>>>12&7,r[l++]=c>>>15&7,r[l++]=c>>>18&7,r[l++]=c>>>21&7,r[l++]=c>>>24&7,r[l++]=c>>>27&7,r[l++]=7&(c>>>30|(1&u)<<2),r[l++]=u>>>1&7,r[l++]=u>>>4&7,r[l++]=u>>>7&7,r[l++]=u>>>10&7,r[l++]=u>>>13&7,r[l++]=u>>>16&7,r[l++]=u>>>19&7,r[l++]=u>>>22&7,r[l++]=u>>>25&7,r[l++]=u>>>28&7,r[l++]=7&(u>>>31|(3&h)<<1),r[l++]=h>>>2&7,r[l++]=h>>>5&7,r[l++]=h>>>8&7,r[l++]=h>>>11&7,r[l++]=h>>>14&7,r[l++]=h>>>17&7,r[l++]=h>>>20&7,r[l++]=h>>>23&7,r[l++]=h>>>26&7,r[l]=h>>>29&7;case 4:let d,f,p,m,g;return d=i,f=e[t]>>>0,p=e[t+1]>>>0,m=e[t+2]>>>0,g=e[t+3]>>>0,r[d++]=f>>>0&15,r[d++]=f>>>4&15,r[d++]=f>>>8&15,r[d++]=f>>>12&15,r[d++]=f>>>16&15,r[d++]=f>>>20&15,r[d++]=f>>>24&15,r[d++]=f>>>28&15,r[d++]=p>>>0&15,r[d++]=p>>>4&15,r[d++]=p>>>8&15,r[d++]=p>>>12&15,r[d++]=p>>>16&15,r[d++]=p>>>20&15,r[d++]=p>>>24&15,r[d++]=p>>>28&15,r[d++]=m>>>0&15,r[d++]=m>>>4&15,r[d++]=m>>>8&15,r[d++]=m>>>12&15,r[d++]=m>>>16&15,r[d++]=m>>>20&15,r[d++]=m>>>24&15,r[d++]=m>>>28&15,r[d++]=g>>>0&15,r[d++]=g>>>4&15,r[d++]=g>>>8&15,r[d++]=g>>>12&15,r[d++]=g>>>16&15,r[d++]=g>>>20&15,r[d++]=g>>>24&15,r[d]=g>>>28&15;case 5:let y,v,x,b,_,w;return y=i,v=e[t]>>>0,x=e[t+1]>>>0,b=e[t+2]>>>0,_=e[t+3]>>>0,w=e[t+4]>>>0,r[y++]=v>>>0&31,r[y++]=v>>>5&31,r[y++]=v>>>10&31,r[y++]=v>>>15&31,r[y++]=v>>>20&31,r[y++]=v>>>25&31,r[y++]=31&(v>>>30|(7&x)<<2),r[y++]=x>>>3&31,r[y++]=x>>>8&31,r[y++]=x>>>13&31,r[y++]=x>>>18&31,r[y++]=x>>>23&31,r[y++]=31&(x>>>28|(1&b)<<4),r[y++]=b>>>1&31,r[y++]=b>>>6&31,r[y++]=b>>>11&31,r[y++]=b>>>16&31,r[y++]=b>>>21&31,r[y++]=b>>>26&31,r[y++]=31&(b>>>31|(15&_)<<1),r[y++]=_>>>4&31,r[y++]=_>>>9&31,r[y++]=_>>>14&31,r[y++]=_>>>19&31,r[y++]=_>>>24&31,r[y++]=31&(_>>>29|(3&w)<<3),r[y++]=w>>>2&31,r[y++]=w>>>7&31,r[y++]=w>>>12&31,r[y++]=w>>>17&31,r[y++]=w>>>22&31,r[y]=w>>>27&31;case 6:let T,M,k,A,S,E,C;return T=i,M=e[t]>>>0,k=e[t+1]>>>0,A=e[t+2]>>>0,S=e[t+3]>>>0,E=e[t+4]>>>0,C=e[t+5]>>>0,r[T++]=M>>>0&63,r[T++]=M>>>6&63,r[T++]=M>>>12&63,r[T++]=M>>>18&63,r[T++]=M>>>24&63,r[T++]=63&(M>>>30|(15&k)<<2),r[T++]=k>>>4&63,r[T++]=k>>>10&63,r[T++]=k>>>16&63,r[T++]=k>>>22&63,r[T++]=63&(k>>>28|(3&A)<<4),r[T++]=A>>>2&63,r[T++]=A>>>8&63,r[T++]=A>>>14&63,r[T++]=A>>>20&63,r[T++]=A>>>26&63,r[T++]=S>>>0&63,r[T++]=S>>>6&63,r[T++]=S>>>12&63,r[T++]=S>>>18&63,r[T++]=S>>>24&63,r[T++]=63&(S>>>30|(15&E)<<2),r[T++]=E>>>4&63,r[T++]=E>>>10&63,r[T++]=E>>>16&63,r[T++]=E>>>22&63,r[T++]=63&(E>>>28|(3&C)<<4),r[T++]=C>>>2&63,r[T++]=C>>>8&63,r[T++]=C>>>14&63,r[T++]=C>>>20&63,r[T]=C>>>26&63;case 7:let L,P,I,z,D,O,R,F;return L=i,P=e[t]>>>0,I=e[t+1]>>>0,z=e[t+2]>>>0,D=e[t+3]>>>0,O=e[t+4]>>>0,R=e[t+5]>>>0,F=e[t+6]>>>0,r[L++]=P>>>0&127,r[L++]=P>>>7&127,r[L++]=P>>>14&127,r[L++]=P>>>21&127,r[L++]=127&(P>>>28|(7&I)<<4),r[L++]=I>>>3&127,r[L++]=I>>>10&127,r[L++]=I>>>17&127,r[L++]=I>>>24&127,r[L++]=127&(I>>>31|(63&z)<<1),r[L++]=z>>>6&127,r[L++]=z>>>13&127,r[L++]=z>>>20&127,r[L++]=127&(z>>>27|(3&D)<<5),r[L++]=D>>>2&127,r[L++]=D>>>9&127,r[L++]=D>>>16&127,r[L++]=D>>>23&127,r[L++]=127&(D>>>30|(31&O)<<2),r[L++]=O>>>5&127,r[L++]=O>>>12&127,r[L++]=O>>>19&127,r[L++]=127&(O>>>26|(1&R)<<6),r[L++]=R>>>1&127,r[L++]=R>>>8&127,r[L++]=R>>>15&127,r[L++]=R>>>22&127,r[L++]=127&(R>>>29|(15&F)<<3),r[L++]=F>>>4&127,r[L++]=F>>>11&127,r[L++]=F>>>18&127,r[L]=F>>>25&127;case 8:let j,B,N,U,V,q,H,G,W;return j=i,B=e[t]>>>0,N=e[t+1]>>>0,U=e[t+2]>>>0,V=e[t+3]>>>0,q=e[t+4]>>>0,H=e[t+5]>>>0,G=e[t+6]>>>0,W=e[t+7]>>>0,r[j++]=B>>>0&255,r[j++]=B>>>8&255,r[j++]=B>>>16&255,r[j++]=B>>>24&255,r[j++]=N>>>0&255,r[j++]=N>>>8&255,r[j++]=N>>>16&255,r[j++]=N>>>24&255,r[j++]=U>>>0&255,r[j++]=U>>>8&255,r[j++]=U>>>16&255,r[j++]=U>>>24&255,r[j++]=V>>>0&255,r[j++]=V>>>8&255,r[j++]=V>>>16&255,r[j++]=V>>>24&255,r[j++]=q>>>0&255,r[j++]=q>>>8&255,r[j++]=q>>>16&255,r[j++]=q>>>24&255,r[j++]=H>>>0&255,r[j++]=H>>>8&255,r[j++]=H>>>16&255,r[j++]=H>>>24&255,r[j++]=G>>>0&255,r[j++]=G>>>8&255,r[j++]=G>>>16&255,r[j++]=G>>>24&255,r[j++]=W>>>0&255,r[j++]=W>>>8&255,r[j++]=W>>>16&255,r[j]=W>>>24&255;case 9:let Y,Z,$,X,K,J,Q,ee,et,er;return Y=i,Z=e[t]>>>0,$=e[t+1]>>>0,X=e[t+2]>>>0,K=e[t+3]>>>0,J=e[t+4]>>>0,Q=e[t+5]>>>0,ee=e[t+6]>>>0,et=e[t+7]>>>0,er=e[t+8]>>>0,r[Y++]=Z>>>0&511,r[Y++]=Z>>>9&511,r[Y++]=Z>>>18&511,r[Y++]=511&(Z>>>27|(15&$)<<5),r[Y++]=$>>>4&511,r[Y++]=$>>>13&511,r[Y++]=$>>>22&511,r[Y++]=511&($>>>31|(255&X)<<1),r[Y++]=X>>>8&511,r[Y++]=X>>>17&511,r[Y++]=511&(X>>>26|(7&K)<<6),r[Y++]=K>>>3&511,r[Y++]=K>>>12&511,r[Y++]=K>>>21&511,r[Y++]=511&(K>>>30|(127&J)<<2),r[Y++]=J>>>7&511,r[Y++]=J>>>16&511,r[Y++]=511&(J>>>25|(3&Q)<<7),r[Y++]=Q>>>2&511,r[Y++]=Q>>>11&511,r[Y++]=Q>>>20&511,r[Y++]=511&(Q>>>29|(63&ee)<<3),r[Y++]=ee>>>6&511,r[Y++]=ee>>>15&511,r[Y++]=511&(ee>>>24|(1&et)<<8),r[Y++]=et>>>1&511,r[Y++]=et>>>10&511,r[Y++]=et>>>19&511,r[Y++]=511&(et>>>28|(31&er)<<4),r[Y++]=er>>>5&511,r[Y++]=er>>>14&511,r[Y]=er>>>23&511;case 10:let ei,en,ea,eo,es,el,ec,eu,eh,ed,ef;return ei=i,en=e[t]>>>0,ea=e[t+1]>>>0,eo=e[t+2]>>>0,es=e[t+3]>>>0,el=e[t+4]>>>0,ec=e[t+5]>>>0,eu=e[t+6]>>>0,eh=e[t+7]>>>0,ed=e[t+8]>>>0,ef=e[t+9]>>>0,r[ei++]=en>>>0&1023,r[ei++]=en>>>10&1023,r[ei++]=en>>>20&1023,r[ei++]=1023&(en>>>30|(255&ea)<<2),r[ei++]=ea>>>8&1023,r[ei++]=ea>>>18&1023,r[ei++]=1023&(ea>>>28|(63&eo)<<4),r[ei++]=eo>>>6&1023,r[ei++]=eo>>>16&1023,r[ei++]=1023&(eo>>>26|(15&es)<<6),r[ei++]=es>>>4&1023,r[ei++]=es>>>14&1023,r[ei++]=1023&(es>>>24|(3&el)<<8),r[ei++]=el>>>2&1023,r[ei++]=el>>>12&1023,r[ei++]=el>>>22&1023,r[ei++]=ec>>>0&1023,r[ei++]=ec>>>10&1023,r[ei++]=ec>>>20&1023,r[ei++]=1023&(ec>>>30|(255&eu)<<2),r[ei++]=eu>>>8&1023,r[ei++]=eu>>>18&1023,r[ei++]=1023&(eu>>>28|(63&eh)<<4),r[ei++]=eh>>>6&1023,r[ei++]=eh>>>16&1023,r[ei++]=1023&(eh>>>26|(15&ed)<<6),r[ei++]=ed>>>4&1023,r[ei++]=ed>>>14&1023,r[ei++]=1023&(ed>>>24|(3&ef)<<8),r[ei++]=ef>>>2&1023,r[ei++]=ef>>>12&1023,r[ei]=ef>>>22&1023;case 11:let ep,em,eg,ey,ev,ex,eb,e_,ew,eT,eM,ek;return ep=i,em=e[t]>>>0,eg=e[t+1]>>>0,ey=e[t+2]>>>0,ev=e[t+3]>>>0,ex=e[t+4]>>>0,eb=e[t+5]>>>0,e_=e[t+6]>>>0,ew=e[t+7]>>>0,eT=e[t+8]>>>0,eM=e[t+9]>>>0,ek=e[t+10]>>>0,r[ep++]=em>>>0&2047,r[ep++]=em>>>11&2047,r[ep++]=2047&(em>>>22|(1&eg)<<10),r[ep++]=eg>>>1&2047,r[ep++]=eg>>>12&2047,r[ep++]=2047&(eg>>>23|(3&ey)<<9),r[ep++]=ey>>>2&2047,r[ep++]=ey>>>13&2047,r[ep++]=2047&(ey>>>24|(7&ev)<<8),r[ep++]=ev>>>3&2047,r[ep++]=ev>>>14&2047,r[ep++]=2047&(ev>>>25|(15&ex)<<7),r[ep++]=ex>>>4&2047,r[ep++]=ex>>>15&2047,r[ep++]=2047&(ex>>>26|(31&eb)<<6),r[ep++]=eb>>>5&2047,r[ep++]=eb>>>16&2047,r[ep++]=2047&(eb>>>27|(63&e_)<<5),r[ep++]=e_>>>6&2047,r[ep++]=e_>>>17&2047,r[ep++]=2047&(e_>>>28|(127&ew)<<4),r[ep++]=ew>>>7&2047,r[ep++]=ew>>>18&2047,r[ep++]=2047&(ew>>>29|(255&eT)<<3),r[ep++]=eT>>>8&2047,r[ep++]=eT>>>19&2047,r[ep++]=2047&(eT>>>30|(511&eM)<<2),r[ep++]=eM>>>9&2047,r[ep++]=eM>>>20&2047,r[ep++]=2047&(eM>>>31|(1023&ek)<<1),r[ep++]=ek>>>10&2047,r[ep]=ek>>>21&2047;case 12:let eA,eS,eE,eC,eL,eP,eI,ez,eD,eO,eR,eF,ej;return eA=i,eS=e[t]>>>0,eE=e[t+1]>>>0,eC=e[t+2]>>>0,eL=e[t+3]>>>0,eP=e[t+4]>>>0,eI=e[t+5]>>>0,ez=e[t+6]>>>0,eD=e[t+7]>>>0,eO=e[t+8]>>>0,eR=e[t+9]>>>0,eF=e[t+10]>>>0,ej=e[t+11]>>>0,r[eA++]=eS>>>0&4095,r[eA++]=eS>>>12&4095,r[eA++]=4095&(eS>>>24|(15&eE)<<8),r[eA++]=eE>>>4&4095,r[eA++]=eE>>>16&4095,r[eA++]=4095&(eE>>>28|(255&eC)<<4),r[eA++]=eC>>>8&4095,r[eA++]=eC>>>20&4095,r[eA++]=eL>>>0&4095,r[eA++]=eL>>>12&4095,r[eA++]=4095&(eL>>>24|(15&eP)<<8),r[eA++]=eP>>>4&4095,r[eA++]=eP>>>16&4095,r[eA++]=4095&(eP>>>28|(255&eI)<<4),r[eA++]=eI>>>8&4095,r[eA++]=eI>>>20&4095,r[eA++]=ez>>>0&4095,r[eA++]=ez>>>12&4095,r[eA++]=4095&(ez>>>24|(15&eD)<<8),r[eA++]=eD>>>4&4095,r[eA++]=eD>>>16&4095,r[eA++]=4095&(eD>>>28|(255&eO)<<4),r[eA++]=eO>>>8&4095,r[eA++]=eO>>>20&4095,r[eA++]=eR>>>0&4095,r[eA++]=eR>>>12&4095,r[eA++]=4095&(eR>>>24|(15&eF)<<8),r[eA++]=eF>>>4&4095,r[eA++]=eF>>>16&4095,r[eA++]=4095&(eF>>>28|(255&ej)<<4),r[eA++]=ej>>>8&4095,r[eA]=ej>>>20&4095;case 16:let eB,eN,eU,eV,eq,eH,eG,eW,eY,eZ,e$,eX,eK,eJ,eQ,e0,e1;return eB=i,eN=e[t]>>>0,eU=e[t+1]>>>0,eV=e[t+2]>>>0,eq=e[t+3]>>>0,eH=e[t+4]>>>0,eG=e[t+5]>>>0,eW=e[t+6]>>>0,eY=e[t+7]>>>0,eZ=e[t+8]>>>0,e$=e[t+9]>>>0,eX=e[t+10]>>>0,eK=e[t+11]>>>0,eJ=e[t+12]>>>0,eQ=e[t+13]>>>0,e0=e[t+14]>>>0,e1=e[t+15]>>>0,r[eB++]=eN>>>0&65535,r[eB++]=eN>>>16&65535,r[eB++]=eU>>>0&65535,r[eB++]=eU>>>16&65535,r[eB++]=eV>>>0&65535,r[eB++]=eV>>>16&65535,r[eB++]=eq>>>0&65535,r[eB++]=eq>>>16&65535,r[eB++]=eH>>>0&65535,r[eB++]=eH>>>16&65535,r[eB++]=eG>>>0&65535,r[eB++]=eG>>>16&65535,r[eB++]=eW>>>0&65535,r[eB++]=eW>>>16&65535,r[eB++]=eY>>>0&65535,r[eB++]=eY>>>16&65535,r[eB++]=eZ>>>0&65535,r[eB++]=eZ>>>16&65535,r[eB++]=e$>>>0&65535,r[eB++]=e$>>>16&65535,r[eB++]=eX>>>0&65535,r[eB++]=eX>>>16&65535,r[eB++]=eK>>>0&65535,r[eB++]=eK>>>16&65535,r[eB++]=eJ>>>0&65535,r[eB++]=eJ>>>16&65535,r[eB++]=eQ>>>0&65535,r[eB++]=eQ>>>16&65535,r[eB++]=e0>>>0&65535,r[eB++]=e0>>>16&65535,r[eB++]=e1>>>0&65535,r[eB]=e1>>>16&65535;case 32:for(let n=0;n<32;n=n+1|0)r[i+n|0]=0|e[t+n|0];return}let e2=cU[n]>>>0,e3=t,e5=0,e4=e[e3]>>>0;for(let t=0;t<32;t++)if(e5+n<=32)r[i+t]=e4>>>e5&e2,32===(e5+=n)&&(e5=0,e3++,31!==t&&(e4=e[e3]>>>0));else{let a=32-e5,o=e4>>>e5;e4=e[++e3]>>>0,r[i+t]=(o|(e4&cU[n-a]>>>0)<>>5)|0,r.exceptionSizes[o]=s}return t}(e,d,a);return a.dataPointers.fill(0),function(e,t,r,i,n,a,o,s,l,c){let u=0|r,h=0;for(let t=0;tt)throw Error(`FastPFOR decode: byteContainer underflow at block=${i} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${r}, byteSize=${t})`);let n=e[r++],a=e[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}}(s,l,h,t);h=r.bytePosIn;let i=r.bitWidth,o=r.exceptionCount,d=a+256*t|0;switch(i){case 0:n.fill(0,d,d+256);break;case 32:for(let t=0;t<256;t=t+1|0)n[d+t|0]=0|e[u+t|0];u=u+256|0;break;default:u=function(e,t,r,i,n){switch(n){case 1:let a=i,o=t;for(let t=0;t<8;t++){let t=e[o++]>>>0;r[a++]=t>>>0&1,r[a++]=t>>>1&1,r[a++]=t>>>2&1,r[a++]=t>>>3&1,r[a++]=t>>>4&1,r[a++]=t>>>5&1,r[a++]=t>>>6&1,r[a++]=t>>>7&1,r[a++]=t>>>8&1,r[a++]=t>>>9&1,r[a++]=t>>>10&1,r[a++]=t>>>11&1,r[a++]=t>>>12&1,r[a++]=t>>>13&1,r[a++]=t>>>14&1,r[a++]=t>>>15&1,r[a++]=t>>>16&1,r[a++]=t>>>17&1,r[a++]=t>>>18&1,r[a++]=t>>>19&1,r[a++]=t>>>20&1,r[a++]=t>>>21&1,r[a++]=t>>>22&1,r[a++]=t>>>23&1,r[a++]=t>>>24&1,r[a++]=t>>>25&1,r[a++]=t>>>26&1,r[a++]=t>>>27&1,r[a++]=t>>>28&1,r[a++]=t>>>29&1,r[a++]=t>>>30&1,r[a++]=t>>>31&1}break;case 2:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0;r[n++]=t>>>0&3,r[n++]=t>>>2&3,r[n++]=t>>>4&3,r[n++]=t>>>6&3,r[n++]=t>>>8&3,r[n++]=t>>>10&3,r[n++]=t>>>12&3,r[n++]=t>>>14&3,r[n++]=t>>>16&3,r[n++]=t>>>18&3,r[n++]=t>>>20&3,r[n++]=t>>>22&3,r[n++]=t>>>24&3,r[n++]=t>>>26&3,r[n++]=t>>>28&3,r[n++]=t>>>30&3,r[n++]=i>>>0&3,r[n++]=i>>>2&3,r[n++]=i>>>4&3,r[n++]=i>>>6&3,r[n++]=i>>>8&3,r[n++]=i>>>10&3,r[n++]=i>>>12&3,r[n++]=i>>>14&3,r[n++]=i>>>16&3,r[n++]=i>>>18&3,r[n++]=i>>>20&3,r[n++]=i>>>22&3,r[n++]=i>>>24&3,r[n++]=i>>>26&3,r[n++]=i>>>28&3,r[n++]=i>>>30&3}}(e,t,r,i);break;case 3:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0;r[n++]=t>>>0&7,r[n++]=t>>>3&7,r[n++]=t>>>6&7,r[n++]=t>>>9&7,r[n++]=t>>>12&7,r[n++]=t>>>15&7,r[n++]=t>>>18&7,r[n++]=t>>>21&7,r[n++]=t>>>24&7,r[n++]=t>>>27&7,r[n++]=7&(t>>>30|(1&i)<<2),r[n++]=i>>>1&7,r[n++]=i>>>4&7,r[n++]=i>>>7&7,r[n++]=i>>>10&7,r[n++]=i>>>13&7,r[n++]=i>>>16&7,r[n++]=i>>>19&7,r[n++]=i>>>22&7,r[n++]=i>>>25&7,r[n++]=i>>>28&7,r[n++]=7&(i>>>31|(3&o)<<1),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}}(e,t,r,i);break;case 4:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0;r[n++]=t>>>0&15,r[n++]=t>>>4&15,r[n++]=t>>>8&15,r[n++]=t>>>12&15,r[n++]=t>>>16&15,r[n++]=t>>>20&15,r[n++]=t>>>24&15,r[n++]=t>>>28&15,r[n++]=i>>>0&15,r[n++]=i>>>4&15,r[n++]=i>>>8&15,r[n++]=i>>>12&15,r[n++]=i>>>16&15,r[n++]=i>>>20&15,r[n++]=i>>>24&15,r[n++]=i>>>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++]=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}}(e,t,r,i);break;case 5:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0,l=e[a++]>>>0;r[n++]=t>>>0&31,r[n++]=t>>>5&31,r[n++]=t>>>10&31,r[n++]=t>>>15&31,r[n++]=t>>>20&31,r[n++]=t>>>25&31,r[n++]=31&(t>>>30|(7&i)<<2),r[n++]=i>>>3&31,r[n++]=i>>>8&31,r[n++]=i>>>13&31,r[n++]=i>>>18&31,r[n++]=i>>>23&31,r[n++]=31&(i>>>28|(1&o)<<4),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++]=31&(o>>>31|(15&s)<<1),r[n++]=s>>>4&31,r[n++]=s>>>9&31,r[n++]=s>>>14&31,r[n++]=s>>>19&31,r[n++]=s>>>24&31,r[n++]=31&(s>>>29|(3&l)<<3),r[n++]=l>>>2&31,r[n++]=l>>>7&31,r[n++]=l>>>12&31,r[n++]=l>>>17&31,r[n++]=l>>>22&31,r[n++]=l>>>27&31}}(e,t,r,i);break;case 6:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0,l=e[a++]>>>0,c=e[a++]>>>0;r[n++]=t>>>0&63,r[n++]=t>>>6&63,r[n++]=t>>>12&63,r[n++]=t>>>18&63,r[n++]=t>>>24&63,r[n++]=63&(t>>>30|(15&i)<<2),r[n++]=i>>>4&63,r[n++]=i>>>10&63,r[n++]=i>>>16&63,r[n++]=i>>>22&63,r[n++]=63&(i>>>28|(3&o)<<4),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++]=s>>>0&63,r[n++]=s>>>6&63,r[n++]=s>>>12&63,r[n++]=s>>>18&63,r[n++]=s>>>24&63,r[n++]=63&(s>>>30|(15&l)<<2),r[n++]=l>>>4&63,r[n++]=l>>>10&63,r[n++]=l>>>16&63,r[n++]=l>>>22&63,r[n++]=63&(l>>>28|(3&c)<<4),r[n++]=c>>>2&63,r[n++]=c>>>8&63,r[n++]=c>>>14&63,r[n++]=c>>>20&63,r[n++]=c>>>26&63}}(e,t,r,i);break;case 7:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0,l=e[a++]>>>0,c=e[a++]>>>0,u=e[a++]>>>0;r[n++]=t>>>0&127,r[n++]=t>>>7&127,r[n++]=t>>>14&127,r[n++]=t>>>21&127,r[n++]=127&(t>>>28|(7&i)<<4),r[n++]=i>>>3&127,r[n++]=i>>>10&127,r[n++]=i>>>17&127,r[n++]=i>>>24&127,r[n++]=127&(i>>>31|(63&o)<<1),r[n++]=o>>>6&127,r[n++]=o>>>13&127,r[n++]=o>>>20&127,r[n++]=127&(o>>>27|(3&s)<<5),r[n++]=s>>>2&127,r[n++]=s>>>9&127,r[n++]=s>>>16&127,r[n++]=s>>>23&127,r[n++]=127&(s>>>30|(31&l)<<2),r[n++]=l>>>5&127,r[n++]=l>>>12&127,r[n++]=l>>>19&127,r[n++]=127&(l>>>26|(1&c)<<6),r[n++]=c>>>1&127,r[n++]=c>>>8&127,r[n++]=c>>>15&127,r[n++]=c>>>22&127,r[n++]=127&(c>>>29|(15&u)<<3),r[n++]=u>>>4&127,r[n++]=u>>>11&127,r[n++]=u>>>18&127,r[n++]=u>>>25&127}}(e,t,r,i);break;case 8:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0,l=e[a++]>>>0,c=e[a++]>>>0,u=e[a++]>>>0,h=e[a++]>>>0;r[n++]=t>>>0&255,r[n++]=t>>>8&255,r[n++]=t>>>16&255,r[n++]=t>>>24&255,r[n++]=i>>>0&255,r[n++]=i>>>8&255,r[n++]=i>>>16&255,r[n++]=i>>>24&255,r[n++]=o>>>0&255,r[n++]=o>>>8&255,r[n++]=o>>>16&255,r[n++]=o>>>24&255,r[n++]=s>>>0&255,r[n++]=s>>>8&255,r[n++]=s>>>16&255,r[n++]=s>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>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}}(e,t,r,i);break;case 16:let s=i,l=t;for(let t=0;t<128;t++){let t=e[l++]>>>0;r[s++]=65535&t,r[s++]=t>>>16&65535}break;default:!function(e,t,r,i,n){let a=cU[n]>>>0,o=t,s=0,l=e[o]>>>0,c=i;for(let t=0;t<8;t++){for(let t=0;t<32;t++)if(s+n<=32)r[c+t]=l>>>s&a,32===(s+=n)&&(s=0,o++,31!==t&&(l=e[o]>>>0));else{let i=32-s,u=l>>>s;l=e[++o]>>>0;let h=n-i;r[c+t]=(u|(l&-1>>>32-h>>>0)<>>0)}}(e,t,r,i,n)}return t+(n<<3)|0}(e,u,n,d,i)}o>0&&(h=function(e,t,r,i,n,a,o,s,l){let{maxBits:c,exceptionBitWidth:u,bytePosIn:h}=function(e,t,r,i,n,a){if(r+1>t)throw Error(`FastPFOR decode: exception header underflow at block=${a} (need 1 byte for maxBits, bytePos=${r}, byteSize=${t})`);let o=e[r++];if(o32)throw Error(`FastPFOR decode: invalid maxBits=${o} at block=${a} (bitWidth=${i}, expected ${i}..32)`);let s=o-i|0;if(s<1||s>32)throw Error(`FastPFOR decode: invalid exceptionBitWidth=${s} at block=${a} (bitWidth=${i}, maxBits=${o})`);if(r+n>t)throw Error(`FastPFOR decode: exception positions underflow at block=${a} (need=${n}, have=${t-r})`);return{maxBits:o,exceptionBitWidth:s,bytePosIn:r}}(n,a,o,r,i,l);if(o=h,1===u){let a=1<m)throw Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${u} (ptr=${p}, need ${i}, size=${m}) at block ${l}`);for(let a=0;a>>o&255;if(o+=8,s+=o>>>5,o&=31,h|=(127&t)<28)throw Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${d}, partial=${h}, decoded=${c-n}/${a}, inPos=${s}, inEnd=${l})`)}if(c!==u)throw Error(`FastPFOR VByte: truncated stream (decoded=${c-n}, expected=${a}, consumedWords=${s-t}/${r}, vbyteStart=${t}, vbyteEnd=${l})`)}(e,i,e.length-i|0,a,n,t-n|0),a}(s.subarray(0,o),t,n.decoderWorkspace);return i.add(r),l}(e,n,a=r.byteLength,t,function(e=16){if(e<0)throw RangeError(`initialEncodedWordCapacity must be >= 0, got ${e}`);return{encodedWords:new Uint32Array(Math.max(16,0|e)),decoderWorkspace:cH()}}(a>>>2));case j.VARINT:return cG(e,t,r.numValues);case j.NONE:{let i=t.get();return t.add(r.byteLength),new Uint32Array(e.subarray(i,t.get()))}default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function c9(e,t,r){let i=c7(e,t,r);return 1===i.length?i[0]:i[1]}function ue(e,t,r){var i=c7(e,t,r);if(2===i.length){let e=cY(i[1]);return[e,e]}return[cY(i[2]),cY(i[3])]}function ut(e,t,r){var i=cW(e,t,r.numValues);if(2===i.length){let e=cZ(i[1]);return[e,e]}return[cZ(i[2]),cZ(i[3])]}function ur(e,t,r,i){let n;var a=cW(e,t,r.numValues);switch(r.logicalLevelTechnique1){case F.DELTA:n=function(e){let t=new BigUint64Array(e.length);t[0]=BigInt.asUintN(64,cZ(e[0]));for(let r=1;r>1,t)-r}}function ul(e,t){let r=0;for(let i=0;i>i;return r}function uc(e,t,r,i,n,a,o){return e===W.MORTON?function(e,t,r,i,n,a){let o=Array(n?i+1:i);for(let n=0;n[e]),r+=e,i+=e}break;case H.LINESTRING:{let c,y;m?(c=d[i]-d[i-1],i++):c=h[r]-h[r-1],r++,p?(y=uu(g,o,c,!1),o+=2*c):(y=uc(e.vertexBufferType,g,f,s,c,!1,l),s+=c),t[a++]=[y],u&&n++}break;case H.POLYGON:{let c=h[r]-h[r-1];r++;let m=Array(c-1),y,v=d[i]-d[i-1];if(i++,p){y=uu(g,o,v,!0),o+=2*v;for(let e=0;e0&&t.push(t[0]),u.push(t)}e[t]=u,n&&l++}break;case H.MULTIPOLYGON:{let c=n[l]-n[l-1];l++;let u=[];for(let e=0;e0&&t.push(t[0]),u.push(t)}}e[t]=u}}return e}[Symbol.iterator](){return null}}class um extends up{constructor(e,t,r,i,n,a){super(r,i,n,a),this._numGeometries=e,this._geometryType=t}geometryType(e){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}class ug extends up{constructor(e,t,r,i,n){super(t,r,i,n),this._geometryTypes=e}geometryType(e){return this._geometryTypes[e]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function uy(e,t,r){let i=new Uint32Array(e.length+1),n=0;i[0]=n;let a=0;for(let o=0;or?t[a++]:1);return i}function uv(e,t,r,i){let n=new Uint32Array(t[t.length-1]+1),a=0;n[0]=a;let o=1,s=0;for(let l=0;l=o);){let r=e[i.increment()];if(r<=127){let o=r+3,s=e[i.increment()],l=Math.min(a+o,t);n.fill(s,a,l),a=l}else{let o=256-r;for(let r=0;r=12?uT.decode(e.subarray(t,r)):function(e,t,r){let i="",n=t;for(;n239?4:t>223?3:t>191?2:1;if(n+c>r)break;1===c?t<128&&(l=t):2===c?(192&(a=e[n+1]))==128&&(l=(31&t)<<6|63&a)<=127&&(l=null):3===c?(a=e[n+1],o=e[n+2],(192&a)==128&&(192&o)==128&&((l=(15&t)<<12|(63&a)<<6|63&o)<=2047||l>=55296&&l<=57343)&&(l=null)):4===c&&(a=e[n+1],o=e[n+2],s=e[n+3],(192&a)==128&&(192&o)==128&&(192&s)==128&&((l=(15&t)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,c=1):l>65535&&(l-=65536,i+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),i+=String.fromCharCode(l),n+=c}return i}(e,t,r)}class uk extends cI{constructor(e,t,r,i){super(e,r,i),this.offsetBuffer=t}}class uA extends uk{constructor(e,t,r,i){super(e,t,r,i??t.length-1)}getValueFromBuffer(e){return uM(this.dataBuffer,this.offsetBuffer[e],this.offsetBuffer[e+1])}}class uS extends uk{constructor(e,t,r,i,n){super(e,r,i,n??t.length),this.indexBuffer=t,this.indexBuffer=t}getValueFromBuffer(e){let t=this.indexBuffer[e];return uM(this.dataBuffer,this.offsetBuffer[t],this.offsetBuffer[t+1])}}class uE extends uk{constructor(e,t,r,i,n,a,o){super(e,r,i,o),this.indexBuffer=t,this.symbolOffsetBuffer=n,this.symbolTableBuffer=a}getValueFromBuffer(e){null==this.decodedDictionary&&(null==this.symbolLengthBuffer&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=function(e,t,r){let i=[],n=Array(t.length).fill(0);for(let e=1;e>>0,s=n.get()+o;if(s>e.length)throw Error(`Block overruns tile: ${s} > ${e.length}`);if(cG(e,n,1)[0]>>>0!=1){n.set(s);continue}let[l,c]=function(e,t){let r={featureTables:[]},i={};i.name=uI(e,t);let n=cG(e,t,1)[0]>>>0,a=cG(e,t,1)[0]>>>0;i.columns=Array(a);for(let r=0;r>>0,i=uL(r);if(!i)throw Error(`Unsupported column type code ${r}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(r>=10?i.name=uI(e,t):r>=0&&r<=3?i.name="id":4===r&&(i.name="geometry"),30===r){let r=cG(e,t,1)[0]>>>0,n=i.complexType;n.children=Array(r);for(let i=0;i>>0;if(i<10||i>30)throw Error(`Unsupported field type code ${i}. Supported: 10-29(scalars), 30(STRUCT)`);let n=uL(i);if(i>=10&&(n.name=uI(t,r)),30===i){let i=cG(t,r,1)[0]>>>0;n.complexType.children=Array(i);for(let a=0;a>4,n<128||(n=t[r.get()],r.increment(),i|=(127&n)<<3,n<128)||(n=t[r.get()],r.increment(),i|=(127&n)<<10,n<128)||(n=t[r.get()],r.increment(),i|=(127&n)<<17,n<128)||(n=t[r.get()],r.increment(),i|=(127&n)<<24,n<128)||(n=t[r.get()],r.increment(),i|=(1&n)<<31,n<128))return 0x100000000*i+(e>>>0);throw Error("Expected varint not more than 10 bytes")}(r|=(15&(i=e[t.get()]))<<28,e,t))))}(e,t);return i}(e,t,r.numValues);switch(r.logicalLevelTechnique1){case F.DELTA:return r.logicalLevelTechnique2===F.RLE&&(i=cJ(i,r.runs,r.numRleValues)),function(e){e[0]=c$(e[0]);let t=e.length/4*4,r=1;if(t>=4)for(;rObject.assign(Object.assign({},e),{[t.name]:new uD(t)}),{})}}class uR{constructor(e,t){this.feature=e,this.type=e.type,this.properties=e.tags?e.tags:{},this.extent=t,"id"in e&&("string"==typeof e.id?this.id=parseInt(e.id,10):"number"!=typeof e.id||isNaN(e.id)||(this.id=e.id))}loadGeometry(){let e=[];for(let t of 1===this.feature.type?[this.feature.geometry]:this.feature.geometry){let r=[];for(let e of t)r.push(new w(e[0],e[1]));e.push(r)}return e}}let uF="_geojsonTileLayer";function uj(e,t){if(!e.feature)return;let r=e.feature;void 0!==r.id&&t.writeVarintField(1,r.id),t.writeMessage(2,uB,e),t.writeVarintField(3,r.type),t.writeMessage(4,uN,r)}function uB(e,t){var r;for(let i in null==(r=e.feature)?void 0:r.properties){let r=e.feature.properties[i],n=e.keycache[i];if(null==r)continue;void 0===n&&(e.keys.push(i),n=e.keys.length-1,e.keycache[i]=n),t.writeVarint(n),"string"!=typeof r&&"boolean"!=typeof r&&"number"!=typeof r&&(r=e.jsonPrefix+JSON.stringify(r));let a=typeof r+":"+r,o=e.valuecache[a];void 0===o&&(e.values.push(r),o=e.values.length-1,e.valuecache[a]=o),t.writeVarint(o)}}function uN(e,t){let r=e.loadGeometry(),i=e.type,n=0,a=0;for(let o of r){let r=1;1===i&&(r=o.length),t.writeVarint((r<<3)+1);let s=3===i?o.length-1:o.length;for(let e=0;e>31),t.writeVarint(l<<1^l>>31),n+=r,a+=l}3===e.type&&t.writeVarint(15)}}function uU(e,t){let r=typeof e;"string"===r?t.writeStringField(1,e):"boolean"===r?t.writeBooleanField(7,e):"number"===r&&(e%1!=0?t.writeDoubleField(3,e):e<0?t.writeSVarintField(6,e):t.writeVarintField(5,e))}class uV{constructor(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new nw(8192,16,0),this.grid3D=new nw(8192,16,0),this.featureIndexArray=new aj,this.promoteId=t}insert(e,t,r,i,n,a){let o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);let s=a?this.grid3D:this.grid;for(let e of t){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)t[0]=Math.min(t[0],r.x),t[1]=Math.min(t[1],r.y),t[2]=Math.max(t[2],r.x),t[3]=Math.max(t[3],r.y);t[0]<8192&&t[1]<8192&&t[2]>=0&&t[3]>=0&&s.insert(o,t[0],t[1],t[2],t[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers="mlt"!==this.encoding?new sO(new lU(this.rawTileData)).layers:new uO(this.rawTileData).layers,this.sourceLayerCoder=new cL(this.vtLayers?Object.keys(this.vtLayers).sort():[uF])),this.vtLayers}query(e,t,r,i){this.loadVTLayers();let n=e.params,a=8192/e.tileSize/e.scale,o=iV(n.filter,n.globalState),s=e.queryGeometry,l=e.queryPadding*a,c=cC.fromPoints(s),u=this.grid.query(c.minX-l,c.minY-l,c.maxX+l,c.maxY+l),h=cC.fromPoints(e.cameraQueryGeometry).expandBy(l);for(let t of this.grid3D.query(h.minX,h.minY,h.maxX,h.maxY,(t,r,i,n)=>(function(e,t,r,i,n){for(let a of e)if(t<=a.x&&r<=a.y&&i>=a.x&&n>=a.y)return!0;let a=[new w(t,r),new w(t,n),new w(i,n),new w(i,r)];if(e.length>2){for(let t of a)if(oI(e,t))return!0}for(let t=0;tn.x&&t.x>n.x||e.yn.y&&t.y>n.y)return!1;let a=eS(e,t,r[0]);return a!==eS(e,t,r[1])||a!==eS(e,t,r[2])||a!==eS(e,t,r[3])}(e[t],e[t+1],a))return!0;return!1})(e.cameraQueryGeometry,t-l,r-l,i+l,n+l)))u.push(t);u.sort(uH);let d={},f;for(let l of u){if(l===f)continue;f=l;let c=this.featureIndexArray.get(l),u=null;this.loadMatchingFeature(d,c.bucketIndex,c.sourceLayerIndex,c.featureIndex,o,n.layers,n.availableImages,t,r,i,(t,r,i)=>(u||(u=ow(t)),r.queryIntersectsFeature({queryGeometry:s,feature:t,featureState:i,geometry:u,zoom:this.z,transform:e.transform,pixelsToTileUnits:a,pixelPosMatrix:e.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:e.getElevation})))}return d}loadMatchingFeature(e,t,r,i,n,a,o,s,l,c,u){let h=this.bucketLayerIDs[t];if(a&&!h.some(e=>a.has(e)))return;let d=this.sourceLayerCoder.decode(r),f=this.vtLayers[d].feature(i);if(n.needGeometry){let e=oT(f,!0);if(!n.filter(new nN(this.tileID.overscaledZ),e,this.tileID.canonical))return}else if(!n.filter(new nN(this.tileID.overscaledZ),f))return;let p=this.getId(f,d);for(let t of h){if(a&&!a.has(t))continue;let r=s[t];if(!r)continue;let n={};p&&c&&(n=c.getState(r.sourceLayer||uF,p));let h=eb({},l[t]);h.paint=uq(h.paint,r.paint,f,n,o),h.layout=uq(h.layout,r.layout,f,n,o);let d=!u||u(f,r,n);if(!d)continue;let m=new cP(f,this.z,this.x,this.y,p);m.layer=h;let g=e[t];void 0===g&&(g=e[t]=[]),g.push({featureIndex:i,feature:m,intersectionZ:d})}}lookupSymbolFeatures(e,t,r,i,n,a,o,s){let l={};this.loadVTLayers();let c=iV(n.filterSpec,n.globalState);for(let n of e)this.loadMatchingFeature(l,r,i,n,c,a,o,s,t);return l}hasLayer(e){for(let t of this.bucketLayerIDs)for(let r of t)if(e===r)return!0;return!1}getId(e,t){var r;let i=e.id;return this.promoteId&&("boolean"==typeof(i=e.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[t]])&&(i=Number(i)),void 0===i&&null!=(r=e.properties)&&r.cluster&&this.promoteId&&(i=Number(e.properties.cluster_id))),i}}function uq(e,t,r,i,n){return ew(e,(e,a)=>{let o=t instanceof nX?t.get(a):null;return o?.evaluate?o.evaluate(r,i,n):o})}function uH(e,t){return t-e}function uG(e,t,r,i,n){let a=[];for(let o of e){let e;for(let s=0;s=i&&c.x>=i||(l.x>=i?l=new w(i,l.y+(i-l.x)/(c.x-l.x)*(c.y-l.y))._round():c.x>=i&&(c=new w(i,l.y+(i-l.x)/(c.x-l.x)*(c.y-l.y))._round()),l.y>=n&&c.y>=n||(l.y>=n?l=new w(l.x+(n-l.y)/(c.y-l.y)*(c.x-l.x),n)._round():c.y>=n&&(c=new w(l.x+(n-l.y)/(c.y-l.y)*(c.x-l.x),n)._round()),e&&l.equals(e[e.length-1])||(e=[l],a.push(e)),e.push(c)))))}}return a}function uW(e,t,r,i,n){switch(t){case 1:let a=[];for(let t of e)for(let e of t){let t=0===n?e.x:e.y;t>=r&&t<=i&&a.push([e])}return a;case 2:return uY(e,r,i,n,!1);case 3:return uY(e,r,i,n,!0)}return[]}function uY(e,t,r,i,n){let a=[];for(let o of e){let e=function(e,t,r,i,n){let a=0===i?uZ:u$,o=[],s=[];for(let l=0;lt&&o.push(a(c,u,t)):h>r?d=t&&(o.push(a(c,u,t)),f=!0),d>r&&h<=r&&(o.push(a(c,u,r)),f=!0),!n&&f&&(s.push(o),o=[])}let l=e.length-1,c=0===i?e[l].x:e[l].y;return c>=t&&c<=r&&o.push(e[l]),n&&o.length>0&&!o[0].equals(o[o.length-1])&&o.push(new w(o[0].x,o[0].y)),o.length>0&&s.push(o),s}(o,t,r,i,n);e.length>0&&a.push(...e)}return a}function uZ(e,t,r){return new w(r,e.y+(r-e.x)/(t.x-e.x)*(t.y-e.y))}function u$(e,t,r){return new w(e.x+(r-e.y)/(t.y-e.y)*(t.x-e.x),r)}nM("FeatureIndex",uV,{omit:["rawTileData","sourceLayerCoder"]});class uX extends w{constructor(e,t,r,i){super(e,t),this.angle=r,void 0!==i&&(this.segment=i)}clone(){return new uX(this.x,this.y,this.angle,this.segment)}}function uK(e,t,r,i,n){if(void 0===t.segment||0===r)return!0;let a=t,o=t.segment+1,s=0;for(;s>-r/2;){if(--o<0)return!1;s-=e[o].dist(a),a=e[o]}s+=e[o].dist(e[o+1]),o++;let l=[],c=0;for(;si;)c-=l.shift().angleDelta;if(c>n)return!1;o++,s+=t.dist(r)}return!0}function uJ(e){let t=0;for(let r=0;re+t[1]-t[0],f=u.reduce(d,0),p=h.reduce(d,0),m=s-f,g=l-p,y=0,v=f,x=0,b=p,_=0,T=m,M=0,k=g;if(a.content&&i){let t=a.content,r=t[2]-t[0],i=t[3]-t[1];(a.textFitWidth||a.textFitHeight)&&(c=l8(e)),y=u1(u,0,t[0]),x=u1(h,0,t[1]),v=u1(u,t[0],t[2]),b=u1(h,t[1],t[3]),_=t[0]-y,M=t[1]-x,T=r-v,k=i-b}let A=c.x1,S=c.y1,E=c.x2-A,C=c.y2-S,L=(e,i,n,s)=>{var l,c,u,h,d,m,g,L,P,I,z,D,O,R,F,j;let B=(l=e.stretch-y,l/v*E+A),N=(c=e.fixed-_,u=T,h=e.stretch,c-u*h/f),U=(d=i.stretch-x,d/b*C+S),V=(m=i.fixed-M,g=k,L=i.stretch,m-g*L/p),q=(P=n.stretch-y,P/v*E+A),H=(I=n.fixed-_,z=T,D=n.stretch,I-z*D/f),G=(O=s.stretch-x,O/b*C+S),W=(R=s.fixed-M,F=k,j=s.stretch,R-F*j/p),Y=new w(B,U),Z=new w(q,U),$=new w(q,G),X=new w(B,G),K=new w(N/o,V/o),J=new w(H/o,W/o),Q=t*Math.PI/180;if(Q){let e=Math.sin(Q),t=Math.cos(Q),r=[t,-e,e,t];Y._matMult(r),Z._matMult(r),X._matMult(r),$._matMult(r)}let ee=e.stretch+e.fixed,et=i.stretch+i.fixed;return{tl:Y,tr:Z,bl:X,br:$,tex:{x:a.paddedRect.x+1+ee,y:a.paddedRect.y+1+et,w:n.stretch+n.fixed-ee,h:s.stretch+s.fixed-et},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:K,pixelOffsetBR:J,minFontScaleX:T/o/E,minFontScaleY:k/o/C,isSDF:r}};if(i&&(a.stretchX||a.stretchY)){let e=u2(u,m,f),t=u2(h,g,p);for(let r=0;r0&&(i=Math.max(10,i),this.circleDiameter=i)}else{let l=null!=(u=a.image)&&u.content&&(a.image.textFitWidth||a.image.textFitHeight)?l8(a):{x1:a.left,y1:a.top,x2:a.right,y2:a.bottom};l.y1=l.y1*o-s[0],l.y2=l.y2*o+s[2],l.x1=l.x1*o-s[3],l.x2=l.x2*o+s[1];let h=a.collisionPadding;if(h&&(l.x1-=h[0]*o,l.y1-=h[1]*o,l.x2+=h[2]*o,l.y2+=h[3]*o),c){let e=new w(l.x1,l.y1),t=new w(l.x2,l.y1),r=new w(l.x1,l.y2),i=new w(l.x2,l.y2),n=c*Math.PI/180;e._rotate(n),t._rotate(n),r._rotate(n),i._rotate(n),l.x1=Math.min(e.x,t.x,r.x,i.x),l.x2=Math.max(e.x,t.x,r.x,i.x),l.y1=Math.min(e.y,t.y,r.y,i.y),l.y2=Math.max(e.y,t.y,r.y,i.y)}e.emplaceBack(t.x,t.y,l.x1,l.y1,l.x2,l.y2,r,i,n)}this.boxEndIndex=e.length}}class u5{constructor(e=[],t=(e,t)=>et)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,i=t[e];for(;e>0;){let n=e-1>>1,a=t[n];if(r(i,a)>=0)break;t[e]=a,e=n}t[e]=i}_down(e){let{data:t,compare:r}=this,i=this.length>>1,n=t[e];for(;er(t[a],t[i])&&(i=a),r(t[i],n)>=0)break;t[e]=t[i],e=i}t[e]=n}}function u4(e,t){return t.max-e.max}class u6{constructor(e,t,r,i){this.p=new w(e,t),this.h=r,this.d=function(e,t){let r=!1,i=1/0;for(let n of t)for(let t=0,a=n.length,o=a-1;te.y!=s.y>e.y&&e.x<(s.x-a.x)*(e.y-a.y)/(s.y-a.y)+a.x&&(r=!r),i=Math.min(i,oL(e,a,s))}return(r?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}}e.aM=void 0,(Y=e.aM||(e.aM={}))[Y.center=1]="center",Y[Y.left=2]="left",Y[Y.right=3]="right",Y[Y.top=4]="top",Y[Y.bottom=5]="bottom",Y[Y["top-left"]=6]="top-left",Y[Y["top-right"]=7]="top-right",Y[Y["bottom-left"]=8]="bottom-left",Y[Y["bottom-right"]=9]="bottom-right";let u8=1/0;function u7(e,t){return t[1]!==u8?function(e,t,r){let i=0,n=0;switch(t=Math.abs(t),r=Math.abs(r),e){case"top-right":case"top-left":case"top":n=r-7;break;case"bottom-right":case"bottom-left":case"bottom":n=7-r}switch(e){case"top-right":case"bottom-right":case"right":i=-t;break;case"top-left":case"bottom-left":case"left":i=t}return[i,n]}(e,t[0],t[1]):function(e,t){let r=0,i=0;t<0&&(t=0);let n=t/Math.SQRT2;switch(e){case"top-right":case"top-left":i=n-7;break;case"bottom-right":case"bottom-left":i=7-n;break;case"bottom":i=7-t;break;case"top":i=t-7}switch(e){case"top-right":case"bottom-right":r=-n;break;case"top-left":case"bottom-left":r=n;break;case"left":r=t;break;case"right":r=-t}return[r,i]}(e,t[0])}function u9(e,t,r){var i;let n=e.layout,a=null==(i=n.get("text-variable-anchor-offset"))?void 0:i.evaluate(t,{},r);if(a){let e=a.values,t=[];for(let r=0;r24*e);i.startsWith("top")?n[1]-=7:i.startsWith("bottom")&&(n[1]+=7),t[r+1]=n}return new t2(t)}let o=n.get("text-variable-anchor");if(o){let i;i=void 0!==e._unevaluatedLayout.getValue("text-radial-offset")?[24*n.get("text-radial-offset").evaluate(t,{},r),u8]:n.get("text-offset").evaluate(t,{},r).map(e=>24*e);let a=[];for(let e of o)a.push(e,u7(e,i));return new t2(a)}return null}function he(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function ht(e,t,r,i,n,a,o,s,l,c,u,h,d,f,p){let m=function(e,t,r,i,n,a,o){let s=r.layout.get("text-rotate").evaluate(n,{})*Math.PI/180,l=[];for(let r of e.positionedLines)for(let n of r.positionedGlyphs){if(!n.rect)continue;let c=n.rect||{},u=4,h=!0,d=1,f=0,p=(i||o)&&n.vertical,m=n.metrics.advance*n.scale/2;if(o&&e.verticalizable&&(f=r.lineOffset/2-(n.imageName?-(24-n.metrics.width*n.scale)/2:(n.scale-1)*24)),n.imageName){let e=a[n.imageName];h=e.sdf,u=1/(d=e.pixelRatio)}let g=i?[n.x+m,n.y]:[0,0],y=i?[0,0]:[n.x+m+t[0],n.y+t[1]-f],v=[0,0];p&&(v=y,y=[0,0]);let x=n.metrics.isDoubleResolution?2:1,b=(n.metrics.left-u)*n.scale-m+y[0],_=(-n.metrics.top-u)*n.scale+y[1],T=b+c.w/x*n.scale/d,M=_+c.h/x*n.scale/d,k=new w(b,_),A=new w(T,_),S=new w(b,M),E=new w(T,M);if(p){let e=new w(-m,m- -17),t=-Math.PI/2,r=12-m,i=new w(22-r,-(n.imageName?r:0)),a=new w(...v);k._rotateAround(t,e)._add(i)._add(a),A._rotateAround(t,e)._add(i)._add(a),S._rotateAround(t,e)._add(i)._add(a),E._rotateAround(t,e)._add(i)._add(a)}if(s){let e=Math.sin(s),t=Math.cos(s),r=[t,-e,e,t];k._matMult(r),A._matMult(r),S._matMult(r),E._matMult(r)}let C=new w(0,0),L=new w(0,0);l.push({tl:k,tr:A,bl:S,br:E,tex:c,writingMode:e.writingMode,glyphOffset:g,sectionIndex:n.sectionIndex,isSDF:h,pixelOffsetTL:C,pixelOffsetBR:L,minFontScaleX:0,minFontScaleY:0})}return l}(r,s,n,a,o,i,e.allowVerticalPlacement),g=e.textSizeData,y=null;for(let r of("source"===g.kind?(y=[128*n.layout.get("text-size").evaluate(o,{})])[0]>32640&&eA(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`):"composite"===g.kind&&((y=[128*f.compositeTextSizes[0].evaluate(o,{},p),128*f.compositeTextSizes[1].evaluate(o,{},p)])[0]>32640||y[1]>32640)&&eA(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`),e.addSymbols(e.text,m,y,s,a,o,c,t,l.lineStartIndex,l.lineLength,d,p),u))h[r]=e.text.placedSymbolArray.length-1;return 4*m.length}function hr(e){for(let t in e)return e[t];return null}e.$=eN,e.A=K,e.B=nV,e.C=n_,e.D=nK,e.E=eQ,e.F=nh,e.G=function([e,t,r]){return t+=90,{x:e*Math.cos(t*=Math.PI/180)*Math.sin(r*=Math.PI/180),y:e*Math.sin(t)*Math.sin(r),z:e*Math.cos(r)}},e.H=rb,e.I=l2,e.J=nN,e.K=nv,e.L=function(e){if(null==eC){let t=e.navigator?e.navigator.userAgent:null;eC=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return eC},e.M=eH,e.N=class{constructor(e,t){this.target=e,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new cf(()=>this.process()),this.subscription=ez(this.target,"message",e=>this.receive(e),!1),this.globalScope=eE(self)?e:window}registerMessageHandler(e,t){this.messageHandlers[e]=t}unregisterMessageHandler(e){delete this.messageHandlers[e]}sendAsync(e,t){return new Promise((r,i)=>{let n=Math.round(1e18*Math.random()).toString(36).substring(0,10),a=t?ez(t.signal,"abort",()=>{a?.unsubscribe(),delete this.resolveRejects[n];let t={id:n,type:"",origin:location.origin,targetMapId:e.targetMapId,sourceMapId:this.mapId};this.target.postMessage(t)},cp):null;this.resolveRejects[n]={resolve:e=>{a?.unsubscribe(),r(e)},reject:e=>{a?.unsubscribe(),i(e)}};let o=[],s=Object.assign(Object.assign({},e),{id:n,sourceMapId:this.mapId,origin:location.origin,data:nE(e.data,o)});this.target.postMessage(s,{transfer:o})})}receive(e){let t=e.data,r=t.id,i=["file://","resource://android","null"],n=[t.origin,location.origin],a=t.origin===location.origin,o=n.some(e=>i.includes(e));if((a||o)&&(!t.targetMapId||this.mapId===t.targetMapId)){if(""===t.type){delete this.tasks[r];let e=this.abortControllers[r];return delete this.abortControllers[r],void(e&&e.abort())}if(eE(self)||t.mustQueue)return this.tasks[r]=t,this.taskQueue.push(r),void this.invoker.trigger();this.processTask(r,t)}}process(){if(0===this.taskQueue.length)return;let e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(e,t)}processTask(e,t){return _(this,void 0,void 0,function*(){if(""===t.type){let r=this.resolveRejects[e];return delete this.resolveRejects[e],r?void(t.error?r.reject(ed(nC(t.error))):r.resolve(nC(t.data))):void 0}if(!this.messageHandlers[t.type])return void this.completeTask(e,Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let r=nC(t.data),i=new AbortController;this.abortControllers[e]=i;try{let n=yield this.messageHandlers[t.type](t.sourceMapId,r,i);this.completeTask(e,null,n)}catch(t){this.completeTask(e,ed(t))}})}completeTask(e,t,r){let i=[];delete this.abortControllers[e];let n={id:e,type:"",sourceMapId:this.mapId,origin:location.origin,error:t?nE(t):null,data:nE(r,i)};this.target.postMessage(n,{transfer:i})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.O=function(){var e=new K(16);return K!=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},e.P=w,e.Q=function(e,t,r){var i,n,a,o,s,l,c,u,h,d,f,p,m=r[0],g=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*y+t[12],e[13]=t[1]*m+t[5]*g+t[9]*y+t[13],e[14]=t[2]*m+t[6]*g+t[10]*y+t[14],e[15]=t[3]*m+t[7]*g+t[11]*y+t[15]):(n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=i=t[0],e[1]=n,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=i*m+s*g+h*y+t[12],e[13]=n*m+l*g+d*y+t[13],e[14]=a*m+c*g+f*y+t[14],e[15]=o*m+u*g+p*y+t[15]),e},e.R=oX,e.S=function(e,t,r){var i=r[0],n=r[1],a=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.T=o5,e.U=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],m=t[12],g=t[13],y=t[14],v=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*i+b*s+_*h+w*m,e[1]=x*n+b*l+_*d+w*g,e[2]=x*a+b*c+_*f+w*y,e[3]=x*o+b*u+_*p+w*v,e[4]=(x=r[4])*i+(b=r[5])*s+(_=r[6])*h+(w=r[7])*m,e[5]=x*n+b*l+_*d+w*g,e[6]=x*a+b*c+_*f+w*y,e[7]=x*o+b*u+_*p+w*v,e[8]=(x=r[8])*i+(b=r[9])*s+(_=r[10])*h+(w=r[11])*m,e[9]=x*n+b*l+_*d+w*g,e[10]=x*a+b*c+_*f+w*y,e[11]=x*o+b*u+_*p+w*v,e[12]=(x=r[12])*i+(b=r[13])*s+(_=r[14])*h+(w=r[15])*m,e[13]=x*n+b*l+_*d+w*g,e[14]=x*a+b*c+_*f+w*y,e[15]=x*o+b*u+_*p+w*v,e},e.V=function(e,t){let r={};for(let i of t)i in e&&(r[i]=e[i]);return r},e.W=cm,e.X=ex,e.Y=cx,e.Z=cv,e._=_,e.a=eB,e.a$=function(e){var t=new K(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.a0=$,e.a1=X,e.a2=eI,e.a3=cS,e.a4=cb,e.a5=c_,e.a6=8192,e.a7=cT,e.a8=cC,e.a9=25,e.aA=function(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)},e.aB=function(e){return e[0]=0,e[1]=0,e},e.aC=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e},e.aD=ci,e.aE=eo,e.aF=function(e,t,r,i){let n=t.y-e.y,a=t.x-e.x,o=i.y-r.y,s=i.x-r.x,l=o*a-s*n;if(0===l)return null;let c=(s*(e.y-r.y)-o*(e.x-r.x))/l;return new w(e.x+c*a,e.y+c*n)},e.aG=uG,e.aH=ok,e.aI=function(e){let t=1/0,r=1/0,i=-1/0,n=-1/0;for(let a of e)t=Math.min(t,a.x),r=Math.min(r,a.y),i=Math.max(i,a.x),n=Math.max(n,a.y);return[t,r,i,n]},e.aJ=24,e.aK=eh,e.aL=function(e,t,r,i,n=!1){if(!r[0]&&!r[1])return[0,0];let a=n?"map"===i?-e.bearingInRadians:0:"viewport"===i?e.bearingInRadians:0;if(a){let e=Math.sin(a),t=Math.cos(a);r=[r[0]*t-r[1]*e,r[0]*e+r[1]*t]}return[n?r[0]:eh(t,r[0],e.zoom),n?r[1]:eh(t,r[1],e.zoom)]},e.aN=ce,e.aO=he,e.aP=l4,e.aQ=e=>"symbol"===e.type,e.aR=sG,e.aS=at,e.aT=sv,e.aU=aB,e.aV=a1,e.aW=aJ,e.aX=eO,e.aY=cw,e.aZ=en,e.a_=ei,e.aa=ck,e.ab=e=>{let t=window.document.createElement("video");return t.muted=!0,new Promise(r=>{for(let i of(t.onloadstart=()=>{r(t)},e)){let e=window.document.createElement("source");eZ(i)||(t.crossOrigin="Anonymous"),e.src=i,t.appendChild(e)}})},e.ac=e9,e.ad=function(){return e_++},e.ae=aE,e.af=co,e.ag=uF,e.ah=iV,e.ai=oT,e.aj=cP,e.ak=function(e){let t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(e,r,i,n)=>{let a=i||n;return t[r]=!a||a.toLowerCase(),""}),t["max-age"]){let e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t},e.al=ev,e.am=85.051129,e.an=eD,e.ao=function(e){return Math.pow(2,e)},e.ap=Q,e.aq=function(e,t){return e/cy(t)},e.ar=function(e){return Math.log(e)/Math.LN2},e.as=function(e){var t=e[0],r=e[1];return t*t+r*r},e.at=function(e){if(!e.length)return new Set;let t=Math.max(...e.map(e=>e.canonical.z)),r=1/0,i=-1/0,n=1/0,a=-1/0,o=[];for(let s of e){let{x:e,y:l,z:c}=s.canonical,u=Math.pow(2,t-c),h=e*u,d=l*u;o.push({id:s,x:h,y:d}),hi&&(i=h),da&&(a=d)}let s=new Set;for(let e of o)e.x!==r&&e.x!==i&&e.y!==n&&e.y!==a||s.add(e.id);return s},e.au=function(e,t){let r=Math.abs(2*e.wrap)-(e.wrap<0),i=Math.abs(2*t.wrap)-(t.wrap<0);return e.overscaledZ-t.overscaledZ||i-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x},e.av=class{constructor(e,t){this.max=e,this.onRemove=t,this.reset()}reset(){for(let e in this.data)for(let t of this.data[e])t.timeout&&clearTimeout(t.timeout),this.onRemove(t.value);return this.data={},this.order=[],this}add(e,t,r){let i=e.wrapped().key;void 0===this.data[i]&&(this.data[i]=[]);let n={value:t,timeout:void 0};if(void 0!==r&&(n.timeout=setTimeout(()=>{this.remove(e,n)},r)),this.data[i].push(n),this.order.push(i),this.order.length>this.max){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}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 t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){let t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;let r=e.wrapped().key,i=void 0===t?0:this.data[r].indexOf(t),n=this.data[r][i];return this.data[r].splice(i,1),n.timeout&&clearTimeout(n.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(n.value),this.order.splice(this.order.indexOf(r),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}filter(e){let t=[];for(let r in this.data)for(let i of this.data[r])e(i.value)||t.push(i);for(let e of t)this.remove(e.value.tileID,e)}},e.aw=function(e,t){let r=0,i=0;if("constant"===e.kind)i=e.layoutSize;else if("source"!==e.kind){let{interpolationType:n,minZoom:a,maxZoom:o}=e,s=n?ev(rv.interpolationFactor(n,t,a,o),0,1):0;"camera"===e.kind?i=rb.number(e.minSize,e.maxSize,s):r=s}return{uSizeT:r,uSize:i}},e.ay=function(e,{uSize:t,uSizeT:r},{lowerSize:i,upperSize:n}){return"source"===e.kind?i/128:"composite"===e.kind?rb.number(i/128,n/128,r):t},e.az=ec,e.b=eL,e.b$=ol,e.b0=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e},e.b1=function(e,t){var r=t[0],i=t[1],n=t[2],a=r*r+i*i+n*n;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e},e.b2=ea,e.b3=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},e.b4=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e},e.b5=et,e.b6=function(e,t,r){let i=t[0]*r[0]+t[1]*r[1]+t[2]*r[2];return 0===i?null:(-(e[0]*r[0]+e[1]*r[1]+e[2]*r[2])-r[3])/i},e.b7=et,e.b8=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e},e.b9=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]},e.bA=el,e.bB=function(e,t,r){var i=r[0],n=r[1],a=r[2],o=r[3],s=t[0],l=t[1],c=t[2],u=n*c-a*l,h=a*s-i*c,d=i*l-n*s;return e[0]=s+o*(u+=u)+n*(d+=d)-a*(h+=h),e[1]=l+o*h+a*u-i*d,e[2]=c+o*d+i*h-n*u,e},e.bC=function(e,t,r){var i,n,a,o,s,l,c;let u=(i=[e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2]])[0]*((c=i[8])*(a=i[4])-(o=i[5])*(l=i[7]))+i[1]*(-c*(n=i[3])+o*(s=i[6]))+i[2]*(l*n-a*s);if(0===u)return null;let h=ea([],[t[0],t[1],t[2]],[r[0],r[1],r[2]]),d=ea([],[r[0],r[1],r[2]],[e[0],e[1],e[2]]),f=ea([],[e[0],e[1],e[2]],[t[0],t[1],t[2]]),p=en([],h,-e[3]);return ei(p,p,en([],d,-t[3])),ei(p,p,en([],f,-r[3])),en(p,p,1/u),p},e.bD=6371008.8,e.bE=function(){return new Float64Array(4)},e.bF=function(e,t,r,i){var n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[0]*Math.cos(i)-n[1]*Math.sin(i),a[1]=n[0]*Math.sin(i)+n[1]*Math.cos(i),a[2]=n[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},e.bG=function(e,t,r,i){var n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[0],a[1]=n[1]*Math.cos(i)-n[2]*Math.sin(i),a[2]=n[1]*Math.sin(i)+n[2]*Math.cos(i),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},e.bH=function(e,t,r,i){var n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[2]*Math.sin(i)+n[0]*Math.cos(i),a[1]=n[1],a[2]=n[2]*Math.cos(i)-n[0]*Math.sin(i),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},e.bI=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n-c*i,e[1]=o*n-u*i,e[2]=s*n-h*i,e[3]=l*n-d*i,e[8]=a*i+c*n,e[9]=o*i+u*n,e[10]=s*i+h*n,e[11]=l*i+d*n,e},e.bJ=function(e,t){let r=ef(e,360),i=ef(t,360),n=i-r,a=i>r?n-360:n+360;return Math.abs(n)0?o:-o},e.bM=function(e,t){let r=ef(e,2*Math.PI),i=ef(t,2*Math.PI);return Math.min(Math.abs(r-i),Math.abs(r-i+2*Math.PI),Math.abs(r-i-2*Math.PI))},e.bN=function(){let e={},t=e0.$version;for(let r in e0.$root){let i=e0.$root[r];if(i.required){let n=null;null!=(n="version"===r?t:"array"===i.type?[]:{})&&(e[r]=n)}}return e},e.bO=eW,e.bP=nL,e.bQ=function e(t,r){if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(let i=0;i{e in t&&(r[e]=t[e])}),r}(e[r],t[e[r].ref]));return e},e.bT=function(e,t){if("custom"===e.type)return new cd(e,t);switch(e.type){case"background":return new ch(e,t);case"circle":return new oq(e,t);case"color-relief":return new o8(e,t);case"fill":return new sA(e,t);case"fill-extrusion":return new sU(e,t);case"heatmap":return new o0(e,t);case"hillshade":return new o2(e,t);case"line":return new lS(e,t);case"raster":return new n8(e,t);case"symbol":return new cc(e,t)}},e.bU=e=>"raster"===e.type,e.bV=eM,e.bW=function(e,t){if(!e)return[{command:"setStyle",args:[t]}];let r=[];try{if(!e2(e.version,t.version))return[{command:"setStyle",args:[t]}];e2(e.center,t.center)||r.push({command:"setCenter",args:[t.center]}),e2(e.state,t.state)||r.push({command:"setGlobalState",args:[t.state]}),e2(e.centerAltitude,t.centerAltitude)||r.push({command:"setCenterAltitude",args:[t.centerAltitude]}),e2(e.zoom,t.zoom)||r.push({command:"setZoom",args:[t.zoom]}),e2(e.bearing,t.bearing)||r.push({command:"setBearing",args:[t.bearing]}),e2(e.pitch,t.pitch)||r.push({command:"setPitch",args:[t.pitch]}),e2(e.roll,t.roll)||r.push({command:"setRoll",args:[t.roll]}),e2(e.sprite,t.sprite)||r.push({command:"setSprite",args:[t.sprite]}),e2(e.glyphs,t.glyphs)||r.push({command:"setGlyphs",args:[t.glyphs]}),e2(e.transition,t.transition)||r.push({command:"setTransition",args:[t.transition]}),e2(e.light,t.light)||r.push({command:"setLight",args:[t.light]}),e2(e.terrain,t.terrain)||r.push({command:"setTerrain",args:[t.terrain]}),e2(e.sky,t.sky)||r.push({command:"setSky",args:[t.sky]}),e2(e.projection,t.projection)||r.push({command:"setProjection",args:[t.projection]});let i={},n=[];!function(e,t,r,i){let n;for(n in t=t||{},e=e||{})Object.prototype.hasOwnProperty.call(e,n)&&(Object.prototype.hasOwnProperty.call(t,n)||e4(n,r,i));for(n in t){var a;Object.prototype.hasOwnProperty.call(t,n)&&(Object.prototype.hasOwnProperty.call(e,n)?e2(e[n],t[n])||("geojson"===e[n].type&&"geojson"===t[n].type&&function(e,t,r){let i;for(i in e[r])if(Object.prototype.hasOwnProperty.call(e[r],i)&&"data"!==i&&!e2(e[r][i],t[r][i]))return!1;for(i in t[r])if(Object.prototype.hasOwnProperty.call(t[r],i)&&"data"!==i&&!e2(e[r][i],t[r][i]))return!1;return!0}(e,t,n)?e3(r,{command:"setGeoJSONSourceData",args:[n,t[n].data]}):(a=t,e4(n,r,i),e5(n,a,r))):e5(n,t,r))}}(e.sources,t.sources,n,i);let a=[];e.layers&&e.layers.forEach(e=>{"source"in e&&i[e.source]?r.push({command:"removeLayer",args:[e.id]}):a.push(e)}),r=r.concat(n),function(e,t,r){t=t||[];let i=(e=e||[]).map(e8),n=t.map(e8),a=e.reduce(e7,{}),o=t.reduce(e7,{}),s=i.slice(),l=Object.create(null),c,u,h,d,f;for(let e=0,t=0;e1e-6?(o=Math.sin(n=Math.acos(a)),s=Math.sin((1-i)*n)/o,l=Math.sin(i*n)/o):(s=1-i,l=i),e[0]=s*c+l*f,e[1]=s*u+l*p,e[2]=s*h+l*m,e[3]=s*d+l*g,e},e.bm=function(e){var t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g;let y=new Float64Array(9);l=(t=e[0])*(a=t+t),c=(r=e[1])*a,h=(i=e[2])*a,d=i*(o=r+r),p=(n=e[3])*a,m=n*o,g=n*(s=i+i),y[0]=1-(u=r*o)-(f=i*s),y[3]=c-g,y[6]=h+m,y[1]=c+g,y[4]=1-l-f,y[7]=d-p,y[2]=h-m,y[5]=d+p,y[8]=1-l-u;let v=eO(-Math.asin(ev(y[2],-1,1))),x,b;return .001>Math.hypot(y[5],y[8])?(x=0,b=-eO(Math.atan2(y[3],y[4]))):(x=eO(0===y[5]&&0===y[8]?0:Math.atan2(y[5],y[8])),b=eO(0===y[1]&&0===y[0]?0:Math.atan2(y[1],y[0]))),{roll:x,pitch:v+90,bearing:b}},e.bn=function(e,t){return e.roll==t.roll&&e.pitch==t.pitch&&e.bearing==t.bearing},e.bo=tW,e.bp=oo,e.bq=-32768,e.br=32767,e.bs=sy,e.bt=ep,e.bu=em,e.bv=t5,e.bw=function(e,t,r,i,n){return ep(i,n,ev((e-t)/(r-t),0,1))},e.bx=function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e},e.by=ef,e.bz=function(){return new Float64Array(3)},e.c=eV,e.c$=iz,e.c0=class extends oa{constructor(e,t){super(e,t),this.current=oc}set(e){if(e[12]!==this.current[12]||e[0]!==this.current[0])return this.current=e,void this.gl.uniformMatrix4fv(this.location,!1,e);for(let t=1;t<16;t++)if(e[t]!==this.current[t]){this.current=e,this.gl.uniformMatrix4fv(this.location,!1,e);break}}},e.c1=os,e.c2=class extends oa{constructor(e,t){super(e,t),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]))}},e.c3=class extends oa{constructor(e,t){super(e,t),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]))}},e.c4=J,e.c5=function(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=-r,e[4]=i,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},e.c6=function(e,t,r){var i=t[0],n=t[1],a=t[2];return e[0]=i*r[0]+n*r[3]+a*r[6],e[1]=i*r[1]+n*r[4]+a*r[7],e[2]=i*r[2]+n*r[5]+a*r[8],e},e.c7=function(e,t,r,i,n,a,o){var s=1/(t-r),l=1/(i-n),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(n+i)*l,e[14]=(o+a)*c,e[15]=1,e},e.c8=class extends oa{constructor(e,t){super(e,t),this.current=[]}set(e){if(e!=this.current){this.current=e;let t=new Float32Array(4*e.length);for(let r=0;r25||i<0||i>=1||r<0||r>=1)},e.cE=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.cF=class extends an{},e.cG=eG,e.cH=function(e,t){eV.REGISTERED_PROTOCOLS[e]=t},e.cI=function(e){delete eV.REGISTERED_PROTOCOLS[e]},e.cJ=function(e,t){let r={};for(let i=0;i24*e)}let v=c?"center":a.get("text-justify").evaluate(o,{},t.canonical),b="point"===a.get("symbol-placement")?24*a.get("text-max-width").evaluate(o,{},t.canonical):1/0,_=()=>{t.bucket.allowVerticalPlacement&&nz(r)&&(g.vertical=l5(y,t.glyphMap,t.glyphPositions,t.imagePositions,d,b,l,h,"left",s,x,e.ax.vertical,!0,p,f))};if(!c&&m){let r=new Set;if("auto"===v)for(let e=0;e{d.x<0||d.x>=8192||d.y<0||d.y>=8192||function(t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w,T,M,k){let A=t.addToLineVertexArray(r,i),S,E,C,L,P=0,I=0,z=0,D=0,O=-1,R=-1,F={},j=ot("");if(t.allowVerticalPlacement&&n.vertical){let e=l.layout.get("text-rotate").evaluate(_,{},M)+90;C=new u3(c,r,u,h,d,n.vertical,f,p,m,e),s&&(L=new u3(c,r,u,h,d,s,y,v,m,e))}if(a){let i=l.layout.get("icon-rotate").evaluate(_,{}),n="none"!==l.layout.get("icon-text-fit"),o=u0(a,i,T,n),f=s?u0(s,i,T,n):void 0;E=new u3(c,r,u,h,d,a,y,v,!1,i),P=4*o.length;let p=t.iconSizeData,m=null;"source"===p.kind?(m=[128*l.layout.get("icon-size").evaluate(_,{})])[0]>32640&&eA(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`):"composite"===p.kind&&((m=[128*w.compositeIconSizes[0].evaluate(_,{},M),128*w.compositeIconSizes[1].evaluate(_,{},M)])[0]>32640||m[1]>32640)&&eA(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`),t.addSymbols(t.icon,o,m,b,x,_,e.ax.none,r,A.lineStartIndex,A.lineLength,-1,M),O=t.icon.placedSymbolArray.length-1,f&&(I=4*f.length,t.addSymbols(t.icon,f,m,b,x,_,e.ax.vertical,r,A.lineStartIndex,A.lineLength,-1,M),R=t.icon.placedSymbolArray.length-1)}let B=Object.keys(n.horizontal);for(let i of B){let a=n.horizontal[i];S||(j=ot(a.text),S=new u3(c,r,u,h,d,a,f,p,m,l.layout.get("text-rotate").evaluate(_,{},M)));let s=1===a.positionedLines.length;if(z+=ht(t,r,a,o,l,m,_,g,A,n.vertical?e.ax.horizontal:e.ax.horizontalOnly,s?B:[i],F,O,w,M),s)break}n.vertical&&(D+=ht(t,r,n.vertical,o,l,m,_,g,A,e.ax.vertical,["vertical"],F,R,w,M));let N=S?S.boxStartIndex:t.collisionBoxArray.length,U=S?S.boxEndIndex:t.collisionBoxArray.length,V=C?C.boxStartIndex:t.collisionBoxArray.length,q=C?C.boxEndIndex:t.collisionBoxArray.length,H=E?E.boxStartIndex:t.collisionBoxArray.length,G=E?E.boxEndIndex:t.collisionBoxArray.length,W=L?L.boxStartIndex:t.collisionBoxArray.length,Y=L?L.boxEndIndex:t.collisionBoxArray.length,Z=-1,$=(e,t)=>e?.circleDiameter?Math.max(e.circleDiameter,t):t;Z=$(S,-1),Z=$(C,Z),Z=$(E,Z);let X=+((Z=$(L,Z))>-1);X&&(Z*=k/24),t.glyphOffsetArray.length>=co.MAX_GLYPHS&&eA("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==_.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,_.sortKey);let K=u9(l,_,M),[J,Q]=function(t,r){let i=t.length,n=r?.values;if(n?.length>0)for(let r=0;r=0?F.right:-1,F.center>=0?F.center:-1,F.left>=0?F.left:-1,F.vertical||-1,O,R,j,N,U,V,q,H,G,W,Y,u,z,D,P,I,X,0,f,Z,J,Q)}(t,d,l,i,n,a,P,t.layers[0],t.collisionBoxArray,r.index,r.sourceLayerIndex,t.index,v,[T,T,T,T],A,c,b,M,S,m,r,o,u,h,s)};if("line"===E)for(let e of uG(r.geometry,0,0,8192,8192)){let r=s_(e,I);for(let e of function(e,t,r,i,n,a,o){let s=i?.6*24*a:0,l=uQ(i,n),c=l*a,u=0===e[0].x||8192===e[0].x||0===e[0].y||8192===e[0].y;return t-c=0&&y=0&&v=0&&f+u<=h){let r=new uX(y,v,m,e);r._round(),n&&!uK(t,r,o,n,a)||p.push(r)}}d+=l}return l||p.length||s||(p=e(t,d/2,i,n,a,o,s,!0,c)),p}(e,u?t/2*o%t:(l/2+48)*a*o%t,t,s,r,c,u,!1,8192)}(r,_,k,i.vertical||g,n,x,t.overscaling))g&&function(e,t,r,i){let n=e.compareText;if(t in n){let e=n[t];for(let t=e.length-1;t>=0;t--)if(i.dist(e[t])1){let t=s_(e,I),r=function(e,t,r,i,n){let a=r?.6*24*n:0,o=uQ(r,i)*n,s=0,l=uJ(e)/2;for(let r=0;rl){let u=(l-s)/c,h=new uX(rb.number(i.x,n.x,u),rb.number(i.y,n.y,u),n.angleTo(i),r);return h._round(),!a||uK(e,h,o,a,t)?h:void 0}s+=c}}(t,k,i.vertical||g,n,x);r&&z(t,r)}}else if("Polygon"===r.type)for(let e of rZ(r.geometry,0)){let t=function(e,t=1){let r=cC.fromPoints(e[0]),i=Math.min(r.width(),r.height()),n=i/2,a=new u5([],u4),{minX:o,minY:s,maxX:l,maxY:c}=r;if(0===i)return new w(o,s);for(let t=o;th.d||!h.d)&&(h=r),r.max-h.d<=t||(n=r.h/2,a.push(new u6(r.p.x-n,r.p.y-n,n,e)),a.push(new u6(r.p.x+n,r.p.y-n,n,e)),a.push(new u6(r.p.x-n,r.p.y+n,n,e)),a.push(new u6(r.p.x+n,r.p.y+n,n,e)))}return u.d>0&&h.d-u.d<=t?u.p:h.p}(e,16);z(s_(e[0],I,!0),new uX(t.x,t.y,0))}else if("LineString"===r.type)for(let e of r.geometry){let t=s_(e,I);z(t,new uX(t[0].x,t[0].y,0))}else if("Point"===r.type)for(let e of r.geometry)for(let t of e)z([t],new uX(t.x,t.y,0))}(t.bucket,o,g,v,t.imageMap,s,p,m,x,b,t.canonical,t.subdivisionGranularity)}t.showCollisionBoxes&&t.bucket.generateCollisionDebugBuffers()},e.cP=sM,e.cQ=sj,e.cR=lM,e.cS=function(e,t=""){let r=new lU;return function(e,t,r=""){for(let i in e.layers)t.writeMessage(3,(e,t)=>(function(e,t,r=""){t.writeVarintField(15,e.version||1),t.writeStringField(1,e.name||""),t.writeVarintField(5,e.extent||4096);let i={jsonPrefix:r,keys:[],values:[],keycache:{},valuecache:{}};for(let r=0;r=this.maxEntries){let e=this.map.keys().next().value;this.map.delete(e)}this.map.set(e,t)}clear(){this.map.clear()}},e.cV=sO,e.cW=lU,e.cX=uO,e.cY=function(e,t,r,a,o){return _(this,void 0,void 0,function*(){let s,l,c;if(X())try{return yield eI(e,t,r,a,o)}catch{}return s=e.width,l=e.height,i&&n||(n=(i=new OffscreenCanvas(s,l)).getContext("2d",{willReadFrequently:!0})),i.width=s,i.height=l,n.drawImage(e,0,0,s,l),c=n.getImageData(t,r,a,o),n.clearRect(0,0,s,l),c.data})},e.cZ=o4,e.c_=class{constructor(e,t){this.layers={[uF]:this},this.name=uF,this.version=t?t.version:1,this.extent=t?t.extent:4096,this.length=e.length,this.features=e}feature(e){return new uR(this.features[e],this.extent)}},e.ca=class extends ag{},e.cb=lI,e.cc=class extends av{},e.cd=oQ,e.ce=function(e){return e<=1?1:Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},e.cf=oJ,e.cg=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[3]*i+r[7]*n+r[11]*a+r[15];return e[0]=(r[0]*i+r[4]*n+r[8]*a+r[12])/(o=o||1),e[1]=(r[1]*i+r[5]*n+r[9]*a+r[13])/o,e[2]=(r[2]*i+r[6]*n+r[10]*a+r[14])/o,e},e.ch=class extends aa{},e.ci=class extends ak{},e.cj=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},e.ck=function(e,t){var r=e[0],i=e[1],n=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],f=e[11],p=e[12],m=e[13],g=e[14],y=e[15],v=t[0],x=t[1],b=t[2],_=t[3],w=t[4],T=t[5],M=t[6],k=t[7],A=t[8],S=t[9],E=t[10],C=t[11],L=t[12],P=t[13],I=t[14],z=t[15];return Math.abs(r-v)<=1e-6*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-x)<=1e-6*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(n-b)<=1e-6*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(a-_)<=1e-6*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(o-w)<=1e-6*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-T)<=1e-6*Math.max(1,Math.abs(s),Math.abs(T))&&Math.abs(l-M)<=1e-6*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(c-k)<=1e-6*Math.max(1,Math.abs(c),Math.abs(k))&&Math.abs(u-A)<=1e-6*Math.max(1,Math.abs(u),Math.abs(A))&&Math.abs(h-S)<=1e-6*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(d-E)<=1e-6*Math.max(1,Math.abs(d),Math.abs(E))&&Math.abs(f-C)<=1e-6*Math.max(1,Math.abs(f),Math.abs(C))&&Math.abs(p-L)<=1e-6*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(m-P)<=1e-6*Math.max(1,Math.abs(m),Math.abs(P))&&Math.abs(g-I)<=1e-6*Math.max(1,Math.abs(g),Math.abs(I))&&Math.abs(y-z)<=1e-6*Math.max(1,Math.abs(y),Math.abs(z))},e.cl=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.cm=e=>"circle"===e.type,e.cn=e=>"heatmap"===e.type,e.co=e=>"line"===e.type,e.cp=e=>"fill"===e.type,e.cq=e=>"fill-extrusion"===e.type,e.cr=e=>"hillshade"===e.type,e.cs=e=>"color-relief"===e.type,e.ct=e=>"background"===e.type,e.cu=e=>"custom"===e.type,e.cv=eg,e.cw=function(e,t,r){if(t<=0)return e;let i=1/t;return void 0===r||1e-10>Math.abs(r)?Math.round(e*i)/i:(r>0?Math.ceil(e*i-1e-9):Math.floor(e*i+1e-10))/i},e.cx=function(e,t,r){let i=eu(t.x-r.x,t.y-r.y),n=eu(e.x-r.x,e.y-r.y);return eO(Math.atan2(i[0]*n[1]-i[1]*n[0],i[0]*n[0]+i[1]*n[1]))},e.cy=ey,e.cz=function(e,t){var r;if(!eF[t])return!1;let i=e?.target,n=(null==(r=i?.ownerDocument)?void 0:r.defaultView)||window;return e instanceof n.MouseEvent||e instanceof n.WheelEvent},e.d=ed,e.d0=class{constructor(e,t){let r=(t=this.options=Object.assign({},lb,t)).debug;if(r&&console.time("preprocess data"),t.maxZoom<0||t.maxZoom>24)throw Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw Error("promoteId and generateId cannot be used together.");let i=sJ(e,t);r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles")),i=la(i,t),t.updateable&&(this.source=i),this.initializeIndex(i,t)}initializeIndex(e,t){this.tileIndex=t.cluster?new lu(t.clusterOptions):new lv(t),e.length&&this.tileIndex.initialize(e)}getTile(e,t,r){return t*=1,r*=1,(e*=1)<0||e>24?null:this.tileIndex.getTile(e,t,r)}updateData(e,t){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}=function(e,t,r){var i,n;let a=t?{removeAll:t.removeAll,remove:new Set(t.remove||[]),add:new Map(null==(i=t.add)?void 0:i.map(e=>[r.promoteId?e.properties[r.promoteId]:e.id,e])),update:new Map(null==(n=t.update)?void 0:n.map(e=>[e.id,e]))}:{remove:new Set,add:new Map,update:new Map},o=[];if(a.removeAll&&(o=e,e=[]),a.remove.size||a.add.size){let t=[];for(let r of e)(a.remove.has(r.id)||a.add.has(r.id))&&t.push(r);if(t.length){o.push(...t);let r=new Set(t.map(e=>e.id));e=e.filter(e=>!r.has(e.id))}if(a.add.size){let t=sJ({type:"FeatureCollection",features:Array.from(a.add.values())},r);t=la(t,r),o.push(...t),e.push(...t)}}if(a.update.size){let t=new Map,i=[];for(let r of e)a.update.has(r.id)?t.set(r.id,[...t.get(r.id)||[],r]):i.push(r);for(let[e,n]of a.update){let a=t.get(e);if(!a||0===a.length)continue;let s=function(e,t,r){var i,n;let a=!!t.newGeometry,o=t.removeAllProperties||(null==(i=t.removeProperties)?void 0:i.length)>0||(null==(n=t.addOrUpdateProperties)?void 0:n.length)>0;if(a){let i=e[0];return la(sJ({type:"FeatureCollection",features:[{type:"Feature",id:i.id,geometry:t.newGeometry,properties:o?ll(i.tags,t):i.tags}]},r),r)}if(o){let r=[];for(let i of e){let e=d({},i);e.tags=ll(e.tags,t),r.push(e)}return r}return e}(a,n,r);o.push(...a,...s),i.push(...s)}e=i}return{affected:o,source:e}}(this.source,e,r);t&&({affected:i,source:n}=this.filterUpdate(n,i,t)),i.length&&(this.source=n,this.tileIndex.updateIndex(n,i,r))}filterUpdate(e,t,r){let i=new Set;for(let n of e)null!=n.id&&(r(s5(n))||(t.push(n),i.add(n.id)));return{affected:t,source:e=e.filter(e=>!i.has(e.id))}}getData(){if(!this.options.updateable)throw Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map(e=>s5(e))}}updateClusterOptions(e,t){let r=this.options.cluster;this.options.cluster=e,this.options.clusterOptions=t,r!=e?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(e){return this.tileIndex.getClusterExpansionZoom(e)}getClusterChildren(e){return this.tileIndex.getChildren(e)}getClusterLeaves(e,t,r){return this.tileIndex.getLeaves(e,t,r)}},e.d1=nB,e.e=eb,e.f=eZ,e.g=eq,e.h=e=>_(void 0,void 0,void 0,function*(){if(0===e.byteLength)return createImageBitmap(new ImageData(1,1));let t=new Blob([new Uint8Array(e)],{type:"image/png"});try{return createImageBitmap(t)}catch(e){throw Error(`Could not load image because of ${ed(e).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),e.i=eE,e.j=e=>new Promise((t,r)=>{let i=new Image;i.onload=()=>{t(i),URL.revokeObjectURL(i.src),i.onload=null,window.requestAnimationFrame(()=>i.src=eP)},i.onerror=()=>r(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 n=new Blob([new Uint8Array(e)],{type:"image/png"});i.src=e.byteLength?URL.createObjectURL(n):eP}),e.k=(e,t)=>eY(eb(e,{type:"json"}),t),e.l=eJ,e.m=eY,e.n=eK,e.o=(e,t)=>eY(eb(e,{type:"arrayBuffer"}),t),e.p=l1,e.q=function(e){return new lU(e).readFields(lJ,[])},e.r=function(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))},e.s=ez,e.t=o$,e.u=n2,e.v=e0,e.w=eA,e.x=e0,e.y=nG,e.z=ny}),r("worker",["./shared"],function(e){class t{constructor(e,t){this.keyCache={},e&&this.replace(e,t)}replace(e,t){this._layerConfigs={},this._layers={},this.update(e,[],t)}update(t,r,i){for(let r of t){this._layerConfigs[r.id]=r;let t=this._layers[r.id]=e.bT(r,i);t._featureFilter=e.ah(t.filter,i),this.keyCache[r.id]&&delete this.keyCache[r.id]}for(let e of r)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];for(let t of(this.familiesBySource={},e.cJ(Object.values(this._layerConfigs),this.keyCache))){let r=t.map(e=>this._layers[e.id]),i=r[0];if(i.isHidden())continue;let n=i.source||"",a=this.familiesBySource[n];a||(a=this.familiesBySource[n]={});let o=i.sourceLayer||e.ag,s=a[o];s||(s=a[o]=[]),s.push(r)}}}class r{constructor(t){let r={},i=[];for(let e in t){let n=t[e],a=r[e]={};for(let e in n){let t=n[+e];if(!t||0===t.bitmap.width||0===t.bitmap.height)continue;let r={x:0,y:0,w:t.bitmap.width+2,h:t.bitmap.height+2};i.push(r),a[e]={rect:r,metrics:t.metrics}}}let{w:n,h:a}=e.p(i),o=new e.t({width:n||1,height:a||1});for(let i in t){let n=t[i];for(let t in n){let a=n[+t];if(!a||0===a.bitmap.width||0===a.bitmap.height)continue;let s=r[i][t].rect;e.t.copy(a.bitmap,o,{x:0,y:0},{x:s.x+1,y:s.y+1},a.bitmap)}}this.image=o,this.positions=r}}e.cK("GlyphAtlas",r);class i{constructor(t){this.tileID=new e.a3(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId,this.inFlightDependencies=[]}parse(t,i,a,o,s){return e._(this,void 0,void 0,function*(){this.status="parsing",this.data=t,this.collisionBoxArray=new e.ae;let l=new e.cL(Object.keys(t.layers).sort()),c=new e.cM(this.tileID,this.promoteId);c.bucketLayerIDs=[];let u={},h={featureIndex:c,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:a,subdivisionGranularity:s},d=i.familiesBySource[this.source];for(let r in d){let i=t.layers[r];if(!i)continue;1===i.version&&e.w(`Vector tile source "${this.source}" layer "${r}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let o=l.encode(r),s=[];for(let e=0;ee.id)))}}let f=e.bY(h.glyphDependencies,e=>Object.keys(e).map(Number));for(let e of this.inFlightDependencies)e?.abort();this.inFlightDependencies=[];let p=Promise.resolve({});if(Object.keys(f).length){let e=new AbortController;this.inFlightDependencies.push(e),p=o.sendAsync({type:"GG",data:{stacks:f,source:this.source,tileID:this.tileID,type:"glyphs"}},e)}let m=Object.keys(h.iconDependencies),g=Promise.resolve({});if(m.length){let e=new AbortController;this.inFlightDependencies.push(e),g=o.sendAsync({type:"GI",data:{icons:m,source:this.source,tileID:this.tileID,type:"icons"}},e)}let y=Object.keys(h.patternDependencies),v=Promise.resolve({});if(y.length){let e=new AbortController;this.inFlightDependencies.push(e),v=o.sendAsync({type:"GI",data:{icons:y,source:this.source,tileID:this.tileID,type:"patterns"}},e)}let x=h.dashDependencies,b=Promise.resolve({});if(Object.keys(x).length){let e=new AbortController;this.inFlightDependencies.push(e),b=o.sendAsync({type:"GDA",data:{dashes:x}},e)}let[_,w,T,M]=yield Promise.all([p,g,v,b]),k=new r(_),A=new e.cN(w,T);for(let t in u){let r=u[t];r instanceof e.af?(n(r.layers,this.zoom,a),e.cO({bucket:r,glyphMap:_,glyphPositions:k.positions,imageMap:w,imagePositions:A.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:h.subdivisionGranularity})):r.hasDependencies&&(r instanceof e.cP||r instanceof e.cQ||r instanceof e.cR)&&(n(r.layers,this.zoom,a),r.addFeatures(h,this.tileID.canonical,A.patternPositions,M))}return this.status="done",{buckets:Object.values(u).filter(e=>!e.isEmpty()),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:k.image,imageAtlas:A,dashPositions:M,glyphMap:this.returnDependencies?_:null,iconMap:this.returnDependencies?w:null,glyphPositions:this.returnDependencies?k.positions:null}})}}function n(t,r,i){let n=new e.J(r);for(let e of t)e.recalculate(n,i)}class a{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(e,t){this.loading[e]=t}finishLoading(e){delete this.loading[e]}abort(e){let t=this.loading[e];t?.abort&&(t.abort.abort(),delete this.loading[e])}setParsing(e,t){this.parsing[e]=t}consumeParsing(e){let t=this.parsing[e];if(t)return delete this.parsing[e],t}clearParsing(e){delete this.parsing[e]}markLoaded(e,t){this.loaded[e]=t}getLoaded(e){let t=this.loaded[e];if(t)return t}removeLoaded(e){delete this.loaded[e]}clearLoaded(){this.loaded={}}}class o{constructor(e){this.start=`${e}#start`,this.end=`${e}#end`,this.measure=e,performance.mark(this.start)}finish(){performance.mark(this.end);let e=performance.getEntriesByName(this.measure);return 0===e.length&&(performance.measure(this.measure,this.start,this.end),e=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),e}}class s{constructor(e,t,r,i,n){this.type=e,this.properties=r||{},this.extent=n,this.pointsArray=t,this.id=i}loadGeometry(){return this.pointsArray.map(t=>t.map(t=>new e.P(t.x,t.y)))}}class l{constructor(e,t,r){this.version=2,this._myFeatures=e,this.name=t,this.length=e.length,this.extent=r}feature(e){return this._myFeatures[e]}}class c{constructor(){this.layers={}}addLayer(e){this.layers[e.name]=e}}function u(t){let r=e.cS(t);return 0===r.byteOffset&&r.byteLength===r.buffer.byteLength||(r=new Uint8Array(r)),{vectorTile:t,rawData:r.buffer}}class h{constructor(t,r,i){this.actor=t,this.layerIndex=r,this.availableImages=i,this.tileState=new a,this.overzoomedTileResultCache=new e.cU(1e3)}loadVectorTile(t,r){try{return{vectorTile:"mlt"!==t.encoding?new e.cV(new e.cW(r)):new e.cX(r),rawData:r}}catch(a){let i=new Uint8Array(r),n=`Unable to parse the tile at ${t.request.url}, `;throw Error(n+=31===i[0]&&139===i[1]?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${e.d(a).message}`)}}loadTile(t){return e._(this,void 0,void 0,function*(){let{uid:r,overzoomParameters:n}=t;n&&(t.request=n.overzoomRequest);let a=this._startRequestTiming(t),o=new i(t);this.tileState.startLoading(r,o);let s=new AbortController;o.abort=s;try{let i=yield e.o(t.request,s);if(t.etag&&t.etag===i.etag)return this.tileState.finishLoading(r),this._getEtagUnmodifiedResult(i,a);let l=this.loadVectorTile(t,i.data);if(this.tileState.finishLoading(r),!l)return null;let{vectorTile:c,rawData:u}=l;n&&({vectorTile:c,rawData:u}=this._getOverzoomTile(t,c));let h=this._getExpiryData(i),d=this._finishRequestTiming(a);o.vectorTile=c,this.tileState.markLoaded(r,o);let f={rawData:u,cacheControl:h,resourceTiming:d};this.tileState.setParsing(r,f);try{return yield this._parseWorkerTile(o,t,f)}finally{this.tileState.clearParsing(r)}}catch(e){throw this.tileState.finishLoading(r),o.status="done",this.tileState.markLoaded(r,o),e}})}_getEtagUnmodifiedResult(t,r){let i=this._getExpiryData(t),n=this._finishRequestTiming(r);return e.e({etagUnmodified:!0},i,n)}_parseWorkerTile(t,r,i){return e._(this,void 0,void 0,function*(){let n=yield t.parse(t.vectorTile,this.layerIndex,this.availableImages,this.actor,r.subdivisionGranularity);if(i){let{rawData:t,cacheControl:a,resourceTiming:o}=i;n=e.e({rawTileData:t.slice(0),encoding:r.encoding},n,a,o)}return n})}_getExpiryData({expires:e,cacheControl:t,etag:r}){let i={};return e&&(i.expires=e),t&&(i.cacheControl=t),r&&(i.etag=r),i}_startRequestTiming(e){var t;if(null!=(t=e.request)&&t.collectResourceTiming)return new o(e.request.url)}_finishRequestTiming(e){let t=e?.finish();return t?{resourceTiming:JSON.parse(JSON.stringify(t))}:{}}_getOverzoomTile(t,r){var i;let{tileID:n,source:a,overzoomParameters:o}=t,{maxZoomTileID:h}=o,d=`${h.key}_${n.key}_${null==(i=t.request)?void 0:i.url}`,f=this.overzoomedTileResultCache.get(d);if(f)return f;let p=new c,m=this.layerIndex.familiesBySource[a];for(let t in m){let i=r.layers[t];if(!i)continue;let a=function(t,r,i){let{extent:n}=t,a=Math.pow(2,i.z-r.z),o=(i.x-r.x*a)*n,c=(i.y-r.y*a)*n,u=[];for(let r=0;r0&&p.addLayer(a)}let g=u(p);return this.overzoomedTileResultCache.set(d,g),g}reloadTile(t){return e._(this,void 0,void 0,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.showCollisionBoxes=t.showCollisionBoxes,"parsing"===r.status){let i=this.tileState.consumeParsing(e);return yield this._parseWorkerTile(r,t,i)}if("done"===r.status&&r.vectorTile)return yield this._parseWorkerTile(r,t)})}abortTile(t){return e._(this,void 0,void 0,function*(){this.tileState.abort(t.uid)})}removeTile(t){return e._(this,void 0,void 0,function*(){this.tileState.removeLoaded(t.uid)})}}class d{constructor(){this.loaded={}}loadTile(t){return e._(this,void 0,void 0,function*(){let{uid:r,encoding:i,rawImageData:n,redFactor:a,greenFactor:o,blueFactor:s,baseShift:l}=t,c=n.width+2,u=n.height+2,h=e.b(n)?new e.R({width:c,height:u},(yield e.cY(n,-1,-1,c,u))):n,d=new e.cZ(r,h,i,a,o,s,l);return this.loaded||(this.loaded={}),this.loaded[r]=d,d})}removeTile(e){let t=this.loaded,r=e.uid;t?.[r]&&delete t[r]}}class f{constructor(e,t,r,i=p){this.actor=e,this.layerIndex=t,this.availableImages=r,this.tileState=new a,this._createGeoJSONIndex=i}loadVectorTile(t){if(!this._geoJSONIndex)throw Error("Unable to parse the data into a cluster or geojson");let{z:r,x:i,y:n}=t.tileID.canonical,a=this._geoJSONIndex.getTile(r,i,n);return a?u(new e.c_(a.features,{version:2,extent:e.a6})):null}loadTile(t){return e._(this,void 0,void 0,function*(){let{uid:e}=t,r=new i(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 o={rawData:a};this.tileState.setParsing(e,o);try{return yield this._parseWorkerTile(r,t,o)}finally{this.tileState.clearParsing(e)}}catch(t){throw r.status="done",this.tileState.markLoaded(e,r),t}})}_reloadLoadedTile(t){return e._(this,void 0,void 0,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.showCollisionBoxes=t.showCollisionBoxes,"parsing"===r.status){let i=this.tileState.consumeParsing(e);return yield this._parseWorkerTile(r,t,i)}if("done"===r.status&&r.vectorTile)return yield this._parseWorkerTile(r,t)})}_parseWorkerTile(t,r,i){return e._(this,void 0,void 0,function*(){let n=yield t.parse(t.vectorTile,this.layerIndex,this.availableImages,this.actor,r.subdivisionGranularity);if(i){let{rawData:t}=i;n=e.e({rawTileData:t.slice(0),encoding:"mvt"},n)}return n})}abortTile(t){return e._(this,void 0,void 0,function*(){this.tileState.abort(t.uid)})}removeTile(t){return e._(this,void 0,void 0,function*(){this.tileState.removeLoaded(t.uid)})}loadData(t){return e._(this,void 0,void 0,function*(){var r;null==(r=this._pendingRequest)||r.abort();let i=this._startRequestTiming(t);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(t,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let e={};return t.request&&(e.data=t.data),this._finishRequestTiming(i,t,e),e}catch(t){if(delete this._pendingRequest,!e.$(t))throw t;return{abandoned:!0}}})}_startRequestTiming(e){var t;if(null!=(t=e.request)&&t.collectResourceTiming)return new o(e.request.url)}_finishRequestTiming(e,t,r){let i=e?.finish();i&&(r.resourceTiming={[t.source]:JSON.parse(JSON.stringify(i))})}reloadTile(e){return this.tileState.getLoaded(e.uid)?this._reloadLoadedTile(e):this.loadTile(e)}loadAndProcessGeoJSON(t,r){return e._(this,void 0,void 0,function*(){if(t.request&&(t.data=(yield e.k(t.request,r)).data),t.data)return t.data=this._filterGeoJSON(t.data,t.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(t.data,t));if(t.dataDiff)return null!=this._geoJSONIndex||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},t)),void this._geoJSONIndex.updateData(t.dataDiff,this._getFilterPredicate(t.filter));if(t.updateCluster&&this._geoJSONIndex.updateClusterOptions(t.geojsonVtOptions.cluster,m(t)),null==this._geoJSONIndex)throw Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`)})}_filterGeoJSON(e,t){if("FeatureCollection"!==e.type)return e;let r=this._getFilterPredicate(t);return r?{type:"FeatureCollection",features:e.features.filter(e=>r(e))}:e}_getFilterPredicate(t){if("boolean"!=typeof t&&!t?.length)return;let r=e.c$(t,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===r.result)throw Error(r.value.map(e=>`${e.key}: ${e.message}`).join(", "));return e=>r.value.evaluate({zoom:0},e)}removeSource(t){return e._(this,void 0,void 0,function*(){var e;null==(e=this._pendingRequest)||e.abort()})}getClusterExpansionZoom(e){return this._geoJSONIndex.getClusterExpansionZoom(e.clusterId)}getClusterChildren(e){return this._geoJSONIndex.getClusterChildren(e.clusterId)}getClusterLeaves(e){return this._geoJSONIndex.getClusterLeaves(e.clusterId,e.limit,e.offset)}}function p(t,r){let i=e.e(r.geojsonVtOptions||{},{updateable:!0,clusterOptions:m(r)});return new e.d0(t,i)}function m({geojsonVtOptions:t,clusterProperties:r}){if(!r||!t.clusterOptions)return t.clusterOptions;let i={},n={},a={accumulated:null,zoom:0},o={properties:null},s=Object.keys(r);for(let t of s){let[a,o]=r[t],s=e.c$(o),l=e.c$("string"==typeof a?[a,["accumulated"],["get",t]]:a);i[t]=s.value,n[t]=l.value}return t.clusterOptions.map=e=>{o.properties=e;let t={};for(let e of s)t[e]=i[e].evaluate(a,o);return t},t.clusterOptions.reduce=(e,t)=>{for(let r of(o.properties=t,s))a.accumulated=e[r],e[r]=n[r].evaluate(a,o)},t.clusterOptions}class g{constructor(t){this.self=t,this.actor=new e.N(t),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(e,t)=>{if(this.externalWorkerSourceTypes[e])throw Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=t},this.self.addProtocol=e.cH,this.self.removeProtocol=e.cI,this.self.registerRTLTextPlugin=t=>{e.d1.setMethods(t)},this.self.makeRequest=e.m,this.actor.registerMessageHandler("LDT",(e,t)=>this._getDEMWorkerSource(e,t.source).loadTile(t)),this.actor.registerMessageHandler("RDT",(t,r)=>e._(this,void 0,void 0,function*(){this._getDEMWorkerSource(t,r.source).removeTile(r)})),this.actor.registerMessageHandler("GCEZ",(t,r)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,r.type,r.source).getClusterExpansionZoom(r)})),this.actor.registerMessageHandler("GCC",(t,r)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,r.type,r.source).getClusterChildren(r)})),this.actor.registerMessageHandler("GCL",(t,r)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,r.type,r.source).getClusterLeaves(r)})),this.actor.registerMessageHandler("LD",(e,t)=>this._getWorkerSource(e,t.type,t.source).loadData(t)),this.actor.registerMessageHandler("LT",(e,t)=>this._getWorkerSource(e,t.type,t.source).loadTile(t)),this.actor.registerMessageHandler("RT",(e,t)=>this._getWorkerSource(e,t.type,t.source).reloadTile(t)),this.actor.registerMessageHandler("AT",(e,t)=>this._getWorkerSource(e,t.type,t.source).abortTile(t)),this.actor.registerMessageHandler("RMT",(e,t)=>this._getWorkerSource(e,t.type,t.source).removeTile(t)),this.actor.registerMessageHandler("RS",(t,r)=>e._(this,void 0,void 0,function*(){var e,i;if(!(null!=(i=null==(e=this.workerSources[t])?void 0:e[r.type])&&i[r.source]))return;let n=this.workerSources[t][r.type][r.source];delete this.workerSources[t][r.type][r.source],void 0!==n.removeSource&&n.removeSource(r)})),this.actor.registerMessageHandler("RM",t=>e._(this,void 0,void 0,function*(){delete this.layerIndexes[t],delete this.availableImages[t],delete this.workerSources[t],delete this.demWorkerSources[t],this.globalStates.delete(t)})),this.actor.registerMessageHandler("SR",(t,r)=>e._(this,void 0,void 0,function*(){this.referrer=r})),this.actor.registerMessageHandler("SRPS",(e,t)=>this._syncRTLPluginState(e,t)),this.actor.registerMessageHandler("IS",(t,r)=>e._(this,void 0,void 0,function*(){this.self.importScripts(r)})),this.actor.registerMessageHandler("SI",(e,t)=>this._setImages(e,t)),this.actor.registerMessageHandler("UL",(t,r)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(t).update(r.layers,r.removedIds,this._getGlobalState(t))})),this.actor.registerMessageHandler("UGS",(t,r)=>e._(this,void 0,void 0,function*(){let e=this._getGlobalState(t);for(let t in r)e[t]=r[t]})),this.actor.registerMessageHandler("SL",(t,r)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(t).replace(r,this._getGlobalState(t))}))}_getGlobalState(e){let t=this.globalStates.get(e);return t||(t={},this.globalStates.set(e,t)),t}_setImages(t,r){return e._(this,void 0,void 0,function*(){for(let e in this.availableImages[t]=r,this.workerSources[t]){let i=this.workerSources[t][e];for(let e in i)i[e].availableImages=r}})}_syncRTLPluginState(t,r){return e._(this,void 0,void 0,function*(){return yield e.d1.syncState(r,this.self.importScripts)})}_getAvailableImages(e){let t=this.availableImages[e];return t||(t=[]),t}_getLayerIndex(e){let r=this.layerIndexes[e];return r||(r=this.layerIndexes[e]=new t),r}_getWorkerSource(e,t,r){var i,n;if((i=this.workerSources)[e]||(i[e]={}),(n=this.workerSources[e])[t]||(n[t]={}),!this.workerSources[e][t][r]){let i={sendAsync:(t,r)=>(t.targetMapId=e,this.actor.sendAsync(t,r))};switch(t){case"vector":this.workerSources[e][t][r]=new h(i,this._getLayerIndex(e),this._getAvailableImages(e));break;case"geojson":this.workerSources[e][t][r]=new f(i,this._getLayerIndex(e),this._getAvailableImages(e));break;default:this.workerSources[e][t][r]=new this.externalWorkerSourceTypes[t](i,this._getLayerIndex(e),this._getAvailableImages(e))}}return this.workerSources[e][t][r]}_getDEMWorkerSource(e,t){var r,i;return(r=this.demWorkerSources)[e]||(r[e]={}),(i=this.demWorkerSources[e])[t]||(i[t]=new d),this.demWorkerSources[e][t]}}return e.i(self)&&(self.worker=new g(self)),g}),r("index",["exports","./shared"],function(e,t){let r,i,n;var a,o,s,l,c,u,h="5.24.0";function d(){var e=new t.A(4);return t.A!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}let f,p,m,g={frame(e,r,i,n){let a=n||window,o=a.requestAnimationFrame(e=>{s(),r(e)}),{unsubscribe:s}=t.s(e.signal,"abort",()=>{s(),a.cancelAnimationFrame(o),i(new t.a(e.signal.reason))},!1)},frameAsync(e,t){return new Promise((r,i)=>{this.frame(e,r,i,t)})},getImageData(e,t=0){return this.getImageCanvasContext(e).getImageData(-t,-t,e.width+2*t,e.height+2*t)},getImageCanvasContext(e){let t=window.document.createElement("canvas"),r=t.getContext("2d",{willReadFrequently:!0});if(!r)throw Error("failed to create canvas 2d context");return t.width=e.width,t.height=e.height,r.drawImage(e,0,0,e.width,e.height),r},resolveURL:e=>(f||(f=document.createElement("a")),f.href=e,f.href),hardwareConcurrency:"u">typeof navigator&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return void 0!==m?m:!!matchMedia&&(null!=p||(p=matchMedia("(prefers-reduced-motion: reduce)")),p.matches)},set prefersReducedMotion(de){m=de}},y=new class{constructor(){this._frozenAt=null}getCurrentTime(){return null!==this._frozenAt?this._frozenAt:performance.now()}setNow(e){this._frozenAt=e}restoreNow(){this._frozenAt=null}isFrozen(){return null!==this._frozenAt}};function v(){return y.getCurrentTime()}class x{static create(e,t,r){let i=window.document.createElement(e);return void 0!==t&&(i.className=t),r&&r.appendChild(i),i}static createNS(e,t){return window.document.createElementNS(e,t)}static disableDrag(){x.docStyle&&x.selectProp&&(x.userSelect=x.docStyle[x.selectProp],x.docStyle[x.selectProp]="none")}static enableDrag(){x.docStyle&&x.selectProp&&(x.docStyle[x.selectProp]=x.userSelect)}static suppressClickInternal(e){e.preventDefault(),e.stopPropagation(),window.removeEventListener("click",x.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",x.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",x.suppressClickInternal,!0)},0)}static getScale(e){let t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}static getPoint(e,r,i){let n=r.boundingClientRect;return new t.P((i.clientX-n.left)/r.x-e.clientLeft,(i.clientY-n.top)/r.y-e.clientTop)}static mousePos(e,t){let r=x.getScale(e);return x.getPoint(e,r,t)}static touchPos(e,t){let r=[],i=x.getScale(e);for(let n of t)r.push(x.getPoint(e,i,n));return r}static sanitize(e){let t=new DOMParser().parseFromString(e,"text/html").body||document.createElement("body");for(let e of t.querySelectorAll("script"))e.remove();return x.clean(t),t.innerHTML}static isPossiblyDangerous(e,t){let r=t.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(e)||!r.includes("javascript:")&&!r.includes("data:"))||!!e.startsWith("on")||void 0}static clean(e){for(let t of e.children)x.removeAttributes(t),x.clean(t)}static removeAttributes(e){for(let{name:t,value:r}of e.attributes)x.isPossiblyDangerous(t,r)&&e.removeAttribute(t)}}x.docStyle="u">typeof window&&(null==(s=window.document)?void 0:s.documentElement.style),x.selectProp=!x.docStyle||"userSelect"in x.docStyle?"userSelect":"webkitUserSelect",function(e){let r,i,n,a;e.resetRequestQueue=()=>{r=[],i=0,n=0,a={}},e.addThrottleControl=e=>{let t=n++;return a[t]=e,t},e.removeThrottleControl=e=>{delete a[e],s()},e.getImage=(e,i,n=!0)=>new Promise((a,o)=>{e.headers||(e.headers={}),e.headers.accept="image/webp,*/*",t.e(e,{type:"image"}),r.push({abortController:i,requestParameters:e,supportImageRefresh:n,state:"queued",onError:e=>{o(e)},onSuccess:e=>{a(e)}}),s()});let o=e=>t._(this,void 0,void 0,function*(){var r;e.state="running";let{requestParameters:n,supportImageRefresh:a,onError:o,onSuccess:c,abortController:u}=e,h=!1===a&&!t.i(self)&&!t.g(n.url)&&(!n.headers||Object.keys(n.headers).reduce((e,t)=>e&&"accept"===t,!0));i++;let d=h?l(n,u):t.m(n,u);try{let i=yield d;delete e.abortController,e.state="completed",i.data instanceof HTMLImageElement||t.b(i.data)?c(i):i.data&&c({data:yield(r=i.data,"function"==typeof createImageBitmap?t.h(r):t.j(r)),cacheControl:i.cacheControl,expires:i.expires})}catch(r){delete e.abortController,o(t.d(r))}finally{i--,s()}}),s=()=>{let e=(()=>{for(let e of Object.keys(a))if(a[e]())return!0;return!1})()?t.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:t.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let t=i;t0;t++){let e=r.shift();e.abortController.signal.aborted?t--:o(e)}},l=(e,r)=>new Promise((i,n)=>{let a=new Image,o=e.url,s=e.credentials;s&&"include"===s?a.crossOrigin="use-credentials":(s&&"same-origin"===s||!t.f(o))&&(a.crossOrigin="anonymous"),r.signal.addEventListener("abort",()=>{a.src="",n(new t.a(r.signal.reason))}),a.fetchPriority="high",a.onload=()=>{a.onerror=a.onload=null,i({data:a})},a.onerror=()=>{a.onerror=a.onload=null,r.signal.aborted||n(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."))},a.src=o})}(l||(l={})),l.resetRequestQueue();class b{constructor(e){this._transformRequestFn=e??null}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function _(e){let t=[];if("string"==typeof e)t.push({id:"default",url:e});else if(e&&e.length>0){let r=[];for(let{id:i,url:n}of e){let e=`${i}${n}`;r.includes(e)||(r.push(e),t.push({id:i,url:n}))}}return t}function w(e,t,r){try{let i=new URL(e);return i.pathname+=`${t}${r}`,i.toString()}catch{throw Error(`Invalid sprite URL "${e}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}class T extends t.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0}destroy(){for(let e of(this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null),Object.keys(this.images)))this.removeImage(e);this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(let{ids:e,promiseResolve:t}of this.requestors)t(this._getImagesForIds(e));this.requestors=[]}}getImage(e){let r=this.images[e];if(r&&!r.data&&r.spriteData){let e=r.spriteData;r.data=new t.R({width:e.width,height:e.height},e.context.getImageData(e.x,e.y,e.width,e.height).data),r.spriteData=null}return r}addImage(e,t){if(this.images[e])throw Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,t)&&(this.images[e]=t)}_validate(e,r){let i=!0,n=r.data||r.spriteData;return this._validateStretch(r.stretchX,n?.width)||(this.fire(new t.l(Error(`Image "${e}" has invalid "stretchX" value`))),i=!1),this._validateStretch(r.stretchY,n?.height)||(this.fire(new t.l(Error(`Image "${e}" has invalid "stretchY" value`))),i=!1),this._validateContent(r.content,r)||(this.fire(new t.l(Error(`Image "${e}" has invalid "content" value`))),i=!1),i}_validateStretch(e,t){if(!e)return!0;let r=0;for(let i of e){if(i[0]=e[1]))}updateImage(e,t,r=!0){let i=this.getImage(e);if(r&&(i.data.width!==t.data.width||i.data.height!==t.data.height))throw Error(`size mismatch between old image (${i.data.width}x${i.data.height}) and new image (${t.data.width}x${t.data.height}).`);t.version=i.version+1,this.images[e]=t,this.updatedImages[e]=!0}removeImage(e){var t;let r=this.images[e];delete this.images[e],delete this.patterns[e],null!=(t=r.userImage)&&t.onRemove&&r.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(e){return new Promise((t,r)=>{let i=!0;if(!this.isLoaded())for(let t of e)this.images[t]||(i=!1);this.isLoaded()||i?t(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:t})})}_getImagesForIds(e){var r;let i={};for(let n of e){let e=this.getImage(n);e||(this.fire(new t.n("styleimagemissing",{id:n})),e=this.getImage(n)),e?i[n]={data:e.data.clone(),pixelRatio:e.pixelRatio,sdf:e.sdf,version:e.version,stretchX:e.stretchX,stretchY:e.stretchY,content:e.content,textFitWidth:e.textFitWidth,textFitHeight:e.textFitHeight,hasRenderCallback:!!(null!=(r=e.userImage)&&r.render)}:t.w(`Image "${n}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return i}getPixelSize(){let{width:e,height:t}=this.atlasImage;return{width:e,height:t}}getPattern(e){let r=this.patterns[e],i=this.getImage(e);if(!i)return null;if(r&&r.position.version===i.version)return r.position;if(r)r.position.version=i.version;else{let r={w:i.data.width+2,h:i.data.height+2,x:0,y:0},n=new t.I(r,i);this.patterns[e]={bin:r,position:n}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){let r=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.T(e,this.atlasImage,r.RGBA),this.atlasTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}_updatePatternAtlas(){let e=[];for(let t in this.patterns)e.push(this.patterns[t].bin);let{w:r,h:i}=t.p(e),n=this.atlasImage;for(let e in n.resize({width:r||1,height:i||1}),this.patterns){let{bin:r}=this.patterns[e],i=r.x+1,a=r.y+1,o=this.getImage(e).data,s=o.width,l=o.height;t.R.copy(o,n,{x:0,y:0},{x:i,y:a},{width:s,height:l}),t.R.copy(o,n,{x:0,y:l-1},{x:i,y:a-1},{width:s,height:1}),t.R.copy(o,n,{x:0,y:0},{x:i,y:a+l},{width:s,height:1}),t.R.copy(o,n,{x:s-1,y:0},{x:i-1,y:a},{width:1,height:l}),t.R.copy(o,n,{x:0,y:0},{x:i+s,y:a},{width:1,height:l})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(let r of e){if(this.callbackDispatchedThisFrame[r])continue;this.callbackDispatchedThisFrame[r]=!0;let e=this.getImage(r);e||t.w(`Image with ID: "${r}" was not found`),function(e){let{userImage:t}=e;return!(!t?.render||!t.render()||(e.data.replace(new Uint8Array(t.data.buffer)),0))}(e)&&this.updateImage(r,e)}}cloneImages(){let e={};for(let t in this.images){let r=this.images[t];e[t]=Object.assign(Object.assign({},r),{data:r.data?r.data.clone():null})}return e}}let M=new Float64Array(256);for(let e=0;e<256;e++){let t=.5-Math.pow(e/255,.45454545454545453);M[e]=t*Math.abs(t)}function k(e,t,r,i,n,a,o,s,l){for(let c=t;c-1);a[++l]=s,o[l]=c,o[l+1]=1e20}for(let s=0,l=0;s/[-\w]+/.test(e)?e:`'${CSS.escape(e)}'`).join(",");return new E.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:r,fontWeight:this._fontWeight(t[0]),fontStyle:this._fontStyle(t[0]),lang:this.lang})}_fontStyle(e){return/italic/i.test(e)?"italic":/oblique/i.test(e)?"oblique":"normal"}_fontWeight(e){let t;for(let[r,i]of Object.entries({thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950}))RegExp(`\\b${r}\\b`,"i").test(e)&&(t=`${i}`);return t}destroy(){for(let e in this.entries){let t=this.entries[e];t.tinySDF=null,t.ideographTinySDF=null,t.glyphs={},t.requests={},t.ranges={}}this.entries={}}}E.loadGlyphRange=function(e,r,i,n){return t._(this,void 0,void 0,function*(){let a=256*r,o=a+255,s=yield n.transformRequest(i.replace("{fontstack}",e).replace("{range}",`${a}-${o}`),"Glyphs"),l=yield t.o(s,new AbortController);if(!l?.data)throw Error(`Could not load glyph range. range: ${r}, ${a}-${o}`);let c={};for(let e of t.q(l.data))c[e.id]=e;return c})},E.TinySDF=class{constructor({fontSize:e=24,buffer:t=3,radius:r=8,cutoff:i=.25,fontFamily:n="sans-serif",fontWeight:a="normal",fontStyle:o="normal",lang:s=null}={}){this.buffer=t,this.radius=r,this.cutoff=i,this.lang=s;let l=this.size=e+4*t,c=this._createCanvas(l),u=this.ctx=c.getContext("2d",{willReadFrequently:!0});u.font=`${o} ${a} ${e}px ${n}`,u.textBaseline="alphabetic",u.textAlign="left",u.fillStyle="black",this.gridOuter=new Float64Array(l*l),this.gridInner=new Float64Array(l*l),this.f=new Float64Array(l),this.z=new Float64Array(l+1),this.v=new Uint16Array(l)}_createCanvas(e){if("u">typeof OffscreenCanvas)return new OffscreenCanvas(e,e);let t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){let{width:t,actualBoundingBoxAscent:r,actualBoundingBoxDescent:i,actualBoundingBoxLeft:n,actualBoundingBoxRight:a}=this.ctx.measureText(e),o=Math.ceil(r),s=Math.floor(n),l=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(a)-s)),c=Math.max(0,Math.min(this.size-this.buffer,o+Math.ceil(i))),u=l+2*this.buffer,h=c+2*this.buffer,d=Math.max(u*h,0),f=new Uint8ClampedArray(d),p={data:f,width:u,height:h,glyphWidth:l,glyphHeight:c,glyphTop:o,glyphLeft:s,glyphAdvance:t};if(0===l||0===c)return p;let{ctx:m,buffer:g,gridInner:y,gridOuter:v}=this;this.lang&&(m.lang=this.lang),m.clearRect(g,g,l,c),m.fillText(e,g-s,g+o);let x=m.getImageData(g,g,l,c);v.fill(1e20,0,d),y.fill(0,0,d);let b=3;for(let e=0;e1&&(o=e[++a]);let l=Math.min(Math.abs(s-o.left),Math.abs(s-o.right)),c,u=t/r*(i+1);if(o.isDash){let e=i-Math.abs(u);c=Math.sqrt(l*l+e*e)}else c=i-Math.sqrt(l*l+u*u);this.data[n+s]=Math.max(0,Math.min(255,c+128))}}}addRegularDash(e){for(let t=e.length-1;t>=0;--t){let r=e[t],i=e[t+1];r.zeroLength?e.splice(t,1):i&&i.isDash===r.isDash&&(i.left=r.left,e.splice(t,1))}let t=e[0],r=e[e.length-1];t.isDash===r.isDash&&(t.left=r.left-this.width,r.right=t.right+this.width);let i=this.width*this.nextRow,n=0,a=e[0];for(let t=0;t1&&(a=e[++n]);let r=Math.min(Math.abs(t-a.left),Math.abs(t-a.right));this.data[i+t]=Math.max(0,Math.min(255,(a.isDash?r:-r)+128))}}addDash(e,r){let i=7*!!r,n=2*i+1;if(this.nextRow+n>this.height)return t.w("LineAtlas out of space"),null;let a=0;for(let t of e)a+=t;if(0!==a){let t=this.width/a,n=this.getDashRanges(e,this.width,t);r?this.addRoundDash(n,t,i):this.addRegularDash(n)}let o={y:this.nextRow+i,height:2*i,width:a};return this.nextRow+=n,this.dirty=!0,o}bind(e){let t=e.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.ALPHA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,this.width,this.height,0,t.ALPHA,t.UNSIGNED_BYTE,this.data))}}let D="maplibre_preloaded_worker_pool";class O{constructor(){this.active={}}acquire(e){if(!this.workers)for(this.workers=[];this.workers.lengtht.m(r,i)),j}function V(e,t){let r=e.tileID,i=t.tileID;return r.overscaledZ-i.overscaledZ||r.canonical.y-i.canonical.y||r.wrap-i.wrap||r.canonical.x-i.canonical.x}function q(e,t){let r=e.feature,i=t.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=i}function H(e,r,i,n){return t._(this,void 0,void 0,function*(){let a=e;if(e.url?a=(yield t.k((yield r.transformRequest(e.url,"Source")),i)).data:yield g.frameAsync(i,n),!a)return null;let o=t.V(t.e(a,e),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in a&&a.vector_layers&&(o.vectorLayerIds=a.vector_layers.map(e=>e.id)),o})}class G{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):Array.isArray(e)&&(4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof t.W?new t.W(e.lng,e.lat):t.W.convert(e),this}setSouthWest(e){return this._sw=e instanceof t.W?new t.W(e.lng,e.lat):t.W.convert(e),this}extend(e){let r=this._sw,i=this._ne,n,a;if(e instanceof t.W)n=e,a=e;else{if(!(e instanceof G))return Array.isArray(e)?4===e.length||e.every(Array.isArray)?this.extend(G.convert(e)):this.extend(t.W.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(t.W.convert(e)):this;if(n=e._sw,a=e._ne,!n||!a)return this}return r||i?(r.lng=Math.min(n.lng,r.lng),r.lat=Math.min(n.lat,r.lat),i.lng=Math.max(a.lng,i.lng),i.lat=Math.max(a.lat,i.lat)):(this._sw=new t.W(n.lng,n.lat),this._ne=new t.W(a.lng,a.lat)),this}getCenter(){return new t.W((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new t.W(this.getWest(),this.getNorth())}getSouthEast(){return new t.W(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(e){let{lng:r,lat:i}=t.W.convert(e),n=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(n=this._sw.lng>=r&&r>=this._ne.lng),this._sw.lat<=i&&i<=this._ne.lat&&n}intersects(e){if(!((e=G.convert(e)).getNorth()>=this.getSouth()&&e.getSouth()<=this.getNorth()))return!1;let r=Math.abs(this.getEast()-this.getWest()),i=Math.abs(e.getEast()-e.getWest());if(r>=360||i>=360)return!0;let n=t.X(this.getWest(),-180,180),a=t.X(this.getEast(),-180,180),o=t.X(e.getWest(),-180,180),s=t.X(e.getEast(),-180,180),l=n>a,c=o>s;return!(!l||!c)||(l?s>=n||o<=a:c?a>=o||n<=s:o<=a&&s>=n)}static convert(e){return e instanceof G?e:e&&new G(e)}static fromLngLat(e,r=0){let i=360*r/0x2637f09,n=i/Math.cos(Math.PI/180*e.lat);return new G(new t.W(e.lng-n,e.lat-i),new t.W(e.lng+n,e.lat+i))}adjustAntiMeridian(){let e=new t.W(this._sw.lng,this._sw.lat),r=new t.W(this._ne.lng,this._ne.lat);return new G(e,e.lng>r.lng?new t.W(r.lng+360,r.lat):r)}}class W{constructor(e,t,r){this.bounds=G.convert(this.validateBounds(e)),this.minzoom=t||0,this.maxzoom=r||24}validateBounds(e){return Array.isArray(e)&&4===e.length?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){let r=Math.pow(2,e.z),i=Math.floor(t.Z(this.bounds.getWest())*r),n=Math.floor(t.Y(this.bounds.getNorth())*r),a=Math.ceil(t.Z(this.bounds.getEast())*r),o=Math.ceil(t.Y(this.bounds.getSouth())*r);return e.x>=i&&e.x=n&&e.y{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return t.e({},this._options)}loadTile(e){return t._(this,void 0,void 0,function*(){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),r={request:yield this.map._requestManager.transformRequest(t,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(e),etag:e.etag};r.request.collectResourceTiming=this._collectResourceTiming;let i="RT";if(e.actor&&"expired"!==e.state){if("loading"===e.state)return new Promise((t,r)=>{e.reloadPromise={resolve:t,reject:r}})}else e.actor=this.dispatcher.getActor(),i="LT";e.abortController=new AbortController;try{let t=yield e.actor.sendAsync({type:i,data:r},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,t);let n={};return t?.etagUnmodified&&(n.unmodified=!0),n}catch(t){if(delete e.abortController,e.aborted)return;if(t&&404!==t.status)throw t;this._afterTileLoadWorkerResponse(e,null)}})}_getOverzoomParameters(e){return t._(this,void 0,void 0,function*(){if(e.tileID.canonical.z<=this.maxzoom||void 0===this.map._zoomLevelsToOverscale)return;let t=e.tileID.scaledTo(this.maxzoom).canonical,r=t.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:t,overzoomRequest:yield this.map._requestManager.transformRequest(r,"Tile")}})}_afterTileLoadWorkerResponse(e,t){if(t?.resourceTiming&&(e.resourceTiming=t.resourceTiming),t&&this.map._refreshExpiredTiles&&e.setExpiryData(t),e.etag=t?.etag,e.loadVectorData(t,this.map.painter),e.reloadPromise){let t=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(t.resolve).catch(t.reject)}}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Z extends t.E{constructor(e,r,i,n){super(),this.id=e,this.dispatcher=i,this.setEventedParent(n),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.e({type:"raster"},r),t.e(this,t.V(r,["url","scheme","tileSize"]))}load(){return t._(this,arguments,void 0,function*(e=!1){this._loaded=!1,this.fire(new t.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let r=yield H(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,r&&(t.e(this,r),r.bounds&&(this.tileBounds=new W(r.bounds,this.minzoom,this.maxzoom)),this.fire(new t.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:e})))}catch(e){this._tileJSONRequest=null,this._loaded=!0,t.$(e)||this.fire(new t.l(t.d(e)))}})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return t.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return t._(this,void 0,void 0,function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{let i=yield l.getImage((yield this.map._requestManager.transformRequest(r,"Tile")),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(i?.data){this.map._refreshExpiredTiles&&(i.cacheControl||i.expires)&&e.setExpiryData({cacheControl:i.cacheControl,expires:i.expires});let r=this.map.painter.context,n=r.gl,a=i.data;e.texture=this.map.painter.getTileTexture(a.width),e.texture?e.texture.update(a,{useMipmap:!0}):(e.texture=new t.T(r,a,n.RGBA,{useMipmap:!0}),e.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE,n.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}})}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)})}hasTransition(){return!1}}class $ extends Z{constructor(e,r,i,n){super(e,r,i,n),this.type="raster-dem",this.maxzoom=22,this._options=t.e({type:"raster-dem"},r),this.encoding=r.encoding||"mapbox",this.redFactor=r.redFactor,this.greenFactor=r.greenFactor,this.blueFactor=r.blueFactor,this.baseShift=r.baseShift}loadTile(e){return t._(this,void 0,void 0,function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),i=yield this.map._requestManager.transformRequest(r,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{let r=yield l.getImage(i,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(r?.data){let i=r.data;this.map._refreshExpiredTiles&&(r.cacheControl||r.expires)&&e.setExpiryData({cacheControl:r.cacheControl,expires:r.expires});let n=t.b(i)&&t.a0()?i:yield this.readImageNow(i),a={type:this.type,uid:e.uid,source:this.id,rawImageData:n,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(e.actor&&"expired"!==e.state&&"reloading"!==e.state)return;e.actor&&"expired"!==e.state||(e.actor=this.dispatcher.getActor()),e.dem=yield e.actor.sendAsync({type:"LDT",data:a}),e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}})}readImageNow(e){return t._(this,void 0,void 0,function*(){if("u">typeof VideoFrame&&t.a1()){let r=e.width+2,i=e.height+2;try{return new t.R({width:r,height:i},(yield t.a2(e,-1,-1,r,i)))}catch{}}return g.getImageData(e,1)})}_getNeighboringTiles(e){let r=e.canonical,i=Math.pow(2,r.z),n=(r.x-1+i)%i,a=0===r.x?e.wrap-1:e.wrap,o=(r.x+1+i)%i,s=r.x+1===i?e.wrap+1:e.wrap,l={};return l[new t.a3(e.overscaledZ,a,r.z,n,r.y).key]={backfilled:!1},l[new t.a3(e.overscaledZ,s,r.z,o,r.y).key]={backfilled:!1},r.y>0&&(l[new t.a3(e.overscaledZ,a,r.z,n,r.y-1).key]={backfilled:!1},l[new t.a3(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.a3(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+1[e.id,e])),i.update=new Map(null==(r=e.update)?void 0:r.map(e=>[e.id,e])),i}function J(e){return"GeometryCollection"===e.type?e.geometries.flatMap(e=>J(e)):function e(t){return t&&0!==t.length?"number"==typeof t[0]?[t]:t.flatMap(t=>e(t)):[]}(e.coordinates)}function Q(e){let t=new G,r;switch(e.type){case"FeatureCollection":r=e.features.flatMap(e=>J(e.geometry));break;case"Feature":r=J(e.geometry);break;default:r=J(e)}if(0===r.length)return t;for(let e of r){let[r,i]=e;t.extend([r,i])}return t}class ee extends t.E{constructor(e,r,i,n){super(),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:r.data},this.actor=i.getActor(),this.setEventedParent(n),this._data="string"==typeof r.data?{url:r.data}:{geojson:r.data},this._options=t.e({},r),this._collectResourceTiming=r.collectResourceTiming,void 0!==r.maxzoom&&(this.maxzoom=r.maxzoom),r.type&&(this.type=r.type),r.attribution&&(this.attribution=r.attribution),this.promoteId=r.promoteId,void 0!==r.clusterMaxZoom&&this.maxzoom<=r.clusterMaxZoom&&t.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${r.clusterMaxZoom}".`),this.workerOptions=t.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(void 0!==r.buffer?r.buffer:128),tolerance:this._pixelsToTileUnits(void 0!==r.tolerance?r.tolerance:.375),extent:t.a6,maxZoom:this.maxzoom,lineMetrics:r.lineMetrics||!1,generateId:r.generateId||!1,promoteId:"string"==typeof r.promoteId?r.promoteId:void 0,cluster:r.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(r.clusterMaxZoom),minPoints:Math.max(2,r.clusterMinPoints||2),extent:t.a6,radius:this._pixelsToTileUnits(r.clusterRadius||50),log:!1,generateId:r.generateId||!1}},clusterProperties:r.clusterProperties,filter:r.filter},r.workerOptions)}_hasPendingWorkerUpdate(){return void 0!==this._pendingWorkerUpdate.data||void 0!==this._pendingWorkerUpdate.diff||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(e){return e*(t.a6/this.tileSize)}_getClusterMaxZoom(e){let r=e?Math.round(e):this.maxzoom-1;return Number.isInteger(e)||void 0===e||t.w(`Integer expected for option 'clusterMaxZoom': provided value "${e}" rounded to "${r}"`),r}load(){return t._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(e){this.map=e,this.load()}setData(e,t){this._data="string"==typeof e?{url:e}:{geojson:e},this._pendingWorkerUpdate={data:e};let r=this._updateWorkerData();return t?r:this}updateData(e,t){this._pendingWorkerUpdate.diff=function(e,t){let r;if(!e)return t||{};if(!t)return e||{};let i=K(e),n=K(t);for(let e of(n.removeAll&&(i.add.clear(),i.update.clear(),i.remove.clear(),n.remove.clear()),n.remove))i.add.delete(e),i.update.delete(e);for(let[e,t]of n.update){let r=i.update.get(e);r&&(n.update.set(e,function(e,t){let r={id:e.id};if(t.removeAllProperties&&(delete e.removeProperties,delete e.addOrUpdateProperties,delete t.removeProperties),t.removeProperties)for(let r of t.removeProperties){let t=e.addOrUpdateProperties.findIndex(e=>e.key===r);t>-1&&e.addOrUpdateProperties.splice(t,1)}return(e.removeAllProperties||t.removeAllProperties)&&(r.removeAllProperties=!0),(e.removeProperties||t.removeProperties)&&(r.removeProperties=[...e.removeProperties||[],...t.removeProperties||[]]),(e.addOrUpdateProperties||t.addOrUpdateProperties)&&(r.addOrUpdateProperties=[...e.addOrUpdateProperties||[],...t.addOrUpdateProperties||[]]),(e.newGeometry||t.newGeometry)&&(r.newGeometry=t.newGeometry||e.newGeometry),r}(r,t)),i.update.delete(e))}let a={};if((i.removeAll||n.removeAll)&&(a.removeAll=!0),a.remove=new Set([...i.remove,...n.remove]),a.add=new Map([...i.add,...n.add]),a.update=new Map([...i.update,...n.update]),a.remove.size&&a.add.size)for(let e of a.add.keys())a.remove.delete(e);return r={},a.removeAll&&(r.removeAll=a.removeAll),a.remove&&(r.remove=Array.from(a.remove)),a.add&&(r.add=Array.from(a.add.values())),a.update&&(r.update=Array.from(a.update.values())),r}(this._pendingWorkerUpdate.diff,e);let r=this._updateWorkerData();return t?r:this}getData(){return t._(this,void 0,void 0,function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}})}getBounds(){return t._(this,void 0,void 0,function*(){return Q((yield this.getData()))})}setClusterOptions(e){return this.workerOptions.geojsonVtOptions.cluster=e.cluster,void 0!==e.clusterRadius&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(e.clusterRadius)),void 0!==e.clusterMaxZoom&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(e.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(e){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:e,source:this.id}})}getClusterChildren(e){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:e,source:this.id}})}getClusterLeaves(e,t,r){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:e,limit:t,offset:r}})}_updateWorkerData(){return t._(this,void 0,void 0,function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void t.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:e,diff:r,updateCluster:i}=this._pendingWorkerUpdate,n=this._getLoadGeoJSONParameters(e,r,i);void 0!==e?this._pendingWorkerUpdate.data=void 0:r?this._pendingWorkerUpdate.diff=void 0:i&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(n)})}_getLoadGeoJSONParameters(e,r,i){return t._(this,void 0,void 0,function*(){let n=t.e({type:this.type},this.workerOptions);return"string"==typeof e?(n.request=yield this.map._requestManager.transformRequest(g.resolveURL(e),"Source"),n.request.collectResourceTiming=this._collectResourceTiming,n):void 0!==e?(n.data=e,n):r?(n.dataDiff=r,n):i?(n.updateCluster=!0,n):void 0})}_dispatchWorkerUpdate(e){return t._(this,void 0,void 0,function*(){this._isUpdatingWorker=!0,this.fire(new t.n("dataloading",{dataType:"source"}));try{let r=yield e,i=yield this.actor.sendAsync({type:"LD",data:r});if(this._isUpdatingWorker=!1,this._removed||i.abandoned)return void this.fire(new t.n("dataabort",{dataType:"source"}));i.data&&(this._data={geojson:i.data});let n=this._applyDiffToSource(r.dataDiff),a=this._getShouldReloadTileOptions(n),o={dataType:"source"};this._applyResourceTiming(o,i),this.fire(new t.n("data",Object.assign(Object.assign({},o),{sourceDataType:"metadata"}))),this.fire(new t.n("data",Object.assign(Object.assign({},o),{sourceDataType:"content",shouldReloadTileOptions:a})))}catch(e){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new t.n("dataabort",{dataType:"source"}));this.fire(new t.l(t.d(e)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}})}_applyResourceTiming(e,r){var i;if(!this._collectResourceTiming)return;let n=null==(i=r.resourceTiming)?void 0:i[this.id];if(!n)return;let a=n.slice(0);a?.length&&t.e(e,{resourceTiming:a})}_applyDiffToSource(e){if(!e)return;let t="string"==typeof this.promoteId?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let e=function(e,t){let r=new Map;if(null==e||null==e.type)return r;if("Feature"===e.type){let i=X(e,t);return null==i?void 0:(r.set(i,e),r)}if("FeatureCollection"===e.type){let i=new Set;for(let n of e.features){let e=X(n,t);if(null==e||i.has(e))return;i.add(e),r.set(e,n)}return r}}(this._data.geojson,t);if(!e)throw Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:e}}if(!this._data.updateable)return;let r=function(e,t,r){var i,n;let a=[];if(t.removeAll)e.clear();else if(t.remove)for(let r of t.remove){let t=e.get(r);t&&(a.push(t.geometry),e.delete(r))}if(t.add)for(let i of t.add){let t=X(i,r);if(null==t)continue;let n=e.get(t);n&&a.push(n.geometry),a.push(i.geometry),e.set(t,i)}if(t.update)for(let r of t.update){let t=e.get(r.id);if(!t)continue;let o=!!r.newGeometry,s=r.removeAllProperties||(null==(i=r.removeProperties)?void 0:i.length)>0||(null==(n=r.addOrUpdateProperties)?void 0:n.length)>0;if(!o&&!s)continue;a.push(t.geometry);let l=Object.assign({},t);if(e.set(r.id,l),o&&(a.push(r.newGeometry),l.geometry=r.newGeometry),s){if(l.properties=r.removeAllProperties?{}:Object.assign({},l.properties||{}),r.removeProperties)for(let e of r.removeProperties)delete l.properties[e];if(r.addOrUpdateProperties)for(let{key:e,value:t}of r.addOrUpdateProperties)l.properties[e]=t}}return a}(this._data.updateable,e,t);return e.removeAll||this._options.cluster?void 0:r}_getShouldReloadTileOptions(e){if(e)return{affectedBounds:e.filter(Boolean).map(e=>Q(e))}}shouldReloadTile(e,{affectedBounds:r}){if("loading"===e.state)return!0;if("unloaded"===e.state)return!1;let{buffer:i,extent:n}=this.workerOptions.geojsonVtOptions,a=function({x:e,y:r,z:i},n=0){return new G([t.a4((e-n)/Math.pow(2,i)),t.a5((r+1+n)/Math.pow(2,i))],[t.a4((e+1+n)/Math.pow(2,i)),t.a5((r-n)/Math.pow(2,i))])}(e.tileID.canonical,i/n);for(let e of r)if(a.intersects(e))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(e){return t._(this,void 0,void 0,function*(){let t=e.actor?"RT":"LT";e.actor=this.actor;let r={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};e.abortController=new AbortController;let i=yield this.actor.sendAsync({type:t,data:r},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(i,this.map.painter,"RT"===t)})}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return t.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class et extends t.E{constructor(e,t,r,i){super(),this.flippedWindingOrder=!1,this.id=e,this.dispatcher=r,this.coordinates=t.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=t}load(e){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let t=yield l.getImage((yield this.map._requestManager.transformRequest(this.url,"Image")),this._request);this._request=null,this._loaded=!0,t?.data&&(this.image=t.data,e&&(this.coordinates=e),this._finishLoading())}catch(e){this._request=null,this._loaded=!0,t.$(e)||this.fire(new t.l(t.d(e)))}})}loaded(){return this._loaded}updateImage(e){return e.url&&(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally(()=>this.texture=null)),this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){var r;let i,n,a;this.coordinates=e;let o=e.map(t.a7.fromLngLat);return this.tileID=(a=Math.pow(2,n=Math.max(0,Math.floor(-Math.log(Math.max((i=t.a8.fromPoints(o)).width(),i.height()))/Math.LN2))),new t.aa(n,Math.floor((i.minX+i.maxX)/2*a),Math.floor((i.minY+i.maxY)/2*a))),this.terrainTileRanges=this._getOverlappingTileRanges(o),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=o.map(e=>this.tileID.getTilePoint(e)._round()),this.flippedWindingOrder=((r=this.tileCoords)[1].x-r[0].x)*(r[2].y-r[0].y)-(r[1].y-r[0].y)*(r[2].x-r[0].x)<0,this.fire(new t.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;let e=this.map.painter.context,r=e.gl;this.texture||(this.texture=new t.T(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let i=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,i=!0)}i&&this.fire(new t.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return t._(this,void 0,void 0,function*(){var t;null!=(t=this.tileID)&&t.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(e){let{minX:r,minY:i,maxX:n,maxY:a}=t.a8.fromPoints(e),o={};for(let e=0;e<=t.a9;e++){let t=Math.pow(2,e),s=Math.floor(r*t),l=Math.floor(i*t),c=Math.floor(n*t),u=Math.floor(a*t),h=(s%t+t)%t,d=c%t,f=Math.floor(s/t),p=Math.floor(c/t);o[e]={minWrap:f,maxWrap:p,minTileXWrapped:h,maxTileXWrapped:d,minTileY:l,maxTileY:u}}return o}}class er extends et{constructor(e,t,r,i){super(e,t,r,i),this._onPlayingHandler=()=>{var e;null==(e=this.map)||e.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=t}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1;let e=this.options;for(let t of(this.urls=[],e.urls))this.urls.push((yield this.map._requestManager.transformRequest(t,"Source")).url);try{let e=yield t.ab(this.urls);if(this._loaded=!0,!e)return;this.video=e,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(e){this.fire(new t.l(t.d(e)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){let r=this.video.seekable;er.end(0)?this.fire(new t.l(new t.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${r.start(0)} and ${r.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;let e=this.map.painter.context,r=e.gl;this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.T(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let i=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,i=!0)}i&&this.fire(new t.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class ei extends et{constructor(e,r,i,n){super(e,r,i,n),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some(e=>!Array.isArray(e)||2!==e.length||e.some(e=>"number"!=typeof e))||this.fire(new t.l(new t.ac(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.l(new t.ac(`sources.${e}`,null,'missing required property "coordinates"'))),r.animate&&"boolean"!=typeof r.animate&&this.fire(new t.l(new t.ac(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r.canvas||r.canvas instanceof HTMLCanvasElement||this.fire(new t.l(new t.ac(`sources.${e}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.l(new t.ac(`sources.${e}`,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}load(){return t._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.l(Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||0===Object.keys(this.tiles).length)return;let r=this.map.painter.context,i=r.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new t.T(r,this.canvas,i.RGBA,{premultiply:!0}),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let n=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,n=!0)}n&&this.fire(new t.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}let en={},ea=e=>{switch(e){case"geojson":return ee;case"image":return et;case"raster":return Z;case"raster-dem":return $;case"vector":return Y;case"video":return er;case"canvas":return ei}return en[e]},eo="RTLPluginLoaded";class es extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=U()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(e=>{throw this.status="error",e})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return t._(this,arguments,void 0,function*(e,t=!1){if(this.url)throw Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=g.resolveURL(e),!this.url)throw Error(`requested url ${e} is invalid`);if("unavailable"===this.status){if(!t)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if("requested"===this.status)return this._requestImport()})}_requestImport(){return t._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new t.n(eo))})}lazyLoad(){"unavailable"===this.status?this.status="requested":"deferred"===this.status&&this._requestImport()}}let el=null;function ec(){return el||(el=new es),el}(a=c||(c={}))[a.Base=0]="Base",a[a.Parent=1]="Parent",(o=u||(u={}))[o.Departing=0]="Departing",o[o.Incoming=1]="Incoming";class eu{constructor(e,r){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=e,this.uid=t.ad(),this.uses=0,this.tileSize=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(e){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(e||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:e,fadingDirection:t,fadingParentID:r,fadeEndTime:i}){this.resetFadeLogic(),this.fadingRole=e,this.fadingDirection=t,this.fadingParentID=r,this.fadeEndTime=i}setSelfFadeLogic(e){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=e}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=v(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(e,r,i){if(e?.etagUnmodified!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){for(let n in e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestEncoding=e.encoding,this.latestFeatureIndex.rawTileData=e.rawTileData,this.latestFeatureIndex.encoding=e.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(e,t){let r={};if(!t)return r;for(let i of e){let e=i.layerIds.map(e=>t.getLayer(e)).filter(Boolean);if(0!==e.length)for(let t of(i.layers=e,i.stateDependentLayerIds&&(i.stateDependentLayers=i.stateDependentLayerIds.map(t=>e.filter(e=>e.id===t)[0])),e))r[t.id]=i}return r}(e.buckets,r?.style),this.hasSymbolBuckets=!1,this.buckets){let e=this.buckets[n];if(e instanceof t.af){if(this.hasSymbolBuckets=!0,!i)break;e.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let e in this.buckets){let r=this.buckets[e];if(r instanceof t.af&&r.hasRTLText){this.hasRTLText=!0,ec().lazyLoad();break}}for(let e in this.queryPadding=0,this.buckets){let t=this.buckets[e];this.queryPadding=Math.max(this.queryPadding,r.style.getLayer(e).queryRadius(t))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage),this.dashPositions=e.dashPositions}else this.collisionBoxArray=new t.ae;else this.state="loaded"}unloadVectorData(){for(let e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(let t in this.buckets){let r=this.buckets[t];r.uploadPending()&&r.upload(e)}let r=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new t.T(e,this.imageAtlas.image,r.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new t.T(e,this.glyphAtlasImage,r.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,r,i,n,a,o,s,l,c,u){var h;return null!=(h=this.latestFeatureIndex)&&h.rawTileData?this.latestFeatureIndex.query({queryGeometry:i,cameraQueryGeometry:n,scale:a,tileSize:this.tileSize,pixelPosMatrix:c,transform:s,params:o,queryPadding:this.queryPadding*l,getElevation:u},e,t,r):{}}querySourceFeatures(e,r){let i=this.latestFeatureIndex;if(!i?.rawTileData)return;let n=i.loadVTLayers(),a=r?.sourceLayer?r.sourceLayer:"",o=n[t.ag]||n[a];if(!o)return;let s=t.ah(r?.filter,r?.globalState),{z:l,x:c,y:u}=this.tileID.canonical,h={z:l,x:c,y:u};for(let r=0;re)t=!1;else if(r)if(this.expirationTime({zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}),b=[],_=[];if(e.renderWorldCopies&&s.allowWorldCopies())for(let e=1;e<=3;e++)b.push(x(-e)),b.push(x(e));for(b.push(x(0));b.length>0;){let f=b.pop(),g=f.x,x=f.y,w=f.fullyVisible,T={x:g,y:x,z:f.zoom},M=s.getTileBoundingVolume(T,f.wrap,e.elevation,r);if(!w){let e=function(e,t,r){let i=t.intersectsFrustum(e);if(!r||0===i)return i;let n=t.intersectsPlane(r);return 0===n?0:2===i&&2===n?2:1}(i,M,n);if(0===e)continue;w=2===e}let k=s.distanceToTile2d(a.x,a.y,T,M),A=c;l&&(A=(r.calculateTileZoom||eb)(e.zoom+t.ar(e.tileSize/r.tileSize),k,y,v,e.fov));let S=Math.min(A=Math.max(0,A=(r.roundZoom?Math.round:Math.floor)(A)),h);if(f.wrap=s.getWrap(o,T,f.wrap),f.zoom>=S){if(f.zoom>1),wrap:f.wrap,fullyVisible:w})}return _.sort((e,t)=>e.distanceSq-t.distanceSq).map(e=>e.tileID)}let eT=t.a8.fromPoints([new t.P(0,0),new t.P(t.a6,t.a6)]);function eM(e){return"raster"===e||"image"===e||"video"===e}function ek(e,t,r,i,n,a,o){if(r[0].overscaledZ>=a)return!1;let s=!1;for(let a of r){let r=e.getLoadedTile(a);if(!r)continue;let{fadingRole:l,fadingDirection:h,fadingParentID:d}=r;l===c.Base&&h===u.Departing&&d||(r.setCrossFadeLogic({fadingRole:c.Base,fadingDirection:u.Departing,fadingParentID:t.tileID,fadeEndTime:n+o}),t.setCrossFadeLogic({fadingRole:c.Parent,fadingDirection:u.Incoming,fadeEndTime:n+o})),i[a.key]=a,s=!0}return s}function eA(e,t){var r;e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0;let i=t.tileID.canonical.x-e.tileID.canonical.x,n=t.tileID.canonical.y-e.tileID.canonical.y,a=Math.pow(2,e.tileID.canonical.z),o=t.tileID.key;0===i&&0===n||Math.abs(n)>1||(Math.abs(i)>1&&(1===Math.abs(i+a)?i+=a:1===Math.abs(i-a)&&(i-=a)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,i,n),null!=(r=e.neighboringTiles)&&r[o]&&(e.neighboringTiles[o].backfilled=!0)))}class eS{constructor(){this._tiles={}}handleWrapJump(e){let t={};for(let r in this._tiles){let i=this._tiles[r];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+e),t[i.tileID.key]=i}this._tiles=t}setFeatureState(e,t){for(let r in this._tiles)this._tiles[r].setFeatureState(e,t)}getAllTiles(){return Object.values(this._tiles)}getAllIds(e=!1){return e?Object.values(this._tiles).map(e=>e.tileID).sort(t.au).map(e=>e.key):Object.keys(this._tiles)}getTileById(e){return this._tiles[e]}setTile(e,t){this._tiles[e]=t}deleteTileById(e){delete this._tiles[e]}getLoadedTile(e){let t=this.getTileById(e.key);return t?.hasData()?t:null}isIdRenderable(e,t=!1){var r;return null==(r=this.getTileById(e))?void 0:r.isRenderable(t)}getRenderableIds(e=0,r){let i=[];for(let e of this.getAllIds())this.isIdRenderable(e,r)&&i.push(this.getTileById(e));return r?i.sort((r,i)=>{let n=r.tileID,a=i.tileID,o=new t.P(n.canonical.x,n.canonical.y)._rotate(-e),s=new t.P(a.canonical.x,a.canonical.y)._rotate(-e);return n.overscaledZ-a.overscaledZ||s.y-o.y||s.x-o.x}).map(e=>e.tileID.key):i.map(e=>e.tileID).sort(t.au).map(e=>e.key)}}class eE extends t.E{constructor(e,r,i){super(),this.id=e,this.dispatcher=i,this.on("data",e=>{this._dataHandler(e)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((e,t,r,i)=>{let n=new(ea(t.type))(e,t,r,i);if(n.id!==e)throw Error(`Expected Source id to be ${e} instead of ${n.id}`);return n})(e,r,i,this),this._inViewTiles=new eS,this._outOfViewCache=new t.av(0,e=>this._unloadTile(e)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new eh,this._didEmitContent=!1,this._updated=!1}onAdd(e){var t;this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,null!=(t=this._source)&&t.onAdd&&this._source.onAdd(e)}onRemove(e){var t;for(let e of this._inViewTiles.getAllTiles())e.unloadVectorData();this.clearTiles(),null!=(t=this._source)&&t.onRemove&&this._source.onRemove(e),this._inViewTiles=new eS}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(void 0===this.used&&void 0===this.usedForTerrain||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let e of this._inViewTiles.getAllTiles())if("loaded"!==e.state&&"errored"!==e.state)return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,r,i){return t._(this,void 0,void 0,function*(){try{let t=yield this._source.loadTile(e);this._tileLoaded(e,r,i,t)}catch(r){e.state="errored",404!==r.status?this._source.fire(new t.l(t.d(r),{tile:e})):this.update(this.transform,this.terrain)}})}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new t.n("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){for(let t of(this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null),this._inViewTiles.getAllTiles()))t.upload(e),t.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(e){var t;return this._inViewTiles.getRenderableIds(null==(t=this.transform)?void 0:t.bearingInRadians,e)}hasRenderableParent(e){let t=e.overscaledZ-1;if(t>=this._source.minzoom){let r=this.getLoadedTile(e.scaledTo(t));if(r)return this._inViewTiles.isIdRenderable(r.tileID.key)}return!1}reload(e,t){if(this._paused)this._shouldReloadOnResume=!0;else for(let r of(this._outOfViewCache.reset(),this._inViewTiles.getAllIds())){let i=this._inViewTiles.getTileById(r);t&&!this._source.shouldReloadTile(i,t)||(e?this._reloadTile(r,"expired"):"errored"!==i.state&&this._reloadTile(r,"reloading"))}}_reloadTile(e,r){return t._(this,void 0,void 0,function*(){let t=this._inViewTiles.getTileById(e);t&&("loading"!==t.state&&(t.state=r),yield this._loadTile(t,e,r))})}_tileLoaded(e,r,i,n){e.timeAdded=v(),e.selfFading&&(e.fadeEndTime=e.timeAdded+this._rasterFadeDuration),"expired"===i&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),n?.unmodified||("raster-dem"===this.getSource().type&&e.dem&&function(e,t){var r,i,n;for(let a of t.getRenderableIds()){if(!(null!=(r=e.neighboringTiles)&&r[a]))continue;let o=t.getTileById(a);e.neighboringTiles[a].backfilled||eA(e,o),null!=(n=null==(i=o.neighboringTiles)?void 0:i[e.tileID.key])&&n.backfilled||eA(o,e)}}(e,this._inViewTiles),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new t.n("data",{dataType:"source",tile:e,coord:e.tileID})))}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._inViewTiles.getTileById(e)}_retainLoadedChildren(e,t){let r=this._getLoadedDescendents(t),i=new Set;for(let n of t){let t=r[n.key];if(!t?.length){i.add(n);continue}let a=n.overscaledZ+eE.maxOverzooming,o=t.filter(e=>e.tileID.overscaledZ<=a);if(!o.length){i.add(n);continue}let s=Math.min(...o.map(e=>e.tileID.overscaledZ)),l=o.filter(e=>e.tileID.overscaledZ===s).map(e=>e.tileID);for(let t of l)e[t.key]=t;this._areDescendentsComplete(l,s,n.overscaledZ)||i.add(n)}return i}_getLoadedDescendents(e){var t;let r={};for(let i of this._inViewTiles.getAllTiles().filter(e=>e.hasData()))for(let n of e)i.tileID.isChildOf(n)&&(r[t=n.key]||(r[t]=[]),r[n.key].push(i));return r}_areDescendentsComplete(e,t,r){return 1===e.length&&e[0].isOverscaled()?e[0].overscaledZ===t:Math.pow(4,t-r)===e.length}getLoadedTile(e){return this._inViewTiles.getLoadedTile(e)}updateCacheSize(e){let r=Math.floor((Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1)*(null===this._maxTileCacheZoomLevels?t.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),i="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._outOfViewCache.setMaxSize(i)}handleWrapJump(e){let t=Math.round((e-(void 0===this._prevLng?e:this._prevLng))/360);this._prevLng=e,t&&(this._inViewTiles.handleWrapJump(t),this._resetTileReloadTimers())}update(e,r){let i;if(!this._sourceLoaded||this._paused)return;this.transform=e,this.terrain=r,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(e=>new t.a3(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)):(i=ew(e,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:"vector"===this._source.type&&void 0!==this.map._zoomLevelsToOverscale?e.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:r,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(i=i.filter(e=>this._source.hasTile(e)))):i=[],this.usedForTerrain&&(i=this._addTerrainIdealTiles(i));let n=0===i.length&&!this._updated&&this._didEmitContent;this._updated=!0,n&&this.fire(new t.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let a=e_(e,this._source),o=this._updateRetainedTiles(i,a),s=eM(this._source.type);s&&this._rasterFadeDuration>0&&!r&&function(e,r,i,n,a,o,s){let l=v(),h=t.at(r);for(let t of r){let r=e.getTileById(t.key);r.fadingDirection!==u.Departing&&0!==r.fadeOpacity||r.resetFadeLogic(),function(e,t,r,i,n,a,o){if(!t.hasData())return!1;let{tileID:s,fadingRole:l,fadingDirection:h,fadingParentID:d}=t;if(l===c.Base&&h===u.Incoming&&d)return r[d.key]=d,!0;let f=Math.max(s.overscaledZ-n,a);for(let n=s.overscaledZ-1;n>=f;n--){let a=s.scaledTo(n),l=e.getLoadedTile(a);if(l)return t.setCrossFadeLogic({fadingRole:c.Base,fadingDirection:u.Incoming,fadingParentID:l.tileID,fadeEndTime:i+o}),l.setCrossFadeLogic({fadingRole:c.Parent,fadingDirection:u.Departing,fadeEndTime:i+o}),r[a.key]=a,!0}return!1}(e,r,i,l,n,a,s)||function(e,t,r,i,n,a){if(!t.hasData())return!1;let o=t.tileID.children(n),s=ek(e,t,o,r,i,n,a);if(s)return!0;for(let l of o)ek(e,t,l.children(n),r,i,n,a)&&(s=!0);return s}(e,r,i,l,o,s)||function(e,t,r,i){let n=e.tileID;return!!e.selfFading||!e.hasData()&&!!t.has(n)&&(e.setSelfFadeLogic(r+i),!0)}(r,h,l,s)||r.resetFadeLogic()}}(this._inViewTiles,i,o,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),s?this._cleanUpRasterTiles(o):this._cleanUpVectorTiles(o)}_cleanUpRasterTiles(e){for(let t of this._inViewTiles.getAllIds())e[t]||this._removeTile(t)}_cleanUpVectorTiles(e){for(let t of this._inViewTiles.getAllIds()){let r=this._inViewTiles.getTileById(t);e[t]?r.clearSymbolFadeHold():r.hasSymbolBuckets?r.holdingForSymbolFade()?r.symbolFadeFinished()&&this._removeTile(t):r.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(t)}}_addTerrainIdealTiles(e){let t=[];for(let r of e)if(r.canonical.z>this._source.minzoom){let e=r.scaledTo(r.canonical.z-1);t.push(e);let i=r.scaledTo(Math.max(this._source.minzoom,Math.min(r.canonical.z,5)));t.push(i)}return e.concat(t)}releaseSymbolFadeTiles(){for(let e of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(e).holdingForSymbolFade()&&this._removeTile(e)}_updateRetainedTiles(e,t){var r;let i=new Set;for(let t of e)this._addTile(t).hasData()||i.add(t);let n=e.reduce((e,t)=>(e[t.key]=t,e),{}),a=this._retainLoadedChildren(n,i),o={},s=Math.max(t-eE.maxUnderzooming,this._source.minzoom);for(let e of a){let t=this._inViewTiles.getTileById(e.key),i=t?.wasRequested();for(let a=e.overscaledZ-1;a>=s;--a){let s=e.scaledTo(a);if(o[s.key])break;if(o[s.key]=!0,(t=this.getTile(s))||!i||(t=this._addTile(s)),t){let e=t.hasData();if((e||!(null!=(r=this.map)&&r.cancelPendingTileRequestsWhileZooming)||i)&&(n[s.key]=s),i=t.wasRequested(),e)break}}}return n}_addTile(e){let r=this._inViewTiles.getTileById(e.key);if(r)return r;(r=this._outOfViewCache.getAndRemove(e))&&(r.resetFadeLogic(),this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null));let i=r;return r||(r=new eu(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,e.key,r.state)),r.uses++,this._inViewTiles.setTile(e.key,r),i||this._source.fire(new t.n("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r}_setTileReloadTimer(e,t){this._clearTileReloadTimer(e);let r=t.getExpiryTimeout();r&&(this._timers[e]=setTimeout(()=>{this._reloadTile(e,"expired"),delete this._timers[e]},r))}_clearTileReloadTimer(e){let t=this._timers[e];t&&(clearTimeout(t),delete this._timers[e])}_resetTileReloadTimers(){for(let e in this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(let e of this._inViewTiles.getAllIds()){let t=this._inViewTiles.getTileById(e);this._setTileReloadTimer(e,t)}}refreshTiles(e){for(let t of this._inViewTiles.getAllIds()){let r=this._inViewTiles.getTileById(t);(this._inViewTiles.isIdRenderable(t)||"errored"==r.state)&&e.some(e=>e.equals(r.tileID.canonical))&&this._reloadTile(t,"expired")}}_removeTile(e){let t=this._inViewTiles.getTileById(e);t&&(t.uses--,this._inViewTiles.deleteTileById(e),this._clearTileReloadTimer(e),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._outOfViewCache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))}_dataHandler(e){"source"===e.dataType&&("metadata"!==e.sourceDataType?"content"===e.sourceDataType&&this._sourceLoaded&&!this._paused&&(this.reload(e.sourceDataChanged,e.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){for(let e of(this._shouldReloadOnResume=!1,this._paused=!1,this._inViewTiles.getAllIds()))this._removeTile(e);this._outOfViewCache.reset()}tilesIn(e,r,i){let n=[],a=this.transform;if(!a)return n;let o=a.getCoveringTilesDetailsProvider().allowWorldCopies(),s=i?a.getCameraQueryGeometry(e):e,l=e=>a.screenPointToMercatorCoordinate(e,this.terrain),c=this.transformBbox(e,l,!o),u=this.transformBbox(s,l,!o),h=this.getIds(),d=t.a8.fromPoints(u);for(let e of h){let i=this._inViewTiles.getTileById(e);if(i.holdingForSymbolFade())continue;let s=o?[i.tileID]:[i.tileID.unwrapTo(-1),i.tileID.unwrapTo(0)],l=Math.pow(2,a.zoom-i.tileID.overscaledZ),h=r*i.queryPadding*t.a6/i.tileSize/l;for(let e of s){let r=d.map(r=>e.getTilePoint(new t.a7(r.x,r.y)));if(r.expandBy(h),r.intersects(eT)){let t=c.map(t=>e.getTilePoint(t)),r=u.map(t=>e.getTilePoint(t));n.push({tile:i,tileID:o?e:e.unwrapTo(0),queryGeometry:t,cameraQueryGeometry:r,scale:l})}}}return n}transformBbox(e,r,i){let n=e.map(r);if(i){let i=t.a8.fromPoints(e);i.shrinkBy(.001*Math.min(i.width(),i.height()));let a=i.map(r);t.a8.fromPoints(n).covers(a)||(n=n.map(e=>e.x>.5?new t.a7(e.x-1,e.y,e.z):e))}return n}getVisibleCoordinates(e){let t=this.getRenderableIds(e).map(e=>this._inViewTiles.getTileById(e).tileID);return this.transform&&this.transform.populateCache(t),t}hasTransition(){return!!this._source.hasTransition()||eM(this._source.type)&&function(e,t){if(t<=0)return!1;let r=v();for(let t of e.getAllTiles())if(t.fadeEndTime>=r)return!0;return!1}(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(e){this._rasterFadeDuration=e}setFeatureState(e,r,i){e||(e=t.ag),this._state.updateState(e,r,i)}removeFeatureState(e,r,i){e||(e=t.ag),this._state.removeFeatureState(e,r,i)}getFeatureState(e,r){return e||(e=t.ag),this._state.getState(e,r)}setDependencies(e,t,r){let i=this._inViewTiles.getTileById(e);i&&i.setDependencies(t,r)}reloadTilesForDependencies(e,t){for(let r of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(r).hasDependency(e,t)&&this._reloadTile(r,"reloading");this._outOfViewCache.filter(r=>!r.hasDependency(e,t))}areTilesLoaded(){for(let e of this._inViewTiles.getAllTiles())if("loaded"!==e.state&&"errored"!==e.state)return!1;return!0}}eE.maxUnderzooming=10,eE.maxOverzooming=3;class eC{constructor(e,t){this.reset(e,t)}reset(e,t){this.points=e||[],this._distances=[0];for(let e=1;e0?(n-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))}}function eL(e,t){let r=!0;return"always"===e||"never"!==e&&"never"!==t||(r=!1),r}class eP{constructor(e,t,r){let i=this.boxCells=[],n=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(let e=0;ethis.width||i<0||t>this.height)return[];let s=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=i){if(n)return[{key:null,x1:e,y1:t,x2:r,y2:i}];for(let e=0;e0}hitTestCircle(e,t,r,i,n){let a=e-r,o=e+r,s=t-r,l=t+r;if(o<0||a>this.width||l<0||s>this.height)return!1;let c=[];return this._forEachCell(a,s,o,l,this._queryCellCircle,c,{hitTest:!0,overlapMode:i,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}},n),c.length>0}_queryCell(e,t,r,i,n,a,o,s){let{seenUids:l,hitTest:c,overlapMode:u}=o,h=this.boxCells[n];if(null!==h){let n=this.bboxes;for(let o of h)if(!l.box[o]){l.box[o]=!0;let h=4*o,d=this.boxKeys[o];if(e<=n[h+2]+1e-6&&t<=n[h+3]+1e-6&&r>=n[h+0]-1e-6&&i>=n[h+1]-1e-6&&(!s||s(d))&&(!c||!eL(u,d.overlapMode))&&(a.push({key:d,x1:n[h],y1:n[h+1],x2:n[h+2],y2:n[h+3]}),c))return!0}}let d=this.circleCells[n];if(null!==d){let n=this.circles;for(let o of d)if(!l.circle[o]){l.circle[o]=!0;let h=3*o,d=this.circleKeys[o];if(this._circleAndRectCollide(n[h],n[h+1],n[h+2],e,t,r,i)&&(!s||s(d))&&(!c||!eL(u,d.overlapMode))){let e=n[h],t=n[h+1],r=n[h+2];if(a.push({key:d,x1:e-r,y1:t-r,x2:e+r,y2:t+r}),c)return!0}}}return!1}_queryCellCircle(e,t,r,i,n,a,o,s){let{circle:l,seenUids:c,overlapMode:u}=o,h=this.boxCells[n];if(null!==h){let e=this.bboxes;for(let t of h)if(!c.box[t]){c.box[t]=!0;let r=4*t,i=this.boxKeys[t];if(this._circleAndRectCollide(l.x,l.y,l.radius,e[r+0],e[r+1],e[r+2],e[r+3])&&(!s||s(i))&&!eL(u,i.overlapMode))return a.push(!0),!0}}let d=this.circleCells[n];if(null!==d){let e=this.circles;for(let t of d)if(!c.circle[t]){c.circle[t]=!0;let r=3*t,i=this.circleKeys[t];if(this._circlesCollide(e[r],e[r+1],e[r+2],l.x,l.y,l.radius)&&(!s||s(i))&&!eL(u,i.overlapMode))return a.push(!0),!0}}}_forEachCell(e,t,r,i,n,a,o,s){let l=this._convertToXCellCoord(e),c=this._convertToYCellCoord(t),u=this._convertToXCellCoord(r),h=this._convertToYCellCoord(i);for(let d=l;d<=u;d++)for(let l=c;l<=h;l++)if(n.call(this,e,t,r,i,this.xCellCount*l+d,a,o,s))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,r,i,n,a){let o=i-e,s=n-t,l=r+a;return l*l>o*o+s*s}_circleAndRectCollide(e,t,r,i,n,a,o){let s=(a-i)/2,l=Math.abs(e-(i+s));if(l>s+r)return!1;let c=(o-n)/2,u=Math.abs(t-(n+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;let h=l-s,d=u-c;return h*h+d*d<=r*r}}let eI=t.O();function ez(e,r,i){var n,a,o,s,l;let c=t.O();if(!e){let{vecSouth:e,vecEast:t}=eD(r),i=d();i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],(l=(n=i[0])*(s=i[3])-(o=i[2])*(a=i[1]))&&(i[0]=s*(l=1/l),i[1]=-a*l,i[2]=-o*l,i[3]=n*l),c[0]=i[0],c[1]=i[1],c[4]=i[2],c[5]=i[3]}return t.S(c,c,[1/i,1/i,1]),c}function eD(e){let r=Math.cos(e.rollInRadians),i=Math.sin(e.rollInRadians),n=Math.cos(e.pitchInRadians),a=Math.cos(e.bearingInRadians),o=Math.sin(e.bearingInRadians),s=t.az();s[0]=-a*n*i-o*r,s[1]=-o*n*i+a*r;let l=t.aA(s);l<1e-9?t.aB(s):t.aC(s,s,1/l);let c=t.az();c[0]=a*n*r-o*i,c[1]=o*n*r+a*i;let u=t.aA(c);return u<1e-9?t.aB(c):t.aC(c,c,1/u),{vecEast:c,vecSouth:s}}function eO(e,r,i,n){let a;n?(a=[e,r,n(e,r),1],t.aE(a,a,i)):eZ(a=[e,r,0,1],a,i);let o=a[3];return{point:new t.P(a[0]/o,a[1]/o),signedDistanceFromCamera:o,isOccluded:!1}}function eR(e,t,r,i,n,a,o,s){let l=a.glyphStartIndex+a.numGlyphs,c=a.lineStartIndex,u=a.lineStartIndex+a.lineLength,h=t.getoffsetX(a.glyphStartIndex),d=t.getoffsetX(l-1),f=eG(e*h,r,i,n,a.segment,c,u,s,o);if(!f)return null;let p=eG(e*d,r,i,n,a.segment,c,u,s,o);return p?s.projectionCache.anyProjectionOccluded?null:{first:f,last:p}:null}function eF(e,r,i,n){return e===t.ax.horizontal&&Math.abs(i.y-r.y)>Math.abs(i.x-r.x)*n?{useVertical:!0}:(e===t.ax.vertical?r.yi.x)?{needsFlipping:!0}:null}function ej(e){let{projectionContext:r,pitchedLabelPlaneMatrixInverse:i,symbol:n,fontSize:a,flip:o,keepUpright:s,glyphOffsetArray:l,dynamicLayoutVertexArray:c,aspectRatio:u,rotateToLine:h}=e,d=a/24,f=n.lineOffsetX*d,p=n.lineOffsetY*d,m;if(n.numGlyphs>1){let e=n.glyphStartIndex+n.numGlyphs,t=n.lineStartIndex,a=n.lineStartIndex+n.lineLength,c=eR(d,l,f,p,o,n,h,r);if(!c)return{notEnoughRoom:!0};let g=eV(c.first.point.x,c.first.point.y,r,i),y=eV(c.last.point.x,c.last.point.y,r,i);if(s&&!o){let e=eF(n.writingMode,g,y,u);if(e)return e}m=[c.first];for(let i=n.glyphStartIndex+1;i0?s.point:eB(r.tileAnchorPoint,o,e,1,r),c=eV(e.x,e.y,r,i),h=eV(l.x,l.y,r,i),d=eF(n.writingMode,c,h,u);if(d)return d}let e=eG(d*l.getoffsetX(n.glyphStartIndex),f,p,o,n.segment,n.lineStartIndex,n.lineStartIndex+n.lineLength,r,h);if(!e||r.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};m=[e]}for(let e of m)t.aD(c,e.point,e.angle);return{}}function eB(e,t,r,i,n){let a=e.add(e.sub(t)._unit()),o=eU(a.x,a.y,n).point,s=r.sub(o);return r.add(s._mult(i/s.mag()))}function eN(e,r,i){let n=r.projectionCache;if(n.projections[e])return n.projections[e];let a=new t.P(r.lineVertexArray.getx(e),r.lineVertexArray.gety(e)),o=eU(a.x,a.y,r);if(o.signedDistanceFromCamera>0)return n.projections[e]=o.point,n.anyProjectionOccluded||(n.anyProjectionOccluded=o.isOccluded),o.point;let s=e-i.direction;return eB(0===i.distanceFromAnchor?r.tileAnchorPoint:new t.P(r.lineVertexArray.getx(s),r.lineVertexArray.gety(s)),a,i.previousVertex,i.absOffsetX-i.distanceFromAnchor+1,r)}function eU(e,t,r){let i=e+r.translation[0],n=t+r.translation[1],a;return r.pitchWithMap?(a=eO(i,n,r.pitchedLabelPlaneMatrix,r.getElevation)).isOccluded=!1:((a=r.transform.projectTileCoordinates(i,n,r.unwrappedTileID,r.getElevation)).point.x=(.5*a.point.x+.5)*r.width,a.point.y=(-(.5*a.point.y)+.5)*r.height),a}function eV(e,r,i,n){if(i.pitchWithMap){let a=[e,r,0,1];return t.aE(a,a,n),i.transform.projectTileCoordinates(a[0]/a[3],a[1]/a[3],i.unwrappedTileID,i.getElevation).point}return{x:e/i.width*2-1,y:1-r/i.height*2}}function eq(e,t,r){return r.transform.projectTileCoordinates(e,t,r.unwrappedTileID,r.getElevation)}function eH(e,t,r){return e._unit()._perp()._mult(t*r)}function eG(e,r,i,n,a,o,s,l,c){let u=n?e-r:e+r,h=u>0?1:-1,d=0;n&&(h*=-1,d=Math.PI),h<0&&(d+=Math.PI);let f,p=h>0?o+a:o+a+1;l.projectionCache.cachedAnchorPoint?f=l.projectionCache.cachedAnchorPoint:(f=eU(l.tileAnchorPoint.x,l.tileAnchorPoint.y,l).point,l.projectionCache.cachedAnchorPoint=f);let m,g,y=f,v=f,x=0,b=0,_=Math.abs(u),w=[],T;for(;x+b<=_;){if((p+=h)=s)return null;x+=b,v=y,g=m;let e={absOffsetX:_,direction:h,distanceFromAnchor:x,previousVertex:v};if(y=eN(p,l,e),0===i)w.push(v),T=y.sub(v);else{let r,n=y.sub(v);r=0===n.mag()?eH(eN(p+h,l,e).sub(y),i,h):eH(n,i,h),g||(g=v.add(r)),m=function(e,r,i,n,a,o,s,l,c){if(l.projectionCache.offsets[e])return l.projectionCache.offsets[e];let u=i.add(r);if(e+c.direction=a)return l.projectionCache.offsets[e]=u,u;let h=eN(e+c.direction,l,c),d=eH(h.sub(i),s,c.direction),f=i.add(d),p=h.add(d);return l.projectionCache.offsets[e]=t.aF(o,u,f,p)||u,l.projectionCache.offsets[e]}(p,r,y,o,s,g,i,l,e),w.push(g),T=m.sub(g)}b=T.mag()}let M=T._mult((_-x)/b)._add(g||v),k=d+Math.atan2(y.y-v.y,y.x-v.x);return w.push(M),{point:M,angle:c?k:0,path:w}}let eW=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function eY(e,t){for(let r=0;r=1;e--)f.push(o.path[e]);for(let e=1;ee.signedDistanceFromCamera<=0)?[]:e.map(e=>e.point)}let g=[];if(f.length>0){let e=f[0].clone(),r=f[0].clone();for(let t=1;t=i.x&&r.x<=n.x&&e.y>=i.y&&r.y<=n.y?[f]:r.xn.x||r.yn.y?[]:t.aG([f],i.x,i.y,n.x,n.y)}for(let t of g){a.reset(t,.25*r);let i=0;i=a.length<=.5*r?1:Math.ceil(a.paddedLength/p)+1;for(let t=0;tr&&(r=n,t=i);return e.slice(t,t+r)}((i=1/((r=t.pitchedLabelPlaneMatrix)[0]*r[5]-r[1]*r[4]),eI[0]=r[5]*i,eI[1]=-r[1]*i,eI[2]=0,eI[3]=0,eI[4]=-r[4]*i,eI[5]=r[0]*i,eI[6]=0,eI[7]=0,eI[8]=0,eI[9]=0,eI[10]=1/r[10],eI[11]=0,eI[12]=0,eI[13]=0,eI[14]=0,eI[15]=1/r[15],e.map(e=>{let r=eO(e.x,e.y,eI,t.getElevation),i=t.transform.projectTileCoordinates(r.point.x,r.point.y,t.unwrappedTileID,t.getElevation);return i.point.x=(.5*i.point.x+.5)*t.width,i.point.y=(-(.5*i.point.y)+.5)*t.height,i})))}queryRenderedSymbols(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};let r=[],i=new t.a8;for(let n of e){let e=new t.P(n.x+100,n.y+100);i.extend(e),r.push(e)}let{minX:n,minY:a,maxX:o,maxY:s}=i,l=this.grid.query(n,a,o,s).concat(this.ignoredGrid.query(n,a,o,s)),c={},u={};for(let e of l){let i=e.key;if(void 0===c[i.bucketInstanceId]&&(c[i.bucketInstanceId]={}),c[i.bucketInstanceId][i.featureIndex])continue;let n=[new t.P(e.x1,e.y1),new t.P(e.x2,e.y1),new t.P(e.x2,e.y2),new t.P(e.x1,e.y2)];t.aH(r,n)&&(c[i.bucketInstanceId][i.featureIndex]=!0,void 0===u[i.bucketInstanceId]&&(u[i.bucketInstanceId]=[]),u[i.bucketInstanceId].push(i.featureIndex))}return u}insertCollisionBox(e,t,r,i,n,a){(r?this.ignoredGrid:this.grid).insert({bucketInstanceId:i,featureIndex:n,collisionGroupID:a,overlapMode:t},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,t,r,i,n,a){let o=r?this.ignoredGrid:this.grid,s={bucketInstanceId:i,featureIndex:n,collisionGroupID:a,overlapMode:t};for(let t=0;t=this.screenRightBoundary||i<100||t>this.screenBottomBoundary}isInsideGrid(e,t,r,i){return r>=0&&e=0&&tthis.projectAndGetPerspectiveRatio(e.x,e.y,n,c,h));E=e.some(e=>!e.isOccluded),S=e.map(e=>new t.P(e.x,e.y))}else E=!0;return{box:t.aI(S),allPointsOccluded:!E}}}class eX{constructor(e,t,r,i){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):i&&r?1:0,this.placed=r}isHidden(){return 0===this.opacity&&!this.placed}}class eK{constructor(e,t,r,i,n){this.text=new eX(e?e.text:null,t,r,n),this.icon=new eX(e?e.icon:null,t,i,n)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class eJ{constructor(e,t,r){this.text=e,this.icon=t,this.skipFade=r}}class eQ{constructor(e,t,r,i,n){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=r,this.bucketIndex=i,this.tileID=n}}class e0{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){let t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:e=>e.collisionGroupID===t}}return this.collisionGroups[e]}}function e1(e,r,i,n,a){let{horizontalAlign:o,verticalAlign:s}=t.aP(e);return new t.P(-(o-.5)*r+n[0]*a,-(s-.5)*i+n[1]*a)}class e2{constructor(e,t,r,i,n){this.transform=e.clone(),this.terrain=t,this.collisionIndex=new e$(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=r,this.retainedQueryData={},this.collisionGroups=new e0(i),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){let t=this.terrain;return t?(r,i)=>t.getElevation(e,r,i):null}getBucketParts(e,r,i,n){let a=i.getBucket(r),o=i.latestFeatureIndex;if(!a||!o||r.id!==a.layerIds[0])return;let s=i.collisionBoxArray,l=a.layers[0].layout,c=a.layers[0].paint,u=Math.pow(2,this.transform.zoom-i.tileID.overscaledZ),h=i.tileSize/t.a6,d=i.tileID.toUnwrapped(),f="map"===l.get("text-rotation-alignment"),p=t.aK(i,1,this.transform.zoom),m=t.aL(this.collisionIndex.transform,i,c.get("text-translate"),c.get("text-translate-anchor")),g=t.aL(this.collisionIndex.transform,i,c.get("icon-translate"),c.get("icon-translate-anchor")),y=ez(f,this.transform,p);this.retainedQueryData[a.bucketInstanceId]=new eQ(a.bucketInstanceId,o,a.sourceLayerIndex,a.index,i.tileID);let v={bucket:a,layout:l,translationText:m,translationIcon:g,unwrappedTileID:d,pitchedLabelPlaneMatrix:y,scale:u,textPixelRatio:h,holdingForFade:i.holdingForSymbolFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:t.aw(a.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(a.sourceID)};if(n)for(let t of a.sortKeyRanges){let{sortKey:r,symbolInstanceStart:i,symbolInstanceEnd:n}=t;e.push({sortKey:r,symbolInstanceStart:i,symbolInstanceEnd:n,parameters:v})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:a.symbolInstances.length,parameters:v})}attemptAnchorPlacement(e,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b){var _,w,T;let M=t.aM[e.textAnchor],k=[e.textOffset0,e.textOffset1],A=e1(M,i,n,k,a),S=this.collisionIndex.placeCollisionBox(r,d,l,c,u,s,o,g,h.predicate,x,A,b);if((!v||this.collisionIndex.placeCollisionBox(v,d,l,c,u,s,o,y,h.predicate,x,A,b).placeable)&&S.placeable){let e;if(null!=(_=this.prevPlacement)&&_.variableOffsets[f.crossTileID]&&null!=(T=null==(w=this.prevPlacement)?void 0:w.placements[f.crossTileID])&&T.text&&(e=this.prevPlacement.variableOffsets[f.crossTileID].anchor),0===f.crossTileID)throw Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[f.crossTileID]={textOffset:k,width:i,height:n,anchor:M,textBoxScale:a,prevAnchor:e},this.markUsedJustification(p,M,f,m),p.allowVerticalPlacement&&(this.markUsedOrientation(p,m,f),this.placedOrientations[f.crossTileID]=m),{shift:A,placedGlyphBoxes:S}}}placeLayerBucketPart(e,r,i){let{bucket:n,layout:a,translationText:o,translationIcon:s,unwrappedTileID:l,pitchedLabelPlaneMatrix:c,textPixelRatio:u,holdingForFade:h,collisionBoxArray:d,partiallyEvaluatedTextSize:f,collisionGroup:p}=e.parameters,m=a.get("text-optional"),g=a.get("icon-optional"),y=t.aN(a,"text-overlap","text-allow-overlap"),v="always"===y,x=t.aN(a,"icon-overlap","icon-allow-overlap"),b="always"===x,_="map"===a.get("text-rotation-alignment"),w="map"===a.get("text-pitch-alignment"),T="none"!==a.get("icon-text-fit"),M="viewport-y"===a.get("symbol-z-order"),k=v&&(b||!n.hasIconData()||g),A=b&&(v||!n.hasTextData()||m);!n.collisionArrays&&d&&n.deserializeCollisionBoxes(d);let S=this.retainedQueryData[n.bucketInstanceId].tileID,E=this._getTerrainElevationFunc(S),C=this.transform.getFastPathSimpleProjectionMatrix(S),L=(e,d,b)=>{var M,L;if(r[e.crossTileID])return;if(h)return void(this.placements[e.crossTileID]=new eJ(!1,!1,!1));let P=!1,I=!1,z=!0,D=null,O={box:null,placeable:!1,offscreen:null,occluded:!1},R={placeable:!1},F=null,j=null,B=null,N=0,U=0,V=0;d.textFeatureIndex?N=d.textFeatureIndex:e.useRuntimeCollisionCircles&&(N=e.featureIndex),d.verticalTextFeatureIndex&&(U=d.verticalTextFeatureIndex);let q=d.textBox;if(q){let r=r=>{let i=t.ax.horizontal;if(n.allowVerticalPlacement&&!r&&this.prevPlacement){let t=this.prevPlacement.placedOrientations[e.crossTileID];t&&(this.placedOrientations[e.crossTileID]=t,i=t,this.markUsedOrientation(n,i,e))}return i},a=(r,i)=>{if(n.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&d.verticalTextBox){for(let e of n.writingModes)if(e===t.ax.vertical?R=O=i():O=r(),O?.placeable)break}else O=r()},c=e.textAnchorOffsetStartIndex,h=e.textAnchorOffsetEndIndex;if(h===c){let i=(t,r)=>{let i=this.collisionIndex.placeCollisionBox(t,y,u,S,l,w,_,o,p.predicate,E,void 0,C);return i?.placeable&&(this.markUsedOrientation(n,r,e),this.placedOrientations[e.crossTileID]=r),i};a(()=>i(q,t.ax.horizontal),()=>{let r=d.verticalTextBox;return n.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?i(r,t.ax.vertical):{box:null,offscreen:null}}),r(O?.placeable)}else{let f=t.aM[null==(L=null==(M=this.prevPlacement)?void 0:M.variableOffsets[e.crossTileID])?void 0:L.anchor],m=(t,r,a)=>{let d=t.x2-t.x1,m=t.y2-t.y1,g=e.textBoxScale,v=T&&"never"===x?r:null,b=null,M="never"===y?1:2,k="never";f&&M++;for(let r=0;rm(q,d.iconBox,t.ax.horizontal),()=>{let r=d.verticalTextBox;return n.allowVerticalPlacement&&!O?.placeable&&e.numVerticalGlyphVertices>0&&r?m(r,d.verticalIconBox,t.ax.vertical):{box:null,occluded:!0,offscreen:null}}),O&&(P=O.placeable,z=O.offscreen);let g=r(O?.placeable);if(!P&&this.prevPlacement){let t=this.prevPlacement.variableOffsets[e.crossTileID];t&&(this.variableOffsets[e.crossTileID]=t,this.markUsedJustification(n,t.anchor,e,g))}}}if(F=O,P=F?.placeable,z=F?.offscreen,e.useRuntimeCollisionCircles&&e.centerJustifiedTextSymbolIndex>=0){let r=n.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),s=t.ay(n.textSizeData,f,r),u=a.get("text-padding");(j=this.collisionIndex.placeCollisionCircles(y,r,n.lineVertexArray,n.glyphOffsetArray,s,l,c,i,w,p.predicate,e.collisionCircleDiameter,u,o,E)).circles.length&&j.collisionDetected&&!i&&t.w("Collisions detected, but collision boxes are not shown"),P=v||j.circles.length>0&&!j.collisionDetected,z&&(z=j.offscreen)}if(d.iconFeatureIndex&&(V=d.iconFeatureIndex),d.iconBox){let e=e=>this.collisionIndex.placeCollisionBox(e,x,u,S,l,w,_,s,p.predicate,E,T&&D?D:void 0,C);I=R&&R.placeable&&d.verticalIconBox?(B=e(d.verticalIconBox)).placeable:(B=e(d.iconBox)).placeable,z&&(z=B.offscreen)}let H=m||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,G=g||0===e.numIconVertices;H||G?G?H||I&&(I=P):P=I&&P:I=P=I&&P;let W=I&&B.placeable;if(P&&F.placeable&&this.collisionIndex.insertCollisionBox(F.box,y,a.get("text-ignore-placement"),n.bucketInstanceId,R&&R.placeable&&U?U:N,p.ID),W&&this.collisionIndex.insertCollisionBox(B.box,x,a.get("icon-ignore-placement"),n.bucketInstanceId,V,p.ID),j&&P&&this.collisionIndex.insertCollisionCircles(j.circles,y,a.get("text-ignore-placement"),n.bucketInstanceId,N,p.ID),i&&this.storeCollisionData(n.bucketInstanceId,b,d,F,B,j),0===e.crossTileID)throw Error("symbolInstance.crossTileID can't be 0");if(0===n.bucketInstanceId)throw Error("bucket.bucketInstanceId can't be 0");this.placements[e.crossTileID]=new eJ((P||k)&&!F?.occluded,(I||A)&&!B?.occluded,z||n.justReloaded),r[e.crossTileID]=!0};if(M){if(0!==e.symbolInstanceStart)throw Error("bucket.bucketInstanceId should be 0");let t=n.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let e=t.length-1;e>=0;--e){let r=t[e];L(n.symbolInstances.get(r),n.collisionArrays[r],r)}}else for(let t=e.symbolInstanceStart;t=0&&(e.text.placedSymbolArray.get(o).crossTileID=a>=0&&o!==a?0:i.crossTileID)}markUsedOrientation(e,r,i){let n=r===t.ax.horizontal||r===t.ax.horizontalOnly?r:0,a=r===t.ax.vertical?r:0;for(let t of[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex])e.text.placedSymbolArray.get(t).placedOrientation=n;i.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).placedOrientation=a)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;let t=this.prevPlacement,r=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;let i=t?t.symbolFadeChange(e):1,n=t?t.opacities:{},a=t?t.variableOffsets:{},o=t?t.placedOrientations:{};for(let e in this.placements){let t=this.placements[e],a=n[e];a?(this.opacities[e]=new eK(a,i,t.text,t.icon),r||(r=t.text!==a.text.placed),r||(r=t.icon!==a.icon.placed)):(this.opacities[e]=new eK(null,i,t.text,t.icon,t.skipFade),r||(r=t.text||t.icon))}for(let e in n){let t=n[e];if(!this.opacities[e]){let n=new eK(t,i,!1,!1);n.isHidden()||(this.opacities[e]=n,r||(r=t.text.placed),r||(r=t.icon.placed))}}for(let e in a)this.variableOffsets[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.variableOffsets[e]=a[e]);for(let e in o)this.placedOrientations[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.placedOrientations[e]=o[e]);if(t&&void 0===t.lastPlacementChangeTime)throw Error("Last placement time for previous placement is not defined");r?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){let r={};for(let i of t){let t=i.getBucket(e);t&&i.latestFeatureIndex&&e.id===t.layerIds[0]&&this.updateBucketOpacities(t,i.tileID,r,i.collisionBoxArray)}}updateBucketOpacities(e,r,i,n){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();let a=e.layers[0],o=a.layout,s=new eK(null,0,!1,!1,!0),l=o.get("text-allow-overlap"),c=o.get("icon-allow-overlap"),u=a._unevaluatedLayout.hasValue("text-variable-anchor")||a._unevaluatedLayout.hasValue("text-variable-anchor-offset"),h="map"===o.get("text-rotation-alignment"),d="map"===o.get("text-pitch-alignment"),f="none"!==o.get("icon-text-fit"),p=new eK(null,0,l&&(c||!e.hasIconData()||o.get("icon-optional")),c&&(l||!e.hasTextData()||o.get("text-optional")),!0);!e.collisionArrays&&n&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(n);let m=(e,t,r)=>{for(let i=0;i0,v=this.placedOrientations[n.crossTileID],x=v===t.ax.vertical,b=v===t.ax.horizontal||v===t.ax.horizontalOnly;if(a>0||o>0){let t=e5(c.text);m(e.text,a,x?e4:t),m(e.text,o,b?e4:t);let r=c.text.isHidden();for(let t of[n.rightJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.leftJustifiedTextSymbolIndex])t>=0&&(e.text.placedSymbolArray.get(t).hidden=r||x?1:0);n.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(n.verticalPlacedTextSymbolIndex).hidden=r||b?1:0);let i=this.variableOffsets[n.crossTileID];i&&this.markUsedJustification(e,i.anchor,n,v);let s=this.placedOrientations[n.crossTileID];s&&(this.markUsedJustification(e,"left",n,s),this.markUsedOrientation(e,s,n))}if(y){let t=e5(c.icon),r=!(f&&n.verticalPlacedIconSymbolIndex&&x);n.placedIconSymbolIndex>=0&&(m(e.icon,n.numIconVertices,r?t:e4),e.icon.placedSymbolArray.get(n.placedIconSymbolIndex).hidden=c.icon.isHidden()),n.verticalPlacedIconSymbolIndex>=0&&(m(e.icon,n.numVerticalIconVertices,r?e4:t),e.icon.placedSymbolArray.get(n.verticalPlacedIconSymbolIndex).hidden=c.icon.isHidden())}let _=g?.has(r)?g.get(r):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){let i=e.collisionArrays[r];if(i){let r=new t.P(0,0);if(i.textBox||i.verticalTextBox){let t=!0;if(u){let e=this.variableOffsets[l];e?(r=e1(e.anchor,e.width,e.height,e.textOffset,e.textBoxScale),h&&r._rotate(d?-this.transform.bearingInRadians:this.transform.bearingInRadians)):t=!1}if(i.textBox||i.verticalTextBox){let n;i.textBox&&(n=x),i.verticalTextBox&&(n=b),e3(e.textCollisionBox.collisionVertexArray,c.text.placed,!t||n,_.text,r.x,r.y)}}if(i.iconBox||i.verticalIconBox){let t=!!(!b&&i.verticalIconBox),n;i.iconBox&&(n=t),i.verticalIconBox&&(n=!t),e3(e.iconCollisionBox.collisionVertexArray,c.icon.placed,n,_.icon,f?r.x:0,f?r.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTimee}setStale(){this.stale=!0}}function e3(e,t,r,i,n,a){i&&0!==i.length||(i=[0,0,0,0]);let o=i[0]-100,s=i[1]-100,l=i[2]-100,c=i[3]-100;e.emplaceBack(+!!t,+!!r,n||0,a||0,o,s),e.emplaceBack(+!!t,+!!r,n||0,a||0,l,s),e.emplaceBack(+!!t,+!!r,n||0,a||0,l,c),e.emplaceBack(+!!t,+!!r,n||0,a||0,o,c)}function e5(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 0xffffffff;let t=+!!e.placed,r=Math.floor(127*e.opacity);return 0x2000000*r+0x1000000*t+131072*r+65536*t+512*r+256*t+2*r+t}let e4=0;class e6{constructor(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,t,r,i,n){let a=this._bucketParts;for(;this._currentTileIndexe.sortKey-t.sortKey));this._currentPartIndex!this._forceFullPlacement&&v()-n>2;for(;this._currentPlacementIndex>=0;){let n=r[e[this._currentPlacementIndex]],o=this.placement.collisionIndex.transform.zoom;if(t.aQ(n)&&n.layout&&(!n.minzoom||n.minzoom<=o)&&(!n.maxzoom||n.maxzoom>o)){if(this._inProgressLayer||(this._inProgressLayer=new e6(n)),this._inProgressLayer.continuePlacement(i[n.source],this.placement,this._showCollisionBoxes,n,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}let e7=512/t.a6/2;class e9{constructor(e,r,i){this.tileID=e,this.bucketInstanceId=i,this._symbolsByKey={};let n=new Map;for(let e=0;e({x:Math.floor(e.anchorX*e7),y:Math.floor(e.anchorY*e7)})),crossTileIDs:r.map(e=>e.crossTileID)};if(i.positions.length>128){let e=new t.aR(i.positions.length,16,Uint16Array);for(let{x:t,y:r}of i.positions)e.add(t,r);e.finish(),delete i.positions,i.index=e}this._symbolsByKey[e]=i}}getScaledCoordinates(e,r){let{x:i,y:n,z:a}=this.tileID.canonical,{x:o,y:s,z:l}=r.canonical,c=e7/Math.pow(2,l-a),u=(s*t.a6+e.anchorY)*c,h=n*t.a6*e7;return{x:Math.floor((o*t.a6+e.anchorX)*c-i*t.a6*e7),y:Math.floor(u-h)}}findMatches(e,t,r){let i=this.tileID.canonical.ze)}}class te{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class tt{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){let t=Math.round((e-this.lng)/360);if(0!==t)for(let e in this.indexes){let r=this.indexes[e],i={};for(let e in r){let n=r[e];n.tileID=n.tileID.unwrapTo(n.tileID.wrap+t),i[n.tileID.key]=n}this.indexes[e]=i}this.lng=e}addBucket(e,t,r){var i,n,a;if(null!=(i=this.indexes[e.overscaledZ])&&i[e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let e=0;ee.overscaledZ)for(let r in i){let n=i[r];n.tileID.isChildOf(e)&&n.findMatches(t.symbolInstances,e,o)}else{let n=i[e.scaledTo(Number(r)).key];n&&n.findMatches(t.symbolInstances,e,o)}}for(let e=0;e850?s+=" Black":n>750?s+=" Extra Bold":n>650?s+=" Bold":n>550?s+=" Semi Bold":n>450?s+=" Medium":n>350?s+=" Regular":n>250?s+=" Light":n>150?s+=" Extra Light":s+=" Thin"):"Open Sans"===a.slice(0,2).join(" ")?(s="Open Sans",n>750?s+=" Extrabold":n>650?s+=" Bold":n>550?s+=" Semibold":n>350?s+=" Regular":s+=" Light"):"Klokantech Noto Sans"===a.slice(0,3).join(" ")&&(s="Klokantech Noto Sans","CJK"===a[3]&&(s+=" CJK"),s+=n>500?" Bold":" Regular")),o&&(s+=" Italic"),"Open Sans Regular Italic"===s?s="Open Sans Italic":"Open Sans Regular Bold"===s?s="Open Sans Bold":"Open Sans Regular Bold Italic"===s?s="Open Sans Bold Italic":"Klokantech Noto Sans Regular Italic"===s&&(s="Klokantech Noto Sans Italic"),u(s)||(s=r),s.split(", ")}t.exports=function(e,t){var u,b=t[0].trace,_=!0===b.visible&&0!==b._length,w="none"!==b.fill,T=c.hasLines(b),M=c.hasMarkers(b),k=c.hasText(b),A=M&&"circle"===b.marker.symbol,S=M&&"circle"!==b.marker.symbol,E=b.cluster&&b.cluster.enabled,C=m("fill"),L=m("line"),P=m("circle"),I=m("symbol"),z={fill:C,line:L,circle:P,symbol:I};if(!_)return z;if((w||T)&&(u=a.calcTraceToLineCoords(t)),w&&(C.geojson=a.makePolygon(u),C.layout.visibility="visible",i.extendFlat(C.paint,{"fill-color":b.fillcolor})),T&&(L.geojson=a.makeLine(u),L.layout.visibility="visible",i.extendFlat(L.paint,{"line-width":b.line.width,"line-color":b.line.color,"line-opacity":b.opacity})),A){var D=function(e){var t,a,c,u,h,d=e[0].trace,f=d.marker,p=d.selectedpoints,m=i.isArrayOrTypedArray(f.color),g=i.isArrayOrTypedArray(f.size),y=i.isArrayOrTypedArray(f.opacity);function v(e){return d.opacity*e}m&&(t=o.hasColorscale(d,"marker")?o.makeColorScaleFuncFromTrace(f):i.identity),g&&(a=l(d)),y&&(c=function(e){return v(r(e)?+i.constrain(e,0,1):0)});var x=[];for(h=0;h=0;t--){var r=a[t];n.removeLayer(h.layerIds[r])}e||n.removeSource(h.sourceIds.circle)}(e):function(e){for(var t=o.length-1;t>=0;t--){var r=o[t];n.removeLayer(h.layerIds[r]),e||n.removeSource(h.sourceIds[r])}}(e)}function f(e){c?function(e){e||h.addSource("circle",s.circle,t.cluster);for(var r=0;r=0;r--){var i=t[r];e.removeLayer(this.layerIds[i]),e.removeSource(this.sourceIds[i])}},t.exports=function(e,t){var r,n,l,c=t[0].trace,u=c.cluster&&c.cluster.enabled,h=!0!==c.visible,d=new s(e,c.uid,u,h),f=i(e.gd,t),p=d.below=e.belowLookup["trace-"+c.uid];if(u)for(d.addSource("circle",f.circle,c.cluster),r=0;r")}}t.exports={hoverPoints:function(e,t,a){var c=e.cd,u=c[0].trace,h=e.xa,d=e.ya,f=e.subplot,p=[],m=s+u.uid+"-circle",g=u.cluster&&u.cluster.enabled;g&&(p=f.map.queryRenderedFeatures(null,{layers:[m]}).map(function(e){return e.id}));var y=360*(t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360)),v=t-y;if(r.getClosest(c,function(e){var t=e.lonlat;if(t[0]===o||g&&-1===p.indexOf(e.i+1))return 1/0;var r=i.modHalf(t[0],360),n=t[1],s=f.project([r,n]),l=s.x-h.c2p([v,n]),c=s.y-d.c2p([r,a]),u=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-u,1-3/u)},e),!1!==e.index){var x=c[e.index],b=x.lonlat,_=[i.modHalf(b[0],360)+y,b[1]],w=h.c2p(_),T=d.c2p(_),M=x.mrc||1;e.x0=w-M,e.x1=w+M,e.y0=T-M,e.y1=T+M;var k={};k[u.subplot]={_subplot:f};var A=u._module.formatLabels(x,u,k);return e.lonLabel=A.lonLabel,e.latLabel=A.latLabel,e.color=n(u,x),e.extraText=l(u,x,c[0].t.labels),e.hovertemplate=u.hovertemplate,[e]}},getExtraText:l}}}),va=p({"src/traces/scattermap/event_data.js"(e,t){t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e}}}),vo=p({"src/traces/scattermap/select.js"(e,t){var r=tv(),i=t5(),{BADNUM:n}=L();t.exports=function(e,t){var a;let{cd:o,xaxis:s,yaxis:l}=e,{trace:c}=o[0];if(!i.hasMarkers(c))return[];if(!1===t){for(let e of o)e.selected=0;return[]}let u=null==(a=s._subplot)?void 0:a.map,h=u?.getRenderWorldCopies()&&t.xmax>t.xmin?u.transform.worldSize:0,d=[];for(let i=0;itypeof window&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([a],{type:"text/javascript"}))),e}}return r("shared",["exports"],function(e){let t,r,i,n,a,o,s,l,c,u,h,f,p,m,g,y,v,x,b;function _(e,t,r,i){return new(r||(r=Promise))(function(n,a){function o(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,s)}l((i=i.apply(e,t||[])).next())})}function w(e,t){this.x=e,this.y=t}function T(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError,w.prototype={clone(){return new w(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,t){return this.clone()._rotateAround(e,t)},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 t=e.x-this.x,r=e.y-this.y;return t*t+r*r},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,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult(e){let t=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,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 t=Math.cos(e),r=Math.sin(e),i=r*this.x+t*this.y;return this.x=t*this.x-r*this.y,this.y=i,this},_rotateAround(e,t){let r=Math.cos(e),i=Math.sin(e),n=t.y+i*(this.x-t.x)+r*(this.y-t.y);return this.x=t.x+r*(this.x-t.x)-i*(this.y-t.y),this.y=n,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:w},w.convert=function(e){if(e instanceof w)return e;if(Array.isArray(e))return new w(+e[0],+e[1]);if(void 0!==e.x&&void 0!==e.y)return new w(+e.x,+e.y);throw Error("Expected [x, y] or {x, y} point format")};var M,k,A,S,E,C,L,P,I,z,D,O,R,F,j,B,N,U,V,q,H,G,W,Y,Z=T(function(){if(rd)return rh;function e(e,t,r,i){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(i-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=i}return rd=1,rh=e,e.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var r=e,i=0;i<8;i++){var n=this.sampleCurveX(r)-e;if(Math.abs(n)Math.abs(a))break;r-=n/a}var o=0,s=1;for(r=e,i=0;i<20&&!(Math.abs((n=this.sampleCurveX(r))-e)n?o=r:s=r,r=.5*(s-o)+o;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}},rh}());function $(){return null!=t||(t="u">typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),t}function X(){if(null==r&&(r=!1,$())){let e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let t=0;t<25;t++){let r=4*t;e.fillStyle=`rgb(${r},${r+1},${r+2})`,e.fillRect(t%5,Math.floor(t/5),1,1)}let t=e.getImageData(0,0,5,5).data;for(let e=0;e<100;e++)if(e%4!=3&&t[e]!==e){r=!0;break}}}return r||!1}var K="u">typeof Float32Array?Float32Array:Array;function J(){var e=new K(9);return K!=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 Q(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 ee(){var e=new K(3);return K!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function et(e){var t=e[0],r=e[1],i=e[2];return Math.sqrt(t*t+r*r+i*i)}function er(e,t,r){var i=new K(3);return i[0]=e,i[1]=t,i[2]=r,i}function ei(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function en(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function ea(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=n*l-a*s,e[1]=a*o-i*l,e[2]=i*s-n*o,e}function eo(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3];return e[0]=r[0]*i+r[4]*n+r[8]*a+r[12]*o,e[1]=r[1]*i+r[5]*n+r[9]*a+r[13]*o,e[2]=r[2]*i+r[6]*n+r[10]*a+r[14]*o,e[3]=r[3]*i+r[7]*n+r[11]*a+r[15]*o,e}function es(){var e=new K(4);return K!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function el(e,t,r,i){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"zyx",a=Math.PI/360;t*=a,i*=a,r*=a;var o=Math.sin(t),s=Math.cos(t),l=Math.sin(r),c=Math.cos(r),u=Math.sin(i),h=Math.cos(i);switch(n){case"xyz":e[0]=o*c*h+s*l*u,e[1]=s*l*h-o*c*u,e[2]=s*c*u+o*l*h,e[3]=s*c*h-o*l*u;break;case"xzy":e[0]=o*c*h-s*l*u,e[1]=s*l*h-o*c*u,e[2]=s*c*u+o*l*h,e[3]=s*c*h+o*l*u;break;case"yxz":e[0]=o*c*h+s*l*u,e[1]=s*l*h-o*c*u,e[2]=s*c*u-o*l*h,e[3]=s*c*h+o*l*u;break;case"yzx":e[0]=o*c*h+s*l*u,e[1]=s*l*h+o*c*u,e[2]=s*c*u-o*l*h,e[3]=s*c*h-o*l*u;break;case"zxy":e[0]=o*c*h-s*l*u,e[1]=s*l*h+o*c*u,e[2]=s*c*u+o*l*h,e[3]=s*c*h-o*l*u;break;case"zyx":e[0]=o*c*h-s*l*u,e[1]=s*l*h+o*c*u,e[2]=s*c*u-o*l*h,e[3]=s*c*h+o*l*u;break;default:throw Error("Unknown angle order "+n)}return e}function ec(){var e=new K(2);return K!=Float32Array&&(e[0]=0,e[1]=0),e}function eu(e,t){var r=new K(2);return r[0]=e,r[1]=t,r}function eh(e,t,r){return t*(8192/(e.tileSize*Math.pow(2,r-e.tileID.overscaledZ)))}function ed(e){return e instanceof Error?e:Error("string"==typeof e?e:String(e))}function ef(e,t){return(e%t+t)%t}function ep(e,t,r){return e*(1-r)+t*r}function em(e){if(e<=0)return 0;if(e>=1)return 1;let t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function eg(e,t,r,i){let n=new Z(e,t,r,i);return e=>n.solve(e)}ee(),rf=new K(4),K!=Float32Array&&(rf[0]=0,rf[1]=0,rf[2]=0,rf[3]=0),ee(),er(1,0,0),er(0,1,0),es(),es(),J(),ec();let ey=eg(.25,.1,.25,1);function ev(e,t,r){return Math.min(r,Math.max(t,e))}function ex(e,t,r){let i=r-t,n=((e-t)%i+i)%i+t;return n===t?r:n}function eb(e,...t){for(let r of t)for(let t in r)e[t]=r[t];return e}let e_=1;function ew(e,t,r){let i={};for(let r in e)i[r]=t.call(this,e[r],r,e);return i}function eT(e,t,r){let i={};for(let r in e)t.call(this,e[r],r,e)&&(i[r]=e[r]);return i}function eM(e){return Array.isArray(e)?e.map(eM):"object"==typeof e&&e?ew(e,eM):e}let ek={};function eA(e){ek[e]||("u">typeof console&&console.warn(e),ek[e]=!0)}function eS(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function eE(e){return"u">typeof WorkerGlobalScope&&void 0!==e&&e instanceof WorkerGlobalScope}let eC=null;function eL(e){return"u">typeof ImageBitmap&&e instanceof ImageBitmap}let eP="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function eI(e,t,r,i,n){return _(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw Error("VideoFrame not supported");let a=new VideoFrame(e,{timestamp:0});try{let o,s,l,c,u=a?.format;if(!u||!u.startsWith("BGR")&&!u.startsWith("RGB"))throw Error(`Unrecognized format ${u}`);let h=u.startsWith("BGR"),d=new Uint8ClampedArray(i*n*4);if(yield a.copyTo(d,(o=4*Math.max(-t,0),s=(Math.max(0,r)-r)*i*4+o,l=Math.max(0,t),c=Math.max(0,r),{rect:{x:l,y:c,width:Math.min(e.width,t+i)-l,height:Math.min(e.height,r+n)-c},layout:[{offset:s,stride:4*i}]})),h)for(let e=0;e{e.removeEventListener(t,r,i)}}}function eD(e){return e*Math.PI/180}function eO(e){return e/Math.PI*180}let eR={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},eF={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},ej="AbortError";class eB extends Error{constructor(e=ej){super(e instanceof Error?e.message:e),this.name=ej,e instanceof Error&&e.stack&&(this.stack=e.stack)}}function eN(e){return e instanceof Error&&e.name===ej}function eU(e){if(e.aborted)throw new eB(e.reason)}let eV={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function eq(e){return eV.REGISTERED_PROTOCOLS[e.substring(0,e.indexOf("://"))]}let eH="global-dispatcher";class eG extends Error{constructor(e,t,r,i){super(`AJAXError: ${t} (${e}): ${r}`),this.status=e,this.statusText=t,this.url=r,this.body=i}}let eW=()=>{var e;return eE(self)?null==(e=self.worker)?void 0:e.referrer:("blob:"===window.location.protocol?window.parent:window).location.href},eY=function(e,t){return _(this,void 0,void 0,function*(){var r,i,n,a;if(e.url.includes("://")&&!/^https?:|^file:/.test(e.url)){let i=eq(e.url);if(i){let r=yield i(e,t);return r.data||"arrayBuffer"!==e.type?r:eb(r,{data:new ArrayBuffer(0)})}if(eE(self)&&null!=(r=self.worker)&&r.actor)return self.worker.actor.sendAsync({type:"GR",data:e,targetMapId:eH},t)}if(!((n=e.url).startsWith("file:")||(null==(a=eW())?void 0:a.startsWith("file:"))&&!/^\w+:/.test(n))){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return function(e,t){return _(this,void 0,void 0,function*(){let r=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,cache:e.cache,referrer:eW(),referrerPolicy:e.referrerPolicy,signal:t.signal}),i,n;"json"!==e.type||r.headers.has("Accept")||r.headers.set("Accept","application/json");try{i=yield fetch(r)}catch(t){throw eN(t)?t:new eG(0,ed(t).message,e.url,new Blob)}if(!i.ok){let t=yield i.blob();throw new eG(i.status,i.statusText,e.url,t)}n="arrayBuffer"===e.type||"image"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text();let a=yield n;return eU(t.signal),{data:a,cacheControl:i.headers.get("Cache-Control"),expires:i.headers.get("Expires"),etag:i.headers.get("ETag")}})}(e,t);if(eE(self)&&null!=(i=self.worker)&&i.actor)return self.worker.actor.sendAsync({type:"GR",data:e,mustQueue:!0,targetMapId:eH},t)}return new Promise((r,i)=>{var n;let a=new XMLHttpRequest;for(let t in a.open(e.method||"GET",e.url,!0),"arrayBuffer"!==e.type&&"image"!==e.type||(a.responseType="arraybuffer"),e.headers)a.setRequestHeader(t,e.headers[t]);"json"===e.type&&(a.responseType="text",null!=(n=e.headers)&&n.Accept||a.setRequestHeader("Accept","application/json")),a.withCredentials="include"===e.credentials,a.onerror=()=>{i(Error(a.statusText))},a.onload=()=>{if(!t.signal.aborted)if((a.status>=200&&a.status<300||0===a.status)&&null!==a.response){let t=a.response;if("json"===e.type)try{t=JSON.parse(a.response)}catch(e){return void i(e)}r({data:t,cacheControl:a.getResponseHeader("Cache-Control"),expires:a.getResponseHeader("Expires"),etag:a.getResponseHeader("ETag")})}else{let t=new Blob([a.response],{type:a.getResponseHeader("Content-Type")});i(new eG(a.status,a.statusText,e.url,t))}},t.signal.addEventListener("abort",()=>{a.abort(),i(new eB(t.signal.reason))}),a.send(e.body)})})};function eZ(e){if(!e||0>=e.indexOf("://")||e.startsWith("data:image/")||e.startsWith("blob:"))return!0;let t=new URL(e),r=window.location;return t.protocol===r.protocol&&t.host===r.host}function e$(e,t,r){var i;null!=(i=r[e])&&i.includes(t)||(r[e]||(r[e]=[]),r[e].push(t))}function eX(e,t,r){if(r?.[e]){let i=r[e].indexOf(t);-1!==i&&r[e].splice(i,1)}}class eK{constructor(e,t={}){eb(this,t),this.type=e}}class eJ extends eK{constructor(e,t={}){super("error",eb({error:e},t))}}class eQ{on(e,t){return this._listeners||(this._listeners={}),e$(e,t,this._listeners),{unsubscribe:()=>{this.off(e,t)}}}off(e,t){return eX(e,t,this._listeners),eX(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners||(this._oneTimeListeners={}),e$(e,t,this._oneTimeListeners),this):new Promise(t=>this.once(e,t))}fire(e,t){var r,i;"string"==typeof e&&(e=new eK(e,t||{}));let n=e.type;if(this.listens(n)){for(let t of(e.target=this,null!=(r=this._listeners)&&r[n]?this._listeners[n].slice():[]))t.call(this,e);for(let t of null!=(i=this._oneTimeListeners)&&i[n]?this._oneTimeListeners[n].slice():[])eX(n,t,this._oneTimeListeners),t.call(this,e);let t=this._eventedParent;t&&(eb(e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),t.fire(e))}else e instanceof eJ&&console.error(e.error);return this}listens(e){var t,r,i,n,a;return(null==(r=null==(t=this._listeners)?void 0:t[e])?void 0:r.length)>0||(null==(n=null==(i=this._oneTimeListeners)?void 0:i[e])?void 0:n.length)>0||(null==(a=this._eventedParent)?void 0:a.listens(e))}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}}var e0={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let e1=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function e2(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}let tb=[ti,tn,ta,to,ts,tl,td,tc,tv(tu),tf,tm,tp,tg,ty];function t_(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!t_(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind){for(let e of tb)if(!t_(e,t))return null}}return`Expected ${tx(e)} but found ${tx(t)} instead.`}function tw(e,t){return t.some(t=>t.kind===e.kind)}function tT(e,t){return t.some(t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e)}function tM(e,t){return"array"===e.kind&&"array"===t.kind?e.itemType.kind===t.itemType.kind&&"number"==typeof e.N:e.kind===t.kind}let tk=4/29,tA=6/29,tS=6/29*3*(6/29),tE=6/29*(6/29)*(6/29),tC=Math.PI/180,tL=180/Math.PI;function tP(e){return(e%=360)<0&&(e+=360),e}function tI([e,t,r,i]){let n,a,o=tD((.2225045*(e=tz(e))+.7168786*(t=tz(t))+.0606169*(r=tz(r)))/1);e===t&&t===r?n=a=o:(n=tD((.4360747*e+.3850649*t+.1430804*r)/.96422),a=tD((.0139322*e+.0971045*t+.7141733*r)/.82521));let s=116*o-16;return[s<0?0:s,500*(n-o),200*(o-a),i]}function tz(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function tD(e){return e>tE?Math.pow(e,1/3):e/tS+tk}function tO([e,t,r,i]){let n=(e+16)/116,a=isNaN(t)?n:n+t/500,o=isNaN(r)?n:n-r/200;return n=+tF(n),[tR(3.1338561*(a=.96422*tF(a))-1.6168667*n-.4906146*(o=.82521*tF(o))),tR(-.9787684*a+1.9161415*n+.033454*o),tR(.0719453*a-.2289914*n+1.4052427*o),i]}function tR(e){return(e=e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055)<0?0:e>1?1:e}function tF(e){return e>tA?e*e*e:tS*(e-tk)}let tj=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};function tB(e,t){return tj(e,t)?e[t]:void 0}function tN(e){return parseInt(e.padEnd(2,e),16)/255}function tU(e,t){return tV(t?e/100:e,0,1)}function tV(e,t,r){return Math.min(Math.max(t,e),r)}function tq(e){return!e.some(Number.isNaN)}let tH={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 tG(e,t,r){return e.map((e,i)=>e+r*(t[i]-e))}class tW{constructor(e,t,r,i=1,n=!0){this.r=e,this.g=t,this.b=r,this.a=i,n||(this.r*=i,this.g*=i,this.b*=i,i||this.overwriteGetter("rgb",[e,t,r,i]))}static parse(e){if(e instanceof tW)return e;if("string"!=typeof e)return;let t=function(e){if("transparent"===(e=e.toLowerCase().trim()))return[0,0,0,0];let t=tB(tH,e);if(t){let[e,r,i]=t;return[e/255,r/255,i/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){let t=e.length<6?1:2,r=1;return[tN(e.slice(r,r+=t)),tN(e.slice(r,r+=t)),tN(e.slice(r,r+=t)),tN(e.slice(r,r+t)||"ff")]}if(e.startsWith("rgb")){let t=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(t){let[e,r,i,n,a,o,s,l,c,u,h,d]=t,f=[n||" ",s||" ",u].join("");if(" "===f||" /"===f||",,"===f||",,,"===f){let e=[i,o,c].join(""),t="%%%"===e?100:255*(""===e);if(t){let e=[tV(r/t,0,1),tV(a/t,0,1),tV(l/t,0,1),h?tU(+h,d):1];if(tq(e))return e}}return}}let r=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(r){let[e,t,i,n,a,o,s,l,c]=r,u=[i||" ",a||" ",s].join("");if(" "===u||" /"===u||",,"===u||",,,"===u){let e=[+t,tV(+n,0,100),tV(+o,0,100),l?tU(+l,c):1];if(tq(e))return function([e,t,r,i]){function n(i){let n=(i+e/30)%12,a=t*Math.min(r,1-r);return r-a*Math.max(-1,Math.min(n-3,9-n,1))}return e=tP(e),t/=100,r/=100,[n(0),n(8),n(4),i]}(e)}}}(e);return t?new tW(...t,!1):void 0}get rgb(){let{r:e,g:t,b:r,a:i}=this,n=i||1/0;return this.overwriteGetter("rgb",[e/n,t/n,r/n,i])}get hcl(){return this.overwriteGetter("hcl",function(e){let[t,r,i,n]=tI(e),a=Math.sqrt(r*r+i*i);return[Math.round(1e4*a)?tP(Math.atan2(i,r)*tL):NaN,a,t,n]}(this.rgb))}get lab(){return this.overwriteGetter("lab",tI(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){let[e,t,r,i]=this.rgb;return`rgba(${[e,t,r].map(e=>Math.round(255*e)).join(",")},${i})`}static interpolate(e,t,r,i="rgb"){switch(i){case"rgb":{let[i,n,a,o]=tG(e.rgb,t.rgb,r);return new tW(i,n,a,o,!1)}case"hcl":{let[i,n,a,o]=e.hcl,[s,l,c,u]=t.hcl,h,d;if(isNaN(i)||isNaN(s))isNaN(i)?isNaN(s)?h=NaN:(h=s,1!==a&&0!==a||(d=l)):(h=i,1!==c&&0!==c||(d=n));else{let e=s-i;s>i&&e>180?e-=360:s180&&(e+=360),h=i+r*e}let[f,p,m,g]=function([e,t,r,i]){return tO([r,Math.cos(e=isNaN(e)?0:e*tC)*t,Math.sin(e)*t,i])}([h,d??n+r*(l-n),a+r*(c-a),o+r*(u-o)]);return new tW(f,p,m,g,!1)}case"lab":{let[i,n,a,o]=tO(tG(e.lab,t.lab,r));return new tW(i,n,a,o,!1)}}}}tW.black=new tW(0,0,0,1),tW.white=new tW(1,1,1,1),tW.transparent=new tW(0,0,0,0),tW.red=new tW(1,0,0,1);class tY{constructor(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let tZ=["bottom","center","top"];class t${constructor(e,t,r,i,n,a){this.text=e,this.image=t,this.scale=r,this.fontStack=i,this.textColor=n,this.verticalAlign=a}}class tX{constructor(e){this.sections=e}static fromString(e){return new tX([new t$(e,null,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(e=>0!==e.text.length||e.image&&0!==e.image.name.length)}static factory(e){return e instanceof tX?e:tX.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map(e=>e.text).join("")}}class tK{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tK)return e;if("number"==typeof e)return new tK([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(let t of e)if("number"!=typeof t)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 tK(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){return new tK(tG(e.values,t.values,r))}}class tJ{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tJ)return e;if("number"==typeof e)return new tJ([e]);if(Array.isArray(e)){for(let t of e)if("number"!=typeof t)return;return new tJ(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){return new tJ(tG(e.values,t.values,r))}}class tQ{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tQ)return e;if("string"==typeof e){let t=tW.parse(e);return t?new tQ([t]):void 0}if(!Array.isArray(e))return;let t=[];for(let r of e){if("string"!=typeof r)return;let e=tW.parse(r);if(!e)return;t.push(e)}return new tQ(t)}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r,i="rgb"){let n=[];if(e.values.length!=t.values.length)throw Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${t.values.length}), cannot interpolate.`);for(let a=0;a=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===i||"number"==typeof i&&i>=0&&i<=1?null:`Invalid rgba value [${[e,t,r,i].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof i?[e,t,r,i]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function t6(e){if(null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||e instanceof t5||e instanceof tW||e instanceof tY||e instanceof tX||e instanceof tK||e instanceof tJ||e instanceof tQ||e instanceof t2||e instanceof t3)return!0;if(Array.isArray(e)){for(let t of e)if(!t6(t))return!1;return!0}if("object"==typeof e){for(let t in e)if(!t6(e[t]))return!1;return!0}return!1}function t8(e){if(null===e)return ti;if("string"==typeof e)return ta;if("boolean"==typeof e)return to;if("number"==typeof e)return tn;if(e instanceof tW)return ts;if(e instanceof t5)return tl;if(e instanceof tY)return th;if(e instanceof tX)return td;if(e instanceof tK)return tf;if(e instanceof tJ)return tm;if(e instanceof tQ)return tp;if(e instanceof t2)return ty;if(e instanceof t3)return tg;if(Array.isArray(e)){let t=e.length,r;for(let t of e){let e=t8(t);if(r){if(r===e)continue;r=tu;break}r=e}return tv(r||tu,t)}return tc}function t9(e){let t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof tW||e instanceof t5||e instanceof tX||e instanceof tK||e instanceof tJ||e instanceof tQ||e instanceof t2||e instanceof t3?e.toString():JSON.stringify(e)}class t7{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!t6(e[1]))return t.error("invalid value");let r=e[1],i=t8(r),n=t.expectedType;return"array"===i.kind&&0===i.N&&n&&"array"===n.kind&&("number"!=typeof n.N||0===n.N)&&(i=n),new t7(i,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let re={string:ta,number:tn,boolean:to,object:tc};class rt{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r,i=1,n=e[0];if("array"===n){let n,a;if(e.length>2){let r=e[1];if("string"!=typeof r||!(r in re)||"object"===r)return t.error('The item type argument of "array" must be one of string, number, boolean',1);n=re[r],i++}else n=tu;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],i++}r=tv(n,a)}else{if(!re[n])throw Error(`Types doesn't contain name = ${n}`);r=re[n]}let a=[];for(;ie.outputDefined())}}let rr={"to-boolean":to,"to-color":ts,"to-number":tn,"to-string":ta};class ri{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=e[0];if(!rr[r])throw Error(`Can't parse ${r} as it is not part of the known types`);if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");let i=rr[r],n=[];for(let r=1;r4?`Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:t4(t[0],t[1],t[2],t[3])))return new tW(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new t0(r||`Could not parse color from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"padding":{let t;for(let r of this.args){t=r.evaluate(e);let i=tK.parse(t);if(i)return i}throw new t0(`Could not parse padding from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"numberArray":{let t;for(let r of this.args){t=r.evaluate(e);let i=tJ.parse(t);if(i)return i}throw new t0(`Could not parse numberArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"colorArray":{let t;for(let r of this.args){t=r.evaluate(e);let i=tQ.parse(t);if(i)return i}throw new t0(`Could not parse colorArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"variableAnchorOffsetCollection":{let t;for(let r of this.args){t=r.evaluate(e);let i=t2.parse(t);if(i)return i}throw new t0(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"number":{let t=null;for(let r of this.args){if(null===(t=r.evaluate(e)))return 0;let i=Number(t);if(!isNaN(i))return i}throw new t0(`Could not convert ${JSON.stringify(t)} to number.`)}case"formatted":return tX.fromString(t9(this.args[0].evaluate(e)));case"resolvedImage":return t3.fromString(t9(this.args[0].evaluate(e)));case"projectionDefinition":return this.args[0].evaluate(e);default:return t9(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}let rn=["Unknown","Point","LineString","Polygon"];class ra{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?"number"==typeof this.feature.type?rn[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(e){let t=this._parseColorCache.get(e);return t||(t=tW.parse(e),this._parseColorCache.set(e,t)),t}}class ro{constructor(e,t,r=[],i,n=new tr,a=[]){this.registry=e,this.path=r,this.key=r.map(e=>`[${e}]`).join(""),this.scope=n,this.errors=a,this.expectedType=i,this._isConstant=t}parse(e,t,r,i,n={}){return t?this.concat(t,r,i)._parse(e,n):this._parse(e,n)}_parse(e,t){function r(e,t,r){return"assert"===r?new rt(t,[e]):"coerce"===r?new ri(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let i=e[0];if("string"!=typeof i)return this.error(`Expression name must be a string, but found ${typeof i} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let n=this.registry[i];if(n){let i=n.parse(e,this);if(!i)return null;if(this.expectedType){let e=this.expectedType,n=i.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==n.kind){if("projectionDefinition"===e.kind&&["string","array"].includes(n.kind)||["color","formatted","resolvedImage"].includes(e.kind)&&["value","string"].includes(n.kind)||["padding","numberArray"].includes(e.kind)&&["value","number","array"].includes(n.kind)||"colorArray"===e.kind&&["value","string","array"].includes(n.kind)||"variableAnchorOffsetCollection"===e.kind&&["value","array"].includes(n.kind))i=r(i,e,t.typeAnnotation||"coerce");else if(this.checkSubtype(e,n))return null}else i=r(i,e,t.typeAnnotation||"assert")}if(!(i instanceof t7)&&"resolvedImage"!==i.type.kind&&this._isConstant(i)){let e=new ra;try{i=new t7(i.type,i.evaluate(e))}catch(e){return this.error(e.message),null}}return i}return this.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===e?"'undefined' value invalid. Use null instead.":"object"==typeof e?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,t,r){let i="number"==typeof e?this.path.concat(e):this.path,n=r?this.scope.concat(r):this.scope;return new ro(this.registry,this._isConstant,i,t||null,n,this.errors)}error(e,...t){let r=`${this.key}${t.map(e=>`[${e}]`).join("")}`;this.errors.push(new tt(r,e))}checkSubtype(e,t){let r=t_(e,t);return r&&this.error(r),r}}class rs{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);let r=[];for(let i=1;it))throw new t0("Input is not a number.");o=s-1}return 0}class ru{constructor(e,t,r){for(let[i,n]of(this.type=e,this.input=t,this.labels=[],this.outputs=[],r))this.labels.push(i),this.outputs.push(n)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");let r=t.parse(e[1],1,tn);if(!r)return null;let i=[],n=null;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(let r=1;r=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);let c=t.parse(o,l,n);if(!c)return null;n=n||c.type,i.push([a,c])}return new ru(n,r,i)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let i=this.input.evaluate(e);if(i<=t[0])return r[0].evaluate(e);let n=t.length;return i>=t[n-1]?r[n-1].evaluate(e):r[rc(t,i)].evaluate(e)}eachChild(e){for(let t of(e(this.input),this.outputs))e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}var rh,rd,rf,rp,rm,rg,ry=(rp=function(){if(rg)return rm;function e(e,t,r,i){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(i-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=i}return rg=1,rm=e,e.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var r=e,i=0;i<8;i++){var n=this.sampleCurveX(r)-e;if(Math.abs(n)Math.abs(a))break;r-=n/a}var o=0,s=1;for(r=e,i=0;i<20&&!(Math.abs((n=this.sampleCurveX(r))-e)n?o=r:s=r,r=.5*(s-o)+o;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}},rm}())&&rp.__esModule&&Object.prototype.hasOwnProperty.call(rp,"default")?rp.default:rp;class rv{constructor(e,t,r,i,n){for(let[a,o]of(this.type=e,this.operator=t,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[],n))this.labels.push(a),this.outputs.push(o)}static interpolationFactor(e,t,r,i){let n=0;if("exponential"===e.name)n=rx(t,e.base,r,i);else if("linear"===e.name)n=rx(t,1,r,i);else if("cubic-bezier"===e.name){let a=e.controlPoints;n=new ry(a[0],a[1],a[2],a[3]).solve(rx(t,1,r,i))}return n}static parse(e,t){let[r,i,n,...a]=e;if(!Array.isArray(i)||0===i.length)return t.error("Expected an interpolation type expression.",1);if("linear"===i[0])i={name:"linear"};else if("exponential"===i[0]){let e=i[1];if("number"!=typeof e)return t.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:e}}else{if("cubic-bezier"!==i[0])return t.error(`Unknown interpolation type ${String(i[0])}`,1,0);{let e=i.slice(1);if(4!==e.length||e.some(e=>"number"!=typeof e||e<0||e>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:e}}}if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(n=t.parse(n,2,tn)))return null;let o=[],s=null;"interpolate-hcl"!==r&&"interpolate-lab"!==r||t.expectedType==tp?t.expectedType&&"value"!==t.expectedType.kind&&(s=t.expectedType):s=ts;for(let e=0;e=r)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',n);let c=t.parse(i,l,s);if(!c)return null;s=s||c.type,o.push([r,c])}return tM(s,tn)||tM(s,tl)||tM(s,ts)||tM(s,tf)||tM(s,tm)||tM(s,tp)||tM(s,ty)||tM(s,tv(tn))?new rv(s,r,i,n,o):t.error(`Type ${tx(s)} is not interpolatable.`)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let i=this.input.evaluate(e);if(i<=t[0])return r[0].evaluate(e);let n=t.length;if(i>=t[n-1])return r[n-1].evaluate(e);let a=rc(t,i),o=rv.interpolationFactor(this.interpolation,i,t[a],t[a+1]),s=r[a].evaluate(e),l=r[a+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return s+o*(l-s);case"color":return tW.interpolate(s,l,o);case"padding":return tK.interpolate(s,l,o);case"colorArray":return tQ.interpolate(s,l,o);case"numberArray":return tJ.interpolate(s,l,o);case"variableAnchorOffsetCollection":return t2.interpolate(s,l,o);case"array":return tG(s,l,o);case"projectionDefinition":return t5.interpolate(s,l,o)}case"interpolate-hcl":switch(this.type.kind){case"color":return tW.interpolate(s,l,o,"hcl");case"colorArray":return tQ.interpolate(s,l,o,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return tW.interpolate(s,l,o,"lab");case"colorArray":return tQ.interpolate(s,l,o,"lab")}}}eachChild(e){for(let t of(e(this.input),this.outputs))e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function rx(e,t,r,i){let n=i-r,a=e-r;return 0===n?0:1===t?a/n:(Math.pow(t,a)-1)/(Math.pow(t,n)-1)}let rb={color:tW.interpolate,number:function(e,t,r){return e+r*(t-e)},padding:tK.interpolate,numberArray:tJ.interpolate,colorArray:tQ.interpolate,variableAnchorOffsetCollection:t2.interpolate,array:tG};class r_{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=null,i=t.expectedType;i&&"value"!==i.kind&&(r=i);let n=[];for(let i of e.slice(1)){let e=t.parse(i,1+n.length,r,void 0,{typeAnnotation:"omit"});if(!e)return null;r=r||e.type,n.push(e)}if(!r)throw Error("No output type");return new r_(i&&n.some(e=>t_(i,e.type))?tu:r,n)}evaluate(e){let t,r=null,i=0;for(let n of this.args)if(i++,(r=n.evaluate(e))&&r instanceof t3&&!r.available&&(t||(t=r.name),r=null,i===this.args.length&&(r=t)),null!==r)break;return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}function rw(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function rT(e,t,r,i){return 0===i.compare(t,r)}function rM(e,t,r){let i="=="!==e&&"!="!==e;return class n{constructor(e,t,r){this.type=to,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");let r=e[0],a=t.parse(e[1],1,tu);if(!a)return null;if(!rw(r,a.type))return t.concat(1).error(`"${r}" comparisons are not supported for type '${tx(a.type)}'.`);let o=t.parse(e[2],2,tu);if(!o)return null;if(!rw(r,o.type))return t.concat(2).error(`"${r}" comparisons are not supported for type '${tx(o.type)}'.`);if(a.type.kind!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error(`Cannot compare types '${tx(a.type)}' and '${tx(o.type)}'.`);i&&("value"===a.type.kind&&"value"!==o.type.kind?a=new rt(o.type,[a]):"value"!==a.type.kind&&"value"===o.type.kind&&(o=new rt(a.type,[o])));let s=null;if(4===e.length){if("string"!==a.type.kind&&"string"!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,th)))return null}return new n(a,o,s)}evaluate(n){let a=this.lhs.evaluate(n),o=this.rhs.evaluate(n);if(i&&this.hasUntypedArgument){let t=t8(a),r=t8(o);if(t.kind!==r.kind||"string"!==t.kind&&"number"!==t.kind)throw new t0(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${r.kind}) instead.`)}if(this.collator&&!i&&this.hasUntypedArgument){let e=t8(a),r=t8(o);if("string"!==e.kind||"string"!==r.kind)return t(n,a,o)}return this.collator?r(n,a,o,this.collator.evaluate(n)):t(n,a,o)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}}}let rk=rM("==",function(e,t,r){return t===r},rT),rA=rM("!=",function(e,t,r){return t!==r},function(e,t,r,i){return!rT(0,t,r,i)}),rS=rM("<",function(e,t,r){return ti.compare(t,r)}),rE=rM(">",function(e,t,r){return t>r},function(e,t,r,i){return i.compare(t,r)>0}),rC=rM("<=",function(e,t,r){return t<=r},function(e,t,r,i){return 0>=i.compare(t,r)}),rL=rM(">=",function(e,t,r){return t>=r},function(e,t,r,i){return i.compare(t,r)>=0});class rP{constructor(e,t,r){this.type=th,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(2!==e.length)return t.error("Expected one argument.");let r=e[1];if("object"!=typeof r||Array.isArray(r))return t.error("Collator options argument must be an object.");let i=t.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,to);if(!i)return null;let n=t.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,to);if(!n)return null;let a=null;return!r.locale||(a=t.parse(r.locale,1,ta))?new rP(i,n,a):null}evaluate(e){return new tY(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}}class rI{constructor(e){this.type=td,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=e[1];if(!Array.isArray(r)&&"object"==typeof r)return t.error("First argument must be an image or text section.");let i=[],n=!1;for(let r=1;r<=e.length-1;++r){let a=e[r];if(n&&"object"==typeof a&&!Array.isArray(a)){n=!1;let e=null;if(a["font-scale"]&&!(e=t.parse(a["font-scale"],1,tn)))return null;let r=null;if(a["text-font"]&&!(r=t.parse(a["text-font"],1,tv(ta))))return null;let o=null;if(a["text-color"]&&!(o=t.parse(a["text-color"],1,ts)))return null;let s=null;if(a["vertical-align"]){if("string"==typeof a["vertical-align"]&&!tZ.includes(a["vertical-align"]))return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${a["vertical-align"]}' instead.`);if(!(s=t.parse(a["vertical-align"],1,ta)))return null}let l=i[i.length-1];l.scale=e,l.font=r,l.textColor=o,l.verticalAlign=s}else{let a=t.parse(e[r],1,tu);if(!a)return null;let o=a.type.kind;if("string"!==o&&"value"!==o&&"null"!==o&&"resolvedImage"!==o)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,i.push({content:a,scale:null,font:null,textColor:null,verticalAlign:null})}}return new rI(i)}evaluate(e){return new tX(this.sections.map(t=>{let r=t.content.evaluate(e);return t8(r)===tg?new t$("",r,null,null,null,t.verticalAlign?t.verticalAlign.evaluate(e):null):new t$(t9(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null,t.verticalAlign?t.verticalAlign.evaluate(e):null)}))}eachChild(e){for(let t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor),t.verticalAlign&&e(t.verticalAlign)}outputDefined(){return!1}}function rz(e,t){let r=Math.pow(2,t.z);return[360*((e[0]/8192+t.x)/r)-180,360/Math.PI*Math.atan(Math.exp((180-360*((e[1]/8192+t.y)/r))*Math.PI/180))-90]}function rD(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function rO(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function rR(e,t,r,i){var n,a;return(n=[i[0]-r[0],i[1]-r[1]])[0]*(a=[t[0]-e[0],t[1]-e[1]])[1]-n[1]*a[0]!=0&&!(!rB(e,t,r,i)||!rB(r,i,e,t))}function rF(e,t,r=!1){var i,n;let a=!1;for(let o of t)for(let t=0;te[1]!=(n=o[t+1])[1]>e[1]&&e[0]<(n[0]-i[0])*(e[1]-i[1])/(n[1]-i[1])+i[0]&&(a=!a)}return a}function rj(e,t){for(let r of e)if(!rF(r,t))return!1;for(let r=0;r0&&s<0||o<0&&s>0}function rN(e,t,r){let i=[];for(let n=0;nr[2]){let t=.5*i,n=e[0]-r[0]>t?-i:r[0]-e[0]>t?i:0;0===n&&(n=e[0]-r[2]>t?-i:r[2]-e[0]>t?i:0),e[0]+=n}rD(t,e)}function rq(e,t,r,i){let n=8192*Math.pow(2,i.z),a=[8192*i.x,8192*i.y],o=[];for(let i of e)for(let e of i){let i=[e.x+a[0],e.y+a[1]];rV(i,t,r,n),o.push(i)}return o}function rH(e,t,r,i){let n=8192*Math.pow(2,i.z),a=[8192*i.x,8192*i.y],o=[];for(let r of e){let e=[];for(let i of r){let r=[i.x+a[0],i.y+a[1]];rD(t,r),e.push(r)}o.push(e)}if(t[2]-t[0]<=n/2)for(let e of(t[0]=t[1]=1/0,t[2]=t[3]=-1/0,o))for(let i of e)rV(i,t,r,n);return o}class rG{constructor(e,t){this.type=to,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(t6(e[1])){let t=e[1];if("FeatureCollection"===t.type){let e=[];for(let r of t.features){let{type:t,coordinates:i}=r.geometry;"Polygon"===t&&e.push(i),"MultiPolygon"===t&&e.push(...i)}if(e.length)return new rG(t,{type:"MultiPolygon",coordinates:e})}else if("Feature"===t.type){let e=t.geometry.type;if("Polygon"===e||"MultiPolygon"===e)return new rG(t,t.geometry)}else if("Polygon"===t.type||"MultiPolygon"===t.type)return new rG(t,t)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=e.canonicalID();if("Polygon"===t.type){let a=rN(t.coordinates,i,n),o=rq(e.geometry(),r,i,n);if(!rO(r,i))return!1;for(let e of o)if(!rF(e,a))return!1}if("MultiPolygon"===t.type){let a=rU(t.coordinates,i,n),o=rq(e.geometry(),r,i,n);if(!rO(r,i))return!1;for(let e of o)if(!function(e,t){for(let r of t)if(rF(e,r))return!0;return!1}(e,a))return!1}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=e.canonicalID();if("Polygon"===t.type){let a=rN(t.coordinates,i,n),o=rH(e.geometry(),r,i,n);if(!rO(r,i))return!1;for(let e of o)if(!rj(e,a))return!1}if("MultiPolygon"===t.type){let a=rU(t.coordinates,i,n),o=rH(e.geometry(),r,i,n);if(!rO(r,i))return!1;for(let e of o)if(!function(e,t){for(let r of t)if(rj(e,r))return!0;return!1}(e,a))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let rW=class{constructor(e=[],t=(e,t)=>et)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,i=t[e];for(;e>0;){let n=e-1>>1,a=t[n];if(r(i,a)>=0)break;t[e]=a,e=n}t[e]=i}_down(e){let{data:t,compare:r}=this,i=this.length>>1,n=t[e];for(;er(t[a],t[i])&&(i=a),r(t[i],n)>=0)break;t[e]=t[i],e=i}t[e]=n}};function rY(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function rZ(e,t){if(e.length<=1)return[e];let r=[],i,n;for(let t of e){let e=function(e){let t=0;for(let r,i,n=0,a=e.length,o=a-1;n1)for(let e=0;et)}){for(;n>i;){if(n-i>600){let o=n-i+1,s=r-i+1,l=Math.log(o),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1);e(t,r,Math.max(i,Math.floor(r-s*c/o+u)),Math.min(n,Math.floor(r+(o-s)*c/o+u)),a)}let o=t[r],s=i,l=n;for(rY(t,i,r),a(t[n],o)>0&&rY(t,i,n);sa(t[s],o);)s++;for(;a(t[l],o)>0;)l--}0===a(t[i],o)?rY(t,i,l):rY(t,++l,n),l<=r&&(i=l+1),r<=l&&(n=l-1)}}(r[e],t,1,r[e].length-1,r$),r[e]=r[e].slice(0,t));return r}function r$(e,t){return t.area-e.area}let rX=1/298.257223563*(2-1/298.257223563),rK=Math.PI/180;class rJ{constructor(e){let t=6378.137*rK*1e3,r=Math.cos(e*rK),i=1/(1-rX*(1-r*r)),n=Math.sqrt(i);this.kx=t*n*r,this.ky=t*n*i*(1-rX)}distance(e,t){let r=this.wrap(e[0]-t[0])*this.kx,i=(e[1]-t[1])*this.ky;return Math.sqrt(r*r+i*i)}pointOnLine(e,t){let r,i,n,a,o=1/0;for(let s=0;s1?(l=e[s+1][0],c=e[s+1][1]):d>0&&(l+=u/this.kx*d,c+=h/this.ky*d));let f=(u=this.wrap(t[0]-l)*this.kx)*u+(h=(t[1]-c)*this.ky)*h;f180;)e-=360;return e}}function rQ(e,t){return t[0]-e[0]}function r0(e){return e[1]-e[0]+1}function r1(e,t){return e[1]>=e[0]&&e[1]e[1])return[null,null];let r=r0(e);if(t){if(2===r)return[e,null];let t=Math.floor(r/2);return[[e[0],e[0]+t],[e[0]+t,e[1]]]}if(1===r)return[e,null];let i=Math.floor(r/2)-1;return[[e[0],e[0]+i],[e[0]+i+1,e[1]]]}function r3(e,t){if(!r1(t,e.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let i=t[0];i<=t[1];++i)rD(r,e[i]);return r}function r5(e){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)for(let e of r)rD(t,e);return t}function r4(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function r6(e,t,r){if(!r4(e)||!r4(t))return NaN;let i=0,n=0;return e[2]t[2]&&(i=e[0]-t[2]),e[1]>t[3]&&(n=e[1]-t[3]),e[3]0;){let n=o.pop();if(n[0]>=a)continue;let l=n[1],c=t?50:100;if(r0(l)<=c){if(!r1(l,e.length))return NaN;if(t){let t=function(e,t,r,i){if(!r1(t,e.length))return NaN;for(let i=t[0];i<=t[1];++i)if(rF(e[i],r,!0))return 0;let n=1/0;for(let a=t[0];a0;){let a=s.pop();if(a[0]>=o)continue;let l=a[1],c=a[2],u=t?50:100,h=i?50:100;if(r0(l)<=u&&r0(c)<=h){if(!r1(l,e.length)&&r1(c,r.length))return NaN;if(t&&i)o=Math.min(o,function(e,t,r,i,n){if(!r1(t,e.length)||!r1(i,r.length))return 1/0;let a=1/0;for(let o=t[0];o({type:"Polygon",coordinates:e})):"MultiLineString"===e.type?e.coordinates.map(e=>({type:"LineString",coordinates:e})):"MultiPoint"===e.type?e.coordinates.map(e=>({type:"Point",coordinates:e})):[e]}class io{constructor(e,t){this.type=tn,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'distance' expression requires exactly one argument, but found ${e.length-1} instead.`);if(t6(e[1])){let t=e[1];if("FeatureCollection"===t.type)return new io(t,t.features.map(e=>ia(e.geometry)).flat());if("Feature"===t.type)return new io(t,ia(t.geometry));if("type"in t&&"coordinates"in t)return new io(t,ia(t))}return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=e.geometry(),i=r.flat().map(t=>rz([t.x,t.y],e.canonical));if(0===r.length)return NaN;let n=new rJ(i[0][1]),a=1/0;for(let e of t){switch(e.type){case"Point":a=Math.min(a,ii(i,!1,[e.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,ii(i,!1,e.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,ir(i,!1,e.coordinates,n,a))}if(0===a)break}return a}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=e.geometry(),i=r.flat().map(t=>rz([t.x,t.y],e.canonical));if(0===r.length)return NaN;let n=new rJ(i[0][1]),a=1/0;for(let e of t){switch(e.type){case"Point":a=Math.min(a,ii(i,!0,[e.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,ii(i,!0,e.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,ir(i,!0,e.coordinates,n,a))}if(0===a)break}return a}(e,this.geometries);if("Polygon"===e.geometryType())return function(e,t){let r=e.geometry();if(0===r.length||0===r[0].length)return NaN;let i=rZ(r,0).map(t=>t.map(t=>t.map(t=>rz([t.x,t.y],e.canonical)))),n=new rJ(i[0][0][0][1]),a=1/0;for(let e of t)for(let t of i){switch(e.type){case"Point":a=Math.min(a,ir([e.coordinates],!1,t,n,a));break;case"LineString":a=Math.min(a,ir(e.coordinates,!0,t,n,a));break;case"Polygon":a=Math.min(a,function(e,t,r,i=1/0){let n=r5(e),a=r5(t);if(i!==1/0&&r6(n,a,r)>=i)return i;if(rO(n,a)){if(r7(e,t))return 0}else if(r7(t,e))return 0;let o=1/0;for(let i of e)for(let e=0,n=i.length,a=n-1;e":rE,"<":rS,">=":rL,"<=":rC,array:rt,at:class e{constructor(e,t,r){this.type=e,this.index=t,this.input=r}static parse(t,r){if(3!==t.length)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,tn),n=r.parse(t[2],2,tv(r.expectedType||tu));return i&&n?new e(n.type.itemType,i,n):null}evaluate(e){let t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new t0(`Array index out of bounds: ${t} < 0.`);if(t>=r.length)throw new t0(`Array index out of bounds: ${t} > ${r.length-1}.`);if(t!==Math.floor(t))throw new t0(`Array index must be an integer, but found ${t} instead.`);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}},boolean:rt,case:class e{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(t,r){let i;if(t.length<4)return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return r.error("Expected an odd number of arguments.");r.expectedType&&"value"!==r.expectedType.kind&&(i=r.expectedType);let n=[];for(let e=1;et.outputDefined())&&this.otherwise.outputDefined()}},coalesce:r_,collator:rP,format:rI,image:class e{constructor(e){this.type=tg,this.input=e}static parse(t,r){if(2!==t.length)return r.error("Expected two arguments.");let i=r.parse(t[1],1,ta);return i?new e(i):r.error("No image name provided.")}evaluate(e){let t=this.input.evaluate(e),r=t3.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}},in:class e{constructor(e,t){this.type=to,this.needle=e,this.haystack=t}static parse(t,r){if(3!==t.length)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,tu),n=r.parse(t[2],2,tu);return i&&n?tw(i.type,[to,ta,tn,ti,tu])?new e(i,n):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${tx(i.type)} instead`):null}evaluate(e){let t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!tT(t,["boolean","string","number","null"]))throw new t0(`Expected first argument to be of type boolean, string, number or null, but found ${tx(t8(t))} instead.`);if(!tT(r,["string","array"]))throw new t0(`Expected second argument to be of type array or string, but found ${tx(t8(r))} instead.`);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}},"index-of":class e{constructor(e,t,r){this.type=tn,this.needle=e,this.haystack=t,this.fromIndex=r}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,tu),n=r.parse(t[2],2,tu);if(!i||!n)return null;if(!tw(i.type,[to,ta,tn,ti,tu]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${tx(i.type)} instead`);if(4===t.length){let a=r.parse(t[3],3,tn);return a?new e(i,n,a):null}return new e(i,n)}evaluate(e){let t,r=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!tT(r,["boolean","string","number","null"]))throw new t0(`Expected first argument to be of type boolean, string, number or null, but found ${tx(t8(r))} instead.`);if(this.fromIndex&&(t=this.fromIndex.evaluate(e)),tT(i,["string"])){let e=i.indexOf(r,t);return -1===e?-1:[...i.slice(0,e)].length}if(tT(i,["array"]))return i.indexOf(r,t);throw new t0(`Expected second argument to be of type array or string, but found ${tx(t8(i))} instead.`)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}},interpolate:rv,"interpolate-hcl":rv,"interpolate-lab":rv,length:class e{constructor(e){this.type=tn,this.input=e}static parse(t,r){if(2!==t.length)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);let i=r.parse(t[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?r.error(`Expected argument of type string or array, but found ${tx(i.type)} instead.`):new e(i):null}evaluate(e){let t=this.input.evaluate(e);if("string"==typeof t)return[...t].length;if(Array.isArray(t))return t.length;throw new t0(`Expected value to be of type string or array, but found ${tx(t8(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}},let:rs,literal:t7,match:class e{constructor(e,t,r,i,n,a){this.inputType=e,this.type=t,this.input=r,this.cases=i,this.outputs=n,this.otherwise=a}static parse(t,r){let i,n;if(t.length<5)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return r.error("Expected an even number of arguments.");r.expectedType&&"value"!==r.expectedType.kind&&(n=r.expectedType);let a={},o=[];for(let e=2;eNumber.MAX_SAFE_INTEGER)return c.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return c.error("Numeric branch labels must be integer values.");if(i){if(c.checkSubtype(i,t8(e)))return null}else i=t8(e);if(void 0!==a[String(e)])return c.error("Branch labels must be unique.");a[String(e)]=o.length}let u=r.parse(l,e,n);if(!u)return null;n=n||u.type,o.push(u)}let s=r.parse(t[1],1,tu);if(!s)return null;let l=r.parse(t[t.length-1],t.length-1,n);return l?"value"!==s.type.kind&&r.concat(1).checkSubtype(i,s.type)?null:new e(i,n,s,a,o,l):null}evaluate(e){let t=this.input.evaluate(e);return(t8(t)===this.inputType&&this.outputs[this.cases[t]]||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()}},number:rt,"number-format":class e{constructor(e,t,r,i,n,a){this.type=ta,this.number=e,this.locale=t,this.currency=r,this.unit=i,this.minFractionDigits=n,this.maxFractionDigits=a}static parse(t,r){if(3!==t.length)return r.error("Expected two arguments.");let i=r.parse(t[1],1,tn);if(!i)return null;let n=t[2];if("object"!=typeof n||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,ta)))return null;let o=null;if(n.currency&&!(o=r.parse(n.currency,1,ta)))return null;let s=null;if(n.unit&&!(s=r.parse(n.unit,1,ta)))return null;if(o&&s)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,tn)))return null;let c=null;return!n["max-fraction-digits"]||(c=r.parse(n["max-fraction-digits"],1,tn))?new e(i,a,o,s,l,c):null}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}},object:rt,slice:class e{constructor(e,t,r,i){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=i}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,tu),n=r.parse(t[2],2,tn);if(!i||!n)return null;if(!tw(i.type,[tv(tu),ta,tu]))return r.error(`Expected first argument to be of type array or string, but found ${tx(i.type)} instead`);if(4===t.length){let a=r.parse(t[3],3,tn);return a?new e(i.type,i,n,a):null}return new e(i.type,i,n)}evaluate(e){let t=this.input.evaluate(e),r=this.beginIndex.evaluate(e),i;if(this.endIndex&&(i=this.endIndex.evaluate(e)),tT(t,["string"]))return[...t].slice(r,i).join("");if(tT(t,["array"]))return t.slice(r,i);throw new t0(`Expected first argument to be of type array or string, but found ${tx(t8(t))} instead.`)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}},step:ru,string:rt,"to-boolean":ri,"to-color":ri,"to-number":ri,"to-string":ri,var:rl,within:rG,distance:io,"global-state":is};class ic{constructor(e,t,r,i){this.name=e,this.type=t,this._evaluate=r,this.args=i}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,t){let r=e[0],i=ic.definitions[r];if(!i)return t.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);let n=Array.isArray(i)?i[0]:i.type,a=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,o=a.filter(([t])=>!Array.isArray(t)||t.length===e.length-1),s=null;for(let[i,a]of o){s=new ro(t.registry,ip,t.path,null,t.scope);let o=[],l=!1;for(let t=1;tArray.isArray(e)?`(${e.map(tx).join(", ")})`:`(${tx(e.type)}...)`).join(" | "),i=[];for(let r=1;r{r=t?r&&ip(e):r&&e instanceof t7}),!!r&&im(e)&&iy(e,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function im(e){if(e instanceof ic&&("get"===e.name&&1===e.args.length||"feature-state"===e.name||"has"===e.name&&1===e.args.length||"properties"===e.name||"geometry-type"===e.name||"id"===e.name||/^filter-/.test(e.name))||e instanceof rG||e instanceof io)return!1;let t=!0;return e.eachChild(e=>{t&&!im(e)&&(t=!1)}),t}function ig(e){if(e instanceof ic&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild(e=>{t&&!ig(e)&&(t=!1)}),t}function iy(e,t){if(e instanceof ic&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild(e=>{r&&!iy(e,t)&&(r=!1)}),r}function iv(e){return{result:"success",value:e}}function ix(e){return{result:"error",value:e}}function ib(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function i_(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function iw(e){return!!e.expression&&e.expression.interpolated}function iT(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function iM(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&t8(e)===tc}function ik(e){return e}function iA(e,t,r){return void 0!==e?e:void 0!==t?t:void 0!==r?r:void 0}function iS(e,t,r,i,n){return iA(typeof r===n?i[r]:void 0,e.default,t.default)}function iE(e,t,r){if("number"!==iT(r))return iA(e.default,t.default);let i=e.stops.length;if(1===i||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[i-1][0])return e.stops[i-1][1];let n=rc(e.stops.map(e=>e[0]),r);return e.stops[n][1]}function iC(e,t,r){var i;let n,a,o=void 0!==e.base?e.base:1;if("number"!==iT(r))return iA(e.default,t.default);let s=e.stops.length;if(1===s||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[s-1][0])return e.stops[s-1][1];let l=rc(e.stops.map(e=>e[0]),r),c=(i=e.stops[l][0],n=e.stops[l+1][0]-i,a=r-i,0===n?0:1===o?a/n:(Math.pow(o,a)-1)/(Math.pow(o,n)-1)),u=e.stops[l][1],h=e.stops[l+1][1],d=rb[t.type]||ik;return"function"==typeof u.evaluate?{evaluate(...t){let r=u.evaluate.apply(void 0,t),i=h.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==i)return d(r,i,c,e.colorSpace)}}:d(u,h,c,e.colorSpace)}function iL(e,t,r){switch(t.type){case"color":r=tW.parse(r);break;case"formatted":r=tX.fromString(r.toString());break;case"resolvedImage":r=t3.fromString(r.toString());break;case"padding":r=tK.parse(r);break;case"colorArray":r=tQ.parse(r);break;case"numberArray":r=tJ.parse(r);break;default:iT(r)===t.type||"enum"===t.type&&t.values[r]||(r=void 0)}return iA(r,e.default,t.default)}ic.register(il,{error:[{kind:"error"},[ta],(e,[t])=>{throw new t0(t.evaluate(e))}],typeof:[ta,[tu],(e,[t])=>tx(t8(t.evaluate(e)))],"to-rgba":[tv(tn,4),[ts],(e,[t])=>{let[r,i,n,a]=t.evaluate(e).rgb;return[255*r,255*i,255*n,a]}],rgb:[ts,[tn,tn,tn],iu],rgba:[ts,[tn,tn,tn,tn],iu],has:{type:to,overloads:[[[ta],(e,[t])=>t.evaluate(e)in e.properties()],[[ta,tc],(e,[t,r])=>t.evaluate(e)in r.evaluate(e)]]},get:{type:tu,overloads:[[[ta],(e,[t])=>ih(t.evaluate(e),e.properties())],[[ta,tc],(e,[t,r])=>ih(t.evaluate(e),r.evaluate(e))]]},"feature-state":[tu,[ta],(e,[t])=>ih(t.evaluate(e),e.featureState||{})],properties:[tc,[],e=>e.properties()],"geometry-type":[ta,[],e=>e.geometryType()],id:[tu,[],e=>e.id()],zoom:[tn,[],e=>e.globals.zoom],"heatmap-density":[tn,[],e=>e.globals.heatmapDensity||0],elevation:[tn,[],e=>e.globals.elevation||0],"line-progress":[tn,[],e=>e.globals.lineProgress||0],accumulated:[tu,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[tn,id(tn),(e,t)=>{let r=0;for(let i of t)r+=i.evaluate(e);return r}],"*":[tn,id(tn),(e,t)=>{let r=1;for(let i of t)r*=i.evaluate(e);return r}],"-":{type:tn,overloads:[[[tn,tn],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[tn],(e,[t])=>-t.evaluate(e)]]},"/":[tn,[tn,tn],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[tn,[tn,tn],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[tn,[],()=>Math.LN2],pi:[tn,[],()=>Math.PI],e:[tn,[],()=>Math.E],"^":[tn,[tn,tn],(e,[t,r])=>Math.pow(t.evaluate(e),r.evaluate(e))],sqrt:[tn,[tn],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[tn,[tn],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[tn,[tn],(e,[t])=>Math.log(t.evaluate(e))],log2:[tn,[tn],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[tn,[tn],(e,[t])=>Math.sin(t.evaluate(e))],cos:[tn,[tn],(e,[t])=>Math.cos(t.evaluate(e))],tan:[tn,[tn],(e,[t])=>Math.tan(t.evaluate(e))],asin:[tn,[tn],(e,[t])=>Math.asin(t.evaluate(e))],acos:[tn,[tn],(e,[t])=>Math.acos(t.evaluate(e))],atan:[tn,[tn],(e,[t])=>Math.atan(t.evaluate(e))],min:[tn,id(tn),(e,t)=>Math.min(...t.map(t=>t.evaluate(e)))],max:[tn,id(tn),(e,t)=>Math.max(...t.map(t=>t.evaluate(e)))],abs:[tn,[tn],(e,[t])=>Math.abs(t.evaluate(e))],round:[tn,[tn],(e,[t])=>{let r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[tn,[tn],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[tn,[tn],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[to,[ta,tu],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[to,[tu],(e,[t])=>e.id()===t.value],"filter-type-==":[to,[ta],(e,[t])=>e.geometryType()===t.value],"filter-<":[to,[ta,tu],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i{let r=e.id(),i=t.value;return typeof r==typeof i&&r":[to,[ta,tu],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i>n}],"filter-id->":[to,[tu],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r>i}],"filter-<=":[to,[ta,tu],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i<=n}],"filter-id-<=":[to,[tu],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r<=i}],"filter->=":[to,[ta,tu],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i>=n}],"filter-id->=":[to,[tu],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r>=i}],"filter-has":[to,[tu],(e,[t])=>t.value in e.properties()],"filter-has-id":[to,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[to,[tv(ta)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[to,[tv(tu)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[to,[ta,tv(tu)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[to,[ta,tv(tu)],(e,[t,r])=>(function(e,t,r,i){for(;r<=i;){let n=r+i>>1;if(t[n]===e)return!0;t[n]>e?i=n-1:r=n+1}return!1})(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:to,overloads:[[[to,to],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[id(to),(e,t)=>{for(let r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:to,overloads:[[[to,to],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[id(to),(e,t)=>{for(let r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[to,[to],(e,[t])=>!t.evaluate(e)],"is-supported-script":[to,[ta],(e,[t])=>{let r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[ta,[ta],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[ta,[ta],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[ta,id(tu),(e,t)=>t.map(t=>t9(t.evaluate(e))).join("")],split:[tv(ta),[ta,ta],(e,[t,r])=>t.evaluate(e).split(r.evaluate(e))],join:[ta,[tv(ta),ta],(e,[t,r])=>t.evaluate(e).join(r.evaluate(e))],"resolved-locale":[ta,[th],(e,[t])=>t.evaluate(e).resolvedLocale()]});class iP{constructor(e,t,r){this.expression=e,this._warningHistory={},this._evaluator=new ra,this._defaultValue=t?function(e){if("color"===e.type&&iM(e.default))return new tW(0,0,0,0);switch(e.type){case"color":return tW.parse(e.default)||null;case"padding":return tK.parse(e.default)||null;case"numberArray":return tJ.parse(e.default)||null;case"colorArray":return tQ.parse(e.default)||null;case"variableAnchorOffsetCollection":return t2.parse(e.default)||null;case"projectionDefinition":return t5.parse(e.default)||null;default:return void 0===e.default?null:e.default}}(t):null,this._enumValues=t&&"enum"===t.type?t.values:null,this._globalState=r}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=iB(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,i,n,a){this._globalState&&(e=iB(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a||null;try{let e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new t0(`Expected value to be one of ${Object.keys(this._enumValues).map(e=>JSON.stringify(e)).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"u">typeof console&&console.warn(e.message)),this._defaultValue}}}function iI(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in il}function iz(e,t,r){let i,n=new ro(il,ip,[],t?(i={color:ts,string:ta,number:tn,enum:ta,boolean:to,formatted:td,padding:tf,numberArray:tm,colorArray:tp,projectionDefinition:tl,resolvedImage:tg,variableAnchorOffsetCollection:ty},"array"===t.type?tv(i[t.value]||tu,t.length):i[t.type]):void 0),a=n.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return a?iv(new iP(a,t,r)):ix(n.errors)}class iD{constructor(e,t,r){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!ig(t.expression),this.globalStateRefs=ij(t.expression),this._globalState=r}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=iB(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,n,a)}evaluate(e,t,r,i,n,a){return this._globalState&&(e=iB(e,this._globalState)),this._styleExpression.evaluate(e,t,r,i,n,a)}}class iO{constructor(e,t,r,i,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!ig(t.expression),this.globalStateRefs=ij(t.expression),this.interpolationType=i,this._globalState=n}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=iB(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,n,a)}evaluate(e,t,r,i,n,a){return this._globalState&&(e=iB(e,this._globalState)),this._styleExpression.evaluate(e,t,r,i,n,a)}interpolationFactor(e,t,r){return this.interpolationType?rv.interpolationFactor(this.interpolationType,e,t,r):0}}function iR(e,t,r){let i=iz(e,t,r);if("error"===i.result)return i;let n=i.value.expression,a=im(n);if(!a&&!ib(t))return ix([new tt("","data expressions not supported")]);let o=iy(n,["zoom"]);if(!o&&!i_(t))return ix([new tt("","zoom expressions not supported")]);let s=function e(t){let r=null;if(t instanceof rs)r=e(t.result);else if(t instanceof r_){for(let i of t.args)if(r=e(i))break}else(t instanceof ru||t instanceof rv)&&t.input instanceof ic&&"zoom"===t.input.name&&(r=t);return r instanceof tt||t.eachChild(t=>{let i=e(t);i instanceof tt?r=i:!r&&i?r=new tt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&i&&r!==i&&(r=new tt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),r}(n);return s||o?s instanceof tt?ix([s]):s instanceof rv&&!iw(t)?ix([new tt("",'"interpolate" expressions cannot be used with this property')]):iv(s?new iO(a?"camera":"composite",i.value,s.labels,s instanceof rv?s.interpolation:void 0,r):new iD(a?"constant":"source",i.value,r)):ix([new tt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class iF{constructor(e,t){this._parameters=e,this._specification=t,te(this,function e(t,r){var i;let n=t.stops&&"object"==typeof t.stops[0][0],a=n||!(n||void 0!==t.property),o=t.type||(iw(r)?"exponential":"interval"),s=function(e){switch(e.type){case"color":return tW.parse;case"padding":return tK.parse;case"numberArray":return tJ.parse;case"colorArray":return tQ.parse;default:return null}}(r);if(s&&((t=te({},t)).stops&&(t.stops=t.stops.map(e=>[e[0],s(e[1])])),t.default=s(t.default?t.default:r.default)),t.colorSpace&&"rgb"!==(i=t.colorSpace)&&"hcl"!==i&&"lab"!==i)throw Error(`Unknown color space: "${t.colorSpace}"`);let l=function(e){switch(e){case"exponential":return iC;case"interval":return iE;case"categorical":return iS;case"identity":return iL;default:throw Error(`Unknown function type "${e}"`)}}(o),c,u;if("categorical"===o){for(let e of(c=Object.create(null),t.stops))c[e[0]]=e[1];u=typeof t.stops[0][0]}if(n){let i={},n=[];for(let e=0;ee[0]),evaluate:({zoom:e},i)=>iC({stops:a,base:t.base},r,e).evaluate(e,i)}}if(a){let e="exponential"===o?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:e,interpolationFactor:rv.interpolationFactor.bind(void 0,e),zoomStops:t.stops.map(e=>e[0]),evaluate:({zoom:e})=>l(t,r,e,c,u)}}return{kind:"source",evaluate(e,i){let n=i&&i.properties?i.properties[t.property]:void 0;return void 0===n?iA(t.default,r.default):l(t,r,n,c,u)}}}(this._parameters,this._specification))}static deserialize(e){return new iF(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function ij(e,t=new Set){return e instanceof is&&t.add(e.key),e.eachChild(e=>{ij(e,t)}),t}function iB(e,t){let{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:o,accumulated:s}=e??{};return{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:o,accumulated:s,globalState:t}}function iN(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(let t of e.slice(1))if(!iN(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}let iU={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function iV(e,t){if(null==e)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};iN(e)||(e=function e(t){if(!t)return!0;let r=t[0];return t.length<=1?"any"!==r:"=="===r?iH(t[1],t[2],"=="):"!="===r?iY(iH(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?iH(t[1],t[2],r):"any"===r?["any"].concat(t.slice(1).map(e)):"all"===r?["all"].concat(t.slice(1).map(e)):"none"===r?["all"].concat(t.slice(1).map(e).map(iY)):"in"===r?iG(t[1],t.slice(2)):"!in"===r?iY(iG(t[1],t.slice(2))):"has"===r?iW(t[1]):"!has"!==r||iY(iW(t[1]))}(e));let r=iz(e,iU,t);if("error"===r.result)throw Error(r.value.map(e=>`${e.key}: ${e.message}`).join(", "));return{filter:(e,t,i)=>r.value.evaluate(e,t,{},i),needGeometry:function e(t){if(!Array.isArray(t))return!1;if("within"===t[0]||"distance"===t[0])return!0;for(let r=1;rij(r.value.expression)}}function iq(e,t){return et)}function iH(e,t,r){switch(e){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,e,t]}}function iG(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(e=>typeof e!=typeof t[0])?["filter-in-large",e,["literal",t.sort(iq)]]:["filter-in-small",e,["literal",t]]}}function iW(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function iY(e){return["!",e]}function iZ(e){let t=e.value;return t?[new e7(e.key,t,"constants have been deprecated as of v8")]:[]}function i$(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function iX(e){if(Array.isArray(e))return e.map(iX);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){let t={};for(let r in e)t[r]=iX(e[r]);return t}return i$(e)}function iK(e){let t=e.key,r=e.value,i=e.valueSpec||{},n=e.objectElementValidators||{},a=e.style,o=e.styleSpec,s=e.validateSpec,l=[],c=iT(r);if("object"!==c)return[new e7(t,r,`object expected, ${c} found`)];for(let e in r){let c=e.split(".")[0],u=tB(i,c)||i["*"],h;if(tB(n,c))h=n[c];else if(tB(i,c)){if(void 0===r[e])continue;h=s}else if(n["*"])h=n["*"];else{if(!i["*"]){l.push(new e7(t,r[e],`unknown property "${e}"`));continue}h=s}l=l.concat(h({key:(t&&`${t}.`)+e,value:r[e],valueSpec:u,style:a,styleSpec:o,object:r,objectKey:e,validateSpec:s},r))}for(let e in i)n[e]||i[e].required&&void 0===i[e].default&&void 0===r[e]&&l.push(new e7(t,r,`missing required property "${e}"`));return l}function iJ(e){let t=e.value,r=e.valueSpec,i=e.style,n=e.styleSpec,a=e.key,o=e.arrayElementValidator||e.validateSpec;if("array"!==iT(t))return[new e7(a,t,`array expected, ${iT(t)} found`)];if(r.length&&t.length!==r.length)return[new e7(a,t,`array length ${r.length} expected, length ${t.length} found`)];let s={type:r.value,values:r.values};n.$version<7&&(s.function=r.function),"object"===iT(r.value)&&(s=r.value);let l=[];for(let r=0;ri.maximum?[new e7(t,r,`${r} is greater than the maximum value ${i.maximum}`)]:[]}function i0(e){let t=e.valueSpec,r=i$(e.value.type),i,n,a,o={},s="categorical"!==r&&void 0===e.value.property,l="array"===iT(e.value.stops)&&"array"===iT(e.value.stops[0])&&"object"===iT(e.value.stops[0][0]),c=iK({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===r)return[new e7(e.key,e.value,'identity function may not have a "stops" property')];let t=[],i=e.value;return t=t.concat(iJ({key:e.key,value:i,valueSpec:e.valueSpec,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:u})),"array"===iT(i)&&0===i.length&&t.push(new e7(e.key,i,"array must have at least one stop")),t},default:function(e){return e.validateSpec({key:e.key,value:e.value,valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===r&&s&&c.push(new e7(e.key,e.value,'missing required property "property"')),"identity"===r||e.value.stops||c.push(new e7(e.key,e.value,'missing required property "stops"')),"exponential"===r&&e.valueSpec.expression&&!iw(e.valueSpec)&&c.push(new e7(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(s||ib(e.valueSpec)?s&&!i_(e.valueSpec)&&c.push(new e7(e.key,e.value,"zoom functions not supported")):c.push(new e7(e.key,e.value,"property functions not supported"))),("categorical"===r||l)&&void 0===e.value.property&&c.push(new e7(e.key,e.value,'"property" property is required')),c;function u(e){let r=[],i=e.value,s=e.key;if("array"!==iT(i))return[new e7(s,i,`array expected, ${iT(i)} found`)];if(2!==i.length)return[new e7(s,i,`array length 2 expected, length ${i.length} found`)];if(l){if("object"!==iT(i[0]))return[new e7(s,i,`object expected, ${iT(i[0])} found`)];if(void 0===i[0].zoom)return[new e7(s,i,"object stop key must have zoom")];if(void 0===i[0].value)return[new e7(s,i,"object stop key must have value")];if(a&&a>i$(i[0].zoom))return[new e7(s,i[0].zoom,"stop zoom values must appear in ascending order")];i$(i[0].zoom)!==a&&(a=i$(i[0].zoom),n=void 0,o={}),r=r.concat(iK({key:`${s}[0]`,value:i[0],valueSpec:{zoom:{}},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:iQ,value:h}}))}else r=r.concat(h({key:`${s}[0]`,value:i[0],validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec},i));return iI(iX(i[1]))?r.concat([new e7(`${s}[1]`,i[1],"expressions are not allowed in function stops.")]):r.concat(e.validateSpec({key:`${s}[1]`,value:i[1],valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec}))}function h(e,a){let s=iT(e.value),l=i$(e.value),c=null!==e.value?e.value:a;if(i){if(s!==i)return[new e7(e.key,c,`${s} stop domain type must match previous stop domain type ${i}`)]}else i=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new e7(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==r){let i=`number expected, ${s} found`;return ib(t)&&void 0===r&&(i+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new e7(e.key,c,i)]}return"categorical"!==r||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==r&&"number"===s&&void 0!==n&&lnew e7(`${e.key}${t.key}`,e.value,t.message));let r=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!r.outputDefined())return[new e7(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!ig(r))return[new e7(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!ig(r))return[new e7(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!iy(r,["zoom","feature-state"]))return[new e7(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!im(r))return[new e7(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function i2(e){let t=e.key,r=e.value,i=iT(r);return"string"!==i?[new e7(t,r,`color expected, ${i} found`)]:tW.parse(String(r))?[]:[new e7(t,r,`color expected, "${r}" found`)]}function i3(e){let t=e.key,r=e.value,i=e.valueSpec,n=[];return Array.isArray(i.values)?-1===i.values.indexOf(i$(r))&&n.push(new e7(t,r,`expected one of [${i.values.join(", ")}], ${JSON.stringify(r)} found`)):-1===Object.keys(i.values).indexOf(i$(r))&&n.push(new e7(t,r,`expected one of [${Object.keys(i.values).join(", ")}], ${JSON.stringify(r)} found`)),n}function i5(e){return iN(iX(e.value))?i1(te({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function e(t){let r=t.value,i=t.key;if("array"!==iT(r))return[new e7(i,r,`array expected, ${iT(r)} found`)];let n=t.styleSpec,a,o=[];if(r.length<1)return[new e7(i,r,"filter array must have at least 1 element")];switch(o=o.concat(i3({key:`${i}[0]`,value:r[0],valueSpec:n.filter_operator,style:t.style,styleSpec:t.styleSpec})),i$(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===i$(r[1])&&o.push(new e7(i,r,`"$type" cannot be use with operator "${r[0]}"`));case"==":case"!=":3!==r.length&&o.push(new e7(i,r,`filter array for operator "${r[0]}" must have 3 elements`));case"in":case"!in":r.length>=2&&"string"!==(a=iT(r[1]))&&o.push(new e7(`${i}[1]`,r[1],`string expected, ${a} found`));for(let e=2;e{e in n&&i.push(new e7(a,n[e],`"${e}" is prohibited for ref layers`))}),o.layers.forEach(t=>{i$(t.id)===c&&(e=t)}),e?e.ref?i.push(new e7(a,n.ref,"ref cannot reference another ref layer")):l=i$(e.type):i.push(new e7(a,n.ref,`ref layer "${c}" not found`))}else if("background"!==l)if(n.source){let e=o.sources&&o.sources[n.source],t=e&&i$(e.type);e?"vector"===t&&"raster"===l?i.push(new e7(a,n.source,`layer "${n.id}" requires a raster source`)):"raster-dem"!==t&&"hillshade"===l||"raster-dem"!==t&&"color-relief"===l?i.push(new e7(a,n.source,`layer "${n.id}" requires a raster-dem source`)):"raster"===t&&"raster"!==l?i.push(new e7(a,n.source,`layer "${n.id}" requires a vector source`)):"vector"!==t||n["source-layer"]?"raster-dem"===t&&"hillshade"!==l&&"color-relief"!==l?i.push(new e7(a,n.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):"line"===l&&n.paint&&n.paint["line-gradient"]&&("geojson"!==t||!e.lineMetrics)&&i.push(new e7(a,n,`layer "${n.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):i.push(new e7(a,n,`layer "${n.id}" must specify a "source-layer"`)):i.push(new e7(a,n.source,`source "${n.source}" not found`))}else i.push(new e7(a,n,'missing required property "source"'));return"raster"===l&&null!=(t=n.paint)&&t.resampling&&null!=(r=n.paint)&&r["raster-resampling"]&&i.push(new e7(a,n.paint,`layer "${n.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),i=i.concat(iK({key:a,value:n,valueSpec:s.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":()=>[],type:()=>e.validateSpec({key:`${a}.type`,value:n.type,valueSpec:s.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:n,objectKey:"type"}),filter:i5,layout:e=>iK({layer:n,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>i8(te({layerType:l},e))}}),paint:e=>iK({layer:n,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>i6(te({layerType:l},e))}})}}))}function i7(e){let t=e.value,r=e.key,i=iT(t);return"string"!==i?[new e7(r,t,`string expected, ${i} found`)]:[]}let ne={promoteId:function({key:e,value:t}){if("string"===iT(t))return i7({key:e,value:t});{let r=[];for(let i in t)r.push(...i7({key:`${e}.${i}`,value:t[i]}));return r}}};function nt(e){let t=e.value,r=e.key,i=e.styleSpec,n=e.style,a=e.validateSpec;if(!t.type)return[new e7(r,t,'"type" is required')];let o=i$(t.type),s;switch(o){case"vector":case"raster":return iK({key:r,value:t,valueSpec:i[`source_${o.replace("-","_")}`],style:e.style,styleSpec:i,objectElementValidators:ne,validateSpec:a});case"raster-dem":return function(e){var t;let r=null!=(t=e.sourceName)?t:"",i=e.value,n=e.styleSpec,a=n.source_raster_dem,o=e.style,s=[],l=iT(i);if(void 0===i)return s;if("object"!==l)return s.push(new e7("source_raster_dem",i,`object expected, ${l} found`)),s;let c="custom"===i$(i.encoding),u=["redFactor","greenFactor","blueFactor","baseShift"],h=e.value.encoding?`"${e.value.encoding}"`:"Default";for(let t in i)!c&&u.includes(t)?s.push(new e7(t,i[t],`In "${r}": "${t}" is only valid when "encoding" is set to "custom". ${h} encoding found`)):a[t]?s=s.concat(e.validateSpec({key:t,value:i[t],valueSpec:a[t],validateSpec:e.validateSpec,style:o,styleSpec:n})):s.push(new e7(t,i[t],`unknown property "${t}"`));return s}({sourceName:r,value:t,style:e.style,styleSpec:i,validateSpec:a});case"geojson":if(s=iK({key:r,value:t,valueSpec:i.source_geojson,style:n,styleSpec:i,validateSpec:a,objectElementValidators:ne}),t.cluster)for(let e in t.clusterProperties){let[i,n]=t.clusterProperties[e],a="string"==typeof i?[i,["accumulated"],["get",e]]:i;s.push(...i1({key:`${r}.${e}.map`,value:n,expressionContext:"cluster-map"})),s.push(...i1({key:`${r}.${e}.reduce`,value:a,expressionContext:"cluster-reduce"}))}return s;case"video":return iK({key:r,value:t,valueSpec:i.source_video,style:n,validateSpec:a,styleSpec:i});case"image":return iK({key:r,value:t,valueSpec:i.source_image,style:n,validateSpec:a,styleSpec:i});case"canvas":return[new e7(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return i3({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function nr(e){let t=e.value,r=e.styleSpec,i=r.light,n=e.style,a=[],o=iT(t);if(void 0===t)return a;if("object"!==o)return a.concat([new e7("light",t,`object expected, ${o} found`)]);for(let o in t){let s=o.match(/^(.*)-transition$/);a=a.concat(s&&i[s[1]]&&i[s[1]].transition?e.validateSpec({key:o,value:t[o],valueSpec:r.transition,validateSpec:e.validateSpec,style:n,styleSpec:r}):i[o]?e.validateSpec({key:o,value:t[o],valueSpec:i[o],validateSpec:e.validateSpec,style:n,styleSpec:r}):[new e7(o,t[o],`unknown property "${o}"`)])}return a}function ni(e){let t=e.value,r=e.styleSpec,i=r.sky,n=e.style,a=iT(t);if(void 0===t)return[];if("object"!==a)return[new e7("sky",t,`object expected, ${a} found`)];let o=[];for(let a in t)o=o.concat(i[a]?e.validateSpec({key:a,value:t[a],valueSpec:i[a],style:n,styleSpec:r}):[new e7(a,t[a],`unknown property "${a}"`)]);return o}function nn(e){let t=e.value,r=e.styleSpec,i=r.terrain,n=e.style,a=[],o=iT(t);if(void 0===t)return a;if("object"!==o)return a.concat([new e7("terrain",t,`object expected, ${o} found`)]);for(let o in t)a=a.concat(i[o]?e.validateSpec({key:o,value:t[o],valueSpec:i[o],validateSpec:e.validateSpec,style:n,styleSpec:r}):[new e7(o,t[o],`unknown property "${o}"`)]);return a}function na(e){let t=[],r=e.value,i=e.key;if(Array.isArray(r)){let n=[],a=[];for(let o in r)r[o].id&&n.includes(r[o].id)&&t.push(new e7(i,r,`all the sprites' ids must be unique, but ${r[o].id} is duplicated`)),n.push(r[o].id),r[o].url&&a.includes(r[o].url)&&t.push(new e7(i,r,`all the sprites' URLs must be unique, but ${r[o].url} is duplicated`)),a.push(r[o].url),t=t.concat(iK({key:`${i}[${o}]`,value:r[o],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:e.validateSpec}));return t}return i7({key:i,value:r})}function no(e){return!!e&&e.constructor===Object}function ns(e){return no(e.value)?[]:[new e7(e.key,e.value,`object expected, ${iT(e.value)} found`)]}let nl={"*":()=>[],array:iJ,boolean:function(e){let t=e.value,r=e.key,i=iT(t);return"boolean"!==i?[new e7(r,t,`boolean expected, ${i} found`)]:[]},number:iQ,color:i2,constants:iZ,enum:i3,filter:i5,function:i0,layer:i9,object:iK,source:nt,light:nr,sky:ni,terrain:nn,projection:function(e){let t=e.value,r=e.styleSpec,i=r.projection,n=e.style,a=iT(t);if(void 0===t)return[];if("object"!==a)return[new e7("projection",t,`object expected, ${a} found`)];let o=[];for(let a in t)o=o.concat(i[a]?e.validateSpec({key:a,value:t[a],valueSpec:i[a],style:n,styleSpec:r}):[new e7(a,t[a],`unknown property "${a}"`)]);return o},projectionDefinition:function(e){var t;let r=e.key,i=e.value,n=iT(i=i instanceof String?i.valueOf():i);return"array"!==n||Array.isArray(t=i)&&3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]&&"number"==typeof t[2]||["interpolate","step","literal"].includes(i[0])?["array","string"].includes(n)?[]:[new e7(r,i,`projection expected, invalid type "${n}" found`)]:[new e7(r,i,`projection expected, invalid array ${JSON.stringify(i)} found`)]},string:i7,formatted:function(e){return 0===i7(e).length?[]:i1(e)},resolvedImage:function(e){return 0===i7(e).length?[]:i1(e)},padding:function(e){let t=e.key,r=e.value;if("array"===iT(r)){if(r.length<1||r.length>4)return[new e7(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];let i={type:"number"},n=[];for(let a=0;a[]}})),e.constants&&(r=r.concat(iZ({key:"constants",value:e.constants}))),nf(r)}function nd(e){return function(t){return e(Object.assign({},t,{validateSpec:nc}))}}function nf(e){return[].concat(e).sort((e,t)=>e.line-t.line)}function np(e){return function(...t){return nf(e.apply(this,t))}}nh.source=np(nd(nt)),nh.sprite=np(nd(na)),nh.glyphs=np(nd(nu)),nh.light=np(nd(nr)),nh.sky=np(nd(ni)),nh.terrain=np(nd(nn)),nh.state=np(nd(ns)),nh.layer=np(nd(i9)),nh.filter=np(nd(i5)),nh.paintProperty=np(nd(i6)),nh.layoutProperty=np(nd(i8));let nm={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class ng{constructor(e,t){this._globalState=t,this.setValue(e)}evaluate(){var e;return null!=(e=this._literalValue)?e:this._compiledValue.evaluate({})}setValue(e){if(null==e||"visible"===e||"none"===e)return this._literalValue="none"===e?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let t=iz(e,nm,this._globalState);if("error"===t.result)throw this._literalValue="visible",this._compiledValue=void 0,Error(t.value.map(e=>`${e.key}: ${e.message}`).join(", "));this._literalValue=void 0,this._compiledValue=t.value,this._globalStateRefs=ij(t.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let ny=nh.light,nv=nh.sky,nx=nh.paintProperty,nb=nh.layoutProperty;function n_(e,t){let r=!1;if(t?.length)for(let i of t)e.fire(new eJ(Error(i.message))),r=!0;return r}class nw{constructor(e,t,r){let i=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;let n=new Int32Array(this.arrayBuffer);e=n[0],this.d=(t=n[1])+2*(r=n[2]);for(let e=0;e=c[l+0]&&i>=c[l+1])?(o[u]=!0,a.push(n[u])):o[u]=!1}}}_forEachCell(e,t,r,i,n,a,o,s){let l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(r),h=this._convertToCellCoord(i);for(let d=l;d<=u;d++)for(let l=c;l<=h;l++){let c=this.d*l+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(l),this._convertFromCellCoord(d+1),this._convertFromCellCoord(l+1)))&&n.call(this,e,t,r,i,c,a,o,s))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,t=3+this.cells.length+1+1,r=0;for(let e of this.cells)r+=e.length;let i=new Int32Array(t+r+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;let n=t;for(let t=0;ttypeof ArrayBuffer&&(e instanceof ArrayBuffer||(null==(t=e.constructor)?void 0:t.name)==="ArrayBuffer")}function nA(e){return e.$name||e.constructor._classRegistryKey}function nS(e){return!function(e){if(null===e||"object"!=typeof e)return!1;let t=nA(e);return t&&"Object"!==t}(e)&&(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof Blob||e instanceof Error||nk(e)||eL(e)||ArrayBuffer.isView(e)||e instanceof ImageData)}function nE(e,t){if(nS(e))return(nk(e)||eL(e))&&t&&t.push(e),ArrayBuffer.isView(e)&&t&&t.push(e.buffer),e instanceof ImageData&&t&&t.push(e.data.buffer),e;if(Array.isArray(e)){let r=[];for(let i of e)r.push(nE(i,t));return r}if("object"!=typeof e)throw Error("can't serialize object of type "+typeof e);let r=nA(e);if(!r)throw Error(`can't serialize object of unregistered class ${e.constructor.name}`);if(!nT[r])throw Error(`${r} is not registered.`);let{klass:i}=nT[r],n=i.serialize?i.serialize(e,t):{};if(i.serialize){if(n===t?.[t.length-1])throw Error("statically serialized object won't survive transfer of $name property")}else{for(let i in e){if(!e.hasOwnProperty(i)||nT[r].omit.includes(i))continue;let a=e[i];n[i]=nT[r].shallow.includes(i)?a:nE(a,t)}e instanceof Error&&(n.message=e.message)}if(n.$name)throw Error("$name property is reserved for worker serialization logic.");return"Object"!==r&&(n.$name=r),n}function nC(e){if(nS(e))return e;if(Array.isArray(e))return e.map(nC);if("object"!=typeof e)throw Error("can't deserialize object of type "+typeof e);let t=nA(e)||"Object";if(!nT[t])throw Error(`can't deserialize unregistered class ${t}`);let{klass:r}=nT[t];if(!r)throw Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(e);let i=Object.create(r.prototype);for(let r of Object.keys(e)){if("$name"===r)continue;let n=e[r];i[r]=nT[t].shallow.includes(r)?n:nC(n)}return i}class nL{constructor(){this.first=!0}update(e,t){let r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoom{try{return RegExp(`\\p{sc=${e}}`,"u").source}catch{return null}}).filter(e=>e).join("|"),"u")}let nO=nD(["Arab","Dupl","Mong","Ougr","Syrc"]);function nR(e){return!(nP(e)||/[\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)))}let nF=nD(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function nj(e){return nF.test(String.fromCodePoint(e))}let nB=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(nB.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=e.applyArabicShaping,this.processBidirectionalText=e.processBidirectionalText,this.processStyledBidirectionalText=e.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getRTLTextPluginStatus(){return this.pluginStatus}syncState(e,t){return _(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if("loading"!==e.pluginStatus)return this.setState(e),e;let r=e.pluginURL,i=new Promise(e=>{this.loadScriptResolve=e});t(r);let n=new Promise(e=>setTimeout(()=>e(),this.TIMEOUT));if(yield Promise.race([i,n]),this.isParsed()){let e={pluginStatus:"loaded",pluginURL:r};return this.setState(e),e}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${r}`)})}};class nN{constructor(e,t){this.isSupportedScript=nU,this.zoom=e,t?(this.now=t.now||0,this.fadeDuration=t.fadeDuration||0,this.zoomHistory=t.zoomHistory||new nL,this.transition=t.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new nL,this.transition={})}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let e=this.zoom,t=e-Math.floor(e),r=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}}}function nU(e){var t,r="loaded"===nB.getRTLTextPluginStatus();for(let i of e)if(t=i.codePointAt(0),!r&&nj(t)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(t)))return!1;return!0}let nV="-transition";class nq{constructor(e,t,r){this.property=e,this.value=t,this.expression=function(e,t,r){if(iM(e))return new iF(e,t);if(iI(e)){let i=iR(e,t,r);if("error"===i.result)throw Error(i.value.map(e=>`${e.key}: ${e.message}`).join(", "));return i.value}{let r=e;return"color"===t.type&&"string"==typeof e?r=tW.parse(e):"padding"===t.type&&("number"==typeof e||Array.isArray(e))?r=tK.parse(e):"numberArray"===t.type&&("number"==typeof e||Array.isArray(e))?r=tJ.parse(e):"colorArray"===t.type&&("string"==typeof e||Array.isArray(e))?r=tQ.parse(e):"variableAnchorOffsetCollection"===t.type&&Array.isArray(e)?r=t2.parse(e):"projectionDefinition"===t.type&&"string"==typeof e&&(r=t5.parse(e)),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>r}}}(void 0===t?e.specification.default:t,e.specification,r)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)}}class nH{constructor(e,t){this.property=e,this.value=new nq(e,void 0,t)}transitioned(e,t){return new nW(this.property,this.value,t,eb({},e.transition,this.transition),e.now)}untransitioned(){return new nW(this.property,this.value,null,{},0)}}class nG{constructor(e,t){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues),this._globalState=t}hasProperty(e){return e in this._properties.defaultTransitionablePropertyValues}getValue(e){return eM(this._values[e].value.value)}setValue(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new nH(this._values[e].property,this._globalState)),this._values[e].value=new nq(this._values[e].property,null===t?void 0:eM(t),this._globalState)}getTransition(e){return eM(this._values[e].transition)}setTransition(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new nH(this._values[e].property,this._globalState)),this._values[e].transition=eM(t)||void 0}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);void 0!==r&&(e[t]=r);let i=this.getTransition(t);void 0!==i&&(e[`${t}${nV}`]=i)}return e}transitioned(e,t){let r=new nY(this._properties);for(let i of Object.keys(this._values))r._values[i]=this._values[i].transitioned(e,t._values[i]);return r}untransitioned(){let e=new nY(this._properties);for(let t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}}class nW{constructor(e,t,r,i,n){this.property=e,this.value=t,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,e.specification.transition&&(i.delay||i.duration)&&(this.prior=r)}possiblyEvaluate(e,t,r){let i=e.now||0,n=this.value.possiblyEvaluate(e,t,r),a=this.prior;if(a){if(i>this.end||this.value.isDataDriven())return this.prior=null,n;if(ii.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}}class n0{constructor(e){this.specification=e}possiblyEvaluate(e,t,r,i){if(void 0!==e.value){if("constant"===e.expression.kind){let n=e.expression.evaluate(t,null,{},r,i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new nN(Math.floor(t.zoom-1),t)),e.expression.evaluate(new nN(Math.floor(t.zoom),t)),e.expression.evaluate(new nN(Math.floor(t.zoom+1),t)),t)}}_calculate(e,t,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}}class n1{constructor(e){this.specification=e}possiblyEvaluate(e,t,r,i){return!!e.expression.evaluate(t,null,{},r,i)}interpolate(){return!1}}class n2{constructor(e){for(let t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){let r=e[t];r.specification.overridable&&this.overridableProperties.push(t);let i=this.defaultPropertyValues[t]=new nq(r,void 0,void 0),n=this.defaultTransitionablePropertyValues[t]=new nH(r,void 0);this.defaultTransitioningPropertyValues[t]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=i.possiblyEvaluate({})}}}nM("DataDrivenProperty",nJ),nM("DataConstantProperty",nK),nM("CrossFadedDataDrivenProperty",nQ),nM("CrossFadedProperty",n0),nM("ColorRampProperty",n1);let n3=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",n5=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class n4 extends eQ{constructor(e,t,r){if(super(),this.id=e.id,this.type=e.type,this._globalState=r,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=function(e,t){return new ng(e,t)}(this.visibility,r),"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter,this._featureFilter=iV(e.filter,r)),t.layout&&(this._unevaluatedLayout=new nZ(t.layout,r)),t.paint)){for(let i in this._transitionablePaint=new nG(t.paint,r),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(let t in e.layout)this.setLayoutProperty(t,e.layout[t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new nX(t.paint)}}setFilter(e){this.filter=e,this._featureFilter=iV(e,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){var t;if("visibility"===e)return this.visibility;if(null!=(t=this._transitionablePaint)&&t.hasProperty(e))throw Error(e+n3);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 t of this._visibilityExpression.getGlobalStateRefs())e.add(t);if(this._unevaluatedLayout)for(let t in this._unevaluatedLayout._values)for(let r of this._unevaluatedLayout._values[t].getGlobalStateRefs())e.add(r);for(let t of this._featureFilter.getGlobalStateRefs())e.add(t);return e}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=null!=(e=t.get(n))?e:[];a.push({name:r,value:i.value}),t.set(n,a)}}return t}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(e,t,r={}){var i;"visibility"===e?(this.visibility=t,this._visibilityExpression.setValue(t),this.recalculateVisibility()):null!=(i=this._transitionablePaint)&&i.hasProperty(e)?this.fire(new eJ(Error(e+n3))):null!=t&&this._validate(nb,`layers.${this.id}.layout.${e}`,e,t,r)||this._unevaluatedLayout.setValue(e,t)}getPaintProperty(e){var t,r;if(e.endsWith(nV)){let r=e.slice(0,-11);if("visibility"===r||null!=(t=this._unevaluatedLayout)&&t.hasProperty(r))throw Error(e+n5);return this._transitionablePaint.getTransition(r)}if("visibility"===e||null!=(r=this._unevaluatedLayout)&&r.hasProperty(e))throw Error(e+n5);return this._transitionablePaint.getValue(e)}setPaintProperty(e,t,r={}){var i;if("visibility"===e||null!=(i=this._unevaluatedLayout)&&i.hasProperty(e))return this.fire(new eJ(Error(e+n5))),!1;if(null!=t&&this._validate(nx,`layers.${this.id}.paint.${e}`,e,t,r))return!1;if(e.endsWith(nV))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;{let r=this._transitionablePaint._values[e],i="cross-faded-data-driven"===r.property.specification["property-type"],n=r.value.isDataDriven(),a=r.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);let o=this._transitionablePaint._values[e].value;return o.isDataDriven()||n||i||this._handleOverridablePaintPropertyUpdate(e,a,o)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,t,r){return!1}isHidden(e=this.minzoom,t=!1){return!!(this.minzoom&&e<(t?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&e>=this.maxzoom)||"none"===this._evaluatedVisibility}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}serialize(){var e,t;let r={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:null==(e=this._unevaluatedLayout)?void 0:e.serialize(),paint:null==(t=this._transitionablePaint)?void 0:t.serialize()};return this.visibility&&(r.layout||(r.layout={}),r.layout.visibility=this.visibility),eT(r,(e,t)=>!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length))}_validate(e,t,r,i,n={}){return n?.validate!==!1&&n_(this,e.call(nh,{key:t,layerType:this.type,objectKey:r,value:i,styleSpec:e0,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let e in this.paint._values){let t=this.paint.get(e);if(t instanceof n$&&ib(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1}}var n6={get paint(){return a=a||new n2({"raster-opacity":new nK(e0.paint_raster["raster-opacity"]),"raster-hue-rotate":new nK(e0.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new nK(e0.paint_raster["raster-brightness-min"]),"raster-brightness-max":new nK(e0.paint_raster["raster-brightness-max"]),"raster-saturation":new nK(e0.paint_raster["raster-saturation"]),"raster-contrast":new nK(e0.paint_raster["raster-contrast"]),resampling:new nK(e0.paint_raster.resampling),"raster-resampling":new nK(e0.paint_raster["raster-resampling"]),"raster-fade-duration":new nK(e0.paint_raster["raster-fade-duration"])})}};class n8 extends n4{constructor(e,t){super(e,n6,t)}}let n9={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class n7{constructor(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class ae{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){let t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t}_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(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function at(e,t=1){let r=0,i=0;return{members:e.map(e=>{let n=n9[e.type].BYTES_PER_ELEMENT,a=r=ar(r,Math.max(t,n)),o=e.components||1;return i=Math.max(i,n),r+=n*o,{name:e.name,type:e.type,components:o,offset:a}}),size:ar(r,Math.max(i,t)),alignment:t}}function ar(e,t){return Math.ceil(e/t)*t}class ai extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=2*e;return this.int16[i+0]=t,this.int16[i+1]=r,e}}ai.prototype.bytesPerElement=4,nM("StructArrayLayout2i4",ai);class an extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=3*e;return this.int16[n+0]=t,this.int16[n+1]=r,this.int16[n+2]=i,e}}an.prototype.bytesPerElement=6,nM("StructArrayLayout3i6",an);class aa extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r,i)}emplace(e,t,r,i,n){let a=4*e;return this.int16[a+0]=t,this.int16[a+1]=r,this.int16[a+2]=i,this.int16[a+3]=n,e}}aa.prototype.bytesPerElement=8,nM("StructArrayLayout4i8",aa);class ao extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=a,this.int16[s+5]=o,e}}ao.prototype.bytesPerElement=12,nM("StructArrayLayout2i4i12",ao);class as extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.uint8[l+4]=i,this.uint8[l+5]=n,this.uint8[l+6]=a,this.uint8[l+7]=o,e}}as.prototype.bytesPerElement=8,nM("StructArrayLayout2i4ub8",as);class al extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=2*e;return this.float32[i+0]=t,this.float32[i+1]=r,e}}al.prototype.bytesPerElement=8,nM("StructArrayLayout2f8",al);class ac extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s,l,c){let u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,i,n,a,o,s,l,c)}emplace(e,t,r,i,n,a,o,s,l,c,u){let h=10*e;return this.uint16[h+0]=t,this.uint16[h+1]=r,this.uint16[h+2]=i,this.uint16[h+3]=n,this.uint16[h+4]=a,this.uint16[h+5]=o,this.uint16[h+6]=s,this.uint16[h+7]=l,this.uint16[h+8]=c,this.uint16[h+9]=u,e}}ac.prototype.bytesPerElement=20,nM("StructArrayLayout10ui20",ac);class au extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s){let l=this.length;return this.resize(l+1),this.emplace(l,e,t,r,i,n,a,o,s)}emplace(e,t,r,i,n,a,o,s,l){let c=8*e;return this.uint16[c+0]=t,this.uint16[c+1]=r,this.uint16[c+2]=i,this.uint16[c+3]=n,this.uint16[c+4]=a,this.uint16[c+5]=o,this.uint16[c+6]=s,this.uint16[c+7]=l,e}}au.prototype.bytesPerElement=16,nM("StructArrayLayout8ui16",au);class ah extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s,l,c,u,h){let d=this.length;return this.resize(d+1),this.emplace(d,e,t,r,i,n,a,o,s,l,c,u,h)}emplace(e,t,r,i,n,a,o,s,l,c,u,h,d){let f=12*e;return this.int16[f+0]=t,this.int16[f+1]=r,this.int16[f+2]=i,this.int16[f+3]=n,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=c,this.int16[f+9]=u,this.int16[f+10]=h,this.int16[f+11]=d,e}}ah.prototype.bytesPerElement=24,nM("StructArrayLayout4i4ui4i24",ah);class ad extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=3*e;return this.float32[n+0]=t,this.float32[n+1]=r,this.float32[n+2]=i,e}}ad.prototype.bytesPerElement=12,nM("StructArrayLayout3f12",ad);class af extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint32[+e+0]=t,e}}af.prototype.bytesPerElement=4,nM("StructArrayLayout1ul4",af);class ap extends ae{_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,t,r,i,n,a,o,s,l){let c=this.length;return this.resize(c+1),this.emplace(c,e,t,r,i,n,a,o,s,l)}emplace(e,t,r,i,n,a,o,s,l,c){let u=10*e;return this.int16[u+0]=t,this.int16[u+1]=r,this.int16[u+2]=i,this.int16[u+3]=n,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[5*e+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,e}}ap.prototype.bytesPerElement=20,nM("StructArrayLayout6i1ul2ui20",ap);class am extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=a,this.int16[s+5]=o,e}}am.prototype.bytesPerElement=12,nM("StructArrayLayout2i2i2i12",am);class ag extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n){let a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,i,n)}emplace(e,t,r,i,n,a){let o=4*e,s=8*e;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=i,this.int16[s+6]=n,this.int16[s+7]=a,e}}ag.prototype.bytesPerElement=16,nM("StructArrayLayout2f1f2i16",ag);class ay extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=16*e,l=4*e,c=8*e;return this.uint8[s+0]=t,this.uint8[s+1]=r,this.float32[l+1]=i,this.float32[l+2]=n,this.int16[c+6]=a,this.int16[c+7]=o,e}}ay.prototype.bytesPerElement=16,nM("StructArrayLayout2ub2f2i16",ay);class av extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=3*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,this.uint16[n+2]=i,e}}av.prototype.bytesPerElement=6,nM("StructArrayLayout3ui6",av);class ax extends ae{_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,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g){let y=this.length;return this.resize(y+1),this.emplace(y,e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g)}emplace(e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y){let v=24*e,x=12*e,b=48*e;return this.int16[v+0]=t,this.int16[v+1]=r,this.uint16[v+2]=i,this.uint16[v+3]=n,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[v+10]=l,this.uint16[v+11]=c,this.uint16[v+12]=u,this.float32[x+7]=h,this.float32[x+8]=d,this.uint8[b+36]=f,this.uint8[b+37]=p,this.uint8[b+38]=m,this.uint32[x+10]=g,this.int16[v+22]=y,e}}ax.prototype.bytesPerElement=48,nM("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ax);class ab extends ae{_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,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w,T,M,k,A,S){let E=this.length;return this.resize(E+1),this.emplace(E,e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w,T,M,k,A,S)}emplace(e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w,T,M,k,A,S,E){let C=32*e,L=16*e;return this.int16[C+0]=t,this.int16[C+1]=r,this.int16[C+2]=i,this.int16[C+3]=n,this.int16[C+4]=a,this.int16[C+5]=o,this.int16[C+6]=s,this.int16[C+7]=l,this.uint16[C+8]=c,this.uint16[C+9]=u,this.uint16[C+10]=h,this.uint16[C+11]=d,this.uint16[C+12]=f,this.uint16[C+13]=p,this.uint16[C+14]=m,this.uint16[C+15]=g,this.uint16[C+16]=y,this.uint16[C+17]=v,this.uint16[C+18]=x,this.uint16[C+19]=b,this.uint16[C+20]=_,this.uint16[C+21]=w,this.uint16[C+22]=T,this.uint32[L+12]=M,this.float32[L+13]=k,this.float32[L+14]=A,this.uint16[C+30]=S,this.uint16[C+31]=E,e}}ab.prototype.bytesPerElement=64,nM("StructArrayLayout8i15ui1ul2f2ui64",ab);class a_ extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.float32[+e+0]=t,e}}a_.prototype.bytesPerElement=4,nM("StructArrayLayout1f4",a_);class aw extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=3*e;return this.uint16[6*e+0]=t,this.float32[n+1]=r,this.float32[n+2]=i,e}}aw.prototype.bytesPerElement=12,nM("StructArrayLayout1ui2f12",aw);class aT extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=4*e;return this.uint32[2*e+0]=t,this.uint16[n+2]=r,this.uint16[n+3]=i,e}}aT.prototype.bytesPerElement=8,nM("StructArrayLayout1ul2ui8",aT);class aM extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=2*e;return this.uint16[i+0]=t,this.uint16[i+1]=r,e}}aM.prototype.bytesPerElement=4,nM("StructArrayLayout2ui4",aM);class ak extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint16[+e+0]=t,e}}ak.prototype.bytesPerElement=2,nM("StructArrayLayout1ui2",ak);class aA extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r,i)}emplace(e,t,r,i,n){let a=4*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=i,this.float32[a+3]=n,e}}aA.prototype.bytesPerElement=16,nM("StructArrayLayout4f16",aA);class aS extends n7{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 w(this.anchorPointX,this.anchorPointY)}}aS.prototype.size=20;class aE extends ap{get(e){return new aS(this,e)}}nM("CollisionBoxArray",aE);class aC extends n7{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]}}aC.prototype.size=48;class aL extends ax{get(e){return new aC(this,e)}}nM("PlacedSymbolArray",aL);class aP extends n7{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]}}aP.prototype.size=64;class aI extends ab{get(e){return new aP(this,e)}}nM("SymbolInstanceArray",aI);class az extends a_{getoffsetX(e){return this.float32[+e+0]}}nM("GlyphOffsetArray",az);class aD extends an{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}}nM("SymbolLineVertexArray",aD);class aO extends n7{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]}}aO.prototype.size=12;class aR extends aw{get(e){return new aO(this,e)}}nM("TextAnchorOffsetArray",aR);class aF extends n7{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]}}aF.prototype.size=8;class aj extends aT{get(e){return new aF(this,e)}}nM("FeatureIndexArray",aj);class aB extends ai{}class aN extends ai{}class aU extends ai{}class aV extends ao{}class aq extends as{}class aH extends al{}class aG extends ac{}class aW extends au{}class aY extends ah{}class aZ extends ad{}class a$ extends af{}class aX extends am{}class aK extends ay{}class aJ extends av{}class aQ extends aM{}let{members:a0}=at([{name:"a_pos",components:2,type:"Int16"}],4);class a1{constructor(e=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=e}prepareSegment(e,t,r,i){let n=this.segments[this.segments.length-1];return e>a1.MAX_VERTEX_ARRAY_LENGTH&&eA(`Max vertices per segment is ${a1.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${a1.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!n||n.vertexLength+e>a1.MAX_VERTEX_ARRAY_LENGTH||n.sortKey!==i?this.createNewSegment(t,r,i):n}createNewSegment(e,t,r){let i={vertexOffset:e.length,primitiveOffset:t.length,vertexLength:0,primitiveLength:0,vaos:{}};return void 0!==r&&(i.sortKey=r),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(i),i}getOrCreateLatestSegment(e,t,r){return this.prepareSegment(0,e,t,r)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let e of this.segments)for(let t in e.vaos)e.vaos[t].destroy()}static simpleSegment(e,t,r,i){return new a1([{vertexOffset:e,primitiveOffset:t,vertexLength:r,primitiveLength:i,vaos:{},sortKey:0}])}}function a2(e,t){return 256*(e=ev(Math.floor(e),0,255))+ev(Math.floor(t),0,255)}a1.MAX_VERTEX_ARRAY_LENGTH=65535,nM("SegmentVector",a1);let a3=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"}]),a5=at([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var a4,a6,a8,a9={exports:{}},a7={exports:{}},oe={exports:{}},ot=T(function(){if(a8)return a9.exports;a8=1;var e=(a4||(a4=1,a7.exports=function(e,t){var r,i,n,a,o,s;for(i=e.length-(r=3&e.length),n=t,s=0;s>>16)*0xcc9e2d51&65535)<<16)|0)<<15|o>>>17))*0x1b873593+(((o>>>16)*0x1b873593&65535)<<16)|0)<<13|n>>>19))+((5*(n>>>16)&65535)<<16)|0))+((58964+(a>>>16)&65535)<<16);switch(o=0,r){case 3:o^=(255&e.charCodeAt(s+2))<<16;case 2:o^=(255&e.charCodeAt(s+1))<<8;case 1:n^=o=(65535&(o=(o=(65535&(o^=255&e.charCodeAt(s)))*0xcc9e2d51+(((o>>>16)*0xcc9e2d51&65535)<<16)|0)<<15|o>>>17))*0x1b873593+(((o>>>16)*0x1b873593&65535)<<16)|0}return n^=e.length,n=0x85ebca6b*(65535&(n^=n>>>16))+((0x85ebca6b*(n>>>16)&65535)<<16)|0,n=0xc2b2ae35*(65535&(n^=n>>>13))+((0xc2b2ae35*(n>>>16)&65535)<<16)|0,(n^=n>>>16)>>>0}),a7.exports),t=(a6||(a6=1,oe.exports=function(e,t){for(var r,i=e.length,n=t^i,a=0;i>=4;)r=0x5bd1e995*(65535&(r=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+((0x5bd1e995*(r>>>16)&65535)<<16),n=0x5bd1e995*(65535&n)+((0x5bd1e995*(n>>>16)&65535)<<16)^(r=0x5bd1e995*(65535&(r^=r>>>24))+((0x5bd1e995*(r>>>16)&65535)<<16)),i-=4,++a;switch(i){case 3:n^=(255&e.charCodeAt(a+2))<<16;case 2:n^=(255&e.charCodeAt(a+1))<<8;case 1:n=0x5bd1e995*(65535&(n^=255&e.charCodeAt(a)))+((0x5bd1e995*(n>>>16)&65535)<<16)}return n=0x5bd1e995*(65535&(n^=n>>>13))+((0x5bd1e995*(n>>>16)&65535)<<16),(n^=n>>>15)>>>0}),oe.exports);return a9.exports=e,a9.exports.murmur3=e,a9.exports.murmur2=t,a9.exports}());class or{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,t,r,i){this.ids.push(oi(e)),this.positions.push(t,r,i)}getPositions(e){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let t=oi(e),r=0,i=this.ids.length-1;for(;r>1;this.ids[e]>=t?i=e:r=e+1}let n=[];for(;this.ids[r]===t;)n.push({index:this.positions[3*r],start:this.positions[3*r+1],end:this.positions[3*r+2]}),r++;return n}static serialize(e,t){let r=new Float64Array(e.ids),i=new Uint32Array(e.positions);return function e(t,r,i,n){for(;i>1],o=i-1,s=n+1;for(;;){do o++;while(t[o]a);if(o>=s)break;on(t,o,s),on(r,3*o,3*s),on(r,3*o+1,3*s+1),on(r,3*o+2,3*s+2)}s-i`u_${e}`),this.type=r}setUniform(e,t,r){e.set(r.constantOr(this.value))}getBinding(e,t,r){return"color"===this.type?new ol(e,t):new oo(e,t)}}class od{constructor(e,t){this.uniformNames=t.map(e=>`u_${e}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr}setConstantDashPositions(e,t){this.dashTo=[0,e.y,e.height,e.width],this.dashFrom=[0,t.y,t.height,t.width]}setUniform(e,t,r,i){let n=null;"u_pattern_to"===i?n=this.patternTo:"u_pattern_from"===i?n=this.patternFrom:"u_dasharray_to"===i?n=this.dashTo:"u_dasharray_from"===i?n=this.dashFrom:"u_pixel_ratio_to"===i?n=this.pixelRatioTo:"u_pixel_ratio_from"===i&&(n=this.pixelRatioFrom),null!==n&&e.set(n)}getBinding(e,t,r){return r.startsWith("u_pattern")||r.startsWith("u_dasharray_")?new os(e,t):new oo(e,t)}}class of{constructor(e,t,r,i){this.expression=e,this.type=r,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===r?2:1,offset:0})),this.paintVertexArray=new i}populatePaintArray(e,t,r){let i=this.paintVertexArray.length,n=this.expression.evaluate(new nN(0,r),t,{},r.canonical,[],r.formattedSection);this.paintVertexArray.resize(e),this._setPaintValue(i,e,n)}updatePaintArray(e,t,r,i,n){let a=this.expression.evaluate(new nN(0,n),r,i);this._setPaintValue(e,t,a)}_setPaintValue(e,t,r){if("color"===this.type){let i=ou(r);for(let r=e;r`u_${e}_t`),this.type=r,this.useIntegerZoom=i,this.zoom=n,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===r?4:2,offset:0})),this.paintVertexArray=new a}populatePaintArray(e,t,r){let i=this.expression.evaluate(new nN(this.zoom,r),t,{},r.canonical,[],r.formattedSection),n=this.expression.evaluate(new nN(this.zoom+1,r),t,{},r.canonical,[],r.formattedSection),a=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(a,e,i,n)}updatePaintArray(e,t,r,i,n){let a=this.expression.evaluate(new nN(this.zoom,n),r,i),o=this.expression.evaluate(new nN(this.zoom+1,n),r,i);this._setPaintValue(e,t,a,o)}_setPaintValue(e,t,r,i){if("color"===this.type){let n=ou(r),a=ou(i);for(let r=e;r`#define HAS_UNIFORM_${e}`))}return e}getBinderAttributes(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof of||r instanceof op)for(let t of r.paintVertexAttributes)e.push(t.name);else if(r instanceof om)for(let t of r.getVertexAttributes())e.push(t.name)}return e}getBinderUniforms(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof oh||r instanceof od||r instanceof op)for(let t of r.uniformNames)e.push(t)}return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){let r=[];for(let i in this.binders){let n=this.binders[i];if(n instanceof oh||n instanceof od||n instanceof op){for(let a of n.uniformNames)if(t[a]){let o=n.getBinding(e,t[a],a);r.push({name:a,property:i,binding:o})}}}return r}setUniforms(e,t,r,i){for(let{name:e,property:n,binding:a}of t)this.binders[n].setUniform(a,i,r.get(n),e)}updatePaintBuffers(e){for(let t in this._buffers=[],this.binders){let r=this.binders[t];if(e&&r instanceof om){let t=2===e.fromScale?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;t&&this._buffers.push(t)}else(r instanceof of||r instanceof op)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}}upload(e){for(let t in this.binders){let r=this.binders[t];(r instanceof of||r instanceof op||r instanceof om)&&r.upload(e)}this.updatePaintBuffers()}destroy(){for(let e in this.binders){let t=this.binders[e];(t instanceof of||t instanceof op||t instanceof om)&&t.destroy()}}}class ox{constructor(e,t,r=()=>!0){for(let i of(this.programConfigurations={},e))this.programConfigurations[i.id]=new ov(i,t,r);this.needsUpload=!1,this._featureMap=new or,this._bufferOffset=0}populatePaintArrays(e,t,r,i){for(let r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(e,t,i);void 0!==t.id&&this._featureMap.add(t.id,r,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,r,i){for(let n of r)this.needsUpload=this.programConfigurations[n.id].updatePaintArrays(e,this._featureMap,t,n,i)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(let t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(let e in this.programConfigurations)this.programConfigurations[e].destroy()}}function ob(e,t,r){let i={"line-pattern":{source:aG,composite:aG},"fill-pattern":{source:aG,composite:aG},"fill-extrusion-pattern":{source:aG,composite:aG},"line-dasharray":{source:aW,composite:aW}}[e];return i?.[r]||({color:{source:al,composite:aA},number:{source:a_,composite:al}})[t][r]}nM("ConstantBinder",oh),nM("CrossFadedConstantBinder",od),nM("SourceExpressionBinder",of),nM("CrossFadedPatternBinder",og),nM("CrossFadedDasharrayBinder",oy),nM("CompositeExpressionBinder",op),nM("ProgramConfiguration",ov,{omit:["_buffers"]}),nM("ProgramConfigurationSet",ox);let o_=-16383-1;function ow(e){let t=8192/e.extent,r=e.loadGeometry();for(let e of r)for(let r of e){let e=Math.round(r.x*t),i=Math.round(r.y*t);r.x=ev(e,o_,16383),r.y=ev(i,o_,16383),(er.x+1||ir.y+1)&&eA("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function oT(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?ow(e):[]}}class oM{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new aN,this.indexArray=new aJ,this.segments=new a1,this.programConfigurations=new ox(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){let i=this.layers[0],n=[],a=null,o=!1,s="heatmap"===i.type;"circle"===i.type&&(o=!(a=i.layout.get("circle-sort-key")).isConstant(),s||(s="map"===i.paint.get("circle-pitch-alignment")));let l=s?t.subdivisionGranularity.circle:1;for(let{feature:t,id:i,index:s,sourceLayerIndex:l}of e){let e=this.layers[0]._featureFilter.needGeometry,c=oT(t,e);if(!this.layers[0]._featureFilter.filter(new nN(this.zoom),c,r))continue;let u=o?a.evaluate(c,{},r):void 0,h={id:i,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:ow(t),patterns:{},sortKey:u};n.push(h)}for(let i of(o&&n.sort((e,t)=>e.sortKey-t.sortKey),n)){let{geometry:n,index:a,sourceLayerIndex:o}=i,s=e[a].feature;this.addFeature(i,n,a,r,l),t.featureIndex.insert(s,n,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,a0),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,t,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 o=a.length;for(let r of t)for(let t of r){let r=t.x,i=t.y;if(r<0||r>=8192||i<0||i>=8192)continue;let n=this.segments.prepareSegment(o*o,this.layoutVertexArray,this.indexArray,e.sortKey),u=n.vertexLength;for(let e=0;e1?r:r.sub(t)._mult(n)._add(t))}function oP(e,t){let r,i,n=!1;for(let a of e)for(let e=0,o=a.length-1;et.y!=i.y>t.y&&t.x<(i.x-r.x)*(t.y-r.y)/(i.y-r.y)+r.x&&(n=!n);return n}function oI(e,t){let r=!1;for(let i=0,n=e.length-1;it.y!=o.y>t.y&&t.x<(o.x-a.x)*(t.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function oz(e,t,r){let i=t.paint.get(e).value;return"constant"===i.kind?i.value:r.programConfigurations.get(t.id).getMaxValue(e)}function oD(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function oO(e,t,r,i,n){if(!t[0]&&!t[1])return e;let a=w.convert(t)._mult(n);"viewport"===r&&a._rotate(-i);let o=[];for(let t of e)o.push(t.sub(a));return o}function oR({queryGeometry:e,size:t},r){return oA(e,r,t)}function oF({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n},a){return oA(e,a,t*(r.projectTileCoordinates(a.x,a.y,i,n).signedDistanceFromCamera/r.cameraToCenterDistance))}function oj({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n},a){let o=r.projectTileCoordinates(a.x,a.y,i,n).signedDistanceFromCamera,s=t*(r.cameraToCenterDistance/o);return oA(e,oU(a,r,i,n),s)}function oB({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n},a){return oA(e,oU(a,r,i,n),t)}function oN({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n,pitchAlignment:a="map",pitchScale:o="map"},s){let l="map"===a?"map"===o?oR:oF:"map"===o?oj:oB,c={queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n};for(let e of s)for(let t of e)if(l(c,t))return!0;return!1}function oU(e,t,r,i){let n=t.projectTileCoordinates(e.x,e.y,r,i).point;return new w((.5*n.x+.5)*t.width,(-(.5*n.y)+.5)*t.height)}nM("CircleBucket",oM,{omit:["layers"]});var oV={get paint(){return s=s||new n2({"circle-radius":new nJ(e0.paint_circle["circle-radius"]),"circle-color":new nJ(e0.paint_circle["circle-color"]),"circle-blur":new nJ(e0.paint_circle["circle-blur"]),"circle-opacity":new nJ(e0.paint_circle["circle-opacity"]),"circle-translate":new nK(e0.paint_circle["circle-translate"]),"circle-translate-anchor":new nK(e0.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new nK(e0.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new nK(e0.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new nJ(e0.paint_circle["circle-stroke-width"]),"circle-stroke-color":new nJ(e0.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new nJ(e0.paint_circle["circle-stroke-opacity"])})},get layout(){return o=o||new n2({"circle-sort-key":new nJ(e0.layout_circle["circle-sort-key"])})}};class oq extends n4{constructor(e,t){super(e,oV,t)}createBucket(e){return new oM(e)}queryRadius(e){return oz("circle-radius",this,e)+oz("circle-stroke-width",this,e)+oD(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,unwrappedTileID:o,getElevation:s}){let l=oO(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-n.bearingInRadians,a),c=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),u=this.paint.get("circle-pitch-scale"),h=this.paint.get("circle-pitch-alignment"),d,f;return"map"===h?(d=l,f=c*a):(d=l.map(e=>oU(e,n,o,s)),f=c),oN({queryGeometry:d,size:f,transform:n,unwrappedTileID:o,getElevation:s,pitchAlignment:h,pitchScale:u},i)}}class oH extends oM{}nM("HeatmapBucket",oH,{omit:["layers"]});var oG={get paint(){return l=l||new n2({"heatmap-radius":new nJ(e0.paint_heatmap["heatmap-radius"]),"heatmap-weight":new nJ(e0.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new nK(e0.paint_heatmap["heatmap-intensity"]),"heatmap-color":new n1(e0.paint_heatmap["heatmap-color"]),"heatmap-opacity":new nK(e0.paint_heatmap["heatmap-opacity"])})}};function oW(e,{width:t,height:r},i,n){if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==t*r*i)throw RangeError(`mismatched image size. expected: ${n.length} but got: ${t*r*i}`)}else n=new Uint8Array(t*r*i);return e.width=t,e.height=r,e.data=n,e}function oY(e,{width:t,height:r},i){if(t===e.width&&r===e.height)return;let n=oW({},{width:t,height:r},i);oZ(e,n,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,t),height:Math.min(e.height,r)},i),e.width=t,e.height=r,e.data=n.data}function oZ(e,t,r,i,n,a){if(0===n.width||0===n.height)return t;if(n.width>e.width||n.height>e.height||r.x>e.width-n.width||r.y>e.height-n.height)throw RangeError("out of range source coordinates for image copy");if(n.width>t.width||n.height>t.height||i.x>t.width-n.width||i.y>t.height-n.height)throw RangeError("out of range destination coordinates for image copy");let o=e.data,s=t.data;if(o===s)throw Error("srcData equals dstData, so image is already copied");for(let l=0;l{t[e.evaluationKey]=o;let s=e.expression.evaluate(t);n.setPixel(i/4/r,a/4,s)};if(e.clips)for(let t=0,n=0;tthis.max&&(this.max=r),r=this.dim+1||t<-1||t>=this.dim+1)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${t}, dim: ${this.dim}`);return(t+1)*this.stride+(e+1)}unpack(e,t,r){return e*this.redFactor+t*this.greenFactor+r*this.blueFactor-this.baseShift}pack(e){return o6(e,this.getUnpackVector())}getPixels(){return new oX({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(e,t,r){if(this.dim!==e.dim)throw Error("dem dimension mismatch");let i=t*this.dim,n=t*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(t){case -1:i=n-1;break;case 1:n=i+1}switch(r){case -1:a=o-1;break;case 1:o=a+1}let s=-t*this.dim,l=-r*this.dim;for(let t=a;t0)for(let n=t;n=t;n-=i)a=sp(n/i|0,e[n],e[n+1],a);return a&&sl(a,a.next)&&(sm(a),a=a.next),a}function sr(e,t){if(!e)return e;t||(t=e);let r,i=e;do if(r=!1,i.steiner||!sl(i,i.next)&&0!==ss(i.prev,i,i.next))i=i.next;else{if(sm(i),(i=t=i.prev)===i.next)break;r=!0}while(r||i!==t);return t}function si(e,t){let r=e.x-t.x;return 0===r&&0==(r=e.y-t.y)&&(r=(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)),r}function sn(e,t,r,i,n){return(e=0x55555555&((e=0x33333333&((e=0xf0f0f0f&((e=0xff00ff&((e=(e-r)*n|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=0x55555555&((t=0x33333333&((t=0xf0f0f0f&((t=0xff00ff&((t=(t-i)*n|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function sa(e,t,r,i,n,a,o,s){return(n-o)*(t-s)>=(e-o)*(a-s)&&(e-o)*(i-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(n-o)*(i-s)}function so(e,t,r,i,n,a,o,s){return(e!==o||t!==s)&&sa(e,t,r,i,n,a,o,s)}function ss(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function sl(e,t){return e.x===t.x&&e.y===t.y}function sc(e,t,r,i){let n=sh(ss(e,t,r)),a=sh(ss(e,t,i)),o=sh(ss(r,i,e)),s=sh(ss(r,i,t));return n!==a&&o!==s||!(0!==n||!su(e,r,t))||!(0!==a||!su(e,i,t))||!(0!==o||!su(r,e,i))||!(0!==s||!su(r,t,i))}function su(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function sh(e){return e>0?1:e<0?-1:0}function sd(e,t){return 0>ss(e.prev,e,e.next)?ss(e,t,e.next)>=0&&ss(e,e.prev,t)>=0:0>ss(e,t,e.prev)||0>ss(e,e.next,t)}function sf(e,t){let r=sg(e.i,e.x,e.y),i=sg(t.i,t.x,t.y),n=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function sp(e,t,r,i){let n=sg(e,t,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 sm(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)}function sg(e,t,r){return{i:e,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class sy{constructor(e,t){if(t>e)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=e,this._minGranularity=t}getGranularityForZoomLevel(e){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||t>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let r=0|Math.round(e),i=0|Math.round(t),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(e){if(this._granularity<2)return function(e,t){let r=[];for(let i=0;i0?(r.push(n),r.push(o),r.push(a)):(r.push(n),r.push(a),r.push(o))}return r}(this._vertexBuffer,e);let t=[],r=e.length;for(let i=0;i=0?o-1:a-1,n=(s+1)%a,l=e[2*t[i]],c=e[2*t[n]],u=e[2*t[o]],h=e[2*t[o]+1],d=e[2*t[s]+1],f=!1;if(lc)f=!1;else{let r=d-h,a=-(e[2*t[s]]-u),o=h((c-u)*r+(e[2*t[n]+1]-h)*a)*o&&(f=!0)}if(f){let e=t[i],n=t[o],l=t[s];e!==n&&e!==l&&n!==l&&r.push(l,n,e),--o<0&&(o=a-1)}else{let e=t[n],i=t[o],l=t[s];e!==i&&e!==l&&i!==l&&r.push(l,i,e),++s>=a&&(s=0)}if(i===n)break}}(this._vertexBuffer,i,t)}else t.push(...r)}return t}_scanlineGenerateVertexRingForCellRow(e,t,r){let i=e*this._granularityCellSize,n=i+this._granularityCellSize,a=[];for(let e=0;e<3;e++){let o=t[2*e],s=t[2*e+1],l=t[2*(e+1)%6],c=t[(2*(e+1)+1)%6],u=t[2*(e+2)%6],h=t[(2*(e+2)+1)%6],d=l-o,f=c-s,p=0===d,m=0===f,g=(i-s)/f,y=(n-s)/f,v=Math.min(g,y),x=Math.max(g,y);if(!m&&(v>=1||x<=0)||m&&(sn)){c>=i&&c<=n&&a.push(r[(e+1)%3]);continue}!m&&v>0&&a.push(this._vertexToIndex(o+d*v,s+f*v));let b=o+d*Math.max(v,0),_=o+d*Math.min(x,1);p||this._generateIntraEdgeVertices(a,o,s,l,c,b,_),!m&&x<1&&a.push(this._vertexToIndex(o+d*x,s+f*x)),(m||c>=i&&c<=n)&&a.push(r[(e+1)%3]),!m&&(c<=i||c>=n)&&this._generateInterEdgeVertices(a,o,s,l,c,u,h,_,i,n)}return a}_generateIntraEdgeVertices(e,t,r,i,n,a,o){let s=i-t,l=n-r,c=0===l,u=c?Math.min(t,i):Math.min(a,o),h=c?Math.max(t,i):Math.max(a,o),d=Math.floor(u/this._granularityCellSize)+1,f=Math.ceil(h/this._granularityCellSize)-1;if(c?t=d;i--){let n=i*this._granularityCellSize;e.push(this._vertexToIndex(n,r+l*(n-t)/s))}}_generateInterEdgeVertices(e,t,r,i,n,a,o,s,l,c){let u=o-n,h=(l-n)/u,d=(c-n)/u,f=Math.min(h,d),p=Math.max(h,d),m=i+(a-i)*f,g=Math.floor(Math.min(m,s)/this._granularityCellSize)+1,y=Math.ceil(Math.max(m,s)/this._granularityCellSize)-1,v=s=1||p<=0){let e=r-o,i=a+(t-a)*Math.min((l-o)/e,(c-o)/e);g=Math.floor(Math.min(i,s)/this._granularityCellSize)+1,y=Math.ceil(Math.max(i,s)/this._granularityCellSize)-1,v=s0?c:l;if(v)for(let t=g;t<=y;t++)e.push(this._vertexToIndex(t*this._granularityCellSize,b));else for(let t=y;t>=g;t--)e.push(this._vertexToIndex(t*this._granularityCellSize,b))}_generateOutline(e){let t=[];for(let r of e){let e=s_(r,this._granularity,!0),i=this._pointArrayToIndices(e),n=[];for(let e=1;en!=(-32768===a)?(e.push(t),e.push(r),e.push(this._vertexToIndex(i,a)),e.push(r),e.push(this._vertexToIndex(n,a))):(e.push(r),e.push(t),e.push(this._vertexToIndex(i,a)),e.push(this._vertexToIndex(n,a)),e.push(r)),e.push(this._vertexToIndex(i,a))}_fillPoles(e,t,r){let i=this._vertexBuffer,n=e.length;for(let a=2;a=r.next.y&&r.next.y!==r.y){let e=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=i&&e>o&&(o=e,a=r.x=r.x&&r.x>=l&&i!==r.x&&sa(na.x||r.x===a.x&&(h=a,d=r,0>ss(h.prev,h,d.prev)&&0>ss(d.next,h,h.next))))&&(a=r,u=t)}r=r.next}while(r!==s);return a}(e,t);if(!r)return t;let i=sf(r,e);return sr(i,i.next),sr(r,r.next)}(n[e],r);return r}(e,t,l,r)),e.length>80*r){i=e[0],n=e[1];let t=i,o=n;for(let a=r;at&&(t=r),s>o&&(o=s)}a=Math.max(t-i,o-n),a=0!==a?32767/a:0}return function e(t,r,i,n,a,o,s){if(!t)return;!s&&o&&function(e,t,r,i){let n=e;do 0===n.z&&(n.z=sn(n.x,n.y,t,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==e);n.prevZ.nextZ=null,n.prevZ=null,function(e){let t,r=1;do{let i,n=e;e=null;let a=null;for(t=0;n;){t++;let o=n,s=0;for(let e=0;e0||l>0&&o;)0!==s&&(0===l||!o||n.z<=o.z)?(i=n,n=n.nextZ,s--):(i=o,o=o.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=o}a.nextZ=null,r*=2}while(t>1)}(n)}(t,n,a,o);let l=t;for(;t.prev!==t.next;){let c=t.prev,u=t.next;if(o?function(e,t,r,i){let n=e.prev,a=e.next;if(ss(n,e,a)>=0)return!1;let o=n.x,s=e.x,l=a.x,c=n.y,u=e.y,h=a.y,d=Math.min(o,s,l),f=Math.min(c,u,h),p=Math.max(o,s,l),m=Math.max(c,u,h),g=sn(d,f,t,r,i),y=sn(p,m,t,r,i),v=e.prevZ,x=e.nextZ;for(;v&&v.z>=g&&x&&x.z<=y;){if(v.x>=d&&v.x<=p&&v.y>=f&&v.y<=m&&v!==n&&v!==a&&so(o,c,s,u,l,h,v.x,v.y)&&ss(v.prev,v,v.next)>=0||(v=v.prevZ,x.x>=d&&x.x<=p&&x.y>=f&&x.y<=m&&x!==n&&x!==a&&so(o,c,s,u,l,h,x.x,x.y)&&ss(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;v&&v.z>=g;){if(v.x>=d&&v.x<=p&&v.y>=f&&v.y<=m&&v!==n&&v!==a&&so(o,c,s,u,l,h,v.x,v.y)&&ss(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;x&&x.z<=y;){if(x.x>=d&&x.x<=p&&x.y>=f&&x.y<=m&&x!==n&&x!==a&&so(o,c,s,u,l,h,x.x,x.y)&&ss(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}(t,n,a,o):function(e){let t=e.prev,r=e.next;if(ss(t,e,r)>=0)return!1;let i=t.x,n=e.x,a=r.x,o=t.y,s=e.y,l=r.y,c=Math.min(i,n,a),u=Math.min(o,s,l),h=Math.max(i,n,a),d=Math.max(o,s,l),f=r.next;for(;f!==t;){if(f.x>=c&&f.x<=h&&f.y>=u&&f.y<=d&&so(i,o,n,s,a,l,f.x,f.y)&&ss(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}(t))r.push(c.i,t.i,u.i),sm(t),t=u.next,l=u.next;else if((t=u)===l){s?1===s?e(t=function(e,t){let r=e;do{let i=r.prev,n=r.next.next;!sl(i,n)&&sc(i,r,r.next,n)&&sd(i,n)&&sd(n,i)&&(t.push(i.i,r.i,n.i),sm(r),sm(r.next),r=e=n),r=r.next}while(r!==e);return sr(r)}(sr(t),r),r,i,n,a,o,2):2===s&&function(t,r,i,n,a,o){let s=t;do{let t=s.next.next;for(;t!==s.prev;){var l,c;if(s.i!==t.i&&(l=s,c=t,l.next.i!==c.i&&l.prev.i!==c.i&&!function(e,t){let r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&sc(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(l,c)&&(sd(l,c)&&sd(c,l)&&function(e,t){let r=e,i=!1,n=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&n<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==e);return i}(l,c)&&(ss(l.prev,l,c.prev)||ss(l,c.prev,c))||sl(l,c)&&ss(l.prev,l,l.next)>0&&ss(c.prev,c,c.next)>0))){let l=sf(s,t);return s=sr(s,s.next),l=sr(l,l.next),e(s,r,i,n,a,o,0),void e(l,r,i,n,a,o,0)}t=t.next}s=s.next}while(s!==t)}(t,r,i,n,a,o):e(sr(t),r,i,n,a,o,1);break}}}(l,c,r,i,n,a,0),c}(r,i),t=this._convertIndices(r,e);n=this._subdivideTrianglesScanline(t)}catch(e){console.error(e)}let a=[];return t&&(a=this._generateOutline(e)),this._ensureNoPoleVertices(),this._handlePoles(n),{verticesFlattened:this._vertexBuffer,indicesTriangles:n,indicesLineList:a}}_convertIndices(e,t){let r=[];for(let i of t)r.push(this._vertexToIndex(e[2*i],e[2*i+1]));return r}_pointArrayToIndices(e){let t=[];for(let r of e)t.push(this._vertexToIndex(r.x,r.y));return t}}function sb(e,t,r,i=!0){return new sx(r,t).subdividePolygonInternal(e,i)}function s_(e,t,r=!1){if(!e||e.length<1||e.length<2)return[];let i=e[0],n=e[e.length-1],a=r&&(i.x!==n.x||i.y!==n.y);if(t<2)return a?[...e,e[0]]:[...e];let o=Math.floor(8192/t),s=[];s.push(new w(e[0].x,e[0].y));let l=e.length,c=a?l:l-1;for(let t=0;t0?(Math.floor(y/o)+1)*o:(Math.ceil(y/o)-1)*o,t=p>0?(Math.floor(v/o)+1)*o:(Math.ceil(v/o)-1)*o,r=Math.abs(y-e),i=Math.abs(v-t),n=Math.abs(v-u),a=h?r/m:1/0,l=d?i/g:1/0;if((Math.abs(y-c)<=r||!h)&&(n<=i||!d))break;if(aa1.MAX_VERTEX_ARRAY_LENGTH&&(c=e.createNewSegment(t,r),l=s.count,m=!0,g=!0,y=!0,u=0);let v=sT(o,i,a,s,d,m,c),x=sT(o,i,a,s,f,g,c),b=sT(o,i,a,s,p,y,c);r.emplaceBack(u+v-l,u+x-l,u+b-l),c.primitiveLength++}})(t,r,i,n,a,e),u&&function(e,t,r,i,n,a){let o=[];for(let e=0;ea1.MAX_VERTEX_ARRAY_LENGTH&&(c=e.createNewSegment(t,r),l=s.count,p=!0,m=!0,u=0);let g=sT(o,i,a,s,d,p,c),y=sT(o,i,a,s,f,m,c);r.emplaceBack(u+g-l,u+y-l),c.primitiveLength++}}(o,r,s,n,l,e),t.forceNewSegmentOnNextPrepare(),o?.forceNewSegmentOnNextPrepare()}function sT(e,t,r,i,n,a,o){if(a){let a=i.count;return r(t[2*n],t[2*n+1]),e[n]=i.count,i.count++,o.vertexLength++,a}return e[n]}class sM{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new aU,this.indexArray=new aJ,this.indexArray2=new aQ,this.programConfigurations=new ox(e.layers,e.zoom),this.segments=new a1,this.segments2=new a1,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){this.hasDependencies=o7("fill",this.layers,t);let i=this.layers[0].layout.get("fill-sort-key"),n=!i.isConstant(),a=[];for(let{feature:o,id:s,index:l,sourceLayerIndex:c}of e){let e=this.layers[0]._featureFilter.needGeometry,u=oT(o,e);if(!this.layers[0]._featureFilter.filter(new nN(this.zoom),u,r))continue;let h=n?i.evaluate(u,{},r,t.availableImages):void 0,d={id:s,properties:o.properties,type:o.type,sourceLayerIndex:c,index:l,geometry:e?u.geometry:ow(o),patterns:{},sortKey:h};a.push(d)}for(let i of(n&&a.sort((e,t)=>e.sortKey-t.sortKey),a)){let{geometry:n,index:a,sourceLayerIndex:o}=i;if(this.hasDependencies){let e=se("fill",this.layers,i,{zoom:this.zoom},t);this.patternFeatures.push(e)}else this.addFeature(i,n,a,r,{},t.subdivisionGranularity);t.featureIndex.insert(e[a].feature,n,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}addFeatures(e,t,r){for(let i of this.patternFeatures)this.addFeature(i,i.geometry,i.index,t,r,e.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,o9),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,t,r,i,n,a){for(let e of rZ(t,500)){let t=sb(e,i,a.fill.getGranularityForZoomLevel(i.z)),r=this.layoutVertexArray;sw((e,t)=>{r.emplaceBack(e,t)},this.segments,this.layoutVertexArray,this.indexArray,t.verticesFlattened,t.indicesTriangles,this.segments2,this.indexArray2,t.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:n,canonical:i})}}nM("FillBucket",sM,{omit:["layers","patternFeatures"]});var sk={get paint(){return f=f||new n2({"fill-antialias":new nK(e0.paint_fill["fill-antialias"]),"fill-opacity":new nJ(e0.paint_fill["fill-opacity"]),"fill-color":new nJ(e0.paint_fill["fill-color"]),"fill-outline-color":new nJ(e0.paint_fill["fill-outline-color"]),"fill-translate":new nK(e0.paint_fill["fill-translate"]),"fill-translate-anchor":new nK(e0.paint_fill["fill-translate-anchor"]),"fill-pattern":new nQ(e0.paint_fill["fill-pattern"])})},get layout(){return h=h||new n2({"fill-sort-key":new nJ(e0.layout_fill["fill-sort-key"])})}};class sA extends n4{constructor(e,t){super(e,sk,t)}recalculate(e,t){super.recalculate(e,t);let r=this.paint._values["fill-outline-color"];"constant"===r.value.kind&&void 0===r.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(e){return new sM(e)}queryRadius(){return oD(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:e,geometry:t,transform:r,pixelsToTileUnits:i}){return oS(oO(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-r.bearingInRadians,i),t)}isTileClipped(){return!0}}let sS=at([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),sE=at([{name:"a_centroid",components:2,type:"Int16"}],4),{members:sC}=sS;class sL{constructor(e,t,r,i,n){this.properties={},this.extent=r,this.type=0,this.id=void 0,this._pbf=e,this._geometry=-1,this._keys=i,this._values=n,e.readFields(sP,this,t)}loadGeometry(){let e=this._pbf;e.pos=this._geometry;let t=e.readVarint()+e.pos,r=[],i,n=1,a=0,o=0,s=0;for(;e.pos>3}if(a--,1===n||2===n)o+=e.readSVarint(),s+=e.readSVarint(),1===n&&(i&&r.push(i),i=[]),i&&i.push(new w(o,s));else{if(7!==n)throw Error(`unknown command ${n}`);i&&i.push(i[0].clone())}}return i&&r.push(i),r}bbox(){let e=this._pbf;e.pos=this._geometry;let t=e.readVarint()+e.pos,r=1,i=0,n=0,a=0,o=1/0,s=-1/0,l=1/0,c=-1/0;for(;e.pos>3}if(i--,1===r||2===r)n+=e.readSVarint(),a+=e.readSVarint(),ns&&(s=n),ac&&(c=a);else if(7!==r)throw Error(`unknown command ${r}`)}return[o,l,s,c]}toGeoJSON(e,t,r){let i,n=this.extent*Math.pow(2,r),a=this.extent*e,o=this.extent*t,s=this.loadGeometry();function l(e){return[360*(e.x+a)/n-180,360/Math.PI*Math.atan(Math.exp((1-2*(e.y+o)/n)*Math.PI))-90]}function c(e){return e.map(l)}if(1===this.type){let e=[];for(let t of s)e.push(t[0]);let t=c(e);i=1===e.length?{type:"Point",coordinates:t[0]}:{type:"MultiPoint",coordinates:t}}else if(2===this.type){let e=s.map(c);i=1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}}else{if(3!==this.type)throw Error("unknown feature type");{let e=sI(s),t=[];for(let r of e)t.push(r.map(c));i=1===t.length?{type:"Polygon",coordinates:t[0]}:{type:"MultiPolygon",coordinates:t}}}let u={type:"Feature",geometry:i,properties:this.properties};return null!=this.id&&(u.id=this.id),u}}function sP(e,t,r){1===e?t.id=r.readVarint():2===e?function(e,t){let r=e.readVarint()+e.pos;for(;e.pos=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[e];let t=this._pbf.readVarint()+this._pbf.pos;return new sL(this._pbf,t,this.extent,this._keys,this._values)}}function sD(e,t,r){15===e?t.version=r.readVarint():1===e?t.name=r.readString():5===e?t.extent=r.readVarint():2===e?t._features.push(r.pos):3===e?t._keys.push(r.readString()):4===e&&t._values.push(function(e){let t=null,r=e.readVarint()+e.pos;for(;e.pos>3;t=1===r?e.readString():2===r?e.readFloat():3===r?e.readDouble():4===r?e.readVarint64():5===r?e.readVarint():6===r?e.readSVarint():7===r?e.readBoolean():null}if(null==t)throw Error("unknown feature value");return t}(r))}class sO{constructor(e,t){this.layers=e.readFields(sR,{},t)}}function sR(e,t,r){if(3===e){let e=new sz(r,r.readVarint()+r.pos);e.length&&(t[e.name]=e)}}function sF(e,t,r,i,n,a,o,s){e.emplaceBack(t,r,2*Math.floor(8192*i)+o,8192*n*2,8192*a*2,Math.round(s))}class sj{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new aV,this.centroidVertexArray=new aB,this.indexArray=new aJ,this.programConfigurations=new ox(e.layers,e.zoom),this.segments=new a1,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){for(let{feature:i,id:n,index:a,sourceLayerIndex:o}of(this.features=[],this.hasDependencies=o7("fill-extrusion",this.layers,t),e)){let e=this.layers[0]._featureFilter.needGeometry,s=oT(i,e);if(!this.layers[0]._featureFilter.filter(new nN(this.zoom),s,r))continue;let l={id:n,sourceLayerIndex:o,index:a,geometry:e?s.geometry:ow(i),properties:i.properties,type:i.type,patterns:{}};this.hasDependencies?this.features.push(se("fill-extrusion",this.layers,l,{zoom:this.zoom},t)):this.addFeature(l,l.geometry,a,r,{},t.subdivisionGranularity),t.featureIndex.insert(i,l.geometry,a,o,this.index,!0)}}addFeatures(e,t,r){for(let i of this.features){let{geometry:n}=i;this.addFeature(i,n,i.index,t,r,e.subdivisionGranularity)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,sC),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,sE.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,t,r,i,n,a){for(let r of rZ(t,500)){let t={x:0,y:0,sampleCount:0},n=this.layoutVertexArray.length;this.processPolygon(t,i,e,r,a);let o=this.layoutVertexArray.length-n,s=Math.floor(t.x/t.sampleCount),l=Math.floor(t.y/t.sampleCount);for(let e=0;e{sF(c,e,t,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(e,t){let r=0;for(let a=1;a8192)||i.y===n.y&&(i.y<0||i.y>8192))continue;t.segment.vertexLength+4>a1.MAX_VERTEX_ARRAY_LENGTH&&(t.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let l=o.sub(s)._perp()._unit(),c=s.dist(o);r+c>32768&&(r=0),sF(this.layoutVertexArray,o.x,o.y,l.x,l.y,0,0,r),sF(this.layoutVertexArray,o.x,o.y,l.x,l.y,0,1,r),r+=c,sF(this.layoutVertexArray,s.x,s.y,l.x,l.y,0,0,r),sF(this.layoutVertexArray,s.x,s.y,l.x,l.y,0,1,r);let u=t.segment.vertexLength;this.indexArray.emplaceBack(u,u+2,u+1),this.indexArray.emplaceBack(u+1,u+2,u+3),t.segment.vertexLength+=4,t.segment.primitiveLength+=2}}}function sB(e){return e.every(e=>e.x<0)||e.every(e=>e.x>8192)||e.every(e=>e.y<0)||e.every(e=>e.y>8192)}nM("FillExtrusionBucket",sj,{omit:["layers","features"]});var sN={get paint(){return p=p||new n2({"fill-extrusion-opacity":new nK(e0["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new nJ(e0["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new nK(e0["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new nK(e0["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new nQ(e0["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new nJ(e0["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new nJ(e0["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new nK(e0["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class sU extends n4{constructor(e,t){super(e,sN,t)}createBucket(e){return new sj(e)}queryRadius(){return oD(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,pixelPosMatrix:o}){let s=oO(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-n.bearingInRadians,a),l=this.paint.get("fill-extrusion-height").evaluate(t,r),c=this.paint.get("fill-extrusion-base").evaluate(t,r),u=function(e,t){let r=[];for(let i of e){let e=[i.x,i.y,0,1];eo(e,e,t),r.push(new w(e[0]/e[3],e[1]/e[3]))}return r}(s,o),h=function(e,t,r,i){let n=[],a=[],o=i[8]*t,s=i[9]*t,l=i[10]*t,c=i[11]*t,u=i[8]*r,h=i[9]*r,d=i[10]*r,f=i[11]*r;for(let t of e){let e=[],r=[];for(let n of t){let t=n.x,a=n.y,p=i[0]*t+i[4]*a+i[12],m=i[1]*t+i[5]*a+i[13],g=i[2]*t+i[6]*a+i[14],y=i[3]*t+i[7]*a+i[15],v=g+l,x=y+c,b=p+u,_=m+h,T=g+d,M=y+f,k=new w((p+o)/x,(m+s)/x);k.z=v/x,e.push(k);let A=new w(b/M,_/M);A.z=T/M,r.push(A)}n.push(e),a.push(r)}return[n,a]}(i,c,l,o);return function(e,t,r){let i=1/0;oS(r,t)&&(i=sq(r,t[0]));for(let n=0;n>4;if(1!==i)throw Error(`Got v${i} data when expected v1.`);let n=sH[15&r];if(!n)throw Error("Unrecognized array type.");let[a]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new sG(o,a,n,e)}constructor(e,t=64,r=Float64Array,i){if(isNaN(e)||e<0)throw Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let n=sH.indexOf(this.ArrayType),a=2*e*this.ArrayType.BYTES_PER_ELEMENT,o=e*this.IndexArrayType.BYTES_PER_ELEMENT,s=(8-o%8)%8;if(n<0)throw Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+s,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+a+o+s),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+s,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+n]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){let r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=t,r}finish(){let e=this._pos>>1;if(e!==this.numItems)throw Error(`Added ${e} items when expected ${this.numItems}.`);return function e(t,r,i,n,a,o){if(a-n<=i)return;let s=n+a>>1;(function e(t,r,i,n,a,o){for(;a>n;){if(a-n>600){let s=a-n+1,l=i-n+1,c=Math.log(s),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);e(t,r,i,Math.max(n,Math.floor(i-l*u/s+h)),Math.min(a,Math.floor(i+(s-l)*u/s+h)),o)}let s=r[2*i+o],l=n,c=a;for(sW(t,r,n,i),r[2*a+o]>s&&sW(t,r,n,a);ls;)c--}r[2*n+o]===s?sW(t,r,n,c):sW(t,r,++c,a),c<=i&&(n=c+1),i<=c&&(a=c-1)}})(t,r,s,n,a,o),e(t,r,i,n,s-1,1-o),e(t,r,i,s+1,a,1-o)}(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,i){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:n,coords:a,nodeSize:o}=this,s=[0,n.length-1,0],l=[];for(;s.length;){let c=s.pop()||0,u=s.pop()||0,h=s.pop()||0;if(u-h<=o){for(let o=h;o<=u;o++){let s=a[2*o],c=a[2*o+1];s>=e&&s<=r&&c>=t&&c<=i&&l.push(n[o])}continue}let d=h+u>>1,f=a[2*d],p=a[2*d+1];f>=e&&f<=r&&p>=t&&p<=i&&l.push(n[d]),(0===c?e<=f:t<=p)&&(s.push(h),s.push(d-1),s.push(1-c)),(0===c?r>=f:i>=p)&&(s.push(d+1),s.push(u),s.push(1-c))}return l}within(e,t,r){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:i,coords:n,nodeSize:a}=this,o=[0,i.length-1,0],s=[],l=r*r;for(;o.length;){let c=o.pop()||0,u=o.pop()||0,h=o.pop()||0;if(u-h<=a){for(let r=h;r<=u;r++)sZ(n[2*r],n[2*r+1],e,t)<=l&&s.push(i[r]);continue}let d=h+u>>1,f=n[2*d],p=n[2*d+1];sZ(f,p,e,t)<=l&&s.push(i[d]),(0===c?e-r<=f:t-r<=p)&&(o.push(h),o.push(d-1),o.push(1-c)),(0===c?e+r>=f:t+r>=p)&&(o.push(d+1),o.push(u),o.push(1-c))}return s}}function sW(e,t,r,i){sY(e,r,i),sY(t,2*r,2*i),sY(t,2*r+1,2*i+1)}function sY(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function sZ(e,t,r,i){let n=e-r,a=t-i;return n*n+a*a}function s$(e,t,r,i){let n={id:e??null,type:t,geometry:r,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(t){case"Point":case"MultiPoint":sK(n,r);break;case"LineString":sK(n,r.points);break;case"Polygon":sK(n,r[0].points);break;case"MultiLineString":for(let e of r)sK(n,e.points);break;case"MultiPolygon":for(let e of r)sK(n,e[0].points)}return n}function sX(e){e.points.length>64&&(e.points=new Float64Array(e.points))}function sK(e,t){for(let r=0;r0&&(o+=i?(n*l-s*a)/2:Math.sqrt(Math.pow(s-n,2)+Math.pow(l-a,2))),n=s,a=l}let s=t.points.length-3;t.points[2]=1,r>0&&function e(t,r,i,n){let a=n,o=r+(i-r>>1),s,l=i-r,c=t[r],u=t[r+1],h=t[i],d=t[i+1];for(let e=r+3;e1?(r=n,i=a):l>0&&(r+=o*l,i+=s*l)}return(o=e-r)*o+(s=t-i)*s}(t[e],t[e+1],c,u,h,d);if(r>a)s=e,a=r;else if(r===a){let t=Math.abs(e-o);tn&&(s-r>3&&e(t,r,s,n),t[s+2]=a,i-s>3&&e(t,s,i,n))}(t.points,0,s,r),t.points[s+2]=1,sX(t),t.size=Math.abs(o),t.start=0,t.end=t.size}function s1(e,t,r,i){for(let n=0;n1?1:r}function s5(e){let t={type:"Feature",geometry:function(e){let{type:t,geometry:r}=e;switch(t){case"Point":return{type:t,coordinates:function(e,t){return[s6(e),s8(t)]}(r[0],r[1])};case"MultiPoint":return{type:t,coordinates:s4(r)};case"LineString":return{type:t,coordinates:s4(r.points)};case"MultiLineString":case"Polygon":return{type:t,coordinates:r.map(e=>s4(e.points))};case"MultiPolygon":return{type:t,coordinates:r.map(e=>e.map(e=>s4(e.points)))}}}(e),properties:e.tags};return null!=e.id&&(t.id=e.id),t}function s4(e){let t=[];for(let n=0;n=(r/=t)&&o=i)return null;let l=[];for(let t of e){let e=n===O.X?t.minX:t.minY,a=n===O.X?t.maxX:t.maxY;if(e>=r&&a=i))switch(t.type){case"Point":case"MultiPoint":!function(e,t,r,i,n){let a=[];(function(e,t,r,i,n){for(let a=0;a=r&&o<=i&&lr(t,e[a],e[a+1],e[a+2])}})(e.geometry,a,r,i,n),a.length&&t.push(s$(e.id,3===a.length?"Point":"MultiPoint",a,e.tags))}(t,l,r,i,n);continue;case"LineString":!function(e,t,r,i,n,a){let o=[];if(s7(e.geometry,o,r,i,n,!1,a.lineMetrics),o.length)if(a.lineMetrics)for(let r of o)t.push(s$(e.id,"LineString",r,e.tags));else t.push(o.length>1?s$(e.id,"MultiLineString",o,e.tags):s$(e.id,"LineString",o[0],e.tags))}(t,l,r,i,n,s);continue;case"MultiLineString":!function(e,t,r,i,n){let a=[];lt(e.geometry,a,r,i,n,!1),a.length&&t.push(1!==a.length?s$(e.id,"MultiLineString",a,e.tags):s$(e.id,"LineString",a[0],e.tags))}(t,l,r,i,n);continue;case"Polygon":!function(e,t,r,i,n){let a=[];lt(e.geometry,a,r,i,n,!0),a.length&&t.push(s$(e.id,"Polygon",a,e.tags))}(t,l,r,i,n);continue;case"MultiPolygon":!function(e,t,r,i,n){let a=[];for(let t of e.geometry){let e=[];lt(t,e,r,i,n,!0),e.length&&a.push(e)}a.length&&t.push(s$(e.id,"MultiPolygon",a,e.tags))}(t,l,r,i,n);continue}}return l.length?l:null}function s7(e,t,r,i,n,a,o){let s=le(e),l=n===O.X?li:ln,c,u,h=e.start;for(let d=0;dr&&(u=l(s,f,p,g,y,r),o&&(s.start=h+c*u)):v>i?x=r&&(u=l(s,f,p,g,y,r),b=!0),x>i&&v<=i&&(u=l(s,f,p,g,y,i),b=!0),!a&&b&&(o&&(s.end=h+c*u),t.push(s),s=le(e)),o&&(h+=c)}let d=e.points.length-3,f=e.points[d],p=e.points[d+1],m=n===O.X?f:p;m>=r&&m<=i&&lr(s.points,f,p,e.points[d+2]),d=s.points.length-3,a&&d>=3&&(s.points[d]!==s.points[0]||s.points[d+1]!==s.points[1])&&lr(s.points,s.points[0],s.points[1],s.points[2]),s.points.length&&(sX(s),t.push(s))}function le(e){return{points:[],size:e.size,start:e.start,end:e.end}}function lt(e,t,r,i,n,a){for(let o of e)s7(o,t,r,i,n,a,!1)}function lr(e,t,r,i){e.push(t,r,i)}function li(e,t,r,i,n,a){let o=(a-t)/(i-t);return lr(e.points,a,r+(n-r)*o,1),o}function ln(e,t,r,i,n,a){let o=(a-r)/(n-r);return lr(e.points,t+(i-t)*o,a,1),o}function la(e,t){let r=t.buffer/t.extent,i=e,n=s9(e,1,-1-r,r,O.X,-1,2,t),a=s9(e,1,1-r,2+r,O.X,-1,2,t);return(n||a)&&(i=s9(e,1,-r,1+r,O.X,-1,2,t)||[],n&&(i=lo(n,1).concat(i)),a&&(i=i.concat(lo(a,-1)))),i}function lo(e,t){let r=[];for(let i of e)switch(i.type){case"Point":case"MultiPoint":{let e=function(e,t){let r=[];for(let i=0;ie};class lu{constructor(e){this.options=Object.assign(Object.create(lc),e),this.trees=Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(e){let t=[];for(let r of e){if(!r.geometry)continue;let[e,i]=r.geometry.coordinates,[n,a]=[s2(e),s3(i)];t.push({id:r.id,type:"Point",geometry:[n,a],tags:r.properties})}this.createIndex(t)}initialize(e){let t=[];for(let r of e)"Point"===r.type&&t.push(r);this.createIndex(t)}updateIndex(e,t,r){this.options=Object.assign(Object.create(lc),r.clusterOptions),this.initialize(e)}createIndex(e){let{log:t,minZoom:r,maxZoom:i}=this.options;t&&console.time("total time");let n=`prepare ${e.length} points`;t&&console.time(n),this.points=e;let a=[];for(let t=0;t=r;e--){let r=Date.now();o=this.trees[e]=this.createTree(this.cluster(o,e)),t&&console.log("z%d: %d clusters in %dms",e,o.numItems,Date.now()-r)}t&&console.timeEnd("total time")}getClusters(e,t){return this.getClustersInternal(e,t).map(e=>s5(e))}getClustersInternal(e,t){let r=((e[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,e[1])),n=180===e[2]?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,n=180;else if(r>n){let e=this.getClustersInternal([r,i,180,a],t),o=this.getClustersInternal([-180,i,n,a],t);return e.concat(o)}let o=this.trees[this.limitZoom(t)],s=o.range(s2(r),s3(a),s2(n),s3(i)),l=o.flatData,c=[];for(let e of s){var u,h,d;let t=this.stride*e;c.push(l[t+5]>1?(u=l,h=t,d=this.clusterProps,{id:u[h+3],type:"Point",tags:lh(u,h,d),geometry:[u[h],u[h+1]]}):this.points[l[t+3]])}return c}getChildren(e){let t=this.getOriginId(e),r=this.getOriginZoom(e),i=Error("No cluster with the specified id: "+e),n=this.trees[r];if(!n)throw i;let a=n.flatData;if(t*this.stride>=a.length)throw i;let o=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=n.within(a[t*this.stride],a[t*this.stride+1],o),l=[];for(let t of s){var c,u,h;let r=t*this.stride;a[r+4]===e&&l.push(a[r+5]>1?(c=a,u=r,h=this.clusterProps,{type:"Feature",id:c[u+3],properties:lh(c,u,h),geometry:{type:"Point",coordinates:[s6(c[u]),s8(c[u+1])]}}):s5(this.points[a[r+3]]))}if(0===l.length)throw i;return l}getLeaves(e,t,r){let i=[];return this.appendLeaves(i,e,t=t||10,r=r||0,0),i}getTile(e,t,r){let i=this.trees[this.limitZoom(e)];if(!i)return null;let n=Math.pow(2,e),{extent:a,radius:o}=this.options,s=o/a,l=(r-s)/n,c=(r+1+s)/n,u={transformed:!0,features:[],source:null,x:t,y:r,z:e};return this.addTileFeatures(i.range((t-s)/n,l,(t+1+s)/n,c),i.flatData,t,r,n,u),0===t&&this.addTileFeatures(i.range(1-s/n,l,1,c),i.flatData,n,r,n,u),t===n-1&&this.addTileFeatures(i.range(0,l,s/n,c),i.flatData,-1,r,n,u),u}getClusterExpansionZoom(e){return this.getOriginZoom(e)}appendLeaves(e,t,r,i,n){for(let a of this.getChildren(t)){let t=a.properties;if(t?.cluster?n+t.point_count<=i?n+=t.point_count:n=this.appendLeaves(e,t.cluster_id,r,i,n):n1,l,c,u;if(s)l=lh(t,e,this.clusterProps),c=t[e],u=t[e+1];else{let r=this.points[t[e+3]];l=r.tags,[c,u]=r.geometry}let h={type:1,geometry:[[Math.round(this.options.extent*(c*n-r)),Math.round(this.options.extent*(u*n-i))]],tags:l},d;void 0!==(d=s||this.options.generateId?t[e+3]:this.points[t[e+3]].id)&&(h.id=d),a.features.push(h)}}limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}cluster(e,t){let{radius:r,extent:i,reduce:n,minPoints:a}=this.options,o=r/(i*Math.pow(2,t)),s=e.flatData,l=[],c=this.stride;for(let r=0;rt&&(f+=s[r+5])}if(f>d&&f>=a){let e,a=i*d,o=u*d,p=-1,m=(r/c<<5)+(t+1)+this.points.length;for(let i of h){let l=i*c;if(s[l+2]<=t)continue;s[l+2]=t;let u=s[l+5];a+=s[l]*u,o+=s[l+1]*u,s[l+4]=m,n&&(e||(e=this.map(s,r,!0),p=this.clusterProps.length,this.clusterProps.push(e)),n(e,this.map(s,l)))}s[r+4]=m,l.push(a/f,o/f,1/0,m,-1,f),n&&l.push(p)}else{for(let e=0;e1)for(let e of h){let r=e*c;if(!(s[r+2]<=t)){s[r+2]=t;for(let e=0;e>5}getOriginZoom(e){return(e-this.points.length)%32}map(e,t,r){if(e[t+5]>1){let i=this.clusterProps[e[t+6]];return r?Object.assign({},i):i}let i=this.points[e[t+3]].tags,n=this.options.map(i);return r&&n===i?Object.assign({},n):n}}function lh(e,t,r){let i=e[t+5],n=i>=1e4?`${Math.round(i/1e3)}k`:i>=1e3?Math.round(i/100)/10+"k":i,a=e[t+6];return Object.assign(-1===a?{}:Object.assign({},r[a]),{cluster:!0,cluster_id:e[t+3],point_count:i,point_count_abbreviated:n})}let ld="geojsonvt_clip_start",lf="geojsonvt_clip_end";function lp(e,t,r,i,n){let a=t===n.maxZoom?0:n.tolerance/((1<0&&t.size<(n?o:i))return void(r.numPoints+=t.points.length/3);let s=[];for(let e=0;eo)&&(r.numSimplified++,s.push(t.points[e],t.points[e+1])),r.numPoints++;n&&function(e,t){let r=0;for(let t=0,i=e.length,n=i-2;t0===t)for(let t=0,r=e.length;t1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(t),r.debug>1&&console.timeEnd("invalidating");let[i,n,a]=[0,0,0],o=lp(e,i,n,a,r);o.source=e;let s=lx(i,n,a);if(this.tiles[s]=o,this.tileCoords.push({z:i,x:n,y:a,id:s}),r.debug){let e=`z${i}`;this.stats[e]=(this.stats[e]||0)+1,this.total++}}getClusterExpansionZoom(e){return null}getChildren(e){return null}getLeaves(e,t,r){return null}getTile(e,t,r){let{extent:i,debug:n}=this.options,a=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);let s,l=e,c=t,u=r;for(;!s&&l>0;)l--,c>>=1,u>>=1,s=this.tiles[lx(l,c,u)];return s?.source?(n>1&&(console.log("found parent tile z%d-%d-%d",l,c,u),console.time("drilling down")),this.splitTile(s.source,l,c,u,e,t,r),n>1&&console.timeEnd("drilling down"),this.tiles[o]?lg(this.tiles[o],i):null):null}splitTile(e,t,r,i,n,a,o){let s=[e,t,r,i],l=this.options,c=l.debug;for(;s.length;){i=s.pop(),r=s.pop(),t=s.pop(),e=s.pop();let u=1<1&&console.time("creation"),d=this.tiles[h]=lp(e,t,r,i,l),this.tileCoords.push({z:t,x:r,y:i,id:h}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,i,d.numFeatures,d.numPoints,d.numSimplified),console.timeEnd("creation"));let e=`z${t}`;this.stats[e]=(this.stats[e]||0)+1,this.total++}if(d.source=e,null==n){if(t===l.indexMaxZoom||d.numPoints<=l.indexMaxPoints)continue}else{if(t===l.maxZoom||t===n)continue;if(null!=n){let e=n-t;if(r!==a>>e||i!==o>>e)continue}}if(d.source=null,!e.length)continue;c>1&&console.time("clipping");let f=.5*l.buffer/l.extent,p=.5-f,m=.5+f,g=1+f,y=null,v=null,x=null,b=null,_=s9(e,u,r-f,r+m,O.X,d.minX,d.maxX,l),w=s9(e,u,r+p,r+g,O.X,d.minX,d.maxX,l);_&&(y=s9(_,u,i-f,i+m,O.Y,d.minY,d.maxY,l),v=s9(_,u,i+p,i+g,O.Y,d.minY,d.maxY,l)),w&&(x=s9(w,u,i-f,i+m,O.Y,d.minY,d.maxY,l),b=s9(w,u,i+p,i+g,O.Y,d.minY,d.maxY,l)),c>1&&console.timeEnd("clipping"),s.push(y||[],t+1,2*r,2*i),s.push(v||[],t+1,2*r,2*i+1),s.push(x||[],t+1,2*r+1,2*i),s.push(b||[],t+1,2*r+1,2*i+1)}}invalidateTiles(e){if(!e.length)return;let t=this.options,{debug:r}=t,i=1/0,n=-1/0,a=1/0,o=-1/0;for(let t of e)i=Math.min(i,t.minX),n=Math.max(n,t.maxX),a=Math.min(a,t.minY),o=Math.max(o,t.maxY);let s=t.buffer/t.extent,l=new Set;for(let t in this.tiles){let c=this.tiles[t],u=1<=d||o=p)continue;let m=!1;for(let t of e)if(t.maxX>=h&&t.minX=f&&t.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",c.z,c.x,c.y,c.numFeatures,c.numPoints,c.numSimplified);let e=`z${c.z}`;this.stats[e]=(this.stats[e]||0)-1,this.total--}delete this.tiles[t],l.add(t)}}l.size&&(this.tileCoords=this.tileCoords.filter(e=>!l.has(e.id)))}}function lx(e,t,r){return 32*((1<e.id),this.index=e.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers))this.gradients[t.id]={};this.layoutVertexArray=new aq,this.layoutVertexArray2=new aH,this.indexArray=new aJ,this.programConfigurations=new ox(e.layers,e.zoom),this.segments=new a1,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){this.hasDependencies=o7("line",this.layers,t)||this.hasLineDasharray(this.layers);let i=this.layers[0].layout.get("line-sort-key"),n=!i.isConstant(),a=[];for(let{feature:t,id:o,index:s,sourceLayerIndex:l}of e){let e=this.layers[0]._featureFilter.needGeometry,c=oT(t,e);if(!this.layers[0]._featureFilter.filter(new nN(this.zoom),c,r))continue;let u=n?i.evaluate(c,{},r):void 0,h={id:o,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:ow(t),patterns:{},dashes:{},sortKey:u};a.push(h)}for(let i of(n&&a.sort((e,t)=>e.sortKey-t.sortKey),a)){let{geometry:n,index:a,sourceLayerIndex:o}=i;this.hasDependencies?(o7("line",this.layers,t)?se("line",this.layers,i,{zoom:this.zoom},t):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,i,this.zoom,t),this.patternFeatures.push(i)):this.addFeature(i,n,a,r,{},{},t.subdivisionGranularity),t.featureIndex.insert(e[a].feature,n,a,o,this.index)}}update(e,t,r,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r,dashPositions:i})}addFeatures(e,t,r,i){for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,t,r,i,e.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,lw)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,l_),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,ld)&&Object.hasOwn(e.properties,lf))return{start:+e.properties[ld],end:+e.properties[lf]}}addFeature(e,t,r,i,n,a,o){let s=this.layers[0].layout,l=s.get("line-join").evaluate(e,{}),c=s.get("line-cap").evaluate(e,{}),u=s.get("line-miter-limit").evaluate(e,{}),h=s.get("line-round-limit").evaluate(e,{});for(let r of(this.lineClips=this.lineFeatureClips(e),t))this.addLine(r,e,l,c,u,h,i,o);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:n,dashPositions:a,canonical:i})}addLine(e,t,r,i,n,a,o,s){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,e=s_(e,o?s.line.getGranularityForZoomLevel(o.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let t=0;t=2&&e[c-1].equals(e[c-2]);)c--;let u=0;for(;u0;if(_&&t>u){let e=f.dist(p);if(e>2*h){let t=f.sub(f.sub(p)._mult(h/e)._round());this.updateDistance(p,t),this.addCurrentVertex(t,g,0,0,d),p=t}}let T=p&&m,M=T?r:l?"butt":i;if(T&&"round"===M&&(xn&&(M="bevel"),"bevel"===M&&(x>2&&(M="flipbevel"),x100)o=y.mult(-1);else{let e=x*g.add(y).mag()/g.sub(y).mag();o._perp()._mult(e*(w?-1:1))}this.addCurrentVertex(f,o,0,0,d),this.addCurrentVertex(f,o.mult(-1),0,0,d)}else if("bevel"===M||"fakeround"===M){let e=-Math.sqrt(x*x-1),t=w?e:0,r=w?0:e;if(p&&this.addCurrentVertex(f,g,t,r,d),"fakeround"===M){let e=Math.round(180*b/Math.PI/20);for(let t=1;t2*h){let t=f.add(m.sub(f)._mult(h/e)._round());this.updateDistance(f,t),this.addCurrentVertex(t,y,0,0,d),f=t}}}}addCurrentVertex(e,t,r,i,n,a=!1){let o=t.y*i-t.x,s=-t.y-t.x*i;this.addHalfVertex(e,t.x+t.y*r,t.y-t.x*r,a,!1,r,n),this.addHalfVertex(e,o,s,a,!0,-i,n),this.distance>16384&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,t,r,i,n,a))}addHalfVertex({x:e,y:t},r,i,n,a,o,s){let l=.5*(this.lineClips?32767*this.scaledDistance:this.scaledDistance);this.layoutVertexArray.emplaceBack((e<<1)+ +!!n,(t<<1)+ +!!a,Math.round(63*r)+128,Math.round(63*i)+128,1+(0===o?0:o<0?-1:1)|(63&l)<<2,l>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let c=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,c,this.e2),s.primitiveLength++),a?this.e2=c:this.e1=c}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}hasLineDasharray(e){for(let t of e){let e=t.paint.get("line-dasharray");if(e&&!e.isConstant())return!0}return!1}addLineDashDependencies(e,t,r,i){for(let n of e){let e=n.paint.get("line-dasharray");if(!e||"constant"===e.value.kind)continue;let a="round"===n.layout.get("line-cap").evaluate(t,{}),o={dasharray:e.value.evaluate({zoom:r-1},t,{}),round:a},s={dasharray:e.value.evaluate({zoom:r},t,{}),round:a},l={dasharray:e.value.evaluate({zoom:r+1},t,{}),round:a},c=`${o.dasharray.join(",")},${o.round}`,u=`${s.dasharray.join(",")},${s.round}`,h=`${l.dasharray.join(",")},${l.round}`;i.dashDependencies[c]=o,i.dashDependencies[u]=s,i.dashDependencies[h]=l,t.dashes[n.id]={min:c,mid:u,max:h}}}}nM("LineBucket",lM,{omit:["layers","patternFeatures"]});var lk={get paint(){return g=g||new n2({"line-opacity":new nJ(e0.paint_line["line-opacity"]),"line-color":new nJ(e0.paint_line["line-color"]),"line-translate":new nK(e0.paint_line["line-translate"]),"line-translate-anchor":new nK(e0.paint_line["line-translate-anchor"]),"line-width":new nJ(e0.paint_line["line-width"]),"line-gap-width":new nJ(e0.paint_line["line-gap-width"]),"line-offset":new nJ(e0.paint_line["line-offset"]),"line-blur":new nJ(e0.paint_line["line-blur"]),"line-dasharray":new nQ(e0.paint_line["line-dasharray"]),"line-pattern":new nQ(e0.paint_line["line-pattern"]),"line-gradient":new n1(e0.paint_line["line-gradient"])})},get layout(){return m=m||new n2({"line-cap":new nJ(e0.layout_line["line-cap"]),"line-join":new nJ(e0.layout_line["line-join"]),"line-miter-limit":new nJ(e0.layout_line["line-miter-limit"]),"line-round-limit":new nJ(e0.layout_line["line-round-limit"]),"line-sort-key":new nJ(e0.layout_line["line-sort-key"])})}};class lA extends nJ{possiblyEvaluate(e,t){return t=new nN(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,zoomHistory:t.zoomHistory,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,r,i){return t=eb({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,r,i)}}class lS extends n4{constructor(e,t){super(e,lk,t),this.gradientVersion=0,y||((y=new lA(lk.paint.properties["line-width"].specification)).useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if("line-gradient"===e){let e=this.gradientExpression();this.stepInterpolant=void 0!==e._styleExpression&&e._styleExpression.expression instanceof ru,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,t){super.recalculate(e,t),this.paint._values["line-floorwidth"]=y.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new lM(e)}queryRadius(e){var t,r;return t=oz("line-width",this,e),((r=oz("line-gap-width",this,e))>0?r+2*t:t)/2+Math.abs(oz("line-offset",this,e))+oD(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a}){var o,s;let l=oO(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-n.bearingInRadians,a),c=a/2*(o=this.paint.get("line-width").evaluate(t,r),(s=this.paint.get("line-gap-width").evaluate(t,r))>0?s+2*o:o),u=this.paint.get("line-offset").evaluate(t,r);return u&&(i=function(e,t){let r=[];for(let i of e){let e=function(e){let t=[];for(let r=0;r=3){for(let t of i)if(oI(e,t))return!0}if(function(e,t,r){if(e.length>1){if(oE(e,t))return!0;for(let i of t)if(oC(i,e,r))return!0}for(let i of e)if(oC(i,t,r))return!0;return!1}(e,i,r))return!0}return!1}(l,i,c)}isTileClipped(){return!0}}let lE=at([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),lC=at([{name:"a_projected_pos",components:3,type:"Float32"}],4);at([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let lL=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"}]);let lP=at([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),lI=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"}]),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"}]),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"}]);let lz={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","\xa2":"¢","\xa3":"£","\xa5":"¥","\xa6":"¦","\xac":"¬","\xaf":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","⋯":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},lD={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},lO={40:!0};function lR(e,t,r,i,n,a){if("fontStack"in t){let i=r[t.fontStack],a=i?.[e];return a?a.metrics.advance*t.scale+n:0}{let e=i[t.imageName];return e?e.displaySize[0]*t.scale*24/a+n:0}}function lF(e,t,r,i){let n=Math.pow(e-t,2);return i?eMath.max(e,this.sections[t].scale),0)}getMaxImageSize(e){let t=0,r=0;for(let i=0;ir))}addImageSection(e){let t=e.image?e.image.name:"";if(0===t.length)return void eA("Can't add FormattedSection with an empty image.");let r=this.getNextImageSectionCharCode();r?(this.text+=String.fromCharCode(r),this.sections.push({scale:1,verticalAlign:e.verticalAlign||"bottom",imageName:t}),this.sectionIndex.push(this.sections.length-1)):eA("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(e,t,r,i,n){let a=[],o=this.determineAverageLineWidth(e,t,r,i,n),s=this.hasZeroWidthSpaces(),l=0,c=0,u=this.text[Symbol.iterator](),h=u.next(),d=this.text[Symbol.iterator]();d.next();let f=d.next(),p=this.text[Symbol.iterator]();p.next(),p.next();let m=p.next();for(;!h.done;){let t=this.getSection(c),g=h.value.codePointAt(0);if(nI(g)||(l+=lR(g,t,r,i,e,n)),!f.done){let e=/[\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(g)),r=f.value.codePointAt(0);(lD[g]||e||"imageName"in t||!m.done&&lO[r])&&a.push(lj(c+1,l,o,a,function(e,t,r){let i=0;return 10===e&&(i-=1e4),r&&(i+=150),40!==e&&65288!==e||(i+=50),41!==t&&65289!==t||(i+=50),i}(g,r,e&&s),!1))}c++,h=u.next(),f=d.next(),m=p.next()}return function e(t){return t?e(t.priorBreak).concat(t.index):[]}(lj(this.length(),l,o,a,0,!0))}determineAverageLineWidth(e,t,r,i,n){let a=0,o=0;for(let t of this.text){let s=this.getSection(o);a+=lR(t.codePointAt(0),s,r,i,e,n),o++}return a/Math.max(1,Math.ceil(a/t))}}let lN=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class lU{constructor(e=new Uint8Array(16)){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(e,t,r=this.length){for(;this.pos>3,n=this.pos;this.type=7&r,e(i,t,this),this.pos===n&&this.skip(r)}return t}readMessage(e,t){return this.readFields(e,t,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)+0x100000000*this.dataView.getUint32(this.pos+4,!0);return this.pos+=8,e}readSFixed64(){let e=this.dataView.getUint32(this.pos,!0)+0x100000000*this.dataView.getInt32(this.pos+4,!0);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 t=this.buf,r,i;return r=127&(i=t[this.pos++]),i<128?r:(r|=(127&(i=t[this.pos++]))<<7,i<128?r:(r|=(127&(i=t[this.pos++]))<<14,i<128?r:(r|=(127&(i=t[this.pos++]))<<21,i<128?r:function(e,t,r){let i=r.buf,n,a;if(n=(112&(a=i[r.pos++]))>>4,a<128||(n|=(127&(a=i[r.pos++]))<<3,a<128)||(n|=(127&(a=i[r.pos++]))<<10,a<128)||(n|=(127&(a=i[r.pos++]))<<17,a<128)||(n|=(127&(a=i[r.pos++]))<<24,a<128)||(n|=(1&(a=i[r.pos++]))<<31,a<128)){var o,s;return o=e,s=n,t?0x100000000*s+(o>>>0):0x100000000*(s>>>0)+(o>>>0)}throw Error("Expected varint not more than 10 bytes")}(r|=(15&(i=t[this.pos]))<<28,e,this))))}readVarint64(){return this.readVarint(!0)}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,t=this.pos;return this.pos=e,e-t>=12&&lN?lN.decode(this.buf.subarray(t,e)):function(e,t,r){let i="",n=t;for(;n239?4:t>223?3:t>191?2:1;if(n+c>r)break;1===c?t<128&&(l=t):2===c?(192&(a=e[n+1]))==128&&(l=(31&t)<<6|63&a)<=127&&(l=null):3===c?(a=e[n+1],o=e[n+2],(192&a)==128&&(192&o)==128&&((l=(15&t)<<12|(63&a)<<6|63&o)<=2047||l>=55296&&l<=57343)&&(l=null)):4===c&&(a=e[n+1],o=e[n+2],s=e[n+3],(192&a)==128&&(192&o)==128&&(192&s)==128&&((l=(15&t)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,c=1):l>65535&&(l-=65536,i+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),i+=String.fromCharCode(l),n+=c}return i}(this.buf,t,e)}readBytes(){let e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t}readPackedVarint(e=[],t){let r=this.readPackedEnd();for(;this.pos127;);else if(2===t)this.pos=this.readVarint()+this.pos;else if(5===t)this.pos+=4;else{if(1!==t)throw Error(`Unimplemented type: ${t}`);this.pos+=8}}writeTag(e,t){this.writeVarint(e<<3|t)}realloc(e){let t=this.length||16;for(;t0xfffffff||e<0?function(e,t){var r,i;let n,a,o;if(e>=0?(n=e%0x100000000|0,a=e/0x100000000|0):(n=~(-e%0x100000000),a=~(-e/0x100000000),0xffffffff^n?n=n+1|0:(n=0,a=a+1|0)),e>=0xffffffffffffffff||e<-0xffffffffffffffff)throw Error("Given varint doesn't fit into 10 bytes");t.realloc(10),r=n,t.buf[t.pos++]=127&r|128,r>>>=7,t.buf[t.pos++]=127&r|128,r>>>=7,t.buf[t.pos++]=127&r|128,r>>>=7,t.buf[t.pos++]=127&r|128,t.buf[t.pos]=127&(r>>>=7),o=(7&(i=a))<<4,t.buf[t.pos++]|=o|128*!!(i>>>=3),i&&(t.buf[t.pos++]=127&i|128*!!(i>>>=7),i&&(t.buf[t.pos++]=127&i|128*!!(i>>>=7),i&&(t.buf[t.pos++]=127&i|128*!!(i>>>=7),i&&(t.buf[t.pos++]=127&i|128*!!(i>>>=7),i&&(t.buf[t.pos++]=127&i)))))}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|128*(e>127),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|128*(e>127),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|128*(e>127),e<=127||(this.buf[this.pos++]=e>>>7&127))))}writeSVarint(e){this.writeVarint(e<0?-(2*e)-1:2*e)}writeBoolean(e){this.writeVarint(+e)}writeString(e){e=String(e),this.realloc(4*e.length),this.pos++;let t=this.pos;this.pos=function(e,t,r){for(let i,n,a=0;a55295&&i<57344){if(!n){i>56319||a+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):n=i;continue}if(i<56320){e[r++]=239,e[r++]=191,e[r++]=189,n=i;continue}i=n-55296<<10|i-56320|65536,n=null}else n&&(e[r++]=239,e[r++]=191,e[r++]=189,n=null);i<128?e[r++]=i:(i<2048?e[r++]=i>>6|192:(i<65536?e[r++]=i>>12|224:(e[r++]=i>>18|240,e[r++]=i>>12&63|128),e[r++]=i>>6&63|128),e[r++]=63&i|128)}return r}(this.buf,e,this.pos);let r=this.pos-t;r>=128&&lV(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r}writeFloat(e){this.realloc(4),this.dataView.setFloat32(this.pos,e,!0),this.pos+=4}writeDouble(e){this.realloc(8),this.dataView.setFloat64(this.pos,e,!0),this.pos+=8}writeBytes(e){let t=e.length;this.writeVarint(t),this.realloc(t);for(let r=0;r=128&&lV(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i}writeMessage(e,t,r){this.writeTag(e,2),this.writeRawMessage(t,r)}writePackedVarint(e,t){t.length&&this.writeMessage(e,lq,t)}writePackedSVarint(e,t){t.length&&this.writeMessage(e,lH,t)}writePackedBoolean(e,t){t.length&&this.writeMessage(e,lY,t)}writePackedFloat(e,t){t.length&&this.writeMessage(e,lG,t)}writePackedDouble(e,t){t.length&&this.writeMessage(e,lW,t)}writePackedFixed32(e,t){t.length&&this.writeMessage(e,lZ,t)}writePackedSFixed32(e,t){t.length&&this.writeMessage(e,l$,t)}writePackedFixed64(e,t){t.length&&this.writeMessage(e,lX,t)}writePackedSFixed64(e,t){t.length&&this.writeMessage(e,lK,t)}writeBytesField(e,t){this.writeTag(e,2),this.writeBytes(t)}writeFixed32Field(e,t){this.writeTag(e,5),this.writeFixed32(t)}writeSFixed32Field(e,t){this.writeTag(e,5),this.writeSFixed32(t)}writeFixed64Field(e,t){this.writeTag(e,1),this.writeFixed64(t)}writeSFixed64Field(e,t){this.writeTag(e,1),this.writeSFixed64(t)}writeVarintField(e,t){this.writeTag(e,0),this.writeVarint(t)}writeSVarintField(e,t){this.writeTag(e,0),this.writeSVarint(t)}writeStringField(e,t){this.writeTag(e,2),this.writeString(t)}writeFloatField(e,t){this.writeTag(e,5),this.writeFloat(t)}writeDoubleField(e,t){this.writeTag(e,1),this.writeDouble(t)}writeBooleanField(e,t){this.writeVarintField(e,+t)}}function lV(e,t,r){let i=t<=16383?1:t<=2097151?2:t<=0xfffffff?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(i);for(let t=r.pos-1;t>=e;t--)r.buf[t+i]=r.buf[t]}function lq(e,t){for(let r=0;rt.h-e.h);let i=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}],n=0,a=0;for(let t of e)for(let e=i.length-1;e>=0;e--){let r=i[e];if(!(t.w>r.w||t.h>r.h)){if(t.x=r.x,t.y=r.y,a=Math.max(a,t.y+t.h),n=Math.max(n,t.x+t.w),t.w===r.w&&t.h===r.h){let t=i.pop();t&&eg.toCodeUnitIndex(e)),x(g.toString(),v))){let t=[...e].map(()=>0);y.push(new lB(e,g.sections,t))}else if(b){y=[],v=v.map(e=>g.toCodeUnitIndex(e));let e=0,t=[];for(let r of g.text)t.push(...Array(r.length).fill(g.sectionIndex[e])),e++;for(let e of b(g.text,t,v)){let t=[],r="";for(let i of e[0])t.push(e[1][r.length]),r+=i;y.push(new lB(e[0],g.sections,t))}}else y=function(e,t){let r=[],i=0;for(let n of t)r.push(e.substring(i,n)),i=n;return ic){let e=Math.ceil(a/c);n*=e/o,o=e}return{x1:i,y1:n,x2:i+a,y2:n+o}}function l9(e,t,r,i,n,a){let o=e.image,s;if(o.content){let e=o.content,t=o.pixelRatio||1;s=[e[0]/t,e[1]/t,o.displaySize[0]-e[2]/t,o.displaySize[1]-e[3]/t]}let l=t.left*a,c=t.right*a,u,h,d,f;"width"===r||"both"===r?(f=n[0]+l-i[3],h=n[0]+c+i[1]):h=(f=n[0]+(l+c-o.displaySize[0])/2)+o.displaySize[0];let p=t.top*a,m=t.bottom*a;return"height"===r||"both"===r?(u=n[1]+p-i[0],d=n[1]+m+i[2]):d=(u=n[1]+(p+m-o.displaySize[1])/2)+o.displaySize[1],{image:o,top:u,right:h,bottom:d,left:f,collisionPadding:s}}function l7(e,t){let{expression:r}=t;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new nN(e+1))};if("source"===r.kind)return{kind:"source"};{let{zoomStops:t,interpolationType:i}=r,n=0;for(;ne.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=l7(this.zoom,r["text-size"]),this.iconSizeData=l7(this.zoom,r["icon-size"]);let i=this.layers[0].layout,n=i.get("symbol-sort-key"),a=i.get("symbol-z-order");this.canOverlap="never"!==ce(i,"text-overlap","text-allow-overlap")||"never"!==ce(i,"icon-overlap","icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==a&&!n.isConstant(),this.sortFeaturesByY=("viewport-y"===a||"auto"===a&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map(t=>e.ax[t])),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.sourceID=t.sourceID}createArrays(){this.text=new cn(new ox(this.layers,this.zoom,e=>e.startsWith("text"))),this.icon=new cn(new ox(this.layers,this.zoom,e=>e.startsWith("icon"))),this.glyphOffsetArray=new az,this.lineVertexArray=new aD,this.symbolInstances=new aI,this.textAnchorOffsets=new aR}calculateGlyphDependencies(e,t,r,i,n){for(let a of e)if(t[a.codePointAt(0)]=!0,(r||i)&&n){let e=lz[a];e&&(t[e.codePointAt(0)]=!0)}}populate(t,r,i){var n;let a=this.layers[0],o=a.layout,s=o.get("text-font"),l=o.get("text-field"),c=o.get("icon-image"),u=("constant"!==l.value.kind||l.value.value instanceof tX&&!l.value.value.isEmpty()||l.value.value.toString().length>0)&&("constant"!==s.value.kind||s.value.value.length>0),h="constant"!==c.value.kind||!!c.value.value||Object.keys(c.parameters).length>0,d=o.get("symbol-sort-key");if(this.features=[],!u&&!h)return;let f=r.iconDependencies,p=r.glyphDependencies,m=r.availableImages,g=new nN(this.zoom);for(let{feature:r,id:l,index:c,sourceLayerIndex:y}of t){let t,v,x=a._featureFilter.needGeometry,b=oT(r,x);if(!a._featureFilter.filter(g,b,i))continue;if(x||(b.geometry=ow(r)),u){let e=a.getValueAndResolveTokens("text-field",b,i,m),r=tX.factory(e);this.hasRTLText||(this.hasRTLText=function(e){for(let t of e.sections)if(function(e){for(let t of e)if(nj(t.codePointAt(0)))return!0;return!1}(t.text))return!0;return!1}(r)),(!this.hasRTLText||"unavailable"===nB.getRTLTextPluginStatus()||this.hasRTLText&&nB.isParsed())&&(t=function(e,t,r){for(let i of e.sections)i.text=function(e,t,r){let i=t.layout.get("text-transform").evaluate(r,{});return"uppercase"===i?e=e.toLocaleUpperCase():"lowercase"===i&&(e=e.toLocaleLowerCase()),nB.applyArabicShaping&&(e=nB.applyArabicShaping(e)),e}(i.text,t,r);return e}(r,a,b))}if(h){let e=a.getValueAndResolveTokens("icon-image",b,i,m);v=e instanceof t3?e:t3.fromString(e)}if(!t&&!v)continue;let _=this.sortFeaturesByKey?d.evaluate(b,{},i):void 0;if(this.features.push({id:l,text:t,icon:v,index:c,sourceLayerIndex:y,geometry:b.geometry,properties:r.properties,type:sL.types[r.type],sortKey:_}),v&&(f[v.name]=!0),t){let r=s.evaluate(b,{},i).join(","),a="viewport"!==o.get("text-rotation-alignment")&&"point"!==o.get("symbol-placement");for(let i of(this.allowVerticalPlacement=null==(n=this.writingModes)?void 0:n.includes(e.ax.vertical),t.sections))if(i.image)f[i.image.name]=!0;else{let e=nz(t.toString()),n=i.fontStack||r;p[n]||(p[n]={}),this.calculateGlyphDependencies(i.text,p[n],a,this.allowVerticalPlacement,e)}}}"line"===o.get("symbol-placement")&&(this.features=function(e){let t={},r={},i=[],n=0;function a(t){i.push(e[t]),n++}function o(e,t,n){let a=r[e];return delete r[e],r[t]=a,i[a].geometry[0].pop(),i[a].geometry[0]=i[a].geometry[0].concat(n[0]),a}function s(e,r,n){let a=t[r];return delete t[r],t[e]=a,i[a].geometry[0].shift(),i[a].geometry[0]=n[0].concat(i[a].geometry[0]),a}function l(e,t,r){let i=r?t[0][t[0].length-1]:t[0][0];return`${e}:${i.x}:${i.y}`}for(let c=0;ce.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((e,t)=>e.sortKey-t.sortKey)}update(e,t,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,{imagePositions:r}),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,{imagePositions:r}))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}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,t){let r=this.lineVertexArray.length;if(void 0!==e.segment){let r=e.dist(t[e.segment+1]),i=e.dist(t[e.segment]),n={};for(let i=e.segment+1;i=0;r--)n[r]={x:t[r].x,y:t[r].y,tileUnitDistanceFromAnchor:i},r>0&&(i+=t[r-1].dist(t[r]));for(let e=0;e0}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,t){let r=e.placedSymbolArray.get(t),i=r.vertexStartIndex+4*r.numGlyphs;for(let t=r.vertexStartIndex;ti[e]-i[t]||n[t]-n[e]),a}addToSortKeyRanges(e,t){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];r?.sortKey===t?r.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,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)){for(let t of(this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[],this.symbolInstanceIndexes)){let e=this.symbolInstances.get(t);this.featureSortOrder.push(e.featureIndex);let r=[e.rightJustifiedTextSymbolIndex,e.centerJustifiedTextSymbolIndex,e.leftJustifiedTextSymbolIndex];for(let e=0;e=0&&r.indexOf(t)===e&&this.addIndicesForPlacedSymbol(this.text,t)}e.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,e.verticalPlacedTextSymbolIndex),e.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.placedIconSymbolIndex),e.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}nM("SymbolBucket",co,{omit:["layers","collisionBoxArray","features","compareText"]}),co.MAX_GLYPHS=65535,co.addDynamicAttributes=ci;var cs={get paint(){return x=x||new n2({"icon-opacity":new nJ(e0.paint_symbol["icon-opacity"]),"icon-color":new nJ(e0.paint_symbol["icon-color"]),"icon-halo-color":new nJ(e0.paint_symbol["icon-halo-color"]),"icon-halo-width":new nJ(e0.paint_symbol["icon-halo-width"]),"icon-halo-blur":new nJ(e0.paint_symbol["icon-halo-blur"]),"icon-translate":new nK(e0.paint_symbol["icon-translate"]),"icon-translate-anchor":new nK(e0.paint_symbol["icon-translate-anchor"]),"text-opacity":new nJ(e0.paint_symbol["text-opacity"]),"text-color":new nJ(e0.paint_symbol["text-color"],{runtimeType:ts,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new nJ(e0.paint_symbol["text-halo-color"]),"text-halo-width":new nJ(e0.paint_symbol["text-halo-width"]),"text-halo-blur":new nJ(e0.paint_symbol["text-halo-blur"]),"text-translate":new nK(e0.paint_symbol["text-translate"]),"text-translate-anchor":new nK(e0.paint_symbol["text-translate-anchor"])})},get layout(){return v=v||new n2({"symbol-placement":new nK(e0.layout_symbol["symbol-placement"]),"symbol-spacing":new nK(e0.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new nK(e0.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new nJ(e0.layout_symbol["symbol-sort-key"]),"symbol-z-order":new nK(e0.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new nK(e0.layout_symbol["icon-allow-overlap"]),"icon-overlap":new nK(e0.layout_symbol["icon-overlap"]),"icon-ignore-placement":new nK(e0.layout_symbol["icon-ignore-placement"]),"icon-optional":new nK(e0.layout_symbol["icon-optional"]),"icon-rotation-alignment":new nK(e0.layout_symbol["icon-rotation-alignment"]),"icon-size":new nJ(e0.layout_symbol["icon-size"]),"icon-text-fit":new nK(e0.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new nK(e0.layout_symbol["icon-text-fit-padding"]),"icon-image":new nJ(e0.layout_symbol["icon-image"]),"icon-rotate":new nJ(e0.layout_symbol["icon-rotate"]),"icon-padding":new nJ(e0.layout_symbol["icon-padding"]),"icon-keep-upright":new nK(e0.layout_symbol["icon-keep-upright"]),"icon-offset":new nJ(e0.layout_symbol["icon-offset"]),"icon-anchor":new nJ(e0.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new nK(e0.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new nK(e0.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new nK(e0.layout_symbol["text-rotation-alignment"]),"text-field":new nJ(e0.layout_symbol["text-field"]),"text-font":new nJ(e0.layout_symbol["text-font"]),"text-size":new nJ(e0.layout_symbol["text-size"]),"text-max-width":new nJ(e0.layout_symbol["text-max-width"]),"text-line-height":new nK(e0.layout_symbol["text-line-height"]),"text-letter-spacing":new nJ(e0.layout_symbol["text-letter-spacing"]),"text-justify":new nJ(e0.layout_symbol["text-justify"]),"text-radial-offset":new nJ(e0.layout_symbol["text-radial-offset"]),"text-variable-anchor":new nK(e0.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new nJ(e0.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new nJ(e0.layout_symbol["text-anchor"]),"text-max-angle":new nK(e0.layout_symbol["text-max-angle"]),"text-writing-mode":new nK(e0.layout_symbol["text-writing-mode"]),"text-rotate":new nJ(e0.layout_symbol["text-rotate"]),"text-padding":new nK(e0.layout_symbol["text-padding"]),"text-keep-upright":new nK(e0.layout_symbol["text-keep-upright"]),"text-transform":new nJ(e0.layout_symbol["text-transform"]),"text-offset":new nJ(e0.layout_symbol["text-offset"]),"text-allow-overlap":new nK(e0.layout_symbol["text-allow-overlap"]),"text-overlap":new nK(e0.layout_symbol["text-overlap"]),"text-ignore-placement":new nK(e0.layout_symbol["text-ignore-placement"]),"text-optional":new nK(e0.layout_symbol["text-optional"])})}};class cl{constructor(e){if(void 0===e.property.overrides)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:ti,this.defaultValue=e}evaluate(e){if(e.formattedSection){let t=this.defaultValue.property.overrides;if(t?.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}nM("FormatSectionOverride",cl,{omit:["defaultValue"]});class cc extends n4{constructor(e,t){super(e,cs,t)}recalculate(e,t){if(super.recalculate(e,t),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){let e=this.layout.get("text-writing-mode");if(e){let t=[];for(let r of e)t.includes(r)||t.push(r);this.layout._values["text-writing-mode"]=t}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,t,r,i){var n;let a=this.layout.get(e).evaluate(t,{},r,i),o=this._unevaluatedLayout._values[e];return o.isDataDriven()||iI(o.value)||!a?a:(n=t.properties,a.replace(/{([^{}]+)}/g,(e,t)=>n&&t in n?String(n[t]):""))}createBucket(e){return new co(e)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let e of cs.paint.overridableProperties){if(!cc.hasPaintOverride(this.layout,e))continue;let t=this.paint.get(e),r=new iP(new cl(t),t.property.specification),i=null;i="constant"===t.value.kind||"source"===t.value.kind?new iD("source",r):new iO("composite",r,t.value.zoomStops),this.paint._values[e]=new n$(t.property,i,t.parameters)}}_handleOverridablePaintPropertyUpdate(e,t,r){return!(!this.layout||t.isDataDriven()||r.isDataDriven())&&cc.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,t){let r=e.get("text-field"),i=cs.paint.properties[t],n=!1,a=e=>{var t;for(let r of e)if(null!=(t=i.overrides)&&t.hasOverride(r))return void(n=!0)};if("constant"===r.value.kind&&r.value.value instanceof tX)a(r.value.value.sections);else if("source"===r.value.kind||"composite"===r.value.kind){let e=t=>{n||(t instanceof t7&&t8(t.value)===td?a(t.value.sections):t instanceof rI?a(t.sections):t.eachChild(e))},t=r.value;t._styleExpression&&e(t._styleExpression.expression)}return n}}var cu={get paint(){return b=b||new n2({"background-color":new nK(e0.paint_background["background-color"]),"background-pattern":new n0(e0.paint_background["background-pattern"]),"background-opacity":new nK(e0.paint_background["background-opacity"])})}};class ch extends n4{constructor(e,t){super(e,cu,t)}}class cd extends n4{constructor(e,t){super(e,{},t),this.onAdd=e=>{this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)},this.onRemove=e=>{this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)},this.implementation=e}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}}class cf{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,null==(e=this._channel)||e.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let cp={once:!0};class cm{constructor(e,t){if(isNaN(e)||isNaN(t))throw Error(`Invalid LngLat object: (${e}, ${t})`);if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new cm(ex(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){let t=Math.PI/180,r=this.lat*t,i=e.lat*t;return 6371008.8*Math.acos(Math.min(Math.sin(r)*Math.sin(i)+Math.cos(r)*Math.cos(i)*Math.cos((e.lng-this.lng)*t),1))}static convert(e){if(e instanceof cm)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new cm(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new cm(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 [, ]")}}let cg=2*Math.PI*6371008.8;function cy(e){return cg*Math.cos(e*Math.PI/180)}function cv(e){return(180+e)/360}function cx(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function cb(e){return 360*e-180}function c_(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}function cw(e,t){return e*cy(c_(t))}class cT{constructor(e,t,r=0){this.x=+e,this.y=+t,this.z=+r}static fromLngLat(e,t=0){let r=cm.convert(e);return new cT(cv(r.lng),cx(r.lat),t/cy(r.lat))}toLngLat(){return new cm(cb(this.x),c_(this.y))}toAltitude(){return cw(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/cg*(1/Math.cos(c_(this.y)*Math.PI/180))}}function cM(e,t,r){var i=2*Math.PI*6378137/256/Math.pow(2,r);return[e*i-2*Math.PI*6378137/2,t*i-2*Math.PI*6378137/2]}class ck{constructor(e,t,r){if(!function(e,t,r){return!(e<0||e>25||r<0||r>=Math.pow(2,e)||t<0||t>=Math.pow(2,e))}(e,t,r))throw Error(`x=${t}, y=${r}, z=${e} outside of bounds. 0<=x<${Math.pow(2,e)}, 0<=y<${Math.pow(2,e)} 0<=z<=25 `);this.z=e,this.x=t,this.y=r,this.key=cE(0,e,e,t,r)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t,r){var i,n,a,o,s;let l=(n=this.y,a=this.z,o=cM(256*(i=this.x),256*(n=Math.pow(2,a)-n-1),a),s=cM(256*(i+1),256*(n+1),a),o[0]+","+o[1]+","+s[0]+","+s[1]),c=function(e,t,r){let i="";for(let n=e;n>0;n--){let e=1<1?"@2x":"").replace(/{quadkey}/g,c).replace(/{bbox-epsg-3857}/g,l)}isChildOf(e){let t=this.z-e.z;return t>0&&e.x===this.x>>t&&e.y===this.y>>t}getTilePoint(e){let t=Math.pow(2,this.z);return new w((e.x*t-this.x)*8192,(e.y*t-this.y)*8192)}toString(){return`${this.z}/${this.x}/${this.y}`}}class cA{constructor(e,t){this.wrap=e,this.canonical=t,this.key=cE(e,t.z,t.z,t.x,t.y)}}class cS{constructor(e,t,r,i,n){if(this.terrainRttPosMatrix32f=null,e= z; overscaledZ = ${e}; z = ${r}`);this.overscaledZ=e,this.wrap=t,this.canonical=new ck(r,+i,+n),this.key=cE(t,e,r,i,n)}clone(){return new cS(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 t=this.canonical.z-e;return e>this.canonical.z?new cS(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new cS(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(e,t){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?cE(this.wrap*t,e,this.canonical.z,this.canonical.x,this.canonical.y):cE(this.wrap*t,e,e,this.canonical.x>>r,this.canonical.y>>r)}isChildOf(e){if(e.wrap!==this.wrap||this.overscaledZ-e.overscaledZ<=0)return!1;if(0===e.overscaledZ)return this.overscaledZ>0;let t=this.canonical.z-e.canonical.z;return!(t<0)&&e.canonical.x===this.canonical.x>>t&&e.canonical.y===this.canonical.y>>t}children(e){if(this.overscaledZ>=e)return[new cS(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let t=this.canonical.z+1,r=2*this.canonical.x,i=2*this.canonical.y;return[new cS(t,this.wrap,t,r,i),new cS(t,this.wrap,t,r+1,i),new cS(t,this.wrap,t,r,i+1),new cS(t,this.wrap,t,r+1,i+1)]}isLessThan(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.y=0&&e=0&&t=o)return null;let l=this.canonical.x+i,c=this.wrap;return l<0?(c-=Math.ceil(-l/o),l=(l%o+o)%o):l>=o&&(c+=Math.floor(l/o),l%=o),{tileID:new cS(this.overscaledZ,c,a,l,s),x:e-i*r,y:t-n*r}}}function cE(e,t,r,i,n){(e*=2)<0&&(e=-1*e-1);let a=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(e){return this.expandBy(-e)}map(e){let t=new cC;return t.extend(e(new w(this.minX,this.minY))),t.extend(e(new w(this.maxX,this.minY))),t.extend(e(new w(this.minX,this.maxY))),t.extend(e(new w(this.maxX,this.maxY))),t}static fromPoints(e){let t=new cC;for(let r of e)t.extend(r);return t}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}}class cL{constructor(e){this._stringToNumber={},this._numberToString=[];for(let t=0;t=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]}}class cP{constructor(e,t,r,i,n){this.type="Feature",this._vectorTileFeature=e,this._x=r,this._y=i,this._z=t,this.properties=e.properties,this.id=n}projectPoint(e,t,r,i){return[360*(e.x+t)/i-180,360/Math.PI*Math.atan(Math.exp((1-2*(e.y+r)/i)*Math.PI))-90]}projectLine(e,t,r,i){return e.map(e=>this.projectPoint(e,t,r,i))}get geometry(){if(this._geometry)return this._geometry;let e=this._vectorTileFeature,t=e.extent*Math.pow(2,this._z),r=e.extent*this._x,i=e.extent*this._y,n=e.loadGeometry();switch(e.type){case 1:{let e=[];for(let t of n)e.push(t[0]);let a=this.projectLine(e,r,i,t);this._geometry=1===e.length?{type:"Point",coordinates:a[0]}:{type:"MultiPoint",coordinates:a};break}case 2:{let e=n.map(e=>this.projectLine(e,r,i,t));this._geometry=1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e};break}case 3:{let e=sI(n),a=[];for(let n of e)a.push(n.map(e=>this.projectLine(e,r,i,t)));this._geometry=1===a.length?{type:"Polygon",coordinates:a[0]}:{type:"MultiPolygon",coordinates:a};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 t in this)"_geometry"!==t&&"_vectorTileFeature"!==t&&"_x"!==t&&"_y"!==t&&"_z"!==t&&(e[t]=this[t]);return e}}class cI{constructor(e,t,r){this._name=e,this.dataBuffer=t,"number"==typeof r?this._size=r:(this.nullabilityBuffer=r,this._size=r.size())}getValue(e){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(e)?null:this.getValueFromBuffer(e)}has(e){var t;return(null==(t=this.nullabilityBuffer)?void 0:t.get(e))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class cz extends cI{}class cD extends cz{getValueFromBuffer(e){return this.dataBuffer[e]}}class cO extends cz{getValueFromBuffer(e){return this.dataBuffer[e]}}class cR extends cI{constructor(e,t,r,i){super(e,t,i),this.delta=r}}class cF extends cR{constructor(e,t,r,i){super(e,Int32Array.of(t),r,i)}getValueFromBuffer(e){return this.dataBuffer[0]+e*this.delta}}class cj extends cI{constructor(e,t,r,i){super(e,i?Int32Array.of(t):Uint32Array.of(t),r)}getValueFromBuffer(e){return this.dataBuffer[0]}}class cB{constructor(e,t,r,i,n=4096){this._name=e,this._geometryVector=t,this._idVector=r,this._propertyVectors=i,this._extent=n}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(e){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map(e=>[e.name,e]))),this.propertyVectorsMap.get(e)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let e=[],t=this.geometryVector.getGeometries();for(let r=0;r>>32-e;let cV=function(){var e;if(!Number.isFinite(65536))return 65536;let t=(e=Math.floor(65536))-e%256;return 0===t?256:t}(),cq=3*cV/256+cV|0;function cH(){let e=new Uint8Array(cq);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 cG(e,t,r){let i=new Uint32Array(r),n=0,a=t.get();for(let t=0;t=64)throw Error("Varint too long")}return t.set(n),r}(e,t);return i}function cY(e){return e>>>1^-(1&e)}function cZ(e){return e>>BigInt("1")^-(BigInt("1")&e)}function c$(e){return e%2==1?-((e+1)/2):e/2}function cX(e,t,r){if(void 0===r){r=0;for(let i=0;i=4)for(;i=4)for(;i=4)for(let i=e[0];r>4],n=null;switch(i){case B.DATA:n={dictionaryType:Object.values(N)[15&r]};break;case B.OFFSET:n={offsetType:Object.values(U)[15&r]};break;case B.LENGTH:n={lengthType:Object.values(V)[15&r]}}t.increment();let a=e[t.get()],o=Object.values(F)[a>>5],s=Object.values(F)[a>>2&7],l=Object.values(j)[3&a];t.increment();let c=cG(e,t,2),u=c[0];return{physicalStreamType:i,logicalStreamType:n,logicalLevelTechnique1:o,logicalLevelTechnique2:s,physicalLevelTechnique:l,numValues:u,byteLength:c[1],decompressedCount:u}}(e,t);return n.logicalLevelTechnique1===F.MORTON?(r=cG(e,t,2),{physicalStreamType:n.physicalStreamType,logicalStreamType:n.logicalStreamType,logicalLevelTechnique1:n.logicalLevelTechnique1,logicalLevelTechnique2:n.logicalLevelTechnique2,physicalLevelTechnique:n.physicalLevelTechnique,numValues:n.numValues,byteLength:n.byteLength,decompressedCount:n.decompressedCount,numBits:r[0],coordinateShift:r[1]}):F.RLE!==n.logicalLevelTechnique1&&F.RLE!==n.logicalLevelTechnique2||j.NONE===n.physicalLevelTechnique?n:(i=cG(e,t,2),{physicalStreamType:n.physicalStreamType,logicalStreamType:n.logicalStreamType,logicalLevelTechnique1:n.logicalLevelTechnique1,logicalLevelTechnique2:n.logicalLevelTechnique2,physicalLevelTechnique:n.physicalLevelTechnique,numValues:n.numValues,byteLength:n.byteLength,decompressedCount:i[1],runs:i[0],numRleValues:i[1]})}(S=B||(B={})).PRESENT="PRESENT",S.DATA="DATA",S.OFFSET="OFFSET",S.LENGTH="LENGTH",(E=N||(N={})).NONE="NONE",E.SINGLE="SINGLE",E.SHARED="SHARED",E.VERTEX="VERTEX",E.MORTON="MORTON",E.FSST="FSST",(C=U||(U={})).VERTEX="VERTEX",C.INDEX="INDEX",C.STRING="STRING",C.KEY="KEY",(L=V||(V={})).VAR_BINARY="VAR_BINARY",L.GEOMETRIES="GEOMETRIES",L.PARTS="PARTS",L.RINGS="RINGS",L.TRIANGLES="TRIANGLES",L.SYMBOL="SYMBOL",L.DICTIONARY="DICTIONARY",(P=q||(q={}))[P.FLAT=0]="FLAT",P[P.CONST=1]="CONST",P[P.SEQUENCE=2]="SEQUENCE",P[P.DICTIONARY=3]="DICTIONARY",P[P.FSST_DICTIONARY=4]="FSST_DICTIONARY";class c3{constructor(e,t){this.values=e,this._size=t}get(e){let t=Math.floor(e/8);return(this.values[t]>>e%8&1)==1}set(e,t){let r=Math.floor(e/8);this.values[r]=this.values[r]|!!t<>e%8&1}size(){return this._size}getBuffer(){return this.values}}function c5(e,t,r){if(!t)return e;let i=t.size(),n=new e.constructor(i),a=0;for(let o=0;o=4)for(;i>>0;for(let r=1;r>>0;return t}(r.logicalLevelTechnique2===F.RLE?cX(o,r.runs,r.numRleValues):o);break;case F.RLE:a=cX(o,r.runs,r.numRleValues);break;case F.MORTON:c1(o),a=o;break;case F.COMPONENTWISE_DELTA:a=function(e){if(e.length<2)return new Uint32Array(e);let t=new Uint32Array(e.length);t[0]=cY(e[0])>>>0,t[1]=cY(e[1])>>>0;for(let r=2;r>>0,t[r+1]=t[r-1]+cY(e[r+1])>>>0;return t}(o);break;case F.NONE:a=o;break;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}return n?c5(a,n,0):a}function c8(e,t,r){return function(e,t){if(t.logicalLevelTechnique1===F.DELTA&&t.logicalLevelTechnique2===F.NONE){let t=new Int32Array(e.length+1);t[0]=0,t[1]=cY(e[0]);let r=t[1];for(let i=2;i!==t.length;++i)r+=cY(e[i-1]),t[i]=t[i-1]+r;return new Uint32Array(t)}if(t.logicalLevelTechnique1===F.RLE&&t.logicalLevelTechnique2===F.NONE)return function(e,t,r){let i=new Uint32Array(r+1);i[0]=0;let n=1,a=i[0];for(let r=0;r>>2,s=function(e,t){if(t<=e.encodedWords.length)return e.encodedWords;let r=new Uint32Array(Math.max(16,2*t));return e.encodedWords=r,r}(n,o);!function(e,t,r,i){if(t<0||r<0||t+r>e.length)throw RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${t}, byteLength=${r}, bytes.length=${e.length})`);let n=Math.floor(r/4),a=r%4!=0,o=a?n+1:n;if(i.length0){let r=e.byteOffset+t;if(3&r)for(let r=0;r>>0;return((255&t)<<24|(65280&t)<<8|t>>>8&65280|t>>>24&255)>>>0}(t[e])}}if(a){let a=t+4*n,o=r-4*n,s=0;for(let t=0;t0){let t=0|e[i];if(i=i+1|0,255&t)throw Error(`FastPFOR decode: invalid alignedLength=${t} (expected multiple of 256)`);if(n+t>a.length)throw Error(`FastPFOR decode: output buffer too small (outPos=${n}, alignedLength=${t}, out.length=${a.length})`);i=function(e,t,r,i,n,a){let o=i+(n-n%256),s=i,l=r;for(;s!==o;){let r=Math.min(cV,o-s);l=function(e,t,r,i,n,a){let o=0|r,s=0|e[o];if(s<=0||o+s>e.length-1)throw Error(`FastPFOR decode: invalid whereMeta=${s} at pageStart=${o} (expected > 0 and pageStart+whereMeta < encoded.length=${e.length})`);let l=o+s|0,c=e[l]>>>0,u=c+3>>>2,h=l+1,d=h+u;if(d>=e.length)throw Error(`FastPFOR decode: invalid byteSize=${c} (metaInts=${u}, pageStart=${o}, packedEnd=${l}, byteContainerStart=${h}) causes bitmapPos=${d} out of bounds (encoded.length=${e.length})`);let f=function(e,t,r,i){i.byteContainer.length>>2;if(3&n.byteOffset)for(let r=0;r>>8&255,n[a+2|0]=i>>>16&255,n[a+3|0]=i>>>24&255}else{let r=i.byteContainerI32;(!r||r.buffer!==n.buffer||r.byteOffset!==n.byteOffset||r.length>>2)),r.set(e.subarray(t,t+a))}let o=3&r;if(o>0){let r=0|e[t+a|0],i=a<<2;for(let e=0;e>>(e<<3)&255}return n}(e,h,c,a),p=function(e,t,r){let i=0|e[t++],n=r.dataToBePacked;for(let o=2;o<=32;o=o+1|0){var a;if(!(i>>>o-1&1))continue;if(t>=e.length)throw Error(`FastPFOR decode: truncated exception stream header (bitWidth=${o}, streamWordIndex=${t}, needWords=1, availableWords=${e.length-t}, encodedWords=${e.length})`);let s=e[t++]>>>0,l=(a=s+31)-a%32,c=s*o+31>>>5;if(t+c>e.length)throw Error(`FastPFOR decode: truncated exception stream (bitWidth=${o}, size=${s}, streamWordIndex=${t}, needWords=${c}, availableWords=${e.length-t}, encodedWords=${e.length})`);let u=n[o];(!u||u.length>>0,s=e[t+1]>>>0,r[a++]=o>>>0&3,r[a++]=o>>>2&3,r[a++]=o>>>4&3,r[a++]=o>>>6&3,r[a++]=o>>>8&3,r[a++]=o>>>10&3,r[a++]=o>>>12&3,r[a++]=o>>>14&3,r[a++]=o>>>16&3,r[a++]=o>>>18&3,r[a++]=o>>>20&3,r[a++]=o>>>22&3,r[a++]=o>>>24&3,r[a++]=o>>>26&3,r[a++]=o>>>28&3,r[a++]=o>>>30&3,r[a++]=s>>>0&3,r[a++]=s>>>2&3,r[a++]=s>>>4&3,r[a++]=s>>>6&3,r[a++]=s>>>8&3,r[a++]=s>>>10&3,r[a++]=s>>>12&3,r[a++]=s>>>14&3,r[a++]=s>>>16&3,r[a++]=s>>>18&3,r[a++]=s>>>20&3,r[a++]=s>>>22&3,r[a++]=s>>>24&3,r[a++]=s>>>26&3,r[a++]=s>>>28&3,r[a]=s>>>30&3;case 3:let l,c,u,h;return l=i,c=e[t]>>>0,u=e[t+1]>>>0,h=e[t+2]>>>0,r[l++]=c>>>0&7,r[l++]=c>>>3&7,r[l++]=c>>>6&7,r[l++]=c>>>9&7,r[l++]=c>>>12&7,r[l++]=c>>>15&7,r[l++]=c>>>18&7,r[l++]=c>>>21&7,r[l++]=c>>>24&7,r[l++]=c>>>27&7,r[l++]=7&(c>>>30|(1&u)<<2),r[l++]=u>>>1&7,r[l++]=u>>>4&7,r[l++]=u>>>7&7,r[l++]=u>>>10&7,r[l++]=u>>>13&7,r[l++]=u>>>16&7,r[l++]=u>>>19&7,r[l++]=u>>>22&7,r[l++]=u>>>25&7,r[l++]=u>>>28&7,r[l++]=7&(u>>>31|(3&h)<<1),r[l++]=h>>>2&7,r[l++]=h>>>5&7,r[l++]=h>>>8&7,r[l++]=h>>>11&7,r[l++]=h>>>14&7,r[l++]=h>>>17&7,r[l++]=h>>>20&7,r[l++]=h>>>23&7,r[l++]=h>>>26&7,r[l]=h>>>29&7;case 4:let d,f,p,m,g;return d=i,f=e[t]>>>0,p=e[t+1]>>>0,m=e[t+2]>>>0,g=e[t+3]>>>0,r[d++]=f>>>0&15,r[d++]=f>>>4&15,r[d++]=f>>>8&15,r[d++]=f>>>12&15,r[d++]=f>>>16&15,r[d++]=f>>>20&15,r[d++]=f>>>24&15,r[d++]=f>>>28&15,r[d++]=p>>>0&15,r[d++]=p>>>4&15,r[d++]=p>>>8&15,r[d++]=p>>>12&15,r[d++]=p>>>16&15,r[d++]=p>>>20&15,r[d++]=p>>>24&15,r[d++]=p>>>28&15,r[d++]=m>>>0&15,r[d++]=m>>>4&15,r[d++]=m>>>8&15,r[d++]=m>>>12&15,r[d++]=m>>>16&15,r[d++]=m>>>20&15,r[d++]=m>>>24&15,r[d++]=m>>>28&15,r[d++]=g>>>0&15,r[d++]=g>>>4&15,r[d++]=g>>>8&15,r[d++]=g>>>12&15,r[d++]=g>>>16&15,r[d++]=g>>>20&15,r[d++]=g>>>24&15,r[d]=g>>>28&15;case 5:let y,v,x,b,_,w;return y=i,v=e[t]>>>0,x=e[t+1]>>>0,b=e[t+2]>>>0,_=e[t+3]>>>0,w=e[t+4]>>>0,r[y++]=v>>>0&31,r[y++]=v>>>5&31,r[y++]=v>>>10&31,r[y++]=v>>>15&31,r[y++]=v>>>20&31,r[y++]=v>>>25&31,r[y++]=31&(v>>>30|(7&x)<<2),r[y++]=x>>>3&31,r[y++]=x>>>8&31,r[y++]=x>>>13&31,r[y++]=x>>>18&31,r[y++]=x>>>23&31,r[y++]=31&(x>>>28|(1&b)<<4),r[y++]=b>>>1&31,r[y++]=b>>>6&31,r[y++]=b>>>11&31,r[y++]=b>>>16&31,r[y++]=b>>>21&31,r[y++]=b>>>26&31,r[y++]=31&(b>>>31|(15&_)<<1),r[y++]=_>>>4&31,r[y++]=_>>>9&31,r[y++]=_>>>14&31,r[y++]=_>>>19&31,r[y++]=_>>>24&31,r[y++]=31&(_>>>29|(3&w)<<3),r[y++]=w>>>2&31,r[y++]=w>>>7&31,r[y++]=w>>>12&31,r[y++]=w>>>17&31,r[y++]=w>>>22&31,r[y]=w>>>27&31;case 6:let T,M,k,A,S,E,C;return T=i,M=e[t]>>>0,k=e[t+1]>>>0,A=e[t+2]>>>0,S=e[t+3]>>>0,E=e[t+4]>>>0,C=e[t+5]>>>0,r[T++]=M>>>0&63,r[T++]=M>>>6&63,r[T++]=M>>>12&63,r[T++]=M>>>18&63,r[T++]=M>>>24&63,r[T++]=63&(M>>>30|(15&k)<<2),r[T++]=k>>>4&63,r[T++]=k>>>10&63,r[T++]=k>>>16&63,r[T++]=k>>>22&63,r[T++]=63&(k>>>28|(3&A)<<4),r[T++]=A>>>2&63,r[T++]=A>>>8&63,r[T++]=A>>>14&63,r[T++]=A>>>20&63,r[T++]=A>>>26&63,r[T++]=S>>>0&63,r[T++]=S>>>6&63,r[T++]=S>>>12&63,r[T++]=S>>>18&63,r[T++]=S>>>24&63,r[T++]=63&(S>>>30|(15&E)<<2),r[T++]=E>>>4&63,r[T++]=E>>>10&63,r[T++]=E>>>16&63,r[T++]=E>>>22&63,r[T++]=63&(E>>>28|(3&C)<<4),r[T++]=C>>>2&63,r[T++]=C>>>8&63,r[T++]=C>>>14&63,r[T++]=C>>>20&63,r[T]=C>>>26&63;case 7:let L,P,I,z,D,O,R,F;return L=i,P=e[t]>>>0,I=e[t+1]>>>0,z=e[t+2]>>>0,D=e[t+3]>>>0,O=e[t+4]>>>0,R=e[t+5]>>>0,F=e[t+6]>>>0,r[L++]=P>>>0&127,r[L++]=P>>>7&127,r[L++]=P>>>14&127,r[L++]=P>>>21&127,r[L++]=127&(P>>>28|(7&I)<<4),r[L++]=I>>>3&127,r[L++]=I>>>10&127,r[L++]=I>>>17&127,r[L++]=I>>>24&127,r[L++]=127&(I>>>31|(63&z)<<1),r[L++]=z>>>6&127,r[L++]=z>>>13&127,r[L++]=z>>>20&127,r[L++]=127&(z>>>27|(3&D)<<5),r[L++]=D>>>2&127,r[L++]=D>>>9&127,r[L++]=D>>>16&127,r[L++]=D>>>23&127,r[L++]=127&(D>>>30|(31&O)<<2),r[L++]=O>>>5&127,r[L++]=O>>>12&127,r[L++]=O>>>19&127,r[L++]=127&(O>>>26|(1&R)<<6),r[L++]=R>>>1&127,r[L++]=R>>>8&127,r[L++]=R>>>15&127,r[L++]=R>>>22&127,r[L++]=127&(R>>>29|(15&F)<<3),r[L++]=F>>>4&127,r[L++]=F>>>11&127,r[L++]=F>>>18&127,r[L]=F>>>25&127;case 8:let j,B,N,U,V,q,H,G,W;return j=i,B=e[t]>>>0,N=e[t+1]>>>0,U=e[t+2]>>>0,V=e[t+3]>>>0,q=e[t+4]>>>0,H=e[t+5]>>>0,G=e[t+6]>>>0,W=e[t+7]>>>0,r[j++]=B>>>0&255,r[j++]=B>>>8&255,r[j++]=B>>>16&255,r[j++]=B>>>24&255,r[j++]=N>>>0&255,r[j++]=N>>>8&255,r[j++]=N>>>16&255,r[j++]=N>>>24&255,r[j++]=U>>>0&255,r[j++]=U>>>8&255,r[j++]=U>>>16&255,r[j++]=U>>>24&255,r[j++]=V>>>0&255,r[j++]=V>>>8&255,r[j++]=V>>>16&255,r[j++]=V>>>24&255,r[j++]=q>>>0&255,r[j++]=q>>>8&255,r[j++]=q>>>16&255,r[j++]=q>>>24&255,r[j++]=H>>>0&255,r[j++]=H>>>8&255,r[j++]=H>>>16&255,r[j++]=H>>>24&255,r[j++]=G>>>0&255,r[j++]=G>>>8&255,r[j++]=G>>>16&255,r[j++]=G>>>24&255,r[j++]=W>>>0&255,r[j++]=W>>>8&255,r[j++]=W>>>16&255,r[j]=W>>>24&255;case 9:let Y,Z,$,X,K,J,Q,ee,et,er;return Y=i,Z=e[t]>>>0,$=e[t+1]>>>0,X=e[t+2]>>>0,K=e[t+3]>>>0,J=e[t+4]>>>0,Q=e[t+5]>>>0,ee=e[t+6]>>>0,et=e[t+7]>>>0,er=e[t+8]>>>0,r[Y++]=Z>>>0&511,r[Y++]=Z>>>9&511,r[Y++]=Z>>>18&511,r[Y++]=511&(Z>>>27|(15&$)<<5),r[Y++]=$>>>4&511,r[Y++]=$>>>13&511,r[Y++]=$>>>22&511,r[Y++]=511&($>>>31|(255&X)<<1),r[Y++]=X>>>8&511,r[Y++]=X>>>17&511,r[Y++]=511&(X>>>26|(7&K)<<6),r[Y++]=K>>>3&511,r[Y++]=K>>>12&511,r[Y++]=K>>>21&511,r[Y++]=511&(K>>>30|(127&J)<<2),r[Y++]=J>>>7&511,r[Y++]=J>>>16&511,r[Y++]=511&(J>>>25|(3&Q)<<7),r[Y++]=Q>>>2&511,r[Y++]=Q>>>11&511,r[Y++]=Q>>>20&511,r[Y++]=511&(Q>>>29|(63&ee)<<3),r[Y++]=ee>>>6&511,r[Y++]=ee>>>15&511,r[Y++]=511&(ee>>>24|(1&et)<<8),r[Y++]=et>>>1&511,r[Y++]=et>>>10&511,r[Y++]=et>>>19&511,r[Y++]=511&(et>>>28|(31&er)<<4),r[Y++]=er>>>5&511,r[Y++]=er>>>14&511,r[Y]=er>>>23&511;case 10:let ei,en,ea,eo,es,el,ec,eu,eh,ed,ef;return ei=i,en=e[t]>>>0,ea=e[t+1]>>>0,eo=e[t+2]>>>0,es=e[t+3]>>>0,el=e[t+4]>>>0,ec=e[t+5]>>>0,eu=e[t+6]>>>0,eh=e[t+7]>>>0,ed=e[t+8]>>>0,ef=e[t+9]>>>0,r[ei++]=en>>>0&1023,r[ei++]=en>>>10&1023,r[ei++]=en>>>20&1023,r[ei++]=1023&(en>>>30|(255&ea)<<2),r[ei++]=ea>>>8&1023,r[ei++]=ea>>>18&1023,r[ei++]=1023&(ea>>>28|(63&eo)<<4),r[ei++]=eo>>>6&1023,r[ei++]=eo>>>16&1023,r[ei++]=1023&(eo>>>26|(15&es)<<6),r[ei++]=es>>>4&1023,r[ei++]=es>>>14&1023,r[ei++]=1023&(es>>>24|(3&el)<<8),r[ei++]=el>>>2&1023,r[ei++]=el>>>12&1023,r[ei++]=el>>>22&1023,r[ei++]=ec>>>0&1023,r[ei++]=ec>>>10&1023,r[ei++]=ec>>>20&1023,r[ei++]=1023&(ec>>>30|(255&eu)<<2),r[ei++]=eu>>>8&1023,r[ei++]=eu>>>18&1023,r[ei++]=1023&(eu>>>28|(63&eh)<<4),r[ei++]=eh>>>6&1023,r[ei++]=eh>>>16&1023,r[ei++]=1023&(eh>>>26|(15&ed)<<6),r[ei++]=ed>>>4&1023,r[ei++]=ed>>>14&1023,r[ei++]=1023&(ed>>>24|(3&ef)<<8),r[ei++]=ef>>>2&1023,r[ei++]=ef>>>12&1023,r[ei]=ef>>>22&1023;case 11:let ep,em,eg,ey,ev,ex,eb,e_,ew,eT,eM,ek;return ep=i,em=e[t]>>>0,eg=e[t+1]>>>0,ey=e[t+2]>>>0,ev=e[t+3]>>>0,ex=e[t+4]>>>0,eb=e[t+5]>>>0,e_=e[t+6]>>>0,ew=e[t+7]>>>0,eT=e[t+8]>>>0,eM=e[t+9]>>>0,ek=e[t+10]>>>0,r[ep++]=em>>>0&2047,r[ep++]=em>>>11&2047,r[ep++]=2047&(em>>>22|(1&eg)<<10),r[ep++]=eg>>>1&2047,r[ep++]=eg>>>12&2047,r[ep++]=2047&(eg>>>23|(3&ey)<<9),r[ep++]=ey>>>2&2047,r[ep++]=ey>>>13&2047,r[ep++]=2047&(ey>>>24|(7&ev)<<8),r[ep++]=ev>>>3&2047,r[ep++]=ev>>>14&2047,r[ep++]=2047&(ev>>>25|(15&ex)<<7),r[ep++]=ex>>>4&2047,r[ep++]=ex>>>15&2047,r[ep++]=2047&(ex>>>26|(31&eb)<<6),r[ep++]=eb>>>5&2047,r[ep++]=eb>>>16&2047,r[ep++]=2047&(eb>>>27|(63&e_)<<5),r[ep++]=e_>>>6&2047,r[ep++]=e_>>>17&2047,r[ep++]=2047&(e_>>>28|(127&ew)<<4),r[ep++]=ew>>>7&2047,r[ep++]=ew>>>18&2047,r[ep++]=2047&(ew>>>29|(255&eT)<<3),r[ep++]=eT>>>8&2047,r[ep++]=eT>>>19&2047,r[ep++]=2047&(eT>>>30|(511&eM)<<2),r[ep++]=eM>>>9&2047,r[ep++]=eM>>>20&2047,r[ep++]=2047&(eM>>>31|(1023&ek)<<1),r[ep++]=ek>>>10&2047,r[ep]=ek>>>21&2047;case 12:let eA,eS,eE,eC,eL,eP,eI,ez,eD,eO,eR,eF,ej;return eA=i,eS=e[t]>>>0,eE=e[t+1]>>>0,eC=e[t+2]>>>0,eL=e[t+3]>>>0,eP=e[t+4]>>>0,eI=e[t+5]>>>0,ez=e[t+6]>>>0,eD=e[t+7]>>>0,eO=e[t+8]>>>0,eR=e[t+9]>>>0,eF=e[t+10]>>>0,ej=e[t+11]>>>0,r[eA++]=eS>>>0&4095,r[eA++]=eS>>>12&4095,r[eA++]=4095&(eS>>>24|(15&eE)<<8),r[eA++]=eE>>>4&4095,r[eA++]=eE>>>16&4095,r[eA++]=4095&(eE>>>28|(255&eC)<<4),r[eA++]=eC>>>8&4095,r[eA++]=eC>>>20&4095,r[eA++]=eL>>>0&4095,r[eA++]=eL>>>12&4095,r[eA++]=4095&(eL>>>24|(15&eP)<<8),r[eA++]=eP>>>4&4095,r[eA++]=eP>>>16&4095,r[eA++]=4095&(eP>>>28|(255&eI)<<4),r[eA++]=eI>>>8&4095,r[eA++]=eI>>>20&4095,r[eA++]=ez>>>0&4095,r[eA++]=ez>>>12&4095,r[eA++]=4095&(ez>>>24|(15&eD)<<8),r[eA++]=eD>>>4&4095,r[eA++]=eD>>>16&4095,r[eA++]=4095&(eD>>>28|(255&eO)<<4),r[eA++]=eO>>>8&4095,r[eA++]=eO>>>20&4095,r[eA++]=eR>>>0&4095,r[eA++]=eR>>>12&4095,r[eA++]=4095&(eR>>>24|(15&eF)<<8),r[eA++]=eF>>>4&4095,r[eA++]=eF>>>16&4095,r[eA++]=4095&(eF>>>28|(255&ej)<<4),r[eA++]=ej>>>8&4095,r[eA]=ej>>>20&4095;case 16:let eB,eN,eU,eV,eq,eH,eG,eW,eY,eZ,e$,eX,eK,eJ,eQ,e0,e1;return eB=i,eN=e[t]>>>0,eU=e[t+1]>>>0,eV=e[t+2]>>>0,eq=e[t+3]>>>0,eH=e[t+4]>>>0,eG=e[t+5]>>>0,eW=e[t+6]>>>0,eY=e[t+7]>>>0,eZ=e[t+8]>>>0,e$=e[t+9]>>>0,eX=e[t+10]>>>0,eK=e[t+11]>>>0,eJ=e[t+12]>>>0,eQ=e[t+13]>>>0,e0=e[t+14]>>>0,e1=e[t+15]>>>0,r[eB++]=eN>>>0&65535,r[eB++]=eN>>>16&65535,r[eB++]=eU>>>0&65535,r[eB++]=eU>>>16&65535,r[eB++]=eV>>>0&65535,r[eB++]=eV>>>16&65535,r[eB++]=eq>>>0&65535,r[eB++]=eq>>>16&65535,r[eB++]=eH>>>0&65535,r[eB++]=eH>>>16&65535,r[eB++]=eG>>>0&65535,r[eB++]=eG>>>16&65535,r[eB++]=eW>>>0&65535,r[eB++]=eW>>>16&65535,r[eB++]=eY>>>0&65535,r[eB++]=eY>>>16&65535,r[eB++]=eZ>>>0&65535,r[eB++]=eZ>>>16&65535,r[eB++]=e$>>>0&65535,r[eB++]=e$>>>16&65535,r[eB++]=eX>>>0&65535,r[eB++]=eX>>>16&65535,r[eB++]=eK>>>0&65535,r[eB++]=eK>>>16&65535,r[eB++]=eJ>>>0&65535,r[eB++]=eJ>>>16&65535,r[eB++]=eQ>>>0&65535,r[eB++]=eQ>>>16&65535,r[eB++]=e0>>>0&65535,r[eB++]=e0>>>16&65535,r[eB++]=e1>>>0&65535,r[eB]=e1>>>16&65535;case 32:for(let n=0;n<32;n=n+1|0)r[i+n|0]=0|e[t+n|0];return}let e2=cU[n]>>>0,e3=t,e5=0,e4=e[e3]>>>0;for(let t=0;t<32;t++)if(e5+n<=32)r[i+t]=e4>>>e5&e2,32===(e5+=n)&&(e5=0,e3++,31!==t&&(e4=e[e3]>>>0));else{let a=32-e5,o=e4>>>e5;e4=e[++e3]>>>0,r[i+t]=(o|(e4&cU[n-a]>>>0)<>>5)|0,r.exceptionSizes[o]=s}return t}(e,d,a);return a.dataPointers.fill(0),function(e,t,r,i,n,a,o,s,l,c){let u=0|r,h=0;for(let t=0;tt)throw Error(`FastPFOR decode: byteContainer underflow at block=${i} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${r}, byteSize=${t})`);let n=e[r++],a=e[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}}(s,l,h,t);h=r.bytePosIn;let i=r.bitWidth,o=r.exceptionCount,d=a+256*t|0;switch(i){case 0:n.fill(0,d,d+256);break;case 32:for(let t=0;t<256;t=t+1|0)n[d+t|0]=0|e[u+t|0];u=u+256|0;break;default:u=function(e,t,r,i,n){switch(n){case 1:let a=i,o=t;for(let t=0;t<8;t++){let t=e[o++]>>>0;r[a++]=t>>>0&1,r[a++]=t>>>1&1,r[a++]=t>>>2&1,r[a++]=t>>>3&1,r[a++]=t>>>4&1,r[a++]=t>>>5&1,r[a++]=t>>>6&1,r[a++]=t>>>7&1,r[a++]=t>>>8&1,r[a++]=t>>>9&1,r[a++]=t>>>10&1,r[a++]=t>>>11&1,r[a++]=t>>>12&1,r[a++]=t>>>13&1,r[a++]=t>>>14&1,r[a++]=t>>>15&1,r[a++]=t>>>16&1,r[a++]=t>>>17&1,r[a++]=t>>>18&1,r[a++]=t>>>19&1,r[a++]=t>>>20&1,r[a++]=t>>>21&1,r[a++]=t>>>22&1,r[a++]=t>>>23&1,r[a++]=t>>>24&1,r[a++]=t>>>25&1,r[a++]=t>>>26&1,r[a++]=t>>>27&1,r[a++]=t>>>28&1,r[a++]=t>>>29&1,r[a++]=t>>>30&1,r[a++]=t>>>31&1}break;case 2:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0;r[n++]=t>>>0&3,r[n++]=t>>>2&3,r[n++]=t>>>4&3,r[n++]=t>>>6&3,r[n++]=t>>>8&3,r[n++]=t>>>10&3,r[n++]=t>>>12&3,r[n++]=t>>>14&3,r[n++]=t>>>16&3,r[n++]=t>>>18&3,r[n++]=t>>>20&3,r[n++]=t>>>22&3,r[n++]=t>>>24&3,r[n++]=t>>>26&3,r[n++]=t>>>28&3,r[n++]=t>>>30&3,r[n++]=i>>>0&3,r[n++]=i>>>2&3,r[n++]=i>>>4&3,r[n++]=i>>>6&3,r[n++]=i>>>8&3,r[n++]=i>>>10&3,r[n++]=i>>>12&3,r[n++]=i>>>14&3,r[n++]=i>>>16&3,r[n++]=i>>>18&3,r[n++]=i>>>20&3,r[n++]=i>>>22&3,r[n++]=i>>>24&3,r[n++]=i>>>26&3,r[n++]=i>>>28&3,r[n++]=i>>>30&3}}(e,t,r,i);break;case 3:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0;r[n++]=t>>>0&7,r[n++]=t>>>3&7,r[n++]=t>>>6&7,r[n++]=t>>>9&7,r[n++]=t>>>12&7,r[n++]=t>>>15&7,r[n++]=t>>>18&7,r[n++]=t>>>21&7,r[n++]=t>>>24&7,r[n++]=t>>>27&7,r[n++]=7&(t>>>30|(1&i)<<2),r[n++]=i>>>1&7,r[n++]=i>>>4&7,r[n++]=i>>>7&7,r[n++]=i>>>10&7,r[n++]=i>>>13&7,r[n++]=i>>>16&7,r[n++]=i>>>19&7,r[n++]=i>>>22&7,r[n++]=i>>>25&7,r[n++]=i>>>28&7,r[n++]=7&(i>>>31|(3&o)<<1),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}}(e,t,r,i);break;case 4:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0;r[n++]=t>>>0&15,r[n++]=t>>>4&15,r[n++]=t>>>8&15,r[n++]=t>>>12&15,r[n++]=t>>>16&15,r[n++]=t>>>20&15,r[n++]=t>>>24&15,r[n++]=t>>>28&15,r[n++]=i>>>0&15,r[n++]=i>>>4&15,r[n++]=i>>>8&15,r[n++]=i>>>12&15,r[n++]=i>>>16&15,r[n++]=i>>>20&15,r[n++]=i>>>24&15,r[n++]=i>>>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++]=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}}(e,t,r,i);break;case 5:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0,l=e[a++]>>>0;r[n++]=t>>>0&31,r[n++]=t>>>5&31,r[n++]=t>>>10&31,r[n++]=t>>>15&31,r[n++]=t>>>20&31,r[n++]=t>>>25&31,r[n++]=31&(t>>>30|(7&i)<<2),r[n++]=i>>>3&31,r[n++]=i>>>8&31,r[n++]=i>>>13&31,r[n++]=i>>>18&31,r[n++]=i>>>23&31,r[n++]=31&(i>>>28|(1&o)<<4),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++]=31&(o>>>31|(15&s)<<1),r[n++]=s>>>4&31,r[n++]=s>>>9&31,r[n++]=s>>>14&31,r[n++]=s>>>19&31,r[n++]=s>>>24&31,r[n++]=31&(s>>>29|(3&l)<<3),r[n++]=l>>>2&31,r[n++]=l>>>7&31,r[n++]=l>>>12&31,r[n++]=l>>>17&31,r[n++]=l>>>22&31,r[n++]=l>>>27&31}}(e,t,r,i);break;case 6:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0,l=e[a++]>>>0,c=e[a++]>>>0;r[n++]=t>>>0&63,r[n++]=t>>>6&63,r[n++]=t>>>12&63,r[n++]=t>>>18&63,r[n++]=t>>>24&63,r[n++]=63&(t>>>30|(15&i)<<2),r[n++]=i>>>4&63,r[n++]=i>>>10&63,r[n++]=i>>>16&63,r[n++]=i>>>22&63,r[n++]=63&(i>>>28|(3&o)<<4),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++]=s>>>0&63,r[n++]=s>>>6&63,r[n++]=s>>>12&63,r[n++]=s>>>18&63,r[n++]=s>>>24&63,r[n++]=63&(s>>>30|(15&l)<<2),r[n++]=l>>>4&63,r[n++]=l>>>10&63,r[n++]=l>>>16&63,r[n++]=l>>>22&63,r[n++]=63&(l>>>28|(3&c)<<4),r[n++]=c>>>2&63,r[n++]=c>>>8&63,r[n++]=c>>>14&63,r[n++]=c>>>20&63,r[n++]=c>>>26&63}}(e,t,r,i);break;case 7:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0,l=e[a++]>>>0,c=e[a++]>>>0,u=e[a++]>>>0;r[n++]=t>>>0&127,r[n++]=t>>>7&127,r[n++]=t>>>14&127,r[n++]=t>>>21&127,r[n++]=127&(t>>>28|(7&i)<<4),r[n++]=i>>>3&127,r[n++]=i>>>10&127,r[n++]=i>>>17&127,r[n++]=i>>>24&127,r[n++]=127&(i>>>31|(63&o)<<1),r[n++]=o>>>6&127,r[n++]=o>>>13&127,r[n++]=o>>>20&127,r[n++]=127&(o>>>27|(3&s)<<5),r[n++]=s>>>2&127,r[n++]=s>>>9&127,r[n++]=s>>>16&127,r[n++]=s>>>23&127,r[n++]=127&(s>>>30|(31&l)<<2),r[n++]=l>>>5&127,r[n++]=l>>>12&127,r[n++]=l>>>19&127,r[n++]=127&(l>>>26|(1&c)<<6),r[n++]=c>>>1&127,r[n++]=c>>>8&127,r[n++]=c>>>15&127,r[n++]=c>>>22&127,r[n++]=127&(c>>>29|(15&u)<<3),r[n++]=u>>>4&127,r[n++]=u>>>11&127,r[n++]=u>>>18&127,r[n++]=u>>>25&127}}(e,t,r,i);break;case 8:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0,l=e[a++]>>>0,c=e[a++]>>>0,u=e[a++]>>>0,h=e[a++]>>>0;r[n++]=t>>>0&255,r[n++]=t>>>8&255,r[n++]=t>>>16&255,r[n++]=t>>>24&255,r[n++]=i>>>0&255,r[n++]=i>>>8&255,r[n++]=i>>>16&255,r[n++]=i>>>24&255,r[n++]=o>>>0&255,r[n++]=o>>>8&255,r[n++]=o>>>16&255,r[n++]=o>>>24&255,r[n++]=s>>>0&255,r[n++]=s>>>8&255,r[n++]=s>>>16&255,r[n++]=s>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>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}}(e,t,r,i);break;case 16:let s=i,l=t;for(let t=0;t<128;t++){let t=e[l++]>>>0;r[s++]=65535&t,r[s++]=t>>>16&65535}break;default:!function(e,t,r,i,n){let a=cU[n]>>>0,o=t,s=0,l=e[o]>>>0,c=i;for(let t=0;t<8;t++){for(let t=0;t<32;t++)if(s+n<=32)r[c+t]=l>>>s&a,32===(s+=n)&&(s=0,o++,31!==t&&(l=e[o]>>>0));else{let i=32-s,u=l>>>s;l=e[++o]>>>0;let h=n-i;r[c+t]=(u|(l&-1>>>32-h>>>0)<>>0)}}(e,t,r,i,n)}return t+(n<<3)|0}(e,u,n,d,i)}o>0&&(h=function(e,t,r,i,n,a,o,s,l){let{maxBits:c,exceptionBitWidth:u,bytePosIn:h}=function(e,t,r,i,n,a){if(r+1>t)throw Error(`FastPFOR decode: exception header underflow at block=${a} (need 1 byte for maxBits, bytePos=${r}, byteSize=${t})`);let o=e[r++];if(o32)throw Error(`FastPFOR decode: invalid maxBits=${o} at block=${a} (bitWidth=${i}, expected ${i}..32)`);let s=o-i|0;if(s<1||s>32)throw Error(`FastPFOR decode: invalid exceptionBitWidth=${s} at block=${a} (bitWidth=${i}, maxBits=${o})`);if(r+n>t)throw Error(`FastPFOR decode: exception positions underflow at block=${a} (need=${n}, have=${t-r})`);return{maxBits:o,exceptionBitWidth:s,bytePosIn:r}}(n,a,o,r,i,l);if(o=h,1===u){let a=1<m)throw Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${u} (ptr=${p}, need ${i}, size=${m}) at block ${l}`);for(let a=0;a>>o&255;if(o+=8,s+=o>>>5,o&=31,h|=(127&t)<28)throw Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${d}, partial=${h}, decoded=${c-n}/${a}, inPos=${s}, inEnd=${l})`)}if(c!==u)throw Error(`FastPFOR VByte: truncated stream (decoded=${c-n}, expected=${a}, consumedWords=${s-t}/${r}, vbyteStart=${t}, vbyteEnd=${l})`)}(e,i,e.length-i|0,a,n,t-n|0),a}(s.subarray(0,o),t,n.decoderWorkspace);return i.add(r),l}(e,n,a=r.byteLength,t,function(e=16){if(e<0)throw RangeError(`initialEncodedWordCapacity must be >= 0, got ${e}`);return{encodedWords:new Uint32Array(Math.max(16,0|e)),decoderWorkspace:cH()}}(a>>>2));case j.VARINT:return cG(e,t,r.numValues);case j.NONE:{let i=t.get();return t.add(r.byteLength),new Uint32Array(e.subarray(i,t.get()))}default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function c7(e,t,r){let i=c9(e,t,r);return 1===i.length?i[0]:i[1]}function ue(e,t,r){var i=c9(e,t,r);if(2===i.length){let e=cY(i[1]);return[e,e]}return[cY(i[2]),cY(i[3])]}function ut(e,t,r){var i=cW(e,t,r.numValues);if(2===i.length){let e=cZ(i[1]);return[e,e]}return[cZ(i[2]),cZ(i[3])]}function ur(e,t,r,i){let n;var a=cW(e,t,r.numValues);switch(r.logicalLevelTechnique1){case F.DELTA:n=function(e){let t=new BigUint64Array(e.length);t[0]=BigInt.asUintN(64,cZ(e[0]));for(let r=1;r>1,t)-r}}function ul(e,t){let r=0;for(let i=0;i>i;return r}function uc(e,t,r,i,n,a,o){return e===W.MORTON?function(e,t,r,i,n,a){let o=Array(n?i+1:i);for(let n=0;n[e]),r+=e,i+=e}break;case H.LINESTRING:{let c,y;m?(c=d[i]-d[i-1],i++):c=h[r]-h[r-1],r++,p?(y=uu(g,o,c,!1),o+=2*c):(y=uc(e.vertexBufferType,g,f,s,c,!1,l),s+=c),t[a++]=[y],u&&n++}break;case H.POLYGON:{let c=h[r]-h[r-1];r++;let m=Array(c-1),y,v=d[i]-d[i-1];if(i++,p){y=uu(g,o,v,!0),o+=2*v;for(let e=0;e0&&t.push(t[0]),u.push(t)}e[t]=u,n&&l++}break;case H.MULTIPOLYGON:{let c=n[l]-n[l-1];l++;let u=[];for(let e=0;e0&&t.push(t[0]),u.push(t)}}e[t]=u}}return e}[Symbol.iterator](){return null}}class um extends up{constructor(e,t,r,i,n,a){super(r,i,n,a),this._numGeometries=e,this._geometryType=t}geometryType(e){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}class ug extends up{constructor(e,t,r,i,n){super(t,r,i,n),this._geometryTypes=e}geometryType(e){return this._geometryTypes[e]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function uy(e,t,r){let i=new Uint32Array(e.length+1),n=0;i[0]=n;let a=0;for(let o=0;or?t[a++]:1);return i}function uv(e,t,r,i){let n=new Uint32Array(t[t.length-1]+1),a=0;n[0]=a;let o=1,s=0;for(let l=0;l=o);){let r=e[i.increment()];if(r<=127){let o=r+3,s=e[i.increment()],l=Math.min(a+o,t);n.fill(s,a,l),a=l}else{let o=256-r;for(let r=0;r=12?uT.decode(e.subarray(t,r)):function(e,t,r){let i="",n=t;for(;n239?4:t>223?3:t>191?2:1;if(n+c>r)break;1===c?t<128&&(l=t):2===c?(192&(a=e[n+1]))==128&&(l=(31&t)<<6|63&a)<=127&&(l=null):3===c?(a=e[n+1],o=e[n+2],(192&a)==128&&(192&o)==128&&((l=(15&t)<<12|(63&a)<<6|63&o)<=2047||l>=55296&&l<=57343)&&(l=null)):4===c&&(a=e[n+1],o=e[n+2],s=e[n+3],(192&a)==128&&(192&o)==128&&(192&s)==128&&((l=(15&t)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,c=1):l>65535&&(l-=65536,i+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),i+=String.fromCharCode(l),n+=c}return i}(e,t,r)}class uk extends cI{constructor(e,t,r,i){super(e,r,i),this.offsetBuffer=t}}class uA extends uk{constructor(e,t,r,i){super(e,t,r,i??t.length-1)}getValueFromBuffer(e){return uM(this.dataBuffer,this.offsetBuffer[e],this.offsetBuffer[e+1])}}class uS extends uk{constructor(e,t,r,i,n){super(e,r,i,n??t.length),this.indexBuffer=t,this.indexBuffer=t}getValueFromBuffer(e){let t=this.indexBuffer[e];return uM(this.dataBuffer,this.offsetBuffer[t],this.offsetBuffer[t+1])}}class uE extends uk{constructor(e,t,r,i,n,a,o){super(e,r,i,o),this.indexBuffer=t,this.symbolOffsetBuffer=n,this.symbolTableBuffer=a}getValueFromBuffer(e){null==this.decodedDictionary&&(null==this.symbolLengthBuffer&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=function(e,t,r){let i=[],n=Array(t.length).fill(0);for(let e=1;e>>0,s=n.get()+o;if(s>e.length)throw Error(`Block overruns tile: ${s} > ${e.length}`);if(cG(e,n,1)[0]>>>0!=1){n.set(s);continue}let[l,c]=function(e,t){let r={featureTables:[]},i={};i.name=uI(e,t);let n=cG(e,t,1)[0]>>>0,a=cG(e,t,1)[0]>>>0;i.columns=Array(a);for(let r=0;r>>0,i=uL(r);if(!i)throw Error(`Unsupported column type code ${r}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(r>=10?i.name=uI(e,t):r>=0&&r<=3?i.name="id":4===r&&(i.name="geometry"),30===r){let r=cG(e,t,1)[0]>>>0,n=i.complexType;n.children=Array(r);for(let i=0;i>>0;if(i<10||i>30)throw Error(`Unsupported field type code ${i}. Supported: 10-29(scalars), 30(STRUCT)`);let n=uL(i);if(i>=10&&(n.name=uI(t,r)),30===i){let i=cG(t,r,1)[0]>>>0;n.complexType.children=Array(i);for(let a=0;a>4,n<128||(n=t[r.get()],r.increment(),i|=(127&n)<<3,n<128)||(n=t[r.get()],r.increment(),i|=(127&n)<<10,n<128)||(n=t[r.get()],r.increment(),i|=(127&n)<<17,n<128)||(n=t[r.get()],r.increment(),i|=(127&n)<<24,n<128)||(n=t[r.get()],r.increment(),i|=(1&n)<<31,n<128))return 0x100000000*i+(e>>>0);throw Error("Expected varint not more than 10 bytes")}(r|=(15&(i=e[t.get()]))<<28,e,t))))}(e,t);return i}(e,t,r.numValues);switch(r.logicalLevelTechnique1){case F.DELTA:return r.logicalLevelTechnique2===F.RLE&&(i=cJ(i,r.runs,r.numRleValues)),function(e){e[0]=c$(e[0]);let t=e.length/4*4,r=1;if(t>=4)for(;rObject.assign(Object.assign({},e),{[t.name]:new uD(t)}),{})}}class uR{constructor(e,t){this.feature=e,this.type=e.type,this.properties=e.tags?e.tags:{},this.extent=t,"id"in e&&("string"==typeof e.id?this.id=parseInt(e.id,10):"number"!=typeof e.id||isNaN(e.id)||(this.id=e.id))}loadGeometry(){let e=[];for(let t of 1===this.feature.type?[this.feature.geometry]:this.feature.geometry){let r=[];for(let e of t)r.push(new w(e[0],e[1]));e.push(r)}return e}}let uF="_geojsonTileLayer";function uj(e,t){if(!e.feature)return;let r=e.feature;void 0!==r.id&&t.writeVarintField(1,r.id),t.writeMessage(2,uB,e),t.writeVarintField(3,r.type),t.writeMessage(4,uN,r)}function uB(e,t){var r;for(let i in null==(r=e.feature)?void 0:r.properties){let r=e.feature.properties[i],n=e.keycache[i];if(null==r)continue;void 0===n&&(e.keys.push(i),n=e.keys.length-1,e.keycache[i]=n),t.writeVarint(n),"string"!=typeof r&&"boolean"!=typeof r&&"number"!=typeof r&&(r=e.jsonPrefix+JSON.stringify(r));let a=typeof r+":"+r,o=e.valuecache[a];void 0===o&&(e.values.push(r),o=e.values.length-1,e.valuecache[a]=o),t.writeVarint(o)}}function uN(e,t){let r=e.loadGeometry(),i=e.type,n=0,a=0;for(let o of r){let r=1;1===i&&(r=o.length),t.writeVarint((r<<3)+1);let s=3===i?o.length-1:o.length;for(let e=0;e>31),t.writeVarint(l<<1^l>>31),n+=r,a+=l}3===e.type&&t.writeVarint(15)}}function uU(e,t){let r=typeof e;"string"===r?t.writeStringField(1,e):"boolean"===r?t.writeBooleanField(7,e):"number"===r&&(e%1!=0?t.writeDoubleField(3,e):e<0?t.writeSVarintField(6,e):t.writeVarintField(5,e))}class uV{constructor(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new nw(8192,16,0),this.grid3D=new nw(8192,16,0),this.featureIndexArray=new aj,this.promoteId=t}insert(e,t,r,i,n,a){let o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);let s=a?this.grid3D:this.grid;for(let e of t){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)t[0]=Math.min(t[0],r.x),t[1]=Math.min(t[1],r.y),t[2]=Math.max(t[2],r.x),t[3]=Math.max(t[3],r.y);t[0]<8192&&t[1]<8192&&t[2]>=0&&t[3]>=0&&s.insert(o,t[0],t[1],t[2],t[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers="mlt"!==this.encoding?new sO(new lU(this.rawTileData)).layers:new uO(this.rawTileData).layers,this.sourceLayerCoder=new cL(this.vtLayers?Object.keys(this.vtLayers).sort():[uF])),this.vtLayers}query(e,t,r,i){this.loadVTLayers();let n=e.params,a=8192/e.tileSize/e.scale,o=iV(n.filter,n.globalState),s=e.queryGeometry,l=e.queryPadding*a,c=cC.fromPoints(s),u=this.grid.query(c.minX-l,c.minY-l,c.maxX+l,c.maxY+l),h=cC.fromPoints(e.cameraQueryGeometry).expandBy(l);for(let t of this.grid3D.query(h.minX,h.minY,h.maxX,h.maxY,(t,r,i,n)=>(function(e,t,r,i,n){for(let a of e)if(t<=a.x&&r<=a.y&&i>=a.x&&n>=a.y)return!0;let a=[new w(t,r),new w(t,n),new w(i,n),new w(i,r)];if(e.length>2){for(let t of a)if(oI(e,t))return!0}for(let t=0;tn.x&&t.x>n.x||e.yn.y&&t.y>n.y)return!1;let a=eS(e,t,r[0]);return a!==eS(e,t,r[1])||a!==eS(e,t,r[2])||a!==eS(e,t,r[3])}(e[t],e[t+1],a))return!0;return!1})(e.cameraQueryGeometry,t-l,r-l,i+l,n+l)))u.push(t);u.sort(uH);let d={},f;for(let l of u){if(l===f)continue;f=l;let c=this.featureIndexArray.get(l),u=null;this.loadMatchingFeature(d,c.bucketIndex,c.sourceLayerIndex,c.featureIndex,o,n.layers,n.availableImages,t,r,i,(t,r,i)=>(u||(u=ow(t)),r.queryIntersectsFeature({queryGeometry:s,feature:t,featureState:i,geometry:u,zoom:this.z,transform:e.transform,pixelsToTileUnits:a,pixelPosMatrix:e.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:e.getElevation})))}return d}loadMatchingFeature(e,t,r,i,n,a,o,s,l,c,u){let h=this.bucketLayerIDs[t];if(a&&!h.some(e=>a.has(e)))return;let d=this.sourceLayerCoder.decode(r),f=this.vtLayers[d].feature(i);if(n.needGeometry){let e=oT(f,!0);if(!n.filter(new nN(this.tileID.overscaledZ),e,this.tileID.canonical))return}else if(!n.filter(new nN(this.tileID.overscaledZ),f))return;let p=this.getId(f,d);for(let t of h){if(a&&!a.has(t))continue;let r=s[t];if(!r)continue;let n={};p&&c&&(n=c.getState(r.sourceLayer||uF,p));let h=eb({},l[t]);h.paint=uq(h.paint,r.paint,f,n,o),h.layout=uq(h.layout,r.layout,f,n,o);let d=!u||u(f,r,n);if(!d)continue;let m=new cP(f,this.z,this.x,this.y,p);m.layer=h;let g=e[t];void 0===g&&(g=e[t]=[]),g.push({featureIndex:i,feature:m,intersectionZ:d})}}lookupSymbolFeatures(e,t,r,i,n,a,o,s){let l={};this.loadVTLayers();let c=iV(n.filterSpec,n.globalState);for(let n of e)this.loadMatchingFeature(l,r,i,n,c,a,o,s,t);return l}hasLayer(e){for(let t of this.bucketLayerIDs)for(let r of t)if(e===r)return!0;return!1}getId(e,t){var r;let i=e.id;return this.promoteId&&("boolean"==typeof(i=e.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[t]])&&(i=Number(i)),void 0===i&&null!=(r=e.properties)&&r.cluster&&this.promoteId&&(i=Number(e.properties.cluster_id))),i}}function uq(e,t,r,i,n){return ew(e,(e,a)=>{let o=t instanceof nX?t.get(a):null;return o?.evaluate?o.evaluate(r,i,n):o})}function uH(e,t){return t-e}function uG(e,t,r,i,n){let a=[];for(let o of e){let e;for(let s=0;s=i&&c.x>=i||(l.x>=i?l=new w(i,l.y+(i-l.x)/(c.x-l.x)*(c.y-l.y))._round():c.x>=i&&(c=new w(i,l.y+(i-l.x)/(c.x-l.x)*(c.y-l.y))._round()),l.y>=n&&c.y>=n||(l.y>=n?l=new w(l.x+(n-l.y)/(c.y-l.y)*(c.x-l.x),n)._round():c.y>=n&&(c=new w(l.x+(n-l.y)/(c.y-l.y)*(c.x-l.x),n)._round()),e&&l.equals(e[e.length-1])||(e=[l],a.push(e)),e.push(c)))))}}return a}function uW(e,t,r,i,n){switch(t){case 1:let a=[];for(let t of e)for(let e of t){let t=0===n?e.x:e.y;t>=r&&t<=i&&a.push([e])}return a;case 2:return uY(e,r,i,n,!1);case 3:return uY(e,r,i,n,!0)}return[]}function uY(e,t,r,i,n){let a=[];for(let o of e){let e=function(e,t,r,i,n){let a=0===i?uZ:u$,o=[],s=[];for(let l=0;lt&&o.push(a(c,u,t)):h>r?d=t&&(o.push(a(c,u,t)),f=!0),d>r&&h<=r&&(o.push(a(c,u,r)),f=!0),!n&&f&&(s.push(o),o=[])}let l=e.length-1,c=0===i?e[l].x:e[l].y;return c>=t&&c<=r&&o.push(e[l]),n&&o.length>0&&!o[0].equals(o[o.length-1])&&o.push(new w(o[0].x,o[0].y)),o.length>0&&s.push(o),s}(o,t,r,i,n);e.length>0&&a.push(...e)}return a}function uZ(e,t,r){return new w(r,e.y+(r-e.x)/(t.x-e.x)*(t.y-e.y))}function u$(e,t,r){return new w(e.x+(r-e.y)/(t.y-e.y)*(t.x-e.x),r)}nM("FeatureIndex",uV,{omit:["rawTileData","sourceLayerCoder"]});class uX extends w{constructor(e,t,r,i){super(e,t),this.angle=r,void 0!==i&&(this.segment=i)}clone(){return new uX(this.x,this.y,this.angle,this.segment)}}function uK(e,t,r,i,n){if(void 0===t.segment||0===r)return!0;let a=t,o=t.segment+1,s=0;for(;s>-r/2;){if(--o<0)return!1;s-=e[o].dist(a),a=e[o]}s+=e[o].dist(e[o+1]),o++;let l=[],c=0;for(;si;)c-=l.shift().angleDelta;if(c>n)return!1;o++,s+=t.dist(r)}return!0}function uJ(e){let t=0;for(let r=0;re+t[1]-t[0],f=u.reduce(d,0),p=h.reduce(d,0),m=s-f,g=l-p,y=0,v=f,x=0,b=p,_=0,T=m,M=0,k=g;if(a.content&&i){let t=a.content,r=t[2]-t[0],i=t[3]-t[1];(a.textFitWidth||a.textFitHeight)&&(c=l8(e)),y=u1(u,0,t[0]),x=u1(h,0,t[1]),v=u1(u,t[0],t[2]),b=u1(h,t[1],t[3]),_=t[0]-y,M=t[1]-x,T=r-v,k=i-b}let A=c.x1,S=c.y1,E=c.x2-A,C=c.y2-S,L=(e,i,n,s)=>{var l,c,u,h,d,m,g,L,P,I,z,D,O,R,F,j;let B=(l=e.stretch-y,l/v*E+A),N=(c=e.fixed-_,u=T,h=e.stretch,c-u*h/f),U=(d=i.stretch-x,d/b*C+S),V=(m=i.fixed-M,g=k,L=i.stretch,m-g*L/p),q=(P=n.stretch-y,P/v*E+A),H=(I=n.fixed-_,z=T,D=n.stretch,I-z*D/f),G=(O=s.stretch-x,O/b*C+S),W=(R=s.fixed-M,F=k,j=s.stretch,R-F*j/p),Y=new w(B,U),Z=new w(q,U),$=new w(q,G),X=new w(B,G),K=new w(N/o,V/o),J=new w(H/o,W/o),Q=t*Math.PI/180;if(Q){let e=Math.sin(Q),t=Math.cos(Q),r=[t,-e,e,t];Y._matMult(r),Z._matMult(r),X._matMult(r),$._matMult(r)}let ee=e.stretch+e.fixed,et=i.stretch+i.fixed;return{tl:Y,tr:Z,bl:X,br:$,tex:{x:a.paddedRect.x+1+ee,y:a.paddedRect.y+1+et,w:n.stretch+n.fixed-ee,h:s.stretch+s.fixed-et},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:K,pixelOffsetBR:J,minFontScaleX:T/o/E,minFontScaleY:k/o/C,isSDF:r}};if(i&&(a.stretchX||a.stretchY)){let e=u2(u,m,f),t=u2(h,g,p);for(let r=0;r0&&(i=Math.max(10,i),this.circleDiameter=i)}else{let l=null!=(u=a.image)&&u.content&&(a.image.textFitWidth||a.image.textFitHeight)?l8(a):{x1:a.left,y1:a.top,x2:a.right,y2:a.bottom};l.y1=l.y1*o-s[0],l.y2=l.y2*o+s[2],l.x1=l.x1*o-s[3],l.x2=l.x2*o+s[1];let h=a.collisionPadding;if(h&&(l.x1-=h[0]*o,l.y1-=h[1]*o,l.x2+=h[2]*o,l.y2+=h[3]*o),c){let e=new w(l.x1,l.y1),t=new w(l.x2,l.y1),r=new w(l.x1,l.y2),i=new w(l.x2,l.y2),n=c*Math.PI/180;e._rotate(n),t._rotate(n),r._rotate(n),i._rotate(n),l.x1=Math.min(e.x,t.x,r.x,i.x),l.x2=Math.max(e.x,t.x,r.x,i.x),l.y1=Math.min(e.y,t.y,r.y,i.y),l.y2=Math.max(e.y,t.y,r.y,i.y)}e.emplaceBack(t.x,t.y,l.x1,l.y1,l.x2,l.y2,r,i,n)}this.boxEndIndex=e.length}}class u5{constructor(e=[],t=(e,t)=>et)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,i=t[e];for(;e>0;){let n=e-1>>1,a=t[n];if(r(i,a)>=0)break;t[e]=a,e=n}t[e]=i}_down(e){let{data:t,compare:r}=this,i=this.length>>1,n=t[e];for(;er(t[a],t[i])&&(i=a),r(t[i],n)>=0)break;t[e]=t[i],e=i}t[e]=n}}function u4(e,t){return t.max-e.max}class u6{constructor(e,t,r,i){this.p=new w(e,t),this.h=r,this.d=function(e,t){let r=!1,i=1/0;for(let n of t)for(let t=0,a=n.length,o=a-1;te.y!=s.y>e.y&&e.x<(s.x-a.x)*(e.y-a.y)/(s.y-a.y)+a.x&&(r=!r),i=Math.min(i,oL(e,a,s))}return(r?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}}e.aM=void 0,(Y=e.aM||(e.aM={}))[Y.center=1]="center",Y[Y.left=2]="left",Y[Y.right=3]="right",Y[Y.top=4]="top",Y[Y.bottom=5]="bottom",Y[Y["top-left"]=6]="top-left",Y[Y["top-right"]=7]="top-right",Y[Y["bottom-left"]=8]="bottom-left",Y[Y["bottom-right"]=9]="bottom-right";let u8=1/0;function u9(e,t){return t[1]!==u8?function(e,t,r){let i=0,n=0;switch(t=Math.abs(t),r=Math.abs(r),e){case"top-right":case"top-left":case"top":n=r-7;break;case"bottom-right":case"bottom-left":case"bottom":n=7-r}switch(e){case"top-right":case"bottom-right":case"right":i=-t;break;case"top-left":case"bottom-left":case"left":i=t}return[i,n]}(e,t[0],t[1]):function(e,t){let r=0,i=0;t<0&&(t=0);let n=t/Math.SQRT2;switch(e){case"top-right":case"top-left":i=n-7;break;case"bottom-right":case"bottom-left":i=7-n;break;case"bottom":i=7-t;break;case"top":i=t-7}switch(e){case"top-right":case"bottom-right":r=-n;break;case"top-left":case"bottom-left":r=n;break;case"left":r=t;break;case"right":r=-t}return[r,i]}(e,t[0])}function u7(e,t,r){var i;let n=e.layout,a=null==(i=n.get("text-variable-anchor-offset"))?void 0:i.evaluate(t,{},r);if(a){let e=a.values,t=[];for(let r=0;r24*e);i.startsWith("top")?n[1]-=7:i.startsWith("bottom")&&(n[1]+=7),t[r+1]=n}return new t2(t)}let o=n.get("text-variable-anchor");if(o){let i;i=void 0!==e._unevaluatedLayout.getValue("text-radial-offset")?[24*n.get("text-radial-offset").evaluate(t,{},r),u8]:n.get("text-offset").evaluate(t,{},r).map(e=>24*e);let a=[];for(let e of o)a.push(e,u9(e,i));return new t2(a)}return null}function he(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function ht(e,t,r,i,n,a,o,s,l,c,u,h,d,f,p){let m=function(e,t,r,i,n,a,o){let s=r.layout.get("text-rotate").evaluate(n,{})*Math.PI/180,l=[];for(let r of e.positionedLines)for(let n of r.positionedGlyphs){if(!n.rect)continue;let c=n.rect||{},u=4,h=!0,d=1,f=0,p=(i||o)&&n.vertical,m=n.metrics.advance*n.scale/2;if(o&&e.verticalizable&&(f=r.lineOffset/2-(n.imageName?-(24-n.metrics.width*n.scale)/2:(n.scale-1)*24)),n.imageName){let e=a[n.imageName];h=e.sdf,u=1/(d=e.pixelRatio)}let g=i?[n.x+m,n.y]:[0,0],y=i?[0,0]:[n.x+m+t[0],n.y+t[1]-f],v=[0,0];p&&(v=y,y=[0,0]);let x=n.metrics.isDoubleResolution?2:1,b=(n.metrics.left-u)*n.scale-m+y[0],_=(-n.metrics.top-u)*n.scale+y[1],T=b+c.w/x*n.scale/d,M=_+c.h/x*n.scale/d,k=new w(b,_),A=new w(T,_),S=new w(b,M),E=new w(T,M);if(p){let e=new w(-m,m- -17),t=-Math.PI/2,r=12-m,i=new w(22-r,-(n.imageName?r:0)),a=new w(...v);k._rotateAround(t,e)._add(i)._add(a),A._rotateAround(t,e)._add(i)._add(a),S._rotateAround(t,e)._add(i)._add(a),E._rotateAround(t,e)._add(i)._add(a)}if(s){let e=Math.sin(s),t=Math.cos(s),r=[t,-e,e,t];k._matMult(r),A._matMult(r),S._matMult(r),E._matMult(r)}let C=new w(0,0),L=new w(0,0);l.push({tl:k,tr:A,bl:S,br:E,tex:c,writingMode:e.writingMode,glyphOffset:g,sectionIndex:n.sectionIndex,isSDF:h,pixelOffsetTL:C,pixelOffsetBR:L,minFontScaleX:0,minFontScaleY:0})}return l}(r,s,n,a,o,i,e.allowVerticalPlacement),g=e.textSizeData,y=null;for(let r of("source"===g.kind?(y=[128*n.layout.get("text-size").evaluate(o,{})])[0]>32640&&eA(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`):"composite"===g.kind&&((y=[128*f.compositeTextSizes[0].evaluate(o,{},p),128*f.compositeTextSizes[1].evaluate(o,{},p)])[0]>32640||y[1]>32640)&&eA(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`),e.addSymbols(e.text,m,y,s,a,o,c,t,l.lineStartIndex,l.lineLength,d,p),u))h[r]=e.text.placedSymbolArray.length-1;return 4*m.length}function hr(e){for(let t in e)return e[t];return null}e.$=eN,e.A=K,e.B=nV,e.C=n_,e.D=nK,e.E=eQ,e.F=nh,e.G=function([e,t,r]){return t+=90,{x:e*Math.cos(t*=Math.PI/180)*Math.sin(r*=Math.PI/180),y:e*Math.sin(t)*Math.sin(r),z:e*Math.cos(r)}},e.H=rb,e.I=l2,e.J=nN,e.K=nv,e.L=function(e){if(null==eC){let t=e.navigator?e.navigator.userAgent:null;eC=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return eC},e.M=eH,e.N=class{constructor(e,t){this.target=e,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new cf(()=>this.process()),this.subscription=ez(this.target,"message",e=>this.receive(e),!1),this.globalScope=eE(self)?e:window}registerMessageHandler(e,t){this.messageHandlers[e]=t}unregisterMessageHandler(e){delete this.messageHandlers[e]}sendAsync(e,t){return new Promise((r,i)=>{let n=Math.round(1e18*Math.random()).toString(36).substring(0,10),a=t?ez(t.signal,"abort",()=>{a?.unsubscribe(),delete this.resolveRejects[n];let t={id:n,type:"",origin:location.origin,targetMapId:e.targetMapId,sourceMapId:this.mapId};this.target.postMessage(t)},cp):null;this.resolveRejects[n]={resolve:e=>{a?.unsubscribe(),r(e)},reject:e=>{a?.unsubscribe(),i(e)}};let o=[],s=Object.assign(Object.assign({},e),{id:n,sourceMapId:this.mapId,origin:location.origin,data:nE(e.data,o)});this.target.postMessage(s,{transfer:o})})}receive(e){let t=e.data,r=t.id,i=["file://","resource://android","null"],n=[t.origin,location.origin],a=t.origin===location.origin,o=n.some(e=>i.includes(e));if((a||o)&&(!t.targetMapId||this.mapId===t.targetMapId)){if(""===t.type){delete this.tasks[r];let e=this.abortControllers[r];return delete this.abortControllers[r],void(e&&e.abort())}if(eE(self)||t.mustQueue)return this.tasks[r]=t,this.taskQueue.push(r),void this.invoker.trigger();this.processTask(r,t)}}process(){if(0===this.taskQueue.length)return;let e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(e,t)}processTask(e,t){return _(this,void 0,void 0,function*(){if(""===t.type){let r=this.resolveRejects[e];return delete this.resolveRejects[e],r?void(t.error?r.reject(ed(nC(t.error))):r.resolve(nC(t.data))):void 0}if(!this.messageHandlers[t.type])return void this.completeTask(e,Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let r=nC(t.data),i=new AbortController;this.abortControllers[e]=i;try{let n=yield this.messageHandlers[t.type](t.sourceMapId,r,i);this.completeTask(e,null,n)}catch(t){this.completeTask(e,ed(t))}})}completeTask(e,t,r){let i=[];delete this.abortControllers[e];let n={id:e,type:"",sourceMapId:this.mapId,origin:location.origin,error:t?nE(t):null,data:nE(r,i)};this.target.postMessage(n,{transfer:i})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.O=function(){var e=new K(16);return K!=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},e.P=w,e.Q=function(e,t,r){var i,n,a,o,s,l,c,u,h,d,f,p,m=r[0],g=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*y+t[12],e[13]=t[1]*m+t[5]*g+t[9]*y+t[13],e[14]=t[2]*m+t[6]*g+t[10]*y+t[14],e[15]=t[3]*m+t[7]*g+t[11]*y+t[15]):(n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=i=t[0],e[1]=n,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=i*m+s*g+h*y+t[12],e[13]=n*m+l*g+d*y+t[13],e[14]=a*m+c*g+f*y+t[14],e[15]=o*m+u*g+p*y+t[15]),e},e.R=oX,e.S=function(e,t,r){var i=r[0],n=r[1],a=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.T=o5,e.U=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],m=t[12],g=t[13],y=t[14],v=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*i+b*s+_*h+w*m,e[1]=x*n+b*l+_*d+w*g,e[2]=x*a+b*c+_*f+w*y,e[3]=x*o+b*u+_*p+w*v,e[4]=(x=r[4])*i+(b=r[5])*s+(_=r[6])*h+(w=r[7])*m,e[5]=x*n+b*l+_*d+w*g,e[6]=x*a+b*c+_*f+w*y,e[7]=x*o+b*u+_*p+w*v,e[8]=(x=r[8])*i+(b=r[9])*s+(_=r[10])*h+(w=r[11])*m,e[9]=x*n+b*l+_*d+w*g,e[10]=x*a+b*c+_*f+w*y,e[11]=x*o+b*u+_*p+w*v,e[12]=(x=r[12])*i+(b=r[13])*s+(_=r[14])*h+(w=r[15])*m,e[13]=x*n+b*l+_*d+w*g,e[14]=x*a+b*c+_*f+w*y,e[15]=x*o+b*u+_*p+w*v,e},e.V=function(e,t){let r={};for(let i of t)i in e&&(r[i]=e[i]);return r},e.W=cm,e.X=ex,e.Y=cx,e.Z=cv,e._=_,e.a=eB,e.a$=function(e){var t=new K(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.a0=$,e.a1=X,e.a2=eI,e.a3=cS,e.a4=cb,e.a5=c_,e.a6=8192,e.a7=cT,e.a8=cC,e.a9=25,e.aA=function(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)},e.aB=function(e){return e[0]=0,e[1]=0,e},e.aC=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e},e.aD=ci,e.aE=eo,e.aF=function(e,t,r,i){let n=t.y-e.y,a=t.x-e.x,o=i.y-r.y,s=i.x-r.x,l=o*a-s*n;if(0===l)return null;let c=(s*(e.y-r.y)-o*(e.x-r.x))/l;return new w(e.x+c*a,e.y+c*n)},e.aG=uG,e.aH=ok,e.aI=function(e){let t=1/0,r=1/0,i=-1/0,n=-1/0;for(let a of e)t=Math.min(t,a.x),r=Math.min(r,a.y),i=Math.max(i,a.x),n=Math.max(n,a.y);return[t,r,i,n]},e.aJ=24,e.aK=eh,e.aL=function(e,t,r,i,n=!1){if(!r[0]&&!r[1])return[0,0];let a=n?"map"===i?-e.bearingInRadians:0:"viewport"===i?e.bearingInRadians:0;if(a){let e=Math.sin(a),t=Math.cos(a);r=[r[0]*t-r[1]*e,r[0]*e+r[1]*t]}return[n?r[0]:eh(t,r[0],e.zoom),n?r[1]:eh(t,r[1],e.zoom)]},e.aN=ce,e.aO=he,e.aP=l4,e.aQ=e=>"symbol"===e.type,e.aR=sG,e.aS=at,e.aT=sv,e.aU=aB,e.aV=a1,e.aW=aJ,e.aX=eO,e.aY=cw,e.aZ=en,e.a_=ei,e.aa=ck,e.ab=e=>{let t=window.document.createElement("video");return t.muted=!0,new Promise(r=>{for(let i of(t.onloadstart=()=>{r(t)},e)){let e=window.document.createElement("source");eZ(i)||(t.crossOrigin="Anonymous"),e.src=i,t.appendChild(e)}})},e.ac=e7,e.ad=function(){return e_++},e.ae=aE,e.af=co,e.ag=uF,e.ah=iV,e.ai=oT,e.aj=cP,e.ak=function(e){let t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(e,r,i,n)=>{let a=i||n;return t[r]=!a||a.toLowerCase(),""}),t["max-age"]){let e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t},e.al=ev,e.am=85.051129,e.an=eD,e.ao=function(e){return Math.pow(2,e)},e.ap=Q,e.aq=function(e,t){return e/cy(t)},e.ar=function(e){return Math.log(e)/Math.LN2},e.as=function(e){var t=e[0],r=e[1];return t*t+r*r},e.at=function(e){if(!e.length)return new Set;let t=Math.max(...e.map(e=>e.canonical.z)),r=1/0,i=-1/0,n=1/0,a=-1/0,o=[];for(let s of e){let{x:e,y:l,z:c}=s.canonical,u=Math.pow(2,t-c),h=e*u,d=l*u;o.push({id:s,x:h,y:d}),hi&&(i=h),da&&(a=d)}let s=new Set;for(let e of o)e.x!==r&&e.x!==i&&e.y!==n&&e.y!==a||s.add(e.id);return s},e.au=function(e,t){let r=Math.abs(2*e.wrap)-(e.wrap<0),i=Math.abs(2*t.wrap)-(t.wrap<0);return e.overscaledZ-t.overscaledZ||i-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x},e.av=class{constructor(e,t){this.max=e,this.onRemove=t,this.reset()}reset(){for(let e in this.data)for(let t of this.data[e])t.timeout&&clearTimeout(t.timeout),this.onRemove(t.value);return this.data={},this.order=[],this}add(e,t,r){let i=e.wrapped().key;void 0===this.data[i]&&(this.data[i]=[]);let n={value:t,timeout:void 0};if(void 0!==r&&(n.timeout=setTimeout(()=>{this.remove(e,n)},r)),this.data[i].push(n),this.order.push(i),this.order.length>this.max){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}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 t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){let t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;let r=e.wrapped().key,i=void 0===t?0:this.data[r].indexOf(t),n=this.data[r][i];return this.data[r].splice(i,1),n.timeout&&clearTimeout(n.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(n.value),this.order.splice(this.order.indexOf(r),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}filter(e){let t=[];for(let r in this.data)for(let i of this.data[r])e(i.value)||t.push(i);for(let e of t)this.remove(e.value.tileID,e)}},e.aw=function(e,t){let r=0,i=0;if("constant"===e.kind)i=e.layoutSize;else if("source"!==e.kind){let{interpolationType:n,minZoom:a,maxZoom:o}=e,s=n?ev(rv.interpolationFactor(n,t,a,o),0,1):0;"camera"===e.kind?i=rb.number(e.minSize,e.maxSize,s):r=s}return{uSizeT:r,uSize:i}},e.ay=function(e,{uSize:t,uSizeT:r},{lowerSize:i,upperSize:n}){return"source"===e.kind?i/128:"composite"===e.kind?rb.number(i/128,n/128,r):t},e.az=ec,e.b=eL,e.b$=ol,e.b0=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e},e.b1=function(e,t){var r=t[0],i=t[1],n=t[2],a=r*r+i*i+n*n;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e},e.b2=ea,e.b3=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},e.b4=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e},e.b5=et,e.b6=function(e,t,r){let i=t[0]*r[0]+t[1]*r[1]+t[2]*r[2];return 0===i?null:(-(e[0]*r[0]+e[1]*r[1]+e[2]*r[2])-r[3])/i},e.b7=et,e.b8=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e},e.b9=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]},e.bA=el,e.bB=function(e,t,r){var i=r[0],n=r[1],a=r[2],o=r[3],s=t[0],l=t[1],c=t[2],u=n*c-a*l,h=a*s-i*c,d=i*l-n*s;return e[0]=s+o*(u+=u)+n*(d+=d)-a*(h+=h),e[1]=l+o*h+a*u-i*d,e[2]=c+o*d+i*h-n*u,e},e.bC=function(e,t,r){var i,n,a,o,s,l,c;let u=(i=[e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2]])[0]*((c=i[8])*(a=i[4])-(o=i[5])*(l=i[7]))+i[1]*(-c*(n=i[3])+o*(s=i[6]))+i[2]*(l*n-a*s);if(0===u)return null;let h=ea([],[t[0],t[1],t[2]],[r[0],r[1],r[2]]),d=ea([],[r[0],r[1],r[2]],[e[0],e[1],e[2]]),f=ea([],[e[0],e[1],e[2]],[t[0],t[1],t[2]]),p=en([],h,-e[3]);return ei(p,p,en([],d,-t[3])),ei(p,p,en([],f,-r[3])),en(p,p,1/u),p},e.bD=6371008.8,e.bE=function(){return new Float64Array(4)},e.bF=function(e,t,r,i){var n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[0]*Math.cos(i)-n[1]*Math.sin(i),a[1]=n[0]*Math.sin(i)+n[1]*Math.cos(i),a[2]=n[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},e.bG=function(e,t,r,i){var n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[0],a[1]=n[1]*Math.cos(i)-n[2]*Math.sin(i),a[2]=n[1]*Math.sin(i)+n[2]*Math.cos(i),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},e.bH=function(e,t,r,i){var n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[2]*Math.sin(i)+n[0]*Math.cos(i),a[1]=n[1],a[2]=n[2]*Math.cos(i)-n[0]*Math.sin(i),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},e.bI=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n-c*i,e[1]=o*n-u*i,e[2]=s*n-h*i,e[3]=l*n-d*i,e[8]=a*i+c*n,e[9]=o*i+u*n,e[10]=s*i+h*n,e[11]=l*i+d*n,e},e.bJ=function(e,t){let r=ef(e,360),i=ef(t,360),n=i-r,a=i>r?n-360:n+360;return Math.abs(n)0?o:-o},e.bM=function(e,t){let r=ef(e,2*Math.PI),i=ef(t,2*Math.PI);return Math.min(Math.abs(r-i),Math.abs(r-i+2*Math.PI),Math.abs(r-i-2*Math.PI))},e.bN=function(){let e={},t=e0.$version;for(let r in e0.$root){let i=e0.$root[r];if(i.required){let n=null;null!=(n="version"===r?t:"array"===i.type?[]:{})&&(e[r]=n)}}return e},e.bO=eW,e.bP=nL,e.bQ=function e(t,r){if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(let i=0;i{e in t&&(r[e]=t[e])}),r}(e[r],t[e[r].ref]));return e},e.bT=function(e,t){if("custom"===e.type)return new cd(e,t);switch(e.type){case"background":return new ch(e,t);case"circle":return new oq(e,t);case"color-relief":return new o8(e,t);case"fill":return new sA(e,t);case"fill-extrusion":return new sU(e,t);case"heatmap":return new o0(e,t);case"hillshade":return new o2(e,t);case"line":return new lS(e,t);case"raster":return new n8(e,t);case"symbol":return new cc(e,t)}},e.bU=e=>"raster"===e.type,e.bV=eM,e.bW=function(e,t){if(!e)return[{command:"setStyle",args:[t]}];let r=[];try{if(!e2(e.version,t.version))return[{command:"setStyle",args:[t]}];e2(e.center,t.center)||r.push({command:"setCenter",args:[t.center]}),e2(e.state,t.state)||r.push({command:"setGlobalState",args:[t.state]}),e2(e.centerAltitude,t.centerAltitude)||r.push({command:"setCenterAltitude",args:[t.centerAltitude]}),e2(e.zoom,t.zoom)||r.push({command:"setZoom",args:[t.zoom]}),e2(e.bearing,t.bearing)||r.push({command:"setBearing",args:[t.bearing]}),e2(e.pitch,t.pitch)||r.push({command:"setPitch",args:[t.pitch]}),e2(e.roll,t.roll)||r.push({command:"setRoll",args:[t.roll]}),e2(e.sprite,t.sprite)||r.push({command:"setSprite",args:[t.sprite]}),e2(e.glyphs,t.glyphs)||r.push({command:"setGlyphs",args:[t.glyphs]}),e2(e.transition,t.transition)||r.push({command:"setTransition",args:[t.transition]}),e2(e.light,t.light)||r.push({command:"setLight",args:[t.light]}),e2(e.terrain,t.terrain)||r.push({command:"setTerrain",args:[t.terrain]}),e2(e.sky,t.sky)||r.push({command:"setSky",args:[t.sky]}),e2(e.projection,t.projection)||r.push({command:"setProjection",args:[t.projection]});let i={},n=[];!function(e,t,r,i){let n;for(n in t=t||{},e=e||{})Object.prototype.hasOwnProperty.call(e,n)&&(Object.prototype.hasOwnProperty.call(t,n)||e4(n,r,i));for(n in t){var a;Object.prototype.hasOwnProperty.call(t,n)&&(Object.prototype.hasOwnProperty.call(e,n)?e2(e[n],t[n])||("geojson"===e[n].type&&"geojson"===t[n].type&&function(e,t,r){let i;for(i in e[r])if(Object.prototype.hasOwnProperty.call(e[r],i)&&"data"!==i&&!e2(e[r][i],t[r][i]))return!1;for(i in t[r])if(Object.prototype.hasOwnProperty.call(t[r],i)&&"data"!==i&&!e2(e[r][i],t[r][i]))return!1;return!0}(e,t,n)?e3(r,{command:"setGeoJSONSourceData",args:[n,t[n].data]}):(a=t,e4(n,r,i),e5(n,a,r))):e5(n,t,r))}}(e.sources,t.sources,n,i);let a=[];e.layers&&e.layers.forEach(e=>{"source"in e&&i[e.source]?r.push({command:"removeLayer",args:[e.id]}):a.push(e)}),r=r.concat(n),function(e,t,r){t=t||[];let i=(e=e||[]).map(e8),n=t.map(e8),a=e.reduce(e9,{}),o=t.reduce(e9,{}),s=i.slice(),l=Object.create(null),c,u,h,d,f;for(let e=0,t=0;e1e-6?(o=Math.sin(n=Math.acos(a)),s=Math.sin((1-i)*n)/o,l=Math.sin(i*n)/o):(s=1-i,l=i),e[0]=s*c+l*f,e[1]=s*u+l*p,e[2]=s*h+l*m,e[3]=s*d+l*g,e},e.bm=function(e){var t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g;let y=new Float64Array(9);l=(t=e[0])*(a=t+t),c=(r=e[1])*a,h=(i=e[2])*a,d=i*(o=r+r),p=(n=e[3])*a,m=n*o,g=n*(s=i+i),y[0]=1-(u=r*o)-(f=i*s),y[3]=c-g,y[6]=h+m,y[1]=c+g,y[4]=1-l-f,y[7]=d-p,y[2]=h-m,y[5]=d+p,y[8]=1-l-u;let v=eO(-Math.asin(ev(y[2],-1,1))),x,b;return .001>Math.hypot(y[5],y[8])?(x=0,b=-eO(Math.atan2(y[3],y[4]))):(x=eO(0===y[5]&&0===y[8]?0:Math.atan2(y[5],y[8])),b=eO(0===y[1]&&0===y[0]?0:Math.atan2(y[1],y[0]))),{roll:x,pitch:v+90,bearing:b}},e.bn=function(e,t){return e.roll==t.roll&&e.pitch==t.pitch&&e.bearing==t.bearing},e.bo=tW,e.bp=oo,e.bq=-32768,e.br=32767,e.bs=sy,e.bt=ep,e.bu=em,e.bv=t5,e.bw=function(e,t,r,i,n){return ep(i,n,ev((e-t)/(r-t),0,1))},e.bx=function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e},e.by=ef,e.bz=function(){return new Float64Array(3)},e.c=eV,e.c$=iz,e.c0=class extends oa{constructor(e,t){super(e,t),this.current=oc}set(e){if(e[12]!==this.current[12]||e[0]!==this.current[0])return this.current=e,void this.gl.uniformMatrix4fv(this.location,!1,e);for(let t=1;t<16;t++)if(e[t]!==this.current[t]){this.current=e,this.gl.uniformMatrix4fv(this.location,!1,e);break}}},e.c1=os,e.c2=class extends oa{constructor(e,t){super(e,t),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]))}},e.c3=class extends oa{constructor(e,t){super(e,t),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]))}},e.c4=J,e.c5=function(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=-r,e[4]=i,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},e.c6=function(e,t,r){var i=t[0],n=t[1],a=t[2];return e[0]=i*r[0]+n*r[3]+a*r[6],e[1]=i*r[1]+n*r[4]+a*r[7],e[2]=i*r[2]+n*r[5]+a*r[8],e},e.c7=function(e,t,r,i,n,a,o){var s=1/(t-r),l=1/(i-n),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(n+i)*l,e[14]=(o+a)*c,e[15]=1,e},e.c8=class extends oa{constructor(e,t){super(e,t),this.current=[]}set(e){if(e!=this.current){this.current=e;let t=new Float32Array(4*e.length);for(let r=0;r25||i<0||i>=1||r<0||r>=1)},e.cE=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.cF=class extends an{},e.cG=eG,e.cH=function(e,t){eV.REGISTERED_PROTOCOLS[e]=t},e.cI=function(e){delete eV.REGISTERED_PROTOCOLS[e]},e.cJ=function(e,t){let r={};for(let i=0;i24*e)}let v=c?"center":a.get("text-justify").evaluate(o,{},t.canonical),b="point"===a.get("symbol-placement")?24*a.get("text-max-width").evaluate(o,{},t.canonical):1/0,_=()=>{t.bucket.allowVerticalPlacement&&nz(r)&&(g.vertical=l5(y,t.glyphMap,t.glyphPositions,t.imagePositions,d,b,l,h,"left",s,x,e.ax.vertical,!0,p,f))};if(!c&&m){let r=new Set;if("auto"===v)for(let e=0;e{d.x<0||d.x>=8192||d.y<0||d.y>=8192||function(t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w,T,M,k){let A=t.addToLineVertexArray(r,i),S,E,C,L,P=0,I=0,z=0,D=0,O=-1,R=-1,F={},j=ot("");if(t.allowVerticalPlacement&&n.vertical){let e=l.layout.get("text-rotate").evaluate(_,{},M)+90;C=new u3(c,r,u,h,d,n.vertical,f,p,m,e),s&&(L=new u3(c,r,u,h,d,s,y,v,m,e))}if(a){let i=l.layout.get("icon-rotate").evaluate(_,{}),n="none"!==l.layout.get("icon-text-fit"),o=u0(a,i,T,n),f=s?u0(s,i,T,n):void 0;E=new u3(c,r,u,h,d,a,y,v,!1,i),P=4*o.length;let p=t.iconSizeData,m=null;"source"===p.kind?(m=[128*l.layout.get("icon-size").evaluate(_,{})])[0]>32640&&eA(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`):"composite"===p.kind&&((m=[128*w.compositeIconSizes[0].evaluate(_,{},M),128*w.compositeIconSizes[1].evaluate(_,{},M)])[0]>32640||m[1]>32640)&&eA(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`),t.addSymbols(t.icon,o,m,b,x,_,e.ax.none,r,A.lineStartIndex,A.lineLength,-1,M),O=t.icon.placedSymbolArray.length-1,f&&(I=4*f.length,t.addSymbols(t.icon,f,m,b,x,_,e.ax.vertical,r,A.lineStartIndex,A.lineLength,-1,M),R=t.icon.placedSymbolArray.length-1)}let B=Object.keys(n.horizontal);for(let i of B){let a=n.horizontal[i];S||(j=ot(a.text),S=new u3(c,r,u,h,d,a,f,p,m,l.layout.get("text-rotate").evaluate(_,{},M)));let s=1===a.positionedLines.length;if(z+=ht(t,r,a,o,l,m,_,g,A,n.vertical?e.ax.horizontal:e.ax.horizontalOnly,s?B:[i],F,O,w,M),s)break}n.vertical&&(D+=ht(t,r,n.vertical,o,l,m,_,g,A,e.ax.vertical,["vertical"],F,R,w,M));let N=S?S.boxStartIndex:t.collisionBoxArray.length,U=S?S.boxEndIndex:t.collisionBoxArray.length,V=C?C.boxStartIndex:t.collisionBoxArray.length,q=C?C.boxEndIndex:t.collisionBoxArray.length,H=E?E.boxStartIndex:t.collisionBoxArray.length,G=E?E.boxEndIndex:t.collisionBoxArray.length,W=L?L.boxStartIndex:t.collisionBoxArray.length,Y=L?L.boxEndIndex:t.collisionBoxArray.length,Z=-1,$=(e,t)=>e?.circleDiameter?Math.max(e.circleDiameter,t):t;Z=$(S,-1),Z=$(C,Z),Z=$(E,Z);let X=+((Z=$(L,Z))>-1);X&&(Z*=k/24),t.glyphOffsetArray.length>=co.MAX_GLYPHS&&eA("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==_.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,_.sortKey);let K=u7(l,_,M),[J,Q]=function(t,r){let i=t.length,n=r?.values;if(n?.length>0)for(let r=0;r=0?F.right:-1,F.center>=0?F.center:-1,F.left>=0?F.left:-1,F.vertical||-1,O,R,j,N,U,V,q,H,G,W,Y,u,z,D,P,I,X,0,f,Z,J,Q)}(t,d,l,i,n,a,P,t.layers[0],t.collisionBoxArray,r.index,r.sourceLayerIndex,t.index,v,[T,T,T,T],A,c,b,M,S,m,r,o,u,h,s)};if("line"===E)for(let e of uG(r.geometry,0,0,8192,8192)){let r=s_(e,I);for(let e of function(e,t,r,i,n,a,o){let s=i?.6*24*a:0,l=uQ(i,n),c=l*a,u=0===e[0].x||8192===e[0].x||0===e[0].y||8192===e[0].y;return t-c=0&&y=0&&v=0&&f+u<=h){let r=new uX(y,v,m,e);r._round(),n&&!uK(t,r,o,n,a)||p.push(r)}}d+=l}return l||p.length||s||(p=e(t,d/2,i,n,a,o,s,!0,c)),p}(e,u?t/2*o%t:(l/2+48)*a*o%t,t,s,r,c,u,!1,8192)}(r,_,k,i.vertical||g,n,x,t.overscaling))g&&function(e,t,r,i){let n=e.compareText;if(t in n){let e=n[t];for(let t=e.length-1;t>=0;t--)if(i.dist(e[t])1){let t=s_(e,I),r=function(e,t,r,i,n){let a=r?.6*24*n:0,o=uQ(r,i)*n,s=0,l=uJ(e)/2;for(let r=0;rl){let u=(l-s)/c,h=new uX(rb.number(i.x,n.x,u),rb.number(i.y,n.y,u),n.angleTo(i),r);return h._round(),!a||uK(e,h,o,a,t)?h:void 0}s+=c}}(t,k,i.vertical||g,n,x);r&&z(t,r)}}else if("Polygon"===r.type)for(let e of rZ(r.geometry,0)){let t=function(e,t=1){let r=cC.fromPoints(e[0]),i=Math.min(r.width(),r.height()),n=i/2,a=new u5([],u4),{minX:o,minY:s,maxX:l,maxY:c}=r;if(0===i)return new w(o,s);for(let t=o;th.d||!h.d)&&(h=r),r.max-h.d<=t||(n=r.h/2,a.push(new u6(r.p.x-n,r.p.y-n,n,e)),a.push(new u6(r.p.x+n,r.p.y-n,n,e)),a.push(new u6(r.p.x-n,r.p.y+n,n,e)),a.push(new u6(r.p.x+n,r.p.y+n,n,e)))}return u.d>0&&h.d-u.d<=t?u.p:h.p}(e,16);z(s_(e[0],I,!0),new uX(t.x,t.y,0))}else if("LineString"===r.type)for(let e of r.geometry){let t=s_(e,I);z(t,new uX(t[0].x,t[0].y,0))}else if("Point"===r.type)for(let e of r.geometry)for(let t of e)z([t],new uX(t.x,t.y,0))}(t.bucket,o,g,v,t.imageMap,s,p,m,x,b,t.canonical,t.subdivisionGranularity)}t.showCollisionBoxes&&t.bucket.generateCollisionDebugBuffers()},e.cP=sM,e.cQ=sj,e.cR=lM,e.cS=function(e,t=""){let r=new lU;return function(e,t,r=""){for(let i in e.layers)t.writeMessage(3,(e,t)=>(function(e,t,r=""){t.writeVarintField(15,e.version||1),t.writeStringField(1,e.name||""),t.writeVarintField(5,e.extent||4096);let i={jsonPrefix:r,keys:[],values:[],keycache:{},valuecache:{}};for(let r=0;r=this.maxEntries){let e=this.map.keys().next().value;this.map.delete(e)}this.map.set(e,t)}clear(){this.map.clear()}},e.cV=sO,e.cW=lU,e.cX=uO,e.cY=function(e,t,r,a,o){return _(this,void 0,void 0,function*(){let s,l,c;if(X())try{return yield eI(e,t,r,a,o)}catch{}return s=e.width,l=e.height,i&&n||(n=(i=new OffscreenCanvas(s,l)).getContext("2d",{willReadFrequently:!0})),i.width=s,i.height=l,n.drawImage(e,0,0,s,l),c=n.getImageData(t,r,a,o),n.clearRect(0,0,s,l),c.data})},e.cZ=o4,e.c_=class{constructor(e,t){this.layers={[uF]:this},this.name=uF,this.version=t?t.version:1,this.extent=t?t.extent:4096,this.length=e.length,this.features=e}feature(e){return new uR(this.features[e],this.extent)}},e.ca=class extends ag{},e.cb=lI,e.cc=class extends av{},e.cd=oQ,e.ce=function(e){return e<=1?1:Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},e.cf=oJ,e.cg=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[3]*i+r[7]*n+r[11]*a+r[15];return e[0]=(r[0]*i+r[4]*n+r[8]*a+r[12])/(o=o||1),e[1]=(r[1]*i+r[5]*n+r[9]*a+r[13])/o,e[2]=(r[2]*i+r[6]*n+r[10]*a+r[14])/o,e},e.ch=class extends aa{},e.ci=class extends ak{},e.cj=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},e.ck=function(e,t){var r=e[0],i=e[1],n=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],f=e[11],p=e[12],m=e[13],g=e[14],y=e[15],v=t[0],x=t[1],b=t[2],_=t[3],w=t[4],T=t[5],M=t[6],k=t[7],A=t[8],S=t[9],E=t[10],C=t[11],L=t[12],P=t[13],I=t[14],z=t[15];return Math.abs(r-v)<=1e-6*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-x)<=1e-6*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(n-b)<=1e-6*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(a-_)<=1e-6*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(o-w)<=1e-6*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-T)<=1e-6*Math.max(1,Math.abs(s),Math.abs(T))&&Math.abs(l-M)<=1e-6*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(c-k)<=1e-6*Math.max(1,Math.abs(c),Math.abs(k))&&Math.abs(u-A)<=1e-6*Math.max(1,Math.abs(u),Math.abs(A))&&Math.abs(h-S)<=1e-6*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(d-E)<=1e-6*Math.max(1,Math.abs(d),Math.abs(E))&&Math.abs(f-C)<=1e-6*Math.max(1,Math.abs(f),Math.abs(C))&&Math.abs(p-L)<=1e-6*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(m-P)<=1e-6*Math.max(1,Math.abs(m),Math.abs(P))&&Math.abs(g-I)<=1e-6*Math.max(1,Math.abs(g),Math.abs(I))&&Math.abs(y-z)<=1e-6*Math.max(1,Math.abs(y),Math.abs(z))},e.cl=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.cm=e=>"circle"===e.type,e.cn=e=>"heatmap"===e.type,e.co=e=>"line"===e.type,e.cp=e=>"fill"===e.type,e.cq=e=>"fill-extrusion"===e.type,e.cr=e=>"hillshade"===e.type,e.cs=e=>"color-relief"===e.type,e.ct=e=>"background"===e.type,e.cu=e=>"custom"===e.type,e.cv=eg,e.cw=function(e,t,r){if(t<=0)return e;let i=1/t;return void 0===r||1e-10>Math.abs(r)?Math.round(e*i)/i:(r>0?Math.ceil(e*i-1e-9):Math.floor(e*i+1e-10))/i},e.cx=function(e,t,r){let i=eu(t.x-r.x,t.y-r.y),n=eu(e.x-r.x,e.y-r.y);return eO(Math.atan2(i[0]*n[1]-i[1]*n[0],i[0]*n[0]+i[1]*n[1]))},e.cy=ey,e.cz=function(e,t){var r;if(!eF[t])return!1;let i=e?.target,n=(null==(r=i?.ownerDocument)?void 0:r.defaultView)||window;return e instanceof n.MouseEvent||e instanceof n.WheelEvent},e.d=ed,e.d0=class{constructor(e,t){let r=(t=this.options=Object.assign({},lb,t)).debug;if(r&&console.time("preprocess data"),t.maxZoom<0||t.maxZoom>24)throw Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw Error("promoteId and generateId cannot be used together.");let i=sJ(e,t);r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles")),i=la(i,t),t.updateable&&(this.source=i),this.initializeIndex(i,t)}initializeIndex(e,t){this.tileIndex=t.cluster?new lu(t.clusterOptions):new lv(t),e.length&&this.tileIndex.initialize(e)}getTile(e,t,r){return t*=1,r*=1,(e*=1)<0||e>24?null:this.tileIndex.getTile(e,t,r)}updateData(e,t){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}=function(e,t,r){var i,n;let a=t?{removeAll:t.removeAll,remove:new Set(t.remove||[]),add:new Map(null==(i=t.add)?void 0:i.map(e=>[r.promoteId?e.properties[r.promoteId]:e.id,e])),update:new Map(null==(n=t.update)?void 0:n.map(e=>[e.id,e]))}:{remove:new Set,add:new Map,update:new Map},o=[];if(a.removeAll&&(o=e,e=[]),a.remove.size||a.add.size){let t=[];for(let r of e)(a.remove.has(r.id)||a.add.has(r.id))&&t.push(r);if(t.length){o.push(...t);let r=new Set(t.map(e=>e.id));e=e.filter(e=>!r.has(e.id))}if(a.add.size){let t=sJ({type:"FeatureCollection",features:Array.from(a.add.values())},r);t=la(t,r),o.push(...t),e.push(...t)}}if(a.update.size){let t=new Map,i=[];for(let r of e)a.update.has(r.id)?t.set(r.id,[...t.get(r.id)||[],r]):i.push(r);for(let[e,n]of a.update){let a=t.get(e);if(!a||0===a.length)continue;let s=function(e,t,r){var i,n;let a=!!t.newGeometry,o=t.removeAllProperties||(null==(i=t.removeProperties)?void 0:i.length)>0||(null==(n=t.addOrUpdateProperties)?void 0:n.length)>0;if(a){let i=e[0];return la(sJ({type:"FeatureCollection",features:[{type:"Feature",id:i.id,geometry:t.newGeometry,properties:o?ll(i.tags,t):i.tags}]},r),r)}if(o){let r=[];for(let i of e){let e=d({},i);e.tags=ll(e.tags,t),r.push(e)}return r}return e}(a,n,r);o.push(...a,...s),i.push(...s)}e=i}return{affected:o,source:e}}(this.source,e,r);t&&({affected:i,source:n}=this.filterUpdate(n,i,t)),i.length&&(this.source=n,this.tileIndex.updateIndex(n,i,r))}filterUpdate(e,t,r){let i=new Set;for(let n of e)null!=n.id&&(r(s5(n))||(t.push(n),i.add(n.id)));return{affected:t,source:e=e.filter(e=>!i.has(e.id))}}getData(){if(!this.options.updateable)throw Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map(e=>s5(e))}}updateClusterOptions(e,t){let r=this.options.cluster;this.options.cluster=e,this.options.clusterOptions=t,r!=e?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(e){return this.tileIndex.getClusterExpansionZoom(e)}getClusterChildren(e){return this.tileIndex.getChildren(e)}getClusterLeaves(e,t,r){return this.tileIndex.getLeaves(e,t,r)}},e.d1=nB,e.e=eb,e.f=eZ,e.g=eq,e.h=e=>_(void 0,void 0,void 0,function*(){if(0===e.byteLength)return createImageBitmap(new ImageData(1,1));let t=new Blob([new Uint8Array(e)],{type:"image/png"});try{return createImageBitmap(t)}catch(e){throw Error(`Could not load image because of ${ed(e).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),e.i=eE,e.j=e=>new Promise((t,r)=>{let i=new Image;i.onload=()=>{t(i),URL.revokeObjectURL(i.src),i.onload=null,window.requestAnimationFrame(()=>i.src=eP)},i.onerror=()=>r(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 n=new Blob([new Uint8Array(e)],{type:"image/png"});i.src=e.byteLength?URL.createObjectURL(n):eP}),e.k=(e,t)=>eY(eb(e,{type:"json"}),t),e.l=eJ,e.m=eY,e.n=eK,e.o=(e,t)=>eY(eb(e,{type:"arrayBuffer"}),t),e.p=l1,e.q=function(e){return new lU(e).readFields(lJ,[])},e.r=function(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))},e.s=ez,e.t=o$,e.u=n2,e.v=e0,e.w=eA,e.x=e0,e.y=nG,e.z=ny}),r("worker",["./shared"],function(e){class t{constructor(e,t){this.keyCache={},e&&this.replace(e,t)}replace(e,t){this._layerConfigs={},this._layers={},this.update(e,[],t)}update(t,r,i){for(let r of t){this._layerConfigs[r.id]=r;let t=this._layers[r.id]=e.bT(r,i);t._featureFilter=e.ah(t.filter,i),this.keyCache[r.id]&&delete this.keyCache[r.id]}for(let e of r)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];for(let t of(this.familiesBySource={},e.cJ(Object.values(this._layerConfigs),this.keyCache))){let r=t.map(e=>this._layers[e.id]),i=r[0];if(i.isHidden())continue;let n=i.source||"",a=this.familiesBySource[n];a||(a=this.familiesBySource[n]={});let o=i.sourceLayer||e.ag,s=a[o];s||(s=a[o]=[]),s.push(r)}}}class r{constructor(t){let r={},i=[];for(let e in t){let n=t[e],a=r[e]={};for(let e in n){let t=n[+e];if(!t||0===t.bitmap.width||0===t.bitmap.height)continue;let r={x:0,y:0,w:t.bitmap.width+2,h:t.bitmap.height+2};i.push(r),a[e]={rect:r,metrics:t.metrics}}}let{w:n,h:a}=e.p(i),o=new e.t({width:n||1,height:a||1});for(let i in t){let n=t[i];for(let t in n){let a=n[+t];if(!a||0===a.bitmap.width||0===a.bitmap.height)continue;let s=r[i][t].rect;e.t.copy(a.bitmap,o,{x:0,y:0},{x:s.x+1,y:s.y+1},a.bitmap)}}this.image=o,this.positions=r}}e.cK("GlyphAtlas",r);class i{constructor(t){this.tileID=new e.a3(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId,this.inFlightDependencies=[]}parse(t,i,a,o,s){return e._(this,void 0,void 0,function*(){this.status="parsing",this.data=t,this.collisionBoxArray=new e.ae;let l=new e.cL(Object.keys(t.layers).sort()),c=new e.cM(this.tileID,this.promoteId);c.bucketLayerIDs=[];let u={},h={featureIndex:c,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:a,subdivisionGranularity:s},d=i.familiesBySource[this.source];for(let r in d){let i=t.layers[r];if(!i)continue;1===i.version&&e.w(`Vector tile source "${this.source}" layer "${r}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let o=l.encode(r),s=[];for(let e=0;ee.id)))}}let f=e.bY(h.glyphDependencies,e=>Object.keys(e).map(Number));for(let e of this.inFlightDependencies)e?.abort();this.inFlightDependencies=[];let p=Promise.resolve({});if(Object.keys(f).length){let e=new AbortController;this.inFlightDependencies.push(e),p=o.sendAsync({type:"GG",data:{stacks:f,source:this.source,tileID:this.tileID,type:"glyphs"}},e)}let m=Object.keys(h.iconDependencies),g=Promise.resolve({});if(m.length){let e=new AbortController;this.inFlightDependencies.push(e),g=o.sendAsync({type:"GI",data:{icons:m,source:this.source,tileID:this.tileID,type:"icons"}},e)}let y=Object.keys(h.patternDependencies),v=Promise.resolve({});if(y.length){let e=new AbortController;this.inFlightDependencies.push(e),v=o.sendAsync({type:"GI",data:{icons:y,source:this.source,tileID:this.tileID,type:"patterns"}},e)}let x=h.dashDependencies,b=Promise.resolve({});if(Object.keys(x).length){let e=new AbortController;this.inFlightDependencies.push(e),b=o.sendAsync({type:"GDA",data:{dashes:x}},e)}let[_,w,T,M]=yield Promise.all([p,g,v,b]),k=new r(_),A=new e.cN(w,T);for(let t in u){let r=u[t];r instanceof e.af?(n(r.layers,this.zoom,a),e.cO({bucket:r,glyphMap:_,glyphPositions:k.positions,imageMap:w,imagePositions:A.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:h.subdivisionGranularity})):r.hasDependencies&&(r instanceof e.cP||r instanceof e.cQ||r instanceof e.cR)&&(n(r.layers,this.zoom,a),r.addFeatures(h,this.tileID.canonical,A.patternPositions,M))}return this.status="done",{buckets:Object.values(u).filter(e=>!e.isEmpty()),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:k.image,imageAtlas:A,dashPositions:M,glyphMap:this.returnDependencies?_:null,iconMap:this.returnDependencies?w:null,glyphPositions:this.returnDependencies?k.positions:null}})}}function n(t,r,i){let n=new e.J(r);for(let e of t)e.recalculate(n,i)}class a{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(e,t){this.loading[e]=t}finishLoading(e){delete this.loading[e]}abort(e){let t=this.loading[e];t?.abort&&(t.abort.abort(),delete this.loading[e])}setParsing(e,t){this.parsing[e]=t}consumeParsing(e){let t=this.parsing[e];if(t)return delete this.parsing[e],t}clearParsing(e){delete this.parsing[e]}markLoaded(e,t){this.loaded[e]=t}getLoaded(e){let t=this.loaded[e];if(t)return t}removeLoaded(e){delete this.loaded[e]}clearLoaded(){this.loaded={}}}class o{constructor(e){this.start=`${e}#start`,this.end=`${e}#end`,this.measure=e,performance.mark(this.start)}finish(){performance.mark(this.end);let e=performance.getEntriesByName(this.measure);return 0===e.length&&(performance.measure(this.measure,this.start,this.end),e=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),e}}class s{constructor(e,t,r,i,n){this.type=e,this.properties=r||{},this.extent=n,this.pointsArray=t,this.id=i}loadGeometry(){return this.pointsArray.map(t=>t.map(t=>new e.P(t.x,t.y)))}}class l{constructor(e,t,r){this.version=2,this._myFeatures=e,this.name=t,this.length=e.length,this.extent=r}feature(e){return this._myFeatures[e]}}class c{constructor(){this.layers={}}addLayer(e){this.layers[e.name]=e}}function u(t){let r=e.cS(t);return 0===r.byteOffset&&r.byteLength===r.buffer.byteLength||(r=new Uint8Array(r)),{vectorTile:t,rawData:r.buffer}}class h{constructor(t,r,i){this.actor=t,this.layerIndex=r,this.availableImages=i,this.tileState=new a,this.overzoomedTileResultCache=new e.cU(1e3)}loadVectorTile(t,r){try{return{vectorTile:"mlt"!==t.encoding?new e.cV(new e.cW(r)):new e.cX(r),rawData:r}}catch(a){let i=new Uint8Array(r),n=`Unable to parse the tile at ${t.request.url}, `;throw Error(n+=31===i[0]&&139===i[1]?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${e.d(a).message}`)}}loadTile(t){return e._(this,void 0,void 0,function*(){let{uid:r,overzoomParameters:n}=t;n&&(t.request=n.overzoomRequest);let a=this._startRequestTiming(t),o=new i(t);this.tileState.startLoading(r,o);let s=new AbortController;o.abort=s;try{let i=yield e.o(t.request,s);if(t.etag&&t.etag===i.etag)return this.tileState.finishLoading(r),this._getEtagUnmodifiedResult(i,a);let l=this.loadVectorTile(t,i.data);if(this.tileState.finishLoading(r),!l)return null;let{vectorTile:c,rawData:u}=l;n&&({vectorTile:c,rawData:u}=this._getOverzoomTile(t,c));let h=this._getExpiryData(i),d=this._finishRequestTiming(a);o.vectorTile=c,this.tileState.markLoaded(r,o);let f={rawData:u,cacheControl:h,resourceTiming:d};this.tileState.setParsing(r,f);try{return yield this._parseWorkerTile(o,t,f)}finally{this.tileState.clearParsing(r)}}catch(e){throw this.tileState.finishLoading(r),o.status="done",this.tileState.markLoaded(r,o),e}})}_getEtagUnmodifiedResult(t,r){let i=this._getExpiryData(t),n=this._finishRequestTiming(r);return e.e({etagUnmodified:!0},i,n)}_parseWorkerTile(t,r,i){return e._(this,void 0,void 0,function*(){let n=yield t.parse(t.vectorTile,this.layerIndex,this.availableImages,this.actor,r.subdivisionGranularity);if(i){let{rawData:t,cacheControl:a,resourceTiming:o}=i;n=e.e({rawTileData:t.slice(0),encoding:r.encoding},n,a,o)}return n})}_getExpiryData({expires:e,cacheControl:t,etag:r}){let i={};return e&&(i.expires=e),t&&(i.cacheControl=t),r&&(i.etag=r),i}_startRequestTiming(e){var t;if(null!=(t=e.request)&&t.collectResourceTiming)return new o(e.request.url)}_finishRequestTiming(e){let t=e?.finish();return t?{resourceTiming:JSON.parse(JSON.stringify(t))}:{}}_getOverzoomTile(t,r){var i;let{tileID:n,source:a,overzoomParameters:o}=t,{maxZoomTileID:h}=o,d=`${h.key}_${n.key}_${null==(i=t.request)?void 0:i.url}`,f=this.overzoomedTileResultCache.get(d);if(f)return f;let p=new c,m=this.layerIndex.familiesBySource[a];for(let t in m){let i=r.layers[t];if(!i)continue;let a=function(t,r,i){let{extent:n}=t,a=Math.pow(2,i.z-r.z),o=(i.x-r.x*a)*n,c=(i.y-r.y*a)*n,u=[];for(let r=0;r0&&p.addLayer(a)}let g=u(p);return this.overzoomedTileResultCache.set(d,g),g}reloadTile(t){return e._(this,void 0,void 0,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.showCollisionBoxes=t.showCollisionBoxes,"parsing"===r.status){let i=this.tileState.consumeParsing(e);return yield this._parseWorkerTile(r,t,i)}if("done"===r.status&&r.vectorTile)return yield this._parseWorkerTile(r,t)})}abortTile(t){return e._(this,void 0,void 0,function*(){this.tileState.abort(t.uid)})}removeTile(t){return e._(this,void 0,void 0,function*(){this.tileState.removeLoaded(t.uid)})}}class d{constructor(){this.loaded={}}loadTile(t){return e._(this,void 0,void 0,function*(){let{uid:r,encoding:i,rawImageData:n,redFactor:a,greenFactor:o,blueFactor:s,baseShift:l}=t,c=n.width+2,u=n.height+2,h=e.b(n)?new e.R({width:c,height:u},(yield e.cY(n,-1,-1,c,u))):n,d=new e.cZ(r,h,i,a,o,s,l);return this.loaded||(this.loaded={}),this.loaded[r]=d,d})}removeTile(e){let t=this.loaded,r=e.uid;t?.[r]&&delete t[r]}}class f{constructor(e,t,r,i=p){this.actor=e,this.layerIndex=t,this.availableImages=r,this.tileState=new a,this._createGeoJSONIndex=i}loadVectorTile(t){if(!this._geoJSONIndex)throw Error("Unable to parse the data into a cluster or geojson");let{z:r,x:i,y:n}=t.tileID.canonical,a=this._geoJSONIndex.getTile(r,i,n);return a?u(new e.c_(a.features,{version:2,extent:e.a6})):null}loadTile(t){return e._(this,void 0,void 0,function*(){let{uid:e}=t,r=new i(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 o={rawData:a};this.tileState.setParsing(e,o);try{return yield this._parseWorkerTile(r,t,o)}finally{this.tileState.clearParsing(e)}}catch(t){throw r.status="done",this.tileState.markLoaded(e,r),t}})}_reloadLoadedTile(t){return e._(this,void 0,void 0,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.showCollisionBoxes=t.showCollisionBoxes,"parsing"===r.status){let i=this.tileState.consumeParsing(e);return yield this._parseWorkerTile(r,t,i)}if("done"===r.status&&r.vectorTile)return yield this._parseWorkerTile(r,t)})}_parseWorkerTile(t,r,i){return e._(this,void 0,void 0,function*(){let n=yield t.parse(t.vectorTile,this.layerIndex,this.availableImages,this.actor,r.subdivisionGranularity);if(i){let{rawData:t}=i;n=e.e({rawTileData:t.slice(0),encoding:"mvt"},n)}return n})}abortTile(t){return e._(this,void 0,void 0,function*(){this.tileState.abort(t.uid)})}removeTile(t){return e._(this,void 0,void 0,function*(){this.tileState.removeLoaded(t.uid)})}loadData(t){return e._(this,void 0,void 0,function*(){var r;null==(r=this._pendingRequest)||r.abort();let i=this._startRequestTiming(t);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(t,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let e={};return t.request&&(e.data=t.data),this._finishRequestTiming(i,t,e),e}catch(t){if(delete this._pendingRequest,!e.$(t))throw t;return{abandoned:!0}}})}_startRequestTiming(e){var t;if(null!=(t=e.request)&&t.collectResourceTiming)return new o(e.request.url)}_finishRequestTiming(e,t,r){let i=e?.finish();i&&(r.resourceTiming={[t.source]:JSON.parse(JSON.stringify(i))})}reloadTile(e){return this.tileState.getLoaded(e.uid)?this._reloadLoadedTile(e):this.loadTile(e)}loadAndProcessGeoJSON(t,r){return e._(this,void 0,void 0,function*(){if(t.request&&(t.data=(yield e.k(t.request,r)).data),t.data)return t.data=this._filterGeoJSON(t.data,t.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(t.data,t));if(t.dataDiff)return null!=this._geoJSONIndex||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},t)),void this._geoJSONIndex.updateData(t.dataDiff,this._getFilterPredicate(t.filter));if(t.updateCluster&&this._geoJSONIndex.updateClusterOptions(t.geojsonVtOptions.cluster,m(t)),null==this._geoJSONIndex)throw Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`)})}_filterGeoJSON(e,t){if("FeatureCollection"!==e.type)return e;let r=this._getFilterPredicate(t);return r?{type:"FeatureCollection",features:e.features.filter(e=>r(e))}:e}_getFilterPredicate(t){if("boolean"!=typeof t&&!t?.length)return;let r=e.c$(t,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===r.result)throw Error(r.value.map(e=>`${e.key}: ${e.message}`).join(", "));return e=>r.value.evaluate({zoom:0},e)}removeSource(t){return e._(this,void 0,void 0,function*(){var e;null==(e=this._pendingRequest)||e.abort()})}getClusterExpansionZoom(e){return this._geoJSONIndex.getClusterExpansionZoom(e.clusterId)}getClusterChildren(e){return this._geoJSONIndex.getClusterChildren(e.clusterId)}getClusterLeaves(e){return this._geoJSONIndex.getClusterLeaves(e.clusterId,e.limit,e.offset)}}function p(t,r){let i=e.e(r.geojsonVtOptions||{},{updateable:!0,clusterOptions:m(r)});return new e.d0(t,i)}function m({geojsonVtOptions:t,clusterProperties:r}){if(!r||!t.clusterOptions)return t.clusterOptions;let i={},n={},a={accumulated:null,zoom:0},o={properties:null},s=Object.keys(r);for(let t of s){let[a,o]=r[t],s=e.c$(o),l=e.c$("string"==typeof a?[a,["accumulated"],["get",t]]:a);i[t]=s.value,n[t]=l.value}return t.clusterOptions.map=e=>{o.properties=e;let t={};for(let e of s)t[e]=i[e].evaluate(a,o);return t},t.clusterOptions.reduce=(e,t)=>{for(let r of(o.properties=t,s))a.accumulated=e[r],e[r]=n[r].evaluate(a,o)},t.clusterOptions}class g{constructor(t){this.self=t,this.actor=new e.N(t),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(e,t)=>{if(this.externalWorkerSourceTypes[e])throw Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=t},this.self.addProtocol=e.cH,this.self.removeProtocol=e.cI,this.self.registerRTLTextPlugin=t=>{e.d1.setMethods(t)},this.self.makeRequest=e.m,this.actor.registerMessageHandler("LDT",(e,t)=>this._getDEMWorkerSource(e,t.source).loadTile(t)),this.actor.registerMessageHandler("RDT",(t,r)=>e._(this,void 0,void 0,function*(){this._getDEMWorkerSource(t,r.source).removeTile(r)})),this.actor.registerMessageHandler("GCEZ",(t,r)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,r.type,r.source).getClusterExpansionZoom(r)})),this.actor.registerMessageHandler("GCC",(t,r)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,r.type,r.source).getClusterChildren(r)})),this.actor.registerMessageHandler("GCL",(t,r)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,r.type,r.source).getClusterLeaves(r)})),this.actor.registerMessageHandler("LD",(e,t)=>this._getWorkerSource(e,t.type,t.source).loadData(t)),this.actor.registerMessageHandler("LT",(e,t)=>this._getWorkerSource(e,t.type,t.source).loadTile(t)),this.actor.registerMessageHandler("RT",(e,t)=>this._getWorkerSource(e,t.type,t.source).reloadTile(t)),this.actor.registerMessageHandler("AT",(e,t)=>this._getWorkerSource(e,t.type,t.source).abortTile(t)),this.actor.registerMessageHandler("RMT",(e,t)=>this._getWorkerSource(e,t.type,t.source).removeTile(t)),this.actor.registerMessageHandler("RS",(t,r)=>e._(this,void 0,void 0,function*(){var e,i;if(!(null!=(i=null==(e=this.workerSources[t])?void 0:e[r.type])&&i[r.source]))return;let n=this.workerSources[t][r.type][r.source];delete this.workerSources[t][r.type][r.source],void 0!==n.removeSource&&n.removeSource(r)})),this.actor.registerMessageHandler("RM",t=>e._(this,void 0,void 0,function*(){delete this.layerIndexes[t],delete this.availableImages[t],delete this.workerSources[t],delete this.demWorkerSources[t],this.globalStates.delete(t)})),this.actor.registerMessageHandler("SR",(t,r)=>e._(this,void 0,void 0,function*(){this.referrer=r})),this.actor.registerMessageHandler("SRPS",(e,t)=>this._syncRTLPluginState(e,t)),this.actor.registerMessageHandler("IS",(t,r)=>e._(this,void 0,void 0,function*(){this.self.importScripts(r)})),this.actor.registerMessageHandler("SI",(e,t)=>this._setImages(e,t)),this.actor.registerMessageHandler("UL",(t,r)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(t).update(r.layers,r.removedIds,this._getGlobalState(t))})),this.actor.registerMessageHandler("UGS",(t,r)=>e._(this,void 0,void 0,function*(){let e=this._getGlobalState(t);for(let t in r)e[t]=r[t]})),this.actor.registerMessageHandler("SL",(t,r)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(t).replace(r,this._getGlobalState(t))}))}_getGlobalState(e){let t=this.globalStates.get(e);return t||(t={},this.globalStates.set(e,t)),t}_setImages(t,r){return e._(this,void 0,void 0,function*(){for(let e in this.availableImages[t]=r,this.workerSources[t]){let i=this.workerSources[t][e];for(let e in i)i[e].availableImages=r}})}_syncRTLPluginState(t,r){return e._(this,void 0,void 0,function*(){return yield e.d1.syncState(r,this.self.importScripts)})}_getAvailableImages(e){let t=this.availableImages[e];return t||(t=[]),t}_getLayerIndex(e){let r=this.layerIndexes[e];return r||(r=this.layerIndexes[e]=new t),r}_getWorkerSource(e,t,r){var i,n;if((i=this.workerSources)[e]||(i[e]={}),(n=this.workerSources[e])[t]||(n[t]={}),!this.workerSources[e][t][r]){let i={sendAsync:(t,r)=>(t.targetMapId=e,this.actor.sendAsync(t,r))};switch(t){case"vector":this.workerSources[e][t][r]=new h(i,this._getLayerIndex(e),this._getAvailableImages(e));break;case"geojson":this.workerSources[e][t][r]=new f(i,this._getLayerIndex(e),this._getAvailableImages(e));break;default:this.workerSources[e][t][r]=new this.externalWorkerSourceTypes[t](i,this._getLayerIndex(e),this._getAvailableImages(e))}}return this.workerSources[e][t][r]}_getDEMWorkerSource(e,t){var r,i;return(r=this.demWorkerSources)[e]||(r[e]={}),(i=this.demWorkerSources[e])[t]||(i[t]=new d),this.demWorkerSources[e][t]}}return e.i(self)&&(self.worker=new g(self)),g}),r("index",["exports","./shared"],function(e,t){let r,i,n;var a,o,s,l,c,u,h="5.24.0";function d(){var e=new t.A(4);return t.A!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}let f,p,m,g={frame(e,r,i,n){let a=n||window,o=a.requestAnimationFrame(e=>{s(),r(e)}),{unsubscribe:s}=t.s(e.signal,"abort",()=>{s(),a.cancelAnimationFrame(o),i(new t.a(e.signal.reason))},!1)},frameAsync(e,t){return new Promise((r,i)=>{this.frame(e,r,i,t)})},getImageData(e,t=0){return this.getImageCanvasContext(e).getImageData(-t,-t,e.width+2*t,e.height+2*t)},getImageCanvasContext(e){let t=window.document.createElement("canvas"),r=t.getContext("2d",{willReadFrequently:!0});if(!r)throw Error("failed to create canvas 2d context");return t.width=e.width,t.height=e.height,r.drawImage(e,0,0,e.width,e.height),r},resolveURL:e=>(f||(f=document.createElement("a")),f.href=e,f.href),hardwareConcurrency:"u">typeof navigator&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return void 0!==m?m:!!matchMedia&&(null!=p||(p=matchMedia("(prefers-reduced-motion: reduce)")),p.matches)},set prefersReducedMotion(de){m=de}},y=new class{constructor(){this._frozenAt=null}getCurrentTime(){return null!==this._frozenAt?this._frozenAt:performance.now()}setNow(e){this._frozenAt=e}restoreNow(){this._frozenAt=null}isFrozen(){return null!==this._frozenAt}};function v(){return y.getCurrentTime()}class x{static create(e,t,r){let i=window.document.createElement(e);return void 0!==t&&(i.className=t),r&&r.appendChild(i),i}static createNS(e,t){return window.document.createElementNS(e,t)}static disableDrag(){x.docStyle&&x.selectProp&&(x.userSelect=x.docStyle[x.selectProp],x.docStyle[x.selectProp]="none")}static enableDrag(){x.docStyle&&x.selectProp&&(x.docStyle[x.selectProp]=x.userSelect)}static suppressClickInternal(e){e.preventDefault(),e.stopPropagation(),window.removeEventListener("click",x.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",x.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",x.suppressClickInternal,!0)},0)}static getScale(e){let t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}static getPoint(e,r,i){let n=r.boundingClientRect;return new t.P((i.clientX-n.left)/r.x-e.clientLeft,(i.clientY-n.top)/r.y-e.clientTop)}static mousePos(e,t){let r=x.getScale(e);return x.getPoint(e,r,t)}static touchPos(e,t){let r=[],i=x.getScale(e);for(let n of t)r.push(x.getPoint(e,i,n));return r}static sanitize(e){let t=new DOMParser().parseFromString(e,"text/html").body||document.createElement("body");for(let e of t.querySelectorAll("script"))e.remove();return x.clean(t),t.innerHTML}static isPossiblyDangerous(e,t){let r=t.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(e)||!r.includes("javascript:")&&!r.includes("data:"))||!!e.startsWith("on")||void 0}static clean(e){for(let t of e.children)x.removeAttributes(t),x.clean(t)}static removeAttributes(e){for(let{name:t,value:r}of e.attributes)x.isPossiblyDangerous(t,r)&&e.removeAttribute(t)}}x.docStyle="u">typeof window&&(null==(s=window.document)?void 0:s.documentElement.style),x.selectProp=!x.docStyle||"userSelect"in x.docStyle?"userSelect":"webkitUserSelect",function(e){let r,i,n,a;e.resetRequestQueue=()=>{r=[],i=0,n=0,a={}},e.addThrottleControl=e=>{let t=n++;return a[t]=e,t},e.removeThrottleControl=e=>{delete a[e],s()},e.getImage=(e,i,n=!0)=>new Promise((a,o)=>{e.headers||(e.headers={}),e.headers.accept="image/webp,*/*",t.e(e,{type:"image"}),r.push({abortController:i,requestParameters:e,supportImageRefresh:n,state:"queued",onError:e=>{o(e)},onSuccess:e=>{a(e)}}),s()});let o=e=>t._(this,void 0,void 0,function*(){var r;e.state="running";let{requestParameters:n,supportImageRefresh:a,onError:o,onSuccess:c,abortController:u}=e,h=!1===a&&!t.i(self)&&!t.g(n.url)&&(!n.headers||Object.keys(n.headers).reduce((e,t)=>e&&"accept"===t,!0));i++;let d=h?l(n,u):t.m(n,u);try{let i=yield d;delete e.abortController,e.state="completed",i.data instanceof HTMLImageElement||t.b(i.data)?c(i):i.data&&c({data:yield(r=i.data,"function"==typeof createImageBitmap?t.h(r):t.j(r)),cacheControl:i.cacheControl,expires:i.expires})}catch(r){delete e.abortController,o(t.d(r))}finally{i--,s()}}),s=()=>{let e=(()=>{for(let e of Object.keys(a))if(a[e]())return!0;return!1})()?t.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:t.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let t=i;t0;t++){let e=r.shift();e.abortController.signal.aborted?t--:o(e)}},l=(e,r)=>new Promise((i,n)=>{let a=new Image,o=e.url,s=e.credentials;s&&"include"===s?a.crossOrigin="use-credentials":(s&&"same-origin"===s||!t.f(o))&&(a.crossOrigin="anonymous"),r.signal.addEventListener("abort",()=>{a.src="",n(new t.a(r.signal.reason))}),a.fetchPriority="high",a.onload=()=>{a.onerror=a.onload=null,i({data:a})},a.onerror=()=>{a.onerror=a.onload=null,r.signal.aborted||n(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."))},a.src=o})}(l||(l={})),l.resetRequestQueue();class b{constructor(e){this._transformRequestFn=e??null}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function _(e){let t=[];if("string"==typeof e)t.push({id:"default",url:e});else if(e&&e.length>0){let r=[];for(let{id:i,url:n}of e){let e=`${i}${n}`;r.includes(e)||(r.push(e),t.push({id:i,url:n}))}}return t}function w(e,t,r){try{let i=new URL(e);return i.pathname+=`${t}${r}`,i.toString()}catch{throw Error(`Invalid sprite URL "${e}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}class T extends t.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0}destroy(){for(let e of(this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null),Object.keys(this.images)))this.removeImage(e);this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(let{ids:e,promiseResolve:t}of this.requestors)t(this._getImagesForIds(e));this.requestors=[]}}getImage(e){let r=this.images[e];if(r&&!r.data&&r.spriteData){let e=r.spriteData;r.data=new t.R({width:e.width,height:e.height},e.context.getImageData(e.x,e.y,e.width,e.height).data),r.spriteData=null}return r}addImage(e,t){if(this.images[e])throw Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,t)&&(this.images[e]=t)}_validate(e,r){let i=!0,n=r.data||r.spriteData;return this._validateStretch(r.stretchX,n?.width)||(this.fire(new t.l(Error(`Image "${e}" has invalid "stretchX" value`))),i=!1),this._validateStretch(r.stretchY,n?.height)||(this.fire(new t.l(Error(`Image "${e}" has invalid "stretchY" value`))),i=!1),this._validateContent(r.content,r)||(this.fire(new t.l(Error(`Image "${e}" has invalid "content" value`))),i=!1),i}_validateStretch(e,t){if(!e)return!0;let r=0;for(let i of e){if(i[0]=e[1]))}updateImage(e,t,r=!0){let i=this.getImage(e);if(r&&(i.data.width!==t.data.width||i.data.height!==t.data.height))throw Error(`size mismatch between old image (${i.data.width}x${i.data.height}) and new image (${t.data.width}x${t.data.height}).`);t.version=i.version+1,this.images[e]=t,this.updatedImages[e]=!0}removeImage(e){var t;let r=this.images[e];delete this.images[e],delete this.patterns[e],null!=(t=r.userImage)&&t.onRemove&&r.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(e){return new Promise((t,r)=>{let i=!0;if(!this.isLoaded())for(let t of e)this.images[t]||(i=!1);this.isLoaded()||i?t(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:t})})}_getImagesForIds(e){var r;let i={};for(let n of e){let e=this.getImage(n);e||(this.fire(new t.n("styleimagemissing",{id:n})),e=this.getImage(n)),e?i[n]={data:e.data.clone(),pixelRatio:e.pixelRatio,sdf:e.sdf,version:e.version,stretchX:e.stretchX,stretchY:e.stretchY,content:e.content,textFitWidth:e.textFitWidth,textFitHeight:e.textFitHeight,hasRenderCallback:!!(null!=(r=e.userImage)&&r.render)}:t.w(`Image "${n}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return i}getPixelSize(){let{width:e,height:t}=this.atlasImage;return{width:e,height:t}}getPattern(e){let r=this.patterns[e],i=this.getImage(e);if(!i)return null;if(r&&r.position.version===i.version)return r.position;if(r)r.position.version=i.version;else{let r={w:i.data.width+2,h:i.data.height+2,x:0,y:0},n=new t.I(r,i);this.patterns[e]={bin:r,position:n}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){let r=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.T(e,this.atlasImage,r.RGBA),this.atlasTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}_updatePatternAtlas(){let e=[];for(let t in this.patterns)e.push(this.patterns[t].bin);let{w:r,h:i}=t.p(e),n=this.atlasImage;for(let e in n.resize({width:r||1,height:i||1}),this.patterns){let{bin:r}=this.patterns[e],i=r.x+1,a=r.y+1,o=this.getImage(e).data,s=o.width,l=o.height;t.R.copy(o,n,{x:0,y:0},{x:i,y:a},{width:s,height:l}),t.R.copy(o,n,{x:0,y:l-1},{x:i,y:a-1},{width:s,height:1}),t.R.copy(o,n,{x:0,y:0},{x:i,y:a+l},{width:s,height:1}),t.R.copy(o,n,{x:s-1,y:0},{x:i-1,y:a},{width:1,height:l}),t.R.copy(o,n,{x:0,y:0},{x:i+s,y:a},{width:1,height:l})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(let r of e){if(this.callbackDispatchedThisFrame[r])continue;this.callbackDispatchedThisFrame[r]=!0;let e=this.getImage(r);e||t.w(`Image with ID: "${r}" was not found`),function(e){let{userImage:t}=e;return!(!t?.render||!t.render()||(e.data.replace(new Uint8Array(t.data.buffer)),0))}(e)&&this.updateImage(r,e)}}cloneImages(){let e={};for(let t in this.images){let r=this.images[t];e[t]=Object.assign(Object.assign({},r),{data:r.data?r.data.clone():null})}return e}}let M=new Float64Array(256);for(let e=0;e<256;e++){let t=.5-Math.pow(e/255,.45454545454545453);M[e]=t*Math.abs(t)}function k(e,t,r,i,n,a,o,s,l){for(let c=t;c-1);a[++l]=s,o[l]=c,o[l+1]=1e20}for(let s=0,l=0;s/[-\w]+/.test(e)?e:`'${CSS.escape(e)}'`).join(",");return new E.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:r,fontWeight:this._fontWeight(t[0]),fontStyle:this._fontStyle(t[0]),lang:this.lang})}_fontStyle(e){return/italic/i.test(e)?"italic":/oblique/i.test(e)?"oblique":"normal"}_fontWeight(e){let t;for(let[r,i]of Object.entries({thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950}))RegExp(`\\b${r}\\b`,"i").test(e)&&(t=`${i}`);return t}destroy(){for(let e in this.entries){let t=this.entries[e];t.tinySDF=null,t.ideographTinySDF=null,t.glyphs={},t.requests={},t.ranges={}}this.entries={}}}E.loadGlyphRange=function(e,r,i,n){return t._(this,void 0,void 0,function*(){let a=256*r,o=a+255,s=yield n.transformRequest(i.replace("{fontstack}",e).replace("{range}",`${a}-${o}`),"Glyphs"),l=yield t.o(s,new AbortController);if(!l?.data)throw Error(`Could not load glyph range. range: ${r}, ${a}-${o}`);let c={};for(let e of t.q(l.data))c[e.id]=e;return c})},E.TinySDF=class{constructor({fontSize:e=24,buffer:t=3,radius:r=8,cutoff:i=.25,fontFamily:n="sans-serif",fontWeight:a="normal",fontStyle:o="normal",lang:s=null}={}){this.buffer=t,this.radius=r,this.cutoff=i,this.lang=s;let l=this.size=e+4*t,c=this._createCanvas(l),u=this.ctx=c.getContext("2d",{willReadFrequently:!0});u.font=`${o} ${a} ${e}px ${n}`,u.textBaseline="alphabetic",u.textAlign="left",u.fillStyle="black",this.gridOuter=new Float64Array(l*l),this.gridInner=new Float64Array(l*l),this.f=new Float64Array(l),this.z=new Float64Array(l+1),this.v=new Uint16Array(l)}_createCanvas(e){if("u">typeof OffscreenCanvas)return new OffscreenCanvas(e,e);let t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){let{width:t,actualBoundingBoxAscent:r,actualBoundingBoxDescent:i,actualBoundingBoxLeft:n,actualBoundingBoxRight:a}=this.ctx.measureText(e),o=Math.ceil(r),s=Math.floor(n),l=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(a)-s)),c=Math.max(0,Math.min(this.size-this.buffer,o+Math.ceil(i))),u=l+2*this.buffer,h=c+2*this.buffer,d=Math.max(u*h,0),f=new Uint8ClampedArray(d),p={data:f,width:u,height:h,glyphWidth:l,glyphHeight:c,glyphTop:o,glyphLeft:s,glyphAdvance:t};if(0===l||0===c)return p;let{ctx:m,buffer:g,gridInner:y,gridOuter:v}=this;this.lang&&(m.lang=this.lang),m.clearRect(g,g,l,c),m.fillText(e,g-s,g+o);let x=m.getImageData(g,g,l,c);v.fill(1e20,0,d),y.fill(0,0,d);let b=3;for(let e=0;e1&&(o=e[++a]);let l=Math.min(Math.abs(s-o.left),Math.abs(s-o.right)),c,u=t/r*(i+1);if(o.isDash){let e=i-Math.abs(u);c=Math.sqrt(l*l+e*e)}else c=i-Math.sqrt(l*l+u*u);this.data[n+s]=Math.max(0,Math.min(255,c+128))}}}addRegularDash(e){for(let t=e.length-1;t>=0;--t){let r=e[t],i=e[t+1];r.zeroLength?e.splice(t,1):i&&i.isDash===r.isDash&&(i.left=r.left,e.splice(t,1))}let t=e[0],r=e[e.length-1];t.isDash===r.isDash&&(t.left=r.left-this.width,r.right=t.right+this.width);let i=this.width*this.nextRow,n=0,a=e[0];for(let t=0;t1&&(a=e[++n]);let r=Math.min(Math.abs(t-a.left),Math.abs(t-a.right));this.data[i+t]=Math.max(0,Math.min(255,(a.isDash?r:-r)+128))}}addDash(e,r){let i=7*!!r,n=2*i+1;if(this.nextRow+n>this.height)return t.w("LineAtlas out of space"),null;let a=0;for(let t of e)a+=t;if(0!==a){let t=this.width/a,n=this.getDashRanges(e,this.width,t);r?this.addRoundDash(n,t,i):this.addRegularDash(n)}let o={y:this.nextRow+i,height:2*i,width:a};return this.nextRow+=n,this.dirty=!0,o}bind(e){let t=e.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.ALPHA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,this.width,this.height,0,t.ALPHA,t.UNSIGNED_BYTE,this.data))}}let D="maplibre_preloaded_worker_pool";class O{constructor(){this.active={}}acquire(e){if(!this.workers)for(this.workers=[];this.workers.lengtht.m(r,i)),j}function V(e,t){let r=e.tileID,i=t.tileID;return r.overscaledZ-i.overscaledZ||r.canonical.y-i.canonical.y||r.wrap-i.wrap||r.canonical.x-i.canonical.x}function q(e,t){let r=e.feature,i=t.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=i}function H(e,r,i,n){return t._(this,void 0,void 0,function*(){let a=e;if(e.url?a=(yield t.k((yield r.transformRequest(e.url,"Source")),i)).data:yield g.frameAsync(i,n),!a)return null;let o=t.V(t.e(a,e),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in a&&a.vector_layers&&(o.vectorLayerIds=a.vector_layers.map(e=>e.id)),o})}class G{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):Array.isArray(e)&&(4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof t.W?new t.W(e.lng,e.lat):t.W.convert(e),this}setSouthWest(e){return this._sw=e instanceof t.W?new t.W(e.lng,e.lat):t.W.convert(e),this}extend(e){let r=this._sw,i=this._ne,n,a;if(e instanceof t.W)n=e,a=e;else{if(!(e instanceof G))return Array.isArray(e)?4===e.length||e.every(Array.isArray)?this.extend(G.convert(e)):this.extend(t.W.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(t.W.convert(e)):this;if(n=e._sw,a=e._ne,!n||!a)return this}return r||i?(r.lng=Math.min(n.lng,r.lng),r.lat=Math.min(n.lat,r.lat),i.lng=Math.max(a.lng,i.lng),i.lat=Math.max(a.lat,i.lat)):(this._sw=new t.W(n.lng,n.lat),this._ne=new t.W(a.lng,a.lat)),this}getCenter(){return new t.W((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new t.W(this.getWest(),this.getNorth())}getSouthEast(){return new t.W(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(e){let{lng:r,lat:i}=t.W.convert(e),n=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(n=this._sw.lng>=r&&r>=this._ne.lng),this._sw.lat<=i&&i<=this._ne.lat&&n}intersects(e){if(!((e=G.convert(e)).getNorth()>=this.getSouth()&&e.getSouth()<=this.getNorth()))return!1;let r=Math.abs(this.getEast()-this.getWest()),i=Math.abs(e.getEast()-e.getWest());if(r>=360||i>=360)return!0;let n=t.X(this.getWest(),-180,180),a=t.X(this.getEast(),-180,180),o=t.X(e.getWest(),-180,180),s=t.X(e.getEast(),-180,180),l=n>a,c=o>s;return!(!l||!c)||(l?s>=n||o<=a:c?a>=o||n<=s:o<=a&&s>=n)}static convert(e){return e instanceof G?e:e&&new G(e)}static fromLngLat(e,r=0){let i=360*r/0x2637f09,n=i/Math.cos(Math.PI/180*e.lat);return new G(new t.W(e.lng-n,e.lat-i),new t.W(e.lng+n,e.lat+i))}adjustAntiMeridian(){let e=new t.W(this._sw.lng,this._sw.lat),r=new t.W(this._ne.lng,this._ne.lat);return new G(e,e.lng>r.lng?new t.W(r.lng+360,r.lat):r)}}class W{constructor(e,t,r){this.bounds=G.convert(this.validateBounds(e)),this.minzoom=t||0,this.maxzoom=r||24}validateBounds(e){return Array.isArray(e)&&4===e.length?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){let r=Math.pow(2,e.z),i=Math.floor(t.Z(this.bounds.getWest())*r),n=Math.floor(t.Y(this.bounds.getNorth())*r),a=Math.ceil(t.Z(this.bounds.getEast())*r),o=Math.ceil(t.Y(this.bounds.getSouth())*r);return e.x>=i&&e.x=n&&e.y{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return t.e({},this._options)}loadTile(e){return t._(this,void 0,void 0,function*(){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),r={request:yield this.map._requestManager.transformRequest(t,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(e),etag:e.etag};r.request.collectResourceTiming=this._collectResourceTiming;let i="RT";if(e.actor&&"expired"!==e.state){if("loading"===e.state)return new Promise((t,r)=>{e.reloadPromise={resolve:t,reject:r}})}else e.actor=this.dispatcher.getActor(),i="LT";e.abortController=new AbortController;try{let t=yield e.actor.sendAsync({type:i,data:r},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,t);let n={};return t?.etagUnmodified&&(n.unmodified=!0),n}catch(t){if(delete e.abortController,e.aborted)return;if(t&&404!==t.status)throw t;this._afterTileLoadWorkerResponse(e,null)}})}_getOverzoomParameters(e){return t._(this,void 0,void 0,function*(){if(e.tileID.canonical.z<=this.maxzoom||void 0===this.map._zoomLevelsToOverscale)return;let t=e.tileID.scaledTo(this.maxzoom).canonical,r=t.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:t,overzoomRequest:yield this.map._requestManager.transformRequest(r,"Tile")}})}_afterTileLoadWorkerResponse(e,t){if(t?.resourceTiming&&(e.resourceTiming=t.resourceTiming),t&&this.map._refreshExpiredTiles&&e.setExpiryData(t),e.etag=t?.etag,e.loadVectorData(t,this.map.painter),e.reloadPromise){let t=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(t.resolve).catch(t.reject)}}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Z extends t.E{constructor(e,r,i,n){super(),this.id=e,this.dispatcher=i,this.setEventedParent(n),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.e({type:"raster"},r),t.e(this,t.V(r,["url","scheme","tileSize"]))}load(){return t._(this,arguments,void 0,function*(e=!1){this._loaded=!1,this.fire(new t.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let r=yield H(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,r&&(t.e(this,r),r.bounds&&(this.tileBounds=new W(r.bounds,this.minzoom,this.maxzoom)),this.fire(new t.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:e})))}catch(e){this._tileJSONRequest=null,this._loaded=!0,t.$(e)||this.fire(new t.l(t.d(e)))}})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return t.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return t._(this,void 0,void 0,function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{let i=yield l.getImage((yield this.map._requestManager.transformRequest(r,"Tile")),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(i?.data){this.map._refreshExpiredTiles&&(i.cacheControl||i.expires)&&e.setExpiryData({cacheControl:i.cacheControl,expires:i.expires});let r=this.map.painter.context,n=r.gl,a=i.data;e.texture=this.map.painter.getTileTexture(a.width),e.texture?e.texture.update(a,{useMipmap:!0}):(e.texture=new t.T(r,a,n.RGBA,{useMipmap:!0}),e.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE,n.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}})}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)})}hasTransition(){return!1}}class $ extends Z{constructor(e,r,i,n){super(e,r,i,n),this.type="raster-dem",this.maxzoom=22,this._options=t.e({type:"raster-dem"},r),this.encoding=r.encoding||"mapbox",this.redFactor=r.redFactor,this.greenFactor=r.greenFactor,this.blueFactor=r.blueFactor,this.baseShift=r.baseShift}loadTile(e){return t._(this,void 0,void 0,function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),i=yield this.map._requestManager.transformRequest(r,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{let r=yield l.getImage(i,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(r?.data){let i=r.data;this.map._refreshExpiredTiles&&(r.cacheControl||r.expires)&&e.setExpiryData({cacheControl:r.cacheControl,expires:r.expires});let n=t.b(i)&&t.a0()?i:yield this.readImageNow(i),a={type:this.type,uid:e.uid,source:this.id,rawImageData:n,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(e.actor&&"expired"!==e.state&&"reloading"!==e.state)return;e.actor&&"expired"!==e.state||(e.actor=this.dispatcher.getActor()),e.dem=yield e.actor.sendAsync({type:"LDT",data:a}),e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}})}readImageNow(e){return t._(this,void 0,void 0,function*(){if("u">typeof VideoFrame&&t.a1()){let r=e.width+2,i=e.height+2;try{return new t.R({width:r,height:i},(yield t.a2(e,-1,-1,r,i)))}catch{}}return g.getImageData(e,1)})}_getNeighboringTiles(e){let r=e.canonical,i=Math.pow(2,r.z),n=(r.x-1+i)%i,a=0===r.x?e.wrap-1:e.wrap,o=(r.x+1+i)%i,s=r.x+1===i?e.wrap+1:e.wrap,l={};return l[new t.a3(e.overscaledZ,a,r.z,n,r.y).key]={backfilled:!1},l[new t.a3(e.overscaledZ,s,r.z,o,r.y).key]={backfilled:!1},r.y>0&&(l[new t.a3(e.overscaledZ,a,r.z,n,r.y-1).key]={backfilled:!1},l[new t.a3(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.a3(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+1[e.id,e])),i.update=new Map(null==(r=e.update)?void 0:r.map(e=>[e.id,e])),i}function J(e){return"GeometryCollection"===e.type?e.geometries.flatMap(e=>J(e)):function e(t){return t&&0!==t.length?"number"==typeof t[0]?[t]:t.flatMap(t=>e(t)):[]}(e.coordinates)}function Q(e){let t=new G,r;switch(e.type){case"FeatureCollection":r=e.features.flatMap(e=>J(e.geometry));break;case"Feature":r=J(e.geometry);break;default:r=J(e)}if(0===r.length)return t;for(let e of r){let[r,i]=e;t.extend([r,i])}return t}class ee extends t.E{constructor(e,r,i,n){super(),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:r.data},this.actor=i.getActor(),this.setEventedParent(n),this._data="string"==typeof r.data?{url:r.data}:{geojson:r.data},this._options=t.e({},r),this._collectResourceTiming=r.collectResourceTiming,void 0!==r.maxzoom&&(this.maxzoom=r.maxzoom),r.type&&(this.type=r.type),r.attribution&&(this.attribution=r.attribution),this.promoteId=r.promoteId,void 0!==r.clusterMaxZoom&&this.maxzoom<=r.clusterMaxZoom&&t.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${r.clusterMaxZoom}".`),this.workerOptions=t.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(void 0!==r.buffer?r.buffer:128),tolerance:this._pixelsToTileUnits(void 0!==r.tolerance?r.tolerance:.375),extent:t.a6,maxZoom:this.maxzoom,lineMetrics:r.lineMetrics||!1,generateId:r.generateId||!1,promoteId:"string"==typeof r.promoteId?r.promoteId:void 0,cluster:r.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(r.clusterMaxZoom),minPoints:Math.max(2,r.clusterMinPoints||2),extent:t.a6,radius:this._pixelsToTileUnits(r.clusterRadius||50),log:!1,generateId:r.generateId||!1}},clusterProperties:r.clusterProperties,filter:r.filter},r.workerOptions)}_hasPendingWorkerUpdate(){return void 0!==this._pendingWorkerUpdate.data||void 0!==this._pendingWorkerUpdate.diff||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(e){return e*(t.a6/this.tileSize)}_getClusterMaxZoom(e){let r=e?Math.round(e):this.maxzoom-1;return Number.isInteger(e)||void 0===e||t.w(`Integer expected for option 'clusterMaxZoom': provided value "${e}" rounded to "${r}"`),r}load(){return t._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(e){this.map=e,this.load()}setData(e,t){this._data="string"==typeof e?{url:e}:{geojson:e},this._pendingWorkerUpdate={data:e};let r=this._updateWorkerData();return t?r:this}updateData(e,t){this._pendingWorkerUpdate.diff=function(e,t){let r;if(!e)return t||{};if(!t)return e||{};let i=K(e),n=K(t);for(let e of(n.removeAll&&(i.add.clear(),i.update.clear(),i.remove.clear(),n.remove.clear()),n.remove))i.add.delete(e),i.update.delete(e);for(let[e,t]of n.update){let r=i.update.get(e);r&&(n.update.set(e,function(e,t){let r={id:e.id};if(t.removeAllProperties&&(delete e.removeProperties,delete e.addOrUpdateProperties,delete t.removeProperties),t.removeProperties)for(let r of t.removeProperties){let t=e.addOrUpdateProperties.findIndex(e=>e.key===r);t>-1&&e.addOrUpdateProperties.splice(t,1)}return(e.removeAllProperties||t.removeAllProperties)&&(r.removeAllProperties=!0),(e.removeProperties||t.removeProperties)&&(r.removeProperties=[...e.removeProperties||[],...t.removeProperties||[]]),(e.addOrUpdateProperties||t.addOrUpdateProperties)&&(r.addOrUpdateProperties=[...e.addOrUpdateProperties||[],...t.addOrUpdateProperties||[]]),(e.newGeometry||t.newGeometry)&&(r.newGeometry=t.newGeometry||e.newGeometry),r}(r,t)),i.update.delete(e))}let a={};if((i.removeAll||n.removeAll)&&(a.removeAll=!0),a.remove=new Set([...i.remove,...n.remove]),a.add=new Map([...i.add,...n.add]),a.update=new Map([...i.update,...n.update]),a.remove.size&&a.add.size)for(let e of a.add.keys())a.remove.delete(e);return r={},a.removeAll&&(r.removeAll=a.removeAll),a.remove&&(r.remove=Array.from(a.remove)),a.add&&(r.add=Array.from(a.add.values())),a.update&&(r.update=Array.from(a.update.values())),r}(this._pendingWorkerUpdate.diff,e);let r=this._updateWorkerData();return t?r:this}getData(){return t._(this,void 0,void 0,function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}})}getBounds(){return t._(this,void 0,void 0,function*(){return Q((yield this.getData()))})}setClusterOptions(e){return this.workerOptions.geojsonVtOptions.cluster=e.cluster,void 0!==e.clusterRadius&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(e.clusterRadius)),void 0!==e.clusterMaxZoom&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(e.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(e){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:e,source:this.id}})}getClusterChildren(e){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:e,source:this.id}})}getClusterLeaves(e,t,r){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:e,limit:t,offset:r}})}_updateWorkerData(){return t._(this,void 0,void 0,function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void t.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:e,diff:r,updateCluster:i}=this._pendingWorkerUpdate,n=this._getLoadGeoJSONParameters(e,r,i);void 0!==e?this._pendingWorkerUpdate.data=void 0:r?this._pendingWorkerUpdate.diff=void 0:i&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(n)})}_getLoadGeoJSONParameters(e,r,i){return t._(this,void 0,void 0,function*(){let n=t.e({type:this.type},this.workerOptions);return"string"==typeof e?(n.request=yield this.map._requestManager.transformRequest(g.resolveURL(e),"Source"),n.request.collectResourceTiming=this._collectResourceTiming,n):void 0!==e?(n.data=e,n):r?(n.dataDiff=r,n):i?(n.updateCluster=!0,n):void 0})}_dispatchWorkerUpdate(e){return t._(this,void 0,void 0,function*(){this._isUpdatingWorker=!0,this.fire(new t.n("dataloading",{dataType:"source"}));try{let r=yield e,i=yield this.actor.sendAsync({type:"LD",data:r});if(this._isUpdatingWorker=!1,this._removed||i.abandoned)return void this.fire(new t.n("dataabort",{dataType:"source"}));i.data&&(this._data={geojson:i.data});let n=this._applyDiffToSource(r.dataDiff),a=this._getShouldReloadTileOptions(n),o={dataType:"source"};this._applyResourceTiming(o,i),this.fire(new t.n("data",Object.assign(Object.assign({},o),{sourceDataType:"metadata"}))),this.fire(new t.n("data",Object.assign(Object.assign({},o),{sourceDataType:"content",shouldReloadTileOptions:a})))}catch(e){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new t.n("dataabort",{dataType:"source"}));this.fire(new t.l(t.d(e)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}})}_applyResourceTiming(e,r){var i;if(!this._collectResourceTiming)return;let n=null==(i=r.resourceTiming)?void 0:i[this.id];if(!n)return;let a=n.slice(0);a?.length&&t.e(e,{resourceTiming:a})}_applyDiffToSource(e){if(!e)return;let t="string"==typeof this.promoteId?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let e=function(e,t){let r=new Map;if(null==e||null==e.type)return r;if("Feature"===e.type){let i=X(e,t);return null==i?void 0:(r.set(i,e),r)}if("FeatureCollection"===e.type){let i=new Set;for(let n of e.features){let e=X(n,t);if(null==e||i.has(e))return;i.add(e),r.set(e,n)}return r}}(this._data.geojson,t);if(!e)throw Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:e}}if(!this._data.updateable)return;let r=function(e,t,r){var i,n;let a=[];if(t.removeAll)e.clear();else if(t.remove)for(let r of t.remove){let t=e.get(r);t&&(a.push(t.geometry),e.delete(r))}if(t.add)for(let i of t.add){let t=X(i,r);if(null==t)continue;let n=e.get(t);n&&a.push(n.geometry),a.push(i.geometry),e.set(t,i)}if(t.update)for(let r of t.update){let t=e.get(r.id);if(!t)continue;let o=!!r.newGeometry,s=r.removeAllProperties||(null==(i=r.removeProperties)?void 0:i.length)>0||(null==(n=r.addOrUpdateProperties)?void 0:n.length)>0;if(!o&&!s)continue;a.push(t.geometry);let l=Object.assign({},t);if(e.set(r.id,l),o&&(a.push(r.newGeometry),l.geometry=r.newGeometry),s){if(l.properties=r.removeAllProperties?{}:Object.assign({},l.properties||{}),r.removeProperties)for(let e of r.removeProperties)delete l.properties[e];if(r.addOrUpdateProperties)for(let{key:e,value:t}of r.addOrUpdateProperties)l.properties[e]=t}}return a}(this._data.updateable,e,t);return e.removeAll||this._options.cluster?void 0:r}_getShouldReloadTileOptions(e){if(e)return{affectedBounds:e.filter(Boolean).map(e=>Q(e))}}shouldReloadTile(e,{affectedBounds:r}){if("loading"===e.state)return!0;if("unloaded"===e.state)return!1;let{buffer:i,extent:n}=this.workerOptions.geojsonVtOptions,a=function({x:e,y:r,z:i},n=0){return new G([t.a4((e-n)/Math.pow(2,i)),t.a5((r+1+n)/Math.pow(2,i))],[t.a4((e+1+n)/Math.pow(2,i)),t.a5((r-n)/Math.pow(2,i))])}(e.tileID.canonical,i/n);for(let e of r)if(a.intersects(e))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(e){return t._(this,void 0,void 0,function*(){let t=e.actor?"RT":"LT";e.actor=this.actor;let r={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};e.abortController=new AbortController;let i=yield this.actor.sendAsync({type:t,data:r},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(i,this.map.painter,"RT"===t)})}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return t.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class et extends t.E{constructor(e,t,r,i){super(),this.flippedWindingOrder=!1,this.id=e,this.dispatcher=r,this.coordinates=t.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=t}load(e){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let t=yield l.getImage((yield this.map._requestManager.transformRequest(this.url,"Image")),this._request);this._request=null,this._loaded=!0,t?.data&&(this.image=t.data,e&&(this.coordinates=e),this._finishLoading())}catch(e){this._request=null,this._loaded=!0,t.$(e)||this.fire(new t.l(t.d(e)))}})}loaded(){return this._loaded}updateImage(e){return e.url&&(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally(()=>this.texture=null)),this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){var r;let i,n,a;this.coordinates=e;let o=e.map(t.a7.fromLngLat);return this.tileID=(a=Math.pow(2,n=Math.max(0,Math.floor(-Math.log(Math.max((i=t.a8.fromPoints(o)).width(),i.height()))/Math.LN2))),new t.aa(n,Math.floor((i.minX+i.maxX)/2*a),Math.floor((i.minY+i.maxY)/2*a))),this.terrainTileRanges=this._getOverlappingTileRanges(o),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=o.map(e=>this.tileID.getTilePoint(e)._round()),this.flippedWindingOrder=((r=this.tileCoords)[1].x-r[0].x)*(r[2].y-r[0].y)-(r[1].y-r[0].y)*(r[2].x-r[0].x)<0,this.fire(new t.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;let e=this.map.painter.context,r=e.gl;this.texture||(this.texture=new t.T(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let i=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,i=!0)}i&&this.fire(new t.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return t._(this,void 0,void 0,function*(){var t;null!=(t=this.tileID)&&t.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(e){let{minX:r,minY:i,maxX:n,maxY:a}=t.a8.fromPoints(e),o={};for(let e=0;e<=t.a9;e++){let t=Math.pow(2,e),s=Math.floor(r*t),l=Math.floor(i*t),c=Math.floor(n*t),u=Math.floor(a*t),h=(s%t+t)%t,d=c%t,f=Math.floor(s/t),p=Math.floor(c/t);o[e]={minWrap:f,maxWrap:p,minTileXWrapped:h,maxTileXWrapped:d,minTileY:l,maxTileY:u}}return o}}class er extends et{constructor(e,t,r,i){super(e,t,r,i),this._onPlayingHandler=()=>{var e;null==(e=this.map)||e.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=t}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1;let e=this.options;for(let t of(this.urls=[],e.urls))this.urls.push((yield this.map._requestManager.transformRequest(t,"Source")).url);try{let e=yield t.ab(this.urls);if(this._loaded=!0,!e)return;this.video=e,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(e){this.fire(new t.l(t.d(e)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){let r=this.video.seekable;er.end(0)?this.fire(new t.l(new t.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${r.start(0)} and ${r.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;let e=this.map.painter.context,r=e.gl;this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.T(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let i=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,i=!0)}i&&this.fire(new t.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class ei extends et{constructor(e,r,i,n){super(e,r,i,n),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some(e=>!Array.isArray(e)||2!==e.length||e.some(e=>"number"!=typeof e))||this.fire(new t.l(new t.ac(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.l(new t.ac(`sources.${e}`,null,'missing required property "coordinates"'))),r.animate&&"boolean"!=typeof r.animate&&this.fire(new t.l(new t.ac(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r.canvas||r.canvas instanceof HTMLCanvasElement||this.fire(new t.l(new t.ac(`sources.${e}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.l(new t.ac(`sources.${e}`,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}load(){return t._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.l(Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||0===Object.keys(this.tiles).length)return;let r=this.map.painter.context,i=r.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new t.T(r,this.canvas,i.RGBA,{premultiply:!0}),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let n=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,n=!0)}n&&this.fire(new t.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}let en={},ea=e=>{switch(e){case"geojson":return ee;case"image":return et;case"raster":return Z;case"raster-dem":return $;case"vector":return Y;case"video":return er;case"canvas":return ei}return en[e]},eo="RTLPluginLoaded";class es extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=U()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(e=>{throw this.status="error",e})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return t._(this,arguments,void 0,function*(e,t=!1){if(this.url)throw Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=g.resolveURL(e),!this.url)throw Error(`requested url ${e} is invalid`);if("unavailable"===this.status){if(!t)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if("requested"===this.status)return this._requestImport()})}_requestImport(){return t._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new t.n(eo))})}lazyLoad(){"unavailable"===this.status?this.status="requested":"deferred"===this.status&&this._requestImport()}}let el=null;function ec(){return el||(el=new es),el}(a=c||(c={}))[a.Base=0]="Base",a[a.Parent=1]="Parent",(o=u||(u={}))[o.Departing=0]="Departing",o[o.Incoming=1]="Incoming";class eu{constructor(e,r){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=e,this.uid=t.ad(),this.uses=0,this.tileSize=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(e){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(e||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:e,fadingDirection:t,fadingParentID:r,fadeEndTime:i}){this.resetFadeLogic(),this.fadingRole=e,this.fadingDirection=t,this.fadingParentID=r,this.fadeEndTime=i}setSelfFadeLogic(e){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=e}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=v(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(e,r,i){if(e?.etagUnmodified!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){for(let n in e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestEncoding=e.encoding,this.latestFeatureIndex.rawTileData=e.rawTileData,this.latestFeatureIndex.encoding=e.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(e,t){let r={};if(!t)return r;for(let i of e){let e=i.layerIds.map(e=>t.getLayer(e)).filter(Boolean);if(0!==e.length)for(let t of(i.layers=e,i.stateDependentLayerIds&&(i.stateDependentLayers=i.stateDependentLayerIds.map(t=>e.filter(e=>e.id===t)[0])),e))r[t.id]=i}return r}(e.buckets,r?.style),this.hasSymbolBuckets=!1,this.buckets){let e=this.buckets[n];if(e instanceof t.af){if(this.hasSymbolBuckets=!0,!i)break;e.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let e in this.buckets){let r=this.buckets[e];if(r instanceof t.af&&r.hasRTLText){this.hasRTLText=!0,ec().lazyLoad();break}}for(let e in this.queryPadding=0,this.buckets){let t=this.buckets[e];this.queryPadding=Math.max(this.queryPadding,r.style.getLayer(e).queryRadius(t))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage),this.dashPositions=e.dashPositions}else this.collisionBoxArray=new t.ae;else this.state="loaded"}unloadVectorData(){for(let e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(let t in this.buckets){let r=this.buckets[t];r.uploadPending()&&r.upload(e)}let r=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new t.T(e,this.imageAtlas.image,r.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new t.T(e,this.glyphAtlasImage,r.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,r,i,n,a,o,s,l,c,u){var h;return null!=(h=this.latestFeatureIndex)&&h.rawTileData?this.latestFeatureIndex.query({queryGeometry:i,cameraQueryGeometry:n,scale:a,tileSize:this.tileSize,pixelPosMatrix:c,transform:s,params:o,queryPadding:this.queryPadding*l,getElevation:u},e,t,r):{}}querySourceFeatures(e,r){let i=this.latestFeatureIndex;if(!i?.rawTileData)return;let n=i.loadVTLayers(),a=r?.sourceLayer?r.sourceLayer:"",o=n[t.ag]||n[a];if(!o)return;let s=t.ah(r?.filter,r?.globalState),{z:l,x:c,y:u}=this.tileID.canonical,h={z:l,x:c,y:u};for(let r=0;re)t=!1;else if(r)if(this.expirationTime({zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}),b=[],_=[];if(e.renderWorldCopies&&s.allowWorldCopies())for(let e=1;e<=3;e++)b.push(x(-e)),b.push(x(e));for(b.push(x(0));b.length>0;){let f=b.pop(),g=f.x,x=f.y,w=f.fullyVisible,T={x:g,y:x,z:f.zoom},M=s.getTileBoundingVolume(T,f.wrap,e.elevation,r);if(!w){let e=function(e,t,r){let i=t.intersectsFrustum(e);if(!r||0===i)return i;let n=t.intersectsPlane(r);return 0===n?0:2===i&&2===n?2:1}(i,M,n);if(0===e)continue;w=2===e}let k=s.distanceToTile2d(a.x,a.y,T,M),A=c;l&&(A=(r.calculateTileZoom||eb)(e.zoom+t.ar(e.tileSize/r.tileSize),k,y,v,e.fov));let S=Math.min(A=Math.max(0,A=(r.roundZoom?Math.round:Math.floor)(A)),h);if(f.wrap=s.getWrap(o,T,f.wrap),f.zoom>=S){if(f.zoom>1),wrap:f.wrap,fullyVisible:w})}return _.sort((e,t)=>e.distanceSq-t.distanceSq).map(e=>e.tileID)}let eT=t.a8.fromPoints([new t.P(0,0),new t.P(t.a6,t.a6)]);function eM(e){return"raster"===e||"image"===e||"video"===e}function ek(e,t,r,i,n,a,o){if(r[0].overscaledZ>=a)return!1;let s=!1;for(let a of r){let r=e.getLoadedTile(a);if(!r)continue;let{fadingRole:l,fadingDirection:h,fadingParentID:d}=r;l===c.Base&&h===u.Departing&&d||(r.setCrossFadeLogic({fadingRole:c.Base,fadingDirection:u.Departing,fadingParentID:t.tileID,fadeEndTime:n+o}),t.setCrossFadeLogic({fadingRole:c.Parent,fadingDirection:u.Incoming,fadeEndTime:n+o})),i[a.key]=a,s=!0}return s}function eA(e,t){var r;e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0;let i=t.tileID.canonical.x-e.tileID.canonical.x,n=t.tileID.canonical.y-e.tileID.canonical.y,a=Math.pow(2,e.tileID.canonical.z),o=t.tileID.key;0===i&&0===n||Math.abs(n)>1||(Math.abs(i)>1&&(1===Math.abs(i+a)?i+=a:1===Math.abs(i-a)&&(i-=a)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,i,n),null!=(r=e.neighboringTiles)&&r[o]&&(e.neighboringTiles[o].backfilled=!0)))}class eS{constructor(){this._tiles={}}handleWrapJump(e){let t={};for(let r in this._tiles){let i=this._tiles[r];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+e),t[i.tileID.key]=i}this._tiles=t}setFeatureState(e,t){for(let r in this._tiles)this._tiles[r].setFeatureState(e,t)}getAllTiles(){return Object.values(this._tiles)}getAllIds(e=!1){return e?Object.values(this._tiles).map(e=>e.tileID).sort(t.au).map(e=>e.key):Object.keys(this._tiles)}getTileById(e){return this._tiles[e]}setTile(e,t){this._tiles[e]=t}deleteTileById(e){delete this._tiles[e]}getLoadedTile(e){let t=this.getTileById(e.key);return t?.hasData()?t:null}isIdRenderable(e,t=!1){var r;return null==(r=this.getTileById(e))?void 0:r.isRenderable(t)}getRenderableIds(e=0,r){let i=[];for(let e of this.getAllIds())this.isIdRenderable(e,r)&&i.push(this.getTileById(e));return r?i.sort((r,i)=>{let n=r.tileID,a=i.tileID,o=new t.P(n.canonical.x,n.canonical.y)._rotate(-e),s=new t.P(a.canonical.x,a.canonical.y)._rotate(-e);return n.overscaledZ-a.overscaledZ||s.y-o.y||s.x-o.x}).map(e=>e.tileID.key):i.map(e=>e.tileID).sort(t.au).map(e=>e.key)}}class eE extends t.E{constructor(e,r,i){super(),this.id=e,this.dispatcher=i,this.on("data",e=>{this._dataHandler(e)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((e,t,r,i)=>{let n=new(ea(t.type))(e,t,r,i);if(n.id!==e)throw Error(`Expected Source id to be ${e} instead of ${n.id}`);return n})(e,r,i,this),this._inViewTiles=new eS,this._outOfViewCache=new t.av(0,e=>this._unloadTile(e)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new eh,this._didEmitContent=!1,this._updated=!1}onAdd(e){var t;this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,null!=(t=this._source)&&t.onAdd&&this._source.onAdd(e)}onRemove(e){var t;for(let e of this._inViewTiles.getAllTiles())e.unloadVectorData();this.clearTiles(),null!=(t=this._source)&&t.onRemove&&this._source.onRemove(e),this._inViewTiles=new eS}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(void 0===this.used&&void 0===this.usedForTerrain||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let e of this._inViewTiles.getAllTiles())if("loaded"!==e.state&&"errored"!==e.state)return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,r,i){return t._(this,void 0,void 0,function*(){try{let t=yield this._source.loadTile(e);this._tileLoaded(e,r,i,t)}catch(r){e.state="errored",404!==r.status?this._source.fire(new t.l(t.d(r),{tile:e})):this.update(this.transform,this.terrain)}})}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new t.n("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){for(let t of(this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null),this._inViewTiles.getAllTiles()))t.upload(e),t.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(e){var t;return this._inViewTiles.getRenderableIds(null==(t=this.transform)?void 0:t.bearingInRadians,e)}hasRenderableParent(e){let t=e.overscaledZ-1;if(t>=this._source.minzoom){let r=this.getLoadedTile(e.scaledTo(t));if(r)return this._inViewTiles.isIdRenderable(r.tileID.key)}return!1}reload(e,t){if(this._paused)this._shouldReloadOnResume=!0;else for(let r of(this._outOfViewCache.reset(),this._inViewTiles.getAllIds())){let i=this._inViewTiles.getTileById(r);t&&!this._source.shouldReloadTile(i,t)||(e?this._reloadTile(r,"expired"):"errored"!==i.state&&this._reloadTile(r,"reloading"))}}_reloadTile(e,r){return t._(this,void 0,void 0,function*(){let t=this._inViewTiles.getTileById(e);t&&("loading"!==t.state&&(t.state=r),yield this._loadTile(t,e,r))})}_tileLoaded(e,r,i,n){e.timeAdded=v(),e.selfFading&&(e.fadeEndTime=e.timeAdded+this._rasterFadeDuration),"expired"===i&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),n?.unmodified||("raster-dem"===this.getSource().type&&e.dem&&function(e,t){var r,i,n;for(let a of t.getRenderableIds()){if(!(null!=(r=e.neighboringTiles)&&r[a]))continue;let o=t.getTileById(a);e.neighboringTiles[a].backfilled||eA(e,o),null!=(n=null==(i=o.neighboringTiles)?void 0:i[e.tileID.key])&&n.backfilled||eA(o,e)}}(e,this._inViewTiles),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new t.n("data",{dataType:"source",tile:e,coord:e.tileID})))}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._inViewTiles.getTileById(e)}_retainLoadedChildren(e,t){let r=this._getLoadedDescendents(t),i=new Set;for(let n of t){let t=r[n.key];if(!t?.length){i.add(n);continue}let a=n.overscaledZ+eE.maxOverzooming,o=t.filter(e=>e.tileID.overscaledZ<=a);if(!o.length){i.add(n);continue}let s=Math.min(...o.map(e=>e.tileID.overscaledZ)),l=o.filter(e=>e.tileID.overscaledZ===s).map(e=>e.tileID);for(let t of l)e[t.key]=t;this._areDescendentsComplete(l,s,n.overscaledZ)||i.add(n)}return i}_getLoadedDescendents(e){var t;let r={};for(let i of this._inViewTiles.getAllTiles().filter(e=>e.hasData()))for(let n of e)i.tileID.isChildOf(n)&&(r[t=n.key]||(r[t]=[]),r[n.key].push(i));return r}_areDescendentsComplete(e,t,r){return 1===e.length&&e[0].isOverscaled()?e[0].overscaledZ===t:Math.pow(4,t-r)===e.length}getLoadedTile(e){return this._inViewTiles.getLoadedTile(e)}updateCacheSize(e){let r=Math.floor((Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1)*(null===this._maxTileCacheZoomLevels?t.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),i="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._outOfViewCache.setMaxSize(i)}handleWrapJump(e){let t=Math.round((e-(void 0===this._prevLng?e:this._prevLng))/360);this._prevLng=e,t&&(this._inViewTiles.handleWrapJump(t),this._resetTileReloadTimers())}update(e,r){let i;if(!this._sourceLoaded||this._paused)return;this.transform=e,this.terrain=r,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(e=>new t.a3(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)):(i=ew(e,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:"vector"===this._source.type&&void 0!==this.map._zoomLevelsToOverscale?e.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:r,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(i=i.filter(e=>this._source.hasTile(e)))):i=[],this.usedForTerrain&&(i=this._addTerrainIdealTiles(i));let n=0===i.length&&!this._updated&&this._didEmitContent;this._updated=!0,n&&this.fire(new t.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let a=e_(e,this._source),o=this._updateRetainedTiles(i,a),s=eM(this._source.type);s&&this._rasterFadeDuration>0&&!r&&function(e,r,i,n,a,o,s){let l=v(),h=t.at(r);for(let t of r){let r=e.getTileById(t.key);r.fadingDirection!==u.Departing&&0!==r.fadeOpacity||r.resetFadeLogic(),function(e,t,r,i,n,a,o){if(!t.hasData())return!1;let{tileID:s,fadingRole:l,fadingDirection:h,fadingParentID:d}=t;if(l===c.Base&&h===u.Incoming&&d)return r[d.key]=d,!0;let f=Math.max(s.overscaledZ-n,a);for(let n=s.overscaledZ-1;n>=f;n--){let a=s.scaledTo(n),l=e.getLoadedTile(a);if(l)return t.setCrossFadeLogic({fadingRole:c.Base,fadingDirection:u.Incoming,fadingParentID:l.tileID,fadeEndTime:i+o}),l.setCrossFadeLogic({fadingRole:c.Parent,fadingDirection:u.Departing,fadeEndTime:i+o}),r[a.key]=a,!0}return!1}(e,r,i,l,n,a,s)||function(e,t,r,i,n,a){if(!t.hasData())return!1;let o=t.tileID.children(n),s=ek(e,t,o,r,i,n,a);if(s)return!0;for(let l of o)ek(e,t,l.children(n),r,i,n,a)&&(s=!0);return s}(e,r,i,l,o,s)||function(e,t,r,i){let n=e.tileID;return!!e.selfFading||!e.hasData()&&!!t.has(n)&&(e.setSelfFadeLogic(r+i),!0)}(r,h,l,s)||r.resetFadeLogic()}}(this._inViewTiles,i,o,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),s?this._cleanUpRasterTiles(o):this._cleanUpVectorTiles(o)}_cleanUpRasterTiles(e){for(let t of this._inViewTiles.getAllIds())e[t]||this._removeTile(t)}_cleanUpVectorTiles(e){for(let t of this._inViewTiles.getAllIds()){let r=this._inViewTiles.getTileById(t);e[t]?r.clearSymbolFadeHold():r.hasSymbolBuckets?r.holdingForSymbolFade()?r.symbolFadeFinished()&&this._removeTile(t):r.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(t)}}_addTerrainIdealTiles(e){let t=[];for(let r of e)if(r.canonical.z>this._source.minzoom){let e=r.scaledTo(r.canonical.z-1);t.push(e);let i=r.scaledTo(Math.max(this._source.minzoom,Math.min(r.canonical.z,5)));t.push(i)}return e.concat(t)}releaseSymbolFadeTiles(){for(let e of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(e).holdingForSymbolFade()&&this._removeTile(e)}_updateRetainedTiles(e,t){var r;let i=new Set;for(let t of e)this._addTile(t).hasData()||i.add(t);let n=e.reduce((e,t)=>(e[t.key]=t,e),{}),a=this._retainLoadedChildren(n,i),o={},s=Math.max(t-eE.maxUnderzooming,this._source.minzoom);for(let e of a){let t=this._inViewTiles.getTileById(e.key),i=t?.wasRequested();for(let a=e.overscaledZ-1;a>=s;--a){let s=e.scaledTo(a);if(o[s.key])break;if(o[s.key]=!0,(t=this.getTile(s))||!i||(t=this._addTile(s)),t){let e=t.hasData();if((e||!(null!=(r=this.map)&&r.cancelPendingTileRequestsWhileZooming)||i)&&(n[s.key]=s),i=t.wasRequested(),e)break}}}return n}_addTile(e){let r=this._inViewTiles.getTileById(e.key);if(r)return r;(r=this._outOfViewCache.getAndRemove(e))&&(r.resetFadeLogic(),this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null));let i=r;return r||(r=new eu(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,e.key,r.state)),r.uses++,this._inViewTiles.setTile(e.key,r),i||this._source.fire(new t.n("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r}_setTileReloadTimer(e,t){this._clearTileReloadTimer(e);let r=t.getExpiryTimeout();r&&(this._timers[e]=setTimeout(()=>{this._reloadTile(e,"expired"),delete this._timers[e]},r))}_clearTileReloadTimer(e){let t=this._timers[e];t&&(clearTimeout(t),delete this._timers[e])}_resetTileReloadTimers(){for(let e in this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(let e of this._inViewTiles.getAllIds()){let t=this._inViewTiles.getTileById(e);this._setTileReloadTimer(e,t)}}refreshTiles(e){for(let t of this._inViewTiles.getAllIds()){let r=this._inViewTiles.getTileById(t);(this._inViewTiles.isIdRenderable(t)||"errored"==r.state)&&e.some(e=>e.equals(r.tileID.canonical))&&this._reloadTile(t,"expired")}}_removeTile(e){let t=this._inViewTiles.getTileById(e);t&&(t.uses--,this._inViewTiles.deleteTileById(e),this._clearTileReloadTimer(e),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._outOfViewCache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))}_dataHandler(e){"source"===e.dataType&&("metadata"!==e.sourceDataType?"content"===e.sourceDataType&&this._sourceLoaded&&!this._paused&&(this.reload(e.sourceDataChanged,e.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){for(let e of(this._shouldReloadOnResume=!1,this._paused=!1,this._inViewTiles.getAllIds()))this._removeTile(e);this._outOfViewCache.reset()}tilesIn(e,r,i){let n=[],a=this.transform;if(!a)return n;let o=a.getCoveringTilesDetailsProvider().allowWorldCopies(),s=i?a.getCameraQueryGeometry(e):e,l=e=>a.screenPointToMercatorCoordinate(e,this.terrain),c=this.transformBbox(e,l,!o),u=this.transformBbox(s,l,!o),h=this.getIds(),d=t.a8.fromPoints(u);for(let e of h){let i=this._inViewTiles.getTileById(e);if(i.holdingForSymbolFade())continue;let s=o?[i.tileID]:[i.tileID.unwrapTo(-1),i.tileID.unwrapTo(0)],l=Math.pow(2,a.zoom-i.tileID.overscaledZ),h=r*i.queryPadding*t.a6/i.tileSize/l;for(let e of s){let r=d.map(r=>e.getTilePoint(new t.a7(r.x,r.y)));if(r.expandBy(h),r.intersects(eT)){let t=c.map(t=>e.getTilePoint(t)),r=u.map(t=>e.getTilePoint(t));n.push({tile:i,tileID:o?e:e.unwrapTo(0),queryGeometry:t,cameraQueryGeometry:r,scale:l})}}}return n}transformBbox(e,r,i){let n=e.map(r);if(i){let i=t.a8.fromPoints(e);i.shrinkBy(.001*Math.min(i.width(),i.height()));let a=i.map(r);t.a8.fromPoints(n).covers(a)||(n=n.map(e=>e.x>.5?new t.a7(e.x-1,e.y,e.z):e))}return n}getVisibleCoordinates(e){let t=this.getRenderableIds(e).map(e=>this._inViewTiles.getTileById(e).tileID);return this.transform&&this.transform.populateCache(t),t}hasTransition(){return!!this._source.hasTransition()||eM(this._source.type)&&function(e,t){if(t<=0)return!1;let r=v();for(let t of e.getAllTiles())if(t.fadeEndTime>=r)return!0;return!1}(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(e){this._rasterFadeDuration=e}setFeatureState(e,r,i){e||(e=t.ag),this._state.updateState(e,r,i)}removeFeatureState(e,r,i){e||(e=t.ag),this._state.removeFeatureState(e,r,i)}getFeatureState(e,r){return e||(e=t.ag),this._state.getState(e,r)}setDependencies(e,t,r){let i=this._inViewTiles.getTileById(e);i&&i.setDependencies(t,r)}reloadTilesForDependencies(e,t){for(let r of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(r).hasDependency(e,t)&&this._reloadTile(r,"reloading");this._outOfViewCache.filter(r=>!r.hasDependency(e,t))}areTilesLoaded(){for(let e of this._inViewTiles.getAllTiles())if("loaded"!==e.state&&"errored"!==e.state)return!1;return!0}}eE.maxUnderzooming=10,eE.maxOverzooming=3;class eC{constructor(e,t){this.reset(e,t)}reset(e,t){this.points=e||[],this._distances=[0];for(let e=1;e0?(n-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))}}function eL(e,t){let r=!0;return"always"===e||"never"!==e&&"never"!==t||(r=!1),r}class eP{constructor(e,t,r){let i=this.boxCells=[],n=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(let e=0;ethis.width||i<0||t>this.height)return[];let s=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=i){if(n)return[{key:null,x1:e,y1:t,x2:r,y2:i}];for(let e=0;e0}hitTestCircle(e,t,r,i,n){let a=e-r,o=e+r,s=t-r,l=t+r;if(o<0||a>this.width||l<0||s>this.height)return!1;let c=[];return this._forEachCell(a,s,o,l,this._queryCellCircle,c,{hitTest:!0,overlapMode:i,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}},n),c.length>0}_queryCell(e,t,r,i,n,a,o,s){let{seenUids:l,hitTest:c,overlapMode:u}=o,h=this.boxCells[n];if(null!==h){let n=this.bboxes;for(let o of h)if(!l.box[o]){l.box[o]=!0;let h=4*o,d=this.boxKeys[o];if(e<=n[h+2]+1e-6&&t<=n[h+3]+1e-6&&r>=n[h+0]-1e-6&&i>=n[h+1]-1e-6&&(!s||s(d))&&(!c||!eL(u,d.overlapMode))&&(a.push({key:d,x1:n[h],y1:n[h+1],x2:n[h+2],y2:n[h+3]}),c))return!0}}let d=this.circleCells[n];if(null!==d){let n=this.circles;for(let o of d)if(!l.circle[o]){l.circle[o]=!0;let h=3*o,d=this.circleKeys[o];if(this._circleAndRectCollide(n[h],n[h+1],n[h+2],e,t,r,i)&&(!s||s(d))&&(!c||!eL(u,d.overlapMode))){let e=n[h],t=n[h+1],r=n[h+2];if(a.push({key:d,x1:e-r,y1:t-r,x2:e+r,y2:t+r}),c)return!0}}}return!1}_queryCellCircle(e,t,r,i,n,a,o,s){let{circle:l,seenUids:c,overlapMode:u}=o,h=this.boxCells[n];if(null!==h){let e=this.bboxes;for(let t of h)if(!c.box[t]){c.box[t]=!0;let r=4*t,i=this.boxKeys[t];if(this._circleAndRectCollide(l.x,l.y,l.radius,e[r+0],e[r+1],e[r+2],e[r+3])&&(!s||s(i))&&!eL(u,i.overlapMode))return a.push(!0),!0}}let d=this.circleCells[n];if(null!==d){let e=this.circles;for(let t of d)if(!c.circle[t]){c.circle[t]=!0;let r=3*t,i=this.circleKeys[t];if(this._circlesCollide(e[r],e[r+1],e[r+2],l.x,l.y,l.radius)&&(!s||s(i))&&!eL(u,i.overlapMode))return a.push(!0),!0}}}_forEachCell(e,t,r,i,n,a,o,s){let l=this._convertToXCellCoord(e),c=this._convertToYCellCoord(t),u=this._convertToXCellCoord(r),h=this._convertToYCellCoord(i);for(let d=l;d<=u;d++)for(let l=c;l<=h;l++)if(n.call(this,e,t,r,i,this.xCellCount*l+d,a,o,s))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,r,i,n,a){let o=i-e,s=n-t,l=r+a;return l*l>o*o+s*s}_circleAndRectCollide(e,t,r,i,n,a,o){let s=(a-i)/2,l=Math.abs(e-(i+s));if(l>s+r)return!1;let c=(o-n)/2,u=Math.abs(t-(n+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;let h=l-s,d=u-c;return h*h+d*d<=r*r}}let eI=t.O();function ez(e,r,i){var n,a,o,s,l;let c=t.O();if(!e){let{vecSouth:e,vecEast:t}=eD(r),i=d();i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],(l=(n=i[0])*(s=i[3])-(o=i[2])*(a=i[1]))&&(i[0]=s*(l=1/l),i[1]=-a*l,i[2]=-o*l,i[3]=n*l),c[0]=i[0],c[1]=i[1],c[4]=i[2],c[5]=i[3]}return t.S(c,c,[1/i,1/i,1]),c}function eD(e){let r=Math.cos(e.rollInRadians),i=Math.sin(e.rollInRadians),n=Math.cos(e.pitchInRadians),a=Math.cos(e.bearingInRadians),o=Math.sin(e.bearingInRadians),s=t.az();s[0]=-a*n*i-o*r,s[1]=-o*n*i+a*r;let l=t.aA(s);l<1e-9?t.aB(s):t.aC(s,s,1/l);let c=t.az();c[0]=a*n*r-o*i,c[1]=o*n*r+a*i;let u=t.aA(c);return u<1e-9?t.aB(c):t.aC(c,c,1/u),{vecEast:c,vecSouth:s}}function eO(e,r,i,n){let a;n?(a=[e,r,n(e,r),1],t.aE(a,a,i)):eZ(a=[e,r,0,1],a,i);let o=a[3];return{point:new t.P(a[0]/o,a[1]/o),signedDistanceFromCamera:o,isOccluded:!1}}function eR(e,t,r,i,n,a,o,s){let l=a.glyphStartIndex+a.numGlyphs,c=a.lineStartIndex,u=a.lineStartIndex+a.lineLength,h=t.getoffsetX(a.glyphStartIndex),d=t.getoffsetX(l-1),f=eG(e*h,r,i,n,a.segment,c,u,s,o);if(!f)return null;let p=eG(e*d,r,i,n,a.segment,c,u,s,o);return p?s.projectionCache.anyProjectionOccluded?null:{first:f,last:p}:null}function eF(e,r,i,n){return e===t.ax.horizontal&&Math.abs(i.y-r.y)>Math.abs(i.x-r.x)*n?{useVertical:!0}:(e===t.ax.vertical?r.yi.x)?{needsFlipping:!0}:null}function ej(e){let{projectionContext:r,pitchedLabelPlaneMatrixInverse:i,symbol:n,fontSize:a,flip:o,keepUpright:s,glyphOffsetArray:l,dynamicLayoutVertexArray:c,aspectRatio:u,rotateToLine:h}=e,d=a/24,f=n.lineOffsetX*d,p=n.lineOffsetY*d,m;if(n.numGlyphs>1){let e=n.glyphStartIndex+n.numGlyphs,t=n.lineStartIndex,a=n.lineStartIndex+n.lineLength,c=eR(d,l,f,p,o,n,h,r);if(!c)return{notEnoughRoom:!0};let g=eV(c.first.point.x,c.first.point.y,r,i),y=eV(c.last.point.x,c.last.point.y,r,i);if(s&&!o){let e=eF(n.writingMode,g,y,u);if(e)return e}m=[c.first];for(let i=n.glyphStartIndex+1;i0?s.point:eB(r.tileAnchorPoint,o,e,1,r),c=eV(e.x,e.y,r,i),h=eV(l.x,l.y,r,i),d=eF(n.writingMode,c,h,u);if(d)return d}let e=eG(d*l.getoffsetX(n.glyphStartIndex),f,p,o,n.segment,n.lineStartIndex,n.lineStartIndex+n.lineLength,r,h);if(!e||r.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};m=[e]}for(let e of m)t.aD(c,e.point,e.angle);return{}}function eB(e,t,r,i,n){let a=e.add(e.sub(t)._unit()),o=eU(a.x,a.y,n).point,s=r.sub(o);return r.add(s._mult(i/s.mag()))}function eN(e,r,i){let n=r.projectionCache;if(n.projections[e])return n.projections[e];let a=new t.P(r.lineVertexArray.getx(e),r.lineVertexArray.gety(e)),o=eU(a.x,a.y,r);if(o.signedDistanceFromCamera>0)return n.projections[e]=o.point,n.anyProjectionOccluded||(n.anyProjectionOccluded=o.isOccluded),o.point;let s=e-i.direction;return eB(0===i.distanceFromAnchor?r.tileAnchorPoint:new t.P(r.lineVertexArray.getx(s),r.lineVertexArray.gety(s)),a,i.previousVertex,i.absOffsetX-i.distanceFromAnchor+1,r)}function eU(e,t,r){let i=e+r.translation[0],n=t+r.translation[1],a;return r.pitchWithMap?(a=eO(i,n,r.pitchedLabelPlaneMatrix,r.getElevation)).isOccluded=!1:((a=r.transform.projectTileCoordinates(i,n,r.unwrappedTileID,r.getElevation)).point.x=(.5*a.point.x+.5)*r.width,a.point.y=(-(.5*a.point.y)+.5)*r.height),a}function eV(e,r,i,n){if(i.pitchWithMap){let a=[e,r,0,1];return t.aE(a,a,n),i.transform.projectTileCoordinates(a[0]/a[3],a[1]/a[3],i.unwrappedTileID,i.getElevation).point}return{x:e/i.width*2-1,y:1-r/i.height*2}}function eq(e,t,r){return r.transform.projectTileCoordinates(e,t,r.unwrappedTileID,r.getElevation)}function eH(e,t,r){return e._unit()._perp()._mult(t*r)}function eG(e,r,i,n,a,o,s,l,c){let u=n?e-r:e+r,h=u>0?1:-1,d=0;n&&(h*=-1,d=Math.PI),h<0&&(d+=Math.PI);let f,p=h>0?o+a:o+a+1;l.projectionCache.cachedAnchorPoint?f=l.projectionCache.cachedAnchorPoint:(f=eU(l.tileAnchorPoint.x,l.tileAnchorPoint.y,l).point,l.projectionCache.cachedAnchorPoint=f);let m,g,y=f,v=f,x=0,b=0,_=Math.abs(u),w=[],T;for(;x+b<=_;){if((p+=h)=s)return null;x+=b,v=y,g=m;let e={absOffsetX:_,direction:h,distanceFromAnchor:x,previousVertex:v};if(y=eN(p,l,e),0===i)w.push(v),T=y.sub(v);else{let r,n=y.sub(v);r=0===n.mag()?eH(eN(p+h,l,e).sub(y),i,h):eH(n,i,h),g||(g=v.add(r)),m=function(e,r,i,n,a,o,s,l,c){if(l.projectionCache.offsets[e])return l.projectionCache.offsets[e];let u=i.add(r);if(e+c.direction=a)return l.projectionCache.offsets[e]=u,u;let h=eN(e+c.direction,l,c),d=eH(h.sub(i),s,c.direction),f=i.add(d),p=h.add(d);return l.projectionCache.offsets[e]=t.aF(o,u,f,p)||u,l.projectionCache.offsets[e]}(p,r,y,o,s,g,i,l,e),w.push(g),T=m.sub(g)}b=T.mag()}let M=T._mult((_-x)/b)._add(g||v),k=d+Math.atan2(y.y-v.y,y.x-v.x);return w.push(M),{point:M,angle:c?k:0,path:w}}let eW=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function eY(e,t){for(let r=0;r=1;e--)f.push(o.path[e]);for(let e=1;ee.signedDistanceFromCamera<=0)?[]:e.map(e=>e.point)}let g=[];if(f.length>0){let e=f[0].clone(),r=f[0].clone();for(let t=1;t=i.x&&r.x<=n.x&&e.y>=i.y&&r.y<=n.y?[f]:r.xn.x||r.yn.y?[]:t.aG([f],i.x,i.y,n.x,n.y)}for(let t of g){a.reset(t,.25*r);let i=0;i=a.length<=.5*r?1:Math.ceil(a.paddedLength/p)+1;for(let t=0;tr&&(r=n,t=i);return e.slice(t,t+r)}((i=1/((r=t.pitchedLabelPlaneMatrix)[0]*r[5]-r[1]*r[4]),eI[0]=r[5]*i,eI[1]=-r[1]*i,eI[2]=0,eI[3]=0,eI[4]=-r[4]*i,eI[5]=r[0]*i,eI[6]=0,eI[7]=0,eI[8]=0,eI[9]=0,eI[10]=1/r[10],eI[11]=0,eI[12]=0,eI[13]=0,eI[14]=0,eI[15]=1/r[15],e.map(e=>{let r=eO(e.x,e.y,eI,t.getElevation),i=t.transform.projectTileCoordinates(r.point.x,r.point.y,t.unwrappedTileID,t.getElevation);return i.point.x=(.5*i.point.x+.5)*t.width,i.point.y=(-(.5*i.point.y)+.5)*t.height,i})))}queryRenderedSymbols(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};let r=[],i=new t.a8;for(let n of e){let e=new t.P(n.x+100,n.y+100);i.extend(e),r.push(e)}let{minX:n,minY:a,maxX:o,maxY:s}=i,l=this.grid.query(n,a,o,s).concat(this.ignoredGrid.query(n,a,o,s)),c={},u={};for(let e of l){let i=e.key;if(void 0===c[i.bucketInstanceId]&&(c[i.bucketInstanceId]={}),c[i.bucketInstanceId][i.featureIndex])continue;let n=[new t.P(e.x1,e.y1),new t.P(e.x2,e.y1),new t.P(e.x2,e.y2),new t.P(e.x1,e.y2)];t.aH(r,n)&&(c[i.bucketInstanceId][i.featureIndex]=!0,void 0===u[i.bucketInstanceId]&&(u[i.bucketInstanceId]=[]),u[i.bucketInstanceId].push(i.featureIndex))}return u}insertCollisionBox(e,t,r,i,n,a){(r?this.ignoredGrid:this.grid).insert({bucketInstanceId:i,featureIndex:n,collisionGroupID:a,overlapMode:t},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,t,r,i,n,a){let o=r?this.ignoredGrid:this.grid,s={bucketInstanceId:i,featureIndex:n,collisionGroupID:a,overlapMode:t};for(let t=0;t=this.screenRightBoundary||i<100||t>this.screenBottomBoundary}isInsideGrid(e,t,r,i){return r>=0&&e=0&&tthis.projectAndGetPerspectiveRatio(e.x,e.y,n,c,h));E=e.some(e=>!e.isOccluded),S=e.map(e=>new t.P(e.x,e.y))}else E=!0;return{box:t.aI(S),allPointsOccluded:!E}}}class eX{constructor(e,t,r,i){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):i&&r?1:0,this.placed=r}isHidden(){return 0===this.opacity&&!this.placed}}class eK{constructor(e,t,r,i,n){this.text=new eX(e?e.text:null,t,r,n),this.icon=new eX(e?e.icon:null,t,i,n)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class eJ{constructor(e,t,r){this.text=e,this.icon=t,this.skipFade=r}}class eQ{constructor(e,t,r,i,n){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=r,this.bucketIndex=i,this.tileID=n}}class e0{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){let t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:e=>e.collisionGroupID===t}}return this.collisionGroups[e]}}function e1(e,r,i,n,a){let{horizontalAlign:o,verticalAlign:s}=t.aP(e);return new t.P(-(o-.5)*r+n[0]*a,-(s-.5)*i+n[1]*a)}class e2{constructor(e,t,r,i,n){this.transform=e.clone(),this.terrain=t,this.collisionIndex=new e$(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=r,this.retainedQueryData={},this.collisionGroups=new e0(i),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){let t=this.terrain;return t?(r,i)=>t.getElevation(e,r,i):null}getBucketParts(e,r,i,n){let a=i.getBucket(r),o=i.latestFeatureIndex;if(!a||!o||r.id!==a.layerIds[0])return;let s=i.collisionBoxArray,l=a.layers[0].layout,c=a.layers[0].paint,u=Math.pow(2,this.transform.zoom-i.tileID.overscaledZ),h=i.tileSize/t.a6,d=i.tileID.toUnwrapped(),f="map"===l.get("text-rotation-alignment"),p=t.aK(i,1,this.transform.zoom),m=t.aL(this.collisionIndex.transform,i,c.get("text-translate"),c.get("text-translate-anchor")),g=t.aL(this.collisionIndex.transform,i,c.get("icon-translate"),c.get("icon-translate-anchor")),y=ez(f,this.transform,p);this.retainedQueryData[a.bucketInstanceId]=new eQ(a.bucketInstanceId,o,a.sourceLayerIndex,a.index,i.tileID);let v={bucket:a,layout:l,translationText:m,translationIcon:g,unwrappedTileID:d,pitchedLabelPlaneMatrix:y,scale:u,textPixelRatio:h,holdingForFade:i.holdingForSymbolFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:t.aw(a.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(a.sourceID)};if(n)for(let t of a.sortKeyRanges){let{sortKey:r,symbolInstanceStart:i,symbolInstanceEnd:n}=t;e.push({sortKey:r,symbolInstanceStart:i,symbolInstanceEnd:n,parameters:v})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:a.symbolInstances.length,parameters:v})}attemptAnchorPlacement(e,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b){var _,w,T;let M=t.aM[e.textAnchor],k=[e.textOffset0,e.textOffset1],A=e1(M,i,n,k,a),S=this.collisionIndex.placeCollisionBox(r,d,l,c,u,s,o,g,h.predicate,x,A,b);if((!v||this.collisionIndex.placeCollisionBox(v,d,l,c,u,s,o,y,h.predicate,x,A,b).placeable)&&S.placeable){let e;if(null!=(_=this.prevPlacement)&&_.variableOffsets[f.crossTileID]&&null!=(T=null==(w=this.prevPlacement)?void 0:w.placements[f.crossTileID])&&T.text&&(e=this.prevPlacement.variableOffsets[f.crossTileID].anchor),0===f.crossTileID)throw Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[f.crossTileID]={textOffset:k,width:i,height:n,anchor:M,textBoxScale:a,prevAnchor:e},this.markUsedJustification(p,M,f,m),p.allowVerticalPlacement&&(this.markUsedOrientation(p,m,f),this.placedOrientations[f.crossTileID]=m),{shift:A,placedGlyphBoxes:S}}}placeLayerBucketPart(e,r,i){let{bucket:n,layout:a,translationText:o,translationIcon:s,unwrappedTileID:l,pitchedLabelPlaneMatrix:c,textPixelRatio:u,holdingForFade:h,collisionBoxArray:d,partiallyEvaluatedTextSize:f,collisionGroup:p}=e.parameters,m=a.get("text-optional"),g=a.get("icon-optional"),y=t.aN(a,"text-overlap","text-allow-overlap"),v="always"===y,x=t.aN(a,"icon-overlap","icon-allow-overlap"),b="always"===x,_="map"===a.get("text-rotation-alignment"),w="map"===a.get("text-pitch-alignment"),T="none"!==a.get("icon-text-fit"),M="viewport-y"===a.get("symbol-z-order"),k=v&&(b||!n.hasIconData()||g),A=b&&(v||!n.hasTextData()||m);!n.collisionArrays&&d&&n.deserializeCollisionBoxes(d);let S=this.retainedQueryData[n.bucketInstanceId].tileID,E=this._getTerrainElevationFunc(S),C=this.transform.getFastPathSimpleProjectionMatrix(S),L=(e,d,b)=>{var M,L;if(r[e.crossTileID])return;if(h)return void(this.placements[e.crossTileID]=new eJ(!1,!1,!1));let P=!1,I=!1,z=!0,D=null,O={box:null,placeable:!1,offscreen:null,occluded:!1},R={placeable:!1},F=null,j=null,B=null,N=0,U=0,V=0;d.textFeatureIndex?N=d.textFeatureIndex:e.useRuntimeCollisionCircles&&(N=e.featureIndex),d.verticalTextFeatureIndex&&(U=d.verticalTextFeatureIndex);let q=d.textBox;if(q){let r=r=>{let i=t.ax.horizontal;if(n.allowVerticalPlacement&&!r&&this.prevPlacement){let t=this.prevPlacement.placedOrientations[e.crossTileID];t&&(this.placedOrientations[e.crossTileID]=t,i=t,this.markUsedOrientation(n,i,e))}return i},a=(r,i)=>{if(n.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&d.verticalTextBox){for(let e of n.writingModes)if(e===t.ax.vertical?R=O=i():O=r(),O?.placeable)break}else O=r()},c=e.textAnchorOffsetStartIndex,h=e.textAnchorOffsetEndIndex;if(h===c){let i=(t,r)=>{let i=this.collisionIndex.placeCollisionBox(t,y,u,S,l,w,_,o,p.predicate,E,void 0,C);return i?.placeable&&(this.markUsedOrientation(n,r,e),this.placedOrientations[e.crossTileID]=r),i};a(()=>i(q,t.ax.horizontal),()=>{let r=d.verticalTextBox;return n.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?i(r,t.ax.vertical):{box:null,offscreen:null}}),r(O?.placeable)}else{let f=t.aM[null==(L=null==(M=this.prevPlacement)?void 0:M.variableOffsets[e.crossTileID])?void 0:L.anchor],m=(t,r,a)=>{let d=t.x2-t.x1,m=t.y2-t.y1,g=e.textBoxScale,v=T&&"never"===x?r:null,b=null,M="never"===y?1:2,k="never";f&&M++;for(let r=0;rm(q,d.iconBox,t.ax.horizontal),()=>{let r=d.verticalTextBox;return n.allowVerticalPlacement&&!O?.placeable&&e.numVerticalGlyphVertices>0&&r?m(r,d.verticalIconBox,t.ax.vertical):{box:null,occluded:!0,offscreen:null}}),O&&(P=O.placeable,z=O.offscreen);let g=r(O?.placeable);if(!P&&this.prevPlacement){let t=this.prevPlacement.variableOffsets[e.crossTileID];t&&(this.variableOffsets[e.crossTileID]=t,this.markUsedJustification(n,t.anchor,e,g))}}}if(F=O,P=F?.placeable,z=F?.offscreen,e.useRuntimeCollisionCircles&&e.centerJustifiedTextSymbolIndex>=0){let r=n.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),s=t.ay(n.textSizeData,f,r),u=a.get("text-padding");(j=this.collisionIndex.placeCollisionCircles(y,r,n.lineVertexArray,n.glyphOffsetArray,s,l,c,i,w,p.predicate,e.collisionCircleDiameter,u,o,E)).circles.length&&j.collisionDetected&&!i&&t.w("Collisions detected, but collision boxes are not shown"),P=v||j.circles.length>0&&!j.collisionDetected,z&&(z=j.offscreen)}if(d.iconFeatureIndex&&(V=d.iconFeatureIndex),d.iconBox){let e=e=>this.collisionIndex.placeCollisionBox(e,x,u,S,l,w,_,s,p.predicate,E,T&&D?D:void 0,C);I=R&&R.placeable&&d.verticalIconBox?(B=e(d.verticalIconBox)).placeable:(B=e(d.iconBox)).placeable,z&&(z=B.offscreen)}let H=m||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,G=g||0===e.numIconVertices;H||G?G?H||I&&(I=P):P=I&&P:I=P=I&&P;let W=I&&B.placeable;if(P&&F.placeable&&this.collisionIndex.insertCollisionBox(F.box,y,a.get("text-ignore-placement"),n.bucketInstanceId,R&&R.placeable&&U?U:N,p.ID),W&&this.collisionIndex.insertCollisionBox(B.box,x,a.get("icon-ignore-placement"),n.bucketInstanceId,V,p.ID),j&&P&&this.collisionIndex.insertCollisionCircles(j.circles,y,a.get("text-ignore-placement"),n.bucketInstanceId,N,p.ID),i&&this.storeCollisionData(n.bucketInstanceId,b,d,F,B,j),0===e.crossTileID)throw Error("symbolInstance.crossTileID can't be 0");if(0===n.bucketInstanceId)throw Error("bucket.bucketInstanceId can't be 0");this.placements[e.crossTileID]=new eJ((P||k)&&!F?.occluded,(I||A)&&!B?.occluded,z||n.justReloaded),r[e.crossTileID]=!0};if(M){if(0!==e.symbolInstanceStart)throw Error("bucket.bucketInstanceId should be 0");let t=n.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let e=t.length-1;e>=0;--e){let r=t[e];L(n.symbolInstances.get(r),n.collisionArrays[r],r)}}else for(let t=e.symbolInstanceStart;t=0&&(e.text.placedSymbolArray.get(o).crossTileID=a>=0&&o!==a?0:i.crossTileID)}markUsedOrientation(e,r,i){let n=r===t.ax.horizontal||r===t.ax.horizontalOnly?r:0,a=r===t.ax.vertical?r:0;for(let t of[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex])e.text.placedSymbolArray.get(t).placedOrientation=n;i.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).placedOrientation=a)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;let t=this.prevPlacement,r=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;let i=t?t.symbolFadeChange(e):1,n=t?t.opacities:{},a=t?t.variableOffsets:{},o=t?t.placedOrientations:{};for(let e in this.placements){let t=this.placements[e],a=n[e];a?(this.opacities[e]=new eK(a,i,t.text,t.icon),r||(r=t.text!==a.text.placed),r||(r=t.icon!==a.icon.placed)):(this.opacities[e]=new eK(null,i,t.text,t.icon,t.skipFade),r||(r=t.text||t.icon))}for(let e in n){let t=n[e];if(!this.opacities[e]){let n=new eK(t,i,!1,!1);n.isHidden()||(this.opacities[e]=n,r||(r=t.text.placed),r||(r=t.icon.placed))}}for(let e in a)this.variableOffsets[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.variableOffsets[e]=a[e]);for(let e in o)this.placedOrientations[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.placedOrientations[e]=o[e]);if(t&&void 0===t.lastPlacementChangeTime)throw Error("Last placement time for previous placement is not defined");r?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){let r={};for(let i of t){let t=i.getBucket(e);t&&i.latestFeatureIndex&&e.id===t.layerIds[0]&&this.updateBucketOpacities(t,i.tileID,r,i.collisionBoxArray)}}updateBucketOpacities(e,r,i,n){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();let a=e.layers[0],o=a.layout,s=new eK(null,0,!1,!1,!0),l=o.get("text-allow-overlap"),c=o.get("icon-allow-overlap"),u=a._unevaluatedLayout.hasValue("text-variable-anchor")||a._unevaluatedLayout.hasValue("text-variable-anchor-offset"),h="map"===o.get("text-rotation-alignment"),d="map"===o.get("text-pitch-alignment"),f="none"!==o.get("icon-text-fit"),p=new eK(null,0,l&&(c||!e.hasIconData()||o.get("icon-optional")),c&&(l||!e.hasTextData()||o.get("text-optional")),!0);!e.collisionArrays&&n&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(n);let m=(e,t,r)=>{for(let i=0;i0,v=this.placedOrientations[n.crossTileID],x=v===t.ax.vertical,b=v===t.ax.horizontal||v===t.ax.horizontalOnly;if(a>0||o>0){let t=e5(c.text);m(e.text,a,x?e4:t),m(e.text,o,b?e4:t);let r=c.text.isHidden();for(let t of[n.rightJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.leftJustifiedTextSymbolIndex])t>=0&&(e.text.placedSymbolArray.get(t).hidden=r||x?1:0);n.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(n.verticalPlacedTextSymbolIndex).hidden=r||b?1:0);let i=this.variableOffsets[n.crossTileID];i&&this.markUsedJustification(e,i.anchor,n,v);let s=this.placedOrientations[n.crossTileID];s&&(this.markUsedJustification(e,"left",n,s),this.markUsedOrientation(e,s,n))}if(y){let t=e5(c.icon),r=!(f&&n.verticalPlacedIconSymbolIndex&&x);n.placedIconSymbolIndex>=0&&(m(e.icon,n.numIconVertices,r?t:e4),e.icon.placedSymbolArray.get(n.placedIconSymbolIndex).hidden=c.icon.isHidden()),n.verticalPlacedIconSymbolIndex>=0&&(m(e.icon,n.numVerticalIconVertices,r?e4:t),e.icon.placedSymbolArray.get(n.verticalPlacedIconSymbolIndex).hidden=c.icon.isHidden())}let _=g?.has(r)?g.get(r):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){let i=e.collisionArrays[r];if(i){let r=new t.P(0,0);if(i.textBox||i.verticalTextBox){let t=!0;if(u){let e=this.variableOffsets[l];e?(r=e1(e.anchor,e.width,e.height,e.textOffset,e.textBoxScale),h&&r._rotate(d?-this.transform.bearingInRadians:this.transform.bearingInRadians)):t=!1}if(i.textBox||i.verticalTextBox){let n;i.textBox&&(n=x),i.verticalTextBox&&(n=b),e3(e.textCollisionBox.collisionVertexArray,c.text.placed,!t||n,_.text,r.x,r.y)}}if(i.iconBox||i.verticalIconBox){let t=!!(!b&&i.verticalIconBox),n;i.iconBox&&(n=t),i.verticalIconBox&&(n=!t),e3(e.iconCollisionBox.collisionVertexArray,c.icon.placed,n,_.icon,f?r.x:0,f?r.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTimee}setStale(){this.stale=!0}}function e3(e,t,r,i,n,a){i&&0!==i.length||(i=[0,0,0,0]);let o=i[0]-100,s=i[1]-100,l=i[2]-100,c=i[3]-100;e.emplaceBack(+!!t,+!!r,n||0,a||0,o,s),e.emplaceBack(+!!t,+!!r,n||0,a||0,l,s),e.emplaceBack(+!!t,+!!r,n||0,a||0,l,c),e.emplaceBack(+!!t,+!!r,n||0,a||0,o,c)}function e5(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 0xffffffff;let t=+!!e.placed,r=Math.floor(127*e.opacity);return 0x2000000*r+0x1000000*t+131072*r+65536*t+512*r+256*t+2*r+t}let e4=0;class e6{constructor(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,t,r,i,n){let a=this._bucketParts;for(;this._currentTileIndexe.sortKey-t.sortKey));this._currentPartIndex!this._forceFullPlacement&&v()-n>2;for(;this._currentPlacementIndex>=0;){let n=r[e[this._currentPlacementIndex]],o=this.placement.collisionIndex.transform.zoom;if(t.aQ(n)&&n.layout&&(!n.minzoom||n.minzoom<=o)&&(!n.maxzoom||n.maxzoom>o)){if(this._inProgressLayer||(this._inProgressLayer=new e6(n)),this._inProgressLayer.continuePlacement(i[n.source],this.placement,this._showCollisionBoxes,n,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}let e9=512/t.a6/2;class e7{constructor(e,r,i){this.tileID=e,this.bucketInstanceId=i,this._symbolsByKey={};let n=new Map;for(let e=0;e({x:Math.floor(e.anchorX*e9),y:Math.floor(e.anchorY*e9)})),crossTileIDs:r.map(e=>e.crossTileID)};if(i.positions.length>128){let e=new t.aR(i.positions.length,16,Uint16Array);for(let{x:t,y:r}of i.positions)e.add(t,r);e.finish(),delete i.positions,i.index=e}this._symbolsByKey[e]=i}}getScaledCoordinates(e,r){let{x:i,y:n,z:a}=this.tileID.canonical,{x:o,y:s,z:l}=r.canonical,c=e9/Math.pow(2,l-a),u=(s*t.a6+e.anchorY)*c,h=n*t.a6*e9;return{x:Math.floor((o*t.a6+e.anchorX)*c-i*t.a6*e9),y:Math.floor(u-h)}}findMatches(e,t,r){let i=this.tileID.canonical.ze)}}class te{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class tt{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){let t=Math.round((e-this.lng)/360);if(0!==t)for(let e in this.indexes){let r=this.indexes[e],i={};for(let e in r){let n=r[e];n.tileID=n.tileID.unwrapTo(n.tileID.wrap+t),i[n.tileID.key]=n}this.indexes[e]=i}this.lng=e}addBucket(e,t,r){var i,n,a;if(null!=(i=this.indexes[e.overscaledZ])&&i[e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let e=0;ee.overscaledZ)for(let r in i){let n=i[r];n.tileID.isChildOf(e)&&n.findMatches(t.symbolInstances,e,o)}else{let n=i[e.scaledTo(Number(r)).key];n&&n.findMatches(t.symbolInstances,e,o)}}for(let e=0;e180?-360:360*(r<-180)}function tf(e){return Math.max(0,Math.floor(e))}class tp{constructor(e,r){var i;this.applyConstrain=(e,t)=>null!==this._constrainOverride?this._constrainOverride(e,t):this._callbacks.defaultConstrain(e,t),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==null?0:r?.minPitch,this._maxPitch=r?.maxPitch==null?60:r?.maxPitch,this._constrainOverride=null!=(i=r?.constrainOverride)?i:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new t.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=tf(this._zoom),this._scale=t.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new th,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,r,i){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=tf(this._zoom),this._scale=t.ao(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 th(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=!i&&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){this._minZoom!==e&&(this._minZoom=e,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(e){this._minPitch!==e&&(this._minPitch=e,this.setPitch(Math.max(this.pitch,e)))}get maxPitch(){return this._maxPitch}setMaxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.setPitch(Math.min(this.pitch,e)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get constrainOverride(){return this._constrainOverride}setConstrainOverride(e){void 0===e&&(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 t.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){var r,i,n,a,o,s,l,c,u;let h=t.X(e,-180,180)*Math.PI/180;this._bearingInRadians!==h&&(this._unmodified=!1,this._bearingInRadians=h,this._calcMatrices(),this._rotationMatrix=d(),r=this._rotationMatrix,n=-this._bearingInRadians,a=(i=this._rotationMatrix)[0],o=i[1],s=i[2],l=i[3],c=Math.sin(n),u=Math.cos(n),r[0]=a*u+s*c,r[1]=o*u+l*c,r[2]=-(a*c)+s*u,r[3]=-(o*c)+l*u)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){let r=t.al(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 t=e/180*Math.PI;this._rollInRadians!==t&&(this._unmodified=!1,this._rollInRadians=t,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return t.aX(this._fovInRadians)}setFov(e){e=t.al(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=t.an(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=t.ao(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,t){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=t,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,t,r){this._unmodified=!1,this._edgeInsets.interpolate(e,t,r),this.constrainInternal(),this._calcMatrices()}resize(e,t,r=!0){this._width=e,this._height=t,r&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var e,t;return(null==(e=this._latRange)?void 0:e.length)!==2||(null==(t=this._lngRange)?void 0:t.length)!==2?null:new G([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=[-t.am,t.am])}getCameraQueryGeometry(e,r){if(1===r.length)return[r[0],e];{let{minX:i,minY:n,maxX:a,maxY:o}=t.a8.fromPoints(r).extend(e);return[new t.P(i,n),new t.P(a,n),new t.P(a,o),new t.P(i,o),new t.P(i,n)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let e=this._unmodified,{center:t,zoom:r}=this.applyConstrain(this.center,this.zoom);this.setCenter(t),this.setZoom(r),this._unmodified=e,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=t.ap(new Float64Array(16));t.S(e,e,[this._width/2,-this._height/2,1]),t.Q(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=t.ap(new Float64Array(16)),t.S(e,e,[1,-1,1]),t.Q(e,e,[-1,-1,0]),t.S(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,r,i,n){let a=void 0!==i?i:this.bearing,o=n=void 0!==n?n:this.pitch,{distanceToCenter:s,clampedElevation:l}=this._distanceToCenterFromAltElevationPitch(r,this.elevation,o),{x:c,y:u}=ey(o,a),h=t.a7.fromLngLat(e,r),d,f,p=t.aY(1,h.y),m=0;do{if((m+=1)>10)break;f=s/p,p=1/(d=new t.a7(h.x+c*f,h.y+u*f)).meterInMercatorCoordinateUnits()}while(Math.abs(s-f*p)>1e-12);return{center:d.toLngLat(),elevation:l,zoom:t.ar(this.height/2/Math.tan(this.fovInRadians/2)/f/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e==0)return;let r=1/this.worldSize,i=t.aq(1,this.center.lat)*this.worldSize,n=t.a7.fromLngLat(this.center,this.elevation),a=n.x/r,o=n.y/r,s=n.z/r,l=this.pitch,{x:c,y:u,z:h}=ey(l,this.bearing),d=this.cameraToCenterDistance,{distanceToCenter:f,clampedElevation:p}=this._distanceToCenterFromAltElevationPitch((s+d*h)/i,e,l),m=f*i,g=new t.a7((a+-(d*c)+c*m)*r,(o+-(d*u)+u*m)*r,0).toLngLat(),y=t.aq(1,g.lat),v=t.ar(this.height/2/Math.tan(this.fovInRadians/2)/f/y/this.tileSize);this._elevation=p,this._center=g,this.setZoom(v)}_distanceToCenterFromAltElevationPitch(e,r,i){let n=-Math.cos(t.an(i)),a=e-r,o,s=r;return n*a>=0||.1>Math.abs(n)?s=e+(o=1e4)*n:o=-a/n,{distanceToCenter:o,clampedElevation:s}}getCameraPoint(){let e=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(e*Math.sin(this.rollInRadians),e*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let e=t.aq(1,this.center.lat)*this.worldSize;return eg(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/e).toLngLat()}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];let r=e.canonical.z>=0?1<this.max[0]||e.aabb.min[1]>this.max[1]||e.aabb.min[2]>this.max[2]||e.aabb.max[0]0?(t+=e[i]*this.min[i],r+=e[i]*this.max[i]):(r+=e[i]*this.min[i],t+=e[i]*this.max[i]);return t>=0?2:r<0?0:1}}class tg{distanceToTile2d(e,t,r,i){return Math.hypot(i.distanceX([e,t]),i.distanceY([e,t]))}getWrap(e,t,r){return r}getTileBoundingVolume(e,r,i,n){var a,o;let s=0,l=0;if(n?.terrain){let c=new t.a3(e.z,r,e.z,e.x,e.y),u=n.terrain.getMinMaxElevation(c);s=null!=(a=u.minElevation)?a:Math.min(0,i),l=null!=(o=u.maxElevation)?o:Math.max(0,i)}let c=1<n}allowWorldCopies(){return!0}prepareNextFrame(){}}class ty{constructor(e,t,r){this.points=e,this.planes=t,this.aabb=r}static fromInvProjectionMatrix(e,r=1,i=0,n,a){let o=a?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],s=Math.pow(2,i),l=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(i=>{let n,a;return a=1/(n=t.aE([],i,e))[3]/r*s,t.b4(n,n,[a,a,1/n[3],a])});n&&function(e,r,i,n){let a,o,s,l=4*!!n,c=4*!n,u=0,h=[],d=[];for(let r=0;r<4;r++){let i=t.b0([],e[r+c],e[r+l]),n=t.b5(i);t.aZ(i,i,1/n),h.push(n),d.push(i)}for(let r=0;r<4;r++){let n=t.b6(e[r+l],d[r],i);u=null!==n&&n>=0?Math.max(u,n):Math.max(u,h[r])}let f=(a=t.b0([],e[r[0]],e[r[1]]),o=t.b0([],e[r[2]],e[r[1]]),s=[0,0,0,0],t.b1(s,t.b2([],a,o)),s[3]=-t.b3(s,e[r[0]]),s),p=function(e,r){let i=t.b7(e),n=t.b8([],e,1/i),a=t.b0([],r,t.aZ([],n,t.b3(r,n))),o=t.b7(a);if(o>0){let e=Math.sqrt(1-n[3]*n[3]),i=t.aZ([],n,-n[3]),s=t.a_([],i,t.aZ([],a,e/o));return t.b9(r,s)}return null}(i,f);null!==p&&(u=Math.min(u,p/t.b3(d[0],f)));for(let t=0;t<4;t++){let r=Math.min(u,h[t]);e[t+c]=[e[t+l][0]+d[t][0]*r,e[t+l][1]+d[t][1]*r,e[t+l][2]+d[t][2]*r,1]}}(l,o[0],n,a);let c=o.map(e=>{let r=t.b0([],l[e[0]],l[e[1]]),i=t.b0([],l[e[2]],l[e[1]]),n=t.b1([],t.b2([],r,i)),a=-t.b3(n,l[e[1]]);return n.concat(a)}),u=[1/0,1/0,1/0],h=[-1/0,-1/0,-1/0];for(let e of l)for(let t=0;t<3;t++)u[t]=Math.min(u[t],e[t]),h[t]=Math.max(h[t],e[t]);return new ty(l,c,new tm(u,h))}}class tv{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(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,t,r){this._helper.interpolatePadding(e,t,r)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t,r=!0){this._helper.resize(e,t,r)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}setConstrainOverride(e){this._helper.setConstrainOverride(e)}overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e,t){}constructor(e){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(e,r)=>{r=t.al(+r,this.minZoom,this.maxZoom);let i={center:new t.W(e.lng,e.lat),zoom:r},n=this._helper._lngRange;this._helper._renderWorldCopies||null!==n||(n=[-179.9999999999,179.9999999999]);let a=this.tileSize*t.ao(i.zoom),o=0,s=a,l=0,c=a,u=0,h=0,{x:d,y:f}=this.size;if(this._helper._latRange){let e=this._helper._latRange;o=t.Y(e[1])*a,(s=t.Y(e[0])*a)-os&&(y=s-e)}if(n){let e=(l+c)/2,r=p;this._helper._renderWorldCopies&&(r=t.X(p,e-a/2,e+a/2));let i=d/2;r-ic&&(g=c-i)}return(void 0!==g||void 0!==y)&&(i.center=ef(a,new t.P(g??p,y??m)).wrap()),i},this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new tp({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._coveringTilesDetailsProvider=new tg}clone(){let e=new tv;return e.apply(this,!1),e}apply(e,t,r){this._helper.apply(e,t,r)}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(e){let r=[new t.ba(0,e)];if(this._helper._renderWorldCopies){let i=this.screenPointToMercatorCoordinate(new t.P(0,0)),n=this.screenPointToMercatorCoordinate(new t.P(this._helper._width,0)),a=this.screenPointToMercatorCoordinate(new t.P(this._helper._width,this._helper._height)),o=this.screenPointToMercatorCoordinate(new t.P(0,this._helper._height)),s=Math.floor(Math.min(i.x,n.x,a.x,o.x)),l=Math.floor(Math.max(i.x,n.x,a.x,o.x));for(let i=s-1;i<=l+1;i++)0!==i&&r.push(new t.ba(i,e))}return r}getCameraFrustum(){return ty.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){let t=this.screenPointToLocation(this.centerPoint,e),r=e?e.getElevationForLngLatZoom(t,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(r)}setLocationAtPoint(e,r){let i=t.aq(this.elevation,this.center.lat),n=this.screenPointToMercatorCoordinateAtZ(r,i),a=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,i),o=t.a7.fromLngLat(e),s=new t.a7(o.x-(n.x-a.x),o.y-(n.y-a.y));this.setCenter(s?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(e,r){return r?this.coordinatePoint(t.a7.fromLngLat(e),r.getElevationForLngLat(e,this),this._pixelMatrix3D):this.coordinatePoint(t.a7.fromLngLat(e))}screenPointToLocation(e,t){var r;return null==(r=this.screenPointToMercatorCoordinate(e,t))?void 0:r.toLngLat()}screenPointToMercatorCoordinate(e,t){if(t){let r=t.pointCoordinate(e);if(null!=r)return r}return this.screenPointToMercatorCoordinateAtZ(e)}screenPointToMercatorCoordinateAtZ(e,r){let i=r||0,n=[e.x,e.y,0,1],a=[e.x,e.y,1,1];t.aE(n,n,this._pixelMatrixInverse),t.aE(a,a,this._pixelMatrixInverse);let o=n[3],s=a[3],l=n[1]/o,c=a[1]/s,u=n[2]/o,h=a[2]/s,d=u===h?0:(i-u)/(h-u);return new t.a7(t.H.number(n[0]/o,a[0]/s,d)/this.worldSize,t.H.number(l,c,d)/this.worldSize,i)}coordinatePoint(e,r=0,i=this._pixelMatrix){let n=[e.x*this.worldSize,e.y*this.worldSize,r,1];return t.aE(n,n,i),new t.P(n[0]/n[3],n[1]/n[3])}getBounds(){let e=Math.max(0,this._helper._height/2-ep(this));return new G().extend(this.screenPointToLocation(new t.P(0,e))).extend(this.screenPointToLocation(new t.P(this._helper._width,e))).extend(this.screenPointToLocation(new t.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new t.P(0,this._helper._height)))}isPointOnMapSurface(e,t){return t?null!=t.pointCoordinate(e):e.y>this.height/2-ep(this)}calculatePosMatrix(e,r=!1,i){var n;let a=null!=(n=e.key)?n:t.bb(e.wrap,e.canonical.z,e.canonical.z,e.canonical.x,e.canonical.y),o=r?this._alignedPosMatrixCache:this._posMatrixCache;if(o.has(a)){let e=o.get(a);return i?e.f32:e.f64}let s=em(e,this.worldSize);t.U(s,r?this._alignedProjMatrix:this._viewProjMatrix,s);let l={f64:s,f32:new Float32Array(s)};return o.set(a,l),i?l.f32:l.f64}calculateFogMatrix(e){let r=e.key,i=this._fogMatrixCacheF32;if(i.has(r))return i.get(r);let n=em(e,this.worldSize);return t.U(n,this._fogMatrix,n),i.set(r,new Float32Array(n)),i.get(r)}calculateCenterFromCameraLngLatAlt(e,t,r,i){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,r,i)}_calculateNearFarZIfNeeded(e,r,i){if(!this._helper.autoCalculateNearFarZ)return;let n=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),a=e-n*this._helper._pixelPerMeter/Math.cos(r),o=n<0?a:e,s=Math.PI/2+this.pitchInRadians,l=t.an(this.fov)*(Math.abs(Math.cos(t.an(this.roll)))*this.height+Math.abs(Math.sin(t.an(this.roll)))*this.width)/this.height*(.5+i.y/this.height),c=Math.sin(l)*o/Math.sin(t.al(Math.PI-s-l,.01,Math.PI-.01)),u=ep(this),h=Math.atan(u/this._helper.cameraToCenterDistance),d=t.an(.75),f=h>d?2*h*(.5+i.y/(2*u)):d,p=Math.min(c,Math.sin(f)*o/Math.sin(t.al(Math.PI-s-f,.01,Math.PI-.01)));this._helper._farZ=1.01*(Math.cos(Math.PI/2-r)*p+o),this._helper._nearZ=this._helper._height/50}_calcMatrices(){var e,r;if(!this._helper._height)return;let i=this.centerOffset,n=ed(this.worldSize,this.center),a=n.x,o=n.y;this._helper._pixelPerMeter=t.aq(1,this.center.lat)*this.worldSize;let s=t.an(Math.min(this.pitch,89.25)),l=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(s)),c;this._calculateNearFarZIfNeeded(l,s,i),c=new Float64Array(16),t.bc(c,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(e=this._invProjMatrix)[0]=1/(r=c)[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],c[8]=-(2*i.x)/this._helper._width,c[9]=2*i.y/this._helper._height,this._projectionMatrix=t.bd(c),t.S(c,c,[1,-1,1]),t.Q(c,c,[0,0,-this._helper.cameraToCenterDistance]),t.be(c,c,-this.rollInRadians),t.bf(c,c,this.pitchInRadians),t.be(c,c,-this.bearingInRadians),t.Q(c,c,[-a,-o,0]),this._mercatorMatrix=t.S([],c,[this.worldSize,this.worldSize,this.worldSize]),t.S(c,c,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=t.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,c),t.Q(c,c,[0,0,-this.elevation]),this._viewProjMatrix=c,this._invViewProjMatrix=t.bg([],c);let u=[0,0,-1,1];t.aE(u,u,this._invViewProjMatrix),this._cameraPosition=[u[0]/u[3],u[1]/u[3],u[2]/u[3]],this._fogMatrix=new Float64Array(16),t.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,l,this._helper._farZ),this._fogMatrix[8]=-(2*i.x)/this.width,this._fogMatrix[9]=2*i.y/this.height,t.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),t.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),t.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),t.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),t.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),t.Q(this._fogMatrix,this._fogMatrix,[-a,-o,0]),t.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),t.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=t.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,c);let h=this._helper._width%2/2,d=this._helper._height%2/2,f=Math.cos(this.bearingInRadians),p=Math.sin(-this.bearingInRadians),m=a-Math.round(a)+f*h+p*d,g=o-Math.round(o)+f*d+p*h,y=new Float64Array(c);if(t.Q(y,y,[m>.5?m-1:m,g>.5?g-1:g,0]),this._alignedProjMatrix=y,!(c=t.bg(new Float64Array(16),this._pixelMatrix)))throw Error("failed to invert matrix");this._pixelMatrixInverse=c,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let e=this.screenPointToMercatorCoordinate(new t.P(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.aE(r,r,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let e=t.aq(1,this.center.lat)*this.worldSize;return eg(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/e).toLngLat()}lngLatToCameraDepth(e,r){let i=t.a7.fromLngLat(e),n=[i.x*this.worldSize,i.y*this.worldSize,r,1];return t.aE(n,n,this._viewProjMatrix),n[2]/n[3]}getProjectionData(e){let{overscaledTileID:r,aligned:i,applyTerrainMatrix:n}=e,a=this._helper.getMercatorTileCoordinates(r),o=r?this.calculatePosMatrix(r,i,!0):null,s;return{mainMatrix:s=r?.terrainRttPosMatrix32f&&n?r.terrainRttPosMatrix32f:o||t.bh(),tileMercatorCoords:a,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:s}}isLocationOccluded(e){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(e,t,r){return 1}transformLightDirection(e){return t.a$(e)}getRayDirectionFromPixel(e){throw Error("Not implemented.")}projectTileCoordinates(e,r,i,n){let a=this.calculatePosMatrix(i),o;n?(o=[e,r,n(e,r),1],t.aE(o,o,a)):eZ(o=[e,r,0,1],o,a);let s=o[3];return{point:new t.P(o[0]/s,o[1]/s),signedDistanceFromCamera:s,isOccluded:!1}}populateCache(e){for(let t of e)this.calculatePosMatrix(t)}getMatrixForModel(e,r){let i=t.a7.fromLngLat(e,r),n=i.meterInMercatorCoordinateUnits(),a=t.bi();return t.Q(a,a,[i.x,i.y,i.z]),t.be(a,a,Math.PI),t.bf(a,a,Math.PI/2),t.S(a,a,[-n,n,n]),a}getProjectionDataForCustomLayer(e=!0){let r=new t.a3(0,0,0,0,0),i=this.getProjectionData({overscaledTileID:r,applyGlobeMatrix:e}),n=em(r,this.worldSize);t.U(n,this._viewProjMatrix,n),i.tileMercatorCoords=[0,0,1,1];let a=[t.a6,t.a6,this.worldSize/this._helper.pixelsPerMeter],o=t.bj();return t.S(o,n,a),i.fallbackMatrix=o,i.mainMatrix=o,i}getFastPathSimpleProjectionMatrix(e){return this.calculatePosMatrix(e)}}function tx(){t.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function tb(e){if(e.useSlerp)if(e.k<1){let r=t.bk(e.startEulerAngles.roll,e.startEulerAngles.pitch,e.startEulerAngles.bearing),i=t.bk(e.endEulerAngles.roll,e.endEulerAngles.pitch,e.endEulerAngles.bearing),n=new Float64Array(4);t.bl(n,r,i,e.k);let a=t.bm(n);e.tr.setRoll(a.roll),e.tr.setPitch(a.pitch),e.tr.setBearing(a.bearing)}else e.tr.setRoll(e.endEulerAngles.roll),e.tr.setPitch(e.endEulerAngles.pitch),e.tr.setBearing(e.endEulerAngles.bearing);else e.tr.setRoll(t.H.number(e.startEulerAngles.roll,e.endEulerAngles.roll,e.k)),e.tr.setPitch(t.H.number(e.startEulerAngles.pitch,e.endEulerAngles.pitch,e.k)),e.tr.setBearing(t.H.number(e.startEulerAngles.bearing,e.endEulerAngles.bearing,e.k))}function t_(e,r,i,n,a){let o=a.padding,s=ed(a.worldSize,i.getNorthWest()),l=ed(a.worldSize,i.getNorthEast()),c=ed(a.worldSize,i.getSouthEast()),u=ed(a.worldSize,i.getSouthWest()),h=t.an(-n),d=s.rotate(h),f=l.rotate(h),p=c.rotate(h),m=u.rotate(h),g=new t.P(Math.max(d.x,f.x,m.x,p.x),Math.max(d.y,f.y,m.y,p.y)),y=new t.P(Math.min(d.x,f.x,m.x,p.x),Math.min(d.y,f.y,m.y,p.y)),v=g.sub(y),x=(a.width-(o.left+o.right+r.left+r.right))/v.x,b=(a.height-(o.top+o.bottom+r.top+r.bottom))/v.y;if(b<0||x<0)return void tx();let _=Math.min(t.ar(a.scale*Math.min(x,b)),e.maxZoom),w=t.P.convert(e.offset),T=new t.P((r.left-r.right)/2,(r.top-r.bottom)/2).rotate(t.an(n)),M=w.add(T).mult(a.scale/t.ao(_));return{center:ef(a.worldSize,s.add(c).div(2).sub(M)),zoom:_,bearing:n}}class tw{get useGlobeControls(){return!1}handlePanInertia(e,t){let r=e.mag(),i=Math.abs(ep(t));return{easingOffset:e.mult(Math.min(.75*i/r,1)),easingCenter:t.center}}handleMapControlsRollPitchBearingZoom(e,t){e.bearingDelta&&t.setBearing(t.bearing+e.bearingDelta),e.pitchDelta&&t.setPitch(t.pitch+e.pitchDelta),e.rollDelta&&t.setRoll(t.roll+e.rollDelta),e.zoomDelta&&t.setZoom(t.zoom+e.zoomDelta)}handleMapControlsPan(e,t,r){.01>e.around.distSqr(t.centerPoint)||t.setLocationAtPoint(r,e.around)}cameraForBoxAndBearing(e,t,r,i,n){return t_(e,t,r,i,n)}handleJumpToCenterZoom(e,r){e.zoom!==(void 0!==r.zoom?+r.zoom:e.zoom)&&e.setZoom(+r.zoom),void 0!==r.center&&e.setCenter(t.W.convert(r.center))}handleEaseTo(e,r){let i=e.zoom,n=e.padding,a={roll:e.roll,pitch:e.pitch,bearing:e.bearing},o={roll:void 0===r.roll?e.roll:r.roll,pitch:void 0===r.pitch?e.pitch:r.pitch,bearing:void 0===r.bearing?e.bearing:r.bearing},s=void 0!==r.zoom,l=!e.isPaddingEqual(r.padding),c=!1,u=s?+r.zoom:e.zoom,h=e.centerPoint.add(r.offsetAsPoint),d=e.screenPointToLocation(h),{center:f,zoom:p}=e.applyConstrain(t.W.convert(r.center||d),u??i);td(e,f);let m=ed(e.worldSize,d),g=ed(e.worldSize,f).sub(m),y=t.ao(p-i);return{easeFunc:s=>{if(c&&e.setZoom(t.H.number(i,p,s)),t.bn(a,o)||tb({startEulerAngles:a,endEulerAngles:o,tr:e,k:s,useSlerp:a.roll!=o.roll}),l&&(e.interpolatePadding(n,r.padding,s),h=e.centerPoint.add(r.offsetAsPoint)),r.around)e.setLocationAtPoint(r.around,r.aroundPoint);else{let r=t.ao(e.zoom-i),n=Math.pow(p>i?Math.min(2,y):Math.max(.5,y),1-s),a=ef(e.worldSize,m.add(g.mult(s*n)).mult(r));e.setLocationAtPoint(e.renderWorldCopies?a.wrap():a,h)}},isZooming:c=p!==i,elevationCenter:f}}handleFlyTo(e,r){let i=void 0!==r.zoom,n=e.zoom,a=e.applyConstrain(t.W.convert(r.center||r.locationAtOffset),i?+r.zoom:n),o=a.center,s=a.zoom;td(e,o);let l=ed(e.worldSize,r.locationAtOffset),c=ed(e.worldSize,o).sub(l),u=c.mag(),h=t.ao(s-n),d;if(void 0!==r.minZoom){let i=Math.min(+r.minZoom,n,s),a=e.applyConstrain(o,i).zoom;d=t.ao(a-n)}return{easeFunc:(r,i,a,u)=>{e.setZoom(1===r?s:n+t.ar(i));let h=1===r?o:ef(e.worldSize,l.add(c.mult(a)).mult(i));e.setLocationAtPoint(e.renderWorldCopies?h.wrap():h,u)},scaleOfZoom:h,targetCenter:o,scaleOfMinZoom:d,pixelPathLength:u}}}class tT{constructor(e,t,r){this.blendFunction=e,this.blendColor=t,this.mask=r}}tT.Replace=[1,0],tT.disabled=new tT(tT.Replace,t.bo.transparent,[!1,!1,!1,!1]),tT.unblended=new tT(tT.Replace,t.bo.transparent,[!0,!0,!0,!0]),tT.alphaBlended=new tT([1,771],t.bo.transparent,[!0,!0,!0,!0]);class tM{constructor(e,t,r){this.enable=e,this.mode=t,this.frontFace=r}}tM.disabled=new tM(!1,1029,2305),tM.backCCW=new tM(!0,1029,2305),tM.frontCCW=new tM(!0,1028,2305);class tk{constructor(e,t,r){this.func=e,this.mask=t,this.range=r}}tk.ReadOnly=!1,tk.ReadWrite=!0,tk.disabled=new tk(519,tk.ReadOnly,[0,1]);class tA{constructor(e,t,r,i,n,a){this.test=e,this.ref=t,this.mask=r,this.fail=i,this.depthFail=n,this.pass=a}}function tS(e){return"u">typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext}tA.disabled=new tA({func:519,mask:0},0,0,7680,7680,7680);class tE{get awaitingQuery(){return!!this._readbackQueue}constructor(e){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=e;let r=e.context,i=r.gl;this._texFormat=i.RGBA,this._texType=i.UNSIGNED_BYTE;let n=new t.aU;n.emplaceBack(-1,-1),n.emplaceBack(2,-1),n.emplaceBack(-1,2);let a=new t.aW;a.emplaceBack(0,1,2),this._fullscreenTriangle=new to(r.createVertexBuffer(n,ts.members),r.createIndexBuffer(a),t.aV.simpleSegment(0,0,n.length,a.length)),this._resultBuffer=new Uint8Array(4),r.activeTexture.set(i.TEXTURE1);let o=i.createTexture();i.bindTexture(i.TEXTURE_2D,o),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.texImage2D(i.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=r.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(o),tS(i)&&(this._pbo=i.createBuffer(),i.bindBuffer(i.PIXEL_PACK_BUFFER,this._pbo),i.bufferData(i.PIXEL_PACK_BUFFER,4,i.STREAM_READ),i.bindBuffer(i.PIXEL_PACK_BUFFER,null))}destroy(){let e=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),e.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(e,t){let r=this._updateCount;return this._readbackQueue?r>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():r>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(e,t),this._updateCount++,this._measuredError}_bindFramebuffer(){let e=this._cachedRenderContext.context,t=e.gl;e.activeTexture.set(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,this._fbo.colorAttachment.get()),e.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(e,r){let i=this._cachedRenderContext.context,n=i.gl;if(this._bindFramebuffer(),i.viewport.set([0,0,this._texWidth,this._texHeight]),i.clear({color:t.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(i,n.TRIANGLES,tk.disabled,tA.disabled,tT.unblended,tM.disabled,{u_input:e,u_output_expected:r},null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&tS(n)){n.bindBuffer(n.PIXEL_PACK_BUFFER,this._pbo),n.readBuffer(n.COLOR_ATTACHMENT0),n.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),n.bindBuffer(n.PIXEL_PACK_BUFFER,null);let e=n.fenceSync(n.SYNC_GPU_COMMANDS_COMPLETE,0);n.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:e}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let e=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&tS(e)){let r=e.clientWaitSync(this._readbackQueue.sync,0,0);if(r===e.WAIT_FAILED)return t.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(r===e.TIMEOUT_EXPIRED)return;e.bindBuffer(e.PIXEL_PACK_BUFFER,this._pbo),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),e.bindBuffer(e.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),e.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=tE._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(e){let t;return t=0+(e[0]/256+e[1]/65536+e[2]/0x1000000),e[3]<127&&(t=-t),t/128}}let tC=t.a6/128;function tL(e,r){let i=void 0!==e.granularity?Math.max(e.granularity,1):1,n=i+2*!!e.generateBorders,a=i+(e.extendToNorthPole||e.generateBorders?1:0)+(e.extendToSouthPole||e.generateBorders?1:0),o=n+1,s=a+1,l=e.generateBorders?-1:0,c=e.generateBorders||e.extendToNorthPole?-1:0,u=i+ +!!e.generateBorders,h=i+(e.generateBorders||e.extendToSouthPole?1:0),d=n*a*6,f=o*s>65536;if(f&&"16bit"===r)throw Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let p=f||"32bit"===r,m=new Int16Array(o*s*2),g=0;for(let r=c;r<=h;r++)for(let n=l;n<=u;n++){let a=n/i*t.a6;-1===n&&(a=-tC),n===i+1&&(a=t.a6+tC);let o=r/i*t.a6;-1===r&&(o=e.extendToNorthPole?t.bq:-tC),r===i+1&&(o=e.extendToSouthPole?t.br:t.a6+tC),m[g++]=a,m[g++]=o}let y=p?new Uint32Array(d):new Uint16Array(d),v=0;for(let e=0;e0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(e){this._mercatorProjection.updateGPUdependent(e),this._verticalPerspectiveProjection.updateGPUdependent(e)}getMeshFromTileID(e,t,r,i,n){return this.currentProjection.getMeshFromTileID(e,t,r,i,n)}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)}setErrorQueryLatitudeDegrees(e){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e),this._mercatorProjection.setErrorQueryLatitudeDegrees(e)}}function tO(e){return 2*Math.PI*tj(e.worldSize,e.center.lat)}function tR(e,r,i,n,a){let o=1/(1<1e-6){let n=e[0]/i,a=Math.acos(e[2]/i),o=(n>0?a:-a)/Math.PI*180;return new t.W(t.X(o,-180,180),r)}return new t.W(0,r)}function tN(e){return Math.cos(e*Math.PI/180)}function tU(e,r){let i=tN(e),n=tN(r);return t.ar(n/i)}function tV(e,r){let i=e.rotate(r.bearingInRadians),n=r.zoom+tU(r.center.lat,0),a=t.bt(1/tN(r.center.lat),1/tN(Math.min(Math.abs(r.center.lat),60)),t.bw(n,7,3,0,1)),o=360/tO({worldSize:r.worldSize,center:{lat:r.center.lat}});return new t.W(r.center.lng-i.x*o*a,t.al(r.center.lat+i.y*o,-t.am,t.am))}function tq(e){let t=.5*e,r=Math.sin(t),i=Math.cos(t);return Math.log(r+i)-Math.log(i-r)}function tH(e,r,i,n){let a=e.lat+i*n;if(Math.abs(i)>1){let o=(Math.sign(e.lat+i)!==Math.sign(e.lat)?-Math.abs(e.lat):Math.abs(e.lat))*Math.PI/180,s=Math.abs(e.lat+i)*Math.PI/180,l=tq(o+n*(s-o)),c=tq(o),u=tq(s);return new t.W(e.lng+(l-c)/(u-c)*r,a)}return new t.W(e.lng+r*n,a)}class tG{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,t,r,i){let n=`${e.z}_${e.x}_${e.y}_${i?.terrain?"t":""}`,a=this._cache.get(n);if(a)return a;let o=this._cachePrevious.get(n);if(o)return this._cache.set(n,o),o;let s=this._boundingVolumeFactory(e,t,r,i);return this._cache.set(n,s),this._hadAnyChanges=!0,s}}class tW{constructor(e,t,r,i){this.min=r,this.max=i,this.points=e,this.planes=t}static fromAabb(e,t){let r=[];for(let i=0;i<8;i++)r.push([1&~i?e[0]:t[0],(i>>1&1)==1?t[1]:e[1],(i>>2&1)==1?t[2]:e[2]]);return new tW(r,[[-1,0,0,t[0]],[1,0,0,-e[0]],[0,-1,0,t[1]],[0,1,0,-e[1]],[0,0,-1,t[2]],[0,0,1,-e[2]]],e,t)}static fromCenterSizeAngles(e,r,i){let n=t.bA([],i[0],i[1],i[2]),a=t.bB([],[r[0],0,0],n),o=t.bB([],[0,r[1],0],n),s=t.bB([],[0,0,r[2]],n),l=[...e],c=[...e];for(let t=0;t<8;t++)for(let r=0;r<3;r++){let i=e[r]+a[r]*(1&~t?-1:1)+o[r]*((t>>1&1)==1?1:-1)+s[r]*((t>>2&1)==1?1:-1);l[r]=Math.min(l[r],i),c[r]=Math.max(c[r],i)}let u=[];for(let r=0;r<8;r++){let i=[...e];t.a_(i,i,t.aZ([],a,1&~r?-1:1)),t.a_(i,i,t.aZ([],o,(r>>1&1)==1?1:-1)),t.a_(i,i,t.aZ([],s,(r>>2&1)==1?1:-1)),u.push(i)}return new tW(u,[[...a,-t.b3(a,u[0])],[...o,-t.b3(o,u[0])],[...s,-t.b3(s,u[0])],[-a[0],-a[1],-a[2],-t.b3(a,u[7])],[-o[0],-o[1],-o[2],-t.b3(o,u[7])],[-s[0],-s[1],-s[2],-t.b3(s,u[7])]],l,c)}intersectsFrustum(e){let t=!0,r=this.points.length,i=this.planes.length,n=e.planes.length,a=e.points.length;for(let i=0;i=0&&a++}if(0===a)return 0;a=0&&i++}if(0===i)return 0}return 1}intersectsPlane(e){let t=this.points.length,r=0;for(let i=0;i=0&&r++}return r===t?2:+(0!==r)}}function tY(e,t,r){let i=e-t;return i<0?-i:Math.max(0,i-r)}function tZ(e,t,r,i,n){let a=e-r;return Math.max(a<0?Math.min(-a,1+a-n):a>n?Math.min(Math.max(a-n,0),1-a):0,tY(t,i,n))}class t${constructor(){this._boundingVolumeCache=new tG(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(e,t,r,i){let n=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(e,t,r,i){return this._boundingVolumeCache.getTileBoundingVolume(e,t,r,i)}_computeTileBoundingVolume(e,r,i,n){var a,o;let s=0,l=0;if(n?.terrain){let c=new t.a3(e.z,r,e.z,e.x,e.y),u=n.terrain.getMinMaxElevation(c);s=null!=(a=u.minElevation)?a:Math.min(0,i),l=null!=(o=u.maxElevation)?o:Math.max(0,i)}if(s/=t.bD,l/=t.bD,s+=1,l+=1,e.z<=0)return tW.fromAabb([-l,-l,-l],[l,l,l]);if(1===e.z)return tW.fromAabb([0===e.x?-l:0,0===e.y?0:-l,-l],[0===e.x?0:l,0===e.y?l:0,l]);{let r=[tR(0,0,e.x,e.y,e.z),tR(t.a6,0,e.x,e.y,e.z),tR(t.a6,t.a6,e.x,e.y,e.z),tR(0,t.a6,e.x,e.y,e.z)],i=[];for(let e of r)i.push(t.aZ([],e,l));if(l!==s)for(let e of r)i.push(t.aZ([],e,s));0===e.y&&i.push([0,1,0]),e.y===(1<=(1<{let i=t.al(e.lat,-t.am,t.am),n=t.al(+r,this.minZoom+tU(0,i),this.maxZoom);return{center:new t.W(e.lng,i),zoom:n}},this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new tp({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._coveringTilesDetailsProvider=new t$}clone(){let e=new tK;return e.apply(this,!1),e}apply(e,t,r){this._globeLatitudeErrorCorrectionRadians=r||0,this._helper.apply(e,t)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let e=t.bz();return e[0]=this._cameraPosition[0],e[1]=this._cameraPosition[1],e[2]=this._cameraPosition[2],e}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(e){let{overscaledTileID:t,applyGlobeMatrix:r}=e,i=this._helper.getMercatorTileCoordinates(t);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:i,clippingPlane:this._cachedClippingPlane,projectionTransition:+!!r,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(e){let r=this.pitchInRadians,i=this.cameraToCenterDistance/e,n=Math.sin(r)*i,a=Math.cos(r)*i+1,o=1/Math.sqrt(n*n+a*a)*1,s=-n,l=a,c=Math.sqrt(s*s+l*l),u=[0,s/=c,l/=c];t.bF(u,u,[0,0,0],-this.bearingInRadians),t.bG(u,u,[0,0,0],-1*this.center.lat*Math.PI/180),t.bH(u,u,[0,0,0],this.center.lng*Math.PI/180);let h=1/t.b5(u);return t.aZ(u,u,h),[...u,-o*h]}isLocationOccluded(e){return!this.isSurfacePointVisible(tF(e))}transformLightDirection(e){let r=this._helper._center.lng*Math.PI/180,i=this._helper._center.lat*Math.PI/180,n=Math.cos(i),a=[Math.sin(r)*n,Math.sin(i),Math.cos(r)*n],o=[a[2],0,-a[0]],s=[0,0,0];t.b2(s,o,a),t.b1(o,o),t.b1(s,s);let l=[0,0,0];return t.b1(l,[o[0]*e[0]+s[0]*e[1]+a[0]*e[2],o[1]*e[0]+s[1]*e[1]+a[1]*e[2],o[2]*e[0]+s[2]*e[1]+a[2]*e[2]]),l}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(e,r,i){var n,a;let o,s=(o=1/(1<<(a=i.canonical).z),new t.a7(e/t.a6*o+a.x*o,r/t.a6*o+a.y*o)),l=(n=s.y,[t.by(s.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-n*Math.PI*2))-.5*Math.PI]);return this.getCircleRadiusCorrection()/Math.cos(l[1])}projectTileCoordinates(e,r,i,n){let a=i.canonical,o=tR(e,r,a.x,a.y,a.z),s=1+(n?n(e,r):0)/t.bD,l=[o[0]*s,o[1]*s,o[2]*s,1];t.aE(l,l,this._globeViewProjMatrixNoCorrection);let c=this._cachedClippingPlane,u=c[0]*o[0]+c[1]*o[1]+c[2]*o[2]+c[3]<0;return{point:new t.P(l[0]/l[3],l[1]/l[3]),signedDistanceFromCamera:l[3],isOccluded:u}}_calcMatrices(){if(!this._helper._width||!this._helper._height)return;let e=tj(this.worldSize,this.center.lat),r=t.bj(),i=t.bj();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*e),t.bc(r,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);let n=this.centerOffset;r[8]=-(2*n.x)/this._helper._width,r[9]=2*n.y/this._helper._height,this._projectionMatrix=t.bd(r),this._globeProjMatrixInverted=t.bj(),t.bg(this._globeProjMatrixInverted,r),t.Q(r,r,[0,0,-this.cameraToCenterDistance]),t.be(r,r,this.rollInRadians),t.bf(r,r,-this.pitchInRadians),t.be(r,r,this.bearingInRadians),t.Q(r,r,[0,0,-e]);let a=t.bz();a[0]=e,a[1]=e,a[2]=e,t.bf(i,r,this.center.lat*Math.PI/180),t.bI(i,i,-this.center.lng*Math.PI/180),t.S(i,i,a),this._globeViewProjMatrixNoCorrection=i,t.bf(r,r,this.center.lat*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),t.bI(r,r,-this.center.lng*Math.PI/180),t.S(r,r,a),this._globeViewProjMatrix32f=new Float32Array(r),this._globeViewProjMatrixNoCorrectionInverted=t.bj(),t.bg(this._globeViewProjMatrixNoCorrectionInverted,i);let o=t.bz();this._cameraPosition=t.bz(),this._cameraPosition[2]=this.cameraToCenterDistance/e,t.bF(this._cameraPosition,this._cameraPosition,o,-this.rollInRadians),t.bG(this._cameraPosition,this._cameraPosition,o,this.pitchInRadians),t.bF(this._cameraPosition,this._cameraPosition,o,-this.bearingInRadians),t.a_(this._cameraPosition,this._cameraPosition,[0,0,1]),t.bG(this._cameraPosition,this._cameraPosition,o,-this.center.lat*Math.PI/180),t.bH(this._cameraPosition,this._cameraPosition,o,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(e);let s=t.bd(this._globeViewProjMatrixNoCorrectionInverted);t.S(s,s,[1,1,-1]),this._cachedFrustum=ty.fromInvProjectionMatrix(s,1,0,this._cachedClippingPlane,!0)}calculateFogMatrix(e){t.w("calculateFogMatrix is not supported on globe projection.");let r=t.bj();return t.ap(r),r}getVisibleUnwrappedCoordinates(e){return[new t.ba(0,e)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){e&&t.w("terrain is not fully supported on vertical perspective projection."),this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,r){if(!this._globeViewProjMatrixNoCorrection)return 1;let i=tF(e);t.aZ(i,i,1+r/t.bD);let n=t.bE();return t.aE(n,[i[0],i[1],i[2],1],this._globeViewProjMatrixNoCorrection),n[2]/n[3]}populateCache(e){}getBounds(){let e=.5*this.width,r=.5*this.height,i=[new t.P(0,0),new t.P(e,0),new t.P(this.width,0),new t.P(this.width,r),new t.P(this.width,this.height),new t.P(e,this.height),new t.P(0,this.height),new t.P(0,r)],n=[];for(let e of i)n.push(this.unprojectScreenPoint(e));let a=0,o=0,s=0,l=0,c=this.center;for(let e of n){let r=t.bJ(c.lng,e.lng),i=t.bJ(c.lat,e.lat);ra&&(a=r),is&&(s=i)}let u=[c.lng+o,c.lat+l,c.lng+a,c.lat+s];return this.isSurfacePointOnScreen([0,1,0])&&(u[3]=90,u[0]=-180,u[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(u[1]=-90,u[0]=-180,u[2]=180),new G(u)}calculateCenterFromCameraLngLatAlt(e,t,r,i){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,r,i)}setLocationAtPoint(e,r){let i=tF(this.unprojectScreenPoint(r)),n=tF(e),a=t.bz();t.bK(a);let o=t.bz();t.bH(o,i,a,-this.center.lng*Math.PI/180),t.bG(o,o,a,this.center.lat*Math.PI/180);let s=n[0]*n[0]+n[2]*n[2],l=o[0]*o[0];if(s=-g&&f<=g,v=m>=-g&&m<=g,x,b;if(y&&v){let e=this.center.lng*Math.PI/180,r=this.center.lat*Math.PI/180;t.bM(u,e)+t.bM(f,r)=0}isSurfacePointOnScreen(e){if(!this.isSurfacePointVisible(e))return!1;let r=t.bE();return t.aE(r,[...e,1],this._globeViewProjMatrixNoCorrection),r[0]/=r[3],r[1]/=r[3],r[2]/=r[3],r[0]>-1&&r[0]<1&&r[1]>-1&&r[1]<1&&r[2]>-1&&r[2]<1}rayPlanetIntersection(e,r){let i=t.b3(e,r),n=t.bz(),a=t.bz();t.aZ(a,r,i),t.b0(n,e,a);let o=1-t.b3(n,n);if(o<0)return null;let s=t.b3(e,e)-1,l=-i+(i<0?1:-1)*Math.sqrt(o),c=s/l;return{tMin:Math.min(c,l),tMax:Math.max(c,l)}}unprojectScreenPoint(e){var r,i;let n,a,o,s=this._cameraPosition,l=this.getRayDirectionFromPixel(e),c=this.rayPlanetIntersection(s,l);if(c){let e=t.bz();t.a_(e,s,[l[0]*c.tMin,l[1]*c.tMin,l[2]*c.tMin]);let r=t.bz();return t.b1(r,e),tB(r)}let u=this._cachedClippingPlane,h=u[0]*l[0]+u[1]*l[1]+u[2]*l[2],d=-t.b9(u,s)/h,f=t.bz();if(d>0)t.a_(f,s,[l[0]*d,l[1]*d,l[2]*d]);else{let e=t.bz();t.a_(e,s,[2*l[0],2*l[1],2*l[2]]);let r=t.b9(this._cachedClippingPlane,e);t.b0(f,e,[this._cachedClippingPlane[0]*r,this._cachedClippingPlane[1]*r,this._cachedClippingPlane[2]*r])}let p=((n=t.bz())[0]=-(u[0]*u[3]),n[1]=-(u[1]*u[3]),n[2]=-(u[2]*u[3]),{center:n,radius:Math.sqrt(1-u[3]*u[3])});return tB((r=p.center,i=p.radius,a=t.bz(),t.b0(a,f,r),o=t.bz(),t.bx(o,r,a,i/t.b7(a)),o))}getMatrixForModel(e,r){let i=t.W.convert(e),n=1/t.bD,a=t.bi();return t.bI(a,a,i.lng/180*Math.PI),t.bf(a,a,-i.lat/180*Math.PI),t.Q(a,a,[0,0,1+r/t.bD]),t.bf(a,a,.5*Math.PI),t.S(a,a,[n,n,n]),a}getProjectionDataForCustomLayer(e=!0){let r=this.getProjectionData({overscaledTileID:new t.a3(0,0,0,0,0),applyGlobeMatrix:e});return r.tileMercatorCoords=[0,0,1,1],r}getFastPathSimpleProjectionMatrix(e){}}class tJ{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(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,t,r){this._helper.interpolatePadding(e,t,r)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t,r=!0){this._helper.resize(e,t,r)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}setConstrainOverride(e){this._helper.setConstrainOverride(e)}overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}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(e,t){this._globeness=e,this._globeLatitudeErrorCorrectionRadians=t,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(e){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(e,t)=>this.currentTransform.defaultConstrain(e,t),this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new tp({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._globeness=1,this._mercatorTransform=new tv,this._verticalPerspectiveTransform=new tK}clone(){let e=new tJ;return e._globeness=this._globeness,e._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,e.apply(this,!1),e}apply(e,t){this._helper.apply(e,t),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(e){let t=this._mercatorTransform.getProjectionData(e),r=this._verticalPerspectiveTransform.getProjectionData(e);return{mainMatrix:this.isGlobeRendering?r.mainMatrix:t.mainMatrix,clippingPlane:r.clippingPlane,tileMercatorCoords:r.tileMercatorCoords,projectionTransition:e.applyGlobeMatrix?this._globeness:0,fallbackMatrix:t.fallbackMatrix}}isLocationOccluded(e){return this.currentTransform.isLocationOccluded(e)}transformLightDirection(e){return this.currentTransform.transformLightDirection(e)}getPixelScale(){return t.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return t.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(e,r,i){let n=this._mercatorTransform.getPitchedTextCorrection(e,r,i),a=this._verticalPerspectiveTransform.getPitchedTextCorrection(e,r,i);return t.bt(n,a,this._globeness)}projectTileCoordinates(e,t,r,i){return this.currentTransform.projectTileCoordinates(e,t,r,i)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(e){return this.currentTransform.calculateFogMatrix(e)}getVisibleUnwrappedCoordinates(e){return this.currentTransform.getVisibleUnwrappedCoordinates(e)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(e){this._mercatorTransform.recalculateZoomAndCenter(e),this._verticalPerspectiveTransform.recalculateZoomAndCenter(e)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,t){return this.currentTransform.lngLatToCameraDepth(e,t)}populateCache(e){this._mercatorTransform.populateCache(e),this._verticalPerspectiveTransform.populateCache(e)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(e,t,r,i){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,r,i)}setLocationAtPoint(e,t){this.isGlobeRendering?(this._verticalPerspectiveTransform.setLocationAtPoint(e,t),this.apply(this._verticalPerspectiveTransform,!1)):(this._mercatorTransform.setLocationAtPoint(e,t),this.apply(this._mercatorTransform,!1))}locationToScreenPoint(e,t){return this.currentTransform.locationToScreenPoint(e,t)}screenPointToMercatorCoordinate(e,t){return this.currentTransform.screenPointToMercatorCoordinate(e,t)}screenPointToLocation(e,t){return this.currentTransform.screenPointToLocation(e,t)}isPointOnMapSurface(e,t){return this.currentTransform.isPointOnMapSurface(e,t)}getRayDirectionFromPixel(e){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e)}getMatrixForModel(e,t){return this.currentTransform.getMatrixForModel(e,t)}getProjectionDataForCustomLayer(e=!0){let t=this._mercatorTransform.getProjectionDataForCustomLayer(e);if(!this.isGlobeRendering)return t;let r=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e);return r.fallbackMatrix=t.mainMatrix,r}getFastPathSimpleProjectionMatrix(e){return this.currentTransform.getFastPathSimpleProjectionMatrix(e)}}class tQ{get useGlobeControls(){return!0}handlePanInertia(e,r){let i=tV(e,r);return Math.abs(i.lng-r.center.lng)>180&&(i.lng=r.center.lng+179.5*Math.sign(i.lng-r.center.lng)),{easingCenter:i,easingOffset:new t.P(0,0)}}handleMapControlsRollPitchBearingZoom(e,r){let i=e.around,n=r.screenPointToLocation(i);e.bearingDelta&&r.setBearing(r.bearing+e.bearingDelta),e.pitchDelta&&r.setPitch(r.pitch+e.pitchDelta),e.rollDelta&&r.setRoll(r.roll+e.rollDelta);let a=r.zoom;e.zoomDelta&&r.setZoom(r.zoom+e.zoomDelta);let o=r.zoom-a;if(0===o)return;let s=t.bJ(r.center.lng,n.lng),l=s/(Math.abs(s/180)+1),c=t.bJ(r.center.lat,n.lat),u=r.getRayDirectionFromPixel(i),h=r.cameraPosition,d=-1*t.b3(h,u),f=t.bz();t.a_(f,h,[u[0]*d,u[1]*d,u[2]*d]);let p=Math.exp(-(.5*Math.max(t.b5(f)-1-.3,0))),m=tj(r.worldSize,r.center.lat)/Math.min(r.width,r.height),g=t.bw(m,.9,.5,1,.25),y=(1-t.ao(-o))*Math.min(p,g),v=r.center.lat,x=r.zoom,b=new t.W(r.center.lng+l*y,t.al(r.center.lat+c*y,-t.am,t.am));r.setLocationAtPoint(n,i);let _=r.center,w=Math.pow(Math.max(t.bw(Math.abs(s),45,85,0,1),t.bw(m,.75,.35,0,1)),.25),T=t.bJ(_.lng,b.lng),M=t.bJ(_.lat,b.lat);r.setCenter(new t.W(_.lng+T*w,_.lat+M*w).wrap()),r.setZoom(x+tU(v,r.center.lat))}handleMapControlsPan(e,t,r){if(!e.panDelta)return;let i=t.center.lat,n=t.zoom;t.setCenter(tV(e.panDelta,t).wrap()),t.setZoom(n+tU(i,t.center.lat))}cameraForBoxAndBearing(e,r,i,n,a){let o=t_(e,r,i,n,a),s=r.left/a.width*2-1,l=(a.width-r.right)/a.width*2-1,c=-(r.top/a.height*2)+1,u=-((a.height-r.bottom)/a.height*2)+1,h=0>t.bJ(i.getWest(),i.getEast()),d=h?i.getEast():i.getWest(),f=h?i.getWest():i.getEast(),p=Math.max(i.getNorth(),i.getSouth()),m=Math.min(i.getNorth(),i.getSouth()),g=d+.5*t.bJ(d,f),y=p+.5*t.bJ(p,m),v=a.clone();v.setCenter(o.center),v.setBearing(o.bearing),v.setPitch(0),v.setRoll(0),v.setZoom(o.zoom);let x=v.modelViewProjectionMatrix,b=[tF(i.getNorthWest()),tF(i.getNorthEast()),tF(i.getSouthWest()),tF(i.getSouthEast()),tF(new t.W(f,y)),tF(new t.W(d,y)),tF(new t.W(g,p)),tF(new t.W(g,m))],_=tF(o.center),w=1/0;for(let e of b)s<0&&(w=tQ.getLesserNonNegativeNonNull(w,tQ.solveVectorScale(e,_,x,"x",s))),l>0&&(w=tQ.getLesserNonNegativeNonNull(w,tQ.solveVectorScale(e,_,x,"x",l))),c>0&&(w=tQ.getLesserNonNegativeNonNull(w,tQ.solveVectorScale(e,_,x,"y",c))),u<0&&(w=tQ.getLesserNonNegativeNonNull(w,tQ.solveVectorScale(e,_,x,"y",u)));if(Number.isFinite(w)&&0!==w)return o.zoom=Math.min(v.zoom+t.ar(w),e.maxZoom),o;tx()}handleJumpToCenterZoom(e,r){let i=e.center.lat,n=e.applyConstrain(r.center?t.W.convert(r.center):e.center,e.zoom).center;e.setCenter(n.wrap());let a=void 0!==r.zoom?+r.zoom:e.zoom+tU(i,n.lat);e.zoom!==a&&e.setZoom(a)}handleEaseTo(e,r){let i=e.zoom,n=e.center,a=e.padding,o={roll:e.roll,pitch:e.pitch,bearing:e.bearing},s={roll:void 0===r.roll?e.roll:r.roll,pitch:void 0===r.pitch?e.pitch:r.pitch,bearing:void 0===r.bearing?e.bearing:r.bearing},l=void 0!==r.zoom,c=!e.isPaddingEqual(r.padding),u=!1,h=r.center?t.W.convert(r.center):n,d=e.applyConstrain(h,i).center;td(e,d);let f=e.clone();f.setCenter(d),f.setZoom(l?+r.zoom:i+tU(n.lat,h.lat)),f.setBearing(r.bearing);let p=new t.P(t.al(e.centerPoint.x+r.offsetAsPoint.x,0,e.width),t.al(e.centerPoint.y+r.offsetAsPoint.y,0,e.height));f.setLocationAtPoint(d,p);let m=(r.offset&&r.offsetAsPoint.mag())>0?f.center:d,g=l?+r.zoom:i+tU(n.lat,m.lat),y=i+tU(n.lat,0),v=g+tU(m.lat,0),x=t.bJ(n.lng,m.lng),b=t.bJ(n.lat,m.lat),_=t.ao(v-y);return{easeFunc:i=>{if(t.bn(o,s)||tb({startEulerAngles:o,endEulerAngles:s,tr:e,k:i,useSlerp:o.roll!=s.roll}),c&&e.interpolatePadding(a,r.padding,i),r.around)t.w("Easing around a point is not supported under globe projection."),e.setLocationAtPoint(r.around,r.aroundPoint);else{let t=Math.pow(v>y?Math.min(2,_):Math.max(.5,_),1-i),r=tH(n,x,b,i*t);e.setCenter(r.wrap())}if(u){let r=t.H.number(y,v,i)+tU(0,e.center.lat);e.setZoom(r)}},isZooming:u=g!==i,elevationCenter:m}}handleFlyTo(e,r){let i,n,a=void 0!==r.zoom,o=e.center,s=e.zoom,l=e.padding,c=!e.isPaddingEqual(r.padding),u=e.applyConstrain(t.W.convert(r.center||r.locationAtOffset),s).center,h=a?+r.zoom:e.zoom+tU(e.center.lat,u.lat),d=e.clone();d.setCenter(u),d.setZoom(h),d.setBearing(r.bearing);let f=new t.P(t.al(e.centerPoint.x+r.offsetAsPoint.x,0,e.width),t.al(e.centerPoint.y+r.offsetAsPoint.y,0,e.height));d.setLocationAtPoint(u,f);let p=d.center;td(e,p);let m=(i=tF(o),n=tF(p),Math.acos(t.b3(i,n))/(2*Math.PI)*tO(e)),g=s+tU(o.lat,0),y=h+tU(p.lat,0),v=t.ao(y-g),x;if("number"==typeof r.minZoom){let i=Math.min(+r.minZoom+tU(p.lat,0),g,y)+tU(0,p.lat),n=e.applyConstrain(p,i).zoom+tU(p.lat,0);x=t.ao(n-g)}let b=t.bJ(o.lng,p.lng),_=t.bJ(o.lat,p.lat);return{easeFunc:(i,n,a,s)=>{let u=tH(o,b,_,a);c&&e.interpolatePadding(l,r.padding,i);let d=1===i?p:u;e.setCenter(d.wrap());let f=g+t.ar(n);e.setZoom(1===i?h:f+tU(0,d.lat))},scaleOfZoom:v,targetCenter:p,scaleOfMinZoom:x,pixelPathLength:m}}static solveVectorScale(e,t,r,i,n){let a="x"===i?[r[0],r[4],r[8],r[12]]:[r[1],r[5],r[9],r[13]],o=[r[3],r[7],r[11],r[15]],s=e[0]*a[0]+e[1]*a[1]+e[2]*a[2],l=e[0]*o[0]+e[1]*o[1]+e[2]*o[2],c=t[0]*a[0]+t[1]*a[1]+t[2]*a[2],u=t[0]*o[0]+t[1]*o[1]+t[2]*o[2];return c+n*l===s+n*u||o[3]*(s-c)+a[3]*(u-l)+s*u==c*l?null:(c+a[3]-n*u-n*o[3])/(c-s-n*u+n*l)}static getLesserNonNegativeNonNull(e,t){return null!==t&&t>=0&&tt.C(e,r?.filter(e=>"source.canvas"!==e.identifier)),t2=t.bN();class t3 extends t.E{constructor(e,r={}){var i,n;super(),this._rtlPluginLoaded=()=>{for(let e in this.tileManagers){let t=this.tileManagers[e].getSource().type;"vector"!==t&&"geojson"!==t||this.tileManagers[e].reload()}},this.map=e,this.dispatcher=new N(B(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",(e,t)=>this.getGlyphs(e,t)),this.dispatcher.registerMessageHandler("GI",(e,t)=>this.getImages(e,t)),this.dispatcher.registerMessageHandler("GDA",(e,t)=>this.getDashes(e,t)),this.imageManager=new T,this.imageManager.setEventedParent(this);let a=(null==(i=e._container)?void 0:i.lang)||"u">typeof document&&(null==(n=document.documentElement)?void 0:n.lang)||void 0;this.glyphManager=new E(e._requestManager,r.localIdeographFontFamily,a),this.lineAtlas=new z(256,512),this.crossTileSymbolIndex=new tr,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",t.bO()),ec().on(eo,this._rtlPluginLoaded),this.on("data",e=>{if("source"!==e.dataType||"metadata"!==e.sourceDataType)return;let t=this.tileManagers[e.sourceId];if(!t)return;let r=t.getSource();if(r?.vectorLayerIds)for(let e in this._layers){let t=this._layers[e];t.source===r.id&&this._validateLayer(t)}})}_setInitialValues(){var e;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new t.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new((null==(e=this.crossTileSymbolIndex)?void 0:e.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(e,r){var i,n,a;this._checkLoaded();let o=null===r?null!=(a=null==(n=null==(i=this.stylesheet.state)?void 0:i[e])?void 0:n.default)?a:null:r;if(t.bQ(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 i in e)t.bQ(this._globalState[i],e[i].default)||(r.push(i),this._globalState[i]=e[i].default);this._applyGlobalStateChanges(r)}_applyGlobalStateChanges(e){if(0===e.length)return;let t=new Set,r={};for(let i of e)for(let e in r[i]=this._globalState[i],this._layers){let r=this._layers[e],n=r.getLayoutAffectingGlobalStateRefs(),a=r.getPaintAffectingGlobalStateRefs(),o=r.getVisibilityAffectingGlobalStateRefs();if(n.has(i)&&t.add(r.source),a.has(i))for(let{name:e,value:t}of a.get(i))this._updatePaintProperty(r,e,t);o?.has(i)&&(r.recalculateVisibility(),this._updateLayer(r))}for(let e in this.dispatcher.broadcast("UGS",r),this.tileManagers)t.has(e)&&(this._reloadSource(e),this._changed=!0)}loadURL(e){return t._(this,arguments,void 0,function*(e,r={},i){this.fire(new t.n("dataloading",{dataType:"style"})),r.validate="boolean"!=typeof r.validate||r.validate,this._loadStyleRequest=new AbortController;let n=this._loadStyleRequest;try{let a=yield this.map._requestManager.transformRequest(e,"Style");t.bR(n.signal);let o=yield t.k(a,n);this._loadStyleRequest===n&&(this._loadStyleRequest=null),this._load(o.data,r,i)}catch(e){this._loadStyleRequest===n&&(this._loadStyleRequest=null),e&&!n.signal.aborted&&this.fire(new t.l(t.d(e)))}})}loadJSON(e,r={},i){this.fire(new t.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,g.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,r.validate=!1!==r.validate,this._load(e,r,i)}).catch(()=>{})}loadEmpty(){this.fire(new t.n("dataloading",{dataType:"style"})),this._load(t2,{validate:!1})}_load(e,r,i){var n,a;let o=r.transformStyle?r.transformStyle(i,e):e;if(!r.validate||!t1(this,t.F(o))){for(let e in o=Object.assign({},o),this._loaded=!0,this.stylesheet=o,o.sources)this.addSource(e,o.sources[e],{validate:!1});o.sprite?this._loadSprite(o.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(o.glyphs),this._createLayers(),this.light=new L(this.stylesheet.light),this._setProjectionInternal((null==(n=this.stylesheet.projection)?void 0:n.type)||"mercator"),this.sky=new I(this.stylesheet.sky),this.map.setTerrain(null!=(a=this.stylesheet.terrain)?a:null),this.fire(new t.n("data",{dataType:"style"})),this.fire(new t.n("style.load"))}}_createLayers(){var e,r,i;let n=t.bS(this.stylesheet.layers);for(let a of(this.setGlobalState(null!=(e=this.stylesheet.state)?e:null),this.dispatcher.broadcast("SL",n),this._order=n.map(e=>e.id),this._layers={},this._serializedLayers=null,n)){let e=t.bT(a,this._globalState);if(e.setEventedParent(this,{layer:{id:a.id}}),this._layers[a.id]=e,t.bU(e)&&this.tileManagers[e.source]){let t=null!=(i=null==(r=a.paint)?void 0:r["raster-fade-duration"])?i:e.paint.get("raster-fade-duration");this.tileManagers[e.source].setRasterFadeDuration(t)}}}_loadSprite(e,r=!1,i){this.imageManager.setLoaded(!1);let n=new AbortController,a;this._spriteRequest=n,(function(e,r,i,n){return t._(this,void 0,void 0,function*(){let a=_(e),o=i>1?"@2x":"",s={},c={};for(let{id:e,url:i}of a){let a=yield r.transformRequest(w(i,o,".json"),"SpriteJSON");s[e]=t.k(a,n);let u=yield r.transformRequest(w(i,o,".png"),"SpriteImage");c[e]=l.getImage(u,n)}return yield Promise.all([...Object.values(s),...Object.values(c)]),function(e,r){return t._(this,void 0,void 0,function*(){let t={};for(let i in e){t[i]={};let n=g.getImageCanvasContext((yield r[i]).data),a=(yield e[i]).data;for(let e in a){let{width:r,height:o,x:s,y:l,sdf:c,pixelRatio:u,stretchX:h,stretchY:d,content:f,textFitWidth:p,textFitHeight:m}=a[e];t[i][e]={data:null,pixelRatio:u,sdf:c,stretchX:h,stretchY:d,content:f,textFitWidth:p,textFitHeight:m,spriteData:{width:r,height:o,x:s,y:l,context:n}}}}return t})}(s,c)})})(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(e=>{if(this._spriteRequest=null,e)for(let t in e){for(let r of(this._spritesImagesIds[t]=[],this._spritesImagesIds[t]?this._spritesImagesIds[t].filter(t=>!(t in e)):[]))this.imageManager.removeImage(r),this._changedImages[r]=!0;for(let i in e[t]){let n="default"===t?i:`${t}:${i}`;this._spritesImagesIds[t].push(n),n in this.imageManager.images?this.imageManager.updateImage(n,e[t][i],!1):this.imageManager.addImage(n,e[t][i]),r&&(this._changedImages[n]=!0)}}}).catch(e=>{this._spriteRequest=null,a=e,n.signal.aborted||this.fire(new t.l(a))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),r&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.n("data",{dataType:"style"})),i&&i(a)})}_unloadSprite(){for(let e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.n("data",{dataType:"style"}))}_validateLayer(e){let r=this.tileManagers[e.source];if(!r)return;let i=e.sourceLayer;if(!i)return;let n=r.getSource();("geojson"===n.type||n.vectorLayerIds&&!n.vectorLayerIds.includes(i))&&this.fire(new t.l(Error(`Source layer "${i}" does not exist on source "${n.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 i=this._serializedAllLayers();if(!e||0===e.length)return Object.values(r?t.bV(i):i);let n=[];for(let a of e)if(i[a]){let e=r?t.bV(i[a]):i[a];n.push(e)}return n}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;for(let t of(e=this._serializedLayers={},Object.keys(this._layers))){let r=this._layers[t];"custom"!==r.type&&(e[t]=r.serialize())}return e}hasTransitions(){var e,t,r;if(null!=(e=this.light)&&e.hasTransition()||null!=(t=this.sky)&&t.hasTransition()||null!=(r=this.projection)&&r.hasTransition())return!0;for(let e in this.tileManagers)if(this.tileManagers[e].hasTransition())return!0;for(let e in this._layers)if(this._layers[e].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){let t=Object.keys(this._updatedLayers),r=Object.keys(this._removedLayers);for(let e in(t.length||r.length)&&this._updateWorkerLayers(t,r),this._updatedSources){let t=this._updatedSources[e];if("reload"===t)this._reloadSource(e);else{if("clear"!==t)throw Error(`Invalid action ${t}`);this._clearSource(e)}}for(let t in this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs(),this._updatedPaintProps)this._layers[t].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}let i={};for(let e in this.tileManagers){let t=this.tileManagers[e];i[e]=t.used,t.used=!1}for(let t of this._order){let r=this._layers[t];r.recalculate(e,this._availableImages),!r.isHidden(e.zoom)&&r.source&&(this.tileManagers[r.source].used=!0)}for(let e in i){let r=this.tileManagers[e];!!i[e]!=!!r.used&&r.fire(new t.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:e}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,r&&this.fire(new t.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let e=Object.keys(this._changedImages);if(e.length){for(let t in this.tileManagers)this.tileManagers[t].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,t){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:t})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,r={}){var i;this._checkLoaded();let n=this.serialize();if(e=r.transformStyle?r.transformStyle(n,e):e,(null==(i=r.validate)||i)&&t1(this,t.F(e)))return!1;(e=t.bV(e)).layers=t.bS(e.layers);let a=t.bW(n,e),o=this._getOperationsToPerform(a);if(o.unimplemented.length>0)throw Error(`Unimplemented: ${o.unimplemented.join(", ")}.`);if(0===o.operations.length)return!1;for(let e of o.operations)e();return this.stylesheet=e,this._serializedLayers=null,this.fire(new t.n("style.load",{style:this})),!0}_getOperationsToPerform(e){let t=[],r=[];for(let i of e)switch(i.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":t.push(()=>this.addLayer.apply(this,i.args));break;case"removeLayer":t.push(()=>this.removeLayer.apply(this,i.args));break;case"setPaintProperty":t.push(()=>this.setPaintProperty.apply(this,i.args));break;case"setLayoutProperty":t.push(()=>this.setLayoutProperty.apply(this,i.args));break;case"setFilter":t.push(()=>this.setFilter.apply(this,i.args));break;case"addSource":t.push(()=>this.addSource.apply(this,i.args));break;case"removeSource":t.push(()=>this.removeSource.apply(this,i.args));break;case"setLayerZoomRange":t.push(()=>this.setLayerZoomRange.apply(this,i.args));break;case"setLight":t.push(()=>this.setLight.apply(this,i.args));break;case"setGeoJSONSourceData":t.push(()=>this.setGeoJSONSourceData.apply(this,i.args));break;case"setGlyphs":t.push(()=>this.setGlyphs.apply(this,i.args));break;case"setSprite":t.push(()=>this.setSprite.apply(this,i.args));break;case"setTerrain":t.push(()=>this.map.setTerrain.apply(this,i.args));break;case"setSky":t.push(()=>this.setSky.apply(this,i.args));break;case"setProjection":this.setProjection.apply(this,i.args);break;case"setGlobalState":t.push(()=>this.setGlobalState.apply(this,i.args));break;case"setTransition":t.push(()=>{});break;default:r.push(i.command)}return{operations:t,unimplemented:r}}addImage(e,r){if(this.getImage(e))return this.fire(new t.l(Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,r),this._afterImageUpdated(e)}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new t.l(Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,r,i={}){var n;if(this._checkLoaded(),void 0!==this.tileManagers[e])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(["vector","raster","geojson","video","image"].includes(r.type)&&this._validate(t.F.source,`sources.${e}`,r,null,i))return;null!=(n=this.map)&&n._collectResourceTiming&&(r.collectResourceTiming=!0);let a=this.tileManagers[e]=new eE(e,r,this.dispatcher);a.style=this,a.setEventedParent(this,()=>({isSourceLoaded:a.loaded(),source:a.serialize(),sourceId:e})),a.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),void 0===this.tileManagers[e])throw Error(`There is no source with this ID=${e}`);for(let r in this._layers)if(this._layers[r].source===e)return this.fire(new t.l(Error(`Source "${e}" cannot be removed while layer "${r}" is using it.`)));let r=this.tileManagers[e];delete this.tileManagers[e],delete this._updatedSources[e],r.fire(new t.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),r.setEventedParent(null),r.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,t){if(this._checkLoaded(),void 0===this.tileManagers[e])throw Error(`There is no source with this ID=${e}`);let r=this.tileManagers[e].getSource();if("geojson"!==r.type)throw Error(`geojsonSource.type is ${r.type}, which is !== 'geojson`);r.setData(t),this._changed=!0}getSource(e){var t;return null==(t=this.tileManagers[e])?void 0:t.getSource()}addLayer(e,r,i={}){let n;this._checkLoaded();let a=e.id;if(this.getLayer(a))return void this.fire(new t.l(Error(`Layer "${a}" already exists on this map.`)));if("custom"===e.type){if(t1(this,t.bX(e)))return;n=t.bT(e,this._globalState)}else{if("source"in e&&"object"==typeof e.source&&(this.addSource(a,e.source),e=t.bV(e),e=t.e(e,{source:a})),this._validate(t.F.layer,`layers.${a}`,e,{arrayIndex:-1},i))return;n=t.bT(e,this._globalState),this._validateLayer(n),n.setEventedParent(this,{layer:{id:a}})}let o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new t.l(Error(`Cannot add layer "${a}" before non-existing layer "${r}".`)));else{if(this._order.splice(o,0,a),this._layerOrderChanged=!0,this._layers[a]=n,this._removedLayers[a]&&n.source&&"custom"!==n.type){let e=this._removedLayers[a];delete this._removedLayers[a],e.type!==n.type?this._updatedSources[n.source]="clear":(this._updatedSources[n.source]="reload",this.tileManagers[n.source].pause())}this._updateLayer(n),n.onAdd&&n.onAdd(this.map)}}moveLayer(e,r){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new t.l(Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===r)return;let i=this._order.indexOf(e);this._order.splice(i,1);let n=r?this._order.indexOf(r):this._order.length;r&&-1===n?this.fire(new t.l(Error(`Cannot move layer "${e}" before non-existing layer "${r}".`))):(this._order.splice(n,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();let r=this._layers[e];if(!r)return void this.fire(new t.l(Error(`Cannot remove non-existing layer "${e}".`)));r.setEventedParent(null);let i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,r,i){this._checkLoaded();let n=this.getLayer(e);n?n.minzoom===r&&n.maxzoom===i||(null!=r&&(n.minzoom=r),null!=i&&(n.maxzoom=i),this._updateLayer(n)):this.fire(new t.l(Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,r,i={}){this._checkLoaded();let n=this.getLayer(e);if(n){if(!t.bQ(n.filter,r))return null==r?(n.setFilter(void 0),void this._updateLayer(n)):void(this._validate(t.F.filter,`layers.${n.id}.filter`,r,null,i)||(n.setFilter(t.bV(r)),this._updateLayer(n)))}else this.fire(new t.l(Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return t.bV(this.getLayer(e).filter)}setLayoutProperty(e,r,i,n={}){this._checkLoaded();let a=this.getLayer(e);a?t.bQ(a.getLayoutProperty(r),i)||(a.setLayoutProperty(r,i,n),this._updateLayer(a)):this.fire(new t.l(Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,r){let i=this.getLayer(e);if(i)return i.getLayoutProperty(r);this.fire(new t.l(Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,r,i,n={}){this._checkLoaded();let a=this.getLayer(e);a?t.bQ(a.getPaintProperty(r),i)||this._updatePaintProperty(a,r,i,n):this.fire(new t.l(Error(`Cannot style non-existing layer "${e}".`)))}_updatePaintProperty(e,r,i,n={}){e.setPaintProperty(r,i,n)&&this._updateLayer(e),t.bU(e)&&"raster-fade-duration"===r&&this.tileManagers[e.source].setRasterFadeDuration(i),this._changed=!0,this._updatedPaintProps[e.id]=!0,this._serializedLayers=null}getPaintProperty(e,t){return this.getLayer(e).getPaintProperty(t)}setFeatureState(e,r){this._checkLoaded();let i=e.source,n=e.sourceLayer,a=this.tileManagers[i];if(void 0===a)return void this.fire(new t.l(Error(`The source '${i}' does not exist in the map's style.`)));let o=a.getSource().type;"geojson"===o&&n?this.fire(new t.l(Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||n?(void 0===e.id&&this.fire(new t.l(Error("The feature id parameter must be provided."))),a.setFeatureState(n,e.id,r)):this.fire(new t.l(Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,r){this._checkLoaded();let i=e.source,n=this.tileManagers[i];if(void 0===n)return void this.fire(new t.l(Error(`The source '${i}' does not exist in the map's style.`)));let a=n.getSource().type,o="vector"===a?e.sourceLayer:void 0;"vector"!==a||o?r&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.l(Error("A feature id is required to remove its specific state property."))):n.removeFeatureState(o,e.id,r):this.fire(new t.l(Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();let r=e.source,i=e.sourceLayer,n=this.tileManagers[r];if(void 0!==n)return"vector"!==n.getSource().type||i?(void 0===e.id&&this.fire(new t.l(Error("The feature id parameter must be provided."))),n.getFeatureState(i,e.id)):void this.fire(new t.l(Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new t.l(Error(`The source '${r}' does not exist in the map's style.`)))}getTransition(){var e;return t.e({duration:300,delay:0},null==(e=this.stylesheet)?void 0:e.transition)}serialize(){if(!this._loaded)return;let e=t.bY(this.tileManagers,e=>e.serialize()),r=this._serializeByIds(this._order,!0),i=this.map.getTerrain()||void 0,n=this.stylesheet;return t.bZ({version:n.version,name:n.name,metadata:n.metadata,light:n.light,sky:n.sky,center:n.center,zoom:n.zoom,bearing:n.bearing,pitch:n.pitch,sprite:n.sprite,glyphs:n.glyphs,transition:n.transition,projection:n.projection,sources:e,layers:r,terrain:i},e=>void 0!==e)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.tileManagers[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.tileManagers[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){let t=e=>"fill-extrusion"===this._layers[e].type,r={},i=[];for(let n=this._order.length-1;n>=0;n--){let a=this._order[n];if(t(a))for(let t of(r[a]=n,e)){let e=t[a];if(e)for(let t of e)i.push(t)}}i.sort((e,t)=>t.intersectionZ-e.intersectionZ);let n=[];for(let a=this._order.length-1;a>=0;a--){let o=this._order[a];if(t(o))for(let e=i.length-1;e>=0;e--){let t=i[e].feature;if(r[t.layer.id]s(n.tileID,e,t):void 0)});var d,f=function(e){let t={},r={};for(let{queryResults:i,wrappedTileID:n}of e){r[n]||(r[n]={});let e=r[n];for(let r in i){let n=i[r];e[r]||(e[r]={});let a=e[r];for(let e of(t[r]||(t[r]=[]),n))a[e.featureIndex]||(a[e.featureIndex]=!0,t[r].push(e))}}return t}(h);for(let t in f)for(let r of f[t])q(r,e);return f}(this.tileManagers[s],this._layers,o,e,l,i,this.map.terrain?(e,t,r)=>this.map.terrain.getElevation(e,t,r):void 0));return this.placement&&a.push(function(e,t,r,i,n,a,o){let s={},l=a.queryRenderedSymbols(i),c=[];for(let e of Object.keys(l).map(Number))c.push(o[e]);for(let r of(c.sort(V),c)){let i=r.featureIndex.lookupSymbolFeatures(l[r.bucketInstanceId],t,r.bucketIndex,r.sourceLayerIndex,{filterSpec:n.filter,globalState:n.globalState},n.layers,n.availableImages,e);for(let e in i){s[e]||(s[e]=[]);let t=i[e];for(let i of(t.sort((e,t)=>{let i=r.featureSortOrder;if(i){let r=i.indexOf(e.featureIndex);return i.indexOf(t.featureIndex)-r}return t.featureIndex-e.featureIndex}),t))s[e].push(i)}}for(let t in s)for(let i of s[t])q(i,r[e[t].source]);return s}(this._layers,o,this.tileManagers,e,l,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(a)}querySourceFeatures(e,r){r?.filter&&this._validate(t.F.filter,"querySourceFeatures.filter",r.filter,null,r);let i=this.tileManagers[e];return i?function(e,t){let r=e.getRenderableIds().map(t=>e.getTileByID(t)),i=[],n={};for(let e of r){let r=e.tileID.canonical.key;n[r]||(n[r]=!0,e.querySourceFeatures(i,t))}return i}(i,r?Object.assign(Object.assign({},r),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(e,r={}){this._checkLoaded();let i=this.light.getLight(),n=!1;for(let r in e)if(!t.bQ(e[r],i[r])){n=!0;break}if(!n)return;let a={now:v(),transition:t.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,r),this.light.updateTransitions(a)}getProjection(){var e;return null==(e=this.stylesheet)?void 0:e.projection}setProjection(e){this._checkLoaded();let t=e??{type:"mercator"};if(this.stylesheet.projection=e,this.projection){if(this.projection.name===t.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(t.type)}getSky(){var e;return null==(e=this.stylesheet)?void 0:e.sky}setSky(e,r={}){this._checkLoaded();let i=this.getSky(),n=!1;if(!e&&!i)return;if(e&&!i)n=!0;else if(!e&&i)n=!0;else for(let r in e)if(!t.bQ(e[r],i[r])){n=!0;break}if(!n)return;let a={now:v(),transition:t.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=e,this.sky.setSky(e,r),this.sky.updateTransitions(a)}_setProjectionInternal(e){let r=function(e,r){let i={constrainOverride:r};if(Array.isArray(e)){let t=new tD({type:e});return{projection:t,transform:new tJ(i),cameraHelper:new t0(t)}}switch(e){case"mercator":return{projection:new tu,transform:new tv(i),cameraHelper:new tw};case"globe":{let e=new tD({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:e,transform:new tJ(i),cameraHelper:new t0(e)}}case"vertical-perspective":return{projection:new tI,transform:new tK(i),cameraHelper:new tQ};default:return t.w(`Unknown projection name: ${e}. Falling back to mercator projection.`),{projection:new tu,transform:new tv(i),cameraHelper:new tw}}}(e,this.map.transformConstrain);for(let e in this.projection=r.projection,this.map.migrateProjection(r.transform,r.cameraHelper),this.tileManagers)this.tileManagers[e].reload()}_validate(e,r,i,n,a={}){return a?.validate!==!1&&t1(this,e.call(t.F,t.e({key:r,style:this.serialize(),value:i,styleSpec:t.x},n)))}_remove(e=!0){for(let e in this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),ec().off(eo,this._rtlPluginLoaded),this._layers)this._layers[e].setEventedParent(null);for(let e in this.tileManagers){let t=this.tileManagers[e];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 t in this.tileManagers)this.tileManagers[t].update(e,this.map.terrain)}_generateCollisionBoxes(){for(let e in this.tileManagers)this._reloadSource(e)}_updatePlacement(e,t,r,i,n=!1){let a=!1,o=!1,s={};for(let t of this._order){let r=this._layers[t];if("symbol"!==r.type)continue;if(!s[r.source]){let e=this.tileManagers[r.source];s[r.source]=e.getRenderableIds(!0).map(t=>e.getTileByID(t)).sort((e,t)=>t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1))}let i=this.crossTileSymbolIndex.addLayer(r,s[r.source],e.center.lng);a||(a=i)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),n||(n=this._layerOrderChanged||0===r),(n||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(v(),e.zoom))&&(this.pauseablePlacement=new e8(e,this.map.terrain,this._order,n,t,r,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,s),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(v()),o=!0),a&&this.pauseablePlacement.placement.setStale()),o||a)for(let e of this._order){let t=this._layers[e];"symbol"===t.type&&this.placement.updateLayerOpacities(t,s[t.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(v())}_releaseSymbolFadeTiles(){for(let e in this.tileManagers)this.tileManagers[e].releaseSymbolFadeTiles()}getImages(e,r){return t._(this,void 0,void 0,function*(){let e=yield this.imageManager.getImages(r.icons);this._updateTilesForChangedImages();let t=this.tileManagers[r.source];return t&&t.setDependencies(r.tileID.key,r.type,r.icons),e})}getGlyphs(e,r){return t._(this,void 0,void 0,function*(){let e=yield this.glyphManager.getGlyphs(r.stacks),t=this.tileManagers[r.source];return t&&t.setDependencies(r.tileID.key,r.type,[""]),e})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,r={}){this._checkLoaded(),e&&this._validate(t.F.glyphs,"glyphs",e,null,r)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}getDashes(e,r){return t._(this,void 0,void 0,function*(){let e={};for(let[t,i]of Object.entries(r.dashes))e[t]=this.lineAtlas.getDash(i.dasharray,i.round);return e})}addSprite(e,r,i={},n){this._checkLoaded();let a=[{id:e,url:r}],o=[..._(this.stylesheet.sprite),...a];this._validate(t.F.sprite,"sprite",o,null,i)||(this.stylesheet.sprite=o,this._loadSprite(a,!0,n))}removeSprite(e){this._checkLoaded();let r=_(this.stylesheet.sprite);if(r.find(t=>t.id===e)){if(this._spritesImagesIds[e])for(let t of this._spritesImagesIds[e])this.imageManager.removeImage(t),this._changedImages[t]=!0;r.splice(r.findIndex(t=>t.id===e),1),this.stylesheet.sprite=r.length>0?r:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.n("data",{dataType:"style"}))}else this.fire(new t.l(Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return _(this.stylesheet.sprite)}setSprite(e,r={},i){this._checkLoaded(),e&&this._validate(t.F.sprite,"sprite",e,null,r)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,i):(this._unloadSprite(),i&&i(null)))}destroy(){for(let e in this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),this.tileManagers){let t=this.tileManagers[e];t.setEventedParent(null),t.onRemove(this.map)}for(let e in this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy(),this._layers){let t=this._layers[e];t.setEventedParent(null),t.onRemove&&t.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var t5=t.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class t4{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,t,r,i,n,a,o,s,l){this.context=e;let c=this.boundPaintVertexBuffers.length!==i.length;for(let e=0;!c&&e({u_texture:0,u_ele_delta:e,u_fog_matrix:r,u_fog_color:i?i.properties.get("fog-color"):t.bo.white,u_fog_ground_blend:i?i.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:a?0:i?i.calculateFogBlendOpacity(n):0,u_horizon_color:i?i.properties.get("horizon-color"):t.bo.white,u_horizon_fog_blend:i?i.properties.get("horizon-fog-blend"):1,u_is_globe_mode:+!!a}),t8={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function t7(e){let t=[];for(let r of e){if(null===r)continue;let e=r.split(" ");t.push(e.pop())}return t}class t9{constructor(e,r,i,n,a,o,s,l,c=[]){let u=e.gl;this.program=u.createProgram();let h=t7(r.staticAttributes),d=i?i.getBinderAttributes():[],f=h.concat(d),p=tn.prelude.staticUniforms?t7(tn.prelude.staticUniforms):[],m=s.staticUniforms?t7(s.staticUniforms):[],g=r.staticUniforms?t7(r.staticUniforms):[],y=i?i.getBinderUniforms():[],v=p.concat(m).concat(g).concat(y),x=[];for(let e of v)x.includes(e)||x.push(e);let b=i?i.defines():[];tS(u)&&b.unshift("#version 300 es"),a&&b.push("#define OVERDRAW_INSPECTOR;"),o&&b.push("#define TERRAIN3D;"),l&&b.push(l),c&&b.push(...c);let _=b.concat(tn.prelude.fragmentSource,s.fragmentSource,r.fragmentSource).join(` +`}),staticAttributes:i,staticUniforms:o}}class to{constructor(e,t,r){this.vertexBuffer=e,this.indexBuffer=t,this.segments=r}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var ts=t.aS([{name:"a_pos",type:"Int16",components:2}]);let tl="#define PROJECTION_MERCATOR",tc="mercator";class tu{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return tc}get shaderDefine(){return tl}get shaderPreludeCode(){return tn.projectionMercator}get vertexShaderPreludeCode(){return tn.projectionMercator.vertexSource}get subdivisionGranularity(){return t.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(e){}getMeshFromTileID(e,r,i,n,a){if(this._cachedMesh)return this._cachedMesh;let o=new t.aU;o.emplaceBack(0,0),o.emplaceBack(t.a6,0),o.emplaceBack(0,t.a6),o.emplaceBack(t.a6,t.a6);let s=e.createVertexBuffer(o,ts.members),l=t.aV.simpleSegment(0,0,4,2),c=new t.aW;c.emplaceBack(1,0,2),c.emplaceBack(1,2,3);let u=e.createIndexBuffer(c);return this._cachedMesh=new to(s,u,l),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(e){}}class th{constructor(e=0,t=0,r=0,i=0){if(isNaN(e)||e<0||isNaN(t)||t<0||isNaN(r)||r<0||isNaN(i)||i<0)throw Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=r,this.right=i}interpolate(e,r,i){return null!=r.top&&null!=e.top&&(this.top=t.H.number(e.top,r.top,i)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.H.number(e.bottom,r.bottom,i)),null!=r.left&&null!=e.left&&(this.left=t.H.number(e.left,r.left,i)),null!=r.right&&null!=e.right&&(this.right=t.H.number(e.right,r.right,i)),this}getCenter(e,r){let i=t.al((this.left+e-this.right)/2,0,e),n=t.al((this.top+r-this.bottom)/2,0,r);return new t.P(i,n)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new th(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function td(e,t){if(!e.renderWorldCopies||e.lngRange)return;let r=t.lng-e.center.lng;t.lng+=r>180?-360:360*(r<-180)}function tf(e){return Math.max(0,Math.floor(e))}class tp{constructor(e,r){var i;this.applyConstrain=(e,t)=>null!==this._constrainOverride?this._constrainOverride(e,t):this._callbacks.defaultConstrain(e,t),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==null?0:r?.minPitch,this._maxPitch=r?.maxPitch==null?60:r?.maxPitch,this._constrainOverride=null!=(i=r?.constrainOverride)?i:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new t.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=tf(this._zoom),this._scale=t.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new th,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,r,i){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=tf(this._zoom),this._scale=t.ao(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 th(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=!i&&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){this._minZoom!==e&&(this._minZoom=e,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(e){this._minPitch!==e&&(this._minPitch=e,this.setPitch(Math.max(this.pitch,e)))}get maxPitch(){return this._maxPitch}setMaxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.setPitch(Math.min(this.pitch,e)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get constrainOverride(){return this._constrainOverride}setConstrainOverride(e){void 0===e&&(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 t.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){var r,i,n,a,o,s,l,c,u;let h=t.X(e,-180,180)*Math.PI/180;this._bearingInRadians!==h&&(this._unmodified=!1,this._bearingInRadians=h,this._calcMatrices(),this._rotationMatrix=d(),r=this._rotationMatrix,n=-this._bearingInRadians,a=(i=this._rotationMatrix)[0],o=i[1],s=i[2],l=i[3],c=Math.sin(n),u=Math.cos(n),r[0]=a*u+s*c,r[1]=o*u+l*c,r[2]=-(a*c)+s*u,r[3]=-(o*c)+l*u)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){let r=t.al(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 t=e/180*Math.PI;this._rollInRadians!==t&&(this._unmodified=!1,this._rollInRadians=t,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return t.aX(this._fovInRadians)}setFov(e){e=t.al(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=t.an(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=t.ao(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,t){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=t,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,t,r){this._unmodified=!1,this._edgeInsets.interpolate(e,t,r),this.constrainInternal(),this._calcMatrices()}resize(e,t,r=!0){this._width=e,this._height=t,r&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var e,t;return(null==(e=this._latRange)?void 0:e.length)!==2||(null==(t=this._lngRange)?void 0:t.length)!==2?null:new G([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=[-t.am,t.am])}getCameraQueryGeometry(e,r){if(1===r.length)return[r[0],e];{let{minX:i,minY:n,maxX:a,maxY:o}=t.a8.fromPoints(r).extend(e);return[new t.P(i,n),new t.P(a,n),new t.P(a,o),new t.P(i,o),new t.P(i,n)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let e=this._unmodified,{center:t,zoom:r}=this.applyConstrain(this.center,this.zoom);this.setCenter(t),this.setZoom(r),this._unmodified=e,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=t.ap(new Float64Array(16));t.S(e,e,[this._width/2,-this._height/2,1]),t.Q(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=t.ap(new Float64Array(16)),t.S(e,e,[1,-1,1]),t.Q(e,e,[-1,-1,0]),t.S(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,r,i,n){let a=void 0!==i?i:this.bearing,o=n=void 0!==n?n:this.pitch,{distanceToCenter:s,clampedElevation:l}=this._distanceToCenterFromAltElevationPitch(r,this.elevation,o),{x:c,y:u}=ey(o,a),h=t.a7.fromLngLat(e,r),d,f,p=t.aY(1,h.y),m=0;do{if((m+=1)>10)break;f=s/p,p=1/(d=new t.a7(h.x+c*f,h.y+u*f)).meterInMercatorCoordinateUnits()}while(Math.abs(s-f*p)>1e-12);return{center:d.toLngLat(),elevation:l,zoom:t.ar(this.height/2/Math.tan(this.fovInRadians/2)/f/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e==0)return;let r=1/this.worldSize,i=t.aq(1,this.center.lat)*this.worldSize,n=t.a7.fromLngLat(this.center,this.elevation),a=n.x/r,o=n.y/r,s=n.z/r,l=this.pitch,{x:c,y:u,z:h}=ey(l,this.bearing),d=this.cameraToCenterDistance,{distanceToCenter:f,clampedElevation:p}=this._distanceToCenterFromAltElevationPitch((s+d*h)/i,e,l),m=f*i,g=new t.a7((a+-(d*c)+c*m)*r,(o+-(d*u)+u*m)*r,0).toLngLat(),y=t.aq(1,g.lat),v=t.ar(this.height/2/Math.tan(this.fovInRadians/2)/f/y/this.tileSize);this._elevation=p,this._center=g,this.setZoom(v)}_distanceToCenterFromAltElevationPitch(e,r,i){let n=-Math.cos(t.an(i)),a=e-r,o,s=r;return n*a>=0||.1>Math.abs(n)?s=e+(o=1e4)*n:o=-a/n,{distanceToCenter:o,clampedElevation:s}}getCameraPoint(){let e=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(e*Math.sin(this.rollInRadians),e*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let e=t.aq(1,this.center.lat)*this.worldSize;return eg(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/e).toLngLat()}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];let r=e.canonical.z>=0?1<this.max[0]||e.aabb.min[1]>this.max[1]||e.aabb.min[2]>this.max[2]||e.aabb.max[0]0?(t+=e[i]*this.min[i],r+=e[i]*this.max[i]):(r+=e[i]*this.min[i],t+=e[i]*this.max[i]);return t>=0?2:r<0?0:1}}class tg{distanceToTile2d(e,t,r,i){return Math.hypot(i.distanceX([e,t]),i.distanceY([e,t]))}getWrap(e,t,r){return r}getTileBoundingVolume(e,r,i,n){var a,o;let s=0,l=0;if(n?.terrain){let c=new t.a3(e.z,r,e.z,e.x,e.y),u=n.terrain.getMinMaxElevation(c);s=null!=(a=u.minElevation)?a:Math.min(0,i),l=null!=(o=u.maxElevation)?o:Math.max(0,i)}let c=1<n}allowWorldCopies(){return!0}prepareNextFrame(){}}class ty{constructor(e,t,r){this.points=e,this.planes=t,this.aabb=r}static fromInvProjectionMatrix(e,r=1,i=0,n,a){let o=a?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],s=Math.pow(2,i),l=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(i=>{let n,a;return a=1/(n=t.aE([],i,e))[3]/r*s,t.b4(n,n,[a,a,1/n[3],a])});n&&function(e,r,i,n){let a,o,s,l=4*!!n,c=4*!n,u=0,h=[],d=[];for(let r=0;r<4;r++){let i=t.b0([],e[r+c],e[r+l]),n=t.b5(i);t.aZ(i,i,1/n),h.push(n),d.push(i)}for(let r=0;r<4;r++){let n=t.b6(e[r+l],d[r],i);u=null!==n&&n>=0?Math.max(u,n):Math.max(u,h[r])}let f=(a=t.b0([],e[r[0]],e[r[1]]),o=t.b0([],e[r[2]],e[r[1]]),s=[0,0,0,0],t.b1(s,t.b2([],a,o)),s[3]=-t.b3(s,e[r[0]]),s),p=function(e,r){let i=t.b7(e),n=t.b8([],e,1/i),a=t.b0([],r,t.aZ([],n,t.b3(r,n))),o=t.b7(a);if(o>0){let e=Math.sqrt(1-n[3]*n[3]),i=t.aZ([],n,-n[3]),s=t.a_([],i,t.aZ([],a,e/o));return t.b9(r,s)}return null}(i,f);null!==p&&(u=Math.min(u,p/t.b3(d[0],f)));for(let t=0;t<4;t++){let r=Math.min(u,h[t]);e[t+c]=[e[t+l][0]+d[t][0]*r,e[t+l][1]+d[t][1]*r,e[t+l][2]+d[t][2]*r,1]}}(l,o[0],n,a);let c=o.map(e=>{let r=t.b0([],l[e[0]],l[e[1]]),i=t.b0([],l[e[2]],l[e[1]]),n=t.b1([],t.b2([],r,i)),a=-t.b3(n,l[e[1]]);return n.concat(a)}),u=[1/0,1/0,1/0],h=[-1/0,-1/0,-1/0];for(let e of l)for(let t=0;t<3;t++)u[t]=Math.min(u[t],e[t]),h[t]=Math.max(h[t],e[t]);return new ty(l,c,new tm(u,h))}}class tv{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(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,t,r){this._helper.interpolatePadding(e,t,r)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t,r=!0){this._helper.resize(e,t,r)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}setConstrainOverride(e){this._helper.setConstrainOverride(e)}overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e,t){}constructor(e){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(e,r)=>{r=t.al(+r,this.minZoom,this.maxZoom);let i={center:new t.W(e.lng,e.lat),zoom:r},n=this._helper._lngRange;this._helper._renderWorldCopies||null!==n||(n=[-179.9999999999,179.9999999999]);let a=this.tileSize*t.ao(i.zoom),o=0,s=a,l=0,c=a,u=0,h=0,{x:d,y:f}=this.size;if(this._helper._latRange){let e=this._helper._latRange;o=t.Y(e[1])*a,(s=t.Y(e[0])*a)-os&&(y=s-e)}if(n){let e=(l+c)/2,r=p;this._helper._renderWorldCopies&&(r=t.X(p,e-a/2,e+a/2));let i=d/2;r-ic&&(g=c-i)}return(void 0!==g||void 0!==y)&&(i.center=ef(a,new t.P(g??p,y??m)).wrap()),i},this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new tp({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._coveringTilesDetailsProvider=new tg}clone(){let e=new tv;return e.apply(this,!1),e}apply(e,t,r){this._helper.apply(e,t,r)}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(e){let r=[new t.ba(0,e)];if(this._helper._renderWorldCopies){let i=this.screenPointToMercatorCoordinate(new t.P(0,0)),n=this.screenPointToMercatorCoordinate(new t.P(this._helper._width,0)),a=this.screenPointToMercatorCoordinate(new t.P(this._helper._width,this._helper._height)),o=this.screenPointToMercatorCoordinate(new t.P(0,this._helper._height)),s=Math.floor(Math.min(i.x,n.x,a.x,o.x)),l=Math.floor(Math.max(i.x,n.x,a.x,o.x));for(let i=s-1;i<=l+1;i++)0!==i&&r.push(new t.ba(i,e))}return r}getCameraFrustum(){return ty.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){let t=this.screenPointToLocation(this.centerPoint,e),r=e?e.getElevationForLngLatZoom(t,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(r)}setLocationAtPoint(e,r){let i=t.aq(this.elevation,this.center.lat),n=this.screenPointToMercatorCoordinateAtZ(r,i),a=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,i),o=t.a7.fromLngLat(e),s=new t.a7(o.x-(n.x-a.x),o.y-(n.y-a.y));this.setCenter(s?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(e,r){return r?this.coordinatePoint(t.a7.fromLngLat(e),r.getElevationForLngLat(e,this),this._pixelMatrix3D):this.coordinatePoint(t.a7.fromLngLat(e))}screenPointToLocation(e,t){var r;return null==(r=this.screenPointToMercatorCoordinate(e,t))?void 0:r.toLngLat()}screenPointToMercatorCoordinate(e,t){if(t){let r=t.pointCoordinate(e);if(null!=r)return r}return this.screenPointToMercatorCoordinateAtZ(e)}screenPointToMercatorCoordinateAtZ(e,r){let i=r||0,n=[e.x,e.y,0,1],a=[e.x,e.y,1,1];t.aE(n,n,this._pixelMatrixInverse),t.aE(a,a,this._pixelMatrixInverse);let o=n[3],s=a[3],l=n[1]/o,c=a[1]/s,u=n[2]/o,h=a[2]/s,d=u===h?0:(i-u)/(h-u);return new t.a7(t.H.number(n[0]/o,a[0]/s,d)/this.worldSize,t.H.number(l,c,d)/this.worldSize,i)}coordinatePoint(e,r=0,i=this._pixelMatrix){let n=[e.x*this.worldSize,e.y*this.worldSize,r,1];return t.aE(n,n,i),new t.P(n[0]/n[3],n[1]/n[3])}getBounds(){let e=Math.max(0,this._helper._height/2-ep(this));return new G().extend(this.screenPointToLocation(new t.P(0,e))).extend(this.screenPointToLocation(new t.P(this._helper._width,e))).extend(this.screenPointToLocation(new t.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new t.P(0,this._helper._height)))}isPointOnMapSurface(e,t){return t?null!=t.pointCoordinate(e):e.y>this.height/2-ep(this)}calculatePosMatrix(e,r=!1,i){var n;let a=null!=(n=e.key)?n:t.bb(e.wrap,e.canonical.z,e.canonical.z,e.canonical.x,e.canonical.y),o=r?this._alignedPosMatrixCache:this._posMatrixCache;if(o.has(a)){let e=o.get(a);return i?e.f32:e.f64}let s=em(e,this.worldSize);t.U(s,r?this._alignedProjMatrix:this._viewProjMatrix,s);let l={f64:s,f32:new Float32Array(s)};return o.set(a,l),i?l.f32:l.f64}calculateFogMatrix(e){let r=e.key,i=this._fogMatrixCacheF32;if(i.has(r))return i.get(r);let n=em(e,this.worldSize);return t.U(n,this._fogMatrix,n),i.set(r,new Float32Array(n)),i.get(r)}calculateCenterFromCameraLngLatAlt(e,t,r,i){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,r,i)}_calculateNearFarZIfNeeded(e,r,i){if(!this._helper.autoCalculateNearFarZ)return;let n=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),a=e-n*this._helper._pixelPerMeter/Math.cos(r),o=n<0?a:e,s=Math.PI/2+this.pitchInRadians,l=t.an(this.fov)*(Math.abs(Math.cos(t.an(this.roll)))*this.height+Math.abs(Math.sin(t.an(this.roll)))*this.width)/this.height*(.5+i.y/this.height),c=Math.sin(l)*o/Math.sin(t.al(Math.PI-s-l,.01,Math.PI-.01)),u=ep(this),h=Math.atan(u/this._helper.cameraToCenterDistance),d=t.an(.75),f=h>d?2*h*(.5+i.y/(2*u)):d,p=Math.min(c,Math.sin(f)*o/Math.sin(t.al(Math.PI-s-f,.01,Math.PI-.01)));this._helper._farZ=1.01*(Math.cos(Math.PI/2-r)*p+o),this._helper._nearZ=this._helper._height/50}_calcMatrices(){var e,r;if(!this._helper._height)return;let i=this.centerOffset,n=ed(this.worldSize,this.center),a=n.x,o=n.y;this._helper._pixelPerMeter=t.aq(1,this.center.lat)*this.worldSize;let s=t.an(Math.min(this.pitch,89.25)),l=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(s)),c;this._calculateNearFarZIfNeeded(l,s,i),c=new Float64Array(16),t.bc(c,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(e=this._invProjMatrix)[0]=1/(r=c)[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],c[8]=-(2*i.x)/this._helper._width,c[9]=2*i.y/this._helper._height,this._projectionMatrix=t.bd(c),t.S(c,c,[1,-1,1]),t.Q(c,c,[0,0,-this._helper.cameraToCenterDistance]),t.be(c,c,-this.rollInRadians),t.bf(c,c,this.pitchInRadians),t.be(c,c,-this.bearingInRadians),t.Q(c,c,[-a,-o,0]),this._mercatorMatrix=t.S([],c,[this.worldSize,this.worldSize,this.worldSize]),t.S(c,c,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=t.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,c),t.Q(c,c,[0,0,-this.elevation]),this._viewProjMatrix=c,this._invViewProjMatrix=t.bg([],c);let u=[0,0,-1,1];t.aE(u,u,this._invViewProjMatrix),this._cameraPosition=[u[0]/u[3],u[1]/u[3],u[2]/u[3]],this._fogMatrix=new Float64Array(16),t.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,l,this._helper._farZ),this._fogMatrix[8]=-(2*i.x)/this.width,this._fogMatrix[9]=2*i.y/this.height,t.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),t.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),t.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),t.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),t.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),t.Q(this._fogMatrix,this._fogMatrix,[-a,-o,0]),t.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),t.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=t.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,c);let h=this._helper._width%2/2,d=this._helper._height%2/2,f=Math.cos(this.bearingInRadians),p=Math.sin(-this.bearingInRadians),m=a-Math.round(a)+f*h+p*d,g=o-Math.round(o)+f*d+p*h,y=new Float64Array(c);if(t.Q(y,y,[m>.5?m-1:m,g>.5?g-1:g,0]),this._alignedProjMatrix=y,!(c=t.bg(new Float64Array(16),this._pixelMatrix)))throw Error("failed to invert matrix");this._pixelMatrixInverse=c,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let e=this.screenPointToMercatorCoordinate(new t.P(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.aE(r,r,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let e=t.aq(1,this.center.lat)*this.worldSize;return eg(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/e).toLngLat()}lngLatToCameraDepth(e,r){let i=t.a7.fromLngLat(e),n=[i.x*this.worldSize,i.y*this.worldSize,r,1];return t.aE(n,n,this._viewProjMatrix),n[2]/n[3]}getProjectionData(e){let{overscaledTileID:r,aligned:i,applyTerrainMatrix:n}=e,a=this._helper.getMercatorTileCoordinates(r),o=r?this.calculatePosMatrix(r,i,!0):null,s;return{mainMatrix:s=r?.terrainRttPosMatrix32f&&n?r.terrainRttPosMatrix32f:o||t.bh(),tileMercatorCoords:a,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:s}}isLocationOccluded(e){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(e,t,r){return 1}transformLightDirection(e){return t.a$(e)}getRayDirectionFromPixel(e){throw Error("Not implemented.")}projectTileCoordinates(e,r,i,n){let a=this.calculatePosMatrix(i),o;n?(o=[e,r,n(e,r),1],t.aE(o,o,a)):eZ(o=[e,r,0,1],o,a);let s=o[3];return{point:new t.P(o[0]/s,o[1]/s),signedDistanceFromCamera:s,isOccluded:!1}}populateCache(e){for(let t of e)this.calculatePosMatrix(t)}getMatrixForModel(e,r){let i=t.a7.fromLngLat(e,r),n=i.meterInMercatorCoordinateUnits(),a=t.bi();return t.Q(a,a,[i.x,i.y,i.z]),t.be(a,a,Math.PI),t.bf(a,a,Math.PI/2),t.S(a,a,[-n,n,n]),a}getProjectionDataForCustomLayer(e=!0){let r=new t.a3(0,0,0,0,0),i=this.getProjectionData({overscaledTileID:r,applyGlobeMatrix:e}),n=em(r,this.worldSize);t.U(n,this._viewProjMatrix,n),i.tileMercatorCoords=[0,0,1,1];let a=[t.a6,t.a6,this.worldSize/this._helper.pixelsPerMeter],o=t.bj();return t.S(o,n,a),i.fallbackMatrix=o,i.mainMatrix=o,i}getFastPathSimpleProjectionMatrix(e){return this.calculatePosMatrix(e)}}function tx(){t.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function tb(e){if(e.useSlerp)if(e.k<1){let r=t.bk(e.startEulerAngles.roll,e.startEulerAngles.pitch,e.startEulerAngles.bearing),i=t.bk(e.endEulerAngles.roll,e.endEulerAngles.pitch,e.endEulerAngles.bearing),n=new Float64Array(4);t.bl(n,r,i,e.k);let a=t.bm(n);e.tr.setRoll(a.roll),e.tr.setPitch(a.pitch),e.tr.setBearing(a.bearing)}else e.tr.setRoll(e.endEulerAngles.roll),e.tr.setPitch(e.endEulerAngles.pitch),e.tr.setBearing(e.endEulerAngles.bearing);else e.tr.setRoll(t.H.number(e.startEulerAngles.roll,e.endEulerAngles.roll,e.k)),e.tr.setPitch(t.H.number(e.startEulerAngles.pitch,e.endEulerAngles.pitch,e.k)),e.tr.setBearing(t.H.number(e.startEulerAngles.bearing,e.endEulerAngles.bearing,e.k))}function t_(e,r,i,n,a){let o=a.padding,s=ed(a.worldSize,i.getNorthWest()),l=ed(a.worldSize,i.getNorthEast()),c=ed(a.worldSize,i.getSouthEast()),u=ed(a.worldSize,i.getSouthWest()),h=t.an(-n),d=s.rotate(h),f=l.rotate(h),p=c.rotate(h),m=u.rotate(h),g=new t.P(Math.max(d.x,f.x,m.x,p.x),Math.max(d.y,f.y,m.y,p.y)),y=new t.P(Math.min(d.x,f.x,m.x,p.x),Math.min(d.y,f.y,m.y,p.y)),v=g.sub(y),x=(a.width-(o.left+o.right+r.left+r.right))/v.x,b=(a.height-(o.top+o.bottom+r.top+r.bottom))/v.y;if(b<0||x<0)return void tx();let _=Math.min(t.ar(a.scale*Math.min(x,b)),e.maxZoom),w=t.P.convert(e.offset),T=new t.P((r.left-r.right)/2,(r.top-r.bottom)/2).rotate(t.an(n)),M=w.add(T).mult(a.scale/t.ao(_));return{center:ef(a.worldSize,s.add(c).div(2).sub(M)),zoom:_,bearing:n}}class tw{get useGlobeControls(){return!1}handlePanInertia(e,t){let r=e.mag(),i=Math.abs(ep(t));return{easingOffset:e.mult(Math.min(.75*i/r,1)),easingCenter:t.center}}handleMapControlsRollPitchBearingZoom(e,t){e.bearingDelta&&t.setBearing(t.bearing+e.bearingDelta),e.pitchDelta&&t.setPitch(t.pitch+e.pitchDelta),e.rollDelta&&t.setRoll(t.roll+e.rollDelta),e.zoomDelta&&t.setZoom(t.zoom+e.zoomDelta)}handleMapControlsPan(e,t,r){.01>e.around.distSqr(t.centerPoint)||t.setLocationAtPoint(r,e.around)}cameraForBoxAndBearing(e,t,r,i,n){return t_(e,t,r,i,n)}handleJumpToCenterZoom(e,r){e.zoom!==(void 0!==r.zoom?+r.zoom:e.zoom)&&e.setZoom(+r.zoom),void 0!==r.center&&e.setCenter(t.W.convert(r.center))}handleEaseTo(e,r){let i=e.zoom,n=e.padding,a={roll:e.roll,pitch:e.pitch,bearing:e.bearing},o={roll:void 0===r.roll?e.roll:r.roll,pitch:void 0===r.pitch?e.pitch:r.pitch,bearing:void 0===r.bearing?e.bearing:r.bearing},s=void 0!==r.zoom,l=!e.isPaddingEqual(r.padding),c=!1,u=s?+r.zoom:e.zoom,h=e.centerPoint.add(r.offsetAsPoint),d=e.screenPointToLocation(h),{center:f,zoom:p}=e.applyConstrain(t.W.convert(r.center||d),u??i);td(e,f);let m=ed(e.worldSize,d),g=ed(e.worldSize,f).sub(m),y=t.ao(p-i);return{easeFunc:s=>{if(c&&e.setZoom(t.H.number(i,p,s)),t.bn(a,o)||tb({startEulerAngles:a,endEulerAngles:o,tr:e,k:s,useSlerp:a.roll!=o.roll}),l&&(e.interpolatePadding(n,r.padding,s),h=e.centerPoint.add(r.offsetAsPoint)),r.around)e.setLocationAtPoint(r.around,r.aroundPoint);else{let r=t.ao(e.zoom-i),n=Math.pow(p>i?Math.min(2,y):Math.max(.5,y),1-s),a=ef(e.worldSize,m.add(g.mult(s*n)).mult(r));e.setLocationAtPoint(e.renderWorldCopies?a.wrap():a,h)}},isZooming:c=p!==i,elevationCenter:f}}handleFlyTo(e,r){let i=void 0!==r.zoom,n=e.zoom,a=e.applyConstrain(t.W.convert(r.center||r.locationAtOffset),i?+r.zoom:n),o=a.center,s=a.zoom;td(e,o);let l=ed(e.worldSize,r.locationAtOffset),c=ed(e.worldSize,o).sub(l),u=c.mag(),h=t.ao(s-n),d;if(void 0!==r.minZoom){let i=Math.min(+r.minZoom,n,s),a=e.applyConstrain(o,i).zoom;d=t.ao(a-n)}return{easeFunc:(r,i,a,u)=>{e.setZoom(1===r?s:n+t.ar(i));let h=1===r?o:ef(e.worldSize,l.add(c.mult(a)).mult(i));e.setLocationAtPoint(e.renderWorldCopies?h.wrap():h,u)},scaleOfZoom:h,targetCenter:o,scaleOfMinZoom:d,pixelPathLength:u}}}class tT{constructor(e,t,r){this.blendFunction=e,this.blendColor=t,this.mask=r}}tT.Replace=[1,0],tT.disabled=new tT(tT.Replace,t.bo.transparent,[!1,!1,!1,!1]),tT.unblended=new tT(tT.Replace,t.bo.transparent,[!0,!0,!0,!0]),tT.alphaBlended=new tT([1,771],t.bo.transparent,[!0,!0,!0,!0]);class tM{constructor(e,t,r){this.enable=e,this.mode=t,this.frontFace=r}}tM.disabled=new tM(!1,1029,2305),tM.backCCW=new tM(!0,1029,2305),tM.frontCCW=new tM(!0,1028,2305);class tk{constructor(e,t,r){this.func=e,this.mask=t,this.range=r}}tk.ReadOnly=!1,tk.ReadWrite=!0,tk.disabled=new tk(519,tk.ReadOnly,[0,1]);class tA{constructor(e,t,r,i,n,a){this.test=e,this.ref=t,this.mask=r,this.fail=i,this.depthFail=n,this.pass=a}}function tS(e){return"u">typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext}tA.disabled=new tA({func:519,mask:0},0,0,7680,7680,7680);class tE{get awaitingQuery(){return!!this._readbackQueue}constructor(e){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=e;let r=e.context,i=r.gl;this._texFormat=i.RGBA,this._texType=i.UNSIGNED_BYTE;let n=new t.aU;n.emplaceBack(-1,-1),n.emplaceBack(2,-1),n.emplaceBack(-1,2);let a=new t.aW;a.emplaceBack(0,1,2),this._fullscreenTriangle=new to(r.createVertexBuffer(n,ts.members),r.createIndexBuffer(a),t.aV.simpleSegment(0,0,n.length,a.length)),this._resultBuffer=new Uint8Array(4),r.activeTexture.set(i.TEXTURE1);let o=i.createTexture();i.bindTexture(i.TEXTURE_2D,o),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.texImage2D(i.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=r.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(o),tS(i)&&(this._pbo=i.createBuffer(),i.bindBuffer(i.PIXEL_PACK_BUFFER,this._pbo),i.bufferData(i.PIXEL_PACK_BUFFER,4,i.STREAM_READ),i.bindBuffer(i.PIXEL_PACK_BUFFER,null))}destroy(){let e=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),e.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(e,t){let r=this._updateCount;return this._readbackQueue?r>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():r>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(e,t),this._updateCount++,this._measuredError}_bindFramebuffer(){let e=this._cachedRenderContext.context,t=e.gl;e.activeTexture.set(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,this._fbo.colorAttachment.get()),e.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(e,r){let i=this._cachedRenderContext.context,n=i.gl;if(this._bindFramebuffer(),i.viewport.set([0,0,this._texWidth,this._texHeight]),i.clear({color:t.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(i,n.TRIANGLES,tk.disabled,tA.disabled,tT.unblended,tM.disabled,{u_input:e,u_output_expected:r},null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&tS(n)){n.bindBuffer(n.PIXEL_PACK_BUFFER,this._pbo),n.readBuffer(n.COLOR_ATTACHMENT0),n.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),n.bindBuffer(n.PIXEL_PACK_BUFFER,null);let e=n.fenceSync(n.SYNC_GPU_COMMANDS_COMPLETE,0);n.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:e}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let e=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&tS(e)){let r=e.clientWaitSync(this._readbackQueue.sync,0,0);if(r===e.WAIT_FAILED)return t.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(r===e.TIMEOUT_EXPIRED)return;e.bindBuffer(e.PIXEL_PACK_BUFFER,this._pbo),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),e.bindBuffer(e.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),e.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=tE._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(e){let t;return t=0+(e[0]/256+e[1]/65536+e[2]/0x1000000),e[3]<127&&(t=-t),t/128}}let tC=t.a6/128;function tL(e,r){let i=void 0!==e.granularity?Math.max(e.granularity,1):1,n=i+2*!!e.generateBorders,a=i+(e.extendToNorthPole||e.generateBorders?1:0)+(e.extendToSouthPole||e.generateBorders?1:0),o=n+1,s=a+1,l=e.generateBorders?-1:0,c=e.generateBorders||e.extendToNorthPole?-1:0,u=i+ +!!e.generateBorders,h=i+(e.generateBorders||e.extendToSouthPole?1:0),d=n*a*6,f=o*s>65536;if(f&&"16bit"===r)throw Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let p=f||"32bit"===r,m=new Int16Array(o*s*2),g=0;for(let r=c;r<=h;r++)for(let n=l;n<=u;n++){let a=n/i*t.a6;-1===n&&(a=-tC),n===i+1&&(a=t.a6+tC);let o=r/i*t.a6;-1===r&&(o=e.extendToNorthPole?t.bq:-tC),r===i+1&&(o=e.extendToSouthPole?t.br:t.a6+tC),m[g++]=a,m[g++]=o}let y=p?new Uint32Array(d):new Uint16Array(d),v=0;for(let e=0;e0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(e){this._mercatorProjection.updateGPUdependent(e),this._verticalPerspectiveProjection.updateGPUdependent(e)}getMeshFromTileID(e,t,r,i,n){return this.currentProjection.getMeshFromTileID(e,t,r,i,n)}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)}setErrorQueryLatitudeDegrees(e){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e),this._mercatorProjection.setErrorQueryLatitudeDegrees(e)}}function tO(e){return 2*Math.PI*tj(e.worldSize,e.center.lat)}function tR(e,r,i,n,a){let o=1/(1<1e-6){let n=e[0]/i,a=Math.acos(e[2]/i),o=(n>0?a:-a)/Math.PI*180;return new t.W(t.X(o,-180,180),r)}return new t.W(0,r)}function tN(e){return Math.cos(e*Math.PI/180)}function tU(e,r){let i=tN(e),n=tN(r);return t.ar(n/i)}function tV(e,r){let i=e.rotate(r.bearingInRadians),n=r.zoom+tU(r.center.lat,0),a=t.bt(1/tN(r.center.lat),1/tN(Math.min(Math.abs(r.center.lat),60)),t.bw(n,7,3,0,1)),o=360/tO({worldSize:r.worldSize,center:{lat:r.center.lat}});return new t.W(r.center.lng-i.x*o*a,t.al(r.center.lat+i.y*o,-t.am,t.am))}function tq(e){let t=.5*e,r=Math.sin(t),i=Math.cos(t);return Math.log(r+i)-Math.log(i-r)}function tH(e,r,i,n){let a=e.lat+i*n;if(Math.abs(i)>1){let o=(Math.sign(e.lat+i)!==Math.sign(e.lat)?-Math.abs(e.lat):Math.abs(e.lat))*Math.PI/180,s=Math.abs(e.lat+i)*Math.PI/180,l=tq(o+n*(s-o)),c=tq(o),u=tq(s);return new t.W(e.lng+(l-c)/(u-c)*r,a)}return new t.W(e.lng+r*n,a)}class tG{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,t,r,i){let n=`${e.z}_${e.x}_${e.y}_${i?.terrain?"t":""}`,a=this._cache.get(n);if(a)return a;let o=this._cachePrevious.get(n);if(o)return this._cache.set(n,o),o;let s=this._boundingVolumeFactory(e,t,r,i);return this._cache.set(n,s),this._hadAnyChanges=!0,s}}class tW{constructor(e,t,r,i){this.min=r,this.max=i,this.points=e,this.planes=t}static fromAabb(e,t){let r=[];for(let i=0;i<8;i++)r.push([1&~i?e[0]:t[0],(i>>1&1)==1?t[1]:e[1],(i>>2&1)==1?t[2]:e[2]]);return new tW(r,[[-1,0,0,t[0]],[1,0,0,-e[0]],[0,-1,0,t[1]],[0,1,0,-e[1]],[0,0,-1,t[2]],[0,0,1,-e[2]]],e,t)}static fromCenterSizeAngles(e,r,i){let n=t.bA([],i[0],i[1],i[2]),a=t.bB([],[r[0],0,0],n),o=t.bB([],[0,r[1],0],n),s=t.bB([],[0,0,r[2]],n),l=[...e],c=[...e];for(let t=0;t<8;t++)for(let r=0;r<3;r++){let i=e[r]+a[r]*(1&~t?-1:1)+o[r]*((t>>1&1)==1?1:-1)+s[r]*((t>>2&1)==1?1:-1);l[r]=Math.min(l[r],i),c[r]=Math.max(c[r],i)}let u=[];for(let r=0;r<8;r++){let i=[...e];t.a_(i,i,t.aZ([],a,1&~r?-1:1)),t.a_(i,i,t.aZ([],o,(r>>1&1)==1?1:-1)),t.a_(i,i,t.aZ([],s,(r>>2&1)==1?1:-1)),u.push(i)}return new tW(u,[[...a,-t.b3(a,u[0])],[...o,-t.b3(o,u[0])],[...s,-t.b3(s,u[0])],[-a[0],-a[1],-a[2],-t.b3(a,u[7])],[-o[0],-o[1],-o[2],-t.b3(o,u[7])],[-s[0],-s[1],-s[2],-t.b3(s,u[7])]],l,c)}intersectsFrustum(e){let t=!0,r=this.points.length,i=this.planes.length,n=e.planes.length,a=e.points.length;for(let i=0;i=0&&a++}if(0===a)return 0;a=0&&i++}if(0===i)return 0}return 1}intersectsPlane(e){let t=this.points.length,r=0;for(let i=0;i=0&&r++}return r===t?2:+(0!==r)}}function tY(e,t,r){let i=e-t;return i<0?-i:Math.max(0,i-r)}function tZ(e,t,r,i,n){let a=e-r;return Math.max(a<0?Math.min(-a,1+a-n):a>n?Math.min(Math.max(a-n,0),1-a):0,tY(t,i,n))}class t${constructor(){this._boundingVolumeCache=new tG(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(e,t,r,i){let n=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(e,t,r,i){return this._boundingVolumeCache.getTileBoundingVolume(e,t,r,i)}_computeTileBoundingVolume(e,r,i,n){var a,o;let s=0,l=0;if(n?.terrain){let c=new t.a3(e.z,r,e.z,e.x,e.y),u=n.terrain.getMinMaxElevation(c);s=null!=(a=u.minElevation)?a:Math.min(0,i),l=null!=(o=u.maxElevation)?o:Math.max(0,i)}if(s/=t.bD,l/=t.bD,s+=1,l+=1,e.z<=0)return tW.fromAabb([-l,-l,-l],[l,l,l]);if(1===e.z)return tW.fromAabb([0===e.x?-l:0,0===e.y?0:-l,-l],[0===e.x?0:l,0===e.y?l:0,l]);{let r=[tR(0,0,e.x,e.y,e.z),tR(t.a6,0,e.x,e.y,e.z),tR(t.a6,t.a6,e.x,e.y,e.z),tR(0,t.a6,e.x,e.y,e.z)],i=[];for(let e of r)i.push(t.aZ([],e,l));if(l!==s)for(let e of r)i.push(t.aZ([],e,s));0===e.y&&i.push([0,1,0]),e.y===(1<=(1<{let i=t.al(e.lat,-t.am,t.am),n=t.al(+r,this.minZoom+tU(0,i),this.maxZoom);return{center:new t.W(e.lng,i),zoom:n}},this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new tp({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._coveringTilesDetailsProvider=new t$}clone(){let e=new tK;return e.apply(this,!1),e}apply(e,t,r){this._globeLatitudeErrorCorrectionRadians=r||0,this._helper.apply(e,t)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let e=t.bz();return e[0]=this._cameraPosition[0],e[1]=this._cameraPosition[1],e[2]=this._cameraPosition[2],e}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(e){let{overscaledTileID:t,applyGlobeMatrix:r}=e,i=this._helper.getMercatorTileCoordinates(t);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:i,clippingPlane:this._cachedClippingPlane,projectionTransition:+!!r,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(e){let r=this.pitchInRadians,i=this.cameraToCenterDistance/e,n=Math.sin(r)*i,a=Math.cos(r)*i+1,o=1/Math.sqrt(n*n+a*a)*1,s=-n,l=a,c=Math.sqrt(s*s+l*l),u=[0,s/=c,l/=c];t.bF(u,u,[0,0,0],-this.bearingInRadians),t.bG(u,u,[0,0,0],-1*this.center.lat*Math.PI/180),t.bH(u,u,[0,0,0],this.center.lng*Math.PI/180);let h=1/t.b5(u);return t.aZ(u,u,h),[...u,-o*h]}isLocationOccluded(e){return!this.isSurfacePointVisible(tF(e))}transformLightDirection(e){let r=this._helper._center.lng*Math.PI/180,i=this._helper._center.lat*Math.PI/180,n=Math.cos(i),a=[Math.sin(r)*n,Math.sin(i),Math.cos(r)*n],o=[a[2],0,-a[0]],s=[0,0,0];t.b2(s,o,a),t.b1(o,o),t.b1(s,s);let l=[0,0,0];return t.b1(l,[o[0]*e[0]+s[0]*e[1]+a[0]*e[2],o[1]*e[0]+s[1]*e[1]+a[1]*e[2],o[2]*e[0]+s[2]*e[1]+a[2]*e[2]]),l}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(e,r,i){var n,a;let o,s=(o=1/(1<<(a=i.canonical).z),new t.a7(e/t.a6*o+a.x*o,r/t.a6*o+a.y*o)),l=(n=s.y,[t.by(s.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-n*Math.PI*2))-.5*Math.PI]);return this.getCircleRadiusCorrection()/Math.cos(l[1])}projectTileCoordinates(e,r,i,n){let a=i.canonical,o=tR(e,r,a.x,a.y,a.z),s=1+(n?n(e,r):0)/t.bD,l=[o[0]*s,o[1]*s,o[2]*s,1];t.aE(l,l,this._globeViewProjMatrixNoCorrection);let c=this._cachedClippingPlane,u=c[0]*o[0]+c[1]*o[1]+c[2]*o[2]+c[3]<0;return{point:new t.P(l[0]/l[3],l[1]/l[3]),signedDistanceFromCamera:l[3],isOccluded:u}}_calcMatrices(){if(!this._helper._width||!this._helper._height)return;let e=tj(this.worldSize,this.center.lat),r=t.bj(),i=t.bj();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*e),t.bc(r,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);let n=this.centerOffset;r[8]=-(2*n.x)/this._helper._width,r[9]=2*n.y/this._helper._height,this._projectionMatrix=t.bd(r),this._globeProjMatrixInverted=t.bj(),t.bg(this._globeProjMatrixInverted,r),t.Q(r,r,[0,0,-this.cameraToCenterDistance]),t.be(r,r,this.rollInRadians),t.bf(r,r,-this.pitchInRadians),t.be(r,r,this.bearingInRadians),t.Q(r,r,[0,0,-e]);let a=t.bz();a[0]=e,a[1]=e,a[2]=e,t.bf(i,r,this.center.lat*Math.PI/180),t.bI(i,i,-this.center.lng*Math.PI/180),t.S(i,i,a),this._globeViewProjMatrixNoCorrection=i,t.bf(r,r,this.center.lat*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),t.bI(r,r,-this.center.lng*Math.PI/180),t.S(r,r,a),this._globeViewProjMatrix32f=new Float32Array(r),this._globeViewProjMatrixNoCorrectionInverted=t.bj(),t.bg(this._globeViewProjMatrixNoCorrectionInverted,i);let o=t.bz();this._cameraPosition=t.bz(),this._cameraPosition[2]=this.cameraToCenterDistance/e,t.bF(this._cameraPosition,this._cameraPosition,o,-this.rollInRadians),t.bG(this._cameraPosition,this._cameraPosition,o,this.pitchInRadians),t.bF(this._cameraPosition,this._cameraPosition,o,-this.bearingInRadians),t.a_(this._cameraPosition,this._cameraPosition,[0,0,1]),t.bG(this._cameraPosition,this._cameraPosition,o,-this.center.lat*Math.PI/180),t.bH(this._cameraPosition,this._cameraPosition,o,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(e);let s=t.bd(this._globeViewProjMatrixNoCorrectionInverted);t.S(s,s,[1,1,-1]),this._cachedFrustum=ty.fromInvProjectionMatrix(s,1,0,this._cachedClippingPlane,!0)}calculateFogMatrix(e){t.w("calculateFogMatrix is not supported on globe projection.");let r=t.bj();return t.ap(r),r}getVisibleUnwrappedCoordinates(e){return[new t.ba(0,e)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){e&&t.w("terrain is not fully supported on vertical perspective projection."),this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,r){if(!this._globeViewProjMatrixNoCorrection)return 1;let i=tF(e);t.aZ(i,i,1+r/t.bD);let n=t.bE();return t.aE(n,[i[0],i[1],i[2],1],this._globeViewProjMatrixNoCorrection),n[2]/n[3]}populateCache(e){}getBounds(){let e=.5*this.width,r=.5*this.height,i=[new t.P(0,0),new t.P(e,0),new t.P(this.width,0),new t.P(this.width,r),new t.P(this.width,this.height),new t.P(e,this.height),new t.P(0,this.height),new t.P(0,r)],n=[];for(let e of i)n.push(this.unprojectScreenPoint(e));let a=0,o=0,s=0,l=0,c=this.center;for(let e of n){let r=t.bJ(c.lng,e.lng),i=t.bJ(c.lat,e.lat);ra&&(a=r),is&&(s=i)}let u=[c.lng+o,c.lat+l,c.lng+a,c.lat+s];return this.isSurfacePointOnScreen([0,1,0])&&(u[3]=90,u[0]=-180,u[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(u[1]=-90,u[0]=-180,u[2]=180),new G(u)}calculateCenterFromCameraLngLatAlt(e,t,r,i){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,r,i)}setLocationAtPoint(e,r){let i=tF(this.unprojectScreenPoint(r)),n=tF(e),a=t.bz();t.bK(a);let o=t.bz();t.bH(o,i,a,-this.center.lng*Math.PI/180),t.bG(o,o,a,this.center.lat*Math.PI/180);let s=n[0]*n[0]+n[2]*n[2],l=o[0]*o[0];if(s=-g&&f<=g,v=m>=-g&&m<=g,x,b;if(y&&v){let e=this.center.lng*Math.PI/180,r=this.center.lat*Math.PI/180;t.bM(u,e)+t.bM(f,r)=0}isSurfacePointOnScreen(e){if(!this.isSurfacePointVisible(e))return!1;let r=t.bE();return t.aE(r,[...e,1],this._globeViewProjMatrixNoCorrection),r[0]/=r[3],r[1]/=r[3],r[2]/=r[3],r[0]>-1&&r[0]<1&&r[1]>-1&&r[1]<1&&r[2]>-1&&r[2]<1}rayPlanetIntersection(e,r){let i=t.b3(e,r),n=t.bz(),a=t.bz();t.aZ(a,r,i),t.b0(n,e,a);let o=1-t.b3(n,n);if(o<0)return null;let s=t.b3(e,e)-1,l=-i+(i<0?1:-1)*Math.sqrt(o),c=s/l;return{tMin:Math.min(c,l),tMax:Math.max(c,l)}}unprojectScreenPoint(e){var r,i;let n,a,o,s=this._cameraPosition,l=this.getRayDirectionFromPixel(e),c=this.rayPlanetIntersection(s,l);if(c){let e=t.bz();t.a_(e,s,[l[0]*c.tMin,l[1]*c.tMin,l[2]*c.tMin]);let r=t.bz();return t.b1(r,e),tB(r)}let u=this._cachedClippingPlane,h=u[0]*l[0]+u[1]*l[1]+u[2]*l[2],d=-t.b9(u,s)/h,f=t.bz();if(d>0)t.a_(f,s,[l[0]*d,l[1]*d,l[2]*d]);else{let e=t.bz();t.a_(e,s,[2*l[0],2*l[1],2*l[2]]);let r=t.b9(this._cachedClippingPlane,e);t.b0(f,e,[this._cachedClippingPlane[0]*r,this._cachedClippingPlane[1]*r,this._cachedClippingPlane[2]*r])}let p=((n=t.bz())[0]=-(u[0]*u[3]),n[1]=-(u[1]*u[3]),n[2]=-(u[2]*u[3]),{center:n,radius:Math.sqrt(1-u[3]*u[3])});return tB((r=p.center,i=p.radius,a=t.bz(),t.b0(a,f,r),o=t.bz(),t.bx(o,r,a,i/t.b7(a)),o))}getMatrixForModel(e,r){let i=t.W.convert(e),n=1/t.bD,a=t.bi();return t.bI(a,a,i.lng/180*Math.PI),t.bf(a,a,-i.lat/180*Math.PI),t.Q(a,a,[0,0,1+r/t.bD]),t.bf(a,a,.5*Math.PI),t.S(a,a,[n,n,n]),a}getProjectionDataForCustomLayer(e=!0){let r=this.getProjectionData({overscaledTileID:new t.a3(0,0,0,0,0),applyGlobeMatrix:e});return r.tileMercatorCoords=[0,0,1,1],r}getFastPathSimpleProjectionMatrix(e){}}class tJ{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(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,t,r){this._helper.interpolatePadding(e,t,r)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t,r=!0){this._helper.resize(e,t,r)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}setConstrainOverride(e){this._helper.setConstrainOverride(e)}overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}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(e,t){this._globeness=e,this._globeLatitudeErrorCorrectionRadians=t,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(e){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(e,t)=>this.currentTransform.defaultConstrain(e,t),this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new tp({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._globeness=1,this._mercatorTransform=new tv,this._verticalPerspectiveTransform=new tK}clone(){let e=new tJ;return e._globeness=this._globeness,e._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,e.apply(this,!1),e}apply(e,t){this._helper.apply(e,t),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(e){let t=this._mercatorTransform.getProjectionData(e),r=this._verticalPerspectiveTransform.getProjectionData(e);return{mainMatrix:this.isGlobeRendering?r.mainMatrix:t.mainMatrix,clippingPlane:r.clippingPlane,tileMercatorCoords:r.tileMercatorCoords,projectionTransition:e.applyGlobeMatrix?this._globeness:0,fallbackMatrix:t.fallbackMatrix}}isLocationOccluded(e){return this.currentTransform.isLocationOccluded(e)}transformLightDirection(e){return this.currentTransform.transformLightDirection(e)}getPixelScale(){return t.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return t.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(e,r,i){let n=this._mercatorTransform.getPitchedTextCorrection(e,r,i),a=this._verticalPerspectiveTransform.getPitchedTextCorrection(e,r,i);return t.bt(n,a,this._globeness)}projectTileCoordinates(e,t,r,i){return this.currentTransform.projectTileCoordinates(e,t,r,i)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(e){return this.currentTransform.calculateFogMatrix(e)}getVisibleUnwrappedCoordinates(e){return this.currentTransform.getVisibleUnwrappedCoordinates(e)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(e){this._mercatorTransform.recalculateZoomAndCenter(e),this._verticalPerspectiveTransform.recalculateZoomAndCenter(e)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,t){return this.currentTransform.lngLatToCameraDepth(e,t)}populateCache(e){this._mercatorTransform.populateCache(e),this._verticalPerspectiveTransform.populateCache(e)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(e,t,r,i){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,r,i)}setLocationAtPoint(e,t){this.isGlobeRendering?(this._verticalPerspectiveTransform.setLocationAtPoint(e,t),this.apply(this._verticalPerspectiveTransform,!1)):(this._mercatorTransform.setLocationAtPoint(e,t),this.apply(this._mercatorTransform,!1))}locationToScreenPoint(e,t){return this.currentTransform.locationToScreenPoint(e,t)}screenPointToMercatorCoordinate(e,t){return this.currentTransform.screenPointToMercatorCoordinate(e,t)}screenPointToLocation(e,t){return this.currentTransform.screenPointToLocation(e,t)}isPointOnMapSurface(e,t){return this.currentTransform.isPointOnMapSurface(e,t)}getRayDirectionFromPixel(e){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e)}getMatrixForModel(e,t){return this.currentTransform.getMatrixForModel(e,t)}getProjectionDataForCustomLayer(e=!0){let t=this._mercatorTransform.getProjectionDataForCustomLayer(e);if(!this.isGlobeRendering)return t;let r=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e);return r.fallbackMatrix=t.mainMatrix,r}getFastPathSimpleProjectionMatrix(e){return this.currentTransform.getFastPathSimpleProjectionMatrix(e)}}class tQ{get useGlobeControls(){return!0}handlePanInertia(e,r){let i=tV(e,r);return Math.abs(i.lng-r.center.lng)>180&&(i.lng=r.center.lng+179.5*Math.sign(i.lng-r.center.lng)),{easingCenter:i,easingOffset:new t.P(0,0)}}handleMapControlsRollPitchBearingZoom(e,r){let i=e.around,n=r.screenPointToLocation(i);e.bearingDelta&&r.setBearing(r.bearing+e.bearingDelta),e.pitchDelta&&r.setPitch(r.pitch+e.pitchDelta),e.rollDelta&&r.setRoll(r.roll+e.rollDelta);let a=r.zoom;e.zoomDelta&&r.setZoom(r.zoom+e.zoomDelta);let o=r.zoom-a;if(0===o)return;let s=t.bJ(r.center.lng,n.lng),l=s/(Math.abs(s/180)+1),c=t.bJ(r.center.lat,n.lat),u=r.getRayDirectionFromPixel(i),h=r.cameraPosition,d=-1*t.b3(h,u),f=t.bz();t.a_(f,h,[u[0]*d,u[1]*d,u[2]*d]);let p=Math.exp(-(.5*Math.max(t.b5(f)-1-.3,0))),m=tj(r.worldSize,r.center.lat)/Math.min(r.width,r.height),g=t.bw(m,.9,.5,1,.25),y=(1-t.ao(-o))*Math.min(p,g),v=r.center.lat,x=r.zoom,b=new t.W(r.center.lng+l*y,t.al(r.center.lat+c*y,-t.am,t.am));r.setLocationAtPoint(n,i);let _=r.center,w=Math.pow(Math.max(t.bw(Math.abs(s),45,85,0,1),t.bw(m,.75,.35,0,1)),.25),T=t.bJ(_.lng,b.lng),M=t.bJ(_.lat,b.lat);r.setCenter(new t.W(_.lng+T*w,_.lat+M*w).wrap()),r.setZoom(x+tU(v,r.center.lat))}handleMapControlsPan(e,t,r){if(!e.panDelta)return;let i=t.center.lat,n=t.zoom;t.setCenter(tV(e.panDelta,t).wrap()),t.setZoom(n+tU(i,t.center.lat))}cameraForBoxAndBearing(e,r,i,n,a){let o=t_(e,r,i,n,a),s=r.left/a.width*2-1,l=(a.width-r.right)/a.width*2-1,c=-(r.top/a.height*2)+1,u=-((a.height-r.bottom)/a.height*2)+1,h=0>t.bJ(i.getWest(),i.getEast()),d=h?i.getEast():i.getWest(),f=h?i.getWest():i.getEast(),p=Math.max(i.getNorth(),i.getSouth()),m=Math.min(i.getNorth(),i.getSouth()),g=d+.5*t.bJ(d,f),y=p+.5*t.bJ(p,m),v=a.clone();v.setCenter(o.center),v.setBearing(o.bearing),v.setPitch(0),v.setRoll(0),v.setZoom(o.zoom);let x=v.modelViewProjectionMatrix,b=[tF(i.getNorthWest()),tF(i.getNorthEast()),tF(i.getSouthWest()),tF(i.getSouthEast()),tF(new t.W(f,y)),tF(new t.W(d,y)),tF(new t.W(g,p)),tF(new t.W(g,m))],_=tF(o.center),w=1/0;for(let e of b)s<0&&(w=tQ.getLesserNonNegativeNonNull(w,tQ.solveVectorScale(e,_,x,"x",s))),l>0&&(w=tQ.getLesserNonNegativeNonNull(w,tQ.solveVectorScale(e,_,x,"x",l))),c>0&&(w=tQ.getLesserNonNegativeNonNull(w,tQ.solveVectorScale(e,_,x,"y",c))),u<0&&(w=tQ.getLesserNonNegativeNonNull(w,tQ.solveVectorScale(e,_,x,"y",u)));if(Number.isFinite(w)&&0!==w)return o.zoom=Math.min(v.zoom+t.ar(w),e.maxZoom),o;tx()}handleJumpToCenterZoom(e,r){let i=e.center.lat,n=e.applyConstrain(r.center?t.W.convert(r.center):e.center,e.zoom).center;e.setCenter(n.wrap());let a=void 0!==r.zoom?+r.zoom:e.zoom+tU(i,n.lat);e.zoom!==a&&e.setZoom(a)}handleEaseTo(e,r){let i=e.zoom,n=e.center,a=e.padding,o={roll:e.roll,pitch:e.pitch,bearing:e.bearing},s={roll:void 0===r.roll?e.roll:r.roll,pitch:void 0===r.pitch?e.pitch:r.pitch,bearing:void 0===r.bearing?e.bearing:r.bearing},l=void 0!==r.zoom,c=!e.isPaddingEqual(r.padding),u=!1,h=r.center?t.W.convert(r.center):n,d=e.applyConstrain(h,i).center;td(e,d);let f=e.clone();f.setCenter(d),f.setZoom(l?+r.zoom:i+tU(n.lat,h.lat)),f.setBearing(r.bearing);let p=new t.P(t.al(e.centerPoint.x+r.offsetAsPoint.x,0,e.width),t.al(e.centerPoint.y+r.offsetAsPoint.y,0,e.height));f.setLocationAtPoint(d,p);let m=(r.offset&&r.offsetAsPoint.mag())>0?f.center:d,g=l?+r.zoom:i+tU(n.lat,m.lat),y=i+tU(n.lat,0),v=g+tU(m.lat,0),x=t.bJ(n.lng,m.lng),b=t.bJ(n.lat,m.lat),_=t.ao(v-y);return{easeFunc:i=>{if(t.bn(o,s)||tb({startEulerAngles:o,endEulerAngles:s,tr:e,k:i,useSlerp:o.roll!=s.roll}),c&&e.interpolatePadding(a,r.padding,i),r.around)t.w("Easing around a point is not supported under globe projection."),e.setLocationAtPoint(r.around,r.aroundPoint);else{let t=Math.pow(v>y?Math.min(2,_):Math.max(.5,_),1-i),r=tH(n,x,b,i*t);e.setCenter(r.wrap())}if(u){let r=t.H.number(y,v,i)+tU(0,e.center.lat);e.setZoom(r)}},isZooming:u=g!==i,elevationCenter:m}}handleFlyTo(e,r){let i,n,a=void 0!==r.zoom,o=e.center,s=e.zoom,l=e.padding,c=!e.isPaddingEqual(r.padding),u=e.applyConstrain(t.W.convert(r.center||r.locationAtOffset),s).center,h=a?+r.zoom:e.zoom+tU(e.center.lat,u.lat),d=e.clone();d.setCenter(u),d.setZoom(h),d.setBearing(r.bearing);let f=new t.P(t.al(e.centerPoint.x+r.offsetAsPoint.x,0,e.width),t.al(e.centerPoint.y+r.offsetAsPoint.y,0,e.height));d.setLocationAtPoint(u,f);let p=d.center;td(e,p);let m=(i=tF(o),n=tF(p),Math.acos(t.b3(i,n))/(2*Math.PI)*tO(e)),g=s+tU(o.lat,0),y=h+tU(p.lat,0),v=t.ao(y-g),x;if("number"==typeof r.minZoom){let i=Math.min(+r.minZoom+tU(p.lat,0),g,y)+tU(0,p.lat),n=e.applyConstrain(p,i).zoom+tU(p.lat,0);x=t.ao(n-g)}let b=t.bJ(o.lng,p.lng),_=t.bJ(o.lat,p.lat);return{easeFunc:(i,n,a,s)=>{let u=tH(o,b,_,a);c&&e.interpolatePadding(l,r.padding,i);let d=1===i?p:u;e.setCenter(d.wrap());let f=g+t.ar(n);e.setZoom(1===i?h:f+tU(0,d.lat))},scaleOfZoom:v,targetCenter:p,scaleOfMinZoom:x,pixelPathLength:m}}static solveVectorScale(e,t,r,i,n){let a="x"===i?[r[0],r[4],r[8],r[12]]:[r[1],r[5],r[9],r[13]],o=[r[3],r[7],r[11],r[15]],s=e[0]*a[0]+e[1]*a[1]+e[2]*a[2],l=e[0]*o[0]+e[1]*o[1]+e[2]*o[2],c=t[0]*a[0]+t[1]*a[1]+t[2]*a[2],u=t[0]*o[0]+t[1]*o[1]+t[2]*o[2];return c+n*l===s+n*u||o[3]*(s-c)+a[3]*(u-l)+s*u==c*l?null:(c+a[3]-n*u-n*o[3])/(c-s-n*u+n*l)}static getLesserNonNegativeNonNull(e,t){return null!==t&&t>=0&&tt.C(e,r?.filter(e=>"source.canvas"!==e.identifier)),t2=t.bN();class t3 extends t.E{constructor(e,r={}){var i,n;super(),this._rtlPluginLoaded=()=>{for(let e in this.tileManagers){let t=this.tileManagers[e].getSource().type;"vector"!==t&&"geojson"!==t||this.tileManagers[e].reload()}},this.map=e,this.dispatcher=new N(B(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",(e,t)=>this.getGlyphs(e,t)),this.dispatcher.registerMessageHandler("GI",(e,t)=>this.getImages(e,t)),this.dispatcher.registerMessageHandler("GDA",(e,t)=>this.getDashes(e,t)),this.imageManager=new T,this.imageManager.setEventedParent(this);let a=(null==(i=e._container)?void 0:i.lang)||"u">typeof document&&(null==(n=document.documentElement)?void 0:n.lang)||void 0;this.glyphManager=new E(e._requestManager,r.localIdeographFontFamily,a),this.lineAtlas=new z(256,512),this.crossTileSymbolIndex=new tr,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",t.bO()),ec().on(eo,this._rtlPluginLoaded),this.on("data",e=>{if("source"!==e.dataType||"metadata"!==e.sourceDataType)return;let t=this.tileManagers[e.sourceId];if(!t)return;let r=t.getSource();if(r?.vectorLayerIds)for(let e in this._layers){let t=this._layers[e];t.source===r.id&&this._validateLayer(t)}})}_setInitialValues(){var e;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new t.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new((null==(e=this.crossTileSymbolIndex)?void 0:e.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(e,r){var i,n,a;this._checkLoaded();let o=null===r?null!=(a=null==(n=null==(i=this.stylesheet.state)?void 0:i[e])?void 0:n.default)?a:null:r;if(t.bQ(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 i in e)t.bQ(this._globalState[i],e[i].default)||(r.push(i),this._globalState[i]=e[i].default);this._applyGlobalStateChanges(r)}_applyGlobalStateChanges(e){if(0===e.length)return;let t=new Set,r={};for(let i of e)for(let e in r[i]=this._globalState[i],this._layers){let r=this._layers[e],n=r.getLayoutAffectingGlobalStateRefs(),a=r.getPaintAffectingGlobalStateRefs(),o=r.getVisibilityAffectingGlobalStateRefs();if(n.has(i)&&t.add(r.source),a.has(i))for(let{name:e,value:t}of a.get(i))this._updatePaintProperty(r,e,t);o?.has(i)&&(r.recalculateVisibility(),this._updateLayer(r))}for(let e in this.dispatcher.broadcast("UGS",r),this.tileManagers)t.has(e)&&(this._reloadSource(e),this._changed=!0)}loadURL(e){return t._(this,arguments,void 0,function*(e,r={},i){this.fire(new t.n("dataloading",{dataType:"style"})),r.validate="boolean"!=typeof r.validate||r.validate,this._loadStyleRequest=new AbortController;let n=this._loadStyleRequest;try{let a=yield this.map._requestManager.transformRequest(e,"Style");t.bR(n.signal);let o=yield t.k(a,n);this._loadStyleRequest===n&&(this._loadStyleRequest=null),this._load(o.data,r,i)}catch(e){this._loadStyleRequest===n&&(this._loadStyleRequest=null),e&&!n.signal.aborted&&this.fire(new t.l(t.d(e)))}})}loadJSON(e,r={},i){this.fire(new t.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,g.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,r.validate=!1!==r.validate,this._load(e,r,i)}).catch(()=>{})}loadEmpty(){this.fire(new t.n("dataloading",{dataType:"style"})),this._load(t2,{validate:!1})}_load(e,r,i){var n,a;let o=r.transformStyle?r.transformStyle(i,e):e;if(!r.validate||!t1(this,t.F(o))){for(let e in o=Object.assign({},o),this._loaded=!0,this.stylesheet=o,o.sources)this.addSource(e,o.sources[e],{validate:!1});o.sprite?this._loadSprite(o.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(o.glyphs),this._createLayers(),this.light=new L(this.stylesheet.light),this._setProjectionInternal((null==(n=this.stylesheet.projection)?void 0:n.type)||"mercator"),this.sky=new I(this.stylesheet.sky),this.map.setTerrain(null!=(a=this.stylesheet.terrain)?a:null),this.fire(new t.n("data",{dataType:"style"})),this.fire(new t.n("style.load"))}}_createLayers(){var e,r,i;let n=t.bS(this.stylesheet.layers);for(let a of(this.setGlobalState(null!=(e=this.stylesheet.state)?e:null),this.dispatcher.broadcast("SL",n),this._order=n.map(e=>e.id),this._layers={},this._serializedLayers=null,n)){let e=t.bT(a,this._globalState);if(e.setEventedParent(this,{layer:{id:a.id}}),this._layers[a.id]=e,t.bU(e)&&this.tileManagers[e.source]){let t=null!=(i=null==(r=a.paint)?void 0:r["raster-fade-duration"])?i:e.paint.get("raster-fade-duration");this.tileManagers[e.source].setRasterFadeDuration(t)}}}_loadSprite(e,r=!1,i){this.imageManager.setLoaded(!1);let n=new AbortController,a;this._spriteRequest=n,(function(e,r,i,n){return t._(this,void 0,void 0,function*(){let a=_(e),o=i>1?"@2x":"",s={},c={};for(let{id:e,url:i}of a){let a=yield r.transformRequest(w(i,o,".json"),"SpriteJSON");s[e]=t.k(a,n);let u=yield r.transformRequest(w(i,o,".png"),"SpriteImage");c[e]=l.getImage(u,n)}return yield Promise.all([...Object.values(s),...Object.values(c)]),function(e,r){return t._(this,void 0,void 0,function*(){let t={};for(let i in e){t[i]={};let n=g.getImageCanvasContext((yield r[i]).data),a=(yield e[i]).data;for(let e in a){let{width:r,height:o,x:s,y:l,sdf:c,pixelRatio:u,stretchX:h,stretchY:d,content:f,textFitWidth:p,textFitHeight:m}=a[e];t[i][e]={data:null,pixelRatio:u,sdf:c,stretchX:h,stretchY:d,content:f,textFitWidth:p,textFitHeight:m,spriteData:{width:r,height:o,x:s,y:l,context:n}}}}return t})}(s,c)})})(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(e=>{if(this._spriteRequest=null,e)for(let t in e){for(let r of(this._spritesImagesIds[t]=[],this._spritesImagesIds[t]?this._spritesImagesIds[t].filter(t=>!(t in e)):[]))this.imageManager.removeImage(r),this._changedImages[r]=!0;for(let i in e[t]){let n="default"===t?i:`${t}:${i}`;this._spritesImagesIds[t].push(n),n in this.imageManager.images?this.imageManager.updateImage(n,e[t][i],!1):this.imageManager.addImage(n,e[t][i]),r&&(this._changedImages[n]=!0)}}}).catch(e=>{this._spriteRequest=null,a=e,n.signal.aborted||this.fire(new t.l(a))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),r&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.n("data",{dataType:"style"})),i&&i(a)})}_unloadSprite(){for(let e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.n("data",{dataType:"style"}))}_validateLayer(e){let r=this.tileManagers[e.source];if(!r)return;let i=e.sourceLayer;if(!i)return;let n=r.getSource();("geojson"===n.type||n.vectorLayerIds&&!n.vectorLayerIds.includes(i))&&this.fire(new t.l(Error(`Source layer "${i}" does not exist on source "${n.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 i=this._serializedAllLayers();if(!e||0===e.length)return Object.values(r?t.bV(i):i);let n=[];for(let a of e)if(i[a]){let e=r?t.bV(i[a]):i[a];n.push(e)}return n}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;for(let t of(e=this._serializedLayers={},Object.keys(this._layers))){let r=this._layers[t];"custom"!==r.type&&(e[t]=r.serialize())}return e}hasTransitions(){var e,t,r;if(null!=(e=this.light)&&e.hasTransition()||null!=(t=this.sky)&&t.hasTransition()||null!=(r=this.projection)&&r.hasTransition())return!0;for(let e in this.tileManagers)if(this.tileManagers[e].hasTransition())return!0;for(let e in this._layers)if(this._layers[e].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){let t=Object.keys(this._updatedLayers),r=Object.keys(this._removedLayers);for(let e in(t.length||r.length)&&this._updateWorkerLayers(t,r),this._updatedSources){let t=this._updatedSources[e];if("reload"===t)this._reloadSource(e);else{if("clear"!==t)throw Error(`Invalid action ${t}`);this._clearSource(e)}}for(let t in this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs(),this._updatedPaintProps)this._layers[t].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}let i={};for(let e in this.tileManagers){let t=this.tileManagers[e];i[e]=t.used,t.used=!1}for(let t of this._order){let r=this._layers[t];r.recalculate(e,this._availableImages),!r.isHidden(e.zoom)&&r.source&&(this.tileManagers[r.source].used=!0)}for(let e in i){let r=this.tileManagers[e];!!i[e]!=!!r.used&&r.fire(new t.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:e}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,r&&this.fire(new t.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let e=Object.keys(this._changedImages);if(e.length){for(let t in this.tileManagers)this.tileManagers[t].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,t){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:t})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,r={}){var i;this._checkLoaded();let n=this.serialize();if(e=r.transformStyle?r.transformStyle(n,e):e,(null==(i=r.validate)||i)&&t1(this,t.F(e)))return!1;(e=t.bV(e)).layers=t.bS(e.layers);let a=t.bW(n,e),o=this._getOperationsToPerform(a);if(o.unimplemented.length>0)throw Error(`Unimplemented: ${o.unimplemented.join(", ")}.`);if(0===o.operations.length)return!1;for(let e of o.operations)e();return this.stylesheet=e,this._serializedLayers=null,this.fire(new t.n("style.load",{style:this})),!0}_getOperationsToPerform(e){let t=[],r=[];for(let i of e)switch(i.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":t.push(()=>this.addLayer.apply(this,i.args));break;case"removeLayer":t.push(()=>this.removeLayer.apply(this,i.args));break;case"setPaintProperty":t.push(()=>this.setPaintProperty.apply(this,i.args));break;case"setLayoutProperty":t.push(()=>this.setLayoutProperty.apply(this,i.args));break;case"setFilter":t.push(()=>this.setFilter.apply(this,i.args));break;case"addSource":t.push(()=>this.addSource.apply(this,i.args));break;case"removeSource":t.push(()=>this.removeSource.apply(this,i.args));break;case"setLayerZoomRange":t.push(()=>this.setLayerZoomRange.apply(this,i.args));break;case"setLight":t.push(()=>this.setLight.apply(this,i.args));break;case"setGeoJSONSourceData":t.push(()=>this.setGeoJSONSourceData.apply(this,i.args));break;case"setGlyphs":t.push(()=>this.setGlyphs.apply(this,i.args));break;case"setSprite":t.push(()=>this.setSprite.apply(this,i.args));break;case"setTerrain":t.push(()=>this.map.setTerrain.apply(this,i.args));break;case"setSky":t.push(()=>this.setSky.apply(this,i.args));break;case"setProjection":this.setProjection.apply(this,i.args);break;case"setGlobalState":t.push(()=>this.setGlobalState.apply(this,i.args));break;case"setTransition":t.push(()=>{});break;default:r.push(i.command)}return{operations:t,unimplemented:r}}addImage(e,r){if(this.getImage(e))return this.fire(new t.l(Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,r),this._afterImageUpdated(e)}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new t.l(Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,r,i={}){var n;if(this._checkLoaded(),void 0!==this.tileManagers[e])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(["vector","raster","geojson","video","image"].includes(r.type)&&this._validate(t.F.source,`sources.${e}`,r,null,i))return;null!=(n=this.map)&&n._collectResourceTiming&&(r.collectResourceTiming=!0);let a=this.tileManagers[e]=new eE(e,r,this.dispatcher);a.style=this,a.setEventedParent(this,()=>({isSourceLoaded:a.loaded(),source:a.serialize(),sourceId:e})),a.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),void 0===this.tileManagers[e])throw Error(`There is no source with this ID=${e}`);for(let r in this._layers)if(this._layers[r].source===e)return this.fire(new t.l(Error(`Source "${e}" cannot be removed while layer "${r}" is using it.`)));let r=this.tileManagers[e];delete this.tileManagers[e],delete this._updatedSources[e],r.fire(new t.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),r.setEventedParent(null),r.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,t){if(this._checkLoaded(),void 0===this.tileManagers[e])throw Error(`There is no source with this ID=${e}`);let r=this.tileManagers[e].getSource();if("geojson"!==r.type)throw Error(`geojsonSource.type is ${r.type}, which is !== 'geojson`);r.setData(t),this._changed=!0}getSource(e){var t;return null==(t=this.tileManagers[e])?void 0:t.getSource()}addLayer(e,r,i={}){let n;this._checkLoaded();let a=e.id;if(this.getLayer(a))return void this.fire(new t.l(Error(`Layer "${a}" already exists on this map.`)));if("custom"===e.type){if(t1(this,t.bX(e)))return;n=t.bT(e,this._globalState)}else{if("source"in e&&"object"==typeof e.source&&(this.addSource(a,e.source),e=t.bV(e),e=t.e(e,{source:a})),this._validate(t.F.layer,`layers.${a}`,e,{arrayIndex:-1},i))return;n=t.bT(e,this._globalState),this._validateLayer(n),n.setEventedParent(this,{layer:{id:a}})}let o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new t.l(Error(`Cannot add layer "${a}" before non-existing layer "${r}".`)));else{if(this._order.splice(o,0,a),this._layerOrderChanged=!0,this._layers[a]=n,this._removedLayers[a]&&n.source&&"custom"!==n.type){let e=this._removedLayers[a];delete this._removedLayers[a],e.type!==n.type?this._updatedSources[n.source]="clear":(this._updatedSources[n.source]="reload",this.tileManagers[n.source].pause())}this._updateLayer(n),n.onAdd&&n.onAdd(this.map)}}moveLayer(e,r){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new t.l(Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===r)return;let i=this._order.indexOf(e);this._order.splice(i,1);let n=r?this._order.indexOf(r):this._order.length;r&&-1===n?this.fire(new t.l(Error(`Cannot move layer "${e}" before non-existing layer "${r}".`))):(this._order.splice(n,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();let r=this._layers[e];if(!r)return void this.fire(new t.l(Error(`Cannot remove non-existing layer "${e}".`)));r.setEventedParent(null);let i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,r,i){this._checkLoaded();let n=this.getLayer(e);n?n.minzoom===r&&n.maxzoom===i||(null!=r&&(n.minzoom=r),null!=i&&(n.maxzoom=i),this._updateLayer(n)):this.fire(new t.l(Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,r,i={}){this._checkLoaded();let n=this.getLayer(e);if(n){if(!t.bQ(n.filter,r))return null==r?(n.setFilter(void 0),void this._updateLayer(n)):void(this._validate(t.F.filter,`layers.${n.id}.filter`,r,null,i)||(n.setFilter(t.bV(r)),this._updateLayer(n)))}else this.fire(new t.l(Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return t.bV(this.getLayer(e).filter)}setLayoutProperty(e,r,i,n={}){this._checkLoaded();let a=this.getLayer(e);a?t.bQ(a.getLayoutProperty(r),i)||(a.setLayoutProperty(r,i,n),this._updateLayer(a)):this.fire(new t.l(Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,r){let i=this.getLayer(e);if(i)return i.getLayoutProperty(r);this.fire(new t.l(Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,r,i,n={}){this._checkLoaded();let a=this.getLayer(e);a?t.bQ(a.getPaintProperty(r),i)||this._updatePaintProperty(a,r,i,n):this.fire(new t.l(Error(`Cannot style non-existing layer "${e}".`)))}_updatePaintProperty(e,r,i,n={}){e.setPaintProperty(r,i,n)&&this._updateLayer(e),t.bU(e)&&"raster-fade-duration"===r&&this.tileManagers[e.source].setRasterFadeDuration(i),this._changed=!0,this._updatedPaintProps[e.id]=!0,this._serializedLayers=null}getPaintProperty(e,t){return this.getLayer(e).getPaintProperty(t)}setFeatureState(e,r){this._checkLoaded();let i=e.source,n=e.sourceLayer,a=this.tileManagers[i];if(void 0===a)return void this.fire(new t.l(Error(`The source '${i}' does not exist in the map's style.`)));let o=a.getSource().type;"geojson"===o&&n?this.fire(new t.l(Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||n?(void 0===e.id&&this.fire(new t.l(Error("The feature id parameter must be provided."))),a.setFeatureState(n,e.id,r)):this.fire(new t.l(Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,r){this._checkLoaded();let i=e.source,n=this.tileManagers[i];if(void 0===n)return void this.fire(new t.l(Error(`The source '${i}' does not exist in the map's style.`)));let a=n.getSource().type,o="vector"===a?e.sourceLayer:void 0;"vector"!==a||o?r&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.l(Error("A feature id is required to remove its specific state property."))):n.removeFeatureState(o,e.id,r):this.fire(new t.l(Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();let r=e.source,i=e.sourceLayer,n=this.tileManagers[r];if(void 0!==n)return"vector"!==n.getSource().type||i?(void 0===e.id&&this.fire(new t.l(Error("The feature id parameter must be provided."))),n.getFeatureState(i,e.id)):void this.fire(new t.l(Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new t.l(Error(`The source '${r}' does not exist in the map's style.`)))}getTransition(){var e;return t.e({duration:300,delay:0},null==(e=this.stylesheet)?void 0:e.transition)}serialize(){if(!this._loaded)return;let e=t.bY(this.tileManagers,e=>e.serialize()),r=this._serializeByIds(this._order,!0),i=this.map.getTerrain()||void 0,n=this.stylesheet;return t.bZ({version:n.version,name:n.name,metadata:n.metadata,light:n.light,sky:n.sky,center:n.center,zoom:n.zoom,bearing:n.bearing,pitch:n.pitch,sprite:n.sprite,glyphs:n.glyphs,transition:n.transition,projection:n.projection,sources:e,layers:r,terrain:i},e=>void 0!==e)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.tileManagers[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.tileManagers[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){let t=e=>"fill-extrusion"===this._layers[e].type,r={},i=[];for(let n=this._order.length-1;n>=0;n--){let a=this._order[n];if(t(a))for(let t of(r[a]=n,e)){let e=t[a];if(e)for(let t of e)i.push(t)}}i.sort((e,t)=>t.intersectionZ-e.intersectionZ);let n=[];for(let a=this._order.length-1;a>=0;a--){let o=this._order[a];if(t(o))for(let e=i.length-1;e>=0;e--){let t=i[e].feature;if(r[t.layer.id]s(n.tileID,e,t):void 0)});var d,f=function(e){let t={},r={};for(let{queryResults:i,wrappedTileID:n}of e){r[n]||(r[n]={});let e=r[n];for(let r in i){let n=i[r];e[r]||(e[r]={});let a=e[r];for(let e of(t[r]||(t[r]=[]),n))a[e.featureIndex]||(a[e.featureIndex]=!0,t[r].push(e))}}return t}(h);for(let t in f)for(let r of f[t])q(r,e);return f}(this.tileManagers[s],this._layers,o,e,l,i,this.map.terrain?(e,t,r)=>this.map.terrain.getElevation(e,t,r):void 0));return this.placement&&a.push(function(e,t,r,i,n,a,o){let s={},l=a.queryRenderedSymbols(i),c=[];for(let e of Object.keys(l).map(Number))c.push(o[e]);for(let r of(c.sort(V),c)){let i=r.featureIndex.lookupSymbolFeatures(l[r.bucketInstanceId],t,r.bucketIndex,r.sourceLayerIndex,{filterSpec:n.filter,globalState:n.globalState},n.layers,n.availableImages,e);for(let e in i){s[e]||(s[e]=[]);let t=i[e];for(let i of(t.sort((e,t)=>{let i=r.featureSortOrder;if(i){let r=i.indexOf(e.featureIndex);return i.indexOf(t.featureIndex)-r}return t.featureIndex-e.featureIndex}),t))s[e].push(i)}}for(let t in s)for(let i of s[t])q(i,r[e[t].source]);return s}(this._layers,o,this.tileManagers,e,l,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(a)}querySourceFeatures(e,r){r?.filter&&this._validate(t.F.filter,"querySourceFeatures.filter",r.filter,null,r);let i=this.tileManagers[e];return i?function(e,t){let r=e.getRenderableIds().map(t=>e.getTileByID(t)),i=[],n={};for(let e of r){let r=e.tileID.canonical.key;n[r]||(n[r]=!0,e.querySourceFeatures(i,t))}return i}(i,r?Object.assign(Object.assign({},r),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(e,r={}){this._checkLoaded();let i=this.light.getLight(),n=!1;for(let r in e)if(!t.bQ(e[r],i[r])){n=!0;break}if(!n)return;let a={now:v(),transition:t.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,r),this.light.updateTransitions(a)}getProjection(){var e;return null==(e=this.stylesheet)?void 0:e.projection}setProjection(e){this._checkLoaded();let t=e??{type:"mercator"};if(this.stylesheet.projection=e,this.projection){if(this.projection.name===t.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(t.type)}getSky(){var e;return null==(e=this.stylesheet)?void 0:e.sky}setSky(e,r={}){this._checkLoaded();let i=this.getSky(),n=!1;if(!e&&!i)return;if(e&&!i)n=!0;else if(!e&&i)n=!0;else for(let r in e)if(!t.bQ(e[r],i[r])){n=!0;break}if(!n)return;let a={now:v(),transition:t.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=e,this.sky.setSky(e,r),this.sky.updateTransitions(a)}_setProjectionInternal(e){let r=function(e,r){let i={constrainOverride:r};if(Array.isArray(e)){let t=new tD({type:e});return{projection:t,transform:new tJ(i),cameraHelper:new t0(t)}}switch(e){case"mercator":return{projection:new tu,transform:new tv(i),cameraHelper:new tw};case"globe":{let e=new tD({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:e,transform:new tJ(i),cameraHelper:new t0(e)}}case"vertical-perspective":return{projection:new tI,transform:new tK(i),cameraHelper:new tQ};default:return t.w(`Unknown projection name: ${e}. Falling back to mercator projection.`),{projection:new tu,transform:new tv(i),cameraHelper:new tw}}}(e,this.map.transformConstrain);for(let e in this.projection=r.projection,this.map.migrateProjection(r.transform,r.cameraHelper),this.tileManagers)this.tileManagers[e].reload()}_validate(e,r,i,n,a={}){return a?.validate!==!1&&t1(this,e.call(t.F,t.e({key:r,style:this.serialize(),value:i,styleSpec:t.x},n)))}_remove(e=!0){for(let e in this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),ec().off(eo,this._rtlPluginLoaded),this._layers)this._layers[e].setEventedParent(null);for(let e in this.tileManagers){let t=this.tileManagers[e];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 t in this.tileManagers)this.tileManagers[t].update(e,this.map.terrain)}_generateCollisionBoxes(){for(let e in this.tileManagers)this._reloadSource(e)}_updatePlacement(e,t,r,i,n=!1){let a=!1,o=!1,s={};for(let t of this._order){let r=this._layers[t];if("symbol"!==r.type)continue;if(!s[r.source]){let e=this.tileManagers[r.source];s[r.source]=e.getRenderableIds(!0).map(t=>e.getTileByID(t)).sort((e,t)=>t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1))}let i=this.crossTileSymbolIndex.addLayer(r,s[r.source],e.center.lng);a||(a=i)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),n||(n=this._layerOrderChanged||0===r),(n||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(v(),e.zoom))&&(this.pauseablePlacement=new e8(e,this.map.terrain,this._order,n,t,r,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,s),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(v()),o=!0),a&&this.pauseablePlacement.placement.setStale()),o||a)for(let e of this._order){let t=this._layers[e];"symbol"===t.type&&this.placement.updateLayerOpacities(t,s[t.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(v())}_releaseSymbolFadeTiles(){for(let e in this.tileManagers)this.tileManagers[e].releaseSymbolFadeTiles()}getImages(e,r){return t._(this,void 0,void 0,function*(){let e=yield this.imageManager.getImages(r.icons);this._updateTilesForChangedImages();let t=this.tileManagers[r.source];return t&&t.setDependencies(r.tileID.key,r.type,r.icons),e})}getGlyphs(e,r){return t._(this,void 0,void 0,function*(){let e=yield this.glyphManager.getGlyphs(r.stacks),t=this.tileManagers[r.source];return t&&t.setDependencies(r.tileID.key,r.type,[""]),e})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,r={}){this._checkLoaded(),e&&this._validate(t.F.glyphs,"glyphs",e,null,r)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}getDashes(e,r){return t._(this,void 0,void 0,function*(){let e={};for(let[t,i]of Object.entries(r.dashes))e[t]=this.lineAtlas.getDash(i.dasharray,i.round);return e})}addSprite(e,r,i={},n){this._checkLoaded();let a=[{id:e,url:r}],o=[..._(this.stylesheet.sprite),...a];this._validate(t.F.sprite,"sprite",o,null,i)||(this.stylesheet.sprite=o,this._loadSprite(a,!0,n))}removeSprite(e){this._checkLoaded();let r=_(this.stylesheet.sprite);if(r.find(t=>t.id===e)){if(this._spritesImagesIds[e])for(let t of this._spritesImagesIds[e])this.imageManager.removeImage(t),this._changedImages[t]=!0;r.splice(r.findIndex(t=>t.id===e),1),this.stylesheet.sprite=r.length>0?r:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.n("data",{dataType:"style"}))}else this.fire(new t.l(Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return _(this.stylesheet.sprite)}setSprite(e,r={},i){this._checkLoaded(),e&&this._validate(t.F.sprite,"sprite",e,null,r)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,i):(this._unloadSprite(),i&&i(null)))}destroy(){for(let e in this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),this.tileManagers){let t=this.tileManagers[e];t.setEventedParent(null),t.onRemove(this.map)}for(let e in this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy(),this._layers){let t=this._layers[e];t.setEventedParent(null),t.onRemove&&t.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var t5=t.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class t4{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,t,r,i,n,a,o,s,l){this.context=e;let c=this.boundPaintVertexBuffers.length!==i.length;for(let e=0;!c&&e({u_texture:0,u_ele_delta:e,u_fog_matrix:r,u_fog_color:i?i.properties.get("fog-color"):t.bo.white,u_fog_ground_blend:i?i.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:a?0:i?i.calculateFogBlendOpacity(n):0,u_horizon_color:i?i.properties.get("horizon-color"):t.bo.white,u_horizon_fog_blend:i?i.properties.get("horizon-fog-blend"):1,u_is_globe_mode:+!!a}),t8={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function t9(e){let t=[];for(let r of e){if(null===r)continue;let e=r.split(" ");t.push(e.pop())}return t}class t7{constructor(e,r,i,n,a,o,s,l,c=[]){let u=e.gl;this.program=u.createProgram();let h=t9(r.staticAttributes),d=i?i.getBinderAttributes():[],f=h.concat(d),p=tn.prelude.staticUniforms?t9(tn.prelude.staticUniforms):[],m=s.staticUniforms?t9(s.staticUniforms):[],g=r.staticUniforms?t9(r.staticUniforms):[],y=i?i.getBinderUniforms():[],v=p.concat(m).concat(g).concat(y),x=[];for(let e of v)x.includes(e)||x.push(e);let b=i?i.defines():[];tS(u)&&b.unshift("#version 300 es"),a&&b.push("#define OVERDRAW_INSPECTOR;"),o&&b.push("#define TERRAIN3D;"),l&&b.push(l),c&&b.push(...c);let _=b.concat(tn.prelude.fragmentSource,s.fragmentSource,r.fragmentSource).join(` `),w=b.concat(tn.prelude.vertexSource,s.vertexSource,r.vertexSource).join(` -`);tS(u)||(_=function(e){return e.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(_),w=function(e){return e.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(w));let T=u.createShader(u.FRAGMENT_SHADER);if(u.isContextLost())return void(this.failedToCreate=!0);if(u.shaderSource(T,_),u.compileShader(T),!u.getShaderParameter(T,u.COMPILE_STATUS))throw Error(`Could not compile fragment shader: ${u.getShaderInfoLog(T)}`);u.attachShader(this.program,T);let M=u.createShader(u.VERTEX_SHADER);if(u.isContextLost())return void(this.failedToCreate=!0);if(u.shaderSource(M,w),u.compileShader(M),!u.getShaderParameter(M,u.COMPILE_STATUS))throw Error(`Could not compile vertex shader: ${u.getShaderInfoLog(M)}`);u.attachShader(this.program,M),this.attributes={};let k={};this.numAttributes=f.length;for(let e=0;e({u_depth:new t.b_(e,r.u_depth),u_terrain:new t.b_(e,r.u_terrain),u_terrain_dim:new t.bp(e,r.u_terrain_dim),u_terrain_matrix:new t.c0(e,r.u_terrain_matrix),u_terrain_unpack:new t.c1(e,r.u_terrain_unpack),u_terrain_exaggeration:new t.bp(e,r.u_terrain_exaggeration)}))(e,k),this.projectionUniforms=((e,r)=>({u_projection_matrix:new t.c0(e,r.u_projection_matrix),u_projection_tile_mercator_coords:new t.c1(e,r.u_projection_tile_mercator_coords),u_projection_clipping_plane:new t.c1(e,r.u_projection_clipping_plane),u_projection_transition:new t.bp(e,r.u_projection_transition),u_projection_fallback_matrix:new t.c0(e,r.u_projection_fallback_matrix)}))(e,k),this.binderUniforms=i?i.getUniforms(e,k):[]}draw(e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v){var x;let b=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(r),e.setStencilMode(i),e.setColorMode(n),e.setCullFace(a),s)for(let t in e.activeTexture.set(b.TEXTURE2),b.bindTexture(b.TEXTURE_2D,s.depthTexture),e.activeTexture.set(b.TEXTURE3),b.bindTexture(b.TEXTURE_2D,s.texture),this.terrainUniforms)this.terrainUniforms[t].set(s[t]);if(l)for(let e in l)this.projectionUniforms[t8[e]].set(l[e]);if(o)for(let e in this.fixedUniforms)this.fixedUniforms[e].set(o[e]);m&&m.setUniforms(e,this.binderUniforms,f,{zoom:p});let _=0;switch(t){case b.LINES:_=2;break;case b.TRIANGLES:_=3;break;case b.LINE_STRIP:_=1}for(let r of d.get())r.vaos||(r.vaos={}),(x=r.vaos)[c]||(x[c]=new t4),r.vaos[c].bind(e,this,u,m?m.getPaintVertexBuffers():[],h,r.vertexOffset,g,y,v),b.drawElements(t,r.primitiveLength*_,b.UNSIGNED_SHORT,r.primitiveOffset*_*2)}}function re(e,r,i){let n=1/t.aK(i,1,r.transform.tileZoom),a=Math.pow(2,i.tileID.overscaledZ),o=i.tileSize*Math.pow(2,r.transform.tileZoom)/a,s=o*(i.tileID.canonical.x+i.tileID.wrap*a),l=o*i.tileID.canonical.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[n,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[s>>16,l>>16],u_pixel_coord_lower:[65535&s,65535&l]}}let rt=(e,r,i,n)=>{let a=e.style.light,o=a.properties.get("position"),s=[o.x,o.y,o.z],l=t.c4();"viewport"===a.properties.get("anchor")&&t.c5(l,e.transform.bearingInRadians),t.c6(s,s,l);let c=e.transform.transformLightDirection(s),u=a.properties.get("color");return{u_lightpos:s,u_lightpos_globe:c,u_lightintensity:a.properties.get("intensity"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+r,u_opacity:i,u_fill_translate:n}},rr=(e,r,i,n,a,o,s)=>t.e(rt(e,r,i,n),re(o,e,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8}),ri=(e,r,i,n)=>t.e(re(r,e,i),{u_fill_translate:n}),rn=(e,t)=>({u_world:e,u_fill_translate:t}),ra=(e,r,i,n,a)=>t.e(ri(e,r,i,a),{u_world:n}),ro=(e,r,i,n,a)=>{let o=e.transform,s,l,c=0;if("map"===i.paint.get("circle-pitch-alignment")){let e=t.aK(r,1,o.zoom);s=!0,l=[e,e],c=e/(t.a6*Math.pow(2,r.tileID.overscaledZ))*2*Math.PI*a}else s=!1,l=o.pixelsToGLUnits;return{u_camera_to_center_distance:o.cameraToCenterDistance,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_pitch_with_map:+s,u_device_pixel_ratio:e.pixelRatio,u_extrude_scale:l,u_globe_extrude_scale:c,u_translate:n}},rs=e=>({u_pixel_extrude_scale:[1/e.width,1/e.height]}),rl=e=>({u_viewport_size:[e.width,e.height]}),rc=(e,t=1)=>({u_color:e,u_overlay:0,u_overlay_scale:t}),ru=(e,r,i,n)=>{let a=t.aK(e,1,r)/(t.a6*Math.pow(2,e.tileID.overscaledZ))*2*Math.PI*n;return{u_extrude_scale:t.aK(e,1,r),u_intensity:i,u_globe_extrude_scale:a}},rh=(e,r,i,n)=>{let a=t.O();t.c7(a,0,e.width,e.height,0,0,1);let o=e.context.gl;return{u_matrix:a,u_world:[o.drawingBufferWidth,o.drawingBufferHeight],u_image:i,u_color_ramp:n,u_opacity:r.paint.get("heatmap-opacity")}},rd=(e,r,i)=>{var n;let a,o,s=i.paint.get("hillshade-accent-color"),l;switch(i.paint.get("hillshade-method")){case"basic":l=4;break;case"combined":l=1;break;case"igor":l=2;break;case"multidirectional":l=3;break;default:l=0}let c=i.getIlluminationProperties();for(let t=0;t{let i=r.stride,n=t.O();return t.c7(n,0,t.a6,-t.a6,0,0,1),t.Q(n,n,[0,-t.a6,0]),{u_matrix:n,u_image:1,u_dimension:[i,i],u_zoom:e.overscaledZ,u_unpack:r.getUnpackVector()}},rp=(e,t,r=0)=>({u_image:0,u_unpack:t.getUnpackVector(),u_dimension:[t.stride,t.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:r,u_opacity:e.paint.get("color-relief-opacity")}),rm=(e,r,i,n)=>{let a=e.transform;return{u_translation:r_(e,r,i),u_ratio:n/t.aK(r,1,a.zoom),u_device_pixel_ratio:e.pixelRatio,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},rg=(e,r,i,n,a)=>t.e(rm(e,r,i,n),{u_image:0,u_image_height:a}),ry=(e,r,i,n,a)=>{let o=e.transform,s=rb(r,o);return{u_translation:r_(e,r,i),u_texsize:r.imageAtlasTexture.size,u_ratio:n/t.aK(r,1,o.zoom),u_device_pixel_ratio:e.pixelRatio,u_image:0,u_scale:[s,a.fromScale,a.toScale],u_fade:a.t,u_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},rv=(e,r,i,n,a)=>{let o=rb(r,e.transform);return t.e(rm(e,r,i,n),{u_tileratio:o,u_crossfade_from:a.fromScale,u_crossfade_to:a.toScale,u_image:0,u_mix:a.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})},rx=(e,r,i,n,a,o)=>{let s=rb(r,e.transform);return t.e(rm(e,r,i,n),{u_image:0,u_image_height:o,u_tileratio:s,u_crossfade_from:a.fromScale,u_crossfade_to:a.toScale,u_image_dash:1,u_mix:a.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})};function rb(e,r){return 1/t.aK(e,1,r.tileZoom)}function r_(e,r,i){return t.aL(e.transform,r,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"))}let rw=(e,t,r,i,n)=>{var a,o,s;let l,c;return{u_tl_parent:e,u_scale_parent:t,u_buffer_scale:1,u_fade_t:r.mix,u_opacity:r.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:(a=i.paint.get("raster-saturation"))>0?1-1/(1.001-a):-a,u_contrast_factor:(o=i.paint.get("raster-contrast"))>0?1/(1-o):1+o,u_spin_weights:(l=Math.sin(s=i.paint.get("raster-hue-rotate")*(Math.PI/180)),[(2*(c=Math.cos(s))+1)/3,(-Math.sqrt(3)*l-c+1)/3,(Math.sqrt(3)*l-c+1)/3]),u_coords_top:[n[0].x,n[0].y,n[1].x,n[1].y],u_coords_bottom:[n[3].x,n[3].y,n[2].x,n[2].y]}},rT=(e,t,r,i,n,a,o,s,l,c,u,h,d)=>{let f=o.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:f.cameraToCenterDistance,u_pitch:f.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:f.width/f.height,u_fade_change:o.options.fadeDuration?o.symbolFadeChange:1,u_label_plane_matrix:s,u_coord_matrix:l,u_is_text:+u,u_pitch_with_map:+i,u_is_along_line:n,u_is_variable_anchor:a,u_texsize:h,u_texture:0,u_translation:c,u_pitched_scale:d}},rM=(e,r,i,n,a,o,s,l,c,u,h,d,f,p)=>{let m=s.transform;return t.e(rT(e,r,i,n,a,o,s,l,c,u,h,d,p),{u_gamma_scale:n?Math.cos(m.pitch*Math.PI/180)*m.cameraToCenterDistance:1,u_device_pixel_ratio:s.pixelRatio,u_is_halo:+!!f,u_is_plain:1})},rk=(e,r,i,n,a,o,s,l,c,u,h,d,f)=>t.e(rM(e,r,i,n,a,o,s,l,c,u,!0,h,!0,f),{u_texsize_icon:d,u_texture_icon:1}),rA=(e,t)=>({u_opacity:e,u_color:t}),rS=(e,r,i,n,a)=>t.e(function(e,r,i,n){let a=i.imageManager.getPattern(e.from.toString()),o=i.imageManager.getPattern(e.to.toString()),{width:s,height:l}=i.imageManager.getPixelSize(),c=Math.pow(2,n.tileID.overscaledZ),u=n.tileSize*Math.pow(2,i.transform.tileZoom)/c,h=u*(n.tileID.canonical.x+n.tileID.wrap*c),d=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:a.tl,u_pattern_br_a:a.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,l],u_mix:r.t,u_pattern_size_a:a.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:r.fromScale,u_scale_b:r.toScale,u_tile_units_to_pixels:1/t.aK(n,1,i.transform.tileZoom),u_pixel_coord_upper:[h>>16,d>>16],u_pixel_coord_lower:[65535&h,65535&d]}}(i,a,r,n),{u_opacity:e}),rE=(e,t)=>{},rC={fillExtrusion:(e,r)=>({u_lightpos:new t.c2(e,r.u_lightpos),u_lightpos_globe:new t.c2(e,r.u_lightpos_globe),u_lightintensity:new t.bp(e,r.u_lightintensity),u_lightcolor:new t.c2(e,r.u_lightcolor),u_vertical_gradient:new t.bp(e,r.u_vertical_gradient),u_opacity:new t.bp(e,r.u_opacity),u_fill_translate:new t.c3(e,r.u_fill_translate)}),fillExtrusionPattern:(e,r)=>({u_lightpos:new t.c2(e,r.u_lightpos),u_lightpos_globe:new t.c2(e,r.u_lightpos_globe),u_lightintensity:new t.bp(e,r.u_lightintensity),u_lightcolor:new t.c2(e,r.u_lightcolor),u_vertical_gradient:new t.bp(e,r.u_vertical_gradient),u_height_factor:new t.bp(e,r.u_height_factor),u_opacity:new t.bp(e,r.u_opacity),u_fill_translate:new t.c3(e,r.u_fill_translate),u_image:new t.b_(e,r.u_image),u_texsize:new t.c3(e,r.u_texsize),u_pixel_coord_upper:new t.c3(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,r.u_pixel_coord_lower),u_scale:new t.c2(e,r.u_scale),u_fade:new t.bp(e,r.u_fade)}),fill:(e,r)=>({u_fill_translate:new t.c3(e,r.u_fill_translate)}),fillPattern:(e,r)=>({u_image:new t.b_(e,r.u_image),u_texsize:new t.c3(e,r.u_texsize),u_pixel_coord_upper:new t.c3(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,r.u_pixel_coord_lower),u_scale:new t.c2(e,r.u_scale),u_fade:new t.bp(e,r.u_fade),u_fill_translate:new t.c3(e,r.u_fill_translate)}),fillOutline:(e,r)=>({u_world:new t.c3(e,r.u_world),u_fill_translate:new t.c3(e,r.u_fill_translate)}),fillOutlinePattern:(e,r)=>({u_world:new t.c3(e,r.u_world),u_image:new t.b_(e,r.u_image),u_texsize:new t.c3(e,r.u_texsize),u_pixel_coord_upper:new t.c3(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,r.u_pixel_coord_lower),u_scale:new t.c2(e,r.u_scale),u_fade:new t.bp(e,r.u_fade),u_fill_translate:new t.c3(e,r.u_fill_translate)}),circle:(e,r)=>({u_camera_to_center_distance:new t.bp(e,r.u_camera_to_center_distance),u_scale_with_map:new t.b_(e,r.u_scale_with_map),u_pitch_with_map:new t.b_(e,r.u_pitch_with_map),u_extrude_scale:new t.c3(e,r.u_extrude_scale),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_globe_extrude_scale:new t.bp(e,r.u_globe_extrude_scale),u_translate:new t.c3(e,r.u_translate)}),collisionBox:(e,r)=>({u_pixel_extrude_scale:new t.c3(e,r.u_pixel_extrude_scale)}),collisionCircle:(e,r)=>({u_viewport_size:new t.c3(e,r.u_viewport_size)}),debug:(e,r)=>({u_color:new t.b$(e,r.u_color),u_overlay:new t.b_(e,r.u_overlay),u_overlay_scale:new t.bp(e,r.u_overlay_scale)}),depth:rE,clippingMask:rE,heatmap:(e,r)=>({u_extrude_scale:new t.bp(e,r.u_extrude_scale),u_intensity:new t.bp(e,r.u_intensity),u_globe_extrude_scale:new t.bp(e,r.u_globe_extrude_scale)}),heatmapTexture:(e,r)=>({u_matrix:new t.c0(e,r.u_matrix),u_world:new t.c3(e,r.u_world),u_image:new t.b_(e,r.u_image),u_color_ramp:new t.b_(e,r.u_color_ramp),u_opacity:new t.bp(e,r.u_opacity)}),hillshade:(e,r)=>({u_image:new t.b_(e,r.u_image),u_latrange:new t.c3(e,r.u_latrange),u_exaggeration:new t.bp(e,r.u_exaggeration),u_altitudes:new t.c9(e,r.u_altitudes),u_azimuths:new t.c9(e,r.u_azimuths),u_accent:new t.b$(e,r.u_accent),u_method:new t.b_(e,r.u_method),u_shadows:new t.c8(e,r.u_shadows),u_highlights:new t.c8(e,r.u_highlights)}),hillshadePrepare:(e,r)=>({u_matrix:new t.c0(e,r.u_matrix),u_image:new t.b_(e,r.u_image),u_dimension:new t.c3(e,r.u_dimension),u_zoom:new t.bp(e,r.u_zoom),u_unpack:new t.c1(e,r.u_unpack)}),colorRelief:(e,r)=>({u_image:new t.b_(e,r.u_image),u_unpack:new t.c1(e,r.u_unpack),u_dimension:new t.c3(e,r.u_dimension),u_elevation_stops:new t.b_(e,r.u_elevation_stops),u_color_stops:new t.b_(e,r.u_color_stops),u_color_ramp_size:new t.b_(e,r.u_color_ramp_size),u_opacity:new t.bp(e,r.u_opacity)}),line:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels)}),lineGradient:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels),u_image:new t.b_(e,r.u_image),u_image_height:new t.bp(e,r.u_image_height)}),linePattern:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_texsize:new t.c3(e,r.u_texsize),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_image:new t.b_(e,r.u_image),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels),u_scale:new t.c2(e,r.u_scale),u_fade:new t.bp(e,r.u_fade)}),lineSDF:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels),u_image:new t.b_(e,r.u_image),u_mix:new t.bp(e,r.u_mix),u_tileratio:new t.bp(e,r.u_tileratio),u_crossfade_from:new t.bp(e,r.u_crossfade_from),u_crossfade_to:new t.bp(e,r.u_crossfade_to),u_lineatlas_width:new t.bp(e,r.u_lineatlas_width),u_lineatlas_height:new t.bp(e,r.u_lineatlas_height)}),lineGradientSDF:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels),u_image:new t.b_(e,r.u_image),u_image_height:new t.bp(e,r.u_image_height),u_tileratio:new t.bp(e,r.u_tileratio),u_crossfade_from:new t.bp(e,r.u_crossfade_from),u_crossfade_to:new t.bp(e,r.u_crossfade_to),u_image_dash:new t.b_(e,r.u_image_dash),u_mix:new t.bp(e,r.u_mix),u_lineatlas_width:new t.bp(e,r.u_lineatlas_width),u_lineatlas_height:new t.bp(e,r.u_lineatlas_height)}),raster:(e,r)=>({u_tl_parent:new t.c3(e,r.u_tl_parent),u_scale_parent:new t.bp(e,r.u_scale_parent),u_buffer_scale:new t.bp(e,r.u_buffer_scale),u_fade_t:new t.bp(e,r.u_fade_t),u_opacity:new t.bp(e,r.u_opacity),u_image0:new t.b_(e,r.u_image0),u_image1:new t.b_(e,r.u_image1),u_brightness_low:new t.bp(e,r.u_brightness_low),u_brightness_high:new t.bp(e,r.u_brightness_high),u_saturation_factor:new t.bp(e,r.u_saturation_factor),u_contrast_factor:new t.bp(e,r.u_contrast_factor),u_spin_weights:new t.c2(e,r.u_spin_weights),u_coords_top:new t.c1(e,r.u_coords_top),u_coords_bottom:new t.c1(e,r.u_coords_bottom)}),symbolIcon:(e,r)=>({u_is_size_zoom_constant:new t.b_(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.b_(e,r.u_is_size_feature_constant),u_size_t:new t.bp(e,r.u_size_t),u_size:new t.bp(e,r.u_size),u_camera_to_center_distance:new t.bp(e,r.u_camera_to_center_distance),u_pitch:new t.bp(e,r.u_pitch),u_rotate_symbol:new t.b_(e,r.u_rotate_symbol),u_aspect_ratio:new t.bp(e,r.u_aspect_ratio),u_fade_change:new t.bp(e,r.u_fade_change),u_label_plane_matrix:new t.c0(e,r.u_label_plane_matrix),u_coord_matrix:new t.c0(e,r.u_coord_matrix),u_is_text:new t.b_(e,r.u_is_text),u_pitch_with_map:new t.b_(e,r.u_pitch_with_map),u_is_along_line:new t.b_(e,r.u_is_along_line),u_is_variable_anchor:new t.b_(e,r.u_is_variable_anchor),u_texsize:new t.c3(e,r.u_texsize),u_texture:new t.b_(e,r.u_texture),u_translation:new t.c3(e,r.u_translation),u_pitched_scale:new t.bp(e,r.u_pitched_scale)}),symbolSDF:(e,r)=>({u_is_size_zoom_constant:new t.b_(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.b_(e,r.u_is_size_feature_constant),u_size_t:new t.bp(e,r.u_size_t),u_size:new t.bp(e,r.u_size),u_camera_to_center_distance:new t.bp(e,r.u_camera_to_center_distance),u_pitch:new t.bp(e,r.u_pitch),u_rotate_symbol:new t.b_(e,r.u_rotate_symbol),u_aspect_ratio:new t.bp(e,r.u_aspect_ratio),u_fade_change:new t.bp(e,r.u_fade_change),u_label_plane_matrix:new t.c0(e,r.u_label_plane_matrix),u_coord_matrix:new t.c0(e,r.u_coord_matrix),u_is_text:new t.b_(e,r.u_is_text),u_pitch_with_map:new t.b_(e,r.u_pitch_with_map),u_is_along_line:new t.b_(e,r.u_is_along_line),u_is_variable_anchor:new t.b_(e,r.u_is_variable_anchor),u_texsize:new t.c3(e,r.u_texsize),u_texture:new t.b_(e,r.u_texture),u_gamma_scale:new t.bp(e,r.u_gamma_scale),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_is_halo:new t.b_(e,r.u_is_halo),u_is_plain:new t.b_(e,r.u_is_plain),u_translation:new t.c3(e,r.u_translation),u_pitched_scale:new t.bp(e,r.u_pitched_scale)}),symbolTextAndIcon:(e,r)=>({u_is_size_zoom_constant:new t.b_(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.b_(e,r.u_is_size_feature_constant),u_size_t:new t.bp(e,r.u_size_t),u_size:new t.bp(e,r.u_size),u_camera_to_center_distance:new t.bp(e,r.u_camera_to_center_distance),u_pitch:new t.bp(e,r.u_pitch),u_rotate_symbol:new t.b_(e,r.u_rotate_symbol),u_aspect_ratio:new t.bp(e,r.u_aspect_ratio),u_fade_change:new t.bp(e,r.u_fade_change),u_label_plane_matrix:new t.c0(e,r.u_label_plane_matrix),u_coord_matrix:new t.c0(e,r.u_coord_matrix),u_is_text:new t.b_(e,r.u_is_text),u_pitch_with_map:new t.b_(e,r.u_pitch_with_map),u_is_along_line:new t.b_(e,r.u_is_along_line),u_is_variable_anchor:new t.b_(e,r.u_is_variable_anchor),u_texsize:new t.c3(e,r.u_texsize),u_texsize_icon:new t.c3(e,r.u_texsize_icon),u_texture:new t.b_(e,r.u_texture),u_texture_icon:new t.b_(e,r.u_texture_icon),u_gamma_scale:new t.bp(e,r.u_gamma_scale),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_is_halo:new t.b_(e,r.u_is_halo),u_translation:new t.c3(e,r.u_translation),u_pitched_scale:new t.bp(e,r.u_pitched_scale)}),background:(e,r)=>({u_opacity:new t.bp(e,r.u_opacity),u_color:new t.b$(e,r.u_color)}),backgroundPattern:(e,r)=>({u_opacity:new t.bp(e,r.u_opacity),u_image:new t.b_(e,r.u_image),u_pattern_tl_a:new t.c3(e,r.u_pattern_tl_a),u_pattern_br_a:new t.c3(e,r.u_pattern_br_a),u_pattern_tl_b:new t.c3(e,r.u_pattern_tl_b),u_pattern_br_b:new t.c3(e,r.u_pattern_br_b),u_texsize:new t.c3(e,r.u_texsize),u_mix:new t.bp(e,r.u_mix),u_pattern_size_a:new t.c3(e,r.u_pattern_size_a),u_pattern_size_b:new t.c3(e,r.u_pattern_size_b),u_scale_a:new t.bp(e,r.u_scale_a),u_scale_b:new t.bp(e,r.u_scale_b),u_pixel_coord_upper:new t.c3(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.bp(e,r.u_tile_units_to_pixels)}),terrain:(e,r)=>({u_texture:new t.b_(e,r.u_texture),u_ele_delta:new t.bp(e,r.u_ele_delta),u_fog_matrix:new t.c0(e,r.u_fog_matrix),u_fog_color:new t.b$(e,r.u_fog_color),u_fog_ground_blend:new t.bp(e,r.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.bp(e,r.u_fog_ground_blend_opacity),u_horizon_color:new t.b$(e,r.u_horizon_color),u_horizon_fog_blend:new t.bp(e,r.u_horizon_fog_blend),u_is_globe_mode:new t.bp(e,r.u_is_globe_mode)}),terrainDepth:(e,r)=>({u_ele_delta:new t.bp(e,r.u_ele_delta)}),terrainCoords:(e,r)=>({u_texture:new t.b_(e,r.u_texture),u_terrain_coords_id:new t.bp(e,r.u_terrain_coords_id),u_ele_delta:new t.bp(e,r.u_ele_delta)}),projectionErrorMeasurement:(e,r)=>({u_input:new t.bp(e,r.u_input),u_output_expected:new t.bp(e,r.u_output_expected)}),atmosphere:(e,r)=>({u_sun_pos:new t.c2(e,r.u_sun_pos),u_atmosphere_blend:new t.bp(e,r.u_atmosphere_blend),u_globe_position:new t.c2(e,r.u_globe_position),u_globe_radius:new t.bp(e,r.u_globe_radius),u_inv_proj_matrix:new t.c0(e,r.u_inv_proj_matrix)}),sky:(e,r)=>({u_sky_color:new t.b$(e,r.u_sky_color),u_horizon_color:new t.b$(e,r.u_horizon_color),u_horizon:new t.c3(e,r.u_horizon),u_horizon_normal:new t.c3(e,r.u_horizon_normal),u_sky_horizon_blend:new t.bp(e,r.u_sky_horizon_blend),u_sky_blend:new t.bp(e,r.u_sky_blend)})};class rL{constructor(e,t,r){this.context=e;let i=e.gl;this.buffer=i.createBuffer(),this.dynamicDraw=!!r,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||t.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){let t=this.context.gl;if(!this.dynamicDraw)throw Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let rP={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class rI{constructor(e,t,r,i){this.length=t.length,this.attributes=r,this.itemSize=t.bytesPerElement,this.dynamicDraw=i,this.context=e;let n=e.gl;this.buffer=n.createBuffer(),e.bindVertexBuffer.set(this.buffer),n.bufferData(n.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||t.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 t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,t){for(let r of this.attributes){let i=t.attributes[r.name];void 0!==i&&e.enableVertexAttribArray(i)}}setVertexAttribPointers(e,t,r){for(let i of this.attributes){let n=t.attributes[i.name];void 0!==n&&e.vertexAttribPointer(n,i.components,e[rP[i.type]],!1,this.itemSize,i.offset+this.itemSize*(r||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class rz{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)}}class rD extends rz{getDefault(){return t.bo.transparent}set(e){let t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class rO extends rz{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}}class rR extends rz{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}}class rF extends rz{getDefault(){return[!0,!0,!0,!0]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class rj extends rz{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}}class rB extends rz{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}}class rN extends rz{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){let t=this.current;(e.func!==t.func||e.ref!==t.ref||e.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}}class rU extends rz{getDefault(){let e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}}class rV extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),this.current=e,this.dirty=!1}}class rq extends rz{getDefault(){return[0,1]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}}class rH extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),this.current=e,this.dirty=!1}}class rG extends rz{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}}class rW extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.BLEND):t.disable(t.BLEND),this.current=e,this.dirty=!1}}class rY extends rz{getDefault(){let e=this.gl;return[e.ONE,e.ZERO]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}}class rZ extends rz{getDefault(){return t.bo.transparent}set(e){let t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class r$ extends rz{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}}class rX extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),this.current=e,this.dirty=!1}}class rK extends rz{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}}class rJ extends rz{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}}class rQ extends rz{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}}class r0 extends rz{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}}class r1 extends rz{getDefault(){let e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class r2 extends rz{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,e),this.current=e,this.dirty=!1}}class r3 extends rz{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class r5 extends rz{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindTexture(t.TEXTURE_2D,e),this.current=e,this.dirty=!1}}class r4 extends rz{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class r6 extends rz{getDefault(){return null}set(e){let t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class r8 extends rz{getDefault(){return null}set(e){var t;if(e===this.current&&!this.dirty)return;let r=this.gl;tS(r)?r.bindVertexArray(e):null==(t=r.getExtension("OES_vertex_array_object"))||t.bindVertexArrayOES(e),this.current=e,this.dirty=!1}}class r7 extends rz{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}}class r9 extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}}class ie extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}}class it extends rz{constructor(e,t){super(e),this.context=e,this.parent=t}getDefault(){return null}}class ir extends it{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}}class ii extends it{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class ia extends it{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}let io="Framebuffer is not complete";class is{constructor(e,t,r,i,n){this.context=e,this.width=t,this.height=r;let a=e.gl,o=this.framebuffer=a.createFramebuffer();if(this.colorAttachment=new ir(e,o),i)this.depthAttachment=n?new ia(e,o):new ii(e,o);else if(n)throw Error("Stencil cannot be set without depth");if(a.checkFramebufferStatus(a.FRAMEBUFFER)!==a.FRAMEBUFFER_COMPLETE)throw Error(io)}destroy(){let e=this.context.gl,t=this.colorAttachment.get();if(t&&e.deleteTexture(t),this.depthAttachment){let t=this.depthAttachment.get();t&&e.deleteRenderbuffer(t)}e.deleteFramebuffer(this.framebuffer)}}class il{constructor(e){var t,r;if(this.gl=e,this.clearColor=new rD(this),this.clearDepth=new rO(this),this.clearStencil=new rR(this),this.colorMask=new rF(this),this.depthMask=new rj(this),this.stencilMask=new rB(this),this.stencilFunc=new rN(this),this.stencilOp=new rU(this),this.stencilTest=new rV(this),this.depthRange=new rq(this),this.depthTest=new rH(this),this.depthFunc=new rG(this),this.blend=new rW(this),this.blendFunc=new rY(this),this.blendColor=new rZ(this),this.blendEquation=new r$(this),this.cullFace=new rX(this),this.cullFaceSide=new rK(this),this.frontFace=new rJ(this),this.program=new rQ(this),this.activeTexture=new r0(this),this.viewport=new r1(this),this.bindFramebuffer=new r2(this),this.bindRenderbuffer=new r3(this),this.bindTexture=new r5(this),this.bindVertexBuffer=new r4(this),this.bindElementBuffer=new r6(this),this.bindVertexArray=new r8(this),this.pixelStoreUnpack=new r7(this),this.pixelStoreUnpackPremultiplyAlpha=new r9(this),this.pixelStoreUnpackFlipY=new ie(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),tS(e)){this.HALF_FLOAT=e.HALF_FLOAT;let i=e.getExtension("EXT_color_buffer_half_float");this.RGBA16F=null!=(t=e.RGBA16F)?t:i?.RGBA16F_EXT,this.RGB16F=null!=(r=e.RGB16F)?r:i?.RGB16F_EXT,e.getExtension("EXT_color_buffer_float")}else{e.getExtension("EXT_color_buffer_half_float"),e.getExtension("OES_texture_half_float_linear");let t=e.getExtension("OES_texture_half_float");this.HALF_FLOAT=t?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(e,t){return new rL(this,e,t)}createVertexBuffer(e,t,r){return new rI(this,e,t,r)}createRenderbuffer(e,t,r){let i=this.gl,n=i.createRenderbuffer();return this.bindRenderbuffer.set(n),i.renderbufferStorage(i.RENDERBUFFER,e,t,r),this.bindRenderbuffer.set(null),n}createFramebuffer(e,t,r,i){return new is(this,e,t,r,i)}clear({color:e,depth:t,stencil:r}){let i=this.gl,n=0;e&&(n|=i.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==t&&(n|=i.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(t),this.depthMask.set(!0)),void 0!==r&&(n|=i.STENCIL_BUFFER_BIT,this.clearStencil.set(r),this.stencilMask.set(255)),i.clear(n)}setCullFace(e){!1===e.enable?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(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)}setStencilMode(e){e.test.func!==this.gl.ALWAYS||e.mask?(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})):this.stencilTest.set(!1)}setColorMode(e){t.bQ(e.blendFunction,tT.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(){var e;return tS(this.gl)?this.gl.createVertexArray():null==(e=this.gl.getExtension("OES_vertex_array_object"))?void 0:e.createVertexArrayOES()}deleteVertexArray(e){var t;tS(this.gl)?this.gl.deleteVertexArray(e):null==(t=this.gl.getExtension("OES_vertex_array_object"))||t.deleteVertexArrayOES(e)}unbindVAO(){this.bindVertexArray.set(null)}}function ic(e,r,n,a,o){var s,l;let c=e.context,u=e.transform,h=c.gl,d=e.useProgram("collisionBox"),f=[],p=0,m=0;for(let t of a){let i=r.getTile(t).getBucket(n);if(!i)continue;let a=o?i.textCollisionBox:i.iconCollisionBox,l=i.collisionCircleArray;l.length>0&&(f.push({circleArray:l,circleOffset:m,coord:t}),p+=l.length/4,m=p),a&&d.draw(c,h.LINES,tk.disabled,tA.disabled,e.colorModeForRenderPass(),tM.disabled,rs(e.transform),null==(s=e.style.map.terrain)?void 0:s.getTerrainData(t),u.getProjectionData({overscaledTileID:t,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),n.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,null,e.transform.zoom,null,null,a.collisionVertexBuffer)}if(!o||!f.length)return;let g=e.useProgram("collisionCircle"),y=new t.ca;y.resize(4*p),y._trim();let v=0;for(let e of f)for(let t=0;te.style.map.terrain.getElevation(l,t,r):null;!function(e,r,i,n,a,o,s,l,c,u,h,d,f){let p=i?e.textSizeData:e.iconSizeData,m=t.aw(p,r.transform.zoom),g=[256/r.width*2+1,256/r.height*2+1],y=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;y.clear();let v=e.lineVertexArray,x=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,b=r.transform.width/r.transform.height,_=!1;for(let i=0;i=-g[0]&&w.x<=g[0]&&w.y>=-g[1])||!(w.y<=g[1])){eY(T.numGlyphs,y);continue}let S=.5+r.transform.cameraToCenterDistance/A.signedDistanceFromCamera*.5,E=t.ay(p,m,T),C=o?E*r.transform.getPitchedTextCorrection(T.anchorX,T.anchorY,c)/S:E*S,L=ej({projectionContext:k,pitchedLabelPlaneMatrixInverse:a,symbol:T,fontSize:C,flip:!1,keepUpright:s,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:y,aspectRatio:b,rotateToLine:l});_=L.useVertical,(L.notEnoughRoom||_||L.needsFlipping&&ej({projectionContext:k,pitchedLabelPlaneMatrixInverse:a,symbol:T,fontSize:C,flip:!0,keepUpright:s,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:y,aspectRatio:b,rotateToLine:l}).notEnoughRoom)&&eY(T.numGlyphs,y)}i?e.text.dynamicLayoutVertexBuffer.updateData(y):e.icon.dynamicLayoutVertexBuffer.updateData(y)}(c,e,a,B,r,b,u,"map"===i.layout.get("text-rotation-alignment"),l.toUnwrapped(),v.width,v.height,U,n)}let G=a&&A||H,W=_||G?iu:b?B:e.transform.clipSpaceToPixelsMatrix,Y=m&&0!==i.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(1),Z={program:C,buffers:h,uniformValues:m?c.iconsInText?rk(g.kind,L,w,b,_,G,e,W,N,U,I,R,E):rM(g.kind,L,w,b,_,G,e,W,N,U,a,I,Y,E):rT(g.kind,L,w,b,_,G,e,W,N,U,a,I,E),projectionData:V,atlasTexture:z,atlasTextureIcon:F,atlasInterpolation:D,atlasInterpolationIcon:O,isSDF:m,hasHalo:Y};if(T&&c.canOverlap)for(let e of(M=!0,h.segments.get()))S.push({segments:new t.aV([e]),sortKey:e.sortKey,state:Z,terrainData:P});else S.push({segments:h.segments,sortKey:0,state:Z,terrainData:P})}M&&S.sort((e,t)=>e.sortKey-t.sortKey);let C=null!=(m=i.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(null))?m:1/0,L=i.layout.get("text-letter-spacing").constantOr(0)*t.aJ<0||C>1;for(let t of S){let r=t.state;g.activeTexture.set(y.TEXTURE0),r.atlasTexture.bind(r.atlasInterpolation,y.CLAMP_TO_EDGE),r.atlasTextureIcon&&(g.activeTexture.set(y.TEXTURE1),r.atlasTextureIcon&&r.atlasTextureIcon.bind(r.atlasInterpolationIcon,y.CLAMP_TO_EDGE));let n=r.isSDF&&r.hasHalo;if(n){let n=r.uniformValues;n.u_is_halo=1,L&&(n.u_is_plain=0,id(r.buffers,t.segments,i,e,r.program,k,h,d,n,r.projectionData,t.terrainData),n.u_is_halo=0,n.u_is_plain=1)}id(r.buffers,t.segments,i,e,r.program,k,h,d,r.uniformValues,r.projectionData,t.terrainData),n&&!L&&(r.uniformValues.u_is_halo=0)}}function id(e,t,r,i,n,a,o,s,l,c,u){let h=i.context;n.draw(h,h.gl.TRIANGLES,a,o,s,tM.backCCW,l,u,c,r.id,e.layoutVertexBuffer,e.indexBuffer,t,r.paint,i.transform.zoom,e.programConfigurations.get(r.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function ip(e,t,r){var i,n;let a=e.gl,o=a.createTexture();a.bindTexture(a.TEXTURE_2D,o),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);let s=null!=(i=e.HALF_FLOAT)?i:a.UNSIGNED_BYTE,l=null!=(n=e.RGBA16F)?n:a.RGBA;a.texImage2D(a.TEXTURE_2D,0,l,t,r,0,a.RGBA,s,null);let c=e.createFramebuffer(t,r,!1,!1);return c.colorAttachment.set(o),c}function im(e,r){return r.colorRampTexture||(r.colorRampTexture=new t.T(e,r.colorRamp,e.gl.RGBA)),r.colorRampTexture}function ig(e,r,i,n,a,o,s,l){let c=256;if(a.stepInterpolant){let n=r.getSource().maxzoom,a=s.canonical.z===n?Math.ceil(1<e.options.anisotropicFilterPitch&&m.texParameterf(m.TEXTURE_2D,p.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,p.extTextureFilterAnisotropicMax);let I=null==(d=e.style.map.terrain)?void 0:d.getTerrainData(A),z=y.getProjectionData({overscaledTileID:A,aligned:_,applyGlobeMatrix:!h,applyTerrainMatrix:!0}),D=rw(L,C,P.fadeMix,i,l),O=x.getMeshFromTileID(p,A.canonical,o,s,"raster");g.draw(p,m.TRIANGLES,n,a?a[A.overscaledZ]:tA.disabled,b,c?tM.frontCCW:tM.backCCW,D,I,z,i.id,O.vertexBuffer,O.indexBuffer,O.segments)}}let ik=new t.bo(1,0,0,1),iA=new t.bo(0,1,0,1),iS=new t.bo(0,0,1,1),iE=new t.bo(1,0,1,1),iC=new t.bo(0,1,1,1);function iL(e,t,r,i){iI(e,0,t+r/2,e.transform.width,r,i)}function iP(e,t,r,i){iI(e,t-r/2,0,r,e.transform.height,i)}function iI(e,t,r,i,n,a){let o=e.context,s=o.gl;s.enable(s.SCISSOR_TEST),s.scissor(t*e.pixelRatio,r*e.pixelRatio,i*e.pixelRatio,n*e.pixelRatio),o.clear({color:a}),s.disable(s.SCISSOR_TEST)}function iz(e,t,r,i){let{isRenderingGlobe:n}=i,a=e.context,o=a.gl,s=e.transform,l=e.colorModeForRenderPass(),c=e.getDepthModeFor3D(),u=e.useProgram("terrain");for(let i of(a.bindFramebuffer.set(null),a.viewport.set([0,0,e.width,e.height]),r)){let r=t.getTerrainMesh(i.tileID),h=e.renderToTexture.getTexture(i),d=t.getTerrainData(i.tileID);a.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,h.texture);let f=t6(t.getMeshFrameDelta(s.zoom),s.calculateFogMatrix(i.tileID.toUnwrapped()),e.style.sky,s.pitch,n),p=s.getProjectionData({overscaledTileID:i.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});u.draw(a,o.TRIANGLES,c,tA.disabled,l,tM.backCCW,f,d,p,"terrain",r.vertexBuffer,r.indexBuffer,r.segments)}}function iD(e,r){if(!r.mesh){let i=new t.aU;i.emplaceBack(-1,-1),i.emplaceBack(1,-1),i.emplaceBack(1,1),i.emplaceBack(-1,1);let n=new t.aW;n.emplaceBack(0,1,2),n.emplaceBack(0,2,3),r.mesh=new to(e.createVertexBuffer(i,ts.members),e.createIndexBuffer(n),t.aV.simpleSegment(0,0,i.length,n.length))}return r.mesh}let iO={symbol:function(e,r,i,n,a,o){if("translucent"!==e.renderPass)return;let{isRenderingToTexture:s}=o,l=tA.disabled,c=e.colorModeForRenderPass();(i._unevaluatedLayout.hasValue("text-variable-anchor")||i._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(e,r,i,n,a,o,s,l,c){var u;let h=r.transform,d=r.style.map.terrain,f="map"===a,p="map"===o;for(let a of e){let e=n.getTile(a),o=e.getBucket(i);if(!(null!=(u=o?.text)&&u.segments.get().length))continue;let m=t.aw(o.textSizeData,h.zoom),g=t.aK(e,1,r.transform.zoom),y=ez(f,r.transform,g),v="none"!==i.layout.get("icon-text-fit")&&o.hasIconData();if(m){let r=Math.pow(2,h.zoom-e.tileID.overscaledZ),i=d?(e,t)=>d.getElevation(a,e,t):null;!function(e,r,i,n,a,o,s,l,c,u,h,d){let f=e.text.placedSymbolArray,p=e.text.dynamicLayoutVertexArray,m=e.icon.dynamicLayoutVertexArray,g={};p.clear();for(let m=0;m=0&&(g[y.associatedIconIndex]={shiftedAnchor:E,angle:C})}else eY(y.numGlyphs,p)}if(c){m.clear();let r=e.icon.placedSymbolArray;for(let e=0;ee.sortKey-t.sortKey),v)){let{programConfiguration:r,program:n,layoutVertexBuffer:a,indexBuffer:o,uniformValues:s,terrainData:l,projectionData:c}=t.state;n.draw(d,f.TRIANGLES,m,g,y,tM.backCCW,s,l,c,i.id,a,o,t.segments,i.paint,e.transform.zoom,r)}},heatmap:function(e,r,i,n,a){if(0===i.paint.get("heatmap-opacity"))return;let o=e.context,{isRenderingToTexture:s,isRenderingGlobe:l}=a;if(e.style.map.terrain){for(let a of n){let n=r.getTile(a);r.hasRenderableParent(a)||("offscreen"===e.renderPass?function(e,r,i,n,a){let o=e.context,s=o.gl,l=tA.disabled,c=new tT([s.ONE,s.ONE],t.bo.transparent,[!0,!0,!0,!0]),u=r.getBucket(i);if(!u)return;let h=n.key,d=i.heatmapFbos.get(h);d||(d=ip(o,r.tileSize,r.tileSize),i.heatmapFbos.set(h,d)),o.bindFramebuffer.set(d.framebuffer),o.viewport.set([0,0,r.tileSize,r.tileSize]),o.clear({color:t.bo.transparent});let f=u.programConfigurations.get(i.id),p=e.useProgram("heatmap",f,!a),m=e.transform.getProjectionData({overscaledTileID:r.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),g=e.style.map.terrain.getTerrainData(n);p.draw(o,s.TRIANGLES,tk.disabled,l,c,tM.disabled,ru(r,e.transform.zoom,i.paint.get("heatmap-intensity"),1),g,m,i.id,u.layoutVertexBuffer,u.indexBuffer,u.segments,i.paint,e.transform.zoom,f)}(e,n,i,a,l):"translucent"===e.renderPass&&function(e,t,r,i,n){let a=e.context,o=a.gl,s=e.transform;a.setColorMode(e.colorModeForRenderPass());let l=im(a,t),c=r.key,u=t.heatmapFbos.get(c);if(!u)return;a.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,u.colorAttachment.get()),a.activeTexture.set(o.TEXTURE1),l.bind(o.LINEAR,o.CLAMP_TO_EDGE);let h=s.getProjectionData({overscaledTileID:r,applyTerrainMatrix:n,applyGlobeMatrix:!i});e.useProgram("heatmapTexture").draw(a,o.TRIANGLES,tk.disabled,tA.disabled,e.colorModeForRenderPass(),tM.disabled,rh(e,t,0,1),null,h,t.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments,t.paint,s.zoom),u.destroy(),t.heatmapFbos.delete(c)}(e,i,a,s,l))}o.viewport.set([0,0,e.width,e.height])}else{let a,o,s;"offscreen"===e.renderPass?function(e,r,i,n){let a,o,s=e.context,l=s.gl,c=e.transform,u=tA.disabled,h=new tT([l.ONE,l.ONE],t.bo.transparent,[!0,!0,!0,!0]);for(let d of(a=s.gl,s.activeTexture.set(a.TEXTURE1),s.viewport.set([0,0,e.width/4,e.height/4]),(o=i.heatmapFbos.get(t.cd))?(a.bindTexture(a.TEXTURE_2D,o.colorAttachment.get()),s.bindFramebuffer.set(o.framebuffer)):(o=ip(s,e.width/4,e.height/4),i.heatmapFbos.set(t.cd,o)),s.clear({color:t.bo.transparent}),n)){if(r.hasRenderableParent(d))continue;let t=r.getTile(d),n=t.getBucket(i);if(!n)continue;let a=n.programConfigurations.get(i.id),o=e.useProgram("heatmap",a),f=c.getProjectionData({overscaledTileID:d,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),p=c.getCircleRadiusCorrection();o.draw(s,l.TRIANGLES,tk.disabled,u,h,tM.backCCW,ru(t,c.zoom,i.paint.get("heatmap-intensity"),p),null,f,i.id,n.layoutVertexBuffer,n.indexBuffer,n.segments,i.paint,c.zoom,a)}s.viewport.set([0,0,e.width,e.height])}(e,r,i,n):"translucent"===e.renderPass&&(o=(a=e.context).gl,a.setColorMode(e.colorModeForRenderPass()),(s=i.heatmapFbos.get(t.cd))&&(a.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,s.colorAttachment.get()),a.activeTexture.set(o.TEXTURE1),im(a,i).bind(o.LINEAR,o.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(a,o.TRIANGLES,tk.disabled,tA.disabled,e.colorModeForRenderPass(),tM.disabled,rh(e,i,0,1),null,null,i.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,i.paint,e.transform.zoom)))}},line:function(e,t,r,i,n){var a;if("translucent"!==e.renderPass)return;let{isRenderingToTexture:o}=n,s=r.paint.get("line-opacity"),l=r.paint.get("line-width");if(0===s.constantOr(1)||0===l.constantOr(1))return;let c=e.getDepthModeForSublayer(0,tk.ReadOnly),u=e.colorModeForRenderPass(),h=r.paint.get("line-dasharray"),d=h.constantOr(1),f=r.paint.get("line-pattern"),p=f.constantOr(1),m=r.paint.get("line-gradient"),g=r.getCrossfadeParameters(),y;y=p?"linePattern":d&&m?"lineGradientSDF":d?"lineSDF":m?"lineGradient":"line";let v=e.context,x=v.gl,b=e.transform,_=!0;for(let n of i){let i=t.getTile(n);if(p&&!i.patternsLoaded())continue;let s=i.getBucket(r);if(!s)continue;let l=s.programConfigurations.get(r.id),w=e.context.program.get(),T=e.useProgram(y,l),M=_||T.program!==w,k=null==(a=e.style.map.terrain)?void 0:a.getTerrainData(n),A=f.constantOr(null),S=h?.constantOr(null);if(A&&i.imageAtlas){let e=i.imageAtlas,t=e.patternPositions[A.to.toString()],r=e.patternPositions[A.from.toString()];t&&r&&l.setConstantPatternPositions(t,r)}else if(S){let t="round"===r.layout.get("line-cap").constantOr(null),i=e.lineAtlas.getDash(S.to,t),n=e.lineAtlas.getDash(S.from,t);l.setConstantDashPositions(i,n)}let E=b.getProjectionData({overscaledTileID:n,applyGlobeMatrix:!o,applyTerrainMatrix:!0}),C=b.getPixelScale(),L;p?(L=ry(e,i,r,C,g),v.activeTexture.set(x.TEXTURE0),i.imageAtlasTexture.bind(x.LINEAR,x.CLAMP_TO_EDGE),l.updatePaintBuffers(g)):d&&m?(L=rx(e,i,r,C,g,s.lineClipsArray.length),function(e,t,r,i,n,a,o,s,l){let c=a.gradients[n.id],u=c.texture;n.gradientVersion!==c.version&&(u=ig(e,t,r,i,n,a,o,c)),r.activeTexture.set(i.TEXTURE0),u.bind(n.stepInterpolant?i.NEAREST:i.LINEAR,i.CLAMP_TO_EDGE),r.activeTexture.set(i.TEXTURE1),e.lineAtlas.bind(r),s.updatePaintBuffers(l)}(e,t,v,x,r,s,n,l,g)):d?(L=rv(e,i,r,C,g),(M||e.lineAtlas.dirty)&&(v.activeTexture.set(x.TEXTURE0),e.lineAtlas.bind(v)),l.updatePaintBuffers(g)):m?(L=rg(e,i,r,C,s.lineClipsArray.length),function(e,t,r,i,n,a,o){let s=a.gradients[n.id],l=s.texture;n.gradientVersion!==s.version&&(l=ig(e,t,r,i,n,a,o,s)),r.activeTexture.set(i.TEXTURE0),l.bind(n.stepInterpolant?i.NEAREST:i.LINEAR,i.CLAMP_TO_EDGE)}(e,t,v,x,r,s,n)):L=rm(e,i,r,C);let P=e.stencilModeForClipping(n);T.draw(v,x.TRIANGLES,c,P,u,tM.disabled,L,k,E,r.id,s.layoutVertexBuffer,s.indexBuffer,s.segments,r.paint,e.transform.zoom,l,s.layoutVertexBuffer2),_=!1}},fill:function(e,r,i,n,a){let o=i.paint.get("fill-color"),s=i.paint.get("fill-opacity");if(0===s.constantOr(1))return;let{isRenderingToTexture:l}=a,c=e.colorModeForRenderPass(),u=i.paint.get("fill-pattern"),h=e.opaquePassEnabledForLayer()&&!u.constantOr(1)&&1===o.constantOr(t.bo.transparent).a&&1===s.constantOr(0)?"opaque":"translucent";if(e.renderPass===h){let t=e.getDepthModeForSublayer(1,"opaque"===e.renderPass?tk.ReadWrite:tk.ReadOnly);iv(e,r,i,n,t,c,!1,l)}if("translucent"===e.renderPass&&i.paint.get("fill-antialias")){let t=e.getDepthModeForSublayer(2*!!i.getPaintProperty("fill-outline-color"),tk.ReadOnly);iv(e,r,i,n,t,c,!0,l)}},fillExtrusion:function(e,t,r,i,n){let a=r.paint.get("fill-extrusion-opacity");if(0===a)return;let{isRenderingToTexture:o}=n;if("translucent"===e.renderPass){let n=new tk(e.context.gl.LEQUAL,tk.ReadWrite,e.depthRangeFor3D);if(1!==a||r.paint.get("fill-extrusion-pattern").constantOr(1))ix(e,t,r,i,n,tA.disabled,tT.disabled,o),ix(e,t,r,i,n,e.stencilModeFor3D(),e.colorModeForRenderPass(),o);else{let a=e.colorModeForRenderPass();ix(e,t,r,i,n,tA.disabled,a,o)}}},hillshade:function(e,r,i,n,a){if("offscreen"!==e.renderPass&&"translucent"!==e.renderPass)return;let{isRenderingToTexture:o}=a,s=e.context,l=e.style.projection.useSubdivision,c=e.getDepthModeForSublayer(0,tk.ReadOnly),u=e.colorModeForRenderPass();if("offscreen"===e.renderPass)(function(e,r,i,n,a,o,s){let l=e.context,c=l.gl,u="nearest"===n.paint.get("resampling")?c.NEAREST:c.LINEAR;for(let h of i){let i=r.getTile(h),d=i.dem;if(!d?.data||!i.needsHillshadePrepare)continue;let f=d.dim,p=d.stride,m=d.getPixels();if(l.activeTexture.set(c.TEXTURE1),l.pixelStoreUnpackPremultiplyAlpha.set(!1),i.demTexture||(i.demTexture=e.getTileTexture(p)),i.demTexture){let e=i.demTexture;e.update(m,{premultiply:!1}),e.bind(c.NEAREST,c.CLAMP_TO_EDGE)}else i.demTexture=new t.T(l,m,c.RGBA,{premultiply:!1}),i.demTexture.bind(c.NEAREST,c.CLAMP_TO_EDGE);l.activeTexture.set(c.TEXTURE0);let g=i.fbo;if(!g){let e=new t.T(l,{width:f,height:f,data:null},c.RGBA);e.bind(u,c.CLAMP_TO_EDGE),(g=i.fbo=l.createFramebuffer(f,f,!0,!1)).colorAttachment.set(e.texture)}l.bindFramebuffer.set(g.framebuffer),l.viewport.set([0,0,f,f]),e.useProgram("hillshadePrepare").draw(l,c.TRIANGLES,a,o,s,tM.disabled,rf(i.tileID,d),null,null,n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),i.needsHillshadePrepare=!1}})(e,r,n,i,c,tA.disabled,u),s.viewport.set([0,0,e.width,e.height]);else if("translucent"===e.renderPass)if(l){let[t,a,s]=e.stencilConfigForOverlapTwoPass(n);ib(e,r,i,s,t,c,u,!1,o),ib(e,r,i,s,a,c,u,!0,o)}else{let[t,a]=e.getStencilConfigForOverlapAndUpdateStencilID(n);ib(e,r,i,a,t,c,u,!1,o)}},colorRelief:function(e,t,r,i,n){if("translucent"!==e.renderPass||!i.length)return;let{isRenderingToTexture:a}=n,o=e.style.projection.useSubdivision,s=e.getDepthModeForSublayer(0,tk.ReadOnly),l=e.colorModeForRenderPass();if(o){let[n,o,c]=e.stencilConfigForOverlapTwoPass(i);iw(e,t,r,c,n,s,l,!1,a),iw(e,t,r,c,o,s,l,!0,a)}else{let[n,o]=e.getStencilConfigForOverlapAndUpdateStencilID(i);iw(e,t,r,o,n,s,l,!1,a)}},raster:function(e,t,r,i,n){if("translucent"!==e.renderPass||0===r.paint.get("raster-opacity")||!i.length)return;let{isRenderingToTexture:a}=n,o=t.getSource(),s=e.style.projection.useSubdivision;if(o instanceof et)iM(e,t,r,i,null,!1,!1,o.tileCoords,o.flippedWindingOrder,a);else if(s){let[n,o,s]=e.stencilConfigForOverlapTwoPass(i);iM(e,t,r,s,n,!1,!0,iT,!1,a),iM(e,t,r,s,o,!0,!0,iT,!1,a)}else{let[n,o]=e.getStencilConfigForOverlapAndUpdateStencilID(i);iM(e,t,r,o,n,!1,!0,iT,!1,a)}},background:function(e,t,r,i,n){var a;let o=r.paint.get("background-color"),s=r.paint.get("background-opacity");if(0===s)return;let{isRenderingToTexture:l}=n,c=e.context,u=c.gl,h=e.style.projection,d=e.transform,f=d.tileSize,p=r.paint.get("background-pattern");if(e.isPatternMissing(p))return;let m=!p&&1===o.a&&1===s&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass!==m)return;let g=tA.disabled,y=e.getDepthModeForSublayer(0,"opaque"===m?tk.ReadWrite:tk.ReadOnly),v=e.colorModeForRenderPass(),x=e.useProgram(p?"backgroundPattern":"background"),b=i||ew(d,{tileSize:f,terrain:e.style.map.terrain});p&&(c.activeTexture.set(u.TEXTURE0),e.imageManager.bind(e.context));let _=r.getCrossfadeParameters();for(let t of b){let i=d.getProjectionData({overscaledTileID:t,applyGlobeMatrix:!l,applyTerrainMatrix:!0}),n=p?rS(s,e,p,{tileID:t,tileSize:f},_):rA(s,o),m=null==(a=e.style.map.terrain)?void 0:a.getTerrainData(t),b=h.getMeshFromTileID(c,t.canonical,!1,!0,"raster");x.draw(c,u.TRIANGLES,y,g,v,tM.backCCW,n,m,i,r.id,b.vertexBuffer,b.indexBuffer,b.segments)}},sky:function(e,t){var r,i;let n,a,o,s,l=e.context,c=l.gl,u=(r=e.style.map.transform,i=e.pixelRatio,n=Math.cos(r.rollInRadians),a=Math.sin(r.rollInRadians),o=ep(r),s=r.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition,{u_sky_color:t.properties.get("sky-color"),u_horizon_color:t.properties.get("horizon-color"),u_horizon:[(r.width/2-o*a)*i,(r.height/2+o*n)*i],u_horizon_normal:[-a,n],u_sky_horizon_blend:t.properties.get("sky-horizon-blend")*r.height/2*i,u_sky_blend:s}),h=new tk(c.LEQUAL,tk.ReadWrite,[0,1]),d=tA.disabled,f=e.colorModeForRenderPass(),p=e.useProgram("sky"),m=iD(l,t);p.draw(l,c.TRIANGLES,h,d,f,tM.disabled,u,null,void 0,"sky",m.vertexBuffer,m.indexBuffer,m.segments)},atmosphere:function(e,r,i){var n;let a,o,s,l=e.context,c=l.gl,u=e.useProgram("atmosphere"),h=new tk(c.LEQUAL,tk.ReadOnly,[0,1]),d=e.transform,f=(n=e.transform,o=[-(a=i.properties.get("position")).x,-a.y,-a.z],s=t.ap(new Float64Array(16)),"map"===i.properties.get("anchor")&&(t.be(s,s,n.rollInRadians),t.bf(s,s,-n.pitchInRadians),t.be(s,s,n.bearingInRadians),t.bf(s,s,n.center.lat*Math.PI/180),t.bI(s,s,-n.center.lng*Math.PI/180)),t.cg(o,o,s),o),p=d.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),m=r.properties.get("atmosphere-blend")*p.projectionTransition;if(0===m)return;let g=tj(d.worldSize,d.center.lat),y=d.inverseProjectionMatrix,v=new Float64Array(4);v[3]=1,t.aE(v,v,d.modelViewProjectionMatrix),v[0]/=v[3],v[1]/=v[3],v[2]/=v[3],v[3]=1,t.aE(v,v,y),v[0]/=v[3],v[1]/=v[3],v[2]/=v[3],v[3]=1;let x={u_sun_pos:f,u_atmosphere_blend:m,u_globe_position:[v[0],v[1],v[2]],u_globe_radius:g,u_inv_proj_matrix:y},b=iD(l,r);u.draw(l,c.TRIANGLES,h,tA.disabled,tT.alphaBlended,tM.disabled,x,null,null,"atmosphere",b.vertexBuffer,b.indexBuffer,b.segments)},custom:function(e,t,r,i){let{isRenderingGlobe:n}=i,a=e.context,o=r.implementation,s=e.style.projection,l=e.transform,c=l.getProjectionDataForCustomLayer(n),u={farZ:l.farZ,nearZ:l.nearZ,fov:l.fov*Math.PI/180,modelViewProjectionMatrix:l.modelViewProjectionMatrix,projectionMatrix:l.projectionMatrix,shaderData:{variantName:s.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; +`);tS(u)||(_=function(e){return e.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(_),w=function(e){return e.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(w));let T=u.createShader(u.FRAGMENT_SHADER);if(u.isContextLost())return void(this.failedToCreate=!0);if(u.shaderSource(T,_),u.compileShader(T),!u.getShaderParameter(T,u.COMPILE_STATUS))throw Error(`Could not compile fragment shader: ${u.getShaderInfoLog(T)}`);u.attachShader(this.program,T);let M=u.createShader(u.VERTEX_SHADER);if(u.isContextLost())return void(this.failedToCreate=!0);if(u.shaderSource(M,w),u.compileShader(M),!u.getShaderParameter(M,u.COMPILE_STATUS))throw Error(`Could not compile vertex shader: ${u.getShaderInfoLog(M)}`);u.attachShader(this.program,M),this.attributes={};let k={};this.numAttributes=f.length;for(let e=0;e({u_depth:new t.b_(e,r.u_depth),u_terrain:new t.b_(e,r.u_terrain),u_terrain_dim:new t.bp(e,r.u_terrain_dim),u_terrain_matrix:new t.c0(e,r.u_terrain_matrix),u_terrain_unpack:new t.c1(e,r.u_terrain_unpack),u_terrain_exaggeration:new t.bp(e,r.u_terrain_exaggeration)}))(e,k),this.projectionUniforms=((e,r)=>({u_projection_matrix:new t.c0(e,r.u_projection_matrix),u_projection_tile_mercator_coords:new t.c1(e,r.u_projection_tile_mercator_coords),u_projection_clipping_plane:new t.c1(e,r.u_projection_clipping_plane),u_projection_transition:new t.bp(e,r.u_projection_transition),u_projection_fallback_matrix:new t.c0(e,r.u_projection_fallback_matrix)}))(e,k),this.binderUniforms=i?i.getUniforms(e,k):[]}draw(e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v){var x;let b=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(r),e.setStencilMode(i),e.setColorMode(n),e.setCullFace(a),s)for(let t in e.activeTexture.set(b.TEXTURE2),b.bindTexture(b.TEXTURE_2D,s.depthTexture),e.activeTexture.set(b.TEXTURE3),b.bindTexture(b.TEXTURE_2D,s.texture),this.terrainUniforms)this.terrainUniforms[t].set(s[t]);if(l)for(let e in l)this.projectionUniforms[t8[e]].set(l[e]);if(o)for(let e in this.fixedUniforms)this.fixedUniforms[e].set(o[e]);m&&m.setUniforms(e,this.binderUniforms,f,{zoom:p});let _=0;switch(t){case b.LINES:_=2;break;case b.TRIANGLES:_=3;break;case b.LINE_STRIP:_=1}for(let r of d.get())r.vaos||(r.vaos={}),(x=r.vaos)[c]||(x[c]=new t4),r.vaos[c].bind(e,this,u,m?m.getPaintVertexBuffers():[],h,r.vertexOffset,g,y,v),b.drawElements(t,r.primitiveLength*_,b.UNSIGNED_SHORT,r.primitiveOffset*_*2)}}function re(e,r,i){let n=1/t.aK(i,1,r.transform.tileZoom),a=Math.pow(2,i.tileID.overscaledZ),o=i.tileSize*Math.pow(2,r.transform.tileZoom)/a,s=o*(i.tileID.canonical.x+i.tileID.wrap*a),l=o*i.tileID.canonical.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[n,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[s>>16,l>>16],u_pixel_coord_lower:[65535&s,65535&l]}}let rt=(e,r,i,n)=>{let a=e.style.light,o=a.properties.get("position"),s=[o.x,o.y,o.z],l=t.c4();"viewport"===a.properties.get("anchor")&&t.c5(l,e.transform.bearingInRadians),t.c6(s,s,l);let c=e.transform.transformLightDirection(s),u=a.properties.get("color");return{u_lightpos:s,u_lightpos_globe:c,u_lightintensity:a.properties.get("intensity"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+r,u_opacity:i,u_fill_translate:n}},rr=(e,r,i,n,a,o,s)=>t.e(rt(e,r,i,n),re(o,e,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8}),ri=(e,r,i,n)=>t.e(re(r,e,i),{u_fill_translate:n}),rn=(e,t)=>({u_world:e,u_fill_translate:t}),ra=(e,r,i,n,a)=>t.e(ri(e,r,i,a),{u_world:n}),ro=(e,r,i,n,a)=>{let o=e.transform,s,l,c=0;if("map"===i.paint.get("circle-pitch-alignment")){let e=t.aK(r,1,o.zoom);s=!0,l=[e,e],c=e/(t.a6*Math.pow(2,r.tileID.overscaledZ))*2*Math.PI*a}else s=!1,l=o.pixelsToGLUnits;return{u_camera_to_center_distance:o.cameraToCenterDistance,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_pitch_with_map:+s,u_device_pixel_ratio:e.pixelRatio,u_extrude_scale:l,u_globe_extrude_scale:c,u_translate:n}},rs=e=>({u_pixel_extrude_scale:[1/e.width,1/e.height]}),rl=e=>({u_viewport_size:[e.width,e.height]}),rc=(e,t=1)=>({u_color:e,u_overlay:0,u_overlay_scale:t}),ru=(e,r,i,n)=>{let a=t.aK(e,1,r)/(t.a6*Math.pow(2,e.tileID.overscaledZ))*2*Math.PI*n;return{u_extrude_scale:t.aK(e,1,r),u_intensity:i,u_globe_extrude_scale:a}},rh=(e,r,i,n)=>{let a=t.O();t.c7(a,0,e.width,e.height,0,0,1);let o=e.context.gl;return{u_matrix:a,u_world:[o.drawingBufferWidth,o.drawingBufferHeight],u_image:i,u_color_ramp:n,u_opacity:r.paint.get("heatmap-opacity")}},rd=(e,r,i)=>{var n;let a,o,s=i.paint.get("hillshade-accent-color"),l;switch(i.paint.get("hillshade-method")){case"basic":l=4;break;case"combined":l=1;break;case"igor":l=2;break;case"multidirectional":l=3;break;default:l=0}let c=i.getIlluminationProperties();for(let t=0;t{let i=r.stride,n=t.O();return t.c7(n,0,t.a6,-t.a6,0,0,1),t.Q(n,n,[0,-t.a6,0]),{u_matrix:n,u_image:1,u_dimension:[i,i],u_zoom:e.overscaledZ,u_unpack:r.getUnpackVector()}},rp=(e,t,r=0)=>({u_image:0,u_unpack:t.getUnpackVector(),u_dimension:[t.stride,t.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:r,u_opacity:e.paint.get("color-relief-opacity")}),rm=(e,r,i,n)=>{let a=e.transform;return{u_translation:r_(e,r,i),u_ratio:n/t.aK(r,1,a.zoom),u_device_pixel_ratio:e.pixelRatio,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},rg=(e,r,i,n,a)=>t.e(rm(e,r,i,n),{u_image:0,u_image_height:a}),ry=(e,r,i,n,a)=>{let o=e.transform,s=rb(r,o);return{u_translation:r_(e,r,i),u_texsize:r.imageAtlasTexture.size,u_ratio:n/t.aK(r,1,o.zoom),u_device_pixel_ratio:e.pixelRatio,u_image:0,u_scale:[s,a.fromScale,a.toScale],u_fade:a.t,u_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},rv=(e,r,i,n,a)=>{let o=rb(r,e.transform);return t.e(rm(e,r,i,n),{u_tileratio:o,u_crossfade_from:a.fromScale,u_crossfade_to:a.toScale,u_image:0,u_mix:a.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})},rx=(e,r,i,n,a,o)=>{let s=rb(r,e.transform);return t.e(rm(e,r,i,n),{u_image:0,u_image_height:o,u_tileratio:s,u_crossfade_from:a.fromScale,u_crossfade_to:a.toScale,u_image_dash:1,u_mix:a.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})};function rb(e,r){return 1/t.aK(e,1,r.tileZoom)}function r_(e,r,i){return t.aL(e.transform,r,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"))}let rw=(e,t,r,i,n)=>{var a,o,s;let l,c;return{u_tl_parent:e,u_scale_parent:t,u_buffer_scale:1,u_fade_t:r.mix,u_opacity:r.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:(a=i.paint.get("raster-saturation"))>0?1-1/(1.001-a):-a,u_contrast_factor:(o=i.paint.get("raster-contrast"))>0?1/(1-o):1+o,u_spin_weights:(l=Math.sin(s=i.paint.get("raster-hue-rotate")*(Math.PI/180)),[(2*(c=Math.cos(s))+1)/3,(-Math.sqrt(3)*l-c+1)/3,(Math.sqrt(3)*l-c+1)/3]),u_coords_top:[n[0].x,n[0].y,n[1].x,n[1].y],u_coords_bottom:[n[3].x,n[3].y,n[2].x,n[2].y]}},rT=(e,t,r,i,n,a,o,s,l,c,u,h,d)=>{let f=o.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:f.cameraToCenterDistance,u_pitch:f.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:f.width/f.height,u_fade_change:o.options.fadeDuration?o.symbolFadeChange:1,u_label_plane_matrix:s,u_coord_matrix:l,u_is_text:+u,u_pitch_with_map:+i,u_is_along_line:n,u_is_variable_anchor:a,u_texsize:h,u_texture:0,u_translation:c,u_pitched_scale:d}},rM=(e,r,i,n,a,o,s,l,c,u,h,d,f,p)=>{let m=s.transform;return t.e(rT(e,r,i,n,a,o,s,l,c,u,h,d,p),{u_gamma_scale:n?Math.cos(m.pitch*Math.PI/180)*m.cameraToCenterDistance:1,u_device_pixel_ratio:s.pixelRatio,u_is_halo:+!!f,u_is_plain:1})},rk=(e,r,i,n,a,o,s,l,c,u,h,d,f)=>t.e(rM(e,r,i,n,a,o,s,l,c,u,!0,h,!0,f),{u_texsize_icon:d,u_texture_icon:1}),rA=(e,t)=>({u_opacity:e,u_color:t}),rS=(e,r,i,n,a)=>t.e(function(e,r,i,n){let a=i.imageManager.getPattern(e.from.toString()),o=i.imageManager.getPattern(e.to.toString()),{width:s,height:l}=i.imageManager.getPixelSize(),c=Math.pow(2,n.tileID.overscaledZ),u=n.tileSize*Math.pow(2,i.transform.tileZoom)/c,h=u*(n.tileID.canonical.x+n.tileID.wrap*c),d=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:a.tl,u_pattern_br_a:a.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,l],u_mix:r.t,u_pattern_size_a:a.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:r.fromScale,u_scale_b:r.toScale,u_tile_units_to_pixels:1/t.aK(n,1,i.transform.tileZoom),u_pixel_coord_upper:[h>>16,d>>16],u_pixel_coord_lower:[65535&h,65535&d]}}(i,a,r,n),{u_opacity:e}),rE=(e,t)=>{},rC={fillExtrusion:(e,r)=>({u_lightpos:new t.c2(e,r.u_lightpos),u_lightpos_globe:new t.c2(e,r.u_lightpos_globe),u_lightintensity:new t.bp(e,r.u_lightintensity),u_lightcolor:new t.c2(e,r.u_lightcolor),u_vertical_gradient:new t.bp(e,r.u_vertical_gradient),u_opacity:new t.bp(e,r.u_opacity),u_fill_translate:new t.c3(e,r.u_fill_translate)}),fillExtrusionPattern:(e,r)=>({u_lightpos:new t.c2(e,r.u_lightpos),u_lightpos_globe:new t.c2(e,r.u_lightpos_globe),u_lightintensity:new t.bp(e,r.u_lightintensity),u_lightcolor:new t.c2(e,r.u_lightcolor),u_vertical_gradient:new t.bp(e,r.u_vertical_gradient),u_height_factor:new t.bp(e,r.u_height_factor),u_opacity:new t.bp(e,r.u_opacity),u_fill_translate:new t.c3(e,r.u_fill_translate),u_image:new t.b_(e,r.u_image),u_texsize:new t.c3(e,r.u_texsize),u_pixel_coord_upper:new t.c3(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,r.u_pixel_coord_lower),u_scale:new t.c2(e,r.u_scale),u_fade:new t.bp(e,r.u_fade)}),fill:(e,r)=>({u_fill_translate:new t.c3(e,r.u_fill_translate)}),fillPattern:(e,r)=>({u_image:new t.b_(e,r.u_image),u_texsize:new t.c3(e,r.u_texsize),u_pixel_coord_upper:new t.c3(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,r.u_pixel_coord_lower),u_scale:new t.c2(e,r.u_scale),u_fade:new t.bp(e,r.u_fade),u_fill_translate:new t.c3(e,r.u_fill_translate)}),fillOutline:(e,r)=>({u_world:new t.c3(e,r.u_world),u_fill_translate:new t.c3(e,r.u_fill_translate)}),fillOutlinePattern:(e,r)=>({u_world:new t.c3(e,r.u_world),u_image:new t.b_(e,r.u_image),u_texsize:new t.c3(e,r.u_texsize),u_pixel_coord_upper:new t.c3(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,r.u_pixel_coord_lower),u_scale:new t.c2(e,r.u_scale),u_fade:new t.bp(e,r.u_fade),u_fill_translate:new t.c3(e,r.u_fill_translate)}),circle:(e,r)=>({u_camera_to_center_distance:new t.bp(e,r.u_camera_to_center_distance),u_scale_with_map:new t.b_(e,r.u_scale_with_map),u_pitch_with_map:new t.b_(e,r.u_pitch_with_map),u_extrude_scale:new t.c3(e,r.u_extrude_scale),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_globe_extrude_scale:new t.bp(e,r.u_globe_extrude_scale),u_translate:new t.c3(e,r.u_translate)}),collisionBox:(e,r)=>({u_pixel_extrude_scale:new t.c3(e,r.u_pixel_extrude_scale)}),collisionCircle:(e,r)=>({u_viewport_size:new t.c3(e,r.u_viewport_size)}),debug:(e,r)=>({u_color:new t.b$(e,r.u_color),u_overlay:new t.b_(e,r.u_overlay),u_overlay_scale:new t.bp(e,r.u_overlay_scale)}),depth:rE,clippingMask:rE,heatmap:(e,r)=>({u_extrude_scale:new t.bp(e,r.u_extrude_scale),u_intensity:new t.bp(e,r.u_intensity),u_globe_extrude_scale:new t.bp(e,r.u_globe_extrude_scale)}),heatmapTexture:(e,r)=>({u_matrix:new t.c0(e,r.u_matrix),u_world:new t.c3(e,r.u_world),u_image:new t.b_(e,r.u_image),u_color_ramp:new t.b_(e,r.u_color_ramp),u_opacity:new t.bp(e,r.u_opacity)}),hillshade:(e,r)=>({u_image:new t.b_(e,r.u_image),u_latrange:new t.c3(e,r.u_latrange),u_exaggeration:new t.bp(e,r.u_exaggeration),u_altitudes:new t.c9(e,r.u_altitudes),u_azimuths:new t.c9(e,r.u_azimuths),u_accent:new t.b$(e,r.u_accent),u_method:new t.b_(e,r.u_method),u_shadows:new t.c8(e,r.u_shadows),u_highlights:new t.c8(e,r.u_highlights)}),hillshadePrepare:(e,r)=>({u_matrix:new t.c0(e,r.u_matrix),u_image:new t.b_(e,r.u_image),u_dimension:new t.c3(e,r.u_dimension),u_zoom:new t.bp(e,r.u_zoom),u_unpack:new t.c1(e,r.u_unpack)}),colorRelief:(e,r)=>({u_image:new t.b_(e,r.u_image),u_unpack:new t.c1(e,r.u_unpack),u_dimension:new t.c3(e,r.u_dimension),u_elevation_stops:new t.b_(e,r.u_elevation_stops),u_color_stops:new t.b_(e,r.u_color_stops),u_color_ramp_size:new t.b_(e,r.u_color_ramp_size),u_opacity:new t.bp(e,r.u_opacity)}),line:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels)}),lineGradient:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels),u_image:new t.b_(e,r.u_image),u_image_height:new t.bp(e,r.u_image_height)}),linePattern:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_texsize:new t.c3(e,r.u_texsize),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_image:new t.b_(e,r.u_image),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels),u_scale:new t.c2(e,r.u_scale),u_fade:new t.bp(e,r.u_fade)}),lineSDF:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels),u_image:new t.b_(e,r.u_image),u_mix:new t.bp(e,r.u_mix),u_tileratio:new t.bp(e,r.u_tileratio),u_crossfade_from:new t.bp(e,r.u_crossfade_from),u_crossfade_to:new t.bp(e,r.u_crossfade_to),u_lineatlas_width:new t.bp(e,r.u_lineatlas_width),u_lineatlas_height:new t.bp(e,r.u_lineatlas_height)}),lineGradientSDF:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels),u_image:new t.b_(e,r.u_image),u_image_height:new t.bp(e,r.u_image_height),u_tileratio:new t.bp(e,r.u_tileratio),u_crossfade_from:new t.bp(e,r.u_crossfade_from),u_crossfade_to:new t.bp(e,r.u_crossfade_to),u_image_dash:new t.b_(e,r.u_image_dash),u_mix:new t.bp(e,r.u_mix),u_lineatlas_width:new t.bp(e,r.u_lineatlas_width),u_lineatlas_height:new t.bp(e,r.u_lineatlas_height)}),raster:(e,r)=>({u_tl_parent:new t.c3(e,r.u_tl_parent),u_scale_parent:new t.bp(e,r.u_scale_parent),u_buffer_scale:new t.bp(e,r.u_buffer_scale),u_fade_t:new t.bp(e,r.u_fade_t),u_opacity:new t.bp(e,r.u_opacity),u_image0:new t.b_(e,r.u_image0),u_image1:new t.b_(e,r.u_image1),u_brightness_low:new t.bp(e,r.u_brightness_low),u_brightness_high:new t.bp(e,r.u_brightness_high),u_saturation_factor:new t.bp(e,r.u_saturation_factor),u_contrast_factor:new t.bp(e,r.u_contrast_factor),u_spin_weights:new t.c2(e,r.u_spin_weights),u_coords_top:new t.c1(e,r.u_coords_top),u_coords_bottom:new t.c1(e,r.u_coords_bottom)}),symbolIcon:(e,r)=>({u_is_size_zoom_constant:new t.b_(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.b_(e,r.u_is_size_feature_constant),u_size_t:new t.bp(e,r.u_size_t),u_size:new t.bp(e,r.u_size),u_camera_to_center_distance:new t.bp(e,r.u_camera_to_center_distance),u_pitch:new t.bp(e,r.u_pitch),u_rotate_symbol:new t.b_(e,r.u_rotate_symbol),u_aspect_ratio:new t.bp(e,r.u_aspect_ratio),u_fade_change:new t.bp(e,r.u_fade_change),u_label_plane_matrix:new t.c0(e,r.u_label_plane_matrix),u_coord_matrix:new t.c0(e,r.u_coord_matrix),u_is_text:new t.b_(e,r.u_is_text),u_pitch_with_map:new t.b_(e,r.u_pitch_with_map),u_is_along_line:new t.b_(e,r.u_is_along_line),u_is_variable_anchor:new t.b_(e,r.u_is_variable_anchor),u_texsize:new t.c3(e,r.u_texsize),u_texture:new t.b_(e,r.u_texture),u_translation:new t.c3(e,r.u_translation),u_pitched_scale:new t.bp(e,r.u_pitched_scale)}),symbolSDF:(e,r)=>({u_is_size_zoom_constant:new t.b_(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.b_(e,r.u_is_size_feature_constant),u_size_t:new t.bp(e,r.u_size_t),u_size:new t.bp(e,r.u_size),u_camera_to_center_distance:new t.bp(e,r.u_camera_to_center_distance),u_pitch:new t.bp(e,r.u_pitch),u_rotate_symbol:new t.b_(e,r.u_rotate_symbol),u_aspect_ratio:new t.bp(e,r.u_aspect_ratio),u_fade_change:new t.bp(e,r.u_fade_change),u_label_plane_matrix:new t.c0(e,r.u_label_plane_matrix),u_coord_matrix:new t.c0(e,r.u_coord_matrix),u_is_text:new t.b_(e,r.u_is_text),u_pitch_with_map:new t.b_(e,r.u_pitch_with_map),u_is_along_line:new t.b_(e,r.u_is_along_line),u_is_variable_anchor:new t.b_(e,r.u_is_variable_anchor),u_texsize:new t.c3(e,r.u_texsize),u_texture:new t.b_(e,r.u_texture),u_gamma_scale:new t.bp(e,r.u_gamma_scale),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_is_halo:new t.b_(e,r.u_is_halo),u_is_plain:new t.b_(e,r.u_is_plain),u_translation:new t.c3(e,r.u_translation),u_pitched_scale:new t.bp(e,r.u_pitched_scale)}),symbolTextAndIcon:(e,r)=>({u_is_size_zoom_constant:new t.b_(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.b_(e,r.u_is_size_feature_constant),u_size_t:new t.bp(e,r.u_size_t),u_size:new t.bp(e,r.u_size),u_camera_to_center_distance:new t.bp(e,r.u_camera_to_center_distance),u_pitch:new t.bp(e,r.u_pitch),u_rotate_symbol:new t.b_(e,r.u_rotate_symbol),u_aspect_ratio:new t.bp(e,r.u_aspect_ratio),u_fade_change:new t.bp(e,r.u_fade_change),u_label_plane_matrix:new t.c0(e,r.u_label_plane_matrix),u_coord_matrix:new t.c0(e,r.u_coord_matrix),u_is_text:new t.b_(e,r.u_is_text),u_pitch_with_map:new t.b_(e,r.u_pitch_with_map),u_is_along_line:new t.b_(e,r.u_is_along_line),u_is_variable_anchor:new t.b_(e,r.u_is_variable_anchor),u_texsize:new t.c3(e,r.u_texsize),u_texsize_icon:new t.c3(e,r.u_texsize_icon),u_texture:new t.b_(e,r.u_texture),u_texture_icon:new t.b_(e,r.u_texture_icon),u_gamma_scale:new t.bp(e,r.u_gamma_scale),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_is_halo:new t.b_(e,r.u_is_halo),u_translation:new t.c3(e,r.u_translation),u_pitched_scale:new t.bp(e,r.u_pitched_scale)}),background:(e,r)=>({u_opacity:new t.bp(e,r.u_opacity),u_color:new t.b$(e,r.u_color)}),backgroundPattern:(e,r)=>({u_opacity:new t.bp(e,r.u_opacity),u_image:new t.b_(e,r.u_image),u_pattern_tl_a:new t.c3(e,r.u_pattern_tl_a),u_pattern_br_a:new t.c3(e,r.u_pattern_br_a),u_pattern_tl_b:new t.c3(e,r.u_pattern_tl_b),u_pattern_br_b:new t.c3(e,r.u_pattern_br_b),u_texsize:new t.c3(e,r.u_texsize),u_mix:new t.bp(e,r.u_mix),u_pattern_size_a:new t.c3(e,r.u_pattern_size_a),u_pattern_size_b:new t.c3(e,r.u_pattern_size_b),u_scale_a:new t.bp(e,r.u_scale_a),u_scale_b:new t.bp(e,r.u_scale_b),u_pixel_coord_upper:new t.c3(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.bp(e,r.u_tile_units_to_pixels)}),terrain:(e,r)=>({u_texture:new t.b_(e,r.u_texture),u_ele_delta:new t.bp(e,r.u_ele_delta),u_fog_matrix:new t.c0(e,r.u_fog_matrix),u_fog_color:new t.b$(e,r.u_fog_color),u_fog_ground_blend:new t.bp(e,r.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.bp(e,r.u_fog_ground_blend_opacity),u_horizon_color:new t.b$(e,r.u_horizon_color),u_horizon_fog_blend:new t.bp(e,r.u_horizon_fog_blend),u_is_globe_mode:new t.bp(e,r.u_is_globe_mode)}),terrainDepth:(e,r)=>({u_ele_delta:new t.bp(e,r.u_ele_delta)}),terrainCoords:(e,r)=>({u_texture:new t.b_(e,r.u_texture),u_terrain_coords_id:new t.bp(e,r.u_terrain_coords_id),u_ele_delta:new t.bp(e,r.u_ele_delta)}),projectionErrorMeasurement:(e,r)=>({u_input:new t.bp(e,r.u_input),u_output_expected:new t.bp(e,r.u_output_expected)}),atmosphere:(e,r)=>({u_sun_pos:new t.c2(e,r.u_sun_pos),u_atmosphere_blend:new t.bp(e,r.u_atmosphere_blend),u_globe_position:new t.c2(e,r.u_globe_position),u_globe_radius:new t.bp(e,r.u_globe_radius),u_inv_proj_matrix:new t.c0(e,r.u_inv_proj_matrix)}),sky:(e,r)=>({u_sky_color:new t.b$(e,r.u_sky_color),u_horizon_color:new t.b$(e,r.u_horizon_color),u_horizon:new t.c3(e,r.u_horizon),u_horizon_normal:new t.c3(e,r.u_horizon_normal),u_sky_horizon_blend:new t.bp(e,r.u_sky_horizon_blend),u_sky_blend:new t.bp(e,r.u_sky_blend)})};class rL{constructor(e,t,r){this.context=e;let i=e.gl;this.buffer=i.createBuffer(),this.dynamicDraw=!!r,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||t.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){let t=this.context.gl;if(!this.dynamicDraw)throw Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let rP={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class rI{constructor(e,t,r,i){this.length=t.length,this.attributes=r,this.itemSize=t.bytesPerElement,this.dynamicDraw=i,this.context=e;let n=e.gl;this.buffer=n.createBuffer(),e.bindVertexBuffer.set(this.buffer),n.bufferData(n.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||t.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 t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,t){for(let r of this.attributes){let i=t.attributes[r.name];void 0!==i&&e.enableVertexAttribArray(i)}}setVertexAttribPointers(e,t,r){for(let i of this.attributes){let n=t.attributes[i.name];void 0!==n&&e.vertexAttribPointer(n,i.components,e[rP[i.type]],!1,this.itemSize,i.offset+this.itemSize*(r||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class rz{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)}}class rD extends rz{getDefault(){return t.bo.transparent}set(e){let t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class rO extends rz{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}}class rR extends rz{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}}class rF extends rz{getDefault(){return[!0,!0,!0,!0]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class rj extends rz{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}}class rB extends rz{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}}class rN extends rz{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){let t=this.current;(e.func!==t.func||e.ref!==t.ref||e.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}}class rU extends rz{getDefault(){let e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}}class rV extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),this.current=e,this.dirty=!1}}class rq extends rz{getDefault(){return[0,1]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}}class rH extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),this.current=e,this.dirty=!1}}class rG extends rz{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}}class rW extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.BLEND):t.disable(t.BLEND),this.current=e,this.dirty=!1}}class rY extends rz{getDefault(){let e=this.gl;return[e.ONE,e.ZERO]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}}class rZ extends rz{getDefault(){return t.bo.transparent}set(e){let t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class r$ extends rz{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}}class rX extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),this.current=e,this.dirty=!1}}class rK extends rz{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}}class rJ extends rz{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}}class rQ extends rz{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}}class r0 extends rz{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}}class r1 extends rz{getDefault(){let e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class r2 extends rz{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,e),this.current=e,this.dirty=!1}}class r3 extends rz{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class r5 extends rz{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindTexture(t.TEXTURE_2D,e),this.current=e,this.dirty=!1}}class r4 extends rz{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class r6 extends rz{getDefault(){return null}set(e){let t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class r8 extends rz{getDefault(){return null}set(e){var t;if(e===this.current&&!this.dirty)return;let r=this.gl;tS(r)?r.bindVertexArray(e):null==(t=r.getExtension("OES_vertex_array_object"))||t.bindVertexArrayOES(e),this.current=e,this.dirty=!1}}class r9 extends rz{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}}class r7 extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}}class ie extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}}class it extends rz{constructor(e,t){super(e),this.context=e,this.parent=t}getDefault(){return null}}class ir extends it{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}}class ii extends it{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class ia extends it{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}let io="Framebuffer is not complete";class is{constructor(e,t,r,i,n){this.context=e,this.width=t,this.height=r;let a=e.gl,o=this.framebuffer=a.createFramebuffer();if(this.colorAttachment=new ir(e,o),i)this.depthAttachment=n?new ia(e,o):new ii(e,o);else if(n)throw Error("Stencil cannot be set without depth");if(a.checkFramebufferStatus(a.FRAMEBUFFER)!==a.FRAMEBUFFER_COMPLETE)throw Error(io)}destroy(){let e=this.context.gl,t=this.colorAttachment.get();if(t&&e.deleteTexture(t),this.depthAttachment){let t=this.depthAttachment.get();t&&e.deleteRenderbuffer(t)}e.deleteFramebuffer(this.framebuffer)}}class il{constructor(e){var t,r;if(this.gl=e,this.clearColor=new rD(this),this.clearDepth=new rO(this),this.clearStencil=new rR(this),this.colorMask=new rF(this),this.depthMask=new rj(this),this.stencilMask=new rB(this),this.stencilFunc=new rN(this),this.stencilOp=new rU(this),this.stencilTest=new rV(this),this.depthRange=new rq(this),this.depthTest=new rH(this),this.depthFunc=new rG(this),this.blend=new rW(this),this.blendFunc=new rY(this),this.blendColor=new rZ(this),this.blendEquation=new r$(this),this.cullFace=new rX(this),this.cullFaceSide=new rK(this),this.frontFace=new rJ(this),this.program=new rQ(this),this.activeTexture=new r0(this),this.viewport=new r1(this),this.bindFramebuffer=new r2(this),this.bindRenderbuffer=new r3(this),this.bindTexture=new r5(this),this.bindVertexBuffer=new r4(this),this.bindElementBuffer=new r6(this),this.bindVertexArray=new r8(this),this.pixelStoreUnpack=new r9(this),this.pixelStoreUnpackPremultiplyAlpha=new r7(this),this.pixelStoreUnpackFlipY=new ie(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),tS(e)){this.HALF_FLOAT=e.HALF_FLOAT;let i=e.getExtension("EXT_color_buffer_half_float");this.RGBA16F=null!=(t=e.RGBA16F)?t:i?.RGBA16F_EXT,this.RGB16F=null!=(r=e.RGB16F)?r:i?.RGB16F_EXT,e.getExtension("EXT_color_buffer_float")}else{e.getExtension("EXT_color_buffer_half_float"),e.getExtension("OES_texture_half_float_linear");let t=e.getExtension("OES_texture_half_float");this.HALF_FLOAT=t?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(e,t){return new rL(this,e,t)}createVertexBuffer(e,t,r){return new rI(this,e,t,r)}createRenderbuffer(e,t,r){let i=this.gl,n=i.createRenderbuffer();return this.bindRenderbuffer.set(n),i.renderbufferStorage(i.RENDERBUFFER,e,t,r),this.bindRenderbuffer.set(null),n}createFramebuffer(e,t,r,i){return new is(this,e,t,r,i)}clear({color:e,depth:t,stencil:r}){let i=this.gl,n=0;e&&(n|=i.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==t&&(n|=i.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(t),this.depthMask.set(!0)),void 0!==r&&(n|=i.STENCIL_BUFFER_BIT,this.clearStencil.set(r),this.stencilMask.set(255)),i.clear(n)}setCullFace(e){!1===e.enable?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(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)}setStencilMode(e){e.test.func!==this.gl.ALWAYS||e.mask?(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})):this.stencilTest.set(!1)}setColorMode(e){t.bQ(e.blendFunction,tT.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(){var e;return tS(this.gl)?this.gl.createVertexArray():null==(e=this.gl.getExtension("OES_vertex_array_object"))?void 0:e.createVertexArrayOES()}deleteVertexArray(e){var t;tS(this.gl)?this.gl.deleteVertexArray(e):null==(t=this.gl.getExtension("OES_vertex_array_object"))||t.deleteVertexArrayOES(e)}unbindVAO(){this.bindVertexArray.set(null)}}function ic(e,r,n,a,o){var s,l;let c=e.context,u=e.transform,h=c.gl,d=e.useProgram("collisionBox"),f=[],p=0,m=0;for(let t of a){let i=r.getTile(t).getBucket(n);if(!i)continue;let a=o?i.textCollisionBox:i.iconCollisionBox,l=i.collisionCircleArray;l.length>0&&(f.push({circleArray:l,circleOffset:m,coord:t}),p+=l.length/4,m=p),a&&d.draw(c,h.LINES,tk.disabled,tA.disabled,e.colorModeForRenderPass(),tM.disabled,rs(e.transform),null==(s=e.style.map.terrain)?void 0:s.getTerrainData(t),u.getProjectionData({overscaledTileID:t,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),n.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,null,e.transform.zoom,null,null,a.collisionVertexBuffer)}if(!o||!f.length)return;let g=e.useProgram("collisionCircle"),y=new t.ca;y.resize(4*p),y._trim();let v=0;for(let e of f)for(let t=0;te.style.map.terrain.getElevation(l,t,r):null;!function(e,r,i,n,a,o,s,l,c,u,h,d,f){let p=i?e.textSizeData:e.iconSizeData,m=t.aw(p,r.transform.zoom),g=[256/r.width*2+1,256/r.height*2+1],y=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;y.clear();let v=e.lineVertexArray,x=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,b=r.transform.width/r.transform.height,_=!1;for(let i=0;i=-g[0]&&w.x<=g[0]&&w.y>=-g[1])||!(w.y<=g[1])){eY(T.numGlyphs,y);continue}let S=.5+r.transform.cameraToCenterDistance/A.signedDistanceFromCamera*.5,E=t.ay(p,m,T),C=o?E*r.transform.getPitchedTextCorrection(T.anchorX,T.anchorY,c)/S:E*S,L=ej({projectionContext:k,pitchedLabelPlaneMatrixInverse:a,symbol:T,fontSize:C,flip:!1,keepUpright:s,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:y,aspectRatio:b,rotateToLine:l});_=L.useVertical,(L.notEnoughRoom||_||L.needsFlipping&&ej({projectionContext:k,pitchedLabelPlaneMatrixInverse:a,symbol:T,fontSize:C,flip:!0,keepUpright:s,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:y,aspectRatio:b,rotateToLine:l}).notEnoughRoom)&&eY(T.numGlyphs,y)}i?e.text.dynamicLayoutVertexBuffer.updateData(y):e.icon.dynamicLayoutVertexBuffer.updateData(y)}(c,e,a,B,r,b,u,"map"===i.layout.get("text-rotation-alignment"),l.toUnwrapped(),v.width,v.height,U,n)}let G=a&&A||H,W=_||G?iu:b?B:e.transform.clipSpaceToPixelsMatrix,Y=m&&0!==i.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(1),Z={program:C,buffers:h,uniformValues:m?c.iconsInText?rk(g.kind,L,w,b,_,G,e,W,N,U,I,R,E):rM(g.kind,L,w,b,_,G,e,W,N,U,a,I,Y,E):rT(g.kind,L,w,b,_,G,e,W,N,U,a,I,E),projectionData:V,atlasTexture:z,atlasTextureIcon:F,atlasInterpolation:D,atlasInterpolationIcon:O,isSDF:m,hasHalo:Y};if(T&&c.canOverlap)for(let e of(M=!0,h.segments.get()))S.push({segments:new t.aV([e]),sortKey:e.sortKey,state:Z,terrainData:P});else S.push({segments:h.segments,sortKey:0,state:Z,terrainData:P})}M&&S.sort((e,t)=>e.sortKey-t.sortKey);let C=null!=(m=i.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(null))?m:1/0,L=i.layout.get("text-letter-spacing").constantOr(0)*t.aJ<0||C>1;for(let t of S){let r=t.state;g.activeTexture.set(y.TEXTURE0),r.atlasTexture.bind(r.atlasInterpolation,y.CLAMP_TO_EDGE),r.atlasTextureIcon&&(g.activeTexture.set(y.TEXTURE1),r.atlasTextureIcon&&r.atlasTextureIcon.bind(r.atlasInterpolationIcon,y.CLAMP_TO_EDGE));let n=r.isSDF&&r.hasHalo;if(n){let n=r.uniformValues;n.u_is_halo=1,L&&(n.u_is_plain=0,id(r.buffers,t.segments,i,e,r.program,k,h,d,n,r.projectionData,t.terrainData),n.u_is_halo=0,n.u_is_plain=1)}id(r.buffers,t.segments,i,e,r.program,k,h,d,r.uniformValues,r.projectionData,t.terrainData),n&&!L&&(r.uniformValues.u_is_halo=0)}}function id(e,t,r,i,n,a,o,s,l,c,u){let h=i.context;n.draw(h,h.gl.TRIANGLES,a,o,s,tM.backCCW,l,u,c,r.id,e.layoutVertexBuffer,e.indexBuffer,t,r.paint,i.transform.zoom,e.programConfigurations.get(r.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function ip(e,t,r){var i,n;let a=e.gl,o=a.createTexture();a.bindTexture(a.TEXTURE_2D,o),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);let s=null!=(i=e.HALF_FLOAT)?i:a.UNSIGNED_BYTE,l=null!=(n=e.RGBA16F)?n:a.RGBA;a.texImage2D(a.TEXTURE_2D,0,l,t,r,0,a.RGBA,s,null);let c=e.createFramebuffer(t,r,!1,!1);return c.colorAttachment.set(o),c}function im(e,r){return r.colorRampTexture||(r.colorRampTexture=new t.T(e,r.colorRamp,e.gl.RGBA)),r.colorRampTexture}function ig(e,r,i,n,a,o,s,l){let c=256;if(a.stepInterpolant){let n=r.getSource().maxzoom,a=s.canonical.z===n?Math.ceil(1<e.options.anisotropicFilterPitch&&m.texParameterf(m.TEXTURE_2D,p.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,p.extTextureFilterAnisotropicMax);let I=null==(d=e.style.map.terrain)?void 0:d.getTerrainData(A),z=y.getProjectionData({overscaledTileID:A,aligned:_,applyGlobeMatrix:!h,applyTerrainMatrix:!0}),D=rw(L,C,P.fadeMix,i,l),O=x.getMeshFromTileID(p,A.canonical,o,s,"raster");g.draw(p,m.TRIANGLES,n,a?a[A.overscaledZ]:tA.disabled,b,c?tM.frontCCW:tM.backCCW,D,I,z,i.id,O.vertexBuffer,O.indexBuffer,O.segments)}}let ik=new t.bo(1,0,0,1),iA=new t.bo(0,1,0,1),iS=new t.bo(0,0,1,1),iE=new t.bo(1,0,1,1),iC=new t.bo(0,1,1,1);function iL(e,t,r,i){iI(e,0,t+r/2,e.transform.width,r,i)}function iP(e,t,r,i){iI(e,t-r/2,0,r,e.transform.height,i)}function iI(e,t,r,i,n,a){let o=e.context,s=o.gl;s.enable(s.SCISSOR_TEST),s.scissor(t*e.pixelRatio,r*e.pixelRatio,i*e.pixelRatio,n*e.pixelRatio),o.clear({color:a}),s.disable(s.SCISSOR_TEST)}function iz(e,t,r,i){let{isRenderingGlobe:n}=i,a=e.context,o=a.gl,s=e.transform,l=e.colorModeForRenderPass(),c=e.getDepthModeFor3D(),u=e.useProgram("terrain");for(let i of(a.bindFramebuffer.set(null),a.viewport.set([0,0,e.width,e.height]),r)){let r=t.getTerrainMesh(i.tileID),h=e.renderToTexture.getTexture(i),d=t.getTerrainData(i.tileID);a.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,h.texture);let f=t6(t.getMeshFrameDelta(s.zoom),s.calculateFogMatrix(i.tileID.toUnwrapped()),e.style.sky,s.pitch,n),p=s.getProjectionData({overscaledTileID:i.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});u.draw(a,o.TRIANGLES,c,tA.disabled,l,tM.backCCW,f,d,p,"terrain",r.vertexBuffer,r.indexBuffer,r.segments)}}function iD(e,r){if(!r.mesh){let i=new t.aU;i.emplaceBack(-1,-1),i.emplaceBack(1,-1),i.emplaceBack(1,1),i.emplaceBack(-1,1);let n=new t.aW;n.emplaceBack(0,1,2),n.emplaceBack(0,2,3),r.mesh=new to(e.createVertexBuffer(i,ts.members),e.createIndexBuffer(n),t.aV.simpleSegment(0,0,i.length,n.length))}return r.mesh}let iO={symbol:function(e,r,i,n,a,o){if("translucent"!==e.renderPass)return;let{isRenderingToTexture:s}=o,l=tA.disabled,c=e.colorModeForRenderPass();(i._unevaluatedLayout.hasValue("text-variable-anchor")||i._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(e,r,i,n,a,o,s,l,c){var u;let h=r.transform,d=r.style.map.terrain,f="map"===a,p="map"===o;for(let a of e){let e=n.getTile(a),o=e.getBucket(i);if(!(null!=(u=o?.text)&&u.segments.get().length))continue;let m=t.aw(o.textSizeData,h.zoom),g=t.aK(e,1,r.transform.zoom),y=ez(f,r.transform,g),v="none"!==i.layout.get("icon-text-fit")&&o.hasIconData();if(m){let r=Math.pow(2,h.zoom-e.tileID.overscaledZ),i=d?(e,t)=>d.getElevation(a,e,t):null;!function(e,r,i,n,a,o,s,l,c,u,h,d){let f=e.text.placedSymbolArray,p=e.text.dynamicLayoutVertexArray,m=e.icon.dynamicLayoutVertexArray,g={};p.clear();for(let m=0;m=0&&(g[y.associatedIconIndex]={shiftedAnchor:E,angle:C})}else eY(y.numGlyphs,p)}if(c){m.clear();let r=e.icon.placedSymbolArray;for(let e=0;ee.sortKey-t.sortKey),v)){let{programConfiguration:r,program:n,layoutVertexBuffer:a,indexBuffer:o,uniformValues:s,terrainData:l,projectionData:c}=t.state;n.draw(d,f.TRIANGLES,m,g,y,tM.backCCW,s,l,c,i.id,a,o,t.segments,i.paint,e.transform.zoom,r)}},heatmap:function(e,r,i,n,a){if(0===i.paint.get("heatmap-opacity"))return;let o=e.context,{isRenderingToTexture:s,isRenderingGlobe:l}=a;if(e.style.map.terrain){for(let a of n){let n=r.getTile(a);r.hasRenderableParent(a)||("offscreen"===e.renderPass?function(e,r,i,n,a){let o=e.context,s=o.gl,l=tA.disabled,c=new tT([s.ONE,s.ONE],t.bo.transparent,[!0,!0,!0,!0]),u=r.getBucket(i);if(!u)return;let h=n.key,d=i.heatmapFbos.get(h);d||(d=ip(o,r.tileSize,r.tileSize),i.heatmapFbos.set(h,d)),o.bindFramebuffer.set(d.framebuffer),o.viewport.set([0,0,r.tileSize,r.tileSize]),o.clear({color:t.bo.transparent});let f=u.programConfigurations.get(i.id),p=e.useProgram("heatmap",f,!a),m=e.transform.getProjectionData({overscaledTileID:r.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),g=e.style.map.terrain.getTerrainData(n);p.draw(o,s.TRIANGLES,tk.disabled,l,c,tM.disabled,ru(r,e.transform.zoom,i.paint.get("heatmap-intensity"),1),g,m,i.id,u.layoutVertexBuffer,u.indexBuffer,u.segments,i.paint,e.transform.zoom,f)}(e,n,i,a,l):"translucent"===e.renderPass&&function(e,t,r,i,n){let a=e.context,o=a.gl,s=e.transform;a.setColorMode(e.colorModeForRenderPass());let l=im(a,t),c=r.key,u=t.heatmapFbos.get(c);if(!u)return;a.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,u.colorAttachment.get()),a.activeTexture.set(o.TEXTURE1),l.bind(o.LINEAR,o.CLAMP_TO_EDGE);let h=s.getProjectionData({overscaledTileID:r,applyTerrainMatrix:n,applyGlobeMatrix:!i});e.useProgram("heatmapTexture").draw(a,o.TRIANGLES,tk.disabled,tA.disabled,e.colorModeForRenderPass(),tM.disabled,rh(e,t,0,1),null,h,t.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments,t.paint,s.zoom),u.destroy(),t.heatmapFbos.delete(c)}(e,i,a,s,l))}o.viewport.set([0,0,e.width,e.height])}else{let a,o,s;"offscreen"===e.renderPass?function(e,r,i,n){let a,o,s=e.context,l=s.gl,c=e.transform,u=tA.disabled,h=new tT([l.ONE,l.ONE],t.bo.transparent,[!0,!0,!0,!0]);for(let d of(a=s.gl,s.activeTexture.set(a.TEXTURE1),s.viewport.set([0,0,e.width/4,e.height/4]),(o=i.heatmapFbos.get(t.cd))?(a.bindTexture(a.TEXTURE_2D,o.colorAttachment.get()),s.bindFramebuffer.set(o.framebuffer)):(o=ip(s,e.width/4,e.height/4),i.heatmapFbos.set(t.cd,o)),s.clear({color:t.bo.transparent}),n)){if(r.hasRenderableParent(d))continue;let t=r.getTile(d),n=t.getBucket(i);if(!n)continue;let a=n.programConfigurations.get(i.id),o=e.useProgram("heatmap",a),f=c.getProjectionData({overscaledTileID:d,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),p=c.getCircleRadiusCorrection();o.draw(s,l.TRIANGLES,tk.disabled,u,h,tM.backCCW,ru(t,c.zoom,i.paint.get("heatmap-intensity"),p),null,f,i.id,n.layoutVertexBuffer,n.indexBuffer,n.segments,i.paint,c.zoom,a)}s.viewport.set([0,0,e.width,e.height])}(e,r,i,n):"translucent"===e.renderPass&&(o=(a=e.context).gl,a.setColorMode(e.colorModeForRenderPass()),(s=i.heatmapFbos.get(t.cd))&&(a.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,s.colorAttachment.get()),a.activeTexture.set(o.TEXTURE1),im(a,i).bind(o.LINEAR,o.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(a,o.TRIANGLES,tk.disabled,tA.disabled,e.colorModeForRenderPass(),tM.disabled,rh(e,i,0,1),null,null,i.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,i.paint,e.transform.zoom)))}},line:function(e,t,r,i,n){var a;if("translucent"!==e.renderPass)return;let{isRenderingToTexture:o}=n,s=r.paint.get("line-opacity"),l=r.paint.get("line-width");if(0===s.constantOr(1)||0===l.constantOr(1))return;let c=e.getDepthModeForSublayer(0,tk.ReadOnly),u=e.colorModeForRenderPass(),h=r.paint.get("line-dasharray"),d=h.constantOr(1),f=r.paint.get("line-pattern"),p=f.constantOr(1),m=r.paint.get("line-gradient"),g=r.getCrossfadeParameters(),y;y=p?"linePattern":d&&m?"lineGradientSDF":d?"lineSDF":m?"lineGradient":"line";let v=e.context,x=v.gl,b=e.transform,_=!0;for(let n of i){let i=t.getTile(n);if(p&&!i.patternsLoaded())continue;let s=i.getBucket(r);if(!s)continue;let l=s.programConfigurations.get(r.id),w=e.context.program.get(),T=e.useProgram(y,l),M=_||T.program!==w,k=null==(a=e.style.map.terrain)?void 0:a.getTerrainData(n),A=f.constantOr(null),S=h?.constantOr(null);if(A&&i.imageAtlas){let e=i.imageAtlas,t=e.patternPositions[A.to.toString()],r=e.patternPositions[A.from.toString()];t&&r&&l.setConstantPatternPositions(t,r)}else if(S){let t="round"===r.layout.get("line-cap").constantOr(null),i=e.lineAtlas.getDash(S.to,t),n=e.lineAtlas.getDash(S.from,t);l.setConstantDashPositions(i,n)}let E=b.getProjectionData({overscaledTileID:n,applyGlobeMatrix:!o,applyTerrainMatrix:!0}),C=b.getPixelScale(),L;p?(L=ry(e,i,r,C,g),v.activeTexture.set(x.TEXTURE0),i.imageAtlasTexture.bind(x.LINEAR,x.CLAMP_TO_EDGE),l.updatePaintBuffers(g)):d&&m?(L=rx(e,i,r,C,g,s.lineClipsArray.length),function(e,t,r,i,n,a,o,s,l){let c=a.gradients[n.id],u=c.texture;n.gradientVersion!==c.version&&(u=ig(e,t,r,i,n,a,o,c)),r.activeTexture.set(i.TEXTURE0),u.bind(n.stepInterpolant?i.NEAREST:i.LINEAR,i.CLAMP_TO_EDGE),r.activeTexture.set(i.TEXTURE1),e.lineAtlas.bind(r),s.updatePaintBuffers(l)}(e,t,v,x,r,s,n,l,g)):d?(L=rv(e,i,r,C,g),(M||e.lineAtlas.dirty)&&(v.activeTexture.set(x.TEXTURE0),e.lineAtlas.bind(v)),l.updatePaintBuffers(g)):m?(L=rg(e,i,r,C,s.lineClipsArray.length),function(e,t,r,i,n,a,o){let s=a.gradients[n.id],l=s.texture;n.gradientVersion!==s.version&&(l=ig(e,t,r,i,n,a,o,s)),r.activeTexture.set(i.TEXTURE0),l.bind(n.stepInterpolant?i.NEAREST:i.LINEAR,i.CLAMP_TO_EDGE)}(e,t,v,x,r,s,n)):L=rm(e,i,r,C);let P=e.stencilModeForClipping(n);T.draw(v,x.TRIANGLES,c,P,u,tM.disabled,L,k,E,r.id,s.layoutVertexBuffer,s.indexBuffer,s.segments,r.paint,e.transform.zoom,l,s.layoutVertexBuffer2),_=!1}},fill:function(e,r,i,n,a){let o=i.paint.get("fill-color"),s=i.paint.get("fill-opacity");if(0===s.constantOr(1))return;let{isRenderingToTexture:l}=a,c=e.colorModeForRenderPass(),u=i.paint.get("fill-pattern"),h=e.opaquePassEnabledForLayer()&&!u.constantOr(1)&&1===o.constantOr(t.bo.transparent).a&&1===s.constantOr(0)?"opaque":"translucent";if(e.renderPass===h){let t=e.getDepthModeForSublayer(1,"opaque"===e.renderPass?tk.ReadWrite:tk.ReadOnly);iv(e,r,i,n,t,c,!1,l)}if("translucent"===e.renderPass&&i.paint.get("fill-antialias")){let t=e.getDepthModeForSublayer(2*!!i.getPaintProperty("fill-outline-color"),tk.ReadOnly);iv(e,r,i,n,t,c,!0,l)}},fillExtrusion:function(e,t,r,i,n){let a=r.paint.get("fill-extrusion-opacity");if(0===a)return;let{isRenderingToTexture:o}=n;if("translucent"===e.renderPass){let n=new tk(e.context.gl.LEQUAL,tk.ReadWrite,e.depthRangeFor3D);if(1!==a||r.paint.get("fill-extrusion-pattern").constantOr(1))ix(e,t,r,i,n,tA.disabled,tT.disabled,o),ix(e,t,r,i,n,e.stencilModeFor3D(),e.colorModeForRenderPass(),o);else{let a=e.colorModeForRenderPass();ix(e,t,r,i,n,tA.disabled,a,o)}}},hillshade:function(e,r,i,n,a){if("offscreen"!==e.renderPass&&"translucent"!==e.renderPass)return;let{isRenderingToTexture:o}=a,s=e.context,l=e.style.projection.useSubdivision,c=e.getDepthModeForSublayer(0,tk.ReadOnly),u=e.colorModeForRenderPass();if("offscreen"===e.renderPass)(function(e,r,i,n,a,o,s){let l=e.context,c=l.gl,u="nearest"===n.paint.get("resampling")?c.NEAREST:c.LINEAR;for(let h of i){let i=r.getTile(h),d=i.dem;if(!d?.data||!i.needsHillshadePrepare)continue;let f=d.dim,p=d.stride,m=d.getPixels();if(l.activeTexture.set(c.TEXTURE1),l.pixelStoreUnpackPremultiplyAlpha.set(!1),i.demTexture||(i.demTexture=e.getTileTexture(p)),i.demTexture){let e=i.demTexture;e.update(m,{premultiply:!1}),e.bind(c.NEAREST,c.CLAMP_TO_EDGE)}else i.demTexture=new t.T(l,m,c.RGBA,{premultiply:!1}),i.demTexture.bind(c.NEAREST,c.CLAMP_TO_EDGE);l.activeTexture.set(c.TEXTURE0);let g=i.fbo;if(!g){let e=new t.T(l,{width:f,height:f,data:null},c.RGBA);e.bind(u,c.CLAMP_TO_EDGE),(g=i.fbo=l.createFramebuffer(f,f,!0,!1)).colorAttachment.set(e.texture)}l.bindFramebuffer.set(g.framebuffer),l.viewport.set([0,0,f,f]),e.useProgram("hillshadePrepare").draw(l,c.TRIANGLES,a,o,s,tM.disabled,rf(i.tileID,d),null,null,n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),i.needsHillshadePrepare=!1}})(e,r,n,i,c,tA.disabled,u),s.viewport.set([0,0,e.width,e.height]);else if("translucent"===e.renderPass)if(l){let[t,a,s]=e.stencilConfigForOverlapTwoPass(n);ib(e,r,i,s,t,c,u,!1,o),ib(e,r,i,s,a,c,u,!0,o)}else{let[t,a]=e.getStencilConfigForOverlapAndUpdateStencilID(n);ib(e,r,i,a,t,c,u,!1,o)}},colorRelief:function(e,t,r,i,n){if("translucent"!==e.renderPass||!i.length)return;let{isRenderingToTexture:a}=n,o=e.style.projection.useSubdivision,s=e.getDepthModeForSublayer(0,tk.ReadOnly),l=e.colorModeForRenderPass();if(o){let[n,o,c]=e.stencilConfigForOverlapTwoPass(i);iw(e,t,r,c,n,s,l,!1,a),iw(e,t,r,c,o,s,l,!0,a)}else{let[n,o]=e.getStencilConfigForOverlapAndUpdateStencilID(i);iw(e,t,r,o,n,s,l,!1,a)}},raster:function(e,t,r,i,n){if("translucent"!==e.renderPass||0===r.paint.get("raster-opacity")||!i.length)return;let{isRenderingToTexture:a}=n,o=t.getSource(),s=e.style.projection.useSubdivision;if(o instanceof et)iM(e,t,r,i,null,!1,!1,o.tileCoords,o.flippedWindingOrder,a);else if(s){let[n,o,s]=e.stencilConfigForOverlapTwoPass(i);iM(e,t,r,s,n,!1,!0,iT,!1,a),iM(e,t,r,s,o,!0,!0,iT,!1,a)}else{let[n,o]=e.getStencilConfigForOverlapAndUpdateStencilID(i);iM(e,t,r,o,n,!1,!0,iT,!1,a)}},background:function(e,t,r,i,n){var a;let o=r.paint.get("background-color"),s=r.paint.get("background-opacity");if(0===s)return;let{isRenderingToTexture:l}=n,c=e.context,u=c.gl,h=e.style.projection,d=e.transform,f=d.tileSize,p=r.paint.get("background-pattern");if(e.isPatternMissing(p))return;let m=!p&&1===o.a&&1===s&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass!==m)return;let g=tA.disabled,y=e.getDepthModeForSublayer(0,"opaque"===m?tk.ReadWrite:tk.ReadOnly),v=e.colorModeForRenderPass(),x=e.useProgram(p?"backgroundPattern":"background"),b=i||ew(d,{tileSize:f,terrain:e.style.map.terrain});p&&(c.activeTexture.set(u.TEXTURE0),e.imageManager.bind(e.context));let _=r.getCrossfadeParameters();for(let t of b){let i=d.getProjectionData({overscaledTileID:t,applyGlobeMatrix:!l,applyTerrainMatrix:!0}),n=p?rS(s,e,p,{tileID:t,tileSize:f},_):rA(s,o),m=null==(a=e.style.map.terrain)?void 0:a.getTerrainData(t),b=h.getMeshFromTileID(c,t.canonical,!1,!0,"raster");x.draw(c,u.TRIANGLES,y,g,v,tM.backCCW,n,m,i,r.id,b.vertexBuffer,b.indexBuffer,b.segments)}},sky:function(e,t){var r,i;let n,a,o,s,l=e.context,c=l.gl,u=(r=e.style.map.transform,i=e.pixelRatio,n=Math.cos(r.rollInRadians),a=Math.sin(r.rollInRadians),o=ep(r),s=r.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition,{u_sky_color:t.properties.get("sky-color"),u_horizon_color:t.properties.get("horizon-color"),u_horizon:[(r.width/2-o*a)*i,(r.height/2+o*n)*i],u_horizon_normal:[-a,n],u_sky_horizon_blend:t.properties.get("sky-horizon-blend")*r.height/2*i,u_sky_blend:s}),h=new tk(c.LEQUAL,tk.ReadWrite,[0,1]),d=tA.disabled,f=e.colorModeForRenderPass(),p=e.useProgram("sky"),m=iD(l,t);p.draw(l,c.TRIANGLES,h,d,f,tM.disabled,u,null,void 0,"sky",m.vertexBuffer,m.indexBuffer,m.segments)},atmosphere:function(e,r,i){var n;let a,o,s,l=e.context,c=l.gl,u=e.useProgram("atmosphere"),h=new tk(c.LEQUAL,tk.ReadOnly,[0,1]),d=e.transform,f=(n=e.transform,o=[-(a=i.properties.get("position")).x,-a.y,-a.z],s=t.ap(new Float64Array(16)),"map"===i.properties.get("anchor")&&(t.be(s,s,n.rollInRadians),t.bf(s,s,-n.pitchInRadians),t.be(s,s,n.bearingInRadians),t.bf(s,s,n.center.lat*Math.PI/180),t.bI(s,s,-n.center.lng*Math.PI/180)),t.cg(o,o,s),o),p=d.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),m=r.properties.get("atmosphere-blend")*p.projectionTransition;if(0===m)return;let g=tj(d.worldSize,d.center.lat),y=d.inverseProjectionMatrix,v=new Float64Array(4);v[3]=1,t.aE(v,v,d.modelViewProjectionMatrix),v[0]/=v[3],v[1]/=v[3],v[2]/=v[3],v[3]=1,t.aE(v,v,y),v[0]/=v[3],v[1]/=v[3],v[2]/=v[3],v[3]=1;let x={u_sun_pos:f,u_atmosphere_blend:m,u_globe_position:[v[0],v[1],v[2]],u_globe_radius:g,u_inv_proj_matrix:y},b=iD(l,r);u.draw(l,c.TRIANGLES,h,tA.disabled,tT.alphaBlended,tM.disabled,x,null,null,"atmosphere",b.vertexBuffer,b.indexBuffer,b.segments)},custom:function(e,t,r,i){let{isRenderingGlobe:n}=i,a=e.context,o=r.implementation,s=e.style.projection,l=e.transform,c=l.getProjectionDataForCustomLayer(n),u={farZ:l.farZ,nearZ:l.nearZ,fov:l.fov*Math.PI/180,modelViewProjectionMatrix:l.modelViewProjectionMatrix,projectionMatrix:l.projectionMatrix,shaderData:{variantName:s.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; uniform mat4 u_projection_matrix; -${s.shaderPreludeCode.vertexSource}`,define:s.shaderDefine},defaultProjectionData:c},h=o.renderingMode?o.renderingMode:"2d";if("offscreen"===e.renderPass){let t=o.prerender;t&&(e.setCustomLayerDefaults(),a.setColorMode(e.colorModeForRenderPass()),t.call(o,a.gl,u),a.setDirty(),e.setBaseState())}else if("translucent"===e.renderPass){e.setCustomLayerDefaults(),a.setColorMode(e.colorModeForRenderPass()),a.setStencilMode(tA.disabled);let t="3d"===h?e.getDepthModeFor3D():e.getDepthModeForSublayer(0,tk.ReadOnly);a.setDepthMode(t),o.render(a.gl,u),a.setDirty(),e.setBaseState(),a.bindFramebuffer.set(null)}},debug:function(e,r,i){for(let n of i)!function(e,r,i){var n,a;let o,s,l,c=e.context,u=c.gl,h=e.useProgram("debug"),d=tk.disabled,f=tA.disabled,p=e.colorModeForRenderPass(),m="$debug",g=null==(n=e.style.map.terrain)?void 0:n.getTerrainData(i);c.activeTexture.set(u.TEXTURE0);let y=r.getTileByID(i.key).latestRawTileData,v=Math.floor((y?.byteLength||0)/1024),x=512/Math.min(r.getTile(i).tileSize,512)*(i.overscaledZ/e.transform.zoom)*.5,b=i.canonical.toString();i.overscaledZ!==i.canonical.z&&(b+=` => ${i.overscaledZ}`),a=`${b} ${v}kB`,e.initDebugOverlayCanvas(),o=e.debugOverlayCanvas,s=e.context.gl,(l=e.debugOverlayCanvas.getContext("2d")).clearRect(0,0,o.width,o.height),l.shadowColor="white",l.shadowBlur=2,l.lineWidth=1.5,l.strokeStyle="white",l.textBaseline="top",l.font="bold 36px Open Sans, sans-serif",l.fillText(a,5,5),l.strokeText(a,5,5),e.debugOverlayTexture.update(o),e.debugOverlayTexture.bind(s.LINEAR,s.CLAMP_TO_EDGE);let _=e.transform.getProjectionData({overscaledTileID:i,applyGlobeMatrix:!0,applyTerrainMatrix:!0});h.draw(c,u.TRIANGLES,d,f,tT.alphaBlended,tM.disabled,rc(t.bo.transparent,x),null,_,m,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments),h.draw(c,u.LINE_STRIP,d,f,p,tM.disabled,rc(t.bo.red),g,_,m,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments)}(e,r,n)},debugPadding:function(e){var t,r;let i=e.transform.padding;iL(e,e.transform.height-(i.top||0),3,ik),iL(e,i.bottom||0,3,iA),iP(e,i.left||0,3,iS),iP(e,e.transform.width-(i.right||0),3,iE);let n=e.transform.centerPoint;t=n.x,r=e.transform.height-n.y,iI(e,t-1,r-10,2,20,iC),iI(e,t-10,r-1,20,2,iC)},terrainDepth:function(e,r){let i=e.context,n=i.gl,a=e.transform,o=tT.unblended,s=new tk(n.LEQUAL,tk.ReadWrite,[0,1]),l=r.tileManager.getRenderableTiles(),c=e.useProgram("terrainDepth");for(let u of(i.bindFramebuffer.set(r.getFramebuffer("depth").framebuffer),i.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),i.clear({color:t.bo.transparent,depth:1}),l)){let e=r.getTerrainMesh(u.tileID),t=r.getTerrainData(u.tileID),l=a.getProjectionData({overscaledTileID:u.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),h={u_ele_delta:r.getMeshFrameDelta(a.zoom)};c.draw(i,n.TRIANGLES,s,tA.disabled,o,tM.backCCW,h,t,l,"terrain",e.vertexBuffer,e.indexBuffer,e.segments)}i.bindFramebuffer.set(null),i.viewport.set([0,0,e.width,e.height])},terrainCoords:function(e,r){let i=e.context,n=i.gl,a=e.transform,o=tT.unblended,s=new tk(n.LEQUAL,tk.ReadWrite,[0,1]),l=r.getCoordsTexture(),c=r.tileManager.getRenderableTiles(),u=e.useProgram("terrainCoords");for(let h of(i.bindFramebuffer.set(r.getFramebuffer("coords").framebuffer),i.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),i.clear({color:t.bo.transparent,depth:1}),r.coordsIndex=[],c)){let e=r.getTerrainMesh(h.tileID),t=r.getTerrainData(h.tileID);i.activeTexture.set(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,l.texture);let c={u_terrain_coords_id:(255-r.coordsIndex.length)/255,u_texture:0,u_ele_delta:r.getMeshFrameDelta(a.zoom)},d=a.getProjectionData({overscaledTileID:h.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});u.draw(i,n.TRIANGLES,s,tA.disabled,o,tM.backCCW,c,t,d,"terrain",e.vertexBuffer,e.indexBuffer,e.segments),r.coordsIndex.push(h.tileID.key)}i.bindFramebuffer.set(null),i.viewport.set([0,0,e.width,e.height])}};class iR{constructor(e,r){this.drawFunctions=iO,this.context=new il(e),this.transform=r,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:t.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=eE.maxOverzooming+eE.maxUnderzooming+1,this.depthEpsilon=1/65536,this.crossTileSymbolIndex=new tr}resize(e,t,r){if(this.width=Math.floor(e*r),this.height=Math.floor(t*r),this.pixelRatio=r,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let e of this.style._order)this.style._layers[e].resize()}setup(){let e=this.context,r=new t.aU;r.emplaceBack(0,0),r.emplaceBack(t.a6,0),r.emplaceBack(0,t.a6),r.emplaceBack(t.a6,t.a6),this.tileExtentBuffer=e.createVertexBuffer(r,ts.members),this.tileExtentSegments=t.aV.simpleSegment(0,0,4,2);let i=new t.aU;i.emplaceBack(0,0),i.emplaceBack(t.a6,0),i.emplaceBack(0,t.a6),i.emplaceBack(t.a6,t.a6),this.debugBuffer=e.createVertexBuffer(i,ts.members),this.debugSegments=t.aV.simpleSegment(0,0,4,5);let n=new t.ch;n.emplaceBack(0,0,0,0),n.emplaceBack(t.a6,0,t.a6,0),n.emplaceBack(0,t.a6,0,t.a6),n.emplaceBack(t.a6,t.a6,t.a6,t.a6),this.rasterBoundsBuffer=e.createVertexBuffer(n,t5.members),this.rasterBoundsSegments=t.aV.simpleSegment(0,0,4,2);let a=new t.aU;a.emplaceBack(0,0),a.emplaceBack(t.a6,0),a.emplaceBack(0,t.a6),a.emplaceBack(t.a6,t.a6),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(a,ts.members),this.rasterBoundsSegmentsPosOnly=t.aV.simpleSegment(0,0,4,5);let o=new t.aU;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,ts.members),this.viewportSegments=t.aV.simpleSegment(0,0,4,2);let s=new t.ci;s.emplaceBack(0),s.emplaceBack(1),s.emplaceBack(3),s.emplaceBack(2),s.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(s);let l=new t.aW;l.emplaceBack(1,0,2),l.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(l);let c=this.context.gl;this.stencilClearMode=new tA({func:c.ALWAYS,mask:0},0,255,c.ZERO,c.ZERO,c.ZERO),this.tileExtentMesh=new to(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let i=t.O();t.c7(i,0,this.width,this.height,0,0,1),t.S(i,i,[r.drawingBufferWidth,r.drawingBufferHeight,0]),this.useProgram("clippingMask",null,!0).draw(e,r.TRIANGLES,tk.disabled,this.stencilClearMode,tT.disabled,tM.disabled,null,null,{mainMatrix:i,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:i},"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,t,r){if(this.currentStencilSource===e.source||!e.isTileClipped()||!t?.length)return;this.currentStencilSource=e.source,this.nextStencilID+t.length>256&&this.clearStencil();let i=this.context;i.setColorMode(tT.disabled),i.setDepthMode(tk.disabled);let n={};for(let e of t)n[e.key]=this.nextStencilID++;this._renderTileMasks(n,t,r,!0),this._renderTileMasks(n,t,r,!1),this._tileClippingMaskIDs=n}_renderTileMasks(e,t,r,i){var n;let a=this.context,o=a.gl,s=this.style.projection,l=this.transform,c=this.useProgram("clippingMask");for(let u of t){let t=e[u.key],h=null==(n=this.style.map.terrain)?void 0:n.getTerrainData(u),d=s.getMeshFromTileID(this.context,u.canonical,i,!0,"stencil"),f=l.getProjectionData({overscaledTileID:u,applyGlobeMatrix:!r,applyTerrainMatrix:!0});c.draw(a,o.TRIANGLES,tk.disabled,new tA({func:o.ALWAYS,mask:0},t,255,o.KEEP,o.KEEP,o.REPLACE),tT.disabled,r?tM.disabled:tM.backCCW,null,h,f,"$clipping",d.vertexBuffer,d.indexBuffer,d.segments)}}_renderTilesDepthBuffer(){var e;let t=this.context,r=t.gl,i=this.style.projection,n=this.transform,a=this.useProgram("depth"),o=this.getDepthModeFor3D();for(let s of ew(n,{tileSize:n.tileSize})){let l=null==(e=this.style.map.terrain)?void 0:e.getTerrainData(s),c=i.getMeshFromTileID(this.context,s.canonical,!0,!0,"raster"),u=n.getProjectionData({overscaledTileID:s,applyGlobeMatrix:!0,applyTerrainMatrix:!0});a.draw(t,r.TRIANGLES,o,tA.disabled,tT.disabled,tM.backCCW,null,l,u,"$clipping",c.vertexBuffer,c.indexBuffer,c.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let e=this.nextStencilID++,t=this.context.gl;return new tA({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)}stencilModeForClipping(e){let t=this.context.gl;return new tA({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){let t=this.context.gl,r=e.sort((e,t)=>t.overscaledZ-e.overscaledZ),i=r[r.length-1].overscaledZ,n=r[0].overscaledZ-i+1;if(n>1){this.currentStencilSource=void 0,this.nextStencilID+n>256&&this.clearStencil();let e={};for(let r=0;rt.overscaledZ-e.overscaledZ),i=r[r.length-1].overscaledZ,n=r[0].overscaledZ-i+1;if(this.clearStencil(),n>1){let e={},a={};for(let r=0;r0};for(let e in s){let t=s[e];t.used&&t.prepare(this.context),l[e]=t.getVisibleCoordinates(!1),c[e]=l[e].slice().reverse(),u[e]=t.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let e=0;ethis.useProgram(e)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?t.bo.black:t.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=o.length-1;this.currentLayer>=0;this.currentLayer--){let e=this.style._layers[o[this.currentLayer]],t=s[e.source],r=l[e.source];this._renderTileClippingMasks(e,r,!1),this.renderLayer(this,t,e,r,h)}this.renderPass="translucent";let d=!1;for(this.currentLayer=0;this.currentLayerr.source&&!r.isHidden(t)?[e.tileManagers[r.source]]:[]),n=i.filter(e=>"vector"===e.getSource().type),a=i.filter(e=>"vector"!==e.getSource().type),o=e=>{(!r||r.getSource().maxzoom0?t.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;let t=this.imageManager.getPattern(e.from.toString()),r=this.imageManager.getPattern(e.to.toString());return!t||!r}useProgram(e,t,r=!1,i=[]){var n;this.cache||(this.cache={});let a=!!this.style.map.terrain,o=this.style.projection,s=r?tn.projectionMercator:o.shaderPreludeCode,l=r?tl:o.shaderDefine,c=e+(t?t.cacheKey:"")+`/${r?tc:o.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(a?"/terrain":"")+(i?`/${i.join("/")}`:"");return(n=this.cache)[c]||(n[c]=new t9(this.context,tn[e],t,rC[e],this._showOverdrawInspector,a,s,l,i)),this.cache[c]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let 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(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new t.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var e,t;if(this._tileTextures){for(let e in this._tileTextures){let t=this._tileTextures[e];if(t)for(let e of t)e.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&(null==(e=this.tileExtentMesh.vertexBuffer)||e.destroy()),this.tileExtentMesh&&(null==(t=this.tileExtentMesh.indexBuffer)||t.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let e in this.cache){let t=this.cache[e];t?.program&&this.context.gl.deleteProgram(t.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:e,drawingBufferHeight:t}=this.context.gl;return this.width!==e||this.height!==t}}function iF(e,t){let r,i=!1,n=null,a=()=>{n=null,i&&(e(...r),n=setTimeout(a,t),i=!1)};return(...e)=>(i=!0,r=e,n||a(),n)}iR.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class ij{constructor(e){this._getCurrentHash=()=>{let e=window.location.hash.replace("#","");if(this._hashName){let t;for(let r of e.split("&").map(e=>e.split("=")))r[0]===this._hashName&&(t=r);return(t&&t[1]||"").split("/")}return e.split("/")},this._onHashChange=()=>{let e=this._getCurrentHash();if(!this._isValidHash(e))return!1;let t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0},this._updateHashUnthrottled=()=>{let e=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,e)},this._removeHash=()=>{let e=this._getCurrentHash();if(0===e.length)return;let t=e.join("/"),r=t;r.split("&").length>0&&(r=r.split("&")[0]),this._hashName&&(r=`${this._hashName}=${t}`);let i=window.location.hash.replace(r,"");i.startsWith("#&")?i=i.slice(0,1)+i.slice(2):"#"===i&&(i="");let n=window.location.href.replace(/(#.+)?$/,i);n=n.replace("&&","&"),window.history.replaceState(window.history.state,null,n)},this._updateHash=iF(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 t=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,i=Math.pow(10,Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10)),n=Math.round(t.lng*i)/i,a=Math.round(t.lat*i)/i,o=this._map.getBearing(),s=this._map.getPitch(),l="";if(l+=e?`/${n}/${a}/${r}`:`${r}/${a}/${n}`,(o||s)&&(l+="/"+Math.round(10*o)/10),s&&(l+=`/${Math.round(s)}`),this._hashName){let e=this._hashName,t=!1,r=window.location.hash.slice(1).split("&").map(r=>{let i=r.split("=")[0];return i===e?(t=!0,`${i}=${l}`):r}).filter(e=>e);return t||r.push(`${e}=${l}`),`#${r.join("&")}`}return`#${l}`}_isValidHash(e){if(e.length<3||e.some(isNaN))return!1;try{new t.W(+e[2],+e[1])}catch{return!1}let r=+e[0],i=+(e[3]||0),n=+(e[4]||0);return r>=this._map.getMinZoom()&&r<=this._map.getMaxZoom()&&i>=-180&&i<=180&&n>=this._map.getMinPitch()&&n<=this._map.getMaxPitch()}}let iB={linearity:.3,easing:t.cv(0,0,.3,1)},iN=t.e({deceleration:2500,maxSpeed:1400},iB),iU=t.e({deceleration:20,maxSpeed:1400},iB),iV=t.e({deceleration:1e3,maxSpeed:360},iB),iq=t.e({deceleration:1e3,maxSpeed:90},iB),iH=t.e({deceleration:1e3,maxSpeed:360},iB);class iG{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:v(),settings:e})}_drainInertiaBuffer(){let e=this._inertiaBuffer,t=v();for(;e.length>0&&t-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let r={zoom:0,bearing:0,pitch:0,roll:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:e}of this._inertiaBuffer)r.zoom+=e.zoomDelta||0,r.bearing+=e.bearingDelta||0,r.pitch+=e.pitchDelta||0,r.roll+=e.rollDelta||0,e.panDelta&&r.pan._add(e.panDelta),e.around&&(r.around=e.around),e.pinchAround&&(r.pinchAround=e.pinchAround);let i=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,n={};if(r.pan.mag()){let a=iY(r.pan.mag(),i,t.e({},iN,e||{})),o=r.pan.mult(a.amount/r.pan.mag()),s=this._map.cameraHelper.handlePanInertia(o,this._map.transform);n.center=s.easingCenter,n.offset=s.easingOffset,iW(n,a)}if(r.zoom){let e=iY(r.zoom,i,iU);n.zoom=t.cw(this._map.transform.zoom+e.amount,this._map.getZoomSnap(),e.amount),iW(n,e)}if(r.bearing){let e=iY(r.bearing,i,iV);n.bearing=this._map.transform.bearing+t.al(e.amount,-179,179),iW(n,e)}if(r.pitch){let e=iY(r.pitch,i,iq);n.pitch=this._map.transform.pitch+e.amount,iW(n,e)}if(r.roll){let e=iY(r.roll,i,iH);n.roll=this._map.transform.roll+t.al(e.amount,-179,179),iW(n,e)}if(n.zoom||n.bearing){let e=void 0===r.pinchAround?r.around:r.pinchAround;n.around=e?this._map.unproject(e):this._map.getCenter()}return this.clear(),t.e(n,{noMoveStart:!0})}}function iW(e,t){(!e.duration||e.durationr.unproject(e)),s=a.reduce((e,t,r,i)=>e.add(t.div(i.length)),new t.P(0,0));super(e,{points:a,point:s,lngLats:o,lngLat:r.unproject(s),originalEvent:i}),this._defaultPrevented=!1}}class iX extends t.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,r){super(e,{originalEvent:r}),this._defaultPrevented=!1}}class iK{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new iX(e.type,this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new iZ(e.type,this._map,e))}mouseup(e){this._map.fire(new iZ(e.type,this._map,e))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new iZ(e.type,this._map,e))}dblclick(e){return this._firePreventable(new iZ(e.type,this._map,e))}mouseover(e){this._map.fire(new iZ(e.type,this._map,e))}mouseout(e){this._map.fire(new iZ(e.type,this._map,e))}touchstart(e){return this._firePreventable(new i$(e.type,this._map,e))}touchmove(e){this._map.fire(new i$(e.type,this._map,e))}touchend(e){this._map.fire(new i$(e.type,this._map,e))}touchcancel(e){this._map.fire(new i$(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class iJ{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new iZ(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new iZ("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new iZ(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class iQ{constructor(e){this._map=e}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(e){return this.transform.screenPointToLocation(t.P.convert(e),this._map.terrain)}}class i0{constructor(e,t){this._map=e,this._tr=new iQ(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1,t.boxZoom&&"object"==typeof t.boxZoom&&(this._boxZoomEnd=t.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,t){this.isEnabled()&&e.shiftKey&&0===e.button&&(x.disableDrag(),this._startPos=this._lastPos=t,this._active=!0)}mousemoveWindow(e,t){if(!this._active||this._lastPos.equals(t)||!this._box&&t.dist(this._startPos)e.fitScreenCoordinates(i,r,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(e){this._active&&27===e.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),x.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,r){return this._map.fire(new t.n(e,{originalEvent:r}))}}function i1(e,t){if(e.length!==t.length)throw Error(`The number of touches and points are not equal - touches ${e.length}, points ${t.length}`);let r={};for(let i=0;ithis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),i.length===this.numTouches&&(this.centroid=function(e){let r=new t.P(0,0);for(let t of e)r._add(t);return r.div(e.length)}(r),this.touches=i1(i,r)))}touchmove(e,t,r){if(this.aborted||!this.centroid)return;let i=i1(r,t);for(let e in this.touches){let t=i[e];(!t||t.dist(this.touches[e])>30)&&(this.aborted=!0)}}touchend(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){let e=!this.aborted&&this.centroid;if(this.reset(),e)return e}}}class i3{constructor(e){this.singleTap=new i2(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,t,r){this.singleTap.touchstart(e,t,r)}touchmove(e,t,r){this.singleTap.touchmove(e,t,r)}touchend(e,t,r){let i=this.singleTap.touchend(e,t,r);if(i){let t=e.timeStamp-this.lastTime<500,r=!this.lastTap||30>this.lastTap.dist(i);if(t&&r||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=i,this.count===this.numTaps)return this.reset(),i}}}class i5{constructor(e){this._tr=new iQ(e),this._zoomIn=new i3({numTouches:1,numTaps:2}),this._zoomOut=new i3({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,t,r){this._zoomIn.touchstart(e,t,r),this._zoomOut.touchstart(e,t,r)}touchmove(e,t,r){this._zoomIn.touchmove(e,t,r),this._zoomOut.touchmove(e,t,r)}touchend(e,r,i){let n=this._zoomIn.touchend(e,r,i),a=this._zoomOut.touchend(e,r,i),o=this._tr;return n?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:r=>r.easeTo({duration:300,zoom:t.cw(o.zoom+1,r.getZoomSnap()),around:o.unproject(n)},{originalEvent:e})}):a?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:r=>r.easeTo({duration:300,zoom:t.cw(o.zoom-1,r.getZoomSnap()),around:o.unproject(a)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class i4{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 t=this._moveFunction(...e);if(t.bearingDelta||t.pitchDelta||t.rollDelta||t.around||t.panDelta)return this._active=!0,t}dragStart(e,t){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(t)?t[0]:t,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,t){if(!this.isEnabled())return;let r=this._lastPoint;if(!r)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);let i=Array.isArray(t)?t[0]:t;return!this._moved&&i.dist(r)!0}),t=new i7){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=t}_executeRelevantHandler(e,t,r){return e instanceof MouseEvent?t(e):"u">typeof TouchEvent&&e instanceof TouchEvent?r(e):void 0}startMove(e){this._executeRelevantHandler(e,e=>{this.mouseMoveStateManager.startMove(e)},e=>{this.oneFingerTouchMoveStateManager.startMove(e)})}endMove(e){this._executeRelevantHandler(e,e=>{this.mouseMoveStateManager.endMove(e)},e=>{this.oneFingerTouchMoveStateManager.endMove(e)})}isValidStartEvent(e){return this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidStartEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidStartEvent(e))}isValidMoveEvent(e){return this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidMoveEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(e))}isValidEndEvent(e){return this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidEndEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidEndEvent(e))}}let ne=e=>{e.mousedown=e.dragStart,e.mousemoveWindow=e.dragMove,e.mouseup=e.dragEnd,e.contextmenu=e=>{e.preventDefault()}};class nt{constructor(e,t){this._clickTolerance=e.clickTolerance||1,this._map=t,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,t,r){return this._calculateTransform(e,t,r)}touchmove(e,t,r){if(this._active){if(!this._shouldBePrevented(r.length))return e.preventDefault(),this._calculateTransform(e,t,r);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,t,r){this._calculateTransform(e,t,r),this._active&&this._shouldBePrevented(r.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,r,i){i.length>0&&(this._active=!0);let n=i1(i,r),a=new t.P(0,0),o=new t.P(0,0),s=0;for(let e in n){let t=n[e],r=this._touches[e];r&&(a._add(t),o._add(t.sub(r)),s++,n[e]=t)}if(this._touches=n,this._shouldBePrevented(s)||!o.mag())return;let l=o.div(s);return this._sum._add(l),this._sum.mag()Math.abs(e.x)}class nc extends nr{constructor(e){super(),this._currentTouchCount=0,this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,t,r){super.touchstart(e,t,r),this._currentTouchCount=r.length}_start(e){this._lastPoints=e,nl(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,t,r){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let i=e[0].sub(this._lastPoints[0]),n=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(i,n,r.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:-((i.y+n.y)/2*.5)}):void 0}gestureBeginsVertically(e,t,r){if(void 0!==this._valid)return this._valid;let i=e.mag()>=2,n=t.mag()>=2;if(!i&&!n)return;if(!i||!n)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;let a=e.y>0==t.y>0;return nl(e)&&nl(t)&&a}}let nu=100,nh=15,nd=10;class nf{constructor(e){this._tr=new iQ(e),this._panStep=nu,this._bearingStep=nh,this._pitchStep=nd,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let r=0,i=0,n=0,a=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?i=-1:(e.preventDefault(),a=-1);break;case 39:e.shiftKey?i=1:(e.preventDefault(),a=1);break;case 38:e.shiftKey?n=1:(e.preventDefault(),o=-1);break;case 40:e.shiftKey?n=-1:(e.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(i=0,n=0),{cameraAnimation:s=>{let l=this._tr;s.easeTo({duration:300,easeId:"keyboardHandler",easing:np,zoom:r?t.cw(l.zoom+r*(e.shiftKey?2:1),s.getZoomSnap()):l.zoom,bearing:l.bearing+i*this._bearingStep,pitch:l.pitch+n*this._pitchStep,offset:[-a*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}}function np(e){return e*(2-e)}let nm=1/450;class ng{constructor(e,t){this._onTimeout=e=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},this._map=e,this._tr=new iQ(e),this._triggerRenderFrame=t,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=nm}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around)}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let t=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,r=v(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==t&&t%4.000244140625==0?this._type="wheel":0!==t&&4>Math.abs(t)?this._type="trackpad":i>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=200>Math.abs(i*t)?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,t+=this._lastValue)),e.shiftKey&&t&&(t/=4),this._type&&(this._lastWheelEvent=e,this._delta-=t,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=x.mousePos(this._map.getCanvas(),e),i=this._tr;this._aroundPoint=this._aroundCenter?i.transform.locationToScreenPoint(t.W.convert(i.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("number"==typeof this._lastExpectedZoom){let t=e.zoom-this._lastExpectedZoom;"number"==typeof this._startZoom&&(this._startZoom+=t),"number"==typeof this._targetZoom&&(this._targetZoom+=t)}if(0!==this._delta){let r="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*r)));this._delta<0&&0!==i&&(i=1/i);let n="number"!=typeof this._targetZoom?e.scale:t.ao(this._targetZoom),a=e.applyConstrain(e.getCameraLngLat(),t.ar(n*i)).zoom,o=this._map.getZoomSnap();if("wheel"===this._type&&o>0){let r=t.cw(e.zoom,o);this._targetZoom=t.cw(a,o,a-r)}else this._targetZoom=a;"wheel"===this._type&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let r="number"!=typeof this._targetZoom?e.zoom:this._targetZoom,i=this._startZoom,n=this._easing,a,o=!1;if("wheel"===this._type&&i&&n){let e=Math.min((v()-this._lastWheelEventTime+5)/200,1),s=n(e);a=t.H.number(i,r,s),e<1?this._needsRerender=!0:o=!0}else a=r,o=!0;return this._active=!0,o&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=a,{noInertia:!0,needsRenderFrame:!o,zoomDelta:a-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let r=t.cy;if(this._prevEase){let e=this._prevEase,i=(v()-e.start)/e.duration,n=e.easing(i+.01)-e.easing(i),a=.27/Math.sqrt(n*n+1e-4)*.01,o=Math.sqrt(.0729-a*a);r=t.cv(a,o,.25,1)}return this._prevEase={start:v(),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)}}class ny{constructor(e,t){this._clickZoom=e,this._tapZoom=t}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class nv{constructor(e){this._tr=new iQ(e),this.reset()}reset(){this._active=!1}dblclick(e,r){return e.preventDefault(),{cameraAnimation:i=>{i.easeTo({duration:300,zoom:t.cw(this._tr.zoom+(e.shiftKey?-1:1),i.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}}class nx{constructor(){this._tap=new i3({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,t,r){if(!this._swipePoint)if(this._tapTime){let i=t[0],n=e.timeStamp-this._tapTime<500,a=30>this._tapPoint.dist(i);n&&a?r.length>0&&(this._swipePoint=i,this._swipeTouch=r[0].identifier):this.reset()}else this._tap.touchstart(e,t,r)}touchmove(e,t,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;let i=t[0],n=i.y-this._swipePoint.y;return this._swipePoint=i,e.preventDefault(),this._active=!0,{zoomDelta:n/128*this._zoomRate}}}else this._tap.touchmove(e,t,r)}touchend(e,t,r){if(this._tapTime)this._swipePoint&&0===r.length&&this.reset();else{let i=this._tap.touchend(e,t,r);i&&(this._tapTime=e.timeStamp,this._tapPoint=i)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class nb{constructor(e,t,r){this._el=e,this._mousePan=t,this._touchPan=r}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()}}class n_{constructor(e,t,r,i){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=t,this._mousePitch=r,this._mouseRoll=i}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class nw{constructor(e,t,r,i){this._el=e,this._touchZoom=t,this._touchRotate=r,this._tapDragZoom=i,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()}}class nT{constructor(e,t){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=e,this._options=t,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=x.create("div","maplibregl-cooperative-gesture-screen",e);let t=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");"metaKey"===this._bypassKey&&(t=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let r=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),i=document.createElement("div");i.className="maplibregl-desktop-message",i.textContent=t,this._container.appendChild(i);let n=document.createElement("div");n.className="maplibregl-mobile-message",n.textContent=r,this._container.appendChild(n),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 t.n("cooperativegestureprevented",{gestureType:e,originalEvent:r})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let nM=e=>e.zoom||e.drag||e.roll||e.pitch||e.rotate;class nk extends t.n{}function nA(e){var t;return(null==(t=e.panDelta)?void 0:t.mag())||e.zoomDelta||e.bearingDelta||e.pitchDelta||e.rollDelta}class nS{get _ownerDocument(){var e;return(null==(e=this._el)?void 0:e.ownerDocument)||document}get _ownerWindow(){var e,t;return(null==(t=null==(e=this._el)?void 0:e.ownerDocument)?void 0:t.defaultView)||window}constructor(e,r){this.handleWindowEvent=e=>{this.handleEvent(e,`${e.type}Window`)},this.handleEvent=(e,r)=>{if("blur"===e.type)return void this.stop(!0);this._updatingCamera=!0;let i="renderFrame"===e.type?void 0:e,n={needsRenderFrame:!1},a={},o={};for(let{handlerName:s,handler:l,allowed:c}of this._handlers){let u;if(l.isEnabled()){if(this._blockedByActive(o,c,s))l.reset();else if(l[r||e.type]){if(t.cz(e,r||e.type)){let t=x.mousePos(this._map.getCanvas(),e);u=l[r||e.type](e,t)}else if(t.cA(e,r||e.type)){let t=this._getMapTouches(e.touches),i=x.touchPos(this._map.getCanvas(),t);u=l[r||e.type](e,i,t)}else t.cB(r||e.type)||(u=l[r||e.type](e));this.mergeHandlerResult(n,a,u,s,i),u?.needsRenderFrame&&this._triggerRenderFrame()}(u||l.isActive())&&(o[s]=l)}}let s={};for(let e in this._previousActiveHandlers)o[e]||(s[e]=i);this._previousActiveHandlers=o,(Object.keys(s).length||nA(n))&&(this._changes.push([n,a,s]),this._triggerRenderFrame()),(Object.keys(o).length||nA(n))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:l}=n;l&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],l(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new iG(e),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r);let i=this._el;for(let[e,t,r]of(this._listeners=[[i,"touchstart",{passive:!0}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]],this._listeners))e.addEventListener(t,e===this._ownerDocument?this.handleWindowEvent:this.handleEvent,r)}destroy(){for(let[e,t,r]of this._listeners)e.removeEventListener(t,e===this._ownerDocument?this.handleWindowEvent:this.handleEvent,r)}_addDefaultHandlers(e){let r=this._map,i=r.getCanvasContainer();this._add("mapEvent",new iK(r,e));let n=r.boxZoom=new i0(r,e);this._add("boxZoom",n),e.interactive&&e.boxZoom&&n.enable();let a=r.cooperativeGestures=new nT(r,e.cooperativeGestures);this._add("cooperativeGestures",a),e.cooperativeGestures&&a.enable();let o=new i5(r),s=new nv(r);r.doubleClickZoom=new ny(s,o),this._add("tapZoom",o),this._add("clickZoom",s),e.interactive&&e.doubleClickZoom&&r.doubleClickZoom.enable();let l=new nx;this._add("tapDragZoom",l);let c=r.touchPitch=new nc(r);this._add("touchPitch",c),e.interactive&&e.touchPitch&&r.touchPitch.enable(e.touchPitch);let u=()=>r.project(r.getCenter()),h=function({enable:e,clickTolerance:r,aroundCenter:i=!0,minPixelCenterThreshold:n=100,rotateDegreesPerPixelMoved:a=.8},o){return new i4({clickTolerance:r,move:(e,r)=>{let s=o();if(i&&Math.abs(s.y-e.y)>n)return{bearingDelta:t.cx(new t.P(e.x,r.y),r,s)};let l=(r.x-e.x)*a;return i&&r.y0===e.button&&e.ctrlKey||2===e.button&&!e.ctrlKey}),enable:e,assignEvents:ne})}(e,u),d=function({enable:e,clickTolerance:t,pitchDegreesPerPixelMoved:r=-.5}){return new i4({clickTolerance:t,move:(e,t)=>({pitchDelta:(t.y-e.y)*r}),moveStateManager:new i8({checkCorrectEvent:e=>0===e.button&&e.ctrlKey||2===e.button}),enable:e,assignEvents:ne})}(e),f=function({enable:e,clickTolerance:t,rollDegreesPerPixelMoved:r=.3},i){return new i4({clickTolerance:t,move:(e,t)=>{let n=i(),a=(t.x-e.x)*r;return t.y2===e.button&&e.ctrlKey}),enable:e,assignEvents:ne})}(e,u);r.dragRotate=new n_(e,h,d,f),this._add("mouseRotate",h,["mousePitch"]),this._add("mousePitch",d,["mouseRotate","mouseRoll"]),this._add("mouseRoll",f,["mousePitch"]),e.interactive&&e.dragRotate&&r.dragRotate.enable();let p=function({enable:e,clickTolerance:t}){return new i4({clickTolerance:t,move:(e,t)=>({around:t,panDelta:t.sub(e)}),activateOnStart:!0,moveStateManager:new i8({checkCorrectEvent:e=>0===e.button&&!e.ctrlKey}),enable:e,assignEvents:ne})}(e),m=new nt(e,r);r.dragPan=new nb(i,p,m),this._add("mousePan",p),this._add("touchPan",m,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&r.dragPan.enable(e.dragPan);let g=new ns,y=new na;r.touchZoomRotate=new nw(i,y,g,l),this._add("touchRotate",g,["touchPan","touchZoom"]),this._add("touchZoom",y,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&r.touchZoomRotate.enable(e.touchZoomRotate),this._add("blockableMapEvent",new iJ(r));let v=r.scrollZoom=new ng(r,()=>this._triggerRenderFrame());this._add("scrollZoom",v,["mousePan"]),e.interactive&&e.scrollZoom&&r.scrollZoom.enable(e.scrollZoom);let x=r.keyboard=new nf(r);this._add("keyboard",x),e.interactive&&e.keyboard&&r.keyboard.enable()}_add(e,t,r){this._handlers.push({handlerName:e,handler:t,allowed:r}),this._handlersById[e]=t}stop(e){if(!this._updatingCamera){for(let{handler:e}of this._handlers)e.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!!nM(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,t,r){for(let i in e)if(i!==r&&!t?.includes(i))return!0;return!1}_getMapTouches(e){let t=[];for(let r of e)this._el.contains(r.target)&&t.push(r);return t}mergeHandlerResult(e,r,i,n,a){if(!i)return;t.e(e,i);let o={handlerName:n,originalEvent:i.originalEvent||a};void 0!==i.zoomDelta&&(r.zoom=o),void 0!==i.panDelta&&(r.drag=o),void 0!==i.rollDelta&&(r.roll=o),void 0!==i.pitchDelta&&(r.pitch=o),void 0!==i.bearingDelta&&(r.rotate=o)}_applyChanges(){let e={},r={},i={};for(let[n,a,o]of this._changes)n.panDelta&&(e.panDelta=(e.panDelta||new t.P(0,0))._add(n.panDelta)),n.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+n.zoomDelta),n.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+n.bearingDelta),n.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+n.pitchDelta),n.rollDelta&&(e.rollDelta=(e.rollDelta||0)+n.rollDelta),void 0!==n.around&&(e.around=n.around),void 0!==n.pinchAround&&(e.pinchAround=n.pinchAround),n.noInertia&&(e.noInertia=n.noInertia),t.e(r,a),t.e(i,o);this._updateMapTransform(e,r,i),this._changes=[]}_updateMapTransform(e,t,r){let i=this._map,n=i._getTransformForUpdate(),a=i.terrain;if(!(nA(e)||a&&this._terrainMovement))return void this._fireEvents(t,r,!0);i._stop(!0);let{panDelta:o,zoomDelta:s,bearingDelta:l,pitchDelta:c,rollDelta:u,around:h,pinchAround:d}=e;void 0!==d&&(h=d),h||(h=i.transform.centerPoint),a&&!n.isPointOnMapSurface(h)&&(h=n.centerPoint);let f={panDelta:o,zoomDelta:s,rollDelta:u,pitchDelta:c,bearingDelta:l,around:h};this._map.cameraHelper.useGlobeControls&&!n.isPointOnMapSurface(h)&&(h=n.centerPoint);let p=.01>h.distSqr(n.centerPoint)?n.center:n.screenPointToLocation(o?h.sub(o):h);this._handleMapControls({terrain:a,tr:n,deltasForHelper:f,preZoomAroundLoc:p,combinedEventsInProgress:t,panDelta:o}),i._applyUpdatedTransform(n),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(t,r,!0)}_handleMapControls({terrain:e,tr:t,deltasForHelper:r,preZoomAroundLoc:i,combinedEventsInProgress:n,panDelta:a}){let o=this._map.cameraHelper;(o.handleMapControlsRollPitchBearingZoom(r,t),e)?o.useGlobeControls?(!this._terrainMovement&&(n.drag||n.zoom)&&(this._terrainMovement=!0,this._map._elevationFreeze=!0),o.handleMapControlsPan(r,t,i)):!this._terrainMovement&&(n.drag||n.zoom)?(this._terrainMovement=!0,this._map._elevationFreeze=!0,o.handleMapControlsPan(r,t,i)):n.drag&&this._terrainMovement&&a?t.setCenter(t.screenPointToLocation(t.centerPoint.sub(a))):o.handleMapControlsPan(r,t,i):o.handleMapControlsPan(r,t,i)}_fireEvents(e,r,i){let n=nM(this._eventsInProgress),a=nM(e),o={};for(let t in e){let{originalEvent:r}=e[t];this._eventsInProgress[t]||(o[`${t}start`]=r),this._eventsInProgress[t]=e[t]}for(let e in!n&&a&&this._fireEvent("movestart",a.originalEvent),o)this._fireEvent(e,o[e]);for(let t in a&&this._fireEvent("move",a.originalEvent),e){let{originalEvent:r}=e[t];this._fireEvent(t,r)}let s={},l;for(let e in this._eventsInProgress){let{handlerName:t,originalEvent:i}=this._eventsInProgress[e];this._handlersById[t].isActive()||(delete this._eventsInProgress[e],l=r[t]||i,s[`${e}end`]=l)}for(let e in s)this._fireEvent(e,s[e]);let c=nM(this._eventsInProgress),u=(n||a)&&!c;if(u&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let e=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&e.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(e)}if(i&&u){this._updatingCamera=!0;let e=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),r=e=>0!==e&&-this._bearingSnap{delete this._frameId,this.handleEvent(new nk("renderFrame",{timeStamp:e})),this._applyChanges()})}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}class nE extends t.E{constructor(e,t,r){super(),this._renderFrameCallback=()=>{let e=Math.min((v()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=r.bearingSnap,this._zoomSnap=r.zoomSnap,this.cameraHelper=t,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(e,t){e.apply(this.transform,!0),this.transform=e,this.cameraHelper=t}getCenter(){return new t.W(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,t){return this.jumpTo({elevation:e},t),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,r,i){return e=t.P.convert(e).mult(-1),this.panTo(this.transform.center,t.e({offset:e},r),i)}panTo(e,r,i){return this.easeTo(t.e({center:e},r),i)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(e,r,i){return this.easeTo(t.e({zoom:e},r),i)}zoomIn(e,r){return this.zoomTo(t.cw(this.getZoom()+1,this._zoomSnap),e,r),this}zoomOut(e,r){return this.zoomTo(t.cw(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 t.n("movestart",r)).fire(new t.n("move",r)).fire(new t.n("moveend",r))),this}getBearing(){return this.transform.bearing}setZoomSnap(e){return this._zoomSnap=e,this}getZoomSnap(){return this._zoomSnap}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(e,r,i){return this.easeTo(t.e({bearing:e},r),i)}resetNorth(e,r){return this.rotateTo(0,t.e({duration:1e3},e),r),this}resetNorthPitch(e,r){return this.easeTo(t.e({bearing:0,pitch:0,roll:0,duration:1e3},e),r),this}snapToNorth(e,t){return Math.abs(this.getBearing()){m.easeFunc(t),this.terrain&&!e.freezeElevation&&this._updateElevation(t),this._applyUpdatedTransform(i),this._fireMoveEvents(r)},t=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r,t)},e),this}_prepareEase(e,r,i={}){this._moving=!0,r||i.moving||this.fire(new t.n("movestart",e)),this._zooming&&!i.zooming&&this.fire(new t.n("zoomstart",e)),this._rotating&&!i.rotating&&this.fire(new t.n("rotatestart",e)),this._pitching&&!i.pitching&&this.fire(new t.n("pitchstart",e)),this._rolling&&!i.rolling&&this.fire(new t.n("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){void 0!==this._elevationStart&&void 0!==this._elevationCenter||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let r=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&r!==this._elevationTarget){let t=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(t-(r-(t*e+this._elevationStart))/(1-e)),this._elevationTarget=r}this.transform.setElevation(t.H.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};let t=e.getCameraLngLat(),r=e.getCameraAltitude(),i=this.terrain?this.terrain.getElevationForLngLatZoom(t,e.zoom):0;if(rthis._elevateCameraIfInsideTerrain(e)),this.transformCameraUpdate&&t.push(e=>this.transformCameraUpdate(e)),!t.length)return;let r=e.clone();for(let e of t){let t=r.clone(),{center:i,zoom:n,roll:a,pitch:o,bearing:s,elevation:l}=e(t);i&&t.setCenter(i),void 0!==l&&t.setElevation(l),void 0!==n&&t.setZoom(n),void 0!==a&&t.setRoll(a),void 0!==o&&t.setPitch(o),void 0!==s&&t.setBearing(s),r.apply(t,!1)}this.transform.apply(r,!1)}_fireMoveEvents(e){this.fire(new t.n("move",e)),this._zooming&&this.fire(new t.n("zoom",e)),this._rotating&&this.fire(new t.n("rotate",e)),this._pitching&&this.fire(new t.n("pitch",e)),this._rolling&&this.fire(new t.n("roll",e))}_afterEase(e,r){if(this._easeId&&r&&this._easeId===r)return;delete this._easeId;let i=this._zooming,n=this._rotating,a=this._pitching,o=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,i&&this.fire(new t.n("zoomend",e)),n&&this.fire(new t.n("rotateend",e)),a&&this.fire(new t.n("pitchend",e)),o&&this.fire(new t.n("rollend",e)),this.fire(new t.n("moveend",e))}flyTo(e,r){if(!e.essential&&g.prefersReducedMotion){let i=t.V(e,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(i,r)}this.stop(),"zoom"in(e=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.cy},e))&&this._zoomSnap&&(e.zoom=t.cw(e.zoom,this._zoomSnap));let i=this._getTransformForUpdate(),n=i.bearing,a=i.pitch,o=i.roll,s=i.padding,l="bearing"in e?this._normalizeBearing(e.bearing,n):n,c="pitch"in e?+e.pitch:a,u="roll"in e?this._normalizeBearing(e.roll,o):o,h="padding"in e?e.padding:i.padding,d=t.P.convert(e.offset),f=i.centerPoint.add(d),p=i.screenPointToLocation(f),m=this.cameraHelper.handleFlyTo(i,{bearing:l,pitch:c,roll:u,padding:h,locationAtOffset:p,offsetAsPoint:d,center:e.center,minZoom:e.minZoom,zoom:e.zoom}),y=e.curve,v=Math.max(i.width,i.height),x=v/m.scaleOfZoom,b=m.pixelPathLength;"number"==typeof m.scaleOfMinZoom&&(y=Math.sqrt(v/m.scaleOfMinZoom/b*2));let _=y*y;function w(e){let t=(x*x-v*v+(e?-1:1)*_*_*b*b)/(2*(e?x:v)*_*b);return Math.log(Math.sqrt(t*t+1)-t)}function T(e){return(Math.exp(e)-Math.exp(-e))/2}function M(e){return(Math.exp(e)+Math.exp(-e))/2}let k=w(!1),A=function(e){return M(k)/M(k+y*e)},S=function(e){var t;return v*((M(k)*(T(t=k+y*e)/M(t))-T(k))/_)/b},E=(w(!0)-k)/y;if(2e-6>Math.abs(b)||!isFinite(E)){if(1e-6>Math.abs(v-x))return this.easeTo(e,r);let t=x0,A=e=>Math.exp(t*y*e)}return e.duration="duration"in e?+e.duration:1e3*E/("screenSpeed"in e?e.screenSpeed/y:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=n!==l,this._pitching=c!==a,this._rolling=u!==o,this._padding=!i.isPaddingEqual(h),this._prepareEase(r,!1),this.terrain&&this._prepareElevation(m.targetCenter),this._ease(p=>{let g=p*E,y=1/A(g),v=S(g);this._rotating&&i.setBearing(t.H.number(n,l,p)),this._pitching&&i.setPitch(t.H.number(a,c,p)),this._rolling&&i.setRoll(t.H.number(o,u,p)),this._padding&&(i.interpolatePadding(s,h,p),f=i.centerPoint.add(d)),m.easeFunc(p,y,v,f),this.terrain&&!e.freezeElevation&&this._updateElevation(p),this._applyUpdatedTransform(i),this._fireMoveEvents(r)},()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r)},e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,t){var r;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let e=this._onEaseEnd;delete this._onEaseEnd,e.call(this,t)}return e||null==(r=this.handlers)||r.stop(!1),this}_ease(e,t,r){!1===r.animate||0===r.duration?(e(1),t()):(this._easeStart=v(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=t,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,r){let i=Math.abs((e=t.X(e,-180,180))-r);return Math.abs(e-360-r)MapLibre'};class nL{constructor(e=nC){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=e=>{e&&("metadata"===e.sourceDataType||"visibility"===e.sourceDataType||"style"===e.dataType||"terrain"===e.type)&&this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?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=x.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=x.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=x.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,t){let r=this._map._getUIString(`AttributionControl.${t}`);e.title=r,e.setAttribute("aria-label",r)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(e=>"string"!=typeof e?"":e)):"string"==typeof this.options.customAttribution&&e.push(this.options.customAttribution)),this._map.style.stylesheet){let e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}let t=this._map.style.tileManagers;for(let r in t){let i=t[r];if(i.used||i.usedForTerrain){let t=i.getSource();t.attribution&&!e.includes(t.attribution)&&e.push(t.attribution)}}(e=e.filter(e=>String(e).trim())).sort((e,t)=>e.length-t.length);let r=(e=e.filter((t,r)=>{for(let i=r+1;i{let e=this._container.children;if(e.length){let t=e[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&t.classList.add("maplibregl-compact"):t.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){var t;this._map=e,this._compact=null==(t=this.options)?void 0:t.compact,this._container=x.create("div","maplibregl-ctrl");let r=x.create("a","maplibregl-ctrl-logo");return r.target="_blank",r.rel="noopener nofollow",r.href="https://maplibre.org/",r.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),r.setAttribute("rel","noopener nofollow"),this._container.appendChild(r),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class nI{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){let t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){let t=this._currentlyRunning;for(let r of t?this._queue.concat(t):this._queue)if(r.id===e)return void(r.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw Error("Attempting to run(), but is already running.");let t=this._currentlyRunning=this._queue;for(let r of(this._queue=[],t))if(!r.cancelled&&(r.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var nz=t.aS([{name:"a_pos3d",type:"Int16",components:3}]);class nD extends t.E{constructor(e){super(),this._lastTilesetChange=v(),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}getSource(){return this.tileManager._source}update(e,r){this.tileManager.update(e,r),this._renderableTilesKeys=[];let i={};for(let n of ew(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:r,calculateTileZoom:this.tileManager._source.calculateTileZoom}))i[n.key]=!0,this._renderableTilesKeys.push(n.key),this._tiles[n.key]||(n.terrainRttPosMatrix32f=new Float64Array(16),t.c7(n.terrainRttPosMatrix32f,0,t.a6,t.a6,0,0,1),this._tiles[n.key]=new eu(n,this.tileSize),this._lastTilesetChange=v());for(let e in this._tiles)i[e]||delete this._tiles[e]}freeRtt(e){for(let t in this._tiles){let r=this._tiles[t];(!e||r.tileID.equals(e)||r.tileID.isChildOf(e)||e.isChildOf(r.tileID))&&(r.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,t){return t?this._getTerrainCoordsForTileRanges(e,t):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){let r={};for(let i of this._renderableTilesKeys){let n=this._tiles[i].tileID,a=e.clone(),o=t.bj();if(n.canonical.equals(e.canonical))t.c7(o,0,t.a6,t.a6,0,0,1);else if(n.canonical.isChildOf(e.canonical)){let r=n.canonical.z-e.canonical.z,i=n.canonical.x-(n.canonical.x>>r<>r<>r;t.c7(o,0,s,s,0,0,1),t.Q(o,o,[-i*s,-a*s,0])}else{if(!e.canonical.isChildOf(n.canonical))continue;{let r=e.canonical.z-n.canonical.z,i=e.canonical.x-(e.canonical.x>>r<>r<>r;t.c7(o,0,t.a6,t.a6,0,0,1),t.Q(o,o,[i*s,a*s,0]),t.S(o,o,[1/2**r,1/2**r,0])}}a.terrainRttPosMatrix32f=new Float32Array(o),r[i]=a}return r}_getTerrainCoordsForTileRanges(e,r){let i={};for(let n of this._renderableTilesKeys){let a=this._tiles[n].tileID;if(!this._isWithinTileRanges(a,r))continue;let o=e.clone(),s=t.bj();if(a.canonical.z===e.canonical.z){let r=e.canonical.x-a.canonical.x+e.wrap*(1<e.canonical.z){let r=a.canonical.z-e.canonical.z,i=a.canonical.x-(a.canonical.x>>r<>r<>r),l=e.canonical.y-(a.canonical.y>>r),c=t.a6>>r;t.c7(s,0,c,c,0,0,1),t.Q(s,s,[-i*c+o*t.a6,-n*c+l*t.a6,0])}else{let r=e.canonical.z-a.canonical.z,i=e.canonical.x-(e.canonical.x>>r<>r<>r)-a.canonical.x,l=(e.canonical.y>>r)-a.canonical.y,c=t.a6<n.maxzoom&&(a=n.maxzoom),a=n.minzoom&&!o?.dem;)o=this.findTileInCaches(e.scaledTo(a--).key);return o}findTileInCaches(e){let t=this.tileManager.getTileByID(e);return t||(t=this.tileManager._outOfViewCache.getByKey(e))}anyTilesAfterTime(e=Date.now()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,t){let r=t[e.canonical.z];return!!r&&(e.wrap>r.minWrap||e.wrap=r.minTileXWrapped&&e.canonical.x<=r.maxTileXWrapped&&e.canonical.y>=r.minTileY&&e.canonical.y<=r.maxTileY)}}class nO{constructor(e,t,r){this._meshCache={},this.painter=e,this.tileManager=new nD(t),this.options=r,this.exaggeration="number"==typeof r.exaggeration?r.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){for(let e in this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null),this._meshCache)this._meshCache[e].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(e,r,i,n=t.a6){var a;let o=e.normalizeCoordinates(r,i,n);if(!o)return 0;let s=this.getTerrainData(o.tileID),l=null==(a=s.tile)?void 0:a.dem;if(!l)return 0;let c=t.cC([],[o.x/n*t.a6,o.y/n*t.a6],s.u_terrain_matrix),u=[c[0]*l.dim,c[1]*l.dim],h=Math.floor(u[0]),d=Math.floor(u[1]),f=u[0]-h,p=u[1]-d;return l.get(h,d)*(1-f)*(1-p)+l.get(h+1,d)*f*(1-p)+l.get(h,d+1)*(1-f)*p+l.get(h+1,d+1)*f*p}getElevationForLngLatZoom(e,r){if(!t.cD(r,e.wrap()))return 0;let{tileID:i,mercatorX:n,mercatorY:a}=this._getOverscaledTileIDFromLngLatZoom(e,r);return this.getElevation(i,n%t.a6,a%t.a6,t.a6)}getElevationForLngLat(e,t){let r=ew(t,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),i=0;for(let e of r)e.canonical.z>i&&(i=Math.min(e.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(e,i)}getElevation(e,r,i,n=t.a6){return this.getDEMElevation(e,r,i,n)*this.exaggeration}getTerrainData(e){var r,i;if(!this._emptyDemTexture){let e=this.painter.context,r=new t.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new t.T(e,r,e.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new t.T(e,new t.R({width:1,height:1}),e.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=t.ap([])}let n=this.tileManager.getSourceTile(e,!0);if(n?.dem&&(!n.demTexture||n.needsTerrainPrepare)){let e=this.painter.context;n.demTexture=this.painter.getTileTexture(n.dem.stride),n.demTexture?n.demTexture.update(n.dem.getPixels(),{premultiply:!1}):n.demTexture=new t.T(e,n.dem.getPixels(),e.gl.RGBA,{premultiply:!1}),n.demTexture.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),n.needsTerrainPrepare=!1}let a=n&&n.toString()+n.tileID.key+e.key;if(a&&!this._demMatrixCache[a]){let r=this.tileManager.getSource().maxzoom,i=e.canonical.z-n.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=r?i=e.canonical.z-r:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let o=e.canonical.x-(e.canonical.x>>i<>i<>8<<4|e>>8,r[t+3]=0;let i=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(r.buffer)),n=new t.T(e,i,e.gl.RGBA,{premultiply:!1});return n.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=n,n}pointCoordinate(e){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let r=new Uint8Array(4),i=this.painter.context,n=i.gl,a=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),o=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),s=Math.round(this.painter.height/devicePixelRatio);i.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),n.readPixels(a,s-o-1,1,1,n.RGBA,n.UNSIGNED_BYTE,r),i.bindFramebuffer.set(null);let l=r[0]+(r[2]>>4<<8),c=r[1]+((15&r[2])<<8),u=this.coordsIndex[255-r[3]],h=u&&this.tileManager.getTileByID(u);if(!h)return null;let d=this._coordsTextureSize,f=(1<0,n=i&&0===e.canonical.y,a=i&&e.canonical.y===(1<e.id!==t),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(let e of this._recentlyUsed)if(!this._objects[e].inUse)return this._objects[e];if(this._objects.length>=this._size)throw Error("No free RenderPool available, call freeAllObjects() required!");let e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(let e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length!e.inUse)}}let nF={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class nj{constructor(e,t){this.painter=e,this.terrain=t,this.pool=new nR(e.context,30,t.tileManager.tileSize*t.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,t){var r,i,n;for(let r in this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=e._order.filter(r=>!e._layers[r].isHidden(t)),this._coordsAscending={},e.tileManagers){this._coordsAscending[r]={};let t=e.tileManagers[r].getVisibleCoordinates(),i=e.tileManagers[r].getSource(),a=i instanceof et?i.terrainTileRanges:null;for(let e of t){let t=this.terrain.tileManager.getTerrainCoords(e,a);for(let e in t)(n=this._coordsAscending[r])[e]||(n[e]=[]),this._coordsAscending[r][e].push(t[e])}}for(let t of(this._rttFingerprints={},e._order)){let n=e._layers[t],a=n.source;if(nF[n.type]&&!this._rttFingerprints[a]){this._rttFingerprints[a]={};let t=null!=(i=null==(r=e.tileManagers[a])?void 0:r.getState().revision)?i:0;for(let e in this._coordsAscending[a])this._rttFingerprints[a][e]=`${this._coordsAscending[a][e].map(e=>e.key).sort().join()}#${t}`}}for(let e of this._renderableTiles)for(let t in this._rttFingerprints){let r=this._rttFingerprints[t][e.tileID.key];r&&r!==e.rttFingerprint[t]&&(e.rtt=[])}}renderLayer(e,r){if(e.isHidden(this.painter.transform.zoom))return!1;let i=Object.assign(Object.assign({},r),{isRenderingToTexture:!0}),n=e.type,a=this.painter,o=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(nF[n]&&(this._prevType&&nF[this._prevType]||this._stacks.push([]),this._prevType=n,this._stacks[this._stacks.length-1].push(e.id),!o))return!0;if(nF[this._prevType]||nF[n]&&o){this._prevType=n;let e=this._stacks.length-1,r=this._stacks[e]||[];for(let n of this._renderableTiles){if(this.pool.isFull()&&(iz(this.painter,this.terrain,this._rttTiles,i),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(n),n.rtt[e]){let t=this.pool.getObjectForId(n.rtt[e].id);if(t.stamp===n.rtt[e].stamp){this.pool.useObject(t);continue}}let o=this.pool.getOrCreateFreeObject();for(let s of(this.pool.useObject(o),this.pool.stampObject(o),n.rtt[e]={id:o.id,stamp:o.stamp},a.context.bindFramebuffer.set(o.fbo.framebuffer),a.context.clear({color:t.bo.transparent,stencil:0}),a.currentStencilSource=void 0,r)){let e=a.style._layers[s],t=e.source?this._coordsAscending[e.source][n.tileID.key]:[n.tileID];a.context.viewport.set([0,0,o.fbo.width,o.fbo.height]),a._renderTileClippingMasks(e,t,!0),a.renderLayer(a,a.style.tileManagers[e.source],e,t,i),e.source&&(n.rttFingerprint[e.source]=this._rttFingerprints[e.source][n.tileID.key])}}return iz(this.painter,this.terrain,this._rttTiles,i),this._rttTiles=[],this.pool.freeAllObjects(),nF[n]}return!1}}let nB={"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 ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},nN={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:nC,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:t.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},nU=class extends nE{get _ownerWindow(){var e,t;return(null==(t=null==(e=this._container)?void 0:e.ownerDocument)?void 0:t.defaultView)||window}constructor(e){var r,i,n;let a=Object.assign(Object.assign(Object.assign({},nN),e),{canvasContextAttributes:Object.assign(Object.assign({},nN.canvasContextAttributes),e.canvasContextAttributes)});if(null!=a.minZoom&&null!=a.maxZoom&&a.minZoom>a.maxZoom)throw Error("maxZoom must be greater than or equal to minZoom");if(null!=a.minPitch&&null!=a.maxPitch&&a.minPitch>a.maxPitch)throw Error("maxPitch must be greater than or equal to minPitch");if(null!=a.minPitch&&a.minPitch<0)throw Error("minPitch must be greater than or equal to 0");if(null!=a.maxPitch&&a.maxPitch>180)throw Error("maxPitch must be less than or equal to 180");let o=new tv,s=new tw;void 0!==a.minZoom&&o.setMinZoom(a.minZoom),void 0!==a.maxZoom&&o.setMaxZoom(a.maxZoom),void 0!==a.minPitch&&o.setMinPitch(a.minPitch),void 0!==a.maxPitch&&o.setMaxPitch(a.maxPitch),void 0!==a.renderWorldCopies&&o.setRenderWorldCopies(a.renderWorldCopies),null!==a.transformConstrain&&o.setConstrainOverride(a.transformConstrain),super(o,s,{bearingSnap:a.bearingSnap,zoomSnap:a.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new nI,this._controls=[],this._mapId=t.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=e=>{if(e.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let e of Object.values(this.style._layers))if("custom"===e.type&&console.warn(`Custom layer with id '${e.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),e._listeners)for(let[t]of Object.entries(e._listeners))console.warn(`Custom layer with id '${e.id}' had event listeners for event '${t}' 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 t.n("webglcontextlost",{originalEvent:e}))}else this.fire(new t.n("webglcontextlost",{originalEvent:e}))},this._contextRestored=e=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new t.n("webglcontextrestored",{originalEvent:e}))},this._onMapScroll=e=>{if(e.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=a.interactive,this._maxTileCacheSize=a.maxTileCacheSize,this._maxTileCacheZoomLevels=a.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},a.canvasContextAttributes),this._trackResize=!0===a.trackResize,this._bearingSnap=a.bearingSnap,this._zoomSnap=a.zoomSnap,this._centerClampedToGround=a.centerClampedToGround,this._refreshExpiredTiles=!0===a.refreshExpiredTiles,this._fadeDuration=a.fadeDuration,this._crossSourceCollisions=!0===a.crossSourceCollisions,this._collectResourceTiming=!0===a.collectResourceTiming,this._locale=Object.assign(Object.assign({},nB),a.locale),this._clickTolerance=a.clickTolerance,this._overridePixelRatio=a.pixelRatio,this._maxCanvasSize=a.maxCanvasSize,this._zoomLevelsToOverscale=a.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=a.transformCameraUpdate,this.transformConstrain=a.transformConstrain,this.cancelPendingTileRequestsWhileZooming=!0===a.cancelPendingTileRequestsWhileZooming,this.setAnisotropicFilterPitch(a.anisotropicFilterPitch),void 0!==a.reduceMotion&&(g.prefersReducedMotion=a.reduceMotion),this._imageQueueHandle=l.addThrottleControl(()=>this.isMoving()),this._requestManager=new b(a.transformRequest),this._container=this._resolveContainer(a.container),a.maxBounds&&this.setMaxBounds(a.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),"u">typeof window&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new nS(this,a),this._hash=a.hash?new ij("string"==typeof a.hash&&a.hash||void 0).addTo(this):void 0,null!=(r=this._hash)&&r._onHashChange()||(this.jumpTo({center:a.center,elevation:a.elevation,zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,roll:a.roll}),a.bounds&&(this.resize(),this.fitBounds(a.bounds,t.e({},a.fitBoundsOptions,{duration:0}))));let c="string"==typeof a.style||(null==(n=null==(i=a.style)?void 0:i.projection)?void 0:n.type)!=="globe";this.resize(null,c),this._localIdeographFontFamily=a.localIdeographFontFamily,this._validateStyle=a.validateStyle,a.style&&this.setStyle(a.style,{localIdeographFontFamily:a.localIdeographFontFamily}),a.attributionControl&&this.addControl(new nL("boolean"==typeof a.attributionControl?void 0:a.attributionControl)),a.maplibreLogo&&this.addControl(new nP,a.logoPosition),this.on("style.load",()=>{if(c||this._resizeTransform(),this.transform.unmodified){let e=t.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(e)}}),this.on("data",e=>{this._update("style"===e.dataType),this.fire(new t.n(`${e.dataType}data`,e))}),this.on("dataloading",e=>{this.fire(new t.n(`${e.dataType}dataloading`,e))}),this.on("dataabort",e=>{this.fire(new t.n("sourcedataabort",e))})}_getMapId(){return this._mapId}setGlobalStateProperty(e,t){return this.style.setGlobalStateProperty(e,t),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(e,r){if(void 0===r&&(r=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e?.onAdd)return this.fire(new t.l(Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let i=e.onAdd(this);this._controls.push(e);let n=this._controlPositions[r];return r.includes("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this}removeControl(e){if(!e?.onRemove)return this.fire(new t.l(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 ew(this.transform,e)}calculateCameraOptionsFromTo(e,t,r,i){return null==i&&this.terrain&&(i=this.terrain.getElevationForLngLat(r,this.transform)),super.calculateCameraOptionsFromTo(e,t,r,i)}resize(e,r=!0){if(null!==this._lostContextStyle.style)return this;this._resizeInternal(r);let i=!this._moving;return i&&(this.stop(),this.fire(new t.n("movestart",e)).fire(new t.n("move",e))),this.fire(new t.n("resize",e)),i&&this.fire(new t.n("moveend",e)),this}_resizeInternal(e=!0){let[t,r]=this._containerDimensions(),i=this._getClampedPixelRatio(t,r);if(this._resizeCanvas(t,r,i),this.painter.resize(t,r,i),this.painter.overLimit()){let e=this.painter.context.gl;this._maxCanvasSize=[e.drawingBufferWidth,e.drawingBufferHeight];let i=this._getClampedPixelRatio(t,r);this._resizeCanvas(t,r,i),this.painter.resize(t,r,i)}this._resizeTransform(e)}_resizeTransform(e=!0){var t;let[r,i]=this._containerDimensions();this.transform.resize(r,i,e),null==(t=this._requestedCameraState)||t.resize(r,i,e)}_getClampedPixelRatio(e,t){let{0:r,1:i}=this._maxCanvasSize,n=this.getPixelRatio(),a=e*n,o=t*n;return Math.min(a>r?r/a:1,o>i?i/o:1)*n}getPixelRatio(){var e;return null!=(e=this._overridePixelRatio)?e:devicePixelRatio}setPixelRatio(e){this._overridePixelRatio=e,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(e){return this.transform.setMaxBounds(G.convert(e)),this._update()}setMinZoom(e){if((e=e??-2)>=-2&&e<=this.transform.maxZoom){let r=this.transform.zoom,i=this._getTransformForUpdate();return i.setMinZoom(e),this._applyUpdatedTransform(i),this._update(),r!==this.transform.zoom&&this.fire(new t.n("zoomstart")).fire(new t.n("zoom")).fire(new t.n("zoomend")).fire(new t.n("movestart")).fire(new t.n("move")).fire(new t.n("moveend")),this}throw Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(e){if((e=e??22)>=this.transform.minZoom){let r=this.transform.zoom,i=this._getTransformForUpdate();return i.setMaxZoom(e),this._applyUpdatedTransform(i),this._update(),r!==this.transform.zoom&&this.fire(new t.n("zoomstart")).fire(new t.n("zoom")).fire(new t.n("zoomend")).fire(new t.n("movestart")).fire(new t.n("move")).fire(new t.n("moveend")),this}throw Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(e){if((e=e??0)<0)throw Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch){let r=this.transform.pitch,i=this._getTransformForUpdate();return i.setMinPitch(e),this._applyUpdatedTransform(i),this._update(),r!==this.transform.pitch&&this.fire(new t.n("pitchstart")).fire(new t.n("pitch")).fire(new t.n("pitchend")).fire(new t.n("movestart")).fire(new t.n("move")).fire(new t.n("moveend")),this}throw Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(e){if((e=e??60)>180)throw Error("maxPitch must be less than or equal to 180");if(e>=this.transform.minPitch){let r=this.transform.pitch,i=this._getTransformForUpdate();return i.setMaxPitch(e),this._applyUpdatedTransform(i),this._update(),r!==this.transform.pitch&&this.fire(new t.n("pitchstart")).fire(new t.n("pitch")).fire(new t.n("pitchend")).fire(new t.n("movestart")).fire(new t.n("move")).fire(new t.n("moveend")),this}throw Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(e){if((e=e??20)>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.transform.renderWorldCopies}setRenderWorldCopies(e){return this.transform.setRenderWorldCopies(e),this._update()}setTransformConstrain(e){return this.transform.setConstrainOverride(e),this._update()}project(e){return this.transform.locationToScreenPoint(t.W.convert(e),this.style&&this.terrain)}unproject(e){return this.transform.screenPointToLocation(t.P.convert(e),this.terrain)}isMoving(){var e;return this._moving||(null==(e=this.handlers)?void 0:e.isMoving())}isZooming(){var e;return this._zooming||(null==(e=this.handlers)?void 0:e.isZooming())}isRotating(){var e;return this._rotating||(null==(e=this.handlers)?void 0:e.isRotating())}_createDelegatedListener(e,t,r){if("mouseenter"===e||"mouseover"===e){let i=!1;return{layers:t,listener:r,delegates:{mousemove:n=>{let a=t.filter(e=>this.getLayer(e)),o=0!==a.length?this.queryRenderedFeatures(n.point,{layers:a}):[];o.length?i||(i=!0,r.call(this,new iZ(e,this,n.originalEvent,{features:o}))):i=!1},mouseout:()=>{i=!1}}}}if("mouseleave"===e||"mouseout"===e){let i=!1;return{layers:t,listener:r,delegates:{mousemove:n=>{let a=t.filter(e=>this.getLayer(e));(0!==a.length?this.queryRenderedFeatures(n.point,{layers:a}):[]).length?i=!0:i&&(i=!1,r.call(this,new iZ(e,this,n.originalEvent)))},mouseout:t=>{i&&(i=!1,r.call(this,new iZ(e,this,t.originalEvent)))}}}}{let i=e=>{let i=t.filter(e=>this.getLayer(e)),n=0!==i.length?this.queryRenderedFeatures(e.point,{layers:i}):[];n.length&&(e.features=n,r.call(this,e),delete e.features)};return{layers:t,listener:r,delegates:{[e]:i}}}}_saveDelegatedListener(e,t){var r;this._delegatedListeners||(this._delegatedListeners={}),(r=this._delegatedListeners)[e]||(r[e]=[]),this._delegatedListeners[e].push(t)}_removeDelegatedListener(e,t,r){var i;if(!(null!=(i=this._delegatedListeners)&&i[e]))return;let n=this._delegatedListeners[e];for(let e=0;et.includes(e))){for(let e in i.delegates)this.off(e,i.delegates[e]);return void n.splice(e,1)}}}on(e,t,r){if(void 0===r)return super.on(e,t);let i="string"==typeof t?[t]:t,n=this._createDelegatedListener(e,i,r);for(let t in this._saveDelegatedListener(e,n),n.delegates)this.on(t,n.delegates[t]);return{unsubscribe:()=>{this._removeDelegatedListener(e,i,r)}}}once(e,t,r){if(void 0===r)return super.once(e,t);let i="string"==typeof t?[t]:t,n=this._createDelegatedListener(e,i,r);for(let t in n.delegates){let a=n.delegates[t];n.delegates[t]=(...t)=>{this._removeDelegatedListener(e,i,r),a(...t)}}for(let t in this._saveDelegatedListener(e,n),n.delegates)this.once(t,n.delegates[t]);return this}off(e,t,r){return void 0===r?super.off(e,t):(this._removeDelegatedListener(e,"string"==typeof t?[t]:t,r),this)}queryRenderedFeatures(e,r){if(!this.style)return[];let i,n=e instanceof t.P||Array.isArray(e),a=n?e:[[0,0],[this.transform.width,this.transform.height]];if(r||(r=(n?{}:e)||{}),a instanceof t.P||"number"==typeof a[0])i=[t.P.convert(a)];else{let e=t.P.convert(a[0]),r=t.P.convert(a[1]);i=[e,new t.P(r.x,e.y),r,new t.P(e.x,r.y),e]}return this.style.queryRenderedFeatures(i,r,this.transform)}querySourceFeatures(e,t){return this.style.querySourceFeatures(e,t)}setStyle(e,r){return!1!==(r=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},r)).diff&&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 t=this._locale[e];if(null==t)throw Error(`Missing UI string '${e}'`);return t}_updateStyle(e,t){var r,i,n;if(null==(r=this._diffStyleRequest)||r.abort(),this._diffStyleRequest=null,t.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(e,t));let a=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!e)),e?(this.style=new t3(this,t||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e,t,a):this.style.loadJSON(e,t,a)):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),null==(n=null==(i=this.style)?void 0:i.projection)||n.destroy(),delete this.style),this}_lazyInitEmptyStyle(){this.style||(this.style=new t3(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(e,r){return t._(this,void 0,void 0,function*(){var i;if(null==(i=this._diffStyleRequest)||i.abort(),"string"==typeof e){this._diffStyleRequest=new AbortController;let i=this._diffStyleRequest;try{let n=yield this._requestManager.transformRequest(e,"Style");if(i.signal.aborted)return void(this._diffStyleRequest=null);let a=yield t.k(n,i);this._diffStyleRequest=null,this._updateDiff(a.data,r)}catch(e){this._diffStyleRequest=null,t.$(e)||this.fire(new t.l(t.d(e)))}}else"object"==typeof e&&(this._diffStyleRequest=null,this._updateDiff(e,r))})}_updateDiff(e,r){try{this.style.setState(e,r)&&this._update(!0)}catch(i){t.w(`Unable to perform style diff: ${t.d(i).message}. Rebuilding the style from scratch.`),this._updateStyle(e,r)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();t.w("There is no style added to the map.")}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(e){var r;let i=null==(r=this.style)?void 0:r.tileManagers[e];if(void 0!==i)return i.loaded();this.fire(new t.l(Error(`There is no tile manager with ID '${e}'`)))}setTerrain(e){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),e){let r=this.style.tileManagers[e.source];if(!r)throw Error(`cannot load terrain, because there exists no source with ID: ${e.source}`);for(let i in null===this.terrain&&r.reload(),this.style._layers){let r=this.style._layers[i];"hillshade"===r.type&&r.source===e.source&&t.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),"color-relief"===r.type&&r.source===e.source&&t.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new nO(this.painter,r,e),this.painter.renderToTexture=new nj(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=t=>{var r;"style"===t.dataType?this.terrain.tileManager.freeRtt():"source"===t.dataType&&t.tile&&(t.sourceId!==e.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),(null==(r=t.source)?void 0:r.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(t.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new t.n("terrain",{terrain:e})),this}getTerrain(){var e,t;return null!=(t=null==(e=this.terrain)?void 0:e.options)?t:null}areTilesLoaded(){var e;for(let t of Object.values(null==(e=this.style)?void 0:e.tileManagers))if(!t.areTilesLoaded())return!1;return!0}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){return this.style.getSource(e)}setSourceTileLodParams(e,t,r){if(r){let i=this.getSource(r);if(!i)throw Error(`There is no source with ID "${r}", cannot set LOD parameters`);i.calculateTileZoom=ex(Math.max(1,e),Math.max(1,t))}else for(let r in this.style.tileManagers)this.style.tileManagers[r].getSource().calculateTileZoom=ex(Math.max(1,e),Math.max(1,t));return this._update(!0),this}refreshTiles(e,r){let i=this.style.tileManagers[e];if(!i)throw Error(`There is no tile manager with ID "${e}", cannot refresh tile`);void 0===r?i.reload(!0):i.refreshTiles(r.map(e=>new t.aa(e.z,e.x,e.y)))}addImage(e,r,i={}){let{pixelRatio:n=1,sdf:a=!1,stretchX:o,stretchY:s,content:l,textFitWidth:c,textFitHeight:u}=i;if(this._lazyInitEmptyStyle(),!(r instanceof HTMLImageElement||t.b(r))){if(void 0===r.width||void 0===r.height)return this.fire(new t.l(Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:i,height:h,data:d}=r;return this.style.addImage(e,{data:new t.R({width:i,height:h},new Uint8Array(d)),pixelRatio:n,stretchX:o,stretchY:s,content:l,textFitWidth:c,textFitHeight:u,sdf:a,version:0,userImage:r}),r.onAdd&&r.onAdd(this,e),this}}{let{width:i,height:h,data:d}=g.getImageData(r);this.style.addImage(e,{data:new t.R({width:i,height:h},d),pixelRatio:n,stretchX:o,stretchY:s,content:l,textFitWidth:c,textFitHeight:u,sdf:a,version:0})}}updateImage(e,r){let i=this.style.getImage(e);if(!i)return this.fire(new t.l(Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let{width:n,height:a,data:o}=r instanceof HTMLImageElement||t.b(r)?g.getImageData(r):r;if(void 0===n||void 0===a)return this.fire(new t.l(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(n!==i.data.width||a!==i.data.height)return this.fire(new t.l(Error("The width and height of the updated image must be that same as the previous version of the image")));let s=!(r instanceof HTMLImageElement||t.b(r));return i.data.replace(o,s),this.style.updateImage(e,i),this}getImage(e){return this.style.getImage(e)}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new t.l(Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(e){return t._(this,void 0,void 0,function*(){return l.getImage((yield this._requestManager.transformRequest(e,"Image")),new AbortController)})}listImages(){return this.style.listImages()}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){return this.style.getLayer(e)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(e,t,r){return this.style.setLayerZoomRange(e,t,r),this._update(!0)}setFilter(e,t,r={}){return this.style.setFilter(e,t,r),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,r,i={}){return this.style.setPaintProperty(e,t,r,i),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,r,i={}){return this.style.setLayoutProperty(e,t,r,i),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setGlyphs(e,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(e,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(e,t,r={}){return this._lazyInitEmptyStyle(),this.style.addSprite(e,t,r,e=>{e||this._update(!0)}),this}removeSprite(e){return this._lazyInitEmptyStyle(),this.style.removeSprite(e),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(e,t,e=>{e||this._update(!0)}),this}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setSky(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSky(e,t),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),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,t=0;return this._container&&(e=this._container.clientWidth||400,t=this._container.clientHeight||300),[e,t]}_setupResizeObserver(){var e;let t=!1,r=iF(e=>{this._trackResize&&!this._removed&&(this.resize(e),this.redraw())},50),i=null!=(e=this._ownerWindow.ResizeObserver)?e:ResizeObserver;this._resizeObserver=new i(e=>{t?r(e):t=!0}),this._resizeObserver.observe(this._container)}_resolveContainer(e){if("string"==typeof e){let t=document.getElementById(e);if(!t)throw Error(`Container '${e}' not found.`);return t}if(e instanceof HTMLElement||e&&"object"==typeof e&&1===e.nodeType)return e;throw Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let e=this._container;e.classList.add("maplibregl-map");let t=this._canvasContainer=x.create("div","maplibregl-canvas-container",e);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=x.create("canvas","maplibregl-canvas",t),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 r=this._containerDimensions(),i=this._getClampedPixelRatio(r[0],r[1]);this._resizeCanvas(r[0],r[1],i);let n=this._controlContainer=x.create("div","maplibregl-control-container",e),a=this._controlPositions={};for(let e of["top-left","top-right","bottom-left","bottom-right"])a[e]=x.create("div",`maplibregl-ctrl-${e} `,n);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(e,t,r){this._canvas.width=Math.floor(r*e),this._canvas.height=Math.floor(r*t),this._canvas.style.width=`${e}px`,this._canvas.style.height=`${t}px`}_setupPainter(){let e=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),t=null;this._canvas.addEventListener("webglcontextcreationerror",r=>{t={requestedAttributes:e},r&&(t.statusMessage=r.statusMessage,t.type=r.type)},{once:!0});let r=null;if(!(r=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,e):this._canvas.getContext("webgl2",e)||this._canvas.getContext("webgl",e))){let e="Failed to initialize WebGL";throw t?(t.message=e,Error(JSON.stringify(t))):Error(e)}this.painter=new iR(r,this.transform)}migrateProjection(e,r){super.migrateProjection(e,r),this.painter.transform=e,this.fire(new t.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){var t;return null!=(t=this.style)&&t._loaded&&(this._styleDirty||(this._styleDirty=e),this._sourcesDirty=!0,this.triggerRepaint()),this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_render(e){var r,i,n,a,o,s;let l=this._idleTriggered?this._fadeDuration:0,c=(null==(r=this.style.projection)?void 0:r.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),this._removed)return;let u=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let e=this.transform.zoom,r=v();this.style.zoomHistory.update(e,r);let i=new t.J(e,{now:r,fadeDuration:l,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),n=i.crossFadingFactor();1===n&&n===this._crossFadingFactor||(u=!0,this._crossFadingFactor=n),this.style.update(i)}let h=(null==(i=this.style.projection)?void 0:i.transitionState)>0!==c;null==(n=this.style.projection)||n.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState(null==(a=this.style.projection)?void 0:a.transitionState,null==(o=this.style.projection)?void 0:o.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||h)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=null==(s=this.style)?void 0:s._updatePlacement(this.transform,this.showCollisionBoxes,l,this._crossSourceCollisions,h),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:l,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new t.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.n("load"))),this.style&&(this.style.hasTransitions()||u)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let d=this._sourcesDirty||this._styleDirty||this._placementDirty;return d||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.n("idle")),!this._loaded||this._fullyLoaded||d||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var e,r;for(let e of(this._hash&&this._hash.remove(),this._controls))e.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),null==(e=this._diffStyleRequest)||e.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),"u">typeof window&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),l.removeThrottleControl(this._imageQueueHandle),null==(r=this._resizeObserver)||r.disconnect();let i=this.painter.context.gl.getExtension("WEBGL_lose_context");i?.loseContext&&i.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new t.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,g.frame(this._frameRequest,e=>{this._frameRequest=null;try{this._render(e)}catch(e){if(!t.$(e)&&e.message!==io)throw e}},()=>{},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 h}getCameraTargetElevation(){return this.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};class nq{constructor(e,r,i=!1){this.mousedown=e=>{this.startMove(e,x.mousePos(this.element,e)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=e=>{this.move(e,x.mousePos(this.element,e))},this.mouseup=e=>{this._rotatePitchHandler.dragEnd(e),this.offTemp()},this.touchstart=e=>{1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=x.touchPos(this.element,e.targetTouches)[0],this.startMove(e,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=e=>{1!==e.targetTouches.length?this.reset():(this._lastPos=x.touchPos(this.element,e.targetTouches)[0],this.move(e,this._lastPos))},this.touchend=e=>{0===e.targetTouches.length&&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 n=new i9;this._rotatePitchHandler=new i4({clickTolerance:3,move:(e,n)=>{let a=r.getBoundingClientRect(),o=new t.P((a.bottom-a.top)/2,(a.right-a.left)/2);return{bearingDelta:t.cx(new t.P(e.x,n.y),n,o),pitchDelta:i?-.5*(n.y-e.y):void 0}},moveStateManager:n,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,t){this._rotatePitchHandler.dragStart(e,t),x.disableDrag()}move(e,t){let r=this.map,{bearingDelta:i,pitchDelta:n}=this._rotatePitchHandler.dragMove(e,t)||{};i&&r.setBearing(r.getBearing()+i),n&&r.setPitch(r.getPitch()+n)}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(){x.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}function nH(e,r,i,n=!1){if(n||!i.getCoveringTilesDetailsProvider().allowWorldCopies())return e?.wrap();let a=new t.W(e.lng,e.lat);if(e=new t.W(e.lng,e.lat),r){let n=new t.W(e.lng-360,e.lat),a=new t.W(e.lng+360,e.lat),o=i.locationToScreenPoint(e).distSqr(r);i.locationToScreenPoint(n).distSqr(r)180;){let t=i.locationToScreenPoint(e);if(t.x>=0&&t.y>=0&&t.x<=i.width&&t.y<=i.height)break;e.lng>i.center.lng?e.lng-=360:e.lng+=360}return e.lng!==a.lng&&i.isPointOnMapSurface(i.locationToScreenPoint(e))?e:a}let nG={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function nW(e,t,r){let i=e.classList;for(let e in nG)i.remove(`maplibregl-${r}-anchor-${e}`);i.add(`maplibregl-${r}-anchor-${t}`)}class nY extends t.E{constructor(e){if(super(),this._onClick=e=>{this.fire(new t.n("click",{originalEvent:e}))},this._onKeyPress=e=>{"Space"!==e.code&&"Enter"!==e.code||this.togglePopup()},this._onMapClick=e=>{let t=e.originalEvent.target,r=this._element;this._popup&&(t===r||r.contains(t))&&this.togglePopup()},this._update=e=>{if(!this._map)return;let t=this._map.loaded()&&!this._map.isMoving();e?.type!=="terrain"&&(e?.type!=="render"||t)||this._map.once("render",this._update),this._lngLat=nH(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let r="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?r=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(r=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let i="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?i="rotateX(0deg)":"map"===this._pitchAlignment&&(i=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||e&&"moveend"!==e.type||(this._pos=this._pos.round()),this._element.style.transform=`${nG[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${i} ${r}`,g.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity(e?.type==="moveend")}).catch(()=>{})},this._onMove=e=>{if(!this._isDragging){let t=this._clickTolerance||this._map._clickTolerance;this._isDragging=e.point.dist(this._pointerdownPos)>=t}this._isDragging&&(this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.n("dragstart"))),this.fire(new t.n("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.n("dragend")),this._state="inactive"},this._addDragHandler=e=>{this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._pointerdownPos=e.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||"#3FB1CE",this._scale=e?.scale||1,this._draggable=e?.draggable||!1,this._clickTolerance=e?.clickTolerance||0,this._subpixelPositioning=e?.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e?.rotation||0,this._rotationAlignment=e?.rotationAlignment||"auto",this._pitchAlignment=e?.pitchAlignment&&"auto"!==e.pitchAlignment?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e?.opacity,e?.opacityWhenCovered),e?.element)this._element=e.element,this._offset=t.P.convert(e?.offset||[0,0]);else{this._defaultMarker=!0,this._element=x.create("div");let r=x.createNS("http://www.w3.org/2000/svg","svg");r.setAttributeNS(null,"display","block"),r.setAttributeNS(null,"height","41px"),r.setAttributeNS(null,"width","27px"),r.setAttributeNS(null,"viewBox","0 0 27 41");let i=x.createNS("http://www.w3.org/2000/svg","g");i.setAttributeNS(null,"stroke","none"),i.setAttributeNS(null,"stroke-width","1"),i.setAttributeNS(null,"fill","none"),i.setAttributeNS(null,"fill-rule","evenodd");let n=x.createNS("http://www.w3.org/2000/svg","g");n.setAttributeNS(null,"fill-rule","nonzero");let a=x.createNS("http://www.w3.org/2000/svg","g");for(let e of(a.setAttributeNS(null,"transform","translate(3.0, 29.0)"),a.setAttributeNS(null,"fill","#000000"),[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}])){let t=x.createNS("http://www.w3.org/2000/svg","ellipse");t.setAttributeNS(null,"opacity","0.04"),t.setAttributeNS(null,"cx","10.5"),t.setAttributeNS(null,"cy","5.80029008"),t.setAttributeNS(null,"rx",e.rx),t.setAttributeNS(null,"ry",e.ry),a.appendChild(t)}let o=x.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"fill",this._color);let s=x.createNS("http://www.w3.org/2000/svg","path");s.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),o.appendChild(s);let l=x.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"opacity","0.25"),l.setAttributeNS(null,"fill","#000000");let c=x.createNS("http://www.w3.org/2000/svg","path");c.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),l.appendChild(c);let u=x.createNS("http://www.w3.org/2000/svg","g");u.setAttributeNS(null,"transform","translate(6.0, 7.0)"),u.setAttributeNS(null,"fill","#FFFFFF");let h=x.createNS("http://www.w3.org/2000/svg","g");h.setAttributeNS(null,"transform","translate(8.0, 8.0)");let d=x.createNS("http://www.w3.org/2000/svg","circle");d.setAttributeNS(null,"fill","#000000"),d.setAttributeNS(null,"opacity","0.25"),d.setAttributeNS(null,"cx","5.5"),d.setAttributeNS(null,"cy","5.5"),d.setAttributeNS(null,"r","5.4999962");let f=x.createNS("http://www.w3.org/2000/svg","circle");f.setAttributeNS(null,"fill","#FFFFFF"),f.setAttributeNS(null,"cx","5.5"),f.setAttributeNS(null,"cy","5.5"),f.setAttributeNS(null,"r","5.4999962"),h.appendChild(d),h.appendChild(f),n.appendChild(a),n.appendChild(o),n.appendChild(l),n.appendChild(u),n.appendChild(h),r.appendChild(n),r.setAttributeNS(null,"height",41*this._scale+"px"),r.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(r),this._offset=t.P.convert(e?.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",e=>{e.preventDefault()}),this._element.addEventListener("mousedown",e=>{e.preventDefault()}),nW(this._element,this._anchor,"marker"),e?.className)for(let t of e.className.split(" "))this._element.classList.add(t);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),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.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.W.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){let t=Math.abs(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":[t,-1*(24.6+t)],"bottom-right":[-t,-1*(24.6+t)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){let e=this._popup;return this._element.style.opacity===this._opacityWhenCovered||e&&(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map))),this}_updateOpacity(e=!1){var r,i;let n=null==(r=this._map)?void 0:r.terrain,a=this._map.transform.isLocationOccluded(this._lngLat);if(!n||a){let e=a?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==e&&(this._element.style.opacity=e,this._element.classList.toggle("maplibregl-marker-covered",a)))}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.transform);if(o.transform.lngLatToCameraDepth(this._lngLat,l)-s<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let c=-this._offset.y/o.transform.pixelsPerMeter,u=Math.sin(o.getPitch()*Math.PI/180)*c,h=o.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),d=o.transform.lngLatToCameraDepth(this._lngLat,l+u)-h>.006;null!=(i=this._popup)&&i.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=t.P.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._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}isDraggable(){return this._draggable}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&&"auto"!==e?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,t){return(void 0===this._opacity||void 0===e&&void 0===t)&&(this._opacity="1",this._opacityWhenCovered="0.2"),void 0!==e&&(this._opacity=String(e)),void 0!==t&&(this._opacityWhenCovered=String(t)),this._map&&this._updateOpacity(!0),this}}let nZ={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},n$=0,nX=!1,nK={maxWidth:100,unit:"metric"};function nJ(e,t,r){let i=r?.maxWidth||100,n=e._container.clientHeight/2,a=e._container.clientWidth/2,o=e.unproject([a-i/2,n]),s=e.unproject([a+i/2,n]),l=Math.min(i,Math.round(e.project(s).x-e.project(o).x),e._container.clientWidth),c=o.distanceTo(s);if(r?.unit==="imperial"){let r=3.2808*c;r>5280?nQ(t,l,r/5280,e._getUIString("ScaleControl.Miles")):nQ(t,l,r,e._getUIString("ScaleControl.Feet"))}else r?.unit==="nautical"?nQ(t,l,c/1852,e._getUIString("ScaleControl.NauticalMiles")):c>=1e3?nQ(t,l,c/1e3,e._getUIString("ScaleControl.Kilometers")):nQ(t,l,c,e._getUIString("ScaleControl.Meters"))}function nQ(e,t,r,i){var n;let a,o,s,l=(a=Math.pow(10,`${Math.floor(r)}`.length-1),o=r/a,a*(o=o>=10?10:o>=5?5:o>=3?3:o>=2?2:o>=1?1:(s=Math.pow(10,Math.ceil(-Math.log(n=o)/Math.LN10)),Math.round(n*s)/s)));e.style.width=l/r*t+"px",e.innerHTML=`${l} ${i}`}let n0={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0};e.AJAXError=t.cG,e.EXTENT=t.a6,e.Event=t.n,e.Evented=t.E,e.LngLat=t.W,e.MercatorCoordinate=t.a7,e.Point=t.P,e.addProtocol=t.cH,e.config=t.c,e.removeProtocol=t.cI,e.AttributionControl=nL,e.BoxZoomHandler=i0,e.CanvasSource=ei,e.CooperativeGesturesHandler=nT,e.DoubleClickZoomHandler=ny,e.DragPanHandler=nb,e.DragRotateHandler=n_,e.EdgeInsets=th,e.FullscreenControl=class extends t.E{constructor(e={}){var r;super(),this._onFullscreenChange=()=>{var e;let t=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;null!=(e=t?.shadowRoot)&&e.fullscreenElement;)t=t.shadowRoot.fullscreenElement;t===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=null!=(r=e.pseudo)&&r,e?.container&&(e.container instanceof HTMLElement?this._container=e.container:t.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=x.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=x.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);x.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 t.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},e.GeoJSONSource=ee,e.GeolocateControl=class extends t.E{constructor(e){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.n("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,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&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.n("geolocate",e)),this._finish()}},this._updateCamera=e=>{let r=new t.W(e.coords.longitude,e.coords.latitude),i=e.coords.accuracy,n=this._map.getBearing(),a=t.e({bearing:n},this.options.fitBoundsOptions),o=G.fromLngLat(r,i);this._map.fitBounds(o,a,{geolocateSource:!0})},this._updateMarker=e=>{if(e){let r=new t.W(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=e=>{if(this._map){if(1===e.code){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 e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&nX)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.n("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=e=>{if(!this._map)return;let r=e?.[0]instanceof ResizeObserverEntry;e.geolocateSource||"ACTIVE_LOCK"!==this._watchState||r||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 t.n("trackuserlocationend")),this.fire(new t.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",e=>{e.preventDefault()}),this._geolocateButton=x.create("button","maplibregl-ctrl-geolocate",this._container),x.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(!1===e){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}else{let e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=x.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new nY({element:this._dotElement}),this._circleElement=x.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new nY({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=t.e({},nZ,e)}onAdd(e){return this._map=e,this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return t._(this,arguments,void 0,function*(e=!1){if(void 0!==n&&!e)return n;if(void 0===window.navigator.permissions)return n=!!window.navigator.geolocation;try{n="denied"!==(yield window.navigator.permissions.query({name:"geolocation"})).state}catch{n=!!window.navigator.geolocation}return n})})().then(e=>this._finishSetupUI(e)),this._container}onRemove(){void 0!==this._geolocationWatchID&&(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,n$=0,nX=!1}_isOutOfMapMaxBounds(e){let t=this._map.getMaxBounds(),r=e.coords;return t&&(r.longitudet.getEast()||r.latitudet.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let e=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&e))return;let t=this._map.project(e),r=this._map.unproject([t.x+100,t.y]),i=e.distanceTo(r)/100,n=2*this._accuracy/i;this._circleElement.style.width=`${n.toFixed(2)}px`,this._circleElement.style.height=`${n.toFixed(2)}px`}trigger(){if(!this._setup)return t.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":n$--,nX=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new t.n("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.n("trackuserlocationstart")),this.fire(new t.n("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("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let e;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++n$>1?(e={maximumAge:6e5,timeout:0},nX=!0):(e=this.options.positionOptions,nX=!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)}},e.GlobeControl=class{constructor(){this._toggleProjection=()=>{var e;let t=null==(e=this._map.getProjection())?void 0:e.type;this._map.setProjection("mercator"!==t&&t?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var e;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),(null==(e=this._map.getProjection())?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=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=x.create("button","maplibregl-ctrl-globe",this._container),x.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}},e.Hash=ij,e.ImageSource=et,e.KeyboardHandler=nf,e.LngLatBounds=G,e.LogoControl=nP,e.Map=nU,e.MapLibreMap=nU,e.MapMouseEvent=iZ,e.MapTouchEvent=i$,e.MapWheelEvent=iX,e.Marker=nY,e.NavigationControl=class{constructor(e){this._updateZoomButtons=()=>{let e=this._map.getZoom(),t=e===this._map.getMaxZoom(),r=e===this._map.getMinZoom();this._zoomInButton.disabled=t,this._zoomOutButton.disabled=r,this._zoomInButton.setAttribute("aria-disabled",t.toString()),this._zoomOutButton.setAttribute("aria-disabled",r.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(e,t)=>{let r=this._map._getUIString(`NavigationControl.${t}`);e.title=r,e.setAttribute("aria-label",r)},this.options=t.e({},nV,e),this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",e=>this._map.zoomIn({},{originalEvent:e})),x.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",e=>this._map.zoomOut({},{originalEvent:e})),x.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})}),this._compassIcon=x.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("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new nq(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(e,t){let r=x.create("button",e,this._container);return r.type="button",r.addEventListener("click",t),r}},e.Popup=class extends t.E{constructor(e){super(),this._updateOpacity=()=>{void 0!==this.options.locationOccludedOpacity&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new t.n("close"))),this),this._update=e=>{let r;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=x.create("div","maplibregl-popup",this._map.getContainer()),this._tip=x.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let e of this.options.className.split(" "))this._container.classList.add(e);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=nH(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),e&&"point"in e&&e.point&&(r=e.point),this._trackPointer&&!r)return;let i=this._flatPos=this._pos=this._trackPointer&&r?r:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&r?r:this._map.transform.locationToScreenPoint(this._lngLat));let n=this.options.anchor,a=function e(r){if(r){if("number"==typeof r){let e=Math.round(Math.abs(r)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,r),"top-left":new t.P(e,e),"top-right":new t.P(-e,e),bottom:new t.P(0,-r),"bottom-left":new t.P(e,-e),"bottom-right":new t.P(-e,-e),left:new t.P(r,0),right:new t.P(-r,0)}}if(r instanceof t.P||Array.isArray(r)){let e=t.P.convert(r);return{center:e,top:e,"top-left":e,"top-right":e,bottom:e,"bottom-left":e,"bottom-right":e,left:e,right:e}}return{center:t.P.convert(r.center||[0,0]),top:t.P.convert(r.top||[0,0]),"top-left":t.P.convert(r["top-left"]||[0,0]),"top-right":t.P.convert(r["top-right"]||[0,0]),bottom:t.P.convert(r.bottom||[0,0]),"bottom-left":t.P.convert(r["bottom-left"]||[0,0]),"bottom-right":t.P.convert(r["bottom-right"]||[0,0]),left:t.P.convert(r.left||[0,0]),right:t.P.convert(r.right||[0,0])}}return e(new t.P(0,0))}(this.options.offset);if(!n){var o,s,l,c,u;let e=this._container.offsetWidth,t=this._container.offsetHeight,r=(o=this.options.padding)?{top:null!=(s=o.top)?s:0,right:null!=(l=o.right)?l:0,bottom:null!=(c=o.bottom)?c:0,left:null!=(u=o.left)?u:0}:{top:0,right:0,bottom:0,left:0},h;h=i.y+a.bottom.ythis._map.transform.height-t-r.bottom?["bottom"]:[],i.xthis._map.transform.width-e/2-r.right&&h.push("right"),n=0===h.length?"bottom":h.join("-")}let h=i.add(a[n]);this.options.subpixelPositioning||(h=h.round()),this._container.style.transform=`${nG[n]} translate(${h.x}px,${h.y}px)`,nW(this._container,n,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(n0),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 t.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.W.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 t=document.createDocumentFragment(),r=document.createElement("body"),i;for(r.innerHTML=e;i=r.firstChild;)t.appendChild(i);return this.setDOMContent(t)}getMaxWidth(){var e;return null==(e=this._container)?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=x.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=x.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("a[href], [tabindex]:not([tabindex='-1']), [contenteditable]:not([contenteditable='false']), button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])");e&&e.focus()}},e.RasterDEMTileSource=$,e.RasterTileSource=Z,e.ScaleControl=class{constructor(e){this._onMove=()=>{nJ(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,nJ(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},nK),e)}getDefaultPosition(){return"bottom-left"}onAdd(e){return this._map=e,this._container=x.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}},e.ScrollZoomHandler=ng,e.Style=t3,e.TerrainControl=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=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=x.create("button","maplibregl-ctrl-terrain",this._container),x.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}},e.TwoFingersTouchPitchHandler=nc,e.TwoFingersTouchRotateHandler=ns,e.TwoFingersTouchZoomHandler=na,e.TwoFingersTouchZoomRotateHandler=nw,e.VectorTileSource=Y,e.VideoSource=er,e.addSourceType=(e,r)=>t._(void 0,void 0,void 0,function*(){if(ea(e))throw Error(`A source type called "${e}" already exists.`);en[e]=r}),e.clearPrewarmedResources=function(){let e=F;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(D),F=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},e.createTileMesh=tL,e.getGlobalDispatcher=U,e.getMaxParallelImageRequests=function(){return t.c.MAX_PARALLEL_IMAGE_REQUESTS},e.getRTLTextPluginStatus=function(){return ec().getRTLTextPluginStatus()},e.getVersion=function(){return h},e.getWorkerCount=function(){return O.workerCount},e.getWorkerUrl=function(){return t.c.WORKER_URL},e.importScriptInWorkers=function(e){return U().broadcast("IS",e)},e.isTimeFrozen=function(){return y.isFrozen()},e.now=v,e.prewarm=function(){B().acquire(D)},e.restoreNow=function(){y.restoreNow()},e.setMaxParallelImageRequests=function(e){t.c.MAX_PARALLEL_IMAGE_REQUESTS=e},e.setNow=function(e){y.setNow(e)},e.setRTLTextPlugin=function(e,t){return ec().setRTLTextPlugin(e,t)},e.setWorkerCount=function(e){O.workerCount=e},e.setWorkerUrl=function(e){t.c.WORKER_URL=e}}),e},"object"==typeof e&&"u">typeof t?t.exports=i():(r="u">typeof globalThis?globalThis:r||self).maplibregl=i()}}),vl=p({"src/plots/map/layers.js"(e,t){var r=tv(),i=tF().sanitizeHTML,n=vt(),a=y4();function o(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=a.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var s=o.prototype;function l(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var i=0;i0}function c(e){var t={},i={};switch(e.type){case"circle":r.extendFlat(i,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":r.extendFlat(i,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":r.extendFlat(i,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var a=e.symbol,o=n(a.textposition,a.iconsize);r.extendFlat(t,{"icon-image":a.icon,"icon-size":a.iconsize/10,"text-field":a.text,"text-size":a.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":a.placement}),r.extendFlat(i,{"icon-color":e.color,"text-color":a.textfont.color,"text-opacity":e.opacity});break;case"raster":r.extendFlat(i,{"raster-fade-duration":0,"raster-opacity":e.opacity})}return{layout:t,paint:i}}s.update=function(e){this.visible?this.needsNewImage(e)?this.updateImage(e):this.needsNewSource(e)?(this.removeLayer(),this.updateSource(e),this.updateLayer(e)):this.needsNewLayer(e)?this.updateLayer(e):this.updateStyle(e):(this.updateSource(e),this.updateLayer(e)),this.visible=l(e)},s.needsNewImage=function(e){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===e.sourcetype&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))},s.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type},s.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},s.updateImage=function(e){this.subplot.map.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var t=this.findFollowingMapLayerId(this.lookupBelow());null!==t&&this.subplot.map.moveLayer(this.idLayer,t)},s.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,l(e)){var r,n,a,o,s,c=(a=(r=e).sourcetype,o=r.source,s={type:a},"geojson"===a?n="data":"vector"===a?n="string"==typeof o?"url":"tiles":"raster"===a?(n="tiles",s.tileSize=256):"image"===a&&(n="url",s.coordinates=r.coordinates),s[n]=o,r.sourceattribution&&(s.attribution=i(r.sourceattribution)),s);t.addSource(this.idSource,c)}},s.findFollowingMapLayerId=function(e){if("traces"===e)for(var t=this.subplot.getMapLayers(),r=0;r1)for(r=0;rt.project(e).x,_subplot:t},t.yaxis={_id:"y",c2p:e=>t.project(e).y,_subplot:t},t.updateFramework(e),t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},o.setConvert(t.mockAxis,e)},b.initFx=function(e,t){var r=this,i=r.gd,n=r.map;function o(){l.loneUnhover(t._hoverlayer)}function s(){var e=r.getView();i.emit("plotly_relayouting",r.getViewEditsWithDerived(e))}n.on("moveend",function(e){if(r.map){var t=i._fullLayout;if(e.originalEvent||r.wheeling){var n=t[r.id];a.call("_storeDirectGUIEdit",i.layout,t._preGUI,r.getViewEdits(n));var o=r.getView();n._input.center=n.center=o.center,n._input.zoom=n.zoom=o.zoom,n._input.bearing=n.bearing=o.bearing,n._input.pitch=n.pitch=o.pitch,i.emit("plotly_relayout",r.getViewEditsWithDerived(o))}e.originalEvent&&"mouseup"===e.originalEvent.type?r.dragging=!1:r.wheeling&&(r.wheeling=!1),t&&t._rehover&&t._rehover()}}),n.on("wheel",function(){r.wheeling=!0}),n.on("mousemove",function(e){var t=r.div.getBoundingClientRect(),a=[e.originalEvent.offsetX,e.originalEvent.offsetY];e.target.getBoundingClientRect=function(){return t},r.xaxis.p2c=function(){return n.unproject(a).lng},r.yaxis.p2c=function(){return n.unproject(a).lat},i._fullLayout._rehover=function(){i._fullLayout._hoversubplot===r.id&&i._fullLayout[r.id]&&l.hover(i,e,r.id)},l.hover(i,e,r.id),i._fullLayout._hoversubplot=r.id}),n.on("dragstart",function(){r.dragging=!0,o()}),n.on("zoomstart",o),n.on("mouseout",function(){i._fullLayout._hoversubplot=null}),n.on("drag",s),n.on("zoom",s),n.on("dblclick",function(){var e=i._fullLayout[r.id];a.call("_storeDirectGUIEdit",i.layout,i._fullLayout._preGUI,r.getViewEdits(e));var t=r.viewInitial;n.setCenter(k(t.center)),n.setZoom(t.zoom),n.setBearing(t.bearing),n.setPitch(t.pitch);var o=r.getView();e._input.center=e.center=o.center,e._input.zoom=e.zoom=o.zoom,e._input.bearing=e.bearing=o.bearing,e._input.pitch=e.pitch=o.pitch,i.emit("plotly_doubleclick",null),i.emit("plotly_relayout",r.getViewEditsWithDerived(o))}),r.clearOutline=function(){m(r.dragOptions),p(r.dragOptions.gd)},r.onClickInPanFn=function(e){return function(t){var n=i._fullLayout.clickmode;n.indexOf("select")>-1&&g(t.originalEvent,i,[r.xaxis],[r.yaxis],r.id,e),n.indexOf("event")>-1&&l.click(i,t.originalEvent)}}},b.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(!t.isStatic){var a=e.dragmode,o=t.dragOptions;t.dragOptions=i.extendDeep(o||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:function(e,r){r.isRect?(e.range={})[t.id]=[l([r.xmin,r.ymin]),l([r.xmax,r.ymax])]:(e.lassoPoints={})[t.id]=r.map(l)}},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),h(a)||u(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(e,r,i){f(e,r,i,t.dragOptions,a)},s.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))}function l(e){var r=t.map.unproject(e);return[r.lng,r.lat]}},b.updateFramework=function(e){var t=e[this.id].domain,r=e._size,i=this.div.style;i.width=r.w*(t.x[1]-t.x[0])+"px",i.height=r.h*(t.y[1]-t.y[0])+"px",i.left=r.l+t.x[0]*r.w+"px",i.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])},b.updateLayers=function(e){var t,r=e[this.id].layers,i=this.layerList;if(r.length!==i.length){for(t=0;tvh});var vd,vf=f({"src/plots/map/get_map_fit_bounds.ts"(){vd=y(pS())}}),vp=p({"src/plots/map/layout_defaults.js"(e,t){var r=tv(),i=o9(),n=t$(),a=y6(),{getMapFitBounds:o}=(vf(),v(vu));function s(e,t,r,i){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");let a=r("fitbounds");var s=r("bounds.west"),c=r("bounds.east"),u=r("bounds.south"),h=r("bounds.north");(void 0===s||void 0===c||void 0===u||void 0===h)&&delete t.bounds,n(e,t,{name:"layers",handleItemDefaults:l}),t._fitBounds=null;let{_fitView:{center:d,zoom:f}={},center:p,zoom:m}=e,g=p?.lon===d?.lon&&p?.lat===d?.lat&&m===f;if(a&&g){let e=o(i.fullData,i.id);e&&(t._fitBounds=e)}t._input=e}function l(e,t){function i(i,n){return r.coerce(e,t,a.layers,i,n)}if(i("visible")){var n,o=i("sourcetype"),s="raster"===o||"image"===o;i("source"),i("sourceattribution"),"vector"===o&&i("sourcelayer"),"image"===o&&i("coordinates"),s&&(n="raster");var l=i("type",n);s&&"raster"!==l&&(l=t.type="raster",r.log("Source types *raster* and *image* must drawn *raster* layer type.")),i("below"),i("color"),i("opacity"),i("minzoom"),i("maxzoom"),"circle"===l&&i("circle.radius"),"line"===l&&(i("line.width"),i("line.dash")),"fill"===l&&i("fill.outlinecolor"),"symbol"===l&&(i("symbol.icon"),i("symbol.iconsize"),i("symbol.text"),r.coerceFont(i,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),i("symbol.textposition"),i("symbol.placement"))}}t.exports=function(e,t,r){i(e,t,r,{type:"map",attributes:a,handleDefaults:s,partition:"y",fullData:r})}}}),vm=p({"src/plots/map/index.js"(e){var t=tv(),r=t.strTranslate,i=t.strScale,n=tI().getSubplotCalcData,a=tO(),o=T(),s=t9(),l=tF(),c=vc();e.name="map",e.attr="subplot",e.idRoot="map",e.idRegex=e.attrRegex=t.counterRegex("map"),e.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},e.layoutAttributes=y6(),e.supplyLayoutDefaults=vp(),e.plot=function(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots.map,a=0;av/2){var x=p.split("|").join("
");g.text(x).attr("data-unformatted",x).call(l.convertToTspans,e),y=s.bBox(g.node())}g.attr("transform",r(-3,-y.height+8)),m.insert("rect",".static-attribution").attr({x:-y.width-6,y:-y.height-3,width:y.width+6,height:y.height+3,fill:"rgba(255, 255, 255, 0.75)"});var b=1;y.width+6>v&&(b=v/(y.width+6));var _=[c.l+c.w*d.x[1],c.t+c.h*(1-d.y[0])];m.attr("transform",r(_[0],_[1])+i(b))}},e.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots.map,i=0;i=0;r--)e.removeLayer(t[r][1])},o.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var i=t[0].trace,n=new a(e,i.uid),o=n.sourceId,s=r(t),l=n.below=e.belowLookup["trace-"+i.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),n._addLayers(s,l),t[0].trace._glTrace=n,n}}}),vw=p({"src/traces/choroplethmap/index.js"(e,t){t.exports={attributes:vv(),supplyDefaults:vx(),colorbar:oo(),calc:pH(),plot:v_(),hoverPoints:pY(),eventData:pZ(),selectPoints:p$(),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.updateOnSelect(t)},getBelow:function(e,t){for(var r=t.getMapLayers(),i=r.length-2;i>=0;i--){var n=r[i].id;if("string"==typeof n&&0===n.indexOf("water")){for(var a=i+1;a0?+f[u]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:y},properties:v})}}var b=a.extractOpts(t),_=b.reversescale?a.flipScale(b.colorscale):b.colorscale,w=_[0][1],T=["interpolate",["linear"],["heatmap-density"],0,1>n.opacity(w)?w:n.addOpacity(w,0)];for(u=1;u<_.length;u++)T.push(_[u][0],_[u][1]);var M=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return i.extendFlat(c.heatmap.paint,{"heatmap-weight":p?M:1/(b.max-b.min),"heatmap-color":T,"heatmap-radius":m?{type:"identity",property:"r"}:t.radius,"heatmap-opacity":t.opacity}),c.geojson={type:"FeatureCollection",features:h},c.heatmap.layout.visibility="visible",c}}}),vE=p({"src/traces/densitymap/plot.js"(e,t){var r=vS(),i=y4().traceLayerPrefix;function n(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",i+t+"-heatmap"]],this.below=null}var a=n.prototype;a.update=function(e){var t=this.subplot,i=this.layerList,n=r(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(n,a),this.below=a);for(var o=0;o=0;r--)e.removeLayer(t[r][1])},a.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var i=t[0].trace,a=new n(e,i.uid),o=a.sourceId,s=r(t),l=a.below=e.belowLookup["trace-"+i.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,l),a}}}),vC=p({"src/traces/densitymap/hover.js"(e,t){var r=rn(),i=vn().hoverPoints,n=vn().getExtraText;t.exports=function(e,t,a){var o=i(e,t,a);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,"z"in u){var h=s.subplot.mockAxis;s.z=u.z,s.zLabel=r.tickText(h,h.c2l(u.z),"hover").text}return s.extraText=n(c,u,l[0].t.labels),[s]}}}}),vL=p({"src/traces/densitymap/event_data.js"(e,t){t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e.z=t.z,e}}}),vP=p({"src/traces/densitymap/index.js"(e,t){t.exports={attributes:vM(),supplyDefaults:vk(),colorbar:oo(),formatLabels:ve(),calc:vA(),plot:vE(),hoverPoints:vC(),eventData:vL(),getBelow:function(e,t){for(var r=t.getMapLayers(),i=0;in.addOpacity(y[t%y.length],.8))),g("customdata");var v=e.link||{},x=s.newContainer(t,"link");function b(e,t){return r.coerce(v,x,i.link,e,t)}b("label"),b("arrowlen"),b("source"),b("target"),b("value"),b("line.color"),b("line.width"),b("hoverinfo",e.hoverinfo),o(v,x,b,f),b("hovertemplate"),b("sort");var _=.333>n.luminosity(h.paper_bgcolor),w=b("color",_?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)");function T(e){if(!n.isValid(e))return e;let t=n.opacity(e);return t<=.8?n.addOpacity(e,t+.2):_?n.brighten(e,10):n.adjustLightness(e,-10)}b("hovercolor",Array.isArray(w)?w.map(T):T(w)),b("customdata"),l(v,x,{name:"colorscales",handleItemDefaults:c}),a(t,h,d),d("orientation"),d("direction"),d("valueformat"),d("valuesuffix"),d("arrangement",m.x.length&&m.y.length?"freeform":void 0),r.coerceFont(d,"textfont",h.font,{autoShadowDflt:!0}),t._length=null}}}),vO=p({"node_modules/strongly-connected-components/scc.js"(e,t){t.exports=function(e){for(var t=e.length,r=Array(t),i=Array(t),n=Array(t),a=Array(t),o=Array(t),s=Array(t),l=0;l0;){var f=e[t=d[d.length-1]];if(a[t]=0&&s[t].push(o[m])}a[t]=p}else{if(i[t]===r[t]){for(var g=[],y=[],v=0,p=l.length-1;p>=0;--p){var x=l[p];if(n[x]=!1,g.push(x),y.push(s[x]),v+=s[x].length,o[x]=u.length,x===t){l.length=p;break}}u.push(g);for(var b=Array(v),p=0;px&&(x=l.source[t]),l.target[t]>x&&(x=l.target[t]);var b=x+1;e.node._count=b;var _,w=e.node.groups,T={};for(t=0;t0&&o(L,b)&&o(P,b)&&!(T.hasOwnProperty(L)&&T.hasOwnProperty(P)&&T[L]===T[P])){T.hasOwnProperty(P)&&(P=T[P]),T.hasOwnProperty(L)&&(L=T[L]),P*=1,f[L*=1]=f[P]=!0;var I="";l.label&&l.label[t]&&(I=l.label[t]);var z=null;I&&p.hasOwnProperty(I)&&(z=p[I]),c.push({pointNumber:t,label:I,color:u?l.color[t]:l.color,hovercolor:h?l.hovercolor[t]:l.hovercolor,customdata:d?l.customdata[t]:l.customdata,concentrationscale:z,source:L,target:P,value:+C}),S.push(L),E.push(P)}}var D=b+w.length,O=a(n.color),R=a(n.customdata),F=[];for(t=0;tb-1,childrenNodes:[],pointNumber:t,label:j,color:O?n.color[t]:n.color,customdata:R?n.customdata[t]:n.customdata})}var B=!1;return function(e,t,n){for(var a=i.init2dArray(e,0),o=0;o1})}(D,S,E)&&(B=!0),{circular:B,links:c,nodes:F,groups:w,groupLookup:T}}(t);return n({circular:l.circular,_nodes:l.nodes,_links:l.links,_groups:l.groups,_groupLookup:l.groupLookup})}}}),vF=p({"node_modules/d3-quadtree/dist/d3-quadtree.js"(e,t){var r;r=e,function(e){function t(e,t,r,i){if(isNaN(t)||isNaN(r))return e;var n,a,o,s,l,c,u,h,d,f=e._root,p={data:i},m=e._x0,g=e._y0,y=e._x1,v=e._y1;if(!f)return e._root=p,e;for(;f.length;)if((c=t>=(a=(m+y)/2))?m=a:y=a,(u=r>=(o=(g+v)/2))?g=o:v=o,n=f,!(f=f[h=u<<1|c]))return n[h]=p,e;if(s=+e._x.call(null,f.data),l=+e._y.call(null,f.data),t===s&&r===l)return p.next=f,n?n[h]=p:e._root=p,e;do n=n?n[h]=[,,,,]:e._root=[,,,,],(c=t>=(a=(m+y)/2))?m=a:y=a,(u=r>=(o=(g+v)/2))?g=o:v=o;while((h=u<<1|c)==(d=(l>=o)<<1|s>=a));return n[d]=f,n[h]=p,e}function r(e,t,r,i,n){this.node=e,this.x0=t,this.y0=r,this.x1=i,this.y1=n}function i(e){return e[0]}function n(e){return e[1]}function a(e,t,r){var a=new o(t??i,r??n,NaN,NaN,NaN,NaN);return null==e?a:a.addAll(e)}function o(e,t,r,i,n,a){this._x=e,this._y=t,this._x0=r,this._y0=i,this._x1=n,this._y1=a,this._root=void 0}function s(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var l=a.prototype=o.prototype;l.copy=function(){var e,t,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(!i)return r;if(!i.length)return r._root=s(i),r;for(e=[{source:i,target:r._root=[,,,,]}];i=e.pop();)for(var n=0;n<4;++n)(t=i.source[n])&&(t.length?e.push({source:t,target:i.target[n]=[,,,,]}):i.target[n]=s(t));return r},l.add=function(e){var r=+this._x.call(null,e),i=+this._y.call(null,e);return t(this.cover(r,i),r,i,e)},l.addAll=function(e){var r,i,n,a,o=e.length,s=Array(o),l=Array(o),c=1/0,u=1/0,h=-1/0,d=-1/0;for(i=0;ih&&(h=n),ad&&(d=a));if(c>h||u>d)return this;for(this.cover(c,u).cover(h,d),i=0;ie||e>=n||i>t||t>=a;)switch((o=[,,,,])[s=(tf||(o=c.y0)>p||(s=c.x1)=v)<<1|e>=y)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var x=e-this._x.call(null,g.data),b=t-this._y.call(null,g.data),_=x*x+b*b;if(_=(s=(p+g)/2))?p=s:g=s,(u=o>=(l=(m+y)/2))?m=l:y=l,t=f,!(f=f[h=u<<1|c]))return this;if(!f.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(r=t,d=h)}for(;f.data!==e;)if(i=f,!(f=f.next))return this;return(n=f.next)&&delete f.next,i?n?i.next=n:delete i.next:t?(n?t[h]=n:delete t[h],(f=t[0]||t[1]||t[2]||t[3])&&f===(t[3]||t[2]||t[1]||t[0])&&!f.length&&(r?r[d]=f:this._root=f)):this._root=n,this},l.removeAll=function(e){for(var t=0,r=e.length;ttypeof t?e:(r=r||self).d3=r.d3||{})}}),vj=p({"node_modules/d3-collection/dist/d3-collection.js"(e,t){(function(e){function t(){}function r(e,r){var i=new t;if(e instanceof t)e.each(function(e,t){i.set(t,e)});else if(Array.isArray(e)){var n,a=-1,o=e.length;if(null==r)for(;++a=l.length)return null!=e&&i.sort(e),null!=t?t(i):i;for(var s,c,h,d=-1,f=i.length,p=l[n++],m=r(),g=a();++dl.length)return r;var n,a=c[i-1];return null!=t&&i>=l.length?n=r.entries():(n=[],r.each(function(t,r){n.push({key:r,values:e(t,i)})})),null!=a?n.sort(function(e,t){return a(e.key,t.key)}):n}(u(e,0,a,o),0)},key:function(e){return l.push(e),s},sortKeys:function(e){return c[l.length-1]=e,s},sortValues:function(t){return e=t,s},rollup:function(e){return t=e,s}}},e.set=c,e.map=r,e.keys=function(e){var t=[];for(var r in e)t.push(r);return t},e.values=function(e){var t=[];for(var r in e)t.push(e[r]);return t},e.entries=function(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t},Object.defineProperty(e,"__esModule",{value:!0})})("object"==typeof e&&"u">typeof t?e:e.d3=e.d3||{})}}),vB=p({"node_modules/d3-dispatch/dist/d3-dispatch.js"(e,t){var r;r=e,function(e){var t={value:function(){}};function r(){for(var e,t=0,r=arguments.length,n={};t=0&&(t=e.slice(r+1),e=e.slice(0,r)),e&&!i.hasOwnProperty(e))throw Error("unknown type: "+e);return{type:e,name:t}}),o=-1,s=a.length;if(arguments.length<2){for(;++o0)for(var r,i,n=Array(r),a=0;atypeof t?e:(r=r||self).d3=r.d3||{})}}),vN=p({"node_modules/d3-timer/dist/d3-timer.js"(e,t){var r;r=e,function(e){var t,r,i=0,n=0,a=0,o=0,s=0,l=0,c="object"==typeof performance&&performance.now?performance:Date,u="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function h(){return s||(u(d),s=c.now()+l)}function d(){s=0}function f(){this._call=this._time=this._next=null}function p(e,t,r){var i=new f;return i.restart(e,t,r),i}function m(){h(),++i;for(var e,r=t;r;)(e=s-r._time)>=0&&r._call.call(null,e),r=r._next;--i}function g(){s=(o=c.now())+l,i=n=0;try{m()}finally{i=0,function(){for(var e,i,n=t,a=1/0;n;)n._call?(a>n._time&&(a=n._time),e=n,n=n._next):(i=n._next,n._next=null,n=e?e._next=i:t=i);r=e,v(a)}(),s=0}}function y(){var e=c.now(),t=e-o;t>1e3&&(l-=t,o=e)}function v(e){!i&&(n&&(n=clearTimeout(n)),e-s>24?(e<1/0&&(n=setTimeout(g,e-c.now()-l)),a&&(a=clearInterval(a))):(a||(o=c.now(),a=setInterval(y,1e3)),i=1,u(g)))}f.prototype=p.prototype={constructor:f,restart:function(e,i,n){if("function"!=typeof e)throw TypeError("callback is not a function");n=(null==n?h():+n)+(null==i?0:+i),this._next||r===this||(r?r._next=this:t=this,r=this),this._call=e,this._time=n,v()},stop:function(){this._call&&(this._call=null,this._time=1/0,v())}},e.interval=function(e,t,r){var i=new f,n=t;return null==t?i.restart(e,t,r):(t*=1,r=null==r?h():+r,i.restart(function a(o){o+=n,i.restart(a,n+=t,r),e(o)},t,r)),i},e.now=h,e.timeout=function(e,t,r){var i=new f;return t=null==t?0:+t,i.restart(function(r){i.stop(),e(r+t)},t,r),i},e.timer=p,e.timerFlush=m,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r=r||self).d3=r.d3||{})}}),vU=p({"node_modules/d3-force/dist/d3-force.js"(e,t){var r;r=function(e,t,r,i,n){function a(e){return function(){return e}}function o(){return(Math.random()-.5)*1e-6}function s(e){return e.x+e.vx}function l(e){return e.y+e.vy}function c(e){return e.index}function u(e,t){var r=e.get(t);if(!r)throw Error("missing: "+t);return r}function h(e){return e.x}function d(e){return e.y}var f=Math.PI*(3-Math.sqrt(5));e.forceCenter=function(e,t){var r;function i(){var i,n,a=r.length,o=0,s=0;for(i=0;iu.index){var h=d-s.x-s.vx,g=f-s.y-s.vy,y=h*h+g*g;yd+c||if+c||ae.r&&(e.r=e[t].r)}function d(){if(r){var t,n,a=r.length;for(i=Array(a),t=0;t=c)){(e.data!==r||e.next)&&(0===h&&(p+=(h=o())*h),0===d&&(p+=(d=o())*d),p1?(null==r?u.remove(e):u.set(e,y(r)),t):u.get(e)},find:function(t,r,i){var n,a,o,s,l,c=0,u=e.length;for(null==i?i=1/0:i*=i,c=0;c1?(d.on(e,r),t):d.on(e)}}},e.forceX=function(e){var t,r,i,n=a(.1);function o(e){for(var n,a=0,o=t.length;atypeof t?r(e,vF(),vj(),vB(),vN()):r(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)}}),vV=p({"node_modules/d3-array/dist/d3-array.js"(e,t){var r;r=e,function(e){function t(e,t){return et?1:e>=t?0:NaN}function r(e){var r;let i=e,n=e;function a(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;0>n(e[a],t)?r=a+1:i=a}return r}return 1===e.length&&(i=(t,r)=>e(t)-r,r=e,n=(e,i)=>t(r(e),i)),{left:a,center:function(e,t,r,n){null==r&&(r=0),null==n&&(n=e.length);let o=a(e,t,r,n-1);return o>r&&i(e[o-1],t)>-i(e[o],t)?o-1:o},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[a],t)>0?i=a:r=a+1}return r}}}function i(e){return null===e?NaN:+e}let n=r(t),a=n.right,o=n.left,s=r(i).center;function l(e,t){let r=0;if(void 0===t)for(let t of e)null!=t&&(t*=1)>=t&&++r;else{let i=-1;for(let n of e)null!=(n=t(n,++i,e))&&(n*=1)>=n&&++r}return r}function c(e){return 0|e.length}function u(e){return!(e>0)}function h(e){return"object"!=typeof e||"length"in e?e:Array.from(e)}function d(e,t){let r=0,i,n=0,a=0;if(void 0===t)for(let t of e)null!=t&&(t*=1)>=t&&(i=t-n,n+=i/++r,a+=i*(t-n));else{let o=-1;for(let s of e)null!=(s=t(s,++o,e))&&(s*=1)>=s&&(i=s-n,n+=i/++r,a+=i*(s-n))}if(r>1)return a/(r-1)}function f(e,t){let r=d(e,t);return r&&Math.sqrt(r)}function p(e,t){let r,i;if(void 0===t)for(let t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i=a&&(r=i=a):(r>a&&(r=a),i0){for(a=e[--t];t>0&&(a=(r=a)+(i=e[--t]),!(n=i-(a-r))););t>0&&(n<0&&e[t-1]<0||n>0&&e[t-1]>0)&&(r=a+(i=2*n),i==r-a&&(a=r))}return a}}class g extends Map{constructor(e,t=w){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(let[t,r]of e)this.set(t,r)}get(e){return super.get(v(this,e))}has(e){return super.has(v(this,e))}set(e,t){return super.set(x(this,e),t)}delete(e){return super.delete(_(this,e))}}class y extends Set{constructor(e,t=w){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(let t of e)this.add(t)}has(e){return super.has(v(this,e))}add(e){return super.add(x(this,e))}delete(e){return super.delete(_(this,e))}}function v({_intern:e,_key:t},r){let i=t(r);return e.has(i)?e.get(i):r}function x({_intern:e,_key:t},r){let i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function _({_intern:e,_key:t},r){let i=t(r);return e.has(i)&&(r=e.get(r),e.delete(i)),r}function w(e){return null!==e&&"object"==typeof e?e.valueOf():e}function T(e){return e}function M(e,...t){return S(e,T,T,t)}function k(e,t,...r){return S(e,T,t,r)}function A(e){if(1!==e.length)throw Error("duplicate key");return e[0]}function S(e,t,r,i){return function e(n,a){if(a>=i.length)return r(n);let o=new g,s=i[a++],l=-1;for(let e of n){let t=s(e,++l,n),r=o.get(t);r?r.push(e):o.set(t,[e])}for(let[t,r]of o)o.set(t,e(r,a));return t(o)}(e,0)}function E(e,t){return Array.from(t,t=>e[t])}function C(e,...r){if("function"!=typeof e[Symbol.iterator])throw TypeError("values is not iterable");e=Array.from(e);let[i=t]=r;if(1===i.length||r.length>1){let n=Uint32Array.from(e,(e,t)=>t);return r.length>1?(r=r.map(t=>e.map(t)),n.sort((e,i)=>{for(let n of r){let r=t(n[e],n[i]);if(r)return r}})):(i=e.map(i),n.sort((e,r)=>t(i[e],i[r]))),E(e,n)}return e.sort(i)}var L=Array.prototype.slice;function P(e){return function(){return e}}var I=Math.sqrt(50),z=Math.sqrt(10),D=Math.sqrt(2);function O(e,t,r){var i,n,a,o,s=-1;if(r*=1,(e*=1)==(t*=1)&&r>0)return[e];if((i=t0){let r=Math.round(e/o),i=Math.round(t/o);for(r*ot&&--i,a=Array(n=i-r+1);++st&&--i,a=Array(n=i-r+1);++s=0?(a>=I?10:a>=z?5:a>=D?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(a>=I?10:a>=z?5:a>=D?2:1)}function F(e,t,r){let i;for(;;){let n=R(e,t,r);if(n===i||0===n||!isFinite(n))return[e,t];n>0?(e=Math.floor(e/n)*n,t=Math.ceil(t/n)*n):n<0&&(e=Math.ceil(e*n)/n,t=Math.floor(t*n)/n),i=n}}function j(e){return Math.ceil(Math.log(l(e))/Math.LN2)+1}function B(){var e=T,t=p,r=j;function i(i){Array.isArray(i)||(i=Array.from(i));var n,o,s=i.length,l=Array(s);for(n=0;n=h)if(e>=h&&t===p){let e=R(u,h,r);isFinite(e)&&(e>0?h=(Math.floor(h/e)+1)*e:e<0&&(h=-((Math.ceil(-(h*e))+1)/e)))}else d.pop()}for(var f=d.length;d[0]<=u;)d.shift(),--f;for(;d[f-1]>h;)d.pop(),--f;var m,g=Array(f+1);for(n=0;n<=f;++n)(m=g[n]=[]).x0=n>0?d[n-1]:u,m.x1=n=t)&&(r=t);else{let i=-1;for(let n of e)null!=(n=t(n,++i,e))&&(r=n)&&(r=n)}return r}function U(e,t){let r;if(void 0===t)for(let t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let i=-1;for(let n of e)null!=(n=t(n,++i,e))&&(r>n||void 0===r&&n>=n)&&(r=n)}return r}function V(e,r,i=0,n=e.length-1,a=t){for(;n>i;){if(n-i>600){let t=n-i+1,o=r-i+1,s=Math.log(t),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(t-l)/t)*(o-t/2<0?-1:1),u=Math.max(i,Math.floor(r-o*l/t+c)),h=Math.min(n,Math.floor(r+(t-o)*l/t+c));V(e,r,u,h,a)}let t=e[r],o=i,s=n;for(q(e,i,r),a(e[n],t)>0&&q(e,i,n);oa(e[o],t);)++o;for(;a(e[s],t)>0;)--s}0===a(e[i],t)?q(e,i,s):q(e,++s,n),s<=r&&(i=s+1),r<=s&&(n=s-1)}return e}function q(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function H(e,t,r){if(i=(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t*=1)>=t&&(yield t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(i*=1)>=i&&(yield i)}}(e,r))).length){if((t*=1)<=0||i<2)return U(e);if(t>=1)return N(e);var i,n=(i-1)*t,a=Math.floor(n),o=N(V(e,a).subarray(0,a+1));return o+(U(e.subarray(a+1))-o)*(n-a)}}function G(e,t){let r,i=-1,n=-1;if(void 0===t)for(let t of e)++n,null!=t&&(r=t)&&(r=t,i=n);else for(let a of e)null!=(a=t(a,++n,e))&&(r=a)&&(r=a,i=n);return i}function W(e,t){let r,i=-1,n=-1;if(void 0===t)for(let t of e)++n,null!=t&&(r>t||void 0===r&&t>=t)&&(r=t,i=n);else for(let a of e)null!=(a=t(a,++n,e))&&(r>a||void 0===r&&a>=a)&&(r=a,i=n);return i}function Y(e,t){return[e,t]}function Z(e,r=t){if(1===r.length)return W(e,r);let i,n=-1,a=-1;for(let t of e)++a,(n<0?0===r(t,t):0>r(t,i))&&(i=t,n=a);return n}var $=X(Math.random);function X(e){return function(t,r=0,i=t.length){let n=i-(r*=1);for(;n;){let i=e()*n--|0,a=t[n+r];t[n+r]=t[i+r],t[i+r]=a}return t}}function K(e){if(!(n=e.length))return[];for(var t=-1,r=U(e,J),i=Array(r);++tt(...e)),i=(e=e.map(h)).map(c),n=e.length-1,a=Array(n+1).fill(0),o=[];if(n<0||i.some(u))return o;for(;;){o.push(a.map((t,r)=>e[r][t]));let t=n;for(;++a[t]===i[t];){if(0===t)return r?o.map(r):o;a[t--]=0}}},e.cumsum=function(e,t){var r=0,i=0;return Float64Array.from(e,void 0===t?e=>r+=+e||0:n=>r+=+t(n,i++,e)||0)},e.descending=function(e,t){return te?1:t>=e?0:NaN},e.deviation=f,e.difference=function(e,...t){for(let r of(e=new Set(e),t))for(let t of r)e.delete(t);return e},e.disjoint=function(e,t){let r=t[Symbol.iterator](),i=new Set;for(let t of e){let e,n;if(i.has(t))return!1;for(;({value:e,done:n}=r.next())&&!n;){if(Object.is(t,e))return!1;i.add(e)}}return!0},e.every=function(e,t){if("function"!=typeof t)throw TypeError("test is not a function");let r=-1;for(let i of e)if(!t(i,++r,e))return!1;return!0},e.extent=p,e.fcumsum=function(e,t){let r=new m,i=-1;return Float64Array.from(e,void 0===t?e=>r.add(+e||0):n=>r.add(+t(n,++i,e)||0))},e.filter=function(e,t){if("function"!=typeof t)throw TypeError("test is not a function");let r=[],i=-1;for(let n of e)t(n,++i,e)&&r.push(n);return r},e.fsum=function(e,t){let r=new m;if(void 0===t)for(let t of e)(t*=1)&&r.add(t);else{let i=-1;for(let n of e)(n=+t(n,++i,e))&&r.add(n)}return+r},e.greatest=function(e,r=t){let i,n=!1;if(1===r.length){let a;for(let o of e){let e=r(o);(n?t(e,a)>0:0===t(e,e))&&(i=o,a=e,n=!0)}}else for(let t of e)(n?r(t,i)>0:0===r(t,t))&&(i=t,n=!0);return i},e.greatestIndex=function(e,r=t){if(1===r.length)return G(e,r);let i,n=-1,a=-1;for(let t of e)++a,(n<0?0===r(t,t):r(t,i)>0)&&(i=t,n=a);return n},e.group=M,e.groupSort=function(e,r,i){return(1===r.length?C(k(e,r,i),([e,r],[i,n])=>t(r,n)||t(e,i)):C(M(e,i),([e,i],[n,a])=>r(i,a)||t(e,n))).map(([e])=>e)},e.groups=function(e,...t){return S(e,Array.from,T,t)},e.histogram=B,e.index=function(e,...t){return S(e,T,A,t)},e.indexes=function(e,...t){return S(e,Array.from,A,t)},e.intersection=function(e,...t){e=new Set(e),t=t.map(Q);e:for(let r of e)for(let i of t)if(!i.has(r)){e.delete(r);continue e}return e},e.least=function(e,r=t){let i,n=!1;if(1===r.length){let a;for(let o of e){let e=r(o);(n?0>t(e,a):0===t(e,e))&&(i=o,a=e,n=!0)}}else for(let t of e)(n?0>r(t,i):0===r(t,t))&&(i=t,n=!0);return i},e.leastIndex=Z,e.map=function(e,t){if("function"!=typeof e[Symbol.iterator])throw TypeError("values is not iterable");if("function"!=typeof t)throw TypeError("mapper is not a function");return Array.from(e,(r,i)=>t(r,i,e))},e.max=N,e.maxIndex=G,e.mean=function(e,t){let r=0,i=0;if(void 0===t)for(let t of e)null!=t&&(t*=1)>=t&&(++r,i+=t);else{let n=-1;for(let a of e)null!=(a=t(a,++n,e))&&(a*=1)>=a&&(++r,i+=a)}if(r)return i/r},e.median=function(e,t){return H(e,.5,t)},e.merge=function(e){return Array.from(function*(e){for(let t of e)yield*b(t)}(e))},e.min=U,e.minIndex=W,e.nice=F,e.pairs=function(e,t=Y){let r=[],i,n=!1;for(let a of e)n&&r.push(t(i,a)),i=a,n=!0;return r},e.permute=E,e.quantile=H,e.quantileSorted=function(e,t,r=i){if(n=e.length){if((t*=1)<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,o=Math.floor(a),s=+r(e[o],o,e);return s+(r(e[o+1],o+1,e)-s)*(a-o)}},e.quickselect=V,e.range=function(e,t,r){e*=1,t*=1,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=0|Math.max(0,Math.ceil((t-e)/r)),a=Array(n);++i=I?n*=10:a>=z?n*=5:a>=D&&(n*=2),ttypeof t?e:(r="u">typeof globalThis?globalThis:r||self).d3=r.d3||{})}}),vq=p({"node_modules/d3-path/dist/d3-path.js"(e,t){var r;r=e,function(e){var t=Math.PI,r=2*t,i=r-1e-6;function n(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function a(){return new n}n.prototype=a.prototype={constructor:n,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,i){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+i)},bezierCurveTo:function(e,t,r,i,n,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +i+","+(this._x1=+n)+","+(this._y1=+a)},arcTo:function(e,r,i,n,a){e*=1,r*=1,i*=1,n*=1,a*=1;var o=this._x1,s=this._y1,l=i-e,c=n-r,u=o-e,h=s-r,d=u*u+h*h;if(a<0)throw Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=r);else if(d>1e-6)if(Math.abs(h*l-c*u)>1e-6&&a){var f=i-o,p=n-s,m=l*l+c*c,g=Math.sqrt(m),y=Math.sqrt(d),v=a*Math.tan((t-Math.acos((m+d-(f*f+p*p))/(2*g*y)))/2),x=v/y,b=v/g;Math.abs(x-1)>1e-6&&(this._+="L"+(e+x*u)+","+(r+x*h)),this._+="A"+a+","+a+",0,0,"+ +(h*f>u*p)+","+(this._x1=e+b*l)+","+(this._y1=r+b*c)}else this._+="L"+(this._x1=e)+","+(this._y1=r)},arc:function(e,n,a,o,s,l){e*=1,n*=1,a*=1,l=!!l;var c=a*Math.cos(o),u=a*Math.sin(o),h=e+c,d=n+u,f=1^l,p=l?o-s:s-o;if(a<0)throw Error("negative radius: "+a);null===this._x1?this._+="M"+h+","+d:(Math.abs(this._x1-h)>1e-6||Math.abs(this._y1-d)>1e-6)&&(this._+="L"+h+","+d),a&&(p<0&&(p=p%r+r),p>i?this._+="A"+a+","+a+",0,1,"+f+","+(e-c)+","+(n-u)+"A"+a+","+a+",0,1,"+f+","+(this._x1=h)+","+(this._y1=d):p>1e-6&&(this._+="A"+a+","+a+",0,"+ +(p>=t)+","+f+","+(this._x1=e+a*Math.cos(s))+","+(this._y1=n+a*Math.sin(s))))},rect:function(e,t,r,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +i+"h"+-r+"Z"},toString:function(){return this._}},e.path=a,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r=r||self).d3=r.d3||{})}}),vH=p({"node_modules/d3-shape/dist/d3-shape.js"(e,t){var r,i;r=e,i=function(e,t){function r(e){return function(){return e}}var i=Math.abs,n=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,c=Math.sqrt,u=Math.PI,h=u/2,d=2*u;function f(e){return e>=1?h:e<=-1?-h:Math.asin(e)}function p(e){return e.innerRadius}function m(e){return e.outerRadius}function g(e){return e.startAngle}function y(e){return e.endAngle}function v(e){return e&&e.padAngle}function x(e,t,r,i,n,a,s){var l=e-r,u=t-i,h=(s?a:-a)/c(l*l+u*u),d=h*u,f=-h*l,p=e+d,m=t+f,g=r+d,y=i+f,v=(p+g)/2,x=(m+y)/2,b=g-p,_=y-m,w=b*b+_*_,T=n-a,M=p*y-g*m,k=(_<0?-1:1)*c(o(0,T*T*w-M*M)),A=(M*_-b*k)/w,S=(-M*b-_*k)/w,E=(M*_+b*k)/w,C=(-M*b+_*k)/w,L=A-v,P=S-x,I=E-v,z=C-x;return L*L+P*P>I*I+z*z&&(A=E,S=C),{cx:A,cy:S,x01:-d,y01:-f,x11:A*(n/T-1),y11:S*(n/T-1)}}function b(e){this._context=e}function _(e){return new b(e)}function w(e){return e[0]}function T(e){return e[1]}function M(){var e=w,i=T,n=r(!0),a=null,o=_,s=null;function l(r){var l,c,u,h=r.length,d=!1;for(null==a&&(s=o(u=t.path())),l=0;l<=h;++l)!(l=h;--d)c.point(y[d],v[d]);c.lineEnd(),c.areaEnd()}g&&(y[u]=+e(f,u,r),v[u]=+n(f,u,r),c.point(i?+i(f,u,r):y[u],a?+a(f,u,r):v[u]))}if(p)return c=null,p+""||null}function h(){return M().defined(o).curve(l).context(s)}return u.x=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),i=null,u):e},u.x0=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),u):e},u.x1=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:r(+e),u):i},u.y=function(e){return arguments.length?(n="function"==typeof e?e:r(+e),a=null,u):n},u.y0=function(e){return arguments.length?(n="function"==typeof e?e:r(+e),u):n},u.y1=function(e){return arguments.length?(a=null==e?null:"function"==typeof e?e:r(+e),u):a},u.lineX0=u.lineY0=function(){return h().x(e).y(n)},u.lineY1=function(){return h().x(e).y(a)},u.lineX1=function(){return h().x(i).y(n)},u.defined=function(e){return arguments.length?(o="function"==typeof e?e:r(!!e),u):o},u.curve=function(e){return arguments.length?(l=e,null!=s&&(c=l(s)),u):l},u.context=function(e){return arguments.length?(null==e?s=c=null:c=l(s=e),u):s},u}function A(e,t){return te?1:t>=e?0:NaN}function S(e){return e}b.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var E=L(_);function C(e){this._curve=e}function L(e){function t(t){return new C(e(t))}return t._curve=e,t}function P(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(L(e)):t()._curve},e}function I(){return P(M().curve(E))}function z(){var e=k().curve(E),t=e.curve,r=e.lineX0,i=e.lineX1,n=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return P(r())},delete e.lineX0,e.lineEndAngle=function(){return P(i())},delete e.lineX1,e.lineInnerRadius=function(){return P(n())},delete e.lineY0,e.lineOuterRadius=function(){return P(a())},delete e.lineY1,e.curve=function(e){return arguments.length?t(L(e)):t()._curve},e}function D(e,t){return[(t*=1)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}C.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),-(t*Math.cos(e)))}};var O=Array.prototype.slice;function R(e){return e.source}function F(e){return e.target}function j(e){var i=R,n=F,a=w,o=T,s=null;function l(){var r,l=O.call(arguments),c=i.apply(this,l),u=n.apply(this,l);if(s||(s=r=t.path()),e(s,+a.apply(this,(l[0]=c,l)),+o.apply(this,l),+a.apply(this,(l[0]=u,l)),+o.apply(this,l)),r)return s=null,r+""||null}return l.source=function(e){return arguments.length?(i=e,l):i},l.target=function(e){return arguments.length?(n=e,l):n},l.x=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),l):a},l.y=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),l):o},l.context=function(e){return arguments.length?(s=e??null,l):s},l}function B(e,t,r,i,n){e.moveTo(t,r),e.bezierCurveTo(t=(t+i)/2,r,t,n,i,n)}function N(e,t,r,i,n){e.moveTo(t,r),e.bezierCurveTo(t,r=(r+n)/2,i,r,i,n)}function U(e,t,r,i,n){var a=D(t,r),o=D(t,r=(r+n)/2),s=D(i,r),l=D(i,n);e.moveTo(a[0],a[1]),e.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var V={draw:function(e,t){var r=Math.sqrt(t/u);e.moveTo(r,0),e.arc(0,0,r,0,d)}},q={draw:function(e,t){var r=Math.sqrt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},H=Math.sqrt(1/3),G=2*H,W={draw:function(e,t){var r=Math.sqrt(t/G),i=r*H;e.moveTo(0,-r),e.lineTo(i,0),e.lineTo(0,r),e.lineTo(-i,0),e.closePath()}},Y=Math.sin(u/10)/Math.sin(7*u/10),Z=Math.sin(d/10)*Y,$=-Math.cos(d/10)*Y,X={draw:function(e,t){var r=Math.sqrt(.8908130915292852*t),i=Z*r,n=$*r;e.moveTo(0,-r),e.lineTo(i,n);for(var a=1;a<5;++a){var o=d*a/5,s=Math.cos(o),l=Math.sin(o);e.lineTo(l*r,-s*r),e.lineTo(s*i-l*n,l*i+s*n)}e.closePath()}},K={draw:function(e,t){var r=Math.sqrt(t),i=-r/2;e.rect(i,i,r,r)}},J=Math.sqrt(3),Q={draw:function(e,t){var r=-Math.sqrt(t/(3*J));e.moveTo(0,2*r),e.lineTo(-J*r,-r),e.lineTo(J*r,-r),e.closePath()}},ee=Math.sqrt(3)/2,et=1/Math.sqrt(12),er=(et/2+1)*3,ei={draw:function(e,t){var r=Math.sqrt(t/er),i=r/2,n=r*et,a=r*et+r,o=-i;e.moveTo(i,n),e.lineTo(i,a),e.lineTo(o,a),e.lineTo(-.5*i-ee*n,ee*i+-.5*n),e.lineTo(-.5*i-ee*a,ee*i+-.5*a),e.lineTo(-.5*o-ee*a,ee*o+-.5*a),e.lineTo(-.5*i+ee*n,-.5*n-ee*i),e.lineTo(-.5*i+ee*a,-.5*a-ee*i),e.lineTo(-.5*o+ee*a,-.5*a-ee*o),e.closePath()}},en=[V,q,W,K,X,Q,ei];function ea(){}function eo(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function es(e){this._context=e}function el(e){this._context=e}function ec(e){this._context=e}function eu(e,t){this._basis=new es(e),this._beta=t}es.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:eo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:eo(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},el.prototype={areaStart:ea,areaEnd:ea,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)}},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:eo(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},ec.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:eo(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},eu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i,n=e[0],a=t[0],o=e[r]-n,s=t[r]-a,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*e[l]+(1-this._beta)*(n+i*o),this._beta*t[l]+(1-this._beta)*(a+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var eh=function e(t){function r(e){return 1===t?new es(e):new eu(e,t)}return r.beta=function(t){return e(+t)},r}(.85);function ed(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function ef(e,t){this._context=e,this._k=(1-t)/6}ef.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:ed(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ed(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ep=function e(t){function r(e){return new ef(e,t)}return r.tension=function(t){return e(+t)},r}(0);function em(e,t){this._context=e,this._k=(1-t)/6}em.prototype={areaStart:ea,areaEnd:ea,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)}},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ed(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var eg=function e(t){function r(e){return new em(e,t)}return r.tension=function(t){return e(+t)},r}(0);function ey(e,t){this._context=e,this._k=(1-t)/6}ey.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,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:ed(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ev=function e(t){function r(e){return new ey(e,t)}return r.tension=function(t){return e(+t)},r}(0);function ex(e,t,r){var i=e._x1,n=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>1e-12){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/u}e._context.bezierCurveTo(i,n,a,o,e._x2,e._y2)}function eb(e,t){this._context=e,this._alpha=t}eb.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e*=1,t*=1,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:ex(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var e_=function e(t){function r(e){return t?new eb(e,t):new ef(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function ew(e,t){this._context=e,this._alpha=t}ew.prototype={areaStart:ea,areaEnd:ea,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)}},point:function(e,t){if(e*=1,t*=1,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ex(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var eT=function e(t){function r(e){return t?new ew(e,t):new em(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function eM(e,t){this._context=e,this._alpha=t}eM.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e*=1,t*=1,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,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:ex(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ek=function e(t){function r(e){return t?new eM(e,t):new ey(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function eA(e){this._context=e}eA.prototype={areaStart:ea,areaEnd:ea,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e*=1,t*=1,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function eS(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),o=(r-e._y1)/(n||i<0&&-0);return((a<0?-1:1)+(o<0?-1:1))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs((a*n+o*i)/(i+n)))||0}function eE(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function eC(e,t,r){var i=e._x0,n=e._y0,a=e._x1,o=e._y1,s=(a-i)/3;e._context.bezierCurveTo(i+s,n+s*t,a-s,o-s*r,a,o)}function eL(e){this._context=e}function eP(e){this._context=new eI(e)}function eI(e){this._context=e}function ez(e){this._context=e}function eD(e){var t,r,i=e.length-1,n=Array(i),a=Array(i),o=Array(i);for(n[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t=0;--t)n[t]=(o[t]-n[t+1])/a[t];for(a[i-1]=(e[i]+n[i-1])/2,t=0;t1)for(var r,i,n,a=1,o=e[t[0]],s=o.length;a=0;)r[t]=t;return r}function ej(e,t){return e[t]}function eB(e){var t=e.map(eN);return eF(e).sort(function(e,r){return t[e]-t[r]})}function eN(e){for(var t,r=-1,i=0,n=e.length,a=-1/0;++ra&&(a=t,i=r);return i}function eU(e){var t=e.map(eV);return eF(e).sort(function(e,r){return t[e]-t[r]})}function eV(e){for(var t,r=0,i=-1,n=e.length;++i=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}}this._x=e,this._y=t}},e.arc=function(){var e=p,o=m,b=r(0),_=null,w=g,T=y,M=v,k=null;function A(){var r,p,m=+e.apply(this,arguments),g=+o.apply(this,arguments),y=w.apply(this,arguments)-h,v=T.apply(this,arguments)-h,A=i(v-y),S=v>y;if(k||(k=r=t.path()),g1e-12)if(A>d-1e-12)k.moveTo(g*a(y),g*l(y)),k.arc(0,0,g,y,v,!S),m>1e-12&&(k.moveTo(m*a(v),m*l(v)),k.arc(0,0,m,v,y,S));else{var E,C,L=y,P=v,I=y,z=v,D=A,O=A,R=M.apply(this,arguments)/2,F=R>1e-12&&(_?+_.apply(this,arguments):c(m*m+g*g)),j=s(i(g-m)/2,+b.apply(this,arguments)),B=j,N=j;if(F>1e-12){var U=f(F/m*l(R)),V=f(F/g*l(R));(D-=2*U)>1e-12?(U*=S?1:-1,I+=U,z-=U):(D=0,I=z=(y+v)/2),(O-=2*V)>1e-12?(V*=S?1:-1,L+=V,P-=V):(O=0,L=P=(y+v)/2)}var q=g*a(L),H=g*l(L),G=m*a(z),W=m*l(z);if(j>1e-12){var Y,Z=g*a(P),$=g*l(P),X=m*a(I),K=m*l(I);if(A1?0:J<-1?u:Math.acos(J))/2),en=c(Y[0]*Y[0]+Y[1]*Y[1]);B=s(j,(m-en)/(ei-1)),N=s(j,(g-en)/(ei+1))}}O>1e-12?N>1e-12?(E=x(X,K,q,H,g,N,S),C=x(Z,$,G,W,g,N,S),k.moveTo(E.cx+E.x01,E.cy+E.y01),N1e-12&&D>1e-12?B>1e-12?(E=x(G,W,Z,$,m,-B,S),C=x(q,H,X,K,m,-B,S),k.lineTo(E.cx+E.x01,E.cy+E.y01),B0&&(p+=h);for(null!=t?m.sort(function(e,r){return t(g[e],g[r])}):null!=i&&m.sort(function(e,t){return i(r[e],r[t])}),s=0,c=p?(v-f*b)/p:0;s0?h*c:0)+b,g[l]={data:r[l],index:s,value:h,startAngle:y,endAngle:u,padAngle:x};return g}return s.value=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),s):e},s.sortValues=function(e){return arguments.length?(t=e,i=null,s):t},s.sort=function(e){return arguments.length?(i=e,t=null,s):i},s.startAngle=function(e){return arguments.length?(n="function"==typeof e?e:r(+e),s):n},s.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),s):a},s.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),s):o},s},e.pointRadial=D,e.radialArea=z,e.radialLine=I,e.stack=function(){var e=r([]),t=eF,i=eR,n=ej;function a(r){var a,o,s=e.apply(this,arguments),l=r.length,c=s.length,u=Array(c);for(a=0;a0)for(var r,i,n,a,o,s,l=0,c=e[t[0]].length;l0?(i[0]=a,i[1]=a+=n):n<0?(i[1]=o,i[0]=o+=n):(i[0]=0,i[1]=n)},e.stackOffsetExpand=function(e,t){if((i=e.length)>0){for(var r,i,n,a=0,o=e[0].length;a0){for(var r,i=0,n=e[t[0]],a=n.length;i0&&(i=(r=e[t[0]]).length)>0){for(var r,i,n,a=0,o=1;otypeof t?i(e,vq()):i((r=r||self).d3=r.d3||{},r.d3)}}),vG=p({"node_modules/@plotly/d3-sankey/dist/@plotly/d3-sankey.js"(e,t){var r,i;r=e,i=function(e,t,r){function i(e){return e.target.depth}function n(e,t){return e.sourceLinks.length?e.depth:t-1}function a(e){return function(){return e}}function o(e,t){return l(e.source,t.source)||e.index-t.index}function s(e,t){return l(e.target,t.target)||e.index-t.index}function l(e,t){return e.y0-t.y0}function c(e){return e.value}function u(e){return e.index}function h(e){return e.nodes}function d(e){return e.links}function f(e,t){let r=e.get(t);if(!r)throw Error("missing: "+t);return r}function p({nodes:e}){for(let t of e){let e=t.y0,r=e;for(let r of t.sourceLinks)r.y0=e+r.width/2,e+=r.width;for(let e of t.targetLinks)e.y1=r+e.width/2,r+=e.width}}function m(e){return[e.source.x1,e.y0]}function g(e){return[e.target.x0,e.y1]}e.sankey=function(){let e=0,r=0,i=1,m=1,g=24,y=8,v,x=u,b=n,_,w,T=h,M=d,k=6,A=2/3;function S(){let n={nodes:T.apply(null,arguments),links:M.apply(null,arguments)};return function({nodes:e,links:t}){for(let[t,r]of e.entries())r.index=t,r.sourceLinks=[],r.targetLinks=[];let r=new Map(e.map((t,r)=>[x(t,r,e),t]));for(let[e,i]of t.entries()){i.index=e;let{source:t,target:n}=i;"object"!=typeof t&&(t=i.source=f(r,t)),"object"!=typeof n&&(n=i.target=f(r,n)),t.sourceLinks.push(i),n.targetLinks.push(i)}if(null!=w)for(let{sourceLinks:t,targetLinks:r}of e)t.sort(w),r.sort(w)}(n),function({nodes:e}){for(let r of e)r.value=void 0===r.fixedValue?Math.max(t.sum(r.sourceLinks,c),t.sum(r.targetLinks,c)):r.fixedValue}(n),function({nodes:e}){let t=e.length,r=new Set(e),i=new Set,n=0;for(;r.size;){for(let e of r)for(let{target:t}of(e.depth=n,e.sourceLinks))i.add(t);if(++n>t)throw Error("circular link");r=i,i=new Set}}(n),function({nodes:e}){let t=e.length,r=new Set(e),i=new Set,n=0;for(;r.size;){for(let e of r)for(let{source:t}of(e.height=n,e.targetLinks))i.add(t);if(++n>t)throw Error("circular link");r=i,i=new Set}}(n),function(n){let a=function({nodes:r}){let n=t.max(r,e=>e.depth)+1,a=(i-e-g)/(n-1),o=Array(n);for(let t of r){let r=Math.max(0,Math.min(n-1,Math.floor(b.call(null,t,n))));t.layer=r,t.x0=e+r*a,t.x1=t.x0+g,o[r]?o[r].push(t):o[r]=[t]}if(_)for(let e of o)e.sort(_);return o}(n);v=Math.min(y,A*(m-r)/(t.max(a,e=>e.length)-1)),function(e){let i=t.min(e,e=>(m-r-(e.length-1)*v)/t.sum(e,c));for(let t of e){let e=r;for(let r of t)for(let t of(r.y0=e,r.y1=e+r.value*i,e=r.y1+v,r.sourceLinks))t.width=t.value*i;e=(m-e+v)/(t.length+1);for(let r=0;r=0;--n){let i=e[n];for(let e of i){let r=0,i=0;for(let{target:t,value:n}of e.sourceLinks){let a=n*(t.layer-e.layer);r+=function(e,t){let r=t.y0-(t.targetLinks.length-1)*v/2;for(let{source:i,width:n}of t.targetLinks){if(i===e)break;r+=n+v}for(let{target:i,width:n}of e.sourceLinks){if(i===t)break;r-=n}return r}(e,t)*a,i+=a}if(!(i>0))continue;let n=(r/i-e.y0)*t;e.y0+=n,e.y1+=n,P(e)}void 0===_&&i.sort(l),E(i,r)}})(a,t,r),function(e,t,r){for(let i=1,n=e.length;i0))continue;let n=(r/i-e.y0)*t;e.y0+=n,e.y1+=n,P(e)}void 0===_&&n.sort(l),E(n,r)}}(a,t,r)}}(n),p(n),n}function E(e,t){let i=e.length>>1,n=e[i];L(e,n.y0-v,i-1,t),C(e,n.y1+v,i+1,t),L(e,m,e.length-1,t),C(e,r,0,t)}function C(e,t,r,i){for(;r1e-6&&(n.y0+=a,n.y1+=a),t=n.y1+v}}function L(e,t,r,i){for(;r>=0;--r){let n=e[r],a=(n.y1-t)*i;a>1e-6&&(n.y0-=a,n.y1-=a),t=n.y0-v}}function P({sourceLinks:e,targetLinks:t}){if(void 0===w){for(let{source:{sourceLinks:e}}of t)e.sort(s);for(let{target:{targetLinks:t}}of e)t.sort(o)}}return S.update=function(e){return p(e),e},S.nodeId=function(e){return arguments.length?(x="function"==typeof e?e:a(e),S):x},S.nodeAlign=function(e){return arguments.length?(b="function"==typeof e?e:a(e),S):b},S.nodeSort=function(e){return arguments.length?(_=e,S):_},S.nodeWidth=function(e){return arguments.length?(g=+e,S):g},S.nodePadding=function(e){return arguments.length?(y=v=+e,S):y},S.nodes=function(e){return arguments.length?(T="function"==typeof e?e:a(e),S):T},S.links=function(e){return arguments.length?(M="function"==typeof e?e:a(e),S):M},S.linkSort=function(e){return arguments.length?(w=e,S):w},S.size=function(t){return arguments.length?(e=r=0,i=+t[0],m=+t[1],S):[i-e,m-r]},S.extent=function(t){return arguments.length?(e=+t[0][0],i=+t[1][0],r=+t[0][1],m=+t[1][1],S):[[e,r],[i,m]]},S.iterations=function(e){return arguments.length?(k=+e,S):k},S},e.sankeyCenter=function(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?t.min(e.sourceLinks,i)-1:0},e.sankeyJustify=n,e.sankeyLeft=function(e){return e.depth},e.sankeyLinkHorizontal=function(){return r.linkHorizontal().source(m).target(g)},e.sankeyRight=function(e,t){return t-1-e.height},Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&"u">typeof t?i(e,vV(),vH()):i((r=r||self).d3=r.d3||{},r.d3,r.d3)}}),vW=p({"node_modules/@plotly/d3-sankey-circular/node_modules/d3-array/dist/d3-array.js"(e,t){(function(e){function t(e,t){return et?1:e>=t?0:NaN}function r(e){var r;return 1===e.length&&(r=e,e=function(e,i){return t(r(e),i)}),{left:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;0>e(t[a],r)?i=a+1:n=a}return i},right:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;e(t[a],r)>0?n=a:i=a+1}return i}}}var i=r(t),n=i.right,a=i.left;function o(e,t){return[e,t]}function s(e){return null===e?NaN:+e}function l(e,t){var r,i,n=e.length,a=0,o=-1,l=0,c=0;if(null==t)for(;++o1)return c/(a-1)}function c(e,t){var r=l(e,t);return r&&Math.sqrt(r)}function u(e,t){var r,i,n,a=e.length,o=-1;if(null==t){for(;++o=r)for(i=n=r;++or&&(i=r),n=r)for(i=n=r;++or&&(i=r),n=0?(a>=y?10:a>=v?5:a>=x?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(a>=y?10:a>=v?5:a>=x?2:1)}function _(e,t,r){var i=Math.abs(t-e)/Math.max(0,r),n=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),a=i/n;return a>=y?n*=10:a>=v?n*=5:a>=x&&(n*=2),t=1)return+r(e[i-1],i-1,e);var i,n=(i-1)*t,a=Math.floor(n),o=+r(e[a],a,e);return o+(r(e[a+1],a+1,e)-o)*(n-a)}}function M(e,t){var r,i,n=e.length,a=-1;if(null==t){for(;++a=r)for(i=r;++ar&&(i=r)}else for(;++a=r)for(i=r;++ar&&(i=r);return i}function k(e){if(!(n=e.length))return[];for(var t=-1,r=M(e,A),i=Array(r);++te?1:t>=e?0:NaN},e.deviation=c,e.extent=u,e.histogram=function(){var e=m,t=u,r=w;function i(i){var a,o,s=i.length,l=Array(s);for(a=0;ah;)d.pop(),--f;var p,m=Array(f+1);for(a=0;a<=f;++a)(p=m[a]=[]).x0=a>0?d[a-1]:u,p.x1=a=r)for(i=r;++ai&&(i=r)}else for(;++a=r)for(i=r;++ai&&(i=r);return i},e.mean=function(e,t){var r,i=e.length,n=i,a=-1,o=0;if(null==t)for(;++a=0;)for(t=(i=e[n]).length;--t>=0;)r[--o]=i[t];return r},e.min=M,e.pairs=function(e,t){null==t&&(t=o);for(var r=0,i=e.length-1,n=e[0],a=Array(i<0?0:i);rr(n=e[a],s)||0!==r(s,s))&&(s=n,o=a);if(0===r(s,s))return o}},e.shuffle=function(e,t,r){for(var i,n,a=(r??e.length)-(t=null==t?0:+t);a;)n=Math.random()*a--|0,i=e[a+t],e[a+t]=e[n+t],e[n+t]=i;return e},e.sum=function(e,t){var r,i=e.length,n=-1,a=0;if(null==t)for(;++n0)return[e];if((i=t0)for(e=Math.ceil(e/o),a=Array(n=Math.ceil((t=Math.floor(t/o))-e+1));++stypeof t?e:e.d3=e.d3||{})}}),vY=p({"node_modules/elementary-circuits-directed-graph/johnson.js"(e,t){var r=vO();t.exports=function(e,t){var i,n=[],a=[],o=[],s={},l=[];i=0;for(var c=e.length;i=t});for(var n,a=r(e),o=a.components.filter(function(e){return e.length>1}),s=1/0,l=0;l1||n>1)}function M(e,t,r){return e.sort(A),e.forEach(function(i,n){var a=0;if(B(i,r)&&T(i))i.circularPathData.verticalBuffer=a+i.width/2;else{for(var o,s,l=0;ls.source.column)){var c=e[l].circularPathData.verticalBuffer+e[l].width/2+t;a=c>a?c:a}i.circularPathData.verticalBuffer=a+i.width/2}}),e}function k(e,r,n,a){var o=t.min(e.links,function(e){return e.source.y0});e.links.forEach(function(e){e.circular&&(e.circularPathData={})}),M(e.links.filter(function(e){return"top"==e.circularLinkType}),r,a),M(e.links.filter(function(e){return"bottom"==e.circularLinkType}),r,a),e.links.forEach(function(t){if(t.circular){if(t.circularPathData.arcRadius=t.width+10,t.circularPathData.leftNodeBuffer=5,t.circularPathData.rightNodeBuffer=5,t.circularPathData.sourceWidth=t.source.x1-t.source.x0,t.circularPathData.sourceX=t.source.x0+t.circularPathData.sourceWidth,t.circularPathData.targetX=t.target.x0,t.circularPathData.sourceY=t.y0,t.circularPathData.targetY=t.y1,B(t,a)&&T(t))t.circularPathData.leftSmallArcRadius=10+t.width/2,t.circularPathData.leftLargeArcRadius=10+t.width/2,t.circularPathData.rightSmallArcRadius=10+t.width/2,t.circularPathData.rightLargeArcRadius=10+t.width/2,"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=t.source.y1+25+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=t.source.y0-25-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius);else{var s,l=t.source.column,c=t.circularLinkType,u=e.links.filter(function(e){return e.source.column==l&&e.circularLinkType==c});"bottom"==t.circularLinkType?u.sort(E):u.sort(S);var h=0;u.forEach(function(e,i){e.circularLinkID==t.circularLinkID&&(t.circularPathData.leftSmallArcRadius=10+t.width/2+h,t.circularPathData.leftLargeArcRadius=10+t.width/2+i*r+h),h+=e.width}),l=t.target.column,u=e.links.filter(function(e){return e.target.column==l&&e.circularLinkType==c}),"bottom"==t.circularLinkType?u.sort(L):u.sort(C),h=0,u.forEach(function(e,i){e.circularLinkID==t.circularLinkID&&(t.circularPathData.rightSmallArcRadius=10+t.width/2+h,t.circularPathData.rightLargeArcRadius=10+t.width/2+i*r+h),h+=e.width}),"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=Math.max(n,t.source.y1,t.target.y1)+25+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=o-25-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius)}t.circularPathData.leftInnerExtent=t.circularPathData.sourceX+t.circularPathData.leftNodeBuffer,t.circularPathData.rightInnerExtent=t.circularPathData.targetX-t.circularPathData.rightNodeBuffer,t.circularPathData.leftFullExtent=t.circularPathData.sourceX+t.circularPathData.leftLargeArcRadius+t.circularPathData.leftNodeBuffer,t.circularPathData.rightFullExtent=t.circularPathData.targetX-t.circularPathData.rightLargeArcRadius-t.circularPathData.rightNodeBuffer}t.circular?t.path="top"==(s=t).circularLinkType?"M"+s.circularPathData.sourceX+" "+s.circularPathData.sourceY+" L"+s.circularPathData.leftInnerExtent+" "+s.circularPathData.sourceY+" A"+s.circularPathData.leftLargeArcRadius+" "+s.circularPathData.leftSmallArcRadius+" 0 0 0 "+s.circularPathData.leftFullExtent+" "+(s.circularPathData.sourceY-s.circularPathData.leftSmallArcRadius)+" L"+s.circularPathData.leftFullExtent+" "+s.circularPathData.verticalLeftInnerExtent+" A"+s.circularPathData.leftLargeArcRadius+" "+s.circularPathData.leftLargeArcRadius+" 0 0 0 "+s.circularPathData.leftInnerExtent+" "+s.circularPathData.verticalFullExtent+" L"+s.circularPathData.rightInnerExtent+" "+s.circularPathData.verticalFullExtent+" A"+s.circularPathData.rightLargeArcRadius+" "+s.circularPathData.rightLargeArcRadius+" 0 0 0 "+s.circularPathData.rightFullExtent+" "+s.circularPathData.verticalRightInnerExtent+" L"+s.circularPathData.rightFullExtent+" "+(s.circularPathData.targetY-s.circularPathData.rightSmallArcRadius)+" A"+s.circularPathData.rightLargeArcRadius+" "+s.circularPathData.rightSmallArcRadius+" 0 0 0 "+s.circularPathData.rightInnerExtent+" "+s.circularPathData.targetY+" L"+s.circularPathData.targetX+" "+s.circularPathData.targetY:"M"+s.circularPathData.sourceX+" "+s.circularPathData.sourceY+" L"+s.circularPathData.leftInnerExtent+" "+s.circularPathData.sourceY+" A"+s.circularPathData.leftLargeArcRadius+" "+s.circularPathData.leftSmallArcRadius+" 0 0 1 "+s.circularPathData.leftFullExtent+" "+(s.circularPathData.sourceY+s.circularPathData.leftSmallArcRadius)+" L"+s.circularPathData.leftFullExtent+" "+s.circularPathData.verticalLeftInnerExtent+" A"+s.circularPathData.leftLargeArcRadius+" "+s.circularPathData.leftLargeArcRadius+" 0 0 1 "+s.circularPathData.leftInnerExtent+" "+s.circularPathData.verticalFullExtent+" L"+s.circularPathData.rightInnerExtent+" "+s.circularPathData.verticalFullExtent+" A"+s.circularPathData.rightLargeArcRadius+" "+s.circularPathData.rightLargeArcRadius+" 0 0 1 "+s.circularPathData.rightFullExtent+" "+s.circularPathData.verticalRightInnerExtent+" L"+s.circularPathData.rightFullExtent+" "+(s.circularPathData.targetY+s.circularPathData.rightSmallArcRadius)+" A"+s.circularPathData.rightLargeArcRadius+" "+s.circularPathData.rightSmallArcRadius+" 0 0 1 "+s.circularPathData.rightInnerExtent+" "+s.circularPathData.targetY+" L"+s.circularPathData.targetX+" "+s.circularPathData.targetY:t.path=i.linkHorizontal().source(function(e){return[e.source.x0+(e.source.x1-e.source.x0),e.y0]}).target(function(e){return[e.target.x0,e.y1]})(t)})}function A(e,t){return P(e)==P(t)?"bottom"==e.circularLinkType?E(e,t):S(e,t):P(t)-P(e)}function S(e,t){return e.y0-t.y0}function E(e,t){return t.y0-e.y0}function C(e,t){return e.y1-t.y1}function L(e,t){return t.y1-e.y1}function P(e){return e.target.column-e.source.column}function I(e){return e.target.x0-e.source.x1}function z(e,t){var r=_(e),i=I(t)/Math.tan(r);return"up"==j(e)?e.y1+i:e.y1-i}function D(e,t){var r=_(e),i=I(t)/Math.tan(r);return"up"==j(e)?e.y1-i:e.y1+i}function O(e,t,r,i){return e.y0+t>=r&&e.y1+t<=i&&(e.y0=e.y0+t,e.y1=e.y1+t,e.targetLinks.forEach(function(e){e.y1=e.y1+t}),e.sourceLinks.forEach(function(e){e.y0=e.y0+t})),e}function R(e,t,r,i){e.nodes.forEach(function(n){i&&n.y+(n.y1-n.y0)>t&&(n.y=n.y-(n.y+(n.y1-n.y0)-t));var a=e.links.filter(function(e){return r(e.source)==r(n)}),o=a.length;o>1&&a.sort(function(e,t){if(!e.circular&&!t.circular){if(e.target.column==t.target.column)return e.y1-t.y1;if(r=e,i=t,j(r)!=j(i))return e.y1-t.y1;if(e.target.column>t.target.column){var r,i,n=D(t,e);return e.y1-n}if(t.target.column>e.target.column)return D(e,t)-t.y1}return e.circular&&!t.circular?"top"==e.circularLinkType?-1:1:t.circular&&!e.circular?"top"==t.circularLinkType?1:-1:e.circular&&t.circular?e.circularLinkType===t.circularLinkType&&"top"==e.circularLinkType?e.target.column===t.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:e.circularLinkType===t.circularLinkType&&"bottom"==e.circularLinkType?e.target.column===t.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:"top"==e.circularLinkType?-1:1:void 0});var s=n.y0;a.forEach(function(e){e.y0=s+e.width/2,s+=e.width}),a.forEach(function(e,t){if("bottom"==e.circularLinkType){for(var r=t+1,i=0;r1&&i.sort(function(e,t){if(!e.circular&&!t.circular){if(e.source.column==t.source.column)return e.y0-t.y0;if(r=e,i=t,j(r)!=j(i))return e.y0-t.y0;if(t.source.column0?"up":"down"}function B(e,t){return t(e.source)==t(e.target)}e.sankeyCircular=function(){var e,i,a=0,_=0,T=1,M=1,A=24,S=g,E=o,C=y,L=v,P=32,I=2,z=null;function D(){var o,s,c={nodes:C.apply(null,arguments),links:L.apply(null,arguments)};(o=c).nodes.forEach(function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}),s=r.map(o.nodes,S),o.links.forEach(function(e,t){e.index=t;var r=e.source,i=e.target;(typeof r>"u"?"undefined":l(r))!=="object"&&(r=e.source=x(s,r)),(typeof i>"u"?"undefined":l(i))!=="object"&&(i=e.target=x(s,i)),r.sourceLinks.push(e),i.targetLinks.push(e)}),function(e,t){var r=0;if(null===t){for(var i=[],a=0;ar.indexOf(e.target)&&!e.circular&&r.push(e.target)})});for(t=e.nodes,r=[],i=0;t.length;++i,t=r,r=[])t.forEach(function(e){e.height=i,e.targetLinks.forEach(function(e){0>r.indexOf(e.source)&&!e.circular&&r.push(e.source)})});e.nodes.forEach(function(e){e.column=Math.floor(E.call(null,e,i))})}(c),b(c,S),function(n,o,s){var l=r.nest().key(function(e){return e.column}).sortKeys(t.ascending).entries(n.nodes).map(function(e){return e.values});(function(r){if(i){var o,s,c,u,h,f,p,m,g,y,v,x,b=1/0;l.forEach(function(e){var t=M*i/(e.length+1);b=t0?o+25+10:o,bottom:s=s>0?s+25+10:s,left:u=u>0?u+25+10:u,right:c=c>0?c+25+10:c}),E=(f=t.max(n.nodes,function(e){return e.column}),p=T-a,m=M-_,g=p+S.right+S.left,y=m+S.top+S.bottom,v=p/g,x=m/y,a=a*v+S.left,T=0==S.right?T:T*v,_=_*x+S.top,M*=x,n.nodes.forEach(function(e){e.x0=a+e.column*((T-a-A)/f),e.x1=e.x0+A}),x);k*=E,n.links.forEach(function(e){e.width=e.value*k}),l.forEach(function(e){var t=e.length;e.forEach(function(e,i){e.depth==l.length-1&&1==t||0==e.depth&&1==t?e.y0=M/2-e.value*k:e.partOfCycle?0==w(e,r)?e.y0=M/2+i:"top"==e.circularLinkType?e.y0=_+i:e.y0=M-e.value*k-i:0==S.top||0==S.bottom?e.y0=(M-_)/t*i:e.y0=(M-_)/2-t/2+i,e.y1=e.y0+e.value*k})})})(s),g();for(var c=1,u=o;u>0;--u)(function(e,r){var i=l.length;l.forEach(function(n){var a=n.length,o=n[0].depth;n.forEach(function(n){var s;if((n.sourceLinks.length||n.targetLinks.length)&&!(n.partOfCycle&&w(n,r)>0))if(0==o&&1==a)s=n.y1-n.y0,n.y0=M/2-s/2,n.y1=M/2+s/2;else if(o==i-1&&1==a)s=n.y1-n.y0,n.y0=M/2-s/2,n.y1=M/2+s/2;else{var l=t.mean(n.sourceLinks,m),c=t.mean(n.targetLinks,p),u=((l&&c?(l+c)/2:l||c)-f(n))*e;n.y0+=u,n.y1+=u}})})})(c*=.99,s),g();function g(){l.forEach(function(t){var r,i,n,a=_,o=t.length;for(t.sort(h),n=0;n0&&(r.y0+=i,r.y1+=i),a=r.y1+e;if((i=a-e-M)>0)for(a=r.y0-=i,r.y1-=i,n=o-2;n>=0;--n)(i=(r=t[n]).y1+e-a)>0&&(r.y0-=i,r.y1-=i),a=r.y0})}}(c,P,S),j(c);for(var u=0;u<4;u++)R(c,M,S),F(c,M,S),function(e,t,r,i){e.links.forEach(function(n){if(!n.circular&&n.target.column-n.source.column>1){var a=n.source.column+1,o=n.target.column-1,s=1,l=o-a+1;for(s=1;a<=o;a++,s++)e.nodes.forEach(function(o){if(o.column==a){var c,u=s/(l+1),h=Math.pow(1-u,3),d=3*u*Math.pow(1-u,2),f=3*Math.pow(u,2)*(1-u),p=Math.pow(u,3),m=h*n.y0+d*n.y0+f*n.y1+p*n.y1,g=m-n.width/2,y=m+n.width/2;g>o.y0&&ga.y0&&n.y0a.y0&&n.y1a.y1)&&O(e,c,t,r))})):y>o.y0&&yo.y1&&O(e,c,t,r)})):go.y1&&(c=y-o.y0+10,o=O(o,c,t,r),e.nodes.forEach(function(e){i(e)==i(o)||e.column!=o.column||e.y0o.y1&&O(e,c,t,r)}))}})}})}(c,_,M,S),R(c,M,S),F(c,M,S);return function(e,r,i){var n=e.nodes,a=e.links,o=!1,s=!1;if(a.forEach(function(e){"top"==e.circularLinkType?o=!0:"bottom"==e.circularLinkType&&(s=!0)}),!1==o||!1==s){var l=t.min(n,function(e){return e.y0}),c=(i-r)/(t.max(n,function(e){return e.y1})-l);n.forEach(function(e){var t=(e.y1-e.y0)*c;e.y0=(e.y0-l)*c,e.y1=e.y0+t}),a.forEach(function(e){e.y0=(e.y0-l)*c,e.y1=(e.y1-l)*c,e.width=e.width*c})}}(c,_,M),k(c,I,M,S),c}function j(e){e.nodes.forEach(function(e){e.sourceLinks.sort(u),e.targetLinks.sort(c)}),e.nodes.forEach(function(e){var t=e.y0,r=t,i=e.y1,n=i;e.sourceLinks.forEach(function(e){e.circular?(e.y0=i-e.width/2,i-=e.width):(e.y0=t+e.width/2,t+=e.width)}),e.targetLinks.forEach(function(e){e.circular?(e.y1=n-e.width/2,n-=e.width):(e.y1=r+e.width/2,r+=e.width)})})}return D.nodeId=function(e){return arguments.length?(S="function"==typeof e?e:s(e),D):S},D.nodeAlign=function(e){return arguments.length?(E="function"==typeof e?e:s(e),D):E},D.nodeWidth=function(e){return arguments.length?(A=+e,D):A},D.nodePadding=function(t){return arguments.length?(e=+t,D):e},D.nodes=function(e){return arguments.length?(C="function"==typeof e?e:s(e),D):C},D.links=function(e){return arguments.length?(L="function"==typeof e?e:s(e),D):L},D.size=function(e){return arguments.length?(a=_=0,T=+e[0],M=+e[1],D):[T-a,M-_]},D.extent=function(e){return arguments.length?(a=+e[0][0],T=+e[1][0],_=+e[0][1],M=+e[1][1],D):[[a,_],[T,M]]},D.iterations=function(e){return arguments.length?(P=+e,D):P},D.circularLinkGap=function(e){return arguments.length?(I=+e,D):I},D.nodePaddingRatio=function(e){return arguments.length?(i=+e,D):i},D.sortNodes=function(e){return arguments.length?(z=e,D):z},D.update=function(e){return b(e,S),j(e),e.links.forEach(function(e){e.circular&&(e.circularLinkType=e.y0+e.y1typeof t?r(e,vW(),vj(),vH(),vY()):r(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)}}),v$=p({"src/traces/sankey/constants.js"(e,t){t.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"}}}}),vX=p({"src/traces/sankey/render.js"(e,t){var r=vU(),i=(dE(),v(dS)).interpolateNumber,n=T(),a=vG(),o=vZ(),s=v$(),l=ee(),c=t9(),u=tv(),h=u.strTranslate,d=u.strRotate,f=yF(),p=f.keyFun,m=f.repeat,g=f.unwrap,y=tF(),x=eQ(),b=tR(),_=b.CAP_SHIFT,w=b.LINE_SPACING;function M(e,t,r){var i,n=g(t),l=n.trace,c=l.domain,h="h"===l.orientation,d="reversed"===l.direction,f=l.node.pad,p=l.node.thickness,m={justify:a.sankeyJustify,left:a.sankeyLeft,right:a.sankeyRight,center:a.sankeyCenter}[l.node.align],y=e.width*(c.x[1]-c.x[0]),v=e.height*(c.y[1]-c.y[0]),x=n._nodes,b=n._links,_=n.circular;function w(e){"input"===l[e].sort&&(_?u.warn(`Circular Sankey diagrams do not support the "input" ${e}.sort mode; falling back to the default sort.`):i[`${e}Sort`](null))}(i=_?o.sankeyCircular().circularLinkGap(0):a.sankey()).iterations(s.sankeyIterations).size(h?[y,v]:[v,y]).nodeWidth(p).nodePadding(f).nodeId(function(e){return e.pointNumber}).nodeAlign(m).nodes(x).links(b),w("link"),w("node");var T=i();for(var M in i.nodePadding()o+p&&(a+=1,t=s.x0),o=s.x0,n[a]||(n[a]=[]),n[a].push(s),r=t-s.x0,s.x0+=r,s.x1+=r}return n})(x=T.nodes).forEach(function(e){var t,r,i,n=0,a=e.length;for(e.sort(function(e,t){return e.y0-t.y0}),i=0;i=n||(r=n-t.y0)>1e-6&&(t.y0+=r,t.y1+=r),n=t.y1+f}),i.update(T)}return{circular:_,key:r,trace:l,guid:u.randstr(),horizontal:h,reversed:d,width:y,height:v,nodePad:l.node.pad,nodeLineColor:l.node.line.color,nodeLineWidth:l.node.line.width,linkLineColor:l.link.line.color,linkLineWidth:l.link.line.width,linkArrowLength:l.link.arrowlen,valueFormat:l.valueformat,valueSuffix:l.valuesuffix,textFont:l.textfont,translateX:c.x[0]*e.width+e.margin.l,translateY:e.height-c.y[1]*e.height+e.margin.t,dragParallel:h?v:y,dragPerpendicular:h?y:v,arrangement:l.arrangement,sankey:i,graph:T,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function k(e,t,r){var i=t.source.label+"|"+t.target.label;return t.trace=e.trace,t.curveNumber=e.trace.index,{circular:e.circular,key:i+"__"+r,traceId:e.key,pointNumber:t.pointNumber,link:t,rgb:l.rgb(t.color),alpha:l.parse(t.color).alpha,hoverRgb:l.rgb(t.hovercolor),hoverAlpha:l.parse(t.hovercolor).alpha,linkPath:A,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,linkArrowLength:e.linkArrowLength,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function A(){return function(e){var t,r,n,a,o,s,l,c=e.linkArrowLength;if(e.link.circular)return t=e.link,r=c,n="",a=t.width/2,s=(o=t.circularPathData).sourceX+o.verticalBuffer0?" L "+o.targetX+" "+o.targetY:"")+"Z"):(n="M "+(o.targetX-r)+" "+(o.targetY-a)+" L "+(o.rightInnerExtent-r)+" "+(o.targetY-a)+" A "+(o.rightLargeArcRadius+a)+" "+(o.rightSmallArcRadius+a)+" 0 0 0 "+(o.rightFullExtent-a-r)+" "+(o.targetY+o.rightSmallArcRadius)+" L "+(o.rightFullExtent-a-r)+" "+o.verticalRightInnerExtent,s&&l?n+=" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.rightInnerExtent-a-r)+" "+(o.verticalFullExtent+a)+" L "+(o.rightFullExtent+a-r-(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent+a)+" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.leftFullExtent+a)+" "+o.verticalLeftInnerExtent:s?n+=" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.rightFullExtent-r-a-(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent-a)+" L "+(o.leftFullExtent+a+(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent-a)+" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.leftFullExtent+a)+" "+o.verticalLeftInnerExtent:n+=" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.rightInnerExtent-r)+" "+(o.verticalFullExtent+a)+" L "+o.leftInnerExtent+" "+(o.verticalFullExtent+a)+" A "+(o.leftLargeArcRadius+a)+" "+(o.leftLargeArcRadius+a)+" 0 0 0 "+(o.leftFullExtent+a)+" "+o.verticalLeftInnerExtent,n+=" L "+(o.leftFullExtent+a)+" "+(o.sourceY+o.leftSmallArcRadius)+" A "+(o.leftLargeArcRadius+a)+" "+(o.leftSmallArcRadius+a)+" 0 0 0 "+o.leftInnerExtent+" "+(o.sourceY-a)+" L "+o.sourceX+" "+(o.sourceY-a)+" L "+o.sourceX+" "+(o.sourceY+a)+" L "+o.leftInnerExtent+" "+(o.sourceY+a)+" A "+(o.leftLargeArcRadius-a)+" "+(o.leftSmallArcRadius-a)+" 0 0 1 "+(o.leftFullExtent-a)+" "+(o.sourceY+o.leftSmallArcRadius)+" L "+(o.leftFullExtent-a)+" "+o.verticalLeftInnerExtent,s&&l?n+=" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.leftFullExtent-a-(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent-a)+" L "+(o.rightFullExtent+a-r+(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent-a)+" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.rightFullExtent+a-r)+" "+o.verticalRightInnerExtent:s?n+=" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.leftFullExtent+a)+" "+(o.verticalFullExtent+a)+" L "+(o.rightFullExtent-r-a)+" "+(o.verticalFullExtent+a)+" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.rightFullExtent+a-r)+" "+o.verticalRightInnerExtent:n+=" A "+(o.leftLargeArcRadius-a)+" "+(o.leftLargeArcRadius-a)+" 0 0 1 "+o.leftInnerExtent+" "+(o.verticalFullExtent-a)+" L "+(o.rightInnerExtent-r)+" "+(o.verticalFullExtent-a)+" A "+(o.rightLargeArcRadius-a)+" "+(o.rightLargeArcRadius-a)+" 0 0 1 "+(o.rightFullExtent+a-r)+" "+o.verticalRightInnerExtent,n+=" L "+(o.rightFullExtent+a-r)+" "+(o.targetY+o.rightSmallArcRadius)+" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.rightInnerExtent-r)+" "+(o.targetY+a)+" L "+(o.targetX-r)+" "+(o.targetY+a)+(r>0?" L "+o.targetX+" "+o.targetY:"")+"Z"),n;var u=Math.abs((e.link.target.x0-e.link.source.x1)/2);c>u&&(c=u);var h=e.link.source.x1,d=e.link.target.x0-c,f=i(h,d),p=f(.5),m=f(.5),g=e.link.y0-e.link.width/2,y=e.link.y0+e.link.width/2,v=e.link.y1-e.link.width/2,x=e.link.y1+e.link.width/2,b="M"+h+","+g,_="C"+p+","+g+" "+m+","+v+" "+d+","+v,w="C"+m+","+x+" "+p+","+y+" "+h+","+y,T=c>0?"L"+(d+c)+","+(v+e.link.width/2):"";return b+_+(T+="L"+d+","+x)+w+"Z"}}function S(e,t){var r=s.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var n=t.dx,a=Math.max(.5,t.dy),o="node_"+t.pointNumber;return t.group&&(o=u.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:o,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(n),visibleHeight:a,zoneX:-r,zoneY:-i,zoneWidth:n+2*r,zoneHeight:a+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:1===t.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,reversed:e.reversed,rgb:l.rgb(t.color),alpha:l.parse(t.color).alpha,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,o].join("_"),interactionState:e.interactionState,figure:e}}function E(e){e.attr("transform",function(e){return h(e.node.x0.toFixed(3),e.node.y0.toFixed(3))})}function C(e){e.call(E)}function L(e,t){e.call(C),t.attr("d",A())}function P(e){e.attr("width",function(e){return e.node.x1-e.node.x0}).attr("height",function(e){return e.visibleHeight})}function I(e){return e.link.width>1||e.linkLineWidth>0}function z(e){return e.horizontal?e.reversed?h(e.translateX+e.width,e.translateY)+"matrix(-1 0 0 1 0 0)":h(e.translateX,e.translateY)+"matrix(1 0 0 1 0 0)":e.reversed?h(e.translateX,e.translateY+e.height)+"matrix(0 -1 1 0 0 0)":h(e.translateX,e.translateY)+"matrix(0 1 1 0 0 0)"}function D(e,t,r){e.on(".basic",null).on("mouseover.basic",function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.hover(this,e,t),e.interactionState.hovered=[this,e])}).on("mousemove.basic",function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.follow(this,e),e.interactionState.hovered=[this,e])}).on("mouseout.basic",function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.unhover(this,e,t),e.interactionState.hovered=!1)}).on("click.basic",function(e){e.interactionState.hovered&&(r.unhover(this,e,t),e.interactionState.hovered=!1),e.interactionState.dragInProgress||e.partOfGroup||r.select(this,e,t)})}function O(e,t,i,a){var o=n.behavior.drag().origin(function(e){return{x:e.node.x0+e.visibleWidth/2,y:e.node.y0+e.visibleHeight/2}}).on("dragstart",function(n){if("fixed"!==n.arrangement&&(u.ensureSingle(a._fullLayout._infolayer,"g","dragcover",function(e){a._fullLayout._dragCover=e}),u.raiseToTop(this),n.interactionState.dragInProgress=n.node,F(n.node),n.interactionState.hovered&&(i.nodeEvents.unhover.apply(0,n.interactionState.hovered),n.interactionState.hovered=!1),"snap"===n.arrangement)){var o,l,c,h,d,f=n.traceId+"|"+n.key;n.forceLayouts[f]?n.forceLayouts[f].alpha(1):function(e,t,i){for(var n,a,o,l=i.graph.nodes,c=0;c0&&o.forceLayouts[n].alpha(0)})).stop()}(e,f,n),o=e,l=t,c=n,h=f,d=a,window.requestAnimationFrame(function e(){for(t=0;t0)window.requestAnimationFrame(e);else{var t,r=c.node.originalX;c.node.x0=r-c.visibleWidth/2,c.node.x1=r+c.visibleWidth/2,R(c,d)}})}}).on("drag",function(r){if("fixed"!==r.arrangement){var i=n.event.x,a=n.event.y;"snap"===r.arrangement?(r.node.x0=i-r.visibleWidth/2,r.node.x1=i+r.visibleWidth/2):("freeform"===r.arrangement&&(r.node.x0=i-r.visibleWidth/2,r.node.x1=i+r.visibleWidth/2),a=Math.max(0,Math.min(r.size-r.visibleHeight/2,a))),r.node.y0=a-r.visibleHeight/2,r.node.y1=a+r.visibleHeight/2,F(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),L(e.filter(j(r)),t))}}).on("dragend",function(e){if("fixed"!==e.arrangement){e.interactionState.dragInProgress=!1;for(var t=0;tI(e)?l.rgb(e.linkLineColor):e.rgb).style("stroke-opacity",e=>I(e)?l.opacity(e.linkLineColor):e.alpha).style("fill",e=>e.rgb).style("fill-opacity",e=>e.alpha).style("stroke-width",e=>I(e)?e.linkLineWidth:1).attr("d",A()),C.style("opacity",function(){return e._context.staticPlot||f||v?1:0}).transition().ease(s.ease).duration(s.duration).style("opacity",1),C.exit().transition().ease(s.ease).duration(s.duration).style("opacity",0).remove();var L=b.selectAll("."+s.cn.sankeyNodeSet).data(m,p);L.enter().append("g").classed(s.cn.sankeyNodeSet,!0),L.style("cursor",function(e){switch(e.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var R=L.selectAll("."+s.cn.sankeyNode).data(function(e){var t=e.graph.nodes;return function(e){var t,r=[];for(t=0;te.rgb).style("fill-opacity",e=>e.alpha),F.transition().ease(s.ease).duration(s.duration).call(P);var j=R.selectAll("."+s.cn.nodeLabel).data(m);j.enter().append("text").classed(s.cn.nodeLabel,!0).style("cursor","default"),j.attr("data-notex",1).text(function(e){return e.node.label}).each(function(t){var r=n.select(this);c.font(r,t.textFont),y.convertToTspans(r,e)}).attr("text-anchor",function(e){return e.horizontal&&e.left!==e.reversed?"end":"start"}).attr("transform",function(e){var t=n.select(this),r=y.lineCount(t),i=e.textFont.size*((r-1)*w-_),a=e.nodeLineWidth/2+3;if(!e.horizontal){var o=e.reversed?(e.visibleWidth+i)/2:(e.visibleWidth-i)/2,s=e.reversed?d(90):"scale(-1,1)"+d(90);return h(o,a)+s}var l=a,o=(e.visibleHeight-i)/2;return e.left?l=-l:l+=e.visibleWidth,h(l,o)+(e.reversed?"scale(-1,1)":"")}),j.transition().ease(s.ease).duration(s.duration)}}}),vK=p({"src/traces/sankey/plot.js"(e,t){var r=T(),i=tv(),n=i.numberFormat,a=vX(),o=rD(),s=ee(),l=v$().cn,c=i._;function u(e){return""!==e}function h(e,t){return e.filter(function(e){return e.key===t.traceId})}function d(e,t){r.select(e).select("path").style("fill-opacity",t),r.select(e).select("rect").style("fill-opacity",t)}function f(e){r.select(e).select("text.name").style("fill","black")}function p(e){return function(t){return -1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function m(e){return function(t){return -1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(e,t,r){t&&r&&h(r,t).selectAll("."+l.sankeyLink).filter(p(t)).call(v.bind(0,t,r,!1))}function y(e,t,r){t&&r&&h(r,t).selectAll("."+l.sankeyLink).filter(p(t)).call(x.bind(0,t,r,!1))}function v(e,t,r,i){i.style("fill",function(e){if(!e.link.concentrationscale)return e.hoverRgb}).style("fill-opacity",function(e){if(!e.link.concentrationscale)return e.hoverAlpha}),i.each(function(r){var i=r.link.label;""!==i&&h(t,e).selectAll("."+l.sankeyLink).filter(function(e){return e.link.label===i}).style("fill",function(e){if(!e.link.concentrationscale)return e.hoverRgb}).style("fill-opacity",function(e){if(!e.link.concentrationscale)return e.hoverAlpha})}),r&&h(t,e).selectAll("."+l.sankeyNode).filter(m(e)).call(g)}function x(e,t,r,i){i.style("fill",function(e){return e.rgb}).style("fill-opacity",function(e){return e.alpha}),i.each(function(r){var i=r.link.label;""!==i&&h(t,e).selectAll("."+l.sankeyLink).filter(function(e){return e.link.label===i}).style("fill",e=>e.rgb).style("fill-opacity",e=>e.alpha)}),r&&h(t,e).selectAll(l.sankeyNode).filter(m(e)).call(y)}function b(e,t){var r=e.hoverlabel||{},n=i.nestedProperty(r,t).get();return!Array.isArray(n)&&n}t.exports=function(e,t){for(var i=e._fullLayout,h=i._paper,p=i._size,m=0;m"),color:b(l,"bgcolor")||s.addOpacity(m.color,1),borderColor:b(l,"bordercolor"),fontFamily:b(l,"font.family"),fontSize:b(l,"font.size"),fontColor:b(l,"font.color"),fontWeight:b(l,"font.weight"),fontStyle:b(l,"font.style"),fontVariant:b(l,"font.variant"),fontTextcase:b(l,"font.textcase"),fontLineposition:b(l,"font.lineposition"),fontShadow:b(l,"font.shadow"),nameLength:b(l,"namelength"),textAlign:b(l,"align"),idealAlign:r.event.x"),color:b(s,"bgcolor")||a.rgb,borderColor:b(s,"bordercolor"),fontFamily:b(s,"font.family"),fontSize:b(s,"font.size"),fontColor:b(s,"font.color"),fontWeight:b(s,"font.weight"),fontStyle:b(s,"font.style"),fontVariant:b(s,"font.variant"),fontTextcase:b(s,"font.textcase"),fontLineposition:b(s,"font.lineposition"),fontShadow:b(s,"font.shadow"),nameLength:b(s,"namelength"),textAlign:b(s,"align"),idealAlign:"left",hovertemplate:s.hovertemplate,hovertemplateLabels:v,eventData:[a.node]},{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:e});d(w,.85),f(w)}}},unhover:function(t,n,a){!1!==e._fullLayout.hovermode&&(r.select(t).call(y,n,a),"skip"!==n.node.trace.node.hoverinfo&&(n.node.fullData=n.node.trace,e.emit("plotly_unhover",{event:r.event,points:[n.node]})),o.loneUnhover(i._hoverlayer.node()))},select:function(t,i,n){var a=i.node;a.originalEvent=r.event,e._hoverdata=[a],r.select(t).call(y,i,n),o.click(e,{target:!0})}}})}}}),vJ=p({"src/traces/sankey/base_plot.js"(e){var t=eq().overrideAll,r=tI().getModuleCalcData,i=vK(),n=W(),a=rf(),o=rd(),s=iM().prepSelect,l=tv(),c=eQ(),u="sankey";e.name=u,e.baseLayoutAttrOverrides=t({hoverlabel:n.hoverlabel},"plot","nested"),e.plot=function(t){var n=r(t.calcdata,u)[0];i(t,n),e.updateFx(t)},e.clean=function(e,t,r,i){var n=i._has&&i._has(u),a=t._has&&t._has(u);n&&!a&&(i._paperdiv.selectAll(".sankey").remove(),i._paperdiv.selectAll(".bgsankey").remove())},e.updateFx=function(e){for(var t=0;t0}function M(e){e.each(function(e){y.stroke(r.select(this),e.line.color)}).each(function(e){y.fill(r.select(this),e.color)}).style("stroke-width",function(e){return e.line.width})}function k(e,t,r){var i=e._fullLayout,n=a.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),o={type:"linear",_id:"x"+t._id},s={letter:"x",font:i.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function l(e,t){return a.coerce(n,o,g,e,t)}return p(n,o,l,s,i),m(n,o,l,s),o}function A(e,t,r){return[Math.min(t/e.width,r/e.height),e,t+"x"+r]}function S(e,t,i,n){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),o=r.select(a);return o.text(e).attr("x",0).attr("y",0).attr("text-anchor",i).attr("data-unformatted",e).call(d.convertToTspans,n).call(u.font,t),u.bBox(o.node())}function E(e,t,r,i,n,o){var s="_cache"+t;e[s]&&e[s].key===n||(e[s]={key:n,value:r});var l=a.aggNums(o,null,[e[s].value,i],2);return e[s].value=l,l}t.exports=function(e,t,p,m){var g,v=e._fullLayout;w(p)&&m&&(g=m()),a.makeTraceGroups(v._indicatorlayer,t,"trace").each(function(t){var m,T,C,L,P,I=t[0].trace,z=r.select(this),D=I._hasGauge,O=I._isAngular,R=I._isBullet,F=I.domain,j={w:v._size.w*(F.x[1]-F.x[0]),h:v._size.h*(F.y[1]-F.y[0]),l:v._size.l+v._size.w*F.x[0],r:v._size.r+v._size.w*(1-F.x[1]),t:v._size.t+v._size.h*(1-F.y[1]),b:v._size.b+v._size.h*F.y[0]},B=j.l+j.w/2,N=j.t+j.h/2,U=Math.min(j.w/2,j.h),V=h.innerRadius*U,q=I.align||"center";if(L=N,D){if(O&&(C=B,L=N+U/2,P=function(e){var t,r;return t=e,[(r=.9*V)/Math.sqrt(t.width/2*(t.width/2)+t.height*t.height),t,r]}),R){var H=h.bulletPadding,G=1-h.bulletNumberDomainSize+H;C=j.l+(G+(1-G)*b[q])*j.w,P=function(e){return A(e,(h.bulletNumberDomainSize-H)*j.w,j.h)}}}else C=j.l+b[q]*j.w,P=function(e){return A(e,j.w,j.h)};(function(e,t,i,l){var c,h,p,m=i[0].trace,g=l.numbersX,v=l.numbersY,T=m.align||"center",M=x[T],A=l.transitionOpts,C=l.onComplete,L=a.ensureSingle(t,"g","numbers"),P=[];m._hasNumber&&P.push("number"),m._hasDelta&&(P.push("delta"),"left"===m.delta.position&&P.reverse());var I=L.selectAll("text").data(P);function z(t,r,i,n){if(!t.match("s")||i>=0==n>=0||r(i).slice(-1).match(_)||r(n).slice(-1).match(_))return r;var a=k(e,{tickformat:t.slice().replace("s","f").replace(/\d+/,function(e){return parseInt(e)-1})});return function(e){return 1>Math.abs(e)?f.tickText(a,e).text:r(e)}}I.enter().append("text"),I.attr("text-anchor",function(){return M}).attr("class",function(e){return e}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),I.exit().remove();var D,O=m.mode+m.align;if(m._hasDelta&&(D=function(){var t=k(e,{tickformat:m.delta.valueformat},m._range);t.setScale(),f.prepTicks(t);var a=function(e){return f.tickText(t,e).text},o=m.delta.suffix,s=m.delta.prefix,l=function(e){return m.delta.relative?e.relativeDelta:e.delta},c=function(e,t){return 0===e||"number"!=typeof e||isNaN(e)?"-":(e>0?m.delta.increasing.symbol:m.delta.decreasing.symbol)+s+t(e)+o},p=function(e){return e.delta>=0?m.delta.increasing.color:m.delta.decreasing.color};void 0===m._deltaLastValue&&(m._deltaLastValue=l(i[0]));var g=L.select("text.delta");function v(){g.text(c(l(i[0]),a)).call(y.fill,p(i[0])).call(d.convertToTspans,e)}return g.call(u.font,m.delta.font).call(y.fill,p({delta:m._deltaLastValue})),w(A)?g.transition().duration(A.duration).ease(A.easing).tween("text",function(){var e=r.select(this),t=l(i[0]),o=m._deltaLastValue,s=z(m.delta.valueformat,a,o,t),u=n(o,t);return m._deltaLastValue=t,function(t){e.text(c(u(t),s)),e.call(y.fill,p({delta:u(t)}))}}).each("end",function(){v(),C&&C()}).each("interrupt",function(){v(),C&&C()}):v(),h=S(c(l(i[0]),a),m.delta.font,M,e),g}(),O+=m.delta.position+m.delta.font.size+m.delta.font.family+m.delta.valueformat,O+=m.delta.increasing.symbol+m.delta.decreasing.symbol,p=h),m._hasNumber&&(function(){var t=k(e,{tickformat:m.number.valueformat},m._range);t.setScale(),f.prepTicks(t);var a=function(e){return f.tickText(t,e).text},o=m.number.suffix,s=m.number.prefix,l=L.select("text.number");function h(){var t="number"==typeof i[0].y?s+a(i[0].y)+o:"-";l.text(t).call(u.font,m.number.font).call(d.convertToTspans,e)}w(A)?l.transition().duration(A.duration).ease(A.easing).each("end",function(){h(),C&&C()}).each("interrupt",function(){h(),C&&C()}).attrTween("text",function(){var e=r.select(this),t=n(i[0].lastY,i[0].y);m._lastValue=i[0].y;var l=z(m.number.valueformat,a,i[0].lastY,i[0].y);return function(r){e.text(s+l(t(r))+o)}}):h(),c=S(s+a(i[0].y)+o,m.number.font,M,e)}(),O+=m.number.font.size+m.number.font.family+m.number.valueformat+m.number.suffix+m.number.prefix,p=c),m._hasDelta&&m._hasNumber){var R,F,j=[(c.left+c.right)/2,(c.top+c.bottom)/2],B=[(h.left+h.right)/2,(h.top+h.bottom)/2],N=.75*m.delta.font.size;"left"===m.delta.position&&(R=E(m,"deltaPos",0,-1*(c.width*b[m.align]+h.width*(1-b[m.align])+N),O,Math.min),F=j[1]-B[1],p={width:c.width+h.width+N,height:Math.max(c.height,h.height),left:h.left+R,right:c.right,top:Math.min(c.top,h.top+F),bottom:Math.max(c.bottom,h.bottom+F)}),"right"===m.delta.position&&(R=E(m,"deltaPos",0,c.width*(1-b[m.align])+h.width*b[m.align]+N,O,Math.max),F=j[1]-B[1],p={width:c.width+h.width+N,height:Math.max(c.height,h.height),left:c.left,right:h.right+R,top:Math.min(c.top,h.top+F),bottom:Math.max(c.bottom,h.bottom+F)}),"bottom"===m.delta.position&&(R=null,F=h.height,p={width:Math.max(c.width,h.width),height:c.height+h.height,left:Math.min(c.left,h.left),right:Math.max(c.right,h.right),top:c.bottom-c.height,bottom:c.bottom+h.height}),"top"===m.delta.position&&(R=null,F=c.top,p={width:Math.max(c.width,h.width),height:c.height+h.height,left:Math.min(c.left,h.left),right:Math.max(c.right,h.right),top:c.bottom-c.height-h.height,bottom:c.bottom}),D.attr({dx:R,dy:F})}(m._hasNumber||m._hasDelta)&&L.attr("transform",function(){var e=l.numbersScaler(p);O+=e[2];var t,r=E(m,"numbersScale",1,e[0],O,Math.min);m._scaleNumbers||(r=1),t=m._isAngular?v-r*p.bottom:v-r*(p.top+p.bottom)/2,m._numbersTop=r*p.top+t;var i=p[T];"center"===T&&(i=(p.left+p.right)/2);var n=g-r*i;return s(n=E(m,"numbersTranslate",0,n,O,Math.max),t)+o(r)})})(e,z,t,{numbersX:C,numbersY:L,numbersScaler:P,transitionOpts:p,onComplete:g}),D&&(m={range:I.gauge.axis.range,color:I.gauge.bgcolor,line:{color:I.gauge.bordercolor,width:0},thickness:1},T={range:I.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:I.gauge.bordercolor,width:I.gauge.borderwidth},thickness:1});var W=z.selectAll("g.angular").data(O?t:[]);W.exit().remove();var Y=z.selectAll("g.angularaxis").data(O?t:[]);Y.exit().remove(),O&&function(e,t,n){var a,o,u,h,d,p,m=t[0].trace,g=n.size,y=n.radius,v=n.innerRadius,x=n.gaugeBg,b=n.gaugeOutline,_=[g.l+g.w/2,g.t+g.h/2+y/2],T=n.gauge,A=n.layer,S=n.transitionOpts,E=n.onComplete,C=Math.PI/2;function L(e){var t=m.gauge.axis.range[0],r=(e-t)/(m.gauge.axis.range[1]-t)*Math.PI-C;return r<-C?-C:r>C?C:r}function P(e){return r.svg.arc().innerRadius((v+y)/2-e/2*(y-v)).outerRadius((v+y)/2+e/2*(y-v)).startAngle(-C)}function I(e){e.attr("d",function(e){return P(e.thickness).startAngle(L(e.range[0])).endAngle(L(e.range[1]))()})}T.enter().append("g").classed("angular",!0),T.attr("transform",s(_[0],_[1])),A.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),A.selectAll("g.xangularaxistick,path,text").remove(),(h=k(e,m.gauge.axis)).type="linear",h.range=m.gauge.axis.range,h._id="xangularaxis",h.ticklabeloverflow="allow",h.setScale();var z=function(e){return(h.range[0]-e.x)/(h.range[1]-h.range[0])*Math.PI+Math.PI},D={},O=f.makeLabelFns(h,0).labelStandoff;D.xFn=function(e){return Math.cos(z(e))*O},D.yFn=function(e){var t=z(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(O+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*c)},D.anchorFn=function(e){var t=Math.cos(z(e));return .1>Math.abs(t)?"middle":t>0?"start":"end"},D.heightFn=function(e,t,r){return -.5*(1+Math.sin(z(e)))*r};var R=function(e){return s(_[0]+y*Math.cos(e),_[1]-y*Math.sin(e))};if(d=f.calcTicks(h),p=f.getTickSigns(h)[2],h.visible){p="inside"===h.ticks?-1:1;var F=(h.linewidth||1)/2;f.drawTicks(e,h,{vals:d,layer:A,path:"M"+p*F+",0h"+p*h.ticklen,transFn:function(e){var t=z(e);return R(t)+"rotate("+-l(t)+")"}}),f.drawLabels(e,h,{vals:d,layer:A,transFn:function(e){return R(z(e))},labelFns:D})}var j=[x].concat(m.gauge.steps),B=T.selectAll("g.bg-arc").data(j);B.enter().append("g").classed("bg-arc",!0).append("path"),B.select("path").call(I).call(M),B.exit().remove();var N=P(m.gauge.bar.thickness),U=T.selectAll("g.value-arc").data([m.gauge.bar]);U.enter().append("g").classed("value-arc",!0).append("path");var V=U.select("path");w(S)?(V.transition().duration(S.duration).ease(S.easing).each("end",function(){E&&E()}).each("interrupt",function(){E&&E()}).attrTween("d",(a=N,o=L(t[0].lastY),u=L(t[0].y),function(){var e=i(o,u);return function(t){return a.endAngle(e(t))()}})),m._lastValue=t[0].y):V.attr("d","number"==typeof t[0].y?N.endAngle(L(t[0].y)):"M0,0Z"),V.call(M),U.exit().remove(),j=[];var q=m.gauge.threshold.value;(q||0===q)&&j.push({range:[q,q],color:m.gauge.threshold.color,line:{color:m.gauge.threshold.line.color,width:m.gauge.threshold.line.width},thickness:m.gauge.threshold.thickness});var H=T.selectAll("g.threshold-arc").data(j);H.enter().append("g").classed("threshold-arc",!0).append("path"),H.select("path").call(I).call(M),H.exit().remove();var G=T.selectAll("g.gauge-outline").data([b]);G.enter().append("g").classed("gauge-outline",!0).append("path"),G.select("path").call(I).call(M),G.exit().remove()}(e,t,{radius:U,innerRadius:V,gauge:W,layer:Y,size:j,gaugeBg:m,gaugeOutline:T,transitionOpts:p,onComplete:g});var Z=z.selectAll("g.bullet").data(R?t:[]);Z.exit().remove();var $=z.selectAll("g.bulletaxis").data(R?t:[]);$.exit().remove(),R&&function(e,t,r){var i,n,a,o,l,c=t[0].trace,u=r.gauge,d=r.layer,p=r.gaugeBg,m=r.gaugeOutline,g=r.size,v=c.domain,x=r.transitionOpts,b=r.onComplete;u.enter().append("g").classed("bullet",!0),u.attr("transform",s(g.l,g.t)),d.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),d.selectAll("g.xbulletaxistick,path,text").remove();var _=g.h,T=c.gauge.bar.thickness*_,A=v.x[0],S=v.x[0]+(v.x[1]-v.x[0])*(c._hasNumber||c._hasDelta?1-h.bulletNumberDomainSize:1);function E(e){e.attr("width",function(e){return Math.max(0,i.c2p(e.range[1])-i.c2p(e.range[0]))}).attr("x",function(e){return i.c2p(e.range[0])}).attr("y",function(e){return .5*(1-e.thickness)*_}).attr("height",function(e){return e.thickness*_})}(i=k(e,c.gauge.axis))._id="xbulletaxis",i.domain=[A,S],i.setScale(),n=f.calcTicks(i),a=f.makeTransTickFn(i),o=f.getTickSigns(i)[2],l=g.t+g.h,i.visible&&(f.drawTicks(e,i,{vals:"inside"===i.ticks?f.clipEnds(i,n):n,layer:d,path:f.makeTickPath(i,l,o),transFn:a}),f.drawLabels(e,i,{vals:n,layer:d,transFn:a,labelFns:f.makeLabelFns(i,l)}));var C=[p].concat(c.gauge.steps),L=u.selectAll("g.bg-bullet").data(C);L.enter().append("g").classed("bg-bullet",!0).append("rect"),L.select("rect").call(E).call(M),L.exit().remove();var P=u.selectAll("g.value-bullet").data([c.gauge.bar]);P.enter().append("g").classed("value-bullet",!0).append("rect"),P.select("rect").attr("height",T).attr("y",(_-T)/2).call(M),w(x)?P.select("rect").transition().duration(x.duration).ease(x.easing).each("end",function(){b&&b()}).each("interrupt",function(){b&&b()}).attr("width",Math.max(0,i.c2p(Math.min(c.gauge.axis.range[1],t[0].y)))):P.select("rect").attr("width","number"==typeof t[0].y?Math.max(0,i.c2p(Math.min(c.gauge.axis.range[1],t[0].y))):0),P.exit().remove();var I=t.filter(function(){return c.gauge.threshold.value||0===c.gauge.threshold.value}),z=u.selectAll("g.threshold-bullet").data(I);z.enter().append("g").classed("threshold-bullet",!0).append("line"),z.select("line").attr("x1",i.c2p(c.gauge.threshold.value)).attr("x2",i.c2p(c.gauge.threshold.value)).attr("y1",(1-c.gauge.threshold.thickness)/2*_).attr("y2",(1-(1-c.gauge.threshold.thickness)/2)*_).call(y.stroke,c.gauge.threshold.line.color).style("stroke-width",c.gauge.threshold.line.width),z.exit().remove();var D=u.selectAll("g.gauge-outline").data([m]);D.enter().append("g").classed("gauge-outline",!0).append("rect"),D.select("rect").call(E).call(M),D.exit().remove()}(e,t,{gauge:Z,layer:$,size:j,gaugeBg:m,gaugeOutline:T,transitionOpts:p,onComplete:g});var X=z.selectAll("text.title").data(t);X.exit().remove(),X.enter().append("text").classed("title",!0),X.attr("text-anchor",function(){return R?x.right:x[I.title.align]}).text(I.title.text).call(u.font,I.title.font).call(d.convertToTspans,e),X.attr("transform",function(){var e,t=j.l+j.w*b[I.title.align],r=h.titlePadding,i=u.bBox(X.node());return D?(O&&(e=I.gauge.axis.visible?u.bBox(Y.node()).top-r-i.bottom:j.t+j.h/2-U/2-i.bottom-r),R&&(e=L-(i.top+i.bottom)/2,t=j.l-h.bulletPadding*j.w)):e=I._numbersTop-r-i.bottom,s(t,e)})})}}}),v7=p({"src/traces/indicator/index.js"(e,t){t.exports={moduleType:"trace",name:"indicator",basePlotModule:v2(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:v3(),supplyDefaults:v4().supplyDefaults,calc:v6().calc,plot:v8(),meta:{}}}}),v9=p({"lib/indicator.js"(e,t){t.exports=v7()}}),xe=p({"src/traces/table/attributes.js"(e,t){var r=ig(),i=q().extendFlat,n=eq().overrideAll,a=H(),o=at().attributes,s=tB().descriptionOnlyNumbers;t.exports=n({domain:o({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:s("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:i({},r.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:i({},a({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:s("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:i({},r.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:i({},a({arrayOk:!0}))}},"calc","from-root")}}),xt=p({"src/traces/table/defaults.js"(e,t){var r=tv(),i=xe(),n=at().defaults;t.exports=function(e,t,a,o){function s(n,a){return r.coerce(e,t,i,n,a)}n(t,o,s),s("columnwidth"),s("header.values"),s("header.format"),s("header.align"),s("header.prefix"),s("header.suffix"),s("header.height"),s("header.line.width"),s("header.line.color"),s("header.fill.color"),r.coerceFont(s,"header.font",o.font),function(e,t){for(var r=e.columnorder||[],i=e.header.values.length,n=r.slice(0,i),a=n.slice().sort(function(e,t){return e-t}),o=n.map(function(e){return a.indexOf(e)}),s=o.length;s",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}}),xn=p({"src/traces/table/data_preparation_helper.js"(e,t){var r=xi(),i=q().extendFlat,n=C(),a=z().isTypedArray,o=z().isArrayOrTypedArray;function s(e){if(o(e)){for(var t=0,r=0;r=t||c===e.length-1)&&(i[n]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o=p(),n+=a,s=c+1,a=0);return i}function p(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}t.exports=function(e,t){var a=c(t.cells.values),p=function(e){return e.slice(t.header.values.length,e.length)},m=c(t.header.values);m.length&&!m[0].length&&(m[0]=[""],m=c(m));var g=m.concat(p(a).map(function(){return u((m[0]||[""]).length)})),y=t.domain,v=Math.floor(e._fullLayout._size.w*(y.x[1]-y.x[0])),x=Math.floor(e._fullLayout._size.h*(y.y[1]-y.y[0])),b=t.header.values.length?g[0].map(function(){return t.header.height}):[r.emptyHeaderHeight],_=a.length?a[0].map(function(){return t.cells.height}):[],w=b.reduce(l,0),T=f(_,x-w+r.uplift),M=d(f(b,w),[]),k=d(T,M),A={},S=t.columnorder;o(S)&&(S=Array.from(S)),S=S.concat(p(a.map(function(e,t){return t})));var E=g.map(function(e,r){var i=o(t.columnwidth)?t.columnwidth[Math.min(r,t.columnwidth.length-1)]:t.columnwidth;return n(i)?Number(i):1}),C=E.reduce(l,0);E=E.map(function(e){return e/C*v});var L=Math.max(s(t.header.line.width),s(t.cells.line.width)),P={key:t.uid+e._context.staticPlot,translateX:y.x[0]*e._fullLayout._size.w,translateY:e._fullLayout._size.h*(1-y.y[1]),size:e._fullLayout._size,width:v,maxLineWidth:L,height:x,columnOrder:S,groupHeight:x,rowBlocks:k,headerRowBlocks:M,scrollY:0,cells:i({},t.cells,{values:a}),headerCells:i({},t.header,{values:g}),gdColumns:g.map(function(e){return e[0]}),gdColumnsOriginalOrder:g.map(function(e){return e[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map(function(e,t){var r=A[e];return A[e]=(r||0)+1,{key:e+"__"+A[e],label:e,specIndex:t,xIndex:S[t],xScale:h,x:void 0,calcdata:void 0,columnWidth:E[t]}})};return P.columns.forEach(function(e){e.calcdata=P,e.x=h(e)}),P}}}),xa=p({"src/traces/table/data_split_helpers.js"(e){var t=q().extendFlat;e.splitToPanels=function(e){var r=[0,0],i=t({},e,{key:"header",type:"header",page:0,prevPages:r,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:t({},e.calcdata,{cells:e.calcdata.headerCells})});return[t({},e,{key:"cells1",type:"cells",page:0,prevPages:r,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),t({},e,{key:"cells2",type:"cells",page:1,prevPages:r,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),i]},e.splitToCells=function(e){var t,r,i,n,a=(i=(r=(t=e).rowBlocks[t.page])?r.rows[0].rowIndex:0,n=r?i+r.rows.length:0,[i,n]);return(e.values||[]).slice(a[0],a[1]).map(function(t,r){return{keyWithinBlock:r+("string"==typeof t&&t.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:a[0]+r,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:t}})}}}),xo=p({"src/traces/table/plot.js"(e,t){var r=xi(),i=T(),n=tv(),a=n.numberFormat,o=yF(),s=t9(),l=tF(),c=tv().raiseToTop,u=tv().strTranslate,h=tv().cancelTransition,d=xn(),f=xa(),p=ee();function m(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function g(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function y(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function v(e){return[].concat.apply([],e.map(function(e){return e})).map(function(e){return e.__data__})}function x(e,t,n){var a=e.selectAll("."+r.cn.scrollbarKit).data(o.repeat,o.keyFun);a.enter().append("g").classed(r.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),a.each(function(e){var t,i=e.scrollbarState;i.totalHeight=R(t=e.rowBlocks,t.length-1)+(t.length?F(t[t.length-1],1/0):1),i.scrollableAreaHeight=e.groupHeight-E(e),i.currentlyVisibleHeight=Math.min(i.totalHeight,i.scrollableAreaHeight),i.ratio=i.currentlyVisibleHeight/i.totalHeight,i.barLength=Math.max(i.ratio*i.currentlyVisibleHeight,r.goldenRatio*r.scrollbarWidth),i.barWiggleRoom=i.currentlyVisibleHeight-i.barLength,i.wiggleRoom=Math.max(0,i.totalHeight-i.scrollableAreaHeight),i.topY=0===i.barWiggleRoom?0:e.scrollY/i.wiggleRoom*i.barWiggleRoom,i.bottomY=i.topY+i.barLength,i.dragMultiplier=i.wiggleRoom/i.barWiggleRoom}).attr("transform",function(e){return u(e.width+r.scrollbarWidth/2+r.scrollbarOffset,E(e))});var s=a.selectAll("."+r.cn.scrollbar).data(o.repeat,o.keyFun);s.enter().append("g").classed(r.cn.scrollbar,!0);var l=s.selectAll("."+r.cn.scrollbarSlider).data(o.repeat,o.keyFun);l.enter().append("g").classed(r.cn.scrollbarSlider,!0),l.attr("transform",function(e){return u(0,e.scrollbarState.topY||0)});var c=l.selectAll("."+r.cn.scrollbarGlyph).data(o.repeat,o.keyFun);c.enter().append("line").classed(r.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",r.scrollbarWidth).attr("stroke-linecap","round").attr("y1",r.scrollbarWidth/2),c.attr("y2",function(e){return e.scrollbarState.barLength-r.scrollbarWidth/2}).attr("stroke-opacity",function(e){return e.columnDragInProgress||!e.scrollbarState.barWiggleRoom||n?0:.4}),c.transition().delay(0).duration(0),c.transition().delay(r.scrollbarHideDelay).duration(r.scrollbarHideDuration).attr("stroke-opacity",0);var h=s.selectAll("."+r.cn.scrollbarCaptureZone).data(o.repeat,o.keyFun);h.enter().append("line").classed(r.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",r.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(r){var n=i.event.y,a=this.getBoundingClientRect(),o=r.scrollbarState,s=n-a.top,l=i.scale.linear().domain([0,o.scrollableAreaHeight]).range([0,o.totalHeight]).clamp(!0);o.topY<=s&&s<=o.bottomY||L(t,e,null,l(s-o.barLength/2))(r)}).call(i.behavior.drag().origin(function(e){return i.event.stopPropagation(),e.scrollbarState.scrollbarScrollInProgress=!0,e}).on("drag",L(t,e)).on("dragend",function(){})),h.attr("y2",function(e){return e.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(c.remove(),h.remove())}function b(e,t,n,a){var l,c,u,h,d,m=((c=((l=n.selectAll("."+r.cn.columnCells).data(o.repeat,o.keyFun)).enter().append("g").classed(r.cn.columnCells,!0),l.exit().remove(),l).selectAll("."+r.cn.columnCell).data(f.splitToCells,function(e){return e.keyWithinBlock})).enter().append("g").classed(r.cn.columnCell,!0),c.exit().remove(),c);m.each(function(e,t){var r=e.calcdata.cells.font,i=e.column.specIndex,n={size:M(r.size,i,t),color:M(r.color,i,t),family:M(r.family,i,t),weight:M(r.weight,i,t),style:M(r.style,i,t),variant:M(r.variant,i,t),textcase:M(r.textcase,i,t),lineposition:M(r.lineposition,i,t),shadow:M(r.shadow,i,t)};e.rowNumber=e.key,e.align=M(e.calcdata.cells.align,i,t),e.cellBorderWidth=M(e.calcdata.cells.line.width,i,t),e.font=n}),((u=m.selectAll("."+r.cn.cellRect).data(o.repeat,function(e){return e.keyWithinBlock})).enter().append("rect").classed(r.cn.cellRect,!0),u).attr("width",function(e){return e.column.columnWidth}).attr("stroke-width",function(e){return e.cellBorderWidth}).each(function(e){var t=i.select(this);p.stroke(t,M(e.calcdata.cells.line.color,e.column.specIndex,e.rowNumber)),p.fill(t,M(e.calcdata.cells.fill.color,e.column.specIndex,e.rowNumber))});var g=((d=((h=m.selectAll("."+r.cn.cellTextHolder).data(o.repeat,function(e){return e.keyWithinBlock})).enter().append("g").classed(r.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),h).selectAll("."+r.cn.cellText).data(o.repeat,function(e){return e.keyWithinBlock})).enter().append("text").classed(r.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){i.event.stopPropagation()}),d);g.each(function(e){s.font(i.select(this),e.font)}),_(g,t,a,e),O(m)}function _(e,t,n,o){e.text(function(e){var t,i=e.column.specIndex,n=e.rowNumber,o=e.value,s="string"==typeof o,l=s&&o.match(/
/i),c=!s||l;e.mayHaveMarkup=s&&o.match(/[<&>]/);var u="string"==typeof(h=o)&&h.match(r.latexCheck);e.latex=u;var h,d,f=u?"":M(e.calcdata.cells.prefix,i,n)||"",p=u?"":M(e.calcdata.cells.suffix,i,n)||"",m=u?null:M(e.calcdata.cells.format,i,n)||null,g=f+(m?a(m)(e.value):e.value)+p;if(e.wrappingNeeded=!e.wrapped&&!c&&!u&&(d=w(g)),e.cellHeightMayIncrease=l||u||e.mayHaveMarkup||(void 0===d?w(g):d),e.needsConvertToTspans=e.mayHaveMarkup||e.wrappingNeeded||e.latex,e.wrappingNeeded){var y=(" "===r.wrapSplitCharacter?g.replace(/n&&i.push(a),n+=l}return i}(n,l,s);1===c.length&&(c[0]===n.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),t.each(function(e,t){e.page=c[t],e.scrollY=l}),t.attr("transform",function(e){return u(0,R(e.rowBlocks,e.page)-e.scrollY)}),e&&(P(e,r,t,c,i.prevPages,i,0),P(e,r,t,c,i.prevPages,i,1),x(r,e))}}function L(e,t,n,a){return function(o){var s=o.calcdata?o.calcdata:o,l=t.filter(function(e){return s.key===e.key}),c=n||s.scrollbarState.dragMultiplier,u=s.scrollY;return s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a,C(e,l.selectAll("."+r.cn.yColumn).selectAll("."+r.cn.columnBlock).filter(A),l),s.scrollY===u}}function P(e,t,r,i,n,a,o){i[o]!==n[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){b(e,t,r.filter(function(e,t){return t===o&&i[t]!==n[t]}),r),n[o]=i[o]}))}function I(e,t,n,a){return function(){var o=i.select(t.parentNode);o.each(function(e){var t=e.fragments;o.selectAll("tspan.line").each(function(e,r){t[r].width=this.getComputedTextLength()});var i,n,a=t[t.length-1].width,s=t.slice(0,-1),l=[],c=0,u=e.column.columnWidth-2*r.cellPad;for(e.value="";s.length;)c+(n=(i=s.shift()).width+a)>u&&(e.value+=l.join(r.wrapSpacer)+r.lineBreaker,l=[],c=0),l.push(i.text),c+=n;c&&(e.value+=l.join(r.wrapSpacer)),e.wrapped=!0}),o.selectAll("tspan.line").remove(),_(o.select("."+r.cn.cellText),n,e,a),i.select(t.parentNode.parentNode).call(O)}}function z(e,t,n,a,o){return function(){if(!o.settledY){var s=i.select(t.parentNode),l=j(o),c=o.key-l.firstRowIndex,h=l.rows[c].rowHeight,d=Math.max(o.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*r.cellPad:h,h);d-l.rows[c].rowHeight&&(l.rows[c].rowHeight=d,e.selectAll("."+r.cn.columnCell).call(O),C(null,e.filter(A),0),x(n,a,!0)),s.attr("transform",function(){var e=this.parentNode.getBoundingClientRect(),t=i.select(this.parentNode).select("."+r.cn.cellRect).node().getBoundingClientRect(),n=this.transform.baseVal.consolidate(),a=t.top-e.top+(n?n.matrix.f:r.cellPad);return u(D(o,i.select(this.parentNode).select("."+r.cn.cellTextHolder).node().getBoundingClientRect().width),a)}),o.settledY=!0}}}function D(e,t){switch(e.align){case"left":default:return r.cellPad;case"right":return e.column.columnWidth-(t||0)-r.cellPad;case"center":return(e.column.columnWidth-(t||0))/2}}function O(e){e.attr("transform",function(e){var t=e.rowBlocks[0].auxiliaryBlocks.reduce(function(e,t){return e+F(t,1/0)},0);return u(0,F(j(e),e.key)+t)}).selectAll("."+r.cn.cellRect).attr("height",function(e){var t,r;return(t=j(e),r=e.key,t.rows[r-t.firstRowIndex]).rowHeight})}function R(e,t){for(var r=0,i=t-1;i>=0;i--)r+=function(e){var t=e.allRowsHeight;if(void 0!==t)return t;for(var r=0,i=0;it.length&&(e=e.slice(0,t.length)):e=[],n=0;n90&&(d-=180,l=-l),{angle:d,flip:l,p:e.c2p(i,t,r),offsetMultplier:c}}}}),xx=p({"src/traces/carpet/plot.js"(e,t){var r=T(),i=t9(),n=xg(),a=xy(),o=xv(),s=tF(),l=tv(),c=l.strRotate,u=l.strTranslate,h=tR();function d(e,t,o,s,l,c,u){var h="const-"+l+"-lines",d=o.selectAll("."+h).data(c);d.enter().append("path").classed(h,!0).style("vector-effect",u?"none":"non-scaling-stroke"),d.each(function(o){var s=o.x,l=o.y,c="M"+a(n([],s,e.c2p),n([],l,t.c2p),o.smoothing);r.select(this).attr("d",c).style("stroke-width",o.width).style("stroke",o.color).style("stroke-dasharray",i.dashStyle(o.dash,o.width)).style("fill","none")}),d.exit().remove()}function f(e,t,n,a,l,h,d,f){var p=h.selectAll("text."+f).data(d);p.enter().append("text").classed(f,!0);var m=0,g={};return p.each(function(l,h){if("auto"===l.axis.tickangle)d=o(a,t,n,l.xy,l.dxy);else{var d,f=(l.axis.tickangle+180)*Math.PI/180;d=o(a,t,n,l.xy,[Math.cos(f),Math.sin(f)])}h||(g={angle:d.angle,flip:d.flip});var p=(l.endAnchor?-1:1)*d.flip,y=r.select(this).attr({"text-anchor":p>0?"start":"end","data-notex":1}).call(i.font,l.font).text(l.text).call(s.convertToTspans,e),v=i.bBox(this);y.attr("transform",u(d.p[0],d.p[1])+c(d.angle)+u(l.axis.labelpadding*p,.3*v.height)),m=Math.max(m,v.width+l.axis.labelpadding)}),p.exit().remove(),g.maxExtent=m,g}t.exports=function(e,t,i,s){var c=e._context.staticPlot,u=t.xaxis,h=t.yaxis,p=e._fullLayout._clips;l.makeTraceGroups(s,i,"trace").each(function(t){var i,s,m,y,v,x,b,_,w,T,M,k,A,S,E,C,L=r.select(this),P=t[0],I=P.trace,z=I.aaxis,D=I.baxis,O=l.ensureSingle(L,"g","minorlayer"),R=l.ensureSingle(L,"g","majorlayer"),F=l.ensureSingle(L,"g","boundarylayer"),j=l.ensureSingle(L,"g","labellayer");L.style("opacity",I.opacity),d(u,h,R,z,"a",z._gridlines,!0),d(u,h,R,D,"b",D._gridlines,!0),d(u,h,O,z,"a",z._minorgridlines,!0),d(u,h,O,D,"b",D._minorgridlines,!0),d(u,h,F,z,"a-boundary",z._boundarylines,c),d(u,h,F,D,"b-boundary",D._boundarylines,c);var B=f(e,u,h,I,P,j,z._labels,"a-label"),N=f(e,u,h,I,P,j,D._labels,"b-label");i=e,s=j,m=I,y=P,v=u,x=h,b=B,_=N,A=l.aggNums(Math.min,null,m.a),S=l.aggNums(Math.max,null,m.a),E=l.aggNums(Math.min,null,m.b),C=l.aggNums(Math.max,null,m.b),w=.5*(A+S),T=E,M=m.ab2xy(w,T,!0),k=m.dxyda_rough(w,T),void 0===b.angle&&l.extendFlat(b,o(m,v,x,M,m.dxydb_rough(w,T))),g(i,s,m,y,M,k,m.aaxis,v,x,b,"a-title"),w=A,T=.5*(E+C),M=m.ab2xy(w,T,!0),k=m.dxydb_rough(w,T),void 0===_.angle&&l.extendFlat(_,o(m,v,x,M,m.dxyda_rough(w,T))),g(i,s,m,y,M,k,m.baxis,v,x,_,"b-title"),function(e,t,r,i,o){var s,c,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var h=l.ensureSingle(u,"path","carpetboundary"),d=t.clipsegments,f=[];for(c=0;c90&&v<270&&(_=(-s.lineCount(x)+m)*p*a-_),x.attr("transform",u(t.p[0],t.p[1])+c(t.angle)+u(0,_)).attr("text-anchor","middle").call(i.font,d.title.font)}),b.exit().remove()}}}),xb=p({"src/traces/carpet/cheater_basis.js"(e,t){var r=tv().isArrayOrTypedArray;t.exports=function(e,t,i){var n,a,o,s,l,c=[],u=r(e)?e.length:e,h=r(t)?t.length:t,d=r(e)?e:null,f=r(t)?t:null;d&&(o=(d.length-1)/(d[d.length-1]-d[0])/(u-1)),f&&(s=(f.length-1)/(f[f.length-1]-f[0])/(h-1));var p,m=1/0,g=-1/0;for(a=0;a=10)return null;for(var n=1/0,a=-1/0,o=t.length,s=0;s0&&(f=e.dxydi([],i-1,o,0,s),y.push(l[0]+f[0]/3),v.push(l[1]+f[1]/3),p=e.dxydi([],i-1,o,1,s),y.push(h[0]-p[0]/3),v.push(h[1]-p[1]/3)),y.push(h[0]),v.push(h[1]),l=h;else for(c=Math.floor(Math.max(0,Math.min(L-2,i=e.a2i(r)))),u=i-c,x.length=L,x.crossLength=P,x.xy=function(t){return e.evalxy([],i,t)},x.dxy=function(t,r){return e.dxydj([],c,t,u,r)},a=0;a0&&(m=e.dxydj([],c,a-1,u,0),y.push(l[0]+m[0]/3),v.push(l[1]+m[1]/3),g=e.dxydj([],c,a-1,u,1),y.push(h[0]-g[0]/3),v.push(h[1]-g[1]/3)),y.push(h[0]),v.push(h[1]),l=h;return x.axisLetter=t,x.axis=b,x.crossAxis=k,x.value=r,x.constvar=n,x.index=d,x.x=y,x.y=v,x.smoothing=k.smoothing,x}function D(r){var i,a,o,s,l,c=[],u=[],h={};if(h.length=x.length,h.crossLength=M.length,"b"===t)for(o=Math.max(0,Math.min(P-2,r)),l=Math.min(1,Math.max(0,r-o)),h.xy=function(t){return e.evalxy([],t,r)},h.dxy=function(t,r){return e.dxydi([],t,o,r,l)},i=0;ix.length-1||_.push(i(D(o),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(d=u;dx.length-1)&&!(m<0||m>x.length-1))for(g=x[s],y=x[m],a=0;ax[x.length-1]||w.push(i(z(p),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash})));b.startline&&T.push(i(D(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(D(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort(function(e,t){return e-t}))[0],h=c[1],d=u;d<=h;d++)f=b.tick0+b.dtick*d,_.push(i(z(f),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(d=u-1;dx[x.length-1]||w.push(i(z(p),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&T.push(i(z(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(z(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}}}),xT=p({"src/traces/carpet/calc_labels.js"(e,t){var r=rn(),i=q().extendFlat;t.exports=function(e,t){var n,a,o,s,l,c=t._labels=[],u=t._gridlines;for(n=0;n=0;n--)a[u-n]=e[h][n],o[u-n]=t[h][n];for(s.push({x:a,y:o,bicubic:l}),n=h,a=[],o=[];n>=0;n--)a[h-n]=e[n][0],o[h-n]=t[n][0];return s.push({x:a,y:o,bicubic:c}),s}}}),xk=p({"src/traces/carpet/smooth_fill_2d_array.js"(e,t){var r=tv();t.exports=function(e,t,i){var n,a,o,s=[],l=[],c=e[0].length,u=e.length,h=0;for(n=0;n0&&void 0!==(i=e[r][t-1])&&(a++,n+=i),t0&&void 0!==(i=e[r-1][t])&&(a++,n+=i),r0&&a0&&n1e-5);return r.log("Smoother converged to",T,"after",M,"iterations"),e}}}),xA=p({"src/traces/carpet/constants.js"(e,t){t.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),xS=p({"src/traces/carpet/catmull_rom.js"(e,t){t.exports=function(e,t,r,i){var n=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(n*n+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*n-l*l*o)*i,h=(c*c*a-l*l*s)*i,d=c*(l+c)*3,f=l*(l+c)*3;return[[t[0]+(d&&u/d),t[1]+(d&&h/d)],[t[0]-(f&&u/f),t[1]-(f&&h/f)]]}}}),xE=p({"src/traces/carpet/compute_control_points.js"(e,t){var r=xS(),i=tv().ensureArray;function n(e,t,r){var i=-.5*r[0]+1.5*t[0],n=-.5*r[1]+1.5*t[1];return[(2*i+e[0])/3,(2*n+e[1])/3]}t.exports=function(e,t,a,o,s,l){var c,u,h,d,f,p,m,g,y,v,x=a[0].length,b=a.length,_=s?3*x-2:x,w=l?3*b-2:b;for(e=i(e,w),t=i(t,w),h=0;hf&&em&&tp||tg},e.setScale=function(){var t=e._x,r=e._y,i=n(e._xctrl,e._yctrl,t,r,h.smoothing,d.smoothing);e._xctrl=i[0],e._yctrl=i[1],e.evalxy=a([e._xctrl,e._yctrl],c,u,h.smoothing,d.smoothing),e.dxydi=o([e._xctrl,e._yctrl],h.smoothing,d.smoothing),e.dxydj=s([e._xctrl,e._yctrl],h.smoothing,d.smoothing)},e.i2a=function(e){var r=Math.max(0,Math.floor(e[0]),c-2),i=e[0]-r;return(1-i)*t[r]+i*t[r+1]},e.j2b=function(e){var t=Math.max(0,Math.floor(e[1]),c-2),r=e[1]-t;return(1-r)*l[t]+r*l[t+1]},e.ij2ab=function(t){return[e.i2a(t[0]),e.j2b(t[1])]},e.a2i=function(e){var r=Math.max(0,Math.min(i(e,t),c-2)),n=t[r],a=t[r+1];return Math.max(0,Math.min(c-1,r+(e-n)/(a-n)))},e.b2j=function(e){var t=Math.max(0,Math.min(i(e,l),u-2)),r=l[t],n=l[t+1];return Math.max(0,Math.min(u-1,t+(e-r)/(n-r)))},e.ab2ij=function(t){return[e.a2i(t[0]),e.b2j(t[1])]},e.i2c=function(t,r){return e.evalxy([],t,r)},e.ab2xy=function(r,i,n){if(!n&&(rt[c-1]|il[u-1]))return[!1,!1];var a=e.a2i(r),o=e.b2j(i),s=e.evalxy([],a,o);if(n){var h,d,f,p,m=0,g=0,y=[];rt[c-1]?(h=c-2,d=1,m=(r-t[c-1])/(t[c-1]-t[c-2])):(h=Math.max(0,Math.min(c-2,Math.floor(a))),d=a-h),il[u-1]?(f=u-2,p=1,g=(i-l[u-1])/(l[u-1]-l[u-2])):(f=Math.max(0,Math.min(u-2,Math.floor(o))),p=o-f),m&&(e.dxydi(y,h,f,d,p),s[0]+=y[0]*m,s[1]+=y[1]*m),g&&(e.dxydj(y,h,f,d,p),s[0]+=y[0]*g,s[1]+=y[1]*g)}return s},e.c2p=function(e,t,r){return[t.c2p(e[0]),r.c2p(e[1])]},e.p2x=function(e,t,r){return[t.p2c(e[0]),r.p2c(e[1])]},e.dadi=function(e){var r=Math.max(0,Math.min(t.length-2,e));return t[r+1]-t[r]},e.dbdj=function(e){var t=Math.max(0,Math.min(l.length-2,e));return l[t+1]-l[t]},e.dxyda=function(t,r,i,n){var a=e.dxydi(null,t,r,i,n),o=e.dadi(t,i);return[a[0]/o,a[1]/o]},e.dxydb=function(t,r,i,n){var a=e.dxydj(null,t,r,i,n),o=e.dbdj(r,n);return[a[0]/o,a[1]/o]},e.dxyda_rough=function(t,r,i){var n=y*(i||.1),a=e.ab2xy(t+n,r,!0),o=e.ab2xy(t-n,r,!0);return[(a[0]-o[0])*.5/n,(a[1]-o[1])*.5/n]},e.dxydb_rough=function(t,r,i){var n=v*(i||.1),a=e.ab2xy(t,r+n,!0),o=e.ab2xy(t,r-n,!0);return[(a[0]-o[0])*.5/n,(a[1]-o[1])*.5/n]},e.dpdx=function(e){return e._m},e.dpdy=function(e){return e._m}}}}),xz=p({"src/traces/carpet/calc.js"(e,t){var r=rn(),i=tv().isArray1D,n=xb(),a=x_(),o=xw(),s=xT(),l=xM(),c=a7(),u=xk(),h=a8(),d=xI();t.exports=function(e,t){var f=r.getFromId(e,t.xaxis),p=r.getFromId(e,t.yaxis),m=t.aaxis,g=t.baxis,y=t.x,v=t.y,x=[];y&&i(y)&&x.push("x"),v&&i(v)&&x.push("y"),x.length&&h(t,m,g,"a","b",x);var b=t._a=t._a||t.a,_=t._b=t._b||t.b;y=t._x||t.x,v=t._y||t.y;var w={};t._cheater&&(y=n("index"===m.cheatertype?b.length:b,"index"===g.cheatertype?_.length:_,t.cheaterslope)),t._x=y=c(y),t._y=v=c(v),u(y,b,_),u(v,b,_),d(t),t.setScale();var T=a(y),M=a(v),k=.5*(T[1]-T[0]),A=.5*(T[1]+T[0]),S=.5*(M[1]-M[0]),E=.5*(M[1]+M[0]);return T=[A-1.3*k,A+1.3*k],M=[E-1.3*S,E+1.3*S],t._extremes[f._id]=r.findExtremes(f,T,{padded:!0}),t._extremes[p._id]=r.findExtremes(p,M,{padded:!0}),o(t,"a","b"),o(t,"b","a"),s(t,m),s(t,g),w.clipsegments=l(t._xctrl,t._yctrl,m,g),w.x=y,w.y=v,w.a=b,w.b=_,[w]}}}),xD=p({"src/traces/carpet/index.js"(e,t){t.exports={attributes:xh(),supplyDefaults:xm(),plot:xx(),calc:xz(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:np(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),xO=p({"lib/carpet.js"(e,t){t.exports=xD()}}),xR=p({"src/traces/scattercarpet/attributes.js"(e,t){var r=iv(),i=ix(),n=Z(),{hovertemplateAttrs:a,texttemplateAttrs:o,templatefallbackAttrs:s}=eW(),l=tV(),c=q().extendFlat,u=i.marker,h=i.line,d=u.line;t.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:c({},i.mode,{dflt:"markers"}),text:c({},i.text,{}),texttemplate:o({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:s({editType:"plot"}),hovertext:c({},i.hovertext,{}),line:{color:h.color,width:h.width,dash:h.dash,backoff:h.backoff,shape:c({},h.shape,{values:["linear","spline"]}),smoothing:h.smoothing,editType:"calc"},connectgaps:i.connectgaps,fill:c({},i.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:r(),marker:c({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,angle:u.angle,angleref:u.angleref,standoff:u.standoff,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:d.width,dash:d.dash,editType:"calc"},l("marker.line")),gradient:u.gradient,editType:"calc"},l("marker")),textfont:i.textfont,textposition:i.textposition,selected:i.selected,unselected:i.unselected,hoverinfo:c({},n.hoverinfo,{flags:["a","b","text","name"]}),hoveron:i.hoveron,hovertemplate:a(),hovertemplatefallback:s(),zorder:i.zorder}}}),xF=p({"src/traces/scattercarpet/defaults.js"(e,t){var r=tv(),i=iy(),n=t5(),a=iq(),o=iH(),s=iG(),l=iW(),c=iY(),u=xR();t.exports=function(e,t,h,d){function f(i,n){return r.coerce(e,t,u,i,n)}f("carpet"),t.xaxis="x",t.yaxis="y";var p=f("a"),m=f("b"),g=Math.min(p.length,m.length);if(!g){t.visible=!1;return}t._length=g,f("text"),f("texttemplate"),f("texttemplatefallback"),f("hovertext"),f("mode",g")}return o}function y(e,t){var r;r=e.labelprefix&&e.labelprefix.length>0?e.labelprefix.replace(/ = $/,""):e._hovertitle,m.push(r+": "+t.toFixed(3)+e.labelsuffix)}}}}),xq=p({"src/traces/scattercarpet/event_data.js"(e,t){t.exports=function(e,t,r,i,n){var a=i[n];return e.a=a.a,e.b=a.b,e.y=a.y,e}}}),xH=p({"src/traces/scattercarpet/index.js"(e,t){t.exports={attributes:xR(),supplyDefaults:xF(),colorbar:ne(),formatLabels:xj(),calc:xN(),plot:xU(),style:nr().style,styleOnSelect:nr().styleOnSelect,hoverPoints:xV(),selectPoints:na(),eventData:xq(),moduleType:"trace",name:"scattercarpet",basePlotModule:np(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),xG=p({"lib/scattercarpet.js"(e,t){t.exports=xH()}}),xW=p({"src/traces/contourcarpet/attributes.js"(e,t){var r=aX(),i=oS(),n=tV(),a=q().extendFlat,o=i.contours;t.exports=a({carpet:{valType:"string",editType:"calc"},z:r.z,a:r.x,a0:r.x0,da:r.dx,b:r.y,b0:r.y0,db:r.dy,text:r.text,hovertext:r.hovertext,transpose:r.transpose,atype:r.xtype,btype:r.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:o.type,start:o.start,end:o.end,size:o.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:o.showlines,showlabels:o.showlabels,labelfont:o.labelfont,labelformat:o.labelformat,operation:o.operation,value:o.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:"plot"},zorder:i.zorder},n("",{cLetter:"z",autoColorDflt:!1}))}}),xY=p({"src/traces/contourcarpet/defaults.js"(e,t){var r=tv(),i=aK(),n=xW(),a=oX(),o=oC(),s=oP();t.exports=function(e,t,l,c){function u(i,a){return r.coerce(e,t,n,i,a)}if(u("carpet"),e.a&&e.b){if(!i(e,t,u,c,"a","b")){t.visible=!1;return}u("text"),"constraint"===u("contours.type")?a(e,t,u,c,l,{hasHover:!1}):(o(e,t,u,function(i){return r.coerce2(e,t,n,i)}),s(e,t,u,c,{hasHover:!1}))}else t._defaultColor=l,t._length=null;u("zorder")}}}),xZ=p({"src/traces/contourcarpet/calc.js"(e,t){var r=t2(),i=tv(),n=a8(),a=a7(),o=a9(),s=oe(),l=ot(),c=xY(),u=xB(),h=oz();t.exports=function(e,t){var d=t._carpetTrace=u(e,t);if(!(!d||!d.visible||"legendonly"===d.visible)){if(!t.a||!t.b){var f,p,m,g,y,v,x,b,_,w,T,M,k,A,S,E,C,L=e.data[d.index],P=e.data[t.index];P.a||(P.a=L.a),P.b||(P.b=L.b),c(P,t,t._defaultColor,e._fullLayout)}var I=(f=e,T=(w=(p=t)._carpetTrace).aaxis,M=w.baxis,T._minDtick=0,M._minDtick=0,i.isArray1D(p.z)&&n(p,T,M,"a","b",["z"]),m=p._a=p._a||p.a,v=p._b=p._b||p.b,m=m?T.makeCalcdata(p,"_a"):[],v=v?M.makeCalcdata(p,"_b"):[],g=p.a0||0,y=p.da||1,x=p.b0||0,b=p.db||1,_=p._z=a(p._z||p.z,p.transpose),p._emptypoints=s(_),o(_,p._emptypoints),k=i.maxRowLength(_),A="scaled"===p.xtype?"":m,S=l(p,A,g,y,k,T),E="scaled"===p.ytype?"":v,C=l(p,E,x,b,_.length,M),"levels"===p.contours.type&&"none"!==p.contours.coloring&&r(f,p,{vals:_,containerStr:"",cLetter:"z"}),[{a:S,b:C,z:_}]);return h(t,t._z),I}}}}),x$=p({"src/traces/carpet/axis_aligned_line.js"(e,t){var r=tv().isArrayOrTypedArray;t.exports=function(e,t,i,n){var a,o,s,l,c,u,h,d,f,p,m,g,y,v=r(i)?"a":"b",x=("a"===v?e.aaxis:e.baxis).smoothing,b="a"===v?e.a2i:e.b2j,_="a"===v?i:n,w="a"===v?n:i,T="a"===v?t.a.length:t.b.length,M="a"===v?t.b.length:t.a.length,k=Math.floor("a"===v?e.b2j(w):e.a2i(w)),A="a"===v?function(t){return e.evalxy([],t,k)}:function(t){return e.evalxy([],k,t)};x&&(s=Math.max(0,Math.min(M-2,k)),l=k-s,o="a"===v?function(t,r){return e.dxydi([],t,s,r,l)}:function(t,r){return e.dxydj([],s,t,l,r)});var S=b(_[0]),E=b(_[1]),C=S0?Math.floor:Math.ceil,I=C>0?Math.ceil:Math.floor,z=C>0?Math.min:Math.max,D=C>0?Math.max:Math.min,O=P(S+L),R=I(E-L),F=[[h=A(S)]];for(a=O;a*C=0;J--)X=i([],($=A.clipsegments[J]).x,_.c2p),K=i([],$.y,w.c2p),X.reverse(),K.reverse(),Q.push(n(X,K,$.bicubic));var ee="M"+Q.join("L")+"Z";(function(e,t,r,a,s,l){var c,u,h=o.ensureSingle(e,"g","contourbg").selectAll("path").data("fill"!==l||s?[]:[0]);h.enter().append("path"),h.exit().remove();var d=[];for(u=0;u=0&&(h=E,f=p):Math.abs(u[1]-h[1])<_?Math.abs(u[1]-E[1])<_&&(E[0]-u[0])*(h[0]-E[0])>=0&&(h=E,f=p):o.log("endpt to newendpt is not vert. or horz.",u,h,E)}if(f>=0)break;y+=A(u,h),u=h}if(f===e.edgepaths.length){o.log("unclosed perimeter path");break}c=f,(x=-1===v.indexOf(c))&&(c=v[0],y+=A(u,h)+"Z",u=null)}for(c=0;cm&&(i.max=m),i.len=i.max-i.min}function x(e,t){var r=0;return(.1>Math.abs(e[0]-l)||.1>Math.abs(e[0]-c))&&(r=Math.max(r,a*v(t,y(n.dxydb_rough(e[0],e[1],.1)))/2)),(.1>Math.abs(e[1]-u)||.1>Math.abs(e[1]-h))&&(r=Math.max(r,a*v(t,y(n.dxyda_rough(e[0],e[1],.1)))/2)),r}}(this,r,e,i,h,t.height),!(i.len<(t.width+t.height)*u.LABELMIN)))for(var n=Math.min(Math.ceil(i.len/z),u.LABELMAX),a=0;ay):g=k>w,y=k;var A=c(w,T,M,k);A.pos=_,A.yc=(w+k)/2,A.i=b,A.dir=g?"increasing":"decreasing",A.x=A.pos,A.y=[M,T],v&&(A.orig_p=a[b]),p&&(A.tx=t.text[b]),m&&(A.htx=t.hovertext[b]),x.push(A)}else x.push({pos:_,empty:!0})}return t._extremes[l._id]=n.findExtremes(l,r.concat(d,h),{padded:!0}),x.length&&(x[0].t={labels:{open:i(e,"open:")+" ",high:i(e,"high:")+" ",low:i(e,"low:")+" ",close:i(e,"close:")+" "}}),x}t.exports={calc:function(e,t){var i=n.getFromId(e,t.xaxis),o=n.getFromId(e,t.yaxis),c=function(e,t,i){var n=i._minDiff;if(!n){var o,s=e._fullData,l=[];for(o=0,n=1/0;o"+u.labels[v]+r.hoverLabelText(s,x,l.yhoverformat)):((y=i.extendFlat({},d)).y0=y.y1=b,y.yLabelVal=x,y.yLabel=u.labels[v]+r.hoverLabelText(s,x,l.yhoverformat),y.name="",h.push(y),m[x]=y)}return h}function h(e,t,i,n){var a=e.cd,s=e.ya,u=a[0].trace,h=a[0].t,d=c(e,t,i,n);if(!d)return[];var f=a[d.index],p=d.index=f.i,m=f.dir;function g(e){return h.labels[e]+r.hoverLabelText(s,u[e][p],u.yhoverformat)}var y=f.hi||u.hoverinfo||"",v=y.split("+"),x="all"===y,b=x||-1!==v.indexOf("y"),_=x||-1!==v.indexOf("text"),w=b?[g("open"),g("high"),g("low"),g("close")+" "+l[m]]:[];return _&&o(f,u,w),d.extraText=w.join("
"),d.y0=d.y1=s.c2p(f.yc,!0),[d]}t.exports={hoverPoints:function(e,t,r,i){return e.cd[0].trace.hoverlabel.split?u(e,t,r,i):h(e,t,r,i)},hoverSplit:u,hoverOnPoints:h}}}),x6=p({"src/traces/ohlc/select.js"(e,t){t.exports=function(e,t){var r,i=e.cd,n=e.xaxis,a=e.yaxis,o=[],s=i[0].t.bPos||0;if(!1===t)for(r=0;rt?function(e){return e<=0}:function(e){return e>=0};s.c2g=function(t){var r=s.c2l(t)-e;return(a(r)?r:0)+n},s.g2c=function(t){return s.l2c(t+e-n)},s.g2p=function(e){return e*i},s.c2p=function(e){return s.g2p(s.c2g(e))}};break;case"angularaxis":var c=e,u=t,h=c.type;if("linear"===h){var d=c.d2c,f=c.c2d;c.d2c=function(e,t){var r;return r=d(e),"degrees"===t?n(r):r},c.c2d=function(e,t){return f("degrees"===t?a(e):e)}}c.makeCalcdata=function(e,t){var r,i,n=e[t],a=e._length,o=function(t){return c.d2c(t,e.thetaunit)};if(n)for(r=Array(a),i=0;i1e-10?e:0}function h(e,t,r){t=t||0,r=r||0;for(var i=e.length,n=Array(i),a=0;a0?r:1/0}),a=r.mod(i+1,t.length);return[t[i],t[a]]},findIntersectionXY:l,findXYatLength:function(e,t,r,i){var n=-t*r,a=t*t+1,o=2*(t*n-r),s=Math.sqrt(o*o-4*a*(n*n+r*r-e*e)),l=(-o+s)/(2*a),c=(-o-s)/(2*a);return[[l,t*l+n+i],[c,t*c+n+i]]},clampTiny:u,pathPolygon:function(e,t,r,i,n,a){return"M"+h(c(e,t,r,i),n,a).join("L")},pathPolygonAnnulus:function(e,t,r,i,n,a,o){e0))!=(a<0?-1:+(a>0))){var f=i(e,r([t,0]));return["M"+l+","+c,"A"+o+","+o+" 0 0,"+(0=90||v>90&&x>=450?1:_<=0&&T<=0?0:Math.max(_,T),[v<=180&&x>=180||v>180&&x>=540?-1:b>=0&&w>=0?0:Math.min(b,w),v<=270&&x>=270||v>270&&x>=630?-1:_>=0&&T>=0?0:Math.min(_,T),x>=360?1:b<=0&&w<=0?0:Math.max(b,w),m]),L=C[2]-C[0],P=Math.abs((C[3]-C[1])/L);d/h>P?(M=h,E=(d-(k=h*P))/i.h/2,A=[c[0],c[1]],S=[u[0]+E,u[1]-E]):(M=d/P,k=d,E=(h-M)/i.w/2,A=[c[0]+E,c[1]-E],S=[u[0],u[1]]),this.xLength2=M,this.yLength2=k,this.xDomain2=A,this.yDomain2=S;var I,z=this.xOffset2=i.l+i.w*A[0],R=this.yOffset2=i.t+i.h*(1-S[1]),F=this.radius=M/L,j=this.innerRadius=this.getHole(t)*F,B=this.cx=z-F*C[0],N=this.cy=R+F*C[3],U=this.cxx=B-z,V=this.cyy=N-R,q=n.side;"counterclockwise"===q?(I=q,q="top"):"clockwise"===q&&(I=q,q="bottom"),this.radialAxis=this.mockAxis(e,t,n,{_id:"x",side:q,_trueSide:I,domain:[j/i.w,F/i.w]}),this.angularAxis=this.mockAxis(e,t,a,{side:"right",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(e,t),this.updateAngularAxis(e,t),this.updateRadialAxis(e,t),this.updateRadialAxisTitle(e,t),this.xaxis=this.mockCartesianAxis(e,t,{_id:"x",domain:A}),this.yaxis=this.mockCartesianAxis(e,t,{_id:"y",domain:S});var H=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",H).attr("transform",o(U,V)),r.frontplot.attr("transform",o(z,R)).call(l.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr("d",H).attr("transform",o(B,N)).call(s.fill,t.bgcolor)},j.mockAxis=function(e,t,r,i){var a=n.extendFlat({},r,i);return d(a,t,e),a},j.mockCartesianAxis=function(e,t,r){var i=this,a=i.isSmith,o=r._id,s=n.extendFlat({type:"linear"},r);h(s,e);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var e=i.sectorBBox,r=l[o],n=i.radialAxis._rl,a=(n[1]-n[0])/(1-i.getHole(t));s.range=[e[r[0]]*a,e[r[1]]*a]},s.isPtWithinRange="x"!==o||a?function(){return!0}:function(e){return i.isPtInside(e)},s.setRange(),s.setScale(),s},j.doAutoRange=function(e,t){var r=this.gd,i=this.radialAxis,n=this.getRadial(t);f(r,i);var a=i.range;if(n.range=a.slice(),n._input.range=a.slice(),i._rl=[i.r2l(a[0],null,"gregorian"),i.r2l(a[1],null,"gregorian")],void 0!==i.minallowed){var o=i.r2l(i.minallowed);i._rl[0]>i._rl[1]?i._rl[1]=Math.max(i._rl[1],o):i._rl[0]=Math.max(i._rl[0],o)}if(void 0!==i.maxallowed){var s=i.r2l(i.maxallowed);i._rl[0]90&&m<=270&&(g.tickangle=180);var x=v?function(e){var t=I(r,C([e.x,0]));return o(t[0]-d,t[1]-f)}:function(e){return o(g.l2p(e.x)+h,0)},b=v?function(e){return P(r,e.x,-1/0,1/0)}:function(e){return r.pathArc(g.r2p(e.x)+h)},_=B(p);if(r.radialTickLayout!==_&&(l["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=_),y){g.setScale();var w=0,T=v?(g.tickvals||[]).filter(function(e){return e>=0}).map(function(e){return u.tickText(g,e,!0,!1)}):u.calcTicks(g),M=v?T:u.clipEnds(g,T),k=u.getTickSigns(g)[2];v&&(("top"===g.ticks&&"bottom"===g.side||"bottom"===g.ticks&&"top"===g.side)&&(k=-k),"top"===g.ticks&&"top"===g.side&&(w=-g.ticklen),"bottom"===g.ticks&&"bottom"===g.side&&(w=g.ticklen)),u.drawTicks(i,g,{vals:T,layer:l["radial-axis"],path:u.makeTickPath(g,0,k),transFn:x,crisp:!1}),u.drawGrid(i,g,{vals:M,layer:l["radial-grid"],path:b,transFn:n.noop,crisp:!1}),u.drawLabels(i,g,{vals:T,layer:l["radial-axis"],transFn:x,labelFns:u.makeLabelFns(g,w)})}var A=r.radialAxisAngle=r.vangles?R(N(O(p.angle),r.vangles)):p.angle,S=o(d,f),E=S+a(-A);U(l["radial-axis"],y&&(p.showticklabels||p.ticks),{transform:E}),U(l["radial-grid"],y&&p.showgrid,{transform:v?"":S}),U(l["radial-line"].select("line"),y&&p.showline,{x1:v?-c:h,y1:0,x2:c,y2:0,transform:E}).attr("stroke-width",p.linewidth).call(s.stroke,p.linecolor)},j.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var i=this.gd,n=this.radius,a=this.cx,o=this.cy,s=this.getRadial(t),c=this.id+"title",u=0;if(s.title){var h=l.bBox(this.layers["radial-axis"].node()).height,d=s.title.font.size,f=s.side;u="top"===f?d:"counterclockwise"===f?-(h+.4*d):h+.8*d}var p=void 0!==r?r:this.radialAxisAngle,m=O(p),g=Math.cos(m),v=Math.sin(m),x=a+n/2*g+u*v,b=o-n/2*v+u*g;this.layers["radial-axis-title"]=y.draw(i,c,{propContainer:s,propName:this.id+".radialaxis.title.text",placeholder:z(i,"Click to enter radial axis title"),attributes:{x:x,y:b,"text-anchor":"middle"},transform:{rotate:-p}})}},j.updateAngularAxis=function(e,t){var r,i=this,l=i.gd,c=i.layers,h=i.radius,d=i.innerRadius,f=i.cx,p=i.cy,m=i.getAngular(t),g=i.angularAxis,y=i.isSmith;y||(i.fillViewInitialKey("angularaxis.rotation",m.rotation),g.setGeometry(),g.setScale());var v=y?function(e){var t=I(i,C([0,e.x]));return Math.atan2(t[0]-f,t[1]-p)-Math.PI/2}:function(e){return g.t2g(e.x)};"linear"===g.type&&"radians"===g.thetaunit&&(g.tick0=R(g.tick0),g.dtick=R(g.dtick));var x=function(e){return o(f+h*Math.cos(e),p-h*Math.sin(e))},b=y?function(e){var t=I(i,C([0,e.x]));return o(t[0],t[1])}:function(e){return x(v(e))},_=y?function(e){var t=I(i,C([0,e.x])),r=Math.atan2(t[0]-f,t[1]-p)-Math.PI/2;return o(t[0],t[1])+a(-R(r))}:function(e){var t=v(e);return x(t)+a(-R(t))},w=y?function(e){return L(i,e.x,0,1/0)}:function(e){var t=v(e),r=Math.cos(t),i=Math.sin(t);return"M"+[f+d*r,p-d*i]+"L"+[f+h*r,p-h*i]},T=u.makeLabelFns(g,0).labelStandoff,M={};M.xFn=function(e){return Math.cos(v(e))*T},M.yFn=function(e){var t=v(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(T+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*k)},M.anchorFn=function(e){var t=Math.cos(v(e));return .1>Math.abs(t)?"middle":t>0?"start":"end"},M.heightFn=function(e,t,r){return -.5*(1+Math.sin(v(e)))*r};var A=B(m);i.angularTickLayout!==A&&(c["angular-axis"].selectAll("."+g._id+"tick").remove(),i.angularTickLayout=A);var S=y?[1/0].concat(g.tickvals||[]).map(function(e){return u.tickText(g,e,!0,!1)}):u.calcTicks(g);if(y&&(S[0].text="∞",S[0].fontSize*=1.75),"linear"===t.gridshape?(r=S.map(v),0>n.angleDelta(r[0],r[1])&&(r=r.slice().reverse())):r=null,i.vangles=r,"category"===g.type&&(S=S.filter(function(e){return n.isAngleInsideSector(v(e),i.sectorInRad)})),g.visible){var E="inside"===g.ticks?-1:1,P=(g.linewidth||1)/2;u.drawTicks(l,g,{vals:S,layer:c["angular-axis"],path:"M"+E*P+",0h"+E*g.ticklen,transFn:_,crisp:!1}),u.drawGrid(l,g,{vals:S,layer:c["angular-grid"],path:w,transFn:n.noop,crisp:!1}),u.drawLabels(l,g,{vals:S,layer:c["angular-axis"],repositionOnUpdate:!0,transFn:b,labelFns:M})}U(c["angular-line"].select("path"),m.showline,{d:i.pathSubplot(),transform:o(f,p)}).attr("stroke-width",m.linewidth).call(s.stroke,m.linecolor)},j.updateFx=function(e,t){this.gd._context.staticPlot||(this.isSmith||(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e))},j.updateHoverAndMainDrag=function(e){var t,a,l=this,c=l.isSmith,u=l.gd,h=l.layers,d=e._zoomlayer,f=A.MINZOOM,y=A.OFFEDGE,_=l.radius,w=l.innerRadius,T=l.cx,M=l.cy,k=l.cxx,E=l.cyy,C=l.sectorInRad,L=l.vangles,P=l.radialAxis,I=S.clampTiny,z=S.findXYatLength,D=S.findEnclosingVertexAngles,O=A.cornerHalfWidth,R=A.cornerLen/2,F=p.makeDragger(h,"path","maindrag",!1===e.dragmode?"none":"crosshair");r.select(F).attr("d",l.pathSubplot()).attr("transform",o(T,M)),F.onmousemove=function(e){g.hover(u,e,l.id),u._fullLayout._lasthover=F,u._fullLayout._hoversubplot=l.id},F.onmouseout=function(e){u._dragging||m.unhover(u,e)};var j,B,N,U,V,q,H,G,W,Y={element:F,gd:u,subplot:l.id,plotinfo:{id:l.id,xaxis:l.xaxis,yaxis:l.yaxis},xaxes:[l.xaxis],yaxes:[l.yaxis]};function Z(e,t){return Math.sqrt(e*e+t*t)}function $(e,t){return Math.atan2(E-t,e-k)}function X(e,t){return[e*Math.cos(t),e*Math.sin(-t)]}function K(e,t){if(0===e)return l.pathSector(2*O);var r=R/e,i=t-r,n=t+r,a=Math.max(0,Math.min(e,_)),o=a-O,s=a+O;return"M"+X(o,i)+"A"+[o,o]+" 0,0,0 "+X(o,n)+"L"+X(s,n)+"A"+[s,s]+" 0,0,1 "+X(s,i)+"Z"}function J(e,t,r){if(0===e)return l.pathSector(2*O);var i,n,a,o,s=X(e,t),c=X(e,r),u=I((s[0]+c[0])/2),h=I((s[1]+c[1])/2);if(u&&h){var d=h/u,f=-1/d,p=z(O,d,u,h);a=z(R,f,p[0][0],p[0][1]),o=z(R,f,p[1][0],p[1][1])}else h?(i=R,n=O):(i=O,n=R),a=[[u-i,h-n],[u+i,h-n]],o=[[u-i,h+n],[u+i,h+n]];return"M"+a.join("L")+"L"+o.reverse().join("L")+"Z"}function Q(e,t){return t=Math.max(Math.min(t,_),w),ef?(e-1&&1===e&&x(t,u,[l.xaxis],[l.yaxis],l.id,Y),r.indexOf("event")>-1&&g.click(u,t,l.id)}Y.prepFn=function(e,r,i){var o,h=u._fullLayout.dragmode,f=F.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var m=u._fullLayout._invTransform;t=u._fullLayout._invScaleX,a=u._fullLayout._invScaleY;var g=n.apply3DTransform(m)(r-f.left,i-f.top);if(j=g[0],B=g[1],L){var y=S.findPolygonOffset(_,C[0],C[1],L);j+=k+y[0],B+=E+y[1]}switch(h){case"zoom":Y.clickFn=eo,c||(L?Y.moveFn=ei:Y.moveFn=et,Y.doneFn=en,N=null,U=null,V=l.pathSubplot(),q=!1,o=u._fullLayout[l.id],H=s.luminosity(o.bgcolor),(G=p.makeZoombox(d,H,T,M,V)).attr("fill-rule","evenodd"),W=p.makeCorners(d,T,M),b(u));break;case"select":case"lasso":v(e,r,i,Y,h)}},m.init(Y)},j.updateRadialDrag=function(e,t,s){var l,c,u,h=this,d=h.gd,f=h.layers,g=h.radius,y=h.innerRadius,v=h.cx,x=h.cy,_=h.radialAxis,T=A.radialDragBoxSize,k=T/2;if(_.visible){var S,E,C,L=O(h.radialAxisAngle),P=_._rl,I=P[0],z=P[1],D=P[s],F=.75*(P[1]-P[0])/(1-h.getHole(t))/g;s?(S=v+(g+k)*Math.cos(L),E=x-(g+k)*Math.sin(L),C="radialdrag"):(S=v+(y-k)*Math.cos(L),E=x-(y-k)*Math.sin(L),C="radialdrag-inner");var j=p.makeRectDragger(f,C,"crosshair",-k,-k,T,T),B={element:j,gd:d};!1===e.dragmode&&(B.dragmode=!1),U(r.select(j),_.visible&&y0!=(s?u>I:u")}}t.exports={hoverPoints:function(e,t,n,a){var o=r(e,t,n,a);if(!(!o||!1===o[0].index)){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}}}),bv=p({"src/traces/scatterpolar/index.js"(e,t){t.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:bh(),categories:["polar","symbols","showLegend","scatter-like"],attributes:bd(),supplyDefaults:bf().supplyDefaults,colorbar:ne(),formatLabels:bp(),calc:bm(),plot:bg(),style:nr().style,styleOnSelect:nr().styleOnSelect,hoverPoints:by().hoverPoints,selectPoints:na(),meta:{}}}}),bx=p({"lib/scatterpolar.js"(e,t){t.exports=bv()}}),bb=p({"src/traces/scatterpolargl/attributes.js"(e,t){var i=bd(),{cliponaxis:a,hoveron:s}=i,u=((e,t)=>{var r={};for(var i in e)l.call(e,i)&&0>t.indexOf(i)&&(r[i]=e[i]);if(null!=e&&o)for(var i of o(e))0>t.indexOf(i)&&c.call(e,i)&&(r[i]=e[i]);return r})(i,["cliponaxis","hoveron"]),{connectgaps:h,line:{color:f,dash:p,width:m},fill:g,fillcolor:y,marker:v,textfont:x,textposition:b}=p0();t.exports=r(d({},u),n({connectgaps:h,fill:g,fillcolor:y,line:{color:f,dash:p,editType:"calc",width:m},marker:v,textfont:x,textposition:b}))}}),b_=p({"src/traces/scatterpolargl/defaults.js"(e,t){var r=tv(),i=t5(),n=bf().handleRThetaDefaults,a=iq(),o=iH(),s=iW(),l=iY(),c=iy().PTS_LINESONLY,u=bb();t.exports=function(e,t,h,d){function f(i,n){return r.coerce(e,t,u,i,n)}var p=n(e,t,d,f);if(!p){t.visible=!1;return}f("thetaunit"),f("mode",p=l&&(v.marker.cluster=p.tree),v.marker&&(v.markerSel.positions=v.markerUnsel.positions=v.marker.positions=_),v.line&&_.length>1&&s.extendFlat(v.line,o.linePositions(e,f,_)),v.text&&(s.extendFlat(v.text,{positions:_},o.textPosition(e,f,v.text,v.marker)),s.extendFlat(v.textSel,{positions:_},o.textPosition(e,f,v.text,v.markerSel)),s.extendFlat(v.textUnsel,{positions:_},o.textPosition(e,f,v.text,v.markerUnsel))),v.fill&&!d.fill2d&&(d.fill2d=!0),v.marker&&!d.scatter2d&&(d.scatter2d=!0),v.line&&!d.line2d&&(d.line2d=!0),v.text&&!d.glText&&(d.glText=!0),d.lineOptions.push(v.line),d.fillOptions.push(v.fill),d.markerOptions.push(v.marker),d.markerSelectedOptions.push(v.markerSel),d.markerUnselectedOptions.push(v.markerUnsel),d.textOptions.push(v.text),d.textSelectedOptions.push(v.textSel),d.textUnselectedOptions.push(v.textUnsel),d.selectBatch.push([]),d.unselectBatch.push([]),p.x=w,p.y=T,p.rawx=w,p.rawy=T,p.r=g,p.theta=y,p.positions=_,p._scene=d,p.index=d.count,d.count++}}),n(e,t,c)}},t.exports.reglPrecompiled={}}}),bS=p({"src/traces/scatterpolargl/index.js"(e,t){var r=bk();r.plot=bA(),t.exports=r}}),bE=p({"lib/scatterpolargl.js"(e,t){t.exports=bS()}}),bC=p({"src/traces/barpolar/attributes.js"(e,t){var r,{hovertemplateAttrs:i,templatefallbackAttrs:n}=eW(),a=q().extendFlat,o=bd(),s=a_();t.exports={r:o.r,theta:o.theta,r0:o.r0,dr:o.dr,theta0:o.theta0,dtheta:o.dtheta,thetaunit:o.thetaunit,base:a({},s.base,{}),offset:a({},s.offset,{}),width:a({},s.width,{}),text:a({},s.text,{}),hovertext:a({},s.hovertext,{}),marker:(r=a({},s.marker),delete r.cornerradius,r),hoverinfo:o.hoverinfo,hovertemplate:i(),hovertemplatefallback:n(),selected:s.selected,unselected:s.unselected}}}),bL=p({"src/traces/barpolar/layout_attributes.js"(e,t){t.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),bP=p({"src/traces/barpolar/defaults.js"(e,t){var r=tv(),i=bf().handleRThetaDefaults,n=aT(),a=bC();t.exports=function(e,t,o,s){function l(i,n){return r.coerce(e,t,a,i,n)}if(!i(e,t,s,l)){t.visible=!1;return}l("thetaunit"),l("base"),l("offset"),l("width"),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),n(e,t,l,o,s),r.coerceSelectionMarkerOpacity(t,l)}}}),bI=p({"src/traces/barpolar/layout_defaults.js"(e,t){var r=tv(),i=bL();t.exports=function(e,t,n){var a,o={};function s(n,o){return r.coerce(e[a]||{},t[a],i,n,o)}for(var l=0;l0?(a=r,s=i):(a=i,s=r);var a,s,h=o.findEnclosingVertexAngles(a,l.vangles)[0],d=o.findEnclosingVertexAngles(s,l.vangles)[1],f=[h,(a+s)/2,d];return o.pathPolygonAnnulus(e,t,a,s,f,c,u)}:function(e,t,r,i){return n.pathAnnulus(e,t,r,i,c,u)}),y=t.layers.frontplot.select("g.barlayer");n.makeTraceGroups(y,s,"trace bars").each(function(){var o=r.select(this),s=n.ensureSingle(o,"g","points").selectAll("g.point").data(n.identity);s.enter().append("g").style("vector-effect",h?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each(function(e){var t,a=r.select(this),o=e.rp0=p.c2p(e.s0),s=e.rp1=p.c2p(e.s1),l=e.thetag0=m.c2g(e.p0),c=e.thetag1=m.c2g(e.p1);if(i(o)&&i(s)&&i(l)&&i(c)&&o!==s&&l!==c){var u=p.c2g(e.s1),h=(l+c)/2;e.ct=[d.c2p(u*Math.cos(h)),f.c2p(u*Math.sin(h))],t=g(o,s,l,c)}else t="M0,0Z";n.ensureSingle(a,"path").attr("d",t)}),a.setClipUrl(o,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,e)})}}}),bO=p({"src/traces/barpolar/hover.js"(e,t){var r=rD(),i=tv(),n=aI().getTraceColor,a=i.fillText,o=by().makeHoverPointText,s=bo().isPtInsidePolygon;t.exports=function(e,t,l){var c=e.cd,u=c[0].trace,h=e.subplot,d=h.radialAxis,f=h.angularAxis,p=h.vangles,m=p?s:i.isPtInsideSector,g=e.maxHoverDistance,y=f._period||2*Math.PI,v=Math.abs(d.g2p(Math.sqrt(t*t+l*l))),x=Math.atan2(l,t);if(d.range[0]>d.range[1]&&(x+=Math.PI),r.getClosest(c,function(e){return m(v,x,[e.rp0,e.rp1],[e.thetag0,e.thetag1],p)?g+Math.min(1,Math.abs(e.thetag1-e.thetag0)/y)-1+(e.rp1-v)/(e.rp1-e.rp0)-1:1/0},e),!1!==e.index){var b=c[e.index];e.x0=e.x1=b.ct[0],e.y0=e.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return a(b,u,e),o(_,u,h,e),e.hovertemplate=u.hovertemplate,e.color=n(u,b),e.xLabelVal=e.yLabelVal=void 0,b.s<0&&(e.idealAlign="left"),[e]}}}}),bR=p({"src/traces/barpolar/index.js"(e,t){t.exports={moduleType:"trace",name:"barpolar",basePlotModule:bh(),categories:["polar","bar","showLegend"],attributes:bC(),layoutAttributes:bL(),supplyDefaults:bP(),supplyLayoutDefaults:bI(),calc:bz().calc,crossTraceCalc:bz().crossTraceCalc,plot:bD(),colorbar:ne(),formatLabels:bp(),style:aL().style,styleOnSelect:aL().styleOnSelect,hoverPoints:bO(),selectPoints:aD(),meta:{}}}}),bF=p({"lib/barpolar.js"(e,t){t.exports=bR()}}),bj=p({"src/plots/smith/constants.js"(e,t){t.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),bB=p({"src/plots/smith/layout_attributes.js"(e,t){var r=Q(),i=tN(),n=at().attributes,a=tv().extendFlat,o=eq().overrideAll,s=o({color:i.color,showline:a({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:a({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash},"plot","from-root"),l=o({ticklen:i.ticklen,tickwidth:a({},i.tickwidth,{dflt:2}),tickcolor:i.tickcolor,showticklabels:i.showticklabels,labelalias:i.labelalias,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,tickfont:i.tickfont,tickformat:i.tickformat,hoverformat:i.hoverformat,layer:i.layer},"plot","from-root"),c=a({visible:a({},i.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:a({},i.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},s,l),u=a({visible:a({},i.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:i.ticks,editType:"calc"},s,l);t.exports={domain:n({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:r.background},realaxis:c,imaginaryaxis:u,editType:"calc"}}}),bN=p({"src/plots/smith/layout_defaults.js"(e,t){var r,i,n,a=tv(),o=ee(),s=tS(),l=o9(),c=tI().getSubplotData,u=tK(),h=tX(),d=nc(),f=rt(),p=bB(),m=bj(),g=m.axisNames,y=(r=function(e){return a.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(e){return-e}).concat([0]).concat(e)},i=String,n={},function(e){var t=i?i(e):e;if(t in n)return n[t];var a=r(e);return n[t]=a,a});function v(e,t,r,i){var n=r("bgcolor");i.bgColor=o.combine(n,i.paper_bgcolor);var l,v=c(i.fullData,m.name,i.id),x=i.layoutOut;function b(e,t){return r(l+"."+e,t)}for(var _=0;_")}}t.exports={hoverPoints:function(e,t,n,a){var o=r(e,t,n,a);if(!(!o||!1===o[0].index)){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}}}),bZ=p({"src/traces/scattersmith/index.js"(e,t){t.exports={moduleType:"trace",name:"scattersmith",basePlotModule:bU(),categories:["smith","symbols","showLegend","scatter-like"],attributes:bV(),supplyDefaults:bq(),colorbar:ne(),formatLabels:bH(),calc:bG(),plot:bW(),style:nr().style,styleOnSelect:nr().styleOnSelect,hoverPoints:bY().hoverPoints,selectPoints:na(),meta:{}}}}),b$=p({"lib/scattersmith.js"(e,t){t.exports=bZ()}}),bX=p({"src/traces/quiver/attributes.js"(e,t){var r=Z(),i=eW().hovertemplateAttrs,n=tB().axisHoverFormat,a=q().extendFlat,o=tV(),s=eH().dash,l=ig(),c=ix();t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:c.x0,dx:c.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:c.y0,dy:c.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:n("x"),yhoverformat:n("y"),uhoverformat:n("u","noDate"),vhoverformat:n("v","noDate"),hoverinfo:a({},r.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:i({},{keys:["x","y","u","v","text","name"]}),text:c.text,textposition:c.textposition,textfont:c.textfont,marker:a({arrowsize:a({},l.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:s,editType:"style"},editType:"calc"},o("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"}}}}),bK=p({"src/traces/quiver/defaults.js"(e,t){var r=tv(),i=bX(),n=iN(),a=tj().hasColorscale,o=tQ();t.exports=function(e,t,s,l){function c(n,a){return r.coerce(e,t,i,n,a)}var u=n(e,t,l,c);if(!u){t.visible=!1;return}var h=c("u"),d=c("v");if(!r.isArrayOrTypedArray(h)||0===h.length){t.u=Array(u);for(var f=0;fE&&(E=u[R]),h[R]L&&(L=h[R]),FI&&(I=F),jD&&(D=j);var V=Math.sqrt(F*F+j*j);if(V>m&&(m=V),Vy&&(y=q))}}else B.x=a,B.y=a}if(t._maxNorm=m,"scaled"===T||"paper"===M){let e=E-S,r=L-C;t._scaleFactor=(0===e&&0===r?1:(e+r+Math.sqrt((e-r)*(e-r)+4*O*e*r))/(2*(O-1)))*.97/t._maxNorm}else t._scaleFactor=1;t._scaleFactor*=t.lengthfactor;let H=Array(d),G=Array(d),W=Array(d),Y=Array(d);for(var Z,$,X,R=0;Re.i&&isFinite(o[e.i]))a=o[e.i];else{var s=t.u&&t.u[e.i]||0,l=t.v&&t.v[e.i]||0;a=Math.sqrt(s*s+l*l)}return n(a)})}function l(e,t,a){var l=t[0].trace,c=l.marker||{},u=c.line||{},h=i.isArrayOrTypedArray(c.color)?void 0:c.color,d=l._hasColorscale;if(a)if(l.selectedpoints){var f=(l.selected||{}).marker||{},p=(l.unselected||{}).marker||{},m=f.line||{},g=p.line||{};a.selectAll("path.js-line").each(function(e){var t=r.select(this),i=!e.selected,a=i?p.color:f.color,c=i?void 0!==g.width?g.width:u.width:void 0!==m.width?m.width:u.width;a?(n.lineGroupStyle(t,c,a,u.dash),t.style("stroke-opacity",1)):(n.lineGroupStyle(t,c,h,u.dash),d&&s(t,l),t.style("stroke-opacity",i?o:1))}),n.selectedTextStyle(a.selectAll("text"),l)}else{var y=a.selectAll("path.js-line");y.call(n.lineGroupStyle,u.width,h,u.dash),d&&s(y,l),y.style("stroke-opacity",1),n.textPointStyle(a.selectAll("text"),l,e)}}t.exports={style:function(e){r.select(e).selectAll("g.trace.quiver").each(function(t){l(e,t,r.select(this))})},styleOnSelect:function(e,t,r){l(e,t,r)},colorscaleStroke:s}}}),b1=p({"src/traces/quiver/plot.js"(e,t){var r=T(),i=tv(),n=t9(),a=b0().colorscaleStroke,o=Math.PI/12;function s(e,t,s,l,c,u,h){var d=l[0].trace,f=s.xaxis,p=s.yaxis;l[0][s.isRangePlot?"nodeRangePlot3":"node3"]=r.select(u);var m=r.select(u).selectAll("g.lines").data([l]);m.enter().append("g").classed("lines",!0),n.setClipUrl(m,s.layerClipId,e);var g=m.selectAll("path.js-line").data(l);g.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),g.exit().remove();let{anchor:y,maxNorm:v=0,arrowref:x}=d,b="paper"===x?d._scaleFactor*Math.sqrt(Math.abs(f._m*p._m)):d._scaleFactor,_=d.marker.arrowsize;g.each(function(e){let t=r.select(this);if(void 0===e.x||void 0===e.y)return void t.attr("d",null);let i=("paper"===x?e._u*Math.sign(f._m):r.round(f._m*e._u))*b,n=("paper"===x?e._v*Math.sign(p._m):r.round(p._m*e._v))*b,a=void 0!==(d._input.marker||{}).arrowsize;"tip"===y?(s=f.c2p(e.x)-i,c=p.c2p(e.y)-n,l=f.c2p(e.x),u=p.c2p(e.y)):"center"===y?(s=f.c2p(e.x)-i/2,c=p.c2p(e.y)-n/2,l=f.c2p(e.x)+i/2,u=p.c2p(e.y)+n/2):(s=f.c2p(e.x),c=p.c2p(e.y),l=f.c2p(e.x)+i,u=p.c2p(e.y)+n),e._px0=s,e._py0=c,e._px1=l,e._py1=u;var s,l,c,u,h=d.marker.line.width;a||(h=Math.max(h,1.5));let m=Math.min(5.8*_*h,.7*Math.sqrt((l-s)*(l-s)+(u-c)*(u-c))),g=Math.atan2(u-c,l-s),v=l-m*Math.cos(g-o),w=u-m*Math.sin(g-o),T=l-m*Math.cos(g+o),M=u-m*Math.sin(g+o),k="M"+s+","+c+"L"+l+","+u+"L"+v+","+w+"L"+l+","+u+"L"+T+","+M;t.attr("d",k)});var w=d.marker||{},T=w.line||{},M=i.isArrayOrTypedArray(w.color)?void 0:w.color;n.lineGroupStyle(g,T.width,M,T.dash),d._hasColorscale&&a(g,d);var k=r.select(u).selectAll("g.text").data([l]);k.enter().append("g").classed("text",!0),n.setClipUrl(k,s.layerClipId,e);var A=k.selectAll("g.textpoint").data(l);if(A.enter().append("g").classed("textpoint",!0).append("text"),A.exit().remove(),A.each(function(e){var t=r.select(this);n.translatePoint(e,t.select("text"),f,p)||t.remove()}),A.selectAll("text").call(n.textPointStyle,d,e).each(function(e){var t=f.c2p(e.x),i=p.c2p(e.y);r.select(this).selectAll("tspan.line").each(function(){r.select(this).attr({x:t,y:i})})}),h&&h.duration>0){var S=r.transition().duration(h.duration).ease(h.easing);g.transition(S).style("opacity",1)}}t.exports=function(e,t,i,n,a,o){var l,c,u=!a,h=!!a&&a.duration>0;((l=n.selectAll("g.trace").data(i,function(e){return e[0].trace.uid})).enter().append("g").attr("class",function(e){return"trace quiver trace"+e[0].trace.uid}).style("stroke-miterlimit",2),l.order(),h)?(o&&(c=o()),r.transition().duration(a.duration).ease(a.easing).each("end",function(){c&&c()}).each("interrupt",function(){c&&c()}).each(function(){n.selectAll("g.trace").each(function(r,n){s(e,n,t,r,i,this,a)})})):l.each(function(r,n){s(e,n,t,r,i,this,a)}),u&&l.exit().remove()}}}),b2=p({"src/traces/quiver/hover.js"(e,t){var r=tv(),i=rD(),n=ni();t.exports=function(e,t,a,o){var s=e.cd,l=s[0].trace,c=e.xa,u=e.ya,h=c.c2p(t),d=u.c2p(a);if(i.getClosest(s,function(e){return void 0===e._px0?1/0:function(e,t,r,i,n,a){let o=n-r,s=a-i,l=o*o+s*s;if(!l)return Math.sqrt((e-r)*(e-r)+(t-i)*(t-i));var c=((e-r)*o+(t-i)*s)/l;let u=r+(c=Math.max(0,Math.min(1,c)))*o,h=i+c*s;return Math.sqrt((e-u)*(e-u)+(t-h)*(t-h))}(h,d,e._px0,e._py0,e._px1,e._py1)},e),!1!==e.index){var f=s[e.index],p=c.c2p(f.x,!0),m=u.c2p(f.y,!0),g=Math.sqrt((h-p)*(h-p)+(d-m)*(d-m));e.index=f.i;var y=l.u?l.u[f.i]:0,v=l.v?l.v[f.i]:0;return r.extendFlat(e,{color:n(l,f),x0:p-3,x1:p+3,xLabelVal:f.x,y0:m-3,y1:m+3,yLabelVal:f.y,uLabelVal:y,vLabelVal:v,extraText:"u: "+y+", v: "+v,spikeDistance:g,hovertemplate:l.hovertemplate}),r.fillText(f,l,e),[e]}}}}),b3=p({"src/traces/quiver/format_labels.js"(e,t){var r=rn(),i=tv();t.exports=function(e,t,n){var a={},o={_fullLayout:n},s=r.getFromTrace(o,t,"x"),l=r.getFromTrace(o,t,"y"),c=e.x,u=e.y;a.xLabel=r.tickText(s,s.c2l(c),!0).text,a.yLabel=r.tickText(l,l.c2l(u),!0).text;var h=t.u?t.u[e.i]:0,d=t.v?t.v[e.i]:0,f=t.uhoverformat,p=t.vhoverformat;return a.uLabel=f?i.numberFormat(f)(h):String(h),a.vLabel=p?i.numberFormat(p)(d):String(d),a}}}),b5=p({"src/traces/quiver/event_data.js"(e,t){t.exports=function(e,t,r,i,n){return e.x=t.x,e.y=t.y,e.u=r.u?r.u[n]:void 0,e.v=r.v?r.v[n]:void 0,e}}}),b4=p({"src/traces/quiver/index.js"(e,t){t.exports={moduleType:"trace",name:"quiver",basePlotModule:np(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:bX(),supplyDefaults:bK(),calc:bJ(),crossTraceCalc:bQ(),plot:b1(),style:b0().style,styleOnSelect:b0().styleOnSelect,hoverPoints:b2(),formatLabels:b3(),eventData:b5(),selectPoints:na(),colorbar:ne(),animatable:!0,meta:{}}}}),b6=p({"lib/quiver.js"(e,t){t.exports=b4()}}),b8=p({"node_modules/world-calendars/dist/main.js"(e,t){var r=mR();function i(){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={}}function n(e,t,r,i){if(this._calendar=e,this._year=t,this._month=r,this._day=i,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function a(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}function o(){this.shortYearCutoff="+10"}function s(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}r(i.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,i,n){return(i=(null!=e&&e.year?e.calendar():"string"==typeof i?this.instance(i,n):i)||this.instance()).newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,t){return function(r){for(var i="",n=0;r>0;){var a=r%10;i=(0===a?"":e[a]+t[n])+i,n++,r=Math.floor(r/10)}return 0===i.indexOf(e[1]+t[1])&&(i=i.substr(1)),i||e[0]}}}),r(n.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e??this,t,r)},year:function(e){return 0==arguments.length?this._year:this.set(e,"y")},month:function(e){return 0==arguments.length?this._month:this.set(e,"m")},day:function(e){return 0==arguments.length?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,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(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(l.local.differentCalendars||l.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return 0===t?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(0>this.year()?"-":"")+a(Math.abs(this.year()),4)+"-"+a(this.month(),2)+"-"+a(this.day(),2)}}),r(o.prototype,{_validateLevel:0,newDate:function(e,t,r){return null==e?this.today():(e.year&&(this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new n(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return 0>this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear).year()?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return(0>t.year()?"-":"")+a(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var i=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var i=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,"d"===r||"w"===r){var i=e.toJD()+t*("w"===r?this.daysInWeek():1),n=e.calendar().fromJD(i);return this._validateLevel--,[n.year(),n.month(),n.day()]}try{var a=e.year()+("y"===r?t:0),o=e.monthOfYear()+("m"===r?t:0),n=e.day();"y"===r?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),n=Math.min(n,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(function(e){for(;ot-1+e.minMonth;)a++,o-=t,t=e.monthsInYear(a)}(this),n=Math.min(n,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),n];return this._validateLevel--,s}catch(e){throw this._validateLevel--,e}},_correctAdd:function(e,t,r,i){if(!this.hasYearZero&&("y"===i||"m"===i)&&(0===t[0]||e.year()>0!=t[0]>0)){var n={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i];t=this._add(e,r*n[0]+(r<0?-1:1)*n[1],n[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate);var i="y"===r?t:e.year(),n="m"===r?t:e.month(),a="d"===r?t:e.day();return("y"===r||"m"===r)&&(a=Math.min(a,this.daysInMonth(i,n))),e.date(i,n,a)},isValid:function(e,t,r){this._validateLevel++;var i=this.hasYearZero||0!==e;if(i){var n=this.newDate(e,t,this.minDay);i=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDayt.year());return e%4==0&&(e%100!=0||e%400==0)},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(4-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(e,t,r){var i=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);e=i.year(),t=i.month(),r=i.day(),e<0&&e++,t<3&&(t+=12,e--);var n=Math.floor(e/100);return Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r+(2-n+Math.floor(n/4))-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=Math.floor((t-1867216.25)/36524.25),i=(r=t+1+r-Math.floor(r/4))+1524,n=Math.floor((i-122.1)/365.25),a=Math.floor(365.25*n),o=Math.floor((i-a)/30.6001),s=i-a-Math.floor(30.6001*o),l=o-(o>13.5?13:1),c=n-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(e,t,r){var i=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),n=new Date(i.year(),i.month()-1,i.day());return n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.setHours(n.getHours()>12?n.getHours()+2:0),n},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var l=t.exports=new i;l.cdate=n,l.baseCalendar=o,l.calendars.gregorian=s}}),b7=p({"node_modules/world-calendars/dist/plus.js"(){var e=mR(),t=b8();e(t.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"}),t.local=t.regionalOptions[""],e(t.cdate.prototype,{formatDate:function(e,t){return"string"!=typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),e(t.baseCalendar.prototype,{UNIX_EPOCH:t.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:t.instance().jdEpoch,TICKS_PER_DAY:864e9,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(e,r,i){if("string"!=typeof e&&(i=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw t.local.invalidFormat||t.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,i=i||{};for(var n,a,o,s=i.dayNamesShort||this.local.dayNamesShort,l=i.dayNames||this.local.dayNames,c=i.monthNumbers||this.local.monthNumbers,u=i.monthNamesShort||this.local.monthNamesShort,h=i.monthNames||this.local.monthNames,d=(i.calculateWeek||this.local.calculateWeek,function(t,r){for(var i=1;v+i1}),f=function(e,t,r,i){var n=""+t;if(d(e,i))for(;n.length1},x=function(e,i){var n=v(e,i),a=RegExp("^-?\\d{1,"+[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(e)+1]+"}"),o=r.substring(T).match(a);if(!o)throw(t.local.missingNumberAt||t.regionalOptions[""].missingNumberAt).replace(/\{0\}/,T);return T+=o[0].length,parseInt(o[0],10)},b=this,_=function(e,i,n,a){for(var o=v(e,a)?n:i,s=0;s-1){f=1,p=m;for(var A=this.daysInMonth(d,f);p>A;A=this.daysInMonth(d,f))f++,p-=A}return h>-1?this.fromJD(h):this.newDate(d,f,p)},determineDate:function(e,t,r,i,n){r&&"object"!=typeof r&&(n=i,i=r,r=null),"string"!=typeof i&&(n=i,i="");var a=this;return t=t?t.newDate():null,e=null==e?t:"string"==typeof e?function(e){try{return a.parseDate(i,e,n)}catch{}e=e.toLowerCase();for(var t=(e.match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(e);s;)t.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(e);return t}(e):"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,"d"):a.newDate(e)}})}}),b9=p({"node_modules/world-calendars/dist/calendars/chinese.js"(){var e=b8(),t=mR(),r=e.instance();function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new e.baseCalendar,t(i.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if("string"==typeof e){var r=e.match(a);return r?r[0]:""}var i=this._validateYear(e),n=e.month(),o=""+this.toChineseMonth(i,n);return t&&o.length<2&&(o="0"+o),this.isIntercalaryMonth(i,n)&&(o+="i"),o},monthNames:function(e){if("string"==typeof e){var t=e.match(o);return t?t[0]:""}var r=this._validateYear(e),i=e.month(),n=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,i)-1];return this.isIntercalaryMonth(r,i)&&(n="闰"+n),n},monthNamesShort:function(e){if("string"==typeof e){var t=e.match(s);return t?t[0]:""}var r=this._validateYear(e),i=e.month(),n=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,i)-1];return this.isIntercalaryMonth(r,i)&&(n="闰"+n),n},parseMonth:function(e,t){e=this._validateYear(e);var r,i=parseInt(t);if(isNaN(i))"闰"===t[0]&&(r=!0,t=t.substring(1)),"月"===t[t.length-1]&&(t=t.substring(0,t.length-1)),i=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(t);else{var n=t[t.length-1];r="i"===n||"I"===n}return this.toMonthIndex(e,i,r)},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(e,t){if(e.year&&(e=e.year()),"number"!=typeof e||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(t,r,i){var n=this.intercalaryMonth(t);if(i&&r!==n||r<1||r>12)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?!i&&r<=n?r-1:r:r-1},toChineseMonth:function(t,r){t.year&&(r=(t=t.year()).month());var i=this.intercalaryMonth(t);if(r<0||r>(i?12:11))throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?r>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(t,i,n){var a,o=c[this._validateYear(t,e.local.invalidyear)-c[0]];return(a=r.newDate(o>>9&4095,o>>5&15,31&o)).add(4-(a.dayOfWeek()||7),"d"),1+Math.floor((this.toJD(t,i,n)-a.toJD())/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(t,r){t.year&&(r=t.month(),t=t.year());var i=l[(t=this._validateYear(t))-l[0]];if(r>(i>>13?12:11))throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return i&1<<12-r?30:29},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,i,n){var a=this._validate(t,s,n,e.local.invalidDate);t=this._validateYear(a.year()),i=a.month(),n=a.day();var o=this.isIntercalaryMonth(t,i),s=this.toChineseMonth(t,i),u=function(e,t,r,i){if("object"==typeof e)a=e,n=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw Error("Lunar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw Error("Lunar day outside range 1 - 30");"object"==typeof i?(o=!1,n=i):(o=!!i,n={}),a={year:e,month:t,day:r,isIntercalary:o}}var n,a,o,s,u=a.day-1,h=l[a.year-l[0]],d=h>>13;s=d&&(a.month>d||a.isIntercalary)?a.month:a.month-1;for(var f=0;f>9&4095,(p>>5&15)-1,(31&p)+u);return n.year=m.getFullYear(),n.month=1+m.getMonth(),n.day=m.getDate(),n}(t,s,n,o);return r.toJD(u.year,u.month,u.day)},fromJD:function(e){var t=r.fromJD(e),i=function(e,t,r){if("object"==typeof e)a=e,o=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw Error("Solar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},o={}}var i=c[a.year-c[0]],n=a.year<<9|a.month<<5|a.day;o.year=n>=i?a.year:a.year-1;var a,o,s,u=new Date((i=c[o.year-c[0]])>>9&4095,(i>>5&15)-1,31&i);s=Math.round((new Date(a.year,a.month-1,a.day)-u)/864e5);var h,d=l[o.year-l[0]];for(h=0;h<13;h++){var f=d&1<<12-h?30:29;if(s>13;return!p||hr.year());return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(13===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return(t=n.year())<0&&t++,n.day()+(n.month()-1)*30+(t-1)*365+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--;var i=Math.floor((t=Math.floor(e)+.5-this.newDate(r,1,1).toJD())/30)+1,n=t-(i-1)*30+1;return this.newDate(r,i,n)}}),e.calendars.coptic=r}}),_t=p({"node_modules/world-calendars/dist/calendars/discworld.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Discworld",jdEpoch:1721425.5,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(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),400},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/8)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,r,i){return(this._validate(t,r,i,e.local.invalidDate).day()+1)%8},weekDay:function(e,t,r){var i=this.dayOfWeek(e,t,r);return i>=2&&i<=6},extraInfo:function(t,r,n){return{century:i[Math.floor((this._validate(t,r,n,e.local.invalidDate).year()-1)/100)+1]||""}},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return t=n.year()+ +(0>n.year()),r=n.month(),(i=n.day())+16*(r>1)+(r>2?(r-2)*32:0)+(t-1)*400+this.jdEpoch-1},fromJD:function(e){var t=Math.floor((e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1)/400)+1;e-=(t-1)*400;var r=Math.floor((e+=16*(e>15))/32)+1,i=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,i)}});var i={20:"Fruitbat",21:"Anchovy"};e.calendars.discworld=r}}),_r=p({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Ethiopian",jdEpoch:1724220.5,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(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=r.year()+ +(0>r.year());return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(13===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return(t=n.year())<0&&t++,n.day()+(n.month()-1)*30+(t-1)*365+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--;var i=Math.floor((t=Math.floor(e)+.5-this.newDate(r,1,1).toJD())/30)+1,n=t-(i-1)*30+1;return this.newDate(r,i,n)}}),e.calendars.ethiopian=r}}),_i=p({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function i(e,t){return e-t*Math.floor(e/t)}r.prototype=new e.baseCalendar,t(r.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(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return 7>i(7*(e=e<0?e+1:e)+1,19)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,r){return t.year&&(r=t.month(),t=t.year()),this._validate(t,r,this.minDay,e.local.invalidMonth),12===r&&this.leapYear(t)||8===r&&5===i(this.daysInYear(t),10)?30:9===r&&3===i(this.daysInYear(t),10)?29:this.daysPerMonth[r-1]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},extraInfo:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);t=n.year(),r=n.month(),i=n.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+i+1;if(r<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(var s=1;si(3*(r+1),7)&&r++,r},_delay2:function(e){var t=this._delay1(e-1),r=this._delay1(e);return this._delay1(e+1)-r==356?2:+(r-t==382)},fromJD:function(e){e=Math.floor(e)+.5;for(var t=Math.floor((e-this.jdEpoch)*98496/0x224f0b7)-1;e>=this.toJD(-1===t?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var i=e-this.toJD(t,r,1)+1;return this.newDate(t,r,i)}}),e.calendars.hebrew=r}}),_n=p({"node_modules/world-calendars/dist/calendars/islamic.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Islamic",jdEpoch:1948439.5,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īs","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(t){return(11*this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(12===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return t=n.year(),r=n.month(),(i=n.day())+Math.ceil(29.5*(r-1))+((t=t<=0?t+1:t)-1)*354+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor((30*((e=Math.floor(e)+.5)-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),i=e-this.toJD(t,r,1)+1;return this.newDate(t,r,i)}}),e.calendars.islamic=r}}),_a=p({"node_modules/world-calendars/dist/calendars/julian.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Julian",jdEpoch:1721423.5,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(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=0>r.year()?r.year()+1:r.year();return t%4==0},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(4-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(2===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return t=n.year(),r=n.month(),i=n.day(),t<0&&t++,r<=2&&(t--,r+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(r+1))+i-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,r=Math.floor((t-122.1)/365.25),i=Math.floor(365.25*r),n=Math.floor((t-i)/30.6001),a=n-Math.floor(n<14?1:13),o=r-Math.floor(a>2?4716:4715),s=t-i-Math.floor(30.6001*n);return o<=0&&o--,this.newDate(o,a,s)}}),e.calendars.julian=r}}),_o=p({"node_modules/world-calendars/dist/calendars/mayan.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function i(e,t){return e-t*Math.floor(e/t)}r.prototype=new e.baseCalendar,t(r.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(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),!1},formatYear:function(t){var r=Math.floor((t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year())/400);return t%=400,r+"."+Math.floor((t+=400*(t<0))/20)+"."+t%20},forYear:function(e){if((e=e.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&i<0)throw"Invalid Mayan year";t=20*t+i}return t},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),18},weekOfYear:function(t,r,i){return this._validate(t,r,i,e.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),360},daysInMonth:function(t,r){return this._validate(t,r,this.minDay,e.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,r,i){return this._validate(t,r,i,e.local.invalidDate).day()},weekDay:function(t,r,i){return this._validate(t,r,i,e.local.invalidDate),!0},extraInfo:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate).toJD(),a=this._toHaab(n),o=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){var t=i((e-=this.jdEpoch)+8+340,365);return[Math.floor(t/20)+1,i(t,20)]},_toTzolkin:function(e){return[i((e-=this.jdEpoch)+20-1,20)+1,i(e+4-1,13)+1]},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return n.day()+20*n.month()+360*n.year()+this.jdEpoch},fromJD:function(e){var t=Math.floor((e=Math.floor(e)+.5-this.jdEpoch)/360);e%=360;var r=Math.floor((e+=360*(e<0))/20),i=e%20;return this.newDate(t,r,i)}}),e.calendars.mayan=r}}),_s=p({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar;var i=e.instance("gregorian");t(r.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,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(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear);return i.leapYear(r.year()+ +(1>r.year())+1469)},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(1-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(12===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidMonth),t=a.year();t<0&&t++;for(var o=a.day(),s=1;s=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,i=1;r>this.daysInMonth(t,i);)r-=this.daysInMonth(t,i),i++;return this.newDate(t,i,r)}}),e.calendars.nanakshahi=r}}),_l=p({"node_modules/world-calendars/dist/calendars/nepali.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Nepali",jdEpoch:1700709.5,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(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year(),typeof this.NEPALI_CALENDAR_DATA[t]>"u")return this.daysPerYear;for(var r=0,i=this.minMonth;i<=12;i++)r+=this.NEPALI_CALENDAR_DATA[t][i];return r},daysInMonth:function(t,r){return t.year&&(r=t.month(),t=t.year()),this._validate(t,r,this.minDay,e.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[t]>"u"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[t][r]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);t=n.year(),r=n.month(),i=n.day();var a=e.instance(),o=0,s=r,l=t;this._createMissingCalendarData(t);var c=t-(s>9||9===s&&i>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==r&&(o=i,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===r?(o+=i-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(t){var r=e.instance().fromJD(t),i=r.year(),n=r.dayOfYear(),a=i+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;n>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var c=this.NEPALI_CALENDAR_DATA[a][o]-(l-n);return this.newDate(a,o,c)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r"u"&&(this.NEPALI_CALENDAR_DATA[r]=t)},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=r}}),_c=p({"node_modules/world-calendars/dist/calendars/persian.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function i(e){var t=e-475;e<0&&t++;var r=.242197*t,i=.242197*(t+1);return r-Math.floor(r)>i-Math.floor(i)}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Persian",jdEpoch:1948320.5,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ārshanbeh","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(t){return i(this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year())},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-((i.dayOfWeek()+1)%7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(12===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidDate);t=a.year(),r=a.month(),n=a.day();var o=0;if(t>0)for(var s=1;s0?t-1:t)*365+o+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(475+((e=Math.floor(e)+.5)-this.toJD(475,1,1))/365.242197);t<=0&&t--,e>this.toJD(t,12,i(t)?30:29)&&0==++t&&t++;var r=e-this.toJD(t,1,1)+1,n=r<=186?Math.ceil(r/31):Math.ceil((r-6)/30),a=e-this.toJD(t,n,1)+1;return this.newDate(t,n,a)}}),e.calendars.persian=r,e.calendars.jalali=r}}),_u=p({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var e=b8(),t=mR(),r=e.instance();function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new e.baseCalendar,t(i.prototype,{name:"Taiwan",jdEpoch:2419402.5,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(t){var i=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(i.year());return r.leapYear(t)},weekOfYear:function(t,i,n){var a=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(a.year());return r.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(2===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,i,n){var a=this._validate(t,i,n,e.local.invalidDate),t=this._t2gYear(a.year());return r.toJD(t,a.month(),a.day())},fromJD:function(e){var t=r.fromJD(e),i=this._g2tYear(t.year());return this.newDate(i,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+ +(e>=-this.yearsOffset&&e<=-1)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset)}}),e.calendars.taiwan=i}}),_h=p({"node_modules/world-calendars/dist/calendars/thai.js"(){var e=b8(),t=mR(),r=e.instance();function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new e.baseCalendar,t(i.prototype,{name:"Thai",jdEpoch:1523098.5,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(t){var i=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(i.year());return r.leapYear(t)},weekOfYear:function(t,i,n){var a=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(a.year());return r.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(2===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,i,n){var a=this._validate(t,i,n,e.local.invalidDate),t=this._t2gYear(a.year());return r.toJD(t,a.month(),a.day())},fromJD:function(e){var t=r.fromJD(e),i=this._g2tYear(t.year());return this.newDate(i,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset)},_g2tYear:function(e){return e+this.yearsOffset+ +(e>=-this.yearsOffset&&e<=-1)}}),e.calendars.thai=i}}),_d=p({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.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āthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return 355===this.daysInYear(r.year())},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(t,r){for(var n=this._validate(t,r,this.minDay,e.local.invalidMonth),a=n.toJD()-24e5+.5,o=0,s=0;sa)return i[o]-i[o-1];o++}return 30},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidDate),o=12*(a.year()-1)+a.month()-15292;return a.day()+i[o-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var a=r+15292,o=Math.floor((a-1)/12),s=t-i[r-1]+1;return this.newDate(o+1,a-12*o,s)},isValid:function(t,r,i){var n=e.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(n=(t=null!=t.year?t.year:t)>=1276&&t<=1500),n},_validate:function(t,r,i,n){var a=e.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}}),e.calendars.ummalqura=r;var i=[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]}}),_f=p({"src/components/calendars/calendars.js"(e,t){t.exports=b8(),b7(),b9(),_e(),_t(),_r(),_i(),_n(),_a(),_o(),_s(),_l(),_c(),_u(),_h(),_d()}}),_p=p({"src/components/calendars/index.js"(e,t){var r=_f(),i=tv(),n=L(),a=n.EPOCHJD,o=n.ONEDAY,s={valType:"enumerated",values:i.sortObjectKeys(r.calendars),editType:"calc",dflt:"gregorian"},l=function(e,t,r,n){var a={};return a[r]=s,i.coerce(e,t,a,r,n)},c={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:"##",w:"##",c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}},u={};function h(e){var t=u[e];return t||(t=u[e]=r.instance(e))}function d(e){return i.extendFlat({},s,{description:e})}function f(e){return"Sets the calendar system to use with `"+e+"` date data."}var p={xcalendar:d(f("x"))},m=i.extendFlat({},p,{ycalendar:d(f("y"))}),g=i.extendFlat({},m,{zcalendar:d(f("z"))}),y=d("Sets the calendar system to use for `range` and `tick0` if this is a date axis. This does not set the calendar for interpreting data on this axis, that's specified in the trace or via the global `layout.calendar`");t.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:m,bar:m,box:m,heatmap:m,contour:m,histogram:m,histogram2d:m,histogram2dcontour:m,scatter3d:g,surface:g,mesh3d:g,scattergl:m,ohlc:p,candlestick:p},layout:{calendar:d("Sets the default calendar system to use for interpreting and displaying dates throughout the plot.")},subplots:{xaxis:{calendar:y},yaxis:{calendar:y},scene:{xaxis:{calendar:y},yaxis:{calendar:y},zaxis:{calendar:y}},polar:{radialaxis:{calendar:y}}}},layoutAttributes:s,handleDefaults:l,handleTraceDefaults:function(e,t,r,i){for(var n=0;n{i.preventDefault(),i.stopPropagation(),i.clipboardData.setData("text",e),t.removeEventListener("copy",r,!0)};t.addEventListener("copy",r,!0),document.execCommand("copy")},(q=$||($={})).boxSizing=function(e){let t=window.getComputedStyle(e),r=parseFloat(t.borderTopWidth)||0,i=parseFloat(t.borderLeftWidth)||0,n=parseFloat(t.borderRightWidth)||0,a=parseFloat(t.borderBottomWidth)||0,o=parseFloat(t.paddingTop)||0,s=parseFloat(t.paddingLeft)||0,l=parseFloat(t.paddingRight)||0,c=parseFloat(t.paddingBottom)||0;return{borderTop:r,borderLeft:i,borderRight:n,borderBottom:a,paddingTop:o,paddingLeft:s,paddingRight:l,paddingBottom:c,horizontalSum:i+s+l+n,verticalSum:r+o+c+a}},q.sizeLimits=function(e){let t=window.getComputedStyle(e),r=parseFloat(t.minWidth)||0,i=parseFloat(t.minHeight)||0,n=parseFloat(t.maxWidth)||1/0,a=parseFloat(t.maxHeight)||1/0;return n=Math.max(r,n),a=Math.max(i,a),{minWidth:r,minHeight:i,maxWidth:n,maxHeight:a}},q.hitTest=function(e,t,r){let i=e.getBoundingClientRect();return t>=i.left&&t=i.top&&r=r.bottom)){if(i.topr.bottom&&i.height>=r.height){e.scrollTop-=r.top-i.top;return}if(i.topr.height||i.bottom>r.bottom&&i.height0;){if(d(n)){t++;continue}if(d(a)||d(o)){r++;continue}if(d(l)){i++;continue}if(d(c)){r++;continue}if(d(s)){i++;continue}if(!d(u))return 0}return(t=Math.min(t,255))<<16|(r=Math.min(r,255))<<8|(i=Math.min(i,255))},n=/^#[^\s\+>~#\.\[:]+/,a=/^\.[^\s\+>~#\.\[:]+/,o=/^\[[^\]]+\]/,s=/^[^\s\+>~#\.\[:]+/,l=/^(::[^\s\+>~#\.\[:]+|:first-line|:first-letter|:before|:after)/,c=/^:[^\s\+>~#\.\[:]+/,u=/^[\s\+>~\*]+/,h=/:not\(([^\)]+)\)/g;var U=O(R()),V=class{constructor(){this._first=null,this._last=null,this._size=0}get isEmpty(){return 0===this._size}get size(){return this._size}get length(){return this._size}get first(){return this._first?this._first.value:void 0}get last(){return this._last?this._last.value:void 0}get firstNode(){return this._first}get lastNode(){return this._last}*[Symbol.iterator](){let e=this._first;for(;e;)yield e.value,e=e.next}*retro(){let e=this._last;for(;e;)yield e.value,e=e.prev}*nodes(){let e=this._first;for(;e;)yield e,e=e.next}*retroNodes(){let e=this._last;for(;e;)yield e,e=e.prev}assign(e){for(let t of(this.clear(),e))this.addLast(t)}push(e){this.addLast(e)}pop(){return this.removeLast()}shift(e){this.addFirst(e)}unshift(){return this.removeFirst()}addFirst(e){let t=new Q.LinkedListNode(this,e);return this._first?(t.next=this._first,this._first.prev=t,this._first=t):(this._first=t,this._last=t),this._size++,t}addLast(e){let t=new Q.LinkedListNode(this,e);return this._last?(t.prev=this._last,this._last.next=t):this._first=t,this._last=t,this._size++,t}insertBefore(e,t){if(!t||t===this._first)return this.addFirst(e);if(!(t instanceof Q.LinkedListNode)||t.list!==this)throw Error("Reference node is not owned by the list.");let r=new Q.LinkedListNode(this,e),i=t.prev;return r.next=t,r.prev=i,t.prev=r,i.next=r,this._size++,r}insertAfter(e,t){if(!t||t===this._last)return this.addLast(e);if(!(t instanceof Q.LinkedListNode)||t.list!==this)throw Error("Reference node is not owned by the list.");let r=new Q.LinkedListNode(this,e),i=t.next;return r.next=i,r.prev=t,t.next=r,i.prev=r,this._size++,r}removeFirst(){let e=this._first;if(e)return e===this._last?(this._first=null,this._last=null):(this._first=e.next,this._first.prev=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeLast(){let e=this._last;if(e)return e===this._first?(this._first=null,this._last=null):(this._last=e.prev,this._last.next=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeNode(e){if(!(e instanceof Q.LinkedListNode)||e.list!==this)throw Error("Node is not owned by the list.");e===this._first&&e===this._last?(this._first=null,this._last=null):e===this._first?(this._first=e.next,this._first.prev=null):e===this._last?(this._last=e.prev,this._last.next=null):(e.next.prev=e.prev,e.prev.next=e.next),e.list=null,e.next=null,e.prev=null,this._size--}clear(){let e=this._first;for(;e;){let t=e.next;e.list=null,e.prev=null,e.next=null,e=t}this._first=null,this._last=null,this._size=0}};(Y=V||(V={})).from=function(e){let t=new Y;return t.assign(e),t},(Q||(Q={})).LinkedListNode=class{constructor(e,t){this.list=null,this.next=null,this.prev=null,this.list=e,this.value=t}};var q,H,G,W,Y,Z,$,X,K,J,Q,ee,et=class{constructor(e){this.type=e}get isConflatable(){return!1}conflate(e){return!1}},er=class extends et{get isConflatable(){return!0}conflate(e){return!0}};!function(e){let t,r=null,i=(t=Promise.resolve(),e=>{let r=!1;return t.then(()=>!r&&e()),()=>{r=!0}});function n(e,t){let r=o.get(e);r&&0!==r.length?(0,U.every)((0,U.retro)(r),r=>!r||function(e,t,r){let i=!0;try{i="function"==typeof e?e(t,r):e.messageHook(t,r)}catch(e){l(e)}return i}(r,e,t))&&u(e,t):u(e,t)}e.sendMessage=n,e.postMessage=function(e,t){t.isConflatable&&(0,U.some)(a,r=>r.handler===e&&!!r.msg&&r.msg.type===t.type&&!!r.msg.isConflatable&&r.msg.conflate(t))||h(e,t)},e.installMessageHook=function(e,t){let r=o.get(e);r&&-1!==r.indexOf(t)||(r?r.push(t):o.set(e,[t]))},e.removeMessageHook=function(e,t){let r=o.get(e);if(!r)return;let i=r.indexOf(t);-1!==i&&(r[i]=null,f(r))},e.clearData=function(e){let t=o.get(e);for(let r of(t&&t.length>0&&(U.ArrayExt.fill(t,null),f(t)),a))r.handler===e&&(r.handler=null,r.msg=null)},e.flush=function(){c||null===r||(r(),r=null,c=!0,d(),c=!1)},e.getExceptionHandler=function(){return l},e.setExceptionHandler=function(e){let t=l;return l=e,t};let a=new V,o=new WeakMap,s=new Set,l=e=>{console.error(e)},c=!1;function u(e,t){try{e.processMessage(t)}catch(e){l(e)}}function h(e,t){a.addLast({handler:e,msg:t}),null===r&&(r=i(d))}function d(){if(r=null,a.isEmpty)return;let e={handler:null,msg:null};for(a.addLast(e);;){let t=a.removeFirst();if(t===e)return;t.handler&&t.msg&&n(t.handler,t.msg)}}function f(e){0===s.size&&i(p),s.add(e)}function p(){s.forEach(m),s.clear()}function m(e){U.ArrayExt.removeAllWhere(e,g)}function g(e){return null===e}}(ee||(ee={}));var ei=class{constructor(e){this._pid=e_.nextPID(),this.name=e.name,this._create=e.create,this._coerce=e.coerce||null,this._compare=e.compare||null,this._changed=e.changed||null}get(e){let t=e_.ensureMap(e);return this._pid in t?t[this._pid]:t[this._pid]=this._createValue(e)}set(e,t){let r,i=e_.ensureMap(e);r=this._pid in i?i[this._pid]:i[this._pid]=this._createValue(e);let n=this._coerceValue(e,t);this._maybeNotify(e,r,i[this._pid]=n)}coerce(e){let t,r=e_.ensureMap(e);t=this._pid in r?r[this._pid]:r[this._pid]=this._createValue(e);let i=this._coerceValue(e,t);this._maybeNotify(e,t,r[this._pid]=i)}_createValue(e){return(0,this._create)(e)}_coerceValue(e,t){let r=this._coerce;return r?r(e,t):t}_compareValue(e,t){let r=this._compare;return r?r(e,t):e===t}_maybeNotify(e,t,r){let i=this._changed;i&&!this._compareValue(t,r)&&i(e,t,r)}};(ei||(ei={})).clearData=function(e){e_.ownerData.delete(e)},(eg=e_||(e_={})).ownerData=new WeakMap,d=0,eg.nextPID=()=>`pid-${`${Math.random()}`.slice(2)}-${d++}`,eg.ensureMap=function(e){let t=eg.ownerData.get(e);return t||(t=Object.create(null),eg.ownerData.set(e,t),t)};var en=O(R()),ea=(O(F()),class{constructor(e){this.sender=e}connect(e,t){return ew.connect(this,e,t)}disconnect(e,t){return ew.disconnect(this,e,t)}emit(e){ew.emit(this,e)}});(ey=ea||(ea={})).disconnectBetween=function(e,t){ew.disconnectBetween(e,t)},ey.disconnectSender=function(e){ew.disconnectSender(e)},ey.disconnectReceiver=function(e){ew.disconnectReceiver(e)},ey.disconnectAll=function(e){ew.disconnectAll(e)},ey.clearData=function(e){ew.disconnectAll(e)},ey.getExceptionHandler=function(){return ew.exceptionHandler},ey.setExceptionHandler=function(e){let t=ew.exceptionHandler;return ew.exceptionHandler=e,t},function(e){function t(e){let t=i.get(e);if(!(!t||0===t.length)){for(let e of t){if(!e.signal)continue;let t=e.thisArg||e.slot;e.signal=null,l(n.get(t))}l(t)}}function r(e){let t=n.get(e);if(!(!t||0===t.length)){for(let e of t){if(!e.signal)continue;let t=e.signal.sender;e.signal=null,l(i.get(t))}l(t)}}e.exceptionHandler=e=>{console.error(e)},e.connect=function(e,t,r){r=r||void 0;let a=i.get(e.sender);if(a||(a=[],i.set(e.sender,a)),s(a,e,t,r))return!1;let o=r||t,l=n.get(o);l||(l=[],n.set(o,l));let c={signal:e,slot:t,thisArg:r};return a.push(c),l.push(c),!0},e.disconnect=function(e,t,r){r=r||void 0;let a=i.get(e.sender);if(!a||0===a.length)return!1;let o=s(a,e,t,r);if(!o)return!1;let c=r||t,u=n.get(c);return o.signal=null,l(a),l(u),!0},e.disconnectBetween=function(e,t){let r=i.get(e);if(!r||0===r.length)return;let a=n.get(t);if(!(!a||0===a.length)){for(let t of a)t.signal&&t.signal.sender===e&&(t.signal=null);l(r),l(a)}},e.disconnectSender=t,e.disconnectReceiver=r,e.disconnectAll=function(e){t(e),r(e)},e.emit=function(t,r){let n=i.get(t.sender);if(!(!n||0===n.length))for(let i=0,a=n.length;ie.signal===t&&e.slot===r&&e.thisArg===i)}function l(e){0===a.size&&o(c),a.add(e)}function c(){a.forEach(u),a.clear()}function u(e){en.ArrayExt.removeAllWhere(e,h)}function h(e){return null===e.signal}}(ew||(ew={}));var eo=class{constructor(e){this._fn=e}get isDisposed(){return!this._fn}dispose(){if(!this._fn)return;let e=this._fn;this._fn=null,e()}},es=class{constructor(){this._isDisposed=!1,this._items=new Set}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._items.forEach(e=>{e.dispose()}),this._items.clear())}contains(e){return this._items.has(e)}add(e){this._items.add(e)}remove(e){this._items.delete(e)}clear(){this._items.clear()}};(ev=es||(es={})).from=function(e){let t=new ev;for(let r of e)t.add(r);return t};var el=class extends es{constructor(){super(...arguments),this._disposed=new ea(this)}get disposed(){return this._disposed}dispose(){this.isDisposed||(super.dispose(),this._disposed.emit(void 0),ea.clearData(this))}};(ex=el||(el={})).from=function(e){let t=new ex;for(let r of e)t.add(r);return t};var ec=class e{constructor(e){this._onScrollFrame=()=>{if(!this._scrollTarget)return;let{element:e,edge:t,distance:r}=this._scrollTarget,i=Math.max(1,Math.round(Math.pow((eT.SCROLL_EDGE_SIZE-r)/eT.SCROLL_EDGE_SIZE,2)*eT.SCROLL_EDGE_SIZE));switch(t){case"top":e.scrollTop-=i;break;case"left":e.scrollLeft-=i;break;case"right":e.scrollLeft+=i;break;case"bottom":e.scrollTop+=i}requestAnimationFrame(this._onScrollFrame)},this._disposed=!1,this._dropAction="none",this._override=null,this._currentTarget=null,this._currentElement=null,this._promise=null,this._scrollTarget=null,this._resolve=null,this.document=e.document||document,this.mimeData=e.mimeData,this.dragImage=e.dragImage||null,this.proposedAction=e.proposedAction||"copy",this.supportedActions=e.supportedActions||"all",this.source=e.source||null}dispose(){if(!this._disposed){if(this._disposed=!0,this._currentTarget){let e=new PointerEvent("pointerup",{bubbles:!0,cancelable:!0,clientX:-1,clientY:-1});eT.dispatchDragLeave(this,this._currentTarget,null,e)}this._finalize("none")}}get isDisposed(){return this._disposed}start(e,t){if(this._disposed)return Promise.resolve("none");if(this._promise)return this._promise;this._addListeners(),this._attachDragImage(e,t),this._promise=new Promise(e=>{this._resolve=e});let r=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:e,clientY:t});return document.dispatchEvent(r),this._promise}handleEvent(e){switch(e.type){case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;default:e.preventDefault(),e.stopPropagation()}}moveDragImage(e,t){this.dragImage&&(this.dragImage.style.transform=`translate(${e}px, ${t}px)`)}_evtPointerMove(e){e.preventDefault(),e.stopPropagation(),this._updateCurrentTarget(e),this._updateDragScroll(e),this.moveDragImage(e.clientX,e.clientY)}_evtPointerUp(e){if(e.preventDefault(),e.stopPropagation(),0!==e.button)return;if(this._updateCurrentTarget(e),!this._currentTarget)return void this._finalize("none");if("none"===this._dropAction){eT.dispatchDragLeave(this,this._currentTarget,null,e),this._finalize("none");return}let t=eT.dispatchDrop(this,this._currentTarget,e);this._finalize(t)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&this.dispose()}_addListeners(){document.addEventListener("pointerdown",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("pointerup",this,!0),document.addEventListener("pointerenter",this,!0),document.addEventListener("pointerleave",this,!0),document.addEventListener("pointerover",this,!0),document.addEventListener("pointerout",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("keyup",this,!0),document.addEventListener("keypress",this,!0),document.addEventListener("contextmenu",this,!0)}_removeListeners(){document.removeEventListener("pointerdown",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointerenter",this,!0),document.removeEventListener("pointerleave",this,!0),document.removeEventListener("pointerover",this,!0),document.removeEventListener("pointerout",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("keyup",this,!0),document.removeEventListener("keypress",this,!0),document.removeEventListener("contextmenu",this,!0)}_updateDragScroll(e){let t=eT.findScrollTarget(e);(this._scrollTarget||t)&&(this._scrollTarget||setTimeout(this._onScrollFrame,500),this._scrollTarget=t)}_updateCurrentTarget(e){let t=this._currentTarget,r=this._currentTarget,i=this._currentElement,n=eT.findElementBehindBackdrop(e,this.document);this._currentElement=n,n!==i&&n!==r&&eT.dispatchDragExit(this,r,n,e),n!==i&&n!==r&&(r=eT.dispatchDragEnter(this,n,r,e)),r!==t&&(this._currentTarget=r,eT.dispatchDragLeave(this,t,r,e));let a=eT.dispatchDragOver(this,r,e);this._setDropAction(a)}_attachDragImage(e,t){if(!this.dragImage)return;this.dragImage.classList.add("lm-mod-drag-image");let r=this.dragImage.style;r.pointerEvents="none",r.position="fixed",r.transform=`translate(${e}px, ${t}px)`,(this.document instanceof Document?this.document.body:this.document.firstElementChild).appendChild(this.dragImage)}_detachDragImage(){if(!this.dragImage)return;let e=this.dragImage.parentNode;e&&e.removeChild(this.dragImage)}_setDropAction(t){if(t=eT.validateAction(t,this.supportedActions),!(this._override&&this._dropAction===t))switch(t){case"none":this._dropAction=t,this._override=e.overrideCursor("no-drop",this.document);break;case"copy":this._dropAction=t,this._override=e.overrideCursor("copy",this.document);break;case"link":this._dropAction=t,this._override=e.overrideCursor("alias",this.document);break;case"move":this._dropAction=t,this._override=e.overrideCursor("move",this.document)}}_finalize(e){let t=this._resolve;this._removeListeners(),this._detachDragImage(),this._override&&(this._override.dispose(),this._override=null),this.mimeData.clear(),this._disposed=!0,this._dropAction="none",this._currentTarget=null,this._currentElement=null,this._scrollTarget=null,this._promise=null,this._resolve=null,t&&t(e)}},eu=ec||(ec={});class eh extends DragEvent{constructor(e,t){super(t.type,{bubbles:!0,cancelable:!0,altKey:e.altKey,button:e.button,clientX:e.clientX,clientY:e.clientY,ctrlKey:e.ctrlKey,detail:0,metaKey:e.metaKey,relatedTarget:t.related,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey,view:window});let{drag:r}=t;this.dropAction="none",this.mimeData=r.mimeData,this.proposedAction=r.proposedAction,this.supportedActions=r.supportedActions,this.source=r.source}}eu.Event=eh,eu.overrideCursor=function(e,t=document){return eT.overrideCursor(e,t)},function(e){let t;function r(t,a=document){if(t){if(i&&t==i.event)return i.element;e.cursorBackdrop.style.zIndex="-1000";let r=a.elementFromPoint(t.clientX,t.clientY);return e.cursorBackdrop.style.zIndex="",i={event:t,element:r},r}{let t=e.cursorBackdrop.style.transform;if(n&&t===n.transform)return n.element;let r=e.cursorBackdrop.getBoundingClientRect();e.cursorBackdrop.style.zIndex="-1000";let i=a.elementFromPoint(r.left+r.width/2,r.top+r.height/2);return e.cursorBackdrop.style.zIndex="",n={transform:t,element:i},i}}e.SCROLL_EDGE_SIZE=20,e.validateAction=function(e,t){return a[e]&o[t]?e:"none"},e.findElementBehindBackdrop=r;let i=null,n=null;e.findScrollTarget=function(t){let i=t.clientX,n=t.clientY,a=r(t);for(;a;a=a.parentElement){let t;if(!a.hasAttribute("data-lm-dragscroll"))continue;let r=0,o=0;a===document.body&&(r=window.pageXOffset,o=window.pageYOffset);let s=a.getBoundingClientRect(),l=s.top+o,c=s.left+r,u=c+s.width,h=l+s.height;if(i=u||n=h)continue;let d=i-c+1,f=n-l+1,p=u-i,m=h-n,g=Math.min(d,f,p,m);if(g>e.SCROLL_EDGE_SIZE)continue;switch(g){case m:t="bottom";break;case f:t="top";break;case p:t="right";break;case d:t="left";break;default:throw"unreachable"}let y=a.scrollWidth-a.clientWidth,v=a.scrollHeight-a.clientHeight,x;switch(t){case"top":x=v>0&&a.scrollTop>0;break;case"left":x=y>0&&a.scrollLeft>0;break;case"right":x=y>0&&a.scrollLeft0&&a.scrollTop{i===h&&e.cursorBackdrop.isConnected&&(document.removeEventListener("pointermove",s,!0),e.cursorBackdrop.removeEventListener("scroll",l,!0),n.removeChild(e.cursorBackdrop))})};let u=500,h=0;(t=document.createElement("div")).classList.add("lm-cursor-backdrop"),e.cursorBackdrop=t}(eT||(eT={}));var ed=O(R()),ef=O(F());function ep(){return eM.keyboardLayout}var em=class e{constructor(t,r,i=[]){this.name=t,this._codes=r,this._keys=e.extractKeys(r),this._modifierKeys=e.convertToKeySet(i)}keys(){return Object.keys(this._keys)}isValidKey(e){return e in this._keys}isModifierKey(e){return e in this._modifierKeys}keyForKeydownEvent(e){return this._codes[e.keyCode]||""}};(eb=em||(em={})).extractKeys=function(e){let t=Object.create(null);for(let r in e)t[e[r]]=!0;return t},eb.convertToKeySet=function(e){let t=Object(null);for(let r=0,i=e.length;r{this._commands.delete(e),this._commandChanged.emit({id:e,type:"removed"})})}notifyCommandChanged(e){if(void 0!==e&&!this._commands.has(e))throw Error(`Command '${e}' is not registered.`);this._commandChanged.emit({id:e,type:e?"changed":"many-changed"})}describedBy(e,t=ef.JSONExt.emptyObject){var r;let i=this._commands.get(e);return Promise.resolve(null!=(r=i?.describedBy.call(void 0,t))?r:{args:null})}label(e,t=ef.JSONExt.emptyObject){var r;let i=this._commands.get(e);return null!=(r=i?.label.call(void 0,t))?r:""}mnemonic(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.mnemonic.call(void 0,t):-1}icon(e,t=ef.JSONExt.emptyObject){var r;return null==(r=this._commands.get(e))?void 0:r.icon.call(void 0,t)}iconClass(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.iconClass.call(void 0,t):""}iconLabel(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.iconLabel.call(void 0,t):""}caption(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.caption.call(void 0,t):""}usage(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.usage.call(void 0,t):""}className(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.className.call(void 0,t):""}dataset(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.dataset.call(void 0,t):{}}isEnabled(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isEnabled.call(void 0,t)}isToggled(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isToggled.call(void 0,t)}isToggleable(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isToggleable}isVisible(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isVisible.call(void 0,t)}execute(e,t=ef.JSONExt.emptyObject){let r,i=this._commands.get(e);if(!i)return Promise.reject(Error(`Command '${e}' not registered.`));try{r=i.execute.call(void 0,t)}catch(e){r=Promise.reject(e)}let n=Promise.resolve(r);return this._commandExecuted.emit({id:e,args:t,result:n}),n}addKeyBinding(e){let t=eB.createKeyBinding(e);return this._keyBindings.push(t),this._keyBindingChanged.emit({binding:t,type:"added"}),new eo(()=>{ed.ArrayExt.removeFirstOf(this._keyBindings,t),this._keyBindingChanged.emit({binding:t,type:"removed"})})}processKeydownEvent(t){if(t.defaultPrevented||this._replaying)return;let r=e.keystrokeForKeydownEvent(t);if(!r){this._replayKeydownEvents(),this._clearPendingState();return}if(e.isModifierKeyPressed(t)){let{exact:e}=eB.matchKeyBinding(this._keyBindings,[r],t);e?(t.preventDefault(),t.stopPropagation(),this._startModifierTimer(e)):this._clearModifierTimer();return}this._keystrokes.push(r);let{exact:i,partial:n}=eB.matchKeyBinding(this._keyBindings,this._keystrokes,t),a=0!==n.length;if(!i&&!a){this._replayKeydownEvents(),this._clearPendingState();return}if((i?.preventDefault||n.some(e=>e.preventDefault))&&(t.preventDefault(),t.stopPropagation()),this._keydownEvents.push(t),i&&!a){this._executeKeyBinding(i),this._clearPendingState();return}i&&(this._exactKeyMatch=i),this._startTimer()}holdKeyBindingExecution(e,t){this._holdKeyBindingPromises.set(e,t)}processKeyupEvent(e){this._clearModifierTimer()}_startModifierTimer(e){this._clearModifierTimer(),this._timerModifierID=window.setTimeout(()=>{this._executeKeyBinding(e)},eB.modifierkeyTimeOut)}_clearModifierTimer(){0!==this._timerModifierID&&(clearTimeout(this._timerModifierID),this._timerModifierID=0)}_startTimer(){this._clearTimer(),this._timerID=window.setTimeout(()=>{this._onPendingTimeout()},eB.CHORD_TIMEOUT)}_clearTimer(){0!==this._timerID&&(clearTimeout(this._timerID),this._timerID=0)}_replayKeydownEvents(){0!==this._keydownEvents.length&&(this._replaying=!0,this._keydownEvents.forEach(eB.replayKeyEvent),this._replaying=!1)}async _executeKeyBinding(e){if(0!==this._holdKeyBindingPromises.size){let e=[...this._keydownEvents],t=(await Promise.race([Promise.all(e.map(async e=>{var t;return null!=(t=this._holdKeyBindingPromises.get(e))?t:Promise.resolve(!0)})),new Promise(e=>{setTimeout(()=>e([!1]),eB.KEYBINDING_HOLD_TIMEOUT)})])).every(Boolean);if(this._holdKeyBindingPromises.clear(),!t)return}let{command:t,args:r}=e,i={_luminoEvent:{type:"keybinding",keys:e.keys},...r};if(!this.hasCommand(t)||!this.isEnabled(t,i)){let r=this.hasCommand(t)?"enabled":"registered",i=`Cannot execute key binding '${e.keys.join(", ")}':`,n=`command '${t}' is not ${r}.`;console.warn(`${i} ${n}`);return}await this.execute(t,i)}_clearPendingState(){this._clearTimer(),this._clearModifierTimer(),this._exactKeyMatch=null,this._keystrokes.length=0,this._keydownEvents.length=0}_onPendingTimeout(){this._timerID=0,this._exactKeyMatch?this._executeKeyBinding(this._exactKeyMatch):this._replayKeydownEvents(),this._clearPendingState()}},eS=eA||(eA={});function eE(e){let t="",r=!1,i=!1,n=!1,a=!1;for(let o of e.split(/\s+/))"Accel"===o?X.IS_MAC?i=!0:n=!0:"Alt"===o?r=!0:"Cmd"===o?i=!0:"Ctrl"===o?n=!0:"Shift"===o?a=!0:o.length>0&&(t=o);return{cmd:i,ctrl:n,alt:r,shift:a,key:t}}function eC(e){let t="",r=eE(e);return r.ctrl&&(t+="Ctrl "),r.alt&&(t+="Alt "),r.shift&&(t+="Shift "),r.cmd&&X.IS_MAC&&(t+="Cmd "),r.key?t+r.key:t.trim()}eS.parseKeystroke=eE,eS.normalizeKeystroke=eC,eS.normalizeKeys=function(e){return(X.IS_WIN?e.winKeys||e.keys:X.IS_MAC?e.macKeys||e.keys:e.linuxKeys||e.keys).map(eC)},eS.formatKeystroke=function(e){return"string"==typeof e?t(e):e.map(t).join(", ");function t(e){let t=[],r=X.IS_MAC?" ":"+",i=eE(e);return i.ctrl&&t.push("Ctrl"),i.alt&&t.push("Alt"),i.shift&&t.push("Shift"),X.IS_MAC&&i.cmd&&t.push("Cmd"),t.push(i.key),t.map(eB.formatKey).join(r)}},eS.isModifierKeyPressed=function(e){let t=ep(),r=t.keyForKeydownEvent(e);return t.isModifierKey(r)},eS.keystrokeForKeydownEvent=function(e){let t=ep(),r=t.keyForKeydownEvent(e),i=[];return e.ctrlKey&&i.push("Ctrl"),e.altKey&&i.push("Alt"),e.shiftKey&&i.push("Shift"),e.metaKey&&X.IS_MAC&&i.push("Cmd"),t.isModifierKey(r)||i.push(r),i.join(" ")},function(e){e.CHORD_TIMEOUT=1e3,e.KEYBINDING_HOLD_TIMEOUT=1e3,e.modifierkeyTimeOut=500,e.createCommand=function(e){return{execute:e.execute,describedBy:c("function"==typeof e.describedBy?e.describedBy:{args:null,...e.describedBy},()=>({args:null})),label:c(e.label,i),mnemonic:c(e.mnemonic,n),icon:c(e.icon,l),iconClass:c(e.iconClass,i),iconLabel:c(e.iconLabel,i),caption:c(e.caption,i),usage:c(e.usage,i),className:c(e.className,i),dataset:c(e.dataset,s),isEnabled:e.isEnabled||a,isToggled:e.isToggled||o,isToggleable:e.isToggleable||!!e.isToggled,isVisible:e.isVisible||a}},e.createKeyBinding=function(e){var t;return{keys:eA.normalizeKeys(e),selector:function(e){if(-1!==e.selector.indexOf(","))throw Error(`Selector cannot contain commas: ${e.selector}`);if(!K.isValid(e.selector))throw Error(`Invalid selector: ${e.selector}`);return e.selector}(e),command:e.command,args:e.args||ef.JSONExt.emptyObject,preventDefault:null==(t=e.preventDefault)||t}},e.matchKeyBinding=function(e,t,r){let i=null,n=[],a=1/0,o=0;for(let s=0,l=e.length;st.length?2:1}(l.keys,t);if(0===c)continue;if(2===c){-1!==u(l.selector,r)&&n.push(l);continue}let h=u(l.selector,r);if(-1===h||h>a)continue;let d=K.calculateSpecificity(l.selector);(!i||h=o)&&(i=l,a=h,o=d)}return{exact:i,partial:n}},e.replayKeyEvent=function(e){var t;let r,i,n;e.target.dispatchEvent((t=e,r=document.createEvent("Event"),i=t.bubbles||!0,n=t.cancelable||!0,r.initEvent(t.type||"keydown",i,n),r.key=t.key||"",r.keyCode=t.keyCode||0,r.which=t.keyCode||0,r.ctrlKey=t.ctrlKey||!1,r.altKey=t.altKey||!1,r.shiftKey=t.shiftKey||!1,r.metaKey=t.metaKey||!1,r.view=t.view||window,r))},e.formatKey=function(e){return X.IS_MAC?t.hasOwnProperty(e)?t[e]:e:r.hasOwnProperty(e)?r[e]:e};let t={Backspace:"⌫",Tab:"⇥",Enter:"⏎",Shift:"⇧",Ctrl:"⌃",Alt:"⌥",Escape:"⎋",PageUp:"⇞",PageDown:"⇟",End:"↘",Home:"↖",ArrowLeft:"←",ArrowUp:"↑",ArrowRight:"→",ArrowDown:"↓",Delete:"⌦",Cmd:"⌘"},r={Escape:"Esc",PageUp:"Page Up",PageDown:"Page Down",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},i=()=>"",n=()=>-1,a=()=>!0,o=()=>!1,s=()=>({}),l=()=>{};function c(e,t){return void 0===e?t:"function"==typeof e?e:()=>e}function u(e,t){let r=t.target,i=t.currentTarget;for(let t=0;null!==r&&!r.hasAttribute("data-lm-suppress-shortcuts");r=r.parentElement,++t){if(K.matches(r,e))return t;if(r===i)break}return -1}}(eB||(eB={}));var eL=O(R()),eP=class{constructor(e){this.type="text",this.content=e}},eI=class{constructor(e,t,r,i){this.type="element",this.tag=e,this.attrs=t,this.children=r,this.renderer=i}};function ez(e){let t={},r,i=[];for(let e=1,n=arguments.length;e=a.length){eO(i[r],t);continue}let s=a[r],l=i[r];if(s===l){o=o.nextSibling;continue}if("text"===s.type&&"text"===l.type){o.textContent!==l.content&&(o.textContent=l.content),o=o.nextSibling;continue}if("text"===s.type||"text"===l.type||!s.renderer!=!l.renderer){eL.ArrayExt.insert(a,r,l),eO(l,t,o);continue}let c=l.attrs.key;if(c&&c in n){let e=n[c];e.vNode!==s&&(eL.ArrayExt.move(a,a.indexOf(e.vNode,r+1),r),t.insertBefore(e.element,o),s=e.vNode,o=e.element)}if(s===l){o=o.nextSibling;continue}let u=s.attrs.key;if(u&&u!==c||s.tag!==l.tag){eL.ArrayExt.insert(a,r,l),eO(l,t,o);continue}(function(e,t,r){let i;if(t!==r){for(i in t)i in eR||i in r||("on"===i.substr(0,2)?e[i]=null:e.removeAttribute(i));for(i in r)i in eR||t[i]===r[i]||("on"===i.substr(0,2)?e[i]=r[i]:e.setAttribute(i,r[i]));t.className!==r.className&&(void 0!==r.className?e.setAttribute("class",r.className):e.removeAttribute("class")),t.htmlFor!==r.htmlFor&&(void 0!==r.htmlFor?e.setAttribute("for",r.htmlFor):e.removeAttribute("for")),t.dataset!==r.dataset&&function(e,t,r){for(let i in t)i in r||e.removeAttribute(`data-${i}`);for(let i in r)t[i]!==r[i]&&e.setAttribute(`data-${i}`,r[i])}(e,t.dataset||{},r.dataset||{}),t.style!==r.style&&function(e,t,r){let i=e.style,n;for(n in t)n in r||(i[n]="");for(n in r)t[n]!==r[n]&&(i[n]=r[n])}(e,t.style||{},r.style||{})}})(o,s.attrs,l.attrs),l.renderer?l.renderer.render(o,{attrs:l.attrs,children:l.children}):e(o,s.children,l.children),o=o.nextSibling}!function e(t,r,i,n){for(let a=r.length-1;a>=i;--a){let i=r[a],o=n?t.lastChild:t.childNodes[a];"text"===i.type||(i.renderer&&i.renderer.unrender?i.renderer.unrender(o,{attrs:i.attrs,children:i.children}):e(o,i.children,0,!1)),n&&t.removeChild(o)}}(t,a,s,!0)};let eR={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};var eF,ej,eB,eN,eU,eV,eq=class{constructor(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1}};(eY=eV||(eV={})).calc=function(e,t){let r=e.length;if(0===r)return t;let i=0,n=0,a=0,o=0,s=0;for(let t=0;t0&&(o+=r.stretch,s++)}if(t===a)return 0;if(t<=i){for(let t=0;t=n){for(let t=0;t0&&i>.01;){let t=i,n=o;for(let a=0;a0&&i>.01;){let t=i/l;for(let n=0;n0&&i>.01;){let t=i,n=o;for(let a=0;a=r.maxSize?(i-=r.maxSize-r.size,o-=r.stretch,r.size=r.maxSize,r.done=!0,l--,s--):(i-=c,r.size+=c)}}for(;l>0&&i>.01;){let t=i/l;for(let n=0;n=r.maxSize?(i-=r.maxSize-r.size,r.size=r.maxSize,r.done=!0,l--):(i-=t,r.size+=t))}}}return 0},eY.adjust=function(e,t,r){0===e.length||0===r||(r>0?function(e,t,r){let i=0;for(let r=0;r<=t;++r){let t=e[r];i+=t.maxSize-t.size}let n=0;for(let r=t+1,i=e.length;r=0&&a>0;--r){let t=e[r],i=t.maxSize-t.size;i>=a?(t.sizeHint=t.size+a,a=0):(t.sizeHint=t.size+i,a-=i)}let o=r;for(let r=t+1,i=e.length;r0;++r){let t=e[r],i=t.size-t.minSize;i>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-i,o-=i)}}(e,t,r):function(e,t,r){let i=0;for(let r=t+1,n=e.length;r0;++r){let t=e[r],i=t.maxSize-t.size;i>=a?(t.sizeHint=t.size+a,a=0):(t.sizeHint=t.size+i,a-=i)}let o=r;for(let r=t;r>=0&&o>0;--r){let t=e[r],i=t.size-t.minSize;i>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-i,o-=i)}}(e,t,-r))};var eH=class{constructor(e){this._label="",this._caption="",this._mnemonic=-1,this._icon=void 0,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new ea(this),this._isDisposed=!1,this.owner=e.owner,void 0!==e.label&&(this._label=e.label),void 0!==e.mnemonic&&(this._mnemonic=e.mnemonic),void 0!==e.icon&&(this._icon=e.icon),void 0!==e.iconClass&&(this._iconClass=e.iconClass),void 0!==e.iconLabel&&(this._iconLabel=e.iconLabel),void 0!==e.caption&&(this._caption=e.caption),void 0!==e.className&&(this._className=e.className),void 0!==e.closable&&(this._closable=e.closable),this._dataset=e.dataset||{}}get changed(){return this._changed}get label(){return this._label}set label(e){this._label!==e&&(this._label=e,this._changed.emit(void 0))}get mnemonic(){return this._mnemonic}set mnemonic(e){this._mnemonic!==e&&(this._mnemonic=e,this._changed.emit(void 0))}get icon(){return this._icon}set icon(e){this._icon!==e&&(this._icon=e,this._changed.emit(void 0))}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass!==e&&(this._iconClass=e,this._changed.emit(void 0))}get iconLabel(){return this._iconLabel}set iconLabel(e){this._iconLabel!==e&&(this._iconLabel=e,this._changed.emit(void 0))}get caption(){return this._caption}set caption(e){this._caption!==e&&(this._caption=e,this._changed.emit(void 0))}get className(){return this._className}set className(e){this._className!==e&&(this._className=e,this._changed.emit(void 0))}get closable(){return this._closable}set closable(e){this._closable!==e&&(this._closable=e,this._changed.emit(void 0))}get dataset(){return this._dataset}set dataset(e){this._dataset!==e&&(this._dataset=e,this._changed.emit(void 0))}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,ea.clearData(this))}},eG=class e{constructor(t={}){this._flags=0,this._layout=null,this._parent=null,this._disposed=new ea(this),this._hiddenMode=e.HiddenMode.Display,this.node=eX.createNode(t),this.addClass("lm-Widget")}dispose(){this.isDisposed||(this.setFlag(e.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&&e.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),this.title.dispose(),ea.clearData(this),ee.clearData(this),ei.clearData(this))}get disposed(){return this._disposed}get isDisposed(){return this.testFlag(e.Flag.IsDisposed)}get isAttached(){return this.testFlag(e.Flag.IsAttached)}get isHidden(){return this.testFlag(e.Flag.IsHidden)}get isVisible(){return this.testFlag(e.Flag.IsVisible)}get title(){return eX.titleProperty.get(this)}get id(){return this.node.id}set id(e){this.node.id=e}get dataset(){return this.node.dataset}get hiddenMode(){return this._hiddenMode}set hiddenMode(t){this._hiddenMode!==t&&(this.isHidden&&this._toggleHidden(!1),t==e.HiddenMode.Scale?this.node.style.willChange="transform":this.node.style.willChange="auto",this._hiddenMode=t,this.isHidden&&this._toggleHidden(!0))}get parent(){return this._parent}set parent(t){if(this._parent!==t){if(t&&this.contains(t))throw Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){let t=new e.ChildMessage("child-removed",this);ee.sendMessage(this._parent,t)}if(this._parent=t,this._parent&&!this._parent.isDisposed){let t=new e.ChildMessage("child-added",this);ee.sendMessage(this._parent,t)}this.isDisposed||ee.sendMessage(this,e.Msg.ParentChanged)}}get layout(){return this._layout}set layout(t){if(this._layout!==t){if(this.testFlag(e.Flag.DisallowLayout))throw Error("Cannot set widget layout.");if(this._layout)throw Error("Cannot change widget layout.");if(t.parent)throw Error("Cannot change layout parent.");this._layout=t,t.parent=this}}*children(){this._layout&&(yield*this._layout)}contains(e){for(let t=e;t;t=t._parent)if(t===this)return!0;return!1}hasClass(e){return this.node.classList.contains(e)}addClass(e){this.node.classList.add(e)}removeClass(e){this.node.classList.remove(e)}toggleClass(e,t){return!0===t?(this.node.classList.add(e),!0):!1===t?(this.node.classList.remove(e),!1):this.node.classList.toggle(e)}update(){ee.postMessage(this,e.Msg.UpdateRequest)}fit(){ee.postMessage(this,e.Msg.FitRequest)}activate(){ee.postMessage(this,e.Msg.ActivateRequest)}close(){ee.sendMessage(this,e.Msg.CloseRequest)}show(){if(this.testFlag(e.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&ee.sendMessage(this,e.Msg.BeforeShow),this.clearFlag(e.Flag.IsHidden),this._toggleHidden(!1),this.isAttached&&(!this.parent||this.parent.isVisible)&&ee.sendMessage(this,e.Msg.AfterShow),this.parent)){let t=new e.ChildMessage("child-shown",this);ee.sendMessage(this.parent,t)}}hide(){if(!this.testFlag(e.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&ee.sendMessage(this,e.Msg.BeforeHide),this.setFlag(e.Flag.IsHidden),this._toggleHidden(!0),this.isAttached&&(!this.parent||this.parent.isVisible)&&ee.sendMessage(this,e.Msg.AfterHide),this.parent)){let t=new e.ChildMessage("child-hidden",this);ee.sendMessage(this.parent,t)}}setHidden(e){e?this.hide():this.show()}testFlag(e){return(this._flags&e)!=0}setFlag(e){this._flags|=e}clearFlag(e){this._flags&=~e}processMessage(t){switch(t.type){case"resize":this.notifyLayout(t),this.onResize(t);break;case"update-request":this.notifyLayout(t),this.onUpdateRequest(t);break;case"fit-request":this.notifyLayout(t),this.onFitRequest(t);break;case"before-show":this.notifyLayout(t),this.onBeforeShow(t);break;case"after-show":this.setFlag(e.Flag.IsVisible),this.notifyLayout(t),this.onAfterShow(t);break;case"before-hide":this.notifyLayout(t),this.onBeforeHide(t);break;case"after-hide":this.clearFlag(e.Flag.IsVisible),this.notifyLayout(t),this.onAfterHide(t);break;case"before-attach":this.notifyLayout(t),this.onBeforeAttach(t);break;case"after-attach":this.isHidden||this.parent&&!this.parent.isVisible||this.setFlag(e.Flag.IsVisible),this.setFlag(e.Flag.IsAttached),this.notifyLayout(t),this.onAfterAttach(t);break;case"before-detach":this.notifyLayout(t),this.onBeforeDetach(t);break;case"after-detach":this.clearFlag(e.Flag.IsVisible),this.clearFlag(e.Flag.IsAttached),this.notifyLayout(t),this.onAfterDetach(t);break;case"activate-request":this.notifyLayout(t),this.onActivateRequest(t);break;case"close-request":this.notifyLayout(t),this.onCloseRequest(t);break;case"child-added":this.notifyLayout(t),this.onChildAdded(t);break;case"child-removed":this.notifyLayout(t),this.onChildRemoved(t);break;default:this.notifyLayout(t)}}notifyLayout(e){this._layout&&this._layout.processParentMessage(e)}onCloseRequest(t){this.parent?this.parent=null:this.isAttached&&e.detach(this)}onResize(e){}onUpdateRequest(e){}onFitRequest(e){}onActivateRequest(e){}onBeforeShow(e){}onAfterShow(e){}onBeforeHide(e){}onAfterHide(e){}onBeforeAttach(e){}onAfterAttach(e){}onBeforeDetach(e){}onAfterDetach(e){}onChildAdded(e){}onChildRemoved(e){}_toggleHidden(t){if(t)switch(this._hiddenMode){case e.HiddenMode.Display:this.addClass("lm-mod-hidden");break;case e.HiddenMode.Scale:this.node.style.transform="scale(0)",this.node.setAttribute("aria-hidden","true");break;case e.HiddenMode.ContentVisibility:this.node.style.contentVisibility="hidden",this.node.style.zIndex="-1"}else switch(this._hiddenMode){case e.HiddenMode.Display:this.removeClass("lm-mod-hidden");break;case e.HiddenMode.Scale:this.node.style.transform="",this.node.removeAttribute("aria-hidden");break;case e.HiddenMode.ContentVisibility:this.node.style.contentVisibility="",this.node.style.zIndex=""}}};!function(e){var t,r,i,n;(t=e.HiddenMode||(e.HiddenMode={}))[t.Display=0]="Display",t[t.Scale=1]="Scale",t[t.ContentVisibility=2]="ContentVisibility",(r=e.Flag||(e.Flag={}))[r.IsDisposed=1]="IsDisposed",r[r.IsAttached=2]="IsAttached",r[r.IsHidden=4]="IsHidden",r[r.IsVisible=8]="IsVisible",r[r.DisallowLayout=16]="DisallowLayout",(i=e.Msg||(e.Msg={})).BeforeShow=new et("before-show"),i.AfterShow=new et("after-show"),i.BeforeHide=new et("before-hide"),i.AfterHide=new et("after-hide"),i.BeforeAttach=new et("before-attach"),i.AfterAttach=new et("after-attach"),i.BeforeDetach=new et("before-detach"),i.AfterDetach=new et("after-detach"),i.ParentChanged=new et("parent-changed"),i.UpdateRequest=new er("update-request"),i.FitRequest=new er("fit-request"),i.ActivateRequest=new er("activate-request"),i.CloseRequest=new er("close-request"),e.ChildMessage=class extends et{constructor(e,t){super(e),this.child=t}};class a extends et{constructor(e,t){super("resize"),this.width=e,this.height=t}}e.ResizeMessage=a,(n=a=e.ResizeMessage||(e.ResizeMessage={})).UnknownSize=new n(-1,-1),e.attach=function(t,r,i=null){if(t.parent)throw Error("Cannot attach a child widget.");if(t.isAttached||t.node.isConnected)throw Error("Widget is already attached.");if(!r.isConnected)throw Error("Host is not attached.");ee.sendMessage(t,e.Msg.BeforeAttach),r.insertBefore(t.node,i),ee.sendMessage(t,e.Msg.AfterAttach)},e.detach=function(t){if(t.parent)throw Error("Cannot detach a child widget.");if(!t.isAttached||!t.node.isConnected)throw Error("Widget is not attached.");ee.sendMessage(t,e.Msg.BeforeDetach),t.node.parentNode.removeChild(t.node),ee.sendMessage(t,e.Msg.AfterDetach)}}(eG||(eG={})),(eZ=eX||(eX={})).titleProperty=new ei({name:"title",create:e=>new eH({owner:e})}),eZ.createNode=function(e){return e.node||document.createElement(e.tag||"div")};var eW=class{constructor(e={}){this._disposed=!1,this._parent=null,this._fitPolicy=e.fitPolicy||"set-min-size"}dispose(){this._parent=null,this._disposed=!0,ea.clearData(this),ei.clearData(this)}get isDisposed(){return this._disposed}get parent(){return this._parent}set parent(e){if(this._parent!==e){if(this._parent)throw Error("Cannot change parent widget.");if(e.layout!==this)throw Error("Invalid parent widget.");this._parent=e,this.init()}}get fitPolicy(){return this._fitPolicy}set fitPolicy(e){if(this._fitPolicy!==e&&(this._fitPolicy=e,this._parent)){let e=this._parent.node.style;e.minWidth="",e.minHeight="",e.maxWidth="",e.maxHeight="",this._parent.fit()}}processParentMessage(e){switch(e.type){case"resize":this.onResize(e);break;case"update-request":this.onUpdateRequest(e);break;case"fit-request":this.onFitRequest(e);break;case"before-show":this.onBeforeShow(e);break;case"after-show":this.onAfterShow(e);break;case"before-hide":this.onBeforeHide(e);break;case"after-hide":this.onAfterHide(e);break;case"before-attach":this.onBeforeAttach(e);break;case"after-attach":this.onAfterAttach(e);break;case"before-detach":this.onBeforeDetach(e);break;case"after-detach":this.onAfterDetach(e);break;case"child-removed":this.onChildRemoved(e);break;case"child-shown":this.onChildShown(e);break;case"child-hidden":this.onChildHidden(e)}}init(){for(let e of this)e.parent=this.parent}onResize(e){for(let e of this)ee.sendMessage(e,eG.ResizeMessage.UnknownSize)}onUpdateRequest(e){for(let e of this)ee.sendMessage(e,eG.ResizeMessage.UnknownSize)}onBeforeAttach(e){for(let t of this)ee.sendMessage(t,e)}onAfterAttach(e){for(let t of this)ee.sendMessage(t,e)}onBeforeDetach(e){for(let t of this)ee.sendMessage(t,e)}onAfterDetach(e){for(let t of this)ee.sendMessage(t,e)}onBeforeShow(e){for(let t of this)t.isHidden||ee.sendMessage(t,e)}onAfterShow(e){for(let t of this)t.isHidden||ee.sendMessage(t,e)}onBeforeHide(e){for(let t of this)t.isHidden||ee.sendMessage(t,e)}onAfterHide(e){for(let t of this)t.isHidden||ee.sendMessage(t,e)}onChildRemoved(e){this.removeWidget(e.child)}onFitRequest(e){}onChildShown(e){}onChildHidden(e){}};(e$=eW||(eW={})).getHorizontalAlignment=function(e){return eK.horizontalAlignmentProperty.get(e)},e$.setHorizontalAlignment=function(e,t){eK.horizontalAlignmentProperty.set(e,t)},e$.getVerticalAlignment=function(e){return eK.verticalAlignmentProperty.get(e)},e$.setVerticalAlignment=function(e,t){eK.verticalAlignmentProperty.set(e,t)};var eY,eZ,e$,eX,eK,eJ=class{constructor(e){this._top=NaN,this._left=NaN,this._width=NaN,this._height=NaN,this._minWidth=0,this._minHeight=0,this._maxWidth=1/0,this._maxHeight=1/0,this._disposed=!1,this.widget=e,this.widget.node.style.position="absolute",this.widget.node.style.contain="strict"}dispose(){if(this._disposed)return;this._disposed=!0;let e=this.widget.node.style;e.position="",e.top="",e.left="",e.width="",e.height="",e.contain=""}get minWidth(){return this._minWidth}get minHeight(){return this._minHeight}get maxWidth(){return this._maxWidth}get maxHeight(){return this._maxHeight}get isDisposed(){return this._disposed}get isHidden(){return this.widget.isHidden}get isVisible(){return this.widget.isVisible}get isAttached(){return this.widget.isAttached}fit(){let e=$.sizeLimits(this.widget.node);this._minWidth=e.minWidth,this._minHeight=e.minHeight,this._maxWidth=e.maxWidth,this._maxHeight=e.maxHeight}update(e,t,r,i){let n=Math.max(this._minWidth,Math.min(r,this._maxWidth)),a=Math.max(this._minHeight,Math.min(i,this._maxHeight));if(n"center",changed:e0}),eQ.verticalAlignmentProperty=new ei({name:"verticalAlignment",create:()=>"top",changed:e0});var e1,e2=class extends eW{constructor(){super(...arguments),this._widgets=[]}dispose(){for(;this._widgets.length>0;)this._widgets.pop().dispose();super.dispose()}get widgets(){return this._widgets}*[Symbol.iterator](){yield*this._widgets}addWidget(e){this.insertWidget(this._widgets.length,e)}insertWidget(e,t){t.parent=this.parent;let r=this._widgets.indexOf(t),i=Math.max(0,Math.min(e,this._widgets.length));if(-1===r){B.ArrayExt.insert(this._widgets,i,t),this.parent&&this.attachWidget(i,t);return}i===this._widgets.length&&i--,r!==i&&(B.ArrayExt.move(this._widgets,r,i),this.parent&&this.moveWidget(r,i,t))}removeWidget(e){this.removeWidgetAt(this._widgets.indexOf(e))}removeWidgetAt(e){let t=B.ArrayExt.removeAt(this._widgets,e);t&&this.parent&&this.detachWidget(e,t)}init(){super.init();let e=0;for(let t of this)this.attachWidget(e++,t)}attachWidget(e,t){let r=this.parent.node.children[e];this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeAttach),this.parent.node.insertBefore(t.node,r),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterAttach)}moveWidget(e,t,r){this.parent.isAttached&&ee.sendMessage(r,eG.Msg.BeforeDetach),this.parent.node.removeChild(r.node),this.parent.isAttached&&ee.sendMessage(r,eG.Msg.AfterDetach);let i=this.parent.node.children[t];this.parent.isAttached&&ee.sendMessage(r,eG.Msg.BeforeAttach),this.parent.node.insertBefore(r.node,i),this.parent.isAttached&&ee.sendMessage(r,eG.Msg.AfterAttach)}detachWidget(e,t){this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterDetach)}};(e1||(e1={})).clampDimension=function(e){return Math.max(0,Math.floor(e))};var e3=e1,e5=class e extends e2{constructor(e){super(),this.widgetOffset=0,this._fixed=0,this._spacing=4,this._dirty=!1,this._hasNormedSizes=!1,this._sizers=[],this._items=[],this._handles=[],this._box=null,this._alignment="start",this._orientation="horizontal",this.renderer=e.renderer,void 0!==e.orientation&&(this._orientation=e.orientation),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=e1.clampDimension(e.spacing))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,super.dispose()}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this.parent&&(this.parent.dataset.orientation=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=e1.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get handles(){return this._handles}absoluteSizes(){return this._sizers.map(e=>e.size)}relativeSizes(){return e8.normalize(this._sizers.map(e=>e.size))}setRelativeSizes(e,t=!0){let r=this._sizers.length,i=e.slice(0,r);for(;i.length0&&(e.sizeHint=e.size);eV.adjust(this._sizers,e,r),this.parent&&this.parent.update()}}init(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){let r=new eJ(t),i=e8.createHandle(this.renderer),n=e8.averageSize(this._sizers),a=e8.createSizer(n);B.ArrayExt.insert(this._items,e,r),B.ArrayExt.insert(this._sizers,e,a),B.ArrayExt.insert(this._handles,e,i),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.node.appendChild(i),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){B.ArrayExt.move(this._items,e,t),B.ArrayExt.move(this._sizers,e,t),B.ArrayExt.move(this._handles,e,t),this.parent.fit()}detachWidget(e,t){let r=B.ArrayExt.removeAt(this._items,e),i=B.ArrayExt.removeAt(this._handles,e);B.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.node.removeChild(i),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterDetach),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}updateItemPosition(e,t,r,i,n,a,o){let s=this._items[e];if(s.isHidden)return;let l=this._handles[e].style;t?(r+=this.widgetOffset,s.update(r,i,o,n),r+=o,l.top=`${i}px`,l.left=`${r}px`,l.width=`${this._spacing}px`,l.height=`${n}px`):(i+=this.widgetOffset,s.update(r,i,a,o),i+=o,l.top=`${i}px`,l.left=`${r}px`,l.width=`${a}px`,l.height=`${this._spacing}px`)}_fit(){let t=0,r=-1;for(let e=0,i=this._items.length;e0&&(o.sizeHint=o.size),r.isHidden){o.minSize=0,o.maxSize=0;continue}r.fit(),o.stretch=e.getStretch(r.widget),i?(o.minSize=r.minWidth,o.maxSize=r.maxWidth,n+=r.minWidth,a=Math.max(a,r.minHeight)):(o.minSize=r.minHeight,o.maxSize=r.maxHeight,a+=r.minHeight,n=Math.max(n,r.minWidth))}let o=this._box=$.boxSizing(this.parent.node);n+=o.horizontalSum,a+=o.verticalSum;let s=this.parent.node.style;s.minWidth=`${n}px`,s.minHeight=`${a}px`,this._dirty=!0,this.parent.parent&&ee.sendMessage(this.parent.parent,eG.Msg.FitRequest),this._dirty&&ee.sendMessage(this.parent,eG.Msg.UpdateRequest)}_update(e,t){this._dirty=!1;let r=0;for(let e=0,t=this._items.length;e0){let e;if(e=c?Math.max(0,a-this._fixed):Math.max(0,o-this._fixed),this._hasNormedSizes){for(let t of this._sizers)t.sizeHint*=e;this._hasNormedSizes=!1}let t=eV.calc(this._sizers,e);if(t>0)switch(this._alignment){case"start":break;case"center":s=0,l=t/2;break;case"end":s=0,l=t;break;case"justify":s=t/r,l=0;break;default:throw"unreachable"}}for(let e=0,t=this._items.length;e0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:function(e){e.parent&&e.parent.layout instanceof e5&&e.parent.fit()}}),e6.createSizer=function(e){let t=new eq;return t.sizeHint=Math.floor(e),t},e6.createHandle=function(e){let t=e.createHandle();return t.style.position="absolute",t.style.contain="style",t},e6.averageSize=function(e){return e.reduce((e,t)=>e+t.size,0)/e.length||0},e6.normalize=function(e){let t=e.length;if(0===t)return[];let r=e.reduce((e,t)=>e+Math.abs(t),0);return 0===r?e.map(e=>1/t):e.map(e=>e/r)};var e4,e6,e8,e7,e9=class extends e5{constructor(e){super({...e,orientation:e.orientation||"vertical"}),this._titles=[],this.titleSpace=e.titleSpace||22}get titleSpace(){return this.widgetOffset}set titleSpace(e){e=e3.clampDimension(e),this.widgetOffset!==e&&(this.widgetOffset=e,this.parent&&this.parent.fit())}get titles(){return this._titles}dispose(){this.isDisposed||(this._titles.length=0,super.dispose())}updateTitle(e,t){let r=this._titles[e],i=r.classList.contains("lm-mod-expanded"),n=e7.createTitle(this.renderer,t.title,i);this._titles[e]=n,this.parent.node.replaceChild(n,r)}insertWidget(e,t){t.id||(t.id=`id-${N.UUID.uuid4()}`),super.insertWidget(e,t)}attachWidget(e,t){let r=e7.createTitle(this.renderer,t.title);B.ArrayExt.insert(this._titles,e,r),this.parent.node.appendChild(r),t.node.setAttribute("role","region"),t.node.setAttribute("aria-labelledby",r.id),super.attachWidget(e,t)}moveWidget(e,t,r){B.ArrayExt.move(this._titles,e,t),super.moveWidget(e,t,r)}detachWidget(e,t){let r=B.ArrayExt.removeAt(this._titles,e);this.parent.node.removeChild(r),super.detachWidget(e,t)}updateItemPosition(e,t,r,i,n,a,o){let s=this._titles[e].style;s.top=`${i}px`,s.left=`${r}px`,s.height=`${this.widgetOffset}px`,t?s.width=`${n}px`:s.width=`${a}px`,super.updateItemPosition(e,t,r,i,n,a,o)}};(e7||(e7={})).createTitle=function(e,t,r=!0){let i=e.createSectionTitle(t);return i.style.position="absolute",i.style.contain="strict",i.setAttribute("aria-label",`${t.label} Section`),i.setAttribute("aria-expanded",r?"true":"false"),i.setAttribute("aria-controls",t.owner.id),r&&i.classList.add("lm-mod-expanded"),i};var te,tt=class extends eG{constructor(e={}){super(),this.addClass("lm-Panel"),this.layout=te.createLayout(e)}get widgets(){return this.layout.widgets}addWidget(e){this.layout.addWidget(e)}insertWidget(e,t){this.layout.insertWidget(e,t)}};(te||(te={})).createLayout=function(e){return e.layout||new e2};var tr=class extends tt{constructor(e={}){super({layout:tP.createLayout(e)}),this._handleMoved=new ea(this),this._pressData=null,this.addClass("lm-SplitPanel")}dispose(){this._releaseMouse(),super.dispose()}get orientation(){return this.layout.orientation}set orientation(e){this.layout.orientation=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get renderer(){return this.layout.renderer}get handleMoved(){return this._handleMoved}get handles(){return this.layout.handles}relativeSizes(){return this.layout.relativeSizes()}setRelativeSizes(e,t=!0){this.layout.setRelativeSizes(e,t)}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(e){e.child.addClass("lm-SplitPanel-child"),this._releaseMouse()}onChildRemoved(e){e.child.removeClass("lm-SplitPanel-child"),this._releaseMouse()}_evtKeyDown(e){this._pressData&&(e.preventDefault(),e.stopPropagation()),27===e.keyCode&&this._releaseMouse()}_evtPointerDown(e){if(0!==e.button)return;let t=this.layout,r=B.ArrayExt.findFirstIndex(t.handles,t=>t.contains(e.target));if(-1===r)return;e.preventDefault(),e.stopPropagation(),document.addEventListener("pointerup",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0);let i,n=t.handles[r],a=n.getBoundingClientRect();i="horizontal"===t.orientation?e.clientX-a.left:e.clientY-a.top;let o=window.getComputedStyle(n),s=ec.overrideCursor(o.cursor);this._pressData={index:r,delta:i,override:s}}_evtPointerMove(e){e.preventDefault(),e.stopPropagation();let t,r=this.layout,i=this.node.getBoundingClientRect();t="horizontal"===r.orientation?e.clientX-i.left-this._pressData.delta:e.clientY-i.top-this._pressData.delta,r.moveHandle(this._pressData.index,t)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse())}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._handleMoved.emit(),document.removeEventListener("keydown",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("contextmenu",this,!0))}},ti=tr||(tr={});class tn{createHandle(){let e=document.createElement("div");return e.className="lm-SplitPanel-handle",e}}ti.Renderer=tn,ti.defaultRenderer=new tn,ti.getStretch=function(e){return e5.getStretch(e)},ti.setStretch=function(e,t){e5.setStretch(e,t)},(tP||(tP={})).createLayout=function(e){return e.layout||new e5({renderer:e.renderer||tr.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing})};var ta=class extends tr{constructor(e={}){super({...e,layout:tI.createLayout(e)}),this._widgetSizesCache=new WeakMap,this._expansionToggled=new ea(this),this.addClass("lm-AccordionPanel")}get renderer(){return this.layout.renderer}get titleSpace(){return this.layout.titleSpace}set titleSpace(e){this.layout.titleSpace=e}get titles(){return this.layout.titles}get expansionToggled(){return this._expansionToggled}addWidget(e){super.addWidget(e),e.title.changed.connect(this._onTitleChanged,this)}collapse(e){let t=this.layout.widgets[e];t&&!t.isHidden&&this._toggleExpansion(e)}expand(e){let t=this.layout.widgets[e];t&&t.isHidden&&this._toggleExpansion(e)}insertWidget(e,t){super.insertWidget(e,t),t.title.changed.connect(this._onTitleChanged,this)}handleEvent(e){switch(super.handleEvent(e),e.type){case"click":this._evtClick(e);break;case"keydown":this._eventKeyDown(e)}}onBeforeAttach(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),super.onBeforeAttach(e)}onAfterDetach(e){super.onAfterDetach(e),this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this)}_onTitleChanged(e){let t=B.ArrayExt.findFirstIndex(this.widgets,t=>t.contains(e.owner));t>=0&&(this.layout.updateTitle(t,e.owner),this.update())}_computeWidgetSize(e){let t=this.layout,r=t.widgets[e];if(!r)return;let i=r.isHidden,n=t.absoluteSizes(),a=(i?-1:1)*this.spacing,o=n.reduce((e,t)=>e+t),s=[...n];if(i){let t=this._widgetSizesCache.get(r);if(!t)return;s[e]+=t;let i=s.map(e=>e-t>0).lastIndexOf(!0);-1===i?s.forEach((r,i)=>{i!==e&&(s[i]-=n[i]/o*(t-a))}):s[i]-=t-a}else{let t=n[e];this._widgetSizesCache.set(r,t),s[e]=0;let i=s.map(e=>e>0).lastIndexOf(!0);if(-1===i)return;s[i]=n[i]+t+a}return s.map(e=>e/(o+a))}_evtClick(e){let t=e.target;if(t){let r=B.ArrayExt.findFirstIndex(this.titles,e=>e.contains(t));r>=0&&(e.preventDefault(),e.stopPropagation(),this._toggleExpansion(r))}}_eventKeyDown(e){if(e.defaultPrevented)return;let t=e.target,r=!1;if(t){let i=B.ArrayExt.findFirstIndex(this.titles,e=>e.contains(t));if(i>=0){let n=e.keyCode.toString();if(e.key.match(/Space|Enter/)||n.match(/13|32/))t.click(),r=!0;else if("horizontal"===this.orientation?e.key.match(/ArrowLeft|ArrowRight/)||n.match(/37|39/):e.key.match(/ArrowUp|ArrowDown/)||n.match(/38|40/)){let t=e.key.match(/ArrowLeft|ArrowUp/)||n.match(/37|38/)?-1:1,a=this.titles.length;this.titles[(i+a+t)%a].focus(),r=!0}else"End"===e.key||"35"===n?(this.titles[this.titles.length-1].focus(),r=!0):("Home"===e.key||"36"===n)&&(this.titles[0].focus(),r=!0)}r&&e.preventDefault()}}_toggleExpansion(e){let t=this.titles[e],r=this.layout.widgets[e],i=this._computeWidgetSize(e);i&&this.setRelativeSizes(i,!1),r.isHidden?(t.classList.add("lm-mod-expanded"),t.setAttribute("aria-expanded","true"),r.show()):(t.classList.remove("lm-mod-expanded"),t.setAttribute("aria-expanded","false"),r.hide()),this._expansionToggled.emit(e)}},to=ta||(ta={});class ts extends tr.Renderer{constructor(){super(),this.titleClassName="lm-AccordionPanel-title",this._titleID=0,this._titleKeys=new WeakMap,this._uuid=++ts._nInstance}createCollapseIcon(e){return document.createElement("span")}createSectionTitle(e){let t=document.createElement("h3");for(let r in t.setAttribute("tabindex","0"),t.id=this.createTitleKey(e),t.className=this.titleClassName,e.dataset)t.dataset[r]=e.dataset[r];t.appendChild(this.createCollapseIcon(e)).className="lm-AccordionPanel-titleCollapser";let r=t.appendChild(document.createElement("span"));return r.className="lm-AccordionPanel-titleLabel",r.textContent=e.label,r.title=e.caption||e.label,t}createTitleKey(e){let t=this._titleKeys.get(e);return void 0===t&&(t=`title-key-${this._uuid}-${this._titleID++}`,this._titleKeys.set(e,t)),t}}ts._nInstance=0,to.Renderer=ts,to.defaultRenderer=new ts,(tI||(tI={})).createLayout=function(e){return e.layout||new e9({renderer:e.renderer||ta.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing,titleSpace:e.titleSpace})};var tl=class e extends e2{constructor(e={}){super(),this._fixed=0,this._spacing=4,this._dirty=!1,this._sizers=[],this._items=[],this._box=null,this._alignment="start",this._direction="top-to-bottom",void 0!==e.direction&&(this._direction=e.direction),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=e3.clampDimension(e.spacing))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,super.dispose()}get direction(){return this._direction}set direction(e){this._direction!==e&&(this._direction=e,this.parent&&(this.parent.dataset.direction=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=e3.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}init(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){B.ArrayExt.insert(this._items,e,new eJ(t)),B.ArrayExt.insert(this._sizers,e,new eq),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){B.ArrayExt.move(this._items,e,t),B.ArrayExt.move(this._sizers,e,t),this.parent.update()}detachWidget(e,t){let r=B.ArrayExt.removeAt(this._items,e);B.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterDetach),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let t=0;for(let e=0,r=this._items.length;e0)switch(this._alignment){case"start":break;case"center":l=0,c=s/2;break;case"end":l=0,c=s;break;case"justify":l=s/r,c=0;break;default:throw"unreachable"}for(let e=0,t=this._items.length;e0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:tu}),tc.sizeBasisProperty=new ei({name:"sizeBasis",create:()=>0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:tu}),tc.isHorizontal=function(e){return"left-to-right"===e||"right-to-left"===e},tc.clampSpacing=function(e){return Math.max(0,Math.floor(e))};var th=class extends tt{constructor(e={}){super({layout:tD.createLayout(e)}),this.addClass("lm-BoxPanel")}get direction(){return this.layout.direction}set direction(e){this.layout.direction=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}onChildAdded(e){e.child.addClass("lm-BoxPanel-child")}onChildRemoved(e){e.child.removeClass("lm-BoxPanel-child")}};(tC=th||(th={})).getStretch=function(e){return tl.getStretch(e)},tC.setStretch=function(e,t){tl.setStretch(e,t)},tC.getSizeBasis=function(e){return tl.getSizeBasis(e)},tC.setSizeBasis=function(e,t){tl.setSizeBasis(e,t)},(tD||(tD={})).createLayout=function(e){return e.layout||new tl(e)};var td=class e extends eG{constructor(t){super({node:tO.createNode()}),this._activeIndex=-1,this._items=[],this._results=null,this.addClass("lm-CommandPalette"),this.setFlag(eG.Flag.DisallowLayout),this.commands=t.commands,this.renderer=t.renderer||e.defaultRenderer,this.commands.commandChanged.connect(this._onGenericChange,this),this.commands.keyBindingChanged.connect(this._onGenericChange,this)}dispose(){this._items.length=0,this._results=null,super.dispose()}get searchNode(){return this.node.getElementsByClassName("lm-CommandPalette-search")[0]}get inputNode(){return this.node.getElementsByClassName("lm-CommandPalette-input")[0]}get contentNode(){return this.node.getElementsByClassName("lm-CommandPalette-content")[0]}get items(){return this._items}addItem(e){let t=tO.createItem(this.commands,e);return this._items.push(t),this.refresh(),t}addItems(e){let t=e.map(e=>tO.createItem(this.commands,e));return t.forEach(e=>this._items.push(e)),this.refresh(),t}removeItem(e){this.removeItemAt(this._items.indexOf(e))}removeItemAt(e){B.ArrayExt.removeAt(this._items,e)&&this.refresh()}clearItems(){0!==this._items.length&&(this._items.length=0,this.refresh())}refresh(){(this._results=null,""!==this.inputNode.value)?this.node.getElementsByClassName("lm-close-icon")[0].style.display="inherit":this.node.getElementsByClassName("lm-close-icon")[0].style.display="none",this.update()}handleEvent(e){switch(e.type){case"click":this._evtClick(e);break;case"keydown":this._evtKeyDown(e);break;case"input":this.refresh();break;case"focus":case"blur":this._toggleFocused()}}onBeforeAttach(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),this.node.addEventListener("input",this),this.node.addEventListener("focus",this,!0),this.node.addEventListener("blur",this,!0)}onAfterDetach(e){this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this),this.node.removeEventListener("input",this),this.node.removeEventListener("focus",this,!0),this.node.removeEventListener("blur",this,!0)}onAfterShow(e){this.update(),super.onAfterShow(e)}onActivateRequest(e){if(this.isAttached){let e=this.inputNode;e.focus(),e.select()}}onUpdateRequest(e){if(this.isHidden)return;let t=this.inputNode.value,r=this.contentNode,i=this._results;if(i||(i=this._results=tO.search(this._items,t),this._activeIndex=t?B.ArrayExt.findFirstIndex(i,tO.canActivate):-1),!t&&0===i.length)return void eN.render(null,r);if(t&&0===i.length){let e=this.renderer.renderEmptyMessage({query:t});eN.render(e,r);return}let n=this.renderer,a=this._activeIndex,o=Array(i.length);for(let e=0,t=i.length;e=i.length)r.scrollTop=0;else{let e=r.children[a];$.scrollIntoViewIfNeeded(r,e)}}_evtClick(e){if(0!==e.button)return;if(e.target.classList.contains("lm-close-icon")){this.inputNode.value="",this.refresh();return}let t=B.ArrayExt.findFirstIndex(this.contentNode.children,t=>t.contains(e.target));-1!==t&&(e.preventDefault(),e.stopPropagation(),this._execute(t))}_evtKeyDown(e){if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey))switch(e.keyCode){case 13:e.preventDefault(),e.stopPropagation(),this._execute(this._activeIndex);break;case 38:e.preventDefault(),e.stopPropagation(),this._activatePreviousItem();break;case 40:e.preventDefault(),e.stopPropagation(),this._activateNextItem()}}_activateNextItem(){if(!this._results||0===this._results.length)return;let e=this._activeIndex,t=this._results.length,r=ee-t),u=o.slice(0,c),h=o.slice(c);for(let e=0,t=h.length;er.command===e&&N.JSONExt.deepEqual(r.args,t))||null}}var tv=class e extends eG{constructor(t){super({node:tR.createNode()}),this._childIndex=-1,this._activeIndex=-1,this._openTimerID=0,this._closeTimerID=0,this._items=[],this._childMenu=null,this._parentMenu=null,this._aboutToClose=new ea(this),this._menuRequested=new ea(this),this.addClass("lm-Menu"),this.setFlag(eG.Flag.DisallowLayout),this.commands=t.commands,this.renderer=t.renderer||e.defaultRenderer}dispose(){this.close(),this._items.length=0,super.dispose()}get aboutToClose(){return this._aboutToClose}get menuRequested(){return this._menuRequested}get parentMenu(){return this._parentMenu}get childMenu(){return this._childMenu}get rootMenu(){let e=this;for(;e._parentMenu;)e=e._parentMenu;return e}get leafMenu(){let e=this;for(;e._childMenu;)e=e._childMenu;return e}get contentNode(){return this.node.getElementsByClassName("lm-Menu-content")[0]}get activeItem(){return this._items[this._activeIndex]||null}set activeItem(e){this.activeIndex=e?this._items.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._items.length)&&(e=-1),-1===e||tR.canActivate(this._items[e])||(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())}get items(){return this._items}activateNextItem(){let e=this._items.length,t=this._activeIndex,r=t{this.activeIndex=e}})}eN.render(a,this.contentNode)}onCloseRequest(e){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;let t=this._childMenu;t&&(this._childIndex=-1,this._childMenu=null,t._parentMenu=null,t.close());let r=this._parentMenu;r&&(this._parentMenu=null,r._childIndex=-1,r._childMenu=null,r.activate()),this.isAttached&&this._aboutToClose.emit(void 0),super.onCloseRequest(e)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation();let t=e.keyCode;if(13===t)return void this.triggerActiveItem();if(27===t)return void this.close();if(37===t)return void(this._parentMenu?this.close():this._menuRequested.emit("previous"));if(38===t)return void this.activatePreviousItem();if(39===t){let e=this.activeItem;e&&"submenu"===e.type?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next");return}if(40===t)return void this.activateNextItem();let r=ep().keyForKeydownEvent(e);if(!r)return;let i=this._activeIndex+1,n=tR.findMnemonic(this._items,r,i);-1===n.index||n.multiple?-1!==n.index?this.activeIndex=n.index:-1!==n.auto&&(this.activeIndex=n.auto):(this.activeIndex=n.index,this.triggerActiveItem())}_evtMouseUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this.triggerActiveItem())}_evtMouseMove(e){let t=B.ArrayExt.findFirstIndex(this.contentNode.children,t=>$.hitTest(t,e.clientX,e.clientY));if(t===this._activeIndex)return;if(this.activeIndex=t,(t=this.activeIndex)===this._childIndex){this._cancelOpenTimer(),this._cancelCloseTimer();return}-1!==this._childIndex&&this._startCloseTimer(),this._cancelOpenTimer();let r=this.activeItem;r&&"submenu"===r.type&&r.submenu&&this._startOpenTimer()}_evtMouseEnter(e){for(let e=this._parentMenu;e;e=e._parentMenu)e._cancelOpenTimer(),e._cancelCloseTimer(),e.activeIndex=e._childIndex}_evtMouseLeave(e){if(this._cancelOpenTimer(),!this._childMenu){this.activeIndex=-1;return}let{clientX:t,clientY:r}=e;$.hitTest(this._childMenu.node,t,r)?this._cancelCloseTimer():(this.activeIndex=-1,this._startCloseTimer())}_evtMouseDown(e){this._parentMenu||(tR.hitTestMenus(this,e.clientX,e.clientY)?(e.preventDefault(),e.stopPropagation()):this.close())}_openChildMenu(t=!1){let r=this.activeItem;if(!r||"submenu"!==r.type||!r.submenu)return void this._closeChildMenu();let i=r.submenu;if(i===this._childMenu)return;e.saveWindowData(),this._closeChildMenu(),this._childMenu=i,this._childIndex=this._activeIndex,i._parentMenu=this,ee.sendMessage(this,eG.Msg.UpdateRequest);let n=this.contentNode.children[this._activeIndex];tR.openSubmenu(i,n),t&&(i.activeIndex=-1,i.activateNextItem()),i.activate()}_closeChildMenu(){this._childMenu&&this._childMenu.close()}_startOpenTimer(){0===this._openTimerID&&(this._openTimerID=window.setTimeout(()=>{this._openTimerID=0,this._openChildMenu()},tR.TIMER_DELAY))}_startCloseTimer(){0===this._closeTimerID&&(this._closeTimerID=window.setTimeout(()=>{this._closeTimerID=0,this._closeChildMenu()},tR.TIMER_DELAY))}_cancelOpenTimer(){0!==this._openTimerID&&(clearTimeout(this._openTimerID),this._openTimerID=0)}_cancelCloseTimer(){0!==this._closeTimerID&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)}static saveWindowData(){tR.saveWindowData()}},tx=tv||(tv={});class tb{renderItem(e){let t=this.createItemClass(e),r=this.createItemDataset(e),i=this.createItemARIA(e);return ez.li({className:t,dataset:r,tabindex:"0",onfocus:e.onfocus,...i},this.renderIcon(e),this.renderLabel(e),this.renderShortcut(e),this.renderSubmenu(e))}renderIcon(e){let t=this.createIconClass(e);return ez.div({className:t},e.item.icon,e.item.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return ez.div({className:"lm-Menu-itemLabel"},t)}renderShortcut(e){let t=this.formatShortcut(e);return ez.div({className:"lm-Menu-itemShortcut"},t)}renderSubmenu(e){return ez.div({className:"lm-Menu-itemSubmenuIcon"})}createItemClass(e){let t="lm-Menu-item";e.item.isEnabled||(t+=" lm-mod-disabled"),e.item.isToggled&&(t+=" lm-mod-toggled"),e.item.isVisible||(t+=" lm-mod-hidden"),e.active&&(t+=" lm-mod-active"),e.collapsed&&(t+=" lm-mod-collapsed");let r=e.item.className;return r&&(t+=` ${r}`),t}createItemDataset(e){let{type:t,command:r,dataset:i}=e.item;return"command"===t?{...i,type:t,command:r}:{...i,type:t}}createIconClass(e){let t="lm-Menu-itemIcon",r=e.item.iconClass;return r?`${t} ${r}`:t}createItemARIA(e){let t={};switch(e.item.type){case"separator":t.role="presentation";break;case"submenu":t["aria-haspopup"]="true",e.item.isEnabled||(t["aria-disabled"]="true");break;default:e.item.isEnabled||(t["aria-disabled"]="true"),t.role="menuitem"}return t}formatLabel(e){let{label:t,mnemonic:r}=e.item;if(r<0||r>=t.length)return t;let i=t.slice(0,r),n=t.slice(r+1),a=t[r];return[i,ez.span({className:"lm-Menu-itemMnemonic"},a),n]}formatShortcut(e){let t=e.item.keyBinding;return t?eA.formatKeystroke(t.keys):null}}tx.Renderer=tb,tx.defaultRenderer=new tb,function(e){e.TIMER_DELAY=300,e.SUBMENU_OVERLAP=3;let t=null,r=0;function i(){return r>0?(r--,t):a()}function n(e){return"separator"!==e.type&&e.isEnabled&&e.isVisible}function a(){return{pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,clientWidth:document.documentElement.clientWidth,clientHeight:document.documentElement.clientHeight}}e.saveWindowData=function(){t=a(),r++},e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-Menu-content",e.appendChild(t),t.setAttribute("role","menu"),e.tabIndex=0,e},e.canActivate=n,e.createItem=function(e,t){return new o(e.commands,t)},e.hitTestMenus=function(e,t,r){for(let i=e;i;i=i.childMenu)if($.hitTest(i.node,t,r))return!0;return!1},e.computeCollapsed=function(e){let t=Array(e.length);B.ArrayExt.fill(t,!1);let r=0,i=e.length;for(;r=0;--n){let r=e[n];if(r.isVisible){if("separator"!==r.type)break;t[n]=!0}}let a=!1;for(;++rc+h&&(t=c+h-g),!a&&r+y>u+d&&(r>u+d?r=u+d-y:r-=y),m.transform=`translate(${Math.max(0,t)}px, ${Math.max(0,r)}px`,m.opacity="1"},e.openSubmenu=function(t,r){let n=i(),a=n.pageXOffset,o=n.pageYOffset,s=n.clientWidth,l=n.clientHeight;ee.sendMessage(t,eG.Msg.UpdateRequest);let c=t.node,u=c.style;u.opacity="0",u.maxHeight=`${l}px`,eG.attach(t,document.body);let{width:h,height:d}=c.getBoundingClientRect(),f=$.boxSizing(t.node),p=r.getBoundingClientRect(),m=p.right-e.SUBMENU_OVERLAP;m+h>a+s&&(m=p.left+e.SUBMENU_OVERLAP-h);let g=p.top-f.borderTop-f.paddingTop;g+d>o+l&&(g=p.bottom+f.borderBottom+f.paddingBottom-d),u.transform=`translate(${Math.max(0,m)}px, ${Math.max(0,g)}px`,u.opacity="1"},e.findMnemonic=function(e,t,r){let i=-1,a=-1,o=!1,s=t.toUpperCase();for(let t=0,l=e.length;t=0&&dr.command===e&&N.JSONExt.deepEqual(r.args,t))||null}return null}}}(tR||(tR={}));var t_=tF||(tF={});function tw(e,t){let r=e.rank,i=t.rank;return r!==i?r=this._titles.length)&&(e=-1),this._currentIndex===e)return;let t=this._currentIndex,r=this._titles[t]||null,i=e,n=this._titles[i]||null;this._currentIndex=i,this._previousTitle=r,this.update(),this._currentChanged.emit({previousIndex:t,previousTitle:r,currentIndex:i,currentTitle:n})}get name(){return this._name}set name(e){this._name=e,e?this.contentNode.setAttribute("aria-label",e):this.contentNode.removeAttribute("aria-label")}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._releaseMouse(),this._orientation=e,this.dataset.orientation=e,this.contentNode.setAttribute("aria-orientation",e))}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){this._addButtonEnabled!==e&&(this._addButtonEnabled=e,e?this.addButtonNode.classList.remove("lm-mod-hidden"):this.addButtonNode.classList.add("lm-mod-hidden"))}get titles(){return this._titles}get contentNode(){return this.node.getElementsByClassName("lm-TabBar-content")[0]}get addButtonNode(){return this.node.getElementsByClassName("lm-TabBar-addButton")[0]}addTab(e){return this.insertTab(this._titles.length,e)}insertTab(e,t){this._releaseMouse();let r=tj.asTitle(t),i=this._titles.indexOf(r),n=Math.max(0,Math.min(e,this._titles.length));return -1===i?(B.ArrayExt.insert(this._titles,n,r),r.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(n,r)):(n===this._titles.length&&n--,i===n||(B.ArrayExt.move(this._titles,i,n),this.update(),this._adjustCurrentForMove(i,n))),r}removeTab(e){this.removeTabAt(this._titles.indexOf(e))}removeTabAt(e){this._releaseMouse();let t=B.ArrayExt.removeAt(this._titles,e);t&&(t.changed.disconnect(this._onTitleChanged,this),t===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(e,t))}clearTabs(){if(0===this._titles.length)return;for(let e of(this._releaseMouse(),this._titles))e.changed.disconnect(this._onTitleChanged,this);let e=this.currentIndex,t=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),-1!==e&&this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}releaseMouse(){this._releaseMouse()}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"dblclick":this._evtDblClick(e);break;case"keydown":e.eventPhase===Event.CAPTURING_PHASE?this._evtKeyDownCapturing(e):this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this),this.node.addEventListener("dblclick",this),this.node.addEventListener("keydown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this.node.removeEventListener("dblclick",this),this.node.removeEventListener("keydown",this),this._releaseMouse()}onUpdateRequest(e){var t;let r=this._titles,i=this.renderer,n=this.currentTitle,a=Array(r.length),o=null!=(t=this._getCurrentTabindex())?t:this._currentIndex>-1?this._currentIndex:0;for(let e=0,t=r.length;e$.hitTest(t,e.clientX,e.clientY));if(-1===r)return;let i=this.titles[r],n=t[r].querySelector(".lm-TabBar-tabLabel");if(n&&n.contains(e.target)){let e=i.label||"",t=n.innerHTML;n.innerHTML="";let r=document.createElement("input");r.classList.add("lm-TabBar-tabInput"),r.value=e,n.appendChild(r);let a=()=>{r.removeEventListener("blur",a),n.innerHTML=t,this.node.addEventListener("keydown",this)};r.addEventListener("dblclick",e=>e.stopPropagation()),r.addEventListener("blur",a),r.addEventListener("keydown",e=>{"Enter"===e.key?(""!==r.value&&(i.label=i.caption=r.value),a()):"Escape"===e.key&&a()}),this.node.removeEventListener("keydown",this),r.select(),r.focus(),n.children.length>0&&n.children[0].focus()}}_evtKeyDownCapturing(e){e.eventPhase===Event.CAPTURING_PHASE&&(e.preventDefault(),e.stopPropagation(),"Escape"===e.key&&this._releaseMouse())}_evtKeyDown(e){var t,r,i;if("Tab"!==e.key&&e.eventPhase!==Event.CAPTURING_PHASE){if("Enter"===e.key||"Spacebar"===e.key||" "===e.key){let t=document.activeElement;if(this.addButtonEnabled&&this.addButtonNode.contains(t))e.preventDefault(),e.stopPropagation(),this._addRequested.emit();else{let r=B.ArrayExt.findFirstIndex(this.contentNode.children,e=>e.contains(t));r>=0&&(e.preventDefault(),e.stopPropagation(),this.currentIndex=r)}}else if(tM.includes(e.key)){let n,a=[...this.contentNode.children];if(this.addButtonEnabled&&a.push(this.addButtonNode),a.length<=1)return;e.preventDefault(),e.stopPropagation();let o=a.indexOf(document.activeElement);-1===o&&(o=this._currentIndex),"ArrowRight"===e.key&&"horizontal"===this._orientation||"ArrowDown"===e.key&&"vertical"===this._orientation?n=null!=(t=a[o+1])?t:a[0]:"ArrowLeft"===e.key&&"horizontal"===this._orientation||"ArrowUp"===e.key&&"vertical"===this._orientation?n=null!=(r=a[o-1])?r:a[a.length-1]:"Home"===e.key?n=a[0]:"End"===e.key&&(n=a[a.length-1]),n&&(null==(i=a[o])||i.setAttribute("tabindex","-1"),n?.setAttribute("tabindex","0"),n.focus())}}}_evtPointerDown(e){if(0!==e.button&&1!==e.button||this._dragData||e.target.classList.contains("lm-TabBar-tabInput"))return;let t=this.addButtonEnabled&&this.addButtonNode.contains(e.target),r=this.contentNode.children,i=B.ArrayExt.findFirstIndex(r,t=>$.hitTest(t,e.clientX,e.clientY));if(-1===i&&!t||(e.preventDefault(),e.stopPropagation(),this._dragData={tab:r[i],index:i,pressX:e.clientX,pressY:e.clientY,tabPos:-1,tabSize:-1,tabPressPos:-1,targetIndex:-1,tabLayout:null,contentRect:null,override:null,dragActive:!1,dragAborted:!1,detachRequested:!1},this.document.addEventListener("pointerup",this,!0),1===e.button||t))return;let n=r[i].querySelector(this.renderer.closeIconSelector);n&&n.contains(e.target)||(this.tabsMovable&&(this.document.addEventListener("pointermove",this,!0),this.document.addEventListener("keydown",this,!0),this.document.addEventListener("contextmenu",this,!0)),this.allowDeselect&&this.currentIndex===i?this.currentIndex=-1:this.currentIndex=i,-1!==this.currentIndex&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}_evtPointerMove(e){let t=this._dragData;if(!t)return;e.preventDefault(),e.stopPropagation();let r=this.contentNode.children;if(!(!t.dragActive&&!tj.dragExceeded(t,e))){if(!t.dragActive){let e=t.tab.getBoundingClientRect();"horizontal"===this._orientation?(t.tabPos=t.tab.offsetLeft,t.tabSize=e.width,t.tabPressPos=t.pressX-e.left):(t.tabPos=t.tab.offsetTop,t.tabSize=e.height,t.tabPressPos=t.pressY-e.top),t.tabPressOffset={x:t.pressX-e.left,y:t.pressY-e.top},t.tabLayout=tj.snapTabLayout(r,this._orientation),t.contentRect=this.contentNode.getBoundingClientRect(),t.override=ec.overrideCursor("default"),t.tab.classList.add("lm-mod-dragging"),this.addClass("lm-mod-dragging"),t.dragActive=!0}if(!t.detachRequested&&tj.detachExceeded(t,e)){t.detachRequested=!0;let i=t.index,n=e.clientX,a=e.clientY,o=r[i],s=this._titles[i];if(this._tabDetachRequested.emit({index:i,title:s,tab:o,clientX:n,clientY:a,offset:t.tabPressOffset}),t.dragAborted)return}tj.layoutTabs(r,t,e,this._orientation)}}_evtPointerUp(e){if(0!==e.button&&1!==e.button)return;let t=this._dragData;if(t){if(e.preventDefault(),e.stopPropagation(),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),!t.dragActive){if(this._dragData=null,this.addButtonEnabled&&this.addButtonNode.contains(e.target))return void this._addRequested.emit(void 0);let r=this.contentNode.children,i=B.ArrayExt.findFirstIndex(r,t=>$.hitTest(t,e.clientX,e.clientY));if(i!==t.index)return;let n=this._titles[i];if(!n.closable)return;if(1===e.button)return void this._tabCloseRequested.emit({index:i,title:n});let a=r[i].querySelector(this.renderer.closeIconSelector);return a&&a.contains(e.target)?void this._tabCloseRequested.emit({index:i,title:n}):void 0}0!==e.button||(tj.finalizeTabPosition(t,this._orientation),t.tab.classList.remove("lm-mod-dragging"),setTimeout(()=>{if(t.dragAborted)return;this._dragData=null,tj.resetTabPositions(this.contentNode.children,this._orientation),t.override.dispose(),this.removeClass("lm-mod-dragging");let e=t.index,r=t.targetIndex;-1===r||e===r||(B.ArrayExt.move(this._titles,e,r),this._adjustCurrentForMove(e,r),this._tabMoved.emit({fromIndex:e,toIndex:r,title:this._titles[r]}),ee.sendMessage(this,eG.Msg.UpdateRequest))},tj.parseTransitionDuration(t.tab)))}}_releaseMouse(){let e=this._dragData;e&&(this._dragData=null,this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),e.dragAborted=!0,e.dragActive&&(tj.resetTabPositions(this.contentNode.children,this._orientation),e.override.dispose(),e.tab.classList.remove("lm-mod-dragging"),this.removeClass("lm-mod-dragging")))}_adjustCurrentForInsert(e,t){let r=this.currentTitle,i=this._currentIndex,n=this.insertBehavior;if("select-tab"===n||"select-tab-if-needed"===n&&-1===i){this._currentIndex=e,this._previousTitle=r,this._currentChanged.emit({previousIndex:i,previousTitle:r,currentIndex:e,currentTitle:t});return}i>=e&&this._currentIndex++}_adjustCurrentForMove(e,t){this._currentIndex===e?this._currentIndex=t:this._currentIndex=t?this._currentIndex++:this._currentIndex>e&&this._currentIndex<=t&&this._currentIndex--}_adjustCurrentForRemove(e,t){let r=this._currentIndex,i=this.removeBehavior;if(r!==e){r>e&&this._currentIndex--;return}if(0===this._titles.length){this._currentIndex=-1,this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null});return}if("select-tab-after"===i){this._currentIndex=Math.min(e,this._titles.length-1),this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if("select-tab-before"===i){this._currentIndex=Math.max(0,e-1),this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if("select-previous-tab"===i){this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(e,this._titles.length-1),this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}this._currentIndex=-1,this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}_onTitleChanged(e){this.update()}},tA=tk||(tk={});class tS{constructor(){this.closeIconSelector=".lm-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap,this._uuid=++tS._nInstance}renderTab(e){let t=e.title.caption,r=this.createTabKey(e),i=this.createTabStyle(e),n=this.createTabClass(e),a=this.createTabDataset(e),o=this.createTabARIA(e);return e.title.closable?ez.li({id:r,key:r,className:n,title:t,style:i,dataset:a,...o},this.renderIcon(e),this.renderLabel(e),this.renderCloseIcon(e)):ez.li({id:r,key:r,className:n,title:t,style:i,dataset:a,...o},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){let{title:t}=e,r=this.createIconClass(e);return ez.div({className:r},t.icon,t.iconLabel)}renderLabel(e){return ez.div({className:"lm-TabBar-tabLabel"},e.title.label)}renderCloseIcon(e){return ez.div({className:"lm-TabBar-tabCloseIcon"})}createTabKey(e){let t=this._tabKeys.get(e.title);return void 0===t&&(t=`tab-key-${this._uuid}-${this._tabID++}`,this._tabKeys.set(e.title,t)),t}createTabStyle(e){return{zIndex:`${e.zIndex}`}}createTabClass(e){let t="lm-TabBar-tab";return e.title.className&&(t+=` ${e.title.className}`),e.title.closable&&(t+=" lm-mod-closable"),e.current&&(t+=" lm-mod-current"),t}createTabDataset(e){return e.title.dataset}createTabARIA(e){var t;return{role:"tab","aria-selected":e.current.toString(),tabindex:`${null!=(t=e.tabIndex)?t:"-1"}`}}createIconClass(e){let t="lm-TabBar-tabIcon",r=e.title.iconClass;return r?`${t} ${r}`:t}}tS._nInstance=0,tA.Renderer=tS,tA.defaultRenderer=new tS,tA.addButtonSelector=".lm-TabBar-addButton",(tL=tj||(tj={})).DRAG_THRESHOLD=5,tL.DETACH_THRESHOLD=20,tL.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");t.setAttribute("role","tablist"),t.className="lm-TabBar-content",e.appendChild(t);let r=document.createElement("div");return r.className="lm-TabBar-addButton lm-mod-hidden",r.setAttribute("tabindex","-1"),r.setAttribute("role","button"),e.appendChild(r),e},tL.asTitle=function(e){return e instanceof eH?e:new eH(e)},tL.parseTransitionDuration=function(e){return 1e3*(parseFloat(window.getComputedStyle(e).transitionDuration)||0)},tL.snapTabLayout=function(e,t){let r=Array(e.length);for(let i=0,n=e.length;i=tL.DRAG_THRESHOLD||i>=tL.DRAG_THRESHOLD},tL.detachExceeded=function(e,t){let r=e.contentRect;return t.clientX=r.right+tL.DETACH_THRESHOLD||t.clientY=r.bottom+tL.DETACH_THRESHOLD},tL.layoutTabs=function(e,t,r,i){let n,a,o,s;"horizontal"===i?(n=t.pressX,a=r.clientX-t.contentRect.left,o=r.clientX,s=t.contentRect.width):(n=t.pressY,a=r.clientY-t.contentRect.top,o=r.clientY,s=t.contentRect.height);let l=t.index,c=a-t.tabPressPos,u=c+t.tabSize;for(let r=0,a=e.length;r>1);if(rt.index&&u>d)a=`${-t.tabSize-h.margin}px`,l=Math.max(l,r);else if(r===t.index){let e=o-n,r=s-(t.tabPos+t.tabSize);a=`${Math.max(-t.tabPos,Math.min(e,r))}px`}else a="";"horizontal"===i?e[r].style.left=a:e[r].style.top=a}t.targetIndex=l},tL.finalizeTabPosition=function(e,t){let r,i;if(r="horizontal"===t?e.contentRect.width:e.contentRect.height,e.targetIndex===e.index)i=0;else if(e.targetIndex>e.index){let t=e.tabLayout[e.targetIndex];i=t.pos+t.size-e.tabSize-e.tabPos}else i=e.tabLayout[e.targetIndex].pos-e.tabPos;let n=r-(e.tabPos+e.tabSize),a=Math.max(-e.tabPos,Math.min(i,n));"horizontal"===t?e.tab.style.left=`${a}px`:e.tab.style.top=`${a}px`},tL.resetTabPositions=function(e,t){for(let r of e)"horizontal"===t?r.style.left="":r.style.top=""};var tE,tC,tL,tP,tI,tz,tD,tO,tR,tF,tj,tB,tN=class extends eW{constructor(e){super(),this._spacing=4,this._dirty=!1,this._root=null,this._box=null,this._items=new Map,this.renderer=e.renderer,void 0!==e.spacing&&(this._spacing=e3.clampDimension(e.spacing)),this._document=e.document||document,this._hiddenMode=void 0!==e.hiddenMode?e.hiddenMode:eG.HiddenMode.Display}dispose(){let e=this[Symbol.iterator]();for(let t of(this._items.forEach(e=>{e.dispose()}),this._box=null,this._root=null,this._items.clear(),e))t.dispose();super.dispose()}get hiddenMode(){return this._hiddenMode}set hiddenMode(e){if(this._hiddenMode!==e){for(let t of(this._hiddenMode=e,this.tabBars()))if(t.titles.length>1)for(let e of t.titles)e.owner.hiddenMode=this._hiddenMode}}get spacing(){return this._spacing}set spacing(e){e=e3.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get isEmpty(){return null===this._root}[Symbol.iterator](){return this._root?this._root.iterAllWidgets():(0,B.empty)()}widgets(){return this._root?this._root.iterUserWidgets():(0,B.empty)()}selectedWidgets(){return this._root?this._root.iterSelectedWidgets():(0,B.empty)()}tabBars(){return this._root?this._root.iterTabBars():(0,B.empty)()}handles(){return this._root?this._root.iterHandles():(0,B.empty)()}moveHandle(e,t,r){let i,n=e.classList.contains("lm-mod-hidden");if(!this._root||n)return;let a=this._root.findSplitNode(e);a&&0!=(i="horizontal"===a.node.orientation?t-e.offsetLeft:r-e.offsetTop)&&(a.node.holdSizes(),eV.adjust(a.node.sizers,a.index,i),this.parent&&this.parent.update())}saveLayout(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}}restoreLayout(e){let t=new Set,r;r=e.main?tB.normalizeAreaConfig(e.main,t):null;let i=this.widgets(),n=this.tabBars(),a=this.handles();for(let e of(this._root=null,i))t.has(e)||(e.parent=null);for(let e of n)e.dispose();for(let e of a)e.parentNode&&e.parentNode.removeChild(e);for(let e of t)e.parent=this.parent;r?this._root=tB.realizeAreaConfig(r,{createTabBar:e=>this._createTabBar(),createHandle:()=>this._createHandle()},this._document):this._root=null,this.parent&&(t.forEach(e=>{this.attachWidget(e)}),this.parent.fit())}addWidget(e,t={}){let r=t.ref||null,i=t.mode||"tab-after",n=null;if(this._root&&r&&(n=this._root.findTabNode(r)),r&&!n)throw Error("Reference widget is not in the layout.");switch(e.parent=this.parent,i){case"tab-after":this._insertTab(e,r,n,!0);break;case"tab-before":this._insertTab(e,r,n,!1);break;case"split-top":this._insertSplit(e,r,n,"vertical",!1);break;case"split-left":this._insertSplit(e,r,n,"horizontal",!1);break;case"split-right":this._insertSplit(e,r,n,"horizontal",!0);break;case"split-bottom":this._insertSplit(e,r,n,"vertical",!0);break;case"merge-top":this._insertSplit(e,r,n,"vertical",!1,!0);break;case"merge-left":this._insertSplit(e,r,n,"horizontal",!1,!0);break;case"merge-right":this._insertSplit(e,r,n,"horizontal",!0,!0);break;case"merge-bottom":this._insertSplit(e,r,n,"vertical",!0,!0)}this.parent&&(this.attachWidget(e),this.parent.fit())}removeWidget(e){this._removeWidget(e),this.parent&&(this.detachWidget(e),this.parent.fit())}hitTestTabAreas(e,t){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=$.boxSizing(this.parent.node));let r=this.parent.node.getBoundingClientRect(),i=e-r.left-this._box.borderLeft,n=t-r.top-this._box.borderTop,a=this._root.hitTestTabNodes(i,n);if(!a)return null;let{tabBar:o,top:s,left:l,width:c,height:u}=a,h=this._box.borderLeft+this._box.borderRight,d=this._box.borderTop+this._box.borderBottom,f=r.width-h-(l+c),p=r.height-d-(s+u);return{tabBar:o,x:i,y:n,top:s,left:l,right:f,bottom:p,width:c,height:u}}init(){for(let e of(super.init(),this))this.attachWidget(e);for(let e of this.handles())this.parent.node.appendChild(e);this.parent.fit()}attachWidget(e){this.parent.node!==e.node.parentNode&&(this._items.set(e,new eJ(e)),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.AfterAttach))}detachWidget(e){if(this.parent.node!==e.node.parentNode)return;this.parent.isAttached&&ee.sendMessage(e,eG.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.AfterDetach);let t=this._items.get(e);t&&(this._items.delete(e),t.dispose())}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_removeWidget(e){if(!this._root)return;let t=this._root.findTabNode(e);if(!t)return;if(tB.removeAria(e),t.tabBar.titles.length>1){t.tabBar.removeTab(e.title),this._hiddenMode===eG.HiddenMode.Scale&&1==t.tabBar.titles.length&&(t.tabBar.titles[0].owner.hiddenMode=eG.HiddenMode.Display);return}if(t.tabBar.dispose(),this._root===t){this._root=null;return}this._root.holdAllSizes();let r=t.parent;t.parent=null;let i=B.ArrayExt.removeFirstOf(r.children,t),n=B.ArrayExt.removeAt(r.handles,i);if(B.ArrayExt.removeAt(r.sizers,i),n.parentNode&&n.parentNode.removeChild(n),r.children.length>1)return void r.syncHandles();let a=r.parent;r.parent=null;let o=r.children[0],s=r.handles[0];if(r.children.length=0,r.handles.length=0,r.sizers.length=0,s.parentNode&&s.parentNode.removeChild(s),this._root===r){o.parent=null,this._root=o;return}let l=a.children.indexOf(r);if(o instanceof tB.TabLayoutNode){o.parent=a,a.children[l]=o;return}let c=B.ArrayExt.removeAt(a.handles,l);B.ArrayExt.removeAt(a.children,l),B.ArrayExt.removeAt(a.sizers,l),c.parentNode&&c.parentNode.removeChild(c);for(let e=0,t=o.children.length;e=r.length)&&(i=0),{type:"tab-area",widgets:r,currentIndex:i}}(t,r):function(t,r){let i=t.orientation,n=[],a=[];for(let o=0,s=t.children.length;o{let i=n(e,c,u),a=t(l.sizes[r]),o=c.createHandle();h.children.push(i),h.handles.push(o),h.sizers.push(a),i.parent=h}),h.syncHandles(),h.normalizeSizes(),h)};class r{constructor(e){this.parent=null,this._top=0,this._left=0,this._width=0,this._height=0;let t=new eq,r=new eq;t.stretch=0,r.stretch=1,this.tabBar=e,this.sizers=[t,r]}get top(){return this._top}get left(){return this._left}get width(){return this._width}get height(){return this._height}*iterAllWidgets(){yield this.tabBar,yield*this.iterUserWidgets()}*iterUserWidgets(){for(let e of this.tabBar.titles)yield e.owner}*iterSelectedWidgets(){let e=this.tabBar.currentTitle;e&&(yield e.owner)}*iterTabBars(){yield this.tabBar}*iterHandles(){}findTabNode(e){return -1!==this.tabBar.titles.indexOf(e.title)?this:null}findSplitNode(e){return null}findFirstTabNode(){return this}hitTestTabNodes(e,t){return e=this._left+this._width||t=this._top+this._height?null:this}createConfig(){return{type:"tab-area",widgets:this.tabBar.titles.map(e=>e.owner),currentIndex:this.tabBar.currentIndex}}holdAllSizes(){}fit(e,t){let r=0,i=0,n=t.get(this.tabBar),a=this.tabBar.currentTitle,o=a?t.get(a.owner):void 0,[s,l]=this.sizers;return n&&n.fit(),o&&o.fit(),n&&!n.isHidden?(r=Math.max(r,n.minWidth),i+=n.minHeight,s.minSize=n.minHeight,s.maxSize=n.maxHeight):(s.minSize=0,s.maxSize=0),o&&!o.isHidden?(r=Math.max(r,o.minWidth),i+=o.minHeight,l.minSize=o.minHeight):l.minSize=0,l.maxSize=1/0,{minWidth:r,minHeight:i,maxWidth:1/0,maxHeight:1/0}}update(e,t,r,i,n,a){this._top=t,this._left=e,this._width=r,this._height=i;let o=a.get(this.tabBar),s=this.tabBar.currentTitle,l=s?a.get(s.owner):void 0;if(eV.calc(this.sizers,i),o&&!o.isHidden){let i=this.sizers[0].size;o.update(e,t,r,i),t+=i}if(l&&!l.isHidden){let i=this.sizers[1].size;l.update(e,t,r,i)}}}e.TabLayoutNode=r;class i{constructor(e){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=e}*iterAllWidgets(){for(let e of this.children)yield*e.iterAllWidgets()}*iterUserWidgets(){for(let e of this.children)yield*e.iterUserWidgets()}*iterSelectedWidgets(){for(let e of this.children)yield*e.iterSelectedWidgets()}*iterTabBars(){for(let e of this.children)yield*e.iterTabBars()}*iterHandles(){for(let e of(yield*this.handles,this.children))yield*e.iterHandles()}findTabNode(e){for(let t=0,r=this.children.length;te.createConfig()),sizes:t}}syncHandles(){this.handles.forEach((e,t)=>{e.setAttribute("data-orientation",this.orientation),t===this.handles.length-1?e.classList.add("lm-mod-hidden"):e.classList.remove("lm-mod-hidden")})}holdSizes(){for(let e of this.sizers)e.sizeHint=e.size}holdAllSizes(){for(let e of this.children)e.holdAllSizes();this.holdSizes()}normalizeSizes(){let e=this.sizers.length;if(0===e)return;this.holdSizes();let t=this.sizers.reduce((e,t)=>e+t.sizeHint,0);if(0===t)for(let t of this.sizers)t.size=t.sizeHint=1/e;else for(let e of this.sizers)e.size=e.sizeHint/=t;this.normalized=!0}createNormalizedSizes(){let e=this.sizers.length;if(0===e)return[];let t=this.sizers.map(e=>e.size),r=t.reduce((e,t)=>e+t,0);if(0===r)for(let r=t.length-1;r>-1;r--)t[r]=1/e;else for(let e=t.length-1;e>-1;e--)t[e]/=r;return t}fit(e,t){let r="horizontal"===this.orientation,i=Math.max(0,this.children.length-1)*e,n=r?i:0,a=r?0:i;for(let i=0,o=this.children.length;ithis._createTabBar(),createHandle:()=>this._createHandle()},spacing:t.spacing,hiddenMode:t.hiddenMode}),this.overlay=t.overlay||new e.Overlay,this.node.appendChild(this.overlay.node)}dispose(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),super.dispose()}get hiddenMode(){return this.layout.hiddenMode}set hiddenMode(e){this.layout.hiddenMode=e}get layoutModified(){return this._layoutModified}get addRequested(){return this._addRequested}get renderer(){return this.layout.renderer}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get mode(){return this._mode}set mode(e){if(this._mode===e)return;this._mode=e,this.dataset.mode=e;let t=this.layout;switch(e){case"multiple-document":for(let e of t.tabBars())e.show();break;case"single-document":t.restoreLayout(_.createSingleDocumentConfig(this));break;default:throw"unreachable"}ee.postMessage(this,_.LayoutModified)}get tabsMovable(){return this._tabsMovable}set tabsMovable(e){for(let t of(this._tabsMovable=e,this.tabBars()))t.tabsMovable=e}get tabsConstrained(){return this._tabsConstrained}set tabsConstrained(e){this._tabsConstrained=e}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){for(let t of(this._addButtonEnabled=e,this.tabBars()))t.addButtonEnabled=e}get isEmpty(){return this.layout.isEmpty}*widgets(){yield*this.layout.widgets()}*selectedWidgets(){yield*this.layout.selectedWidgets()}*tabBars(){yield*this.layout.tabBars()}*handles(){yield*this.layout.handles()}selectWidget(e){let t=(0,B.find)(this.tabBars(),t=>-1!==t.titles.indexOf(e.title));if(!t)throw Error("Widget is not contained in the dock panel.");t.currentTitle=e.title}activateWidget(e){this.selectWidget(e),e.activate()}saveLayout(){return this.layout.saveLayout()}restoreLayout(e){this._mode="multiple-document",this.layout.restoreLayout(e),(X.IS_EDGE||X.IS_IE)&&ee.flush(),ee.postMessage(this,_.LayoutModified)}addWidget(e,t={}){"single-document"===this._mode?this.layout.addWidget(e):this.layout.addWidget(e,t),ee.postMessage(this,_.LayoutModified)}processMessage(e){"layout-modified"===e.type?this._layoutModified.emit(void 0):super.processMessage(e)}handleEvent(e){switch(e.type){case"lm-dragenter":this._evtDragEnter(e);break;case"lm-dragleave":this._evtDragLeave(e);break;case"lm-dragover":this._evtDragOver(e);break;case"lm-drop":this._evtDrop(e);break;case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("lm-dragenter",this),this.node.addEventListener("lm-dragleave",this),this.node.addEventListener("lm-dragover",this),this.node.addEventListener("lm-drop",this),this.node.addEventListener("pointerdown",this)}onAfterDetach(e){this.node.removeEventListener("lm-dragenter",this),this.node.removeEventListener("lm-dragleave",this),this.node.removeEventListener("lm-dragover",this),this.node.removeEventListener("lm-drop",this),this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(e){_.isGeneratedTabBarProperty.get(e.child)||e.child.addClass("lm-DockPanel-widget")}onChildRemoved(e){_.isGeneratedTabBarProperty.get(e.child)||(e.child.removeClass("lm-DockPanel-widget"),ee.postMessage(this,_.LayoutModified))}_evtDragEnter(e){e.mimeData.hasData("application/vnd.lumino.widget-factory")&&(e.preventDefault(),e.stopPropagation())}_evtDragLeave(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||(e.stopPropagation(),this.overlay.hide(1))}_evtDragOver(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||"invalid"===this._showOverlay(e.clientX,e.clientY)?e.dropAction="none":(e.stopPropagation(),e.dropAction=e.proposedAction)}_evtDrop(e){if(e.preventDefault(),this.overlay.hide(0),"none"===e.proposedAction){e.dropAction="none";return}let{clientX:t,clientY:r}=e,{zone:i,target:n}=_.findDropTarget(this,t,r,this._edges);if(this._tabsConstrained&&e.source!==this||"invalid"===i){e.dropAction="none";return}let a=e.mimeData.getData("application/vnd.lumino.widget-factory");if("function"!=typeof a){e.dropAction="none";return}let o=a();if(!(o instanceof eG)||o.contains(this)){e.dropAction="none";return}let s=n?_.getDropRef(n.tabBar):null;switch(i){case"root-all":this.addWidget(o);break;case"root-top":this.addWidget(o,{mode:"split-top"});break;case"root-left":this.addWidget(o,{mode:"split-left"});break;case"root-right":this.addWidget(o,{mode:"split-right"});break;case"root-bottom":this.addWidget(o,{mode:"split-bottom"});break;case"widget-all":case"widget-tab":this.addWidget(o,{mode:"tab-after",ref:s});break;case"widget-top":this.addWidget(o,{mode:"split-top",ref:s});break;case"widget-left":this.addWidget(o,{mode:"split-left",ref:s});break;case"widget-right":this.addWidget(o,{mode:"split-right",ref:s});break;case"widget-bottom":this.addWidget(o,{mode:"split-bottom",ref:s});break;default:throw"unreachable"}e.dropAction=e.proposedAction,e.stopPropagation(),this.activateWidget(o)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&(this._releaseMouse(),ee.postMessage(this,_.LayoutModified))}_evtPointerDown(e){if(0!==e.button)return;let t=this.layout,r=e.target,i=(0,B.find)(t.handles(),e=>e.contains(r));if(!i)return;e.preventDefault(),e.stopPropagation(),this._document.addEventListener("keydown",this,!0),this._document.addEventListener("pointerup",this,!0),this._document.addEventListener("pointermove",this,!0),this._document.addEventListener("contextmenu",this,!0);let n=i.getBoundingClientRect(),a=e.clientX-n.left,o=e.clientY-n.top,s=window.getComputedStyle(i),l=ec.overrideCursor(s.cursor,this._document);this._pressData={handle:i,deltaX:a,deltaY:o,override:l}}_evtPointerMove(e){if(!this._pressData)return;e.preventDefault(),e.stopPropagation();let t=this.node.getBoundingClientRect(),r=e.clientX-t.left-this._pressData.deltaX,i=e.clientY-t.top-this._pressData.deltaY;this.layout.moveHandle(this._pressData.handle,r,i)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse(),ee.postMessage(this,_.LayoutModified))}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._document.removeEventListener("keydown",this,!0),this._document.removeEventListener("pointerup",this,!0),this._document.removeEventListener("pointermove",this,!0),this._document.removeEventListener("contextmenu",this,!0))}_showOverlay(e,t){let{zone:r,target:i}=_.findDropTarget(this,e,t,this._edges);if("invalid"===r)return this.overlay.hide(100),r;let n,a,o,s,l=$.boxSizing(this.node),c=this.node.getBoundingClientRect();switch(r){case"root-all":n=l.paddingTop,a=l.paddingLeft,o=l.paddingRight,s=l.paddingBottom;break;case"root-top":n=l.paddingTop,a=l.paddingLeft,o=l.paddingRight,s=c.height*_.GOLDEN_RATIO;break;case"root-left":n=l.paddingTop,a=l.paddingLeft,o=c.width*_.GOLDEN_RATIO,s=l.paddingBottom;break;case"root-right":n=l.paddingTop,a=c.width*_.GOLDEN_RATIO,o=l.paddingRight,s=l.paddingBottom;break;case"root-bottom":n=c.height*_.GOLDEN_RATIO,a=l.paddingLeft,o=l.paddingRight,s=l.paddingBottom;break;case"widget-all":n=i.top,a=i.left,o=i.right,s=i.bottom;break;case"widget-top":n=i.top,a=i.left,o=i.right,s=i.bottom+i.height/2;break;case"widget-left":n=i.top,a=i.left,o=i.right+i.width/2,s=i.bottom;break;case"widget-right":n=i.top,a=i.left+i.width/2,o=i.right,s=i.bottom;break;case"widget-bottom":n=i.top+i.height/2,a=i.left,o=i.right,s=i.bottom;break;case"widget-tab":{let e=i.tabBar.node.getBoundingClientRect().height;n=i.top,a=i.left,o=i.right,s=i.bottom+i.height-e;break}default:throw"unreachable"}return this.overlay.show({top:n,left:a,right:o,bottom:s}),r}_createTabBar(){let e=this._renderer.createTabBar(this._document);return _.isGeneratedTabBarProperty.set(e,!0),"single-document"===this._mode&&e.hide(),e.tabsMovable=this._tabsMovable,e.allowDeselect=!1,e.addButtonEnabled=this._addButtonEnabled,e.removeBehavior="select-previous-tab",e.insertBehavior="select-tab-if-needed",e.tabMoved.connect(this._onTabMoved,this),e.currentChanged.connect(this._onCurrentChanged,this),e.tabCloseRequested.connect(this._onTabCloseRequested,this),e.tabDetachRequested.connect(this._onTabDetachRequested,this),e.tabActivateRequested.connect(this._onTabActivateRequested,this),e.addRequested.connect(this._onTabAddRequested,this),e}_createHandle(){return this._renderer.createHandle()}_onTabMoved(){ee.postMessage(this,_.LayoutModified)}_onCurrentChanged(e,t){let{previousTitle:r,currentTitle:i}=t;r&&r.owner.hide(),i&&i.owner.show(),(X.IS_EDGE||X.IS_IE)&&ee.flush(),ee.postMessage(this,_.LayoutModified)}_onTabAddRequested(e){this._addRequested.emit(e)}_onTabActivateRequested(e,t){t.title.owner.activate()}_onTabCloseRequested(e,t){t.title.owner.close()}_onTabDetachRequested(e,t){if(this._drag)return;e.releaseMouse();let{title:r,tab:i,clientX:n,clientY:a,offset:o}=t,s=new N.MimeData;s.setData("application/vnd.lumino.widget-factory",()=>r.owner);let l=i.cloneNode(!0);o&&(l.style.top=`-${o.y}px`,l.style.left=`-${o.x}px`),this._drag=new ec({document:this._document,mimeData:s,dragImage:l,proposedAction:"move",supportedActions:"move",source:this}),i.classList.add("lm-mod-hidden");let c=()=>{this._drag=null,i.classList.remove("lm-mod-hidden")};this._drag.start(n,a).then(c)}},tV=tU||(tU={});tV.Overlay=class{constructor(){this._timer=-1,this._hidden=!0,this.node=document.createElement("div"),this.node.classList.add("lm-DockPanel-overlay"),this.node.classList.add("lm-mod-hidden"),this.node.style.position="absolute",this.node.style.contain="strict"}show(e){let t=this.node.style;t.top=`${e.top}px`,t.left=`${e.left}px`,t.right=`${e.right}px`,t.bottom=`${e.bottom}px`,clearTimeout(this._timer),this._timer=-1,this._hidden&&(this._hidden=!1,this.node.classList.remove("lm-mod-hidden"))}hide(e){if(!this._hidden){if(e<=0){clearTimeout(this._timer),this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden");return}-1===this._timer&&(this._timer=window.setTimeout(()=>{this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden")},e))}}};class tq{createTabBar(e){let t=new tk({document:e});return t.addClass("lm-DockPanel-tabBar"),t}createHandle(){let e=document.createElement("div");return e.className="lm-DockPanel-handle",e}}tV.Renderer=tq,tV.defaultRenderer=new tq,(m=_||(_={})).GOLDEN_RATIO=.618,m.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},m.LayoutModified=new er("layout-modified"),m.isGeneratedTabBarProperty=new ei({name:"isGeneratedTabBar",create:()=>!1}),m.createSingleDocumentConfig=function(e){if(e.isEmpty)return{main:null};let t=Array.from(e.widgets()),r=e.selectedWidgets().next().value,i=r?t.indexOf(r):-1;return{main:{type:"tab-area",widgets:t,currentIndex:i}}},m.findDropTarget=function(e,t,r,i){let n;if(!$.hitTest(e.node,t,r))return{zone:"invalid",target:null};let a=e.layout;if(a.isEmpty)return{zone:"root-all",target:null};if("multiple-document"===e.mode){let n=e.node.getBoundingClientRect(),a=t-n.left+1,o=r-n.top+1,s=n.right-t,l=n.bottom-r;switch(Math.min(o,s,l,a)){case o:if(oh&&c>h&&l>d&&u>d)return{zone:"widget-all",target:o};switch(s/=h,l/=d,Math.min(s,l,c/=h,u/=d)){case s:n="widget-left";break;case l:n="widget-top";break;case c:n="widget-right";break;case u:n="widget-bottom";break;default:throw"unreachable"}return{zone:n,target:o}},m.getDropRef=function(e){return 0===e.titles.length?null:e.currentTitle?e.currentTitle.owner:e.titles[e.titles.length-1].owner};var tH=class e extends eW{constructor(e={}){super(e),this._dirty=!1,this._rowSpacing=4,this._columnSpacing=4,this._items=[],this._rowStarts=[],this._columnStarts=[],this._rowSizers=[new eq],this._columnSizers=[new eq],this._box=null,void 0!==e.rowCount&&w.reallocSizers(this._rowSizers,e.rowCount),void 0!==e.columnCount&&w.reallocSizers(this._columnSizers,e.columnCount),void 0!==e.rowSpacing&&(this._rowSpacing=w.clampValue(e.rowSpacing)),void 0!==e.columnSpacing&&(this._columnSpacing=w.clampValue(e.columnSpacing))}dispose(){for(let e of this._items){let t=e.widget;e.dispose(),t.dispose()}this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,super.dispose()}get rowCount(){return this._rowSizers.length}set rowCount(e){e!==this.rowCount&&(w.reallocSizers(this._rowSizers,e),this.parent&&this.parent.fit())}get columnCount(){return this._columnSizers.length}set columnCount(e){e!==this.columnCount&&(w.reallocSizers(this._columnSizers,e),this.parent&&this.parent.fit())}get rowSpacing(){return this._rowSpacing}set rowSpacing(e){e=w.clampValue(e),this._rowSpacing!==e&&(this._rowSpacing=e,this.parent&&this.parent.fit())}get columnSpacing(){return this._columnSpacing}set columnSpacing(e){e=w.clampValue(e),this._columnSpacing!==e&&(this._columnSpacing=e,this.parent&&this.parent.fit())}rowStretch(e){let t=this._rowSizers[e];return t?t.stretch:-1}setRowStretch(e,t){let r=this._rowSizers[e];r&&(t=w.clampValue(t),r.stretch!==t&&(r.stretch=t,this.parent&&this.parent.update()))}columnStretch(e){let t=this._columnSizers[e];return t?t.stretch:-1}setColumnStretch(e,t){let r=this._columnSizers[e];r&&(t=w.clampValue(t),r.stretch!==t&&(r.stretch=t,this.parent&&this.parent.update()))}*[Symbol.iterator](){for(let e of this._items)yield e.widget}addWidget(e){-1===B.ArrayExt.findFirstIndex(this._items,t=>t.widget===e)&&(this._items.push(new eJ(e)),this.parent&&this.attachWidget(e))}removeWidget(e){let t=B.ArrayExt.findFirstIndex(this._items,t=>t.widget===e);if(-1===t)return;let r=B.ArrayExt.removeAt(this._items,t);this.parent&&this.detachWidget(e),r.dispose()}init(){for(let e of(super.init(),this))this.attachWidget(e)}attachWidget(e){this.parent.isAttached&&ee.sendMessage(e,eG.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.AfterAttach),this.parent.fit()}detachWidget(e){this.parent.isAttached&&ee.sendMessage(e,eG.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.AfterDetach),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){for(let e=0,t=this.rowCount;e!e.isHidden);for(let e=0,r=t.length;e({row:0,column:0,rowSpan:1,columnSpan:1}),changed:function(e){e.parent&&e.parent.layout instanceof tH&&e.parent.fit()}}),y.normalizeConfig=function(e){return{row:Math.max(0,Math.floor(e.row||0)),column:Math.max(0,Math.floor(e.column||0)),rowSpan:Math.max(1,Math.floor(e.rowSpan||0)),columnSpan:Math.max(1,Math.floor(e.columnSpan||0))}},y.clampValue=function(e){return Math.max(0,Math.floor(e))},y.rowSpanCmp=function(e,t){let r=y.cellConfigProperty.get(e.widget),i=y.cellConfigProperty.get(t.widget);return r.rowSpan-i.rowSpan},y.columnSpanCmp=function(e,t){let r=y.cellConfigProperty.get(e.widget),i=y.cellConfigProperty.get(t.widget);return r.columnSpan-i.columnSpan},y.reallocSizers=function(e,t){for(t=Math.max(1,Math.floor(t));e.lengtht&&(e.length=t)},y.distributeMin=function(e,t,r,i){if(r=i)return;let a=(i-n)/(r-t+1);for(let i=t;i<=r;++i)e[i].minSize+=a};var tG=class e extends eG{constructor(t={}){super({node:T.createNode()}),this._activeIndex=-1,this._tabFocusIndex=0,this._menus=[],this._childMenu=null,this._overflowMenu=null,this._menuItemSizes=[],this._overflowIndex=-1,this.addClass("lm-MenuBar"),this.setFlag(eG.Flag.DisallowLayout),this.renderer=t.renderer||e.defaultRenderer,this._forceItemsPosition=t.forceItemsPosition||{forceX:!0,forceY:!0},this._overflowMenuOptions=t.overflowMenuOptions||{isVisible:!0}}dispose(){this._closeChildMenu(),this._menus.length=0,super.dispose()}get childMenu(){return this._childMenu}get overflowIndex(){return this._overflowIndex}get overflowMenu(){return this._overflowMenu}get contentNode(){return this.node.getElementsByClassName("lm-MenuBar-content")[0]}get activeMenu(){return this._menus[this._activeIndex]||null}set activeMenu(e){this.activeIndex=e?this._menus.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._menus.length)&&(e=-1),e>-1&&0===this._menus[e].items.length&&(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this.update())}get menus(){return this._menus}openActiveMenu(){-1!==this._activeIndex&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))}addMenu(e,t=!0){this.insertMenu(this._menus.length,e,t)}insertMenu(e,t,r=!0){this._closeChildMenu();let i=this._menus.indexOf(t),n=Math.max(0,Math.min(e,this._menus.length));if(-1===i){B.ArrayExt.insert(this._menus,n,t),t.addClass("lm-MenuBar-menu"),t.aboutToClose.connect(this._onMenuAboutToClose,this),t.menuRequested.connect(this._onMenuMenuRequested,this),t.title.changed.connect(this._onTitleChanged,this),r&&this.update();return}n===this._menus.length&&n--,i!==n&&(B.ArrayExt.move(this._menus,i,n),r&&this.update())}removeMenu(e,t=!0){this.removeMenuAt(this._menus.indexOf(e),t)}removeMenuAt(e,t=!0){this._closeChildMenu();let r=B.ArrayExt.removeAt(this._menus,e);r&&(r.aboutToClose.disconnect(this._onMenuAboutToClose,this),r.menuRequested.disconnect(this._onMenuMenuRequested,this),r.title.changed.disconnect(this._onTitleChanged,this),r.removeClass("lm-MenuBar-menu"),t&&this.update())}clearMenus(){if(0!==this._menus.length){for(let e of(this._closeChildMenu(),this._menus))e.aboutToClose.disconnect(this._onMenuAboutToClose,this),e.menuRequested.disconnect(this._onMenuMenuRequested,this),e.title.changed.disconnect(this._onTitleChanged,this),e.removeClass("lm-MenuBar-menu");this._menus.length=0,this.update()}}handleEvent(e){switch(e.type){case"keydown":this._evtKeyDown(e);break;case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"focusout":this._evtFocusOut(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("keydown",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("focusout",this),this.node.addEventListener("contextmenu",this)}onAfterDetach(e){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("focusout",this),this.node.removeEventListener("contextmenu",this),this._closeChildMenu()}onActivateRequest(e){this.isAttached&&this._focusItemAt(0)}onResize(e){this.update(),super.onResize(e)}onUpdateRequest(e){var t;let r=this._menus,i=this.renderer,n=this._activeIndex,a=this._tabFocusIndex>=0&&this._tabFocusIndex-1?this._overflowIndex:r.length,s=0,l=!1,c=Array(o=null!==this._overflowMenu?o-1:o);for(let e=0;e{this._tabFocusIndex=e,this.activeIndex=e}}),s+=this._menuItemSizes[e],r[e].title.label===this._overflowMenuOptions.title&&(l=!0,o--);if(this._overflowMenuOptions.isVisible){if(this._overflowIndex>-1&&!l){if(null===this._overflowMenu){let e=null!=(t=this._overflowMenuOptions.title)?t:"...";this._overflowMenu=new tv({commands:new eA}),this._overflowMenu.title.label=e,this._overflowMenu.title.mnemonic=0,this.addMenu(this._overflowMenu,!1)}for(let e=r.length-2;e>=o;e--){let t=this.menus[e];t.title.mnemonic=0,this._overflowMenu.insertItem(0,{type:"submenu",submenu:t}),this.removeMenu(t,!1)}c[o]=i.renderItem({title:this._overflowMenu.title,active:o===n&&0!==r[o].items.length,tabbable:o===a,disabled:0===r[o].items.length,onfocus:()=>{this._tabFocusIndex=o,this.activeIndex=o}}),o++}else if(null!==this._overflowMenu){let e=this._overflowMenu.items,t=this.node.offsetWidth,n=this._overflowMenu.items.length;for(let l=0;lthis._menuItemSizes[n]){let t=e[0].submenu;this._overflowMenu.removeItemAt(0),this.insertMenu(o,t,!1),c[o]=i.renderItem({title:t.title,active:!1,tabbable:o===a,disabled:0===r[o].items.length,onfocus:()=>{this._tabFocusIndex=o,this.activeIndex=o}}),o++}}0===this._overflowMenu.items.length&&(this.removeMenu(this._overflowMenu,!1),c.pop(),this._overflowMenu=null,this._overflowIndex=-1)}}eN.render(c,this.contentNode),this._updateOverflowIndex()}_updateOverflowIndex(){if(!this._overflowMenuOptions.isVisible)return;let e=this.contentNode.childNodes,t=this.node.offsetWidth,r=0,i=-1,n=e.length;if(0==this._menuItemSizes.length)for(let a=0;at&&-1===i&&(i=a)}else for(let e=0;et){i=e;break}this._overflowIndex=i}_evtKeyDown(e){let t=e.keyCode;if(9===t){this.activeIndex=-1;return}if(e.preventDefault(),e.stopPropagation(),13===t||32===t||38===t||40===t){if(this.activeIndex=this._tabFocusIndex,this.activeIndex!==this._tabFocusIndex)return;this.openActiveMenu();return}if(27===t){this._closeChildMenu(),this._focusItemAt(this.activeIndex);return}if(37===t||39===t){let e=37===t?-1:1,r=this._tabFocusIndex+e,i=this._menus.length;for(let t=0;t$.hitTest(t,e.clientX,e.clientY));if(-1===t)return void this._closeChildMenu();if(0===e.button)if(this._childMenu)this._closeChildMenu(),this.activeIndex=t;else{e.preventDefault();let r=this._positionForMenu(t);tv.saveWindowData(),this.activeIndex=t,this._openChildMenu(r)}}_evtMouseMove(e){let t=B.ArrayExt.findFirstIndex(this.contentNode.children,t=>$.hitTest(t,e.clientX,e.clientY));if(t===this._activeIndex||-1===t&&this._childMenu)return;let r=t>=0&&this._childMenu?this._positionForMenu(t):null;tv.saveWindowData(),this.activeIndex=t,r&&this._openChildMenu(r)}_positionForMenu(e){let{left:t,bottom:r}=this.contentNode.children[e].getBoundingClientRect();return{top:r,left:t}}_evtFocusOut(e){this._childMenu||this.node.contains(e.relatedTarget)||(this.activeIndex=-1)}_focusItemAt(e){let t=this.contentNode.childNodes[e];t&&t.focus()}_openChildMenu(e={}){let t=this.activeMenu;if(!t)return void this._closeChildMenu();let r=this._childMenu;if(r===t)return;this._childMenu=t,r?r.close():document.addEventListener("mousedown",this,!0),this._tabFocusIndex=this.activeIndex,ee.sendMessage(this,eG.Msg.UpdateRequest);let{left:i,top:n}=e;(typeof i>"u"||typeof n>"u")&&({left:i,top:n}=this._positionForMenu(this._activeIndex)),r||this.addClass("lm-mod-active"),t.items.length>0&&t.open(i,n,this._forceItemsPosition)}_closeChildMenu(){if(!this._childMenu)return;this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0);let e=this._childMenu;this._childMenu=null,e.close(),this.activeIndex=-1}_onMenuAboutToClose(e){e===this._childMenu&&(this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)}_onMenuMenuRequested(e,t){if(e!==this._childMenu)return;let r=this._activeIndex,i=this._menus.length;switch(t){case"next":this.activeIndex=r===i-1?0:r+1;break;case"previous":this.activeIndex=0===r?i-1:r-1}this.openActiveMenu()}_onTitleChanged(){this.update()}},tW=tG||(tG={});class tY{renderItem(e){let t=this.createItemClass(e),r=this.createItemDataset(e),i=this.createItemARIA(e);return ez.li({className:t,dataset:r,...e.disabled?{}:{tabindex:e.tabbable?"0":"-1"},onfocus:e.onfocus,...i},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){let t=this.createIconClass(e);return ez.div({className:t},e.title.icon,e.title.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return ez.div({className:"lm-MenuBar-itemLabel"},t)}createItemClass(e){let t="lm-MenuBar-item";return e.title.className&&(t+=` ${e.title.className}`),e.active&&!e.disabled&&(t+=" lm-mod-active"),t}createItemDataset(e){return e.title.dataset}createItemARIA(e){return{role:"menuitem","aria-haspopup":"true","aria-disabled":e.disabled?"true":"false"}}createIconClass(e){let t="lm-MenuBar-itemIcon",r=e.title.iconClass;return r?`${t} ${r}`:t}formatLabel(e){let{label:t,mnemonic:r}=e.title;if(r<0||r>=t.length)return t;let i=t.slice(0,r),n=t.slice(r+1),a=t[r];return[i,ez.span({className:"lm-MenuBar-itemMnemonic"},a),n]}}tW.Renderer=tY,tW.defaultRenderer=new tY,(v=T||(T={})).createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-MenuBar-content",e.appendChild(t),t.setAttribute("role","menubar"),e},v.findMnemonic=function(e,t,r){let i=-1,n=-1,a=!1,o=t.toUpperCase();for(let t=0,s=e.length;t=0&&u1&&this.widgets.forEach(e=>{e.hiddenMode=this._hiddenMode}))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,super.dispose()}attachWidget(e,t){this._hiddenMode===eG.HiddenMode.Scale&&this._items.length>0?(1===this._items.length&&(this.widgets[0].hiddenMode=eG.HiddenMode.Scale),t.hiddenMode=eG.HiddenMode.Scale):t.hiddenMode=eG.HiddenMode.Display,B.ArrayExt.insert(this._items,e,new eJ(t)),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){B.ArrayExt.move(this._items,e,t),this.parent.update()}detachWidget(e,t){let r=B.ArrayExt.removeAt(this._items,e);this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterDetach),r.widget.node.style.zIndex="",this._hiddenMode===eG.HiddenMode.Scale&&(t.hiddenMode=eG.HiddenMode.Display,1===this._items.length&&(this._items[0].widget.hiddenMode=eG.HiddenMode.Display)),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let e=0,t=0;for(let r=0,i=this._items.length;r{this.createGraph(this._model)})}renderModel(e){if(this.hasGraphElement())return Promise.resolve();this._model=e;let t=e.data["image/png"];return null!=t?(this.updateImage(t),Promise.resolve()):this.createGraph(e)}hasGraphElement(){return null!==this.node.querySelector(".plot-container")}updateImage(e){this.hideGraph(),this._img_el.src="data:image/png;base64,"+e,this.showImage()}hideGraph(){let e=this.node.querySelector(".plot-container");null!=e&&(e.style.display="none")}showGraph(){let e=this.node.querySelector(".plot-container");null!=e&&(e.style.display="block")}hideImage(){let e=this.node.querySelector(".plot-img");null!=e&&(e.style.display="none")}showImage(){let e=this.node.querySelector(".plot-img");null!=e&&(e.style.display="block")}createGraph(t){let{data:r,layout:i,frames:n,config:a}=t.data[this._mimeType];return i.height||(i.height=360),(async()=>(null===e.Plotly&&(e.Plotly=await Promise.resolve().then(()=>O(j())),e._resolveLoadingPlotly()),e.loadingPlotly))().then(()=>e.Plotly.react(this.node,r,i,a)).then(r=>{this.showGraph(),this.hideImage(),this.update(),n&&e.Plotly.addFrames(this.node,n),this.node.offsetWidth>0&&this.node.offsetHeight>0&&e.Plotly.toImage(r,{format:"png",width:this.node.offsetWidth,height:this.node.offsetHeight}).then(e=>{let r=e.split(",")[1];t.data["image/png"]!==r&&t.setData({data:{...t.data,"image/png":r}})}),this.node.on("plotly_webglcontextlost",()=>{let e=t.data["image/png"];if(null!=e)return this.updateImage(e),Promise.resolve()})})}onAfterShow(e){this.update()}onResize(e){this.update()}onUpdateRequest(t){e.Plotly&&this.isVisible&&this.hasGraphElement()&&e.Plotly.redraw(this.node).then(()=>{e.Plotly.Plots.resize(this.node)})}static{this.Plotly=null}static{this.loadingPlotly=new Promise(t=>{e._resolveLoadingPlotly=t})}},tK={safe:!0,mimeTypes:[t$],createRenderer:e=>new tX(e)},tJ=[{id:"@jupyterlab/plotly-extension:factory",rendererFactory:tK,rank:2,dataType:"json",fileTypes:[{name:"plotly",mimeTypes:[t$],extensions:[".plotly",".plotly.json"],iconClass:"jp-MaterialIcon jp-PlotlyIcon"}],documentWidgetFactoryOptions:{name:"Plotly",primaryFileType:"plotly",fileTypes:["plotly","json"],defaultFor:["plotly"]}}];r.d(t,{MIME_TYPE:()=>t$,RenderedPlotly:()=>tX,default:()=>tJ,rendererFactory:()=>tK})},3(e){var t,r,i,n=e.exports={};function a(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var l=[],c=!1,u=-1;function h(){c&&i&&(c=!1,i.length?l=i.concat(l):u=-1,l.length&&d())}function d(){if(!c){var e=s(h);c=!0;for(var t=l.length;t;){for(i=l,l=[];++u1)for(var r=1;r ${i.overscaledZ}`),a=`${b} ${v}kB`,e.initDebugOverlayCanvas(),o=e.debugOverlayCanvas,s=e.context.gl,(l=e.debugOverlayCanvas.getContext("2d")).clearRect(0,0,o.width,o.height),l.shadowColor="white",l.shadowBlur=2,l.lineWidth=1.5,l.strokeStyle="white",l.textBaseline="top",l.font="bold 36px Open Sans, sans-serif",l.fillText(a,5,5),l.strokeText(a,5,5),e.debugOverlayTexture.update(o),e.debugOverlayTexture.bind(s.LINEAR,s.CLAMP_TO_EDGE);let _=e.transform.getProjectionData({overscaledTileID:i,applyGlobeMatrix:!0,applyTerrainMatrix:!0});h.draw(c,u.TRIANGLES,d,f,tT.alphaBlended,tM.disabled,rc(t.bo.transparent,x),null,_,m,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments),h.draw(c,u.LINE_STRIP,d,f,p,tM.disabled,rc(t.bo.red),g,_,m,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments)}(e,r,n)},debugPadding:function(e){var t,r;let i=e.transform.padding;iL(e,e.transform.height-(i.top||0),3,ik),iL(e,i.bottom||0,3,iA),iP(e,i.left||0,3,iS),iP(e,e.transform.width-(i.right||0),3,iE);let n=e.transform.centerPoint;t=n.x,r=e.transform.height-n.y,iI(e,t-1,r-10,2,20,iC),iI(e,t-10,r-1,20,2,iC)},terrainDepth:function(e,r){let i=e.context,n=i.gl,a=e.transform,o=tT.unblended,s=new tk(n.LEQUAL,tk.ReadWrite,[0,1]),l=r.tileManager.getRenderableTiles(),c=e.useProgram("terrainDepth");for(let u of(i.bindFramebuffer.set(r.getFramebuffer("depth").framebuffer),i.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),i.clear({color:t.bo.transparent,depth:1}),l)){let e=r.getTerrainMesh(u.tileID),t=r.getTerrainData(u.tileID),l=a.getProjectionData({overscaledTileID:u.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),h={u_ele_delta:r.getMeshFrameDelta(a.zoom)};c.draw(i,n.TRIANGLES,s,tA.disabled,o,tM.backCCW,h,t,l,"terrain",e.vertexBuffer,e.indexBuffer,e.segments)}i.bindFramebuffer.set(null),i.viewport.set([0,0,e.width,e.height])},terrainCoords:function(e,r){let i=e.context,n=i.gl,a=e.transform,o=tT.unblended,s=new tk(n.LEQUAL,tk.ReadWrite,[0,1]),l=r.getCoordsTexture(),c=r.tileManager.getRenderableTiles(),u=e.useProgram("terrainCoords");for(let h of(i.bindFramebuffer.set(r.getFramebuffer("coords").framebuffer),i.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),i.clear({color:t.bo.transparent,depth:1}),r.coordsIndex=[],c)){let e=r.getTerrainMesh(h.tileID),t=r.getTerrainData(h.tileID);i.activeTexture.set(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,l.texture);let c={u_terrain_coords_id:(255-r.coordsIndex.length)/255,u_texture:0,u_ele_delta:r.getMeshFrameDelta(a.zoom)},d=a.getProjectionData({overscaledTileID:h.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});u.draw(i,n.TRIANGLES,s,tA.disabled,o,tM.backCCW,c,t,d,"terrain",e.vertexBuffer,e.indexBuffer,e.segments),r.coordsIndex.push(h.tileID.key)}i.bindFramebuffer.set(null),i.viewport.set([0,0,e.width,e.height])}};class iR{constructor(e,r){this.drawFunctions=iO,this.context=new il(e),this.transform=r,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:t.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=eE.maxOverzooming+eE.maxUnderzooming+1,this.depthEpsilon=1/65536,this.crossTileSymbolIndex=new tr}resize(e,t,r){if(this.width=Math.floor(e*r),this.height=Math.floor(t*r),this.pixelRatio=r,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let e of this.style._order)this.style._layers[e].resize()}setup(){let e=this.context,r=new t.aU;r.emplaceBack(0,0),r.emplaceBack(t.a6,0),r.emplaceBack(0,t.a6),r.emplaceBack(t.a6,t.a6),this.tileExtentBuffer=e.createVertexBuffer(r,ts.members),this.tileExtentSegments=t.aV.simpleSegment(0,0,4,2);let i=new t.aU;i.emplaceBack(0,0),i.emplaceBack(t.a6,0),i.emplaceBack(0,t.a6),i.emplaceBack(t.a6,t.a6),this.debugBuffer=e.createVertexBuffer(i,ts.members),this.debugSegments=t.aV.simpleSegment(0,0,4,5);let n=new t.ch;n.emplaceBack(0,0,0,0),n.emplaceBack(t.a6,0,t.a6,0),n.emplaceBack(0,t.a6,0,t.a6),n.emplaceBack(t.a6,t.a6,t.a6,t.a6),this.rasterBoundsBuffer=e.createVertexBuffer(n,t5.members),this.rasterBoundsSegments=t.aV.simpleSegment(0,0,4,2);let a=new t.aU;a.emplaceBack(0,0),a.emplaceBack(t.a6,0),a.emplaceBack(0,t.a6),a.emplaceBack(t.a6,t.a6),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(a,ts.members),this.rasterBoundsSegmentsPosOnly=t.aV.simpleSegment(0,0,4,5);let o=new t.aU;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,ts.members),this.viewportSegments=t.aV.simpleSegment(0,0,4,2);let s=new t.ci;s.emplaceBack(0),s.emplaceBack(1),s.emplaceBack(3),s.emplaceBack(2),s.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(s);let l=new t.aW;l.emplaceBack(1,0,2),l.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(l);let c=this.context.gl;this.stencilClearMode=new tA({func:c.ALWAYS,mask:0},0,255,c.ZERO,c.ZERO,c.ZERO),this.tileExtentMesh=new to(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let i=t.O();t.c7(i,0,this.width,this.height,0,0,1),t.S(i,i,[r.drawingBufferWidth,r.drawingBufferHeight,0]),this.useProgram("clippingMask",null,!0).draw(e,r.TRIANGLES,tk.disabled,this.stencilClearMode,tT.disabled,tM.disabled,null,null,{mainMatrix:i,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:i},"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,t,r){if(this.currentStencilSource===e.source||!e.isTileClipped()||!t?.length)return;this.currentStencilSource=e.source,this.nextStencilID+t.length>256&&this.clearStencil();let i=this.context;i.setColorMode(tT.disabled),i.setDepthMode(tk.disabled);let n={};for(let e of t)n[e.key]=this.nextStencilID++;this._renderTileMasks(n,t,r,!0),this._renderTileMasks(n,t,r,!1),this._tileClippingMaskIDs=n}_renderTileMasks(e,t,r,i){var n;let a=this.context,o=a.gl,s=this.style.projection,l=this.transform,c=this.useProgram("clippingMask");for(let u of t){let t=e[u.key],h=null==(n=this.style.map.terrain)?void 0:n.getTerrainData(u),d=s.getMeshFromTileID(this.context,u.canonical,i,!0,"stencil"),f=l.getProjectionData({overscaledTileID:u,applyGlobeMatrix:!r,applyTerrainMatrix:!0});c.draw(a,o.TRIANGLES,tk.disabled,new tA({func:o.ALWAYS,mask:0},t,255,o.KEEP,o.KEEP,o.REPLACE),tT.disabled,r?tM.disabled:tM.backCCW,null,h,f,"$clipping",d.vertexBuffer,d.indexBuffer,d.segments)}}_renderTilesDepthBuffer(){var e;let t=this.context,r=t.gl,i=this.style.projection,n=this.transform,a=this.useProgram("depth"),o=this.getDepthModeFor3D();for(let s of ew(n,{tileSize:n.tileSize})){let l=null==(e=this.style.map.terrain)?void 0:e.getTerrainData(s),c=i.getMeshFromTileID(this.context,s.canonical,!0,!0,"raster"),u=n.getProjectionData({overscaledTileID:s,applyGlobeMatrix:!0,applyTerrainMatrix:!0});a.draw(t,r.TRIANGLES,o,tA.disabled,tT.disabled,tM.backCCW,null,l,u,"$clipping",c.vertexBuffer,c.indexBuffer,c.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let e=this.nextStencilID++,t=this.context.gl;return new tA({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)}stencilModeForClipping(e){let t=this.context.gl;return new tA({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){let t=this.context.gl,r=e.sort((e,t)=>t.overscaledZ-e.overscaledZ),i=r[r.length-1].overscaledZ,n=r[0].overscaledZ-i+1;if(n>1){this.currentStencilSource=void 0,this.nextStencilID+n>256&&this.clearStencil();let e={};for(let r=0;rt.overscaledZ-e.overscaledZ),i=r[r.length-1].overscaledZ,n=r[0].overscaledZ-i+1;if(this.clearStencil(),n>1){let e={},a={};for(let r=0;r0};for(let e in s){let t=s[e];t.used&&t.prepare(this.context),l[e]=t.getVisibleCoordinates(!1),c[e]=l[e].slice().reverse(),u[e]=t.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let e=0;ethis.useProgram(e)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?t.bo.black:t.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=o.length-1;this.currentLayer>=0;this.currentLayer--){let e=this.style._layers[o[this.currentLayer]],t=s[e.source],r=l[e.source];this._renderTileClippingMasks(e,r,!1),this.renderLayer(this,t,e,r,h)}this.renderPass="translucent";let d=!1;for(this.currentLayer=0;this.currentLayerr.source&&!r.isHidden(t)?[e.tileManagers[r.source]]:[]),n=i.filter(e=>"vector"===e.getSource().type),a=i.filter(e=>"vector"!==e.getSource().type),o=e=>{(!r||r.getSource().maxzoom0?t.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;let t=this.imageManager.getPattern(e.from.toString()),r=this.imageManager.getPattern(e.to.toString());return!t||!r}useProgram(e,t,r=!1,i=[]){var n;this.cache||(this.cache={});let a=!!this.style.map.terrain,o=this.style.projection,s=r?tn.projectionMercator:o.shaderPreludeCode,l=r?tl:o.shaderDefine,c=e+(t?t.cacheKey:"")+`/${r?tc:o.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(a?"/terrain":"")+(i?`/${i.join("/")}`:"");return(n=this.cache)[c]||(n[c]=new t7(this.context,tn[e],t,rC[e],this._showOverdrawInspector,a,s,l,i)),this.cache[c]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let 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(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new t.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var e,t;if(this._tileTextures){for(let e in this._tileTextures){let t=this._tileTextures[e];if(t)for(let e of t)e.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&(null==(e=this.tileExtentMesh.vertexBuffer)||e.destroy()),this.tileExtentMesh&&(null==(t=this.tileExtentMesh.indexBuffer)||t.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let e in this.cache){let t=this.cache[e];t?.program&&this.context.gl.deleteProgram(t.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:e,drawingBufferHeight:t}=this.context.gl;return this.width!==e||this.height!==t}}function iF(e,t){let r,i=!1,n=null,a=()=>{n=null,i&&(e(...r),n=setTimeout(a,t),i=!1)};return(...e)=>(i=!0,r=e,n||a(),n)}iR.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class ij{constructor(e){this._getCurrentHash=()=>{let e=window.location.hash.replace("#","");if(this._hashName){let t;for(let r of e.split("&").map(e=>e.split("=")))r[0]===this._hashName&&(t=r);return(t&&t[1]||"").split("/")}return e.split("/")},this._onHashChange=()=>{let e=this._getCurrentHash();if(!this._isValidHash(e))return!1;let t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0},this._updateHashUnthrottled=()=>{let e=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,e)},this._removeHash=()=>{let e=this._getCurrentHash();if(0===e.length)return;let t=e.join("/"),r=t;r.split("&").length>0&&(r=r.split("&")[0]),this._hashName&&(r=`${this._hashName}=${t}`);let i=window.location.hash.replace(r,"");i.startsWith("#&")?i=i.slice(0,1)+i.slice(2):"#"===i&&(i="");let n=window.location.href.replace(/(#.+)?$/,i);n=n.replace("&&","&"),window.history.replaceState(window.history.state,null,n)},this._updateHash=iF(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 t=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,i=Math.pow(10,Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10)),n=Math.round(t.lng*i)/i,a=Math.round(t.lat*i)/i,o=this._map.getBearing(),s=this._map.getPitch(),l="";if(l+=e?`/${n}/${a}/${r}`:`${r}/${a}/${n}`,(o||s)&&(l+="/"+Math.round(10*o)/10),s&&(l+=`/${Math.round(s)}`),this._hashName){let e=this._hashName,t=!1,r=window.location.hash.slice(1).split("&").map(r=>{let i=r.split("=")[0];return i===e?(t=!0,`${i}=${l}`):r}).filter(e=>e);return t||r.push(`${e}=${l}`),`#${r.join("&")}`}return`#${l}`}_isValidHash(e){if(e.length<3||e.some(isNaN))return!1;try{new t.W(+e[2],+e[1])}catch{return!1}let r=+e[0],i=+(e[3]||0),n=+(e[4]||0);return r>=this._map.getMinZoom()&&r<=this._map.getMaxZoom()&&i>=-180&&i<=180&&n>=this._map.getMinPitch()&&n<=this._map.getMaxPitch()}}let iB={linearity:.3,easing:t.cv(0,0,.3,1)},iN=t.e({deceleration:2500,maxSpeed:1400},iB),iU=t.e({deceleration:20,maxSpeed:1400},iB),iV=t.e({deceleration:1e3,maxSpeed:360},iB),iq=t.e({deceleration:1e3,maxSpeed:90},iB),iH=t.e({deceleration:1e3,maxSpeed:360},iB);class iG{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:v(),settings:e})}_drainInertiaBuffer(){let e=this._inertiaBuffer,t=v();for(;e.length>0&&t-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let r={zoom:0,bearing:0,pitch:0,roll:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:e}of this._inertiaBuffer)r.zoom+=e.zoomDelta||0,r.bearing+=e.bearingDelta||0,r.pitch+=e.pitchDelta||0,r.roll+=e.rollDelta||0,e.panDelta&&r.pan._add(e.panDelta),e.around&&(r.around=e.around),e.pinchAround&&(r.pinchAround=e.pinchAround);let i=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,n={};if(r.pan.mag()){let a=iY(r.pan.mag(),i,t.e({},iN,e||{})),o=r.pan.mult(a.amount/r.pan.mag()),s=this._map.cameraHelper.handlePanInertia(o,this._map.transform);n.center=s.easingCenter,n.offset=s.easingOffset,iW(n,a)}if(r.zoom){let e=iY(r.zoom,i,iU);n.zoom=t.cw(this._map.transform.zoom+e.amount,this._map.getZoomSnap(),e.amount),iW(n,e)}if(r.bearing){let e=iY(r.bearing,i,iV);n.bearing=this._map.transform.bearing+t.al(e.amount,-179,179),iW(n,e)}if(r.pitch){let e=iY(r.pitch,i,iq);n.pitch=this._map.transform.pitch+e.amount,iW(n,e)}if(r.roll){let e=iY(r.roll,i,iH);n.roll=this._map.transform.roll+t.al(e.amount,-179,179),iW(n,e)}if(n.zoom||n.bearing){let e=void 0===r.pinchAround?r.around:r.pinchAround;n.around=e?this._map.unproject(e):this._map.getCenter()}return this.clear(),t.e(n,{noMoveStart:!0})}}function iW(e,t){(!e.duration||e.durationr.unproject(e)),s=a.reduce((e,t,r,i)=>e.add(t.div(i.length)),new t.P(0,0));super(e,{points:a,point:s,lngLats:o,lngLat:r.unproject(s),originalEvent:i}),this._defaultPrevented=!1}}class iX extends t.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,r){super(e,{originalEvent:r}),this._defaultPrevented=!1}}class iK{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new iX(e.type,this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new iZ(e.type,this._map,e))}mouseup(e){this._map.fire(new iZ(e.type,this._map,e))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new iZ(e.type,this._map,e))}dblclick(e){return this._firePreventable(new iZ(e.type,this._map,e))}mouseover(e){this._map.fire(new iZ(e.type,this._map,e))}mouseout(e){this._map.fire(new iZ(e.type,this._map,e))}touchstart(e){return this._firePreventable(new i$(e.type,this._map,e))}touchmove(e){this._map.fire(new i$(e.type,this._map,e))}touchend(e){this._map.fire(new i$(e.type,this._map,e))}touchcancel(e){this._map.fire(new i$(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class iJ{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new iZ(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new iZ("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new iZ(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class iQ{constructor(e){this._map=e}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(e){return this.transform.screenPointToLocation(t.P.convert(e),this._map.terrain)}}class i0{constructor(e,t){this._map=e,this._tr=new iQ(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1,t.boxZoom&&"object"==typeof t.boxZoom&&(this._boxZoomEnd=t.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,t){this.isEnabled()&&e.shiftKey&&0===e.button&&(x.disableDrag(),this._startPos=this._lastPos=t,this._active=!0)}mousemoveWindow(e,t){if(!this._active||this._lastPos.equals(t)||!this._box&&t.dist(this._startPos)e.fitScreenCoordinates(i,r,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(e){this._active&&27===e.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),x.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,r){return this._map.fire(new t.n(e,{originalEvent:r}))}}function i1(e,t){if(e.length!==t.length)throw Error(`The number of touches and points are not equal - touches ${e.length}, points ${t.length}`);let r={};for(let i=0;ithis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),i.length===this.numTouches&&(this.centroid=function(e){let r=new t.P(0,0);for(let t of e)r._add(t);return r.div(e.length)}(r),this.touches=i1(i,r)))}touchmove(e,t,r){if(this.aborted||!this.centroid)return;let i=i1(r,t);for(let e in this.touches){let t=i[e];(!t||t.dist(this.touches[e])>30)&&(this.aborted=!0)}}touchend(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){let e=!this.aborted&&this.centroid;if(this.reset(),e)return e}}}class i3{constructor(e){this.singleTap=new i2(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,t,r){this.singleTap.touchstart(e,t,r)}touchmove(e,t,r){this.singleTap.touchmove(e,t,r)}touchend(e,t,r){let i=this.singleTap.touchend(e,t,r);if(i){let t=e.timeStamp-this.lastTime<500,r=!this.lastTap||30>this.lastTap.dist(i);if(t&&r||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=i,this.count===this.numTaps)return this.reset(),i}}}class i5{constructor(e){this._tr=new iQ(e),this._zoomIn=new i3({numTouches:1,numTaps:2}),this._zoomOut=new i3({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,t,r){this._zoomIn.touchstart(e,t,r),this._zoomOut.touchstart(e,t,r)}touchmove(e,t,r){this._zoomIn.touchmove(e,t,r),this._zoomOut.touchmove(e,t,r)}touchend(e,r,i){let n=this._zoomIn.touchend(e,r,i),a=this._zoomOut.touchend(e,r,i),o=this._tr;return n?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:r=>r.easeTo({duration:300,zoom:t.cw(o.zoom+1,r.getZoomSnap()),around:o.unproject(n)},{originalEvent:e})}):a?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:r=>r.easeTo({duration:300,zoom:t.cw(o.zoom-1,r.getZoomSnap()),around:o.unproject(a)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class i4{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 t=this._moveFunction(...e);if(t.bearingDelta||t.pitchDelta||t.rollDelta||t.around||t.panDelta)return this._active=!0,t}dragStart(e,t){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(t)?t[0]:t,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,t){if(!this.isEnabled())return;let r=this._lastPoint;if(!r)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);let i=Array.isArray(t)?t[0]:t;return!this._moved&&i.dist(r)!0}),t=new i9){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=t}_executeRelevantHandler(e,t,r){return e instanceof MouseEvent?t(e):"u">typeof TouchEvent&&e instanceof TouchEvent?r(e):void 0}startMove(e){this._executeRelevantHandler(e,e=>{this.mouseMoveStateManager.startMove(e)},e=>{this.oneFingerTouchMoveStateManager.startMove(e)})}endMove(e){this._executeRelevantHandler(e,e=>{this.mouseMoveStateManager.endMove(e)},e=>{this.oneFingerTouchMoveStateManager.endMove(e)})}isValidStartEvent(e){return this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidStartEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidStartEvent(e))}isValidMoveEvent(e){return this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidMoveEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(e))}isValidEndEvent(e){return this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidEndEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidEndEvent(e))}}let ne=e=>{e.mousedown=e.dragStart,e.mousemoveWindow=e.dragMove,e.mouseup=e.dragEnd,e.contextmenu=e=>{e.preventDefault()}};class nt{constructor(e,t){this._clickTolerance=e.clickTolerance||1,this._map=t,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,t,r){return this._calculateTransform(e,t,r)}touchmove(e,t,r){if(this._active){if(!this._shouldBePrevented(r.length))return e.preventDefault(),this._calculateTransform(e,t,r);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,t,r){this._calculateTransform(e,t,r),this._active&&this._shouldBePrevented(r.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,r,i){i.length>0&&(this._active=!0);let n=i1(i,r),a=new t.P(0,0),o=new t.P(0,0),s=0;for(let e in n){let t=n[e],r=this._touches[e];r&&(a._add(t),o._add(t.sub(r)),s++,n[e]=t)}if(this._touches=n,this._shouldBePrevented(s)||!o.mag())return;let l=o.div(s);return this._sum._add(l),this._sum.mag()Math.abs(e.x)}class nc extends nr{constructor(e){super(),this._currentTouchCount=0,this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,t,r){super.touchstart(e,t,r),this._currentTouchCount=r.length}_start(e){this._lastPoints=e,nl(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,t,r){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let i=e[0].sub(this._lastPoints[0]),n=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(i,n,r.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:-((i.y+n.y)/2*.5)}):void 0}gestureBeginsVertically(e,t,r){if(void 0!==this._valid)return this._valid;let i=e.mag()>=2,n=t.mag()>=2;if(!i&&!n)return;if(!i||!n)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;let a=e.y>0==t.y>0;return nl(e)&&nl(t)&&a}}let nu=100,nh=15,nd=10;class nf{constructor(e){this._tr=new iQ(e),this._panStep=nu,this._bearingStep=nh,this._pitchStep=nd,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let r=0,i=0,n=0,a=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?i=-1:(e.preventDefault(),a=-1);break;case 39:e.shiftKey?i=1:(e.preventDefault(),a=1);break;case 38:e.shiftKey?n=1:(e.preventDefault(),o=-1);break;case 40:e.shiftKey?n=-1:(e.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(i=0,n=0),{cameraAnimation:s=>{let l=this._tr;s.easeTo({duration:300,easeId:"keyboardHandler",easing:np,zoom:r?t.cw(l.zoom+r*(e.shiftKey?2:1),s.getZoomSnap()):l.zoom,bearing:l.bearing+i*this._bearingStep,pitch:l.pitch+n*this._pitchStep,offset:[-a*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}}function np(e){return e*(2-e)}let nm=1/450;class ng{constructor(e,t){this._onTimeout=e=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},this._map=e,this._tr=new iQ(e),this._triggerRenderFrame=t,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=nm}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around)}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let t=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,r=v(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==t&&t%4.000244140625==0?this._type="wheel":0!==t&&4>Math.abs(t)?this._type="trackpad":i>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=200>Math.abs(i*t)?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,t+=this._lastValue)),e.shiftKey&&t&&(t/=4),this._type&&(this._lastWheelEvent=e,this._delta-=t,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=x.mousePos(this._map.getCanvas(),e),i=this._tr;this._aroundPoint=this._aroundCenter?i.transform.locationToScreenPoint(t.W.convert(i.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("number"==typeof this._lastExpectedZoom){let t=e.zoom-this._lastExpectedZoom;"number"==typeof this._startZoom&&(this._startZoom+=t),"number"==typeof this._targetZoom&&(this._targetZoom+=t)}if(0!==this._delta){let r="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*r)));this._delta<0&&0!==i&&(i=1/i);let n="number"!=typeof this._targetZoom?e.scale:t.ao(this._targetZoom),a=e.applyConstrain(e.getCameraLngLat(),t.ar(n*i)).zoom,o=this._map.getZoomSnap();if("wheel"===this._type&&o>0){let r=t.cw(e.zoom,o);this._targetZoom=t.cw(a,o,a-r)}else this._targetZoom=a;"wheel"===this._type&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let r="number"!=typeof this._targetZoom?e.zoom:this._targetZoom,i=this._startZoom,n=this._easing,a,o=!1;if("wheel"===this._type&&i&&n){let e=Math.min((v()-this._lastWheelEventTime+5)/200,1),s=n(e);a=t.H.number(i,r,s),e<1?this._needsRerender=!0:o=!0}else a=r,o=!0;return this._active=!0,o&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=a,{noInertia:!0,needsRenderFrame:!o,zoomDelta:a-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let r=t.cy;if(this._prevEase){let e=this._prevEase,i=(v()-e.start)/e.duration,n=e.easing(i+.01)-e.easing(i),a=.27/Math.sqrt(n*n+1e-4)*.01,o=Math.sqrt(.0729-a*a);r=t.cv(a,o,.25,1)}return this._prevEase={start:v(),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)}}class ny{constructor(e,t){this._clickZoom=e,this._tapZoom=t}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class nv{constructor(e){this._tr=new iQ(e),this.reset()}reset(){this._active=!1}dblclick(e,r){return e.preventDefault(),{cameraAnimation:i=>{i.easeTo({duration:300,zoom:t.cw(this._tr.zoom+(e.shiftKey?-1:1),i.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}}class nx{constructor(){this._tap=new i3({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,t,r){if(!this._swipePoint)if(this._tapTime){let i=t[0],n=e.timeStamp-this._tapTime<500,a=30>this._tapPoint.dist(i);n&&a?r.length>0&&(this._swipePoint=i,this._swipeTouch=r[0].identifier):this.reset()}else this._tap.touchstart(e,t,r)}touchmove(e,t,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;let i=t[0],n=i.y-this._swipePoint.y;return this._swipePoint=i,e.preventDefault(),this._active=!0,{zoomDelta:n/128*this._zoomRate}}}else this._tap.touchmove(e,t,r)}touchend(e,t,r){if(this._tapTime)this._swipePoint&&0===r.length&&this.reset();else{let i=this._tap.touchend(e,t,r);i&&(this._tapTime=e.timeStamp,this._tapPoint=i)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class nb{constructor(e,t,r){this._el=e,this._mousePan=t,this._touchPan=r}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()}}class n_{constructor(e,t,r,i){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=t,this._mousePitch=r,this._mouseRoll=i}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class nw{constructor(e,t,r,i){this._el=e,this._touchZoom=t,this._touchRotate=r,this._tapDragZoom=i,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()}}class nT{constructor(e,t){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=e,this._options=t,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=x.create("div","maplibregl-cooperative-gesture-screen",e);let t=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");"metaKey"===this._bypassKey&&(t=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let r=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),i=document.createElement("div");i.className="maplibregl-desktop-message",i.textContent=t,this._container.appendChild(i);let n=document.createElement("div");n.className="maplibregl-mobile-message",n.textContent=r,this._container.appendChild(n),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 t.n("cooperativegestureprevented",{gestureType:e,originalEvent:r})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let nM=e=>e.zoom||e.drag||e.roll||e.pitch||e.rotate;class nk extends t.n{}function nA(e){var t;return(null==(t=e.panDelta)?void 0:t.mag())||e.zoomDelta||e.bearingDelta||e.pitchDelta||e.rollDelta}class nS{get _ownerDocument(){var e;return(null==(e=this._el)?void 0:e.ownerDocument)||document}get _ownerWindow(){var e,t;return(null==(t=null==(e=this._el)?void 0:e.ownerDocument)?void 0:t.defaultView)||window}constructor(e,r){this.handleWindowEvent=e=>{this.handleEvent(e,`${e.type}Window`)},this.handleEvent=(e,r)=>{if("blur"===e.type)return void this.stop(!0);this._updatingCamera=!0;let i="renderFrame"===e.type?void 0:e,n={needsRenderFrame:!1},a={},o={};for(let{handlerName:s,handler:l,allowed:c}of this._handlers){let u;if(l.isEnabled()){if(this._blockedByActive(o,c,s))l.reset();else if(l[r||e.type]){if(t.cz(e,r||e.type)){let t=x.mousePos(this._map.getCanvas(),e);u=l[r||e.type](e,t)}else if(t.cA(e,r||e.type)){let t=this._getMapTouches(e.touches),i=x.touchPos(this._map.getCanvas(),t);u=l[r||e.type](e,i,t)}else t.cB(r||e.type)||(u=l[r||e.type](e));this.mergeHandlerResult(n,a,u,s,i),u?.needsRenderFrame&&this._triggerRenderFrame()}(u||l.isActive())&&(o[s]=l)}}let s={};for(let e in this._previousActiveHandlers)o[e]||(s[e]=i);this._previousActiveHandlers=o,(Object.keys(s).length||nA(n))&&(this._changes.push([n,a,s]),this._triggerRenderFrame()),(Object.keys(o).length||nA(n))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:l}=n;l&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],l(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new iG(e),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r);let i=this._el;for(let[e,t,r]of(this._listeners=[[i,"touchstart",{passive:!0}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]],this._listeners))e.addEventListener(t,e===this._ownerDocument?this.handleWindowEvent:this.handleEvent,r)}destroy(){for(let[e,t,r]of this._listeners)e.removeEventListener(t,e===this._ownerDocument?this.handleWindowEvent:this.handleEvent,r)}_addDefaultHandlers(e){let r=this._map,i=r.getCanvasContainer();this._add("mapEvent",new iK(r,e));let n=r.boxZoom=new i0(r,e);this._add("boxZoom",n),e.interactive&&e.boxZoom&&n.enable();let a=r.cooperativeGestures=new nT(r,e.cooperativeGestures);this._add("cooperativeGestures",a),e.cooperativeGestures&&a.enable();let o=new i5(r),s=new nv(r);r.doubleClickZoom=new ny(s,o),this._add("tapZoom",o),this._add("clickZoom",s),e.interactive&&e.doubleClickZoom&&r.doubleClickZoom.enable();let l=new nx;this._add("tapDragZoom",l);let c=r.touchPitch=new nc(r);this._add("touchPitch",c),e.interactive&&e.touchPitch&&r.touchPitch.enable(e.touchPitch);let u=()=>r.project(r.getCenter()),h=function({enable:e,clickTolerance:r,aroundCenter:i=!0,minPixelCenterThreshold:n=100,rotateDegreesPerPixelMoved:a=.8},o){return new i4({clickTolerance:r,move:(e,r)=>{let s=o();if(i&&Math.abs(s.y-e.y)>n)return{bearingDelta:t.cx(new t.P(e.x,r.y),r,s)};let l=(r.x-e.x)*a;return i&&r.y0===e.button&&e.ctrlKey||2===e.button&&!e.ctrlKey}),enable:e,assignEvents:ne})}(e,u),d=function({enable:e,clickTolerance:t,pitchDegreesPerPixelMoved:r=-.5}){return new i4({clickTolerance:t,move:(e,t)=>({pitchDelta:(t.y-e.y)*r}),moveStateManager:new i8({checkCorrectEvent:e=>0===e.button&&e.ctrlKey||2===e.button}),enable:e,assignEvents:ne})}(e),f=function({enable:e,clickTolerance:t,rollDegreesPerPixelMoved:r=.3},i){return new i4({clickTolerance:t,move:(e,t)=>{let n=i(),a=(t.x-e.x)*r;return t.y2===e.button&&e.ctrlKey}),enable:e,assignEvents:ne})}(e,u);r.dragRotate=new n_(e,h,d,f),this._add("mouseRotate",h,["mousePitch"]),this._add("mousePitch",d,["mouseRotate","mouseRoll"]),this._add("mouseRoll",f,["mousePitch"]),e.interactive&&e.dragRotate&&r.dragRotate.enable();let p=function({enable:e,clickTolerance:t}){return new i4({clickTolerance:t,move:(e,t)=>({around:t,panDelta:t.sub(e)}),activateOnStart:!0,moveStateManager:new i8({checkCorrectEvent:e=>0===e.button&&!e.ctrlKey}),enable:e,assignEvents:ne})}(e),m=new nt(e,r);r.dragPan=new nb(i,p,m),this._add("mousePan",p),this._add("touchPan",m,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&r.dragPan.enable(e.dragPan);let g=new ns,y=new na;r.touchZoomRotate=new nw(i,y,g,l),this._add("touchRotate",g,["touchPan","touchZoom"]),this._add("touchZoom",y,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&r.touchZoomRotate.enable(e.touchZoomRotate),this._add("blockableMapEvent",new iJ(r));let v=r.scrollZoom=new ng(r,()=>this._triggerRenderFrame());this._add("scrollZoom",v,["mousePan"]),e.interactive&&e.scrollZoom&&r.scrollZoom.enable(e.scrollZoom);let x=r.keyboard=new nf(r);this._add("keyboard",x),e.interactive&&e.keyboard&&r.keyboard.enable()}_add(e,t,r){this._handlers.push({handlerName:e,handler:t,allowed:r}),this._handlersById[e]=t}stop(e){if(!this._updatingCamera){for(let{handler:e}of this._handlers)e.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!!nM(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,t,r){for(let i in e)if(i!==r&&!t?.includes(i))return!0;return!1}_getMapTouches(e){let t=[];for(let r of e)this._el.contains(r.target)&&t.push(r);return t}mergeHandlerResult(e,r,i,n,a){if(!i)return;t.e(e,i);let o={handlerName:n,originalEvent:i.originalEvent||a};void 0!==i.zoomDelta&&(r.zoom=o),void 0!==i.panDelta&&(r.drag=o),void 0!==i.rollDelta&&(r.roll=o),void 0!==i.pitchDelta&&(r.pitch=o),void 0!==i.bearingDelta&&(r.rotate=o)}_applyChanges(){let e={},r={},i={};for(let[n,a,o]of this._changes)n.panDelta&&(e.panDelta=(e.panDelta||new t.P(0,0))._add(n.panDelta)),n.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+n.zoomDelta),n.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+n.bearingDelta),n.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+n.pitchDelta),n.rollDelta&&(e.rollDelta=(e.rollDelta||0)+n.rollDelta),void 0!==n.around&&(e.around=n.around),void 0!==n.pinchAround&&(e.pinchAround=n.pinchAround),n.noInertia&&(e.noInertia=n.noInertia),t.e(r,a),t.e(i,o);this._updateMapTransform(e,r,i),this._changes=[]}_updateMapTransform(e,t,r){let i=this._map,n=i._getTransformForUpdate(),a=i.terrain;if(!(nA(e)||a&&this._terrainMovement))return void this._fireEvents(t,r,!0);i._stop(!0);let{panDelta:o,zoomDelta:s,bearingDelta:l,pitchDelta:c,rollDelta:u,around:h,pinchAround:d}=e;void 0!==d&&(h=d),h||(h=i.transform.centerPoint),a&&!n.isPointOnMapSurface(h)&&(h=n.centerPoint);let f={panDelta:o,zoomDelta:s,rollDelta:u,pitchDelta:c,bearingDelta:l,around:h};this._map.cameraHelper.useGlobeControls&&!n.isPointOnMapSurface(h)&&(h=n.centerPoint);let p=.01>h.distSqr(n.centerPoint)?n.center:n.screenPointToLocation(o?h.sub(o):h);this._handleMapControls({terrain:a,tr:n,deltasForHelper:f,preZoomAroundLoc:p,combinedEventsInProgress:t,panDelta:o}),i._applyUpdatedTransform(n),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(t,r,!0)}_handleMapControls({terrain:e,tr:t,deltasForHelper:r,preZoomAroundLoc:i,combinedEventsInProgress:n,panDelta:a}){let o=this._map.cameraHelper;(o.handleMapControlsRollPitchBearingZoom(r,t),e)?o.useGlobeControls?(!this._terrainMovement&&(n.drag||n.zoom)&&(this._terrainMovement=!0,this._map._elevationFreeze=!0),o.handleMapControlsPan(r,t,i)):!this._terrainMovement&&(n.drag||n.zoom)?(this._terrainMovement=!0,this._map._elevationFreeze=!0,o.handleMapControlsPan(r,t,i)):n.drag&&this._terrainMovement&&a?t.setCenter(t.screenPointToLocation(t.centerPoint.sub(a))):o.handleMapControlsPan(r,t,i):o.handleMapControlsPan(r,t,i)}_fireEvents(e,r,i){let n=nM(this._eventsInProgress),a=nM(e),o={};for(let t in e){let{originalEvent:r}=e[t];this._eventsInProgress[t]||(o[`${t}start`]=r),this._eventsInProgress[t]=e[t]}for(let e in!n&&a&&this._fireEvent("movestart",a.originalEvent),o)this._fireEvent(e,o[e]);for(let t in a&&this._fireEvent("move",a.originalEvent),e){let{originalEvent:r}=e[t];this._fireEvent(t,r)}let s={},l;for(let e in this._eventsInProgress){let{handlerName:t,originalEvent:i}=this._eventsInProgress[e];this._handlersById[t].isActive()||(delete this._eventsInProgress[e],l=r[t]||i,s[`${e}end`]=l)}for(let e in s)this._fireEvent(e,s[e]);let c=nM(this._eventsInProgress),u=(n||a)&&!c;if(u&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let e=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&e.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(e)}if(i&&u){this._updatingCamera=!0;let e=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),r=e=>0!==e&&-this._bearingSnap{delete this._frameId,this.handleEvent(new nk("renderFrame",{timeStamp:e})),this._applyChanges()})}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}class nE extends t.E{constructor(e,t,r){super(),this._renderFrameCallback=()=>{let e=Math.min((v()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=r.bearingSnap,this._zoomSnap=r.zoomSnap,this.cameraHelper=t,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(e,t){e.apply(this.transform,!0),this.transform=e,this.cameraHelper=t}getCenter(){return new t.W(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,t){return this.jumpTo({elevation:e},t),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,r,i){return e=t.P.convert(e).mult(-1),this.panTo(this.transform.center,t.e({offset:e},r),i)}panTo(e,r,i){return this.easeTo(t.e({center:e},r),i)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(e,r,i){return this.easeTo(t.e({zoom:e},r),i)}zoomIn(e,r){return this.zoomTo(t.cw(this.getZoom()+1,this._zoomSnap),e,r),this}zoomOut(e,r){return this.zoomTo(t.cw(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 t.n("movestart",r)).fire(new t.n("move",r)).fire(new t.n("moveend",r))),this}getBearing(){return this.transform.bearing}setZoomSnap(e){return this._zoomSnap=e,this}getZoomSnap(){return this._zoomSnap}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(e,r,i){return this.easeTo(t.e({bearing:e},r),i)}resetNorth(e,r){return this.rotateTo(0,t.e({duration:1e3},e),r),this}resetNorthPitch(e,r){return this.easeTo(t.e({bearing:0,pitch:0,roll:0,duration:1e3},e),r),this}snapToNorth(e,t){return Math.abs(this.getBearing()){m.easeFunc(t),this.terrain&&!e.freezeElevation&&this._updateElevation(t),this._applyUpdatedTransform(i),this._fireMoveEvents(r)},t=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r,t)},e),this}_prepareEase(e,r,i={}){this._moving=!0,r||i.moving||this.fire(new t.n("movestart",e)),this._zooming&&!i.zooming&&this.fire(new t.n("zoomstart",e)),this._rotating&&!i.rotating&&this.fire(new t.n("rotatestart",e)),this._pitching&&!i.pitching&&this.fire(new t.n("pitchstart",e)),this._rolling&&!i.rolling&&this.fire(new t.n("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){void 0!==this._elevationStart&&void 0!==this._elevationCenter||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let r=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&r!==this._elevationTarget){let t=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(t-(r-(t*e+this._elevationStart))/(1-e)),this._elevationTarget=r}this.transform.setElevation(t.H.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};let t=e.getCameraLngLat(),r=e.getCameraAltitude(),i=this.terrain?this.terrain.getElevationForLngLatZoom(t,e.zoom):0;if(rthis._elevateCameraIfInsideTerrain(e)),this.transformCameraUpdate&&t.push(e=>this.transformCameraUpdate(e)),!t.length)return;let r=e.clone();for(let e of t){let t=r.clone(),{center:i,zoom:n,roll:a,pitch:o,bearing:s,elevation:l}=e(t);i&&t.setCenter(i),void 0!==l&&t.setElevation(l),void 0!==n&&t.setZoom(n),void 0!==a&&t.setRoll(a),void 0!==o&&t.setPitch(o),void 0!==s&&t.setBearing(s),r.apply(t,!1)}this.transform.apply(r,!1)}_fireMoveEvents(e){this.fire(new t.n("move",e)),this._zooming&&this.fire(new t.n("zoom",e)),this._rotating&&this.fire(new t.n("rotate",e)),this._pitching&&this.fire(new t.n("pitch",e)),this._rolling&&this.fire(new t.n("roll",e))}_afterEase(e,r){if(this._easeId&&r&&this._easeId===r)return;delete this._easeId;let i=this._zooming,n=this._rotating,a=this._pitching,o=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,i&&this.fire(new t.n("zoomend",e)),n&&this.fire(new t.n("rotateend",e)),a&&this.fire(new t.n("pitchend",e)),o&&this.fire(new t.n("rollend",e)),this.fire(new t.n("moveend",e))}flyTo(e,r){if(!e.essential&&g.prefersReducedMotion){let i=t.V(e,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(i,r)}this.stop(),"zoom"in(e=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.cy},e))&&this._zoomSnap&&(e.zoom=t.cw(e.zoom,this._zoomSnap));let i=this._getTransformForUpdate(),n=i.bearing,a=i.pitch,o=i.roll,s=i.padding,l="bearing"in e?this._normalizeBearing(e.bearing,n):n,c="pitch"in e?+e.pitch:a,u="roll"in e?this._normalizeBearing(e.roll,o):o,h="padding"in e?e.padding:i.padding,d=t.P.convert(e.offset),f=i.centerPoint.add(d),p=i.screenPointToLocation(f),m=this.cameraHelper.handleFlyTo(i,{bearing:l,pitch:c,roll:u,padding:h,locationAtOffset:p,offsetAsPoint:d,center:e.center,minZoom:e.minZoom,zoom:e.zoom}),y=e.curve,v=Math.max(i.width,i.height),x=v/m.scaleOfZoom,b=m.pixelPathLength;"number"==typeof m.scaleOfMinZoom&&(y=Math.sqrt(v/m.scaleOfMinZoom/b*2));let _=y*y;function w(e){let t=(x*x-v*v+(e?-1:1)*_*_*b*b)/(2*(e?x:v)*_*b);return Math.log(Math.sqrt(t*t+1)-t)}function T(e){return(Math.exp(e)-Math.exp(-e))/2}function M(e){return(Math.exp(e)+Math.exp(-e))/2}let k=w(!1),A=function(e){return M(k)/M(k+y*e)},S=function(e){var t;return v*((M(k)*(T(t=k+y*e)/M(t))-T(k))/_)/b},E=(w(!0)-k)/y;if(2e-6>Math.abs(b)||!isFinite(E)){if(1e-6>Math.abs(v-x))return this.easeTo(e,r);let t=x0,A=e=>Math.exp(t*y*e)}return e.duration="duration"in e?+e.duration:1e3*E/("screenSpeed"in e?e.screenSpeed/y:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=n!==l,this._pitching=c!==a,this._rolling=u!==o,this._padding=!i.isPaddingEqual(h),this._prepareEase(r,!1),this.terrain&&this._prepareElevation(m.targetCenter),this._ease(p=>{let g=p*E,y=1/A(g),v=S(g);this._rotating&&i.setBearing(t.H.number(n,l,p)),this._pitching&&i.setPitch(t.H.number(a,c,p)),this._rolling&&i.setRoll(t.H.number(o,u,p)),this._padding&&(i.interpolatePadding(s,h,p),f=i.centerPoint.add(d)),m.easeFunc(p,y,v,f),this.terrain&&!e.freezeElevation&&this._updateElevation(p),this._applyUpdatedTransform(i),this._fireMoveEvents(r)},()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r)},e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,t){var r;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let e=this._onEaseEnd;delete this._onEaseEnd,e.call(this,t)}return e||null==(r=this.handlers)||r.stop(!1),this}_ease(e,t,r){!1===r.animate||0===r.duration?(e(1),t()):(this._easeStart=v(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=t,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,r){let i=Math.abs((e=t.X(e,-180,180))-r);return Math.abs(e-360-r)MapLibre
'};class nL{constructor(e=nC){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=e=>{e&&("metadata"===e.sourceDataType||"visibility"===e.sourceDataType||"style"===e.dataType||"terrain"===e.type)&&this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?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=x.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=x.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=x.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,t){let r=this._map._getUIString(`AttributionControl.${t}`);e.title=r,e.setAttribute("aria-label",r)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(e=>"string"!=typeof e?"":e)):"string"==typeof this.options.customAttribution&&e.push(this.options.customAttribution)),this._map.style.stylesheet){let e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}let t=this._map.style.tileManagers;for(let r in t){let i=t[r];if(i.used||i.usedForTerrain){let t=i.getSource();t.attribution&&!e.includes(t.attribution)&&e.push(t.attribution)}}(e=e.filter(e=>String(e).trim())).sort((e,t)=>e.length-t.length);let r=(e=e.filter((t,r)=>{for(let i=r+1;i{let e=this._container.children;if(e.length){let t=e[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&t.classList.add("maplibregl-compact"):t.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){var t;this._map=e,this._compact=null==(t=this.options)?void 0:t.compact,this._container=x.create("div","maplibregl-ctrl");let r=x.create("a","maplibregl-ctrl-logo");return r.target="_blank",r.rel="noopener nofollow",r.href="https://maplibre.org/",r.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),r.setAttribute("rel","noopener nofollow"),this._container.appendChild(r),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class nI{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){let t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){let t=this._currentlyRunning;for(let r of t?this._queue.concat(t):this._queue)if(r.id===e)return void(r.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw Error("Attempting to run(), but is already running.");let t=this._currentlyRunning=this._queue;for(let r of(this._queue=[],t))if(!r.cancelled&&(r.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var nz=t.aS([{name:"a_pos3d",type:"Int16",components:3}]);class nD extends t.E{constructor(e){super(),this._lastTilesetChange=v(),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}getSource(){return this.tileManager._source}update(e,r){this.tileManager.update(e,r),this._renderableTilesKeys=[];let i={};for(let n of ew(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:r,calculateTileZoom:this.tileManager._source.calculateTileZoom}))i[n.key]=!0,this._renderableTilesKeys.push(n.key),this._tiles[n.key]||(n.terrainRttPosMatrix32f=new Float64Array(16),t.c7(n.terrainRttPosMatrix32f,0,t.a6,t.a6,0,0,1),this._tiles[n.key]=new eu(n,this.tileSize),this._lastTilesetChange=v());for(let e in this._tiles)i[e]||delete this._tiles[e]}freeRtt(e){for(let t in this._tiles){let r=this._tiles[t];(!e||r.tileID.equals(e)||r.tileID.isChildOf(e)||e.isChildOf(r.tileID))&&(r.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,t){return t?this._getTerrainCoordsForTileRanges(e,t):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){let r={};for(let i of this._renderableTilesKeys){let n=this._tiles[i].tileID,a=e.clone(),o=t.bj();if(n.canonical.equals(e.canonical))t.c7(o,0,t.a6,t.a6,0,0,1);else if(n.canonical.isChildOf(e.canonical)){let r=n.canonical.z-e.canonical.z,i=n.canonical.x-(n.canonical.x>>r<>r<>r;t.c7(o,0,s,s,0,0,1),t.Q(o,o,[-i*s,-a*s,0])}else{if(!e.canonical.isChildOf(n.canonical))continue;{let r=e.canonical.z-n.canonical.z,i=e.canonical.x-(e.canonical.x>>r<>r<>r;t.c7(o,0,t.a6,t.a6,0,0,1),t.Q(o,o,[i*s,a*s,0]),t.S(o,o,[1/2**r,1/2**r,0])}}a.terrainRttPosMatrix32f=new Float32Array(o),r[i]=a}return r}_getTerrainCoordsForTileRanges(e,r){let i={};for(let n of this._renderableTilesKeys){let a=this._tiles[n].tileID;if(!this._isWithinTileRanges(a,r))continue;let o=e.clone(),s=t.bj();if(a.canonical.z===e.canonical.z){let r=e.canonical.x-a.canonical.x+e.wrap*(1<e.canonical.z){let r=a.canonical.z-e.canonical.z,i=a.canonical.x-(a.canonical.x>>r<>r<>r),l=e.canonical.y-(a.canonical.y>>r),c=t.a6>>r;t.c7(s,0,c,c,0,0,1),t.Q(s,s,[-i*c+o*t.a6,-n*c+l*t.a6,0])}else{let r=e.canonical.z-a.canonical.z,i=e.canonical.x-(e.canonical.x>>r<>r<>r)-a.canonical.x,l=(e.canonical.y>>r)-a.canonical.y,c=t.a6<n.maxzoom&&(a=n.maxzoom),a=n.minzoom&&!o?.dem;)o=this.findTileInCaches(e.scaledTo(a--).key);return o}findTileInCaches(e){let t=this.tileManager.getTileByID(e);return t||(t=this.tileManager._outOfViewCache.getByKey(e))}anyTilesAfterTime(e=Date.now()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,t){let r=t[e.canonical.z];return!!r&&(e.wrap>r.minWrap||e.wrap=r.minTileXWrapped&&e.canonical.x<=r.maxTileXWrapped&&e.canonical.y>=r.minTileY&&e.canonical.y<=r.maxTileY)}}class nO{constructor(e,t,r){this._meshCache={},this.painter=e,this.tileManager=new nD(t),this.options=r,this.exaggeration="number"==typeof r.exaggeration?r.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){for(let e in this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null),this._meshCache)this._meshCache[e].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(e,r,i,n=t.a6){var a;let o=e.normalizeCoordinates(r,i,n);if(!o)return 0;let s=this.getTerrainData(o.tileID),l=null==(a=s.tile)?void 0:a.dem;if(!l)return 0;let c=t.cC([],[o.x/n*t.a6,o.y/n*t.a6],s.u_terrain_matrix),u=[c[0]*l.dim,c[1]*l.dim],h=Math.floor(u[0]),d=Math.floor(u[1]),f=u[0]-h,p=u[1]-d;return l.get(h,d)*(1-f)*(1-p)+l.get(h+1,d)*f*(1-p)+l.get(h,d+1)*(1-f)*p+l.get(h+1,d+1)*f*p}getElevationForLngLatZoom(e,r){if(!t.cD(r,e.wrap()))return 0;let{tileID:i,mercatorX:n,mercatorY:a}=this._getOverscaledTileIDFromLngLatZoom(e,r);return this.getElevation(i,n%t.a6,a%t.a6,t.a6)}getElevationForLngLat(e,t){let r=ew(t,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),i=0;for(let e of r)e.canonical.z>i&&(i=Math.min(e.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(e,i)}getElevation(e,r,i,n=t.a6){return this.getDEMElevation(e,r,i,n)*this.exaggeration}getTerrainData(e){var r,i;if(!this._emptyDemTexture){let e=this.painter.context,r=new t.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new t.T(e,r,e.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new t.T(e,new t.R({width:1,height:1}),e.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=t.ap([])}let n=this.tileManager.getSourceTile(e,!0);if(n?.dem&&(!n.demTexture||n.needsTerrainPrepare)){let e=this.painter.context;n.demTexture=this.painter.getTileTexture(n.dem.stride),n.demTexture?n.demTexture.update(n.dem.getPixels(),{premultiply:!1}):n.demTexture=new t.T(e,n.dem.getPixels(),e.gl.RGBA,{premultiply:!1}),n.demTexture.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),n.needsTerrainPrepare=!1}let a=n&&n.toString()+n.tileID.key+e.key;if(a&&!this._demMatrixCache[a]){let r=this.tileManager.getSource().maxzoom,i=e.canonical.z-n.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=r?i=e.canonical.z-r:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let o=e.canonical.x-(e.canonical.x>>i<>i<>8<<4|e>>8,r[t+3]=0;let i=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(r.buffer)),n=new t.T(e,i,e.gl.RGBA,{premultiply:!1});return n.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=n,n}pointCoordinate(e){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let r=new Uint8Array(4),i=this.painter.context,n=i.gl,a=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),o=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),s=Math.round(this.painter.height/devicePixelRatio);i.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),n.readPixels(a,s-o-1,1,1,n.RGBA,n.UNSIGNED_BYTE,r),i.bindFramebuffer.set(null);let l=r[0]+(r[2]>>4<<8),c=r[1]+((15&r[2])<<8),u=this.coordsIndex[255-r[3]],h=u&&this.tileManager.getTileByID(u);if(!h)return null;let d=this._coordsTextureSize,f=(1<0,n=i&&0===e.canonical.y,a=i&&e.canonical.y===(1<e.id!==t),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(let e of this._recentlyUsed)if(!this._objects[e].inUse)return this._objects[e];if(this._objects.length>=this._size)throw Error("No free RenderPool available, call freeAllObjects() required!");let e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(let e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length!e.inUse)}}let nF={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class nj{constructor(e,t){this.painter=e,this.terrain=t,this.pool=new nR(e.context,30,t.tileManager.tileSize*t.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,t){var r,i,n;for(let r in this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=e._order.filter(r=>!e._layers[r].isHidden(t)),this._coordsAscending={},e.tileManagers){this._coordsAscending[r]={};let t=e.tileManagers[r].getVisibleCoordinates(),i=e.tileManagers[r].getSource(),a=i instanceof et?i.terrainTileRanges:null;for(let e of t){let t=this.terrain.tileManager.getTerrainCoords(e,a);for(let e in t)(n=this._coordsAscending[r])[e]||(n[e]=[]),this._coordsAscending[r][e].push(t[e])}}for(let t of(this._rttFingerprints={},e._order)){let n=e._layers[t],a=n.source;if(nF[n.type]&&!this._rttFingerprints[a]){this._rttFingerprints[a]={};let t=null!=(i=null==(r=e.tileManagers[a])?void 0:r.getState().revision)?i:0;for(let e in this._coordsAscending[a])this._rttFingerprints[a][e]=`${this._coordsAscending[a][e].map(e=>e.key).sort().join()}#${t}`}}for(let e of this._renderableTiles)for(let t in this._rttFingerprints){let r=this._rttFingerprints[t][e.tileID.key];r&&r!==e.rttFingerprint[t]&&(e.rtt=[])}}renderLayer(e,r){if(e.isHidden(this.painter.transform.zoom))return!1;let i=Object.assign(Object.assign({},r),{isRenderingToTexture:!0}),n=e.type,a=this.painter,o=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(nF[n]&&(this._prevType&&nF[this._prevType]||this._stacks.push([]),this._prevType=n,this._stacks[this._stacks.length-1].push(e.id),!o))return!0;if(nF[this._prevType]||nF[n]&&o){this._prevType=n;let e=this._stacks.length-1,r=this._stacks[e]||[];for(let n of this._renderableTiles){if(this.pool.isFull()&&(iz(this.painter,this.terrain,this._rttTiles,i),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(n),n.rtt[e]){let t=this.pool.getObjectForId(n.rtt[e].id);if(t.stamp===n.rtt[e].stamp){this.pool.useObject(t);continue}}let o=this.pool.getOrCreateFreeObject();for(let s of(this.pool.useObject(o),this.pool.stampObject(o),n.rtt[e]={id:o.id,stamp:o.stamp},a.context.bindFramebuffer.set(o.fbo.framebuffer),a.context.clear({color:t.bo.transparent,stencil:0}),a.currentStencilSource=void 0,r)){let e=a.style._layers[s],t=e.source?this._coordsAscending[e.source][n.tileID.key]:[n.tileID];a.context.viewport.set([0,0,o.fbo.width,o.fbo.height]),a._renderTileClippingMasks(e,t,!0),a.renderLayer(a,a.style.tileManagers[e.source],e,t,i),e.source&&(n.rttFingerprint[e.source]=this._rttFingerprints[e.source][n.tileID.key])}}return iz(this.painter,this.terrain,this._rttTiles,i),this._rttTiles=[],this.pool.freeAllObjects(),nF[n]}return!1}}let nB={"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 ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},nN={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:nC,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:t.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},nU=class extends nE{get _ownerWindow(){var e,t;return(null==(t=null==(e=this._container)?void 0:e.ownerDocument)?void 0:t.defaultView)||window}constructor(e){var r,i,n;let a=Object.assign(Object.assign(Object.assign({},nN),e),{canvasContextAttributes:Object.assign(Object.assign({},nN.canvasContextAttributes),e.canvasContextAttributes)});if(null!=a.minZoom&&null!=a.maxZoom&&a.minZoom>a.maxZoom)throw Error("maxZoom must be greater than or equal to minZoom");if(null!=a.minPitch&&null!=a.maxPitch&&a.minPitch>a.maxPitch)throw Error("maxPitch must be greater than or equal to minPitch");if(null!=a.minPitch&&a.minPitch<0)throw Error("minPitch must be greater than or equal to 0");if(null!=a.maxPitch&&a.maxPitch>180)throw Error("maxPitch must be less than or equal to 180");let o=new tv,s=new tw;void 0!==a.minZoom&&o.setMinZoom(a.minZoom),void 0!==a.maxZoom&&o.setMaxZoom(a.maxZoom),void 0!==a.minPitch&&o.setMinPitch(a.minPitch),void 0!==a.maxPitch&&o.setMaxPitch(a.maxPitch),void 0!==a.renderWorldCopies&&o.setRenderWorldCopies(a.renderWorldCopies),null!==a.transformConstrain&&o.setConstrainOverride(a.transformConstrain),super(o,s,{bearingSnap:a.bearingSnap,zoomSnap:a.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new nI,this._controls=[],this._mapId=t.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=e=>{if(e.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let e of Object.values(this.style._layers))if("custom"===e.type&&console.warn(`Custom layer with id '${e.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),e._listeners)for(let[t]of Object.entries(e._listeners))console.warn(`Custom layer with id '${e.id}' had event listeners for event '${t}' 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 t.n("webglcontextlost",{originalEvent:e}))}else this.fire(new t.n("webglcontextlost",{originalEvent:e}))},this._contextRestored=e=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new t.n("webglcontextrestored",{originalEvent:e}))},this._onMapScroll=e=>{if(e.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=a.interactive,this._maxTileCacheSize=a.maxTileCacheSize,this._maxTileCacheZoomLevels=a.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},a.canvasContextAttributes),this._trackResize=!0===a.trackResize,this._bearingSnap=a.bearingSnap,this._zoomSnap=a.zoomSnap,this._centerClampedToGround=a.centerClampedToGround,this._refreshExpiredTiles=!0===a.refreshExpiredTiles,this._fadeDuration=a.fadeDuration,this._crossSourceCollisions=!0===a.crossSourceCollisions,this._collectResourceTiming=!0===a.collectResourceTiming,this._locale=Object.assign(Object.assign({},nB),a.locale),this._clickTolerance=a.clickTolerance,this._overridePixelRatio=a.pixelRatio,this._maxCanvasSize=a.maxCanvasSize,this._zoomLevelsToOverscale=a.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=a.transformCameraUpdate,this.transformConstrain=a.transformConstrain,this.cancelPendingTileRequestsWhileZooming=!0===a.cancelPendingTileRequestsWhileZooming,this.setAnisotropicFilterPitch(a.anisotropicFilterPitch),void 0!==a.reduceMotion&&(g.prefersReducedMotion=a.reduceMotion),this._imageQueueHandle=l.addThrottleControl(()=>this.isMoving()),this._requestManager=new b(a.transformRequest),this._container=this._resolveContainer(a.container),a.maxBounds&&this.setMaxBounds(a.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),"u">typeof window&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new nS(this,a),this._hash=a.hash?new ij("string"==typeof a.hash&&a.hash||void 0).addTo(this):void 0,null!=(r=this._hash)&&r._onHashChange()||(this.jumpTo({center:a.center,elevation:a.elevation,zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,roll:a.roll}),a.bounds&&(this.resize(),this.fitBounds(a.bounds,t.e({},a.fitBoundsOptions,{duration:0}))));let c="string"==typeof a.style||(null==(n=null==(i=a.style)?void 0:i.projection)?void 0:n.type)!=="globe";this.resize(null,c),this._localIdeographFontFamily=a.localIdeographFontFamily,this._validateStyle=a.validateStyle,a.style&&this.setStyle(a.style,{localIdeographFontFamily:a.localIdeographFontFamily}),a.attributionControl&&this.addControl(new nL("boolean"==typeof a.attributionControl?void 0:a.attributionControl)),a.maplibreLogo&&this.addControl(new nP,a.logoPosition),this.on("style.load",()=>{if(c||this._resizeTransform(),this.transform.unmodified){let e=t.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(e)}}),this.on("data",e=>{this._update("style"===e.dataType),this.fire(new t.n(`${e.dataType}data`,e))}),this.on("dataloading",e=>{this.fire(new t.n(`${e.dataType}dataloading`,e))}),this.on("dataabort",e=>{this.fire(new t.n("sourcedataabort",e))})}_getMapId(){return this._mapId}setGlobalStateProperty(e,t){return this.style.setGlobalStateProperty(e,t),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(e,r){if(void 0===r&&(r=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e?.onAdd)return this.fire(new t.l(Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let i=e.onAdd(this);this._controls.push(e);let n=this._controlPositions[r];return r.includes("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this}removeControl(e){if(!e?.onRemove)return this.fire(new t.l(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 ew(this.transform,e)}calculateCameraOptionsFromTo(e,t,r,i){return null==i&&this.terrain&&(i=this.terrain.getElevationForLngLat(r,this.transform)),super.calculateCameraOptionsFromTo(e,t,r,i)}resize(e,r=!0){if(null!==this._lostContextStyle.style)return this;this._resizeInternal(r);let i=!this._moving;return i&&(this.stop(),this.fire(new t.n("movestart",e)).fire(new t.n("move",e))),this.fire(new t.n("resize",e)),i&&this.fire(new t.n("moveend",e)),this}_resizeInternal(e=!0){let[t,r]=this._containerDimensions(),i=this._getClampedPixelRatio(t,r);if(this._resizeCanvas(t,r,i),this.painter.resize(t,r,i),this.painter.overLimit()){let e=this.painter.context.gl;this._maxCanvasSize=[e.drawingBufferWidth,e.drawingBufferHeight];let i=this._getClampedPixelRatio(t,r);this._resizeCanvas(t,r,i),this.painter.resize(t,r,i)}this._resizeTransform(e)}_resizeTransform(e=!0){var t;let[r,i]=this._containerDimensions();this.transform.resize(r,i,e),null==(t=this._requestedCameraState)||t.resize(r,i,e)}_getClampedPixelRatio(e,t){let{0:r,1:i}=this._maxCanvasSize,n=this.getPixelRatio(),a=e*n,o=t*n;return Math.min(a>r?r/a:1,o>i?i/o:1)*n}getPixelRatio(){var e;return null!=(e=this._overridePixelRatio)?e:devicePixelRatio}setPixelRatio(e){this._overridePixelRatio=e,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(e){return this.transform.setMaxBounds(G.convert(e)),this._update()}setMinZoom(e){if((e=e??-2)>=-2&&e<=this.transform.maxZoom){let r=this.transform.zoom,i=this._getTransformForUpdate();return i.setMinZoom(e),this._applyUpdatedTransform(i),this._update(),r!==this.transform.zoom&&this.fire(new t.n("zoomstart")).fire(new t.n("zoom")).fire(new t.n("zoomend")).fire(new t.n("movestart")).fire(new t.n("move")).fire(new t.n("moveend")),this}throw Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(e){if((e=e??22)>=this.transform.minZoom){let r=this.transform.zoom,i=this._getTransformForUpdate();return i.setMaxZoom(e),this._applyUpdatedTransform(i),this._update(),r!==this.transform.zoom&&this.fire(new t.n("zoomstart")).fire(new t.n("zoom")).fire(new t.n("zoomend")).fire(new t.n("movestart")).fire(new t.n("move")).fire(new t.n("moveend")),this}throw Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(e){if((e=e??0)<0)throw Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch){let r=this.transform.pitch,i=this._getTransformForUpdate();return i.setMinPitch(e),this._applyUpdatedTransform(i),this._update(),r!==this.transform.pitch&&this.fire(new t.n("pitchstart")).fire(new t.n("pitch")).fire(new t.n("pitchend")).fire(new t.n("movestart")).fire(new t.n("move")).fire(new t.n("moveend")),this}throw Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(e){if((e=e??60)>180)throw Error("maxPitch must be less than or equal to 180");if(e>=this.transform.minPitch){let r=this.transform.pitch,i=this._getTransformForUpdate();return i.setMaxPitch(e),this._applyUpdatedTransform(i),this._update(),r!==this.transform.pitch&&this.fire(new t.n("pitchstart")).fire(new t.n("pitch")).fire(new t.n("pitchend")).fire(new t.n("movestart")).fire(new t.n("move")).fire(new t.n("moveend")),this}throw Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(e){if((e=e??20)>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.transform.renderWorldCopies}setRenderWorldCopies(e){return this.transform.setRenderWorldCopies(e),this._update()}setTransformConstrain(e){return this.transform.setConstrainOverride(e),this._update()}project(e){return this.transform.locationToScreenPoint(t.W.convert(e),this.style&&this.terrain)}unproject(e){return this.transform.screenPointToLocation(t.P.convert(e),this.terrain)}isMoving(){var e;return this._moving||(null==(e=this.handlers)?void 0:e.isMoving())}isZooming(){var e;return this._zooming||(null==(e=this.handlers)?void 0:e.isZooming())}isRotating(){var e;return this._rotating||(null==(e=this.handlers)?void 0:e.isRotating())}_createDelegatedListener(e,t,r){if("mouseenter"===e||"mouseover"===e){let i=!1;return{layers:t,listener:r,delegates:{mousemove:n=>{let a=t.filter(e=>this.getLayer(e)),o=0!==a.length?this.queryRenderedFeatures(n.point,{layers:a}):[];o.length?i||(i=!0,r.call(this,new iZ(e,this,n.originalEvent,{features:o}))):i=!1},mouseout:()=>{i=!1}}}}if("mouseleave"===e||"mouseout"===e){let i=!1;return{layers:t,listener:r,delegates:{mousemove:n=>{let a=t.filter(e=>this.getLayer(e));(0!==a.length?this.queryRenderedFeatures(n.point,{layers:a}):[]).length?i=!0:i&&(i=!1,r.call(this,new iZ(e,this,n.originalEvent)))},mouseout:t=>{i&&(i=!1,r.call(this,new iZ(e,this,t.originalEvent)))}}}}{let i=e=>{let i=t.filter(e=>this.getLayer(e)),n=0!==i.length?this.queryRenderedFeatures(e.point,{layers:i}):[];n.length&&(e.features=n,r.call(this,e),delete e.features)};return{layers:t,listener:r,delegates:{[e]:i}}}}_saveDelegatedListener(e,t){var r;this._delegatedListeners||(this._delegatedListeners={}),(r=this._delegatedListeners)[e]||(r[e]=[]),this._delegatedListeners[e].push(t)}_removeDelegatedListener(e,t,r){var i;if(!(null!=(i=this._delegatedListeners)&&i[e]))return;let n=this._delegatedListeners[e];for(let e=0;et.includes(e))){for(let e in i.delegates)this.off(e,i.delegates[e]);return void n.splice(e,1)}}}on(e,t,r){if(void 0===r)return super.on(e,t);let i="string"==typeof t?[t]:t,n=this._createDelegatedListener(e,i,r);for(let t in this._saveDelegatedListener(e,n),n.delegates)this.on(t,n.delegates[t]);return{unsubscribe:()=>{this._removeDelegatedListener(e,i,r)}}}once(e,t,r){if(void 0===r)return super.once(e,t);let i="string"==typeof t?[t]:t,n=this._createDelegatedListener(e,i,r);for(let t in n.delegates){let a=n.delegates[t];n.delegates[t]=(...t)=>{this._removeDelegatedListener(e,i,r),a(...t)}}for(let t in this._saveDelegatedListener(e,n),n.delegates)this.once(t,n.delegates[t]);return this}off(e,t,r){return void 0===r?super.off(e,t):(this._removeDelegatedListener(e,"string"==typeof t?[t]:t,r),this)}queryRenderedFeatures(e,r){if(!this.style)return[];let i,n=e instanceof t.P||Array.isArray(e),a=n?e:[[0,0],[this.transform.width,this.transform.height]];if(r||(r=(n?{}:e)||{}),a instanceof t.P||"number"==typeof a[0])i=[t.P.convert(a)];else{let e=t.P.convert(a[0]),r=t.P.convert(a[1]);i=[e,new t.P(r.x,e.y),r,new t.P(e.x,r.y),e]}return this.style.queryRenderedFeatures(i,r,this.transform)}querySourceFeatures(e,t){return this.style.querySourceFeatures(e,t)}setStyle(e,r){return!1!==(r=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},r)).diff&&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 t=this._locale[e];if(null==t)throw Error(`Missing UI string '${e}'`);return t}_updateStyle(e,t){var r,i,n;if(null==(r=this._diffStyleRequest)||r.abort(),this._diffStyleRequest=null,t.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(e,t));let a=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!e)),e?(this.style=new t3(this,t||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e,t,a):this.style.loadJSON(e,t,a)):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),null==(n=null==(i=this.style)?void 0:i.projection)||n.destroy(),delete this.style),this}_lazyInitEmptyStyle(){this.style||(this.style=new t3(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(e,r){return t._(this,void 0,void 0,function*(){var i;if(null==(i=this._diffStyleRequest)||i.abort(),"string"==typeof e){this._diffStyleRequest=new AbortController;let i=this._diffStyleRequest;try{let n=yield this._requestManager.transformRequest(e,"Style");if(i.signal.aborted)return void(this._diffStyleRequest=null);let a=yield t.k(n,i);this._diffStyleRequest=null,this._updateDiff(a.data,r)}catch(e){this._diffStyleRequest=null,t.$(e)||this.fire(new t.l(t.d(e)))}}else"object"==typeof e&&(this._diffStyleRequest=null,this._updateDiff(e,r))})}_updateDiff(e,r){try{this.style.setState(e,r)&&this._update(!0)}catch(i){t.w(`Unable to perform style diff: ${t.d(i).message}. Rebuilding the style from scratch.`),this._updateStyle(e,r)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();t.w("There is no style added to the map.")}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(e){var r;let i=null==(r=this.style)?void 0:r.tileManagers[e];if(void 0!==i)return i.loaded();this.fire(new t.l(Error(`There is no tile manager with ID '${e}'`)))}setTerrain(e){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),e){let r=this.style.tileManagers[e.source];if(!r)throw Error(`cannot load terrain, because there exists no source with ID: ${e.source}`);for(let i in null===this.terrain&&r.reload(),this.style._layers){let r=this.style._layers[i];"hillshade"===r.type&&r.source===e.source&&t.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),"color-relief"===r.type&&r.source===e.source&&t.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new nO(this.painter,r,e),this.painter.renderToTexture=new nj(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=t=>{var r;"style"===t.dataType?this.terrain.tileManager.freeRtt():"source"===t.dataType&&t.tile&&(t.sourceId!==e.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),(null==(r=t.source)?void 0:r.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(t.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new t.n("terrain",{terrain:e})),this}getTerrain(){var e,t;return null!=(t=null==(e=this.terrain)?void 0:e.options)?t:null}areTilesLoaded(){var e;for(let t of Object.values(null==(e=this.style)?void 0:e.tileManagers))if(!t.areTilesLoaded())return!1;return!0}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){return this.style.getSource(e)}setSourceTileLodParams(e,t,r){if(r){let i=this.getSource(r);if(!i)throw Error(`There is no source with ID "${r}", cannot set LOD parameters`);i.calculateTileZoom=ex(Math.max(1,e),Math.max(1,t))}else for(let r in this.style.tileManagers)this.style.tileManagers[r].getSource().calculateTileZoom=ex(Math.max(1,e),Math.max(1,t));return this._update(!0),this}refreshTiles(e,r){let i=this.style.tileManagers[e];if(!i)throw Error(`There is no tile manager with ID "${e}", cannot refresh tile`);void 0===r?i.reload(!0):i.refreshTiles(r.map(e=>new t.aa(e.z,e.x,e.y)))}addImage(e,r,i={}){let{pixelRatio:n=1,sdf:a=!1,stretchX:o,stretchY:s,content:l,textFitWidth:c,textFitHeight:u}=i;if(this._lazyInitEmptyStyle(),!(r instanceof HTMLImageElement||t.b(r))){if(void 0===r.width||void 0===r.height)return this.fire(new t.l(Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:i,height:h,data:d}=r;return this.style.addImage(e,{data:new t.R({width:i,height:h},new Uint8Array(d)),pixelRatio:n,stretchX:o,stretchY:s,content:l,textFitWidth:c,textFitHeight:u,sdf:a,version:0,userImage:r}),r.onAdd&&r.onAdd(this,e),this}}{let{width:i,height:h,data:d}=g.getImageData(r);this.style.addImage(e,{data:new t.R({width:i,height:h},d),pixelRatio:n,stretchX:o,stretchY:s,content:l,textFitWidth:c,textFitHeight:u,sdf:a,version:0})}}updateImage(e,r){let i=this.style.getImage(e);if(!i)return this.fire(new t.l(Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let{width:n,height:a,data:o}=r instanceof HTMLImageElement||t.b(r)?g.getImageData(r):r;if(void 0===n||void 0===a)return this.fire(new t.l(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(n!==i.data.width||a!==i.data.height)return this.fire(new t.l(Error("The width and height of the updated image must be that same as the previous version of the image")));let s=!(r instanceof HTMLImageElement||t.b(r));return i.data.replace(o,s),this.style.updateImage(e,i),this}getImage(e){return this.style.getImage(e)}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new t.l(Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(e){return t._(this,void 0,void 0,function*(){return l.getImage((yield this._requestManager.transformRequest(e,"Image")),new AbortController)})}listImages(){return this.style.listImages()}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){return this.style.getLayer(e)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(e,t,r){return this.style.setLayerZoomRange(e,t,r),this._update(!0)}setFilter(e,t,r={}){return this.style.setFilter(e,t,r),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,r,i={}){return this.style.setPaintProperty(e,t,r,i),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,r,i={}){return this.style.setLayoutProperty(e,t,r,i),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setGlyphs(e,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(e,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(e,t,r={}){return this._lazyInitEmptyStyle(),this.style.addSprite(e,t,r,e=>{e||this._update(!0)}),this}removeSprite(e){return this._lazyInitEmptyStyle(),this.style.removeSprite(e),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(e,t,e=>{e||this._update(!0)}),this}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setSky(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSky(e,t),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),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,t=0;return this._container&&(e=this._container.clientWidth||400,t=this._container.clientHeight||300),[e,t]}_setupResizeObserver(){var e;let t=!1,r=iF(e=>{this._trackResize&&!this._removed&&(this.resize(e),this.redraw())},50),i=null!=(e=this._ownerWindow.ResizeObserver)?e:ResizeObserver;this._resizeObserver=new i(e=>{t?r(e):t=!0}),this._resizeObserver.observe(this._container)}_resolveContainer(e){if("string"==typeof e){let t=document.getElementById(e);if(!t)throw Error(`Container '${e}' not found.`);return t}if(e instanceof HTMLElement||e&&"object"==typeof e&&1===e.nodeType)return e;throw Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let e=this._container;e.classList.add("maplibregl-map");let t=this._canvasContainer=x.create("div","maplibregl-canvas-container",e);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=x.create("canvas","maplibregl-canvas",t),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 r=this._containerDimensions(),i=this._getClampedPixelRatio(r[0],r[1]);this._resizeCanvas(r[0],r[1],i);let n=this._controlContainer=x.create("div","maplibregl-control-container",e),a=this._controlPositions={};for(let e of["top-left","top-right","bottom-left","bottom-right"])a[e]=x.create("div",`maplibregl-ctrl-${e} `,n);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(e,t,r){this._canvas.width=Math.floor(r*e),this._canvas.height=Math.floor(r*t),this._canvas.style.width=`${e}px`,this._canvas.style.height=`${t}px`}_setupPainter(){let e=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),t=null;this._canvas.addEventListener("webglcontextcreationerror",r=>{t={requestedAttributes:e},r&&(t.statusMessage=r.statusMessage,t.type=r.type)},{once:!0});let r=null;if(!(r=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,e):this._canvas.getContext("webgl2",e)||this._canvas.getContext("webgl",e))){let e="Failed to initialize WebGL";throw t?(t.message=e,Error(JSON.stringify(t))):Error(e)}this.painter=new iR(r,this.transform)}migrateProjection(e,r){super.migrateProjection(e,r),this.painter.transform=e,this.fire(new t.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){var t;return null!=(t=this.style)&&t._loaded&&(this._styleDirty||(this._styleDirty=e),this._sourcesDirty=!0,this.triggerRepaint()),this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_render(e){var r,i,n,a,o,s;let l=this._idleTriggered?this._fadeDuration:0,c=(null==(r=this.style.projection)?void 0:r.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),this._removed)return;let u=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let e=this.transform.zoom,r=v();this.style.zoomHistory.update(e,r);let i=new t.J(e,{now:r,fadeDuration:l,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),n=i.crossFadingFactor();1===n&&n===this._crossFadingFactor||(u=!0,this._crossFadingFactor=n),this.style.update(i)}let h=(null==(i=this.style.projection)?void 0:i.transitionState)>0!==c;null==(n=this.style.projection)||n.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState(null==(a=this.style.projection)?void 0:a.transitionState,null==(o=this.style.projection)?void 0:o.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||h)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=null==(s=this.style)?void 0:s._updatePlacement(this.transform,this.showCollisionBoxes,l,this._crossSourceCollisions,h),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:l,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new t.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.n("load"))),this.style&&(this.style.hasTransitions()||u)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let d=this._sourcesDirty||this._styleDirty||this._placementDirty;return d||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.n("idle")),!this._loaded||this._fullyLoaded||d||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var e,r;for(let e of(this._hash&&this._hash.remove(),this._controls))e.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),null==(e=this._diffStyleRequest)||e.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),"u">typeof window&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),l.removeThrottleControl(this._imageQueueHandle),null==(r=this._resizeObserver)||r.disconnect();let i=this.painter.context.gl.getExtension("WEBGL_lose_context");i?.loseContext&&i.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new t.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,g.frame(this._frameRequest,e=>{this._frameRequest=null;try{this._render(e)}catch(e){if(!t.$(e)&&e.message!==io)throw e}},()=>{},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 h}getCameraTargetElevation(){return this.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};class nq{constructor(e,r,i=!1){this.mousedown=e=>{this.startMove(e,x.mousePos(this.element,e)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=e=>{this.move(e,x.mousePos(this.element,e))},this.mouseup=e=>{this._rotatePitchHandler.dragEnd(e),this.offTemp()},this.touchstart=e=>{1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=x.touchPos(this.element,e.targetTouches)[0],this.startMove(e,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=e=>{1!==e.targetTouches.length?this.reset():(this._lastPos=x.touchPos(this.element,e.targetTouches)[0],this.move(e,this._lastPos))},this.touchend=e=>{0===e.targetTouches.length&&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 n=new i7;this._rotatePitchHandler=new i4({clickTolerance:3,move:(e,n)=>{let a=r.getBoundingClientRect(),o=new t.P((a.bottom-a.top)/2,(a.right-a.left)/2);return{bearingDelta:t.cx(new t.P(e.x,n.y),n,o),pitchDelta:i?-.5*(n.y-e.y):void 0}},moveStateManager:n,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,t){this._rotatePitchHandler.dragStart(e,t),x.disableDrag()}move(e,t){let r=this.map,{bearingDelta:i,pitchDelta:n}=this._rotatePitchHandler.dragMove(e,t)||{};i&&r.setBearing(r.getBearing()+i),n&&r.setPitch(r.getPitch()+n)}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(){x.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}function nH(e,r,i,n=!1){if(n||!i.getCoveringTilesDetailsProvider().allowWorldCopies())return e?.wrap();let a=new t.W(e.lng,e.lat);if(e=new t.W(e.lng,e.lat),r){let n=new t.W(e.lng-360,e.lat),a=new t.W(e.lng+360,e.lat),o=i.locationToScreenPoint(e).distSqr(r);i.locationToScreenPoint(n).distSqr(r)180;){let t=i.locationToScreenPoint(e);if(t.x>=0&&t.y>=0&&t.x<=i.width&&t.y<=i.height)break;e.lng>i.center.lng?e.lng-=360:e.lng+=360}return e.lng!==a.lng&&i.isPointOnMapSurface(i.locationToScreenPoint(e))?e:a}let nG={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function nW(e,t,r){let i=e.classList;for(let e in nG)i.remove(`maplibregl-${r}-anchor-${e}`);i.add(`maplibregl-${r}-anchor-${t}`)}class nY extends t.E{constructor(e){if(super(),this._onClick=e=>{this.fire(new t.n("click",{originalEvent:e}))},this._onKeyPress=e=>{"Space"!==e.code&&"Enter"!==e.code||this.togglePopup()},this._onMapClick=e=>{let t=e.originalEvent.target,r=this._element;this._popup&&(t===r||r.contains(t))&&this.togglePopup()},this._update=e=>{if(!this._map)return;let t=this._map.loaded()&&!this._map.isMoving();e?.type!=="terrain"&&(e?.type!=="render"||t)||this._map.once("render",this._update),this._lngLat=nH(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let r="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?r=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(r=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let i="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?i="rotateX(0deg)":"map"===this._pitchAlignment&&(i=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||e&&"moveend"!==e.type||(this._pos=this._pos.round()),this._element.style.transform=`${nG[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${i} ${r}`,g.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity(e?.type==="moveend")}).catch(()=>{})},this._onMove=e=>{if(!this._isDragging){let t=this._clickTolerance||this._map._clickTolerance;this._isDragging=e.point.dist(this._pointerdownPos)>=t}this._isDragging&&(this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.n("dragstart"))),this.fire(new t.n("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.n("dragend")),this._state="inactive"},this._addDragHandler=e=>{this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._pointerdownPos=e.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||"#3FB1CE",this._scale=e?.scale||1,this._draggable=e?.draggable||!1,this._clickTolerance=e?.clickTolerance||0,this._subpixelPositioning=e?.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e?.rotation||0,this._rotationAlignment=e?.rotationAlignment||"auto",this._pitchAlignment=e?.pitchAlignment&&"auto"!==e.pitchAlignment?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e?.opacity,e?.opacityWhenCovered),e?.element)this._element=e.element,this._offset=t.P.convert(e?.offset||[0,0]);else{this._defaultMarker=!0,this._element=x.create("div");let r=x.createNS("http://www.w3.org/2000/svg","svg");r.setAttributeNS(null,"display","block"),r.setAttributeNS(null,"height","41px"),r.setAttributeNS(null,"width","27px"),r.setAttributeNS(null,"viewBox","0 0 27 41");let i=x.createNS("http://www.w3.org/2000/svg","g");i.setAttributeNS(null,"stroke","none"),i.setAttributeNS(null,"stroke-width","1"),i.setAttributeNS(null,"fill","none"),i.setAttributeNS(null,"fill-rule","evenodd");let n=x.createNS("http://www.w3.org/2000/svg","g");n.setAttributeNS(null,"fill-rule","nonzero");let a=x.createNS("http://www.w3.org/2000/svg","g");for(let e of(a.setAttributeNS(null,"transform","translate(3.0, 29.0)"),a.setAttributeNS(null,"fill","#000000"),[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}])){let t=x.createNS("http://www.w3.org/2000/svg","ellipse");t.setAttributeNS(null,"opacity","0.04"),t.setAttributeNS(null,"cx","10.5"),t.setAttributeNS(null,"cy","5.80029008"),t.setAttributeNS(null,"rx",e.rx),t.setAttributeNS(null,"ry",e.ry),a.appendChild(t)}let o=x.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"fill",this._color);let s=x.createNS("http://www.w3.org/2000/svg","path");s.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),o.appendChild(s);let l=x.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"opacity","0.25"),l.setAttributeNS(null,"fill","#000000");let c=x.createNS("http://www.w3.org/2000/svg","path");c.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),l.appendChild(c);let u=x.createNS("http://www.w3.org/2000/svg","g");u.setAttributeNS(null,"transform","translate(6.0, 7.0)"),u.setAttributeNS(null,"fill","#FFFFFF");let h=x.createNS("http://www.w3.org/2000/svg","g");h.setAttributeNS(null,"transform","translate(8.0, 8.0)");let d=x.createNS("http://www.w3.org/2000/svg","circle");d.setAttributeNS(null,"fill","#000000"),d.setAttributeNS(null,"opacity","0.25"),d.setAttributeNS(null,"cx","5.5"),d.setAttributeNS(null,"cy","5.5"),d.setAttributeNS(null,"r","5.4999962");let f=x.createNS("http://www.w3.org/2000/svg","circle");f.setAttributeNS(null,"fill","#FFFFFF"),f.setAttributeNS(null,"cx","5.5"),f.setAttributeNS(null,"cy","5.5"),f.setAttributeNS(null,"r","5.4999962"),h.appendChild(d),h.appendChild(f),n.appendChild(a),n.appendChild(o),n.appendChild(l),n.appendChild(u),n.appendChild(h),r.appendChild(n),r.setAttributeNS(null,"height",41*this._scale+"px"),r.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(r),this._offset=t.P.convert(e?.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",e=>{e.preventDefault()}),this._element.addEventListener("mousedown",e=>{e.preventDefault()}),nW(this._element,this._anchor,"marker"),e?.className)for(let t of e.className.split(" "))this._element.classList.add(t);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),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.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.W.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){let t=Math.abs(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":[t,-1*(24.6+t)],"bottom-right":[-t,-1*(24.6+t)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){let e=this._popup;return this._element.style.opacity===this._opacityWhenCovered||e&&(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map))),this}_updateOpacity(e=!1){var r,i;let n=null==(r=this._map)?void 0:r.terrain,a=this._map.transform.isLocationOccluded(this._lngLat);if(!n||a){let e=a?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==e&&(this._element.style.opacity=e,this._element.classList.toggle("maplibregl-marker-covered",a)))}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.transform);if(o.transform.lngLatToCameraDepth(this._lngLat,l)-s<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let c=-this._offset.y/o.transform.pixelsPerMeter,u=Math.sin(o.getPitch()*Math.PI/180)*c,h=o.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),d=o.transform.lngLatToCameraDepth(this._lngLat,l+u)-h>.006;null!=(i=this._popup)&&i.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=t.P.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._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}isDraggable(){return this._draggable}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&&"auto"!==e?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,t){return(void 0===this._opacity||void 0===e&&void 0===t)&&(this._opacity="1",this._opacityWhenCovered="0.2"),void 0!==e&&(this._opacity=String(e)),void 0!==t&&(this._opacityWhenCovered=String(t)),this._map&&this._updateOpacity(!0),this}}let nZ={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},n$=0,nX=!1,nK={maxWidth:100,unit:"metric"};function nJ(e,t,r){let i=r?.maxWidth||100,n=e._container.clientHeight/2,a=e._container.clientWidth/2,o=e.unproject([a-i/2,n]),s=e.unproject([a+i/2,n]),l=Math.min(i,Math.round(e.project(s).x-e.project(o).x),e._container.clientWidth),c=o.distanceTo(s);if(r?.unit==="imperial"){let r=3.2808*c;r>5280?nQ(t,l,r/5280,e._getUIString("ScaleControl.Miles")):nQ(t,l,r,e._getUIString("ScaleControl.Feet"))}else r?.unit==="nautical"?nQ(t,l,c/1852,e._getUIString("ScaleControl.NauticalMiles")):c>=1e3?nQ(t,l,c/1e3,e._getUIString("ScaleControl.Kilometers")):nQ(t,l,c,e._getUIString("ScaleControl.Meters"))}function nQ(e,t,r,i){var n;let a,o,s,l=(a=Math.pow(10,`${Math.floor(r)}`.length-1),o=r/a,a*(o=o>=10?10:o>=5?5:o>=3?3:o>=2?2:o>=1?1:(s=Math.pow(10,Math.ceil(-Math.log(n=o)/Math.LN10)),Math.round(n*s)/s)));e.style.width=l/r*t+"px",e.innerHTML=`${l} ${i}`}let n0={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0};e.AJAXError=t.cG,e.EXTENT=t.a6,e.Event=t.n,e.Evented=t.E,e.LngLat=t.W,e.MercatorCoordinate=t.a7,e.Point=t.P,e.addProtocol=t.cH,e.config=t.c,e.removeProtocol=t.cI,e.AttributionControl=nL,e.BoxZoomHandler=i0,e.CanvasSource=ei,e.CooperativeGesturesHandler=nT,e.DoubleClickZoomHandler=ny,e.DragPanHandler=nb,e.DragRotateHandler=n_,e.EdgeInsets=th,e.FullscreenControl=class extends t.E{constructor(e={}){var r;super(),this._onFullscreenChange=()=>{var e;let t=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;null!=(e=t?.shadowRoot)&&e.fullscreenElement;)t=t.shadowRoot.fullscreenElement;t===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=null!=(r=e.pseudo)&&r,e?.container&&(e.container instanceof HTMLElement?this._container=e.container:t.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=x.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=x.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);x.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 t.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},e.GeoJSONSource=ee,e.GeolocateControl=class extends t.E{constructor(e){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.n("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,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&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.n("geolocate",e)),this._finish()}},this._updateCamera=e=>{let r=new t.W(e.coords.longitude,e.coords.latitude),i=e.coords.accuracy,n=this._map.getBearing(),a=t.e({bearing:n},this.options.fitBoundsOptions),o=G.fromLngLat(r,i);this._map.fitBounds(o,a,{geolocateSource:!0})},this._updateMarker=e=>{if(e){let r=new t.W(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=e=>{if(this._map){if(1===e.code){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 e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&nX)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.n("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=e=>{if(!this._map)return;let r=e?.[0]instanceof ResizeObserverEntry;e.geolocateSource||"ACTIVE_LOCK"!==this._watchState||r||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 t.n("trackuserlocationend")),this.fire(new t.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",e=>{e.preventDefault()}),this._geolocateButton=x.create("button","maplibregl-ctrl-geolocate",this._container),x.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(!1===e){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}else{let e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=x.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new nY({element:this._dotElement}),this._circleElement=x.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new nY({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=t.e({},nZ,e)}onAdd(e){return this._map=e,this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return t._(this,arguments,void 0,function*(e=!1){if(void 0!==n&&!e)return n;if(void 0===window.navigator.permissions)return n=!!window.navigator.geolocation;try{n="denied"!==(yield window.navigator.permissions.query({name:"geolocation"})).state}catch{n=!!window.navigator.geolocation}return n})})().then(e=>this._finishSetupUI(e)),this._container}onRemove(){void 0!==this._geolocationWatchID&&(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,n$=0,nX=!1}_isOutOfMapMaxBounds(e){let t=this._map.getMaxBounds(),r=e.coords;return t&&(r.longitudet.getEast()||r.latitudet.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let e=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&e))return;let t=this._map.project(e),r=this._map.unproject([t.x+100,t.y]),i=e.distanceTo(r)/100,n=2*this._accuracy/i;this._circleElement.style.width=`${n.toFixed(2)}px`,this._circleElement.style.height=`${n.toFixed(2)}px`}trigger(){if(!this._setup)return t.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":n$--,nX=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new t.n("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.n("trackuserlocationstart")),this.fire(new t.n("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("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let e;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++n$>1?(e={maximumAge:6e5,timeout:0},nX=!0):(e=this.options.positionOptions,nX=!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)}},e.GlobeControl=class{constructor(){this._toggleProjection=()=>{var e;let t=null==(e=this._map.getProjection())?void 0:e.type;this._map.setProjection("mercator"!==t&&t?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var e;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),(null==(e=this._map.getProjection())?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=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=x.create("button","maplibregl-ctrl-globe",this._container),x.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}},e.Hash=ij,e.ImageSource=et,e.KeyboardHandler=nf,e.LngLatBounds=G,e.LogoControl=nP,e.Map=nU,e.MapLibreMap=nU,e.MapMouseEvent=iZ,e.MapTouchEvent=i$,e.MapWheelEvent=iX,e.Marker=nY,e.NavigationControl=class{constructor(e){this._updateZoomButtons=()=>{let e=this._map.getZoom(),t=e===this._map.getMaxZoom(),r=e===this._map.getMinZoom();this._zoomInButton.disabled=t,this._zoomOutButton.disabled=r,this._zoomInButton.setAttribute("aria-disabled",t.toString()),this._zoomOutButton.setAttribute("aria-disabled",r.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(e,t)=>{let r=this._map._getUIString(`NavigationControl.${t}`);e.title=r,e.setAttribute("aria-label",r)},this.options=t.e({},nV,e),this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",e=>this._map.zoomIn({},{originalEvent:e})),x.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",e=>this._map.zoomOut({},{originalEvent:e})),x.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})}),this._compassIcon=x.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("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new nq(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(e,t){let r=x.create("button",e,this._container);return r.type="button",r.addEventListener("click",t),r}},e.Popup=class extends t.E{constructor(e){super(),this._updateOpacity=()=>{void 0!==this.options.locationOccludedOpacity&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new t.n("close"))),this),this._update=e=>{let r;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=x.create("div","maplibregl-popup",this._map.getContainer()),this._tip=x.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let e of this.options.className.split(" "))this._container.classList.add(e);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=nH(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),e&&"point"in e&&e.point&&(r=e.point),this._trackPointer&&!r)return;let i=this._flatPos=this._pos=this._trackPointer&&r?r:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&r?r:this._map.transform.locationToScreenPoint(this._lngLat));let n=this.options.anchor,a=function e(r){if(r){if("number"==typeof r){let e=Math.round(Math.abs(r)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,r),"top-left":new t.P(e,e),"top-right":new t.P(-e,e),bottom:new t.P(0,-r),"bottom-left":new t.P(e,-e),"bottom-right":new t.P(-e,-e),left:new t.P(r,0),right:new t.P(-r,0)}}if(r instanceof t.P||Array.isArray(r)){let e=t.P.convert(r);return{center:e,top:e,"top-left":e,"top-right":e,bottom:e,"bottom-left":e,"bottom-right":e,left:e,right:e}}return{center:t.P.convert(r.center||[0,0]),top:t.P.convert(r.top||[0,0]),"top-left":t.P.convert(r["top-left"]||[0,0]),"top-right":t.P.convert(r["top-right"]||[0,0]),bottom:t.P.convert(r.bottom||[0,0]),"bottom-left":t.P.convert(r["bottom-left"]||[0,0]),"bottom-right":t.P.convert(r["bottom-right"]||[0,0]),left:t.P.convert(r.left||[0,0]),right:t.P.convert(r.right||[0,0])}}return e(new t.P(0,0))}(this.options.offset);if(!n){var o,s,l,c,u;let e=this._container.offsetWidth,t=this._container.offsetHeight,r=(o=this.options.padding)?{top:null!=(s=o.top)?s:0,right:null!=(l=o.right)?l:0,bottom:null!=(c=o.bottom)?c:0,left:null!=(u=o.left)?u:0}:{top:0,right:0,bottom:0,left:0},h;h=i.y+a.bottom.ythis._map.transform.height-t-r.bottom?["bottom"]:[],i.xthis._map.transform.width-e/2-r.right&&h.push("right"),n=0===h.length?"bottom":h.join("-")}let h=i.add(a[n]);this.options.subpixelPositioning||(h=h.round()),this._container.style.transform=`${nG[n]} translate(${h.x}px,${h.y}px)`,nW(this._container,n,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(n0),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 t.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.W.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 t=document.createDocumentFragment(),r=document.createElement("body"),i;for(r.innerHTML=e;i=r.firstChild;)t.appendChild(i);return this.setDOMContent(t)}getMaxWidth(){var e;return null==(e=this._container)?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=x.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=x.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("a[href], [tabindex]:not([tabindex='-1']), [contenteditable]:not([contenteditable='false']), button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])");e&&e.focus()}},e.RasterDEMTileSource=$,e.RasterTileSource=Z,e.ScaleControl=class{constructor(e){this._onMove=()=>{nJ(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,nJ(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},nK),e)}getDefaultPosition(){return"bottom-left"}onAdd(e){return this._map=e,this._container=x.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}},e.ScrollZoomHandler=ng,e.Style=t3,e.TerrainControl=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=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=x.create("button","maplibregl-ctrl-terrain",this._container),x.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}},e.TwoFingersTouchPitchHandler=nc,e.TwoFingersTouchRotateHandler=ns,e.TwoFingersTouchZoomHandler=na,e.TwoFingersTouchZoomRotateHandler=nw,e.VectorTileSource=Y,e.VideoSource=er,e.addSourceType=(e,r)=>t._(void 0,void 0,void 0,function*(){if(ea(e))throw Error(`A source type called "${e}" already exists.`);en[e]=r}),e.clearPrewarmedResources=function(){let e=F;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(D),F=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},e.createTileMesh=tL,e.getGlobalDispatcher=U,e.getMaxParallelImageRequests=function(){return t.c.MAX_PARALLEL_IMAGE_REQUESTS},e.getRTLTextPluginStatus=function(){return ec().getRTLTextPluginStatus()},e.getVersion=function(){return h},e.getWorkerCount=function(){return O.workerCount},e.getWorkerUrl=function(){return t.c.WORKER_URL},e.importScriptInWorkers=function(e){return U().broadcast("IS",e)},e.isTimeFrozen=function(){return y.isFrozen()},e.now=v,e.prewarm=function(){B().acquire(D)},e.restoreNow=function(){y.restoreNow()},e.setMaxParallelImageRequests=function(e){t.c.MAX_PARALLEL_IMAGE_REQUESTS=e},e.setNow=function(e){y.setNow(e)},e.setRTLTextPlugin=function(e,t){return ec().setRTLTextPlugin(e,t)},e.setWorkerCount=function(e){O.workerCount=e},e.setWorkerUrl=function(e){t.c.WORKER_URL=e}}),e},"object"==typeof e&&"u">typeof t?t.exports=i():(r="u">typeof globalThis?globalThis:r||self).maplibregl=i()}}),vl=p({"src/plots/map/layers.js"(e,t){var r=tv(),i=tF().sanitizeHTML,n=vt(),a=y4();function o(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=a.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var s=o.prototype;function l(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var i=0;i0}function c(e){var t={},i={};switch(e.type){case"circle":r.extendFlat(i,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":r.extendFlat(i,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":r.extendFlat(i,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var a=e.symbol,o=n(a.textposition,a.iconsize);r.extendFlat(t,{"icon-image":a.icon,"icon-size":a.iconsize/10,"text-field":a.text,"text-size":a.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":a.placement}),r.extendFlat(i,{"icon-color":e.color,"text-color":a.textfont.color,"text-opacity":e.opacity});break;case"raster":r.extendFlat(i,{"raster-fade-duration":0,"raster-opacity":e.opacity})}return{layout:t,paint:i}}s.update=function(e){this.visible?this.needsNewImage(e)?this.updateImage(e):this.needsNewSource(e)?(this.removeLayer(),this.updateSource(e),this.updateLayer(e)):this.needsNewLayer(e)?this.updateLayer(e):this.updateStyle(e):(this.updateSource(e),this.updateLayer(e)),this.visible=l(e)},s.needsNewImage=function(e){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===e.sourcetype&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))},s.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type},s.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},s.updateImage=function(e){this.subplot.map.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var t=this.findFollowingMapLayerId(this.lookupBelow());null!==t&&this.subplot.map.moveLayer(this.idLayer,t)},s.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,l(e)){var r,n,a,o,s,c=(a=(r=e).sourcetype,o=r.source,s={type:a},"geojson"===a?n="data":"vector"===a?n="string"==typeof o?"url":"tiles":"raster"===a?(n="tiles",s.tileSize=256):"image"===a&&(n="url",s.coordinates=r.coordinates),s[n]=o,r.sourceattribution&&(s.attribution=i(r.sourceattribution)),s);t.addSource(this.idSource,c)}},s.findFollowingMapLayerId=function(e){if("traces"===e)for(var t=this.subplot.getMapLayers(),r=0;r1)for(r=0;rt.project(e).x,_subplot:t},t.yaxis={_id:"y",c2p:e=>t.project(e).y,_subplot:t},t.updateFramework(e),t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},o.setConvert(t.mockAxis,e)},b.initFx=function(e,t){var r=this,i=r.gd,n=r.map;function o(){l.loneUnhover(t._hoverlayer)}function s(){var e=r.getView();i.emit("plotly_relayouting",r.getViewEditsWithDerived(e))}n.on("moveend",function(e){if(r.map){var t=i._fullLayout;if(e.originalEvent||r.wheeling){var n=t[r.id];a.call("_storeDirectGUIEdit",i.layout,t._preGUI,r.getViewEdits(n));var o=r.getView();n._input.center=n.center=o.center,n._input.zoom=n.zoom=o.zoom,n._input.bearing=n.bearing=o.bearing,n._input.pitch=n.pitch=o.pitch,i.emit("plotly_relayout",r.getViewEditsWithDerived(o))}e.originalEvent&&"mouseup"===e.originalEvent.type?r.dragging=!1:r.wheeling&&(r.wheeling=!1),t&&t._rehover&&t._rehover()}}),n.on("wheel",function(){r.wheeling=!0}),n.on("mousemove",function(e){var t=r.div.getBoundingClientRect(),a=[e.originalEvent.offsetX,e.originalEvent.offsetY];e.target.getBoundingClientRect=function(){return t},r.xaxis.p2c=function(){return n.unproject(a).lng},r.yaxis.p2c=function(){return n.unproject(a).lat},i._fullLayout._rehover=function(){i._fullLayout._hoversubplot===r.id&&i._fullLayout[r.id]&&l.hover(i,e,r.id)},l.hover(i,e,r.id),i._fullLayout._hoversubplot=r.id}),n.on("dragstart",function(){r.dragging=!0,o()}),n.on("zoomstart",o),n.on("mouseout",function(){i._fullLayout._hoversubplot=null}),n.on("drag",s),n.on("zoom",s),n.on("dblclick",function(){var e=i._fullLayout[r.id];a.call("_storeDirectGUIEdit",i.layout,i._fullLayout._preGUI,r.getViewEdits(e));var t=r.viewInitial;n.setCenter(k(t.center)),n.setZoom(t.zoom),n.setBearing(t.bearing),n.setPitch(t.pitch);var o=r.getView();e._input.center=e.center=o.center,e._input.zoom=e.zoom=o.zoom,e._input.bearing=e.bearing=o.bearing,e._input.pitch=e.pitch=o.pitch,i.emit("plotly_doubleclick",null),i.emit("plotly_relayout",r.getViewEditsWithDerived(o))}),r.clearOutline=function(){m(r.dragOptions),p(r.dragOptions.gd)},r.onClickInPanFn=function(e){return function(t){var n=i._fullLayout.clickmode;n.indexOf("select")>-1&&g(t.originalEvent,i,[r.xaxis],[r.yaxis],r.id,e),n.indexOf("event")>-1&&l.click(i,t.originalEvent)}}},b.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(!t.isStatic){var a=e.dragmode,o=t.dragOptions;t.dragOptions=i.extendDeep(o||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:function(e,r){r.isRect?(e.range={})[t.id]=[l([r.xmin,r.ymin]),l([r.xmax,r.ymax])]:(e.lassoPoints={})[t.id]=r.map(l)}},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),h(a)||u(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(e,r,i){f(e,r,i,t.dragOptions,a)},s.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))}function l(e){var r=t.map.unproject(e);return[r.lng,r.lat]}},b.updateFramework=function(e){var t=e[this.id].domain,r=e._size,i=this.div.style;i.width=r.w*(t.x[1]-t.x[0])+"px",i.height=r.h*(t.y[1]-t.y[0])+"px",i.left=r.l+t.x[0]*r.w+"px",i.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])},b.updateLayers=function(e){var t,r=e[this.id].layers,i=this.layerList;if(r.length!==i.length){for(t=0;tvh});var vd,vf=f({"src/plots/map/get_map_fit_bounds.ts"(){vd=y(pS())}}),vp=p({"src/plots/map/layout_defaults.js"(e,t){var r=tv(),i=o7(),n=t$(),a=y6(),{getMapFitBounds:o}=(vf(),v(vu));function s(e,t,r,i){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");let a=r("fitbounds");var s=r("bounds.west"),c=r("bounds.east"),u=r("bounds.south"),h=r("bounds.north");(void 0===s||void 0===c||void 0===u||void 0===h)&&delete t.bounds,n(e,t,{name:"layers",handleItemDefaults:l}),t._fitBounds=null;let{_fitView:{center:d,zoom:f}={},center:p,zoom:m}=e,g=p?.lon===d?.lon&&p?.lat===d?.lat&&m===f;if(a&&g){let e=o(i.fullData,i.id);e&&(t._fitBounds=e)}t._input=e}function l(e,t){function i(i,n){return r.coerce(e,t,a.layers,i,n)}if(i("visible")){var n,o=i("sourcetype"),s="raster"===o||"image"===o;i("source"),i("sourceattribution"),"vector"===o&&i("sourcelayer"),"image"===o&&i("coordinates"),s&&(n="raster");var l=i("type",n);s&&"raster"!==l&&(l=t.type="raster",r.log("Source types *raster* and *image* must drawn *raster* layer type.")),i("below"),i("color"),i("opacity"),i("minzoom"),i("maxzoom"),"circle"===l&&i("circle.radius"),"line"===l&&(i("line.width"),i("line.dash")),"fill"===l&&i("fill.outlinecolor"),"symbol"===l&&(i("symbol.icon"),i("symbol.iconsize"),i("symbol.text"),r.coerceFont(i,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),i("symbol.textposition"),i("symbol.placement"))}}t.exports=function(e,t,r){i(e,t,r,{type:"map",attributes:a,handleDefaults:s,partition:"y",fullData:r})}}}),vm=p({"src/plots/map/index.js"(e){var t=tv(),r=t.strTranslate,i=t.strScale,n=tI().getSubplotCalcData,a=tO(),o=T(),s=t7(),l=tF(),c=vc();e.name="map",e.attr="subplot",e.idRoot="map",e.idRegex=e.attrRegex=t.counterRegex("map"),e.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},e.layoutAttributes=y6(),e.supplyLayoutDefaults=vp(),e.plot=function(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots.map,a=0;av/2){var x=p.split("|").join("
");g.text(x).attr("data-unformatted",x).call(l.convertToTspans,e),y=s.bBox(g.node())}g.attr("transform",r(-3,-y.height+8)),m.insert("rect",".static-attribution").attr({x:-y.width-6,y:-y.height-3,width:y.width+6,height:y.height+3,fill:"rgba(255, 255, 255, 0.75)"});var b=1;y.width+6>v&&(b=v/(y.width+6));var _=[c.l+c.w*d.x[1],c.t+c.h*(1-d.y[0])];m.attr("transform",r(_[0],_[1])+i(b))}},e.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots.map,i=0;i=0;r--)e.removeLayer(t[r][1])},o.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var i=t[0].trace,n=new a(e,i.uid),o=n.sourceId,s=r(t),l=n.below=e.belowLookup["trace-"+i.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),n._addLayers(s,l),t[0].trace._glTrace=n,n}}}),vw=p({"src/traces/choroplethmap/index.js"(e,t){t.exports={attributes:vv(),supplyDefaults:vx(),colorbar:oo(),calc:pH(),plot:v_(),hoverPoints:pY(),eventData:pZ(),selectPoints:p$(),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.updateOnSelect(t)},getBelow:function(e,t){for(var r=t.getMapLayers(),i=r.length-2;i>=0;i--){var n=r[i].id;if("string"==typeof n&&0===n.indexOf("water")){for(var a=i+1;a0?+f[u]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:y},properties:v})}}var b=a.extractOpts(t),_=b.reversescale?a.flipScale(b.colorscale):b.colorscale,w=_[0][1],T=["interpolate",["linear"],["heatmap-density"],0,1>n.opacity(w)?w:n.addOpacity(w,0)];for(u=1;u<_.length;u++)T.push(_[u][0],_[u][1]);var M=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return i.extendFlat(c.heatmap.paint,{"heatmap-weight":p?M:1/(b.max-b.min),"heatmap-color":T,"heatmap-radius":m?{type:"identity",property:"r"}:t.radius,"heatmap-opacity":t.opacity}),c.geojson={type:"FeatureCollection",features:h},c.heatmap.layout.visibility="visible",c}}}),vE=p({"src/traces/densitymap/plot.js"(e,t){var r=vS(),i=y4().traceLayerPrefix;function n(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",i+t+"-heatmap"]],this.below=null}var a=n.prototype;a.update=function(e){var t=this.subplot,i=this.layerList,n=r(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(n,a),this.below=a);for(var o=0;o=0;r--)e.removeLayer(t[r][1])},a.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var i=t[0].trace,a=new n(e,i.uid),o=a.sourceId,s=r(t),l=a.below=e.belowLookup["trace-"+i.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,l),a}}}),vC=p({"src/traces/densitymap/hover.js"(e,t){var r=rn(),i=vn().hoverPoints,n=vn().getExtraText;t.exports=function(e,t,a){var o=i(e,t,a);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,"z"in u){var h=s.subplot.mockAxis;s.z=u.z,s.zLabel=r.tickText(h,h.c2l(u.z),"hover").text}return s.extraText=n(c,u,l[0].t.labels),[s]}}}}),vL=p({"src/traces/densitymap/event_data.js"(e,t){t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e.z=t.z,e}}}),vP=p({"src/traces/densitymap/index.js"(e,t){t.exports={attributes:vM(),supplyDefaults:vk(),colorbar:oo(),formatLabels:ve(),calc:vA(),plot:vE(),hoverPoints:vC(),eventData:vL(),getBelow:function(e,t){for(var r=t.getMapLayers(),i=0;in.addOpacity(y[t%y.length],.8))),g("customdata");var v=e.link||{},x=s.newContainer(t,"link");function b(e,t){return r.coerce(v,x,i.link,e,t)}b("label"),b("arrowlen"),b("source"),b("target"),b("value"),b("line.color"),b("line.width"),b("hoverinfo",e.hoverinfo),o(v,x,b,f),b("hovertemplate"),b("sort");var _=.333>n.luminosity(h.paper_bgcolor),w=b("color",_?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)");function T(e){if(!n.isValid(e))return e;let t=n.opacity(e);return t<=.8?n.addOpacity(e,t+.2):_?n.brighten(e,10):n.adjustLightness(e,-10)}b("hovercolor",Array.isArray(w)?w.map(T):T(w)),b("customdata"),l(v,x,{name:"colorscales",handleItemDefaults:c}),a(t,h,d),d("orientation"),d("direction"),d("valueformat"),d("valuesuffix"),d("arrangement",m.x.length&&m.y.length?"freeform":void 0),r.coerceFont(d,"textfont",h.font,{autoShadowDflt:!0}),t._length=null}}}),vO=p({"node_modules/strongly-connected-components/scc.js"(e,t){t.exports=function(e){for(var t=e.length,r=Array(t),i=Array(t),n=Array(t),a=Array(t),o=Array(t),s=Array(t),l=0;l0;){var f=e[t=d[d.length-1]];if(a[t]=0&&s[t].push(o[m])}a[t]=p}else{if(i[t]===r[t]){for(var g=[],y=[],v=0,p=l.length-1;p>=0;--p){var x=l[p];if(n[x]=!1,g.push(x),y.push(s[x]),v+=s[x].length,o[x]=u.length,x===t){l.length=p;break}}u.push(g);for(var b=Array(v),p=0;px&&(x=l.source[t]),l.target[t]>x&&(x=l.target[t]);var b=x+1;e.node._count=b;var _,w=e.node.groups,T={};for(t=0;t0&&o(L,b)&&o(P,b)&&!(T.hasOwnProperty(L)&&T.hasOwnProperty(P)&&T[L]===T[P])){T.hasOwnProperty(P)&&(P=T[P]),T.hasOwnProperty(L)&&(L=T[L]),P*=1,f[L*=1]=f[P]=!0;var I="";l.label&&l.label[t]&&(I=l.label[t]);var z=null;I&&p.hasOwnProperty(I)&&(z=p[I]),c.push({pointNumber:t,label:I,color:u?l.color[t]:l.color,hovercolor:h?l.hovercolor[t]:l.hovercolor,customdata:d?l.customdata[t]:l.customdata,concentrationscale:z,source:L,target:P,value:+C}),S.push(L),E.push(P)}}var D=b+w.length,O=a(n.color),R=a(n.customdata),F=[];for(t=0;tb-1,childrenNodes:[],pointNumber:t,label:j,color:O?n.color[t]:n.color,customdata:R?n.customdata[t]:n.customdata})}var B=!1;return function(e,t,n){for(var a=i.init2dArray(e,0),o=0;o1})}(D,S,E)&&(B=!0),{circular:B,links:c,nodes:F,groups:w,groupLookup:T}}(t);return n({circular:l.circular,_nodes:l.nodes,_links:l.links,_groups:l.groups,_groupLookup:l.groupLookup})}}}),vF=p({"node_modules/d3-quadtree/dist/d3-quadtree.js"(e,t){var r;r=e,function(e){function t(e,t,r,i){if(isNaN(t)||isNaN(r))return e;var n,a,o,s,l,c,u,h,d,f=e._root,p={data:i},m=e._x0,g=e._y0,y=e._x1,v=e._y1;if(!f)return e._root=p,e;for(;f.length;)if((c=t>=(a=(m+y)/2))?m=a:y=a,(u=r>=(o=(g+v)/2))?g=o:v=o,n=f,!(f=f[h=u<<1|c]))return n[h]=p,e;if(s=+e._x.call(null,f.data),l=+e._y.call(null,f.data),t===s&&r===l)return p.next=f,n?n[h]=p:e._root=p,e;do n=n?n[h]=[,,,,]:e._root=[,,,,],(c=t>=(a=(m+y)/2))?m=a:y=a,(u=r>=(o=(g+v)/2))?g=o:v=o;while((h=u<<1|c)==(d=(l>=o)<<1|s>=a));return n[d]=f,n[h]=p,e}function r(e,t,r,i,n){this.node=e,this.x0=t,this.y0=r,this.x1=i,this.y1=n}function i(e){return e[0]}function n(e){return e[1]}function a(e,t,r){var a=new o(t??i,r??n,NaN,NaN,NaN,NaN);return null==e?a:a.addAll(e)}function o(e,t,r,i,n,a){this._x=e,this._y=t,this._x0=r,this._y0=i,this._x1=n,this._y1=a,this._root=void 0}function s(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var l=a.prototype=o.prototype;l.copy=function(){var e,t,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(!i)return r;if(!i.length)return r._root=s(i),r;for(e=[{source:i,target:r._root=[,,,,]}];i=e.pop();)for(var n=0;n<4;++n)(t=i.source[n])&&(t.length?e.push({source:t,target:i.target[n]=[,,,,]}):i.target[n]=s(t));return r},l.add=function(e){var r=+this._x.call(null,e),i=+this._y.call(null,e);return t(this.cover(r,i),r,i,e)},l.addAll=function(e){var r,i,n,a,o=e.length,s=Array(o),l=Array(o),c=1/0,u=1/0,h=-1/0,d=-1/0;for(i=0;ih&&(h=n),ad&&(d=a));if(c>h||u>d)return this;for(this.cover(c,u).cover(h,d),i=0;ie||e>=n||i>t||t>=a;)switch((o=[,,,,])[s=(tf||(o=c.y0)>p||(s=c.x1)=v)<<1|e>=y)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var x=e-this._x.call(null,g.data),b=t-this._y.call(null,g.data),_=x*x+b*b;if(_=(s=(p+g)/2))?p=s:g=s,(u=o>=(l=(m+y)/2))?m=l:y=l,t=f,!(f=f[h=u<<1|c]))return this;if(!f.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(r=t,d=h)}for(;f.data!==e;)if(i=f,!(f=f.next))return this;return(n=f.next)&&delete f.next,i?n?i.next=n:delete i.next:t?(n?t[h]=n:delete t[h],(f=t[0]||t[1]||t[2]||t[3])&&f===(t[3]||t[2]||t[1]||t[0])&&!f.length&&(r?r[d]=f:this._root=f)):this._root=n,this},l.removeAll=function(e){for(var t=0,r=e.length;ttypeof t?e:(r=r||self).d3=r.d3||{})}}),vj=p({"node_modules/d3-collection/dist/d3-collection.js"(e,t){(function(e){function t(){}function r(e,r){var i=new t;if(e instanceof t)e.each(function(e,t){i.set(t,e)});else if(Array.isArray(e)){var n,a=-1,o=e.length;if(null==r)for(;++a=l.length)return null!=e&&i.sort(e),null!=t?t(i):i;for(var s,c,h,d=-1,f=i.length,p=l[n++],m=r(),g=a();++dl.length)return r;var n,a=c[i-1];return null!=t&&i>=l.length?n=r.entries():(n=[],r.each(function(t,r){n.push({key:r,values:e(t,i)})})),null!=a?n.sort(function(e,t){return a(e.key,t.key)}):n}(u(e,0,a,o),0)},key:function(e){return l.push(e),s},sortKeys:function(e){return c[l.length-1]=e,s},sortValues:function(t){return e=t,s},rollup:function(e){return t=e,s}}},e.set=c,e.map=r,e.keys=function(e){var t=[];for(var r in e)t.push(r);return t},e.values=function(e){var t=[];for(var r in e)t.push(e[r]);return t},e.entries=function(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t},Object.defineProperty(e,"__esModule",{value:!0})})("object"==typeof e&&"u">typeof t?e:e.d3=e.d3||{})}}),vB=p({"node_modules/d3-dispatch/dist/d3-dispatch.js"(e,t){var r;r=e,function(e){var t={value:function(){}};function r(){for(var e,t=0,r=arguments.length,n={};t=0&&(t=e.slice(r+1),e=e.slice(0,r)),e&&!i.hasOwnProperty(e))throw Error("unknown type: "+e);return{type:e,name:t}}),o=-1,s=a.length;if(arguments.length<2){for(;++o0)for(var r,i,n=Array(r),a=0;atypeof t?e:(r=r||self).d3=r.d3||{})}}),vN=p({"node_modules/d3-timer/dist/d3-timer.js"(e,t){var r;r=e,function(e){var t,r,i=0,n=0,a=0,o=0,s=0,l=0,c="object"==typeof performance&&performance.now?performance:Date,u="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function h(){return s||(u(d),s=c.now()+l)}function d(){s=0}function f(){this._call=this._time=this._next=null}function p(e,t,r){var i=new f;return i.restart(e,t,r),i}function m(){h(),++i;for(var e,r=t;r;)(e=s-r._time)>=0&&r._call.call(null,e),r=r._next;--i}function g(){s=(o=c.now())+l,i=n=0;try{m()}finally{i=0,function(){for(var e,i,n=t,a=1/0;n;)n._call?(a>n._time&&(a=n._time),e=n,n=n._next):(i=n._next,n._next=null,n=e?e._next=i:t=i);r=e,v(a)}(),s=0}}function y(){var e=c.now(),t=e-o;t>1e3&&(l-=t,o=e)}function v(e){!i&&(n&&(n=clearTimeout(n)),e-s>24?(e<1/0&&(n=setTimeout(g,e-c.now()-l)),a&&(a=clearInterval(a))):(a||(o=c.now(),a=setInterval(y,1e3)),i=1,u(g)))}f.prototype=p.prototype={constructor:f,restart:function(e,i,n){if("function"!=typeof e)throw TypeError("callback is not a function");n=(null==n?h():+n)+(null==i?0:+i),this._next||r===this||(r?r._next=this:t=this,r=this),this._call=e,this._time=n,v()},stop:function(){this._call&&(this._call=null,this._time=1/0,v())}},e.interval=function(e,t,r){var i=new f,n=t;return null==t?i.restart(e,t,r):(t*=1,r=null==r?h():+r,i.restart(function a(o){o+=n,i.restart(a,n+=t,r),e(o)},t,r)),i},e.now=h,e.timeout=function(e,t,r){var i=new f;return t=null==t?0:+t,i.restart(function(r){i.stop(),e(r+t)},t,r),i},e.timer=p,e.timerFlush=m,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r=r||self).d3=r.d3||{})}}),vU=p({"node_modules/d3-force/dist/d3-force.js"(e,t){var r;r=function(e,t,r,i,n){function a(e){return function(){return e}}function o(){return(Math.random()-.5)*1e-6}function s(e){return e.x+e.vx}function l(e){return e.y+e.vy}function c(e){return e.index}function u(e,t){var r=e.get(t);if(!r)throw Error("missing: "+t);return r}function h(e){return e.x}function d(e){return e.y}var f=Math.PI*(3-Math.sqrt(5));e.forceCenter=function(e,t){var r;function i(){var i,n,a=r.length,o=0,s=0;for(i=0;iu.index){var h=d-s.x-s.vx,g=f-s.y-s.vy,y=h*h+g*g;yd+c||if+c||ae.r&&(e.r=e[t].r)}function d(){if(r){var t,n,a=r.length;for(i=Array(a),t=0;t=c)){(e.data!==r||e.next)&&(0===h&&(p+=(h=o())*h),0===d&&(p+=(d=o())*d),p1?(null==r?u.remove(e):u.set(e,y(r)),t):u.get(e)},find:function(t,r,i){var n,a,o,s,l,c=0,u=e.length;for(null==i?i=1/0:i*=i,c=0;c1?(d.on(e,r),t):d.on(e)}}},e.forceX=function(e){var t,r,i,n=a(.1);function o(e){for(var n,a=0,o=t.length;atypeof t?r(e,vF(),vj(),vB(),vN()):r(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)}}),vV=p({"node_modules/d3-array/dist/d3-array.js"(e,t){var r;r=e,function(e){function t(e,t){return et?1:e>=t?0:NaN}function r(e){var r;let i=e,n=e;function a(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;0>n(e[a],t)?r=a+1:i=a}return r}return 1===e.length&&(i=(t,r)=>e(t)-r,r=e,n=(e,i)=>t(r(e),i)),{left:a,center:function(e,t,r,n){null==r&&(r=0),null==n&&(n=e.length);let o=a(e,t,r,n-1);return o>r&&i(e[o-1],t)>-i(e[o],t)?o-1:o},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[a],t)>0?i=a:r=a+1}return r}}}function i(e){return null===e?NaN:+e}let n=r(t),a=n.right,o=n.left,s=r(i).center;function l(e,t){let r=0;if(void 0===t)for(let t of e)null!=t&&(t*=1)>=t&&++r;else{let i=-1;for(let n of e)null!=(n=t(n,++i,e))&&(n*=1)>=n&&++r}return r}function c(e){return 0|e.length}function u(e){return!(e>0)}function h(e){return"object"!=typeof e||"length"in e?e:Array.from(e)}function d(e,t){let r=0,i,n=0,a=0;if(void 0===t)for(let t of e)null!=t&&(t*=1)>=t&&(i=t-n,n+=i/++r,a+=i*(t-n));else{let o=-1;for(let s of e)null!=(s=t(s,++o,e))&&(s*=1)>=s&&(i=s-n,n+=i/++r,a+=i*(s-n))}if(r>1)return a/(r-1)}function f(e,t){let r=d(e,t);return r&&Math.sqrt(r)}function p(e,t){let r,i;if(void 0===t)for(let t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i=a&&(r=i=a):(r>a&&(r=a),i0){for(a=e[--t];t>0&&(a=(r=a)+(i=e[--t]),!(n=i-(a-r))););t>0&&(n<0&&e[t-1]<0||n>0&&e[t-1]>0)&&(r=a+(i=2*n),i==r-a&&(a=r))}return a}}class g extends Map{constructor(e,t=w){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(let[t,r]of e)this.set(t,r)}get(e){return super.get(v(this,e))}has(e){return super.has(v(this,e))}set(e,t){return super.set(x(this,e),t)}delete(e){return super.delete(_(this,e))}}class y extends Set{constructor(e,t=w){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(let t of e)this.add(t)}has(e){return super.has(v(this,e))}add(e){return super.add(x(this,e))}delete(e){return super.delete(_(this,e))}}function v({_intern:e,_key:t},r){let i=t(r);return e.has(i)?e.get(i):r}function x({_intern:e,_key:t},r){let i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function _({_intern:e,_key:t},r){let i=t(r);return e.has(i)&&(r=e.get(r),e.delete(i)),r}function w(e){return null!==e&&"object"==typeof e?e.valueOf():e}function T(e){return e}function M(e,...t){return S(e,T,T,t)}function k(e,t,...r){return S(e,T,t,r)}function A(e){if(1!==e.length)throw Error("duplicate key");return e[0]}function S(e,t,r,i){return function e(n,a){if(a>=i.length)return r(n);let o=new g,s=i[a++],l=-1;for(let e of n){let t=s(e,++l,n),r=o.get(t);r?r.push(e):o.set(t,[e])}for(let[t,r]of o)o.set(t,e(r,a));return t(o)}(e,0)}function E(e,t){return Array.from(t,t=>e[t])}function C(e,...r){if("function"!=typeof e[Symbol.iterator])throw TypeError("values is not iterable");e=Array.from(e);let[i=t]=r;if(1===i.length||r.length>1){let n=Uint32Array.from(e,(e,t)=>t);return r.length>1?(r=r.map(t=>e.map(t)),n.sort((e,i)=>{for(let n of r){let r=t(n[e],n[i]);if(r)return r}})):(i=e.map(i),n.sort((e,r)=>t(i[e],i[r]))),E(e,n)}return e.sort(i)}var L=Array.prototype.slice;function P(e){return function(){return e}}var I=Math.sqrt(50),z=Math.sqrt(10),D=Math.sqrt(2);function O(e,t,r){var i,n,a,o,s=-1;if(r*=1,(e*=1)==(t*=1)&&r>0)return[e];if((i=t0){let r=Math.round(e/o),i=Math.round(t/o);for(r*ot&&--i,a=Array(n=i-r+1);++st&&--i,a=Array(n=i-r+1);++s=0?(a>=I?10:a>=z?5:a>=D?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(a>=I?10:a>=z?5:a>=D?2:1)}function F(e,t,r){let i;for(;;){let n=R(e,t,r);if(n===i||0===n||!isFinite(n))return[e,t];n>0?(e=Math.floor(e/n)*n,t=Math.ceil(t/n)*n):n<0&&(e=Math.ceil(e*n)/n,t=Math.floor(t*n)/n),i=n}}function j(e){return Math.ceil(Math.log(l(e))/Math.LN2)+1}function B(){var e=T,t=p,r=j;function i(i){Array.isArray(i)||(i=Array.from(i));var n,o,s=i.length,l=Array(s);for(n=0;n=h)if(e>=h&&t===p){let e=R(u,h,r);isFinite(e)&&(e>0?h=(Math.floor(h/e)+1)*e:e<0&&(h=-((Math.ceil(-(h*e))+1)/e)))}else d.pop()}for(var f=d.length;d[0]<=u;)d.shift(),--f;for(;d[f-1]>h;)d.pop(),--f;var m,g=Array(f+1);for(n=0;n<=f;++n)(m=g[n]=[]).x0=n>0?d[n-1]:u,m.x1=n=t)&&(r=t);else{let i=-1;for(let n of e)null!=(n=t(n,++i,e))&&(r=n)&&(r=n)}return r}function U(e,t){let r;if(void 0===t)for(let t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let i=-1;for(let n of e)null!=(n=t(n,++i,e))&&(r>n||void 0===r&&n>=n)&&(r=n)}return r}function V(e,r,i=0,n=e.length-1,a=t){for(;n>i;){if(n-i>600){let t=n-i+1,o=r-i+1,s=Math.log(t),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(t-l)/t)*(o-t/2<0?-1:1),u=Math.max(i,Math.floor(r-o*l/t+c)),h=Math.min(n,Math.floor(r+(t-o)*l/t+c));V(e,r,u,h,a)}let t=e[r],o=i,s=n;for(q(e,i,r),a(e[n],t)>0&&q(e,i,n);oa(e[o],t);)++o;for(;a(e[s],t)>0;)--s}0===a(e[i],t)?q(e,i,s):q(e,++s,n),s<=r&&(i=s+1),r<=s&&(n=s-1)}return e}function q(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function H(e,t,r){if(i=(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t*=1)>=t&&(yield t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(i*=1)>=i&&(yield i)}}(e,r))).length){if((t*=1)<=0||i<2)return U(e);if(t>=1)return N(e);var i,n=(i-1)*t,a=Math.floor(n),o=N(V(e,a).subarray(0,a+1));return o+(U(e.subarray(a+1))-o)*(n-a)}}function G(e,t){let r,i=-1,n=-1;if(void 0===t)for(let t of e)++n,null!=t&&(r=t)&&(r=t,i=n);else for(let a of e)null!=(a=t(a,++n,e))&&(r=a)&&(r=a,i=n);return i}function W(e,t){let r,i=-1,n=-1;if(void 0===t)for(let t of e)++n,null!=t&&(r>t||void 0===r&&t>=t)&&(r=t,i=n);else for(let a of e)null!=(a=t(a,++n,e))&&(r>a||void 0===r&&a>=a)&&(r=a,i=n);return i}function Y(e,t){return[e,t]}function Z(e,r=t){if(1===r.length)return W(e,r);let i,n=-1,a=-1;for(let t of e)++a,(n<0?0===r(t,t):0>r(t,i))&&(i=t,n=a);return n}var $=X(Math.random);function X(e){return function(t,r=0,i=t.length){let n=i-(r*=1);for(;n;){let i=e()*n--|0,a=t[n+r];t[n+r]=t[i+r],t[i+r]=a}return t}}function K(e){if(!(n=e.length))return[];for(var t=-1,r=U(e,J),i=Array(r);++tt(...e)),i=(e=e.map(h)).map(c),n=e.length-1,a=Array(n+1).fill(0),o=[];if(n<0||i.some(u))return o;for(;;){o.push(a.map((t,r)=>e[r][t]));let t=n;for(;++a[t]===i[t];){if(0===t)return r?o.map(r):o;a[t--]=0}}},e.cumsum=function(e,t){var r=0,i=0;return Float64Array.from(e,void 0===t?e=>r+=+e||0:n=>r+=+t(n,i++,e)||0)},e.descending=function(e,t){return te?1:t>=e?0:NaN},e.deviation=f,e.difference=function(e,...t){for(let r of(e=new Set(e),t))for(let t of r)e.delete(t);return e},e.disjoint=function(e,t){let r=t[Symbol.iterator](),i=new Set;for(let t of e){let e,n;if(i.has(t))return!1;for(;({value:e,done:n}=r.next())&&!n;){if(Object.is(t,e))return!1;i.add(e)}}return!0},e.every=function(e,t){if("function"!=typeof t)throw TypeError("test is not a function");let r=-1;for(let i of e)if(!t(i,++r,e))return!1;return!0},e.extent=p,e.fcumsum=function(e,t){let r=new m,i=-1;return Float64Array.from(e,void 0===t?e=>r.add(+e||0):n=>r.add(+t(n,++i,e)||0))},e.filter=function(e,t){if("function"!=typeof t)throw TypeError("test is not a function");let r=[],i=-1;for(let n of e)t(n,++i,e)&&r.push(n);return r},e.fsum=function(e,t){let r=new m;if(void 0===t)for(let t of e)(t*=1)&&r.add(t);else{let i=-1;for(let n of e)(n=+t(n,++i,e))&&r.add(n)}return+r},e.greatest=function(e,r=t){let i,n=!1;if(1===r.length){let a;for(let o of e){let e=r(o);(n?t(e,a)>0:0===t(e,e))&&(i=o,a=e,n=!0)}}else for(let t of e)(n?r(t,i)>0:0===r(t,t))&&(i=t,n=!0);return i},e.greatestIndex=function(e,r=t){if(1===r.length)return G(e,r);let i,n=-1,a=-1;for(let t of e)++a,(n<0?0===r(t,t):r(t,i)>0)&&(i=t,n=a);return n},e.group=M,e.groupSort=function(e,r,i){return(1===r.length?C(k(e,r,i),([e,r],[i,n])=>t(r,n)||t(e,i)):C(M(e,i),([e,i],[n,a])=>r(i,a)||t(e,n))).map(([e])=>e)},e.groups=function(e,...t){return S(e,Array.from,T,t)},e.histogram=B,e.index=function(e,...t){return S(e,T,A,t)},e.indexes=function(e,...t){return S(e,Array.from,A,t)},e.intersection=function(e,...t){e=new Set(e),t=t.map(Q);e:for(let r of e)for(let i of t)if(!i.has(r)){e.delete(r);continue e}return e},e.least=function(e,r=t){let i,n=!1;if(1===r.length){let a;for(let o of e){let e=r(o);(n?0>t(e,a):0===t(e,e))&&(i=o,a=e,n=!0)}}else for(let t of e)(n?0>r(t,i):0===r(t,t))&&(i=t,n=!0);return i},e.leastIndex=Z,e.map=function(e,t){if("function"!=typeof e[Symbol.iterator])throw TypeError("values is not iterable");if("function"!=typeof t)throw TypeError("mapper is not a function");return Array.from(e,(r,i)=>t(r,i,e))},e.max=N,e.maxIndex=G,e.mean=function(e,t){let r=0,i=0;if(void 0===t)for(let t of e)null!=t&&(t*=1)>=t&&(++r,i+=t);else{let n=-1;for(let a of e)null!=(a=t(a,++n,e))&&(a*=1)>=a&&(++r,i+=a)}if(r)return i/r},e.median=function(e,t){return H(e,.5,t)},e.merge=function(e){return Array.from(function*(e){for(let t of e)yield*b(t)}(e))},e.min=U,e.minIndex=W,e.nice=F,e.pairs=function(e,t=Y){let r=[],i,n=!1;for(let a of e)n&&r.push(t(i,a)),i=a,n=!0;return r},e.permute=E,e.quantile=H,e.quantileSorted=function(e,t,r=i){if(n=e.length){if((t*=1)<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,o=Math.floor(a),s=+r(e[o],o,e);return s+(r(e[o+1],o+1,e)-s)*(a-o)}},e.quickselect=V,e.range=function(e,t,r){e*=1,t*=1,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=0|Math.max(0,Math.ceil((t-e)/r)),a=Array(n);++i=I?n*=10:a>=z?n*=5:a>=D&&(n*=2),ttypeof t?e:(r="u">typeof globalThis?globalThis:r||self).d3=r.d3||{})}}),vq=p({"node_modules/d3-path/dist/d3-path.js"(e,t){var r;r=e,function(e){var t=Math.PI,r=2*t,i=r-1e-6;function n(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function a(){return new n}n.prototype=a.prototype={constructor:n,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,i){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+i)},bezierCurveTo:function(e,t,r,i,n,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +i+","+(this._x1=+n)+","+(this._y1=+a)},arcTo:function(e,r,i,n,a){e*=1,r*=1,i*=1,n*=1,a*=1;var o=this._x1,s=this._y1,l=i-e,c=n-r,u=o-e,h=s-r,d=u*u+h*h;if(a<0)throw Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=r);else if(d>1e-6)if(Math.abs(h*l-c*u)>1e-6&&a){var f=i-o,p=n-s,m=l*l+c*c,g=Math.sqrt(m),y=Math.sqrt(d),v=a*Math.tan((t-Math.acos((m+d-(f*f+p*p))/(2*g*y)))/2),x=v/y,b=v/g;Math.abs(x-1)>1e-6&&(this._+="L"+(e+x*u)+","+(r+x*h)),this._+="A"+a+","+a+",0,0,"+ +(h*f>u*p)+","+(this._x1=e+b*l)+","+(this._y1=r+b*c)}else this._+="L"+(this._x1=e)+","+(this._y1=r)},arc:function(e,n,a,o,s,l){e*=1,n*=1,a*=1,l=!!l;var c=a*Math.cos(o),u=a*Math.sin(o),h=e+c,d=n+u,f=1^l,p=l?o-s:s-o;if(a<0)throw Error("negative radius: "+a);null===this._x1?this._+="M"+h+","+d:(Math.abs(this._x1-h)>1e-6||Math.abs(this._y1-d)>1e-6)&&(this._+="L"+h+","+d),a&&(p<0&&(p=p%r+r),p>i?this._+="A"+a+","+a+",0,1,"+f+","+(e-c)+","+(n-u)+"A"+a+","+a+",0,1,"+f+","+(this._x1=h)+","+(this._y1=d):p>1e-6&&(this._+="A"+a+","+a+",0,"+ +(p>=t)+","+f+","+(this._x1=e+a*Math.cos(s))+","+(this._y1=n+a*Math.sin(s))))},rect:function(e,t,r,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +i+"h"+-r+"Z"},toString:function(){return this._}},e.path=a,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r=r||self).d3=r.d3||{})}}),vH=p({"node_modules/d3-shape/dist/d3-shape.js"(e,t){var r,i;r=e,i=function(e,t){function r(e){return function(){return e}}var i=Math.abs,n=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,c=Math.sqrt,u=Math.PI,h=u/2,d=2*u;function f(e){return e>=1?h:e<=-1?-h:Math.asin(e)}function p(e){return e.innerRadius}function m(e){return e.outerRadius}function g(e){return e.startAngle}function y(e){return e.endAngle}function v(e){return e&&e.padAngle}function x(e,t,r,i,n,a,s){var l=e-r,u=t-i,h=(s?a:-a)/c(l*l+u*u),d=h*u,f=-h*l,p=e+d,m=t+f,g=r+d,y=i+f,v=(p+g)/2,x=(m+y)/2,b=g-p,_=y-m,w=b*b+_*_,T=n-a,M=p*y-g*m,k=(_<0?-1:1)*c(o(0,T*T*w-M*M)),A=(M*_-b*k)/w,S=(-M*b-_*k)/w,E=(M*_+b*k)/w,C=(-M*b+_*k)/w,L=A-v,P=S-x,I=E-v,z=C-x;return L*L+P*P>I*I+z*z&&(A=E,S=C),{cx:A,cy:S,x01:-d,y01:-f,x11:A*(n/T-1),y11:S*(n/T-1)}}function b(e){this._context=e}function _(e){return new b(e)}function w(e){return e[0]}function T(e){return e[1]}function M(){var e=w,i=T,n=r(!0),a=null,o=_,s=null;function l(r){var l,c,u,h=r.length,d=!1;for(null==a&&(s=o(u=t.path())),l=0;l<=h;++l)!(l=h;--d)c.point(y[d],v[d]);c.lineEnd(),c.areaEnd()}g&&(y[u]=+e(f,u,r),v[u]=+n(f,u,r),c.point(i?+i(f,u,r):y[u],a?+a(f,u,r):v[u]))}if(p)return c=null,p+""||null}function h(){return M().defined(o).curve(l).context(s)}return u.x=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),i=null,u):e},u.x0=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),u):e},u.x1=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:r(+e),u):i},u.y=function(e){return arguments.length?(n="function"==typeof e?e:r(+e),a=null,u):n},u.y0=function(e){return arguments.length?(n="function"==typeof e?e:r(+e),u):n},u.y1=function(e){return arguments.length?(a=null==e?null:"function"==typeof e?e:r(+e),u):a},u.lineX0=u.lineY0=function(){return h().x(e).y(n)},u.lineY1=function(){return h().x(e).y(a)},u.lineX1=function(){return h().x(i).y(n)},u.defined=function(e){return arguments.length?(o="function"==typeof e?e:r(!!e),u):o},u.curve=function(e){return arguments.length?(l=e,null!=s&&(c=l(s)),u):l},u.context=function(e){return arguments.length?(null==e?s=c=null:c=l(s=e),u):s},u}function A(e,t){return te?1:t>=e?0:NaN}function S(e){return e}b.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var E=L(_);function C(e){this._curve=e}function L(e){function t(t){return new C(e(t))}return t._curve=e,t}function P(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(L(e)):t()._curve},e}function I(){return P(M().curve(E))}function z(){var e=k().curve(E),t=e.curve,r=e.lineX0,i=e.lineX1,n=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return P(r())},delete e.lineX0,e.lineEndAngle=function(){return P(i())},delete e.lineX1,e.lineInnerRadius=function(){return P(n())},delete e.lineY0,e.lineOuterRadius=function(){return P(a())},delete e.lineY1,e.curve=function(e){return arguments.length?t(L(e)):t()._curve},e}function D(e,t){return[(t*=1)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}C.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),-(t*Math.cos(e)))}};var O=Array.prototype.slice;function R(e){return e.source}function F(e){return e.target}function j(e){var i=R,n=F,a=w,o=T,s=null;function l(){var r,l=O.call(arguments),c=i.apply(this,l),u=n.apply(this,l);if(s||(s=r=t.path()),e(s,+a.apply(this,(l[0]=c,l)),+o.apply(this,l),+a.apply(this,(l[0]=u,l)),+o.apply(this,l)),r)return s=null,r+""||null}return l.source=function(e){return arguments.length?(i=e,l):i},l.target=function(e){return arguments.length?(n=e,l):n},l.x=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),l):a},l.y=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),l):o},l.context=function(e){return arguments.length?(s=e??null,l):s},l}function B(e,t,r,i,n){e.moveTo(t,r),e.bezierCurveTo(t=(t+i)/2,r,t,n,i,n)}function N(e,t,r,i,n){e.moveTo(t,r),e.bezierCurveTo(t,r=(r+n)/2,i,r,i,n)}function U(e,t,r,i,n){var a=D(t,r),o=D(t,r=(r+n)/2),s=D(i,r),l=D(i,n);e.moveTo(a[0],a[1]),e.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var V={draw:function(e,t){var r=Math.sqrt(t/u);e.moveTo(r,0),e.arc(0,0,r,0,d)}},q={draw:function(e,t){var r=Math.sqrt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},H=Math.sqrt(1/3),G=2*H,W={draw:function(e,t){var r=Math.sqrt(t/G),i=r*H;e.moveTo(0,-r),e.lineTo(i,0),e.lineTo(0,r),e.lineTo(-i,0),e.closePath()}},Y=Math.sin(u/10)/Math.sin(7*u/10),Z=Math.sin(d/10)*Y,$=-Math.cos(d/10)*Y,X={draw:function(e,t){var r=Math.sqrt(.8908130915292852*t),i=Z*r,n=$*r;e.moveTo(0,-r),e.lineTo(i,n);for(var a=1;a<5;++a){var o=d*a/5,s=Math.cos(o),l=Math.sin(o);e.lineTo(l*r,-s*r),e.lineTo(s*i-l*n,l*i+s*n)}e.closePath()}},K={draw:function(e,t){var r=Math.sqrt(t),i=-r/2;e.rect(i,i,r,r)}},J=Math.sqrt(3),Q={draw:function(e,t){var r=-Math.sqrt(t/(3*J));e.moveTo(0,2*r),e.lineTo(-J*r,-r),e.lineTo(J*r,-r),e.closePath()}},ee=Math.sqrt(3)/2,et=1/Math.sqrt(12),er=(et/2+1)*3,ei={draw:function(e,t){var r=Math.sqrt(t/er),i=r/2,n=r*et,a=r*et+r,o=-i;e.moveTo(i,n),e.lineTo(i,a),e.lineTo(o,a),e.lineTo(-.5*i-ee*n,ee*i+-.5*n),e.lineTo(-.5*i-ee*a,ee*i+-.5*a),e.lineTo(-.5*o-ee*a,ee*o+-.5*a),e.lineTo(-.5*i+ee*n,-.5*n-ee*i),e.lineTo(-.5*i+ee*a,-.5*a-ee*i),e.lineTo(-.5*o+ee*a,-.5*a-ee*o),e.closePath()}},en=[V,q,W,K,X,Q,ei];function ea(){}function eo(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function es(e){this._context=e}function el(e){this._context=e}function ec(e){this._context=e}function eu(e,t){this._basis=new es(e),this._beta=t}es.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:eo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:eo(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},el.prototype={areaStart:ea,areaEnd:ea,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)}},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:eo(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},ec.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:eo(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},eu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i,n=e[0],a=t[0],o=e[r]-n,s=t[r]-a,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*e[l]+(1-this._beta)*(n+i*o),this._beta*t[l]+(1-this._beta)*(a+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var eh=function e(t){function r(e){return 1===t?new es(e):new eu(e,t)}return r.beta=function(t){return e(+t)},r}(.85);function ed(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function ef(e,t){this._context=e,this._k=(1-t)/6}ef.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:ed(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ed(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ep=function e(t){function r(e){return new ef(e,t)}return r.tension=function(t){return e(+t)},r}(0);function em(e,t){this._context=e,this._k=(1-t)/6}em.prototype={areaStart:ea,areaEnd:ea,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)}},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ed(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var eg=function e(t){function r(e){return new em(e,t)}return r.tension=function(t){return e(+t)},r}(0);function ey(e,t){this._context=e,this._k=(1-t)/6}ey.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,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:ed(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ev=function e(t){function r(e){return new ey(e,t)}return r.tension=function(t){return e(+t)},r}(0);function ex(e,t,r){var i=e._x1,n=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>1e-12){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/u}e._context.bezierCurveTo(i,n,a,o,e._x2,e._y2)}function eb(e,t){this._context=e,this._alpha=t}eb.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e*=1,t*=1,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:ex(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var e_=function e(t){function r(e){return t?new eb(e,t):new ef(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function ew(e,t){this._context=e,this._alpha=t}ew.prototype={areaStart:ea,areaEnd:ea,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)}},point:function(e,t){if(e*=1,t*=1,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ex(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var eT=function e(t){function r(e){return t?new ew(e,t):new em(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function eM(e,t){this._context=e,this._alpha=t}eM.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e*=1,t*=1,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,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:ex(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ek=function e(t){function r(e){return t?new eM(e,t):new ey(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function eA(e){this._context=e}eA.prototype={areaStart:ea,areaEnd:ea,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e*=1,t*=1,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function eS(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),o=(r-e._y1)/(n||i<0&&-0);return((a<0?-1:1)+(o<0?-1:1))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs((a*n+o*i)/(i+n)))||0}function eE(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function eC(e,t,r){var i=e._x0,n=e._y0,a=e._x1,o=e._y1,s=(a-i)/3;e._context.bezierCurveTo(i+s,n+s*t,a-s,o-s*r,a,o)}function eL(e){this._context=e}function eP(e){this._context=new eI(e)}function eI(e){this._context=e}function ez(e){this._context=e}function eD(e){var t,r,i=e.length-1,n=Array(i),a=Array(i),o=Array(i);for(n[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t=0;--t)n[t]=(o[t]-n[t+1])/a[t];for(a[i-1]=(e[i]+n[i-1])/2,t=0;t1)for(var r,i,n,a=1,o=e[t[0]],s=o.length;a=0;)r[t]=t;return r}function ej(e,t){return e[t]}function eB(e){var t=e.map(eN);return eF(e).sort(function(e,r){return t[e]-t[r]})}function eN(e){for(var t,r=-1,i=0,n=e.length,a=-1/0;++ra&&(a=t,i=r);return i}function eU(e){var t=e.map(eV);return eF(e).sort(function(e,r){return t[e]-t[r]})}function eV(e){for(var t,r=0,i=-1,n=e.length;++i=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}}this._x=e,this._y=t}},e.arc=function(){var e=p,o=m,b=r(0),_=null,w=g,T=y,M=v,k=null;function A(){var r,p,m=+e.apply(this,arguments),g=+o.apply(this,arguments),y=w.apply(this,arguments)-h,v=T.apply(this,arguments)-h,A=i(v-y),S=v>y;if(k||(k=r=t.path()),g1e-12)if(A>d-1e-12)k.moveTo(g*a(y),g*l(y)),k.arc(0,0,g,y,v,!S),m>1e-12&&(k.moveTo(m*a(v),m*l(v)),k.arc(0,0,m,v,y,S));else{var E,C,L=y,P=v,I=y,z=v,D=A,O=A,R=M.apply(this,arguments)/2,F=R>1e-12&&(_?+_.apply(this,arguments):c(m*m+g*g)),j=s(i(g-m)/2,+b.apply(this,arguments)),B=j,N=j;if(F>1e-12){var U=f(F/m*l(R)),V=f(F/g*l(R));(D-=2*U)>1e-12?(U*=S?1:-1,I+=U,z-=U):(D=0,I=z=(y+v)/2),(O-=2*V)>1e-12?(V*=S?1:-1,L+=V,P-=V):(O=0,L=P=(y+v)/2)}var q=g*a(L),H=g*l(L),G=m*a(z),W=m*l(z);if(j>1e-12){var Y,Z=g*a(P),$=g*l(P),X=m*a(I),K=m*l(I);if(A1?0:J<-1?u:Math.acos(J))/2),en=c(Y[0]*Y[0]+Y[1]*Y[1]);B=s(j,(m-en)/(ei-1)),N=s(j,(g-en)/(ei+1))}}O>1e-12?N>1e-12?(E=x(X,K,q,H,g,N,S),C=x(Z,$,G,W,g,N,S),k.moveTo(E.cx+E.x01,E.cy+E.y01),N1e-12&&D>1e-12?B>1e-12?(E=x(G,W,Z,$,m,-B,S),C=x(q,H,X,K,m,-B,S),k.lineTo(E.cx+E.x01,E.cy+E.y01),B0&&(p+=h);for(null!=t?m.sort(function(e,r){return t(g[e],g[r])}):null!=i&&m.sort(function(e,t){return i(r[e],r[t])}),s=0,c=p?(v-f*b)/p:0;s0?h*c:0)+b,g[l]={data:r[l],index:s,value:h,startAngle:y,endAngle:u,padAngle:x};return g}return s.value=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),s):e},s.sortValues=function(e){return arguments.length?(t=e,i=null,s):t},s.sort=function(e){return arguments.length?(i=e,t=null,s):i},s.startAngle=function(e){return arguments.length?(n="function"==typeof e?e:r(+e),s):n},s.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),s):a},s.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),s):o},s},e.pointRadial=D,e.radialArea=z,e.radialLine=I,e.stack=function(){var e=r([]),t=eF,i=eR,n=ej;function a(r){var a,o,s=e.apply(this,arguments),l=r.length,c=s.length,u=Array(c);for(a=0;a0)for(var r,i,n,a,o,s,l=0,c=e[t[0]].length;l0?(i[0]=a,i[1]=a+=n):n<0?(i[1]=o,i[0]=o+=n):(i[0]=0,i[1]=n)},e.stackOffsetExpand=function(e,t){if((i=e.length)>0){for(var r,i,n,a=0,o=e[0].length;a0){for(var r,i=0,n=e[t[0]],a=n.length;i0&&(i=(r=e[t[0]]).length)>0){for(var r,i,n,a=0,o=1;otypeof t?i(e,vq()):i((r=r||self).d3=r.d3||{},r.d3)}}),vG=p({"node_modules/@plotly/d3-sankey/dist/@plotly/d3-sankey.js"(e,t){var r,i;r=e,i=function(e,t,r){function i(e){return e.target.depth}function n(e,t){return e.sourceLinks.length?e.depth:t-1}function a(e){return function(){return e}}function o(e,t){return l(e.source,t.source)||e.index-t.index}function s(e,t){return l(e.target,t.target)||e.index-t.index}function l(e,t){return e.y0-t.y0}function c(e){return e.value}function u(e){return e.index}function h(e){return e.nodes}function d(e){return e.links}function f(e,t){let r=e.get(t);if(!r)throw Error("missing: "+t);return r}function p({nodes:e}){for(let t of e){let e=t.y0,r=e;for(let r of t.sourceLinks)r.y0=e+r.width/2,e+=r.width;for(let e of t.targetLinks)e.y1=r+e.width/2,r+=e.width}}function m(e){return[e.source.x1,e.y0]}function g(e){return[e.target.x0,e.y1]}e.sankey=function(){let e=0,r=0,i=1,m=1,g=24,y=8,v,x=u,b=n,_,w,T=h,M=d,k=6,A=2/3;function S(){let n={nodes:T.apply(null,arguments),links:M.apply(null,arguments)};return function({nodes:e,links:t}){for(let[t,r]of e.entries())r.index=t,r.sourceLinks=[],r.targetLinks=[];let r=new Map(e.map((t,r)=>[x(t,r,e),t]));for(let[e,i]of t.entries()){i.index=e;let{source:t,target:n}=i;"object"!=typeof t&&(t=i.source=f(r,t)),"object"!=typeof n&&(n=i.target=f(r,n)),t.sourceLinks.push(i),n.targetLinks.push(i)}if(null!=w)for(let{sourceLinks:t,targetLinks:r}of e)t.sort(w),r.sort(w)}(n),function({nodes:e}){for(let r of e)r.value=void 0===r.fixedValue?Math.max(t.sum(r.sourceLinks,c),t.sum(r.targetLinks,c)):r.fixedValue}(n),function({nodes:e}){let t=e.length,r=new Set(e),i=new Set,n=0;for(;r.size;){for(let e of r)for(let{target:t}of(e.depth=n,e.sourceLinks))i.add(t);if(++n>t)throw Error("circular link");r=i,i=new Set}}(n),function({nodes:e}){let t=e.length,r=new Set(e),i=new Set,n=0;for(;r.size;){for(let e of r)for(let{source:t}of(e.height=n,e.targetLinks))i.add(t);if(++n>t)throw Error("circular link");r=i,i=new Set}}(n),function(n){let a=function({nodes:r}){let n=t.max(r,e=>e.depth)+1,a=(i-e-g)/(n-1),o=Array(n);for(let t of r){let r=Math.max(0,Math.min(n-1,Math.floor(b.call(null,t,n))));t.layer=r,t.x0=e+r*a,t.x1=t.x0+g,o[r]?o[r].push(t):o[r]=[t]}if(_)for(let e of o)e.sort(_);return o}(n);v=Math.min(y,A*(m-r)/(t.max(a,e=>e.length)-1)),function(e){let i=t.min(e,e=>(m-r-(e.length-1)*v)/t.sum(e,c));for(let t of e){let e=r;for(let r of t)for(let t of(r.y0=e,r.y1=e+r.value*i,e=r.y1+v,r.sourceLinks))t.width=t.value*i;e=(m-e+v)/(t.length+1);for(let r=0;r=0;--n){let i=e[n];for(let e of i){let r=0,i=0;for(let{target:t,value:n}of e.sourceLinks){let a=n*(t.layer-e.layer);r+=function(e,t){let r=t.y0-(t.targetLinks.length-1)*v/2;for(let{source:i,width:n}of t.targetLinks){if(i===e)break;r+=n+v}for(let{target:i,width:n}of e.sourceLinks){if(i===t)break;r-=n}return r}(e,t)*a,i+=a}if(!(i>0))continue;let n=(r/i-e.y0)*t;e.y0+=n,e.y1+=n,P(e)}void 0===_&&i.sort(l),E(i,r)}})(a,t,r),function(e,t,r){for(let i=1,n=e.length;i0))continue;let n=(r/i-e.y0)*t;e.y0+=n,e.y1+=n,P(e)}void 0===_&&n.sort(l),E(n,r)}}(a,t,r)}}(n),p(n),n}function E(e,t){let i=e.length>>1,n=e[i];L(e,n.y0-v,i-1,t),C(e,n.y1+v,i+1,t),L(e,m,e.length-1,t),C(e,r,0,t)}function C(e,t,r,i){for(;r1e-6&&(n.y0+=a,n.y1+=a),t=n.y1+v}}function L(e,t,r,i){for(;r>=0;--r){let n=e[r],a=(n.y1-t)*i;a>1e-6&&(n.y0-=a,n.y1-=a),t=n.y0-v}}function P({sourceLinks:e,targetLinks:t}){if(void 0===w){for(let{source:{sourceLinks:e}}of t)e.sort(s);for(let{target:{targetLinks:t}}of e)t.sort(o)}}return S.update=function(e){return p(e),e},S.nodeId=function(e){return arguments.length?(x="function"==typeof e?e:a(e),S):x},S.nodeAlign=function(e){return arguments.length?(b="function"==typeof e?e:a(e),S):b},S.nodeSort=function(e){return arguments.length?(_=e,S):_},S.nodeWidth=function(e){return arguments.length?(g=+e,S):g},S.nodePadding=function(e){return arguments.length?(y=v=+e,S):y},S.nodes=function(e){return arguments.length?(T="function"==typeof e?e:a(e),S):T},S.links=function(e){return arguments.length?(M="function"==typeof e?e:a(e),S):M},S.linkSort=function(e){return arguments.length?(w=e,S):w},S.size=function(t){return arguments.length?(e=r=0,i=+t[0],m=+t[1],S):[i-e,m-r]},S.extent=function(t){return arguments.length?(e=+t[0][0],i=+t[1][0],r=+t[0][1],m=+t[1][1],S):[[e,r],[i,m]]},S.iterations=function(e){return arguments.length?(k=+e,S):k},S},e.sankeyCenter=function(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?t.min(e.sourceLinks,i)-1:0},e.sankeyJustify=n,e.sankeyLeft=function(e){return e.depth},e.sankeyLinkHorizontal=function(){return r.linkHorizontal().source(m).target(g)},e.sankeyRight=function(e,t){return t-1-e.height},Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&"u">typeof t?i(e,vV(),vH()):i((r=r||self).d3=r.d3||{},r.d3,r.d3)}}),vW=p({"node_modules/@plotly/d3-sankey-circular/node_modules/d3-array/dist/d3-array.js"(e,t){(function(e){function t(e,t){return et?1:e>=t?0:NaN}function r(e){var r;return 1===e.length&&(r=e,e=function(e,i){return t(r(e),i)}),{left:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;0>e(t[a],r)?i=a+1:n=a}return i},right:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;e(t[a],r)>0?n=a:i=a+1}return i}}}var i=r(t),n=i.right,a=i.left;function o(e,t){return[e,t]}function s(e){return null===e?NaN:+e}function l(e,t){var r,i,n=e.length,a=0,o=-1,l=0,c=0;if(null==t)for(;++o1)return c/(a-1)}function c(e,t){var r=l(e,t);return r&&Math.sqrt(r)}function u(e,t){var r,i,n,a=e.length,o=-1;if(null==t){for(;++o=r)for(i=n=r;++or&&(i=r),n=r)for(i=n=r;++or&&(i=r),n=0?(a>=y?10:a>=v?5:a>=x?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(a>=y?10:a>=v?5:a>=x?2:1)}function _(e,t,r){var i=Math.abs(t-e)/Math.max(0,r),n=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),a=i/n;return a>=y?n*=10:a>=v?n*=5:a>=x&&(n*=2),t=1)return+r(e[i-1],i-1,e);var i,n=(i-1)*t,a=Math.floor(n),o=+r(e[a],a,e);return o+(r(e[a+1],a+1,e)-o)*(n-a)}}function M(e,t){var r,i,n=e.length,a=-1;if(null==t){for(;++a=r)for(i=r;++ar&&(i=r)}else for(;++a=r)for(i=r;++ar&&(i=r);return i}function k(e){if(!(n=e.length))return[];for(var t=-1,r=M(e,A),i=Array(r);++te?1:t>=e?0:NaN},e.deviation=c,e.extent=u,e.histogram=function(){var e=m,t=u,r=w;function i(i){var a,o,s=i.length,l=Array(s);for(a=0;ah;)d.pop(),--f;var p,m=Array(f+1);for(a=0;a<=f;++a)(p=m[a]=[]).x0=a>0?d[a-1]:u,p.x1=a=r)for(i=r;++ai&&(i=r)}else for(;++a=r)for(i=r;++ai&&(i=r);return i},e.mean=function(e,t){var r,i=e.length,n=i,a=-1,o=0;if(null==t)for(;++a=0;)for(t=(i=e[n]).length;--t>=0;)r[--o]=i[t];return r},e.min=M,e.pairs=function(e,t){null==t&&(t=o);for(var r=0,i=e.length-1,n=e[0],a=Array(i<0?0:i);rr(n=e[a],s)||0!==r(s,s))&&(s=n,o=a);if(0===r(s,s))return o}},e.shuffle=function(e,t,r){for(var i,n,a=(r??e.length)-(t=null==t?0:+t);a;)n=Math.random()*a--|0,i=e[a+t],e[a+t]=e[n+t],e[n+t]=i;return e},e.sum=function(e,t){var r,i=e.length,n=-1,a=0;if(null==t)for(;++n0)return[e];if((i=t0)for(e=Math.ceil(e/o),a=Array(n=Math.ceil((t=Math.floor(t/o))-e+1));++stypeof t?e:e.d3=e.d3||{})}}),vY=p({"node_modules/elementary-circuits-directed-graph/johnson.js"(e,t){var r=vO();t.exports=function(e,t){var i,n=[],a=[],o=[],s={},l=[];i=0;for(var c=e.length;i=t});for(var n,a=r(e),o=a.components.filter(function(e){return e.length>1}),s=1/0,l=0;l1||n>1)}function M(e,t,r){return e.sort(A),e.forEach(function(i,n){var a=0;if(B(i,r)&&T(i))i.circularPathData.verticalBuffer=a+i.width/2;else{for(var o,s,l=0;ls.source.column)){var c=e[l].circularPathData.verticalBuffer+e[l].width/2+t;a=c>a?c:a}i.circularPathData.verticalBuffer=a+i.width/2}}),e}function k(e,r,n,a){var o=t.min(e.links,function(e){return e.source.y0});e.links.forEach(function(e){e.circular&&(e.circularPathData={})}),M(e.links.filter(function(e){return"top"==e.circularLinkType}),r,a),M(e.links.filter(function(e){return"bottom"==e.circularLinkType}),r,a),e.links.forEach(function(t){if(t.circular){if(t.circularPathData.arcRadius=t.width+10,t.circularPathData.leftNodeBuffer=5,t.circularPathData.rightNodeBuffer=5,t.circularPathData.sourceWidth=t.source.x1-t.source.x0,t.circularPathData.sourceX=t.source.x0+t.circularPathData.sourceWidth,t.circularPathData.targetX=t.target.x0,t.circularPathData.sourceY=t.y0,t.circularPathData.targetY=t.y1,B(t,a)&&T(t))t.circularPathData.leftSmallArcRadius=10+t.width/2,t.circularPathData.leftLargeArcRadius=10+t.width/2,t.circularPathData.rightSmallArcRadius=10+t.width/2,t.circularPathData.rightLargeArcRadius=10+t.width/2,"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=t.source.y1+25+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=t.source.y0-25-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius);else{var s,l=t.source.column,c=t.circularLinkType,u=e.links.filter(function(e){return e.source.column==l&&e.circularLinkType==c});"bottom"==t.circularLinkType?u.sort(E):u.sort(S);var h=0;u.forEach(function(e,i){e.circularLinkID==t.circularLinkID&&(t.circularPathData.leftSmallArcRadius=10+t.width/2+h,t.circularPathData.leftLargeArcRadius=10+t.width/2+i*r+h),h+=e.width}),l=t.target.column,u=e.links.filter(function(e){return e.target.column==l&&e.circularLinkType==c}),"bottom"==t.circularLinkType?u.sort(L):u.sort(C),h=0,u.forEach(function(e,i){e.circularLinkID==t.circularLinkID&&(t.circularPathData.rightSmallArcRadius=10+t.width/2+h,t.circularPathData.rightLargeArcRadius=10+t.width/2+i*r+h),h+=e.width}),"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=Math.max(n,t.source.y1,t.target.y1)+25+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=o-25-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius)}t.circularPathData.leftInnerExtent=t.circularPathData.sourceX+t.circularPathData.leftNodeBuffer,t.circularPathData.rightInnerExtent=t.circularPathData.targetX-t.circularPathData.rightNodeBuffer,t.circularPathData.leftFullExtent=t.circularPathData.sourceX+t.circularPathData.leftLargeArcRadius+t.circularPathData.leftNodeBuffer,t.circularPathData.rightFullExtent=t.circularPathData.targetX-t.circularPathData.rightLargeArcRadius-t.circularPathData.rightNodeBuffer}t.circular?t.path="top"==(s=t).circularLinkType?"M"+s.circularPathData.sourceX+" "+s.circularPathData.sourceY+" L"+s.circularPathData.leftInnerExtent+" "+s.circularPathData.sourceY+" A"+s.circularPathData.leftLargeArcRadius+" "+s.circularPathData.leftSmallArcRadius+" 0 0 0 "+s.circularPathData.leftFullExtent+" "+(s.circularPathData.sourceY-s.circularPathData.leftSmallArcRadius)+" L"+s.circularPathData.leftFullExtent+" "+s.circularPathData.verticalLeftInnerExtent+" A"+s.circularPathData.leftLargeArcRadius+" "+s.circularPathData.leftLargeArcRadius+" 0 0 0 "+s.circularPathData.leftInnerExtent+" "+s.circularPathData.verticalFullExtent+" L"+s.circularPathData.rightInnerExtent+" "+s.circularPathData.verticalFullExtent+" A"+s.circularPathData.rightLargeArcRadius+" "+s.circularPathData.rightLargeArcRadius+" 0 0 0 "+s.circularPathData.rightFullExtent+" "+s.circularPathData.verticalRightInnerExtent+" L"+s.circularPathData.rightFullExtent+" "+(s.circularPathData.targetY-s.circularPathData.rightSmallArcRadius)+" A"+s.circularPathData.rightLargeArcRadius+" "+s.circularPathData.rightSmallArcRadius+" 0 0 0 "+s.circularPathData.rightInnerExtent+" "+s.circularPathData.targetY+" L"+s.circularPathData.targetX+" "+s.circularPathData.targetY:"M"+s.circularPathData.sourceX+" "+s.circularPathData.sourceY+" L"+s.circularPathData.leftInnerExtent+" "+s.circularPathData.sourceY+" A"+s.circularPathData.leftLargeArcRadius+" "+s.circularPathData.leftSmallArcRadius+" 0 0 1 "+s.circularPathData.leftFullExtent+" "+(s.circularPathData.sourceY+s.circularPathData.leftSmallArcRadius)+" L"+s.circularPathData.leftFullExtent+" "+s.circularPathData.verticalLeftInnerExtent+" A"+s.circularPathData.leftLargeArcRadius+" "+s.circularPathData.leftLargeArcRadius+" 0 0 1 "+s.circularPathData.leftInnerExtent+" "+s.circularPathData.verticalFullExtent+" L"+s.circularPathData.rightInnerExtent+" "+s.circularPathData.verticalFullExtent+" A"+s.circularPathData.rightLargeArcRadius+" "+s.circularPathData.rightLargeArcRadius+" 0 0 1 "+s.circularPathData.rightFullExtent+" "+s.circularPathData.verticalRightInnerExtent+" L"+s.circularPathData.rightFullExtent+" "+(s.circularPathData.targetY+s.circularPathData.rightSmallArcRadius)+" A"+s.circularPathData.rightLargeArcRadius+" "+s.circularPathData.rightSmallArcRadius+" 0 0 1 "+s.circularPathData.rightInnerExtent+" "+s.circularPathData.targetY+" L"+s.circularPathData.targetX+" "+s.circularPathData.targetY:t.path=i.linkHorizontal().source(function(e){return[e.source.x0+(e.source.x1-e.source.x0),e.y0]}).target(function(e){return[e.target.x0,e.y1]})(t)})}function A(e,t){return P(e)==P(t)?"bottom"==e.circularLinkType?E(e,t):S(e,t):P(t)-P(e)}function S(e,t){return e.y0-t.y0}function E(e,t){return t.y0-e.y0}function C(e,t){return e.y1-t.y1}function L(e,t){return t.y1-e.y1}function P(e){return e.target.column-e.source.column}function I(e){return e.target.x0-e.source.x1}function z(e,t){var r=_(e),i=I(t)/Math.tan(r);return"up"==j(e)?e.y1+i:e.y1-i}function D(e,t){var r=_(e),i=I(t)/Math.tan(r);return"up"==j(e)?e.y1-i:e.y1+i}function O(e,t,r,i){return e.y0+t>=r&&e.y1+t<=i&&(e.y0=e.y0+t,e.y1=e.y1+t,e.targetLinks.forEach(function(e){e.y1=e.y1+t}),e.sourceLinks.forEach(function(e){e.y0=e.y0+t})),e}function R(e,t,r,i){e.nodes.forEach(function(n){i&&n.y+(n.y1-n.y0)>t&&(n.y=n.y-(n.y+(n.y1-n.y0)-t));var a=e.links.filter(function(e){return r(e.source)==r(n)}),o=a.length;o>1&&a.sort(function(e,t){if(!e.circular&&!t.circular){if(e.target.column==t.target.column)return e.y1-t.y1;if(r=e,i=t,j(r)!=j(i))return e.y1-t.y1;if(e.target.column>t.target.column){var r,i,n=D(t,e);return e.y1-n}if(t.target.column>e.target.column)return D(e,t)-t.y1}return e.circular&&!t.circular?"top"==e.circularLinkType?-1:1:t.circular&&!e.circular?"top"==t.circularLinkType?1:-1:e.circular&&t.circular?e.circularLinkType===t.circularLinkType&&"top"==e.circularLinkType?e.target.column===t.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:e.circularLinkType===t.circularLinkType&&"bottom"==e.circularLinkType?e.target.column===t.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:"top"==e.circularLinkType?-1:1:void 0});var s=n.y0;a.forEach(function(e){e.y0=s+e.width/2,s+=e.width}),a.forEach(function(e,t){if("bottom"==e.circularLinkType){for(var r=t+1,i=0;r1&&i.sort(function(e,t){if(!e.circular&&!t.circular){if(e.source.column==t.source.column)return e.y0-t.y0;if(r=e,i=t,j(r)!=j(i))return e.y0-t.y0;if(t.source.column0?"up":"down"}function B(e,t){return t(e.source)==t(e.target)}e.sankeyCircular=function(){var e,i,a=0,_=0,T=1,M=1,A=24,S=g,E=o,C=y,L=v,P=32,I=2,z=null;function D(){var o,s,c={nodes:C.apply(null,arguments),links:L.apply(null,arguments)};(o=c).nodes.forEach(function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}),s=r.map(o.nodes,S),o.links.forEach(function(e,t){e.index=t;var r=e.source,i=e.target;(typeof r>"u"?"undefined":l(r))!=="object"&&(r=e.source=x(s,r)),(typeof i>"u"?"undefined":l(i))!=="object"&&(i=e.target=x(s,i)),r.sourceLinks.push(e),i.targetLinks.push(e)}),function(e,t){var r=0;if(null===t){for(var i=[],a=0;ar.indexOf(e.target)&&!e.circular&&r.push(e.target)})});for(t=e.nodes,r=[],i=0;t.length;++i,t=r,r=[])t.forEach(function(e){e.height=i,e.targetLinks.forEach(function(e){0>r.indexOf(e.source)&&!e.circular&&r.push(e.source)})});e.nodes.forEach(function(e){e.column=Math.floor(E.call(null,e,i))})}(c),b(c,S),function(n,o,s){var l=r.nest().key(function(e){return e.column}).sortKeys(t.ascending).entries(n.nodes).map(function(e){return e.values});(function(r){if(i){var o,s,c,u,h,f,p,m,g,y,v,x,b=1/0;l.forEach(function(e){var t=M*i/(e.length+1);b=t0?o+25+10:o,bottom:s=s>0?s+25+10:s,left:u=u>0?u+25+10:u,right:c=c>0?c+25+10:c}),E=(f=t.max(n.nodes,function(e){return e.column}),p=T-a,m=M-_,g=p+S.right+S.left,y=m+S.top+S.bottom,v=p/g,x=m/y,a=a*v+S.left,T=0==S.right?T:T*v,_=_*x+S.top,M*=x,n.nodes.forEach(function(e){e.x0=a+e.column*((T-a-A)/f),e.x1=e.x0+A}),x);k*=E,n.links.forEach(function(e){e.width=e.value*k}),l.forEach(function(e){var t=e.length;e.forEach(function(e,i){e.depth==l.length-1&&1==t||0==e.depth&&1==t?e.y0=M/2-e.value*k:e.partOfCycle?0==w(e,r)?e.y0=M/2+i:"top"==e.circularLinkType?e.y0=_+i:e.y0=M-e.value*k-i:0==S.top||0==S.bottom?e.y0=(M-_)/t*i:e.y0=(M-_)/2-t/2+i,e.y1=e.y0+e.value*k})})})(s),g();for(var c=1,u=o;u>0;--u)(function(e,r){var i=l.length;l.forEach(function(n){var a=n.length,o=n[0].depth;n.forEach(function(n){var s;if((n.sourceLinks.length||n.targetLinks.length)&&!(n.partOfCycle&&w(n,r)>0))if(0==o&&1==a)s=n.y1-n.y0,n.y0=M/2-s/2,n.y1=M/2+s/2;else if(o==i-1&&1==a)s=n.y1-n.y0,n.y0=M/2-s/2,n.y1=M/2+s/2;else{var l=t.mean(n.sourceLinks,m),c=t.mean(n.targetLinks,p),u=((l&&c?(l+c)/2:l||c)-f(n))*e;n.y0+=u,n.y1+=u}})})})(c*=.99,s),g();function g(){l.forEach(function(t){var r,i,n,a=_,o=t.length;for(t.sort(h),n=0;n0&&(r.y0+=i,r.y1+=i),a=r.y1+e;if((i=a-e-M)>0)for(a=r.y0-=i,r.y1-=i,n=o-2;n>=0;--n)(i=(r=t[n]).y1+e-a)>0&&(r.y0-=i,r.y1-=i),a=r.y0})}}(c,P,S),j(c);for(var u=0;u<4;u++)R(c,M,S),F(c,M,S),function(e,t,r,i){e.links.forEach(function(n){if(!n.circular&&n.target.column-n.source.column>1){var a=n.source.column+1,o=n.target.column-1,s=1,l=o-a+1;for(s=1;a<=o;a++,s++)e.nodes.forEach(function(o){if(o.column==a){var c,u=s/(l+1),h=Math.pow(1-u,3),d=3*u*Math.pow(1-u,2),f=3*Math.pow(u,2)*(1-u),p=Math.pow(u,3),m=h*n.y0+d*n.y0+f*n.y1+p*n.y1,g=m-n.width/2,y=m+n.width/2;g>o.y0&&ga.y0&&n.y0a.y0&&n.y1a.y1)&&O(e,c,t,r))})):y>o.y0&&yo.y1&&O(e,c,t,r)})):go.y1&&(c=y-o.y0+10,o=O(o,c,t,r),e.nodes.forEach(function(e){i(e)==i(o)||e.column!=o.column||e.y0o.y1&&O(e,c,t,r)}))}})}})}(c,_,M,S),R(c,M,S),F(c,M,S);return function(e,r,i){var n=e.nodes,a=e.links,o=!1,s=!1;if(a.forEach(function(e){"top"==e.circularLinkType?o=!0:"bottom"==e.circularLinkType&&(s=!0)}),!1==o||!1==s){var l=t.min(n,function(e){return e.y0}),c=(i-r)/(t.max(n,function(e){return e.y1})-l);n.forEach(function(e){var t=(e.y1-e.y0)*c;e.y0=(e.y0-l)*c,e.y1=e.y0+t}),a.forEach(function(e){e.y0=(e.y0-l)*c,e.y1=(e.y1-l)*c,e.width=e.width*c})}}(c,_,M),k(c,I,M,S),c}function j(e){e.nodes.forEach(function(e){e.sourceLinks.sort(u),e.targetLinks.sort(c)}),e.nodes.forEach(function(e){var t=e.y0,r=t,i=e.y1,n=i;e.sourceLinks.forEach(function(e){e.circular?(e.y0=i-e.width/2,i-=e.width):(e.y0=t+e.width/2,t+=e.width)}),e.targetLinks.forEach(function(e){e.circular?(e.y1=n-e.width/2,n-=e.width):(e.y1=r+e.width/2,r+=e.width)})})}return D.nodeId=function(e){return arguments.length?(S="function"==typeof e?e:s(e),D):S},D.nodeAlign=function(e){return arguments.length?(E="function"==typeof e?e:s(e),D):E},D.nodeWidth=function(e){return arguments.length?(A=+e,D):A},D.nodePadding=function(t){return arguments.length?(e=+t,D):e},D.nodes=function(e){return arguments.length?(C="function"==typeof e?e:s(e),D):C},D.links=function(e){return arguments.length?(L="function"==typeof e?e:s(e),D):L},D.size=function(e){return arguments.length?(a=_=0,T=+e[0],M=+e[1],D):[T-a,M-_]},D.extent=function(e){return arguments.length?(a=+e[0][0],T=+e[1][0],_=+e[0][1],M=+e[1][1],D):[[a,_],[T,M]]},D.iterations=function(e){return arguments.length?(P=+e,D):P},D.circularLinkGap=function(e){return arguments.length?(I=+e,D):I},D.nodePaddingRatio=function(e){return arguments.length?(i=+e,D):i},D.sortNodes=function(e){return arguments.length?(z=e,D):z},D.update=function(e){return b(e,S),j(e),e.links.forEach(function(e){e.circular&&(e.circularLinkType=e.y0+e.y1typeof t?r(e,vW(),vj(),vH(),vY()):r(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)}}),v$=p({"src/traces/sankey/constants.js"(e,t){t.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"}}}}),vX=p({"src/traces/sankey/render.js"(e,t){var r=vU(),i=(dE(),v(dS)).interpolateNumber,n=T(),a=vG(),o=vZ(),s=v$(),l=ee(),c=t7(),u=tv(),h=u.strTranslate,d=u.strRotate,f=yF(),p=f.keyFun,m=f.repeat,g=f.unwrap,y=tF(),x=eQ(),b=tR(),_=b.CAP_SHIFT,w=b.LINE_SPACING;function M(e,t,r){var i,n=g(t),l=n.trace,c=l.domain,h="h"===l.orientation,d="reversed"===l.direction,f=l.node.pad,p=l.node.thickness,m={justify:a.sankeyJustify,left:a.sankeyLeft,right:a.sankeyRight,center:a.sankeyCenter}[l.node.align],y=e.width*(c.x[1]-c.x[0]),v=e.height*(c.y[1]-c.y[0]),x=n._nodes,b=n._links,_=n.circular;function w(e){"input"===l[e].sort&&(_?u.warn(`Circular Sankey diagrams do not support the "input" ${e}.sort mode; falling back to the default sort.`):i[`${e}Sort`](null))}(i=_?o.sankeyCircular().circularLinkGap(0):a.sankey()).iterations(s.sankeyIterations).size(h?[y,v]:[v,y]).nodeWidth(p).nodePadding(f).nodeId(function(e){return e.pointNumber}).nodeAlign(m).nodes(x).links(b),w("link"),w("node");var T=i();for(var M in i.nodePadding()o+p&&(a+=1,t=s.x0),o=s.x0,n[a]||(n[a]=[]),n[a].push(s),r=t-s.x0,s.x0+=r,s.x1+=r}return n})(x=T.nodes).forEach(function(e){var t,r,i,n=0,a=e.length;for(e.sort(function(e,t){return e.y0-t.y0}),i=0;i=n||(r=n-t.y0)>1e-6&&(t.y0+=r,t.y1+=r),n=t.y1+f}),i.update(T)}return{circular:_,key:r,trace:l,guid:u.randstr(),horizontal:h,reversed:d,width:y,height:v,nodePad:l.node.pad,nodeLineColor:l.node.line.color,nodeLineWidth:l.node.line.width,linkLineColor:l.link.line.color,linkLineWidth:l.link.line.width,linkArrowLength:l.link.arrowlen,valueFormat:l.valueformat,valueSuffix:l.valuesuffix,textFont:l.textfont,translateX:c.x[0]*e.width+e.margin.l,translateY:e.height-c.y[1]*e.height+e.margin.t,dragParallel:h?v:y,dragPerpendicular:h?y:v,arrangement:l.arrangement,sankey:i,graph:T,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function k(e,t,r){var i=t.source.label+"|"+t.target.label;return t.trace=e.trace,t.curveNumber=e.trace.index,{circular:e.circular,key:i+"__"+r,traceId:e.key,pointNumber:t.pointNumber,link:t,rgb:l.rgb(t.color),alpha:l.parse(t.color).alpha,hoverRgb:l.rgb(t.hovercolor),hoverAlpha:l.parse(t.hovercolor).alpha,linkPath:A,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,linkArrowLength:e.linkArrowLength,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function A(){return function(e){var t,r,n,a,o,s,l,c=e.linkArrowLength;if(e.link.circular)return t=e.link,r=c,n="",a=t.width/2,s=(o=t.circularPathData).sourceX+o.verticalBuffer0?" L "+o.targetX+" "+o.targetY:"")+"Z"):(n="M "+(o.targetX-r)+" "+(o.targetY-a)+" L "+(o.rightInnerExtent-r)+" "+(o.targetY-a)+" A "+(o.rightLargeArcRadius+a)+" "+(o.rightSmallArcRadius+a)+" 0 0 0 "+(o.rightFullExtent-a-r)+" "+(o.targetY+o.rightSmallArcRadius)+" L "+(o.rightFullExtent-a-r)+" "+o.verticalRightInnerExtent,s&&l?n+=" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.rightInnerExtent-a-r)+" "+(o.verticalFullExtent+a)+" L "+(o.rightFullExtent+a-r-(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent+a)+" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.leftFullExtent+a)+" "+o.verticalLeftInnerExtent:s?n+=" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.rightFullExtent-r-a-(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent-a)+" L "+(o.leftFullExtent+a+(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent-a)+" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.leftFullExtent+a)+" "+o.verticalLeftInnerExtent:n+=" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.rightInnerExtent-r)+" "+(o.verticalFullExtent+a)+" L "+o.leftInnerExtent+" "+(o.verticalFullExtent+a)+" A "+(o.leftLargeArcRadius+a)+" "+(o.leftLargeArcRadius+a)+" 0 0 0 "+(o.leftFullExtent+a)+" "+o.verticalLeftInnerExtent,n+=" L "+(o.leftFullExtent+a)+" "+(o.sourceY+o.leftSmallArcRadius)+" A "+(o.leftLargeArcRadius+a)+" "+(o.leftSmallArcRadius+a)+" 0 0 0 "+o.leftInnerExtent+" "+(o.sourceY-a)+" L "+o.sourceX+" "+(o.sourceY-a)+" L "+o.sourceX+" "+(o.sourceY+a)+" L "+o.leftInnerExtent+" "+(o.sourceY+a)+" A "+(o.leftLargeArcRadius-a)+" "+(o.leftSmallArcRadius-a)+" 0 0 1 "+(o.leftFullExtent-a)+" "+(o.sourceY+o.leftSmallArcRadius)+" L "+(o.leftFullExtent-a)+" "+o.verticalLeftInnerExtent,s&&l?n+=" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.leftFullExtent-a-(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent-a)+" L "+(o.rightFullExtent+a-r+(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent-a)+" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.rightFullExtent+a-r)+" "+o.verticalRightInnerExtent:s?n+=" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.leftFullExtent+a)+" "+(o.verticalFullExtent+a)+" L "+(o.rightFullExtent-r-a)+" "+(o.verticalFullExtent+a)+" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.rightFullExtent+a-r)+" "+o.verticalRightInnerExtent:n+=" A "+(o.leftLargeArcRadius-a)+" "+(o.leftLargeArcRadius-a)+" 0 0 1 "+o.leftInnerExtent+" "+(o.verticalFullExtent-a)+" L "+(o.rightInnerExtent-r)+" "+(o.verticalFullExtent-a)+" A "+(o.rightLargeArcRadius-a)+" "+(o.rightLargeArcRadius-a)+" 0 0 1 "+(o.rightFullExtent+a-r)+" "+o.verticalRightInnerExtent,n+=" L "+(o.rightFullExtent+a-r)+" "+(o.targetY+o.rightSmallArcRadius)+" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.rightInnerExtent-r)+" "+(o.targetY+a)+" L "+(o.targetX-r)+" "+(o.targetY+a)+(r>0?" L "+o.targetX+" "+o.targetY:"")+"Z"),n;var u=Math.abs((e.link.target.x0-e.link.source.x1)/2);c>u&&(c=u);var h=e.link.source.x1,d=e.link.target.x0-c,f=i(h,d),p=f(.5),m=f(.5),g=e.link.y0-e.link.width/2,y=e.link.y0+e.link.width/2,v=e.link.y1-e.link.width/2,x=e.link.y1+e.link.width/2,b="M"+h+","+g,_="C"+p+","+g+" "+m+","+v+" "+d+","+v,w="C"+m+","+x+" "+p+","+y+" "+h+","+y,T=c>0?"L"+(d+c)+","+(v+e.link.width/2):"";return b+_+(T+="L"+d+","+x)+w+"Z"}}function S(e,t){var r=s.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var n=t.dx,a=Math.max(.5,t.dy),o="node_"+t.pointNumber;return t.group&&(o=u.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:o,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(n),visibleHeight:a,zoneX:-r,zoneY:-i,zoneWidth:n+2*r,zoneHeight:a+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:1===t.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,reversed:e.reversed,rgb:l.rgb(t.color),alpha:l.parse(t.color).alpha,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,o].join("_"),interactionState:e.interactionState,figure:e}}function E(e){e.attr("transform",function(e){return h(e.node.x0.toFixed(3),e.node.y0.toFixed(3))})}function C(e){e.call(E)}function L(e,t){e.call(C),t.attr("d",A())}function P(e){e.attr("width",function(e){return e.node.x1-e.node.x0}).attr("height",function(e){return e.visibleHeight})}function I(e){return e.link.width>1||e.linkLineWidth>0}function z(e){return e.horizontal?e.reversed?h(e.translateX+e.width,e.translateY)+"matrix(-1 0 0 1 0 0)":h(e.translateX,e.translateY)+"matrix(1 0 0 1 0 0)":e.reversed?h(e.translateX,e.translateY+e.height)+"matrix(0 -1 1 0 0 0)":h(e.translateX,e.translateY)+"matrix(0 1 1 0 0 0)"}function D(e,t,r){e.on(".basic",null).on("mouseover.basic",function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.hover(this,e,t),e.interactionState.hovered=[this,e])}).on("mousemove.basic",function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.follow(this,e),e.interactionState.hovered=[this,e])}).on("mouseout.basic",function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.unhover(this,e,t),e.interactionState.hovered=!1)}).on("click.basic",function(e){e.interactionState.hovered&&(r.unhover(this,e,t),e.interactionState.hovered=!1),e.interactionState.dragInProgress||e.partOfGroup||r.select(this,e,t)})}function O(e,t,i,a){var o=n.behavior.drag().origin(function(e){return{x:e.node.x0+e.visibleWidth/2,y:e.node.y0+e.visibleHeight/2}}).on("dragstart",function(n){if("fixed"!==n.arrangement&&(u.ensureSingle(a._fullLayout._infolayer,"g","dragcover",function(e){a._fullLayout._dragCover=e}),u.raiseToTop(this),n.interactionState.dragInProgress=n.node,F(n.node),n.interactionState.hovered&&(i.nodeEvents.unhover.apply(0,n.interactionState.hovered),n.interactionState.hovered=!1),"snap"===n.arrangement)){var o,l,c,h,d,f=n.traceId+"|"+n.key;n.forceLayouts[f]?n.forceLayouts[f].alpha(1):function(e,t,i){for(var n,a,o,l=i.graph.nodes,c=0;c0&&o.forceLayouts[n].alpha(0)})).stop()}(e,f,n),o=e,l=t,c=n,h=f,d=a,window.requestAnimationFrame(function e(){for(t=0;t0)window.requestAnimationFrame(e);else{var t,r=c.node.originalX;c.node.x0=r-c.visibleWidth/2,c.node.x1=r+c.visibleWidth/2,R(c,d)}})}}).on("drag",function(r){if("fixed"!==r.arrangement){var i=n.event.x,a=n.event.y;"snap"===r.arrangement?(r.node.x0=i-r.visibleWidth/2,r.node.x1=i+r.visibleWidth/2):("freeform"===r.arrangement&&(r.node.x0=i-r.visibleWidth/2,r.node.x1=i+r.visibleWidth/2),a=Math.max(0,Math.min(r.size-r.visibleHeight/2,a))),r.node.y0=a-r.visibleHeight/2,r.node.y1=a+r.visibleHeight/2,F(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),L(e.filter(j(r)),t))}}).on("dragend",function(e){if("fixed"!==e.arrangement){e.interactionState.dragInProgress=!1;for(var t=0;tI(e)?l.rgb(e.linkLineColor):e.rgb).style("stroke-opacity",e=>I(e)?l.opacity(e.linkLineColor):e.alpha).style("fill",e=>e.rgb).style("fill-opacity",e=>e.alpha).style("stroke-width",e=>I(e)?e.linkLineWidth:1).attr("d",A()),C.style("opacity",function(){return e._context.staticPlot||f||v?1:0}).transition().ease(s.ease).duration(s.duration).style("opacity",1),C.exit().transition().ease(s.ease).duration(s.duration).style("opacity",0).remove();var L=b.selectAll("."+s.cn.sankeyNodeSet).data(m,p);L.enter().append("g").classed(s.cn.sankeyNodeSet,!0),L.style("cursor",function(e){switch(e.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var R=L.selectAll("."+s.cn.sankeyNode).data(function(e){var t=e.graph.nodes;return function(e){var t,r=[];for(t=0;te.rgb).style("fill-opacity",e=>e.alpha),F.transition().ease(s.ease).duration(s.duration).call(P);var j=R.selectAll("."+s.cn.nodeLabel).data(m);j.enter().append("text").classed(s.cn.nodeLabel,!0).style("cursor","default"),j.attr("data-notex",1).text(function(e){return e.node.label}).each(function(t){var r=n.select(this);c.font(r,t.textFont),y.convertToTspans(r,e)}).attr("text-anchor",function(e){return e.horizontal&&e.left!==e.reversed?"end":"start"}).attr("transform",function(e){var t=n.select(this),r=y.lineCount(t),i=e.textFont.size*((r-1)*w-_),a=e.nodeLineWidth/2+3;if(!e.horizontal){var o=e.reversed?(e.visibleWidth+i)/2:(e.visibleWidth-i)/2,s=e.reversed?d(90):"scale(-1,1)"+d(90);return h(o,a)+s}var l=a,o=(e.visibleHeight-i)/2;return e.left?l=-l:l+=e.visibleWidth,h(l,o)+(e.reversed?"scale(-1,1)":"")}),j.transition().ease(s.ease).duration(s.duration)}}}),vK=p({"src/traces/sankey/plot.js"(e,t){var r=T(),i=tv(),n=i.numberFormat,a=vX(),o=rD(),s=ee(),l=v$().cn,c=i._;function u(e){return""!==e}function h(e,t){return e.filter(function(e){return e.key===t.traceId})}function d(e,t){r.select(e).select("path").style("fill-opacity",t),r.select(e).select("rect").style("fill-opacity",t)}function f(e){r.select(e).select("text.name").style("fill","black")}function p(e){return function(t){return -1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function m(e){return function(t){return -1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(e,t,r){t&&r&&h(r,t).selectAll("."+l.sankeyLink).filter(p(t)).call(v.bind(0,t,r,!1))}function y(e,t,r){t&&r&&h(r,t).selectAll("."+l.sankeyLink).filter(p(t)).call(x.bind(0,t,r,!1))}function v(e,t,r,i){i.style("fill",function(e){if(!e.link.concentrationscale)return e.hoverRgb}).style("fill-opacity",function(e){if(!e.link.concentrationscale)return e.hoverAlpha}),i.each(function(r){var i=r.link.label;""!==i&&h(t,e).selectAll("."+l.sankeyLink).filter(function(e){return e.link.label===i}).style("fill",function(e){if(!e.link.concentrationscale)return e.hoverRgb}).style("fill-opacity",function(e){if(!e.link.concentrationscale)return e.hoverAlpha})}),r&&h(t,e).selectAll("."+l.sankeyNode).filter(m(e)).call(g)}function x(e,t,r,i){i.style("fill",function(e){return e.rgb}).style("fill-opacity",function(e){return e.alpha}),i.each(function(r){var i=r.link.label;""!==i&&h(t,e).selectAll("."+l.sankeyLink).filter(function(e){return e.link.label===i}).style("fill",e=>e.rgb).style("fill-opacity",e=>e.alpha)}),r&&h(t,e).selectAll(l.sankeyNode).filter(m(e)).call(y)}function b(e,t){var r=e.hoverlabel||{},n=i.nestedProperty(r,t).get();return!Array.isArray(n)&&n}t.exports=function(e,t){for(var i=e._fullLayout,h=i._paper,p=i._size,m=0;m"),color:b(l,"bgcolor")||s.addOpacity(m.color,1),borderColor:b(l,"bordercolor"),fontFamily:b(l,"font.family"),fontSize:b(l,"font.size"),fontColor:b(l,"font.color"),fontWeight:b(l,"font.weight"),fontStyle:b(l,"font.style"),fontVariant:b(l,"font.variant"),fontTextcase:b(l,"font.textcase"),fontLineposition:b(l,"font.lineposition"),fontShadow:b(l,"font.shadow"),nameLength:b(l,"namelength"),textAlign:b(l,"align"),idealAlign:r.event.x"),color:b(s,"bgcolor")||a.rgb,borderColor:b(s,"bordercolor"),fontFamily:b(s,"font.family"),fontSize:b(s,"font.size"),fontColor:b(s,"font.color"),fontWeight:b(s,"font.weight"),fontStyle:b(s,"font.style"),fontVariant:b(s,"font.variant"),fontTextcase:b(s,"font.textcase"),fontLineposition:b(s,"font.lineposition"),fontShadow:b(s,"font.shadow"),nameLength:b(s,"namelength"),textAlign:b(s,"align"),idealAlign:"left",hovertemplate:s.hovertemplate,hovertemplateLabels:v,eventData:[a.node]},{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:e});d(w,.85),f(w)}}},unhover:function(t,n,a){!1!==e._fullLayout.hovermode&&(r.select(t).call(y,n,a),"skip"!==n.node.trace.node.hoverinfo&&(n.node.fullData=n.node.trace,e.emit("plotly_unhover",{event:r.event,points:[n.node]})),o.loneUnhover(i._hoverlayer.node()))},select:function(t,i,n){var a=i.node;a.originalEvent=r.event,e._hoverdata=[a],r.select(t).call(y,i,n),o.click(e,{target:!0})}}})}}}),vJ=p({"src/traces/sankey/base_plot.js"(e){var t=eq().overrideAll,r=tI().getModuleCalcData,i=vK(),n=W(),a=rf(),o=rd(),s=iM().prepSelect,l=tv(),c=eQ(),u="sankey";e.name=u,e.baseLayoutAttrOverrides=t({hoverlabel:n.hoverlabel},"plot","nested"),e.plot=function(t){var n=r(t.calcdata,u)[0];i(t,n),e.updateFx(t)},e.clean=function(e,t,r,i){var n=i._has&&i._has(u),a=t._has&&t._has(u);n&&!a&&(i._paperdiv.selectAll(".sankey").remove(),i._paperdiv.selectAll(".bgsankey").remove())},e.updateFx=function(e){for(var t=0;t0}function M(e){e.each(function(e){y.stroke(r.select(this),e.line.color)}).each(function(e){y.fill(r.select(this),e.color)}).style("stroke-width",function(e){return e.line.width})}function k(e,t,r){var i=e._fullLayout,n=a.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),o={type:"linear",_id:"x"+t._id},s={letter:"x",font:i.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function l(e,t){return a.coerce(n,o,g,e,t)}return p(n,o,l,s,i),m(n,o,l,s),o}function A(e,t,r){return[Math.min(t/e.width,r/e.height),e,t+"x"+r]}function S(e,t,i,n){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),o=r.select(a);return o.text(e).attr("x",0).attr("y",0).attr("text-anchor",i).attr("data-unformatted",e).call(d.convertToTspans,n).call(u.font,t),u.bBox(o.node())}function E(e,t,r,i,n,o){var s="_cache"+t;e[s]&&e[s].key===n||(e[s]={key:n,value:r});var l=a.aggNums(o,null,[e[s].value,i],2);return e[s].value=l,l}t.exports=function(e,t,p,m){var g,v=e._fullLayout;w(p)&&m&&(g=m()),a.makeTraceGroups(v._indicatorlayer,t,"trace").each(function(t){var m,T,C,L,P,I=t[0].trace,z=r.select(this),D=I._hasGauge,O=I._isAngular,R=I._isBullet,F=I.domain,j={w:v._size.w*(F.x[1]-F.x[0]),h:v._size.h*(F.y[1]-F.y[0]),l:v._size.l+v._size.w*F.x[0],r:v._size.r+v._size.w*(1-F.x[1]),t:v._size.t+v._size.h*(1-F.y[1]),b:v._size.b+v._size.h*F.y[0]},B=j.l+j.w/2,N=j.t+j.h/2,U=Math.min(j.w/2,j.h),V=h.innerRadius*U,q=I.align||"center";if(L=N,D){if(O&&(C=B,L=N+U/2,P=function(e){var t,r;return t=e,[(r=.9*V)/Math.sqrt(t.width/2*(t.width/2)+t.height*t.height),t,r]}),R){var H=h.bulletPadding,G=1-h.bulletNumberDomainSize+H;C=j.l+(G+(1-G)*b[q])*j.w,P=function(e){return A(e,(h.bulletNumberDomainSize-H)*j.w,j.h)}}}else C=j.l+b[q]*j.w,P=function(e){return A(e,j.w,j.h)};(function(e,t,i,l){var c,h,p,m=i[0].trace,g=l.numbersX,v=l.numbersY,T=m.align||"center",M=x[T],A=l.transitionOpts,C=l.onComplete,L=a.ensureSingle(t,"g","numbers"),P=[];m._hasNumber&&P.push("number"),m._hasDelta&&(P.push("delta"),"left"===m.delta.position&&P.reverse());var I=L.selectAll("text").data(P);function z(t,r,i,n){if(!t.match("s")||i>=0==n>=0||r(i).slice(-1).match(_)||r(n).slice(-1).match(_))return r;var a=k(e,{tickformat:t.slice().replace("s","f").replace(/\d+/,function(e){return parseInt(e)-1})});return function(e){return 1>Math.abs(e)?f.tickText(a,e).text:r(e)}}I.enter().append("text"),I.attr("text-anchor",function(){return M}).attr("class",function(e){return e}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),I.exit().remove();var D,O=m.mode+m.align;if(m._hasDelta&&(D=function(){var t=k(e,{tickformat:m.delta.valueformat},m._range);t.setScale(),f.prepTicks(t);var a=function(e){return f.tickText(t,e).text},o=m.delta.suffix,s=m.delta.prefix,l=function(e){return m.delta.relative?e.relativeDelta:e.delta},c=function(e,t){return 0===e||"number"!=typeof e||isNaN(e)?"-":(e>0?m.delta.increasing.symbol:m.delta.decreasing.symbol)+s+t(e)+o},p=function(e){return e.delta>=0?m.delta.increasing.color:m.delta.decreasing.color};void 0===m._deltaLastValue&&(m._deltaLastValue=l(i[0]));var g=L.select("text.delta");function v(){g.text(c(l(i[0]),a)).call(y.fill,p(i[0])).call(d.convertToTspans,e)}return g.call(u.font,m.delta.font).call(y.fill,p({delta:m._deltaLastValue})),w(A)?g.transition().duration(A.duration).ease(A.easing).tween("text",function(){var e=r.select(this),t=l(i[0]),o=m._deltaLastValue,s=z(m.delta.valueformat,a,o,t),u=n(o,t);return m._deltaLastValue=t,function(t){e.text(c(u(t),s)),e.call(y.fill,p({delta:u(t)}))}}).each("end",function(){v(),C&&C()}).each("interrupt",function(){v(),C&&C()}):v(),h=S(c(l(i[0]),a),m.delta.font,M,e),g}(),O+=m.delta.position+m.delta.font.size+m.delta.font.family+m.delta.valueformat,O+=m.delta.increasing.symbol+m.delta.decreasing.symbol,p=h),m._hasNumber&&(function(){var t=k(e,{tickformat:m.number.valueformat},m._range);t.setScale(),f.prepTicks(t);var a=function(e){return f.tickText(t,e).text},o=m.number.suffix,s=m.number.prefix,l=L.select("text.number");function h(){var t="number"==typeof i[0].y?s+a(i[0].y)+o:"-";l.text(t).call(u.font,m.number.font).call(d.convertToTspans,e)}w(A)?l.transition().duration(A.duration).ease(A.easing).each("end",function(){h(),C&&C()}).each("interrupt",function(){h(),C&&C()}).attrTween("text",function(){var e=r.select(this),t=n(i[0].lastY,i[0].y);m._lastValue=i[0].y;var l=z(m.number.valueformat,a,i[0].lastY,i[0].y);return function(r){e.text(s+l(t(r))+o)}}):h(),c=S(s+a(i[0].y)+o,m.number.font,M,e)}(),O+=m.number.font.size+m.number.font.family+m.number.valueformat+m.number.suffix+m.number.prefix,p=c),m._hasDelta&&m._hasNumber){var R,F,j=[(c.left+c.right)/2,(c.top+c.bottom)/2],B=[(h.left+h.right)/2,(h.top+h.bottom)/2],N=.75*m.delta.font.size;"left"===m.delta.position&&(R=E(m,"deltaPos",0,-1*(c.width*b[m.align]+h.width*(1-b[m.align])+N),O,Math.min),F=j[1]-B[1],p={width:c.width+h.width+N,height:Math.max(c.height,h.height),left:h.left+R,right:c.right,top:Math.min(c.top,h.top+F),bottom:Math.max(c.bottom,h.bottom+F)}),"right"===m.delta.position&&(R=E(m,"deltaPos",0,c.width*(1-b[m.align])+h.width*b[m.align]+N,O,Math.max),F=j[1]-B[1],p={width:c.width+h.width+N,height:Math.max(c.height,h.height),left:c.left,right:h.right+R,top:Math.min(c.top,h.top+F),bottom:Math.max(c.bottom,h.bottom+F)}),"bottom"===m.delta.position&&(R=null,F=h.height,p={width:Math.max(c.width,h.width),height:c.height+h.height,left:Math.min(c.left,h.left),right:Math.max(c.right,h.right),top:c.bottom-c.height,bottom:c.bottom+h.height}),"top"===m.delta.position&&(R=null,F=c.top,p={width:Math.max(c.width,h.width),height:c.height+h.height,left:Math.min(c.left,h.left),right:Math.max(c.right,h.right),top:c.bottom-c.height-h.height,bottom:c.bottom}),D.attr({dx:R,dy:F})}(m._hasNumber||m._hasDelta)&&L.attr("transform",function(){var e=l.numbersScaler(p);O+=e[2];var t,r=E(m,"numbersScale",1,e[0],O,Math.min);m._scaleNumbers||(r=1),t=m._isAngular?v-r*p.bottom:v-r*(p.top+p.bottom)/2,m._numbersTop=r*p.top+t;var i=p[T];"center"===T&&(i=(p.left+p.right)/2);var n=g-r*i;return s(n=E(m,"numbersTranslate",0,n,O,Math.max),t)+o(r)})})(e,z,t,{numbersX:C,numbersY:L,numbersScaler:P,transitionOpts:p,onComplete:g}),D&&(m={range:I.gauge.axis.range,color:I.gauge.bgcolor,line:{color:I.gauge.bordercolor,width:0},thickness:1},T={range:I.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:I.gauge.bordercolor,width:I.gauge.borderwidth},thickness:1});var W=z.selectAll("g.angular").data(O?t:[]);W.exit().remove();var Y=z.selectAll("g.angularaxis").data(O?t:[]);Y.exit().remove(),O&&function(e,t,n){var a,o,u,h,d,p,m=t[0].trace,g=n.size,y=n.radius,v=n.innerRadius,x=n.gaugeBg,b=n.gaugeOutline,_=[g.l+g.w/2,g.t+g.h/2+y/2],T=n.gauge,A=n.layer,S=n.transitionOpts,E=n.onComplete,C=Math.PI/2;function L(e){var t=m.gauge.axis.range[0],r=(e-t)/(m.gauge.axis.range[1]-t)*Math.PI-C;return r<-C?-C:r>C?C:r}function P(e){return r.svg.arc().innerRadius((v+y)/2-e/2*(y-v)).outerRadius((v+y)/2+e/2*(y-v)).startAngle(-C)}function I(e){e.attr("d",function(e){return P(e.thickness).startAngle(L(e.range[0])).endAngle(L(e.range[1]))()})}T.enter().append("g").classed("angular",!0),T.attr("transform",s(_[0],_[1])),A.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),A.selectAll("g.xangularaxistick,path,text").remove(),(h=k(e,m.gauge.axis)).type="linear",h.range=m.gauge.axis.range,h._id="xangularaxis",h.ticklabeloverflow="allow",h.setScale();var z=function(e){return(h.range[0]-e.x)/(h.range[1]-h.range[0])*Math.PI+Math.PI},D={},O=f.makeLabelFns(h,0).labelStandoff;D.xFn=function(e){return Math.cos(z(e))*O},D.yFn=function(e){var t=z(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(O+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*c)},D.anchorFn=function(e){var t=Math.cos(z(e));return .1>Math.abs(t)?"middle":t>0?"start":"end"},D.heightFn=function(e,t,r){return -.5*(1+Math.sin(z(e)))*r};var R=function(e){return s(_[0]+y*Math.cos(e),_[1]-y*Math.sin(e))};if(d=f.calcTicks(h),p=f.getTickSigns(h)[2],h.visible){p="inside"===h.ticks?-1:1;var F=(h.linewidth||1)/2;f.drawTicks(e,h,{vals:d,layer:A,path:"M"+p*F+",0h"+p*h.ticklen,transFn:function(e){var t=z(e);return R(t)+"rotate("+-l(t)+")"}}),f.drawLabels(e,h,{vals:d,layer:A,transFn:function(e){return R(z(e))},labelFns:D})}var j=[x].concat(m.gauge.steps),B=T.selectAll("g.bg-arc").data(j);B.enter().append("g").classed("bg-arc",!0).append("path"),B.select("path").call(I).call(M),B.exit().remove();var N=P(m.gauge.bar.thickness),U=T.selectAll("g.value-arc").data([m.gauge.bar]);U.enter().append("g").classed("value-arc",!0).append("path");var V=U.select("path");w(S)?(V.transition().duration(S.duration).ease(S.easing).each("end",function(){E&&E()}).each("interrupt",function(){E&&E()}).attrTween("d",(a=N,o=L(t[0].lastY),u=L(t[0].y),function(){var e=i(o,u);return function(t){return a.endAngle(e(t))()}})),m._lastValue=t[0].y):V.attr("d","number"==typeof t[0].y?N.endAngle(L(t[0].y)):"M0,0Z"),V.call(M),U.exit().remove(),j=[];var q=m.gauge.threshold.value;(q||0===q)&&j.push({range:[q,q],color:m.gauge.threshold.color,line:{color:m.gauge.threshold.line.color,width:m.gauge.threshold.line.width},thickness:m.gauge.threshold.thickness});var H=T.selectAll("g.threshold-arc").data(j);H.enter().append("g").classed("threshold-arc",!0).append("path"),H.select("path").call(I).call(M),H.exit().remove();var G=T.selectAll("g.gauge-outline").data([b]);G.enter().append("g").classed("gauge-outline",!0).append("path"),G.select("path").call(I).call(M),G.exit().remove()}(e,t,{radius:U,innerRadius:V,gauge:W,layer:Y,size:j,gaugeBg:m,gaugeOutline:T,transitionOpts:p,onComplete:g});var Z=z.selectAll("g.bullet").data(R?t:[]);Z.exit().remove();var $=z.selectAll("g.bulletaxis").data(R?t:[]);$.exit().remove(),R&&function(e,t,r){var i,n,a,o,l,c=t[0].trace,u=r.gauge,d=r.layer,p=r.gaugeBg,m=r.gaugeOutline,g=r.size,v=c.domain,x=r.transitionOpts,b=r.onComplete;u.enter().append("g").classed("bullet",!0),u.attr("transform",s(g.l,g.t)),d.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),d.selectAll("g.xbulletaxistick,path,text").remove();var _=g.h,T=c.gauge.bar.thickness*_,A=v.x[0],S=v.x[0]+(v.x[1]-v.x[0])*(c._hasNumber||c._hasDelta?1-h.bulletNumberDomainSize:1);function E(e){e.attr("width",function(e){return Math.max(0,i.c2p(e.range[1])-i.c2p(e.range[0]))}).attr("x",function(e){return i.c2p(e.range[0])}).attr("y",function(e){return .5*(1-e.thickness)*_}).attr("height",function(e){return e.thickness*_})}(i=k(e,c.gauge.axis))._id="xbulletaxis",i.domain=[A,S],i.setScale(),n=f.calcTicks(i),a=f.makeTransTickFn(i),o=f.getTickSigns(i)[2],l=g.t+g.h,i.visible&&(f.drawTicks(e,i,{vals:"inside"===i.ticks?f.clipEnds(i,n):n,layer:d,path:f.makeTickPath(i,l,o),transFn:a}),f.drawLabels(e,i,{vals:n,layer:d,transFn:a,labelFns:f.makeLabelFns(i,l)}));var C=[p].concat(c.gauge.steps),L=u.selectAll("g.bg-bullet").data(C);L.enter().append("g").classed("bg-bullet",!0).append("rect"),L.select("rect").call(E).call(M),L.exit().remove();var P=u.selectAll("g.value-bullet").data([c.gauge.bar]);P.enter().append("g").classed("value-bullet",!0).append("rect"),P.select("rect").attr("height",T).attr("y",(_-T)/2).call(M),w(x)?P.select("rect").transition().duration(x.duration).ease(x.easing).each("end",function(){b&&b()}).each("interrupt",function(){b&&b()}).attr("width",Math.max(0,i.c2p(Math.min(c.gauge.axis.range[1],t[0].y)))):P.select("rect").attr("width","number"==typeof t[0].y?Math.max(0,i.c2p(Math.min(c.gauge.axis.range[1],t[0].y))):0),P.exit().remove();var I=t.filter(function(){return c.gauge.threshold.value||0===c.gauge.threshold.value}),z=u.selectAll("g.threshold-bullet").data(I);z.enter().append("g").classed("threshold-bullet",!0).append("line"),z.select("line").attr("x1",i.c2p(c.gauge.threshold.value)).attr("x2",i.c2p(c.gauge.threshold.value)).attr("y1",(1-c.gauge.threshold.thickness)/2*_).attr("y2",(1-(1-c.gauge.threshold.thickness)/2)*_).call(y.stroke,c.gauge.threshold.line.color).style("stroke-width",c.gauge.threshold.line.width),z.exit().remove();var D=u.selectAll("g.gauge-outline").data([m]);D.enter().append("g").classed("gauge-outline",!0).append("rect"),D.select("rect").call(E).call(M),D.exit().remove()}(e,t,{gauge:Z,layer:$,size:j,gaugeBg:m,gaugeOutline:T,transitionOpts:p,onComplete:g});var X=z.selectAll("text.title").data(t);X.exit().remove(),X.enter().append("text").classed("title",!0),X.attr("text-anchor",function(){return R?x.right:x[I.title.align]}).text(I.title.text).call(u.font,I.title.font).call(d.convertToTspans,e),X.attr("transform",function(){var e,t=j.l+j.w*b[I.title.align],r=h.titlePadding,i=u.bBox(X.node());return D?(O&&(e=I.gauge.axis.visible?u.bBox(Y.node()).top-r-i.bottom:j.t+j.h/2-U/2-i.bottom-r),R&&(e=L-(i.top+i.bottom)/2,t=j.l-h.bulletPadding*j.w)):e=I._numbersTop-r-i.bottom,s(t,e)})})}}}),v9=p({"src/traces/indicator/index.js"(e,t){t.exports={moduleType:"trace",name:"indicator",basePlotModule:v2(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:v3(),supplyDefaults:v4().supplyDefaults,calc:v6().calc,plot:v8(),meta:{}}}}),v7=p({"lib/indicator.js"(e,t){t.exports=v9()}}),xe=p({"src/traces/table/attributes.js"(e,t){var r=ig(),i=q().extendFlat,n=eq().overrideAll,a=H(),o=at().attributes,s=tB().descriptionOnlyNumbers;t.exports=n({domain:o({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:s("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:i({},r.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:i({},a({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:s("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:i({},r.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:i({},a({arrayOk:!0}))}},"calc","from-root")}}),xt=p({"src/traces/table/defaults.js"(e,t){var r=tv(),i=xe(),n=at().defaults;t.exports=function(e,t,a,o){function s(n,a){return r.coerce(e,t,i,n,a)}n(t,o,s),s("columnwidth"),s("header.values"),s("header.format"),s("header.align"),s("header.prefix"),s("header.suffix"),s("header.height"),s("header.line.width"),s("header.line.color"),s("header.fill.color"),r.coerceFont(s,"header.font",o.font),function(e,t){for(var r=e.columnorder||[],i=e.header.values.length,n=r.slice(0,i),a=n.slice().sort(function(e,t){return e-t}),o=n.map(function(e){return a.indexOf(e)}),s=o.length;s",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}}),xn=p({"src/traces/table/data_preparation_helper.js"(e,t){var r=xi(),i=q().extendFlat,n=C(),a=z().isTypedArray,o=z().isArrayOrTypedArray;function s(e){if(o(e)){for(var t=0,r=0;r=t||c===e.length-1)&&(i[n]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o=p(),n+=a,s=c+1,a=0);return i}function p(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}t.exports=function(e,t){var a=c(t.cells.values),p=function(e){return e.slice(t.header.values.length,e.length)},m=c(t.header.values);m.length&&!m[0].length&&(m[0]=[""],m=c(m));var g=m.concat(p(a).map(function(){return u((m[0]||[""]).length)})),y=t.domain,v=Math.floor(e._fullLayout._size.w*(y.x[1]-y.x[0])),x=Math.floor(e._fullLayout._size.h*(y.y[1]-y.y[0])),b=t.header.values.length?g[0].map(function(){return t.header.height}):[r.emptyHeaderHeight],_=a.length?a[0].map(function(){return t.cells.height}):[],w=b.reduce(l,0),T=f(_,x-w+r.uplift),M=d(f(b,w),[]),k=d(T,M),A={},S=t.columnorder;o(S)&&(S=Array.from(S)),S=S.concat(p(a.map(function(e,t){return t})));var E=g.map(function(e,r){var i=o(t.columnwidth)?t.columnwidth[Math.min(r,t.columnwidth.length-1)]:t.columnwidth;return n(i)?Number(i):1}),C=E.reduce(l,0);E=E.map(function(e){return e/C*v});var L=Math.max(s(t.header.line.width),s(t.cells.line.width)),P={key:t.uid+e._context.staticPlot,translateX:y.x[0]*e._fullLayout._size.w,translateY:e._fullLayout._size.h*(1-y.y[1]),size:e._fullLayout._size,width:v,maxLineWidth:L,height:x,columnOrder:S,groupHeight:x,rowBlocks:k,headerRowBlocks:M,scrollY:0,cells:i({},t.cells,{values:a}),headerCells:i({},t.header,{values:g}),gdColumns:g.map(function(e){return e[0]}),gdColumnsOriginalOrder:g.map(function(e){return e[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map(function(e,t){var r=A[e];return A[e]=(r||0)+1,{key:e+"__"+A[e],label:e,specIndex:t,xIndex:S[t],xScale:h,x:void 0,calcdata:void 0,columnWidth:E[t]}})};return P.columns.forEach(function(e){e.calcdata=P,e.x=h(e)}),P}}}),xa=p({"src/traces/table/data_split_helpers.js"(e){var t=q().extendFlat;e.splitToPanels=function(e){var r=[0,0],i=t({},e,{key:"header",type:"header",page:0,prevPages:r,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:t({},e.calcdata,{cells:e.calcdata.headerCells})});return[t({},e,{key:"cells1",type:"cells",page:0,prevPages:r,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),t({},e,{key:"cells2",type:"cells",page:1,prevPages:r,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),i]},e.splitToCells=function(e){var t,r,i,n,a=(i=(r=(t=e).rowBlocks[t.page])?r.rows[0].rowIndex:0,n=r?i+r.rows.length:0,[i,n]);return(e.values||[]).slice(a[0],a[1]).map(function(t,r){return{keyWithinBlock:r+("string"==typeof t&&t.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:a[0]+r,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:t}})}}}),xo=p({"src/traces/table/plot.js"(e,t){var r=xi(),i=T(),n=tv(),a=n.numberFormat,o=yF(),s=t7(),l=tF(),c=tv().raiseToTop,u=tv().strTranslate,h=tv().cancelTransition,d=xn(),f=xa(),p=ee();function m(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function g(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function y(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function v(e){return[].concat.apply([],e.map(function(e){return e})).map(function(e){return e.__data__})}function x(e,t,n){var a=e.selectAll("."+r.cn.scrollbarKit).data(o.repeat,o.keyFun);a.enter().append("g").classed(r.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),a.each(function(e){var t,i=e.scrollbarState;i.totalHeight=R(t=e.rowBlocks,t.length-1)+(t.length?F(t[t.length-1],1/0):1),i.scrollableAreaHeight=e.groupHeight-E(e),i.currentlyVisibleHeight=Math.min(i.totalHeight,i.scrollableAreaHeight),i.ratio=i.currentlyVisibleHeight/i.totalHeight,i.barLength=Math.max(i.ratio*i.currentlyVisibleHeight,r.goldenRatio*r.scrollbarWidth),i.barWiggleRoom=i.currentlyVisibleHeight-i.barLength,i.wiggleRoom=Math.max(0,i.totalHeight-i.scrollableAreaHeight),i.topY=0===i.barWiggleRoom?0:e.scrollY/i.wiggleRoom*i.barWiggleRoom,i.bottomY=i.topY+i.barLength,i.dragMultiplier=i.wiggleRoom/i.barWiggleRoom}).attr("transform",function(e){return u(e.width+r.scrollbarWidth/2+r.scrollbarOffset,E(e))});var s=a.selectAll("."+r.cn.scrollbar).data(o.repeat,o.keyFun);s.enter().append("g").classed(r.cn.scrollbar,!0);var l=s.selectAll("."+r.cn.scrollbarSlider).data(o.repeat,o.keyFun);l.enter().append("g").classed(r.cn.scrollbarSlider,!0),l.attr("transform",function(e){return u(0,e.scrollbarState.topY||0)});var c=l.selectAll("."+r.cn.scrollbarGlyph).data(o.repeat,o.keyFun);c.enter().append("line").classed(r.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",r.scrollbarWidth).attr("stroke-linecap","round").attr("y1",r.scrollbarWidth/2),c.attr("y2",function(e){return e.scrollbarState.barLength-r.scrollbarWidth/2}).attr("stroke-opacity",function(e){return e.columnDragInProgress||!e.scrollbarState.barWiggleRoom||n?0:.4}),c.transition().delay(0).duration(0),c.transition().delay(r.scrollbarHideDelay).duration(r.scrollbarHideDuration).attr("stroke-opacity",0);var h=s.selectAll("."+r.cn.scrollbarCaptureZone).data(o.repeat,o.keyFun);h.enter().append("line").classed(r.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",r.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(r){var n=i.event.y,a=this.getBoundingClientRect(),o=r.scrollbarState,s=n-a.top,l=i.scale.linear().domain([0,o.scrollableAreaHeight]).range([0,o.totalHeight]).clamp(!0);o.topY<=s&&s<=o.bottomY||L(t,e,null,l(s-o.barLength/2))(r)}).call(i.behavior.drag().origin(function(e){return i.event.stopPropagation(),e.scrollbarState.scrollbarScrollInProgress=!0,e}).on("drag",L(t,e)).on("dragend",function(){})),h.attr("y2",function(e){return e.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(c.remove(),h.remove())}function b(e,t,n,a){var l,c,u,h,d,m=((c=((l=n.selectAll("."+r.cn.columnCells).data(o.repeat,o.keyFun)).enter().append("g").classed(r.cn.columnCells,!0),l.exit().remove(),l).selectAll("."+r.cn.columnCell).data(f.splitToCells,function(e){return e.keyWithinBlock})).enter().append("g").classed(r.cn.columnCell,!0),c.exit().remove(),c);m.each(function(e,t){var r=e.calcdata.cells.font,i=e.column.specIndex,n={size:M(r.size,i,t),color:M(r.color,i,t),family:M(r.family,i,t),weight:M(r.weight,i,t),style:M(r.style,i,t),variant:M(r.variant,i,t),textcase:M(r.textcase,i,t),lineposition:M(r.lineposition,i,t),shadow:M(r.shadow,i,t)};e.rowNumber=e.key,e.align=M(e.calcdata.cells.align,i,t),e.cellBorderWidth=M(e.calcdata.cells.line.width,i,t),e.font=n}),((u=m.selectAll("."+r.cn.cellRect).data(o.repeat,function(e){return e.keyWithinBlock})).enter().append("rect").classed(r.cn.cellRect,!0),u).attr("width",function(e){return e.column.columnWidth}).attr("stroke-width",function(e){return e.cellBorderWidth}).each(function(e){var t=i.select(this);p.stroke(t,M(e.calcdata.cells.line.color,e.column.specIndex,e.rowNumber)),p.fill(t,M(e.calcdata.cells.fill.color,e.column.specIndex,e.rowNumber))});var g=((d=((h=m.selectAll("."+r.cn.cellTextHolder).data(o.repeat,function(e){return e.keyWithinBlock})).enter().append("g").classed(r.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),h).selectAll("."+r.cn.cellText).data(o.repeat,function(e){return e.keyWithinBlock})).enter().append("text").classed(r.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){i.event.stopPropagation()}),d);g.each(function(e){s.font(i.select(this),e.font)}),_(g,t,a,e),O(m)}function _(e,t,n,o){e.text(function(e){var t,i=e.column.specIndex,n=e.rowNumber,o=e.value,s="string"==typeof o,l=s&&o.match(/
/i),c=!s||l;e.mayHaveMarkup=s&&o.match(/[<&>]/);var u="string"==typeof(h=o)&&h.match(r.latexCheck);e.latex=u;var h,d,f=u?"":M(e.calcdata.cells.prefix,i,n)||"",p=u?"":M(e.calcdata.cells.suffix,i,n)||"",m=u?null:M(e.calcdata.cells.format,i,n)||null,g=f+(m?a(m)(e.value):e.value)+p;if(e.wrappingNeeded=!e.wrapped&&!c&&!u&&(d=w(g)),e.cellHeightMayIncrease=l||u||e.mayHaveMarkup||(void 0===d?w(g):d),e.needsConvertToTspans=e.mayHaveMarkup||e.wrappingNeeded||e.latex,e.wrappingNeeded){var y=(" "===r.wrapSplitCharacter?g.replace(/n&&i.push(a),n+=l}return i}(n,l,s);1===c.length&&(c[0]===n.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),t.each(function(e,t){e.page=c[t],e.scrollY=l}),t.attr("transform",function(e){return u(0,R(e.rowBlocks,e.page)-e.scrollY)}),e&&(P(e,r,t,c,i.prevPages,i,0),P(e,r,t,c,i.prevPages,i,1),x(r,e))}}function L(e,t,n,a){return function(o){var s=o.calcdata?o.calcdata:o,l=t.filter(function(e){return s.key===e.key}),c=n||s.scrollbarState.dragMultiplier,u=s.scrollY;return s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a,C(e,l.selectAll("."+r.cn.yColumn).selectAll("."+r.cn.columnBlock).filter(A),l),s.scrollY===u}}function P(e,t,r,i,n,a,o){i[o]!==n[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){b(e,t,r.filter(function(e,t){return t===o&&i[t]!==n[t]}),r),n[o]=i[o]}))}function I(e,t,n,a){return function(){var o=i.select(t.parentNode);o.each(function(e){var t=e.fragments;o.selectAll("tspan.line").each(function(e,r){t[r].width=this.getComputedTextLength()});var i,n,a=t[t.length-1].width,s=t.slice(0,-1),l=[],c=0,u=e.column.columnWidth-2*r.cellPad;for(e.value="";s.length;)c+(n=(i=s.shift()).width+a)>u&&(e.value+=l.join(r.wrapSpacer)+r.lineBreaker,l=[],c=0),l.push(i.text),c+=n;c&&(e.value+=l.join(r.wrapSpacer)),e.wrapped=!0}),o.selectAll("tspan.line").remove(),_(o.select("."+r.cn.cellText),n,e,a),i.select(t.parentNode.parentNode).call(O)}}function z(e,t,n,a,o){return function(){if(!o.settledY){var s=i.select(t.parentNode),l=j(o),c=o.key-l.firstRowIndex,h=l.rows[c].rowHeight,d=Math.max(o.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*r.cellPad:h,h);d-l.rows[c].rowHeight&&(l.rows[c].rowHeight=d,e.selectAll("."+r.cn.columnCell).call(O),C(null,e.filter(A),0),x(n,a,!0)),s.attr("transform",function(){var e=this.parentNode.getBoundingClientRect(),t=i.select(this.parentNode).select("."+r.cn.cellRect).node().getBoundingClientRect(),n=this.transform.baseVal.consolidate(),a=t.top-e.top+(n?n.matrix.f:r.cellPad);return u(D(o,i.select(this.parentNode).select("."+r.cn.cellTextHolder).node().getBoundingClientRect().width),a)}),o.settledY=!0}}}function D(e,t){switch(e.align){case"left":default:return r.cellPad;case"right":return e.column.columnWidth-(t||0)-r.cellPad;case"center":return(e.column.columnWidth-(t||0))/2}}function O(e){e.attr("transform",function(e){var t=e.rowBlocks[0].auxiliaryBlocks.reduce(function(e,t){return e+F(t,1/0)},0);return u(0,F(j(e),e.key)+t)}).selectAll("."+r.cn.cellRect).attr("height",function(e){var t,r;return(t=j(e),r=e.key,t.rows[r-t.firstRowIndex]).rowHeight})}function R(e,t){for(var r=0,i=t-1;i>=0;i--)r+=function(e){var t=e.allRowsHeight;if(void 0!==t)return t;for(var r=0,i=0;it.length&&(e=e.slice(0,t.length)):e=[],n=0;n90&&(d-=180,l=-l),{angle:d,flip:l,p:e.c2p(i,t,r),offsetMultplier:c}}}}),xx=p({"src/traces/carpet/plot.js"(e,t){var r=T(),i=t7(),n=xg(),a=xy(),o=xv(),s=tF(),l=tv(),c=l.strRotate,u=l.strTranslate,h=tR();function d(e,t,o,s,l,c,u){var h="const-"+l+"-lines",d=o.selectAll("."+h).data(c);d.enter().append("path").classed(h,!0).style("vector-effect",u?"none":"non-scaling-stroke"),d.each(function(o){var s=o.x,l=o.y,c="M"+a(n([],s,e.c2p),n([],l,t.c2p),o.smoothing);r.select(this).attr("d",c).style("stroke-width",o.width).style("stroke",o.color).style("stroke-dasharray",i.dashStyle(o.dash,o.width)).style("fill","none")}),d.exit().remove()}function f(e,t,n,a,l,h,d,f){var p=h.selectAll("text."+f).data(d);p.enter().append("text").classed(f,!0);var m=0,g={};return p.each(function(l,h){if("auto"===l.axis.tickangle)d=o(a,t,n,l.xy,l.dxy);else{var d,f=(l.axis.tickangle+180)*Math.PI/180;d=o(a,t,n,l.xy,[Math.cos(f),Math.sin(f)])}h||(g={angle:d.angle,flip:d.flip});var p=(l.endAnchor?-1:1)*d.flip,y=r.select(this).attr({"text-anchor":p>0?"start":"end","data-notex":1}).call(i.font,l.font).text(l.text).call(s.convertToTspans,e),v=i.bBox(this);y.attr("transform",u(d.p[0],d.p[1])+c(d.angle)+u(l.axis.labelpadding*p,.3*v.height)),m=Math.max(m,v.width+l.axis.labelpadding)}),p.exit().remove(),g.maxExtent=m,g}t.exports=function(e,t,i,s){var c=e._context.staticPlot,u=t.xaxis,h=t.yaxis,p=e._fullLayout._clips;l.makeTraceGroups(s,i,"trace").each(function(t){var i,s,m,y,v,x,b,_,w,T,M,k,A,S,E,C,L=r.select(this),P=t[0],I=P.trace,z=I.aaxis,D=I.baxis,O=l.ensureSingle(L,"g","minorlayer"),R=l.ensureSingle(L,"g","majorlayer"),F=l.ensureSingle(L,"g","boundarylayer"),j=l.ensureSingle(L,"g","labellayer");L.style("opacity",I.opacity),d(u,h,R,z,"a",z._gridlines,!0),d(u,h,R,D,"b",D._gridlines,!0),d(u,h,O,z,"a",z._minorgridlines,!0),d(u,h,O,D,"b",D._minorgridlines,!0),d(u,h,F,z,"a-boundary",z._boundarylines,c),d(u,h,F,D,"b-boundary",D._boundarylines,c);var B=f(e,u,h,I,P,j,z._labels,"a-label"),N=f(e,u,h,I,P,j,D._labels,"b-label");i=e,s=j,m=I,y=P,v=u,x=h,b=B,_=N,A=l.aggNums(Math.min,null,m.a),S=l.aggNums(Math.max,null,m.a),E=l.aggNums(Math.min,null,m.b),C=l.aggNums(Math.max,null,m.b),w=.5*(A+S),T=E,M=m.ab2xy(w,T,!0),k=m.dxyda_rough(w,T),void 0===b.angle&&l.extendFlat(b,o(m,v,x,M,m.dxydb_rough(w,T))),g(i,s,m,y,M,k,m.aaxis,v,x,b,"a-title"),w=A,T=.5*(E+C),M=m.ab2xy(w,T,!0),k=m.dxydb_rough(w,T),void 0===_.angle&&l.extendFlat(_,o(m,v,x,M,m.dxyda_rough(w,T))),g(i,s,m,y,M,k,m.baxis,v,x,_,"b-title"),function(e,t,r,i,o){var s,c,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var h=l.ensureSingle(u,"path","carpetboundary"),d=t.clipsegments,f=[];for(c=0;c90&&v<270&&(_=(-s.lineCount(x)+m)*p*a-_),x.attr("transform",u(t.p[0],t.p[1])+c(t.angle)+u(0,_)).attr("text-anchor","middle").call(i.font,d.title.font)}),b.exit().remove()}}}),xb=p({"src/traces/carpet/cheater_basis.js"(e,t){var r=tv().isArrayOrTypedArray;t.exports=function(e,t,i){var n,a,o,s,l,c=[],u=r(e)?e.length:e,h=r(t)?t.length:t,d=r(e)?e:null,f=r(t)?t:null;d&&(o=(d.length-1)/(d[d.length-1]-d[0])/(u-1)),f&&(s=(f.length-1)/(f[f.length-1]-f[0])/(h-1));var p,m=1/0,g=-1/0;for(a=0;a=10)return null;for(var n=1/0,a=-1/0,o=t.length,s=0;s0&&(f=e.dxydi([],i-1,o,0,s),y.push(l[0]+f[0]/3),v.push(l[1]+f[1]/3),p=e.dxydi([],i-1,o,1,s),y.push(h[0]-p[0]/3),v.push(h[1]-p[1]/3)),y.push(h[0]),v.push(h[1]),l=h;else for(c=Math.floor(Math.max(0,Math.min(L-2,i=e.a2i(r)))),u=i-c,x.length=L,x.crossLength=P,x.xy=function(t){return e.evalxy([],i,t)},x.dxy=function(t,r){return e.dxydj([],c,t,u,r)},a=0;a0&&(m=e.dxydj([],c,a-1,u,0),y.push(l[0]+m[0]/3),v.push(l[1]+m[1]/3),g=e.dxydj([],c,a-1,u,1),y.push(h[0]-g[0]/3),v.push(h[1]-g[1]/3)),y.push(h[0]),v.push(h[1]),l=h;return x.axisLetter=t,x.axis=b,x.crossAxis=k,x.value=r,x.constvar=n,x.index=d,x.x=y,x.y=v,x.smoothing=k.smoothing,x}function D(r){var i,a,o,s,l,c=[],u=[],h={};if(h.length=x.length,h.crossLength=M.length,"b"===t)for(o=Math.max(0,Math.min(P-2,r)),l=Math.min(1,Math.max(0,r-o)),h.xy=function(t){return e.evalxy([],t,r)},h.dxy=function(t,r){return e.dxydi([],t,o,r,l)},i=0;ix.length-1||_.push(i(D(o),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(d=u;dx.length-1)&&!(m<0||m>x.length-1))for(g=x[s],y=x[m],a=0;ax[x.length-1]||w.push(i(z(p),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash})));b.startline&&T.push(i(D(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(D(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort(function(e,t){return e-t}))[0],h=c[1],d=u;d<=h;d++)f=b.tick0+b.dtick*d,_.push(i(z(f),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(d=u-1;dx[x.length-1]||w.push(i(z(p),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&T.push(i(z(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(z(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}}}),xT=p({"src/traces/carpet/calc_labels.js"(e,t){var r=rn(),i=q().extendFlat;t.exports=function(e,t){var n,a,o,s,l,c=t._labels=[],u=t._gridlines;for(n=0;n=0;n--)a[u-n]=e[h][n],o[u-n]=t[h][n];for(s.push({x:a,y:o,bicubic:l}),n=h,a=[],o=[];n>=0;n--)a[h-n]=e[n][0],o[h-n]=t[n][0];return s.push({x:a,y:o,bicubic:c}),s}}}),xk=p({"src/traces/carpet/smooth_fill_2d_array.js"(e,t){var r=tv();t.exports=function(e,t,i){var n,a,o,s=[],l=[],c=e[0].length,u=e.length,h=0;for(n=0;n0&&void 0!==(i=e[r][t-1])&&(a++,n+=i),t0&&void 0!==(i=e[r-1][t])&&(a++,n+=i),r0&&a0&&n1e-5);return r.log("Smoother converged to",T,"after",M,"iterations"),e}}}),xA=p({"src/traces/carpet/constants.js"(e,t){t.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),xS=p({"src/traces/carpet/catmull_rom.js"(e,t){t.exports=function(e,t,r,i){var n=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(n*n+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*n-l*l*o)*i,h=(c*c*a-l*l*s)*i,d=c*(l+c)*3,f=l*(l+c)*3;return[[t[0]+(d&&u/d),t[1]+(d&&h/d)],[t[0]-(f&&u/f),t[1]-(f&&h/f)]]}}}),xE=p({"src/traces/carpet/compute_control_points.js"(e,t){var r=xS(),i=tv().ensureArray;function n(e,t,r){var i=-.5*r[0]+1.5*t[0],n=-.5*r[1]+1.5*t[1];return[(2*i+e[0])/3,(2*n+e[1])/3]}t.exports=function(e,t,a,o,s,l){var c,u,h,d,f,p,m,g,y,v,x=a[0].length,b=a.length,_=s?3*x-2:x,w=l?3*b-2:b;for(e=i(e,w),t=i(t,w),h=0;hf&&em&&tp||tg},e.setScale=function(){var t=e._x,r=e._y,i=n(e._xctrl,e._yctrl,t,r,h.smoothing,d.smoothing);e._xctrl=i[0],e._yctrl=i[1],e.evalxy=a([e._xctrl,e._yctrl],c,u,h.smoothing,d.smoothing),e.dxydi=o([e._xctrl,e._yctrl],h.smoothing,d.smoothing),e.dxydj=s([e._xctrl,e._yctrl],h.smoothing,d.smoothing)},e.i2a=function(e){var r=Math.max(0,Math.floor(e[0]),c-2),i=e[0]-r;return(1-i)*t[r]+i*t[r+1]},e.j2b=function(e){var t=Math.max(0,Math.floor(e[1]),c-2),r=e[1]-t;return(1-r)*l[t]+r*l[t+1]},e.ij2ab=function(t){return[e.i2a(t[0]),e.j2b(t[1])]},e.a2i=function(e){var r=Math.max(0,Math.min(i(e,t),c-2)),n=t[r],a=t[r+1];return Math.max(0,Math.min(c-1,r+(e-n)/(a-n)))},e.b2j=function(e){var t=Math.max(0,Math.min(i(e,l),u-2)),r=l[t],n=l[t+1];return Math.max(0,Math.min(u-1,t+(e-r)/(n-r)))},e.ab2ij=function(t){return[e.a2i(t[0]),e.b2j(t[1])]},e.i2c=function(t,r){return e.evalxy([],t,r)},e.ab2xy=function(r,i,n){if(!n&&(rt[c-1]|il[u-1]))return[!1,!1];var a=e.a2i(r),o=e.b2j(i),s=e.evalxy([],a,o);if(n){var h,d,f,p,m=0,g=0,y=[];rt[c-1]?(h=c-2,d=1,m=(r-t[c-1])/(t[c-1]-t[c-2])):(h=Math.max(0,Math.min(c-2,Math.floor(a))),d=a-h),il[u-1]?(f=u-2,p=1,g=(i-l[u-1])/(l[u-1]-l[u-2])):(f=Math.max(0,Math.min(u-2,Math.floor(o))),p=o-f),m&&(e.dxydi(y,h,f,d,p),s[0]+=y[0]*m,s[1]+=y[1]*m),g&&(e.dxydj(y,h,f,d,p),s[0]+=y[0]*g,s[1]+=y[1]*g)}return s},e.c2p=function(e,t,r){return[t.c2p(e[0]),r.c2p(e[1])]},e.p2x=function(e,t,r){return[t.p2c(e[0]),r.p2c(e[1])]},e.dadi=function(e){var r=Math.max(0,Math.min(t.length-2,e));return t[r+1]-t[r]},e.dbdj=function(e){var t=Math.max(0,Math.min(l.length-2,e));return l[t+1]-l[t]},e.dxyda=function(t,r,i,n){var a=e.dxydi(null,t,r,i,n),o=e.dadi(t,i);return[a[0]/o,a[1]/o]},e.dxydb=function(t,r,i,n){var a=e.dxydj(null,t,r,i,n),o=e.dbdj(r,n);return[a[0]/o,a[1]/o]},e.dxyda_rough=function(t,r,i){var n=y*(i||.1),a=e.ab2xy(t+n,r,!0),o=e.ab2xy(t-n,r,!0);return[(a[0]-o[0])*.5/n,(a[1]-o[1])*.5/n]},e.dxydb_rough=function(t,r,i){var n=v*(i||.1),a=e.ab2xy(t,r+n,!0),o=e.ab2xy(t,r-n,!0);return[(a[0]-o[0])*.5/n,(a[1]-o[1])*.5/n]},e.dpdx=function(e){return e._m},e.dpdy=function(e){return e._m}}}}),xz=p({"src/traces/carpet/calc.js"(e,t){var r=rn(),i=tv().isArray1D,n=xb(),a=x_(),o=xw(),s=xT(),l=xM(),c=a9(),u=xk(),h=a8(),d=xI();t.exports=function(e,t){var f=r.getFromId(e,t.xaxis),p=r.getFromId(e,t.yaxis),m=t.aaxis,g=t.baxis,y=t.x,v=t.y,x=[];y&&i(y)&&x.push("x"),v&&i(v)&&x.push("y"),x.length&&h(t,m,g,"a","b",x);var b=t._a=t._a||t.a,_=t._b=t._b||t.b;y=t._x||t.x,v=t._y||t.y;var w={};t._cheater&&(y=n("index"===m.cheatertype?b.length:b,"index"===g.cheatertype?_.length:_,t.cheaterslope)),t._x=y=c(y),t._y=v=c(v),u(y,b,_),u(v,b,_),d(t),t.setScale();var T=a(y),M=a(v),k=.5*(T[1]-T[0]),A=.5*(T[1]+T[0]),S=.5*(M[1]-M[0]),E=.5*(M[1]+M[0]);return T=[A-1.3*k,A+1.3*k],M=[E-1.3*S,E+1.3*S],t._extremes[f._id]=r.findExtremes(f,T,{padded:!0}),t._extremes[p._id]=r.findExtremes(p,M,{padded:!0}),o(t,"a","b"),o(t,"b","a"),s(t,m),s(t,g),w.clipsegments=l(t._xctrl,t._yctrl,m,g),w.x=y,w.y=v,w.a=b,w.b=_,[w]}}}),xD=p({"src/traces/carpet/index.js"(e,t){t.exports={attributes:xh(),supplyDefaults:xm(),plot:xx(),calc:xz(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:np(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),xO=p({"lib/carpet.js"(e,t){t.exports=xD()}}),xR=p({"src/traces/scattercarpet/attributes.js"(e,t){var r=iv(),i=ix(),n=Z(),{hovertemplateAttrs:a,texttemplateAttrs:o,templatefallbackAttrs:s}=eW(),l=tV(),c=q().extendFlat,u=i.marker,h=i.line,d=u.line;t.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:c({},i.mode,{dflt:"markers"}),text:c({},i.text,{}),texttemplate:o({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:s({editType:"plot"}),hovertext:c({},i.hovertext,{}),line:{color:h.color,width:h.width,dash:h.dash,backoff:h.backoff,shape:c({},h.shape,{values:["linear","spline"]}),smoothing:h.smoothing,editType:"calc"},connectgaps:i.connectgaps,fill:c({},i.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:r(),marker:c({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,angle:u.angle,angleref:u.angleref,standoff:u.standoff,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:d.width,dash:d.dash,editType:"calc"},l("marker.line")),gradient:u.gradient,editType:"calc"},l("marker")),textfont:i.textfont,textposition:i.textposition,selected:i.selected,unselected:i.unselected,hoverinfo:c({},n.hoverinfo,{flags:["a","b","text","name"]}),hoveron:i.hoveron,hovertemplate:a(),hovertemplatefallback:s(),zorder:i.zorder}}}),xF=p({"src/traces/scattercarpet/defaults.js"(e,t){var r=tv(),i=iy(),n=t5(),a=iq(),o=iH(),s=iG(),l=iW(),c=iY(),u=xR();t.exports=function(e,t,h,d){function f(i,n){return r.coerce(e,t,u,i,n)}f("carpet"),t.xaxis="x",t.yaxis="y";var p=f("a"),m=f("b"),g=Math.min(p.length,m.length);if(!g){t.visible=!1;return}t._length=g,f("text"),f("texttemplate"),f("texttemplatefallback"),f("hovertext"),f("mode",g")}return o}function y(e,t){var r;r=e.labelprefix&&e.labelprefix.length>0?e.labelprefix.replace(/ = $/,""):e._hovertitle,m.push(r+": "+t.toFixed(3)+e.labelsuffix)}}}}),xq=p({"src/traces/scattercarpet/event_data.js"(e,t){t.exports=function(e,t,r,i,n){var a=i[n];return e.a=a.a,e.b=a.b,e.y=a.y,e}}}),xH=p({"src/traces/scattercarpet/index.js"(e,t){t.exports={attributes:xR(),supplyDefaults:xF(),colorbar:ne(),formatLabels:xj(),calc:xN(),plot:xU(),style:nr().style,styleOnSelect:nr().styleOnSelect,hoverPoints:xV(),selectPoints:na(),eventData:xq(),moduleType:"trace",name:"scattercarpet",basePlotModule:np(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),xG=p({"lib/scattercarpet.js"(e,t){t.exports=xH()}}),xW=p({"src/traces/contourcarpet/attributes.js"(e,t){var r=aX(),i=oS(),n=tV(),a=q().extendFlat,o=i.contours;t.exports=a({carpet:{valType:"string",editType:"calc"},z:r.z,a:r.x,a0:r.x0,da:r.dx,b:r.y,b0:r.y0,db:r.dy,text:r.text,hovertext:r.hovertext,transpose:r.transpose,atype:r.xtype,btype:r.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:o.type,start:o.start,end:o.end,size:o.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:o.showlines,showlabels:o.showlabels,labelfont:o.labelfont,labelformat:o.labelformat,operation:o.operation,value:o.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:"plot"},zorder:i.zorder},n("",{cLetter:"z",autoColorDflt:!1}))}}),xY=p({"src/traces/contourcarpet/defaults.js"(e,t){var r=tv(),i=aK(),n=xW(),a=oX(),o=oC(),s=oP();t.exports=function(e,t,l,c){function u(i,a){return r.coerce(e,t,n,i,a)}if(u("carpet"),e.a&&e.b){if(!i(e,t,u,c,"a","b")){t.visible=!1;return}u("text"),"constraint"===u("contours.type")?a(e,t,u,c,l,{hasHover:!1}):(o(e,t,u,function(i){return r.coerce2(e,t,n,i)}),s(e,t,u,c,{hasHover:!1}))}else t._defaultColor=l,t._length=null;u("zorder")}}}),xZ=p({"src/traces/contourcarpet/calc.js"(e,t){var r=t2(),i=tv(),n=a8(),a=a9(),o=a7(),s=oe(),l=ot(),c=xY(),u=xB(),h=oz();t.exports=function(e,t){var d=t._carpetTrace=u(e,t);if(!(!d||!d.visible||"legendonly"===d.visible)){if(!t.a||!t.b){var f,p,m,g,y,v,x,b,_,w,T,M,k,A,S,E,C,L=e.data[d.index],P=e.data[t.index];P.a||(P.a=L.a),P.b||(P.b=L.b),c(P,t,t._defaultColor,e._fullLayout)}var I=(f=e,T=(w=(p=t)._carpetTrace).aaxis,M=w.baxis,T._minDtick=0,M._minDtick=0,i.isArray1D(p.z)&&n(p,T,M,"a","b",["z"]),m=p._a=p._a||p.a,v=p._b=p._b||p.b,m=m?T.makeCalcdata(p,"_a"):[],v=v?M.makeCalcdata(p,"_b"):[],g=p.a0||0,y=p.da||1,x=p.b0||0,b=p.db||1,_=p._z=a(p._z||p.z,p.transpose),p._emptypoints=s(_),o(_,p._emptypoints),k=i.maxRowLength(_),A="scaled"===p.xtype?"":m,S=l(p,A,g,y,k,T),E="scaled"===p.ytype?"":v,C=l(p,E,x,b,_.length,M),"levels"===p.contours.type&&"none"!==p.contours.coloring&&r(f,p,{vals:_,containerStr:"",cLetter:"z"}),[{a:S,b:C,z:_}]);return h(t,t._z),I}}}}),x$=p({"src/traces/carpet/axis_aligned_line.js"(e,t){var r=tv().isArrayOrTypedArray;t.exports=function(e,t,i,n){var a,o,s,l,c,u,h,d,f,p,m,g,y,v=r(i)?"a":"b",x=("a"===v?e.aaxis:e.baxis).smoothing,b="a"===v?e.a2i:e.b2j,_="a"===v?i:n,w="a"===v?n:i,T="a"===v?t.a.length:t.b.length,M="a"===v?t.b.length:t.a.length,k=Math.floor("a"===v?e.b2j(w):e.a2i(w)),A="a"===v?function(t){return e.evalxy([],t,k)}:function(t){return e.evalxy([],k,t)};x&&(s=Math.max(0,Math.min(M-2,k)),l=k-s,o="a"===v?function(t,r){return e.dxydi([],t,s,r,l)}:function(t,r){return e.dxydj([],s,t,l,r)});var S=b(_[0]),E=b(_[1]),C=S0?Math.floor:Math.ceil,I=C>0?Math.ceil:Math.floor,z=C>0?Math.min:Math.max,D=C>0?Math.max:Math.min,O=P(S+L),R=I(E-L),F=[[h=A(S)]];for(a=O;a*C=0;J--)X=i([],($=A.clipsegments[J]).x,_.c2p),K=i([],$.y,w.c2p),X.reverse(),K.reverse(),Q.push(n(X,K,$.bicubic));var ee="M"+Q.join("L")+"Z";(function(e,t,r,a,s,l){var c,u,h=o.ensureSingle(e,"g","contourbg").selectAll("path").data("fill"!==l||s?[]:[0]);h.enter().append("path"),h.exit().remove();var d=[];for(u=0;u=0&&(h=E,f=p):Math.abs(u[1]-h[1])<_?Math.abs(u[1]-E[1])<_&&(E[0]-u[0])*(h[0]-E[0])>=0&&(h=E,f=p):o.log("endpt to newendpt is not vert. or horz.",u,h,E)}if(f>=0)break;y+=A(u,h),u=h}if(f===e.edgepaths.length){o.log("unclosed perimeter path");break}c=f,(x=-1===v.indexOf(c))&&(c=v[0],y+=A(u,h)+"Z",u=null)}for(c=0;cm&&(i.max=m),i.len=i.max-i.min}function x(e,t){var r=0;return(.1>Math.abs(e[0]-l)||.1>Math.abs(e[0]-c))&&(r=Math.max(r,a*v(t,y(n.dxydb_rough(e[0],e[1],.1)))/2)),(.1>Math.abs(e[1]-u)||.1>Math.abs(e[1]-h))&&(r=Math.max(r,a*v(t,y(n.dxyda_rough(e[0],e[1],.1)))/2)),r}}(this,r,e,i,h,t.height),!(i.len<(t.width+t.height)*u.LABELMIN)))for(var n=Math.min(Math.ceil(i.len/z),u.LABELMAX),a=0;ay):g=k>w,y=k;var A=c(w,T,M,k);A.pos=_,A.yc=(w+k)/2,A.i=b,A.dir=g?"increasing":"decreasing",A.x=A.pos,A.y=[M,T],v&&(A.orig_p=a[b]),p&&(A.tx=t.text[b]),m&&(A.htx=t.hovertext[b]),x.push(A)}else x.push({pos:_,empty:!0})}return t._extremes[l._id]=n.findExtremes(l,r.concat(d,h),{padded:!0}),x.length&&(x[0].t={labels:{open:i(e,"open:")+" ",high:i(e,"high:")+" ",low:i(e,"low:")+" ",close:i(e,"close:")+" "}}),x}t.exports={calc:function(e,t){var i=n.getFromId(e,t.xaxis),o=n.getFromId(e,t.yaxis),c=function(e,t,i){var n=i._minDiff;if(!n){var o,s=e._fullData,l=[];for(o=0,n=1/0;o"+u.labels[v]+r.hoverLabelText(s,x,l.yhoverformat)):((y=i.extendFlat({},d)).y0=y.y1=b,y.yLabelVal=x,y.yLabel=u.labels[v]+r.hoverLabelText(s,x,l.yhoverformat),y.name="",h.push(y),m[x]=y)}return h}function h(e,t,i,n){var a=e.cd,s=e.ya,u=a[0].trace,h=a[0].t,d=c(e,t,i,n);if(!d)return[];var f=a[d.index],p=d.index=f.i,m=f.dir;function g(e){return h.labels[e]+r.hoverLabelText(s,u[e][p],u.yhoverformat)}var y=f.hi||u.hoverinfo||"",v=y.split("+"),x="all"===y,b=x||-1!==v.indexOf("y"),_=x||-1!==v.indexOf("text"),w=b?[g("open"),g("high"),g("low"),g("close")+" "+l[m]]:[];return _&&o(f,u,w),d.extraText=w.join("
"),d.y0=d.y1=s.c2p(f.yc,!0),[d]}t.exports={hoverPoints:function(e,t,r,i){return e.cd[0].trace.hoverlabel.split?u(e,t,r,i):h(e,t,r,i)},hoverSplit:u,hoverOnPoints:h}}}),x6=p({"src/traces/ohlc/select.js"(e,t){t.exports=function(e,t){var r,i=e.cd,n=e.xaxis,a=e.yaxis,o=[],s=i[0].t.bPos||0;if(!1===t)for(r=0;rt?function(e){return e<=0}:function(e){return e>=0};s.c2g=function(t){var r=s.c2l(t)-e;return(a(r)?r:0)+n},s.g2c=function(t){return s.l2c(t+e-n)},s.g2p=function(e){return e*i},s.c2p=function(e){return s.g2p(s.c2g(e))}};break;case"angularaxis":var c=e,u=t,h=c.type;if("linear"===h){var d=c.d2c,f=c.c2d;c.d2c=function(e,t){var r;return r=d(e),"degrees"===t?n(r):r},c.c2d=function(e,t){return f("degrees"===t?a(e):e)}}c.makeCalcdata=function(e,t){var r,i,n=e[t],a=e._length,o=function(t){return c.d2c(t,e.thetaunit)};if(n)for(r=Array(a),i=0;i1e-10?e:0}function h(e,t,r){t=t||0,r=r||0;for(var i=e.length,n=Array(i),a=0;a0?r:1/0}),a=r.mod(i+1,t.length);return[t[i],t[a]]},findIntersectionXY:l,findXYatLength:function(e,t,r,i){var n=-t*r,a=t*t+1,o=2*(t*n-r),s=Math.sqrt(o*o-4*a*(n*n+r*r-e*e)),l=(-o+s)/(2*a),c=(-o-s)/(2*a);return[[l,t*l+n+i],[c,t*c+n+i]]},clampTiny:u,pathPolygon:function(e,t,r,i,n,a){return"M"+h(c(e,t,r,i),n,a).join("L")},pathPolygonAnnulus:function(e,t,r,i,n,a,o){e0))!=(a<0?-1:+(a>0))){var f=i(e,r([t,0]));return["M"+l+","+c,"A"+o+","+o+" 0 0,"+(0=90||v>90&&x>=450?1:_<=0&&T<=0?0:Math.max(_,T),[v<=180&&x>=180||v>180&&x>=540?-1:b>=0&&w>=0?0:Math.min(b,w),v<=270&&x>=270||v>270&&x>=630?-1:_>=0&&T>=0?0:Math.min(_,T),x>=360?1:b<=0&&w<=0?0:Math.max(b,w),m]),L=C[2]-C[0],P=Math.abs((C[3]-C[1])/L);d/h>P?(M=h,E=(d-(k=h*P))/i.h/2,A=[c[0],c[1]],S=[u[0]+E,u[1]-E]):(M=d/P,k=d,E=(h-M)/i.w/2,A=[c[0]+E,c[1]-E],S=[u[0],u[1]]),this.xLength2=M,this.yLength2=k,this.xDomain2=A,this.yDomain2=S;var I,z=this.xOffset2=i.l+i.w*A[0],R=this.yOffset2=i.t+i.h*(1-S[1]),F=this.radius=M/L,j=this.innerRadius=this.getHole(t)*F,B=this.cx=z-F*C[0],N=this.cy=R+F*C[3],U=this.cxx=B-z,V=this.cyy=N-R,q=n.side;"counterclockwise"===q?(I=q,q="top"):"clockwise"===q&&(I=q,q="bottom"),this.radialAxis=this.mockAxis(e,t,n,{_id:"x",side:q,_trueSide:I,domain:[j/i.w,F/i.w]}),this.angularAxis=this.mockAxis(e,t,a,{side:"right",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(e,t),this.updateAngularAxis(e,t),this.updateRadialAxis(e,t),this.updateRadialAxisTitle(e,t),this.xaxis=this.mockCartesianAxis(e,t,{_id:"x",domain:A}),this.yaxis=this.mockCartesianAxis(e,t,{_id:"y",domain:S});var H=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",H).attr("transform",o(U,V)),r.frontplot.attr("transform",o(z,R)).call(l.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr("d",H).attr("transform",o(B,N)).call(s.fill,t.bgcolor)},j.mockAxis=function(e,t,r,i){var a=n.extendFlat({},r,i);return d(a,t,e),a},j.mockCartesianAxis=function(e,t,r){var i=this,a=i.isSmith,o=r._id,s=n.extendFlat({type:"linear"},r);h(s,e);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var e=i.sectorBBox,r=l[o],n=i.radialAxis._rl,a=(n[1]-n[0])/(1-i.getHole(t));s.range=[e[r[0]]*a,e[r[1]]*a]},s.isPtWithinRange="x"!==o||a?function(){return!0}:function(e){return i.isPtInside(e)},s.setRange(),s.setScale(),s},j.doAutoRange=function(e,t){var r=this.gd,i=this.radialAxis,n=this.getRadial(t);f(r,i);var a=i.range;if(n.range=a.slice(),n._input.range=a.slice(),i._rl=[i.r2l(a[0],null,"gregorian"),i.r2l(a[1],null,"gregorian")],void 0!==i.minallowed){var o=i.r2l(i.minallowed);i._rl[0]>i._rl[1]?i._rl[1]=Math.max(i._rl[1],o):i._rl[0]=Math.max(i._rl[0],o)}if(void 0!==i.maxallowed){var s=i.r2l(i.maxallowed);i._rl[0]90&&m<=270&&(g.tickangle=180);var x=v?function(e){var t=I(r,C([e.x,0]));return o(t[0]-d,t[1]-f)}:function(e){return o(g.l2p(e.x)+h,0)},b=v?function(e){return P(r,e.x,-1/0,1/0)}:function(e){return r.pathArc(g.r2p(e.x)+h)},_=B(p);if(r.radialTickLayout!==_&&(l["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=_),y){g.setScale();var w=0,T=v?(g.tickvals||[]).filter(function(e){return e>=0}).map(function(e){return u.tickText(g,e,!0,!1)}):u.calcTicks(g),M=v?T:u.clipEnds(g,T),k=u.getTickSigns(g)[2];v&&(("top"===g.ticks&&"bottom"===g.side||"bottom"===g.ticks&&"top"===g.side)&&(k=-k),"top"===g.ticks&&"top"===g.side&&(w=-g.ticklen),"bottom"===g.ticks&&"bottom"===g.side&&(w=g.ticklen)),u.drawTicks(i,g,{vals:T,layer:l["radial-axis"],path:u.makeTickPath(g,0,k),transFn:x,crisp:!1}),u.drawGrid(i,g,{vals:M,layer:l["radial-grid"],path:b,transFn:n.noop,crisp:!1}),u.drawLabels(i,g,{vals:T,layer:l["radial-axis"],transFn:x,labelFns:u.makeLabelFns(g,w)})}var A=r.radialAxisAngle=r.vangles?R(N(O(p.angle),r.vangles)):p.angle,S=o(d,f),E=S+a(-A);U(l["radial-axis"],y&&(p.showticklabels||p.ticks),{transform:E}),U(l["radial-grid"],y&&p.showgrid,{transform:v?"":S}),U(l["radial-line"].select("line"),y&&p.showline,{x1:v?-c:h,y1:0,x2:c,y2:0,transform:E}).attr("stroke-width",p.linewidth).call(s.stroke,p.linecolor)},j.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var i=this.gd,n=this.radius,a=this.cx,o=this.cy,s=this.getRadial(t),c=this.id+"title",u=0;if(s.title){var h=l.bBox(this.layers["radial-axis"].node()).height,d=s.title.font.size,f=s.side;u="top"===f?d:"counterclockwise"===f?-(h+.4*d):h+.8*d}var p=void 0!==r?r:this.radialAxisAngle,m=O(p),g=Math.cos(m),v=Math.sin(m),x=a+n/2*g+u*v,b=o-n/2*v+u*g;this.layers["radial-axis-title"]=y.draw(i,c,{propContainer:s,propName:this.id+".radialaxis.title.text",placeholder:z(i,"Click to enter radial axis title"),attributes:{x:x,y:b,"text-anchor":"middle"},transform:{rotate:-p}})}},j.updateAngularAxis=function(e,t){var r,i=this,l=i.gd,c=i.layers,h=i.radius,d=i.innerRadius,f=i.cx,p=i.cy,m=i.getAngular(t),g=i.angularAxis,y=i.isSmith;y||(i.fillViewInitialKey("angularaxis.rotation",m.rotation),g.setGeometry(),g.setScale());var v=y?function(e){var t=I(i,C([0,e.x]));return Math.atan2(t[0]-f,t[1]-p)-Math.PI/2}:function(e){return g.t2g(e.x)};"linear"===g.type&&"radians"===g.thetaunit&&(g.tick0=R(g.tick0),g.dtick=R(g.dtick));var x=function(e){return o(f+h*Math.cos(e),p-h*Math.sin(e))},b=y?function(e){var t=I(i,C([0,e.x]));return o(t[0],t[1])}:function(e){return x(v(e))},_=y?function(e){var t=I(i,C([0,e.x])),r=Math.atan2(t[0]-f,t[1]-p)-Math.PI/2;return o(t[0],t[1])+a(-R(r))}:function(e){var t=v(e);return x(t)+a(-R(t))},w=y?function(e){return L(i,e.x,0,1/0)}:function(e){var t=v(e),r=Math.cos(t),i=Math.sin(t);return"M"+[f+d*r,p-d*i]+"L"+[f+h*r,p-h*i]},T=u.makeLabelFns(g,0).labelStandoff,M={};M.xFn=function(e){return Math.cos(v(e))*T},M.yFn=function(e){var t=v(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(T+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*k)},M.anchorFn=function(e){var t=Math.cos(v(e));return .1>Math.abs(t)?"middle":t>0?"start":"end"},M.heightFn=function(e,t,r){return -.5*(1+Math.sin(v(e)))*r};var A=B(m);i.angularTickLayout!==A&&(c["angular-axis"].selectAll("."+g._id+"tick").remove(),i.angularTickLayout=A);var S=y?[1/0].concat(g.tickvals||[]).map(function(e){return u.tickText(g,e,!0,!1)}):u.calcTicks(g);if(y&&(S[0].text="∞",S[0].fontSize*=1.75),"linear"===t.gridshape?(r=S.map(v),0>n.angleDelta(r[0],r[1])&&(r=r.slice().reverse())):r=null,i.vangles=r,"category"===g.type&&(S=S.filter(function(e){return n.isAngleInsideSector(v(e),i.sectorInRad)})),g.visible){var E="inside"===g.ticks?-1:1,P=(g.linewidth||1)/2;u.drawTicks(l,g,{vals:S,layer:c["angular-axis"],path:"M"+E*P+",0h"+E*g.ticklen,transFn:_,crisp:!1}),u.drawGrid(l,g,{vals:S,layer:c["angular-grid"],path:w,transFn:n.noop,crisp:!1}),u.drawLabels(l,g,{vals:S,layer:c["angular-axis"],repositionOnUpdate:!0,transFn:b,labelFns:M})}U(c["angular-line"].select("path"),m.showline,{d:i.pathSubplot(),transform:o(f,p)}).attr("stroke-width",m.linewidth).call(s.stroke,m.linecolor)},j.updateFx=function(e,t){this.gd._context.staticPlot||(this.isSmith||(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e))},j.updateHoverAndMainDrag=function(e){var t,a,l=this,c=l.isSmith,u=l.gd,h=l.layers,d=e._zoomlayer,f=A.MINZOOM,y=A.OFFEDGE,_=l.radius,w=l.innerRadius,T=l.cx,M=l.cy,k=l.cxx,E=l.cyy,C=l.sectorInRad,L=l.vangles,P=l.radialAxis,I=S.clampTiny,z=S.findXYatLength,D=S.findEnclosingVertexAngles,O=A.cornerHalfWidth,R=A.cornerLen/2,F=p.makeDragger(h,"path","maindrag",!1===e.dragmode?"none":"crosshair");r.select(F).attr("d",l.pathSubplot()).attr("transform",o(T,M)),F.onmousemove=function(e){g.hover(u,e,l.id),u._fullLayout._lasthover=F,u._fullLayout._hoversubplot=l.id},F.onmouseout=function(e){u._dragging||m.unhover(u,e)};var j,B,N,U,V,q,H,G,W,Y={element:F,gd:u,subplot:l.id,plotinfo:{id:l.id,xaxis:l.xaxis,yaxis:l.yaxis},xaxes:[l.xaxis],yaxes:[l.yaxis]};function Z(e,t){return Math.sqrt(e*e+t*t)}function $(e,t){return Math.atan2(E-t,e-k)}function X(e,t){return[e*Math.cos(t),e*Math.sin(-t)]}function K(e,t){if(0===e)return l.pathSector(2*O);var r=R/e,i=t-r,n=t+r,a=Math.max(0,Math.min(e,_)),o=a-O,s=a+O;return"M"+X(o,i)+"A"+[o,o]+" 0,0,0 "+X(o,n)+"L"+X(s,n)+"A"+[s,s]+" 0,0,1 "+X(s,i)+"Z"}function J(e,t,r){if(0===e)return l.pathSector(2*O);var i,n,a,o,s=X(e,t),c=X(e,r),u=I((s[0]+c[0])/2),h=I((s[1]+c[1])/2);if(u&&h){var d=h/u,f=-1/d,p=z(O,d,u,h);a=z(R,f,p[0][0],p[0][1]),o=z(R,f,p[1][0],p[1][1])}else h?(i=R,n=O):(i=O,n=R),a=[[u-i,h-n],[u+i,h-n]],o=[[u-i,h+n],[u+i,h+n]];return"M"+a.join("L")+"L"+o.reverse().join("L")+"Z"}function Q(e,t){return t=Math.max(Math.min(t,_),w),ef?(e-1&&1===e&&x(t,u,[l.xaxis],[l.yaxis],l.id,Y),r.indexOf("event")>-1&&g.click(u,t,l.id)}Y.prepFn=function(e,r,i){var o,h=u._fullLayout.dragmode,f=F.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var m=u._fullLayout._invTransform;t=u._fullLayout._invScaleX,a=u._fullLayout._invScaleY;var g=n.apply3DTransform(m)(r-f.left,i-f.top);if(j=g[0],B=g[1],L){var y=S.findPolygonOffset(_,C[0],C[1],L);j+=k+y[0],B+=E+y[1]}switch(h){case"zoom":Y.clickFn=eo,c||(L?Y.moveFn=ei:Y.moveFn=et,Y.doneFn=en,N=null,U=null,V=l.pathSubplot(),q=!1,o=u._fullLayout[l.id],H=s.luminosity(o.bgcolor),(G=p.makeZoombox(d,H,T,M,V)).attr("fill-rule","evenodd"),W=p.makeCorners(d,T,M),b(u));break;case"select":case"lasso":v(e,r,i,Y,h)}},m.init(Y)},j.updateRadialDrag=function(e,t,s){var l,c,u,h=this,d=h.gd,f=h.layers,g=h.radius,y=h.innerRadius,v=h.cx,x=h.cy,_=h.radialAxis,T=A.radialDragBoxSize,k=T/2;if(_.visible){var S,E,C,L=O(h.radialAxisAngle),P=_._rl,I=P[0],z=P[1],D=P[s],F=.75*(P[1]-P[0])/(1-h.getHole(t))/g;s?(S=v+(g+k)*Math.cos(L),E=x-(g+k)*Math.sin(L),C="radialdrag"):(S=v+(y-k)*Math.cos(L),E=x-(y-k)*Math.sin(L),C="radialdrag-inner");var j=p.makeRectDragger(f,C,"crosshair",-k,-k,T,T),B={element:j,gd:d};!1===e.dragmode&&(B.dragmode=!1),U(r.select(j),_.visible&&y0!=(s?u>I:u")}}t.exports={hoverPoints:function(e,t,n,a){var o=r(e,t,n,a);if(!(!o||!1===o[0].index)){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}}}),bv=p({"src/traces/scatterpolar/index.js"(e,t){t.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:bh(),categories:["polar","symbols","showLegend","scatter-like"],attributes:bd(),supplyDefaults:bf().supplyDefaults,colorbar:ne(),formatLabels:bp(),calc:bm(),plot:bg(),style:nr().style,styleOnSelect:nr().styleOnSelect,hoverPoints:by().hoverPoints,selectPoints:na(),meta:{}}}}),bx=p({"lib/scatterpolar.js"(e,t){t.exports=bv()}}),bb=p({"src/traces/scatterpolargl/attributes.js"(e,t){var i=bd(),{cliponaxis:a,hoveron:s}=i,u=((e,t)=>{var r={};for(var i in e)l.call(e,i)&&0>t.indexOf(i)&&(r[i]=e[i]);if(null!=e&&o)for(var i of o(e))0>t.indexOf(i)&&c.call(e,i)&&(r[i]=e[i]);return r})(i,["cliponaxis","hoveron"]),{connectgaps:h,line:{color:f,dash:p,width:m},fill:g,fillcolor:y,marker:v,textfont:x,textposition:b}=p0();t.exports=r(d({},u),n({connectgaps:h,fill:g,fillcolor:y,line:{color:f,dash:p,editType:"calc",width:m},marker:v,textfont:x,textposition:b}))}}),b_=p({"src/traces/scatterpolargl/defaults.js"(e,t){var r=tv(),i=t5(),n=bf().handleRThetaDefaults,a=iq(),o=iH(),s=iW(),l=iY(),c=iy().PTS_LINESONLY,u=bb();t.exports=function(e,t,h,d){function f(i,n){return r.coerce(e,t,u,i,n)}var p=n(e,t,d,f);if(!p){t.visible=!1;return}f("thetaunit"),f("mode",p=l&&(v.marker.cluster=p.tree),v.marker&&(v.markerSel.positions=v.markerUnsel.positions=v.marker.positions=_),v.line&&_.length>1&&s.extendFlat(v.line,o.linePositions(e,f,_)),v.text&&(s.extendFlat(v.text,{positions:_},o.textPosition(e,f,v.text,v.marker)),s.extendFlat(v.textSel,{positions:_},o.textPosition(e,f,v.text,v.markerSel)),s.extendFlat(v.textUnsel,{positions:_},o.textPosition(e,f,v.text,v.markerUnsel))),v.fill&&!d.fill2d&&(d.fill2d=!0),v.marker&&!d.scatter2d&&(d.scatter2d=!0),v.line&&!d.line2d&&(d.line2d=!0),v.text&&!d.glText&&(d.glText=!0),d.lineOptions.push(v.line),d.fillOptions.push(v.fill),d.markerOptions.push(v.marker),d.markerSelectedOptions.push(v.markerSel),d.markerUnselectedOptions.push(v.markerUnsel),d.textOptions.push(v.text),d.textSelectedOptions.push(v.textSel),d.textUnselectedOptions.push(v.textUnsel),d.selectBatch.push([]),d.unselectBatch.push([]),p.x=w,p.y=T,p.rawx=w,p.rawy=T,p.r=g,p.theta=y,p.positions=_,p._scene=d,p.index=d.count,d.count++}}),n(e,t,c)}},t.exports.reglPrecompiled={}}}),bS=p({"src/traces/scatterpolargl/index.js"(e,t){var r=bk();r.plot=bA(),t.exports=r}}),bE=p({"lib/scatterpolargl.js"(e,t){t.exports=bS()}}),bC=p({"src/traces/barpolar/attributes.js"(e,t){var r,{hovertemplateAttrs:i,templatefallbackAttrs:n}=eW(),a=q().extendFlat,o=bd(),s=a_();t.exports={r:o.r,theta:o.theta,r0:o.r0,dr:o.dr,theta0:o.theta0,dtheta:o.dtheta,thetaunit:o.thetaunit,base:a({},s.base,{}),offset:a({},s.offset,{}),width:a({},s.width,{}),text:a({},s.text,{}),hovertext:a({},s.hovertext,{}),marker:(r=a({},s.marker),delete r.cornerradius,r),hoverinfo:o.hoverinfo,hovertemplate:i(),hovertemplatefallback:n(),selected:s.selected,unselected:s.unselected}}}),bL=p({"src/traces/barpolar/layout_attributes.js"(e,t){t.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),bP=p({"src/traces/barpolar/defaults.js"(e,t){var r=tv(),i=bf().handleRThetaDefaults,n=aT(),a=bC();t.exports=function(e,t,o,s){function l(i,n){return r.coerce(e,t,a,i,n)}if(!i(e,t,s,l)){t.visible=!1;return}l("thetaunit"),l("base"),l("offset"),l("width"),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),n(e,t,l,o,s),r.coerceSelectionMarkerOpacity(t,l)}}}),bI=p({"src/traces/barpolar/layout_defaults.js"(e,t){var r=tv(),i=bL();t.exports=function(e,t,n){var a,o={};function s(n,o){return r.coerce(e[a]||{},t[a],i,n,o)}for(var l=0;l0?(a=r,s=i):(a=i,s=r);var a,s,h=o.findEnclosingVertexAngles(a,l.vangles)[0],d=o.findEnclosingVertexAngles(s,l.vangles)[1],f=[h,(a+s)/2,d];return o.pathPolygonAnnulus(e,t,a,s,f,c,u)}:function(e,t,r,i){return n.pathAnnulus(e,t,r,i,c,u)}),y=t.layers.frontplot.select("g.barlayer");n.makeTraceGroups(y,s,"trace bars").each(function(){var o=r.select(this),s=n.ensureSingle(o,"g","points").selectAll("g.point").data(n.identity);s.enter().append("g").style("vector-effect",h?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each(function(e){var t,a=r.select(this),o=e.rp0=p.c2p(e.s0),s=e.rp1=p.c2p(e.s1),l=e.thetag0=m.c2g(e.p0),c=e.thetag1=m.c2g(e.p1);if(i(o)&&i(s)&&i(l)&&i(c)&&o!==s&&l!==c){var u=p.c2g(e.s1),h=(l+c)/2;e.ct=[d.c2p(u*Math.cos(h)),f.c2p(u*Math.sin(h))],t=g(o,s,l,c)}else t="M0,0Z";n.ensureSingle(a,"path").attr("d",t)}),a.setClipUrl(o,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,e)})}}}),bO=p({"src/traces/barpolar/hover.js"(e,t){var r=rD(),i=tv(),n=aI().getTraceColor,a=i.fillText,o=by().makeHoverPointText,s=bo().isPtInsidePolygon;t.exports=function(e,t,l){var c=e.cd,u=c[0].trace,h=e.subplot,d=h.radialAxis,f=h.angularAxis,p=h.vangles,m=p?s:i.isPtInsideSector,g=e.maxHoverDistance,y=f._period||2*Math.PI,v=Math.abs(d.g2p(Math.sqrt(t*t+l*l))),x=Math.atan2(l,t);if(d.range[0]>d.range[1]&&(x+=Math.PI),r.getClosest(c,function(e){return m(v,x,[e.rp0,e.rp1],[e.thetag0,e.thetag1],p)?g+Math.min(1,Math.abs(e.thetag1-e.thetag0)/y)-1+(e.rp1-v)/(e.rp1-e.rp0)-1:1/0},e),!1!==e.index){var b=c[e.index];e.x0=e.x1=b.ct[0],e.y0=e.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return a(b,u,e),o(_,u,h,e),e.hovertemplate=u.hovertemplate,e.color=n(u,b),e.xLabelVal=e.yLabelVal=void 0,b.s<0&&(e.idealAlign="left"),[e]}}}}),bR=p({"src/traces/barpolar/index.js"(e,t){t.exports={moduleType:"trace",name:"barpolar",basePlotModule:bh(),categories:["polar","bar","showLegend"],attributes:bC(),layoutAttributes:bL(),supplyDefaults:bP(),supplyLayoutDefaults:bI(),calc:bz().calc,crossTraceCalc:bz().crossTraceCalc,plot:bD(),colorbar:ne(),formatLabels:bp(),style:aL().style,styleOnSelect:aL().styleOnSelect,hoverPoints:bO(),selectPoints:aD(),meta:{}}}}),bF=p({"lib/barpolar.js"(e,t){t.exports=bR()}}),bj=p({"src/plots/smith/constants.js"(e,t){t.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),bB=p({"src/plots/smith/layout_attributes.js"(e,t){var r=Q(),i=tN(),n=at().attributes,a=tv().extendFlat,o=eq().overrideAll,s=o({color:i.color,showline:a({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:a({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash},"plot","from-root"),l=o({ticklen:i.ticklen,tickwidth:a({},i.tickwidth,{dflt:2}),tickcolor:i.tickcolor,showticklabels:i.showticklabels,labelalias:i.labelalias,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,tickfont:i.tickfont,tickformat:i.tickformat,hoverformat:i.hoverformat,layer:i.layer},"plot","from-root"),c=a({visible:a({},i.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:a({},i.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},s,l),u=a({visible:a({},i.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:i.ticks,editType:"calc"},s,l);t.exports={domain:n({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:r.background},realaxis:c,imaginaryaxis:u,editType:"calc"}}}),bN=p({"src/plots/smith/layout_defaults.js"(e,t){var r,i,n,a=tv(),o=ee(),s=tS(),l=o7(),c=tI().getSubplotData,u=tK(),h=tX(),d=nc(),f=rt(),p=bB(),m=bj(),g=m.axisNames,y=(r=function(e){return a.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(e){return-e}).concat([0]).concat(e)},i=String,n={},function(e){var t=i?i(e):e;if(t in n)return n[t];var a=r(e);return n[t]=a,a});function v(e,t,r,i){var n=r("bgcolor");i.bgColor=o.combine(n,i.paper_bgcolor);var l,v=c(i.fullData,m.name,i.id),x=i.layoutOut;function b(e,t){return r(l+"."+e,t)}for(var _=0;_")}}t.exports={hoverPoints:function(e,t,n,a){var o=r(e,t,n,a);if(!(!o||!1===o[0].index)){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}}}),bZ=p({"src/traces/scattersmith/index.js"(e,t){t.exports={moduleType:"trace",name:"scattersmith",basePlotModule:bU(),categories:["smith","symbols","showLegend","scatter-like"],attributes:bV(),supplyDefaults:bq(),colorbar:ne(),formatLabels:bH(),calc:bG(),plot:bW(),style:nr().style,styleOnSelect:nr().styleOnSelect,hoverPoints:bY().hoverPoints,selectPoints:na(),meta:{}}}}),b$=p({"lib/scattersmith.js"(e,t){t.exports=bZ()}}),bX=p({"src/traces/quiver/attributes.js"(e,t){var r=Z(),i=eW().hovertemplateAttrs,n=tB().axisHoverFormat,a=q().extendFlat,o=tV(),s=eH().dash,l=ig(),c=ix();t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:c.x0,dx:c.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:c.y0,dy:c.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:n("x"),yhoverformat:n("y"),uhoverformat:n("u","noDate"),vhoverformat:n("v","noDate"),hoverinfo:a({},r.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:i({},{keys:["x","y","u","v","text","name"]}),text:c.text,textposition:c.textposition,textfont:c.textfont,marker:a({arrowsize:a({},l.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:s,editType:"style"},editType:"calc"},o("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"}}}}),bK=p({"src/traces/quiver/defaults.js"(e,t){var r=tv(),i=bX(),n=iN(),a=tj().hasColorscale,o=tQ();t.exports=function(e,t,s,l){function c(n,a){return r.coerce(e,t,i,n,a)}var u=n(e,t,l,c);if(!u){t.visible=!1;return}var h=c("u"),d=c("v");if(!r.isArrayOrTypedArray(h)||0===h.length){t.u=Array(u);for(var f=0;fE&&(E=u[R]),h[R]L&&(L=h[R]),FI&&(I=F),jD&&(D=j);var V=Math.sqrt(F*F+j*j);if(V>m&&(m=V),Vy&&(y=q))}}else B.x=a,B.y=a}if(t._maxNorm=m,"scaled"===T||"paper"===M){let e=E-S,r=L-C;t._scaleFactor=(0===e&&0===r?1:(e+r+Math.sqrt((e-r)*(e-r)+4*O*e*r))/(2*(O-1)))*.97/t._maxNorm}else t._scaleFactor=1;t._scaleFactor*=t.lengthfactor;let H=Array(d),G=Array(d),W=Array(d),Y=Array(d);for(var Z,$,X,R=0;Re.i&&isFinite(o[e.i]))a=o[e.i];else{var s=t.u&&t.u[e.i]||0,l=t.v&&t.v[e.i]||0;a=Math.sqrt(s*s+l*l)}return e.mcc=n(a),e.mcc})}function l(e,t,a){var l=t[0].trace,c=l.marker||{},u=c.line||{},h=i.isArrayOrTypedArray(c.color)?void 0:c.color,d=l._hasColorscale;if(a)if(l.selectedpoints){var f=(l.selected||{}).marker||{},p=(l.unselected||{}).marker||{},m=f.line||{},g=p.line||{};a.selectAll("path.js-line").each(function(e){var t=r.select(this),i=!e.selected,a=i?p.color:f.color,c=i?void 0!==g.width?g.width:u.width:void 0!==m.width?m.width:u.width;a?(n.lineGroupStyle(t,c,a,u.dash),t.style("stroke-opacity",1)):(n.lineGroupStyle(t,c,h,u.dash),d&&s(t,l),t.style("stroke-opacity",i?o:1))}),n.selectedTextStyle(a.selectAll("text"),l)}else{var y=a.selectAll("path.js-line");y.call(n.lineGroupStyle,u.width,h,u.dash),d&&s(y,l),y.style("stroke-opacity",1),n.textPointStyle(a.selectAll("text"),l,e)}}t.exports={style:function(e){r.select(e).selectAll("g.trace.quiver").each(function(t){l(e,t,r.select(this))})},styleOnSelect:function(e,t,r){l(e,t,r)},colorscaleStroke:s}}}),b1=p({"src/traces/quiver/plot.js"(e,t){var r=T(),i=tv(),n=t7(),a=b0().colorscaleStroke,o=Math.PI/12;function s(e,t,s,l,c,u,h){var d=l[0].trace,f=s.xaxis,p=s.yaxis;l[0][s.isRangePlot?"nodeRangePlot3":"node3"]=r.select(u);var m=r.select(u).selectAll("g.lines").data([l]);m.enter().append("g").classed("lines",!0),n.setClipUrl(m,s.layerClipId,e);var g=m.selectAll("path.js-line").data(l);g.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),g.exit().remove();let{anchor:y,maxNorm:v=0,arrowref:x}=d,b="paper"===x?d._scaleFactor*Math.sqrt(Math.abs(f._m*p._m)):d._scaleFactor,_=d.marker.arrowsize;g.each(function(e){let t=r.select(this);if(void 0===e.x||void 0===e.y)return void t.attr("d",null);let i=("paper"===x?e._u*Math.sign(f._m):r.round(f._m*e._u))*b,n=("paper"===x?e._v*Math.sign(p._m):r.round(p._m*e._v))*b,a=void 0!==(d._input.marker||{}).arrowsize;"tip"===y?(s=f.c2p(e.x)-i,c=p.c2p(e.y)-n,l=f.c2p(e.x),u=p.c2p(e.y)):"center"===y?(s=f.c2p(e.x)-i/2,c=p.c2p(e.y)-n/2,l=f.c2p(e.x)+i/2,u=p.c2p(e.y)+n/2):(s=f.c2p(e.x),c=p.c2p(e.y),l=f.c2p(e.x)+i,u=p.c2p(e.y)+n),e._px0=s,e._py0=c,e._px1=l,e._py1=u;var s,l,c,u,h=d.marker.line.width;a||(h=Math.max(h,1.5));let m=Math.min(5.8*_*h,.7*Math.sqrt((l-s)*(l-s)+(u-c)*(u-c))),g=Math.atan2(u-c,l-s),v=l-m*Math.cos(g-o),w=u-m*Math.sin(g-o),T=l-m*Math.cos(g+o),M=u-m*Math.sin(g+o),k="M"+s+","+c+"L"+l+","+u+"L"+v+","+w+"L"+l+","+u+"L"+T+","+M;t.attr("d",k)});var w=d.marker||{},T=w.line||{},M=i.isArrayOrTypedArray(w.color)?void 0:w.color;n.lineGroupStyle(g,T.width,M,T.dash),d._hasColorscale&&a(g,d);var k=r.select(u).selectAll("g.text").data([l]);k.enter().append("g").classed("text",!0),n.setClipUrl(k,s.layerClipId,e);var A=k.selectAll("g.textpoint").data(l);if(A.enter().append("g").classed("textpoint",!0).append("text"),A.exit().remove(),A.each(function(e){var t=r.select(this);n.translatePoint(e,t.select("text"),f,p)||t.remove()}),A.selectAll("text").call(n.textPointStyle,d,e).each(function(e){var t=f.c2p(e.x),i=p.c2p(e.y);r.select(this).selectAll("tspan.line").each(function(){r.select(this).attr({x:t,y:i})})}),h&&h.duration>0){var S=r.transition().duration(h.duration).ease(h.easing);g.transition(S).style("opacity",1)}}t.exports=function(e,t,i,n,a,o){var l,c,u=!a,h=!!a&&a.duration>0;((l=n.selectAll("g.trace").data(i,function(e){return e[0].trace.uid})).enter().append("g").attr("class",function(e){return"trace quiver trace"+e[0].trace.uid}).style("stroke-miterlimit",2),l.order(),h)?(o&&(c=o()),r.transition().duration(a.duration).ease(a.easing).each("end",function(){c&&c()}).each("interrupt",function(){c&&c()}).each(function(){n.selectAll("g.trace").each(function(r,n){s(e,n,t,r,i,this,a)})})):l.each(function(r,n){s(e,n,t,r,i,this,a)}),u&&l.exit().remove()}}}),b2=p({"src/traces/quiver/hover.js"(e,t){var r=tv(),i=rD(),n=ni();t.exports=function(e,t,a,o){var s=e.cd,l=s[0].trace,c=e.xa,u=e.ya,h=c.c2p(t),d=u.c2p(a);if(i.getClosest(s,function(e){return void 0===e._px0?1/0:function(e,t,r,i,n,a){let o=n-r,s=a-i,l=o*o+s*s;if(!l)return Math.sqrt((e-r)*(e-r)+(t-i)*(t-i));var c=((e-r)*o+(t-i)*s)/l;let u=r+(c=Math.max(0,Math.min(1,c)))*o,h=i+c*s;return Math.sqrt((e-u)*(e-u)+(t-h)*(t-h))}(h,d,e._px0,e._py0,e._px1,e._py1)},e),!1!==e.index){var f=s[e.index],p=c.c2p(f.x,!0),m=u.c2p(f.y,!0),g=Math.sqrt((h-p)*(h-p)+(d-m)*(d-m));e.index=f.i;var y=l.u?l.u[f.i]:0,v=l.v?l.v[f.i]:0;return r.extendFlat(e,{color:n(l,f),x0:p-3,x1:p+3,xLabelVal:f.x,y0:m-3,y1:m+3,yLabelVal:f.y,uLabelVal:y,vLabelVal:v,extraText:"u: "+y+", v: "+v,spikeDistance:g,hovertemplate:l.hovertemplate}),r.fillText(f,l,e),[e]}}}}),b3=p({"src/traces/quiver/format_labels.js"(e,t){var r=rn(),i=tv();t.exports=function(e,t,n){var a={},o={_fullLayout:n},s=r.getFromTrace(o,t,"x"),l=r.getFromTrace(o,t,"y"),c=e.x,u=e.y;a.xLabel=r.tickText(s,s.c2l(c),!0).text,a.yLabel=r.tickText(l,l.c2l(u),!0).text;var h=t.u?t.u[e.i]:0,d=t.v?t.v[e.i]:0,f=t.uhoverformat,p=t.vhoverformat;return a.uLabel=f?i.numberFormat(f)(h):String(h),a.vLabel=p?i.numberFormat(p)(d):String(d),a}}}),b5=p({"src/traces/quiver/event_data.js"(e,t){t.exports=function(e,t,r,i,n){return e.x=t.x,e.y=t.y,e.u=r.u?r.u[n]:void 0,e.v=r.v?r.v[n]:void 0,e}}}),b4=p({"src/traces/quiver/index.js"(e,t){t.exports={moduleType:"trace",name:"quiver",basePlotModule:np(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:bX(),supplyDefaults:bK(),calc:bJ(),crossTraceCalc:bQ(),plot:b1(),style:b0().style,styleOnSelect:b0().styleOnSelect,hoverPoints:b2(),formatLabels:b3(),eventData:b5(),selectPoints:na(),colorbar:ne(),animatable:!0,meta:{}}}}),b6=p({"lib/quiver.js"(e,t){t.exports=b4()}}),b8=p({"node_modules/world-calendars/dist/main.js"(e,t){var r=mR();function i(){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={}}function n(e,t,r,i){if(this._calendar=e,this._year=t,this._month=r,this._day=i,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function a(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}function o(){this.shortYearCutoff="+10"}function s(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}r(i.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,i,n){return(i=(null!=e&&e.year?e.calendar():"string"==typeof i?this.instance(i,n):i)||this.instance()).newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,t){return function(r){for(var i="",n=0;r>0;){var a=r%10;i=(0===a?"":e[a]+t[n])+i,n++,r=Math.floor(r/10)}return 0===i.indexOf(e[1]+t[1])&&(i=i.substr(1)),i||e[0]}}}),r(n.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e??this,t,r)},year:function(e){return 0==arguments.length?this._year:this.set(e,"y")},month:function(e){return 0==arguments.length?this._month:this.set(e,"m")},day:function(e){return 0==arguments.length?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,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(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(l.local.differentCalendars||l.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return 0===t?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(0>this.year()?"-":"")+a(Math.abs(this.year()),4)+"-"+a(this.month(),2)+"-"+a(this.day(),2)}}),r(o.prototype,{_validateLevel:0,newDate:function(e,t,r){return null==e?this.today():(e.year&&(this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new n(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return 0>this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear).year()?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return(0>t.year()?"-":"")+a(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var i=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var i=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,"d"===r||"w"===r){var i=e.toJD()+t*("w"===r?this.daysInWeek():1),n=e.calendar().fromJD(i);return this._validateLevel--,[n.year(),n.month(),n.day()]}try{var a=e.year()+("y"===r?t:0),o=e.monthOfYear()+("m"===r?t:0),n=e.day();"y"===r?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),n=Math.min(n,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(function(e){for(;ot-1+e.minMonth;)a++,o-=t,t=e.monthsInYear(a)}(this),n=Math.min(n,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),n];return this._validateLevel--,s}catch(e){throw this._validateLevel--,e}},_correctAdd:function(e,t,r,i){if(!this.hasYearZero&&("y"===i||"m"===i)&&(0===t[0]||e.year()>0!=t[0]>0)){var n={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i];t=this._add(e,r*n[0]+(r<0?-1:1)*n[1],n[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate);var i="y"===r?t:e.year(),n="m"===r?t:e.month(),a="d"===r?t:e.day();return("y"===r||"m"===r)&&(a=Math.min(a,this.daysInMonth(i,n))),e.date(i,n,a)},isValid:function(e,t,r){this._validateLevel++;var i=this.hasYearZero||0!==e;if(i){var n=this.newDate(e,t,this.minDay);i=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDayt.year());return e%4==0&&(e%100!=0||e%400==0)},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(4-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(e,t,r){var i=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);e=i.year(),t=i.month(),r=i.day(),e<0&&e++,t<3&&(t+=12,e--);var n=Math.floor(e/100);return Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r+(2-n+Math.floor(n/4))-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=Math.floor((t-1867216.25)/36524.25),i=(r=t+1+r-Math.floor(r/4))+1524,n=Math.floor((i-122.1)/365.25),a=Math.floor(365.25*n),o=Math.floor((i-a)/30.6001),s=i-a-Math.floor(30.6001*o),l=o-(o>13.5?13:1),c=n-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(e,t,r){var i=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),n=new Date(i.year(),i.month()-1,i.day());return n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.setHours(n.getHours()>12?n.getHours()+2:0),n},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var l=t.exports=new i;l.cdate=n,l.baseCalendar=o,l.calendars.gregorian=s}}),b9=p({"node_modules/world-calendars/dist/plus.js"(){var e=mR(),t=b8();e(t.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"}),t.local=t.regionalOptions[""],e(t.cdate.prototype,{formatDate:function(e,t){return"string"!=typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),e(t.baseCalendar.prototype,{UNIX_EPOCH:t.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:t.instance().jdEpoch,TICKS_PER_DAY:864e9,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(e,r,i){if("string"!=typeof e&&(i=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw t.local.invalidFormat||t.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,i=i||{};for(var n,a,o,s=i.dayNamesShort||this.local.dayNamesShort,l=i.dayNames||this.local.dayNames,c=i.monthNumbers||this.local.monthNumbers,u=i.monthNamesShort||this.local.monthNamesShort,h=i.monthNames||this.local.monthNames,d=(i.calculateWeek||this.local.calculateWeek,function(t,r){for(var i=1;v+i1}),f=function(e,t,r,i){var n=""+t;if(d(e,i))for(;n.length1},x=function(e,i){var n=v(e,i),a=RegExp("^-?\\d{1,"+[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(e)+1]+"}"),o=r.substring(T).match(a);if(!o)throw(t.local.missingNumberAt||t.regionalOptions[""].missingNumberAt).replace(/\{0\}/,T);return T+=o[0].length,parseInt(o[0],10)},b=this,_=function(e,i,n,a){for(var o=v(e,a)?n:i,s=0;s-1){f=1,p=m;for(var A=this.daysInMonth(d,f);p>A;A=this.daysInMonth(d,f))f++,p-=A}return h>-1?this.fromJD(h):this.newDate(d,f,p)},determineDate:function(e,t,r,i,n){r&&"object"!=typeof r&&(n=i,i=r,r=null),"string"!=typeof i&&(n=i,i="");var a=this;return t=t?t.newDate():null,e=null==e?t:"string"==typeof e?function(e){try{return a.parseDate(i,e,n)}catch{}e=e.toLowerCase();for(var t=(e.match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(e);s;)t.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(e);return t}(e):"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,"d"):a.newDate(e)}})}}),b7=p({"node_modules/world-calendars/dist/calendars/chinese.js"(){var e=b8(),t=mR(),r=e.instance();function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new e.baseCalendar,t(i.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if("string"==typeof e){var r=e.match(a);return r?r[0]:""}var i=this._validateYear(e),n=e.month(),o=""+this.toChineseMonth(i,n);return t&&o.length<2&&(o="0"+o),this.isIntercalaryMonth(i,n)&&(o+="i"),o},monthNames:function(e){if("string"==typeof e){var t=e.match(o);return t?t[0]:""}var r=this._validateYear(e),i=e.month(),n=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,i)-1];return this.isIntercalaryMonth(r,i)&&(n="闰"+n),n},monthNamesShort:function(e){if("string"==typeof e){var t=e.match(s);return t?t[0]:""}var r=this._validateYear(e),i=e.month(),n=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,i)-1];return this.isIntercalaryMonth(r,i)&&(n="闰"+n),n},parseMonth:function(e,t){e=this._validateYear(e);var r,i=parseInt(t);if(isNaN(i))"闰"===t[0]&&(r=!0,t=t.substring(1)),"月"===t[t.length-1]&&(t=t.substring(0,t.length-1)),i=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(t);else{var n=t[t.length-1];r="i"===n||"I"===n}return this.toMonthIndex(e,i,r)},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(e,t){if(e.year&&(e=e.year()),"number"!=typeof e||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(t,r,i){var n=this.intercalaryMonth(t);if(i&&r!==n||r<1||r>12)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?!i&&r<=n?r-1:r:r-1},toChineseMonth:function(t,r){t.year&&(r=(t=t.year()).month());var i=this.intercalaryMonth(t);if(r<0||r>(i?12:11))throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?r>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(t,i,n){var a,o=c[this._validateYear(t,e.local.invalidyear)-c[0]];return(a=r.newDate(o>>9&4095,o>>5&15,31&o)).add(4-(a.dayOfWeek()||7),"d"),1+Math.floor((this.toJD(t,i,n)-a.toJD())/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(t,r){t.year&&(r=t.month(),t=t.year());var i=l[(t=this._validateYear(t))-l[0]];if(r>(i>>13?12:11))throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return i&1<<12-r?30:29},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,i,n){var a=this._validate(t,s,n,e.local.invalidDate);t=this._validateYear(a.year()),i=a.month(),n=a.day();var o=this.isIntercalaryMonth(t,i),s=this.toChineseMonth(t,i),u=function(e,t,r,i){if("object"==typeof e)a=e,n=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw Error("Lunar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw Error("Lunar day outside range 1 - 30");"object"==typeof i?(o=!1,n=i):(o=!!i,n={}),a={year:e,month:t,day:r,isIntercalary:o}}var n,a,o,s,u=a.day-1,h=l[a.year-l[0]],d=h>>13;s=d&&(a.month>d||a.isIntercalary)?a.month:a.month-1;for(var f=0;f>9&4095,(p>>5&15)-1,(31&p)+u);return n.year=m.getFullYear(),n.month=1+m.getMonth(),n.day=m.getDate(),n}(t,s,n,o);return r.toJD(u.year,u.month,u.day)},fromJD:function(e){var t=r.fromJD(e),i=function(e,t,r){if("object"==typeof e)a=e,o=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw Error("Solar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},o={}}var i=c[a.year-c[0]],n=a.year<<9|a.month<<5|a.day;o.year=n>=i?a.year:a.year-1;var a,o,s,u=new Date((i=c[o.year-c[0]])>>9&4095,(i>>5&15)-1,31&i);s=Math.round((new Date(a.year,a.month-1,a.day)-u)/864e5);var h,d=l[o.year-l[0]];for(h=0;h<13;h++){var f=d&1<<12-h?30:29;if(s>13;return!p||hr.year());return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(13===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return(t=n.year())<0&&t++,n.day()+(n.month()-1)*30+(t-1)*365+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--;var i=Math.floor((t=Math.floor(e)+.5-this.newDate(r,1,1).toJD())/30)+1,n=t-(i-1)*30+1;return this.newDate(r,i,n)}}),e.calendars.coptic=r}}),_t=p({"node_modules/world-calendars/dist/calendars/discworld.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Discworld",jdEpoch:1721425.5,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(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),400},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/8)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,r,i){return(this._validate(t,r,i,e.local.invalidDate).day()+1)%8},weekDay:function(e,t,r){var i=this.dayOfWeek(e,t,r);return i>=2&&i<=6},extraInfo:function(t,r,n){return{century:i[Math.floor((this._validate(t,r,n,e.local.invalidDate).year()-1)/100)+1]||""}},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return t=n.year()+ +(0>n.year()),r=n.month(),(i=n.day())+16*(r>1)+(r>2?(r-2)*32:0)+(t-1)*400+this.jdEpoch-1},fromJD:function(e){var t=Math.floor((e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1)/400)+1;e-=(t-1)*400;var r=Math.floor((e+=16*(e>15))/32)+1,i=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,i)}});var i={20:"Fruitbat",21:"Anchovy"};e.calendars.discworld=r}}),_r=p({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Ethiopian",jdEpoch:1724220.5,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(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=r.year()+ +(0>r.year());return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(13===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return(t=n.year())<0&&t++,n.day()+(n.month()-1)*30+(t-1)*365+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--;var i=Math.floor((t=Math.floor(e)+.5-this.newDate(r,1,1).toJD())/30)+1,n=t-(i-1)*30+1;return this.newDate(r,i,n)}}),e.calendars.ethiopian=r}}),_i=p({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function i(e,t){return e-t*Math.floor(e/t)}r.prototype=new e.baseCalendar,t(r.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(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return 7>i(7*(e=e<0?e+1:e)+1,19)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,r){return t.year&&(r=t.month(),t=t.year()),this._validate(t,r,this.minDay,e.local.invalidMonth),12===r&&this.leapYear(t)||8===r&&5===i(this.daysInYear(t),10)?30:9===r&&3===i(this.daysInYear(t),10)?29:this.daysPerMonth[r-1]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},extraInfo:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);t=n.year(),r=n.month(),i=n.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+i+1;if(r<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(var s=1;si(3*(r+1),7)&&r++,r},_delay2:function(e){var t=this._delay1(e-1),r=this._delay1(e);return this._delay1(e+1)-r==356?2:+(r-t==382)},fromJD:function(e){e=Math.floor(e)+.5;for(var t=Math.floor((e-this.jdEpoch)*98496/0x224f0b7)-1;e>=this.toJD(-1===t?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var i=e-this.toJD(t,r,1)+1;return this.newDate(t,r,i)}}),e.calendars.hebrew=r}}),_n=p({"node_modules/world-calendars/dist/calendars/islamic.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Islamic",jdEpoch:1948439.5,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īs","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(t){return(11*this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(12===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return t=n.year(),r=n.month(),(i=n.day())+Math.ceil(29.5*(r-1))+((t=t<=0?t+1:t)-1)*354+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor((30*((e=Math.floor(e)+.5)-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),i=e-this.toJD(t,r,1)+1;return this.newDate(t,r,i)}}),e.calendars.islamic=r}}),_a=p({"node_modules/world-calendars/dist/calendars/julian.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Julian",jdEpoch:1721423.5,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(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=0>r.year()?r.year()+1:r.year();return t%4==0},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(4-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(2===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return t=n.year(),r=n.month(),i=n.day(),t<0&&t++,r<=2&&(t--,r+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(r+1))+i-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,r=Math.floor((t-122.1)/365.25),i=Math.floor(365.25*r),n=Math.floor((t-i)/30.6001),a=n-Math.floor(n<14?1:13),o=r-Math.floor(a>2?4716:4715),s=t-i-Math.floor(30.6001*n);return o<=0&&o--,this.newDate(o,a,s)}}),e.calendars.julian=r}}),_o=p({"node_modules/world-calendars/dist/calendars/mayan.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function i(e,t){return e-t*Math.floor(e/t)}r.prototype=new e.baseCalendar,t(r.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(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),!1},formatYear:function(t){var r=Math.floor((t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year())/400);return t%=400,r+"."+Math.floor((t+=400*(t<0))/20)+"."+t%20},forYear:function(e){if((e=e.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&i<0)throw"Invalid Mayan year";t=20*t+i}return t},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),18},weekOfYear:function(t,r,i){return this._validate(t,r,i,e.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),360},daysInMonth:function(t,r){return this._validate(t,r,this.minDay,e.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,r,i){return this._validate(t,r,i,e.local.invalidDate).day()},weekDay:function(t,r,i){return this._validate(t,r,i,e.local.invalidDate),!0},extraInfo:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate).toJD(),a=this._toHaab(n),o=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){var t=i((e-=this.jdEpoch)+8+340,365);return[Math.floor(t/20)+1,i(t,20)]},_toTzolkin:function(e){return[i((e-=this.jdEpoch)+20-1,20)+1,i(e+4-1,13)+1]},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return n.day()+20*n.month()+360*n.year()+this.jdEpoch},fromJD:function(e){var t=Math.floor((e=Math.floor(e)+.5-this.jdEpoch)/360);e%=360;var r=Math.floor((e+=360*(e<0))/20),i=e%20;return this.newDate(t,r,i)}}),e.calendars.mayan=r}}),_s=p({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar;var i=e.instance("gregorian");t(r.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,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(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear);return i.leapYear(r.year()+ +(1>r.year())+1469)},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(1-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(12===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidMonth),t=a.year();t<0&&t++;for(var o=a.day(),s=1;s=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,i=1;r>this.daysInMonth(t,i);)r-=this.daysInMonth(t,i),i++;return this.newDate(t,i,r)}}),e.calendars.nanakshahi=r}}),_l=p({"node_modules/world-calendars/dist/calendars/nepali.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Nepali",jdEpoch:1700709.5,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(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year(),typeof this.NEPALI_CALENDAR_DATA[t]>"u")return this.daysPerYear;for(var r=0,i=this.minMonth;i<=12;i++)r+=this.NEPALI_CALENDAR_DATA[t][i];return r},daysInMonth:function(t,r){return t.year&&(r=t.month(),t=t.year()),this._validate(t,r,this.minDay,e.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[t]>"u"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[t][r]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);t=n.year(),r=n.month(),i=n.day();var a=e.instance(),o=0,s=r,l=t;this._createMissingCalendarData(t);var c=t-(s>9||9===s&&i>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==r&&(o=i,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===r?(o+=i-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(t){var r=e.instance().fromJD(t),i=r.year(),n=r.dayOfYear(),a=i+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;n>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var c=this.NEPALI_CALENDAR_DATA[a][o]-(l-n);return this.newDate(a,o,c)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r"u"&&(this.NEPALI_CALENDAR_DATA[r]=t)},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=r}}),_c=p({"node_modules/world-calendars/dist/calendars/persian.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function i(e){var t=e-475;e<0&&t++;var r=.242197*t,i=.242197*(t+1);return r-Math.floor(r)>i-Math.floor(i)}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Persian",jdEpoch:1948320.5,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ārshanbeh","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(t){return i(this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year())},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-((i.dayOfWeek()+1)%7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(12===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidDate);t=a.year(),r=a.month(),n=a.day();var o=0;if(t>0)for(var s=1;s0?t-1:t)*365+o+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(475+((e=Math.floor(e)+.5)-this.toJD(475,1,1))/365.242197);t<=0&&t--,e>this.toJD(t,12,i(t)?30:29)&&0==++t&&t++;var r=e-this.toJD(t,1,1)+1,n=r<=186?Math.ceil(r/31):Math.ceil((r-6)/30),a=e-this.toJD(t,n,1)+1;return this.newDate(t,n,a)}}),e.calendars.persian=r,e.calendars.jalali=r}}),_u=p({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var e=b8(),t=mR(),r=e.instance();function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new e.baseCalendar,t(i.prototype,{name:"Taiwan",jdEpoch:2419402.5,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(t){var i=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(i.year());return r.leapYear(t)},weekOfYear:function(t,i,n){var a=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(a.year());return r.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(2===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,i,n){var a=this._validate(t,i,n,e.local.invalidDate),t=this._t2gYear(a.year());return r.toJD(t,a.month(),a.day())},fromJD:function(e){var t=r.fromJD(e),i=this._g2tYear(t.year());return this.newDate(i,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+ +(e>=-this.yearsOffset&&e<=-1)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset)}}),e.calendars.taiwan=i}}),_h=p({"node_modules/world-calendars/dist/calendars/thai.js"(){var e=b8(),t=mR(),r=e.instance();function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new e.baseCalendar,t(i.prototype,{name:"Thai",jdEpoch:1523098.5,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(t){var i=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(i.year());return r.leapYear(t)},weekOfYear:function(t,i,n){var a=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(a.year());return r.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(2===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,i,n){var a=this._validate(t,i,n,e.local.invalidDate),t=this._t2gYear(a.year());return r.toJD(t,a.month(),a.day())},fromJD:function(e){var t=r.fromJD(e),i=this._g2tYear(t.year());return this.newDate(i,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset)},_g2tYear:function(e){return e+this.yearsOffset+ +(e>=-this.yearsOffset&&e<=-1)}}),e.calendars.thai=i}}),_d=p({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.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āthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return 355===this.daysInYear(r.year())},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(t,r){for(var n=this._validate(t,r,this.minDay,e.local.invalidMonth),a=n.toJD()-24e5+.5,o=0,s=0;sa)return i[o]-i[o-1];o++}return 30},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidDate),o=12*(a.year()-1)+a.month()-15292;return a.day()+i[o-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var a=r+15292,o=Math.floor((a-1)/12),s=t-i[r-1]+1;return this.newDate(o+1,a-12*o,s)},isValid:function(t,r,i){var n=e.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(n=(t=null!=t.year?t.year:t)>=1276&&t<=1500),n},_validate:function(t,r,i,n){var a=e.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}}),e.calendars.ummalqura=r;var i=[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]}}),_f=p({"src/components/calendars/calendars.js"(e,t){t.exports=b8(),b9(),b7(),_e(),_t(),_r(),_i(),_n(),_a(),_o(),_s(),_l(),_c(),_u(),_h(),_d()}}),_p=p({"src/components/calendars/index.js"(e,t){var r=_f(),i=tv(),n=L(),a=n.EPOCHJD,o=n.ONEDAY,s={valType:"enumerated",values:i.sortObjectKeys(r.calendars),editType:"calc",dflt:"gregorian"},l=function(e,t,r,n){var a={};return a[r]=s,i.coerce(e,t,a,r,n)},c={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:"##",w:"##",c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}},u={};function h(e){var t=u[e];return t||(t=u[e]=r.instance(e))}function d(e){return i.extendFlat({},s,{description:e})}function f(e){return"Sets the calendar system to use with `"+e+"` date data."}var p={xcalendar:d(f("x"))},m=i.extendFlat({},p,{ycalendar:d(f("y"))}),g=i.extendFlat({},m,{zcalendar:d(f("z"))}),y=d("Sets the calendar system to use for `range` and `tick0` if this is a date axis. This does not set the calendar for interpreting data on this axis, that's specified in the trace or via the global `layout.calendar`");t.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:m,bar:m,box:m,heatmap:m,contour:m,histogram:m,histogram2d:m,histogram2dcontour:m,scatter3d:g,surface:g,mesh3d:g,scattergl:m,ohlc:p,candlestick:p},layout:{calendar:d("Sets the default calendar system to use for interpreting and displaying dates throughout the plot.")},subplots:{xaxis:{calendar:y},yaxis:{calendar:y},scene:{xaxis:{calendar:y},yaxis:{calendar:y},zaxis:{calendar:y}},polar:{radialaxis:{calendar:y}}}},layoutAttributes:s,handleDefaults:l,handleTraceDefaults:function(e,t,r,i){for(var n=0;n{i.preventDefault(),i.stopPropagation(),i.clipboardData.setData("text",e),t.removeEventListener("copy",r,!0)};t.addEventListener("copy",r,!0),document.execCommand("copy")},(q=$||($={})).boxSizing=function(e){let t=window.getComputedStyle(e),r=parseFloat(t.borderTopWidth)||0,i=parseFloat(t.borderLeftWidth)||0,n=parseFloat(t.borderRightWidth)||0,a=parseFloat(t.borderBottomWidth)||0,o=parseFloat(t.paddingTop)||0,s=parseFloat(t.paddingLeft)||0,l=parseFloat(t.paddingRight)||0,c=parseFloat(t.paddingBottom)||0;return{borderTop:r,borderLeft:i,borderRight:n,borderBottom:a,paddingTop:o,paddingLeft:s,paddingRight:l,paddingBottom:c,horizontalSum:i+s+l+n,verticalSum:r+o+c+a}},q.sizeLimits=function(e){let t=window.getComputedStyle(e),r=parseFloat(t.minWidth)||0,i=parseFloat(t.minHeight)||0,n=parseFloat(t.maxWidth)||1/0,a=parseFloat(t.maxHeight)||1/0;return n=Math.max(r,n),a=Math.max(i,a),{minWidth:r,minHeight:i,maxWidth:n,maxHeight:a}},q.hitTest=function(e,t,r){let i=e.getBoundingClientRect();return t>=i.left&&t=i.top&&r=r.bottom)){if(i.topr.bottom&&i.height>=r.height){e.scrollTop-=r.top-i.top;return}if(i.topr.height||i.bottom>r.bottom&&i.height0;){if(d(n)){t++;continue}if(d(a)||d(o)){r++;continue}if(d(l)){i++;continue}if(d(c)){r++;continue}if(d(s)){i++;continue}if(!d(u))return 0}return(t=Math.min(t,255))<<16|(r=Math.min(r,255))<<8|(i=Math.min(i,255))},n=/^#[^\s\+>~#\.\[:]+/,a=/^\.[^\s\+>~#\.\[:]+/,o=/^\[[^\]]+\]/,s=/^[^\s\+>~#\.\[:]+/,l=/^(::[^\s\+>~#\.\[:]+|:first-line|:first-letter|:before|:after)/,c=/^:[^\s\+>~#\.\[:]+/,u=/^[\s\+>~\*]+/,h=/:not\(([^\)]+)\)/g;var U=O(R()),V=class{constructor(){this._first=null,this._last=null,this._size=0}get isEmpty(){return 0===this._size}get size(){return this._size}get length(){return this._size}get first(){return this._first?this._first.value:void 0}get last(){return this._last?this._last.value:void 0}get firstNode(){return this._first}get lastNode(){return this._last}*[Symbol.iterator](){let e=this._first;for(;e;)yield e.value,e=e.next}*retro(){let e=this._last;for(;e;)yield e.value,e=e.prev}*nodes(){let e=this._first;for(;e;)yield e,e=e.next}*retroNodes(){let e=this._last;for(;e;)yield e,e=e.prev}assign(e){for(let t of(this.clear(),e))this.addLast(t)}push(e){this.addLast(e)}pop(){return this.removeLast()}shift(e){this.addFirst(e)}unshift(){return this.removeFirst()}addFirst(e){let t=new Q.LinkedListNode(this,e);return this._first?(t.next=this._first,this._first.prev=t,this._first=t):(this._first=t,this._last=t),this._size++,t}addLast(e){let t=new Q.LinkedListNode(this,e);return this._last?(t.prev=this._last,this._last.next=t):this._first=t,this._last=t,this._size++,t}insertBefore(e,t){if(!t||t===this._first)return this.addFirst(e);if(!(t instanceof Q.LinkedListNode)||t.list!==this)throw Error("Reference node is not owned by the list.");let r=new Q.LinkedListNode(this,e),i=t.prev;return r.next=t,r.prev=i,t.prev=r,i.next=r,this._size++,r}insertAfter(e,t){if(!t||t===this._last)return this.addLast(e);if(!(t instanceof Q.LinkedListNode)||t.list!==this)throw Error("Reference node is not owned by the list.");let r=new Q.LinkedListNode(this,e),i=t.next;return r.next=i,r.prev=t,t.next=r,i.prev=r,this._size++,r}removeFirst(){let e=this._first;if(e)return e===this._last?(this._first=null,this._last=null):(this._first=e.next,this._first.prev=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeLast(){let e=this._last;if(e)return e===this._first?(this._first=null,this._last=null):(this._last=e.prev,this._last.next=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeNode(e){if(!(e instanceof Q.LinkedListNode)||e.list!==this)throw Error("Node is not owned by the list.");e===this._first&&e===this._last?(this._first=null,this._last=null):e===this._first?(this._first=e.next,this._first.prev=null):e===this._last?(this._last=e.prev,this._last.next=null):(e.next.prev=e.prev,e.prev.next=e.next),e.list=null,e.next=null,e.prev=null,this._size--}clear(){let e=this._first;for(;e;){let t=e.next;e.list=null,e.prev=null,e.next=null,e=t}this._first=null,this._last=null,this._size=0}};(Y=V||(V={})).from=function(e){let t=new Y;return t.assign(e),t},(Q||(Q={})).LinkedListNode=class{constructor(e,t){this.list=null,this.next=null,this.prev=null,this.list=e,this.value=t}};var q,H,G,W,Y,Z,$,X,K,J,Q,ee,et=class{constructor(e){this.type=e}get isConflatable(){return!1}conflate(e){return!1}},er=class extends et{get isConflatable(){return!0}conflate(e){return!0}};!function(e){let t,r=null,i=(t=Promise.resolve(),e=>{let r=!1;return t.then(()=>!r&&e()),()=>{r=!0}});function n(e,t){let r=o.get(e);r&&0!==r.length?(0,U.every)((0,U.retro)(r),r=>!r||function(e,t,r){let i=!0;try{i="function"==typeof e?e(t,r):e.messageHook(t,r)}catch(e){l(e)}return i}(r,e,t))&&u(e,t):u(e,t)}e.sendMessage=n,e.postMessage=function(e,t){t.isConflatable&&(0,U.some)(a,r=>r.handler===e&&!!r.msg&&r.msg.type===t.type&&!!r.msg.isConflatable&&r.msg.conflate(t))||h(e,t)},e.installMessageHook=function(e,t){let r=o.get(e);r&&-1!==r.indexOf(t)||(r?r.push(t):o.set(e,[t]))},e.removeMessageHook=function(e,t){let r=o.get(e);if(!r)return;let i=r.indexOf(t);-1!==i&&(r[i]=null,f(r))},e.clearData=function(e){let t=o.get(e);for(let r of(t&&t.length>0&&(U.ArrayExt.fill(t,null),f(t)),a))r.handler===e&&(r.handler=null,r.msg=null)},e.flush=function(){c||null===r||(r(),r=null,c=!0,d(),c=!1)},e.getExceptionHandler=function(){return l},e.setExceptionHandler=function(e){let t=l;return l=e,t};let a=new V,o=new WeakMap,s=new Set,l=e=>{console.error(e)},c=!1;function u(e,t){try{e.processMessage(t)}catch(e){l(e)}}function h(e,t){a.addLast({handler:e,msg:t}),null===r&&(r=i(d))}function d(){if(r=null,a.isEmpty)return;let e={handler:null,msg:null};for(a.addLast(e);;){let t=a.removeFirst();if(t===e)return;t.handler&&t.msg&&n(t.handler,t.msg)}}function f(e){0===s.size&&i(p),s.add(e)}function p(){s.forEach(m),s.clear()}function m(e){U.ArrayExt.removeAllWhere(e,g)}function g(e){return null===e}}(ee||(ee={}));var ei=class{constructor(e){this._pid=e_.nextPID(),this.name=e.name,this._create=e.create,this._coerce=e.coerce||null,this._compare=e.compare||null,this._changed=e.changed||null}get(e){let t=e_.ensureMap(e);return this._pid in t?t[this._pid]:t[this._pid]=this._createValue(e)}set(e,t){let r,i=e_.ensureMap(e);r=this._pid in i?i[this._pid]:i[this._pid]=this._createValue(e);let n=this._coerceValue(e,t);this._maybeNotify(e,r,i[this._pid]=n)}coerce(e){let t,r=e_.ensureMap(e);t=this._pid in r?r[this._pid]:r[this._pid]=this._createValue(e);let i=this._coerceValue(e,t);this._maybeNotify(e,t,r[this._pid]=i)}_createValue(e){return(0,this._create)(e)}_coerceValue(e,t){let r=this._coerce;return r?r(e,t):t}_compareValue(e,t){let r=this._compare;return r?r(e,t):e===t}_maybeNotify(e,t,r){let i=this._changed;i&&!this._compareValue(t,r)&&i(e,t,r)}};(ei||(ei={})).clearData=function(e){e_.ownerData.delete(e)},(eg=e_||(e_={})).ownerData=new WeakMap,d=0,eg.nextPID=()=>`pid-${`${Math.random()}`.slice(2)}-${d++}`,eg.ensureMap=function(e){let t=eg.ownerData.get(e);return t||(t=Object.create(null),eg.ownerData.set(e,t),t)};var en=O(R()),ea=(O(F()),class{constructor(e){this.sender=e}connect(e,t){return ew.connect(this,e,t)}disconnect(e,t){return ew.disconnect(this,e,t)}emit(e){ew.emit(this,e)}});(ey=ea||(ea={})).disconnectBetween=function(e,t){ew.disconnectBetween(e,t)},ey.disconnectSender=function(e){ew.disconnectSender(e)},ey.disconnectReceiver=function(e){ew.disconnectReceiver(e)},ey.disconnectAll=function(e){ew.disconnectAll(e)},ey.clearData=function(e){ew.disconnectAll(e)},ey.getExceptionHandler=function(){return ew.exceptionHandler},ey.setExceptionHandler=function(e){let t=ew.exceptionHandler;return ew.exceptionHandler=e,t},function(e){function t(e){let t=i.get(e);if(!(!t||0===t.length)){for(let e of t){if(!e.signal)continue;let t=e.thisArg||e.slot;e.signal=null,l(n.get(t))}l(t)}}function r(e){let t=n.get(e);if(!(!t||0===t.length)){for(let e of t){if(!e.signal)continue;let t=e.signal.sender;e.signal=null,l(i.get(t))}l(t)}}e.exceptionHandler=e=>{console.error(e)},e.connect=function(e,t,r){r=r||void 0;let a=i.get(e.sender);if(a||(a=[],i.set(e.sender,a)),s(a,e,t,r))return!1;let o=r||t,l=n.get(o);l||(l=[],n.set(o,l));let c={signal:e,slot:t,thisArg:r};return a.push(c),l.push(c),!0},e.disconnect=function(e,t,r){r=r||void 0;let a=i.get(e.sender);if(!a||0===a.length)return!1;let o=s(a,e,t,r);if(!o)return!1;let c=r||t,u=n.get(c);return o.signal=null,l(a),l(u),!0},e.disconnectBetween=function(e,t){let r=i.get(e);if(!r||0===r.length)return;let a=n.get(t);if(!(!a||0===a.length)){for(let t of a)t.signal&&t.signal.sender===e&&(t.signal=null);l(r),l(a)}},e.disconnectSender=t,e.disconnectReceiver=r,e.disconnectAll=function(e){t(e),r(e)},e.emit=function(t,r){let n=i.get(t.sender);if(!(!n||0===n.length))for(let i=0,a=n.length;ie.signal===t&&e.slot===r&&e.thisArg===i)}function l(e){0===a.size&&o(c),a.add(e)}function c(){a.forEach(u),a.clear()}function u(e){en.ArrayExt.removeAllWhere(e,h)}function h(e){return null===e.signal}}(ew||(ew={}));var eo=class{constructor(e){this._fn=e}get isDisposed(){return!this._fn}dispose(){if(!this._fn)return;let e=this._fn;this._fn=null,e()}},es=class{constructor(){this._isDisposed=!1,this._items=new Set}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._items.forEach(e=>{e.dispose()}),this._items.clear())}contains(e){return this._items.has(e)}add(e){this._items.add(e)}remove(e){this._items.delete(e)}clear(){this._items.clear()}};(ev=es||(es={})).from=function(e){let t=new ev;for(let r of e)t.add(r);return t};var el=class extends es{constructor(){super(...arguments),this._disposed=new ea(this)}get disposed(){return this._disposed}dispose(){this.isDisposed||(super.dispose(),this._disposed.emit(void 0),ea.clearData(this))}};(ex=el||(el={})).from=function(e){let t=new ex;for(let r of e)t.add(r);return t};var ec=class e{constructor(e){this._onScrollFrame=()=>{if(!this._scrollTarget)return;let{element:e,edge:t,distance:r}=this._scrollTarget,i=Math.max(1,Math.round(Math.pow((eT.SCROLL_EDGE_SIZE-r)/eT.SCROLL_EDGE_SIZE,2)*eT.SCROLL_EDGE_SIZE));switch(t){case"top":e.scrollTop-=i;break;case"left":e.scrollLeft-=i;break;case"right":e.scrollLeft+=i;break;case"bottom":e.scrollTop+=i}requestAnimationFrame(this._onScrollFrame)},this._disposed=!1,this._dropAction="none",this._override=null,this._currentTarget=null,this._currentElement=null,this._promise=null,this._scrollTarget=null,this._resolve=null,this.document=e.document||document,this.mimeData=e.mimeData,this.dragImage=e.dragImage||null,this.proposedAction=e.proposedAction||"copy",this.supportedActions=e.supportedActions||"all",this.source=e.source||null}dispose(){if(!this._disposed){if(this._disposed=!0,this._currentTarget){let e=new PointerEvent("pointerup",{bubbles:!0,cancelable:!0,clientX:-1,clientY:-1});eT.dispatchDragLeave(this,this._currentTarget,null,e)}this._finalize("none")}}get isDisposed(){return this._disposed}start(e,t){if(this._disposed)return Promise.resolve("none");if(this._promise)return this._promise;this._addListeners(),this._attachDragImage(e,t),this._promise=new Promise(e=>{this._resolve=e});let r=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:e,clientY:t});return document.dispatchEvent(r),this._promise}handleEvent(e){switch(e.type){case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;default:e.preventDefault(),e.stopPropagation()}}moveDragImage(e,t){this.dragImage&&(this.dragImage.style.transform=`translate(${e}px, ${t}px)`)}_evtPointerMove(e){e.preventDefault(),e.stopPropagation(),this._updateCurrentTarget(e),this._updateDragScroll(e),this.moveDragImage(e.clientX,e.clientY)}_evtPointerUp(e){if(e.preventDefault(),e.stopPropagation(),0!==e.button)return;if(this._updateCurrentTarget(e),!this._currentTarget)return void this._finalize("none");if("none"===this._dropAction){eT.dispatchDragLeave(this,this._currentTarget,null,e),this._finalize("none");return}let t=eT.dispatchDrop(this,this._currentTarget,e);this._finalize(t)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&this.dispose()}_addListeners(){document.addEventListener("pointerdown",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("pointerup",this,!0),document.addEventListener("pointerenter",this,!0),document.addEventListener("pointerleave",this,!0),document.addEventListener("pointerover",this,!0),document.addEventListener("pointerout",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("keyup",this,!0),document.addEventListener("keypress",this,!0),document.addEventListener("contextmenu",this,!0)}_removeListeners(){document.removeEventListener("pointerdown",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointerenter",this,!0),document.removeEventListener("pointerleave",this,!0),document.removeEventListener("pointerover",this,!0),document.removeEventListener("pointerout",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("keyup",this,!0),document.removeEventListener("keypress",this,!0),document.removeEventListener("contextmenu",this,!0)}_updateDragScroll(e){let t=eT.findScrollTarget(e);(this._scrollTarget||t)&&(this._scrollTarget||setTimeout(this._onScrollFrame,500),this._scrollTarget=t)}_updateCurrentTarget(e){let t=this._currentTarget,r=this._currentTarget,i=this._currentElement,n=eT.findElementBehindBackdrop(e,this.document);this._currentElement=n,n!==i&&n!==r&&eT.dispatchDragExit(this,r,n,e),n!==i&&n!==r&&(r=eT.dispatchDragEnter(this,n,r,e)),r!==t&&(this._currentTarget=r,eT.dispatchDragLeave(this,t,r,e));let a=eT.dispatchDragOver(this,r,e);this._setDropAction(a)}_attachDragImage(e,t){if(!this.dragImage)return;this.dragImage.classList.add("lm-mod-drag-image");let r=this.dragImage.style;r.pointerEvents="none",r.position="fixed",r.transform=`translate(${e}px, ${t}px)`,(this.document instanceof Document?this.document.body:this.document.firstElementChild).appendChild(this.dragImage)}_detachDragImage(){if(!this.dragImage)return;let e=this.dragImage.parentNode;e&&e.removeChild(this.dragImage)}_setDropAction(t){if(t=eT.validateAction(t,this.supportedActions),!(this._override&&this._dropAction===t))switch(t){case"none":this._dropAction=t,this._override=e.overrideCursor("no-drop",this.document);break;case"copy":this._dropAction=t,this._override=e.overrideCursor("copy",this.document);break;case"link":this._dropAction=t,this._override=e.overrideCursor("alias",this.document);break;case"move":this._dropAction=t,this._override=e.overrideCursor("move",this.document)}}_finalize(e){let t=this._resolve;this._removeListeners(),this._detachDragImage(),this._override&&(this._override.dispose(),this._override=null),this.mimeData.clear(),this._disposed=!0,this._dropAction="none",this._currentTarget=null,this._currentElement=null,this._scrollTarget=null,this._promise=null,this._resolve=null,t&&t(e)}},eu=ec||(ec={});class eh extends DragEvent{constructor(e,t){super(t.type,{bubbles:!0,cancelable:!0,altKey:e.altKey,button:e.button,clientX:e.clientX,clientY:e.clientY,ctrlKey:e.ctrlKey,detail:0,metaKey:e.metaKey,relatedTarget:t.related,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey,view:window});let{drag:r}=t;this.dropAction="none",this.mimeData=r.mimeData,this.proposedAction=r.proposedAction,this.supportedActions=r.supportedActions,this.source=r.source}}eu.Event=eh,eu.overrideCursor=function(e,t=document){return eT.overrideCursor(e,t)},function(e){let t;function r(t,a=document){if(t){if(i&&t==i.event)return i.element;e.cursorBackdrop.style.zIndex="-1000";let r=a.elementFromPoint(t.clientX,t.clientY);return e.cursorBackdrop.style.zIndex="",i={event:t,element:r},r}{let t=e.cursorBackdrop.style.transform;if(n&&t===n.transform)return n.element;let r=e.cursorBackdrop.getBoundingClientRect();e.cursorBackdrop.style.zIndex="-1000";let i=a.elementFromPoint(r.left+r.width/2,r.top+r.height/2);return e.cursorBackdrop.style.zIndex="",n={transform:t,element:i},i}}e.SCROLL_EDGE_SIZE=20,e.validateAction=function(e,t){return a[e]&o[t]?e:"none"},e.findElementBehindBackdrop=r;let i=null,n=null;e.findScrollTarget=function(t){let i=t.clientX,n=t.clientY,a=r(t);for(;a;a=a.parentElement){let t;if(!a.hasAttribute("data-lm-dragscroll"))continue;let r=0,o=0;a===document.body&&(r=window.pageXOffset,o=window.pageYOffset);let s=a.getBoundingClientRect(),l=s.top+o,c=s.left+r,u=c+s.width,h=l+s.height;if(i=u||n=h)continue;let d=i-c+1,f=n-l+1,p=u-i,m=h-n,g=Math.min(d,f,p,m);if(g>e.SCROLL_EDGE_SIZE)continue;switch(g){case m:t="bottom";break;case f:t="top";break;case p:t="right";break;case d:t="left";break;default:throw"unreachable"}let y=a.scrollWidth-a.clientWidth,v=a.scrollHeight-a.clientHeight,x;switch(t){case"top":x=v>0&&a.scrollTop>0;break;case"left":x=y>0&&a.scrollLeft>0;break;case"right":x=y>0&&a.scrollLeft0&&a.scrollTop{i===h&&e.cursorBackdrop.isConnected&&(document.removeEventListener("pointermove",s,!0),e.cursorBackdrop.removeEventListener("scroll",l,!0),n.removeChild(e.cursorBackdrop))})};let u=500,h=0;(t=document.createElement("div")).classList.add("lm-cursor-backdrop"),e.cursorBackdrop=t}(eT||(eT={}));var ed=O(R()),ef=O(F());function ep(){return eM.keyboardLayout}var em=class e{constructor(t,r,i=[]){this.name=t,this._codes=r,this._keys=e.extractKeys(r),this._modifierKeys=e.convertToKeySet(i)}keys(){return Object.keys(this._keys)}isValidKey(e){return e in this._keys}isModifierKey(e){return e in this._modifierKeys}keyForKeydownEvent(e){return this._codes[e.keyCode]||""}};(eb=em||(em={})).extractKeys=function(e){let t=Object.create(null);for(let r in e)t[e[r]]=!0;return t},eb.convertToKeySet=function(e){let t=Object(null);for(let r=0,i=e.length;r{this._commands.delete(e),this._commandChanged.emit({id:e,type:"removed"})})}notifyCommandChanged(e){if(void 0!==e&&!this._commands.has(e))throw Error(`Command '${e}' is not registered.`);this._commandChanged.emit({id:e,type:e?"changed":"many-changed"})}describedBy(e,t=ef.JSONExt.emptyObject){var r;let i=this._commands.get(e);return Promise.resolve(null!=(r=i?.describedBy.call(void 0,t))?r:{args:null})}label(e,t=ef.JSONExt.emptyObject){var r;let i=this._commands.get(e);return null!=(r=i?.label.call(void 0,t))?r:""}mnemonic(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.mnemonic.call(void 0,t):-1}icon(e,t=ef.JSONExt.emptyObject){var r;return null==(r=this._commands.get(e))?void 0:r.icon.call(void 0,t)}iconClass(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.iconClass.call(void 0,t):""}iconLabel(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.iconLabel.call(void 0,t):""}caption(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.caption.call(void 0,t):""}usage(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.usage.call(void 0,t):""}className(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.className.call(void 0,t):""}dataset(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.dataset.call(void 0,t):{}}isEnabled(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isEnabled.call(void 0,t)}isToggled(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isToggled.call(void 0,t)}isToggleable(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isToggleable}isVisible(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isVisible.call(void 0,t)}execute(e,t=ef.JSONExt.emptyObject){let r,i=this._commands.get(e);if(!i)return Promise.reject(Error(`Command '${e}' not registered.`));try{r=i.execute.call(void 0,t)}catch(e){r=Promise.reject(e)}let n=Promise.resolve(r);return this._commandExecuted.emit({id:e,args:t,result:n}),n}addKeyBinding(e){let t=eB.createKeyBinding(e);return this._keyBindings.push(t),this._keyBindingChanged.emit({binding:t,type:"added"}),new eo(()=>{ed.ArrayExt.removeFirstOf(this._keyBindings,t),this._keyBindingChanged.emit({binding:t,type:"removed"})})}processKeydownEvent(t){if(t.defaultPrevented||this._replaying)return;let r=e.keystrokeForKeydownEvent(t);if(!r){this._replayKeydownEvents(),this._clearPendingState();return}if(e.isModifierKeyPressed(t)){let{exact:e}=eB.matchKeyBinding(this._keyBindings,[r],t);e?(t.preventDefault(),t.stopPropagation(),this._startModifierTimer(e)):this._clearModifierTimer();return}this._keystrokes.push(r);let{exact:i,partial:n}=eB.matchKeyBinding(this._keyBindings,this._keystrokes,t),a=0!==n.length;if(!i&&!a){this._replayKeydownEvents(),this._clearPendingState();return}if((i?.preventDefault||n.some(e=>e.preventDefault))&&(t.preventDefault(),t.stopPropagation()),this._keydownEvents.push(t),i&&!a){this._executeKeyBinding(i),this._clearPendingState();return}i&&(this._exactKeyMatch=i),this._startTimer()}holdKeyBindingExecution(e,t){this._holdKeyBindingPromises.set(e,t)}processKeyupEvent(e){this._clearModifierTimer()}_startModifierTimer(e){this._clearModifierTimer(),this._timerModifierID=window.setTimeout(()=>{this._executeKeyBinding(e)},eB.modifierkeyTimeOut)}_clearModifierTimer(){0!==this._timerModifierID&&(clearTimeout(this._timerModifierID),this._timerModifierID=0)}_startTimer(){this._clearTimer(),this._timerID=window.setTimeout(()=>{this._onPendingTimeout()},eB.CHORD_TIMEOUT)}_clearTimer(){0!==this._timerID&&(clearTimeout(this._timerID),this._timerID=0)}_replayKeydownEvents(){0!==this._keydownEvents.length&&(this._replaying=!0,this._keydownEvents.forEach(eB.replayKeyEvent),this._replaying=!1)}async _executeKeyBinding(e){if(0!==this._holdKeyBindingPromises.size){let e=[...this._keydownEvents],t=(await Promise.race([Promise.all(e.map(async e=>{var t;return null!=(t=this._holdKeyBindingPromises.get(e))?t:Promise.resolve(!0)})),new Promise(e=>{setTimeout(()=>e([!1]),eB.KEYBINDING_HOLD_TIMEOUT)})])).every(Boolean);if(this._holdKeyBindingPromises.clear(),!t)return}let{command:t,args:r}=e,i={_luminoEvent:{type:"keybinding",keys:e.keys},...r};if(!this.hasCommand(t)||!this.isEnabled(t,i)){let r=this.hasCommand(t)?"enabled":"registered",i=`Cannot execute key binding '${e.keys.join(", ")}':`,n=`command '${t}' is not ${r}.`;console.warn(`${i} ${n}`);return}await this.execute(t,i)}_clearPendingState(){this._clearTimer(),this._clearModifierTimer(),this._exactKeyMatch=null,this._keystrokes.length=0,this._keydownEvents.length=0}_onPendingTimeout(){this._timerID=0,this._exactKeyMatch?this._executeKeyBinding(this._exactKeyMatch):this._replayKeydownEvents(),this._clearPendingState()}},eS=eA||(eA={});function eE(e){let t="",r=!1,i=!1,n=!1,a=!1;for(let o of e.split(/\s+/))"Accel"===o?X.IS_MAC?i=!0:n=!0:"Alt"===o?r=!0:"Cmd"===o?i=!0:"Ctrl"===o?n=!0:"Shift"===o?a=!0:o.length>0&&(t=o);return{cmd:i,ctrl:n,alt:r,shift:a,key:t}}function eC(e){let t="",r=eE(e);return r.ctrl&&(t+="Ctrl "),r.alt&&(t+="Alt "),r.shift&&(t+="Shift "),r.cmd&&X.IS_MAC&&(t+="Cmd "),r.key?t+r.key:t.trim()}eS.parseKeystroke=eE,eS.normalizeKeystroke=eC,eS.normalizeKeys=function(e){return(X.IS_WIN?e.winKeys||e.keys:X.IS_MAC?e.macKeys||e.keys:e.linuxKeys||e.keys).map(eC)},eS.formatKeystroke=function(e){return"string"==typeof e?t(e):e.map(t).join(", ");function t(e){let t=[],r=X.IS_MAC?" ":"+",i=eE(e);return i.ctrl&&t.push("Ctrl"),i.alt&&t.push("Alt"),i.shift&&t.push("Shift"),X.IS_MAC&&i.cmd&&t.push("Cmd"),t.push(i.key),t.map(eB.formatKey).join(r)}},eS.isModifierKeyPressed=function(e){let t=ep(),r=t.keyForKeydownEvent(e);return t.isModifierKey(r)},eS.keystrokeForKeydownEvent=function(e){let t=ep(),r=t.keyForKeydownEvent(e),i=[];return e.ctrlKey&&i.push("Ctrl"),e.altKey&&i.push("Alt"),e.shiftKey&&i.push("Shift"),e.metaKey&&X.IS_MAC&&i.push("Cmd"),t.isModifierKey(r)||i.push(r),i.join(" ")},function(e){e.CHORD_TIMEOUT=1e3,e.KEYBINDING_HOLD_TIMEOUT=1e3,e.modifierkeyTimeOut=500,e.createCommand=function(e){return{execute:e.execute,describedBy:c("function"==typeof e.describedBy?e.describedBy:{args:null,...e.describedBy},()=>({args:null})),label:c(e.label,i),mnemonic:c(e.mnemonic,n),icon:c(e.icon,l),iconClass:c(e.iconClass,i),iconLabel:c(e.iconLabel,i),caption:c(e.caption,i),usage:c(e.usage,i),className:c(e.className,i),dataset:c(e.dataset,s),isEnabled:e.isEnabled||a,isToggled:e.isToggled||o,isToggleable:e.isToggleable||!!e.isToggled,isVisible:e.isVisible||a}},e.createKeyBinding=function(e){var t;return{keys:eA.normalizeKeys(e),selector:function(e){if(-1!==e.selector.indexOf(","))throw Error(`Selector cannot contain commas: ${e.selector}`);if(!K.isValid(e.selector))throw Error(`Invalid selector: ${e.selector}`);return e.selector}(e),command:e.command,args:e.args||ef.JSONExt.emptyObject,preventDefault:null==(t=e.preventDefault)||t}},e.matchKeyBinding=function(e,t,r){let i=null,n=[],a=1/0,o=0;for(let s=0,l=e.length;st.length?2:1}(l.keys,t);if(0===c)continue;if(2===c){-1!==u(l.selector,r)&&n.push(l);continue}let h=u(l.selector,r);if(-1===h||h>a)continue;let d=K.calculateSpecificity(l.selector);(!i||h=o)&&(i=l,a=h,o=d)}return{exact:i,partial:n}},e.replayKeyEvent=function(e){var t;let r,i,n;e.target.dispatchEvent((t=e,r=document.createEvent("Event"),i=t.bubbles||!0,n=t.cancelable||!0,r.initEvent(t.type||"keydown",i,n),r.key=t.key||"",r.keyCode=t.keyCode||0,r.which=t.keyCode||0,r.ctrlKey=t.ctrlKey||!1,r.altKey=t.altKey||!1,r.shiftKey=t.shiftKey||!1,r.metaKey=t.metaKey||!1,r.view=t.view||window,r))},e.formatKey=function(e){return X.IS_MAC?t.hasOwnProperty(e)?t[e]:e:r.hasOwnProperty(e)?r[e]:e};let t={Backspace:"⌫",Tab:"⇥",Enter:"⏎",Shift:"⇧",Ctrl:"⌃",Alt:"⌥",Escape:"⎋",PageUp:"⇞",PageDown:"⇟",End:"↘",Home:"↖",ArrowLeft:"←",ArrowUp:"↑",ArrowRight:"→",ArrowDown:"↓",Delete:"⌦",Cmd:"⌘"},r={Escape:"Esc",PageUp:"Page Up",PageDown:"Page Down",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},i=()=>"",n=()=>-1,a=()=>!0,o=()=>!1,s=()=>({}),l=()=>{};function c(e,t){return void 0===e?t:"function"==typeof e?e:()=>e}function u(e,t){let r=t.target,i=t.currentTarget;for(let t=0;null!==r&&!r.hasAttribute("data-lm-suppress-shortcuts");r=r.parentElement,++t){if(K.matches(r,e))return t;if(r===i)break}return -1}}(eB||(eB={}));var eL=O(R()),eP=class{constructor(e){this.type="text",this.content=e}},eI=class{constructor(e,t,r,i){this.type="element",this.tag=e,this.attrs=t,this.children=r,this.renderer=i}};function ez(e){let t={},r,i=[];for(let e=1,n=arguments.length;e=a.length){eO(i[r],t);continue}let s=a[r],l=i[r];if(s===l){o=o.nextSibling;continue}if("text"===s.type&&"text"===l.type){o.textContent!==l.content&&(o.textContent=l.content),o=o.nextSibling;continue}if("text"===s.type||"text"===l.type||!s.renderer!=!l.renderer){eL.ArrayExt.insert(a,r,l),eO(l,t,o);continue}let c=l.attrs.key;if(c&&c in n){let e=n[c];e.vNode!==s&&(eL.ArrayExt.move(a,a.indexOf(e.vNode,r+1),r),t.insertBefore(e.element,o),s=e.vNode,o=e.element)}if(s===l){o=o.nextSibling;continue}let u=s.attrs.key;if(u&&u!==c||s.tag!==l.tag){eL.ArrayExt.insert(a,r,l),eO(l,t,o);continue}(function(e,t,r){let i;if(t!==r){for(i in t)i in eR||i in r||("on"===i.substr(0,2)?e[i]=null:e.removeAttribute(i));for(i in r)i in eR||t[i]===r[i]||("on"===i.substr(0,2)?e[i]=r[i]:e.setAttribute(i,r[i]));t.className!==r.className&&(void 0!==r.className?e.setAttribute("class",r.className):e.removeAttribute("class")),t.htmlFor!==r.htmlFor&&(void 0!==r.htmlFor?e.setAttribute("for",r.htmlFor):e.removeAttribute("for")),t.dataset!==r.dataset&&function(e,t,r){for(let i in t)i in r||e.removeAttribute(`data-${i}`);for(let i in r)t[i]!==r[i]&&e.setAttribute(`data-${i}`,r[i])}(e,t.dataset||{},r.dataset||{}),t.style!==r.style&&function(e,t,r){let i=e.style,n;for(n in t)n in r||(i[n]="");for(n in r)t[n]!==r[n]&&(i[n]=r[n])}(e,t.style||{},r.style||{})}})(o,s.attrs,l.attrs),l.renderer?l.renderer.render(o,{attrs:l.attrs,children:l.children}):e(o,s.children,l.children),o=o.nextSibling}!function e(t,r,i,n){for(let a=r.length-1;a>=i;--a){let i=r[a],o=n?t.lastChild:t.childNodes[a];"text"===i.type||(i.renderer&&i.renderer.unrender?i.renderer.unrender(o,{attrs:i.attrs,children:i.children}):e(o,i.children,0,!1)),n&&t.removeChild(o)}}(t,a,s,!0)};let eR={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};var eF,ej,eB,eN,eU,eV,eq=class{constructor(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1}};(eY=eV||(eV={})).calc=function(e,t){let r=e.length;if(0===r)return t;let i=0,n=0,a=0,o=0,s=0;for(let t=0;t0&&(o+=r.stretch,s++)}if(t===a)return 0;if(t<=i){for(let t=0;t=n){for(let t=0;t0&&i>.01;){let t=i,n=o;for(let a=0;a0&&i>.01;){let t=i/l;for(let n=0;n0&&i>.01;){let t=i,n=o;for(let a=0;a=r.maxSize?(i-=r.maxSize-r.size,o-=r.stretch,r.size=r.maxSize,r.done=!0,l--,s--):(i-=c,r.size+=c)}}for(;l>0&&i>.01;){let t=i/l;for(let n=0;n=r.maxSize?(i-=r.maxSize-r.size,r.size=r.maxSize,r.done=!0,l--):(i-=t,r.size+=t))}}}return 0},eY.adjust=function(e,t,r){0===e.length||0===r||(r>0?function(e,t,r){let i=0;for(let r=0;r<=t;++r){let t=e[r];i+=t.maxSize-t.size}let n=0;for(let r=t+1,i=e.length;r=0&&a>0;--r){let t=e[r],i=t.maxSize-t.size;i>=a?(t.sizeHint=t.size+a,a=0):(t.sizeHint=t.size+i,a-=i)}let o=r;for(let r=t+1,i=e.length;r0;++r){let t=e[r],i=t.size-t.minSize;i>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-i,o-=i)}}(e,t,r):function(e,t,r){let i=0;for(let r=t+1,n=e.length;r0;++r){let t=e[r],i=t.maxSize-t.size;i>=a?(t.sizeHint=t.size+a,a=0):(t.sizeHint=t.size+i,a-=i)}let o=r;for(let r=t;r>=0&&o>0;--r){let t=e[r],i=t.size-t.minSize;i>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-i,o-=i)}}(e,t,-r))};var eH=class{constructor(e){this._label="",this._caption="",this._mnemonic=-1,this._icon=void 0,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new ea(this),this._isDisposed=!1,this.owner=e.owner,void 0!==e.label&&(this._label=e.label),void 0!==e.mnemonic&&(this._mnemonic=e.mnemonic),void 0!==e.icon&&(this._icon=e.icon),void 0!==e.iconClass&&(this._iconClass=e.iconClass),void 0!==e.iconLabel&&(this._iconLabel=e.iconLabel),void 0!==e.caption&&(this._caption=e.caption),void 0!==e.className&&(this._className=e.className),void 0!==e.closable&&(this._closable=e.closable),this._dataset=e.dataset||{}}get changed(){return this._changed}get label(){return this._label}set label(e){this._label!==e&&(this._label=e,this._changed.emit(void 0))}get mnemonic(){return this._mnemonic}set mnemonic(e){this._mnemonic!==e&&(this._mnemonic=e,this._changed.emit(void 0))}get icon(){return this._icon}set icon(e){this._icon!==e&&(this._icon=e,this._changed.emit(void 0))}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass!==e&&(this._iconClass=e,this._changed.emit(void 0))}get iconLabel(){return this._iconLabel}set iconLabel(e){this._iconLabel!==e&&(this._iconLabel=e,this._changed.emit(void 0))}get caption(){return this._caption}set caption(e){this._caption!==e&&(this._caption=e,this._changed.emit(void 0))}get className(){return this._className}set className(e){this._className!==e&&(this._className=e,this._changed.emit(void 0))}get closable(){return this._closable}set closable(e){this._closable!==e&&(this._closable=e,this._changed.emit(void 0))}get dataset(){return this._dataset}set dataset(e){this._dataset!==e&&(this._dataset=e,this._changed.emit(void 0))}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,ea.clearData(this))}},eG=class e{constructor(t={}){this._flags=0,this._layout=null,this._parent=null,this._disposed=new ea(this),this._hiddenMode=e.HiddenMode.Display,this.node=eX.createNode(t),this.addClass("lm-Widget")}dispose(){this.isDisposed||(this.setFlag(e.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&&e.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),this.title.dispose(),ea.clearData(this),ee.clearData(this),ei.clearData(this))}get disposed(){return this._disposed}get isDisposed(){return this.testFlag(e.Flag.IsDisposed)}get isAttached(){return this.testFlag(e.Flag.IsAttached)}get isHidden(){return this.testFlag(e.Flag.IsHidden)}get isVisible(){return this.testFlag(e.Flag.IsVisible)}get title(){return eX.titleProperty.get(this)}get id(){return this.node.id}set id(e){this.node.id=e}get dataset(){return this.node.dataset}get hiddenMode(){return this._hiddenMode}set hiddenMode(t){this._hiddenMode!==t&&(this.isHidden&&this._toggleHidden(!1),t==e.HiddenMode.Scale?this.node.style.willChange="transform":this.node.style.willChange="auto",this._hiddenMode=t,this.isHidden&&this._toggleHidden(!0))}get parent(){return this._parent}set parent(t){if(this._parent!==t){if(t&&this.contains(t))throw Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){let t=new e.ChildMessage("child-removed",this);ee.sendMessage(this._parent,t)}if(this._parent=t,this._parent&&!this._parent.isDisposed){let t=new e.ChildMessage("child-added",this);ee.sendMessage(this._parent,t)}this.isDisposed||ee.sendMessage(this,e.Msg.ParentChanged)}}get layout(){return this._layout}set layout(t){if(this._layout!==t){if(this.testFlag(e.Flag.DisallowLayout))throw Error("Cannot set widget layout.");if(this._layout)throw Error("Cannot change widget layout.");if(t.parent)throw Error("Cannot change layout parent.");this._layout=t,t.parent=this}}*children(){this._layout&&(yield*this._layout)}contains(e){for(let t=e;t;t=t._parent)if(t===this)return!0;return!1}hasClass(e){return this.node.classList.contains(e)}addClass(e){this.node.classList.add(e)}removeClass(e){this.node.classList.remove(e)}toggleClass(e,t){return!0===t?(this.node.classList.add(e),!0):!1===t?(this.node.classList.remove(e),!1):this.node.classList.toggle(e)}update(){ee.postMessage(this,e.Msg.UpdateRequest)}fit(){ee.postMessage(this,e.Msg.FitRequest)}activate(){ee.postMessage(this,e.Msg.ActivateRequest)}close(){ee.sendMessage(this,e.Msg.CloseRequest)}show(){if(this.testFlag(e.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&ee.sendMessage(this,e.Msg.BeforeShow),this.clearFlag(e.Flag.IsHidden),this._toggleHidden(!1),this.isAttached&&(!this.parent||this.parent.isVisible)&&ee.sendMessage(this,e.Msg.AfterShow),this.parent)){let t=new e.ChildMessage("child-shown",this);ee.sendMessage(this.parent,t)}}hide(){if(!this.testFlag(e.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&ee.sendMessage(this,e.Msg.BeforeHide),this.setFlag(e.Flag.IsHidden),this._toggleHidden(!0),this.isAttached&&(!this.parent||this.parent.isVisible)&&ee.sendMessage(this,e.Msg.AfterHide),this.parent)){let t=new e.ChildMessage("child-hidden",this);ee.sendMessage(this.parent,t)}}setHidden(e){e?this.hide():this.show()}testFlag(e){return(this._flags&e)!=0}setFlag(e){this._flags|=e}clearFlag(e){this._flags&=~e}processMessage(t){switch(t.type){case"resize":this.notifyLayout(t),this.onResize(t);break;case"update-request":this.notifyLayout(t),this.onUpdateRequest(t);break;case"fit-request":this.notifyLayout(t),this.onFitRequest(t);break;case"before-show":this.notifyLayout(t),this.onBeforeShow(t);break;case"after-show":this.setFlag(e.Flag.IsVisible),this.notifyLayout(t),this.onAfterShow(t);break;case"before-hide":this.notifyLayout(t),this.onBeforeHide(t);break;case"after-hide":this.clearFlag(e.Flag.IsVisible),this.notifyLayout(t),this.onAfterHide(t);break;case"before-attach":this.notifyLayout(t),this.onBeforeAttach(t);break;case"after-attach":this.isHidden||this.parent&&!this.parent.isVisible||this.setFlag(e.Flag.IsVisible),this.setFlag(e.Flag.IsAttached),this.notifyLayout(t),this.onAfterAttach(t);break;case"before-detach":this.notifyLayout(t),this.onBeforeDetach(t);break;case"after-detach":this.clearFlag(e.Flag.IsVisible),this.clearFlag(e.Flag.IsAttached),this.notifyLayout(t),this.onAfterDetach(t);break;case"activate-request":this.notifyLayout(t),this.onActivateRequest(t);break;case"close-request":this.notifyLayout(t),this.onCloseRequest(t);break;case"child-added":this.notifyLayout(t),this.onChildAdded(t);break;case"child-removed":this.notifyLayout(t),this.onChildRemoved(t);break;default:this.notifyLayout(t)}}notifyLayout(e){this._layout&&this._layout.processParentMessage(e)}onCloseRequest(t){this.parent?this.parent=null:this.isAttached&&e.detach(this)}onResize(e){}onUpdateRequest(e){}onFitRequest(e){}onActivateRequest(e){}onBeforeShow(e){}onAfterShow(e){}onBeforeHide(e){}onAfterHide(e){}onBeforeAttach(e){}onAfterAttach(e){}onBeforeDetach(e){}onAfterDetach(e){}onChildAdded(e){}onChildRemoved(e){}_toggleHidden(t){if(t)switch(this._hiddenMode){case e.HiddenMode.Display:this.addClass("lm-mod-hidden");break;case e.HiddenMode.Scale:this.node.style.transform="scale(0)",this.node.setAttribute("aria-hidden","true");break;case e.HiddenMode.ContentVisibility:this.node.style.contentVisibility="hidden",this.node.style.zIndex="-1"}else switch(this._hiddenMode){case e.HiddenMode.Display:this.removeClass("lm-mod-hidden");break;case e.HiddenMode.Scale:this.node.style.transform="",this.node.removeAttribute("aria-hidden");break;case e.HiddenMode.ContentVisibility:this.node.style.contentVisibility="",this.node.style.zIndex=""}}};!function(e){var t,r,i,n;(t=e.HiddenMode||(e.HiddenMode={}))[t.Display=0]="Display",t[t.Scale=1]="Scale",t[t.ContentVisibility=2]="ContentVisibility",(r=e.Flag||(e.Flag={}))[r.IsDisposed=1]="IsDisposed",r[r.IsAttached=2]="IsAttached",r[r.IsHidden=4]="IsHidden",r[r.IsVisible=8]="IsVisible",r[r.DisallowLayout=16]="DisallowLayout",(i=e.Msg||(e.Msg={})).BeforeShow=new et("before-show"),i.AfterShow=new et("after-show"),i.BeforeHide=new et("before-hide"),i.AfterHide=new et("after-hide"),i.BeforeAttach=new et("before-attach"),i.AfterAttach=new et("after-attach"),i.BeforeDetach=new et("before-detach"),i.AfterDetach=new et("after-detach"),i.ParentChanged=new et("parent-changed"),i.UpdateRequest=new er("update-request"),i.FitRequest=new er("fit-request"),i.ActivateRequest=new er("activate-request"),i.CloseRequest=new er("close-request"),e.ChildMessage=class extends et{constructor(e,t){super(e),this.child=t}};class a extends et{constructor(e,t){super("resize"),this.width=e,this.height=t}}e.ResizeMessage=a,(n=a=e.ResizeMessage||(e.ResizeMessage={})).UnknownSize=new n(-1,-1),e.attach=function(t,r,i=null){if(t.parent)throw Error("Cannot attach a child widget.");if(t.isAttached||t.node.isConnected)throw Error("Widget is already attached.");if(!r.isConnected)throw Error("Host is not attached.");ee.sendMessage(t,e.Msg.BeforeAttach),r.insertBefore(t.node,i),ee.sendMessage(t,e.Msg.AfterAttach)},e.detach=function(t){if(t.parent)throw Error("Cannot detach a child widget.");if(!t.isAttached||!t.node.isConnected)throw Error("Widget is not attached.");ee.sendMessage(t,e.Msg.BeforeDetach),t.node.parentNode.removeChild(t.node),ee.sendMessage(t,e.Msg.AfterDetach)}}(eG||(eG={})),(eZ=eX||(eX={})).titleProperty=new ei({name:"title",create:e=>new eH({owner:e})}),eZ.createNode=function(e){return e.node||document.createElement(e.tag||"div")};var eW=class{constructor(e={}){this._disposed=!1,this._parent=null,this._fitPolicy=e.fitPolicy||"set-min-size"}dispose(){this._parent=null,this._disposed=!0,ea.clearData(this),ei.clearData(this)}get isDisposed(){return this._disposed}get parent(){return this._parent}set parent(e){if(this._parent!==e){if(this._parent)throw Error("Cannot change parent widget.");if(e.layout!==this)throw Error("Invalid parent widget.");this._parent=e,this.init()}}get fitPolicy(){return this._fitPolicy}set fitPolicy(e){if(this._fitPolicy!==e&&(this._fitPolicy=e,this._parent)){let e=this._parent.node.style;e.minWidth="",e.minHeight="",e.maxWidth="",e.maxHeight="",this._parent.fit()}}processParentMessage(e){switch(e.type){case"resize":this.onResize(e);break;case"update-request":this.onUpdateRequest(e);break;case"fit-request":this.onFitRequest(e);break;case"before-show":this.onBeforeShow(e);break;case"after-show":this.onAfterShow(e);break;case"before-hide":this.onBeforeHide(e);break;case"after-hide":this.onAfterHide(e);break;case"before-attach":this.onBeforeAttach(e);break;case"after-attach":this.onAfterAttach(e);break;case"before-detach":this.onBeforeDetach(e);break;case"after-detach":this.onAfterDetach(e);break;case"child-removed":this.onChildRemoved(e);break;case"child-shown":this.onChildShown(e);break;case"child-hidden":this.onChildHidden(e)}}init(){for(let e of this)e.parent=this.parent}onResize(e){for(let e of this)ee.sendMessage(e,eG.ResizeMessage.UnknownSize)}onUpdateRequest(e){for(let e of this)ee.sendMessage(e,eG.ResizeMessage.UnknownSize)}onBeforeAttach(e){for(let t of this)ee.sendMessage(t,e)}onAfterAttach(e){for(let t of this)ee.sendMessage(t,e)}onBeforeDetach(e){for(let t of this)ee.sendMessage(t,e)}onAfterDetach(e){for(let t of this)ee.sendMessage(t,e)}onBeforeShow(e){for(let t of this)t.isHidden||ee.sendMessage(t,e)}onAfterShow(e){for(let t of this)t.isHidden||ee.sendMessage(t,e)}onBeforeHide(e){for(let t of this)t.isHidden||ee.sendMessage(t,e)}onAfterHide(e){for(let t of this)t.isHidden||ee.sendMessage(t,e)}onChildRemoved(e){this.removeWidget(e.child)}onFitRequest(e){}onChildShown(e){}onChildHidden(e){}};(e$=eW||(eW={})).getHorizontalAlignment=function(e){return eK.horizontalAlignmentProperty.get(e)},e$.setHorizontalAlignment=function(e,t){eK.horizontalAlignmentProperty.set(e,t)},e$.getVerticalAlignment=function(e){return eK.verticalAlignmentProperty.get(e)},e$.setVerticalAlignment=function(e,t){eK.verticalAlignmentProperty.set(e,t)};var eY,eZ,e$,eX,eK,eJ=class{constructor(e){this._top=NaN,this._left=NaN,this._width=NaN,this._height=NaN,this._minWidth=0,this._minHeight=0,this._maxWidth=1/0,this._maxHeight=1/0,this._disposed=!1,this.widget=e,this.widget.node.style.position="absolute",this.widget.node.style.contain="strict"}dispose(){if(this._disposed)return;this._disposed=!0;let e=this.widget.node.style;e.position="",e.top="",e.left="",e.width="",e.height="",e.contain=""}get minWidth(){return this._minWidth}get minHeight(){return this._minHeight}get maxWidth(){return this._maxWidth}get maxHeight(){return this._maxHeight}get isDisposed(){return this._disposed}get isHidden(){return this.widget.isHidden}get isVisible(){return this.widget.isVisible}get isAttached(){return this.widget.isAttached}fit(){let e=$.sizeLimits(this.widget.node);this._minWidth=e.minWidth,this._minHeight=e.minHeight,this._maxWidth=e.maxWidth,this._maxHeight=e.maxHeight}update(e,t,r,i){let n=Math.max(this._minWidth,Math.min(r,this._maxWidth)),a=Math.max(this._minHeight,Math.min(i,this._maxHeight));if(n"center",changed:e0}),eQ.verticalAlignmentProperty=new ei({name:"verticalAlignment",create:()=>"top",changed:e0});var e1,e2=class extends eW{constructor(){super(...arguments),this._widgets=[]}dispose(){for(;this._widgets.length>0;)this._widgets.pop().dispose();super.dispose()}get widgets(){return this._widgets}*[Symbol.iterator](){yield*this._widgets}addWidget(e){this.insertWidget(this._widgets.length,e)}insertWidget(e,t){t.parent=this.parent;let r=this._widgets.indexOf(t),i=Math.max(0,Math.min(e,this._widgets.length));if(-1===r){B.ArrayExt.insert(this._widgets,i,t),this.parent&&this.attachWidget(i,t);return}i===this._widgets.length&&i--,r!==i&&(B.ArrayExt.move(this._widgets,r,i),this.parent&&this.moveWidget(r,i,t))}removeWidget(e){this.removeWidgetAt(this._widgets.indexOf(e))}removeWidgetAt(e){let t=B.ArrayExt.removeAt(this._widgets,e);t&&this.parent&&this.detachWidget(e,t)}init(){super.init();let e=0;for(let t of this)this.attachWidget(e++,t)}attachWidget(e,t){let r=this.parent.node.children[e];this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeAttach),this.parent.node.insertBefore(t.node,r),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterAttach)}moveWidget(e,t,r){this.parent.isAttached&&ee.sendMessage(r,eG.Msg.BeforeDetach),this.parent.node.removeChild(r.node),this.parent.isAttached&&ee.sendMessage(r,eG.Msg.AfterDetach);let i=this.parent.node.children[t];this.parent.isAttached&&ee.sendMessage(r,eG.Msg.BeforeAttach),this.parent.node.insertBefore(r.node,i),this.parent.isAttached&&ee.sendMessage(r,eG.Msg.AfterAttach)}detachWidget(e,t){this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterDetach)}};(e1||(e1={})).clampDimension=function(e){return Math.max(0,Math.floor(e))};var e3=e1,e5=class e extends e2{constructor(e){super(),this.widgetOffset=0,this._fixed=0,this._spacing=4,this._dirty=!1,this._hasNormedSizes=!1,this._sizers=[],this._items=[],this._handles=[],this._box=null,this._alignment="start",this._orientation="horizontal",this.renderer=e.renderer,void 0!==e.orientation&&(this._orientation=e.orientation),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=e1.clampDimension(e.spacing))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,super.dispose()}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this.parent&&(this.parent.dataset.orientation=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=e1.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get handles(){return this._handles}absoluteSizes(){return this._sizers.map(e=>e.size)}relativeSizes(){return e8.normalize(this._sizers.map(e=>e.size))}setRelativeSizes(e,t=!0){let r=this._sizers.length,i=e.slice(0,r);for(;i.length0&&(e.sizeHint=e.size);eV.adjust(this._sizers,e,r),this.parent&&this.parent.update()}}init(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){let r=new eJ(t),i=e8.createHandle(this.renderer),n=e8.averageSize(this._sizers),a=e8.createSizer(n);B.ArrayExt.insert(this._items,e,r),B.ArrayExt.insert(this._sizers,e,a),B.ArrayExt.insert(this._handles,e,i),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.node.appendChild(i),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){B.ArrayExt.move(this._items,e,t),B.ArrayExt.move(this._sizers,e,t),B.ArrayExt.move(this._handles,e,t),this.parent.fit()}detachWidget(e,t){let r=B.ArrayExt.removeAt(this._items,e),i=B.ArrayExt.removeAt(this._handles,e);B.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.node.removeChild(i),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterDetach),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}updateItemPosition(e,t,r,i,n,a,o){let s=this._items[e];if(s.isHidden)return;let l=this._handles[e].style;t?(r+=this.widgetOffset,s.update(r,i,o,n),r+=o,l.top=`${i}px`,l.left=`${r}px`,l.width=`${this._spacing}px`,l.height=`${n}px`):(i+=this.widgetOffset,s.update(r,i,a,o),i+=o,l.top=`${i}px`,l.left=`${r}px`,l.width=`${a}px`,l.height=`${this._spacing}px`)}_fit(){let t=0,r=-1;for(let e=0,i=this._items.length;e0&&(o.sizeHint=o.size),r.isHidden){o.minSize=0,o.maxSize=0;continue}r.fit(),o.stretch=e.getStretch(r.widget),i?(o.minSize=r.minWidth,o.maxSize=r.maxWidth,n+=r.minWidth,a=Math.max(a,r.minHeight)):(o.minSize=r.minHeight,o.maxSize=r.maxHeight,a+=r.minHeight,n=Math.max(n,r.minWidth))}let o=this._box=$.boxSizing(this.parent.node);n+=o.horizontalSum,a+=o.verticalSum;let s=this.parent.node.style;s.minWidth=`${n}px`,s.minHeight=`${a}px`,this._dirty=!0,this.parent.parent&&ee.sendMessage(this.parent.parent,eG.Msg.FitRequest),this._dirty&&ee.sendMessage(this.parent,eG.Msg.UpdateRequest)}_update(e,t){this._dirty=!1;let r=0;for(let e=0,t=this._items.length;e0){let e;if(e=c?Math.max(0,a-this._fixed):Math.max(0,o-this._fixed),this._hasNormedSizes){for(let t of this._sizers)t.sizeHint*=e;this._hasNormedSizes=!1}let t=eV.calc(this._sizers,e);if(t>0)switch(this._alignment){case"start":break;case"center":s=0,l=t/2;break;case"end":s=0,l=t;break;case"justify":s=t/r,l=0;break;default:throw"unreachable"}}for(let e=0,t=this._items.length;e0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:function(e){e.parent&&e.parent.layout instanceof e5&&e.parent.fit()}}),e6.createSizer=function(e){let t=new eq;return t.sizeHint=Math.floor(e),t},e6.createHandle=function(e){let t=e.createHandle();return t.style.position="absolute",t.style.contain="style",t},e6.averageSize=function(e){return e.reduce((e,t)=>e+t.size,0)/e.length||0},e6.normalize=function(e){let t=e.length;if(0===t)return[];let r=e.reduce((e,t)=>e+Math.abs(t),0);return 0===r?e.map(e=>1/t):e.map(e=>e/r)};var e4,e6,e8,e9,e7=class extends e5{constructor(e){super({...e,orientation:e.orientation||"vertical"}),this._titles=[],this.titleSpace=e.titleSpace||22}get titleSpace(){return this.widgetOffset}set titleSpace(e){e=e3.clampDimension(e),this.widgetOffset!==e&&(this.widgetOffset=e,this.parent&&this.parent.fit())}get titles(){return this._titles}dispose(){this.isDisposed||(this._titles.length=0,super.dispose())}updateTitle(e,t){let r=this._titles[e],i=r.classList.contains("lm-mod-expanded"),n=e9.createTitle(this.renderer,t.title,i);this._titles[e]=n,this.parent.node.replaceChild(n,r)}insertWidget(e,t){t.id||(t.id=`id-${N.UUID.uuid4()}`),super.insertWidget(e,t)}attachWidget(e,t){let r=e9.createTitle(this.renderer,t.title);B.ArrayExt.insert(this._titles,e,r),this.parent.node.appendChild(r),t.node.setAttribute("role","region"),t.node.setAttribute("aria-labelledby",r.id),super.attachWidget(e,t)}moveWidget(e,t,r){B.ArrayExt.move(this._titles,e,t),super.moveWidget(e,t,r)}detachWidget(e,t){let r=B.ArrayExt.removeAt(this._titles,e);this.parent.node.removeChild(r),super.detachWidget(e,t)}updateItemPosition(e,t,r,i,n,a,o){let s=this._titles[e].style;s.top=`${i}px`,s.left=`${r}px`,s.height=`${this.widgetOffset}px`,t?s.width=`${n}px`:s.width=`${a}px`,super.updateItemPosition(e,t,r,i,n,a,o)}};(e9||(e9={})).createTitle=function(e,t,r=!0){let i=e.createSectionTitle(t);return i.style.position="absolute",i.style.contain="strict",i.setAttribute("aria-label",`${t.label} Section`),i.setAttribute("aria-expanded",r?"true":"false"),i.setAttribute("aria-controls",t.owner.id),r&&i.classList.add("lm-mod-expanded"),i};var te,tt=class extends eG{constructor(e={}){super(),this.addClass("lm-Panel"),this.layout=te.createLayout(e)}get widgets(){return this.layout.widgets}addWidget(e){this.layout.addWidget(e)}insertWidget(e,t){this.layout.insertWidget(e,t)}};(te||(te={})).createLayout=function(e){return e.layout||new e2};var tr=class extends tt{constructor(e={}){super({layout:tP.createLayout(e)}),this._handleMoved=new ea(this),this._pressData=null,this.addClass("lm-SplitPanel")}dispose(){this._releaseMouse(),super.dispose()}get orientation(){return this.layout.orientation}set orientation(e){this.layout.orientation=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get renderer(){return this.layout.renderer}get handleMoved(){return this._handleMoved}get handles(){return this.layout.handles}relativeSizes(){return this.layout.relativeSizes()}setRelativeSizes(e,t=!0){this.layout.setRelativeSizes(e,t)}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(e){e.child.addClass("lm-SplitPanel-child"),this._releaseMouse()}onChildRemoved(e){e.child.removeClass("lm-SplitPanel-child"),this._releaseMouse()}_evtKeyDown(e){this._pressData&&(e.preventDefault(),e.stopPropagation()),27===e.keyCode&&this._releaseMouse()}_evtPointerDown(e){if(0!==e.button)return;let t=this.layout,r=B.ArrayExt.findFirstIndex(t.handles,t=>t.contains(e.target));if(-1===r)return;e.preventDefault(),e.stopPropagation(),document.addEventListener("pointerup",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0);let i,n=t.handles[r],a=n.getBoundingClientRect();i="horizontal"===t.orientation?e.clientX-a.left:e.clientY-a.top;let o=window.getComputedStyle(n),s=ec.overrideCursor(o.cursor);this._pressData={index:r,delta:i,override:s}}_evtPointerMove(e){e.preventDefault(),e.stopPropagation();let t,r=this.layout,i=this.node.getBoundingClientRect();t="horizontal"===r.orientation?e.clientX-i.left-this._pressData.delta:e.clientY-i.top-this._pressData.delta,r.moveHandle(this._pressData.index,t)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse())}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._handleMoved.emit(),document.removeEventListener("keydown",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("contextmenu",this,!0))}},ti=tr||(tr={});class tn{createHandle(){let e=document.createElement("div");return e.className="lm-SplitPanel-handle",e}}ti.Renderer=tn,ti.defaultRenderer=new tn,ti.getStretch=function(e){return e5.getStretch(e)},ti.setStretch=function(e,t){e5.setStretch(e,t)},(tP||(tP={})).createLayout=function(e){return e.layout||new e5({renderer:e.renderer||tr.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing})};var ta=class extends tr{constructor(e={}){super({...e,layout:tI.createLayout(e)}),this._widgetSizesCache=new WeakMap,this._expansionToggled=new ea(this),this.addClass("lm-AccordionPanel")}get renderer(){return this.layout.renderer}get titleSpace(){return this.layout.titleSpace}set titleSpace(e){this.layout.titleSpace=e}get titles(){return this.layout.titles}get expansionToggled(){return this._expansionToggled}addWidget(e){super.addWidget(e),e.title.changed.connect(this._onTitleChanged,this)}collapse(e){let t=this.layout.widgets[e];t&&!t.isHidden&&this._toggleExpansion(e)}expand(e){let t=this.layout.widgets[e];t&&t.isHidden&&this._toggleExpansion(e)}insertWidget(e,t){super.insertWidget(e,t),t.title.changed.connect(this._onTitleChanged,this)}handleEvent(e){switch(super.handleEvent(e),e.type){case"click":this._evtClick(e);break;case"keydown":this._eventKeyDown(e)}}onBeforeAttach(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),super.onBeforeAttach(e)}onAfterDetach(e){super.onAfterDetach(e),this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this)}_onTitleChanged(e){let t=B.ArrayExt.findFirstIndex(this.widgets,t=>t.contains(e.owner));t>=0&&(this.layout.updateTitle(t,e.owner),this.update())}_computeWidgetSize(e){let t=this.layout,r=t.widgets[e];if(!r)return;let i=r.isHidden,n=t.absoluteSizes(),a=(i?-1:1)*this.spacing,o=n.reduce((e,t)=>e+t),s=[...n];if(i){let t=this._widgetSizesCache.get(r);if(!t)return;s[e]+=t;let i=s.map(e=>e-t>0).lastIndexOf(!0);-1===i?s.forEach((r,i)=>{i!==e&&(s[i]-=n[i]/o*(t-a))}):s[i]-=t-a}else{let t=n[e];this._widgetSizesCache.set(r,t),s[e]=0;let i=s.map(e=>e>0).lastIndexOf(!0);if(-1===i)return;s[i]=n[i]+t+a}return s.map(e=>e/(o+a))}_evtClick(e){let t=e.target;if(t){let r=B.ArrayExt.findFirstIndex(this.titles,e=>e.contains(t));r>=0&&(e.preventDefault(),e.stopPropagation(),this._toggleExpansion(r))}}_eventKeyDown(e){if(e.defaultPrevented)return;let t=e.target,r=!1;if(t){let i=B.ArrayExt.findFirstIndex(this.titles,e=>e.contains(t));if(i>=0){let n=e.keyCode.toString();if(e.key.match(/Space|Enter/)||n.match(/13|32/))t.click(),r=!0;else if("horizontal"===this.orientation?e.key.match(/ArrowLeft|ArrowRight/)||n.match(/37|39/):e.key.match(/ArrowUp|ArrowDown/)||n.match(/38|40/)){let t=e.key.match(/ArrowLeft|ArrowUp/)||n.match(/37|38/)?-1:1,a=this.titles.length;this.titles[(i+a+t)%a].focus(),r=!0}else"End"===e.key||"35"===n?(this.titles[this.titles.length-1].focus(),r=!0):("Home"===e.key||"36"===n)&&(this.titles[0].focus(),r=!0)}r&&e.preventDefault()}}_toggleExpansion(e){let t=this.titles[e],r=this.layout.widgets[e],i=this._computeWidgetSize(e);i&&this.setRelativeSizes(i,!1),r.isHidden?(t.classList.add("lm-mod-expanded"),t.setAttribute("aria-expanded","true"),r.show()):(t.classList.remove("lm-mod-expanded"),t.setAttribute("aria-expanded","false"),r.hide()),this._expansionToggled.emit(e)}},to=ta||(ta={});class ts extends tr.Renderer{constructor(){super(),this.titleClassName="lm-AccordionPanel-title",this._titleID=0,this._titleKeys=new WeakMap,this._uuid=++ts._nInstance}createCollapseIcon(e){return document.createElement("span")}createSectionTitle(e){let t=document.createElement("h3");for(let r in t.setAttribute("tabindex","0"),t.id=this.createTitleKey(e),t.className=this.titleClassName,e.dataset)t.dataset[r]=e.dataset[r];t.appendChild(this.createCollapseIcon(e)).className="lm-AccordionPanel-titleCollapser";let r=t.appendChild(document.createElement("span"));return r.className="lm-AccordionPanel-titleLabel",r.textContent=e.label,r.title=e.caption||e.label,t}createTitleKey(e){let t=this._titleKeys.get(e);return void 0===t&&(t=`title-key-${this._uuid}-${this._titleID++}`,this._titleKeys.set(e,t)),t}}ts._nInstance=0,to.Renderer=ts,to.defaultRenderer=new ts,(tI||(tI={})).createLayout=function(e){return e.layout||new e7({renderer:e.renderer||ta.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing,titleSpace:e.titleSpace})};var tl=class e extends e2{constructor(e={}){super(),this._fixed=0,this._spacing=4,this._dirty=!1,this._sizers=[],this._items=[],this._box=null,this._alignment="start",this._direction="top-to-bottom",void 0!==e.direction&&(this._direction=e.direction),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=e3.clampDimension(e.spacing))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,super.dispose()}get direction(){return this._direction}set direction(e){this._direction!==e&&(this._direction=e,this.parent&&(this.parent.dataset.direction=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=e3.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}init(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){B.ArrayExt.insert(this._items,e,new eJ(t)),B.ArrayExt.insert(this._sizers,e,new eq),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){B.ArrayExt.move(this._items,e,t),B.ArrayExt.move(this._sizers,e,t),this.parent.update()}detachWidget(e,t){let r=B.ArrayExt.removeAt(this._items,e);B.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterDetach),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let t=0;for(let e=0,r=this._items.length;e0)switch(this._alignment){case"start":break;case"center":l=0,c=s/2;break;case"end":l=0,c=s;break;case"justify":l=s/r,c=0;break;default:throw"unreachable"}for(let e=0,t=this._items.length;e0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:tu}),tc.sizeBasisProperty=new ei({name:"sizeBasis",create:()=>0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:tu}),tc.isHorizontal=function(e){return"left-to-right"===e||"right-to-left"===e},tc.clampSpacing=function(e){return Math.max(0,Math.floor(e))};var th=class extends tt{constructor(e={}){super({layout:tD.createLayout(e)}),this.addClass("lm-BoxPanel")}get direction(){return this.layout.direction}set direction(e){this.layout.direction=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}onChildAdded(e){e.child.addClass("lm-BoxPanel-child")}onChildRemoved(e){e.child.removeClass("lm-BoxPanel-child")}};(tC=th||(th={})).getStretch=function(e){return tl.getStretch(e)},tC.setStretch=function(e,t){tl.setStretch(e,t)},tC.getSizeBasis=function(e){return tl.getSizeBasis(e)},tC.setSizeBasis=function(e,t){tl.setSizeBasis(e,t)},(tD||(tD={})).createLayout=function(e){return e.layout||new tl(e)};var td=class e extends eG{constructor(t){super({node:tO.createNode()}),this._activeIndex=-1,this._items=[],this._results=null,this.addClass("lm-CommandPalette"),this.setFlag(eG.Flag.DisallowLayout),this.commands=t.commands,this.renderer=t.renderer||e.defaultRenderer,this.commands.commandChanged.connect(this._onGenericChange,this),this.commands.keyBindingChanged.connect(this._onGenericChange,this)}dispose(){this._items.length=0,this._results=null,super.dispose()}get searchNode(){return this.node.getElementsByClassName("lm-CommandPalette-search")[0]}get inputNode(){return this.node.getElementsByClassName("lm-CommandPalette-input")[0]}get contentNode(){return this.node.getElementsByClassName("lm-CommandPalette-content")[0]}get items(){return this._items}addItem(e){let t=tO.createItem(this.commands,e);return this._items.push(t),this.refresh(),t}addItems(e){let t=e.map(e=>tO.createItem(this.commands,e));return t.forEach(e=>this._items.push(e)),this.refresh(),t}removeItem(e){this.removeItemAt(this._items.indexOf(e))}removeItemAt(e){B.ArrayExt.removeAt(this._items,e)&&this.refresh()}clearItems(){0!==this._items.length&&(this._items.length=0,this.refresh())}refresh(){(this._results=null,""!==this.inputNode.value)?this.node.getElementsByClassName("lm-close-icon")[0].style.display="inherit":this.node.getElementsByClassName("lm-close-icon")[0].style.display="none",this.update()}handleEvent(e){switch(e.type){case"click":this._evtClick(e);break;case"keydown":this._evtKeyDown(e);break;case"input":this.refresh();break;case"focus":case"blur":this._toggleFocused()}}onBeforeAttach(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),this.node.addEventListener("input",this),this.node.addEventListener("focus",this,!0),this.node.addEventListener("blur",this,!0)}onAfterDetach(e){this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this),this.node.removeEventListener("input",this),this.node.removeEventListener("focus",this,!0),this.node.removeEventListener("blur",this,!0)}onAfterShow(e){this.update(),super.onAfterShow(e)}onActivateRequest(e){if(this.isAttached){let e=this.inputNode;e.focus(),e.select()}}onUpdateRequest(e){if(this.isHidden)return;let t=this.inputNode.value,r=this.contentNode,i=this._results;if(i||(i=this._results=tO.search(this._items,t),this._activeIndex=t?B.ArrayExt.findFirstIndex(i,tO.canActivate):-1),!t&&0===i.length)return void eN.render(null,r);if(t&&0===i.length){let e=this.renderer.renderEmptyMessage({query:t});eN.render(e,r);return}let n=this.renderer,a=this._activeIndex,o=Array(i.length);for(let e=0,t=i.length;e=i.length)r.scrollTop=0;else{let e=r.children[a];$.scrollIntoViewIfNeeded(r,e)}}_evtClick(e){if(0!==e.button)return;if(e.target.classList.contains("lm-close-icon")){this.inputNode.value="",this.refresh();return}let t=B.ArrayExt.findFirstIndex(this.contentNode.children,t=>t.contains(e.target));-1!==t&&(e.preventDefault(),e.stopPropagation(),this._execute(t))}_evtKeyDown(e){if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey))switch(e.keyCode){case 13:e.preventDefault(),e.stopPropagation(),this._execute(this._activeIndex);break;case 38:e.preventDefault(),e.stopPropagation(),this._activatePreviousItem();break;case 40:e.preventDefault(),e.stopPropagation(),this._activateNextItem()}}_activateNextItem(){if(!this._results||0===this._results.length)return;let e=this._activeIndex,t=this._results.length,r=ee-t),u=o.slice(0,c),h=o.slice(c);for(let e=0,t=h.length;er.command===e&&N.JSONExt.deepEqual(r.args,t))||null}}var tv=class e extends eG{constructor(t){super({node:tR.createNode()}),this._childIndex=-1,this._activeIndex=-1,this._openTimerID=0,this._closeTimerID=0,this._items=[],this._childMenu=null,this._parentMenu=null,this._aboutToClose=new ea(this),this._menuRequested=new ea(this),this.addClass("lm-Menu"),this.setFlag(eG.Flag.DisallowLayout),this.commands=t.commands,this.renderer=t.renderer||e.defaultRenderer}dispose(){this.close(),this._items.length=0,super.dispose()}get aboutToClose(){return this._aboutToClose}get menuRequested(){return this._menuRequested}get parentMenu(){return this._parentMenu}get childMenu(){return this._childMenu}get rootMenu(){let e=this;for(;e._parentMenu;)e=e._parentMenu;return e}get leafMenu(){let e=this;for(;e._childMenu;)e=e._childMenu;return e}get contentNode(){return this.node.getElementsByClassName("lm-Menu-content")[0]}get activeItem(){return this._items[this._activeIndex]||null}set activeItem(e){this.activeIndex=e?this._items.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._items.length)&&(e=-1),-1===e||tR.canActivate(this._items[e])||(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())}get items(){return this._items}activateNextItem(){let e=this._items.length,t=this._activeIndex,r=t{this.activeIndex=e}})}eN.render(a,this.contentNode)}onCloseRequest(e){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;let t=this._childMenu;t&&(this._childIndex=-1,this._childMenu=null,t._parentMenu=null,t.close());let r=this._parentMenu;r&&(this._parentMenu=null,r._childIndex=-1,r._childMenu=null,r.activate()),this.isAttached&&this._aboutToClose.emit(void 0),super.onCloseRequest(e)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation();let t=e.keyCode;if(13===t)return void this.triggerActiveItem();if(27===t)return void this.close();if(37===t)return void(this._parentMenu?this.close():this._menuRequested.emit("previous"));if(38===t)return void this.activatePreviousItem();if(39===t){let e=this.activeItem;e&&"submenu"===e.type?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next");return}if(40===t)return void this.activateNextItem();let r=ep().keyForKeydownEvent(e);if(!r)return;let i=this._activeIndex+1,n=tR.findMnemonic(this._items,r,i);-1===n.index||n.multiple?-1!==n.index?this.activeIndex=n.index:-1!==n.auto&&(this.activeIndex=n.auto):(this.activeIndex=n.index,this.triggerActiveItem())}_evtMouseUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this.triggerActiveItem())}_evtMouseMove(e){let t=B.ArrayExt.findFirstIndex(this.contentNode.children,t=>$.hitTest(t,e.clientX,e.clientY));if(t===this._activeIndex)return;if(this.activeIndex=t,(t=this.activeIndex)===this._childIndex){this._cancelOpenTimer(),this._cancelCloseTimer();return}-1!==this._childIndex&&this._startCloseTimer(),this._cancelOpenTimer();let r=this.activeItem;r&&"submenu"===r.type&&r.submenu&&this._startOpenTimer()}_evtMouseEnter(e){for(let e=this._parentMenu;e;e=e._parentMenu)e._cancelOpenTimer(),e._cancelCloseTimer(),e.activeIndex=e._childIndex}_evtMouseLeave(e){if(this._cancelOpenTimer(),!this._childMenu){this.activeIndex=-1;return}let{clientX:t,clientY:r}=e;$.hitTest(this._childMenu.node,t,r)?this._cancelCloseTimer():(this.activeIndex=-1,this._startCloseTimer())}_evtMouseDown(e){this._parentMenu||(tR.hitTestMenus(this,e.clientX,e.clientY)?(e.preventDefault(),e.stopPropagation()):this.close())}_openChildMenu(t=!1){let r=this.activeItem;if(!r||"submenu"!==r.type||!r.submenu)return void this._closeChildMenu();let i=r.submenu;if(i===this._childMenu)return;e.saveWindowData(),this._closeChildMenu(),this._childMenu=i,this._childIndex=this._activeIndex,i._parentMenu=this,ee.sendMessage(this,eG.Msg.UpdateRequest);let n=this.contentNode.children[this._activeIndex];tR.openSubmenu(i,n),t&&(i.activeIndex=-1,i.activateNextItem()),i.activate()}_closeChildMenu(){this._childMenu&&this._childMenu.close()}_startOpenTimer(){0===this._openTimerID&&(this._openTimerID=window.setTimeout(()=>{this._openTimerID=0,this._openChildMenu()},tR.TIMER_DELAY))}_startCloseTimer(){0===this._closeTimerID&&(this._closeTimerID=window.setTimeout(()=>{this._closeTimerID=0,this._closeChildMenu()},tR.TIMER_DELAY))}_cancelOpenTimer(){0!==this._openTimerID&&(clearTimeout(this._openTimerID),this._openTimerID=0)}_cancelCloseTimer(){0!==this._closeTimerID&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)}static saveWindowData(){tR.saveWindowData()}},tx=tv||(tv={});class tb{renderItem(e){let t=this.createItemClass(e),r=this.createItemDataset(e),i=this.createItemARIA(e);return ez.li({className:t,dataset:r,tabindex:"0",onfocus:e.onfocus,...i},this.renderIcon(e),this.renderLabel(e),this.renderShortcut(e),this.renderSubmenu(e))}renderIcon(e){let t=this.createIconClass(e);return ez.div({className:t},e.item.icon,e.item.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return ez.div({className:"lm-Menu-itemLabel"},t)}renderShortcut(e){let t=this.formatShortcut(e);return ez.div({className:"lm-Menu-itemShortcut"},t)}renderSubmenu(e){return ez.div({className:"lm-Menu-itemSubmenuIcon"})}createItemClass(e){let t="lm-Menu-item";e.item.isEnabled||(t+=" lm-mod-disabled"),e.item.isToggled&&(t+=" lm-mod-toggled"),e.item.isVisible||(t+=" lm-mod-hidden"),e.active&&(t+=" lm-mod-active"),e.collapsed&&(t+=" lm-mod-collapsed");let r=e.item.className;return r&&(t+=` ${r}`),t}createItemDataset(e){let{type:t,command:r,dataset:i}=e.item;return"command"===t?{...i,type:t,command:r}:{...i,type:t}}createIconClass(e){let t="lm-Menu-itemIcon",r=e.item.iconClass;return r?`${t} ${r}`:t}createItemARIA(e){let t={};switch(e.item.type){case"separator":t.role="presentation";break;case"submenu":t["aria-haspopup"]="true",e.item.isEnabled||(t["aria-disabled"]="true");break;default:e.item.isEnabled||(t["aria-disabled"]="true"),t.role="menuitem"}return t}formatLabel(e){let{label:t,mnemonic:r}=e.item;if(r<0||r>=t.length)return t;let i=t.slice(0,r),n=t.slice(r+1),a=t[r];return[i,ez.span({className:"lm-Menu-itemMnemonic"},a),n]}formatShortcut(e){let t=e.item.keyBinding;return t?eA.formatKeystroke(t.keys):null}}tx.Renderer=tb,tx.defaultRenderer=new tb,function(e){e.TIMER_DELAY=300,e.SUBMENU_OVERLAP=3;let t=null,r=0;function i(){return r>0?(r--,t):a()}function n(e){return"separator"!==e.type&&e.isEnabled&&e.isVisible}function a(){return{pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,clientWidth:document.documentElement.clientWidth,clientHeight:document.documentElement.clientHeight}}e.saveWindowData=function(){t=a(),r++},e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-Menu-content",e.appendChild(t),t.setAttribute("role","menu"),e.tabIndex=0,e},e.canActivate=n,e.createItem=function(e,t){return new o(e.commands,t)},e.hitTestMenus=function(e,t,r){for(let i=e;i;i=i.childMenu)if($.hitTest(i.node,t,r))return!0;return!1},e.computeCollapsed=function(e){let t=Array(e.length);B.ArrayExt.fill(t,!1);let r=0,i=e.length;for(;r=0;--n){let r=e[n];if(r.isVisible){if("separator"!==r.type)break;t[n]=!0}}let a=!1;for(;++rc+h&&(t=c+h-g),!a&&r+y>u+d&&(r>u+d?r=u+d-y:r-=y),m.transform=`translate(${Math.max(0,t)}px, ${Math.max(0,r)}px`,m.opacity="1"},e.openSubmenu=function(t,r){let n=i(),a=n.pageXOffset,o=n.pageYOffset,s=n.clientWidth,l=n.clientHeight;ee.sendMessage(t,eG.Msg.UpdateRequest);let c=t.node,u=c.style;u.opacity="0",u.maxHeight=`${l}px`,eG.attach(t,document.body);let{width:h,height:d}=c.getBoundingClientRect(),f=$.boxSizing(t.node),p=r.getBoundingClientRect(),m=p.right-e.SUBMENU_OVERLAP;m+h>a+s&&(m=p.left+e.SUBMENU_OVERLAP-h);let g=p.top-f.borderTop-f.paddingTop;g+d>o+l&&(g=p.bottom+f.borderBottom+f.paddingBottom-d),u.transform=`translate(${Math.max(0,m)}px, ${Math.max(0,g)}px`,u.opacity="1"},e.findMnemonic=function(e,t,r){let i=-1,a=-1,o=!1,s=t.toUpperCase();for(let t=0,l=e.length;t=0&&dr.command===e&&N.JSONExt.deepEqual(r.args,t))||null}return null}}}(tR||(tR={}));var t_=tF||(tF={});function tw(e,t){let r=e.rank,i=t.rank;return r!==i?r=this._titles.length)&&(e=-1),this._currentIndex===e)return;let t=this._currentIndex,r=this._titles[t]||null,i=e,n=this._titles[i]||null;this._currentIndex=i,this._previousTitle=r,this.update(),this._currentChanged.emit({previousIndex:t,previousTitle:r,currentIndex:i,currentTitle:n})}get name(){return this._name}set name(e){this._name=e,e?this.contentNode.setAttribute("aria-label",e):this.contentNode.removeAttribute("aria-label")}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._releaseMouse(),this._orientation=e,this.dataset.orientation=e,this.contentNode.setAttribute("aria-orientation",e))}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){this._addButtonEnabled!==e&&(this._addButtonEnabled=e,e?this.addButtonNode.classList.remove("lm-mod-hidden"):this.addButtonNode.classList.add("lm-mod-hidden"))}get titles(){return this._titles}get contentNode(){return this.node.getElementsByClassName("lm-TabBar-content")[0]}get addButtonNode(){return this.node.getElementsByClassName("lm-TabBar-addButton")[0]}addTab(e){return this.insertTab(this._titles.length,e)}insertTab(e,t){this._releaseMouse();let r=tj.asTitle(t),i=this._titles.indexOf(r),n=Math.max(0,Math.min(e,this._titles.length));return -1===i?(B.ArrayExt.insert(this._titles,n,r),r.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(n,r)):(n===this._titles.length&&n--,i===n||(B.ArrayExt.move(this._titles,i,n),this.update(),this._adjustCurrentForMove(i,n))),r}removeTab(e){this.removeTabAt(this._titles.indexOf(e))}removeTabAt(e){this._releaseMouse();let t=B.ArrayExt.removeAt(this._titles,e);t&&(t.changed.disconnect(this._onTitleChanged,this),t===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(e,t))}clearTabs(){if(0===this._titles.length)return;for(let e of(this._releaseMouse(),this._titles))e.changed.disconnect(this._onTitleChanged,this);let e=this.currentIndex,t=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),-1!==e&&this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}releaseMouse(){this._releaseMouse()}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"dblclick":this._evtDblClick(e);break;case"keydown":e.eventPhase===Event.CAPTURING_PHASE?this._evtKeyDownCapturing(e):this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this),this.node.addEventListener("dblclick",this),this.node.addEventListener("keydown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this.node.removeEventListener("dblclick",this),this.node.removeEventListener("keydown",this),this._releaseMouse()}onUpdateRequest(e){var t;let r=this._titles,i=this.renderer,n=this.currentTitle,a=Array(r.length),o=null!=(t=this._getCurrentTabindex())?t:this._currentIndex>-1?this._currentIndex:0;for(let e=0,t=r.length;e$.hitTest(t,e.clientX,e.clientY));if(-1===r)return;let i=this.titles[r],n=t[r].querySelector(".lm-TabBar-tabLabel");if(n&&n.contains(e.target)){let e=i.label||"",t=n.innerHTML;n.innerHTML="";let r=document.createElement("input");r.classList.add("lm-TabBar-tabInput"),r.value=e,n.appendChild(r);let a=()=>{r.removeEventListener("blur",a),n.innerHTML=t,this.node.addEventListener("keydown",this)};r.addEventListener("dblclick",e=>e.stopPropagation()),r.addEventListener("blur",a),r.addEventListener("keydown",e=>{"Enter"===e.key?(""!==r.value&&(i.label=i.caption=r.value),a()):"Escape"===e.key&&a()}),this.node.removeEventListener("keydown",this),r.select(),r.focus(),n.children.length>0&&n.children[0].focus()}}_evtKeyDownCapturing(e){e.eventPhase===Event.CAPTURING_PHASE&&(e.preventDefault(),e.stopPropagation(),"Escape"===e.key&&this._releaseMouse())}_evtKeyDown(e){var t,r,i;if("Tab"!==e.key&&e.eventPhase!==Event.CAPTURING_PHASE){if("Enter"===e.key||"Spacebar"===e.key||" "===e.key){let t=document.activeElement;if(this.addButtonEnabled&&this.addButtonNode.contains(t))e.preventDefault(),e.stopPropagation(),this._addRequested.emit();else{let r=B.ArrayExt.findFirstIndex(this.contentNode.children,e=>e.contains(t));r>=0&&(e.preventDefault(),e.stopPropagation(),this.currentIndex=r)}}else if(tM.includes(e.key)){let n,a=[...this.contentNode.children];if(this.addButtonEnabled&&a.push(this.addButtonNode),a.length<=1)return;e.preventDefault(),e.stopPropagation();let o=a.indexOf(document.activeElement);-1===o&&(o=this._currentIndex),"ArrowRight"===e.key&&"horizontal"===this._orientation||"ArrowDown"===e.key&&"vertical"===this._orientation?n=null!=(t=a[o+1])?t:a[0]:"ArrowLeft"===e.key&&"horizontal"===this._orientation||"ArrowUp"===e.key&&"vertical"===this._orientation?n=null!=(r=a[o-1])?r:a[a.length-1]:"Home"===e.key?n=a[0]:"End"===e.key&&(n=a[a.length-1]),n&&(null==(i=a[o])||i.setAttribute("tabindex","-1"),n?.setAttribute("tabindex","0"),n.focus())}}}_evtPointerDown(e){if(0!==e.button&&1!==e.button||this._dragData||e.target.classList.contains("lm-TabBar-tabInput"))return;let t=this.addButtonEnabled&&this.addButtonNode.contains(e.target),r=this.contentNode.children,i=B.ArrayExt.findFirstIndex(r,t=>$.hitTest(t,e.clientX,e.clientY));if(-1===i&&!t||(e.preventDefault(),e.stopPropagation(),this._dragData={tab:r[i],index:i,pressX:e.clientX,pressY:e.clientY,tabPos:-1,tabSize:-1,tabPressPos:-1,targetIndex:-1,tabLayout:null,contentRect:null,override:null,dragActive:!1,dragAborted:!1,detachRequested:!1},this.document.addEventListener("pointerup",this,!0),1===e.button||t))return;let n=r[i].querySelector(this.renderer.closeIconSelector);n&&n.contains(e.target)||(this.tabsMovable&&(this.document.addEventListener("pointermove",this,!0),this.document.addEventListener("keydown",this,!0),this.document.addEventListener("contextmenu",this,!0)),this.allowDeselect&&this.currentIndex===i?this.currentIndex=-1:this.currentIndex=i,-1!==this.currentIndex&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}_evtPointerMove(e){let t=this._dragData;if(!t)return;e.preventDefault(),e.stopPropagation();let r=this.contentNode.children;if(!(!t.dragActive&&!tj.dragExceeded(t,e))){if(!t.dragActive){let e=t.tab.getBoundingClientRect();"horizontal"===this._orientation?(t.tabPos=t.tab.offsetLeft,t.tabSize=e.width,t.tabPressPos=t.pressX-e.left):(t.tabPos=t.tab.offsetTop,t.tabSize=e.height,t.tabPressPos=t.pressY-e.top),t.tabPressOffset={x:t.pressX-e.left,y:t.pressY-e.top},t.tabLayout=tj.snapTabLayout(r,this._orientation),t.contentRect=this.contentNode.getBoundingClientRect(),t.override=ec.overrideCursor("default"),t.tab.classList.add("lm-mod-dragging"),this.addClass("lm-mod-dragging"),t.dragActive=!0}if(!t.detachRequested&&tj.detachExceeded(t,e)){t.detachRequested=!0;let i=t.index,n=e.clientX,a=e.clientY,o=r[i],s=this._titles[i];if(this._tabDetachRequested.emit({index:i,title:s,tab:o,clientX:n,clientY:a,offset:t.tabPressOffset}),t.dragAborted)return}tj.layoutTabs(r,t,e,this._orientation)}}_evtPointerUp(e){if(0!==e.button&&1!==e.button)return;let t=this._dragData;if(t){if(e.preventDefault(),e.stopPropagation(),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),!t.dragActive){if(this._dragData=null,this.addButtonEnabled&&this.addButtonNode.contains(e.target))return void this._addRequested.emit(void 0);let r=this.contentNode.children,i=B.ArrayExt.findFirstIndex(r,t=>$.hitTest(t,e.clientX,e.clientY));if(i!==t.index)return;let n=this._titles[i];if(!n.closable)return;if(1===e.button)return void this._tabCloseRequested.emit({index:i,title:n});let a=r[i].querySelector(this.renderer.closeIconSelector);return a&&a.contains(e.target)?void this._tabCloseRequested.emit({index:i,title:n}):void 0}0!==e.button||(tj.finalizeTabPosition(t,this._orientation),t.tab.classList.remove("lm-mod-dragging"),setTimeout(()=>{if(t.dragAborted)return;this._dragData=null,tj.resetTabPositions(this.contentNode.children,this._orientation),t.override.dispose(),this.removeClass("lm-mod-dragging");let e=t.index,r=t.targetIndex;-1===r||e===r||(B.ArrayExt.move(this._titles,e,r),this._adjustCurrentForMove(e,r),this._tabMoved.emit({fromIndex:e,toIndex:r,title:this._titles[r]}),ee.sendMessage(this,eG.Msg.UpdateRequest))},tj.parseTransitionDuration(t.tab)))}}_releaseMouse(){let e=this._dragData;e&&(this._dragData=null,this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),e.dragAborted=!0,e.dragActive&&(tj.resetTabPositions(this.contentNode.children,this._orientation),e.override.dispose(),e.tab.classList.remove("lm-mod-dragging"),this.removeClass("lm-mod-dragging")))}_adjustCurrentForInsert(e,t){let r=this.currentTitle,i=this._currentIndex,n=this.insertBehavior;if("select-tab"===n||"select-tab-if-needed"===n&&-1===i){this._currentIndex=e,this._previousTitle=r,this._currentChanged.emit({previousIndex:i,previousTitle:r,currentIndex:e,currentTitle:t});return}i>=e&&this._currentIndex++}_adjustCurrentForMove(e,t){this._currentIndex===e?this._currentIndex=t:this._currentIndex=t?this._currentIndex++:this._currentIndex>e&&this._currentIndex<=t&&this._currentIndex--}_adjustCurrentForRemove(e,t){let r=this._currentIndex,i=this.removeBehavior;if(r!==e){r>e&&this._currentIndex--;return}if(0===this._titles.length){this._currentIndex=-1,this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null});return}if("select-tab-after"===i){this._currentIndex=Math.min(e,this._titles.length-1),this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if("select-tab-before"===i){this._currentIndex=Math.max(0,e-1),this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if("select-previous-tab"===i){this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(e,this._titles.length-1),this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}this._currentIndex=-1,this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}_onTitleChanged(e){this.update()}},tA=tk||(tk={});class tS{constructor(){this.closeIconSelector=".lm-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap,this._uuid=++tS._nInstance}renderTab(e){let t=e.title.caption,r=this.createTabKey(e),i=this.createTabStyle(e),n=this.createTabClass(e),a=this.createTabDataset(e),o=this.createTabARIA(e);return e.title.closable?ez.li({id:r,key:r,className:n,title:t,style:i,dataset:a,...o},this.renderIcon(e),this.renderLabel(e),this.renderCloseIcon(e)):ez.li({id:r,key:r,className:n,title:t,style:i,dataset:a,...o},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){let{title:t}=e,r=this.createIconClass(e);return ez.div({className:r},t.icon,t.iconLabel)}renderLabel(e){return ez.div({className:"lm-TabBar-tabLabel"},e.title.label)}renderCloseIcon(e){return ez.div({className:"lm-TabBar-tabCloseIcon"})}createTabKey(e){let t=this._tabKeys.get(e.title);return void 0===t&&(t=`tab-key-${this._uuid}-${this._tabID++}`,this._tabKeys.set(e.title,t)),t}createTabStyle(e){return{zIndex:`${e.zIndex}`}}createTabClass(e){let t="lm-TabBar-tab";return e.title.className&&(t+=` ${e.title.className}`),e.title.closable&&(t+=" lm-mod-closable"),e.current&&(t+=" lm-mod-current"),t}createTabDataset(e){return e.title.dataset}createTabARIA(e){var t;return{role:"tab","aria-selected":e.current.toString(),tabindex:`${null!=(t=e.tabIndex)?t:"-1"}`}}createIconClass(e){let t="lm-TabBar-tabIcon",r=e.title.iconClass;return r?`${t} ${r}`:t}}tS._nInstance=0,tA.Renderer=tS,tA.defaultRenderer=new tS,tA.addButtonSelector=".lm-TabBar-addButton",(tL=tj||(tj={})).DRAG_THRESHOLD=5,tL.DETACH_THRESHOLD=20,tL.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");t.setAttribute("role","tablist"),t.className="lm-TabBar-content",e.appendChild(t);let r=document.createElement("div");return r.className="lm-TabBar-addButton lm-mod-hidden",r.setAttribute("tabindex","-1"),r.setAttribute("role","button"),e.appendChild(r),e},tL.asTitle=function(e){return e instanceof eH?e:new eH(e)},tL.parseTransitionDuration=function(e){return 1e3*(parseFloat(window.getComputedStyle(e).transitionDuration)||0)},tL.snapTabLayout=function(e,t){let r=Array(e.length);for(let i=0,n=e.length;i=tL.DRAG_THRESHOLD||i>=tL.DRAG_THRESHOLD},tL.detachExceeded=function(e,t){let r=e.contentRect;return t.clientX=r.right+tL.DETACH_THRESHOLD||t.clientY=r.bottom+tL.DETACH_THRESHOLD},tL.layoutTabs=function(e,t,r,i){let n,a,o,s;"horizontal"===i?(n=t.pressX,a=r.clientX-t.contentRect.left,o=r.clientX,s=t.contentRect.width):(n=t.pressY,a=r.clientY-t.contentRect.top,o=r.clientY,s=t.contentRect.height);let l=t.index,c=a-t.tabPressPos,u=c+t.tabSize;for(let r=0,a=e.length;r>1);if(rt.index&&u>d)a=`${-t.tabSize-h.margin}px`,l=Math.max(l,r);else if(r===t.index){let e=o-n,r=s-(t.tabPos+t.tabSize);a=`${Math.max(-t.tabPos,Math.min(e,r))}px`}else a="";"horizontal"===i?e[r].style.left=a:e[r].style.top=a}t.targetIndex=l},tL.finalizeTabPosition=function(e,t){let r,i;if(r="horizontal"===t?e.contentRect.width:e.contentRect.height,e.targetIndex===e.index)i=0;else if(e.targetIndex>e.index){let t=e.tabLayout[e.targetIndex];i=t.pos+t.size-e.tabSize-e.tabPos}else i=e.tabLayout[e.targetIndex].pos-e.tabPos;let n=r-(e.tabPos+e.tabSize),a=Math.max(-e.tabPos,Math.min(i,n));"horizontal"===t?e.tab.style.left=`${a}px`:e.tab.style.top=`${a}px`},tL.resetTabPositions=function(e,t){for(let r of e)"horizontal"===t?r.style.left="":r.style.top=""};var tE,tC,tL,tP,tI,tz,tD,tO,tR,tF,tj,tB,tN=class extends eW{constructor(e){super(),this._spacing=4,this._dirty=!1,this._root=null,this._box=null,this._items=new Map,this.renderer=e.renderer,void 0!==e.spacing&&(this._spacing=e3.clampDimension(e.spacing)),this._document=e.document||document,this._hiddenMode=void 0!==e.hiddenMode?e.hiddenMode:eG.HiddenMode.Display}dispose(){let e=this[Symbol.iterator]();for(let t of(this._items.forEach(e=>{e.dispose()}),this._box=null,this._root=null,this._items.clear(),e))t.dispose();super.dispose()}get hiddenMode(){return this._hiddenMode}set hiddenMode(e){if(this._hiddenMode!==e){for(let t of(this._hiddenMode=e,this.tabBars()))if(t.titles.length>1)for(let e of t.titles)e.owner.hiddenMode=this._hiddenMode}}get spacing(){return this._spacing}set spacing(e){e=e3.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get isEmpty(){return null===this._root}[Symbol.iterator](){return this._root?this._root.iterAllWidgets():(0,B.empty)()}widgets(){return this._root?this._root.iterUserWidgets():(0,B.empty)()}selectedWidgets(){return this._root?this._root.iterSelectedWidgets():(0,B.empty)()}tabBars(){return this._root?this._root.iterTabBars():(0,B.empty)()}handles(){return this._root?this._root.iterHandles():(0,B.empty)()}moveHandle(e,t,r){let i,n=e.classList.contains("lm-mod-hidden");if(!this._root||n)return;let a=this._root.findSplitNode(e);a&&0!=(i="horizontal"===a.node.orientation?t-e.offsetLeft:r-e.offsetTop)&&(a.node.holdSizes(),eV.adjust(a.node.sizers,a.index,i),this.parent&&this.parent.update())}saveLayout(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}}restoreLayout(e){let t=new Set,r;r=e.main?tB.normalizeAreaConfig(e.main,t):null;let i=this.widgets(),n=this.tabBars(),a=this.handles();for(let e of(this._root=null,i))t.has(e)||(e.parent=null);for(let e of n)e.dispose();for(let e of a)e.parentNode&&e.parentNode.removeChild(e);for(let e of t)e.parent=this.parent;r?this._root=tB.realizeAreaConfig(r,{createTabBar:e=>this._createTabBar(),createHandle:()=>this._createHandle()},this._document):this._root=null,this.parent&&(t.forEach(e=>{this.attachWidget(e)}),this.parent.fit())}addWidget(e,t={}){let r=t.ref||null,i=t.mode||"tab-after",n=null;if(this._root&&r&&(n=this._root.findTabNode(r)),r&&!n)throw Error("Reference widget is not in the layout.");switch(e.parent=this.parent,i){case"tab-after":this._insertTab(e,r,n,!0);break;case"tab-before":this._insertTab(e,r,n,!1);break;case"split-top":this._insertSplit(e,r,n,"vertical",!1);break;case"split-left":this._insertSplit(e,r,n,"horizontal",!1);break;case"split-right":this._insertSplit(e,r,n,"horizontal",!0);break;case"split-bottom":this._insertSplit(e,r,n,"vertical",!0);break;case"merge-top":this._insertSplit(e,r,n,"vertical",!1,!0);break;case"merge-left":this._insertSplit(e,r,n,"horizontal",!1,!0);break;case"merge-right":this._insertSplit(e,r,n,"horizontal",!0,!0);break;case"merge-bottom":this._insertSplit(e,r,n,"vertical",!0,!0)}this.parent&&(this.attachWidget(e),this.parent.fit())}removeWidget(e){this._removeWidget(e),this.parent&&(this.detachWidget(e),this.parent.fit())}hitTestTabAreas(e,t){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=$.boxSizing(this.parent.node));let r=this.parent.node.getBoundingClientRect(),i=e-r.left-this._box.borderLeft,n=t-r.top-this._box.borderTop,a=this._root.hitTestTabNodes(i,n);if(!a)return null;let{tabBar:o,top:s,left:l,width:c,height:u}=a,h=this._box.borderLeft+this._box.borderRight,d=this._box.borderTop+this._box.borderBottom,f=r.width-h-(l+c),p=r.height-d-(s+u);return{tabBar:o,x:i,y:n,top:s,left:l,right:f,bottom:p,width:c,height:u}}init(){for(let e of(super.init(),this))this.attachWidget(e);for(let e of this.handles())this.parent.node.appendChild(e);this.parent.fit()}attachWidget(e){this.parent.node!==e.node.parentNode&&(this._items.set(e,new eJ(e)),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.AfterAttach))}detachWidget(e){if(this.parent.node!==e.node.parentNode)return;this.parent.isAttached&&ee.sendMessage(e,eG.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.AfterDetach);let t=this._items.get(e);t&&(this._items.delete(e),t.dispose())}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_removeWidget(e){if(!this._root)return;let t=this._root.findTabNode(e);if(!t)return;if(tB.removeAria(e),t.tabBar.titles.length>1){t.tabBar.removeTab(e.title),this._hiddenMode===eG.HiddenMode.Scale&&1==t.tabBar.titles.length&&(t.tabBar.titles[0].owner.hiddenMode=eG.HiddenMode.Display);return}if(t.tabBar.dispose(),this._root===t){this._root=null;return}this._root.holdAllSizes();let r=t.parent;t.parent=null;let i=B.ArrayExt.removeFirstOf(r.children,t),n=B.ArrayExt.removeAt(r.handles,i);if(B.ArrayExt.removeAt(r.sizers,i),n.parentNode&&n.parentNode.removeChild(n),r.children.length>1)return void r.syncHandles();let a=r.parent;r.parent=null;let o=r.children[0],s=r.handles[0];if(r.children.length=0,r.handles.length=0,r.sizers.length=0,s.parentNode&&s.parentNode.removeChild(s),this._root===r){o.parent=null,this._root=o;return}let l=a.children.indexOf(r);if(o instanceof tB.TabLayoutNode){o.parent=a,a.children[l]=o;return}let c=B.ArrayExt.removeAt(a.handles,l);B.ArrayExt.removeAt(a.children,l),B.ArrayExt.removeAt(a.sizers,l),c.parentNode&&c.parentNode.removeChild(c);for(let e=0,t=o.children.length;e=r.length)&&(i=0),{type:"tab-area",widgets:r,currentIndex:i}}(t,r):function(t,r){let i=t.orientation,n=[],a=[];for(let o=0,s=t.children.length;o{let i=n(e,c,u),a=t(l.sizes[r]),o=c.createHandle();h.children.push(i),h.handles.push(o),h.sizers.push(a),i.parent=h}),h.syncHandles(),h.normalizeSizes(),h)};class r{constructor(e){this.parent=null,this._top=0,this._left=0,this._width=0,this._height=0;let t=new eq,r=new eq;t.stretch=0,r.stretch=1,this.tabBar=e,this.sizers=[t,r]}get top(){return this._top}get left(){return this._left}get width(){return this._width}get height(){return this._height}*iterAllWidgets(){yield this.tabBar,yield*this.iterUserWidgets()}*iterUserWidgets(){for(let e of this.tabBar.titles)yield e.owner}*iterSelectedWidgets(){let e=this.tabBar.currentTitle;e&&(yield e.owner)}*iterTabBars(){yield this.tabBar}*iterHandles(){}findTabNode(e){return -1!==this.tabBar.titles.indexOf(e.title)?this:null}findSplitNode(e){return null}findFirstTabNode(){return this}hitTestTabNodes(e,t){return e=this._left+this._width||t=this._top+this._height?null:this}createConfig(){return{type:"tab-area",widgets:this.tabBar.titles.map(e=>e.owner),currentIndex:this.tabBar.currentIndex}}holdAllSizes(){}fit(e,t){let r=0,i=0,n=t.get(this.tabBar),a=this.tabBar.currentTitle,o=a?t.get(a.owner):void 0,[s,l]=this.sizers;return n&&n.fit(),o&&o.fit(),n&&!n.isHidden?(r=Math.max(r,n.minWidth),i+=n.minHeight,s.minSize=n.minHeight,s.maxSize=n.maxHeight):(s.minSize=0,s.maxSize=0),o&&!o.isHidden?(r=Math.max(r,o.minWidth),i+=o.minHeight,l.minSize=o.minHeight):l.minSize=0,l.maxSize=1/0,{minWidth:r,minHeight:i,maxWidth:1/0,maxHeight:1/0}}update(e,t,r,i,n,a){this._top=t,this._left=e,this._width=r,this._height=i;let o=a.get(this.tabBar),s=this.tabBar.currentTitle,l=s?a.get(s.owner):void 0;if(eV.calc(this.sizers,i),o&&!o.isHidden){let i=this.sizers[0].size;o.update(e,t,r,i),t+=i}if(l&&!l.isHidden){let i=this.sizers[1].size;l.update(e,t,r,i)}}}e.TabLayoutNode=r;class i{constructor(e){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=e}*iterAllWidgets(){for(let e of this.children)yield*e.iterAllWidgets()}*iterUserWidgets(){for(let e of this.children)yield*e.iterUserWidgets()}*iterSelectedWidgets(){for(let e of this.children)yield*e.iterSelectedWidgets()}*iterTabBars(){for(let e of this.children)yield*e.iterTabBars()}*iterHandles(){for(let e of(yield*this.handles,this.children))yield*e.iterHandles()}findTabNode(e){for(let t=0,r=this.children.length;te.createConfig()),sizes:t}}syncHandles(){this.handles.forEach((e,t)=>{e.setAttribute("data-orientation",this.orientation),t===this.handles.length-1?e.classList.add("lm-mod-hidden"):e.classList.remove("lm-mod-hidden")})}holdSizes(){for(let e of this.sizers)e.sizeHint=e.size}holdAllSizes(){for(let e of this.children)e.holdAllSizes();this.holdSizes()}normalizeSizes(){let e=this.sizers.length;if(0===e)return;this.holdSizes();let t=this.sizers.reduce((e,t)=>e+t.sizeHint,0);if(0===t)for(let t of this.sizers)t.size=t.sizeHint=1/e;else for(let e of this.sizers)e.size=e.sizeHint/=t;this.normalized=!0}createNormalizedSizes(){let e=this.sizers.length;if(0===e)return[];let t=this.sizers.map(e=>e.size),r=t.reduce((e,t)=>e+t,0);if(0===r)for(let r=t.length-1;r>-1;r--)t[r]=1/e;else for(let e=t.length-1;e>-1;e--)t[e]/=r;return t}fit(e,t){let r="horizontal"===this.orientation,i=Math.max(0,this.children.length-1)*e,n=r?i:0,a=r?0:i;for(let i=0,o=this.children.length;ithis._createTabBar(),createHandle:()=>this._createHandle()},spacing:t.spacing,hiddenMode:t.hiddenMode}),this.overlay=t.overlay||new e.Overlay,this.node.appendChild(this.overlay.node)}dispose(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),super.dispose()}get hiddenMode(){return this.layout.hiddenMode}set hiddenMode(e){this.layout.hiddenMode=e}get layoutModified(){return this._layoutModified}get addRequested(){return this._addRequested}get renderer(){return this.layout.renderer}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get mode(){return this._mode}set mode(e){if(this._mode===e)return;this._mode=e,this.dataset.mode=e;let t=this.layout;switch(e){case"multiple-document":for(let e of t.tabBars())e.show();break;case"single-document":t.restoreLayout(_.createSingleDocumentConfig(this));break;default:throw"unreachable"}ee.postMessage(this,_.LayoutModified)}get tabsMovable(){return this._tabsMovable}set tabsMovable(e){for(let t of(this._tabsMovable=e,this.tabBars()))t.tabsMovable=e}get tabsConstrained(){return this._tabsConstrained}set tabsConstrained(e){this._tabsConstrained=e}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){for(let t of(this._addButtonEnabled=e,this.tabBars()))t.addButtonEnabled=e}get isEmpty(){return this.layout.isEmpty}*widgets(){yield*this.layout.widgets()}*selectedWidgets(){yield*this.layout.selectedWidgets()}*tabBars(){yield*this.layout.tabBars()}*handles(){yield*this.layout.handles()}selectWidget(e){let t=(0,B.find)(this.tabBars(),t=>-1!==t.titles.indexOf(e.title));if(!t)throw Error("Widget is not contained in the dock panel.");t.currentTitle=e.title}activateWidget(e){this.selectWidget(e),e.activate()}saveLayout(){return this.layout.saveLayout()}restoreLayout(e){this._mode="multiple-document",this.layout.restoreLayout(e),(X.IS_EDGE||X.IS_IE)&&ee.flush(),ee.postMessage(this,_.LayoutModified)}addWidget(e,t={}){"single-document"===this._mode?this.layout.addWidget(e):this.layout.addWidget(e,t),ee.postMessage(this,_.LayoutModified)}processMessage(e){"layout-modified"===e.type?this._layoutModified.emit(void 0):super.processMessage(e)}handleEvent(e){switch(e.type){case"lm-dragenter":this._evtDragEnter(e);break;case"lm-dragleave":this._evtDragLeave(e);break;case"lm-dragover":this._evtDragOver(e);break;case"lm-drop":this._evtDrop(e);break;case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("lm-dragenter",this),this.node.addEventListener("lm-dragleave",this),this.node.addEventListener("lm-dragover",this),this.node.addEventListener("lm-drop",this),this.node.addEventListener("pointerdown",this)}onAfterDetach(e){this.node.removeEventListener("lm-dragenter",this),this.node.removeEventListener("lm-dragleave",this),this.node.removeEventListener("lm-dragover",this),this.node.removeEventListener("lm-drop",this),this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(e){_.isGeneratedTabBarProperty.get(e.child)||e.child.addClass("lm-DockPanel-widget")}onChildRemoved(e){_.isGeneratedTabBarProperty.get(e.child)||(e.child.removeClass("lm-DockPanel-widget"),ee.postMessage(this,_.LayoutModified))}_evtDragEnter(e){e.mimeData.hasData("application/vnd.lumino.widget-factory")&&(e.preventDefault(),e.stopPropagation())}_evtDragLeave(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||(e.stopPropagation(),this.overlay.hide(1))}_evtDragOver(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||"invalid"===this._showOverlay(e.clientX,e.clientY)?e.dropAction="none":(e.stopPropagation(),e.dropAction=e.proposedAction)}_evtDrop(e){if(e.preventDefault(),this.overlay.hide(0),"none"===e.proposedAction){e.dropAction="none";return}let{clientX:t,clientY:r}=e,{zone:i,target:n}=_.findDropTarget(this,t,r,this._edges);if(this._tabsConstrained&&e.source!==this||"invalid"===i){e.dropAction="none";return}let a=e.mimeData.getData("application/vnd.lumino.widget-factory");if("function"!=typeof a){e.dropAction="none";return}let o=a();if(!(o instanceof eG)||o.contains(this)){e.dropAction="none";return}let s=n?_.getDropRef(n.tabBar):null;switch(i){case"root-all":this.addWidget(o);break;case"root-top":this.addWidget(o,{mode:"split-top"});break;case"root-left":this.addWidget(o,{mode:"split-left"});break;case"root-right":this.addWidget(o,{mode:"split-right"});break;case"root-bottom":this.addWidget(o,{mode:"split-bottom"});break;case"widget-all":case"widget-tab":this.addWidget(o,{mode:"tab-after",ref:s});break;case"widget-top":this.addWidget(o,{mode:"split-top",ref:s});break;case"widget-left":this.addWidget(o,{mode:"split-left",ref:s});break;case"widget-right":this.addWidget(o,{mode:"split-right",ref:s});break;case"widget-bottom":this.addWidget(o,{mode:"split-bottom",ref:s});break;default:throw"unreachable"}e.dropAction=e.proposedAction,e.stopPropagation(),this.activateWidget(o)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&(this._releaseMouse(),ee.postMessage(this,_.LayoutModified))}_evtPointerDown(e){if(0!==e.button)return;let t=this.layout,r=e.target,i=(0,B.find)(t.handles(),e=>e.contains(r));if(!i)return;e.preventDefault(),e.stopPropagation(),this._document.addEventListener("keydown",this,!0),this._document.addEventListener("pointerup",this,!0),this._document.addEventListener("pointermove",this,!0),this._document.addEventListener("contextmenu",this,!0);let n=i.getBoundingClientRect(),a=e.clientX-n.left,o=e.clientY-n.top,s=window.getComputedStyle(i),l=ec.overrideCursor(s.cursor,this._document);this._pressData={handle:i,deltaX:a,deltaY:o,override:l}}_evtPointerMove(e){if(!this._pressData)return;e.preventDefault(),e.stopPropagation();let t=this.node.getBoundingClientRect(),r=e.clientX-t.left-this._pressData.deltaX,i=e.clientY-t.top-this._pressData.deltaY;this.layout.moveHandle(this._pressData.handle,r,i)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse(),ee.postMessage(this,_.LayoutModified))}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._document.removeEventListener("keydown",this,!0),this._document.removeEventListener("pointerup",this,!0),this._document.removeEventListener("pointermove",this,!0),this._document.removeEventListener("contextmenu",this,!0))}_showOverlay(e,t){let{zone:r,target:i}=_.findDropTarget(this,e,t,this._edges);if("invalid"===r)return this.overlay.hide(100),r;let n,a,o,s,l=$.boxSizing(this.node),c=this.node.getBoundingClientRect();switch(r){case"root-all":n=l.paddingTop,a=l.paddingLeft,o=l.paddingRight,s=l.paddingBottom;break;case"root-top":n=l.paddingTop,a=l.paddingLeft,o=l.paddingRight,s=c.height*_.GOLDEN_RATIO;break;case"root-left":n=l.paddingTop,a=l.paddingLeft,o=c.width*_.GOLDEN_RATIO,s=l.paddingBottom;break;case"root-right":n=l.paddingTop,a=c.width*_.GOLDEN_RATIO,o=l.paddingRight,s=l.paddingBottom;break;case"root-bottom":n=c.height*_.GOLDEN_RATIO,a=l.paddingLeft,o=l.paddingRight,s=l.paddingBottom;break;case"widget-all":n=i.top,a=i.left,o=i.right,s=i.bottom;break;case"widget-top":n=i.top,a=i.left,o=i.right,s=i.bottom+i.height/2;break;case"widget-left":n=i.top,a=i.left,o=i.right+i.width/2,s=i.bottom;break;case"widget-right":n=i.top,a=i.left+i.width/2,o=i.right,s=i.bottom;break;case"widget-bottom":n=i.top+i.height/2,a=i.left,o=i.right,s=i.bottom;break;case"widget-tab":{let e=i.tabBar.node.getBoundingClientRect().height;n=i.top,a=i.left,o=i.right,s=i.bottom+i.height-e;break}default:throw"unreachable"}return this.overlay.show({top:n,left:a,right:o,bottom:s}),r}_createTabBar(){let e=this._renderer.createTabBar(this._document);return _.isGeneratedTabBarProperty.set(e,!0),"single-document"===this._mode&&e.hide(),e.tabsMovable=this._tabsMovable,e.allowDeselect=!1,e.addButtonEnabled=this._addButtonEnabled,e.removeBehavior="select-previous-tab",e.insertBehavior="select-tab-if-needed",e.tabMoved.connect(this._onTabMoved,this),e.currentChanged.connect(this._onCurrentChanged,this),e.tabCloseRequested.connect(this._onTabCloseRequested,this),e.tabDetachRequested.connect(this._onTabDetachRequested,this),e.tabActivateRequested.connect(this._onTabActivateRequested,this),e.addRequested.connect(this._onTabAddRequested,this),e}_createHandle(){return this._renderer.createHandle()}_onTabMoved(){ee.postMessage(this,_.LayoutModified)}_onCurrentChanged(e,t){let{previousTitle:r,currentTitle:i}=t;r&&r.owner.hide(),i&&i.owner.show(),(X.IS_EDGE||X.IS_IE)&&ee.flush(),ee.postMessage(this,_.LayoutModified)}_onTabAddRequested(e){this._addRequested.emit(e)}_onTabActivateRequested(e,t){t.title.owner.activate()}_onTabCloseRequested(e,t){t.title.owner.close()}_onTabDetachRequested(e,t){if(this._drag)return;e.releaseMouse();let{title:r,tab:i,clientX:n,clientY:a,offset:o}=t,s=new N.MimeData;s.setData("application/vnd.lumino.widget-factory",()=>r.owner);let l=i.cloneNode(!0);o&&(l.style.top=`-${o.y}px`,l.style.left=`-${o.x}px`),this._drag=new ec({document:this._document,mimeData:s,dragImage:l,proposedAction:"move",supportedActions:"move",source:this}),i.classList.add("lm-mod-hidden");let c=()=>{this._drag=null,i.classList.remove("lm-mod-hidden")};this._drag.start(n,a).then(c)}},tV=tU||(tU={});tV.Overlay=class{constructor(){this._timer=-1,this._hidden=!0,this.node=document.createElement("div"),this.node.classList.add("lm-DockPanel-overlay"),this.node.classList.add("lm-mod-hidden"),this.node.style.position="absolute",this.node.style.contain="strict"}show(e){let t=this.node.style;t.top=`${e.top}px`,t.left=`${e.left}px`,t.right=`${e.right}px`,t.bottom=`${e.bottom}px`,clearTimeout(this._timer),this._timer=-1,this._hidden&&(this._hidden=!1,this.node.classList.remove("lm-mod-hidden"))}hide(e){if(!this._hidden){if(e<=0){clearTimeout(this._timer),this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden");return}-1===this._timer&&(this._timer=window.setTimeout(()=>{this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden")},e))}}};class tq{createTabBar(e){let t=new tk({document:e});return t.addClass("lm-DockPanel-tabBar"),t}createHandle(){let e=document.createElement("div");return e.className="lm-DockPanel-handle",e}}tV.Renderer=tq,tV.defaultRenderer=new tq,(m=_||(_={})).GOLDEN_RATIO=.618,m.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},m.LayoutModified=new er("layout-modified"),m.isGeneratedTabBarProperty=new ei({name:"isGeneratedTabBar",create:()=>!1}),m.createSingleDocumentConfig=function(e){if(e.isEmpty)return{main:null};let t=Array.from(e.widgets()),r=e.selectedWidgets().next().value,i=r?t.indexOf(r):-1;return{main:{type:"tab-area",widgets:t,currentIndex:i}}},m.findDropTarget=function(e,t,r,i){let n;if(!$.hitTest(e.node,t,r))return{zone:"invalid",target:null};let a=e.layout;if(a.isEmpty)return{zone:"root-all",target:null};if("multiple-document"===e.mode){let n=e.node.getBoundingClientRect(),a=t-n.left+1,o=r-n.top+1,s=n.right-t,l=n.bottom-r;switch(Math.min(o,s,l,a)){case o:if(oh&&c>h&&l>d&&u>d)return{zone:"widget-all",target:o};switch(s/=h,l/=d,Math.min(s,l,c/=h,u/=d)){case s:n="widget-left";break;case l:n="widget-top";break;case c:n="widget-right";break;case u:n="widget-bottom";break;default:throw"unreachable"}return{zone:n,target:o}},m.getDropRef=function(e){return 0===e.titles.length?null:e.currentTitle?e.currentTitle.owner:e.titles[e.titles.length-1].owner};var tH=class e extends eW{constructor(e={}){super(e),this._dirty=!1,this._rowSpacing=4,this._columnSpacing=4,this._items=[],this._rowStarts=[],this._columnStarts=[],this._rowSizers=[new eq],this._columnSizers=[new eq],this._box=null,void 0!==e.rowCount&&w.reallocSizers(this._rowSizers,e.rowCount),void 0!==e.columnCount&&w.reallocSizers(this._columnSizers,e.columnCount),void 0!==e.rowSpacing&&(this._rowSpacing=w.clampValue(e.rowSpacing)),void 0!==e.columnSpacing&&(this._columnSpacing=w.clampValue(e.columnSpacing))}dispose(){for(let e of this._items){let t=e.widget;e.dispose(),t.dispose()}this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,super.dispose()}get rowCount(){return this._rowSizers.length}set rowCount(e){e!==this.rowCount&&(w.reallocSizers(this._rowSizers,e),this.parent&&this.parent.fit())}get columnCount(){return this._columnSizers.length}set columnCount(e){e!==this.columnCount&&(w.reallocSizers(this._columnSizers,e),this.parent&&this.parent.fit())}get rowSpacing(){return this._rowSpacing}set rowSpacing(e){e=w.clampValue(e),this._rowSpacing!==e&&(this._rowSpacing=e,this.parent&&this.parent.fit())}get columnSpacing(){return this._columnSpacing}set columnSpacing(e){e=w.clampValue(e),this._columnSpacing!==e&&(this._columnSpacing=e,this.parent&&this.parent.fit())}rowStretch(e){let t=this._rowSizers[e];return t?t.stretch:-1}setRowStretch(e,t){let r=this._rowSizers[e];r&&(t=w.clampValue(t),r.stretch!==t&&(r.stretch=t,this.parent&&this.parent.update()))}columnStretch(e){let t=this._columnSizers[e];return t?t.stretch:-1}setColumnStretch(e,t){let r=this._columnSizers[e];r&&(t=w.clampValue(t),r.stretch!==t&&(r.stretch=t,this.parent&&this.parent.update()))}*[Symbol.iterator](){for(let e of this._items)yield e.widget}addWidget(e){-1===B.ArrayExt.findFirstIndex(this._items,t=>t.widget===e)&&(this._items.push(new eJ(e)),this.parent&&this.attachWidget(e))}removeWidget(e){let t=B.ArrayExt.findFirstIndex(this._items,t=>t.widget===e);if(-1===t)return;let r=B.ArrayExt.removeAt(this._items,t);this.parent&&this.detachWidget(e),r.dispose()}init(){for(let e of(super.init(),this))this.attachWidget(e)}attachWidget(e){this.parent.isAttached&&ee.sendMessage(e,eG.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.AfterAttach),this.parent.fit()}detachWidget(e){this.parent.isAttached&&ee.sendMessage(e,eG.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.AfterDetach),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){for(let e=0,t=this.rowCount;e!e.isHidden);for(let e=0,r=t.length;e({row:0,column:0,rowSpan:1,columnSpan:1}),changed:function(e){e.parent&&e.parent.layout instanceof tH&&e.parent.fit()}}),y.normalizeConfig=function(e){return{row:Math.max(0,Math.floor(e.row||0)),column:Math.max(0,Math.floor(e.column||0)),rowSpan:Math.max(1,Math.floor(e.rowSpan||0)),columnSpan:Math.max(1,Math.floor(e.columnSpan||0))}},y.clampValue=function(e){return Math.max(0,Math.floor(e))},y.rowSpanCmp=function(e,t){let r=y.cellConfigProperty.get(e.widget),i=y.cellConfigProperty.get(t.widget);return r.rowSpan-i.rowSpan},y.columnSpanCmp=function(e,t){let r=y.cellConfigProperty.get(e.widget),i=y.cellConfigProperty.get(t.widget);return r.columnSpan-i.columnSpan},y.reallocSizers=function(e,t){for(t=Math.max(1,Math.floor(t));e.lengtht&&(e.length=t)},y.distributeMin=function(e,t,r,i){if(r=i)return;let a=(i-n)/(r-t+1);for(let i=t;i<=r;++i)e[i].minSize+=a};var tG=class e extends eG{constructor(t={}){super({node:T.createNode()}),this._activeIndex=-1,this._tabFocusIndex=0,this._menus=[],this._childMenu=null,this._overflowMenu=null,this._menuItemSizes=[],this._overflowIndex=-1,this.addClass("lm-MenuBar"),this.setFlag(eG.Flag.DisallowLayout),this.renderer=t.renderer||e.defaultRenderer,this._forceItemsPosition=t.forceItemsPosition||{forceX:!0,forceY:!0},this._overflowMenuOptions=t.overflowMenuOptions||{isVisible:!0}}dispose(){this._closeChildMenu(),this._menus.length=0,super.dispose()}get childMenu(){return this._childMenu}get overflowIndex(){return this._overflowIndex}get overflowMenu(){return this._overflowMenu}get contentNode(){return this.node.getElementsByClassName("lm-MenuBar-content")[0]}get activeMenu(){return this._menus[this._activeIndex]||null}set activeMenu(e){this.activeIndex=e?this._menus.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._menus.length)&&(e=-1),e>-1&&0===this._menus[e].items.length&&(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this.update())}get menus(){return this._menus}openActiveMenu(){-1!==this._activeIndex&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))}addMenu(e,t=!0){this.insertMenu(this._menus.length,e,t)}insertMenu(e,t,r=!0){this._closeChildMenu();let i=this._menus.indexOf(t),n=Math.max(0,Math.min(e,this._menus.length));if(-1===i){B.ArrayExt.insert(this._menus,n,t),t.addClass("lm-MenuBar-menu"),t.aboutToClose.connect(this._onMenuAboutToClose,this),t.menuRequested.connect(this._onMenuMenuRequested,this),t.title.changed.connect(this._onTitleChanged,this),r&&this.update();return}n===this._menus.length&&n--,i!==n&&(B.ArrayExt.move(this._menus,i,n),r&&this.update())}removeMenu(e,t=!0){this.removeMenuAt(this._menus.indexOf(e),t)}removeMenuAt(e,t=!0){this._closeChildMenu();let r=B.ArrayExt.removeAt(this._menus,e);r&&(r.aboutToClose.disconnect(this._onMenuAboutToClose,this),r.menuRequested.disconnect(this._onMenuMenuRequested,this),r.title.changed.disconnect(this._onTitleChanged,this),r.removeClass("lm-MenuBar-menu"),t&&this.update())}clearMenus(){if(0!==this._menus.length){for(let e of(this._closeChildMenu(),this._menus))e.aboutToClose.disconnect(this._onMenuAboutToClose,this),e.menuRequested.disconnect(this._onMenuMenuRequested,this),e.title.changed.disconnect(this._onTitleChanged,this),e.removeClass("lm-MenuBar-menu");this._menus.length=0,this.update()}}handleEvent(e){switch(e.type){case"keydown":this._evtKeyDown(e);break;case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"focusout":this._evtFocusOut(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("keydown",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("focusout",this),this.node.addEventListener("contextmenu",this)}onAfterDetach(e){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("focusout",this),this.node.removeEventListener("contextmenu",this),this._closeChildMenu()}onActivateRequest(e){this.isAttached&&this._focusItemAt(0)}onResize(e){this.update(),super.onResize(e)}onUpdateRequest(e){var t;let r=this._menus,i=this.renderer,n=this._activeIndex,a=this._tabFocusIndex>=0&&this._tabFocusIndex-1?this._overflowIndex:r.length,s=0,l=!1,c=Array(o=null!==this._overflowMenu?o-1:o);for(let e=0;e{this._tabFocusIndex=e,this.activeIndex=e}}),s+=this._menuItemSizes[e],r[e].title.label===this._overflowMenuOptions.title&&(l=!0,o--);if(this._overflowMenuOptions.isVisible){if(this._overflowIndex>-1&&!l){if(null===this._overflowMenu){let e=null!=(t=this._overflowMenuOptions.title)?t:"...";this._overflowMenu=new tv({commands:new eA}),this._overflowMenu.title.label=e,this._overflowMenu.title.mnemonic=0,this.addMenu(this._overflowMenu,!1)}for(let e=r.length-2;e>=o;e--){let t=this.menus[e];t.title.mnemonic=0,this._overflowMenu.insertItem(0,{type:"submenu",submenu:t}),this.removeMenu(t,!1)}c[o]=i.renderItem({title:this._overflowMenu.title,active:o===n&&0!==r[o].items.length,tabbable:o===a,disabled:0===r[o].items.length,onfocus:()=>{this._tabFocusIndex=o,this.activeIndex=o}}),o++}else if(null!==this._overflowMenu){let e=this._overflowMenu.items,t=this.node.offsetWidth,n=this._overflowMenu.items.length;for(let l=0;lthis._menuItemSizes[n]){let t=e[0].submenu;this._overflowMenu.removeItemAt(0),this.insertMenu(o,t,!1),c[o]=i.renderItem({title:t.title,active:!1,tabbable:o===a,disabled:0===r[o].items.length,onfocus:()=>{this._tabFocusIndex=o,this.activeIndex=o}}),o++}}0===this._overflowMenu.items.length&&(this.removeMenu(this._overflowMenu,!1),c.pop(),this._overflowMenu=null,this._overflowIndex=-1)}}eN.render(c,this.contentNode),this._updateOverflowIndex()}_updateOverflowIndex(){if(!this._overflowMenuOptions.isVisible)return;let e=this.contentNode.childNodes,t=this.node.offsetWidth,r=0,i=-1,n=e.length;if(0==this._menuItemSizes.length)for(let a=0;at&&-1===i&&(i=a)}else for(let e=0;et){i=e;break}this._overflowIndex=i}_evtKeyDown(e){let t=e.keyCode;if(9===t){this.activeIndex=-1;return}if(e.preventDefault(),e.stopPropagation(),13===t||32===t||38===t||40===t){if(this.activeIndex=this._tabFocusIndex,this.activeIndex!==this._tabFocusIndex)return;this.openActiveMenu();return}if(27===t){this._closeChildMenu(),this._focusItemAt(this.activeIndex);return}if(37===t||39===t){let e=37===t?-1:1,r=this._tabFocusIndex+e,i=this._menus.length;for(let t=0;t$.hitTest(t,e.clientX,e.clientY));if(-1===t)return void this._closeChildMenu();if(0===e.button)if(this._childMenu)this._closeChildMenu(),this.activeIndex=t;else{e.preventDefault();let r=this._positionForMenu(t);tv.saveWindowData(),this.activeIndex=t,this._openChildMenu(r)}}_evtMouseMove(e){let t=B.ArrayExt.findFirstIndex(this.contentNode.children,t=>$.hitTest(t,e.clientX,e.clientY));if(t===this._activeIndex||-1===t&&this._childMenu)return;let r=t>=0&&this._childMenu?this._positionForMenu(t):null;tv.saveWindowData(),this.activeIndex=t,r&&this._openChildMenu(r)}_positionForMenu(e){let{left:t,bottom:r}=this.contentNode.children[e].getBoundingClientRect();return{top:r,left:t}}_evtFocusOut(e){this._childMenu||this.node.contains(e.relatedTarget)||(this.activeIndex=-1)}_focusItemAt(e){let t=this.contentNode.childNodes[e];t&&t.focus()}_openChildMenu(e={}){let t=this.activeMenu;if(!t)return void this._closeChildMenu();let r=this._childMenu;if(r===t)return;this._childMenu=t,r?r.close():document.addEventListener("mousedown",this,!0),this._tabFocusIndex=this.activeIndex,ee.sendMessage(this,eG.Msg.UpdateRequest);let{left:i,top:n}=e;(typeof i>"u"||typeof n>"u")&&({left:i,top:n}=this._positionForMenu(this._activeIndex)),r||this.addClass("lm-mod-active"),t.items.length>0&&t.open(i,n,this._forceItemsPosition)}_closeChildMenu(){if(!this._childMenu)return;this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0);let e=this._childMenu;this._childMenu=null,e.close(),this.activeIndex=-1}_onMenuAboutToClose(e){e===this._childMenu&&(this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)}_onMenuMenuRequested(e,t){if(e!==this._childMenu)return;let r=this._activeIndex,i=this._menus.length;switch(t){case"next":this.activeIndex=r===i-1?0:r+1;break;case"previous":this.activeIndex=0===r?i-1:r-1}this.openActiveMenu()}_onTitleChanged(){this.update()}},tW=tG||(tG={});class tY{renderItem(e){let t=this.createItemClass(e),r=this.createItemDataset(e),i=this.createItemARIA(e);return ez.li({className:t,dataset:r,...e.disabled?{}:{tabindex:e.tabbable?"0":"-1"},onfocus:e.onfocus,...i},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){let t=this.createIconClass(e);return ez.div({className:t},e.title.icon,e.title.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return ez.div({className:"lm-MenuBar-itemLabel"},t)}createItemClass(e){let t="lm-MenuBar-item";return e.title.className&&(t+=` ${e.title.className}`),e.active&&!e.disabled&&(t+=" lm-mod-active"),t}createItemDataset(e){return e.title.dataset}createItemARIA(e){return{role:"menuitem","aria-haspopup":"true","aria-disabled":e.disabled?"true":"false"}}createIconClass(e){let t="lm-MenuBar-itemIcon",r=e.title.iconClass;return r?`${t} ${r}`:t}formatLabel(e){let{label:t,mnemonic:r}=e.title;if(r<0||r>=t.length)return t;let i=t.slice(0,r),n=t.slice(r+1),a=t[r];return[i,ez.span({className:"lm-MenuBar-itemMnemonic"},a),n]}}tW.Renderer=tY,tW.defaultRenderer=new tY,(v=T||(T={})).createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-MenuBar-content",e.appendChild(t),t.setAttribute("role","menubar"),e},v.findMnemonic=function(e,t,r){let i=-1,n=-1,a=!1,o=t.toUpperCase();for(let t=0,s=e.length;t=0&&u1&&this.widgets.forEach(e=>{e.hiddenMode=this._hiddenMode}))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,super.dispose()}attachWidget(e,t){this._hiddenMode===eG.HiddenMode.Scale&&this._items.length>0?(1===this._items.length&&(this.widgets[0].hiddenMode=eG.HiddenMode.Scale),t.hiddenMode=eG.HiddenMode.Scale):t.hiddenMode=eG.HiddenMode.Display,B.ArrayExt.insert(this._items,e,new eJ(t)),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){B.ArrayExt.move(this._items,e,t),this.parent.update()}detachWidget(e,t){let r=B.ArrayExt.removeAt(this._items,e);this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterDetach),r.widget.node.style.zIndex="",this._hiddenMode===eG.HiddenMode.Scale&&(t.hiddenMode=eG.HiddenMode.Display,1===this._items.length&&(this._items[0].widget.hiddenMode=eG.HiddenMode.Display)),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let e=0,t=0;for(let r=0,i=this._items.length;r{this.createGraph(this._model)})}renderModel(e){if(this.hasGraphElement())return Promise.resolve();this._model=e;let t=e.data["image/png"];return null!=t?(this.updateImage(t),Promise.resolve()):this.createGraph(e)}hasGraphElement(){return null!==this.node.querySelector(".plot-container")}updateImage(e){this.hideGraph(),this._img_el.src="data:image/png;base64,"+e,this.showImage()}hideGraph(){let e=this.node.querySelector(".plot-container");null!=e&&(e.style.display="none")}showGraph(){let e=this.node.querySelector(".plot-container");null!=e&&(e.style.display="block")}hideImage(){let e=this.node.querySelector(".plot-img");null!=e&&(e.style.display="none")}showImage(){let e=this.node.querySelector(".plot-img");null!=e&&(e.style.display="block")}createGraph(t){let{data:r,layout:i,frames:n,config:a}=t.data[this._mimeType];return i.height||(i.height=360),(async()=>(null===e.Plotly&&(e.Plotly=await Promise.resolve().then(()=>O(j())),e._resolveLoadingPlotly()),e.loadingPlotly))().then(()=>e.Plotly.react(this.node,r,i,a)).then(r=>{this.showGraph(),this.hideImage(),this.update(),n&&e.Plotly.addFrames(this.node,n),this.node.offsetWidth>0&&this.node.offsetHeight>0&&e.Plotly.toImage(r,{format:"png",width:this.node.offsetWidth,height:this.node.offsetHeight}).then(e=>{let r=e.split(",")[1];t.data["image/png"]!==r&&t.setData({data:{...t.data,"image/png":r}})}),this.node.on("plotly_webglcontextlost",()=>{let e=t.data["image/png"];if(null!=e)return this.updateImage(e),Promise.resolve()})})}onAfterShow(e){this.update()}onResize(e){this.update()}onUpdateRequest(t){e.Plotly&&this.isVisible&&this.hasGraphElement()&&e.Plotly.redraw(this.node).then(()=>{e.Plotly.Plots.resize(this.node)})}static{this.Plotly=null}static{this.loadingPlotly=new Promise(t=>{e._resolveLoadingPlotly=t})}},tK={safe:!0,mimeTypes:[t$],createRenderer:e=>new tX(e)},tJ=[{id:"@jupyterlab/plotly-extension:factory",rendererFactory:tK,rank:2,dataType:"json",fileTypes:[{name:"plotly",mimeTypes:[t$],extensions:[".plotly",".plotly.json"],iconClass:"jp-MaterialIcon jp-PlotlyIcon"}],documentWidgetFactoryOptions:{name:"Plotly",primaryFileType:"plotly",fileTypes:["plotly","json"],defaultFor:["plotly"]}}];r.d(t,{MIME_TYPE:()=>t$,RenderedPlotly:()=>tX,default:()=>tJ,rendererFactory:()=>tK})},3(e){var t,r,i,n=e.exports={};function a(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var l=[],c=!1,u=-1;function h(){c&&i&&(c=!1,i.length?l=i.concat(l):u=-1,l.length&&d())}function d(){if(!c){var e=s(h);c=!0;for(var t=l.length;t;){for(i=l,l=[];++u1)for(var r=1;r{"use strict";var e,n,r,t,o,i,u,a,c,l,f,s,p,h,d,v,g,y,m,b,S,j,w,E,k,x,T,P,A,C,O,D,M,L,N,$,_,z={0(e,n,r){var t={"./index":()=>r.e(0).then(()=>()=>r(2)),"./mimeExtension":()=>r.e(0).then(()=>()=>r(2))},o=function(e,n){return r.R=n,n=r.o(t,e)?t[e]():Promise.resolve().then(()=>{throw Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,n},i=function(e,n){if(r.S){var t="default",o=r.S[t];if(o&&o!==e)throw Error("Container initialization failed as it has already been initialized with a different share scope");return r.S[t]=e,r.I(t,n)}};r.d(n,{get:()=>o,init:()=>i})}},I={};function R(e){var n=I[e];if(void 0!==n)return n.exports;var r=I[e]={exports:{}};return z[e](r,r.exports,R),r.exports}R.m=z,R.c=I,R.d=(e,n,r)=>{var t=(n,r)=>{for(var t in n)R.o(n,t)&&!R.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,[r]:n[t]})};t(n,"get"),t(r,"value")},R.f={},R.e=e=>Promise.all(Object.keys(R.f).reduce((n,r)=>(R.f[r](e,n),n),[])),R.u=e=>""+e+".e889754e73c03c32.js?v=e889754e73c03c32",R.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),R.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),U={},R.l=function(e,n,r,t){if(U[e])return void U[e].push(n);if(void 0!==r)for(var o,i,u=document.getElementsByTagName("script"),a=0;a{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},R.S={},R.initializeSharingData={scopeToSharingDataMapping:{default:[{name:"jupyterlab-plotly",version:"7.0.0",factory:()=>R.e(0).then(()=>()=>R(2)),eager:0,treeShakingMode:null}]},uniqueName:"jupyterlab-plotly"},q={},B={},R.I=function(e,n){n||(n=[]);var r=B[e];if(r||(r=B[e]={}),!(n.indexOf(r)>=0)){if(n.push(r),q[e])return q[e];R.o(R.S,e)||(R.S[e]={});var t=R.S[e],o=function(e){"u">typeof console&&console.warn&&console.warn(e)},i=R.initializeSharingData.uniqueName,u=function(e,n,r,o){var u=t[e]=t[e]||{},a=u[n];(!a||!a.loaded&&(!o!=!a.eager?o:i>a.from))&&(u[n]={get:r,from:i,eager:!!o})},a=function(r){var t=function(e){o("Initialization of sharing external failed: "+e)};try{var i=R(r);if(!i)return;var u=function(r){return r&&r.init&&r.init(R.S[e],n)};if(i.then)return c.push(i.then(u,t));var a=u(i);if(a&&a.then)return c.push(a.catch(t))}catch(e){t(e)}},c=[],l=R.initializeSharingData.scopeToSharingDataMapping;return(l[e]&&l[e].forEach(function(e){"object"==typeof e?u(e.name,e.version,e.factory,e.eager):a(e)}),c.length)?q[e]=Promise.all(c).then(function(){return q[e]=1}):q[e]=1}},R.g.importScripts&&(J=R.g.location+"");var U,q,B,J,Y=R.g.document;if(!J&&Y&&(Y.currentScript&&"SCRIPT"===Y.currentScript.tagName.toUpperCase()&&(J=Y.currentScript.src),!J)){var V=Y.getElementsByTagName("script");if(V.length)for(var F=V.length-1;F>-1&&(!J||!/^http(s?):/.test(J));)J=V[F--].src}if(!J)throw Error("Automatic publicPath is not supported in this browser");R.p=J=J.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),R.consumesLoadingData={chunkMapping:{},moduleIdToConsumeDataMapping:{},initialConsumes:[]},e=function(e){return e.split(".").map(function(e){return+e==e?+e:e})},n=function(n){var r=function(n){var r=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(n),t=r[1]?[0].concat(e(r[1])):[0];r[2]&&(t.length++,t.push.apply(t,e(r[2])));let o=t[t.length-1];for(;t.length&&(void 0===o||/^[*xX]$/.test(o));)t.pop(),o=t[t.length-1];return t},t=function(e){return 1===e.length?[0]:2===e.length?[1].concat(e.slice(1)):3===e.length?[2].concat(e.slice(1)):[e.length].concat(e.slice(1))},o=function(e){return[-e[0]-1].concat(e.slice(1))},i=function(e){let n=/^(\^|~|<=|<|>=|>|=|v|!)/.exec(e),i=n?n[0]:"",u=r(i.length?e.slice(i.length).trim():e.trim());switch(i){case"^":if(u.length>1&&0===u[1]){if(u.length>2&&0===u[2])return[3].concat(u.slice(1));return[2].concat(u.slice(1))}return[1].concat(u.slice(1));case"~":return[2].concat(u.slice(1));case">=":return u;case"=":case"v":case"":return t(u);case"<":return o(u);case">":return[,t(u),0,u,2];case"<=":return[,t(u),o(u),1];case"!":return[,t(u),0];default:throw Error("Unexpected start value")}},u=function(e,n){if(1===e.length)return e[0];let r=[];for(let n of e.slice().reverse())0 in n?r.push(n):r.push.apply(r,n.slice(1));return[,].concat(r,e.slice(1).map(()=>n))};return u(n.split(/\s*\|\|\s*/).map(function(e){let n=e.split(/\s+-\s+/);if(1===n.length){e=e.trim();let n=[],r=/[-0-9A-Za-z]\s+/g;for(var a,c=0;a=r.exec(e);){let r=a.index+1;n.push(i(e.slice(c,r).trim())),c=r}return n.push(i(e.slice(c).trim())),u(n,2)}let l=r(n[0]),f=r(n[1]);return[,t(f),o(f),1,l,2]}),1)},r=function(n){var r=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(n),t=r[1]?e(r[1]):[];return r[2]&&(t.length++,t.push.apply(t,e(r[2]))),r[3]&&(t.push([]),t.push.apply(t,e(r[3]))),t},t=function(e,n){e=r(e),n=r(n);for(var t=0;;){if(t>=e.length)return t=n.length)return"u"==i;var u=n[t],a=(typeof u)[0];if(i==a){if("o"!=i&&"u"!=i&&o!=u)return o=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var t=1,i=1;i0?".":"")+(t=2,u)}return r}for(var c=[],i=1;i=n.length||"o"==(f=(typeof(l=n[u]))[0])){if(!c)return!0;if("u"==s)return a>t&&!o;return""==s!=o}if("u"==f){if(!c||"u"!=s)return!1}else if(c)if(s==f)if(a<=t){if(l!=e[a])return!1}else{if(o?l>e[a]:ltypeof console&&console.warn&&console.warn(e)},y=function(e,n,r,t){g(d(e,n,r,t))},m=function(e){return e.loaded=1,e.get()},S=(b=function(e){return function(n,r,t,o){var i=R.I(n);return i&&i.then?i.then(e.bind(e,n,R.S[n],r,t,o)):e(n,R.S[n],r,t,o)}})(function(e,n,r){return u(e,r),m(a(n,r))}),j=b(function(e,n,r,t){return n&&R.o(n,r)?m(a(n,r)):t()}),w=b(function(e,n,r,t){return u(e,r),m(h(n,r,t)||y(n,e,r,t)||a(n,r))}),E=b(function(e,n,r){return u(e,r),f(n,e,r)}),k=b(function(e,n,r,t){return u(e,r),s(n,e,r,t)}),x=b(function(e,n,r,t){return u(e,r),v(n,e,r,t)}),T=b(function(e,n,r,t){return u(e,r),p(n,e,r,t)}),P=b(function(e,n,r,t,o){return n&&R.o(n,r)?m(h(n,r,t)||y(n,e,r,t)||a(n,r)):o()}),A=b(function(e,n,r,t){return n&&R.o(n,r)?f(n,e,r):t()}),C=b(function(e,n,r,t,o){return n&&R.o(n,r)?s(n,e,r,t):o()}),O=b(function(e,n,r,t,o){var i=n&&R.o(n,r)&&h(n,r,t);return i?m(i):o()}),D=b(function(e,n,r,t,o){return n&&R.o(n,r)?p(n,e,r,t):o()}),M=function(e){var r=!1,t=!1,o=!1,i=!1,u=[e.shareScope,e.shareKey];return(e.requiredVersion?(e.strictVersion&&(r=!0),e.singleton&&(t=!0),u.push(n(e.requiredVersion)),o=!0):e.singleton&&(t=!0),e.fallback&&(i=!0,u.push(e.fallback)),r&&t&&o&&i)?function(){return D.apply(null,u)}:r&&o&&i?function(){return O.apply(null,u)}:t&&o&&i?function(){return C.apply(null,u)}:r&&t&&o?function(){return T.apply(null,u)}:t&&i?function(){return A.apply(null,u)}:o&&i?function(){return P.apply(null,u)}:r&&o?function(){return x.apply(null,u)}:t&&o?function(){return k.apply(null,u)}:t?function(){return E.apply(null,u)}:o?function(){return w.apply(null,u)}:i?function(){return j.apply(null,u)}:function(){return S.apply(null,u)}},L={},R.f.consumes=function(e,n){var r=R.consumesLoadingData.moduleIdToConsumeDataMapping,t=R.consumesLoadingData.chunkMapping;R.o(t,e)&&t[e].forEach(function(e){if(R.o(L,e))return n.push(L[e]);var t=function(n){L[e]=0,R.m[e]=function(r){delete R.c[e],r.exports=n()}},o=function(n){delete L[e],R.m[e]=function(r){throw delete R.c[e],n}};try{var i=M(r[e])();i.then?n.push(L[e]=i.then(t).catch(o)):t(i)}catch(e){o(e)}})},N={1:0},R.f.j=function(e,n){var r=R.o(N,e)?N[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var t=new Promise((n,t)=>r=N[e]=[n,t]);n.push(r[2]=t);var o=R.p+R.u(e),i=Error();R.l(o,function(n){if(R.o(N,e)&&(0!==(r=N[e])&&(N[e]=void 0),r)){var t=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;i.message="Loading chunk "+e+" failed.\n("+t+": "+o+")",i.name="ChunkLoadError",i.type=t,i.request=o,r[1](i)}},"chunk-"+e,e)}},$=(e,n)=>{var r,t,[o,i,u]=n,a=0;if(o.some(e=>0!==N[e])){for(r in i)R.o(i,r)&&(R.m[r]=i[r]);u&&u(R)}for(e&&e(n);a{"use strict";var e,n,r,t,o,i,u,a,c,l,f,s,p,h,d,v,g,y,m,b,S,j,w,E,k,x,T,P,A,C,O,D,M,L,N,$,_,z={0(e,n,r){var t={"./index":()=>r.e(0).then(()=>()=>r(2)),"./mimeExtension":()=>r.e(0).then(()=>()=>r(2))},o=function(e,n){return r.R=n,n=r.o(t,e)?t[e]():Promise.resolve().then(()=>{throw Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,n},i=function(e,n){if(r.S){var t="default",o=r.S[t];if(o&&o!==e)throw Error("Container initialization failed as it has already been initialized with a different share scope");return r.S[t]=e,r.I(t,n)}};r.d(n,{get:()=>o,init:()=>i})}},I={};function R(e){var n=I[e];if(void 0!==n)return n.exports;var r=I[e]={exports:{}};return z[e](r,r.exports,R),r.exports}R.m=z,R.c=I,R.d=(e,n,r)=>{var t=(n,r)=>{for(var t in n)R.o(n,t)&&!R.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,[r]:n[t]})};t(n,"get"),t(r,"value")},R.f={},R.e=e=>Promise.all(Object.keys(R.f).reduce((n,r)=>(R.f[r](e,n),n),[])),R.u=e=>""+e+".8a60fe48f4849a5c.js?v=8a60fe48f4849a5c",R.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),R.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),U={},R.l=function(e,n,r,t){if(U[e])return void U[e].push(n);if(void 0!==r)for(var o,i,u=document.getElementsByTagName("script"),a=0;a{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},R.S={},R.initializeSharingData={scopeToSharingDataMapping:{default:[{name:"jupyterlab-plotly",version:"7.0.0",factory:()=>R.e(0).then(()=>()=>R(2)),eager:0,treeShakingMode:null}]},uniqueName:"jupyterlab-plotly"},q={},B={},R.I=function(e,n){n||(n=[]);var r=B[e];if(r||(r=B[e]={}),!(n.indexOf(r)>=0)){if(n.push(r),q[e])return q[e];R.o(R.S,e)||(R.S[e]={});var t=R.S[e],o=function(e){"u">typeof console&&console.warn&&console.warn(e)},i=R.initializeSharingData.uniqueName,u=function(e,n,r,o){var u=t[e]=t[e]||{},a=u[n];(!a||!a.loaded&&(!o!=!a.eager?o:i>a.from))&&(u[n]={get:r,from:i,eager:!!o})},a=function(r){var t=function(e){o("Initialization of sharing external failed: "+e)};try{var i=R(r);if(!i)return;var u=function(r){return r&&r.init&&r.init(R.S[e],n)};if(i.then)return c.push(i.then(u,t));var a=u(i);if(a&&a.then)return c.push(a.catch(t))}catch(e){t(e)}},c=[],l=R.initializeSharingData.scopeToSharingDataMapping;return(l[e]&&l[e].forEach(function(e){"object"==typeof e?u(e.name,e.version,e.factory,e.eager):a(e)}),c.length)?q[e]=Promise.all(c).then(function(){return q[e]=1}):q[e]=1}},R.g.importScripts&&(J=R.g.location+"");var U,q,B,J,Y=R.g.document;if(!J&&Y&&(Y.currentScript&&"SCRIPT"===Y.currentScript.tagName.toUpperCase()&&(J=Y.currentScript.src),!J)){var V=Y.getElementsByTagName("script");if(V.length)for(var F=V.length-1;F>-1&&(!J||!/^http(s?):/.test(J));)J=V[F--].src}if(!J)throw Error("Automatic publicPath is not supported in this browser");R.p=J=J.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),R.consumesLoadingData={chunkMapping:{},moduleIdToConsumeDataMapping:{},initialConsumes:[]},e=function(e){return e.split(".").map(function(e){return+e==e?+e:e})},n=function(n){var r=function(n){var r=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(n),t=r[1]?[0].concat(e(r[1])):[0];r[2]&&(t.length++,t.push.apply(t,e(r[2])));let o=t[t.length-1];for(;t.length&&(void 0===o||/^[*xX]$/.test(o));)t.pop(),o=t[t.length-1];return t},t=function(e){return 1===e.length?[0]:2===e.length?[1].concat(e.slice(1)):3===e.length?[2].concat(e.slice(1)):[e.length].concat(e.slice(1))},o=function(e){return[-e[0]-1].concat(e.slice(1))},i=function(e){let n=/^(\^|~|<=|<|>=|>|=|v|!)/.exec(e),i=n?n[0]:"",u=r(i.length?e.slice(i.length).trim():e.trim());switch(i){case"^":if(u.length>1&&0===u[1]){if(u.length>2&&0===u[2])return[3].concat(u.slice(1));return[2].concat(u.slice(1))}return[1].concat(u.slice(1));case"~":return[2].concat(u.slice(1));case">=":return u;case"=":case"v":case"":return t(u);case"<":return o(u);case">":return[,t(u),0,u,2];case"<=":return[,t(u),o(u),1];case"!":return[,t(u),0];default:throw Error("Unexpected start value")}},u=function(e,n){if(1===e.length)return e[0];let r=[];for(let n of e.slice().reverse())0 in n?r.push(n):r.push.apply(r,n.slice(1));return[,].concat(r,e.slice(1).map(()=>n))};return u(n.split(/\s*\|\|\s*/).map(function(e){let n=e.split(/\s+-\s+/);if(1===n.length){e=e.trim();let n=[],r=/[-0-9A-Za-z]\s+/g;for(var a,c=0;a=r.exec(e);){let r=a.index+1;n.push(i(e.slice(c,r).trim())),c=r}return n.push(i(e.slice(c).trim())),u(n,2)}let l=r(n[0]),f=r(n[1]);return[,t(f),o(f),1,l,2]}),1)},r=function(n){var r=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(n),t=r[1]?e(r[1]):[];return r[2]&&(t.length++,t.push.apply(t,e(r[2]))),r[3]&&(t.push([]),t.push.apply(t,e(r[3]))),t},t=function(e,n){e=r(e),n=r(n);for(var t=0;;){if(t>=e.length)return t=n.length)return"u"==i;var u=n[t],a=(typeof u)[0];if(i==a){if("o"!=i&&"u"!=i&&o!=u)return o=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var t=1,i=1;i0?".":"")+(t=2,u)}return r}for(var c=[],i=1;i=n.length||"o"==(f=(typeof(l=n[u]))[0])){if(!c)return!0;if("u"==s)return a>t&&!o;return""==s!=o}if("u"==f){if(!c||"u"!=s)return!1}else if(c)if(s==f)if(a<=t){if(l!=e[a])return!1}else{if(o?l>e[a]:ltypeof console&&console.warn&&console.warn(e)},y=function(e,n,r,t){g(d(e,n,r,t))},m=function(e){return e.loaded=1,e.get()},S=(b=function(e){return function(n,r,t,o){var i=R.I(n);return i&&i.then?i.then(e.bind(e,n,R.S[n],r,t,o)):e(n,R.S[n],r,t,o)}})(function(e,n,r){return u(e,r),m(a(n,r))}),j=b(function(e,n,r,t){return n&&R.o(n,r)?m(a(n,r)):t()}),w=b(function(e,n,r,t){return u(e,r),m(h(n,r,t)||y(n,e,r,t)||a(n,r))}),E=b(function(e,n,r){return u(e,r),f(n,e,r)}),k=b(function(e,n,r,t){return u(e,r),s(n,e,r,t)}),x=b(function(e,n,r,t){return u(e,r),v(n,e,r,t)}),T=b(function(e,n,r,t){return u(e,r),p(n,e,r,t)}),P=b(function(e,n,r,t,o){return n&&R.o(n,r)?m(h(n,r,t)||y(n,e,r,t)||a(n,r)):o()}),A=b(function(e,n,r,t){return n&&R.o(n,r)?f(n,e,r):t()}),C=b(function(e,n,r,t,o){return n&&R.o(n,r)?s(n,e,r,t):o()}),O=b(function(e,n,r,t,o){var i=n&&R.o(n,r)&&h(n,r,t);return i?m(i):o()}),D=b(function(e,n,r,t,o){return n&&R.o(n,r)?p(n,e,r,t):o()}),M=function(e){var r=!1,t=!1,o=!1,i=!1,u=[e.shareScope,e.shareKey];return(e.requiredVersion?(e.strictVersion&&(r=!0),e.singleton&&(t=!0),u.push(n(e.requiredVersion)),o=!0):e.singleton&&(t=!0),e.fallback&&(i=!0,u.push(e.fallback)),r&&t&&o&&i)?function(){return D.apply(null,u)}:r&&o&&i?function(){return O.apply(null,u)}:t&&o&&i?function(){return C.apply(null,u)}:r&&t&&o?function(){return T.apply(null,u)}:t&&i?function(){return A.apply(null,u)}:o&&i?function(){return P.apply(null,u)}:r&&o?function(){return x.apply(null,u)}:t&&o?function(){return k.apply(null,u)}:t?function(){return E.apply(null,u)}:o?function(){return w.apply(null,u)}:i?function(){return j.apply(null,u)}:function(){return S.apply(null,u)}},L={},R.f.consumes=function(e,n){var r=R.consumesLoadingData.moduleIdToConsumeDataMapping,t=R.consumesLoadingData.chunkMapping;R.o(t,e)&&t[e].forEach(function(e){if(R.o(L,e))return n.push(L[e]);var t=function(n){L[e]=0,R.m[e]=function(r){delete R.c[e],r.exports=n()}},o=function(n){delete L[e],R.m[e]=function(r){throw delete R.c[e],n}};try{var i=M(r[e])();i.then?n.push(L[e]=i.then(t).catch(o)):t(i)}catch(e){o(e)}})},N={1:0},R.f.j=function(e,n){var r=R.o(N,e)?N[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var t=new Promise((n,t)=>r=N[e]=[n,t]);n.push(r[2]=t);var o=R.p+R.u(e),i=Error();R.l(o,function(n){if(R.o(N,e)&&(0!==(r=N[e])&&(N[e]=void 0),r)){var t=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;i.message="Loading chunk "+e+" failed.\n("+t+": "+o+")",i.name="ChunkLoadError",i.type=t,i.request=o,r[1](i)}},"chunk-"+e,e)}},$=(e,n)=>{var r,t,[o,i,u]=n,a=0;if(o.some(e=>0!==N[e])){for(r in i)R.o(i,r)&&(R.m[r]=i[r]);u&&u(R)}for(e&&e(n);a { -"use strict";var Plotly=(()=>{var bat=Object.create;var T4=Object.defineProperty,wat=Object.defineProperties,Tat=Object.getOwnPropertyDescriptor,Aat=Object.getOwnPropertyDescriptors,Mat=Object.getOwnPropertyNames,YS=Object.getOwnPropertySymbols,Sat=Object.getPrototypeOf,GI=Object.prototype.hasOwnProperty,Ste=Object.prototype.propertyIsEnumerable;var VI=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Eat=e=>{throw TypeError(e)};var Mte=(e,t,r)=>t in e?T4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zo=(e,t)=>{for(var r in t||(t={}))GI.call(t,r)&&Mte(e,r,t[r]);if(YS)for(var r of YS(t))Ste.call(t,r)&&Mte(e,r,t[r]);return e},tl=(e,t)=>wat(e,Aat(t));var Ete=(e,t)=>{var r={};for(var n in e)GI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&YS)for(var n of YS(e))t.indexOf(n)<0&&Ste.call(e,n)&&(r[n]=e[n]);return r};var Co=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var fe=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},zp=(e,t)=>{for(var r in t)T4(e,r,{get:t[r],enumerable:!0})},kte=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Mat(t))!GI.call(e,a)&&a!==r&&T4(e,a,{get:()=>t[a],enumerable:!(n=Tat(t,a))||n.enumerable});return e};var $0=(e,t,r)=>(r=e!=null?bat(Sat(e)):{},kte(t||!e||!e.__esModule?T4(r,"default",{value:e,enumerable:!0}):r,e)),Gs=e=>kte(T4({},"__esModule",{value:!0}),e);var kat=function(e,t){this[0]=e,this[1]=t};var Cte=e=>{var t=e[VI("asyncIterator")],r=!1,n,a={};return t==null?(t=e[VI("iterator")](),n=i=>a[i]=o=>t[i](o)):(t=t.call(e),n=i=>a[i]=o=>{if(r){if(r=!1,i==="throw")throw o;return o}return r=!0,{done:!1,value:new kat(new Promise(s=>{var l=t[i](o);l instanceof Object||Eat("Object expected"),s(l)}),1)}}),a[VI("iterator")]=()=>a,n("next"),"throw"in t?n("throw"):a.throw=i=>{throw i},"return"in t&&n("return"),a};var A4=fe(Lte=>{"use strict";Lte.version="4.0.0"});var Fte=fe((Pte,XS)=>{(function(t,r,n){r[t]=r[t]||n(),typeof XS!="undefined"&&XS.exports&&(XS.exports=r[t])})("Promise",typeof window!="undefined"?window:Pte,function(){"use strict";var t,r,n,a=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(C){return setImmediate(C)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(C,k,S,L){return Object.defineProperty(C,k,{value:S,writable:!0,configurable:L!==!1})}}catch(y){t=function(k,S,L){return k[S]=L,k}}n=(function(){var C,k,S;function L(w,A){this.fn=w,this.self=A,this.next=void 0}return{add:function(A,T){S=new L(A,T),k?k.next=S:C=S,k=S,S=void 0},drain:function(){var A=C;for(C=k=r=void 0;A;)A.fn.call(A.self),A=A.next}}})();function o(y,C){n.add(y,C),r||(r=i(n.drain))}function s(y){var C,k=typeof y;return y!=null&&(k=="object"||k=="function")&&(C=y.then),typeof C=="function"?C:!1}function l(){for(var y=0;y0&&o(l,k))}catch(S){f.call(new g(k),S)}}}function f(y){var C=this;C.triggered||(C.triggered=!0,C.def&&(C=C.def),C.msg=y,C.state=2,C.chain.length>0&&o(l,C))}function v(y,C,k,S){for(var L=0;L{(function(){var e={version:"3.8.2"},t=[].slice,r=function(W){return t.call(W)},n=self.document;function a(W){return W&&(W.ownerDocument||W.document||W).documentElement}function i(W){return W&&(W.ownerDocument&&W.ownerDocument.defaultView||W.document&&W||W.defaultView)}if(n)try{r(n.documentElement.childNodes)[0].nodeType}catch(W){r=function(te){for(var ve=te.length,Se=new Array(ve);ve--;)Se[ve]=te[ve];return Se}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(W){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(te,ve){s.call(this,te,ve+"")},o.setAttributeNS=function(te,ve,Se){l.call(this,te,ve,Se+"")},u.setProperty=function(te,ve,Se){c.call(this,te,ve+"",Se)}}e.ascending=f;function f(W,te){return Wte?1:W>=te?0:NaN}e.descending=function(W,te){return teW?1:te>=W?0:NaN},e.min=function(W,te){var ve=-1,Se=W.length,Ee,Re;if(arguments.length===1){for(;++ve=Re){Ee=Re;break}for(;++veRe&&(Ee=Re)}else{for(;++ve=Re){Ee=Re;break}for(;++veRe&&(Ee=Re)}return Ee},e.max=function(W,te){var ve=-1,Se=W.length,Ee,Re;if(arguments.length===1){for(;++ve=Re){Ee=Re;break}for(;++veEe&&(Ee=Re)}else{for(;++ve=Re){Ee=Re;break}for(;++veEe&&(Ee=Re)}return Ee},e.extent=function(W,te){var ve=-1,Se=W.length,Ee,Re,rt;if(arguments.length===1){for(;++ve=Re){Ee=rt=Re;break}for(;++veRe&&(Ee=Re),rt=Re){Ee=rt=Re;break}for(;++veRe&&(Ee=Re),rt1)return rt/(pt-1)},e.deviation=function(){var W=e.variance.apply(this,arguments);return W&&Math.sqrt(W)};function p(W){return{left:function(te,ve,Se,Ee){for(arguments.length<3&&(Se=0),arguments.length<4&&(Ee=te.length);Se>>1;W(te[Re],ve)<0?Se=Re+1:Ee=Re}return Se},right:function(te,ve,Se,Ee){for(arguments.length<3&&(Se=0),arguments.length<4&&(Ee=te.length);Se>>1;W(te[Re],ve)>0?Ee=Re:Se=Re+1}return Se}}}var x=p(f);e.bisectLeft=x.left,e.bisect=e.bisectRight=x.right,e.bisector=function(W){return p(W.length===1?function(te,ve){return f(W(te),ve)}:W)},e.shuffle=function(W,te,ve){(Se=arguments.length)<3&&(ve=W.length,Se<2&&(te=0));for(var Se=ve-te,Ee,Re;Se;)Re=Math.random()*Se--|0,Ee=W[Se+te],W[Se+te]=W[Re+te],W[Re+te]=Ee;return W},e.permute=function(W,te){for(var ve=te.length,Se=new Array(ve);ve--;)Se[ve]=W[te[ve]];return Se},e.pairs=function(W){for(var te=0,ve=W.length-1,Se,Ee=W[0],Re=new Array(ve<0?0:ve);te=0;)for(rt=W[te],ve=rt.length;--ve>=0;)Re[--Ee]=rt[ve];return Re};var y=Math.abs;e.range=function(W,te,ve){if(arguments.length<3&&(ve=1,arguments.length<2&&(te=W,W=0)),(te-W)/ve===1/0)throw new Error("infinite range");var Se=[],Ee=C(y(ve)),Re=-1,rt;if(W*=Ee,te*=Ee,ve*=Ee,ve<0)for(;(rt=W+ve*++Re)>te;)Se.push(rt/Ee);else for(;(rt=W+ve*++Re)=te.length)return Ee?Ee.call(W,pt):Se?pt.sort(Se):pt;for(var Rt=-1,ir=pt.length,nr=te[Ft++],Cr,Vr,sr,br=new S,kr;++Rt=te.length)return He;var Ft=[],Rt=ve[pt++];return He.forEach(function(ir,nr){Ft.push({key:ir,values:rt(nr,pt)})}),Rt?Ft.sort(function(ir,nr){return Rt(ir.key,nr.key)}):Ft}return W.map=function(He,pt){return Re(pt,He,0)},W.entries=function(He){return rt(Re(e.map,He,0),0)},W.key=function(He){return te.push(He),W},W.sortKeys=function(He){return ve[te.length-1]=He,W},W.sortValues=function(He){return Se=He,W},W.rollup=function(He){return Ee=He,W},W},e.set=function(W){var te=new B;if(W)for(var ve=0,Se=W.length;ve=0&&(Se=W.slice(ve+1),W=W.slice(0,ve)),W)return arguments.length<2?this[W].on(Se):this[W].on(Se,te);if(arguments.length===2){if(te==null)for(W in this)this.hasOwnProperty(W)&&this[W].on(Se,null);return this}};function ee(W){var te=[],ve=new S;function Se(){for(var Ee=te,Re=-1,rt=Ee.length,He;++Re=0&&(ve=W.slice(0,te))!=="xmlns"&&(W=W.slice(te+1)),De.hasOwnProperty(ve)?{space:De[ve],local:W}:W}},ie.attr=function(W,te){if(arguments.length<2){if(typeof W=="string"){var ve=this.node();return W=e.ns.qualify(W),W.local?ve.getAttributeNS(W.space,W.local):ve.getAttribute(W)}for(te in W)this.each(Ge(te,W[te]));return this}return this.each(Ge(W,te))};function Ge(W,te){W=e.ns.qualify(W);function ve(){this.removeAttribute(W)}function Se(){this.removeAttributeNS(W.space,W.local)}function Ee(){this.setAttribute(W,te)}function Re(){this.setAttributeNS(W.space,W.local,te)}function rt(){var pt=te.apply(this,arguments);pt==null?this.removeAttribute(W):this.setAttribute(W,pt)}function He(){var pt=te.apply(this,arguments);pt==null?this.removeAttributeNS(W.space,W.local):this.setAttributeNS(W.space,W.local,pt)}return te==null?W.local?Se:ve:typeof te=="function"?W.local?He:rt:W.local?Re:Ee}function ht(W){return W.trim().replace(/\s+/g," ")}ie.classed=function(W,te){if(arguments.length<2){if(typeof W=="string"){var ve=this.node(),Se=(W=Oe(W)).length,Ee=-1;if(te=ve.classList){for(;++Ee=0;)(Re=ve[Se])&&(Ee&&Ee!==Re.nextSibling&&Ee.parentNode.insertBefore(Re,Ee),Ee=Re);return this},ie.sort=function(W){W=Ve.apply(this,arguments);for(var te=-1,ve=this.length;++te=te&&(te=Ee+1);!(pt=rt[te])&&++te0&&(W=W.slice(0,Ee));var rt=mt.get(W);rt&&(W=rt,Re=Yt);function He(){var Rt=this[Se];Rt&&(this.removeEventListener(W,Rt,Rt.$),delete this[Se])}function pt(){var Rt=Re(te,r(arguments));He.call(this),this.addEventListener(W,this[Se]=Rt,Rt.$=ve),Rt._=te}function Ft(){var Rt=new RegExp("^__on([^.]+)"+e.requote(W)+"$"),ir;for(var nr in this)if(ir=nr.match(Rt)){var Cr=this[nr];this.removeEventListener(ir[1],Cr,Cr.$),delete this[nr]}}return Ee?te?pt:He:te?U:Ft}var mt=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&mt.forEach(function(W){"on"+W in n&&mt.remove(W)});function bt(W,te){return function(ve){var Se=e.event;e.event=ve,te[0]=this.__data__;try{W.apply(this,te)}finally{e.event=Se}}}function Yt(W,te){var ve=bt(W,te);return function(Se){var Ee=this,Re=Se.relatedTarget;(!Re||Re!==Ee&&!(Re.compareDocumentPosition(Ee)&8))&&ve.call(Ee,Se)}}var jt,mr=0;function or(W){var te=".dragsuppress-"+ ++mr,ve="click"+te,Se=e.select(i(W)).on("touchmove"+te,ce).on("dragstart"+te,ce).on("selectstart"+te,ce);if(jt==null&&(jt="onselectstart"in W?!1:j(W.style,"userSelect")),jt){var Ee=a(W).style,Re=Ee[jt];Ee[jt]="none"}return function(rt){if(Se.on(te,null),jt&&(Ee[jt]=Re),rt){var He=function(){Se.on(ve,null)};Se.on(ve,function(){ce(),He()},!0),setTimeout(He,0)}}}e.mouse=function(W){return Ot(W,ye())};var fr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ot(W,te){te.changedTouches&&(te=te.changedTouches[0]);var ve=W.ownerSVGElement||W;if(ve.createSVGPoint){var Se=ve.createSVGPoint();if(fr<0){var Ee=i(W);if(Ee.scrollX||Ee.scrollY){ve=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Re=ve[0][0].getScreenCTM();fr=!(Re.f||Re.e),ve.remove()}}return fr?(Se.x=te.pageX,Se.y=te.pageY):(Se.x=te.clientX,Se.y=te.clientY),Se=Se.matrixTransform(W.getScreenCTM().inverse()),[Se.x,Se.y]}var rt=W.getBoundingClientRect();return[te.clientX-rt.left-W.clientLeft,te.clientY-rt.top-W.clientTop]}e.touch=function(W,te,ve){if(arguments.length<3&&(ve=te,te=ye().changedTouches),te){for(var Se=0,Ee=te.length,Re;Se0?1:W<0?-1:0}function Kr(W,te,ve){return(te[0]-W[0])*(ve[1]-W[1])-(te[1]-W[1])*(ve[0]-W[0])}function Nr(W){return W>1?0:W<-1?Tt:Math.acos(W)}function dn(W){return W>1?ft:W<-1?-ft:Math.asin(W)}function xr(W){return((W=Math.exp(W))-1/W)/2}function Fr(W){return((W=Math.exp(W))+1/W)/2}function Zr(W){return((W=Math.exp(2*W))-1)/(W+1)}function Cn(W){return(W=Math.sin(W/2))*W}var Dt=Math.SQRT2,At=2,Vt=4;e.interpolateZoom=function(W,te){var ve=W[0],Se=W[1],Ee=W[2],Re=te[0],rt=te[1],He=te[2],pt=Re-ve,Ft=rt-Se,Rt=pt*pt+Ft*Ft,ir,nr;if(Rt0&&($=$.transition().duration(rt)),$.call(Wr.event)}function Mi(){br&&br.domain(sr.range().map(function($){return($-W.x)/W.k}).map(sr.invert)),Gr&&Gr.domain(kr.range().map(function($){return($-W.y)/W.k}).map(kr.invert))}function Si($){He++||$({type:"zoomstart"})}function ya($){Mi(),$({type:"zoom",scale:W.k,translate:[W.x,W.y]})}function Y($){--He||($({type:"zoomend"}),ve=null)}function d(){var $=this,se=Vr.of($,arguments),de=0,Ae=e.select(i($)).on(Ft,Ye).on(Rt,st),Fe=Ar(e.mouse($)),Ie=or($);ua.call($),Si(se);function Ye(){de=1,Zn(e.mouse($),Fe),ya(se)}function st(){Ae.on(Ft,null).on(Rt,null),Ie(de),Y(se)}}function P(){var $=this,se=Vr.of($,arguments),de={},Ae=0,Fe,Ie=".zoom-"+e.event.changedTouches[0].identifier,Ye="touchmove"+Ie,st="touchend"+Ie,dt=[],Pe=e.select($),Xe=or($);xt(),Si(se),Pe.on(pt,null).on(nr,xt);function at(){var St=e.touches($);return Fe=W.k,St.forEach(function(Pt){Pt.identifier in de&&(de[Pt.identifier]=Ar(Pt))}),St}function xt(){var St=e.event.target;e.select(St).on(Ye,Et).on(st,Bt),dt.push(St);for(var Pt=e.event.changedTouches,$t=0,Ht=Pt.length;$t1){var Or=dr[0],$r=dr[1],Er=Or[0]-$r[0],Tr=Or[1]-$r[1];Ae=Er*Er+Tr*Tr}}function Et(){var St=e.touches($),Pt,$t,Ht,dr;ua.call($);for(var Xr=0,Or=St.length;Xr1?1:te,ve=ve<0?0:ve>1?1:ve,Ee=ve<=.5?ve*(1+te):ve+te-ve*te,Se=2*ve-Ee;function Re(He){return He>360?He-=360:He<0&&(He+=360),He<60?Se+(Ee-Se)*He/60:He<180?Ee:He<240?Se+(Ee-Se)*(240-He)/60:Se}function rt(He){return Math.round(Re(He)*255)}return new ao(rt(W+120),rt(W),rt(W-120))}e.hcl=Jn;function Jn(W,te,ve){return this instanceof Jn?(this.h=+W,this.c=+te,void(this.l=+ve)):arguments.length<2?W instanceof Jn?new Jn(W.h,W.c,W.l):W instanceof ra?ss(W.l,W.a,W.b):ss((W=Af((W=e.rgb(W)).r,W.g,W.b)).l,W.a,W.b):new Jn(W,te,ve)}var Ii=Jn.prototype=new rn;Ii.brighter=function(W){return new Jn(this.h,this.c,Math.min(100,this.l+ha*(arguments.length?W:1)))},Ii.darker=function(W){return new Jn(this.h,this.c,Math.max(0,this.l-ha*(arguments.length?W:1)))},Ii.rgb=function(){return Vi(this.h,this.c,this.l).rgb()};function Vi(W,te,ve){return isNaN(W)&&(W=0),isNaN(te)&&(te=0),new ra(ve,Math.cos(W*=kt)*te,Math.sin(W)*te)}e.lab=ra;function ra(W,te,ve){return this instanceof ra?(this.l=+W,this.a=+te,void(this.b=+ve)):arguments.length<2?W instanceof ra?new ra(W.l,W.a,W.b):W instanceof Jn?Vi(W.h,W.c,W.l):Af((W=ao(W)).r,W.g,W.b):new ra(W,te,ve)}var ha=18,va=.95047,Xi=1,oa=1.08883,Ma=ra.prototype=new rn;Ma.brighter=function(W){return new ra(Math.min(100,this.l+ha*(arguments.length?W:1)),this.a,this.b)},Ma.darker=function(W){return new ra(Math.max(0,this.l-ha*(arguments.length?W:1)),this.a,this.b)},Ma.rgb=function(){return Ga(this.l,this.a,this.b)};function Ga(W,te,ve){var Se=(W+16)/116,Ee=Se+te/500,Re=Se-ve/200;return Ee=mo(Ee)*va,Se=mo(Se)*Xi,Re=mo(Re)*oa,new ao(Eo(3.2404542*Ee-1.5371385*Se-.4985314*Re),Eo(-.969266*Ee+1.8760108*Se+.041556*Re),Eo(.0556434*Ee-.2040259*Se+1.0572252*Re))}function ss(W,te,ve){return W>0?new Jn(Math.atan2(ve,te)*rr,Math.sqrt(te*te+ve*ve),W):new Jn(NaN,NaN,W)}function mo(W){return W>.206893034?W*W*W:(W-4/29)/7.787037}function sl(W){return W>.008856?Math.pow(W,1/3):7.787037*W+4/29}function Eo(W){return Math.round(255*(W<=.00304?12.92*W:1.055*Math.pow(W,1/2.4)-.055))}e.rgb=ao;function ao(W,te,ve){return this instanceof ao?(this.r=~~W,this.g=~~te,void(this.b=~~ve)):arguments.length<2?W instanceof ao?new ao(W.r,W.g,W.b):su(""+W,ao,ri):new ao(W,te,ve)}function Da(W){return new ao(W>>16,W>>8&255,W&255)}function bl(W){return Da(W)+""}var bo=ao.prototype=new rn;bo.brighter=function(W){W=Math.pow(.7,arguments.length?W:1);var te=this.r,ve=this.g,Se=this.b,Ee=30;return!te&&!ve&&!Se?new ao(Ee,Ee,Ee):(te&&te>4,Se=Se>>4|Se,Ee=pt&240,Ee=Ee>>4|Ee,Re=pt&15,Re=Re<<4|Re):W.length===7&&(Se=(pt&16711680)>>16,Ee=(pt&65280)>>8,Re=pt&255)),te(Se,Ee,Re))}function fc(W,te,ve){var Se=Math.min(W/=255,te/=255,ve/=255),Ee=Math.max(W,te,ve),Re=Ee-Se,rt,He,pt=(Ee+Se)/2;return Re?(He=pt<.5?Re/(Ee+Se):Re/(2-Ee-Se),W==Ee?rt=(te-ve)/Re+(te0&&pt<1?0:rt),new Jr(rt,He,pt)}function Af(W,te,ve){W=ut(W),te=ut(te),ve=ut(ve);var Se=sl((.4124564*W+.3575761*te+.1804375*ve)/va),Ee=sl((.2126729*W+.7151522*te+.072175*ve)/Xi),Re=sl((.0193339*W+.119192*te+.9503041*ve)/oa);return ra(116*Ee-16,500*(Se-Ee),200*(Ee-Re))}function ut(W){return(W/=255)<=.04045?W/12.92:Math.pow((W+.055)/1.055,2.4)}function Jt(W){var te=parseFloat(W);return W.charAt(W.length-1)==="%"?Math.round(te*2.55):te}var er=e.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});er.forEach(function(W,te){er.set(W,Da(te))});function wr(W){return typeof W=="function"?W:function(){return W}}e.functor=wr,e.xhr=nn(O);function nn(W){return function(te,ve,Se){return arguments.length===2&&typeof ve=="function"&&(Se=ve,ve=null),Dr(te,ve,W,Se)}}function Dr(W,te,ve,Se){var Ee={},Re=e.dispatch("beforesend","progress","load","error"),rt={},He=new XMLHttpRequest,pt=null;self.XDomainRequest&&!("withCredentials"in He)&&/^(http(s)?:)?\/\//.test(W)&&(He=new XDomainRequest),"onload"in He?He.onload=He.onerror=Ft:He.onreadystatechange=function(){He.readyState>3&&Ft()};function Ft(){var Rt=He.status,ir;if(!Rt&&Yr(He)||Rt>=200&&Rt<300||Rt===304){try{ir=ve.call(Ee,He)}catch(nr){Re.error.call(Ee,nr);return}Re.load.call(Ee,ir)}else Re.error.call(Ee,He)}return He.onprogress=function(Rt){var ir=e.event;e.event=Rt;try{Re.progress.call(Ee,He)}finally{e.event=ir}},Ee.header=function(Rt,ir){return Rt=(Rt+"").toLowerCase(),arguments.length<2?rt[Rt]:(ir==null?delete rt[Rt]:rt[Rt]=ir+"",Ee)},Ee.mimeType=function(Rt){return arguments.length?(te=Rt==null?null:Rt+"",Ee):te},Ee.responseType=function(Rt){return arguments.length?(pt=Rt,Ee):pt},Ee.response=function(Rt){return ve=Rt,Ee},["get","post"].forEach(function(Rt){Ee[Rt]=function(){return Ee.send.apply(Ee,[Rt].concat(r(arguments)))}}),Ee.send=function(Rt,ir,nr){if(arguments.length===2&&typeof ir=="function"&&(nr=ir,ir=null),He.open(Rt,W,!0),te!=null&&!("accept"in rt)&&(rt.accept=te+",*/*"),He.setRequestHeader)for(var Cr in rt)He.setRequestHeader(Cr,rt[Cr]);return te!=null&&He.overrideMimeType&&He.overrideMimeType(te),pt!=null&&(He.responseType=pt),nr!=null&&Ee.on("error",nr).on("load",function(Vr){nr(null,Vr)}),Re.beforesend.call(Ee,He),He.send(ir==null?null:ir),Ee},Ee.abort=function(){return He.abort(),Ee},e.rebind(Ee,Re,"on"),Se==null?Ee:Ee.get(bn(Se))}function bn(W){return W.length===1?function(te,ve){W(te==null?ve:null)}:W}function Yr(W){var te=W.responseType;return te&&te!=="text"?W.response:W.responseText}e.dsv=function(W,te){var ve=new RegExp('["'+W+` -]`),Se=W.charCodeAt(0);function Ee(Ft,Rt,ir){arguments.length<3&&(ir=Rt,Rt=null);var nr=Dr(Ft,te,Rt==null?Re:rt(Rt),ir);return nr.row=function(Cr){return arguments.length?nr.response((Rt=Cr)==null?Re:rt(Cr)):Rt},nr}function Re(Ft){return Ee.parse(Ft.responseText)}function rt(Ft){return function(Rt){return Ee.parse(Rt.responseText,Ft)}}Ee.parse=function(Ft,Rt){var ir;return Ee.parseRows(Ft,function(nr,Cr){if(ir)return ir(nr,Cr-1);var Vr=function(sr){for(var br={},kr=nr.length,Gr=0;Gr=Vr)return nr;if(Gr)return Gr=!1,ir;var En=sr;if(Ft.charCodeAt(En)===34){for(var zn=En;zn++{var wat=Object.create;var A4=Object.defineProperty,Tat=Object.defineProperties,Aat=Object.getOwnPropertyDescriptor,Mat=Object.getOwnPropertyDescriptors,Sat=Object.getOwnPropertyNames,XS=Object.getOwnPropertySymbols,Eat=Object.getPrototypeOf,GI=Object.prototype.hasOwnProperty,Ste=Object.prototype.propertyIsEnumerable;var VI=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),kat=e=>{throw TypeError(e)};var Mte=(e,t,r)=>t in e?A4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zo=(e,t)=>{for(var r in t||(t={}))GI.call(t,r)&&Mte(e,r,t[r]);if(XS)for(var r of XS(t))Ste.call(t,r)&&Mte(e,r,t[r]);return e},tl=(e,t)=>Tat(e,Mat(t));var Ete=(e,t)=>{var r={};for(var n in e)GI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&XS)for(var n of XS(e))t.indexOf(n)<0&&Ste.call(e,n)&&(r[n]=e[n]);return r};var Lo=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var fe=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},zp=(e,t)=>{for(var r in t)A4(e,r,{get:t[r],enumerable:!0})},kte=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Sat(t))!GI.call(e,a)&&a!==r&&A4(e,a,{get:()=>t[a],enumerable:!(n=Aat(t,a))||n.enumerable});return e};var K0=(e,t,r)=>(r=e!=null?wat(Eat(e)):{},kte(t||!e||!e.__esModule?A4(r,"default",{value:e,enumerable:!0}):r,e)),Gs=e=>kte(A4({},"__esModule",{value:!0}),e);var Cat=function(e,t){this[0]=e,this[1]=t};var Cte=e=>{var t=e[VI("asyncIterator")],r=!1,n,a={};return t==null?(t=e[VI("iterator")](),n=i=>a[i]=o=>t[i](o)):(t=t.call(e),n=i=>a[i]=o=>{if(r){if(r=!1,i==="throw")throw o;return o}return r=!0,{done:!1,value:new Cat(new Promise(s=>{var l=t[i](o);l instanceof Object||kat("Object expected"),s(l)}),1)}}),a[VI("iterator")]=()=>a,n("next"),"throw"in t?n("throw"):a.throw=i=>{throw i},"return"in t&&n("return"),a};var M4=fe(Lte=>{"use strict";Lte.version="4.1.0"});var Fte=fe((Pte,ZS)=>{(function(t,r,n){r[t]=r[t]||n(),typeof ZS!="undefined"&&ZS.exports&&(ZS.exports=r[t])})("Promise",typeof window!="undefined"?window:Pte,function(){"use strict";var t,r,n,a=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(C){return setImmediate(C)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(C,k,S,L){return Object.defineProperty(C,k,{value:S,writable:!0,configurable:L!==!1})}}catch(y){t=function(k,S,L){return k[S]=L,k}}n=(function(){var C,k,S;function L(w,T){this.fn=w,this.self=T,this.next=void 0}return{add:function(T,A){S=new L(T,A),k?k.next=S:C=S,k=S,S=void 0},drain:function(){var T=C;for(C=k=r=void 0;T;)T.fn.call(T.self),T=T.next}}})();function o(y,C){n.add(y,C),r||(r=i(n.drain))}function s(y){var C,k=typeof y;return y!=null&&(k=="object"||k=="function")&&(C=y.then),typeof C=="function"?C:!1}function l(){for(var y=0;y0&&o(l,k))}catch(S){f.call(new g(k),S)}}}function f(y){var C=this;C.triggered||(C.triggered=!0,C.def&&(C=C.def),C.msg=y,C.state=2,C.chain.length>0&&o(l,C))}function v(y,C,k,S){for(var L=0;L{(function(){var e={version:"3.8.2"},t=[].slice,r=function(W){return t.call(W)},n=self.document;function a(W){return W&&(W.ownerDocument||W.document||W).documentElement}function i(W){return W&&(W.ownerDocument&&W.ownerDocument.defaultView||W.document&&W||W.defaultView)}if(n)try{r(n.documentElement.childNodes)[0].nodeType}catch(W){r=function(te){for(var ve=te.length,Se=new Array(ve);ve--;)Se[ve]=te[ve];return Se}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(W){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(te,ve){s.call(this,te,ve+"")},o.setAttributeNS=function(te,ve,Se){l.call(this,te,ve,Se+"")},u.setProperty=function(te,ve,Se){c.call(this,te,ve+"",Se)}}e.ascending=f;function f(W,te){return Wte?1:W>=te?0:NaN}e.descending=function(W,te){return teW?1:te>=W?0:NaN},e.min=function(W,te){var ve=-1,Se=W.length,Ee,Re;if(arguments.length===1){for(;++ve=Re){Ee=Re;break}for(;++veRe&&(Ee=Re)}else{for(;++ve=Re){Ee=Re;break}for(;++veRe&&(Ee=Re)}return Ee},e.max=function(W,te){var ve=-1,Se=W.length,Ee,Re;if(arguments.length===1){for(;++ve=Re){Ee=Re;break}for(;++veEe&&(Ee=Re)}else{for(;++ve=Re){Ee=Re;break}for(;++veEe&&(Ee=Re)}return Ee},e.extent=function(W,te){var ve=-1,Se=W.length,Ee,Re,nt;if(arguments.length===1){for(;++ve=Re){Ee=nt=Re;break}for(;++veRe&&(Ee=Re),nt=Re){Ee=nt=Re;break}for(;++veRe&&(Ee=Re),nt1)return nt/(vt-1)},e.deviation=function(){var W=e.variance.apply(this,arguments);return W&&Math.sqrt(W)};function p(W){return{left:function(te,ve,Se,Ee){for(arguments.length<3&&(Se=0),arguments.length<4&&(Ee=te.length);Se>>1;W(te[Re],ve)<0?Se=Re+1:Ee=Re}return Se},right:function(te,ve,Se,Ee){for(arguments.length<3&&(Se=0),arguments.length<4&&(Ee=te.length);Se>>1;W(te[Re],ve)>0?Ee=Re:Se=Re+1}return Se}}}var _=p(f);e.bisectLeft=_.left,e.bisect=e.bisectRight=_.right,e.bisector=function(W){return p(W.length===1?function(te,ve){return f(W(te),ve)}:W)},e.shuffle=function(W,te,ve){(Se=arguments.length)<3&&(ve=W.length,Se<2&&(te=0));for(var Se=ve-te,Ee,Re;Se;)Re=Math.random()*Se--|0,Ee=W[Se+te],W[Se+te]=W[Re+te],W[Re+te]=Ee;return W},e.permute=function(W,te){for(var ve=te.length,Se=new Array(ve);ve--;)Se[ve]=W[te[ve]];return Se},e.pairs=function(W){for(var te=0,ve=W.length-1,Se,Ee=W[0],Re=new Array(ve<0?0:ve);te=0;)for(nt=W[te],ve=nt.length;--ve>=0;)Re[--Ee]=nt[ve];return Re};var y=Math.abs;e.range=function(W,te,ve){if(arguments.length<3&&(ve=1,arguments.length<2&&(te=W,W=0)),(te-W)/ve===1/0)throw new Error("infinite range");var Se=[],Ee=C(y(ve)),Re=-1,nt;if(W*=Ee,te*=Ee,ve*=Ee,ve<0)for(;(nt=W+ve*++Re)>te;)Se.push(nt/Ee);else for(;(nt=W+ve*++Re)=te.length)return Ee?Ee.call(W,vt):Se?vt.sort(Se):vt;for(var Rt=-1,ir=vt.length,nr=te[Ft++],Cr,Vr,sr,br=new S,kr;++Rt=te.length)return He;var Ft=[],Rt=ve[vt++];return He.forEach(function(ir,nr){Ft.push({key:ir,values:nt(nr,vt)})}),Rt?Ft.sort(function(ir,nr){return Rt(ir.key,nr.key)}):Ft}return W.map=function(He,vt){return Re(vt,He,0)},W.entries=function(He){return nt(Re(e.map,He,0),0)},W.key=function(He){return te.push(He),W},W.sortKeys=function(He){return ve[te.length-1]=He,W},W.sortValues=function(He){return Se=He,W},W.rollup=function(He){return Ee=He,W},W},e.set=function(W){var te=new B;if(W)for(var ve=0,Se=W.length;ve=0&&(Se=W.slice(ve+1),W=W.slice(0,ve)),W)return arguments.length<2?this[W].on(Se):this[W].on(Se,te);if(arguments.length===2){if(te==null)for(W in this)this.hasOwnProperty(W)&&this[W].on(Se,null);return this}};function ee(W){var te=[],ve=new S;function Se(){for(var Ee=te,Re=-1,nt=Ee.length,He;++Re=0&&(ve=W.slice(0,te))!=="xmlns"&&(W=W.slice(te+1)),De.hasOwnProperty(ve)?{space:De[ve],local:W}:W}},ie.attr=function(W,te){if(arguments.length<2){if(typeof W=="string"){var ve=this.node();return W=e.ns.qualify(W),W.local?ve.getAttributeNS(W.space,W.local):ve.getAttribute(W)}for(te in W)this.each(Ge(te,W[te]));return this}return this.each(Ge(W,te))};function Ge(W,te){W=e.ns.qualify(W);function ve(){this.removeAttribute(W)}function Se(){this.removeAttributeNS(W.space,W.local)}function Ee(){this.setAttribute(W,te)}function Re(){this.setAttributeNS(W.space,W.local,te)}function nt(){var vt=te.apply(this,arguments);vt==null?this.removeAttribute(W):this.setAttribute(W,vt)}function He(){var vt=te.apply(this,arguments);vt==null?this.removeAttributeNS(W.space,W.local):this.setAttributeNS(W.space,W.local,vt)}return te==null?W.local?Se:ve:typeof te=="function"?W.local?He:nt:W.local?Re:Ee}function pt(W){return W.trim().replace(/\s+/g," ")}ie.classed=function(W,te){if(arguments.length<2){if(typeof W=="string"){var ve=this.node(),Se=(W=Oe(W)).length,Ee=-1;if(te=ve.classList){for(;++Ee=0;)(Re=ve[Se])&&(Ee&&Ee!==Re.nextSibling&&Ee.parentNode.insertBefore(Re,Ee),Ee=Re);return this},ie.sort=function(W){W=Ve.apply(this,arguments);for(var te=-1,ve=this.length;++te=te&&(te=Ee+1);!(vt=nt[te])&&++te0&&(W=W.slice(0,Ee));var nt=mt.get(W);nt&&(W=nt,Re=Yt);function He(){var Rt=this[Se];Rt&&(this.removeEventListener(W,Rt,Rt.$),delete this[Se])}function vt(){var Rt=Re(te,r(arguments));He.call(this),this.addEventListener(W,this[Se]=Rt,Rt.$=ve),Rt._=te}function Ft(){var Rt=new RegExp("^__on([^.]+)"+e.requote(W)+"$"),ir;for(var nr in this)if(ir=nr.match(Rt)){var Cr=this[nr];this.removeEventListener(ir[1],Cr,Cr.$),delete this[nr]}}return Ee?te?vt:He:te?V:Ft}var mt=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&mt.forEach(function(W){"on"+W in n&&mt.remove(W)});function bt(W,te){return function(ve){var Se=e.event;e.event=ve,te[0]=this.__data__;try{W.apply(this,te)}finally{e.event=Se}}}function Yt(W,te){var ve=bt(W,te);return function(Se){var Ee=this,Re=Se.relatedTarget;(!Re||Re!==Ee&&!(Re.compareDocumentPosition(Ee)&8))&&ve.call(Ee,Se)}}var jt,mr=0;function or(W){var te=".dragsuppress-"+ ++mr,ve="click"+te,Se=e.select(i(W)).on("touchmove"+te,ce).on("dragstart"+te,ce).on("selectstart"+te,ce);if(jt==null&&(jt="onselectstart"in W?!1:j(W.style,"userSelect")),jt){var Ee=a(W).style,Re=Ee[jt];Ee[jt]="none"}return function(nt){if(Se.on(te,null),jt&&(Ee[jt]=Re),nt){var He=function(){Se.on(ve,null)};Se.on(ve,function(){ce(),He()},!0),setTimeout(He,0)}}}e.mouse=function(W){return Ot(W,me())};var fr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ot(W,te){te.changedTouches&&(te=te.changedTouches[0]);var ve=W.ownerSVGElement||W;if(ve.createSVGPoint){var Se=ve.createSVGPoint();if(fr<0){var Ee=i(W);if(Ee.scrollX||Ee.scrollY){ve=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Re=ve[0][0].getScreenCTM();fr=!(Re.f||Re.e),ve.remove()}}return fr?(Se.x=te.pageX,Se.y=te.pageY):(Se.x=te.clientX,Se.y=te.clientY),Se=Se.matrixTransform(W.getScreenCTM().inverse()),[Se.x,Se.y]}var nt=W.getBoundingClientRect();return[te.clientX-nt.left-W.clientLeft,te.clientY-nt.top-W.clientTop]}e.touch=function(W,te,ve){if(arguments.length<3&&(ve=te,te=me().changedTouches),te){for(var Se=0,Ee=te.length,Re;Se0?1:W<0?-1:0}function Kr(W,te,ve){return(te[0]-W[0])*(ve[1]-W[1])-(te[1]-W[1])*(ve[0]-W[0])}function Nr(W){return W>1?0:W<-1?Tt:Math.acos(W)}function dn(W){return W>1?ft:W<-1?-ft:Math.asin(W)}function xr(W){return((W=Math.exp(W))-1/W)/2}function Fr(W){return((W=Math.exp(W))+1/W)/2}function Zr(W){return((W=Math.exp(2*W))-1)/(W+1)}function Cn(W){return(W=Math.sin(W/2))*W}var Dt=Math.SQRT2,At=2,Vt=4;e.interpolateZoom=function(W,te){var ve=W[0],Se=W[1],Ee=W[2],Re=te[0],nt=te[1],He=te[2],vt=Re-ve,Ft=nt-Se,Rt=vt*vt+Ft*Ft,ir,nr;if(Rt0&&($=$.transition().duration(nt)),$.call(Wr.event)}function Mi(){br&&br.domain(sr.range().map(function($){return($-W.x)/W.k}).map(sr.invert)),Gr&&Gr.domain(kr.range().map(function($){return($-W.y)/W.k}).map(kr.invert))}function Si($){He++||$({type:"zoomstart"})}function ya($){Mi(),$({type:"zoom",scale:W.k,translate:[W.x,W.y]})}function Y($){--He||($({type:"zoomend"}),ve=null)}function d(){var $=this,se=Vr.of($,arguments),de=0,Ae=e.select(i($)).on(Ft,Ye).on(Rt,st),Fe=Ar(e.mouse($)),Ie=or($);ua.call($),Si(se);function Ye(){de=1,Zn(e.mouse($),Fe),ya(se)}function st(){Ae.on(Ft,null).on(Rt,null),Ie(de),Y(se)}}function P(){var $=this,se=Vr.of($,arguments),de={},Ae=0,Fe,Ie=".zoom-"+e.event.changedTouches[0].identifier,Ye="touchmove"+Ie,st="touchend"+Ie,ht=[],Pe=e.select($),Xe=or($);xt(),Si(se),Pe.on(vt,null).on(nr,xt);function at(){var St=e.touches($);return Fe=W.k,St.forEach(function(Pt){Pt.identifier in de&&(de[Pt.identifier]=Ar(Pt))}),St}function xt(){var St=e.event.target;e.select(St).on(Ye,Et).on(st,Bt),ht.push(St);for(var Pt=e.event.changedTouches,$t=0,Ht=Pt.length;$t1){var Or=dr[0],$r=dr[1],Er=Or[0]-$r[0],Tr=Or[1]-$r[1];Ae=Er*Er+Tr*Tr}}function Et(){var St=e.touches($),Pt,$t,Ht,dr;ua.call($);for(var Xr=0,Or=St.length;Xr1?1:te,ve=ve<0?0:ve>1?1:ve,Ee=ve<=.5?ve*(1+te):ve+te-ve*te,Se=2*ve-Ee;function Re(He){return He>360?He-=360:He<0&&(He+=360),He<60?Se+(Ee-Se)*He/60:He<180?Ee:He<240?Se+(Ee-Se)*(240-He)/60:Se}function nt(He){return Math.round(Re(He)*255)}return new ao(nt(W+120),nt(W),nt(W-120))}e.hcl=Jn;function Jn(W,te,ve){return this instanceof Jn?(this.h=+W,this.c=+te,void(this.l=+ve)):arguments.length<2?W instanceof Jn?new Jn(W.h,W.c,W.l):W instanceof ra?ss(W.l,W.a,W.b):ss((W=Af((W=e.rgb(W)).r,W.g,W.b)).l,W.a,W.b):new Jn(W,te,ve)}var Ii=Jn.prototype=new rn;Ii.brighter=function(W){return new Jn(this.h,this.c,Math.min(100,this.l+ha*(arguments.length?W:1)))},Ii.darker=function(W){return new Jn(this.h,this.c,Math.max(0,this.l-ha*(arguments.length?W:1)))},Ii.rgb=function(){return Vi(this.h,this.c,this.l).rgb()};function Vi(W,te,ve){return isNaN(W)&&(W=0),isNaN(te)&&(te=0),new ra(ve,Math.cos(W*=kt)*te,Math.sin(W)*te)}e.lab=ra;function ra(W,te,ve){return this instanceof ra?(this.l=+W,this.a=+te,void(this.b=+ve)):arguments.length<2?W instanceof ra?new ra(W.l,W.a,W.b):W instanceof Jn?Vi(W.h,W.c,W.l):Af((W=ao(W)).r,W.g,W.b):new ra(W,te,ve)}var ha=18,va=.95047,Xi=1,oa=1.08883,Ma=ra.prototype=new rn;Ma.brighter=function(W){return new ra(Math.min(100,this.l+ha*(arguments.length?W:1)),this.a,this.b)},Ma.darker=function(W){return new ra(Math.max(0,this.l-ha*(arguments.length?W:1)),this.a,this.b)},Ma.rgb=function(){return Ga(this.l,this.a,this.b)};function Ga(W,te,ve){var Se=(W+16)/116,Ee=Se+te/500,Re=Se-ve/200;return Ee=yo(Ee)*va,Se=yo(Se)*Xi,Re=yo(Re)*oa,new ao(ko(3.2404542*Ee-1.5371385*Se-.4985314*Re),ko(-.969266*Ee+1.8760108*Se+.041556*Re),ko(.0556434*Ee-.2040259*Se+1.0572252*Re))}function ss(W,te,ve){return W>0?new Jn(Math.atan2(ve,te)*rr,Math.sqrt(te*te+ve*ve),W):new Jn(NaN,NaN,W)}function yo(W){return W>.206893034?W*W*W:(W-4/29)/7.787037}function sl(W){return W>.008856?Math.pow(W,1/3):7.787037*W+4/29}function ko(W){return Math.round(255*(W<=.00304?12.92*W:1.055*Math.pow(W,1/2.4)-.055))}e.rgb=ao;function ao(W,te,ve){return this instanceof ao?(this.r=~~W,this.g=~~te,void(this.b=~~ve)):arguments.length<2?W instanceof ao?new ao(W.r,W.g,W.b):su(""+W,ao,ri):new ao(W,te,ve)}function Da(W){return new ao(W>>16,W>>8&255,W&255)}function bl(W){return Da(W)+""}var wo=ao.prototype=new rn;wo.brighter=function(W){W=Math.pow(.7,arguments.length?W:1);var te=this.r,ve=this.g,Se=this.b,Ee=30;return!te&&!ve&&!Se?new ao(Ee,Ee,Ee):(te&&te>4,Se=Se>>4|Se,Ee=vt&240,Ee=Ee>>4|Ee,Re=vt&15,Re=Re<<4|Re):W.length===7&&(Se=(vt&16711680)>>16,Ee=(vt&65280)>>8,Re=vt&255)),te(Se,Ee,Re))}function fc(W,te,ve){var Se=Math.min(W/=255,te/=255,ve/=255),Ee=Math.max(W,te,ve),Re=Ee-Se,nt,He,vt=(Ee+Se)/2;return Re?(He=vt<.5?Re/(Ee+Se):Re/(2-Ee-Se),W==Ee?nt=(te-ve)/Re+(te0&&vt<1?0:nt),new Jr(nt,He,vt)}function Af(W,te,ve){W=ct(W),te=ct(te),ve=ct(ve);var Se=sl((.4124564*W+.3575761*te+.1804375*ve)/va),Ee=sl((.2126729*W+.7151522*te+.072175*ve)/Xi),Re=sl((.0193339*W+.119192*te+.9503041*ve)/oa);return ra(116*Ee-16,500*(Se-Ee),200*(Ee-Re))}function ct(W){return(W/=255)<=.04045?W/12.92:Math.pow((W+.055)/1.055,2.4)}function Jt(W){var te=parseFloat(W);return W.charAt(W.length-1)==="%"?Math.round(te*2.55):te}var er=e.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});er.forEach(function(W,te){er.set(W,Da(te))});function wr(W){return typeof W=="function"?W:function(){return W}}e.functor=wr,e.xhr=nn(O);function nn(W){return function(te,ve,Se){return arguments.length===2&&typeof ve=="function"&&(Se=ve,ve=null),Dr(te,ve,W,Se)}}function Dr(W,te,ve,Se){var Ee={},Re=e.dispatch("beforesend","progress","load","error"),nt={},He=new XMLHttpRequest,vt=null;self.XDomainRequest&&!("withCredentials"in He)&&/^(http(s)?:)?\/\//.test(W)&&(He=new XDomainRequest),"onload"in He?He.onload=He.onerror=Ft:He.onreadystatechange=function(){He.readyState>3&&Ft()};function Ft(){var Rt=He.status,ir;if(!Rt&&Yr(He)||Rt>=200&&Rt<300||Rt===304){try{ir=ve.call(Ee,He)}catch(nr){Re.error.call(Ee,nr);return}Re.load.call(Ee,ir)}else Re.error.call(Ee,He)}return He.onprogress=function(Rt){var ir=e.event;e.event=Rt;try{Re.progress.call(Ee,He)}finally{e.event=ir}},Ee.header=function(Rt,ir){return Rt=(Rt+"").toLowerCase(),arguments.length<2?nt[Rt]:(ir==null?delete nt[Rt]:nt[Rt]=ir+"",Ee)},Ee.mimeType=function(Rt){return arguments.length?(te=Rt==null?null:Rt+"",Ee):te},Ee.responseType=function(Rt){return arguments.length?(vt=Rt,Ee):vt},Ee.response=function(Rt){return ve=Rt,Ee},["get","post"].forEach(function(Rt){Ee[Rt]=function(){return Ee.send.apply(Ee,[Rt].concat(r(arguments)))}}),Ee.send=function(Rt,ir,nr){if(arguments.length===2&&typeof ir=="function"&&(nr=ir,ir=null),He.open(Rt,W,!0),te!=null&&!("accept"in nt)&&(nt.accept=te+",*/*"),He.setRequestHeader)for(var Cr in nt)He.setRequestHeader(Cr,nt[Cr]);return te!=null&&He.overrideMimeType&&He.overrideMimeType(te),vt!=null&&(He.responseType=vt),nr!=null&&Ee.on("error",nr).on("load",function(Vr){nr(null,Vr)}),Re.beforesend.call(Ee,He),He.send(ir==null?null:ir),Ee},Ee.abort=function(){return He.abort(),Ee},e.rebind(Ee,Re,"on"),Se==null?Ee:Ee.get(bn(Se))}function bn(W){return W.length===1?function(te,ve){W(te==null?ve:null)}:W}function Yr(W){var te=W.responseType;return te&&te!=="text"?W.response:W.responseText}e.dsv=function(W,te){var ve=new RegExp('["'+W+` +]`),Se=W.charCodeAt(0);function Ee(Ft,Rt,ir){arguments.length<3&&(ir=Rt,Rt=null);var nr=Dr(Ft,te,Rt==null?Re:nt(Rt),ir);return nr.row=function(Cr){return arguments.length?nr.response((Rt=Cr)==null?Re:nt(Cr)):Rt},nr}function Re(Ft){return Ee.parse(Ft.responseText)}function nt(Ft){return function(Rt){return Ee.parse(Rt.responseText,Ft)}}Ee.parse=function(Ft,Rt){var ir;return Ee.parseRows(Ft,function(nr,Cr){if(ir)return ir(nr,Cr-1);var Vr=function(sr){for(var br={},kr=nr.length,Gr=0;Gr=Vr)return nr;if(Gr)return Gr=!1,ir;var En=sr;if(Ft.charCodeAt(En)===34){for(var zn=En;zn++24?(isFinite(te)&&(clearTimeout(Ai),Ai=setTimeout(ii,te)),Qn=0):(Qn=1,Ji(ii))}e.timer.flush=function(){Za(),ja()};function Za(){for(var W=Date.now(),te=Tn;te;)W>=te.t&&te.c(W-te.t)&&(te.c=null),te=te.n;return W}function ja(){for(var W,te=Tn,ve=1/0;te;)te.c?(te.t=0;--He)sr.push(Ee[Ft[ir[He]][2]]);for(He=+Cr;He1&&Kr(W[ve[Se-2]],W[ve[Se-1]],W[Ee])<=0;)--Se;ve[Se++]=Ee}return ve.slice(0,Se)}function Oa(W,te){return W[0]-te[0]||W[1]-te[1]}e.geom.polygon=function(W){return K(W,Ni),W};var Ni=e.geom.polygon.prototype=[];Ni.area=function(){for(var W=-1,te=this.length,ve,Se=this[te-1],Ee=0;++WCt)He=He.L;else if(rt=te-Gu(He,ve),rt>Ct){if(!He.R){Se=He;break}He=He.R}else{Re>-Ct?(Se=He.P,Ee=He):rt>-Ct?(Se=He,Ee=He.N):Se=Ee=He;break}var pt=rs(W);if(ko.insert(Se,pt),!(!Se&&!Ee)){if(Se===Ee){Ca(Se),Ee=rs(Se.site),ko.insert(pt,Ee),pt.edge=Ee.edge=Mf(Se.site,pt.site),Ps(Se),Ps(Ee);return}if(!Ee){pt.edge=Mf(Se.site,pt.site);return}Ca(Se),Ca(Ee);var Ft=Se.site,Rt=Ft.x,ir=Ft.y,nr=W.x-Rt,Cr=W.y-ir,Vr=Ee.site,sr=Vr.x-Rt,br=Vr.y-ir,kr=2*(nr*br-Cr*sr),Gr=nr*nr+Cr*Cr,Wr=sr*sr+br*br,Ar={x:(br*Gr-Cr*Wr)/kr+Rt,y:(nr*Wr-sr*Gr)/kr+ir};Hu(Ee.edge,Ft,Vr,Ar),pt.edge=Mf(Ft,W,null,Ar),Ee.edge=Mf(W,Vr,null,Ar),Ps(Se),Ps(Ee)}}function _u(W,te){var ve=W.site,Se=ve.x,Ee=ve.y,Re=Ee-te;if(!Re)return Se;var rt=W.P;if(!rt)return-1/0;ve=rt.site;var He=ve.x,pt=ve.y,Ft=pt-te;if(!Ft)return He;var Rt=He-Se,ir=1/Re-1/Ft,nr=Rt/Ft;return ir?(-nr+Math.sqrt(nr*nr-2*ir*(Rt*Rt/(-2*Ft)-pt+Ft/2+Ee-Re/2)))/ir+Se:(Se+He)/2}function Gu(W,te){var ve=W.N;if(ve)return _u(ve,te);var Se=W.site;return Se.y===te?Se.x:1/0}function Ja(W){this.site=W,this.edges=[]}Ja.prototype.prepare=function(){for(var W=this.edges,te=W.length,ve;te--;)ve=W[te].edge,(!ve.b||!ve.a)&&W.splice(te,1);return W.sort(Sa),W.length};function ps(W){for(var te=W[0][0],ve=W[1][0],Se=W[0][1],Ee=W[1][1],Re,rt,He,pt,Ft=oo,Rt=Ft.length,ir,nr,Cr,Vr,sr,br;Rt--;)if(ir=Ft[Rt],!(!ir||!ir.prepare()))for(Cr=ir.edges,Vr=Cr.length,nr=0;nrCt||y(pt-rt)>Ct)&&(Cr.splice(nr,0,new Sf(Bd(ir.site,br,y(He-te)Ct?{x:te,y:y(Re-te)Ct?{x:y(rt-Ee)Ct?{x:ve,y:y(Re-ve)Ct?{x:y(rt-Se)=-wt)){var nr=pt*pt+Ft*Ft,Cr=Rt*Rt+br*br,Vr=(br*nr-Ft*Cr)/ir,sr=(pt*Cr-Rt*nr)/ir,br=sr+He,kr=Ms.pop()||new ma;kr.arc=W,kr.site=Ee,kr.x=Vr+rt,kr.y=br+Math.sqrt(Vr*Vr+sr*sr),kr.cy=br,W.circle=kr;for(var Gr=null,Wr=As._;Wr;)if(kr.y0)){if(sr/=Cr,Cr<0){if(sr0){if(sr>nr)return;sr>ir&&(ir=sr)}if(sr=ve-He,!(!Cr&&sr<0)){if(sr/=Cr,Cr<0){if(sr>nr)return;sr>ir&&(ir=sr)}else if(Cr>0){if(sr0)){if(sr/=Vr,Vr<0){if(sr0){if(sr>nr)return;sr>ir&&(ir=sr)}if(sr=Se-pt,!(!Vr&&sr<0)){if(sr/=Vr,Vr<0){if(sr>nr)return;sr>ir&&(ir=sr)}else if(Vr>0){if(sr0&&(Ee.a={x:He+ir*Cr,y:pt+ir*Vr}),nr<1&&(Ee.b={x:He+nr*Cr,y:pt+nr*Vr}),Ee}}}}}}function ll(W){for(var te=so,ve=Pl(W[0][0],W[0][1],W[1][0],W[1][1]),Se=te.length,Ee;Se--;)Ee=te[Se],(!Jc(Ee,W)||!ve(Ee)||y(Ee.a.x-Ee.b.x)=Re)return;if(Rt>nr){if(!Se)Se={x:Vr,y:rt};else if(Se.y>=He)return;ve={x:Vr,y:He}}else{if(!Se)Se={x:Vr,y:He};else if(Se.y1)if(Rt>nr){if(!Se)Se={x:(rt-kr)/br,y:rt};else if(Se.y>=He)return;ve={x:(He-kr)/br,y:He}}else{if(!Se)Se={x:(He-kr)/br,y:He};else if(Se.y=Re)return;ve={x:Re,y:br*Re+kr}}else{if(!Se)Se={x:Re,y:br*Re+kr};else if(Se.x=Rt&&kr.x<=nr&&kr.y>=ir&&kr.y<=Cr?[[Rt,Cr],[nr,Cr],[nr,ir],[Rt,ir]]:[];Gr.point=pt[sr]}),Ft}function He(pt){return pt.map(function(Ft,Rt){return{x:Math.round(Se(Ft,Rt)/Ct)*Ct,y:Math.round(Ee(Ft,Rt)/Ct)*Ct,i:Rt}})}return rt.links=function(pt){return ju(He(pt)).edges.filter(function(Ft){return Ft.l&&Ft.r}).map(function(Ft){return{source:pt[Ft.l.i],target:pt[Ft.r.i]}})},rt.triangles=function(pt){var Ft=[];return ju(He(pt)).cells.forEach(function(Rt,ir){for(var nr=Rt.site,Cr=Rt.edges.sort(Sa),Vr=-1,sr=Cr.length,br,kr,Gr=Cr[sr-1].edge,Wr=Gr.l===nr?Gr.r:Gr.l;++VrWr&&(Wr=Rt.x),Rt.y>Ar&&(Ar=Rt.y),Cr.push(Rt.x),Vr.push(Rt.y);else for(sr=0;srWr&&(Wr=En),zn>Ar&&(Ar=zn),Cr.push(En),Vr.push(zn)}var Zn=Wr-kr,ai=Ar-Gr;Zn>ai?Ar=Gr+Zn:Wr=kr+ai;function Mi(Y,d,P,N,H,$,se,de){if(!(isNaN(P)||isNaN(N)))if(Y.leaf){var Ae=Y.x,Fe=Y.y;if(Ae!=null)if(y(Ae-P)+y(Fe-N)<.01)Si(Y,d,P,N,H,$,se,de);else{var Ie=Y.point;Y.x=Y.y=Y.point=null,Si(Y,Ie,Ae,Fe,H,$,se,de),Si(Y,d,P,N,H,$,se,de)}else Y.x=P,Y.y=N,Y.point=d}else Si(Y,d,P,N,H,$,se,de)}function Si(Y,d,P,N,H,$,se,de){var Ae=(H+se)*.5,Fe=($+de)*.5,Ie=P>=Ae,Ye=N>=Fe,st=Ye<<1|Ie;Y.leaf=!1,Y=Y.nodes[st]||(Y.nodes[st]=Qc()),Ie?H=Ae:se=Ae,Ye?$=Fe:de=Fe,Mi(Y,d,P,N,H,$,se,de)}var ya=Qc();if(ya.add=function(Y){Mi(ya,Y,+ir(Y,++sr),+nr(Y,sr),kr,Gr,Wr,Ar)},ya.visit=function(Y){uu(Y,ya,kr,Gr,Wr,Ar)},ya.find=function(Y){return oh(ya,Y[0],Y[1],kr,Gr,Wr,Ar)},sr=-1,te==null){for(;++srRe||nr>rt||Cr=En,ai=ve>=zn,Mi=ai<<1|Zn,Si=Mi+4;Mive&&(Re=te.slice(ve,Re),He[rt]?He[rt]+=Re:He[++rt]=Re),(Se=Se[0])===(Ee=Ee[0])?He[rt]?He[rt]+=Ee:He[++rt]=Ee:(He[++rt]=null,pt.push({i:rt,x:Yo(Se,Ee)})),ve=Dl.lastIndex;return ve=0&&!(Se=e.interpolators[ve](W,te)););return Se}e.interpolators=[function(W,te){var ve=typeof te;return(ve==="string"?er.has(te.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(te)?hc:Ro:te instanceof rn?hc:Array.isArray(te)?ef:ve==="object"&&isNaN(te)?Fl:Yo)(W,te)}],e.interpolateArray=ef;function ef(W,te){var ve=[],Se=[],Ee=W.length,Re=te.length,rt=Math.min(W.length,te.length),He;for(He=0;He=0?W.slice(0,te):W,Se=te>=0?W.slice(te+1):"in";return ve=sh.get(ve)||Cc,Se=Y0.get(Se)||O,Nd(Se(ve.apply(null,t.call(arguments,1))))};function Nd(W){return function(te){return te<=0?0:te>=1?1:W(te)}}function Cf(W){return function(te){return 1-W(1-te)}}function Vo(W){return function(te){return .5*(te<.5?W(2*te):2-W(2-2*te))}}function Ud(W){return W*W}function zh(W){return W*W*W}function tf(W){if(W<=0)return 0;if(W>=1)return 1;var te=W*W,ve=te*W;return 4*(W<.5?ve:3*(W-te)+ve-.75)}function Vd(W){return function(te){return Math.pow(te,W)}}function rf(W){return 1-Math.cos(W*ft)}function qh(W){return Math.pow(2,10*(W-1))}function vc(W){return 1-Math.sqrt(1-W*W)}function dd(W,te){var ve;return arguments.length<2&&(te=.45),arguments.length?ve=te/Mt*Math.asin(1/W):(W=1,ve=te/4),function(Se){return 1+W*Math.pow(2,-10*Se)*Math.sin((Se-ve)*Mt/te)}}function Bh(W){return W||(W=1.70158),function(te){return te*te*((W+1)*te-W)}}function Wu(W){return W<1/2.75?7.5625*W*W:W<2/2.75?7.5625*(W-=1.5/2.75)*W+.75:W<2.5/2.75?7.5625*(W-=2.25/2.75)*W+.9375:7.5625*(W-=2.625/2.75)*W+.984375}e.interpolateHcl=vd;function vd(W,te){W=e.hcl(W),te=e.hcl(te);var ve=W.h,Se=W.c,Ee=W.l,Re=te.h-ve,rt=te.c-Se,He=te.l-Ee;return isNaN(rt)&&(rt=0,Se=isNaN(Se)?te.c:Se),isNaN(Re)?(Re=0,ve=isNaN(ve)?te.h:ve):Re>180?Re-=360:Re<-180&&(Re+=360),function(pt){return Vi(ve+Re*pt,Se+rt*pt,Ee+He*pt)+""}}e.interpolateHsl=pd;function pd(W,te){W=e.hsl(W),te=e.hsl(te);var ve=W.h,Se=W.s,Ee=W.l,Re=te.h-ve,rt=te.s-Se,He=te.l-Ee;return isNaN(rt)&&(rt=0,Se=isNaN(Se)?te.s:Se),isNaN(Re)?(Re=0,ve=isNaN(ve)?te.h:ve):Re>180?Re-=360:Re<-180&&(Re+=360),function(pt){return ri(ve+Re*pt,Se+rt*pt,Ee+He*pt)+""}}e.interpolateLab=lh;function lh(W,te){W=e.lab(W),te=e.lab(te);var ve=W.l,Se=W.a,Ee=W.b,Re=te.l-ve,rt=te.a-Se,He=te.b-Ee;return function(pt){return Ga(ve+Re*pt,Se+rt*pt,Ee+He*pt)+""}}e.interpolateRound=nf;function nf(W,te){return te-=W,function(ve){return Math.round(W+te*ve)}}e.transform=function(W){var te=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(ve){if(ve!=null){te.setAttribute("transform",ve);var Se=te.transform.baseVal.consolidate()}return new uh(Se?Se.matrix:ch)})(W)};function uh(W){var te=[W.a,W.b],ve=[W.c,W.d],Se=gd(te),Ee=af(te,ve),Re=gd(Rl(ve,te,-Ee))||0;te[0]*ve[1]180?te+=360:te-W>180&&(W+=360),Se.push({i:ve.push(Lc(ve)+"rotate(",null,")")-2,x:Yo(W,te)})):te&&ve.push(Lc(ve)+"rotate("+te+")")}function Lf(W,te,ve,Se){W!==te?Se.push({i:ve.push(Lc(ve)+"skewX(",null,")")-2,x:Yo(W,te)}):te&&ve.push(Lc(ve)+"skewX("+te+")")}function wu(W,te,ve,Se){if(W[0]!==te[0]||W[1]!==te[1]){var Ee=ve.push(Lc(ve)+"scale(",null,",",null,")");Se.push({i:Ee-4,x:Yo(W[0],te[0])},{i:Ee-2,x:Yo(W[1],te[1])})}else(te[0]!==1||te[1]!==1)&&ve.push(Lc(ve)+"scale("+te+")")}function fh(W,te){var ve=[],Se=[];return W=e.transform(W),te=e.transform(te),md(W.translate,te.translate,ve,Se),yd(W.rotate,te.rotate,ve,Se),Lf(W.skew,te.skew,ve,Se),wu(W.scale,te.scale,ve,Se),W=te=null,function(Ee){for(var Re=-1,rt=Se.length,He;++Re0?Re=Ar:(ve.c=null,ve.t=NaN,ve=null,te.end({type:"end",alpha:Re=0})):Ar>0&&(te.start({type:"start",alpha:Re=Ar}),ve=Ra(W.tick)),W):Re},W.start=function(){var Ar,En=Cr.length,zn=Vr.length,Zn=Se[0],ai=Se[1],Mi,Si;for(Ar=0;Ar=0;)Re.push(Rt=Ft[pt]),Rt.parent=He,Rt.depth=He.depth+1;ve&&(He.value=0),He.children=Ft}else ve&&(He.value=+ve.call(Se,He,He.depth)||0),delete He.children;return Il(Ee,function(ir){var nr,Cr;W&&(nr=ir.children)&&nr.sort(W),ve&&(Cr=ir.parent)&&(Cr.value+=ir.value)}),rt}return Se.sort=function(Ee){return arguments.length?(W=Ee,Se):W},Se.children=function(Ee){return arguments.length?(te=Ee,Se):te},Se.value=function(Ee){return arguments.length?(ve=Ee,Se):ve},Se.revalue=function(Ee){return ve&&(Au(Ee,function(Re){Re.children&&(Re.value=0)}),Il(Ee,function(Re){var rt;Re.children||(Re.value=+ve.call(Se,Re,Re.depth)||0),(rt=Re.parent)&&(rt.value+=Re.value)})),Ee},Se};function Tu(W,te){return e.rebind(W,te,"sort","children","value"),W.nodes=W,W.links=Tl,W}function Au(W,te){for(var ve=[W];(W=ve.pop())!=null;)if(te(W),(Ee=W.children)&&(Se=Ee.length))for(var Se,Ee;--Se>=0;)ve.push(Ee[Se])}function Il(W,te){for(var ve=[W],Se=[];(W=ve.pop())!=null;)if(Se.push(W),(rt=W.children)&&(Re=rt.length))for(var Ee=-1,Re,rt;++EeEe&&(Ee=He),Se.push(He)}for(rt=0;rtSe&&(ve=te,Se=Ee);return ve}function Gh(W){return W.reduce(Xu,0)}function Xu(W,te){return W+te[1]}e.layout.histogram=function(){var W=!0,te=Number,ve=Df,Se=Pc;function Ee(Re,nr){for(var He=[],pt=Re.map(te,this),Ft=ve.call(this,pt,nr),Rt=Se.call(this,Ft,pt,nr),ir,nr=-1,Cr=pt.length,Vr=Rt.length-1,sr=W?1:1/Cr,br;++nr0)for(nr=-1;++nr=Ft[0]&&br<=Ft[1]&&(ir=He[e.bisect(Rt,br,1,Vr)-1],ir.y+=sr,ir.push(Re[nr]));return He}return Ee.value=function(Re){return arguments.length?(te=Re,Ee):te},Ee.range=function(Re){return arguments.length?(ve=wr(Re),Ee):ve},Ee.bins=function(Re){return arguments.length?(Se=typeof Re=="number"?function(rt){return Ff(rt,Re)}:wr(Re),Ee):Se},Ee.frequency=function(Re){return arguments.length?(W=!!Re,Ee):W},Ee};function Pc(W,te){return Ff(W,Math.ceil(Math.log(te.length)/Math.LN2+1))}function Ff(W,te){for(var ve=-1,Se=+W[0],Ee=(W[1]-Se)/te,Re=[];++ve<=te;)Re[ve]=Ee*ve+Se;return Re}function Df(W){return[e.min(W),e.max(W)]}e.layout.pack=function(){var W=e.layout.hierarchy().sort(La),te=0,ve=[1,1],Se;function Ee(Re,rt){var He=W.call(this,Re,rt),pt=He[0],Ft=ve[0],Rt=ve[1],ir=Se==null?Math.sqrt:typeof Se=="function"?Se:function(){return Se};if(pt.x=pt.y=0,Il(pt,function(Cr){Cr.r=+ir(Cr.value)}),Il(pt,Hh),te){var nr=te*(Se?1:Math.max(2*pt.r/Ft,2*pt.r/Rt))/2;Il(pt,function(Cr){Cr.r+=nr}),Il(pt,Hh),Il(pt,function(Cr){Cr.r-=nr})}return Td(pt,Ft/2,Rt/2,Se?1:1/Math.max(2*pt.r/Ft,2*pt.r/Rt)),He}return Ee.size=function(Re){return arguments.length?(ve=Re,Ee):ve},Ee.radius=function(Re){return arguments.length?(Se=Re==null||typeof Re=="function"?Re:+Re,Ee):Se},Ee.padding=function(Re){return arguments.length?(te=+Re,Ee):te},Tu(Ee,W)};function La(W,te){return W.value-te.value}function Rf(W,te){var ve=W._pack_next;W._pack_next=te,te._pack_prev=W,te._pack_next=ve,ve._pack_prev=te}function m0(W,te){W._pack_next=te,te._pack_prev=W}function wd(W,te){var ve=te.x-W.x,Se=te.y-W.y,Ee=W.r+te.r;return .999*Ee*Ee>ve*ve+Se*Se}function Hh(W){if(!(te=W.children)||!(nr=te.length))return;var te,ve=1/0,Se=-1/0,Ee=1/0,Re=-1/0,rt,He,pt,Ft,Rt,ir,nr;function Cr(Ar){ve=Math.min(Ar.x-Ar.r,ve),Se=Math.max(Ar.x+Ar.r,Se),Ee=Math.min(Ar.y-Ar.r,Ee),Re=Math.max(Ar.y+Ar.r,Re)}if(te.forEach(X0),rt=te[0],rt.x=-rt.r,rt.y=0,Cr(rt),nr>1&&(He=te[1],He.x=He.r,He.y=0,Cr(He),nr>2))for(pt=te[2],ul(rt,He,pt),Cr(pt),Rf(rt,pt),rt._pack_prev=pt,Rf(pt,He),He=rt._pack_next,Ft=3;Ftbr.x&&(br=En),En.depth>kr.depth&&(kr=En)});var Gr=te(sr,br)/2-sr.x,Wr=ve[0]/(br.x+te(br,sr)/2+Gr),Ar=ve[1]/(kr.depth||1);Au(Cr,function(En){En.x=(En.x+Gr)*Wr,En.y=En.depth*Ar})}return nr}function Re(Rt){for(var ir={A:null,children:[Rt]},nr=[ir],Cr;(Cr=nr.pop())!=null;)for(var Vr=Cr.children,sr,br=0,kr=Vr.length;br0&&(zf(Ze(sr,Rt,nr),Rt,En),kr+=En,Gr+=En),Wr+=sr.m,kr+=Cr.m,Ar+=br.m,Gr+=Vr.m;sr&&!vh(Vr)&&(Vr.t=sr,Vr.m+=Wr-Gr),Cr&&!If(br)&&(br.t=Cr,br.m+=kr-Ar,nr=Rt)}return nr}function Ft(Rt){Rt.x*=ve[0],Rt.y=Rt.depth*ve[1]}return Ee.separation=function(Rt){return arguments.length?(te=Rt,Ee):te},Ee.size=function(Rt){return arguments.length?(Se=(ve=Rt)==null?Ft:null,Ee):Se?null:ve},Ee.nodeSize=function(Rt){return arguments.length?(Se=(ve=Rt)==null?null:Ft,Ee):Se?ve:null},Tu(Ee,W)};function Wl(W,te){return W.parent==te.parent?1:2}function If(W){var te=W.children;return te.length?te[0]:W.t}function vh(W){var te=W.children,ve;return(ve=te.length)?te[ve-1]:W.t}function zf(W,te,ve){var Se=ve/(te.i-W.i);te.c-=Se,te.s+=ve,W.c+=Se,te.z+=ve,te.m+=ve}function qf(W){for(var te=0,ve=0,Se=W.children,Ee=Se.length,Re;--Ee>=0;)Re=Se[Ee],Re.z+=te,Re.m+=te,te+=Re.s+(ve+=Re.c)}function Ze(W,te,ve){return W.a.parent===te.parent?W.a:ve}e.layout.cluster=function(){var W=e.layout.hierarchy().sort(null).value(null),te=Wl,ve=[1,1],Se=!1;function Ee(Re,rt){var He=W.call(this,Re,rt),pt=He[0],Ft,Rt=0;Il(pt,function(sr){var br=sr.children;br&&br.length?(sr.x=Wt(br),sr.y=yt(br)):(sr.x=Ft?Rt+=te(sr,Ft):0,sr.y=0,Ft=sr)});var ir=zt(pt),nr=hr(pt),Cr=ir.x-te(ir,nr)/2,Vr=nr.x+te(nr,ir)/2;return Il(pt,Se?function(sr){sr.x=(sr.x-pt.x)*ve[0],sr.y=(pt.y-sr.y)*ve[1]}:function(sr){sr.x=(sr.x-Cr)/(Vr-Cr)*ve[0],sr.y=(1-(pt.y?sr.y/pt.y:1))*ve[1]}),He}return Ee.separation=function(Re){return arguments.length?(te=Re,Ee):te},Ee.size=function(Re){return arguments.length?(Se=(ve=Re)==null,Ee):Se?null:ve},Ee.nodeSize=function(Re){return arguments.length?(Se=(ve=Re)!=null,Ee):Se?ve:null},Tu(Ee,W)};function yt(W){return 1+e.max(W,function(te){return te.y})}function Wt(W){return W.reduce(function(te,ve){return te+ve.x},0)/W.length}function zt(W){var te=W.children;return te&&te.length?zt(te[0]):W}function hr(W){var te=W.children,ve;return te&&(ve=te.length)?hr(te[ve-1]):W}e.layout.treemap=function(){var W=e.layout.hierarchy(),te=Math.round,ve=[1,1],Se=null,Ee=Ur,Re=!1,rt,He="squarify",pt=.5*(1+Math.sqrt(5));function Ft(sr,br){for(var kr=-1,Gr=sr.length,Wr,Ar;++kr0;)Gr.push(Ar=Wr[ai-1]),Gr.area+=Ar.area,He!=="squarify"||(zn=nr(Gr,Zn))<=En?(Wr.pop(),En=zn):(Gr.area-=Gr.pop().area,Cr(Gr,Zn,kr,!1),Zn=Math.min(kr.dx,kr.dy),Gr.length=Gr.area=0,En=1/0);Gr.length&&(Cr(Gr,Zn,kr,!0),Gr.length=Gr.area=0),br.forEach(Rt)}}function ir(sr){var br=sr.children;if(br&&br.length){var kr=Ee(sr),Gr=br.slice(),Wr,Ar=[];for(Ft(Gr,kr.dx*kr.dy/sr.value),Ar.area=0;Wr=Gr.pop();)Ar.push(Wr),Ar.area+=Wr.area,Wr.z!=null&&(Cr(Ar,Wr.z?kr.dx:kr.dy,kr,!Gr.length),Ar.length=Ar.area=0);br.forEach(ir)}}function nr(sr,br){for(var kr=sr.area,Gr,Wr=0,Ar=1/0,En=-1,zn=sr.length;++EnWr&&(Wr=Gr));return kr*=kr,br*=br,kr?Math.max(br*Wr*pt/kr,kr/(br*Ar*pt)):1/0}function Cr(sr,br,kr,Gr){var Wr=-1,Ar=sr.length,En=kr.x,zn=kr.y,Zn=br?te(sr.area/br):0,ai;if(br==kr.dx){for((Gr||Zn>kr.dy)&&(Zn=kr.dy);++Wrkr.dx)&&(Zn=kr.dx);++Wr1);return W+te*Se*Math.sqrt(-2*Math.log(Re)/Re)}},logNormal:function(){var W=e.random.normal.apply(e,arguments);return function(){return Math.exp(W())}},bates:function(W){var te=e.random.irwinHall(W);return function(){return te()/W}},irwinHall:function(W){return function(){for(var te=0,ve=0;ve2?Pn:Fn,Ft=Se?hh:Oh;return Ee=pt(W,te,Ft,ve),Re=pt(te,W,Ft,dc),He}function He(pt){return Ee(pt)}return He.invert=function(pt){return Re(pt)},He.domain=function(pt){return arguments.length?(W=pt.map(Number),rt()):W},He.range=function(pt){return arguments.length?(te=pt,rt()):te},He.rangeRound=function(pt){return He.range(pt).interpolate(nf)},He.clamp=function(pt){return arguments.length?(Se=pt,rt()):Se},He.interpolate=function(pt){return arguments.length?(ve=pt,rt()):ve},He.ticks=function(pt){return pi(W,pt)},He.tickFormat=function(pt,Ft){return d3_scale_linearTickFormat(W,pt,Ft)},He.nice=function(pt){return Ci(W,pt),rt()},He.copy=function(){return On(W,te,ve,Se)},rt()}function ki(W,te){return e.rebind(W,te,"range","rangeRound","interpolate","clamp")}function Ci(W,te){return en(W,vn(qi(W,te)[2])),en(W,vn(qi(W,te)[2])),W}function qi(W,te){te==null&&(te=10);var ve=cn(W),Se=ve[1]-ve[0],Ee=Math.pow(10,Math.floor(Math.log(Se/te)/Math.LN10)),Re=te/Se*Ee;return Re<=.15?Ee*=10:Re<=.35?Ee*=5:Re<=.75&&(Ee*=2),ve[0]=Math.ceil(ve[0]/Ee)*Ee,ve[1]=Math.floor(ve[1]/Ee)*Ee+Ee*.5,ve[2]=Ee,ve}function pi(W,te){return e.range.apply(e,qi(W,te))}var Un={s:1,g:1,p:1,r:1,e:1};function Gn(W){return-Math.floor(Math.log(W)/Math.LN10+.01)}function Zi(W,te){var ve=Gn(te[2]);return W in Un?Math.abs(ve-Gn(Math.max(y(te[0]),y(te[1]))))+ +(W!=="e"):ve-(W==="%")*2}e.scale.log=function(){return na(e.scale.linear().domain([0,1]),10,!0,[1,10])};function na(W,te,ve,Se){function Ee(He){return(ve?Math.log(He<0?0:He):-Math.log(He>0?0:-He))/Math.log(te)}function Re(He){return ve?Math.pow(te,He):-Math.pow(te,-He)}function rt(He){return W(Ee(He))}return rt.invert=function(He){return Re(W.invert(He))},rt.domain=function(He){return arguments.length?(ve=He[0]>=0,W.domain((Se=He.map(Number)).map(Ee)),rt):Se},rt.base=function(He){return arguments.length?(te=+He,W.domain(Se.map(Ee)),rt):te},rt.nice=function(){var He=en(Se.map(Ee),ve?Math:Ha);return W.domain(He),Se=He.map(Re),rt},rt.ticks=function(){var He=cn(Se),pt=[],Ft=He[0],Rt=He[1],ir=Math.floor(Ee(Ft)),nr=Math.ceil(Ee(Rt)),Cr=te%1?2:te;if(isFinite(nr-ir)){if(ve){for(;ir0;Vr--)pt.push(Re(ir)*Vr);for(ir=0;pt[ir]Rt;nr--);pt=pt.slice(ir,nr)}return pt},rt.copy=function(){return na(W.copy(),te,ve,Se)},ki(rt,W)}var Ha={floor:function(W){return-Math.ceil(-W)},ceil:function(W){return-Math.floor(-W)}};e.scale.pow=function(){return Qa(e.scale.linear(),1,[0,1])};function Qa(W,te,ve){var Se=Ya(te),Ee=Ya(1/te);function Re(rt){return W(Se(rt))}return Re.invert=function(rt){return Ee(W.invert(rt))},Re.domain=function(rt){return arguments.length?(W.domain((ve=rt.map(Number)).map(Se)),Re):ve},Re.ticks=function(rt){return pi(ve,rt)},Re.tickFormat=function(rt,He){return d3_scale_linearTickFormat(ve,rt,He)},Re.nice=function(rt){return Re.domain(Ci(ve,rt))},Re.exponent=function(rt){return arguments.length?(Se=Ya(te=rt),Ee=Ya(1/te),W.domain(ve.map(Se)),Re):te},Re.copy=function(){return Qa(W.copy(),te,ve)},ki(Re,W)}function Ya(W){return function(te){return te<0?-Math.pow(-te,W):Math.pow(te,W)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return ho([],{t:"range",a:[[]]})};function ho(W,te){var ve,Se,Ee;function Re(He){return Se[((ve.get(He)||(te.t==="range"?ve.set(He,W.push(He)):NaN))-1)%Se.length]}function rt(He,pt){return e.range(W.length).map(function(Ft){return He+pt*Ft})}return Re.domain=function(He){if(!arguments.length)return W;W=[],ve=new S;for(var pt=-1,Ft=He.length,Rt;++pt0?ve[Re-1]:W[0],Renr?0:1;if(Rt=Lt)return pt(Rt,Vr)+(Ft?pt(Ft,1-Vr):"")+"Z";var sr,br,kr,Gr,Wr=0,Ar=0,En,zn,Zn,ai,Mi,Si,ya,Y,d=[];if((Gr=(+rt.apply(this,arguments)||0)/2)&&(kr=Se===cu?Math.sqrt(Ft*Ft+Rt*Rt):+Se.apply(this,arguments),Vr||(Ar*=-1),Rt&&(Ar=dn(kr/Rt*Math.sin(Gr))),Ft&&(Wr=dn(kr/Ft*Math.sin(Gr)))),Rt){En=Rt*Math.cos(ir+Ar),zn=Rt*Math.sin(ir+Ar),Zn=Rt*Math.cos(nr-Ar),ai=Rt*Math.sin(nr-Ar);var P=Math.abs(nr-ir-2*Ar)<=Tt?0:1;if(Ar&&ph(En,zn,Zn,ai)===Vr^P){var N=(ir+nr)/2;En=Rt*Math.cos(N),zn=Rt*Math.sin(N),Zn=ai=null}}else En=zn=0;if(Ft){Mi=Ft*Math.cos(nr-Wr),Si=Ft*Math.sin(nr-Wr),ya=Ft*Math.cos(ir+Wr),Y=Ft*Math.sin(ir+Wr);var H=Math.abs(ir-nr+2*Wr)<=Tt?0:1;if(Wr&&ph(Mi,Si,ya,Y)===1-Vr^H){var $=(ir+nr)/2;Mi=Ft*Math.cos($),Si=Ft*Math.sin($),ya=Y=null}}else Mi=Si=0;if(Cr>Ct&&(sr=Math.min(Math.abs(Rt-Ft)/2,+ve.apply(this,arguments)))>.001){br=Ft0?0:1}function gh(W,te,ve,Se,Ee){var Re=W[0]-te[0],rt=W[1]-te[1],He=(Ee?Se:-Se)/Math.sqrt(Re*Re+rt*rt),pt=He*rt,Ft=-He*Re,Rt=W[0]+pt,ir=W[1]+Ft,nr=te[0]+pt,Cr=te[1]+Ft,Vr=(Rt+nr)/2,sr=(ir+Cr)/2,br=nr-Rt,kr=Cr-ir,Gr=br*br+kr*kr,Wr=ve-Se,Ar=Rt*Cr-nr*ir,En=(kr<0?-1:1)*Math.sqrt(Math.max(0,Wr*Wr*Gr-Ar*Ar)),zn=(Ar*kr-br*En)/Gr,Zn=(-Ar*br-kr*En)/Gr,ai=(Ar*kr+br*En)/Gr,Mi=(-Ar*br+kr*En)/Gr,Si=zn-Vr,ya=Zn-sr,Y=ai-Vr,d=Mi-sr;return Si*Si+ya*ya>Y*Y+d*d&&(zn=ai,Zn=Mi),[[zn-pt,Zn-Ft],[zn*ve/Wr,Zn*ve/Wr]]}function uf(){return!0}function Ku(W){var te=qo,ve=$a,Se=uf,Ee=Ju,Re=Ee.key,rt=.7;function He(pt){var Ft=[],Rt=[],ir=-1,nr=pt.length,Cr,Vr=wr(te),sr=wr(ve);function br(){Ft.push("M",Ee(W(Rt),rt))}for(;++ir1?W.join("L"):W+"Z"}function Qu(W){return W.join("L")+"Z"}function Wd(W){for(var te=0,ve=W.length,Se=W[0],Ee=[Se[0],",",Se[1]];++te1&&Ee.push("H",Se[0]),Ee.join("")}function x0(W){for(var te=0,ve=W.length,Se=W[0],Ee=[Se[0],",",Se[1]];++te1){He=te[1],Re=W[pt],pt++,Se+="C"+(Ee[0]+rt[0])+","+(Ee[1]+rt[1])+","+(Re[0]-He[0])+","+(Re[1]-He[1])+","+Re[0]+","+Re[1];for(var Ft=2;Ft9&&(Re=ve*3/Math.sqrt(Re),rt[He]=Re*Se,rt[He+1]=Re*Ee));for(He=-1;++He<=pt;)Re=(W[Math.min(pt,He+1)][0]-W[Math.max(0,He-1)][0])/(6*(1+rt[He]*rt[He])),te.push([Re||0,rt[He]*Re||0]);return te}function Gt(W){return W.length<3?Ju(W):W[0]+jh(W,lt(W))}e.svg.line.radial=function(){var W=Ku(Zt);return W.radius=W.x,delete W.x,W.angle=W.y,delete W.y,W};function Zt(W){for(var te,ve=-1,Se=W.length,Ee,Re;++veTt)+",1 "+ir}function Ft(Rt,ir,nr,Cr){return"Q 0,0 "+Cr}return Re.radius=function(Rt){return arguments.length?(ve=wr(Rt),Re):ve},Re.source=function(Rt){return arguments.length?(W=wr(Rt),Re):W},Re.target=function(Rt){return arguments.length?(te=wr(Rt),Re):te},Re.startAngle=function(Rt){return arguments.length?(Se=wr(Rt),Re):Se},Re.endAngle=function(Rt){return arguments.length?(Ee=wr(Rt),Re):Ee},Re};function Sr(W){return W.radius}e.svg.diagonal=function(){var W=Kt,te=ur,ve=Br;function Se(Ee,Re){var rt=W.call(this,Ee,Re),He=te.call(this,Ee,Re),pt=(rt.y+He.y)/2,Ft=[rt,{x:rt.x,y:pt},{x:He.x,y:pt},He];return Ft=Ft.map(ve),"M"+Ft[0]+"C"+Ft[1]+" "+Ft[2]+" "+Ft[3]}return Se.source=function(Ee){return arguments.length?(W=wr(Ee),Se):W},Se.target=function(Ee){return arguments.length?(te=wr(Ee),Se):te},Se.projection=function(Ee){return arguments.length?(ve=Ee,Se):ve},Se};function Br(W){return[W.x,W.y]}e.svg.diagonal.radial=function(){var W=e.svg.diagonal(),te=Br,ve=W.projection;return W.projection=function(Se){return arguments.length?ve(ln(te=Se)):te},W};function ln(W){return function(){var te=W.apply(this,arguments),ve=te[0],Se=te[1]-ft;return[ve*Math.cos(Se),ve*Math.sin(Se)]}}e.svg.symbol=function(){var W=In,te=wn;function ve(Se,Ee){return(Bi.get(W.call(this,Se,Ee))||gi)(te.call(this,Se,Ee))}return ve.type=function(Se){return arguments.length?(W=wr(Se),ve):W},ve.size=function(Se){return arguments.length?(te=wr(Se),ve):te},ve};function wn(){return 64}function In(){return"circle"}function gi(W){var te=Math.sqrt(W/Tt);return"M0,"+te+"A"+te+","+te+" 0 1,1 0,"+-te+"A"+te+","+te+" 0 1,1 0,"+te+"Z"}var Bi=e.map({circle:gi,cross:function(W){var te=Math.sqrt(W/5)/2;return"M"+-3*te+","+-te+"H"+-te+"V"+-3*te+"H"+te+"V"+-te+"H"+3*te+"V"+te+"H"+te+"V"+3*te+"H"+-te+"V"+te+"H"+-3*te+"Z"},diamond:function(W){var te=Math.sqrt(W/(2*ia)),ve=te*ia;return"M0,"+-te+"L"+ve+",0 0,"+te+" "+-ve+",0Z"},square:function(W){var te=Math.sqrt(W)/2;return"M"+-te+","+-te+"L"+te+","+-te+" "+te+","+te+" "+-te+","+te+"Z"},"triangle-down":function(W){var te=Math.sqrt(W/mi),ve=te*mi/2;return"M0,"+ve+"L"+te+","+-ve+" "+-te+","+-ve+"Z"},"triangle-up":function(W){var te=Math.sqrt(W/mi),ve=te*mi/2;return"M0,"+-ve+"L"+te+","+ve+" "+-te+","+ve+"Z"}});e.svg.symbolTypes=Bi.keys();var mi=Math.sqrt(3),ia=Math.tan(30*kt);ie.transition=function(W){for(var te=cl||++ls,ve=wi(W),Se=[],Ee,Re,rt=Eu||{time:Date.now(),ease:tf,delay:0,duration:250},He=-1,pt=this.length;++He0;)ir[--Gr].call(W,kr);if(br>=1)return rt.event&&rt.event.end.call(W,W.__data__,te),--Re.count?delete Re[Se]:delete W[ve],1}rt||(He=Ee.time,pt=Ra(nr,0,He),rt=Re[Se]={tween:new S,time:He,timer:pt,delay:Ee.delay,duration:Ee.duration,ease:Ee.ease,index:te},Ee=null,++Re.count)}e.svg.axis=function(){var W=e.scale.linear(),te=fl,ve=6,Se=6,Ee=3,Re=[10],rt=null,He;function pt(Ft){Ft.each(function(){var Rt=e.select(this),ir=this.__chart__||W,nr=this.__chart__=W.copy(),Cr=rt==null?nr.ticks?nr.ticks.apply(nr,Re):nr.domain():rt,Vr=He==null?nr.tickFormat?nr.tickFormat.apply(nr,Re):O:He,sr=Rt.selectAll(".tick").data(Cr,nr),br=sr.enter().insert("g",".domain").attr("class","tick").style("opacity",Ct),kr=e.transition(sr.exit()).style("opacity",Ct).remove(),Gr=e.transition(sr.order()).style("opacity",1),Wr=Math.max(ve,0)+Ee,Ar,En=yn(nr),zn=Rt.selectAll(".domain").data([0]),Zn=(zn.enter().append("path").attr("class","domain"),e.transition(zn));br.append("line"),br.append("text");var ai=br.select("line"),Mi=Gr.select("line"),Si=sr.select("text").text(Vr),ya=br.select("text"),Y=Gr.select("text"),d=te==="top"||te==="left"?-1:1,P,N,H,$;if(te==="bottom"||te==="top"?(Ar=du,P="x",H="y",N="x2",$="y2",Si.attr("dy",d<0?"0em":".71em").style("text-anchor","middle"),Zn.attr("d","M"+En[0]+","+d*Se+"V0H"+En[1]+"V"+d*Se)):(Ar=ms,P="y",H="x",N="y2",$="x2",Si.attr("dy",".32em").style("text-anchor",d<0?"end":"start"),Zn.attr("d","M"+d*Se+","+En[0]+"H0V"+En[1]+"H"+d*Se)),ai.attr($,d*ve),ya.attr(H,d*Wr),Mi.attr(N,0).attr($,d*ve),Y.attr(P,0).attr(H,d*Wr),nr.rangeBand){var se=nr,de=se.rangeBand()/2;ir=nr=function(Ae){return se(Ae)+de}}else ir.rangeBand?ir=nr:kr.call(Ar,nr,ir);br.call(Ar,ir,nr),Gr.call(Ar,nr,nr)})}return pt.scale=function(Ft){return arguments.length?(W=Ft,pt):W},pt.orient=function(Ft){return arguments.length?(te=Ft in Fc?Ft+"":fl,pt):te},pt.ticks=function(){return arguments.length?(Re=r(arguments),pt):Re},pt.tickValues=function(Ft){return arguments.length?(rt=Ft,pt):rt},pt.tickFormat=function(Ft){return arguments.length?(He=Ft,pt):He},pt.tickSize=function(Ft){var Rt=arguments.length;return Rt?(ve=+Ft,Se=+arguments[Rt-1],pt):ve},pt.innerTickSize=function(Ft){return arguments.length?(ve=+Ft,pt):ve},pt.outerTickSize=function(Ft){return arguments.length?(Se=+Ft,pt):Se},pt.tickPadding=function(Ft){return arguments.length?(Ee=+Ft,pt):Ee},pt.tickSubdivide=function(){return arguments.length&&pt},pt};var fl="bottom",Fc={top:1,right:1,bottom:1,left:1};function du(W,te,ve){W.attr("transform",function(Se){var Ee=te(Se);return"translate("+(isFinite(Ee)?Ee:ve(Se))+",0)"})}function ms(W,te,ve){W.attr("transform",function(Se){var Ee=te(Se);return"translate(0,"+(isFinite(Ee)?Ee:ve(Se))+")"})}e.svg.brush=function(){var W=xe(Rt,"brushstart","brush","brushend"),te=null,ve=null,Se=[0,0],Ee=[0,0],Re,rt,He=!0,pt=!0,Ft=ku[0];function Rt(sr){sr.each(function(){var br=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Vr).on("touchstart.brush",Vr),kr=br.selectAll(".background").data([0]);kr.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),br.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Gr=br.selectAll(".resize").data(Ft,O);Gr.exit().remove(),Gr.enter().append("g").attr("class",function(zn){return"resize "+zn}).style("cursor",function(zn){return ff[zn]}).append("rect").attr("x",function(zn){return/[ew]$/.test(zn)?-3:null}).attr("y",function(zn){return/^[ns]/.test(zn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Gr.style("display",Rt.empty()?"none":null);var Wr=e.transition(br),Ar=e.transition(kr),En;te&&(En=yn(te),Ar.attr("x",En[0]).attr("width",En[1]-En[0]),nr(Wr)),ve&&(En=yn(ve),Ar.attr("y",En[0]).attr("height",En[1]-En[0]),Cr(Wr)),ir(Wr)})}Rt.event=function(sr){sr.each(function(){var br=W.of(this,arguments),kr={x:Se,y:Ee,i:Re,j:rt},Gr=this.__chart__||kr;this.__chart__=kr,cl?e.select(this).transition().each("start.brush",function(){Re=Gr.i,rt=Gr.j,Se=Gr.x,Ee=Gr.y,br({type:"brushstart"})}).tween("brush:brush",function(){var Wr=ef(Se,kr.x),Ar=ef(Ee,kr.y);return Re=rt=null,function(En){Se=kr.x=Wr(En),Ee=kr.y=Ar(En),br({type:"brush",mode:"resize"})}}).each("end.brush",function(){Re=kr.i,rt=kr.j,br({type:"brush",mode:"resize"}),br({type:"brushend"})}):(br({type:"brushstart"}),br({type:"brush",mode:"resize"}),br({type:"brushend"}))})};function ir(sr){sr.selectAll(".resize").attr("transform",function(br){return"translate("+Se[+/e$/.test(br)]+","+Ee[+/^s/.test(br)]+")"})}function nr(sr){sr.select(".extent").attr("x",Se[0]),sr.selectAll(".extent,.n>rect,.s>rect").attr("width",Se[1]-Se[0])}function Cr(sr){sr.select(".extent").attr("y",Ee[0]),sr.selectAll(".extent,.e>rect,.w>rect").attr("height",Ee[1]-Ee[0])}function Vr(){var sr=this,br=e.select(e.event.target),kr=W.of(sr,arguments),Gr=e.select(sr),Wr=br.datum(),Ar=!/^(n|s)$/.test(Wr)&&te,En=!/^(e|w)$/.test(Wr)&&ve,zn=br.classed("extent"),Zn=or(sr),ai,Mi=e.mouse(sr),Si,ya=e.select(i(sr)).on("keydown.brush",P).on("keyup.brush",N);if(e.event.changedTouches?ya.on("touchmove.brush",H).on("touchend.brush",se):ya.on("mousemove.brush",H).on("mouseup.brush",se),Gr.interrupt().selectAll("*").interrupt(),zn)Mi[0]=Se[0]-Mi[0],Mi[1]=Ee[0]-Mi[1];else if(Wr){var Y=+/w$/.test(Wr),d=+/^n/.test(Wr);Si=[Se[1-Y]-Mi[0],Ee[1-d]-Mi[1]],Mi[0]=Se[Y],Mi[1]=Ee[d]}else e.event.altKey&&(ai=Mi.slice());Gr.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",br.style("cursor")),kr({type:"brushstart"}),H();function P(){e.event.keyCode==32&&(zn||(ai=null,Mi[0]-=Se[1],Mi[1]-=Ee[1],zn=2),ce())}function N(){e.event.keyCode==32&&zn==2&&(Mi[0]+=Se[1],Mi[1]+=Ee[1],zn=0,ce())}function H(){var de=e.mouse(sr),Ae=!1;Si&&(de[0]+=Si[0],de[1]+=Si[1]),zn||(e.event.altKey?(ai||(ai=[(Se[0]+Se[1])/2,(Ee[0]+Ee[1])/2]),Mi[0]=Se[+(de[0]{(function(e,t){typeof $S=="object"&&typeof Dte!="undefined"?t($S):(e=e||self,t(e.d3=e.d3||{}))})($S,function(e){"use strict";var t=new Date,r=new Date;function n(Te,Ve,$e,ot){function tt(nt){return Te(nt=arguments.length===0?new Date:new Date(+nt)),nt}return tt.floor=function(nt){return Te(nt=new Date(+nt)),nt},tt.ceil=function(nt){return Te(nt=new Date(nt-1)),Ve(nt,1),Te(nt),nt},tt.round=function(nt){var We=tt(nt),mt=tt.ceil(nt);return nt-We0))return bt;do bt.push(Yt=new Date(+nt)),Ve(nt,mt),Te(nt);while(Yt=We)for(;Te(We),!nt(We);)We.setTime(We-1)},function(We,mt){if(We>=We)if(mt<0)for(;++mt<=0;)for(;Ve(We,-1),!nt(We););else for(;--mt>=0;)for(;Ve(We,1),!nt(We););})},$e&&(tt.count=function(nt,We){return t.setTime(+nt),r.setTime(+We),Te(t),Te(r),Math.floor($e(t,r))},tt.every=function(nt){return nt=Math.floor(nt),!isFinite(nt)||!(nt>0)?null:nt>1?tt.filter(ot?function(We){return ot(We)%nt===0}:function(We){return tt.count(0,We)%nt===0}):tt}),tt}var a=n(function(){},function(Te,Ve){Te.setTime(+Te+Ve)},function(Te,Ve){return Ve-Te});a.every=function(Te){return Te=Math.floor(Te),!isFinite(Te)||!(Te>0)?null:Te>1?n(function(Ve){Ve.setTime(Math.floor(Ve/Te)*Te)},function(Ve,$e){Ve.setTime(+Ve+$e*Te)},function(Ve,$e){return($e-Ve)/Te}):a};var i=a.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=n(function(Te){Te.setTime(Te-Te.getMilliseconds())},function(Te,Ve){Te.setTime(+Te+Ve*o)},function(Te,Ve){return(Ve-Te)/o},function(Te){return Te.getUTCSeconds()}),v=f.range,g=n(function(Te){Te.setTime(Te-Te.getMilliseconds()-Te.getSeconds()*o)},function(Te,Ve){Te.setTime(+Te+Ve*s)},function(Te,Ve){return(Ve-Te)/s},function(Te){return Te.getMinutes()}),p=g.range,x=n(function(Te){Te.setTime(Te-Te.getMilliseconds()-Te.getSeconds()*o-Te.getMinutes()*s)},function(Te,Ve){Te.setTime(+Te+Ve*l)},function(Te,Ve){return(Ve-Te)/l},function(Te){return Te.getHours()}),_=x.range,y=n(function(Te){Te.setHours(0,0,0,0)},function(Te,Ve){Te.setDate(Te.getDate()+Ve)},function(Te,Ve){return(Ve-Te-(Ve.getTimezoneOffset()-Te.getTimezoneOffset())*s)/u},function(Te){return Te.getDate()-1}),C=y.range;function k(Te){return n(function(Ve){Ve.setDate(Ve.getDate()-(Ve.getDay()+7-Te)%7),Ve.setHours(0,0,0,0)},function(Ve,$e){Ve.setDate(Ve.getDate()+$e*7)},function(Ve,$e){return($e-Ve-($e.getTimezoneOffset()-Ve.getTimezoneOffset())*s)/c})}var S=k(0),L=k(1),w=k(2),A=k(3),T=k(4),m=k(5),F=k(6),E=S.range,I=L.range,R=w.range,B=A.range,O=T.range,V=m.range,j=F.range,q=n(function(Te){Te.setDate(1),Te.setHours(0,0,0,0)},function(Te,Ve){Te.setMonth(Te.getMonth()+Ve)},function(Te,Ve){return Ve.getMonth()-Te.getMonth()+(Ve.getFullYear()-Te.getFullYear())*12},function(Te){return Te.getMonth()}),U=q.range,J=n(function(Te){Te.setMonth(0,1),Te.setHours(0,0,0,0)},function(Te,Ve){Te.setFullYear(Te.getFullYear()+Ve)},function(Te,Ve){return Ve.getFullYear()-Te.getFullYear()},function(Te){return Te.getFullYear()});J.every=function(Te){return!isFinite(Te=Math.floor(Te))||!(Te>0)?null:n(function(Ve){Ve.setFullYear(Math.floor(Ve.getFullYear()/Te)*Te),Ve.setMonth(0,1),Ve.setHours(0,0,0,0)},function(Ve,$e){Ve.setFullYear(Ve.getFullYear()+$e*Te)})};var ee=J.range,ce=n(function(Te){Te.setUTCSeconds(0,0)},function(Te,Ve){Te.setTime(+Te+Ve*s)},function(Te,Ve){return(Ve-Te)/s},function(Te){return Te.getUTCMinutes()}),ye=ce.range,xe=n(function(Te){Te.setUTCMinutes(0,0,0)},function(Te,Ve){Te.setTime(+Te+Ve*l)},function(Te,Ve){return(Ve-Te)/l},function(Te){return Te.getUTCHours()}),ue=xe.range,K=n(function(Te){Te.setUTCHours(0,0,0,0)},function(Te,Ve){Te.setUTCDate(Te.getUTCDate()+Ve)},function(Te,Ve){return(Ve-Te)/u},function(Te){return Te.getUTCDate()-1}),_e=K.range;function ne(Te){return n(function(Ve){Ve.setUTCDate(Ve.getUTCDate()-(Ve.getUTCDay()+7-Te)%7),Ve.setUTCHours(0,0,0,0)},function(Ve,$e){Ve.setUTCDate(Ve.getUTCDate()+$e*7)},function(Ve,$e){return($e-Ve)/c})}var ae=ne(0),pe=ne(1),ie=ne(2),le=ne(3),me=ne(4),be=ne(5),De=ne(6),Ge=ae.range,ht=pe.range,it=ie.range,Oe=le.range,ze=me.range,ct=be.range,et=De.range,qe=n(function(Te){Te.setUTCDate(1),Te.setUTCHours(0,0,0,0)},function(Te,Ve){Te.setUTCMonth(Te.getUTCMonth()+Ve)},function(Te,Ve){return Ve.getUTCMonth()-Te.getUTCMonth()+(Ve.getUTCFullYear()-Te.getUTCFullYear())*12},function(Te){return Te.getUTCMonth()}),we=qe.range,Le=n(function(Te){Te.setUTCMonth(0,1),Te.setUTCHours(0,0,0,0)},function(Te,Ve){Te.setUTCFullYear(Te.getUTCFullYear()+Ve)},function(Te,Ve){return Ve.getUTCFullYear()-Te.getUTCFullYear()},function(Te){return Te.getUTCFullYear()});Le.every=function(Te){return!isFinite(Te=Math.floor(Te))||!(Te>0)?null:n(function(Ve){Ve.setUTCFullYear(Math.floor(Ve.getUTCFullYear()/Te)*Te),Ve.setUTCMonth(0,1),Ve.setUTCHours(0,0,0,0)},function(Ve,$e){Ve.setUTCFullYear(Ve.getUTCFullYear()+$e*Te)})};var Ke=Le.range;e.timeDay=y,e.timeDays=C,e.timeFriday=m,e.timeFridays=V,e.timeHour=x,e.timeHours=_,e.timeInterval=n,e.timeMillisecond=a,e.timeMilliseconds=i,e.timeMinute=g,e.timeMinutes=p,e.timeMonday=L,e.timeMondays=I,e.timeMonth=q,e.timeMonths=U,e.timeSaturday=F,e.timeSaturdays=j,e.timeSecond=f,e.timeSeconds=v,e.timeSunday=S,e.timeSundays=E,e.timeThursday=T,e.timeThursdays=O,e.timeTuesday=w,e.timeTuesdays=R,e.timeWednesday=A,e.timeWednesdays=B,e.timeWeek=S,e.timeWeeks=E,e.timeYear=J,e.timeYears=ee,e.utcDay=K,e.utcDays=_e,e.utcFriday=be,e.utcFridays=ct,e.utcHour=xe,e.utcHours=ue,e.utcMillisecond=a,e.utcMilliseconds=i,e.utcMinute=ce,e.utcMinutes=ye,e.utcMonday=pe,e.utcMondays=ht,e.utcMonth=qe,e.utcMonths=we,e.utcSaturday=De,e.utcSaturdays=et,e.utcSecond=f,e.utcSeconds=v,e.utcSunday=ae,e.utcSundays=Ge,e.utcThursday=me,e.utcThursdays=ze,e.utcTuesday=ie,e.utcTuesdays=it,e.utcWednesday=le,e.utcWednesdays=Oe,e.utcWeek=ae,e.utcWeeks=Ge,e.utcYear=Le,e.utcYears=Ke,Object.defineProperty(e,"__esModule",{value:!0})})});var lb=fe((KS,Rte)=>{(function(e,t){typeof KS=="object"&&typeof Rte!="undefined"?t(KS,HI()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(KS,function(e,t){"use strict";function r(ft){if(0<=ft.y&&ft.y<100){var kt=new Date(-1,ft.m,ft.d,ft.H,ft.M,ft.S,ft.L);return kt.setFullYear(ft.y),kt}return new Date(ft.y,ft.m,ft.d,ft.H,ft.M,ft.S,ft.L)}function n(ft){if(0<=ft.y&&ft.y<100){var kt=new Date(Date.UTC(-1,ft.m,ft.d,ft.H,ft.M,ft.S,ft.L));return kt.setUTCFullYear(ft.y),kt}return new Date(Date.UTC(ft.y,ft.m,ft.d,ft.H,ft.M,ft.S,ft.L))}function a(ft,kt,rr){return{y:ft,m:kt,d:rr,H:0,M:0,S:0,L:0}}function i(ft){var kt=ft.dateTime,rr=ft.date,pr=ft.time,Kr=ft.periods,Nr=ft.days,dn=ft.shortDays,xr=ft.months,Fr=ft.shortMonths,Zr=v(Kr),Cn=g(Kr),Dt=v(Nr),At=g(Nr),Vt=v(dn),Qt=g(dn),Ut=v(xr),_r=g(xr),rn=v(Fr),Jr=g(Fr),qn={a:sl,A:Eo,b:ao,B:Da,c:null,d:q,e:q,f:ye,g:be,G:Ge,H:U,I:J,j:ee,L:ce,m:xe,M:ue,p:bl,q:bo,Q:or,s:fr,S:K,u:_e,U:ne,V:pe,w:ie,W:le,x:null,X:null,y:me,Y:De,Z:ht,"%":mr},ri={a:Zs,A:su,b:fc,B:Af,c:null,d:it,e:it,f:qe,g:mt,G:Yt,H:Oe,I:ze,j:ct,L:et,m:we,M:Le,p:ut,q:Jt,Q:or,s:fr,S:Ke,u:Te,U:Ve,V:ot,w:tt,W:nt,x:null,X:null,y:We,Y:bt,Z:jt,"%":mr},Jn={a:va,A:Xi,b:oa,B:Ma,c:Ga,d:T,e:T,f:B,g:S,G:k,H:F,I:F,j:m,L:R,m:A,M:E,p:ha,q:w,Q:V,s:j,S:I,u:x,U:_,V:y,w:p,W:C,x:ss,X:mo,y:S,Y:k,Z:L,"%":O};qn.x=Ii(rr,qn),qn.X=Ii(pr,qn),qn.c=Ii(kt,qn),ri.x=Ii(rr,ri),ri.X=Ii(pr,ri),ri.c=Ii(kt,ri);function Ii(er,wr){return function(nn){var Dr=[],bn=-1,Yr=0,Tn=er.length,Kn,Qn,Ai;for(nn instanceof Date||(nn=new Date(+nn));++bn53)return null;"w"in Dr||(Dr.w=1),"Z"in Dr?(Yr=n(a(Dr.y,0,1)),Tn=Yr.getUTCDay(),Yr=Tn>4||Tn===0?t.utcMonday.ceil(Yr):t.utcMonday(Yr),Yr=t.utcDay.offset(Yr,(Dr.V-1)*7),Dr.y=Yr.getUTCFullYear(),Dr.m=Yr.getUTCMonth(),Dr.d=Yr.getUTCDate()+(Dr.w+6)%7):(Yr=r(a(Dr.y,0,1)),Tn=Yr.getDay(),Yr=Tn>4||Tn===0?t.timeMonday.ceil(Yr):t.timeMonday(Yr),Yr=t.timeDay.offset(Yr,(Dr.V-1)*7),Dr.y=Yr.getFullYear(),Dr.m=Yr.getMonth(),Dr.d=Yr.getDate()+(Dr.w+6)%7)}else("W"in Dr||"U"in Dr)&&("w"in Dr||(Dr.w="u"in Dr?Dr.u%7:"W"in Dr?1:0),Tn="Z"in Dr?n(a(Dr.y,0,1)).getUTCDay():r(a(Dr.y,0,1)).getDay(),Dr.m=0,Dr.d="W"in Dr?(Dr.w+6)%7+Dr.W*7-(Tn+5)%7:Dr.w+Dr.U*7-(Tn+6)%7);return"Z"in Dr?(Dr.H+=Dr.Z/100|0,Dr.M+=Dr.Z%100,n(Dr)):r(Dr)}}function ra(er,wr,nn,Dr){for(var bn=0,Yr=wr.length,Tn=nn.length,Kn,Qn;bn=Tn)return-1;if(Kn=wr.charCodeAt(bn++),Kn===37){if(Kn=wr.charAt(bn++),Qn=Jn[Kn in o?wr.charAt(bn++):Kn],!Qn||(Dr=Qn(er,nn,Dr))<0)return-1}else if(Kn!=nn.charCodeAt(Dr++))return-1}return Dr}function ha(er,wr,nn){var Dr=Zr.exec(wr.slice(nn));return Dr?(er.p=Cn[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function va(er,wr,nn){var Dr=Vt.exec(wr.slice(nn));return Dr?(er.w=Qt[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function Xi(er,wr,nn){var Dr=Dt.exec(wr.slice(nn));return Dr?(er.w=At[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function oa(er,wr,nn){var Dr=rn.exec(wr.slice(nn));return Dr?(er.m=Jr[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function Ma(er,wr,nn){var Dr=Ut.exec(wr.slice(nn));return Dr?(er.m=_r[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function Ga(er,wr,nn){return ra(er,kt,wr,nn)}function ss(er,wr,nn){return ra(er,rr,wr,nn)}function mo(er,wr,nn){return ra(er,pr,wr,nn)}function sl(er){return dn[er.getDay()]}function Eo(er){return Nr[er.getDay()]}function ao(er){return Fr[er.getMonth()]}function Da(er){return xr[er.getMonth()]}function bl(er){return Kr[+(er.getHours()>=12)]}function bo(er){return 1+~~(er.getMonth()/3)}function Zs(er){return dn[er.getUTCDay()]}function su(er){return Nr[er.getUTCDay()]}function fc(er){return Fr[er.getUTCMonth()]}function Af(er){return xr[er.getUTCMonth()]}function ut(er){return Kr[+(er.getUTCHours()>=12)]}function Jt(er){return 1+~~(er.getUTCMonth()/3)}return{format:function(er){var wr=Ii(er+="",qn);return wr.toString=function(){return er},wr},parse:function(er){var wr=Vi(er+="",!1);return wr.toString=function(){return er},wr},utcFormat:function(er){var wr=Ii(er+="",ri);return wr.toString=function(){return er},wr},utcParse:function(er){var wr=Vi(er+="",!0);return wr.toString=function(){return er},wr}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,l=/^%/,u=/[\\^$*+?|[\]().{}]/g;function c(ft,kt,rr){var pr=ft<0?"-":"",Kr=(pr?-ft:ft)+"",Nr=Kr.length;return pr+(Nr68?1900:2e3),rr+pr[0].length):-1}function L(ft,kt,rr){var pr=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(kt.slice(rr,rr+6));return pr?(ft.Z=pr[1]?0:-(pr[2]+(pr[3]||"00")),rr+pr[0].length):-1}function w(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+1));return pr?(ft.q=pr[0]*3-3,rr+pr[0].length):-1}function A(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.m=pr[0]-1,rr+pr[0].length):-1}function T(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.d=+pr[0],rr+pr[0].length):-1}function m(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+3));return pr?(ft.m=0,ft.d=+pr[0],rr+pr[0].length):-1}function F(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.H=+pr[0],rr+pr[0].length):-1}function E(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.M=+pr[0],rr+pr[0].length):-1}function I(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.S=+pr[0],rr+pr[0].length):-1}function R(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+3));return pr?(ft.L=+pr[0],rr+pr[0].length):-1}function B(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+6));return pr?(ft.L=Math.floor(pr[0]/1e3),rr+pr[0].length):-1}function O(ft,kt,rr){var pr=l.exec(kt.slice(rr,rr+1));return pr?rr+pr[0].length:-1}function V(ft,kt,rr){var pr=s.exec(kt.slice(rr));return pr?(ft.Q=+pr[0],rr+pr[0].length):-1}function j(ft,kt,rr){var pr=s.exec(kt.slice(rr));return pr?(ft.s=+pr[0],rr+pr[0].length):-1}function q(ft,kt){return c(ft.getDate(),kt,2)}function U(ft,kt){return c(ft.getHours(),kt,2)}function J(ft,kt){return c(ft.getHours()%12||12,kt,2)}function ee(ft,kt){return c(1+t.timeDay.count(t.timeYear(ft),ft),kt,3)}function ce(ft,kt){return c(ft.getMilliseconds(),kt,3)}function ye(ft,kt){return ce(ft,kt)+"000"}function xe(ft,kt){return c(ft.getMonth()+1,kt,2)}function ue(ft,kt){return c(ft.getMinutes(),kt,2)}function K(ft,kt){return c(ft.getSeconds(),kt,2)}function _e(ft){var kt=ft.getDay();return kt===0?7:kt}function ne(ft,kt){return c(t.timeSunday.count(t.timeYear(ft)-1,ft),kt,2)}function ae(ft){var kt=ft.getDay();return kt>=4||kt===0?t.timeThursday(ft):t.timeThursday.ceil(ft)}function pe(ft,kt){return ft=ae(ft),c(t.timeThursday.count(t.timeYear(ft),ft)+(t.timeYear(ft).getDay()===4),kt,2)}function ie(ft){return ft.getDay()}function le(ft,kt){return c(t.timeMonday.count(t.timeYear(ft)-1,ft),kt,2)}function me(ft,kt){return c(ft.getFullYear()%100,kt,2)}function be(ft,kt){return ft=ae(ft),c(ft.getFullYear()%100,kt,2)}function De(ft,kt){return c(ft.getFullYear()%1e4,kt,4)}function Ge(ft,kt){var rr=ft.getDay();return ft=rr>=4||rr===0?t.timeThursday(ft):t.timeThursday.ceil(ft),c(ft.getFullYear()%1e4,kt,4)}function ht(ft){var kt=ft.getTimezoneOffset();return(kt>0?"-":(kt*=-1,"+"))+c(kt/60|0,"0",2)+c(kt%60,"0",2)}function it(ft,kt){return c(ft.getUTCDate(),kt,2)}function Oe(ft,kt){return c(ft.getUTCHours(),kt,2)}function ze(ft,kt){return c(ft.getUTCHours()%12||12,kt,2)}function ct(ft,kt){return c(1+t.utcDay.count(t.utcYear(ft),ft),kt,3)}function et(ft,kt){return c(ft.getUTCMilliseconds(),kt,3)}function qe(ft,kt){return et(ft,kt)+"000"}function we(ft,kt){return c(ft.getUTCMonth()+1,kt,2)}function Le(ft,kt){return c(ft.getUTCMinutes(),kt,2)}function Ke(ft,kt){return c(ft.getUTCSeconds(),kt,2)}function Te(ft){var kt=ft.getUTCDay();return kt===0?7:kt}function Ve(ft,kt){return c(t.utcSunday.count(t.utcYear(ft)-1,ft),kt,2)}function $e(ft){var kt=ft.getUTCDay();return kt>=4||kt===0?t.utcThursday(ft):t.utcThursday.ceil(ft)}function ot(ft,kt){return ft=$e(ft),c(t.utcThursday.count(t.utcYear(ft),ft)+(t.utcYear(ft).getUTCDay()===4),kt,2)}function tt(ft){return ft.getUTCDay()}function nt(ft,kt){return c(t.utcMonday.count(t.utcYear(ft)-1,ft),kt,2)}function We(ft,kt){return c(ft.getUTCFullYear()%100,kt,2)}function mt(ft,kt){return ft=$e(ft),c(ft.getUTCFullYear()%100,kt,2)}function bt(ft,kt){return c(ft.getUTCFullYear()%1e4,kt,4)}function Yt(ft,kt){var rr=ft.getUTCDay();return ft=rr>=4||rr===0?t.utcThursday(ft):t.utcThursday.ceil(ft),c(ft.getUTCFullYear()%1e4,kt,4)}function jt(){return"+0000"}function mr(){return"%"}function or(ft){return+ft}function fr(ft){return Math.floor(+ft/1e3)}var Ot;cr({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 cr(ft){return Ot=i(ft),e.timeFormat=Ot.format,e.timeParse=Ot.parse,e.utcFormat=Ot.utcFormat,e.utcParse=Ot.utcParse,Ot}var Ct="%Y-%m-%dT%H:%M:%S.%LZ";function wt(ft){return ft.toISOString()}var Tt=Date.prototype.toISOString?wt:e.utcFormat(Ct);function Mt(ft){var kt=new Date(ft);return isNaN(kt)?null:kt}var Lt=+new Date("2000-01-01T00:00:00.000Z")?Mt:e.utcParse(Ct);e.isoFormat=Tt,e.isoParse=Lt,e.timeFormatDefaultLocale=cr,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})})});var jI=fe((JS,Ite)=>{(function(e,t){typeof JS=="object"&&typeof Ite!="undefined"?t(JS):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(JS,(function(e){"use strict";function t(A){return Math.abs(A=Math.round(A))>=1e21?A.toLocaleString("en").replace(/,/g,""):A.toString(10)}function r(A,T){if((m=(A=T?A.toExponential(T-1):A.toExponential()).indexOf("e"))<0)return null;var m,F=A.slice(0,m);return[F.length>1?F[0]+F.slice(2):F,+A.slice(m+1)]}function n(A){return A=r(Math.abs(A)),A?A[1]:NaN}function a(A,T){return function(m,F){for(var E=m.length,I=[],R=0,B=A[0],O=0;E>0&&B>0&&(O+B+1>F&&(B=Math.max(1,F-O)),I.push(m.substring(E-=B,E+B)),!((O+=B+1)>F));)B=A[R=(R+1)%A.length];return I.reverse().join(T)}}function i(A){return function(T){return T.replace(/[0-9]/g,function(m){return A[+m]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(A){if(!(T=o.exec(A)))throw new Error("invalid format: "+A);var T;return new l({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]})}s.prototype=l.prototype;function l(A){this.fill=A.fill===void 0?" ":A.fill+"",this.align=A.align===void 0?">":A.align+"",this.sign=A.sign===void 0?"-":A.sign+"",this.symbol=A.symbol===void 0?"":A.symbol+"",this.zero=!!A.zero,this.width=A.width===void 0?void 0:+A.width,this.comma=!!A.comma,this.precision=A.precision===void 0?void 0:+A.precision,this.trim=!!A.trim,this.type=A.type===void 0?"":A.type+""}l.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 u(A){e:for(var T=A.length,m=1,F=-1,E;m0&&(F=0);break}return F>0?A.slice(0,F)+A.slice(E+1):A}var c;function f(A,T){var m=r(A,T);if(!m)return A+"";var F=m[0],E=m[1],I=E-(c=Math.max(-8,Math.min(8,Math.floor(E/3)))*3)+1,R=F.length;return I===R?F:I>R?F+new Array(I-R+1).join("0"):I>0?F.slice(0,I)+"."+F.slice(I):"0."+new Array(1-I).join("0")+r(A,Math.max(0,T+I-1))[0]}function v(A,T){var m=r(A,T);if(!m)return A+"";var F=m[0],E=m[1];return E<0?"0."+new Array(-E).join("0")+F:F.length>E+1?F.slice(0,E+1)+"."+F.slice(E+1):F+new Array(E-F.length+2).join("0")}var g={"%":function(A,T){return(A*100).toFixed(T)},b:function(A){return Math.round(A).toString(2)},c:function(A){return A+""},d:t,e:function(A,T){return A.toExponential(T)},f:function(A,T){return A.toFixed(T)},g:function(A,T){return A.toPrecision(T)},o:function(A){return Math.round(A).toString(8)},p:function(A,T){return v(A*100,T)},r:v,s:f,X:function(A){return Math.round(A).toString(16).toUpperCase()},x:function(A){return Math.round(A).toString(16)}};function p(A){return A}var x=Array.prototype.map,_=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function y(A){var T=A.grouping===void 0||A.thousands===void 0?p:a(x.call(A.grouping,Number),A.thousands+""),m=A.currency===void 0?"":A.currency[0]+"",F=A.currency===void 0?"":A.currency[1]+"",E=A.decimal===void 0?".":A.decimal+"",I=A.numerals===void 0?p:i(x.call(A.numerals,String)),R=A.percent===void 0?"%":A.percent+"",B=A.minus===void 0?"-":A.minus+"",O=A.nan===void 0?"NaN":A.nan+"";function V(q){q=s(q);var U=q.fill,J=q.align,ee=q.sign,ce=q.symbol,ye=q.zero,xe=q.width,ue=q.comma,K=q.precision,_e=q.trim,ne=q.type;ne==="n"?(ue=!0,ne="g"):g[ne]||(K===void 0&&(K=12),_e=!0,ne="g"),(ye||U==="0"&&J==="=")&&(ye=!0,U="0",J="=");var ae=ce==="$"?m:ce==="#"&&/[boxX]/.test(ne)?"0"+ne.toLowerCase():"",pe=ce==="$"?F:/[%p]/.test(ne)?R:"",ie=g[ne],le=/[defgprs%]/.test(ne);K=K===void 0?6:/[gprs]/.test(ne)?Math.max(1,Math.min(21,K)):Math.max(0,Math.min(20,K));function me(be){var De=ae,Ge=pe,ht,it,Oe;if(ne==="c")Ge=ie(be)+Ge,be="";else{be=+be;var ze=be<0||1/be<0;if(be=isNaN(be)?O:ie(Math.abs(be),K),_e&&(be=u(be)),ze&&+be==0&&ee!=="+"&&(ze=!1),De=(ze?ee==="("?ee:B:ee==="-"||ee==="("?"":ee)+De,Ge=(ne==="s"?_[8+c/3]:"")+Ge+(ze&&ee==="("?")":""),le){for(ht=-1,it=be.length;++htOe||Oe>57){Ge=(Oe===46?E+be.slice(ht+1):be.slice(ht))+Ge,be=be.slice(0,ht);break}}}ue&&!ye&&(be=T(be,1/0));var ct=De.length+be.length+Ge.length,et=ct>1)+De+be+Ge+et.slice(ct);break;default:be=et+De+be+Ge;break}return I(be)}return me.toString=function(){return q+""},me}function j(q,U){var J=V((q=s(q),q.type="f",q)),ee=Math.max(-8,Math.min(8,Math.floor(n(U)/3)))*3,ce=Math.pow(10,-ee),ye=_[8+ee/3];return function(xe){return J(ce*xe)+ye}}return{format:V,formatPrefix:j}}var C;k({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function k(A){return C=y(A),e.format=C.format,e.formatPrefix=C.formatPrefix,C}function S(A){return Math.max(0,-n(Math.abs(A)))}function L(A,T){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(n(T)/3)))*3-n(Math.abs(A)))}function w(A,T){return A=Math.abs(A),T=Math.abs(T)-A,Math.max(0,n(T)-n(A))+1}e.FormatSpecifier=l,e.formatDefaultLocale=k,e.formatLocale=y,e.formatSpecifier=s,e.precisionFixed=S,e.precisionPrefix=L,e.precisionRound=w,Object.defineProperty(e,"__esModule",{value:!0})}))});var qte=fe((Hcr,zte)=>{"use strict";zte.exports=function(e){for(var t=e.length,r,n=0;n13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}});var aa=fe((jcr,Bte)=>{"use strict";var Cat=qte();Bte.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&Cat(r))return!1}else if(t!=="number")return!1;return e-e<1}});var Wa=fe((Wcr,Ote)=>{"use strict";Ote.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"}});var WI=fe((QS,Nte)=>{(function(e,t){typeof QS=="object"&&typeof Nte!="undefined"?t(QS):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(QS,(function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n>2],c+=t[(s[l]&3)<<4|s[l+1]>>4],c+=t[(s[l+1]&15)<<2|s[l+2]>>6],c+=t[s[l+2]&63];return u%3===2?c=c.substring(0,c.length-1)+"=":u%3===1&&(c=c.substring(0,c.length-2)+"=="),c},i=function(o){var s=o.length*.75,l=o.length,u,c=0,f,v,g,p;o[o.length-1]==="="&&(s--,o[o.length-2]==="="&&s--);var x=new ArrayBuffer(s),_=new Uint8Array(x);for(u=0;u>4,_[c++]=(v&15)<<4|g>>2,_[c++]=(g&3)<<6|p&63;return x};e.decode=i,e.encode=a,Object.defineProperty(e,"__esModule",{value:!0})}))});var em=fe((Ycr,Ute)=>{"use strict";Ute.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}});var Gf=fe(Zv=>{"use strict";var Lat=WI().decode,Pat=em(),YI=Array.isArray,Fat=ArrayBuffer,Dat=DataView;function Vte(e){return Fat.isView(e)&&!(e instanceof Dat)}Zv.isTypedArray=Vte;function eE(e){return YI(e)||Vte(e)}Zv.isArrayOrTypedArray=eE;function Rat(e){return!eE(e[0])}Zv.isArray1D=Rat;Zv.ensureArray=function(e,t){return YI(e)||(e=[]),e.length=t,e};var vf={u1c:typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,i1:typeof Int8Array=="undefined"?void 0:Int8Array,u1:typeof Uint8Array=="undefined"?void 0:Uint8Array,i2:typeof Int16Array=="undefined"?void 0:Int16Array,u2:typeof Uint16Array=="undefined"?void 0:Uint16Array,i4:typeof Int32Array=="undefined"?void 0:Int32Array,u4:typeof Uint32Array=="undefined"?void 0:Uint32Array,f4:typeof Float32Array=="undefined"?void 0:Float32Array,f8:typeof Float64Array=="undefined"?void 0:Float64Array};vf.uint8c=vf.u1c;vf.uint8=vf.u1;vf.int8=vf.i1;vf.uint16=vf.u2;vf.int16=vf.i2;vf.uint32=vf.u4;vf.int32=vf.i4;vf.float32=vf.f4;vf.float64=vf.f8;function XI(e){return e.constructor===ArrayBuffer}Zv.isArrayBuffer=XI;Zv.decodeTypedArraySpec=function(e){var t=[],r=Iat(e),n=r.dtype,a=vf[n];if(!a)throw new Error('Error in dtype: "'+n+'"');var i=a.BYTES_PER_ELEMENT,o=r.bdata;XI(o)||(o=Lat(o));var s=r.shape===void 0?[o.byteLength/i]:(""+r.shape).split(",");s.reverse();var l=s.length,u,c,f=+s[0],v=i*f,g=0;if(l===1)t=new a(o);else if(l===2)for(u=+s[1],c=0;c{"use strict";var Hte=aa(),$I=Gf().isArrayOrTypedArray;Xte.exports=function(t,r){if(Hte(r))r=String(r);else if(typeof r!="string"||r.slice(-4)==="[-1]")throw"bad property string";var n=r.split("."),a,i,o,s;for(s=0;s{"use strict";var ub=M4(),Nat=/^\w*$/,Uat=0,Zte=1,tE=2,$te=3,ux=4;Kte.exports=function(t,r,n,a){n=n||"name",a=a||"value";var i,o,s,l={};r&&r.length?(s=ub(t,r),o=s.get()):o=t,r=r||"";var u={};if(o)for(i=0;i2)return l[g]=l[g]|tE,f.set(v,null);if(c){for(i=g;i{"use strict";var Vat=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Gat=/^[^\.\[\]]+$/;Qte.exports=function(e,t){for(;t;){var r=e.match(Vat);if(r)e=r[1];else if(e.match(Gat))e="";else throw new Error("bad relativeAttr call:"+[e,t]);if(t.charAt(0)==="^")t=t.slice(1);else break}return e&&t.charAt(0)!=="["?e+"."+t:e+t}});var rE=fe((Jcr,tre)=>{"use strict";var Hat=aa();tre.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var n=Math.log(Math.min(r[0],r[1]))/Math.LN10;return Hat(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var ire=fe((Qcr,nre)=>{"use strict";var rre=Gf().isArrayOrTypedArray,S4=em();nre.exports=function e(t,r){for(var n in r){var a=r[n],i=t[n];if(i!==a)if(n.charAt(0)==="_"||typeof a=="function"){if(n in t)continue;t[n]=a}else if(rre(a)&&rre(i)&&S4(a[0])){if(n==="customdata"||n==="ids")continue;for(var o=Math.min(a.length,i.length),s=0;sjat,modHalf:()=>Wat});function jat(e,t){let r=e%t;return r<0?r+t:r}function Wat(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}var fb=Co(()=>{"use strict"});var ta=fe(C4=>{"use strict";var are=em(),E4=Array.isArray;function Yat(e,t){var r,n;for(r=0;r{"use strict";ore.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;n===void 0&&(n=r);var a={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(a.valType="enumerated",a.values=a.extras,a.extras=void 0,a.min=void 0,a.max=void 0);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:a,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(i.size.dflt="auto"),e.autoColor&&(i.color.dflt="auto"),e.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,e.noFontVariant||(i.variant.arrayOk=!0),e.noFontTextcase||(i.textcase.arrayOk=!0),e.noFontLineposition||(i.lineposition.arrayOk=!0),e.noFontShadow||(i.shadow.arrayOk=!0),i.size.arrayOk=!0,i.color.arrayOk=!0),i}});var L4=fe((rfr,sre)=>{"use strict";sre.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var tm=fe((nfr,cre)=>{"use strict";var lre=L4(),ure=Ds(),KI=ure({editType:"none"});KI.family.dflt=lre.HOVERFONT;KI.size.dflt=lre.HOVERFONTSIZE;cre.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversort:{valType:"enumerated",values:["trace","value descending","value ascending"],dflt:"trace",editType:"none"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoveranywhere:{valType:"boolean",dflt:!1,editType:"none"},clickanywhere:{valType:"boolean",dflt:!1,editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:KI,grouptitlefont:ure({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var hb=fe((ifr,fre)=>{"use strict";var Xat=Ds(),P4=tm().hoverlabel,F4=ta().extendFlat;fre.exports={hoverlabel:{bgcolor:F4({},P4.bgcolor,{arrayOk:!0}),bordercolor:F4({},P4.bordercolor,{arrayOk:!0}),font:Xat({arrayOk:!0,editType:"none"}),align:F4({},P4.align,{arrayOk:!0}),namelength:F4({},P4.namelength,{arrayOk:!0}),showarrow:F4({},P4.showarrow),editType:"none"}}});var Ho=fe((afr,hre)=>{"use strict";var Zat=Ds(),$at=hb();hre.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:Zat({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:$at.hoverlabel,uirevision:{valType:"any",editType:"none"}}});var iie=fe((hfr,nie)=>{var Gz=Object.defineProperty,Kat=Object.getOwnPropertyDescriptor,Jat=Object.getOwnPropertyNames,Qat=Object.prototype.hasOwnProperty,eot=(e,t)=>{for(var r in t)Gz(e,r,{get:t[r],enumerable:!0})},tot=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Jat(t))!Qat.call(e,a)&&a!==r&&Gz(e,a,{get:()=>t[a],enumerable:!(n=Kat(t,a))||n.enumerable});return e},rot=e=>tot(Gz({},"__esModule",{value:!0}),e),wre={};eot(wre,{a98:()=>Yut,average:()=>Jot,averageAngle:()=>Op,averageNumber:()=>Ore,blend:()=>Klt,blerp:()=>Tz,clampChroma:()=>mut,clampGamut:()=>gq,clampRgb:()=>gut,colorsNamed:()=>Are,convertA98ToXyz65:()=>Az,convertCubehelixToRgb:()=>qre,convertDlchToLab65:()=>fE,convertHsiToRgb:()=>Yre,convertHslToRgb:()=>$re,convertHsvToRgb:()=>Zz,convertHwbToRgb:()=>ene,convertItpToXyz65:()=>Sz,convertJabToJch:()=>kz,convertJabToRgb:()=>tq,convertJabToXyz65:()=>Qz,convertJchToJab:()=>Cz,convertLab65ToDlch:()=>hE,convertLab65ToRgb:()=>N4,convertLab65ToXyz65:()=>Wz,convertLabToLch:()=>H1,convertLabToRgb:()=>nq,convertLabToXyz50:()=>wE,convertLchToLab:()=>j1,convertLchuvToLuv:()=>oq,convertLrgbToOklab:()=>sq,convertLrgbToRgb:()=>gx,convertLuvToLchuv:()=>aq,convertLuvToXyz50:()=>vE,convertOkhslToOklab:()=>Fz,convertOkhsvToOklab:()=>Rz,convertOklabToLrgb:()=>_b,convertOklabToOkhsl:()=>Pz,convertOklabToOkhsv:()=>Dz,convertOklabToRgb:()=>G4,convertP3ToXyz65:()=>Iz,convertProphotoToXyz50:()=>Bz,convertRec2020ToXyz65:()=>Nz,convertRgbToCubehelix:()=>zre,convertRgbToHsi:()=>Xre,convertRgbToHsl:()=>Kre,convertRgbToHsv:()=>$z,convertRgbToHwb:()=>tne,convertRgbToJab:()=>eq,convertRgbToLab:()=>iq,convertRgbToLab65:()=>U4,convertRgbToLrgb:()=>px,convertRgbToOklab:()=>V4,convertRgbToXyb:()=>Cne,convertRgbToXyz50:()=>xb,convertRgbToXyz65:()=>rm,convertRgbToYiq:()=>zne,convertXybToRgb:()=>Lne,convertXyz50ToLab:()=>TE,convertXyz50ToLuv:()=>dE,convertXyz50ToProphoto:()=>qz,convertXyz50ToRgb:()=>yb,convertXyz50ToXyz65:()=>Rne,convertXyz65ToA98:()=>Mz,convertXyz65ToItp:()=>Ez,convertXyz65ToJab:()=>Jz,convertXyz65ToLab65:()=>Yz,convertXyz65ToP3:()=>zz,convertXyz65ToRec2020:()=>Oz,convertXyz65ToRgb:()=>nm,convertXyz65ToXyz50:()=>Dne,convertYiqToRgb:()=>qne,converter:()=>dl,cubehelix:()=>Xut,differenceCie76:()=>jot,differenceCie94:()=>Wot,differenceCiede2000:()=>Yot,differenceCmc:()=>Xot,differenceEuclidean:()=>mb,differenceHueChroma:()=>O4,differenceHueNaive:()=>Bre,differenceHueSaturation:()=>B4,differenceHyab:()=>Zot,differenceItp:()=>Kot,differenceKotsarenkoRamos:()=>$ot,displayable:()=>pq,dlab:()=>Zut,dlch:()=>$ut,easingGamma:()=>Jne,easingInOutSine:()=>jut,easingMidpoint:()=>jne,easingSmootherstep:()=>Gut,easingSmoothstep:()=>Nut,easingSmoothstepInverse:()=>Uut,filterBrightness:()=>Sut,filterContrast:()=>Eut,filterDeficiencyDeuter:()=>But,filterDeficiencyProt:()=>qut,filterDeficiencyTrit:()=>Out,filterGrayscale:()=>Lut,filterHueRotate:()=>Fut,filterInvert:()=>Put,filterSaturate:()=>Cut,filterSepia:()=>kut,fixupAlpha:()=>Nc,fixupHueDecreasing:()=>Not,fixupHueIncreasing:()=>Oot,fixupHueLonger:()=>Bot,fixupHueShorter:()=>Bp,formatCss:()=>Hlt,formatHex:()=>jlt,formatHex8:()=>Wlt,formatHsl:()=>Xlt,formatRgb:()=>Ylt,getMode:()=>Kh,hsi:()=>Kut,hsl:()=>Jut,hsv:()=>Qut,hwb:()=>ect,inGamut:()=>SE,interpolate:()=>out,interpolateWith:()=>Yne,interpolateWithPremultipliedAlpha:()=>sut,interpolatorLinear:()=>Ui,interpolatorPiecewise:()=>Rre,interpolatorSplineBasis:()=>Zne,interpolatorSplineBasisClosed:()=>$ne,interpolatorSplineMonotone:()=>cut,interpolatorSplineMonotone2:()=>fut,interpolatorSplineMonotoneClosed:()=>hut,interpolatorSplineNatural:()=>lut,interpolatorSplineNaturalClosed:()=>uut,itp:()=>tct,jab:()=>rct,jch:()=>nct,lab:()=>ict,lab65:()=>act,lch:()=>oct,lch65:()=>sct,lchuv:()=>lct,lerp:()=>fx,lrgb:()=>uct,luv:()=>cct,mapAlphaDivide:()=>Hne,mapAlphaMultiply:()=>Gne,mapTransferGamma:()=>rut,mapTransferLinear:()=>hq,mapper:()=>H4,modeA98:()=>Ire,modeCubehelix:()=>Nre,modeDlab:()=>jre,modeDlch:()=>Wre,modeHsi:()=>Zre,modeHsl:()=>Xz,modeHsv:()=>Kz,modeHwb:()=>nne,modeItp:()=>one,modeJab:()=>sne,modeJch:()=>lne,modeLab:()=>AE,modeLab65:()=>cne,modeLch:()=>ME,modeLch65:()=>hne,modeLchuv:()=>pne,modeLrgb:()=>gne,modeLuv:()=>mne,modeOkhsl:()=>xne,modeOkhsv:()=>_ne,modeOklab:()=>wne,modeOklch:()=>Ane,modeP3:()=>Mne,modeProphoto:()=>Sne,modeRec2020:()=>Ene,modeRgb:()=>vx,modeXyb:()=>Pne,modeXyz50:()=>Fne,modeXyz65:()=>Ine,modeYiq:()=>Bne,nearest:()=>_ut,okhsl:()=>fct,okhsv:()=>hct,oklab:()=>dct,oklch:()=>vct,p3:()=>pct,parse:()=>Pre,parseHex:()=>Sre,parseHsl:()=>Qre,parseHslLegacy:()=>Jre,parseHwb:()=>rne,parseLab:()=>une,parseLch:()=>fne,parseNamed:()=>Mre,parseOklab:()=>bne,parseOklch:()=>Tne,parseRgb:()=>Fre,parseRgbLegacy:()=>Ere,parseTransparent:()=>Dre,prophoto:()=>gct,random:()=>tut,rec2020:()=>mct,removeParser:()=>got,rgb:()=>yct,round:()=>One,samples:()=>put,serializeHex:()=>fq,serializeHex8:()=>Nne,serializeHsl:()=>Vne,serializeRgb:()=>Une,toGamut:()=>yut,trilerp:()=>Eot,unlerp:()=>Sot,useMode:()=>Rs,useParser:()=>Cre,wcagContrast:()=>Wut,wcagLuminance:()=>Vz,xyb:()=>xct,xyz50:()=>_ct,xyz65:()=>bct,yiq:()=>wct});nie.exports=rot(wre);var not=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},Tre=not,iot={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},Are=iot,aot=e=>Tre(Are[e.toLowerCase()],6),Mre=aot,oot=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,sot=e=>{let t;return(t=e.match(oot))?Tre(parseInt(t[1],16),t[1].length):void 0},Sre=sot,$d="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",ofr=`(?:${$d}|none)`,I4=`${$d}%`,sfr=`(?:${$d}%|none)`,Hz=`(?:${$d}%|${$d})`,lot=`(?:${$d}%|${$d}|none)`,uot=`(?:${$d}(deg|grad|rad|turn)|${$d})`,lfr=`(?:${$d}(deg|grad|rad|turn)|${$d}|none)`,pb="\\s*,\\s*",ufr=new RegExp("^"+lot+"$"),cot=new RegExp(`^rgba?\\(\\s*${$d}${pb}${$d}${pb}${$d}\\s*(?:,\\s*${Hz}\\s*)?\\)$`),fot=new RegExp(`^rgba?\\(\\s*${I4}${pb}${I4}${pb}${I4}\\s*(?:,\\s*${Hz}\\s*)?\\)$`),hot=e=>{let t={mode:"rgb"},r;if(r=e.match(cot))r[1]!==void 0&&(t.r=r[1]/255),r[2]!==void 0&&(t.g=r[2]/255),r[3]!==void 0&&(t.b=r[3]/255);else if(r=e.match(fot))r[1]!==void 0&&(t.r=r[1]/100),r[2]!==void 0&&(t.g=r[2]/100),r[3]!==void 0&&(t.b=r[3]/100);else return;return r[4]!==void 0?t.alpha=Math.max(0,Math.min(1,r[4]/100)):r[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},Ere=hot,dot=(e,t)=>e===void 0?void 0:typeof e!="object"?Pre(e):e.mode!==void 0?e:t?tl(zo({},e),{mode:t}):void 0,$v=dot,vot=(e="rgb")=>t=>(t=$v(t,e))!==void 0?t.mode===e?t:qp[t.mode][e]?qp[t.mode][e](t):e==="rgb"?qp[t.mode].rgb(t):qp.rgb[e](qp[t.mode].rgb(t)):void 0,dl=vot,qp={},kre={},gb=[],jz={},pot=e=>e,Rs=e=>(qp[e.mode]=zo(zo({},qp[e.mode]),e.toMode),Object.keys(e.fromMode||{}).forEach(t=>{qp[t]||(qp[t]={}),qp[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=pot)}),kre[e.mode]=e,(e.parse||[]).forEach(t=>{Cre(t,e.mode)}),dl(e.mode)),Kh=e=>kre[e],Cre=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");jz[e]=t}else typeof e=="function"&&gb.indexOf(e)<0&&gb.push(e)},got=e=>{if(typeof e=="string")delete jz[e];else if(typeof e=="function"){let t=gb.indexOf(e);t>0&&gb.splice(t,1)}},bz=/[^\x00-\x7F]|[a-zA-Z_]/,mot=/[^\x00-\x7F]|[-\w]/,Ti={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},eo=0;function nE(e){let t=e[eo],r=e[eo+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[eo+2]):t==="."?/\d/.test(r):/\d/.test(t)}function wz(e){if(eo>=e.length)return!1;let t=e[eo];if(bz.test(t))return!0;if(t==="-"){if(e.length-eo<2)return!1;let r=e[eo+1];return!!(r==="-"||bz.test(r))}return!1}var yot={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function D4(e){let t="";if((e[eo]==="-"||e[eo]==="+")&&(t+=e[eo++]),t+=iE(e),e[eo]==="."&&/\d/.test(e[eo+1])&&(t+=e[eo++]+iE(e)),(e[eo]==="e"||e[eo]==="E")&&((e[eo+1]==="-"||e[eo+1]==="+")&&/\d/.test(e[eo+2])?t+=e[eo++]+e[eo++]+iE(e):/\d/.test(e[eo+1])&&(t+=e[eo++]+iE(e))),wz(e)){let r=sE(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:Ti.Hue,value:t*yot[r]}:void 0}return e[eo]==="%"?(eo++,{type:Ti.Percentage,value:+t}):{type:Ti.Number,value:+t}}function iE(e){let t="";for(;/\d/.test(e[eo]);)t+=e[eo++];return t}function sE(e){let t="";for(;eo24?(isFinite(te)&&(clearTimeout(Ai),Ai=setTimeout(ii,te)),Qn=0):(Qn=1,Qi(ii))}e.timer.flush=function(){Za(),ja()};function Za(){for(var W=Date.now(),te=Tn;te;)W>=te.t&&te.c(W-te.t)&&(te.c=null),te=te.n;return W}function ja(){for(var W,te=Tn,ve=1/0;te;)te.c?(te.t=0;--He)sr.push(Ee[Ft[ir[He]][2]]);for(He=+Cr;He1&&Kr(W[ve[Se-2]],W[ve[Se-1]],W[Ee])<=0;)--Se;ve[Se++]=Ee}return ve.slice(0,Se)}function Oa(W,te){return W[0]-te[0]||W[1]-te[1]}e.geom.polygon=function(W){return J(W,Ni),W};var Ni=e.geom.polygon.prototype=[];Ni.area=function(){for(var W=-1,te=this.length,ve,Se=this[te-1],Ee=0;++WCt)He=He.L;else if(nt=te-Gu(He,ve),nt>Ct){if(!He.R){Se=He;break}He=He.R}else{Re>-Ct?(Se=He.P,Ee=He):nt>-Ct?(Se=He,Ee=He.N):Se=Ee=He;break}var vt=rs(W);if(Co.insert(Se,vt),!(!Se&&!Ee)){if(Se===Ee){Ca(Se),Ee=rs(Se.site),Co.insert(vt,Ee),vt.edge=Ee.edge=Mf(Se.site,vt.site),Ps(Se),Ps(Ee);return}if(!Ee){vt.edge=Mf(Se.site,vt.site);return}Ca(Se),Ca(Ee);var Ft=Se.site,Rt=Ft.x,ir=Ft.y,nr=W.x-Rt,Cr=W.y-ir,Vr=Ee.site,sr=Vr.x-Rt,br=Vr.y-ir,kr=2*(nr*br-Cr*sr),Gr=nr*nr+Cr*Cr,Wr=sr*sr+br*br,Ar={x:(br*Gr-Cr*Wr)/kr+Rt,y:(nr*Wr-sr*Gr)/kr+ir};Hu(Ee.edge,Ft,Vr,Ar),vt.edge=Mf(Ft,W,null,Ar),Ee.edge=Mf(W,Vr,null,Ar),Ps(Se),Ps(Ee)}}function _u(W,te){var ve=W.site,Se=ve.x,Ee=ve.y,Re=Ee-te;if(!Re)return Se;var nt=W.P;if(!nt)return-1/0;ve=nt.site;var He=ve.x,vt=ve.y,Ft=vt-te;if(!Ft)return He;var Rt=He-Se,ir=1/Re-1/Ft,nr=Rt/Ft;return ir?(-nr+Math.sqrt(nr*nr-2*ir*(Rt*Rt/(-2*Ft)-vt+Ft/2+Ee-Re/2)))/ir+Se:(Se+He)/2}function Gu(W,te){var ve=W.N;if(ve)return _u(ve,te);var Se=W.site;return Se.y===te?Se.x:1/0}function Ja(W){this.site=W,this.edges=[]}Ja.prototype.prepare=function(){for(var W=this.edges,te=W.length,ve;te--;)ve=W[te].edge,(!ve.b||!ve.a)&&W.splice(te,1);return W.sort(Sa),W.length};function ps(W){for(var te=W[0][0],ve=W[1][0],Se=W[0][1],Ee=W[1][1],Re,nt,He,vt,Ft=oo,Rt=Ft.length,ir,nr,Cr,Vr,sr,br;Rt--;)if(ir=Ft[Rt],!(!ir||!ir.prepare()))for(Cr=ir.edges,Vr=Cr.length,nr=0;nrCt||y(vt-nt)>Ct)&&(Cr.splice(nr,0,new Sf(Bd(ir.site,br,y(He-te)Ct?{x:te,y:y(Re-te)Ct?{x:y(nt-Ee)Ct?{x:ve,y:y(Re-ve)Ct?{x:y(nt-Se)=-wt)){var nr=vt*vt+Ft*Ft,Cr=Rt*Rt+br*br,Vr=(br*nr-Ft*Cr)/ir,sr=(vt*Cr-Rt*nr)/ir,br=sr+He,kr=Ms.pop()||new ma;kr.arc=W,kr.site=Ee,kr.x=Vr+nt,kr.y=br+Math.sqrt(Vr*Vr+sr*sr),kr.cy=br,W.circle=kr;for(var Gr=null,Wr=As._;Wr;)if(kr.y0)){if(sr/=Cr,Cr<0){if(sr0){if(sr>nr)return;sr>ir&&(ir=sr)}if(sr=ve-He,!(!Cr&&sr<0)){if(sr/=Cr,Cr<0){if(sr>nr)return;sr>ir&&(ir=sr)}else if(Cr>0){if(sr0)){if(sr/=Vr,Vr<0){if(sr0){if(sr>nr)return;sr>ir&&(ir=sr)}if(sr=Se-vt,!(!Vr&&sr<0)){if(sr/=Vr,Vr<0){if(sr>nr)return;sr>ir&&(ir=sr)}else if(Vr>0){if(sr0&&(Ee.a={x:He+ir*Cr,y:vt+ir*Vr}),nr<1&&(Ee.b={x:He+nr*Cr,y:vt+nr*Vr}),Ee}}}}}}function ll(W){for(var te=so,ve=Pl(W[0][0],W[0][1],W[1][0],W[1][1]),Se=te.length,Ee;Se--;)Ee=te[Se],(!Jc(Ee,W)||!ve(Ee)||y(Ee.a.x-Ee.b.x)=Re)return;if(Rt>nr){if(!Se)Se={x:Vr,y:nt};else if(Se.y>=He)return;ve={x:Vr,y:He}}else{if(!Se)Se={x:Vr,y:He};else if(Se.y1)if(Rt>nr){if(!Se)Se={x:(nt-kr)/br,y:nt};else if(Se.y>=He)return;ve={x:(He-kr)/br,y:He}}else{if(!Se)Se={x:(He-kr)/br,y:He};else if(Se.y=Re)return;ve={x:Re,y:br*Re+kr}}else{if(!Se)Se={x:Re,y:br*Re+kr};else if(Se.x=Rt&&kr.x<=nr&&kr.y>=ir&&kr.y<=Cr?[[Rt,Cr],[nr,Cr],[nr,ir],[Rt,ir]]:[];Gr.point=vt[sr]}),Ft}function He(vt){return vt.map(function(Ft,Rt){return{x:Math.round(Se(Ft,Rt)/Ct)*Ct,y:Math.round(Ee(Ft,Rt)/Ct)*Ct,i:Rt}})}return nt.links=function(vt){return ju(He(vt)).edges.filter(function(Ft){return Ft.l&&Ft.r}).map(function(Ft){return{source:vt[Ft.l.i],target:vt[Ft.r.i]}})},nt.triangles=function(vt){var Ft=[];return ju(He(vt)).cells.forEach(function(Rt,ir){for(var nr=Rt.site,Cr=Rt.edges.sort(Sa),Vr=-1,sr=Cr.length,br,kr,Gr=Cr[sr-1].edge,Wr=Gr.l===nr?Gr.r:Gr.l;++VrWr&&(Wr=Rt.x),Rt.y>Ar&&(Ar=Rt.y),Cr.push(Rt.x),Vr.push(Rt.y);else for(sr=0;srWr&&(Wr=En),zn>Ar&&(Ar=zn),Cr.push(En),Vr.push(zn)}var Zn=Wr-kr,ai=Ar-Gr;Zn>ai?Ar=Gr+Zn:Wr=kr+ai;function Mi(Y,d,P,N,H,$,se,de){if(!(isNaN(P)||isNaN(N)))if(Y.leaf){var Ae=Y.x,Fe=Y.y;if(Ae!=null)if(y(Ae-P)+y(Fe-N)<.01)Si(Y,d,P,N,H,$,se,de);else{var Ie=Y.point;Y.x=Y.y=Y.point=null,Si(Y,Ie,Ae,Fe,H,$,se,de),Si(Y,d,P,N,H,$,se,de)}else Y.x=P,Y.y=N,Y.point=d}else Si(Y,d,P,N,H,$,se,de)}function Si(Y,d,P,N,H,$,se,de){var Ae=(H+se)*.5,Fe=($+de)*.5,Ie=P>=Ae,Ye=N>=Fe,st=Ye<<1|Ie;Y.leaf=!1,Y=Y.nodes[st]||(Y.nodes[st]=Qc()),Ie?H=Ae:se=Ae,Ye?$=Fe:de=Fe,Mi(Y,d,P,N,H,$,se,de)}var ya=Qc();if(ya.add=function(Y){Mi(ya,Y,+ir(Y,++sr),+nr(Y,sr),kr,Gr,Wr,Ar)},ya.visit=function(Y){uu(Y,ya,kr,Gr,Wr,Ar)},ya.find=function(Y){return oh(ya,Y[0],Y[1],kr,Gr,Wr,Ar)},sr=-1,te==null){for(;++srRe||nr>nt||Cr=En,ai=ve>=zn,Mi=ai<<1|Zn,Si=Mi+4;Mive&&(Re=te.slice(ve,Re),He[nt]?He[nt]+=Re:He[++nt]=Re),(Se=Se[0])===(Ee=Ee[0])?He[nt]?He[nt]+=Ee:He[++nt]=Ee:(He[++nt]=null,vt.push({i:nt,x:Zo(Se,Ee)})),ve=Dl.lastIndex;return ve=0&&!(Se=e.interpolators[ve](W,te)););return Se}e.interpolators=[function(W,te){var ve=typeof te;return(ve==="string"?er.has(te.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(te)?hc:Ro:te instanceof rn?hc:Array.isArray(te)?ef:ve==="object"&&isNaN(te)?Fl:Zo)(W,te)}],e.interpolateArray=ef;function ef(W,te){var ve=[],Se=[],Ee=W.length,Re=te.length,nt=Math.min(W.length,te.length),He;for(He=0;He=0?W.slice(0,te):W,Se=te>=0?W.slice(te+1):"in";return ve=sh.get(ve)||Cc,Se=X0.get(Se)||O,Nd(Se(ve.apply(null,t.call(arguments,1))))};function Nd(W){return function(te){return te<=0?0:te>=1?1:W(te)}}function Cf(W){return function(te){return 1-W(1-te)}}function Vo(W){return function(te){return .5*(te<.5?W(2*te):2-W(2-2*te))}}function Ud(W){return W*W}function zh(W){return W*W*W}function tf(W){if(W<=0)return 0;if(W>=1)return 1;var te=W*W,ve=te*W;return 4*(W<.5?ve:3*(W-te)+ve-.75)}function Vd(W){return function(te){return Math.pow(te,W)}}function rf(W){return 1-Math.cos(W*ft)}function qh(W){return Math.pow(2,10*(W-1))}function vc(W){return 1-Math.sqrt(1-W*W)}function dd(W,te){var ve;return arguments.length<2&&(te=.45),arguments.length?ve=te/Mt*Math.asin(1/W):(W=1,ve=te/4),function(Se){return 1+W*Math.pow(2,-10*Se)*Math.sin((Se-ve)*Mt/te)}}function Bh(W){return W||(W=1.70158),function(te){return te*te*((W+1)*te-W)}}function Wu(W){return W<1/2.75?7.5625*W*W:W<2/2.75?7.5625*(W-=1.5/2.75)*W+.75:W<2.5/2.75?7.5625*(W-=2.25/2.75)*W+.9375:7.5625*(W-=2.625/2.75)*W+.984375}e.interpolateHcl=vd;function vd(W,te){W=e.hcl(W),te=e.hcl(te);var ve=W.h,Se=W.c,Ee=W.l,Re=te.h-ve,nt=te.c-Se,He=te.l-Ee;return isNaN(nt)&&(nt=0,Se=isNaN(Se)?te.c:Se),isNaN(Re)?(Re=0,ve=isNaN(ve)?te.h:ve):Re>180?Re-=360:Re<-180&&(Re+=360),function(vt){return Vi(ve+Re*vt,Se+nt*vt,Ee+He*vt)+""}}e.interpolateHsl=pd;function pd(W,te){W=e.hsl(W),te=e.hsl(te);var ve=W.h,Se=W.s,Ee=W.l,Re=te.h-ve,nt=te.s-Se,He=te.l-Ee;return isNaN(nt)&&(nt=0,Se=isNaN(Se)?te.s:Se),isNaN(Re)?(Re=0,ve=isNaN(ve)?te.h:ve):Re>180?Re-=360:Re<-180&&(Re+=360),function(vt){return ri(ve+Re*vt,Se+nt*vt,Ee+He*vt)+""}}e.interpolateLab=lh;function lh(W,te){W=e.lab(W),te=e.lab(te);var ve=W.l,Se=W.a,Ee=W.b,Re=te.l-ve,nt=te.a-Se,He=te.b-Ee;return function(vt){return Ga(ve+Re*vt,Se+nt*vt,Ee+He*vt)+""}}e.interpolateRound=nf;function nf(W,te){return te-=W,function(ve){return Math.round(W+te*ve)}}e.transform=function(W){var te=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(ve){if(ve!=null){te.setAttribute("transform",ve);var Se=te.transform.baseVal.consolidate()}return new uh(Se?Se.matrix:ch)})(W)};function uh(W){var te=[W.a,W.b],ve=[W.c,W.d],Se=gd(te),Ee=af(te,ve),Re=gd(Rl(ve,te,-Ee))||0;te[0]*ve[1]180?te+=360:te-W>180&&(W+=360),Se.push({i:ve.push(Lc(ve)+"rotate(",null,")")-2,x:Zo(W,te)})):te&&ve.push(Lc(ve)+"rotate("+te+")")}function Lf(W,te,ve,Se){W!==te?Se.push({i:ve.push(Lc(ve)+"skewX(",null,")")-2,x:Zo(W,te)}):te&&ve.push(Lc(ve)+"skewX("+te+")")}function wu(W,te,ve,Se){if(W[0]!==te[0]||W[1]!==te[1]){var Ee=ve.push(Lc(ve)+"scale(",null,",",null,")");Se.push({i:Ee-4,x:Zo(W[0],te[0])},{i:Ee-2,x:Zo(W[1],te[1])})}else(te[0]!==1||te[1]!==1)&&ve.push(Lc(ve)+"scale("+te+")")}function fh(W,te){var ve=[],Se=[];return W=e.transform(W),te=e.transform(te),md(W.translate,te.translate,ve,Se),yd(W.rotate,te.rotate,ve,Se),Lf(W.skew,te.skew,ve,Se),wu(W.scale,te.scale,ve,Se),W=te=null,function(Ee){for(var Re=-1,nt=Se.length,He;++Re0?Re=Ar:(ve.c=null,ve.t=NaN,ve=null,te.end({type:"end",alpha:Re=0})):Ar>0&&(te.start({type:"start",alpha:Re=Ar}),ve=Ra(W.tick)),W):Re},W.start=function(){var Ar,En=Cr.length,zn=Vr.length,Zn=Se[0],ai=Se[1],Mi,Si;for(Ar=0;Ar=0;)Re.push(Rt=Ft[vt]),Rt.parent=He,Rt.depth=He.depth+1;ve&&(He.value=0),He.children=Ft}else ve&&(He.value=+ve.call(Se,He,He.depth)||0),delete He.children;return Il(Ee,function(ir){var nr,Cr;W&&(nr=ir.children)&&nr.sort(W),ve&&(Cr=ir.parent)&&(Cr.value+=ir.value)}),nt}return Se.sort=function(Ee){return arguments.length?(W=Ee,Se):W},Se.children=function(Ee){return arguments.length?(te=Ee,Se):te},Se.value=function(Ee){return arguments.length?(ve=Ee,Se):ve},Se.revalue=function(Ee){return ve&&(Au(Ee,function(Re){Re.children&&(Re.value=0)}),Il(Ee,function(Re){var nt;Re.children||(Re.value=+ve.call(Se,Re,Re.depth)||0),(nt=Re.parent)&&(nt.value+=Re.value)})),Ee},Se};function Tu(W,te){return e.rebind(W,te,"sort","children","value"),W.nodes=W,W.links=Tl,W}function Au(W,te){for(var ve=[W];(W=ve.pop())!=null;)if(te(W),(Ee=W.children)&&(Se=Ee.length))for(var Se,Ee;--Se>=0;)ve.push(Ee[Se])}function Il(W,te){for(var ve=[W],Se=[];(W=ve.pop())!=null;)if(Se.push(W),(nt=W.children)&&(Re=nt.length))for(var Ee=-1,Re,nt;++EeEe&&(Ee=He),Se.push(He)}for(nt=0;ntSe&&(ve=te,Se=Ee);return ve}function Gh(W){return W.reduce(Xu,0)}function Xu(W,te){return W+te[1]}e.layout.histogram=function(){var W=!0,te=Number,ve=Df,Se=Pc;function Ee(Re,nr){for(var He=[],vt=Re.map(te,this),Ft=ve.call(this,vt,nr),Rt=Se.call(this,Ft,vt,nr),ir,nr=-1,Cr=vt.length,Vr=Rt.length-1,sr=W?1:1/Cr,br;++nr0)for(nr=-1;++nr=Ft[0]&&br<=Ft[1]&&(ir=He[e.bisect(Rt,br,1,Vr)-1],ir.y+=sr,ir.push(Re[nr]));return He}return Ee.value=function(Re){return arguments.length?(te=Re,Ee):te},Ee.range=function(Re){return arguments.length?(ve=wr(Re),Ee):ve},Ee.bins=function(Re){return arguments.length?(Se=typeof Re=="number"?function(nt){return Ff(nt,Re)}:wr(Re),Ee):Se},Ee.frequency=function(Re){return arguments.length?(W=!!Re,Ee):W},Ee};function Pc(W,te){return Ff(W,Math.ceil(Math.log(te.length)/Math.LN2+1))}function Ff(W,te){for(var ve=-1,Se=+W[0],Ee=(W[1]-Se)/te,Re=[];++ve<=te;)Re[ve]=Ee*ve+Se;return Re}function Df(W){return[e.min(W),e.max(W)]}e.layout.pack=function(){var W=e.layout.hierarchy().sort(La),te=0,ve=[1,1],Se;function Ee(Re,nt){var He=W.call(this,Re,nt),vt=He[0],Ft=ve[0],Rt=ve[1],ir=Se==null?Math.sqrt:typeof Se=="function"?Se:function(){return Se};if(vt.x=vt.y=0,Il(vt,function(Cr){Cr.r=+ir(Cr.value)}),Il(vt,Hh),te){var nr=te*(Se?1:Math.max(2*vt.r/Ft,2*vt.r/Rt))/2;Il(vt,function(Cr){Cr.r+=nr}),Il(vt,Hh),Il(vt,function(Cr){Cr.r-=nr})}return Td(vt,Ft/2,Rt/2,Se?1:1/Math.max(2*vt.r/Ft,2*vt.r/Rt)),He}return Ee.size=function(Re){return arguments.length?(ve=Re,Ee):ve},Ee.radius=function(Re){return arguments.length?(Se=Re==null||typeof Re=="function"?Re:+Re,Ee):Se},Ee.padding=function(Re){return arguments.length?(te=+Re,Ee):te},Tu(Ee,W)};function La(W,te){return W.value-te.value}function Rf(W,te){var ve=W._pack_next;W._pack_next=te,te._pack_prev=W,te._pack_next=ve,ve._pack_prev=te}function m0(W,te){W._pack_next=te,te._pack_prev=W}function wd(W,te){var ve=te.x-W.x,Se=te.y-W.y,Ee=W.r+te.r;return .999*Ee*Ee>ve*ve+Se*Se}function Hh(W){if(!(te=W.children)||!(nr=te.length))return;var te,ve=1/0,Se=-1/0,Ee=1/0,Re=-1/0,nt,He,vt,Ft,Rt,ir,nr;function Cr(Ar){ve=Math.min(Ar.x-Ar.r,ve),Se=Math.max(Ar.x+Ar.r,Se),Ee=Math.min(Ar.y-Ar.r,Ee),Re=Math.max(Ar.y+Ar.r,Re)}if(te.forEach(Z0),nt=te[0],nt.x=-nt.r,nt.y=0,Cr(nt),nr>1&&(He=te[1],He.x=He.r,He.y=0,Cr(He),nr>2))for(vt=te[2],ul(nt,He,vt),Cr(vt),Rf(nt,vt),nt._pack_prev=vt,Rf(vt,He),He=nt._pack_next,Ft=3;Ftbr.x&&(br=En),En.depth>kr.depth&&(kr=En)});var Gr=te(sr,br)/2-sr.x,Wr=ve[0]/(br.x+te(br,sr)/2+Gr),Ar=ve[1]/(kr.depth||1);Au(Cr,function(En){En.x=(En.x+Gr)*Wr,En.y=En.depth*Ar})}return nr}function Re(Rt){for(var ir={A:null,children:[Rt]},nr=[ir],Cr;(Cr=nr.pop())!=null;)for(var Vr=Cr.children,sr,br=0,kr=Vr.length;br0&&(zf(Ze(sr,Rt,nr),Rt,En),kr+=En,Gr+=En),Wr+=sr.m,kr+=Cr.m,Ar+=br.m,Gr+=Vr.m;sr&&!vh(Vr)&&(Vr.t=sr,Vr.m+=Wr-Gr),Cr&&!If(br)&&(br.t=Cr,br.m+=kr-Ar,nr=Rt)}return nr}function Ft(Rt){Rt.x*=ve[0],Rt.y=Rt.depth*ve[1]}return Ee.separation=function(Rt){return arguments.length?(te=Rt,Ee):te},Ee.size=function(Rt){return arguments.length?(Se=(ve=Rt)==null?Ft:null,Ee):Se?null:ve},Ee.nodeSize=function(Rt){return arguments.length?(Se=(ve=Rt)==null?null:Ft,Ee):Se?ve:null},Tu(Ee,W)};function Wl(W,te){return W.parent==te.parent?1:2}function If(W){var te=W.children;return te.length?te[0]:W.t}function vh(W){var te=W.children,ve;return(ve=te.length)?te[ve-1]:W.t}function zf(W,te,ve){var Se=ve/(te.i-W.i);te.c-=Se,te.s+=ve,W.c+=Se,te.z+=ve,te.m+=ve}function qf(W){for(var te=0,ve=0,Se=W.children,Ee=Se.length,Re;--Ee>=0;)Re=Se[Ee],Re.z+=te,Re.m+=te,te+=Re.s+(ve+=Re.c)}function Ze(W,te,ve){return W.a.parent===te.parent?W.a:ve}e.layout.cluster=function(){var W=e.layout.hierarchy().sort(null).value(null),te=Wl,ve=[1,1],Se=!1;function Ee(Re,nt){var He=W.call(this,Re,nt),vt=He[0],Ft,Rt=0;Il(vt,function(sr){var br=sr.children;br&&br.length?(sr.x=Wt(br),sr.y=yt(br)):(sr.x=Ft?Rt+=te(sr,Ft):0,sr.y=0,Ft=sr)});var ir=zt(vt),nr=hr(vt),Cr=ir.x-te(ir,nr)/2,Vr=nr.x+te(nr,ir)/2;return Il(vt,Se?function(sr){sr.x=(sr.x-vt.x)*ve[0],sr.y=(vt.y-sr.y)*ve[1]}:function(sr){sr.x=(sr.x-Cr)/(Vr-Cr)*ve[0],sr.y=(1-(vt.y?sr.y/vt.y:1))*ve[1]}),He}return Ee.separation=function(Re){return arguments.length?(te=Re,Ee):te},Ee.size=function(Re){return arguments.length?(Se=(ve=Re)==null,Ee):Se?null:ve},Ee.nodeSize=function(Re){return arguments.length?(Se=(ve=Re)!=null,Ee):Se?ve:null},Tu(Ee,W)};function yt(W){return 1+e.max(W,function(te){return te.y})}function Wt(W){return W.reduce(function(te,ve){return te+ve.x},0)/W.length}function zt(W){var te=W.children;return te&&te.length?zt(te[0]):W}function hr(W){var te=W.children,ve;return te&&(ve=te.length)?hr(te[ve-1]):W}e.layout.treemap=function(){var W=e.layout.hierarchy(),te=Math.round,ve=[1,1],Se=null,Ee=Ur,Re=!1,nt,He="squarify",vt=.5*(1+Math.sqrt(5));function Ft(sr,br){for(var kr=-1,Gr=sr.length,Wr,Ar;++kr0;)Gr.push(Ar=Wr[ai-1]),Gr.area+=Ar.area,He!=="squarify"||(zn=nr(Gr,Zn))<=En?(Wr.pop(),En=zn):(Gr.area-=Gr.pop().area,Cr(Gr,Zn,kr,!1),Zn=Math.min(kr.dx,kr.dy),Gr.length=Gr.area=0,En=1/0);Gr.length&&(Cr(Gr,Zn,kr,!0),Gr.length=Gr.area=0),br.forEach(Rt)}}function ir(sr){var br=sr.children;if(br&&br.length){var kr=Ee(sr),Gr=br.slice(),Wr,Ar=[];for(Ft(Gr,kr.dx*kr.dy/sr.value),Ar.area=0;Wr=Gr.pop();)Ar.push(Wr),Ar.area+=Wr.area,Wr.z!=null&&(Cr(Ar,Wr.z?kr.dx:kr.dy,kr,!Gr.length),Ar.length=Ar.area=0);br.forEach(ir)}}function nr(sr,br){for(var kr=sr.area,Gr,Wr=0,Ar=1/0,En=-1,zn=sr.length;++EnWr&&(Wr=Gr));return kr*=kr,br*=br,kr?Math.max(br*Wr*vt/kr,kr/(br*Ar*vt)):1/0}function Cr(sr,br,kr,Gr){var Wr=-1,Ar=sr.length,En=kr.x,zn=kr.y,Zn=br?te(sr.area/br):0,ai;if(br==kr.dx){for((Gr||Zn>kr.dy)&&(Zn=kr.dy);++Wrkr.dx)&&(Zn=kr.dx);++Wr1);return W+te*Se*Math.sqrt(-2*Math.log(Re)/Re)}},logNormal:function(){var W=e.random.normal.apply(e,arguments);return function(){return Math.exp(W())}},bates:function(W){var te=e.random.irwinHall(W);return function(){return te()/W}},irwinHall:function(W){return function(){for(var te=0,ve=0;ve2?Pn:Fn,Ft=Se?hh:Oh;return Ee=vt(W,te,Ft,ve),Re=vt(te,W,Ft,dc),He}function He(vt){return Ee(vt)}return He.invert=function(vt){return Re(vt)},He.domain=function(vt){return arguments.length?(W=vt.map(Number),nt()):W},He.range=function(vt){return arguments.length?(te=vt,nt()):te},He.rangeRound=function(vt){return He.range(vt).interpolate(nf)},He.clamp=function(vt){return arguments.length?(Se=vt,nt()):Se},He.interpolate=function(vt){return arguments.length?(ve=vt,nt()):ve},He.ticks=function(vt){return pi(W,vt)},He.tickFormat=function(vt,Ft){return d3_scale_linearTickFormat(W,vt,Ft)},He.nice=function(vt){return Ci(W,vt),nt()},He.copy=function(){return On(W,te,ve,Se)},nt()}function ki(W,te){return e.rebind(W,te,"range","rangeRound","interpolate","clamp")}function Ci(W,te){return en(W,vn(qi(W,te)[2])),en(W,vn(qi(W,te)[2])),W}function qi(W,te){te==null&&(te=10);var ve=cn(W),Se=ve[1]-ve[0],Ee=Math.pow(10,Math.floor(Math.log(Se/te)/Math.LN10)),Re=te/Se*Ee;return Re<=.15?Ee*=10:Re<=.35?Ee*=5:Re<=.75&&(Ee*=2),ve[0]=Math.ceil(ve[0]/Ee)*Ee,ve[1]=Math.floor(ve[1]/Ee)*Ee+Ee*.5,ve[2]=Ee,ve}function pi(W,te){return e.range.apply(e,qi(W,te))}var Un={s:1,g:1,p:1,r:1,e:1};function Gn(W){return-Math.floor(Math.log(W)/Math.LN10+.01)}function Zi(W,te){var ve=Gn(te[2]);return W in Un?Math.abs(ve-Gn(Math.max(y(te[0]),y(te[1]))))+ +(W!=="e"):ve-(W==="%")*2}e.scale.log=function(){return na(e.scale.linear().domain([0,1]),10,!0,[1,10])};function na(W,te,ve,Se){function Ee(He){return(ve?Math.log(He<0?0:He):-Math.log(He>0?0:-He))/Math.log(te)}function Re(He){return ve?Math.pow(te,He):-Math.pow(te,-He)}function nt(He){return W(Ee(He))}return nt.invert=function(He){return Re(W.invert(He))},nt.domain=function(He){return arguments.length?(ve=He[0]>=0,W.domain((Se=He.map(Number)).map(Ee)),nt):Se},nt.base=function(He){return arguments.length?(te=+He,W.domain(Se.map(Ee)),nt):te},nt.nice=function(){var He=en(Se.map(Ee),ve?Math:Ha);return W.domain(He),Se=He.map(Re),nt},nt.ticks=function(){var He=cn(Se),vt=[],Ft=He[0],Rt=He[1],ir=Math.floor(Ee(Ft)),nr=Math.ceil(Ee(Rt)),Cr=te%1?2:te;if(isFinite(nr-ir)){if(ve){for(;ir0;Vr--)vt.push(Re(ir)*Vr);for(ir=0;vt[ir]Rt;nr--);vt=vt.slice(ir,nr)}return vt},nt.copy=function(){return na(W.copy(),te,ve,Se)},ki(nt,W)}var Ha={floor:function(W){return-Math.ceil(-W)},ceil:function(W){return-Math.floor(-W)}};e.scale.pow=function(){return Qa(e.scale.linear(),1,[0,1])};function Qa(W,te,ve){var Se=Ya(te),Ee=Ya(1/te);function Re(nt){return W(Se(nt))}return Re.invert=function(nt){return Ee(W.invert(nt))},Re.domain=function(nt){return arguments.length?(W.domain((ve=nt.map(Number)).map(Se)),Re):ve},Re.ticks=function(nt){return pi(ve,nt)},Re.tickFormat=function(nt,He){return d3_scale_linearTickFormat(ve,nt,He)},Re.nice=function(nt){return Re.domain(Ci(ve,nt))},Re.exponent=function(nt){return arguments.length?(Se=Ya(te=nt),Ee=Ya(1/te),W.domain(ve.map(Se)),Re):te},Re.copy=function(){return Qa(W.copy(),te,ve)},ki(Re,W)}function Ya(W){return function(te){return te<0?-Math.pow(-te,W):Math.pow(te,W)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return ho([],{t:"range",a:[[]]})};function ho(W,te){var ve,Se,Ee;function Re(He){return Se[((ve.get(He)||(te.t==="range"?ve.set(He,W.push(He)):NaN))-1)%Se.length]}function nt(He,vt){return e.range(W.length).map(function(Ft){return He+vt*Ft})}return Re.domain=function(He){if(!arguments.length)return W;W=[],ve=new S;for(var vt=-1,Ft=He.length,Rt;++vt0?ve[Re-1]:W[0],Renr?0:1;if(Rt=Lt)return vt(Rt,Vr)+(Ft?vt(Ft,1-Vr):"")+"Z";var sr,br,kr,Gr,Wr=0,Ar=0,En,zn,Zn,ai,Mi,Si,ya,Y,d=[];if((Gr=(+nt.apply(this,arguments)||0)/2)&&(kr=Se===cu?Math.sqrt(Ft*Ft+Rt*Rt):+Se.apply(this,arguments),Vr||(Ar*=-1),Rt&&(Ar=dn(kr/Rt*Math.sin(Gr))),Ft&&(Wr=dn(kr/Ft*Math.sin(Gr)))),Rt){En=Rt*Math.cos(ir+Ar),zn=Rt*Math.sin(ir+Ar),Zn=Rt*Math.cos(nr-Ar),ai=Rt*Math.sin(nr-Ar);var P=Math.abs(nr-ir-2*Ar)<=Tt?0:1;if(Ar&&ph(En,zn,Zn,ai)===Vr^P){var N=(ir+nr)/2;En=Rt*Math.cos(N),zn=Rt*Math.sin(N),Zn=ai=null}}else En=zn=0;if(Ft){Mi=Ft*Math.cos(nr-Wr),Si=Ft*Math.sin(nr-Wr),ya=Ft*Math.cos(ir+Wr),Y=Ft*Math.sin(ir+Wr);var H=Math.abs(ir-nr+2*Wr)<=Tt?0:1;if(Wr&&ph(Mi,Si,ya,Y)===1-Vr^H){var $=(ir+nr)/2;Mi=Ft*Math.cos($),Si=Ft*Math.sin($),ya=Y=null}}else Mi=Si=0;if(Cr>Ct&&(sr=Math.min(Math.abs(Rt-Ft)/2,+ve.apply(this,arguments)))>.001){br=Ft0?0:1}function gh(W,te,ve,Se,Ee){var Re=W[0]-te[0],nt=W[1]-te[1],He=(Ee?Se:-Se)/Math.sqrt(Re*Re+nt*nt),vt=He*nt,Ft=-He*Re,Rt=W[0]+vt,ir=W[1]+Ft,nr=te[0]+vt,Cr=te[1]+Ft,Vr=(Rt+nr)/2,sr=(ir+Cr)/2,br=nr-Rt,kr=Cr-ir,Gr=br*br+kr*kr,Wr=ve-Se,Ar=Rt*Cr-nr*ir,En=(kr<0?-1:1)*Math.sqrt(Math.max(0,Wr*Wr*Gr-Ar*Ar)),zn=(Ar*kr-br*En)/Gr,Zn=(-Ar*br-kr*En)/Gr,ai=(Ar*kr+br*En)/Gr,Mi=(-Ar*br+kr*En)/Gr,Si=zn-Vr,ya=Zn-sr,Y=ai-Vr,d=Mi-sr;return Si*Si+ya*ya>Y*Y+d*d&&(zn=ai,Zn=Mi),[[zn-vt,Zn-Ft],[zn*ve/Wr,Zn*ve/Wr]]}function uf(){return!0}function Ku(W){var te=qo,ve=$a,Se=uf,Ee=Ju,Re=Ee.key,nt=.7;function He(vt){var Ft=[],Rt=[],ir=-1,nr=vt.length,Cr,Vr=wr(te),sr=wr(ve);function br(){Ft.push("M",Ee(W(Rt),nt))}for(;++ir1?W.join("L"):W+"Z"}function Qu(W){return W.join("L")+"Z"}function Wd(W){for(var te=0,ve=W.length,Se=W[0],Ee=[Se[0],",",Se[1]];++te1&&Ee.push("H",Se[0]),Ee.join("")}function x0(W){for(var te=0,ve=W.length,Se=W[0],Ee=[Se[0],",",Se[1]];++te1){He=te[1],Re=W[vt],vt++,Se+="C"+(Ee[0]+nt[0])+","+(Ee[1]+nt[1])+","+(Re[0]-He[0])+","+(Re[1]-He[1])+","+Re[0]+","+Re[1];for(var Ft=2;Ft9&&(Re=ve*3/Math.sqrt(Re),nt[He]=Re*Se,nt[He+1]=Re*Ee));for(He=-1;++He<=vt;)Re=(W[Math.min(vt,He+1)][0]-W[Math.max(0,He-1)][0])/(6*(1+nt[He]*nt[He])),te.push([Re||0,nt[He]*Re||0]);return te}function Gt(W){return W.length<3?Ju(W):W[0]+jh(W,lt(W))}e.svg.line.radial=function(){var W=Ku(Zt);return W.radius=W.x,delete W.x,W.angle=W.y,delete W.y,W};function Zt(W){for(var te,ve=-1,Se=W.length,Ee,Re;++veTt)+",1 "+ir}function Ft(Rt,ir,nr,Cr){return"Q 0,0 "+Cr}return Re.radius=function(Rt){return arguments.length?(ve=wr(Rt),Re):ve},Re.source=function(Rt){return arguments.length?(W=wr(Rt),Re):W},Re.target=function(Rt){return arguments.length?(te=wr(Rt),Re):te},Re.startAngle=function(Rt){return arguments.length?(Se=wr(Rt),Re):Se},Re.endAngle=function(Rt){return arguments.length?(Ee=wr(Rt),Re):Ee},Re};function Sr(W){return W.radius}e.svg.diagonal=function(){var W=Kt,te=ur,ve=Br;function Se(Ee,Re){var nt=W.call(this,Ee,Re),He=te.call(this,Ee,Re),vt=(nt.y+He.y)/2,Ft=[nt,{x:nt.x,y:vt},{x:He.x,y:vt},He];return Ft=Ft.map(ve),"M"+Ft[0]+"C"+Ft[1]+" "+Ft[2]+" "+Ft[3]}return Se.source=function(Ee){return arguments.length?(W=wr(Ee),Se):W},Se.target=function(Ee){return arguments.length?(te=wr(Ee),Se):te},Se.projection=function(Ee){return arguments.length?(ve=Ee,Se):ve},Se};function Br(W){return[W.x,W.y]}e.svg.diagonal.radial=function(){var W=e.svg.diagonal(),te=Br,ve=W.projection;return W.projection=function(Se){return arguments.length?ve(ln(te=Se)):te},W};function ln(W){return function(){var te=W.apply(this,arguments),ve=te[0],Se=te[1]-ft;return[ve*Math.cos(Se),ve*Math.sin(Se)]}}e.svg.symbol=function(){var W=In,te=wn;function ve(Se,Ee){return(Bi.get(W.call(this,Se,Ee))||gi)(te.call(this,Se,Ee))}return ve.type=function(Se){return arguments.length?(W=wr(Se),ve):W},ve.size=function(Se){return arguments.length?(te=wr(Se),ve):te},ve};function wn(){return 64}function In(){return"circle"}function gi(W){var te=Math.sqrt(W/Tt);return"M0,"+te+"A"+te+","+te+" 0 1,1 0,"+-te+"A"+te+","+te+" 0 1,1 0,"+te+"Z"}var Bi=e.map({circle:gi,cross:function(W){var te=Math.sqrt(W/5)/2;return"M"+-3*te+","+-te+"H"+-te+"V"+-3*te+"H"+te+"V"+-te+"H"+3*te+"V"+te+"H"+te+"V"+3*te+"H"+-te+"V"+te+"H"+-3*te+"Z"},diamond:function(W){var te=Math.sqrt(W/(2*ia)),ve=te*ia;return"M0,"+-te+"L"+ve+",0 0,"+te+" "+-ve+",0Z"},square:function(W){var te=Math.sqrt(W)/2;return"M"+-te+","+-te+"L"+te+","+-te+" "+te+","+te+" "+-te+","+te+"Z"},"triangle-down":function(W){var te=Math.sqrt(W/mi),ve=te*mi/2;return"M0,"+ve+"L"+te+","+-ve+" "+-te+","+-ve+"Z"},"triangle-up":function(W){var te=Math.sqrt(W/mi),ve=te*mi/2;return"M0,"+-ve+"L"+te+","+ve+" "+-te+","+ve+"Z"}});e.svg.symbolTypes=Bi.keys();var mi=Math.sqrt(3),ia=Math.tan(30*kt);ie.transition=function(W){for(var te=cl||++ls,ve=wi(W),Se=[],Ee,Re,nt=Eu||{time:Date.now(),ease:tf,delay:0,duration:250},He=-1,vt=this.length;++He0;)ir[--Gr].call(W,kr);if(br>=1)return nt.event&&nt.event.end.call(W,W.__data__,te),--Re.count?delete Re[Se]:delete W[ve],1}nt||(He=Ee.time,vt=Ra(nr,0,He),nt=Re[Se]={tween:new S,time:He,timer:vt,delay:Ee.delay,duration:Ee.duration,ease:Ee.ease,index:te},Ee=null,++Re.count)}e.svg.axis=function(){var W=e.scale.linear(),te=fl,ve=6,Se=6,Ee=3,Re=[10],nt=null,He;function vt(Ft){Ft.each(function(){var Rt=e.select(this),ir=this.__chart__||W,nr=this.__chart__=W.copy(),Cr=nt==null?nr.ticks?nr.ticks.apply(nr,Re):nr.domain():nt,Vr=He==null?nr.tickFormat?nr.tickFormat.apply(nr,Re):O:He,sr=Rt.selectAll(".tick").data(Cr,nr),br=sr.enter().insert("g",".domain").attr("class","tick").style("opacity",Ct),kr=e.transition(sr.exit()).style("opacity",Ct).remove(),Gr=e.transition(sr.order()).style("opacity",1),Wr=Math.max(ve,0)+Ee,Ar,En=yn(nr),zn=Rt.selectAll(".domain").data([0]),Zn=(zn.enter().append("path").attr("class","domain"),e.transition(zn));br.append("line"),br.append("text");var ai=br.select("line"),Mi=Gr.select("line"),Si=sr.select("text").text(Vr),ya=br.select("text"),Y=Gr.select("text"),d=te==="top"||te==="left"?-1:1,P,N,H,$;if(te==="bottom"||te==="top"?(Ar=du,P="x",H="y",N="x2",$="y2",Si.attr("dy",d<0?"0em":".71em").style("text-anchor","middle"),Zn.attr("d","M"+En[0]+","+d*Se+"V0H"+En[1]+"V"+d*Se)):(Ar=ms,P="y",H="x",N="y2",$="x2",Si.attr("dy",".32em").style("text-anchor",d<0?"end":"start"),Zn.attr("d","M"+d*Se+","+En[0]+"H0V"+En[1]+"H"+d*Se)),ai.attr($,d*ve),ya.attr(H,d*Wr),Mi.attr(N,0).attr($,d*ve),Y.attr(P,0).attr(H,d*Wr),nr.rangeBand){var se=nr,de=se.rangeBand()/2;ir=nr=function(Ae){return se(Ae)+de}}else ir.rangeBand?ir=nr:kr.call(Ar,nr,ir);br.call(Ar,ir,nr),Gr.call(Ar,nr,nr)})}return vt.scale=function(Ft){return arguments.length?(W=Ft,vt):W},vt.orient=function(Ft){return arguments.length?(te=Ft in Fc?Ft+"":fl,vt):te},vt.ticks=function(){return arguments.length?(Re=r(arguments),vt):Re},vt.tickValues=function(Ft){return arguments.length?(nt=Ft,vt):nt},vt.tickFormat=function(Ft){return arguments.length?(He=Ft,vt):He},vt.tickSize=function(Ft){var Rt=arguments.length;return Rt?(ve=+Ft,Se=+arguments[Rt-1],vt):ve},vt.innerTickSize=function(Ft){return arguments.length?(ve=+Ft,vt):ve},vt.outerTickSize=function(Ft){return arguments.length?(Se=+Ft,vt):Se},vt.tickPadding=function(Ft){return arguments.length?(Ee=+Ft,vt):Ee},vt.tickSubdivide=function(){return arguments.length&&vt},vt};var fl="bottom",Fc={top:1,right:1,bottom:1,left:1};function du(W,te,ve){W.attr("transform",function(Se){var Ee=te(Se);return"translate("+(isFinite(Ee)?Ee:ve(Se))+",0)"})}function ms(W,te,ve){W.attr("transform",function(Se){var Ee=te(Se);return"translate(0,"+(isFinite(Ee)?Ee:ve(Se))+")"})}e.svg.brush=function(){var W=ye(Rt,"brushstart","brush","brushend"),te=null,ve=null,Se=[0,0],Ee=[0,0],Re,nt,He=!0,vt=!0,Ft=ku[0];function Rt(sr){sr.each(function(){var br=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Vr).on("touchstart.brush",Vr),kr=br.selectAll(".background").data([0]);kr.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),br.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Gr=br.selectAll(".resize").data(Ft,O);Gr.exit().remove(),Gr.enter().append("g").attr("class",function(zn){return"resize "+zn}).style("cursor",function(zn){return ff[zn]}).append("rect").attr("x",function(zn){return/[ew]$/.test(zn)?-3:null}).attr("y",function(zn){return/^[ns]/.test(zn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Gr.style("display",Rt.empty()?"none":null);var Wr=e.transition(br),Ar=e.transition(kr),En;te&&(En=yn(te),Ar.attr("x",En[0]).attr("width",En[1]-En[0]),nr(Wr)),ve&&(En=yn(ve),Ar.attr("y",En[0]).attr("height",En[1]-En[0]),Cr(Wr)),ir(Wr)})}Rt.event=function(sr){sr.each(function(){var br=W.of(this,arguments),kr={x:Se,y:Ee,i:Re,j:nt},Gr=this.__chart__||kr;this.__chart__=kr,cl?e.select(this).transition().each("start.brush",function(){Re=Gr.i,nt=Gr.j,Se=Gr.x,Ee=Gr.y,br({type:"brushstart"})}).tween("brush:brush",function(){var Wr=ef(Se,kr.x),Ar=ef(Ee,kr.y);return Re=nt=null,function(En){Se=kr.x=Wr(En),Ee=kr.y=Ar(En),br({type:"brush",mode:"resize"})}}).each("end.brush",function(){Re=kr.i,nt=kr.j,br({type:"brush",mode:"resize"}),br({type:"brushend"})}):(br({type:"brushstart"}),br({type:"brush",mode:"resize"}),br({type:"brushend"}))})};function ir(sr){sr.selectAll(".resize").attr("transform",function(br){return"translate("+Se[+/e$/.test(br)]+","+Ee[+/^s/.test(br)]+")"})}function nr(sr){sr.select(".extent").attr("x",Se[0]),sr.selectAll(".extent,.n>rect,.s>rect").attr("width",Se[1]-Se[0])}function Cr(sr){sr.select(".extent").attr("y",Ee[0]),sr.selectAll(".extent,.e>rect,.w>rect").attr("height",Ee[1]-Ee[0])}function Vr(){var sr=this,br=e.select(e.event.target),kr=W.of(sr,arguments),Gr=e.select(sr),Wr=br.datum(),Ar=!/^(n|s)$/.test(Wr)&&te,En=!/^(e|w)$/.test(Wr)&&ve,zn=br.classed("extent"),Zn=or(sr),ai,Mi=e.mouse(sr),Si,ya=e.select(i(sr)).on("keydown.brush",P).on("keyup.brush",N);if(e.event.changedTouches?ya.on("touchmove.brush",H).on("touchend.brush",se):ya.on("mousemove.brush",H).on("mouseup.brush",se),Gr.interrupt().selectAll("*").interrupt(),zn)Mi[0]=Se[0]-Mi[0],Mi[1]=Ee[0]-Mi[1];else if(Wr){var Y=+/w$/.test(Wr),d=+/^n/.test(Wr);Si=[Se[1-Y]-Mi[0],Ee[1-d]-Mi[1]],Mi[0]=Se[Y],Mi[1]=Ee[d]}else e.event.altKey&&(ai=Mi.slice());Gr.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",br.style("cursor")),kr({type:"brushstart"}),H();function P(){e.event.keyCode==32&&(zn||(ai=null,Mi[0]-=Se[1],Mi[1]-=Ee[1],zn=2),ce())}function N(){e.event.keyCode==32&&zn==2&&(Mi[0]+=Se[1],Mi[1]+=Ee[1],zn=0,ce())}function H(){var de=e.mouse(sr),Ae=!1;Si&&(de[0]+=Si[0],de[1]+=Si[1]),zn||(e.event.altKey?(ai||(ai=[(Se[0]+Se[1])/2,(Ee[0]+Ee[1])/2]),Mi[0]=Se[+(de[0]{(function(e,t){typeof KS=="object"&&typeof Dte!="undefined"?t(KS):(e=e||self,t(e.d3=e.d3||{}))})(KS,function(e){"use strict";var t=new Date,r=new Date;function n(Te,Ve,$e,ot){function rt(it){return Te(it=arguments.length===0?new Date:new Date(+it)),it}return rt.floor=function(it){return Te(it=new Date(+it)),it},rt.ceil=function(it){return Te(it=new Date(it-1)),Ve(it,1),Te(it),it},rt.round=function(it){var We=rt(it),mt=rt.ceil(it);return it-We0))return bt;do bt.push(Yt=new Date(+it)),Ve(it,mt),Te(it);while(Yt=We)for(;Te(We),!it(We);)We.setTime(We-1)},function(We,mt){if(We>=We)if(mt<0)for(;++mt<=0;)for(;Ve(We,-1),!it(We););else for(;--mt>=0;)for(;Ve(We,1),!it(We););})},$e&&(rt.count=function(it,We){return t.setTime(+it),r.setTime(+We),Te(t),Te(r),Math.floor($e(t,r))},rt.every=function(it){return it=Math.floor(it),!isFinite(it)||!(it>0)?null:it>1?rt.filter(ot?function(We){return ot(We)%it===0}:function(We){return rt.count(0,We)%it===0}):rt}),rt}var a=n(function(){},function(Te,Ve){Te.setTime(+Te+Ve)},function(Te,Ve){return Ve-Te});a.every=function(Te){return Te=Math.floor(Te),!isFinite(Te)||!(Te>0)?null:Te>1?n(function(Ve){Ve.setTime(Math.floor(Ve/Te)*Te)},function(Ve,$e){Ve.setTime(+Ve+$e*Te)},function(Ve,$e){return($e-Ve)/Te}):a};var i=a.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=n(function(Te){Te.setTime(Te-Te.getMilliseconds())},function(Te,Ve){Te.setTime(+Te+Ve*o)},function(Te,Ve){return(Ve-Te)/o},function(Te){return Te.getUTCSeconds()}),v=f.range,g=n(function(Te){Te.setTime(Te-Te.getMilliseconds()-Te.getSeconds()*o)},function(Te,Ve){Te.setTime(+Te+Ve*s)},function(Te,Ve){return(Ve-Te)/s},function(Te){return Te.getMinutes()}),p=g.range,_=n(function(Te){Te.setTime(Te-Te.getMilliseconds()-Te.getSeconds()*o-Te.getMinutes()*s)},function(Te,Ve){Te.setTime(+Te+Ve*l)},function(Te,Ve){return(Ve-Te)/l},function(Te){return Te.getHours()}),x=_.range,y=n(function(Te){Te.setHours(0,0,0,0)},function(Te,Ve){Te.setDate(Te.getDate()+Ve)},function(Te,Ve){return(Ve-Te-(Ve.getTimezoneOffset()-Te.getTimezoneOffset())*s)/u},function(Te){return Te.getDate()-1}),C=y.range;function k(Te){return n(function(Ve){Ve.setDate(Ve.getDate()-(Ve.getDay()+7-Te)%7),Ve.setHours(0,0,0,0)},function(Ve,$e){Ve.setDate(Ve.getDate()+$e*7)},function(Ve,$e){return($e-Ve-($e.getTimezoneOffset()-Ve.getTimezoneOffset())*s)/c})}var S=k(0),L=k(1),w=k(2),T=k(3),A=k(4),m=k(5),F=k(6),E=S.range,I=L.range,R=w.range,B=T.range,O=A.range,U=m.range,j=F.range,q=n(function(Te){Te.setDate(1),Te.setHours(0,0,0,0)},function(Te,Ve){Te.setMonth(Te.getMonth()+Ve)},function(Te,Ve){return Ve.getMonth()-Te.getMonth()+(Ve.getFullYear()-Te.getFullYear())*12},function(Te){return Te.getMonth()}),V=q.range,K=n(function(Te){Te.setMonth(0,1),Te.setHours(0,0,0,0)},function(Te,Ve){Te.setFullYear(Te.getFullYear()+Ve)},function(Te,Ve){return Ve.getFullYear()-Te.getFullYear()},function(Te){return Te.getFullYear()});K.every=function(Te){return!isFinite(Te=Math.floor(Te))||!(Te>0)?null:n(function(Ve){Ve.setFullYear(Math.floor(Ve.getFullYear()/Te)*Te),Ve.setMonth(0,1),Ve.setHours(0,0,0,0)},function(Ve,$e){Ve.setFullYear(Ve.getFullYear()+$e*Te)})};var ee=K.range,ce=n(function(Te){Te.setUTCSeconds(0,0)},function(Te,Ve){Te.setTime(+Te+Ve*s)},function(Te,Ve){return(Ve-Te)/s},function(Te){return Te.getUTCMinutes()}),me=ce.range,ye=n(function(Te){Te.setUTCMinutes(0,0,0)},function(Te,Ve){Te.setTime(+Te+Ve*l)},function(Te,Ve){return(Ve-Te)/l},function(Te){return Te.getUTCHours()}),ue=ye.range,J=n(function(Te){Te.setUTCHours(0,0,0,0)},function(Te,Ve){Te.setUTCDate(Te.getUTCDate()+Ve)},function(Te,Ve){return(Ve-Te)/u},function(Te){return Te.getUTCDate()-1}),_e=J.range;function ne(Te){return n(function(Ve){Ve.setUTCDate(Ve.getUTCDate()-(Ve.getUTCDay()+7-Te)%7),Ve.setUTCHours(0,0,0,0)},function(Ve,$e){Ve.setUTCDate(Ve.getUTCDate()+$e*7)},function(Ve,$e){return($e-Ve)/c})}var ae=ne(0),pe=ne(1),ie=ne(2),le=ne(3),xe=ne(4),be=ne(5),De=ne(6),Ge=ae.range,pt=pe.range,tt=ie.range,Oe=le.range,ze=xe.range,ut=be.range,et=De.range,qe=n(function(Te){Te.setUTCDate(1),Te.setUTCHours(0,0,0,0)},function(Te,Ve){Te.setUTCMonth(Te.getUTCMonth()+Ve)},function(Te,Ve){return Ve.getUTCMonth()-Te.getUTCMonth()+(Ve.getUTCFullYear()-Te.getUTCFullYear())*12},function(Te){return Te.getUTCMonth()}),we=qe.range,Le=n(function(Te){Te.setUTCMonth(0,1),Te.setUTCHours(0,0,0,0)},function(Te,Ve){Te.setUTCFullYear(Te.getUTCFullYear()+Ve)},function(Te,Ve){return Ve.getUTCFullYear()-Te.getUTCFullYear()},function(Te){return Te.getUTCFullYear()});Le.every=function(Te){return!isFinite(Te=Math.floor(Te))||!(Te>0)?null:n(function(Ve){Ve.setUTCFullYear(Math.floor(Ve.getUTCFullYear()/Te)*Te),Ve.setUTCMonth(0,1),Ve.setUTCHours(0,0,0,0)},function(Ve,$e){Ve.setUTCFullYear(Ve.getUTCFullYear()+$e*Te)})};var Ke=Le.range;e.timeDay=y,e.timeDays=C,e.timeFriday=m,e.timeFridays=U,e.timeHour=_,e.timeHours=x,e.timeInterval=n,e.timeMillisecond=a,e.timeMilliseconds=i,e.timeMinute=g,e.timeMinutes=p,e.timeMonday=L,e.timeMondays=I,e.timeMonth=q,e.timeMonths=V,e.timeSaturday=F,e.timeSaturdays=j,e.timeSecond=f,e.timeSeconds=v,e.timeSunday=S,e.timeSundays=E,e.timeThursday=A,e.timeThursdays=O,e.timeTuesday=w,e.timeTuesdays=R,e.timeWednesday=T,e.timeWednesdays=B,e.timeWeek=S,e.timeWeeks=E,e.timeYear=K,e.timeYears=ee,e.utcDay=J,e.utcDays=_e,e.utcFriday=be,e.utcFridays=ut,e.utcHour=ye,e.utcHours=ue,e.utcMillisecond=a,e.utcMilliseconds=i,e.utcMinute=ce,e.utcMinutes=me,e.utcMonday=pe,e.utcMondays=pt,e.utcMonth=qe,e.utcMonths=we,e.utcSaturday=De,e.utcSaturdays=et,e.utcSecond=f,e.utcSeconds=v,e.utcSunday=ae,e.utcSundays=Ge,e.utcThursday=xe,e.utcThursdays=ze,e.utcTuesday=ie,e.utcTuesdays=tt,e.utcWednesday=le,e.utcWednesdays=Oe,e.utcWeek=ae,e.utcWeeks=Ge,e.utcYear=Le,e.utcYears=Ke,Object.defineProperty(e,"__esModule",{value:!0})})});var lb=fe((JS,Rte)=>{(function(e,t){typeof JS=="object"&&typeof Rte!="undefined"?t(JS,HI()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(JS,function(e,t){"use strict";function r(ft){if(0<=ft.y&&ft.y<100){var kt=new Date(-1,ft.m,ft.d,ft.H,ft.M,ft.S,ft.L);return kt.setFullYear(ft.y),kt}return new Date(ft.y,ft.m,ft.d,ft.H,ft.M,ft.S,ft.L)}function n(ft){if(0<=ft.y&&ft.y<100){var kt=new Date(Date.UTC(-1,ft.m,ft.d,ft.H,ft.M,ft.S,ft.L));return kt.setUTCFullYear(ft.y),kt}return new Date(Date.UTC(ft.y,ft.m,ft.d,ft.H,ft.M,ft.S,ft.L))}function a(ft,kt,rr){return{y:ft,m:kt,d:rr,H:0,M:0,S:0,L:0}}function i(ft){var kt=ft.dateTime,rr=ft.date,pr=ft.time,Kr=ft.periods,Nr=ft.days,dn=ft.shortDays,xr=ft.months,Fr=ft.shortMonths,Zr=v(Kr),Cn=g(Kr),Dt=v(Nr),At=g(Nr),Vt=v(dn),Qt=g(dn),Ut=v(xr),_r=g(xr),rn=v(Fr),Jr=g(Fr),qn={a:sl,A:ko,b:ao,B:Da,c:null,d:q,e:q,f:me,g:be,G:Ge,H:V,I:K,j:ee,L:ce,m:ye,M:ue,p:bl,q:wo,Q:or,s:fr,S:J,u:_e,U:ne,V:pe,w:ie,W:le,x:null,X:null,y:xe,Y:De,Z:pt,"%":mr},ri={a:Zs,A:su,b:fc,B:Af,c:null,d:tt,e:tt,f:qe,g:mt,G:Yt,H:Oe,I:ze,j:ut,L:et,m:we,M:Le,p:ct,q:Jt,Q:or,s:fr,S:Ke,u:Te,U:Ve,V:ot,w:rt,W:it,x:null,X:null,y:We,Y:bt,Z:jt,"%":mr},Jn={a:va,A:Xi,b:oa,B:Ma,c:Ga,d:A,e:A,f:B,g:S,G:k,H:F,I:F,j:m,L:R,m:T,M:E,p:ha,q:w,Q:U,s:j,S:I,u:_,U:x,V:y,w:p,W:C,x:ss,X:yo,y:S,Y:k,Z:L,"%":O};qn.x=Ii(rr,qn),qn.X=Ii(pr,qn),qn.c=Ii(kt,qn),ri.x=Ii(rr,ri),ri.X=Ii(pr,ri),ri.c=Ii(kt,ri);function Ii(er,wr){return function(nn){var Dr=[],bn=-1,Yr=0,Tn=er.length,Kn,Qn,Ai;for(nn instanceof Date||(nn=new Date(+nn));++bn53)return null;"w"in Dr||(Dr.w=1),"Z"in Dr?(Yr=n(a(Dr.y,0,1)),Tn=Yr.getUTCDay(),Yr=Tn>4||Tn===0?t.utcMonday.ceil(Yr):t.utcMonday(Yr),Yr=t.utcDay.offset(Yr,(Dr.V-1)*7),Dr.y=Yr.getUTCFullYear(),Dr.m=Yr.getUTCMonth(),Dr.d=Yr.getUTCDate()+(Dr.w+6)%7):(Yr=r(a(Dr.y,0,1)),Tn=Yr.getDay(),Yr=Tn>4||Tn===0?t.timeMonday.ceil(Yr):t.timeMonday(Yr),Yr=t.timeDay.offset(Yr,(Dr.V-1)*7),Dr.y=Yr.getFullYear(),Dr.m=Yr.getMonth(),Dr.d=Yr.getDate()+(Dr.w+6)%7)}else("W"in Dr||"U"in Dr)&&("w"in Dr||(Dr.w="u"in Dr?Dr.u%7:"W"in Dr?1:0),Tn="Z"in Dr?n(a(Dr.y,0,1)).getUTCDay():r(a(Dr.y,0,1)).getDay(),Dr.m=0,Dr.d="W"in Dr?(Dr.w+6)%7+Dr.W*7-(Tn+5)%7:Dr.w+Dr.U*7-(Tn+6)%7);return"Z"in Dr?(Dr.H+=Dr.Z/100|0,Dr.M+=Dr.Z%100,n(Dr)):r(Dr)}}function ra(er,wr,nn,Dr){for(var bn=0,Yr=wr.length,Tn=nn.length,Kn,Qn;bn=Tn)return-1;if(Kn=wr.charCodeAt(bn++),Kn===37){if(Kn=wr.charAt(bn++),Qn=Jn[Kn in o?wr.charAt(bn++):Kn],!Qn||(Dr=Qn(er,nn,Dr))<0)return-1}else if(Kn!=nn.charCodeAt(Dr++))return-1}return Dr}function ha(er,wr,nn){var Dr=Zr.exec(wr.slice(nn));return Dr?(er.p=Cn[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function va(er,wr,nn){var Dr=Vt.exec(wr.slice(nn));return Dr?(er.w=Qt[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function Xi(er,wr,nn){var Dr=Dt.exec(wr.slice(nn));return Dr?(er.w=At[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function oa(er,wr,nn){var Dr=rn.exec(wr.slice(nn));return Dr?(er.m=Jr[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function Ma(er,wr,nn){var Dr=Ut.exec(wr.slice(nn));return Dr?(er.m=_r[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function Ga(er,wr,nn){return ra(er,kt,wr,nn)}function ss(er,wr,nn){return ra(er,rr,wr,nn)}function yo(er,wr,nn){return ra(er,pr,wr,nn)}function sl(er){return dn[er.getDay()]}function ko(er){return Nr[er.getDay()]}function ao(er){return Fr[er.getMonth()]}function Da(er){return xr[er.getMonth()]}function bl(er){return Kr[+(er.getHours()>=12)]}function wo(er){return 1+~~(er.getMonth()/3)}function Zs(er){return dn[er.getUTCDay()]}function su(er){return Nr[er.getUTCDay()]}function fc(er){return Fr[er.getUTCMonth()]}function Af(er){return xr[er.getUTCMonth()]}function ct(er){return Kr[+(er.getUTCHours()>=12)]}function Jt(er){return 1+~~(er.getUTCMonth()/3)}return{format:function(er){var wr=Ii(er+="",qn);return wr.toString=function(){return er},wr},parse:function(er){var wr=Vi(er+="",!1);return wr.toString=function(){return er},wr},utcFormat:function(er){var wr=Ii(er+="",ri);return wr.toString=function(){return er},wr},utcParse:function(er){var wr=Vi(er+="",!0);return wr.toString=function(){return er},wr}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,l=/^%/,u=/[\\^$*+?|[\]().{}]/g;function c(ft,kt,rr){var pr=ft<0?"-":"",Kr=(pr?-ft:ft)+"",Nr=Kr.length;return pr+(Nr68?1900:2e3),rr+pr[0].length):-1}function L(ft,kt,rr){var pr=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(kt.slice(rr,rr+6));return pr?(ft.Z=pr[1]?0:-(pr[2]+(pr[3]||"00")),rr+pr[0].length):-1}function w(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+1));return pr?(ft.q=pr[0]*3-3,rr+pr[0].length):-1}function T(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.m=pr[0]-1,rr+pr[0].length):-1}function A(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.d=+pr[0],rr+pr[0].length):-1}function m(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+3));return pr?(ft.m=0,ft.d=+pr[0],rr+pr[0].length):-1}function F(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.H=+pr[0],rr+pr[0].length):-1}function E(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.M=+pr[0],rr+pr[0].length):-1}function I(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.S=+pr[0],rr+pr[0].length):-1}function R(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+3));return pr?(ft.L=+pr[0],rr+pr[0].length):-1}function B(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+6));return pr?(ft.L=Math.floor(pr[0]/1e3),rr+pr[0].length):-1}function O(ft,kt,rr){var pr=l.exec(kt.slice(rr,rr+1));return pr?rr+pr[0].length:-1}function U(ft,kt,rr){var pr=s.exec(kt.slice(rr));return pr?(ft.Q=+pr[0],rr+pr[0].length):-1}function j(ft,kt,rr){var pr=s.exec(kt.slice(rr));return pr?(ft.s=+pr[0],rr+pr[0].length):-1}function q(ft,kt){return c(ft.getDate(),kt,2)}function V(ft,kt){return c(ft.getHours(),kt,2)}function K(ft,kt){return c(ft.getHours()%12||12,kt,2)}function ee(ft,kt){return c(1+t.timeDay.count(t.timeYear(ft),ft),kt,3)}function ce(ft,kt){return c(ft.getMilliseconds(),kt,3)}function me(ft,kt){return ce(ft,kt)+"000"}function ye(ft,kt){return c(ft.getMonth()+1,kt,2)}function ue(ft,kt){return c(ft.getMinutes(),kt,2)}function J(ft,kt){return c(ft.getSeconds(),kt,2)}function _e(ft){var kt=ft.getDay();return kt===0?7:kt}function ne(ft,kt){return c(t.timeSunday.count(t.timeYear(ft)-1,ft),kt,2)}function ae(ft){var kt=ft.getDay();return kt>=4||kt===0?t.timeThursday(ft):t.timeThursday.ceil(ft)}function pe(ft,kt){return ft=ae(ft),c(t.timeThursday.count(t.timeYear(ft),ft)+(t.timeYear(ft).getDay()===4),kt,2)}function ie(ft){return ft.getDay()}function le(ft,kt){return c(t.timeMonday.count(t.timeYear(ft)-1,ft),kt,2)}function xe(ft,kt){return c(ft.getFullYear()%100,kt,2)}function be(ft,kt){return ft=ae(ft),c(ft.getFullYear()%100,kt,2)}function De(ft,kt){return c(ft.getFullYear()%1e4,kt,4)}function Ge(ft,kt){var rr=ft.getDay();return ft=rr>=4||rr===0?t.timeThursday(ft):t.timeThursday.ceil(ft),c(ft.getFullYear()%1e4,kt,4)}function pt(ft){var kt=ft.getTimezoneOffset();return(kt>0?"-":(kt*=-1,"+"))+c(kt/60|0,"0",2)+c(kt%60,"0",2)}function tt(ft,kt){return c(ft.getUTCDate(),kt,2)}function Oe(ft,kt){return c(ft.getUTCHours(),kt,2)}function ze(ft,kt){return c(ft.getUTCHours()%12||12,kt,2)}function ut(ft,kt){return c(1+t.utcDay.count(t.utcYear(ft),ft),kt,3)}function et(ft,kt){return c(ft.getUTCMilliseconds(),kt,3)}function qe(ft,kt){return et(ft,kt)+"000"}function we(ft,kt){return c(ft.getUTCMonth()+1,kt,2)}function Le(ft,kt){return c(ft.getUTCMinutes(),kt,2)}function Ke(ft,kt){return c(ft.getUTCSeconds(),kt,2)}function Te(ft){var kt=ft.getUTCDay();return kt===0?7:kt}function Ve(ft,kt){return c(t.utcSunday.count(t.utcYear(ft)-1,ft),kt,2)}function $e(ft){var kt=ft.getUTCDay();return kt>=4||kt===0?t.utcThursday(ft):t.utcThursday.ceil(ft)}function ot(ft,kt){return ft=$e(ft),c(t.utcThursday.count(t.utcYear(ft),ft)+(t.utcYear(ft).getUTCDay()===4),kt,2)}function rt(ft){return ft.getUTCDay()}function it(ft,kt){return c(t.utcMonday.count(t.utcYear(ft)-1,ft),kt,2)}function We(ft,kt){return c(ft.getUTCFullYear()%100,kt,2)}function mt(ft,kt){return ft=$e(ft),c(ft.getUTCFullYear()%100,kt,2)}function bt(ft,kt){return c(ft.getUTCFullYear()%1e4,kt,4)}function Yt(ft,kt){var rr=ft.getUTCDay();return ft=rr>=4||rr===0?t.utcThursday(ft):t.utcThursday.ceil(ft),c(ft.getUTCFullYear()%1e4,kt,4)}function jt(){return"+0000"}function mr(){return"%"}function or(ft){return+ft}function fr(ft){return Math.floor(+ft/1e3)}var Ot;cr({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 cr(ft){return Ot=i(ft),e.timeFormat=Ot.format,e.timeParse=Ot.parse,e.utcFormat=Ot.utcFormat,e.utcParse=Ot.utcParse,Ot}var Ct="%Y-%m-%dT%H:%M:%S.%LZ";function wt(ft){return ft.toISOString()}var Tt=Date.prototype.toISOString?wt:e.utcFormat(Ct);function Mt(ft){var kt=new Date(ft);return isNaN(kt)?null:kt}var Lt=+new Date("2000-01-01T00:00:00.000Z")?Mt:e.utcParse(Ct);e.isoFormat=Tt,e.isoParse=Lt,e.timeFormatDefaultLocale=cr,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})})});var jI=fe((QS,Ite)=>{(function(e,t){typeof QS=="object"&&typeof Ite!="undefined"?t(QS):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(QS,(function(e){"use strict";function t(T){return Math.abs(T=Math.round(T))>=1e21?T.toLocaleString("en").replace(/,/g,""):T.toString(10)}function r(T,A){if((m=(T=A?T.toExponential(A-1):T.toExponential()).indexOf("e"))<0)return null;var m,F=T.slice(0,m);return[F.length>1?F[0]+F.slice(2):F,+T.slice(m+1)]}function n(T){return T=r(Math.abs(T)),T?T[1]:NaN}function a(T,A){return function(m,F){for(var E=m.length,I=[],R=0,B=T[0],O=0;E>0&&B>0&&(O+B+1>F&&(B=Math.max(1,F-O)),I.push(m.substring(E-=B,E+B)),!((O+=B+1)>F));)B=T[R=(R+1)%T.length];return I.reverse().join(A)}}function i(T){return function(A){return A.replace(/[0-9]/g,function(m){return T[+m]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(T){if(!(A=o.exec(T)))throw new Error("invalid format: "+T);var A;return new l({fill:A[1],align:A[2],sign:A[3],symbol:A[4],zero:A[5],width:A[6],comma:A[7],precision:A[8]&&A[8].slice(1),trim:A[9],type:A[10]})}s.prototype=l.prototype;function l(T){this.fill=T.fill===void 0?" ":T.fill+"",this.align=T.align===void 0?">":T.align+"",this.sign=T.sign===void 0?"-":T.sign+"",this.symbol=T.symbol===void 0?"":T.symbol+"",this.zero=!!T.zero,this.width=T.width===void 0?void 0:+T.width,this.comma=!!T.comma,this.precision=T.precision===void 0?void 0:+T.precision,this.trim=!!T.trim,this.type=T.type===void 0?"":T.type+""}l.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 u(T){e:for(var A=T.length,m=1,F=-1,E;m0&&(F=0);break}return F>0?T.slice(0,F)+T.slice(E+1):T}var c;function f(T,A){var m=r(T,A);if(!m)return T+"";var F=m[0],E=m[1],I=E-(c=Math.max(-8,Math.min(8,Math.floor(E/3)))*3)+1,R=F.length;return I===R?F:I>R?F+new Array(I-R+1).join("0"):I>0?F.slice(0,I)+"."+F.slice(I):"0."+new Array(1-I).join("0")+r(T,Math.max(0,A+I-1))[0]}function v(T,A){var m=r(T,A);if(!m)return T+"";var F=m[0],E=m[1];return E<0?"0."+new Array(-E).join("0")+F:F.length>E+1?F.slice(0,E+1)+"."+F.slice(E+1):F+new Array(E-F.length+2).join("0")}var g={"%":function(T,A){return(T*100).toFixed(A)},b:function(T){return Math.round(T).toString(2)},c:function(T){return T+""},d:t,e:function(T,A){return T.toExponential(A)},f:function(T,A){return T.toFixed(A)},g:function(T,A){return T.toPrecision(A)},o:function(T){return Math.round(T).toString(8)},p:function(T,A){return v(T*100,A)},r:v,s:f,X:function(T){return Math.round(T).toString(16).toUpperCase()},x:function(T){return Math.round(T).toString(16)}};function p(T){return T}var _=Array.prototype.map,x=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function y(T){var A=T.grouping===void 0||T.thousands===void 0?p:a(_.call(T.grouping,Number),T.thousands+""),m=T.currency===void 0?"":T.currency[0]+"",F=T.currency===void 0?"":T.currency[1]+"",E=T.decimal===void 0?".":T.decimal+"",I=T.numerals===void 0?p:i(_.call(T.numerals,String)),R=T.percent===void 0?"%":T.percent+"",B=T.minus===void 0?"-":T.minus+"",O=T.nan===void 0?"NaN":T.nan+"";function U(q){q=s(q);var V=q.fill,K=q.align,ee=q.sign,ce=q.symbol,me=q.zero,ye=q.width,ue=q.comma,J=q.precision,_e=q.trim,ne=q.type;ne==="n"?(ue=!0,ne="g"):g[ne]||(J===void 0&&(J=12),_e=!0,ne="g"),(me||V==="0"&&K==="=")&&(me=!0,V="0",K="=");var ae=ce==="$"?m:ce==="#"&&/[boxX]/.test(ne)?"0"+ne.toLowerCase():"",pe=ce==="$"?F:/[%p]/.test(ne)?R:"",ie=g[ne],le=/[defgprs%]/.test(ne);J=J===void 0?6:/[gprs]/.test(ne)?Math.max(1,Math.min(21,J)):Math.max(0,Math.min(20,J));function xe(be){var De=ae,Ge=pe,pt,tt,Oe;if(ne==="c")Ge=ie(be)+Ge,be="";else{be=+be;var ze=be<0||1/be<0;if(be=isNaN(be)?O:ie(Math.abs(be),J),_e&&(be=u(be)),ze&&+be==0&&ee!=="+"&&(ze=!1),De=(ze?ee==="("?ee:B:ee==="-"||ee==="("?"":ee)+De,Ge=(ne==="s"?x[8+c/3]:"")+Ge+(ze&&ee==="("?")":""),le){for(pt=-1,tt=be.length;++ptOe||Oe>57){Ge=(Oe===46?E+be.slice(pt+1):be.slice(pt))+Ge,be=be.slice(0,pt);break}}}ue&&!me&&(be=A(be,1/0));var ut=De.length+be.length+Ge.length,et=ut>1)+De+be+Ge+et.slice(ut);break;default:be=et+De+be+Ge;break}return I(be)}return xe.toString=function(){return q+""},xe}function j(q,V){var K=U((q=s(q),q.type="f",q)),ee=Math.max(-8,Math.min(8,Math.floor(n(V)/3)))*3,ce=Math.pow(10,-ee),me=x[8+ee/3];return function(ye){return K(ce*ye)+me}}return{format:U,formatPrefix:j}}var C;k({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function k(T){return C=y(T),e.format=C.format,e.formatPrefix=C.formatPrefix,C}function S(T){return Math.max(0,-n(Math.abs(T)))}function L(T,A){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(n(A)/3)))*3-n(Math.abs(T)))}function w(T,A){return T=Math.abs(T),A=Math.abs(A)-T,Math.max(0,n(A)-n(T))+1}e.FormatSpecifier=l,e.formatDefaultLocale=k,e.formatLocale=y,e.formatSpecifier=s,e.precisionFixed=S,e.precisionPrefix=L,e.precisionRound=w,Object.defineProperty(e,"__esModule",{value:!0})}))});var qte=fe((Wcr,zte)=>{"use strict";zte.exports=function(e){for(var t=e.length,r,n=0;n13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}});var aa=fe((Ycr,Bte)=>{"use strict";var Lat=qte();Bte.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&Lat(r))return!1}else if(t!=="number")return!1;return e-e<1}});var Wa=fe((Xcr,Ote)=>{"use strict";Ote.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"}});var WI=fe((eE,Nte)=>{(function(e,t){typeof eE=="object"&&typeof Nte!="undefined"?t(eE):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(eE,(function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n>2],c+=t[(s[l]&3)<<4|s[l+1]>>4],c+=t[(s[l+1]&15)<<2|s[l+2]>>6],c+=t[s[l+2]&63];return u%3===2?c=c.substring(0,c.length-1)+"=":u%3===1&&(c=c.substring(0,c.length-2)+"=="),c},i=function(o){var s=o.length*.75,l=o.length,u,c=0,f,v,g,p;o[o.length-1]==="="&&(s--,o[o.length-2]==="="&&s--);var _=new ArrayBuffer(s),x=new Uint8Array(_);for(u=0;u>4,x[c++]=(v&15)<<4|g>>2,x[c++]=(g&3)<<6|p&63;return _};e.decode=i,e.encode=a,Object.defineProperty(e,"__esModule",{value:!0})}))});var em=fe((Zcr,Ute)=>{"use strict";Ute.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}});var Gf=fe(Zv=>{"use strict";var Pat=WI().decode,Fat=em(),YI=Array.isArray,Dat=ArrayBuffer,Rat=DataView;function Vte(e){return Dat.isView(e)&&!(e instanceof Rat)}Zv.isTypedArray=Vte;function tE(e){return YI(e)||Vte(e)}Zv.isArrayOrTypedArray=tE;function Iat(e){return!tE(e[0])}Zv.isArray1D=Iat;Zv.ensureArray=function(e,t){return YI(e)||(e=[]),e.length=t,e};var vf={u1c:typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,i1:typeof Int8Array=="undefined"?void 0:Int8Array,u1:typeof Uint8Array=="undefined"?void 0:Uint8Array,i2:typeof Int16Array=="undefined"?void 0:Int16Array,u2:typeof Uint16Array=="undefined"?void 0:Uint16Array,i4:typeof Int32Array=="undefined"?void 0:Int32Array,u4:typeof Uint32Array=="undefined"?void 0:Uint32Array,f4:typeof Float32Array=="undefined"?void 0:Float32Array,f8:typeof Float64Array=="undefined"?void 0:Float64Array};vf.uint8c=vf.u1c;vf.uint8=vf.u1;vf.int8=vf.i1;vf.uint16=vf.u2;vf.int16=vf.i2;vf.uint32=vf.u4;vf.int32=vf.i4;vf.float32=vf.f4;vf.float64=vf.f8;function XI(e){return e.constructor===ArrayBuffer}Zv.isArrayBuffer=XI;Zv.decodeTypedArraySpec=function(e){var t=[],r=zat(e),n=r.dtype,a=vf[n];if(!a)throw new Error('Error in dtype: "'+n+'"');var i=a.BYTES_PER_ELEMENT,o=r.bdata;XI(o)||(o=Pat(o));var s=r.shape===void 0?[o.byteLength/i]:(""+r.shape).split(",");s.reverse();var l=s.length,u,c,f=+s[0],v=i*f,g=0;if(l===1)t=new a(o);else if(l===2)for(u=+s[1],c=0;c{"use strict";var Hte=aa(),$I=Gf().isArrayOrTypedArray;Xte.exports=function(t,r){if(Hte(r))r=String(r);else if(typeof r!="string"||r.slice(-4)==="[-1]")throw"bad property string";var n=r.split("."),a,i,o,s;for(s=0;s{"use strict";var ub=S4(),Uat=/^\w*$/,Vat=0,Zte=1,rE=2,$te=3,u2=4;Kte.exports=function(t,r,n,a){n=n||"name",a=a||"value";var i,o,s,l={};r&&r.length?(s=ub(t,r),o=s.get()):o=t,r=r||"";var u={};if(o)for(i=0;i2)return l[g]=l[g]|rE,f.set(v,null);if(c){for(i=g;i{"use strict";var Gat=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Hat=/^[^\.\[\]]+$/;Qte.exports=function(e,t){for(;t;){var r=e.match(Gat);if(r)e=r[1];else if(e.match(Hat))e="";else throw new Error("bad relativeAttr call:"+[e,t]);if(t.charAt(0)==="^")t=t.slice(1);else break}return e&&t.charAt(0)!=="["?e+"."+t:e+t}});var nE=fe((efr,tre)=>{"use strict";var jat=aa();tre.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var n=Math.log(Math.min(r[0],r[1]))/Math.LN10;return jat(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var ire=fe((tfr,nre)=>{"use strict";var rre=Gf().isArrayOrTypedArray,E4=em();nre.exports=function e(t,r){for(var n in r){var a=r[n],i=t[n];if(i!==a)if(n.charAt(0)==="_"||typeof a=="function"){if(n in t)continue;t[n]=a}else if(rre(a)&&rre(i)&&E4(a[0])){if(n==="customdata"||n==="ids")continue;for(var o=Math.min(a.length,i.length),s=0;sWat,modHalf:()=>Yat});function Wat(e,t){let r=e%t;return r<0?r+t:r}function Yat(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}var fb=Lo(()=>{"use strict"});var ta=fe(L4=>{"use strict";var are=em(),k4=Array.isArray;function Xat(e,t){var r,n;for(r=0;r{"use strict";ore.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;n===void 0&&(n=r);var a={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(a.valType="enumerated",a.values=a.extras,a.extras=void 0,a.min=void 0,a.max=void 0);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:a,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(i.size.dflt="auto"),e.autoColor&&(i.color.dflt="auto"),e.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,e.noFontVariant||(i.variant.arrayOk=!0),e.noFontTextcase||(i.textcase.arrayOk=!0),e.noFontLineposition||(i.lineposition.arrayOk=!0),e.noFontShadow||(i.shadow.arrayOk=!0),i.size.arrayOk=!0,i.color.arrayOk=!0),i}});var P4=fe((ifr,sre)=>{"use strict";sre.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var tm=fe((afr,cre)=>{"use strict";var lre=P4(),ure=Ds(),KI=ure({editType:"none"});KI.family.dflt=lre.HOVERFONT;KI.size.dflt=lre.HOVERFONTSIZE;cre.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversort:{valType:"enumerated",values:["trace","value descending","value ascending"],dflt:"trace",editType:"none"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoveranywhere:{valType:"boolean",dflt:!1,editType:"none"},clickanywhere:{valType:"boolean",dflt:!1,editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:KI,grouptitlefont:ure({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var hb=fe((ofr,fre)=>{"use strict";var Zat=Ds(),F4=tm().hoverlabel,D4=ta().extendFlat;fre.exports={hoverlabel:{bgcolor:D4({},F4.bgcolor,{arrayOk:!0}),bordercolor:D4({},F4.bordercolor,{arrayOk:!0}),font:Zat({arrayOk:!0,editType:"none"}),align:D4({},F4.align,{arrayOk:!0}),namelength:D4({},F4.namelength,{arrayOk:!0}),showarrow:D4({},F4.showarrow),editType:"none"}}});var Ho=fe((sfr,hre)=>{"use strict";var $at=Ds(),Kat=hb();hre.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:$at({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:Kat.hoverlabel,uirevision:{valType:"any",editType:"none"}}});var iie=fe((vfr,nie)=>{var Gz=Object.defineProperty,Jat=Object.getOwnPropertyDescriptor,Qat=Object.getOwnPropertyNames,eot=Object.prototype.hasOwnProperty,tot=(e,t)=>{for(var r in t)Gz(e,r,{get:t[r],enumerable:!0})},rot=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Qat(t))!eot.call(e,a)&&a!==r&&Gz(e,a,{get:()=>t[a],enumerable:!(n=Jat(t,a))||n.enumerable});return e},not=e=>rot(Gz({},"__esModule",{value:!0}),e),wre={};tot(wre,{a98:()=>Xut,average:()=>Qot,averageAngle:()=>Op,averageNumber:()=>Ore,blend:()=>Jlt,blerp:()=>Tz,clampChroma:()=>yut,clampGamut:()=>gq,clampRgb:()=>mut,colorsNamed:()=>Are,convertA98ToXyz65:()=>Az,convertCubehelixToRgb:()=>qre,convertDlchToLab65:()=>hE,convertHsiToRgb:()=>Yre,convertHslToRgb:()=>$re,convertHsvToRgb:()=>Zz,convertHwbToRgb:()=>ene,convertItpToXyz65:()=>Sz,convertJabToJch:()=>kz,convertJabToRgb:()=>tq,convertJabToXyz65:()=>Qz,convertJchToJab:()=>Cz,convertLab65ToDlch:()=>dE,convertLab65ToRgb:()=>U4,convertLab65ToXyz65:()=>Wz,convertLabToLch:()=>H1,convertLabToRgb:()=>nq,convertLabToXyz50:()=>TE,convertLchToLab:()=>j1,convertLchuvToLuv:()=>oq,convertLrgbToOklab:()=>sq,convertLrgbToRgb:()=>g2,convertLuvToLchuv:()=>aq,convertLuvToXyz50:()=>pE,convertOkhslToOklab:()=>Fz,convertOkhsvToOklab:()=>Rz,convertOklabToLrgb:()=>_b,convertOklabToOkhsl:()=>Pz,convertOklabToOkhsv:()=>Dz,convertOklabToRgb:()=>H4,convertP3ToXyz65:()=>Iz,convertProphotoToXyz50:()=>Bz,convertRec2020ToXyz65:()=>Nz,convertRgbToCubehelix:()=>zre,convertRgbToHsi:()=>Xre,convertRgbToHsl:()=>Kre,convertRgbToHsv:()=>$z,convertRgbToHwb:()=>tne,convertRgbToJab:()=>eq,convertRgbToLab:()=>iq,convertRgbToLab65:()=>V4,convertRgbToLrgb:()=>p2,convertRgbToOklab:()=>G4,convertRgbToXyb:()=>Cne,convertRgbToXyz50:()=>xb,convertRgbToXyz65:()=>rm,convertRgbToYiq:()=>zne,convertXybToRgb:()=>Lne,convertXyz50ToLab:()=>AE,convertXyz50ToLuv:()=>vE,convertXyz50ToProphoto:()=>qz,convertXyz50ToRgb:()=>yb,convertXyz50ToXyz65:()=>Rne,convertXyz65ToA98:()=>Mz,convertXyz65ToItp:()=>Ez,convertXyz65ToJab:()=>Jz,convertXyz65ToLab65:()=>Yz,convertXyz65ToP3:()=>zz,convertXyz65ToRec2020:()=>Oz,convertXyz65ToRgb:()=>nm,convertXyz65ToXyz50:()=>Dne,convertYiqToRgb:()=>qne,converter:()=>dl,cubehelix:()=>Zut,differenceCie76:()=>Wot,differenceCie94:()=>Yot,differenceCiede2000:()=>Xot,differenceCmc:()=>Zot,differenceEuclidean:()=>mb,differenceHueChroma:()=>N4,differenceHueNaive:()=>Bre,differenceHueSaturation:()=>O4,differenceHyab:()=>$ot,differenceItp:()=>Jot,differenceKotsarenkoRamos:()=>Kot,displayable:()=>pq,dlab:()=>$ut,dlch:()=>Kut,easingGamma:()=>Jne,easingInOutSine:()=>Wut,easingMidpoint:()=>jne,easingSmootherstep:()=>Hut,easingSmoothstep:()=>Uut,easingSmoothstepInverse:()=>Vut,filterBrightness:()=>Eut,filterContrast:()=>kut,filterDeficiencyDeuter:()=>Out,filterDeficiencyProt:()=>But,filterDeficiencyTrit:()=>Nut,filterGrayscale:()=>Put,filterHueRotate:()=>Dut,filterInvert:()=>Fut,filterSaturate:()=>Lut,filterSepia:()=>Cut,fixupAlpha:()=>Nc,fixupHueDecreasing:()=>Uot,fixupHueIncreasing:()=>Not,fixupHueLonger:()=>Oot,fixupHueShorter:()=>Bp,formatCss:()=>jlt,formatHex:()=>Wlt,formatHex8:()=>Ylt,formatHsl:()=>Zlt,formatRgb:()=>Xlt,getMode:()=>Kh,hsi:()=>Jut,hsl:()=>Qut,hsv:()=>ect,hwb:()=>tct,inGamut:()=>EE,interpolate:()=>sut,interpolateWith:()=>Yne,interpolateWithPremultipliedAlpha:()=>lut,interpolatorLinear:()=>Ui,interpolatorPiecewise:()=>Rre,interpolatorSplineBasis:()=>Zne,interpolatorSplineBasisClosed:()=>$ne,interpolatorSplineMonotone:()=>fut,interpolatorSplineMonotone2:()=>hut,interpolatorSplineMonotoneClosed:()=>dut,interpolatorSplineNatural:()=>uut,interpolatorSplineNaturalClosed:()=>cut,itp:()=>rct,jab:()=>nct,jch:()=>ict,lab:()=>act,lab65:()=>oct,lch:()=>sct,lch65:()=>lct,lchuv:()=>uct,lerp:()=>f2,lrgb:()=>cct,luv:()=>fct,mapAlphaDivide:()=>Hne,mapAlphaMultiply:()=>Gne,mapTransferGamma:()=>nut,mapTransferLinear:()=>hq,mapper:()=>j4,modeA98:()=>Ire,modeCubehelix:()=>Nre,modeDlab:()=>jre,modeDlch:()=>Wre,modeHsi:()=>Zre,modeHsl:()=>Xz,modeHsv:()=>Kz,modeHwb:()=>nne,modeItp:()=>one,modeJab:()=>sne,modeJch:()=>lne,modeLab:()=>ME,modeLab65:()=>cne,modeLch:()=>SE,modeLch65:()=>hne,modeLchuv:()=>pne,modeLrgb:()=>gne,modeLuv:()=>mne,modeOkhsl:()=>xne,modeOkhsv:()=>_ne,modeOklab:()=>wne,modeOklch:()=>Ane,modeP3:()=>Mne,modeProphoto:()=>Sne,modeRec2020:()=>Ene,modeRgb:()=>v2,modeXyb:()=>Pne,modeXyz50:()=>Fne,modeXyz65:()=>Ine,modeYiq:()=>Bne,nearest:()=>but,okhsl:()=>hct,okhsv:()=>dct,oklab:()=>vct,oklch:()=>pct,p3:()=>gct,parse:()=>Pre,parseHex:()=>Sre,parseHsl:()=>Qre,parseHslLegacy:()=>Jre,parseHwb:()=>rne,parseLab:()=>une,parseLch:()=>fne,parseNamed:()=>Mre,parseOklab:()=>bne,parseOklch:()=>Tne,parseRgb:()=>Fre,parseRgbLegacy:()=>Ere,parseTransparent:()=>Dre,prophoto:()=>mct,random:()=>rut,rec2020:()=>yct,removeParser:()=>mot,rgb:()=>xct,round:()=>One,samples:()=>gut,serializeHex:()=>fq,serializeHex8:()=>Nne,serializeHsl:()=>Vne,serializeRgb:()=>Une,toGamut:()=>xut,trilerp:()=>kot,unlerp:()=>Eot,useMode:()=>Rs,useParser:()=>Cre,wcagContrast:()=>Yut,wcagLuminance:()=>Vz,xyb:()=>_ct,xyz50:()=>bct,xyz65:()=>wct,yiq:()=>Tct});nie.exports=not(wre);var iot=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},Tre=iot,aot={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},Are=aot,oot=e=>Tre(Are[e.toLowerCase()],6),Mre=oot,sot=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,lot=e=>{let t;return(t=e.match(sot))?Tre(parseInt(t[1],16),t[1].length):void 0},Sre=lot,$d="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",lfr=`(?:${$d}|none)`,z4=`${$d}%`,ufr=`(?:${$d}%|none)`,Hz=`(?:${$d}%|${$d})`,uot=`(?:${$d}%|${$d}|none)`,cot=`(?:${$d}(deg|grad|rad|turn)|${$d})`,cfr=`(?:${$d}(deg|grad|rad|turn)|${$d}|none)`,pb="\\s*,\\s*",ffr=new RegExp("^"+uot+"$"),fot=new RegExp(`^rgba?\\(\\s*${$d}${pb}${$d}${pb}${$d}\\s*(?:,\\s*${Hz}\\s*)?\\)$`),hot=new RegExp(`^rgba?\\(\\s*${z4}${pb}${z4}${pb}${z4}\\s*(?:,\\s*${Hz}\\s*)?\\)$`),dot=e=>{let t={mode:"rgb"},r;if(r=e.match(fot))r[1]!==void 0&&(t.r=r[1]/255),r[2]!==void 0&&(t.g=r[2]/255),r[3]!==void 0&&(t.b=r[3]/255);else if(r=e.match(hot))r[1]!==void 0&&(t.r=r[1]/100),r[2]!==void 0&&(t.g=r[2]/100),r[3]!==void 0&&(t.b=r[3]/100);else return;return r[4]!==void 0?t.alpha=Math.max(0,Math.min(1,r[4]/100)):r[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},Ere=dot,vot=(e,t)=>e===void 0?void 0:typeof e!="object"?Pre(e):e.mode!==void 0?e:t?tl(zo({},e),{mode:t}):void 0,$v=vot,pot=(e="rgb")=>t=>(t=$v(t,e))!==void 0?t.mode===e?t:qp[t.mode][e]?qp[t.mode][e](t):e==="rgb"?qp[t.mode].rgb(t):qp.rgb[e](qp[t.mode].rgb(t)):void 0,dl=pot,qp={},kre={},gb=[],jz={},got=e=>e,Rs=e=>(qp[e.mode]=zo(zo({},qp[e.mode]),e.toMode),Object.keys(e.fromMode||{}).forEach(t=>{qp[t]||(qp[t]={}),qp[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=got)}),kre[e.mode]=e,(e.parse||[]).forEach(t=>{Cre(t,e.mode)}),dl(e.mode)),Kh=e=>kre[e],Cre=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");jz[e]=t}else typeof e=="function"&&gb.indexOf(e)<0&&gb.push(e)},mot=e=>{if(typeof e=="string")delete jz[e];else if(typeof e=="function"){let t=gb.indexOf(e);t>0&&gb.splice(t,1)}},bz=/[^\x00-\x7F]|[a-zA-Z_]/,yot=/[^\x00-\x7F]|[-\w]/,Ti={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},eo=0;function iE(e){let t=e[eo],r=e[eo+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[eo+2]):t==="."?/\d/.test(r):/\d/.test(t)}function wz(e){if(eo>=e.length)return!1;let t=e[eo];if(bz.test(t))return!0;if(t==="-"){if(e.length-eo<2)return!1;let r=e[eo+1];return!!(r==="-"||bz.test(r))}return!1}var xot={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function R4(e){let t="";if((e[eo]==="-"||e[eo]==="+")&&(t+=e[eo++]),t+=aE(e),e[eo]==="."&&/\d/.test(e[eo+1])&&(t+=e[eo++]+aE(e)),(e[eo]==="e"||e[eo]==="E")&&((e[eo+1]==="-"||e[eo+1]==="+")&&/\d/.test(e[eo+2])?t+=e[eo++]+e[eo++]+aE(e):/\d/.test(e[eo+1])&&(t+=e[eo++]+aE(e))),wz(e)){let r=lE(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:Ti.Hue,value:t*xot[r]}:void 0}return e[eo]==="%"?(eo++,{type:Ti.Percentage,value:+t}):{type:Ti.Number,value:+t}}function aE(e){let t="";for(;/\d/.test(e[eo]);)t+=e[eo++];return t}function lE(e){let t="";for(;eo4)){if(r.length===4){if(r[3].type!==Ti.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:Ti.None,value:void 0}),r.every(a=>a.type!==Ti.Alpha)?r:void 0}}function wot(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==Ti.Function)return;let n=Lre(e,t);if(n)return n.unshift(r.value),n}var Tot=e=>{if(typeof e!="string")return;let t=_ot(e),r=t?wot(t,!0):void 0,n,a=0,i=gb.length;for(;ae==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Dre=Mot,fx=(e,t,r)=>e+r*(t-e),Sot=(e,t,r)=>(r-e)/(t-e),Tz=(e,t,r,n,a,i)=>fx(fx(e,t,a),fx(r,n,a),i),Eot=(e,t,r,n,a,i,o,s,l,u,c)=>fx(Tz(e,t,r,n,l,u),Tz(a,i,o,s,l,u),c),kot=e=>{let t=[];for(let r=0;rt=>{let r=kot(t);return n=>{let a=n*r.length,i=n>=1?r.length-1:Math.max(Math.floor(a),0),o=r[i];return o===void 0?void 0:e(o[0],o[1],a-i)}},Ui=Rre(fx),Nc=e=>{let t=!1,r=e.map(n=>n!==void 0?(t=!0,n):1);return t?r:e},Cot={mode:"rgb",channels:["r","g","b","alpha"],parse:[Fre,Sre,Ere,Mre,Dre,"srgb"],serialize:"srgb",interpolate:{r:Ui,g:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},vx=Cot,JI=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),Lot=e=>{let t=JI(e.r),r=JI(e.g),n=JI(e.b),a={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*n};return e.alpha!==void 0&&(a.alpha=e.alpha),a},Az=Lot,QI=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Pot=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"a98",r:QI(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:QI(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:QI(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return n!==void 0&&(a.alpha=n),a},Mz=Pot,ez=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},Fot=({r:e,g:t,b:r,alpha:n})=>{let a={mode:"lrgb",r:ez(e),g:ez(t),b:ez(r)};return n!==void 0&&(a.alpha=n),a},px=Fot,Dot=e=>{let{r:t,g:r,b:n,alpha:a}=px(e),i={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*n};return a!==void 0&&(i.alpha=a),i},rm=Dot,tz=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},Rot=({r:e,g:t,b:r,alpha:n},a="rgb")=>{let i={mode:a,r:tz(e),g:tz(t),b:tz(r)};return n!==void 0&&(i.alpha=n),i},gx=Rot,Iot=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=gx({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return n!==void 0&&(a.alpha=n),a},nm=Iot,zot=tl(zo({},vx),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Mz(rm(e)),xyz65:Mz},toMode:{rgb:e=>nm(Az(e)),xyz65:Az}}),Ire=zot,qot=e=>(e=e%360)<0?e+360:e,Th=qot,gE=(e,t)=>e.map((r,n,a)=>{if(r===void 0)return r;let i=Th(r);return n===0||e[n-1]===void 0?i:t(i-Th(a[n-1]))}).reduce((r,n)=>!r.length||n===void 0||r[r.length-1]===void 0?(r.push(n),r):(r.push(n+r[r.length-1]),r),[]),Bp=e=>gE(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),Bot=e=>gE(e,t=>Math.abs(t)>=180||t===0?t:t-360*Math.sign(t)),Oot=e=>gE(e,t=>t>=0?t:t+360),Not=e=>gE(e,t=>t<=0?t:t-360),Hf=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Uot=Math.PI/180,Vot=180/Math.PI,dre=Hf[3]*Hf[4],vre=Hf[1]*Hf[4],pre=Hf[1]*Hf[2]-Hf[0]*Hf[3],Got=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=(pre*r+e*dre-t*vre)/(pre+dre-vre),i=r-a,o=(Hf[4]*(t-a)-Hf[2]*i)/Hf[3],s={mode:"cubehelix",l:a,s:a===0||a===1?void 0:Math.sqrt(i*i+o*o)/(Hf[4]*a*(1-a))};return s.s&&(s.h=Math.atan2(o,i)*Vot-120),n!==void 0&&(s.alpha=n),s},zre=Got,Hot=({h:e,s:t,l:r,alpha:n})=>{let a={mode:"rgb"};e=(e===void 0?0:e+120)*Uot,r===void 0&&(r=0);let i=t===void 0?0:t*r*(1-r),o=Math.cos(e),s=Math.sin(e);return a.r=r+i*(Hf[0]*o+Hf[1]*s),a.g=r+i*(Hf[2]*o+Hf[3]*s),a.b=r+i*(Hf[4]*o+Hf[5]*s),n!==void 0&&(a.alpha=n),a},qre=Hot,B4=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=Th(e.h),n=Th(t.h),a=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*a},Bre=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=Th(e.h),n=Th(t.h);return Math.abs(n-r)>180?r-(n-360*Math.sign(n-r)):n-r},O4=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=Th(e.h),n=Th(t.h),a=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*a},mb=(e="rgb",t=[1,1,1,0])=>{let r=Kh(e),n=r.channels,a=r.difference,i=dl(e);return(o,s)=>{let l=i(o),u=i(s);return Math.sqrt(n.reduce((c,f,v)=>{let g=a[f]?a[f](l,u):l[f]-u[f];return c+(t[v]||0)*Math.pow(isNaN(g)?0:g,2)},0))}},jot=()=>mb("lab65"),Wot=(e=1,t=.045,r=.015)=>{let n=dl("lab65");return(a,i)=>{let o=n(a),s=n(i),l=o.l,u=o.a,c=o.b,f=Math.sqrt(u*u+c*c),v=s.l,g=s.a,p=s.b,x=Math.sqrt(g*g+p*p),_=Math.pow(l-v,2),y=Math.pow(f-x,2),C=Math.pow(u-g,2)+Math.pow(c-p,2)-y;return Math.sqrt(_/Math.pow(e,2)+y/Math.pow(1+t*f,2)+C/Math.pow(1+r*f,2))}},Yot=(e=1,t=1,r=1)=>{let n=dl("lab65");return(a,i)=>{let o=n(a),s=n(i),l=o.l,u=o.a,c=o.b,f=Math.sqrt(u*u+c*c),v=s.l,g=s.a,p=s.b,x=Math.sqrt(g*g+p*p),_=(f+x)/2,y=.5*(1-Math.sqrt(Math.pow(_,7)/(Math.pow(_,7)+Math.pow(25,7)))),C=u*(1+y),k=g*(1+y),S=Math.sqrt(C*C+c*c),L=Math.sqrt(k*k+p*p),w=Math.abs(C)+Math.abs(c)===0?0:Math.atan2(c,C);w+=(w<0)*2*Math.PI;let A=Math.abs(k)+Math.abs(p)===0?0:Math.atan2(p,k);A+=(A<0)*2*Math.PI;let T=v-l,m=L-S,F=S*L===0?0:A-w;F-=(F>Math.PI)*2*Math.PI,F+=(F<-Math.PI)*2*Math.PI;let E=2*Math.sqrt(S*L)*Math.sin(F/2),I=(l+v)/2,R=(S+L)/2,B;S*L===0?B=w+A:(B=(w+A)/2,B-=(Math.abs(w-A)>Math.PI)*Math.PI,B+=(B<0)*2*Math.PI);let O=Math.pow(I-50,2),V=1-.17*Math.cos(B-Math.PI/6)+.24*Math.cos(2*B)+.32*Math.cos(3*B+Math.PI/30)-.2*Math.cos(4*B-63*Math.PI/180),j=1+.015*O/Math.sqrt(20+O),q=1+.045*R,U=1+.015*R*V,J=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*B-275)/25,2)),ee=2*Math.sqrt(Math.pow(R,7)/(Math.pow(R,7)+Math.pow(25,7))),ce=-1*Math.sin(2*J)*ee;return Math.sqrt(Math.pow(T/(e*j),2)+Math.pow(m/(t*q),2)+Math.pow(E/(r*U),2)+ce*m/(t*q)*E/(r*U))}},Xot=(e=1,t=1)=>{let r=dl("lab65");return(n,a)=>{let i=r(n),o=i.l,s=i.a,l=i.b,u=Math.sqrt(s*s+l*l),c=Math.atan2(l,s);c=c+2*Math.PI*(c<0);let f=r(a),v=f.l,g=f.a,p=f.b,x=Math.sqrt(g*g+p*p),_=Math.pow(o-v,2),y=Math.pow(u-x,2),C=Math.pow(s-g,2)+Math.pow(l-p,2)-y,k=Math.sqrt(Math.pow(u,4)/(Math.pow(u,4)+1900)),S=c>=164/180*Math.PI&&c<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(c+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(c+35/180*Math.PI)),L=o<16?.511:.040975*o/(1+.01765*o),w=.0638*u/(1+.0131*u)+.638,A=w*(k*S+1-k);return Math.sqrt(_/Math.pow(e*L,2)+y/Math.pow(t*w,2)+C/Math.pow(A,2))}},Zot=()=>{let e=dl("lab65");return(t,r)=>{let n=e(t),a=e(r),i=n.l-a.l,o=n.a-a.a,s=n.b-a.b;return Math.abs(i)+Math.sqrt(o*o+s*s)}},$ot=()=>mb("yiq",[.5053,.299,.1957]),Kot=()=>mb("itp",[518400,129600,518400]),Op=e=>{let t=e.reduce((n,a)=>{if(a!==void 0){let i=a*Math.PI/180;n.sin+=Math.sin(i),n.cos+=Math.cos(i)}return n},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r},Ore=e=>{let t=e.filter(r=>r!==void 0);return t.length?t.reduce((r,n)=>r+n,0)/t.length:void 0},rz=e=>typeof e=="function";function Jot(e,t="rgb",r){let n=Kh(t),a=e.map(dl(t));return n.channels.reduce((i,o)=>{let s=a.map(l=>l[o]).filter(l=>l!==void 0);if(s.length){let l;rz(r)?l=r:r&&rz(r[o])?l=r[o]:n.average&&rz(n.average[o])?l=n.average[o]:l=Ore,i[o]=l(s,o)}return i},{mode:t})}var Qot={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:zre},toMode:{rgb:qre},interpolate:{h:{use:Ui,fixup:Bp},s:Ui,l:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:B4},average:{h:Op}},Nre=Qot,est=({l:e,a:t,b:r,alpha:n},a="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let i=Math.sqrt(t*t+r*r),o={mode:a,l:e,c:i};return i&&(o.h=Th(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(o.alpha=n),o},H1=est,tst=({l:e,c:t,h:r,alpha:n},a="lab")=>{r===void 0&&(r=0);let i={mode:a,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(i.alpha=n),i},j1=tst,Ure=Math.pow(29,3)/Math.pow(3,3),Vre=Math.pow(6,3)/Math.pow(29,3),Oc={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},vb={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},cfr=Math.pow(29,3)/Math.pow(3,3),ffr=Math.pow(6,3)/Math.pow(29,3),nz=e=>Math.pow(e,3)>Vre?Math.pow(e,3):(116*e-16)/Ure,rst=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=(e+16)/116,i=t/500+a,o=a-r/200,s={mode:"xyz65",x:nz(i)*vb.X,y:nz(a)*vb.Y,z:nz(o)*vb.Z};return n!==void 0&&(s.alpha=n),s},Wz=rst,nst=e=>nm(Wz(e)),N4=nst,iz=e=>e>Vre?Math.cbrt(e):(Ure*e+16)/116,ist=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=iz(e/vb.X),i=iz(t/vb.Y),o=iz(r/vb.Z),s={mode:"lab65",l:116*i-16,a:500*(a-i),b:200*(i-o)};return n!==void 0&&(s.alpha=n),s},Yz=ist,ast=e=>{let t=Yz(rm(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},U4=ast,lE=1,Gre=1,q4=26/180*Math.PI,uE=Math.cos(q4),cE=Math.sin(q4),Hre=100/Math.log(139/100),ost=({l:e,c:t,h:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"lab65",l:(Math.exp(e*lE/Hre)-1)/.0039},i=(Math.exp(.0435*t*Gre*lE)-1)/.075,o=i*Math.cos(r/180*Math.PI-q4),s=i*Math.sin(r/180*Math.PI-q4);return a.a=o*uE-s/.83*cE,a.b=o*cE+s/.83*uE,n!==void 0&&(a.alpha=n),a},fE=ost,sst=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=t*uE+r*cE,i=.83*(r*uE-t*cE),o=Math.sqrt(a*a+i*i),s={mode:"dlch",l:Hre/lE*Math.log(1+.0039*e),c:Math.log(1+.075*o)/(.0435*Gre*lE)};return s.c&&(s.h=Th((Math.atan2(i,a)+q4)/Math.PI*180)),n!==void 0&&(s.alpha=n),s},hE=sst,gre=e=>fE(H1(e,"dlch")),mre=e=>j1(hE(e),"dlab"),lst={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:gre,rgb:e=>N4(gre(e))},fromMode:{lab65:mre,rgb:e=>mre(U4(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Ui,a:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}}},jre=lst,ust={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:fE,dlab:e=>j1(e,"dlab"),rgb:e=>N4(fE(e))},fromMode:{lab65:hE,dlab:e=>H1(e,"dlch"),rgb:e=>hE(U4(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Ui,c:Ui,h:{use:Ui,fixup:Bp},alpha:{use:Ui,fixup:Nc}},difference:{h:O4},average:{h:Op}},Wre=ust;function Yre({h:e,s:t,i:r,alpha:n}){e=Th(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:r*(1+t*(3/(2-a)-1)),g:r*(1+t*(3*(1-a)/(2-a)-1)),b:r*(1-t)};break;case 1:i={r:r*(1+t*(3*(1-a)/(2-a)-1)),g:r*(1+t*(3/(2-a)-1)),b:r*(1-t)};break;case 2:i={r:r*(1-t),g:r*(1+t*(3/(2-a)-1)),b:r*(1+t*(3*(1-a)/(2-a)-1))};break;case 3:i={r:r*(1-t),g:r*(1+t*(3*(1-a)/(2-a)-1)),b:r*(1+t*(3/(2-a)-1))};break;case 4:i={r:r*(1+t*(3*(1-a)/(2-a)-1)),g:r*(1-t),b:r*(1+t*(3/(2-a)-1))};break;case 5:i={r:r*(1+t*(3/(2-a)-1)),g:r*(1-t),b:r*(1+t*(3*(1-a)/(2-a)-1))};break;default:i={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return i.mode="rgb",n!==void 0&&(i.alpha=n),i}function Xre({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.max(e,t,r),i=Math.min(e,t,r),o={mode:"hsi",s:e+t+r===0?0:1-3*i/(e+t+r),i:(e+t+r)/3};return a-i!==0&&(o.h=(a===e?(t-r)/(a-i)+(t{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},hst=fst,dst=new RegExp(`^hsla?\\(\\s*${uot}${pb}${I4}${pb}${I4}\\s*(?:,\\s*${Hz}\\s*)?\\)$`),vst=e=>{let t=e.match(dst);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=hst(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},Jre=vst;function pst(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,n,a,i,o]=t;if(n.type!==Ti.None){if(n.type===Ti.Percentage)return;r.h=n.value}if(a.type!==Ti.None){if(a.type===Ti.Hue)return;r.s=a.value/100}if(i.type!==Ti.None){if(i.type===Ti.Hue)return;r.l=i.value/100}return o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var Qre=pst,gst={mode:"hsl",toMode:{rgb:$re},fromMode:{rgb:Kre},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Qre,Jre],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Ui,fixup:Bp},s:Ui,l:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:B4},average:{h:Op}},Xz=gst;function Zz({h:e,s:t,v:r,alpha:n}){e=Th(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r,g:r*(1-t*a),b:r*(1-t)};break;case 1:i={r:r*(1-t*a),g:r,b:r*(1-t)};break;case 2:i={r:r*(1-t),g:r,b:r*(1-t*a)};break;case 3:i={r:r*(1-t),g:r*(1-t*a),b:r};break;case 4:i={r:r*(1-t*a),g:r*(1-t),b:r};break;case 5:i={r,g:r*(1-t),b:r*(1-t*a)};break;default:i={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return i.mode="rgb",n!==void 0&&(i.alpha=n),i}function $z({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.max(e,t,r),i=Math.min(e,t,r),o={mode:"hsv",s:a===0?0:1-i/a,v:a};return a-i!==0&&(o.h=(a===e?(t-r)/(a-i)+(t1){let a=t+r;t/=a,r/=a}return Zz({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:n})}function tne(e){let t=$z(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,n=t.v!==void 0?t.v:0,a={mode:"hwb",w:(1-r)*n,b:1-n};return t.h!==void 0&&(a.h=t.h),t.alpha!==void 0&&(a.alpha=t.alpha),a}function yst(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,n,a,i,o]=t;if(n.type!==Ti.None){if(n.type===Ti.Percentage)return;r.h=n.value}if(a.type!==Ti.None){if(a.type===Ti.Hue)return;r.w=a.value/100}if(i.type!==Ti.None){if(i.type===Ti.Hue)return;r.b=i.value/100}return o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var rne=yst,xst={mode:"hwb",toMode:{rgb:ene},fromMode:{rgb:tne},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[rne],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Ui,fixup:Bp},w:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:Bre},average:{h:Op}},nne=xst,ine=203,mE=.1593017578125,ane=78.84375,yE=.8359375,xE=18.8515625,_E=18.6875;function az(e){if(e<0)return 0;let t=Math.pow(e,1/ane);return 1e4*Math.pow(Math.max(0,t-yE)/(xE-_E*t),1/mE)}function oz(e){if(e<0)return 0;let t=Math.pow(e/1e4,mE);return Math.pow((yE+xE*t)/(1+_E*t),ane)}var sz=e=>Math.max(e/ine,0),_st=({i:e,t,p:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=az(e+.008609037037932761*t+.11102962500302593*r),i=az(e-.00860903703793275*t-.11102962500302599*r),o=az(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:sz(2.070152218389422*a-1.3263473389671556*i+.2066510476294051*o),y:sz(.3647385209748074*a+.680566024947227*i-.0453045459220346*o),z:sz(-.049747207535812*a-.0492609666966138*i+1.1880659249923042*o)};return n!==void 0&&(s.alpha=n),s},Sz=_st,lz=(e=0)=>Math.max(e*ine,0),bst=({x:e,y:t,z:r,alpha:n})=>{let a=lz(e),i=lz(t),o=lz(r),s=oz(.3592832590121217*a+.6976051147779502*i-.0358915932320289*o),l=oz(-.1920808463704995*a+1.1004767970374323*i+.0753748658519118*o),u=oz(.0070797844607477*a+.0748396662186366*i+.8433265453898765*o),c=.5*s+.5*l,f=1.61376953125*s-3.323486328125*l+1.709716796875*u,v=4.378173828125*s-4.24560546875*l-.132568359375*u,g={mode:"itp",i:c,t:f,p:v};return n!==void 0&&(g.alpha=n),g},Ez=bst,wst={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Sz,rgb:e=>nm(Sz(e))},fromMode:{xyz65:Ez,rgb:e=>Ez(rm(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Ui,t:Ui,p:Ui,alpha:{use:Ui,fixup:Nc}}},one=wst,Tst=134.03437499999998,Ast=16295499532821565e-27,uz=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,mE);return Math.pow((yE+xE*t)/(1+_E*t),Tst)},cz=(e=0)=>Math.max(e*203,0),Mst=({x:e,y:t,z:r,alpha:n})=>{e=cz(e),t=cz(t),r=cz(r);let a=1.15*e-.15*r,i=.66*t+.34*e,o=uz(.41478972*a+.579999*i+.014648*r),s=uz(-.20151*a+1.120649*i+.0531008*r),l=uz(-.0166008*a+.2648*i+.6684799*r),u=(o+s)/2,c={mode:"jab",j:.44*u/(1-.56*u)-Ast,a:3.524*o-4.066708*s+.542708*l,b:.199076*o+1.096799*s-1.295875*l};return n!==void 0&&(c.alpha=n),c},Jz=Mst,Sst=134.03437499999998,yre=16295499532821565e-27,fz=e=>{if(e<0)return 0;let t=Math.pow(e,1/Sst);return 1e4*Math.pow((yE-t)/(_E*t-xE),1/mE)},hz=e=>e/203,Est=({j:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=(e+yre)/(.44+.56*(e+yre)),i=fz(a+.13860504*t+.058047316*r),o=fz(a-.13860504*t-.058047316*r),s=fz(a-.096019242*t-.8118919*r),l={mode:"xyz65",x:hz(1.661373024652174*i-.914523081304348*o+.23136208173913045*s),y:hz(-.3250758611844533*i+1.571847026732543*o-.21825383453227928*s),z:hz(-.090982811*i-.31272829*o+1.5227666*s)};return n!==void 0&&(l.alpha=n),l},Qz=Est,kst=e=>{let t=Jz(rm(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},eq=kst,Cst=e=>nm(Qz(e)),tq=Cst,Lst={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:eq,xyz65:Jz},toMode:{rgb:tq,xyz65:Qz},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Ui,a:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}}},sne=Lst,Pst=({j:e,a:t,b:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:"jch",j:e,c:a};return a&&(i.h=Th(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},kz=Pst,Fst=({j:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let a={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},Cz=Fst,Dst={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Cz,rgb:e=>tq(Cz(e))},fromMode:{rgb:e=>kz(eq(e)),jab:kz},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Ui,fixup:Bp},c:Ui,j:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:O4},average:{h:Op}},lne=Dst,bE=Math.pow(29,3)/Math.pow(3,3),rq=Math.pow(6,3)/Math.pow(29,3),dz=e=>Math.pow(e,3)>rq?Math.pow(e,3):(116*e-16)/bE,Rst=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=(e+16)/116,i=t/500+a,o=a-r/200,s={mode:"xyz50",x:dz(i)*Oc.X,y:dz(a)*Oc.Y,z:dz(o)*Oc.Z};return n!==void 0&&(s.alpha=n),s},wE=Rst,Ist=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=gx({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return n!==void 0&&(a.alpha=n),a},yb=Ist,zst=e=>yb(wE(e)),nq=zst,qst=e=>{let{r:t,g:r,b:n,alpha:a}=px(e),i={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*n};return a!==void 0&&(i.alpha=a),i},xb=qst,vz=e=>e>rq?Math.cbrt(e):(bE*e+16)/116,Bst=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=vz(e/Oc.X),i=vz(t/Oc.Y),o=vz(r/Oc.Z),s={mode:"lab",l:116*i-16,a:500*(a-i),b:200*(i-o)};return n!==void 0&&(s.alpha=n),s},TE=Bst,Ost=e=>{let t=TE(xb(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},iq=Ost;function Nst(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,n,a,i,o]=t;if(!(n.type===Ti.Hue||a.type===Ti.Hue||i.type===Ti.Hue))return n.type!==Ti.None&&(r.l=Math.min(Math.max(0,n.value),100)),a.type!==Ti.None&&(r.a=a.type===Ti.Number?a.value:a.value*125/100),i.type!==Ti.None&&(r.b=i.type===Ti.Number?i.value:i.value*125/100),o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var une=Nst,Ust={mode:"lab",toMode:{xyz50:wE,rgb:nq},fromMode:{xyz50:TE,rgb:iq},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[une],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:Ui,a:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}}},AE=Ust,Vst=tl(zo({},AE),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Wz,rgb:N4},fromMode:{xyz65:Yz,rgb:U4},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),cne=Vst;function Gst(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,n,a,i,o]=t;if(n.type!==Ti.None){if(n.type===Ti.Hue)return;r.l=Math.min(Math.max(0,n.value),100)}if(a.type!==Ti.None&&(r.c=Math.max(0,a.type===Ti.Number?a.value:a.value*150/100)),i.type!==Ti.None){if(i.type===Ti.Percentage)return;r.h=i.value}return o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var fne=Gst,Hst={mode:"lch",toMode:{lab:j1,rgb:e=>nq(j1(e))},fromMode:{rgb:e=>H1(iq(e)),lab:H1},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[fne],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Ui,fixup:Bp},c:Ui,l:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:O4},average:{h:Op}},ME=Hst,jst=tl(zo({},ME),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>j1(e,"lab65"),rgb:e=>N4(j1(e,"lab65"))},fromMode:{rgb:e=>H1(U4(e),"lch65"),lab65:e=>H1(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),hne=jst,Wst=({l:e,u:t,v:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:"lchuv",l:e,c:a};return a&&(i.h=Th(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},aq=Wst,Yst=({l:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let a={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},oq=Yst,dne=(e,t,r)=>4*e/(e+15*t+3*r),vne=(e,t,r)=>9*t/(e+15*t+3*r),Xst=dne(Oc.X,Oc.Y,Oc.Z),Zst=vne(Oc.X,Oc.Y,Oc.Z),$st=e=>e<=rq?bE*e:116*Math.cbrt(e)-16,Kst=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=$st(t/Oc.Y),i=dne(e,t,r),o=vne(e,t,r);!isFinite(i)||!isFinite(o)?a=i=o=0:(i=13*a*(i-Xst),o=13*a*(o-Zst));let s={mode:"luv",l:a,u:i,v:o};return n!==void 0&&(s.alpha=n),s},dE=Kst,Jst=(e,t,r)=>4*e/(e+15*t+3*r),Qst=(e,t,r)=>9*t/(e+15*t+3*r),elt=Jst(Oc.X,Oc.Y,Oc.Z),tlt=Qst(Oc.X,Oc.Y,Oc.Z),rlt=({l:e,u:t,v:r,alpha:n})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let a=t/(13*e)+elt,i=r/(13*e)+tlt,o=Oc.Y*(e<=8?e/bE:Math.pow((e+16)/116,3)),s=o*(9*a)/(4*i),l=o*(12-3*a-20*i)/(4*i),u={mode:"xyz50",x:s,y:o,z:l};return n!==void 0&&(u.alpha=n),u},vE=rlt,nlt=e=>aq(dE(xb(e))),ilt=e=>yb(vE(oq(e))),alt={mode:"lchuv",toMode:{luv:oq,rgb:ilt},fromMode:{rgb:nlt,luv:aq},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:Ui,fixup:Bp},c:Ui,l:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:O4},average:{h:Op}},pne=alt,olt=tl(zo({},vx),{mode:"lrgb",toMode:{rgb:gx},fromMode:{rgb:px},parse:["srgb-linear"],serialize:"srgb-linear"}),gne=olt,slt={mode:"luv",toMode:{xyz50:vE,rgb:e=>yb(vE(e))},fromMode:{xyz50:dE,rgb:e=>dE(xb(e))},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:Ui,u:Ui,v:Ui,alpha:{use:Ui,fixup:Nc}}},mne=slt,llt=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),i=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),o=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*a+.7936177747023054*i-.0040720430116193*o,a:1.9779985324311684*a-2.42859224204858*i+.450593709617411*o,b:.0259040424655478*a+.7827717124575296*i-.8086757549230774*o};return n!==void 0&&(s.alpha=n),s},sq=llt,ult=e=>{let t=sq(px(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},V4=ult,clt=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),i=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),o=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*a-3.3077115392580616*i+.2309699031821044*o,g:-1.2684379732850317*a+2.6097573492876887*i-.3413193760026573*o,b:-.0041960761386756*a-.7034186179359362*i+1.7076146940746117*o};return n!==void 0&&(s.alpha=n),s},_b=clt,flt=e=>gx(_b(e)),G4=flt;function Lz(e){let n=1.170873786407767;return .5*(n*e-.206+Math.sqrt((n*e-.206)*(n*e-.206)+4*.03*n*e))}function pE(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function hlt(e,t){let r,n,a,i,o,s,l,u;-1.88170328*e-.80936493*t>1?(r=1.19086277,n=1.76576728,a=.59662641,i=.75515197,o=.56771245,s=4.0767416621,l=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,n=-.45954404,a=.08285427,i=.1254107,o=.14503204,s=-1.2684380046,l=2.6097574011,u=-.3413193965):(r=1.35733652,n=-.00915799,a=-1.1513021,i=-.50559606,o=.00692167,s=-.0041960863,l=-.7034186147,u=1.707614701);let c=r+n*e+a*t+i*e*e+o*e*t,f=.3963377774*e+.2158037573*t,v=-.1055613458*e-.0638541728*t,g=-.0894841775*e-1.291485548*t;{let p=1+c*f,x=1+c*v,_=1+c*g,y=p*p*p,C=x*x*x,k=_*_*_,S=3*f*p*p,L=3*v*x*x,w=3*g*_*_,A=6*f*f*p,T=6*v*v*x,m=6*g*g*_,F=s*y+l*C+u*k,E=s*S+l*L+u*w,I=s*A+l*T+u*m;c=c-F*E/(E*E-.5*F*I)}return c}function lq(e,t){let r=hlt(e,t),n=_b({l:1,a:r*e,b:r*t}),a=Math.cbrt(1/Math.max(n.r,n.g,n.b)),i=a*r;return[a,i]}function dlt(e,t,r,n,a,i=null){i||(i=lq(e,t));let o;if((r-a)*i[1]-(i[0]-a)*n<=0)o=i[1]*a/(n*i[0]+i[1]*(a-r));else{o=i[1]*(a-1)/(n*(i[0]-1)+i[1]*(a-r));{let s=r-a,l=n,u=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,v=s+l*u,g=s+l*c,p=s+l*f;{let x=a*(1-o)+o*r,_=o*n,y=x+_*u,C=x+_*c,k=x+_*f,S=y*y*y,L=C*C*C,w=k*k*k,A=3*v*y*y,T=3*g*C*C,m=3*p*k*k,F=6*v*v*y,E=6*g*g*C,I=6*p*p*k,R=4.0767416621*S-3.3077115913*L+.2309699292*w-1,B=4.0767416621*A-3.3077115913*T+.2309699292*m,O=4.0767416621*F-3.3077115913*E+.2309699292*I,V=B/(B*B-.5*R*O),j=-R*V,q=-1.2684380046*S+2.6097574011*L-.3413193965*w-1,U=-1.2684380046*A+2.6097574011*T-.3413193965*m,J=-1.2684380046*F+2.6097574011*E-.3413193965*I,ee=U/(U*U-.5*q*J),ce=-q*ee,ye=-.0041960863*S-.7034186147*L+1.707614701*w-1,xe=-.0041960863*A-.7034186147*T+1.707614701*m,ue=-.0041960863*F-.7034186147*E+1.707614701*I,K=xe/(xe*xe-.5*ye*ue),_e=-ye*K;j=V>=0?j:1e6,ce=ee>=0?ce:1e6,_e=K>=0?_e:1e6,o+=Math.min(j,Math.min(ce,_e))}}}return o}function uq(e,t,r=null){r||(r=lq(e,t));let n=r[0],a=r[1];return[a/n,a/(1-n)]}function yne(e,t,r){let n=lq(t,r),a=dlt(t,r,e,1,e,n),i=uq(t,r,n),o=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),l=a/Math.min(e*i[0],(1-e)*i[1]),u=e*o,c=(1-e)*s,f=.9*l*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(c*c*c*c))));return u=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(u*u)+1/(c*c))),f,a]}function Pz(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,a={mode:"okhsl",l:Lz(t)};e.alpha!==void 0&&(a.alpha=e.alpha);let i=Math.sqrt(r*r+n*n);if(!i)return a.s=0,a;let[o,s,l]=yne(t,r/i,n/i),u;if(iPz(V4(e))},toMode:{oklab:Fz,rgb:e=>G4(Fz(e))}}),xne=vlt;function Dz(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,a=Math.sqrt(r*r+n*n),i=a?r/a:1,o=a?n/a:1,[s,l]=uq(i,o),u=.5,c=1-u/s,f=l/(a+t*l),v=f*t,g=f*a,p=pE(v),x=g*p/v,_=_b({l:p,a:i*x,b:o*x}),y=Math.cbrt(1/Math.max(_.r,_.g,_.b,0));t=t/y,a=a/y*Lz(t)/t,t=Lz(t);let C={mode:"okhsv",s:a?(u+l)*g/(l*u+l*c*g):0,v:t?t/v:0};return C.s&&(C.h=Th(Math.atan2(n,r)*180/Math.PI)),e.alpha!==void 0&&(C.alpha=e.alpha),C}function Rz(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,a=e.v!==void 0?e.v:0,i=Math.cos(r/180*Math.PI),o=Math.sin(r/180*Math.PI),[s,l]=uq(i,o),u=.5,c=1-u/s,f=1-n*u/(u+l-l*c*n),v=n*l*u/(u+l-l*c*n),g=pE(f),p=v*g/f,x=_b({l:g,a:i*p,b:o*p}),_=Math.cbrt(1/Math.max(x.r,x.g,x.b,0)),y=pE(a*f),C=v*y/f;return t.l=y*_,t.a=C*i*_,t.b=C*o*_,t}var plt=tl(zo({},Kz),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Dz,rgb:e=>Dz(V4(e))},toMode:{oklab:Rz,rgb:e=>G4(Rz(e))}}),_ne=plt;function glt(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,n,a,i,o]=t;if(!(n.type===Ti.Hue||a.type===Ti.Hue||i.type===Ti.Hue))return n.type!==Ti.None&&(r.l=Math.min(Math.max(0,n.type===Ti.Number?n.value:n.value/100),1)),a.type!==Ti.None&&(r.a=a.type===Ti.Number?a.value:a.value*.4/100),i.type!==Ti.None&&(r.b=i.type===Ti.Number?i.value:i.value*.4/100),o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var bne=glt,mlt=tl(zo({},AE),{mode:"oklab",toMode:{lrgb:_b,rgb:G4},fromMode:{lrgb:sq,rgb:V4},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[bne],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`}),wne=mlt;function ylt(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,n,a,i,o]=t;if(n.type!==Ti.None){if(n.type===Ti.Hue)return;r.l=Math.min(Math.max(0,n.type===Ti.Number?n.value:n.value/100),1)}if(a.type!==Ti.None&&(r.c=Math.max(0,a.type===Ti.Number?a.value:a.value*.4/100)),i.type!==Ti.None){if(i.type===Ti.Percentage)return;r.h=i.value}return o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var Tne=ylt,xlt=tl(zo({},ME),{mode:"oklch",toMode:{oklab:e=>j1(e,"oklab"),rgb:e=>G4(j1(e,"oklab"))},fromMode:{rgb:e=>H1(V4(e),"oklch"),oklab:e=>H1(e,"oklch")},parse:[Tne],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),Ane=xlt,_lt=e=>{let{r:t,g:r,b:n,alpha:a}=px(e),i={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*n,z:0*t+.0451133818589026*r+1.043944368900976*n};return a!==void 0&&(i.alpha=a),i},Iz=_lt,blt=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=gx({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return n!==void 0&&(a.alpha=n),a},zz=blt,wlt=tl(zo({},vx),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>zz(rm(e)),xyz65:zz},toMode:{rgb:e=>nm(Iz(e)),xyz65:Iz}}),Mne=wlt,pz=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},Tlt=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"prophoto",r:pz(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:pz(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:pz(e*0+t*0+1.2119675456389452*r)};return n!==void 0&&(a.alpha=n),a},qz=Tlt,gz=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},Alt=e=>{let t=gz(e.r),r=gz(e.g),n=gz(e.b),a={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*n,z:0*t+0*r+.8251046025104602*n};return e.alpha!==void 0&&(a.alpha=e.alpha),a},Bz=Alt,Mlt=tl(zo({},vx),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:qz,rgb:e=>qz(xb(e))},toMode:{xyz50:Bz,rgb:e=>yb(Bz(e))}}),Sne=Mlt,xre=1.09929682680944,Slt=.018053968510807,mz=e=>{let t=Math.abs(e);return t>Slt?(Math.sign(e)||1)*(xre*Math.pow(t,.45)-(xre-1)):4.5*e},Elt=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"rec2020",r:mz(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:mz(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:mz(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return n!==void 0&&(a.alpha=n),a},Oz=Elt,_re=1.09929682680944,klt=.018053968510807,yz=(e=0)=>{let t=Math.abs(e);return t{let t=yz(e.r),r=yz(e.g),n=yz(e.b),a={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*r+.059301716469862*n,z:0*t+.0280726930490874*r+1.0609850577107909*n};return e.alpha!==void 0&&(a.alpha=e.alpha),a},Nz=Clt,Llt=tl(zo({},vx),{mode:"rec2020",fromMode:{xyz65:Oz,rgb:e=>Oz(rm(e))},toMode:{xyz65:Nz,rgb:e=>nm(Nz(e))},parse:["rec2020"],serialize:"rec2020"}),Ene=Llt,hx=.0037930732552754493,kne=Math.cbrt(hx),xz=e=>Math.cbrt(e)-kne,Plt=e=>{let{r:t,g:r,b:n,alpha:a}=px(e),i=xz(.3*t+.622*r+.078*n+hx),o=xz(.23*t+.692*r+.078*n+hx),s=xz(.2434226892454782*t+.2047674442449682*r+.5518098665095535*n+hx),l={mode:"xyb",x:(i-o)/2,y:(i+o)/2,b:s-(i+o)/2};return a!==void 0&&(l.alpha=a),l},Cne=Plt,_z=e=>Math.pow(e+kne,3),Flt=({x:e,y:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=_z(e+t)-hx,i=_z(t-e)-hx,o=_z(r+t)-hx,s=gx({r:11.031566904639861*a-9.866943908131562*i-.16462299650829934*o,g:-3.2541473810744237*a+4.418770377582723*i-.16462299650829934*o,b:-3.6588512867136815*a+2.7129230459360922*i+1.9459282407775895*o});return n!==void 0&&(s.alpha=n),s},Lne=Flt,Dlt={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:Lne},fromMode:{rgb:Cne},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Ui,y:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}}},Pne=Dlt,Rlt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:yb,lab:TE},fromMode:{rgb:xb,lab:wE},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Ui,y:Ui,z:Ui,alpha:{use:Ui,fixup:Nc}}},Fne=Rlt,Ilt=e=>{let{x:t,y:r,z:n,alpha:a}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let i={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*n};return a!==void 0&&(i.alpha=a),i},Dne=Ilt,zlt=e=>{let{x:t,y:r,z:n,alpha:a}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let i={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*n};return a!==void 0&&(i.alpha=a),i},Rne=zlt,qlt={mode:"xyz65",toMode:{rgb:nm,xyz50:Dne},fromMode:{rgb:rm,xyz50:Rne},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:Ui,y:Ui,z:Ui,alpha:{use:Ui,fixup:Nc}}},Ine=qlt,Blt=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return n!==void 0&&(a.alpha=n),a},zne=Blt,Olt=({y:e,i:t,q:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return n!==void 0&&(a.alpha=n),a},qne=Olt,Nlt={mode:"yiq",toMode:{rgb:qne},fromMode:{rgb:zne},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Ui,i:Ui,q:Ui,alpha:{use:Ui,fixup:Nc}}},Bne=Nlt,Ult=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,Vlt=(e=4)=>t=>typeof t=="number"?Ult(t,e):t,One=Vlt,R4=One(2),z4=e=>Math.max(0,Math.min(1,e||0)),dx=e=>Math.round(z4(e)*255),cq=dl("rgb"),Glt=dl("hsl"),fq=e=>{if(e===void 0)return;let t=dx(e.r),r=dx(e.g),n=dx(e.b);return"#"+(1<<24|t<<16|r<<8|n).toString(16).slice(1)},Nne=e=>{if(e===void 0)return;let t=dx(e.alpha!==void 0?e.alpha:1);return fq(e)+(256|t).toString(16).slice(1)},Une=e=>{if(e===void 0)return;let t=dx(e.r),r=dx(e.g),n=dx(e.b);return e.alpha===void 0||e.alpha===1?`rgb(${t}, ${r}, ${n})`:`rgba(${t}, ${r}, ${n}, ${R4(z4(e.alpha))})`},Vne=e=>{if(e===void 0)return;let t=R4(e.h||0),r=R4(z4(e.s)*100)+"%",n=R4(z4(e.l)*100)+"%";return e.alpha===void 0||e.alpha===1?`hsl(${t}, ${r}, ${n})`:`hsla(${t}, ${r}, ${n}, ${R4(z4(e.alpha))})`},Hlt=e=>{let t=$v(e);if(!t)return;let r=Kh(t.mode);if(!r.serialize||typeof r.serialize=="string"){let n=`color(${r.serialize||`--${t.mode}`} `;return r.channels.forEach((a,i)=>{a!=="alpha"&&(n+=(i?" ":"")+(t[a]!==void 0?t[a]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(n+=` / ${t.alpha}`),n+")"}if(typeof r.serialize=="function")return r.serialize(t)},jlt=e=>fq(cq(e)),Wlt=e=>Nne(cq(e)),Ylt=e=>Une(cq(e)),Xlt=e=>Vne(Glt(e)),Zlt={normal:(e,t)=>t,multiply:(e,t)=>e*t,screen:(e,t)=>e+t-e*t,"hard-light":(e,t)=>t<.5?e*2*t:2*t*(1-e)-1,overlay:(e,t)=>e<.5?t*2*e:2*e*(1-t)-1,darken:(e,t)=>Math.min(e,t),lighten:(e,t)=>Math.max(e,t),"color-dodge":(e,t)=>e===0?0:t===1?1:Math.min(1,e/(1-t)),"color-burn":(e,t)=>e===1?1:t===0?0:1-Math.min(1,(1-e)/t),"soft-light":(e,t)=>t<.5?e-(1-2*t)*e*(1-e):e+(2*t-1)*((e<.25?((16*e-12)*e+4)*e:Math.sqrt(e))-e),difference:(e,t)=>Math.abs(e-t),exclusion:(e,t)=>e+t-2*e*t},$lt=(e,t="normal",r="rgb")=>{let n=typeof t=="function"?t:Zlt[t],a=dl(r),i=Kh(r).channels;return e.map(s=>{let l=a(s);return l.alpha===void 0&&(l.alpha=1),l}).reduce((s,l)=>{if(s===void 0)return l;let u=l.alpha+s.alpha*(1-l.alpha);return i.reduce((c,f)=>(f!=="alpha"&&(u===0?c[f]=0:(c[f]=l.alpha*(1-s.alpha)*l[f]+l.alpha*s.alpha*n(s[f],l[f])+(1-l.alpha)*s.alpha*s[f],c[f]=Math.max(0,Math.min(1,c[f]/u)))),c),{mode:r,alpha:u})})},Klt=$lt,Jlt=([e,t])=>e+Math.random()*(t-e),Qlt=e=>Object.keys(e).reduce((t,r)=>{let n=e[r];return t[r]=Array.isArray(n)?n:[n,n],t},{}),eut=(e="rgb",t={})=>{let r=Kh(e),n=Qlt(t);return r.channels.reduce((a,i)=>((n.alpha||i!=="alpha")&&(a[i]=Jlt(n[i]||r.ranges[i])),a),{mode:e})},tut=eut,H4=(e,t="rgb",r=!1)=>{let n=t?Kh(t).channels:null,a=t?dl(t):$v;return i=>{let o=a(i);if(!o)return;let s=(n||Kh(o.mode).channels).reduce((u,c)=>{let f=e(o[c],c,o,t);return f!==void 0&&!isNaN(f)&&(u[c]=f),u},{mode:o.mode});if(!r)return s;let l=$v(i);return l&&l.mode!==s.mode?dl(l.mode)(s):s}},Gne=(e,t,r)=>t!=="alpha"?(e||0)*(r.alpha!==void 0?r.alpha:1):e,Hne=(e,t,r)=>t!=="alpha"&&r.alpha!==0?(e||0)/(r.alpha!==void 0?r.alpha:1):e,hq=(e=1,t=0)=>(r,n)=>n!=="alpha"?r*e+t:r,rut=(e=1,t=1,r=0)=>(n,a)=>a!=="alpha"?e*Math.pow(n,t)+r:n,nut=e=>{e[0]===void 0&&(e[0]=0),e[e.length-1]===void 0&&(e[e.length-1]=1);let t=1,r,n,a,i;for(;tt=>e<=0?1:e>=1?0:Math.pow(t,Math.log(.5)/Math.log(e)),jne=aut,aE=e=>typeof e=="function",cx=e=>e&&typeof e=="object",bre=e=>typeof e=="number",Wne=(e,t="rgb",r,n)=>{let a=Kh(t),i=dl(t),o=[],s=[],l={};e.forEach(v=>{Array.isArray(v)?(o.push(i(v[0])),s.push(v[1])):bre(v)||aE(v)?l[s.length]=v:(o.push(i(v)),s.push(void 0))}),iut(s);let u=a.channels.reduce((v,g)=>{let p;return cx(r)&&cx(r[g])&&r[g].fixup?p=r[g].fixup:cx(a.interpolate[g])&&a.interpolate[g].fixup?p=a.interpolate[g].fixup:p=x=>x,v[g]=p(o.map(x=>x[g])),v},{});if(n){let v=o.map((g,p)=>a.channels.reduce((x,_)=>(x[_]=u[_][p],x),{mode:t}));u=a.channels.reduce((g,p)=>(g[p]=v.map(x=>{let _=n(x[p],p,x,t);return isNaN(_)?void 0:_}),g),{})}let c=a.channels.reduce((v,g)=>{let p;return aE(r)?p=r:cx(r)&&aE(r[g])?p=r[g]:cx(r)&&cx(r[g])&&r[g].use?p=r[g].use:aE(a.interpolate[g])?p=a.interpolate[g]:cx(a.interpolate[g])&&(p=a.interpolate[g].use),v[g]=p(u[g]),v},{}),f=o.length-1;return v=>{if(v=Math.min(Math.max(0,v),1),v<=s[0])return o[0];if(v>s[f])return o[f];let g=0;for(;s[g]{let L=c[S](C);return L!==void 0&&(k[S]=L),k},{mode:t})}},out=(e,t="rgb",r)=>Wne(e,t,r),Yne=(e,t)=>(r,n="rgb",a)=>{let i=t?H4(t,n):void 0,o=Wne(r,n,a,e);return i?s=>i(o(s)):o},sut=Yne(Gne,Hne),oE=(e,t)=>(e+t)%t,Xne=(e,t,r,n,a)=>{let i=a*a,o=i*a;return((1-3*a+3*i-o)*e+(4-6*i+3*o)*t+(1+3*a+3*i-3*o)*r+o*n)/6},Zne=e=>t=>{let r=e.length-1,n=t>=1?r-1:Math.max(0,Math.floor(t*r));return Xne(n>0?e[n-1]:2*e[n]-e[n+1],e[n],e[n+1],nt=>{let r=e.length-1,n=Math.floor(t*r);return Xne(e[oE(n-1,e.length)],e[oE(n,e.length)],e[oE(n+1,e.length)],e[oE(n+2,e.length)],(t-n/r)*r)},Kne=e=>{let t,r=e.length-1,n=new Array(r),a=new Array(r),i=new Array(r);for(n[1]=1/4,a[1]=(6*e[1]-e[0])/4,t=2;t0&&(i[r-1]=a[r-1]),t=r-2;t>0;--t)i[t]=a[t]-n[t]*i[t+1];return i},lut=e=>Zne(Kne(e)),uut=e=>$ne(Kne(e)),db=Math.sign,Uz=Math.min,b0=Math.abs,dq=e=>{let t=e.length-1,r=[],n=[],a=[];for(let i=0;i0?.5*(e[i+1]-e[i-1])*t:void 0),a.push(i>0?(db(r[i-1])+db(r[i]))*Uz(b0(r[i-1]),b0(r[i]),.5*b0(n[i])):void 0);return[r,n,a]},vq=(e,t,r)=>{let n=e.length-1,a=n*n;return i=>{let o;i>=1?o=n-1:o=Math.max(0,Math.floor(i*n));let s=i-o/n,l=s*s,u=l*s;return(t[o]+t[o+1]-2*r[o])*a*u+(3*r[o]-2*t[o]-t[o+1])*n*l+t[o]*s+e[o]}},cut=e=>{if(e.length<3)return Ui(e);let t=e.length-1,[r,,n]=dq(e);return n[0]=r[0],n[t]=r[t-1],vq(e,n,r)},fut=e=>{if(e.length<3)return Ui(e);let t=e.length-1,[r,n,a]=dq(e);return n[0]=(e[1]*2-e[0]*1.5-e[2]*.5)*t,n[t]=(e[t]*1.5-e[t-1]*2+e[t-2]*.5)*t,a[0]=n[0]*r[0]<=0?0:b0(n[0])>2*b0(r[0])?2*r[0]:n[0],a[t]=n[t]*r[t-1]<=0?0:b0(n[t])>2*b0(r[t-1])?2*r[t-1]:n[t],vq(e,a,r)},hut=e=>{let t=e.length-1,[r,n,a]=dq(e);n[0]=.5*(e[1]-e[t])*t,n[t]=.5*(e[0]-e[t-1])*t;let i=(e[0]-e[t])*t,o=i;return a[0]=(db(i)+db(r[0]))*Uz(b0(i),b0(r[0]),.5*b0(n[0])),a[t]=(db(r[t-1])+db(o))*Uz(b0(r[t-1]),b0(o),.5*b0(n[t])),vq(e,a,r)},dut=(e=1)=>e===1?t=>t:t=>Math.pow(t,e),Jne=dut,vut=(e=2,t=1)=>{let r=Jne(t);if(e<2)return e<1?[]:[r(.5)];let n=[];for(let a=0;a{let t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},tie=e=>eie(Qne(e)),rie=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function pq(e){return rie(Qne(e))}function SE(e="rgb"){let{gamut:t}=Kh(e);if(!t)return n=>!0;let r=dl(typeof t=="string"?t:e);return n=>rie(r(n))}function gut(e){return e=$v(e),e===void 0||pq(e)?e:dl(e.mode)(tie(e))}function gq(e="rgb"){let{gamut:t}=Kh(e);if(!t)return i=>$v(i);let r=typeof t=="string"?t:e,n=dl(r),a=SE(r);return i=>{let o=$v(i);if(!o)return;let s=n(o);if(a(s))return o;let l=eie(s);return o.mode===l.mode?l:dl(o.mode)(l)}}function mut(e,t="lch",r="rgb"){e=$v(e);let n=r==="rgb"?pq:SE(r),a=r==="rgb"?tie:gq(r);if(e===void 0||n(e))return e;let i=dl(e.mode);e=dl(t)(e);let o=tl(zo({},e),{c:0});if(!n(o))return i(a(o));let s=0,l=e.c!==void 0?e.c:0,u=Kh(t).ranges.c,c=(u[1]-u[0])/Math.pow(2,13),f=o.c;for(;l-s>c;)o.c=s+(l-s)*.5,n(o)?(f=o.c,s=o.c):l=o.c;return i(n(o)?o:tl(zo({},o),{c:f}))}function yut(e="rgb",t="oklch",r=mb("oklch"),n=.02){let a=dl(e),i=Kh(e);if(!i.gamut)return c=>a(c);let o=SE(e),s=gq(e),l=dl(t),{ranges:u}=Kh(t);if(!u.l||!u.c)throw new Error("LCH-like space expected");return c=>{if(c=$v(c),c===void 0)return;let f=zo({},l(c));if(f.l===void 0&&(f.l=0),f.c===void 0&&(f.c=0),f.l>=u.l[1]){let _=tl(zo({},i.white),{mode:e});return c.alpha!==void 0&&(_.alpha=c.alpha),_}if(f.l<=u.l[0]){let _=tl(zo({},i.black),{mode:e});return c.alpha!==void 0&&(_.alpha=c.alpha),_}if(o(f))return a(f);let v=0,g=f.c,p=(u.c[1]-u.c[0])/4e3,x=s(f);for(;g-v>p;)f.c=(v+g)*.5,x=s(f),o(f)||r&&n>0&&r(f,x)<=n?v=f.c:g=f.c;return a(o(f)?f:x)}}var xut=(e,t=mb(),r=n=>n)=>{let n=e.map((a,i)=>({color:r(a),i}));return(a,i=1,o=1/0)=>(isFinite(i)&&(i=Math.max(1,Math.min(i,n.length-1))),n.forEach(s=>{s.d=t(a,s.color)}),n.sort((s,l)=>s.d-l.d).slice(0,i).filter(s=>s.de[s.i]))},_ut=xut,mq=e=>Math.max(e,0),yq=e=>Math.max(Math.min(e,1),0),but=(e,t,r)=>e===void 0||t===void 0?void 0:e+r*(t-e),wut=e=>{let t=1-yq(e);return[.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1]},Tut=e=>{let t=mq(e);return[.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1]},Aut=e=>{let t=1-yq(e);return[.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1]},Mut=e=>{let t=Math.PI*e/180,r=Math.cos(t),n=Math.sin(t);return[.213+r*.787-n*.213,.715-r*.715-n*.715,.072-r*.072+n*.928,0,.213-r*.213+n*.143,.715+r*.285+n*.14,.072-r*.072-n*.283,0,.213-r*.213-n*.787,.715-r*.715+n*.715,.072+r*.928+n*.072,0,0,0,0,1]},EE=(e,t,r=!1)=>{let n=dl(t),a=Kh(t).channels;return i=>{let o=n(i);if(!o)return;let s={mode:t},l,u=a.length;for(let f=0;f{let r=mq(e);return H4(hq(r),t,!0)},Eut=(e=1,t="rgb")=>{let r=mq(e);return H4(hq(r,(1-r)/2),t,!0)},kut=(e=1,t="rgb")=>EE(wut(e),t,!0),Cut=(e=1,t="rgb")=>EE(Tut(e),t,!0),Lut=(e=1,t="rgb")=>EE(Aut(e),t,!0),Put=(e=1,t="rgb")=>{let r=yq(e);return H4((n,a)=>a==="alpha"?n:but(r,1-r,n),t,!0)},Fut=(e=0,t="rgb")=>EE(Mut(e),t,!0),Dut=dl("rgb"),Rut=[[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]],Iut=[[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]],zut=[[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]],xq=(e,t)=>{let r=Math.max(0,Math.min(1,t)),n=Math.round(r/.1),a=Math.round(r%.1),i=e[n];if(a>0&&nfx(i[l],o[l],a))}return o=>{let s=$v(o);if(s===void 0)return;let{r:l,g:u,b:c}=Dut(s),f={mode:"rgb",r:i[0]*l+i[1]*u+i[2]*c,g:i[3]*l+i[4]*u+i[5]*c,b:i[6]*l+i[7]*u+i[8]*c};return s.alpha!==void 0&&(f.alpha=s.alpha),dl(s.mode)(f)}},qut=(e=1)=>xq(Rut,e),But=(e=1)=>xq(Iut,e),Out=(e=1)=>xq(zut,e),Nut=e=>e*e*(3-2*e),Uut=e=>.5-Math.sin(Math.asin(1-2*e)/3),Vut=e=>e*e*e*(e*(e*6-15)+10),Gut=Vut,Hut=e=>(1-Math.cos(e*Math.PI))/2,jut=Hut;function Vz(e){let t=dl("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function Wut(e,t){let r=Vz(e),n=Vz(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}var Yut=Rs(Ire),Xut=Rs(Nre),Zut=Rs(jre),$ut=Rs(Wre),Kut=Rs(Zre),Jut=Rs(Xz),Qut=Rs(Kz),ect=Rs(nne),tct=Rs(one),rct=Rs(sne),nct=Rs(lne),ict=Rs(AE),act=Rs(cne),oct=Rs(ME),sct=Rs(hne),lct=Rs(pne),uct=Rs(gne),cct=Rs(mne),fct=Rs(xne),hct=Rs(_ne),dct=Rs(wne),vct=Rs(Ane),pct=Rs(Mne),gct=Rs(Sne),mct=Rs(Ene),yct=Rs(vx),xct=Rs(Pne),_ct=Rs(Fne),bct=Rs(Ine),wct=Rs(Bne)});var im=fe((vfr,lie)=>{"use strict";var aie={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},oie={};function sie(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),sie(n,t[r]))}}sie(aie,oie);lie.exports={configAttributes:aie,dfltConfig:oie}});var bq=fe((pfr,uie)=>{"use strict";var _q=xi(),Tct=aa(),j4=[];uie.exports=function(e,t,r){var s;if(((s=r==null?void 0:r._context)==null?void 0:s.displayNotifier)===!1||j4.indexOf(e)!==-1)return;j4.push(e);var n=1e3;Tct(t)?n=t:t==="long"&&(n=3e3);var a=_q.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var i=a.selectAll(".notifier-note").data(j4);function o(l){l.duration(700).style("opacity",0).each("end",function(u){var c=j4.indexOf(u);c!==-1&&j4.splice(c,1),_q.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var u=_q.select(this);u.append("button").classed("notifier-close",!0).html("×").on("click",function(){u.transition().call(o)});for(var c=u.append("p"),f=l.split(//g),v=0;v{"use strict";var bb=im().dfltConfig,wq=bq(),Tq=cie.exports={};Tq.log=function(){var e;if(bb.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};Tq.warn=function(){var e;if(bb.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};Tq.error=function(){var e;if(bb.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var tc=fe(mx=>{"use strict";mx.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];mx.defaultLine="#444";mx.lightLine="#eee";mx.background="#fff";mx.borderLine="#BEC8D9";mx.lightFraction=1e3/11});var ni=fe((yfr,yie)=>{"use strict";var{converter:fie,formatHex:Act,formatRgb:Mct,wcagContrast:Sct,wcagLuminance:Ect}=iie(),{isArrayOrTypedArray:kct}=Gf(),{warn:Cct}=W1(),{background:Y4,defaultLine:Sq,defaults:Lct,lightLine:Pct}=tc(),hie=fie("rgb"),Fct=fie("hsl"),die=e=>{if(typeof e!="string")return;let t=e.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(t))try{return hie(t)}catch(r){return}},Jh=e=>e>0?e>1?1:e:0,Dct={mode:"rgb",r:0,g:0,b:0,alpha:1},Aq=e=>Math.round(e*255e6)/255e6,vie=e=>tl(zo({},e),{r:Aq(e.r),g:Aq(e.g),b:Aq(e.b)}),w0=e=>Mct(vie(e)),Rct=e=>Act(vie(e)),eu=(e,t)=>{var n;let r=die(e);return r?((n=r.alpha)!=null||(r.alpha=1),r):(!t&&e!=null&&Cct(`Invalid color specifier: "${e}". Defaulting to "#000"`),Dct)},W4=e=>w0(tl(zo({},eu(e)),{alpha:1})),Ict=e=>e?eu(e).alpha:0,pie=e=>kct(e)&&e.length>2&&Number.isFinite(e[0])&&Number.isFinite(e[1])&&Number.isFinite(e[2]),zct=e=>{let[t,r,n,a]=e,i=Math.max(t,r,n)>1?1/255:1,o=a!=null?a:1;return{mode:"rgb",r:t*i,g:r*i,b:n*i,alpha:o>1?o/255:o}},qct=(e,t)=>{let r=pie(e)?zct(e):eu(e,!0),n=[Jh(r.r),Jh(r.g),Jh(r.b),Jh(r.alpha)];return t==="uint8"||t==="uint8_clamped"?Uint8Array.from(n,a=>Math.round(a*255)):t==="float32"?Float32Array.from(n):t==="float64"?Float64Array.from(n):n},Bct=(e,t)=>w0(tl(zo({},eu(e)),{alpha:Jh(t)})),gie=(e,t)=>{let r=eu(e),n=r.alpha;if(n===1)return w0(r);let a=eu(t||Y4),i=a.alpha,o=(s,l)=>(i===1?l:1-i+l*i)*(1-n)+s*n;return w0({mode:"rgb",r:o(r.r,a.r),g:o(r.g,a.g),b:o(r.b,a.b)})},Oct=(e,t,r)=>{let n=eu(e),a=eu(t),i=(o,s)=>r*o+(1-r)*s;return w0({mode:"rgb",r:i(n.r,a.r),g:i(n.g,a.g),b:i(n.b,a.b)})},Mq=(e,t)=>{let r=eu(e),n=Fct(r)||{mode:"hsl",h:0,s:0,l:0};return w0(hie(tl(zo({},n),{l:Jh((n.l*100+t)/100),alpha:r.alpha})))},kE=(e,t)=>Sct(eu(e),eu(t)),mie=e=>kE(e,Y4)>kE(e,Sq),Nct=w0(eu(Y4)),Uct=w0(eu(Sq)),Vct=(e,t,r)=>(eu(e).alpha!==1&&(e=gie(e,Y4)),mie(e)?t?Mq(e,t):Nct:r?Mq(e,-r):Uct),Gct=(e,t)=>{e.style({stroke:W4(t),"stroke-opacity":eu(t).alpha})},Hct=(e,t)=>{e.style({fill:W4(t),"fill-opacity":eu(t).alpha})},jct=(e,t)=>!!(e&&t&&W4(e)===W4(t)),Wct=e=>die(e)!==void 0,Yct=(e,t)=>{t=t===0?0:t||10;let r=eu(e),n=t/100;return w0(tl(zo({},r),{r:Jh(r.r+n),g:Jh(r.g+n),b:Jh(r.b+n)}))},Xct=(e,t,r)=>{let n=eu(e),a=eu(t),i=r/100,o=a.alpha-n.alpha,s=2*i-1,l=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,u=1-l,c=(f,v)=>u*f+l*v;return w0({mode:"rgb",r:c(n.r,a.r),g:c(n.g,a.g),b:c(n.b,a.b),alpha:n.alpha*(1-i)+a.alpha*i})},Zct=(e,t=["#000","#fff"])=>{let r,n=-1/0;for(let a of t){let i=kE(e,a);i>n&&(n=i,r=w0(eu(a)))}return r},$ct=e=>w0(eu(e)),Kct=e=>Rct(eu(e)).toUpperCase(),Jct=e=>{let t=eu(e);return[Jh(t.r)*255,Jh(t.g)*255,Jh(t.b)*255,Jh(t.alpha)]},Qct=([e,t,r,n])=>w0({mode:"rgb",r:e/255,g:t/255,b:r/255,alpha:n}),eft=e=>{let t=eu(e);return Ect({mode:"rgb",r:Jh(t.r),g:Jh(t.g),b:Jh(t.b)})};yie.exports={addOpacity:Bct,adjustLightness:Mq,background:Y4,brighten:Yct,combine:gie,contrast:Vct,defaultLine:Sq,defaults:Lct,equals:jct,fill:Hct,hexString:Kct,interpolate:Oct,isChannelArray:pie,isDark:mie,isValid:Wct,lightLine:Pct,luminosity:eft,mix:Xct,mostReadable:Zct,normalize:qct,opacity:Ict,parse:eu,rgb:W4,rgbaArray:Jct,rgbaArrayToString:Qct,rgbaString:$ct,stroke:Gct,wcagContrast:kE}});var yx=fe((_fr,bie)=>{"use strict";var tft=ni(),CE={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)"]]},xie=CE.RdBu;function rft(e,t){if(t||(t=xie),!e)return t;function r(){try{e=CE[e]||JSON.parse(e)}catch(n){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),_ie(e)?e:t}function _ie(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r{"use strict";wie.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var wb={};zp(wb,{counter:()=>ift});function ift(e,t="",r,n){let a=t+(r?"":"$"),i=n===!1?"":"^";return e==="xy"?new RegExp(i+"x"+Eq+"y"+Eq+a):new RegExp(i+e+Eq+a)}var Eq,Tb=Co(()=>{"use strict";Eq="([2-9]|[1-9][0-9]+)?"});var Mie=fe(Kd=>{"use strict";var kq=aa(),Tie=ta().extendFlat,aft=Ho(),oft=yx(),Cq=ni(),sft=Y1().DESELECTDIM,Ab=M4(),Aie=(Tb(),Gs(wb)).counter,lft=(fb(),Gs(cb)).modHalf,Kv=Gf().isArrayOrTypedArray,am=Gf().isTypedArraySpec,om=Gf().decodeTypedArraySpec;Kd.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(Kv(e)?e:am(e)?om(e):r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),n.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;ni===!0||i===!1;a(e)||n.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,n){am(e)&&(e=om(e)),!kq(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}am(e)&&(e=om(e)),e%1||!kq(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if(typeof e!="string"){var a=typeof e=="number";n.strict===!0||!a?t.set(r):t.set(String(e))}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){am(e)&&(e=om(e)),Cq.isValid(e)?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){!Array.isArray(e)||!e.length?t.set(r):e.every(n=>Cq.isValid(n))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(oft.get(e,r))}},angle:{coerceFunction:function(e,t,r){am(e)&&(e=om(e)),e==="auto"?t.set("auto"):kq(e)?t.set(lft(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var a=n.regex||Aie(r);let i=o=>typeof o=="string"&&a.test(o);i(e)||n.arrayOk&&Kv(e)&&e.length>0&&e.every(i)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!Aie(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!="string"){t.set(r);return}for(var a=e.split("+"),i=0;i{"use strict";Sie.exports=function(){}});var Lq=fe((Afr,Eie)=>{"use strict";Eie.exports=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),a=0;a{kie.exports=uft;function uft(){var e=new Float32Array(16);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}});var Pie=fe((Sfr,Lie)=>{Lie.exports=cft;function cft(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}});var Die=fe((Efr,Fie)=>{Fie.exports=fft;function fft(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var Pq=fe((kfr,Rie)=>{Rie.exports=hft;function hft(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}});var zie=fe((Cfr,Iie)=>{Iie.exports=dft;function dft(e,t){if(e===t){var r=t[1],n=t[2],a=t[3],i=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=i,e[11]=t[14],e[12]=a,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}});var Bie=fe((Lfr,qie)=>{qie.exports=vft;function vft(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],v=t[10],g=t[11],p=t[12],x=t[13],_=t[14],y=t[15],C=r*s-n*o,k=r*l-a*o,S=r*u-i*o,L=n*l-a*s,w=n*u-i*s,A=a*u-i*l,T=c*x-f*p,m=c*_-v*p,F=c*y-g*p,E=f*_-v*x,I=f*y-g*x,R=v*y-g*_,B=C*R-k*I+S*E+L*F-w*m+A*T;return B?(B=1/B,e[0]=(s*R-l*I+u*E)*B,e[1]=(a*I-n*R-i*E)*B,e[2]=(x*A-_*w+y*L)*B,e[3]=(v*w-f*A-g*L)*B,e[4]=(l*F-o*R-u*m)*B,e[5]=(r*R-a*F+i*m)*B,e[6]=(_*S-p*A-y*k)*B,e[7]=(c*A-v*S+g*k)*B,e[8]=(o*I-s*F+u*T)*B,e[9]=(n*F-r*I-i*T)*B,e[10]=(p*w-x*S+y*C)*B,e[11]=(f*S-c*w-g*C)*B,e[12]=(s*m-o*E-l*T)*B,e[13]=(r*E-n*m+a*T)*B,e[14]=(x*k-p*L-_*C)*B,e[15]=(c*L-f*k+v*C)*B,e):null}});var Nie=fe((Pfr,Oie)=>{Oie.exports=pft;function pft(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],v=t[10],g=t[11],p=t[12],x=t[13],_=t[14],y=t[15];return e[0]=s*(v*y-g*_)-f*(l*y-u*_)+x*(l*g-u*v),e[1]=-(n*(v*y-g*_)-f*(a*y-i*_)+x*(a*g-i*v)),e[2]=n*(l*y-u*_)-s*(a*y-i*_)+x*(a*u-i*l),e[3]=-(n*(l*g-u*v)-s*(a*g-i*v)+f*(a*u-i*l)),e[4]=-(o*(v*y-g*_)-c*(l*y-u*_)+p*(l*g-u*v)),e[5]=r*(v*y-g*_)-c*(a*y-i*_)+p*(a*g-i*v),e[6]=-(r*(l*y-u*_)-o*(a*y-i*_)+p*(a*u-i*l)),e[7]=r*(l*g-u*v)-o*(a*g-i*v)+c*(a*u-i*l),e[8]=o*(f*y-g*x)-c*(s*y-u*x)+p*(s*g-u*f),e[9]=-(r*(f*y-g*x)-c*(n*y-i*x)+p*(n*g-i*f)),e[10]=r*(s*y-u*x)-o*(n*y-i*x)+p*(n*u-i*s),e[11]=-(r*(s*g-u*f)-o*(n*g-i*f)+c*(n*u-i*s)),e[12]=-(o*(f*_-v*x)-c*(s*_-l*x)+p*(s*v-l*f)),e[13]=r*(f*_-v*x)-c*(n*_-a*x)+p*(n*v-a*f),e[14]=-(r*(s*_-l*x)-o*(n*_-a*x)+p*(n*l-a*s)),e[15]=r*(s*v-l*f)-o*(n*v-a*f)+c*(n*l-a*s),e}});var Vie=fe((Ffr,Uie)=>{Uie.exports=gft;function gft(e){var t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],v=e[11],g=e[12],p=e[13],x=e[14],_=e[15],y=t*o-r*i,C=t*s-n*i,k=t*l-a*i,S=r*s-n*o,L=r*l-a*o,w=n*l-a*s,A=u*p-c*g,T=u*x-f*g,m=u*_-v*g,F=c*x-f*p,E=c*_-v*p,I=f*_-v*x;return y*I-C*E+k*F+S*m-L*T+w*A}});var Hie=fe((Dfr,Gie)=>{Gie.exports=mft;function mft(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],v=t[9],g=t[10],p=t[11],x=t[12],_=t[13],y=t[14],C=t[15],k=r[0],S=r[1],L=r[2],w=r[3];return e[0]=k*n+S*s+L*f+w*x,e[1]=k*a+S*l+L*v+w*_,e[2]=k*i+S*u+L*g+w*y,e[3]=k*o+S*c+L*p+w*C,k=r[4],S=r[5],L=r[6],w=r[7],e[4]=k*n+S*s+L*f+w*x,e[5]=k*a+S*l+L*v+w*_,e[6]=k*i+S*u+L*g+w*y,e[7]=k*o+S*c+L*p+w*C,k=r[8],S=r[9],L=r[10],w=r[11],e[8]=k*n+S*s+L*f+w*x,e[9]=k*a+S*l+L*v+w*_,e[10]=k*i+S*u+L*g+w*y,e[11]=k*o+S*c+L*p+w*C,k=r[12],S=r[13],L=r[14],w=r[15],e[12]=k*n+S*s+L*f+w*x,e[13]=k*a+S*l+L*v+w*_,e[14]=k*i+S*u+L*g+w*y,e[15]=k*o+S*c+L*p+w*C,e}});var Wie=fe((Rfr,jie)=>{jie.exports=yft;function yft(e,t,r){var n=r[0],a=r[1],i=r[2],o,s,l,u,c,f,v,g,p,x,_,y;return t===e?(e[12]=t[0]*n+t[4]*a+t[8]*i+t[12],e[13]=t[1]*n+t[5]*a+t[9]*i+t[13],e[14]=t[2]*n+t[6]*a+t[10]*i+t[14],e[15]=t[3]*n+t[7]*a+t[11]*i+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],v=t[6],g=t[7],p=t[8],x=t[9],_=t[10],y=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=v,e[7]=g,e[8]=p,e[9]=x,e[10]=_,e[11]=y,e[12]=o*n+c*a+p*i+t[12],e[13]=s*n+f*a+x*i+t[13],e[14]=l*n+v*a+_*i+t[14],e[15]=u*n+g*a+y*i+t[15]),e}});var Xie=fe((Ifr,Yie)=>{Yie.exports=xft;function xft(e,t,r){var n=r[0],a=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var $ie=fe((zfr,Zie)=>{Zie.exports=_ft;function _ft(e,t,r,n){var a=n[0],i=n[1],o=n[2],s=Math.sqrt(a*a+i*i+o*o),l,u,c,f,v,g,p,x,_,y,C,k,S,L,w,A,T,m,F,E,I,R,B,O;return Math.abs(s)<1e-6?null:(s=1/s,a*=s,i*=s,o*=s,l=Math.sin(r),u=Math.cos(r),c=1-u,f=t[0],v=t[1],g=t[2],p=t[3],x=t[4],_=t[5],y=t[6],C=t[7],k=t[8],S=t[9],L=t[10],w=t[11],A=a*a*c+u,T=i*a*c+o*l,m=o*a*c-i*l,F=a*i*c-o*l,E=i*i*c+u,I=o*i*c+a*l,R=a*o*c+i*l,B=i*o*c-a*l,O=o*o*c+u,e[0]=f*A+x*T+k*m,e[1]=v*A+_*T+S*m,e[2]=g*A+y*T+L*m,e[3]=p*A+C*T+w*m,e[4]=f*F+x*E+k*I,e[5]=v*F+_*E+S*I,e[6]=g*F+y*E+L*I,e[7]=p*F+C*E+w*I,e[8]=f*R+x*B+k*O,e[9]=v*R+_*B+S*O,e[10]=g*R+y*B+L*O,e[11]=p*R+C*B+w*O,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var Jie=fe((qfr,Kie)=>{Kie.exports=bft;function bft(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],v=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*a+u*n,e[5]=o*a+c*n,e[6]=s*a+f*n,e[7]=l*a+v*n,e[8]=u*a-i*n,e[9]=c*a-o*n,e[10]=f*a-s*n,e[11]=v*a-l*n,e}});var eae=fe((Bfr,Qie)=>{Qie.exports=wft;function wft(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],v=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a-u*n,e[1]=o*a-c*n,e[2]=s*a-f*n,e[3]=l*a-v*n,e[8]=i*n+u*a,e[9]=o*n+c*a,e[10]=s*n+f*a,e[11]=l*n+v*a,e}});var rae=fe((Ofr,tae)=>{tae.exports=Tft;function Tft(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],v=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a+u*n,e[1]=o*a+c*n,e[2]=s*a+f*n,e[3]=l*a+v*n,e[4]=u*a-i*n,e[5]=c*a-o*n,e[6]=f*a-s*n,e[7]=v*a-l*n,e}});var iae=fe((Nfr,nae)=>{nae.exports=Aft;function Aft(e,t,r){var n,a,i,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,s*=u,l*=u,n=Math.sin(t),a=Math.cos(t),i=1-a,e[0]=o*o*i+a,e[1]=s*o*i+l*n,e[2]=l*o*i-s*n,e[3]=0,e[4]=o*s*i-l*n,e[5]=s*s*i+a,e[6]=l*s*i+o*n,e[7]=0,e[8]=o*l*i+s*n,e[9]=s*l*i-o*n,e[10]=l*l*i+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var oae=fe((Ufr,aae)=>{aae.exports=Mft;function Mft(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=n+n,l=a+a,u=i+i,c=n*s,f=n*l,v=n*u,g=a*l,p=a*u,x=i*u,_=o*s,y=o*l,C=o*u;return e[0]=1-(g+x),e[1]=f+C,e[2]=v-y,e[3]=0,e[4]=f-C,e[5]=1-(c+x),e[6]=p+_,e[7]=0,e[8]=v+y,e[9]=p-_,e[10]=1-(c+g),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var lae=fe((Vfr,sae)=>{sae.exports=Sft;function Sft(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var cae=fe((Gfr,uae)=>{uae.exports=Eft;function Eft(e,t){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]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var hae=fe((Hfr,fae)=>{fae.exports=kft;function kft(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var vae=fe((jfr,dae)=>{dae.exports=Cft;function Cft(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var gae=fe((Wfr,pae)=>{pae.exports=Lft;function Lft(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,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}});var yae=fe((Yfr,mae)=>{mae.exports=Pft;function Pft(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r+r,s=n+n,l=a+a,u=r*o,c=n*o,f=n*s,v=a*o,g=a*s,p=a*l,x=i*o,_=i*s,y=i*l;return e[0]=1-f-p,e[1]=c+y,e[2]=v-_,e[3]=0,e[4]=c-y,e[5]=1-u-p,e[6]=g+x,e[7]=0,e[8]=v+_,e[9]=g-x,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var _ae=fe((Xfr,xae)=>{xae.exports=Fft;function Fft(e,t,r,n,a,i,o){var s=1/(r-t),l=1/(a-n),u=1/(i-o);return e[0]=i*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(a+n)*l,e[10]=(o+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*u,e[15]=0,e}});var wae=fe((Zfr,bae)=>{bae.exports=Dft;function Dft(e,t,r,n,a){var i=1/Math.tan(t/2),o=1/(n-a);return e[0]=i/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*n*o,e[15]=0,e}});var Aae=fe(($fr,Tae)=>{Tae.exports=Rft;function Rft(e,t,r,n){var a=Math.tan(t.upDegrees*Math.PI/180),i=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(a+i);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(a-i)*u*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}});var Sae=fe((Kfr,Mae)=>{Mae.exports=Ift;function Ift(e,t,r,n,a,i,o){var s=1/(t-r),l=1/(n-a),u=1/(i-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(a+n)*l,e[14]=(o+i)*u,e[15]=1,e}});var kae=fe((Jfr,Eae)=>{var zft=Pq();Eae.exports=qft;function qft(e,t,r,n){var a,i,o,s,l,u,c,f,v,g,p=t[0],x=t[1],_=t[2],y=n[0],C=n[1],k=n[2],S=r[0],L=r[1],w=r[2];return Math.abs(p-S)<1e-6&&Math.abs(x-L)<1e-6&&Math.abs(_-w)<1e-6?zft(e):(c=p-S,f=x-L,v=_-w,g=1/Math.sqrt(c*c+f*f+v*v),c*=g,f*=g,v*=g,a=C*v-k*f,i=k*c-y*v,o=y*f-C*c,g=Math.sqrt(a*a+i*i+o*o),g?(g=1/g,a*=g,i*=g,o*=g):(a=0,i=0,o=0),s=f*o-v*i,l=v*a-c*o,u=c*i-f*a,g=Math.sqrt(s*s+l*l+u*u),g?(g=1/g,s*=g,l*=g,u*=g):(s=0,l=0,u=0),e[0]=a,e[1]=s,e[2]=c,e[3]=0,e[4]=i,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=u,e[10]=v,e[11]=0,e[12]=-(a*p+i*x+o*_),e[13]=-(s*p+l*x+u*_),e[14]=-(c*p+f*x+v*_),e[15]=1,e)}});var Lae=fe((Qfr,Cae)=>{Cae.exports=Bft;function Bft(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}});var Fq=fe((ehr,Pae)=>{Pae.exports={create:Cie(),clone:Pie(),copy:Die(),identity:Pq(),transpose:zie(),invert:Bie(),adjoint:Nie(),determinant:Vie(),multiply:Hie(),translate:Wie(),scale:Xie(),rotate:$ie(),rotateX:Jie(),rotateY:eae(),rotateZ:rae(),fromRotation:iae(),fromRotationTranslation:oae(),fromScaling:lae(),fromTranslation:cae(),fromXRotation:hae(),fromYRotation:vae(),fromZRotation:gae(),fromQuat:yae(),frustum:_ae(),perspective:wae(),perspectiveFromFieldOfView:Aae(),ortho:Sae(),lookAt:kae(),str:Lae()}});var FE=fe(Lu=>{"use strict";var Oft=Fq();Lu.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{"use strict";var Nft=xi(),Fae=W1(),Uft=FE(),Vft=Fq();function Gft(e){var t;if(typeof e=="string"){if(t=document.getElementById(e),t===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function Hft(e){var t=Nft.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function Dae(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function jft(e,t){Rae("global",e,t)}function Rae(e,t,r){var n="plotly.js-style-"+e,a=document.getElementById(n);if(!(a&&a.matches(".no-inline-styles"))){a||(a=document.createElement("style"),a.setAttribute("id",n),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var i=a.sheet;i?i.insertRule?i.insertRule(t+"{"+r+"}",0):i.addRule?i.addRule(t,r,0):Fae.warn("addStyleRule failed"):Fae.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function Wft(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&Dae(r)}function Yft(e,t,r,n,a,i){var o=n.split(":"),s=a.split(":"),l="data-btn-style-event-added";i||(i=document),i.querySelectorAll(e).forEach(function(u){u.getAttribute(l)||(u.addEventListener("mouseenter",function(){var c=this.querySelector(r);c&&(c.style[o[0]]=o[1])}),u.addEventListener("mouseleave",function(){var c=this.querySelector(r);c&&(t&&this.matches(t)?c.style[o[0]]=o[1]:c.style[s[0]]=s[1])}),u.setAttribute(l,!0))})}function Xft(e){var t=zae(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(n){var a=Iae(n);if(a){var i=Uft.convertCssMatrix(a);r=Vft.multiply(r,r,i)}}),r}function Iae(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(n){return+n})}function zae(e){for(var t=[];Zft(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function Zft(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function $ft(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}qae.exports={getGraphDiv:Gft,isPlotDiv:Hft,removeElement:Dae,addStyleRule:jft,addRelatedStyleRule:Rae,deleteRelatedStyleRule:Wft,setStyleOnHover:Yft,getFullTransformMatrix:Xft,getElementTransformMatrix:Iae,getElementAndAncestors:zae,equalDomRects:$ft}});var Z4=fe((nhr,Bae)=>{"use strict";Bae.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}});var rl=fe((ihr,jae)=>{"use strict";var Nae=ta().extendFlat,Kft=em(),Uae={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},Vae={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},Jft=Uae.flags.slice().concat(["fullReplot"]),Qft=Vae.flags.slice().concat("layoutReplot");jae.exports={traces:Uae,layout:Vae,traceFlags:function(){return Oae(Jft)},layoutFlags:function(){return Oae(Qft)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var n=r.split("+"),a=0;a{"use strict";Dq.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};Dq.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}});var Rq=fe((ohr,Wae)=>{"use strict";Wae.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}});var Oo=fe(Mb=>{"use strict";var{DATE_FORMAT_LINK:eht,FORMAT_LINK:tht}=Rq(),rht=["Variables that can't be found will be replaced with the specifier.",'For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.',"Variables with an undefined value will be replaced with the fallback value."].join(" ");function nht({supportOther:e}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,tht,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,eht,"for details on the date formatting syntax.",rht].join(" ")}Mb.templateFormatStringDescription=nht;Mb.hovertemplateAttrs=({editType:e="none",arrayOk:t}={},r={})=>zo({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});Mb.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>zo({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});Mb.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e});Mb.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})});var IE=fe((uhr,Jae)=>{"use strict";function sm(e,t){return t?t.d2l(e):e}function Yae(e,t){return t?t.l2d(e):e}function iht(e){return e.x0}function aht(e){return e.x1}function oht(e){return e.y0}function sht(e){return e.y1}function Xae(e){return e.x0shift||0}function Zae(e){return e.x1shift||0}function $ae(e){return e.y0shift||0}function Kae(e){return e.y1shift||0}function DE(e,t){return sm(e.x1,t)+Zae(e)-sm(e.x0,t)-Xae(e)}function RE(e,t,r){return sm(e.y1,r)+Kae(e)-sm(e.y0,r)-$ae(e)}function lht(e,t){return Math.abs(DE(e,t))}function uht(e,t,r){return Math.abs(RE(e,t,r))}function cht(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(DE(e,t),2)+Math.pow(RE(e,t,r),2))}function fht(e,t){return Yae((sm(e.x1,t)+Zae(e)+sm(e.x0,t)+Xae(e))/2,t)}function hht(e,t,r){return Yae((sm(e.y1,r)+Kae(e)+sm(e.y0,r)+$ae(e))/2,r)}function dht(e,t,r){return e.type!=="line"?void 0:RE(e,t,r)/DE(e,t)}var vht=["x0","x1","y0","y1","dy","height","ycenter"],pht=["x0","x1","y0","y1","dx","width","xcenter"];Jae.exports={x0:iht,x1:aht,y0:oht,y1:sht,slope:dht,dx:DE,dy:RE,width:lht,height:uht,length:cht,xcenter:fht,ycenter:hht,simpleXVariables:vht,simpleYVariables:pht}});var toe=fe((chr,eoe)=>{"use strict";var ght=rl().overrideAll,xx=Ho(),Qae=Ds(),mht=Uc().dash,lm=ta().extendFlat,{shapeTexttemplateAttrs:yht,templatefallbackAttrs:xht}=Oo(),_ht=IE();eoe.exports=ght({newshape:{visible:lm({},xx.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:lm({},xx.legend,{}),legendgroup:lm({},xx.legendgroup,{}),legendgrouptitle:{text:lm({},xx.legendgrouptitle.text,{}),font:Qae({})},legendrank:lm({},xx.legendrank,{}),legendwidth:lm({},xx.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:lm({},mht,{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:lm({},xx.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:yht({newshape:!0},{keys:Object.keys(_ht)}),texttemplatefallback:xht({editType:"arraydraw"}),font:Qae({}),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")});var noe=fe((fhr,roe)=>{"use strict";var bht=Uc().dash,wht=ta().extendFlat;roe.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:wht({},bht,{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"}}});var zE=fe((hhr,ioe)=>{"use strict";ioe.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}});var Sb=fe((dhr,loe)=>{"use strict";var Iq=Ds(),Tht=Z4(),qE=tc(),aoe=toe(),ooe=noe(),Aht=zE(),soe=ta().extendFlat,BE=Iq({editType:"calc"});BE.family.dflt='"Open Sans", verdana, arial, sans-serif';BE.size.dflt=12;BE.color.dflt=qE.defaultLine;loe.exports={font:BE,title:{text:{valType:"string",editType:"layoutstyle"},font:Iq({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:Iq({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:soe(Aht({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:qE.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:qE.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:qE.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:aoe.newshape,activeshape:aoe.activeshape,newselection:ooe.newselection,activeselection:ooe.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:soe({},Tht.transition,{editType:"none"})}});var uoe=fe(()=>{(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var e=document.createElement("style");e.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",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{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(e)}})()});var bi=fe(co=>{"use strict";var zq=W1(),coe=PE(),foe=Lq(),ghr=X4().addStyleRule,hoe=ta(),Mht=Ho(),Sht=Sb(),Eht=hoe.extendFlat,qq=hoe.extendDeepAll;co.modules={};co.allCategories={};co.allTypes=[];co.subplotsRegistry={};co.componentsRegistry={};co.layoutArrayContainers=[];co.layoutArrayRegexes=[];co.traceLayoutAttributes={};co.localeRegistry={};co.apiMethodRegistry={};co.collectableSubplotTypes=null;co.register=function(t){if(co.collectableSubplotTypes=null,t)t&&!Array.isArray(t)&&(t=[t]);else throw new Error("No argument passed to Plotly.register.");for(var r=0;r{"use strict";var Fht=lb().timeFormat,Toe=aa(),Bq=W1(),cm=(fb(),Gs(cb)).mod,Cb=Wa(),K0=Cb.BADNUM,Jd=Cb.ONEDAY,$4=Cb.ONEHOUR,um=Cb.ONEMIN,kb=Cb.ONESEC,K4=Cb.EPOCHJD,X1=bi(),moe=lb().utcFormat,Dht=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,Rht=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,yoe=new Date().getFullYear()-70;function Z1(e){return e&&X1.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Pu.dateTick0=function(e,t){var r=Iht(e,!!t);if(t<2)return r;var n=Pu.dateTime2ms(r,e);return n+=Jd*(t-1),Pu.ms2DateTime(n,0,e)};function Iht(e,t){return Z1(e)?t?X1.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:X1.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}Pu.dfltRange=function(e){return Z1(e)?X1.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Pu.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var NE,UE;Pu.dateTime2ms=function(e,t){if(Pu.isJSDate(e)){var r=e.getTimezoneOffset()*um,n=(e.getUTCMinutes()-e.getMinutes())*um+(e.getUTCSeconds()-e.getSeconds())*kb+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var a=3*um;r=r-a/2+cm(n-r+a/2,a)}return e=Number(e)-r,e>=NE&&e<=UE?e:K0}if(typeof e!="string"&&typeof e!="number")return K0;e=String(e);var i=Z1(t),o=e.charAt(0);i&&(o==="G"||o==="g")&&(e=e.slice(1),t="");var s=i&&t.slice(0,7)==="chinese",l=e.match(s?Rht:Dht);if(!l)return K0;var u=l[1],c=l[3]||"1",f=Number(l[5]||1),v=Number(l[7]||0),g=Number(l[9]||0),p=Number(l[11]||0);if(i){if(u.length===2)return K0;u=Number(u);var x;try{var _=X1.getComponentMethod("calendars","getCal")(t);if(s){var y=c.charAt(c.length-1)==="i";c=parseInt(c,10),x=_.newDate(u,_.toMonthIndex(u,c,y),f)}else x=_.newDate(u,Number(c),f)}catch(k){return K0}return x?(x.toJD()-K4)*Jd+v*$4+g*um+p*kb:K0}u.length===2?u=(Number(u)+2e3-yoe)%100+yoe:u=Number(u),c-=1;var C=new Date(Date.UTC(2e3,c,f,v,g));return C.setUTCFullYear(u),C.getUTCMonth()!==c||C.getUTCDate()!==f?K0:C.getTime()+p*kb};NE=Pu.MIN_MS=Pu.dateTime2ms("-9999");UE=Pu.MAX_MS=Pu.dateTime2ms("9999-12-31 23:59:59.9999");Pu.isDateTime=function(e,t){return Pu.dateTime2ms(e,t)!==K0};function Eb(e,t){return String(e+Math.pow(10,t)).slice(1)}var OE=90*Jd,xoe=3*$4,_oe=5*um;Pu.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=NE&&e<=UE))return K0;t||(t=0);var n=Math.floor(cm(e+.05,1)*10),a=Math.round(e-n/10),i,o,s,l,u,c;if(Z1(r)){var f=Math.floor(a/Jd)+K4,v=Math.floor(cm(e,Jd));try{i=X1.getComponentMethod("calendars","getCal")(r).fromJD(f).formatDate("yyyy-mm-dd")}catch(g){i=moe("G%Y-%m-%d")(new Date(a))}if(i.charAt(0)==="-")for(;i.length<11;)i="-0"+i.slice(1);else for(;i.length<10;)i="0"+i;o=t=NE+Jd&&e<=UE-Jd))return K0;var t=Math.floor(cm(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=Fht("%Y-%m-%d")(r),a=r.getHours(),i=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return Aoe(n,a,i,o,s)};function Aoe(e,t,r,n,a){if((t||r||n||a)&&(e+=" "+Eb(t,2)+":"+Eb(r,2),(n||a)&&(e+=":"+Eb(n,2),a))){for(var i=4;a%10===0;)i-=1,a/=10;e+="."+Eb(a,i)}return e}Pu.cleanDate=function(e,t,r){if(e===K0)return t;if(Pu.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Z1(r))return Bq.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=Pu.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!Pu.isDateTime(e,r))return Bq.error("unrecognized date",e),t;return e};var zht=/%\d?f/g,qht=/%h/g,Bht={1:"1",2:"1",3:"2",4:"2"};function boe(e,t,r,n){e=e.replace(zht,function(i){var o=Math.min(+i.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).slice(2).replace(/0+$/,"")||"0";return s});var a=new Date(Math.floor(t+.05));if(e=e.replace(qht,function(){return Bht[r("%q")(a)]}),Z1(n))try{e=X1.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(i){return"Invalid"}return r(e)(a)}var Oht=[59,59.9,59.99,59.999,59.9999];function Nht(e,t){var r=cm(e+.05,Jd),n=Eb(Math.floor(r/$4),2)+":"+Eb(cm(Math.floor(r/um),60),2);if(t!=="M"){Toe(t)||(t=0);var a=Math.min(cm(e/kb,60),Oht[t]),i=(100+a).toFixed(t).slice(1);t>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}Pu.formatDate=function(e,t,r,n,a,i){if(a=Z1(a)&&a,!t)if(r==="y")t=i.year;else if(r==="m")t=i.month;else if(r==="d")t=i.dayMonth+` -`+i.year;else return Nht(e,r)+` -`+boe(i.dayMonthYear,e,n,a);return boe(t,e,n,a)};var woe=3*Jd;Pu.incrementMonth=function(e,t,r){r=Z1(r)&&r;var n=cm(e,Jd);if(e=Math.round(e-n),r)try{var a=Math.round(e/Jd)+K4,i=X1.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return t%12?i.add(o,t,"m"):i.add(o,t/12,"y"),(o.toJD()-K4)*Jd+n}catch(l){Bq.error("invalid ms "+e+" in calendar "+r)}var s=new Date(e+woe);return s.setUTCMonth(s.getUTCMonth()+t)+n-woe};Pu.findExactDates=function(e,t){for(var r=0,n=0,a=0,i=0,o,s,l=Z1(t)&&X1.getComponentMethod("calendars","getCal")(t),u=0;u{"use strict";Soe.exports=function(t){return t}});var VE=fe($1=>{"use strict";var Uht=aa(),Vht=W1(),Ght=J4(),Hht=Wa().BADNUM,Oq=1e-9;$1.findBin=function(e,t,r){if(Uht(t.start))return r?Math.ceil((e-t.start)/t.size-Oq)-1:Math.floor((e-t.start)/t.size+Oq);var n=0,a=t.length,i=0,o=a>1?(t[a-1]-t[0])/(a-1):1,s,l;for(o>=0?l=r?jht:Wht:l=r?Xht:Yht,e+=o*Oq*(r?-1:1)*(o>=0?1:-1);n90&&Vht.log("Long binary search..."),n-1};function jht(e,t){return et}function Xht(e,t){return e>=t}$1.sorterAsc=function(e,t){return e-t};$1.sorterDes=function(e,t){return t-e};$1.distinctVals=function(e){var t=e.slice();t.sort($1.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===Hht;r--);for(var n=t[r]-t[0]||1,a=n/(r||1)/1e4,i=[],o,s=0;s<=r;s++){var l=t[s],u=l-o;o===void 0?(i.push(l),o=l):u>a&&(n=Math.min(n,u),i.push(l),o=l)}return{vals:i,minDiff:n}};$1.roundUp=function(e,t,r){for(var n=0,a=t.length-1,i,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;n0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()};$1.findIndexOfMin=function(e,t){t=t||Ght;for(var r=1/0,n,a=0;a$ht});function Zht(e){return Object.keys(e).sort()}var $ht,bx=Co(()=>{"use strict";$ht=Zht});var Eoe=fe(Fu=>{"use strict";var Q4=aa(),Kht=Gf().isArrayOrTypedArray;Fu.aggNums=function(e,t,r,n){var a,i;if((!n||n>r.length)&&(n=r.length),Q4(t)||(t=!1),Kht(r[0])){for(i=new Array(n),a=0;ae.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var Foe=fe((whr,Poe)=>{"use strict";var koe=(fb(),Gs(cb)),Nq=koe.mod,Jht=koe.modHalf,eT=Math.PI,fm=2*eT;function Qht(e){return e/180*eT}function edt(e){return e/eT*180}function Uq(e){return Math.abs(e[1]-e[0])>fm-1e-14}function Coe(e,t){return Jht(t-e,fm)}function tdt(e,t){return Math.abs(Coe(e,t))}function Loe(e,t){if(Uq(t))return!0;var r,n;t[0]n&&(n+=fm);var a=Nq(e,fm),i=a+fm;return a>=r&&a<=n||i>=r&&i<=n}function rdt(e,t,r,n){if(!Loe(t,n))return!1;var a,i;return r[0]=a&&e<=i}function Vq(e,t,r,n,a,i,o){a=a||0,i=i||0;var s=Uq([r,n]),l,u,c,f,v;s?(l=0,u=eT,c=fm):r{"use strict";wx.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};wx.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};wx.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};wx.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};wx.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};wx.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var zoe=fe(Tx=>{"use strict";var Gq=(fb(),Gs(cb)).mod;Tx.segmentsIntersect=Ioe;function Ioe(e,t,r,n,a,i,o,s){var l=r-e,u=a-e,c=o-a,f=n-t,v=i-t,g=s-i,p=l*g-c*f;if(p===0)return null;var x=(u*g-c*v)/p,_=(u*f-l*v)/p;return _<0||_>1||x<0||x>1?null:{x:e+l*x,y:t+f*x}}Tx.segmentDistance=function(t,r,n,a,i,o,s,l){if(Ioe(t,r,n,a,i,o,s,l))return 0;var u=n-t,c=a-r,f=s-i,v=l-o,g=u*u+c*c,p=f*f+v*v,x=Math.min(GE(u,c,g,i-t,o-r),GE(u,c,g,s-t,l-r),GE(f,v,p,t-i,r-o),GE(f,v,p,n-i,a-o));return Math.sqrt(x)};function GE(e,t,r,n,a){var i=n*e+a*t;if(i<0)return n*n+a*a;if(i>r){var o=n-e,s=a-t;return o*o+s*s}else{var l=n*t-a*e;return l*l/r}}var HE,Hq,Roe;Tx.getTextLocation=function(t,r,n,a){if((t!==Hq||a!==Roe)&&(HE={},Hq=t,Roe=a),HE[n])return HE[n];var i=t.getPointAtLength(Gq(n-a/2,r)),o=t.getPointAtLength(Gq(n+a/2,r)),s=Math.atan((o.y-i.y)/(o.x-i.x)),l=t.getPointAtLength(Gq(n,r)),u=(l.x*4+i.x+o.x)/6,c=(l.y*4+i.y+o.y)/6,f={x:u,y:c,theta:s};return HE[n]=f,f};Tx.clearLocationCache=function(){Hq=null};Tx.getVisibleSegment=function(t,r,n){var a=r.left,i=r.right,o=r.top,s=r.bottom,l=0,u=t.getTotalLength(),c=u,f,v;function g(x){var _=t.getPointAtLength(x);x===0?f=_:x===u&&(v=_);var y=_.xi?_.x-i:0,C=_.ys?_.y-s:0;return Math.sqrt(y*y+C*C)}for(var p=g(l);p;){if(l+=p+n,l>c)return;p=g(l)}for(p=g(c);p;){if(c-=p+n,l>c)return;p=g(c)}return{min:l,max:c,len:c-l,total:u,isClosed:l===0&&c===u&&Math.abs(f.x-v.x)<.1&&Math.abs(f.y-v.y)<.1}};Tx.findPointOnPath=function(t,r,n,a){a=a||{};for(var i=a.pathLength||t.getTotalLength(),o=a.tolerance||.001,s=a.iterationLimit||30,l=t.getPointAtLength(0)[n]>t.getPointAtLength(i)[n]?-1:1,u=0,c=0,f=i,v,g,p;u0?f=v:c=v,u++}return g}});var jE=fe(tT=>{"use strict";var K1={};tT.throttle=function(t,r,n){var a=K1[t],i=Date.now();if(!a){for(var o in K1)K1[o].tsa.ts+r){s();return}a.timer=setTimeout(function(){s(),a.timer=null},r)};tT.done=function(e){var t=K1[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};tT.clear=function(e){if(e)qoe(K1[e]),delete K1[e];else for(var t in K1)tT.clear(t)};function qoe(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var Ooe=fe((Shr,Boe)=>{"use strict";Boe.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var Noe=fe((Ehr,WE)=>{"use strict";WE.exports=jq;WE.exports.isMobile=jq;WE.exports.default=jq;var odt=/(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,sdt=/CrOS/,ldt=/android|ipad|playbook|silk/i;function jq(e){e||(e={});let t=e.ua;if(!t&&typeof navigator!="undefined"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let r=odt.test(t)&&!sdt.test(t)||!!e.tablet&&ldt.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var Voe=fe((khr,Uoe)=>{"use strict";var udt=aa(),cdt=Noe();Uoe.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=fdt(),typeof r!="string")return!0;var n=cdt({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!n)for(var a=r.split(" "),i=1;i-1;s--){var l=a[s];if(l.slice(0,8)==="Version/"){var u=l.slice(8).split(".")[0];if(udt(u)&&(u=+u),u>=13)return!0}}}return n};function fdt(){var e;return typeof navigator!="undefined"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),e}});var Hoe=fe((Chr,Goe)=>{"use strict";var hdt=xi();Goe.exports=function(t,r,n){var a=t.selectAll("g."+n.replace(/\s/g,".")).data(r,function(o){return o[0].trace.uid});a.exit().remove(),a.enter().append("g").attr("class",n),a.order();var i=t.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each(function(o){o[0][i]=hdt.select(this)}),a}});var Woe=fe((Lhr,joe)=>{"use strict";var ddt=bi();joe.exports=function(t,r){for(var n=t._context.locale,a=0;a<2;a++){for(var i=t._context.locales,o=0;o<2;o++){var s=(i[n]||{}).dictionary;if(s){var l=s[r];if(l)return l}i=ddt.localeRegistry}var u=n.split("-")[0];if(u===n)break;n=u}return r}});var Wq=fe((Phr,Yoe)=>{"use strict";Yoe.exports=function(t){for(var r={},n=[],a=0,i=0;i{"use strict";Xoe.exports=function(t){for(var r=gdt(t)?pdt:vdt,n=[],a=0;a{"use strict";$oe.exports=function(t,r){if(!r)return t;var n=1/Math.abs(r),a=n>1?(n*t+n*r)/n:t+r,i=String(a).length;if(i>16){var o=String(r).length,s=String(t).length;if(i>=s+o){var l=parseFloat(a).toPrecision(12);l.indexOf("e+")===-1&&(a=+l)}}return a}});var ese={};zp(ese,{default:()=>xdt});function ydt(e){return typeof e=="string"&&(e=e.replace(mdt,"")),(0,Joe.default)(e)?Number(e):Qoe.BADNUM}var Joe,Qoe,mdt,xdt,tse=Co(()=>{"use strict";Joe=$0(aa()),Qoe=$0(Wa()),mdt=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;xdt=ydt});var ise=fe((Rhr,nse)=>{"use strict";var _dt=/<[^>]*>/g,bdt=/[\p{S}\p{P}]/gu,wdt=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,Tdt=/�/g,Adt=/\s+/g,YE="-",rse=YE.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Mdt=new RegExp(rse+"{3,}","g"),Sdt=new RegExp(rse+"$","g"),Edt=60;function kdt(e){return typeof e.toWellFormed=="function"?e.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(e))}nse.exports=function(t,r=Edt){var n=kdt(t!=null?t:"").replace(Tdt,"").replace(_dt," ").replace(bdt,a=>a===YE?a:"").toLowerCase().trim().replace(Adt,YE).replace(wdt,"").replace(Mdt,YE);return n.length<=r?n:Array.from(n).slice(0,r).join("").replace(Sdt,"")}});var Xt=fe((Ihr,gse)=>{"use strict";var rT=xi(),Cdt=lb().utcFormat,Ldt=jI().format,cse=aa(),fse=Wa(),hse=fse.FP_SAFE,Pdt=-hse,ase=fse.BADNUM,Ir=gse.exports={};Ir.adjustFormat=function(t){if(!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t))return t;if(t==="0.f")return"~f";if(/^\d%/.test(t))return"~%";if(/^\ds/.test(t))return"~s";var r=(t.match(/^[+\-( ]?/)||[""])[0],n=t.slice(r.length);return!/^[~,.0$#]/.test(n)&&/[&fps]/.test(n)?r+"~"+n:t};var ose={};Ir.warnBadFormat=function(e){var t=String(e);ose[t]||(ose[t]=1,Ir.warn('encountered bad format: "'+t+'"'))};Ir.noFormat=function(e){return String(e)};Ir.numberFormat=function(e){var t;try{t=Ldt(Ir.adjustFormat(e))}catch(r){return Ir.warnBadFormat(e),Ir.noFormat}return t};Ir.nestedProperty=M4();Ir.keyedContainer=Jte();Ir.relativeAttr=ere();Ir.isPlainObject=em();Ir.toLogRange=rE();Ir.relinkPrivateKeys=ire();var hm=Gf();Ir.isArrayBuffer=hm.isArrayBuffer;Ir.isTypedArray=hm.isTypedArray;Ir.isArrayOrTypedArray=hm.isArrayOrTypedArray;Ir.isArray1D=hm.isArray1D;Ir.ensureArray=hm.ensureArray;Ir.concat=hm.concat;Ir.maxRowLength=hm.maxRowLength;Ir.minRowLength=hm.minRowLength;var dse=(fb(),Gs(cb));Ir.mod=dse.mod;Ir.modHalf=dse.modHalf;var dm=Mie();Ir.valObjectMeta=dm.valObjectMeta;Ir.coerce=dm.coerce;Ir.coerce2=dm.coerce2;Ir.coerceFont=dm.coerceFont;Ir.coercePattern=dm.coercePattern;Ir.coerceHoverinfo=dm.coerceHoverinfo;Ir.coerceSelectionMarkerOpacity=dm.coerceSelectionMarkerOpacity;Ir.validate=dm.validate;var T0=Moe();Ir.dateTime2ms=T0.dateTime2ms;Ir.isDateTime=T0.isDateTime;Ir.ms2DateTime=T0.ms2DateTime;Ir.ms2DateTimeLocal=T0.ms2DateTimeLocal;Ir.cleanDate=T0.cleanDate;Ir.isJSDate=T0.isJSDate;Ir.formatDate=T0.formatDate;Ir.incrementMonth=T0.incrementMonth;Ir.dateTick0=T0.dateTick0;Ir.dfltRange=T0.dfltRange;Ir.findExactDates=T0.findExactDates;Ir.MIN_MS=T0.MIN_MS;Ir.MAX_MS=T0.MAX_MS;var Ax=VE();Ir.findBin=Ax.findBin;Ir.sorterAsc=Ax.sorterAsc;Ir.sorterDes=Ax.sorterDes;Ir.distinctVals=Ax.distinctVals;Ir.roundUp=Ax.roundUp;Ir.sort=Ax.sort;Ir.findIndexOfMin=Ax.findIndexOfMin;Ir.sortObjectKeys=(bx(),Gs(_x)).default;var J1=Eoe();Ir.aggNums=J1.aggNums;Ir.len=J1.len;Ir.mean=J1.mean;Ir.geometricMean=J1.geometricMean;Ir.median=J1.median;Ir.midRange=J1.midRange;Ir.variance=J1.variance;Ir.stdev=J1.stdev;Ir.interp=J1.interp;var Jv=FE();Ir.init2dArray=Jv.init2dArray;Ir.transposeRagged=Jv.transposeRagged;Ir.dot=Jv.dot;Ir.translationMatrix=Jv.translationMatrix;Ir.rotationMatrix=Jv.rotationMatrix;Ir.rotationXYMatrix=Jv.rotationXYMatrix;Ir.apply3DTransform=Jv.apply3DTransform;Ir.apply2DTransform=Jv.apply2DTransform;Ir.apply2DTransform2=Jv.apply2DTransform2;Ir.convertCssMatrix=Jv.convertCssMatrix;Ir.inverseTransformMatrix=Jv.inverseTransformMatrix;var Np=Foe();Ir.deg2rad=Np.deg2rad;Ir.rad2deg=Np.rad2deg;Ir.angleDelta=Np.angleDelta;Ir.angleDist=Np.angleDist;Ir.isFullCircle=Np.isFullCircle;Ir.isAngleInsideSector=Np.isAngleInsideSector;Ir.isPtInsideSector=Np.isPtInsideSector;Ir.pathArc=Np.pathArc;Ir.pathSector=Np.pathSector;Ir.pathAnnulus=Np.pathAnnulus;var Pb=Doe();Ir.isLeftAnchor=Pb.isLeftAnchor;Ir.isCenterAnchor=Pb.isCenterAnchor;Ir.isRightAnchor=Pb.isRightAnchor;Ir.isTopAnchor=Pb.isTopAnchor;Ir.isMiddleAnchor=Pb.isMiddleAnchor;Ir.isBottomAnchor=Pb.isBottomAnchor;var Fb=zoe();Ir.segmentsIntersect=Fb.segmentsIntersect;Ir.segmentDistance=Fb.segmentDistance;Ir.getTextLocation=Fb.getTextLocation;Ir.clearLocationCache=Fb.clearLocationCache;Ir.getVisibleSegment=Fb.getVisibleSegment;Ir.findPointOnPath=Fb.findPointOnPath;var $E=ta();Ir.extendFlat=$E.extendFlat;Ir.extendDeep=$E.extendDeep;Ir.extendDeepAll=$E.extendDeepAll;Ir.extendDeepNoArrays=$E.extendDeepNoArrays;var Yq=W1();Ir.log=Yq.log;Ir.warn=Yq.warn;Ir.error=Yq.error;var Fdt=(Tb(),Gs(wb));Ir.counterRegex=Fdt.counter;var Xq=jE();Ir.throttle=Xq.throttle;Ir.throttleDone=Xq.done;Ir.clearThrottle=Xq.clear;var Qv=X4();Ir.getGraphDiv=Qv.getGraphDiv;Ir.isPlotDiv=Qv.isPlotDiv;Ir.removeElement=Qv.removeElement;Ir.addStyleRule=Qv.addStyleRule;Ir.addRelatedStyleRule=Qv.addRelatedStyleRule;Ir.deleteRelatedStyleRule=Qv.deleteRelatedStyleRule;Ir.setStyleOnHover=Qv.setStyleOnHover;Ir.getFullTransformMatrix=Qv.getFullTransformMatrix;Ir.getElementTransformMatrix=Qv.getElementTransformMatrix;Ir.getElementAndAncestors=Qv.getElementAndAncestors;Ir.equalDomRects=Qv.equalDomRects;Ir.clearResponsive=Ooe();Ir.preserveDrawingBuffer=Voe();Ir.makeTraceGroups=Hoe();Ir._=Woe();Ir.notifier=bq();Ir.filterUnique=Wq();Ir.filterVisible=Zoe();Ir.pushUnique=Lq();Ir.increment=Koe();Ir.cleanNumber=(tse(),Gs(ese)).default;Ir.slugify=ise();Ir.ensureNumber=function(t){return cse(t)?(t=Number(t),t>hse||t=t?!1:cse(e)&&e>=0&&e%1===0};Ir.noop=PE();Ir.identity=J4();Ir.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};Ir.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r};Ir.simpleMap=function(e,t,r,n,a){for(var i=e.length,o=new Array(i),s=0;s=Math.pow(2,r)?a>10?(Ir.warn("randstr failed uniqueness"),o):e(t,r,n,(a||0)+1):o};Ir.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)},r["_"+t]=e,r};Ir.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,n=2*r,a=2*t-1,i=new Array(a),o=new Array(r),s,l,u,c;for(s=0;s=n&&(u-=n*Math.floor(u/n)),u<0?u=-1-u:u>=r&&(u=n-1-u),c+=e[u]*i[l];o[s]=c}return o};Ir.syncOrAsync=function(e,t,r){var n,a;function i(){return Ir.syncOrAsync(e,t,r)}for(;e.length;)if(a=e.splice(0,1)[0],n=a(t),n&&n.then)return n.then(i);return r&&r(t)};Ir.stripTrailingSlash=function(e){return e.slice(-1)==="/"?e.slice(0,-1):e};Ir.noneOrAll=function(e,t,r){if(e){var n=!1,a=!0,i,o;for(i=0;i0?a:0})};Ir.fillArray=function(e,t,r,n){if(n=n||Ir.identity,Ir.isArrayOrTypedArray(e))for(var a=0;aIdt.test(window.navigator.userAgent);var zdt=/Firefox\/(\d+)\.\d+/;Ir.getFirefoxVersion=function(){var e=zdt.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null};Ir.isD3Selection=function(e){return e instanceof rT.selection};Ir.ensureSingle=function(e,t,r,n){var a=e.select(t+(r?"."+r:""));if(a.size())return a;var i=e.append(t);return r&&i.classed(r,!0),n&&i.call(n),i};Ir.ensureSingleById=function(e,t,r,n){var a=e.select(t+"#"+r);if(a.size())return a;var i=e.append(t).attr("id",r);return n&&i.call(n),i};Ir.objectFromPath=function(e,t){for(var r=e.split("."),n,a=n={},i=0;i1?a+o[1]:"";if(i&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+i+"$2");return s+l};Ir.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var pse=/^\w*$/;Ir.templateString=function(e,t){var r={};return e.replace(Ir.TEMPLATE_STRING_REGEX,function(n,a){var i;return pse.test(a)?i=t[a]:(r[a]=r[a]||Ir.nestedProperty(t,a).get,i=r[a](!0)),i!==void 0?i:""})};var Odt={max:10,count:0,name:"hovertemplate"};Ir.hovertemplateString=e=>Zq(tl(zo({},e),{opts:Odt}));var Ndt={max:10,count:0,name:"texttemplate"};Ir.texttemplateString=e=>Zq(tl(zo({},e),{opts:Ndt}));var Udt=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Vdt(e){var t=e.match(Udt);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var Gdt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};Ir.texttemplateStringForShapes=e=>Zq(tl(zo({},e),{opts:Gdt}));var sse=/^[:|\|]/;function Zq({data:e=[],locale:t,fallback:r,labels:n={},opts:a,template:i}){return i.replace(Ir.TEMPLATE_STRING_REGEX,(o,s,l)=>{let u=["xother","yother"].includes(s),c=["_xother","_yother"].includes(s),f=["_xother_","_yother_"].includes(s),v=["xother_","yother_"].includes(s),g=u||c||v||f;(c||f)&&(s=s.substring(1)),(v||f)&&(s=s.substring(0,s.length-1));let p=null,x=null;if(a.parseMultDiv){var _=Vdt(s);s=_.key,p=_.op,x=_.number}let y;if(g){if(n[s]===void 0)return"";y=n[s]}else for(let L of e)if(L){if(L.hasOwnProperty(s)){y=L[s];break}if(pse.test(s)||(y=Ir.nestedProperty(L,s).get(!0)),y!==void 0)break}if(y===void 0){let{count:L,max:w,name:A}=a,T=r===!1?o:r;return L=ZE&&o<=lse,u=s>=ZE&&s<=lse;if(l&&(n=10*n+o-ZE),u&&(a=10*a+s-ZE),!l||!u){if(n!==a)return n-a;if(o!==s)return o-s}}return a-n};var Lb=2e9;Ir.seedPseudoRandom=function(){Lb=2e9};Ir.pseudoRandom=function(){var e=Lb;return Lb=(69069*Lb+1)%4294967296,Math.abs(Lb-e)<429496729?Ir.pseudoRandom():Lb/4294967296};Ir.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},a=Ir.extractOption(e,t,"htx","hovertext");if(Ir.isValidTextValue(a))return n(a);var i=Ir.extractOption(e,t,"tx","text");if(Ir.isValidTextValue(i))return n(i)};Ir.isValidTextValue=function(e){return e||e===0};Ir.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(u=1):u=0,Ir.strTranslate(a-u*(r+o),i-u*(n+s))+Ir.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")};Ir.setTransormAndDisplay=function(e,t){e.attr("transform",Ir.getTextTransform(t)),e.style("display",t.scale?null:"none")};Ir.ensureUniformFontSize=function(e,t){var r=Ir.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};Ir.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)};Ir.bigFont=function(e){return Math.round(1.2*e)};var use=Ir.getFirefoxVersion(),Hdt=use!==null&&use<86;Ir.getPositionFromD3Event=function(){return Hdt?[rT.event.layerX,rT.event.layerY]:[rT.event.offsetX,rT.event.offsetY]}});var xse=fe(()=>{"use strict";var jdt=Xt(),mse={"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($q in mse)yse=$q.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),jdt.addStyleRule(yse,mse[$q]);var yse,$q});var Kq=fe((Ohr,_se)=>{_se.exports=!0});var Qq=fe((Nhr,bse)=>{"use strict";var Wdt=Kq(),Jq;typeof window.matchMedia=="function"?Jq=!window.matchMedia("(hover: none)").matches:Jq=Wdt;bse.exports=Jq});var Mx=fe((Uhr,eB)=>{"use strict";var Db=typeof Reflect=="object"?Reflect:null,wse=Db&&typeof Db.apply=="function"?Db.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},KE;Db&&typeof Db.ownKeys=="function"?KE=Db.ownKeys:Object.getOwnPropertySymbols?KE=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:KE=function(t){return Object.getOwnPropertyNames(t)};function Ydt(e){console&&console.warn&&console.warn(e)}var Ase=Number.isNaN||function(t){return t!==t};function vl(){vl.init.call(this)}eB.exports=vl;eB.exports.once=Kdt;vl.EventEmitter=vl;vl.prototype._events=void 0;vl.prototype._eventsCount=0;vl.prototype._maxListeners=void 0;var Tse=10;function JE(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(vl,"defaultMaxListeners",{enumerable:!0,get:function(){return Tse},set:function(e){if(typeof e!="number"||e<0||Ase(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Tse=e}});vl.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};vl.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Ase(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Mse(e){return e._maxListeners===void 0?vl.defaultMaxListeners:e._maxListeners}vl.prototype.getMaxListeners=function(){return Mse(this)};vl.prototype.emit=function(t){for(var r=[],n=1;n0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=i[t];if(l===void 0)return!1;if(typeof l=="function")wse(l,this,r);else for(var u=l.length,c=Lse(l,u),n=0;n0&&o.length>a&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,Ydt(s)}return e}vl.prototype.addListener=function(t,r){return Sse(this,t,r,!1)};vl.prototype.on=vl.prototype.addListener;vl.prototype.prependListener=function(t,r){return Sse(this,t,r,!0)};function Xdt(){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 Ese(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=Xdt.bind(n);return a.listener=r,n.wrapFn=a,a}vl.prototype.once=function(t,r){return JE(r),this.on(t,Ese(this,t,r)),this};vl.prototype.prependOnceListener=function(t,r){return JE(r),this.prependListener(t,Ese(this,t,r)),this};vl.prototype.removeListener=function(t,r){var n,a,i,o,s;if(JE(r),a=this._events,a===void 0)return this;if(n=a[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete a[t],a.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,i=o;break}if(i<0)return this;i===0?n.shift():Zdt(n,i),n.length===1&&(a[t]=n[0]),a.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};vl.prototype.off=vl.prototype.removeListener;vl.prototype.removeAllListeners=function(t){var r,n,a;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),o;for(a=0;a=0;a--)this.removeListener(t,r[a]);return this};function kse(e,t,r){var n=e._events;if(n===void 0)return[];var a=n[t];return a===void 0?[]:typeof a=="function"?r?[a.listener||a]:[a]:r?$dt(a):Lse(a,a.length)}vl.prototype.listeners=function(t){return kse(this,t,!0)};vl.prototype.rawListeners=function(t){return kse(this,t,!1)};vl.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):Cse.call(e,t)};vl.prototype.listenerCount=Cse;function Cse(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}vl.prototype.eventNames=function(){return this._eventsCount>0?KE(this._events):[]};function Lse(e,t){for(var r=new Array(t),n=0;n{"use strict";var tB=Mx().EventEmitter,Qdt={init:function(e){if(e._ev instanceof tB)return e;var t=new tB,r=new tB;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,a){t.emit(n,a),r.emit(n,a)},typeof e.addEventListener=="function"&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var n,a=e._ev;if(!a)return;var i=a._events[t];if(!i)return;function o(l){if(l.listener){if(a.removeListener(t,l.listener),!l.fired)return l.fired=!0,l.listener.apply(a,[r])}else return l.apply(a,[r])}i=Array.isArray(i)?i:[i];var s;for(s=0;s{"use strict";var Dse=Xt(),e0t=im().dfltConfig;function t0t(e,t){for(var r=[],n,a=0;ae0t.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Q1.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Q1.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Q1.undo=function(t){var r,n;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n{"use strict";zse.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var qb=fe(bc=>{"use strict";var J0=bi(),nT=Xt(),ek=Ho(),nB=Sb(),r0t=rB(),n0t=Z4(),i0t=im().configAttributes,qse=rl(),ep=nT.extendDeepAll,Ib=nT.isPlainObject,a0t=nT.isArrayOrTypedArray,tk=nT.nestedProperty,o0t=nT.valObjectMeta,iB="_isSubplotObj",rk="_isLinkedToArray",s0t="_arrayAttrRegexps",Ose="_deprecated",aB=[iB,rk,s0t,Ose];bc.IS_SUBPLOT_OBJ=iB;bc.IS_LINKED_TO_ARRAY=rk;bc.DEPRECATED=Ose;bc.UNDERSCORE_ATTRS=aB;bc.get=function(){var e={};return J0.allTypes.forEach(function(t){e[t]=u0t(t)}),{defs:{valObjects:o0t,metaKeys:aB.concat(["description","role","editType","impliedEdits"]),editType:{traces:qse.traces,layout:qse.layout},impliedEdits:{}},traces:e,layout:c0t(),frames:f0t(),animation:zb(n0t),config:zb(i0t)}};bc.crawl=function(e,t,r,n){var a=r||0;n=n||"",Object.keys(e).forEach(function(i){var o=e[i];if(aB.indexOf(i)===-1){var s=(n?n+".":"")+i;t(o,i,e,a,s),!bc.isValObject(o)&&Ib(o)&&i!=="impliedEdits"&&bc.crawl(o,t,a+1,s)}})};bc.isValObject=function(e){return e&&e.valType!==void 0};bc.findArrayAttributes=function(e){var t=[],r=[],n=[],a,i;function o(l,u,c,f){r=r.slice(0,f).concat([u]),n=n.slice(0,f).concat([l&&l._isLinkedToArray]);var v=l&&(l.valType==="data_array"||l.arrayOk===!0)&&!(r[f-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));v&&s(a,0,"")}function s(l,u,c){var f=l[r[u]],v=c+r[u];if(u===r.length-1)a0t(f)&&t.push(i+v);else if(n[u]){if(Array.isArray(f))for(var g=0;g=i.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var o=t[r];if(!QE(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function QE(e){return e===Math.round(e)&&e>=0}function u0t(e){var t,r;t=J0.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var a=ep({},ek),i=ep({},t.attributes);bc.crawl(i,function(l,u,c,f,v){tk(a,v).set(void 0),l===void 0&&tk(i,v).set(void 0)}),ep(n,a),J0.traceIs(e,"noOpacity")&&delete n.opacity,J0.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),J0.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),t.selectPoints||delete n.selectedpoints,ep(n,i),r.attributes&&ep(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:zb(n)};if(t.layoutAttributes){var s={};ep(s,t.layoutAttributes),o.layoutAttributes=zb(s)}return t.animatable||bc.crawl(o,function(l){bc.isValObject(l)&&"anim"in l&&delete l.anim}),o}function c0t(){var e={},t,r;ep(e,nB);for(t in J0.subplotsRegistry)if(r=J0.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var n=0;n{"use strict";var Bb=Xt(),g0t=Ho(),vm="templateitemname",oB={name:{valType:"string",editType:"none"}};oB[vm]={valType:"string",editType:"calc"};Sx.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=oB.name,t[vm]=oB[vm],t};Sx.traceTemplater=function(e){var t={},r,n;for(r in e)n=e[r],Array.isArray(n)&&n.length&&(t[r]=0);function a(i){r=Bb.coerce(i,{},g0t,"type");var o={type:r,_template:null};if(r in t){n=e[r];var s=t[r]%n.length;t[r]++,o._template=n[s]}return o}return{newTrace:a}};Sx.newContainer=function(e,t,r){var n=e._template,a=n&&(n[t]||r&&n[r]);Bb.isPlainObject(a)||(a=null);var i=e[t]={_template:a};return i};Sx.arrayTemplater=function(e,t,r){var n=e._template,a=n&&n[Vse(t)],i=n&&n[t];(!Array.isArray(i)||!i.length)&&(i=[]);var o={};function s(u){var c={name:u.name,_input:u},f=c[vm]=u[vm];if(!Use(f))return c._template=a,c;for(var v=0;v=n&&(r._input||{})._templateitemname;i&&(a=n);var o=t+"["+a+"]",s;function l(){s={},i&&(s[o]={},s[o][vm]=i)}l();function u(g,p){s[g]=p}function c(g,p){i?Bb.nestedProperty(s[o],g).set(p):s[o+"."+g]=p}function f(){var g=s;return l(),g}function v(g,p){g&&c(g,p);var x=f();for(var _ in x)Bb.nestedProperty(e,_).set(x[_])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:v}}});var rc=fe((Yhr,Gse)=>{"use strict";var iT=(Tb(),Gs(wb)).counter;Gse.exports={idRegex:{x:iT("x","( domain)?"),y:iT("y","( domain)?")},attrRegex:iT("[xy]axis"),xAxisMatch:iT("xaxis"),yAxisMatch:iT("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"}});var El=fe(Qd=>{"use strict";var m0t=bi(),sB=rc();Qd.id2name=function(t){if(!(typeof t!="string"||!t.match(sB.AX_ID_PATTERN))){var r=t.split(" ")[0].slice(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Qd.name2id=function(t){if(t.match(sB.AX_NAME_PATTERN)){var r=t.slice(5);return r==="1"&&(r=""),t.charAt(0)+r}};Qd.cleanId=function(t,r,n){var a=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(sB.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(a&&!n)){var i=t.split(" ")[0].slice(1).replace(/^0+/,"");return i==="1"&&(i=""),t.charAt(0)+i+(a&&n?" domain":"")}};Qd.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var a=Qd.listIds(e,t),i=new Array(a.length),o;for(o=0;on?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)};Qd.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function Hse(e,t){if(t&&t.length){for(var r=0;r{"use strict";function y0t(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function x0t(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}jse.exports={clearOutlineControllers:y0t,clearOutline:x0t}});var nk=fe(($hr,Wse)=>{"use strict";Wse.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var jf=fe(ak=>{"use strict";var ik=bi(),Khr=rc().SUBPLOT_PATTERN;ak.getSubplotCalcData=function(e,t,r){var n=ik.subplotsRegistry[t];if(!n)return[];for(var a=n.attr,i=[],o=0;o{"use strict";var _0t=bi(),Ob=Xt();Ex.manageCommandObserver=function(e,t,r,n){var a={},i=!0;t&&t._commandObserver&&(a=t._commandObserver),a.cache||(a.cache={}),a.lookupTable={};var o=Ex.hasSimpleAPICommandBindings(e,r,a.lookupTable);if(t&&t._commandObserver){if(o)return a;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,a}if(o){Yse(e,o,a.cache),a.check=function(){if(i){var c=Yse(e,o,a.cache);return c.changed&&n&&a.lookupTable[c.value]!==void 0&&(a.disable(),Promise.resolve(n({value:c.value,type:o.type,prop:o.prop,traces:o.traces,index:a.lookupTable[c.value]})).then(a.enable,a.enable)),c.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],l=0;l0?".":"")+a;Ob.isPlainObject(i)?lB(i,t,o,n+1):t(o,a,i)}})}});var Hs=fe((tdr,ole)=>{"use strict";var edr=xi(),w0t=lb().timeFormatLocale,T0t=jI().formatLocale,aT=aa(),A0t=WI(),M0t=A4().version,No=bi(),S0t=qb(),E0t=Mo(),Ri=Xt(),k0t=ni(),Kse=Wa().BADNUM,e0=El(),C0t=pm().clearOutline,L0t=nk(),uB=Z4(),P0t=rB(),F0t=jf().getModuleCalcData,Jse=Ri.relinkPrivateKeys,kx=Ri._,fi=ole.exports={};Ri.extendFlat(fi,No);fi.attributes=Ho();fi.attributes.type.values=fi.allTypes;fi.fontAttrs=Ds();fi.layoutAttributes=Sb();var sk=$se();fi.executeAPICommand=sk.executeAPICommand;fi.computeAPICommandBindings=sk.computeAPICommandBindings;fi.manageCommandObserver=sk.manageCommandObserver;fi.hasSimpleAPICommandBindings=sk.hasSimpleAPICommandBindings;fi.redrawText=function(e){return e=Ri.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(No.getComponentMethod("annotations","draw")(e),No.getComponentMethod("legend","draw")(e),No.getComponentMethod("colorbar","draw")(e),t(fi.previousPromises(e)))},300)})};fi.resize=function(e){e=Ri.getGraphDiv(e);var t,r=new Promise(function(n,a){(!e||Ri.isHidden(e))&&a(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Ri.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var i=e.changed;e.autoplay=!0,No.call("relayout",e,{autosize:!0}).then(function(){e.changed=i,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};fi.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};fi.sendDataToCloud=function(e,t){e.emit("plotly_beforeexport");let r=new URL(t).origin;var n=fi.graphJson(e,!1,"object");n.version=M0t;var a=new URL(t);a.searchParams.set("origin",window.location.origin);var i=window.open(a.href,"_blank");if(!i){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),e.emit("plotly_exportfail");return}var o=function(s){s.origin===r&&s.data&&s.data.type==="CHART_AUTH_SUCCESS"&&(i.postMessage({type:"chart",chart:n},r),window.removeEventListener("message",o),e.emit("plotly_afterexport"))};return window.addEventListener("message",o),!1};var D0t=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],R0t=["year","month","dayMonth","dayMonthYear"];fi.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults){delete n._skipDefaults;return}var a=e._fullLayout={},i=e.layout||{},o=e._fullData||[],s=e._fullData=[],l=e.data||[],u=e.calcdata||[],c=e._context||{},f;e._transitionData||fi.createTransitionData(e),a._dfltTitle={plot:kx(e,"Click to enter Plot title"),subtitle:kx(e,"Click to enter Plot subtitle"),x:kx(e,"Click to enter X axis title"),y:kx(e,"Click to enter Y axis title"),colorbar:kx(e,"Click to enter Colorscale title"),annotation:kx(e,"new text")},a._traceWord=kx(e,"trace");var v=Qse(e,D0t);if(n._initialAutoSizeIsDone){var g=n.width,p=n.height;fi.supplyLayoutGlobalDefaults(i,a,v),i.width||(a.width=g),i.height||(a.height=p),fi.sanitizeMargins(a)}else{fi.supplyLayoutGlobalDefaults(i,a,v);var x=!i.width||!i.height,_=a.autosize,y=c.autosizable,C=x&&(_||y);C?fi.plotAutoSize(e,i,a):x&&fi.sanitizeMargins(a),!_&&x&&(i.width=a.width,i.height=a.height)}a._d3locale=q0t(v,a.separators),a._extraFormat=Qse(e,R0t),a._initialAutoSizeIsDone=!0,a._dataLength=l.length,a._modules=[],a._visibleModules=[],a._basePlotModules=[];var k=a._subplots=z0t(),S=a._splomAxes={x:{},y:{}},L=a._splomSubplots={};a._splomGridDflt={},a._scatterStackOpts={},a._firstScatter={},a._alignmentOpts={},a._colorAxes={},a._requestRangeslider={},a._traceUids=I0t(o,l),fi.supplyDataDefaults(l,s,i,a);var w=Object.keys(S.x),A=Object.keys(S.y);if(w.length>1&&A.length>1){for(No.getComponentMethod("grid","sizeDefaults")(i,a),f=0;f15&&A.length>15&&a.shapes.length===0&&a.images.length===0,fi.linkSubplots(s,a,o,n),fi.cleanPlot(s,a,o,n);var I=!!(n._has&&n._has("cartesian")),R=!!(a._has&&a._has("cartesian")),B=I,O=R;B&&!O?n._bgLayer.remove():O&&!B&&(a._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&C0t({_fullLayout:n}),B0t(s,a),Jse(a,n),No.getComponentMethod("colorscale","crossTraceDefaults")(s,a),a._preGUI||(a._preGUI={}),a._tracePreGUI||(a._tracePreGUI={});var V=a._tracePreGUI,j={},q;for(q in V)j[q]="old";for(f=0;f0){var c=1-2*i;o=Math.round(c*o),s=Math.round(c*s)}}var f=fi.layoutAttributes.width.min,v=fi.layoutAttributes.height.min;o1,p=!r.height&&Math.abs(n.height-s)>1;(p||g)&&(g&&(n.width=o),p&&(n.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),fi.sanitizeMargins(n)};fi.supplyLayoutModuleDefaults=function(e,t,r,n){var a=No.componentsRegistry,i=t._basePlotModules,o,s,l,u=No.subplotsRegistry.cartesian;for(o in a)l=a[o],l.includeBasePlot&&l.includeBasePlot(e,t);i.length||i.push(u),t._has("cartesian")&&(No.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(Ri.subplotSort);for(s=0;s1&&(r.l/=_,r.r/=_)}if(v){var y=(r.t+r.b)/v;y>1&&(r.t/=y,r.b/=y)}var C=r.xl!==void 0?r.xl:r.x,k=r.xr!==void 0?r.xr:r.x,S=r.yt!==void 0?r.yt:r.y,L=r.yb!==void 0?r.yb:r.y;g[t]={l:{val:C,size:r.l+x},r:{val:k,size:r.r+x},b:{val:L,size:r.b+x},t:{val:S,size:r.t+x}},p[t]=1}if(!n._replotting)return fi.doAutoMargin(e)}};function N0t(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=e0.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}fi.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),rle(t);var a=t._size,i=t.margin,o={t:0,b:0,l:0,r:0},s=Ri.extendFlat({},a),l=i.l,u=i.r,c=i.t,f=i.b,v=t._pushmargin,g=t._pushmarginIds,p=t.minreducedwidth,x=t.minreducedheight;if(i.autoexpand!==!1){for(var _ in v)g[_]||delete v[_];var y=e._fullLayout._reservedMargin;for(var C in y)for(var k in y[C]){var S=y[C][k];o[k]=Math.max(o[k],S)}v.base={l:{val:0,size:l},r:{val:1,size:u},t:{val:1,size:c},b:{val:0,size:f}};for(var L in o){var w=0;for(var A in v)A!=="base"&&aT(v[A][L].size)&&(w=v[A][L].size>w?v[A][L].size:w);var T=Math.max(0,i[L]-w);o[L]=Math.max(0,o[L]-T)}for(var m in v){var F=v[m].l||{},E=v[m].b||{},I=F.val,R=F.size,B=E.val,O=E.size,V=r-o.r-o.l,j=n-o.t-o.b;for(var q in v){if(aT(R)&&v[q].r){var U=v[q].r.val,J=v[q].r.size;if(U>I){var ee=(R*U+(J-V)*I)/(U-I),ce=(J*(1-I)+(R-V)*(1-U))/(U-I);ee+ce>l+u&&(l=ee,u=ce)}}if(aT(O)&&v[q].t){var ye=v[q].t.val,xe=v[q].t.size;if(ye>B){var ue=(O*ye+(xe-j)*B)/(ye-B),K=(xe*(1-B)+(O-j)*(1-ye))/(ye-B);ue+K>f+c&&(f=ue,c=K)}}}}}var _e=Ri.constrain(r-i.l-i.r,nle,p),ne=Ri.constrain(n-i.t-i.b,ile,x),ae=Math.max(0,r-_e),pe=Math.max(0,n-ne);if(ae){var ie=(l+u)/ae;ie>1&&(l/=ie,u/=ie)}if(pe){var le=(f+c)/pe;le>1&&(f/=le,c/=le)}if(a.l=Math.round(l)+o.l,a.r=Math.round(u)+o.r,a.t=Math.round(c)+o.t,a.b=Math.round(f)+o.b,a.p=Math.round(i.pad),a.w=Math.round(r)-a.l-a.r,a.h=Math.round(n)-a.t-a.b,!t._replotting&&(fi.didMarginChange(s,a)||N0t(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var me=3*(1+Object.keys(g).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};fi.graphJson=function(e,t=!1,r="json",n=!1,a=!1){(n&&t&&!e._fullData||n&&!t&&!e._fullLayout)&&fi.supplyDefaults(e);var i=n?e._fullData:e.data,o=n?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function l(f,v){if(typeof f=="function")return v?"_function_":null;if(Ri.isPlainObject(f)){var g={};return Object.keys(f).sort().forEach(function(y){if(["_","["].indexOf(y.charAt(0))===-1){if(typeof f[y]=="function"){v&&(g[y]="_function");return}g[y]=l(f[y],v)}}),g}var p=Array.isArray(f),x=Ri.isTypedArray(f);if((p||x)&&f.dtype&&f.shape){var _=f.bdata;return l({dtype:f.dtype,shape:f.shape,bdata:Ri.isArrayBuffer(_)?A0t.encode(_):_},v)}return p?f.map(function(y){return l(y,v)}):x?Ri.simpleMap(f,Ri.identity):Ri.isJSDate(f)?Ri.ms2DateTimeLocal(+f):f}var u={data:(i||[]).map(function(f){var v=l(f);return t&&delete v.fit,v})};if(!t&&(u.layout=l(o),n)){var c=o._size;u.layout.computed={margin:{b:c.b,l:c.l,r:c.r,t:c.t}}}return s&&(u.frames=l(s)),a&&(u.config=l(e._context,!0)),r==="object"?u:JSON.stringify(u)};fi.modifyFrames=function(e,t){var r,n,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return No.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var v=0,g=0;function p(){return v++,function(){g++,!n&&g===v&&s(f)}}r.runFn(p),setTimeout(p())})}function s(f){if(e._transitionData)return i(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return No.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(f)}function l(){if(e._transitionData)return e._transitioning=!1,a(e._transitionData._interruptCallbacks)}var u=[fi.previousPromises,l,r.prepareFn,fi.rehover,fi.reselect,o],c=Ri.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}fi.doCalcdata=function(e,t){var r=e0.list(e),n=e._fullData,a=e._fullLayout,i,o,s,l=new Array(n.length),u=(e.calcdata||[]).slice();for(e.calcdata=l,a._numBoxes=0,a._numViolins=0,a._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,a._piecolormap={},a._sunburstcolormap={},a._treemapcolormap={},a._iciclecolormap={},a._funnelareacolormap={},s=0;s{"use strict";Cx.xmlns="http://www.w3.org/2000/xmlns/";Cx.svg="http://www.w3.org/2000/svg";Cx.xlink="http://www.w3.org/1999/xlink";Cx.svgAttrs={xmlns:Cx.svg,"xmlns:xlink":Cx.xlink}});var nc=fe((ndr,sle)=>{"use strict";sle.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}});var as=fe(A0=>{"use strict";var wc=xi(),ev=Xt(),j0t=ev.strTranslate,cB=Q0(),W0t=nc().LINE_SPACING,Y0t=/([^$]*)([$]+[^$]*[$]+)([^$]*)/,dle=e=>e?e.match(Y0t):null;A0.matchTex=dle;A0.convertToTspans=function(e,t,r){var n=e.text(),a=!e.attr("data-notex")&&t&&t._context.typesetMath&&dle(n);a&&!K0t()&&(a=null);var i=wc.select(e.node().parentNode);if(i.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":n,"data-math":"N"});function s(){i.empty()||(o=e.attr("class")+"-math",i.select("svg."+o).remove()),e.text("").style("white-space","pre");var l=svt(e.node(),n);l&&e.style("pointer-events","all"),A0.positionText(e),r&&r.call(e)}return a?(t&&t._promises||[]).push(new Promise(function(l){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),c={fontSize:u},f=e.attr("text-anchor");J0t(a[2],c,function(v,g,p){i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove();var x=v&&v.select("svg");if(!x||!x.node()){s(),l();return}e.style("display","none");var _=i.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});_.node().appendChild(x.node()),g&&g.node()&&x.node().insertBefore(g.node().cloneNode(!0),x.node().firstChild);var y=p.width,C=p.height;x.attr({class:o,height:C,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":c.fontSize+"px"});var k=e.node().style.fill||"black",S=x.select("g");S.attr({fill:k,stroke:k});var L=S.node().getBoundingClientRect(),w=L.width,A=L.height;(w>y||A>C)&&(x.style("overflow","hidden"),L=x.node().getBoundingClientRect(),w=L.width,A=L.height);var T=+e.attr("x"),m=+e.attr("y"),F=u||e.node().getBoundingClientRect().height,E=-F/4;o[0]==="y"?_.attr({transform:"rotate("+[-90,T,m]+")"+j0t(-w/2,E-A/2)}):o[0]==="l"?m=E-A/2:o[0]==="a"&&o.indexOf("atitle")!==0?(T=0,m=E):(T=T-w*(f==="middle"?.5:f==="end"?1:0),m=m+E-A/2),x.attr({x:T,y:m}),r&&r.call(e,_),l(_)})})):s(),e};var X0t=/(<|<|<)/g,Z0t=/(>|>|>)/g;function $0t(e){return e.replace(X0t,"\\lt ").replace(Z0t,"\\gt ")}var fB=null,vle=()=>typeof MathJax!="undefined"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,lle=!1,ule=!1;function K0t(){let e=vle();return e===3||e===4?!0:(e===null?lle||(lle=!0,ev.warn("MathJax is not loaded. Math equations will not be rendered.")):ule||(ule=!0,ev.warn("Unsupported MathJax version:",MathJax.version)),!1)}function J0t(e,t,r){let n=vle();var a;let i=function(){if(!fB){let u=MathJax._.output.svg_ts.SVG,c=ev.extendFlat({},MathJax.config.svg,{fontCache:"local"});n===4&&(c.linebreaks=ev.extendFlat({},c.linebreaks,{inline:!1})),fB=MathJax._.mathjax.mathjax.document(document,ev.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new u(c)}))}let s="math-output-"+ev.randstr({},64);a=wc.select("body").append("div").attr({id:s}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"});let l=$0t(e).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return fB.convert(l,{display:!1})}).then(function(u){a.node().appendChild(u)})},o=function(){let s=a.select(".MathJax"),l=!s.empty()&&a.select("svg").node();if(!l)ev.log("There was an error in the tex syntax.",e),r();else{let u=l.getBoundingClientRect(),c=s.select("defs");r(s,c,u)}a.remove()};Promise.resolve().then(i).then(o).catch(s=>{ev.log("MathJax typesetting failed.",e,s),a&&a.remove(),r()})}var ple={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"},Q0t={sub:"0.3em",sup:"-0.6em"},evt={sub:"-0.21em",sup:"0.42em"},cle="\u200B",fle=["http:","https:","mailto:","",void 0,":"],gle=A0.NEWLINES=/(\r\n?|\n)/g,dB=/(<[^<>]*>)/,vB=/<(\/?)([^ >]*)(\s+(.*))?>/i,tvt=//i;A0.BR_TAG_ALL=//gi;var mle=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,yle=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,xle=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,rvt=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function Lx(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&lk(n)}var nvt=/(^|;)\s*color:/;A0.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,n=t.allowedTags!==void 0?t.allowedTags:["br"],a="...",i=a.length,o=e.split(dB),s=[],l="",u=0,c=0;ci?s.push(f.slice(0,Math.max(0,x-i))+a):s.push(f.slice(0,x));break}l=""}}return s.join("")};var ivt={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},avt=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function lk(e){return e.replace(avt,function(t,r){var n;return r.charAt(0)==="#"?n=ovt(r.charAt(1)==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10)):n=ivt[r],n||t})}A0.convertEntities=lk;function ovt(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r((e>>10)+55232,e%1024+56320)}}function svt(e,t){t=t.replace(gle," ");var r=!1,n=[],a,i=-1;function o(){i++;var w=document.createElementNS(cB.svg,"tspan");wc.select(w).attr({class:"line",dy:i*W0t+"em"}),e.appendChild(w),a=w;var A=n;if(n=[{node:w}],A.length>1)for(var T=1;T.",t);return}var A=n.pop();w!==A.type&&ev.log("Start tag <"+A.type+"> doesnt match end tag <"+w+">. Pretending it did match.",t),a=n[n.length-1].node}var c=tvt.test(t);c?o():(a=e,n=[{node:e}]);for(var f=t.split(dB),v=0;v{"use strict";var lvt=xi(),sT=aa(),uk=Xt(),Px=ni(),uvt=yx().isValid;function cvt(e,t,r){var n=t?uk.nestedProperty(e,t).get()||{}:e,a=n[r||"color"];a&&a._inputArray&&(a=a._inputArray);var i=!1;if(uk.isArrayOrTypedArray(a)){for(var o=0;o=0;n--,a++){var i=e[n];r[a]=[1-i[0],i[1]]}return r}function Mle(e,t){t=t||{};for(var r=e.domain,n=e.range,a=n.length,i=new Array(a),o=0;o{"use strict";var Ele=Rq(),hvt=Ele.FORMAT_LINK,dvt=Ele.DATE_FORMAT_LINK;function vvt(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?pB:kle)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function pB(e,t){return["Sets the "+e+" formatting rule"+(t?" for `"+t+"`":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+hvt+"."].join(" ")}function kle(e,t){return pB(e,t)+[" And for dates see: "+dvt+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}Cle.exports={axisHoverFormat:vvt,descriptionOnlyNumbers:pB,descriptionWithDates:kle}});var pf=fe((ldr,Wle)=>{"use strict";var Lle=Ds(),Nb=tc(),jle=Uc().dash,mB=ta().extendFlat,Ple=Mo().templatedArray,sdr=Oo().templateFormatStringDescription,Fle=pl().descriptionWithDates,pvt=Wa().ONEDAY,Up=rc(),gvt=Up.HOUR_PATTERN,mvt=Up.WEEKDAY_PATTERN,gB={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},yvt=mB({},gB,{values:gB.values.slice().concat(["sync"])});function Dle(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var Rle={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Ile={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},zle={valType:"data_array",editType:"ticks"},qle={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function Ble(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function Ole(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Nle={valType:"color",dflt:Nb.defaultLine,editType:"ticks"},Ule={valType:"color",dflt:Nb.lightLine,editType:"ticks"};function Vle(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Gle=mB({},jle,{editType:"ticks"}),Hle={valType:"boolean",editType:"ticks"};Wle.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:Nb.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:Lle({editType:"ticks",description:"Sets this axis' title font."}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[Up.idRegex.x.toString(),Up.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[Up.idRegex.x.toString(),Up.idRegex.y.toString()],editType:"calc"},rangebreaks:Ple("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[mvt,gvt,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:pvt},editType:"calc"}),tickmode:yvt,nticks:Dle(),tick0:Rle,dtick:Ile,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:zle,ticktext:{valType:"data_array",editType:"ticks"},ticks:qle,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:Ble(),tickwidth:Ole(),tickcolor:Nle,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:mB({},jle,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:Lle({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Fle("tick label")},tickformatstops:Ple("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:Fle("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:Nb.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:Hle,gridcolor:Ule,gridwidth:Vle(),griddash:Gle,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:Nb.defaultLine,editType:"ticks"},zerolinelayer:{valType:"enumerated",values:["above traces","below traces"],dflt:"below traces",editType:"plot"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:Nb.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",Up.idRegex.x.toString(),Up.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",Up.idRegex.x.toString(),Up.idRegex.y.toString()],editType:"plot"},minor:{tickmode:gB,nticks:Dle("minor"),tick0:Rle,dtick:Ile,tickvals:zle,ticks:qle,ticklen:Ble("minor"),tickwidth:Ole("minor"),tickcolor:Nle,gridcolor:Ule,gridwidth:Vle("minor"),griddash:Gle,showgrid:Hle,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var ck=fe((udr,Zle)=>{"use strict";var ml=pf(),Yle=Ds(),Xle=ta().extendFlat,xvt=rl().overrideAll;Zle.exports=xvt({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:ml.linecolor,outlinewidth:ml.linewidth,bordercolor:ml.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:ml.minor.tickmode,nticks:ml.nticks,tick0:ml.tick0,dtick:ml.dtick,tickvals:ml.tickvals,ticktext:ml.ticktext,ticks:Xle({},ml.ticks,{dflt:""}),ticklabeloverflow:Xle({},ml.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:ml.ticklen,tickwidth:ml.tickwidth,tickcolor:ml.tickcolor,ticklabelstep:ml.ticklabelstep,showticklabels:ml.showticklabels,labelalias:ml.labelalias,tickfont:Yle({description:"Sets the color bar's tick label font"}),tickangle:ml.tickangle,tickformat:ml.tickformat,tickformatstops:ml.tickformatstops,tickprefix:ml.tickprefix,showtickprefix:ml.showtickprefix,ticksuffix:ml.ticksuffix,showticksuffix:ml.showticksuffix,separatethousands:ml.separatethousands,exponentformat:ml.exponentformat,minexponent:ml.minexponent,showexponent:ml.showexponent,title:{text:{valType:"string"},font:Yle({description:"Sets this color bar's title font."}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var _s=fe((fdr,Kle)=>{"use strict";var _vt=ck(),bvt=(Tb(),Gs(wb)).counter,wvt=(bx(),Gs(_x)).default,$le=yx().scales,cdr=wvt($le);function fk(e){return"`"+e+"`"}Kle.exports=function(t,r){t=t||"",r=r||{};var n=r.cLetter||"c",a="onlyIfNumerical"in r?r.onlyIfNumerical:!!t,i="noScale"in r?r.noScale:t==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:n==="z",s=typeof r.colorscaleDflt=="string"?$le[r.colorscaleDflt]:null,l=r.editTypeOverride||"",u=t?t+".":"",c,f;"colorAttr"in r?(c=r.colorAttr,f=r.colorAttr):(c={z:"z",c:"color"}[n],f="in "+fk(u+c));var v=a?" Has an effect only if "+f+" is set to a numerical array.":"",g=n+"auto",p=n+"min",x=n+"max",_=n+"mid",y=fk(u+g),C=fk(u+p),k=fk(u+x),S=C+" and "+k,L={};L[p]=L[x]=void 0;var w={};w[g]=!1;var A={};return c==="color"&&(A.color={valType:"color",arrayOk:!0,editType:l||"style"},r.anim&&(A.color.anim=!0)),A[g]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:L},A[p]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:w},A[x]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:w},A[_]={valType:"number",dflt:null,editType:"calc",impliedEdits:L},A.colorscale={valType:"colorscale",editType:"calc",dflt:s,impliedEdits:{autocolorscale:!1}},A.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},A.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(A.showscale={valType:"boolean",dflt:o,editType:"calc"},A.colorbar=_vt),r.noColorAxis||(A.coloraxis={valType:"subplotid",regex:bvt("coloraxis"),dflt:null,editType:"calc"}),A}});var xB=fe((hdr,Jle)=>{"use strict";var Tvt=ta().extendFlat,Avt=_s(),yB=yx().scales;Jle.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:yB.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:yB.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:yB.RdBu,editType:"calc"}},coloraxis:Tvt({_isSubplotObj:!0,editType:"calc"},Avt("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var _B=fe((ddr,Qle)=>{"use strict";var Mvt=Xt();Qle.exports=function(t){return Mvt.isPlainObject(t.colorbar)}});var TB=fe(wB=>{"use strict";var bB=aa(),eue=Xt(),tue=Wa(),Svt=tue.ONEDAY,Evt=tue.ONEWEEK;wB.dtick=function(e,t){var r=t==="log",n=t==="date",a=t==="category",i=n?Svt:1;if(!e)return i;if(bB(e))return e=Number(e),e<=0?i:a?Math.max(1,Math.round(e)):n?Math.max(.1,e):e;if(typeof e!="string"||!(n||r))return i;var o=e.charAt(0),s=e.slice(1);return s=bB(s)?Number(s):0,s<=0||!(n&&o==="M"&&s===Math.round(s)||r&&o==="L"||r&&o==="D"&&(s===1||s===2))?i:e};wB.tick0=function(e,t,r,n){if(t==="date")return eue.cleanDate(e,eue.dateTick0(r,n%Evt===0?1:0));if(!(n==="D1"||n==="D2"))return bB(e)?Number(e):0}});var Fx=fe((pdr,nue)=>{"use strict";var rue=TB(),kvt=Xt().isArrayOrTypedArray,Cvt=Gf().isTypedArraySpec,Lvt=Gf().decodeTypedArraySpec;nue.exports=function(t,r,n,a,i={}){var o=i.isMinor,s=o?t.minor||{}:t,l=o?r.minor:r,u=o?"minor.":"";function c(S){var L=s[S];return Cvt(L)&&(L=Lvt(L)),L!==void 0?L:(l._template||{})[S]}var f=c("tick0"),v=c("dtick"),g=c("tickvals"),p=c("overlaying"),x=a==="category"||a==="multicategory",_;kvt(g)?_="array":v?_="linear":p&&!x?_="sync":_="auto";var y=n(u+"tickmode",_);if(y==="auto"||y==="sync")n(u+"nticks");else if(y==="linear"){var C=l.dtick=rue.dtick(v,a);l.tick0=rue.tick0(f,a,r.calendar,C)}else if(a!=="multicategory"){var k=n(u+"tickvals");k===void 0?l.tickmode="auto":o||n("ticktext")}}});var Ub=fe((gdr,aue)=>{"use strict";var AB=Xt(),iue=pf();aue.exports=function(t,r,n,a){var i=a.isMinor,o=i?t.minor||{}:t,s=i?r.minor:r,l=i?iue.minor:iue,u=i?"minor.":"",c=AB.coerce2(o,s,l,"ticklen",i?(r.ticklen||5)*.6:void 0),f=AB.coerce2(o,s,l,"tickwidth",i?r.tickwidth||1:void 0),v=AB.coerce2(o,s,l,"tickcolor",(i?r.tickcolor:void 0)||s.color),g=n(u+"ticks",!i&&a.outerTicks||c||f||v?"outside":"");g||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var MB=fe((mdr,oue)=>{"use strict";oue.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],n=r.filter(function(i){return t[i]!==void 0}),a=function(i){return t[i]===t[n[0]]};if(n.every(a)||n.length===1)return t[n[0]]}});var Ah=fe((ydr,sue)=>{"use strict";var hk=Xt(),Pvt=Mo();sue.exports=function(t,r,n){var a=n.name,i=n.inclusionAttr||"visible",o=r[a],s=hk.isArrayOrTypedArray(t[a])?t[a]:[],l=r[a]=[],u=Pvt.arrayTemplater(r,a,i),c,f;for(c=0;c{"use strict";var SB=Xt(),Fvt=ni().contrast,lue=pf(),Dvt=MB(),Rvt=Ah();uue.exports=function(t,r,n,a,i){i||(i={});var o=n("labelalias");SB.isPlainObject(o)||delete r.labelalias;var s=Dvt(t),l=n("showticklabels");if(l){i.noTicklabelshift||n("ticklabelshift"),i.noTicklabelstandoff||n("ticklabelstandoff");var u=i.font||{},c=r.color,f=r.ticklabelposition||"",v=f.indexOf("inside")!==-1?Fvt(i.bgColor):c&&c!==lue.color.dflt?c:u.color;if(SB.coerceFont(n,"tickfont",u,{overrideDflt:{color:v}}),!i.noTicklabelstep&&a!=="multicategory"&&a!=="log"&&n("ticklabelstep"),!i.noAng){var g=n("tickangle");!i.noAutotickangles&&g==="auto"&&n("autotickangles")}if(a!=="category"){var p=n("tickformat");Rvt(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:Ivt}),r.tickformatstops.length||delete r.tickformatstops,!i.noExp&&!p&&a!=="date"&&(n("showexponent",s),n("exponentformat"),n("minexponent"),n("separatethousands"))}!i.noMinorloglabels&&a==="log"&&n("minorloglabels")}};function Ivt(e,t){function r(a,i){return SB.coerce(e,t,lue.tickformatstops,a,i)}var n=r("enabled");n&&(r("dtickrange"),r("value"))}});var mm=fe((_dr,cue)=>{"use strict";var zvt=MB();cue.exports=function(t,r,n,a,i){i||(i={});var o=i.tickSuffixDflt,s=zvt(t),l=n("tickprefix");l&&n("showtickprefix",s);var u=n("ticksuffix",o);u&&n("showticksuffix",s)}});var EB=fe((bdr,fue)=>{"use strict";var ym=Xt(),qvt=Mo(),Bvt=Fx(),Ovt=Ub(),Nvt=gm(),Uvt=mm(),Vvt=ck();fue.exports=function(t,r,n){var a=qvt.newContainer(r,"colorbar"),i=t.colorbar||{};function o(E,I){return ym.coerce(i,a,Vvt,E,I)}var s=n.margin||{t:0,b:0,l:0,r:0},l=n.width-s.l-s.r,u=n.height-s.t-s.b,c=o("orientation"),f=c==="v",v=o("thicknessmode");o("thickness",v==="fraction"?30/(f?l:u):30);var g=o("lenmode");o("len",g==="fraction"?1:f?u:l);var p=o("yref"),x=o("xref"),_=p==="paper",y=x==="paper",C,k,S,L="left";f?(S="middle",L=y?"left":"right",C=y?1.02:1,k=.5):(S=_?"bottom":"top",L="center",C=.5,k=_?1.02:1),ym.coerce(i,a,{x:{valType:"number",min:y?-2:0,max:y?3:1,dflt:C}},"x"),ym.coerce(i,a,{y:{valType:"number",min:_?-2:0,max:_?3:1,dflt:k}},"y"),o("xanchor",L),o("xpad"),o("yanchor",S),o("ypad"),ym.noneOrAll(i,a,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var w=ym.coerce(i,a,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:f?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",w.indexOf("inside")!==-1?"hide past domain":"hide past div"),Bvt(i,a,o,"linear");var A=n.font,T={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:A};w.indexOf("inside")!==-1&&(T.bgColor="black"),Uvt(i,a,o,"linear",T),Nvt(i,a,o,"linear",T),Ovt(i,a,o,"linear",T),o("title.text",n._dfltTitle.colorbar);var m=a.showticklabels?a.tickfont:A,F=ym.extendFlat({},A,{family:m.family,size:ym.bigFont(m.size)});ym.coerceFont(o,"title.font",F),o("title.side",f?"top":"right")}});var Vc=fe((wdr,vue)=>{"use strict";var hue=aa(),CB=Xt(),Gvt=_B(),Hvt=EB(),due=yx().isValid,jvt=bi().traceIs;function kB(e,t){var r=t.slice(0,t.length-1);return t?CB.nestedProperty(e,r).get()||{}:e}vue.exports=function e(t,r,n,a,i){var o=i.prefix,s=i.cLetter,l="_module"in r,u=kB(t,o),c=kB(r,o),f=kB(r._template||{},o)||{},v=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,n,a,i)};if(l){var g=n._colorAxes||{},p=a(o+"coloraxis");if(p){var x=jvt(r,"contour")&&CB.nestedProperty(r,"contours.coloring").get()||"heatmap",_=g[p];_?(_[2].push(v),_[0]!==x&&(_[0]=!1,CB.warn(["Ignoring coloraxis:",p,"setting","as it is linked to incompatible colorscales."].join(" ")))):g[p]=[x,r,[v]];return}}var y=u[s+"min"],C=u[s+"max"],k=hue(y)&&hue(C)&&y{"use strict";var pue=Xt(),Wvt=Mo(),gue=xB(),Yvt=Vc();mue.exports=function(t,r){function n(f,v){return pue.coerce(t,r,gue,f,v)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var a=r._colorAxes,i,o;function s(f,v){return pue.coerce(i,o,gue.coloraxis,f,v)}for(var l in a){var u=a[l];if(u[0])i=t[l]||{},o=Wvt.newContainer(r,l,"coloraxis"),o._name=l,Yvt(i,o,r,s,{prefix:"",cLetter:"c"});else{for(var c=0;c{"use strict";var Xvt=Xt(),Zvt=Wf().hasColorscale,$vt=Wf().extractOpts;xue.exports=function(t,r){function n(c,f){var v=c["_"+f];v!==void 0&&(c[f]=v)}function a(c,f){var v=f.container?Xvt.nestedProperty(c,f.container).get():c;if(v)if(v.coloraxis)v._colorAx=r[v.coloraxis];else{var g=$vt(v),p=g.auto;(p||g.min===void 0)&&n(v,f.min),(p||g.max===void 0)&&n(v,f.max),g.autocolorscale&&n(v,"colorscale")}}for(var i=0;i{"use strict";var bue=aa(),LB=Xt(),Kvt=Wf().extractOpts;wue.exports=function(t,r,n){var a=t._fullLayout,i=n.vals,o=n.containerStr,s=o?LB.nestedProperty(r,o).get():r,l=Kvt(s),u=l.auto!==!1,c=l.min,f=l.max,v=l.mid,g=function(){return LB.aggNums(Math.min,null,i)},p=function(){return LB.aggNums(Math.max,null,i)};if(c===void 0?c=g():u&&(s._colorAx&&bue(c)?c=Math.min(c,g()):c=g()),f===void 0?f=p():u&&(s._colorAx&&bue(f)?f=Math.max(f,p()):f=p()),u&&v!==void 0&&(f-v>v-c?c=v-(f-v):f-v=0?x=a.colorscale.sequential:x=a.colorscale.sequentialminus,l._sync("colorscale",x)}}});var js=fe((Sdr,Tue)=>{"use strict";var dk=yx(),Vb=Wf();Tue.exports={moduleType:"component",name:"colorscale",attributes:_s(),layoutAttributes:xB(),supplyLayoutDefaults:yue(),handleDefaults:Vc(),crossTraceDefaults:_ue(),calc:Mh(),scales:dk.scales,defaultScale:dk.defaultScale,getScale:dk.get,isValidScale:dk.isValid,hasColorscale:Vb.hasColorscale,extractOpts:Vb.extractOpts,extractScale:Vb.extractScale,flipScale:Vb.flipScale,makeColorScaleFunc:Vb.makeColorScaleFunc,makeColorScaleFuncFromTrace:Vb.makeColorScaleFuncFromTrace}});var Is=fe((Edr,Mue)=>{"use strict";var Aue=Xt(),Jvt=Gf().isTypedArraySpec;Mue.exports={hasLines:function(e){return e.visible&&e.mode&&e.mode.indexOf("lines")!==-1},hasMarkers:function(e){return e.visible&&(e.mode&&e.mode.indexOf("markers")!==-1||e.type==="splom")},hasText:function(e){return e.visible&&e.mode&&e.mode.indexOf("text")!==-1},isBubble:function(e){var t=e.marker;return Aue.isPlainObject(t)&&(Aue.isArrayOrTypedArray(t.size)||Jvt(t.size))}}});var lT=fe((kdr,Sue)=>{"use strict";var Qvt=aa();Sue.exports=function(t,r){r||(r=2);var n=t.marker,a=n.sizeref||1,i=n.sizemin||0,o=n.sizemode==="area"?function(s){return Math.sqrt(s/a)}:function(s){return s/a};return function(s){var l=o(s/r);return Qvt(l)&&l>0?Math.max(l,i):0}}});var Sd=fe(Yf=>{"use strict";var uT=Xt();Yf.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};Yf.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],n=e.yaxes||[],a=0;a=0&&r.index{var PB={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},npt=/([astvzqmhlc])([^astvzqmhlc]*)/gi,ipt=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function apt(e){let t=[];return e.replace(npt,(r,n,a)=>{let i=n.toLowerCase(),o=n,s=opt(a);for(i==="m"&&s.length>2&&(t.push([o,...s.splice(0,2)]),i="l",o=o==="m"?"l":"L");;){if(s.length===PB[i])return t.push([o,...s]),"";if(s.length{"use strict";var spt=FB(),$n=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},za="M0,0Z",Lue=Math.sqrt(2),xm=Math.sqrt(3),DB=Math.PI,RB=Math.cos,IB=Math.sin;Iue.exports={circle:{n:0,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?Ba(t,r,a):a}},square:{n:1,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.3,2);return Ba(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.4,2),a=$n(e*1.2,2);return Ba(t,r,"M"+a+","+n+"H"+n+"V"+a+"H-"+n+"V"+n+"H-"+a+"V-"+n+"H-"+n+"V-"+a+"H"+n+"V-"+n+"H"+a+"Z")}},x:{n:4,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.8/Lue,2),a="l"+n+","+n,i="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return Ba(t,r,"M0,"+n+a+i+o+i+o+s+o+s+a+s+a+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2/xm,2),a=$n(e/2,2),i=$n(e,2);return Ba(t,r,"M-"+n+","+a+"H"+n+"L0,-"+i+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2/xm,2),a=$n(e/2,2),i=$n(e,2);return Ba(t,r,"M-"+n+",-"+a+"H"+n+"L0,"+i+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2/xm,2),a=$n(e/2,2),i=$n(e,2);return Ba(t,r,"M"+a+",-"+n+"V"+n+"L-"+i+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2/xm,2),a=$n(e/2,2),i=$n(e,2);return Ba(t,r,"M-"+a+",-"+n+"V"+n+"L"+i+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.6,2),a=$n(e*1.2,2);return Ba(t,r,"M-"+a+",-"+n+"H"+n+"V"+a+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.6,2),a=$n(e*1.2,2);return Ba(t,r,"M"+n+",-"+a+"V"+n+"H-"+a+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.6,2),a=$n(e*1.2,2);return Ba(t,r,"M"+a+","+n+"H-"+n+"V-"+a+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.6,2),a=$n(e*1.2,2);return Ba(t,r,"M-"+n+","+a+"V-"+n+"H"+a+"Z")}},pentagon:{n:13,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.951,2),a=$n(e*.588,2),i=$n(-e,2),o=$n(e*-.309,2),s=$n(e*.809,2);return Ba(t,r,"M"+n+","+o+"L"+a+","+s+"H-"+a+"L-"+n+","+o+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e/2,2),i=$n(e*xm/2,2);return Ba(t,r,"M"+i+",-"+a+"V"+a+"L0,"+n+"L-"+i+","+a+"V-"+a+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e/2,2),i=$n(e*xm/2,2);return Ba(t,r,"M-"+a+","+i+"H"+a+"L"+n+",0L"+a+",-"+i+"H-"+a+"L-"+n+",0Z")}},octagon:{n:16,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.924,2),a=$n(e*.383,2);return Ba(t,r,"M-"+a+",-"+n+"H"+a+"L"+n+",-"+a+"V"+a+"L"+a+","+n+"H-"+a+"L-"+n+","+a+"V-"+a+"Z")}},star:{n:17,f:function(e,t,r){if(qa(t))return za;var n=e*1.4,a=$n(n*.225,2),i=$n(n*.951,2),o=$n(n*.363,2),s=$n(n*.588,2),l=$n(-n,2),u=$n(n*-.309,2),c=$n(n*.118,2),f=$n(n*.809,2),v=$n(n*.382,2);return Ba(t,r,"M"+a+","+u+"H"+i+"L"+o+","+c+"L"+s+","+f+"L0,"+v+"L-"+s+","+f+"L-"+o+","+c+"L-"+i+","+u+"H-"+a+"L0,"+l+"Z")}},hexagram:{n:18,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.66,2),a=$n(e*.38,2),i=$n(e*.76,2);return Ba(t,r,"M-"+i+",0l-"+a+",-"+n+"h"+i+"l"+a+",-"+n+"l"+a+","+n+"h"+i+"l-"+a+","+n+"l"+a+","+n+"h-"+i+"l-"+a+","+n+"l-"+a+",-"+n+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(qa(t))return za;var n=$n(e*xm*.8,2),a=$n(e*.8,2),i=$n(e*1.6,2),o=$n(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Ba(t,r,"M-"+n+","+a+s+n+","+a+s+"0,-"+i+s+"-"+n+","+a+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(qa(t))return za;var n=$n(e*xm*.8,2),a=$n(e*.8,2),i=$n(e*1.6,2),o=$n(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Ba(t,r,"M"+n+",-"+a+s+"-"+n+",-"+a+s+"0,"+i+s+n+",-"+a+"Z")}},"star-square":{n:21,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.1,2),a=$n(e*2,2),i="A "+a+","+a+" 0 0 1 ";return Ba(t,r,"M-"+n+",-"+n+i+"-"+n+","+n+i+n+","+n+i+n+",-"+n+i+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2),a=$n(e*1.9,2),i="A "+a+","+a+" 0 0 1 ";return Ba(t,r,"M-"+n+",0"+i+"0,"+n+i+n+",0"+i+"0,-"+n+i+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.7,2),a=$n(e*1.4,2);return Ba(t,r,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2),a=$n(e*.7,2);return Ba(t,r,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e/Lue,2);return Ba(t,r,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.3,2);return Ba(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM0,-"+n+"V"+n+"M-"+n+",0H"+n)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.3,2),a=$n(e*.65,2);return Ba(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+a+",-"+a+"L"+a+","+a+"M-"+a+","+a+"L"+a+",-"+a)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2);return Ba(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*.85,2);return Ba(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(qa(t))return za;var n=$n(e/2,2),a=$n(e,2);return Ba(t,r,"M"+n+","+a+"V-"+a+"M"+(n-a)+",-"+a+"V"+a+"M"+a+","+n+"H-"+a+"M-"+a+","+(n-a)+"H"+a)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*1.6,2),i=$n(e*.8,2);return Ba(t,r,"M-"+n+","+i+"L0,0M"+n+","+i+"L0,0M0,-"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*1.6,2),i=$n(e*.8,2);return Ba(t,r,"M-"+n+",-"+i+"L0,0M"+n+",-"+i+"L0,0M0,"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*1.6,2),i=$n(e*.8,2);return Ba(t,r,"M"+i+","+n+"L0,0M"+i+",-"+n+"L0,0M-"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*1.6,2),i=$n(e*.8,2);return Ba(t,r,"M-"+i+","+n+"L0,0M-"+i+",-"+n+"L0,0M"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2);return Ba(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2);return Ba(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e*2,2);return Ba(t,r,"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e*2,2);return Ba(t,r,"M0,0L-"+n+",-"+a+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2,2),a=$n(e,2);return Ba(t,r,"M0,0L"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2,2),a=$n(e,2);return Ba(t,r,"M0,0L-"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e*2,2);return Ba(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e*2,2);return Ba(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+a+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2,2),a=$n(e,2);return Ba(t,r,"M0,-"+a+"V"+a+"M0,0L"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2,2),a=$n(e,2);return Ba(t,r,"M0,-"+a+"V"+a+"M0,0L-"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(qa(t))return za;var n=DB/2.5,a=2*e*RB(n),i=2*e*IB(n);return Ba(t,r,"M0,0L"+-a+","+i+"L"+a+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(qa(t))return za;var n=DB/4,a=2*e*RB(n),i=2*e*IB(n);return Ba(t,r,"M0,0L"+-a+","+i+"A "+2*e+","+2*e+" 0 0 1 "+a+","+i+"Z")},backoff:.4,noDot:!0}};function qa(e){return e===null}var Pue,Fue,Due,Rue;function Ba(e,t,r){if((!e||e%360===0)&&!t)return r;if(Due===e&&Rue===t&&Pue===r)return Fue;Due=e,Rue=t,Pue=r;function n(_,y){var C=RB(_),k=IB(_),S=y[0],L=y[1]+(t||0);return[S*C-L*k,S*k+L*C]}for(var a=e/180*DB,i=0,o=0,s=spt(r),l="",u=0;u{"use strict";var Gc=xi(),hs=Xt(),lpt=hs.numberFormat,_m=aa(),pk=bi(),Tc=ni(),upt=js(),fT=hs.strTranslate,gk=as(),cpt=Q0(),fpt=nc(),hpt=fpt.LINE_SPACING,Wue=Y1().DESELECTDIM,dpt=Is(),vpt=lT(),ppt=Sd().appendArrayPointValue,hi=rce.exports={};hi.font=function(e,t){var r=t.variant,n=t.style,a=t.weight,i=t.color,o=t.size,s=t.family,l=t.shadow,u=t.lineposition,c=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),i&&e.call(Tc.fill,i),a&&e.style("font-weight",a),n&&e.style("font-style",n),r&&e.style("font-variant",r),c&&e.style("text-transform",zB(mpt(c))),l&&e.style("text-shadow",l==="auto"?gk.makeTextShadow(Tc.contrast(i)):zB(l)),u&&e.style("text-decoration-line",zB(ypt(u)))};function zB(e){return e==="none"?void 0:e}var gpt={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function mpt(e){return gpt[e]}function ypt(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}hi.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};hi.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};hi.setRect=function(e,t,r,n,a){e.call(hi.setPosition,t,r).call(hi.setSize,n,a)};hi.translatePoint=function(e,t,r,n){var a=r.c2p(e.x),i=n.c2p(e.y);if(_m(a)&&_m(i)&&t.node())t.node().nodeName==="text"?t.attr("x",a).attr("y",i):t.attr("transform",fT(a,i));else return!1;return!0};hi.translatePoints=function(e,t,r){e.each(function(n){var a=Gc.select(this);hi.translatePoint(n,a,t,r)})};hi.hideOutsideRangePoint=function(e,t,r,n,a,i){t.attr("display",r.isPtWithinRange(e,a)&&n.isPtWithinRange(e,i)?null:"none")};hi.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,n=t.yaxis;e.each(function(a){var i=a[0].trace,o=i.xcalendar,s=i.ycalendar,l=pk.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(l).each(function(u){hi.hideOutsideRangePoint(u,Gc.select(this),r,n,o,s)})})}};hi.crispRound=function(e,t,r){return!t||!_m(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};hi.singleLineStyle=function(e,t,r,n,a){t.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,s=a||i.dash||"";Tc.stroke(t,n||i.color),hi.dashLine(t,s,o)};hi.lineGroupStyle=function(e,t,r,n){e.style("fill","none").each(function(a){var i=(((a||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,s=n||i.dash||"";Gc.select(this).call(Tc.stroke,r||i.color).call(hi.dashLine,s,o)})};hi.dashLine=function(e,t,r){r=+r||0,t=hi.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};hi.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return e==="solid"?e="":e==="dot"?e=r+"px,"+r+"px":e==="dash"?e=3*r+"px,"+3*r+"px":e==="longdash"?e=5*r+"px,"+5*r+"px":e==="dashdot"?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":e==="longdashdot"&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e};function Yue(e,t,r,n){var a=t.fillpattern,i=t.fillgradient,o=hi.getPatternAttr,s=a&&(o(a.shape,0,"")||o(a.path,0,""));if(s){var l=o(a.bgcolor,0,null),u=o(a.fgcolor,0,null),c=a.fgopacity,f=o(a.size,0,8),v=o(a.solidity,0,.3),g=t.uid;hi.pattern(e,"point",r,g,s,f,v,void 0,a.fillmode,l,u,c)}else if(i&&i.type!=="none"){var p=i.type,x="scatterfill-"+t.uid;if(n&&(x="legendfill-"+t.uid),!n&&(i.start!==void 0||i.stop!==void 0)){var _,y;p==="horizontal"?(_={x:i.start,y:0},y={x:i.stop,y:0}):p==="vertical"&&(_={x:0,y:i.start},y={x:0,y:i.stop}),_.x=t._xA.c2p(_.x===void 0?t._extremes.x.min[0].val:_.x,!0),_.y=t._yA.c2p(_.y===void 0?t._extremes.y.min[0].val:_.y,!0),y.x=t._xA.c2p(y.x===void 0?t._extremes.x.max[0].val:y.x,!0),y.y=t._yA.c2p(y.y===void 0?t._extremes.y.max[0].val:y.y,!0),e.call($ue,r,x,"linear",i.colorscale,"fill",_,y,!0,!1)}else p==="horizontal"&&(p=p+"reversed"),e.call(hi.gradient,r,x,p,i.colorscale,"fill")}else t.fillcolor&&e.call(Tc.fill,t.fillcolor)}hi.singleFillStyle=function(e,t){var r=Gc.select(e.node()),n=r.data(),a=((n[0]||[])[0]||{}).trace||{};Yue(e,a,t,!1)};hi.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(n){var a=Gc.select(this);n[0].trace&&Yue(a,n[0].trace,t,r)})};var que=zue();hi.symbolNames=[];hi.symbolFuncs=[];hi.symbolBackOffs=[];hi.symbolNeedLines={};hi.symbolNoDot={};hi.symbolNoFill={};hi.symbolList=[];Object.keys(que).forEach(function(e){var t=que[e],r=t.n;hi.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),hi.symbolNames[r]=e,hi.symbolFuncs[r]=t.f,hi.symbolBackOffs[r]=t.backoff||0,t.needLine&&(hi.symbolNeedLines[r]=!0),t.noDot?hi.symbolNoDot[r]=!0:hi.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(hi.symbolNoFill[r]=!0)});var xpt=hi.symbolNames.length,_pt="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";hi.symbolNumber=function(e){if(_m(e))e=+e;else if(typeof e=="string"){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),e=hi.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=xpt||e>=400?0:Math.floor(Math.max(e,0))};function Xue(e,t,r,n){var a=e%100;return hi.symbolFuncs[a](t,r,n)+(e>=200?_pt:"")}var Bue=lpt("~f"),Zue={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}};hi.gradient=function(e,t,r,n,a,i){var o=Zue[n];return $ue(e,t,r,o.type,a,i,o.start,o.stop,!1,o.reversed)};function $ue(e,t,r,n,a,i,o,s,l,u){var c=a.length,f;n==="linear"?f={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:n==="radial"&&(f={node:"radialGradient",reversed:u});for(var v=new Array(c),g=0;g=0&&e.i===void 0&&(e.i=i.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),n.ms2mrc){var l;e.ms==="various"||o.size==="various"?l=3:l=n.ms2mrc(e.ms),e.mrc=l,n.selectedSizeFn&&(l=e.mrc=n.selectedSizeFn(e));var u=hi.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=GB(e,r),f=VB(e,r);t.attr("d",Xue(u,l,c,f))}var v=!1,g,p,x;if(e.so)x=s.outlierwidth,p=s.outliercolor,g=o.outliercolor;else{var _=(s||{}).width;x=(e.mlw+1||_+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?p=e.mlcc=n.lineScale(e.mlc):hs.isArrayOrTypedArray(s.color)?p=Tc.defaultLine:p=s.color,hs.isArrayOrTypedArray(o.color)&&(g=Tc.defaultLine,v=!0),"mc"in e?g=e.mcc=n.markerScale(e.mc):g=o.color||o.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(g=n.selectedColorFn(e))}let y=e.mld||(s||{}).dash;if(y&&hi.dashLine(t,y,x),e.om)t.call(Tc.stroke,g).style({"stroke-width":(x||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:x)+"px");var C=o.gradient,k=e.mgt;k?v=!0:k=C&&C.type,hs.isArrayOrTypedArray(k)&&(k=k[0],Zue[k]||(k=0));var S=o.pattern,L=hi.getPatternAttr,w=S&&(L(S.shape,e.i,"")||L(S.path,e.i,""));if(k&&k!=="none"){var A=e.mgc;A?v=!0:A=C.color;var T=r.uid;v&&(T+="-"+e.i),hi.gradient(t,a,T,k,[[0,A],[1,g]],"fill")}else if(w){var m=!1,F=S.fgcolor;!F&&i&&i.color&&(F=i.color,m=!0);var E=L(F,e.i,i&&i.color||null),I=L(S.bgcolor,e.i,null),R=S.fgopacity,B=L(S.size,e.i,8),O=L(S.solidity,e.i,.3);m=m||e.mcc||hs.isArrayOrTypedArray(S.shape)||hs.isArrayOrTypedArray(S.path)||hs.isArrayOrTypedArray(S.bgcolor)||hs.isArrayOrTypedArray(S.fgcolor)||hs.isArrayOrTypedArray(S.size)||hs.isArrayOrTypedArray(S.solidity);var V=r.uid;m&&(V+="-"+e.i),hi.pattern(t,"point",a,V,w,B,O,e.mcc,S.fillmode,I,E,R)}else hs.isArrayOrTypedArray(g)?Tc.fill(t,g[e.i]):Tc.fill(t,g);x&&Tc.stroke(t,p)}};hi.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=hi.tryColorscale(r,""),t.lineScale=hi.tryColorscale(r,"line"),pk.traceIs(e,"symbols")&&(t.ms2mrc=dpt.isBubble(e)?vpt(e):function(){return(r.size||6)/2}),e.selectedpoints&&hs.extendFlat(t,hi.makeSelectedPointStyleFns(e)),t};hi.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.marker||{},i=r.marker||{},o=n.marker||{},s=a.opacity,l=i.opacity,u=o.opacity,c=l!==void 0,f=u!==void 0;(hs.isArrayOrTypedArray(s)||c||f)&&(t.selectedOpacityFn=function(S){var L=S.mo===void 0?a.opacity:S.mo;return S.selected?c?l:L:f?u:Wue*L});var v=a.color,g=i.color,p=o.color;(g||p)&&(t.selectedColorFn=function(S){var L=S.mcc||v;return S.selected?g||L:p||L});var x=a.size,_=i.size,y=o.size,C=_!==void 0,k=y!==void 0;return pk.traceIs(e,"symbols")&&(C||k)&&(t.selectedSizeFn=function(S){var L=S.mrc||x/2;return S.selected?C?_/2:L:k?y/2:L}),t};hi.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.textfont||{},i=r.textfont||{},o=n.textfont||{},s=a.color,l=i.color,u=o.color;return t.selectedTextColorFn=function(c){var f=c.tc||s;return c.selected?l||f:u||(l?f:Tc.addOpacity(f,Wue))},t};hi.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=hi.makeSelectedPointStyleFns(t),n=t.marker||{},a=[];r.selectedOpacityFn&&a.push(function(i,o){i.style("opacity",r.selectedOpacityFn(o))}),r.selectedColorFn&&a.push(function(i,o){Tc.fill(i,r.selectedColorFn(o))}),r.selectedSizeFn&&a.push(function(i,o){var s=o.mx||n.symbol||0,l=r.selectedSizeFn(o);i.attr("d",Xue(hi.symbolNumber(s),l,GB(o,t),VB(o,t))),o.mrc2=l}),a.length&&e.each(function(i){for(var o=Gc.select(this),s=0;s0?r:0}hi.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var a=hi.makeSelectedTextStyleFns(t);n=a.selectedTextColorFn}var i=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=Gc.select(this),u=i?hs.extractOption(s,t,"txt","texttemplate"):hs.extractOption(s,t,"tx","text");if(!u&&u!==0){l.remove();return}if(i){var c=t._module.formatLabels,f=c?c(s,t,o):{},v={};ppt(v,t,s.i),u=hs.texttemplateString({data:[v,s,t._meta],fallback:t.texttemplatefallback,labels:f,locale:o._d3locale,template:u})}var g=s.tp||t.textposition,p=Jue(s,t),x=n?n(s):s.tc||t.textfont.color;l.call(hi.font,{family:s.tf||t.textfont.family,weight:s.tw||t.textfont.weight,style:s.ty||t.textfont.style,variant:s.tv||t.textfont.variant,textcase:s.tC||t.textfont.textcase,lineposition:s.tE||t.textfont.lineposition,shadow:s.tS||t.textfont.shadow,size:p,color:x}).text(u).call(gk.convertToTspans,r).call(Kue,g,p,s.mrc)})}};hi.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=hi.makeSelectedTextStyleFns(t);e.each(function(n){var a=Gc.select(this),i=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=Jue(n,t);Tc.fill(a,i);var l=pk.traceIs(t,"bar-like");Kue(a,o,s,n.mrc2||n.mrc,l)})}};var Oue=.5;hi.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],n=[],a;for(a=1;a=l||S>=c&&S<=l)&&(L<=f&&L>=u||L>=f&&L<=u)&&(e=[S,L])}return e}hi.applyBackoff=tce;hi.makeTester=function(){var e=hs.ensureSingleById(Gc.select("body"),"svg","js-plotly-tester",function(r){r.attr(cpt.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=hs.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});hi.tester=e,hi.testref=t};hi.savedBBoxes={};var BB=0,Tpt=1e4;hi.bBox=function(e,t,r){r||(r=Nue(e));var n;if(r){if(n=hi.savedBBoxes[r],n)return hs.extendFlat({},n)}else if(e.childNodes.length===1){var a=e.childNodes[0];if(r=Nue(a),r){var i=+a.getAttribute("x")||0,o=+a.getAttribute("y")||0,s=a.getAttribute("transform");if(!s){var l=hi.bBox(a,!1,r);return i&&(l.left+=i,l.right+=i),o&&(l.top+=o,l.bottom+=o),l}if(r+="~"+i+"~"+o+"~"+s,n=hi.savedBBoxes[r],n)return hs.extendFlat({},n)}}var u,c;t?u=e:(c=hi.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),Gc.select(u).attr("transform",null).call(gk.positionText,0,0);var f=u.getBoundingClientRect(),v=hi.testref.node().getBoundingClientRect();t||c.removeChild(u);var g={height:f.height,width:f.width,left:f.left-v.left,top:f.top-v.top,right:f.right-v.left,bottom:f.bottom-v.top};return BB>=Tpt&&(hi.savedBBoxes={},BB=0),r&&(hi.savedBBoxes[r]=g),BB++,hs.extendFlat({},g)};function Nue(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}hi.setClipUrl=function(e,t,r){e.attr("clip-path",UB(t,r))};function UB(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}hi.getTranslate=function(e){var t=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",a=n.replace(t,function(i,o,s){return[o,s].join(" ")}).split(" ");return{x:+a[0]||0,y:+a[1]||0}};hi.setTranslate=function(e,t,r){var n=/(\btranslate\(.*?\);?)/,a=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[a]("transform")||"";return t=t||0,r=r||0,o=o.replace(n,"").trim(),o+=fT(t,r),o=o.trim(),e[i]("transform",o),o};hi.getScale=function(e){var t=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",a=n.replace(t,function(i,o,s){return[o,s].join(" ")}).split(" ");return{x:+a[0]||1,y:+a[1]||1}};hi.setScale=function(e,t,r){var n=/(\bscale\(.*?\);?)/,a=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[a]("transform")||"";return t=t||1,r=r||1,o=o.replace(n,"").trim(),o+="scale("+t+","+r+")",o=o.trim(),e[i]("transform",o),o};var Apt=/\s*sc.*/;hi.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var n=t===1&&r===1?"":"scale("+t+","+r+")";e.each(function(){var a=(this.getAttribute("transform")||"").replace(Apt,"");a+=n,a=a.trim(),this.setAttribute("transform",a)})}};var Mpt=/translate\([^)]*\)\s*$/;hi.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,a=Gc.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),s=parseFloat(i.attr("y")||0),l=(a.attr("transform")||"").match(Mpt);t===1&&r===1?n=[]:n=[fT(o,s),"scale("+t+","+r+")",fT(-o,-s)],l&&n.push(l),a.attr("transform",n.join(""))}})};function VB(e,t){var r;return e&&(r=e.mf),r===void 0&&(r=t.marker&&t.marker.standoff||0),!t._geo&&!t._xA?-r:r}hi.getMarkerStandoff=VB;var cT=Math.atan2,Dx=Math.cos,Hb=Math.sin;function Uue(e,t){var r=t[0],n=t[1];return[r*Dx(e)-n*Hb(e),r*Hb(e)+n*Dx(e)]}var Vue,Gue,Hue,jue,OB,NB;function GB(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!_m(r)||hs.isArrayOrTypedArray(r))&&(r=0));var n,a,i=t.marker.angleref;if(i==="previous"||i==="north"){if(t._geo){var o=t._geo.project(e.lonlat);n=o[0],a=o[1]}else{var s=t._xA,l=t._yA;if(s&&l)n=s.c2p(e.x),a=l.c2p(e.y);else return 90}if(t._geo){var u=e.lonlat[0],c=e.lonlat[1],f=t._geo.project([u,c+1e-5]),v=t._geo.project([u+1e-5,c]),g=cT(v[1]-a,v[0]-n),p=cT(f[1]-a,f[0]-n),x;if(i==="north")x=r/180*Math.PI;else if(i==="previous"){var _=u/180*Math.PI,y=c/180*Math.PI,C=Vue/180*Math.PI,k=Gue/180*Math.PI,S=C-_,L=Dx(k)*Hb(S),w=Hb(k)*Dx(y)-Dx(k)*Hb(y)*Dx(S);x=-cT(L,w)-Math.PI,Vue=u,Gue=c}var A=Uue(g,[Dx(x),0]),T=Uue(p,[Hb(x),0]);r=cT(A[1]+T[1],A[0]+T[0])/Math.PI*180,i==="previous"&&!(NB===t.uid&&e.i===OB+1)&&(r=null)}if(i==="previous"&&!t._geo)if(NB===t.uid&&e.i===OB+1&&_m(n)&&_m(a)){var m=n-Hue,F=a-jue,E=t.line&&t.line.shape||"",I=E.slice(E.length-1);I==="h"&&(F=0),I==="v"&&(m=0),r+=cT(F,m)/Math.PI*180+90}else r=null}return Hue=n,jue=a,OB=e.i,NB=t.uid,r}hi.getMarkerAngle=GB});var qx=fe((Ddr,oce)=>{"use strict";var jb=xi(),Spt=aa(),Ept=Hs(),HB=bi(),zx=Xt(),nce=zx.strTranslate,mk=ea(),yk=ni(),Wb=as(),ice=Y1(),kpt=nc().OPPOSITE_SIDE,ace=/ [XY][0-9]* /,jB=1.6,WB=1.6;function Cpt(e,t,r){var n=e._fullLayout,a=r.propContainer,i=r.propName,o=r.placeholder,s=r.traceIndex,l=r.avoid||{},u=r.attributes,c=r.transform,f=r.containerGroup,v=1,g=a.title,p=(g&&g.text?g.text:"").trim(),x=!1,_=g&&g.font?g.font:{},y=_.family,C=_.size,k=_.color,S=_.weight,L=_.style,w=_.variant,A=_.textcase,T=_.lineposition,m=_.shadow,F=r.subtitlePropName,E=!!F,I=r.subtitlePlaceholder,R=(a.title||{}).subtitle||{text:"",font:{}},B=(R.text||"").trim(),O=!1,V=1,j=R.font,q=j.family,U=j.size,J=j.color,ee=j.weight,ce=j.style,ye=j.variant,xe=j.textcase,ue=j.lineposition,K=j.shadow,_e;i==="title.text"?_e="titleText":i.indexOf("axis")!==-1?_e="axisTitleText":i.indexOf("colorbar")!==-1&&(_e="colorbarTitleText");var ne=e._context.edits[_e];function ae(et,qe){return et===void 0||qe===void 0?!1:et.replace(ace," % ")===qe.replace(ace," % ")}p===""?v=0:ae(p,o)&&(ne||(p=""),v=.2,x=!0),E&&(B===""?V=0:ae(B,I)&&(ne||(B=""),V=.2,O=!0)),r._meta?p=zx.templateString(p,r._meta):n._meta&&(p=zx.templateString(p,n._meta));var pe=p||B||ne,ie;f||(f=zx.ensureSingle(n._infolayer,"g","g-"+t),ie=n._hColorbarMoveTitle);var le=f.selectAll("text."+t).data(pe?[0]:[]);le.enter().append("text"),le.text(p).attr("class",t),le.exit().remove();var me=null,be=t+"-subtitle",De=B||ne;if(E&&(me=f.selectAll("text."+be).data(De?[0]:[]),me.enter().append("text"),me.text(B).attr("class",be),me.exit().remove()),!pe)return f;function Ge(et,qe){zx.syncOrAsync([ht,it],{title:et,subtitle:qe})}function ht(et){var qe=et.title,we=et.subtitle,Le;!c&&ie&&(c={}),c?(Le="",c.rotate&&(Le+="rotate("+[c.rotate,u.x,u.y]+")"),(c.offset||ie)&&(Le+=nce(0,(c.offset||0)-(ie||0)))):Le=null,qe.attr("transform",Le);function Ke(nt){if(nt){var We=jb.select(nt.node().parentNode).select("."+be);if(!We.empty()){var mt=nt.node().getBBox();if(mt.height){var bt=mt.y+mt.height+jB*U;We.attr("y",bt)}}}}if(qe.style("opacity",v*yk.opacity(k)).call(mk.font,{color:yk.rgb(k),size:jb.round(C,2),family:y,weight:S,style:L,variant:w,textcase:A,shadow:m,lineposition:T}).attr(u).call(Wb.convertToTspans,e,Ke),we&&!we.empty()){var Te=f.select("."+t+"-math-group"),Ve=qe.node().getBBox(),$e=Te.node()?Te.node().getBBox():void 0,ot=$e?$e.y+$e.height+jB*U:Ve.y+Ve.height+WB*U,tt=zx.extendFlat({},u,{y:ot});we.attr("transform",Le),we.style("opacity",V*yk.opacity(J)).call(mk.font,{color:yk.rgb(J),size:jb.round(U,2),family:q,weight:ee,style:ce,variant:ye,textcase:xe,shadow:K,lineposition:ue}).attr(tt).call(Wb.convertToTspans,e)}return Ept.previousPromises(e)}function it(et){var qe=et.title,we=jb.select(qe.node().parentNode);if(l&&l.selection&&l.side&&p){we.attr("transform",null);var Le=kpt[l.side],Ke=l.side==="left"||l.side==="top"?-1:1,Te=Spt(l.pad)?l.pad:2,Ve=mk.bBox(we.node()),$e={t:0,b:0,l:0,r:0},ot=e._fullLayout._reservedMargin;for(var tt in ot)for(var nt in ot[tt]){var We=ot[tt][nt];$e[nt]=Math.max($e[nt],We)}var mt={left:$e.l,top:$e.t,right:n.width-$e.r,bottom:n.height-$e.b},bt=l.maxShift||Ke*(mt[l.side]-Ve[l.side]),Yt=0;if(bt<0)Yt=bt;else{var jt=l.offsetLeft||0,mr=l.offsetTop||0;Ve.left-=jt,Ve.right-=jt,Ve.top-=mr,Ve.bottom-=mr,l.selection.each(function(){var fr=mk.bBox(this);zx.bBoxIntersect(Ve,fr,Te)&&(Yt=Math.max(Yt,Ke*(fr[l.side]-Ve[Le])+Te))}),Yt=Math.min(bt,Yt),a._titleScoot=Math.abs(Yt)}if(Yt>0||bt<0){var or={left:[-Yt,0],right:[Yt,0],top:[0,-Yt],bottom:[0,Yt]}[l.side];we.attr("transform",nce(or[0],or[1]))}}}le.call(Ge,me);function Oe(et,qe){et.text(qe).on("mouseover.opacity",function(){jb.select(this).transition().duration(ice.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){jb.select(this).transition().duration(ice.HIDE_PLACEHOLDER).style("opacity",0)})}if(ne&&(p?le.on(".opacity",null):(Oe(le,o),x=!0),le.call(Wb.makeEditable,{gd:e}).on("edit",function(et){s!==void 0?HB.call("_guiRestyle",e,i,et,s):HB.call("_guiRelayout",e,i,et)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ge)}).on("input",function(et){this.text(et||" ").call(Wb.positionText,u.x,u.y)}),E)){if(E&&!p){var ze=le.node().getBBox(),ct=ze.y+ze.height+WB*U;me.attr("y",ct)}B?me.on(".opacity",null):(Oe(me,I),O=!0),me.call(Wb.makeEditable,{gd:e}).on("edit",function(et){HB.call("_guiRelayout",e,"title.subtitle.text",et)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ge)}).on("input",function(et){this.text(et||" ").call(Wb.positionText,me.attr("x"),me.attr("y"))})}return le.classed("js-placeholder",x),me&&!me.empty()&&me.classed("js-placeholder",O),f}oce.exports={draw:Cpt,SUBTITLE_PADDING_EM:WB,SUBTITLE_PADDING_MATHJAX_EM:jB}});var Hp=fe((Rdr,fce)=>{"use strict";var Lpt=xi(),Ppt=lb().utcFormat,zs=Xt(),Fpt=zs.numberFormat,Vp=aa(),bm=zs.cleanNumber,Dpt=zs.ms2DateTime,sce=zs.dateTime2ms,Gp=zs.ensureNumber,lce=zs.isArrayOrTypedArray,wm=Wa(),xk=wm.FP_SAFE,tp=wm.BADNUM,Rpt=wm.LOG_CLIP,Ipt=wm.ONEWEEK,_k=wm.ONEDAY,bk=wm.ONEHOUR,uce=wm.ONEMIN,cce=wm.ONESEC,wk=El(),Mk=rc(),Tk=Mk.HOUR_PATTERN,Ak=Mk.WEEKDAY_PATTERN;function hT(e){return Math.pow(10,e)}function YB(e){return e!=null}fce.exports=function(t,r){r=r||{};var n=t._id||"x",a=n.charAt(0);function i(S,L){if(S>0)return Math.log(S)/Math.LN10;if(S<=0&&L&&t.range&&t.range.length===2){var w=t.range[0],A=t.range[1];return .5*(w+A-2*Rpt*Math.abs(w-A))}else return tp}function o(S,L,w,A){if((A||{}).msUTC&&Vp(S))return+S;var T=sce(S,w||t.calendar);if(T===tp)if(Vp(S)){S=+S;var m=Math.floor(zs.mod(S+.05,1)*10),F=Math.round(S-m/10);T=sce(new Date(F))+m/10}else return tp;return T}function s(S,L,w){return Dpt(S,L,w||t.calendar)}function l(S){return t._categories[Math.round(S)]}function u(S){if(YB(S)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[S]!==void 0)return t._categoriesMap[S];t._categories.push(typeof S=="number"?String(S):S);var L=t._categories.length-1;return t._categoriesMap[S]=L,L}return tp}function c(S,L){for(var w=new Array(L),A=0;At.range[1]&&(w=!w);for(var A=w?-1:1,T=A*S,m=0,F=0;FI)m=F+1;else{m=T<(E+I)/2?F:F+1;break}}var R=t._B[m]||0;return isFinite(R)?p(S,t._m2,R):0},y=function(S){var L=t._rangebreaks.length;if(!L)return x(S,t._m,t._b);for(var w=0,A=0;At._rangebreaks[A].pmax&&(w=A+1);return x(S,t._m2,t._B[w])}}t.c2l=t.type==="log"?i:Gp,t.l2c=t.type==="log"?hT:Gp,t.l2p=_,t.p2l=y,t.c2p=t.type==="log"?function(S,L){return _(i(S,L))}:_,t.p2c=t.type==="log"?function(S){return hT(y(S))}:y,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=bm,t.c2d=t.c2r=t.l2d=t.l2r=Gp,t.d2p=t.r2p=function(S){return t.l2p(bm(S))},t.p2d=t.p2r=y,t.cleanPos=Gp):t.type==="log"?(t.d2r=t.d2l=function(S,L){return i(bm(S),L)},t.r2d=t.r2c=function(S){return hT(bm(S))},t.d2c=t.r2l=bm,t.c2d=t.l2r=Gp,t.c2r=i,t.l2d=hT,t.d2p=function(S,L){return t.l2p(t.d2r(S,L))},t.p2d=function(S){return hT(y(S))},t.r2p=function(S){return t.l2p(bm(S))},t.p2r=y,t.cleanPos=Gp):t.type==="date"?(t.d2r=t.r2d=zs.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(S,L,w){return t.l2p(o(S,0,w))},t.p2d=t.p2r=function(S,L,w){return s(y(S),L,w)},t.cleanPos=function(S){return zs.cleanDate(S,tp,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=u,t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=v,t.r2c=function(S){var L=g(S);return L!==void 0?L:t.fraction2r(.5)},t.l2r=t.c2r=Gp,t.r2l=g,t.d2p=function(S){return t.l2p(t.r2c(S))},t.p2d=function(S){return l(y(S))},t.r2p=t.d2p,t.p2r=y,t.cleanPos=function(S){return typeof S=="string"&&S!==""?S:Gp(S)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=v,t.r2c=function(S){var L=v(S);return L!==void 0?L:t.fraction2r(.5)},t.r2c_just_indices=f,t.l2r=t.c2r=Gp,t.r2l=v,t.d2p=function(S){return t.l2p(t.r2c(S))},t.p2d=function(S){return l(y(S))},t.r2p=t.d2p,t.p2r=y,t.cleanPos=function(S){return Array.isArray(S)||typeof S=="string"&&S!==""?S:Gp(S)},t.setupMultiCategory=function(S){var L=t._traceIndices,w,A,T=t._matchGroup;if(T&&t._categories.length===0){for(var m in T)if(m!==n){var F=r[wk.id2name(m)];L=L.concat(F._traceIndices)}}var E=[[0,{}],[0,{}]],I=[];for(w=0;wF[1]&&(A[m?0:1]=w,T[1]=F[1]),T[0]>=T[1])if(L!==void 0){var E=F[0]+1;w!==void 0&&(E=Math.min(E,F[1])),A[m?0:1]=t.l2r(E)}else w!==void 0&&(A[m?1:0]=t.l2r(F[1]-1))}},t.cleanRange=function(S,L){t._cleanRange(S,L),t.limitRange(S)},t._cleanRange=function(S,L){L||(L={}),S||(S="range");var w=zs.nestedProperty(t,S).get(),A,T;if(t.type==="date"?T=zs.dfltRange(t.calendar):a==="y"?T=Mk.DFLTRANGEY:t._name==="realaxis"?T=[0,1]:T=L.dfltRange||Mk.DFLTRANGEX,T=T.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(T[0]=0),!w||w.length!==2){zs.nestedProperty(t,S).set(T);return}var m=w[0]===null,F=w[1]===null;for(t.type==="date"&&!t.autorange&&(w[0]=zs.cleanDate(w[0],tp,t.calendar),w[1]=zs.cleanDate(w[1],tp,t.calendar)),A=0;A<2;A++)if(t.type==="date"){if(!zs.isDateTime(w[A],t.calendar)){t[S]=T;break}if(t.r2l(w[0])===t.r2l(w[1])){var E=zs.constrain(t.r2l(w[0]),zs.MIN_MS+1e3,zs.MAX_MS-1e3);w[0]=t.l2r(E-1e3),w[1]=t.l2r(E+1e3);break}}else{if(!Vp(w[A]))if(!(m||F)&&Vp(w[1-A]))w[A]=w[1-A]*(A?10:.1);else{t[S]=T;break}if(w[A]<-xk?w[A]=-xk:w[A]>xk&&(w[A]=xk),w[0]===w[1]){var I=Math.max(1,Math.abs(w[0]*1e-6));w[0]-=I,w[1]+=I}}},t.setScale=function(S){var L=r._size;if(t.overlaying){var w=wk.getFromId({_fullLayout:r},t.overlaying);t.domain=w.domain}var A=S&&t._r?"_r":"range",T=t.calendar;t.cleanRange(A);var m=t.r2l(t[A][0],T),F=t.r2l(t[A][1],T),E=a==="y";if(E?(t._offset=L.t+(1-t.domain[1])*L.h,t._length=L.h*(t.domain[1]-t.domain[0]),t._m=t._length/(m-F),t._b=-t._m*F):(t._offset=L.l+t.domain[0]*L.w,t._length=L.w*(t.domain[1]-t.domain[0]),t._m=t._length/(F-m),t._b=-t._m*m),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var I,R;if(t._rangebreaks=t.locateBreaks(Math.min(m,F),Math.max(m,F)),t._rangebreaks.length){for(I=0;IF&&(B=!B),B&&t._rangebreaks.reverse();var O=B?-1:1;for(t._m2=O*t._length/(Math.abs(F-m)-t._lBreaks),t._B.push(-t._m2*(E?F:m)),I=0;IT&&(T+=7,mT&&(T+=24,m=A&&m=A&&S=K.min&&(ceK.max&&(K.max=ye),xe=!1)}xe&&F.push({min:ce,max:ye})}};for(w=0;w{"use strict";var hce=aa(),XB=Xt(),zpt=Wa().BADNUM,Sk=XB.isArrayOrTypedArray,qpt=XB.isDateTime,Bpt=XB.cleanNumber,dce=Math.round;pce.exports=function(t,r,n){var a=t,i=n.noMultiCategory;if(Sk(a)&&!a.length)return"-";if(!i&&Gpt(a))return"multicategory";if(i&&Array.isArray(a[0])){for(var o=[],s=0;si*2}function vce(e){return Math.max(1,(e-1)/1e3)}function Vpt(e,t){for(var r=e.length,n=vce(r),a=0,i=0,o={},s=0;sa*2}function Gpt(e){return Sk(e[0])&&Sk(e[1])}});var rp=fe((zdr,Tce)=>{"use strict";var Hpt=xi(),xce=aa(),Tm=Xt(),Ek=Wa().FP_SAFE,jpt=bi(),Wpt=ea(),_ce=El(),Ypt=_ce.getFromId,Xpt=_ce.isLinked;Tce.exports={applyAutorangeOptions:wce,getAutoRange:ZB,makePadFn:$B,doAutoRange:$pt,findExtremes:Kpt,concatExtremes:QB};function ZB(e,t){var r,n,a=[],i=e._fullLayout,o=$B(i,t,0),s=$B(i,t,1),l=QB(e,t),u=l.min,c=l.max;if(u.length===0||c.length===0)return Tm.simpleMap(t.range,t.r2l);var f=u[0].val,v=c[0].val;for(r=1;r0&&(F=k-o(w)-s(A),F>S?E/F>L&&(T=w,m=A,L=E/F):E/k>L&&(T={val:w.val,nopad:1},m={val:A.val,nopad:1},L=E/k));function I(j,q){return Math.max(j,s(q))}if(f===v){var R=f-1,B=f+1;if(y)if(f===0)a=[0,1];else{var O=(f>0?c:u).reduce(I,0),V=f/(1-Math.min(.5,O/k));a=f>0?[0,V]:[V,0]}else C?a=[Math.max(0,R),Math.max(1,B)]:a=[R,B]}else y?(T.val>=0&&(T={val:0,nopad:1}),m.val<=0&&(m={val:0,nopad:1})):C&&(T.val-L*o(T)<0&&(T={val:0,nopad:1}),m.val<=0&&(m={val:1,nopad:1})),L=(m.val-T.val-gce(t,w.val,A.val))/(k-o(T)-s(m)),a=[T.val-L*o(T),m.val+L*s(m)];return a=wce(a,t),t.limitRange&&t.limitRange(),p&&a.reverse(),Tm.simpleMap(a,t.l2r||Number)}function gce(e,t,r){var n=0;if(e.rangebreaks)for(var a=e.locateBreaks(t,r),i=0;i0?r.ppadplus:r.ppadminus)||r.ppad||0),w=S((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),A=S(r.vpadplus||r.vpad),T=S(r.vpadminus||r.vpad);if(!u){if(C=1/0,k=-1/0,l)for(f=0;f0&&(C=v),v>k&&v-Ek&&(C=v),v>k&&v=E;f--)F(f);return{min:n,max:a,opts:r}}function KB(e,t,r,n){bce(e,t,r,n,Jpt)}function JB(e,t,r,n){bce(e,t,r,n,Qpt)}function bce(e,t,r,n,a){for(var i=n.tozero,o=n.extrapad,s=!0,l=0;l=r&&(u.extrapad||!o)){s=!1;break}else a(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=i&&t===0;e.push({val:t,pad:c?0:r,extrapad:c?!1:o})}}function yce(e){return xce(e)&&Math.abs(e)=t}function e1t(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&kk(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&kk(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function t1t(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&kk(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&kk(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function kk(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t=l&&(i=l,r=l),o<=l&&(o=l,n=l)}}return r=e1t(r,t),n=t1t(n,t),[r,n]}});var Yi=fe((Bdr,Wce)=>{"use strict";var tv=xi(),Du=aa(),Xb=Hs(),vT=bi(),ga=Xt(),Zb=ga.strTranslate,Bx=as(),r1t=qx(),pT=ni(),M0=ea(),n1t=pf(),Ace=TB(),qdr=rc(),Xf=Wa(),i1t=Xf.ONEMAXYEAR,Pk=Xf.ONEAVGYEAR,Fk=Xf.ONEMINYEAR,a1t=Xf.ONEMAXQUARTER,nO=Xf.ONEAVGQUARTER,Dk=Xf.ONEMINQUARTER,o1t=Xf.ONEMAXMONTH,$b=Xf.ONEAVGMONTH,Rk=Xf.ONEMINMONTH,S0=Xf.ONEWEEK,Qh=Xf.ONEDAY,Am=Qh/2,Wp=Xf.ONEHOUR,gT=Xf.ONEMIN,Ik=Xf.ONESEC,s1t=Xf.ONEMILLI,l1t=Xf.ONEMICROSEC,Ox=Xf.MINUS_SIGN,qk=Xf.BADNUM,iO={K:"zeroline"},aO={K:"gridline",L:"path"},oO={K:"minor-gridline",L:"path"},Ice={K:"tick",L:"path"},Mce={K:"tick",L:"text"},Sce={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Bk=nc(),dT=Bk.MID_SHIFT,Nx=Bk.CAP_SHIFT,mT=Bk.LINE_SPACING,u1t=Bk.OPPOSITE_SIDE,zk=3,Rn=Wce.exports={};Rn.setConvert=Hp();var c1t=Yb(),Yp=El(),f1t=Yp.idSort,h1t=Yp.isLinked;Rn.id2name=Yp.id2name;Rn.name2id=Yp.name2id;Rn.cleanId=Yp.cleanId;Rn.list=Yp.list;Rn.listIds=Yp.listIds;Rn.getFromId=Yp.getFromId;Rn.getFromTrace=Yp.getFromTrace;var zce=rp();Rn.getAutoRange=zce.getAutoRange;Rn.findExtremes=zce.findExtremes;var d1t=1e-4;function cO(e){var t=(e[1]-e[0])*d1t;return[e[0]-t,e[1]+t]}function v1t(e,t,r){if(![r,e,t].every(Du)||r===0)return e;let n=Math.round((e-t)/r),a=t+n*r;return e!==a&&Math.abs(e-a)v+" domain")),l=l.concat(i||[]),c.length>o?(ga.warn("Array attribute "+u+" has more entries than expected, truncating to "+o),c=c.slice(0,o)):c.length2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};Rn.saveRangeInitial=function(e,t){for(var r=Rn.list(e,"",!0),n=!1,a=0;af*.3||u(n)||u(a))){var v=r.dtick/2;e+=e+vo){var s=Number(r.slice(1));i.exactYears>o&&s%12===0?e=Rn.tickIncrement(e,"M6","reverse")+Qh*1.5:i.exactMonths>o?e=Rn.tickIncrement(e,"M1","reverse")+Qh*15.5:e-=Am;var l=Rn.tickIncrement(e,r);if(l<=n)return l}return e}Rn.prepMinorTicks=function(e,t,r){var f,v;if(!((f=t.minor)!=null&&f.dtick)){delete e.dtick;var n=t.dtick&&Du(t._tmin),a;if(n){var i=Rn.tickIncrement(t._tmin,t.dtick,!0);a=[t._tmin,i*.99+t._tmin*.01]}else{var o=ga.simpleMap(t.range,t.r2l);a=[o[0],.8*o[0]+.2*o[1]]}if(e.range=ga.simpleMap(a,t.l2r),e._isMinor=!0,Rn.prepTicks(e,r),n){var s=Du(t.dtick),l=Du(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?eO(u,c)?u===2*S0&&c===2*Qh&&(e.dtick=S0):u===2*S0&&c===3*Qh?e.dtick=S0:u===S0&&!(t._input.minor||{}).nticks?e.dtick=Qh:Cce(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)==="M"?l?e.dtick="M1":eO(u,c)?u>=12&&c===2&&(e.dtick="M3"):e.dtick=t.dtick:String(e.dtick).charAt(0)==="L"?String(t.dtick).charAt(0)==="L"?eO(u,c)||(e.dtick=Cce(u/c,2.5)?t.dtick/2:t.dtick):e.dtick="D1":e.dtick==="D2"&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}((v=t.minor)==null?void 0:v._tick0Init)===void 0&&(e.tick0=t.tick0)};function eO(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function Cce(e,t){return Math.abs(e/t-1)<.001}Rn.prepTicks=function(e,t){var r=ga.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode==="auto"||!e.dtick){var n=e.nticks,a;n||(e.type==="category"||e.type==="multicategory"?(a=e.tickfont?ga.bigFont(e.tickfont.size||12):15,n=e._length/a):(a=e._id.charAt(0)==="y"?40:80,n=ga.constrain(e._length/a,4,9)+1),e._name==="radialaxis"&&(n*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(n*=100),e._roughDTick=Math.abs(r[1]-r[0])/n,Rn.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(i=n-1,o=n):(i=n,o=n);var s=e[i].value,l=e[o].value,u=Math.abs(l-s),c=r||u,f=0;c>=Fk?u>=Fk&&u<=i1t?f=u:f=Pk:r===nO&&c>=Dk?u>=Dk&&u<=a1t?f=u:f=nO:c>=Rk?u>=Rk&&u<=o1t?f=u:f=$b:r===S0&&c>=S0?f=S0:c>=Qh?f=Qh:r===Am&&c>=Am?f=Am:r===Wp&&c>=Wp&&(f=Wp);var v;f>=u&&(f=u,v=!0);var g=a+f;if(t.rangebreaks&&f>0){for(var p=84,x=0,_=0;_S0&&(f=u)}(f>0||n===0)&&(e[n].periodX=a+f/2)}}Rn.calcTicks=function(t,r){for(var n=t.type,a=t.calendar,i=t.ticklabelstep,o=t.ticklabelmode==="period",s=t.range[0]>t.range[1],l=!t.ticklabelindex||ga.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],u=ga.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]=(S?0:1);L--){var w=!L;L?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):S&&(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var A=L?t:ga.extendFlat({},t,S?t.minor:{minor:{}});if(w?Rn.prepMinorTicks(A,t,r):Rn.prepTicks(A,r),A.tickmode==="array"){L?(_=[],p=Lce(t,!w)):(y=[],x=Lce(t,!w));continue}if(A.tickmode==="sync"){_=[],p=_1t(t);continue}var T=cO(u),m=T[0],F=T[1],E=Du(A.dtick),I=n==="log"&&!(E||A.dtick.charAt(0)==="L"),R=Rn.tickFirst(A,r);if(L){if(t._tmin=R,R=F:O<=F;O=Rn.tickIncrement(O,q,c,a)){if(L&&V++,A.rangebreaks&&!c){if(O=v)break}if(_.length>g||O===B)break;B=O;var J={value:v1t(O,U,q)};L?(O===R&&(J.first=!0),I&&O!==(O|0)&&(J.simpleLabel=!0),i>1&&V%i&&(J.skipLabel=!0),_.push(J)):(J.minor=!0,y.push(J))}}if(!y||y.length<3)l=!1;else{var ee=(y[2].value-y[1].value)*(s?-1:1);j1t(ee,t.tickformat)||(l=!1,y=y.slice(1))}if(!l)C=_;else{var ce=_.concat(y);o&&_.length&&(ce=ce.slice(1)),ce=ce.sort(function(qe,we){return qe.value-we.value}).filter(function(qe,we,Le){return we===0||qe.value!==Le[we-1].value});var ye=ce.map(function(qe,we){return qe.minor===void 0&&!qe.skipLabel?we:null}).filter(function(qe){return qe!==null});ye.forEach(function(qe){l.map(function(we){var Le=qe+we;Le>=0&&Le-1;le--){if(_[le].drop){_.splice(le,1);continue}_[le].value=rO(_[le].value,t);var Ge=t.c2p(_[le].value);(me?De>Ge-be:Dev||Kev&&(Le.periodX=v),Kea&&pa&&_Pk)t/=Pk,n=a(10),e.dtick="M"+12*jp(t,n,Ck);else if(i>$b)t/=$b,e.dtick="M"+jp(t,1,Pce);else if(i>Qh){if(e.dtick=jp(t,Qh,e._hasDayOfWeekBreaks?[1,2,7,14]:b1t),!r){var o=Rn.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=ga.dateTick0(e.calendar,2):e.tick0=ga.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else i>Wp?e.dtick=jp(t,Wp,Pce):i>gT?e.dtick=jp(t,gT,Fce):i>Ik?e.dtick=jp(t,Ik,Fce):(n=a(10),e.dtick=jp(t,n,Ck))}else if(e.type==="log"){e.tick0=0;var l=ga.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(l[1]-l[0])<1){var u=1.5*Math.abs((l[1]-l[0])/t);t=Math.abs(Math.pow(10,l[1])-Math.pow(10,l[0]))/u,n=a(10),e.dtick="L"+jp(t,n,Ck)}else e.dtick=t>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):vO(e)?(e.tick0=0,n=1,e.dtick=jp(t,n,w1t)):(e.tick0=0,n=a(10),e.dtick=jp(t,n,Ck));if(e.dtick===0&&(e.dtick=1),!Du(e.dtick)&&typeof e.dtick!="string"){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}};function Nce(e){var t=e.dtick;if(e._tickexponent=0,!Du(t)&&typeof t!="string"&&(t=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var r=e.r2l(e.tick0),n=e.l2r(r).replace(/(^-|i)/g,""),a=n.length;if(String(t).charAt(0)==="M")a>10||n.slice(5)!=="01-01"?e._tickround="d":e._tickround=+t.slice(1)%12===0?"y":"m";else if(t>=Qh&&a<=10||t>=Qh*15)e._tickround="d";else if(t>=gT&&a<=16||t>=Wp)e._tickround="M";else if(t>=Ik&&a<=19||t>=gT)e._tickround="S";else{var i=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(a,i)-20,e._tickround<0&&(e._tickround=4)}}else if(Du(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);Du(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(l)>u&&(Kb(e.exponentformat)&&e.exponentformat!=="SI extended"&&!fO(l)||Kb(e.exponentformat)&&e.exponentformat==="SI extended"&&!hO(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}Rn.tickIncrement=function(e,t,r,n){var a=r?-1:1;if(Du(t))return ga.increment(e,a*t);var i=t.charAt(0),o=a*Number(t.slice(1));if(i==="M")return ga.incrementMonth(e,o,n);if(i==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(i==="D"){var s=t==="D2"?Oce:Bce,l=e+a*.01,u=ga.roundUp(ga.mod(l,1),s,r);return Math.floor(l)+Math.log(tv.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(t)};Rn.tickFirst=function(e,t){var r=e.r2l||Number,n=ga.simpleMap(e.range,r,void 0,void 0,t),a=n[1]=0&&S<=e._length?k:null};if(l&&ga.isArrayOrTypedArray(e.ticktext)){var p=ga.simpleMap(e.range,e.r2l),x=(Math.abs(p[1]-p[0])-(e._lBreaks||0))/1e4;for(v=0;v"+s;else{var u=xT(e),c=e._trueSide||e.side;(!u&&c==="top"||u&&c==="bottom")&&(o+="
")}t.text=o}function A1t(e,t,r,n,a){var i=e.dtick,o=t.x,s=e.tickformat,l=typeof i=="string"&&i.charAt(0);if(a==="never"&&(a=""),n&&l!=="L"&&(i="L3",l="L"),s||l==="L")t.text=yT(Math.pow(10,o),e,a,n);else if(Du(i)||l==="D"&&(e.minorloglabels==="complete"||ga.mod(o+.01,1)<.1)){var u;e.minorloglabels==="complete"&&!(ga.mod(o+.01,1)<.1)&&(u=!0,t.fontSize*=.75);var c=Math.pow(10,o).toExponential(0),f=c.split("e"),v=+f[1],g=Math.abs(v),p=e.exponentformat;p==="power"||Kb(p)&&p!=="SI extended"&&fO(v)||Kb(p)&&p==="SI extended"&&hO(v)?(t.text=f[0],g>0&&(t.text+="x10"),t.text==="1x10"&&(t.text="10"),v!==0&&v!==1&&(t.text+=""+(v>0?"":Ox)+g+""),t.fontSize*=1.25):(p==="e"||p==="E")&&g>2?t.text=f[0]+p+(v>0?"+":Ox)+g:(t.text=yT(Math.pow(10,o),e,"","fakehover"),i==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(l==="D")t.text=e.minorloglabels==="none"?"":String(Math.round(Math.pow(10,ga.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(i);if(e.dtick==="D1"){var x=String(t.text).charAt(0);(x==="0"||x==="1")&&(e._id.charAt(0)==="y"?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(o<0?.5:.25)))}}function M1t(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function S1t(e,t,r){var n=Math.round(t.x),a=e._categories[n]||[],i=a[1]===void 0?"":String(a[1]),o=a[0]===void 0?"":String(a[0]);r?t.text=o+" - "+i:(t.text=i,t.text2=o)}function E1t(e,t,r,n,a){a==="never"?a="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide"),t.text=yT(t.x,e,a,n)}function k1t(e,t,r,n,a){if(e.thetaunit==="radians"&&!r){var i=t.x/180;if(i===0)t.text="0";else{var o=C1t(i);if(o[1]>=100)t.text=yT(ga.deg2rad(t.x),e,a,n);else{var s=t.x<0;o[1]===1?o[0]===1?t.text="\u03C0":t.text=o[0]+"\u03C0":t.text=["",o[0],"","\u2044","",o[1],"","\u03C0"].join(""),s&&(t.text=Ox+t.text)}}}else t.text=yT(t.x,e,a,n)}function C1t(e){function t(s,l){return Math.abs(s-l)<=1e-6}function r(s,l){return t(l,0)?s:r(l,s%l)}function n(s){for(var l=1;!t(Math.round(s*l)/l,s);)l*=10;return l}var a=n(e),i=e*a,o=Math.abs(r(i,a));return[Math.round(i/o),Math.round(a/o)]}var Vce=["f","p","n","\u03BC","m","","k","M","G","T"],L1t=["q","r","y","z","a",...Vce,"P","E","Z","Y","R","Q"],Kb=e=>["SI","SI extended","B"].includes(e);function fO(e){return e>14||e<-15}function hO(e){return e>32||e<-30}function P1t(e,t){return Kb(t)?!!(t==="SI extended"&&hO(e)||t!=="SI extended"&&fO(e)):!1}function yT(e,t,r,n){var a=e<0,i=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,l=Rn.getTickFormat(t),u=t.separatethousands;if(n){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:Du(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};Nce(c),i=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,Ox);o==="none"&&(s=0),e=Math.abs(e);let f=Math.pow(10,-i)/2;if(e"+v+"":o==="B"&&s===9?e+="B":Kb(o)&&(e+=o==="SI extended"?L1t[s/3+10]:Vce[s/3+5])}return a?Ox+e:e}Rn.getTickFormat=function(e){var t;function r(l){return typeof l!="string"?l:Number(l.replace("M",""))*$b}function n(l,u){var c=["L","D"];if(typeof l==typeof u){if(typeof l=="number")return l-u;var f=c.indexOf(l.charAt(0)),v=c.indexOf(u.charAt(0));return f===v?Number(l.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):f-v}else return typeof l=="number"?1:-1}function a(l,u,c){var f=c||function(p){return p},v=u[0],g=u[1];return(!v&&typeof v!="number"||f(v)<=f(l))&&(!g&&typeof g!="number"||f(g)>=f(l))}function i(l,u){var c=u[0]===null,f=u[1]===null,v=n(l,u[0])>=0,g=n(l,u[1])<=0;return(c||v)&&(f||g)}var o,s;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(t=0;t=0&&a.unshift(a.splice(c,1).shift())}});var s={false:{left:0,right:0}};return ga.syncOrAsync(a.map(function(l){return function(){if(l){var u=Rn.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=Rn.drawOne(e,u,r);return u._shiftPusher&&uO(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=ga.simpleMap(u._r,u.r2l),c}}}))};Rn.drawOne=function(e,t,r){r=r||{};var n=r.axShifts||{},a=r.overlayingShiftedAx||[],i,o,s;t.setScale();var l=e._fullLayout,u=t._id,c=u.charAt(0),f=Rn.counterLetter(u),v=l._plots[t._mainSubplot],g=t.zerolinelayer==="above traces";if(!v)return;if(t._shiftPusher=t.autoshift||a.indexOf(t._id)!==-1||a.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var p=t.linewidth/2||0;t.ticks==="inside"&&(p+=t.ticklen),uO(t,p,n,!0),uO(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=H1t(t,n));var x=v[c+"axislayer"],_=t._mainLinePosition,y=_+=t._shift,C=t._mainMirrorPosition,k=t._vals=Rn.calcTicks(t),S=[t.mirror,y,C].join("_");for(i=0;i0?we.bottom-et:0,qe))));var Ve=0,$e=0;if(t._shiftPusher&&(Ve=Math.max(qe,we.height>0?ze==="l"?et-we.left:we.right-et:0),t.title.text!==l._dfltTitle[c]&&($e=(t._titleStandoff||0)+(t._titleScoot||0),ze==="l"&&($e+=Rce(t))),t._fullDepth=Math.max(Ve,$e)),t.automargin){Le={x:0,y:0,r:0,l:0,t:0,b:0};var ot=[0,1],tt=typeof t._shift=="number"?t._shift:0;if(c==="x"){if(ze==="b"?Le[ze]=t._depth:(Le[ze]=t._depth=Math.max(we.width>0?et-we.top:0,qe),ot.reverse()),we.width>0){var nt=we.right-(t._offset+t._length);nt>0&&(Le.xr=1,Le.r=nt);var We=t._offset-we.left;We>0&&(Le.xl=0,Le.l=We)}}else if(ze==="l"?(t._depth=Math.max(we.height>0?et-we.left:0,qe),Le[ze]=t._depth-tt):(t._depth=Math.max(we.height>0?we.right-et:0,qe),Le[ze]=t._depth+tt,ot.reverse()),we.height>0){var mt=we.bottom-(t._offset+t._length);mt>0&&(Le.yb=0,Le.b=mt);var bt=t._offset-we.top;bt>0&&(Le.yt=1,Le.t=bt)}Le[f]=t.anchor==="free"?t.position:t._anchorAxis.domain[ot[0]],t.title.text!==l._dfltTitle[c]&&(Le[ze]+=Rce(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(Ke={x:0,y:0,r:0,l:0,t:0,b:0},Ke[ct]=t.linewidth,t.mirror&&t.mirror!==!0&&(Ke[ct]+=qe),t.mirror===!0||t.mirror==="ticks"?Ke[f]=t._anchorAxis.domain[ot[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(Ke[f]=[t._counterDomainMin,t._counterDomainMax][ot[1]]))}Oe&&(Te=vT.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(Dce(Le,t.automargin),Dce(Ke,t.automargin)),Xb.autoMargin(e,dO(t),Le),Xb.autoMargin(e,Hce(t),Ke),Xb.autoMargin(e,jce(t),Te)}),ga.syncOrAsync(ht)}};function Dce(e,t){if(e){var r=Object.keys(Sce).reduce(function(n,a){return t.indexOf(a)!==-1&&Sce[a].forEach(function(i){n[i]=1}),n},{});Object.keys(e).forEach(function(n){r[n]||(n.length===1?e[n]=0:delete e[n])})}}function F1t(e,t){var r=[],n,a=function(i,o){var s=i.xbnd[o];s!==null&&r.push(ga.extendFlat({},i,{x:s}))};if(t.length){for(n=0;ne.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,l=!s;if(r){var u=o?-1:1;r=r*u}if(n){var c=e.side,f=s&&(c==="top"||c==="left")||l&&(c==="bottom"||c==="right")?1:-1;n=n*f}return e._id.charAt(0)==="x"?function(v){return Zb(a+e._offset+e.l2p(sO(v))+r,i+n)}:function(v){return Zb(i+n,a+e._offset+e.l2p(sO(v))+r)}};function sO(e){return e.periodX!==void 0?e.periodX:e.x}function z1t(e){var t=e.ticklabelposition||"",r=e.tickson||"",n=function(p){return t.indexOf(p)!==-1},a=n("top"),i=n("left"),o=n("right"),s=n("bottom"),l=n("inside"),u=r!=="boundaries"&&(s||i||a||o);if(!u&&!l)return[0,0];var c=e.side,f=u?(e.tickwidth||0)/2:0,v=zk,g=e.tickfont?e.tickfont.size:12;return(s||a)&&(f+=g*Nx,v+=(e.linewidth||0)/2),(i||o)&&(f+=(e.linewidth||0)/2,v+=zk),l&&c==="top"&&(v-=g*(1-Nx)),(i||a)&&(f=-f),(c==="bottom"||c==="right")&&(v=-v),[u?f:0,l?v:0]}Rn.makeTickPath=function(e,t,r,n){n||(n={});var a=n.minor;if(a&&!e.minor)return"";var i=n.len!==void 0?n.len:a?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return o==="x"?"M0,"+(t+s*r)+"v"+i*r:"M"+(t+s*r)+",0h"+i*r};Rn.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",a=e.tickson||"",i=function(R){return n.indexOf(R)!==-1},o=i("top"),s=i("left"),l=i("right"),u=i("bottom"),c=a!=="boundaries"&&(u||s||o||l),f=i("inside"),v=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&a!=="boundaries",g=0,p=0,x=v?e.ticklen:0;if(f?x*=-1:c&&(x=0),v&&(g+=x,r)){var _=ga.deg2rad(r);g=x*Math.cos(_)+1,p=x*Math.sin(_)}e.showticklabels&&(v||e.showline)&&(g+=.2*e.tickfont.size),g+=(e.linewidth||1)/2*(f?-1:1);var y={labelStandoff:g,labelShift:p},C,k,S,L,w=0,A=e.side,T=e._id.charAt(0),m=e.tickangle,F;if(T==="x")F=!f&&A==="bottom"||f&&A==="top",L=F?1:-1,f&&(L*=-1),C=p*L,k=t+g*L,S=F?1:-.2,Math.abs(m)===90&&(f?S+=dT:m===-90&&A==="bottom"?S=Nx:m===90&&A==="top"?S=dT:S=.5,w=dT/2*(m/90)),y.xFn=function(R){return R.dx+C+w*R.fontSize},y.yFn=function(R){return R.dy+k+R.fontSize*S},y.anchorFn=function(R,B){if(c){if(s)return"end";if(l)return"start"}return!Du(B)||B===0||B===180?"middle":B*L<0!==f?"end":"start"},y.heightFn=function(R,B,O){return B<-60||B>60?-.5*O:e.side==="top"!==f?-O:0};else if(T==="y"){if(F=!f&&A==="left"||f&&A==="right",L=F?1:-1,f&&(L*=-1),C=g,k=p*L,S=0,!f&&Math.abs(m)===90&&(m===-90&&A==="left"||m===90&&A==="right"?S=Nx:S=.5),f){var E=Du(m)?+m:0;if(E!==0){var I=ga.deg2rad(E);w=Math.abs(Math.sin(I))*Nx*L,S=0}}y.xFn=function(R){return R.dx+t-(C+R.fontSize*S)*L+w*R.fontSize},y.yFn=function(R){return R.dy+k+R.fontSize*dT},y.anchorFn=function(R,B){return Du(B)&&Math.abs(B)===90?"middle":F?"end":"start"},y.heightFn=function(R,B,O){return e.side==="right"&&(B*=-1),B<-30?-O:B<30?-.5*O:0}}return y};function Ok(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}Rn.drawTicks=function(e,t,r){r=r||{};var n=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(t.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),i=r.layer.selectAll("path."+n).data(a,Ok);i.exit().remove(),i.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return pT.stroke(tv.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return M0.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),Nk(t,[Ice]),i.attr("transform",r.transFn)};Rn.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!=="sync"){var n=t._id+"grid",a=t.minor&&t.minor.showgrid,i=a?r.vals.filter(function(y){return y.minor}):[],o=t.showgrid?r.vals.filter(function(y){return!y.minor}):[],s=r.counterAxis;if(s&&Rn.shouldShowZeroLine(e,t,s))for(var l=t.tickmode==="array",u=0;u=0;p--){var x=p?v:g;if(x){var _=x.selectAll("path."+n).data(p?o:i,Ok);_.exit().remove(),_.enter().append("path").classed(n,1).classed("crisp",r.crisp!==!1),_.attr("transform",r.transFn).attr("d",r.path).each(function(y){return pT.stroke(tv.select(this),y.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(y){return M0.dashStyle(y.minor?t.minor.griddash:t.griddash,y.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(y){return(y.minor?f:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&_.attr("d",r.path)}}Nk(t,[aO,oO])}};Rn.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",a=Rn.shouldShowZeroLine(e,t,r.counterAxis),i=r.layer.selectAll("path."+n).data(a?[{x:0,id:t._id}]:[]);i.exit().remove(),i.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(o,s){return f1t(o.id,s.id)})}),i.attr("transform",r.transFn).attr("d",r.path).call(pT.stroke,t.zerolinecolor||pT.defaultLine).style("stroke-width",M0.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Nk(t,[iO])};Rn.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,a=t._id,i=t.zerolinelayer==="above traces",o=r.cls||a+"tick",s=r.vals.filter(function(U){return U.text}),l=r.labelFns,u=r.secondary?0:t.tickangle,c=(t._prevTickAngles||{})[o],f=r.layer.selectAll("g."+o).data(t.showticklabels?s:[],Ok),v=[];f.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(U){var J=tv.select(this),ee=e._promises.length;J.call(Bx.positionText,l.xFn(U),l.yFn(U)).call(M0.font,{family:U.font,size:U.fontSize,color:U.fontColor,weight:U.fontWeight,style:U.fontStyle,variant:U.fontVariant,textcase:U.fontTextcase,lineposition:U.fontLineposition,shadow:U.fontShadow}).text(U.text).call(Bx.convertToTspans,e),e._promises[ee]?v.push(e._promises.pop().then(function(){g(J,u)})):g(J,u)}),Nk(t,[Mce]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(U){tv.select(this).select("text").call(Bx.positionText,l.xFn(U),l.yFn(U))});function g(U,J){U.each(function(ee){var ce=tv.select(this),ye=ce.select(".text-math-group"),xe=l.anchorFn(ee,J),ue=r.transFn.call(ce.node(),ee)+(Du(J)&&+J!=0?" rotate("+J+","+l.xFn(ee)+","+(l.yFn(ee)-ee.fontSize/2)+")":""),K=Bx.lineCount(ce),_e=mT*ee.fontSize,ne=l.heightFn(ee,Du(J)?+J:0,(K-1)*_e);if(ne&&(ue+=Zb(0,ne)),ye.empty()){var ae=ce.select("text");ae.attr({transform:ue,"text-anchor":xe}),ae.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var pe=M0.bBox(ye.node()).width,ie=pe*{end:-.5,start:.5}[xe];ye.attr("transform",ue+Zb(ie,0))}})}t._adjustTickLabelsOverflow=function(){var U=t.ticklabeloverflow;if(!(!U||U==="allow")){var J=U.indexOf("hide")!==-1,ee=t._id.charAt(0)==="x",ce=0,ye=ee?e._fullLayout.width:e._fullLayout.height;if(U.indexOf("domain")!==-1){var xe=ga.simpleMap(t.range,t.r2l);ce=t.l2p(xe[0])+t._offset,ye=t.l2p(xe[1])+t._offset}var ue=Math.min(ce,ye),K=Math.max(ce,ye),_e=t.side,ne=1/0,ae=-1/0;f.each(function(me){var be=tv.select(this),De=be.select(".text-math-group");if(De.empty()){var Ge=M0.bBox(be.node()),ht=0;ee?(Ge.right>K||Ge.leftK||Ge.top+(t.tickangle?0:me.fontSize/4)t["_visibleLabelMin_"+xe._id]?be.style("display","none"):K.K==="tick"&&!ue&&be.node().style.display!=="none"&&be.style("display",null)})})})})},g(f,c+1?c:u);function p(){return v.length&&Promise.all(v)}var x=null;function _(){if(g(f,u),s.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){x=t.autotickangles[0];var U=0,J=[],ee,ce=1;f.each(function(Le){U=Math.max(U,Le.fontSize);var Ke=t.l2p(Le.x),Te=lO(this),Ve=M0.bBox(Te.node());ce=Math.max(ce,Bx.lineCount(Te)),J.push({top:0,bottom:10,height:10,left:Ke-Ve.width/2,right:Ke+Ve.width/2+2,width:Ve.width+2})});var ye=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,xe=s.length,ue=Math.abs((s[xe-1].x-s[0].x)*t._m)/(xe-1),K=ye?ue/2:ue,_e=ye?t.ticklen:U*1.25*ce,ne=Math.sqrt(Math.pow(K,2)+Math.pow(_e,2)),ae=K/ne,pe=t.autotickangles.map(function(Le){return Le*Math.PI/180}),ie=pe.find(function(Le){return Math.abs(Math.cos(Le))<=ae});ie===void 0&&(ie=pe.reduce(function(Le,Ke){return Math.abs(Math.cos(Le))V*O&&(I=O,m[T]=F[T]=R[T])}var j=Math.abs(I-E);j-L>0?(j-=L,L*=1+L/j):L=0,t._id.charAt(0)!=="y"&&(L=-L),m[A]=k.p2r(k.r2p(F[A])+w*L),k.autorange==="min"||k.autorange==="max reversed"?(m[0]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0):(k.autorange==="max"||k.autorange==="min reversed")&&(m[1]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[k._name+".range"]=m}var q=ga.syncOrAsync(y);return q&&q.then&&e._promises.push(q),q};function q1t(e,t,r){var n=t._id+"divider",a=r.vals,i=r.layer.selectAll("path."+n).data(a,Ok);i.exit().remove(),i.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(pT.stroke,t.dividercolor).style("stroke-width",M0.crispRound(e,t.dividerwidth,1)+"px"),i.attr("transform",r.transFn).attr("d",r.path)}Rn.getPxPosition=function(e,t){var r=e._fullLayout._size,n=t._id.charAt(0),a=t.side,i;if(t.anchor!=="free"?i=t._anchorAxis:n==="x"?i={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:n==="y"&&(i={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),a==="top"||a==="left")return i._offset;if(a==="bottom"||a==="right")return i._offset+i._length};function Rce(e){var t=e.title.font.size,r=(e.title.text.match(Bx.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(Nx+r*mT):r?t*(r+1)*mT:t}function B1t(e,t){var r=e._fullLayout,n=t._id,a=n.charAt(0),i=t.title.font.size,o,s=(t.title.text.match(Bx.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+i*Nx:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+i*(dT+s*mT));else{var l=xT(t);if(t.type==="multicategory")o=t._depth;else{var u=1.5*i;l&&(u=.5*i,t.ticks==="outside"&&(u+=t.ticklen)),o=10+u+(t.linewidth?t.linewidth-1:0)}l||(a==="x"?o+=t.side==="top"?i*(t.showticklabels?1:0):i*(t.showticklabels?1.5:.5):o+=t.side==="right"?i*(t.showticklabels?1:.5):i*(t.showticklabels?.5:0))}var c=Rn.getPxPosition(e,t),f,v,g;a==="x"?(v=t._offset+t._length/2,g=t.side==="top"?c-o:c+o):(g=t._offset+t._length/2,v=t.side==="right"?c+o:c-o,f={rotate:"-90",offset:0});var p;if(t.type!=="multicategory"){var x=t._selections[t._id+"tick"];if(p={selection:x,side:t.side},x&&x.node()&&x.node().parentNode){var _=M0.getTranslate(x.node().parentNode);p.offsetLeft=_.x,p.offsetTop=_.y}t.title.hasOwnProperty("standoff")&&(p.pad=0)}return t._titleStandoff=o,r1t.draw(e,n+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[a],avoid:p,transform:f,attributes:{x:v,y:g,"text-anchor":"middle"}})}Rn.shouldShowZeroLine=function(e,t,r){var n=ga.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===qk)&&(Gce(t,0)||!O1t(e,t,r,n)||N1t(e,t))};Rn.clipEnds=function(e,t){return t.filter(function(r){return Gce(e,r.x)})};function Gce(e,t){var r=e.l2p(t);return r>1&&r1)for(a=1;a=a.min&&e=l1t:/%L/.test(t)?e>=s1t:/%[SX]/.test(t)?e>=Ik:/%M/.test(t)?e>=gT:/%[HI]/.test(t)?e>=Wp:/%p/.test(t)?e>=Am:/%[Aadejuwx]/.test(t)?e>=Qh:/%[UVW]/.test(t)?e>=S0:/%[Bbm]/.test(t)?e>=Rk:/%[q]/.test(t)?e>=Dk:/%[Yy]/.test(t)?e>=Fk:!0}});var pO=fe((Odr,Yce)=>{"use strict";Yce.exports=function(t,r,n){var a,i;if(n){var o=r==="reversed"||r==="min reversed"||r==="max reversed";a=n[o?1:0],i=n[o?0:1]}var s=t("autorangeoptions.minallowed",i===null?a:void 0),l=t("autorangeoptions.maxallowed",a===null?i:void 0);s===void 0&&t("autorangeoptions.clipmin"),l===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var gO=fe((Ndr,Xce)=>{"use strict";var W1t=pO();Xce.exports=function(t,r,n,a){var i=r._template||{},o=r.type||i.type||"-";n("minallowed"),n("maxallowed");var s=n("range");if(!s){var l;!a.noInsiderange&&o!=="log"&&(l=n("insiderange"),l&&(l[0]===null||l[1]===null)&&(r.insiderange=!1,l=void 0),l&&(s=n("range",l)))}var u=r.getAutorangeDflt(s,a),c=n("autorange",u),f;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(c==="reversed"||c===!0)||s[0]!==null&&(c==="min"||c==="max reversed")||s[1]!==null&&(c==="max"||c==="min reversed"))&&(s=void 0,delete r.range,r.autorange=!0,f=!0),f||(u=r.getAutorangeDflt(s,a),c=n("autorange",u)),c&&(W1t(n,c,s),(o==="linear"||o==="-")&&n("rangemode")),r.cleanRange()}});var $ce=fe((Udr,Zce)=>{var Y1t={left:0,top:0};Zce.exports=X1t;function X1t(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var n=e.clientX||0,a=e.clientY||0,i=Z1t(t);return r[0]=n-i.left,r[1]=a-i.top,r}function Z1t(e){return e===window||e===document||e===document.body?Y1t:e.getBoundingClientRect()}});var Uk=fe((Vdr,Kce)=>{"use strict";var $1t=Kq();function K1t(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(r){e=!1}return e}Kce.exports=$1t&&K1t()});var Qce=fe((Gdr,Jce)=>{"use strict";Jce.exports=function(t,r,n,a,i){var o=(t-n)/(a-n),s=o+r/(a-n),l=(o+s)/2;return i==="left"||i==="bottom"?o:i==="center"||i==="middle"?l:i==="right"||i==="top"?s:o<2/3-l?o:s>4/3-l?s:l}});var rfe=fe((Hdr,tfe)=>{"use strict";var efe=Xt(),J1t=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];tfe.exports=function(t,r,n,a){return n==="left"?t=0:n==="center"?t=1:n==="right"?t=2:t=efe.constrain(Math.floor(t*3),0,2),a==="bottom"?r=0:a==="middle"?r=1:a==="top"?r=2:r=efe.constrain(Math.floor(r*3),0,2),J1t[r][t]}});var ife=fe((jdr,nfe)=>{"use strict";var Q1t=Rb(),egt=jE(),tgt=X4().getGraphDiv,rgt=L4(),mO=nfe.exports={};mO.wrapped=function(e,t,r){var i;e=tgt(e),e._fullLayout&&egt.clear(e._fullLayout._uid+rgt.HOVERID);let n=e._hoverdata;mO.raw(e,t,r)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,(i=e._fullLayout)!=null&&i.hoveranywhere&&(t!=null&&t.target)&&!n&&e.emit("plotly_unhover",{event:t,points:[]}))};mO.raw=function(t,r){var n=t._fullLayout,a=t._hoverdata;return r||(r={}),r.target&&!t._dragged&&Q1t.triggerHandler(t,"plotly_beforehover",r)===!1?!1:(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,r.target&&a&&t.emit("plotly_unhover",{event:r,points:a}),!0)}});var ed=fe((Wdr,lfe)=>{"use strict";var ngt=$ce(),yO=Qq(),igt=Uk(),agt=Xt().removeElement,ogt=rc(),Ux=lfe.exports={};Ux.align=Qce();Ux.getCursor=rfe();var ofe=ife();Ux.unhover=ofe.wrapped;Ux.unhoverRaw=ofe.raw;Ux.init=function(t){var r=t.gd,n=1,a=r._context.doubleClickDelay,i=t.element,o,s,l,u,c,f,v,g;r._mouseDownTime||(r._mouseDownTime=0),i.style.pointerEvents="all",i.onmousedown=_,igt?(i._ontouchstart&&i.removeEventListener("touchstart",i._ontouchstart),i._ontouchstart=_,i.addEventListener("touchstart",_,{passive:!1})):i.ontouchstart=_;function p(k,S,L){return Math.abs(k)a&&(n=Math.max(n-1,1)),r._dragged)t.doneFn&&t.doneFn();else{var S;f.target===v?S=f:(S={target:v,srcElement:v,toElement:v},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(L=>{var w=f[L];!S[L]&&typeof w!="function"&&(S[L]=w)})),t.clickFn&&t.clickFn(n,S),g||v.dispatchEvent(new MouseEvent("click",k))}r._dragging=!1,r._dragged=!1}};function sfe(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}Ux.coverSlip=sfe;function afe(e){return ngt(e.changedTouches?e.changedTouches[0]:e,document.body)}});var np=fe((Ydr,ufe)=>{"use strict";ufe.exports=function(t,r){(t.attr("class")||"").split(" ").forEach(function(n){n.indexOf("cursor-")===0&&t.classed(n,!1)}),r&&t.classed("cursor-"+r,!0)}});var hfe=fe((Xdr,ffe)=>{"use strict";var xO=np(),_T="data-savedcursor",cfe="!!";ffe.exports=function(t,r){var n=t.attr(_T);if(r){if(!n){for(var a=(t.attr("class")||"").split(" "),i=0;i{"use strict";var _O=Ds(),sgt=tc();dfe.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:sgt.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:_O({editType:"legend"}),grouptitlefont:_O({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},titleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},titledoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:_O({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var wT=fe(bT=>{"use strict";bT.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};bT.isVertical=function(t){return t.orientation!=="h"};bT.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1};bT.getId=function(t){return t._id||"legend"}});var TO=fe((Kdr,vfe)=>{"use strict";var Vk=bi(),E0=Xt(),lgt=Mo(),ugt=Ho(),cgt=bO(),fgt=Sb(),wO=wT();function hgt(e,t,r,n,a){var i=t[e]||{},o=lgt.newContainer(r,e);function s(U,J){return E0.coerce(i,o,cgt,U,J)}var l=E0.coerceFont(s,"font",r.font);s("bgcolor",r.paper_bgcolor),s("bordercolor");var u=s("visible");if(!u)return;var c,f=function(U,J){var ee=c._input,ce=c;return E0.coerce(ee,ce,ugt,U,J)},v=r.font||{},g=E0.coerceFont(s,"grouptitlefont",v,{overrideDflt:{size:Math.round(v.size*1.1)}}),p=0,x=!1,_="normal",y=(r.shapes||[]).filter(function(U){return U.showlegend});function C(U){return Vk.traceIs(U,"pie-like")&&U._length!=null&&(Array.isArray(U.legend)||Array.isArray(U.showlegend))}n.filter(C).forEach(function(U){U.visible&&p++;for(var J=0;JU.legend.length)for(var ce=U.legend.length;ce(e==="legend"?1:0));if(w===!1&&(r[e]=void 0),!(w===!1&&!i.uirevision)&&(s("uirevision",r.uirevision),w!==!1)){s("borderwidth");var A=s("orientation"),T=s("yref"),m=s("xref"),F=A==="h",E=T==="paper",I=m==="paper",R,B,O,V="left";F?(R=0,Vk.getComponentMethod("rangeslider","isVisible")(t.xaxis)?E?(B=1.1,O="bottom"):(B=1,O="top"):E?(B=-.1,O="top"):(B=0,O="bottom")):(B=1,O="auto",I?R=1.02:(R=1,V="right")),E0.coerce(i,o,{x:{valType:"number",editType:"legend",min:I?-2:0,max:I?3:1,dflt:R}},"x"),E0.coerce(i,o,{y:{valType:"number",editType:"legend",min:E?-2:0,max:E?3:1,dflt:B}},"y"),s("traceorder",_),wO.isGrouped(r[e])&&s("tracegroupgap"),s("entrywidth"),s("entrywidthmode"),s("indentation"),s("itemsizing"),s("itemwidth"),s("itemclick"),s("itemdoubleclick"),s("groupclick"),s("xanchor",V),s("yanchor",O),s("maxheight"),s("valign"),E0.noneOrAll(i,o,["x","y"]);var j=s("title.text");if(j){s("title.side",F?"left":"top");var q=E0.extendFlat({},l,{size:E0.bigFont(l.size)});E0.coerceFont(s,"title.font",q);let U=a>1;s("titleclick",U?"toggle":!1),s("titledoubleclick",U?"toggleothers":!1)}}}vfe.exports=function(t,r,n){var a,i=n.slice(),o=r.shapes;if(o)for(a=0;a{"use strict";var Mm=bi(),AO=Xt(),dgt=AO.pushUnique,vgt=wT(),pfe=!0;MO.handleItemClick=function(t,r,n,a){var i=r._fullLayout;if(r._dragged||r._editing)return;var o=t.data()[0][0];if(o.groupTitle&&o.noClick)return;var s=n.groupclick;a==="toggle"&&n.itemdoubleclick==="toggleothers"&&pfe&&r.data&&r._context.showTips&&(AO.notifier(AO._(r,"Double-click on legend to isolate one trace"),"long",r),pfe=!1);var l=s==="togglegroup",u=i.hiddenlabels?i.hiddenlabels.slice():[],c=r._fullData;let f=(i.shapes||[]).filter(ht=>ht.showlegend||ht.legendgroup);var v=c.concat(f),g=o.trace;g._isShape&&(g=i.shapes[g.index]);var p=g.legendgroup,x,_,y,C,k,S,L={},w=[],A=[],T=[];function m(ht,it){var Oe=w.indexOf(ht),ze=L.visible;return ze||(ze=L.visible=[]),w.indexOf(ht)===-1&&(w.push(ht),Oe=w.length-1),ze[Oe]=it,Oe}var F=(i.shapes||[]).map(function(ht){return ht._input}),E=!1;function I(ht,it){F[ht].visible=it,E=!0}function R(ht,it){if(!(o.groupTitle&&!l)){var Oe=ht._isShape,ze=ht.index;ze===void 0&&(ze=ht._index);var ct=ht.visible===!1?!1:it;Oe?I(ze,ct):m(ze,ct)}}var B=g.legend;if(!g._isShape&&Mm.traceIs(g,"pie-like")){var O=o.label,V=u.indexOf(O);if(a==="toggle")V===-1?u.push(O):u.splice(V,1);else if(a==="toggleothers"){var j=V!==-1,q=[];for(x=0;xy.showlegend||y.legendgroup),l=i.concat(s);function u(y){return(y.legend||"legend")===o}var c,f;if(n==="toggle")c=!l.some(function(C){return u(C)&&C.visible===!0}),f=!1;else{let y=l.some(function(C){return!u(C)&&C.visible===!0&&C.showlegend!==!1});c=!0,f=!y}let v={visible:[]},g=[],p=(a.shapes||[]).map(function(y){return y._input});for(var x=!1,_=0;_{"use strict";gfe.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var xfe=fe((e0r,yfe)=>{"use strict";var{isArrayOrTypedArray:kO}=Gf(),mfe=bi(),CO=wT();yfe.exports=function(t,r,n){var a=r._inHover,i=CO.isGrouped(r),o=CO.isReversed(r),s={},l=[],u=!1,c={},f=0,v=0,g,p;function x(J,ee,ce){if(r.visible!==!1&&!(n&&J!==r._id))if(ee===""||!CO.isGrouped(r)){var ye="~~i"+f;l.push(ye),s[ye]=[ce],f++}else l.indexOf(ee)===-1?(l.push(ee),u=!0,s[ee]=[ce]):s[ee].push(ce)}for(g=0;gR&&(E=R)}m[g][0]._groupMinRank=E,m[g][0]._preGroupSort=g}var B=function(J,ee){return J[0]._groupMinRank-ee[0]._groupMinRank||J[0]._preGroupSort-ee[0]._preGroupSort},O=function(J,ee){var ce=kO(J.trace.legendrank)?J.trace.legendrank[J.i]:J.trace.legendrank,ye=kO(ee.trace.legendrank)?ee.trace.legendrank[ee.i]:ee.trace.legendrank;return ce-ye||J._preSort-ee._preSort};for(m.forEach(function(J,ee){J[0]._preGroupSort=ee}),m.sort(B),g=0;g{"use strict";var Gk=Xt();function _fe(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}Vx.formatPiePercent=function(t,r){var n=_fe((t*100).toPrecision(3));return Gk.numSeparate(n,r)+"%"};Vx.formatPieValue=function(t,r){var n=_fe(t.toPrecision(10));return Gk.numSeparate(n,r)};Vx.getFirstFilled=function(t,r){if(Gk.isArrayOrTypedArray(t))for(var n=0;n{"use strict";var pgt=ea(),ggt=ni();bfe.exports=function(t,r,n,a){var i=n.marker.pattern;i&&i.shape?pgt.pointStyle(t,n,a,r):ggt.fill(t,r.color)}});var Jb=fe((n0r,Mfe)=>{"use strict";var Tfe=ni(),Afe=Sm().castOption,mgt=wfe();Mfe.exports=function(t,r,n,a){var i=n.marker.line,o=Afe(i.color,r.pts)||Tfe.defaultLine,s=Afe(i.width,r.pts)||0;t.call(mgt,r,n,a).style("stroke-width",s).call(Tfe.stroke,o)}});var DO=fe((i0r,Pfe)=>{"use strict";var td=xi(),LO=bi(),Sh=Xt(),Sfe=Sh.strTranslate,k0=ea(),rv=ni(),PO=Wf().extractOpts,Hk=Is(),ygt=Jb(),xgt=Sm().castOption,_gt=EO(),Efe=12,kfe=5,Gx=2,bgt=10,Qb=5;Pfe.exports=function(t,r,n){var a=r._fullLayout;n||(n=a.legend);var i=n.itemsizing==="constant",o=n.itemwidth,s=(o+_gt.itemGap*2)/2,l=Sfe(s,0),u=function(A,T,m,F){var E;if(A+1)E=A;else if(T&&T.width>0)E=T.width;else return 0;return i?F:Math.min(E,m)};t.each(function(A){var T=td.select(this),m=Sh.ensureSingle(T,"g","layers");m.style("opacity",A[0].trace.opacity);var F=n.indentation,E=n.valign,I=A[0].lineHeight,R=A[0].height;if(E==="middle"&&F===0||!I||!R)m.attr("transform",null);else{var B={top:1,bottom:-1}[E],O=B*(.5*(I-R+3))||0,V=n.indentation;m.attr("transform",Sfe(V,O))}var j=m.selectAll("g.legendfill").data([A]);j.enter().append("g").classed("legendfill",!0);var q=m.selectAll("g.legendlines").data([A]);q.enter().append("g").classed("legendlines",!0);var U=m.selectAll("g.legendsymbols").data([A]);U.enter().append("g").classed("legendsymbols",!0),U.selectAll("g.legendpoints").data([A]).enter().append("g").classed("legendpoints",!0)}).each(w).each(v).each(p).each(g).each(_).each(S).each(k).each(c).each(f).each(y).each(C);function c(A){var T=Cfe(A),m=T.showFill,F=T.showLine,E=T.showGradientLine,I=T.showGradientFill,R=T.anyFill,B=T.anyLine,O=A[0],V=O.trace,j,q,U=PO(V),J=U.colorscale,ee=U.reversescale,ce=function(ae){if(ae.size())if(m)k0.fillGroupStyle(ae,r,!0);else{var pe="legendfill-"+V.uid;k0.gradient(ae,r,pe,FO(ee),J,"fill")}},ye=function(ae){if(ae.size()){var pe="legendline-"+V.uid;k0.lineGroupStyle(ae),k0.gradient(ae,r,pe,FO(ee),J,"stroke")}},xe=Hk.hasMarkers(V)||!R?"M5,0":B?"M5,-2":"M5,-3",ue=td.select(this),K=ue.select(".legendfill").selectAll("path").data(m||I?[A]:[]);if(K.enter().append("path").classed("js-fill",!0),K.exit().remove(),K.attr("d",xe+"h"+o+"v6h-"+o+"z").call(ce),F||E){var _e=u(void 0,V.line,bgt,kfe);q=Sh.minExtend(V,{line:{width:_e}}),j=[Sh.minExtend(O,{trace:q})]}var ne=ue.select(".legendlines").selectAll("path").data(F||E?[j]:[]);ne.enter().append("path").classed("js-line",!0),ne.exit().remove(),ne.attr("d",xe+(E?"l"+o+",0.0001":"h"+o)).call(F?k0.lineGroupStyle:ye)}function f(A){var T=Cfe(A),m=T.anyFill,F=T.anyLine,E=T.showLine,I=T.showMarker,R=A[0],B=R.trace,O=!I&&!F&&!m&&Hk.hasText(B),V,j;function q(_e,ne,ae,pe){var ie=Sh.nestedProperty(B,_e).get(),le=Sh.isArrayOrTypedArray(ie)&&ne?ne(ie):ie;if(i&&le&&pe!==void 0&&(le=pe),ae){if(leae[1])return ae[1]}return le}function U(_e){return R._distinct&&R.index&&_e[R.index]?_e[R.index]:_e[0]}if(I||O||E){var J={},ee={};if(I){J.mc=q("marker.color",U);var ce=B.type==="scattermap";J.mx=ce?"circle":q("marker.symbol",U),J.mo=q("marker.opacity",Sh.mean,[.2,1]),J.mlc=q("marker.line.color",U),J.mlw=q("marker.line.width",Sh.mean,[0,5],Gx),J.mld=q("marker.line.dash",U),ee.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var ye=q("marker.size",Sh.mean,[2,16],Efe);J.ms=ye,ee.marker.size=ye}E&&(ee.line={width:q("line.width",U,[0,10],kfe)}),O&&(J.tx="Aa",J.tp=q("textposition",U),J.ts=10,J.tc=q("textfont.color",U),J.tf=q("textfont.family",U),J.tw=q("textfont.weight",U),J.ty=q("textfont.style",U),J.tv=q("textfont.variant",U),J.tC=q("textfont.textcase",U),J.tE=q("textfont.lineposition",U),J.tS=q("textfont.shadow",U)),V=[Sh.minExtend(R,J)],j=Sh.minExtend(B,ee),j.selectedpoints=null,j.texttemplate=null}var xe=td.select(this).select("g.legendpoints"),ue=xe.selectAll("path.scatterpts").data(I?V:[]);ue.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",l),ue.exit().remove(),ue.call(k0.pointStyle,j,r),I&&(V[0].mrc=3);var K=xe.selectAll("g.pointtext").data(O?V:[]);K.enter().append("g").classed("pointtext",!0).append("text").attr("transform",l),K.exit().remove(),K.selectAll("text").call(k0.textPointStyle,j,r)}function v(A){var T=A[0].trace,m=T.type==="waterfall";if(A[0]._distinct&&m){var F=A[0].trace[A[0].dir].marker;return A[0].mc=F.color,A[0].mlw=F.line.width,A[0].mlc=F.line.color,x(A,this,"waterfall")}var E=[];T.visible&&m&&(E=A[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 I=td.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(E);I.enter().append("path").classed("legendwaterfall",!0).attr("transform",l).style("stroke-miterlimit",1),I.exit().remove(),I.each(function(R){var B=td.select(this),O=T[R[0]].marker,V=u(void 0,O.line,Qb,Gx);B.attr("d",R[1]).style("stroke-width",V+"px").call(rv.fill,O.color),V&&B.call(rv.stroke,O.line.color)})}function g(A){x(A,this)}function p(A){x(A,this,"funnel")}function x(A,T,m){var F=A[0].trace,E=F.marker||{},I=E.line||{},R=E.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",B=m?F.visible&&F.type===m:LO.traceIs(F,"bar"),O=td.select(T).select("g.legendpoints").selectAll("path.legend"+m).data(B?[A]:[]);O.enter().append("path").classed("legend"+m,!0).attr("d",R).attr("transform",l),O.exit().remove(),O.each(function(V){var j=td.select(this),q=V[0],U=u(q.mlw,E.line,Qb,Gx);j.style("stroke-width",U+"px");var J=q.mcc;if(!n._inHover&&"mc"in q){var ee=PO(E),ce=ee.mid;ce===void 0&&(ce=(ee.max+ee.min)/2),J=k0.tryColorscale(E,"")(ce)}var ye=J||q.mc||E.color,xe=E.pattern,ue=k0.getPatternAttr,K=xe&&(ue(xe.shape,0,"")||ue(xe.path,0,""));if(K){var _e=ue(xe.bgcolor,0,null),ne=ue(xe.fgcolor,0,null),ae=xe.fgopacity,pe=Lfe(xe.size,8,10),ie=Lfe(xe.solidity,.5,1),le="legend-"+F.uid;j.call(k0.pattern,"legend",r,le,K,pe,ie,J,xe.fillmode,_e,ne,ae)}else j.call(rv.fill,ye);U&&rv.stroke(j,q.mlc||I.color)})}function _(A){var T=A[0].trace,m=td.select(this).select("g.legendpoints").selectAll("path.legendbox").data(T.visible&&LO.traceIs(T,"box-violin")?[A]:[]);m.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),m.exit().remove(),m.each(function(){var F=td.select(this);if((T.boxpoints==="all"||T.points==="all")&&rv.opacity(T.fillcolor)===0&&rv.opacity((T.line||{}).color)===0){var E=Sh.minExtend(T,{marker:{size:i?Efe:Sh.constrain(T.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});m.call(k0.pointStyle,E,r)}else{var I=u(void 0,T.line,Qb,Gx);F.style("stroke-width",I+"px").call(rv.fill,T.fillcolor),I&&rv.stroke(F,T.line.color)}})}function y(A){var T=A[0].trace,m=td.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(T.visible&&T.type==="candlestick"?[A,A]:[]);m.enter().append("path").classed("legendcandle",!0).attr("d",function(F,E){return E?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",l).style("stroke-miterlimit",1),m.exit().remove(),m.each(function(F,E){var I=td.select(this),R=T[E?"increasing":"decreasing"],B=u(void 0,R.line,Qb,Gx);I.style("stroke-width",B+"px").call(rv.fill,R.fillcolor),B&&rv.stroke(I,R.line.color)})}function C(A){var T=A[0].trace,m=td.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(T.visible&&T.type==="ohlc"?[A,A]:[]);m.enter().append("path").classed("legendohlc",!0).attr("d",function(F,E){return E?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",l).style("stroke-miterlimit",1),m.exit().remove(),m.each(function(F,E){var I=td.select(this),R=T[E?"increasing":"decreasing"],B=u(void 0,R.line,Qb,Gx);I.style("fill","none").call(k0.dashLine,R.line.dash,B),B&&rv.stroke(I,R.line.color)})}function k(A){L(A,this,"pie")}function S(A){L(A,this,"funnelarea")}function L(A,T,m){var F=A[0],E=F.trace,I=m?E.visible&&E.type===m:LO.traceIs(E,m),R=td.select(T).select("g.legendpoints").selectAll("path.legend"+m).data(I?[A]:[]);if(R.enter().append("path").classed("legend"+m,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),R.exit().remove(),R.size()){var B=E.marker||{},O=u(xgt(B.line.width,F.pts),B.line,Qb,Gx),V="pieLike",j=Sh.minExtend(E,{marker:{line:{width:O}}},V),q=Sh.minExtend(F,{trace:j},V);ygt(R,q,j,r)}}function w(A){var T=A[0].trace,m,F=[];if(T.visible)switch(T.type){case"histogram2d":case"heatmap":F=[["M-15,-2V4H15V-2Z"]],m=!0;break;case"choropleth":case"choroplethmap":F=[["M-6,-6V6H6V-6Z"]],m=!0;break;case"densitymap":F=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],m="radial";break;case"cone":F=[["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"]],m=!1;break;case"streamtube":F=[["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"]],m=!1;break;case"surface":F=[["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"]],m=!0;break;case"mesh3d":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],m=!1;break;case"volume":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],m=!0;break;case"isosurface":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],m=!1;break}var E=td.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(F);E.enter().append("path").classed("legend3dandfriends",!0).attr("transform",l).style("stroke-miterlimit",1),E.exit().remove(),E.each(function(I,R){var B=td.select(this),O=PO(T),V=O.colorscale,j=O.reversescale,q=function(ce){if(ce.size()){var ye="legendfill-"+T.uid;k0.gradient(ce,r,ye,FO(j,m==="radial"),V,"fill")}},U;if(V){if(!m){var ee=V.length;U=R===0?V[j?ee-1:0][1]:R===1?V[j?0:ee-1][1]:V[Math.floor((ee-1)/2)][1]}}else{var J=T.vertexcolor||T.facecolor||T.color;U=Sh.isArrayOrTypedArray(J)?J[R]||J[0]:J}B.attr("d",I[0]),U?B.call(rv.fill,U):B.call(q)})}};function FO(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function Cfe(e){var t=e[0].trace,r=t.contours,n=Hk.hasLines(t)||t.visible&&t.type==="quiver",a=Hk.hasMarkers(t),i=t.visible&&t.fill&&t.fill!=="none",o=!1,s=!1;if(r){var l=r.coloring;l==="lines"?o=!0:n=l==="none"||l==="heatmap"||r.showlines,r.type==="constraint"?i=r._operation!=="=":(l==="fill"||l==="heatmap")&&(s=!0)}return{showMarker:a,showLine:n,showFill:i,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:i||s}}function Lfe(e,t,r){return e&&Sh.isArrayOrTypedArray(e)?t:e>r?r:e}});var qO=fe((a0r,Nfe)=>{"use strict";var Ed=xi(),Ru=Xt(),IO=Hs(),Hx=bi(),Yk=Rb(),RO=ed(),Iu=ea(),TT=ni(),jx=as(),Ffe=SO().handleItemClick,Dfe=SO().handleTitleClick,ic=EO(),zO=nc(),Bfe=zO.LINE_SPACING,t3=zO.FROM_TL,Rfe=zO.FROM_BR,Ife=xfe(),wgt=DO(),r3=wT(),e3=1,Tgt=/^legend[0-9]*$/;Nfe.exports=function(t,r){if(r)zfe(t,r);else{var n=t._fullLayout,a=n._legends,i=n._infolayer.selectAll('[class^="legend"]');i.each(function(){var u=Ed.select(this),c=u.attr("class"),f=c.split(" ")[0];f.match(Tgt)&&a.indexOf(f)===-1&&u.remove()});for(var o=0;o1)}var p=n.hiddenlabels||[];if(!s&&(!n.showlegend||!l.length))return o.selectAll("."+a).remove(),n._topdefs.select("#"+i).remove(),IO.autoMargin(e,a);var x=Ru.ensureSingle(o,"g",a,function(T){s||T.attr("pointer-events","all")}),_=Ru.ensureSingleById(n._topdefs,"clipPath",i,function(T){T.append("rect")}),y=Ru.ensureSingle(x,"rect","bg",function(T){T.attr("shape-rendering","crispEdges")});y.call(TT.stroke,r.bordercolor).call(TT.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var C=Ru.ensureSingle(x,"g","scrollbox"),k=r.title;r._titleWidth=0,r._titleHeight=0;var S;k.text?(S=Ru.ensureSingle(C,"text",a+"titletext"),S.attr("text-anchor","start").call(Iu.font,k.font).text(k.text),Wk(S,C,e,r,e3),!s&&(r.titleclick||r.titledoubleclick)&&Egt(C,e,r,a)):(C.selectAll("."+a+"titletext").remove(),C.selectAll("."+a+"titletoggle").remove());var L=Ru.ensureSingle(x,"rect","scrollbar",function(T){T.attr(ic.scrollBarEnterAttrs).call(TT.fill,ic.scrollBarColor)}),w=C.selectAll("g.groups").data(l);w.enter().append("g").attr("class","groups"),w.exit().remove();var A=w.selectAll("g.traces").data(Ru.identity);A.enter().append("g").attr("class","traces"),A.exit().remove(),A.style("opacity",function(T){let m=T[0],F=m.trace;if(m.groupTitle){let E=F.legendgroup,I=(n.shapes||[]).filter(function(B){return B.showlegend});return e._fullData.concat(I).some(function(B){return B.legendgroup===E&&(B.legend||"legend")===a&&B.visible===!0})?1:.5}return Hx.traceIs(F,"pie-like")?p.indexOf(T[0].label)!==-1?.5:1:F.visible==="legendonly"?.5:1}).each(function(){Ed.select(this).call(Mgt,e,r)}).call(wgt,e,r).each(function(T){s||T[0].groupTitle&&r.groupclick==="toggleitem"||Ed.select(this).call(Sgt,e,a)}),Ru.syncOrAsync([IO.previousPromises,function(){return Lgt(e,w,A,r,C)},function(){var T=n._size,m=r.borderwidth,F=r.xref==="paper",E=r.yref==="paper";if(k.text){let De=(n.shapes||[]).filter(function(ht){return ht.showlegend}),Ge=e._fullData.concat(De).some(function(ht){let it=ht.legend||"legend";var Oe=Array.isArray(it)?it.includes(a):it===a;return Oe&&ht.visible===!0});S.style("opacity",Ge?1:.5)}if(!s){var I,R;F?I=T.l+T.w*r.x-t3[Xk(r)]*r._width:I=n.width*r.x-t3[Xk(r)]*r._width,E?R=T.t+T.h*(1-r.y)-t3[Zk(r)]*r._effHeight:R=n.height*(1-r.y)-t3[Zk(r)]*r._effHeight;var B=Pgt(e,a,I,R);if(B)return;if(n.margin.autoexpand){var O=I,V=R;I=F?Ru.constrain(I,0,n.width-r._width):O,R=E?Ru.constrain(R,0,n.height-r._effHeight):V,I!==O&&Ru.log("Constrain "+a+".x to make legend fit inside graph"),R!==V&&Ru.log("Constrain "+a+".y to make legend fit inside graph")}Iu.setTranslate(x,I,R)}if(L.on(".drag",null),x.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var j=r._effHeight;s&&(j=r._height),y.attr({width:r._width-m,height:j-m,x:m/2,y:m/2}),Iu.setTranslate(C,0,0),_.select("rect").attr({width:r._width-2*m,height:j-2*m,x:m,y:m}),Iu.setClipUrl(C,i,e),Iu.setRect(L,0,0,0,0),delete r._scrollY}else{var q=Math.max(ic.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),U=r._effHeight-q-2*ic.scrollBarMargin,J=r._height-r._effHeight,ee=U/J,ce=Math.min(r._scrollY||0,J);y.attr({width:r._width-2*m+ic.scrollBarWidth+ic.scrollBarMargin,height:r._effHeight-m,x:m/2,y:m/2}),_.select("rect").attr({width:r._width-2*m+ic.scrollBarWidth+ic.scrollBarMargin,height:r._effHeight-2*m,x:m,y:m+ce}),Iu.setClipUrl(C,i,e),pe(ce,q,ee),x.on("wheel",function(){ce=Ru.constrain(r._scrollY+Ed.event.deltaY/J*U,0,J),pe(ce,q,ee),ce!==0&&ce!==J&&Ed.event.preventDefault()});var ye,xe,ue,K=function(De,Ge,ht){var it=(ht-Ge)/ee+De;return Ru.constrain(it,0,J)},_e=function(De,Ge,ht){var it=(Ge-ht)/ee+De;return Ru.constrain(it,0,J)},ne=Ed.behavior.drag().on("dragstart",function(){var De=Ed.event.sourceEvent;De.type==="touchstart"?ye=De.changedTouches[0].clientY:ye=De.clientY,ue=ce}).on("drag",function(){var De=Ed.event.sourceEvent;De.buttons===2||De.ctrlKey||(De.type==="touchmove"?xe=De.changedTouches[0].clientY:xe=De.clientY,ce=K(ue,ye,xe),pe(ce,q,ee))});L.call(ne);var ae=Ed.behavior.drag().on("dragstart",function(){var De=Ed.event.sourceEvent;De.type==="touchstart"&&(ye=De.changedTouches[0].clientY,ue=ce)}).on("drag",function(){var De=Ed.event.sourceEvent;De.type==="touchmove"&&(xe=De.changedTouches[0].clientY,ce=_e(ue,ye,xe),pe(ce,q,ee))});C.call(ae)}function pe(De,Ge,ht){r._scrollY=e._fullLayout[a]._scrollY=De,Iu.setTranslate(C,0,-De),Iu.setRect(L,r._width,ic.scrollBarMargin+De*ht,ic.scrollBarWidth,Ge),_.select("rect").attr("y",m+De)}if(e._context.edits.legendPosition){var ie,le,me,be;x.classed("cursor-move",!0),RO.init({element:x.node(),gd:e,prepFn:function(De){if(De.target!==L.node()){var Ge=Iu.getTranslate(x);me=Ge.x,be=Ge.y}},moveFn:function(De,Ge){if(me!==void 0&&be!==void 0){var ht=me+De,it=be+Ge;Iu.setTranslate(x,ht,it),ie=RO.align(ht,r._width,T.l,T.l+T.w,r.xanchor),le=RO.align(it+r._height,-r._height,T.t+T.h,T.t,r.yanchor)}},doneFn:function(){if(ie!==void 0&&le!==void 0){var De={};De[a+".x"]=ie,De[a+".y"]=le,Hx.call("_guiRelayout",e,De)}},clickFn:function(De,Ge){var ht=o.selectAll("g.traces").filter(function(){var it=this.getBoundingClientRect();return Ge.clientX>=it.left&&Ge.clientX<=it.right&&Ge.clientY>=it.top&&Ge.clientY<=it.bottom});ht.size()>0&&Ofe(e,r,ht,De,Ge)}})}}],e)}}function jk(e,t,r){var n=e[0],a=n.width,i=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return i==="fraction"?t._maxWidth*o:r+(o||a)}function Ofe(e,t,r,n,a){var i=e._fullLayout,o=r.data()[0][0].trace,s=t.itemclick,l=t.itemdoubleclick,u={event:a,node:r.node(),curveNumber:o.index,expandedIndex:o.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:i};o._group&&(u.group=o._group),Hx.traceIs(o,"pie-like")&&(u.label=r.datum()[0].label);var c=Yk.triggerHandler(e,"plotly_legendclick",u);if(n===1){if(c===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&s&&Ffe(r,e,t,s)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var f=Yk.triggerHandler(e,"plotly_legenddoubleclick",u);f!==!1&&c!==!1&&l&&Ffe(r,e,t,l)}}function Mgt(e,t,r){var n=r3.getId(r),a=e.data()[0][0],i=a.trace,o=Hx.traceIs(i,"pie-like"),s=!r._inHover&&t._context.edits.legendText&&!o,l=r._maxNameLength,u,c;a.groupTitle?(u=a.groupTitle.text,c=a.groupTitle.font):(c=r.font,r.entries?u=a.text:(u=o?a.label:i.name,i._meta&&(u=Ru.templateString(u,i._meta))));var f=Ru.ensureSingle(e,"text",n+"text");f.attr("text-anchor","start").call(Iu.font,c).text(s?qfe(u,l):u);var v=r.indentation+r.itemwidth+ic.itemGap*2;jx.positionText(f,v,0),s?f.call(jx.makeEditable,{gd:t,text:u}).call(Wk,e,t,r).on("edit",function(g){this.text(qfe(g,l)).call(Wk,e,t,r);var p={};return p.name=g,a.trace._isShape?Hx.call("_guiRelayout",t,"shapes["+i.index+"].name",p.name):Hx.call("_guiRestyle",t,p,i.index)}):Wk(f,e,t,r)}function qfe(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var n=r-e.length;n>0;n--)e+=" ";return e}function Sgt(e,t,r){var n=t._context.doubleClickDelay,a,i=1,o=Ru.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(TT.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(o.on("mousedown",function(){a=new Date().getTime(),a-t._legendMouseDownTimen&&(i=Math.max(i-1,1)),Ofe(t,s,e,i,Ed.event)}}))}function Egt(e,t,r,n){if(t._fullData.some(function(u){let c=u.legend||"legend";return(Array.isArray(c)?c.includes(n):c===n)&&Hx.traceIs(u,"pie-like")}))return;let i=t._context.doubleClickDelay;var o,s=1;let l=Ru.ensureSingle(e,"rect",n+"titletoggle",function(u){t._context.staticPlot||u.style("cursor","pointer").attr("pointer-events","all"),u.call(TT.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){o=new Date().getTime(),o-t._legendMouseDownTimei&&(s=Math.max(s-1,1));let u={event:Ed.event,legendId:n,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(s===1&&r.titleclick){if(Yk.triggerHandler(t,"plotly_legendtitleclick",u)===!1)return;r._titleClickTimeout=setTimeout(function(){t._fullLayout&&Dfe(t,r,r.titleclick)},i)}else s===2&&(r._titleClickTimeout&&clearTimeout(r._titleClickTimeout),t._legendMouseDownTime=0,Yk.triggerHandler(t,"plotly_legendtitledoubleclick",u)!==!1&&r.titledoubleclick&&Dfe(t,r,r.titledoubleclick))}))}function Wk(e,t,r,n,a){n._inHover&&e.attr("data-notex",!0),jx.convertToTspans(e,r,function(){kgt(t,r,n,a)})}function kgt(e,t,r,n){var a=e.data()[0][0],i=a&&a.trace.showlegend;if(Array.isArray(i)&&(i=i[a.i]!==!1),!r._inHover&&a&&!i){e.remove();return}var o=e.select("g[class*=math-group]"),s=o.node(),l=r3.getId(r);r||(r=t._fullLayout[l]);var u=r.borderwidth,c;n===e3?c=r.title.font:a.groupTitle?c=a.groupTitle.font:c=r.font;var f=c.size*Bfe,v,g;if(s){var p=Iu.bBox(s);v=p.height,g=p.width,n===e3?Iu.setTranslate(o,u,u+v*.75):Iu.setTranslate(o,0,v*.25)}else{var x="."+l+(n===e3?"title":"")+"text",_=e.select(x),y=jx.lineCount(_),C=_.node();if(v=f*y,g=C?Iu.bBox(C).width:0,n===e3)r.title.side==="left"&&(g+=ic.itemGap*2),jx.positionText(_,u+ic.titlePad,u+f);else{var k=ic.itemGap*2+r.indentation+r.itemwidth;a.groupTitle&&(k=ic.itemGap,g-=r.indentation+r.itemwidth),jx.positionText(_,k,-f*((y-1)/2-.3))}}n===e3?(r._titleWidth=g,r._titleHeight=v):(a.lineHeight=f,a.height=Math.max(v,16)+3,a.width=g)}function Cgt(e){var t=0,r=0,n=e.title.side;return n&&(n.indexOf("left")!==-1&&(t=e._titleWidth),n.indexOf("top")!==-1&&(r=e._titleHeight)),[t,r]}function Lgt(e,t,r,n,a){var i=e._fullLayout,o=r3.getId(n);n||(n=i[o]);var s=i._size,l=r3.isVertical(n),u=r3.isGrouped(n),c=n.entrywidthmode==="fraction",f=n.borderwidth,v=2*f,g=ic.itemGap,p=n.indentation+n.itemwidth+g*2,x=2*(f+g),_=Zk(n),y=n.y<0||n.y===0&&_==="top",C=n.y>1||n.y===1&&_==="bottom",k=n.tracegroupgap,S={};let{orientation:L,yref:w}=n,{maxheight:A}=n,T=y||C||L!=="v"||w!=="paper";A||(A=T?.5:1);let m=T?i.height:s.h;n._maxHeight=Math.max(A>1?A:A*m,30);var F=0;n._width=0,n._height=0;var E=Cgt(n);if(l)r.each(function(De){var Ge=De[0].height;Iu.setTranslate(this,f+E[0],f+E[1]+n._height+Ge/2+g),n._height+=Ge,n._width=Math.max(n._width,De[0].width)}),F=p+n._width,n._width+=g+p+v,n._height+=x,u&&(t.each(function(De,Ge){Iu.setTranslate(this,0,Ge*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var I=Xk(n),R=n.x<0||n.x===0&&I==="right",B=n.x>1||n.x===1&&I==="left",O=C||y,V=i.width/2;n._maxWidth=Math.max(R?O&&I==="left"?s.l+s.w:V:B?O&&I==="right"?s.r+s.w:V:s.w,2*p);var j=0,q=0;r.each(function(De){var Ge=jk(De,n,p);j=Math.max(j,Ge),q+=Ge}),F=null;var U=0;if(u){var J=0,ee=0,ce=0;t.each(function(){var De=0,Ge=0;Ed.select(this).selectAll("g.traces").each(function(it){var Oe=jk(it,n,p),ze=it[0].height;Iu.setTranslate(this,E[0],E[1]+f+g+ze/2+Ge),Ge+=ze,De=Math.max(De,Oe),S[it[0].trace.legendgroup]=De});var ht=De+g;ee>0&&ht+f+ee>n._maxWidth?(U=Math.max(U,ee),ee=0,ce+=J+k,J=Ge):J=Math.max(J,Ge),Iu.setTranslate(this,ee,ce),ee+=ht}),n._width=Math.max(U,ee)+f,n._height=ce+J+x}else{var ye=r.size(),xe=q+v+(ye-1)*g=n._maxWidth&&(U=Math.max(U,ne),K=0,_e+=ue,n._height+=ue,ue=0),Iu.setTranslate(this,E[0]+f+K,E[1]+f+_e+Ge/2+g),ne=K+ht+g,K+=it,ue=Math.max(ue,Ge)}),xe?(n._width=K+v,n._height=ue+x):(n._width=Math.max(U,ne)+v,n._height+=ue+x)}}n._width=Math.ceil(Math.max(n._width+E[0],n._titleWidth+2*(f+ic.titlePad))),n._height=Math.ceil(Math.max(n._height+E[1],n._titleHeight+2*(f+ic.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var ae=e._context.edits,pe=ae.legendText||ae.legendPosition;r.each(function(De){var Ge=Ed.select(this).select("."+o+"toggle"),ht=De[0].height,it=De[0].trace.legendgroup,Oe=jk(De,n,p);u&&it!==""&&(Oe=S[it]);var ze=pe?p:F||Oe;!l&&!c&&(ze+=g/2),Iu.setRect(Ge,0,-ht/2,ze,ht)});var ie=a.select("."+o+"titletext");ie.node()&&Agt(ie,n,f);var le=a.select("."+o+"titletoggle");if(le.size()&&ie.node()){var me=ie.attr("x")||0,be=ic.titlePad;Iu.setRect(le,me-be,f,n._titleWidth+2*be,n._titleHeight+2*be)}}function Pgt(e,t,r,n){var a=e._fullLayout,i=a[t],o=Xk(i),s=Zk(i),l=i.xref==="paper",u=i.yref==="paper";e._fullLayout._reservedMargin[t]={};var c=i.y<.5?"b":"t",f=i.x<.5?"l":"r",v={r:a.width-r,l:r+i._width,b:a.height-n,t:n+i._effHeight};if(l&&u)return IO.autoMargin(e,t,{x:i.x,y:i.y,l:i._width*t3[o],r:i._width*Rfe[o],b:i._effHeight*Rfe[s],t:i._effHeight*t3[s]});l?e._fullLayout._reservedMargin[t][c]=v[c]:u||i.orientation==="v"?e._fullLayout._reservedMargin[t][f]=v[f]:e._fullLayout._reservedMargin[t][c]=v[c]}function Xk(e){return Ru.isRightAnchor(e)?"right":Ru.isCenterAnchor(e)?"center":"left"}function Zk(e){return Ru.isBottomAnchor(e)?"bottom":Ru.isMiddleAnchor(e)?"middle":"top"}});var UO=fe(NO=>{"use strict";var Wx=xi(),eg=aa(),tu=Xt(),Fgt=tu.pushUnique,BO=tu.strTranslate,Dgt=tu.strRotate,Rgt=Rb(),nv=as(),Igt=hfe(),Xp=ea(),ac=ni(),$k=ed(),Zp=Yi(),zgt=rc().zindexSeparator,i3=bi(),C0=Sd(),Yx=L4(),qgt=TO(),Bgt=qO(),Xfe=Yx.YANGLE,OO=Math.PI*Xfe/180,Ogt=1/Math.sin(OO),Ngt=Math.cos(OO),Ugt=Math.sin(OO),yl=Yx.HOVERARROWSIZE,go=Yx.HOVERTEXTPAD,Ufe={box:!0,ohlc:!0,violin:!0,candlestick:!0},Vgt={scatter:!0,scattergl:!0,splom:!0};function Vfe(e,t){return e.distance-t.distance}NO.hover=function(t,r,n,a){t=tu.getGraphDiv(t);var i=r.target;tu.throttle(t._fullLayout._uid+Yx.HOVERID,Yx.HOVERMINTIME,function(){Ggt(t,r,n,a,i)})};NO.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var a=r.gd,i=Qfe(a),o=ehe(a),s=t.map(function(_){var y=_._x0||_.x0||_.x||0,C=_._x1||_.x1||_.x||0,k=_._y0||_.y0||_.y||0,S=_._y1||_.y1||_.y||0,L=_.eventData;if(L){var w=Math.min(y,C),A=Math.max(y,C),T=Math.min(k,S),m=Math.max(k,S),F=_.trace;if(i3.traceIs(F,"gl3d")){var E=a._fullLayout[F.scene]._scene.container,I=E.offsetLeft,R=E.offsetTop;w+=I,A+=I,T+=R,m+=R}L.bbox={x0:w+o,x1:A+o,y0:T+i,y1:m+i},L.xPixel=(y+C)/2,L.yPixel=(k+S)/2,r.inOut_bbox&&r.inOut_bbox.push(L.bbox)}else L=!1;return{color:_.color||ac.defaultLine,x0:_.x0||_.x||0,x1:_.x1||_.x||0,y0:_.y0||_.y||0,y1:_.y1||_.y||0,xLabel:_.xLabel,yLabel:_.yLabel,zLabel:_.zLabel,text:_.text,name:_.name,idealAlign:_.idealAlign,borderColor:_.borderColor,fontFamily:_.fontFamily,fontSize:_.fontSize,fontColor:_.fontColor,fontWeight:_.fontWeight,fontStyle:_.fontStyle,fontVariant:_.fontVariant,nameLength:_.nameLength,textAlign:_.textAlign,trace:_.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:_.hovertemplate||!1,hovertemplateLabels:_.hovertemplateLabels||!1,eventData:L}}),l=!1,u=$fe(s,{gd:a,hovermode:"closest",rotateLabels:l,bgColor:r.bgColor||ac.background,container:Wx.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels,f=5,v=0,g=0;c.sort(function(_,y){return _.y0-y.y0}).each(function(_,y){var C=_.y0-_.by/2;C-fA[0]._length||be<0||be>T[0]._length)return $k.unhoverRaw(e,t)}if(t.pointerX=me+A[0]._offset,t.pointerY=be+T[0]._offset,"xval"in t?V=C0.flat(i,t.xval):V=C0.p2c(A,me),"yval"in t?j=C0.flat(i,t.yval):j=C0.p2c(T,be),e._hoverPointerX=t.pointerX,e._hoverPointerY=t.pointerY,!eg(V[0])||!eg(j[0]))return tu.warn("Fx.hover failed",t,e),$k.unhoverRaw(e,t)}s.clickanywhere&&(e._hoverXVals=V,e._hoverYVals=j,e._hoverXAxes=A,e._hoverYAxes=T);var ht=1/0;function it(Ut,_r){for(U=0;Une&&(B.splice(0,ne),ht=B[0].distance),f&&R!==0&&B.length===0){_e.distance=R,_e.index=!1;var Jn=ee._module.hoverPoints(_e,ue,K,"closest",{hoverLayer:s._hoverlayer});if(Jn&&(Jn=Jn.filter(function(Xi){return Xi.spikeDistance<=R})),Jn&&Jn.length){var Ii,Vi=Jn.filter(function(Xi){return Xi.xa.showspikes&&Xi.xa.spikesnap!=="hovered data"});if(Vi.length){var ra=Vi[0];eg(ra.x0)&&eg(ra.y0)&&(Ii=ze(ra),(!ae.vLinePoint||ae.vLinePoint.spikeDistance>Ii.spikeDistance)&&(ae.vLinePoint=Ii))}var ha=Jn.filter(function(Xi){return Xi.ya.showspikes&&Xi.ya.spikesnap!=="hovered data"});if(ha.length){var va=ha[0];eg(va.x0)&&eg(va.y0)&&(Ii=ze(va),(!ae.hLinePoint||ae.hLinePoint.spikeDistance>Ii.spikeDistance)&&(ae.hLinePoint=Ii))}}}}}it();function Oe(Ut,_r,rn){for(var Jr=null,qn=1/0,ri,Jn=0;JnUt.trace.index===We.trace.index):B=[We];var mt=B.length,bt=Yfe("x",We,s),Yt=Yfe("y",We,s);it(bt,Yt);var jt=[],mr={},or=0,fr=function(Ut){var _r=Ufe[Ut.trace.type]?Zfe(Ut):Ut.trace.index;if(!mr[_r])or++,mr[_r]=or,jt.push(Ut);else{var rn=mr[_r]-1,Jr=jt[rn];rn>0&&Math.abs(Ut.distance)mt-1;Ot--)fr(B[Ot]);B=jt,we()}var cr=e._hoverdata,Ct=[],wt=Qfe(e),Tt=ehe(e);for(let Ut of B){var Mt=C0.makeEventData(Ut,Ut.trace,Ut.cd);if(Ut.hovertemplate!==!1){var Lt=!1;Ut.cd[Ut.index]&&Ut.cd[Ut.index].ht&&(Lt=Ut.cd[Ut.index].ht),Ut.hovertemplate=Lt||Ut.trace.hovertemplate||!1}if(Ut.xa&&Ut.ya){var ft=Ut.x0+Ut.xa._offset,kt=Ut.x1+Ut.xa._offset,rr=Ut.y0+Ut.ya._offset,pr=Ut.y1+Ut.ya._offset,Kr=Math.min(ft,kt),Nr=Math.max(ft,kt),dn=Math.min(rr,pr),xr=Math.max(rr,pr);Mt.bbox={x0:Kr+Tt,x1:Nr+Tt,y0:dn+wt,y1:xr+wt},Mt.xPixel=(ft+kt)/2,Mt.yPixel=(rr+pr)/2}Ut.eventData=[Mt],Ct.push(Mt)}e._hoverdata=Ct;var Fr=v==="y"&&(O.length>1||B.length>1)||v==="closest"&&pe&&B.length>1,Zr=ac.combine(s.plot_bgcolor||ac.background,s.paper_bgcolor),Cn=$fe(B,{gd:e,hovermode:v,rotateLabels:Fr,bgColor:Zr,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),Dt=Cn.hoverLabels;if(C0.isUnifiedHover(v)||(jgt(Dt,Fr,s,Cn.commonLabelBoundingBox),Jfe(Dt,Fr,s._invScaleX,s._invScaleY)),a&&a.tagName){var At=i3.getComponentMethod("annotations","hasClickToShow")(e,Ct);Igt(Wx.select(a),At?"pointer":"")}var Vt=Xgt(e,t,cr);if(!a||n||!Vt&&!s.hoveranywhere)return;cr&&Vt&&e.emit("plotly_unhover",{event:t,points:cr}),Qt(e._hoverdata);function Qt(Ut){e.emit("plotly_hover",{event:t,points:Ut,xaxes:A,yaxes:T,xvals:C0.c2dApply(A,V),yvals:C0.c2dApply(T,j),xPixel:t.pointerX,yPixel:t.pointerY})}}function Zfe(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}var Hgt=/([\s\S]*)<\/extra>/;function $fe(e,t){var r=t.gd,n=r._fullLayout,a=t.hovermode,i=t.rotateLabels,o=t.bgColor,s=t.container,l=t.outerContainer,u=t.commonLabelOpts||{};if(e.length===0)return[[]];var c=t.fontFamily||Yx.HOVERFONT,f=t.fontSize||Yx.HOVERFONTSIZE,v=t.fontWeight||n.font.weight,g=t.fontStyle||n.font.style,p=t.fontVariant||n.font.variant,x=t.fontTextcase||n.font.textcase,_=t.fontLineposition||n.font.lineposition,y=t.fontShadow||n.font.shadow,C=e[0],k=C.xa,S=C.ya,L=a.charAt(0),w=L+"Label",A=C[w];if(A===void 0&&k.type==="multicategory")for(var T=0;Tn.width-Ct&&(wt=n.width-Ct),nt.attr("d","M"+(fr-wt)+",0L"+(fr-wt+yl)+","+cr+yl+"H"+Ct+"v"+cr+(go*2+or.height)+"H"+-Ct+"V"+cr+yl+"H"+(fr-wt-yl)+"Z"),fr=wt,U.minX=fr-Ct,U.maxX=fr+Ct,k.side==="top"?(U.minY=Ot-(go*2+or.height),U.maxY=Ot-go):(U.minY=Ot+go,U.maxY=Ot+(go*2+or.height))}else{var Tt,Mt,Lt;S.side==="right"?(Tt="start",Mt=1,Lt="",fr=k._offset+k._length):(Tt="end",Mt=-1,Lt="-",fr=k._offset),Ot=S._offset+(C.y0+C.y1)/2,We.attr("text-anchor",Tt),nt.attr("d","M0,0L"+Lt+yl+","+yl+"V"+(go+or.height/2)+"h"+Lt+(go*2+or.width)+"V-"+(go+or.height/2)+"H"+Lt+yl+"V-"+yl+"Z"),U.minY=Ot-(go+or.height/2),U.maxY=Ot+(go+or.height/2),S.side==="right"?(U.minX=fr+yl,U.maxX=fr+yl+(go*2+or.width)):(U.minX=fr-yl-(go*2+or.width),U.maxX=fr-yl);var ft=or.height/2,kt=F-or.top-ft,rr="clip"+n._uid+"commonlabel"+S._id,pr;if(frnt.hoverinfo!=="none");if(tt.length===0)return[];var J=n.hoverlabel,ee=J.font,ce=tt[0],ye=((a==="x unified"?ce.xa:ce.ya).unifiedhovertitle||{}).text,xe=ye?tu.hovertemplateString({data:a==="x unified"?[{xa:ce.xa,x:ce.xVal}]:[{ya:ce.ya,y:ce.yVal}],fallback:ce.trace.hovertemplatefallback,locale:n._d3locale,template:ye}):A,ue={showlegend:!0,legend:{title:{text:xe,font:ee},font:ee,bgcolor:J.bgcolor,bordercolor:J.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:n.legend?n.legend.traceorder:void 0,orientation:"v"}},K={font:ee};qgt(ue,K,r._fullData);var _e=K.legend;_e.entries=[];for(var ne=0;ne=0?Ve=we:Le+Ge=0?Ve=Le:Ke+Ge=0?$e=et:qe+ht=0?$e=qe:Te+ht=0,(tt.idealAlign==="top"||!dn)&&xr?(Lt-=kt/2,tt.anchor="end"):dn?(Lt+=kt/2,tt.anchor="start"):tt.anchor="middle",tt.crossPos=Lt;else{if(tt.pos=Lt,dn=Mt+ft/2+Nr<=E,xr=Mt-ft/2-Nr>=0,(tt.idealAlign==="left"||!dn)&&xr)Mt-=ft/2,tt.anchor="end";else if(dn)Mt+=ft/2,tt.anchor="start";else{tt.anchor="middle";var Fr=Nr/2,Zr=Mt+Fr-E,Cn=Mt-Fr;Zr>0&&(Mt-=Zr),Cn<0&&(Mt+=-Cn)}tt.crossPos=Mt}Ot.attr("text-anchor",tt.anchor),Ct&&cr.attr("text-anchor",tt.anchor),nt.attr("transform",BO(Mt,Lt)+(i?Dgt(Xfe):""))}),{hoverLabels:ot,commonLabelBoundingBox:U}}function Gfe(e,t,r,n,a,i){var f,v;var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=tu.templateString(e.name,e.trace._meta)),o=Wfe(e.name,e.nameLength));var l=r.charAt(0),u=l==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(s+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(s+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmap"&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[l+"Label"]===a?s=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(s=e.yLabel):e.yLabel===void 0?s=e.xLabel:s="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(s+=(s?"
":"")+e.text),e.extraText!==void 0&&(s+=(s?"
":"")+e.extraText),i&&s===""&&!e.hovertemplate&&(o===""&&i.remove(),s=o),(v=(f=e.trace)==null?void 0:f.hoverlabel)!=null&&v.split&&(e.hovertemplate="");let{hovertemplate:c=!1}=e;if(c){let g=e.hovertemplateLabels||e;e[l+"Label"]!==a&&(g[l+"other"]=g[l+"Val"],g[l+"otherLabel"]=g[l+"Label"]),s=tu.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:g,locale:n._d3locale,template:c}),s=s.replace(Hgt,(p,x)=>(o=Wfe(x,e.nameLength),""))}return[s,o]}function jgt(e,t,r,n){var a=t?"xa":"ya",i=t?"ya":"xa",o=0,s=1,l=e.size(),u=new Array(l),c=0,f=n.minX,v=n.maxX,g=n.minY,p=n.maxY,x=function(V){return V*r._invScaleX},_=function(V){return V*r._invScaleY};e.each(function(V){var j=V[a],q=V[i],U=j._id.charAt(0)==="x",J=j.range;c===0&&J&&J[0]>J[1]!==U&&(s=-1);var ee=0,ce=U?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var ye=Kfe(V,t),xe=V.anchor,ue=xe==="end"?-1:1,K,_e;if(xe==="middle")K=V.crossPos+(U?_(ye.y-V.by/2):x(V.bx/2+V.tx2width/2)),_e=K+(U?_(V.by):x(V.bx));else if(U)K=V.crossPos+_(yl+ye.y)-_(V.by/2-yl),_e=K+_(V.by);else{var ne=x(ue*yl+ye.x),ae=ne+x(ue*V.bx);K=V.crossPos+Math.min(ne,ae),_e=V.crossPos+Math.max(ne,ae)}U?g!==void 0&&p!==void 0&&Math.min(_e,p)-Math.max(K,g)>1&&(q.side==="left"?(ee=q._mainLinePosition,ce=r.width):ce=q._mainLinePosition):f!==void 0&&v!==void 0&&Math.min(_e,v)-Math.max(K,f)>1&&(q.side==="top"?(ee=q._mainLinePosition,ce=r.height):ce=q._mainLinePosition)}u[c++]=[{datum:V,traceIndex:V.trace.index,dp:0,pos:V.pos,posref:V.posref,size:V.by*(U?Ogt:1)/2,pmin:ee,pmax:ce}]}),u.sort(function(V,j){return V[0].posref-j[0].posref||s*(j[0].traceIndex-V[0].traceIndex)});var y,C,k,S,L,w,A;function T(V){var j=V[0],q=V[V.length-1];if(C=j.pmin-j.pos-j.dp+j.size,k=q.pos+q.dp+q.size-j.pmax,C>.01){for(L=V.length-1;L>=0;L--)V[L].dp+=C;y=!1}if(!(k<.01)){if(C<-.01){for(L=V.length-1;L>=0;L--)V[L].dp-=k;y=!1}if(y){var U=0;for(S=0;Sj.pmax&&U++;for(S=V.length-1;S>=0&&!(U<=0);S--)w=V[S],w.pos>j.pmax-1&&(w.del=!0,U--);for(S=0;S=0;L--)V[L].dp-=k;for(S=V.length-1;S>=0&&!(U<=0);S--)w=V[S],w.pos+w.dp+w.size>j.pmax&&(w.del=!0,U--)}}}for(;!y&&o<=l;){for(o++,y=!0,S=0;S.01){for(L=F.length-1;L>=0;L--)F[L].dp+=C;for(m.push.apply(m,F),u.splice(S+1,1),A=0,L=m.length-1;L>=0;L--)A+=m[L].dp;for(k=A/m.length,L=m.length-1;L>=0;L--)m[L].dp-=k;y=!1}else S++}u.forEach(T)}for(S=u.length-1;S>=0;S--){var R=u[S];for(L=R.length-1;L>=0;L--){var B=R[L],O=B.datum;O.offset=B.dp,O.del=B.del}}}function Kfe(e,t){var r=0,n=e.offset;return t&&(n*=-Ugt,r=e.offset*Ngt),{x:r,y:n}}function Wgt(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(yl+go),n=r+t*(e.txwidth+go),a=e.anchor==="middle";return a&&(r-=e.tx2width/2,n+=e.txwidth/2+go),{alignShift:t,textShiftX:r,text2ShiftX:n}}function Jfe(e,t,r,n){var a=function(o){return o*r},i=function(o){return o*n};e.each(function(o){var s=Wx.select(this);if(o.del)return s.remove();var l=s.select("text.nums"),u=o.anchor,c=u==="end"?-1:1,f=Wgt(o),v=Kfe(o,t),g=v.x,p=v.y,x=u==="middle",_="hoverlabel"in o.trace?o.trace.hoverlabel.showarrow:!0,y;x?y="M-"+a(o.bx/2+o.tx2width/2)+","+i(p-o.by/2)+"h"+a(o.bx)+"v"+i(o.by)+"h-"+a(o.bx)+"Z":_?y="M0,0L"+a(c*yl+g)+","+i(yl+p)+"v"+i(o.by/2-yl)+"h"+a(c*o.bx)+"v-"+i(o.by)+"H"+a(c*yl+g)+"V"+i(p-yl)+"Z":y="M"+a(c*yl+g)+","+i(p-o.by/2)+"h"+a(c*o.bx)+"v"+i(o.by)+"h"+a(-c*o.bx)+"Z",s.select("path").attr("d",y);var C=g+f.textShiftX,k=p+o.ty0-o.by/2+go,S=o.textAlign||"auto";S!=="auto"&&(S==="left"&&u!=="start"?(l.attr("text-anchor","start"),C=x?-o.bx/2-o.tx2width/2+go:-o.bx-go):S==="right"&&u!=="end"&&(l.attr("text-anchor","end"),C=x?o.bx/2-o.tx2width/2-go:o.bx+go)),l.call(nv.positionText,a(C),i(k)),o.tx2width&&(s.select("text.name").call(nv.positionText,a(f.text2ShiftX+f.alignShift*go+g),i(p+o.ty0-o.by/2+go)),s.select("rect").call(Xp.setRect,a(f.text2ShiftX+(f.alignShift-1)*o.tx2width/2+g),i(p-o.by/2-1),a(o.tx2width),i(o.by+2)))})}function Ygt(e,t){var r=e.index,n=e.trace||{},a=e.cd[0],i=e.cd[r]||{};function o(v){return v||eg(v)&&v===0}var s=Array.isArray(r)?function(v,g){var p=tu.castOption(a,r,v);return o(p)?p:tu.extractOption({},n,"",g)}:function(v,g){return tu.extractOption(i,n,v,g)};function l(v,g,p){var x=s(g,p);o(x)&&(e[v]=x)}if(l("hoverinfo","hi","hoverinfo"),l("bgcolor","hbg","hoverlabel.bgcolor"),l("borderColor","hbc","hoverlabel.bordercolor"),l("fontFamily","htf","hoverlabel.font.family"),l("fontSize","hts","hoverlabel.font.size"),l("fontColor","htc","hoverlabel.font.color"),l("fontWeight","htw","hoverlabel.font.weight"),l("fontStyle","hty","hoverlabel.font.style"),l("fontVariant","htv","hoverlabel.font.variant"),l("nameLength","hnl","hoverlabel.namelength"),l("textAlign","hta","hoverlabel.align"),e.posref=t==="y"||t==="closest"&&n.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=tu.constrain(e.x0,0,e.xa._length),e.x1=tu.constrain(e.x1,0,e.xa._length),e.y0=tu.constrain(e.y0,0,e.ya._length),e.y1=tu.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Zp.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:Zp.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type==="log"&&e.xerr<=0)){var u=Zp.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+Zp.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,t==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var c=Zp.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+c+" / -"+Zp.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+c,t==="y"&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&f!=="all"&&(f=Array.isArray(f)?f:f.split("+"),f.indexOf("x")===-1&&(e.xLabel=void 0),f.indexOf("y")===-1&&(e.yLabel=void 0),f.indexOf("z")===-1&&(e.zLabel=void 0),f.indexOf("text")===-1&&(e.text=void 0),f.indexOf("name")===-1&&(e.name=void 0)),e}function Hfe(e,t,r){var n=r.container,a=r.fullLayout,i=a._size,o=r.event,s=!!t.hLinePoint,l=!!t.vLinePoint,u,c;if(n.selectAll(".spikeline").remove(),!!(l||s)){var f=ac.combine(a.plot_bgcolor,a.paper_bgcolor);if(s){var v=t.hLinePoint,g,p;u=v&&v.xa,c=v&&v.ya;var x=c.spikesnap;x==="cursor"?(g=o.pointerX,p=o.pointerY):(g=u._offset+v.x,p=c._offset+v.y);var _=ac.wcagContrast(v.color,f)<1.5?ac.contrast(f):v.color,y=c.spikemode,C=c.spikethickness,k=c.spikecolor||_,S=Zp.getPxPosition(e,c),L,w;if(y.indexOf("toaxis")!==-1||y.indexOf("across")!==-1){if(y.indexOf("toaxis")!==-1&&(L=S,w=g),y.indexOf("across")!==-1){var A=c._counterDomainMin,T=c._counterDomainMax;c.anchor==="free"&&(A=Math.min(A,c.position),T=Math.max(T,c.position)),L=i.l+A*i.w,w=i.l+T*i.w}n.insert("line",":first-child").attr({x1:L,x2:w,y1:p,y2:p,"stroke-width":C,stroke:k,"stroke-dasharray":Xp.dashStyle(c.spikedash,C)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:L,x2:w,y1:p,y2:p,"stroke-width":C+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}y.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:S+(c.side!=="right"?C:-C),cy:p,r:C,fill:k}).classed("spikeline",!0)}if(l){var m=t.vLinePoint,F,E;u=m&&m.xa,c=m&&m.ya;var I=u.spikesnap;I==="cursor"?(F=o.pointerX,E=o.pointerY):(F=u._offset+m.x,E=c._offset+m.y);var R=ac.wcagContrast(m.color,f)<1.5?ac.contrast(f):m.color,B=u.spikemode,O=u.spikethickness,V=u.spikecolor||R,j=Zp.getPxPosition(e,u),q,U;if(B.indexOf("toaxis")!==-1||B.indexOf("across")!==-1){if(B.indexOf("toaxis")!==-1&&(q=j,U=E),B.indexOf("across")!==-1){var J=u._counterDomainMin,ee=u._counterDomainMax;u.anchor==="free"&&(J=Math.min(J,u.position),ee=Math.max(ee,u.position)),q=i.t+(1-ee)*i.h,U=i.t+(1-J)*i.h}n.insert("line",":first-child").attr({x1:F,x2:F,y1:q,y2:U,"stroke-width":O,stroke:V,"stroke-dasharray":Xp.dashStyle(u.spikedash,O)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:F,x2:F,y1:q,y2:U,"stroke-width":O+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}B.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:F,cy:j-(u.side!=="top"?O:-O),r:O,fill:V}).classed("spikeline",!0)}}}function Xgt(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=e._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers)||a.binNumber!==i.binNumber)return!0}return!1}function jfe(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function Wfe(e,t){return nv.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Zgt(e,t){for(var r=t.charAt(0),n=[],a=[],i=[],o=0;oe.offsetTop+e.clientTop,ehe=e=>e.offsetLeft+e.clientLeft;function n3(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),a=n.left,i=n.top,o=a+n.width,s=i+n.height,l=tu.apply3DTransform(r._invTransform)(a,i),u=tu.apply3DTransform(r._invTransform)(o,s),c=l[0],f=l[1],v=u[0],g=u[1];return{x:c,y:f,width:v-c,height:g-f,top:Math.min(f,g),left:Math.min(c,v),right:Math.max(c,v),bottom:Math.max(f,g)}}});var AT=fe((s0r,the)=>{"use strict";var $gt=Xt(),Kgt=ni(),Jgt=Sd().isUnifiedHover;the.exports=function(t,r,n,a){a=a||{};var i=r.legend;function o(s){a.font[s]||(a.font[s]=i?r.legend.font[s]:r.font[s])}r&&Jgt(r.hovermode)&&(a.font||(a.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),i?(a.bgcolor||(a.bgcolor=Kgt.combine(r.legend.bgcolor,r.paper_bgcolor)),a.bordercolor||(a.bordercolor=r.legend.bordercolor)):a.bgcolor||(a.bgcolor=r.paper_bgcolor)),n("hoverlabel.bgcolor",a.bgcolor),n("hoverlabel.bordercolor",a.bordercolor),n("hoverlabel.namelength",a.namelength),n("hoverlabel.showarrow",a.showarrow),$gt.coerceFont(n,"hoverlabel.font",a.font),n("hoverlabel.align",a.align)}});var nhe=fe((l0r,rhe)=>{"use strict";var Qgt=Xt(),emt=AT(),tmt=tm();rhe.exports=function(t,r){function n(a,i){return Qgt.coerce(t,r,tmt,a,i)}emt(t,r,n)}});var ohe=fe((u0r,ahe)=>{"use strict";var ihe=Xt(),rmt=hb(),nmt=AT();ahe.exports=function(t,r,n,a){function i(s,l){return ihe.coerce(t,r,rmt,s,l)}var o=ihe.extendFlat({},a.hoverlabel);r.hovertemplate&&(o.namelength=-1),nmt(t,r,i,o)}});var VO=fe((c0r,she)=>{"use strict";var imt=Xt(),amt=tm();she.exports=function(t,r){function n(a,i){return r[a]!==void 0?r[a]:imt.coerce(t,r,amt,a,i)}return n("clickmode"),n("hoversubplots"),n("hoveranywhere"),n("clickanywhere"),n("hovermode")}});var che=fe((f0r,uhe)=>{"use strict";var lhe=Xt(),omt=tm(),smt=VO(),lmt=AT();uhe.exports=function(t,r){function n(u,c){return lhe.coerce(t,r,omt,u,c)}var a=smt(t,r);a&&(n("hoverdistance"),n("spikedistance"),a.indexOf("unified")!==-1&&n("hoversort"));var i=n("dragmode");i==="select"&&n("selectdirection");var o=r._has("map"),s=r._has("geo"),l=r._basePlotModules.length;r.dragmode==="zoom"&&((o||s)&&l===1||o&&s&&l===2)&&(r.dragmode="pan"),lmt(t,r,n),lhe.coerceFont(n,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var dhe=fe((h0r,hhe)=>{"use strict";var GO=Xt(),fhe=bi();hhe.exports=function(t){var r=t.calcdata,n=t._fullLayout;function a(u){return function(c){return GO.coerceHoverinfo({hoverinfo:c},{_module:u._module},n)}}for(var i=0;i{"use strict";var cmt=bi(),vhe=Sd(),fmt=UO().hover;phe.exports=function(t,r,n){var a=cmt.getComponentMethod("annotations","onClick")(t,t._hoverdata),i=t._fullLayout;n!==void 0&&fmt(t,r,n,!0);function o(){var l,u,c,f,v,g;var s={points:t._hoverdata,event:r};(l=s.xaxes)!=null||(s.xaxes=t._hoverXAxes),(u=s.yaxes)!=null||(s.yaxes=t._hoverYAxes),(c=s.xvals)!=null||(s.xvals=t._hoverXVals&&vhe.c2dApply(t._hoverXAxes,t._hoverXVals)),(f=s.yvals)!=null||(s.yvals=t._hoverYVals&&vhe.c2dApply(t._hoverYAxes,t._hoverYVals)),(v=s.xPixel)!=null||(s.xPixel=t._hoverPointerX),(g=s.yPixel)!=null||(s.yPixel=t._hoverPointerY),t.emit("plotly_click",s)}(t._hoverdata||i.clickanywhere)&&r&&r.target&&(t._hoverdata||(t._hoverdata=[]),a&&a.then?a.then(o):o(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var kl=fe((v0r,xhe)=>{"use strict";var hmt=xi(),Kk=Xt(),dmt=ed(),MT=Sd(),mhe=tm(),yhe=UO();xhe.exports={moduleType:"component",name:"fx",constants:L4(),schema:{layout:mhe},attributes:hb(),layoutAttributes:mhe,supplyLayoutGlobalDefaults:nhe(),supplyDefaults:ohe(),supplyLayoutDefaults:che(),calc:dhe(),getDistanceFunction:MT.getDistanceFunction,getClosest:MT.getClosest,inbox:MT.inbox,quadrature:MT.quadrature,appendArrayPointValue:MT.appendArrayPointValue,castHoverOption:pmt,castHoverinfo:gmt,hover:yhe.hover,unhover:dmt.unhover,loneHover:yhe.loneHover,loneUnhover:vmt,click:ghe()};function vmt(e){var t=Kk.isD3Selection(e)?e:hmt.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function pmt(e,t,r){return Kk.castOption(e,t,"hoverlabel."+r)}function gmt(e,t,r){function n(a){return Kk.coerceHoverinfo({hoverinfo:a},{_module:e._module},t)}return Kk.castOption(e,r,"hoverinfo",n)}});var $p=fe(tg=>{"use strict";tg.selectMode=function(e){return e==="lasso"||e==="select"};tg.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};tg.openMode=function(e){return e==="drawline"||e==="drawopenpath"};tg.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};tg.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};tg.selectingOrDrawing=function(e){return tg.freeMode(e)||tg.rectMode(e)}});var ST=fe((g0r,_he)=>{"use strict";_he.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(n){n.regl&&n.regl.clear({color:!0,depth:!0})})}});var Jk=fe((m0r,bhe)=>{"use strict";bhe.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},cloudupload:{width:640,height:640,path:"M451.5 160C434.9 160 418.8 164.5 404.7 172.7C388.9 156.7 370.5 143.3 350.2 133.2C378.4 109.2 414.3 96 451.5 96C537.9 96 608 166 608 252.5C608 294 591.5 333.8 562.2 363.1L491.1 434.2C461.8 463.5 422 480 380.5 480C294.1 480 224 410 224 323.5C224 322 224 320.5 224.1 319C224.6 301.3 239.3 287.4 257 287.9C274.7 288.4 288.6 303.1 288.1 320.8C288.1 321.7 288.1 322.6 288.1 323.4C288.1 374.5 329.5 415.9 380.6 415.9C405.1 415.9 428.6 406.2 446 388.8L517.1 317.7C534.4 300.4 544.2 276.8 544.2 252.3C544.2 201.2 502.8 159.8 451.7 159.8zM307.2 237.3C305.3 236.5 303.4 235.4 301.7 234.2C289.1 227.7 274.7 224 259.6 224C235.1 224 211.6 233.7 194.2 251.1L123.1 322.2C105.8 339.5 96 363.1 96 387.6C96 438.7 137.4 480.1 188.5 480.1C205 480.1 221.1 475.7 235.2 467.5C251 483.5 269.4 496.9 289.8 507C261.6 530.9 225.8 544.2 188.5 544.2C102.1 544.2 32 474.2 32 387.7C32 346.2 48.5 306.4 77.8 277.1L148.9 206C178.2 176.7 218 160.2 259.5 160.2C346.1 160.2 416 230.8 416 317.1C416 318.4 416 319.7 416 321C415.6 338.7 400.9 352.6 383.2 352.2C365.5 351.8 351.6 337.1 352 319.4C352 318.6 352 317.9 352 317.1C352 283.4 334 253.8 307.2 237.5z",transform:"matrix(1 0 0 1 -15 -15)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:[""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}});var e8=fe((y0r,whe)=>{"use strict";var Qk=32;whe.exports={CIRCLE_SIDES:Qk,i000:0,i090:Qk/4,i180:Qk/2,i270:Qk/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var t8=fe((x0r,Ahe)=>{"use strict";var mmt=Xt().strTranslate;function The(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function ymt(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function xmt(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return The(e,r[t])}}function _mt(e){return mmt(e.xaxis._offset,e.yaxis._offset)}Ahe.exports={p2r:The,r2p:ymt,axValue:xmt,getTransform:_mt}});var Em=fe(rg=>{"use strict";var bmt=FB(),Ehe=e8(),a3=Ehe.CIRCLE_SIDES,HO=Ehe.SQRT2,khe=t8(),Mhe=khe.p2r,She=khe.r2p,wmt=[0,3,4,5,6,1,2],Tmt=[0,3,4,1,2];rg.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var Che=El(),Rhe=$p(),Amt=Rhe.drawMode,Mmt=Rhe.openMode,o3=e8(),Lhe=o3.i000,Phe=o3.i090,Fhe=o3.i180,Dhe=o3.i270,Smt=o3.cos45,Emt=o3.sin45,Ihe=t8(),n8=Ihe.p2r,km=Ihe.r2p,kmt=pm(),Cmt=kmt.clearOutline,i8=Em(),Lmt=i8.readPaths,Pmt=i8.writePaths,Fmt=i8.ellipseOver,Dmt=i8.fixDatesForPaths;function Rmt(e,t){if(e.length){var r=e[0][0];if(r){var n=t.gd,a=t.isActiveShape,i=t.dragmode,o=(n.layout||{}).shapes||[];if(!Amt(i)&&a!==void 0){var s=n._fullLayout._activeShapeIndex;if(s{"use strict";var Imt=$p(),zmt=Imt.selectMode,qmt=pm(),Bmt=qmt.clearOutline,jO=Em(),Omt=jO.readPaths,Nmt=jO.writePaths,Umt=jO.fixDatesForPaths;Bhe.exports=function(t,r){if(t.length){var n=t[0][0];if(n){var a=n.getAttribute("d"),i=r.gd,o=i._fullLayout.newselection,s=r.plotinfo,l=s.xaxis,u=s.yaxis,c=r.isActiveSelection,f=r.dragmode,v=(i.layout||{}).selections||[];if(!zmt(f)&&c!==void 0){var g=i._fullLayout._activeSelectionIndex;if(g{"use strict";Ohe.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:3},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}});var Lm=fe(gf=>{"use strict";var Jp=kT(),Nhe=Xt(),Cm=Yi();gf.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};gf.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};gf.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};gf.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};gf.extractPathCoords=function(e,t,r){var n=[],a=e.match(Jp.segmentRE);return a.forEach(function(i){var o=t[i.charAt(0)].drawn;if(o!==void 0){var s=i.slice(1).match(Jp.paramRE);if(!(!s||s.length{let s=o.charAt(0),l=a[s].drawn!==void 0;return i+(l?1:0)},0)};gf.getDataToPixel=function(e,t,r,n,a){var i=e._fullLayout._size,o;if(t)if(a==="domain")o=function(l){return t._length*(n?1-l:l)+t._offset};else{var s=gf.shapePositionToRange(t);o=function(l){var u=Kp(t,r);return t._offset+t.r2p(s(l,!0))+u},t.type==="date"&&(o=gf.decodeDate(o))}else n?o=function(l){return i.t+i.h*(1-l)}:o=function(l){return i.l+i.w*l};return o};gf.getPixelToData=function(e,t,r,n){var a=e._fullLayout._size,i;if(t)if(n==="domain")i=function(s){var l=(s-t._offset)/t._length;return r?1-l:l};else{var o=gf.rangeToShapePosition(t);i=function(s){return o(t.p2r(s-t._offset))}}else r?i=function(s){return 1-(s-a.t)/a.h}:i=function(s){return(s-a.l)/a.w};return i};gf.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,n=Math.round(e);return r?n+.5:n};gf.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref],a=!!n;return a?n._hadPlotinfo=!0:(n={},r.xref&&r.xref!=="paper"&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&r.yref!=="paper"&&(n.yaxis=e._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}};gf.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref],a=!!n;return a?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}};gf.getPathString=function(e,t){let r=t.type,n=Cm.getRefType(t.xref),a=Cm.getRefType(t.yref),i=e._fullLayout._size;var o,s,l,u,c,f,v,g,p,x,_,y;function C(F,E,I,R){var B;if(F)if(E==="domain")R?B=function(O){return F._offset+F._length*(1-O)}:B=function(O){return F._offset+F._length*O};else{let O=gf.shapePositionToRange(F);B=function(V){return F._offset+F.r2p(O(V,!0))},I==="path"&&F.type==="date"&&(B=gf.decodeDate(B))}else R?B=function(O){return i.t+i.h*(1-O)}:B=function(O){return i.l+i.w*O};return B}if(n==="array"?(v=[],o=t.xref.map(function(F){return Cm.getFromId(e,F)}),v=t.xref.map(function(F,E){return C(o[E],Cm.getRefType(F),r,!1)})):(o=Cm.getFromId(e,t.xref),v=C(o,n,r,!1)),a==="array"?(g=[],s=t.yref.map(function(F){return Cm.getFromId(e,F)}),g=t.yref.map(function(F,E){return C(s[E],Cm.getRefType(F),r,!0)})):(s=Cm.getFromId(e,t.yref),g=C(s,a,r,!0)),r==="path")return Vmt(t,v,g);if(n==="array")l=Kp(o[0],t.x0shift),u=Kp(o[1],t.x1shift),p=v[0](t.x0)+l,x=v[1](t.x1)+u;else if(l=Kp(o,t.x0shift),u=Kp(o,t.x1shift),t.xsizemode==="pixel"){let F=v(t.xanchor);p=F+t.x0+l,x=F+t.x1+u}else p=v(t.x0)+l,x=v(t.x1)+u;if(a==="array")c=Kp(s[0],t.y0shift),f=Kp(s[1],t.y1shift),_=g[0](t.y0)+c,y=g[1](t.y1)+f;else if(c=Kp(s,t.y0shift),f=Kp(s,t.y1shift),t.ysizemode==="pixel"){let F=g(t.yanchor);_=F-t.y0+c,y=F-t.y1+f}else _=g(t.y0)+c,y=g(t.y1)+f;if(r==="line")return"M"+p+","+_+"L"+x+","+y;if(r==="rect")return"M"+p+","+_+"H"+x+"V"+y+"H"+p+"Z";var k=(p+x)/2,S=(_+y)/2,L=Math.abs(k-p),w=Math.abs(S-_),A="A"+L+","+w,T=k+L+","+S,m=k+","+(S-w);return"M"+T+A+" 0 1,1 "+m+A+" 0 0,1 "+T+"Z"};function Vmt(e,t,r){let n=e.path,a=e.xsizemode,i=e.ysizemode,o=e.xanchor,s=e.yanchor,l=Array.isArray(e.xref),u=Array.isArray(e.yref);var c=0,f=0;return n.replace(Jp.segmentRE,function(v){var g=0,p=v.charAt(0),x=Jp.paramIsX[p],_=Jp.paramIsY[p],y=Jp.numParams[p];let C=x.drawn!==void 0,k=_.drawn!==void 0,S=l?t[c]:t,L=u?r[f]:r;var w=v.slice(1).replace(Jp.paramRE,function(A){return x[g]?a==="pixel"?A=S(o)+Number(A):A=S(A):_[g]&&(i==="pixel"?A=L(s)-Number(A):A=L(A)),g++,g>y&&(A="X"),A});return g>y&&(w=w.replace(/[\s,]*X.*/,""),Nhe.log("Ignoring extra params in segment "+v)),C&&c++,k&&f++,p+w})}gf.getPixelShift=Kp;function Kp(e,t){t=t||0;var r=0;return t&&e&&(e.type==="category"||e.type==="multicategory")&&(r=(e.r2p(1)-e.r2p(0))*t),r}});var YO=fe((M0r,Ghe)=>{"use strict";var Gmt=Xt(),Qp=Yi(),Uhe=as(),Vhe=ea(),Hmt=Em().readPaths,Xx=Lm(),jmt=Xx.getPathString,CT=IE(),Wmt=nc().FROM_TL;Ghe.exports=function(t,r,n,a){if(a.selectAll(".shape-label").remove(),!!(n.label.text||n.label.texttemplate)){var i;if(n.label.texttemplate){var o={};if(n.type!=="path"){var s=Qp.getFromId(t,n.xref),l=Qp.getFromId(t,n.yref);let ee=Array.isArray(n.xref),ce=Array.isArray(n.yref);for(var u in CT){var c=typeof CT[u]=="function",f=!ee||CT.simpleXVariables.includes(u),v=!ce||CT.simpleYVariables.includes(u);if(c&&f&&v){var g=CT[u](n,s,l);g!==void 0&&(o[u]=g)}}}i=Gmt.texttemplateStringForShapes({data:[o],fallback:n.label.texttemplatefallback,locale:t._fullLayout._d3locale,template:n.label.texttemplate})}else i=n.label.text;var p={"data-index":r},x=n.label.font,_={"data-notex":1},y=a.append("g").attr(p).classed("shape-label",!0),C=y.append("text").attr(_).classed("shape-label-text",!0).text(i),k,S,L,w;if(n.path){var A=jmt(t,n),T=Hmt(A,t);k=1/0,L=1/0,S=-1/0,w=-1/0;for(var m=0;mXx.getDataToPixel(t,De,be,!1,Ge)(me),le=(me,be,De,Ge)=>Xx.getDataToPixel(t,De,be,!0,Ge)(me);if(n.xsizemode==="pixel"){let me=ie(n.xanchor,void 0,ye,_e),be=Xx.getPixelShift(ye,n.x0shift),De=Xx.getPixelShift(ye,n.x1shift);k=me+n.x0+be,S=me+n.x1+De}else k=ie(n.x0,n.x0shift,ye,_e),S=ie(n.x1,n.x1shift,xe,ne);if(n.ysizemode==="pixel"){let me=le(n.yanchor,void 0,ue,ae),be=Xx.getPixelShift(ue,n.y0shift),De=Xx.getPixelShift(ue,n.y1shift);L=me-n.y0+be,w=me-n.y1+De}else L=le(n.y0,n.y0shift,ue,ae),w=le(n.y1,n.y1shift,K,pe)}var O=n.label.textangle;O==="auto"&&(n.type==="line"?O=Ymt(k,L,S,w):O=0),C.call(function(ee){return ee.call(Vhe.font,x).attr({}),Uhe.convertToTspans(ee,t),ee});var V=Vhe.bBox(C.node()),j=Xmt(k,L,S,w,n,O,V),q=j.textx,U=j.texty,J=j.xanchor;C.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[J],y:U,x:q,transform:"rotate("+O+","+q+","+U+")"}).call(Uhe.positionText,q,U)}};function Ymt(e,t,r,n){var a,i;return i=Math.abs(r-e),r>=e?a=t-n:a=n-t,-180/Math.PI*Math.atan2(a,i)}function Xmt(e,t,r,n,a,i,o){var s=a.label.textposition,l=a.label.textangle,u=a.label.padding,c=a.type,f=Math.PI/180*i,v=Math.sin(f),g=Math.cos(f),p=a.label.xanchor,x=a.label.yanchor,_,y,C,k;if(c==="line"){s==="start"?(_=e,y=t):s==="end"?(_=r,y=n):(_=(e+r)/2,y=(t+n)/2),p==="auto"&&(s==="start"?l==="auto"?r>e?p="left":re?p="right":re?p="right":re?p="left":r{"use strict";var Zmt=Xt(),$mt=Zmt.strTranslate,Hhe=ed(),Yhe=$p(),Kmt=Yhe.drawMode,Xhe=Yhe.selectMode,Zhe=bi(),jhe=ni(),s8=e8(),Jmt=s8.i000,Qmt=s8.i090,eyt=s8.i180,tyt=s8.i270,ryt=pm(),$he=ryt.clearOutlineControllers,ZO=Em(),o8=ZO.pointsOnRectangle,XO=ZO.pointsOnEllipse,nyt=ZO.writePaths,iyt=a8().newShapes,ayt=a8().createShapeObj,oyt=WO(),syt=YO();Khe.exports=function e(t,r,n,a){a||(a=0);var i=n.gd;function o(){e(t,r,n,a++),(XO(t[0])||n.hasText)&&s({redrawing:!0})}function s(j){var q={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,q=iyt(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,q=oyt(r,n),i._fullLayout._reselect=!0),Object.keys(q).length&&Zhe.call((j||{}).redrawing?"relayout":"_guiRelayout",i,q)}var l=i._fullLayout,u=l._zoomlayer,c=n.dragmode,f=Kmt(c),v=Xhe(c);(f||v)&&(i._fullLayout._outlining=!0),$he(i),r.attr("d",nyt(t));var g,p,x,_,y;if(!a&&(n.isActiveShape||n.isActiveSelection)){y=lyt([],t);var C=u.append("g").attr("class","outline-controllers");F(C),V()}if(f&&n.hasText){var k=u.select(".label-temp"),S=ayt(r,n,n.dragmode);syt(i,"label-temp",S,k)}function L(j){x=+j.srcElement.getAttribute("data-i"),_=+j.srcElement.getAttribute("data-j"),g[x][_].moveFn=w}function w(j,q){if(t.length){var U=y[x][_][1],J=y[x][_][2],ee=t[x],ce=ee.length;if(o8(ee)){var ye=j,xe=q;if(n.isActiveSelection){var ue=Whe(ee,_);ue[1]===ee[_][1]?xe=0:ye=0}for(var K=0;K1&&!(j.length===2&&j[1][0]==="Z")&&(_===0&&(j[0][0]="M"),t[x]=j,o(),s())}}function m(j,q){if(j===2){x=+q.srcElement.getAttribute("data-i"),_=+q.srcElement.getAttribute("data-j");var U=t[x];!o8(U)&&!XO(U)&&T()}}function F(j){g=[];for(var q=0;q{"use strict";var cyt=xi(),nde=bi(),KO=Xt(),Zx=Yi(),fyt=Em().readPaths,hyt=l8(),c8=YO(),ide=pm().clearOutlineControllers,$O=ni(),f8=ea(),dyt=Mo().arrayEditor,Jhe=ed(),Qhe=kl(),ede=np(),$x=kT(),t0=Lm(),JO=t0.getPathString;sde.exports={draw:QO,drawOne:ade,eraseActiveShape:yyt,drawLabel:c8};function QO(e){var t=e._fullLayout;t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove();for(var r in t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var a=0;a{if(!e._dragging&&e._fullLayout.hoveranywhere){let o=a(i);o&&Qhe.hover(e,o,r.id)}}),n.addEventListener("click",i=>{if(!e._dragged&&e._fullLayout.clickanywhere){let o=a(i);o&&Qhe.click(e,o,r.id)}})}function ode(e,t,r){let n=r.xref,a=r.yref;if(Array.isArray(n)||Array.isArray(a)){let i="clip"+t._fullLayout._uid+"shape"+r._index,o=pyt(t,n,a);KO.ensureSingleById(t._fullLayout._clips,"clipPath",i,function(s){s.append("rect")}).select("rect").attr(o),f8.setClipUrl(e,i,t)}else{let i=(n+a).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");f8.setClipUrl(e,i?"clip"+t._fullLayout._uid+i:null,t)}}function pyt(e,t,r){let n=e._fullLayout._size;function a(s,l){let u=(Array.isArray(s)?s:[s]).map(v=>Zx.getFromId(e,v)).filter(Boolean);if(!u.length)return l?[n.t,n.t+n.h]:[n.l,n.l+n.w];let c=u.map(function(v){return v._offset}),f=u.map(function(v){return v._offset+v._length});return[Math.min(...c),Math.max(...f)]}let i=a(t,!1),o=a(r,!0);return{x:i[0],y:o[0],width:i[1]-i[0],height:o[1]-o[0]}}function gyt(e,t,r,n,a,i){var o=10,s=10,l=r.xsizemode==="pixel",u=r.ysizemode==="pixel",c=r.type==="line",f=r.type==="path",v=i.modifyItem,g,p,x,_,y,C,k,S,L,w,A,T,m,F,E,I=cyt.select(t.node().parentNode),R=Zx.getFromId(e,r.xref),B=Zx.getRefType(r.xref),O=Zx.getFromId(e,r.yref),V=Zx.getRefType(r.yref),j=r.x0shift,q=r.x1shift,U=r.y0shift,J=r.y1shift,ee=function(Oe,ze){var ct=t0.getDataToPixel(e,R,ze,!1,B);return ct(Oe)},ce=function(Oe,ze){var ct=t0.getDataToPixel(e,O,ze,!0,V);return ct(Oe)},ye=t0.getPixelToData(e,R,!1,B),xe=t0.getPixelToData(e,O,!0,V),ue=ne(),K={element:ue.node(),gd:e,prepFn:ie,doneFn:le,clickFn:me},_e;Jhe.init(K),ue.node().onmousemove=pe;function ne(){return c?ae():t}function ae(){var Oe=10,ze=Math.max(r.line.width,Oe),ct=a.append("g").attr("data-index",n).attr("drag-helper",!0);ct.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":ze,"stroke-opacity":"0"});var et={"fill-opacity":"0"},qe=Math.max(ze/2,Oe);return ct.append("circle").attr({"data-line-point":"start-point",cx:l?ee(r.xanchor)+r.x0:ee(r.x0,j),cy:u?ce(r.yanchor)-r.y0:ce(r.y0,U),r:qe}).style(et).classed("cursor-grab",!0),ct.append("circle").attr({"data-line-point":"end-point",cx:l?ee(r.xanchor)+r.x1:ee(r.x1,q),cy:u?ce(r.yanchor)-r.y1:ce(r.y1,J),r:qe}).style(et).classed("cursor-grab",!0),ct}function pe(Oe){if(u8(e)){_e=null;return}if(c)Oe.target.tagName==="path"?_e="move":_e=Oe.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ze=K.element.getBoundingClientRect(),ct=ze.right-ze.left,et=ze.bottom-ze.top,qe=Oe.clientX-ze.left,we=Oe.clientY-ze.top,Le=!f&&ct>o&&et>s&&!Oe.shiftKey?Jhe.getCursor(qe/ct,1-we/et):"move";ede(t,Le),_e=Le.split("-")[0]}}function ie(Oe){u8(e)||(l&&(y=ee(r.xanchor)),u&&(C=ce(r.yanchor)),r.type==="path"?E=r.path:(g=l?r.x0:ee(r.x0),p=u?r.y0:ce(r.y0),x=l?r.x1:ee(r.x1),_=u?r.y1:ce(r.y1)),g_?(k=p,A="y0",S=_,T="y1"):(k=_,A="y1",S=p,T="y0"),pe(Oe),Ge(a,r),it(t,r,e),K.moveFn=_e==="move"?be:De,K.altKey=Oe.altKey)}function le(){u8(e)||(ede(t),ht(a),ode(t,e,r),nde.call("_guiRelayout",e,i.getUpdateObj()))}function me(){u8(e)||ht(a)}function be(Oe,ze){if(r.type==="path"){var ct=function(we){return we},et=ct,qe=ct;l?v("xanchor",r.xanchor=ye(y+Oe)):(et=function(Le){return ye(ee(Le)+Oe)},R&&R.type==="date"&&(et=t0.encodeDate(et))),u?v("yanchor",r.yanchor=xe(C+ze)):(qe=function(Le){return xe(ce(Le)+ze)},O&&O.type==="date"&&(qe=t0.encodeDate(qe))),v("path",r.path=tde(E,et,qe))}else l?v("xanchor",r.xanchor=ye(y+Oe)):(v("x0",r.x0=ye(g+Oe)),v("x1",r.x1=ye(x+Oe))),u?v("yanchor",r.yanchor=xe(C+ze)):(v("y0",r.y0=xe(p+ze)),v("y1",r.y1=xe(_+ze)));t.attr("d",JO(e,r)),Ge(a,r),c8(e,n,r,I)}function De(Oe,ze){if(f){var ct=function(jt){return jt},et=ct,qe=ct;l?v("xanchor",r.xanchor=ye(y+Oe)):(et=function(mr){return ye(ee(mr)+Oe)},R&&R.type==="date"&&(et=t0.encodeDate(et))),u?v("yanchor",r.yanchor=xe(C+ze)):(qe=function(mr){return xe(ce(mr)+ze)},O&&O.type==="date"&&(qe=t0.encodeDate(qe))),v("path",r.path=tde(E,et,qe))}else if(c){if(_e==="resize-over-start-point"){var we=g+Oe,Le=u?p-ze:p+ze;v("x0",r.x0=l?we:ye(we)),v("y0",r.y0=u?Le:xe(Le))}else if(_e==="resize-over-end-point"){var Ke=x+Oe,Te=u?_-ze:_+ze;v("x1",r.x1=l?Ke:ye(Ke)),v("y1",r.y1=u?Te:xe(Te))}}else{var Ve=function(jt){return _e.indexOf(jt)!==-1},$e=Ve("n"),ot=Ve("s"),tt=Ve("w"),nt=Ve("e"),We=$e?k+ze:k,mt=ot?S+ze:S,bt=tt?L+Oe:L,Yt=nt?w+Oe:w;u&&($e&&(We=k-ze),ot&&(mt=S-ze)),(!u&&mt-We>s||u&&We-mt>s)&&(v(A,r[A]=u?We:xe(We)),v(T,r[T]=u?mt:xe(mt))),Yt-bt>o&&(v(m,r[m]=l?bt:ye(bt)),v(F,r[F]=l?Yt:ye(Yt)))}t.attr("d",JO(e,r)),Ge(a,r),c8(e,n,r,I)}function Ge(Oe,ze){(l||u)&&ct();function ct(){var et=ze.type!=="path",qe=Oe.selectAll(".visual-cue").data([0]),we=1;qe.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":we}).classed("visual-cue",!0);var Le=ee(l?ze.xanchor:KO.midRange(et?[ze.x0,ze.x1]:t0.extractPathCoords(ze.path,$x.paramIsX))),Ke=ce(u?ze.yanchor:KO.midRange(et?[ze.y0,ze.y1]:t0.extractPathCoords(ze.path,$x.paramIsY)));if(Le=t0.roundPositionForSharpStrokeRendering(Le,we),Ke=t0.roundPositionForSharpStrokeRendering(Ke,we),l&&u){var Te="M"+(Le-1-we)+","+(Ke-1-we)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";qe.attr("d",Te)}else if(l){var Ve="M"+(Le-1-we)+","+(Ke-9-we)+"v18 h2 v-18 Z";qe.attr("d",Ve)}else{var $e="M"+(Le-9-we)+","+(Ke-1-we)+"h18 v2 h-18 Z";qe.attr("d",$e)}}}function ht(Oe){Oe.selectAll(".visual-cue").remove()}function it(Oe,ze,ct){var et=ze.xref,qe=ze.yref,we=Zx.getFromId(ct,et),Le=Zx.getFromId(ct,qe),Ke="";et!=="paper"&&!we.autorange&&(Ke+=et),qe!=="paper"&&!Le.autorange&&(Ke+=qe),f8.setClipUrl(Oe,Ke?"clip"+ct._fullLayout._uid+Ke:null,ct)}}function tde(e,t,r){return e.replace($x.segmentRE,function(n){var a=0,i=n.charAt(0),o=$x.paramIsX[i],s=$x.paramIsY[i],l=$x.numParams[i],u=n.slice(1).replace($x.paramRE,function(c){return a>=l||(o[a]?c=t(c):s[a]&&(c=r(c)),a++),c});return i+u})}function myt(e,t){if(h8(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){rde(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=rde,QO(e)}}}function rde(e){if(h8(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(ide(e),delete e._fullLayout._activeShapeIndex,QO(e))}}function yyt(e){if(h8(e)){ide(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var s3=Xt()._,xyt=function(e){return{DIALOG_TITLE:s3(e,"Share chart"),DIALOG_MESSAGE_CLOUD:s3(e,"This chart will be uploaded to {Plotly Cloud} to create a sharing link. Only you can see it until you change its visibility."),DIALOG_MESSAGE_CLOUD_ACCOUNT:s3(e,"If you don't have a Plotly Cloud account yet, you'll have a chance to create one."),DIALOG_MESSAGE_OTHER:s3(e,"This chart will be sent to {serverUrl}."),DIALOG_CANCEL:s3(e,"Cancel"),DIALOG_CONFIRM:s3(e,"Share")}};lde.exports=xyt});var hde=fe((C0r,fde)=>{"use strict";var cde=xi(),{dfltConfig:_yt}=im(),byt=ude(),wyt=(e,t,r,n,a)=>{let i=byt(e),o=t.append("div").classed("plotly-cloud-dialog-box",!0);if(o.append("div").classed("plotly-cloud-dialog-title",!0).text(i.DIALOG_TITLE),r===_yt.plotlyServerURL){let l=o.append("div").classed("plotly-cloud-dialog-message",!0),u=new URL(r).origin,c=i.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),f=c[0],v=c[2],g=c[4];l.append("span").text(f),l.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",u).attr("target","_blank").text(v),l.append("span").text(g),l.append("div").classed("plotly-cloud-dialog-message--account",!0).text(i.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let l=new URL(r),u=l.hostname,c=l.origin,f=i.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),v=f[0],g=f[4],p=o.append("div").classed("plotly-cloud-dialog-message",!0);p.append("span").text(v),p.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",c).attr("target","_blank").text(u),p.append("span").text(g)}let s=o.append("div").classed("plotly-cloud-dialog-buttons",!0);s.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(i.DIALOG_CANCEL).on("click",a),s.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(i.DIALOG_CONFIRM).on("click",n)},Tyt=(e,t,r)=>{let n=cde.select(e._fullLayout._paperdiv.node());n.selectAll(".plotly-cloud-dialog").remove();let a=n.append("div").classed("plotly-cloud-dialog",!0),i=()=>{a.remove(),document.removeEventListener("keydown",o)},o=s=>{(s.key==="Escape"||s.keyCode===27)&&i()};document.addEventListener("keydown",o),a.on("click",()=>{cde.event.target===a.node()&&i()}),wyt(e,a,t,()=>{i(),r()},i)};fde.exports=Tyt});var rN=fe((L0r,xde)=>{"use strict";var iv=bi(),Ayt=Hs(),vde=El(),Zo=Jk(),Myt=d8().eraseActiveShape,Syt=hde(),v8=Xt(),Lo=v8._,$o=xde.exports={};$o.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?Lo(e,"Download plot as a PNG"):Lo(e,"Download plot")},icon:Zo.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};v8.notifier(Lo(e,"Preparing image - this may take a few seconds"),"long",e),["filename","width","height","scale"].forEach(function(n){n in t&&(r[n]=t[n])}),iv.call("downloadImage",e,r).then(function(n){v8.notifier(Lo(e,"Image download succeeded")+" - "+n,"long",e)}).catch(function(){v8.notifier(Lo(e,"Sorry, there was a problem downloading your image!"),"long",e)})}};$o.sendChartToCloud={name:"sendChartToCloud",title:function(e){return Lo(e,"Share chart...")},icon:Zo.cloudupload,click:function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(!t){console.error("No destination URL provided (plotlyServerURL is empty)");return}var r;try{r=new URL(t)}catch(a){console.error("Invalid plotlyServerURL: "+t);return}let n=["http:","https:"];if(!n.includes(r.protocol)){console.error(`Invalid protocol '${r.protocol}' in plotlyServerURL '${t}'. Must be one of: ${n.join(", ")}`);return}Syt(e,t,function(){Ayt.sendDataToCloud(e,t)})}};$o.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Lo(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Zo.zoombox,click:rd};$o.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Lo(e,"Pan")},attr:"dragmode",val:"pan",icon:Zo.pan,click:rd};$o.select2d={name:"select2d",_cat:"select",title:function(e){return Lo(e,"Box Select")},attr:"dragmode",val:"select",icon:Zo.selectbox,click:rd};$o.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Lo(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Zo.lasso,click:rd};$o.drawclosedpath={name:"drawclosedpath",title:function(e){return Lo(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Zo.drawclosedpath,click:rd};$o.drawopenpath={name:"drawopenpath",title:function(e){return Lo(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Zo.drawopenpath,click:rd};$o.drawline={name:"drawline",title:function(e){return Lo(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Zo.drawline,click:rd};$o.drawrect={name:"drawrect",title:function(e){return Lo(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Zo.drawrect,click:rd};$o.drawcircle={name:"drawcircle",title:function(e){return Lo(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Zo.drawcircle,click:rd};$o.eraseshape={name:"eraseshape",title:function(e){return Lo(e,"Erase active shape")},icon:Zo.eraseshape,click:Myt};$o.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Lo(e,"Zoom in")},attr:"zoom",val:"in",icon:Zo.zoom_plus,click:rd};$o.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Lo(e,"Zoom out")},attr:"zoom",val:"out",icon:Zo.zoom_minus,click:rd};$o.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Lo(e,"Autoscale")},attr:"zoom",val:"auto",icon:Zo.autoscale,click:rd};$o.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Lo(e,"Reset axes")},attr:"zoom",val:"reset",icon:Zo.home,click:rd};$o.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Lo(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Zo.tooltip_basic,gravity:"ne",click:rd};$o.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Lo(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Zo.tooltip_compare,gravity:"ne",click:rd};function rd(e,t){var r=t.currentTarget,n=r.getAttribute("data-attr"),a=r.getAttribute("data-val")||!0,i=e._fullLayout,o={},s=vde.list(e,null,!0),l=i._cartesianSpikesEnabled,u,c;if(n==="zoom"){var f=a==="in"?.5:2,v=(1+f)/2,g=(1-f)/2,p,x;for(c=0;c-w),[x,_]=f.invert(c.midPt),{minscale:y}=u.projection,C=(s=u.projection.maxscale)!=null?s:1/0,k=Math.min(y,C),S=Math.max(y,C),L=a==="in"?dde*v:1/dde*v;L>S?L=S:L{"use strict";var _de=rN(),Lyt=Object.keys(_de),bde=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],wde=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(bde),l3=[],Pyt=function(e){if(wde.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();l3.indexOf(t)===-1&&l3.push(t),l3.indexOf(r)===-1&&l3.push(r)}};Lyt.forEach(function(e){Pyt(_de[e])});l3.sort();Tde.exports={DRAW_MODES:bde,backButtons:wde,foreButtons:l3}});var aN={};zp(aN,{default:()=>Dyt});var iN,Fyt,Dyt,oN=Co(()=>{"use strict";iN=$0(nN()),Fyt={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 *${iN.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 *${iN.default.foreButtons.join("*, *")}*.`].join(" ")}},Dyt=Fyt});var Mde=fe((F0r,Ade)=>{"use strict";var Ryt=Xt(),LT=ni(),Iyt=Mo(),zyt=(oN(),Gs(aN)).default;Ade.exports=function(t,r){var n=t.modebar||{},a=Iyt.newContainer(r,"modebar");function i(s,l){return Ryt.coerce(n,a,zyt,s,l)}i("orientation"),i("bgcolor",LT.addOpacity(r.paper_bgcolor,.5));var o=LT.contrast(LT.rgb(r.modebar.bgcolor));i("color",LT.addOpacity(o,.3)),i("activecolor",LT.addOpacity(o,.7)),i("uirevision",r.uirevision),i("add"),i("remove")}});var Cde=fe((D0r,kde)=>{"use strict";var sN=xi(),qyt=aa(),m8=Xt(),Sde=Jk(),Byt=A4().version,Oyt=new DOMParser;function Ede(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var e1=Ede.prototype;e1.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,a="modebar-"+n._uid;this.element.setAttribute("id",a),this.element.setAttribute("role","toolbar"),this._uid=a,this.element.className="modebar modebar--custom",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),n.modebar.orientation==="v"&&(this.element.className+=" vertical",t=t.reverse());var i=n.modebar,o="#"+a+" .modebar-group";document.querySelectorAll(o).forEach(function(f){f.style.backgroundColor=i.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||l||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton(),m8.setStyleOnHover("#"+a+" .modebar-btn",".active",".icon path","fill: "+i.activecolor,"fill: "+i.color,this.element)};e1.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var n=t.createGroup();r.forEach(function(a){var i=a.name;if(!i)throw new Error("must provide button 'name' in button config");if(t.buttonsNames.indexOf(i)!==-1)throw new Error("button name '"+i+"' is taken");t.buttonsNames.push(i);var o=t.createButton(a);t.buttonElements.push(o),n.appendChild(o)}),t.element.appendChild(n)})};e1.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};e1.createButton=function(e){var t=this,r=document.createElement("button");r.setAttribute("type","button"),r.setAttribute("rel","tooltip"),r.className="modebar-btn";var n=e.title;n===void 0?n=e.name:typeof n=="function"&&(n=n(this.graphInfo)),(n||n===0)&&(r.setAttribute("data-title",n),r.setAttribute("aria-label",n)),e.attr!==void 0&&r.setAttribute("data-attr",e.attr);var a=e.val;a!==void 0&&(typeof a=="function"&&(a=a(this.graphInfo)),r.setAttribute("data-val",a));var i=e.click;if(typeof i!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(s){e.click(t.graphInfo,s),t.updateActiveButton(s.currentTarget)}),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&sN.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||Sde.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};e1.createIcon=function(e){var t=qyt(e.height)?Number(e.height):e.ascent-e.descent,r="http://www.w3.org/2000/svg",n;if(e.path){n=document.createElementNS(r,"svg"),n.setAttribute("viewBox",[0,0,e.width,t].join(" ")),n.setAttribute("class","icon");var a=document.createElementNS(r,"path");a.setAttribute("d",e.path),e.transform?a.setAttribute("transform",e.transform):e.ascent!==void 0&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),n.appendChild(a)}if(e.svg){var i=Oyt.parseFromString(e.svg,"application/xml");n=i.childNodes[0]}return n.setAttribute("height","1em"),n.setAttribute("width","1em"),n};e1.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(n){var a=n.getAttribute("data-val")||!0,i=n.getAttribute("data-attr"),o=n.getAttribute("data-toggle")==="true",s=sN.select(n),l=function(f,v){var g=t.modebar,p=f.querySelector(".icon path");p&&(v||f.matches(":hover")?p.style.fill=g.activecolor:p.style.fill=g.color)};if(o){if(i===r){var u=!s.classed("active");s.classed("active",u),l(n,u)}}else{var c=i===null?i:m8.nestedProperty(t,i).get();s.classed("active",c===a),l(n,c===a)}})};e1.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r{"use strict";var Vyt=El(),Lde=Is(),lN=bi(),Gyt=Sd().isUnifiedHover,Hyt=Cde(),y8=rN(),jyt=nN().DRAW_MODES,Wyt=Xt().extendDeep;Pde.exports=function(t){var r=t._fullLayout,n=t._context,a=r._modeBar;if(!n.displayModeBar&&!n.watermark){a&&(a.destroy(),delete r._modeBar);return}if(!Array.isArray(n.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(n.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var i=n.modeBarButtons,o;Array.isArray(i)&&i.length?o=Jyt(i):!n.displayModeBar&&n.watermark?o=[]:o=Yyt(t),a?a.update(t,o):r._modeBar=Hyt(t,o)};function Yyt(e){var t=e._fullLayout,r=e._fullData,n=e._context;function a(j,q){if(typeof q=="string"){if(q.toLowerCase()===j.toLowerCase())return!0}else{var U=q.name,J=q._cat||q.name;if(U===j||J===j.toLowerCase())return!0}return!1}var i=t.modebar.add;typeof i=="string"&&(i=[i]);var o=t.modebar.remove;typeof o=="string"&&(o=[o]);var s=n.modeBarButtonsToAdd.concat(i.filter(function(j){for(var q=0;q1?(m=["toggleHover"],F=["resetViews"]):f?(T=["zoomInGeo","zoomOutGeo"],m=["hoverClosestGeo"],F=["resetGeo"]):c?(m=["hoverClosest3d"],F=["resetCameraDefault3d","resetCameraLastSave3d"]):x?(T=["zoomInMap","zoomOutMap"],m=["toggleHover"],F=["resetViewMap"]):v?m=["hoverClosestPie"]:C?(m=["hoverClosestCartesian","hoverCompareCartesian"],F=["resetViewSankey"]):m=["toggleHover"],u&&m.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),($yt(r)||S)&&(m=[]),u&&!k&&(T=["zoomIn2d","zoomOut2d","autoScale2d"],F[0]!=="resetViews"&&(F=["resetScale2d"])),c?E=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!k||p?E=["zoom2d","pan2d"]:x||f?E=["pan2d"]:_&&(E=["zoom2d"]),Zyt(r)&&E.push("select2d","lasso2d");var I=[],R=function(j){I.indexOf(j)===-1&&m.indexOf(j)!==-1&&I.push(j)};if(Array.isArray(s)){for(var B=[],O=0;O{"use strict";Dde.exports={moduleType:"component",name:"modebar",layoutAttributes:(oN(),Gs(aN)).default,supplyLayoutDefaults:Mde(),manage:Fde()}});var cN=fe((z0r,Rde)=>{"use strict";var Qyt=nc().FROM_BL;Rde.exports=function(t,r,n){n===void 0&&(n=Qyt[t.constraintoward||"center"]);var a=[t.r2l(t.range[0]),t.r2l(t.range[1])],i=a[0]+(a[1]-a[0])*n;t.range=t._input.range=[t.l2r(i+(a[0]-i)*r),t.l2r(i+(a[1]-i)*r)],t.setScale()}});var Jx=fe(PT=>{"use strict";var Kx=Xt(),fN=rp(),ip=El().id2name,ext=pf(),Ide=cN(),txt=Hp(),rxt=Wa().ALMOST_EQUAL,nxt=nc().FROM_BL;PT.handleDefaults=function(e,t,r){var n=r.axIds,a=r.axHasImage,i=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,l,u,c,f,v,g,p;for(s=0;si?r.slice(i):n.slice(a))+o}function axt(e,t){for(var r=t._size,n=r.h/r.w,a={},i=Object.keys(e),o=0;orxt*p&&!C)){for(i=0;iI&&JF&&(F=J);var ce=(F-m)/(2*E);f/=ce,m=l.l2r(m),F=l.l2r(F),l.range=l._input.range=w{"use strict";var _8=xi(),nd=bi(),L0=Hs(),av=Xt(),vN=as(),pN=ST(),FT=ni(),u3=ea(),Ode=qx(),Hde=uN(),DT=Yi(),ng=nc(),jde=Jx(),oxt=jde.enforce,sxt=jde.clean,Nde=rp().doAutoRange,Wde="start",lxt="middle",Yde="end",uxt=rc().zindexSeparator;Hc.layoutStyles=function(e){return av.syncOrAsync([L0.doAutoMargin,fxt],e)};function cxt(e,t,r){for(var n=0;n=e[1]||a[1]<=e[0])&&i[0]t[0])return!0}return!1}function fxt(e){var t=e._fullLayout,r=t._size,n=r.p,a=DT.list(e,"",!0),i,o,s,l,u,c;if(t._paperdiv.style({width:e._context.responsive&&t.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":t.width+"px",height:e._context.responsive&&t.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":t.height+"px"}).selectAll(".main-svg").call(u3.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),Hc.drawMainTitle(e),Hde.manage(e),!t._has("cartesian"))return L0.previousPromises(e);function f(ie,le,me){var be=ie._lw/2;if(ie._id.charAt(0)==="x"){if(le){if(me==="top")return le._offset-n-be}else return r.t+r.h*(1-(ie.position||0))+be%1;return le._offset+le._length+n+be}if(le){if(me==="right")return le._offset+le._length+n+be}else return r.l+r.w*(ie.position||0)+be%1;return le._offset-n-be}for(i=0;i0){pxt(e,i,u,l),s.attr({x:o,y:i,"text-anchor":n,dy:Gde(t.yanchor)}).call(vN.positionText,o,i);var c=(t.text.match(vN.BR_TAG_ALL)||[]).length;if(c){var f=ng.LINE_SPACING*c+ng.MID_SHIFT;t.y===0&&(f=-f),s.selectAll(".line").each(function(){var _=+this.getAttribute("dy").slice(0,-2)-f+"em";this.setAttribute("dy",_)})}var v=_8.select(e).selectAll(".gtitle-subtitle");if(v.node()){var g=s.node().getBBox(),p=g.y+g.height,x=p+Ode.SUBTITLE_PADDING_EM*t.subtitle.font.size;v.attr({x:o,y:x,"text-anchor":n,dy:Gde(t.yanchor)}).call(vN.positionText,o,x)}}}};function hxt(e,t,r,n,a){var i=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=av.isTopAnchor(t)?n:n-a,s=r==="b"?i-o:o;return av.isTopAnchor(t)&&r==="t"||av.isBottomAnchor(t)&&r==="b"?!1:s.5?"t":"b",o=e._fullLayout.margin[i],s=0;return t.yref==="paper"?s=r+t.pad.t+t.pad.b:t.yref==="container"&&(s=dxt(i,n,a,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function pxt(e,t,r,n){var a="title.automargin",i=e._fullLayout.title,o=i.y>.5?"t":"b",s={x:i.x,y:i.y,t:0,b:0},l={};i.yref==="paper"&&hxt(e,i,o,t,n)?s[o]=r:i.yref==="container"&&(l[o]=r,e._fullLayout._reservedMargin[a]=l),L0.allowAutoMargin(e,a),L0.autoMargin(e,a,s)}function gxt(e,t){var r=e.title,n=e._size,a=0;return t===Wde?a=r.pad.l:t===Yde&&(a=-r.pad.r),r.xref==="paper"?n.l+n.w*r.x+a:e.width*r.x+a}function mxt(e,t){var r=e.title,n=e._size,a=0;return t==="0em"||!t?a=-r.pad.b:t===ng.CAP_SHIFT+"em"&&(a=r.pad.t),r.y==="auto"?n.t/2:r.yref==="paper"?n.t+n.h-n.h*r.y+a:e.height-e.height*r.y+a}function Gde(e){return e==="top"?ng.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":ng.MID_SHIFT+"em"}function yxt(e){var t=e.title,r=lxt;return av.isRightAnchor(t)?r=Yde:av.isLeftAnchor(t)&&(r=Wde),r}function xxt(e){var t=e.title,r="0em";return av.isTopAnchor(t)?r=ng.CAP_SHIFT+"em":av.isMiddleAnchor(t)&&(r=ng.MID_SHIFT+"em"),r}Hc.doTraceStyle=function(e){var t=e.calcdata,r=[],n;for(n=0;n{"use strict";var _xt=Em().readPaths,bxt=l8(),Xde=pm().clearOutlineControllers,gN=ni(),Zde=ea(),wxt=Mo().arrayEditor,$de=Lm(),Txt=$de.getPathString;Jde.exports={draw:b8,drawOne:Kde,activateLastSelection:Sxt};function b8(e){var t=e._fullLayout;Xde(e),t._selectionLayer.selectAll("path").remove();for(var r in t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var a=0;a=0;_--){var y=o.append("path").attr(l).style("opacity",_?.1:u).call(gN.stroke,f).call(gN.fill,c).call(Zde.dashLine,_?"solid":g,_?4+v:v);if(Axt(y,e,n),p){var C=wxt(e.layout,"selections",n);y.style({cursor:"move"});var k={element:y.node(),plotinfo:a,gd:e,editHelpers:C,isActiveSelection:!0},S=_xt(s,e);bxt(S,y,k)}else y.style("pointer-events",_?"all":"none");x[_]=y}var L=x[0],w=x[1];w.node().addEventListener("click",function(){return Mxt(e,L)})}}function Axt(e,t,r){var n=r.xref+r.yref;Zde.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function Mxt(e,t){if(w8(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){mN(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=mN,b8(e)}}}function Sxt(e){if(w8(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=mN,b8(e)}}function mN(e){if(w8(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(Xde(e),delete e._fullLayout._activeSelectionIndex,b8(e))}}});var e0e=fe((N0r,Qde)=>{function Ext(){var e,t=0,r=!1;function n(a,i){return e.list.push({type:a,data:i?JSON.parse(JSON.stringify(i)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(a,i){return n("check",{seg1:a,seg2:i})},segmentChop:function(a,i){return n("div_seg",{seg:a,pt:i}),n("chop",{seg:a,pt:i})},statusRemove:function(a){return n("pop_seg",{seg:a})},segmentUpdate:function(a){return n("seg_update",{seg:a})},segmentNew:function(a,i){return n("new_seg",{seg:a,primary:i})},segmentRemove:function(a){return n("rem_seg",{seg:a})},tempStatus:function(a,i,o){return n("temp_status",{seg:a,above:i,below:o})},rewind:function(a){return n("rewind",{seg:a})},status:function(a,i,o){return n("status",{seg:a,above:i,below:o})},vert:function(a){return a===r?e:(r=a,n("vert",{x:a}))},log:function(a){return typeof a!="string"&&(a=JSON.stringify(a,!1," ")),n("log",{txt:a})},reset:function(){return n("reset")},selected:function(a){return n("selected",{segs:a})},chainStart:function(a){return n("chain_start",{seg:a})},chainRemoveHead:function(a,i){return n("chain_rem_head",{index:a,pt:i})},chainRemoveTail:function(a,i){return n("chain_rem_tail",{index:a,pt:i})},chainNew:function(a,i){return n("chain_new",{pt1:a,pt2:i})},chainMatch:function(a){return n("chain_match",{index:a})},chainClose:function(a){return n("chain_close",{index:a})},chainAddHead:function(a,i){return n("chain_add_head",{index:a,pt:i})},chainAddTail:function(a,i){return n("chain_add_tail",{index:a,pt:i})},chainConnect:function(a,i){return n("chain_con",{index1:a,index2:i})},chainReverse:function(a){return n("chain_rev",{index:a})},chainJoin:function(a,i){return n("chain_join",{index1:a,index2:i})},done:function(){return n("done")}},e}Qde.exports=Ext});var r0e=fe((U0r,t0e)=>{function kxt(e){typeof e!="number"&&(e=1e-10);var t={epsilon:function(r){return typeof r=="number"&&(e=r),e},pointAboveOrOnLine:function(r,n,a){var i=n[0],o=n[1],s=a[0],l=a[1],u=r[0],c=r[1];return(s-i)*(c-o)-(l-o)*(u-i)>=-e},pointBetween:function(r,n,a){var i=r[1]-n[1],o=a[0]-n[0],s=r[0]-n[0],l=a[1]-n[1],u=s*o+i*l;if(u-e)},pointsSameX:function(r,n){return Math.abs(r[0]-n[0])e!=s-i>e&&(o-c)*(i-f)/(s-f)+c-a>e&&(l=!l),o=c,s=f}return l}};return t}t0e.exports=kxt});var i0e=fe((V0r,n0e)=>{var Cxt={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(t===null||t===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,a=e.root.next;a!==null;){if(r(a)){t.prev=a.prev,t.next=a,a.prev.next=t,a.prev=t;return}n=a,a=a.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;n!==null&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(a){return a.prev=r,a.next=n,r.next=a,n!==null&&(n.prev=a),a}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};n0e.exports=Cxt});var o0e=fe((G0r,a0e)=>{var IT=i0e();function Lxt(e,t,r){function n(p,x){return{id:r?r.segmentId():-1,start:p,end:x,myFill:{above:null,below:null},otherFill:null}}function a(p,x,_){return{id:r?r.segmentId():-1,start:p,end:x,myFill:{above:_.myFill.above,below:_.myFill.below},otherFill:null}}var i=IT.create();function o(p,x,_,y,C,k){var S=t.pointsCompare(x,C);return S!==0?S:t.pointsSame(_,k)?0:p!==y?p?1:-1:t.pointAboveOrOnLine(_,y?C:k,y?k:C)?1:-1}function s(p,x){i.insertBefore(p,function(_){var y=o(p.isStart,p.pt,x,_.isStart,_.pt,_.other.pt);return y<0})}function l(p,x){var _=IT.node({isStart:!0,pt:p.start,seg:p,primary:x,other:null,status:null});return s(_,p.end),_}function u(p,x,_){var y=IT.node({isStart:!1,pt:x.end,seg:x,primary:_,other:p,status:null});p.other=y,s(y,p.pt)}function c(p,x){var _=l(p,x);return u(_,p,x),_}function f(p,x){r&&r.segmentChop(p.seg,x),p.other.remove(),p.seg.end=x,p.other.pt=x,s(p.other,p.pt)}function v(p,x){var _=a(x,p.seg.end,p.seg);return f(p,x),c(_,p.primary)}function g(p,x){var _=IT.create();function y(O,V){var j=O.seg.start,q=O.seg.end,U=V.seg.start,J=V.seg.end;return t.pointsCollinear(j,U,J)?t.pointsCollinear(q,U,J)||t.pointAboveOrOnLine(q,U,J)?1:-1:t.pointAboveOrOnLine(j,U,J)?1:-1}function C(O){return _.findTransition(function(V){var j=y(O,V.ev);return j>0})}function k(O,V){var j=O.seg,q=V.seg,U=j.start,J=j.end,ee=q.start,ce=q.end;r&&r.checkIntersection(j,q);var ye=t.linesIntersect(U,J,ee,ce);if(ye===!1){if(!t.pointsCollinear(U,J,ee)||t.pointsSame(U,ce)||t.pointsSame(J,ee))return!1;var xe=t.pointsSame(U,ee),ue=t.pointsSame(J,ce);if(xe&&ue)return V;var K=!xe&&t.pointBetween(U,ee,ce),_e=!ue&&t.pointBetween(J,ee,ce);if(xe)return _e?v(V,J):v(O,ce),V;K&&(ue||(_e?v(V,J):v(O,ce)),v(V,U))}else ye.alongA===0&&(ye.alongB===-1?v(O,ee):ye.alongB===0?v(O,ye.pt):ye.alongB===1&&v(O,ce)),ye.alongB===0&&(ye.alongA===-1?v(V,U):ye.alongA===0?v(V,ye.pt):ye.alongA===1&&v(V,J));return!1}for(var S=[];!i.isEmpty();){var L=i.getHead();if(r&&r.vert(L.pt[0]),L.isStart){let O=function(){if(A){var V=k(L,A);if(V)return V}return T?k(L,T):!1};var B=O;r&&r.segmentNew(L.seg,L.primary);var w=C(L),A=w.before?w.before.ev:null,T=w.after?w.after.ev:null;r&&r.tempStatus(L.seg,A?A.seg:!1,T?T.seg:!1);var m=O();if(m){if(e){var F;L.seg.myFill.below===null?F=!0:F=L.seg.myFill.above!==L.seg.myFill.below,F&&(m.seg.myFill.above=!m.seg.myFill.above)}else m.seg.otherFill=L.seg.myFill;r&&r.segmentUpdate(m.seg),L.other.remove(),L.remove()}if(i.getHead()!==L){r&&r.rewind(L.seg);continue}if(e){var F;L.seg.myFill.below===null?F=!0:F=L.seg.myFill.above!==L.seg.myFill.below,T?L.seg.myFill.below=T.seg.myFill.above:L.seg.myFill.below=p,F?L.seg.myFill.above=!L.seg.myFill.below:L.seg.myFill.above=L.seg.myFill.below}else if(L.seg.otherFill===null){var E;T?L.primary===T.primary?E=T.seg.otherFill.above:E=T.seg.myFill.above:E=L.primary?x:p,L.seg.otherFill={above:E,below:E}}r&&r.status(L.seg,A?A.seg:!1,T?T.seg:!1),L.other.status=w.insert(IT.node({ev:L}))}else{var I=L.status;if(I===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(_.exists(I.prev)&&_.exists(I.next)&&k(I.prev.ev,I.next.ev),r&&r.statusRemove(I.ev.seg),I.remove(),!L.primary){var R=L.seg.myFill;L.seg.myFill=L.seg.otherFill,L.seg.otherFill=R}S.push(L.seg)}i.getHead().remove()}return r&&r.done(),S}return e?{addRegion:function(p){for(var x,_=p[p.length-1],y=0;y{function Pxt(e,t,r){var n=[],a=[];return e.forEach(function(i){var o=i.start,s=i.end;if(t.pointsSame(o,s)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}r&&r.chainStart(i);var l={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},c=l;function f(B,O,V){return c.index=B,c.matches_head=O,c.matches_pt1=V,c===l?(c=u,!1):(c=null,!0)}for(var v=0;v{function zT(e,t,r){var n=[];return e.forEach(function(a){var i=(a.myFill.above?8:0)+(a.myFill.below?4:0)+(a.otherFill&&a.otherFill.above?2:0)+(a.otherFill&&a.otherFill.below?1:0);t[i]!==0&&n.push({id:r?r.segmentId():-1,start:a.start,end:a.end,myFill:{above:t[i]===1,below:t[i]===2},otherFill:null})}),r&&r.selected(n),n}var Fxt={union:function(e,t){return zT(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return zT(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return zT(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return zT(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return zT(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};u0e.exports=Fxt});var h0e=fe((W0r,f0e)=>{var Dxt={toPolygon:function(e,t){function r(i){if(i.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var c=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[c]})}for(var s=o(i[0]),l=1;l{var Rxt=e0e(),Ixt=r0e(),d0e=o0e(),zxt=l0e(),qT=c0e(),v0e=h0e(),ov=!1,BT=Ixt(),r0;r0={buildLog:function(e){return e===!0?ov=Rxt():e===!1&&(ov=!1),ov===!1?!1:ov.list},epsilon:function(e){return BT.epsilon(e)},segments:function(e){var t=d0e(!0,BT,ov);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=d0e(!1,BT,ov);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:qT.union(e.combined,ov),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:qT.intersect(e.combined,ov),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:qT.difference(e.combined,ov),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:qT.differenceRev(e.combined,ov),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:qT.xor(e.combined,ov),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:zxt(e.segments,BT,ov),inverted:e.inverted}},polygonFromGeoJSON:function(e){return v0e.toPolygon(r0,e)},polygonToGeoJSON:function(e){return v0e.fromPolygon(r0,BT,e)},union:function(e,t){return OT(e,t,r0.selectUnion)},intersect:function(e,t){return OT(e,t,r0.selectIntersect)},difference:function(e,t){return OT(e,t,r0.selectDifference)},differenceRev:function(e,t){return OT(e,t,r0.selectDifferenceRev)},xor:function(e,t){return OT(e,t,r0.selectXor)}};function OT(e,t,r){var n=r0.segments(e),a=r0.segments(t),i=r0.combine(n,a),o=r(i);return r0.polygon(o)}typeof window=="object"&&(window.PolyBool=r0);p0e.exports=r0});var y0e=fe((X0r,m0e)=>{m0e.exports=function(t,r,n,a){var i=t[0],o=t[1],s=!1;n===void 0&&(n=0),a===void 0&&(a=r.length);for(var l=a-n,u=0,c=l-1;uo!=p>o&&i<(g-f)*(o-v)/(p-v)+f;x&&(s=!s)}return s}});var NT=fe((Z0r,x0e)=>{"use strict";var xN=FE().dot,T8=Wa().BADNUM,A8=x0e.exports={};A8.tester=function(t){var r=t.slice(),n=r[0][0],a=n,i=r[0][1],o=i,s;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),s=1;sa||y===T8||yo||x&&u(p))}function f(p,x){var _=p[0],y=p[1];if(_===T8||_a||y===T8||yo)return!1;var C=r.length,k=r[0][0],S=r[0][1],L=0,w,A,T,m,F;for(w=1;wMath.max(A,k)||y>Math.max(T,S)))if(ys||Math.abs(xN(f,u))>a)return!0;return!1};A8.filter=function(t,r){var n=[t[0]],a=0,i=0;function o(l){t.push(l);var u=n.length,c=a;n.splice(i+1);for(var f=c+1;f1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:n}}});var b0e=fe(($0r,_0e)=>{"use strict";_0e.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var G0e=fe((K0r,V0e)=>{"use strict";var w0e=g0e(),qxt=y0e(),GT=bi(),Bxt=ea().dashStyle,UT=ni(),Oxt=kl(),Nxt=Sd().makeEventData,XT=$p(),Uxt=XT.freeMode,Vxt=XT.rectMode,HT=XT.drawMode,TN=XT.openMode,AN=XT.selectMode,T0e=Lm(),A0e=kT(),C0e=l8(),L0e=pm().clearOutline,P0e=Em(),_N=P0e.handleEllipse,Gxt=P0e.readPaths,Hxt=a8().newShapes,jxt=WO(),Wxt=yN().activateLastSelection,S8=Xt(),Yxt=S8.sorterAsc,F0e=NT(),VT=jE(),sv=El().getFromId,Xxt=ST(),Zxt=RT().redrawReglTraces,E8=b0e(),t1=E8.MINSELECT,$xt=F0e.filter,MN=F0e.tester,SN=t8(),M0e=SN.p2r,Kxt=SN.axValue,Jxt=SN.getTransform;function EN(e){return e.subplot!==void 0}function Qxt(e,t,r,n,a){var i=!EN(n),o=Uxt(a),s=Vxt(a),l=TN(a),u=HT(a),c=AN(a),f=a==="drawline",v=a==="drawcircle",g=f||v,p=n.gd,x=p._fullLayout,_=c&&x.newselection.mode==="immediate"&&i,y=x._zoomlayer,C=n.element.getBoundingClientRect(),k=n.plotinfo,S=Jxt(k),L=t-C.left,w=r-C.top;x._calcInverseTransform(p);var A=S8.apply3DTransform(x._invTransform)(L,w);L=A[0],w=A[1];var T=x._invScaleX,m=x._invScaleY,F=L,E=w,I="M"+L+","+w,R=n.xaxes[0],B=n.yaxes[0],O=R._length,V=B._length,j=e.altKey&&!(HT(a)&&l),q,U,J,ee,ce,ye,xe;R0e(e,p,n),o&&(q=$xt([[L,w]],E8.BENDPX));var ue=y.selectAll("path.select-outline-"+k.id).data([1]),K=u?x.newshape:x.newselection;u&&(n.hasText=K.label.text||K.label.texttemplate);var _e=u&&!l?K.fillcolor:"rgba(0,0,0,0)",ne=K.line.color||(i?UT.contrast(p._fullLayout.plot_bgcolor):"#7f7f7f");ue.enter().append("path").attr("class","select-outline select-outline-"+k.id).style({opacity:u?K.opacity/2:1,"stroke-dasharray":Bxt(K.line.dash,K.line.width),"stroke-width":K.line.width+"px","shape-rendering":"crispEdges"}).call(UT.stroke,ne).call(UT.fill,_e).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",S).attr("d",I+"Z");var ae=y.append("path").attr("class","zoombox-corners").style({fill:UT.background,stroke:UT.defaultLine,"stroke-width":1}).attr("transform",S).attr("d","M0,0Z");if(u&&n.hasText){var pe=y.select(".label-temp");pe.empty()&&(pe=y.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var ie=x._uid+E8.SELECTID,le=[],me=k8(p,n.xaxes,n.yaxes,n.subplot);_&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(i){var De=R._id,Ge=B._id;O0e(p,De,Ge,me);for(var ht=(p.layout||{}).selections||[],it=[],Oe=!1,ze=0;ze=0){p._fullLayout._deactivateShape(p);return}if(!u){var ht=x.clickmode;VT.done(ie).then(function(){if(VT.clear(ie),De===2){for(ue.remove(),ce=0;ce-1&&D0e(Ge,p,n.xaxes,n.yaxes,n.subplot,n,ue),ht==="event"&&YT(p,void 0);Oxt.click(p,Ge,k.id)}).catch(S8.error)}},n.doneFn=function(){ae.remove(),VT.done(ie).then(function(){VT.clear(ie),!_&&ee&&n.selectionDefs&&(ee.subtract=j,n.selectionDefs.push(ee),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,J)),(_||u)&&jT(n,_),n.doneFnCompleted&&n.doneFnCompleted(le),c&&YT(p,xe)}).catch(S8.error)}}function D0e(e,t,r,n,a,i,o){var s=t._hoverdata,l=t._fullLayout,u=l.clickmode,c=u.indexOf("event")>-1,f=[],v,g,p,x,_,y,C,k,S,L;if(i2t(s)){R0e(e,t,i),v=k8(t,r,n,a);var w=a2t(s,v),A=w.pointNumbers.length>0;if(A?o2t(v,w):s2t(v)&&(C=E0e(w))){for(o&&o.remove(),L=0;L=0}function n2t(e){return e._fullLayout._activeSelectionIndex>=0}function jT(e,t){var r=e.dragmode,n=e.plotinfo,a=e.gd;r2t(a)&&a._fullLayout._deactivateShape(a),n2t(a)&&a._fullLayout._deactivateSelection(a);var i=a._fullLayout,o=i._zoomlayer,s=HT(r),l=AN(r);if(s||l){var u=o.selectAll(".select-outline-"+n.id);if(u&&a._fullLayout._outlining){var c;s&&(c=Hxt(u,e)),c&>.call("_guiRelayout",a,{shapes:c});var f;l&&!EN(e)&&(f=jxt(u,e)),f&&(a._fullLayout._noEmitSelectedAtStart=!0,GT.call("_guiRelayout",a,{selections:f}).then(function(){t&&Wxt(a)})),a._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function S0e(e){return e._id}function k8(e,t,r,n){if(!e.calcdata)return[];var a=[],i=t.map(S0e),o=r.map(S0e),s,l,u;for(u=0;u0,i=a?n[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(i)>-1:!1}function o2t(e,t){var r=[],n,a,i,o;for(o=0;o0&&r.push(n);if(r.length===1&&(i=r[0]===t.searchInfo,i&&(a=t.searchInfo.cd[0].trace,a.selectedpoints.length===t.pointNumbers.length))){for(o=0;o1||(t+=n.selectedpoints.length,t>1)))return!1;return t===1}function WT(e,t,r){var n,a;for(n=0;n-1&&t;if(!o&&t){var De=k0e(e,!0);if(De.length){var Ge=De[0].xref,ht=De[0].yref;if(Ge&&ht){var it=N0e(De),Oe=U0e([sv(e,Ge,"x"),sv(e,ht,"y")]);Oe(le,it)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:be&&YT(e,le),v._reselect=!1}if(!o&&v._deselect){var ze=v._deselect;s=ze.xref,l=ze.yref,c2t(s,l,c)||O0e(e,s,l,n),be&&(le.points.length?YT(e,le):LN(e)),v._deselect=!1}return{eventData:le,selectionTesters:r}}function u2t(e){var t=e.calcdata;if(t)for(var r=0;r{"use strict";H0e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]});var ZT=fe((Q0r,j0e)=>{"use strict";j0e.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e,"axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}});var Fm=fe((tvr,X0e)=>{"use strict";var W0e=PN(),Y0e=Ds(),C8=rc(),p2t=Mo().templatedArray,evr=ZT();X0e.exports=p2t("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:Y0e({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:W0e.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:W0e.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",C8.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",C8.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",C8.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",C8.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:Y0e({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var r1=fe((rvr,Z0e)=>{"use strict";Z0e.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var n1=fe((nvr,$0e)=>{"use strict";$0e.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var Ol=fe((ivr,ive)=>{"use strict";var K0e=pl().axisHoverFormat,{hovertemplateAttrs:g2t,texttemplateAttrs:m2t,templatefallbackAttrs:J0e}=Oo(),Q0e=_s(),y2t=Ds(),eve=Uc().dash,x2t=Uc().pattern,_2t=ea(),b2t=r1(),$T=ta().extendFlat,w2t=n1();function tve(e){return{valType:"any",dflt:0,editType:"calc"}}function rve(e){return{valType:"any",editType:"calc"}}function nve(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}ive.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:tve("x"),yperiod:tve("y"),xperiod0:rve("x0"),yperiod0:rve("y0"),xperiodalignment:nve("x"),yperiodalignment:nve("y"),xhoverformat:K0e("x"),yhoverformat:K0e("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:m2t(),texttemplatefallback:J0e({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:g2t({},{keys:b2t.eventDataKeys}),hovertemplatefallback:J0e(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:$T({},eve,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:w2t(!0),fillgradient:$T({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:x2t,marker:$T({symbol:{valType:"enumerated",values:_2t.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:$T({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:$T({},eve,{arrayOk:!0}),editType:"calc"},Q0e("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},Q0e("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:y2t({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var FN=fe((ovr,sve)=>{"use strict";var ave=Fm(),ove=Ol().line,T2t=Uc().dash,L8=ta().extendFlat,A2t=rl().overrideAll,M2t=Mo().templatedArray,avr=ZT();sve.exports=A2t(M2t("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:L8({},ave.xref,{}),yref:L8({},ave.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:ove.color,width:L8({},ove.width,{min:1,dflt:1}),dash:L8({},T2t,{dflt:"dot"})}}),"arraydraw","from-root")});var fve=fe((svr,cve)=>{"use strict";var lve=Xt(),P8=Yi(),S2t=Ah(),E2t=FN(),uve=Lm();cve.exports=function(t,r){S2t(t,r,{name:"selections",handleItemDefaults:k2t});for(var n=r.selections,a=0;a{"use strict";hve.exports=function(t,r,n){n("newselection.mode");var a=n("newselection.line.width");a&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}});var KT=fe((uvr,gve)=>{"use strict";var C2t=bi(),vve=Xt(),pve=El();gve.exports=function(t){return function(n,a){var i=n[t];if(Array.isArray(i))for(var o=C2t.subplotsRegistry.cartesian,s=o.idRegex,l=a._subplots,u=l.xaxis,c=l.yaxis,f=l.cartesian,v=a._has("cartesian"),g=0;g{"use strict";var mve=yN(),JT=G0e();yve.exports={moduleType:"component",name:"selections",layoutAttributes:FN(),supplyLayoutDefaults:fve(),supplyDrawNewSelectionDefaults:dve(),includeBasePlot:KT()("selections"),draw:mve.draw,drawOne:mve.drawOne,reselect:JT.reselect,prepSelect:JT.prepSelect,clearOutline:JT.clearOutline,clearSelectionsCache:JT.clearSelectionsCache,selectOnClick:JT.selectOnClick}});var NN=fe((fvr,qve)=>{"use strict";var BN=xi(),lv=Xt(),xve=lv.numberFormat,L2t=Uk(),F8=bi(),Eve=lv.strTranslate,P2t=as(),RN=ni(),Dm=ea(),F2t=kl(),_ve=Yi(),D2t=np(),R2t=ed(),kve=$p(),D8=kve.selectingOrDrawing,I2t=kve.freeMode,z2t=nc().FROM_TL,q2t=ST(),B2t=RT().redrawReglTraces,O2t=Hs(),IN=El().getFromId,N2t=Ac().prepSelect,U2t=Ac().clearOutline,V2t=Ac().selectOnClick,DN=cN(),ON=rc(),bve=ON.MINDRAG,kd=ON.MINZOOM,wve=!0;function G2t(e,t,r,n,a,i,o,s){var l=e._fullLayout._zoomlayer,u=o+s==="nsew",c=(o+s).length===1,f,v,g,p,x,_,y,C,k,S,L,w,A,T,m,F,E,I,R,B,O,V,j;r+=t.yaxis._shift;function q(){if(f=t.xaxis,v=t.yaxis,k=f._length,S=v._length,y=f._offset,C=v._offset,g={},g[f._id]=f,p={},p[v._id]=v,o&&s)for(var nt=t.overlays,We=0;We=0){mt._fullLayout._deactivateShape(mt);return}var bt=mt._fullLayout.clickmode;if(qN(mt),nt===2&&!c&&Ke(),u)bt.indexOf("select")>-1&&V2t(We,mt,x,_,t.id,ee),bt.indexOf("event")>-1&&F2t.click(mt,We,t.id);else if(nt===1&&c){var Yt=o?v:f,jt=o==="s"||s==="w"?0:1,mr=Yt._name+".range["+jt+"]",or=H2t(Yt,jt),fr="left",Ot="middle";if(Yt.fixedrange)return;o?(Ot=o==="n"?"top":"bottom",Yt.side==="right"&&(fr="right")):s==="e"&&(fr="right"),mt._context.showAxisRangeEntryBoxes&&BN.select(J).call(P2t.makeEditable,{gd:mt,immediate:!0,background:mt._fullLayout.paper_bgcolor,text:String(or),fill:Yt.tickfont?Yt.tickfont.color:"#444",horizontalAlign:fr,verticalAlign:Ot}).on("edit",function(cr){var Ct=Yt.d2r(cr);Ct!==void 0&&F8.call("_guiRelayout",mt,mr,Ct)})}}R2t.init(ee);var xe,ue,K,_e,ne,ae,pe,ie,le,me;function be(nt,We,mt){var bt=J.getBoundingClientRect();xe=We-bt.left,ue=mt-bt.top,e._fullLayout._calcInverseTransform(e);var Yt=lv.apply3DTransform(e._fullLayout._invTransform)(xe,ue);xe=Yt[0],ue=Yt[1],K={l:xe,r:xe,w:0,t:ue,b:ue,h:0},_e=e._hmpixcount?e._hmlumcount/e._hmpixcount:RN.luminosity(e._fullLayout.plot_bgcolor),ne="M0,0H"+k+"V"+S+"H0V0",ae=!1,pe="xy",me=!1,ie=Pve(l,_e,y,C,ne),le=Fve(l,y,C)}function De(nt,We){if(e._transitioningWithDuration)return!1;var mt=Math.max(0,Math.min(k,V*nt+xe)),bt=Math.max(0,Math.min(S,j*We+ue)),Yt=Math.abs(mt-xe),jt=Math.abs(bt-ue);K.l=Math.min(xe,mt),K.r=Math.max(xe,mt),K.t=Math.min(ue,bt),K.b=Math.max(ue,bt);function mr(){pe="",K.r=K.l,K.t=K.b,le.attr("d","M0,0Z")}if(L.isSubplotConstrained)Yt>kd||jt>kd?(pe="xy",Yt/k>jt/S?(jt=Yt*S/k,ue>bt?K.t=ue-jt:K.b=ue+jt):(Yt=jt*k/S,xe>mt?K.l=xe-Yt:K.r=xe+Yt),le.attr("d",R8(K))):mr();else if(w.isSubplotConstrained)if(Yt>kd||jt>kd){pe="xy";var or=Math.min(K.l/k,(S-K.b)/S),fr=Math.max(K.r/k,(S-K.t)/S);K.l=or*k,K.r=fr*k,K.b=(1-or)*S,K.t=(1-fr)*S,le.attr("d",R8(K))}else mr();else!T||jt0){var cr;if(w.isSubplotConstrained||!A&&T.length===1){for(cr=0;cr1&&(mr.maxallowed!==void 0&&F===(mr.range[0]1&&(or.maxallowed!==void 0&&E===(or.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function W2t(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function Pve(e,t,r,n,a){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",Eve(r,n)).attr("d",a+"Z")}function Fve(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:RN.background,stroke:RN.defaultLine,"stroke-width":1,opacity:0}).attr("transform",Eve(t,r)).attr("d","M0,0Z")}function Dve(e,t,r,n,a,i){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),Rve(e,t,a,i)}function Rve(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function qN(e){BN.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Ive(e){wve&&e.data&&e._context.showTips&&(lv.notifier(lv._(e,"Double-click to zoom back out"),"long",e),wve=!1)}function Y2t(e,t){return"M"+(e.l-.5)+","+(t-kd-.5)+"h-3v"+(2*kd+1)+"h3ZM"+(e.r+.5)+","+(t-kd-.5)+"h3v"+(2*kd+1)+"h-3Z"}function X2t(e,t){return"M"+(t-kd-.5)+","+(e.t-.5)+"v-3h"+(2*kd+1)+"v3ZM"+(t-kd-.5)+","+(e.b+.5)+"v3h"+(2*kd+1)+"v-3Z"}function R8(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,kd)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function Mve(e,t,r,n,a){for(var i=!1,o={},s={},l,u,c,f,v=(a||{}).xaHash,g=(a||{}).yaHash,p=0;p{"use strict";var Z2t=xi(),I8=kl(),$2t=ed(),K2t=np(),ap=NN().makeDragBox,jc=rc().DRAGGERSIZE;z8.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){Z2t.select(t).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var n=Object.keys(r._plots||{}).sort(function(i,o){if((r._plots[i].mainplot&&!0)===(r._plots[o].mainplot&&!0)){var s=i.split("y"),l=o.split("y");return s[0]===l[0]?Number(s[1]||1)-Number(l[1]||1):Number(s[0]||1)-Number(l[0]||1)}return r._plots[i].mainplot?1:-1});n.forEach(function(i){var o=r._plots[i],s=o.xaxis,l=o.yaxis;if(!o.mainplot){var u=ap(t,o,s._offset,l._offset,s._length,l._length,"ns","ew");u.onmousemove=function(v){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===i&&t._fullLayout._plots[i]&&I8.hover(t,v,i)},I8.hover(t,v,i),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=i},u.onmouseout=function(v){t._dragging||(t._fullLayout._hoversubplot=null,$2t.unhover(t,v))},t._context.showAxisDragHandles&&(ap(t,o,s._offset-jc,l._offset-jc,jc,jc,"n","w"),ap(t,o,s._offset+s._length,l._offset-jc,jc,jc,"n","e"),ap(t,o,s._offset-jc,l._offset+l._length,jc,jc,"s","w"),ap(t,o,s._offset+s._length,l._offset+l._length,jc,jc,"s","e"))}if(t._context.showAxisDragHandles){if(i===s._mainSubplot){var c=s._mainLinePosition;s.side==="top"&&(c-=jc),ap(t,o,s._offset+s._length*.1,c,s._length*.8,jc,"","ew"),ap(t,o,s._offset,c,s._length*.1,jc,"","w"),ap(t,o,s._offset+s._length*.9,c,s._length*.1,jc,"","e")}if(i===l._mainSubplot){var f=l._mainLinePosition;l.side!=="right"&&(f-=jc),ap(t,o,f,l._offset+l._length*.1,jc,l._length*.8,"ns",""),ap(t,o,f,l._offset+l._length*.9,jc,l._length*.1,"s",""),ap(t,o,f,l._offset,jc,l._length*.1,"n","")}}});var a=r._hoverlayer.node();a.onmousemove=function(i){i.target=t._fullLayout._lasthover,I8.hover(t,i,r._hoversubplot)},a.onclick=function(i){i.target=t._fullLayout._lasthover,I8.click(t,i)},a.onmousedown=function(i){t._fullLayout._lasthover.onmousedown(i)},z8.updateFx(t)}};z8.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";K2t(t._draggers,r)}});var Nve=fe((dvr,Ove)=>{"use strict";var Bve=bi();Ove.exports=function(t){for(var r=Bve.layoutArrayContainers,n=Bve.layoutArrayRegexes,a=t.split("[")[0],i,o,s=0;s{"use strict";var J2t=em(),VN=PE(),QT=W1(),Q2t=VE().sorterAsc,GN=bi();eA.containerArrayMatch=Nve();var e_t=eA.isAddVal=function(t){return t==="add"||J2t(t)},Uve=eA.isRemoveVal=function(t){return t===null||t==="remove"};eA.applyContainerArrayChanges=function(t,r,n,a,i){var o=r.astr,s=GN.getComponentMethod(o,"supplyLayoutDefaults"),l=GN.getComponentMethod(o,"draw"),u=GN.getComponentMethod(o,"drawOne"),c=a.replot||a.recalc||s===VN||l===VN,f=t.layout,v=t._fullLayout;if(n[""]){Object.keys(n).length>1&&QT.warn("Full array edits are incompatible with other edits",o);var g=n[""][""];if(Uve(g))r.set(null);else if(Array.isArray(g))r.set(g);else return QT.warn("Unrecognized full array edit value",o,g),!0;return c?!1:(s(f,v),l(t),!0)}var p=Object.keys(n).map(Number).sort(Q2t),x=r.get(),_=x||[],y=i(v,o).get(),C=[],k=-1,S=_.length,L,w,A,T,m,F,E,I;for(L=0;L_.length-(E?0:1)){QT.warn("index out of range",o,A);continue}if(F!==void 0)m.length>1&&QT.warn("Insertion & removal are incompatible with edits to the same index.",o,A),Uve(F)?C.push(A):E?(F==="add"&&(F={}),_.splice(A,0,F),y&&y.splice(A,0,{})):QT.warn("Unrecognized full object edit value",o,A,F),k===-1&&(k=A);else for(w=0;w=0;L--)_.splice(C[L],1),y&&y.splice(C[L],1);if(_.length?x||r.set(_):r.set(null),c)return!1;if(s(f,v),u!==VN){var R;if(k===-1)R=p;else{for(S=Math.max(_.length,S),R=[],L=0;L=k));L++)R.push(A);for(L=k;L{"use strict";var Wve=aa(),Yve=bi(),id=Xt(),tA=Hs(),Xve=El(),rA=Xve.cleanId,t_t=Xve.getFromTrace,HN=Yve.traceIs,r_t=["x","y","z"];uv.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&id.log("Clearing previous rejected promises from queue."),e._promises=[]};uv.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var n=(tA.subplotsRegistry.cartesian||{}).attrRegex,a=(tA.subplotsRegistry.polar||{}).attrRegex,i=(tA.subplotsRegistry.ternary||{}).attrRegex,o=(tA.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(e);for(t=0;t3?(_.x=1.02,_.xanchor="left"):_.x<-2&&(_.x=-.02,_.xanchor="right"),_.y>3?(_.y=1.02,_.yanchor="bottom"):_.y<-2&&(_.y=-.02,_.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),e.template&&e.template.layout&&uv.cleanLayout(e.template.layout),e};function c3(e,t,r=!1){var n=e[t],a=t.charAt(0);r&&Array.isArray(n)||n&&n!=="paper"&&(e[t]=rA(n,a,!0))}uv.cleanData=function(e){for(var t=0;t0)return e.slice(0,t)}uv.hasParent=function(e,t){for(var r=jve(t);r;){if(r in e)return!0;r=jve(r)}return!1};uv.clearAxisTypes=function(e,t,r){for(var n=0;n{let r=(...n)=>n.every(a=>id.isPlainObject(a))||n.every(a=>Array.isArray(a));if([e,t].every(n=>Array.isArray(n))){if(e.length!==t.length)return!1;for(let n=0;nid.isPlainObject(n))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){if(n.startsWith("_"))continue;let a=e[n],i=t[n];if(a!==i&&!(r(a,i)?jN(a,i):!1))return!1}return!0}return!1};uv.collectionsAreEqual=jN});var Z8=fe(So=>{"use strict";var N8=xi(),a_t=aa(),o_t=Qq(),vi=Xt(),Ws=vi.nestedProperty,XN=Rb(),Cd=Ise(),cv=bi(),Y8=qb(),wa=Hs(),ad=Yi(),s_t=gO(),l_t=pf(),WN=ea(),u_t=ni(),c_t=UN().initInteractions,f_t=Q0(),h_t=Ac().clearOutline,epe=im().dfltConfig,B8=Vve(),zu=Zve(),cs=RT(),Rm=rl(),d_t=rc().AX_NAME_PATTERN,YN=0,$ve=5;function v_t(e,t,r,n){var a;if(e=vi.getGraphDiv(e),XN.init(e),vi.isPlainObject(t)){var i=t;t=i.data,r=i.layout,n=i.config,a=i.frames}var o=XN.triggerHandler(e,"plotly_beforeplot",[t,r,n]);if(o===!1)return Promise.reject();!t&&!r&&!vi.isPlotDiv(e)&&vi.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function s(){if(a)return So.addFrames(e,a)}rpe(e,n),r||(r={}),N8.select(e).classed("js-plotly-plot",!0),WN.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(zu.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=zu.cleanLayout(r)),wa.supplyDefaults(e);var u=e._fullLayout,c=u._has("cartesian");u._replotting=!0,(l||u._shouldCreateBgLayer)&&(q_t(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),WN.initGradients(e),WN.initPatterns(e),l&&ad.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&wa.doCalcdata(e);for(var v=0;v=e.data.length||a<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(a,n+1)>-1||a>=0&&t.indexOf(-e.data.length+a)>-1||a<0&&t.indexOf(e.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function npe(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),V8(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&V8(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function x_t(e,t,r){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&c=0&&c0&&typeof T.parts[E]!="string";)E--;var I=T.parts[E],R=T.parts[E-1]+"."+I,B=T.parts.slice(0,E).join("."),O=Ws(e.layout,B).get(),V=Ws(n,B).get(),j=T.get();if(m!==void 0){y[A]=m,C[A]=I==="reverse"?m:ig(j);var q=Y8.getLayoutValObject(n,T.parts);if(q&&q.impliedEdits&&m!==null)for(var U in q.impliedEdits)k(vi.relativeAttr(A,U),q.impliedEdits[U]);if(["width","height"].indexOf(A)!==-1)if(m){k("autosize",null);var J=A==="height"?"width":"height";k(J,n[J])}else n[A]=e._initialAutoSize[A];else if(A==="autosize")k("width",m?null:n.width),k("height",m?null:n.height);else if(R.match(hpe))w(R),Ws(n,B+"._inputRange").set(null);else if(R.match(dpe)){w(R),Ws(n,B+"._inputRange").set(null);var ee=Ws(n,B).get();ee._inputDomain&&(ee._input.domain=ee._inputDomain.slice())}else R.match(T_t)&&Ws(n,B+"._inputDomain").set(null);if(I==="type"){L=O;var ce=V.type==="linear"&&m==="log",ye=V.type==="log"&&m==="linear";if(ce||ye){if(!L||!L.range)k(B+".autorange",!0);else if(V.autorange)ce&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var xe=L.range[0],ue=L.range[1];ce?(xe<=0&&ue<=0&&k(B+".autorange",!0),xe<=0?xe=ue/1e6:ue<=0&&(ue=xe/1e6),k(B+".range[0]",Math.log(xe)/Math.LN10),k(B+".range[1]",Math.log(ue)/Math.LN10)):(k(B+".range[0]",Math.pow(10,xe)),k(B+".range[1]",Math.pow(10,ue)))}Array.isArray(n._subplots.polar)&&n._subplots.polar.length&&n[T.parts[0]]&&T.parts[1]==="radialaxis"&&delete n[T.parts[0]]._subplot.viewInitial["radialaxis.range"],cv.getComponentMethod("annotations","convertCoords")(e,V,m,k),cv.getComponentMethod("images","convertCoords")(e,V,m,k)}else k(B+".autorange",!0),k(B+".range",null);Ws(n,B+"._inputRange").set(null)}else if(I.match(d_t)){var K=Ws(n,A).get(),_e=(m||{}).type;(!_e||_e==="-")&&(_e="linear"),cv.getComponentMethod("annotations","convertCoords")(e,K,_e,k),cv.getComponentMethod("images","convertCoords")(e,K,_e,k)}var ne=B8.containerArrayMatch(A);if(ne){c=ne.array,f=ne.index;var ae=ne.property,pe=q||{editType:"calc"};f!==""&&ae===""&&(B8.isAddVal(m)?C[A]=null:B8.isRemoveVal(m)?C[A]=(Ws(r,c).get()||[])[f]:vi.warn("unrecognized full object value",t)),Rm.update(_,pe),u[c]||(u[c]={});var ie=u[c][f];ie||(ie=u[c][f]={}),ie[ae]=m,delete t[A]}else I==="reverse"?(O.range?O.range.reverse():(k(B+".autorange",!0),O.range=[1,0]),V.autorange?_.calc=!0:_.plot=!0):(A==="dragmode"&&(m===!1&&j!==!1||m!==!1&&j===!1)||n._has("scatter-like")&&n._has("regl")&&A==="dragmode"&&(m==="lasso"||m==="select")&&!(j==="lasso"||j==="select")?_.plot=!0:q?Rm.update(_,q):_.calc=!0,T.set(m))}}for(c in u){var le=B8.applyContainerArrayChanges(e,i(r,c),u[c],_,i);le||(_.plot=!0)}for(var me in S){L=ad.getFromId(e,me);var be=L&&L._constraintGroup;if(be){_.calc=!0;for(var De in be)S[De]||(ad.getFromId(e,De)._constraintShrinkable=!0)}}(ppe(e)||t.height||t.width)&&(_.plot=!0);var Ge=n.shapes;for(f=0;f1;)if(n.pop(),r=Ws(t,n.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function S_t(e,t){for(var r=0;r[B,e._ev.listeners(B)]);i=So.newPlot(e,t,r,n).then(()=>{for(let[B,O]of R)O.forEach(V=>e.on(B,V));return So.react(e,t,r,n)})}else{e.data=t||[],zu.cleanData(e.data),e.layout=r||{},zu.cleanLayout(e.layout),k_t(e.data,e.layout,s,l),wa.supplyDefaults(e,{skipUpdateCalc:!0});var f=e._fullData,v=e._fullLayout,g=v.datarevision===void 0,p=v.transition,x=P_t(e,l,v,g,p),_=x.newDataRevision,y=L_t(e,s,f,g,p,_);if(ppe(e)&&(x.layoutReplot=!0),y.calc||x.calc){e.calcdata=void 0;for(var C=Object.getOwnPropertyNames(v),k=0;k(c||e.emit("plotly_react",{config:n,data:t,layout:r}),e))}function L_t(e,t,r,n,a,i){var o=t.length===r.length;if(!a&&!o)return{fullReplot:!0,calc:!0};var s=Rm.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var l,u;function c(g){var p=Y8.getTraceValObject(u,g);return!u._module.animatable&&p.anim&&(p.anim=!1),p}var f={getValObject:c,flags:s,immutable:n,transition:a,newDataRevision:i,gd:e},v={};for(l=0;l=a.length?a[0]:a[u]:a}function s(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function l(u,c){var f=0;return function(){if(u&&++f===c)return u()}}return new Promise(function(u,c){function f(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var I=n._frameQueue.pop();I.onInterrupt&&I.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function v(I){if(I.length!==0){for(var R=0;Rn._timeToNext&&p()};I()}var _=0;function y(I){return Array.isArray(a)?_>=a.length?I.transitionOpts=a[_]:I.transitionOpts=a[0]:I.transitionOpts=a,_++,I}var C,k,S=[],L=t==null,w=Array.isArray(t),A=!L&&!w&&vi.isPlainObject(t);if(A)S.push({type:"object",data:y(vi.extendFlat({},t))});else if(L||["string","number"].indexOf(typeof t)!==-1)for(C=0;C0&&FF)&&E.push(k);S=E}}S.length>0?v(S):(e.emit("plotly_animated"),u())})}function D_t(e,t,r){if(e=vi.getGraphDiv(e),t==null)return Promise.resolve();if(!vi.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,a,i,o,s=e._transitionData._frames,l=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var u=s.length+t.length*2,c=[],f={};for(n=t.length-1;n>=0;n--)if(vi.isPlainObject(t[n])){var v=t[n].name,g=(l[v]||f[v]||{}).name,p=t[n].name,x=l[g]||f[g];g&&p&&typeof p=="number"&&x&&YN<$ve&&(YN++,vi.warn('addFrames: overwriting frame "'+(l[g]||f[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),YN===$ve&&vi.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),f[v]={name:v},c.push({frame:wa.supplyFrameDefaults(t[n]),index:r&&r[n]!==void 0&&r[n]!==null?r[n]:u+n})}c.sort(function(A,T){return A.index>T.index?-1:A.index=0;n--){if(a=c[n].frame,typeof a.name=="number"&&vi.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;l[a.name="frame "+e._transitionData._counter++];);if(l[a.name]){for(i=0;i=0;r--)n=t[r],i.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:a[n]});var s=wa.modifyFrames,l=wa.modifyFrames,u=[e,o],c=[e,i];return Cd&&Cd.add(e,s,u,l,c),wa.modifyFrames(e,i)}function I_t(e){e=vi.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return wa.cleanPlot([],{},r,t),wa.purge(e),XN.purge(e),t._container&&t._container.remove(),delete e._context,e}function z_t(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!vi.equalDomRects(r,t._lastBBox)){var n=t._invTransform=vi.inverseTransformMatrix(vi.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),t._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),t._lastBBox=r}}function q_t(e){var t=N8.select(e),r=e._fullLayout;if(r._calcInverseTransform=z_t,r._calcInverseTransform(e),r._container=t.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var n={};N8.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),r._uid=vi.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(f_t.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var a=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=a.append("g").classed("imagelayer",!0),r._shapeLowerLayer=a.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var i=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=i.append("g").classed("imagelayer",!0),r._shapeUpperLayer=i.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}So.animate=F_t;So.addFrames=D_t;So.deleteFrames=R_t;So.addTraces=lpe;So.deleteTraces=upe;So.extendTraces=ope;So.moveTraces=ZN;So.prependTraces=spe;So.newPlot=y_t;So._doPlot=v_t;So.purge=I_t;So.react=C_t;So.redraw=m_t;So.relayout=nA;So.restyle=G8;So.setPlotConfig=p_t;So.update=j8;So._guiRelayout=$N(nA);So._guiRestyle=$N(G8);So._guiUpdate=$N(j8);So._storeDirectGUIEdit=w_t});var ag=fe(fv=>{"use strict";var B_t=bi();fv.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("map"))?500:0};fv.getRedrawFunc=function(e){return function(){B_t.getComponentMethod("colorbar","draw")(e)}};fv.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};fv.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var gpe=window.URL||window.webkitURL;fv.createObjectURL=function(e){return gpe.createObjectURL(e)};fv.revokeObjectURL=function(e){return gpe.revokeObjectURL(e)};fv.createBlob=function(e,t){if(t==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(t==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=O_t(window.atob(e));return new window.Blob([r],{type:"image/"+t})};fv.octetStream=function(e){document.location.href="data:application/octet-stream"+e};fv.getPlotTitle=function(e){var n,a,i,o;var t=e._fullLayout;if(t){var r=(n=t.title)==null?void 0:n.text;return r===((a=t._dfltTitle)==null?void 0:a.plot)?void 0:r}return(o=(i=e.layout)==null?void 0:i.title)==null?void 0:o.text};fv.getPlotSubtitle=function(e){var n,a,i,o,s,l;var t=e._fullLayout;if(t){var r=(a=(n=t.title)==null?void 0:n.subtitle)==null?void 0:a.text;return r===((i=t._dfltTitle)==null?void 0:i.subtitle)?void 0:r}return(l=(s=(o=e.layout)==null?void 0:o.title)==null?void 0:s.subtitle)==null?void 0:l.text};function O_t(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),a=0;a{"use strict";var JN=xi(),yvr=Xt(),N_t=ea(),U_t=ni(),xvr=Q0(),KN=/"/g,Qx="TOBESTRIPPED",V_t=new RegExp(`("${Qx})|(${Qx}")|("${Qx})|(${Qx}")`,"g"),G_t=["&","&","&",""",""",""","'","'","'"],H_t=["<","<","<"],j_t=[">",">",">"];function W_t(e){let t=JN.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,n=>{let a=n.toLowerCase();return G_t.includes(a)?n:H_t.includes(a)?"<":j_t.includes(a)?">":n.includes("<")||n.includes(">")?"":t.html(n).text()});return t.remove(),r}function Y_t(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}mpe.exports=function(t,r,n){var a=t._fullLayout,i=a._paper,o=a._toppaper,s=a.width,l=a.height,u;i.insert("rect",":first-child").call(N_t.setRect,0,0,s,l).call(U_t.fill,a.paper_bgcolor);var c=a._basePlotModules||[];for(u=0;u{"use strict";var X_t=Xt(),Z_t=Mx().EventEmitter,aA=ag();function $_t(e){var t=e.emitter||new Z_t,r=new Promise(function(n,a){var i=window.Image,o=e.svg,s=e.format||"png",l=e.canvas,u=e.scale||1,c=e.width||300,f=e.height||150,v=u*c,g=u*f,p=l.getContext("2d",{willReadFrequently:!0}),x=new i,_,y;s==="svg"||X_t.isSafari()?y=aA.encodeSVG(o):(_=aA.createBlob(o,"svg"),y=aA.createObjectURL(_)),l.width=v,l.height=g,x.onload=function(){var C;switch(_=null,aA.revokeObjectURL(y),s!=="svg"&&p.drawImage(x,0,0,v,g),s){case"jpeg":C=l.toDataURL("image/jpeg");break;case"png":C=l.toDataURL("image/png");break;case"webp":C=l.toDataURL("image/webp");break;case"svg":C=y;break;default:var k="Image format is not jpeg, png, svg or webp.";if(a(new Error(k)),!e.promise)return t.emit("error",k)}n(C),e.promise||t.emit("success",C)},x.onerror=function(C){if(_=null,aA.revokeObjectURL(y),a(C),!e.promise)return t.emit("error",C)},x.src=y});return e.promise?r:t}ype.exports=$_t});var eU=fe((wvr,bpe)=>{"use strict";var xpe=aa(),_pe=Z8(),K_t=Hs(),i1=Xt(),oA=ag(),J_t=$8(),Q_t=K8(),ebt=A4().version,QN={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function tbt(e,t){t=t||{};var r,n,a,i;i1.isPlainObject(e)?(r=e.data||[],n=e.layout||{},a=e.config||{},i={}):(e=i1.getGraphDiv(e),r=i1.extendDeep([],e.data),n=i1.extendDeep({},e.layout),a=e._context,i=e._fullLayout||{});function o(w){return!(w in t)||i1.validate(t[w],QN[w])}if(!o("width")&&t.width!==null||!o("height")&&t.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+i1.join2(QN.format.values,", "," or ")+".");var s={};function l(w,A){return i1.coerce(t,s,QN,w,A)}var u=l("format"),c=l("width"),f=l("height"),v=l("scale"),g=l("setBackground"),p=l("imageDataOnly"),x=document.createElement("div");x.style.position="absolute",x.style.left="-5000px",document.body.appendChild(x);var _=i1.extendFlat({},n);c?_.width=c:t.width===null&&xpe(i.width)&&(_.width=i.width),f?_.height=f:t.height===null&&xpe(i.height)&&(_.height=i.height);var y=i1.extendFlat({},a,{_exportedPlot:!0,staticPlot:!0,setBackground:g}),C=oA.getRedrawFunc(x);function k(){return new Promise(function(w){setTimeout(w,oA.getDelay(x._fullLayout))})}function S(){return new Promise(function(w,A){var T=J_t(x,u,v),m=x._fullLayout.width,F=x._fullLayout.height;function E(){_pe.purge(x),document.body.removeChild(x)}if(u==="full-json"){var I=K_t.graphJson(x,!1,"object",!0,!0);return I.version=ebt,I=JSON.stringify(I),E(),w(p?I:oA.encodeJSON(I))}if(E(),u==="svg")return w(p?T:oA.encodeSVG(T));var R=document.createElement("canvas");R.id=i1.randstr(),Q_t({format:u,width:m,height:F,scale:v,canvas:R,svg:T,promise:!0}).then(w).catch(A)})}function L(w){return p?w.replace(oA.IMAGE_URL_PREFIX,""):w}return new Promise(function(w,A){_pe.newPlot(x,r,_,y).then(C).then(k).then(S).then(function(T){w(L(T))}).catch(function(T){A(T)})})}bpe.exports=tbt});var Ape=fe((Tvr,Tpe)=>{"use strict";var hv=Xt(),rbt=Hs(),nbt=qb(),ibt=im().dfltConfig,op=hv.isPlainObject,t2=Array.isArray,tU=hv.isArrayOrTypedArray;Tpe.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=nbt.get(),a=[],i={_context:hv.extendFlat({},ibt)},o,s;t2(t)?(i.data=hv.extendDeep([],t),o=t):(i.data=[],o=[],a.push(Wc("array","data"))),op(r)?(i.layout=hv.extendDeep({},r),s=r):(i.layout={},s={},arguments.length>1&&a.push(Wc("object","layout"))),rbt.supplyDefaults(i);for(var l=i._fullData,u=o.length,c=0;cf.length&&n.push(Wc("unused",a,u.concat(f.length)));var y=f.length,C=Array.isArray(_);C&&(y=Math.min(y,_.length));var k,S,L,w,A;if(v.dimensions===2)for(S=0;Sf[S].length&&n.push(Wc("unused",a,u.concat(S,f[S].length)));var T=f[S].length;for(k=0;k<(C?Math.min(T,_[S].length):T);k++)L=C?_[S][k]:_,w=c[S][k],A=f[S][k],hv.validate(w,L)?A!==w&&A!==+w&&n.push(Wc("dynamic",a,u.concat(S,k),w,A)):n.push(Wc("value",a,u.concat(S,k),w))}else n.push(Wc("array",a,u.concat(S),c[S]));else for(S=0;S{"use strict";var fbt=Xt(),Q8=ag();function hbt(e,t,r){var n=document.createElement("a"),a="download"in n,i=new Promise(function(o,s){var l,u;if(a)return l=Q8.createBlob(e,r),u=Q8.createObjectURL(l),n.href=u,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),Q8.revokeObjectURL(u),l=null,o(t);if(fbt.isSafari()){var c=r==="svg"?",":";base64,";return Q8.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return i}Mpe.exports=hbt});var rU=fe((Mvr,Lpe)=>{"use strict";var eC=Xt(),Epe=as(),dbt=eU(),vbt=Spe(),kpe=ag(),Cpe=40;function pbt(e,t){var r;return eC.isPlainObject(e)||(r=eC.getGraphDiv(e)),t=t||{},t.format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(n,a){r&&r._snapshotInProgress&&a(new Error("Image capture already in progress.")),r&&(r._snapshotInProgress=!0);var i=dbt(e,t),o=t.filename||e.fn;if(!o){let l=kpe.getPlotTitle(e);if(l&&!Epe.matchTex(l))o=eC.slugify(l,Cpe);else{let u=kpe.getPlotSubtitle(e);u&&!Epe.matchTex(u)&&(o=eC.slugify(u,Cpe))}}var s=o||"plot-image";s+="."+t.format.replace("-","."),i.then(function(l){return r&&(r._snapshotInProgress=!1),vbt(l,s,t.format)}).then(function(l){n(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),a(l)})})}Lpe.exports=pbt});var Ipe=fe(nU=>{"use strict";var n0=Xt(),i0=n0.isPlainObject,Ppe=qb(),Fpe=Hs(),gbt=Ho(),Dpe=Mo(),Rpe=im().dfltConfig;nU.makeTemplate=function(e){e=n0.isPlainObject(e)?e:n0.getGraphDiv(e),e=n0.extendDeep({_context:Rpe},{data:e.data,layout:e.layout}),Fpe.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var n={data:{},layout:{}};t.forEach(function(g){var p={};sA(g,p,ybt.bind(null,g));var x=n0.coerce(g,{},gbt,"type"),_=n.data[x];_||(_=n.data[x]=[]),_.push(p)}),sA(r,n.layout,mbt.bind(null,r)),delete n.layout.template;var a=r.template;if(i0(a)){var i=a.layout,o,s,l,u,c,f;i0(i)&&tC(i,n.layout);var v=a.data;if(i0(v)){for(s in n.data)if(l=v[s],Array.isArray(l)){for(c=n.data[s],f=c.length,u=l.length,o=0;oy?o.push({code:"unused",traceType:g,templateCount:_,dataCount:y}):y>_&&o.push({code:"reused",traceType:g,templateCount:_,dataCount:y})}}function C(k,S){for(var L in k)if(L.charAt(0)!=="_"){var w=k[L],A=dv(k,L,S);i0(w)?(Array.isArray(k)&&w._template===!1&&w.templateitemname&&o.push({code:"missing",path:A,templateitemname:w.templateitemname}),C(w,A)):Array.isArray(w)&&xbt(w)&&C(w,A)}}if(C({data:l,layout:s},""),o.length)return o.map(_bt)};function xbt(e){for(var t=0;t{"use strict";var Mc=Z8();xl._doPlot=Mc._doPlot;xl.newPlot=Mc.newPlot;xl.restyle=Mc.restyle;xl.relayout=Mc.relayout;xl.redraw=Mc.redraw;xl.update=Mc.update;xl._guiRestyle=Mc._guiRestyle;xl._guiRelayout=Mc._guiRelayout;xl._guiUpdate=Mc._guiUpdate;xl._storeDirectGUIEdit=Mc._storeDirectGUIEdit;xl.react=Mc.react;xl.extendTraces=Mc.extendTraces;xl.prependTraces=Mc.prependTraces;xl.addTraces=Mc.addTraces;xl.deleteTraces=Mc.deleteTraces;xl.moveTraces=Mc.moveTraces;xl.purge=Mc.purge;xl.addFrames=Mc.addFrames;xl.deleteFrames=Mc.deleteFrames;xl.animate=Mc.animate;xl.setPlotConfig=Mc.setPlotConfig;var bbt=X4().getGraphDiv,wbt=d8().eraseActiveShape;xl.deleteActiveShape=function(e){return wbt(bbt(e))};xl.toImage=eU();xl.validate=Ape();xl.downloadImage=rU();var zpe=Ipe();xl.makeTemplate=zpe.makeTemplate;xl.validateTemplate=zpe.validateTemplate});var r2=fe((kvr,Bpe)=>{"use strict";var iU=Xt(),Tbt=bi();Bpe.exports=function(t,r,n,a){var i=a("x"),o=a("y"),s,l=Tbt.getComponentMethod("calendars","handleTraceDefaults");if(l(t,r,["x","y"],n),i){var u=iU.minRowLength(i);o?s=Math.min(u,iU.minRowLength(o)):(s=u,a("y0"),a("dy"))}else{if(!o)return 0;s=iU.minRowLength(o),a("x0"),a("dx")}return r._length=s,s}});var sp=fe((Cvr,Upe)=>{"use strict";var Ope=Xt().dateTick0,Abt=Wa(),Mbt=Abt.ONEWEEK;function Npe(e,t){return e%Mbt===0?Ope(t,1):Ope(t,0)}Upe.exports=function(t,r,n,a,i){if(i||(i={x:!0,y:!0}),i.x){var o=a("xperiod");o&&(a("xperiod0",Npe(o,r.xcalendar)),a("xperiodalignment"))}if(i.y){var s=a("yperiod");s&&(a("yperiod0",Npe(s,r.ycalendar)),a("yperiodalignment"))}}});var Hpe=fe((Lvr,Gpe)=>{"use strict";var Vpe=["orientation","groupnorm","stackgaps"];Gpe.exports=function(t,r,n,a){var i=n._scatterStackOpts,o=a("stackgroup");if(o){var s=r.xaxis+r.yaxis,l=i[s];l||(l=i[s]={});var u=l[o],c=!1;u?u.traces.push(r):(u=l[o]={traceIndices:[],traces:[r]},c=!0);for(var f={orientation:r.x&&!r.y?"h":"v"},v=0;v{"use strict";var jpe=ni(),Wpe=Wf().hasColorscale,Ype=Vc(),Sbt=Is();Xpe.exports=function(t,r,n,a,i,o={}){var s=Sbt.isBubble(t),l=(t.line||{}).color,u;if(l&&(n=l),i("marker.symbol"),i("marker.opacity",s?.7:1),i("marker.size"),o.noAngle||(i("marker.angle"),o.noAngleRef||i("marker.angleref"),o.noStandOff||i("marker.standoff")),i("marker.color",n),Wpe(t,"marker")&&Ype(t,r,a,i,{prefix:"marker.",cLetter:"c"}),o.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),o.noLine||(l&&!Array.isArray(l)&&r.marker.color!==l?u=l:s?u=jpe.background:u=jpe.defaultLine,i("marker.line.color",u),Wpe(t,"marker.line")&&Ype(t,r,a,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",s?1:0),o.noLineDash||i("marker.line.dash")),s&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),o.gradient){var c=i("marker.gradient.type");c!=="none"&&i("marker.gradient.color")}}});var lp=fe((Fvr,Zpe)=>{"use strict";var Ebt=Xt().isArrayOrTypedArray,kbt=Wf().hasColorscale,Cbt=Vc();Zpe.exports=function(t,r,n,a,i,o){o||(o={});var s=(t.marker||{}).color;if(s&&s._inputArray&&(s=s._inputArray),i("line.color",n),kbt(t,"line"))Cbt(t,r,a,i,{prefix:"line.",cLetter:"c"});else{var l=(Ebt(s)?!1:s)||n;i("line.color",l)}i("line.width"),o.noDash||i("line.dash"),o.backoff&&i("line.backoff")}});var f3=fe((Dvr,$pe)=>{"use strict";$pe.exports=function(t,r,n){var a=n("line.shape");a==="spline"&&n("line.smoothing")}});var up=fe((Rvr,Kpe)=>{"use strict";var Lbt=Xt();Kpe.exports=function(e,t,r,n,a){a=a||{},n("textposition"),Lbt.coerceFont(n,"textfont",a.font||r.font,a),a.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var a1=fe((Ivr,Qpe)=>{"use strict";var nC=ni(),Jpe=Xt().isArrayOrTypedArray;function Pbt(e){for(var t=nC.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var e1e=Xt(),Fbt=bi(),Dbt=Ol(),Rbt=r1(),h3=Is(),Ibt=r2(),zbt=sp(),qbt=Hpe(),Bbt=vv(),Obt=lp(),t1e=f3(),Nbt=up(),Ubt=a1(),Vbt=Xt().coercePattern;r1e.exports=function(t,r,n,a){function i(g,p){return e1e.coerce(t,r,Dbt,g,p)}var o=Ibt(t,r,a,i);if(o||(r.visible=!1),!!r.visible){zbt(t,r,a,i),i("xhoverformat"),i("yhoverformat"),i("zorder");var s=qbt(t,r,a,i);a.scattermode==="group"&&r.orientation===void 0&&i("orientation","v");var l=!s&&o{"use strict";var Gbt=Jx().getAxisGroup;i1e.exports=function(t,r,n,a,i){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],l=Gbt(n,s)+o,u=n._alignmentOpts||{},c=a("alignmentgroup"),f=u[l];f||(f=u[l]={});var v=f[c];v?v.traces.push(r):v=f[c]={traces:[r],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var g=a("offsetgroup")||"",p=v.offsetGroups,x=p[g];r._offsetIndex=0,(i!=="group"||g)&&(x||(x=p[g]={offsetIndex:Object.keys(p).length}),r._offsetIndex=x.offsetIndex)}});var aU=fe((Bvr,a1e)=>{"use strict";var Hbt=Xt(),jbt=n2(),Wbt=Ol();a1e.exports=function(t,r){var n,a,i,o=r.scattermode;function s(v){return Hbt.coerce(a._input,a,Wbt,v)}if(r.scattermode==="group")for(i=0;i=0;c--){var f=t[c];if(f.type==="scatter"&&f.xaxis===l.xaxis&&f.yaxis===l.yaxis){f.opacity=void 0;break}}}}}});var s1e=fe((Ovr,o1e)=>{"use strict";var Ybt=Xt(),Xbt=nk();o1e.exports=function(e,t){function r(a,i){return Ybt.coerce(e,t,Xbt,a,i)}var n=t.barmode==="group";t.scattermode==="group"&&r("scattergap",n?t.bargap:.2)}});var cp=fe((Nvr,u1e)=>{"use strict";var Zbt=aa(),l1e=Xt(),$bt=l1e.dateTime2ms,iC=l1e.incrementMonth,Kbt=Wa(),Jbt=Kbt.ONEAVGMONTH;u1e.exports=function(t,r,n,a){if(r.type!=="date")return{vals:a};var i=t[n+"periodalignment"];if(!i)return{vals:a};var o=t[n+"period"],s;if(Zbt(o)){if(o=+o,o<=0)return{vals:a}}else if(typeof o=="string"&&o.charAt(0)==="M"){var l=+o.substring(1);if(l>0&&Math.round(l)===l)s=l;else return{vals:a}}for(var u=r.calendar,c=i==="start",f=i==="end",v=t[n+"period0"],g=$bt(v,u)||0,p=[],x=[],_=[],y=a.length,C=0;Ck;)w=iC(w,-s,u);for(;w<=k;)w=iC(w,s,u);L=iC(w,-s,u)}else{for(S=Math.round((k-g)/o),w=g+S*o;w>k;)w-=o;for(;w<=k;)w+=o;L=w-o}p[C]=c?L:f?w:(L+w)/2,x[C]=L,_[C]=w}return{vals:p,starts:x,ends:_}}});var pv=fe((Uvr,f1e)=>{"use strict";var oU=Wf().hasColorscale,sU=Mh(),c1e=Is();f1e.exports=function(t,r){c1e.hasLines(r)&&oU(r,"line")&&sU(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),c1e.hasMarkers(r)&&(oU(r,"marker")&&sU(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),oU(r,"marker.line")&&sU(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var o1=fe((Vvr,h1e)=>{"use strict";var ru=Xt();h1e.exports=function(t,r){for(var n=0;n{"use strict";var d1e=Xt();v1e.exports=function(t,r){d1e.isArrayOrTypedArray(r.selectedpoints)&&d1e.tagSelected(t,r)}});var gv=fe((Hvr,b1e)=>{"use strict";var p1e=aa(),uU=Xt(),lA=Yi(),g1e=cp(),lU=Wa().BADNUM,cU=Is(),Qbt=pv(),e3t=o1(),t3t=P0();function r3t(e,t){var r=e._fullLayout,n=t._xA=lA.getFromId(e,t.xaxis||"x","x"),a=t._yA=lA.getFromId(e,t.yaxis||"y","y"),i=n.makeCalcdata(t,"x"),o=a.makeCalcdata(t,"y"),s=g1e(t,n,"x",i),l=g1e(t,a,"y",o),u=s.vals,c=l.vals,f=t._length,v=new Array(f),g=t.ids,p=fU(t,r,n,a),x=!1,_,y,C,k,S,L;x1e(r,t);var w="x",A="y",T;if(p)uU.pushUnique(p.traceIndices,t.index),_=p.orientation==="v",_?(A="s",T="x"):(w="s",T="y"),S=p.stackgaps==="interpolate";else{var m=y1e(t,f);m1e(e,t,n,a,u,c,m)}var F=!!t.xperiodalignment,E=!!t.yperiodalignment;for(y=0;yy&&v[k].gap;)k--;for(L=v[k].s,C=v.length-1;C>k;C--)v[C].s=L;for(;y{"use strict";w1e.exports=aC;var n3t=Xt().distinctVals;function aC(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,n=t.posAxis._id.charAt(0),a=[],i=0;i{"use strict";A1e.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var i2=fe((Yvr,k1e)=>{"use strict";var mv=aa(),{isArrayOrTypedArray:og}=Xt(),{BADNUM:d3}=Wa(),i3t=bi(),uA=Yi(),{getAxisGroup:a3t}=Jx(),oC=T1e(),{TEXTPAD:o3t}=Im(),{LINE_SPACING:s3t}=nc(),{BR_TAG_ALL:l3t}=as();function u3t(e,t){for(var r=t.xaxis,n=t.yaxis,a=e._fullLayout,i=e._fullData,o=e.calcdata,s=[],l=[],u=0;ul+o||!mv(s))}for(var c=0;cn(i))):n(e.text);let a=e.outsidetextfont.size*s3t*r+o3t;return{ppadplus:t.some(i=>i.s<0)?a:0,ppadminus:t.some(i=>i.s>=0)?a:0}}return{ppadplus:void 0,ppadminus:void 0}}function x3t(e,t,r,n){for(var a=v3(n),i=0;i{"use strict";var C1e=gv(),L1e=i2().setGroupPositions;function b3t(e,t){for(var r=t.xaxis,n=t.yaxis,a=e._fullLayout,i=e._fullData,o=e.calcdata,s=[],l=[],u=0;um[c]&&c{"use strict";var T3t=ea(),z1e=Wa(),cA=z1e.BADNUM,q1e=z1e.LOG_CLIP,D1e=q1e+.5,R1e=q1e-.5,sC=Xt(),A3t=sC.segmentsIntersect,I1e=sC.constrain,yU=r1();B1e.exports=function(t,r){var n=r.trace||{},a=r.xaxis,i=r.yaxis,o=a.type==="log",s=i.type==="log",l=a._length,u=i._length,c=r.backoff,f=n.marker,v=r.connectGaps,g=r.baseTolerance,p=r.shape,x=p==="linear",_=n.fill&&n.fill!=="none",y=[],C=yU.minTolerance,k=t.length,S=new Array(k),L=0,w,A,T,m,F,E,I,R,B,O,V,j,q,U,J,ee;function ce(Ot){var cr=t[Ot];if(!cr)return!1;var Ct=r.linearized?a.l2p(cr.x):a.c2p(cr.x),wt=r.linearized?i.l2p(cr.y):i.c2p(cr.y);if(Ct===cA){if(o&&(Ct=a.c2p(cr.x,!0)),Ct===cA)return!1;s&&wt===cA&&(Ct*=Math.abs(a._m*u*(a._m>0?D1e:R1e)/(i._m*l*(i._m>0?D1e:R1e)))),Ct*=1e3}if(wt===cA){if(s&&(wt=i.c2p(cr.y,!0)),wt===cA)return!1;wt*=1e3}return[Ct,wt]}function ye(Ot,cr,Ct,wt){var Tt=Ct-Ot,Mt=wt-cr,Lt=.5-Ot,ft=.5-cr,kt=Tt*Tt+Mt*Mt,rr=Tt*Lt+Mt*ft;if(rr>0&&rr1||Math.abs(Lt.y-Ct[0][1])>1)&&(Lt=[Lt.x,Lt.y],wt&&_e(Lt,Ot)<_e(Ct[0],Ot)?Ct.unshift(Lt):Ct.push(Lt),wt++)}return Ct}function ct(Ot){if(Ot[0]pe||Ot[1]le)return[I1e(Ot[0],ae,pe),I1e(Ot[1],ie,le)]}function et(Ot,cr){if(Ot[0]===cr[0]&&(Ot[0]===ae||Ot[0]===pe)||Ot[1]===cr[1]&&(Ot[1]===ie||Ot[1]===le))return!0}function qe(Ot,cr){var Ct=[],wt=ct(Ot),Tt=ct(cr);return wt&&Tt&&et(wt,Tt)||(wt&&Ct.push(wt),Tt&&Ct.push(Tt)),Ct}function we(Ot,cr,Ct){return function(wt,Tt){var Mt=ct(wt),Lt=ct(Tt),ft=[];if(Mt&&Lt&&et(Mt,Lt))return ft;Mt&&ft.push(Mt),Lt&&ft.push(Lt);var kt=2*sC.constrain((wt[Ot]+Tt[Ot])/2,cr,Ct)-((Mt||wt)[Ot]+(Lt||Tt)[Ot]);if(kt){var rr;Mt&&Lt?rr=kt>0==Mt[Ot]>Lt[Ot]?Mt:Lt:rr=Mt||Lt,rr[Ot]+=kt}return ft}}var Le;p==="linear"||p==="spline"?Le=ze:p==="hv"||p==="vh"?Le=qe:p==="hvh"?Le=we(0,ae,pe):p==="vhv"&&(Le=we(1,ie,le));function Ke(Ot,cr){var Ct=cr[0]-Ot[0],wt=(cr[1]-Ot[1])/Ct,Tt=(Ot[1]*cr[0]-cr[1]*Ot[0])/Ct;return Tt>0?[wt>0?ae:pe,le]:[wt>0?pe:ae,ie]}function Te(Ot){var cr=Ot[0],Ct=Ot[1],wt=cr===S[L-1][0],Tt=Ct===S[L-1][1];if(!(wt&&Tt))if(L>1){var Mt=cr===S[L-2][0],Lt=Ct===S[L-2][1];wt&&(cr===ae||cr===pe)&&Mt?Lt?L--:S[L-1]=Ot:Tt&&(Ct===ie||Ct===le)&&Lt?Mt?L--:S[L-1]=Ot:S[L++]=Ot}else S[L++]=Ot}function Ve(Ot){S[L-1][0]!==Ot[0]&&S[L-1][1]!==Ot[1]&&Te([Ge,ht]),Te(Ot),it=null,Ge=ht=0}var $e=sC.isArrayOrTypedArray(f);function ot(Ot){if(Ot&&c&&(Ot.i=w,Ot.d=t,Ot.trace=n,Ot.marker=$e?f[Ot.i]:f,Ot.backoff=c),xe=Ot[0]/l,ue=Ot[1]/u,be=Ot[0]pe?pe:0,De=Ot[1]le?le:0,be||De){if(!L)S[L++]=[be||Ot[0],De||Ot[1]];else if(it){var cr=Le(it,Ot);cr.length>1&&(Ve(cr[0]),S[L++]=cr[1])}else Oe=Le(S[L-1],Ot)[0],S[L++]=Oe;var Ct=S[L-1];be&&De&&(Ct[0]!==be||Ct[1]!==De)?(it&&(Ge!==be&&ht!==De?Te(Ge&&ht?Ke(it,Ot):[Ge||be,ht||De]):Ge&&ht&&Te([Ge,ht])),Te([be,De])):Ge-be&&ht-De&&Te([be||Ge,De||ht]),it=Ot,Ge=be,ht=De}else it&&Ve(Le(it,Ot)[0]),S[L++]=Ot}for(w=0;wK(E,tt))break;T=E,q=B[0]*R[0]+B[1]*R[1],q>V?(V=q,m=E,I=!1):q=t.length||!E)break;ot(E),A=E}}it&&Te([Ge||it[0],ht||it[1]]),y.push(S.slice(0,L))}var nt=p.slice(p.length-1);if(c&&nt!=="h"&&nt!=="v"){for(var We=!1,mt=-1,bt=[],Yt=0;Yt{"use strict";var O1e={tonextx:1,tonexty:1,tonext:1};N1e.exports=function(t,r,n){var a,i,o,s,l,u={},c=!1,f=-1,v=0,g=-1;for(i=0;i=0?l=g:(l=g=v,v++),l{"use strict";var fp=xi(),M3t=bi(),fA=Xt(),p3=fA.ensureSingle,V1e=fA.identity,pu=ea(),g3=Is(),S3t=xU(),E3t=_U(),lC=NT().tester;G1e.exports=function(t,r,n,a,i,o){var s,l,u=!i,c=!!i&&i.duration>0,f=E3t(t,r,n);if(s=a.selectAll("g.trace").data(f,function(g){return g[0].trace.uid}),s.enter().append("g").attr("class",function(g){return"trace scatter trace"+g[0].trace.uid}).style("stroke-miterlimit",2),s.order(),k3t(t,s,r),c){o&&(l=o());var v=fp.transition().duration(i.duration).ease(i.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});v.each(function(){a.selectAll("g.trace").each(function(g,p){U1e(t,p,r,g,f,this,i)})})}else s.each(function(g,p){U1e(t,p,r,g,f,this,i)});u&&s.exit().remove(),a.selectAll("path:not([d])").remove()};function k3t(e,t,r){t.each(function(n){var a=p3(fp.select(this),"g","fills");pu.setClipUrl(a,r.layerClipId,e);var i=n[0].trace;i._ownFill=null,i._nextFill=null;var o=[];i._ownfill&&o.push("_ownFill"),i._nexttrace&&o.push("_nextFill");var s=a.selectAll("g").data(o,V1e);s.enter().append("g"),s.exit().remove(),s.order().each(function(l){i[l]=p3(fp.select(this),"path","js-fill")})})}function U1e(e,t,r,n,a,i,o){var s=e._context.staticPlot,l;C3t(e,t,r,n,a);var u=!!o&&o.duration>0;function c(we){return u?we.transition():we}var f=r.xaxis,v=r.yaxis,g=n[0].trace,p=g.line,x=fp.select(i),_=p3(x,"g","errorbars"),y=p3(x,"g","lines"),C=p3(x,"g","points"),k=p3(x,"g","text");if(M3t.getComponentMethod("errorbars","plot")(e,_,r,o),g.visible!==!0)return;c(x).style("opacity",g.opacity);var S,L,w=g.fill.charAt(g.fill.length-1);w!=="x"&&w!=="y"&&(w="");var A,T;w==="y"?(A=1,T=v.c2p(0,!0)):w==="x"&&(A=0,T=f.c2p(0,!0)),n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=x;var m="",F=[],E=g._prevtrace,I=null,R=null;E&&(m=E._prevRevpath||"",L=E._nextFill,F=E._ownPolygons,I=E._fillsegments,R=E._fillElement);var B,O,V="",j="",q,U,J,ee,ce,ye,xe=[];g._polygons=[];var ue=[],K=[],_e=fA.noop;if(S=g._ownFill,g3.hasLines(g)||g.fill!=="none"){L&&L.datum(n),["hv","vh","hvh","vhv"].indexOf(p.shape)!==-1?(q=pu.steps(p.shape),U=pu.steps(p.shape.split("").reverse().join(""))):p.shape==="spline"?q=U=function(we){var Le=we[we.length-1];return we.length>1&&we[0][0]===Le[0]&&we[0][1]===Le[1]?pu.smoothclosed(we.slice(1),p.smoothing):pu.smoothopen(we,p.smoothing)}:q=U=function(we){return"M"+we.join("L")},J=function(we){return U(we.reverse())},K=S3t(n,{xaxis:f,yaxis:v,trace:g,connectGaps:g.connectgaps,baseTolerance:Math.max(p.width||1,3)/4,shape:p.shape,backoff:p.backoff,simplify:p.simplify,fill:g.fill}),ue=new Array(K.length);var ne=0;for(l=0;l=s[0]&&x.x<=s[1]&&x.y>=l[0]&&x.y<=l[1]}),v=Math.ceil(f.length/c),g=0;a.forEach(function(x,_){var y=x[0].trace;g3.hasMarkers(y)&&y.marker.maxdisplayed>0&&_{"use strict";H1e.exports={container:"marker",min:"cmin",max:"cmax"}});var cC=fe((Qvr,j1e)=>{"use strict";var uC=Yi();j1e.exports=function(t,r,n){var a={},i={_fullLayout:n},o=uC.getFromTrace(i,r,"x"),s=uC.getFromTrace(i,r,"y"),l=t.orig_x;l===void 0&&(l=t.x);var u=t.orig_y;return u===void 0&&(u=t.y),a.xLabel=uC.tickText(o,o.c2l(l),!0).text,a.yLabel=uC.tickText(s,s.c2l(u),!0).text,a}});var Ld=fe((epr,W1e)=>{"use strict";var bU=xi(),y3=ea(),L3t=bi();function P3t(e){var t=bU.select(e).selectAll("g.trace.scatter");t.style("opacity",function(r){return r[0].trace.opacity}),t.selectAll("g.points").each(function(r){var n=bU.select(this),a=r.trace||r[0].trace;wU(n,a,e)}),t.selectAll("g.text").each(function(r){var n=bU.select(this),a=r.trace||r[0].trace;TU(n,a,e)}),t.selectAll("g.trace path.js-line").call(y3.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(y3.fillGroupStyle,e,!1),L3t.getComponentMethod("errorbars","style")(t)}function wU(e,t,r){y3.pointStyle(e.selectAll("path.point"),t,r)}function TU(e,t,r){y3.textPointStyle(e.selectAll("text"),t,r)}function F3t(e,t,r){var n=t[0].trace;n.selectedpoints?(y3.selectedPointStyle(r.selectAll("path.point"),n),y3.selectedTextStyle(r.selectAll("text"),n)):(wU(r,n,e),TU(r,n,e))}W1e.exports={style:P3t,stylePoints:wU,styleText:TU,styleOnSelect:F3t}});var _3=fe((tpr,Y1e)=>{"use strict";var x3=ni(),D3t=Is();Y1e.exports=function(t,r){var n,a;if(t.mode==="lines")return n=t.line.color,n&&x3.opacity(n)?n:t.fillcolor;if(t.mode==="none")return t.fill?t.fillcolor:"";var i=r.mcc||(t.marker||{}).color,o=r.mlcc||((t.marker||{}).line||{}).color;return a=i&&x3.opacity(i)?i:o&&x3.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",a?x3.opacity(a)<.3?x3.addOpacity(a,.3):a:(n=(t.line||{}).color,n&&x3.opacity(n)&&D3t.hasLines(t)&&t.line.width?n:t.fillcolor)}});var b3=fe((rpr,Z1e)=>{"use strict";var fC=Xt(),X1e=kl(),R3t=bi(),I3t=_3(),AU=ni(),z3t=fC.fillText;Z1e.exports=function(t,r,n,a){var i=t.cd,o=i[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=[u,c],v=o.hoveron||"",g=o.mode.indexOf("markers")!==-1?3:.5,p=!!o.xperiodalignment,x=!!o.yperiodalignment;if(v.indexOf("points")!==-1){var _=function(j){if(p){var q=s.c2p(j.xStart),U=s.c2p(j.xEnd);return u>=Math.min(q,U)&&u<=Math.max(q,U)?0:1/0}var J=Math.max(3,j.mrc||0),ee=1-1/J,ce=Math.abs(s.c2p(j.x)-u);return ce=Math.min(q,U)&&c<=Math.max(q,U)?0:1/0}var J=Math.max(3,j.mrc||0),ee=1-1/J,ce=Math.abs(l.c2p(j.y)-c);return cexe!=le>=xe&&(ae=_e[K-1][0],pe=_e[K][0],le-ie&&(ne=ae+(pe-ae)*(xe-ie)/(le-ie),J=Math.min(J,ne),ee=Math.max(ee,ne)));return J=Math.max(J,0),ee=Math.min(ee,s._length),{x0:J,x1:ee,y0:xe,y1:xe}}if(v.indexOf("fills")!==-1&&o._fillElement){var B=I(o._fillElement)&&!I(o._fillExclusionElement);if(B){var O=R(o._polygons);O===null&&(O={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var V=AU.defaultLine;return AU.opacity(o.fillcolor)?V=o.fillcolor:AU.opacity((o.line||{}).color)&&(V=o.line.color),fC.extendFlat(t,{distance:t.maxHoverDistance,x0:O.x0,x1:O.x1,y0:O.y0,y1:O.y1,color:V,hovertemplate:!1}),delete t.index,o.text&&!fC.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var a2=fe((npr,K1e)=>{"use strict";var $1e=Is();K1e.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].trace,l,u,c,f,v=s.mode&&!$1e.hasMarkers(s)&&!$1e.hasText(s);if(v)return[];if(r===!1)for(l=0;l{"use strict";J1e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var SU=fe((apr,rge)=>{"use strict";var hC=bi().traceIs,MU=Yb();rge.exports=function(t,r,n,a){n("autotypenumbers",a.autotypenumbersDflt);var i=n("type",(a.splomStash||{}).type);i==="-"&&(q3t(r,a.data),r.type==="-"?r.type="linear":t.type=r.type)};function q3t(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),a;r.indexOf("scene")!==-1&&(r=n);var i=B3t(t,r,n);if(i){if(i.type==="histogram"&&n==={v:"y",h:"x"}[i.orientation||"v"]){e.type="linear";return}var o=n+"calendar",s=i[o],l={noMultiCategory:!hC(i,"cartesian")||hC(i,"noMultiCategory")};if(i.type==="box"&&i._hasPreCompStats&&n==={h:"x",v:"y"}[i.orientation||"v"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,tge(i,n)){var u=ege(i),c=[];for(a=0;a0&&(a["_"+r+"axes"]||{})[t])return a;if((a[r+"axis"]||r)===t){if(tge(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}function ege(e){return{v:"x",h:"y"}[e.orientation||"v"]}function tge(e,t){var r=ege(e),n=hC(e,"box-violin");return n&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var dC=fe((opr,nge)=>{"use strict";var O3t=Gf().isTypedArraySpec;function N3t(e,t){var r=t.dataAttr||e._id.charAt(0),n={},a,i,o;if(t.axData)a=t.axData;else for(a=[],i=0;i0||O3t(i),s;o&&(s="array");var l=n("categoryorder",s),u;l==="array"&&(u=n("categoryarray")),!o&&l==="array"&&(l=r.categoryorder="trace"),l==="trace"?r._initialCategories=[]:l==="array"?r._initialCategories=u.slice():(u=N3t(r,a).sort(),l==="category ascending"?r._initialCategories=u:l==="category descending"&&(r._initialCategories=u.reverse()))}}});var hA=fe((spr,age)=>{"use strict";var ige=ni(),U3t=tc(),V3t=Xt();age.exports=function(t,r,n,a){a=a||{};var i=a.dfltColor;function o(T,m){return V3t.coerce2(t,r,a.attributes,T,m)}var s=o("linecolor",i),l=o("linewidth"),u=n("showline",a.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=ige.mix(i,a.bgColor,a.blend||U3t.lightFraction),f=o("gridcolor",c),v=o("gridwidth"),g=o("griddash"),p=n("showgrid",a.showGrid||!!f||!!v||!!g);if(p||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),a.hasMinor){var x=ige.mix(r.gridcolor,a.bgColor,67),_=o("minor.gridcolor",x),y=o("minor.gridwidth",r.gridwidth||1),C=o("minor.griddash",r.griddash||"solid"),k=n("minor.showgrid",!!_||!!y||!!C);k||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!a.noZeroLine){var S=o("zerolinelayer"),L=o("zerolinecolor",i),w=o("zerolinewidth"),A=n("zeroline",a.showGrid||!!L||!!w);A||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}});var vA=fe((lpr,fge)=>{"use strict";var oge=aa(),G3t=bi(),dA=Xt(),H3t=Mo(),j3t=Ah(),EU=pf(),sge=Fx(),lge=Ub(),W3t=gm(),Y3t=mm(),X3t=dC(),Z3t=hA(),$3t=gO(),uge=Hp(),vC=rc().WEEKDAY_PATTERN,K3t=rc().HOUR_PATTERN;fge.exports=function(t,r,n,a,i){var o=a.letter,s=a.font||{},l=a.splomStash||{},u=n("visible",!a.visibleDflt),c=r._template||{},f=r.type||c.type||"-",v;if(f==="date"){var g=G3t.getComponentMethod("calendars","handleDefaults");g(t,r,"calendar",a.calendar),a.noTicklabelmode||(v=n("ticklabelmode"))}!a.noTicklabelindex&&(f==="date"||f==="linear")&&n("ticklabelindex");var p="";(!a.noTicklabelposition||f==="multicategory")&&(p=dA.coerce(t,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),a.noTicklabeloverflow||n("ticklabeloverflow",p.indexOf("inside")!==-1?"hide past domain":f==="category"||f==="multicategory"?"allow":"hide past div"),uge(r,i),$3t(t,r,n,a),X3t(t,r,n,a),a.noHover||(f!=="category"&&n("hoverformat"),a.noUnifiedhovertitle||n("unifiedhovertitle.text"));var x=n("color"),_=x!==EU.color.dflt?x:s.color,y=l.label||i._dfltTitle[o];if(Y3t(t,r,n,f,a),!u)return r;n("title.text",y),dA.coerceFont(n,"title.font",s,{overrideDflt:{size:dA.bigFont(s.size),color:_}}),sge(t,r,n,f);var C=a.hasMinor;if(C&&(H3t.newContainer(r,"minor"),sge(t,r,n,f,{isMinor:!0})),W3t(t,r,n,f,a),lge(t,r,n,a),C){var k=a.isMinor;a.isMinor=!0,lge(t,r,n,a),a.isMinor=k}Z3t(t,r,n,{dfltColor:x,bgColor:a.bgColor,showGrid:a.showGrid,hasMinor:C,attributes:EU}),C&&r.ticklabelindex==null&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&n("mirror");var S=f==="multicategory";if(!a.noTickson&&(f==="category"||S)&&(r.ticks||r.showgrid)&&(S?(n("tickson","boundaries"),delete r.ticklabelposition):n("tickson")),S){var L=n("showdividers");L&&(n("dividercolor"),n("dividerwidth"))}if(f==="date")if(j3t(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:J3t}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var w=0;w=2){var o="",s,l;if(i.length===2){for(s=0;s<2;s++)if(l=cge(i[s]),l){o=vC;break}}var u=n("pattern",o);if(u===vC)for(s=0;s<2;s++)l=cge(i[s]),l&&(t.bounds[s]=i[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=i[s],u){case vC:if(!oge(l)){t.enabled=!1;return}if(l=+l,l!==Math.floor(l)||l<0||l>=7){t.enabled=!1;return}t.bounds[s]=i[s]=l;break;case K3t:if(!oge(l)){t.enabled=!1;return}if(l=+l,l<0||l>24){t.enabled=!1;return}t.bounds[s]=i[s]=l;break}if(r.autorange===!1){var c=r.range;if(c[0]c[1]){t.enabled=!1;return}}else if(i[0]>c[0]&&i[1]{"use strict";var ewt=aa(),pC=Xt();hge.exports=function(t,r,n,a){var i=a.counterAxes||[],o=a.overlayableAxes||[],s=a.letter,l=a.grid,u=a.overlayingDomain,c,f,v,g,p,x;l&&(f=l._domains[s][l._axisMap[r._id]],c=l._anchors[r._id],f&&(v=l[s+"side"].split(" ")[0],g=l.domain[s][v==="right"||v==="top"?1:0])),f=f||[0,1],c=c||(ewt(t.position)?"free":i[0]||"free"),v=v||(s==="x"?"bottom":"left"),g=g||0,p=0,x=!1;var _=pC.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(i),dflt:c}},"anchor"),y=pC.coerce(t,r,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:v}},"side");if(_==="free"){if(s==="y"){var C=n("autoshift");C&&(g=y==="left"?u[0]:u[1],x=r.automargin?r.automargin:!0,p=y==="left"?-3:3),n("shift",p)}n("position",g)}n("automargin",x);var k=!1;if(o.length&&(k=pC.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!k){var S=n("domain",f);S[0]>S[1]-1/4096&&(r.domain=f),pC.noneOrAll(t.domain,r.domain,f),r.tickmode==="sync"&&(r.tickmode="auto")}return n("layer"),r}});var bge=fe((cpr,_ge)=>{"use strict";var o2=Xt(),dge=ni(),twt=Sd().isUnifiedHover,rwt=VO(),vge=Mo(),nwt=Sb(),pge=pf(),iwt=SU(),gge=vA(),awt=Jx(),mge=gC(),CU=El(),s1=CU.id2name,yge=CU.name2id,owt=rc().AX_ID_PATTERN,xge=bi(),mC=xge.traceIs,kU=xge.getComponentMethod;function yC(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}_ge.exports=function(t,r,n){var a=r.autotypenumbers,i={},o={},s={},l={},u={},c={},f={},v={},g={},p={},x,_;for(x=0;x{"use strict";var swt=xi(),wge=bi(),xC=Xt(),F0=ea(),_C=Yi();Tge.exports=function(t,r,n,a){var i=t._fullLayout;if(r.length===0){_C.redrawComponents(t);return}function o(_){var y=_.xaxis,C=_.yaxis;i._defs.select("#"+_.clipId+"> rect").call(F0.setTranslate,0,0).call(F0.setScale,1,1),_.plot.call(F0.setTranslate,y._offset,C._offset).call(F0.setScale,1,1);var k=_.plot.selectAll(".scatterlayer .trace");k.selectAll(".point").call(F0.setPointGroupScale,1,1),k.selectAll(".textpoint").call(F0.setTextPointsScale,1,1),k.call(F0.hideOutsideRangePoints,_)}function s(_,y){var C=_.plotinfo,k=C.xaxis,S=C.yaxis,L=k._length,w=S._length,A=!!_.xr1,T=!!_.yr1,m=[];if(A){var F=xC.simpleMap(_.xr0,k.r2l),E=xC.simpleMap(_.xr1,k.r2l),I=F[1]-F[0],R=E[1]-E[0];m[0]=(F[0]*(1-y)+y*E[0]-F[0])/(F[1]-F[0])*L,m[2]=L*(1-y+y*R/I),k.range[0]=k.l2r(F[0]*(1-y)+y*E[0]),k.range[1]=k.l2r(F[1]*(1-y)+y*E[1])}else m[0]=0,m[2]=L;if(T){var B=xC.simpleMap(_.yr0,S.r2l),O=xC.simpleMap(_.yr1,S.r2l),V=B[1]-B[0],j=O[1]-O[0];m[1]=(B[1]*(1-y)+y*O[1]-B[1])/(B[0]-B[1])*w,m[3]=w*(1-y+y*j/V),S.range[0]=k.l2r(B[0]*(1-y)+y*O[0]),S.range[1]=S.l2r(B[1]*(1-y)+y*O[1])}else m[1]=0,m[3]=w;_C.drawOne(t,k,{skipTitle:!0}),_C.drawOne(t,S,{skipTitle:!0}),_C.redrawComponents(t,[k._id,S._id]);var q=A?L/m[2]:1,U=T?w/m[3]:1,J=A?m[0]:0,ee=T?m[1]:0,ce=A?m[0]/m[2]*L:0,ye=T?m[1]/m[3]*w:0,xe=k._offset-ce,ue=S._offset-ye;C.clipRect.call(F0.setTranslate,J,ee).call(F0.setScale,1/q,1/U),C.plot.call(F0.setTranslate,xe,ue).call(F0.setScale,q,U),F0.setPointGroupScale(C.zoomScalePts,1/q,1/U),F0.setTextPointsScale(C.zoomScaleTxt,1/q,1/U)}var l;a&&(l=a());function u(){for(var _={},y=0;yn.duration?(u(),g=window.cancelAnimationFrame(x)):g=window.requestAnimationFrame(x)}return f=Date.now(),g=window.requestAnimationFrame(x),Promise.resolve()}});var gu=fe(Eh=>{"use strict";var wC=xi(),Mge=bi(),s2=Xt(),lwt=Hs(),uwt=ea(),Sge=jf().getModuleCalcData,zm=El(),hp=rc(),cwt=Q0(),jo=s2.ensureSingle;function bC(e,t,r){return s2.ensureSingle(e,t,r,function(n){n.datum(r)})}var l2=hp.zindexSeparator;Eh.name="cartesian";Eh.attr=["xaxis","yaxis"];Eh.idRoot=["x","y"];Eh.idRegex=hp.idRegex;Eh.attrRegex=hp.attrRegex;Eh.attributes=Q1e();Eh.layoutAttributes=pf();Eh.supplyLayoutDefaults=bge();Eh.transitionAxes=Age();Eh.finalizeSubplots=function(e,t){var r=t._subplots,n=r.xaxis,a=r.yaxis,i=r.cartesian,o=i,s={},l={},u,c,f;for(u=0;u0){var g=v.id;if(g.indexOf(l2)!==-1)continue;g+=l2+(u+1),v=s2.extendFlat({},v,{id:g,plot:a._cartesianlayer.selectAll(".subplot").select("."+g)})}for(var p=[],x,_=0;_1&&(L+=l2+S),k.push(s+L),o=0;o1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=jo(n,"path","xlines-above"),t.ylines=jo(n,"path","ylines-above"),t.xaxislayer=jo(n,"g","xaxislayer-above"),t.yaxislayer=jo(n,"g","yaxislayer-above");else{if(!o){var v=jo(n,"g","layer-subplot");t.shapelayer=jo(v,"g","shapelayer"),t.imagelayer=jo(v,"g","imagelayer"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=jo(n,"g","minor-gridlayer"),t.gridlayer=jo(n,"g","gridlayer"),t.zerolinelayer=jo(n,"g","zerolinelayer"));var g=jo(n,"g","layer-between");t.shapelayerBetween=jo(g,"g","shapelayer"),t.imagelayerBetween=jo(g,"g","imagelayer"),jo(n,"path","xlines-below"),jo(n,"path","ylines-below"),t.overlinesBelow=jo(n,"g","overlines-below"),jo(n,"g","xaxislayer-below"),jo(n,"g","yaxislayer-below"),t.overaxesBelow=jo(n,"g","overaxes-below")}t.overplot=jo(n,"g","overplot"),t.plot=jo(t.overplot,"g",a),f&&c?t.zerolinelayerAbove=f.zerolinelayerAbove:t.zerolinelayerAbove=jo(n,"g","zerolinelayer-above"),o||(t.xlines=jo(n,"path","xlines-above"),t.ylines=jo(n,"path","ylines-above"),t.overlinesAbove=jo(n,"g","overlines-above"),jo(n,"g","xaxislayer-above"),jo(n,"g","yaxislayer-above"),t.overaxesAbove=jo(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+s),t.ylines=n.select(".ylines-"+l),t.xaxislayer=n.select(".xaxislayer-"+s),t.yaxislayer=n.select(".yaxislayer-"+l))}else{var p=f.plotgroup,x=a+"-x",_=a+"-y";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,t.zerolinelayerAbove=f.zerolinelayerAbove,jo(f.overlinesBelow,"path",x),jo(f.overlinesBelow,"path",_),jo(f.overaxesBelow,"g",x),jo(f.overaxesBelow,"g",_),t.plot=jo(f.overplot,"g",a),jo(f.overlinesAbove,"path",x),jo(f.overlinesAbove,"path",_),jo(f.overaxesAbove,"g",x),jo(f.overaxesAbove,"g",_),t.xlines=p.select(".overlines-"+s).select("."+x),t.ylines=p.select(".overlines-"+l).select("."+_),t.xaxislayer=p.select(".overaxes-"+s).select("."+x),t.yaxislayer=p.select(".overaxes-"+l).select("."+_)}o||(u||(bC(t.minorGridlayer,"g",t.xaxis._id),bC(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(y){return y[0]}).sort(zm.idSort),bC(t.gridlayer,"g",t.xaxis._id),bC(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(y){return y[0]}).sort(zm.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function Cge(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=wC.select(this);c.remove(),Lge(u,t),r[u]=!0});for(var n in t._plots)for(var a=t._plots[n],i=a.overlays||[],o=0;o{"use strict";var TC=Is();Pge.exports={hasLines:TC.hasLines,hasMarkers:TC.hasMarkers,hasText:TC.hasText,isBubble:TC.isBubble,attributes:Ol(),layoutAttributes:nk(),supplyDefaults:n1e(),crossTraceDefaults:aU(),supplyLayoutDefaults:s1e(),calc:gv().calc,crossTraceCalc:F1e(),arraysToCalcdata:o1(),plot:m3(),colorbar:Zf(),formatLabels:cC(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:b3(),selectPoints:a2(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:gu(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var Ige=fe((vpr,Rge)=>{"use strict";var hwt=xi(),dwt=ni(),Dge=PN(),LU=Xt(),vwt=LU.strScale,pwt=LU.strRotate,gwt=LU.strTranslate;Rge.exports=function(t,r,n){var a=t.node(),i=Dge[n.arrowhead||0],o=Dge[n.startarrowhead||0],s=(n.arrowwidth||1)*(n.arrowsize||1),l=(n.arrowwidth||1)*(n.startarrowsize||1),u=r.indexOf("start")>=0,c=r.indexOf("end")>=0,f=i.backoff*s+n.standoff,v=o.backoff*l+n.startstandoff,g,p,x,_;if(a.nodeName==="line"){g={x:+t.attr("x1"),y:+t.attr("y1")},p={x:+t.attr("x2"),y:+t.attr("y2")};var y=g.x-p.x,C=g.y-p.y;if(x=Math.atan2(C,y),_=x+Math.PI,f&&v&&f+v>Math.sqrt(y*y+C*C)){B();return}if(f){if(f*f>y*y+C*C){B();return}var k=f*Math.cos(x),S=f*Math.sin(x);p.x+=k,p.y+=S,t.attr({x2:p.x,y2:p.y})}if(v){if(v*v>y*y+C*C){B();return}var L=v*Math.cos(x),w=v*Math.sin(x);g.x-=L,g.y-=w,t.attr({x1:g.x,y1:g.y})}}else if(a.nodeName==="path"){var A=a.getTotalLength(),T="";if(A{"use strict";var zge=xi(),PU=bi(),mwt=Hs(),Bm=Xt(),FU=Bm.strTranslate,gA=Yi(),u2=ni(),sg=ea(),qge=kl(),DU=as(),RU=np(),pA=ed(),ywt=Mo().arrayEditor,xwt=Ige();Nge.exports={draw:_wt,drawOne:Bge,drawRaw:Oge};function _wt(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?Tt="right":Tt="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Tt]}for(var ie=!1,le=["x","y"],me=0;me1)&&(Ge===De?(tt=ht.r2fraction(t["a"+be]),(tt<0||tt>1)&&(ie=!0)):ie=!0),Le=ht._offset+ht.r2p(t[be]),Ve=.5}else{var nt=ot==="domain";be==="x"?(Te=t[be],Le=nt?ht._offset+ht._length*Te:Le=s.l+s.w*Te):(Te=1-t[be],Le=nt?ht._offset+ht._length*Te:Le=s.t+s.h*Te),Ve=t.showarrow?.5:Te}if(t.showarrow){we.head=Le;var We=t["a"+be];if($e=Oe*pe(.5,t.xanchor)-ze*pe(.5,t.yanchor),Ge===De){var mt=gA.getRefType(Ge);mt==="domain"?(be==="y"&&(We=1-We),we.tail=ht._offset+ht._length*We):mt==="paper"?be==="y"?(We=1-We,we.tail=s.t+s.h*We):we.tail=s.l+s.w*We:we.tail=ht._offset+ht.r2p(We),Ke=$e}else we.tail=Le+We,Ke=$e+We;we.text=we.tail+$e;var bt=o[be==="x"?"width":"height"];if(De==="paper"&&(we.head=Bm.constrain(we.head,1,bt-1)),Ge==="pixel"){var Yt=-Math.max(we.tail-3,we.text),jt=Math.min(we.tail+3,we.text)-bt;Yt>0?(we.tail+=Yt,we.text+=Yt):jt>0&&(we.tail-=jt,we.text-=jt)}we.tail+=qe,we.head+=qe}else $e=ct*pe(Ve,et),Ke=$e,we.text=Le+$e;we.text+=qe,$e+=qe,Ke+=qe,t["_"+be+"padplus"]=ct/2+Ke,t["_"+be+"padminus"]=ct/2-Ke,t["_"+be+"size"]=ct,t["_"+be+"shift"]=$e}if(ie){A.remove();return}var mr=0,or=0;if(t.align!=="left"&&(mr=(K-xe)*(t.align==="center"?.5:1)),t.valign!=="top"&&(or=(_e-ue)*(t.valign==="middle"?.5:1)),ce)ee.select("svg").attr({x:F+mr-1,y:F+or}).call(sg.setClipUrl,I?x:null,e);else{var fr=F+or-ye.top,Ot=F+mr-ye.left;V.call(DU.positionText,Ot,fr).call(sg.setClipUrl,I?x:null,e)}R.select("rect").call(sg.setRect,F,F,K,_e),E.call(sg.setRect,T/2,T/2,ne-T,ae-T),A.call(sg.setTranslate,Math.round(_.x.text-ne/2),Math.round(_.y.text-ae/2)),k.attr({transform:"rotate("+y+","+_.x.text+","+_.y.text+")"});var cr=function(wt,Tt){C.selectAll(".annotation-arrow-g").remove();var Mt=_.x.head,Lt=_.y.head,ft=_.x.tail+wt,kt=_.y.tail+Tt,rr=_.x.text+wt,pr=_.y.text+Tt,Kr=Bm.rotationXYMatrix(y,rr,pr),Nr=Bm.apply2DTransform(Kr),dn=Bm.apply2DTransform2(Kr),xr=+E.attr("width"),Fr=+E.attr("height"),Zr=rr-.5*xr,Cn=Zr+xr,Dt=pr-.5*Fr,At=Dt+Fr,Vt=[[Zr,Dt,Zr,At],[Zr,At,Cn,At],[Cn,At,Cn,Dt],[Cn,Dt,Zr,Dt]].map(dn);if(!Vt.reduce(function(ha,va){return ha^!!Bm.segmentsIntersect(Mt,Lt,Mt+1e6,Lt+1e6,va[0],va[1],va[2],va[3])},!1)){Vt.forEach(function(ha){var va=Bm.segmentsIntersect(ft,kt,Mt,Lt,ha[0],ha[1],ha[2],ha[3]);va&&(ft=va.x,kt=va.y)});var Qt=t.arrowwidth,Ut=t.arrowcolor,_r=t.arrowside,rn=C.append("g").style({opacity:u2.opacity(Ut)}).classed("annotation-arrow-g",!0),Jr=rn.append("path").attr("d","M"+ft+","+kt+"L"+Mt+","+Lt).style("stroke-width",Qt+"px").call(u2.stroke,u2.rgb(Ut));if(xwt(Jr,_r,t),l.annotationPosition&&Jr.node().parentNode&&!n){var qn=Mt,ri=Lt;if(t.standoff){var Jn=Math.sqrt(Math.pow(Mt-ft,2)+Math.pow(Lt-kt,2));qn+=t.standoff*(ft-Mt)/Jn,ri+=t.standoff*(kt-Lt)/Jn}var Ii=rn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(ft-qn)+","+(kt-ri),transform:FU(qn,ri)}).style("stroke-width",Qt+6+"px").call(u2.stroke,"rgba(0,0,0,0)").call(u2.fill,"rgba(0,0,0,0)"),Vi,ra;pA.init({element:Ii.node(),gd:e,prepFn:function(){var ha=sg.getTranslate(A);Vi=ha.x,ra=ha.y,a&&a.autorange&&v(a._name+".autorange",!0),i&&i.autorange&&v(i._name+".autorange",!0)},moveFn:function(ha,va){var Xi=Nr(Vi,ra),oa=Xi[0]+ha,Ma=Xi[1]+va;A.call(sg.setTranslate,oa,Ma),g("x",qm(a,ha,"x",s,t)),g("y",qm(i,va,"y",s,t)),t.axref===t.xref&&g("ax",qm(a,ha,"ax",s,t)),t.ayref===t.yref&&g("ay",qm(i,va,"ay",s,t)),rn.attr("transform",FU(ha,va)),k.attr({transform:"rotate("+y+","+oa+","+Ma+")"})},doneFn:function(){PU.call("_guiRelayout",e,p());var ha=document.querySelector(".js-notes-box-panel");ha&&ha.redraw(ha.selectedObj)}})}}};if(t.showarrow&&cr(0,0),S){var Ct;pA.init({element:A.node(),gd:e,prepFn:function(){Ct=k.attr("transform")},moveFn:function(wt,Tt){var Mt="pointer";if(t.showarrow)t.axref===t.xref?g("ax",qm(a,wt,"ax",s,t)):g("ax",t.ax+wt),t.ayref===t.yref?g("ay",qm(i,Tt,"ay",s.w,t)):g("ay",t.ay+Tt),cr(wt,Tt);else{if(n)return;var Lt,ft;if(a)Lt=qm(a,wt,"x",s,t);else{var kt=t._xsize/s.w,rr=t.x+(t._xshift-t.xshift)/s.w-kt/2;Lt=pA.align(rr+wt/s.w,kt,0,1,t.xanchor)}if(i)ft=qm(i,Tt,"y",s,t);else{var pr=t._ysize/s.h,Kr=t.y-(t._yshift+t.yshift)/s.h-pr/2;ft=pA.align(Kr-Tt/s.h,pr,0,1,t.yanchor)}g("x",Lt),g("y",ft),(!a||!i)&&(Mt=pA.getCursor(a?.5:Lt,i?.5:ft,t.xanchor,t.yanchor))}k.attr({transform:FU(wt,Tt)+Ct}),RU(A,Mt)},clickFn:function(wt,Tt){t.captureevents&&e.emit("plotly_clickannotation",w(Tt))},doneFn:function(){RU(A),PU.call("_guiRelayout",e,p());var wt=document.querySelector(".js-notes-box-panel");wt&&wt.redraw(wt.selectedObj)}})}}l.annotationText?V.call(DU.makeEditable,{delegate:A,gd:e}).call(j).on("edit",function(U){t.text=U,this.call(j),g("text",U),a&&a.autorange&&v(a._name+".autorange",!0),i&&i.autorange&&v(i._name+".autorange",!0),PU.call("_guiRelayout",e,p())}):V.call(j)}});var Wge=fe((gpr,jge)=>{"use strict";var Uge=Xt(),bwt=bi(),Vge=Mo().arrayEditor;jge.exports={hasClickToShow:wwt,onClick:Twt};function wwt(e,t){var r=Hge(e,t);return r.on.length>0||r.explicitOff.length>0}function Twt(e,t){var r=Hge(e,t),n=r.on,a=r.off.concat(r.explicitOff),i={},o=e._fullLayout.annotations,s,l;if(n.length||a.length){for(s=0;s{"use strict";var IU=Xt(),w3=ni();Yge.exports=function(t,r,n,a){a("opacity");var i=a("bgcolor"),o=a("bordercolor"),s=w3.opacity(o);a("borderpad");var l=a("borderwidth"),u=a("showarrow");a("text",u?" ":n._dfltTitle.annotation),a("textangle"),IU.coerceFont(a,"font",n.font),a("width"),a("align");var c=a("height");if(c&&a("valign"),u){var f=a("arrowside"),v,g;f.indexOf("end")!==-1&&(v=a("arrowhead"),g=a("arrowsize")),f.indexOf("start")!==-1&&(a("startarrowhead",v),a("startarrowsize",g)),a("arrowcolor",s?r.bordercolor:w3.defaultLine),a("arrowwidth",(s&&l||1)*2),a("standoff"),a("startstandoff")}var p=a("hovertext"),x=n.hoverlabel||{};if(p){var _=a("hoverlabel.bgcolor",x.bgcolor||(w3.opacity(i)?w3.rgb(i):w3.defaultLine)),y=a("hoverlabel.bordercolor",x.bordercolor||w3.contrast(_)),C=IU.extendFlat({},x.font);C.color||(C.color=y),IU.coerceFont(a,"hoverlabel.font",C)}a("captureevents",!!p)}});var Zge=fe((ypr,Xge)=>{"use strict";var qU=Xt(),c2=Yi(),Awt=Ah(),Mwt=zU(),Swt=Fm();Xge.exports=function(t,r){Awt(t,r,{name:"annotations",handleItemDefaults:Ewt})};function Ewt(e,t,r){function n(k,S){return qU.coerce(e,t,Swt,k,S)}var a=n("visible"),i=n("clicktoshow");if(a||i){Mwt(e,t,r,n);for(var o=t.showarrow,s=["x","y"],l=[-10,-30],u={_fullLayout:r},c=0;c<2;c++){var f=s[c],v=c2.coerceRef(e,t,u,f,"","paper");if(v!=="paper"){var g=c2.getFromId(u,v);g._annIndices.push(t._index)}if(c2.coercePosition(t,u,n,v,f,.5),o){var p="a"+f,x=c2.coerceRef(e,t,u,p,"pixel",["pixel","paper"]);x!=="pixel"&&x!==v&&(x=t[p]="pixel");var _=x==="pixel"?l[c]:.4;c2.coercePosition(t,u,n,x,p,_)}n(f+"anchor"),n(f+"shift")}if(qU.noneOrAll(e,t,["x","y"]),o&&qU.noneOrAll(e,t,["ax","ay"]),i){var y=n("xclick"),C=n("yclick");t._xclick=y===void 0?t.x:c2.cleanPosition(y,u,t.xref),t._yclick=C===void 0?t.y:c2.cleanPosition(C,u,t.yref)}}}});var Jge=fe((xpr,Kge)=>{"use strict";var BU=Xt(),f2=Yi(),kwt=AC().draw;Kge.exports=function(t){var r=t._fullLayout,n=BU.filterVisible(r.annotations);if(n.length&&t._fullData.length)return BU.syncOrAsync([kwt,Cwt],t)};function Cwt(e){var t=e._fullLayout;BU.filterVisible(t.annotations).forEach(function(r){var n=f2.getFromId(e,r.xref),a=f2.getFromId(e,r.yref),i=f2.getRefType(r.xref),o=f2.getRefType(r.yref);r._extremes={},i==="range"&&$ge(r,n),o==="range"&&$ge(r,a)})}function $ge(e,t){var r=t._id,n=r.charAt(0),a=e[n],i=e["a"+n],o=e[n+"ref"],s=e["a"+n+"ref"],l=e["_"+n+"padplus"],u=e["_"+n+"padminus"],c={x:1,y:-1}[n]*e[n+"shift"],f=3*e.arrowsize*e.arrowwidth||0,v=f+c,g=f-c,p=3*e.startarrowsize*e.arrowwidth||0,x=p+c,_=p-c,y;if(s===o){var C=f2.findExtremes(t,[t.r2c(a)],{ppadplus:v,ppadminus:g}),k=f2.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(l,x),ppadminus:Math.max(u,_)});y={min:[C.min[0],k.min[0]],max:[C.max[0],k.max[0]]}}else x=i?x+i:x,_=i?_-i:_,y=f2.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,v,x),ppadminus:Math.max(u,g,_)});e._extremes[r]=y}});var eme=fe((_pr,Qge)=>{"use strict";var Lwt=aa(),Pwt=rE();Qge.exports=function(t,r,n,a){r=r||{};var i=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(!(i||o))return;var s=t._fullLayout.annotations,l=r._id.charAt(0),u,c;function f(g){var p=u[g],x=null;i?x=Pwt(p,r.range):x=Math.pow(10,p),Lwt(x)||(x=null),a(c+g,x)}for(var v=0;v{"use strict";var OU=AC(),tme=Wge();rme.exports={moduleType:"component",name:"annotations",layoutAttributes:Fm(),supplyLayoutDefaults:Zge(),includeBasePlot:KT()("annotations"),calcAutorange:Jge(),draw:OU.draw,drawOne:OU.drawOne,drawRaw:OU.drawRaw,hasClickToShow:tme.hasClickToShow,onClick:tme.onClick,convertCoords:eme()}});var MC=fe((wpr,ime)=>{"use strict";var Ys=Fm(),Fwt=rl().overrideAll,Dwt=Mo().templatedArray;ime.exports=Fwt(Dwt("annotation",{visible:Ys.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:Ys.xanchor,xshift:Ys.xshift,yanchor:Ys.yanchor,yshift:Ys.yshift,text:Ys.text,textangle:Ys.textangle,font:Ys.font,width:Ys.width,height:Ys.height,opacity:Ys.opacity,align:Ys.align,valign:Ys.valign,bgcolor:Ys.bgcolor,bordercolor:Ys.bordercolor,borderpad:Ys.borderpad,borderwidth:Ys.borderwidth,showarrow:Ys.showarrow,arrowcolor:Ys.arrowcolor,arrowhead:Ys.arrowhead,startarrowhead:Ys.startarrowhead,arrowside:Ys.arrowside,arrowsize:Ys.arrowsize,startarrowsize:Ys.startarrowsize,arrowwidth:Ys.arrowwidth,standoff:Ys.standoff,startstandoff:Ys.startstandoff,hovertext:Ys.hovertext,hoverlabel:Ys.hoverlabel,captureevents:Ys.captureevents}),"calc","from-root")});var ome=fe((Tpr,ame)=>{"use strict";var NU=Xt(),Rwt=Yi(),Iwt=Ah(),zwt=zU(),qwt=MC();ame.exports=function(t,r,n){Iwt(t,r,{name:"annotations",handleItemDefaults:Bwt,fullLayout:n.fullLayout})};function Bwt(e,t,r,n){function a(s,l){return NU.coerce(e,t,qwt,s,l)}function i(s){var l=s+"axis",u={_fullLayout:{}};return u._fullLayout[l]=r[l],Rwt.coercePosition(t,u,a,s,s,.5)}var o=a("visible");o&&(zwt(e,t,n.fullLayout,a),i("x"),i("y"),i("z"),NU.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",a("xanchor"),a("yanchor"),a("xshift"),a("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",a("ax",-10),a("ay",-30),NU.noneOrAll(e,t,["ax","ay"])))}});var cme=fe((Apr,ume)=>{"use strict";var sme=Xt(),lme=Yi();ume.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,a=0;a{"use strict";function UU(e,t){var r=[0,0,0,0],n,a;for(n=0;n<4;++n)for(a=0;a<4;++a)r[a]+=e[4*n+a]*t[n];return r}function Nwt(e,t){var r=UU(e.projection,UU(e.view,UU(e.model,[t[0],t[1],t[2],1])));return r}fme.exports=Nwt});var dme=fe((Spr,hme)=>{"use strict";var Uwt=AC().drawRaw,Vwt=VU(),Gwt=["x","y","z"];hme.exports=function(t){for(var r=t.fullSceneLayout,n=t.dataScale,a=r.annotations,i=0;i1){s=!0;break}}s?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+i+'"]').remove():(o._pdata=Vwt(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),Uwt(t.graphDiv,o,i,t.id,o._xa,o._ya))}}});var gme=fe((Epr,pme)=>{"use strict";var Hwt=bi(),vme=Xt();pme.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:MC()}}},layoutAttributes:MC(),handleDefaults:ome(),includeBasePlot:jwt,convert:cme(),draw:dme()};function jwt(e,t){var r=Hwt.subplotsRegistry.gl3d;if(r)for(var n=r.attrRegex,a=Object.keys(e),i=0;i{"use strict";var kpr=rc(),mme=Ds(),yme=Ol().line,Wwt=Uc().dash,dp=ta().extendFlat,Ywt=Mo().templatedArray,Cpr=ZT(),T3=Ho(),xme=Fm(),{shapeTexttemplateAttrs:Xwt,templatefallbackAttrs:Zwt}=Oo(),$wt=IE();_me.exports=Ywt("shape",{visible:dp({},T3.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:dp({},T3.legend,{editType:"calc+arraydraw"}),legendgroup:dp({},T3.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:dp({},T3.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:mme({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:dp({},T3.legendrank,{editType:"calc+arraydraw"}),legendwidth:dp({},T3.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:dp({},xme.xref,{arrayOk:!0}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:dp({},xme.yref,{arrayOk:!0}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:dp({},yme.color,{editType:"arraydraw"}),width:dp({},yme.width,{editType:"calc+arraydraw"}),dash:dp({},Wwt,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:Xwt({},{keys:Object.keys($wt)}),texttemplatefallback:Zwt({editType:"arraydraw"}),font:mme({editType:"calc+arraydraw",colorEditType:"arraydraw"}),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"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})});var wme=fe((Ppr,bme)=>{"use strict";var A3=Xt(),D0=Yi(),Kwt=Ah(),Jwt=GU(),mA=Lm();bme.exports=function(t,r){Kwt(t,r,{name:"shapes",handleItemDefaults:e5t})};function Qwt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function e5t(e,t,r){function n(k,S){return A3.coerce(e,t,Jwt,k,S)}t._isShape=!0;var a=n("visible");if(!a)return;var i=n("showlegend");n("legend"),n("legendgroup"),i&&(n("legendwidth"),n("legendgrouptitle.text"),A3.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var o=n("path"),s=o?"path":"rect",l=n("type",s),u=l!=="path";u&&delete t.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var c=n("line.width");c&&(n("line.color"),n("line.dash"));var f=n("xsizemode"),v=n("ysizemode");let g=[.25,.75],p=[0,10];["x","y"].forEach(k=>{var S=k+"anchor",L=k==="x"?f:v,w={_fullLayout:r},A,T,m,F;let E=k+"ref",I=e[E];if(Array.isArray(I)&&I.length>0){let R=mA.countDefiningCoords(l,o,k);F=D0.coerceRefArray(e,t,w,k,void 0,"paper",R),t["_"+k+"refArray"]=!0}else F=D0.coerceRef(e,t,w,k,void 0,"paper");if(Array.isArray(F))F.forEach(function(R){D0.getRefType(R)==="range"&&(A=D0.getFromId(w,R),A&&A._shapeIndices.indexOf(t._index)===-1&&A._shapeIndices.push(t._index))}),u&&[0,1].forEach(function(R){let B=F[R];D0.getRefType(B)==="range"?(A=D0.getFromId(w,B),T=mA.shapePositionToRange(A),m=mA.rangeToShapePosition(A),(A.type==="category"||A.type==="multicategory")&&n(k+R+"shift")):T=m=A3.identity;let V=k+R,j=e[V];if(e[V]=T(e[V],!0),L==="pixel"?n(V,p[R]):D0.coercePosition(t,w,n,B,V,g[R]),t[V]=m(t[V]),e[V]=j,R===0&&L==="pixel"){let q=e[S];e[S]=T(e[S],!0),D0.coercePosition(t,w,n,B,S,.25),t[S]=m(t[S]),e[S]=q}});else{if(D0.getRefType(F)==="range"?(A=D0.getFromId(w,F),A._shapeIndices.push(t._index),m=mA.rangeToShapePosition(A),T=mA.shapePositionToRange(A),u&&(A.type==="category"||A.type==="multicategory")&&(n(k+"0shift"),n(k+"1shift"))):T=m=A3.identity,u){let B=k+"0",O=k+"1",V=e[B],j=e[O];e[B]=T(e[B],!0),e[O]=T(e[O],!0),L==="pixel"?(n(B,p[0]),n(O,p[1])):(D0.coercePosition(t,w,n,F,B,g[0]),D0.coercePosition(t,w,n,F,O,g[1])),t[B]=m(t[B]),t[O]=m(t[O]),e[B]=V,e[O]=j}if(L==="pixel"){let B=e[S];e[S]=T(e[S],!0),D0.coercePosition(t,w,n,F,S,.25),t[S]=m(t[S]),e[S]=B}}}),u&&A3.noneOrAll(e,t,["x0","x1","y0","y1"]);var x=l==="line",_,y;if(u&&(_=n("label.texttemplate"),n("label.texttemplatefallback")),_||(y=n("label.text")),y||_){n("label.textangle");var C=n("label.textposition",x?"middle":"middle center");n("label.xanchor"),n("label.yanchor",Qwt(x,C)),n("label.padding"),A3.coerceFont(n,"label.font",r.font)}}});var Mme=fe((Fpr,Ame)=>{"use strict";var t5t=ni(),Tme=Xt();function r5t(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}Ame.exports=function(t,r,n){n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),Tme.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity");var a=n("newshape.line.width");if(a){var i=(t||{}).plot_bgcolor||"#FFF";n("newshape.line.color",t5t.contrast(i)),n("newshape.line.dash")}var o=t.dragmode==="drawline",s=n("newshape.label.text"),l=n("newshape.label.texttemplate");if(n("newshape.label.texttemplatefallback"),s||l){n("newshape.label.textangle");var u=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",r5t(o,u)),n("newshape.label.padding"),Tme.coerceFont(n,"newshape.label.font",r.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var Fme=fe((Dpr,Pme)=>{"use strict";var HU=Xt(),yv=Yi(),l1=kT(),jU=Lm();Pme.exports=function(t){var r=t._fullLayout,n=HU.filterVisible(r.shapes);if(!(!n.length||!t._fullData.length))for(var a=0;a{o=yv.getFromId(t,f),i._extremes[o._id]=yv.findExtremes(o,v,Eme(i))})}else i.xref!=="paper"&&l!=="domain"&&(o=yv.getFromId(t,i.xref),s=Cme(o,i,l1.paramIsX),s&&(i._extremes[o._id]=yv.findExtremes(o,s,Eme(i))));if(u==="array"){let c=Sme(t,i,"y");Object.entries(c).forEach(([f,v])=>{o=yv.getFromId(t,f),i._extremes[o._id]=yv.findExtremes(o,v,kme(i))})}else i.yref!=="paper"&&u!=="domain"&&(o=yv.getFromId(t,i.yref),s=Cme(o,i,l1.paramIsY),s&&(i._extremes[o._id]=yv.findExtremes(o,s,kme(i))))}};function Sme(e,t,r){let n=t[r+"ref"],a=r==="x"?l1.paramIsX:l1.paramIsY;function i(f,v){f==="paper"||yv.getRefType(f)==="domain"||(o[f]||(o[f]=[]),o[f].push(v))}let o={};if(t.type==="path"&&t.path){let f=t.path.match(l1.segmentRE)||[];for(var s=0,l=0;lp&&(i(n[s],x[p]),s++)}}else i(n[0],t[r+"0"]),i(n[1],t[r+"1"]);let u={};for(let f in o){let v=yv.getFromId(e,f);if(v){var c=v.type==="category"||v.type==="multicategory"?v.r2c:v.d2c;v.type==="date"&&(c=jU.decodeDate(c)),u[v._id]=o[f].map(c)}}return u}function Eme(e){return Lme(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function kme(e){return Lme(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function Lme(e,t,r,n,a,i){var o=e/2,s=i;if(t==="pixel"){var l=a?jU.extractPathCoords(a,i?l1.paramIsY:l1.paramIsX):[r,n],u=HU.aggNums(Math.max,null,l),c=HU.aggNums(Math.min,null,l),f=c<0?Math.abs(c)+o:o,v=u>0?u+o:o;return{ppad:o,ppadplus:s?f:v,ppadminus:s?v:f}}else return{ppad:o}}function Cme(e,t,r){var n=e._id.charAt(0)==="x"?"x":"y",a=e.type==="category"||e.type==="multicategory",i,o,s=0,l=0,u=a?e.r2c:e.d2c,c=t[n+"sizemode"]==="scaled";if(c?(i=t[n+"0"],o=t[n+"1"],a&&(s=t[n+"0shift"],l=t[n+"1shift"])):(i=t[n+"anchor"],o=t[n+"anchor"]),i!==void 0)return[u(i)+s,u(o)+l];if(t.path){var f=1/0,v=-1/0,g=t.path.match(l1.segmentRE),p,x,_,y,C;for(e.type==="date"&&(u=jU.decodeDate(u)),p=0;pv&&(v=C)));if(v>=f)return[f,v]}}});var Ime=fe((Rpr,Rme)=>{"use strict";var Dme=d8();Rme.exports={moduleType:"component",name:"shapes",layoutAttributes:GU(),supplyLayoutDefaults:wme(),supplyDrawNewShapeDefaults:Mme(),includeBasePlot:KT()("shapes"),calcAutorange:Fme(),draw:Dme.draw,drawOne:Dme.drawOne}});var WU=fe((zpr,qme)=>{"use strict";var zme=rc(),n5t=Mo().templatedArray,Ipr=ZT();qme.exports=n5t("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",zme.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",zme.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var Ome=fe((qpr,Bme)=>{"use strict";var i5t=Xt(),YU=Yi(),a5t=Ah(),o5t=WU(),s5t="images";Bme.exports=function(t,r){var n={name:s5t,handleItemDefaults:l5t};a5t(t,r,n)};function l5t(e,t,r){function n(v,g){return i5t.coerce(e,t,o5t,v,g)}var a=n("source"),i=n("visible",!!a);if(!i)return t;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var o={_fullLayout:r},s=["x","y"],l=0;l<2;l++){var u=s[l],c=YU.coerceRef(e,t,o,u,"paper",void 0);if(c!=="paper"){var f=YU.getFromId(o,c);f._imgIndices.push(t._index)}YU.coercePosition(t,o,n,c,u,0)}return t}});var Gme=fe((Bpr,Vme)=>{"use strict";var Nme=xi(),u5t=ea(),M3=Yi(),Ume=El(),c5t=Q0();Vme.exports=function(t){var r=t._fullLayout,n=[],a={},i=[],o,s;for(s=0;s{"use strict";var Hme=aa(),f5t=rE();jme.exports=function(t,r,n,a){r=r||{};var i=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(i||o){for(var s=t._fullLayout.images,l=r._id.charAt(0),u,c,f=0;f{"use strict";Yme.exports={moduleType:"component",name:"images",layoutAttributes:WU(),supplyLayoutDefaults:Ome(),includeBasePlot:KT()("images"),draw:Gme(),convertCoords:Wme()}});var SC=fe((Upr,Zme)=>{"use strict";Zme.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}}});var XU=fe((Vpr,Kme)=>{"use strict";var h5t=Ds(),d5t=tc(),v5t=ta().extendFlat,p5t=rl().overrideAll,g5t=zE(),$me=Mo().templatedArray,m5t=$me("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});Kme.exports=p5t($me("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:m5t,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:v5t(g5t({editType:"arraydraw"}),{}),font:h5t({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:d5t.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var tye=fe((Gpr,eye)=>{"use strict";var EC=Xt(),Jme=Ah(),Qme=XU(),y5t=SC(),x5t=y5t.name,_5t=Qme.buttons;eye.exports=function(t,r){var n={name:x5t,handleItemDefaults:b5t};Jme(t,r,n)};function b5t(e,t,r){function n(o,s){return EC.coerce(e,t,Qme,o,s)}var a=Jme(e,t,{name:"buttons",handleItemDefaults:w5t}),i=n("visible",a.length>0);i&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),EC.noneOrAll(e,t,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),EC.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function w5t(e,t){function r(a,i){return EC.coerce(e,t,_5t,a,i)}var n=r("visible",e.method==="skip"||Array.isArray(e.args));n&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}});var iye=fe((Hpr,nye)=>{"use strict";nye.exports=Nl;var vp=xi(),rye=ni(),S3=ea(),kC=Xt();function Nl(e,t,r){this.gd=e,this.container=t,this.id=r,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})}Nl.barWidth=2;Nl.barLength=20;Nl.barRadius=2;Nl.barPad=1;Nl.barColor="#808BA4";Nl.prototype.enable=function(t,r,n){var a=this.gd._fullLayout,i=a.width,o=a.height;this.position=t;var s=this.position.l,l=this.position.w,u=this.position.t,c=this.position.h,f=this.position.direction,v=f==="down",g=f==="left",p=f==="right",x=f==="up",_=l,y=c,C,k,S,L;!v&&!g&&!p&&!x&&(this.position.direction="down",v=!0);var w=v||x;w?(C=s,k=C+_,v?(S=u,L=Math.min(S+y,o),y=L-S):(L=u+y,S=Math.max(L-y,0),y=L-S)):(S=u,L=S+y,g?(k=s+_,C=Math.max(k-_,0),_=k-C):(C=s,k=Math.min(C+_,i),_=k-C)),this._box={l:C,t:S,w:_,h:y};var A=l>_,T=Nl.barLength+2*Nl.barPad,m=Nl.barWidth+2*Nl.barPad,F=s,E=u+c;E+m>o&&(E=o-m);var I=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);I.exit().on(".drag",null).remove(),I.enter().append("rect").classed("scrollbar-horizontal",!0).call(rye.fill,Nl.barColor),A?(this.hbar=I.attr({rx:Nl.barRadius,ry:Nl.barRadius,x:F,y:E,width:T,height:m}),this._hbarXMin=F+T/2,this._hbarTranslateMax=_-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var R=c>y,B=Nl.barWidth+2*Nl.barPad,O=Nl.barLength+2*Nl.barPad,V=s+l,j=u;V+B>i&&(V=i-B);var q=this.container.selectAll("rect.scrollbar-vertical").data(R?[0]:[]);q.exit().on(".drag",null).remove(),q.enter().append("rect").classed("scrollbar-vertical",!0).call(rye.fill,Nl.barColor),R?(this.vbar=q.attr({rx:Nl.barRadius,ry:Nl.barRadius,x:V,y:j,width:B,height:O}),this._vbarYMin=j+O/2,this._vbarTranslateMax=y-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var U=this.id,J=C-.5,ee=R?k+B+.5:k+.5,ce=S-.5,ye=A?L+m+.5:L+.5,xe=a._topdefs.selectAll("#"+U).data(A||R?[0]:[]);if(xe.exit().remove(),xe.enter().append("clipPath").attr("id",U).append("rect"),A||R?(this._clipRect=xe.select("rect").attr({x:Math.floor(J),y:Math.floor(ce),width:Math.ceil(ee)-Math.floor(J),height:Math.ceil(ye)-Math.floor(ce)}),this.container.call(S3.setClipUrl,U,this.gd),this.bg.attr({x:s,y:u,width:l,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(S3.setClipUrl,null),delete this._clipRect),A||R){var ue=vp.behavior.drag().on("dragstart",function(){vp.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(ue);var K=vp.behavior.drag().on("dragstart",function(){vp.event.sourceEvent.preventDefault(),vp.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(K),R&&this.vbar.on(".drag",null).call(K)}this.setTranslate(r,n)};Nl.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(S3.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)};Nl.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=vp.event.dx),this.vbar&&(r-=vp.event.dy),this.setTranslate(t,r)};Nl.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=vp.event.deltaY),this.vbar&&(r+=vp.event.deltaY),this.setTranslate(t,r)};Nl.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,a=n+this._hbarTranslateMax,i=kC.constrain(vp.event.x,n,a),o=(i-n)/(a-n),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var l=r+this._vbarYMin,u=l+this._vbarTranslateMax,c=kC.constrain(vp.event.y,l,u),f=(c-l)/(u-l),v=this.position.h-this._box.h;r=f*v}this.setTranslate(t,r)};Nl.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,a=this.position.h-this._box.h;if(t=kC.constrain(t||0,0,n),r=kC.constrain(r||0,0,a),this.translateX=t,this.translateY=r,this.container.call(S3.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var i=t/n;this.hbar.call(S3.setTranslate,t+i*this._hbarTranslateMax,r)}if(this.vbar){var o=r/a;this.vbar.call(S3.setTranslate,t,r+o*this._vbarTranslateMax)}}});var vye=fe((jpr,dye)=>{"use strict";var E3=xi(),yA=Hs(),xA=ni(),k3=ea(),R0=Xt(),CC=as(),T5t=Mo().arrayEditor,oye=nc().LINE_SPACING,ba=SC(),A5t=iye();dye.exports=function(t){var r=t._fullLayout,n=R0.filterVisible(r[ba.name]);function a(v){yA.autoMargin(t,fye(v))}var i=r._menulayer.selectAll("g."+ba.containerClassName).data(n.length>0?[0]:[]);if(i.enter().append("g").classed(ba.containerClassName,!0).style("cursor","pointer"),i.exit().each(function(){E3.select(this).selectAll("g."+ba.headerGroupClassName).each(a)}).remove(),n.length!==0){var o=i.selectAll("g."+ba.headerGroupClassName).data(n,M5t);o.enter().append("g").classed(ba.headerGroupClassName,!0);for(var s=R0.ensureSingle(i,"g",ba.dropdownButtonGroupClassName,function(v){v.style("pointer-events","all")}),l=0;l{"use strict";var F5t=SC();pye.exports={moduleType:"component",name:F5t.name,layoutAttributes:XU(),supplyLayoutDefaults:tye(),draw:vye()}});var bA=fe((Ypr,mye)=>{"use strict";mye.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}});var JU=fe((Xpr,_ye)=>{"use strict";var yye=Ds(),D5t=zE(),R5t=ta().extendDeepAll,I5t=rl().overrideAll,z5t=Z4(),xye=Mo().templatedArray,h2=bA(),q5t=xye("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});_ye.exports=I5t(xye("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:q5t,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:R5t(D5t({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:z5t.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:yye({})},font:yye({}),activebgcolor:{valType:"color",dflt:h2.gripBgActiveColor},bgcolor:{valType:"color",dflt:h2.railBgColor},bordercolor:{valType:"color",dflt:h2.railBorderColor},borderwidth:{valType:"number",min:0,dflt:h2.railBorderWidth},ticklen:{valType:"number",min:0,dflt:h2.tickLength},tickcolor:{valType:"color",dflt:h2.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:h2.minorTickLength}}),"arraydraw","from-root")});var Aye=fe((Zpr,Tye)=>{"use strict";var C3=Xt(),bye=Ah(),wye=JU(),B5t=bA(),O5t=B5t.name,N5t=wye.steps;Tye.exports=function(t,r){bye(t,r,{name:O5t,handleItemDefaults:U5t})};function U5t(e,t,r){function n(f,v){return C3.coerce(e,t,wye,f,v)}for(var a=bye(e,t,{name:"steps",handleItemDefaults:V5t}),i=0,o=0;o{"use strict";var pp=xi(),LC=Hs(),Om=ni(),gp=ea(),I0=Xt(),G5t=I0.strTranslate,wA=as(),H5t=Mo().arrayEditor,Xa=bA(),tV=nc(),Eye=tV.LINE_SPACING,QU=tV.FROM_TL,eV=tV.FROM_BR;Dye.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,a=j5t(n,t),i=n._infolayer.selectAll("g."+Xa.containerClassName).data(a.length>0?[0]:[]);i.enter().append("g").classed(Xa.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),LC.autoMargin(t,kye(c))}if(i.exit().each(function(){pp.select(this).selectAll("g."+Xa.groupClassName).each(o)}).remove(),a.length!==0){var s=i.selectAll("g."+Xa.groupClassName).data(a,W5t);s.enter().append("g").classed(Xa.groupClassName,!0),s.exit().each(o).remove();for(var l=0;l0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",G5t(o-Xa.gripWidth*.5,t._dims.currentValueTotalHeight))}}function rV(e,t){var r=e._dims;return r.inputAreaStart+Xa.stepInset+(r.inputAreaLength-2*Xa.stepInset)*Math.min(1,Math.max(0,t))}function Sye(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-Xa.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*Xa.stepInset-2*r.inputAreaStart)))}function Q5t(e,t,r){var n=r._dims,a=I0.ensureSingle(e,"rect",Xa.railTouchRectClass,function(i){i.call(Pye,t,e,r).style("pointer-events","all")});a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,Xa.tickOffset+r.ticklen+n.labelHeight)}).call(Om.fill,r.bgcolor).attr("opacity",0),gp.setTranslate(a,0,n.currentValueTotalHeight)}function e4t(e,t){var r=t._dims,n=r.inputAreaLength-Xa.railInset*2,a=I0.ensureSingle(e,"rect",Xa.railRectClass);a.attr({width:n,height:Xa.railWidth,rx:Xa.railRadius,ry:Xa.railRadius,"shape-rendering":"crispEdges"}).call(Om.stroke,t.bordercolor).call(Om.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),gp.setTranslate(a,Xa.railInset,(r.inputAreaWidth-Xa.railWidth)*.5+r.currentValueTotalHeight)}});var zye=fe((Kpr,Iye)=>{"use strict";var t4t=bA();Iye.exports={moduleType:"component",name:t4t.name,layoutAttributes:JU(),supplyLayoutDefaults:Aye(),draw:Rye()}});var FC=fe((Jpr,Bye)=>{"use strict";var qye=tc();Bye.exports={bgcolor:{valType:"color",dflt:qye.background,editType:"plot"},bordercolor:{valType:"color",dflt:qye.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"}});var nV=fe((Qpr,Oye)=>{"use strict";Oye.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"}});var DC=fe((e1r,Nye)=>{"use strict";Nye.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}});var Gye=fe(IC=>{"use strict";var r4t=El(),n4t=as(),Uye=DC(),i4t=nc().LINE_SPACING,RC=Uye.name;function Vye(e){var t=e&&e[RC];return t&&t.visible}IC.isVisible=Vye;IC.makeData=function(e){for(var t=r4t.list({_fullLayout:e},"x",!0),r=e.margin,n=[],a=0;a{"use strict";var zC=Xt(),Hye=Mo(),jye=El(),a4t=FC(),o4t=nV();Wye.exports=function(t,r,n){var a=t[n],i=r[n];if(!(a.rangeslider||r._requestRangeslider[i._id]))return;zC.isPlainObject(a.rangeslider)||(a.rangeslider={});var o=a.rangeslider,s=Hye.newContainer(i,"rangeslider");function l(L,w){return zC.coerce(o,s,a4t,L,w)}var u,c;function f(L,w){return zC.coerce(u,c,o4t,L,w)}var v=l("visible");if(v){l("bgcolor",r.plot_bgcolor),l("bordercolor"),l("borderwidth"),l("thickness"),l("autorange",!i.isValidRange(o.range)),l("range");var g=r._subplots;if(g)for(var p=g.cartesian.filter(function(L){return L.slice(0,Math.max(0,L.indexOf("y")))===jye.name2id(n)}).map(function(L){return L.slice(L.indexOf("y"),L.length)}),x=zC.simpleMap(p,jye.id2name),_=0;_{"use strict";var s4t=El().list,l4t=rp().getAutoRange,u4t=DC();Xye.exports=function(t){for(var r=s4t(t,"x",!0),n=0;n{"use strict";var qC=xi(),c4t=bi(),f4t=Hs(),mu=Xt(),BC=mu.strTranslate,Kye=ea(),Nm=ni(),h4t=qx(),d4t=gu(),iV=El(),v4t=ed(),p4t=np(),fo=DC();Jye.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n=q.max)V=E[j+1];else if(O=q.pmax)V=E[j+1];else if(O0?e.touches[0].clientX:0}function g4t(e,t,r,n){if(t._context.staticPlot)return;var a=e.select("rect."+fo.slideBoxClassName).node(),i=e.select("rect."+fo.grabAreaMinClassName).node(),o=e.select("rect."+fo.grabAreaMaxClassName).node();function s(){var l=qC.event,u=l.target,c=$ye(l),f=c-e.node().getBoundingClientRect().left,v=n.d2p(r._rl[0]),g=n.d2p(r._rl[1]),p=v4t.coverSlip();this.addEventListener("touchmove",x),this.addEventListener("touchend",_),p.addEventListener("mousemove",x),p.addEventListener("mouseup",_);function x(y){var C=$ye(y),k=+C-c,S,L,w;switch(u){case a:if(w="ew-resize",v+k>r._length||g+k<0)return;S=v+k,L=g+k;break;case i:if(w="col-resize",v+k>r._length)return;S=v+k,L=g;break;case o:if(w="col-resize",g+k<0)return;S=v,L=g+k;break;default:w="ew-resize",S=f,L=f+k;break}if(L{"use strict";var S4t=Xt(),E4t=FC(),k4t=nV(),aV=Gye();exe.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:S4t.extendFlat({},E4t,{yaxis:k4t})}}},layoutAttributes:FC(),handleDefaults:Yye(),calcAutorange:Zye(),draw:Qye(),isVisible:aV.isVisible,makeData:aV.makeData,autoMarginOpts:aV.autoMarginOpts}});var OC=fe((o1r,nxe)=>{"use strict";var C4t=Ds(),rxe=tc(),L4t=Mo().templatedArray,P4t=L4t("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});nxe.exports={visible:{valType:"boolean",editType:"plot"},buttons:P4t,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:C4t({editType:"plot"}),bgcolor:{valType:"color",dflt:rxe.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:rxe.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var oV=fe((s1r,ixe)=>{"use strict";ixe.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var sxe=fe((l1r,oxe)=>{"use strict";var NC=Xt(),F4t=ni(),D4t=Mo(),R4t=Ah(),axe=OC(),sV=oV();oxe.exports=function(t,r,n,a,i){var o=t.rangeselector||{},s=D4t.newContainer(r,"rangeselector");function l(g,p){return NC.coerce(o,s,axe,g,p)}var u=R4t(o,s,{name:"buttons",handleItemDefaults:I4t,calendar:i}),c=l("visible",u.length>0);if(c){var f=z4t(r,n,a);l("x",f[0]),l("y",f[1]),NC.noneOrAll(t,r,["x","y"]),l("xanchor"),l("yanchor"),NC.coerceFont(l,"font",n.font);var v=l("bgcolor");l("activecolor",F4t.contrast(v,sV.lightAmount,sV.darkAmount)),l("bordercolor"),l("borderwidth")}};function I4t(e,t,r,n){var a=n.calendar;function i(l,u){return NC.coerce(e,t,axe.buttons,l,u)}var o=i("visible");if(o){var s=i("step");s!=="all"&&(a&&a!=="gregorian"&&(s==="month"||s==="year")?t.stepmode="backward":i("stepmode"),i("count")),i("label")}}function z4t(e,t,r){for(var n=r.filter(function(s){return t[s].anchor===e._id}),a=0,i=0;i{"use strict";var q4t=HI(),B4t=Xt().titleCase;lxe.exports=function(t,r){var n=t._name,a={};if(r.step==="all")a[n+".autorange"]=!0;else{var i=O4t(t,r);a[n+".range[0]"]=i[0],a[n+".range[1]"]=i[1]}return a};function O4t(e,t){var r=e.range,n=new Date(e.r2l(r[1])),a=t.step,i=q4t["utc"+B4t(a)],o=t.count,s;switch(t.stepmode){case"backward":s=e.l2r(+i.offset(n,-o));break;case"todate":var l=i.offset(n,-o);s=e.l2r(+i.ceil(l));break}var u=r[1];return[s,u]}});var mxe=fe((c1r,gxe)=>{"use strict";var VC=xi(),N4t=bi(),U4t=Hs(),cxe=ni(),pxe=ea(),lg=Xt(),fxe=lg.strTranslate,UC=as(),V4t=El(),cV=nc(),hxe=cV.LINE_SPACING,dxe=cV.FROM_TL,vxe=cV.FROM_BR,uV=oV(),G4t=uxe();gxe.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(".rangeselector").data(H4t(t),j4t);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(a){var i=VC.select(this),o=a,s=o.rangeselector,l=i.selectAll("g.button").data(lg.filterVisible(s.buttons));l.enter().append("g").classed("button",!0),l.exit().remove(),l.each(function(u){var c=VC.select(this),f=G4t(o,u);u._isActive=W4t(o,u,f),c.call(lV,s,u),c.call(X4t,s,u,t),c.on("click",function(){t._dragged||N4t.call("_guiRelayout",t,f)}),c.on("mouseover",function(){u._isHovered=!0,c.call(lV,s,u)}),c.on("mouseout",function(){u._isHovered=!1,c.call(lV,s,u)})}),$4t(t,l,s,o._name,i)})};function H4t(e){for(var t=V4t.list(e,"x",!0),r=[],n=0;n{"use strict";yxe.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:OC()}}},layoutAttributes:OC(),handleDefaults:sxe(),draw:mxe()}});var nl=fe(fV=>{"use strict";var _xe=ta().extendFlat;fV.attributes=function(e,t){e=e||{},t=t||{};var r={valType:"info_array",editType:e.editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},n=e.name?e.name+" ":"",a=e.trace?"trace":"subplot",i=t.description?" "+t.description:"",o={x:_xe({},r,{}),y:_xe({},r,{}),editType:e.editType};return e.noGridCell||(o.row={valType:"integer",min:0,dflt:0,editType:e.editType},o.column={valType:"integer",min:0,dflt:0,editType:e.editType}),o};fV.defaults=function(e,t,r,n){var a=n&&n.x||[0,1],i=n&&n.y||[0,1],o=t.grid;if(o){var s=r("domain.column");s!==void 0&&(s{"use strict";var K4t=Xt(),J4t=(Tb(),Gs(wb)).counter,Q4t=nl().attributes,bxe=rc().idRegex,eTt=Mo(),hV={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[J4t("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[bxe.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[bxe.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:Q4t({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function GC(e,t,r){var n=t[r+"axes"],a=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(n))return n;if(a.length)return a}function tTt(e,t){var r=e.grid||{},n=GC(t,r,"x"),a=GC(t,r,"y");if(!e.grid&&!n&&!a)return;var i=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(n),s=Array.isArray(a),l=o&&n!==r.xaxes&&s&&a!==r.yaxes,u,c;i?(u=r.subplots.length,c=r.subplots[0].length):(s&&(u=a.length),o&&(c=n.length));var f=eTt.newContainer(t,"grid");function v(w,A){return K4t.coerce(r,f,hV,w,A)}var g=v("rows",u),p=v("columns",c);if(!(g*p>1)){delete t.grid;return}if(!i&&!o&&!s){var x=v("pattern")==="independent";x&&(i=!0)}f._hasSubplotGrid=i;var _=v("roworder"),y=_==="top to bottom",C=i?.2:.1,k=i?.3:.1,S,L;l&&t._splomGridDflt&&(S=t._splomGridDflt.xside,L=t._splomGridDflt.yside),f._domains={x:wxe("x",v,C,S,p),y:wxe("y",v,k,L,g,y)}}function wxe(e,t,r,n,a,i){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var l=new Array(a),u=s[0],c=(s[1]-u)/(a-o),f=c*(1-o),v=0;v{"use strict";Mxe.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc"}});var kxe=fe((p1r,Exe)=>{"use strict";var Sxe=aa(),nTt=bi(),iTt=Xt(),aTt=Mo(),oTt=vV();Exe.exports=function(e,t,r,n){var a="error_"+n.axis,i=aTt.newContainer(t,a),o=e[a]||{};function s(p,x){return iTt.coerce(o,i,oTt,p,x)}var l=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=s("visible",l);if(u!==!1){var c=s("type","array"in o?"data":"percent"),f=!0;c!=="sqrt"&&(f=s("symmetric",!((c==="data"?"arrayminus":"valueminus")in o))),c==="data"?(s("array"),s("traceref"),f||(s("arrayminus"),s("tracerefminus"))):(c==="percent"||c==="constant")&&(s("value"),f||s("valueminus"));var v="copy_"+n.inherit+"style";if(n.inherit){var g=t["error_"+n.inherit];(g||{}).visible&&s(v,!(o.color||Sxe(o.thickness)||Sxe(o.width)))}(!n.inherit||!i[v])&&(s("color",r),s("thickness"),s("width",nTt.traceIs(t,"gl3d")?0:4))}}});var pV=fe((g1r,Lxe)=>{"use strict";Lxe.exports=function(t){var r=t.type,n=t.symmetric;if(r==="data"){var a=t.array||[];if(n)return function(u,c){var f=+a[c];return[f,f]};var i=t.arrayminus||[];return function(u,c){var f=+a[c],v=+i[c];return!isNaN(f)||!isNaN(v)?[v||0,f||0]:[NaN,NaN]}}else{var o=Cxe(r,t.value),s=Cxe(r,t.valueminus);return n||t.valueminus===void 0?function(u){var c=o(u);return[c,c]}:function(u){return[s(u),o(u)]}}};function Cxe(e,t){if(e==="percent")return function(r){return Math.abs(r*t/100)};if(e==="constant")return function(){return Math.abs(t)};if(e==="sqrt")return function(r){return Math.sqrt(Math.abs(r))}}});var Dxe=fe((m1r,Fxe)=>{"use strict";var gV=aa(),sTt=bi(),mV=Yi(),lTt=Xt(),uTt=pV();Fxe.exports=function(t){for(var r=t.calcdata,n=0;n{"use strict";var Rxe=xi(),Um=aa(),cTt=ea(),fTt=Is();Ixe.exports=function(t,r,n,a){var i,o=n.xaxis,s=n.yaxis,l=a&&a.duration>0,u=t._context.staticPlot;r.each(function(c){var f=c[0].trace,v=f.error_x||{},g=f.error_y||{},p;f.ids&&(p=function(C){return C.id});var x=fTt.hasMarkers(f)&&f.marker.maxdisplayed>0;!g.visible&&!v.visible&&(c=[]);var _=Rxe.select(this).selectAll("g.errorbar").data(c,p);if(_.exit().remove(),!!c.length){v.visible||_.selectAll("path.xerror").remove(),g.visible||_.selectAll("path.yerror").remove(),_.style("opacity",1);var y=_.enter().append("g").classed("errorbar",!0);l&&y.style("opacity",0).transition().duration(a.duration).style("opacity",1),cTt.setClipUrl(_,n.layerClipId,t),_.each(function(C){var k=Rxe.select(this),S=hTt(C,o,s);if(!(x&&!C.vis)){var L,w=k.select("path.yerror");if(g.visible&&Um(S.x)&&Um(S.yh)&&Um(S.ys)){var A=g.width;L="M"+(S.x-A)+","+S.yh+"h"+2*A+"m-"+A+",0V"+S.ys,S.noYS||(L+="m-"+A+",0h"+2*A),i=!w.size(),i?w=k.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):l&&(w=w.transition().duration(a.duration).ease(a.easing)),w.attr("d",L)}else w.remove();var T=k.select("path.xerror");if(v.visible&&Um(S.y)&&Um(S.xh)&&Um(S.xs)){var m=(v.copy_ystyle?g:v).width;L="M"+S.xh+","+(S.y-m)+"v"+2*m+"m0,-"+m+"H"+S.xs,S.noXS||(L+="m0,-"+m+"v"+2*m),i=!T.size(),i?T=k.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):l&&(T=T.transition().duration(a.duration).ease(a.easing)),T.attr("d",L)}else T.remove()}})}})};function hTt(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),Um(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),Um(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}});var Oxe=fe((x1r,Bxe)=>{"use strict";var dTt=xi(),qxe=ni();Bxe.exports=function(t){t.each(function(r){var n=r[0].trace,a=n.error_y||{},i=n.error_x||{},o=dTt.select(this);o.selectAll("path.yerror").style("stroke-width",a.thickness+"px").call(qxe.stroke,a.color),i.copy_ystyle&&(i=a),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(qxe.stroke,i.color)})}});var Vxe=fe((_1r,Uxe)=>{"use strict";var TA=Xt(),Nxe=rl().overrideAll,AA=vV(),d2={error_x:TA.extendFlat({},AA),error_y:TA.extendFlat({},AA)};delete d2.error_x.copy_zstyle;delete d2.error_y.copy_zstyle;delete d2.error_y.copy_ystyle;var MA={error_x:TA.extendFlat({},AA),error_y:TA.extendFlat({},AA),error_z:TA.extendFlat({},AA)};delete MA.error_x.copy_ystyle;delete MA.error_y.copy_ystyle;delete MA.error_z.copy_ystyle;delete MA.error_z.copy_zstyle;Uxe.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:d2,bar:d2,histogram:d2,scatter3d:Nxe(MA,"calc","nested"),scattergl:Nxe(d2,"calc","nested")}},supplyDefaults:kxe(),calc:Dxe(),makeComputeError:pV(),plot:zxe(),style:Oxe(),hoverInfo:vTt};function vTt(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}});var Hxe=fe((b1r,Gxe)=>{"use strict";Gxe.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"}}});var Jxe=fe((w1r,Kxe)=>{"use strict";var Vm=xi(),jC=Hs(),jxe=bi(),ug=Yi(),HC=ed(),xv=Xt(),yp=xv.strTranslate,$xe=ta().extendFlat,yV=np(),mp=ea(),L3=ni(),pTt=qx(),gTt=as(),mTt=Wf().flipScale,yTt=vA(),xTt=gC(),_Tt=pf(),_V=nc(),Wxe=_V.LINE_SPACING,Yxe=_V.FROM_TL,Xxe=_V.FROM_BR,Cl=Hxe().cn;function bTt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+Cl.colorbar).data(wTt(e),function(n){return n._id});r.enter().append("g").attr("class",function(n){return n._id}).classed(Cl.colorbar,!0),r.each(function(n){var a=Vm.select(this);xv.ensureSingle(a,"rect",Cl.cbbg),xv.ensureSingle(a,"g",Cl.cbfills),xv.ensureSingle(a,"g",Cl.cblines),xv.ensureSingle(a,"g",Cl.cbaxis,function(o){o.classed(Cl.crisp,!0)}),xv.ensureSingle(a,"g",Cl.cbtitleunshift,function(o){o.append("g").classed(Cl.cbtitle,!0)}),xv.ensureSingle(a,"rect",Cl.cboutline);var i=TTt(a,n,e);i&&i.then&&(e._promises||[]).push(i),e._context.edits.colorbarPosition&&ATt(a,n,e)}),r.exit().each(function(n){jC.autoMargin(e,n._id)}).remove(),r.order()}function wTt(e){var t=e._fullLayout,r=e.calcdata,n=[],a,i,o,s;function l(k){return $xe(k,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){typeof s.calc=="function"?s.calc(e,o,a):(a._fillgradient=i.reversescale?mTt(i.colorscale):i.colorscale,a._zrange=[i[s.min],i[s.max]])}for(var c=0;c[Math.min(e[0]+t,e[1]),e[1]],Zxe=(e,t)=>[e[0],Math.max(e[1]-t,e[0])];function TTt(e,t,r){var n=t.orientation==="v",a=t.len,i=t.lenmode,o=t.thickness,s=t.thicknessmode,l=t.outlinewidth,u=t.borderwidth,c=t.bgcolor,f=t.xanchor,v=t.yanchor,g=t.xpad,p=t.ypad,x=t.x,_=n?t.y:1-t.y,y=t.yref==="paper",C=t.xref==="paper",k=r._fullLayout,S=k._size,L=t._fillcolor,w=t._line,A=t.title,T=A.side,m=t._zrange||Vm.extent((typeof L=="function"?L:w.color).domain()),F=typeof w.color=="function"?w.color:function(){return w.color},E=typeof L=="function"?L:function(){return L},I=t._levels,R=MTt(r,t,m),B=R.fill,O=R.line,V=Math.round(o*(s==="fraction"?n?S.w:S.h:1)),j=V/(n?S.w:S.h),q=Math.round(a*(i==="fraction"?n?S.h:S.w:1)),U=q/(n?S.h:S.w),J=C?S.w:r._fullLayout.width,ee=y?S.h:r._fullLayout.height,ce=Math.round(n?x*J+g:_*ee+p),ye={center:.5,right:1}[f]||0,xe={top:1,middle:.5}[v]||0,ue=n?x-ye*j:_-xe*j,K=n?_-xe*U:x-ye*U,_e=Math.round(n?ee*(1-K):J*K);t._lenFrac=U,t._thickFrac=j,t._uFrac=ue,t._vFrac=K;var ne=t._axis=STt(r,t,m);ne.position=j+(n?x+g/S.w:_+p/S.h);var ae=["top","bottom"].indexOf(T)!==-1;if(n&&ae&&(ne.title.side=T,ne.titlex=x+g/S.w,ne.titley=K+(A.side==="top"?U-p/S.h:p/S.h)),!n&&!ae&&(ne.title.side=T,ne.titley=_+p/S.h,ne.titlex=K+g/S.w),w.color&&t.tickmode==="auto"){ne.tickmode="linear",ne.tick0=I.start;var pe=I.size,ie=xv.constrain(q/50,4,15)+1,le=(m[1]-m[0])/((t.nticks||ie)*pe);if(le>1){var me=Math.pow(10,Math.floor(Math.log(le)/Math.LN10));pe*=me*xv.roundUp(le/me,[2,5,10]),(Math.abs(I.start)/I.size+1e-6)%1<2e-6&&(ne.tick0=0)}ne.dtick=pe}var be=n?p/S.h:g/S.w;ne.domain=Zxe(xV([K,K+U],be),be),ne.setScale(),e.attr("transform",yp(Math.round(S.l),Math.round(S.t)));var De=e.select("."+Cl.cbtitleunshift).attr("transform",yp(-Math.round(S.l),-Math.round(S.t))),Ge=ne.ticklabelposition,ht=ne.title.font.size,it=e.select("."+Cl.cbaxis),Oe,ze=0,ct=0;function et(Te,Ve){var $e={propContainer:ne,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:k._dfltTitle.colorbar,containerGroup:e.select("."+Cl.cbtitle)},ot=Te.charAt(0)==="h"?Te.slice(1):"h"+Te;e.selectAll("."+ot+",."+ot+"-math-group").remove(),pTt.draw(r,Te,$xe($e,Ve||{}))}function qe(){if(n&&ae||!n&&!ae){var Te,Ve;T==="top"&&(Te=g+S.l+J*x,Ve=p+S.t+ee*(1-K-U)+3+ht*.75),T==="bottom"&&(Te=g+S.l+J*x,Ve=p+S.t+ee*(1-K)-3-ht*.25),T==="right"&&(Ve=p+S.t+ee*_+3+ht*.75,Te=g+S.l+J*K),et(ne._id+"title",{attributes:{x:Te,y:Ve,"text-anchor":n?"start":"middle"}})}}function we(){if(n&&!ae||!n&&ae){var Te=ne.position||0,Ve=ne._offset+ne._length/2,$e,ot;if(T==="right")ot=Ve,$e=S.l+J*Te+10+ht*(ne.showticklabels?1:.5);else if($e=Ve,T==="bottom"&&(ot=S.t+ee*Te+10+(Ge.indexOf("inside")===-1?ne.tickfont.size:0)+(ne.ticks!=="inside"&&t.ticklen||0)),T==="top"){var tt=A.text.split("
").length;ot=S.t+ee*Te+10-V-Wxe*ht*tt}et((n?"h":"v")+ne._id+"title",{avoid:{selection:Vm.select(r).selectAll("g."+ne._id+"tick"),side:T,offsetTop:n?0:S.t,offsetLeft:n?S.l:0,maxShift:n?k.width:k.height},attributes:{x:$e,y:ot,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function Le(){if(!n&&!ae||n&&ae){var Te=e.select("."+Cl.cbtitle),Ve=Te.select("text"),$e=[-l/2,l/2],ot=Te.select(".h"+ne._id+"title-math-group").node(),tt=15.6;Ve.node()&&(tt=parseInt(Ve.node().style.fontSize,10)*Wxe);var nt;if(ot?(nt=mp.bBox(ot),ct=nt.width,ze=nt.height,ze>tt&&($e[1]-=(ze-tt)/2)):Ve.node()&&!Ve.classed(Cl.jsPlaceholder)&&(nt=mp.bBox(Ve.node()),ct=nt.width,ze=nt.height),n){if(ze){if(ze+=5,T==="top")ne.domain=Zxe(ne.domain,ze/S.h),$e[1]*=-1;else{ne.domain=xV(ne.domain,ze/S.h);var We=gTt.lineCount(Ve);$e[1]+=(1-We)*tt}Te.attr("transform",yp($e[0],$e[1])),ne.setScale()}}else ct&&(T==="right"&&(ne.domain=xV(ne.domain,(ct+ht/2)/S.w)),Te.attr("transform",yp($e[0],$e[1])),ne.setScale())}e.selectAll("."+Cl.cbfills+",."+Cl.cblines).attr("transform",n?yp(0,Math.round(S.h*(1-ne.domain[1]))):yp(Math.round(S.w*ne.domain[0]),0)),it.attr("transform",n?yp(0,Math.round(-S.t)):yp(Math.round(-S.l),0));var mt=e.select("."+Cl.cbfills).selectAll("rect."+Cl.cbfill).attr("style","").data(B);mt.enter().append("rect").classed(Cl.cbfill,!0).attr("style",""),mt.exit().remove();var bt=m.map(ne.c2p).map(Math.round).sort(function(fr,Ot){return fr-Ot});mt.each(function(fr,Ot){var cr=[Ot===0?m[0]:(B[Ot]+B[Ot-1])/2,Ot===B.length-1?m[1]:(B[Ot]+B[Ot+1])/2].map(ne.c2p).map(Math.round);n&&(cr[1]=xv.constrain(cr[1]+(cr[1]>cr[0])?1:-1,bt[0],bt[1]));var Ct=Vm.select(this).attr(n?"x":"y",ce).attr(n?"y":"x",Vm.min(cr)).attr(n?"width":"height",Math.max(V,2)).attr(n?"height":"width",Math.max(Vm.max(cr)-Vm.min(cr),2));if(t._fillgradient)mp.gradient(Ct,r,t._id,n?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var wt=E(fr).replace("e-","");Ct.attr("fill",L3.hexString(wt))}});var Yt=e.select("."+Cl.cblines).selectAll("path."+Cl.cbline).data(w.color&&w.width?O:[]);Yt.enter().append("path").classed(Cl.cbline,!0),Yt.exit().remove(),Yt.each(function(fr){var Ot=ce,cr=Math.round(ne.c2p(fr))+w.width/2%1;Vm.select(this).attr("d","M"+(n?Ot+","+cr:cr+","+Ot)+(n?"h":"v")+V).call(mp.lineGroupStyle,w.width,F(fr),w.dash)}),it.selectAll("g."+ne._id+"tick,path").remove();var jt=ce+V+(l||0)/2-(t.ticks==="outside"?1:0),mr=ug.calcTicks(ne),or=ug.getTickSigns(ne)[2];return ug.drawTicks(r,ne,{vals:ne.ticks==="inside"?ug.clipEnds(ne,mr):mr,layer:it,path:ug.makeTickPath(ne,jt,or),transFn:ug.makeTransTickFn(ne)}),ug.drawLabels(r,ne,{vals:mr,layer:it,transFn:ug.makeTransTickLabelFn(ne),labelFns:ug.makeLabelFns(ne,jt)})}function Ke(){var Te,Ve=V+l/2;Ge.indexOf("inside")===-1&&(Te=mp.bBox(it.node()),Ve+=n?Te.width:Te.height),Oe=De.select("text");var $e=0,ot=n&&T==="top",tt=!n&&T==="right",nt=0;if(Oe.node()&&!Oe.classed(Cl.jsPlaceholder)){var We,mt=De.select(".h"+ne._id+"title-math-group").node();mt&&(n&&ae||!n&&!ae)?(Te=mp.bBox(mt),$e=Te.width,We=Te.height):(Te=mp.bBox(De.node()),$e=Te.right-S.l-(n?ce:_e),We=Te.bottom-S.t-(n?_e:ce),!n&&T==="top"&&(Ve+=Te.height,nt=Te.height)),tt&&(Oe.attr("transform",yp($e/2+ht/2,0)),$e*=2),Ve=Math.max(Ve,n?$e:We)}var bt=(n?g:p)*2+Ve+u+l/2,Yt=0;!n&&A.text&&v==="bottom"&&_<=0&&(Yt=bt/2,bt+=Yt,nt+=Yt),k._hColorbarMoveTitle=Yt,k._hColorbarMoveCBTitle=nt;var jt=u+l,mr=(n?ce:_e)-jt/2-(n?g:0),or=(n?_e:ce)-(n?q:p+nt-Yt);e.select("."+Cl.cbbg).attr("x",mr).attr("y",or).attr(n?"width":"height",Math.max(bt-Yt,2)).attr(n?"height":"width",Math.max(q+jt,2)).call(L3.fill,c).call(L3.stroke,t.bordercolor).style("stroke-width",u);var fr=tt?Math.max($e-10,0):0;e.selectAll("."+Cl.cboutline).attr("x",(n?ce:_e+g)+fr).attr("y",(n?_e+p-q:ce)+(ot?ze:0)).attr(n?"width":"height",Math.max(V,2)).attr(n?"height":"width",Math.max(q-(n?2*p+ze:2*g+fr),2)).call(L3.stroke,t.outlinecolor).style({fill:"none","stroke-width":l});var Ot=n?ye*bt:0,cr=n?0:(1-xe)*bt-nt;if(Ot=C?S.l-Ot:-Ot,cr=y?S.t-cr:-cr,e.attr("transform",yp(Ot,cr)),!n&&(u||L3.opacity(c)&&!L3.equals(k.paper_bgcolor,c))){var Ct=it.selectAll("text"),wt=Ct[0].length,Tt=e.select("."+Cl.cbbg).node(),Mt=mp.bBox(Tt),Lt=mp.getTranslate(e),ft=2;Ct.each(function(Cn,Dt){var At=0,Vt=wt-1;if(Dt===At||Dt===Vt){var Qt=mp.bBox(this),Ut=mp.getTranslate(this),_r;if(Dt===Vt){var rn=Qt.right+Ut.x,Jr=Mt.right+Lt.x+_e-u-ft+x;_r=Jr-rn,_r>0&&(_r=0)}else if(Dt===At){var qn=Qt.left+Ut.x,ri=Mt.left+Lt.x+_e+u+ft;_r=ri-qn,_r<0&&(_r=0)}_r&&(wt<3?this.setAttribute("transform","translate("+_r+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var kt={},rr=Yxe[f],pr=Xxe[f],Kr=Yxe[v],Nr=Xxe[v],dn=bt-V;n?(i==="pixels"?(kt.y=_,kt.t=q*Kr,kt.b=q*Nr):(kt.t=kt.b=0,kt.yt=_+a*Kr,kt.yb=_-a*Nr),s==="pixels"?(kt.x=x,kt.l=bt*rr,kt.r=bt*pr):(kt.l=dn*rr,kt.r=dn*pr,kt.xl=x-o*rr,kt.xr=x+o*pr)):(i==="pixels"?(kt.x=x,kt.l=q*rr,kt.r=q*pr):(kt.l=kt.r=0,kt.xl=x+a*rr,kt.xr=x-a*pr),s==="pixels"?(kt.y=1-_,kt.t=bt*Kr,kt.b=bt*Nr):(kt.t=dn*Kr,kt.b=dn*Nr,kt.yt=_-o*Kr,kt.yb=_+o*Nr));var xr=t.y<.5?"b":"t",Fr=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var Zr={r:k.width-mr-Ot,l:mr+kt.r,b:k.height-or-cr,t:or+kt.b};C&&y?jC.autoMargin(r,t._id,kt):C?r._fullLayout._reservedMargin[t._id][xr]=Zr[xr]:y||n?r._fullLayout._reservedMargin[t._id][Fr]=Zr[Fr]:r._fullLayout._reservedMargin[t._id][xr]=Zr[xr]}return xv.syncOrAsync([jC.previousPromises,qe,Le,we,jC.previousPromises,Ke],r)}function ATt(e,t,r){var n=t.orientation==="v",a=r._fullLayout,i=a._size,o,s,l;HC.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),yV(e)},moveFn:function(u,c){e.attr("transform",o+yp(u,c)),s=HC.align((n?t._uFrac:t._vFrac)+u/i.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=HC.align((n?t._vFrac:1-t._uFrac)-c/i.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=HC.getCursor(s,l,t.xanchor,t.yanchor);yV(e,f)},doneFn:function(){if(yV(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+"x"]=s,u[t._propPrefix+"y"]=l,t._traceIndex!==void 0?jxe.call("_guiRestyle",r,u,t._traceIndex):jxe.call("_guiRelayout",r,u)}}})}function MTt(e,t,r){var n=t._levels,a=[],i=[],o,s,l=n.end+n.size/100,u=n.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=n.start+s*u,!(u>0?o>=l:o<=l));s++)o>c&&o0?o>=l:o<=l));s++)o>r[0]&&o{"use strict";Qxe.exports={moduleType:"component",name:"colorbar",attributes:ck(),supplyDefaults:EB(),draw:Jxe().draw,hasColorbar:_B()}});var r2e=fe((A1r,t2e)=>{"use strict";t2e.exports={moduleType:"component",name:"legend",layoutAttributes:bO(),supplyLayoutDefaults:TO(),draw:qO(),style:DO()}});var i2e=fe((M1r,n2e)=>{"use strict";n2e.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{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"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}});var o2e=fe((S1r,a2e)=>{"use strict";a2e.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var wV=fe((E1r,c2e)=>{"use strict";var ETt=bi(),u2e=Xt(),bV=u2e.extendFlat,s2e=u2e.extendDeep;function l2e(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function kTt(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}c2e.exports=function(t,r){var n,a=t.data,i=t.layout,o=s2e([],a),s=s2e({},i,l2e(r.tileClass)),l=t._context||{};if(r.width&&(s.width=r.width),r.height&&(s.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){s.annotations=[];var u=Object.keys(s);for(n=0;n{"use strict";var CTt=Mx().EventEmitter,LTt=bi(),PTt=Xt(),f2e=ag(),FTt=wV(),DTt=$8(),RTt=K8();function ITt(e,t){var r=new CTt,n=FTt(e,{format:"png"}),a=n.gd;a.style.position="absolute",a.style.left="-5000px",document.body.appendChild(a);function i(){var s=f2e.getDelay(a._fullLayout);setTimeout(function(){var l=DTt(a),u=document.createElement("canvas");u.id=PTt.randstr(),r=RTt({format:t.format,width:a._fullLayout.width,height:a._fullLayout.height,canvas:u,emitter:r,svg:l}),r.clean=function(){a&&document.body.removeChild(a)}},s)}var o=f2e.getRedrawFunc(a);return LTt.call("_doPlot",a,n.data,n.layout,n.config).then(o).then(i).catch(function(s){r.emit("error",s)}),r}h2e.exports=ITt});var g2e=fe((C1r,p2e)=>{"use strict";var v2e=ag(),zTt={getDelay:v2e.getDelay,getRedrawFunc:v2e.getRedrawFunc,clone:wV(),toSVG:$8(),svgToImg:K8(),toImage:d2e(),downloadImage:rU()};p2e.exports=zTt});var y2e=fe(cg=>{"use strict";cg.version=A4().version;Fte();xse();var qTt=bi(),SA=cg.register=qTt.register,AV=qpe(),m2e=Object.keys(AV);for(WC=0;WC{"use strict";x2e.exports=y2e()});var u1=fe((F1r,M2e)=>{"use strict";var nu=Ol(),b2e=pl().axisHoverFormat,{hovertemplateAttrs:BTt,texttemplateAttrs:OTt,templatefallbackAttrs:w2e}=Oo(),A2e=_s(),NTt=Ds(),T2e=Im(),UTt=Uc().pattern,v2=ta().extendFlat,MV=NTt({editType:"calc",arrayOk:!0,colorEditType:"style"}),VTt=nu.marker,GTt=VTt.line,HTt=v2({},GTt.width,{dflt:0}),jTt=v2({width:HTt,editType:"calc"},A2e("marker.line")),WTt=v2({line:jTt,editType:"calc"},A2e("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:UTt,cornerradius:{valType:"any",editType:"calc"}});M2e.exports={x:nu.x,x0:nu.x0,dx:nu.dx,y:nu.y,y0:nu.y0,dy:nu.dy,xperiod:nu.xperiod,yperiod:nu.yperiod,xperiod0:nu.xperiod0,yperiod0:nu.yperiod0,xperiodalignment:nu.xperiodalignment,yperiodalignment:nu.yperiodalignment,xhoverformat:b2e("x"),yhoverformat:b2e("y"),text:nu.text,texttemplate:OTt({editType:"plot"},{keys:T2e.eventDataKeys}),texttemplatefallback:w2e({editType:"plot"}),hovertext:nu.hovertext,hovertemplate:BTt({},{keys:T2e.eventDataKeys}),hovertemplatefallback:w2e(),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:v2({},MV,{}),insidetextfont:v2({},MV,{}),outsidetextfont:v2({},MV,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:v2({},nu.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:WTt,offsetgroup:nu.offsetgroup,alignmentgroup:nu.alignmentgroup,selected:{marker:{opacity:nu.selected.marker.opacity,color:nu.selected.marker.color,editType:"style"},textfont:nu.selected.textfont,editType:"style"},unselected:{marker:{opacity:nu.unselected.marker.opacity,color:nu.unselected.marker.color,editType:"style"},textfont:nu.unselected.textfont,editType:"style"},zorder:nu.zorder}});var XC=fe((D1r,S2e)=>{"use strict";S2e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}});var ZC=fe((R1r,C2e)=>{"use strict";var YTt=ni(),E2e=Wf().hasColorscale,k2e=Vc(),XTt=Xt().coercePattern;C2e.exports=function(t,r,n,a,i){var o=n("marker.color",a),s=E2e(t,"marker");s&&k2e(t,r,i,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",YTt.defaultLine),E2e(t,"marker.line")&&k2e(t,r,i,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),XTt(n,"marker.pattern",o,s),n("selected.marker.color"),n("unselected.marker.color")}});var z0=fe((I1r,I2e)=>{"use strict";var L2e=aa(),F3=Xt(),P2e=ni(),ZTt=bi(),$Tt=r2(),KTt=sp(),JTt=ZC(),QTt=n2(),F2e=u1(),$C=F3.coerceFont;function eAt(e,t,r,n){function a(u,c){return F3.coerce(e,t,F2e,u,c)}var i=$Tt(e,t,n,a);if(!i){t.visible=!1;return}KTt(e,t,n,a),a("xhoverformat"),a("yhoverformat"),a("zorder"),a("orientation",t.x&&!t.y?"h":"v"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var o=a("textposition");R2e(e,t,n,a,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),JTt(e,t,a,r,n);var s=(t.marker.line||{}).color,l=ZTt.getComponentMethod("errorbars","supplyDefaults");l(e,t,s||P2e.defaultLine,{axis:"y"}),l(e,t,s||P2e.defaultLine,{axis:"x",inherit:"y"}),F3.coerceSelectionMarkerOpacity(t,a)}function tAt(e,t){var r,n;function a(s,l){return F3.coerce(n._input,n,F2e,s,l)}for(var i=0;i=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&L2e(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function R2e(e,t,r,n,a,i){i=i||{};var o=i.moduleHasSelected!==!1,s=i.moduleHasUnselected!==!1,l=i.moduleHasConstrain!==!1,u=i.moduleHasCliponaxis!==!1,c=i.moduleHasTextangle!==!1,f=i.moduleHasInsideanchor!==!1,v=!!i.hasPathbar,g=Array.isArray(a)||a==="auto",p=g||a==="inside",x=g||a==="outside";if(p||x){var _=$C(n,"textfont",r.font),y=F3.extendFlat({},_),C=e.textfont&&e.textfont.color,k=!C;if(k&&delete y.color,$C(n,"insidetextfont",y),v){var S=F3.extendFlat({},_);k&&delete S.color,$C(n,"pathbar.textfont",S)}x&&$C(n,"outsidetextfont",_),o&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),l&&n("constraintext"),u&&n("cliponaxis"),c&&n("textangle"),n("texttemplate"),n("texttemplatefallback")}p&&f&&n("insidetextanchor")}I2e.exports={supplyDefaults:eAt,crossTraceDefaults:tAt,handleText:R2e,validateCornerradius:D2e}});var SV=fe((z1r,z2e)=>{"use strict";var rAt=bi(),nAt=Yi(),iAt=Xt(),aAt=XC(),oAt=z0().validateCornerradius;z2e.exports=function(e,t,r){function n(x,_){return iAt.coerce(e,t,aAt,x,_)}for(var a=!1,i=!1,o=!1,s={},l=n("barmode"),u=l==="group",c=0;c0&&!s[v]&&(o=!0),s[v]=!0),f.visible&&f.type==="histogram"){var g=nAt.getFromId({_fullLayout:t},f[f.orientation==="v"?"xaxis":"yaxis"]);g.type!=="category"&&(i=!0)}}if(!a){delete t.barmode;return}l!=="overlay"&&n("barnorm"),n("bargap",i&&!o?0:.2),n("bargroupgap");var p=n("barcornerradius");t.barcornerradius=oAt(p)}});var EA=fe((q1r,q2e)=>{"use strict";var D3=Xt();q2e.exports=function(t,r){for(var n=0;n{"use strict";var B2e=Yi(),O2e=cp(),N2e=Wf().hasColorscale,U2e=Mh(),sAt=EA(),lAt=P0();V2e.exports=function(t,r){var n=B2e.getFromId(t,r.xaxis||"x"),a=B2e.getFromId(t,r.yaxis||"y"),i,o,s,l,u,c,f={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(i=n.makeCalcdata(r,"x",f),s=a.makeCalcdata(r,"y"),l=O2e(r,a,"y",s),u=!!r.yperiodalignment,c="y"):(i=a.makeCalcdata(r,"y",f),s=n.makeCalcdata(r,"x"),l=O2e(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var v=Math.min(o.length,i.length),g=new Array(v),p=0;p{"use strict";var uAt=xi(),cAt=Xt();function fAt(e,t,r){var n=e._fullLayout,a=n["_"+r+"Text_minsize"];if(a){var i=n.uniformtext.mode==="hide",o;switch(r){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}t.selectAll(o).each(function(s){var l=s.transform;if(l){l.scale=i&&l.hide?0:a/l.fontSize;var u=uAt.select(this).select("text");cAt.setTransormAndDisplay(u,l)}})}}function hAt(e,t,r){if(r.uniformtext.mode){var n=H2e(e),a=r.uniformtext.minsize,i=t.scale*t.fontSize;t.hide=i{"use strict";var vAt=ni(),pAt=aa(),W2e=Xt().isArrayOrTypedArray;p2.coerceString=function(e,t,r){if(typeof t=="string"){if(t||!e.noBlank)return t}else if((typeof t=="number"||t===!0)&&!e.strict)return String(t);return r!==void 0?r:e.dflt};p2.coerceNumber=function(e,t,r){if(pAt(t)){t=+t;var n=e.min,a=e.max,i=n!==void 0&&ta;if(!i)return t}return r!==void 0?r:e.dflt};p2.coerceColor=function(e,t,r){return vAt.isValid(t)?t:r!==void 0?r:e.dflt};p2.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};p2.getValue=function(e,t){var r;return W2e(e)?t{"use strict";var kA=xi(),gAt=ni(),CA=ea(),Y2e=Xt(),X2e=bi(),Z2e=kh().resizeText,EV=u1(),mAt=EV.textfont,yAt=EV.insidetextfont,xAt=EV.outsidetextfont,$f=KC();function _At(e){var t=kA.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");Z2e(e,t,"bar");var r=t.size(),n=e._fullLayout;t.style("opacity",function(a){return a[0].trace.opacity}).each(function(a){(n.barmode==="stack"&&r>1||n.bargap===0&&n.bargroupgap===0&&!a[0].trace.marker.line.width)&&kA.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(a){var i=kA.select(this),o=a[0].trace;$2e(i,o,e)}),X2e.getComponentMethod("errorbars","style")(t)}function $2e(e,t,r){CA.pointStyle(e.selectAll("path"),t,r),K2e(e,t,r)}function K2e(e,t,r){e.selectAll("text").each(function(n){var a=kA.select(this),i=Y2e.ensureUniformFontSize(r,J2e(a,n,t,r));CA.font(a,i)})}function bAt(e,t,r){var n=t[0].trace;n.selectedpoints?wAt(r,n,e):($2e(r,n,e),X2e.getComponentMethod("errorbars","style")(r))}function wAt(e,t,r){CA.selectedPointStyle(e.selectAll("path"),t),TAt(e.selectAll("text"),t,r)}function TAt(e,t,r){e.each(function(n){var a=kA.select(this),i;if(n.selected){i=Y2e.ensureUniformFontSize(r,J2e(a,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(i.color=o),CA.font(a,i)}else CA.selectedTextStyle(a,t)})}function J2e(e,t,r,n){var a=n._fullLayout.font,i=r.textfont;if(e.classed("bartext-inside")){var o=r_e(t,r);i=e_e(r,t.i,a,o)}else e.classed("bartext-outside")&&(i=t_e(r,t.i,a));return i}function Q2e(e,t,r){return kV(mAt,e.textfont,t,r)}function e_e(e,t,r,n){var a=Q2e(e,t,r),i=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[t]===void 0;return i&&(a={color:gAt.contrast(n),family:a.family,size:a.size,weight:a.weight,style:a.style,variant:a.variant,textcase:a.textcase,lineposition:a.lineposition,shadow:a.shadow}),kV(yAt,e.insidetextfont,t,a)}function t_e(e,t,r){var n=Q2e(e,t,r);return kV(xAt,e.outsidetextfont,t,n)}function kV(e,t,r,n){t=t||{};var a=$f.getValue(t.family,r),i=$f.getValue(t.size,r),o=$f.getValue(t.color,r),s=$f.getValue(t.weight,r),l=$f.getValue(t.style,r),u=$f.getValue(t.variant,r),c=$f.getValue(t.textcase,r),f=$f.getValue(t.lineposition,r),v=$f.getValue(t.shadow,r);return{family:$f.coerceString(e.family,a,n.family),size:$f.coerceNumber(e.size,i,n.size),color:$f.coerceColor(e.color,o,n.color),weight:$f.coerceString(e.weight,s,n.weight),style:$f.coerceString(e.style,l,n.style),variant:$f.coerceString(e.variant,u,n.variant),textcase:$f.coerceString(e.variant,c,n.textcase),lineposition:$f.coerceString(e.variant,f,n.lineposition),shadow:$f.coerceString(e.variant,v,n.shadow)}}function r_e(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}n_e.exports={style:_At,styleTextPoints:K2e,styleOnSelect:bAt,getInsideTextFont:e_e,getOutsideTextFont:t_e,getBarColor:r_e,resizeText:Z2e}});var m2=fe((V1r,f_e)=>{"use strict";var JC=xi(),QC=aa(),mf=Xt(),AAt=as(),MAt=ni(),Gm=ea(),SAt=bi(),e7=Yi().tickText,i_e=kh(),EAt=i_e.recordMinTextSize,kAt=i_e.clearMinTextSize,CV=_v(),R3=KC(),CAt=Im(),a_e=u1(),LAt=a_e.text,PAt=a_e.textposition,FAt=Sd().appendArrayPointValue,od=CAt.TEXTPAD;function DAt(e){return e.id}function RAt(e){if(e.ids)return DAt}function LV(e){return(e>0)-(e<0)}function xp(e,t){return e0}function zAt(e,t,r,n,a,i){var o=t.xaxis,s=t.yaxis,l=e._fullLayout,u=e._context.staticPlot;a||(a={mode:l.barmode,norm:l.barmode,gap:l.bargap,groupgap:l.bargroupgap},kAt("bar",l));var c=mf.makeTraceGroups(n,r,"trace bars").each(function(f){var v=JC.select(this),g=f[0].trace,p=f[0].t,x=g.type==="waterfall",_=g.type==="funnel",y=g.type==="histogram",C=g.type==="bar",k=C||_,S=0;x&&g.connector.visible&&g.connector.mode==="between"&&(S=g.connector.line.width/2);var L=g.orientation==="h",w=s_e(a),A=mf.ensureSingle(v,"g","points"),T=RAt(g),m=A.selectAll("g.point").data(mf.identity,T);m.enter().append("g").classed("point",!0),m.exit().remove(),m.each(function(E,I){var R=JC.select(this),B=IAt(E,o,s,L),O=B[0][0],V=B[0][1],j=B[1][0],q=B[1][1],U=(L?V-O:q-j)===0;U&&k&&R3.getLineWidth(g,E)&&(U=!1),U||(U=!QC(O)||!QC(V)||!QC(j)||!QC(q)),E.isBlank=U,U&&(L?V=O:q=j),S&&!U&&(L?(O-=xp(O,V)*S,V+=xp(O,V)*S):(j-=xp(j,q)*S,q+=xp(j,q)*S));var J,ee;if(g.type==="waterfall"){if(!U){var ce=g[E.dir].marker;J=ce.line.width,ee=ce.color}}else J=R3.getLineWidth(g,E),ee=E.mc||g.marker.color;function ye(Te){var Ve=JC.round(J/2%1,2);return a.gap===0&&a.groupgap===0?JC.round(Math.round(Te)-Ve,2):Te}function xe(Te,Ve,$e){return $e&&Te===Ve?Te:Math.abs(Te-Ve)>=2?ye(Te):Te>Ve?Math.ceil(Te):Math.floor(Te)}var ue=MAt.opacity(ee),K=ue<1||J>.01?ye:xe;e._context.staticPlot||(O=K(O,V,L),V=K(V,O,L),j=K(j,q,!L),q=K(q,j,!L));var _e=L?o.c2p:s.c2p,ne;E.s0>0?ne=E._sMax:E.s0<0?ne=E._sMin:ne=E.s1>0?E._sMax:E._sMin;function ae(Te,Ve){if(!Te)return 0;var $e=Math.abs(L?q-j:V-O),ot=Math.abs(L?V-O:q-j),tt=K(Math.abs(_e(ne,!0)-_e(0,!0))),nt=E.hasB?Math.min($e/2,ot/2):Math.min($e/2,tt),We;if(Ve==="%"){var mt=Math.min(50,Te);We=$e*(mt/100)}else We=Te;return K(Math.max(Math.min(We,nt),0))}var pe=C||y?ae(p.cornerradiusvalue,p.cornerradiusform):0,ie,le,me="M"+O+","+j+"V"+q+"H"+V+"V"+j+"Z",be=0;if(pe&&E.s){var De=LV(E.s0)===0||LV(E.s)===LV(E.s0)?E.s1:E.s0;if(be=K(E.hasB?0:Math.abs(_e(ne,!0)-_e(De,!0))),be0?Math.sqrt(be*(2*pe-be)):0,ct=Ge>0?Math.max:Math.min;ie="M"+O+","+j+"V"+(q-Oe*ht)+"H"+ct(V-(pe-be)*Ge,O)+"A "+pe+","+pe+" 0 0 "+it+" "+V+","+(q-pe*ht-ze)+"V"+(j+pe*ht+ze)+"A "+pe+","+pe+" 0 0 "+it+" "+ct(V-(pe-be)*Ge,O)+","+(j+Oe*ht)+"Z"}else if(E.hasB)ie="M"+(O+pe*Ge)+","+j+"A "+pe+","+pe+" 0 0 "+it+" "+O+","+(j+pe*ht)+"V"+(q-pe*ht)+"A "+pe+","+pe+" 0 0 "+it+" "+(O+pe*Ge)+","+q+"H"+(V-pe*Ge)+"A "+pe+","+pe+" 0 0 "+it+" "+V+","+(q-pe*ht)+"V"+(j+pe*ht)+"A "+pe+","+pe+" 0 0 "+it+" "+(V-pe*Ge)+","+j+"Z";else{le=Math.abs(q-j)+be;var et=le0?Math.sqrt(be*(2*pe-be)):0,we=ht>0?Math.max:Math.min;ie="M"+(O+et*Ge)+","+j+"V"+we(q-(pe-be)*ht,j)+"A "+pe+","+pe+" 0 0 "+it+" "+(O+pe*Ge-qe)+","+q+"H"+(V-pe*Ge+qe)+"A "+pe+","+pe+" 0 0 "+it+" "+(V-et*Ge)+","+we(q-(pe-be)*ht,j)+"V"+j+"Z"}}else ie=me}else ie=me;var Le=o_e(mf.ensureSingle(R,"path"),l,a,i);if(Le.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((V-O)*(q-j))||U&&e._context.staticPlot?"M0,0Z":ie).call(Gm.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&w){var Ke=Gm.makePointStyleFns(g);Gm.singlePointStyle(E,Le,g,Ke,e)}qAt(e,t,R,f,I,O,V,j,q,pe,be,a,i),t.layerClipId&&Gm.hideOutsideRangePoint(E,R.select("text"),o,s,g.xcalendar,g.ycalendar)});var F=g.cliponaxis===!1;Gm.setClipUrl(v,F?null:t.layerClipId,e)});SAt.getComponentMethod("errorbars","plot")(e,c,t,a)}function qAt(e,t,r,n,a,i,o,s,l,u,c,f,v){var g=t.xaxis,p=t.yaxis,x=e._fullLayout,_;function y(me,be,De){var Ge=mf.ensureSingle(me,"text").text(be).attr({class:"bartext bartext-"+_,"text-anchor":"middle","data-notex":1}).call(Gm.font,De).call(AAt.convertToTspans,e);return Ge}var C=n[0].trace,k=C.orientation==="h",S=VAt(n,k,g,p),L=NAt(x,n,a,g,p);_=UAt(C,a);var w=f.mode==="stack"||f.mode==="relative",A=n[a],T=!w||A._outmost,m=A.hasB,F=u&&u-c>od;if(!L||_==="none"||(A.isBlank||i===o||s===l)&&(_==="auto"||_==="inside")){r.select("text").remove();return}var E=x.font,I=CV.getBarColor(n[a],C),R=CV.getInsideTextFont(C,a,E,I),B=CV.getOutsideTextFont(C,a,E),O=C.insidetextanchor||"end",V=r.datum();k?g.type==="log"&&V.s0<=0&&(g.range[0]0&&xe>0,_e;F?m?_e=g2(U-2*u,J,ye,xe,k)||g2(U,J-2*u,ye,xe,k):k?_e=g2(U-(u-c),J,ye,xe,k)||g2(U,J-2*(u-c),ye,xe,k):_e=g2(U,J-(u-c),ye,xe,k)||g2(U-2*(u-c),J,ye,xe,k):_e=g2(U,J,ye,xe,k),K&&_e?_="inside":(_="outside",ee.remove(),ee=null)}else _="inside";if(!ee){ue=mf.ensureUniformFontSize(e,_==="outside"?B:R),ee=y(r,L,ue);var ne=ee.attr("transform");if(ee.attr("transform",""),ce=Gm.bBox(ee.node()),ye=ce.width,xe=ce.height,ee.attr("transform",ne),ye<=0||xe<=0){ee.remove();return}}var ae=C.textangle,pe,ie;_==="outside"?(ie=C.constraintext==="both"||C.constraintext==="outside",pe=OAt(i,o,s,l,ce,{isHorizontal:k,constrained:ie,angle:ae,zeroBarDir:S})):(ie=C.constraintext==="both"||C.constraintext==="inside",pe=c_e(i,o,s,l,ce,{isHorizontal:k,constrained:ie,angle:ae,anchor:O,hasB:m,r:u,overhead:c})),pe.fontSize=ue.size,EAt(C.type==="histogram"?"bar":C.type,pe,x),A.transform=pe;var le=o_e(ee,x,f,v);mf.setTransormAndDisplay(le,pe)}function g2(e,t,r,n,a){if(e<0||t<0)return!1;var i=r<=e&&n<=t,o=r<=t&&n<=e,s=a?e>=r*(t/n):t>=n*(e/r);return i||o||s}function l_e(e){return e==="auto"?0:e}function u_e(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),a=Math.abs(Math.cos(r));return{x:e.width*a+e.height*n,y:e.width*n+e.height*a}}function c_e(e,t,r,n,a,i){var o=!!i.isHorizontal,s=!!i.constrained,l=i.angle||0,u=i.anchor,c=u==="end",f=u==="start",v=i.leftToRight||0,g=(v+1)/2,p=1-g,x=i.hasB,_=i.r,y=i.overhead,C=a.width,k=a.height,S=Math.abs(t-e),L=Math.abs(n-r),w=S>2*od&&L>2*od?od:0;S-=2*w,L-=2*w;var A=l_e(l);l==="auto"&&!(C<=S&&k<=L)&&(C>S||k>L)&&(!(C>L||k>S)||Cod){var E=BAt(e,t,r,n,T,_,y,o,x);m=E.scale,F=E.pad}else m=1,s&&(m=Math.min(1,S/T.x,L/T.y)),F=0;var I=a.left*p+a.right*g,R=(a.top+a.bottom)/2,B=(e+od)*p+(t-od)*g,O=(r+n)/2,V=0,j=0;if(f||c){var q=(o?T.x:T.y)/2;_&&(c||x)&&(w+=F);var U=o?xp(e,t):xp(r,n);o?f?(B=e+U*w,V=-U*q):(B=t-U*w,V=U*q):f?(O=r+U*w,j=-U*q):(O=n-U*w,j=U*q)}return{textX:I,textY:R,targetX:B,targetY:O,anchorX:V,anchorY:j,scale:m,rotate:A}}function BAt(e,t,r,n,a,i,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*od),c=Math.max(0,Math.abs(n-r)-2*od),f=i-od,v=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,g=l?f*2:s?f-o:2*v,p=l?f*2:s?2*v:f-o,x,_,y,C,k;return a.y/a.x>=c/(u-g)?C=c/a.y:a.y/a.x<=(c-p)/u?C=u/a.x:!l&&s?(x=a.x*a.x+a.y*a.y/4,_=-2*a.x*(u-f)-a.y*(c/2-f),y=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,C=(-_+Math.sqrt(_*_-4*x*y))/(2*x)):l?(x=(a.x*a.x+a.y*a.y)/4,_=-a.x*(u/2-f)-a.y*(c/2-f),y=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,C=(-_+Math.sqrt(_*_-4*x*y))/(2*x)):(x=a.x*a.x/4+a.y*a.y,_=-a.x*(u/2-f)-2*a.y*(c-f),y=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,C=(-_+Math.sqrt(_*_-4*x*y))/(2*x)),C=Math.min(1,C),s?k=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-a.y*C)/2)*(f-(c-a.y*C)/2)))-o):k=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-a.x*C)/2)*(f-(u-a.x*C)/2)))-o),{scale:C,pad:k}}function OAt(e,t,r,n,a,i){var o=!!i.isHorizontal,s=!!i.constrained,l=i.angle||0,u=a.width,c=a.height,f=Math.abs(t-e),v=Math.abs(n-r),g;o?g=v>2*od?od:0:g=f>2*od?od:0;var p=1;s&&(p=o?Math.min(1,v/c):Math.min(1,f/u));var x=l_e(l),_=u_e(a,x),y=(o?_.x:_.y)/2,C=(a.left+a.right)/2,k=(a.top+a.bottom)/2,S=(e+t)/2,L=(r+n)/2,w=0,A=0,T;return(o?e===t:r===n)&&i.zeroBarDir?T=i.zeroBarDir:T=o?xp(t,e):xp(r,n),o?(S=t-T*g,w=T*y):(L=n+T*g,A=-T*y),{textX:C,textY:k,targetX:S,targetY:L,anchorX:w,anchorY:A,scale:p,rotate:x}}function NAt(e,t,r,n,a){var i=t[0].trace,o=i.texttemplate,s;return o?s=GAt(e,t,r,n,a):i.textinfo?s=HAt(t,r,n,a):s=R3.getValue(i.text,r),R3.coerceString(LAt,s)}function UAt(e,t){var r=R3.getValue(e.textposition,t);return R3.coerceEnumerated(PAt,r)}function VAt(e,t,r,n){for(var a=!1,i=!1,o=0;o0?a=!0:s<0&&(i=!0),a&&i)return 0}var l=t?r:n,u=-xp(l.range[0],l.range[1]);return i?a?0:-u:u}function GAt(e,t,r,n,a){var i=t[0].trace,o=mf.castOption(i,r,"texttemplate");if(!o)return"";var s=i.type==="histogram",l=i.type==="waterfall",u=i.type==="funnel",c=i.orientation==="h",f,v,g,p;c?(f="y",v=a,g="x",p=n):(f="x",v=n,g="y",p=a);function x(w){return e7(v,v.c2l(w),!0).text}function _(w){return e7(p,p.c2l(w),!0).text}var y=t[r],C={};C.label=y.p,C.labelLabel=C[f+"Label"]=x(y.p);var k=mf.castOption(i,y.i,"text");(k===0||k)&&(C.text=k),C.value=y.s,C.valueLabel=C[g+"Label"]=_(y.s);var S={};FAt(S,i,y.i),(s||S.x===void 0)&&(S.x=c?C.value:C.label),(s||S.y===void 0)&&(S.y=c?C.label:C.value),(s||S.xLabel===void 0)&&(S.xLabel=c?C.valueLabel:C.labelLabel),(s||S.yLabel===void 0)&&(S.yLabel=c?C.labelLabel:C.valueLabel),l&&(C.delta=+y.rawS||y.s,C.deltaLabel=_(C.delta),C.final=y.v,C.finalLabel=_(C.final),C.initial=C.final-C.delta,C.initialLabel=_(C.initial)),u&&(C.value=y.s,C.valueLabel=_(C.value),C.percentInitial=y.begR,C.percentInitialLabel=mf.formatPercent(y.begR),C.percentPrevious=y.difR,C.percentPreviousLabel=mf.formatPercent(y.difR),C.percentTotal=y.sumR,C.percenTotalLabel=mf.formatPercent(y.sumR));var L=mf.castOption(i,y.i,"customdata");return L&&(C.customdata=L),mf.texttemplateString({data:[S,C,i._meta],fallback:i.texttemplatefallback,labels:C,locale:e._d3locale,template:o})}function HAt(e,t,r,n){var a=e[0].trace,i=a.orientation==="h",o=a.type==="waterfall",s=a.type==="funnel";function l(L){var w=i?n:r;return e7(w,L,!0).text}function u(L){var w=i?r:n;return e7(w,+L,!0).text}var c=a.textinfo,f=e[t],v=c.split("+"),g=[],p,x=function(L){return v.indexOf(L)!==-1};if(x("label")&&g.push(l(e[t].p)),x("text")&&(p=mf.castOption(a,f.i,"text"),(p===0||p)&&g.push(p)),o){var _=+f.rawS||f.s,y=f.v,C=y-_;x("initial")&&g.push(u(C)),x("delta")&&g.push(u(_)),x("final")&&g.push(u(y))}if(s){x("value")&&g.push(u(f.s));var k=0;x("percent initial")&&k++,x("percent previous")&&k++,x("percent total")&&k++;var S=k>1;x("percent initial")&&(p=mf.formatPercent(f.begR),S&&(p+=" of initial"),g.push(p)),x("percent previous")&&(p=mf.formatPercent(f.difR),S&&(p+=" of previous"),g.push(p)),x("percent total")&&(p=mf.formatPercent(f.sumR),S&&(p+=" of total"),g.push(p))}return g.join("
")}f_e.exports={plot:zAt,toMoveInsideBar:c_e}});var I3=fe((G1r,p_e)=>{"use strict";var LA=kl(),jAt=bi(),h_e=ni(),WAt=Xt().fillText,YAt=KC().getLineWidth,PV=Yi().hoverLabelText,XAt=Wa().BADNUM;function ZAt(e,t,r,n,a){var i=d_e(e,t,r,n,a);if(i){var o=i.cd,s=o[0].trace,l=o[i.index];return i.color=v_e(s,l),jAt.getComponentMethod("errorbars","hoverInfo")(l,s,i),[i]}}function d_e(e,t,r,n,a){var i=e.cd,o=i[0].trace,s=i[0].t,l=n==="closest",u=o.type==="waterfall",c=e.maxHoverDistance,f=e.maxSpikeDistance,v,g,p,x,_,y,C;o.orientation==="h"?(v=r,g=t,p="y",x="x",_=O,y=I):(v=t,g=r,p="x",x="y",y=O,_=I);var k=o[p+"period"],S=l||k;function L(K){return A(K,-1)}function w(K){return A(K,1)}function A(K,_e){var ne=K.w;return K[p]+_e*ne/2}function T(K){return K[p+"End"]-K[p+"Start"]}var m=l?L:k?function(K){return K.p-T(K)/2}:function(K){return Math.min(L(K),K.p-s.bardelta/2)},F=l?w:k?function(K){return K.p+T(K)/2}:function(K){return Math.max(w(K),K.p+s.bardelta/2)};function E(K,_e,ne){return a.finiteRange&&(ne=0),LA.inbox(K-v,_e-v,ne+Math.min(1,Math.abs(_e-K)/C)-1)}function I(K){return E(m(K),F(K),c)}function R(K){return E(L(K),w(K),f)}function B(K){var _e=K[x];if(u){var ne=Math.abs(K.rawS)||0;g>0?_e+=ne:g<0&&(_e-=ne)}return _e}function O(K){var _e=g,ne=K.b,ae=B(K);return LA.inbox(ne-_e,ae-_e,c+(ae-_e)/(ae-ne)-1)}function V(K){var _e=g,ne=K.b,ae=B(K);return LA.inbox(ne-_e,ae-_e,f+(ae-_e)/(ae-ne)-1)}var j=e[p+"a"],q=e[x+"a"];C=Math.abs(j.r2c(j.range[1])-j.r2c(j.range[0]));function U(K){return(_(K)+y(K))/2}var J=LA.getDistanceFunction(n,_,y,U);if(LA.getClosest(i,J,e),e.index!==!1&&i[e.index].p!==XAt){S||(m=function(K){return Math.min(L(K),K.p-s.bargroupwidth/2)},F=function(K){return Math.max(w(K),K.p+s.bargroupwidth/2)});var ee=e.index,ce=i[ee],ye=o.base?ce.b+ce.s:ce.s;e[x+"0"]=e[x+"1"]=q.c2p(ce[x],!0),e[x+"LabelVal"]=ye;var xe=s.extents[s.extents.round(ce.p)];e[p+"0"]=j.c2p(l?m(ce):xe[0],!0),e[p+"1"]=j.c2p(l?F(ce):xe[1],!0);var ue=ce.orig_p!==void 0;return e[p+"LabelVal"]=ue?ce.orig_p:ce.p,e.labelLabel=PV(j,e[p+"LabelVal"],o[p+"hoverformat"]),e.valueLabel=PV(q,e[x+"LabelVal"],o[x+"hoverformat"]),e.baseLabel=PV(q,ce.b,o[x+"hoverformat"]),e.spikeDistance=(V(ce)+R(ce))/2,e[p+"Spike"]=j.c2p(ce.p,!0),WAt(ce,o,e),e.hovertemplate=o.hovertemplate,e}}function v_e(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,a=YAt(e,t);if(h_e.opacity(r))return r;if(h_e.opacity(n)&&a)return n}p_e.exports={hoverPoints:ZAt,hoverOnBars:d_e,getTraceColor:v_e}});var m_e=fe((H1r,g_e)=>{"use strict";g_e.exports=function(t,r,n){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),n.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}});var z3=fe((j1r,y_e)=>{"use strict";y_e.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=n[0].trace,s=o.type==="funnel",l=o.orientation==="h",u=[],c;if(r===!1)for(c=0;c{"use strict";x_e.exports={attributes:u1(),layoutAttributes:XC(),supplyDefaults:z0().supplyDefaults,crossTraceDefaults:z0().crossTraceDefaults,supplyLayoutDefaults:SV(),calc:G2e(),crossTraceCalc:i2().crossTraceCalc,colorbar:Zf(),arraysToCalcdata:EA(),plot:m2().plot,style:_v().style,styleOnSelect:_v().styleOnSelect,hoverPoints:I3().hoverPoints,eventData:m_e(),selectPoints:z3(),moduleType:"trace",name:"bar",basePlotModule:gu(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var w_e=fe((Y1r,b_e)=>{"use strict";b_e.exports=__e()});var PA=fe((X1r,S_e)=>{"use strict";var KAt=n1(),bv=Ol(),T_e=u1(),JAt=tc(),A_e=pl().axisHoverFormat,{hovertemplateAttrs:QAt,templatefallbackAttrs:e6t}=Oo(),fg=ta().extendFlat,q3=bv.marker,M_e=q3.line;S_e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:bv.xperiod,yperiod:bv.yperiod,xperiod0:bv.xperiod0,yperiod0:bv.yperiod0,xperiodalignment:bv.xperiodalignment,yperiodalignment:bv.yperiodalignment,xhoverformat:A_e("x"),yhoverformat:A_e("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:fg({},q3.symbol,{arrayOk:!1,editType:"plot"}),opacity:fg({},q3.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:fg({},q3.angle,{arrayOk:!1,editType:"calc"}),size:fg({},q3.size,{arrayOk:!1,editType:"calc"}),color:fg({},q3.color,{arrayOk:!1,editType:"style"}),line:{color:fg({},M_e.color,{arrayOk:!1,dflt:JAt.defaultLine,editType:"style"}),width:fg({},M_e.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:KAt(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:T_e.offsetgroup,alignmentgroup:T_e.alignmentgroup,selected:{marker:bv.selected.marker,editType:"style"},unselected:{marker:bv.unselected.marker,editType:"style"},text:fg({},bv.text,{}),hovertext:fg({},bv.hovertext,{}),hovertemplate:QAt({}),hovertemplatefallback:e6t(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:bv.zorder}});var FA=fe((Z1r,E_e)=>{"use strict";E_e.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}});var RA=fe(($1r,P_e)=>{"use strict";var wv=Xt(),t6t=bi(),r6t=ni(),n6t=sp(),i6t=n2(),k_e=Yb(),DA=PA();function a6t(e,t,r,n){function a(p,x){return wv.coerce(e,t,DA,p,x)}if(C_e(e,t,a,n),t.visible!==!1){n6t(e,t,n,a),a("xhoverformat"),a("yhoverformat");var i=t._hasPreCompStats;i&&(a("lowerfence"),a("upperfence")),a("line.color",(e.marker||{}).color||r),a("line.width"),a("fillcolor",r6t.addOpacity(t.line.color,.5));var o=!1;if(i){var s=a("mean"),l=a("sd");s&&s.length&&(o=!0,l&&l.length&&(o="sd"))}a("whiskerwidth");var u=a("sizemode"),c;u==="quartiles"&&(c=a("boxmean",o)),a("showwhiskers",u==="quartiles"),(u==="sd"||c==="sd")&&a("sdmultiple"),a("width"),a("quartilemethod");var f=!1;if(i){var v=a("notchspan");v&&v.length&&(f=!0)}else wv.validate(e.notchwidth,DA.notchwidth)&&(f=!0);var g=a("notched",f);g&&a("notchwidth"),L_e(e,t,a,{prefix:"box"}),a("zorder")}}function C_e(e,t,r,n){function a(F){var E=0;return F&&F.length&&(E+=1,wv.isArrayOrTypedArray(F[0])&&F[0].length&&(E+=1)),E}function i(F){return wv.validate(e[F],DA[F])}var o=r("y"),s=r("x"),l;if(t.type==="box"){var u=r("q1"),c=r("median"),f=r("q3");t._hasPreCompStats=u&&u.length&&c&&c.length&&f&&f.length,l=Math.min(wv.minRowLength(u),wv.minRowLength(c),wv.minRowLength(f))}else t._hasPreCompStats=!1;var v=a(o),g=a(s),p=v&&wv.minRowLength(o),x=g&&wv.minRowLength(s),_=n.calendar,y={autotypenumbers:n.autotypenumbers},C,k;if(t._hasPreCompStats)switch(String(g)+String(v)){case"00":var S=i("x0")||i("dx"),L=i("y0")||i("dy");L&&!S?C="h":C="v",k=l;break;case"10":C="v",k=Math.min(l,x);break;case"20":C="h",k=Math.min(l,s.length);break;case"01":C="h",k=Math.min(l,p);break;case"02":C="v",k=Math.min(l,o.length);break;case"12":C="v",k=Math.min(l,x,o.length);break;case"21":C="h",k=Math.min(l,s.length,p);break;case"11":k=0;break;case"22":var w=!1,A;for(A=0;A0?(C="v",g>0?k=Math.min(x,p):k=Math.min(p)):g>0?(C="h",k=Math.min(x)):k=0;if(!k){t.visible=!1;return}t._length=k;var T=r("orientation",C);t._hasPreCompStats?T==="v"&&g===0?(r("x0",0),r("dx",1)):T==="h"&&v===0&&(r("y0",0),r("dy",1)):T==="v"&&g===0?r("x0"):T==="h"&&v===0&&r("y0");var m=t6t.getComponentMethod("calendars","handleTraceDefaults");m(e,t,["x","y"],n)}function L_e(e,t,r,n){var a=n.prefix,i=wv.coerce2(e,t,DA,"marker.outliercolor"),o=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(i||o)&&(s="suspectedoutliers");var l=r(a+"points",s);l?(r("jitter",l==="all"?.3:0),r("pointpos",l==="all"?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),l==="suspectedoutliers"&&(r("marker.line.outliercolor",t.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete t.marker;var u=r("hoveron");(u==="all"||u.indexOf("points")!==-1)&&(r("hovertemplate"),r("hovertemplatefallback")),wv.coerceSelectionMarkerOpacity(t,r)}function o6t(e,t){var r,n;function a(l){return wv.coerce(n._input,n,DA,l)}for(var i=0;i{"use strict";var s6t=bi(),l6t=Xt(),u6t=FA();function F_e(e,t,r,n,a){for(var i=a+"Layout",o=!1,s=0;s{"use strict";var DV=aa(),r7=Yi(),f6t=cp(),qu=Xt(),q0=Wa().BADNUM,hg=qu._;V_e.exports=function(t,r){var n=t._fullLayout,a=r7.getFromId(t,r.xaxis||"x"),i=r7.getFromId(t,r.yaxis||"y"),o=[],s=r.type==="violin"?"_numViolins":"_numBoxes",l,u,c,f,v,g,p;r.orientation==="h"?(c=a,f="x",v=i,g="y",p=!!r.yperiodalignment):(c=i,f="y",v=a,g="x",p=!!r.xperiodalignment);var x=h6t(r,g,v,n[s]),_=x[0],y=x[1],C=qu.distinctVals(_,v),k=C.vals,S=C.minDiff/2,L,w,A,T,m,F,E=(r.boxpoints||r.points)==="all"?qu.identity:function(it){return it.vL.uf};if(r._hasPreCompStats){var I=r[f],R=function(it){return c.d2c((r[it]||[])[l])},B=1/0,O=-1/0;for(l=0;l=L.q1&&L.q3>=L.med){var j=R("lowerfence");L.lf=j!==q0&&j<=L.q1?j:q_e(L,A,T);var q=R("upperfence");L.uf=q!==q0&&q>=L.q3?q:B_e(L,A,T);var U=R("mean");L.mean=U!==q0?U:T?qu.mean(A,T):(L.q1+L.q3)/2;var J=R("sd");L.sd=U!==q0&&J>=0?J:T?qu.stdev(A,T,L.mean):L.q3-L.q1,L.lo=O_e(L),L.uo=N_e(L);var ee=R("notchspan");ee=ee!==q0&&ee>0?ee:U_e(L,T),L.ln=L.med-ee,L.un=L.med+ee;var ce=L.lf,ye=L.uf;r.boxpoints&&A.length&&(ce=Math.min(ce,A[0]),ye=Math.max(ye,A[T-1])),r.notched&&(ce=Math.min(ce,L.ln),ye=Math.max(ye,L.un)),L.min=ce,L.max=ye}else{qu.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+L.q1,"median = "+L.med,"q3 = "+L.q3].join(` -`));var xe;L.med!==q0?xe=L.med:L.q1!==q0?L.q3!==q0?xe=(L.q1+L.q3)/2:xe=L.q1:L.q3!==q0?xe=L.q3:xe=0,L.med=xe,L.q1=L.q3=xe,L.lf=L.uf=xe,L.mean=L.sd=xe,L.ln=L.un=xe,L.min=L.max=xe}B=Math.min(B,L.min),O=Math.max(O,L.max),L.pts2=w.filter(E),o.push(L)}}r._extremes[c._id]=r7.findExtremes(c,[B,O],{padded:!0})}else{var ue=c.makeCalcdata(r,f),K=d6t(k,S),_e=k.length,ne=v6t(_e);for(l=0;l=0&&ae<_e&&(m={v:F,i:l},R_e(m,r,l),ne[ae].push(m))}var pe=1/0,ie=-1/0,le=r.quartilemethod,me=le==="exclusive",be=le==="inclusive";for(l=0;l<_e;l++)if(ne[l].length>0){if(L={},L.pos=L[g]=k[l],w=L.pts=ne[l].sort(I_e),A=L[f]=w.map(z_e),T=A.length,L.min=A[0],L.max=A[T-1],L.mean=qu.mean(A,T),L.sd=qu.stdev(A,T,L.mean)*r.sdmultiple,L.med=qu.interp(A,.5),T%2&&(me||be)){var De,Ge;me?(De=A.slice(0,T/2),Ge=A.slice(T/2+1)):be&&(De=A.slice(0,T/2+1),Ge=A.slice(T/2)),L.q1=qu.interp(De,.5),L.q3=qu.interp(Ge,.5)}else L.q1=qu.interp(A,.25),L.q3=qu.interp(A,.75);L.lf=q_e(L,A,T),L.uf=B_e(L,A,T),L.lo=O_e(L),L.uo=N_e(L);var ht=U_e(L,T);L.ln=L.med-ht,L.un=L.med+ht,pe=Math.min(pe,L.ln),ie=Math.max(ie,L.un),L.pts2=w.filter(E),o.push(L)}r.notched&&qu.isTypedArray(ue)&&(ue=Array.from(ue)),r._extremes[c._id]=r7.findExtremes(c,r.notched?ue.concat([pe,ie]):ue,{padded:!0})}return p6t(o,r),o.length>0?(o[0].t={num:n[s],dPos:S,posLetter:g,valLetter:f,labels:{med:hg(t,"median:"),min:hg(t,"min:"),q1:hg(t,"q1:"),q3:hg(t,"q3:"),max:hg(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?hg(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):hg(t,"mean:"),lf:hg(t,"lower fence:"),uf:hg(t,"upper fence:")}},n[s]++,o):[{t:{empty:!0}}]};function h6t(e,t,r,n){var a=t in e,i=t+"0"in e,o="d"+t in e;if(a||i&&o){var s=r.makeCalcdata(e,t),l=f6t(e,r,t,s).vals;return[l,s]}var u;i?u=e[t+"0"]:"name"in e&&(r.type==="category"||DV(e.name)&&["linear","log"].indexOf(r.type)!==-1||qu.isDateTime(e.name)&&r.type==="date")?u=e.name:u=n;for(var c=r.type==="multicategory"?r.r2c_just_indices(u):r.d2c(u,0,e[t+"calendar"]),f=e._length,v=new Array(f),g=0;g{"use strict";var G_e=Yi(),g6t=Xt(),m6t=Jx().getAxisGroup,H_e=["v","h"];function y6t(e,t){for(var r=e.calcdata,n=t.xaxis,a=t.yaxis,i=0;i1,C=1-i[e+"gap"],k=1-i[e+"groupgap"];for(l=0;l0;if(A==="positive"?(q=T*(w?1:.5),ee=J,U=ee=F):A==="negative"?(q=ee=F,U=T*(w?1:.5),ce=J):(q=U=T,ee=ce=J),ne){var ae=S.pointpos,pe=S.jitter,ie=S.marker.size/2,le=0;ae+pe>=0&&(le=J*(ae+pe),le>q?(_e=!0,ue=ie,ye=le):le>ee&&(ue=ie,ye=q)),le<=q&&(ye=q);var me=0;ae-pe<=0&&(me=-J*(ae-pe),me>U?(_e=!0,K=ie,xe=me):me>ce&&(K=ie,xe=U)),me<=U&&(xe=U)}else ye=q,xe=U;var be=new Array(c.length);for(u=0;u{"use strict";var B3=xi(),y2=Xt(),x6t=ea(),Y_e=5,_6t=.01;function b6t(e,t,r,n){var a=e._context.staticPlot,i=t.xaxis,o=t.yaxis;y2.makeTraceGroups(n,r,"trace boxes").each(function(s){var l=B3.select(this),u=s[0],c=u.t,f=u.trace;if(c.wdPos=c.bdPos*f.whiskerwidth,f.visible!==!0||c.empty){l.remove();return}var v,g;f.orientation==="h"?(v=o,g=i):(v=i,g=o),X_e(l,{pos:v,val:g},f,c,a),Z_e(l,{x:i,y:o},f,c),$_e(l,{pos:v,val:g},f,c)})}function X_e(e,t,r,n,a){var i=r.orientation==="h",o=t.val,s=t.pos,l=!!s.rangebreaks,u=n.bPos,c=n.wdPos||0,f=n.bPosPxOffset||0,v=r.whiskerwidth||0,g=r.showwhiskers!==!1,p=r.notched||!1,x=p?1-2*r.notchwidth:1,_,y;Array.isArray(n.bdPos)?(_=n.bdPos[0],y=n.bdPos[1]):(_=n.bdPos,y=n.bdPos);var C=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?y2.identity:[]);C.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","box"),C.exit().remove(),C.each(function(k){if(k.empty)return B3.select(this).attr("d","M0,0Z");var S=s.c2l(k.pos+u,!0),L=s.l2p(S-_)+f,w=s.l2p(S+y)+f,A=l?(L+w)/2:s.l2p(S)+f,T=r.whiskerwidth,m=l?L*T+(1-T)*A:s.l2p(S-c)+f,F=l?w*T+(1-T)*A:s.l2p(S+c)+f,E=s.l2p(S-_*x)+f,I=s.l2p(S+y*x)+f,R=r.sizemode==="sd",B=o.c2p(R?k.mean-k.sd:k.q1,!0),O=R?o.c2p(k.mean+k.sd,!0):o.c2p(k.q3,!0),V=y2.constrain(R?o.c2p(k.mean,!0):o.c2p(k.med,!0),Math.min(B,O)+1,Math.max(B,O)-1),j=k.lf===void 0||r.boxpoints===!1||R,q=o.c2p(j?k.min:k.lf,!0),U=o.c2p(j?k.max:k.uf,!0),J=o.c2p(k.ln,!0),ee=o.c2p(k.un,!0);i?B3.select(this).attr("d","M"+V+","+E+"V"+I+"M"+B+","+L+"V"+w+(p?"H"+J+"L"+V+","+I+"L"+ee+","+w:"")+"H"+O+"V"+L+(p?"H"+ee+"L"+V+","+E+"L"+J+","+L:"")+"Z"+(g?"M"+B+","+A+"H"+q+"M"+O+","+A+"H"+U+(v===0?"":"M"+q+","+m+"V"+F+"M"+U+","+m+"V"+F):"")):B3.select(this).attr("d","M"+E+","+V+"H"+I+"M"+L+","+B+"H"+w+(p?"V"+J+"L"+I+","+V+"L"+w+","+ee:"")+"V"+O+"H"+L+(p?"V"+ee+"L"+E+","+V+"L"+L+","+J:"")+"Z"+(g?"M"+A+","+B+"V"+q+"M"+A+","+O+"V"+U+(v===0?"":"M"+m+","+q+"H"+F+"M"+m+","+U+"H"+F):""))})}function Z_e(e,t,r,n){var a=t.x,i=t.y,o=n.bdPos,s=n.bPos,l=r.boxpoints||r.points;y2.seedPseudoRandom();var u=function(v){return v.forEach(function(g){g.t=n,g.trace=r}),v},c=e.selectAll("g.points").data(l?u:[]);c.enter().append("g").attr("class","points"),c.exit().remove();var f=c.selectAll("path").data(function(v){var g,p=v.pts2,x=Math.max((v.max-v.min)/10,v.q3-v.q1),_=x*1e-9,y=x*_6t,C=[],k=0,S;if(r.jitter){if(x===0)for(k=1,C=new Array(p.length),g=0;gv.lo&&(F.so=!0)}return p});f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(x6t.translatePoints,a,i)}function $_e(e,t,r,n){var a=t.val,i=t.pos,o=!!i.rangebreaks,s=n.bPos,l=n.bPosPxOffset||0,u=r.boxmean||(r.meanline||{}).visible,c,f;Array.isArray(n.bdPos)?(c=n.bdPos[0],f=n.bdPos[1]):(c=n.bdPos,f=n.bdPos);var v=e.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?y2.identity:[]);v.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),v.exit().remove(),v.each(function(g){var p=i.c2l(g.pos+s,!0),x=i.l2p(p-c)+l,_=i.l2p(p+f)+l,y=o?(x+_)/2:i.l2p(p)+l,C=a.c2p(g.mean,!0),k=a.c2p(g.mean-g.sd,!0),S=a.c2p(g.mean+g.sd,!0);r.orientation==="h"?B3.select(this).attr("d","M"+C+","+x+"V"+_+(u==="sd"?"m0,0L"+k+","+y+"L"+C+","+x+"L"+S+","+y+"Z":"")):B3.select(this).attr("d","M"+x+","+C+"H"+_+(u==="sd"?"m0,0L"+y+","+k+"L"+x+","+C+"L"+y+","+S+"Z":""))})}K_e.exports={plot:b6t,plotBoxAndWhiskers:X_e,plotPoints:Z_e,plotBoxMean:$_e}});var a7=fe((tgr,J_e)=>{"use strict";var IV=xi(),zV=ni(),qV=ea();function w6t(e,t,r){var n=r||IV.select(e).selectAll("g.trace.boxes");n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var i=IV.select(this),o=a[0].trace,s=o.line.width;function l(f,v,g,p){f.style("stroke-width",v+"px").call(zV.stroke,g).call(zV.fill,p)}var u=i.selectAll("path.box");if(o.type==="candlestick")u.each(function(f){if(!f.empty){var v=IV.select(this),g=o[f.dir];l(v,g.line.width,g.line.color,g.fillcolor),v.style("opacity",o.selectedpoints&&!f.selected?.3:1)}});else{l(u,s,o.line.color,o.fillcolor),i.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(zV.stroke,o.line.color);var c=i.selectAll("path.point");qV.pointStyle(c,o,e)}})}function T6t(e,t,r){var n=t[0].trace,a=r.selectAll("path.point");n.selectedpoints?qV.selectedPointStyle(a,n):qV.pointStyle(a,n,e)}J_e.exports={style:w6t,styleOnSelect:T6t}});var OV=fe((rgr,rbe)=>{"use strict";var A6t=Yi(),BV=Xt(),Hm=kl(),Q_e=ni(),M6t=BV.fillText;function S6t(e,t,r,n){var a=e.cd,i=a[0].trace,o=i.hoveron,s=[],l;return o.indexOf("boxes")!==-1&&(s=s.concat(ebe(e,t,r,n))),o.indexOf("points")!==-1&&(l=tbe(e,t,r)),n==="closest"?l?[l]:s:(l&&s.push(l),s)}function ebe(e,t,r,n){var a=e.cd,i=e.xa,o=e.ya,s=a[0].trace,l=a[0].t,u=s.type==="violin",c,f,v,g,p,x,_,y,C,k,S,L=l.bdPos,w,A,T=l.wHover,m=function(ie){return v.c2l(ie.pos)+l.bPos-v.c2l(x)};u&&s.side!=="both"?(s.side==="positive"&&(C=function(ie){var le=m(ie);return Hm.inbox(le,le+T,k)},w=L,A=0),s.side==="negative"&&(C=function(ie){var le=m(ie);return Hm.inbox(le-T,le,k)},w=0,A=L)):(C=function(ie){var le=m(ie);return Hm.inbox(le-T,le+T,k)},w=A=L);var F;u?F=function(ie){return Hm.inbox(ie.span[0]-p,ie.span[1]-p,k)}:F=function(ie){return Hm.inbox(ie.min-p,ie.max-p,k)},s.orientation==="h"?(p=t,x=r,_=F,y=C,c="y",v=o,f="x",g=i):(p=r,x=t,_=C,y=F,c="x",v=i,f="y",g=o);var E=Math.min(1,L/Math.abs(v.r2c(v.range[1])-v.r2c(v.range[0])));k=e.maxHoverDistance-E,S=e.maxSpikeDistance-E;function I(ie){return(_(ie)+y(ie))/2}var R=Hm.getDistanceFunction(n,_,y,I);if(Hm.getClosest(a,R,e),e.index===!1)return[];var B=a[e.index],O=s.line.color,V=(s.marker||{}).color;Q_e.opacity(O)&&s.line.width?e.color=O:Q_e.opacity(V)&&s.boxpoints?e.color=V:e.color=s.fillcolor,e[c+"0"]=v.c2p(B.pos+l.bPos-A,!0),e[c+"1"]=v.c2p(B.pos+l.bPos+w,!0),e[c+"LabelVal"]=B.orig_p!==void 0?B.orig_p:B.pos;var j=c+"Spike";e.spikeDistance=I(B)*S/k,e[j]=v.c2p(B.pos,!0);var q=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,U=s.boxpoints||s.points,J=U&&q?["max","uf","q3","med","mean","q1","lf","min"]:U&&!q?["max","uf","q3","med","q1","lf","min"]:!U&&q?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],ee=g.range[1]{"use strict";nbe.exports=function(t,r){return r.hoverOnBox&&(t.hoverOnBox=r.hoverOnBox),"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var NV=fe((igr,abe)=>{"use strict";abe.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s,l;if(r===!1)for(s=0;s{"use strict";obe.exports={attributes:PA(),layoutAttributes:FA(),supplyDefaults:RA().supplyDefaults,crossTraceDefaults:RA().crossTraceDefaults,supplyLayoutDefaults:t7().supplyLayoutDefaults,calc:RV(),crossTraceCalc:n7().crossTraceCalc,plot:i7().plot,style:a7().style,styleOnSelect:a7().styleOnSelect,hoverPoints:OV().hoverPoints,eventData:ibe(),selectPoints:NV(),moduleType:"trace",name:"box",basePlotModule:gu(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var ube=fe((ogr,lbe)=>{"use strict";lbe.exports=sbe()});var O3=fe((sgr,fbe)=>{"use strict";var E6t=_s(),{extendFlat:a0}=ta(),k6t=Ho(),{axisHoverFormat:UV}=pl(),C6t=Ds(),{hovertemplateAttrs:L6t,templatefallbackAttrs:cbe,texttemplateAttrs:P6t}=Oo(),B0=Ol();fbe.exports=a0({z:{valType:"data_array",editType:"calc"},x:a0({},B0.x,{impliedEdits:{xtype:"array"}}),x0:a0({},B0.x0,{impliedEdits:{xtype:"scaled"}}),dx:a0({},B0.dx,{impliedEdits:{xtype:"scaled"}}),y:a0({},B0.y,{impliedEdits:{ytype:"array"}}),y0:a0({},B0.y0,{impliedEdits:{ytype:"scaled"}}),dy:a0({},B0.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:a0({},B0.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:a0({},B0.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:a0({},B0.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:a0({},B0.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:a0({},B0.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:a0({},B0.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:UV("x"),yhoverformat:UV("y"),zhoverformat:UV("z",1),hovertemplate:L6t(),hovertemplatefallback:cbe(),texttemplate:P6t({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:cbe({editType:"plot"}),textfont:C6t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:a0({},k6t.showlegend,{dflt:!1}),zorder:B0.zorder},E6t("",{cLetter:"z",autoColorDflt:!1}))});var s7=fe((lgr,dbe)=>{"use strict";var F6t=aa(),o7=Xt(),D6t=bi();dbe.exports=function(t,r,n,a,i,o){var s=n("z");i=i||"x",o=o||"y";var l,u;if(s===void 0||!s.length)return 0;if(o7.isArray1D(s)){l=n(i),u=n(o);var c=o7.minRowLength(l),f=o7.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=hbe(i,n),u=hbe(o,n),!R6t(s))return 0;n("transpose"),r._length=null}var v=D6t.getComponentMethod("calendars","handleTraceDefaults");return v(t,r,[i,o],a),!0};function hbe(e,t){var r=t(e),n=r?t(e+"type","array"):"scaled";return n==="scaled"&&(t(e+"0"),t("d"+e)),r}function R6t(e){for(var t=!0,r=!1,n=!1,a,i=0;i0&&(r=!0);for(var o=0;o{"use strict";var vbe=Xt();pbe.exports=function(t,r){t("texttemplate"),t("texttemplatefallback");var n=vbe.extendFlat({},r.font,{color:"auto",size:"auto"});vbe.coerceFont(t,"textfont",n)}});var VV=fe((cgr,gbe)=>{"use strict";gbe.exports=function(t,r,n){var a=n("zsmooth");a===!1&&(n("xgap"),n("ygap")),n("zhoverformat")}});var xbe=fe((fgr,ybe)=>{"use strict";var mbe=Xt(),I6t=s7(),z6t=IA(),q6t=sp(),B6t=VV(),O6t=Vc(),N6t=O3();ybe.exports=function(t,r,n,a){function i(s,l){return mbe.coerce(t,r,N6t,s,l)}var o=I6t(t,r,i,a);if(!o){r.visible=!1;return}q6t(t,r,a,i),i("xhoverformat"),i("yhoverformat"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),z6t(i,a),B6t(t,r,i,a),i("hoverongaps"),i("connectgaps",mbe.isArray1D(r.z)&&r.zsmooth!==!1),O6t(t,r,a,i,{prefix:"",cLetter:"z"}),i("zorder")}});var GV=fe((hgr,_be)=>{"use strict";var N3=aa();_be.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var a=n[t];return N3(a)?(a=Number(a),r[e]+=a,a):0},avg:function(e,t,r,n,a){var i=n[t];return N3(i)&&(i=Number(i),r[e]+=i,a[e]++),0},min:function(e,t,r,n){var a=n[t];if(N3(a))if(a=Number(a),N3(r[e])){if(r[e]>a){var i=a-r[e];return r[e]=a,i}}else return r[e]=a,a;return 0},max:function(e,t,r,n){var a=n[t];if(N3(a))if(a=Number(a),N3(r[e])){if(r[e]{"use strict";bbe.exports={percent:function(e,t){for(var r=e.length,n=100/t,a=0;a{"use strict";wbe.exports=function(t,r){for(var n=t.length,a=0,i=0;i{"use strict";var U3=Wa(),x2=U3.ONEAVGYEAR,Tbe=U3.ONEAVGMONTH,u7=U3.ONEDAY,Abe=U3.ONEHOUR,Mbe=U3.ONEMIN,Sbe=U3.ONESEC,Ebe=Yi().tickIncrement;Lbe.exports=function(t,r,n,a,i){var o=-1.1*r,s=-.1*r,l=t-s,u=n[0],c=n[1],f=Math.min(l7(u+s,u+l,a,i),l7(c+s,c+l,a,i)),v=Math.min(l7(u+o,u+s,a,i),l7(c+o,c+s,a,i)),g,p;if(f>v&&vu7){var x=g===x2?1:6,_=g===x2?"M12":"M1";return function(y,C){var k=a.c2d(y,x2,i),S=k.indexOf("-",x);S>0&&(k=k.slice(0,S));var L=a.d2c(k,0,i);if(LSbe?e>u7?e>x2*1.1?x2:e>Tbe*1.1?Tbe:u7:e>Abe?Abe:e>Mbe?Mbe:Sbe:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function U6t(e,t,r,n,a,i){if(n&&e>u7){var o=Cbe(t,a,i),s=Cbe(r,a,i),l=e===x2?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function Cbe(e,t,r){var n=t.c2d(e,x2,r).split("-");return n[0]===""&&(n.unshift(),n[0]="-"+n[0]),n}});var ZV=fe((ggr,Ibe)=>{"use strict";var YV=aa(),sd=Xt(),Pbe=bi(),Tv=Yi(),{hasColorscale:Fbe}=Wf(),Dbe=Mh(),V6t=EA(),Rbe=GV(),G6t=HV(),H6t=jV(),j6t=WV();function W6t(e,t){var r=[],n=[],a=t.orientation==="h",i=Tv.getFromId(e,a?t.yaxis:t.xaxis),o=a?"y":"x",s={x:"y",y:"x"}[o],l=t[o+"calendar"],u=t.cumulative,c,f=XV(e,t,i,o),v=f[0],g=f[1],p=typeof v.size=="string",x=[],_=p?x:v,y=[],C=[],k=[],S=0,L=t.histnorm,w=t.histfunc,A=L.indexOf("density")!==-1,T,m,F;u.enabled&&A&&(L=L.replace(/ ?density$/,""),A=!1);var E=w==="max"||w==="min",I=E?null:0,R=Rbe.count,B=G6t[L],O=!1,V=function(le){return i.r2c(le,0,l)},j;for(sd.isArrayOrTypedArray(t[s])&&w!=="count"&&(j=t[s],O=w==="avg",R=Rbe[w]),c=V(v.start),m=V(v.end)+(c-Tv.tickIncrement(c,v.size,!1,l))/1e6;c=0&&F=ae;c--)if(n[c]){pe=c;break}for(c=ae;c<=pe;c++)if(YV(r[c])&&YV(n[c])){var ie={p:r[c],s:n[c],b:0};u.enabled||(ie.pts=k[c],ee?ie.ph0=ie.ph1=k[c].length?g[k[c][0]]:r[c]:(t._computePh=!0,ie.ph0=K(x[c]),ie.ph1=K(x[c+1],!0))),ne.push(ie)}return ne.length===1&&(ne[0].width1=Tv.tickIncrement(ne[0].p,v.size,!1,l)-ne[0].p),Fbe(t,"marker")&&Dbe(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),Fbe(t,"marker.line")&&Dbe(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),V6t(ne,t),sd.isArrayOrTypedArray(t.selectedpoints)&&sd.tagSelected(ne,t,xe),ne}function XV(e,t,r,n,a){var ue;var i=n+"bins",o=e._fullLayout,s=t["_"+n+"bingroup"],l=o._histogramBinOpts[s],u=o.barmode==="overlay",c,f,v,g,p,x,_,y=function(K){return r.r2c(K,0,g)},C=function(K){return r.c2r(K,0,g)},k=r.type==="date"?function(K){return K||K===0?sd.cleanDate(K,null,g):null}:function(K){return YV(K)?Number(K):null};function S(K,_e,ne){_e[K+"Found"]?(_e[K]=k(_e[K]),_e[K]===null&&(_e[K]=ne[K])):(x[K]=_e[K]=ne[K],sd.nestedProperty(f[0],i+"."+K).set(ne[K]))}if(t["_"+n+"autoBinFinished"])delete t["_"+n+"autoBinFinished"];else{f=l.traces;var L=[],w=!0,A=!1,T=!1;for(c=0;cr.r2l(j)&&(U=Tv.tickIncrement(U,l.size,!0,g)),R.start=r.l2r(U),V||sd.nestedProperty(t,i+".start").set(R.start)}var J=l.end,ee=r.r2l(I.end),ce=ee!==void 0;if((l.endFound||ce)&&ee!==r.r2l(J)){var ye=ce?ee:sd.aggNums(Math.max,null,p);R.end=r.l2r(ye),ce||sd.nestedProperty(t,i+".start").set(R.end)}var xe="autobin"+n;return t._input[xe]===!1&&(t._input[i]=sd.extendFlat({},t[i]||{}),delete t._input[xe],delete t[xe]),[R,p]}function Y6t(e,t,r,n,a){var i=e._fullLayout,o=X6t(e,t),s=!1,l=1/0,u=[t],c,f,v;for(c=0;c=0;n--)s(n);else if(t==="increasing"){for(n=1;n=0;n--)e[n]+=e[n+1];r==="exclude"&&(e.push(0),e.shift())}}Ibe.exports={calc:W6t,calcAllAutoBins:XV}});var Gbe=fe((mgr,Vbe)=>{"use strict";var zbe=Xt(),V3=Yi(),qbe=GV(),$6t=HV(),K6t=jV(),J6t=WV(),Bbe=ZV().calcAllAutoBins;Vbe.exports=function(t,r){var n=V3.getFromId(t,r.xaxis),a=V3.getFromId(t,r.yaxis),i=r.xcalendar,o=r.ycalendar,s=function(nt){return n.r2c(nt,0,i)},l=function(nt){return a.r2c(nt,0,o)},u=function(nt){return n.c2r(nt,0,i)},c=function(nt){return a.c2r(nt,0,o)},f,v,g,p,x=Bbe(t,r,n,"x"),_=x[0],y=x[1],C=Bbe(t,r,a,"y"),k=C[0],S=C[1],L=r._length;y.length>L&&y.splice(L,y.length-L),S.length>L&&S.splice(L,S.length-L);var w=[],A=[],T=[],m=typeof _.size=="string",F=typeof k.size=="string",E=[],I=[],R=m?E:_,B=F?I:k,O=0,V=[],j=[],q=r.histnorm,U=r.histfunc,J=q.indexOf("density")!==-1,ee=U==="max"||U==="min",ce=ee?null:0,ye=qbe.count,xe=$6t[q],ue=!1,K=[],_e=[],ne="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";ne&&U!=="count"&&(ue=U==="avg",ye=qbe[U]);var ae=_.size,pe=s(_.start),ie=s(_.end)+(pe-V3.tickIncrement(pe,ae,!1,i))/1e6;for(f=pe;f=0&&g=0&&p{"use strict";var c1=Xt(),Hbe=Wa().BADNUM,jbe=cp();Wbe.exports=function(t,r,n,a,i,o){var s=t._length,l=r.makeCalcdata(t,a),u=n.makeCalcdata(t,i);l=jbe(t,r,a,l).vals,u=jbe(t,n,i,u).vals;var c=t.text,f=c!==void 0&&c1.isArray1D(c),v=t.hovertext,g=v!==void 0&&c1.isArray1D(v),p,x,_=c1.distinctVals(l),y=_.vals,C=c1.distinctVals(u),k=C.vals,S=[],L,w,A=k.length,T=y.length;for(p=0;p{"use strict";var Q6t=aa(),eMt=Xt(),f7=Wa().BADNUM;Ybe.exports=function(t,r,n,a){var i,o,s,l,u,c;function f(y){if(Q6t(y))return+y}if(r&&r.transpose){for(i=0,u=0;u{"use strict";var tMt=Xt(),Xbe=.01,rMt=[[-1,0],[1,0],[0,-1],[0,1]];function nMt(e){return .5-.25*Math.min(1,e*.5)}$be.exports=function(t,r){var n=1,a;for(Zbe(t,r),a=0;aXbe;a++)n=Zbe(t,r,nMt(n));return n>Xbe&&tMt.log("interp2d didn't converge quickly",n),t};function Zbe(e,t,r){var n=0,a,i,o,s,l,u,c,f,v,g,p,x,_;for(s=0;sx&&(n=Math.max(n,Math.abs(e[i][o]-p)/(_-x))))}return n}});var v7=fe((bgr,Kbe)=>{"use strict";var iMt=Xt().maxRowLength;Kbe.exports=function(t){var r=[],n={},a=[],i=t[0],o=[],s=[0,0,0],l=iMt(t),u,c,f,v,g,p,x,_;for(c=0;c=0;g--)v=a[g],c=v[0],f=v[1],p=((n[[c-1,f]]||s)[2]+(n[[c+1,f]]||s)[2]+(n[[c,f-1]]||s)[2]+(n[[c,f+1]]||s)[2])/20,p&&(x[v]=[c,f,p],a.splice(g,1),_=!0);if(!_)throw"findEmpties iterated with no new neighbors";for(v in x)n[v]=x[v],r.push(x[v])}return r.sort(function(y,C){return C[2]-y[2]})}});var $V=fe((wgr,e3e)=>{"use strict";var Jbe=bi(),Qbe=Xt().isArrayOrTypedArray;e3e.exports=function(t,r,n,a,i,o){var s=[],l=Jbe.traceIs(t,"contour"),u=Jbe.traceIs(t,"histogram"),c,f,v,g=Qbe(r)&&r.length>1;if(g&&!u&&o.type!=="category"){var p=r.length;if(p<=i){if(l)s=Array.from(r).slice(0,i);else if(i===1)o.type==="log"?s=[.5*r[0],2*r[0]]:s=[r[0]-.5,r[0]+.5];else if(o.type==="log"){for(s=[Math.pow(r[0],1.5)/Math.pow(r[1],.5)],v=1;v{"use strict";var t3e=bi(),KV=Xt(),p7=Yi(),r3e=cp(),aMt=Gbe(),oMt=Mh(),sMt=c7(),lMt=h7(),uMt=d7(),cMt=v7(),g7=$V(),JV=Wa().BADNUM;i3e.exports=function(t,r){var n=p7.getFromId(t,r.xaxis||"x"),a=p7.getFromId(t,r.yaxis||"y"),i=t3e.traceIs(r,"contour"),o=t3e.traceIs(r,"histogram"),s=i?"best":r.zsmooth,l,u,c,f,v,g,p,x,_,y,C;if(n._minDtick=0,a._minDtick=0,o)C=aMt(t,r),f=C.orig_x,l=C.x,u=C.x0,c=C.dx,x=C.orig_y,v=C.y,g=C.y0,p=C.dy,_=C.z;else{var k=r.z;KV.isArray1D(k)?(sMt(r,n,a,"x","y",["z"]),l=r._x,v=r._y,k=r._z):(f=r.x?n.makeCalcdata(r,"x"):[],x=r.y?a.makeCalcdata(r,"y"):[],l=r3e(r,n,"x",f).vals,v=r3e(r,a,"y",x).vals,r._x=l,r._y=v),u=r.x0,c=r.dx,g=r.y0,p=r.dy,_=lMt(k,r,n,a)}(n.rangebreaks||a.rangebreaks)&&(_=fMt(l,v,_),o||(l=n3e(l),v=n3e(v),r._x=l,r._y=v)),!o&&(i||r.connectgaps)&&(r._emptypoints=cMt(_),uMt(_,r._emptypoints));function S(R){s=r._input.zsmooth=r.zsmooth=!1,KV.warn('cannot use zsmooth: "fast": '+R)}function L(R){if(R.length>1){var B=(R[R.length-1]-R[0])/(R.length-1),O=Math.abs(B/100);for(y=0;yO)return!1}return!0}r._islinear=!1,n.type==="log"||a.type==="log"?s==="fast"&&S("log axis found"):L(l)?L(v)?r._islinear=!0:s==="fast"&&S("y scale is not linear"):s==="fast"&&S("x scale is not linear");var w=KV.maxRowLength(_),A=r.xtype==="scaled"?"":l,T=g7(r,A,u,c,w,n),m=r.ytype==="scaled"?"":v,F=g7(r,m,g,p,_.length,a);r._extremes[n._id]=p7.findExtremes(n,T),r._extremes[a._id]=p7.findExtremes(a,F);var E={x:T,y:F,z:_,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&f&&(E.orig_x=f),r.yperiodalignment&&x&&(E.orig_y=x),A&&A.length===T.length-1&&(E.xCenter=A),m&&m.length===F.length-1&&(E.yCenter=m),o&&(E.xRanges=C.xRanges,E.yRanges=C.yRanges,E.pts=C.pts),i||oMt(t,r,{vals:_,cLetter:"z"}),i&&r.contours&&r.contours.coloring==="heatmap"){var I={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};E.xfill=g7(I,A,u,c,w,n),E.yfill=g7(I,m,g,p,_.length,a)}return[E]};function n3e(e){for(var t=[],r=e.length,n=0;n{"use strict";y7.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"]];y7.STYLE=y7.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var eG=fe((Mgr,o3e)=>{"use strict";var a3e=x7(),hMt=ea(),QV=Xt(),G3=null;function dMt(){if(G3!==null)return G3;G3=!1;var e=QV.isSafari()||QV.isMacWKWebView()||QV.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(a3e.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")G3=t.some(function(o){return r.apply(null,o)});else{var n=hMt.tester.append("image").attr("style",a3e.STYLE),a=window.getComputedStyle(n.node()),i=a.imageRendering;G3=t.some(function(o){var s=o[1];return i===s||i===s.toLowerCase()}),n.remove()}}return G3}o3e.exports=dMt});var _7=fe((Sgr,g3e)=>{"use strict";var s3e=xi(),vMt=bi(),pMt=ea(),gMt=Yi(),Av=Xt(),l3e=as(),mMt=cC(),u3e=ni(),yMt=js().extractOpts,xMt=js().makeColorScaleFuncFromTrace,_Mt=Q0(),bMt=nc(),tG=bMt.LINE_SPACING,wMt=eG(),TMt=x7().STYLE,v3e="heatmap-label";function p3e(e){return e.selectAll("g."+v3e)}function c3e(e){p3e(e).remove()}g3e.exports=function(e,t,r,n){var a=t.xaxis,i=t.yaxis;Av.makeTraceGroups(n,r,"hm").each(function(o){var s=s3e.select(this),l=o[0],u=l.trace,c=u.xgap||0,f=u.ygap||0,v=l.z,g=l.x,p=l.y,x=l.xCenter,_=l.yCenter,y=vMt.traceIs(u,"contour"),C=y?"best":u.zsmooth,k=v.length,S=Av.maxRowLength(v),L=!1,w=!1,A,T,m,F,E,I,R,B;for(I=0;A===void 0&&I0;)T=a.c2p(g[I]),I--;for(T0;)E=i.c2p(p[I]),I--;E=a._length||T<=0||F>=i._length||E<=0;if(U){var J=s.selectAll("image").data([]);J.exit().remove(),c3e(s);return}var ee,ce;O==="fast"?(ee=S,ce=k):(ee=j,ce=q);var ye=document.createElement("canvas");ye.width=ee,ye.height=ce;var xe=ye.getContext("2d",{willReadFrequently:!0}),ue=xMt(u,{noNumericCheck:!0,returnArray:!0}),K,_e;O==="fast"?(K=L?function(oa){return S-1-oa}:Av.identity,_e=w?function(oa){return k-1-oa}:Av.identity):(K=function(oa){return Av.constrain(Math.round(a.c2p(g[oa])-A),0,j)},_e=function(oa){return Av.constrain(Math.round(i.c2p(p[oa])-F),0,q)});var ne=_e(0),ae=[ne,ne],pe=L?0:1,ie=w?0:1,le=0,me=0,be=0,De=0,Ge,ht,it,Oe,ze;function ct(oa,Ma=0){if(oa===void 0)return[0,0,0,0];var Ga=ue(oa);return Ga[0]=Math.round(Ga[0]),Ga[1]=Math.round(Ga[1]),Ga[2]=Math.round(Ga[2]),le+=Ma,me+=Ga[0]*Ma,be+=Ga[1]*Ma,De+=Ga[2]*Ma,Ga}function et(oa,Ma,Ga,ss){var mo=oa[Ga.bin0];if(mo===void 0)return ct(void 0,1);var sl=oa[Ga.bin1],Eo=Ma[Ga.bin0],ao=Ma[Ga.bin1],Da=sl-mo||0,bl=Eo-mo||0,bo;return sl===void 0?ao===void 0?bo=0:Eo===void 0?bo=2*(ao-mo):bo=(2*ao-Eo-mo)*2/3:ao===void 0?Eo===void 0?bo=0:bo=(2*mo-sl-Eo)*2/3:Eo===void 0?bo=(2*ao-sl-mo)*2/3:bo=ao+mo-sl-Eo,ct(mo+Ga.frac*Da+ss.frac*(bl+Ga.frac*bo))}if(O!=="default"){var qe=0,we;try{we=new Uint8Array(ee*ce*4)}catch(oa){we=new Array(ee*ce*4)}if(O==="smooth"){var Le=x||g,Ke=_||p,Te=new Array(Le.length),Ve=new Array(Ke.length),$e=new Array(j),ot=x?h3e:f3e,tt=_?h3e:f3e,nt,We,mt;for(I=0;IKr||Kr>i._length))for(R=ft;Rdn||dn>a._length)){var xr=mMt({x:Nr,y:pr},u,e._fullLayout);xr.x=Nr,xr.y=pr;var Fr=l.z[I][R];Fr===void 0?(xr.z="",xr.zLabel=""):(xr.z=Fr,xr.zLabel=gMt.tickText(Ct,Fr,"hover").text);var Zr=l.text&&l.text[I]&&l.text[I][R];(Zr===void 0||Zr===!1)&&(Zr=""),xr.text=Zr;var Cn=Av.texttemplateString({data:[xr,u._meta],fallback:u.texttemplatefallback,labels:xr,locale:e._fullLayout._d3locale,template:Ot});if(Cn){var Dt=Cn.split("
"),At=Dt.length,Vt=0;for(B=0;B{"use strict";m3e.exports={min:"zmin",max:"zmax"}});var b7=fe((kgr,y3e)=>{"use strict";var AMt=xi();y3e.exports=function(t){AMt.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var T7=fe((Cgr,_3e)=>{"use strict";var x3e=kl(),zA=Xt(),w7=zA.isArrayOrTypedArray,MMt=Yi(),SMt=js().extractOpts;_3e.exports=function(t,r,n,a,i){i||(i={});var o=i.isContour,s=t.cd[0],l=s.trace,u=t.xa,c=t.ya,f=s.x,v=s.y,g=s.z,p=s.xCenter,x=s.yCenter,_=s.zmask,y=l.zhoverformat,C=f,k=v,S,L,w,A;if(t.index!==!1){try{w=Math.round(t.index[1]),A=Math.round(t.index[0])}catch(J){zA.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(w<0||w>=g[0].length||A<0||A>g.length)return}else{if(x3e.inbox(r-f[0],r-f[f.length-1],0)>0||x3e.inbox(n-v[0],n-v[v.length-1],0)>0)return;if(o){var T;for(C=[2*f[0]-f[1]],T=1;T{"use strict";b3e.exports={attributes:O3(),supplyDefaults:xbe(),calc:m7(),plot:_7(),colorbar:H3(),style:b7(),hoverPoints:T7(),moduleType:"trace",name:"heatmap",basePlotModule:gu(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var A3e=fe((Pgr,T3e)=>{"use strict";T3e.exports=w3e()});var rG=fe((Fgr,M3e)=>{"use strict";M3e.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var E3e=fe((Dgr,S3e)=>{"use strict";S3e.exports={eventDataKeys:["binNumber"]}});var A7=fe((Rgr,P3e)=>{"use strict";var o0=u1(),k3e=pl().axisHoverFormat,{hovertemplateAttrs:EMt,texttemplateAttrs:kMt,templatefallbackAttrs:C3e}=Oo(),nG=Ds(),L3e=rG(),CMt=E3e(),iG=ta().extendFlat;P3e.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:k3e("x"),yhoverformat:k3e("y"),text:iG({},o0.text,{}),hovertext:iG({},o0.hovertext,{}),orientation:o0.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:L3e("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:L3e("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:EMt({},{keys:CMt.eventDataKeys}),hovertemplatefallback:C3e(),texttemplate:kMt({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:C3e({editType:"plot"}),textposition:iG({},o0.textposition,{arrayOk:!1}),textfont:nG({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:nG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:nG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:o0.insidetextanchor,textangle:o0.textangle,cliponaxis:o0.cliponaxis,constraintext:o0.constraintext,marker:o0.marker,offsetgroup:o0.offsetgroup,alignmentgroup:o0.alignmentgroup,selected:o0.selected,unselected:o0.unselected,zorder:o0.zorder}});var I3e=fe((Igr,R3e)=>{"use strict";var F3e=bi(),qA=Xt(),D3e=ni(),LMt=z0().handleText,PMt=ZC(),FMt=A7();R3e.exports=function(t,r,n,a){function i(C,k){return qA.coerce(t,r,FMt,C,k)}var o=i("x"),s=i("y"),l=i("cumulative.enabled");l&&(i("cumulative.direction"),i("cumulative.currentbin")),i("text");var u=i("textposition");LMt(t,r,a,i,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat");var c=i("orientation",s&&!o?"h":"v"),f=c==="v"?"x":"y",v=c==="v"?"y":"x",g=o&&s?Math.min(qA.minRowLength(o)&&qA.minRowLength(s)):qA.minRowLength(r[f]||[]);if(!g){r.visible=!1;return}r._length=g;var p=F3e.getComponentMethod("calendars","handleTraceDefaults");p(t,r,["x","y"],a);var x=r[v];x&&i("histfunc"),i("histnorm"),i("autobin"+f),PMt(t,r,i,n,a),qA.coerceSelectionMarkerOpacity(r,i);var _=(r.marker.line||{}).color,y=F3e.getComponentMethod("errorbars","supplyDefaults");y(t,r,_||D3e.defaultLine,{axis:"y"}),y(t,r,_||D3e.defaultLine,{axis:"x",inherit:"y"}),i("zorder")}});var S7=fe((zgr,B3e)=>{"use strict";var BA=Xt(),DMt=El(),M7=bi().traceIs,RMt=n2(),IMt=z0().validateCornerradius,z3e=BA.nestedProperty,aG=Jx().getAxisGroup,q3e=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],zMt=["x","y"];B3e.exports=function(t,r){var n=r._histogramBinOpts={},a=[],i={},o=[],s,l,u,c,f,v,g;function p(O,V){return BA.coerce(s._input,s,s._module.attributes,O,V)}function x(O){return O.orientation==="v"?"x":"y"}function _(O,V){var j=DMt.getFromTrace({_fullLayout:r},O,V);return j.type}function y(O,V,j){var q=O.uid+"__"+j;V||(V=q);var U=_(O,j),J=O[j+"calendar"]||"",ee=n[V],ce=!0;ee&&(U===ee.axType&&J===ee.calendar?(ce=!1,ee.traces.push(O),ee.dirs.push(j)):(V=q,U!==ee.axType&&BA.warn(["Attempted to group the bins of trace",O.index,"set on a","type:"+U,"axis","with bins on","type:"+ee.axType,"axis."].join(" ")),J!==ee.calendar&&BA.warn(["Attempted to group the bins of trace",O.index,"set with a",J,"calendar","with bins",ee.calendar?"on a "+ee.calendar+" calendar":"w/o a set calendar"].join(" ")))),ce&&(n[V]={traces:[O],dirs:[j],axType:U,calendar:O[j+"calendar"]||""}),O["_"+j+"bingroup"]=V}for(f=0;f{"use strict";var qMt=I3().hoverPoints,BMt=Yi().hoverLabelText;O3e.exports=function(t,r,n,a,i){var o=qMt(t,r,n,a,i);if(o){t=o[0];var s=t.cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var u=l.orientation==="h"?"y":"x";t[u+"Label"]=BMt(t[u+"a"],[s.ph0,s.ph1],l[u+"hoverformat"])}return o}}});var oG=fe((Bgr,U3e)=>{"use strict";U3e.exports=function(t,r,n,a,i){if(t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(t.z=r.zLabelVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),!(n.cumulative||{}).enabled){var o=Array.isArray(i)?a[0].pts[i[0]][i[1]]:a[i].pts;t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex,t.pointIndices=o}return t}});var G3e=fe((Ogr,V3e)=>{"use strict";V3e.exports={attributes:A7(),layoutAttributes:XC(),supplyDefaults:I3e(),crossTraceDefaults:S7(),supplyLayoutDefaults:SV(),calc:ZV().calc,crossTraceCalc:i2().crossTraceCalc,plot:m2().plot,layerName:"barlayer",style:_v().style,styleOnSelect:_v().styleOnSelect,colorbar:Zf(),hoverPoints:N3e(),selectPoints:z3(),eventData:oG(),moduleType:"trace",name:"histogram",basePlotModule:gu(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var j3e=fe((Ngr,H3e)=>{"use strict";H3e.exports=G3e()});var k7=fe((Ugr,X3e)=>{"use strict";var _p=A7(),W3e=rG(),E7=O3(),OMt=Ho(),sG=pl().axisHoverFormat,{hovertemplateAttrs:NMt,texttemplateAttrs:UMt,templatefallbackAttrs:Y3e}=Oo(),VMt=_s(),OA=ta().extendFlat;X3e.exports=OA({x:_p.x,y:_p.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:_p.histnorm,histfunc:_p.histfunc,nbinsx:_p.nbinsx,xbins:W3e("x"),nbinsy:_p.nbinsy,ybins:W3e("y"),autobinx:_p.autobinx,autobiny:_p.autobiny,bingroup:OA({},_p.bingroup,{}),xbingroup:OA({},_p.bingroup,{}),ybingroup:OA({},_p.bingroup,{}),xgap:E7.xgap,ygap:E7.ygap,zsmooth:E7.zsmooth,xhoverformat:sG("x"),yhoverformat:sG("y"),zhoverformat:sG("z",1),hovertemplate:NMt({},{keys:["z"]}),hovertemplatefallback:Y3e(),texttemplate:UMt({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:Y3e({editType:"plot"}),textfont:E7.textfont,showlegend:OA({},OMt.showlegend,{dflt:!1})},VMt("",{cLetter:"z",autoColorDflt:!1}))});var lG=fe((Vgr,$3e)=>{"use strict";var GMt=bi(),Z3e=Xt();$3e.exports=function(t,r,n,a){var i=n("x"),o=n("y"),s=Z3e.minRowLength(i),l=Z3e.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=GMt.getComponentMethod("calendars","handleTraceDefaults");u(t,r,["x","y"],a);var c=n("z")||n("marker.color");c&&n("histfunc"),n("histnorm"),n("autobinx"),n("autobiny")}});var J3e=fe((Ggr,K3e)=>{"use strict";var HMt=Xt(),jMt=lG(),WMt=VV(),YMt=Vc(),XMt=IA(),ZMt=k7();K3e.exports=function(t,r,n,a){function i(o,s){return HMt.coerce(t,r,ZMt,o,s)}jMt(t,r,i,a),r.visible!==!1&&(WMt(t,r,i,a),YMt(t,r,a,i,{prefix:"",cLetter:"z"}),i("hovertemplate"),i("hovertemplatefallback"),XMt(i,a),i("xhoverformat"),i("yhoverformat"))}});var twe=fe((Hgr,ewe)=>{"use strict";var $Mt=T7(),Q3e=Yi().hoverLabelText;ewe.exports=function(t,r,n,a,i){var o=$Mt(t,r,n,a,i);if(o){t=o[0];var s=t.index,l=s[0],u=s[1],c=t.cd[0],f=c.trace,v=c.xRanges[u],g=c.yRanges[l];return t.xLabel=Q3e(t.xa,[v[0],v[1]],f.xhoverformat),t.yLabel=Q3e(t.ya,[g[0],g[1]],f.yhoverformat),o}}});var nwe=fe((jgr,rwe)=>{"use strict";rwe.exports={attributes:k7(),supplyDefaults:J3e(),crossTraceDefaults:S7(),calc:m7(),plot:_7(),layerName:"heatmaplayer",colorbar:H3(),style:b7(),hoverPoints:twe(),eventData:oG(),moduleType:"trace",name:"histogram2d",basePlotModule:gu(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var awe=fe((Wgr,iwe)=>{"use strict";iwe.exports=nwe()});var C7=fe((Ygr,owe)=>{"use strict";owe.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var NA=fe((Xgr,cwe)=>{"use strict";var Bu=O3(),L7=Ol(),lwe=pl(),uG=lwe.axisHoverFormat,KMt=lwe.descriptionOnlyNumbers,JMt=_s(),QMt=Uc().dash,eSt=Ds(),j3=ta().extendFlat,uwe=C7(),tSt=uwe.COMPARISON_OPS2,rSt=uwe.INTERVAL_OPS,swe=L7.line;cwe.exports=j3({z:Bu.z,x:Bu.x,x0:Bu.x0,dx:Bu.dx,y:Bu.y,y0:Bu.y0,dy:Bu.dy,xperiod:Bu.xperiod,yperiod:Bu.yperiod,xperiod0:L7.xperiod0,yperiod0:L7.yperiod0,xperiodalignment:Bu.xperiodalignment,yperiodalignment:Bu.yperiodalignment,text:Bu.text,hovertext:Bu.hovertext,transpose:Bu.transpose,xtype:Bu.xtype,ytype:Bu.ytype,xhoverformat:uG("x"),yhoverformat:uG("y"),zhoverformat:uG("z",1),hovertemplate:Bu.hovertemplate,hovertemplatefallback:Bu.hovertemplatefallback,texttemplate:j3({},Bu.texttemplate,{}),texttemplatefallback:Bu.texttemplatefallback,textfont:j3({},Bu.textfont,{}),hoverongaps:Bu.hoverongaps,connectgaps:j3({},Bu.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:eSt({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:KMt("contour label")},operation:{valType:"enumerated",values:[].concat(tSt).concat(rSt),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:j3({},swe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:QMt,smoothing:j3({},swe.smoothing,{}),editType:"plot"},zorder:L7.zorder},JMt("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var fG=fe((Zgr,hwe)=>{"use strict";var Ch=k7(),f1=NA(),nSt=_s(),cG=pl().axisHoverFormat,fwe=ta().extendFlat;hwe.exports=fwe({x:Ch.x,y:Ch.y,z:Ch.z,marker:Ch.marker,histnorm:Ch.histnorm,histfunc:Ch.histfunc,nbinsx:Ch.nbinsx,xbins:Ch.xbins,nbinsy:Ch.nbinsy,ybins:Ch.ybins,autobinx:Ch.autobinx,autobiny:Ch.autobiny,bingroup:Ch.bingroup,xbingroup:Ch.xbingroup,ybingroup:Ch.ybingroup,autocontour:f1.autocontour,ncontours:f1.ncontours,contours:f1.contours,line:{color:f1.line.color,width:fwe({},f1.line.width,{dflt:.5}),dash:f1.line.dash,smoothing:f1.line.smoothing,editType:"plot"},xhoverformat:cG("x"),yhoverformat:cG("y"),zhoverformat:cG("z",1),hovertemplate:Ch.hovertemplate,hovertemplatefallback:Ch.hovertemplatefallback,texttemplate:f1.texttemplate,texttemplatefallback:f1.texttemplatefallback,textfont:f1.textfont},nSt("",{cLetter:"z",editTypeOverride:"calc"}))});var P7=fe(($gr,dwe)=>{"use strict";dwe.exports=function(t,r,n,a){var i=a("contours.start"),o=a("contours.end"),s=i===!1||o===!1,l=n("contours.size"),u;s?u=r.autocontour=!0:u=n("autocontour",!1),(u||!l)&&n("ncontours")}});var hG=fe((Kgr,vwe)=>{"use strict";var iSt=Xt();vwe.exports=function(t,r,n,a){a||(a={});var i=t("contours.showlabels");if(i){var o=r.font;iSt.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:n}}),t("contours.labelformat")}a.hasHover!==!1&&t("zhoverformat")}});var F7=fe((Jgr,pwe)=>{"use strict";var aSt=Vc(),oSt=hG();pwe.exports=function(t,r,n,a,i){var o=n("contours.coloring"),s,l="";o==="fill"&&(s=n("contours.showlines")),s!==!1&&(o!=="lines"&&(l=n("line.color","#000")),n("line.width",.5),n("line.dash")),o!=="none"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,aSt(t,r,a,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),oSt(n,a,l,i)}});var xwe=fe((Qgr,ywe)=>{"use strict";var gwe=Xt(),sSt=lG(),lSt=P7(),uSt=F7(),cSt=IA(),mwe=fG();ywe.exports=function(t,r,n,a){function i(s,l){return gwe.coerce(t,r,mwe,s,l)}function o(s){return gwe.coerce2(t,r,mwe,s)}sSt(t,r,i,a),r.visible!==!1&&(lSt(t,r,i,o),uSt(t,r,i,a),i("xhoverformat"),i("yhoverformat"),i("hovertemplate"),i("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&cSt(i,a))}});var pG=fe((emr,bwe)=>{"use strict";var vG=Yi(),dG=Xt();bwe.exports=function(t,r){var n=t.contours;if(t.autocontour){var a=t.zmin,i=t.zmax;(t.zauto||a===void 0)&&(a=dG.aggNums(Math.min,null,r)),(t.zauto||i===void 0)&&(i=dG.aggNums(Math.max,null,r));var o=_we(a,i,t.ncontours);n.size=o.dtick,n.start=vG.tickFirst(o),o.range.reverse(),n.end=vG.tickFirst(o),n.start===a&&(n.start+=n.size),n.end===i&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),t._input.contours||(t._input.contours={}),dG.extendFlat(t._input.contours,{start:n.start,end:n.end,size:n.size}),t._input.autocontour=!0}else if(n.type!=="constraint"){var s=n.start,l=n.end,u=t._input.contours;if(s>l&&(n.start=u.start=l,l=n.end=u.end=s,s=n.start),!(n.size>0)){var c;s===l?c=1:c=_we(s,l,t.ncontours).dtick,u.size=n.size=c}}};function _we(e,t,r){var n={type:"linear",range:[e,t]};return vG.autoTicks(n,(t-e)/(r||15)),n}});var UA=fe((tmr,wwe)=>{"use strict";wwe.exports=function(t){return t.end+t.size/1e6}});var gG=fe((rmr,Awe)=>{"use strict";var Twe=js(),fSt=m7(),hSt=pG(),dSt=UA();Awe.exports=function(t,r){var n=fSt(t,r),a=n[0].z;hSt(r,a);var i=r.contours,o=Twe.extractOpts(r),s;if(i.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var l=i.start,u=dSt(i),c=i.size||1,f=Math.floor((u-l)/c)+1;isFinite(c)||(c=1,f=1);var v=l-c/2,g=v+f*c;s=[v,g]}else s=a;return Twe.calc(t,r,{vals:s,cLetter:"z"}),n}});var VA=fe((nmr,Mwe)=>{"use strict";Mwe.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}}});var mG=fe((imr,Swe)=>{"use strict";var D7=VA();Swe.exports=function(t){var r=t[0].z,n=r.length,a=r[0].length,i=n===2||a===2,o,s,l,u,c,f,v,g,p;for(s=0;se?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);if(r===5||r===10){var n=(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4;return e>n?r===5?713:1114:r===5?104:208}return r===15?0:r}});var yG=fe((amr,Cwe)=>{"use strict";var R7=Xt(),W3=VA();Cwe.exports=function(t,r,n){var a,i,o,s,l;for(r=r||.01,n=n||.01,o=0;o20?(o=W3.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[i]=W3.SADDLEREMAINDER[o]):delete e.crossings[i],s=W3.NEWDELTA[o],!s){R7.log("Found bad marching index:",o,t,e.level);break}l.push(kwe(e,t,s)),t[0]+=s[0],t[1]+=s[1],i=t.join(","),GA(l[l.length-1],l[l.length-2],n,a)&&l.pop();var p=s[0]&&(t[0]<0||t[0]>c-2)||s[1]&&(t[1]<0||t[1]>u-2),x=t[0]===f[0]&&t[1]===f[1]&&s[0]===v[0]&&s[1]===v[1];if(x||r&&p)break;o=e.crossings[i]}g===1e4&&R7.log("Infinite loop in contour?");var _=GA(l[0],l[l.length-1],n,a),y=0,C=.2*e.smoothing,k=[],S=0,L,w,A,T,m,F,E,I,R,B,O;for(g=1;g=S;g--)if(L=k[g],L=S&&L+k[w]I&&R--,e.edgepaths[R]=O.concat(l,B));break}U||(e.edgepaths[I]=l.concat(B))}for(I=0;I20&&t?e===208||e===1114?n=r[0]===0?1:-1:a=r[1]===0?1:-1:W3.BOTTOMSTART.indexOf(e)!==-1?a=1:W3.LEFTSTART.indexOf(e)!==-1?n=1:W3.TOPSTART.indexOf(e)!==-1?a=-1:n=-1,[n,a]}function kwe(e,t,r){var n=t[0]+Math.max(r[0],0),a=t[1]+Math.max(r[1],0),i=e.z[a][n],o=e.xaxis,s=e.yaxis;if(r[1]){var l=(e.level-i)/(e.z[a][n+1]-i),u=(l!==1?(1-l)*o.c2l(e.x[n]):0)+(l!==0?l*o.c2l(e.x[n+1]):0);return[o.c2p(o.l2c(u),!0),s.c2p(e.y[a],!0),n+l,a]}else{var c=(e.level-i)/(e.z[a+1][n]-i),f=(c!==1?(1-c)*s.c2l(e.y[a]):0)+(c!==0?c*s.c2l(e.y[a+1]):0);return[o.c2p(e.x[n],!0),s.c2p(s.l2c(f),!0),n,a+c]}}});var Dwe=fe((omr,Fwe)=>{"use strict";var xG=C7(),mSt=aa();Fwe.exports={"[]":Lwe("[]"),"][":Lwe("]["),">":_G(">"),"<":_G("<"),"=":_G("=")};function Pwe(e,t){var r=Array.isArray(t),n;function a(i){return mSt(i)?+i:null}return xG.COMPARISON_OPS2.indexOf(e)!==-1?n=a(r?t[0]:t):xG.INTERVAL_OPS.indexOf(e)!==-1?n=r?[a(t[0]),a(t[1])]:[a(t),a(t)]:xG.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(a):[a(t)]),n}function Lwe(e){return function(t){t=Pwe(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function _G(e){return function(t){return t=Pwe(e,t),{start:t,end:1/0,size:1/0}}}});var bG=fe((smr,Iwe)=>{"use strict";var Rwe=Xt(),ySt=Dwe(),xSt=UA();Iwe.exports=function(t,r,n){for(var a=t.type==="constraint"?ySt[t._operation](t.value):t,i=a.size,o=[],s=xSt(a),l=n.trace._carpetTrace,u=l?{xaxis:l.aaxis,yaxis:l.baxis,x:n.a,y:n.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:n.x,y:n.y},c=a.start;c1e3){Rwe.warn("Too many contours, clipping at 1000",t);break}return o}});var wG=fe((lmr,qwe)=>{"use strict";var Y3=Xt();qwe.exports=function(e,t){var r,n,a,i=function(l){return l.reverse()},o=function(l){return l};switch(t){case"=":case"<":return e;case">":for(e.length!==1&&Y3.warn("Contour data invalid for the specified inequality operation."),n=e[0],r=0;r{"use strict";Bwe.exports=function(e,t){var r=e[0],n=r.z,a;switch(t.type){case"levels":var i=Math.min(n[0][0],n[0][1]);for(a=0;ao.level||o.starts.length&&i===o.level)}break;case"constraint":if(r.prefixBoundary=!1,r.edgepaths.length)return;var s=r.x.length,l=r.y.length,u=-1/0,c=1/0;for(a=0;a":f>u&&(r.prefixBoundary=!0);break;case"<":(fu||r.starts.length&&g===c)&&(r.prefixBoundary=!0);break;case"][":v=Math.min(f[0],f[1]),g=Math.max(f[0],f[1]),vu&&(r.prefixBoundary=!0);break}break}}});var I7=fe(ld=>{"use strict";var jA=xi(),yf=Xt(),dg=ea(),_St=js(),Uwe=as(),Owe=Yi(),Nwe=Hp(),bSt=_7(),Vwe=mG(),Gwe=yG(),wSt=bG(),TSt=wG(),Hwe=TG(),HA=VA(),h1=HA.LABELOPTIMIZER;ld.plot=function(t,r,n,a){var i=r.xaxis,o=r.yaxis;yf.makeTraceGroups(a,n,"contour").each(function(s){var l=jA.select(this),u=s[0],c=u.trace,f=u.x,v=u.y,g=c.contours,p=wSt(g,r,u),x=yf.ensureSingle(l,"g","heatmapcoloring"),_=[];g.coloring==="heatmap"&&(_=[s]),bSt(t,r,_,x),Vwe(p),Gwe(p);var y=i.c2p(f[0],!0),C=i.c2p(f[f.length-1],!0),k=o.c2p(v[0],!0),S=o.c2p(v[v.length-1],!0),L=[[y,S],[C,S],[C,k],[y,k]],w=p;g.type==="constraint"&&(w=TSt(p,g._operation)),ASt(l,L,g),MSt(l,w,L,g),SSt(l,p,t,u,g),kSt(l,r,t,u,L)})};function ASt(e,t,r){var n=yf.ensureSingle(e,"g","contourbg"),a=n.selectAll("path").data(r.coloring==="fill"?[0]:[]);a.enter().append("path"),a.exit().remove(),a.attr("d","M"+t.join("L")+"Z").style("stroke","none")}function MSt(e,t,r,n){var a=n.coloring==="fill"||n.type==="constraint"&&n._operation!=="=",i="M"+r.join("L")+"Z";a&&Hwe(t,n);var o=yf.ensureSingle(e,"g","contourfill"),s=o.selectAll("path").data(a?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(l){var u=(l.prefixBoundary?i:"")+jwe(l,r);u?jA.select(this).attr("d",u).style("stroke","none"):jA.select(this).remove()})}function jwe(e,t){var r="",n=0,a=e.edgepaths.map(function(y,C){return C}),i=!0,o,s,l,u,c,f;function v(y){return Math.abs(y[1]-t[0][1])<.01}function g(y){return Math.abs(y[1]-t[2][1])<.01}function p(y){return Math.abs(y[0]-t[0][0])<.01}function x(y){return Math.abs(y[0]-t[2][0])<.01}for(;a.length;){for(f=dg.smoothopen(e.edgepaths[n],e.smoothing),r+=i?f:f.replace(/^M/,"L"),a.splice(a.indexOf(n),1),o=e.edgepaths[n][e.edgepaths[n].length-1],u=-1,l=0;l<4;l++){if(!o){yf.log("Missing end?",n,e);break}for(v(o)&&!x(o)?s=t[1]:p(o)?s=t[0]:g(o)?s=t[3]:x(o)&&(s=t[2]),c=0;c=0&&(s=_,u=c):Math.abs(o[1]-s[1])<.01?Math.abs(o[1]-_[1])<.01&&(_[0]-o[0])*(s[0]-_[0])>=0&&(s=_,u=c):yf.log("endpt to newendpt is not vert. or horz.",o,s,_)}if(o=s,u>=0)break;r+="L"+s}if(u===e.edgepaths.length){yf.log("unclosed perimeter path");break}n=u,i=a.indexOf(n)===-1,i&&(n=a[0],r+="Z")}for(n=0;nh1.MAXCOST*2)break;v&&(s/=2),o=u-s/2,l=o+s*1.5}if(f<=h1.MAXCOST)return c};function ESt(e,t,r,n){var a=t.width/2,i=t.height/2,o=e.x,s=e.y,l=e.theta,u=Math.cos(l)*a,c=Math.sin(l)*a,f=(o>n.center?n.right-o:o-n.left)/(u+Math.abs(Math.sin(l)*i)),v=(s>n.middle?n.bottom-s:s-n.top)/(Math.abs(c)+Math.cos(l)*i);if(f<1||v<1)return 1/0;var g=h1.EDGECOST*(1/(f-1)+1/(v-1));g+=h1.ANGLECOST*l*l;for(var p=o-u,x=s-c,_=o+u,y=s+c,C=0;C{"use strict";var LSt=xi(),AG=js(),PSt=UA();Wwe.exports=function(t){var r=t.contours,n=r.start,a=PSt(r),i=r.size||1,o=Math.floor((a-n)/i)+1,s=r.coloring==="lines"?0:1,l=AG.extractOpts(t);isFinite(i)||(i=1,o=1);var u=l.reversescale?AG.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),v=new Array(c),g,p,x=l.min,_=l.max;if(r.coloring==="heatmap"){for(p=0;p=_)&&(n<=x&&(n=x),a>=_&&(a=_),o=Math.floor((a-n)/i)+1,s=0),p=0;px&&(f.unshift(x),v.unshift(v[0])),f[f.length-1]<_&&(f.push(_),v.push(v[v.length-1])))}return AG.makeColorScaleFunc({domain:f,range:v},{noNumericCheck:!0})}});var q7=fe((hmr,Xwe)=>{"use strict";var z7=xi(),Ywe=ea(),FSt=b7(),DSt=MG();Xwe.exports=function(t){var r=z7.select(t).selectAll("g.contour");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var a=z7.select(this),i=n[0].trace,o=i.contours,s=i.line,l=o.size||1,u=o.start,c=o.type==="constraint",f=!c&&o.coloring==="lines",v=!c&&o.coloring==="fill",g=f||v?DSt(i):null;a.selectAll("g.contourlevel").each(function(_){z7.select(this).selectAll("path").call(Ywe.lineGroupStyle,s.width,f?g(_.level):s.color,s.dash)});var p=o.labelfont;if(a.selectAll("g.contourlabels text").each(function(_){Ywe.font(z7.select(this),{weight:p.weight,style:p.style,variant:p.variant,textcase:p.textcase,lineposition:p.lineposition,shadow:p.shadow,family:p.family,size:p.size,color:p.color||(f?g(_.level):s.color)})}),c)a.selectAll("g.contourfill path").style("fill",i.fillcolor);else if(v){var x;a.selectAll("g.contourfill path").style("fill",function(_){return x===void 0&&(x=_.level),g(_.level+.5*l)}),x===void 0&&(x=u),a.selectAll("g.contourbg path").style("fill",g(x-.5*l))}}),FSt(t)}});var B7=fe((dmr,$we)=>{"use strict";var Zwe=js(),RSt=MG(),ISt=UA();function zSt(e,t,r){var n=t.contours,a=t.line,i=n.size||1,o=n.coloring,s=RSt(t,{isColorbar:!0});if(o==="heatmap"){var l=Zwe.extractOpts(t);r._fillgradient=l.reversescale?Zwe.flipScale(l.colorscale):l.colorscale,r._zrange=[l.min,l.max]}else o==="fill"&&(r._fillcolor=s);r._line={color:o==="lines"?s:a.color,width:n.showlines!==!1?a.width:0,dash:a.dash},r._levels={start:n.start,end:ISt(n),size:i}}$we.exports={min:"zmin",max:"zmax",calc:zSt}});var SG=fe((vmr,Kwe)=>{"use strict";var O7=ni(),qSt=T7();Kwe.exports=function(t,r,n,a,i){i||(i={}),i.isContour=!0;var o=qSt(t,r,n,a,i);return o&&o.forEach(function(s){var l=s.trace;l.contours.type==="constraint"&&(l.fillcolor&&O7.opacity(l.fillcolor)?s.color=O7.addOpacity(l.fillcolor,1):l.contours.showlines&&O7.opacity(l.line.color)&&(s.color=O7.addOpacity(l.line.color,1)))}),o}});var Qwe=fe((pmr,Jwe)=>{"use strict";Jwe.exports={attributes:fG(),supplyDefaults:xwe(),crossTraceDefaults:S7(),calc:gG(),plot:I7().plot,layerName:"contourlayer",style:q7(),colorbar:B7(),hoverPoints:SG(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:gu(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var t5e=fe((gmr,e5e)=>{"use strict";e5e.exports=Qwe()});var EG=fe((mmr,s5e)=>{"use strict";var r5e=aa(),BSt=hG(),a5e=ni(),n5e=a5e.addOpacity,OSt=a5e.opacity,o5e=C7(),i5e=Xt().isArrayOrTypedArray,NSt=o5e.CONSTRAINT_REDUCTION,USt=o5e.COMPARISON_OPS2;s5e.exports=function(t,r,n,a,i,o){var s=r.contours,l,u,c,f=n("contours.operation");if(s._operation=NSt[f],VSt(n,s),f==="="?l=s.showlines=!0:(l=n("contours.showlines"),c=n("fillcolor",n5e((t.line||{}).color||i,.5))),l){var v=c&&OSt(c)?n5e(r.fillcolor,1):i;u=n("line.color",v),n("line.width",2),n("line.dash")}n("line.smoothing"),BSt(n,a,u,o)};function VSt(e,t){var r;USt.indexOf(t.operation)===-1?(e("contours.value",[0,1]),i5e(t.value)?t.value.length>2?t.value=t.value.slice(2):t.length===0?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:r5e(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),r5e(t.value)||(i5e(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var c5e=fe((ymr,u5e)=>{"use strict";var kG=Xt(),GSt=s7(),HSt=sp(),jSt=EG(),WSt=P7(),YSt=F7(),XSt=IA(),l5e=NA();u5e.exports=function(t,r,n,a){function i(u,c){return kG.coerce(t,r,l5e,u,c)}function o(u){return kG.coerce2(t,r,l5e,u)}var s=GSt(t,r,i,a);if(!s){r.visible=!1;return}HSt(t,r,a,i),i("xhoverformat"),i("yhoverformat"),i("text"),i("hovertext"),i("hoverongaps"),i("hovertemplate"),i("hovertemplatefallback");var l=i("contours.type")==="constraint";i("connectgaps",kG.isArray1D(r.z)),l?jSt(t,r,i,a,n):(WSt(t,r,i,o),YSt(t,r,i,a)),r.contours&&r.contours.coloring==="heatmap"&&XSt(i,a),i("zorder")}});var h5e=fe((xmr,f5e)=>{"use strict";f5e.exports={attributes:NA(),supplyDefaults:c5e(),calc:gG(),plot:I7().plot,style:q7(),colorbar:B7(),hoverPoints:SG(),moduleType:"trace",name:"contour",basePlotModule:gu(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var v5e=fe((_mr,d5e)=>{"use strict";d5e.exports=h5e()});var CG=fe((bmr,y5e)=>{"use strict";var{hovertemplateAttrs:ZSt,texttemplateAttrs:$St,templatefallbackAttrs:p5e}=Oo(),KSt=n1(),O0=Ol(),JSt=Ho(),g5e=_s(),QSt=Uc().dash,jm=ta().extendFlat,Mv=O0.marker,WA=O0.line,m5e=Mv.line;y5e.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:jm({},O0.mode,{dflt:"markers"}),text:jm({},O0.text,{}),texttemplate:$St({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:p5e({editType:"plot"}),hovertext:jm({},O0.hovertext,{}),line:{color:WA.color,width:WA.width,dash:QSt,backoff:WA.backoff,shape:jm({},WA.shape,{values:["linear","spline"]}),smoothing:WA.smoothing,editType:"calc"},connectgaps:O0.connectgaps,cliponaxis:O0.cliponaxis,fill:jm({},O0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:KSt(),marker:jm({symbol:Mv.symbol,opacity:Mv.opacity,angle:Mv.angle,angleref:Mv.angleref,standoff:Mv.standoff,maxdisplayed:Mv.maxdisplayed,size:Mv.size,sizeref:Mv.sizeref,sizemin:Mv.sizemin,sizemode:Mv.sizemode,line:jm({width:m5e.width,dash:m5e.dash,editType:"calc"},g5e("marker.line")),gradient:Mv.gradient,editType:"calc"},g5e("marker")),textfont:O0.textfont,textposition:O0.textposition,selected:O0.selected,unselected:O0.unselected,hoverinfo:jm({},JSt.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:O0.hoveron,hovertemplate:ZSt(),hovertemplatefallback:p5e()}});var w5e=fe((wmr,b5e)=>{"use strict";var x5e=Xt(),eEt=r1(),X3=Is(),tEt=vv(),rEt=lp(),_5e=f3(),nEt=up(),iEt=a1(),aEt=CG();b5e.exports=function(t,r,n,a){function i(v,g){return x5e.coerce(t,r,aEt,v,g)}var o=i("a"),s=i("b"),l=i("c"),u;if(o?(u=o.length,s?(u=Math.min(u,s.length),l&&(u=Math.min(u,l.length))):l?u=Math.min(u,l.length):u=0):s&&l&&(u=Math.min(s.length,l.length)),!u){r.visible=!1;return}r._length=u,i("sum"),i("text"),i("hovertext"),r.hoveron!=="fills"&&(i("hovertemplate"),i("hovertemplatefallback"));var c=u{"use strict";var LG=Yi();T5e.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot;return a.aLabel=LG.tickText(i.aaxis,t.a,!0).text,a.bLabel=LG.tickText(i.baxis,t.b,!0).text,a.cLabel=LG.tickText(i.caxis,t.c,!0).text,a}});var k5e=fe((Amr,E5e)=>{"use strict";var PG=aa(),oEt=pv(),sEt=o1(),lEt=P0(),uEt=gv().calcMarkerSize,M5e=["a","b","c"],S5e={a:["b","c"],b:["a","c"],c:["a","b"]};E5e.exports=function(t,r){var n=t._fullLayout[r.subplot],a=n.sum,i=r.sum||a,o={a:r.a,b:r.b,c:r.c},s=r.ids,l,u,c,f,v,g;for(l=0;l{"use strict";var cEt=m3();C5e.exports=function(t,r,n){var a=r.plotContainer;a.select(".scatterlayer").selectAll("*").remove();for(var i=r.xaxis,o=r.yaxis,s={xaxis:i,yaxis:o,plot:a,layerClipId:r._hasClipOnAxisFalse?r.clipIdRelative:null},l=r.layers.frontplot.select("g.scatterlayer"),u=0;u{"use strict";var fEt=b3();P5e.exports=function(t,r,n,a){var i=fEt(t,r,n,a);if(!i||i[0].index===!1)return;var o=i[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),i}var f=o.cd[o.index],v=o.trace,g=o.subplot;o.a=f.a,o.b=f.b,o.c=f.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var p={};p[v.subplot]={_subplot:g};var x=v._module.formatLabels(f,v,p);o.aLabel=x.aLabel,o.bLabel=x.bLabel,o.cLabel=x.cLabel;var _=f.hi||v.hoverinfo,y=[];function C(S,L){y.push(S._hovertitle+": "+L)}if(!v.hovertemplate){var k=_.split("+");k.indexOf("all")!==-1&&(k=["a","b","c"]),k.indexOf("a")!==-1&&C(g.aaxis,o.aLabel),k.indexOf("b")!==-1&&C(g.baxis,o.bLabel),k.indexOf("c")!==-1&&C(g.caxis,o.cLabel)}return o.extraText=y.join("
"),o.hovertemplate=v.hovertemplate,i}});var R5e=fe((Emr,D5e)=>{"use strict";D5e.exports=function(t,r,n,a,i){if(r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),a[i]){var o=a[i];t.a=o.a,t.b=o.b,t.c=o.c}else t.a=r.a,t.b=r.b,t.c=r.c;return t}});var j5e=fe((kmr,H5e)=>{"use strict";var N5e=xi(),FG=bi(),vg=Xt(),d1=vg.strTranslate,N7=vg._,_2=ni(),U7=ea(),YA=Hp(),DG=ta().extendFlat,hEt=Hs(),Wm=Yi(),I5e=ed(),z5e=kl(),U5e=$p(),q5e=U5e.freeMode,dEt=U5e.rectMode,RG=qx(),vEt=Ac().prepSelect,pEt=Ac().selectOnClick,gEt=Ac().clearOutline,mEt=Ac().clearSelectionsCache,V5e=rc();function G5e(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}H5e.exports=G5e;var v1=G5e.prototype;v1.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};v1.plot=function(e,t){var r=this,n=t[r.id],a=t._size;r._hasClipOnAxisFalse=!1;for(var i=0;iZ3*u?(y=u,_=y*Z3):(_=l,y=_/Z3),C=o*_/l,k=s*y/u,p=t.l+t.w*a-_/2,x=t.t+t.h*(1-i)-y/2,r.x0=p,r.y0=x,r.w=_,r.h=y,r.sum=c,r.xaxis={type:"linear",range:[f+2*g-c,c-f-2*v],domain:[a-C/2,a+C/2],_id:"x"},YA(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(B){return B.a>=r.aaxis.range[0]&&B.a<=r.aaxis.range[1]&&B.b>=r.baxis.range[1]&&B.b<=r.baxis.range[0]&&B.c>=r.caxis.range[1]&&B.c<=r.caxis.range[0]},r.yaxis={type:"linear",range:[f,c-v-g],domain:[i-k/2,i+k/2],_id:"y"},YA(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var S=r.yaxis.domain[0],L=r.aaxis=DG({},e.aaxis,{range:[f,c-v-g],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[S,S+k*Z3],anchor:"free",position:0,_id:"y",_length:_});YA(L,r.graphDiv._fullLayout),L.setScale();var w=r.baxis=DG({},e.baxis,{range:[c-f-g,v],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:_});YA(w,r.graphDiv._fullLayout),w.setScale();var A=r.caxis=DG({},e.caxis,{range:[c-f-v,g],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[S,S+k*Z3],anchor:"free",position:0,_id:"y",_length:_});YA(A,r.graphDiv._fullLayout),A.setScale();var T="M"+p+","+(x+y)+"h"+_+"l-"+_/2+",-"+y+"Z";r.clipDef.select("path").attr("d",T),r.layers.plotbg.select("path").attr("d",T);var m="M0,"+y+"h"+_+"l-"+_/2+",-"+y+"Z";r.clipDefRelative.select("path").attr("d",m);var F=d1(p,x);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",F),r.clipDefRelative.select("path").attr("transform",null);var E=d1(p-w._offset,x+y);r.layers.baxis.attr("transform",E),r.layers.bgrid.attr("transform",E);var I=d1(p+_/2,x)+"rotate(30)"+d1(0,-L._offset);r.layers.aaxis.attr("transform",I),r.layers.agrid.attr("transform",I);var R=d1(p+_/2,x)+"rotate(-30)"+d1(0,-A._offset);r.layers.caxis.attr("transform",R),r.layers.cgrid.attr("transform",R),r.drawAxes(!0),r.layers.aline.select("path").attr("d",L.showline?"M"+p+","+(x+y)+"l"+_/2+",-"+y:"M0,0").call(_2.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",w.showline?"M"+p+","+(x+y)+"h"+_:"M0,0").call(_2.stroke,w.linecolor||"#000").style("stroke-width",(w.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",A.showline?"M"+(p+_/2)+","+x+"l"+_/2+","+y:"M0,0").call(_2.stroke,A.linecolor||"#000").style("stroke-width",(A.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),U7.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};v1.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.slice(7)+"title",a=t.layers,i=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(i),t.drawAx(o),t.drawAx(s),e){var l=Math.max(i.showticklabels?i.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks==="outside"?s.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;a["a-title"]=RG.draw(r,"a"+n,{propContainer:i,propName:t.id+".aaxis.title.text",placeholder:N7(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-i.title.font.size/3-l,"text-anchor":"middle"}}),a["b-title"]=RG.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title.text",placeholder:N7(r,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+o.title.font.size*.83+u,"text-anchor":"middle"}}),a["c-title"]=RG.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title.text",placeholder:N7(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+s.title.font.size*.83+u,"text-anchor":"middle"}})}};v1.drawAx=function(e){var t=this,r=t.graphDiv,n=e._name,a=n.charAt(0),i=e._id,o=t.layers[n],s=30,l=a+"tickLayout",u=yEt(e);t[l]!==u&&(o.selectAll("."+i+"tick").remove(),t[l]=u),e.setScale();var c=Wm.calcTicks(e),f=Wm.clipEnds(e,c),v=Wm.makeTransTickFn(e),g=Wm.getTickSigns(e)[2],p=vg.deg2rad(s),x=g*(e.linewidth||1)/2,_=g*e.ticklen,y=t.w,C=t.h,k=a==="b"?"M0,"+x+"l"+Math.sin(p)*_+","+Math.cos(p)*_:"M"+x+",0l"+Math.cos(p)*_+","+-Math.sin(p)*_,S={a:"M0,0l"+C+",-"+y/2,b:"M0,0l-"+y/2+",-"+C,c:"M0,0l-"+C+","+y/2}[a];Wm.drawTicks(r,e,{vals:e.ticks==="inside"?f:c,layer:o,path:k,transFn:v,crisp:!1}),Wm.drawGrid(r,e,{vals:f,layer:t.layers[a+"grid"],path:S,transFn:v,crisp:!1}),Wm.drawLabels(r,e,{vals:c,layer:o,transFn:v,labelFns:Wm.makeLabelFns(e,0,s)})};function yEt(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var Yc=V5e.MINZOOM/2+.87,xEt="m-0.87,.5h"+Yc+"v3h-"+(Yc+5.2)+"l"+(Yc/2+2.6)+",-"+(Yc*.87+4.5)+"l2.6,1.5l-"+Yc/2+","+Yc*.87+"Z",_Et="m0.87,.5h-"+Yc+"v3h"+(Yc+5.2)+"l-"+(Yc/2+2.6)+",-"+(Yc*.87+4.5)+"l-2.6,1.5l"+Yc/2+","+Yc*.87+"Z",bEt="m0,1l"+Yc/2+","+Yc*.87+"l2.6,-1.5l-"+(Yc/2+2.6)+",-"+(Yc*.87+4.5)+"l-"+(Yc/2+2.6)+","+(Yc*.87+4.5)+"l2.6,1.5l"+Yc/2+",-"+Yc*.87+"Z",wEt="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",B5e=!0;v1.clearOutline=function(){mEt(this.dragOptions),gEt(this.dragOptions.gd)};v1.initInteractions=function(){var e=this,t=e.layers.plotbg.select("path").node(),r=e.graphDiv,n=r._fullLayout._zoomlayer,a,i;this.dragOptions={element:t,gd:r,plotinfo:{id:e.id,domain:r._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(E,I,R){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],a=r._fullLayout._invScaleX,i=r._fullLayout._invScaleY;var B=e.dragOptions.dragmode=r._fullLayout.dragmode;q5e(B)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,B==="zoom"?(e.dragOptions.moveFn=w,e.dragOptions.clickFn=y,e.dragOptions.doneFn=A,C(E,I,R)):B==="pan"?(e.dragOptions.moveFn=m,e.dragOptions.clickFn=y,e.dragOptions.doneFn=F,T(),e.clearOutline(r)):(dEt(B)||q5e(B))&&vEt(E,I,R,e.dragOptions,B)}};var o,s,l,u,c,f,v,g,p,x;function _(E){var I={};return I[e.id+".aaxis.min"]=E.a,I[e.id+".baxis.min"]=E.b,I[e.id+".caxis.min"]=E.c,I}function y(E,I){var R=r._fullLayout.clickmode;O5e(r),E===2&&(r.emit("plotly_doubleclick",null),FG.call("_guiRelayout",r,_({a:0,b:0,c:0}))),R.indexOf("select")>-1&&E===1&&pEt(I,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),R.indexOf("event")>-1&&z5e.click(r,I,e.id)}function C(E,I,R){var B=t.getBoundingClientRect();o=I-B.left,s=R-B.top,r._fullLayout._calcInverseTransform(r);var O=r._fullLayout._invTransform,V=vg.apply3DTransform(O)(o,s);o=V[0],s=V[1],l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l,u=e.aaxis.range[1]-l.a,f=_2.luminosity(e.graphDiv._fullLayout[e.id].bgcolor),v="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",g=!1,p=n.append("path").attr("class","zoombox").attr("transform",d1(e.x0,e.y0)).style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",v),x=n.append("path").attr("class","zoombox-corners").attr("transform",d1(e.x0,e.y0)).style({fill:_2.background,stroke:_2.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function k(E,I){return 1-I/e.h}function S(E,I){return 1-(E+(e.h-I)/Math.sqrt(3))/e.w}function L(E,I){return(E-(e.h-I)/Math.sqrt(3))/e.w}function w(E,I){var R=o+E*a,B=s+I*i,O=Math.max(0,Math.min(1,k(o,s),k(R,B))),V=Math.max(0,Math.min(1,S(o,s),S(R,B))),j=Math.max(0,Math.min(1,L(o,s),L(R,B))),q=(O/2+j)*e.w,U=(1-O/2-V)*e.w,J=(q+U)/2,ee=U-q,ce=(1-O)*e.h,ye=ce-ee/Z3;ee.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),x.transition().style("opacity",1).duration(200),g=!0),r.emit("plotly_relayouting",_(c))}function A(){O5e(r),c!==l&&(FG.call("_guiRelayout",r,_(c)),B5e&&r.data&&r._context.showTips&&(vg.notifier(N7(r,"Double-click to zoom back out"),"long",r),B5e=!1))}function T(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function m(E,I){var R=E/e.xaxis._m,B=I/e.yaxis._m;c={a:l.a-B,b:l.b+(R+B)/2,c:l.c-(R-B)/2};var O=[c.a,c.b,c.c].sort(vg.sorterAsc),V={a:O.indexOf(c.a),b:O.indexOf(c.b),c:O.indexOf(c.c)};O[0]<0&&(O[1]+O[0]/2<0?(O[2]+=O[0]+O[1],O[0]=O[1]=0):(O[2]+=O[0]/2,O[1]+=O[0]/2,O[0]=0),c={a:O[V.a],b:O[V.b],c:O[V.c]},I=(l.a-c.a)*e.yaxis._m,E=(l.c-c.c-l.b+c.b)*e.xaxis._m);var j=d1(e.x0+E,e.y0+I);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",j);var q=d1(-E,-I);e.clipDefRelative.select("path").attr("transform",q),e.aaxis.range=[c.a,e.sum-c.b-c.c],e.baxis.range=[e.sum-c.a-c.c,c.b],e.caxis.range=[e.sum-c.a-c.b,c.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(U7.hideOutsideRangePoints,e),r.emit("plotly_relayouting",_(c))}function F(){FG.call("_guiRelayout",r,_(c))}t.onmousemove=function(E){z5e.hover(r,E,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(E){r._dragging||I5e.unhover(r,E)},I5e.init(this.dragOptions)};function O5e(e){N5e.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var qG=fe((Cmr,W5e)=>{"use strict";var TEt=tc(),AEt=nl().attributes,Ko=pf(),MEt=rl().overrideAll,IG=ta().extendFlat,zG={title:{text:Ko.title.text,font:Ko.title.font},color:Ko.color,tickmode:Ko.minor.tickmode,nticks:IG({},Ko.nticks,{dflt:6,min:1}),tick0:Ko.tick0,dtick:Ko.dtick,tickvals:Ko.tickvals,ticktext:Ko.ticktext,ticks:Ko.ticks,ticklen:Ko.ticklen,tickwidth:Ko.tickwidth,tickcolor:Ko.tickcolor,ticklabelstep:Ko.ticklabelstep,showticklabels:Ko.showticklabels,labelalias:Ko.labelalias,showtickprefix:Ko.showtickprefix,tickprefix:Ko.tickprefix,showticksuffix:Ko.showticksuffix,ticksuffix:Ko.ticksuffix,showexponent:Ko.showexponent,exponentformat:Ko.exponentformat,minexponent:Ko.minexponent,separatethousands:Ko.separatethousands,tickfont:Ko.tickfont,tickangle:Ko.tickangle,tickformat:Ko.tickformat,tickformatstops:Ko.tickformatstops,hoverformat:Ko.hoverformat,showline:IG({},Ko.showline,{dflt:!0}),linecolor:Ko.linecolor,linewidth:Ko.linewidth,showgrid:IG({},Ko.showgrid,{dflt:!0}),gridcolor:Ko.gridcolor,gridwidth:Ko.gridwidth,griddash:Ko.griddash,layer:Ko.layer,min:{valType:"number",dflt:0,min:0}},V7=W5e.exports=MEt({domain:AEt({name:"ternary"}),bgcolor:{valType:"color",dflt:TEt.background},sum:{valType:"number",dflt:1,min:0},aaxis:zG,baxis:zG,caxis:zG},"plot","from-root");V7.uirevision={valType:"any",editType:"none"};V7.aaxis.uirevision=V7.baxis.uirevision=V7.caxis.uirevision={valType:"any",editType:"none"}});var b2=fe((Lmr,Y5e)=>{"use strict";var SEt=Xt(),EEt=Mo(),kEt=nl().defaults;Y5e.exports=function(t,r,n,a){var i=a.type,o=a.attributes,s=a.handleDefaults,l=a.partition||"x",u=r._subplots[i],c=u.length,f=c&&u[0].replace(/\d+$/,""),v,g;function p(C,k){return SEt.coerce(v,g,o,C,k)}for(var x=0;x{"use strict";var CEt=ni(),LEt=Mo(),G7=Xt(),PEt=b2(),FEt=gm(),DEt=mm(),REt=Ub(),IEt=Fx(),zEt=hA(),Z5e=qG(),X5e=["aaxis","baxis","caxis"];$5e.exports=function(t,r,n){PEt(t,r,n,{type:"ternary",attributes:Z5e,handleDefaults:qEt,font:r.font,paper_bgcolor:r.paper_bgcolor})};function qEt(e,t,r,n){var a=r("bgcolor"),i=r("sum");n.bgColor=CEt.combine(a,n.paper_bgcolor);for(var o,s,l,u=0;u=i&&(c.min=0,f.min=0,v.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function BEt(e,t,r,n){var a=Z5e[t._name];function i(g,p){return G7.coerce(e,t,a,g,p)}i("uirevision",n.uirevision),t.type="linear";var o=i("color"),s=o!==a.color.dflt?o:r.font.color,l=t._name,u=l.charAt(0).toUpperCase(),c="Component "+u,f=i("title.text",c);t._hovertitle=f===c?f:u,G7.coerceFont(i,"title.font",r.font,{overrideDflt:{size:G7.bigFont(r.font.size),color:s}}),i("min"),IEt(e,t,i,"linear"),DEt(e,t,i,"linear"),FEt(e,t,i,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),REt(e,t,i,{outerTicks:!0});var v=i("showticklabels");v&&(G7.coerceFont(i,"tickfont",r.font,{overrideDflt:{color:s}}),i("tickangle"),i("tickformat")),zEt(e,t,i,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),i("hoverformat"),i("layer")}});var J5e=fe(Sv=>{"use strict";var OEt=j5e(),NEt=jf().getSubplotCalcData,UEt=Xt().counterRegex,$3="ternary";Sv.name=$3;var VEt=Sv.attr="subplot";Sv.idRoot=$3;Sv.idRegex=Sv.attrRegex=UEt($3);var GEt=Sv.attributes={};GEt[VEt]={valType:"subplotid",dflt:"ternary",editType:"calc"};Sv.layoutAttributes=qG();Sv.supplyLayoutDefaults=K5e();Sv.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,a=r._subplots[$3],i=0;i{"use strict";Q5e.exports={attributes:CG(),supplyDefaults:w5e(),colorbar:Zf(),formatLabels:A5e(),calc:k5e(),plot:L5e(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:F5e(),selectPoints:a2(),eventData:R5e(),moduleType:"trace",name:"scatterternary",basePlotModule:J5e(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var r4e=fe((Rmr,t4e)=>{"use strict";t4e.exports=e4e()});var BG=fe((Imr,i4e)=>{"use strict";var oc=PA(),K3=ta().extendFlat,n4e=pl().axisHoverFormat;i4e.exports={y:oc.y,x:oc.x,x0:oc.x0,y0:oc.y0,xhoverformat:n4e("x"),yhoverformat:n4e("y"),name:K3({},oc.name,{}),orientation:K3({},oc.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:oc.fillcolor,points:K3({},oc.boxpoints,{}),jitter:K3({},oc.jitter,{}),pointpos:K3({},oc.pointpos,{}),width:K3({},oc.width,{}),marker:oc.marker,text:oc.text,hovertext:oc.hovertext,hovertemplate:oc.hovertemplate,hovertemplatefallback:oc.hovertemplatefallback,quartilemethod:oc.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:oc.offsetgroup,alignmentgroup:oc.alignmentgroup,selected:oc.selected,unselected:oc.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:oc.zorder}});var UG=fe((zmr,a4e)=>{"use strict";var OG=FA(),NG=Xt().extendFlat;a4e.exports={violinmode:NG({},OG.boxmode,{}),violingap:NG({},OG.boxgap,{}),violingroupgap:NG({},OG.boxgroupgap,{})}});var c4e=fe((qmr,u4e)=>{"use strict";var o4e=Xt(),HEt=ni(),s4e=RA(),l4e=BG();u4e.exports=function(t,r,n,a){function i(L,w){return o4e.coerce(t,r,l4e,L,w)}function o(L,w){return o4e.coerce2(t,r,l4e,L,w)}if(s4e.handleSampleDefaults(t,r,i,a),r.visible!==!1){i("bandwidth"),i("side");var s=i("width");s||(i("scalegroup",r.name),i("scalemode"));var l=i("span"),u;Array.isArray(l)&&(u="manual"),i("spanmode",u);var c=i("line.color",(t.marker||{}).color||n),f=i("line.width"),v=i("fillcolor",HEt.addOpacity(r.line.color,.5));s4e.handlePointsDefaults(t,r,i,{prefix:""});var g=o("box.width"),p=o("box.fillcolor",v),x=o("box.line.color",c),_=o("box.line.width",f),y=i("box.visible",!!(g||p||x||_));y||(r.box={visible:!1});var C=o("meanline.color",c),k=o("meanline.width",f),S=i("meanline.visible",!!(C||k));S||(r.meanline={visible:!1}),i("quartilemethod"),i("zorder")}}});var h4e=fe((Bmr,f4e)=>{"use strict";var jEt=Xt(),WEt=UG(),YEt=t7();f4e.exports=function(t,r,n){function a(i,o){return jEt.coerce(t,r,WEt,i,o)}YEt._supply(t,r,n,a,"violin")}});var H7=fe(w2=>{"use strict";var XEt=Xt(),ZEt={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};w2.makeKDE=function(e,t,r){var n=r.length,a=ZEt.gaussian,i=e.bandwidth,o=1/(n*i);return function(s){for(var l=0,u=0;u{"use strict";var VG=Xt(),GG=Yi(),$Et=RV(),d4e=H7(),KEt=Wa().BADNUM;v4e.exports=function(t,r){var n=$Et(t,r);if(n[0].t.empty)return n;for(var a=t._fullLayout,i=GG.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,l=0,u=0,c=0;c{"use strict";var tkt=n7().setPositionOffset,g4e=["v","h"];m4e.exports=function(t,r){for(var n=t.calcdata,a=r.xaxis,i=r.yaxis,o=0;o{"use strict";var HG=xi(),jG=Xt(),rkt=ea(),WG=i7(),nkt=xU(),ikt=H7();x4e.exports=function(t,r,n,a){var i=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,l=r.yaxis;function u(c,f){var v=nkt(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return rkt.smoothopen(v[0],1)}jG.makeTraceGroups(a,n,"trace violins").each(function(c){var f=HG.select(this),v=c[0],g=v.t,p=v.trace;if(p.visible!==!0||g.empty){f.remove();return}var x=g.bPos,_=g.bdPos,y=r[g.valLetter+"axis"],C=r[g.posLetter+"axis"],k=p.side==="both",S=k||p.side==="positive",L=k||p.side==="negative",w=f.selectAll("path.violin").data(jG.identity);w.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","violin"),w.exit().remove(),w.each(function(B){var O=HG.select(this),V=B.density,j=V.length,q=C.c2l(B.pos+x,!0),U=C.l2p(q),J;if(p.width)J=g.maxKDE/_;else{var ee=o._violinScaleGroupStats[p.scalegroup];J=p.scalemode==="count"?ee.maxKDE/_*(ee.maxCount/B.pts.length):ee.maxKDE/_}var ce,ye,xe,ue,K,_e,ne;if(S){for(_e=new Array(j),ue=0;ue{"use strict";var b4e=xi(),J3=ni(),akt=Ld().stylePoints;w4e.exports=function(t){var r=b4e.select(t).selectAll("g.trace.violins");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var a=n[0].trace,i=b4e.select(this),o=a.box||{},s=o.line||{},l=a.meanline||{},u=l.width;i.selectAll("path.violin").style("stroke-width",a.line.width+"px").call(J3.stroke,a.line.color).call(J3.fill,a.fillcolor),i.selectAll("path.box").style("stroke-width",s.width+"px").call(J3.stroke,s.color).call(J3.fill,o.fillcolor);var c={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};i.selectAll("path.mean").style(c).call(J3.stroke,l.color),i.selectAll("path.meanline").style(c).call(J3.stroke,l.color),akt(i,a,t)})}});var E4e=fe((Hmr,S4e)=>{"use strict";var okt=ni(),YG=Xt(),skt=Yi(),A4e=OV(),M4e=H7();S4e.exports=function(t,r,n,a,i){i||(i={});var o=i.hoverLayer,s=t.cd,l=s[0].trace,u=l.hoveron,c=u.indexOf("violins")!==-1,f=u.indexOf("kde")!==-1,v=[],g,p;if(c||f){var x=A4e.hoverOnBoxes(t,r,n,a);if(f&&x.length>0){var _=t.xa,y=t.ya,C,k,S,L,w;l.orientation==="h"?(w=r,C="y",S=y,k="x",L=_):(w=n,C="x",S=_,k="y",L=y);var A=s[t.index];if(w>=A.span[0]&&w<=A.span[1]){var T=YG.extendFlat({},t),m=L.c2p(w,!0),F=M4e.getKdeValue(A,l,w),E=M4e.getPositionOnKdePath(A,l,m),I=S._offset,R=S._length;T[C+"0"]=E[0],T[C+"1"]=E[1],T[k+"0"]=T[k+"1"]=m,T[k+"Label"]=k+": "+skt.hoverLabelText(L,w,l[k+"hoverformat"])+", "+s[0].t.labels.kde+" "+F.toFixed(3);for(var B=0,O=0;O{"use strict";k4e.exports={attributes:BG(),layoutAttributes:UG(),supplyDefaults:c4e(),crossTraceDefaults:RA().crossTraceDefaults,supplyLayoutDefaults:h4e(),calc:p4e(),crossTraceCalc:y4e(),plot:_4e(),style:T4e(),styleOnSelect:Ld().styleOnSelect,hoverPoints:E4e(),selectPoints:NV(),moduleType:"trace",name:"violin",basePlotModule:gu(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var P4e=fe((Wmr,L4e)=>{"use strict";L4e.exports=C4e()});var D4e=fe((Ymr,F4e)=>{"use strict";F4e.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var ZG=fe((Xmr,q4e)=>{"use strict";var il=u1(),XG=Ol().line,lkt=Ho(),R4e=pl().axisHoverFormat,{hovertemplateAttrs:ukt,texttemplateAttrs:ckt,templatefallbackAttrs:I4e}=Oo(),z4e=D4e(),pg=ta().extendFlat,fkt=ni();q4e.exports={x:il.x,x0:il.x0,dx:il.dx,y:il.y,y0:il.y0,dy:il.dy,xperiod:il.xperiod,yperiod:il.yperiod,xperiod0:il.xperiod0,yperiod0:il.yperiod0,xperiodalignment:il.xperiodalignment,yperiodalignment:il.yperiodalignment,xhoverformat:R4e("x"),yhoverformat:R4e("y"),hovertext:il.hovertext,hovertemplate:ukt({},{keys:z4e.eventDataKeys}),hovertemplatefallback:I4e(),hoverinfo:pg({},lkt.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:ckt({editType:"plot"},{keys:z4e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:I4e({editType:"plot"}),text:il.text,textposition:il.textposition,insidetextanchor:pg({},il.insidetextanchor,{dflt:"middle"}),textangle:pg({},il.textangle,{dflt:0}),textfont:il.textfont,insidetextfont:il.insidetextfont,outsidetextfont:il.outsidetextfont,constraintext:il.constraintext,cliponaxis:il.cliponaxis,orientation:pg({},il.orientation,{}),offset:pg({},il.offset,{arrayOk:!1}),width:pg({},il.width,{arrayOk:!1}),marker:hkt(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:pg({},XG.color,{dflt:fkt.defaultLine}),width:pg({},XG.width,{dflt:0,editType:"plot"}),dash:XG.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:il.offsetgroup,alignmentgroup:il.alignmentgroup,zorder:il.zorder};function hkt(){var e=pg({},il.marker);return delete e.pattern,delete e.cornerradius,e}});var $G=fe((Zmr,B4e)=>{"use strict";B4e.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}});var JG=fe(($mr,N4e)=>{"use strict";var j7=Xt(),dkt=n2(),vkt=z0().handleText,pkt=r2(),gkt=sp(),O4e=ZG(),KG=ni();function mkt(e,t,r,n){function a(f,v){return j7.coerce(e,t,O4e,f,v)}var i=pkt(e,t,n,a);if(!i){t.visible=!1;return}gkt(e,t,n,a),a("xhoverformat"),a("yhoverformat"),a("orientation",t.y&&!t.x?"v":"h"),a("offset"),a("width");var o=a("text");a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var s=a("textposition");vkt(e,t,n,a,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&a("textinfo",j7.isArrayOrTypedArray(o)?"text+value":"value");var l=a("marker.color",r);a("marker.line.color",KG.defaultLine),a("marker.line.width");var u=a("connector.visible");if(u){a("connector.fillcolor",ykt(l));var c=a("connector.line.width");c&&(a("connector.line.color"),a("connector.line.dash"))}a("zorder")}function ykt(e){var t=j7.isArrayOrTypedArray(e)?"#000":e;return KG.addOpacity(t,.5*KG.opacity(t))}function xkt(e,t){var r,n;function a(o){return j7.coerce(n._input,n,O4e,o)}for(var i=0;i{"use strict";var _kt=Xt(),bkt=$G();U4e.exports=function(e,t,r){var n=!1;function a(s,l){return _kt.coerce(e,t,bkt,s,l)}for(var i=0;i{"use strict";var Q3=Xt();G4e.exports=function(t,r){for(var n=0;n{"use strict";var j4e=Yi(),W4e=cp(),wkt=H4e(),Tkt=P0(),XA=Wa().BADNUM;Y4e.exports=function(t,r){var n=j4e.getFromId(t,r.xaxis||"x"),a=j4e.getFromId(t,r.yaxis||"y"),i,o,s,l,u,c,f,v;r.orientation==="h"?(i=n.makeCalcdata(r,"x"),s=a.makeCalcdata(r,"y"),l=W4e(r,a,"y",s),u=!!r.yperiodalignment,c="y"):(i=a.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=W4e(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;var g=Math.min(o.length,i.length),p=new Array(g);for(r._base=[],f=0;f{"use strict";var Z4e=i2().setGroupPositions;$4e.exports=function(t,r){var n=t._fullLayout,a=t._fullData,i=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,v;for(v=0;v{"use strict";var W7=xi(),Xm=Xt(),J4e=ea(),Ym=Wa().BADNUM,Akt=m2(),Mkt=kh().clearMinTextSize;eTe.exports=function(t,r,n,a){var i=t._fullLayout;Mkt("funnel",i),Skt(t,r,n,a),Ekt(t,r,n,a),Akt.plot(t,r,n,a,{mode:i.funnelmode,norm:i.funnelmode,gap:i.funnelgap,groupgap:i.funnelgroupgap})};function Skt(e,t,r,n){var a=t.xaxis,i=t.yaxis;Xm.makeTraceGroups(n,r,"trace bars").each(function(o){var s=W7.select(this),l=o[0].trace,u=Xm.ensureSingle(s,"g","regions");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.region").data(Xm.identity);f.enter().append("g").classed("region",!0),f.exit().remove();var v=f.size();f.each(function(g,p){if(!(p!==v-1&&!g.cNext)){var x=Q4e(g,a,i,c),_=x[0],y=x[1],C="";_[0]!==Ym&&y[0]!==Ym&&_[1]!==Ym&&y[1]!==Ym&&_[2]!==Ym&&y[2]!==Ym&&_[3]!==Ym&&y[3]!==Ym&&(c?C+="M"+_[0]+","+y[1]+"L"+_[2]+","+y[2]+"H"+_[3]+"L"+_[1]+","+y[1]+"Z":C+="M"+_[1]+","+y[1]+"L"+_[2]+","+y[3]+"V"+y[2]+"L"+_[1]+","+y[0]+"Z"),C===""&&(C="M0,0Z"),Xm.ensureSingle(W7.select(this),"path").attr("d",C).call(J4e.setClipUrl,t.layerClipId,e)}})})}function Ekt(e,t,r,n){var a=t.xaxis,i=t.yaxis;Xm.makeTraceGroups(n,r,"trace bars").each(function(o){var s=W7.select(this),l=o[0].trace,u=Xm.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible||!l.connector.line.width){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.line").data(Xm.identity);f.enter().append("g").classed("line",!0),f.exit().remove();var v=f.size();f.each(function(g,p){if(!(p!==v-1&&!g.cNext)){var x=Q4e(g,a,i,c),_=x[0],y=x[1],C="";_[3]!==void 0&&y[3]!==void 0&&(c?(C+="M"+_[0]+","+y[1]+"L"+_[2]+","+y[2],C+="M"+_[1]+","+y[1]+"L"+_[3]+","+y[2]):(C+="M"+_[1]+","+y[1]+"L"+_[2]+","+y[3],C+="M"+_[1]+","+y[0]+"L"+_[2]+","+y[2])),C===""&&(C="M0,0Z"),Xm.ensureSingle(W7.select(this),"path").attr("d",C).call(J4e.setClipUrl,t.layerClipId,e)}})})}function Q4e(e,t,r,n){var a=[],i=[],o=n?t:r,s=n?r:t;return a[0]=o.c2p(e.s0,!0),i[0]=s.c2p(e.p0,!0),a[1]=o.c2p(e.s1,!0),i[1]=s.c2p(e.p1,!0),a[2]=o.c2p(e.nextS0,!0),i[2]=s.c2p(e.nextP0,!0),a[3]=o.c2p(e.nextS1,!0),i[3]=s.c2p(e.nextP1,!0),n?[a,i]:[i,a]}});var iTe=fe((ryr,nTe)=>{"use strict";var ZA=xi(),rTe=ea(),eH=ni(),kkt=Y1().DESELECTDIM,Ckt=_v(),Lkt=kh().resizeText,Pkt=Ckt.styleTextPoints;function Fkt(e,t,r){var n=r||ZA.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");Lkt(e,n,"funnel"),n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var i=ZA.select(this),o=a[0].trace;i.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o.marker;ZA.select(this).call(eH.fill,s.mc||l.color).call(eH.stroke,s.mlc||l.line.color).call(rTe.dashLine,l.line.dash,s.mlw||l.line.width).style("opacity",o.selectedpoints&&!s.selected?kkt:1)}}),Pkt(i,o,e),i.selectAll(".regions").each(function(){ZA.select(this).selectAll("path").style("stroke-width",0).call(eH.fill,o.connector.fillcolor)}),i.selectAll(".lines").each(function(){var s=o.connector.line;rTe.lineGroupStyle(ZA.select(this).selectAll("path"),s.width,s.color,s.dash)})})}nTe.exports={style:Fkt}});var sTe=fe((nyr,oTe)=>{"use strict";var aTe=ni().opacity,Dkt=I3().hoverOnBars,tH=Xt().formatPercent;oTe.exports=function(t,r,n,a,i){var o=Dkt(t,r,n,a,i);if(o){var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=o.index,f=s[c],v=u?"x":"y";o[v+"LabelVal"]=f.s,o.percentInitial=f.begR,o.percentInitialLabel=tH(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=tH(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=tH(f.sumR,1);var g=f.hi||l.hoverinfo,p=[];if(g&&g!=="none"&&g!=="skip"){var x=g==="all",_=g.split("+"),y=function(C){return x||_.indexOf(C)!==-1};y("percent initial")&&p.push(o.percentInitialLabel+" of initial"),y("percent previous")&&p.push(o.percentPreviousLabel+" of previous"),y("percent total")&&p.push(o.percentTotalLabel+" of total")}return o.extraText=p.join("
"),o.color=Rkt(l,f),[o]}};function Rkt(e,t){var r=e.marker,n=t.mc||r.color,a=t.mlc||r.line.color,i=t.mlw||r.line.width;if(aTe(n))return n;if(aTe(a)&&i)return a}});var uTe=fe((iyr,lTe)=>{"use strict";lTe.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"percentInitial"in r&&(t.percentInitial=r.percentInitial),"percentPrevious"in r&&(t.percentPrevious=r.percentPrevious),"percentTotal"in r&&(t.percentTotal=r.percentTotal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var fTe=fe((ayr,cTe)=>{"use strict";cTe.exports={attributes:ZG(),layoutAttributes:$G(),supplyDefaults:JG().supplyDefaults,crossTraceDefaults:JG().crossTraceDefaults,supplyLayoutDefaults:V4e(),calc:X4e(),crossTraceCalc:K4e(),plot:tTe(),style:iTe().style,hoverPoints:sTe(),eventData:uTe(),selectPoints:z3(),moduleType:"trace",name:"funnel",basePlotModule:gu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var dTe=fe((oyr,hTe)=>{"use strict";hTe.exports=fTe()});var pTe=fe((syr,vTe)=>{"use strict";vTe.exports={eventDataKeys:["initial","delta","final"]}});var iH=fe((lyr,xTe)=>{"use strict";var qs=u1(),rH=Ol().line,Ikt=Ho(),gTe=pl().axisHoverFormat,{hovertemplateAttrs:zkt,texttemplateAttrs:qkt,templatefallbackAttrs:mTe}=Oo(),yTe=pTe(),ew=ta().extendFlat,Bkt=ni();function nH(e){return{marker:{color:ew({},qs.marker.color,{arrayOk:!1,editType:"style"}),line:{color:ew({},qs.marker.line.color,{arrayOk:!1,editType:"style"}),width:ew({},qs.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}xTe.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:qs.x,x0:qs.x0,dx:qs.dx,y:qs.y,y0:qs.y0,dy:qs.dy,xperiod:qs.xperiod,yperiod:qs.yperiod,xperiod0:qs.xperiod0,yperiod0:qs.yperiod0,xperiodalignment:qs.xperiodalignment,yperiodalignment:qs.yperiodalignment,xhoverformat:gTe("x"),yhoverformat:gTe("y"),hovertext:qs.hovertext,hovertemplate:zkt({},{keys:yTe.eventDataKeys}),hovertemplatefallback:mTe(),hoverinfo:ew({},Ikt.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:qkt({editType:"plot"},{keys:yTe.eventDataKeys.concat(["label"])}),texttemplatefallback:mTe({editType:"plot"}),text:qs.text,textposition:qs.textposition,insidetextanchor:qs.insidetextanchor,textangle:qs.textangle,textfont:qs.textfont,insidetextfont:qs.insidetextfont,outsidetextfont:qs.outsidetextfont,constraintext:qs.constraintext,cliponaxis:qs.cliponaxis,orientation:qs.orientation,offset:qs.offset,width:qs.width,increasing:nH("increasing"),decreasing:nH("decreasing"),totals:nH("intermediate sums and total"),connector:{line:{color:ew({},rH.color,{dflt:Bkt.defaultLine}),width:ew({},rH.width,{editType:"plot"}),dash:rH.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:qs.offsetgroup,alignmentgroup:qs.alignmentgroup,zorder:qs.zorder}});var aH=fe((uyr,_Te)=>{"use strict";_Te.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"}}});var tw=fe((cyr,bTe)=>{"use strict";bTe.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var sH=fe((fyr,MTe)=>{"use strict";var wTe=Xt(),Okt=n2(),Nkt=z0().handleText,Ukt=r2(),Vkt=sp(),TTe=iH(),Gkt=ni(),ATe=tw(),Hkt=ATe.INCREASING.COLOR,jkt=ATe.DECREASING.COLOR,Wkt="#4499FF";function oH(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",Gkt.defaultLine),e(t+".marker.line.width")}function Ykt(e,t,r,n){function a(u,c){return wTe.coerce(e,t,TTe,u,c)}var i=Ukt(e,t,n,a);if(!i){t.visible=!1;return}Vkt(e,t,n,a),a("xhoverformat"),a("yhoverformat"),a("measure"),a("orientation",t.x&&!t.y?"h":"v"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var o=a("textposition");Nkt(e,t,n,a,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(a("texttemplate"),a("texttemplatefallback"),t.texttemplate||a("textinfo")),oH(a,"increasing",Hkt),oH(a,"decreasing",jkt),oH(a,"totals",Wkt);var s=a("connector.visible");if(s){a("connector.mode");var l=a("connector.line.width");l&&(a("connector.line.color"),a("connector.line.dash"))}a("zorder")}function Xkt(e,t){var r,n;function a(o){return wTe.coerce(n._input,n,TTe,o)}if(t.waterfallmode==="group")for(var i=0;i{"use strict";var Zkt=Xt(),$kt=aH();STe.exports=function(e,t,r){var n=!1;function a(s,l){return Zkt.coerce(e,t,$kt,s,l)}for(var i=0;i{"use strict";var kTe=Yi(),CTe=cp(),LTe=Xt().mergeArray,Kkt=P0(),PTe=Wa().BADNUM;function lH(e){return e==="a"||e==="absolute"}function uH(e){return e==="t"||e==="total"}FTe.exports=function(t,r){var n=kTe.getFromId(t,r.xaxis||"x"),a=kTe.getFromId(t,r.yaxis||"y"),i,o,s,l,u,c;r.orientation==="h"?(i=n.makeCalcdata(r,"x"),s=a.makeCalcdata(r,"y"),l=CTe(r,a,"y",s),u=!!r.yperiodalignment,c="y"):(i=a.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=CTe(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var f=Math.min(o.length,i.length),v=new Array(f),g=0,p,x=!1,_=0;_{"use strict";var RTe=i2().setGroupPositions;ITe.exports=function(t,r){var n=t._fullLayout,a=t._fullData,i=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,v;for(v=0;v{"use strict";var qTe=xi(),Y7=Xt(),Jkt=ea(),rw=Wa().BADNUM,Qkt=m2(),e8t=kh().clearMinTextSize;BTe.exports=function(t,r,n,a){var i=t._fullLayout;e8t("waterfall",i),Qkt.plot(t,r,n,a,{mode:i.waterfallmode,norm:i.waterfallmode,gap:i.waterfallgap,groupgap:i.waterfallgroupgap}),t8t(t,r,n,a)};function t8t(e,t,r,n){var a=t.xaxis,i=t.yaxis;Y7.makeTraceGroups(n,r,"trace bars").each(function(o){var s=qTe.select(this),l=o[0].trace,u=Y7.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=l.connector.mode,v=u.selectAll("g.line").data(Y7.identity);v.enter().append("g").classed("line",!0),v.exit().remove();var g=v.size();v.each(function(p,x){if(!(x!==g-1&&!p.cNext)){var _=r8t(p,a,i,c),y=_[0],C=_[1],k="";y[0]!==rw&&C[0]!==rw&&y[1]!==rw&&C[1]!==rw&&(f==="spanning"&&!p.isSum&&x>0&&(c?k+="M"+y[0]+","+C[1]+"V"+C[0]:k+="M"+y[1]+","+C[0]+"H"+y[0]),f!=="between"&&(p.isSum||x{"use strict";var X7=xi(),NTe=ea(),UTe=ni(),n8t=Y1().DESELECTDIM,i8t=_v(),a8t=kh().resizeText,o8t=i8t.styleTextPoints;function s8t(e,t,r){var n=r||X7.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");a8t(e,n,"waterfall"),n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var i=X7.select(this),o=a[0].trace;i.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;X7.select(this).call(UTe.fill,l.color).call(UTe.stroke,l.line.color).call(NTe.dashLine,l.line.dash,l.line.width).style("opacity",o.selectedpoints&&!s.selected?n8t:1)}}),o8t(i,o,e),i.selectAll(".lines").each(function(){var s=o.connector.line;NTe.lineGroupStyle(X7.select(this).selectAll("path"),s.width,s.color,s.dash)})})}VTe.exports={style:s8t}});var XTe=fe((myr,YTe)=>{"use strict";var l8t=Yi().hoverLabelText,HTe=ni().opacity,u8t=I3().hoverOnBars,jTe=tw(),WTe={increasing:jTe.INCREASING.SYMBOL,decreasing:jTe.DECREASING.SYMBOL};YTe.exports=function(t,r,n,a,i){var o=u8t(t,r,n,a,i);if(!o)return;var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=u?"x":"y",f=u?t.xa:t.ya;function v(w){return l8t(f,w,l[c+"hoverformat"])}var g=o.index,p=s[g],x=p.isSum?p.b+p.s:p.rawS;o.initial=p.b+p.s-x,o.delta=x,o.final=o.initial+o.delta;var _=v(Math.abs(o.delta));o.deltaLabel=x<0?"("+_+")":_,o.finalLabel=v(o.final),o.initialLabel=v(o.initial);var y=p.hi||l.hoverinfo,C=[];if(y&&y!=="none"&&y!=="skip"){var k=y==="all",S=y.split("+"),L=function(w){return k||S.indexOf(w)!==-1};p.isSum||(L("final")&&(u?!L("x"):!L("y"))&&C.push(o.finalLabel),L("delta")&&(x<0?C.push(o.deltaLabel+" "+WTe.decreasing):C.push(o.deltaLabel+" "+WTe.increasing)),L("initial")&&C.push("Initial: "+o.initialLabel))}return C.length&&(o.extraText=C.join("
")),o.color=c8t(l,p),[o]};function c8t(e,t){var r=e[t.dir].marker,n=r.color,a=r.line.color,i=r.line.width;if(HTe(n))return n;if(HTe(a)&&i)return a}});var $Te=fe((yyr,ZTe)=>{"use strict";ZTe.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"initial"in r&&(t.initial=r.initial),"delta"in r&&(t.delta=r.delta),"final"in r&&(t.final=r.final),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var JTe=fe((xyr,KTe)=>{"use strict";KTe.exports={attributes:iH(),layoutAttributes:aH(),supplyDefaults:sH().supplyDefaults,crossTraceDefaults:sH().crossTraceDefaults,supplyLayoutDefaults:ETe(),calc:DTe(),crossTraceCalc:zTe(),plot:OTe(),style:GTe().style,hoverPoints:XTe(),eventData:$Te(),selectPoints:z3(),moduleType:"trace",name:"waterfall",basePlotModule:gu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var eAe=fe((_yr,QTe)=>{"use strict";QTe.exports=JTe()});var nw=fe((byr,tAe)=>{"use strict";tAe.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.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(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%",""]}}}});var cH={};zp(cH,{default:()=>h8t});var rAe,nAe,Z7,iAe,aAe,oAe,sAe,lAe,f8t,h8t,fH=Co(()=>{"use strict";rAe=$0(ta()),nAe=$0(Ho()),Z7=$0(Oo()),iAe=$0(Ol()),aAe=$0(nw()),oAe=["rgb","rgba","rgba256","hsl","hsla"],sAe=[],lAe=[];for(let e of oAe){let t=aAe.colormodel[e];sAe.push(`For the \`${e}\` colormodel, it is [${(t.zminDflt||t.min).join(", ")}].`),lAe.push(`For the \`${e}\` colormodel, it is [${(t.zmaxDflt||t.max).join(", ")}].`)}f8t={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:oAe,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.",sAe.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.",lAe.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,rAe.extendFlat)({},nAe.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,Z7.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,Z7.templatefallbackAttrs)(),zorder:iAe.zorder},h8t=f8t});var fAe=fe((wyr,cAe)=>{"use strict";var d8t=Xt(),v8t=(fH(),Gs(cH)).default,uAe=nw(),p8t=ag().IMAGE_URL_PREFIX;cAe.exports=function(t,r){function n(o,s){return d8t.coerce(t,r,v8t,o,s)}n("source"),r.source&&!r.source.match(p8t)&&delete r.source,r._hasSource=!!r.source;var a=n("z");if(r._hasZ=!(a===void 0||!a.length||!a[0]||!a[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}n("x0"),n("y0"),n("dx"),n("dy");var i;r._hasZ?(n("colormodel","rgb"),i=uAe.colormodel[r.colormodel],n("zmin",i.zminDflt||i.min),n("zmax",i.zmaxDflt||i.max)):r._hasSource&&(r.colormodel="rgba256",i=uAe.colormodel[r.colormodel],r.zmin=i.zminDflt,r.zmax=i.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),r._length=null,n("zorder")}});var gg=fe((Tyr,hH)=>{typeof Object.create=="function"?hH.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:hH.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var dH=fe((Ayr,hAe)=>{hAe.exports=Mx().EventEmitter});var pAe=fe($7=>{"use strict";$7.byteLength=m8t;$7.toByteArray=x8t;$7.fromByteArray=w8t;var p1=[],Ev=[],g8t=typeof Uint8Array!="undefined"?Uint8Array:Array,vH="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(T2=0,dAe=vH.length;T20)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function m8t(e){var t=vAe(e),r=t[0],n=t[1];return(r+n)*3/4-n}function y8t(e,t,r){return(t+r)*3/4-r}function x8t(e){var t,r=vAe(e),n=r[0],a=r[1],i=new g8t(y8t(e,n,a)),o=0,s=a>0?n-4:n,l;for(l=0;l>16&255,i[o++]=t>>8&255,i[o++]=t&255;return a===2&&(t=Ev[e.charCodeAt(l)]<<2|Ev[e.charCodeAt(l+1)]>>4,i[o++]=t&255),a===1&&(t=Ev[e.charCodeAt(l)]<<10|Ev[e.charCodeAt(l+1)]<<4|Ev[e.charCodeAt(l+2)]>>2,i[o++]=t>>8&255,i[o++]=t&255),i}function _8t(e){return p1[e>>18&63]+p1[e>>12&63]+p1[e>>6&63]+p1[e&63]}function b8t(e,t,r){for(var n,a=[],i=t;is?s:o+i));return n===1?(t=e[r-1],a.push(p1[t>>2]+p1[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],a.push(p1[t>>10]+p1[t>>4&63]+p1[t<<2&63]+"=")),a.join("")}});var gAe=fe(pH=>{pH.read=function(e,t,r,n,a){var i,o,s=a*8-n-1,l=(1<>1,c=-7,f=r?a-1:0,v=r?-1:1,g=e[t+f];for(f+=v,i=g&(1<<-c)-1,g>>=-c,c+=s;c>0;i=i*256+e[t+f],f+=v,c-=8);for(o=i&(1<<-c)-1,i>>=-c,c+=n;c>0;o=o*256+e[t+f],f+=v,c-=8);if(i===0)i=1-u;else{if(i===l)return o?NaN:(g?-1:1)*(1/0);o=o+Math.pow(2,n),i=i-u}return(g?-1:1)*o*Math.pow(2,i-n)};pH.write=function(e,t,r,n,a,i){var o,s,l,u=i*8-a-1,c=(1<>1,v=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:i-1,p=n?1:-1,x=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=v/l:t+=v*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,a),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,a),o=0));a>=8;e[r+g]=s&255,g+=p,s/=256,a-=8);for(o=o<0;e[r+g]=o&255,g+=p,o/=256,u-=8);e[r+g-p]|=x*128}});var M2=fe(sw=>{"use strict";var gH=pAe(),aw=gAe(),mAe=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;sw.Buffer=Bn;sw.SlowBuffer=k8t;sw.INSPECT_MAX_BYTES=50;var K7=2147483647;sw.kMaxLength=K7;Bn.TYPED_ARRAY_SUPPORT=T8t();!Bn.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&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 T8t(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(Bn.prototype,"parent",{enumerable:!0,get:function(){if(Bn.isBuffer(this))return this.buffer}});Object.defineProperty(Bn.prototype,"offset",{enumerable:!0,get:function(){if(Bn.isBuffer(this))return this.byteOffset}});function mg(e){if(e>K7)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,Bn.prototype),t}function Bn(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _H(e)}return bAe(e,t,r)}Bn.poolSize=8192;function bAe(e,t,r){if(typeof e=="string")return M8t(e,t);if(ArrayBuffer.isView(e))return S8t(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(g1(e,ArrayBuffer)||e&&g1(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(g1(e,SharedArrayBuffer)||e&&g1(e.buffer,SharedArrayBuffer)))return yH(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return Bn.from(n,t,r);let a=E8t(e);if(a)return a;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Bn.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}Bn.from=function(e,t,r){return bAe(e,t,r)};Object.setPrototypeOf(Bn.prototype,Uint8Array.prototype);Object.setPrototypeOf(Bn,Uint8Array);function wAe(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function A8t(e,t,r){return wAe(e),e<=0?mg(e):t!==void 0?typeof r=="string"?mg(e).fill(t,r):mg(e).fill(t):mg(e)}Bn.alloc=function(e,t,r){return A8t(e,t,r)};function _H(e){return wAe(e),mg(e<0?0:bH(e)|0)}Bn.allocUnsafe=function(e){return _H(e)};Bn.allocUnsafeSlow=function(e){return _H(e)};function M8t(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Bn.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=TAe(e,t)|0,n=mg(r),a=n.write(e,t);return a!==r&&(n=n.slice(0,a)),n}function mH(e){let t=e.length<0?0:bH(e.length)|0,r=mg(t);for(let n=0;n=K7)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K7.toString(16)+" bytes");return e|0}function k8t(e){return+e!=e&&(e=0),Bn.alloc(+e)}Bn.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==Bn.prototype};Bn.compare=function(t,r){if(g1(t,Uint8Array)&&(t=Bn.from(t,t.offset,t.byteLength)),g1(r,Uint8Array)&&(r=Bn.from(r,r.offset,r.byteLength)),!Bn.isBuffer(t)||!Bn.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,a=r.length;for(let i=0,o=Math.min(n,a);ia.length?(Bn.isBuffer(o)||(o=Bn.from(o)),o.copy(a,i)):Uint8Array.prototype.set.call(a,o,i);else if(Bn.isBuffer(o))o.copy(a,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return a};function TAe(e,t){if(Bn.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||g1(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return xH(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return FAe(e).length;default:if(a)return n?-1:xH(e).length;t=(""+t).toLowerCase(),a=!0}}Bn.byteLength=TAe;function C8t(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return O8t(this,t,r);case"utf8":case"utf-8":return MAe(this,t,r);case"ascii":return q8t(this,t,r);case"latin1":case"binary":return B8t(this,t,r);case"base64":return I8t(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N8t(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Bn.prototype._isBuffer=!0;function A2(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}Bn.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;rr&&(t+=" ... "),""};mAe&&(Bn.prototype[mAe]=Bn.prototype.inspect);Bn.prototype.compare=function(t,r,n,a,i){if(g1(t,Uint8Array)&&(t=Bn.from(t,t.offset,t.byteLength)),!Bn.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),a===void 0&&(a=0),i===void 0&&(i=this.length),r<0||n>t.length||a<0||i>this.length)throw new RangeError("out of range index");if(a>=i&&r>=n)return 0;if(a>=i)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,a>>>=0,i>>>=0,this===t)return 0;let o=i-a,s=n-r,l=Math.min(o,s),u=this.slice(a,i),c=t.slice(r,n);for(let f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,TH(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0)if(a)r=0;else return-1;if(typeof t=="string"&&(t=Bn.from(t,n)),Bn.isBuffer(t))return t.length===0?-1:yAe(e,t,r,n,a);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):yAe(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function yAe(e,t,r,n,a){let i=1,o=e.length,s=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;i=2,o/=2,s/=2,r/=2}function l(c,f){return i===1?c[f]:c.readUInt16BE(f*i)}let u;if(a){let c=-1;for(u=r;uo&&(r=o-s),u=r;u>=0;u--){let c=!0;for(let f=0;fa&&(n=a)):n=a;let i=t.length;n>i/2&&(n=i/2);let o;for(o=0;o>>0,isFinite(n)?(n=n>>>0,a===void 0&&(a="utf8")):(a=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-r;if((n===void 0||n>i)&&(n=i),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");let o=!1;for(;;)switch(a){case"hex":return L8t(this,t,r,n);case"utf8":case"utf-8":return P8t(this,t,r,n);case"ascii":case"latin1":case"binary":return F8t(this,t,r,n);case"base64":return D8t(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R8t(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),o=!0}};Bn.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function I8t(e,t,r){return t===0&&r===e.length?gH.fromByteArray(e):gH.fromByteArray(e.slice(t,r))}function MAe(e,t,r){r=Math.min(e.length,r);let n=[],a=t;for(;a239?4:i>223?3:i>191?2:1;if(a+s<=r){let l,u,c,f;switch(s){case 1:i<128&&(o=i);break;case 2:l=e[a+1],(l&192)===128&&(f=(i&31)<<6|l&63,f>127&&(o=f));break;case 3:l=e[a+1],u=e[a+2],(l&192)===128&&(u&192)===128&&(f=(i&15)<<12|(l&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=e[a+1],u=e[a+2],c=e[a+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(f=(i&15)<<18|(l&63)<<12|(u&63)<<6|c&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),a+=s}return z8t(n)}var xAe=4096;function z8t(e){let t=e.length;if(t<=xAe)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let a="";for(let i=t;in&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}Bn.prototype.readUintLE=Bn.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||Kf(t,r,this.length);let a=this[t],i=1,o=0;for(;++o>>0,r=r>>>0,n||Kf(t,r,this.length);let a=this[t+--r],i=1;for(;r>0&&(i*=256);)a+=this[t+--r]*i;return a};Bn.prototype.readUint8=Bn.prototype.readUInt8=function(t,r){return t=t>>>0,r||Kf(t,1,this.length),this[t]};Bn.prototype.readUint16LE=Bn.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||Kf(t,2,this.length),this[t]|this[t+1]<<8};Bn.prototype.readUint16BE=Bn.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||Kf(t,2,this.length),this[t]<<8|this[t+1]};Bn.prototype.readUint32LE=Bn.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Bn.prototype.readUint32BE=Bn.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Bn.prototype.readBigUInt64LE=Zm(function(t){t=t>>>0,ow(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&$A(t,this.length-8);let a=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,i=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(a)+(BigInt(i)<>>0,ow(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&$A(t,this.length-8);let a=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],i=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(a)<>>0,r=r>>>0,n||Kf(t,r,this.length);let a=this[t],i=1,o=0;for(;++o=i&&(a-=Math.pow(2,8*r)),a};Bn.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||Kf(t,r,this.length);let a=r,i=1,o=this[t+--a];for(;a>0&&(i*=256);)o+=this[t+--a]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o};Bn.prototype.readInt8=function(t,r){return t=t>>>0,r||Kf(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Bn.prototype.readInt16LE=function(t,r){t=t>>>0,r||Kf(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};Bn.prototype.readInt16BE=function(t,r){t=t>>>0,r||Kf(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};Bn.prototype.readInt32LE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Bn.prototype.readInt32BE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Bn.prototype.readBigInt64LE=Zm(function(t){t=t>>>0,ow(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&$A(t,this.length-8);let a=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(a)<>>0,ow(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&$A(t,this.length-8);let a=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(a)<>>0,r||Kf(t,4,this.length),aw.read(this,t,!0,23,4)};Bn.prototype.readFloatBE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),aw.read(this,t,!1,23,4)};Bn.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||Kf(t,8,this.length),aw.read(this,t,!0,52,8)};Bn.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||Kf(t,8,this.length),aw.read(this,t,!1,52,8)};function s0(e,t,r,n,a,i){if(!Bn.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}Bn.prototype.writeUintLE=Bn.prototype.writeUIntLE=function(t,r,n,a){if(t=+t,r=r>>>0,n=n>>>0,!a){let s=Math.pow(2,8*n)-1;s0(this,t,r,n,s,0)}let i=1,o=0;for(this[r]=t&255;++o>>0,n=n>>>0,!a){let s=Math.pow(2,8*n)-1;s0(this,t,r,n,s,0)}let i=n-1,o=1;for(this[r+i]=t&255;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+n};Bn.prototype.writeUint8=Bn.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,1,255,0),this[r]=t&255,r+1};Bn.prototype.writeUint16LE=Bn.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};Bn.prototype.writeUint16BE=Bn.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};Bn.prototype.writeUint32LE=Bn.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};Bn.prototype.writeUint32BE=Bn.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function SAe(e,t,r,n,a){PAe(t,n,a,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,r}function EAe(e,t,r,n,a){PAe(t,n,a,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o=o>>8,e[r+2]=o,o=o>>8,e[r+1]=o,o=o>>8,e[r]=o,r+8}Bn.prototype.writeBigUInt64LE=Zm(function(t,r=0){return SAe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Bn.prototype.writeBigUInt64BE=Zm(function(t,r=0){return EAe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Bn.prototype.writeIntLE=function(t,r,n,a){if(t=+t,r=r>>>0,!a){let l=Math.pow(2,8*n-1);s0(this,t,r,n,l-1,-l)}let i=0,o=1,s=0;for(this[r]=t&255;++i>0)-s&255;return r+n};Bn.prototype.writeIntBE=function(t,r,n,a){if(t=+t,r=r>>>0,!a){let l=Math.pow(2,8*n-1);s0(this,t,r,n,l-1,-l)}let i=n-1,o=1,s=0;for(this[r+i]=t&255;--i>=0&&(o*=256);)t<0&&s===0&&this[r+i+1]!==0&&(s=1),this[r+i]=(t/o>>0)-s&255;return r+n};Bn.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};Bn.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};Bn.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};Bn.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};Bn.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};Bn.prototype.writeBigInt64LE=Zm(function(t,r=0){return SAe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Bn.prototype.writeBigInt64BE=Zm(function(t,r=0){return EAe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function kAe(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function CAe(e,t,r,n,a){return t=+t,r=r>>>0,a||kAe(e,t,r,4,34028234663852886e22,-34028234663852886e22),aw.write(e,t,r,n,23,4),r+4}Bn.prototype.writeFloatLE=function(t,r,n){return CAe(this,t,r,!0,n)};Bn.prototype.writeFloatBE=function(t,r,n){return CAe(this,t,r,!1,n)};function LAe(e,t,r,n,a){return t=+t,r=r>>>0,a||kAe(e,t,r,8,17976931348623157e292,-17976931348623157e292),aw.write(e,t,r,n,52,8),r+8}Bn.prototype.writeDoubleLE=function(t,r,n){return LAe(this,t,r,!0,n)};Bn.prototype.writeDoubleBE=function(t,r,n){return LAe(this,t,r,!1,n)};Bn.prototype.copy=function(t,r,n,a){if(!Bn.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!a&&a!==0&&(a=this.length),r>=t.length&&(r=t.length),r||(r=0),a>0&&a=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),t.length-r>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let i;if(typeof t=="number")for(i=r;i2**32?a=_Ae(String(r)):typeof r=="bigint"&&(a=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(a=_Ae(a)),a+="n"),n+=` It must be ${t}. Received ${a}`,n},RangeError);function _Ae(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function U8t(e,t,r){ow(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&$A(t,e.length-(r+1))}function PAe(e,t,r,n,a,i){if(e>r||e3?t===0||t===BigInt(0)?s=`>= 0${o} and < 2${o} ** ${(i+1)*8}${o}`:s=`>= -(2${o} ** ${(i+1)*8-1}${o}) and < 2 ** ${(i+1)*8-1}${o}`:s=`>= ${t}${o} and <= ${r}${o}`,new iw.ERR_OUT_OF_RANGE("value",s,e)}U8t(n,a,i)}function ow(e,t){if(typeof e!="number")throw new iw.ERR_INVALID_ARG_TYPE(t,"number",e)}function $A(e,t,r){throw Math.floor(e)!==e?(ow(e,r),new iw.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new iw.ERR_BUFFER_OUT_OF_BOUNDS:new iw.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var V8t=/[^+/0-9A-Za-z-_]/g;function G8t(e){if(e=e.split("=")[0],e=e.trim().replace(V8t,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function xH(e,t){t=t||1/0;let r,n=e.length,a=null,i=[];for(let o=0;o55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=(a-55296<<10|r-56320)+65536}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function H8t(e){let t=[];for(let r=0;r>8,a=r%256,i.push(a),i.push(n);return i}function FAe(e){return gH.toByteArray(G8t(e))}function J7(e,t,r,n){let a;for(a=0;a=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function g1(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function TH(e){return e!==e}var W8t=(function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let a=0;a<16;++a)t[n+a]=e[r]+e[a]}return t})();function Zm(e){return typeof BigInt=="undefined"?Y8t:e}function Y8t(){throw new Error("BigInt not supported")}});var Q7=fe((Cyr,DAe)=>{"use strict";DAe.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;t[r]=a;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==a||s.enumerable!==!0)return!1}return!0}});var KA=fe((Lyr,RAe)=>{"use strict";var X8t=Q7();RAe.exports=function(){return X8t()&&!!Symbol.toStringTag}});var eL=fe((Pyr,IAe)=>{"use strict";IAe.exports=Object});var qAe=fe((Fyr,zAe)=>{"use strict";zAe.exports=Error});var OAe=fe((Dyr,BAe)=>{"use strict";BAe.exports=EvalError});var UAe=fe((Ryr,NAe)=>{"use strict";NAe.exports=RangeError});var GAe=fe((Iyr,VAe)=>{"use strict";VAe.exports=ReferenceError});var AH=fe((zyr,HAe)=>{"use strict";HAe.exports=SyntaxError});var lw=fe((qyr,jAe)=>{"use strict";jAe.exports=TypeError});var YAe=fe((Byr,WAe)=>{"use strict";WAe.exports=URIError});var ZAe=fe((Oyr,XAe)=>{"use strict";XAe.exports=Math.abs});var KAe=fe((Nyr,$Ae)=>{"use strict";$Ae.exports=Math.floor});var QAe=fe((Uyr,JAe)=>{"use strict";JAe.exports=Math.max});var t6e=fe((Vyr,e6e)=>{"use strict";e6e.exports=Math.min});var n6e=fe((Gyr,r6e)=>{"use strict";r6e.exports=Math.pow});var a6e=fe((Hyr,i6e)=>{"use strict";i6e.exports=Math.round});var s6e=fe((jyr,o6e)=>{"use strict";o6e.exports=Number.isNaN||function(t){return t!==t}});var u6e=fe((Wyr,l6e)=>{"use strict";var Z8t=s6e();l6e.exports=function(t){return Z8t(t)||t===0?t:t<0?-1:1}});var f6e=fe((Yyr,c6e)=>{"use strict";c6e.exports=Object.getOwnPropertyDescriptor});var S2=fe((Xyr,h6e)=>{"use strict";var tL=f6e();if(tL)try{tL([],"length")}catch(e){tL=null}h6e.exports=tL});var JA=fe((Zyr,d6e)=>{"use strict";var rL=Object.defineProperty||!1;if(rL)try{rL({},"a",{value:1})}catch(e){rL=!1}d6e.exports=rL});var g6e=fe(($yr,p6e)=>{"use strict";var v6e=typeof Symbol!="undefined"&&Symbol,$8t=Q7();p6e.exports=function(){return typeof v6e!="function"||typeof Symbol!="function"||typeof v6e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:$8t()}});var MH=fe((Kyr,m6e)=>{"use strict";m6e.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var SH=fe((Jyr,y6e)=>{"use strict";var K8t=eL();y6e.exports=K8t.getPrototypeOf||null});var b6e=fe((Qyr,_6e)=>{"use strict";var J8t="Function.prototype.bind called on incompatible ",Q8t=Object.prototype.toString,eCt=Math.max,tCt="[object Function]",x6e=function(t,r){for(var n=[],a=0;a{"use strict";var iCt=b6e();w6e.exports=Function.prototype.bind||iCt});var nL=fe((txr,T6e)=>{"use strict";T6e.exports=Function.prototype.call});var iL=fe((rxr,A6e)=>{"use strict";A6e.exports=Function.prototype.apply});var S6e=fe((nxr,M6e)=>{"use strict";M6e.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var EH=fe((ixr,E6e)=>{"use strict";var aCt=uw(),oCt=iL(),sCt=nL(),lCt=S6e();E6e.exports=lCt||aCt.call(sCt,oCt)});var aL=fe((axr,k6e)=>{"use strict";var uCt=uw(),cCt=lw(),fCt=nL(),hCt=EH();k6e.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new cCt("a function is required");return hCt(uCt,fCt,t)}});var R6e=fe((oxr,D6e)=>{"use strict";var dCt=aL(),C6e=S2(),P6e;try{P6e=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var kH=!!P6e&&C6e&&C6e(Object.prototype,"__proto__"),F6e=Object,L6e=F6e.getPrototypeOf;D6e.exports=kH&&typeof kH.get=="function"?dCt([kH.get]):typeof L6e=="function"?function(t){return L6e(t==null?t:F6e(t))}:!1});var oL=fe((sxr,B6e)=>{"use strict";var I6e=MH(),z6e=SH(),q6e=R6e();B6e.exports=I6e?function(t){return I6e(t)}:z6e?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return z6e(t)}:q6e?function(t){return q6e(t)}:null});var CH=fe((lxr,O6e)=>{"use strict";var vCt=Function.prototype.call,pCt=Object.prototype.hasOwnProperty,gCt=uw();O6e.exports=gCt.call(vCt,pCt)});var uL=fe((uxr,j6e)=>{"use strict";var Jo,mCt=eL(),yCt=qAe(),xCt=OAe(),_Ct=UAe(),bCt=GAe(),dw=AH(),hw=lw(),wCt=YAe(),TCt=ZAe(),ACt=KAe(),MCt=QAe(),SCt=t6e(),ECt=n6e(),kCt=a6e(),CCt=u6e(),G6e=Function,LH=function(e){try{return G6e('"use strict"; return ('+e+").constructor;")()}catch(t){}},QA=S2(),LCt=JA(),PH=function(){throw new hw},PCt=QA?(function(){try{return arguments.callee,PH}catch(e){try{return QA(arguments,"callee").get}catch(t){return PH}}})():PH,cw=g6e()(),Jf=oL(),FCt=SH(),DCt=MH(),H6e=iL(),e6=nL(),fw={},RCt=typeof Uint8Array=="undefined"||!Jf?Jo:Jf(Uint8Array),E2={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?Jo:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Jo:ArrayBuffer,"%ArrayIteratorPrototype%":cw&&Jf?Jf([][Symbol.iterator]()):Jo,"%AsyncFromSyncIteratorPrototype%":Jo,"%AsyncFunction%":fw,"%AsyncGenerator%":fw,"%AsyncGeneratorFunction%":fw,"%AsyncIteratorPrototype%":fw,"%Atomics%":typeof Atomics=="undefined"?Jo:Atomics,"%BigInt%":typeof BigInt=="undefined"?Jo:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?Jo:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?Jo:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Jo:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":yCt,"%eval%":eval,"%EvalError%":xCt,"%Float16Array%":typeof Float16Array=="undefined"?Jo:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?Jo:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Jo:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Jo:FinalizationRegistry,"%Function%":G6e,"%GeneratorFunction%":fw,"%Int8Array%":typeof Int8Array=="undefined"?Jo:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Jo:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Jo:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":cw&&Jf?Jf(Jf([][Symbol.iterator]())):Jo,"%JSON%":typeof JSON=="object"?JSON:Jo,"%Map%":typeof Map=="undefined"?Jo:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!cw||!Jf?Jo:Jf(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":mCt,"%Object.getOwnPropertyDescriptor%":QA,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Jo:Promise,"%Proxy%":typeof Proxy=="undefined"?Jo:Proxy,"%RangeError%":_Ct,"%ReferenceError%":bCt,"%Reflect%":typeof Reflect=="undefined"?Jo:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Jo:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!cw||!Jf?Jo:Jf(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Jo:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":cw&&Jf?Jf(""[Symbol.iterator]()):Jo,"%Symbol%":cw?Symbol:Jo,"%SyntaxError%":dw,"%ThrowTypeError%":PCt,"%TypedArray%":RCt,"%TypeError%":hw,"%Uint8Array%":typeof Uint8Array=="undefined"?Jo:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Jo:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Jo:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Jo:Uint32Array,"%URIError%":wCt,"%WeakMap%":typeof WeakMap=="undefined"?Jo:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Jo:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Jo:WeakSet,"%Function.prototype.call%":e6,"%Function.prototype.apply%":H6e,"%Object.defineProperty%":LCt,"%Object.getPrototypeOf%":FCt,"%Math.abs%":TCt,"%Math.floor%":ACt,"%Math.max%":MCt,"%Math.min%":SCt,"%Math.pow%":ECt,"%Math.round%":kCt,"%Math.sign%":CCt,"%Reflect.getPrototypeOf%":DCt};if(Jf)try{null.error}catch(e){N6e=Jf(Jf(e)),E2["%Error.prototype%"]=N6e}var N6e,ICt=function e(t){var r;if(t==="%AsyncFunction%")r=LH("async function () {}");else if(t==="%GeneratorFunction%")r=LH("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=LH("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&Jf&&(r=Jf(a.prototype))}return E2[t]=r,r},U6e={__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"]},t6=uw(),sL=CH(),zCt=t6.call(e6,Array.prototype.concat),qCt=t6.call(H6e,Array.prototype.splice),V6e=t6.call(e6,String.prototype.replace),lL=t6.call(e6,String.prototype.slice),BCt=t6.call(e6,RegExp.prototype.exec),OCt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,NCt=/\\(\\)?/g,UCt=function(t){var r=lL(t,0,1),n=lL(t,-1);if(r==="%"&&n!=="%")throw new dw("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new dw("invalid intrinsic syntax, expected opening `%`");var a=[];return V6e(t,OCt,function(i,o,s,l){a[a.length]=s?V6e(l,NCt,"$1"):o||i}),a},VCt=function(t,r){var n=t,a;if(sL(U6e,n)&&(a=U6e[n],n="%"+a[0]+"%"),sL(E2,n)){var i=E2[n];if(i===fw&&(i=ICt(n)),typeof i=="undefined"&&!r)throw new hw("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:i}}throw new dw("intrinsic "+t+" does not exist!")};j6e.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new hw("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new hw('"allowMissing" argument must be a boolean');if(BCt(/^%?[^%]*%?$/,t)===null)throw new dw("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=UCt(t),a=n.length>0?n[0]:"",i=VCt("%"+a+"%",r),o=i.name,s=i.value,l=!1,u=i.alias;u&&(a=u[0],qCt(n,zCt([0,1],u)));for(var c=1,f=!0;c=n.length){var x=QA(s,v);f=!!x,f&&"get"in x&&!("originalValue"in x.get)?s=x.get:s=s[v]}else f=sL(s,v),s=s[v];f&&!l&&(E2[o]=s)}}return s}});var k2=fe((cxr,X6e)=>{"use strict";var W6e=uL(),Y6e=aL(),GCt=Y6e([W6e("%String.prototype.indexOf%")]);X6e.exports=function(t,r){var n=W6e(t,!!r);return typeof n=="function"&&GCt(t,".prototype.")>-1?Y6e([n]):n}});var K6e=fe((fxr,$6e)=>{"use strict";var HCt=KA()(),jCt=k2(),FH=jCt("Object.prototype.toString"),cL=function(t){return HCt&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:FH(t)==="[object Arguments]"},Z6e=function(t){return cL(t)?!0:t!==null&&typeof t=="object"&&"length"in t&&typeof t.length=="number"&&t.length>=0&&FH(t)!=="[object Array]"&&"callee"in t&&FH(t.callee)==="[object Function]"},WCt=(function(){return cL(arguments)})();cL.isLegacyArguments=Z6e;$6e.exports=WCt?cL:Z6e});var nMe=fe((hxr,rMe)=>{"use strict";var J6e=k2(),YCt=KA()(),XCt=CH(),ZCt=S2(),IH;YCt?(Q6e=J6e("RegExp.prototype.exec"),DH={},fL=function(){throw DH},RH={toString:fL,valueOf:fL},typeof Symbol.toPrimitive=="symbol"&&(RH[Symbol.toPrimitive]=fL),IH=function(t){if(!t||typeof t!="object")return!1;var r=ZCt(t,"lastIndex"),n=r&&XCt(r,"value");if(!n)return!1;try{Q6e(t,RH)}catch(a){return a===DH}}):(eMe=J6e("Object.prototype.toString"),tMe="[object RegExp]",IH=function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:eMe(t)===tMe});var Q6e,DH,fL,RH,eMe,tMe;rMe.exports=IH});var aMe=fe((dxr,iMe)=>{"use strict";var $Ct=k2(),KCt=nMe(),JCt=$Ct("RegExp.prototype.exec"),QCt=lw();iMe.exports=function(t){if(!KCt(t))throw new QCt("`regex` must be a RegExp");return function(n){return JCt(t,n)!==null}}});var sMe=fe((vxr,oMe)=>{"use strict";var e7t=function*(){}.constructor;oMe.exports=()=>e7t});var fMe=fe((pxr,cMe)=>{"use strict";var uMe=k2(),t7t=aMe(),r7t=t7t(/^\s*(?:function)?\*/),n7t=KA()(),lMe=oL(),i7t=uMe("Object.prototype.toString"),a7t=uMe("Function.prototype.toString"),o7t=sMe();cMe.exports=function(t){if(typeof t!="function")return!1;if(r7t(a7t(t)))return!0;if(!n7t){var r=i7t(t);return r==="[object GeneratorFunction]"}if(!lMe)return!1;var n=o7t();return n&&lMe(t)===n.prototype}});var pMe=fe((gxr,vMe)=>{"use strict";var dMe=Function.prototype.toString,vw=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,qH,hL;if(typeof vw=="function"&&typeof Object.defineProperty=="function")try{qH=Object.defineProperty({},"length",{get:function(){throw hL}}),hL={},vw(function(){throw 42},null,qH)}catch(e){e!==hL&&(vw=null)}else vw=null;var s7t=/^\s*class\b/,BH=function(t){try{var r=dMe.call(t);return s7t.test(r)}catch(n){return!1}},zH=function(t){try{return BH(t)?!1:(dMe.call(t),!0)}catch(r){return!1}},dL=Object.prototype.toString,l7t="[object Object]",u7t="[object Function]",c7t="[object GeneratorFunction]",f7t="[object HTMLAllCollection]",h7t="[object HTML document.all class]",d7t="[object HTMLCollection]",v7t=typeof Symbol=="function"&&!!Symbol.toStringTag,p7t=!(0 in[,]),OH=function(){return!1};typeof document=="object"&&(hMe=document.all,dL.call(hMe)===dL.call(document.all)&&(OH=function(t){if((p7t||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=dL.call(t);return(r===f7t||r===h7t||r===d7t||r===l7t)&&t("")==null}catch(n){}return!1}));var hMe;vMe.exports=vw?function(t){if(OH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{vw(t,null,qH)}catch(r){if(r!==hL)return!1}return!BH(t)&&zH(t)}:function(t){if(OH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(v7t)return zH(t);if(BH(t))return!1;var r=dL.call(t);return r!==u7t&&r!==c7t&&!/^\[object HTML/.test(r)?!1:zH(t)}});var yMe=fe((mxr,mMe)=>{"use strict";var g7t=pMe(),m7t=Object.prototype.toString,gMe=Object.prototype.hasOwnProperty,y7t=function(t,r,n){for(var a=0,i=t.length;a=3&&(a=n),b7t(t)?y7t(t,r,a):typeof t=="string"?x7t(t,r,a):_7t(t,r,a)}});var _Me=fe((yxr,xMe)=>{"use strict";xMe.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var wMe=fe((xxr,bMe)=>{"use strict";var NH=_Me(),w7t=typeof globalThis=="undefined"?window:globalThis;bMe.exports=function(){for(var t=[],r=0;r{"use strict";var TMe=JA(),T7t=AH(),pw=lw(),AMe=S2();MMe.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new pw("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new pw("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new pw("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new pw("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new pw("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new pw("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!AMe&&AMe(t,r);if(TMe)TMe(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:a===null&&l?l.enumerable:!a,value:n,writable:i===null&&l?l.writable:!i});else if(s||!a&&!i&&!o)t[r]=n;else throw new T7t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var GH=fe((bxr,EMe)=>{"use strict";var VH=JA(),SMe=function(){return!!VH};SMe.hasArrayLengthDefineBug=function(){if(!VH)return null;try{return VH([],"length",{value:1}).length!==1}catch(t){return!0}};EMe.exports=SMe});var FMe=fe((wxr,PMe)=>{"use strict";var A7t=uL(),kMe=UH(),M7t=GH()(),CMe=S2(),LMe=lw(),S7t=A7t("%Math.floor%");PMe.exports=function(t,r){if(typeof t!="function")throw new LMe("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||S7t(r)!==r)throw new LMe("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],a=!0,i=!0;if("length"in t&&CMe){var o=CMe(t,"length");o&&!o.configurable&&(a=!1),o&&!o.writable&&(i=!1)}return(a||i||!n)&&(M7t?kMe(t,"length",r,!0,!0):kMe(t,"length",r)),t}});var RMe=fe((Txr,DMe)=>{"use strict";var E7t=uw(),k7t=iL(),C7t=EH();DMe.exports=function(){return C7t(E7t,k7t,arguments)}});var r6=fe((Axr,vL)=>{"use strict";var L7t=FMe(),IMe=JA(),P7t=aL(),zMe=RMe();vL.exports=function(t){var r=P7t(arguments),n=1+t.length-(arguments.length-1);return L7t(r,n>0?n:0,!0)};IMe?IMe(vL.exports,"apply",{value:zMe}):vL.exports.apply=zMe});var YH=fe((Mxr,NMe)=>{"use strict";var mL=yMe(),F7t=wMe(),qMe=r6(),jH=k2(),gL=S2(),pL=oL(),D7t=jH("Object.prototype.toString"),OMe=KA()(),BMe=typeof globalThis=="undefined"?window:globalThis,HH=F7t(),WH=jH("String.prototype.slice"),R7t=jH("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1}NMe.exports=function(t){if(!t||typeof t!="object")return!1;if(!OMe){var r=WH(D7t(t),8,-1);return q7t(r)?r:r!=="Object"?!1:z7t(t)}return gL?I7t(t):null}});var VMe=fe((Sxr,UMe)=>{"use strict";var B7t=YH();UMe.exports=function(t){return!!B7t(t)}});var $H=fe(Qo=>{"use strict";var O7t=K6e(),N7t=fMe(),bp=YH(),GMe=VMe();function gw(e){return e.call.bind(e)}var HMe=typeof BigInt!="undefined",jMe=typeof Symbol!="undefined",kv=gw(Object.prototype.toString),U7t=gw(Number.prototype.valueOf),V7t=gw(String.prototype.valueOf),G7t=gw(Boolean.prototype.valueOf);HMe&&(WMe=gw(BigInt.prototype.valueOf));var WMe;jMe&&(YMe=gw(Symbol.prototype.valueOf));var YMe;function i6(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}Qo.isArgumentsObject=O7t;Qo.isGeneratorFunction=N7t;Qo.isTypedArray=GMe;function H7t(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}Qo.isPromise=H7t;function j7t(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):GMe(e)||ZMe(e)}Qo.isArrayBufferView=j7t;function W7t(e){return bp(e)==="Uint8Array"}Qo.isUint8Array=W7t;function Y7t(e){return bp(e)==="Uint8ClampedArray"}Qo.isUint8ClampedArray=Y7t;function X7t(e){return bp(e)==="Uint16Array"}Qo.isUint16Array=X7t;function Z7t(e){return bp(e)==="Uint32Array"}Qo.isUint32Array=Z7t;function $7t(e){return bp(e)==="Int8Array"}Qo.isInt8Array=$7t;function K7t(e){return bp(e)==="Int16Array"}Qo.isInt16Array=K7t;function J7t(e){return bp(e)==="Int32Array"}Qo.isInt32Array=J7t;function Q7t(e){return bp(e)==="Float32Array"}Qo.isFloat32Array=Q7t;function eLt(e){return bp(e)==="Float64Array"}Qo.isFloat64Array=eLt;function tLt(e){return bp(e)==="BigInt64Array"}Qo.isBigInt64Array=tLt;function rLt(e){return bp(e)==="BigUint64Array"}Qo.isBigUint64Array=rLt;function xL(e){return kv(e)==="[object Map]"}xL.working=typeof Map!="undefined"&&xL(new Map);function nLt(e){return typeof Map=="undefined"?!1:xL.working?xL(e):e instanceof Map}Qo.isMap=nLt;function _L(e){return kv(e)==="[object Set]"}_L.working=typeof Set!="undefined"&&_L(new Set);function iLt(e){return typeof Set=="undefined"?!1:_L.working?_L(e):e instanceof Set}Qo.isSet=iLt;function bL(e){return kv(e)==="[object WeakMap]"}bL.working=typeof WeakMap!="undefined"&&bL(new WeakMap);function aLt(e){return typeof WeakMap=="undefined"?!1:bL.working?bL(e):e instanceof WeakMap}Qo.isWeakMap=aLt;function ZH(e){return kv(e)==="[object WeakSet]"}ZH.working=typeof WeakSet!="undefined"&&ZH(new WeakSet);function oLt(e){return ZH(e)}Qo.isWeakSet=oLt;function wL(e){return kv(e)==="[object ArrayBuffer]"}wL.working=typeof ArrayBuffer!="undefined"&&wL(new ArrayBuffer);function XMe(e){return typeof ArrayBuffer=="undefined"?!1:wL.working?wL(e):e instanceof ArrayBuffer}Qo.isArrayBuffer=XMe;function TL(e){return kv(e)==="[object DataView]"}TL.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&TL(new DataView(new ArrayBuffer(1),0,1));function ZMe(e){return typeof DataView=="undefined"?!1:TL.working?TL(e):e instanceof DataView}Qo.isDataView=ZMe;var XH=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function n6(e){return kv(e)==="[object SharedArrayBuffer]"}function $Me(e){return typeof XH=="undefined"?!1:(typeof n6.working=="undefined"&&(n6.working=n6(new XH)),n6.working?n6(e):e instanceof XH)}Qo.isSharedArrayBuffer=$Me;function sLt(e){return kv(e)==="[object AsyncFunction]"}Qo.isAsyncFunction=sLt;function lLt(e){return kv(e)==="[object Map Iterator]"}Qo.isMapIterator=lLt;function uLt(e){return kv(e)==="[object Set Iterator]"}Qo.isSetIterator=uLt;function cLt(e){return kv(e)==="[object Generator]"}Qo.isGeneratorObject=cLt;function fLt(e){return kv(e)==="[object WebAssembly.Module]"}Qo.isWebAssemblyCompiledModule=fLt;function KMe(e){return i6(e,U7t)}Qo.isNumberObject=KMe;function JMe(e){return i6(e,V7t)}Qo.isStringObject=JMe;function QMe(e){return i6(e,G7t)}Qo.isBooleanObject=QMe;function eSe(e){return HMe&&i6(e,WMe)}Qo.isBigIntObject=eSe;function tSe(e){return jMe&&i6(e,YMe)}Qo.isSymbolObject=tSe;function hLt(e){return KMe(e)||JMe(e)||QMe(e)||eSe(e)||tSe(e)}Qo.isBoxedPrimitive=hLt;function dLt(e){return typeof Uint8Array!="undefined"&&(XMe(e)||$Me(e))}Qo.isAnyArrayBuffer=dLt;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(Qo,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var KH=fe((kxr,rSe)=>{rSe.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var nj=fe(es=>{var nSe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},a=0;a=a)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),tj(t)?r.showHidden=t:t&&es._extend(r,t),L2(r.showHidden)&&(r.showHidden=!1),L2(r.depth)&&(r.depth=2),L2(r.colors)&&(r.colors=!1),L2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=pLt),EL(r,e,r.depth)}es.inspect=$m;$m.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]};$m.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function pLt(e,t){var r=$m.styles[t];return r?"\x1B["+$m.colors[r][0]+"m"+e+"\x1B["+$m.colors[r][1]+"m":e}function gLt(e,t){return e}function mLt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function EL(e,t,r){if(e.customInspect&&t&&SL(t.inspect)&&t.inspect!==es.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return LL(n)||(n=EL(e,n,r)),n}var a=yLt(e,t);if(a)return a;var i=Object.keys(t),o=mLt(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),o6(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return JH(t);if(i.length===0){if(SL(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(a6(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(kL(t))return e.stylize(Date.prototype.toString.call(t),"date");if(o6(t))return JH(t)}var l="",u=!1,c=["{","}"];if(aSe(t)&&(u=!0,c=["[","]"]),SL(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(a6(t)&&(l=" "+RegExp.prototype.toString.call(t)),kL(t)&&(l=" "+Date.prototype.toUTCString.call(t)),o6(t)&&(l=" "+JH(t)),i.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return a6(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var v;return u?v=xLt(e,t,r,o,i):v=i.map(function(g){return ej(e,t,r,o,g,u)}),e.seen.pop(),_Lt(v,l,c)}function yLt(e,t){if(L2(t))return e.stylize("undefined","undefined");if(LL(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(oSe(t))return e.stylize(""+t,"number");if(tj(t))return e.stylize(""+t,"boolean");if(CL(t))return e.stylize("null","null")}function JH(e){return"["+Error.prototype.toString.call(e)+"]"}function xLt(e,t,r,n,a){for(var i=[],o=0,s=t.length;o4)){if(r.length===4){if(r[3].type!==Ti.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:Ti.None,value:void 0}),r.every(a=>a.type!==Ti.Alpha)?r:void 0}}function Tot(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==Ti.Function)return;let n=Lre(e,t);if(n)return n.unshift(r.value),n}var Aot=e=>{if(typeof e!="string")return;let t=bot(e),r=t?Tot(t,!0):void 0,n,a=0,i=gb.length;for(;ae==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Dre=Sot,f2=(e,t,r)=>e+r*(t-e),Eot=(e,t,r)=>(r-e)/(t-e),Tz=(e,t,r,n,a,i)=>f2(f2(e,t,a),f2(r,n,a),i),kot=(e,t,r,n,a,i,o,s,l,u,c)=>f2(Tz(e,t,r,n,l,u),Tz(a,i,o,s,l,u),c),Cot=e=>{let t=[];for(let r=0;rt=>{let r=Cot(t);return n=>{let a=n*r.length,i=n>=1?r.length-1:Math.max(Math.floor(a),0),o=r[i];return o===void 0?void 0:e(o[0],o[1],a-i)}},Ui=Rre(f2),Nc=e=>{let t=!1,r=e.map(n=>n!==void 0?(t=!0,n):1);return t?r:e},Lot={mode:"rgb",channels:["r","g","b","alpha"],parse:[Fre,Sre,Ere,Mre,Dre,"srgb"],serialize:"srgb",interpolate:{r:Ui,g:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},v2=Lot,JI=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),Pot=e=>{let t=JI(e.r),r=JI(e.g),n=JI(e.b),a={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*n};return e.alpha!==void 0&&(a.alpha=e.alpha),a},Az=Pot,QI=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Fot=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"a98",r:QI(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:QI(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:QI(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return n!==void 0&&(a.alpha=n),a},Mz=Fot,ez=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},Dot=({r:e,g:t,b:r,alpha:n})=>{let a={mode:"lrgb",r:ez(e),g:ez(t),b:ez(r)};return n!==void 0&&(a.alpha=n),a},p2=Dot,Rot=e=>{let{r:t,g:r,b:n,alpha:a}=p2(e),i={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*n};return a!==void 0&&(i.alpha=a),i},rm=Rot,tz=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},Iot=({r:e,g:t,b:r,alpha:n},a="rgb")=>{let i={mode:a,r:tz(e),g:tz(t),b:tz(r)};return n!==void 0&&(i.alpha=n),i},g2=Iot,zot=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=g2({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return n!==void 0&&(a.alpha=n),a},nm=zot,qot=tl(zo({},v2),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Mz(rm(e)),xyz65:Mz},toMode:{rgb:e=>nm(Az(e)),xyz65:Az}}),Ire=qot,Bot=e=>(e=e%360)<0?e+360:e,Th=Bot,mE=(e,t)=>e.map((r,n,a)=>{if(r===void 0)return r;let i=Th(r);return n===0||e[n-1]===void 0?i:t(i-Th(a[n-1]))}).reduce((r,n)=>!r.length||n===void 0||r[r.length-1]===void 0?(r.push(n),r):(r.push(n+r[r.length-1]),r),[]),Bp=e=>mE(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),Oot=e=>mE(e,t=>Math.abs(t)>=180||t===0?t:t-360*Math.sign(t)),Not=e=>mE(e,t=>t>=0?t:t+360),Uot=e=>mE(e,t=>t<=0?t:t-360),Hf=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Vot=Math.PI/180,Got=180/Math.PI,dre=Hf[3]*Hf[4],vre=Hf[1]*Hf[4],pre=Hf[1]*Hf[2]-Hf[0]*Hf[3],Hot=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=(pre*r+e*dre-t*vre)/(pre+dre-vre),i=r-a,o=(Hf[4]*(t-a)-Hf[2]*i)/Hf[3],s={mode:"cubehelix",l:a,s:a===0||a===1?void 0:Math.sqrt(i*i+o*o)/(Hf[4]*a*(1-a))};return s.s&&(s.h=Math.atan2(o,i)*Got-120),n!==void 0&&(s.alpha=n),s},zre=Hot,jot=({h:e,s:t,l:r,alpha:n})=>{let a={mode:"rgb"};e=(e===void 0?0:e+120)*Vot,r===void 0&&(r=0);let i=t===void 0?0:t*r*(1-r),o=Math.cos(e),s=Math.sin(e);return a.r=r+i*(Hf[0]*o+Hf[1]*s),a.g=r+i*(Hf[2]*o+Hf[3]*s),a.b=r+i*(Hf[4]*o+Hf[5]*s),n!==void 0&&(a.alpha=n),a},qre=jot,O4=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=Th(e.h),n=Th(t.h),a=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*a},Bre=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=Th(e.h),n=Th(t.h);return Math.abs(n-r)>180?r-(n-360*Math.sign(n-r)):n-r},N4=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=Th(e.h),n=Th(t.h),a=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*a},mb=(e="rgb",t=[1,1,1,0])=>{let r=Kh(e),n=r.channels,a=r.difference,i=dl(e);return(o,s)=>{let l=i(o),u=i(s);return Math.sqrt(n.reduce((c,f,v)=>{let g=a[f]?a[f](l,u):l[f]-u[f];return c+(t[v]||0)*Math.pow(isNaN(g)?0:g,2)},0))}},Wot=()=>mb("lab65"),Yot=(e=1,t=.045,r=.015)=>{let n=dl("lab65");return(a,i)=>{let o=n(a),s=n(i),l=o.l,u=o.a,c=o.b,f=Math.sqrt(u*u+c*c),v=s.l,g=s.a,p=s.b,_=Math.sqrt(g*g+p*p),x=Math.pow(l-v,2),y=Math.pow(f-_,2),C=Math.pow(u-g,2)+Math.pow(c-p,2)-y;return Math.sqrt(x/Math.pow(e,2)+y/Math.pow(1+t*f,2)+C/Math.pow(1+r*f,2))}},Xot=(e=1,t=1,r=1)=>{let n=dl("lab65");return(a,i)=>{let o=n(a),s=n(i),l=o.l,u=o.a,c=o.b,f=Math.sqrt(u*u+c*c),v=s.l,g=s.a,p=s.b,_=Math.sqrt(g*g+p*p),x=(f+_)/2,y=.5*(1-Math.sqrt(Math.pow(x,7)/(Math.pow(x,7)+Math.pow(25,7)))),C=u*(1+y),k=g*(1+y),S=Math.sqrt(C*C+c*c),L=Math.sqrt(k*k+p*p),w=Math.abs(C)+Math.abs(c)===0?0:Math.atan2(c,C);w+=(w<0)*2*Math.PI;let T=Math.abs(k)+Math.abs(p)===0?0:Math.atan2(p,k);T+=(T<0)*2*Math.PI;let A=v-l,m=L-S,F=S*L===0?0:T-w;F-=(F>Math.PI)*2*Math.PI,F+=(F<-Math.PI)*2*Math.PI;let E=2*Math.sqrt(S*L)*Math.sin(F/2),I=(l+v)/2,R=(S+L)/2,B;S*L===0?B=w+T:(B=(w+T)/2,B-=(Math.abs(w-T)>Math.PI)*Math.PI,B+=(B<0)*2*Math.PI);let O=Math.pow(I-50,2),U=1-.17*Math.cos(B-Math.PI/6)+.24*Math.cos(2*B)+.32*Math.cos(3*B+Math.PI/30)-.2*Math.cos(4*B-63*Math.PI/180),j=1+.015*O/Math.sqrt(20+O),q=1+.045*R,V=1+.015*R*U,K=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*B-275)/25,2)),ee=2*Math.sqrt(Math.pow(R,7)/(Math.pow(R,7)+Math.pow(25,7))),ce=-1*Math.sin(2*K)*ee;return Math.sqrt(Math.pow(A/(e*j),2)+Math.pow(m/(t*q),2)+Math.pow(E/(r*V),2)+ce*m/(t*q)*E/(r*V))}},Zot=(e=1,t=1)=>{let r=dl("lab65");return(n,a)=>{let i=r(n),o=i.l,s=i.a,l=i.b,u=Math.sqrt(s*s+l*l),c=Math.atan2(l,s);c=c+2*Math.PI*(c<0);let f=r(a),v=f.l,g=f.a,p=f.b,_=Math.sqrt(g*g+p*p),x=Math.pow(o-v,2),y=Math.pow(u-_,2),C=Math.pow(s-g,2)+Math.pow(l-p,2)-y,k=Math.sqrt(Math.pow(u,4)/(Math.pow(u,4)+1900)),S=c>=164/180*Math.PI&&c<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(c+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(c+35/180*Math.PI)),L=o<16?.511:.040975*o/(1+.01765*o),w=.0638*u/(1+.0131*u)+.638,T=w*(k*S+1-k);return Math.sqrt(x/Math.pow(e*L,2)+y/Math.pow(t*w,2)+C/Math.pow(T,2))}},$ot=()=>{let e=dl("lab65");return(t,r)=>{let n=e(t),a=e(r),i=n.l-a.l,o=n.a-a.a,s=n.b-a.b;return Math.abs(i)+Math.sqrt(o*o+s*s)}},Kot=()=>mb("yiq",[.5053,.299,.1957]),Jot=()=>mb("itp",[518400,129600,518400]),Op=e=>{let t=e.reduce((n,a)=>{if(a!==void 0){let i=a*Math.PI/180;n.sin+=Math.sin(i),n.cos+=Math.cos(i)}return n},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r},Ore=e=>{let t=e.filter(r=>r!==void 0);return t.length?t.reduce((r,n)=>r+n,0)/t.length:void 0},rz=e=>typeof e=="function";function Qot(e,t="rgb",r){let n=Kh(t),a=e.map(dl(t));return n.channels.reduce((i,o)=>{let s=a.map(l=>l[o]).filter(l=>l!==void 0);if(s.length){let l;rz(r)?l=r:r&&rz(r[o])?l=r[o]:n.average&&rz(n.average[o])?l=n.average[o]:l=Ore,i[o]=l(s,o)}return i},{mode:t})}var est={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:zre},toMode:{rgb:qre},interpolate:{h:{use:Ui,fixup:Bp},s:Ui,l:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:O4},average:{h:Op}},Nre=est,tst=({l:e,a:t,b:r,alpha:n},a="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let i=Math.sqrt(t*t+r*r),o={mode:a,l:e,c:i};return i&&(o.h=Th(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(o.alpha=n),o},H1=tst,rst=({l:e,c:t,h:r,alpha:n},a="lab")=>{r===void 0&&(r=0);let i={mode:a,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(i.alpha=n),i},j1=rst,Ure=Math.pow(29,3)/Math.pow(3,3),Vre=Math.pow(6,3)/Math.pow(29,3),Oc={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},vb={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},hfr=Math.pow(29,3)/Math.pow(3,3),dfr=Math.pow(6,3)/Math.pow(29,3),nz=e=>Math.pow(e,3)>Vre?Math.pow(e,3):(116*e-16)/Ure,nst=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=(e+16)/116,i=t/500+a,o=a-r/200,s={mode:"xyz65",x:nz(i)*vb.X,y:nz(a)*vb.Y,z:nz(o)*vb.Z};return n!==void 0&&(s.alpha=n),s},Wz=nst,ist=e=>nm(Wz(e)),U4=ist,iz=e=>e>Vre?Math.cbrt(e):(Ure*e+16)/116,ast=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=iz(e/vb.X),i=iz(t/vb.Y),o=iz(r/vb.Z),s={mode:"lab65",l:116*i-16,a:500*(a-i),b:200*(i-o)};return n!==void 0&&(s.alpha=n),s},Yz=ast,ost=e=>{let t=Yz(rm(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},V4=ost,uE=1,Gre=1,B4=26/180*Math.PI,cE=Math.cos(B4),fE=Math.sin(B4),Hre=100/Math.log(139/100),sst=({l:e,c:t,h:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"lab65",l:(Math.exp(e*uE/Hre)-1)/.0039},i=(Math.exp(.0435*t*Gre*uE)-1)/.075,o=i*Math.cos(r/180*Math.PI-B4),s=i*Math.sin(r/180*Math.PI-B4);return a.a=o*cE-s/.83*fE,a.b=o*fE+s/.83*cE,n!==void 0&&(a.alpha=n),a},hE=sst,lst=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=t*cE+r*fE,i=.83*(r*cE-t*fE),o=Math.sqrt(a*a+i*i),s={mode:"dlch",l:Hre/uE*Math.log(1+.0039*e),c:Math.log(1+.075*o)/(.0435*Gre*uE)};return s.c&&(s.h=Th((Math.atan2(i,a)+B4)/Math.PI*180)),n!==void 0&&(s.alpha=n),s},dE=lst,gre=e=>hE(H1(e,"dlch")),mre=e=>j1(dE(e),"dlab"),ust={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:gre,rgb:e=>U4(gre(e))},fromMode:{lab65:mre,rgb:e=>mre(V4(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Ui,a:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}}},jre=ust,cst={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:hE,dlab:e=>j1(e,"dlab"),rgb:e=>U4(hE(e))},fromMode:{lab65:dE,dlab:e=>H1(e,"dlch"),rgb:e=>dE(V4(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Ui,c:Ui,h:{use:Ui,fixup:Bp},alpha:{use:Ui,fixup:Nc}},difference:{h:N4},average:{h:Op}},Wre=cst;function Yre({h:e,s:t,i:r,alpha:n}){e=Th(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:r*(1+t*(3/(2-a)-1)),g:r*(1+t*(3*(1-a)/(2-a)-1)),b:r*(1-t)};break;case 1:i={r:r*(1+t*(3*(1-a)/(2-a)-1)),g:r*(1+t*(3/(2-a)-1)),b:r*(1-t)};break;case 2:i={r:r*(1-t),g:r*(1+t*(3/(2-a)-1)),b:r*(1+t*(3*(1-a)/(2-a)-1))};break;case 3:i={r:r*(1-t),g:r*(1+t*(3*(1-a)/(2-a)-1)),b:r*(1+t*(3/(2-a)-1))};break;case 4:i={r:r*(1+t*(3*(1-a)/(2-a)-1)),g:r*(1-t),b:r*(1+t*(3/(2-a)-1))};break;case 5:i={r:r*(1+t*(3/(2-a)-1)),g:r*(1-t),b:r*(1+t*(3*(1-a)/(2-a)-1))};break;default:i={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return i.mode="rgb",n!==void 0&&(i.alpha=n),i}function Xre({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.max(e,t,r),i=Math.min(e,t,r),o={mode:"hsi",s:e+t+r===0?0:1-3*i/(e+t+r),i:(e+t+r)/3};return a-i!==0&&(o.h=(a===e?(t-r)/(a-i)+(t{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},dst=hst,vst=new RegExp(`^hsla?\\(\\s*${cot}${pb}${z4}${pb}${z4}\\s*(?:,\\s*${Hz}\\s*)?\\)$`),pst=e=>{let t=e.match(vst);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=dst(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},Jre=pst;function gst(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,n,a,i,o]=t;if(n.type!==Ti.None){if(n.type===Ti.Percentage)return;r.h=n.value}if(a.type!==Ti.None){if(a.type===Ti.Hue)return;r.s=a.value/100}if(i.type!==Ti.None){if(i.type===Ti.Hue)return;r.l=i.value/100}return o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var Qre=gst,mst={mode:"hsl",toMode:{rgb:$re},fromMode:{rgb:Kre},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Qre,Jre],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Ui,fixup:Bp},s:Ui,l:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:O4},average:{h:Op}},Xz=mst;function Zz({h:e,s:t,v:r,alpha:n}){e=Th(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r,g:r*(1-t*a),b:r*(1-t)};break;case 1:i={r:r*(1-t*a),g:r,b:r*(1-t)};break;case 2:i={r:r*(1-t),g:r,b:r*(1-t*a)};break;case 3:i={r:r*(1-t),g:r*(1-t*a),b:r};break;case 4:i={r:r*(1-t*a),g:r*(1-t),b:r};break;case 5:i={r,g:r*(1-t),b:r*(1-t*a)};break;default:i={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return i.mode="rgb",n!==void 0&&(i.alpha=n),i}function $z({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.max(e,t,r),i=Math.min(e,t,r),o={mode:"hsv",s:a===0?0:1-i/a,v:a};return a-i!==0&&(o.h=(a===e?(t-r)/(a-i)+(t1){let a=t+r;t/=a,r/=a}return Zz({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:n})}function tne(e){let t=$z(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,n=t.v!==void 0?t.v:0,a={mode:"hwb",w:(1-r)*n,b:1-n};return t.h!==void 0&&(a.h=t.h),t.alpha!==void 0&&(a.alpha=t.alpha),a}function xst(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,n,a,i,o]=t;if(n.type!==Ti.None){if(n.type===Ti.Percentage)return;r.h=n.value}if(a.type!==Ti.None){if(a.type===Ti.Hue)return;r.w=a.value/100}if(i.type!==Ti.None){if(i.type===Ti.Hue)return;r.b=i.value/100}return o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var rne=xst,_st={mode:"hwb",toMode:{rgb:ene},fromMode:{rgb:tne},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[rne],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Ui,fixup:Bp},w:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:Bre},average:{h:Op}},nne=_st,ine=203,yE=.1593017578125,ane=78.84375,xE=.8359375,_E=18.8515625,bE=18.6875;function az(e){if(e<0)return 0;let t=Math.pow(e,1/ane);return 1e4*Math.pow(Math.max(0,t-xE)/(_E-bE*t),1/yE)}function oz(e){if(e<0)return 0;let t=Math.pow(e/1e4,yE);return Math.pow((xE+_E*t)/(1+bE*t),ane)}var sz=e=>Math.max(e/ine,0),bst=({i:e,t,p:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=az(e+.008609037037932761*t+.11102962500302593*r),i=az(e-.00860903703793275*t-.11102962500302599*r),o=az(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:sz(2.070152218389422*a-1.3263473389671556*i+.2066510476294051*o),y:sz(.3647385209748074*a+.680566024947227*i-.0453045459220346*o),z:sz(-.049747207535812*a-.0492609666966138*i+1.1880659249923042*o)};return n!==void 0&&(s.alpha=n),s},Sz=bst,lz=(e=0)=>Math.max(e*ine,0),wst=({x:e,y:t,z:r,alpha:n})=>{let a=lz(e),i=lz(t),o=lz(r),s=oz(.3592832590121217*a+.6976051147779502*i-.0358915932320289*o),l=oz(-.1920808463704995*a+1.1004767970374323*i+.0753748658519118*o),u=oz(.0070797844607477*a+.0748396662186366*i+.8433265453898765*o),c=.5*s+.5*l,f=1.61376953125*s-3.323486328125*l+1.709716796875*u,v=4.378173828125*s-4.24560546875*l-.132568359375*u,g={mode:"itp",i:c,t:f,p:v};return n!==void 0&&(g.alpha=n),g},Ez=wst,Tst={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Sz,rgb:e=>nm(Sz(e))},fromMode:{xyz65:Ez,rgb:e=>Ez(rm(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Ui,t:Ui,p:Ui,alpha:{use:Ui,fixup:Nc}}},one=Tst,Ast=134.03437499999998,Mst=16295499532821565e-27,uz=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,yE);return Math.pow((xE+_E*t)/(1+bE*t),Ast)},cz=(e=0)=>Math.max(e*203,0),Sst=({x:e,y:t,z:r,alpha:n})=>{e=cz(e),t=cz(t),r=cz(r);let a=1.15*e-.15*r,i=.66*t+.34*e,o=uz(.41478972*a+.579999*i+.014648*r),s=uz(-.20151*a+1.120649*i+.0531008*r),l=uz(-.0166008*a+.2648*i+.6684799*r),u=(o+s)/2,c={mode:"jab",j:.44*u/(1-.56*u)-Mst,a:3.524*o-4.066708*s+.542708*l,b:.199076*o+1.096799*s-1.295875*l};return n!==void 0&&(c.alpha=n),c},Jz=Sst,Est=134.03437499999998,yre=16295499532821565e-27,fz=e=>{if(e<0)return 0;let t=Math.pow(e,1/Est);return 1e4*Math.pow((xE-t)/(bE*t-_E),1/yE)},hz=e=>e/203,kst=({j:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=(e+yre)/(.44+.56*(e+yre)),i=fz(a+.13860504*t+.058047316*r),o=fz(a-.13860504*t-.058047316*r),s=fz(a-.096019242*t-.8118919*r),l={mode:"xyz65",x:hz(1.661373024652174*i-.914523081304348*o+.23136208173913045*s),y:hz(-.3250758611844533*i+1.571847026732543*o-.21825383453227928*s),z:hz(-.090982811*i-.31272829*o+1.5227666*s)};return n!==void 0&&(l.alpha=n),l},Qz=kst,Cst=e=>{let t=Jz(rm(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},eq=Cst,Lst=e=>nm(Qz(e)),tq=Lst,Pst={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:eq,xyz65:Jz},toMode:{rgb:tq,xyz65:Qz},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Ui,a:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}}},sne=Pst,Fst=({j:e,a:t,b:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:"jch",j:e,c:a};return a&&(i.h=Th(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},kz=Fst,Dst=({j:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let a={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},Cz=Dst,Rst={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Cz,rgb:e=>tq(Cz(e))},fromMode:{rgb:e=>kz(eq(e)),jab:kz},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Ui,fixup:Bp},c:Ui,j:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:N4},average:{h:Op}},lne=Rst,wE=Math.pow(29,3)/Math.pow(3,3),rq=Math.pow(6,3)/Math.pow(29,3),dz=e=>Math.pow(e,3)>rq?Math.pow(e,3):(116*e-16)/wE,Ist=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=(e+16)/116,i=t/500+a,o=a-r/200,s={mode:"xyz50",x:dz(i)*Oc.X,y:dz(a)*Oc.Y,z:dz(o)*Oc.Z};return n!==void 0&&(s.alpha=n),s},TE=Ist,zst=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=g2({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return n!==void 0&&(a.alpha=n),a},yb=zst,qst=e=>yb(TE(e)),nq=qst,Bst=e=>{let{r:t,g:r,b:n,alpha:a}=p2(e),i={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*n};return a!==void 0&&(i.alpha=a),i},xb=Bst,vz=e=>e>rq?Math.cbrt(e):(wE*e+16)/116,Ost=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=vz(e/Oc.X),i=vz(t/Oc.Y),o=vz(r/Oc.Z),s={mode:"lab",l:116*i-16,a:500*(a-i),b:200*(i-o)};return n!==void 0&&(s.alpha=n),s},AE=Ost,Nst=e=>{let t=AE(xb(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},iq=Nst;function Ust(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,n,a,i,o]=t;if(!(n.type===Ti.Hue||a.type===Ti.Hue||i.type===Ti.Hue))return n.type!==Ti.None&&(r.l=Math.min(Math.max(0,n.value),100)),a.type!==Ti.None&&(r.a=a.type===Ti.Number?a.value:a.value*125/100),i.type!==Ti.None&&(r.b=i.type===Ti.Number?i.value:i.value*125/100),o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var une=Ust,Vst={mode:"lab",toMode:{xyz50:TE,rgb:nq},fromMode:{xyz50:AE,rgb:iq},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[une],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:Ui,a:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}}},ME=Vst,Gst=tl(zo({},ME),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Wz,rgb:U4},fromMode:{xyz65:Yz,rgb:V4},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),cne=Gst;function Hst(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,n,a,i,o]=t;if(n.type!==Ti.None){if(n.type===Ti.Hue)return;r.l=Math.min(Math.max(0,n.value),100)}if(a.type!==Ti.None&&(r.c=Math.max(0,a.type===Ti.Number?a.value:a.value*150/100)),i.type!==Ti.None){if(i.type===Ti.Percentage)return;r.h=i.value}return o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var fne=Hst,jst={mode:"lch",toMode:{lab:j1,rgb:e=>nq(j1(e))},fromMode:{rgb:e=>H1(iq(e)),lab:H1},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[fne],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Ui,fixup:Bp},c:Ui,l:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:N4},average:{h:Op}},SE=jst,Wst=tl(zo({},SE),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>j1(e,"lab65"),rgb:e=>U4(j1(e,"lab65"))},fromMode:{rgb:e=>H1(V4(e),"lch65"),lab65:e=>H1(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),hne=Wst,Yst=({l:e,u:t,v:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:"lchuv",l:e,c:a};return a&&(i.h=Th(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},aq=Yst,Xst=({l:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let a={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},oq=Xst,dne=(e,t,r)=>4*e/(e+15*t+3*r),vne=(e,t,r)=>9*t/(e+15*t+3*r),Zst=dne(Oc.X,Oc.Y,Oc.Z),$st=vne(Oc.X,Oc.Y,Oc.Z),Kst=e=>e<=rq?wE*e:116*Math.cbrt(e)-16,Jst=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Kst(t/Oc.Y),i=dne(e,t,r),o=vne(e,t,r);!isFinite(i)||!isFinite(o)?a=i=o=0:(i=13*a*(i-Zst),o=13*a*(o-$st));let s={mode:"luv",l:a,u:i,v:o};return n!==void 0&&(s.alpha=n),s},vE=Jst,Qst=(e,t,r)=>4*e/(e+15*t+3*r),elt=(e,t,r)=>9*t/(e+15*t+3*r),tlt=Qst(Oc.X,Oc.Y,Oc.Z),rlt=elt(Oc.X,Oc.Y,Oc.Z),nlt=({l:e,u:t,v:r,alpha:n})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let a=t/(13*e)+tlt,i=r/(13*e)+rlt,o=Oc.Y*(e<=8?e/wE:Math.pow((e+16)/116,3)),s=o*(9*a)/(4*i),l=o*(12-3*a-20*i)/(4*i),u={mode:"xyz50",x:s,y:o,z:l};return n!==void 0&&(u.alpha=n),u},pE=nlt,ilt=e=>aq(vE(xb(e))),alt=e=>yb(pE(oq(e))),olt={mode:"lchuv",toMode:{luv:oq,rgb:alt},fromMode:{rgb:ilt,luv:aq},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:Ui,fixup:Bp},c:Ui,l:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:N4},average:{h:Op}},pne=olt,slt=tl(zo({},v2),{mode:"lrgb",toMode:{rgb:g2},fromMode:{rgb:p2},parse:["srgb-linear"],serialize:"srgb-linear"}),gne=slt,llt={mode:"luv",toMode:{xyz50:pE,rgb:e=>yb(pE(e))},fromMode:{xyz50:vE,rgb:e=>vE(xb(e))},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:Ui,u:Ui,v:Ui,alpha:{use:Ui,fixup:Nc}}},mne=llt,ult=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),i=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),o=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*a+.7936177747023054*i-.0040720430116193*o,a:1.9779985324311684*a-2.42859224204858*i+.450593709617411*o,b:.0259040424655478*a+.7827717124575296*i-.8086757549230774*o};return n!==void 0&&(s.alpha=n),s},sq=ult,clt=e=>{let t=sq(p2(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},G4=clt,flt=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),i=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),o=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*a-3.3077115392580616*i+.2309699031821044*o,g:-1.2684379732850317*a+2.6097573492876887*i-.3413193760026573*o,b:-.0041960761386756*a-.7034186179359362*i+1.7076146940746117*o};return n!==void 0&&(s.alpha=n),s},_b=flt,hlt=e=>g2(_b(e)),H4=hlt;function Lz(e){let n=1.170873786407767;return .5*(n*e-.206+Math.sqrt((n*e-.206)*(n*e-.206)+4*.03*n*e))}function gE(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function dlt(e,t){let r,n,a,i,o,s,l,u;-1.88170328*e-.80936493*t>1?(r=1.19086277,n=1.76576728,a=.59662641,i=.75515197,o=.56771245,s=4.0767416621,l=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,n=-.45954404,a=.08285427,i=.1254107,o=.14503204,s=-1.2684380046,l=2.6097574011,u=-.3413193965):(r=1.35733652,n=-.00915799,a=-1.1513021,i=-.50559606,o=.00692167,s=-.0041960863,l=-.7034186147,u=1.707614701);let c=r+n*e+a*t+i*e*e+o*e*t,f=.3963377774*e+.2158037573*t,v=-.1055613458*e-.0638541728*t,g=-.0894841775*e-1.291485548*t;{let p=1+c*f,_=1+c*v,x=1+c*g,y=p*p*p,C=_*_*_,k=x*x*x,S=3*f*p*p,L=3*v*_*_,w=3*g*x*x,T=6*f*f*p,A=6*v*v*_,m=6*g*g*x,F=s*y+l*C+u*k,E=s*S+l*L+u*w,I=s*T+l*A+u*m;c=c-F*E/(E*E-.5*F*I)}return c}function lq(e,t){let r=dlt(e,t),n=_b({l:1,a:r*e,b:r*t}),a=Math.cbrt(1/Math.max(n.r,n.g,n.b)),i=a*r;return[a,i]}function vlt(e,t,r,n,a,i=null){i||(i=lq(e,t));let o;if((r-a)*i[1]-(i[0]-a)*n<=0)o=i[1]*a/(n*i[0]+i[1]*(a-r));else{o=i[1]*(a-1)/(n*(i[0]-1)+i[1]*(a-r));{let s=r-a,l=n,u=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,v=s+l*u,g=s+l*c,p=s+l*f;{let _=a*(1-o)+o*r,x=o*n,y=_+x*u,C=_+x*c,k=_+x*f,S=y*y*y,L=C*C*C,w=k*k*k,T=3*v*y*y,A=3*g*C*C,m=3*p*k*k,F=6*v*v*y,E=6*g*g*C,I=6*p*p*k,R=4.0767416621*S-3.3077115913*L+.2309699292*w-1,B=4.0767416621*T-3.3077115913*A+.2309699292*m,O=4.0767416621*F-3.3077115913*E+.2309699292*I,U=B/(B*B-.5*R*O),j=-R*U,q=-1.2684380046*S+2.6097574011*L-.3413193965*w-1,V=-1.2684380046*T+2.6097574011*A-.3413193965*m,K=-1.2684380046*F+2.6097574011*E-.3413193965*I,ee=V/(V*V-.5*q*K),ce=-q*ee,me=-.0041960863*S-.7034186147*L+1.707614701*w-1,ye=-.0041960863*T-.7034186147*A+1.707614701*m,ue=-.0041960863*F-.7034186147*E+1.707614701*I,J=ye/(ye*ye-.5*me*ue),_e=-me*J;j=U>=0?j:1e6,ce=ee>=0?ce:1e6,_e=J>=0?_e:1e6,o+=Math.min(j,Math.min(ce,_e))}}}return o}function uq(e,t,r=null){r||(r=lq(e,t));let n=r[0],a=r[1];return[a/n,a/(1-n)]}function yne(e,t,r){let n=lq(t,r),a=vlt(t,r,e,1,e,n),i=uq(t,r,n),o=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),l=a/Math.min(e*i[0],(1-e)*i[1]),u=e*o,c=(1-e)*s,f=.9*l*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(c*c*c*c))));return u=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(u*u)+1/(c*c))),f,a]}function Pz(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,a={mode:"okhsl",l:Lz(t)};e.alpha!==void 0&&(a.alpha=e.alpha);let i=Math.sqrt(r*r+n*n);if(!i)return a.s=0,a;let[o,s,l]=yne(t,r/i,n/i),u;if(iPz(G4(e))},toMode:{oklab:Fz,rgb:e=>H4(Fz(e))}}),xne=plt;function Dz(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,a=Math.sqrt(r*r+n*n),i=a?r/a:1,o=a?n/a:1,[s,l]=uq(i,o),u=.5,c=1-u/s,f=l/(a+t*l),v=f*t,g=f*a,p=gE(v),_=g*p/v,x=_b({l:p,a:i*_,b:o*_}),y=Math.cbrt(1/Math.max(x.r,x.g,x.b,0));t=t/y,a=a/y*Lz(t)/t,t=Lz(t);let C={mode:"okhsv",s:a?(u+l)*g/(l*u+l*c*g):0,v:t?t/v:0};return C.s&&(C.h=Th(Math.atan2(n,r)*180/Math.PI)),e.alpha!==void 0&&(C.alpha=e.alpha),C}function Rz(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,a=e.v!==void 0?e.v:0,i=Math.cos(r/180*Math.PI),o=Math.sin(r/180*Math.PI),[s,l]=uq(i,o),u=.5,c=1-u/s,f=1-n*u/(u+l-l*c*n),v=n*l*u/(u+l-l*c*n),g=gE(f),p=v*g/f,_=_b({l:g,a:i*p,b:o*p}),x=Math.cbrt(1/Math.max(_.r,_.g,_.b,0)),y=gE(a*f),C=v*y/f;return t.l=y*x,t.a=C*i*x,t.b=C*o*x,t}var glt=tl(zo({},Kz),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Dz,rgb:e=>Dz(G4(e))},toMode:{oklab:Rz,rgb:e=>H4(Rz(e))}}),_ne=glt;function mlt(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,n,a,i,o]=t;if(!(n.type===Ti.Hue||a.type===Ti.Hue||i.type===Ti.Hue))return n.type!==Ti.None&&(r.l=Math.min(Math.max(0,n.type===Ti.Number?n.value:n.value/100),1)),a.type!==Ti.None&&(r.a=a.type===Ti.Number?a.value:a.value*.4/100),i.type!==Ti.None&&(r.b=i.type===Ti.Number?i.value:i.value*.4/100),o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var bne=mlt,ylt=tl(zo({},ME),{mode:"oklab",toMode:{lrgb:_b,rgb:H4},fromMode:{lrgb:sq,rgb:G4},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[bne],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`}),wne=ylt;function xlt(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,n,a,i,o]=t;if(n.type!==Ti.None){if(n.type===Ti.Hue)return;r.l=Math.min(Math.max(0,n.type===Ti.Number?n.value:n.value/100),1)}if(a.type!==Ti.None&&(r.c=Math.max(0,a.type===Ti.Number?a.value:a.value*.4/100)),i.type!==Ti.None){if(i.type===Ti.Percentage)return;r.h=i.value}return o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var Tne=xlt,_lt=tl(zo({},SE),{mode:"oklch",toMode:{oklab:e=>j1(e,"oklab"),rgb:e=>H4(j1(e,"oklab"))},fromMode:{rgb:e=>H1(G4(e),"oklch"),oklab:e=>H1(e,"oklch")},parse:[Tne],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),Ane=_lt,blt=e=>{let{r:t,g:r,b:n,alpha:a}=p2(e),i={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*n,z:0*t+.0451133818589026*r+1.043944368900976*n};return a!==void 0&&(i.alpha=a),i},Iz=blt,wlt=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=g2({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return n!==void 0&&(a.alpha=n),a},zz=wlt,Tlt=tl(zo({},v2),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>zz(rm(e)),xyz65:zz},toMode:{rgb:e=>nm(Iz(e)),xyz65:Iz}}),Mne=Tlt,pz=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},Alt=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"prophoto",r:pz(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:pz(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:pz(e*0+t*0+1.2119675456389452*r)};return n!==void 0&&(a.alpha=n),a},qz=Alt,gz=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},Mlt=e=>{let t=gz(e.r),r=gz(e.g),n=gz(e.b),a={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*n,z:0*t+0*r+.8251046025104602*n};return e.alpha!==void 0&&(a.alpha=e.alpha),a},Bz=Mlt,Slt=tl(zo({},v2),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:qz,rgb:e=>qz(xb(e))},toMode:{xyz50:Bz,rgb:e=>yb(Bz(e))}}),Sne=Slt,xre=1.09929682680944,Elt=.018053968510807,mz=e=>{let t=Math.abs(e);return t>Elt?(Math.sign(e)||1)*(xre*Math.pow(t,.45)-(xre-1)):4.5*e},klt=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"rec2020",r:mz(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:mz(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:mz(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return n!==void 0&&(a.alpha=n),a},Oz=klt,_re=1.09929682680944,Clt=.018053968510807,yz=(e=0)=>{let t=Math.abs(e);return t{let t=yz(e.r),r=yz(e.g),n=yz(e.b),a={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*r+.059301716469862*n,z:0*t+.0280726930490874*r+1.0609850577107909*n};return e.alpha!==void 0&&(a.alpha=e.alpha),a},Nz=Llt,Plt=tl(zo({},v2),{mode:"rec2020",fromMode:{xyz65:Oz,rgb:e=>Oz(rm(e))},toMode:{xyz65:Nz,rgb:e=>nm(Nz(e))},parse:["rec2020"],serialize:"rec2020"}),Ene=Plt,h2=.0037930732552754493,kne=Math.cbrt(h2),xz=e=>Math.cbrt(e)-kne,Flt=e=>{let{r:t,g:r,b:n,alpha:a}=p2(e),i=xz(.3*t+.622*r+.078*n+h2),o=xz(.23*t+.692*r+.078*n+h2),s=xz(.2434226892454782*t+.2047674442449682*r+.5518098665095535*n+h2),l={mode:"xyb",x:(i-o)/2,y:(i+o)/2,b:s-(i+o)/2};return a!==void 0&&(l.alpha=a),l},Cne=Flt,_z=e=>Math.pow(e+kne,3),Dlt=({x:e,y:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=_z(e+t)-h2,i=_z(t-e)-h2,o=_z(r+t)-h2,s=g2({r:11.031566904639861*a-9.866943908131562*i-.16462299650829934*o,g:-3.2541473810744237*a+4.418770377582723*i-.16462299650829934*o,b:-3.6588512867136815*a+2.7129230459360922*i+1.9459282407775895*o});return n!==void 0&&(s.alpha=n),s},Lne=Dlt,Rlt={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:Lne},fromMode:{rgb:Cne},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Ui,y:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}}},Pne=Rlt,Ilt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:yb,lab:AE},fromMode:{rgb:xb,lab:TE},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Ui,y:Ui,z:Ui,alpha:{use:Ui,fixup:Nc}}},Fne=Ilt,zlt=e=>{let{x:t,y:r,z:n,alpha:a}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let i={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*n};return a!==void 0&&(i.alpha=a),i},Dne=zlt,qlt=e=>{let{x:t,y:r,z:n,alpha:a}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let i={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*n};return a!==void 0&&(i.alpha=a),i},Rne=qlt,Blt={mode:"xyz65",toMode:{rgb:nm,xyz50:Dne},fromMode:{rgb:rm,xyz50:Rne},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:Ui,y:Ui,z:Ui,alpha:{use:Ui,fixup:Nc}}},Ine=Blt,Olt=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return n!==void 0&&(a.alpha=n),a},zne=Olt,Nlt=({y:e,i:t,q:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return n!==void 0&&(a.alpha=n),a},qne=Nlt,Ult={mode:"yiq",toMode:{rgb:qne},fromMode:{rgb:zne},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Ui,i:Ui,q:Ui,alpha:{use:Ui,fixup:Nc}}},Bne=Ult,Vlt=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,Glt=(e=4)=>t=>typeof t=="number"?Vlt(t,e):t,One=Glt,I4=One(2),q4=e=>Math.max(0,Math.min(1,e||0)),d2=e=>Math.round(q4(e)*255),cq=dl("rgb"),Hlt=dl("hsl"),fq=e=>{if(e===void 0)return;let t=d2(e.r),r=d2(e.g),n=d2(e.b);return"#"+(1<<24|t<<16|r<<8|n).toString(16).slice(1)},Nne=e=>{if(e===void 0)return;let t=d2(e.alpha!==void 0?e.alpha:1);return fq(e)+(256|t).toString(16).slice(1)},Une=e=>{if(e===void 0)return;let t=d2(e.r),r=d2(e.g),n=d2(e.b);return e.alpha===void 0||e.alpha===1?`rgb(${t}, ${r}, ${n})`:`rgba(${t}, ${r}, ${n}, ${I4(q4(e.alpha))})`},Vne=e=>{if(e===void 0)return;let t=I4(e.h||0),r=I4(q4(e.s)*100)+"%",n=I4(q4(e.l)*100)+"%";return e.alpha===void 0||e.alpha===1?`hsl(${t}, ${r}, ${n})`:`hsla(${t}, ${r}, ${n}, ${I4(q4(e.alpha))})`},jlt=e=>{let t=$v(e);if(!t)return;let r=Kh(t.mode);if(!r.serialize||typeof r.serialize=="string"){let n=`color(${r.serialize||`--${t.mode}`} `;return r.channels.forEach((a,i)=>{a!=="alpha"&&(n+=(i?" ":"")+(t[a]!==void 0?t[a]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(n+=` / ${t.alpha}`),n+")"}if(typeof r.serialize=="function")return r.serialize(t)},Wlt=e=>fq(cq(e)),Ylt=e=>Nne(cq(e)),Xlt=e=>Une(cq(e)),Zlt=e=>Vne(Hlt(e)),$lt={normal:(e,t)=>t,multiply:(e,t)=>e*t,screen:(e,t)=>e+t-e*t,"hard-light":(e,t)=>t<.5?e*2*t:2*t*(1-e)-1,overlay:(e,t)=>e<.5?t*2*e:2*e*(1-t)-1,darken:(e,t)=>Math.min(e,t),lighten:(e,t)=>Math.max(e,t),"color-dodge":(e,t)=>e===0?0:t===1?1:Math.min(1,e/(1-t)),"color-burn":(e,t)=>e===1?1:t===0?0:1-Math.min(1,(1-e)/t),"soft-light":(e,t)=>t<.5?e-(1-2*t)*e*(1-e):e+(2*t-1)*((e<.25?((16*e-12)*e+4)*e:Math.sqrt(e))-e),difference:(e,t)=>Math.abs(e-t),exclusion:(e,t)=>e+t-2*e*t},Klt=(e,t="normal",r="rgb")=>{let n=typeof t=="function"?t:$lt[t],a=dl(r),i=Kh(r).channels;return e.map(s=>{let l=a(s);return l.alpha===void 0&&(l.alpha=1),l}).reduce((s,l)=>{if(s===void 0)return l;let u=l.alpha+s.alpha*(1-l.alpha);return i.reduce((c,f)=>(f!=="alpha"&&(u===0?c[f]=0:(c[f]=l.alpha*(1-s.alpha)*l[f]+l.alpha*s.alpha*n(s[f],l[f])+(1-l.alpha)*s.alpha*s[f],c[f]=Math.max(0,Math.min(1,c[f]/u)))),c),{mode:r,alpha:u})})},Jlt=Klt,Qlt=([e,t])=>e+Math.random()*(t-e),eut=e=>Object.keys(e).reduce((t,r)=>{let n=e[r];return t[r]=Array.isArray(n)?n:[n,n],t},{}),tut=(e="rgb",t={})=>{let r=Kh(e),n=eut(t);return r.channels.reduce((a,i)=>((n.alpha||i!=="alpha")&&(a[i]=Qlt(n[i]||r.ranges[i])),a),{mode:e})},rut=tut,j4=(e,t="rgb",r=!1)=>{let n=t?Kh(t).channels:null,a=t?dl(t):$v;return i=>{let o=a(i);if(!o)return;let s=(n||Kh(o.mode).channels).reduce((u,c)=>{let f=e(o[c],c,o,t);return f!==void 0&&!isNaN(f)&&(u[c]=f),u},{mode:o.mode});if(!r)return s;let l=$v(i);return l&&l.mode!==s.mode?dl(l.mode)(s):s}},Gne=(e,t,r)=>t!=="alpha"?(e||0)*(r.alpha!==void 0?r.alpha:1):e,Hne=(e,t,r)=>t!=="alpha"&&r.alpha!==0?(e||0)/(r.alpha!==void 0?r.alpha:1):e,hq=(e=1,t=0)=>(r,n)=>n!=="alpha"?r*e+t:r,nut=(e=1,t=1,r=0)=>(n,a)=>a!=="alpha"?e*Math.pow(n,t)+r:n,iut=e=>{e[0]===void 0&&(e[0]=0),e[e.length-1]===void 0&&(e[e.length-1]=1);let t=1,r,n,a,i;for(;tt=>e<=0?1:e>=1?0:Math.pow(t,Math.log(.5)/Math.log(e)),jne=out,oE=e=>typeof e=="function",c2=e=>e&&typeof e=="object",bre=e=>typeof e=="number",Wne=(e,t="rgb",r,n)=>{let a=Kh(t),i=dl(t),o=[],s=[],l={};e.forEach(v=>{Array.isArray(v)?(o.push(i(v[0])),s.push(v[1])):bre(v)||oE(v)?l[s.length]=v:(o.push(i(v)),s.push(void 0))}),aut(s);let u=a.channels.reduce((v,g)=>{let p;return c2(r)&&c2(r[g])&&r[g].fixup?p=r[g].fixup:c2(a.interpolate[g])&&a.interpolate[g].fixup?p=a.interpolate[g].fixup:p=_=>_,v[g]=p(o.map(_=>_[g])),v},{});if(n){let v=o.map((g,p)=>a.channels.reduce((_,x)=>(_[x]=u[x][p],_),{mode:t}));u=a.channels.reduce((g,p)=>(g[p]=v.map(_=>{let x=n(_[p],p,_,t);return isNaN(x)?void 0:x}),g),{})}let c=a.channels.reduce((v,g)=>{let p;return oE(r)?p=r:c2(r)&&oE(r[g])?p=r[g]:c2(r)&&c2(r[g])&&r[g].use?p=r[g].use:oE(a.interpolate[g])?p=a.interpolate[g]:c2(a.interpolate[g])&&(p=a.interpolate[g].use),v[g]=p(u[g]),v},{}),f=o.length-1;return v=>{if(v=Math.min(Math.max(0,v),1),v<=s[0])return o[0];if(v>s[f])return o[f];let g=0;for(;s[g]{let L=c[S](C);return L!==void 0&&(k[S]=L),k},{mode:t})}},sut=(e,t="rgb",r)=>Wne(e,t,r),Yne=(e,t)=>(r,n="rgb",a)=>{let i=t?j4(t,n):void 0,o=Wne(r,n,a,e);return i?s=>i(o(s)):o},lut=Yne(Gne,Hne),sE=(e,t)=>(e+t)%t,Xne=(e,t,r,n,a)=>{let i=a*a,o=i*a;return((1-3*a+3*i-o)*e+(4-6*i+3*o)*t+(1+3*a+3*i-3*o)*r+o*n)/6},Zne=e=>t=>{let r=e.length-1,n=t>=1?r-1:Math.max(0,Math.floor(t*r));return Xne(n>0?e[n-1]:2*e[n]-e[n+1],e[n],e[n+1],nt=>{let r=e.length-1,n=Math.floor(t*r);return Xne(e[sE(n-1,e.length)],e[sE(n,e.length)],e[sE(n+1,e.length)],e[sE(n+2,e.length)],(t-n/r)*r)},Kne=e=>{let t,r=e.length-1,n=new Array(r),a=new Array(r),i=new Array(r);for(n[1]=1/4,a[1]=(6*e[1]-e[0])/4,t=2;t0&&(i[r-1]=a[r-1]),t=r-2;t>0;--t)i[t]=a[t]-n[t]*i[t+1];return i},uut=e=>Zne(Kne(e)),cut=e=>$ne(Kne(e)),db=Math.sign,Uz=Math.min,b0=Math.abs,dq=e=>{let t=e.length-1,r=[],n=[],a=[];for(let i=0;i0?.5*(e[i+1]-e[i-1])*t:void 0),a.push(i>0?(db(r[i-1])+db(r[i]))*Uz(b0(r[i-1]),b0(r[i]),.5*b0(n[i])):void 0);return[r,n,a]},vq=(e,t,r)=>{let n=e.length-1,a=n*n;return i=>{let o;i>=1?o=n-1:o=Math.max(0,Math.floor(i*n));let s=i-o/n,l=s*s,u=l*s;return(t[o]+t[o+1]-2*r[o])*a*u+(3*r[o]-2*t[o]-t[o+1])*n*l+t[o]*s+e[o]}},fut=e=>{if(e.length<3)return Ui(e);let t=e.length-1,[r,,n]=dq(e);return n[0]=r[0],n[t]=r[t-1],vq(e,n,r)},hut=e=>{if(e.length<3)return Ui(e);let t=e.length-1,[r,n,a]=dq(e);return n[0]=(e[1]*2-e[0]*1.5-e[2]*.5)*t,n[t]=(e[t]*1.5-e[t-1]*2+e[t-2]*.5)*t,a[0]=n[0]*r[0]<=0?0:b0(n[0])>2*b0(r[0])?2*r[0]:n[0],a[t]=n[t]*r[t-1]<=0?0:b0(n[t])>2*b0(r[t-1])?2*r[t-1]:n[t],vq(e,a,r)},dut=e=>{let t=e.length-1,[r,n,a]=dq(e);n[0]=.5*(e[1]-e[t])*t,n[t]=.5*(e[0]-e[t-1])*t;let i=(e[0]-e[t])*t,o=i;return a[0]=(db(i)+db(r[0]))*Uz(b0(i),b0(r[0]),.5*b0(n[0])),a[t]=(db(r[t-1])+db(o))*Uz(b0(r[t-1]),b0(o),.5*b0(n[t])),vq(e,a,r)},vut=(e=1)=>e===1?t=>t:t=>Math.pow(t,e),Jne=vut,put=(e=2,t=1)=>{let r=Jne(t);if(e<2)return e<1?[]:[r(.5)];let n=[];for(let a=0;a{let t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},tie=e=>eie(Qne(e)),rie=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function pq(e){return rie(Qne(e))}function EE(e="rgb"){let{gamut:t}=Kh(e);if(!t)return n=>!0;let r=dl(typeof t=="string"?t:e);return n=>rie(r(n))}function mut(e){return e=$v(e),e===void 0||pq(e)?e:dl(e.mode)(tie(e))}function gq(e="rgb"){let{gamut:t}=Kh(e);if(!t)return i=>$v(i);let r=typeof t=="string"?t:e,n=dl(r),a=EE(r);return i=>{let o=$v(i);if(!o)return;let s=n(o);if(a(s))return o;let l=eie(s);return o.mode===l.mode?l:dl(o.mode)(l)}}function yut(e,t="lch",r="rgb"){e=$v(e);let n=r==="rgb"?pq:EE(r),a=r==="rgb"?tie:gq(r);if(e===void 0||n(e))return e;let i=dl(e.mode);e=dl(t)(e);let o=tl(zo({},e),{c:0});if(!n(o))return i(a(o));let s=0,l=e.c!==void 0?e.c:0,u=Kh(t).ranges.c,c=(u[1]-u[0])/Math.pow(2,13),f=o.c;for(;l-s>c;)o.c=s+(l-s)*.5,n(o)?(f=o.c,s=o.c):l=o.c;return i(n(o)?o:tl(zo({},o),{c:f}))}function xut(e="rgb",t="oklch",r=mb("oklch"),n=.02){let a=dl(e),i=Kh(e);if(!i.gamut)return c=>a(c);let o=EE(e),s=gq(e),l=dl(t),{ranges:u}=Kh(t);if(!u.l||!u.c)throw new Error("LCH-like space expected");return c=>{if(c=$v(c),c===void 0)return;let f=zo({},l(c));if(f.l===void 0&&(f.l=0),f.c===void 0&&(f.c=0),f.l>=u.l[1]){let x=tl(zo({},i.white),{mode:e});return c.alpha!==void 0&&(x.alpha=c.alpha),x}if(f.l<=u.l[0]){let x=tl(zo({},i.black),{mode:e});return c.alpha!==void 0&&(x.alpha=c.alpha),x}if(o(f))return a(f);let v=0,g=f.c,p=(u.c[1]-u.c[0])/4e3,_=s(f);for(;g-v>p;)f.c=(v+g)*.5,_=s(f),o(f)||r&&n>0&&r(f,_)<=n?v=f.c:g=f.c;return a(o(f)?f:_)}}var _ut=(e,t=mb(),r=n=>n)=>{let n=e.map((a,i)=>({color:r(a),i}));return(a,i=1,o=1/0)=>(isFinite(i)&&(i=Math.max(1,Math.min(i,n.length-1))),n.forEach(s=>{s.d=t(a,s.color)}),n.sort((s,l)=>s.d-l.d).slice(0,i).filter(s=>s.de[s.i]))},but=_ut,mq=e=>Math.max(e,0),yq=e=>Math.max(Math.min(e,1),0),wut=(e,t,r)=>e===void 0||t===void 0?void 0:e+r*(t-e),Tut=e=>{let t=1-yq(e);return[.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1]},Aut=e=>{let t=mq(e);return[.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1]},Mut=e=>{let t=1-yq(e);return[.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1]},Sut=e=>{let t=Math.PI*e/180,r=Math.cos(t),n=Math.sin(t);return[.213+r*.787-n*.213,.715-r*.715-n*.715,.072-r*.072+n*.928,0,.213-r*.213+n*.143,.715+r*.285+n*.14,.072-r*.072-n*.283,0,.213-r*.213-n*.787,.715-r*.715+n*.715,.072+r*.928+n*.072,0,0,0,0,1]},kE=(e,t,r=!1)=>{let n=dl(t),a=Kh(t).channels;return i=>{let o=n(i);if(!o)return;let s={mode:t},l,u=a.length;for(let f=0;f{let r=mq(e);return j4(hq(r),t,!0)},kut=(e=1,t="rgb")=>{let r=mq(e);return j4(hq(r,(1-r)/2),t,!0)},Cut=(e=1,t="rgb")=>kE(Tut(e),t,!0),Lut=(e=1,t="rgb")=>kE(Aut(e),t,!0),Put=(e=1,t="rgb")=>kE(Mut(e),t,!0),Fut=(e=1,t="rgb")=>{let r=yq(e);return j4((n,a)=>a==="alpha"?n:wut(r,1-r,n),t,!0)},Dut=(e=0,t="rgb")=>kE(Sut(e),t,!0),Rut=dl("rgb"),Iut=[[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]],zut=[[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]],qut=[[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]],xq=(e,t)=>{let r=Math.max(0,Math.min(1,t)),n=Math.round(r/.1),a=Math.round(r%.1),i=e[n];if(a>0&&nf2(i[l],o[l],a))}return o=>{let s=$v(o);if(s===void 0)return;let{r:l,g:u,b:c}=Rut(s),f={mode:"rgb",r:i[0]*l+i[1]*u+i[2]*c,g:i[3]*l+i[4]*u+i[5]*c,b:i[6]*l+i[7]*u+i[8]*c};return s.alpha!==void 0&&(f.alpha=s.alpha),dl(s.mode)(f)}},But=(e=1)=>xq(Iut,e),Out=(e=1)=>xq(zut,e),Nut=(e=1)=>xq(qut,e),Uut=e=>e*e*(3-2*e),Vut=e=>.5-Math.sin(Math.asin(1-2*e)/3),Gut=e=>e*e*e*(e*(e*6-15)+10),Hut=Gut,jut=e=>(1-Math.cos(e*Math.PI))/2,Wut=jut;function Vz(e){let t=dl("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function Yut(e,t){let r=Vz(e),n=Vz(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}var Xut=Rs(Ire),Zut=Rs(Nre),$ut=Rs(jre),Kut=Rs(Wre),Jut=Rs(Zre),Qut=Rs(Xz),ect=Rs(Kz),tct=Rs(nne),rct=Rs(one),nct=Rs(sne),ict=Rs(lne),act=Rs(ME),oct=Rs(cne),sct=Rs(SE),lct=Rs(hne),uct=Rs(pne),cct=Rs(gne),fct=Rs(mne),hct=Rs(xne),dct=Rs(_ne),vct=Rs(wne),pct=Rs(Ane),gct=Rs(Mne),mct=Rs(Sne),yct=Rs(Ene),xct=Rs(v2),_ct=Rs(Pne),bct=Rs(Fne),wct=Rs(Ine),Tct=Rs(Bne)});var im=fe((gfr,lie)=>{"use strict";var aie={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:{}}},oie={};function sie(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),sie(n,t[r]))}}sie(aie,oie);lie.exports={configAttributes:aie,dfltConfig:oie}});var bq=fe((mfr,uie)=>{"use strict";var _q=xi(),Act=aa(),W4=[];uie.exports=function(e,t,r){var s;if(((s=r==null?void 0:r._context)==null?void 0:s.displayNotifier)===!1||W4.indexOf(e)!==-1)return;W4.push(e);var n=1e3;Act(t)?n=t:t==="long"&&(n=3e3);var a=_q.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var i=a.selectAll(".notifier-note").data(W4);function o(l){l.duration(700).style("opacity",0).each("end",function(u){var c=W4.indexOf(u);c!==-1&&W4.splice(c,1),_q.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var u=_q.select(this);u.append("button").classed("notifier-close",!0).html("×").on("click",function(){u.transition().call(o)});for(var c=u.append("p"),f=l.split(//g),v=0;v{"use strict";var bb=im().dfltConfig,wq=bq(),Tq=cie.exports={};Tq.log=function(){var e;if(bb.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};Tq.warn=function(){var e;if(bb.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};Tq.error=function(){var e;if(bb.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var tc=fe(m2=>{"use strict";m2.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];m2.defaultLine="#444";m2.lightLine="#eee";m2.background="#fff";m2.borderLine="#BEC8D9";m2.lightFraction=1e3/11});var ni=fe((_fr,xie)=>{"use strict";var{converter:fie,formatHex:Mct,formatRgb:Sct,wcagContrast:Ect,wcagLuminance:kct}=iie(),{isArrayOrTypedArray:hie}=Gf(),{warn:Cct}=W1(),{background:X4,defaultLine:Sq,defaults:Lct,lightLine:Pct}=tc(),die=fie("rgb"),Fct=fie("hsl"),vie=e=>{if(typeof e!="string")return;let t=e.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(t))try{return die(t)}catch(r){return}},Jh=e=>e>0?e>1?1:e:0,Dct={mode:"rgb",r:0,g:0,b:0,alpha:1},Aq=e=>Math.round(e*255e6)/255e6,pie=e=>tl(zo({},e),{r:Aq(e.r),g:Aq(e.g),b:Aq(e.b)}),w0=e=>Sct(pie(e)),Rct=e=>Mct(pie(e)),Ict=e=>{var t,r,n,a;return typeof e=="string"?`"${e}"`:hie(e)?`${(r=(t=e.constructor)==null?void 0:t.name)!=null?r:"Array"}(${e.length})`:typeof e=="object"?(a=(n=e.constructor)==null?void 0:n.name)!=null?a:"Object":`${typeof e} ${e}`},eu=(e,t)=>{var n;let r=vie(e);return r?((n=r.alpha)!=null||(r.alpha=1),r):(!t&&e!=null&&Cct(`Invalid color specifier: ${Ict(e)}. Defaulting to "#000"`),Dct)},Y4=e=>w0(tl(zo({},eu(e)),{alpha:1})),zct=e=>e?eu(e).alpha:0,gie=e=>hie(e)&&e.length>2&&Number.isFinite(e[0])&&Number.isFinite(e[1])&&Number.isFinite(e[2]),qct=e=>{let[t,r,n,a]=e,i=Math.max(t,r,n)>1?1/255:1,o=a!=null?a:1;return{mode:"rgb",r:t*i,g:r*i,b:n*i,alpha:o>1?o/255:o}},Bct=(e,t)=>{let r=gie(e)?qct(e):eu(e,!0),n=[Jh(r.r),Jh(r.g),Jh(r.b),Jh(r.alpha)];return t==="uint8"||t==="uint8_clamped"?Uint8Array.from(n,a=>Math.round(a*255)):t==="float32"?Float32Array.from(n):t==="float64"?Float64Array.from(n):n},Oct=(e,t)=>w0(tl(zo({},eu(e)),{alpha:Jh(t)})),mie=(e,t)=>{let r=eu(e),n=r.alpha;if(n===1)return w0(r);let a=eu(t||X4),i=a.alpha,o=(s,l)=>(i===1?l:1-i+l*i)*(1-n)+s*n;return w0({mode:"rgb",r:o(r.r,a.r),g:o(r.g,a.g),b:o(r.b,a.b)})},Nct=(e,t,r)=>{let n=eu(e),a=eu(t),i=(o,s)=>r*o+(1-r)*s;return w0({mode:"rgb",r:i(n.r,a.r),g:i(n.g,a.g),b:i(n.b,a.b)})},Mq=(e,t)=>{let r=eu(e),n=Fct(r)||{mode:"hsl",h:0,s:0,l:0};return w0(die(tl(zo({},n),{l:Jh((n.l*100+t)/100),alpha:r.alpha})))},CE=(e,t)=>Ect(eu(e),eu(t)),yie=e=>CE(e,X4)>CE(e,Sq),Uct=w0(eu(X4)),Vct=w0(eu(Sq)),Gct=(e,t,r)=>(eu(e).alpha!==1&&(e=mie(e,X4)),yie(e)?t?Mq(e,t):Uct:r?Mq(e,-r):Vct),Hct=(e,t)=>{e.style({stroke:Y4(t),"stroke-opacity":eu(t).alpha})},jct=(e,t)=>{e.style({fill:Y4(t),"fill-opacity":eu(t).alpha})},Wct=(e,t)=>!!(e&&t&&Y4(e)===Y4(t)),Yct=e=>vie(e)!==void 0,Xct=(e,t)=>{t=t===0?0:t||10;let r=eu(e),n=t/100;return w0(tl(zo({},r),{r:Jh(r.r+n),g:Jh(r.g+n),b:Jh(r.b+n)}))},Zct=(e,t,r)=>{let n=eu(e),a=eu(t),i=r/100,o=a.alpha-n.alpha,s=2*i-1,l=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,u=1-l,c=(f,v)=>u*f+l*v;return w0({mode:"rgb",r:c(n.r,a.r),g:c(n.g,a.g),b:c(n.b,a.b),alpha:n.alpha*(1-i)+a.alpha*i})},$ct=(e,t=["#000","#fff"])=>{let r,n=-1/0;for(let a of t){let i=CE(e,a);i>n&&(n=i,r=w0(eu(a)))}return r},Kct=e=>w0(eu(e)),Jct=e=>Rct(eu(e)).toUpperCase(),Qct=e=>{let t=eu(e);return[Jh(t.r)*255,Jh(t.g)*255,Jh(t.b)*255,Jh(t.alpha)]},eft=([e,t,r,n])=>w0({mode:"rgb",r:e/255,g:t/255,b:r/255,alpha:n}),tft=e=>{let t=eu(e);return kct({mode:"rgb",r:Jh(t.r),g:Jh(t.g),b:Jh(t.b)})};xie.exports={addOpacity:Oct,adjustLightness:Mq,background:X4,brighten:Xct,combine:mie,contrast:Gct,defaultLine:Sq,defaults:Lct,equals:Wct,fill:jct,hexString:Jct,interpolate:Nct,isChannelArray:gie,isDark:yie,isValid:Yct,lightLine:Pct,luminosity:tft,mix:Zct,mostReadable:$ct,normalize:Bct,opacity:zct,parse:eu,rgb:Y4,rgbaArray:Qct,rgbaArrayToString:eft,rgbaString:Kct,stroke:Hct,wcagContrast:CE}});var y2=fe((wfr,wie)=>{"use strict";var rft=ni(),LE={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)"]]},_ie=LE.RdBu;function nft(e,t){if(t||(t=_ie),!e)return t;function r(){try{e=LE[e]||JSON.parse(e)}catch(n){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),bie(e)?e:t}function bie(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r{"use strict";Tie.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var wb={};zp(wb,{counter:()=>aft});function aft(e,t="",r,n){let a=t+(r?"":"$"),i=n===!1?"":"^";return e==="xy"?new RegExp(i+"x"+Eq+"y"+Eq+a):new RegExp(i+e+Eq+a)}var Eq,Tb=Lo(()=>{"use strict";Eq="([2-9]|[1-9][0-9]+)?"});var Sie=fe(Kd=>{"use strict";var kq=aa(),Aie=ta().extendFlat,oft=Ho(),sft=y2(),Cq=ni(),lft=Y1().DESELECTDIM,Ab=S4(),Mie=(Tb(),Gs(wb)).counter,uft=(fb(),Gs(cb)).modHalf,Kv=Gf().isArrayOrTypedArray,am=Gf().isTypedArraySpec,om=Gf().decodeTypedArraySpec;Kd.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(Kv(e)?e:am(e)?om(e):r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),n.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;ni===!0||i===!1;a(e)||n.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,n){am(e)&&(e=om(e)),!kq(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}am(e)&&(e=om(e)),e%1||!kq(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if(typeof e!="string"){var a=typeof e=="number";n.strict===!0||!a?t.set(r):t.set(String(e))}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){am(e)&&(e=om(e)),Cq.isValid(e)?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){!Array.isArray(e)||!e.length?t.set(r):e.every(n=>Cq.isValid(n))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(sft.get(e,r))}},angle:{coerceFunction:function(e,t,r){am(e)&&(e=om(e)),e==="auto"?t.set("auto"):kq(e)?t.set(uft(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var a=n.regex||Mie(r);let i=o=>typeof o=="string"&&a.test(o);i(e)||n.arrayOk&&Kv(e)&&e.length>0&&e.every(i)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!Mie(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!="string"){t.set(r);return}for(var a=e.split("+"),i=0;i{"use strict";Eie.exports=function(){}});var Lq=fe((Sfr,kie)=>{"use strict";kie.exports=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),a=0;a{Cie.exports=cft;function cft(){var e=new Float32Array(16);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}});var Fie=fe((kfr,Pie)=>{Pie.exports=fft;function fft(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}});var Rie=fe((Cfr,Die)=>{Die.exports=hft;function hft(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var Pq=fe((Lfr,Iie)=>{Iie.exports=dft;function dft(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}});var qie=fe((Pfr,zie)=>{zie.exports=vft;function vft(e,t){if(e===t){var r=t[1],n=t[2],a=t[3],i=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=i,e[11]=t[14],e[12]=a,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}});var Oie=fe((Ffr,Bie)=>{Bie.exports=pft;function pft(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],v=t[10],g=t[11],p=t[12],_=t[13],x=t[14],y=t[15],C=r*s-n*o,k=r*l-a*o,S=r*u-i*o,L=n*l-a*s,w=n*u-i*s,T=a*u-i*l,A=c*_-f*p,m=c*x-v*p,F=c*y-g*p,E=f*x-v*_,I=f*y-g*_,R=v*y-g*x,B=C*R-k*I+S*E+L*F-w*m+T*A;return B?(B=1/B,e[0]=(s*R-l*I+u*E)*B,e[1]=(a*I-n*R-i*E)*B,e[2]=(_*T-x*w+y*L)*B,e[3]=(v*w-f*T-g*L)*B,e[4]=(l*F-o*R-u*m)*B,e[5]=(r*R-a*F+i*m)*B,e[6]=(x*S-p*T-y*k)*B,e[7]=(c*T-v*S+g*k)*B,e[8]=(o*I-s*F+u*A)*B,e[9]=(n*F-r*I-i*A)*B,e[10]=(p*w-_*S+y*C)*B,e[11]=(f*S-c*w-g*C)*B,e[12]=(s*m-o*E-l*A)*B,e[13]=(r*E-n*m+a*A)*B,e[14]=(_*k-p*L-x*C)*B,e[15]=(c*L-f*k+v*C)*B,e):null}});var Uie=fe((Dfr,Nie)=>{Nie.exports=gft;function gft(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],v=t[10],g=t[11],p=t[12],_=t[13],x=t[14],y=t[15];return e[0]=s*(v*y-g*x)-f*(l*y-u*x)+_*(l*g-u*v),e[1]=-(n*(v*y-g*x)-f*(a*y-i*x)+_*(a*g-i*v)),e[2]=n*(l*y-u*x)-s*(a*y-i*x)+_*(a*u-i*l),e[3]=-(n*(l*g-u*v)-s*(a*g-i*v)+f*(a*u-i*l)),e[4]=-(o*(v*y-g*x)-c*(l*y-u*x)+p*(l*g-u*v)),e[5]=r*(v*y-g*x)-c*(a*y-i*x)+p*(a*g-i*v),e[6]=-(r*(l*y-u*x)-o*(a*y-i*x)+p*(a*u-i*l)),e[7]=r*(l*g-u*v)-o*(a*g-i*v)+c*(a*u-i*l),e[8]=o*(f*y-g*_)-c*(s*y-u*_)+p*(s*g-u*f),e[9]=-(r*(f*y-g*_)-c*(n*y-i*_)+p*(n*g-i*f)),e[10]=r*(s*y-u*_)-o*(n*y-i*_)+p*(n*u-i*s),e[11]=-(r*(s*g-u*f)-o*(n*g-i*f)+c*(n*u-i*s)),e[12]=-(o*(f*x-v*_)-c*(s*x-l*_)+p*(s*v-l*f)),e[13]=r*(f*x-v*_)-c*(n*x-a*_)+p*(n*v-a*f),e[14]=-(r*(s*x-l*_)-o*(n*x-a*_)+p*(n*l-a*s)),e[15]=r*(s*v-l*f)-o*(n*v-a*f)+c*(n*l-a*s),e}});var Gie=fe((Rfr,Vie)=>{Vie.exports=mft;function mft(e){var t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],v=e[11],g=e[12],p=e[13],_=e[14],x=e[15],y=t*o-r*i,C=t*s-n*i,k=t*l-a*i,S=r*s-n*o,L=r*l-a*o,w=n*l-a*s,T=u*p-c*g,A=u*_-f*g,m=u*x-v*g,F=c*_-f*p,E=c*x-v*p,I=f*x-v*_;return y*I-C*E+k*F+S*m-L*A+w*T}});var jie=fe((Ifr,Hie)=>{Hie.exports=yft;function yft(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],v=t[9],g=t[10],p=t[11],_=t[12],x=t[13],y=t[14],C=t[15],k=r[0],S=r[1],L=r[2],w=r[3];return e[0]=k*n+S*s+L*f+w*_,e[1]=k*a+S*l+L*v+w*x,e[2]=k*i+S*u+L*g+w*y,e[3]=k*o+S*c+L*p+w*C,k=r[4],S=r[5],L=r[6],w=r[7],e[4]=k*n+S*s+L*f+w*_,e[5]=k*a+S*l+L*v+w*x,e[6]=k*i+S*u+L*g+w*y,e[7]=k*o+S*c+L*p+w*C,k=r[8],S=r[9],L=r[10],w=r[11],e[8]=k*n+S*s+L*f+w*_,e[9]=k*a+S*l+L*v+w*x,e[10]=k*i+S*u+L*g+w*y,e[11]=k*o+S*c+L*p+w*C,k=r[12],S=r[13],L=r[14],w=r[15],e[12]=k*n+S*s+L*f+w*_,e[13]=k*a+S*l+L*v+w*x,e[14]=k*i+S*u+L*g+w*y,e[15]=k*o+S*c+L*p+w*C,e}});var Yie=fe((zfr,Wie)=>{Wie.exports=xft;function xft(e,t,r){var n=r[0],a=r[1],i=r[2],o,s,l,u,c,f,v,g,p,_,x,y;return t===e?(e[12]=t[0]*n+t[4]*a+t[8]*i+t[12],e[13]=t[1]*n+t[5]*a+t[9]*i+t[13],e[14]=t[2]*n+t[6]*a+t[10]*i+t[14],e[15]=t[3]*n+t[7]*a+t[11]*i+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],v=t[6],g=t[7],p=t[8],_=t[9],x=t[10],y=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=v,e[7]=g,e[8]=p,e[9]=_,e[10]=x,e[11]=y,e[12]=o*n+c*a+p*i+t[12],e[13]=s*n+f*a+_*i+t[13],e[14]=l*n+v*a+x*i+t[14],e[15]=u*n+g*a+y*i+t[15]),e}});var Zie=fe((qfr,Xie)=>{Xie.exports=_ft;function _ft(e,t,r){var n=r[0],a=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var Kie=fe((Bfr,$ie)=>{$ie.exports=bft;function bft(e,t,r,n){var a=n[0],i=n[1],o=n[2],s=Math.sqrt(a*a+i*i+o*o),l,u,c,f,v,g,p,_,x,y,C,k,S,L,w,T,A,m,F,E,I,R,B,O;return Math.abs(s)<1e-6?null:(s=1/s,a*=s,i*=s,o*=s,l=Math.sin(r),u=Math.cos(r),c=1-u,f=t[0],v=t[1],g=t[2],p=t[3],_=t[4],x=t[5],y=t[6],C=t[7],k=t[8],S=t[9],L=t[10],w=t[11],T=a*a*c+u,A=i*a*c+o*l,m=o*a*c-i*l,F=a*i*c-o*l,E=i*i*c+u,I=o*i*c+a*l,R=a*o*c+i*l,B=i*o*c-a*l,O=o*o*c+u,e[0]=f*T+_*A+k*m,e[1]=v*T+x*A+S*m,e[2]=g*T+y*A+L*m,e[3]=p*T+C*A+w*m,e[4]=f*F+_*E+k*I,e[5]=v*F+x*E+S*I,e[6]=g*F+y*E+L*I,e[7]=p*F+C*E+w*I,e[8]=f*R+_*B+k*O,e[9]=v*R+x*B+S*O,e[10]=g*R+y*B+L*O,e[11]=p*R+C*B+w*O,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var Qie=fe((Ofr,Jie)=>{Jie.exports=wft;function wft(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],v=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*a+u*n,e[5]=o*a+c*n,e[6]=s*a+f*n,e[7]=l*a+v*n,e[8]=u*a-i*n,e[9]=c*a-o*n,e[10]=f*a-s*n,e[11]=v*a-l*n,e}});var tae=fe((Nfr,eae)=>{eae.exports=Tft;function Tft(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],v=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a-u*n,e[1]=o*a-c*n,e[2]=s*a-f*n,e[3]=l*a-v*n,e[8]=i*n+u*a,e[9]=o*n+c*a,e[10]=s*n+f*a,e[11]=l*n+v*a,e}});var nae=fe((Ufr,rae)=>{rae.exports=Aft;function Aft(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],v=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a+u*n,e[1]=o*a+c*n,e[2]=s*a+f*n,e[3]=l*a+v*n,e[4]=u*a-i*n,e[5]=c*a-o*n,e[6]=f*a-s*n,e[7]=v*a-l*n,e}});var aae=fe((Vfr,iae)=>{iae.exports=Mft;function Mft(e,t,r){var n,a,i,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,s*=u,l*=u,n=Math.sin(t),a=Math.cos(t),i=1-a,e[0]=o*o*i+a,e[1]=s*o*i+l*n,e[2]=l*o*i-s*n,e[3]=0,e[4]=o*s*i-l*n,e[5]=s*s*i+a,e[6]=l*s*i+o*n,e[7]=0,e[8]=o*l*i+s*n,e[9]=s*l*i-o*n,e[10]=l*l*i+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var sae=fe((Gfr,oae)=>{oae.exports=Sft;function Sft(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=n+n,l=a+a,u=i+i,c=n*s,f=n*l,v=n*u,g=a*l,p=a*u,_=i*u,x=o*s,y=o*l,C=o*u;return e[0]=1-(g+_),e[1]=f+C,e[2]=v-y,e[3]=0,e[4]=f-C,e[5]=1-(c+_),e[6]=p+x,e[7]=0,e[8]=v+y,e[9]=p-x,e[10]=1-(c+g),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var uae=fe((Hfr,lae)=>{lae.exports=Eft;function Eft(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var fae=fe((jfr,cae)=>{cae.exports=kft;function kft(e,t){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]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var dae=fe((Wfr,hae)=>{hae.exports=Cft;function Cft(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var pae=fe((Yfr,vae)=>{vae.exports=Lft;function Lft(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var mae=fe((Xfr,gae)=>{gae.exports=Pft;function Pft(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,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}});var xae=fe((Zfr,yae)=>{yae.exports=Fft;function Fft(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r+r,s=n+n,l=a+a,u=r*o,c=n*o,f=n*s,v=a*o,g=a*s,p=a*l,_=i*o,x=i*s,y=i*l;return e[0]=1-f-p,e[1]=c+y,e[2]=v-x,e[3]=0,e[4]=c-y,e[5]=1-u-p,e[6]=g+_,e[7]=0,e[8]=v+x,e[9]=g-_,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var bae=fe(($fr,_ae)=>{_ae.exports=Dft;function Dft(e,t,r,n,a,i,o){var s=1/(r-t),l=1/(a-n),u=1/(i-o);return e[0]=i*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(a+n)*l,e[10]=(o+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*u,e[15]=0,e}});var Tae=fe((Kfr,wae)=>{wae.exports=Rft;function Rft(e,t,r,n,a){var i=1/Math.tan(t/2),o=1/(n-a);return e[0]=i/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*n*o,e[15]=0,e}});var Mae=fe((Jfr,Aae)=>{Aae.exports=Ift;function Ift(e,t,r,n){var a=Math.tan(t.upDegrees*Math.PI/180),i=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(a+i);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(a-i)*u*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}});var Eae=fe((Qfr,Sae)=>{Sae.exports=zft;function zft(e,t,r,n,a,i,o){var s=1/(t-r),l=1/(n-a),u=1/(i-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(a+n)*l,e[14]=(o+i)*u,e[15]=1,e}});var Cae=fe((ehr,kae)=>{var qft=Pq();kae.exports=Bft;function Bft(e,t,r,n){var a,i,o,s,l,u,c,f,v,g,p=t[0],_=t[1],x=t[2],y=n[0],C=n[1],k=n[2],S=r[0],L=r[1],w=r[2];return Math.abs(p-S)<1e-6&&Math.abs(_-L)<1e-6&&Math.abs(x-w)<1e-6?qft(e):(c=p-S,f=_-L,v=x-w,g=1/Math.sqrt(c*c+f*f+v*v),c*=g,f*=g,v*=g,a=C*v-k*f,i=k*c-y*v,o=y*f-C*c,g=Math.sqrt(a*a+i*i+o*o),g?(g=1/g,a*=g,i*=g,o*=g):(a=0,i=0,o=0),s=f*o-v*i,l=v*a-c*o,u=c*i-f*a,g=Math.sqrt(s*s+l*l+u*u),g?(g=1/g,s*=g,l*=g,u*=g):(s=0,l=0,u=0),e[0]=a,e[1]=s,e[2]=c,e[3]=0,e[4]=i,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=u,e[10]=v,e[11]=0,e[12]=-(a*p+i*_+o*x),e[13]=-(s*p+l*_+u*x),e[14]=-(c*p+f*_+v*x),e[15]=1,e)}});var Pae=fe((thr,Lae)=>{Lae.exports=Oft;function Oft(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}});var Fq=fe((rhr,Fae)=>{Fae.exports={create:Lie(),clone:Fie(),copy:Rie(),identity:Pq(),transpose:qie(),invert:Oie(),adjoint:Uie(),determinant:Gie(),multiply:jie(),translate:Yie(),scale:Zie(),rotate:Kie(),rotateX:Qie(),rotateY:tae(),rotateZ:nae(),fromRotation:aae(),fromRotationTranslation:sae(),fromScaling:uae(),fromTranslation:fae(),fromXRotation:dae(),fromYRotation:pae(),fromZRotation:mae(),fromQuat:xae(),frustum:bae(),perspective:Tae(),perspectiveFromFieldOfView:Mae(),ortho:Eae(),lookAt:Cae(),str:Pae()}});var DE=fe(Lu=>{"use strict";var Nft=Fq();Lu.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{"use strict";var Uft=xi(),Dae=W1(),Vft=DE(),Gft=Fq();function Hft(e){var t;if(typeof e=="string"){if(t=document.getElementById(e),t===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function jft(e){var t=Uft.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function Rae(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function Wft(e,t){Iae("global",e,t)}function Iae(e,t,r){var n="plotly.js-style-"+e,a=document.getElementById(n);if(!(a&&a.matches(".no-inline-styles"))){a||(a=document.createElement("style"),a.setAttribute("id",n),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var i=a.sheet;i?i.insertRule?i.insertRule(t+"{"+r+"}",0):i.addRule?i.addRule(t,r,0):Dae.warn("addStyleRule failed"):Dae.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function Yft(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&Rae(r)}function Xft(e,t,r,n,a,i){var o=n.split(":"),s=a.split(":"),l="data-btn-style-event-added";i||(i=document),i.querySelectorAll(e).forEach(function(u){u.getAttribute(l)||(u.addEventListener("mouseenter",function(){var c=this.querySelector(r);c&&(c.style[o[0]]=o[1])}),u.addEventListener("mouseleave",function(){var c=this.querySelector(r);c&&(t&&this.matches(t)?c.style[o[0]]=o[1]:c.style[s[0]]=s[1])}),u.setAttribute(l,!0))})}function Zft(e){var t=qae(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(n){var a=zae(n);if(a){var i=Vft.convertCssMatrix(a);r=Gft.multiply(r,r,i)}}),r}function zae(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(n){return+n})}function qae(e){for(var t=[];$ft(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function $ft(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function Kft(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}Bae.exports={getGraphDiv:Hft,isPlotDiv:jft,removeElement:Rae,addStyleRule:Wft,addRelatedStyleRule:Iae,deleteRelatedStyleRule:Yft,setStyleOnHover:Xft,getFullTransformMatrix:Zft,getElementTransformMatrix:zae,getElementAndAncestors:qae,equalDomRects:Kft}});var $4=fe((ahr,Oae)=>{"use strict";Oae.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}});var rl=fe((ohr,Wae)=>{"use strict";var Uae=ta().extendFlat,Jft=em(),Vae={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},Gae={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},Qft=Vae.flags.slice().concat(["fullReplot"]),eht=Gae.flags.slice().concat("layoutReplot");Wae.exports={traces:Vae,layout:Gae,traceFlags:function(){return Nae(Qft)},layoutFlags:function(){return Nae(eht)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var n=r.split("+"),a=0;a{"use strict";Dq.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};Dq.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}});var Rq=fe((lhr,Yae)=>{"use strict";Yae.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}});var Oo=fe(Mb=>{"use strict";var{DATE_FORMAT_LINK:tht,FORMAT_LINK:rht}=Rq(),nht=["Variables that can't be found will be replaced with the specifier.",'For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.',"Variables with an undefined value will be replaced with the fallback value."].join(" ");function iht({supportOther:e}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,rht,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,tht,"for details on the date formatting syntax.",nht].join(" ")}Mb.templateFormatStringDescription=iht;Mb.hovertemplateAttrs=({editType:e="none",arrayOk:t}={},r={})=>zo({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});Mb.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>zo({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});Mb.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e});Mb.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})});var zE=fe((fhr,Qae)=>{"use strict";function sm(e,t){return t?t.d2l(e):e}function Xae(e,t){return t?t.l2d(e):e}function aht(e){return e.x0}function oht(e){return e.x1}function sht(e){return e.y0}function lht(e){return e.y1}function Zae(e){return e.x0shift||0}function $ae(e){return e.x1shift||0}function Kae(e){return e.y0shift||0}function Jae(e){return e.y1shift||0}function RE(e,t){return sm(e.x1,t)+$ae(e)-sm(e.x0,t)-Zae(e)}function IE(e,t,r){return sm(e.y1,r)+Jae(e)-sm(e.y0,r)-Kae(e)}function uht(e,t){return Math.abs(RE(e,t))}function cht(e,t,r){return Math.abs(IE(e,t,r))}function fht(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(RE(e,t),2)+Math.pow(IE(e,t,r),2))}function hht(e,t){return Xae((sm(e.x1,t)+$ae(e)+sm(e.x0,t)+Zae(e))/2,t)}function dht(e,t,r){return Xae((sm(e.y1,r)+Jae(e)+sm(e.y0,r)+Kae(e))/2,r)}function vht(e,t,r){return e.type!=="line"?void 0:IE(e,t,r)/RE(e,t)}var pht=["x0","x1","y0","y1","dy","height","ycenter"],ght=["x0","x1","y0","y1","dx","width","xcenter"];Qae.exports={x0:aht,x1:oht,y0:sht,y1:lht,slope:vht,dx:RE,dy:IE,width:uht,height:cht,length:fht,xcenter:hht,ycenter:dht,simpleXVariables:pht,simpleYVariables:ght}});var roe=fe((hhr,toe)=>{"use strict";var mht=rl().overrideAll,x2=Ho(),eoe=Ds(),yht=Uc().dash,lm=ta().extendFlat,{shapeTexttemplateAttrs:xht,templatefallbackAttrs:_ht}=Oo(),bht=zE();toe.exports=mht({newshape:{visible:lm({},x2.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:lm({},x2.legend,{}),legendgroup:lm({},x2.legendgroup,{}),legendgrouptitle:{text:lm({},x2.legendgrouptitle.text,{}),font:eoe({})},legendrank:lm({},x2.legendrank,{}),legendwidth:lm({},x2.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:lm({},yht,{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:lm({},x2.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:xht({newshape:!0},{keys:Object.keys(bht)}),texttemplatefallback:_ht({editType:"arraydraw"}),font:eoe({}),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")});var ioe=fe((dhr,noe)=>{"use strict";var wht=Uc().dash,Tht=ta().extendFlat;noe.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:Tht({},wht,{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"}}});var qE=fe((vhr,aoe)=>{"use strict";aoe.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}});var Sb=fe((phr,uoe)=>{"use strict";var Iq=Ds(),Aht=$4(),BE=tc(),ooe=roe(),soe=ioe(),Mht=qE(),loe=ta().extendFlat,OE=Iq({editType:"calc"});OE.family.dflt='"Open Sans", verdana, arial, sans-serif';OE.size.dflt=12;OE.color.dflt=BE.defaultLine;uoe.exports={font:OE,title:{text:{valType:"string",editType:"layoutstyle"},font:Iq({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:Iq({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:loe(Mht({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:BE.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:BE.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:BE.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:ooe.newshape,activeshape:ooe.activeshape,newselection:soe.newselection,activeselection:soe.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:loe({},Aht.transition,{editType:"none"})}});var coe=fe(()=>{(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var e=document.createElement("style");e.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",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{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(e)}})()});var bi=fe(co=>{"use strict";var zq=W1(),foe=FE(),hoe=Lq(),yhr=Z4().addStyleRule,doe=ta(),Sht=Ho(),Eht=Sb(),kht=doe.extendFlat,qq=doe.extendDeepAll;co.modules={};co.allCategories={};co.allTypes=[];co.subplotsRegistry={};co.componentsRegistry={};co.layoutArrayContainers=[];co.layoutArrayRegexes=[];co.traceLayoutAttributes={};co.localeRegistry={};co.apiMethodRegistry={};co.collectableSubplotTypes=null;co.register=function(t){if(co.collectableSubplotTypes=null,t)t&&!Array.isArray(t)&&(t=[t]);else throw new Error("No argument passed to Plotly.register.");for(var r=0;r{"use strict";var Dht=lb().timeFormat,Aoe=aa(),Bq=W1(),cm=(fb(),Gs(cb)).mod,Cb=Wa(),J0=Cb.BADNUM,Jd=Cb.ONEDAY,K4=Cb.ONEHOUR,um=Cb.ONEMIN,kb=Cb.ONESEC,J4=Cb.EPOCHJD,X1=bi(),yoe=lb().utcFormat,Rht=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,Iht=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,xoe=new Date().getFullYear()-70;function Z1(e){return e&&X1.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Pu.dateTick0=function(e,t){var r=zht(e,!!t);if(t<2)return r;var n=Pu.dateTime2ms(r,e);return n+=Jd*(t-1),Pu.ms2DateTime(n,0,e)};function zht(e,t){return Z1(e)?t?X1.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:X1.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}Pu.dfltRange=function(e){return Z1(e)?X1.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Pu.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var UE,VE;Pu.dateTime2ms=function(e,t){if(Pu.isJSDate(e)){var r=e.getTimezoneOffset()*um,n=(e.getUTCMinutes()-e.getMinutes())*um+(e.getUTCSeconds()-e.getSeconds())*kb+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var a=3*um;r=r-a/2+cm(n-r+a/2,a)}return e=Number(e)-r,e>=UE&&e<=VE?e:J0}if(typeof e!="string"&&typeof e!="number")return J0;e=String(e);var i=Z1(t),o=e.charAt(0);i&&(o==="G"||o==="g")&&(e=e.slice(1),t="");var s=i&&t.slice(0,7)==="chinese",l=e.match(s?Iht:Rht);if(!l)return J0;var u=l[1],c=l[3]||"1",f=Number(l[5]||1),v=Number(l[7]||0),g=Number(l[9]||0),p=Number(l[11]||0);if(i){if(u.length===2)return J0;u=Number(u);var _;try{var x=X1.getComponentMethod("calendars","getCal")(t);if(s){var y=c.charAt(c.length-1)==="i";c=parseInt(c,10),_=x.newDate(u,x.toMonthIndex(u,c,y),f)}else _=x.newDate(u,Number(c),f)}catch(k){return J0}return _?(_.toJD()-J4)*Jd+v*K4+g*um+p*kb:J0}u.length===2?u=(Number(u)+2e3-xoe)%100+xoe:u=Number(u),c-=1;var C=new Date(Date.UTC(2e3,c,f,v,g));return C.setUTCFullYear(u),C.getUTCMonth()!==c||C.getUTCDate()!==f?J0:C.getTime()+p*kb};UE=Pu.MIN_MS=Pu.dateTime2ms("-9999");VE=Pu.MAX_MS=Pu.dateTime2ms("9999-12-31 23:59:59.9999");Pu.isDateTime=function(e,t){return Pu.dateTime2ms(e,t)!==J0};function Eb(e,t){return String(e+Math.pow(10,t)).slice(1)}var NE=90*Jd,_oe=3*K4,boe=5*um;Pu.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=UE&&e<=VE))return J0;t||(t=0);var n=Math.floor(cm(e+.05,1)*10),a=Math.round(e-n/10),i,o,s,l,u,c;if(Z1(r)){var f=Math.floor(a/Jd)+J4,v=Math.floor(cm(e,Jd));try{i=X1.getComponentMethod("calendars","getCal")(r).fromJD(f).formatDate("yyyy-mm-dd")}catch(g){i=yoe("G%Y-%m-%d")(new Date(a))}if(i.charAt(0)==="-")for(;i.length<11;)i="-0"+i.slice(1);else for(;i.length<10;)i="0"+i;o=t=UE+Jd&&e<=VE-Jd))return J0;var t=Math.floor(cm(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=Dht("%Y-%m-%d")(r),a=r.getHours(),i=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return Moe(n,a,i,o,s)};function Moe(e,t,r,n,a){if((t||r||n||a)&&(e+=" "+Eb(t,2)+":"+Eb(r,2),(n||a)&&(e+=":"+Eb(n,2),a))){for(var i=4;a%10===0;)i-=1,a/=10;e+="."+Eb(a,i)}return e}Pu.cleanDate=function(e,t,r){if(e===J0)return t;if(Pu.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Z1(r))return Bq.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=Pu.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!Pu.isDateTime(e,r))return Bq.error("unrecognized date",e),t;return e};var qht=/%\d?f/g,Bht=/%h/g,Oht={1:"1",2:"1",3:"2",4:"2"};function woe(e,t,r,n){e=e.replace(qht,function(i){var o=Math.min(+i.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).slice(2).replace(/0+$/,"")||"0";return s});var a=new Date(Math.floor(t+.05));if(e=e.replace(Bht,function(){return Oht[r("%q")(a)]}),Z1(n))try{e=X1.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(i){return"Invalid"}return r(e)(a)}var Nht=[59,59.9,59.99,59.999,59.9999];function Uht(e,t){var r=cm(e+.05,Jd),n=Eb(Math.floor(r/K4),2)+":"+Eb(cm(Math.floor(r/um),60),2);if(t!=="M"){Aoe(t)||(t=0);var a=Math.min(cm(e/kb,60),Nht[t]),i=(100+a).toFixed(t).slice(1);t>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}Pu.formatDate=function(e,t,r,n,a,i){if(a=Z1(a)&&a,!t)if(r==="y")t=i.year;else if(r==="m")t=i.month;else if(r==="d")t=i.dayMonth+` +`+i.year;else return Uht(e,r)+` +`+woe(i.dayMonthYear,e,n,a);return woe(t,e,n,a)};var Toe=3*Jd;Pu.incrementMonth=function(e,t,r){r=Z1(r)&&r;var n=cm(e,Jd);if(e=Math.round(e-n),r)try{var a=Math.round(e/Jd)+J4,i=X1.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return t%12?i.add(o,t,"m"):i.add(o,t/12,"y"),(o.toJD()-J4)*Jd+n}catch(l){Bq.error("invalid ms "+e+" in calendar "+r)}var s=new Date(e+Toe);return s.setUTCMonth(s.getUTCMonth()+t)+n-Toe};Pu.findExactDates=function(e,t){for(var r=0,n=0,a=0,i=0,o,s,l=Z1(t)&&X1.getComponentMethod("calendars","getCal")(t),u=0;u{"use strict";Eoe.exports=function(t){return t}});var GE=fe($1=>{"use strict";var Vht=aa(),Ght=W1(),Hht=Q4(),jht=Wa().BADNUM,Oq=1e-9;$1.findBin=function(e,t,r){if(Vht(t.start))return r?Math.ceil((e-t.start)/t.size-Oq)-1:Math.floor((e-t.start)/t.size+Oq);var n=0,a=t.length,i=0,o=a>1?(t[a-1]-t[0])/(a-1):1,s,l;for(o>=0?l=r?Wht:Yht:l=r?Zht:Xht,e+=o*Oq*(r?-1:1)*(o>=0?1:-1);n90&&Ght.log("Long binary search..."),n-1};function Wht(e,t){return et}function Zht(e,t){return e>=t}$1.sorterAsc=function(e,t){return e-t};$1.sorterDes=function(e,t){return t-e};$1.distinctVals=function(e){var t=e.slice();t.sort($1.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===jht;r--);for(var n=t[r]-t[0]||1,a=n/(r||1)/1e4,i=[],o,s=0;s<=r;s++){var l=t[s],u=l-o;o===void 0?(i.push(l),o=l):u>a&&(n=Math.min(n,u),i.push(l),o=l)}return{vals:i,minDiff:n}};$1.roundUp=function(e,t,r){for(var n=0,a=t.length-1,i,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;n0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()};$1.findIndexOfMin=function(e,t){t=t||Hht;for(var r=1/0,n,a=0;aKht});function $ht(e){return Object.keys(e).sort()}var Kht,b2=Lo(()=>{"use strict";Kht=$ht});var koe=fe(Fu=>{"use strict";var eT=aa(),Jht=Gf().isArrayOrTypedArray;Fu.aggNums=function(e,t,r,n){var a,i;if((!n||n>r.length)&&(n=r.length),eT(t)||(t=!1),Jht(r[0])){for(i=new Array(n),a=0;ae.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var Doe=fe((Ahr,Foe)=>{"use strict";var Coe=(fb(),Gs(cb)),Nq=Coe.mod,Qht=Coe.modHalf,tT=Math.PI,fm=2*tT;function edt(e){return e/180*tT}function tdt(e){return e/tT*180}function Uq(e){return Math.abs(e[1]-e[0])>fm-1e-14}function Loe(e,t){return Qht(t-e,fm)}function rdt(e,t){return Math.abs(Loe(e,t))}function Poe(e,t){if(Uq(t))return!0;var r,n;t[0]n&&(n+=fm);var a=Nq(e,fm),i=a+fm;return a>=r&&a<=n||i>=r&&i<=n}function ndt(e,t,r,n){if(!Poe(t,n))return!1;var a,i;return r[0]=a&&e<=i}function Vq(e,t,r,n,a,i,o){a=a||0,i=i||0;var s=Uq([r,n]),l,u,c,f,v;s?(l=0,u=tT,c=fm):r{"use strict";w2.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};w2.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};w2.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};w2.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};w2.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};w2.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var qoe=fe(T2=>{"use strict";var Gq=(fb(),Gs(cb)).mod;T2.segmentsIntersect=zoe;function zoe(e,t,r,n,a,i,o,s){var l=r-e,u=a-e,c=o-a,f=n-t,v=i-t,g=s-i,p=l*g-c*f;if(p===0)return null;var _=(u*g-c*v)/p,x=(u*f-l*v)/p;return x<0||x>1||_<0||_>1?null:{x:e+l*_,y:t+f*_}}T2.segmentDistance=function(t,r,n,a,i,o,s,l){if(zoe(t,r,n,a,i,o,s,l))return 0;var u=n-t,c=a-r,f=s-i,v=l-o,g=u*u+c*c,p=f*f+v*v,_=Math.min(HE(u,c,g,i-t,o-r),HE(u,c,g,s-t,l-r),HE(f,v,p,t-i,r-o),HE(f,v,p,n-i,a-o));return Math.sqrt(_)};function HE(e,t,r,n,a){var i=n*e+a*t;if(i<0)return n*n+a*a;if(i>r){var o=n-e,s=a-t;return o*o+s*s}else{var l=n*t-a*e;return l*l/r}}var jE,Hq,Ioe;T2.getTextLocation=function(t,r,n,a){if((t!==Hq||a!==Ioe)&&(jE={},Hq=t,Ioe=a),jE[n])return jE[n];var i=t.getPointAtLength(Gq(n-a/2,r)),o=t.getPointAtLength(Gq(n+a/2,r)),s=Math.atan((o.y-i.y)/(o.x-i.x)),l=t.getPointAtLength(Gq(n,r)),u=(l.x*4+i.x+o.x)/6,c=(l.y*4+i.y+o.y)/6,f={x:u,y:c,theta:s};return jE[n]=f,f};T2.clearLocationCache=function(){Hq=null};T2.getVisibleSegment=function(t,r,n){var a=r.left,i=r.right,o=r.top,s=r.bottom,l=0,u=t.getTotalLength(),c=u,f,v;function g(_){var x=t.getPointAtLength(_);_===0?f=x:_===u&&(v=x);var y=x.xi?x.x-i:0,C=x.ys?x.y-s:0;return Math.sqrt(y*y+C*C)}for(var p=g(l);p;){if(l+=p+n,l>c)return;p=g(l)}for(p=g(c);p;){if(c-=p+n,l>c)return;p=g(c)}return{min:l,max:c,len:c-l,total:u,isClosed:l===0&&c===u&&Math.abs(f.x-v.x)<.1&&Math.abs(f.y-v.y)<.1}};T2.findPointOnPath=function(t,r,n,a){a=a||{};for(var i=a.pathLength||t.getTotalLength(),o=a.tolerance||.001,s=a.iterationLimit||30,l=t.getPointAtLength(0)[n]>t.getPointAtLength(i)[n]?-1:1,u=0,c=0,f=i,v,g,p;u0?f=v:c=v,u++}return g}});var WE=fe(rT=>{"use strict";var K1={};rT.throttle=function(t,r,n){var a=K1[t],i=Date.now();if(!a){for(var o in K1)K1[o].tsa.ts+r){s();return}a.timer=setTimeout(function(){s(),a.timer=null},r)};rT.done=function(e){var t=K1[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};rT.clear=function(e){if(e)Boe(K1[e]),delete K1[e];else for(var t in K1)rT.clear(t)};function Boe(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var Noe=fe((khr,Ooe)=>{"use strict";Ooe.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var Uoe=fe((Chr,YE)=>{"use strict";YE.exports=jq;YE.exports.isMobile=jq;YE.exports.default=jq;var sdt=/(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,ldt=/CrOS/,udt=/android|ipad|playbook|silk/i;function jq(e){e||(e={});let t=e.ua;if(!t&&typeof navigator!="undefined"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let r=sdt.test(t)&&!ldt.test(t)||!!e.tablet&&udt.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var Goe=fe((Lhr,Voe)=>{"use strict";var cdt=aa(),fdt=Uoe();Voe.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=hdt(),typeof r!="string")return!0;var n=fdt({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!n)for(var a=r.split(" "),i=1;i-1;s--){var l=a[s];if(l.slice(0,8)==="Version/"){var u=l.slice(8).split(".")[0];if(cdt(u)&&(u=+u),u>=13)return!0}}}return n};function hdt(){var e;return typeof navigator!="undefined"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),e}});var joe=fe((Phr,Hoe)=>{"use strict";var ddt=xi();Hoe.exports=function(t,r,n){var a=t.selectAll("g."+n.replace(/\s/g,".")).data(r,function(o){return o[0].trace.uid});a.exit().remove(),a.enter().append("g").attr("class",n),a.order();var i=t.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each(function(o){o[0][i]=ddt.select(this)}),a}});var Yoe=fe((Fhr,Woe)=>{"use strict";var vdt=bi();Woe.exports=function(t,r){for(var n=t._context.locale,a=0;a<2;a++){for(var i=t._context.locales,o=0;o<2;o++){var s=(i[n]||{}).dictionary;if(s){var l=s[r];if(l)return l}i=vdt.localeRegistry}var u=n.split("-")[0];if(u===n)break;n=u}return r}});var Wq=fe((Dhr,Xoe)=>{"use strict";Xoe.exports=function(t){for(var r={},n=[],a=0,i=0;i{"use strict";Zoe.exports=function(t){for(var r=mdt(t)?gdt:pdt,n=[],a=0;a{"use strict";Koe.exports=function(t,r){if(!r)return t;var n=1/Math.abs(r),a=n>1?(n*t+n*r)/n:t+r,i=String(a).length;if(i>16){var o=String(r).length,s=String(t).length;if(i>=s+o){var l=parseFloat(a).toPrecision(12);l.indexOf("e+")===-1&&(a=+l)}}return a}});var tse={};zp(tse,{default:()=>_dt});function xdt(e){return typeof e=="string"&&(e=e.replace(ydt,"")),(0,Qoe.default)(e)?Number(e):ese.BADNUM}var Qoe,ese,ydt,_dt,rse=Lo(()=>{"use strict";Qoe=K0(aa()),ese=K0(Wa()),ydt=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;_dt=xdt});var ase=fe((zhr,ise)=>{"use strict";var bdt=/<[^>]*>/g,wdt=/[\p{S}\p{P}]/gu,Tdt=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,Adt=/�/g,Mdt=/\s+/g,XE="-",nse=XE.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Sdt=new RegExp(nse+"{3,}","g"),Edt=new RegExp(nse+"$","g"),kdt=60;function Cdt(e){return typeof e.toWellFormed=="function"?e.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(e))}ise.exports=function(t,r=kdt){var n=Cdt(t!=null?t:"").replace(Adt,"").replace(bdt," ").replace(wdt,a=>a===XE?a:"").toLowerCase().trim().replace(Mdt,XE).replace(Tdt,"").replace(Sdt,XE);return n.length<=r?n:Array.from(n).slice(0,r).join("").replace(Edt,"")}});var Xt=fe((qhr,mse)=>{"use strict";var nT=xi(),Ldt=lb().utcFormat,Pdt=jI().format,fse=aa(),hse=Wa(),dse=hse.FP_SAFE,Fdt=-dse,ose=hse.BADNUM,Ir=mse.exports={};Ir.adjustFormat=function(t){if(!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t))return t;if(t==="0.f")return"~f";if(/^\d%/.test(t))return"~%";if(/^\ds/.test(t))return"~s";var r=(t.match(/^[+\-( ]?/)||[""])[0],n=t.slice(r.length);return!/^[~,.0$#]/.test(n)&&/[&fps]/.test(n)?r+"~"+n:t};var sse={};Ir.warnBadFormat=function(e){var t=String(e);sse[t]||(sse[t]=1,Ir.warn('encountered bad format: "'+t+'"'))};Ir.noFormat=function(e){return String(e)};Ir.numberFormat=function(e){var t;try{t=Pdt(Ir.adjustFormat(e))}catch(r){return Ir.warnBadFormat(e),Ir.noFormat}return t};Ir.nestedProperty=S4();Ir.keyedContainer=Jte();Ir.relativeAttr=ere();Ir.isPlainObject=em();Ir.toLogRange=nE();Ir.relinkPrivateKeys=ire();var hm=Gf();Ir.isArrayBuffer=hm.isArrayBuffer;Ir.isTypedArray=hm.isTypedArray;Ir.isArrayOrTypedArray=hm.isArrayOrTypedArray;Ir.isArray1D=hm.isArray1D;Ir.ensureArray=hm.ensureArray;Ir.concat=hm.concat;Ir.maxRowLength=hm.maxRowLength;Ir.minRowLength=hm.minRowLength;var vse=(fb(),Gs(cb));Ir.mod=vse.mod;Ir.modHalf=vse.modHalf;var dm=Sie();Ir.valObjectMeta=dm.valObjectMeta;Ir.coerce=dm.coerce;Ir.coerce2=dm.coerce2;Ir.coerceFont=dm.coerceFont;Ir.coercePattern=dm.coercePattern;Ir.coerceHoverinfo=dm.coerceHoverinfo;Ir.coerceSelectionMarkerOpacity=dm.coerceSelectionMarkerOpacity;Ir.validate=dm.validate;var T0=Soe();Ir.dateTime2ms=T0.dateTime2ms;Ir.isDateTime=T0.isDateTime;Ir.ms2DateTime=T0.ms2DateTime;Ir.ms2DateTimeLocal=T0.ms2DateTimeLocal;Ir.cleanDate=T0.cleanDate;Ir.isJSDate=T0.isJSDate;Ir.formatDate=T0.formatDate;Ir.incrementMonth=T0.incrementMonth;Ir.dateTick0=T0.dateTick0;Ir.dfltRange=T0.dfltRange;Ir.findExactDates=T0.findExactDates;Ir.MIN_MS=T0.MIN_MS;Ir.MAX_MS=T0.MAX_MS;var A2=GE();Ir.findBin=A2.findBin;Ir.sorterAsc=A2.sorterAsc;Ir.sorterDes=A2.sorterDes;Ir.distinctVals=A2.distinctVals;Ir.roundUp=A2.roundUp;Ir.sort=A2.sort;Ir.findIndexOfMin=A2.findIndexOfMin;Ir.sortObjectKeys=(b2(),Gs(_2)).default;var J1=koe();Ir.aggNums=J1.aggNums;Ir.len=J1.len;Ir.mean=J1.mean;Ir.geometricMean=J1.geometricMean;Ir.median=J1.median;Ir.midRange=J1.midRange;Ir.variance=J1.variance;Ir.stdev=J1.stdev;Ir.interp=J1.interp;var Jv=DE();Ir.init2dArray=Jv.init2dArray;Ir.transposeRagged=Jv.transposeRagged;Ir.dot=Jv.dot;Ir.translationMatrix=Jv.translationMatrix;Ir.rotationMatrix=Jv.rotationMatrix;Ir.rotationXYMatrix=Jv.rotationXYMatrix;Ir.apply3DTransform=Jv.apply3DTransform;Ir.apply2DTransform=Jv.apply2DTransform;Ir.apply2DTransform2=Jv.apply2DTransform2;Ir.convertCssMatrix=Jv.convertCssMatrix;Ir.inverseTransformMatrix=Jv.inverseTransformMatrix;var Np=Doe();Ir.deg2rad=Np.deg2rad;Ir.rad2deg=Np.rad2deg;Ir.angleDelta=Np.angleDelta;Ir.angleDist=Np.angleDist;Ir.isFullCircle=Np.isFullCircle;Ir.isAngleInsideSector=Np.isAngleInsideSector;Ir.isPtInsideSector=Np.isPtInsideSector;Ir.pathArc=Np.pathArc;Ir.pathSector=Np.pathSector;Ir.pathAnnulus=Np.pathAnnulus;var Pb=Roe();Ir.isLeftAnchor=Pb.isLeftAnchor;Ir.isCenterAnchor=Pb.isCenterAnchor;Ir.isRightAnchor=Pb.isRightAnchor;Ir.isTopAnchor=Pb.isTopAnchor;Ir.isMiddleAnchor=Pb.isMiddleAnchor;Ir.isBottomAnchor=Pb.isBottomAnchor;var Fb=qoe();Ir.segmentsIntersect=Fb.segmentsIntersect;Ir.segmentDistance=Fb.segmentDistance;Ir.getTextLocation=Fb.getTextLocation;Ir.clearLocationCache=Fb.clearLocationCache;Ir.getVisibleSegment=Fb.getVisibleSegment;Ir.findPointOnPath=Fb.findPointOnPath;var KE=ta();Ir.extendFlat=KE.extendFlat;Ir.extendDeep=KE.extendDeep;Ir.extendDeepAll=KE.extendDeepAll;Ir.extendDeepNoArrays=KE.extendDeepNoArrays;var Yq=W1();Ir.log=Yq.log;Ir.warn=Yq.warn;Ir.error=Yq.error;var Ddt=(Tb(),Gs(wb));Ir.counterRegex=Ddt.counter;var Xq=WE();Ir.throttle=Xq.throttle;Ir.throttleDone=Xq.done;Ir.clearThrottle=Xq.clear;var Qv=Z4();Ir.getGraphDiv=Qv.getGraphDiv;Ir.isPlotDiv=Qv.isPlotDiv;Ir.removeElement=Qv.removeElement;Ir.addStyleRule=Qv.addStyleRule;Ir.addRelatedStyleRule=Qv.addRelatedStyleRule;Ir.deleteRelatedStyleRule=Qv.deleteRelatedStyleRule;Ir.setStyleOnHover=Qv.setStyleOnHover;Ir.getFullTransformMatrix=Qv.getFullTransformMatrix;Ir.getElementTransformMatrix=Qv.getElementTransformMatrix;Ir.getElementAndAncestors=Qv.getElementAndAncestors;Ir.equalDomRects=Qv.equalDomRects;Ir.clearResponsive=Noe();Ir.preserveDrawingBuffer=Goe();Ir.makeTraceGroups=joe();Ir._=Yoe();Ir.notifier=bq();Ir.filterUnique=Wq();Ir.filterVisible=$oe();Ir.pushUnique=Lq();Ir.increment=Joe();Ir.cleanNumber=(rse(),Gs(tse)).default;Ir.slugify=ase();Ir.ensureNumber=function(t){return fse(t)?(t=Number(t),t>dse||t=t?!1:fse(e)&&e>=0&&e%1===0};Ir.noop=FE();Ir.identity=Q4();Ir.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};Ir.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r};Ir.simpleMap=function(e,t,r,n,a){for(var i=e.length,o=new Array(i),s=0;s=Math.pow(2,r)?a>10?(Ir.warn("randstr failed uniqueness"),o):e(t,r,n,(a||0)+1):o};Ir.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)},r["_"+t]=e,r};Ir.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,n=2*r,a=2*t-1,i=new Array(a),o=new Array(r),s,l,u,c;for(s=0;s=n&&(u-=n*Math.floor(u/n)),u<0?u=-1-u:u>=r&&(u=n-1-u),c+=e[u]*i[l];o[s]=c}return o};Ir.syncOrAsync=function(e,t,r){var n,a;function i(){return Ir.syncOrAsync(e,t,r)}for(;e.length;)if(a=e.splice(0,1)[0],n=a(t),n&&n.then)return n.then(i);return r&&r(t)};Ir.stripTrailingSlash=function(e){return e.slice(-1)==="/"?e.slice(0,-1):e};Ir.noneOrAll=function(e,t,r){if(e){var n=!1,a=!0,i,o;for(i=0;i0?a:0})};Ir.fillArray=function(e,t,r,n){if(n=n||Ir.identity,Ir.isArrayOrTypedArray(e))for(var a=0;azdt.test(window.navigator.userAgent);var qdt=/Firefox\/(\d+)\.\d+/;Ir.getFirefoxVersion=function(){var e=qdt.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null};Ir.isD3Selection=function(e){return e instanceof nT.selection};Ir.ensureSingle=function(e,t,r,n){var a=e.select(t+(r?"."+r:""));if(a.size())return a;var i=e.append(t);return r&&i.classed(r,!0),n&&i.call(n),i};Ir.ensureSingleById=function(e,t,r,n){var a=e.select(t+"#"+r);if(a.size())return a;var i=e.append(t).attr("id",r);return n&&i.call(n),i};Ir.objectFromPath=function(e,t){for(var r=e.split("."),n,a=n={},i=0;i1?a+o[1]:"";if(i&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+i+"$2");return s+l};Ir.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var gse=/^\w*$/;Ir.templateString=function(e,t){var r={};return e.replace(Ir.TEMPLATE_STRING_REGEX,function(n,a){var i;return gse.test(a)?i=t[a]:(r[a]=r[a]||Ir.nestedProperty(t,a).get,i=r[a](!0)),i!==void 0?i:""})};var Ndt={max:10,count:0,name:"hovertemplate"};Ir.hovertemplateString=e=>Zq(tl(zo({},e),{opts:Ndt}));var Udt={max:10,count:0,name:"texttemplate"};Ir.texttemplateString=e=>Zq(tl(zo({},e),{opts:Udt}));var Vdt=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Gdt(e){var t=e.match(Vdt);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var Hdt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};Ir.texttemplateStringForShapes=e=>Zq(tl(zo({},e),{opts:Hdt}));var lse=/^[:|\|]/;function Zq({data:e=[],locale:t,fallback:r,labels:n={},opts:a,template:i}){return i.replace(Ir.TEMPLATE_STRING_REGEX,(o,s,l)=>{let u=["xother","yother"].includes(s),c=["_xother","_yother"].includes(s),f=["_xother_","_yother_"].includes(s),v=["xother_","yother_"].includes(s),g=u||c||v||f;(c||f)&&(s=s.substring(1)),(v||f)&&(s=s.substring(0,s.length-1));let p=null,_=null;if(a.parseMultDiv){var x=Gdt(s);s=x.key,p=x.op,_=x.number}let y;if(g){if(n[s]===void 0)return"";y=n[s]}else for(let L of e)if(L){if(L.hasOwnProperty(s)){y=L[s];break}if(gse.test(s)||(y=Ir.nestedProperty(L,s).get(!0)),y!==void 0)break}if(y===void 0){let{count:L,max:w,name:T}=a,A=r===!1?o:r;return L=$E&&o<=use,u=s>=$E&&s<=use;if(l&&(n=10*n+o-$E),u&&(a=10*a+s-$E),!l||!u){if(n!==a)return n-a;if(o!==s)return o-s}}return a-n};var Lb=2e9;Ir.seedPseudoRandom=function(){Lb=2e9};Ir.pseudoRandom=function(){var e=Lb;return Lb=(69069*Lb+1)%4294967296,Math.abs(Lb-e)<429496729?Ir.pseudoRandom():Lb/4294967296};Ir.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},a=Ir.extractOption(e,t,"htx","hovertext");if(Ir.isValidTextValue(a))return n(a);var i=Ir.extractOption(e,t,"tx","text");if(Ir.isValidTextValue(i))return n(i)};Ir.isValidTextValue=function(e){return e||e===0};Ir.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(u=1):u=0,Ir.strTranslate(a-u*(r+o),i-u*(n+s))+Ir.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")};Ir.setTransormAndDisplay=function(e,t){e.attr("transform",Ir.getTextTransform(t)),e.style("display",t.scale?null:"none")};Ir.ensureUniformFontSize=function(e,t){var r=Ir.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};Ir.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)};Ir.bigFont=function(e){return Math.round(1.2*e)};var cse=Ir.getFirefoxVersion(),jdt=cse!==null&&cse<86;Ir.getPositionFromD3Event=function(){return jdt?[nT.event.layerX,nT.event.layerY]:[nT.event.offsetX,nT.event.offsetY]}});var _se=fe(()=>{"use strict";var Wdt=Xt(),yse={"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($q in yse)xse=$q.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Wdt.addStyleRule(xse,yse[$q]);var xse,$q});var Kq=fe((Uhr,bse)=>{bse.exports=!0});var Qq=fe((Vhr,wse)=>{"use strict";var Ydt=Kq(),Jq;typeof window.matchMedia=="function"?Jq=!window.matchMedia("(hover: none)").matches:Jq=Ydt;wse.exports=Jq});var M2=fe((Ghr,eB)=>{"use strict";var Db=typeof Reflect=="object"?Reflect:null,Tse=Db&&typeof Db.apply=="function"?Db.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},JE;Db&&typeof Db.ownKeys=="function"?JE=Db.ownKeys:Object.getOwnPropertySymbols?JE=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:JE=function(t){return Object.getOwnPropertyNames(t)};function Xdt(e){console&&console.warn&&console.warn(e)}var Mse=Number.isNaN||function(t){return t!==t};function vl(){vl.init.call(this)}eB.exports=vl;eB.exports.once=Jdt;vl.EventEmitter=vl;vl.prototype._events=void 0;vl.prototype._eventsCount=0;vl.prototype._maxListeners=void 0;var Ase=10;function QE(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(vl,"defaultMaxListeners",{enumerable:!0,get:function(){return Ase},set:function(e){if(typeof e!="number"||e<0||Mse(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Ase=e}});vl.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};vl.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Mse(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Sse(e){return e._maxListeners===void 0?vl.defaultMaxListeners:e._maxListeners}vl.prototype.getMaxListeners=function(){return Sse(this)};vl.prototype.emit=function(t){for(var r=[],n=1;n0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=i[t];if(l===void 0)return!1;if(typeof l=="function")Tse(l,this,r);else for(var u=l.length,c=Pse(l,u),n=0;n0&&o.length>a&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,Xdt(s)}return e}vl.prototype.addListener=function(t,r){return Ese(this,t,r,!1)};vl.prototype.on=vl.prototype.addListener;vl.prototype.prependListener=function(t,r){return Ese(this,t,r,!0)};function Zdt(){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 kse(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=Zdt.bind(n);return a.listener=r,n.wrapFn=a,a}vl.prototype.once=function(t,r){return QE(r),this.on(t,kse(this,t,r)),this};vl.prototype.prependOnceListener=function(t,r){return QE(r),this.prependListener(t,kse(this,t,r)),this};vl.prototype.removeListener=function(t,r){var n,a,i,o,s;if(QE(r),a=this._events,a===void 0)return this;if(n=a[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete a[t],a.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,i=o;break}if(i<0)return this;i===0?n.shift():$dt(n,i),n.length===1&&(a[t]=n[0]),a.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};vl.prototype.off=vl.prototype.removeListener;vl.prototype.removeAllListeners=function(t){var r,n,a;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),o;for(a=0;a=0;a--)this.removeListener(t,r[a]);return this};function Cse(e,t,r){var n=e._events;if(n===void 0)return[];var a=n[t];return a===void 0?[]:typeof a=="function"?r?[a.listener||a]:[a]:r?Kdt(a):Pse(a,a.length)}vl.prototype.listeners=function(t){return Cse(this,t,!0)};vl.prototype.rawListeners=function(t){return Cse(this,t,!1)};vl.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):Lse.call(e,t)};vl.prototype.listenerCount=Lse;function Lse(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}vl.prototype.eventNames=function(){return this._eventsCount>0?JE(this._events):[]};function Pse(e,t){for(var r=new Array(t),n=0;n{"use strict";var tB=M2().EventEmitter,e0t={init:function(e){if(e._ev instanceof tB)return e;var t=new tB,r=new tB;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,a){t.emit(n,a),r.emit(n,a)},typeof e.addEventListener=="function"&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var n,a=e._ev;if(!a)return;var i=a._events[t];if(!i)return;function o(l){if(l.listener){if(a.removeListener(t,l.listener),!l.fired)return l.fired=!0,l.listener.apply(a,[r])}else return l.apply(a,[r])}i=Array.isArray(i)?i:[i];var s;for(s=0;s{"use strict";var Rse=Xt(),t0t=im().dfltConfig;function r0t(e,t){for(var r=[],n,a=0;at0t.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Q1.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Q1.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Q1.undo=function(t){var r,n;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n{"use strict";qse.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var qb=fe(bc=>{"use strict";var Q0=bi(),iT=Xt(),tk=Ho(),nB=Sb(),n0t=rB(),i0t=$4(),a0t=im().configAttributes,Bse=rl(),ep=iT.extendDeepAll,Ib=iT.isPlainObject,o0t=iT.isArrayOrTypedArray,rk=iT.nestedProperty,s0t=iT.valObjectMeta,iB="_isSubplotObj",nk="_isLinkedToArray",l0t="_arrayAttrRegexps",Nse="_deprecated",aB=[iB,nk,l0t,Nse];bc.IS_SUBPLOT_OBJ=iB;bc.IS_LINKED_TO_ARRAY=nk;bc.DEPRECATED=Nse;bc.UNDERSCORE_ATTRS=aB;bc.get=function(){var e={};return Q0.allTypes.forEach(function(t){e[t]=c0t(t)}),{defs:{valObjects:s0t,metaKeys:aB.concat(["description","role","editType","impliedEdits"]),editType:{traces:Bse.traces,layout:Bse.layout},impliedEdits:{}},traces:e,layout:f0t(),frames:h0t(),animation:zb(i0t),config:zb(a0t)}};bc.crawl=function(e,t,r,n){var a=r||0;n=n||"",Object.keys(e).forEach(function(i){var o=e[i];if(aB.indexOf(i)===-1){var s=(n?n+".":"")+i;t(o,i,e,a,s),!bc.isValObject(o)&&Ib(o)&&i!=="impliedEdits"&&bc.crawl(o,t,a+1,s)}})};bc.isValObject=function(e){return e&&e.valType!==void 0};bc.findArrayAttributes=function(e){var t=[],r=[],n=[],a,i;function o(l,u,c,f){r=r.slice(0,f).concat([u]),n=n.slice(0,f).concat([l&&l._isLinkedToArray]);var v=l&&(l.valType==="data_array"||l.arrayOk===!0)&&!(r[f-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));v&&s(a,0,"")}function s(l,u,c){var f=l[r[u]],v=c+r[u];if(u===r.length-1)o0t(f)&&t.push(i+v);else if(n[u]){if(Array.isArray(f))for(var g=0;g=i.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var o=t[r];if(!ek(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function ek(e){return e===Math.round(e)&&e>=0}function c0t(e){var t,r;t=Q0.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var a=ep({},tk),i=ep({},t.attributes);bc.crawl(i,function(l,u,c,f,v){rk(a,v).set(void 0),l===void 0&&rk(i,v).set(void 0)}),ep(n,a),Q0.traceIs(e,"noOpacity")&&delete n.opacity,Q0.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),Q0.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),t.selectPoints||delete n.selectedpoints,ep(n,i),r.attributes&&ep(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:zb(n)};if(t.layoutAttributes){var s={};ep(s,t.layoutAttributes),o.layoutAttributes=zb(s)}return t.animatable||bc.crawl(o,function(l){bc.isValObject(l)&&"anim"in l&&delete l.anim}),o}function f0t(){var e={},t,r;ep(e,nB);for(t in Q0.subplotsRegistry)if(r=Q0.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var n=0;n{"use strict";var Bb=Xt(),m0t=Ho(),vm="templateitemname",oB={name:{valType:"string",editType:"none"}};oB[vm]={valType:"string",editType:"calc"};S2.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=oB.name,t[vm]=oB[vm],t};S2.traceTemplater=function(e){var t={},r,n;for(r in e)n=e[r],Array.isArray(n)&&n.length&&(t[r]=0);function a(i){r=Bb.coerce(i,{},m0t,"type");var o={type:r,_template:null};if(r in t){n=e[r];var s=t[r]%n.length;t[r]++,o._template=n[s]}return o}return{newTrace:a}};S2.newContainer=function(e,t,r){var n=e._template,a=n&&(n[t]||r&&n[r]);Bb.isPlainObject(a)||(a=null);var i=e[t]={_template:a};return i};S2.arrayTemplater=function(e,t,r){var n=e._template,a=n&&n[Gse(t)],i=n&&n[t];(!Array.isArray(i)||!i.length)&&(i=[]);var o={};function s(u){var c={name:u.name,_input:u},f=c[vm]=u[vm];if(!Vse(f))return c._template=a,c;for(var v=0;v=n&&(r._input||{})._templateitemname;i&&(a=n);var o=t+"["+a+"]",s;function l(){s={},i&&(s[o]={},s[o][vm]=i)}l();function u(g,p){s[g]=p}function c(g,p){i?Bb.nestedProperty(s[o],g).set(p):s[o+"."+g]=p}function f(){var g=s;return l(),g}function v(g,p){g&&c(g,p);var _=f();for(var x in _)Bb.nestedProperty(e,x).set(_[x])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:v}}});var rc=fe((Zhr,Hse)=>{"use strict";var aT=(Tb(),Gs(wb)).counter;Hse.exports={idRegex:{x:aT("x","( domain)?"),y:aT("y","( domain)?")},attrRegex:aT("[xy]axis"),xAxisMatch:aT("xaxis"),yAxisMatch:aT("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"}});var El=fe(Qd=>{"use strict";var y0t=bi(),sB=rc();Qd.id2name=function(t){if(!(typeof t!="string"||!t.match(sB.AX_ID_PATTERN))){var r=t.split(" ")[0].slice(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Qd.name2id=function(t){if(t.match(sB.AX_NAME_PATTERN)){var r=t.slice(5);return r==="1"&&(r=""),t.charAt(0)+r}};Qd.cleanId=function(t,r,n){var a=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(sB.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(a&&!n)){var i=t.split(" ")[0].slice(1).replace(/^0+/,"");return i==="1"&&(i=""),t.charAt(0)+i+(a&&n?" domain":"")}};Qd.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var a=Qd.listIds(e,t),i=new Array(a.length),o;for(o=0;on?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)};Qd.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function jse(e,t){if(t&&t.length){for(var r=0;r{"use strict";function x0t(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function _0t(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}Wse.exports={clearOutlineControllers:x0t,clearOutline:_0t}});var ik=fe((Jhr,Yse)=>{"use strict";Yse.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var jf=fe(ok=>{"use strict";var ak=bi(),Qhr=rc().SUBPLOT_PATTERN;ok.getSubplotCalcData=function(e,t,r){var n=ak.subplotsRegistry[t];if(!n)return[];for(var a=n.attr,i=[],o=0;o{"use strict";var b0t=bi(),Ob=Xt();E2.manageCommandObserver=function(e,t,r,n){var a={},i=!0;t&&t._commandObserver&&(a=t._commandObserver),a.cache||(a.cache={}),a.lookupTable={};var o=E2.hasSimpleAPICommandBindings(e,r,a.lookupTable);if(t&&t._commandObserver){if(o)return a;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,a}if(o){Xse(e,o,a.cache),a.check=function(){if(i){var c=Xse(e,o,a.cache);return c.changed&&n&&a.lookupTable[c.value]!==void 0&&(a.disable(),Promise.resolve(n({value:c.value,type:o.type,prop:o.prop,traces:o.traces,index:a.lookupTable[c.value]})).then(a.enable,a.enable)),c.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],l=0;l0?".":"")+a;Ob.isPlainObject(i)?lB(i,t,o,n+1):t(o,a,i)}})}});var Hs=fe((ndr,sle)=>{"use strict";var rdr=xi(),T0t=lb().timeFormatLocale,A0t=jI().formatLocale,oT=aa(),M0t=WI(),S0t=M4().version,No=bi(),E0t=qb(),k0t=So(),Ri=Xt(),C0t=ni(),Jse=Wa().BADNUM,e0=El(),L0t=pm().clearOutline,P0t=ik(),uB=$4(),F0t=rB(),D0t=jf().getModuleCalcData,Qse=Ri.relinkPrivateKeys,k2=Ri._,fi=sle.exports={};Ri.extendFlat(fi,No);fi.attributes=Ho();fi.attributes.type.values=fi.allTypes;fi.fontAttrs=Ds();fi.layoutAttributes=Sb();var lk=Kse();fi.executeAPICommand=lk.executeAPICommand;fi.computeAPICommandBindings=lk.computeAPICommandBindings;fi.manageCommandObserver=lk.manageCommandObserver;fi.hasSimpleAPICommandBindings=lk.hasSimpleAPICommandBindings;fi.redrawText=function(e){return e=Ri.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(No.getComponentMethod("annotations","draw")(e),No.getComponentMethod("legend","draw")(e),No.getComponentMethod("colorbar","draw")(e),t(fi.previousPromises(e)))},300)})};fi.resize=function(e){e=Ri.getGraphDiv(e);var t,r=new Promise(function(n,a){(!e||Ri.isHidden(e))&&a(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Ri.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var i=e.changed;e.autoplay=!0,No.call("relayout",e,{autosize:!0}).then(function(){e.changed=i,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};fi.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};fi.sendDataToCloud=function(e,t){e.emit("plotly_beforeexport");let r=new URL(t).origin;var n=fi.graphJson(e,!1,"object");n.version=S0t;var a=new URL(t);a.searchParams.set("origin",window.location.origin);var i=window.open(a.href,"_blank");if(!i){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),e.emit("plotly_exportfail");return}var o=function(s){s.origin===r&&s.data&&s.data.type==="CHART_AUTH_SUCCESS"&&(i.postMessage({type:"chart",chart:n},r),window.removeEventListener("message",o),e.emit("plotly_afterexport"))};return window.addEventListener("message",o),!1};var R0t=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],I0t=["year","month","dayMonth","dayMonthYear"];fi.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults){delete n._skipDefaults;return}var a=e._fullLayout={},i=e.layout||{},o=e._fullData||[],s=e._fullData=[],l=e.data||[],u=e.calcdata||[],c=e._context||{},f;e._transitionData||fi.createTransitionData(e),a._dfltTitle={plot:k2(e,"Click to enter Plot title"),subtitle:k2(e,"Click to enter Plot subtitle"),x:k2(e,"Click to enter X axis title"),y:k2(e,"Click to enter Y axis title"),colorbar:k2(e,"Click to enter Colorscale title"),annotation:k2(e,"new text")},a._traceWord=k2(e,"trace");var v=ele(e,R0t);if(n._initialAutoSizeIsDone){var g=n.width,p=n.height;fi.supplyLayoutGlobalDefaults(i,a,v),i.width||(a.width=g),i.height||(a.height=p),fi.sanitizeMargins(a)}else{fi.supplyLayoutGlobalDefaults(i,a,v);var _=!i.width||!i.height,x=a.autosize,y=c.autosizable,C=_&&(x||y);C?fi.plotAutoSize(e,i,a):_&&fi.sanitizeMargins(a),!x&&_&&(i.width=a.width,i.height=a.height)}a._d3locale=B0t(v,a.separators),a._extraFormat=ele(e,I0t),a._initialAutoSizeIsDone=!0,a._dataLength=l.length,a._modules=[],a._visibleModules=[],a._basePlotModules=[];var k=a._subplots=q0t(),S=a._splomAxes={x:{},y:{}},L=a._splomSubplots={};a._splomGridDflt={},a._scatterStackOpts={},a._firstScatter={},a._alignmentOpts={},a._colorAxes={},a._requestRangeslider={},a._traceUids=z0t(o,l),fi.supplyDataDefaults(l,s,i,a);var w=Object.keys(S.x),T=Object.keys(S.y);if(w.length>1&&T.length>1){for(No.getComponentMethod("grid","sizeDefaults")(i,a),f=0;f15&&T.length>15&&a.shapes.length===0&&a.images.length===0,fi.linkSubplots(s,a,o,n),fi.cleanPlot(s,a,o,n);var I=!!(n._has&&n._has("cartesian")),R=!!(a._has&&a._has("cartesian")),B=I,O=R;B&&!O?n._bgLayer.remove():O&&!B&&(a._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&L0t({_fullLayout:n}),O0t(s,a),Qse(a,n),No.getComponentMethod("colorscale","crossTraceDefaults")(s,a),a._preGUI||(a._preGUI={}),a._tracePreGUI||(a._tracePreGUI={});var U=a._tracePreGUI,j={},q;for(q in U)j[q]="old";for(f=0;f0){var c=1-2*i;o=Math.round(c*o),s=Math.round(c*s)}}var f=fi.layoutAttributes.width.min,v=fi.layoutAttributes.height.min;o1,p=!r.height&&Math.abs(n.height-s)>1;(p||g)&&(g&&(n.width=o),p&&(n.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),fi.sanitizeMargins(n)};fi.supplyLayoutModuleDefaults=function(e,t,r,n){var a=No.componentsRegistry,i=t._basePlotModules,o,s,l,u=No.subplotsRegistry.cartesian;for(o in a)l=a[o],l.includeBasePlot&&l.includeBasePlot(e,t);i.length||i.push(u),t._has("cartesian")&&(No.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(Ri.subplotSort);for(s=0;s1&&(r.l/=x,r.r/=x)}if(v){var y=(r.t+r.b)/v;y>1&&(r.t/=y,r.b/=y)}var C=r.xl!==void 0?r.xl:r.x,k=r.xr!==void 0?r.xr:r.x,S=r.yt!==void 0?r.yt:r.y,L=r.yb!==void 0?r.yb:r.y;g[t]={l:{val:C,size:r.l+_},r:{val:k,size:r.r+_},b:{val:L,size:r.b+_},t:{val:S,size:r.t+_}},p[t]=1}if(!n._replotting)return fi.doAutoMargin(e)}};function U0t(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=e0.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}fi.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),nle(t);var a=t._size,i=t.margin,o={t:0,b:0,l:0,r:0},s=Ri.extendFlat({},a),l=i.l,u=i.r,c=i.t,f=i.b,v=t._pushmargin,g=t._pushmarginIds,p=t.minreducedwidth,_=t.minreducedheight;if(i.autoexpand!==!1){for(var x in v)g[x]||delete v[x];var y=e._fullLayout._reservedMargin;for(var C in y)for(var k in y[C]){var S=y[C][k];o[k]=Math.max(o[k],S)}v.base={l:{val:0,size:l},r:{val:1,size:u},t:{val:1,size:c},b:{val:0,size:f}};for(var L in o){var w=0;for(var T in v)T!=="base"&&oT(v[T][L].size)&&(w=v[T][L].size>w?v[T][L].size:w);var A=Math.max(0,i[L]-w);o[L]=Math.max(0,o[L]-A)}for(var m in v){var F=v[m].l||{},E=v[m].b||{},I=F.val,R=F.size,B=E.val,O=E.size,U=r-o.r-o.l,j=n-o.t-o.b;for(var q in v){if(oT(R)&&v[q].r){var V=v[q].r.val,K=v[q].r.size;if(V>I){var ee=(R*V+(K-U)*I)/(V-I),ce=(K*(1-I)+(R-U)*(1-V))/(V-I);ee+ce>l+u&&(l=ee,u=ce)}}if(oT(O)&&v[q].t){var me=v[q].t.val,ye=v[q].t.size;if(me>B){var ue=(O*me+(ye-j)*B)/(me-B),J=(ye*(1-B)+(O-j)*(1-me))/(me-B);ue+J>f+c&&(f=ue,c=J)}}}}}var _e=Ri.constrain(r-i.l-i.r,ile,p),ne=Ri.constrain(n-i.t-i.b,ale,_),ae=Math.max(0,r-_e),pe=Math.max(0,n-ne);if(ae){var ie=(l+u)/ae;ie>1&&(l/=ie,u/=ie)}if(pe){var le=(f+c)/pe;le>1&&(f/=le,c/=le)}if(a.l=Math.round(l)+o.l,a.r=Math.round(u)+o.r,a.t=Math.round(c)+o.t,a.b=Math.round(f)+o.b,a.p=Math.round(i.pad),a.w=Math.round(r)-a.l-a.r,a.h=Math.round(n)-a.t-a.b,!t._replotting&&(fi.didMarginChange(s,a)||U0t(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var xe=3*(1+Object.keys(g).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};fi.graphJson=function(e,t=!1,r="json",n=!1,a=!1){(n&&t&&!e._fullData||n&&!t&&!e._fullLayout)&&fi.supplyDefaults(e);var i=n?e._fullData:e.data,o=n?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function l(f,v){if(typeof f=="function")return v?"_function_":null;if(Ri.isPlainObject(f)){var g={};return Object.keys(f).sort().forEach(function(y){if(["_","["].indexOf(y.charAt(0))===-1){if(typeof f[y]=="function"){v&&(g[y]="_function");return}g[y]=l(f[y],v)}}),g}var p=Array.isArray(f),_=Ri.isTypedArray(f);if((p||_)&&f.dtype&&f.shape){var x=f.bdata;return l({dtype:f.dtype,shape:f.shape,bdata:Ri.isArrayBuffer(x)?M0t.encode(x):x},v)}return p?f.map(function(y){return l(y,v)}):_?Ri.simpleMap(f,Ri.identity):Ri.isJSDate(f)?Ri.ms2DateTimeLocal(+f):f}var u={data:(i||[]).map(function(f){var v=l(f);return t&&delete v.fit,v})};if(!t&&(u.layout=l(o),n)){var c=o._size;u.layout.computed={margin:{b:c.b,l:c.l,r:c.r,t:c.t}}}return s&&(u.frames=l(s)),a&&(u.config=l(e._context,!0)),r==="object"?u:JSON.stringify(u)};fi.modifyFrames=function(e,t){var r,n,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return No.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var v=0,g=0;function p(){return v++,function(){g++,!n&&g===v&&s(f)}}r.runFn(p),setTimeout(p())})}function s(f){if(e._transitionData)return i(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return No.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(f)}function l(){if(e._transitionData)return e._transitioning=!1,a(e._transitionData._interruptCallbacks)}var u=[fi.previousPromises,l,r.prepareFn,fi.rehover,fi.reselect,o],c=Ri.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}fi.doCalcdata=function(e,t){var r=e0.list(e),n=e._fullData,a=e._fullLayout,i,o,s,l=new Array(n.length),u=(e.calcdata||[]).slice();for(e.calcdata=l,a._numBoxes=0,a._numViolins=0,a._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,a._piecolormap={},a._sunburstcolormap={},a._treemapcolormap={},a._iciclecolormap={},a._funnelareacolormap={},s=0;s{"use strict";C2.xmlns="http://www.w3.org/2000/xmlns/";C2.svg="http://www.w3.org/2000/svg";C2.xlink="http://www.w3.org/1999/xlink";C2.svgAttrs={xmlns:C2.svg,"xmlns:xlink":C2.xlink}});var nc=fe((adr,lle)=>{"use strict";lle.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}});var as=fe(A0=>{"use strict";var wc=xi(),tv=Xt(),W0t=tv.strTranslate,cB=ev(),Y0t=nc().LINE_SPACING,X0t=/([^$]*)([$]+[^$]*[$]+)([^$]*)/,vle=e=>e?e.match(X0t):null;A0.matchTex=vle;A0.convertToTspans=function(e,t,r){var n=e.text(),a=!e.attr("data-notex")&&t&&t._context.typesetMath&&vle(n);a&&!J0t()&&(a=null);var i=wc.select(e.node().parentNode);if(i.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":n,"data-math":"N"});function s(){i.empty()||(o=e.attr("class")+"-math",i.select("svg."+o).remove()),e.text("").style("white-space","pre");var l=lvt(e.node(),n);l&&e.style("pointer-events","all"),A0.positionText(e),r&&r.call(e)}return a?(t&&t._promises||[]).push(new Promise(function(l){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),c={fontSize:u},f=e.attr("text-anchor");Q0t(a[2],c,function(v,g,p){i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove();var _=v&&v.select("svg");if(!_||!_.node()){s(),l();return}e.style("display","none");var x=i.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});x.node().appendChild(_.node()),g&&g.node()&&_.node().insertBefore(g.node().cloneNode(!0),_.node().firstChild);var y=p.width,C=p.height;_.attr({class:o,height:C,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":c.fontSize+"px"});var k=e.node().style.fill||"black",S=_.select("g");S.attr({fill:k,stroke:k});var L=S.node().getBoundingClientRect(),w=L.width,T=L.height;(w>y||T>C)&&(_.style("overflow","hidden"),L=_.node().getBoundingClientRect(),w=L.width,T=L.height);var A=+e.attr("x"),m=+e.attr("y"),F=u||e.node().getBoundingClientRect().height,E=-F/4;o[0]==="y"?x.attr({transform:"rotate("+[-90,A,m]+")"+W0t(-w/2,E-T/2)}):o[0]==="l"?m=E-T/2:o[0]==="a"&&o.indexOf("atitle")!==0?(A=0,m=E):(A=A-w*(f==="middle"?.5:f==="end"?1:0),m=m+E-T/2),_.attr({x:A,y:m}),r&&r.call(e,x),l(x)})})):s(),e};var Z0t=/(<|<|<)/g,$0t=/(>|>|>)/g;function K0t(e){return e.replace(Z0t,"\\lt ").replace($0t,"\\gt ")}var fB=null,ple=()=>typeof MathJax!="undefined"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,ule=!1,cle=!1;function J0t(){let e=ple();return e===3||e===4?!0:(e===null?ule||(ule=!0,tv.warn("MathJax is not loaded. Math equations will not be rendered.")):cle||(cle=!0,tv.warn("Unsupported MathJax version:",MathJax.version)),!1)}function Q0t(e,t,r){let n=ple();var a;let i=function(){if(!fB){let u=MathJax._.output.svg_ts.SVG,c=tv.extendFlat({},MathJax.config.svg,{fontCache:"local"});n===4&&(c.linebreaks=tv.extendFlat({},c.linebreaks,{inline:!1})),fB=MathJax._.mathjax.mathjax.document(document,tv.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new u(c)}))}let s="math-output-"+tv.randstr({},64);a=wc.select("body").append("div").attr({id:s}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"});let l=K0t(e).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return fB.convert(l,{display:!1})}).then(function(u){a.node().appendChild(u)})},o=function(){let s=a.select(".MathJax"),l=!s.empty()&&a.select("svg").node();if(!l)tv.log("There was an error in the tex syntax.",e),r();else{let u=l.getBoundingClientRect(),c=s.select("defs");r(s,c,u)}a.remove()};Promise.resolve().then(i).then(o).catch(s=>{tv.log("MathJax typesetting failed.",e,s),a&&a.remove(),r()})}var gle={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"},evt={sub:"0.3em",sup:"-0.6em"},tvt={sub:"-0.21em",sup:"0.42em"},fle="\u200B",hle=["http:","https:","mailto:","",void 0,":"],mle=A0.NEWLINES=/(\r\n?|\n)/g,dB=/(<[^<>]*>)/,vB=/<(\/?)([^ >]*)(\s+(.*))?>/i,rvt=//i;A0.BR_TAG_ALL=//gi;var yle=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,xle=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,_le=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,nvt=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function L2(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&uk(n)}var ivt=/(^|;)\s*color:/;A0.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,n=t.allowedTags!==void 0?t.allowedTags:["br"],a="...",i=a.length,o=e.split(dB),s=[],l="",u=0,c=0;ci?s.push(f.slice(0,Math.max(0,_-i))+a):s.push(f.slice(0,_));break}l=""}}return s.join("")};var avt={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},ovt=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function uk(e){return e.replace(ovt,function(t,r){var n;return r.charAt(0)==="#"?n=svt(r.charAt(1)==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10)):n=avt[r],n||t})}A0.convertEntities=uk;function svt(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r((e>>10)+55232,e%1024+56320)}}function lvt(e,t){t=t.replace(mle," ");var r=!1,n=[],a,i=-1;function o(){i++;var w=document.createElementNS(cB.svg,"tspan");wc.select(w).attr({class:"line",dy:i*Y0t+"em"}),e.appendChild(w),a=w;var T=n;if(n=[{node:w}],T.length>1)for(var A=1;A.",t);return}var T=n.pop();w!==T.type&&tv.log("Start tag <"+T.type+"> doesnt match end tag <"+w+">. Pretending it did match.",t),a=n[n.length-1].node}var c=rvt.test(t);c?o():(a=e,n=[{node:e}]);for(var f=t.split(dB),v=0;v{"use strict";var uvt=xi(),lT=aa(),ck=Xt(),P2=ni(),cvt=y2().isValid;function fvt(e,t,r){var n=t?ck.nestedProperty(e,t).get()||{}:e,a=n[r||"color"];a&&a._inputArray&&(a=a._inputArray);var i=!1;if(ck.isArrayOrTypedArray(a)){for(var o=0;o=0;n--,a++){var i=e[n];r[a]=[1-i[0],i[1]]}return r}function Sle(e,t){t=t||{};for(var r=e.domain,n=e.range,a=n.length,i=new Array(a),o=0;o{"use strict";var kle=Rq(),dvt=kle.FORMAT_LINK,vvt=kle.DATE_FORMAT_LINK;function pvt(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?pB:Cle)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function pB(e,t){return["Sets the "+e+" formatting rule"+(t?" for `"+t+"`":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+dvt+"."].join(" ")}function Cle(e,t){return pB(e,t)+[" And for dates see: "+vvt+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}Lle.exports={axisHoverFormat:pvt,descriptionOnlyNumbers:pB,descriptionWithDates:Cle}});var pf=fe((cdr,Yle)=>{"use strict";var Ple=Ds(),Nb=tc(),Wle=Uc().dash,mB=ta().extendFlat,Fle=So().templatedArray,udr=Oo().templateFormatStringDescription,Dle=pl().descriptionWithDates,gvt=Wa().ONEDAY,Up=rc(),mvt=Up.HOUR_PATTERN,yvt=Up.WEEKDAY_PATTERN,gB={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},xvt=mB({},gB,{values:gB.values.slice().concat(["sync"])});function Rle(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var Ile={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},zle={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},qle={valType:"data_array",editType:"ticks"},Ble={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function Ole(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function Nle(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Ule={valType:"color",dflt:Nb.defaultLine,editType:"ticks"},Vle={valType:"color",dflt:Nb.lightLine,editType:"ticks"};function Gle(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Hle=mB({},Wle,{editType:"ticks"}),jle={valType:"boolean",editType:"ticks"};Yle.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:Nb.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:Ple({editType:"ticks",description:"Sets this axis' title font."}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[Up.idRegex.x.toString(),Up.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[Up.idRegex.x.toString(),Up.idRegex.y.toString()],editType:"calc"},rangebreaks:Fle("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[yvt,mvt,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:gvt},editType:"calc"}),tickmode:xvt,nticks:Rle(),tick0:Ile,dtick:zle,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:qle,ticktext:{valType:"data_array",editType:"ticks"},ticks:Ble,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:Ole(),tickwidth:Nle(),tickcolor:Ule,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:mB({},Wle,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:Ple({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Dle("tick label")},tickformatstops:Fle("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:Dle("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:Nb.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:jle,gridcolor:Vle,gridwidth:Gle(),griddash:Hle,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:Nb.defaultLine,editType:"ticks"},zerolinelayer:{valType:"enumerated",values:["above traces","below traces"],dflt:"below traces",editType:"plot"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:Nb.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",Up.idRegex.x.toString(),Up.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",Up.idRegex.x.toString(),Up.idRegex.y.toString()],editType:"plot"},minor:{tickmode:gB,nticks:Rle("minor"),tick0:Ile,dtick:zle,tickvals:qle,ticks:Ble,ticklen:Ole("minor"),tickwidth:Nle("minor"),tickcolor:Ule,gridcolor:Vle,gridwidth:Gle("minor"),griddash:Hle,showgrid:jle,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var fk=fe((fdr,$le)=>{"use strict";var ml=pf(),Xle=Ds(),Zle=ta().extendFlat,_vt=rl().overrideAll;$le.exports=_vt({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:ml.linecolor,outlinewidth:ml.linewidth,bordercolor:ml.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:ml.minor.tickmode,nticks:ml.nticks,tick0:ml.tick0,dtick:ml.dtick,tickvals:ml.tickvals,ticktext:ml.ticktext,ticks:Zle({},ml.ticks,{dflt:""}),ticklabeloverflow:Zle({},ml.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:ml.ticklen,tickwidth:ml.tickwidth,tickcolor:ml.tickcolor,ticklabelstep:ml.ticklabelstep,showticklabels:ml.showticklabels,labelalias:ml.labelalias,tickfont:Xle({description:"Sets the color bar's tick label font"}),tickangle:ml.tickangle,tickformat:ml.tickformat,tickformatstops:ml.tickformatstops,tickprefix:ml.tickprefix,showtickprefix:ml.showtickprefix,ticksuffix:ml.ticksuffix,showticksuffix:ml.showticksuffix,separatethousands:ml.separatethousands,exponentformat:ml.exponentformat,minexponent:ml.minexponent,showexponent:ml.showexponent,title:{text:{valType:"string"},font:Xle({description:"Sets this color bar's title font."}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var _s=fe((ddr,Jle)=>{"use strict";var bvt=fk(),wvt=(Tb(),Gs(wb)).counter,Tvt=(b2(),Gs(_2)).default,Kle=y2().scales,hdr=Tvt(Kle);function hk(e){return"`"+e+"`"}Jle.exports=function(t,r){t=t||"",r=r||{};var n=r.cLetter||"c",a="onlyIfNumerical"in r?r.onlyIfNumerical:!!t,i="noScale"in r?r.noScale:t==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:n==="z",s=typeof r.colorscaleDflt=="string"?Kle[r.colorscaleDflt]:null,l=r.editTypeOverride||"",u=t?t+".":"",c,f;"colorAttr"in r?(c=r.colorAttr,f=r.colorAttr):(c={z:"z",c:"color"}[n],f="in "+hk(u+c));var v=a?" Has an effect only if "+f+" is set to a numerical array.":"",g=n+"auto",p=n+"min",_=n+"max",x=n+"mid",y=hk(u+g),C=hk(u+p),k=hk(u+_),S=C+" and "+k,L={};L[p]=L[_]=void 0;var w={};w[g]=!1;var T={};return c==="color"&&(T.color={valType:"color",arrayOk:!0,editType:l||"style"},r.anim&&(T.color.anim=!0)),T[g]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:L},T[p]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:w},T[_]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:w},T[x]={valType:"number",dflt:null,editType:"calc",impliedEdits:L},T.colorscale={valType:"colorscale",editType:"calc",dflt:s,impliedEdits:{autocolorscale:!1}},T.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},T.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(T.showscale={valType:"boolean",dflt:o,editType:"calc"},T.colorbar=bvt),r.noColorAxis||(T.coloraxis={valType:"subplotid",regex:wvt("coloraxis"),dflt:null,editType:"calc"}),T}});var xB=fe((vdr,Qle)=>{"use strict";var Avt=ta().extendFlat,Mvt=_s(),yB=y2().scales;Qle.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:yB.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:yB.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:yB.RdBu,editType:"calc"}},coloraxis:Avt({_isSubplotObj:!0,editType:"calc"},Mvt("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var _B=fe((pdr,eue)=>{"use strict";var Svt=Xt();eue.exports=function(t){return Svt.isPlainObject(t.colorbar)}});var TB=fe(wB=>{"use strict";var bB=aa(),tue=Xt(),rue=Wa(),Evt=rue.ONEDAY,kvt=rue.ONEWEEK;wB.dtick=function(e,t){var r=t==="log",n=t==="date",a=t==="category",i=n?Evt:1;if(!e)return i;if(bB(e))return e=Number(e),e<=0?i:a?Math.max(1,Math.round(e)):n?Math.max(.1,e):e;if(typeof e!="string"||!(n||r))return i;var o=e.charAt(0),s=e.slice(1);return s=bB(s)?Number(s):0,s<=0||!(n&&o==="M"&&s===Math.round(s)||r&&o==="L"||r&&o==="D"&&(s===1||s===2))?i:e};wB.tick0=function(e,t,r,n){if(t==="date")return tue.cleanDate(e,tue.dateTick0(r,n%kvt===0?1:0));if(!(n==="D1"||n==="D2"))return bB(e)?Number(e):0}});var F2=fe((mdr,iue)=>{"use strict";var nue=TB(),Cvt=Xt().isArrayOrTypedArray,Lvt=Gf().isTypedArraySpec,Pvt=Gf().decodeTypedArraySpec;iue.exports=function(t,r,n,a,i={}){var o=i.isMinor,s=o?t.minor||{}:t,l=o?r.minor:r,u=o?"minor.":"";function c(S){var L=s[S];return Lvt(L)&&(L=Pvt(L)),L!==void 0?L:(l._template||{})[S]}var f=c("tick0"),v=c("dtick"),g=c("tickvals"),p=c("overlaying"),_=a==="category"||a==="multicategory",x;Cvt(g)?x="array":v?x="linear":p&&!_?x="sync":x="auto";var y=n(u+"tickmode",x);if(y==="auto"||y==="sync")n(u+"nticks");else if(y==="linear"){var C=l.dtick=nue.dtick(v,a);l.tick0=nue.tick0(f,a,r.calendar,C)}else if(a!=="multicategory"){var k=n(u+"tickvals");k===void 0?l.tickmode="auto":o||n("ticktext")}}});var Ub=fe((ydr,oue)=>{"use strict";var AB=Xt(),aue=pf();oue.exports=function(t,r,n,a){var i=a.isMinor,o=i?t.minor||{}:t,s=i?r.minor:r,l=i?aue.minor:aue,u=i?"minor.":"",c=AB.coerce2(o,s,l,"ticklen",i?(r.ticklen||5)*.6:void 0),f=AB.coerce2(o,s,l,"tickwidth",i?r.tickwidth||1:void 0),v=AB.coerce2(o,s,l,"tickcolor",(i?r.tickcolor:void 0)||s.color),g=n(u+"ticks",!i&&a.outerTicks||c||f||v?"outside":"");g||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var MB=fe((xdr,sue)=>{"use strict";sue.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],n=r.filter(function(i){return t[i]!==void 0}),a=function(i){return t[i]===t[n[0]]};if(n.every(a)||n.length===1)return t[n[0]]}});var Ah=fe((_dr,lue)=>{"use strict";var dk=Xt(),Fvt=So();lue.exports=function(t,r,n){var a=n.name,i=n.inclusionAttr||"visible",o=r[a],s=dk.isArrayOrTypedArray(t[a])?t[a]:[],l=r[a]=[],u=Fvt.arrayTemplater(r,a,i),c,f;for(c=0;c{"use strict";var SB=Xt(),Dvt=ni().contrast,uue=pf(),Rvt=MB(),Ivt=Ah();cue.exports=function(t,r,n,a,i){i||(i={});var o=n("labelalias");SB.isPlainObject(o)||delete r.labelalias;var s=Rvt(t),l=n("showticklabels");if(l){i.noTicklabelshift||n("ticklabelshift"),i.noTicklabelstandoff||n("ticklabelstandoff");var u=i.font||{},c=r.color,f=r.ticklabelposition||"",v=f.indexOf("inside")!==-1?Dvt(i.bgColor):c&&c!==uue.color.dflt?c:u.color;if(SB.coerceFont(n,"tickfont",u,{overrideDflt:{color:v}}),!i.noTicklabelstep&&a!=="multicategory"&&a!=="log"&&n("ticklabelstep"),!i.noAng){var g=n("tickangle");!i.noAutotickangles&&g==="auto"&&n("autotickangles")}if(a!=="category"){var p=n("tickformat");Ivt(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:zvt}),r.tickformatstops.length||delete r.tickformatstops,!i.noExp&&!p&&a!=="date"&&(n("showexponent",s),n("exponentformat"),n("minexponent"),n("separatethousands"))}!i.noMinorloglabels&&a==="log"&&n("minorloglabels")}};function zvt(e,t){function r(a,i){return SB.coerce(e,t,uue.tickformatstops,a,i)}var n=r("enabled");n&&(r("dtickrange"),r("value"))}});var mm=fe((wdr,fue)=>{"use strict";var qvt=MB();fue.exports=function(t,r,n,a,i){i||(i={});var o=i.tickSuffixDflt,s=qvt(t),l=n("tickprefix");l&&n("showtickprefix",s);var u=n("ticksuffix",o);u&&n("showticksuffix",s)}});var EB=fe((Tdr,hue)=>{"use strict";var ym=Xt(),Bvt=So(),Ovt=F2(),Nvt=Ub(),Uvt=gm(),Vvt=mm(),Gvt=fk();hue.exports=function(t,r,n){var a=Bvt.newContainer(r,"colorbar"),i=t.colorbar||{};function o(E,I){return ym.coerce(i,a,Gvt,E,I)}var s=n.margin||{t:0,b:0,l:0,r:0},l=n.width-s.l-s.r,u=n.height-s.t-s.b,c=o("orientation"),f=c==="v",v=o("thicknessmode");o("thickness",v==="fraction"?30/(f?l:u):30);var g=o("lenmode");o("len",g==="fraction"?1:f?u:l);var p=o("yref"),_=o("xref"),x=p==="paper",y=_==="paper",C,k,S,L="left";f?(S="middle",L=y?"left":"right",C=y?1.02:1,k=.5):(S=x?"bottom":"top",L="center",C=.5,k=x?1.02:1),ym.coerce(i,a,{x:{valType:"number",min:y?-2:0,max:y?3:1,dflt:C}},"x"),ym.coerce(i,a,{y:{valType:"number",min:x?-2:0,max:x?3:1,dflt:k}},"y"),o("xanchor",L),o("xpad"),o("yanchor",S),o("ypad"),ym.noneOrAll(i,a,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var w=ym.coerce(i,a,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:f?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",w.indexOf("inside")!==-1?"hide past domain":"hide past div"),Ovt(i,a,o,"linear");var T=n.font,A={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:T};w.indexOf("inside")!==-1&&(A.bgColor="black"),Vvt(i,a,o,"linear",A),Uvt(i,a,o,"linear",A),Nvt(i,a,o,"linear",A),o("title.text",n._dfltTitle.colorbar);var m=a.showticklabels?a.tickfont:T,F=ym.extendFlat({},T,{family:m.family,size:ym.bigFont(m.size)});ym.coerceFont(o,"title.font",F),o("title.side",f?"top":"right")}});var Vc=fe((Adr,pue)=>{"use strict";var due=aa(),CB=Xt(),Hvt=_B(),jvt=EB(),vue=y2().isValid,Wvt=bi().traceIs;function kB(e,t){var r=t.slice(0,t.length-1);return t?CB.nestedProperty(e,r).get()||{}:e}pue.exports=function e(t,r,n,a,i){var o=i.prefix,s=i.cLetter,l="_module"in r,u=kB(t,o),c=kB(r,o),f=kB(r._template||{},o)||{},v=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,n,a,i)};if(l){var g=n._colorAxes||{},p=a(o+"coloraxis");if(p){var _=Wvt(r,"contour")&&CB.nestedProperty(r,"contours.coloring").get()||"heatmap",x=g[p];x?(x[2].push(v),x[0]!==_&&(x[0]=!1,CB.warn(["Ignoring coloraxis:",p,"setting","as it is linked to incompatible colorscales."].join(" ")))):g[p]=[_,r,[v]];return}}var y=u[s+"min"],C=u[s+"max"],k=due(y)&&due(C)&&y{"use strict";var gue=Xt(),Yvt=So(),mue=xB(),Xvt=Vc();yue.exports=function(t,r){function n(f,v){return gue.coerce(t,r,mue,f,v)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var a=r._colorAxes,i,o;function s(f,v){return gue.coerce(i,o,mue.coloraxis,f,v)}for(var l in a){var u=a[l];if(u[0])i=t[l]||{},o=Yvt.newContainer(r,l,"coloraxis"),o._name=l,Xvt(i,o,r,s,{prefix:"",cLetter:"c"});else{for(var c=0;c{"use strict";var Zvt=Xt(),$vt=Wf().hasColorscale,Kvt=Wf().extractOpts;_ue.exports=function(t,r){function n(c,f){var v=c["_"+f];v!==void 0&&(c[f]=v)}function a(c,f){var v=f.container?Zvt.nestedProperty(c,f.container).get():c;if(v)if(v.coloraxis)v._colorAx=r[v.coloraxis];else{var g=Kvt(v),p=g.auto;(p||g.min===void 0)&&n(v,f.min),(p||g.max===void 0)&&n(v,f.max),g.autocolorscale&&n(v,"colorscale")}}for(var i=0;i{"use strict";var wue=aa(),LB=Xt(),Jvt=Wf().extractOpts;Tue.exports=function(t,r,n){var a=t._fullLayout,i=n.vals,o=n.containerStr,s=o?LB.nestedProperty(r,o).get():r,l=Jvt(s),u=l.auto!==!1,c=l.min,f=l.max,v=l.mid,g=function(){return LB.aggNums(Math.min,null,i)},p=function(){return LB.aggNums(Math.max,null,i)};if(c===void 0?c=g():u&&(s._colorAx&&wue(c)?c=Math.min(c,g()):c=g()),f===void 0?f=p():u&&(s._colorAx&&wue(f)?f=Math.max(f,p()):f=p()),u&&v!==void 0&&(f-v>v-c?c=v-(f-v):f-v=0?_=a.colorscale.sequential:_=a.colorscale.sequentialminus,l._sync("colorscale",_)}}});var js=fe((kdr,Aue)=>{"use strict";var vk=y2(),Vb=Wf();Aue.exports={moduleType:"component",name:"colorscale",attributes:_s(),layoutAttributes:xB(),supplyLayoutDefaults:xue(),handleDefaults:Vc(),crossTraceDefaults:bue(),calc:Mh(),scales:vk.scales,defaultScale:vk.defaultScale,getScale:vk.get,isValidScale:vk.isValid,hasColorscale:Vb.hasColorscale,extractOpts:Vb.extractOpts,extractScale:Vb.extractScale,flipScale:Vb.flipScale,makeColorScaleFunc:Vb.makeColorScaleFunc,makeColorScaleFuncFromTrace:Vb.makeColorScaleFuncFromTrace}});var Is=fe((Cdr,Sue)=>{"use strict";var Mue=Xt(),Qvt=Gf().isTypedArraySpec;Sue.exports={hasLines:function(e){return e.visible&&e.mode&&e.mode.indexOf("lines")!==-1},hasMarkers:function(e){return e.visible&&(e.mode&&e.mode.indexOf("markers")!==-1||e.type==="splom")},hasText:function(e){return e.visible&&e.mode&&e.mode.indexOf("text")!==-1},isBubble:function(e){var t=e.marker;return Mue.isPlainObject(t)&&(Mue.isArrayOrTypedArray(t.size)||Qvt(t.size))}}});var uT=fe((Ldr,Eue)=>{"use strict";var ept=aa();Eue.exports=function(t,r){r||(r=2);var n=t.marker,a=n.sizeref||1,i=n.sizemin||0,o=n.sizemode==="area"?function(s){return Math.sqrt(s/a)}:function(s){return s/a};return function(s){var l=o(s/r);return ept(l)&&l>0?Math.max(l,i):0}}});var Sd=fe(Yf=>{"use strict";var cT=Xt();Yf.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};Yf.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],n=e.yaxes||[],a=0;a=0&&r.index{var PB={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},ipt=/([astvzqmhlc])([^astvzqmhlc]*)/gi,apt=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function opt(e){let t=[];return e.replace(ipt,(r,n,a)=>{let i=n.toLowerCase(),o=n,s=spt(a);for(i==="m"&&s.length>2&&(t.push([o,...s.splice(0,2)]),i="l",o=o==="m"?"l":"L");;){if(s.length===PB[i])return t.push([o,...s]),"";if(s.length{"use strict";var lpt=FB(),$n=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},za="M0,0Z",Pue=Math.sqrt(2),xm=Math.sqrt(3),DB=Math.PI,RB=Math.cos,IB=Math.sin;zue.exports={circle:{n:0,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?Ba(t,r,a):a}},square:{n:1,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.3,2);return Ba(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.4,2),a=$n(e*1.2,2);return Ba(t,r,"M"+a+","+n+"H"+n+"V"+a+"H-"+n+"V"+n+"H-"+a+"V-"+n+"H-"+n+"V-"+a+"H"+n+"V-"+n+"H"+a+"Z")}},x:{n:4,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.8/Pue,2),a="l"+n+","+n,i="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return Ba(t,r,"M0,"+n+a+i+o+i+o+s+o+s+a+s+a+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2/xm,2),a=$n(e/2,2),i=$n(e,2);return Ba(t,r,"M-"+n+","+a+"H"+n+"L0,-"+i+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2/xm,2),a=$n(e/2,2),i=$n(e,2);return Ba(t,r,"M-"+n+",-"+a+"H"+n+"L0,"+i+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2/xm,2),a=$n(e/2,2),i=$n(e,2);return Ba(t,r,"M"+a+",-"+n+"V"+n+"L-"+i+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2/xm,2),a=$n(e/2,2),i=$n(e,2);return Ba(t,r,"M-"+a+",-"+n+"V"+n+"L"+i+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.6,2),a=$n(e*1.2,2);return Ba(t,r,"M-"+a+",-"+n+"H"+n+"V"+a+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.6,2),a=$n(e*1.2,2);return Ba(t,r,"M"+n+",-"+a+"V"+n+"H-"+a+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.6,2),a=$n(e*1.2,2);return Ba(t,r,"M"+a+","+n+"H-"+n+"V-"+a+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.6,2),a=$n(e*1.2,2);return Ba(t,r,"M-"+n+","+a+"V-"+n+"H"+a+"Z")}},pentagon:{n:13,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.951,2),a=$n(e*.588,2),i=$n(-e,2),o=$n(e*-.309,2),s=$n(e*.809,2);return Ba(t,r,"M"+n+","+o+"L"+a+","+s+"H-"+a+"L-"+n+","+o+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e/2,2),i=$n(e*xm/2,2);return Ba(t,r,"M"+i+",-"+a+"V"+a+"L0,"+n+"L-"+i+","+a+"V-"+a+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e/2,2),i=$n(e*xm/2,2);return Ba(t,r,"M-"+a+","+i+"H"+a+"L"+n+",0L"+a+",-"+i+"H-"+a+"L-"+n+",0Z")}},octagon:{n:16,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.924,2),a=$n(e*.383,2);return Ba(t,r,"M-"+a+",-"+n+"H"+a+"L"+n+",-"+a+"V"+a+"L"+a+","+n+"H-"+a+"L-"+n+","+a+"V-"+a+"Z")}},star:{n:17,f:function(e,t,r){if(qa(t))return za;var n=e*1.4,a=$n(n*.225,2),i=$n(n*.951,2),o=$n(n*.363,2),s=$n(n*.588,2),l=$n(-n,2),u=$n(n*-.309,2),c=$n(n*.118,2),f=$n(n*.809,2),v=$n(n*.382,2);return Ba(t,r,"M"+a+","+u+"H"+i+"L"+o+","+c+"L"+s+","+f+"L0,"+v+"L-"+s+","+f+"L-"+o+","+c+"L-"+i+","+u+"H-"+a+"L0,"+l+"Z")}},hexagram:{n:18,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.66,2),a=$n(e*.38,2),i=$n(e*.76,2);return Ba(t,r,"M-"+i+",0l-"+a+",-"+n+"h"+i+"l"+a+",-"+n+"l"+a+","+n+"h"+i+"l-"+a+","+n+"l"+a+","+n+"h-"+i+"l-"+a+","+n+"l-"+a+",-"+n+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(qa(t))return za;var n=$n(e*xm*.8,2),a=$n(e*.8,2),i=$n(e*1.6,2),o=$n(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Ba(t,r,"M-"+n+","+a+s+n+","+a+s+"0,-"+i+s+"-"+n+","+a+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(qa(t))return za;var n=$n(e*xm*.8,2),a=$n(e*.8,2),i=$n(e*1.6,2),o=$n(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Ba(t,r,"M"+n+",-"+a+s+"-"+n+",-"+a+s+"0,"+i+s+n+",-"+a+"Z")}},"star-square":{n:21,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.1,2),a=$n(e*2,2),i="A "+a+","+a+" 0 0 1 ";return Ba(t,r,"M-"+n+",-"+n+i+"-"+n+","+n+i+n+","+n+i+n+",-"+n+i+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2),a=$n(e*1.9,2),i="A "+a+","+a+" 0 0 1 ";return Ba(t,r,"M-"+n+",0"+i+"0,"+n+i+n+",0"+i+"0,-"+n+i+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.7,2),a=$n(e*1.4,2);return Ba(t,r,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2),a=$n(e*.7,2);return Ba(t,r,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e/Pue,2);return Ba(t,r,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.3,2);return Ba(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM0,-"+n+"V"+n+"M-"+n+",0H"+n)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.3,2),a=$n(e*.65,2);return Ba(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+a+",-"+a+"L"+a+","+a+"M-"+a+","+a+"L"+a+",-"+a)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2);return Ba(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*.85,2);return Ba(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(qa(t))return za;var n=$n(e/2,2),a=$n(e,2);return Ba(t,r,"M"+n+","+a+"V-"+a+"M"+(n-a)+",-"+a+"V"+a+"M"+a+","+n+"H-"+a+"M-"+a+","+(n-a)+"H"+a)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*1.6,2),i=$n(e*.8,2);return Ba(t,r,"M-"+n+","+i+"L0,0M"+n+","+i+"L0,0M0,-"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*1.6,2),i=$n(e*.8,2);return Ba(t,r,"M-"+n+",-"+i+"L0,0M"+n+",-"+i+"L0,0M0,"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*1.6,2),i=$n(e*.8,2);return Ba(t,r,"M"+i+","+n+"L0,0M"+i+",-"+n+"L0,0M-"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*1.6,2),i=$n(e*.8,2);return Ba(t,r,"M-"+i+","+n+"L0,0M-"+i+",-"+n+"L0,0M"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2);return Ba(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2);return Ba(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e*2,2);return Ba(t,r,"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e*2,2);return Ba(t,r,"M0,0L-"+n+",-"+a+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2,2),a=$n(e,2);return Ba(t,r,"M0,0L"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2,2),a=$n(e,2);return Ba(t,r,"M0,0L-"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e*2,2);return Ba(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e*2,2);return Ba(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+a+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2,2),a=$n(e,2);return Ba(t,r,"M0,-"+a+"V"+a+"M0,0L"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2,2),a=$n(e,2);return Ba(t,r,"M0,-"+a+"V"+a+"M0,0L-"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(qa(t))return za;var n=DB/2.5,a=2*e*RB(n),i=2*e*IB(n);return Ba(t,r,"M0,0L"+-a+","+i+"L"+a+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(qa(t))return za;var n=DB/4,a=2*e*RB(n),i=2*e*IB(n);return Ba(t,r,"M0,0L"+-a+","+i+"A "+2*e+","+2*e+" 0 0 1 "+a+","+i+"Z")},backoff:.4,noDot:!0}};function qa(e){return e===null}var Fue,Due,Rue,Iue;function Ba(e,t,r){if((!e||e%360===0)&&!t)return r;if(Rue===e&&Iue===t&&Fue===r)return Due;Rue=e,Iue=t,Fue=r;function n(x,y){var C=RB(x),k=IB(x),S=y[0],L=y[1]+(t||0);return[S*C-L*k,S*k+L*C]}for(var a=e/180*DB,i=0,o=0,s=lpt(r),l="",u=0;u{"use strict";var Gc=xi(),hs=Xt(),upt=hs.numberFormat,_m=aa(),gk=bi(),Tc=ni(),cpt=js(),hT=hs.strTranslate,mk=as(),fpt=ev(),hpt=nc(),dpt=hpt.LINE_SPACING,Yue=Y1().DESELECTDIM,vpt=Is(),ppt=uT(),gpt=Sd().appendArrayPointValue,hi=nce.exports={};hi.font=function(e,t){var r=t.variant,n=t.style,a=t.weight,i=t.color,o=t.size,s=t.family,l=t.shadow,u=t.lineposition,c=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),i&&e.call(Tc.fill,i),a&&e.style("font-weight",a),n&&e.style("font-style",n),r&&e.style("font-variant",r),c&&e.style("text-transform",zB(ypt(c))),l&&e.style("text-shadow",l==="auto"?mk.makeTextShadow(Tc.contrast(i)):zB(l)),u&&e.style("text-decoration-line",zB(xpt(u)))};function zB(e){return e==="none"?void 0:e}var mpt={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function ypt(e){return mpt[e]}function xpt(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}hi.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};hi.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};hi.setRect=function(e,t,r,n,a){e.call(hi.setPosition,t,r).call(hi.setSize,n,a)};hi.translatePoint=function(e,t,r,n){var a=r.c2p(e.x),i=n.c2p(e.y);if(_m(a)&&_m(i)&&t.node())t.node().nodeName==="text"?t.attr("x",a).attr("y",i):t.attr("transform",hT(a,i));else return!1;return!0};hi.translatePoints=function(e,t,r){e.each(function(n){var a=Gc.select(this);hi.translatePoint(n,a,t,r)})};hi.hideOutsideRangePoint=function(e,t,r,n,a,i){t.attr("display",r.isPtWithinRange(e,a)&&n.isPtWithinRange(e,i)?null:"none")};hi.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,n=t.yaxis;e.each(function(a){var i=a[0].trace,o=i.xcalendar,s=i.ycalendar,l=gk.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(l).each(function(u){hi.hideOutsideRangePoint(u,Gc.select(this),r,n,o,s)})})}};hi.crispRound=function(e,t,r){return!t||!_m(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};hi.singleLineStyle=function(e,t,r,n,a){t.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,s=a||i.dash||"";Tc.stroke(t,n||i.color),hi.dashLine(t,s,o)};hi.lineGroupStyle=function(e,t,r,n){e.style("fill","none").each(function(a){var i=(((a||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,s=n||i.dash||"";Gc.select(this).call(Tc.stroke,r||i.color).call(hi.dashLine,s,o)})};hi.dashLine=function(e,t,r){r=+r||0,t=hi.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};hi.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return e==="solid"?e="":e==="dot"?e=r+"px,"+r+"px":e==="dash"?e=3*r+"px,"+3*r+"px":e==="longdash"?e=5*r+"px,"+5*r+"px":e==="dashdot"?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":e==="longdashdot"&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e};function Xue(e,t,r,n){var a=t.fillpattern,i=t.fillgradient,o=hi.getPatternAttr,s=a&&(o(a.shape,0,"")||o(a.path,0,""));if(s){var l=o(a.bgcolor,0,null),u=o(a.fgcolor,0,null),c=a.fgopacity,f=o(a.size,0,8),v=o(a.solidity,0,.3),g=t.uid;hi.pattern(e,"point",r,g,s,f,v,void 0,a.fillmode,l,u,c)}else if(i&&i.type!=="none"){var p=i.type,_="scatterfill-"+t.uid;if(n&&(_="legendfill-"+t.uid),!n&&(i.start!==void 0||i.stop!==void 0)){var x,y;p==="horizontal"?(x={x:i.start,y:0},y={x:i.stop,y:0}):p==="vertical"&&(x={x:0,y:i.start},y={x:0,y:i.stop}),x.x=t._xA.c2p(x.x===void 0?t._extremes.x.min[0].val:x.x,!0),x.y=t._yA.c2p(x.y===void 0?t._extremes.y.min[0].val:x.y,!0),y.x=t._xA.c2p(y.x===void 0?t._extremes.x.max[0].val:y.x,!0),y.y=t._yA.c2p(y.y===void 0?t._extremes.y.max[0].val:y.y,!0),e.call(Kue,r,_,"linear",i.colorscale,"fill",x,y,!0,!1)}else p==="horizontal"&&(p=p+"reversed"),e.call(hi.gradient,r,_,p,i.colorscale,"fill")}else t.fillcolor&&e.call(Tc.fill,t.fillcolor)}hi.singleFillStyle=function(e,t){var r=Gc.select(e.node()),n=r.data(),a=((n[0]||[])[0]||{}).trace||{};Xue(e,a,t,!1)};hi.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(n){var a=Gc.select(this);n[0].trace&&Xue(a,n[0].trace,t,r)})};var Bue=que();hi.symbolNames=[];hi.symbolFuncs=[];hi.symbolBackOffs=[];hi.symbolNeedLines={};hi.symbolNoDot={};hi.symbolNoFill={};hi.symbolList=[];Object.keys(Bue).forEach(function(e){var t=Bue[e],r=t.n;hi.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),hi.symbolNames[r]=e,hi.symbolFuncs[r]=t.f,hi.symbolBackOffs[r]=t.backoff||0,t.needLine&&(hi.symbolNeedLines[r]=!0),t.noDot?hi.symbolNoDot[r]=!0:hi.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(hi.symbolNoFill[r]=!0)});var _pt=hi.symbolNames.length,bpt="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";hi.symbolNumber=function(e){if(_m(e))e=+e;else if(typeof e=="string"){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),e=hi.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=_pt||e>=400?0:Math.floor(Math.max(e,0))};function Zue(e,t,r,n){var a=e%100;return hi.symbolFuncs[a](t,r,n)+(e>=200?bpt:"")}var Oue=upt("~f"),$ue={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}};hi.gradient=function(e,t,r,n,a,i){var o=$ue[n];return Kue(e,t,r,o.type,a,i,o.start,o.stop,!1,o.reversed)};function Kue(e,t,r,n,a,i,o,s,l,u){var c=a.length,f;n==="linear"?f={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:n==="radial"&&(f={node:"radialGradient",reversed:u});for(var v=new Array(c),g=0;g=0&&e.i===void 0&&(e.i=i.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),n.ms2mrc){var l;e.ms==="various"||o.size==="various"?l=3:l=n.ms2mrc(e.ms),e.mrc=l,n.selectedSizeFn&&(l=e.mrc=n.selectedSizeFn(e));var u=hi.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=GB(e,r),f=VB(e,r);t.attr("d",Zue(u,l,c,f))}var v=!1,g,p,_;if(e.so)_=s.outlierwidth,p=s.outliercolor,g=o.outliercolor;else{var x=(s||{}).width;_=(e.mlw+1||x+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?p=e.mlcc=n.lineScale(e.mlc):hs.isArrayOrTypedArray(s.color)?p=Tc.defaultLine:p=s.color,hs.isArrayOrTypedArray(o.color)&&(g=Tc.defaultLine,v=!0),"mc"in e?g=e.mcc=n.markerScale(e.mc):g=o.color||o.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(g=n.selectedColorFn(e))}let y=e.mld||(s||{}).dash;if(y&&hi.dashLine(t,y,_),e.om)t.call(Tc.stroke,g).style({"stroke-width":(_||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:_)+"px");var C=o.gradient,k=e.mgt;k?v=!0:k=C&&C.type,hs.isArrayOrTypedArray(k)&&(k=k[0],$ue[k]||(k=0));var S=o.pattern,L=hi.getPatternAttr,w=S&&(L(S.shape,e.i,"")||L(S.path,e.i,""));if(k&&k!=="none"){var T=e.mgc;T?v=!0:T=C.color;var A=r.uid;v&&(A+="-"+e.i),hi.gradient(t,a,A,k,[[0,T],[1,g]],"fill")}else if(w){var m=!1,F=S.fgcolor;!F&&i&&i.color&&(F=i.color,m=!0);var E=L(F,e.i,i&&i.color||null),I=L(S.bgcolor,e.i,null),R=S.fgopacity,B=L(S.size,e.i,8),O=L(S.solidity,e.i,.3);m=m||e.mcc||hs.isArrayOrTypedArray(S.shape)||hs.isArrayOrTypedArray(S.path)||hs.isArrayOrTypedArray(S.bgcolor)||hs.isArrayOrTypedArray(S.fgcolor)||hs.isArrayOrTypedArray(S.size)||hs.isArrayOrTypedArray(S.solidity);var U=r.uid;m&&(U+="-"+e.i),hi.pattern(t,"point",a,U,w,B,O,e.mcc,S.fillmode,I,E,R)}else hs.isArrayOrTypedArray(g)?Tc.fill(t,g[e.i]):Tc.fill(t,g);_&&Tc.stroke(t,p)}};hi.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=hi.tryColorscale(r,""),t.lineScale=hi.tryColorscale(r,"line"),gk.traceIs(e,"symbols")&&(t.ms2mrc=vpt.isBubble(e)?ppt(e):function(){return(r.size||6)/2}),e.selectedpoints&&hs.extendFlat(t,hi.makeSelectedPointStyleFns(e)),t};hi.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.marker||{},i=r.marker||{},o=n.marker||{},s=a.opacity,l=i.opacity,u=o.opacity,c=l!==void 0,f=u!==void 0;(hs.isArrayOrTypedArray(s)||c||f)&&(t.selectedOpacityFn=function(S){var L=S.mo===void 0?a.opacity:S.mo;return S.selected?c?l:L:f?u:Yue*L});var v=a.color,g=i.color,p=o.color;(g||p)&&(t.selectedColorFn=function(S){var L=S.mcc||v;return S.selected?g||L:p||L});var _=a.size,x=i.size,y=o.size,C=x!==void 0,k=y!==void 0;return gk.traceIs(e,"symbols")&&(C||k)&&(t.selectedSizeFn=function(S){var L=S.mrc||_/2;return S.selected?C?x/2:L:k?y/2:L}),t};hi.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.textfont||{},i=r.textfont||{},o=n.textfont||{},s=a.color,l=i.color,u=o.color;return t.selectedTextColorFn=function(c){var f=c.tc||s;return c.selected?l||f:u||(l?f:Tc.addOpacity(f,Yue))},t};hi.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=hi.makeSelectedPointStyleFns(t),n=t.marker||{},a=[];r.selectedOpacityFn&&a.push(function(i,o){i.style("opacity",r.selectedOpacityFn(o))}),r.selectedColorFn&&a.push(function(i,o){Tc.fill(i,r.selectedColorFn(o))}),r.selectedSizeFn&&a.push(function(i,o){var s=o.mx||n.symbol||0,l=r.selectedSizeFn(o);i.attr("d",Zue(hi.symbolNumber(s),l,GB(o,t),VB(o,t))),o.mrc2=l}),a.length&&e.each(function(i){for(var o=Gc.select(this),s=0;s0?r:0}hi.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var a=hi.makeSelectedTextStyleFns(t);n=a.selectedTextColorFn}var i=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=Gc.select(this),u=i?hs.extractOption(s,t,"txt","texttemplate"):hs.extractOption(s,t,"tx","text");if(!u&&u!==0){l.remove();return}if(i){var c=t._module.formatLabels,f=c?c(s,t,o):{},v={};gpt(v,t,s.i),u=hs.texttemplateString({data:[v,s,t._meta],fallback:t.texttemplatefallback,labels:f,locale:o._d3locale,template:u})}var g=s.tp||t.textposition,p=Que(s,t),_=n?n(s):s.tc||t.textfont.color;l.call(hi.font,{family:s.tf||t.textfont.family,weight:s.tw||t.textfont.weight,style:s.ty||t.textfont.style,variant:s.tv||t.textfont.variant,textcase:s.tC||t.textfont.textcase,lineposition:s.tE||t.textfont.lineposition,shadow:s.tS||t.textfont.shadow,size:p,color:_}).text(u).call(mk.convertToTspans,r).call(Jue,g,p,s.mrc)})}};hi.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=hi.makeSelectedTextStyleFns(t);e.each(function(n){var a=Gc.select(this),i=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=Que(n,t);Tc.fill(a,i);var l=gk.traceIs(t,"bar-like");Jue(a,o,s,n.mrc2||n.mrc,l)})}};var Nue=.5;hi.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],n=[],a;for(a=1;a=l||S>=c&&S<=l)&&(L<=f&&L>=u||L>=f&&L<=u)&&(e=[S,L])}return e}hi.applyBackoff=rce;hi.makeTester=function(){var e=hs.ensureSingleById(Gc.select("body"),"svg","js-plotly-tester",function(r){r.attr(fpt.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=hs.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});hi.tester=e,hi.testref=t};hi.savedBBoxes={};var BB=0,Apt=1e4;hi.bBox=function(e,t,r){r||(r=Uue(e));var n;if(r){if(n=hi.savedBBoxes[r],n)return hs.extendFlat({},n)}else if(e.childNodes.length===1){var a=e.childNodes[0];if(r=Uue(a),r){var i=+a.getAttribute("x")||0,o=+a.getAttribute("y")||0,s=a.getAttribute("transform");if(!s){var l=hi.bBox(a,!1,r);return i&&(l.left+=i,l.right+=i),o&&(l.top+=o,l.bottom+=o),l}if(r+="~"+i+"~"+o+"~"+s,n=hi.savedBBoxes[r],n)return hs.extendFlat({},n)}}var u,c;t?u=e:(c=hi.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),Gc.select(u).attr("transform",null).call(mk.positionText,0,0);var f=u.getBoundingClientRect(),v=hi.testref.node().getBoundingClientRect();t||c.removeChild(u);var g={height:f.height,width:f.width,left:f.left-v.left,top:f.top-v.top,right:f.right-v.left,bottom:f.bottom-v.top};return BB>=Apt&&(hi.savedBBoxes={},BB=0),r&&(hi.savedBBoxes[r]=g),BB++,hs.extendFlat({},g)};function Uue(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}hi.setClipUrl=function(e,t,r){e.attr("clip-path",UB(t,r))};function UB(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}hi.getTranslate=function(e){var t=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",a=n.replace(t,function(i,o,s){return[o,s].join(" ")}).split(" ");return{x:+a[0]||0,y:+a[1]||0}};hi.setTranslate=function(e,t,r){var n=/(\btranslate\(.*?\);?)/,a=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[a]("transform")||"";return t=t||0,r=r||0,o=o.replace(n,"").trim(),o+=hT(t,r),o=o.trim(),e[i]("transform",o),o};hi.getScale=function(e){var t=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",a=n.replace(t,function(i,o,s){return[o,s].join(" ")}).split(" ");return{x:+a[0]||1,y:+a[1]||1}};hi.setScale=function(e,t,r){var n=/(\bscale\(.*?\);?)/,a=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[a]("transform")||"";return t=t||1,r=r||1,o=o.replace(n,"").trim(),o+="scale("+t+","+r+")",o=o.trim(),e[i]("transform",o),o};var Mpt=/\s*sc.*/;hi.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var n=t===1&&r===1?"":"scale("+t+","+r+")";e.each(function(){var a=(this.getAttribute("transform")||"").replace(Mpt,"");a+=n,a=a.trim(),this.setAttribute("transform",a)})}};var Spt=/translate\([^)]*\)\s*$/;hi.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,a=Gc.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),s=parseFloat(i.attr("y")||0),l=(a.attr("transform")||"").match(Spt);t===1&&r===1?n=[]:n=[hT(o,s),"scale("+t+","+r+")",hT(-o,-s)],l&&n.push(l),a.attr("transform",n.join(""))}})};function VB(e,t){var r;return e&&(r=e.mf),r===void 0&&(r=t.marker&&t.marker.standoff||0),!t._geo&&!t._xA?-r:r}hi.getMarkerStandoff=VB;var fT=Math.atan2,D2=Math.cos,Hb=Math.sin;function Vue(e,t){var r=t[0],n=t[1];return[r*D2(e)-n*Hb(e),r*Hb(e)+n*D2(e)]}var Gue,Hue,jue,Wue,OB,NB;function GB(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!_m(r)||hs.isArrayOrTypedArray(r))&&(r=0));var n,a,i=t.marker.angleref;if(i==="previous"||i==="north"){if(t._geo){var o=t._geo.project(e.lonlat);n=o[0],a=o[1]}else{var s=t._xA,l=t._yA;if(s&&l)n=s.c2p(e.x),a=l.c2p(e.y);else return 90}if(t._geo){var u=e.lonlat[0],c=e.lonlat[1],f=t._geo.project([u,c+1e-5]),v=t._geo.project([u+1e-5,c]),g=fT(v[1]-a,v[0]-n),p=fT(f[1]-a,f[0]-n),_;if(i==="north")_=r/180*Math.PI;else if(i==="previous"){var x=u/180*Math.PI,y=c/180*Math.PI,C=Gue/180*Math.PI,k=Hue/180*Math.PI,S=C-x,L=D2(k)*Hb(S),w=Hb(k)*D2(y)-D2(k)*Hb(y)*D2(S);_=-fT(L,w)-Math.PI,Gue=u,Hue=c}var T=Vue(g,[D2(_),0]),A=Vue(p,[Hb(_),0]);r=fT(T[1]+A[1],T[0]+A[0])/Math.PI*180,i==="previous"&&!(NB===t.uid&&e.i===OB+1)&&(r=null)}if(i==="previous"&&!t._geo)if(NB===t.uid&&e.i===OB+1&&_m(n)&&_m(a)){var m=n-jue,F=a-Wue,E=t.line&&t.line.shape||"",I=E.slice(E.length-1);I==="h"&&(F=0),I==="v"&&(m=0),r+=fT(F,m)/Math.PI*180+90}else r=null}return jue=n,Wue=a,OB=e.i,NB=t.uid,r}hi.getMarkerAngle=GB});var q2=fe((Idr,sce)=>{"use strict";var jb=xi(),Ept=aa(),kpt=Hs(),HB=bi(),z2=Xt(),ice=z2.strTranslate,yk=Ji(),xk=ni(),Wb=as(),ace=Y1(),Cpt=nc().OPPOSITE_SIDE,oce=/ [XY][0-9]* /,jB=1.6,WB=1.6;function Lpt(e,t,r){var n=e._fullLayout,a=r.propContainer,i=r.propName,o=r.placeholder,s=r.traceIndex,l=r.avoid||{},u=r.attributes,c=r.transform,f=r.containerGroup,v=1,g=a.title,p=(g&&g.text?g.text:"").trim(),_=!1,x=g&&g.font?g.font:{},y=x.family,C=x.size,k=x.color,S=x.weight,L=x.style,w=x.variant,T=x.textcase,A=x.lineposition,m=x.shadow,F=r.subtitlePropName,E=!!F,I=r.subtitlePlaceholder,R=(a.title||{}).subtitle||{text:"",font:{}},B=(R.text||"").trim(),O=!1,U=1,j=R.font,q=j.family,V=j.size,K=j.color,ee=j.weight,ce=j.style,me=j.variant,ye=j.textcase,ue=j.lineposition,J=j.shadow,_e;i==="title.text"?_e="titleText":i.indexOf("axis")!==-1?_e="axisTitleText":i.indexOf("colorbar")!==-1&&(_e="colorbarTitleText");var ne=e._context.edits[_e];function ae(et,qe){return et===void 0||qe===void 0?!1:et.replace(oce," % ")===qe.replace(oce," % ")}p===""?v=0:ae(p,o)&&(ne||(p=""),v=.2,_=!0),E&&(B===""?U=0:ae(B,I)&&(ne||(B=""),U=.2,O=!0)),r._meta?p=z2.templateString(p,r._meta):n._meta&&(p=z2.templateString(p,n._meta));var pe=p||B||ne,ie;f||(f=z2.ensureSingle(n._infolayer,"g","g-"+t),ie=n._hColorbarMoveTitle);var le=f.selectAll("text."+t).data(pe?[0]:[]);le.enter().append("text"),le.text(p).attr("class",t),le.exit().remove();var xe=null,be=t+"-subtitle",De=B||ne;if(E&&(xe=f.selectAll("text."+be).data(De?[0]:[]),xe.enter().append("text"),xe.text(B).attr("class",be),xe.exit().remove()),!pe)return f;function Ge(et,qe){z2.syncOrAsync([pt,tt],{title:et,subtitle:qe})}function pt(et){var qe=et.title,we=et.subtitle,Le;!c&&ie&&(c={}),c?(Le="",c.rotate&&(Le+="rotate("+[c.rotate,u.x,u.y]+")"),(c.offset||ie)&&(Le+=ice(0,(c.offset||0)-(ie||0)))):Le=null,qe.attr("transform",Le);function Ke(it){if(it){var We=jb.select(it.node().parentNode).select("."+be);if(!We.empty()){var mt=it.node().getBBox();if(mt.height){var bt=mt.y+mt.height+jB*V;We.attr("y",bt)}}}}if(qe.style("opacity",v*xk.opacity(k)).call(yk.font,{color:xk.rgb(k),size:jb.round(C,2),family:y,weight:S,style:L,variant:w,textcase:T,shadow:m,lineposition:A}).attr(u).call(Wb.convertToTspans,e,Ke),we&&!we.empty()){var Te=f.select("."+t+"-math-group"),Ve=qe.node().getBBox(),$e=Te.node()?Te.node().getBBox():void 0,ot=$e?$e.y+$e.height+jB*V:Ve.y+Ve.height+WB*V,rt=z2.extendFlat({},u,{y:ot});we.attr("transform",Le),we.style("opacity",U*xk.opacity(K)).call(yk.font,{color:xk.rgb(K),size:jb.round(V,2),family:q,weight:ee,style:ce,variant:me,textcase:ye,shadow:J,lineposition:ue}).attr(rt).call(Wb.convertToTspans,e)}return kpt.previousPromises(e)}function tt(et){var qe=et.title,we=jb.select(qe.node().parentNode);if(l&&l.selection&&l.side&&p){we.attr("transform",null);var Le=Cpt[l.side],Ke=l.side==="left"||l.side==="top"?-1:1,Te=Ept(l.pad)?l.pad:2,Ve=yk.bBox(we.node()),$e={t:0,b:0,l:0,r:0},ot=e._fullLayout._reservedMargin;for(var rt in ot)for(var it in ot[rt]){var We=ot[rt][it];$e[it]=Math.max($e[it],We)}var mt={left:$e.l,top:$e.t,right:n.width-$e.r,bottom:n.height-$e.b},bt=l.maxShift||Ke*(mt[l.side]-Ve[l.side]),Yt=0;if(bt<0)Yt=bt;else{var jt=l.offsetLeft||0,mr=l.offsetTop||0;Ve.left-=jt,Ve.right-=jt,Ve.top-=mr,Ve.bottom-=mr,l.selection.each(function(){var fr=yk.bBox(this);z2.bBoxIntersect(Ve,fr,Te)&&(Yt=Math.max(Yt,Ke*(fr[l.side]-Ve[Le])+Te))}),Yt=Math.min(bt,Yt),a._titleScoot=Math.abs(Yt)}if(Yt>0||bt<0){var or={left:[-Yt,0],right:[Yt,0],top:[0,-Yt],bottom:[0,Yt]}[l.side];we.attr("transform",ice(or[0],or[1]))}}}le.call(Ge,xe);function Oe(et,qe){et.text(qe).on("mouseover.opacity",function(){jb.select(this).transition().duration(ace.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){jb.select(this).transition().duration(ace.HIDE_PLACEHOLDER).style("opacity",0)})}if(ne&&(p?le.on(".opacity",null):(Oe(le,o),_=!0),le.call(Wb.makeEditable,{gd:e}).on("edit",function(et){s!==void 0?HB.call("_guiRestyle",e,i,et,s):HB.call("_guiRelayout",e,i,et)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ge)}).on("input",function(et){this.text(et||" ").call(Wb.positionText,u.x,u.y)}),E)){if(E&&!p){var ze=le.node().getBBox(),ut=ze.y+ze.height+WB*V;xe.attr("y",ut)}B?xe.on(".opacity",null):(Oe(xe,I),O=!0),xe.call(Wb.makeEditable,{gd:e}).on("edit",function(et){HB.call("_guiRelayout",e,"title.subtitle.text",et)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ge)}).on("input",function(et){this.text(et||" ").call(Wb.positionText,xe.attr("x"),xe.attr("y"))})}return le.classed("js-placeholder",_),xe&&!xe.empty()&&xe.classed("js-placeholder",O),f}sce.exports={draw:Lpt,SUBTITLE_PADDING_EM:WB,SUBTITLE_PADDING_MATHJAX_EM:jB}});var Hp=fe((zdr,hce)=>{"use strict";var Ppt=xi(),Fpt=lb().utcFormat,zs=Xt(),Dpt=zs.numberFormat,Vp=aa(),bm=zs.cleanNumber,Rpt=zs.ms2DateTime,lce=zs.dateTime2ms,Gp=zs.ensureNumber,uce=zs.isArrayOrTypedArray,wm=Wa(),_k=wm.FP_SAFE,tp=wm.BADNUM,Ipt=wm.LOG_CLIP,zpt=wm.ONEWEEK,bk=wm.ONEDAY,wk=wm.ONEHOUR,cce=wm.ONEMIN,fce=wm.ONESEC,Tk=El(),Sk=rc(),Ak=Sk.HOUR_PATTERN,Mk=Sk.WEEKDAY_PATTERN;function dT(e){return Math.pow(10,e)}function YB(e){return e!=null}hce.exports=function(t,r){r=r||{};var n=t._id||"x",a=n.charAt(0);function i(S,L){if(S>0)return Math.log(S)/Math.LN10;if(S<=0&&L&&t.range&&t.range.length===2){var w=t.range[0],T=t.range[1];return .5*(w+T-2*Ipt*Math.abs(w-T))}else return tp}function o(S,L,w,T){if((T||{}).msUTC&&Vp(S))return+S;var A=lce(S,w||t.calendar);if(A===tp)if(Vp(S)){S=+S;var m=Math.floor(zs.mod(S+.05,1)*10),F=Math.round(S-m/10);A=lce(new Date(F))+m/10}else return tp;return A}function s(S,L,w){return Rpt(S,L,w||t.calendar)}function l(S){return t._categories[Math.round(S)]}function u(S){if(YB(S)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[S]!==void 0)return t._categoriesMap[S];t._categories.push(typeof S=="number"?String(S):S);var L=t._categories.length-1;return t._categoriesMap[S]=L,L}return tp}function c(S,L){for(var w=new Array(L),T=0;Tt.range[1]&&(w=!w);for(var T=w?-1:1,A=T*S,m=0,F=0;FI)m=F+1;else{m=A<(E+I)/2?F:F+1;break}}var R=t._B[m]||0;return isFinite(R)?p(S,t._m2,R):0},y=function(S){var L=t._rangebreaks.length;if(!L)return _(S,t._m,t._b);for(var w=0,T=0;Tt._rangebreaks[T].pmax&&(w=T+1);return _(S,t._m2,t._B[w])}}t.c2l=t.type==="log"?i:Gp,t.l2c=t.type==="log"?dT:Gp,t.l2p=x,t.p2l=y,t.c2p=t.type==="log"?function(S,L){return x(i(S,L))}:x,t.p2c=t.type==="log"?function(S){return dT(y(S))}:y,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=bm,t.c2d=t.c2r=t.l2d=t.l2r=Gp,t.d2p=t.r2p=function(S){return t.l2p(bm(S))},t.p2d=t.p2r=y,t.cleanPos=Gp):t.type==="log"?(t.d2r=t.d2l=function(S,L){return i(bm(S),L)},t.r2d=t.r2c=function(S){return dT(bm(S))},t.d2c=t.r2l=bm,t.c2d=t.l2r=Gp,t.c2r=i,t.l2d=dT,t.d2p=function(S,L){return t.l2p(t.d2r(S,L))},t.p2d=function(S){return dT(y(S))},t.r2p=function(S){return t.l2p(bm(S))},t.p2r=y,t.cleanPos=Gp):t.type==="date"?(t.d2r=t.r2d=zs.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(S,L,w){return t.l2p(o(S,0,w))},t.p2d=t.p2r=function(S,L,w){return s(y(S),L,w)},t.cleanPos=function(S){return zs.cleanDate(S,tp,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=u,t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=v,t.r2c=function(S){var L=g(S);return L!==void 0?L:t.fraction2r(.5)},t.l2r=t.c2r=Gp,t.r2l=g,t.d2p=function(S){return t.l2p(t.r2c(S))},t.p2d=function(S){return l(y(S))},t.r2p=t.d2p,t.p2r=y,t.cleanPos=function(S){return typeof S=="string"&&S!==""?S:Gp(S)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=v,t.r2c=function(S){var L=v(S);return L!==void 0?L:t.fraction2r(.5)},t.r2c_just_indices=f,t.l2r=t.c2r=Gp,t.r2l=v,t.d2p=function(S){return t.l2p(t.r2c(S))},t.p2d=function(S){return l(y(S))},t.r2p=t.d2p,t.p2r=y,t.cleanPos=function(S){return Array.isArray(S)||typeof S=="string"&&S!==""?S:Gp(S)},t.setupMultiCategory=function(S){var L=t._traceIndices,w,T,A=t._matchGroup;if(A&&t._categories.length===0){for(var m in A)if(m!==n){var F=r[Tk.id2name(m)];L=L.concat(F._traceIndices)}}var E=[[0,{}],[0,{}]],I=[];for(w=0;wF[1]&&(T[m?0:1]=w,A[1]=F[1]),A[0]>=A[1])if(L!==void 0){var E=F[0]+1;w!==void 0&&(E=Math.min(E,F[1])),T[m?0:1]=t.l2r(E)}else w!==void 0&&(T[m?1:0]=t.l2r(F[1]-1))}},t.cleanRange=function(S,L){t._cleanRange(S,L),t.limitRange(S)},t._cleanRange=function(S,L){L||(L={}),S||(S="range");var w=zs.nestedProperty(t,S).get(),T,A;if(t.type==="date"?A=zs.dfltRange(t.calendar):a==="y"?A=Sk.DFLTRANGEY:t._name==="realaxis"?A=[0,1]:A=L.dfltRange||Sk.DFLTRANGEX,A=A.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(A[0]=0),!w||w.length!==2){zs.nestedProperty(t,S).set(A);return}var m=w[0]===null,F=w[1]===null;for(t.type==="date"&&!t.autorange&&(w[0]=zs.cleanDate(w[0],tp,t.calendar),w[1]=zs.cleanDate(w[1],tp,t.calendar)),T=0;T<2;T++)if(t.type==="date"){if(!zs.isDateTime(w[T],t.calendar)){t[S]=A;break}if(t.r2l(w[0])===t.r2l(w[1])){var E=zs.constrain(t.r2l(w[0]),zs.MIN_MS+1e3,zs.MAX_MS-1e3);w[0]=t.l2r(E-1e3),w[1]=t.l2r(E+1e3);break}}else{if(!Vp(w[T]))if(!(m||F)&&Vp(w[1-T]))w[T]=w[1-T]*(T?10:.1);else{t[S]=A;break}if(w[T]<-_k?w[T]=-_k:w[T]>_k&&(w[T]=_k),w[0]===w[1]){var I=Math.max(1,Math.abs(w[0]*1e-6));w[0]-=I,w[1]+=I}}},t.setScale=function(S){var L=r._size;if(t.overlaying){var w=Tk.getFromId({_fullLayout:r},t.overlaying);t.domain=w.domain}var T=S&&t._r?"_r":"range",A=t.calendar;t.cleanRange(T);var m=t.r2l(t[T][0],A),F=t.r2l(t[T][1],A),E=a==="y";if(E?(t._offset=L.t+(1-t.domain[1])*L.h,t._length=L.h*(t.domain[1]-t.domain[0]),t._m=t._length/(m-F),t._b=-t._m*F):(t._offset=L.l+t.domain[0]*L.w,t._length=L.w*(t.domain[1]-t.domain[0]),t._m=t._length/(F-m),t._b=-t._m*m),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var I,R;if(t._rangebreaks=t.locateBreaks(Math.min(m,F),Math.max(m,F)),t._rangebreaks.length){for(I=0;IF&&(B=!B),B&&t._rangebreaks.reverse();var O=B?-1:1;for(t._m2=O*t._length/(Math.abs(F-m)-t._lBreaks),t._B.push(-t._m2*(E?F:m)),I=0;IA&&(A+=7,mA&&(A+=24,m=T&&m=T&&S=J.min&&(ceJ.max&&(J.max=me),ye=!1)}ye&&F.push({min:ce,max:me})}};for(w=0;w{"use strict";var dce=aa(),XB=Xt(),qpt=Wa().BADNUM,Ek=XB.isArrayOrTypedArray,Bpt=XB.isDateTime,Opt=XB.cleanNumber,vce=Math.round;gce.exports=function(t,r,n){var a=t,i=n.noMultiCategory;if(Ek(a)&&!a.length)return"-";if(!i&&Hpt(a))return"multicategory";if(i&&Array.isArray(a[0])){for(var o=[],s=0;si*2}function pce(e){return Math.max(1,(e-1)/1e3)}function Gpt(e,t){for(var r=e.length,n=pce(r),a=0,i=0,o={},s=0;sa*2}function Hpt(e){return Ek(e[0])&&Ek(e[1])}});var rp=fe((Bdr,Ace)=>{"use strict";var jpt=xi(),_ce=aa(),Tm=Xt(),kk=Wa().FP_SAFE,Wpt=bi(),Ypt=Ji(),bce=El(),Xpt=bce.getFromId,Zpt=bce.isLinked;Ace.exports={applyAutorangeOptions:Tce,getAutoRange:ZB,makePadFn:$B,doAutoRange:Kpt,findExtremes:Jpt,concatExtremes:QB};function ZB(e,t){var r,n,a=[],i=e._fullLayout,o=$B(i,t,0),s=$B(i,t,1),l=QB(e,t),u=l.min,c=l.max;if(u.length===0||c.length===0)return Tm.simpleMap(t.range,t.r2l);var f=u[0].val,v=c[0].val;for(r=1;r0&&(F=k-o(w)-s(T),F>S?E/F>L&&(A=w,m=T,L=E/F):E/k>L&&(A={val:w.val,nopad:1},m={val:T.val,nopad:1},L=E/k));function I(j,q){return Math.max(j,s(q))}if(f===v){var R=f-1,B=f+1;if(y)if(f===0)a=[0,1];else{var O=(f>0?c:u).reduce(I,0),U=f/(1-Math.min(.5,O/k));a=f>0?[0,U]:[U,0]}else C?a=[Math.max(0,R),Math.max(1,B)]:a=[R,B]}else y?(A.val>=0&&(A={val:0,nopad:1}),m.val<=0&&(m={val:0,nopad:1})):C&&(A.val-L*o(A)<0&&(A={val:0,nopad:1}),m.val<=0&&(m={val:1,nopad:1})),L=(m.val-A.val-mce(t,w.val,T.val))/(k-o(A)-s(m)),a=[A.val-L*o(A),m.val+L*s(m)];return a=Tce(a,t),t.limitRange&&t.limitRange(),p&&a.reverse(),Tm.simpleMap(a,t.l2r||Number)}function mce(e,t,r){var n=0;if(e.rangebreaks)for(var a=e.locateBreaks(t,r),i=0;i0?r.ppadplus:r.ppadminus)||r.ppad||0),w=S((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),T=S(r.vpadplus||r.vpad),A=S(r.vpadminus||r.vpad);if(!u){if(C=1/0,k=-1/0,l)for(f=0;f0&&(C=v),v>k&&v-kk&&(C=v),v>k&&v=E;f--)F(f);return{min:n,max:a,opts:r}}function KB(e,t,r,n){wce(e,t,r,n,Qpt)}function JB(e,t,r,n){wce(e,t,r,n,e1t)}function wce(e,t,r,n,a){for(var i=n.tozero,o=n.extrapad,s=!0,l=0;l=r&&(u.extrapad||!o)){s=!1;break}else a(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=i&&t===0;e.push({val:t,pad:c?0:r,extrapad:c?!1:o})}}function xce(e){return _ce(e)&&Math.abs(e)=t}function t1t(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&Ck(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&Ck(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function r1t(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&Ck(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&Ck(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function Ck(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t=l&&(i=l,r=l),o<=l&&(o=l,n=l)}}return r=t1t(r,t),n=r1t(n,t),[r,n]}});var Yi=fe((Ndr,Yce)=>{"use strict";var rv=xi(),Du=aa(),Xb=Hs(),pT=bi(),ga=Xt(),Zb=ga.strTranslate,B2=as(),n1t=q2(),gT=ni(),M0=Ji(),i1t=pf(),Mce=TB(),Odr=rc(),Xf=Wa(),a1t=Xf.ONEMAXYEAR,Fk=Xf.ONEAVGYEAR,Dk=Xf.ONEMINYEAR,o1t=Xf.ONEMAXQUARTER,nO=Xf.ONEAVGQUARTER,Rk=Xf.ONEMINQUARTER,s1t=Xf.ONEMAXMONTH,$b=Xf.ONEAVGMONTH,Ik=Xf.ONEMINMONTH,S0=Xf.ONEWEEK,Qh=Xf.ONEDAY,Am=Qh/2,Wp=Xf.ONEHOUR,mT=Xf.ONEMIN,zk=Xf.ONESEC,l1t=Xf.ONEMILLI,u1t=Xf.ONEMICROSEC,O2=Xf.MINUS_SIGN,Bk=Xf.BADNUM,iO={K:"zeroline"},aO={K:"gridline",L:"path"},oO={K:"minor-gridline",L:"path"},zce={K:"tick",L:"path"},Sce={K:"tick",L:"text"},Ece={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Ok=nc(),vT=Ok.MID_SHIFT,N2=Ok.CAP_SHIFT,yT=Ok.LINE_SPACING,c1t=Ok.OPPOSITE_SIDE,qk=3,Rn=Yce.exports={};Rn.setConvert=Hp();var f1t=Yb(),Yp=El(),h1t=Yp.idSort,d1t=Yp.isLinked;Rn.id2name=Yp.id2name;Rn.name2id=Yp.name2id;Rn.cleanId=Yp.cleanId;Rn.list=Yp.list;Rn.listIds=Yp.listIds;Rn.getFromId=Yp.getFromId;Rn.getFromTrace=Yp.getFromTrace;var qce=rp();Rn.getAutoRange=qce.getAutoRange;Rn.findExtremes=qce.findExtremes;var v1t=1e-4;function cO(e){var t=(e[1]-e[0])*v1t;return[e[0]-t,e[1]+t]}function p1t(e,t,r){if(![r,e,t].every(Du)||r===0)return e;let n=Math.round((e-t)/r),a=t+n*r;return e!==a&&Math.abs(e-a)v+" domain")),l=l.concat(i||[]),c.length>o?(ga.warn("Array attribute "+u+" has more entries than expected, truncating to "+o),c=c.slice(0,o)):c.length2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};Rn.saveRangeInitial=function(e,t){for(var r=Rn.list(e,"",!0),n=!1,a=0;af*.3||u(n)||u(a))){var v=r.dtick/2;e+=e+vo){var s=Number(r.slice(1));i.exactYears>o&&s%12===0?e=Rn.tickIncrement(e,"M6","reverse")+Qh*1.5:i.exactMonths>o?e=Rn.tickIncrement(e,"M1","reverse")+Qh*15.5:e-=Am;var l=Rn.tickIncrement(e,r);if(l<=n)return l}return e}Rn.prepMinorTicks=function(e,t,r){var f,v;if(!((f=t.minor)!=null&&f.dtick)){delete e.dtick;var n=t.dtick&&Du(t._tmin),a;if(n){var i=Rn.tickIncrement(t._tmin,t.dtick,!0);a=[t._tmin,i*.99+t._tmin*.01]}else{var o=ga.simpleMap(t.range,t.r2l);a=[o[0],.8*o[0]+.2*o[1]]}if(e.range=ga.simpleMap(a,t.l2r),e._isMinor=!0,Rn.prepTicks(e,r),n){var s=Du(t.dtick),l=Du(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?eO(u,c)?u===2*S0&&c===2*Qh&&(e.dtick=S0):u===2*S0&&c===3*Qh?e.dtick=S0:u===S0&&!(t._input.minor||{}).nticks?e.dtick=Qh:Lce(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)==="M"?l?e.dtick="M1":eO(u,c)?u>=12&&c===2&&(e.dtick="M3"):e.dtick=t.dtick:String(e.dtick).charAt(0)==="L"?String(t.dtick).charAt(0)==="L"?eO(u,c)||(e.dtick=Lce(u/c,2.5)?t.dtick/2:t.dtick):e.dtick="D1":e.dtick==="D2"&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}((v=t.minor)==null?void 0:v._tick0Init)===void 0&&(e.tick0=t.tick0)};function eO(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function Lce(e,t){return Math.abs(e/t-1)<.001}Rn.prepTicks=function(e,t){var r=ga.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode==="auto"||!e.dtick){var n=e.nticks,a;n||(e.type==="category"||e.type==="multicategory"?(a=e.tickfont?ga.bigFont(e.tickfont.size||12):15,n=e._length/a):(a=e._id.charAt(0)==="y"?40:80,n=ga.constrain(e._length/a,4,9)+1),e._name==="radialaxis"&&(n*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(n*=100),e._roughDTick=Math.abs(r[1]-r[0])/n,Rn.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(i=n-1,o=n):(i=n,o=n);var s=e[i].value,l=e[o].value,u=Math.abs(l-s),c=r||u,f=0;c>=Dk?u>=Dk&&u<=a1t?f=u:f=Fk:r===nO&&c>=Rk?u>=Rk&&u<=o1t?f=u:f=nO:c>=Ik?u>=Ik&&u<=s1t?f=u:f=$b:r===S0&&c>=S0?f=S0:c>=Qh?f=Qh:r===Am&&c>=Am?f=Am:r===Wp&&c>=Wp&&(f=Wp);var v;f>=u&&(f=u,v=!0);var g=a+f;if(t.rangebreaks&&f>0){for(var p=84,_=0,x=0;xS0&&(f=u)}(f>0||n===0)&&(e[n].periodX=a+f/2)}}Rn.calcTicks=function(t,r){for(var n=t.type,a=t.calendar,i=t.ticklabelstep,o=t.ticklabelmode==="period",s=t.range[0]>t.range[1],l=!t.ticklabelindex||ga.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],u=ga.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]=(S?0:1);L--){var w=!L;L?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):S&&(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var T=L?t:ga.extendFlat({},t,S?t.minor:{minor:{}});if(w?Rn.prepMinorTicks(T,t,r):Rn.prepTicks(T,r),T.tickmode==="array"){L?(x=[],p=Pce(t,!w)):(y=[],_=Pce(t,!w));continue}if(T.tickmode==="sync"){x=[],p=b1t(t);continue}var A=cO(u),m=A[0],F=A[1],E=Du(T.dtick),I=n==="log"&&!(E||T.dtick.charAt(0)==="L"),R=Rn.tickFirst(T,r);if(L){if(t._tmin=R,R=F:O<=F;O=Rn.tickIncrement(O,q,c,a)){if(L&&U++,T.rangebreaks&&!c){if(O=v)break}if(x.length>g||O===B)break;B=O;var K={value:p1t(O,V,q)};L?(O===R&&(K.first=!0),I&&O!==(O|0)&&(K.simpleLabel=!0),i>1&&U%i&&(K.skipLabel=!0),x.push(K)):(K.minor=!0,y.push(K))}}if(!y||y.length<3)l=!1;else{var ee=(y[2].value-y[1].value)*(s?-1:1);W1t(ee,t.tickformat)||(l=!1,y=y.slice(1))}if(!l)C=x;else{var ce=x.concat(y);o&&x.length&&(ce=ce.slice(1)),ce=ce.sort(function(qe,we){return qe.value-we.value}).filter(function(qe,we,Le){return we===0||qe.value!==Le[we-1].value});var me=ce.map(function(qe,we){return qe.minor===void 0&&!qe.skipLabel?we:null}).filter(function(qe){return qe!==null});me.forEach(function(qe){l.map(function(we){var Le=qe+we;Le>=0&&Le-1;le--){if(x[le].drop){x.splice(le,1);continue}x[le].value=rO(x[le].value,t);var Ge=t.c2p(x[le].value);(xe?De>Ge-be:Dev||Kev&&(Le.periodX=v),Kea&&pa&&xFk)t/=Fk,n=a(10),e.dtick="M"+12*jp(t,n,Lk);else if(i>$b)t/=$b,e.dtick="M"+jp(t,1,Fce);else if(i>Qh){if(e.dtick=jp(t,Qh,e._hasDayOfWeekBreaks?[1,2,7,14]:w1t),!r){var o=Rn.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=ga.dateTick0(e.calendar,2):e.tick0=ga.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else i>Wp?e.dtick=jp(t,Wp,Fce):i>mT?e.dtick=jp(t,mT,Dce):i>zk?e.dtick=jp(t,zk,Dce):(n=a(10),e.dtick=jp(t,n,Lk))}else if(e.type==="log"){e.tick0=0;var l=ga.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(l[1]-l[0])<1){var u=1.5*Math.abs((l[1]-l[0])/t);t=Math.abs(Math.pow(10,l[1])-Math.pow(10,l[0]))/u,n=a(10),e.dtick="L"+jp(t,n,Lk)}else e.dtick=t>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):vO(e)?(e.tick0=0,n=1,e.dtick=jp(t,n,T1t)):(e.tick0=0,n=a(10),e.dtick=jp(t,n,Lk));if(e.dtick===0&&(e.dtick=1),!Du(e.dtick)&&typeof e.dtick!="string"){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}};function Uce(e){var t=e.dtick;if(e._tickexponent=0,!Du(t)&&typeof t!="string"&&(t=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var r=e.r2l(e.tick0),n=e.l2r(r).replace(/(^-|i)/g,""),a=n.length;if(String(t).charAt(0)==="M")a>10||n.slice(5)!=="01-01"?e._tickround="d":e._tickround=+t.slice(1)%12===0?"y":"m";else if(t>=Qh&&a<=10||t>=Qh*15)e._tickround="d";else if(t>=mT&&a<=16||t>=Wp)e._tickround="M";else if(t>=zk&&a<=19||t>=mT)e._tickround="S";else{var i=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(a,i)-20,e._tickround<0&&(e._tickround=4)}}else if(Du(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);Du(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(l)>u&&(Kb(e.exponentformat)&&e.exponentformat!=="SI extended"&&!fO(l)||Kb(e.exponentformat)&&e.exponentformat==="SI extended"&&!hO(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}Rn.tickIncrement=function(e,t,r,n){var a=r?-1:1;if(Du(t))return ga.increment(e,a*t);var i=t.charAt(0),o=a*Number(t.slice(1));if(i==="M")return ga.incrementMonth(e,o,n);if(i==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(i==="D"){var s=t==="D2"?Nce:Oce,l=e+a*.01,u=ga.roundUp(ga.mod(l,1),s,r);return Math.floor(l)+Math.log(rv.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(t)};Rn.tickFirst=function(e,t){var r=e.r2l||Number,n=ga.simpleMap(e.range,r,void 0,void 0,t),a=n[1]=0&&S<=e._length?k:null};if(l&&ga.isArrayOrTypedArray(e.ticktext)){var p=ga.simpleMap(e.range,e.r2l),_=(Math.abs(p[1]-p[0])-(e._lBreaks||0))/1e4;for(v=0;v"+s;else{var u=_T(e),c=e._trueSide||e.side;(!u&&c==="top"||u&&c==="bottom")&&(o+="
")}t.text=o}function M1t(e,t,r,n,a){var i=e.dtick,o=t.x,s=e.tickformat,l=typeof i=="string"&&i.charAt(0);if(a==="never"&&(a=""),n&&l!=="L"&&(i="L3",l="L"),s||l==="L")t.text=xT(Math.pow(10,o),e,a,n);else if(Du(i)||l==="D"&&(e.minorloglabels==="complete"||ga.mod(o+.01,1)<.1)){var u;e.minorloglabels==="complete"&&!(ga.mod(o+.01,1)<.1)&&(u=!0,t.fontSize*=.75);var c=Math.pow(10,o).toExponential(0),f=c.split("e"),v=+f[1],g=Math.abs(v),p=e.exponentformat;p==="power"||Kb(p)&&p!=="SI extended"&&fO(v)||Kb(p)&&p==="SI extended"&&hO(v)?(t.text=f[0],g>0&&(t.text+="x10"),t.text==="1x10"&&(t.text="10"),v!==0&&v!==1&&(t.text+=""+(v>0?"":O2)+g+""),t.fontSize*=1.25):(p==="e"||p==="E")&&g>2?t.text=f[0]+p+(v>0?"+":O2)+g:(t.text=xT(Math.pow(10,o),e,"","fakehover"),i==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(l==="D")t.text=e.minorloglabels==="none"?"":String(Math.round(Math.pow(10,ga.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(i);if(e.dtick==="D1"){var _=String(t.text).charAt(0);(_==="0"||_==="1")&&(e._id.charAt(0)==="y"?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(o<0?.5:.25)))}}function S1t(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function E1t(e,t,r){var n=Math.round(t.x),a=e._categories[n]||[],i=a[1]===void 0?"":String(a[1]),o=a[0]===void 0?"":String(a[0]);r?t.text=o+" - "+i:(t.text=i,t.text2=o)}function k1t(e,t,r,n,a){a==="never"?a="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide"),t.text=xT(t.x,e,a,n)}function C1t(e,t,r,n,a){if(e.thetaunit==="radians"&&!r){var i=t.x/180;if(i===0)t.text="0";else{var o=L1t(i);if(o[1]>=100)t.text=xT(ga.deg2rad(t.x),e,a,n);else{var s=t.x<0;o[1]===1?o[0]===1?t.text="\u03C0":t.text=o[0]+"\u03C0":t.text=["",o[0],"","\u2044","",o[1],"","\u03C0"].join(""),s&&(t.text=O2+t.text)}}}else t.text=xT(t.x,e,a,n)}function L1t(e){function t(s,l){return Math.abs(s-l)<=1e-6}function r(s,l){return t(l,0)?s:r(l,s%l)}function n(s){for(var l=1;!t(Math.round(s*l)/l,s);)l*=10;return l}var a=n(e),i=e*a,o=Math.abs(r(i,a));return[Math.round(i/o),Math.round(a/o)]}var Gce=["f","p","n","\u03BC","m","","k","M","G","T"],P1t=["q","r","y","z","a",...Gce,"P","E","Z","Y","R","Q"],Kb=e=>["SI","SI extended","B"].includes(e);function fO(e){return e>14||e<-15}function hO(e){return e>32||e<-30}function F1t(e,t){return Kb(t)?!!(t==="SI extended"&&hO(e)||t!=="SI extended"&&fO(e)):!1}function xT(e,t,r,n){var a=e<0,i=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,l=Rn.getTickFormat(t),u=t.separatethousands;if(n){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:Du(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};Uce(c),i=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,O2);o==="none"&&(s=0),e=Math.abs(e);let f=Math.pow(10,-i)/2;if(e"+v+"":o==="B"&&s===9?e+="B":Kb(o)&&(e+=o==="SI extended"?P1t[s/3+10]:Gce[s/3+5])}return a?O2+e:e}Rn.getTickFormat=function(e){var t;function r(l){return typeof l!="string"?l:Number(l.replace("M",""))*$b}function n(l,u){var c=["L","D"];if(typeof l==typeof u){if(typeof l=="number")return l-u;var f=c.indexOf(l.charAt(0)),v=c.indexOf(u.charAt(0));return f===v?Number(l.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):f-v}else return typeof l=="number"?1:-1}function a(l,u,c){var f=c||function(p){return p},v=u[0],g=u[1];return(!v&&typeof v!="number"||f(v)<=f(l))&&(!g&&typeof g!="number"||f(g)>=f(l))}function i(l,u){var c=u[0]===null,f=u[1]===null,v=n(l,u[0])>=0,g=n(l,u[1])<=0;return(c||v)&&(f||g)}var o,s;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(t=0;t=0&&a.unshift(a.splice(c,1).shift())}});var s={false:{left:0,right:0}};return ga.syncOrAsync(a.map(function(l){return function(){if(l){var u=Rn.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=Rn.drawOne(e,u,r);return u._shiftPusher&&uO(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=ga.simpleMap(u._r,u.r2l),c}}}))};Rn.drawOne=function(e,t,r){r=r||{};var n=r.axShifts||{},a=r.overlayingShiftedAx||[],i,o,s;t.setScale();var l=e._fullLayout,u=t._id,c=u.charAt(0),f=Rn.counterLetter(u),v=l._plots[t._mainSubplot],g=t.zerolinelayer==="above traces";if(!v)return;if(t._shiftPusher=t.autoshift||a.indexOf(t._id)!==-1||a.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var p=t.linewidth/2||0;t.ticks==="inside"&&(p+=t.ticklen),uO(t,p,n,!0),uO(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=j1t(t,n));var _=v[c+"axislayer"],x=t._mainLinePosition,y=x+=t._shift,C=t._mainMirrorPosition,k=t._vals=Rn.calcTicks(t),S=[t.mirror,y,C].join("_");for(i=0;i0?we.bottom-et:0,qe))));var Ve=0,$e=0;if(t._shiftPusher&&(Ve=Math.max(qe,we.height>0?ze==="l"?et-we.left:we.right-et:0),t.title.text!==l._dfltTitle[c]&&($e=(t._titleStandoff||0)+(t._titleScoot||0),ze==="l"&&($e+=Ice(t))),t._fullDepth=Math.max(Ve,$e)),t.automargin){Le={x:0,y:0,r:0,l:0,t:0,b:0};var ot=[0,1],rt=typeof t._shift=="number"?t._shift:0;if(c==="x"){if(ze==="b"?Le[ze]=t._depth:(Le[ze]=t._depth=Math.max(we.width>0?et-we.top:0,qe),ot.reverse()),we.width>0){var it=we.right-(t._offset+t._length);it>0&&(Le.xr=1,Le.r=it);var We=t._offset-we.left;We>0&&(Le.xl=0,Le.l=We)}}else if(ze==="l"?(t._depth=Math.max(we.height>0?et-we.left:0,qe),Le[ze]=t._depth-rt):(t._depth=Math.max(we.height>0?we.right-et:0,qe),Le[ze]=t._depth+rt,ot.reverse()),we.height>0){var mt=we.bottom-(t._offset+t._length);mt>0&&(Le.yb=0,Le.b=mt);var bt=t._offset-we.top;bt>0&&(Le.yt=1,Le.t=bt)}Le[f]=t.anchor==="free"?t.position:t._anchorAxis.domain[ot[0]],t.title.text!==l._dfltTitle[c]&&(Le[ze]+=Ice(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(Ke={x:0,y:0,r:0,l:0,t:0,b:0},Ke[ut]=t.linewidth,t.mirror&&t.mirror!==!0&&(Ke[ut]+=qe),t.mirror===!0||t.mirror==="ticks"?Ke[f]=t._anchorAxis.domain[ot[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(Ke[f]=[t._counterDomainMin,t._counterDomainMax][ot[1]]))}Oe&&(Te=pT.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(Rce(Le,t.automargin),Rce(Ke,t.automargin)),Xb.autoMargin(e,dO(t),Le),Xb.autoMargin(e,jce(t),Ke),Xb.autoMargin(e,Wce(t),Te)}),ga.syncOrAsync(pt)}};function Rce(e,t){if(e){var r=Object.keys(Ece).reduce(function(n,a){return t.indexOf(a)!==-1&&Ece[a].forEach(function(i){n[i]=1}),n},{});Object.keys(e).forEach(function(n){r[n]||(n.length===1?e[n]=0:delete e[n])})}}function D1t(e,t){var r=[],n,a=function(i,o){var s=i.xbnd[o];s!==null&&r.push(ga.extendFlat({},i,{x:s}))};if(t.length){for(n=0;ne.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,l=!s;if(r){var u=o?-1:1;r=r*u}if(n){var c=e.side,f=s&&(c==="top"||c==="left")||l&&(c==="bottom"||c==="right")?1:-1;n=n*f}return e._id.charAt(0)==="x"?function(v){return Zb(a+e._offset+e.l2p(sO(v))+r,i+n)}:function(v){return Zb(i+n,a+e._offset+e.l2p(sO(v))+r)}};function sO(e){return e.periodX!==void 0?e.periodX:e.x}function q1t(e){var t=e.ticklabelposition||"",r=e.tickson||"",n=function(p){return t.indexOf(p)!==-1},a=n("top"),i=n("left"),o=n("right"),s=n("bottom"),l=n("inside"),u=r!=="boundaries"&&(s||i||a||o);if(!u&&!l)return[0,0];var c=e.side,f=u?(e.tickwidth||0)/2:0,v=qk,g=e.tickfont?e.tickfont.size:12;return(s||a)&&(f+=g*N2,v+=(e.linewidth||0)/2),(i||o)&&(f+=(e.linewidth||0)/2,v+=qk),l&&c==="top"&&(v-=g*(1-N2)),(i||a)&&(f=-f),(c==="bottom"||c==="right")&&(v=-v),[u?f:0,l?v:0]}Rn.makeTickPath=function(e,t,r,n){n||(n={});var a=n.minor;if(a&&!e.minor)return"";var i=n.len!==void 0?n.len:a?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return o==="x"?"M0,"+(t+s*r)+"v"+i*r:"M"+(t+s*r)+",0h"+i*r};Rn.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",a=e.tickson||"",i=function(R){return n.indexOf(R)!==-1},o=i("top"),s=i("left"),l=i("right"),u=i("bottom"),c=a!=="boundaries"&&(u||s||o||l),f=i("inside"),v=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&a!=="boundaries",g=0,p=0,_=v?e.ticklen:0;if(f?_*=-1:c&&(_=0),v&&(g+=_,r)){var x=ga.deg2rad(r);g=_*Math.cos(x)+1,p=_*Math.sin(x)}e.showticklabels&&(v||e.showline)&&(g+=.2*e.tickfont.size),g+=(e.linewidth||1)/2*(f?-1:1);var y={labelStandoff:g,labelShift:p},C,k,S,L,w=0,T=e.side,A=e._id.charAt(0),m=e.tickangle,F;if(A==="x")F=!f&&T==="bottom"||f&&T==="top",L=F?1:-1,f&&(L*=-1),C=p*L,k=t+g*L,S=F?1:-.2,Math.abs(m)===90&&(f?S+=vT:m===-90&&T==="bottom"?S=N2:m===90&&T==="top"?S=vT:S=.5,w=vT/2*(m/90)),y.xFn=function(R){return R.dx+C+w*R.fontSize},y.yFn=function(R){return R.dy+k+R.fontSize*S},y.anchorFn=function(R,B){if(c){if(s)return"end";if(l)return"start"}return!Du(B)||B===0||B===180?"middle":B*L<0!==f?"end":"start"},y.heightFn=function(R,B,O){return B<-60||B>60?-.5*O:e.side==="top"!==f?-O:0};else if(A==="y"){if(F=!f&&T==="left"||f&&T==="right",L=F?1:-1,f&&(L*=-1),C=g,k=p*L,S=0,!f&&Math.abs(m)===90&&(m===-90&&T==="left"||m===90&&T==="right"?S=N2:S=.5),f){var E=Du(m)?+m:0;if(E!==0){var I=ga.deg2rad(E);w=Math.abs(Math.sin(I))*N2*L,S=0}}y.xFn=function(R){return R.dx+t-(C+R.fontSize*S)*L+w*R.fontSize},y.yFn=function(R){return R.dy+k+R.fontSize*vT},y.anchorFn=function(R,B){return Du(B)&&Math.abs(B)===90?"middle":F?"end":"start"},y.heightFn=function(R,B,O){return e.side==="right"&&(B*=-1),B<-30?-O:B<30?-.5*O:0}}return y};function Nk(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}Rn.drawTicks=function(e,t,r){r=r||{};var n=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(t.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),i=r.layer.selectAll("path."+n).data(a,Nk);i.exit().remove(),i.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return gT.stroke(rv.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return M0.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),Uk(t,[zce]),i.attr("transform",r.transFn)};Rn.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!=="sync"){var n=t._id+"grid",a=t.minor&&t.minor.showgrid,i=a?r.vals.filter(function(y){return y.minor}):[],o=t.showgrid?r.vals.filter(function(y){return!y.minor}):[],s=r.counterAxis;if(s&&Rn.shouldShowZeroLine(e,t,s))for(var l=t.tickmode==="array",u=0;u=0;p--){var _=p?v:g;if(_){var x=_.selectAll("path."+n).data(p?o:i,Nk);x.exit().remove(),x.enter().append("path").classed(n,1).classed("crisp",r.crisp!==!1),x.attr("transform",r.transFn).attr("d",r.path).each(function(y){return gT.stroke(rv.select(this),y.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(y){return M0.dashStyle(y.minor?t.minor.griddash:t.griddash,y.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(y){return(y.minor?f:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&x.attr("d",r.path)}}Uk(t,[aO,oO])}};Rn.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",a=Rn.shouldShowZeroLine(e,t,r.counterAxis),i=r.layer.selectAll("path."+n).data(a?[{x:0,id:t._id}]:[]);i.exit().remove(),i.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(o,s){return h1t(o.id,s.id)})}),i.attr("transform",r.transFn).attr("d",r.path).call(gT.stroke,t.zerolinecolor||gT.defaultLine).style("stroke-width",M0.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Uk(t,[iO])};Rn.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,a=t._id,i=t.zerolinelayer==="above traces",o=r.cls||a+"tick",s=r.vals.filter(function(V){return V.text}),l=r.labelFns,u=r.secondary?0:t.tickangle,c=(t._prevTickAngles||{})[o],f=r.layer.selectAll("g."+o).data(t.showticklabels?s:[],Nk),v=[];f.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(V){var K=rv.select(this),ee=e._promises.length;K.call(B2.positionText,l.xFn(V),l.yFn(V)).call(M0.font,{family:V.font,size:V.fontSize,color:V.fontColor,weight:V.fontWeight,style:V.fontStyle,variant:V.fontVariant,textcase:V.fontTextcase,lineposition:V.fontLineposition,shadow:V.fontShadow}).text(V.text).call(B2.convertToTspans,e),e._promises[ee]?v.push(e._promises.pop().then(function(){g(K,u)})):g(K,u)}),Uk(t,[Sce]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(V){rv.select(this).select("text").call(B2.positionText,l.xFn(V),l.yFn(V))});function g(V,K){V.each(function(ee){var ce=rv.select(this),me=ce.select(".text-math-group"),ye=l.anchorFn(ee,K),ue=r.transFn.call(ce.node(),ee)+(Du(K)&&+K!=0?" rotate("+K+","+l.xFn(ee)+","+(l.yFn(ee)-ee.fontSize/2)+")":""),J=B2.lineCount(ce),_e=yT*ee.fontSize,ne=l.heightFn(ee,Du(K)?+K:0,(J-1)*_e);if(ne&&(ue+=Zb(0,ne)),me.empty()){var ae=ce.select("text");ae.attr({transform:ue,"text-anchor":ye}),ae.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var pe=M0.bBox(me.node()).width,ie=pe*{end:-.5,start:.5}[ye];me.attr("transform",ue+Zb(ie,0))}})}t._adjustTickLabelsOverflow=function(){var V=t.ticklabeloverflow;if(!(!V||V==="allow")){var K=V.indexOf("hide")!==-1,ee=t._id.charAt(0)==="x",ce=0,me=ee?e._fullLayout.width:e._fullLayout.height;if(V.indexOf("domain")!==-1){var ye=ga.simpleMap(t.range,t.r2l);ce=t.l2p(ye[0])+t._offset,me=t.l2p(ye[1])+t._offset}var ue=Math.min(ce,me),J=Math.max(ce,me),_e=t.side,ne=1/0,ae=-1/0;f.each(function(xe){var be=rv.select(this),De=be.select(".text-math-group");if(De.empty()){var Ge=M0.bBox(be.node()),pt=0;ee?(Ge.right>J||Ge.leftJ||Ge.top+(t.tickangle?0:xe.fontSize/4)t["_visibleLabelMin_"+ye._id]?be.style("display","none"):J.K==="tick"&&!ue&&be.node().style.display!=="none"&&be.style("display",null)})})})})},g(f,c+1?c:u);function p(){return v.length&&Promise.all(v)}var _=null;function x(){if(g(f,u),s.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){_=t.autotickangles[0];var V=0,K=[],ee,ce=1;f.each(function(Le){V=Math.max(V,Le.fontSize);var Ke=t.l2p(Le.x),Te=lO(this),Ve=M0.bBox(Te.node());ce=Math.max(ce,B2.lineCount(Te)),K.push({top:0,bottom:10,height:10,left:Ke-Ve.width/2,right:Ke+Ve.width/2+2,width:Ve.width+2})});var me=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,ye=s.length,ue=Math.abs((s[ye-1].x-s[0].x)*t._m)/(ye-1),J=me?ue/2:ue,_e=me?t.ticklen:V*1.25*ce,ne=Math.sqrt(Math.pow(J,2)+Math.pow(_e,2)),ae=J/ne,pe=t.autotickangles.map(function(Le){return Le*Math.PI/180}),ie=pe.find(function(Le){return Math.abs(Math.cos(Le))<=ae});ie===void 0&&(ie=pe.reduce(function(Le,Ke){return Math.abs(Math.cos(Le))U*O&&(I=O,m[A]=F[A]=R[A])}var j=Math.abs(I-E);j-L>0?(j-=L,L*=1+L/j):L=0,t._id.charAt(0)!=="y"&&(L=-L),m[T]=k.p2r(k.r2p(F[T])+w*L),k.autorange==="min"||k.autorange==="max reversed"?(m[0]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0):(k.autorange==="max"||k.autorange==="min reversed")&&(m[1]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[k._name+".range"]=m}var q=ga.syncOrAsync(y);return q&&q.then&&e._promises.push(q),q};function B1t(e,t,r){var n=t._id+"divider",a=r.vals,i=r.layer.selectAll("path."+n).data(a,Nk);i.exit().remove(),i.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(gT.stroke,t.dividercolor).style("stroke-width",M0.crispRound(e,t.dividerwidth,1)+"px"),i.attr("transform",r.transFn).attr("d",r.path)}Rn.getPxPosition=function(e,t){var r=e._fullLayout._size,n=t._id.charAt(0),a=t.side,i;if(t.anchor!=="free"?i=t._anchorAxis:n==="x"?i={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:n==="y"&&(i={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),a==="top"||a==="left")return i._offset;if(a==="bottom"||a==="right")return i._offset+i._length};function Ice(e){var t=e.title.font.size,r=(e.title.text.match(B2.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(N2+r*yT):r?t*(r+1)*yT:t}function O1t(e,t){var r=e._fullLayout,n=t._id,a=n.charAt(0),i=t.title.font.size,o,s=(t.title.text.match(B2.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+i*N2:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+i*(vT+s*yT));else{var l=_T(t);if(t.type==="multicategory")o=t._depth;else{var u=1.5*i;l&&(u=.5*i,t.ticks==="outside"&&(u+=t.ticklen)),o=10+u+(t.linewidth?t.linewidth-1:0)}l||(a==="x"?o+=t.side==="top"?i*(t.showticklabels?1:0):i*(t.showticklabels?1.5:.5):o+=t.side==="right"?i*(t.showticklabels?1:.5):i*(t.showticklabels?.5:0))}var c=Rn.getPxPosition(e,t),f,v,g;a==="x"?(v=t._offset+t._length/2,g=t.side==="top"?c-o:c+o):(g=t._offset+t._length/2,v=t.side==="right"?c+o:c-o,f={rotate:"-90",offset:0});var p;if(t.type!=="multicategory"){var _=t._selections[t._id+"tick"];if(p={selection:_,side:t.side},_&&_.node()&&_.node().parentNode){var x=M0.getTranslate(_.node().parentNode);p.offsetLeft=x.x,p.offsetTop=x.y}t.title.hasOwnProperty("standoff")&&(p.pad=0)}return t._titleStandoff=o,n1t.draw(e,n+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[a],avoid:p,transform:f,attributes:{x:v,y:g,"text-anchor":"middle"}})}Rn.shouldShowZeroLine=function(e,t,r){var n=ga.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===Bk)&&(Hce(t,0)||!N1t(e,t,r,n)||U1t(e,t))};Rn.clipEnds=function(e,t){return t.filter(function(r){return Hce(e,r.x)})};function Hce(e,t){var r=e.l2p(t);return r>1&&r1)for(a=1;a=a.min&&e=u1t:/%L/.test(t)?e>=l1t:/%[SX]/.test(t)?e>=zk:/%M/.test(t)?e>=mT:/%[HI]/.test(t)?e>=Wp:/%p/.test(t)?e>=Am:/%[Aadejuwx]/.test(t)?e>=Qh:/%[UVW]/.test(t)?e>=S0:/%[Bbm]/.test(t)?e>=Ik:/%[q]/.test(t)?e>=Rk:/%[Yy]/.test(t)?e>=Dk:!0}});var pO=fe((Udr,Xce)=>{"use strict";Xce.exports=function(t,r,n){var a,i;if(n){var o=r==="reversed"||r==="min reversed"||r==="max reversed";a=n[o?1:0],i=n[o?0:1]}var s=t("autorangeoptions.minallowed",i===null?a:void 0),l=t("autorangeoptions.maxallowed",a===null?i:void 0);s===void 0&&t("autorangeoptions.clipmin"),l===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var gO=fe((Vdr,Zce)=>{"use strict";var Y1t=pO();Zce.exports=function(t,r,n,a){var i=r._template||{},o=r.type||i.type||"-";n("minallowed"),n("maxallowed");var s=n("range");if(!s){var l;!a.noInsiderange&&o!=="log"&&(l=n("insiderange"),l&&(l[0]===null||l[1]===null)&&(r.insiderange=!1,l=void 0),l&&(s=n("range",l)))}var u=r.getAutorangeDflt(s,a),c=n("autorange",u),f;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(c==="reversed"||c===!0)||s[0]!==null&&(c==="min"||c==="max reversed")||s[1]!==null&&(c==="max"||c==="min reversed"))&&(s=void 0,delete r.range,r.autorange=!0,f=!0),f||(u=r.getAutorangeDflt(s,a),c=n("autorange",u)),c&&(Y1t(n,c,s),(o==="linear"||o==="-")&&n("rangemode")),r.cleanRange()}});var Kce=fe((Gdr,$ce)=>{var X1t={left:0,top:0};$ce.exports=Z1t;function Z1t(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var n=e.clientX||0,a=e.clientY||0,i=$1t(t);return r[0]=n-i.left,r[1]=a-i.top,r}function $1t(e){return e===window||e===document||e===document.body?X1t:e.getBoundingClientRect()}});var Vk=fe((Hdr,Jce)=>{"use strict";var K1t=Kq();function J1t(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(r){e=!1}return e}Jce.exports=K1t&&J1t()});var efe=fe((jdr,Qce)=>{"use strict";Qce.exports=function(t,r,n,a,i){var o=(t-n)/(a-n),s=o+r/(a-n),l=(o+s)/2;return i==="left"||i==="bottom"?o:i==="center"||i==="middle"?l:i==="right"||i==="top"?s:o<2/3-l?o:s>4/3-l?s:l}});var nfe=fe((Wdr,rfe)=>{"use strict";var tfe=Xt(),Q1t=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];rfe.exports=function(t,r,n,a){return n==="left"?t=0:n==="center"?t=1:n==="right"?t=2:t=tfe.constrain(Math.floor(t*3),0,2),a==="bottom"?r=0:a==="middle"?r=1:a==="top"?r=2:r=tfe.constrain(Math.floor(r*3),0,2),Q1t[r][t]}});var afe=fe((Ydr,ife)=>{"use strict";var egt=Rb(),tgt=WE(),rgt=Z4().getGraphDiv,ngt=P4(),mO=ife.exports={};mO.wrapped=function(e,t,r){var i;e=rgt(e),e._fullLayout&&tgt.clear(e._fullLayout._uid+ngt.HOVERID);let n=e._hoverdata;mO.raw(e,t,r)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,(i=e._fullLayout)!=null&&i.hoveranywhere&&(t!=null&&t.target)&&!n&&e.emit("plotly_unhover",{event:t,points:[]}))};mO.raw=function(t,r){var n=t._fullLayout,a=t._hoverdata;return r||(r={}),r.target&&!t._dragged&&egt.triggerHandler(t,"plotly_beforehover",r)===!1?!1:(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,r.target&&a&&t.emit("plotly_unhover",{event:r,points:a}),!0)}});var ed=fe((Xdr,ufe)=>{"use strict";var igt=Kce(),yO=Qq(),agt=Vk(),ogt=Xt().removeElement,sgt=rc(),U2=ufe.exports={};U2.align=efe();U2.getCursor=nfe();var sfe=afe();U2.unhover=sfe.wrapped;U2.unhoverRaw=sfe.raw;U2.init=function(t){var r=t.gd,n=1,a=r._context.doubleClickDelay,i=t.element,o,s,l,u,c,f,v,g;r._mouseDownTime||(r._mouseDownTime=0),i.style.pointerEvents="all",i.onmousedown=x,agt?(i._ontouchstart&&i.removeEventListener("touchstart",i._ontouchstart),i._ontouchstart=x,i.addEventListener("touchstart",x,{passive:!1})):i.ontouchstart=x;function p(k,S,L){return Math.abs(k)a&&(n=Math.max(n-1,1)),r._dragged)t.doneFn&&t.doneFn();else{var S;f.target===v?S=f:(S={target:v,srcElement:v,toElement:v},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(L=>{var w=f[L];!S[L]&&typeof w!="function"&&(S[L]=w)})),t.clickFn&&t.clickFn(n,S),g||v.dispatchEvent(new MouseEvent("click",k))}r._dragging=!1,r._dragged=!1}};function lfe(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}U2.coverSlip=lfe;function ofe(e){return igt(e.changedTouches?e.changedTouches[0]:e,document.body)}});var np=fe((Zdr,cfe)=>{"use strict";cfe.exports=function(t,r){(t.attr("class")||"").split(" ").forEach(function(n){n.indexOf("cursor-")===0&&t.classed(n,!1)}),r&&t.classed("cursor-"+r,!0)}});var dfe=fe(($dr,hfe)=>{"use strict";var xO=np(),bT="data-savedcursor",ffe="!!";hfe.exports=function(t,r){var n=t.attr(bT);if(r){if(!n){for(var a=(t.attr("class")||"").split(" "),i=0;i{"use strict";var _O=Ds(),lgt=tc();vfe.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:lgt.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:_O({editType:"legend"}),grouptitlefont:_O({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},groupdoubleclick:{valType:"enumerated",values:["toggleitem","togglegroup"],editType:"legend"},titleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},titledoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:_O({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var TT=fe(wT=>{"use strict";wT.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};wT.isVertical=function(t){return t.orientation!=="h"};wT.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1};wT.getId=function(t){return t._id||"legend"}});var TO=fe((Qdr,pfe)=>{"use strict";var Gk=bi(),E0=Xt(),ugt=So(),cgt=Ho(),fgt=bO(),hgt=Sb(),wO=TT();function dgt(e,t,r,n,a){var i=t[e]||{},o=ugt.newContainer(r,e);function s(K,ee){return E0.coerce(i,o,fgt,K,ee)}var l=E0.coerceFont(s,"font",r.font);s("bgcolor",r.paper_bgcolor),s("bordercolor");var u=s("visible");if(!u)return;var c,f=function(K,ee){var ce=c._input,me=c;return E0.coerce(ce,me,cgt,K,ee)},v=r.font||{},g=E0.coerceFont(s,"grouptitlefont",v,{overrideDflt:{size:Math.round(v.size*1.1)}}),p=0,_=!1,x="normal",y=(r.shapes||[]).filter(function(K){return K.showlegend});function C(K){return Gk.traceIs(K,"pie-like")&&K._length!=null&&(Array.isArray(K.legend)||Array.isArray(K.showlegend))}n.filter(C).forEach(function(K){K.visible&&p++;for(var ee=0;eeK.legend.length)for(var me=K.legend.length;me(e==="legend"?1:0));if(w===!1&&(r[e]=void 0),w===!1&&!i.uirevision||(s("uirevision",r.uirevision),w===!1))return;s("borderwidth");var T=s("orientation"),A=s("yref"),m=s("xref"),F=T==="h",E=A==="paper",I=m==="paper",R,B,O,U="left";F?(R=0,Gk.getComponentMethod("rangeslider","isVisible")(t.xaxis)?E?(B=1.1,O="bottom"):(B=1,O="top"):E?(B=-.1,O="top"):(B=0,O="bottom")):(B=1,O="auto",I?R=1.02:(R=1,U="right")),E0.coerce(i,o,{x:{valType:"number",editType:"legend",min:I?-2:0,max:I?3:1,dflt:R}},"x"),E0.coerce(i,o,{y:{valType:"number",editType:"legend",min:E?-2:0,max:E?3:1,dflt:B}},"y"),s("traceorder",x),wO.isGrouped(r[e])&&s("tracegroupgap"),s("entrywidth"),s("entrywidthmode"),s("indentation"),s("itemsizing"),s("itemwidth"),s("itemclick"),s("itemdoubleclick");let j=s("groupclick");s("groupdoubleclick",j),s("xanchor",U),s("yanchor",O),s("maxheight"),s("valign"),E0.noneOrAll(i,o,["x","y"]);var q=s("title.text");if(q){s("title.side",F?"left":"top");var V=E0.extendFlat({},l,{size:E0.bigFont(l.size)});E0.coerceFont(s,"title.font",V);let K=a>1;s("titleclick",K?"toggle":!1),s("titledoubleclick",K?"toggleothers":!1)}}pfe.exports=function(t,r,n){var a,i=n.slice(),o=r.shapes;if(o)for(a=0;a{"use strict";var Mm=bi(),AO=Xt(),vgt=AO.pushUnique,pgt=TT(),gfe=!0;MO.handleItemClick=function(t,r,n,a,i){var o=r._fullLayout;if(r._dragged||r._editing)return;var s=t.data()[0][0];if(s.groupTitle&&s.noClick)return;let l=i===2?n.groupdoubleclick:n.groupclick;a==="toggle"&&n.itemdoubleclick==="toggleothers"&&gfe&&r.data&&r._context.showTips&&(AO.notifier(AO._(r,"Double-click on legend to isolate one trace"),"long",r),gfe=!1);var u=l==="togglegroup",c=o.hiddenlabels?o.hiddenlabels.slice():[],f=r._fullData;let v=(o.shapes||[]).filter(tt=>tt.showlegend||tt.legendgroup);var g=f.concat(v),p=s.trace;p._isShape&&(p=o.shapes[p.index]);var _=p.legendgroup,x,y,C,k,S,L,w={},T=[],A=[],m=[];function F(tt,Oe){var ze=T.indexOf(tt),ut=w.visible;return ut||(ut=w.visible=[]),T.indexOf(tt)===-1&&(T.push(tt),ze=T.length-1),ut[ze]=Oe,ze}var E=(o.shapes||[]).map(function(tt){return tt._input}),I=!1;function R(tt,Oe){E[tt].visible=Oe,I=!0}function B(tt,Oe){if(!(s.groupTitle&&!u)){var ze=tt._isShape,ut=tt.index;ut===void 0&&(ut=tt._index);var et=tt.visible===!1?!1:Oe;ze?R(ut,et):F(ut,et)}}var O=p.legend;if(!p._isShape&&Mm.traceIs(p,"pie-like")){var U=s.label,j=c.indexOf(U);if(a==="toggle")j===-1?c.push(U):c.splice(j,1);else if(a==="toggleothers"){var q=j!==-1,V=[];for(x=0;xy.showlegend||y.legendgroup),l=i.concat(s);function u(y){return(y.legend||"legend")===o}var c,f;if(n==="toggle")c=!l.some(function(C){return u(C)&&C.visible===!0}),f=!1;else{let y=l.some(function(C){return!u(C)&&C.visible===!0&&C.showlegend!==!1});c=!0,f=!y}let v={visible:[]},g=[],p=(a.shapes||[]).map(function(y){return y._input});for(var _=!1,x=0;x{"use strict";mfe.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var _fe=fe((r0r,xfe)=>{"use strict";var{isArrayOrTypedArray:kO}=Gf(),yfe=bi(),CO=TT();xfe.exports=function(t,r,n){var a=r._inHover,i=CO.isGrouped(r),o=CO.isReversed(r),s={},l=[],u=!1,c={},f=0,v=0,g,p;function _(K,ee,ce){if(r.visible!==!1&&!(n&&K!==r._id))if(ee===""||!CO.isGrouped(r)){var me="~~i"+f;l.push(me),s[me]=[ce],f++}else l.indexOf(ee)===-1?(l.push(ee),u=!0,s[ee]=[ce]):s[ee].push(ce)}for(g=0;gR&&(E=R)}m[g][0]._groupMinRank=E,m[g][0]._preGroupSort=g}var B=function(K,ee){return K[0]._groupMinRank-ee[0]._groupMinRank||K[0]._preGroupSort-ee[0]._preGroupSort},O=function(K,ee){var ce=kO(K.trace.legendrank)?K.trace.legendrank[K.i]:K.trace.legendrank,me=kO(ee.trace.legendrank)?ee.trace.legendrank[ee.i]:ee.trace.legendrank;return ce-me||K._preSort-ee._preSort};for(m.forEach(function(K,ee){K[0]._preGroupSort=ee}),m.sort(B),g=0;g{"use strict";var Hk=Xt();function bfe(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}V2.formatPiePercent=function(t,r){var n=bfe((t*100).toPrecision(3));return Hk.numSeparate(n,r)+"%"};V2.formatPieValue=function(t,r){var n=bfe(t.toPrecision(10));return Hk.numSeparate(n,r)};V2.getFirstFilled=function(t,r){if(Hk.isArrayOrTypedArray(t))for(var n=0;n{"use strict";var ggt=Ji(),mgt=ni();wfe.exports=function(t,r,n,a){var i=n.marker.pattern;i&&i.shape?ggt.pointStyle(t,n,a,r):mgt.fill(t,r.color)}});var Jb=fe((a0r,Sfe)=>{"use strict";var Afe=ni(),Mfe=Sm().castOption,ygt=Tfe();Sfe.exports=function(t,r,n,a){var i=n.marker.line,o=Mfe(i.color,r.pts)||Afe.defaultLine,s=Mfe(i.width,r.pts)||0;t.call(ygt,r,n,a).style("stroke-width",s).call(Afe.stroke,o)}});var DO=fe((o0r,Ffe)=>{"use strict";var td=xi(),LO=bi(),Sh=Xt(),Efe=Sh.strTranslate,k0=Ji(),nv=ni(),PO=Wf().extractOpts,jk=Is(),xgt=Jb(),_gt=Sm().castOption,bgt=EO(),kfe=12,Cfe=5,G2=2,wgt=10,Qb=5;Ffe.exports=function(t,r,n){var a=r._fullLayout;n||(n=a.legend);var i=n.itemsizing==="constant",o=n.itemwidth,s=(o+bgt.itemGap*2)/2,l=Efe(s,0),u=function(T,A,m,F){var E;if(T+1)E=T;else if(A&&A.width>0)E=A.width;else return 0;return i?F:Math.min(E,m)};t.each(function(T){var A=td.select(this),m=Sh.ensureSingle(A,"g","layers");m.style("opacity",T[0].trace.opacity);var F=n.indentation,E=n.valign,I=T[0].lineHeight,R=T[0].height;if(E==="middle"&&F===0||!I||!R)m.attr("transform",null);else{var B={top:1,bottom:-1}[E],O=B*(.5*(I-R+3))||0,U=n.indentation;m.attr("transform",Efe(U,O))}var j=m.selectAll("g.legendfill").data([T]);j.enter().append("g").classed("legendfill",!0);var q=m.selectAll("g.legendlines").data([T]);q.enter().append("g").classed("legendlines",!0);var V=m.selectAll("g.legendsymbols").data([T]);V.enter().append("g").classed("legendsymbols",!0),V.selectAll("g.legendpoints").data([T]).enter().append("g").classed("legendpoints",!0)}).each(w).each(v).each(p).each(g).each(x).each(S).each(k).each(c).each(f).each(y).each(C);function c(T){var A=Lfe(T),m=A.showFill,F=A.showLine,E=A.showGradientLine,I=A.showGradientFill,R=A.anyFill,B=A.anyLine,O=T[0],U=O.trace,j,q,V=PO(U),K=V.colorscale,ee=V.reversescale,ce=function(ae){if(ae.size())if(m)k0.fillGroupStyle(ae,r,!0);else{var pe="legendfill-"+U.uid;k0.gradient(ae,r,pe,FO(ee),K,"fill")}},me=function(ae){if(ae.size()){var pe="legendline-"+U.uid;k0.lineGroupStyle(ae),k0.gradient(ae,r,pe,FO(ee),K,"stroke")}},ye=jk.hasMarkers(U)||!R?"M5,0":B?"M5,-2":"M5,-3",ue=td.select(this),J=ue.select(".legendfill").selectAll("path").data(m||I?[T]:[]);if(J.enter().append("path").classed("js-fill",!0),J.exit().remove(),J.attr("d",ye+"h"+o+"v6h-"+o+"z").call(ce),F||E){var _e=u(void 0,U.line,wgt,Cfe);q=Sh.minExtend(U,{line:{width:_e}}),j=[Sh.minExtend(O,{trace:q})]}var ne=ue.select(".legendlines").selectAll("path").data(F||E?[j]:[]);ne.enter().append("path").classed("js-line",!0),ne.exit().remove(),ne.attr("d",ye+(E?"l"+o+",0.0001":"h"+o)).call(F?k0.lineGroupStyle:me)}function f(T){var A=Lfe(T),m=A.anyFill,F=A.anyLine,E=A.showLine,I=A.showMarker,R=T[0],B=R.trace,O=!I&&!F&&!m&&jk.hasText(B),U,j;function q(_e,ne,ae,pe){var ie=Sh.nestedProperty(B,_e).get(),le=Sh.isArrayOrTypedArray(ie)&&ne?ne(ie):ie;if(i&&le&&pe!==void 0&&(le=pe),ae){if(leae[1])return ae[1]}return le}function V(_e){return R._distinct&&R.index&&_e[R.index]?_e[R.index]:_e[0]}if(I||O||E){var K={},ee={};if(I){K.mc=q("marker.color",V);var ce=B.type==="scattermap";K.mx=ce?"circle":q("marker.symbol",V),K.mo=q("marker.opacity",Sh.mean,[.2,1]),K.mlc=q("marker.line.color",V),K.mlw=q("marker.line.width",Sh.mean,[0,5],G2),K.mld=q("marker.line.dash",V),ee.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var me=q("marker.size",Sh.mean,[2,16],kfe);K.ms=me,ee.marker.size=me}E&&(ee.line={width:q("line.width",V,[0,10],Cfe)}),O&&(K.tx="Aa",K.tp=q("textposition",V),K.ts=10,K.tc=q("textfont.color",V),K.tf=q("textfont.family",V),K.tw=q("textfont.weight",V),K.ty=q("textfont.style",V),K.tv=q("textfont.variant",V),K.tC=q("textfont.textcase",V),K.tE=q("textfont.lineposition",V),K.tS=q("textfont.shadow",V)),U=[Sh.minExtend(R,K)],j=Sh.minExtend(B,ee),j.selectedpoints=null,j.texttemplate=null}var ye=td.select(this).select("g.legendpoints"),ue=ye.selectAll("path.scatterpts").data(I?U:[]);ue.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",l),ue.exit().remove(),ue.call(k0.pointStyle,j,r),I&&(U[0].mrc=3);var J=ye.selectAll("g.pointtext").data(O?U:[]);J.enter().append("g").classed("pointtext",!0).append("text").attr("transform",l),J.exit().remove(),J.selectAll("text").call(k0.textPointStyle,j,r)}function v(T){var A=T[0].trace,m=A.type==="waterfall";if(T[0]._distinct&&m){var F=T[0].trace[T[0].dir].marker;return T[0].mc=F.color,T[0].mlw=F.line.width,T[0].mlc=F.line.color,_(T,this,"waterfall")}var E=[];A.visible&&m&&(E=T[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 I=td.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(E);I.enter().append("path").classed("legendwaterfall",!0).attr("transform",l).style("stroke-miterlimit",1),I.exit().remove(),I.each(function(R){var B=td.select(this),O=A[R[0]].marker,U=u(void 0,O.line,Qb,G2);B.attr("d",R[1]).style("stroke-width",U+"px").call(nv.fill,O.color),U&&B.call(nv.stroke,O.line.color)})}function g(T){_(T,this)}function p(T){_(T,this,"funnel")}function _(T,A,m){var F=T[0].trace,E=F.marker||{},I=E.line||{},R=E.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",B=m?F.visible&&F.type===m:LO.traceIs(F,"bar"),O=td.select(A).select("g.legendpoints").selectAll("path.legend"+m).data(B?[T]:[]);O.enter().append("path").classed("legend"+m,!0).attr("d",R).attr("transform",l),O.exit().remove(),O.each(function(U){var j=td.select(this),q=U[0],V=u(q.mlw,E.line,Qb,G2);j.style("stroke-width",V+"px");var K=q.mcc;if(!n._inHover&&"mc"in q){var ee=PO(E),ce=ee.mid;ce===void 0&&(ce=(ee.max+ee.min)/2),K=k0.tryColorscale(E,"")(ce)}var me=K||q.mc||E.color,ye=E.pattern,ue=k0.getPatternAttr,J=ye&&(ue(ye.shape,0,"")||ue(ye.path,0,""));if(J){var _e=ue(ye.bgcolor,0,null),ne=ue(ye.fgcolor,0,null),ae=ye.fgopacity,pe=Pfe(ye.size,8,10),ie=Pfe(ye.solidity,.5,1),le="legend-"+F.uid;j.call(k0.pattern,"legend",r,le,J,pe,ie,K,ye.fillmode,_e,ne,ae)}else j.call(nv.fill,me);V&&nv.stroke(j,q.mlc||I.color)})}function x(T){var A=T[0].trace,m=td.select(this).select("g.legendpoints").selectAll("path.legendbox").data(A.visible&&LO.traceIs(A,"box-violin")?[T]:[]);m.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),m.exit().remove(),m.each(function(){var F=td.select(this);if((A.boxpoints==="all"||A.points==="all")&&nv.opacity(A.fillcolor)===0&&nv.opacity((A.line||{}).color)===0){var E=Sh.minExtend(A,{marker:{size:i?kfe:Sh.constrain(A.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});m.call(k0.pointStyle,E,r)}else{var I=u(void 0,A.line,Qb,G2);F.style("stroke-width",I+"px").call(nv.fill,A.fillcolor),I&&nv.stroke(F,A.line.color)}})}function y(T){var A=T[0].trace,m=td.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(A.visible&&A.type==="candlestick"?[T,T]:[]);m.enter().append("path").classed("legendcandle",!0).attr("d",function(F,E){return E?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",l).style("stroke-miterlimit",1),m.exit().remove(),m.each(function(F,E){var I=td.select(this),R=A[E?"increasing":"decreasing"],B=u(void 0,R.line,Qb,G2);I.style("stroke-width",B+"px").call(nv.fill,R.fillcolor),B&&nv.stroke(I,R.line.color)})}function C(T){var A=T[0].trace,m=td.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(A.visible&&A.type==="ohlc"?[T,T]:[]);m.enter().append("path").classed("legendohlc",!0).attr("d",function(F,E){return E?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",l).style("stroke-miterlimit",1),m.exit().remove(),m.each(function(F,E){var I=td.select(this),R=A[E?"increasing":"decreasing"],B=u(void 0,R.line,Qb,G2);I.style("fill","none").call(k0.dashLine,R.line.dash,B),B&&nv.stroke(I,R.line.color)})}function k(T){L(T,this,"pie")}function S(T){L(T,this,"funnelarea")}function L(T,A,m){var F=T[0],E=F.trace,I=m?E.visible&&E.type===m:LO.traceIs(E,m),R=td.select(A).select("g.legendpoints").selectAll("path.legend"+m).data(I?[T]:[]);if(R.enter().append("path").classed("legend"+m,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),R.exit().remove(),R.size()){var B=E.marker||{},O=u(_gt(B.line.width,F.pts),B.line,Qb,G2),U="pieLike",j=Sh.minExtend(E,{marker:{line:{width:O}}},U),q=Sh.minExtend(F,{trace:j},U);xgt(R,q,j,r)}}function w(T){var A=T[0].trace,m,F=[];if(A.visible)switch(A.type){case"histogram2d":case"heatmap":F=[["M-15,-2V4H15V-2Z"]],m=!0;break;case"choropleth":case"choroplethmap":F=[["M-6,-6V6H6V-6Z"]],m=!0;break;case"densitymap":F=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],m="radial";break;case"cone":F=[["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"]],m=!1;break;case"streamtube":F=[["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"]],m=!1;break;case"surface":F=[["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"]],m=!0;break;case"mesh3d":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],m=!1;break;case"volume":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],m=!0;break;case"isosurface":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],m=!1;break}var E=td.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(F);E.enter().append("path").classed("legend3dandfriends",!0).attr("transform",l).style("stroke-miterlimit",1),E.exit().remove(),E.each(function(I,R){var B=td.select(this),O=PO(A),U=O.colorscale,j=O.reversescale,q=function(ce){if(ce.size()){var me="legendfill-"+A.uid;k0.gradient(ce,r,me,FO(j,m==="radial"),U,"fill")}},V;if(U){if(!m){var ee=U.length;V=R===0?U[j?ee-1:0][1]:R===1?U[j?0:ee-1][1]:U[Math.floor((ee-1)/2)][1]}}else{var K=A.vertexcolor||A.facecolor||A.color;V=Sh.isArrayOrTypedArray(K)?K[R]||K[0]:K}B.attr("d",I[0]),V?B.call(nv.fill,V):B.call(q)})}};function FO(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function Lfe(e){var t=e[0].trace,r=t.contours,n=jk.hasLines(t)||t.visible&&t.type==="quiver",a=jk.hasMarkers(t),i=t.visible&&t.fill&&t.fill!=="none",o=!1,s=!1;if(r){var l=r.coloring;l==="lines"?o=!0:n=l==="none"||l==="heatmap"||r.showlines,r.type==="constraint"?i=r._operation!=="=":(l==="fill"||l==="heatmap")&&(s=!0)}return{showMarker:a,showLine:n,showFill:i,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:i||s}}function Pfe(e,t,r){return e&&Sh.isArrayOrTypedArray(e)?t:e>r?r:e}});var qO=fe((s0r,Ufe)=>{"use strict";var Ed=xi(),Ru=Xt(),IO=Hs(),H2=bi(),Xk=Rb(),RO=ed(),Iu=Ji(),AT=ni(),j2=as(),Dfe=SO().handleItemClick,Rfe=SO().handleTitleClick,ic=EO(),zO=nc(),Ofe=zO.LINE_SPACING,t3=zO.FROM_TL,Ife=zO.FROM_BR,zfe=_fe(),Tgt=DO(),r3=TT(),e3=1,Agt=/^legend[0-9]*$/;Ufe.exports=function(t,r){if(r)qfe(t,r);else{var n=t._fullLayout,a=n._legends,i=n._infolayer.selectAll('[class^="legend"]');i.each(function(){var u=Ed.select(this),c=u.attr("class"),f=c.split(" ")[0];f.match(Agt)&&a.indexOf(f)===-1&&u.remove()});for(var o=0;o1)}var p=n.hiddenlabels||[];if(!s&&(!n.showlegend||!l.length))return o.selectAll("."+a).remove(),n._topdefs.select("#"+i).remove(),IO.autoMargin(e,a);var _=Ru.ensureSingle(o,"g",a,function(A){s||A.attr("pointer-events","all")}),x=Ru.ensureSingleById(n._topdefs,"clipPath",i,function(A){A.append("rect")}),y=Ru.ensureSingle(_,"rect","bg",function(A){A.attr("shape-rendering","crispEdges")});y.call(AT.stroke,r.bordercolor).call(AT.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var C=Ru.ensureSingle(_,"g","scrollbox"),k=r.title;r._titleWidth=0,r._titleHeight=0;var S;k.text?(S=Ru.ensureSingle(C,"text",a+"titletext"),S.attr("text-anchor","start").call(Iu.font,k.font).text(k.text),Yk(S,C,e,r,e3),!s&&(r.titleclick||r.titledoubleclick)&&kgt(C,e,r,a)):(C.selectAll("."+a+"titletext").remove(),C.selectAll("."+a+"titletoggle").remove());var L=Ru.ensureSingle(_,"rect","scrollbar",function(A){A.attr(ic.scrollBarEnterAttrs).call(AT.fill,ic.scrollBarColor)}),w=C.selectAll("g.groups").data(l);w.enter().append("g").attr("class","groups"),w.exit().remove();var T=w.selectAll("g.traces").data(Ru.identity);T.enter().append("g").attr("class","traces"),T.exit().remove(),T.style("opacity",function(A){let m=A[0],F=m.trace;if(m.groupTitle){let E=F.legendgroup,I=(n.shapes||[]).filter(function(B){return B.showlegend});return e._fullData.concat(I).some(function(B){return B.legendgroup===E&&(B.legend||"legend")===a&&B.visible===!0})?1:.5}return H2.traceIs(F,"pie-like")?p.indexOf(A[0].label)!==-1?.5:1:F.visible==="legendonly"?.5:1}).each(function(){Ed.select(this).call(Sgt,e,r)}).call(Tgt,e,r).each(function(A){s||A[0].groupTitle&&r.groupclick==="toggleitem"||Ed.select(this).call(Egt,e,a)}),Ru.syncOrAsync([IO.previousPromises,function(){return Pgt(e,w,T,r,C)},function(){var A=n._size,m=r.borderwidth,F=r.xref==="paper",E=r.yref==="paper";if(k.text){let De=(n.shapes||[]).filter(function(pt){return pt.showlegend}),Ge=e._fullData.concat(De).some(function(pt){let tt=pt.legend||"legend";var Oe=Array.isArray(tt)?tt.includes(a):tt===a;return Oe&&pt.visible===!0});S.style("opacity",Ge?1:.5)}if(!s){var I,R;F?I=A.l+A.w*r.x-t3[Zk(r)]*r._width:I=n.width*r.x-t3[Zk(r)]*r._width,E?R=A.t+A.h*(1-r.y)-t3[$k(r)]*r._effHeight:R=n.height*(1-r.y)-t3[$k(r)]*r._effHeight;var B=Fgt(e,a,I,R);if(B)return;if(n.margin.autoexpand){var O=I,U=R;I=F?Ru.constrain(I,0,n.width-r._width):O,R=E?Ru.constrain(R,0,n.height-r._effHeight):U,I!==O&&Ru.log("Constrain "+a+".x to make legend fit inside graph"),R!==U&&Ru.log("Constrain "+a+".y to make legend fit inside graph")}Iu.setTranslate(_,I,R)}if(L.on(".drag",null),_.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var j=r._effHeight;s&&(j=r._height),y.attr({width:r._width-m,height:j-m,x:m/2,y:m/2}),Iu.setTranslate(C,0,0),x.select("rect").attr({width:r._width-2*m,height:j-2*m,x:m,y:m}),Iu.setClipUrl(C,i,e),Iu.setRect(L,0,0,0,0),delete r._scrollY}else{var q=Math.max(ic.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),V=r._effHeight-q-2*ic.scrollBarMargin,K=r._height-r._effHeight,ee=V/K,ce=Math.min(r._scrollY||0,K);y.attr({width:r._width-2*m+ic.scrollBarWidth+ic.scrollBarMargin,height:r._effHeight-m,x:m/2,y:m/2}),x.select("rect").attr({width:r._width-2*m+ic.scrollBarWidth+ic.scrollBarMargin,height:r._effHeight-2*m,x:m,y:m+ce}),Iu.setClipUrl(C,i,e),pe(ce,q,ee),_.on("wheel",function(){ce=Ru.constrain(r._scrollY+Ed.event.deltaY/K*V,0,K),pe(ce,q,ee),ce!==0&&ce!==K&&Ed.event.preventDefault()});var me,ye,ue,J=function(De,Ge,pt){var tt=(pt-Ge)/ee+De;return Ru.constrain(tt,0,K)},_e=function(De,Ge,pt){var tt=(Ge-pt)/ee+De;return Ru.constrain(tt,0,K)},ne=Ed.behavior.drag().on("dragstart",function(){var De=Ed.event.sourceEvent;De.type==="touchstart"?me=De.changedTouches[0].clientY:me=De.clientY,ue=ce}).on("drag",function(){var De=Ed.event.sourceEvent;De.buttons===2||De.ctrlKey||(De.type==="touchmove"?ye=De.changedTouches[0].clientY:ye=De.clientY,ce=J(ue,me,ye),pe(ce,q,ee))});L.call(ne);var ae=Ed.behavior.drag().on("dragstart",function(){var De=Ed.event.sourceEvent;De.type==="touchstart"&&(me=De.changedTouches[0].clientY,ue=ce)}).on("drag",function(){var De=Ed.event.sourceEvent;De.type==="touchmove"&&(ye=De.changedTouches[0].clientY,ce=_e(ue,me,ye),pe(ce,q,ee))});C.call(ae)}function pe(De,Ge,pt){r._scrollY=e._fullLayout[a]._scrollY=De,Iu.setTranslate(C,0,-De),Iu.setRect(L,r._width,ic.scrollBarMargin+De*pt,ic.scrollBarWidth,Ge),x.select("rect").attr("y",m+De)}if(e._context.edits.legendPosition){var ie,le,xe,be;_.classed("cursor-move",!0),RO.init({element:_.node(),gd:e,prepFn:function(De){if(De.target!==L.node()){var Ge=Iu.getTranslate(_);xe=Ge.x,be=Ge.y}},moveFn:function(De,Ge){if(xe!==void 0&&be!==void 0){var pt=xe+De,tt=be+Ge;Iu.setTranslate(_,pt,tt),ie=RO.align(pt,r._width,A.l,A.l+A.w,r.xanchor),le=RO.align(tt+r._height,-r._height,A.t+A.h,A.t,r.yanchor)}},doneFn:function(){if(ie!==void 0&&le!==void 0){var De={};De[a+".x"]=ie,De[a+".y"]=le,H2.call("_guiRelayout",e,De)}},clickFn:function(De,Ge){var pt=o.selectAll("g.traces").filter(function(){var tt=this.getBoundingClientRect();return Ge.clientX>=tt.left&&Ge.clientX<=tt.right&&Ge.clientY>=tt.top&&Ge.clientY<=tt.bottom});pt.size()>0&&Nfe(e,r,pt,De,Ge)}})}}],e)}}function Wk(e,t,r){var n=e[0],a=n.width,i=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return i==="fraction"?t._maxWidth*o:r+(o||a)}function Nfe(e,t,r,n,a){var i=e._fullLayout,o=r.data()[0][0].trace,s=t.itemclick,l=t.itemdoubleclick,u={event:a,node:r.node(),curveNumber:o.index,expandedIndex:o.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:i};o._group&&(u.group=o._group),H2.traceIs(o,"pie-like")&&(u.label=r.datum()[0].label);var c=Xk.triggerHandler(e,"plotly_legendclick",u);if(n===1){if(c===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&s&&Dfe(r,e,t,s,n)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var f=Xk.triggerHandler(e,"plotly_legenddoubleclick",u);f!==!1&&c!==!1&&l&&Dfe(r,e,t,l,n)}}function Sgt(e,t,r){var n=r3.getId(r),a=e.data()[0][0],i=a.trace,o=H2.traceIs(i,"pie-like"),s=!r._inHover&&t._context.edits.legendText&&!o,l=r._maxNameLength,u,c;a.groupTitle?(u=a.groupTitle.text,c=a.groupTitle.font):(c=r.font,r.entries?u=a.text:(u=o?a.label:i.name,i._meta&&(u=Ru.templateString(u,i._meta))));var f=Ru.ensureSingle(e,"text",n+"text");f.attr("text-anchor","start").call(Iu.font,c).text(s?Bfe(u,l):u);var v=r.indentation+r.itemwidth+ic.itemGap*2;j2.positionText(f,v,0),s?f.call(j2.makeEditable,{gd:t,text:u}).call(Yk,e,t,r).on("edit",function(g){this.text(Bfe(g,l)).call(Yk,e,t,r);var p={};return p.name=g,a.trace._isShape?H2.call("_guiRelayout",t,"shapes["+i.index+"].name",p.name):H2.call("_guiRestyle",t,p,i.index)}):Yk(f,e,t,r)}function Bfe(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var n=r-e.length;n>0;n--)e+=" ";return e}function Egt(e,t,r){var n=t._context.doubleClickDelay,a,i=1,o=Ru.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(AT.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(o.on("mousedown",function(){a=new Date().getTime(),a-t._legendMouseDownTimen&&(i=Math.max(i-1,1)),Nfe(t,s,e,i,Ed.event)}}))}function kgt(e,t,r,n){if(t._fullData.some(function(u){let c=u.legend||"legend";return(Array.isArray(c)?c.includes(n):c===n)&&H2.traceIs(u,"pie-like")}))return;let i=t._context.doubleClickDelay;var o,s=1;let l=Ru.ensureSingle(e,"rect",n+"titletoggle",function(u){t._context.staticPlot||u.style("cursor","pointer").attr("pointer-events","all"),u.call(AT.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){o=new Date().getTime(),o-t._legendMouseDownTimei&&(s=Math.max(s-1,1));let u={event:Ed.event,legendId:n,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(s===1&&r.titleclick){if(Xk.triggerHandler(t,"plotly_legendtitleclick",u)===!1)return;r._titleClickTimeout=setTimeout(function(){t._fullLayout&&Rfe(t,r,r.titleclick)},i)}else s===2&&(r._titleClickTimeout&&clearTimeout(r._titleClickTimeout),t._legendMouseDownTime=0,Xk.triggerHandler(t,"plotly_legendtitledoubleclick",u)!==!1&&r.titledoubleclick&&Rfe(t,r,r.titledoubleclick))}))}function Yk(e,t,r,n,a){n._inHover&&e.attr("data-notex",!0),j2.convertToTspans(e,r,function(){Cgt(t,r,n,a)})}function Cgt(e,t,r,n){var a=e.data()[0][0],i=a&&a.trace.showlegend;if(Array.isArray(i)&&(i=i[a.i]!==!1),!r._inHover&&a&&!i){e.remove();return}var o=e.select("g[class*=math-group]"),s=o.node(),l=r3.getId(r);r||(r=t._fullLayout[l]);var u=r.borderwidth,c;n===e3?c=r.title.font:a.groupTitle?c=a.groupTitle.font:c=r.font;var f=c.size*Ofe,v,g;if(s){var p=Iu.bBox(s);v=p.height,g=p.width,n===e3?Iu.setTranslate(o,u,u+v*.75):Iu.setTranslate(o,0,v*.25)}else{var _="."+l+(n===e3?"title":"")+"text",x=e.select(_),y=j2.lineCount(x),C=x.node();if(v=f*y,g=C?Iu.bBox(C).width:0,n===e3)r.title.side==="left"&&(g+=ic.itemGap*2),j2.positionText(x,u+ic.titlePad,u+f);else{var k=ic.itemGap*2+r.indentation+r.itemwidth;a.groupTitle&&(k=ic.itemGap,g-=r.indentation+r.itemwidth),j2.positionText(x,k,-f*((y-1)/2-.3))}}n===e3?(r._titleWidth=g,r._titleHeight=v):(a.lineHeight=f,a.height=Math.max(v,16)+3,a.width=g)}function Lgt(e){var t=0,r=0,n=e.title.side;return n&&(n.indexOf("left")!==-1&&(t=e._titleWidth),n.indexOf("top")!==-1&&(r=e._titleHeight)),[t,r]}function Pgt(e,t,r,n,a){var i=e._fullLayout,o=r3.getId(n);n||(n=i[o]);var s=i._size,l=r3.isVertical(n),u=r3.isGrouped(n),c=n.entrywidthmode==="fraction",f=n.borderwidth,v=2*f,g=ic.itemGap,p=n.indentation+n.itemwidth+g*2,_=2*(f+g),x=$k(n),y=n.y<0||n.y===0&&x==="top",C=n.y>1||n.y===1&&x==="bottom",k=n.tracegroupgap,S={};let{orientation:L,yref:w}=n,{maxheight:T}=n,A=y||C||L!=="v"||w!=="paper";T||(T=A?.5:1);let m=A?i.height:s.h;n._maxHeight=Math.max(T>1?T:T*m,30);var F=0;n._width=0,n._height=0;var E=Lgt(n);if(l)r.each(function(De){var Ge=De[0].height;Iu.setTranslate(this,f+E[0],f+E[1]+n._height+Ge/2+g),n._height+=Ge,n._width=Math.max(n._width,De[0].width)}),F=p+n._width,n._width+=g+p+v,n._height+=_,u&&(t.each(function(De,Ge){Iu.setTranslate(this,0,Ge*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var I=Zk(n),R=n.x<0||n.x===0&&I==="right",B=n.x>1||n.x===1&&I==="left",O=C||y,U=i.width/2;n._maxWidth=Math.max(R?O&&I==="left"?s.l+s.w:U:B?O&&I==="right"?s.r+s.w:U:s.w,2*p);var j=0,q=0;r.each(function(De){var Ge=Wk(De,n,p);j=Math.max(j,Ge),q+=Ge}),F=null;var V=0;if(u){var K=0,ee=0,ce=0;t.each(function(){var De=0,Ge=0;Ed.select(this).selectAll("g.traces").each(function(tt){var Oe=Wk(tt,n,p),ze=tt[0].height;Iu.setTranslate(this,E[0],E[1]+f+g+ze/2+Ge),Ge+=ze,De=Math.max(De,Oe),S[tt[0].trace.legendgroup]=De});var pt=De+g;ee>0&&pt+f+ee>n._maxWidth?(V=Math.max(V,ee),ee=0,ce+=K+k,K=Ge):K=Math.max(K,Ge),Iu.setTranslate(this,ee,ce),ee+=pt}),n._width=Math.max(V,ee)+f,n._height=ce+K+_}else{var me=r.size(),ye=q+v+(me-1)*g=n._maxWidth&&(V=Math.max(V,ne),J=0,_e+=ue,n._height+=ue,ue=0),Iu.setTranslate(this,E[0]+f+J,E[1]+f+_e+Ge/2+g),ne=J+pt+g,J+=tt,ue=Math.max(ue,Ge)}),ye?(n._width=J+v,n._height=ue+_):(n._width=Math.max(V,ne)+v,n._height+=ue+_)}}n._width=Math.ceil(Math.max(n._width+E[0],n._titleWidth+2*(f+ic.titlePad))),n._height=Math.ceil(Math.max(n._height+E[1],n._titleHeight+2*(f+ic.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var ae=e._context.edits,pe=ae.legendText||ae.legendPosition;r.each(function(De){var Ge=Ed.select(this).select("."+o+"toggle"),pt=De[0].height,tt=De[0].trace.legendgroup,Oe=Wk(De,n,p);u&&tt!==""&&(Oe=S[tt]);var ze=pe?p:F||Oe;!l&&!c&&(ze+=g/2),Iu.setRect(Ge,0,-pt/2,ze,pt)});var ie=a.select("."+o+"titletext");ie.node()&&Mgt(ie,n,f);var le=a.select("."+o+"titletoggle");if(le.size()&&ie.node()){var xe=ie.attr("x")||0,be=ic.titlePad;Iu.setRect(le,xe-be,f,n._titleWidth+2*be,n._titleHeight+2*be)}}function Fgt(e,t,r,n){var a=e._fullLayout,i=a[t],o=Zk(i),s=$k(i),l=i.xref==="paper",u=i.yref==="paper";e._fullLayout._reservedMargin[t]={};var c=i.y<.5?"b":"t",f=i.x<.5?"l":"r",v={r:a.width-r,l:r+i._width,b:a.height-n,t:n+i._effHeight};if(l&&u)return IO.autoMargin(e,t,{x:i.x,y:i.y,l:i._width*t3[o],r:i._width*Ife[o],b:i._effHeight*Ife[s],t:i._effHeight*t3[s]});l?e._fullLayout._reservedMargin[t][c]=v[c]:u||i.orientation==="v"?e._fullLayout._reservedMargin[t][f]=v[f]:e._fullLayout._reservedMargin[t][c]=v[c]}function Zk(e){return Ru.isRightAnchor(e)?"right":Ru.isCenterAnchor(e)?"center":"left"}function $k(e){return Ru.isBottomAnchor(e)?"bottom":Ru.isMiddleAnchor(e)?"middle":"top"}});var UO=fe(NO=>{"use strict";var W2=xi(),eg=aa(),tu=Xt(),Dgt=tu.pushUnique,BO=tu.strTranslate,Rgt=tu.strRotate,Igt=Rb(),iv=as(),zgt=dfe(),Xp=Ji(),ac=ni(),Kk=ed(),Zp=Yi(),qgt=rc().zindexSeparator,i3=bi(),C0=Sd(),Y2=P4(),Bgt=TO(),Ogt=qO(),Zfe=Y2.YANGLE,OO=Math.PI*Zfe/180,Ngt=1/Math.sin(OO),Ugt=Math.cos(OO),Vgt=Math.sin(OO),yl=Y2.HOVERARROWSIZE,go=Y2.HOVERTEXTPAD,Vfe={box:!0,ohlc:!0,violin:!0,candlestick:!0},Ggt={scatter:!0,scattergl:!0,splom:!0};function Gfe(e,t){return e.distance-t.distance}NO.hover=function(t,r,n,a){t=tu.getGraphDiv(t);var i=r.target;tu.throttle(t._fullLayout._uid+Y2.HOVERID,Y2.HOVERMINTIME,function(){Hgt(t,r,n,a,i)})};NO.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var a=r.gd,i=ehe(a),o=the(a),s=t.map(function(x){var y=x._x0||x.x0||x.x||0,C=x._x1||x.x1||x.x||0,k=x._y0||x.y0||x.y||0,S=x._y1||x.y1||x.y||0,L=x.eventData;if(L){var w=Math.min(y,C),T=Math.max(y,C),A=Math.min(k,S),m=Math.max(k,S),F=x.trace;if(i3.traceIs(F,"gl3d")){var E=a._fullLayout[F.scene]._scene.container,I=E.offsetLeft,R=E.offsetTop;w+=I,T+=I,A+=R,m+=R}L.bbox={x0:w+o,x1:T+o,y0:A+i,y1:m+i},L.xPixel=(y+C)/2,L.yPixel=(k+S)/2,r.inOut_bbox&&r.inOut_bbox.push(L.bbox)}else L=!1;return{color:x.color||ac.defaultLine,x0:x.x0||x.x||0,x1:x.x1||x.x||0,y0:x.y0||x.y||0,y1:x.y1||x.y||0,xLabel:x.xLabel,yLabel:x.yLabel,zLabel:x.zLabel,text:x.text,name:x.name,idealAlign:x.idealAlign,borderColor:x.borderColor,fontFamily:x.fontFamily,fontSize:x.fontSize,fontColor:x.fontColor,fontWeight:x.fontWeight,fontStyle:x.fontStyle,fontVariant:x.fontVariant,nameLength:x.nameLength,textAlign:x.textAlign,trace:x.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:x.hovertemplate||!1,hovertemplateLabels:x.hovertemplateLabels||!1,eventData:L}}),l=!1,u=Kfe(s,{gd:a,hovermode:"closest",rotateLabels:l,bgColor:r.bgColor||ac.background,container:W2.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels,f=5,v=0,g=0;c.sort(function(x,y){return x.y0-y.y0}).each(function(x,y){var C=x.y0-x.by/2;C-fT[0]._length||be<0||be>A[0]._length)return Kk.unhoverRaw(e,t)}if(t.pointerX=xe+T[0]._offset,t.pointerY=be+A[0]._offset,"xval"in t?U=C0.flat(i,t.xval):U=C0.p2c(T,xe),"yval"in t?j=C0.flat(i,t.yval):j=C0.p2c(A,be),e._hoverPointerX=t.pointerX,e._hoverPointerY=t.pointerY,!eg(U[0])||!eg(j[0]))return tu.warn("Fx.hover failed",t,e),Kk.unhoverRaw(e,t)}s.clickanywhere&&(e._hoverXVals=U,e._hoverYVals=j,e._hoverXAxes=T,e._hoverYAxes=A);var pt=1/0;function tt(Ut,_r){for(V=0;Vne&&(B.splice(0,ne),pt=B[0].distance),f&&R!==0&&B.length===0){_e.distance=R,_e.index=!1;var Jn=ee._module.hoverPoints(_e,ue,J,"closest",{hoverLayer:s._hoverlayer});if(Jn&&(Jn=Jn.filter(function(Xi){return Xi.spikeDistance<=R})),Jn&&Jn.length){var Ii,Vi=Jn.filter(function(Xi){return Xi.xa.showspikes&&Xi.xa.spikesnap!=="hovered data"});if(Vi.length){var ra=Vi[0];eg(ra.x0)&&eg(ra.y0)&&(Ii=ze(ra),(!ae.vLinePoint||ae.vLinePoint.spikeDistance>Ii.spikeDistance)&&(ae.vLinePoint=Ii))}var ha=Jn.filter(function(Xi){return Xi.ya.showspikes&&Xi.ya.spikesnap!=="hovered data"});if(ha.length){var va=ha[0];eg(va.x0)&&eg(va.y0)&&(Ii=ze(va),(!ae.hLinePoint||ae.hLinePoint.spikeDistance>Ii.spikeDistance)&&(ae.hLinePoint=Ii))}}}}}tt();function Oe(Ut,_r,rn){for(var Jr=null,qn=1/0,ri,Jn=0;JnUt.trace.index===We.trace.index):B=[We];var mt=B.length,bt=Xfe("x",We,s),Yt=Xfe("y",We,s);tt(bt,Yt);var jt=[],mr={},or=0,fr=function(Ut){var _r=Vfe[Ut.trace.type]?$fe(Ut):Ut.trace.index;if(!mr[_r])or++,mr[_r]=or,jt.push(Ut);else{var rn=mr[_r]-1,Jr=jt[rn];rn>0&&Math.abs(Ut.distance)mt-1;Ot--)fr(B[Ot]);B=jt,we()}var cr=e._hoverdata,Ct=[],wt=ehe(e),Tt=the(e);for(let Ut of B){var Mt=C0.makeEventData(Ut,Ut.trace,Ut.cd);if(Ut.hovertemplate!==!1){var Lt=!1;Ut.cd[Ut.index]&&Ut.cd[Ut.index].ht&&(Lt=Ut.cd[Ut.index].ht),Ut.hovertemplate=Lt||Ut.trace.hovertemplate||!1}if(Ut.xa&&Ut.ya){var ft=Ut.x0+Ut.xa._offset,kt=Ut.x1+Ut.xa._offset,rr=Ut.y0+Ut.ya._offset,pr=Ut.y1+Ut.ya._offset,Kr=Math.min(ft,kt),Nr=Math.max(ft,kt),dn=Math.min(rr,pr),xr=Math.max(rr,pr);Mt.bbox={x0:Kr+Tt,x1:Nr+Tt,y0:dn+wt,y1:xr+wt},Mt.xPixel=(ft+kt)/2,Mt.yPixel=(rr+pr)/2}Ut.eventData=[Mt],Ct.push(Mt)}e._hoverdata=Ct;var Fr=v==="y"&&(O.length>1||B.length>1)||v==="closest"&&pe&&B.length>1,Zr=ac.combine(s.plot_bgcolor||ac.background,s.paper_bgcolor),Cn=Kfe(B,{gd:e,hovermode:v,rotateLabels:Fr,bgColor:Zr,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),Dt=Cn.hoverLabels;if(C0.isUnifiedHover(v)||(Wgt(Dt,Fr,s,Cn.commonLabelBoundingBox),Qfe(Dt,Fr,s._invScaleX,s._invScaleY)),a&&a.tagName){var At=i3.getComponentMethod("annotations","hasClickToShow")(e,Ct);zgt(W2.select(a),At?"pointer":"")}var Vt=Zgt(e,t,cr);if(!a||n||!Vt&&!s.hoveranywhere)return;cr&&Vt&&e.emit("plotly_unhover",{event:t,points:cr}),Qt(e._hoverdata);function Qt(Ut){e.emit("plotly_hover",{event:t,points:Ut,xaxes:T,yaxes:A,xvals:C0.c2dApply(T,U),yvals:C0.c2dApply(A,j),xPixel:t.pointerX,yPixel:t.pointerY})}}function $fe(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}var jgt=/([\s\S]*)<\/extra>/;function Kfe(e,t){var r=t.gd,n=r._fullLayout,a=t.hovermode,i=t.rotateLabels,o=t.bgColor,s=t.container,l=t.outerContainer,u=t.commonLabelOpts||{};if(e.length===0)return[[]];var c=t.fontFamily||Y2.HOVERFONT,f=t.fontSize||Y2.HOVERFONTSIZE,v=t.fontWeight||n.font.weight,g=t.fontStyle||n.font.style,p=t.fontVariant||n.font.variant,_=t.fontTextcase||n.font.textcase,x=t.fontLineposition||n.font.lineposition,y=t.fontShadow||n.font.shadow,C=e[0],k=C.xa,S=C.ya,L=a.charAt(0),w=L+"Label",T=C[w];if(T===void 0&&k.type==="multicategory")for(var A=0;An.width-Ct&&(wt=n.width-Ct),it.attr("d","M"+(fr-wt)+",0L"+(fr-wt+yl)+","+cr+yl+"H"+Ct+"v"+cr+(go*2+or.height)+"H"+-Ct+"V"+cr+yl+"H"+(fr-wt-yl)+"Z"),fr=wt,V.minX=fr-Ct,V.maxX=fr+Ct,k.side==="top"?(V.minY=Ot-(go*2+or.height),V.maxY=Ot-go):(V.minY=Ot+go,V.maxY=Ot+(go*2+or.height))}else{var Tt,Mt,Lt;S.side==="right"?(Tt="start",Mt=1,Lt="",fr=k._offset+k._length):(Tt="end",Mt=-1,Lt="-",fr=k._offset),Ot=S._offset+(C.y0+C.y1)/2,We.attr("text-anchor",Tt),it.attr("d","M0,0L"+Lt+yl+","+yl+"V"+(go+or.height/2)+"h"+Lt+(go*2+or.width)+"V-"+(go+or.height/2)+"H"+Lt+yl+"V-"+yl+"Z"),V.minY=Ot-(go+or.height/2),V.maxY=Ot+(go+or.height/2),S.side==="right"?(V.minX=fr+yl,V.maxX=fr+yl+(go*2+or.width)):(V.minX=fr-yl-(go*2+or.width),V.maxX=fr-yl);var ft=or.height/2,kt=F-or.top-ft,rr="clip"+n._uid+"commonlabel"+S._id,pr;if(frit.hoverinfo!=="none");if(rt.length===0)return[];var K=n.hoverlabel,ee=K.font,ce=rt[0],me=((a==="x unified"?ce.xa:ce.ya).unifiedhovertitle||{}).text,ye=me?tu.hovertemplateString({data:a==="x unified"?[{xa:ce.xa,x:ce.xVal}]:[{ya:ce.ya,y:ce.yVal}],fallback:ce.trace.hovertemplatefallback,locale:n._d3locale,template:me}):T,ue={showlegend:!0,legend:{title:{text:ye,font:ee},font:ee,bgcolor:K.bgcolor,bordercolor:K.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:n.legend?n.legend.traceorder:void 0,orientation:"v"}},J={font:ee};Bgt(ue,J,r._fullData);var _e=J.legend;_e.entries=[];for(var ne=0;ne=0?Ve=we:Le+Ge=0?Ve=Le:Ke+Ge=0?$e=et:qe+pt=0?$e=qe:Te+pt=0,(rt.idealAlign==="top"||!dn)&&xr?(Lt-=kt/2,rt.anchor="end"):dn?(Lt+=kt/2,rt.anchor="start"):rt.anchor="middle",rt.crossPos=Lt;else{if(rt.pos=Lt,dn=Mt+ft/2+Nr<=E,xr=Mt-ft/2-Nr>=0,(rt.idealAlign==="left"||!dn)&&xr)Mt-=ft/2,rt.anchor="end";else if(dn)Mt+=ft/2,rt.anchor="start";else{rt.anchor="middle";var Fr=Nr/2,Zr=Mt+Fr-E,Cn=Mt-Fr;Zr>0&&(Mt-=Zr),Cn<0&&(Mt+=-Cn)}rt.crossPos=Mt}Ot.attr("text-anchor",rt.anchor),Ct&&cr.attr("text-anchor",rt.anchor),it.attr("transform",BO(Mt,Lt)+(i?Rgt(Zfe):""))}),{hoverLabels:ot,commonLabelBoundingBox:V}}function Hfe(e,t,r,n,a,i){var f,v;var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=tu.templateString(e.name,e.trace._meta)),o=Yfe(e.name,e.nameLength));var l=r.charAt(0),u=l==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(s+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(s+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmap"&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[l+"Label"]===a?s=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(s=e.yLabel):e.yLabel===void 0?s=e.xLabel:s="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(s+=(s?"
":"")+e.text),e.extraText!==void 0&&(s+=(s?"
":"")+e.extraText),i&&s===""&&!e.hovertemplate&&(o===""&&i.remove(),s=o),(v=(f=e.trace)==null?void 0:f.hoverlabel)!=null&&v.split&&(e.hovertemplate="");let{hovertemplate:c=!1}=e;if(c){let g=e.hovertemplateLabels||e;e[l+"Label"]!==a&&(g[l+"other"]=g[l+"Val"],g[l+"otherLabel"]=g[l+"Label"]),s=tu.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:g,locale:n._d3locale,template:c}),s=s.replace(jgt,(p,_)=>(o=Yfe(_,e.nameLength),""))}return[s,o]}function Wgt(e,t,r,n){var a=t?"xa":"ya",i=t?"ya":"xa",o=0,s=1,l=e.size(),u=new Array(l),c=0,f=n.minX,v=n.maxX,g=n.minY,p=n.maxY,_=function(U){return U*r._invScaleX},x=function(U){return U*r._invScaleY};e.each(function(U){var j=U[a],q=U[i],V=j._id.charAt(0)==="x",K=j.range;c===0&&K&&K[0]>K[1]!==V&&(s=-1);var ee=0,ce=V?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var me=Jfe(U,t),ye=U.anchor,ue=ye==="end"?-1:1,J,_e;if(ye==="middle")J=U.crossPos+(V?x(me.y-U.by/2):_(U.bx/2+U.tx2width/2)),_e=J+(V?x(U.by):_(U.bx));else if(V)J=U.crossPos+x(yl+me.y)-x(U.by/2-yl),_e=J+x(U.by);else{var ne=_(ue*yl+me.x),ae=ne+_(ue*U.bx);J=U.crossPos+Math.min(ne,ae),_e=U.crossPos+Math.max(ne,ae)}V?g!==void 0&&p!==void 0&&Math.min(_e,p)-Math.max(J,g)>1&&(q.side==="left"?(ee=q._mainLinePosition,ce=r.width):ce=q._mainLinePosition):f!==void 0&&v!==void 0&&Math.min(_e,v)-Math.max(J,f)>1&&(q.side==="top"?(ee=q._mainLinePosition,ce=r.height):ce=q._mainLinePosition)}u[c++]=[{datum:U,traceIndex:U.trace.index,dp:0,pos:U.pos,posref:U.posref,size:U.by*(V?Ngt:1)/2,pmin:ee,pmax:ce}]}),u.sort(function(U,j){return U[0].posref-j[0].posref||s*(j[0].traceIndex-U[0].traceIndex)});var y,C,k,S,L,w,T;function A(U){var j=U[0],q=U[U.length-1];if(C=j.pmin-j.pos-j.dp+j.size,k=q.pos+q.dp+q.size-j.pmax,C>.01){for(L=U.length-1;L>=0;L--)U[L].dp+=C;y=!1}if(!(k<.01)){if(C<-.01){for(L=U.length-1;L>=0;L--)U[L].dp-=k;y=!1}if(y){var V=0;for(S=0;Sj.pmax&&V++;for(S=U.length-1;S>=0&&!(V<=0);S--)w=U[S],w.pos>j.pmax-1&&(w.del=!0,V--);for(S=0;S=0;L--)U[L].dp-=k;for(S=U.length-1;S>=0&&!(V<=0);S--)w=U[S],w.pos+w.dp+w.size>j.pmax&&(w.del=!0,V--)}}}for(;!y&&o<=l;){for(o++,y=!0,S=0;S.01){for(L=F.length-1;L>=0;L--)F[L].dp+=C;for(m.push.apply(m,F),u.splice(S+1,1),T=0,L=m.length-1;L>=0;L--)T+=m[L].dp;for(k=T/m.length,L=m.length-1;L>=0;L--)m[L].dp-=k;y=!1}else S++}u.forEach(A)}for(S=u.length-1;S>=0;S--){var R=u[S];for(L=R.length-1;L>=0;L--){var B=R[L],O=B.datum;O.offset=B.dp,O.del=B.del}}}function Jfe(e,t){var r=0,n=e.offset;return t&&(n*=-Vgt,r=e.offset*Ugt),{x:r,y:n}}function Ygt(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(yl+go),n=r+t*(e.txwidth+go),a=e.anchor==="middle";return a&&(r-=e.tx2width/2,n+=e.txwidth/2+go),{alignShift:t,textShiftX:r,text2ShiftX:n}}function Qfe(e,t,r,n){var a=function(o){return o*r},i=function(o){return o*n};e.each(function(o){var s=W2.select(this);if(o.del)return s.remove();var l=s.select("text.nums"),u=o.anchor,c=u==="end"?-1:1,f=Ygt(o),v=Jfe(o,t),g=v.x,p=v.y,_=u==="middle",x="hoverlabel"in o.trace?o.trace.hoverlabel.showarrow:!0,y;_?y="M-"+a(o.bx/2+o.tx2width/2)+","+i(p-o.by/2)+"h"+a(o.bx)+"v"+i(o.by)+"h-"+a(o.bx)+"Z":x?y="M0,0L"+a(c*yl+g)+","+i(yl+p)+"v"+i(o.by/2-yl)+"h"+a(c*o.bx)+"v-"+i(o.by)+"H"+a(c*yl+g)+"V"+i(p-yl)+"Z":y="M"+a(c*yl+g)+","+i(p-o.by/2)+"h"+a(c*o.bx)+"v"+i(o.by)+"h"+a(-c*o.bx)+"Z",s.select("path").attr("d",y);var C=g+f.textShiftX,k=p+o.ty0-o.by/2+go,S=o.textAlign||"auto";S!=="auto"&&(S==="left"&&u!=="start"?(l.attr("text-anchor","start"),C=_?-o.bx/2-o.tx2width/2+go:-o.bx-go):S==="right"&&u!=="end"&&(l.attr("text-anchor","end"),C=_?o.bx/2-o.tx2width/2-go:o.bx+go)),l.call(iv.positionText,a(C),i(k)),o.tx2width&&(s.select("text.name").call(iv.positionText,a(f.text2ShiftX+f.alignShift*go+g),i(p+o.ty0-o.by/2+go)),s.select("rect").call(Xp.setRect,a(f.text2ShiftX+(f.alignShift-1)*o.tx2width/2+g),i(p-o.by/2-1),a(o.tx2width),i(o.by+2)))})}function Xgt(e,t){var r=e.index,n=e.trace||{},a=e.cd[0],i=e.cd[r]||{};function o(v){return v||eg(v)&&v===0}var s=Array.isArray(r)?function(v,g){var p=tu.castOption(a,r,v);return o(p)?p:tu.extractOption({},n,"",g)}:function(v,g){return tu.extractOption(i,n,v,g)};function l(v,g,p){var _=s(g,p);o(_)&&(e[v]=_)}if(l("hoverinfo","hi","hoverinfo"),l("bgcolor","hbg","hoverlabel.bgcolor"),l("borderColor","hbc","hoverlabel.bordercolor"),l("fontFamily","htf","hoverlabel.font.family"),l("fontSize","hts","hoverlabel.font.size"),l("fontColor","htc","hoverlabel.font.color"),l("fontWeight","htw","hoverlabel.font.weight"),l("fontStyle","hty","hoverlabel.font.style"),l("fontVariant","htv","hoverlabel.font.variant"),l("nameLength","hnl","hoverlabel.namelength"),l("textAlign","hta","hoverlabel.align"),e.posref=t==="y"||t==="closest"&&n.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=tu.constrain(e.x0,0,e.xa._length),e.x1=tu.constrain(e.x1,0,e.xa._length),e.y0=tu.constrain(e.y0,0,e.ya._length),e.y1=tu.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Zp.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:Zp.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type==="log"&&e.xerr<=0)){var u=Zp.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+Zp.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,t==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var c=Zp.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+c+" / -"+Zp.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+c,t==="y"&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&f!=="all"&&(f=Array.isArray(f)?f:f.split("+"),f.indexOf("x")===-1&&(e.xLabel=void 0),f.indexOf("y")===-1&&(e.yLabel=void 0),f.indexOf("z")===-1&&(e.zLabel=void 0),f.indexOf("text")===-1&&(e.text=void 0),f.indexOf("name")===-1&&(e.name=void 0)),e}function jfe(e,t,r){var n=r.container,a=r.fullLayout,i=a._size,o=r.event,s=!!t.hLinePoint,l=!!t.vLinePoint,u,c;if(n.selectAll(".spikeline").remove(),!!(l||s)){var f=ac.combine(a.plot_bgcolor,a.paper_bgcolor);if(s){var v=t.hLinePoint,g,p;u=v&&v.xa,c=v&&v.ya;var _=c.spikesnap;_==="cursor"?(g=o.pointerX,p=o.pointerY):(g=u._offset+v.x,p=c._offset+v.y);var x=ac.wcagContrast(v.color,f)<1.5?ac.contrast(f):v.color,y=c.spikemode,C=c.spikethickness,k=c.spikecolor||x,S=Zp.getPxPosition(e,c),L,w;if(y.indexOf("toaxis")!==-1||y.indexOf("across")!==-1){if(y.indexOf("toaxis")!==-1&&(L=S,w=g),y.indexOf("across")!==-1){var T=c._counterDomainMin,A=c._counterDomainMax;c.anchor==="free"&&(T=Math.min(T,c.position),A=Math.max(A,c.position)),L=i.l+T*i.w,w=i.l+A*i.w}n.insert("line",":first-child").attr({x1:L,x2:w,y1:p,y2:p,"stroke-width":C,stroke:k,"stroke-dasharray":Xp.dashStyle(c.spikedash,C)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:L,x2:w,y1:p,y2:p,"stroke-width":C+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}y.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:S+(c.side!=="right"?C:-C),cy:p,r:C,fill:k}).classed("spikeline",!0)}if(l){var m=t.vLinePoint,F,E;u=m&&m.xa,c=m&&m.ya;var I=u.spikesnap;I==="cursor"?(F=o.pointerX,E=o.pointerY):(F=u._offset+m.x,E=c._offset+m.y);var R=ac.wcagContrast(m.color,f)<1.5?ac.contrast(f):m.color,B=u.spikemode,O=u.spikethickness,U=u.spikecolor||R,j=Zp.getPxPosition(e,u),q,V;if(B.indexOf("toaxis")!==-1||B.indexOf("across")!==-1){if(B.indexOf("toaxis")!==-1&&(q=j,V=E),B.indexOf("across")!==-1){var K=u._counterDomainMin,ee=u._counterDomainMax;u.anchor==="free"&&(K=Math.min(K,u.position),ee=Math.max(ee,u.position)),q=i.t+(1-ee)*i.h,V=i.t+(1-K)*i.h}n.insert("line",":first-child").attr({x1:F,x2:F,y1:q,y2:V,"stroke-width":O,stroke:U,"stroke-dasharray":Xp.dashStyle(u.spikedash,O)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:F,x2:F,y1:q,y2:V,"stroke-width":O+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}B.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:F,cy:j-(u.side!=="top"?O:-O),r:O,fill:U}).classed("spikeline",!0)}}}function Zgt(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=e._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers)||a.binNumber!==i.binNumber)return!0}return!1}function Wfe(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function Yfe(e,t){return iv.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function $gt(e,t){for(var r=t.charAt(0),n=[],a=[],i=[],o=0;oe.offsetTop+e.clientTop,the=e=>e.offsetLeft+e.clientLeft;function n3(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),a=n.left,i=n.top,o=a+n.width,s=i+n.height,l=tu.apply3DTransform(r._invTransform)(a,i),u=tu.apply3DTransform(r._invTransform)(o,s),c=l[0],f=l[1],v=u[0],g=u[1];return{x:c,y:f,width:v-c,height:g-f,top:Math.min(f,g),left:Math.min(c,v),right:Math.max(c,v),bottom:Math.max(f,g)}}});var MT=fe((u0r,rhe)=>{"use strict";var Kgt=Xt(),Jgt=ni(),Qgt=Sd().isUnifiedHover;rhe.exports=function(t,r,n,a){a=a||{};var i=r.legend;function o(s){a.font[s]||(a.font[s]=i?r.legend.font[s]:r.font[s])}r&&Qgt(r.hovermode)&&(a.font||(a.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),i?(a.bgcolor||(a.bgcolor=Jgt.combine(r.legend.bgcolor,r.paper_bgcolor)),a.bordercolor||(a.bordercolor=r.legend.bordercolor)):a.bgcolor||(a.bgcolor=r.paper_bgcolor)),n("hoverlabel.bgcolor",a.bgcolor),n("hoverlabel.bordercolor",a.bordercolor),n("hoverlabel.namelength",a.namelength),n("hoverlabel.showarrow",a.showarrow),Kgt.coerceFont(n,"hoverlabel.font",a.font),n("hoverlabel.align",a.align)}});var ihe=fe((c0r,nhe)=>{"use strict";var emt=Xt(),tmt=MT(),rmt=tm();nhe.exports=function(t,r){function n(a,i){return emt.coerce(t,r,rmt,a,i)}tmt(t,r,n)}});var she=fe((f0r,ohe)=>{"use strict";var ahe=Xt(),nmt=hb(),imt=MT();ohe.exports=function(t,r,n,a){function i(s,l){return ahe.coerce(t,r,nmt,s,l)}var o=ahe.extendFlat({},a.hoverlabel);r.hovertemplate&&(o.namelength=-1),imt(t,r,i,o)}});var VO=fe((h0r,lhe)=>{"use strict";var amt=Xt(),omt=tm();lhe.exports=function(t,r){function n(a,i){return r[a]!==void 0?r[a]:amt.coerce(t,r,omt,a,i)}return n("clickmode"),n("hoversubplots"),n("hoveranywhere"),n("clickanywhere"),n("hovermode")}});var fhe=fe((d0r,che)=>{"use strict";var uhe=Xt(),smt=tm(),lmt=VO(),umt=MT();che.exports=function(t,r){function n(u,c){return uhe.coerce(t,r,smt,u,c)}var a=lmt(t,r);a&&(n("hoverdistance"),n("spikedistance"),a.indexOf("unified")!==-1&&n("hoversort"));var i=n("dragmode");i==="select"&&n("selectdirection");var o=r._has("map"),s=r._has("geo"),l=r._basePlotModules.length;r.dragmode==="zoom"&&((o||s)&&l===1||o&&s&&l===2)&&(r.dragmode="pan"),umt(t,r,n),uhe.coerceFont(n,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var vhe=fe((v0r,dhe)=>{"use strict";var GO=Xt(),hhe=bi();dhe.exports=function(t){var r=t.calcdata,n=t._fullLayout;function a(u){return function(c){return GO.coerceHoverinfo({hoverinfo:c},{_module:u._module},n)}}for(var i=0;i{"use strict";var fmt=bi(),phe=Sd(),hmt=UO().hover;ghe.exports=function(t,r,n){var a=fmt.getComponentMethod("annotations","onClick")(t,t._hoverdata),i=t._fullLayout;n!==void 0&&hmt(t,r,n,!0);function o(){var l,u,c,f,v,g;var s={points:t._hoverdata,event:r};(l=s.xaxes)!=null||(s.xaxes=t._hoverXAxes),(u=s.yaxes)!=null||(s.yaxes=t._hoverYAxes),(c=s.xvals)!=null||(s.xvals=t._hoverXVals&&phe.c2dApply(t._hoverXAxes,t._hoverXVals)),(f=s.yvals)!=null||(s.yvals=t._hoverYVals&&phe.c2dApply(t._hoverYAxes,t._hoverYVals)),(v=s.xPixel)!=null||(s.xPixel=t._hoverPointerX),(g=s.yPixel)!=null||(s.yPixel=t._hoverPointerY),t.emit("plotly_click",s)}(t._hoverdata||i.clickanywhere)&&r&&r.target&&(t._hoverdata||(t._hoverdata=[]),a&&a.then?a.then(o):o(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var kl=fe((g0r,_he)=>{"use strict";var dmt=xi(),Jk=Xt(),vmt=ed(),ST=Sd(),yhe=tm(),xhe=UO();_he.exports={moduleType:"component",name:"fx",constants:P4(),schema:{layout:yhe},attributes:hb(),layoutAttributes:yhe,supplyLayoutGlobalDefaults:ihe(),supplyDefaults:she(),supplyLayoutDefaults:fhe(),calc:vhe(),getDistanceFunction:ST.getDistanceFunction,getClosest:ST.getClosest,inbox:ST.inbox,quadrature:ST.quadrature,appendArrayPointValue:ST.appendArrayPointValue,castHoverOption:gmt,castHoverinfo:mmt,hover:xhe.hover,unhover:vmt.unhover,loneHover:xhe.loneHover,loneUnhover:pmt,click:mhe()};function pmt(e){var t=Jk.isD3Selection(e)?e:dmt.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function gmt(e,t,r){return Jk.castOption(e,t,"hoverlabel."+r)}function mmt(e,t,r){function n(a){return Jk.coerceHoverinfo({hoverinfo:a},{_module:e._module},t)}return Jk.castOption(e,r,"hoverinfo",n)}});var $p=fe(tg=>{"use strict";tg.selectMode=function(e){return e==="lasso"||e==="select"};tg.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};tg.openMode=function(e){return e==="drawline"||e==="drawopenpath"};tg.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};tg.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};tg.selectingOrDrawing=function(e){return tg.freeMode(e)||tg.rectMode(e)}});var ET=fe((y0r,bhe)=>{"use strict";bhe.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(n){n.regl&&n.regl.clear({color:!0,depth:!0})})}});var Qk=fe((x0r,whe)=>{"use strict";whe.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},curlybraces:{width:18,height:16,path:"M 9,4 C 7.354992,4 6,5.354992 6,7 V 9 C 6,9.2999997 5.8778068,9.8883542 5.5878906,10.291016 5.2979744,10.693677 4.9222213,11 4,11 a 1.0001,1.0001 0 0 0 0,2 c 0.2999997,0 0.8883542,0.122193 1.2910156,0.412109 C 5.693677,13.702026 6,14.077779 6,15 v 2 c 0,1.645008 1.354992,3 3,3 h 0.5 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 H 9 C 8.4358712,18 8,17.564129 8,17 V 15 C 8,13.625876 7.3766799,12.602305 6.6113281,11.96875 6.8086352,11.794047 7.0679793,11.657537 7.2109375,11.458984 7.8210204,10.611647 8,9.6999993 8,9 V 7 C 8,6.4358712 8.4358712,6 9,6 h 0.5 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z m 5.5,0 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 H 15 c 0.564129,0 1,0.4358712 1,1 v 2 c 0,0.6999993 0.17898,1.611647 0.789062,2.458984 0.142959,0.198553 0.402303,0.335063 0.59961,0.509766 C 16.62332,12.602305 16,13.625876 16,15 v 2 c 0,0.564129 -0.435871,1 -1,1 h -0.5 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 H 15 c 1.645008,0 3,-1.354992 3,-3 v -2 c 0,-0.922221 0.306323,-1.297974 0.708984,-1.587891 C 19.111646,13.122193 19.7,13 20,13 a 1.0001,1.0001 0 0 0 0,-2 C 19.077779,11 18.702026,10.693677 18.412109,10.291016 18.122193,9.8883542 18,9.2999997 18,9 V 7 C 18,5.354992 16.645008,4 15,4 Z",transform:"translate(-3 -4)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},cloudupload:{width:640,height:640,path:"M451.5 160C434.9 160 418.8 164.5 404.7 172.7C388.9 156.7 370.5 143.3 350.2 133.2C378.4 109.2 414.3 96 451.5 96C537.9 96 608 166 608 252.5C608 294 591.5 333.8 562.2 363.1L491.1 434.2C461.8 463.5 422 480 380.5 480C294.1 480 224 410 224 323.5C224 322 224 320.5 224.1 319C224.6 301.3 239.3 287.4 257 287.9C274.7 288.4 288.6 303.1 288.1 320.8C288.1 321.7 288.1 322.6 288.1 323.4C288.1 374.5 329.5 415.9 380.6 415.9C405.1 415.9 428.6 406.2 446 388.8L517.1 317.7C534.4 300.4 544.2 276.8 544.2 252.3C544.2 201.2 502.8 159.8 451.7 159.8zM307.2 237.3C305.3 236.5 303.4 235.4 301.7 234.2C289.1 227.7 274.7 224 259.6 224C235.1 224 211.6 233.7 194.2 251.1L123.1 322.2C105.8 339.5 96 363.1 96 387.6C96 438.7 137.4 480.1 188.5 480.1C205 480.1 221.1 475.7 235.2 467.5C251 483.5 269.4 496.9 289.8 507C261.6 530.9 225.8 544.2 188.5 544.2C102.1 544.2 32 474.2 32 387.7C32 346.2 48.5 306.4 77.8 277.1L148.9 206C178.2 176.7 218 160.2 259.5 160.2C346.1 160.2 416 230.8 416 317.1C416 318.4 416 319.7 416 321C415.6 338.7 400.9 352.6 383.2 352.2C365.5 351.8 351.6 337.1 352 319.4C352 318.6 352 317.9 352 317.1C352 283.4 334 253.8 307.2 237.5z",transform:"matrix(1 0 0 1 -15 -15)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:[""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}});var t8=fe((_0r,The)=>{"use strict";var e8=32;The.exports={CIRCLE_SIDES:e8,i000:0,i090:e8/4,i180:e8/2,i270:e8/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var r8=fe((b0r,Mhe)=>{"use strict";var ymt=Xt().strTranslate;function Ahe(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function xmt(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function _mt(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return Ahe(e,r[t])}}function bmt(e){return ymt(e.xaxis._offset,e.yaxis._offset)}Mhe.exports={p2r:Ahe,r2p:xmt,axValue:_mt,getTransform:bmt}});var Em=fe(rg=>{"use strict";var wmt=FB(),khe=t8(),a3=khe.CIRCLE_SIDES,HO=khe.SQRT2,Che=r8(),She=Che.p2r,Ehe=Che.r2p,Tmt=[0,3,4,5,6,1,2],Amt=[0,3,4,1,2];rg.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var Lhe=El(),Ihe=$p(),Mmt=Ihe.drawMode,Smt=Ihe.openMode,o3=t8(),Phe=o3.i000,Fhe=o3.i090,Dhe=o3.i180,Rhe=o3.i270,Emt=o3.cos45,kmt=o3.sin45,zhe=r8(),i8=zhe.p2r,km=zhe.r2p,Cmt=pm(),Lmt=Cmt.clearOutline,a8=Em(),Pmt=a8.readPaths,Fmt=a8.writePaths,Dmt=a8.ellipseOver,Rmt=a8.fixDatesForPaths;function Imt(e,t){if(e.length){var r=e[0][0];if(r){var n=t.gd,a=t.isActiveShape,i=t.dragmode,o=(n.layout||{}).shapes||[];if(!Mmt(i)&&a!==void 0){var s=n._fullLayout._activeShapeIndex;if(s{"use strict";var zmt=$p(),qmt=zmt.selectMode,Bmt=pm(),Omt=Bmt.clearOutline,jO=Em(),Nmt=jO.readPaths,Umt=jO.writePaths,Vmt=jO.fixDatesForPaths;Ohe.exports=function(t,r){if(t.length){var n=t[0][0];if(n){var a=n.getAttribute("d"),i=r.gd,o=i._fullLayout.newselection,s=r.plotinfo,l=s.xaxis,u=s.yaxis,c=r.isActiveSelection,f=r.dragmode,v=(i.layout||{}).selections||[];if(!qmt(f)&&c!==void 0){var g=i._fullLayout._activeSelectionIndex;if(g{"use strict";Nhe.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:3},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}});var Lm=fe(gf=>{"use strict";var Jp=CT(),Uhe=Xt(),Cm=Yi();gf.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};gf.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};gf.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};gf.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};gf.extractPathCoords=function(e,t,r){var n=[],a=e.match(Jp.segmentRE);return a.forEach(function(i){var o=t[i.charAt(0)].drawn;if(o!==void 0){var s=i.slice(1).match(Jp.paramRE);if(!(!s||s.length{let s=o.charAt(0),l=a[s].drawn!==void 0;return i+(l?1:0)},0)};gf.getDataToPixel=function(e,t,r,n,a){var i=e._fullLayout._size,o;if(t)if(a==="domain")o=function(l){return t._length*(n?1-l:l)+t._offset};else{var s=gf.shapePositionToRange(t);o=function(l){var u=Kp(t,r);return t._offset+t.r2p(s(l,!0))+u},t.type==="date"&&(o=gf.decodeDate(o))}else n?o=function(l){return i.t+i.h*(1-l)}:o=function(l){return i.l+i.w*l};return o};gf.getPixelToData=function(e,t,r,n){var a=e._fullLayout._size,i;if(t)if(n==="domain")i=function(s){var l=(s-t._offset)/t._length;return r?1-l:l};else{var o=gf.rangeToShapePosition(t);i=function(s){return o(t.p2r(s-t._offset))}}else r?i=function(s){return 1-(s-a.t)/a.h}:i=function(s){return(s-a.l)/a.w};return i};gf.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,n=Math.round(e);return r?n+.5:n};gf.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref],a=!!n;return a?n._hadPlotinfo=!0:(n={},r.xref&&r.xref!=="paper"&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&r.yref!=="paper"&&(n.yaxis=e._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}};gf.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref],a=!!n;return a?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}};gf.getPathString=function(e,t){let r=t.type,n=Cm.getRefType(t.xref),a=Cm.getRefType(t.yref),i=e._fullLayout._size;var o,s,l,u,c,f,v,g,p,_,x,y;function C(F,E,I,R){var B;if(F)if(E==="domain")R?B=function(O){return F._offset+F._length*(1-O)}:B=function(O){return F._offset+F._length*O};else{let O=gf.shapePositionToRange(F);B=function(U){return F._offset+F.r2p(O(U,!0))},I==="path"&&F.type==="date"&&(B=gf.decodeDate(B))}else R?B=function(O){return i.t+i.h*(1-O)}:B=function(O){return i.l+i.w*O};return B}if(n==="array"?(v=[],o=t.xref.map(function(F){return Cm.getFromId(e,F)}),v=t.xref.map(function(F,E){return C(o[E],Cm.getRefType(F),r,!1)})):(o=Cm.getFromId(e,t.xref),v=C(o,n,r,!1)),a==="array"?(g=[],s=t.yref.map(function(F){return Cm.getFromId(e,F)}),g=t.yref.map(function(F,E){return C(s[E],Cm.getRefType(F),r,!0)})):(s=Cm.getFromId(e,t.yref),g=C(s,a,r,!0)),r==="path")return Gmt(t,v,g);if(n==="array")l=Kp(o[0],t.x0shift),u=Kp(o[1],t.x1shift),p=v[0](t.x0)+l,_=v[1](t.x1)+u;else if(l=Kp(o,t.x0shift),u=Kp(o,t.x1shift),t.xsizemode==="pixel"){let F=v(t.xanchor);p=F+t.x0+l,_=F+t.x1+u}else p=v(t.x0)+l,_=v(t.x1)+u;if(a==="array")c=Kp(s[0],t.y0shift),f=Kp(s[1],t.y1shift),x=g[0](t.y0)+c,y=g[1](t.y1)+f;else if(c=Kp(s,t.y0shift),f=Kp(s,t.y1shift),t.ysizemode==="pixel"){let F=g(t.yanchor);x=F-t.y0+c,y=F-t.y1+f}else x=g(t.y0)+c,y=g(t.y1)+f;if(r==="line")return"M"+p+","+x+"L"+_+","+y;if(r==="rect")return"M"+p+","+x+"H"+_+"V"+y+"H"+p+"Z";var k=(p+_)/2,S=(x+y)/2,L=Math.abs(k-p),w=Math.abs(S-x),T="A"+L+","+w,A=k+L+","+S,m=k+","+(S-w);return"M"+A+T+" 0 1,1 "+m+T+" 0 0,1 "+A+"Z"};function Gmt(e,t,r){let n=e.path,a=e.xsizemode,i=e.ysizemode,o=e.xanchor,s=e.yanchor,l=Array.isArray(e.xref),u=Array.isArray(e.yref);var c=0,f=0;return n.replace(Jp.segmentRE,function(v){var g=0,p=v.charAt(0),_=Jp.paramIsX[p],x=Jp.paramIsY[p],y=Jp.numParams[p];let C=_.drawn!==void 0,k=x.drawn!==void 0,S=l?t[c]:t,L=u?r[f]:r;var w=v.slice(1).replace(Jp.paramRE,function(T){return _[g]?a==="pixel"?T=S(o)+Number(T):T=S(T):x[g]&&(i==="pixel"?T=L(s)-Number(T):T=L(T)),g++,g>y&&(T="X"),T});return g>y&&(w=w.replace(/[\s,]*X.*/,""),Uhe.log("Ignoring extra params in segment "+v)),C&&c++,k&&f++,p+w})}gf.getPixelShift=Kp;function Kp(e,t){t=t||0;var r=0;return t&&e&&(e.type==="category"||e.type==="multicategory")&&(r=(e.r2p(1)-e.r2p(0))*t),r}});var YO=fe((E0r,Hhe)=>{"use strict";var Hmt=Xt(),Qp=Yi(),Vhe=as(),Ghe=Ji(),jmt=Em().readPaths,X2=Lm(),Wmt=X2.getPathString,LT=zE(),Ymt=nc().FROM_TL;Hhe.exports=function(t,r,n,a){if(a.selectAll(".shape-label").remove(),!!(n.label.text||n.label.texttemplate)){var i;if(n.label.texttemplate){var o={};if(n.type!=="path"){var s=Qp.getFromId(t,n.xref),l=Qp.getFromId(t,n.yref);let ee=Array.isArray(n.xref),ce=Array.isArray(n.yref);for(var u in LT){var c=typeof LT[u]=="function",f=!ee||LT.simpleXVariables.includes(u),v=!ce||LT.simpleYVariables.includes(u);if(c&&f&&v){var g=LT[u](n,s,l);g!==void 0&&(o[u]=g)}}}i=Hmt.texttemplateStringForShapes({data:[o],fallback:n.label.texttemplatefallback,locale:t._fullLayout._d3locale,template:n.label.texttemplate})}else i=n.label.text;var p={"data-index":r},_=n.label.font,x={"data-notex":1},y=a.append("g").attr(p).classed("shape-label",!0),C=y.append("text").attr(x).classed("shape-label-text",!0).text(i),k,S,L,w;if(n.path){var T=Wmt(t,n),A=jmt(T,t);k=1/0,L=1/0,S=-1/0,w=-1/0;for(var m=0;mX2.getDataToPixel(t,De,be,!1,Ge)(xe),le=(xe,be,De,Ge)=>X2.getDataToPixel(t,De,be,!0,Ge)(xe);if(n.xsizemode==="pixel"){let xe=ie(n.xanchor,void 0,me,_e),be=X2.getPixelShift(me,n.x0shift),De=X2.getPixelShift(me,n.x1shift);k=xe+n.x0+be,S=xe+n.x1+De}else k=ie(n.x0,n.x0shift,me,_e),S=ie(n.x1,n.x1shift,ye,ne);if(n.ysizemode==="pixel"){let xe=le(n.yanchor,void 0,ue,ae),be=X2.getPixelShift(ue,n.y0shift),De=X2.getPixelShift(ue,n.y1shift);L=xe-n.y0+be,w=xe-n.y1+De}else L=le(n.y0,n.y0shift,ue,ae),w=le(n.y1,n.y1shift,J,pe)}var O=n.label.textangle;O==="auto"&&(n.type==="line"?O=Xmt(k,L,S,w):O=0),C.call(function(ee){return ee.call(Ghe.font,_).attr({}),Vhe.convertToTspans(ee,t),ee});var U=Ghe.bBox(C.node()),j=Zmt(k,L,S,w,n,O,U),q=j.textx,V=j.texty,K=j.xanchor;C.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[K],y:V,x:q,transform:"rotate("+O+","+q+","+V+")"}).call(Vhe.positionText,q,V)}};function Xmt(e,t,r,n){var a,i;return i=Math.abs(r-e),r>=e?a=t-n:a=n-t,-180/Math.PI*Math.atan2(a,i)}function Zmt(e,t,r,n,a,i,o){var s=a.label.textposition,l=a.label.textangle,u=a.label.padding,c=a.type,f=Math.PI/180*i,v=Math.sin(f),g=Math.cos(f),p=a.label.xanchor,_=a.label.yanchor,x,y,C,k;if(c==="line"){s==="start"?(x=e,y=t):s==="end"?(x=r,y=n):(x=(e+r)/2,y=(t+n)/2),p==="auto"&&(s==="start"?l==="auto"?r>e?p="left":re?p="right":re?p="right":re?p="left":r{"use strict";var $mt=Xt(),Kmt=$mt.strTranslate,jhe=ed(),Xhe=$p(),Jmt=Xhe.drawMode,Zhe=Xhe.selectMode,$he=bi(),Whe=ni(),l8=t8(),Qmt=l8.i000,eyt=l8.i090,tyt=l8.i180,ryt=l8.i270,nyt=pm(),Khe=nyt.clearOutlineControllers,ZO=Em(),s8=ZO.pointsOnRectangle,XO=ZO.pointsOnEllipse,iyt=ZO.writePaths,ayt=o8().newShapes,oyt=o8().createShapeObj,syt=WO(),lyt=YO();Jhe.exports=function e(t,r,n,a){a||(a=0);var i=n.gd;function o(){e(t,r,n,a++),(XO(t[0])||n.hasText)&&s({redrawing:!0})}function s(j){var q={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,q=ayt(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,q=syt(r,n),i._fullLayout._reselect=!0),Object.keys(q).length&&$he.call((j||{}).redrawing?"relayout":"_guiRelayout",i,q)}var l=i._fullLayout,u=l._zoomlayer,c=n.dragmode,f=Jmt(c),v=Zhe(c);(f||v)&&(i._fullLayout._outlining=!0),Khe(i),r.attr("d",iyt(t));var g,p,_,x,y;if(!a&&(n.isActiveShape||n.isActiveSelection)){y=uyt([],t);var C=u.append("g").attr("class","outline-controllers");F(C),U()}if(f&&n.hasText){var k=u.select(".label-temp"),S=oyt(r,n,n.dragmode);lyt(i,"label-temp",S,k)}function L(j){_=+j.srcElement.getAttribute("data-i"),x=+j.srcElement.getAttribute("data-j"),g[_][x].moveFn=w}function w(j,q){if(t.length){var V=y[_][x][1],K=y[_][x][2],ee=t[_],ce=ee.length;if(s8(ee)){var me=j,ye=q;if(n.isActiveSelection){var ue=Yhe(ee,x);ue[1]===ee[x][1]?ye=0:me=0}for(var J=0;J1&&!(j.length===2&&j[1][0]==="Z")&&(x===0&&(j[0][0]="M"),t[_]=j,o(),s())}}function m(j,q){if(j===2){_=+q.srcElement.getAttribute("data-i"),x=+q.srcElement.getAttribute("data-j");var V=t[_];!s8(V)&&!XO(V)&&A()}}function F(j){g=[];for(var q=0;q{"use strict";var fyt=xi(),ide=bi(),KO=Xt(),Z2=Yi(),hyt=Em().readPaths,dyt=u8(),f8=YO(),ade=pm().clearOutlineControllers,$O=ni(),h8=Ji(),vyt=So().arrayEditor,Qhe=ed(),ede=kl(),tde=np(),$2=CT(),t0=Lm(),JO=t0.getPathString;lde.exports={draw:QO,drawOne:ode,eraseActiveShape:xyt,drawLabel:f8};function QO(e){var t=e._fullLayout;t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove();for(var r in t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var a=0;a{if(!e._dragging&&e._fullLayout.hoveranywhere){let o=a(i);o&&ede.hover(e,o,r.id)}}),n.addEventListener("click",i=>{if(!e._dragged&&e._fullLayout.clickanywhere){let o=a(i);o&&ede.click(e,o,r.id)}})}function sde(e,t,r){let n=r.xref,a=r.yref;if(Array.isArray(n)||Array.isArray(a)){let i="clip"+t._fullLayout._uid+"shape"+r._index,o=gyt(t,n,a);KO.ensureSingleById(t._fullLayout._clips,"clipPath",i,function(s){s.append("rect")}).select("rect").attr(o),h8.setClipUrl(e,i,t)}else{let i=(n+a).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");h8.setClipUrl(e,i?"clip"+t._fullLayout._uid+i:null,t)}}function gyt(e,t,r){let n=e._fullLayout._size;function a(s,l){let u=(Array.isArray(s)?s:[s]).map(v=>Z2.getFromId(e,v)).filter(Boolean);if(!u.length)return l?[n.t,n.t+n.h]:[n.l,n.l+n.w];let c=u.map(function(v){return v._offset}),f=u.map(function(v){return v._offset+v._length});return[Math.min(...c),Math.max(...f)]}let i=a(t,!1),o=a(r,!0);return{x:i[0],y:o[0],width:i[1]-i[0],height:o[1]-o[0]}}function myt(e,t,r,n,a,i){var o=10,s=10,l=r.xsizemode==="pixel",u=r.ysizemode==="pixel",c=r.type==="line",f=r.type==="path",v=i.modifyItem,g,p,_,x,y,C,k,S,L,w,T,A,m,F,E,I=fyt.select(t.node().parentNode),R=Z2.getFromId(e,r.xref),B=Z2.getRefType(r.xref),O=Z2.getFromId(e,r.yref),U=Z2.getRefType(r.yref),j=r.x0shift,q=r.x1shift,V=r.y0shift,K=r.y1shift,ee=function(Oe,ze){var ut=t0.getDataToPixel(e,R,ze,!1,B);return ut(Oe)},ce=function(Oe,ze){var ut=t0.getDataToPixel(e,O,ze,!0,U);return ut(Oe)},me=t0.getPixelToData(e,R,!1,B),ye=t0.getPixelToData(e,O,!0,U),ue=ne(),J={element:ue.node(),gd:e,prepFn:ie,doneFn:le,clickFn:xe},_e;Qhe.init(J),ue.node().onmousemove=pe;function ne(){return c?ae():t}function ae(){var Oe=10,ze=Math.max(r.line.width,Oe),ut=a.append("g").attr("data-index",n).attr("drag-helper",!0);ut.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":ze,"stroke-opacity":"0"});var et={"fill-opacity":"0"},qe=Math.max(ze/2,Oe);return ut.append("circle").attr({"data-line-point":"start-point",cx:l?ee(r.xanchor)+r.x0:ee(r.x0,j),cy:u?ce(r.yanchor)-r.y0:ce(r.y0,V),r:qe}).style(et).classed("cursor-grab",!0),ut.append("circle").attr({"data-line-point":"end-point",cx:l?ee(r.xanchor)+r.x1:ee(r.x1,q),cy:u?ce(r.yanchor)-r.y1:ce(r.y1,K),r:qe}).style(et).classed("cursor-grab",!0),ut}function pe(Oe){if(c8(e)){_e=null;return}if(c)Oe.target.tagName==="path"?_e="move":_e=Oe.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ze=J.element.getBoundingClientRect(),ut=ze.right-ze.left,et=ze.bottom-ze.top,qe=Oe.clientX-ze.left,we=Oe.clientY-ze.top,Le=!f&&ut>o&&et>s&&!Oe.shiftKey?Qhe.getCursor(qe/ut,1-we/et):"move";tde(t,Le),_e=Le.split("-")[0]}}function ie(Oe){c8(e)||(l&&(y=ee(r.xanchor)),u&&(C=ce(r.yanchor)),r.type==="path"?E=r.path:(g=l?r.x0:ee(r.x0),p=u?r.y0:ce(r.y0),_=l?r.x1:ee(r.x1),x=u?r.y1:ce(r.y1)),g<_?(L=g,m="x0",w=_,F="x1"):(L=_,m="x1",w=g,F="x0"),!u&&px?(k=p,T="y0",S=x,A="y1"):(k=x,T="y1",S=p,A="y0"),pe(Oe),Ge(a,r),tt(t,r,e),J.moveFn=_e==="move"?be:De,J.altKey=Oe.altKey)}function le(){c8(e)||(tde(t),pt(a),sde(t,e,r),ide.call("_guiRelayout",e,i.getUpdateObj()))}function xe(){c8(e)||pt(a)}function be(Oe,ze){if(r.type==="path"){var ut=function(we){return we},et=ut,qe=ut;l?v("xanchor",r.xanchor=me(y+Oe)):(et=function(Le){return me(ee(Le)+Oe)},R&&R.type==="date"&&(et=t0.encodeDate(et))),u?v("yanchor",r.yanchor=ye(C+ze)):(qe=function(Le){return ye(ce(Le)+ze)},O&&O.type==="date"&&(qe=t0.encodeDate(qe))),v("path",r.path=rde(E,et,qe))}else l?v("xanchor",r.xanchor=me(y+Oe)):(v("x0",r.x0=me(g+Oe)),v("x1",r.x1=me(_+Oe))),u?v("yanchor",r.yanchor=ye(C+ze)):(v("y0",r.y0=ye(p+ze)),v("y1",r.y1=ye(x+ze)));t.attr("d",JO(e,r)),Ge(a,r),f8(e,n,r,I)}function De(Oe,ze){if(f){var ut=function(jt){return jt},et=ut,qe=ut;l?v("xanchor",r.xanchor=me(y+Oe)):(et=function(mr){return me(ee(mr)+Oe)},R&&R.type==="date"&&(et=t0.encodeDate(et))),u?v("yanchor",r.yanchor=ye(C+ze)):(qe=function(mr){return ye(ce(mr)+ze)},O&&O.type==="date"&&(qe=t0.encodeDate(qe))),v("path",r.path=rde(E,et,qe))}else if(c){if(_e==="resize-over-start-point"){var we=g+Oe,Le=u?p-ze:p+ze;v("x0",r.x0=l?we:me(we)),v("y0",r.y0=u?Le:ye(Le))}else if(_e==="resize-over-end-point"){var Ke=_+Oe,Te=u?x-ze:x+ze;v("x1",r.x1=l?Ke:me(Ke)),v("y1",r.y1=u?Te:ye(Te))}}else{var Ve=function(jt){return _e.indexOf(jt)!==-1},$e=Ve("n"),ot=Ve("s"),rt=Ve("w"),it=Ve("e"),We=$e?k+ze:k,mt=ot?S+ze:S,bt=rt?L+Oe:L,Yt=it?w+Oe:w;u&&($e&&(We=k-ze),ot&&(mt=S-ze)),(!u&&mt-We>s||u&&We-mt>s)&&(v(T,r[T]=u?We:ye(We)),v(A,r[A]=u?mt:ye(mt))),Yt-bt>o&&(v(m,r[m]=l?bt:me(bt)),v(F,r[F]=l?Yt:me(Yt)))}t.attr("d",JO(e,r)),Ge(a,r),f8(e,n,r,I)}function Ge(Oe,ze){(l||u)&&ut();function ut(){var et=ze.type!=="path",qe=Oe.selectAll(".visual-cue").data([0]),we=1;qe.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":we}).classed("visual-cue",!0);var Le=ee(l?ze.xanchor:KO.midRange(et?[ze.x0,ze.x1]:t0.extractPathCoords(ze.path,$2.paramIsX))),Ke=ce(u?ze.yanchor:KO.midRange(et?[ze.y0,ze.y1]:t0.extractPathCoords(ze.path,$2.paramIsY)));if(Le=t0.roundPositionForSharpStrokeRendering(Le,we),Ke=t0.roundPositionForSharpStrokeRendering(Ke,we),l&&u){var Te="M"+(Le-1-we)+","+(Ke-1-we)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";qe.attr("d",Te)}else if(l){var Ve="M"+(Le-1-we)+","+(Ke-9-we)+"v18 h2 v-18 Z";qe.attr("d",Ve)}else{var $e="M"+(Le-9-we)+","+(Ke-1-we)+"h18 v2 h-18 Z";qe.attr("d",$e)}}}function pt(Oe){Oe.selectAll(".visual-cue").remove()}function tt(Oe,ze,ut){var et=ze.xref,qe=ze.yref,we=Z2.getFromId(ut,et),Le=Z2.getFromId(ut,qe),Ke="";et!=="paper"&&!we.autorange&&(Ke+=et),qe!=="paper"&&!Le.autorange&&(Ke+=qe),h8.setClipUrl(Oe,Ke?"clip"+ut._fullLayout._uid+Ke:null,ut)}}function rde(e,t,r){return e.replace($2.segmentRE,function(n){var a=0,i=n.charAt(0),o=$2.paramIsX[i],s=$2.paramIsY[i],l=$2.numParams[i],u=n.slice(1).replace($2.paramRE,function(c){return a>=l||(o[a]?c=t(c):s[a]&&(c=r(c)),a++),c});return i+u})}function yyt(e,t){if(d8(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){nde(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=nde,QO(e)}}}function nde(e){if(d8(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(ade(e),delete e._fullLayout._activeShapeIndex,QO(e))}}function xyt(e){if(d8(e)){ade(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var s3=Xt()._,_yt=function(e){return{DIALOG_TITLE:s3(e,"Share chart"),DIALOG_MESSAGE_CLOUD:s3(e,"This chart will be uploaded to {Plotly Cloud} to create a sharing link. Only you can see it until you change its visibility."),DIALOG_MESSAGE_CLOUD_ACCOUNT:s3(e,"If you don't have a Plotly Cloud account yet, you'll have a chance to create one."),DIALOG_MESSAGE_OTHER:s3(e,"This chart will be sent to {serverUrl}."),DIALOG_CANCEL:s3(e,"Cancel"),DIALOG_CONFIRM:s3(e,"Share")}};ude.exports=_yt});var dde=fe((P0r,hde)=>{"use strict";var fde=xi(),{dfltConfig:byt}=im(),wyt=cde(),Tyt=(e,t,r,n,a)=>{let i=wyt(e),o=t.append("div").classed("plotly-cloud-dialog-box",!0);if(o.append("div").classed("plotly-cloud-dialog-title",!0).text(i.DIALOG_TITLE),r===byt.plotlyServerURL){let l=o.append("div").classed("plotly-cloud-dialog-message",!0),u=new URL(r).origin,c=i.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),f=c[0],v=c[2],g=c[4];l.append("span").text(f),l.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",u).attr("target","_blank").text(v),l.append("span").text(g),l.append("div").classed("plotly-cloud-dialog-message--account",!0).text(i.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let l=new URL(r),u=l.hostname,c=l.origin,f=i.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),v=f[0],g=f[4],p=o.append("div").classed("plotly-cloud-dialog-message",!0);p.append("span").text(v),p.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",c).attr("target","_blank").text(u),p.append("span").text(g)}let s=o.append("div").classed("plotly-cloud-dialog-buttons",!0);s.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(i.DIALOG_CANCEL).on("click",a),s.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(i.DIALOG_CONFIRM).on("click",n)},Ayt=(e,t,r)=>{let n=fde.select(e._fullLayout._paperdiv.node());n.selectAll(".plotly-cloud-dialog").remove();let a=n.append("div").classed("plotly-cloud-dialog",!0),i=()=>{a.remove(),document.removeEventListener("keydown",o)},o=s=>{(s.key==="Escape"||s.keyCode===27)&&i()};document.addEventListener("keydown",o),a.on("click",()=>{fde.event.target===a.node()&&i()}),Tyt(e,a,t,()=>{i(),r()},i)};hde.exports=Ayt});var rN=fe((F0r,_de)=>{"use strict";var L0=bi(),Myt=Hs(),pde=El(),jo=Qk(),Syt=v8().eraseActiveShape,Eyt=dde(),l3=Xt(),mo=l3._,Wo=_de.exports={};Wo.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?mo(e,"Download plot as a PNG"):mo(e,"Download plot")},icon:jo.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};l3.notifier(mo(e,"Preparing image - this may take a few seconds"),"long",e),["filename","width","height","scale"].forEach(function(n){n in t&&(r[n]=t[n])}),L0.call("downloadImage",e,r).then(function(n){l3.notifier(mo(e,"Image download succeeded")+" - "+n,"long",e)}).catch(function(){l3.notifier(mo(e,"Sorry, there was a problem downloading your image!"),"long",e)})}};Wo.downloadJson={name:"downloadJson",title:function(e){return mo(e,"Download plot as JSON")},icon:jo.curlybraces,click:function(e){L0.call("downloadImage",e,{format:"full-json"}).then(function(t){l3.notifier(mo(e,"JSON download succeeded")+" - "+t,"long",e)}).catch(function(){l3.notifier(mo(e,"Sorry, there was a problem downloading your JSON file!"),"long",e)})}};Wo.sendChartToCloud={name:"sendChartToCloud",title:function(e){return mo(e,"Share chart...")},icon:jo.cloudupload,click:function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(!t){console.error("No destination URL provided (plotlyServerURL is empty)");return}var r;try{r=new URL(t)}catch(a){console.error("Invalid plotlyServerURL: "+t);return}let n=["http:","https:"];if(!n.includes(r.protocol)){console.error(`Invalid protocol '${r.protocol}' in plotlyServerURL '${t}'. Must be one of: ${n.join(", ")}`);return}Eyt(e,t,function(){Myt.sendDataToCloud(e,t)})}};Wo.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return mo(e,"Zoom")},attr:"dragmode",val:"zoom",icon:jo.zoombox,click:rd};Wo.pan2d={name:"pan2d",_cat:"pan",title:function(e){return mo(e,"Pan")},attr:"dragmode",val:"pan",icon:jo.pan,click:rd};Wo.select2d={name:"select2d",_cat:"select",title:function(e){return mo(e,"Box Select")},attr:"dragmode",val:"select",icon:jo.selectbox,click:rd};Wo.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return mo(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:jo.lasso,click:rd};Wo.drawclosedpath={name:"drawclosedpath",title:function(e){return mo(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:jo.drawclosedpath,click:rd};Wo.drawopenpath={name:"drawopenpath",title:function(e){return mo(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:jo.drawopenpath,click:rd};Wo.drawline={name:"drawline",title:function(e){return mo(e,"Draw line")},attr:"dragmode",val:"drawline",icon:jo.drawline,click:rd};Wo.drawrect={name:"drawrect",title:function(e){return mo(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:jo.drawrect,click:rd};Wo.drawcircle={name:"drawcircle",title:function(e){return mo(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:jo.drawcircle,click:rd};Wo.eraseshape={name:"eraseshape",title:function(e){return mo(e,"Erase active shape")},icon:jo.eraseshape,click:Syt};Wo.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return mo(e,"Zoom in")},attr:"zoom",val:"in",icon:jo.zoom_plus,click:rd};Wo.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return mo(e,"Zoom out")},attr:"zoom",val:"out",icon:jo.zoom_minus,click:rd};Wo.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return mo(e,"Autoscale")},attr:"zoom",val:"auto",icon:jo.autoscale,click:rd};Wo.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return mo(e,"Reset axes")},attr:"zoom",val:"reset",icon:jo.home,click:rd};Wo.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return mo(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:jo.tooltip_basic,gravity:"ne",click:rd};Wo.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return mo(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:jo.tooltip_compare,gravity:"ne",click:rd};function rd(e,t){var r=t.currentTarget,n=r.getAttribute("data-attr"),a=r.getAttribute("data-val")||!0,i=e._fullLayout,o={},s=pde.list(e,null,!0),l=i._cartesianSpikesEnabled,u,c;if(n==="zoom"){var f=a==="in"?.5:2,v=(1+f)/2,g=(1-f)/2,p,_;for(c=0;c-w),[_,x]=f.invert(c.midPt),{minscale:y}=u.projection,C=(s=u.projection.maxscale)!=null?s:1/0,k=Math.min(y,C),S=Math.max(y,C),L=a==="in"?vde*v:1/vde*v;L>S?L=S:L{"use strict";var bde=rN(),Pyt=Object.keys(bde),wde=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],Tde=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(wde,["downloadJson"]),u3=[],Fyt=function(e){if(Tde.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();u3.indexOf(t)===-1&&u3.push(t),u3.indexOf(r)===-1&&u3.push(r)}};Pyt.forEach(function(e){Fyt(bde[e])});u3.sort();Ade.exports={DRAW_MODES:wde,backButtons:Tde,foreButtons:u3}});var aN={};zp(aN,{default:()=>Ryt});var iN,Dyt,Ryt,oN=Lo(()=>{"use strict";iN=K0(nN()),Dyt={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 *${iN.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 *${iN.default.foreButtons.join("*, *")}*.`].join(" ")}},Ryt=Dyt});var Sde=fe((R0r,Mde)=>{"use strict";var Iyt=Xt(),PT=ni(),zyt=So(),qyt=(oN(),Gs(aN)).default;Mde.exports=function(t,r){var n=t.modebar||{},a=zyt.newContainer(r,"modebar");function i(s,l){return Iyt.coerce(n,a,qyt,s,l)}i("orientation"),i("bgcolor",PT.addOpacity(r.paper_bgcolor,.5));var o=PT.contrast(PT.rgb(r.modebar.bgcolor));i("color",PT.addOpacity(o,.3)),i("activecolor",PT.addOpacity(o,.7)),i("uirevision",r.uirevision),i("add"),i("remove")}});var Lde=fe((I0r,Cde)=>{"use strict";var sN=xi(),Byt=aa(),m8=Xt(),Ede=Qk(),Oyt=M4().version,Nyt=new DOMParser;function kde(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var e1=kde.prototype;e1.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,a="modebar-"+n._uid;this.element.setAttribute("id",a),this.element.setAttribute("role","toolbar"),this._uid=a,this.element.className="modebar modebar--custom",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),n.modebar.orientation==="v"&&(this.element.className+=" vertical",t=t.reverse());var i=n.modebar,o="#"+a+" .modebar-group";document.querySelectorAll(o).forEach(function(f){f.style.backgroundColor=i.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||l||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton(),m8.setStyleOnHover("#"+a+" .modebar-btn",".active",".icon path","fill: "+i.activecolor,"fill: "+i.color,this.element)};e1.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var n=t.createGroup();r.forEach(function(a){var i=a.name;if(!i)throw new Error("must provide button 'name' in button config");if(t.buttonsNames.indexOf(i)!==-1)throw new Error("button name '"+i+"' is taken");t.buttonsNames.push(i);var o=t.createButton(a);t.buttonElements.push(o),n.appendChild(o)}),t.element.appendChild(n)})};e1.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};e1.createButton=function(e){var t=this,r=document.createElement("button");r.setAttribute("type","button"),r.setAttribute("rel","tooltip"),r.className="modebar-btn";var n=e.title;n===void 0?n=e.name:typeof n=="function"&&(n=n(this.graphInfo)),(n||n===0)&&(r.setAttribute("data-title",n),r.setAttribute("aria-label",n)),e.attr!==void 0&&r.setAttribute("data-attr",e.attr);var a=e.val;a!==void 0&&(typeof a=="function"&&(a=a(this.graphInfo)),r.setAttribute("data-val",a));var i=e.click;if(typeof i!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(s){e.click(t.graphInfo,s),t.updateActiveButton(s.currentTarget)}),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&sN.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||Ede.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};e1.createIcon=function(e){var t=Byt(e.height)?Number(e.height):e.ascent-e.descent,r="http://www.w3.org/2000/svg",n;if(e.path){n=document.createElementNS(r,"svg"),n.setAttribute("viewBox",[0,0,e.width,t].join(" ")),n.setAttribute("class","icon");var a=document.createElementNS(r,"path");a.setAttribute("d",e.path),e.transform?a.setAttribute("transform",e.transform):e.ascent!==void 0&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),n.appendChild(a)}if(e.svg){var i=Nyt.parseFromString(e.svg,"application/xml");n=i.childNodes[0]}return n.setAttribute("height","1em"),n.setAttribute("width","1em"),n};e1.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(n){var a=n.getAttribute("data-val")||!0,i=n.getAttribute("data-attr"),o=n.getAttribute("data-toggle")==="true",s=sN.select(n),l=function(f,v){var g=t.modebar,p=f.querySelector(".icon path");p&&(v||f.matches(":hover")?p.style.fill=g.activecolor:p.style.fill=g.color)};if(o){if(i===r){var u=!s.classed("active");s.classed("active",u),l(n,u)}}else{var c=i===null?i:m8.nestedProperty(t,i).get();s.classed("active",c===a),l(n,c===a)}})};e1.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r{"use strict";var Gyt=El(),Pde=Is(),lN=bi(),Hyt=Sd().isUnifiedHover,jyt=Lde(),y8=rN(),Wyt=nN().DRAW_MODES,Yyt=Xt().extendDeep;Fde.exports=function(t){var r=t._fullLayout,n=t._context,a=r._modeBar;if(!n.displayModeBar&&!n.watermark){a&&(a.destroy(),delete r._modeBar);return}if(!Array.isArray(n.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(n.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var i=n.modeBarButtons,o;Array.isArray(i)&&i.length?o=Qyt(i):!n.displayModeBar&&n.watermark?o=[]:o=Xyt(t),a?a.update(t,o):r._modeBar=jyt(t,o)};function Xyt(e){var t=e._fullLayout,r=e._fullData,n=e._context;function a(q,V){if(typeof V=="string"){if(V.toLowerCase()===q.toLowerCase())return!0}else{var K=V.name,ee=V._cat||V.name;if(K===q||ee===q.toLowerCase())return!0}return!1}var i=t.modebar.add;typeof i=="string"&&(i=[i]);var o=t.modebar.remove;typeof o=="string"&&(o=[o]);var s=n.modeBarButtonsToAdd.concat(i.filter(function(q){for(var V=0;V1?(m=["toggleHover"],F=["resetViews"]):f?(A=["zoomInGeo","zoomOutGeo"],m=["hoverClosestGeo"],F=["resetGeo"]):c?(m=["hoverClosest3d"],F=["resetCameraDefault3d","resetCameraLastSave3d"]):_?(A=["zoomInMap","zoomOutMap"],m=["toggleHover"],F=["resetViewMap"]):v?m=["hoverClosestPie"]:C?(m=["hoverClosestCartesian","hoverCompareCartesian"],F=["resetViewSankey"]):m=["toggleHover"],u&&m.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(Kyt(r)||S)&&(m=[]),u&&!k&&(A=["zoomIn2d","zoomOut2d","autoScale2d"],F[0]!=="resetViews"&&(F=["resetScale2d"])),c?E=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!k||p?E=["zoom2d","pan2d"]:_||f?E=["pan2d"]:x&&(E=["zoom2d"]),$yt(r)&&E.push("select2d","lasso2d");var I=[],R=function(q){I.indexOf(q)===-1&&m.indexOf(q)!==-1&&I.push(q)};if(Array.isArray(s)){for(var B=[],O=0;O{"use strict";Rde.exports={moduleType:"component",name:"modebar",layoutAttributes:(oN(),Gs(aN)).default,supplyLayoutDefaults:Sde(),manage:Dde()}});var cN=fe((B0r,Ide)=>{"use strict";var e2t=nc().FROM_BL;Ide.exports=function(t,r,n){n===void 0&&(n=e2t[t.constraintoward||"center"]);var a=[t.r2l(t.range[0]),t.r2l(t.range[1])],i=a[0]+(a[1]-a[0])*n;t.range=t._input.range=[t.l2r(i+(a[0]-i)*r),t.l2r(i+(a[1]-i)*r)],t.setScale()}});var J2=fe(FT=>{"use strict";var K2=Xt(),fN=rp(),ip=El().id2name,t2t=pf(),zde=cN(),r2t=Hp(),n2t=Wa().ALMOST_EQUAL,i2t=nc().FROM_BL;FT.handleDefaults=function(e,t,r){var n=r.axIds,a=r.axHasImage,i=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,l,u,c,f,v,g,p;for(s=0;si?r.slice(i):n.slice(a))+o}function o2t(e,t){for(var r=t._size,n=r.h/r.w,a={},i=Object.keys(e),o=0;on2t*p&&!C)){for(i=0;iI&&KF&&(F=K);var ce=(F-m)/(2*E);f/=ce,m=l.l2r(m),F=l.l2r(F),l.range=l._input.range=w{"use strict";var _8=xi(),nd=bi(),P0=Hs(),av=Xt(),vN=as(),pN=ET(),DT=ni(),c3=Ji(),Nde=q2(),jde=uN(),RT=Yi(),ng=nc(),Wde=J2(),s2t=Wde.enforce,l2t=Wde.clean,Ude=rp().doAutoRange,Yde="start",u2t="middle",Xde="end",c2t=rc().zindexSeparator;Hc.layoutStyles=function(e){return av.syncOrAsync([P0.doAutoMargin,h2t],e)};function f2t(e,t,r){for(var n=0;n=e[1]||a[1]<=e[0])&&i[0]t[0])return!0}return!1}function h2t(e){var t=e._fullLayout,r=t._size,n=r.p,a=RT.list(e,"",!0),i,o,s,l,u,c;if(t._paperdiv.style({width:e._context.responsive&&t.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":t.width+"px",height:e._context.responsive&&t.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":t.height+"px"}).selectAll(".main-svg").call(c3.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),Hc.drawMainTitle(e),jde.manage(e),!t._has("cartesian"))return P0.previousPromises(e);function f(ie,le,xe){var be=ie._lw/2;if(ie._id.charAt(0)==="x"){if(le){if(xe==="top")return le._offset-n-be}else return r.t+r.h*(1-(ie.position||0))+be%1;return le._offset+le._length+n+be}if(le){if(xe==="right")return le._offset+le._length+n+be}else return r.l+r.w*(ie.position||0)+be%1;return le._offset-n-be}for(i=0;i0){g2t(e,i,u,l),s.attr({x:o,y:i,"text-anchor":n,dy:Hde(t.yanchor)}).call(vN.positionText,o,i);var c=(t.text.match(vN.BR_TAG_ALL)||[]).length;if(c){var f=ng.LINE_SPACING*c+ng.MID_SHIFT;t.y===0&&(f=-f),s.selectAll(".line").each(function(){var x=+this.getAttribute("dy").slice(0,-2)-f+"em";this.setAttribute("dy",x)})}var v=_8.select(e).selectAll(".gtitle-subtitle");if(v.node()){var g=s.node().getBBox(),p=g.y+g.height,_=p+Nde.SUBTITLE_PADDING_EM*t.subtitle.font.size;v.attr({x:o,y:_,"text-anchor":n,dy:Hde(t.yanchor)}).call(vN.positionText,o,_)}}}};function d2t(e,t,r,n,a){var i=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=av.isTopAnchor(t)?n:n-a,s=r==="b"?i-o:o;return av.isTopAnchor(t)&&r==="t"||av.isBottomAnchor(t)&&r==="b"?!1:s.5?"t":"b",o=e._fullLayout.margin[i],s=0;return t.yref==="paper"?s=r+t.pad.t+t.pad.b:t.yref==="container"&&(s=v2t(i,n,a,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function g2t(e,t,r,n){var a="title.automargin",i=e._fullLayout.title,o=i.y>.5?"t":"b",s={x:i.x,y:i.y,t:0,b:0},l={};i.yref==="paper"&&d2t(e,i,o,t,n)?s[o]=r:i.yref==="container"&&(l[o]=r,e._fullLayout._reservedMargin[a]=l),P0.allowAutoMargin(e,a),P0.autoMargin(e,a,s)}function m2t(e,t){var r=e.title,n=e._size,a=0;return t===Yde?a=r.pad.l:t===Xde&&(a=-r.pad.r),r.xref==="paper"?n.l+n.w*r.x+a:e.width*r.x+a}function y2t(e,t){var r=e.title,n=e._size,a=0;return t==="0em"||!t?a=-r.pad.b:t===ng.CAP_SHIFT+"em"&&(a=r.pad.t),r.y==="auto"?n.t/2:r.yref==="paper"?n.t+n.h-n.h*r.y+a:e.height-e.height*r.y+a}function Hde(e){return e==="top"?ng.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":ng.MID_SHIFT+"em"}function x2t(e){var t=e.title,r=u2t;return av.isRightAnchor(t)?r=Xde:av.isLeftAnchor(t)&&(r=Yde),r}function _2t(e){var t=e.title,r="0em";return av.isTopAnchor(t)?r=ng.CAP_SHIFT+"em":av.isMiddleAnchor(t)&&(r=ng.MID_SHIFT+"em"),r}Hc.doTraceStyle=function(e){var t=e.calcdata,r=[],n;for(n=0;n{"use strict";var b2t=Em().readPaths,w2t=u8(),Zde=pm().clearOutlineControllers,gN=ni(),$de=Ji(),T2t=So().arrayEditor,Kde=Lm(),A2t=Kde.getPathString;Qde.exports={draw:b8,drawOne:Jde,activateLastSelection:E2t};function b8(e){var t=e._fullLayout;Zde(e),t._selectionLayer.selectAll("path").remove();for(var r in t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var a=0;a=0;x--){var y=o.append("path").attr(l).style("opacity",x?.1:u).call(gN.stroke,f).call(gN.fill,c).call($de.dashLine,x?"solid":g,x?4+v:v);if(M2t(y,e,n),p){var C=T2t(e.layout,"selections",n);y.style({cursor:"move"});var k={element:y.node(),plotinfo:a,gd:e,editHelpers:C,isActiveSelection:!0},S=b2t(s,e);w2t(S,y,k)}else y.style("pointer-events",x?"all":"none");_[x]=y}var L=_[0],w=_[1];w.node().addEventListener("click",function(){return S2t(e,L)})}}function M2t(e,t,r){var n=r.xref+r.yref;$de.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function S2t(e,t){if(w8(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){mN(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=mN,b8(e)}}}function E2t(e){if(w8(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=mN,b8(e)}}function mN(e){if(w8(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(Zde(e),delete e._fullLayout._activeSelectionIndex,b8(e))}}});var t0e=fe((V0r,e0e)=>{function k2t(){var e,t=0,r=!1;function n(a,i){return e.list.push({type:a,data:i?JSON.parse(JSON.stringify(i)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(a,i){return n("check",{seg1:a,seg2:i})},segmentChop:function(a,i){return n("div_seg",{seg:a,pt:i}),n("chop",{seg:a,pt:i})},statusRemove:function(a){return n("pop_seg",{seg:a})},segmentUpdate:function(a){return n("seg_update",{seg:a})},segmentNew:function(a,i){return n("new_seg",{seg:a,primary:i})},segmentRemove:function(a){return n("rem_seg",{seg:a})},tempStatus:function(a,i,o){return n("temp_status",{seg:a,above:i,below:o})},rewind:function(a){return n("rewind",{seg:a})},status:function(a,i,o){return n("status",{seg:a,above:i,below:o})},vert:function(a){return a===r?e:(r=a,n("vert",{x:a}))},log:function(a){return typeof a!="string"&&(a=JSON.stringify(a,!1," ")),n("log",{txt:a})},reset:function(){return n("reset")},selected:function(a){return n("selected",{segs:a})},chainStart:function(a){return n("chain_start",{seg:a})},chainRemoveHead:function(a,i){return n("chain_rem_head",{index:a,pt:i})},chainRemoveTail:function(a,i){return n("chain_rem_tail",{index:a,pt:i})},chainNew:function(a,i){return n("chain_new",{pt1:a,pt2:i})},chainMatch:function(a){return n("chain_match",{index:a})},chainClose:function(a){return n("chain_close",{index:a})},chainAddHead:function(a,i){return n("chain_add_head",{index:a,pt:i})},chainAddTail:function(a,i){return n("chain_add_tail",{index:a,pt:i})},chainConnect:function(a,i){return n("chain_con",{index1:a,index2:i})},chainReverse:function(a){return n("chain_rev",{index:a})},chainJoin:function(a,i){return n("chain_join",{index1:a,index2:i})},done:function(){return n("done")}},e}e0e.exports=k2t});var n0e=fe((G0r,r0e)=>{function C2t(e){typeof e!="number"&&(e=1e-10);var t={epsilon:function(r){return typeof r=="number"&&(e=r),e},pointAboveOrOnLine:function(r,n,a){var i=n[0],o=n[1],s=a[0],l=a[1],u=r[0],c=r[1];return(s-i)*(c-o)-(l-o)*(u-i)>=-e},pointBetween:function(r,n,a){var i=r[1]-n[1],o=a[0]-n[0],s=r[0]-n[0],l=a[1]-n[1],u=s*o+i*l;if(u-e)},pointsSameX:function(r,n){return Math.abs(r[0]-n[0])e!=s-i>e&&(o-c)*(i-f)/(s-f)+c-a>e&&(l=!l),o=c,s=f}return l}};return t}r0e.exports=C2t});var a0e=fe((H0r,i0e)=>{var L2t={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(t===null||t===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,a=e.root.next;a!==null;){if(r(a)){t.prev=a.prev,t.next=a,a.prev.next=t,a.prev=t;return}n=a,a=a.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;n!==null&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(a){return a.prev=r,a.next=n,r.next=a,n!==null&&(n.prev=a),a}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};i0e.exports=L2t});var s0e=fe((j0r,o0e)=>{var zT=a0e();function P2t(e,t,r){function n(p,_){return{id:r?r.segmentId():-1,start:p,end:_,myFill:{above:null,below:null},otherFill:null}}function a(p,_,x){return{id:r?r.segmentId():-1,start:p,end:_,myFill:{above:x.myFill.above,below:x.myFill.below},otherFill:null}}var i=zT.create();function o(p,_,x,y,C,k){var S=t.pointsCompare(_,C);return S!==0?S:t.pointsSame(x,k)?0:p!==y?p?1:-1:t.pointAboveOrOnLine(x,y?C:k,y?k:C)?1:-1}function s(p,_){i.insertBefore(p,function(x){var y=o(p.isStart,p.pt,_,x.isStart,x.pt,x.other.pt);return y<0})}function l(p,_){var x=zT.node({isStart:!0,pt:p.start,seg:p,primary:_,other:null,status:null});return s(x,p.end),x}function u(p,_,x){var y=zT.node({isStart:!1,pt:_.end,seg:_,primary:x,other:p,status:null});p.other=y,s(y,p.pt)}function c(p,_){var x=l(p,_);return u(x,p,_),x}function f(p,_){r&&r.segmentChop(p.seg,_),p.other.remove(),p.seg.end=_,p.other.pt=_,s(p.other,p.pt)}function v(p,_){var x=a(_,p.seg.end,p.seg);return f(p,_),c(x,p.primary)}function g(p,_){var x=zT.create();function y(O,U){var j=O.seg.start,q=O.seg.end,V=U.seg.start,K=U.seg.end;return t.pointsCollinear(j,V,K)?t.pointsCollinear(q,V,K)||t.pointAboveOrOnLine(q,V,K)?1:-1:t.pointAboveOrOnLine(j,V,K)?1:-1}function C(O){return x.findTransition(function(U){var j=y(O,U.ev);return j>0})}function k(O,U){var j=O.seg,q=U.seg,V=j.start,K=j.end,ee=q.start,ce=q.end;r&&r.checkIntersection(j,q);var me=t.linesIntersect(V,K,ee,ce);if(me===!1){if(!t.pointsCollinear(V,K,ee)||t.pointsSame(V,ce)||t.pointsSame(K,ee))return!1;var ye=t.pointsSame(V,ee),ue=t.pointsSame(K,ce);if(ye&&ue)return U;var J=!ye&&t.pointBetween(V,ee,ce),_e=!ue&&t.pointBetween(K,ee,ce);if(ye)return _e?v(U,K):v(O,ce),U;J&&(ue||(_e?v(U,K):v(O,ce)),v(U,V))}else me.alongA===0&&(me.alongB===-1?v(O,ee):me.alongB===0?v(O,me.pt):me.alongB===1&&v(O,ce)),me.alongB===0&&(me.alongA===-1?v(U,V):me.alongA===0?v(U,me.pt):me.alongA===1&&v(U,K));return!1}for(var S=[];!i.isEmpty();){var L=i.getHead();if(r&&r.vert(L.pt[0]),L.isStart){let O=function(){if(T){var U=k(L,T);if(U)return U}return A?k(L,A):!1};var B=O;r&&r.segmentNew(L.seg,L.primary);var w=C(L),T=w.before?w.before.ev:null,A=w.after?w.after.ev:null;r&&r.tempStatus(L.seg,T?T.seg:!1,A?A.seg:!1);var m=O();if(m){if(e){var F;L.seg.myFill.below===null?F=!0:F=L.seg.myFill.above!==L.seg.myFill.below,F&&(m.seg.myFill.above=!m.seg.myFill.above)}else m.seg.otherFill=L.seg.myFill;r&&r.segmentUpdate(m.seg),L.other.remove(),L.remove()}if(i.getHead()!==L){r&&r.rewind(L.seg);continue}if(e){var F;L.seg.myFill.below===null?F=!0:F=L.seg.myFill.above!==L.seg.myFill.below,A?L.seg.myFill.below=A.seg.myFill.above:L.seg.myFill.below=p,F?L.seg.myFill.above=!L.seg.myFill.below:L.seg.myFill.above=L.seg.myFill.below}else if(L.seg.otherFill===null){var E;A?L.primary===A.primary?E=A.seg.otherFill.above:E=A.seg.myFill.above:E=L.primary?_:p,L.seg.otherFill={above:E,below:E}}r&&r.status(L.seg,T?T.seg:!1,A?A.seg:!1),L.other.status=w.insert(zT.node({ev:L}))}else{var I=L.status;if(I===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(x.exists(I.prev)&&x.exists(I.next)&&k(I.prev.ev,I.next.ev),r&&r.statusRemove(I.ev.seg),I.remove(),!L.primary){var R=L.seg.myFill;L.seg.myFill=L.seg.otherFill,L.seg.otherFill=R}S.push(L.seg)}i.getHead().remove()}return r&&r.done(),S}return e?{addRegion:function(p){for(var _,x=p[p.length-1],y=0;y{function F2t(e,t,r){var n=[],a=[];return e.forEach(function(i){var o=i.start,s=i.end;if(t.pointsSame(o,s)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}r&&r.chainStart(i);var l={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},c=l;function f(B,O,U){return c.index=B,c.matches_head=O,c.matches_pt1=U,c===l?(c=u,!1):(c=null,!0)}for(var v=0;v{function qT(e,t,r){var n=[];return e.forEach(function(a){var i=(a.myFill.above?8:0)+(a.myFill.below?4:0)+(a.otherFill&&a.otherFill.above?2:0)+(a.otherFill&&a.otherFill.below?1:0);t[i]!==0&&n.push({id:r?r.segmentId():-1,start:a.start,end:a.end,myFill:{above:t[i]===1,below:t[i]===2},otherFill:null})}),r&&r.selected(n),n}var D2t={union:function(e,t){return qT(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return qT(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return qT(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return qT(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return qT(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};c0e.exports=D2t});var d0e=fe((X0r,h0e)=>{var R2t={toPolygon:function(e,t){function r(i){if(i.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var c=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[c]})}for(var s=o(i[0]),l=1;l{var I2t=t0e(),z2t=n0e(),v0e=s0e(),q2t=u0e(),BT=f0e(),p0e=d0e(),ov=!1,OT=z2t(),r0;r0={buildLog:function(e){return e===!0?ov=I2t():e===!1&&(ov=!1),ov===!1?!1:ov.list},epsilon:function(e){return OT.epsilon(e)},segments:function(e){var t=v0e(!0,OT,ov);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=v0e(!1,OT,ov);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:BT.union(e.combined,ov),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:BT.intersect(e.combined,ov),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:BT.difference(e.combined,ov),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:BT.differenceRev(e.combined,ov),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:BT.xor(e.combined,ov),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:q2t(e.segments,OT,ov),inverted:e.inverted}},polygonFromGeoJSON:function(e){return p0e.toPolygon(r0,e)},polygonToGeoJSON:function(e){return p0e.fromPolygon(r0,OT,e)},union:function(e,t){return NT(e,t,r0.selectUnion)},intersect:function(e,t){return NT(e,t,r0.selectIntersect)},difference:function(e,t){return NT(e,t,r0.selectDifference)},differenceRev:function(e,t){return NT(e,t,r0.selectDifferenceRev)},xor:function(e,t){return NT(e,t,r0.selectXor)}};function NT(e,t,r){var n=r0.segments(e),a=r0.segments(t),i=r0.combine(n,a),o=r(i);return r0.polygon(o)}typeof window=="object"&&(window.PolyBool=r0);g0e.exports=r0});var x0e=fe(($0r,y0e)=>{y0e.exports=function(t,r,n,a){var i=t[0],o=t[1],s=!1;n===void 0&&(n=0),a===void 0&&(a=r.length);for(var l=a-n,u=0,c=l-1;uo!=p>o&&i<(g-f)*(o-v)/(p-v)+f;_&&(s=!s)}return s}});var UT=fe((K0r,_0e)=>{"use strict";var xN=DE().dot,T8=Wa().BADNUM,A8=_0e.exports={};A8.tester=function(t){var r=t.slice(),n=r[0][0],a=n,i=r[0][1],o=i,s;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),s=1;sa||y===T8||yo||_&&u(p))}function f(p,_){var x=p[0],y=p[1];if(x===T8||xa||y===T8||yo)return!1;var C=r.length,k=r[0][0],S=r[0][1],L=0,w,T,A,m,F;for(w=1;wMath.max(T,k)||y>Math.max(A,S)))if(ys||Math.abs(xN(f,u))>a)return!0;return!1};A8.filter=function(t,r){var n=[t[0]],a=0,i=0;function o(l){t.push(l);var u=n.length,c=a;n.splice(i+1);for(var f=c+1;f1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:n}}});var w0e=fe((J0r,b0e)=>{"use strict";b0e.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var H0e=fe((Q0r,G0e)=>{"use strict";var T0e=m0e(),B2t=x0e(),HT=bi(),O2t=Ji().dashStyle,VT=ni(),N2t=kl(),U2t=Sd().makeEventData,ZT=$p(),V2t=ZT.freeMode,G2t=ZT.rectMode,jT=ZT.drawMode,TN=ZT.openMode,AN=ZT.selectMode,A0e=Lm(),M0e=CT(),L0e=u8(),P0e=pm().clearOutline,F0e=Em(),_N=F0e.handleEllipse,H2t=F0e.readPaths,j2t=o8().newShapes,W2t=WO(),Y2t=yN().activateLastSelection,S8=Xt(),X2t=S8.sorterAsc,D0e=UT(),GT=WE(),sv=El().getFromId,Z2t=ET(),$2t=IT().redrawReglTraces,E8=w0e(),t1=E8.MINSELECT,K2t=D0e.filter,MN=D0e.tester,SN=r8(),S0e=SN.p2r,J2t=SN.axValue,Q2t=SN.getTransform;function EN(e){return e.subplot!==void 0}function ext(e,t,r,n,a){var i=!EN(n),o=V2t(a),s=G2t(a),l=TN(a),u=jT(a),c=AN(a),f=a==="drawline",v=a==="drawcircle",g=f||v,p=n.gd,_=p._fullLayout,x=c&&_.newselection.mode==="immediate"&&i,y=_._zoomlayer,C=n.element.getBoundingClientRect(),k=n.plotinfo,S=Q2t(k),L=t-C.left,w=r-C.top;_._calcInverseTransform(p);var T=S8.apply3DTransform(_._invTransform)(L,w);L=T[0],w=T[1];var A=_._invScaleX,m=_._invScaleY,F=L,E=w,I="M"+L+","+w,R=n.xaxes[0],B=n.yaxes[0],O=R._length,U=B._length,j=e.altKey&&!(jT(a)&&l),q,V,K,ee,ce,me,ye;I0e(e,p,n),o&&(q=K2t([[L,w]],E8.BENDPX));var ue=y.selectAll("path.select-outline-"+k.id).data([1]),J=u?_.newshape:_.newselection;u&&(n.hasText=J.label.text||J.label.texttemplate);var _e=u&&!l?J.fillcolor:"rgba(0,0,0,0)",ne=J.line.color||(i?VT.contrast(p._fullLayout.plot_bgcolor):"#7f7f7f");ue.enter().append("path").attr("class","select-outline select-outline-"+k.id).style({opacity:u?J.opacity/2:1,"stroke-dasharray":O2t(J.line.dash,J.line.width),"stroke-width":J.line.width+"px","shape-rendering":"crispEdges"}).call(VT.stroke,ne).call(VT.fill,_e).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",S).attr("d",I+"Z");var ae=y.append("path").attr("class","zoombox-corners").style({fill:VT.background,stroke:VT.defaultLine,"stroke-width":1}).attr("transform",S).attr("d","M0,0Z");if(u&&n.hasText){var pe=y.select(".label-temp");pe.empty()&&(pe=y.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var ie=_._uid+E8.SELECTID,le=[],xe=k8(p,n.xaxes,n.yaxes,n.subplot);x&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(i){var De=R._id,Ge=B._id;N0e(p,De,Ge,xe);for(var pt=(p.layout||{}).selections||[],tt=[],Oe=!1,ze=0;ze=0){p._fullLayout._deactivateShape(p);return}if(!u){var pt=_.clickmode;GT.done(ie).then(function(){if(GT.clear(ie),De===2){for(ue.remove(),ce=0;ce-1&&R0e(Ge,p,n.xaxes,n.yaxes,n.subplot,n,ue),pt==="event"&&XT(p,void 0);N2t.click(p,Ge,k.id)}).catch(S8.error)}},n.doneFn=function(){ae.remove(),GT.done(ie).then(function(){GT.clear(ie),!x&&ee&&n.selectionDefs&&(ee.subtract=j,n.selectionDefs.push(ee),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,K)),(x||u)&&WT(n,x),n.doneFnCompleted&&n.doneFnCompleted(le),c&&XT(p,ye)}).catch(S8.error)}}function R0e(e,t,r,n,a,i,o){var s=t._hoverdata,l=t._fullLayout,u=l.clickmode,c=u.indexOf("event")>-1,f=[],v,g,p,_,x,y,C,k,S,L;if(axt(s)){I0e(e,t,i),v=k8(t,r,n,a);var w=oxt(s,v),T=w.pointNumbers.length>0;if(T?sxt(v,w):lxt(v)&&(C=k0e(w))){for(o&&o.remove(),L=0;L=0}function ixt(e){return e._fullLayout._activeSelectionIndex>=0}function WT(e,t){var r=e.dragmode,n=e.plotinfo,a=e.gd;nxt(a)&&a._fullLayout._deactivateShape(a),ixt(a)&&a._fullLayout._deactivateSelection(a);var i=a._fullLayout,o=i._zoomlayer,s=jT(r),l=AN(r);if(s||l){var u=o.selectAll(".select-outline-"+n.id);if(u&&a._fullLayout._outlining){var c;s&&(c=j2t(u,e)),c&&HT.call("_guiRelayout",a,{shapes:c});var f;l&&!EN(e)&&(f=W2t(u,e)),f&&(a._fullLayout._noEmitSelectedAtStart=!0,HT.call("_guiRelayout",a,{selections:f}).then(function(){t&&Y2t(a)})),a._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function E0e(e){return e._id}function k8(e,t,r,n){if(!e.calcdata)return[];var a=[],i=t.map(E0e),o=r.map(E0e),s,l,u;for(u=0;u0,i=a?n[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(i)>-1:!1}function sxt(e,t){var r=[],n,a,i,o;for(o=0;o0&&r.push(n);if(r.length===1&&(i=r[0]===t.searchInfo,i&&(a=t.searchInfo.cd[0].trace,a.selectedpoints.length===t.pointNumbers.length))){for(o=0;o1||(t+=n.selectedpoints.length,t>1)))return!1;return t===1}function YT(e,t,r){var n,a;for(n=0;n-1&&t;if(!o&&t){var De=C0e(e,!0);if(De.length){var Ge=De[0].xref,pt=De[0].yref;if(Ge&&pt){var tt=U0e(De),Oe=V0e([sv(e,Ge,"x"),sv(e,pt,"y")]);Oe(le,tt)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:be&&XT(e,le),v._reselect=!1}if(!o&&v._deselect){var ze=v._deselect;s=ze.xref,l=ze.yref,fxt(s,l,c)||N0e(e,s,l,n),be&&(le.points.length?XT(e,le):LN(e)),v._deselect=!1}return{eventData:le,selectionTesters:r}}function cxt(e){var t=e.calcdata;if(t)for(var r=0;r{"use strict";j0e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]});var $T=fe((tvr,W0e)=>{"use strict";W0e.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e,"axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}});var Fm=fe((nvr,Z0e)=>{"use strict";var Y0e=PN(),X0e=Ds(),C8=rc(),gxt=So().templatedArray,rvr=$T();Z0e.exports=gxt("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:X0e({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:Y0e.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:Y0e.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",C8.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",C8.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",C8.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",C8.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:X0e({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var r1=fe((ivr,$0e)=>{"use strict";$0e.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var n1=fe((avr,K0e)=>{"use strict";K0e.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var Ol=fe((ovr,ave)=>{"use strict";var J0e=pl().axisHoverFormat,{hovertemplateAttrs:mxt,texttemplateAttrs:yxt,templatefallbackAttrs:Q0e}=Oo(),eve=_s(),xxt=Ds(),tve=Uc().dash,_xt=Uc().pattern,bxt=Ji(),wxt=r1(),KT=ta().extendFlat,Txt=n1();function rve(e){return{valType:"any",dflt:0,editType:"calc"}}function nve(e){return{valType:"any",editType:"calc"}}function ive(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}ave.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:rve("x"),yperiod:rve("y"),xperiod0:nve("x0"),yperiod0:nve("y0"),xperiodalignment:ive("x"),yperiodalignment:ive("y"),xhoverformat:J0e("x"),yhoverformat:J0e("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:yxt(),texttemplatefallback:Q0e({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:mxt({},{keys:wxt.eventDataKeys}),hovertemplatefallback:Q0e(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:KT({},tve,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:Txt(!0),fillgradient:KT({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:_xt,marker:KT({symbol:{valType:"enumerated",values:bxt.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:KT({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:KT({},tve,{arrayOk:!0}),editType:"calc"},eve("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},eve("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:xxt({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var FN=fe((lvr,lve)=>{"use strict";var ove=Fm(),sve=Ol().line,Axt=Uc().dash,L8=ta().extendFlat,Mxt=rl().overrideAll,Sxt=So().templatedArray,svr=$T();lve.exports=Mxt(Sxt("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:L8({},ove.xref,{}),yref:L8({},ove.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:sve.color,width:L8({},sve.width,{min:1,dflt:1}),dash:L8({},Axt,{dflt:"dot"})}}),"arraydraw","from-root")});var hve=fe((uvr,fve)=>{"use strict";var uve=Xt(),P8=Yi(),Ext=Ah(),kxt=FN(),cve=Lm();fve.exports=function(t,r){Ext(t,r,{name:"selections",handleItemDefaults:Cxt});for(var n=r.selections,a=0;a{"use strict";dve.exports=function(t,r,n){n("newselection.mode");var a=n("newselection.line.width");a&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}});var JT=fe((fvr,mve)=>{"use strict";var Lxt=bi(),pve=Xt(),gve=El();mve.exports=function(t){return function(n,a){var i=n[t];if(Array.isArray(i))for(var o=Lxt.subplotsRegistry.cartesian,s=o.idRegex,l=a._subplots,u=l.xaxis,c=l.yaxis,f=l.cartesian,v=a._has("cartesian"),g=0;g{"use strict";var yve=yN(),QT=H0e();xve.exports={moduleType:"component",name:"selections",layoutAttributes:FN(),supplyLayoutDefaults:hve(),supplyDrawNewSelectionDefaults:vve(),includeBasePlot:JT()("selections"),draw:yve.draw,drawOne:yve.drawOne,reselect:QT.reselect,prepSelect:QT.prepSelect,clearOutline:QT.clearOutline,clearSelectionsCache:QT.clearSelectionsCache,selectOnClick:QT.selectOnClick}});var NN=fe((dvr,Bve)=>{"use strict";var BN=xi(),lv=Xt(),_ve=lv.numberFormat,Pxt=Vk(),F8=bi(),kve=lv.strTranslate,Fxt=as(),RN=ni(),Dm=Ji(),Dxt=kl(),bve=Yi(),Rxt=np(),Ixt=ed(),Cve=$p(),D8=Cve.selectingOrDrawing,zxt=Cve.freeMode,qxt=nc().FROM_TL,Bxt=ET(),Oxt=IT().redrawReglTraces,Nxt=Hs(),IN=El().getFromId,Uxt=Ac().prepSelect,Vxt=Ac().clearOutline,Gxt=Ac().selectOnClick,DN=cN(),ON=rc(),wve=ON.MINDRAG,kd=ON.MINZOOM,Tve=!0;function Hxt(e,t,r,n,a,i,o,s){var l=e._fullLayout._zoomlayer,u=o+s==="nsew",c=(o+s).length===1,f,v,g,p,_,x,y,C,k,S,L,w,T,A,m,F,E,I,R,B,O,U,j;r+=t.yaxis._shift;function q(){if(f=t.xaxis,v=t.yaxis,k=f._length,S=v._length,y=f._offset,C=v._offset,g={},g[f._id]=f,p={},p[v._id]=v,o&&s)for(var it=t.overlays,We=0;We=0){mt._fullLayout._deactivateShape(mt);return}var bt=mt._fullLayout.clickmode;if(qN(mt),it===2&&!c&&Ke(),u)bt.indexOf("select")>-1&&Gxt(We,mt,_,x,t.id,ee),bt.indexOf("event")>-1&&Dxt.click(mt,We,t.id);else if(it===1&&c){var Yt=o?v:f,jt=o==="s"||s==="w"?0:1,mr=Yt._name+".range["+jt+"]",or=jxt(Yt,jt),fr="left",Ot="middle";if(Yt.fixedrange)return;o?(Ot=o==="n"?"top":"bottom",Yt.side==="right"&&(fr="right")):s==="e"&&(fr="right"),mt._context.showAxisRangeEntryBoxes&&BN.select(K).call(Fxt.makeEditable,{gd:mt,immediate:!0,background:mt._fullLayout.paper_bgcolor,text:String(or),fill:Yt.tickfont?Yt.tickfont.color:"#444",horizontalAlign:fr,verticalAlign:Ot}).on("edit",function(cr){var Ct=Yt.d2r(cr);Ct!==void 0&&F8.call("_guiRelayout",mt,mr,Ct)})}}Ixt.init(ee);var ye,ue,J,_e,ne,ae,pe,ie,le,xe;function be(it,We,mt){var bt=K.getBoundingClientRect();ye=We-bt.left,ue=mt-bt.top,e._fullLayout._calcInverseTransform(e);var Yt=lv.apply3DTransform(e._fullLayout._invTransform)(ye,ue);ye=Yt[0],ue=Yt[1],J={l:ye,r:ye,w:0,t:ue,b:ue,h:0},_e=e._hmpixcount?e._hmlumcount/e._hmpixcount:RN.luminosity(e._fullLayout.plot_bgcolor),ne="M0,0H"+k+"V"+S+"H0V0",ae=!1,pe="xy",xe=!1,ie=Fve(l,_e,y,C,ne),le=Dve(l,y,C)}function De(it,We){if(e._transitioningWithDuration)return!1;var mt=Math.max(0,Math.min(k,U*it+ye)),bt=Math.max(0,Math.min(S,j*We+ue)),Yt=Math.abs(mt-ye),jt=Math.abs(bt-ue);J.l=Math.min(ye,mt),J.r=Math.max(ye,mt),J.t=Math.min(ue,bt),J.b=Math.max(ue,bt);function mr(){pe="",J.r=J.l,J.t=J.b,le.attr("d","M0,0Z")}if(L.isSubplotConstrained)Yt>kd||jt>kd?(pe="xy",Yt/k>jt/S?(jt=Yt*S/k,ue>bt?J.t=ue-jt:J.b=ue+jt):(Yt=jt*k/S,ye>mt?J.l=ye-Yt:J.r=ye+Yt),le.attr("d",R8(J))):mr();else if(w.isSubplotConstrained)if(Yt>kd||jt>kd){pe="xy";var or=Math.min(J.l/k,(S-J.b)/S),fr=Math.max(J.r/k,(S-J.t)/S);J.l=or*k,J.r=fr*k,J.b=(1-or)*S,J.t=(1-fr)*S,le.attr("d",R8(J))}else mr();else!A||jt0){var cr;if(w.isSubplotConstrained||!T&&A.length===1){for(cr=0;cr<_.length;cr++)_[cr].range=_[cr]._r.slice(),DN(_[cr],1-We/S);it=We*k/S,fr=it/2}if(w.isSubplotConstrained||!A&&T.length===1){for(cr=0;cr1&&(mr.maxallowed!==void 0&&F===(mr.range[0]1&&(or.maxallowed!==void 0&&E===(or.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function Yxt(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function Fve(e,t,r,n,a){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",kve(r,n)).attr("d",a+"Z")}function Dve(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:RN.background,stroke:RN.defaultLine,"stroke-width":1,opacity:0}).attr("transform",kve(t,r)).attr("d","M0,0Z")}function Rve(e,t,r,n,a,i){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),Ive(e,t,a,i)}function Ive(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function qN(e){BN.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function zve(e){Tve&&e.data&&e._context.showTips&&(lv.notifier(lv._(e,"Double-click to zoom back out"),"long",e),Tve=!1)}function Xxt(e,t){return"M"+(e.l-.5)+","+(t-kd-.5)+"h-3v"+(2*kd+1)+"h3ZM"+(e.r+.5)+","+(t-kd-.5)+"h3v"+(2*kd+1)+"h-3Z"}function Zxt(e,t){return"M"+(t-kd-.5)+","+(e.t-.5)+"v-3h"+(2*kd+1)+"v3ZM"+(t-kd-.5)+","+(e.b+.5)+"v3h"+(2*kd+1)+"v-3Z"}function R8(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,kd)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function Sve(e,t,r,n,a){for(var i=!1,o={},s={},l,u,c,f,v=(a||{}).xaHash,g=(a||{}).yaHash,p=0;p{"use strict";var $xt=xi(),I8=kl(),Kxt=ed(),Jxt=np(),ap=NN().makeDragBox,jc=rc().DRAGGERSIZE;z8.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){$xt.select(t).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var n=Object.keys(r._plots||{}).sort(function(i,o){if((r._plots[i].mainplot&&!0)===(r._plots[o].mainplot&&!0)){var s=i.split("y"),l=o.split("y");return s[0]===l[0]?Number(s[1]||1)-Number(l[1]||1):Number(s[0]||1)-Number(l[0]||1)}return r._plots[i].mainplot?1:-1});n.forEach(function(i){var o=r._plots[i],s=o.xaxis,l=o.yaxis;if(!o.mainplot){var u=ap(t,o,s._offset,l._offset,s._length,l._length,"ns","ew");u.onmousemove=function(v){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===i&&t._fullLayout._plots[i]&&I8.hover(t,v,i)},I8.hover(t,v,i),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=i},u.onmouseout=function(v){t._dragging||(t._fullLayout._hoversubplot=null,Kxt.unhover(t,v))},t._context.showAxisDragHandles&&(ap(t,o,s._offset-jc,l._offset-jc,jc,jc,"n","w"),ap(t,o,s._offset+s._length,l._offset-jc,jc,jc,"n","e"),ap(t,o,s._offset-jc,l._offset+l._length,jc,jc,"s","w"),ap(t,o,s._offset+s._length,l._offset+l._length,jc,jc,"s","e"))}if(t._context.showAxisDragHandles){if(i===s._mainSubplot){var c=s._mainLinePosition;s.side==="top"&&(c-=jc),ap(t,o,s._offset+s._length*.1,c,s._length*.8,jc,"","ew"),ap(t,o,s._offset,c,s._length*.1,jc,"","w"),ap(t,o,s._offset+s._length*.9,c,s._length*.1,jc,"","e")}if(i===l._mainSubplot){var f=l._mainLinePosition;l.side!=="right"&&(f-=jc),ap(t,o,f,l._offset+l._length*.1,jc,l._length*.8,"ns",""),ap(t,o,f,l._offset+l._length*.9,jc,l._length*.1,"s",""),ap(t,o,f,l._offset,jc,l._length*.1,"n","")}}});var a=r._hoverlayer.node();a.onmousemove=function(i){i.target=t._fullLayout._lasthover,I8.hover(t,i,r._hoversubplot)},a.onclick=function(i){i.target=t._fullLayout._lasthover,I8.click(t,i)},a.onmousedown=function(i){t._fullLayout._lasthover.onmousedown(i)},z8.updateFx(t)}};z8.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";Jxt(t._draggers,r)}});var Uve=fe((pvr,Nve)=>{"use strict";var Ove=bi();Nve.exports=function(t){for(var r=Ove.layoutArrayContainers,n=Ove.layoutArrayRegexes,a=t.split("[")[0],i,o,s=0;s{"use strict";var Qxt=em(),VN=FE(),eA=W1(),e_t=GE().sorterAsc,GN=bi();tA.containerArrayMatch=Uve();var t_t=tA.isAddVal=function(t){return t==="add"||Qxt(t)},Vve=tA.isRemoveVal=function(t){return t===null||t==="remove"};tA.applyContainerArrayChanges=function(t,r,n,a,i){var o=r.astr,s=GN.getComponentMethod(o,"supplyLayoutDefaults"),l=GN.getComponentMethod(o,"draw"),u=GN.getComponentMethod(o,"drawOne"),c=a.replot||a.recalc||s===VN||l===VN,f=t.layout,v=t._fullLayout;if(n[""]){Object.keys(n).length>1&&eA.warn("Full array edits are incompatible with other edits",o);var g=n[""][""];if(Vve(g))r.set(null);else if(Array.isArray(g))r.set(g);else return eA.warn("Unrecognized full array edit value",o,g),!0;return c?!1:(s(f,v),l(t),!0)}var p=Object.keys(n).map(Number).sort(e_t),_=r.get(),x=_||[],y=i(v,o).get(),C=[],k=-1,S=x.length,L,w,T,A,m,F,E,I;for(L=0;Lx.length-(E?0:1)){eA.warn("index out of range",o,T);continue}if(F!==void 0)m.length>1&&eA.warn("Insertion & removal are incompatible with edits to the same index.",o,T),Vve(F)?C.push(T):E?(F==="add"&&(F={}),x.splice(T,0,F),y&&y.splice(T,0,{})):eA.warn("Unrecognized full object edit value",o,T,F),k===-1&&(k=T);else for(w=0;w=0;L--)x.splice(C[L],1),y&&y.splice(C[L],1);if(x.length?_||r.set(x):r.set(null),c)return!1;if(s(f,v),u!==VN){var R;if(k===-1)R=p;else{for(S=Math.max(x.length,S),R=[],L=0;L=k));L++)R.push(T);for(L=k;L{"use strict";var Yve=aa(),Xve=bi(),id=Xt(),rA=Hs(),Zve=El(),nA=Zve.cleanId,r_t=Zve.getFromTrace,HN=Xve.traceIs,n_t=["x","y","z"];uv.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&id.log("Clearing previous rejected promises from queue."),e._promises=[]};uv.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var n=(rA.subplotsRegistry.cartesian||{}).attrRegex,a=(rA.subplotsRegistry.polar||{}).attrRegex,i=(rA.subplotsRegistry.ternary||{}).attrRegex,o=(rA.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(e);for(t=0;t3?(x.x=1.02,x.xanchor="left"):x.x<-2&&(x.x=-.02,x.xanchor="right"),x.y>3?(x.y=1.02,x.yanchor="bottom"):x.y<-2&&(x.y=-.02,x.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),e.template&&e.template.layout&&uv.cleanLayout(e.template.layout),e};function f3(e,t,r=!1){var n=e[t],a=t.charAt(0);r&&Array.isArray(n)||n&&n!=="paper"&&(e[t]=nA(n,a,!0))}uv.cleanData=function(e){for(var t=0;t0)return e.slice(0,t)}uv.hasParent=function(e,t){for(var r=Wve(t);r;){if(r in e)return!0;r=Wve(r)}return!1};uv.clearAxisTypes=function(e,t,r){for(var n=0;n{let r=(...n)=>n.every(a=>id.isPlainObject(a))||n.every(a=>Array.isArray(a));if([e,t].every(n=>Array.isArray(n))){if(e.length!==t.length)return!1;for(let n=0;nid.isPlainObject(n))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){if(n.startsWith("_"))continue;let a=e[n],i=t[n];if(a!==i&&!(r(a,i)?jN(a,i):!1))return!1}return!0}return!1};uv.collectionsAreEqual=jN});var Z8=fe(Eo=>{"use strict";var N8=xi(),o_t=aa(),s_t=Qq(),vi=Xt(),Ws=vi.nestedProperty,XN=Rb(),Cd=zse(),cv=bi(),Y8=qb(),wa=Hs(),ad=Yi(),l_t=gO(),u_t=pf(),WN=Ji(),c_t=ni(),f_t=UN().initInteractions,h_t=ev(),d_t=Ac().clearOutline,tpe=im().dfltConfig,B8=Gve(),zu=$ve(),cs=IT(),Rm=rl(),v_t=rc().AX_NAME_PATTERN,YN=0,Kve=5;function p_t(e,t,r,n){var a;if(e=vi.getGraphDiv(e),XN.init(e),vi.isPlainObject(t)){var i=t;t=i.data,r=i.layout,n=i.config,a=i.frames}var o=XN.triggerHandler(e,"plotly_beforeplot",[t,r,n]);if(o===!1)return Promise.reject();!t&&!r&&!vi.isPlotDiv(e)&&vi.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function s(){if(a)return Eo.addFrames(e,a)}npe(e,n),r||(r={}),N8.select(e).classed("js-plotly-plot",!0),WN.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(zu.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=zu.cleanLayout(r)),wa.supplyDefaults(e);var u=e._fullLayout,c=u._has("cartesian");u._replotting=!0,(l||u._shouldCreateBgLayer)&&(B_t(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),WN.initGradients(e),WN.initPatterns(e),l&&ad.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&wa.doCalcdata(e);for(var v=0;v=e.data.length||a<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(a,n+1)>-1||a>=0&&t.indexOf(-e.data.length+a)>-1||a<0&&t.indexOf(e.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function ipe(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),V8(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&V8(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function __t(e,t,r){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&c=0&&c0&&typeof A.parts[E]!="string";)E--;var I=A.parts[E],R=A.parts[E-1]+"."+I,B=A.parts.slice(0,E).join("."),O=Ws(e.layout,B).get(),U=Ws(n,B).get(),j=A.get();if(m!==void 0){y[T]=m,C[T]=I==="reverse"?m:ig(j);var q=Y8.getLayoutValObject(n,A.parts);if(q&&q.impliedEdits&&m!==null)for(var V in q.impliedEdits)k(vi.relativeAttr(T,V),q.impliedEdits[V]);if(["width","height"].indexOf(T)!==-1)if(m){k("autosize",null);var K=T==="height"?"width":"height";k(K,n[K])}else n[T]=e._initialAutoSize[T];else if(T==="autosize")k("width",m?null:n.width),k("height",m?null:n.height);else if(R.match(dpe))w(R),Ws(n,B+"._inputRange").set(null);else if(R.match(vpe)){w(R),Ws(n,B+"._inputRange").set(null);var ee=Ws(n,B).get();ee._inputDomain&&(ee._input.domain=ee._inputDomain.slice())}else R.match(A_t)&&Ws(n,B+"._inputDomain").set(null);if(I==="type"){L=O;var ce=U.type==="linear"&&m==="log",me=U.type==="log"&&m==="linear";if(ce||me){if(!L||!L.range)k(B+".autorange",!0);else if(U.autorange)ce&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var ye=L.range[0],ue=L.range[1];ce?(ye<=0&&ue<=0&&k(B+".autorange",!0),ye<=0?ye=ue/1e6:ue<=0&&(ue=ye/1e6),k(B+".range[0]",Math.log(ye)/Math.LN10),k(B+".range[1]",Math.log(ue)/Math.LN10)):(k(B+".range[0]",Math.pow(10,ye)),k(B+".range[1]",Math.pow(10,ue)))}Array.isArray(n._subplots.polar)&&n._subplots.polar.length&&n[A.parts[0]]&&A.parts[1]==="radialaxis"&&delete n[A.parts[0]]._subplot.viewInitial["radialaxis.range"],cv.getComponentMethod("annotations","convertCoords")(e,U,m,k),cv.getComponentMethod("images","convertCoords")(e,U,m,k)}else k(B+".autorange",!0),k(B+".range",null);Ws(n,B+"._inputRange").set(null)}else if(I.match(v_t)){var J=Ws(n,T).get(),_e=(m||{}).type;(!_e||_e==="-")&&(_e="linear"),cv.getComponentMethod("annotations","convertCoords")(e,J,_e,k),cv.getComponentMethod("images","convertCoords")(e,J,_e,k)}var ne=B8.containerArrayMatch(T);if(ne){c=ne.array,f=ne.index;var ae=ne.property,pe=q||{editType:"calc"};f!==""&&ae===""&&(B8.isAddVal(m)?C[T]=null:B8.isRemoveVal(m)?C[T]=(Ws(r,c).get()||[])[f]:vi.warn("unrecognized full object value",t)),Rm.update(x,pe),u[c]||(u[c]={});var ie=u[c][f];ie||(ie=u[c][f]={}),ie[ae]=m,delete t[T]}else I==="reverse"?(O.range?O.range.reverse():(k(B+".autorange",!0),O.range=[1,0]),U.autorange?x.calc=!0:x.plot=!0):(T==="dragmode"&&(m===!1&&j!==!1||m!==!1&&j===!1)||n._has("scatter-like")&&n._has("regl")&&T==="dragmode"&&(m==="lasso"||m==="select")&&!(j==="lasso"||j==="select")?x.plot=!0:q?Rm.update(x,q):x.calc=!0,A.set(m))}}for(c in u){var le=B8.applyContainerArrayChanges(e,i(r,c),u[c],x,i);le||(x.plot=!0)}for(var xe in S){L=ad.getFromId(e,xe);var be=L&&L._constraintGroup;if(be){x.calc=!0;for(var De in be)S[De]||(ad.getFromId(e,De)._constraintShrinkable=!0)}}(gpe(e)||t.height||t.width)&&(x.plot=!0);var Ge=n.shapes;for(f=0;f1;)if(n.pop(),r=Ws(t,n.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function E_t(e,t){for(var r=0;r[B,e._ev.listeners(B)]);i=Eo.newPlot(e,t,r,n).then(()=>{for(let[B,O]of R)O.forEach(U=>e.on(B,U));return Eo.react(e,t,r,n)})}else{e.data=t||[],zu.cleanData(e.data),e.layout=r||{},zu.cleanLayout(e.layout),C_t(e.data,e.layout,s,l),wa.supplyDefaults(e,{skipUpdateCalc:!0});var f=e._fullData,v=e._fullLayout,g=v.datarevision===void 0,p=v.transition,_=F_t(e,l,v,g,p),x=_.newDataRevision,y=P_t(e,s,f,g,p,x);if(gpe(e)&&(_.layoutReplot=!0),y.calc||_.calc){e.calcdata=void 0;for(var C=Object.getOwnPropertyNames(v),k=0;k(c||e.emit("plotly_react",{config:n,data:t,layout:r}),e))}function P_t(e,t,r,n,a,i){var o=t.length===r.length;if(!a&&!o)return{fullReplot:!0,calc:!0};var s=Rm.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var l,u;function c(g){var p=Y8.getTraceValObject(u,g);return!u._module.animatable&&p.anim&&(p.anim=!1),p}var f={getValObject:c,flags:s,immutable:n,transition:a,newDataRevision:i,gd:e},v={};for(l=0;l=a.length?a[0]:a[u]:a}function s(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function l(u,c){var f=0;return function(){if(u&&++f===c)return u()}}return new Promise(function(u,c){function f(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var I=n._frameQueue.pop();I.onInterrupt&&I.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function v(I){if(I.length!==0){for(var R=0;Rn._timeToNext&&p()};I()}var x=0;function y(I){return Array.isArray(a)?x>=a.length?I.transitionOpts=a[x]:I.transitionOpts=a[0]:I.transitionOpts=a,x++,I}var C,k,S=[],L=t==null,w=Array.isArray(t),T=!L&&!w&&vi.isPlainObject(t);if(T)S.push({type:"object",data:y(vi.extendFlat({},t))});else if(L||["string","number"].indexOf(typeof t)!==-1)for(C=0;C0&&FF)&&E.push(k);S=E}}S.length>0?v(S):(e.emit("plotly_animated"),u())})}function R_t(e,t,r){if(e=vi.getGraphDiv(e),t==null)return Promise.resolve();if(!vi.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,a,i,o,s=e._transitionData._frames,l=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var u=s.length+t.length*2,c=[],f={};for(n=t.length-1;n>=0;n--)if(vi.isPlainObject(t[n])){var v=t[n].name,g=(l[v]||f[v]||{}).name,p=t[n].name,_=l[g]||f[g];g&&p&&typeof p=="number"&&_&&YNA.index?-1:T.index=0;n--){if(a=c[n].frame,typeof a.name=="number"&&vi.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;l[a.name="frame "+e._transitionData._counter++];);if(l[a.name]){for(i=0;i=0;r--)n=t[r],i.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:a[n]});var s=wa.modifyFrames,l=wa.modifyFrames,u=[e,o],c=[e,i];return Cd&&Cd.add(e,s,u,l,c),wa.modifyFrames(e,i)}function z_t(e){e=vi.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return wa.cleanPlot([],{},r,t),wa.purge(e),XN.purge(e),t._container&&t._container.remove(),delete e._context,e}function q_t(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!vi.equalDomRects(r,t._lastBBox)){var n=t._invTransform=vi.inverseTransformMatrix(vi.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),t._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),t._lastBBox=r}}function B_t(e){var t=N8.select(e),r=e._fullLayout;if(r._calcInverseTransform=q_t,r._calcInverseTransform(e),r._container=t.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var n={};N8.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),r._uid=vi.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(h_t.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var a=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=a.append("g").classed("imagelayer",!0),r._shapeLowerLayer=a.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var i=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=i.append("g").classed("imagelayer",!0),r._shapeUpperLayer=i.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}Eo.animate=D_t;Eo.addFrames=R_t;Eo.deleteFrames=I_t;Eo.addTraces=upe;Eo.deleteTraces=cpe;Eo.extendTraces=spe;Eo.moveTraces=ZN;Eo.prependTraces=lpe;Eo.newPlot=x_t;Eo._doPlot=p_t;Eo.purge=z_t;Eo.react=L_t;Eo.redraw=y_t;Eo.relayout=iA;Eo.restyle=G8;Eo.setPlotConfig=g_t;Eo.update=j8;Eo._guiRelayout=$N(iA);Eo._guiRestyle=$N(G8);Eo._guiUpdate=$N(j8);Eo._storeDirectGUIEdit=T_t});var ag=fe(fv=>{"use strict";var O_t=bi();fv.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("map"))?500:0};fv.getRedrawFunc=function(e){return function(){O_t.getComponentMethod("colorbar","draw")(e)}};fv.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};fv.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var mpe=window.URL||window.webkitURL;fv.createObjectURL=function(e){return mpe.createObjectURL(e)};fv.revokeObjectURL=function(e){return mpe.revokeObjectURL(e)};fv.createBlob=function(e,t){if(t==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(t==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=N_t(window.atob(e));return new window.Blob([r],{type:"image/"+t})};fv.octetStream=function(e){document.location.href="data:application/octet-stream"+e};fv.getPlotTitle=function(e){var n,a,i,o;var t=e._fullLayout;if(t){var r=(n=t.title)==null?void 0:n.text;return r===((a=t._dfltTitle)==null?void 0:a.plot)?void 0:r}return(o=(i=e.layout)==null?void 0:i.title)==null?void 0:o.text};fv.getPlotSubtitle=function(e){var n,a,i,o,s,l;var t=e._fullLayout;if(t){var r=(a=(n=t.title)==null?void 0:n.subtitle)==null?void 0:a.text;return r===((i=t._dfltTitle)==null?void 0:i.subtitle)?void 0:r}return(l=(s=(o=e.layout)==null?void 0:o.title)==null?void 0:s.subtitle)==null?void 0:l.text};function N_t(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),a=0;a{"use strict";var JN=xi(),_vr=Xt(),U_t=Ji(),V_t=ni(),bvr=ev(),KN=/"/g,Q2="TOBESTRIPPED",G_t=new RegExp(`("${Q2})|(${Q2}")|("${Q2})|(${Q2}")`,"g"),H_t=["&","&","&",""",""",""","'","'","'"],j_t=["<","<","<"],W_t=[">",">",">"];function Y_t(e){let t=JN.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,n=>{let a=n.toLowerCase();return H_t.includes(a)?n:j_t.includes(a)?"<":W_t.includes(a)?">":n.includes("<")||n.includes(">")?"":t.html(n).text()});return t.remove(),r}function X_t(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}ype.exports=function(t,r,n){var a=t._fullLayout,i=a._paper,o=a._toppaper,s=a.width,l=a.height,u;i.insert("rect",":first-child").call(U_t.setRect,0,0,s,l).call(V_t.fill,a.paper_bgcolor);var c=a._basePlotModules||[];for(u=0;u{"use strict";var Z_t=Xt(),$_t=M2().EventEmitter,oA=ag();function K_t(e){var t=e.emitter||new $_t,r=new Promise(function(n,a){var i=window.Image,o=e.svg,s=e.format||"png",l=e.canvas,u=e.scale||1,c=e.width||300,f=e.height||150,v=u*c,g=u*f,p=l.getContext("2d",{willReadFrequently:!0}),_=new i,x,y;s==="svg"||Z_t.isSafari()?y=oA.encodeSVG(o):(x=oA.createBlob(o,"svg"),y=oA.createObjectURL(x)),l.width=v,l.height=g,_.onload=function(){var C;switch(x=null,oA.revokeObjectURL(y),s!=="svg"&&p.drawImage(_,0,0,v,g),s){case"jpeg":C=l.toDataURL("image/jpeg");break;case"png":C=l.toDataURL("image/png");break;case"webp":C=l.toDataURL("image/webp");break;case"svg":C=y;break;default:var k="Image format is not jpeg, png, svg or webp.";if(a(new Error(k)),!e.promise)return t.emit("error",k)}n(C),e.promise||t.emit("success",C)},_.onerror=function(C){if(x=null,oA.revokeObjectURL(y),a(C),!e.promise)return t.emit("error",C)},_.src=y});return e.promise?r:t}xpe.exports=K_t});var eU=fe((Avr,wpe)=>{"use strict";var _pe=aa(),bpe=Z8(),J_t=Hs(),i1=Xt(),sA=ag(),Q_t=$8(),ebt=K8(),tbt=M4().version,QN={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function rbt(e,t){t=t||{};var r,n,a,i;i1.isPlainObject(e)?(r=e.data||[],n=e.layout||{},a=e.config||{},i={}):(e=i1.getGraphDiv(e),r=i1.extendDeep([],e.data),n=i1.extendDeep({},e.layout),a=e._context,i=e._fullLayout||{});function o(w){return!(w in t)||i1.validate(t[w],QN[w])}if(!o("width")&&t.width!==null||!o("height")&&t.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+i1.join2(QN.format.values,", "," or ")+".");var s={};function l(w,T){return i1.coerce(t,s,QN,w,T)}var u=l("format"),c=l("width"),f=l("height"),v=l("scale"),g=l("setBackground"),p=l("imageDataOnly"),_=document.createElement("div");_.style.position="absolute",_.style.left="-5000px",document.body.appendChild(_);var x=i1.extendFlat({},n);c?x.width=c:t.width===null&&_pe(i.width)&&(x.width=i.width),f?x.height=f:t.height===null&&_pe(i.height)&&(x.height=i.height);var y=i1.extendFlat({},a,{_exportedPlot:!0,staticPlot:!0,setBackground:g}),C=sA.getRedrawFunc(_);function k(){return new Promise(function(w){setTimeout(w,sA.getDelay(_._fullLayout))})}function S(){return new Promise(function(w,T){var A=Q_t(_,u,v),m=_._fullLayout.width,F=_._fullLayout.height;function E(){bpe.purge(_),document.body.removeChild(_)}if(u==="full-json"){var I=J_t.graphJson(_,!1,"object",!0,!0);return I.version=tbt,I=JSON.stringify(I),E(),w(p?I:sA.encodeJSON(I))}if(E(),u==="svg")return w(p?A:sA.encodeSVG(A));var R=document.createElement("canvas");R.id=i1.randstr(),ebt({format:u,width:m,height:F,scale:v,canvas:R,svg:A,promise:!0}).then(w).catch(T)})}function L(w){return p?w.replace(sA.IMAGE_URL_PREFIX,""):w}return new Promise(function(w,T){bpe.newPlot(_,r,x,y).then(C).then(k).then(S).then(function(A){w(L(A))}).catch(function(A){T(A)})})}wpe.exports=rbt});var Mpe=fe((Mvr,Ape)=>{"use strict";var hv=Xt(),nbt=Hs(),ibt=qb(),abt=im().dfltConfig,op=hv.isPlainObject,tx=Array.isArray,tU=hv.isArrayOrTypedArray;Ape.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=ibt.get(),a=[],i={_context:hv.extendFlat({},abt)},o,s;tx(t)?(i.data=hv.extendDeep([],t),o=t):(i.data=[],o=[],a.push(Wc("array","data"))),op(r)?(i.layout=hv.extendDeep({},r),s=r):(i.layout={},s={},arguments.length>1&&a.push(Wc("object","layout"))),nbt.supplyDefaults(i);for(var l=i._fullData,u=o.length,c=0;cf.length&&n.push(Wc("unused",a,u.concat(f.length)));var y=f.length,C=Array.isArray(x);C&&(y=Math.min(y,x.length));var k,S,L,w,T;if(v.dimensions===2)for(S=0;Sf[S].length&&n.push(Wc("unused",a,u.concat(S,f[S].length)));var A=f[S].length;for(k=0;k<(C?Math.min(A,x[S].length):A);k++)L=C?x[S][k]:x,w=c[S][k],T=f[S][k],hv.validate(w,L)?T!==w&&T!==+w&&n.push(Wc("dynamic",a,u.concat(S,k),w,T)):n.push(Wc("value",a,u.concat(S,k),w))}else n.push(Wc("array",a,u.concat(S),c[S]));else for(S=0;S{"use strict";var hbt=Xt(),Q8=ag();function dbt(e,t,r){var n=document.createElement("a"),a="download"in n,i=new Promise(function(o,s){var l,u;if(a)return l=Q8.createBlob(e,r),u=Q8.createObjectURL(l),n.href=u,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),Q8.revokeObjectURL(u),l=null,o(t);if(hbt.isSafari()){var c=r==="svg"?",":";base64,";return Q8.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return i}Spe.exports=dbt});var rU=fe((Evr,Ppe)=>{"use strict";var eC=Xt(),kpe=as(),vbt=eU(),pbt=Epe(),Cpe=ag(),Lpe=40;function gbt(e,t){var r;return eC.isPlainObject(e)||(r=eC.getGraphDiv(e)),t=t||{},t.format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(n,a){r&&r._snapshotInProgress&&a(new Error("Image capture already in progress.")),r&&(r._snapshotInProgress=!0);var i=vbt(e,t),o=t.filename||e.fn;if(!o){let l=Cpe.getPlotTitle(e);if(l&&!kpe.matchTex(l))o=eC.slugify(l,Lpe);else{let u=Cpe.getPlotSubtitle(e);u&&!kpe.matchTex(u)&&(o=eC.slugify(u,Lpe))}}var s=o||"plot-image";s+="."+t.format.replace("-","."),i.then(function(l){return r&&(r._snapshotInProgress=!1),pbt(l,s,t.format)}).then(function(l){n(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),a(l)})})}Ppe.exports=gbt});var zpe=fe(nU=>{"use strict";var n0=Xt(),i0=n0.isPlainObject,Fpe=qb(),Dpe=Hs(),mbt=Ho(),Rpe=So(),Ipe=im().dfltConfig;nU.makeTemplate=function(e){e=n0.isPlainObject(e)?e:n0.getGraphDiv(e),e=n0.extendDeep({_context:Ipe},{data:e.data,layout:e.layout}),Dpe.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var n={data:{},layout:{}};t.forEach(function(g){var p={};lA(g,p,xbt.bind(null,g));var _=n0.coerce(g,{},mbt,"type"),x=n.data[_];x||(x=n.data[_]=[]),x.push(p)}),lA(r,n.layout,ybt.bind(null,r)),delete n.layout.template;var a=r.template;if(i0(a)){var i=a.layout,o,s,l,u,c,f;i0(i)&&tC(i,n.layout);var v=a.data;if(i0(v)){for(s in n.data)if(l=v[s],Array.isArray(l)){for(c=n.data[s],f=c.length,u=l.length,o=0;oy?o.push({code:"unused",traceType:g,templateCount:x,dataCount:y}):y>x&&o.push({code:"reused",traceType:g,templateCount:x,dataCount:y})}}function C(k,S){for(var L in k)if(L.charAt(0)!=="_"){var w=k[L],T=dv(k,L,S);i0(w)?(Array.isArray(k)&&w._template===!1&&w.templateitemname&&o.push({code:"missing",path:T,templateitemname:w.templateitemname}),C(w,T)):Array.isArray(w)&&_bt(w)&&C(w,T)}}if(C({data:l,layout:s},""),o.length)return o.map(bbt)};function _bt(e){for(var t=0;t{"use strict";var Mc=Z8();xl._doPlot=Mc._doPlot;xl.newPlot=Mc.newPlot;xl.restyle=Mc.restyle;xl.relayout=Mc.relayout;xl.redraw=Mc.redraw;xl.update=Mc.update;xl._guiRestyle=Mc._guiRestyle;xl._guiRelayout=Mc._guiRelayout;xl._guiUpdate=Mc._guiUpdate;xl._storeDirectGUIEdit=Mc._storeDirectGUIEdit;xl.react=Mc.react;xl.extendTraces=Mc.extendTraces;xl.prependTraces=Mc.prependTraces;xl.addTraces=Mc.addTraces;xl.deleteTraces=Mc.deleteTraces;xl.moveTraces=Mc.moveTraces;xl.purge=Mc.purge;xl.addFrames=Mc.addFrames;xl.deleteFrames=Mc.deleteFrames;xl.animate=Mc.animate;xl.setPlotConfig=Mc.setPlotConfig;var wbt=Z4().getGraphDiv,Tbt=v8().eraseActiveShape;xl.deleteActiveShape=function(e){return Tbt(wbt(e))};xl.toImage=eU();xl.validate=Mpe();xl.downloadImage=rU();var qpe=zpe();xl.makeTemplate=qpe.makeTemplate;xl.validateTemplate=qpe.validateTemplate});var rx=fe((Lvr,Ope)=>{"use strict";var iU=Xt(),Abt=bi();Ope.exports=function(t,r,n,a){var i=a("x"),o=a("y"),s,l=Abt.getComponentMethod("calendars","handleTraceDefaults");if(l(t,r,["x","y"],n),i){var u=iU.minRowLength(i);o?s=Math.min(u,iU.minRowLength(o)):(s=u,a("y0"),a("dy"))}else{if(!o)return 0;s=iU.minRowLength(o),a("x0"),a("dx")}return r._length=s,s}});var sp=fe((Pvr,Vpe)=>{"use strict";var Npe=Xt().dateTick0,Mbt=Wa(),Sbt=Mbt.ONEWEEK;function Upe(e,t){return e%Sbt===0?Npe(t,1):Npe(t,0)}Vpe.exports=function(t,r,n,a,i){if(i||(i={x:!0,y:!0}),i.x){var o=a("xperiod");o&&(a("xperiod0",Upe(o,r.xcalendar)),a("xperiodalignment"))}if(i.y){var s=a("yperiod");s&&(a("yperiod0",Upe(s,r.ycalendar)),a("yperiodalignment"))}}});var jpe=fe((Fvr,Hpe)=>{"use strict";var Gpe=["orientation","groupnorm","stackgaps"];Hpe.exports=function(t,r,n,a){var i=n._scatterStackOpts,o=a("stackgroup");if(o){var s=r.xaxis+r.yaxis,l=i[s];l||(l=i[s]={});var u=l[o],c=!1;u?u.traces.push(r):(u=l[o]={traceIndices:[],traces:[r]},c=!0);for(var f={orientation:r.x&&!r.y?"h":"v"},v=0;v{"use strict";var Wpe=ni(),Ype=Wf().hasColorscale,Xpe=Vc(),Ebt=Is();Zpe.exports=function(t,r,n,a,i,o={}){var s=Ebt.isBubble(t),l=(t.line||{}).color,u;if(l&&(n=l),i("marker.symbol"),i("marker.opacity",s?.7:1),i("marker.size"),o.noAngle||(i("marker.angle"),o.noAngleRef||i("marker.angleref"),o.noStandOff||i("marker.standoff")),i("marker.color",n),Ype(t,"marker")&&Xpe(t,r,a,i,{prefix:"marker.",cLetter:"c"}),o.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),o.noLine||(l&&!Array.isArray(l)&&r.marker.color!==l?u=l:s?u=Wpe.background:u=Wpe.defaultLine,i("marker.line.color",u),Ype(t,"marker.line")&&Xpe(t,r,a,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",s?1:0),o.noLineDash||i("marker.line.dash")),s&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),o.gradient){var c=i("marker.gradient.type");c!=="none"&&i("marker.gradient.color")}}});var lp=fe((Rvr,$pe)=>{"use strict";var kbt=Xt().isArrayOrTypedArray,Cbt=Wf().hasColorscale,Lbt=Vc();$pe.exports=function(t,r,n,a,i,o){o||(o={});var s=(t.marker||{}).color;if(s&&s._inputArray&&(s=s._inputArray),i("line.color",n),Cbt(t,"line"))Lbt(t,r,a,i,{prefix:"line.",cLetter:"c"});else{var l=(kbt(s)?!1:s)||n;i("line.color",l)}i("line.width"),o.noDash||i("line.dash"),o.backoff&&i("line.backoff")}});var h3=fe((Ivr,Kpe)=>{"use strict";Kpe.exports=function(t,r,n){var a=n("line.shape");a==="spline"&&n("line.smoothing")}});var up=fe((zvr,Jpe)=>{"use strict";var Pbt=Xt();Jpe.exports=function(e,t,r,n,a){a=a||{},n("textposition"),Pbt.coerceFont(n,"textfont",a.font||r.font,a),a.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var a1=fe((qvr,e1e)=>{"use strict";var nC=ni(),Qpe=Xt().isArrayOrTypedArray;function Fbt(e){for(var t=nC.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var t1e=Xt(),Dbt=bi(),Rbt=Ol(),Ibt=r1(),d3=Is(),zbt=rx(),qbt=sp(),Bbt=jpe(),Obt=vv(),Nbt=lp(),r1e=h3(),Ubt=up(),Vbt=a1(),Gbt=Xt().coercePattern;n1e.exports=function(t,r,n,a){function i(g,p){return t1e.coerce(t,r,Rbt,g,p)}var o=zbt(t,r,a,i);if(o||(r.visible=!1),!!r.visible){qbt(t,r,a,i),i("xhoverformat"),i("yhoverformat"),i("zorder");var s=Bbt(t,r,a,i);a.scattermode==="group"&&r.orientation===void 0&&i("orientation","v");var l=!s&&o{"use strict";var Hbt=J2().getAxisGroup;a1e.exports=function(t,r,n,a,i){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],l=Hbt(n,s)+o,u=n._alignmentOpts||{},c=a("alignmentgroup"),f=u[l];f||(f=u[l]={});var v=f[c];v?v.traces.push(r):v=f[c]={traces:[r],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var g=a("offsetgroup")||"",p=v.offsetGroups,_=p[g];r._offsetIndex=0,(i!=="group"||g)&&(_||(_=p[g]={offsetIndex:Object.keys(p).length}),r._offsetIndex=_.offsetIndex)}});var aU=fe((Nvr,o1e)=>{"use strict";var jbt=Xt(),Wbt=nx(),Ybt=Ol();o1e.exports=function(t,r){var n,a,i,o=r.scattermode;function s(v){return jbt.coerce(a._input,a,Ybt,v)}if(r.scattermode==="group")for(i=0;i=0;c--){var f=t[c];if(f.type==="scatter"&&f.xaxis===l.xaxis&&f.yaxis===l.yaxis){f.opacity=void 0;break}}}}}});var l1e=fe((Uvr,s1e)=>{"use strict";var Xbt=Xt(),Zbt=ik();s1e.exports=function(e,t){function r(a,i){return Xbt.coerce(e,t,Zbt,a,i)}var n=t.barmode==="group";t.scattermode==="group"&&r("scattergap",n?t.bargap:.2)}});var cp=fe((Vvr,c1e)=>{"use strict";var $bt=aa(),u1e=Xt(),Kbt=u1e.dateTime2ms,iC=u1e.incrementMonth,Jbt=Wa(),Qbt=Jbt.ONEAVGMONTH;c1e.exports=function(t,r,n,a){if(r.type!=="date")return{vals:a};var i=t[n+"periodalignment"];if(!i)return{vals:a};var o=t[n+"period"],s;if($bt(o)){if(o=+o,o<=0)return{vals:a}}else if(typeof o=="string"&&o.charAt(0)==="M"){var l=+o.substring(1);if(l>0&&Math.round(l)===l)s=l;else return{vals:a}}for(var u=r.calendar,c=i==="start",f=i==="end",v=t[n+"period0"],g=Kbt(v,u)||0,p=[],_=[],x=[],y=a.length,C=0;Ck;)w=iC(w,-s,u);for(;w<=k;)w=iC(w,s,u);L=iC(w,-s,u)}else{for(S=Math.round((k-g)/o),w=g+S*o;w>k;)w-=o;for(;w<=k;)w+=o;L=w-o}p[C]=c?L:f?w:(L+w)/2,_[C]=L,x[C]=w}return{vals:p,starts:_,ends:x}}});var pv=fe((Gvr,h1e)=>{"use strict";var oU=Wf().hasColorscale,sU=Mh(),f1e=Is();h1e.exports=function(t,r){f1e.hasLines(r)&&oU(r,"line")&&sU(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),f1e.hasMarkers(r)&&(oU(r,"marker")&&sU(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),oU(r,"marker.line")&&sU(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var o1=fe((Hvr,d1e)=>{"use strict";var ru=Xt();d1e.exports=function(t,r){for(var n=0;n{"use strict";var v1e=Xt();p1e.exports=function(t,r){v1e.isArrayOrTypedArray(r.selectedpoints)&&v1e.tagSelected(t,r)}});var gv=fe((Wvr,w1e)=>{"use strict";var g1e=aa(),uU=Xt(),uA=Yi(),m1e=cp(),lU=Wa().BADNUM,cU=Is(),e3t=pv(),t3t=o1(),r3t=F0();function n3t(e,t){var r=e._fullLayout,n=t._xA=uA.getFromId(e,t.xaxis||"x","x"),a=t._yA=uA.getFromId(e,t.yaxis||"y","y"),i=n.makeCalcdata(t,"x"),o=a.makeCalcdata(t,"y"),s=m1e(t,n,"x",i),l=m1e(t,a,"y",o),u=s.vals,c=l.vals,f=t._length,v=new Array(f),g=t.ids,p=fU(t,r,n,a),_=!1,x,y,C,k,S,L;_1e(r,t);var w="x",T="y",A;if(p)uU.pushUnique(p.traceIndices,t.index),x=p.orientation==="v",x?(T="s",A="x"):(w="s",A="y"),S=p.stackgaps==="interpolate";else{var m=x1e(t,f);y1e(e,t,n,a,u,c,m)}var F=!!t.xperiodalignment,E=!!t.yperiodalignment;for(y=0;yy&&v[k].gap;)k--;for(L=v[k].s,C=v.length-1;C>k;C--)v[C].s=L;for(;y{"use strict";T1e.exports=aC;var i3t=Xt().distinctVals;function aC(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,n=t.posAxis._id.charAt(0),a=[],i=0;i{"use strict";M1e.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var ix=fe((Zvr,C1e)=>{"use strict";var mv=aa(),{isArrayOrTypedArray:og}=Xt(),{BADNUM:v3}=Wa(),a3t=bi(),cA=Yi(),{getAxisGroup:o3t}=J2(),oC=A1e(),{TEXTPAD:s3t}=Im(),{LINE_SPACING:l3t}=nc(),{BR_TAG_ALL:u3t}=as();function c3t(e,t){for(var r=t.xaxis,n=t.yaxis,a=e._fullLayout,i=e._fullData,o=e.calcdata,s=[],l=[],u=0;ul+o||!mv(s))}for(var c=0;cn(i))):n(e.text);let a=e.outsidetextfont.size*l3t*r+s3t;return{ppadplus:t.some(i=>i.s<0)?a:0,ppadminus:t.some(i=>i.s>=0)?a:0}}return{ppadplus:void 0,ppadminus:void 0}}function _3t(e,t,r,n){for(var a=p3(n),i=0;i{"use strict";var L1e=gv(),P1e=ix().setGroupPositions;function w3t(e,t){for(var r=t.xaxis,n=t.yaxis,a=e._fullLayout,i=e._fullData,o=e.calcdata,s=[],l=[],u=0;um[c]&&c{"use strict";var A3t=Ji(),q1e=Wa(),fA=q1e.BADNUM,B1e=q1e.LOG_CLIP,R1e=B1e+.5,I1e=B1e-.5,sC=Xt(),M3t=sC.segmentsIntersect,z1e=sC.constrain,yU=r1();O1e.exports=function(t,r){var n=r.trace||{},a=r.xaxis,i=r.yaxis,o=a.type==="log",s=i.type==="log",l=a._length,u=i._length,c=r.backoff,f=n.marker,v=r.connectGaps,g=r.baseTolerance,p=r.shape,_=p==="linear",x=n.fill&&n.fill!=="none",y=[],C=yU.minTolerance,k=t.length,S=new Array(k),L=0,w,T,A,m,F,E,I,R,B,O,U,j,q,V,K,ee;function ce(Ot){var cr=t[Ot];if(!cr)return!1;var Ct=r.linearized?a.l2p(cr.x):a.c2p(cr.x),wt=r.linearized?i.l2p(cr.y):i.c2p(cr.y);if(Ct===fA){if(o&&(Ct=a.c2p(cr.x,!0)),Ct===fA)return!1;s&&wt===fA&&(Ct*=Math.abs(a._m*u*(a._m>0?R1e:I1e)/(i._m*l*(i._m>0?R1e:I1e)))),Ct*=1e3}if(wt===fA){if(s&&(wt=i.c2p(cr.y,!0)),wt===fA)return!1;wt*=1e3}return[Ct,wt]}function me(Ot,cr,Ct,wt){var Tt=Ct-Ot,Mt=wt-cr,Lt=.5-Ot,ft=.5-cr,kt=Tt*Tt+Mt*Mt,rr=Tt*Lt+Mt*ft;if(rr>0&&rr1||Math.abs(Lt.y-Ct[0][1])>1)&&(Lt=[Lt.x,Lt.y],wt&&_e(Lt,Ot)<_e(Ct[0],Ot)?Ct.unshift(Lt):Ct.push(Lt),wt++)}return Ct}function ut(Ot){if(Ot[0]pe||Ot[1]le)return[z1e(Ot[0],ae,pe),z1e(Ot[1],ie,le)]}function et(Ot,cr){if(Ot[0]===cr[0]&&(Ot[0]===ae||Ot[0]===pe)||Ot[1]===cr[1]&&(Ot[1]===ie||Ot[1]===le))return!0}function qe(Ot,cr){var Ct=[],wt=ut(Ot),Tt=ut(cr);return wt&&Tt&&et(wt,Tt)||(wt&&Ct.push(wt),Tt&&Ct.push(Tt)),Ct}function we(Ot,cr,Ct){return function(wt,Tt){var Mt=ut(wt),Lt=ut(Tt),ft=[];if(Mt&&Lt&&et(Mt,Lt))return ft;Mt&&ft.push(Mt),Lt&&ft.push(Lt);var kt=2*sC.constrain((wt[Ot]+Tt[Ot])/2,cr,Ct)-((Mt||wt)[Ot]+(Lt||Tt)[Ot]);if(kt){var rr;Mt&&Lt?rr=kt>0==Mt[Ot]>Lt[Ot]?Mt:Lt:rr=Mt||Lt,rr[Ot]+=kt}return ft}}var Le;p==="linear"||p==="spline"?Le=ze:p==="hv"||p==="vh"?Le=qe:p==="hvh"?Le=we(0,ae,pe):p==="vhv"&&(Le=we(1,ie,le));function Ke(Ot,cr){var Ct=cr[0]-Ot[0],wt=(cr[1]-Ot[1])/Ct,Tt=(Ot[1]*cr[0]-cr[1]*Ot[0])/Ct;return Tt>0?[wt>0?ae:pe,le]:[wt>0?pe:ae,ie]}function Te(Ot){var cr=Ot[0],Ct=Ot[1],wt=cr===S[L-1][0],Tt=Ct===S[L-1][1];if(!(wt&&Tt))if(L>1){var Mt=cr===S[L-2][0],Lt=Ct===S[L-2][1];wt&&(cr===ae||cr===pe)&&Mt?Lt?L--:S[L-1]=Ot:Tt&&(Ct===ie||Ct===le)&&Lt?Mt?L--:S[L-1]=Ot:S[L++]=Ot}else S[L++]=Ot}function Ve(Ot){S[L-1][0]!==Ot[0]&&S[L-1][1]!==Ot[1]&&Te([Ge,pt]),Te(Ot),tt=null,Ge=pt=0}var $e=sC.isArrayOrTypedArray(f);function ot(Ot){if(Ot&&c&&(Ot.i=w,Ot.d=t,Ot.trace=n,Ot.marker=$e?f[Ot.i]:f,Ot.backoff=c),ye=Ot[0]/l,ue=Ot[1]/u,be=Ot[0]pe?pe:0,De=Ot[1]le?le:0,be||De){if(!L)S[L++]=[be||Ot[0],De||Ot[1]];else if(tt){var cr=Le(tt,Ot);cr.length>1&&(Ve(cr[0]),S[L++]=cr[1])}else Oe=Le(S[L-1],Ot)[0],S[L++]=Oe;var Ct=S[L-1];be&&De&&(Ct[0]!==be||Ct[1]!==De)?(tt&&(Ge!==be&&pt!==De?Te(Ge&&pt?Ke(tt,Ot):[Ge||be,pt||De]):Ge&&pt&&Te([Ge,pt])),Te([be,De])):Ge-be&&pt-De&&Te([be||Ge,De||pt]),tt=Ot,Ge=be,pt=De}else tt&&Ve(Le(tt,Ot)[0]),S[L++]=Ot}for(w=0;wJ(E,rt))break;A=E,q=B[0]*R[0]+B[1]*R[1],q>U?(U=q,m=E,I=!1):q=t.length||!E)break;ot(E),T=E}}tt&&Te([Ge||tt[0],pt||tt[1]]),y.push(S.slice(0,L))}var it=p.slice(p.length-1);if(c&&it!=="h"&&it!=="v"){for(var We=!1,mt=-1,bt=[],Yt=0;Yt{"use strict";var N1e={tonextx:1,tonexty:1,tonext:1};U1e.exports=function(t,r,n){var a,i,o,s,l,u={},c=!1,f=-1,v=0,g=-1;for(i=0;i=0?l=g:(l=g=v,v++),l{"use strict";var fp=xi(),S3t=bi(),hA=Xt(),g3=hA.ensureSingle,G1e=hA.identity,pu=Ji(),m3=Is(),E3t=xU(),k3t=_U(),lC=UT().tester;H1e.exports=function(t,r,n,a,i,o){var s,l,u=!i,c=!!i&&i.duration>0,f=k3t(t,r,n);if(s=a.selectAll("g.trace").data(f,function(g){return g[0].trace.uid}),s.enter().append("g").attr("class",function(g){return"trace scatter trace"+g[0].trace.uid}).style("stroke-miterlimit",2),s.order(),C3t(t,s,r),c){o&&(l=o());var v=fp.transition().duration(i.duration).ease(i.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});v.each(function(){a.selectAll("g.trace").each(function(g,p){V1e(t,p,r,g,f,this,i)})})}else s.each(function(g,p){V1e(t,p,r,g,f,this,i)});u&&s.exit().remove(),a.selectAll("path:not([d])").remove()};function C3t(e,t,r){t.each(function(n){var a=g3(fp.select(this),"g","fills");pu.setClipUrl(a,r.layerClipId,e);var i=n[0].trace;i._ownFill=null,i._nextFill=null;var o=[];i._ownfill&&o.push("_ownFill"),i._nexttrace&&o.push("_nextFill");var s=a.selectAll("g").data(o,G1e);s.enter().append("g"),s.exit().remove(),s.order().each(function(l){i[l]=g3(fp.select(this),"path","js-fill")})})}function V1e(e,t,r,n,a,i,o){var s=e._context.staticPlot,l;L3t(e,t,r,n,a);var u=!!o&&o.duration>0;function c(we){return u?we.transition():we}var f=r.xaxis,v=r.yaxis,g=n[0].trace,p=g.line,_=fp.select(i),x=g3(_,"g","errorbars"),y=g3(_,"g","lines"),C=g3(_,"g","points"),k=g3(_,"g","text");if(S3t.getComponentMethod("errorbars","plot")(e,x,r,o),g.visible!==!0)return;c(_).style("opacity",g.opacity);var S,L,w=g.fill.charAt(g.fill.length-1);w!=="x"&&w!=="y"&&(w="");var T,A;w==="y"?(T=1,A=v.c2p(0,!0)):w==="x"&&(T=0,A=f.c2p(0,!0)),n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=_;var m="",F=[],E=g._prevtrace,I=null,R=null;E&&(m=E._prevRevpath||"",L=E._nextFill,F=E._ownPolygons,I=E._fillsegments,R=E._fillElement);var B,O,U="",j="",q,V,K,ee,ce,me,ye=[];g._polygons=[];var ue=[],J=[],_e=hA.noop;if(S=g._ownFill,m3.hasLines(g)||g.fill!=="none"){L&&L.datum(n),["hv","vh","hvh","vhv"].indexOf(p.shape)!==-1?(q=pu.steps(p.shape),V=pu.steps(p.shape.split("").reverse().join(""))):p.shape==="spline"?q=V=function(we){var Le=we[we.length-1];return we.length>1&&we[0][0]===Le[0]&&we[0][1]===Le[1]?pu.smoothclosed(we.slice(1),p.smoothing):pu.smoothopen(we,p.smoothing)}:q=V=function(we){return"M"+we.join("L")},K=function(we){return V(we.reverse())},J=E3t(n,{xaxis:f,yaxis:v,trace:g,connectGaps:g.connectgaps,baseTolerance:Math.max(p.width||1,3)/4,shape:p.shape,backoff:p.backoff,simplify:p.simplify,fill:g.fill}),ue=new Array(J.length);var ne=0;for(l=0;l=s[0]&&_.x<=s[1]&&_.y>=l[0]&&_.y<=l[1]}),v=Math.ceil(f.length/c),g=0;a.forEach(function(_,x){var y=_[0].trace;m3.hasMarkers(y)&&y.marker.maxdisplayed>0&&x{"use strict";j1e.exports={container:"marker",min:"cmin",max:"cmax"}});var cC=fe((tpr,W1e)=>{"use strict";var uC=Yi();W1e.exports=function(t,r,n){var a={},i={_fullLayout:n},o=uC.getFromTrace(i,r,"x"),s=uC.getFromTrace(i,r,"y"),l=t.orig_x;l===void 0&&(l=t.x);var u=t.orig_y;return u===void 0&&(u=t.y),a.xLabel=uC.tickText(o,o.c2l(l),!0).text,a.yLabel=uC.tickText(s,s.c2l(u),!0).text,a}});var Ld=fe((rpr,Y1e)=>{"use strict";var bU=xi(),x3=Ji(),P3t=bi();function F3t(e){var t=bU.select(e).selectAll("g.trace.scatter");t.style("opacity",function(r){return r[0].trace.opacity}),t.selectAll("g.points").each(function(r){var n=bU.select(this),a=r.trace||r[0].trace;wU(n,a,e)}),t.selectAll("g.text").each(function(r){var n=bU.select(this),a=r.trace||r[0].trace;TU(n,a,e)}),t.selectAll("g.trace path.js-line").call(x3.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(x3.fillGroupStyle,e,!1),P3t.getComponentMethod("errorbars","style")(t)}function wU(e,t,r){x3.pointStyle(e.selectAll("path.point"),t,r)}function TU(e,t,r){x3.textPointStyle(e.selectAll("text"),t,r)}function D3t(e,t,r){var n=t[0].trace;n.selectedpoints?(x3.selectedPointStyle(r.selectAll("path.point"),n),x3.selectedTextStyle(r.selectAll("text"),n)):(wU(r,n,e),TU(r,n,e))}Y1e.exports={style:F3t,stylePoints:wU,styleText:TU,styleOnSelect:D3t}});var b3=fe((npr,X1e)=>{"use strict";var _3=ni(),R3t=Is();X1e.exports=function(t,r){var n,a;if(t.mode==="lines")return n=t.line.color,n&&_3.opacity(n)?n:t.fillcolor;if(t.mode==="none")return t.fill?t.fillcolor:"";var i=r.mcc||r.mc||(t.marker||{}).color,o=r.mlcc||((t.marker||{}).line||{}).color;return a=i&&_3.opacity(i)?i:o&&_3.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",a?_3.opacity(a)<.3?_3.addOpacity(a,.3):a:(n=(t.line||{}).color,n&&_3.opacity(n)&&R3t.hasLines(t)&&t.line.width?n:t.fillcolor)}});var w3=fe((ipr,$1e)=>{"use strict";var fC=Xt(),Z1e=kl(),I3t=bi(),z3t=b3(),AU=ni(),q3t=fC.fillText;$1e.exports=function(t,r,n,a){var i=t.cd,o=i[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=[u,c],v=o.hoveron||"",g=o.mode.indexOf("markers")!==-1?3:.5,p=!!o.xperiodalignment,_=!!o.yperiodalignment;if(v.indexOf("points")!==-1){var x=function(j){if(p){var q=s.c2p(j.xStart),V=s.c2p(j.xEnd);return u>=Math.min(q,V)&&u<=Math.max(q,V)?0:1/0}var K=Math.max(3,j.mrc||0),ee=1-1/K,ce=Math.abs(s.c2p(j.x)-u);return ce=Math.min(q,V)&&c<=Math.max(q,V)?0:1/0}var K=Math.max(3,j.mrc||0),ee=1-1/K,ce=Math.abs(l.c2p(j.y)-c);return ceye!=le>=ye&&(ae=_e[J-1][0],pe=_e[J][0],le-ie&&(ne=ae+(pe-ae)*(ye-ie)/(le-ie),K=Math.min(K,ne),ee=Math.max(ee,ne)));return K=Math.max(K,0),ee=Math.min(ee,s._length),{x0:K,x1:ee,y0:ye,y1:ye}}if(v.indexOf("fills")!==-1&&o._fillElement){var B=I(o._fillElement)&&!I(o._fillExclusionElement);if(B){var O=R(o._polygons);O===null&&(O={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var U=AU.defaultLine;return AU.opacity(o.fillcolor)?U=o.fillcolor:AU.opacity((o.line||{}).color)&&(U=o.line.color),fC.extendFlat(t,{distance:t.maxHoverDistance,x0:O.x0,x1:O.x1,y0:O.y0,y1:O.y1,color:U,hovertemplate:!1}),delete t.index,o.text&&!fC.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var ax=fe((apr,J1e)=>{"use strict";var K1e=Is();J1e.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].trace,l,u,c,f,v=s.mode&&!K1e.hasMarkers(s)&&!K1e.hasText(s);if(v)return[];if(r===!1)for(l=0;l{"use strict";Q1e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var SU=fe((spr,nge)=>{"use strict";var hC=bi().traceIs,MU=Yb();nge.exports=function(t,r,n,a){n("autotypenumbers",a.autotypenumbersDflt);var i=n("type",(a.splomStash||{}).type);i==="-"&&(B3t(r,a.data),r.type==="-"?r.type="linear":t.type=r.type)};function B3t(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),a;r.indexOf("scene")!==-1&&(r=n);var i=O3t(t,r,n);if(i){if(i.type==="histogram"&&n==={v:"y",h:"x"}[i.orientation||"v"]){e.type="linear";return}var o=n+"calendar",s=i[o],l={noMultiCategory:!hC(i,"cartesian")||hC(i,"noMultiCategory")};if(i.type==="box"&&i._hasPreCompStats&&n==={h:"x",v:"y"}[i.orientation||"v"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,rge(i,n)){var u=tge(i),c=[];for(a=0;a0&&(a["_"+r+"axes"]||{})[t])return a;if((a[r+"axis"]||r)===t){if(rge(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}function tge(e){return{v:"x",h:"y"}[e.orientation||"v"]}function rge(e,t){var r=tge(e),n=hC(e,"box-violin");return n&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var dC=fe((lpr,ige)=>{"use strict";var N3t=Gf().isTypedArraySpec;function U3t(e,t){var r=t.dataAttr||e._id.charAt(0),n={},a,i,o;if(t.axData)a=t.axData;else for(a=[],i=0;i0||N3t(i),s;o&&(s="array");var l=n("categoryorder",s),u;l==="array"&&(u=n("categoryarray")),!o&&l==="array"&&(l=r.categoryorder="trace"),l==="trace"?r._initialCategories=[]:l==="array"?r._initialCategories=u.slice():(u=U3t(r,a).sort(),l==="category ascending"?r._initialCategories=u:l==="category descending"&&(r._initialCategories=u.reverse()))}}});var dA=fe((upr,oge)=>{"use strict";var age=ni(),V3t=tc(),G3t=Xt();oge.exports=function(t,r,n,a){a=a||{};var i=a.dfltColor;function o(A,m){return G3t.coerce2(t,r,a.attributes,A,m)}var s=o("linecolor",i),l=o("linewidth"),u=n("showline",a.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=age.mix(i,a.bgColor,a.blend||V3t.lightFraction),f=o("gridcolor",c),v=o("gridwidth"),g=o("griddash"),p=n("showgrid",a.showGrid||!!f||!!v||!!g);if(p||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),a.hasMinor){var _=age.mix(r.gridcolor,a.bgColor,67),x=o("minor.gridcolor",_),y=o("minor.gridwidth",r.gridwidth||1),C=o("minor.griddash",r.griddash||"solid"),k=n("minor.showgrid",!!x||!!y||!!C);k||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!a.noZeroLine){var S=o("zerolinelayer"),L=o("zerolinecolor",i),w=o("zerolinewidth"),T=n("zeroline",a.showGrid||!!L||!!w);T||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}});var pA=fe((cpr,hge)=>{"use strict";var sge=aa(),H3t=bi(),vA=Xt(),j3t=So(),W3t=Ah(),EU=pf(),lge=F2(),uge=Ub(),Y3t=gm(),X3t=mm(),Z3t=dC(),$3t=dA(),K3t=gO(),cge=Hp(),vC=rc().WEEKDAY_PATTERN,J3t=rc().HOUR_PATTERN;hge.exports=function(t,r,n,a,i){var o=a.letter,s=a.font||{},l=a.splomStash||{},u=n("visible",!a.visibleDflt),c=r._template||{},f=r.type||c.type||"-",v;if(f==="date"){var g=H3t.getComponentMethod("calendars","handleDefaults");g(t,r,"calendar",a.calendar),a.noTicklabelmode||(v=n("ticklabelmode"))}!a.noTicklabelindex&&(f==="date"||f==="linear")&&n("ticklabelindex");var p="";(!a.noTicklabelposition||f==="multicategory")&&(p=vA.coerce(t,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),a.noTicklabeloverflow||n("ticklabeloverflow",p.indexOf("inside")!==-1?"hide past domain":f==="category"||f==="multicategory"?"allow":"hide past div"),cge(r,i),K3t(t,r,n,a),Z3t(t,r,n,a),a.noHover||(f!=="category"&&n("hoverformat"),a.noUnifiedhovertitle||n("unifiedhovertitle.text"));var _=n("color"),x=_!==EU.color.dflt?_:s.color,y=l.label||i._dfltTitle[o];if(X3t(t,r,n,f,a),!u)return r;n("title.text",y),vA.coerceFont(n,"title.font",s,{overrideDflt:{size:vA.bigFont(s.size),color:x}}),lge(t,r,n,f);var C=a.hasMinor;if(C&&(j3t.newContainer(r,"minor"),lge(t,r,n,f,{isMinor:!0})),Y3t(t,r,n,f,a),uge(t,r,n,a),C){var k=a.isMinor;a.isMinor=!0,uge(t,r,n,a),a.isMinor=k}$3t(t,r,n,{dfltColor:_,bgColor:a.bgColor,showGrid:a.showGrid,hasMinor:C,attributes:EU}),C&&r.ticklabelindex==null&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&n("mirror");var S=f==="multicategory";if(!a.noTickson&&(f==="category"||S)&&(r.ticks||r.showgrid)&&(S?(n("tickson","boundaries"),delete r.ticklabelposition):n("tickson")),S){var L=n("showdividers");L&&(n("dividercolor"),n("dividerwidth"))}if(f==="date")if(W3t(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:Q3t}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var w=0;w=2){var o="",s,l;if(i.length===2){for(s=0;s<2;s++)if(l=fge(i[s]),l){o=vC;break}}var u=n("pattern",o);if(u===vC)for(s=0;s<2;s++)l=fge(i[s]),l&&(t.bounds[s]=i[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=i[s],u){case vC:if(!sge(l)){t.enabled=!1;return}if(l=+l,l!==Math.floor(l)||l<0||l>=7){t.enabled=!1;return}t.bounds[s]=i[s]=l;break;case J3t:if(!sge(l)){t.enabled=!1;return}if(l=+l,l<0||l>24){t.enabled=!1;return}t.bounds[s]=i[s]=l;break}if(r.autorange===!1){var c=r.range;if(c[0]c[1]){t.enabled=!1;return}}else if(i[0]>c[0]&&i[1]{"use strict";var twt=aa(),pC=Xt();dge.exports=function(t,r,n,a){var i=a.counterAxes||[],o=a.overlayableAxes||[],s=a.letter,l=a.grid,u=a.overlayingDomain,c,f,v,g,p,_;l&&(f=l._domains[s][l._axisMap[r._id]],c=l._anchors[r._id],f&&(v=l[s+"side"].split(" ")[0],g=l.domain[s][v==="right"||v==="top"?1:0])),f=f||[0,1],c=c||(twt(t.position)?"free":i[0]||"free"),v=v||(s==="x"?"bottom":"left"),g=g||0,p=0,_=!1;var x=pC.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(i),dflt:c}},"anchor"),y=pC.coerce(t,r,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:v}},"side");if(x==="free"){if(s==="y"){var C=n("autoshift");C&&(g=y==="left"?u[0]:u[1],_=r.automargin?r.automargin:!0,p=y==="left"?-3:3),n("shift",p)}n("position",g)}n("automargin",_);var k=!1;if(o.length&&(k=pC.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!k){var S=n("domain",f);S[0]>S[1]-1/4096&&(r.domain=f),pC.noneOrAll(t.domain,r.domain,f),r.tickmode==="sync"&&(r.tickmode="auto")}return n("layer"),r}});var wge=fe((hpr,bge)=>{"use strict";var ox=Xt(),vge=ni(),rwt=Sd().isUnifiedHover,nwt=VO(),pge=So(),iwt=Sb(),gge=pf(),awt=SU(),mge=pA(),owt=J2(),yge=gC(),CU=El(),s1=CU.id2name,xge=CU.name2id,swt=rc().AX_ID_PATTERN,_ge=bi(),mC=_ge.traceIs,kU=_ge.getComponentMethod;function yC(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}bge.exports=function(t,r,n){var a=r.autotypenumbers,i={},o={},s={},l={},u={},c={},f={},v={},g={},p={},_,x;for(_=0;_{"use strict";var lwt=xi(),Tge=bi(),xC=Xt(),D0=Ji(),_C=Yi();Age.exports=function(t,r,n,a){var i=t._fullLayout;if(r.length===0){_C.redrawComponents(t);return}function o(x){var y=x.xaxis,C=x.yaxis;i._defs.select("#"+x.clipId+"> rect").call(D0.setTranslate,0,0).call(D0.setScale,1,1),x.plot.call(D0.setTranslate,y._offset,C._offset).call(D0.setScale,1,1);var k=x.plot.selectAll(".scatterlayer .trace");k.selectAll(".point").call(D0.setPointGroupScale,1,1),k.selectAll(".textpoint").call(D0.setTextPointsScale,1,1),k.call(D0.hideOutsideRangePoints,x)}function s(x,y){var C=x.plotinfo,k=C.xaxis,S=C.yaxis,L=k._length,w=S._length,T=!!x.xr1,A=!!x.yr1,m=[];if(T){var F=xC.simpleMap(x.xr0,k.r2l),E=xC.simpleMap(x.xr1,k.r2l),I=F[1]-F[0],R=E[1]-E[0];m[0]=(F[0]*(1-y)+y*E[0]-F[0])/(F[1]-F[0])*L,m[2]=L*(1-y+y*R/I),k.range[0]=k.l2r(F[0]*(1-y)+y*E[0]),k.range[1]=k.l2r(F[1]*(1-y)+y*E[1])}else m[0]=0,m[2]=L;if(A){var B=xC.simpleMap(x.yr0,S.r2l),O=xC.simpleMap(x.yr1,S.r2l),U=B[1]-B[0],j=O[1]-O[0];m[1]=(B[1]*(1-y)+y*O[1]-B[1])/(B[0]-B[1])*w,m[3]=w*(1-y+y*j/U),S.range[0]=k.l2r(B[0]*(1-y)+y*O[0]),S.range[1]=S.l2r(B[1]*(1-y)+y*O[1])}else m[1]=0,m[3]=w;_C.drawOne(t,k,{skipTitle:!0}),_C.drawOne(t,S,{skipTitle:!0}),_C.redrawComponents(t,[k._id,S._id]);var q=T?L/m[2]:1,V=A?w/m[3]:1,K=T?m[0]:0,ee=A?m[1]:0,ce=T?m[0]/m[2]*L:0,me=A?m[1]/m[3]*w:0,ye=k._offset-ce,ue=S._offset-me;C.clipRect.call(D0.setTranslate,K,ee).call(D0.setScale,1/q,1/V),C.plot.call(D0.setTranslate,ye,ue).call(D0.setScale,q,V),D0.setPointGroupScale(C.zoomScalePts,1/q,1/V),D0.setTextPointsScale(C.zoomScaleTxt,1/q,1/V)}var l;a&&(l=a());function u(){for(var x={},y=0;yn.duration?(u(),g=window.cancelAnimationFrame(_)):g=window.requestAnimationFrame(_)}return f=Date.now(),g=window.requestAnimationFrame(_),Promise.resolve()}});var gu=fe(Eh=>{"use strict";var wC=xi(),Sge=bi(),sx=Xt(),uwt=Hs(),cwt=Ji(),Ege=jf().getModuleCalcData,zm=El(),hp=rc(),fwt=ev(),Yo=sx.ensureSingle;function bC(e,t,r){return sx.ensureSingle(e,t,r,function(n){n.datum(r)})}var lx=hp.zindexSeparator;Eh.name="cartesian";Eh.attr=["xaxis","yaxis"];Eh.idRoot=["x","y"];Eh.idRegex=hp.idRegex;Eh.attrRegex=hp.attrRegex;Eh.attributes=ege();Eh.layoutAttributes=pf();Eh.supplyLayoutDefaults=wge();Eh.transitionAxes=Mge();Eh.finalizeSubplots=function(e,t){var r=t._subplots,n=r.xaxis,a=r.yaxis,i=r.cartesian,o=i,s={},l={},u,c,f;for(u=0;u0){var g=v.id;if(g.indexOf(lx)!==-1)continue;g+=lx+(u+1),v=sx.extendFlat({},v,{id:g,plot:a._cartesianlayer.selectAll(".subplot").select("."+g)})}for(var p=[],_,x=0;x1&&(L+=lx+S),k.push(s+L),o=0;o1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=Yo(n,"path","xlines-above"),t.ylines=Yo(n,"path","ylines-above"),t.xaxislayer=Yo(n,"g","xaxislayer-above"),t.yaxislayer=Yo(n,"g","yaxislayer-above");else{if(!o){var v=Yo(n,"g","layer-subplot");t.shapelayer=Yo(v,"g","shapelayer"),t.imagelayer=Yo(v,"g","imagelayer"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=Yo(n,"g","minor-gridlayer"),t.gridlayer=Yo(n,"g","gridlayer"),t.zerolinelayer=Yo(n,"g","zerolinelayer"));var g=Yo(n,"g","layer-between");t.shapelayerBetween=Yo(g,"g","shapelayer"),t.imagelayerBetween=Yo(g,"g","imagelayer"),Yo(n,"path","xlines-below"),Yo(n,"path","ylines-below"),t.overlinesBelow=Yo(n,"g","overlines-below"),Yo(n,"g","xaxislayer-below"),Yo(n,"g","yaxislayer-below"),t.overaxesBelow=Yo(n,"g","overaxes-below")}t.overplot=Yo(n,"g","overplot"),t.plot=Yo(t.overplot,"g",a),f&&c?t.zerolinelayerAbove=f.zerolinelayerAbove:t.zerolinelayerAbove=Yo(n,"g","zerolinelayer-above"),o||(t.xlines=Yo(n,"path","xlines-above"),t.ylines=Yo(n,"path","ylines-above"),t.overlinesAbove=Yo(n,"g","overlines-above"),Yo(n,"g","xaxislayer-above"),Yo(n,"g","yaxislayer-above"),t.overaxesAbove=Yo(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+s),t.ylines=n.select(".ylines-"+l),t.xaxislayer=n.select(".xaxislayer-"+s),t.yaxislayer=n.select(".yaxislayer-"+l))}else{var p=f.plotgroup,_=a+"-x",x=a+"-y";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,t.zerolinelayerAbove=f.zerolinelayerAbove,Yo(f.overlinesBelow,"path",_),Yo(f.overlinesBelow,"path",x),Yo(f.overaxesBelow,"g",_),Yo(f.overaxesBelow,"g",x),t.plot=Yo(f.overplot,"g",a),Yo(f.overlinesAbove,"path",_),Yo(f.overlinesAbove,"path",x),Yo(f.overaxesAbove,"g",_),Yo(f.overaxesAbove,"g",x),t.xlines=p.select(".overlines-"+s).select("."+_),t.ylines=p.select(".overlines-"+l).select("."+x),t.xaxislayer=p.select(".overaxes-"+s).select("."+_),t.yaxislayer=p.select(".overaxes-"+l).select("."+x)}o||(u||(bC(t.minorGridlayer,"g",t.xaxis._id),bC(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(y){return y[0]}).sort(zm.idSort),bC(t.gridlayer,"g",t.xaxis._id),bC(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(y){return y[0]}).sort(zm.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function Lge(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=wC.select(this);c.remove(),Pge(u,t),r[u]=!0});for(var n in t._plots)for(var a=t._plots[n],i=a.overlays||[],o=0;o{"use strict";var TC=Is();Fge.exports={hasLines:TC.hasLines,hasMarkers:TC.hasMarkers,hasText:TC.hasText,isBubble:TC.isBubble,attributes:Ol(),layoutAttributes:ik(),supplyDefaults:i1e(),crossTraceDefaults:aU(),supplyLayoutDefaults:l1e(),calc:gv().calc,crossTraceCalc:D1e(),arraysToCalcdata:o1(),plot:y3(),colorbar:Zf(),formatLabels:cC(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:w3(),selectPoints:ax(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:gu(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var zge=fe((gpr,Ige)=>{"use strict";var dwt=xi(),vwt=ni(),Rge=PN(),LU=Xt(),pwt=LU.strScale,gwt=LU.strRotate,mwt=LU.strTranslate;Ige.exports=function(t,r,n){var a=t.node(),i=Rge[n.arrowhead||0],o=Rge[n.startarrowhead||0],s=(n.arrowwidth||1)*(n.arrowsize||1),l=(n.arrowwidth||1)*(n.startarrowsize||1),u=r.indexOf("start")>=0,c=r.indexOf("end")>=0,f=i.backoff*s+n.standoff,v=o.backoff*l+n.startstandoff,g,p,_,x;if(a.nodeName==="line"){g={x:+t.attr("x1"),y:+t.attr("y1")},p={x:+t.attr("x2"),y:+t.attr("y2")};var y=g.x-p.x,C=g.y-p.y;if(_=Math.atan2(C,y),x=_+Math.PI,f&&v&&f+v>Math.sqrt(y*y+C*C)){B();return}if(f){if(f*f>y*y+C*C){B();return}var k=f*Math.cos(_),S=f*Math.sin(_);p.x+=k,p.y+=S,t.attr({x2:p.x,y2:p.y})}if(v){if(v*v>y*y+C*C){B();return}var L=v*Math.cos(_),w=v*Math.sin(_);g.x-=L,g.y-=w,t.attr({x1:g.x,y1:g.y})}}else if(a.nodeName==="path"){var T=a.getTotalLength(),A="";if(T{"use strict";var qge=xi(),PU=bi(),ywt=Hs(),Bm=Xt(),FU=Bm.strTranslate,mA=Yi(),ux=ni(),sg=Ji(),Bge=kl(),DU=as(),RU=np(),gA=ed(),xwt=So().arrayEditor,_wt=zge();Uge.exports={draw:bwt,drawOne:Oge,drawRaw:Nge};function bwt(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?Tt="right":Tt="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Tt]}for(var ie=!1,le=["x","y"],xe=0;xe1)&&(Ge===De?(rt=pt.r2fraction(t["a"+be]),(rt<0||rt>1)&&(ie=!0)):ie=!0),Le=pt._offset+pt.r2p(t[be]),Ve=.5}else{var it=ot==="domain";be==="x"?(Te=t[be],Le=it?pt._offset+pt._length*Te:Le=s.l+s.w*Te):(Te=1-t[be],Le=it?pt._offset+pt._length*Te:Le=s.t+s.h*Te),Ve=t.showarrow?.5:Te}if(t.showarrow){we.head=Le;var We=t["a"+be];if($e=Oe*pe(.5,t.xanchor)-ze*pe(.5,t.yanchor),Ge===De){var mt=mA.getRefType(Ge);mt==="domain"?(be==="y"&&(We=1-We),we.tail=pt._offset+pt._length*We):mt==="paper"?be==="y"?(We=1-We,we.tail=s.t+s.h*We):we.tail=s.l+s.w*We:we.tail=pt._offset+pt.r2p(We),Ke=$e}else we.tail=Le+We,Ke=$e+We;we.text=we.tail+$e;var bt=o[be==="x"?"width":"height"];if(De==="paper"&&(we.head=Bm.constrain(we.head,1,bt-1)),Ge==="pixel"){var Yt=-Math.max(we.tail-3,we.text),jt=Math.min(we.tail+3,we.text)-bt;Yt>0?(we.tail+=Yt,we.text+=Yt):jt>0&&(we.tail-=jt,we.text-=jt)}we.tail+=qe,we.head+=qe}else $e=ut*pe(Ve,et),Ke=$e,we.text=Le+$e;we.text+=qe,$e+=qe,Ke+=qe,t["_"+be+"padplus"]=ut/2+Ke,t["_"+be+"padminus"]=ut/2-Ke,t["_"+be+"size"]=ut,t["_"+be+"shift"]=$e}if(ie){T.remove();return}var mr=0,or=0;if(t.align!=="left"&&(mr=(J-ye)*(t.align==="center"?.5:1)),t.valign!=="top"&&(or=(_e-ue)*(t.valign==="middle"?.5:1)),ce)ee.select("svg").attr({x:F+mr-1,y:F+or}).call(sg.setClipUrl,I?_:null,e);else{var fr=F+or-me.top,Ot=F+mr-me.left;U.call(DU.positionText,Ot,fr).call(sg.setClipUrl,I?_:null,e)}R.select("rect").call(sg.setRect,F,F,J,_e),E.call(sg.setRect,A/2,A/2,ne-A,ae-A),T.call(sg.setTranslate,Math.round(x.x.text-ne/2),Math.round(x.y.text-ae/2)),k.attr({transform:"rotate("+y+","+x.x.text+","+x.y.text+")"});var cr=function(wt,Tt){C.selectAll(".annotation-arrow-g").remove();var Mt=x.x.head,Lt=x.y.head,ft=x.x.tail+wt,kt=x.y.tail+Tt,rr=x.x.text+wt,pr=x.y.text+Tt,Kr=Bm.rotationXYMatrix(y,rr,pr),Nr=Bm.apply2DTransform(Kr),dn=Bm.apply2DTransform2(Kr),xr=+E.attr("width"),Fr=+E.attr("height"),Zr=rr-.5*xr,Cn=Zr+xr,Dt=pr-.5*Fr,At=Dt+Fr,Vt=[[Zr,Dt,Zr,At],[Zr,At,Cn,At],[Cn,At,Cn,Dt],[Cn,Dt,Zr,Dt]].map(dn);if(!Vt.reduce(function(ha,va){return ha^!!Bm.segmentsIntersect(Mt,Lt,Mt+1e6,Lt+1e6,va[0],va[1],va[2],va[3])},!1)){Vt.forEach(function(ha){var va=Bm.segmentsIntersect(ft,kt,Mt,Lt,ha[0],ha[1],ha[2],ha[3]);va&&(ft=va.x,kt=va.y)});var Qt=t.arrowwidth,Ut=t.arrowcolor,_r=t.arrowside,rn=C.append("g").style({opacity:ux.opacity(Ut)}).classed("annotation-arrow-g",!0),Jr=rn.append("path").attr("d","M"+ft+","+kt+"L"+Mt+","+Lt).style("stroke-width",Qt+"px").call(ux.stroke,ux.rgb(Ut));if(_wt(Jr,_r,t),l.annotationPosition&&Jr.node().parentNode&&!n){var qn=Mt,ri=Lt;if(t.standoff){var Jn=Math.sqrt(Math.pow(Mt-ft,2)+Math.pow(Lt-kt,2));qn+=t.standoff*(ft-Mt)/Jn,ri+=t.standoff*(kt-Lt)/Jn}var Ii=rn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(ft-qn)+","+(kt-ri),transform:FU(qn,ri)}).style("stroke-width",Qt+6+"px").call(ux.stroke,"rgba(0,0,0,0)").call(ux.fill,"rgba(0,0,0,0)"),Vi,ra;gA.init({element:Ii.node(),gd:e,prepFn:function(){var ha=sg.getTranslate(T);Vi=ha.x,ra=ha.y,a&&a.autorange&&v(a._name+".autorange",!0),i&&i.autorange&&v(i._name+".autorange",!0)},moveFn:function(ha,va){var Xi=Nr(Vi,ra),oa=Xi[0]+ha,Ma=Xi[1]+va;T.call(sg.setTranslate,oa,Ma),g("x",qm(a,ha,"x",s,t)),g("y",qm(i,va,"y",s,t)),t.axref===t.xref&&g("ax",qm(a,ha,"ax",s,t)),t.ayref===t.yref&&g("ay",qm(i,va,"ay",s,t)),rn.attr("transform",FU(ha,va)),k.attr({transform:"rotate("+y+","+oa+","+Ma+")"})},doneFn:function(){PU.call("_guiRelayout",e,p());var ha=document.querySelector(".js-notes-box-panel");ha&&ha.redraw(ha.selectedObj)}})}}};if(t.showarrow&&cr(0,0),S){var Ct;gA.init({element:T.node(),gd:e,prepFn:function(){Ct=k.attr("transform")},moveFn:function(wt,Tt){var Mt="pointer";if(t.showarrow)t.axref===t.xref?g("ax",qm(a,wt,"ax",s,t)):g("ax",t.ax+wt),t.ayref===t.yref?g("ay",qm(i,Tt,"ay",s.w,t)):g("ay",t.ay+Tt),cr(wt,Tt);else{if(n)return;var Lt,ft;if(a)Lt=qm(a,wt,"x",s,t);else{var kt=t._xsize/s.w,rr=t.x+(t._xshift-t.xshift)/s.w-kt/2;Lt=gA.align(rr+wt/s.w,kt,0,1,t.xanchor)}if(i)ft=qm(i,Tt,"y",s,t);else{var pr=t._ysize/s.h,Kr=t.y-(t._yshift+t.yshift)/s.h-pr/2;ft=gA.align(Kr-Tt/s.h,pr,0,1,t.yanchor)}g("x",Lt),g("y",ft),(!a||!i)&&(Mt=gA.getCursor(a?.5:Lt,i?.5:ft,t.xanchor,t.yanchor))}k.attr({transform:FU(wt,Tt)+Ct}),RU(T,Mt)},clickFn:function(wt,Tt){t.captureevents&&e.emit("plotly_clickannotation",w(Tt))},doneFn:function(){RU(T),PU.call("_guiRelayout",e,p());var wt=document.querySelector(".js-notes-box-panel");wt&&wt.redraw(wt.selectedObj)}})}}l.annotationText?U.call(DU.makeEditable,{delegate:T,gd:e}).call(j).on("edit",function(V){t.text=V,this.call(j),g("text",V),a&&a.autorange&&v(a._name+".autorange",!0),i&&i.autorange&&v(i._name+".autorange",!0),PU.call("_guiRelayout",e,p())}):U.call(j)}});var Yge=fe((ypr,Wge)=>{"use strict";var Vge=Xt(),wwt=bi(),Gge=So().arrayEditor;Wge.exports={hasClickToShow:Twt,onClick:Awt};function Twt(e,t){var r=jge(e,t);return r.on.length>0||r.explicitOff.length>0}function Awt(e,t){var r=jge(e,t),n=r.on,a=r.off.concat(r.explicitOff),i={},o=e._fullLayout.annotations,s,l;if(n.length||a.length){for(s=0;s{"use strict";var IU=Xt(),T3=ni();Xge.exports=function(t,r,n,a){a("opacity");var i=a("bgcolor"),o=a("bordercolor"),s=T3.opacity(o);a("borderpad");var l=a("borderwidth"),u=a("showarrow");a("text",u?" ":n._dfltTitle.annotation),a("textangle"),IU.coerceFont(a,"font",n.font),a("width"),a("align");var c=a("height");if(c&&a("valign"),u){var f=a("arrowside"),v,g;f.indexOf("end")!==-1&&(v=a("arrowhead"),g=a("arrowsize")),f.indexOf("start")!==-1&&(a("startarrowhead",v),a("startarrowsize",g)),a("arrowcolor",s?r.bordercolor:T3.defaultLine),a("arrowwidth",(s&&l||1)*2),a("standoff"),a("startstandoff")}var p=a("hovertext"),_=n.hoverlabel||{};if(p){var x=a("hoverlabel.bgcolor",_.bgcolor||(T3.opacity(i)?T3.rgb(i):T3.defaultLine)),y=a("hoverlabel.bordercolor",_.bordercolor||T3.contrast(x)),C=IU.extendFlat({},_.font);C.color||(C.color=y),IU.coerceFont(a,"hoverlabel.font",C)}a("captureevents",!!p)}});var $ge=fe((_pr,Zge)=>{"use strict";var qU=Xt(),cx=Yi(),Mwt=Ah(),Swt=zU(),Ewt=Fm();Zge.exports=function(t,r){Mwt(t,r,{name:"annotations",handleItemDefaults:kwt})};function kwt(e,t,r){function n(k,S){return qU.coerce(e,t,Ewt,k,S)}var a=n("visible"),i=n("clicktoshow");if(a||i){Swt(e,t,r,n);for(var o=t.showarrow,s=["x","y"],l=[-10,-30],u={_fullLayout:r},c=0;c<2;c++){var f=s[c],v=cx.coerceRef(e,t,u,f,"","paper");if(v!=="paper"){var g=cx.getFromId(u,v);g._annIndices.push(t._index)}if(cx.coercePosition(t,u,n,v,f,.5),o){var p="a"+f,_=cx.coerceRef(e,t,u,p,"pixel",["pixel","paper"]);_!=="pixel"&&_!==v&&(_=t[p]="pixel");var x=_==="pixel"?l[c]:.4;cx.coercePosition(t,u,n,_,p,x)}n(f+"anchor"),n(f+"shift")}if(qU.noneOrAll(e,t,["x","y"]),o&&qU.noneOrAll(e,t,["ax","ay"]),i){var y=n("xclick"),C=n("yclick");t._xclick=y===void 0?t.x:cx.cleanPosition(y,u,t.xref),t._yclick=C===void 0?t.y:cx.cleanPosition(C,u,t.yref)}}}});var Qge=fe((bpr,Jge)=>{"use strict";var BU=Xt(),fx=Yi(),Cwt=AC().draw;Jge.exports=function(t){var r=t._fullLayout,n=BU.filterVisible(r.annotations);if(n.length&&t._fullData.length)return BU.syncOrAsync([Cwt,Lwt],t)};function Lwt(e){var t=e._fullLayout;BU.filterVisible(t.annotations).forEach(function(r){var n=fx.getFromId(e,r.xref),a=fx.getFromId(e,r.yref),i=fx.getRefType(r.xref),o=fx.getRefType(r.yref);r._extremes={},i==="range"&&Kge(r,n),o==="range"&&Kge(r,a)})}function Kge(e,t){var r=t._id,n=r.charAt(0),a=e[n],i=e["a"+n],o=e[n+"ref"],s=e["a"+n+"ref"],l=e["_"+n+"padplus"],u=e["_"+n+"padminus"],c={x:1,y:-1}[n]*e[n+"shift"],f=3*e.arrowsize*e.arrowwidth||0,v=f+c,g=f-c,p=3*e.startarrowsize*e.arrowwidth||0,_=p+c,x=p-c,y;if(s===o){var C=fx.findExtremes(t,[t.r2c(a)],{ppadplus:v,ppadminus:g}),k=fx.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(l,_),ppadminus:Math.max(u,x)});y={min:[C.min[0],k.min[0]],max:[C.max[0],k.max[0]]}}else _=i?_+i:_,x=i?x-i:x,y=fx.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,v,_),ppadminus:Math.max(u,g,x)});e._extremes[r]=y}});var tme=fe((wpr,eme)=>{"use strict";var Pwt=aa(),Fwt=nE();eme.exports=function(t,r,n,a){r=r||{};var i=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(!(i||o))return;var s=t._fullLayout.annotations,l=r._id.charAt(0),u,c;function f(g){var p=u[g],_=null;i?_=Fwt(p,r.range):_=Math.pow(10,p),Pwt(_)||(_=null),a(c+g,_)}for(var v=0;v{"use strict";var OU=AC(),rme=Yge();nme.exports={moduleType:"component",name:"annotations",layoutAttributes:Fm(),supplyLayoutDefaults:$ge(),includeBasePlot:JT()("annotations"),calcAutorange:Qge(),draw:OU.draw,drawOne:OU.drawOne,drawRaw:OU.drawRaw,hasClickToShow:rme.hasClickToShow,onClick:rme.onClick,convertCoords:tme()}});var MC=fe((Apr,ame)=>{"use strict";var Ys=Fm(),Dwt=rl().overrideAll,Rwt=So().templatedArray;ame.exports=Dwt(Rwt("annotation",{visible:Ys.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:Ys.xanchor,xshift:Ys.xshift,yanchor:Ys.yanchor,yshift:Ys.yshift,text:Ys.text,textangle:Ys.textangle,font:Ys.font,width:Ys.width,height:Ys.height,opacity:Ys.opacity,align:Ys.align,valign:Ys.valign,bgcolor:Ys.bgcolor,bordercolor:Ys.bordercolor,borderpad:Ys.borderpad,borderwidth:Ys.borderwidth,showarrow:Ys.showarrow,arrowcolor:Ys.arrowcolor,arrowhead:Ys.arrowhead,startarrowhead:Ys.startarrowhead,arrowside:Ys.arrowside,arrowsize:Ys.arrowsize,startarrowsize:Ys.startarrowsize,arrowwidth:Ys.arrowwidth,standoff:Ys.standoff,startstandoff:Ys.startstandoff,hovertext:Ys.hovertext,hoverlabel:Ys.hoverlabel,captureevents:Ys.captureevents}),"calc","from-root")});var sme=fe((Mpr,ome)=>{"use strict";var NU=Xt(),Iwt=Yi(),zwt=Ah(),qwt=zU(),Bwt=MC();ome.exports=function(t,r,n){zwt(t,r,{name:"annotations",handleItemDefaults:Owt,fullLayout:n.fullLayout})};function Owt(e,t,r,n){function a(s,l){return NU.coerce(e,t,Bwt,s,l)}function i(s){var l=s+"axis",u={_fullLayout:{}};return u._fullLayout[l]=r[l],Iwt.coercePosition(t,u,a,s,s,.5)}var o=a("visible");o&&(qwt(e,t,n.fullLayout,a),i("x"),i("y"),i("z"),NU.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",a("xanchor"),a("yanchor"),a("xshift"),a("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",a("ax",-10),a("ay",-30),NU.noneOrAll(e,t,["ax","ay"])))}});var fme=fe((Spr,cme)=>{"use strict";var lme=Xt(),ume=Yi();cme.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,a=0;a{"use strict";function UU(e,t){var r=[0,0,0,0],n,a;for(n=0;n<4;++n)for(a=0;a<4;++a)r[a]+=e[4*n+a]*t[n];return r}function Uwt(e,t){var r=UU(e.projection,UU(e.view,UU(e.model,[t[0],t[1],t[2],1])));return r}hme.exports=Uwt});var vme=fe((kpr,dme)=>{"use strict";var Vwt=AC().drawRaw,Gwt=VU(),Hwt=["x","y","z"];dme.exports=function(t){for(var r=t.fullSceneLayout,n=t.dataScale,a=r.annotations,i=0;i1){s=!0;break}}s?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+i+'"]').remove():(o._pdata=Gwt(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),Vwt(t.graphDiv,o,i,t.id,o._xa,o._ya))}}});var mme=fe((Cpr,gme)=>{"use strict";var jwt=bi(),pme=Xt();gme.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:MC()}}},layoutAttributes:MC(),handleDefaults:sme(),includeBasePlot:Wwt,convert:fme(),draw:vme()};function Wwt(e,t){var r=jwt.subplotsRegistry.gl3d;if(r)for(var n=r.attrRegex,a=Object.keys(e),i=0;i{"use strict";var Lpr=rc(),yme=Ds(),xme=Ol().line,Ywt=Uc().dash,dp=ta().extendFlat,Xwt=So().templatedArray,Ppr=$T(),A3=Ho(),_me=Fm(),{shapeTexttemplateAttrs:Zwt,templatefallbackAttrs:$wt}=Oo(),Kwt=zE();bme.exports=Xwt("shape",{visible:dp({},A3.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:dp({},A3.legend,{editType:"calc+arraydraw"}),legendgroup:dp({},A3.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:dp({},A3.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:yme({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:dp({},A3.legendrank,{editType:"calc+arraydraw"}),legendwidth:dp({},A3.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:dp({},_me.xref,{arrayOk:!0}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:dp({},_me.yref,{arrayOk:!0}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:dp({},xme.color,{editType:"arraydraw"}),width:dp({},xme.width,{editType:"calc+arraydraw"}),dash:dp({},Ywt,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:Zwt({},{keys:Object.keys(Kwt)}),texttemplatefallback:$wt({editType:"arraydraw"}),font:yme({editType:"calc+arraydraw",colorEditType:"arraydraw"}),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"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})});var Tme=fe((Dpr,wme)=>{"use strict";var M3=Xt(),R0=Yi(),Jwt=Ah(),Qwt=GU(),yA=Lm();wme.exports=function(t,r){Jwt(t,r,{name:"shapes",handleItemDefaults:t5t})};function e5t(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function t5t(e,t,r){function n(k,S){return M3.coerce(e,t,Qwt,k,S)}t._isShape=!0;var a=n("visible");if(!a)return;var i=n("showlegend");n("legend"),n("legendgroup"),i&&(n("legendwidth"),n("legendgrouptitle.text"),M3.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var o=n("path"),s=o?"path":"rect",l=n("type",s),u=l!=="path";u&&delete t.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var c=n("line.width");c&&(n("line.color"),n("line.dash"));var f=n("xsizemode"),v=n("ysizemode");let g=[.25,.75],p=[0,10];["x","y"].forEach(k=>{var S=k+"anchor",L=k==="x"?f:v,w={_fullLayout:r},T,A,m,F;let E=k+"ref",I=e[E];if(Array.isArray(I)&&I.length>0){let R=yA.countDefiningCoords(l,o,k);F=R0.coerceRefArray(e,t,w,k,void 0,"paper",R),t["_"+k+"refArray"]=!0}else F=R0.coerceRef(e,t,w,k,void 0,"paper");if(Array.isArray(F))F.forEach(function(R){R0.getRefType(R)==="range"&&(T=R0.getFromId(w,R),T&&T._shapeIndices.indexOf(t._index)===-1&&T._shapeIndices.push(t._index))}),u&&[0,1].forEach(function(R){let B=F[R];R0.getRefType(B)==="range"?(T=R0.getFromId(w,B),A=yA.shapePositionToRange(T),m=yA.rangeToShapePosition(T),(T.type==="category"||T.type==="multicategory")&&n(k+R+"shift")):A=m=M3.identity;let U=k+R,j=e[U];if(e[U]=A(e[U],!0),L==="pixel"?n(U,p[R]):R0.coercePosition(t,w,n,B,U,g[R]),t[U]=m(t[U]),e[U]=j,R===0&&L==="pixel"){let q=e[S];e[S]=A(e[S],!0),R0.coercePosition(t,w,n,B,S,.25),t[S]=m(t[S]),e[S]=q}});else{if(R0.getRefType(F)==="range"?(T=R0.getFromId(w,F),T._shapeIndices.push(t._index),m=yA.rangeToShapePosition(T),A=yA.shapePositionToRange(T),u&&(T.type==="category"||T.type==="multicategory")&&(n(k+"0shift"),n(k+"1shift"))):A=m=M3.identity,u){let B=k+"0",O=k+"1",U=e[B],j=e[O];e[B]=A(e[B],!0),e[O]=A(e[O],!0),L==="pixel"?(n(B,p[0]),n(O,p[1])):(R0.coercePosition(t,w,n,F,B,g[0]),R0.coercePosition(t,w,n,F,O,g[1])),t[B]=m(t[B]),t[O]=m(t[O]),e[B]=U,e[O]=j}if(L==="pixel"){let B=e[S];e[S]=A(e[S],!0),R0.coercePosition(t,w,n,F,S,.25),t[S]=m(t[S]),e[S]=B}}}),u&&M3.noneOrAll(e,t,["x0","x1","y0","y1"]);var _=l==="line",x,y;if(u&&(x=n("label.texttemplate"),n("label.texttemplatefallback")),x||(y=n("label.text")),y||x){n("label.textangle");var C=n("label.textposition",_?"middle":"middle center");n("label.xanchor"),n("label.yanchor",e5t(_,C)),n("label.padding"),M3.coerceFont(n,"label.font",r.font)}}});var Sme=fe((Rpr,Mme)=>{"use strict";var r5t=ni(),Ame=Xt();function n5t(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}Mme.exports=function(t,r,n){n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),Ame.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity");var a=n("newshape.line.width");if(a){var i=(t||{}).plot_bgcolor||"#FFF";n("newshape.line.color",r5t.contrast(i)),n("newshape.line.dash")}var o=t.dragmode==="drawline",s=n("newshape.label.text"),l=n("newshape.label.texttemplate");if(n("newshape.label.texttemplatefallback"),s||l){n("newshape.label.textangle");var u=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",n5t(o,u)),n("newshape.label.padding"),Ame.coerceFont(n,"newshape.label.font",r.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var Dme=fe((Ipr,Fme)=>{"use strict";var HU=Xt(),yv=Yi(),l1=CT(),jU=Lm();Fme.exports=function(t){var r=t._fullLayout,n=HU.filterVisible(r.shapes);if(!(!n.length||!t._fullData.length))for(var a=0;a{o=yv.getFromId(t,f),i._extremes[o._id]=yv.findExtremes(o,v,kme(i))})}else i.xref!=="paper"&&l!=="domain"&&(o=yv.getFromId(t,i.xref),s=Lme(o,i,l1.paramIsX),s&&(i._extremes[o._id]=yv.findExtremes(o,s,kme(i))));if(u==="array"){let c=Eme(t,i,"y");Object.entries(c).forEach(([f,v])=>{o=yv.getFromId(t,f),i._extremes[o._id]=yv.findExtremes(o,v,Cme(i))})}else i.yref!=="paper"&&u!=="domain"&&(o=yv.getFromId(t,i.yref),s=Lme(o,i,l1.paramIsY),s&&(i._extremes[o._id]=yv.findExtremes(o,s,Cme(i))))}};function Eme(e,t,r){let n=t[r+"ref"],a=r==="x"?l1.paramIsX:l1.paramIsY;function i(f,v){f==="paper"||yv.getRefType(f)==="domain"||(o[f]||(o[f]=[]),o[f].push(v))}let o={};if(t.type==="path"&&t.path){let f=t.path.match(l1.segmentRE)||[];for(var s=0,l=0;lp&&(i(n[s],_[p]),s++)}}else i(n[0],t[r+"0"]),i(n[1],t[r+"1"]);let u={};for(let f in o){let v=yv.getFromId(e,f);if(v){var c=v.type==="category"||v.type==="multicategory"?v.r2c:v.d2c;v.type==="date"&&(c=jU.decodeDate(c)),u[v._id]=o[f].map(c)}}return u}function kme(e){return Pme(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function Cme(e){return Pme(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function Pme(e,t,r,n,a,i){var o=e/2,s=i;if(t==="pixel"){var l=a?jU.extractPathCoords(a,i?l1.paramIsY:l1.paramIsX):[r,n],u=HU.aggNums(Math.max,null,l),c=HU.aggNums(Math.min,null,l),f=c<0?Math.abs(c)+o:o,v=u>0?u+o:o;return{ppad:o,ppadplus:s?f:v,ppadminus:s?v:f}}else return{ppad:o}}function Lme(e,t,r){var n=e._id.charAt(0)==="x"?"x":"y",a=e.type==="category"||e.type==="multicategory",i,o,s=0,l=0,u=a?e.r2c:e.d2c,c=t[n+"sizemode"]==="scaled";if(c?(i=t[n+"0"],o=t[n+"1"],a&&(s=t[n+"0shift"],l=t[n+"1shift"])):(i=t[n+"anchor"],o=t[n+"anchor"]),i!==void 0)return[u(i)+s,u(o)+l];if(t.path){var f=1/0,v=-1/0,g=t.path.match(l1.segmentRE),p,_,x,y,C;for(e.type==="date"&&(u=jU.decodeDate(u)),p=0;pv&&(v=C)));if(v>=f)return[f,v]}}});var zme=fe((zpr,Ime)=>{"use strict";var Rme=v8();Ime.exports={moduleType:"component",name:"shapes",layoutAttributes:GU(),supplyLayoutDefaults:Tme(),supplyDrawNewShapeDefaults:Sme(),includeBasePlot:JT()("shapes"),calcAutorange:Dme(),draw:Rme.draw,drawOne:Rme.drawOne}});var WU=fe((Bpr,Bme)=>{"use strict";var qme=rc(),i5t=So().templatedArray,qpr=$T();Bme.exports=i5t("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",qme.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",qme.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var Nme=fe((Opr,Ome)=>{"use strict";var a5t=Xt(),YU=Yi(),o5t=Ah(),s5t=WU(),l5t="images";Ome.exports=function(t,r){var n={name:l5t,handleItemDefaults:u5t};o5t(t,r,n)};function u5t(e,t,r){function n(v,g){return a5t.coerce(e,t,s5t,v,g)}var a=n("source"),i=n("visible",!!a);if(!i)return t;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var o={_fullLayout:r},s=["x","y"],l=0;l<2;l++){var u=s[l],c=YU.coerceRef(e,t,o,u,"paper",void 0);if(c!=="paper"){var f=YU.getFromId(o,c);f._imgIndices.push(t._index)}YU.coercePosition(t,o,n,c,u,0)}return t}});var Hme=fe((Npr,Gme)=>{"use strict";var Ume=xi(),c5t=Ji(),S3=Yi(),Vme=El(),f5t=ev();Gme.exports=function(t){var r=t._fullLayout,n=[],a={},i=[],o,s;for(s=0;s{"use strict";var jme=aa(),h5t=nE();Wme.exports=function(t,r,n,a){r=r||{};var i=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(i||o){for(var s=t._fullLayout.images,l=r._id.charAt(0),u,c,f=0;f{"use strict";Xme.exports={moduleType:"component",name:"images",layoutAttributes:WU(),supplyLayoutDefaults:Nme(),includeBasePlot:JT()("images"),draw:Hme(),convertCoords:Yme()}});var SC=fe((Gpr,$me)=>{"use strict";$me.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}}});var XU=fe((Hpr,Jme)=>{"use strict";var d5t=Ds(),v5t=tc(),p5t=ta().extendFlat,g5t=rl().overrideAll,m5t=qE(),Kme=So().templatedArray,y5t=Kme("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});Jme.exports=g5t(Kme("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:y5t,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:p5t(m5t({editType:"arraydraw"}),{}),font:d5t({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:v5t.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var rye=fe((jpr,tye)=>{"use strict";var EC=Xt(),Qme=Ah(),eye=XU(),x5t=SC(),_5t=x5t.name,b5t=eye.buttons;tye.exports=function(t,r){var n={name:_5t,handleItemDefaults:w5t};Qme(t,r,n)};function w5t(e,t,r){function n(o,s){return EC.coerce(e,t,eye,o,s)}var a=Qme(e,t,{name:"buttons",handleItemDefaults:T5t}),i=n("visible",a.length>0);i&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),EC.noneOrAll(e,t,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),EC.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function T5t(e,t){function r(a,i){return EC.coerce(e,t,b5t,a,i)}var n=r("visible",e.method==="skip"||Array.isArray(e.args));n&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}});var aye=fe((Wpr,iye)=>{"use strict";iye.exports=Nl;var vp=xi(),nye=ni(),E3=Ji(),kC=Xt();function Nl(e,t,r){this.gd=e,this.container=t,this.id=r,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})}Nl.barWidth=2;Nl.barLength=20;Nl.barRadius=2;Nl.barPad=1;Nl.barColor="#808BA4";Nl.prototype.enable=function(t,r,n){var a=this.gd._fullLayout,i=a.width,o=a.height;this.position=t;var s=this.position.l,l=this.position.w,u=this.position.t,c=this.position.h,f=this.position.direction,v=f==="down",g=f==="left",p=f==="right",_=f==="up",x=l,y=c,C,k,S,L;!v&&!g&&!p&&!_&&(this.position.direction="down",v=!0);var w=v||_;w?(C=s,k=C+x,v?(S=u,L=Math.min(S+y,o),y=L-S):(L=u+y,S=Math.max(L-y,0),y=L-S)):(S=u,L=S+y,g?(k=s+x,C=Math.max(k-x,0),x=k-C):(C=s,k=Math.min(C+x,i),x=k-C)),this._box={l:C,t:S,w:x,h:y};var T=l>x,A=Nl.barLength+2*Nl.barPad,m=Nl.barWidth+2*Nl.barPad,F=s,E=u+c;E+m>o&&(E=o-m);var I=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);I.exit().on(".drag",null).remove(),I.enter().append("rect").classed("scrollbar-horizontal",!0).call(nye.fill,Nl.barColor),T?(this.hbar=I.attr({rx:Nl.barRadius,ry:Nl.barRadius,x:F,y:E,width:A,height:m}),this._hbarXMin=F+A/2,this._hbarTranslateMax=x-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var R=c>y,B=Nl.barWidth+2*Nl.barPad,O=Nl.barLength+2*Nl.barPad,U=s+l,j=u;U+B>i&&(U=i-B);var q=this.container.selectAll("rect.scrollbar-vertical").data(R?[0]:[]);q.exit().on(".drag",null).remove(),q.enter().append("rect").classed("scrollbar-vertical",!0).call(nye.fill,Nl.barColor),R?(this.vbar=q.attr({rx:Nl.barRadius,ry:Nl.barRadius,x:U,y:j,width:B,height:O}),this._vbarYMin=j+O/2,this._vbarTranslateMax=y-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var V=this.id,K=C-.5,ee=R?k+B+.5:k+.5,ce=S-.5,me=T?L+m+.5:L+.5,ye=a._topdefs.selectAll("#"+V).data(T||R?[0]:[]);if(ye.exit().remove(),ye.enter().append("clipPath").attr("id",V).append("rect"),T||R?(this._clipRect=ye.select("rect").attr({x:Math.floor(K),y:Math.floor(ce),width:Math.ceil(ee)-Math.floor(K),height:Math.ceil(me)-Math.floor(ce)}),this.container.call(E3.setClipUrl,V,this.gd),this.bg.attr({x:s,y:u,width:l,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E3.setClipUrl,null),delete this._clipRect),T||R){var ue=vp.behavior.drag().on("dragstart",function(){vp.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(ue);var J=vp.behavior.drag().on("dragstart",function(){vp.event.sourceEvent.preventDefault(),vp.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(J),R&&this.vbar.on(".drag",null).call(J)}this.setTranslate(r,n)};Nl.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E3.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)};Nl.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=vp.event.dx),this.vbar&&(r-=vp.event.dy),this.setTranslate(t,r)};Nl.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=vp.event.deltaY),this.vbar&&(r+=vp.event.deltaY),this.setTranslate(t,r)};Nl.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,a=n+this._hbarTranslateMax,i=kC.constrain(vp.event.x,n,a),o=(i-n)/(a-n),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var l=r+this._vbarYMin,u=l+this._vbarTranslateMax,c=kC.constrain(vp.event.y,l,u),f=(c-l)/(u-l),v=this.position.h-this._box.h;r=f*v}this.setTranslate(t,r)};Nl.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,a=this.position.h-this._box.h;if(t=kC.constrain(t||0,0,n),r=kC.constrain(r||0,0,a),this.translateX=t,this.translateY=r,this.container.call(E3.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var i=t/n;this.hbar.call(E3.setTranslate,t+i*this._hbarTranslateMax,r)}if(this.vbar){var o=r/a;this.vbar.call(E3.setTranslate,t,r+o*this._vbarTranslateMax)}}});var pye=fe((Ypr,vye)=>{"use strict";var k3=xi(),xA=Hs(),_A=ni(),C3=Ji(),I0=Xt(),CC=as(),A5t=So().arrayEditor,sye=nc().LINE_SPACING,ba=SC(),M5t=aye();vye.exports=function(t){var r=t._fullLayout,n=I0.filterVisible(r[ba.name]);function a(v){xA.autoMargin(t,hye(v))}var i=r._menulayer.selectAll("g."+ba.containerClassName).data(n.length>0?[0]:[]);if(i.enter().append("g").classed(ba.containerClassName,!0).style("cursor","pointer"),i.exit().each(function(){k3.select(this).selectAll("g."+ba.headerGroupClassName).each(a)}).remove(),n.length!==0){var o=i.selectAll("g."+ba.headerGroupClassName).data(n,S5t);o.enter().append("g").classed(ba.headerGroupClassName,!0);for(var s=I0.ensureSingle(i,"g",ba.dropdownButtonGroupClassName,function(v){v.style("pointer-events","all")}),l=0;l{"use strict";var D5t=SC();gye.exports={moduleType:"component",name:D5t.name,layoutAttributes:XU(),supplyLayoutDefaults:rye(),draw:pye()}});var wA=fe((Zpr,yye)=>{"use strict";yye.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}});var JU=fe(($pr,bye)=>{"use strict";var xye=Ds(),R5t=qE(),I5t=ta().extendDeepAll,z5t=rl().overrideAll,q5t=$4(),_ye=So().templatedArray,hx=wA(),B5t=_ye("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});bye.exports=z5t(_ye("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:B5t,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:I5t(R5t({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:q5t.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:xye({})},font:xye({}),activebgcolor:{valType:"color",dflt:hx.gripBgActiveColor},bgcolor:{valType:"color",dflt:hx.railBgColor},bordercolor:{valType:"color",dflt:hx.railBorderColor},borderwidth:{valType:"number",min:0,dflt:hx.railBorderWidth},ticklen:{valType:"number",min:0,dflt:hx.tickLength},tickcolor:{valType:"color",dflt:hx.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:hx.minorTickLength}}),"arraydraw","from-root")});var Mye=fe((Kpr,Aye)=>{"use strict";var L3=Xt(),wye=Ah(),Tye=JU(),O5t=wA(),N5t=O5t.name,U5t=Tye.steps;Aye.exports=function(t,r){wye(t,r,{name:N5t,handleItemDefaults:V5t})};function V5t(e,t,r){function n(f,v){return L3.coerce(e,t,Tye,f,v)}for(var a=wye(e,t,{name:"steps",handleItemDefaults:G5t}),i=0,o=0;o{"use strict";var pp=xi(),LC=Hs(),Om=ni(),gp=Ji(),z0=Xt(),H5t=z0.strTranslate,TA=as(),j5t=So().arrayEditor,Xa=wA(),tV=nc(),kye=tV.LINE_SPACING,QU=tV.FROM_TL,eV=tV.FROM_BR;Rye.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,a=W5t(n,t),i=n._infolayer.selectAll("g."+Xa.containerClassName).data(a.length>0?[0]:[]);i.enter().append("g").classed(Xa.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),LC.autoMargin(t,Cye(c))}if(i.exit().each(function(){pp.select(this).selectAll("g."+Xa.groupClassName).each(o)}).remove(),a.length!==0){var s=i.selectAll("g."+Xa.groupClassName).data(a,Y5t);s.enter().append("g").classed(Xa.groupClassName,!0),s.exit().each(o).remove();for(var l=0;l0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",H5t(o-Xa.gripWidth*.5,t._dims.currentValueTotalHeight))}}function rV(e,t){var r=e._dims;return r.inputAreaStart+Xa.stepInset+(r.inputAreaLength-2*Xa.stepInset)*Math.min(1,Math.max(0,t))}function Eye(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-Xa.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*Xa.stepInset-2*r.inputAreaStart)))}function e4t(e,t,r){var n=r._dims,a=z0.ensureSingle(e,"rect",Xa.railTouchRectClass,function(i){i.call(Fye,t,e,r).style("pointer-events","all")});a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,Xa.tickOffset+r.ticklen+n.labelHeight)}).call(Om.fill,r.bgcolor).attr("opacity",0),gp.setTranslate(a,0,n.currentValueTotalHeight)}function t4t(e,t){var r=t._dims,n=r.inputAreaLength-Xa.railInset*2,a=z0.ensureSingle(e,"rect",Xa.railRectClass);a.attr({width:n,height:Xa.railWidth,rx:Xa.railRadius,ry:Xa.railRadius,"shape-rendering":"crispEdges"}).call(Om.stroke,t.bordercolor).call(Om.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),gp.setTranslate(a,Xa.railInset,(r.inputAreaWidth-Xa.railWidth)*.5+r.currentValueTotalHeight)}});var qye=fe((Qpr,zye)=>{"use strict";var r4t=wA();zye.exports={moduleType:"component",name:r4t.name,layoutAttributes:JU(),supplyLayoutDefaults:Mye(),draw:Iye()}});var FC=fe((e1r,Oye)=>{"use strict";var Bye=tc();Oye.exports={bgcolor:{valType:"color",dflt:Bye.background,editType:"plot"},bordercolor:{valType:"color",dflt:Bye.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"}});var nV=fe((t1r,Nye)=>{"use strict";Nye.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"}});var DC=fe((r1r,Uye)=>{"use strict";Uye.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}});var Hye=fe(IC=>{"use strict";var n4t=El(),i4t=as(),Vye=DC(),a4t=nc().LINE_SPACING,RC=Vye.name;function Gye(e){var t=e&&e[RC];return t&&t.visible}IC.isVisible=Gye;IC.makeData=function(e){for(var t=n4t.list({_fullLayout:e},"x",!0),r=e.margin,n=[],a=0;a{"use strict";var zC=Xt(),jye=So(),Wye=El(),o4t=FC(),s4t=nV();Yye.exports=function(t,r,n){var a=t[n],i=r[n];if(!(a.rangeslider||r._requestRangeslider[i._id]))return;zC.isPlainObject(a.rangeslider)||(a.rangeslider={});var o=a.rangeslider,s=jye.newContainer(i,"rangeslider");function l(L,w){return zC.coerce(o,s,o4t,L,w)}var u,c;function f(L,w){return zC.coerce(u,c,s4t,L,w)}var v=l("visible");if(v){l("bgcolor",r.plot_bgcolor),l("bordercolor"),l("borderwidth"),l("thickness"),l("autorange",!i.isValidRange(o.range)),l("range");var g=r._subplots;if(g)for(var p=g.cartesian.filter(function(L){return L.slice(0,Math.max(0,L.indexOf("y")))===Wye.name2id(n)}).map(function(L){return L.slice(L.indexOf("y"),L.length)}),_=zC.simpleMap(p,Wye.id2name),x=0;x<_.length;x++){var y=_[x];u=o[y]||{},c=jye.newContainer(s,y,"yaxis");var C=r[y],k;u.range&&C.isValidRange(u.range)&&(k="fixed");var S=f("rangemode",k);S!=="match"&&f("range",C.range.slice())}s._input=o}}});var $ye=fe((a1r,Zye)=>{"use strict";var l4t=El().list,u4t=rp().getAutoRange,c4t=DC();Zye.exports=function(t){for(var r=l4t(t,"x",!0),n=0;n{"use strict";var qC=xi(),f4t=bi(),h4t=Hs(),mu=Xt(),BC=mu.strTranslate,Jye=Ji(),Nm=ni(),d4t=q2(),v4t=gu(),iV=El(),p4t=ed(),g4t=np(),fo=DC();Qye.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n=q.max)U=E[j+1];else if(O=q.pmax)U=E[j+1];else if(O0?e.touches[0].clientX:0}function m4t(e,t,r,n){if(t._context.staticPlot)return;var a=e.select("rect."+fo.slideBoxClassName).node(),i=e.select("rect."+fo.grabAreaMinClassName).node(),o=e.select("rect."+fo.grabAreaMaxClassName).node();function s(){var l=qC.event,u=l.target,c=Kye(l),f=c-e.node().getBoundingClientRect().left,v=n.d2p(r._rl[0]),g=n.d2p(r._rl[1]),p=p4t.coverSlip();this.addEventListener("touchmove",_),this.addEventListener("touchend",x),p.addEventListener("mousemove",_),p.addEventListener("mouseup",x);function _(y){var C=Kye(y),k=+C-c,S,L,w;switch(u){case a:if(w="ew-resize",v+k>r._length||g+k<0)return;S=v+k,L=g+k;break;case i:if(w="col-resize",v+k>r._length)return;S=v+k,L=g;break;case o:if(w="col-resize",g+k<0)return;S=v,L=g+k;break;default:w="ew-resize",S=f,L=f+k;break}if(L{"use strict";var E4t=Xt(),k4t=FC(),C4t=nV(),aV=Hye();t2e.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:E4t.extendFlat({},k4t,{yaxis:C4t})}}},layoutAttributes:FC(),handleDefaults:Xye(),calcAutorange:$ye(),draw:e2e(),isVisible:aV.isVisible,makeData:aV.makeData,autoMarginOpts:aV.autoMarginOpts}});var OC=fe((l1r,i2e)=>{"use strict";var L4t=Ds(),n2e=tc(),P4t=So().templatedArray,F4t=P4t("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});i2e.exports={visible:{valType:"boolean",editType:"plot"},buttons:F4t,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:L4t({editType:"plot"}),bgcolor:{valType:"color",dflt:n2e.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:n2e.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var oV=fe((u1r,a2e)=>{"use strict";a2e.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var l2e=fe((c1r,s2e)=>{"use strict";var NC=Xt(),D4t=ni(),R4t=So(),I4t=Ah(),o2e=OC(),sV=oV();s2e.exports=function(t,r,n,a,i){var o=t.rangeselector||{},s=R4t.newContainer(r,"rangeselector");function l(g,p){return NC.coerce(o,s,o2e,g,p)}var u=I4t(o,s,{name:"buttons",handleItemDefaults:z4t,calendar:i}),c=l("visible",u.length>0);if(c){var f=q4t(r,n,a);l("x",f[0]),l("y",f[1]),NC.noneOrAll(t,r,["x","y"]),l("xanchor"),l("yanchor"),NC.coerceFont(l,"font",n.font);var v=l("bgcolor");l("activecolor",D4t.contrast(v,sV.lightAmount,sV.darkAmount)),l("bordercolor"),l("borderwidth")}};function z4t(e,t,r,n){var a=n.calendar;function i(l,u){return NC.coerce(e,t,o2e.buttons,l,u)}var o=i("visible");if(o){var s=i("step");s!=="all"&&(a&&a!=="gregorian"&&(s==="month"||s==="year")?t.stepmode="backward":i("stepmode"),i("count")),i("label")}}function q4t(e,t,r){for(var n=r.filter(function(s){return t[s].anchor===e._id}),a=0,i=0;i{"use strict";var B4t=HI(),O4t=Xt().titleCase;u2e.exports=function(t,r){var n=t._name,a={};if(r.step==="all")a[n+".autorange"]=!0;else{var i=N4t(t,r);a[n+".range[0]"]=i[0],a[n+".range[1]"]=i[1]}return a};function N4t(e,t){var r=e.range,n=new Date(e.r2l(r[1])),a=t.step,i=B4t["utc"+O4t(a)],o=t.count,s;switch(t.stepmode){case"backward":s=e.l2r(+i.offset(n,-o));break;case"todate":var l=i.offset(n,-o);s=e.l2r(+i.ceil(l));break}var u=r[1];return[s,u]}});var y2e=fe((h1r,m2e)=>{"use strict";var VC=xi(),U4t=bi(),V4t=Hs(),f2e=ni(),g2e=Ji(),lg=Xt(),h2e=lg.strTranslate,UC=as(),G4t=El(),cV=nc(),d2e=cV.LINE_SPACING,v2e=cV.FROM_TL,p2e=cV.FROM_BR,uV=oV(),H4t=c2e();m2e.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(".rangeselector").data(j4t(t),W4t);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(a){var i=VC.select(this),o=a,s=o.rangeselector,l=i.selectAll("g.button").data(lg.filterVisible(s.buttons));l.enter().append("g").classed("button",!0),l.exit().remove(),l.each(function(u){var c=VC.select(this),f=H4t(o,u);u._isActive=Y4t(o,u,f),c.call(lV,s,u),c.call(Z4t,s,u,t),c.on("click",function(){t._dragged||U4t.call("_guiRelayout",t,f)}),c.on("mouseover",function(){u._isHovered=!0,c.call(lV,s,u)}),c.on("mouseout",function(){u._isHovered=!1,c.call(lV,s,u)})}),K4t(t,l,s,o._name,i)})};function j4t(e){for(var t=G4t.list(e,"x",!0),r=[],n=0;n{"use strict";x2e.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:OC()}}},layoutAttributes:OC(),handleDefaults:l2e(),draw:y2e()}});var nl=fe(fV=>{"use strict";var b2e=ta().extendFlat;fV.attributes=function(e,t){e=e||{},t=t||{};var r={valType:"info_array",editType:e.editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},n=e.name?e.name+" ":"",a=e.trace?"trace":"subplot",i=t.description?" "+t.description:"",o={x:b2e({},r,{}),y:b2e({},r,{}),editType:e.editType};return e.noGridCell||(o.row={valType:"integer",min:0,dflt:0,editType:e.editType},o.column={valType:"integer",min:0,dflt:0,editType:e.editType}),o};fV.defaults=function(e,t,r,n){var a=n&&n.x||[0,1],i=n&&n.y||[0,1],o=t.grid;if(o){var s=r("domain.column");s!==void 0&&(s{"use strict";var J4t=Xt(),Q4t=(Tb(),Gs(wb)).counter,eTt=nl().attributes,w2e=rc().idRegex,tTt=So(),hV={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[Q4t("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[w2e.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[w2e.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:eTt({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function GC(e,t,r){var n=t[r+"axes"],a=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(n))return n;if(a.length)return a}function rTt(e,t){var r=e.grid||{},n=GC(t,r,"x"),a=GC(t,r,"y");if(!e.grid&&!n&&!a)return;var i=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(n),s=Array.isArray(a),l=o&&n!==r.xaxes&&s&&a!==r.yaxes,u,c;i?(u=r.subplots.length,c=r.subplots[0].length):(s&&(u=a.length),o&&(c=n.length));var f=tTt.newContainer(t,"grid");function v(w,T){return J4t.coerce(r,f,hV,w,T)}var g=v("rows",u),p=v("columns",c);if(!(g*p>1)){delete t.grid;return}if(!i&&!o&&!s){var _=v("pattern")==="independent";_&&(i=!0)}f._hasSubplotGrid=i;var x=v("roworder"),y=x==="top to bottom",C=i?.2:.1,k=i?.3:.1,S,L;l&&t._splomGridDflt&&(S=t._splomGridDflt.xside,L=t._splomGridDflt.yside),f._domains={x:T2e("x",v,C,S,p),y:T2e("y",v,k,L,g,y)}}function T2e(e,t,r,n,a,i){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var l=new Array(a),u=s[0],c=(s[1]-u)/(a-o),f=c*(1-o),v=0;v{"use strict";S2e.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc"}});var C2e=fe((m1r,k2e)=>{"use strict";var E2e=aa(),iTt=bi(),aTt=Xt(),oTt=So(),sTt=vV();k2e.exports=function(e,t,r,n){var a="error_"+n.axis,i=oTt.newContainer(t,a),o=e[a]||{};function s(p,_){return aTt.coerce(o,i,sTt,p,_)}var l=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=s("visible",l);if(u!==!1){var c=s("type","array"in o?"data":"percent"),f=!0;c!=="sqrt"&&(f=s("symmetric",!((c==="data"?"arrayminus":"valueminus")in o))),c==="data"?(s("array"),s("traceref"),f||(s("arrayminus"),s("tracerefminus"))):(c==="percent"||c==="constant")&&(s("value"),f||s("valueminus"));var v="copy_"+n.inherit+"style";if(n.inherit){var g=t["error_"+n.inherit];(g||{}).visible&&s(v,!(o.color||E2e(o.thickness)||E2e(o.width)))}(!n.inherit||!i[v])&&(s("color",r),s("thickness"),s("width",iTt.traceIs(t,"gl3d")?0:4))}}});var pV=fe((y1r,P2e)=>{"use strict";P2e.exports=function(t){var r=t.type,n=t.symmetric;if(r==="data"){var a=t.array||[];if(n)return function(u,c){var f=+a[c];return[f,f]};var i=t.arrayminus||[];return function(u,c){var f=+a[c],v=+i[c];return!isNaN(f)||!isNaN(v)?[v||0,f||0]:[NaN,NaN]}}else{var o=L2e(r,t.value),s=L2e(r,t.valueminus);return n||t.valueminus===void 0?function(u){var c=o(u);return[c,c]}:function(u){return[s(u),o(u)]}}};function L2e(e,t){if(e==="percent")return function(r){return Math.abs(r*t/100)};if(e==="constant")return function(){return Math.abs(t)};if(e==="sqrt")return function(r){return Math.sqrt(Math.abs(r))}}});var R2e=fe((x1r,D2e)=>{"use strict";var gV=aa(),lTt=bi(),mV=Yi(),uTt=Xt(),cTt=pV();D2e.exports=function(t){for(var r=t.calcdata,n=0;n{"use strict";var I2e=xi(),Um=aa(),fTt=Ji(),hTt=Is();z2e.exports=function(t,r,n,a){var i,o=n.xaxis,s=n.yaxis,l=a&&a.duration>0,u=t._context.staticPlot;r.each(function(c){var f=c[0].trace,v=f.error_x||{},g=f.error_y||{},p;f.ids&&(p=function(C){return C.id});var _=hTt.hasMarkers(f)&&f.marker.maxdisplayed>0;!g.visible&&!v.visible&&(c=[]);var x=I2e.select(this).selectAll("g.errorbar").data(c,p);if(x.exit().remove(),!!c.length){v.visible||x.selectAll("path.xerror").remove(),g.visible||x.selectAll("path.yerror").remove(),x.style("opacity",1);var y=x.enter().append("g").classed("errorbar",!0);l&&y.style("opacity",0).transition().duration(a.duration).style("opacity",1),fTt.setClipUrl(x,n.layerClipId,t),x.each(function(C){var k=I2e.select(this),S=dTt(C,o,s);if(!(_&&!C.vis)){var L,w=k.select("path.yerror");if(g.visible&&Um(S.x)&&Um(S.yh)&&Um(S.ys)){var T=g.width;L="M"+(S.x-T)+","+S.yh+"h"+2*T+"m-"+T+",0V"+S.ys,S.noYS||(L+="m-"+T+",0h"+2*T),i=!w.size(),i?w=k.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):l&&(w=w.transition().duration(a.duration).ease(a.easing)),w.attr("d",L)}else w.remove();var A=k.select("path.xerror");if(v.visible&&Um(S.y)&&Um(S.xh)&&Um(S.xs)){var m=(v.copy_ystyle?g:v).width;L="M"+S.xh+","+(S.y-m)+"v"+2*m+"m0,-"+m+"H"+S.xs,S.noXS||(L+="m0,-"+m+"v"+2*m),i=!A.size(),i?A=k.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):l&&(A=A.transition().duration(a.duration).ease(a.easing)),A.attr("d",L)}else A.remove()}})}})};function dTt(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),Um(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),Um(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}});var N2e=fe((b1r,O2e)=>{"use strict";var vTt=xi(),B2e=ni();O2e.exports=function(t){t.each(function(r){var n=r[0].trace,a=n.error_y||{},i=n.error_x||{},o=vTt.select(this);o.selectAll("path.yerror").style("stroke-width",a.thickness+"px").call(B2e.stroke,a.color),i.copy_ystyle&&(i=a),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(B2e.stroke,i.color)})}});var G2e=fe((w1r,V2e)=>{"use strict";var AA=Xt(),U2e=rl().overrideAll,MA=vV(),dx={error_x:AA.extendFlat({},MA),error_y:AA.extendFlat({},MA)};delete dx.error_x.copy_zstyle;delete dx.error_y.copy_zstyle;delete dx.error_y.copy_ystyle;var SA={error_x:AA.extendFlat({},MA),error_y:AA.extendFlat({},MA),error_z:AA.extendFlat({},MA)};delete SA.error_x.copy_ystyle;delete SA.error_y.copy_ystyle;delete SA.error_z.copy_ystyle;delete SA.error_z.copy_zstyle;V2e.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:dx,bar:dx,histogram:dx,scatter3d:U2e(SA,"calc","nested"),scattergl:U2e(dx,"calc","nested")}},supplyDefaults:C2e(),calc:R2e(),makeComputeError:pV(),plot:q2e(),style:N2e(),hoverInfo:pTt};function pTt(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}});var j2e=fe((T1r,H2e)=>{"use strict";H2e.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"}}});var Q2e=fe((A1r,J2e)=>{"use strict";var Vm=xi(),jC=Hs(),W2e=bi(),ug=Yi(),HC=ed(),xv=Xt(),yp=xv.strTranslate,K2e=ta().extendFlat,yV=np(),mp=Ji(),P3=ni(),gTt=q2(),mTt=as(),yTt=Wf().flipScale,xTt=pA(),_Tt=gC(),bTt=pf(),_V=nc(),Y2e=_V.LINE_SPACING,X2e=_V.FROM_TL,Z2e=_V.FROM_BR,Cl=j2e().cn;function wTt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+Cl.colorbar).data(TTt(e),function(n){return n._id});r.enter().append("g").attr("class",function(n){return n._id}).classed(Cl.colorbar,!0),r.each(function(n){var a=Vm.select(this);xv.ensureSingle(a,"rect",Cl.cbbg),xv.ensureSingle(a,"g",Cl.cbfills),xv.ensureSingle(a,"g",Cl.cblines),xv.ensureSingle(a,"g",Cl.cbaxis,function(o){o.classed(Cl.crisp,!0)}),xv.ensureSingle(a,"g",Cl.cbtitleunshift,function(o){o.append("g").classed(Cl.cbtitle,!0)}),xv.ensureSingle(a,"rect",Cl.cboutline);var i=ATt(a,n,e);i&&i.then&&(e._promises||[]).push(i),e._context.edits.colorbarPosition&&MTt(a,n,e)}),r.exit().each(function(n){jC.autoMargin(e,n._id)}).remove(),r.order()}function TTt(e){var t=e._fullLayout,r=e.calcdata,n=[],a,i,o,s;function l(k){return K2e(k,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){typeof s.calc=="function"?s.calc(e,o,a):(a._fillgradient=i.reversescale?yTt(i.colorscale):i.colorscale,a._zrange=[i[s.min],i[s.max]])}for(var c=0;c[Math.min(e[0]+t,e[1]),e[1]],$2e=(e,t)=>[e[0],Math.max(e[1]-t,e[0])];function ATt(e,t,r){var n=t.orientation==="v",a=t.len,i=t.lenmode,o=t.thickness,s=t.thicknessmode,l=t.outlinewidth,u=t.borderwidth,c=t.bgcolor,f=t.xanchor,v=t.yanchor,g=t.xpad,p=t.ypad,_=t.x,x=n?t.y:1-t.y,y=t.yref==="paper",C=t.xref==="paper",k=r._fullLayout,S=k._size,L=t._fillcolor,w=t._line,T=t.title,A=T.side,m=t._zrange||Vm.extent((typeof L=="function"?L:w.color).domain()),F=typeof w.color=="function"?w.color:function(){return w.color},E=typeof L=="function"?L:function(){return L},I=t._levels,R=STt(r,t,m),B=R.fill,O=R.line,U=Math.round(o*(s==="fraction"?n?S.w:S.h:1)),j=U/(n?S.w:S.h),q=Math.round(a*(i==="fraction"?n?S.h:S.w:1)),V=q/(n?S.h:S.w),K=C?S.w:r._fullLayout.width,ee=y?S.h:r._fullLayout.height,ce=Math.round(n?_*K+g:x*ee+p),me={center:.5,right:1}[f]||0,ye={top:1,middle:.5}[v]||0,ue=n?_-me*j:x-ye*j,J=n?x-ye*V:_-me*V,_e=Math.round(n?ee*(1-J):K*J);t._lenFrac=V,t._thickFrac=j,t._uFrac=ue,t._vFrac=J;var ne=t._axis=ETt(r,t,m);ne.position=j+(n?_+g/S.w:x+p/S.h);var ae=["top","bottom"].indexOf(A)!==-1;if(n&&ae&&(ne.title.side=A,ne.titlex=_+g/S.w,ne.titley=J+(T.side==="top"?V-p/S.h:p/S.h)),!n&&!ae&&(ne.title.side=A,ne.titley=x+p/S.h,ne.titlex=J+g/S.w),w.color&&t.tickmode==="auto"){ne.tickmode="linear",ne.tick0=I.start;var pe=I.size,ie=xv.constrain(q/50,4,15)+1,le=(m[1]-m[0])/((t.nticks||ie)*pe);if(le>1){var xe=Math.pow(10,Math.floor(Math.log(le)/Math.LN10));pe*=xe*xv.roundUp(le/xe,[2,5,10]),(Math.abs(I.start)/I.size+1e-6)%1<2e-6&&(ne.tick0=0)}ne.dtick=pe}var be=n?p/S.h:g/S.w;ne.domain=$2e(xV([J,J+V],be),be),ne.setScale(),e.attr("transform",yp(Math.round(S.l),Math.round(S.t)));var De=e.select("."+Cl.cbtitleunshift).attr("transform",yp(-Math.round(S.l),-Math.round(S.t))),Ge=ne.ticklabelposition,pt=ne.title.font.size,tt=e.select("."+Cl.cbaxis),Oe,ze=0,ut=0;function et(Te,Ve){var $e={propContainer:ne,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:k._dfltTitle.colorbar,containerGroup:e.select("."+Cl.cbtitle)},ot=Te.charAt(0)==="h"?Te.slice(1):"h"+Te;e.selectAll("."+ot+",."+ot+"-math-group").remove(),gTt.draw(r,Te,K2e($e,Ve||{}))}function qe(){if(n&&ae||!n&&!ae){var Te,Ve;A==="top"&&(Te=g+S.l+K*_,Ve=p+S.t+ee*(1-J-V)+3+pt*.75),A==="bottom"&&(Te=g+S.l+K*_,Ve=p+S.t+ee*(1-J)-3-pt*.25),A==="right"&&(Ve=p+S.t+ee*x+3+pt*.75,Te=g+S.l+K*J),et(ne._id+"title",{attributes:{x:Te,y:Ve,"text-anchor":n?"start":"middle"}})}}function we(){if(n&&!ae||!n&&ae){var Te=ne.position||0,Ve=ne._offset+ne._length/2,$e,ot;if(A==="right")ot=Ve,$e=S.l+K*Te+10+pt*(ne.showticklabels?1:.5);else if($e=Ve,A==="bottom"&&(ot=S.t+ee*Te+10+(Ge.indexOf("inside")===-1?ne.tickfont.size:0)+(ne.ticks!=="inside"&&t.ticklen||0)),A==="top"){var rt=T.text.split("
").length;ot=S.t+ee*Te+10-U-Y2e*pt*rt}et((n?"h":"v")+ne._id+"title",{avoid:{selection:Vm.select(r).selectAll("g."+ne._id+"tick"),side:A,offsetTop:n?0:S.t,offsetLeft:n?S.l:0,maxShift:n?k.width:k.height},attributes:{x:$e,y:ot,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function Le(){if(!n&&!ae||n&&ae){var Te=e.select("."+Cl.cbtitle),Ve=Te.select("text"),$e=[-l/2,l/2],ot=Te.select(".h"+ne._id+"title-math-group").node(),rt=15.6;Ve.node()&&(rt=parseInt(Ve.node().style.fontSize,10)*Y2e);var it;if(ot?(it=mp.bBox(ot),ut=it.width,ze=it.height,ze>rt&&($e[1]-=(ze-rt)/2)):Ve.node()&&!Ve.classed(Cl.jsPlaceholder)&&(it=mp.bBox(Ve.node()),ut=it.width,ze=it.height),n){if(ze){if(ze+=5,A==="top")ne.domain=$2e(ne.domain,ze/S.h),$e[1]*=-1;else{ne.domain=xV(ne.domain,ze/S.h);var We=mTt.lineCount(Ve);$e[1]+=(1-We)*rt}Te.attr("transform",yp($e[0],$e[1])),ne.setScale()}}else ut&&(A==="right"&&(ne.domain=xV(ne.domain,(ut+pt/2)/S.w)),Te.attr("transform",yp($e[0],$e[1])),ne.setScale())}e.selectAll("."+Cl.cbfills+",."+Cl.cblines).attr("transform",n?yp(0,Math.round(S.h*(1-ne.domain[1]))):yp(Math.round(S.w*ne.domain[0]),0)),tt.attr("transform",n?yp(0,Math.round(-S.t)):yp(Math.round(-S.l),0));var mt=e.select("."+Cl.cbfills).selectAll("rect."+Cl.cbfill).attr("style","").data(B);mt.enter().append("rect").classed(Cl.cbfill,!0).attr("style",""),mt.exit().remove();var bt=m.map(ne.c2p).map(Math.round).sort(function(fr,Ot){return fr-Ot});mt.each(function(fr,Ot){var cr=[Ot===0?m[0]:(B[Ot]+B[Ot-1])/2,Ot===B.length-1?m[1]:(B[Ot]+B[Ot+1])/2].map(ne.c2p).map(Math.round);n&&(cr[1]=xv.constrain(cr[1]+(cr[1]>cr[0])?1:-1,bt[0],bt[1]));var Ct=Vm.select(this).attr(n?"x":"y",ce).attr(n?"y":"x",Vm.min(cr)).attr(n?"width":"height",Math.max(U,2)).attr(n?"height":"width",Math.max(Vm.max(cr)-Vm.min(cr),2));if(t._fillgradient)mp.gradient(Ct,r,t._id,n?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var wt=E(fr).replace("e-","");Ct.attr("fill",P3.hexString(wt))}});var Yt=e.select("."+Cl.cblines).selectAll("path."+Cl.cbline).data(w.color&&w.width?O:[]);Yt.enter().append("path").classed(Cl.cbline,!0),Yt.exit().remove(),Yt.each(function(fr){var Ot=ce,cr=Math.round(ne.c2p(fr))+w.width/2%1;Vm.select(this).attr("d","M"+(n?Ot+","+cr:cr+","+Ot)+(n?"h":"v")+U).call(mp.lineGroupStyle,w.width,F(fr),w.dash)}),tt.selectAll("g."+ne._id+"tick,path").remove();var jt=ce+U+(l||0)/2-(t.ticks==="outside"?1:0),mr=ug.calcTicks(ne),or=ug.getTickSigns(ne)[2];return ug.drawTicks(r,ne,{vals:ne.ticks==="inside"?ug.clipEnds(ne,mr):mr,layer:tt,path:ug.makeTickPath(ne,jt,or),transFn:ug.makeTransTickFn(ne)}),ug.drawLabels(r,ne,{vals:mr,layer:tt,transFn:ug.makeTransTickLabelFn(ne),labelFns:ug.makeLabelFns(ne,jt)})}function Ke(){var Te,Ve=U+l/2;Ge.indexOf("inside")===-1&&(Te=mp.bBox(tt.node()),Ve+=n?Te.width:Te.height),Oe=De.select("text");var $e=0,ot=n&&A==="top",rt=!n&&A==="right",it=0;if(Oe.node()&&!Oe.classed(Cl.jsPlaceholder)){var We,mt=De.select(".h"+ne._id+"title-math-group").node();mt&&(n&&ae||!n&&!ae)?(Te=mp.bBox(mt),$e=Te.width,We=Te.height):(Te=mp.bBox(De.node()),$e=Te.right-S.l-(n?ce:_e),We=Te.bottom-S.t-(n?_e:ce),!n&&A==="top"&&(Ve+=Te.height,it=Te.height)),rt&&(Oe.attr("transform",yp($e/2+pt/2,0)),$e*=2),Ve=Math.max(Ve,n?$e:We)}var bt=(n?g:p)*2+Ve+u+l/2,Yt=0;!n&&T.text&&v==="bottom"&&x<=0&&(Yt=bt/2,bt+=Yt,it+=Yt),k._hColorbarMoveTitle=Yt,k._hColorbarMoveCBTitle=it;var jt=u+l,mr=(n?ce:_e)-jt/2-(n?g:0),or=(n?_e:ce)-(n?q:p+it-Yt);e.select("."+Cl.cbbg).attr("x",mr).attr("y",or).attr(n?"width":"height",Math.max(bt-Yt,2)).attr(n?"height":"width",Math.max(q+jt,2)).call(P3.fill,c).call(P3.stroke,t.bordercolor).style("stroke-width",u);var fr=rt?Math.max($e-10,0):0;e.selectAll("."+Cl.cboutline).attr("x",(n?ce:_e+g)+fr).attr("y",(n?_e+p-q:ce)+(ot?ze:0)).attr(n?"width":"height",Math.max(U,2)).attr(n?"height":"width",Math.max(q-(n?2*p+ze:2*g+fr),2)).call(P3.stroke,t.outlinecolor).style({fill:"none","stroke-width":l});var Ot=n?me*bt:0,cr=n?0:(1-ye)*bt-it;if(Ot=C?S.l-Ot:-Ot,cr=y?S.t-cr:-cr,e.attr("transform",yp(Ot,cr)),!n&&(u||P3.opacity(c)&&!P3.equals(k.paper_bgcolor,c))){var Ct=tt.selectAll("text"),wt=Ct[0].length,Tt=e.select("."+Cl.cbbg).node(),Mt=mp.bBox(Tt),Lt=mp.getTranslate(e),ft=2;Ct.each(function(Cn,Dt){var At=0,Vt=wt-1;if(Dt===At||Dt===Vt){var Qt=mp.bBox(this),Ut=mp.getTranslate(this),_r;if(Dt===Vt){var rn=Qt.right+Ut.x,Jr=Mt.right+Lt.x+_e-u-ft+_;_r=Jr-rn,_r>0&&(_r=0)}else if(Dt===At){var qn=Qt.left+Ut.x,ri=Mt.left+Lt.x+_e+u+ft;_r=ri-qn,_r<0&&(_r=0)}_r&&(wt<3?this.setAttribute("transform","translate("+_r+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var kt={},rr=X2e[f],pr=Z2e[f],Kr=X2e[v],Nr=Z2e[v],dn=bt-U;n?(i==="pixels"?(kt.y=x,kt.t=q*Kr,kt.b=q*Nr):(kt.t=kt.b=0,kt.yt=x+a*Kr,kt.yb=x-a*Nr),s==="pixels"?(kt.x=_,kt.l=bt*rr,kt.r=bt*pr):(kt.l=dn*rr,kt.r=dn*pr,kt.xl=_-o*rr,kt.xr=_+o*pr)):(i==="pixels"?(kt.x=_,kt.l=q*rr,kt.r=q*pr):(kt.l=kt.r=0,kt.xl=_+a*rr,kt.xr=_-a*pr),s==="pixels"?(kt.y=1-x,kt.t=bt*Kr,kt.b=bt*Nr):(kt.t=dn*Kr,kt.b=dn*Nr,kt.yt=x-o*Kr,kt.yb=x+o*Nr));var xr=t.y<.5?"b":"t",Fr=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var Zr={r:k.width-mr-Ot,l:mr+kt.r,b:k.height-or-cr,t:or+kt.b};C&&y?jC.autoMargin(r,t._id,kt):C?r._fullLayout._reservedMargin[t._id][xr]=Zr[xr]:y||n?r._fullLayout._reservedMargin[t._id][Fr]=Zr[Fr]:r._fullLayout._reservedMargin[t._id][xr]=Zr[xr]}return xv.syncOrAsync([jC.previousPromises,qe,Le,we,jC.previousPromises,Ke],r)}function MTt(e,t,r){var n=t.orientation==="v",a=r._fullLayout,i=a._size,o,s,l;HC.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),yV(e)},moveFn:function(u,c){e.attr("transform",o+yp(u,c)),s=HC.align((n?t._uFrac:t._vFrac)+u/i.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=HC.align((n?t._vFrac:1-t._uFrac)-c/i.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=HC.getCursor(s,l,t.xanchor,t.yanchor);yV(e,f)},doneFn:function(){if(yV(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+"x"]=s,u[t._propPrefix+"y"]=l,t._traceIndex!==void 0?W2e.call("_guiRestyle",r,u,t._traceIndex):W2e.call("_guiRelayout",r,u)}}})}function STt(e,t,r){var n=t._levels,a=[],i=[],o,s,l=n.end+n.size/100,u=n.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=n.start+s*u,!(u>0?o>=l:o<=l));s++)o>c&&o0?o>=l:o<=l));s++)o>r[0]&&o{"use strict";exe.exports={moduleType:"component",name:"colorbar",attributes:fk(),supplyDefaults:EB(),draw:Q2e().draw,hasColorbar:_B()}});var nxe=fe((S1r,rxe)=>{"use strict";rxe.exports={moduleType:"component",name:"legend",layoutAttributes:bO(),supplyLayoutDefaults:TO(),draw:qO(),style:DO()}});var axe=fe((E1r,ixe)=>{"use strict";ixe.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{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"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}});var sxe=fe((k1r,oxe)=>{"use strict";oxe.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var wV=fe((C1r,fxe)=>{"use strict";var kTt=bi(),cxe=Xt(),bV=cxe.extendFlat,lxe=cxe.extendDeep;function uxe(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function CTt(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}fxe.exports=function(t,r){var n,a=t.data,i=t.layout,o=lxe([],a),s=lxe({},i,uxe(r.tileClass)),l=t._context||{};if(r.width&&(s.width=r.width),r.height&&(s.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){s.annotations=[];var u=Object.keys(s);for(n=0;n{"use strict";var LTt=M2().EventEmitter,PTt=bi(),FTt=Xt(),hxe=ag(),DTt=wV(),RTt=$8(),ITt=K8();function zTt(e,t){var r=new LTt,n=DTt(e,{format:"png"}),a=n.gd;a.style.position="absolute",a.style.left="-5000px",document.body.appendChild(a);function i(){var s=hxe.getDelay(a._fullLayout);setTimeout(function(){var l=RTt(a),u=document.createElement("canvas");u.id=FTt.randstr(),r=ITt({format:t.format,width:a._fullLayout.width,height:a._fullLayout.height,canvas:u,emitter:r,svg:l}),r.clean=function(){a&&document.body.removeChild(a)}},s)}var o=hxe.getRedrawFunc(a);return PTt.call("_doPlot",a,n.data,n.layout,n.config).then(o).then(i).catch(function(s){r.emit("error",s)}),r}dxe.exports=zTt});var mxe=fe((P1r,gxe)=>{"use strict";var pxe=ag(),qTt={getDelay:pxe.getDelay,getRedrawFunc:pxe.getRedrawFunc,clone:wV(),toSVG:$8(),svgToImg:K8(),toImage:vxe(),downloadImage:rU()};gxe.exports=qTt});var xxe=fe(cg=>{"use strict";cg.version=M4().version;Fte();_se();var BTt=bi(),EA=cg.register=BTt.register,AV=Bpe(),yxe=Object.keys(AV);for(WC=0;WC{"use strict";_xe.exports=xxe()});var u1=fe((R1r,Sxe)=>{"use strict";var nu=Ol(),wxe=pl().axisHoverFormat,{hovertemplateAttrs:OTt,texttemplateAttrs:NTt,templatefallbackAttrs:Txe}=Oo(),Mxe=_s(),UTt=Ds(),Axe=Im(),VTt=Uc().pattern,vx=ta().extendFlat,MV=UTt({editType:"calc",arrayOk:!0,colorEditType:"style"}),GTt=nu.marker,HTt=GTt.line,jTt=vx({},HTt.width,{dflt:0}),WTt=vx({width:jTt,editType:"calc"},Mxe("marker.line")),YTt=vx({line:WTt,editType:"calc"},Mxe("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:VTt,cornerradius:{valType:"any",editType:"calc"}});Sxe.exports={x:nu.x,x0:nu.x0,dx:nu.dx,y:nu.y,y0:nu.y0,dy:nu.dy,xperiod:nu.xperiod,yperiod:nu.yperiod,xperiod0:nu.xperiod0,yperiod0:nu.yperiod0,xperiodalignment:nu.xperiodalignment,yperiodalignment:nu.yperiodalignment,xhoverformat:wxe("x"),yhoverformat:wxe("y"),text:nu.text,texttemplate:NTt({editType:"plot"},{keys:Axe.eventDataKeys}),texttemplatefallback:Txe({editType:"plot"}),hovertext:nu.hovertext,hovertemplate:OTt({},{keys:Axe.eventDataKeys}),hovertemplatefallback:Txe(),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:vx({},MV,{}),insidetextfont:vx({},MV,{}),outsidetextfont:vx({},MV,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:vx({},nu.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:YTt,offsetgroup:nu.offsetgroup,alignmentgroup:nu.alignmentgroup,selected:{marker:{opacity:nu.selected.marker.opacity,color:nu.selected.marker.color,editType:"style"},textfont:nu.selected.textfont,editType:"style"},unselected:{marker:{opacity:nu.unselected.marker.opacity,color:nu.unselected.marker.color,editType:"style"},textfont:nu.unselected.textfont,editType:"style"},zorder:nu.zorder}});var XC=fe((I1r,Exe)=>{"use strict";Exe.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}});var ZC=fe((z1r,Lxe)=>{"use strict";var XTt=ni(),kxe=Wf().hasColorscale,Cxe=Vc(),ZTt=Xt().coercePattern;Lxe.exports=function(t,r,n,a,i){var o=n("marker.color",a),s=kxe(t,"marker");s&&Cxe(t,r,i,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",XTt.defaultLine),kxe(t,"marker.line")&&Cxe(t,r,i,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),ZTt(n,"marker.pattern",o,s),n("selected.marker.color"),n("unselected.marker.color")}});var q0=fe((q1r,zxe)=>{"use strict";var Pxe=aa(),D3=Xt(),Fxe=ni(),$Tt=bi(),KTt=rx(),JTt=sp(),QTt=ZC(),eAt=nx(),Dxe=u1(),$C=D3.coerceFont;function tAt(e,t,r,n){function a(u,c){return D3.coerce(e,t,Dxe,u,c)}var i=KTt(e,t,n,a);if(!i){t.visible=!1;return}JTt(e,t,n,a),a("xhoverformat"),a("yhoverformat"),a("zorder"),a("orientation",t.x&&!t.y?"h":"v"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var o=a("textposition");Ixe(e,t,n,a,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),QTt(e,t,a,r,n);var s=(t.marker.line||{}).color,l=$Tt.getComponentMethod("errorbars","supplyDefaults");l(e,t,s||Fxe.defaultLine,{axis:"y"}),l(e,t,s||Fxe.defaultLine,{axis:"x",inherit:"y"}),D3.coerceSelectionMarkerOpacity(t,a)}function rAt(e,t){var r,n;function a(s,l){return D3.coerce(n._input,n,Dxe,s,l)}for(var i=0;i=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&Pxe(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function Ixe(e,t,r,n,a,i){i=i||{};var o=i.moduleHasSelected!==!1,s=i.moduleHasUnselected!==!1,l=i.moduleHasConstrain!==!1,u=i.moduleHasCliponaxis!==!1,c=i.moduleHasTextangle!==!1,f=i.moduleHasInsideanchor!==!1,v=!!i.hasPathbar,g=Array.isArray(a)||a==="auto",p=g||a==="inside",_=g||a==="outside";if(p||_){var x=$C(n,"textfont",r.font),y=D3.extendFlat({},x),C=e.textfont&&e.textfont.color,k=!C;if(k&&delete y.color,$C(n,"insidetextfont",y),v){var S=D3.extendFlat({},x);k&&delete S.color,$C(n,"pathbar.textfont",S)}_&&$C(n,"outsidetextfont",x),o&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),l&&n("constraintext"),u&&n("cliponaxis"),c&&n("textangle"),n("texttemplate"),n("texttemplatefallback")}p&&f&&n("insidetextanchor")}zxe.exports={supplyDefaults:tAt,crossTraceDefaults:rAt,handleText:Ixe,validateCornerradius:Rxe}});var SV=fe((B1r,qxe)=>{"use strict";var nAt=bi(),iAt=Yi(),aAt=Xt(),oAt=XC(),sAt=q0().validateCornerradius;qxe.exports=function(e,t,r){function n(_,x){return aAt.coerce(e,t,oAt,_,x)}for(var a=!1,i=!1,o=!1,s={},l=n("barmode"),u=l==="group",c=0;c0&&!s[v]&&(o=!0),s[v]=!0),f.visible&&f.type==="histogram"){var g=iAt.getFromId({_fullLayout:t},f[f.orientation==="v"?"xaxis":"yaxis"]);g.type!=="category"&&(i=!0)}}if(!a){delete t.barmode;return}l!=="overlay"&&n("barnorm"),n("bargap",i&&!o?0:.2),n("bargroupgap");var p=n("barcornerradius");t.barcornerradius=sAt(p)}});var kA=fe((O1r,Bxe)=>{"use strict";var R3=Xt();Bxe.exports=function(t,r){for(var n=0;n{"use strict";var Oxe=Yi(),Nxe=cp(),Uxe=Wf().hasColorscale,Vxe=Mh(),lAt=kA(),uAt=F0();Gxe.exports=function(t,r){var n=Oxe.getFromId(t,r.xaxis||"x"),a=Oxe.getFromId(t,r.yaxis||"y"),i,o,s,l,u,c,f={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(i=n.makeCalcdata(r,"x",f),s=a.makeCalcdata(r,"y"),l=Nxe(r,a,"y",s),u=!!r.yperiodalignment,c="y"):(i=a.makeCalcdata(r,"y",f),s=n.makeCalcdata(r,"x"),l=Nxe(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var v=Math.min(o.length,i.length),g=new Array(v),p=0;p{"use strict";var cAt=xi(),fAt=Xt();function hAt(e,t,r){var n=e._fullLayout,a=n["_"+r+"Text_minsize"];if(a){var i=n.uniformtext.mode==="hide",o;switch(r){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}t.selectAll(o).each(function(s){var l=s.transform;if(l){l.scale=i&&l.hide?0:a/l.fontSize;var u=cAt.select(this).select("text");fAt.setTransormAndDisplay(u,l)}})}}function dAt(e,t,r){if(r.uniformtext.mode){var n=jxe(e),a=r.uniformtext.minsize,i=t.scale*t.fontSize;t.hide=i{"use strict";var pAt=ni(),gAt=aa(),Yxe=Xt().isArrayOrTypedArray;px.coerceString=function(e,t,r){if(typeof t=="string"){if(t||!e.noBlank)return t}else if((typeof t=="number"||t===!0)&&!e.strict)return String(t);return r!==void 0?r:e.dflt};px.coerceNumber=function(e,t,r){if(gAt(t)){t=+t;var n=e.min,a=e.max,i=n!==void 0&&ta;if(!i)return t}return r!==void 0?r:e.dflt};px.coerceColor=function(e,t,r){return pAt.isValid(t)?t:r!==void 0?r:e.dflt};px.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};px.getValue=function(e,t){var r;return Yxe(e)?t{"use strict";var CA=xi(),mAt=ni(),LA=Ji(),Xxe=Xt(),Zxe=bi(),$xe=kh().resizeText,EV=u1(),yAt=EV.textfont,xAt=EV.insidetextfont,_At=EV.outsidetextfont,$f=KC();function bAt(e){var t=CA.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");$xe(e,t,"bar");var r=t.size(),n=e._fullLayout;t.style("opacity",function(a){return a[0].trace.opacity}).each(function(a){(n.barmode==="stack"&&r>1||n.bargap===0&&n.bargroupgap===0&&!a[0].trace.marker.line.width)&&CA.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(a){var i=CA.select(this),o=a[0].trace;Kxe(i,o,e)}),Zxe.getComponentMethod("errorbars","style")(t)}function Kxe(e,t,r){LA.pointStyle(e.selectAll("path"),t,r),Jxe(e,t,r)}function Jxe(e,t,r){e.selectAll("text").each(function(n){var a=CA.select(this),i=Xxe.ensureUniformFontSize(r,Qxe(a,n,t,r));LA.font(a,i)})}function wAt(e,t,r){var n=t[0].trace;n.selectedpoints?TAt(r,n,e):(Kxe(r,n,e),Zxe.getComponentMethod("errorbars","style")(r))}function TAt(e,t,r){LA.selectedPointStyle(e.selectAll("path"),t),AAt(e.selectAll("text"),t,r)}function AAt(e,t,r){e.each(function(n){var a=CA.select(this),i;if(n.selected){i=Xxe.ensureUniformFontSize(r,Qxe(a,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(i.color=o),LA.font(a,i)}else LA.selectedTextStyle(a,t)})}function Qxe(e,t,r,n){var a=n._fullLayout.font,i=r.textfont;if(e.classed("bartext-inside")){var o=n_e(t,r);i=t_e(r,t.i,a,o)}else e.classed("bartext-outside")&&(i=r_e(r,t.i,a));return i}function e_e(e,t,r){return kV(yAt,e.textfont,t,r)}function t_e(e,t,r,n){var a=e_e(e,t,r),i=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[t]===void 0;return i&&(a={color:mAt.contrast(n),family:a.family,size:a.size,weight:a.weight,style:a.style,variant:a.variant,textcase:a.textcase,lineposition:a.lineposition,shadow:a.shadow}),kV(xAt,e.insidetextfont,t,a)}function r_e(e,t,r){var n=e_e(e,t,r);return kV(_At,e.outsidetextfont,t,n)}function kV(e,t,r,n){t=t||{};var a=$f.getValue(t.family,r),i=$f.getValue(t.size,r),o=$f.getValue(t.color,r),s=$f.getValue(t.weight,r),l=$f.getValue(t.style,r),u=$f.getValue(t.variant,r),c=$f.getValue(t.textcase,r),f=$f.getValue(t.lineposition,r),v=$f.getValue(t.shadow,r);return{family:$f.coerceString(e.family,a,n.family),size:$f.coerceNumber(e.size,i,n.size),color:$f.coerceColor(e.color,o,n.color),weight:$f.coerceString(e.weight,s,n.weight),style:$f.coerceString(e.style,l,n.style),variant:$f.coerceString(e.variant,u,n.variant),textcase:$f.coerceString(e.variant,c,n.textcase),lineposition:$f.coerceString(e.variant,f,n.lineposition),shadow:$f.coerceString(e.variant,v,n.shadow)}}function n_e(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}i_e.exports={style:bAt,styleTextPoints:Jxe,styleOnSelect:wAt,getInsideTextFont:t_e,getOutsideTextFont:r_e,getBarColor:n_e,resizeText:$xe}});var mx=fe((H1r,h_e)=>{"use strict";var JC=xi(),QC=aa(),mf=Xt(),MAt=as(),SAt=ni(),Gm=Ji(),EAt=bi(),e7=Yi().tickText,a_e=kh(),kAt=a_e.recordMinTextSize,CAt=a_e.clearMinTextSize,CV=_v(),I3=KC(),LAt=Im(),o_e=u1(),PAt=o_e.text,FAt=o_e.textposition,DAt=Sd().appendArrayPointValue,od=LAt.TEXTPAD;function RAt(e){return e.id}function IAt(e){if(e.ids)return RAt}function LV(e){return(e>0)-(e<0)}function xp(e,t){return e0}function qAt(e,t,r,n,a,i){var o=t.xaxis,s=t.yaxis,l=e._fullLayout,u=e._context.staticPlot;a||(a={mode:l.barmode,norm:l.barmode,gap:l.bargap,groupgap:l.bargroupgap},CAt("bar",l));var c=mf.makeTraceGroups(n,r,"trace bars").each(function(f){var v=JC.select(this),g=f[0].trace,p=f[0].t,_=g.type==="waterfall",x=g.type==="funnel",y=g.type==="histogram",C=g.type==="bar",k=C||x,S=0;_&&g.connector.visible&&g.connector.mode==="between"&&(S=g.connector.line.width/2);var L=g.orientation==="h",w=l_e(a),T=mf.ensureSingle(v,"g","points"),A=IAt(g),m=T.selectAll("g.point").data(mf.identity,A);m.enter().append("g").classed("point",!0),m.exit().remove(),m.each(function(E,I){var R=JC.select(this),B=zAt(E,o,s,L),O=B[0][0],U=B[0][1],j=B[1][0],q=B[1][1],V=(L?U-O:q-j)===0;V&&k&&I3.getLineWidth(g,E)&&(V=!1),V||(V=!QC(O)||!QC(U)||!QC(j)||!QC(q)),E.isBlank=V,V&&(L?U=O:q=j),S&&!V&&(L?(O-=xp(O,U)*S,U+=xp(O,U)*S):(j-=xp(j,q)*S,q+=xp(j,q)*S));var K,ee;if(g.type==="waterfall"){if(!V){var ce=g[E.dir].marker;K=ce.line.width,ee=ce.color}}else K=I3.getLineWidth(g,E),ee=E.mc||g.marker.color;function me(Te){var Ve=JC.round(K/2%1,2);return a.gap===0&&a.groupgap===0?JC.round(Math.round(Te)-Ve,2):Te}function ye(Te,Ve,$e){return $e&&Te===Ve?Te:Math.abs(Te-Ve)>=2?me(Te):Te>Ve?Math.ceil(Te):Math.floor(Te)}var ue=SAt.opacity(ee),J=ue<1||K>.01?me:ye;e._context.staticPlot||(O=J(O,U,L),U=J(U,O,L),j=J(j,q,!L),q=J(q,j,!L));var _e=L?o.c2p:s.c2p,ne;E.s0>0?ne=E._sMax:E.s0<0?ne=E._sMin:ne=E.s1>0?E._sMax:E._sMin;function ae(Te,Ve){if(!Te)return 0;var $e=Math.abs(L?q-j:U-O),ot=Math.abs(L?U-O:q-j),rt=J(Math.abs(_e(ne,!0)-_e(0,!0))),it=E.hasB?Math.min($e/2,ot/2):Math.min($e/2,rt),We;if(Ve==="%"){var mt=Math.min(50,Te);We=$e*(mt/100)}else We=Te;return J(Math.max(Math.min(We,it),0))}var pe=C||y?ae(p.cornerradiusvalue,p.cornerradiusform):0,ie,le,xe="M"+O+","+j+"V"+q+"H"+U+"V"+j+"Z",be=0;if(pe&&E.s){var De=LV(E.s0)===0||LV(E.s)===LV(E.s0)?E.s1:E.s0;if(be=J(E.hasB?0:Math.abs(_e(ne,!0)-_e(De,!0))),be0?Math.sqrt(be*(2*pe-be)):0,ut=Ge>0?Math.max:Math.min;ie="M"+O+","+j+"V"+(q-Oe*pt)+"H"+ut(U-(pe-be)*Ge,O)+"A "+pe+","+pe+" 0 0 "+tt+" "+U+","+(q-pe*pt-ze)+"V"+(j+pe*pt+ze)+"A "+pe+","+pe+" 0 0 "+tt+" "+ut(U-(pe-be)*Ge,O)+","+(j+Oe*pt)+"Z"}else if(E.hasB)ie="M"+(O+pe*Ge)+","+j+"A "+pe+","+pe+" 0 0 "+tt+" "+O+","+(j+pe*pt)+"V"+(q-pe*pt)+"A "+pe+","+pe+" 0 0 "+tt+" "+(O+pe*Ge)+","+q+"H"+(U-pe*Ge)+"A "+pe+","+pe+" 0 0 "+tt+" "+U+","+(q-pe*pt)+"V"+(j+pe*pt)+"A "+pe+","+pe+" 0 0 "+tt+" "+(U-pe*Ge)+","+j+"Z";else{le=Math.abs(q-j)+be;var et=le0?Math.sqrt(be*(2*pe-be)):0,we=pt>0?Math.max:Math.min;ie="M"+(O+et*Ge)+","+j+"V"+we(q-(pe-be)*pt,j)+"A "+pe+","+pe+" 0 0 "+tt+" "+(O+pe*Ge-qe)+","+q+"H"+(U-pe*Ge+qe)+"A "+pe+","+pe+" 0 0 "+tt+" "+(U-et*Ge)+","+we(q-(pe-be)*pt,j)+"V"+j+"Z"}}else ie=xe}else ie=xe;var Le=s_e(mf.ensureSingle(R,"path"),l,a,i);if(Le.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((U-O)*(q-j))||V&&e._context.staticPlot?"M0,0Z":ie).call(Gm.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&w){var Ke=Gm.makePointStyleFns(g);Gm.singlePointStyle(E,Le,g,Ke,e)}BAt(e,t,R,f,I,O,U,j,q,pe,be,a,i),t.layerClipId&&Gm.hideOutsideRangePoint(E,R.select("text"),o,s,g.xcalendar,g.ycalendar)});var F=g.cliponaxis===!1;Gm.setClipUrl(v,F?null:t.layerClipId,e)});EAt.getComponentMethod("errorbars","plot")(e,c,t,a)}function BAt(e,t,r,n,a,i,o,s,l,u,c,f,v){var g=t.xaxis,p=t.yaxis,_=e._fullLayout,x;function y(xe,be,De){var Ge=mf.ensureSingle(xe,"text").text(be).attr({class:"bartext bartext-"+x,"text-anchor":"middle","data-notex":1}).call(Gm.font,De).call(MAt.convertToTspans,e);return Ge}var C=n[0].trace,k=C.orientation==="h",S=GAt(n,k,g,p),L=UAt(_,n,a,g,p);x=VAt(C,a);var w=f.mode==="stack"||f.mode==="relative",T=n[a],A=!w||T._outmost,m=T.hasB,F=u&&u-c>od;if(!L||x==="none"||(T.isBlank||i===o||s===l)&&(x==="auto"||x==="inside")){r.select("text").remove();return}var E=_.font,I=CV.getBarColor(n[a],C),R=CV.getInsideTextFont(C,a,E,I),B=CV.getOutsideTextFont(C,a,E),O=C.insidetextanchor||"end",U=r.datum();k?g.type==="log"&&U.s0<=0&&(g.range[0]0&&ye>0,_e;F?m?_e=gx(V-2*u,K,me,ye,k)||gx(V,K-2*u,me,ye,k):k?_e=gx(V-(u-c),K,me,ye,k)||gx(V,K-2*(u-c),me,ye,k):_e=gx(V,K-(u-c),me,ye,k)||gx(V-2*(u-c),K,me,ye,k):_e=gx(V,K,me,ye,k),J&&_e?x="inside":(x="outside",ee.remove(),ee=null)}else x="inside";if(!ee){ue=mf.ensureUniformFontSize(e,x==="outside"?B:R),ee=y(r,L,ue);var ne=ee.attr("transform");if(ee.attr("transform",""),ce=Gm.bBox(ee.node()),me=ce.width,ye=ce.height,ee.attr("transform",ne),me<=0||ye<=0){ee.remove();return}}var ae=C.textangle,pe,ie;x==="outside"?(ie=C.constraintext==="both"||C.constraintext==="outside",pe=NAt(i,o,s,l,ce,{isHorizontal:k,constrained:ie,angle:ae,zeroBarDir:S})):(ie=C.constraintext==="both"||C.constraintext==="inside",pe=f_e(i,o,s,l,ce,{isHorizontal:k,constrained:ie,angle:ae,anchor:O,hasB:m,r:u,overhead:c})),pe.fontSize=ue.size,kAt(C.type==="histogram"?"bar":C.type,pe,_),T.transform=pe;var le=s_e(ee,_,f,v);mf.setTransormAndDisplay(le,pe)}function gx(e,t,r,n,a){if(e<0||t<0)return!1;var i=r<=e&&n<=t,o=r<=t&&n<=e,s=a?e>=r*(t/n):t>=n*(e/r);return i||o||s}function u_e(e){return e==="auto"?0:e}function c_e(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),a=Math.abs(Math.cos(r));return{x:e.width*a+e.height*n,y:e.width*n+e.height*a}}function f_e(e,t,r,n,a,i){var o=!!i.isHorizontal,s=!!i.constrained,l=i.angle||0,u=i.anchor,c=u==="end",f=u==="start",v=i.leftToRight||0,g=(v+1)/2,p=1-g,_=i.hasB,x=i.r,y=i.overhead,C=a.width,k=a.height,S=Math.abs(t-e),L=Math.abs(n-r),w=S>2*od&&L>2*od?od:0;S-=2*w,L-=2*w;var T=u_e(l);l==="auto"&&!(C<=S&&k<=L)&&(C>S||k>L)&&(!(C>L||k>S)||Cod){var E=OAt(e,t,r,n,A,x,y,o,_);m=E.scale,F=E.pad}else m=1,s&&(m=Math.min(1,S/A.x,L/A.y)),F=0;var I=a.left*p+a.right*g,R=(a.top+a.bottom)/2,B=(e+od)*p+(t-od)*g,O=(r+n)/2,U=0,j=0;if(f||c){var q=(o?A.x:A.y)/2;x&&(c||_)&&(w+=F);var V=o?xp(e,t):xp(r,n);o?f?(B=e+V*w,U=-V*q):(B=t-V*w,U=V*q):f?(O=r+V*w,j=-V*q):(O=n-V*w,j=V*q)}return{textX:I,textY:R,targetX:B,targetY:O,anchorX:U,anchorY:j,scale:m,rotate:T}}function OAt(e,t,r,n,a,i,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*od),c=Math.max(0,Math.abs(n-r)-2*od),f=i-od,v=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,g=l?f*2:s?f-o:2*v,p=l?f*2:s?2*v:f-o,_,x,y,C,k;return a.y/a.x>=c/(u-g)?C=c/a.y:a.y/a.x<=(c-p)/u?C=u/a.x:!l&&s?(_=a.x*a.x+a.y*a.y/4,x=-2*a.x*(u-f)-a.y*(c/2-f),y=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,C=(-x+Math.sqrt(x*x-4*_*y))/(2*_)):l?(_=(a.x*a.x+a.y*a.y)/4,x=-a.x*(u/2-f)-a.y*(c/2-f),y=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,C=(-x+Math.sqrt(x*x-4*_*y))/(2*_)):(_=a.x*a.x/4+a.y*a.y,x=-a.x*(u/2-f)-2*a.y*(c-f),y=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,C=(-x+Math.sqrt(x*x-4*_*y))/(2*_)),C=Math.min(1,C),s?k=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-a.y*C)/2)*(f-(c-a.y*C)/2)))-o):k=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-a.x*C)/2)*(f-(u-a.x*C)/2)))-o),{scale:C,pad:k}}function NAt(e,t,r,n,a,i){var o=!!i.isHorizontal,s=!!i.constrained,l=i.angle||0,u=a.width,c=a.height,f=Math.abs(t-e),v=Math.abs(n-r),g;o?g=v>2*od?od:0:g=f>2*od?od:0;var p=1;s&&(p=o?Math.min(1,v/c):Math.min(1,f/u));var _=u_e(l),x=c_e(a,_),y=(o?x.x:x.y)/2,C=(a.left+a.right)/2,k=(a.top+a.bottom)/2,S=(e+t)/2,L=(r+n)/2,w=0,T=0,A;return(o?e===t:r===n)&&i.zeroBarDir?A=i.zeroBarDir:A=o?xp(t,e):xp(r,n),o?(S=t-A*g,w=A*y):(L=n+A*g,T=-A*y),{textX:C,textY:k,targetX:S,targetY:L,anchorX:w,anchorY:T,scale:p,rotate:_}}function UAt(e,t,r,n,a){var i=t[0].trace,o=i.texttemplate,s;return o?s=HAt(e,t,r,n,a):i.textinfo?s=jAt(t,r,n,a):s=I3.getValue(i.text,r),I3.coerceString(PAt,s)}function VAt(e,t){var r=I3.getValue(e.textposition,t);return I3.coerceEnumerated(FAt,r)}function GAt(e,t,r,n){for(var a=!1,i=!1,o=0;o0?a=!0:s<0&&(i=!0),a&&i)return 0}var l=t?r:n,u=-xp(l.range[0],l.range[1]);return i?a?0:-u:u}function HAt(e,t,r,n,a){var i=t[0].trace,o=mf.castOption(i,r,"texttemplate");if(!o)return"";var s=i.type==="histogram",l=i.type==="waterfall",u=i.type==="funnel",c=i.orientation==="h",f,v,g,p;c?(f="y",v=a,g="x",p=n):(f="x",v=n,g="y",p=a);function _(w){return e7(v,v.c2l(w),!0).text}function x(w){return e7(p,p.c2l(w),!0).text}var y=t[r],C={};C.label=y.p,C.labelLabel=C[f+"Label"]=_(y.p);var k=mf.castOption(i,y.i,"text");(k===0||k)&&(C.text=k),C.value=y.s,C.valueLabel=C[g+"Label"]=x(y.s);var S={};DAt(S,i,y.i),(s||S.x===void 0)&&(S.x=c?C.value:C.label),(s||S.y===void 0)&&(S.y=c?C.label:C.value),(s||S.xLabel===void 0)&&(S.xLabel=c?C.valueLabel:C.labelLabel),(s||S.yLabel===void 0)&&(S.yLabel=c?C.labelLabel:C.valueLabel),l&&(C.delta=+y.rawS||y.s,C.deltaLabel=x(C.delta),C.final=y.v,C.finalLabel=x(C.final),C.initial=C.final-C.delta,C.initialLabel=x(C.initial)),u&&(C.value=y.s,C.valueLabel=x(C.value),C.percentInitial=y.begR,C.percentInitialLabel=mf.formatPercent(y.begR),C.percentPrevious=y.difR,C.percentPreviousLabel=mf.formatPercent(y.difR),C.percentTotal=y.sumR,C.percenTotalLabel=mf.formatPercent(y.sumR));var L=mf.castOption(i,y.i,"customdata");return L&&(C.customdata=L),mf.texttemplateString({data:[S,C,i._meta],fallback:i.texttemplatefallback,labels:C,locale:e._d3locale,template:o})}function jAt(e,t,r,n){var a=e[0].trace,i=a.orientation==="h",o=a.type==="waterfall",s=a.type==="funnel";function l(L){var w=i?n:r;return e7(w,L,!0).text}function u(L){var w=i?r:n;return e7(w,+L,!0).text}var c=a.textinfo,f=e[t],v=c.split("+"),g=[],p,_=function(L){return v.indexOf(L)!==-1};if(_("label")&&g.push(l(e[t].p)),_("text")&&(p=mf.castOption(a,f.i,"text"),(p===0||p)&&g.push(p)),o){var x=+f.rawS||f.s,y=f.v,C=y-x;_("initial")&&g.push(u(C)),_("delta")&&g.push(u(x)),_("final")&&g.push(u(y))}if(s){_("value")&&g.push(u(f.s));var k=0;_("percent initial")&&k++,_("percent previous")&&k++,_("percent total")&&k++;var S=k>1;_("percent initial")&&(p=mf.formatPercent(f.begR),S&&(p+=" of initial"),g.push(p)),_("percent previous")&&(p=mf.formatPercent(f.difR),S&&(p+=" of previous"),g.push(p)),_("percent total")&&(p=mf.formatPercent(f.sumR),S&&(p+=" of total"),g.push(p))}return g.join("
")}h_e.exports={plot:qAt,toMoveInsideBar:f_e}});var z3=fe((j1r,g_e)=>{"use strict";var PA=kl(),WAt=bi(),d_e=ni(),YAt=Xt().fillText,XAt=KC().getLineWidth,PV=Yi().hoverLabelText,ZAt=Wa().BADNUM;function $At(e,t,r,n,a){var i=v_e(e,t,r,n,a);if(i){var o=i.cd,s=o[0].trace,l=o[i.index];return i.color=p_e(s,l),WAt.getComponentMethod("errorbars","hoverInfo")(l,s,i),[i]}}function v_e(e,t,r,n,a){var i=e.cd,o=i[0].trace,s=i[0].t,l=n==="closest",u=o.type==="waterfall",c=e.maxHoverDistance,f=e.maxSpikeDistance,v,g,p,_,x,y,C;o.orientation==="h"?(v=r,g=t,p="y",_="x",x=O,y=I):(v=t,g=r,p="x",_="y",y=O,x=I);var k=o[p+"period"],S=l||k;function L(J){return T(J,-1)}function w(J){return T(J,1)}function T(J,_e){var ne=J.w;return J[p]+_e*ne/2}function A(J){return J[p+"End"]-J[p+"Start"]}var m=l?L:k?function(J){return J.p-A(J)/2}:function(J){return Math.min(L(J),J.p-s.bardelta/2)},F=l?w:k?function(J){return J.p+A(J)/2}:function(J){return Math.max(w(J),J.p+s.bardelta/2)};function E(J,_e,ne){return a.finiteRange&&(ne=0),PA.inbox(J-v,_e-v,ne+Math.min(1,Math.abs(_e-J)/C)-1)}function I(J){return E(m(J),F(J),c)}function R(J){return E(L(J),w(J),f)}function B(J){var _e=J[_];if(u){var ne=Math.abs(J.rawS)||0;g>0?_e+=ne:g<0&&(_e-=ne)}return _e}function O(J){var _e=g,ne=J.b,ae=B(J);return PA.inbox(ne-_e,ae-_e,c+(ae-_e)/(ae-ne)-1)}function U(J){var _e=g,ne=J.b,ae=B(J);return PA.inbox(ne-_e,ae-_e,f+(ae-_e)/(ae-ne)-1)}var j=e[p+"a"],q=e[_+"a"];C=Math.abs(j.r2c(j.range[1])-j.r2c(j.range[0]));function V(J){return(x(J)+y(J))/2}var K=PA.getDistanceFunction(n,x,y,V);if(PA.getClosest(i,K,e),e.index!==!1&&i[e.index].p!==ZAt){S||(m=function(J){return Math.min(L(J),J.p-s.bargroupwidth/2)},F=function(J){return Math.max(w(J),J.p+s.bargroupwidth/2)});var ee=e.index,ce=i[ee],me=o.base?ce.b+ce.s:ce.s;e[_+"0"]=e[_+"1"]=q.c2p(ce[_],!0),e[_+"LabelVal"]=me;var ye=s.extents[s.extents.round(ce.p)];e[p+"0"]=j.c2p(l?m(ce):ye[0],!0),e[p+"1"]=j.c2p(l?F(ce):ye[1],!0);var ue=ce.orig_p!==void 0;return e[p+"LabelVal"]=ue?ce.orig_p:ce.p,e.labelLabel=PV(j,e[p+"LabelVal"],o[p+"hoverformat"]),e.valueLabel=PV(q,e[_+"LabelVal"],o[_+"hoverformat"]),e.baseLabel=PV(q,ce.b,o[_+"hoverformat"]),e.spikeDistance=(U(ce)+R(ce))/2,e[p+"Spike"]=j.c2p(ce.p,!0),YAt(ce,o,e),e.hovertemplate=o.hovertemplate,e}}function p_e(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,a=XAt(e,t);if(d_e.opacity(r))return r;if(d_e.opacity(n)&&a)return n}g_e.exports={hoverPoints:$At,hoverOnBars:v_e,getTraceColor:p_e}});var y_e=fe((W1r,m_e)=>{"use strict";m_e.exports=function(t,r,n){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),n.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}});var q3=fe((Y1r,x_e)=>{"use strict";x_e.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=n[0].trace,s=o.type==="funnel",l=o.orientation==="h",u=[],c;if(r===!1)for(c=0;c{"use strict";__e.exports={attributes:u1(),layoutAttributes:XC(),supplyDefaults:q0().supplyDefaults,crossTraceDefaults:q0().crossTraceDefaults,supplyLayoutDefaults:SV(),calc:Hxe(),crossTraceCalc:ix().crossTraceCalc,colorbar:Zf(),arraysToCalcdata:kA(),plot:mx().plot,style:_v().style,styleOnSelect:_v().styleOnSelect,hoverPoints:z3().hoverPoints,eventData:y_e(),selectPoints:q3(),moduleType:"trace",name:"bar",basePlotModule:gu(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var T_e=fe((Z1r,w_e)=>{"use strict";w_e.exports=b_e()});var FA=fe(($1r,E_e)=>{"use strict";var JAt=n1(),bv=Ol(),A_e=u1(),QAt=tc(),M_e=pl().axisHoverFormat,{hovertemplateAttrs:e6t,templatefallbackAttrs:t6t}=Oo(),fg=ta().extendFlat,B3=bv.marker,S_e=B3.line;E_e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:bv.xperiod,yperiod:bv.yperiod,xperiod0:bv.xperiod0,yperiod0:bv.yperiod0,xperiodalignment:bv.xperiodalignment,yperiodalignment:bv.yperiodalignment,xhoverformat:M_e("x"),yhoverformat:M_e("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:fg({},B3.symbol,{arrayOk:!1,editType:"plot"}),opacity:fg({},B3.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:fg({},B3.angle,{arrayOk:!1,editType:"calc"}),size:fg({},B3.size,{arrayOk:!1,editType:"calc"}),color:fg({},B3.color,{arrayOk:!1,editType:"style"}),line:{color:fg({},S_e.color,{arrayOk:!1,dflt:QAt.defaultLine,editType:"style"}),width:fg({},S_e.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:JAt(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:A_e.offsetgroup,alignmentgroup:A_e.alignmentgroup,selected:{marker:bv.selected.marker,editType:"style"},unselected:{marker:bv.unselected.marker,editType:"style"},text:fg({},bv.text,{}),hovertext:fg({},bv.hovertext,{}),hovertemplate:e6t({}),hovertemplatefallback:t6t(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:bv.zorder}});var DA=fe((K1r,k_e)=>{"use strict";k_e.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}});var IA=fe((J1r,F_e)=>{"use strict";var wv=Xt(),r6t=bi(),n6t=ni(),i6t=sp(),a6t=nx(),C_e=Yb(),RA=FA();function o6t(e,t,r,n){function a(p,_){return wv.coerce(e,t,RA,p,_)}if(L_e(e,t,a,n),t.visible!==!1){i6t(e,t,n,a),a("xhoverformat"),a("yhoverformat");var i=t._hasPreCompStats;i&&(a("lowerfence"),a("upperfence")),a("line.color",(e.marker||{}).color||r),a("line.width"),a("fillcolor",n6t.addOpacity(t.line.color,.5));var o=!1;if(i){var s=a("mean"),l=a("sd");s&&s.length&&(o=!0,l&&l.length&&(o="sd"))}a("whiskerwidth");var u=a("sizemode"),c;u==="quartiles"&&(c=a("boxmean",o)),a("showwhiskers",u==="quartiles"),(u==="sd"||c==="sd")&&a("sdmultiple"),a("width"),a("quartilemethod");var f=!1;if(i){var v=a("notchspan");v&&v.length&&(f=!0)}else wv.validate(e.notchwidth,RA.notchwidth)&&(f=!0);var g=a("notched",f);g&&a("notchwidth"),P_e(e,t,a,{prefix:"box"}),a("zorder")}}function L_e(e,t,r,n){function a(F){var E=0;return F&&F.length&&(E+=1,wv.isArrayOrTypedArray(F[0])&&F[0].length&&(E+=1)),E}function i(F){return wv.validate(e[F],RA[F])}var o=r("y"),s=r("x"),l;if(t.type==="box"){var u=r("q1"),c=r("median"),f=r("q3");t._hasPreCompStats=u&&u.length&&c&&c.length&&f&&f.length,l=Math.min(wv.minRowLength(u),wv.minRowLength(c),wv.minRowLength(f))}else t._hasPreCompStats=!1;var v=a(o),g=a(s),p=v&&wv.minRowLength(o),_=g&&wv.minRowLength(s),x=n.calendar,y={autotypenumbers:n.autotypenumbers},C,k;if(t._hasPreCompStats)switch(String(g)+String(v)){case"00":var S=i("x0")||i("dx"),L=i("y0")||i("dy");L&&!S?C="h":C="v",k=l;break;case"10":C="v",k=Math.min(l,_);break;case"20":C="h",k=Math.min(l,s.length);break;case"01":C="h",k=Math.min(l,p);break;case"02":C="v",k=Math.min(l,o.length);break;case"12":C="v",k=Math.min(l,_,o.length);break;case"21":C="h",k=Math.min(l,s.length,p);break;case"11":k=0;break;case"22":var w=!1,T;for(T=0;T0?(C="v",g>0?k=Math.min(_,p):k=Math.min(p)):g>0?(C="h",k=Math.min(_)):k=0;if(!k){t.visible=!1;return}t._length=k;var A=r("orientation",C);t._hasPreCompStats?A==="v"&&g===0?(r("x0",0),r("dx",1)):A==="h"&&v===0&&(r("y0",0),r("dy",1)):A==="v"&&g===0?r("x0"):A==="h"&&v===0&&r("y0");var m=r6t.getComponentMethod("calendars","handleTraceDefaults");m(e,t,["x","y"],n)}function P_e(e,t,r,n){var a=n.prefix,i=wv.coerce2(e,t,RA,"marker.outliercolor"),o=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(i||o)&&(s="suspectedoutliers");var l=r(a+"points",s);l?(r("jitter",l==="all"?.3:0),r("pointpos",l==="all"?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),l==="suspectedoutliers"&&(r("marker.line.outliercolor",t.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete t.marker;var u=r("hoveron");(u==="all"||u.indexOf("points")!==-1)&&(r("hovertemplate"),r("hovertemplatefallback")),wv.coerceSelectionMarkerOpacity(t,r)}function s6t(e,t){var r,n;function a(l){return wv.coerce(n._input,n,RA,l)}for(var i=0;i{"use strict";var l6t=bi(),u6t=Xt(),c6t=DA();function D_e(e,t,r,n,a){for(var i=a+"Layout",o=!1,s=0;s{"use strict";var DV=aa(),r7=Yi(),h6t=cp(),qu=Xt(),B0=Wa().BADNUM,hg=qu._;G_e.exports=function(t,r){var n=t._fullLayout,a=r7.getFromId(t,r.xaxis||"x"),i=r7.getFromId(t,r.yaxis||"y"),o=[],s=r.type==="violin"?"_numViolins":"_numBoxes",l,u,c,f,v,g,p;r.orientation==="h"?(c=a,f="x",v=i,g="y",p=!!r.yperiodalignment):(c=i,f="y",v=a,g="x",p=!!r.xperiodalignment);var _=d6t(r,g,v,n[s]),x=_[0],y=_[1],C=qu.distinctVals(x,v),k=C.vals,S=C.minDiff/2,L,w,T,A,m,F,E=(r.boxpoints||r.points)==="all"?qu.identity:function(tt){return tt.vL.uf};if(r._hasPreCompStats){var I=r[f],R=function(tt){return c.d2c((r[tt]||[])[l])},B=1/0,O=-1/0;for(l=0;l=L.q1&&L.q3>=L.med){var j=R("lowerfence");L.lf=j!==B0&&j<=L.q1?j:B_e(L,T,A);var q=R("upperfence");L.uf=q!==B0&&q>=L.q3?q:O_e(L,T,A);var V=R("mean");L.mean=V!==B0?V:A?qu.mean(T,A):(L.q1+L.q3)/2;var K=R("sd");L.sd=V!==B0&&K>=0?K:A?qu.stdev(T,A,L.mean):L.q3-L.q1,L.lo=N_e(L),L.uo=U_e(L);var ee=R("notchspan");ee=ee!==B0&&ee>0?ee:V_e(L,A),L.ln=L.med-ee,L.un=L.med+ee;var ce=L.lf,me=L.uf;r.boxpoints&&T.length&&(ce=Math.min(ce,T[0]),me=Math.max(me,T[A-1])),r.notched&&(ce=Math.min(ce,L.ln),me=Math.max(me,L.un)),L.min=ce,L.max=me}else{qu.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+L.q1,"median = "+L.med,"q3 = "+L.q3].join(` +`));var ye;L.med!==B0?ye=L.med:L.q1!==B0?L.q3!==B0?ye=(L.q1+L.q3)/2:ye=L.q1:L.q3!==B0?ye=L.q3:ye=0,L.med=ye,L.q1=L.q3=ye,L.lf=L.uf=ye,L.mean=L.sd=ye,L.ln=L.un=ye,L.min=L.max=ye}B=Math.min(B,L.min),O=Math.max(O,L.max),L.pts2=w.filter(E),o.push(L)}}r._extremes[c._id]=r7.findExtremes(c,[B,O],{padded:!0})}else{var ue=c.makeCalcdata(r,f),J=v6t(k,S),_e=k.length,ne=p6t(_e);for(l=0;l=0&&ae<_e&&(m={v:F,i:l},I_e(m,r,l),ne[ae].push(m))}var pe=1/0,ie=-1/0,le=r.quartilemethod,xe=le==="exclusive",be=le==="inclusive";for(l=0;l<_e;l++)if(ne[l].length>0){if(L={},L.pos=L[g]=k[l],w=L.pts=ne[l].sort(z_e),T=L[f]=w.map(q_e),A=T.length,L.min=T[0],L.max=T[A-1],L.mean=qu.mean(T,A),L.sd=qu.stdev(T,A,L.mean)*r.sdmultiple,L.med=qu.interp(T,.5),A%2&&(xe||be)){var De,Ge;xe?(De=T.slice(0,A/2),Ge=T.slice(A/2+1)):be&&(De=T.slice(0,A/2+1),Ge=T.slice(A/2)),L.q1=qu.interp(De,.5),L.q3=qu.interp(Ge,.5)}else L.q1=qu.interp(T,.25),L.q3=qu.interp(T,.75);L.lf=B_e(L,T,A),L.uf=O_e(L,T,A),L.lo=N_e(L),L.uo=U_e(L);var pt=V_e(L,A);L.ln=L.med-pt,L.un=L.med+pt,pe=Math.min(pe,L.ln),ie=Math.max(ie,L.un),L.pts2=w.filter(E),o.push(L)}r.notched&&qu.isTypedArray(ue)&&(ue=Array.from(ue)),r._extremes[c._id]=r7.findExtremes(c,r.notched?ue.concat([pe,ie]):ue,{padded:!0})}return g6t(o,r),o.length>0?(o[0].t={num:n[s],dPos:S,posLetter:g,valLetter:f,labels:{med:hg(t,"median:"),min:hg(t,"min:"),q1:hg(t,"q1:"),q3:hg(t,"q3:"),max:hg(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?hg(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):hg(t,"mean:"),lf:hg(t,"lower fence:"),uf:hg(t,"upper fence:")}},n[s]++,o):[{t:{empty:!0}}]};function d6t(e,t,r,n){var a=t in e,i=t+"0"in e,o="d"+t in e;if(a||i&&o){var s=r.makeCalcdata(e,t),l=h6t(e,r,t,s).vals;return[l,s]}var u;i?u=e[t+"0"]:"name"in e&&(r.type==="category"||DV(e.name)&&["linear","log"].indexOf(r.type)!==-1||qu.isDateTime(e.name)&&r.type==="date")?u=e.name:u=n;for(var c=r.type==="multicategory"?r.r2c_just_indices(u):r.d2c(u,0,e[t+"calendar"]),f=e._length,v=new Array(f),g=0;g{"use strict";var H_e=Yi(),m6t=Xt(),y6t=J2().getAxisGroup,j_e=["v","h"];function x6t(e,t){for(var r=e.calcdata,n=t.xaxis,a=t.yaxis,i=0;i1,C=1-i[e+"gap"],k=1-i[e+"groupgap"];for(l=0;l0;if(T==="positive"?(q=A*(w?1:.5),ee=K,V=ee=F):T==="negative"?(q=ee=F,V=A*(w?1:.5),ce=K):(q=V=A,ee=ce=K),ne){var ae=S.pointpos,pe=S.jitter,ie=S.marker.size/2,le=0;ae+pe>=0&&(le=K*(ae+pe),le>q?(_e=!0,ue=ie,me=le):le>ee&&(ue=ie,me=q)),le<=q&&(me=q);var xe=0;ae-pe<=0&&(xe=-K*(ae-pe),xe>V?(_e=!0,J=ie,ye=xe):xe>ce&&(J=ie,ye=V)),xe<=V&&(ye=V)}else me=q,ye=V;var be=new Array(c.length);for(u=0;u{"use strict";var O3=xi(),yx=Xt(),_6t=Ji(),X_e=5,b6t=.01;function w6t(e,t,r,n){var a=e._context.staticPlot,i=t.xaxis,o=t.yaxis;yx.makeTraceGroups(n,r,"trace boxes").each(function(s){var l=O3.select(this),u=s[0],c=u.t,f=u.trace;if(c.wdPos=c.bdPos*f.whiskerwidth,f.visible!==!0||c.empty){l.remove();return}var v,g;f.orientation==="h"?(v=o,g=i):(v=i,g=o),Z_e(l,{pos:v,val:g},f,c,a),$_e(l,{x:i,y:o},f,c),K_e(l,{pos:v,val:g},f,c)})}function Z_e(e,t,r,n,a){var i=r.orientation==="h",o=t.val,s=t.pos,l=!!s.rangebreaks,u=n.bPos,c=n.wdPos||0,f=n.bPosPxOffset||0,v=r.whiskerwidth||0,g=r.showwhiskers!==!1,p=r.notched||!1,_=p?1-2*r.notchwidth:1,x,y;Array.isArray(n.bdPos)?(x=n.bdPos[0],y=n.bdPos[1]):(x=n.bdPos,y=n.bdPos);var C=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?yx.identity:[]);C.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","box"),C.exit().remove(),C.each(function(k){if(k.empty)return O3.select(this).attr("d","M0,0Z");var S=s.c2l(k.pos+u,!0),L=s.l2p(S-x)+f,w=s.l2p(S+y)+f,T=l?(L+w)/2:s.l2p(S)+f,A=r.whiskerwidth,m=l?L*A+(1-A)*T:s.l2p(S-c)+f,F=l?w*A+(1-A)*T:s.l2p(S+c)+f,E=s.l2p(S-x*_)+f,I=s.l2p(S+y*_)+f,R=r.sizemode==="sd",B=o.c2p(R?k.mean-k.sd:k.q1,!0),O=R?o.c2p(k.mean+k.sd,!0):o.c2p(k.q3,!0),U=yx.constrain(R?o.c2p(k.mean,!0):o.c2p(k.med,!0),Math.min(B,O)+1,Math.max(B,O)-1),j=k.lf===void 0||r.boxpoints===!1||R,q=o.c2p(j?k.min:k.lf,!0),V=o.c2p(j?k.max:k.uf,!0),K=o.c2p(k.ln,!0),ee=o.c2p(k.un,!0);i?O3.select(this).attr("d","M"+U+","+E+"V"+I+"M"+B+","+L+"V"+w+(p?"H"+K+"L"+U+","+I+"L"+ee+","+w:"")+"H"+O+"V"+L+(p?"H"+ee+"L"+U+","+E+"L"+K+","+L:"")+"Z"+(g?"M"+B+","+T+"H"+q+"M"+O+","+T+"H"+V+(v===0?"":"M"+q+","+m+"V"+F+"M"+V+","+m+"V"+F):"")):O3.select(this).attr("d","M"+E+","+U+"H"+I+"M"+L+","+B+"H"+w+(p?"V"+K+"L"+I+","+U+"L"+w+","+ee:"")+"V"+O+"H"+L+(p?"V"+ee+"L"+E+","+U+"L"+L+","+K:"")+"Z"+(g?"M"+T+","+B+"V"+q+"M"+T+","+O+"V"+V+(v===0?"":"M"+m+","+q+"H"+F+"M"+m+","+V+"H"+F):""))})}function $_e(e,t,r,n){var a=t.x,i=t.y,o=n.bdPos,s=n.bPos,l=r.boxpoints||r.points;yx.seedPseudoRandom();var u=function(v){return v.forEach(function(g){g.t=n,g.trace=r}),v},c=e.selectAll("g.points").data(l?u:[]);c.enter().append("g").attr("class","points"),c.exit().remove();var f=c.selectAll("path").data(function(v){var g,p=v.pts2,_=Math.max((v.max-v.min)/10,v.q3-v.q1),x=_*1e-9,y=_*b6t,C=[],k=0,S;if(r.jitter){if(_===0)for(k=1,C=new Array(p.length),g=0;gv.lo&&(F.so=!0)}return p});f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(_6t.translatePoints,a,i)}function K_e(e,t,r,n){var a=t.val,i=t.pos,o=!!i.rangebreaks,s=n.bPos,l=n.bPosPxOffset||0,u=r.boxmean||(r.meanline||{}).visible,c,f;Array.isArray(n.bdPos)?(c=n.bdPos[0],f=n.bdPos[1]):(c=n.bdPos,f=n.bdPos);var v=e.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?yx.identity:[]);v.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),v.exit().remove(),v.each(function(g){var p=i.c2l(g.pos+s,!0),_=i.l2p(p-c)+l,x=i.l2p(p+f)+l,y=o?(_+x)/2:i.l2p(p)+l,C=a.c2p(g.mean,!0),k=a.c2p(g.mean-g.sd,!0),S=a.c2p(g.mean+g.sd,!0);r.orientation==="h"?O3.select(this).attr("d","M"+C+","+_+"V"+x+(u==="sd"?"m0,0L"+k+","+y+"L"+C+","+_+"L"+S+","+y+"Z":"")):O3.select(this).attr("d","M"+_+","+C+"H"+x+(u==="sd"?"m0,0L"+y+","+k+"L"+_+","+C+"L"+y+","+S+"Z":""))})}J_e.exports={plot:w6t,plotBoxAndWhiskers:Z_e,plotPoints:$_e,plotBoxMean:K_e}});var a7=fe((ngr,Q_e)=>{"use strict";var IV=xi(),zV=ni(),qV=Ji();function T6t(e,t,r){var n=r||IV.select(e).selectAll("g.trace.boxes");n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var i=IV.select(this),o=a[0].trace,s=o.line.width;function l(f,v,g,p){f.style("stroke-width",v+"px").call(zV.stroke,g).call(zV.fill,p)}var u=i.selectAll("path.box");if(o.type==="candlestick")u.each(function(f){if(!f.empty){var v=IV.select(this),g=o[f.dir];l(v,g.line.width,g.line.color,g.fillcolor),v.style("opacity",o.selectedpoints&&!f.selected?.3:1)}});else{l(u,s,o.line.color,o.fillcolor),i.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(zV.stroke,o.line.color);var c=i.selectAll("path.point");qV.pointStyle(c,o,e)}})}function A6t(e,t,r){var n=t[0].trace,a=r.selectAll("path.point");n.selectedpoints?qV.selectedPointStyle(a,n):qV.pointStyle(a,n,e)}Q_e.exports={style:T6t,styleOnSelect:A6t}});var OV=fe((igr,nbe)=>{"use strict";var M6t=Yi(),BV=Xt(),Hm=kl(),ebe=ni(),S6t=BV.fillText;function E6t(e,t,r,n){var a=e.cd,i=a[0].trace,o=i.hoveron,s=[],l;return o.indexOf("boxes")!==-1&&(s=s.concat(tbe(e,t,r,n))),o.indexOf("points")!==-1&&(l=rbe(e,t,r)),n==="closest"?l?[l]:s:(l&&s.push(l),s)}function tbe(e,t,r,n){var a=e.cd,i=e.xa,o=e.ya,s=a[0].trace,l=a[0].t,u=s.type==="violin",c,f,v,g,p,_,x,y,C,k,S,L=l.bdPos,w,T,A=l.wHover,m=function(ie){return v.c2l(ie.pos)+l.bPos-v.c2l(_)};u&&s.side!=="both"?(s.side==="positive"&&(C=function(ie){var le=m(ie);return Hm.inbox(le,le+A,k)},w=L,T=0),s.side==="negative"&&(C=function(ie){var le=m(ie);return Hm.inbox(le-A,le,k)},w=0,T=L)):(C=function(ie){var le=m(ie);return Hm.inbox(le-A,le+A,k)},w=T=L);var F;u?F=function(ie){return Hm.inbox(ie.span[0]-p,ie.span[1]-p,k)}:F=function(ie){return Hm.inbox(ie.min-p,ie.max-p,k)},s.orientation==="h"?(p=t,_=r,x=F,y=C,c="y",v=o,f="x",g=i):(p=r,_=t,x=C,y=F,c="x",v=i,f="y",g=o);var E=Math.min(1,L/Math.abs(v.r2c(v.range[1])-v.r2c(v.range[0])));k=e.maxHoverDistance-E,S=e.maxSpikeDistance-E;function I(ie){return(x(ie)+y(ie))/2}var R=Hm.getDistanceFunction(n,x,y,I);if(Hm.getClosest(a,R,e),e.index===!1)return[];var B=a[e.index],O=s.line.color,U=(s.marker||{}).color;ebe.opacity(O)&&s.line.width?e.color=O:ebe.opacity(U)&&s.boxpoints?e.color=U:e.color=s.fillcolor,e[c+"0"]=v.c2p(B.pos+l.bPos-T,!0),e[c+"1"]=v.c2p(B.pos+l.bPos+w,!0),e[c+"LabelVal"]=B.orig_p!==void 0?B.orig_p:B.pos;var j=c+"Spike";e.spikeDistance=I(B)*S/k,e[j]=v.c2p(B.pos,!0);var q=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,V=s.boxpoints||s.points,K=V&&q?["max","uf","q3","med","mean","q1","lf","min"]:V&&!q?["max","uf","q3","med","q1","lf","min"]:!V&&q?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],ee=g.range[1]{"use strict";ibe.exports=function(t,r){return r.hoverOnBox&&(t.hoverOnBox=r.hoverOnBox),"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var NV=fe((ogr,obe)=>{"use strict";obe.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s,l;if(r===!1)for(s=0;s{"use strict";sbe.exports={attributes:FA(),layoutAttributes:DA(),supplyDefaults:IA().supplyDefaults,crossTraceDefaults:IA().crossTraceDefaults,supplyLayoutDefaults:t7().supplyLayoutDefaults,calc:RV(),crossTraceCalc:n7().crossTraceCalc,plot:i7().plot,style:a7().style,styleOnSelect:a7().styleOnSelect,hoverPoints:OV().hoverPoints,eventData:abe(),selectPoints:NV(),moduleType:"trace",name:"box",basePlotModule:gu(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var cbe=fe((lgr,ube)=>{"use strict";ube.exports=lbe()});var N3=fe((ugr,hbe)=>{"use strict";var k6t=_s(),{extendFlat:a0}=ta(),C6t=Ho(),{axisHoverFormat:UV}=pl(),L6t=Ds(),{hovertemplateAttrs:P6t,templatefallbackAttrs:fbe,texttemplateAttrs:F6t}=Oo(),O0=Ol();hbe.exports=a0({z:{valType:"data_array",editType:"calc"},x:a0({},O0.x,{impliedEdits:{xtype:"array"}}),x0:a0({},O0.x0,{impliedEdits:{xtype:"scaled"}}),dx:a0({},O0.dx,{impliedEdits:{xtype:"scaled"}}),y:a0({},O0.y,{impliedEdits:{ytype:"array"}}),y0:a0({},O0.y0,{impliedEdits:{ytype:"scaled"}}),dy:a0({},O0.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:a0({},O0.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:a0({},O0.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:a0({},O0.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:a0({},O0.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:a0({},O0.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:a0({},O0.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:UV("x"),yhoverformat:UV("y"),zhoverformat:UV("z",1),hovertemplate:P6t(),hovertemplatefallback:fbe(),texttemplate:F6t({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:fbe({editType:"plot"}),textfont:L6t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:a0({},C6t.showlegend,{dflt:!1}),zorder:O0.zorder},k6t("",{cLetter:"z",autoColorDflt:!1}))});var s7=fe((cgr,vbe)=>{"use strict";var D6t=aa(),o7=Xt(),R6t=bi();vbe.exports=function(t,r,n,a,i,o){var s=n("z");i=i||"x",o=o||"y";var l,u;if(s===void 0||!s.length)return 0;if(o7.isArray1D(s)){l=n(i),u=n(o);var c=o7.minRowLength(l),f=o7.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=dbe(i,n),u=dbe(o,n),!I6t(s))return 0;n("transpose"),r._length=null}var v=R6t.getComponentMethod("calendars","handleTraceDefaults");return v(t,r,[i,o],a),!0};function dbe(e,t){var r=t(e),n=r?t(e+"type","array"):"scaled";return n==="scaled"&&(t(e+"0"),t("d"+e)),r}function I6t(e){for(var t=!0,r=!1,n=!1,a,i=0;i0&&(r=!0);for(var o=0;o{"use strict";var pbe=Xt();gbe.exports=function(t,r){t("texttemplate"),t("texttemplatefallback");var n=pbe.extendFlat({},r.font,{color:"auto",size:"auto"});pbe.coerceFont(t,"textfont",n)}});var VV=fe((hgr,mbe)=>{"use strict";mbe.exports=function(t,r,n){var a=n("zsmooth");a===!1&&(n("xgap"),n("ygap")),n("zhoverformat")}});var _be=fe((dgr,xbe)=>{"use strict";var ybe=Xt(),z6t=s7(),q6t=zA(),B6t=sp(),O6t=VV(),N6t=Vc(),U6t=N3();xbe.exports=function(t,r,n,a){function i(s,l){return ybe.coerce(t,r,U6t,s,l)}var o=z6t(t,r,i,a);if(!o){r.visible=!1;return}B6t(t,r,a,i),i("xhoverformat"),i("yhoverformat"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),q6t(i,a),O6t(t,r,i,a),i("hoverongaps"),i("connectgaps",ybe.isArray1D(r.z)&&r.zsmooth!==!1),N6t(t,r,a,i,{prefix:"",cLetter:"z"}),i("zorder")}});var GV=fe((vgr,bbe)=>{"use strict";var U3=aa();bbe.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var a=n[t];return U3(a)?(a=Number(a),r[e]+=a,a):0},avg:function(e,t,r,n,a){var i=n[t];return U3(i)&&(i=Number(i),r[e]+=i,a[e]++),0},min:function(e,t,r,n){var a=n[t];if(U3(a))if(a=Number(a),U3(r[e])){if(r[e]>a){var i=a-r[e];return r[e]=a,i}}else return r[e]=a,a;return 0},max:function(e,t,r,n){var a=n[t];if(U3(a))if(a=Number(a),U3(r[e])){if(r[e]{"use strict";wbe.exports={percent:function(e,t){for(var r=e.length,n=100/t,a=0;a{"use strict";Tbe.exports=function(t,r){for(var n=t.length,a=0,i=0;i{"use strict";var V3=Wa(),xx=V3.ONEAVGYEAR,Abe=V3.ONEAVGMONTH,u7=V3.ONEDAY,Mbe=V3.ONEHOUR,Sbe=V3.ONEMIN,Ebe=V3.ONESEC,kbe=Yi().tickIncrement;Pbe.exports=function(t,r,n,a,i){var o=-1.1*r,s=-.1*r,l=t-s,u=n[0],c=n[1],f=Math.min(l7(u+s,u+l,a,i),l7(c+s,c+l,a,i)),v=Math.min(l7(u+o,u+s,a,i),l7(c+o,c+s,a,i)),g,p;if(f>v&&vu7){var _=g===xx?1:6,x=g===xx?"M12":"M1";return function(y,C){var k=a.c2d(y,xx,i),S=k.indexOf("-",_);S>0&&(k=k.slice(0,S));var L=a.d2c(k,0,i);if(LEbe?e>u7?e>xx*1.1?xx:e>Abe*1.1?Abe:u7:e>Mbe?Mbe:e>Sbe?Sbe:Ebe:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function V6t(e,t,r,n,a,i){if(n&&e>u7){var o=Lbe(t,a,i),s=Lbe(r,a,i),l=e===xx?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function Lbe(e,t,r){var n=t.c2d(e,xx,r).split("-");return n[0]===""&&(n.unshift(),n[0]="-"+n[0]),n}});var ZV=fe((ygr,zbe)=>{"use strict";var YV=aa(),sd=Xt(),Fbe=bi(),Tv=Yi(),{hasColorscale:Dbe}=Wf(),Rbe=Mh(),G6t=kA(),Ibe=GV(),H6t=HV(),j6t=jV(),W6t=WV();function Y6t(e,t){var r=[],n=[],a=t.orientation==="h",i=Tv.getFromId(e,a?t.yaxis:t.xaxis),o=a?"y":"x",s={x:"y",y:"x"}[o],l=t[o+"calendar"],u=t.cumulative,c,f=XV(e,t,i,o),v=f[0],g=f[1],p=typeof v.size=="string",_=[],x=p?_:v,y=[],C=[],k=[],S=0,L=t.histnorm,w=t.histfunc,T=L.indexOf("density")!==-1,A,m,F;u.enabled&&T&&(L=L.replace(/ ?density$/,""),T=!1);var E=w==="max"||w==="min",I=E?null:0,R=Ibe.count,B=H6t[L],O=!1,U=function(le){return i.r2c(le,0,l)},j;for(sd.isArrayOrTypedArray(t[s])&&w!=="count"&&(j=t[s],O=w==="avg",R=Ibe[w]),c=U(v.start),m=U(v.end)+(c-Tv.tickIncrement(c,v.size,!1,l))/1e6;c=0&&F=ae;c--)if(n[c]){pe=c;break}for(c=ae;c<=pe;c++)if(YV(r[c])&&YV(n[c])){var ie={p:r[c],s:n[c],b:0};u.enabled||(ie.pts=k[c],ee?ie.ph0=ie.ph1=k[c].length?g[k[c][0]]:r[c]:(t._computePh=!0,ie.ph0=J(_[c]),ie.ph1=J(_[c+1],!0))),ne.push(ie)}return ne.length===1&&(ne[0].width1=Tv.tickIncrement(ne[0].p,v.size,!1,l)-ne[0].p),Dbe(t,"marker")&&Rbe(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),Dbe(t,"marker.line")&&Rbe(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),G6t(ne,t),sd.isArrayOrTypedArray(t.selectedpoints)&&sd.tagSelected(ne,t,ye),ne}function XV(e,t,r,n,a){var ue;var i=n+"bins",o=e._fullLayout,s=t["_"+n+"bingroup"],l=o._histogramBinOpts[s],u=o.barmode==="overlay",c,f,v,g,p,_,x,y=function(J){return r.r2c(J,0,g)},C=function(J){return r.c2r(J,0,g)},k=r.type==="date"?function(J){return J||J===0?sd.cleanDate(J,null,g):null}:function(J){return YV(J)?Number(J):null};function S(J,_e,ne){_e[J+"Found"]?(_e[J]=k(_e[J]),_e[J]===null&&(_e[J]=ne[J])):(_[J]=_e[J]=ne[J],sd.nestedProperty(f[0],i+"."+J).set(ne[J]))}if(t["_"+n+"autoBinFinished"])delete t["_"+n+"autoBinFinished"];else{f=l.traces;var L=[],w=!0,T=!1,A=!1;for(c=0;cr.r2l(j)&&(V=Tv.tickIncrement(V,l.size,!0,g)),R.start=r.l2r(V),U||sd.nestedProperty(t,i+".start").set(R.start)}var K=l.end,ee=r.r2l(I.end),ce=ee!==void 0;if((l.endFound||ce)&&ee!==r.r2l(K)){var me=ce?ee:sd.aggNums(Math.max,null,p);R.end=r.l2r(me),ce||sd.nestedProperty(t,i+".start").set(R.end)}var ye="autobin"+n;return t._input[ye]===!1&&(t._input[i]=sd.extendFlat({},t[i]||{}),delete t._input[ye],delete t[ye]),[R,p]}function X6t(e,t,r,n,a){var i=e._fullLayout,o=Z6t(e,t),s=!1,l=1/0,u=[t],c,f,v;for(c=0;c=0;n--)s(n);else if(t==="increasing"){for(n=1;n=0;n--)e[n]+=e[n+1];r==="exclude"&&(e.push(0),e.shift())}}zbe.exports={calc:Y6t,calcAllAutoBins:XV}});var Hbe=fe((xgr,Gbe)=>{"use strict";var qbe=Xt(),G3=Yi(),Bbe=GV(),K6t=HV(),J6t=jV(),Q6t=WV(),Obe=ZV().calcAllAutoBins;Gbe.exports=function(t,r){var n=G3.getFromId(t,r.xaxis),a=G3.getFromId(t,r.yaxis),i=r.xcalendar,o=r.ycalendar,s=function(it){return n.r2c(it,0,i)},l=function(it){return a.r2c(it,0,o)},u=function(it){return n.c2r(it,0,i)},c=function(it){return a.c2r(it,0,o)},f,v,g,p,_=Obe(t,r,n,"x"),x=_[0],y=_[1],C=Obe(t,r,a,"y"),k=C[0],S=C[1],L=r._length;y.length>L&&y.splice(L,y.length-L),S.length>L&&S.splice(L,S.length-L);var w=[],T=[],A=[],m=typeof x.size=="string",F=typeof k.size=="string",E=[],I=[],R=m?E:x,B=F?I:k,O=0,U=[],j=[],q=r.histnorm,V=r.histfunc,K=q.indexOf("density")!==-1,ee=V==="max"||V==="min",ce=ee?null:0,me=Bbe.count,ye=K6t[q],ue=!1,J=[],_e=[],ne="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";ne&&V!=="count"&&(ue=V==="avg",me=Bbe[V]);var ae=x.size,pe=s(x.start),ie=s(x.end)+(pe-G3.tickIncrement(pe,ae,!1,i))/1e6;for(f=pe;f=0&&g=0&&p{"use strict";var c1=Xt(),jbe=Wa().BADNUM,Wbe=cp();Ybe.exports=function(t,r,n,a,i,o){var s=t._length,l=r.makeCalcdata(t,a),u=n.makeCalcdata(t,i);l=Wbe(t,r,a,l).vals,u=Wbe(t,n,i,u).vals;var c=t.text,f=c!==void 0&&c1.isArray1D(c),v=t.hovertext,g=v!==void 0&&c1.isArray1D(v),p,_,x=c1.distinctVals(l),y=x.vals,C=c1.distinctVals(u),k=C.vals,S=[],L,w,T=k.length,A=y.length;for(p=0;p{"use strict";var eMt=aa(),tMt=Xt(),f7=Wa().BADNUM;Xbe.exports=function(t,r,n,a){var i,o,s,l,u,c;function f(y){if(eMt(y))return+y}if(r&&r.transpose){for(i=0,u=0;u{"use strict";var rMt=Xt(),Zbe=.01,nMt=[[-1,0],[1,0],[0,-1],[0,1]];function iMt(e){return .5-.25*Math.min(1,e*.5)}Kbe.exports=function(t,r){var n=1,a;for($be(t,r),a=0;aZbe;a++)n=$be(t,r,iMt(n));return n>Zbe&&rMt.log("interp2d didn't converge quickly",n),t};function $be(e,t,r){var n=0,a,i,o,s,l,u,c,f,v,g,p,_,x;for(s=0;s_&&(n=Math.max(n,Math.abs(e[i][o]-p)/(x-_))))}return n}});var v7=fe((Tgr,Jbe)=>{"use strict";var aMt=Xt().maxRowLength;Jbe.exports=function(t){var r=[],n={},a=[],i=t[0],o=[],s=[0,0,0],l=aMt(t),u,c,f,v,g,p,_,x;for(c=0;c=0;g--)v=a[g],c=v[0],f=v[1],p=((n[[c-1,f]]||s)[2]+(n[[c+1,f]]||s)[2]+(n[[c,f-1]]||s)[2]+(n[[c,f+1]]||s)[2])/20,p&&(_[v]=[c,f,p],a.splice(g,1),x=!0);if(!x)throw"findEmpties iterated with no new neighbors";for(v in _)n[v]=_[v],r.push(_[v])}return r.sort(function(y,C){return C[2]-y[2]})}});var $V=fe((Agr,t3e)=>{"use strict";var Qbe=bi(),e3e=Xt().isArrayOrTypedArray;t3e.exports=function(t,r,n,a,i,o){var s=[],l=Qbe.traceIs(t,"contour"),u=Qbe.traceIs(t,"histogram"),c,f,v,g=e3e(r)&&r.length>1;if(g&&!u&&o.type!=="category"){var p=r.length;if(p<=i){if(l)s=Array.from(r).slice(0,i);else if(i===1)o.type==="log"?s=[.5*r[0],2*r[0]]:s=[r[0]-.5,r[0]+.5];else if(o.type==="log"){for(s=[Math.pow(r[0],1.5)/Math.pow(r[1],.5)],v=1;v{"use strict";var r3e=bi(),KV=Xt(),p7=Yi(),n3e=cp(),oMt=Hbe(),sMt=Mh(),lMt=c7(),uMt=h7(),cMt=d7(),fMt=v7(),g7=$V(),JV=Wa().BADNUM;a3e.exports=function(t,r){var n=p7.getFromId(t,r.xaxis||"x"),a=p7.getFromId(t,r.yaxis||"y"),i=r3e.traceIs(r,"contour"),o=r3e.traceIs(r,"histogram"),s=i?"best":r.zsmooth,l,u,c,f,v,g,p,_,x,y,C;if(n._minDtick=0,a._minDtick=0,o)C=oMt(t,r),f=C.orig_x,l=C.x,u=C.x0,c=C.dx,_=C.orig_y,v=C.y,g=C.y0,p=C.dy,x=C.z;else{var k=r.z;KV.isArray1D(k)?(lMt(r,n,a,"x","y",["z"]),l=r._x,v=r._y,k=r._z):(f=r.x?n.makeCalcdata(r,"x"):[],_=r.y?a.makeCalcdata(r,"y"):[],l=n3e(r,n,"x",f).vals,v=n3e(r,a,"y",_).vals,r._x=l,r._y=v),u=r.x0,c=r.dx,g=r.y0,p=r.dy,x=uMt(k,r,n,a)}(n.rangebreaks||a.rangebreaks)&&(x=hMt(l,v,x),o||(l=i3e(l),v=i3e(v),r._x=l,r._y=v)),!o&&(i||r.connectgaps)&&(r._emptypoints=fMt(x),cMt(x,r._emptypoints));function S(R){s=r._input.zsmooth=r.zsmooth=!1,KV.warn('cannot use zsmooth: "fast": '+R)}function L(R){if(R.length>1){var B=(R[R.length-1]-R[0])/(R.length-1),O=Math.abs(B/100);for(y=0;yO)return!1}return!0}r._islinear=!1,n.type==="log"||a.type==="log"?s==="fast"&&S("log axis found"):L(l)?L(v)?r._islinear=!0:s==="fast"&&S("y scale is not linear"):s==="fast"&&S("x scale is not linear");var w=KV.maxRowLength(x),T=r.xtype==="scaled"?"":l,A=g7(r,T,u,c,w,n),m=r.ytype==="scaled"?"":v,F=g7(r,m,g,p,x.length,a);r._extremes[n._id]=p7.findExtremes(n,A),r._extremes[a._id]=p7.findExtremes(a,F);var E={x:A,y:F,z:x,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&f&&(E.orig_x=f),r.yperiodalignment&&_&&(E.orig_y=_),T&&T.length===A.length-1&&(E.xCenter=T),m&&m.length===F.length-1&&(E.yCenter=m),o&&(E.xRanges=C.xRanges,E.yRanges=C.yRanges,E.pts=C.pts),i||sMt(t,r,{vals:x,cLetter:"z"}),i&&r.contours&&r.contours.coloring==="heatmap"){var I={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};E.xfill=g7(I,T,u,c,w,n),E.yfill=g7(I,m,g,p,x.length,a)}return[E]};function i3e(e){for(var t=[],r=e.length,n=0;n{"use strict";y7.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"]];y7.STYLE=y7.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var eG=fe((Egr,s3e)=>{"use strict";var o3e=x7(),dMt=Ji(),QV=Xt(),H3=null;function vMt(){if(H3!==null)return H3;H3=!1;var e=QV.isSafari()||QV.isMacWKWebView()||QV.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(o3e.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")H3=t.some(function(o){return r.apply(null,o)});else{var n=dMt.tester.append("image").attr("style",o3e.STYLE),a=window.getComputedStyle(n.node()),i=a.imageRendering;H3=t.some(function(o){var s=o[1];return i===s||i===s.toLowerCase()}),n.remove()}}return H3}s3e.exports=vMt});var _7=fe((kgr,m3e)=>{"use strict";var l3e=xi(),pMt=bi(),gMt=Ji(),mMt=Yi(),Av=Xt(),u3e=as(),yMt=cC(),c3e=ni(),xMt=js().extractOpts,_Mt=js().makeColorScaleFuncFromTrace,bMt=ev(),wMt=nc(),tG=wMt.LINE_SPACING,TMt=eG(),AMt=x7().STYLE,p3e="heatmap-label";function g3e(e){return e.selectAll("g."+p3e)}function f3e(e){g3e(e).remove()}m3e.exports=function(e,t,r,n){var a=t.xaxis,i=t.yaxis;Av.makeTraceGroups(n,r,"hm").each(function(o){var s=l3e.select(this),l=o[0],u=l.trace,c=u.xgap||0,f=u.ygap||0,v=l.z,g=l.x,p=l.y,_=l.xCenter,x=l.yCenter,y=pMt.traceIs(u,"contour"),C=y?"best":u.zsmooth,k=v.length,S=Av.maxRowLength(v),L=!1,w=!1,T,A,m,F,E,I,R,B;for(I=0;T===void 0&&I0;)A=a.c2p(g[I]),I--;for(A0;)E=i.c2p(p[I]),I--;E=a._length||A<=0||F>=i._length||E<=0;if(V){var K=s.selectAll("image").data([]);K.exit().remove(),f3e(s);return}var ee,ce;O==="fast"?(ee=S,ce=k):(ee=j,ce=q);var me=document.createElement("canvas");me.width=ee,me.height=ce;var ye=me.getContext("2d",{willReadFrequently:!0}),ue=_Mt(u,{noNumericCheck:!0,returnArray:!0}),J,_e;O==="fast"?(J=L?function(oa){return S-1-oa}:Av.identity,_e=w?function(oa){return k-1-oa}:Av.identity):(J=function(oa){return Av.constrain(Math.round(a.c2p(g[oa])-T),0,j)},_e=function(oa){return Av.constrain(Math.round(i.c2p(p[oa])-F),0,q)});var ne=_e(0),ae=[ne,ne],pe=L?0:1,ie=w?0:1,le=0,xe=0,be=0,De=0,Ge,pt,tt,Oe,ze;function ut(oa,Ma=0){if(oa===void 0)return[0,0,0,0];var Ga=ue(oa);return Ga[0]=Math.round(Ga[0]),Ga[1]=Math.round(Ga[1]),Ga[2]=Math.round(Ga[2]),le+=Ma,xe+=Ga[0]*Ma,be+=Ga[1]*Ma,De+=Ga[2]*Ma,Ga}function et(oa,Ma,Ga,ss){var yo=oa[Ga.bin0];if(yo===void 0)return ut(void 0,1);var sl=oa[Ga.bin1],ko=Ma[Ga.bin0],ao=Ma[Ga.bin1],Da=sl-yo||0,bl=ko-yo||0,wo;return sl===void 0?ao===void 0?wo=0:ko===void 0?wo=2*(ao-yo):wo=(2*ao-ko-yo)*2/3:ao===void 0?ko===void 0?wo=0:wo=(2*yo-sl-ko)*2/3:ko===void 0?wo=(2*ao-sl-yo)*2/3:wo=ao+yo-sl-ko,ut(yo+Ga.frac*Da+ss.frac*(bl+Ga.frac*wo))}if(O!=="default"){var qe=0,we;try{we=new Uint8Array(ee*ce*4)}catch(oa){we=new Array(ee*ce*4)}if(O==="smooth"){var Le=_||g,Ke=x||p,Te=new Array(Le.length),Ve=new Array(Ke.length),$e=new Array(j),ot=_?d3e:h3e,rt=x?d3e:h3e,it,We,mt;for(I=0;IKr||Kr>i._length))for(R=ft;Rdn||dn>a._length)){var xr=yMt({x:Nr,y:pr},u,e._fullLayout);xr.x=Nr,xr.y=pr;var Fr=l.z[I][R];Fr===void 0?(xr.z="",xr.zLabel=""):(xr.z=Fr,xr.zLabel=mMt.tickText(Ct,Fr,"hover").text);var Zr=l.text&&l.text[I]&&l.text[I][R];(Zr===void 0||Zr===!1)&&(Zr=""),xr.text=Zr;var Cn=Av.texttemplateString({data:[xr,u._meta],fallback:u.texttemplatefallback,labels:xr,locale:e._fullLayout._d3locale,template:Ot});if(Cn){var Dt=Cn.split("
"),At=Dt.length,Vt=0;for(B=0;B{"use strict";y3e.exports={min:"zmin",max:"zmax"}});var b7=fe((Lgr,x3e)=>{"use strict";var MMt=xi();x3e.exports=function(t){MMt.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var T7=fe((Pgr,b3e)=>{"use strict";var _3e=kl(),qA=Xt(),w7=qA.isArrayOrTypedArray,SMt=Yi(),EMt=js().extractOpts;b3e.exports=function(t,r,n,a,i){i||(i={});var o=i.isContour,s=t.cd[0],l=s.trace,u=t.xa,c=t.ya,f=s.x,v=s.y,g=s.z,p=s.xCenter,_=s.yCenter,x=s.zmask,y=l.zhoverformat,C=f,k=v,S,L,w,T;if(t.index!==!1){try{w=Math.round(t.index[1]),T=Math.round(t.index[0])}catch(K){qA.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(w<0||w>=g[0].length||T<0||T>g.length)return}else{if(_3e.inbox(r-f[0],r-f[f.length-1],0)>0||_3e.inbox(n-v[0],n-v[v.length-1],0)>0)return;if(o){var A;for(C=[2*f[0]-f[1]],A=1;A{"use strict";w3e.exports={attributes:N3(),supplyDefaults:_be(),calc:m7(),plot:_7(),colorbar:j3(),style:b7(),hoverPoints:T7(),moduleType:"trace",name:"heatmap",basePlotModule:gu(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var M3e=fe((Dgr,A3e)=>{"use strict";A3e.exports=T3e()});var rG=fe((Rgr,S3e)=>{"use strict";S3e.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var k3e=fe((Igr,E3e)=>{"use strict";E3e.exports={eventDataKeys:["binNumber"]}});var A7=fe((zgr,F3e)=>{"use strict";var o0=u1(),C3e=pl().axisHoverFormat,{hovertemplateAttrs:kMt,texttemplateAttrs:CMt,templatefallbackAttrs:L3e}=Oo(),nG=Ds(),P3e=rG(),LMt=k3e(),iG=ta().extendFlat;F3e.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:C3e("x"),yhoverformat:C3e("y"),text:iG({},o0.text,{}),hovertext:iG({},o0.hovertext,{}),orientation:o0.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:P3e("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:P3e("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:kMt({},{keys:LMt.eventDataKeys}),hovertemplatefallback:L3e(),texttemplate:CMt({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:L3e({editType:"plot"}),textposition:iG({},o0.textposition,{arrayOk:!1}),textfont:nG({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:nG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:nG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:o0.insidetextanchor,textangle:o0.textangle,cliponaxis:o0.cliponaxis,constraintext:o0.constraintext,marker:o0.marker,offsetgroup:o0.offsetgroup,alignmentgroup:o0.alignmentgroup,selected:o0.selected,unselected:o0.unselected,zorder:o0.zorder}});var z3e=fe((qgr,I3e)=>{"use strict";var D3e=bi(),BA=Xt(),R3e=ni(),PMt=q0().handleText,FMt=ZC(),DMt=A7();I3e.exports=function(t,r,n,a){function i(C,k){return BA.coerce(t,r,DMt,C,k)}var o=i("x"),s=i("y"),l=i("cumulative.enabled");l&&(i("cumulative.direction"),i("cumulative.currentbin")),i("text");var u=i("textposition");PMt(t,r,a,i,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat");var c=i("orientation",s&&!o?"h":"v"),f=c==="v"?"x":"y",v=c==="v"?"y":"x",g=o&&s?Math.min(BA.minRowLength(o)&&BA.minRowLength(s)):BA.minRowLength(r[f]||[]);if(!g){r.visible=!1;return}r._length=g;var p=D3e.getComponentMethod("calendars","handleTraceDefaults");p(t,r,["x","y"],a);var _=r[v];_&&i("histfunc"),i("histnorm"),i("autobin"+f),FMt(t,r,i,n,a),BA.coerceSelectionMarkerOpacity(r,i);var x=(r.marker.line||{}).color,y=D3e.getComponentMethod("errorbars","supplyDefaults");y(t,r,x||R3e.defaultLine,{axis:"y"}),y(t,r,x||R3e.defaultLine,{axis:"x",inherit:"y"}),i("zorder")}});var S7=fe((Bgr,O3e)=>{"use strict";var OA=Xt(),RMt=El(),M7=bi().traceIs,IMt=nx(),zMt=q0().validateCornerradius,q3e=OA.nestedProperty,aG=J2().getAxisGroup,B3e=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],qMt=["x","y"];O3e.exports=function(t,r){var n=r._histogramBinOpts={},a=[],i={},o=[],s,l,u,c,f,v,g;function p(O,U){return OA.coerce(s._input,s,s._module.attributes,O,U)}function _(O){return O.orientation==="v"?"x":"y"}function x(O,U){var j=RMt.getFromTrace({_fullLayout:r},O,U);return j.type}function y(O,U,j){var q=O.uid+"__"+j;U||(U=q);var V=x(O,j),K=O[j+"calendar"]||"",ee=n[U],ce=!0;ee&&(V===ee.axType&&K===ee.calendar?(ce=!1,ee.traces.push(O),ee.dirs.push(j)):(U=q,V!==ee.axType&&OA.warn(["Attempted to group the bins of trace",O.index,"set on a","type:"+V,"axis","with bins on","type:"+ee.axType,"axis."].join(" ")),K!==ee.calendar&&OA.warn(["Attempted to group the bins of trace",O.index,"set with a",K,"calendar","with bins",ee.calendar?"on a "+ee.calendar+" calendar":"w/o a set calendar"].join(" ")))),ce&&(n[U]={traces:[O],dirs:[j],axType:V,calendar:O[j+"calendar"]||""}),O["_"+j+"bingroup"]=U}for(f=0;f{"use strict";var BMt=z3().hoverPoints,OMt=Yi().hoverLabelText;N3e.exports=function(t,r,n,a,i){var o=BMt(t,r,n,a,i);if(o){t=o[0];var s=t.cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var u=l.orientation==="h"?"y":"x";t[u+"Label"]=OMt(t[u+"a"],[s.ph0,s.ph1],l[u+"hoverformat"])}return o}}});var oG=fe((Ngr,V3e)=>{"use strict";V3e.exports=function(t,r,n,a,i){if(t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(t.z=r.zLabelVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),!(n.cumulative||{}).enabled){var o=Array.isArray(i)?a[0].pts[i[0]][i[1]]:a[i].pts;t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex,t.pointIndices=o}return t}});var H3e=fe((Ugr,G3e)=>{"use strict";G3e.exports={attributes:A7(),layoutAttributes:XC(),supplyDefaults:z3e(),crossTraceDefaults:S7(),supplyLayoutDefaults:SV(),calc:ZV().calc,crossTraceCalc:ix().crossTraceCalc,plot:mx().plot,layerName:"barlayer",style:_v().style,styleOnSelect:_v().styleOnSelect,colorbar:Zf(),hoverPoints:U3e(),selectPoints:q3(),eventData:oG(),moduleType:"trace",name:"histogram",basePlotModule:gu(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var W3e=fe((Vgr,j3e)=>{"use strict";j3e.exports=H3e()});var k7=fe((Ggr,Z3e)=>{"use strict";var _p=A7(),Y3e=rG(),E7=N3(),NMt=Ho(),sG=pl().axisHoverFormat,{hovertemplateAttrs:UMt,texttemplateAttrs:VMt,templatefallbackAttrs:X3e}=Oo(),GMt=_s(),NA=ta().extendFlat;Z3e.exports=NA({x:_p.x,y:_p.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:_p.histnorm,histfunc:_p.histfunc,nbinsx:_p.nbinsx,xbins:Y3e("x"),nbinsy:_p.nbinsy,ybins:Y3e("y"),autobinx:_p.autobinx,autobiny:_p.autobiny,bingroup:NA({},_p.bingroup,{}),xbingroup:NA({},_p.bingroup,{}),ybingroup:NA({},_p.bingroup,{}),xgap:E7.xgap,ygap:E7.ygap,zsmooth:E7.zsmooth,xhoverformat:sG("x"),yhoverformat:sG("y"),zhoverformat:sG("z",1),hovertemplate:UMt({},{keys:["z"]}),hovertemplatefallback:X3e(),texttemplate:VMt({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:X3e({editType:"plot"}),textfont:E7.textfont,showlegend:NA({},NMt.showlegend,{dflt:!1})},GMt("",{cLetter:"z",autoColorDflt:!1}))});var lG=fe((Hgr,K3e)=>{"use strict";var HMt=bi(),$3e=Xt();K3e.exports=function(t,r,n,a){var i=n("x"),o=n("y"),s=$3e.minRowLength(i),l=$3e.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=HMt.getComponentMethod("calendars","handleTraceDefaults");u(t,r,["x","y"],a);var c=n("z")||n("marker.color");c&&n("histfunc"),n("histnorm"),n("autobinx"),n("autobiny")}});var Q3e=fe((jgr,J3e)=>{"use strict";var jMt=Xt(),WMt=lG(),YMt=VV(),XMt=Vc(),ZMt=zA(),$Mt=k7();J3e.exports=function(t,r,n,a){function i(o,s){return jMt.coerce(t,r,$Mt,o,s)}WMt(t,r,i,a),r.visible!==!1&&(YMt(t,r,i,a),XMt(t,r,a,i,{prefix:"",cLetter:"z"}),i("hovertemplate"),i("hovertemplatefallback"),ZMt(i,a),i("xhoverformat"),i("yhoverformat"))}});var rwe=fe((Wgr,twe)=>{"use strict";var KMt=T7(),ewe=Yi().hoverLabelText;twe.exports=function(t,r,n,a,i){var o=KMt(t,r,n,a,i);if(o){t=o[0];var s=t.index,l=s[0],u=s[1],c=t.cd[0],f=c.trace,v=c.xRanges[u],g=c.yRanges[l];return t.xLabel=ewe(t.xa,[v[0],v[1]],f.xhoverformat),t.yLabel=ewe(t.ya,[g[0],g[1]],f.yhoverformat),o}}});var iwe=fe((Ygr,nwe)=>{"use strict";nwe.exports={attributes:k7(),supplyDefaults:Q3e(),crossTraceDefaults:S7(),calc:m7(),plot:_7(),layerName:"heatmaplayer",colorbar:j3(),style:b7(),hoverPoints:rwe(),eventData:oG(),moduleType:"trace",name:"histogram2d",basePlotModule:gu(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var owe=fe((Xgr,awe)=>{"use strict";awe.exports=iwe()});var C7=fe((Zgr,swe)=>{"use strict";swe.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var UA=fe(($gr,fwe)=>{"use strict";var Bu=N3(),L7=Ol(),uwe=pl(),uG=uwe.axisHoverFormat,JMt=uwe.descriptionOnlyNumbers,QMt=_s(),eSt=Uc().dash,tSt=Ds(),W3=ta().extendFlat,cwe=C7(),rSt=cwe.COMPARISON_OPS2,nSt=cwe.INTERVAL_OPS,lwe=L7.line;fwe.exports=W3({z:Bu.z,x:Bu.x,x0:Bu.x0,dx:Bu.dx,y:Bu.y,y0:Bu.y0,dy:Bu.dy,xperiod:Bu.xperiod,yperiod:Bu.yperiod,xperiod0:L7.xperiod0,yperiod0:L7.yperiod0,xperiodalignment:Bu.xperiodalignment,yperiodalignment:Bu.yperiodalignment,text:Bu.text,hovertext:Bu.hovertext,transpose:Bu.transpose,xtype:Bu.xtype,ytype:Bu.ytype,xhoverformat:uG("x"),yhoverformat:uG("y"),zhoverformat:uG("z",1),hovertemplate:Bu.hovertemplate,hovertemplatefallback:Bu.hovertemplatefallback,texttemplate:W3({},Bu.texttemplate,{}),texttemplatefallback:Bu.texttemplatefallback,textfont:W3({},Bu.textfont,{}),hoverongaps:Bu.hoverongaps,connectgaps:W3({},Bu.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:tSt({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:JMt("contour label")},operation:{valType:"enumerated",values:[].concat(rSt).concat(nSt),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:W3({},lwe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:eSt,smoothing:W3({},lwe.smoothing,{}),editType:"plot"},zorder:L7.zorder},QMt("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var fG=fe((Kgr,dwe)=>{"use strict";var Ch=k7(),f1=UA(),iSt=_s(),cG=pl().axisHoverFormat,hwe=ta().extendFlat;dwe.exports=hwe({x:Ch.x,y:Ch.y,z:Ch.z,marker:Ch.marker,histnorm:Ch.histnorm,histfunc:Ch.histfunc,nbinsx:Ch.nbinsx,xbins:Ch.xbins,nbinsy:Ch.nbinsy,ybins:Ch.ybins,autobinx:Ch.autobinx,autobiny:Ch.autobiny,bingroup:Ch.bingroup,xbingroup:Ch.xbingroup,ybingroup:Ch.ybingroup,autocontour:f1.autocontour,ncontours:f1.ncontours,contours:f1.contours,line:{color:f1.line.color,width:hwe({},f1.line.width,{dflt:.5}),dash:f1.line.dash,smoothing:f1.line.smoothing,editType:"plot"},xhoverformat:cG("x"),yhoverformat:cG("y"),zhoverformat:cG("z",1),hovertemplate:Ch.hovertemplate,hovertemplatefallback:Ch.hovertemplatefallback,texttemplate:f1.texttemplate,texttemplatefallback:f1.texttemplatefallback,textfont:f1.textfont},iSt("",{cLetter:"z",editTypeOverride:"calc"}))});var P7=fe((Jgr,vwe)=>{"use strict";vwe.exports=function(t,r,n,a){var i=a("contours.start"),o=a("contours.end"),s=i===!1||o===!1,l=n("contours.size"),u;s?u=r.autocontour=!0:u=n("autocontour",!1),(u||!l)&&n("ncontours")}});var hG=fe((Qgr,pwe)=>{"use strict";var aSt=Xt();pwe.exports=function(t,r,n,a){a||(a={});var i=t("contours.showlabels");if(i){var o=r.font;aSt.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:n}}),t("contours.labelformat")}a.hasHover!==!1&&t("zhoverformat")}});var F7=fe((emr,gwe)=>{"use strict";var oSt=Vc(),sSt=hG();gwe.exports=function(t,r,n,a,i){var o=n("contours.coloring"),s,l="";o==="fill"&&(s=n("contours.showlines")),s!==!1&&(o!=="lines"&&(l=n("line.color","#000")),n("line.width",.5),n("line.dash")),o!=="none"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,oSt(t,r,a,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),sSt(n,a,l,i)}});var _we=fe((tmr,xwe)=>{"use strict";var mwe=Xt(),lSt=lG(),uSt=P7(),cSt=F7(),fSt=zA(),ywe=fG();xwe.exports=function(t,r,n,a){function i(s,l){return mwe.coerce(t,r,ywe,s,l)}function o(s){return mwe.coerce2(t,r,ywe,s)}lSt(t,r,i,a),r.visible!==!1&&(uSt(t,r,i,o),cSt(t,r,i,a),i("xhoverformat"),i("yhoverformat"),i("hovertemplate"),i("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&fSt(i,a))}});var pG=fe((rmr,wwe)=>{"use strict";var vG=Yi(),dG=Xt();wwe.exports=function(t,r){var n=t.contours;if(t.autocontour){var a=t.zmin,i=t.zmax;(t.zauto||a===void 0)&&(a=dG.aggNums(Math.min,null,r)),(t.zauto||i===void 0)&&(i=dG.aggNums(Math.max,null,r));var o=bwe(a,i,t.ncontours);n.size=o.dtick,n.start=vG.tickFirst(o),o.range.reverse(),n.end=vG.tickFirst(o),n.start===a&&(n.start+=n.size),n.end===i&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),t._input.contours||(t._input.contours={}),dG.extendFlat(t._input.contours,{start:n.start,end:n.end,size:n.size}),t._input.autocontour=!0}else if(n.type!=="constraint"){var s=n.start,l=n.end,u=t._input.contours;if(s>l&&(n.start=u.start=l,l=n.end=u.end=s,s=n.start),!(n.size>0)){var c;s===l?c=1:c=bwe(s,l,t.ncontours).dtick,u.size=n.size=c}}};function bwe(e,t,r){var n={type:"linear",range:[e,t]};return vG.autoTicks(n,(t-e)/(r||15)),n}});var VA=fe((nmr,Twe)=>{"use strict";Twe.exports=function(t){return t.end+t.size/1e6}});var gG=fe((imr,Mwe)=>{"use strict";var Awe=js(),hSt=m7(),dSt=pG(),vSt=VA();Mwe.exports=function(t,r){var n=hSt(t,r),a=n[0].z;dSt(r,a);var i=r.contours,o=Awe.extractOpts(r),s;if(i.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var l=i.start,u=vSt(i),c=i.size||1,f=Math.floor((u-l)/c)+1;isFinite(c)||(c=1,f=1);var v=l-c/2,g=v+f*c;s=[v,g]}else s=a;return Awe.calc(t,r,{vals:s,cLetter:"z"}),n}});var GA=fe((amr,Swe)=>{"use strict";Swe.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}}});var mG=fe((omr,Ewe)=>{"use strict";var D7=GA();Ewe.exports=function(t){var r=t[0].z,n=r.length,a=r[0].length,i=n===2||a===2,o,s,l,u,c,f,v,g,p;for(s=0;se?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);if(r===5||r===10){var n=(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4;return e>n?r===5?713:1114:r===5?104:208}return r===15?0:r}});var yG=fe((smr,Lwe)=>{"use strict";var R7=Xt(),Y3=GA();Lwe.exports=function(t,r,n){var a,i,o,s,l;for(r=r||.01,n=n||.01,o=0;o20?(o=Y3.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[i]=Y3.SADDLEREMAINDER[o]):delete e.crossings[i],s=Y3.NEWDELTA[o],!s){R7.log("Found bad marching index:",o,t,e.level);break}l.push(Cwe(e,t,s)),t[0]+=s[0],t[1]+=s[1],i=t.join(","),HA(l[l.length-1],l[l.length-2],n,a)&&l.pop();var p=s[0]&&(t[0]<0||t[0]>c-2)||s[1]&&(t[1]<0||t[1]>u-2),_=t[0]===f[0]&&t[1]===f[1]&&s[0]===v[0]&&s[1]===v[1];if(_||r&&p)break;o=e.crossings[i]}g===1e4&&R7.log("Infinite loop in contour?");var x=HA(l[0],l[l.length-1],n,a),y=0,C=.2*e.smoothing,k=[],S=0,L,w,T,A,m,F,E,I,R,B,O;for(g=1;g=S;g--)if(L=k[g],L=S&&L+k[w]I&&R--,e.edgepaths[R]=O.concat(l,B));break}V||(e.edgepaths[I]=l.concat(B))}for(I=0;I20&&t?e===208||e===1114?n=r[0]===0?1:-1:a=r[1]===0?1:-1:Y3.BOTTOMSTART.indexOf(e)!==-1?a=1:Y3.LEFTSTART.indexOf(e)!==-1?n=1:Y3.TOPSTART.indexOf(e)!==-1?a=-1:n=-1,[n,a]}function Cwe(e,t,r){var n=t[0]+Math.max(r[0],0),a=t[1]+Math.max(r[1],0),i=e.z[a][n],o=e.xaxis,s=e.yaxis;if(r[1]){var l=(e.level-i)/(e.z[a][n+1]-i),u=(l!==1?(1-l)*o.c2l(e.x[n]):0)+(l!==0?l*o.c2l(e.x[n+1]):0);return[o.c2p(o.l2c(u),!0),s.c2p(e.y[a],!0),n+l,a]}else{var c=(e.level-i)/(e.z[a+1][n]-i),f=(c!==1?(1-c)*s.c2l(e.y[a]):0)+(c!==0?c*s.c2l(e.y[a+1]):0);return[o.c2p(e.x[n],!0),s.c2p(s.l2c(f),!0),n,a+c]}}});var Rwe=fe((lmr,Dwe)=>{"use strict";var xG=C7(),ySt=aa();Dwe.exports={"[]":Pwe("[]"),"][":Pwe("]["),">":_G(">"),"<":_G("<"),"=":_G("=")};function Fwe(e,t){var r=Array.isArray(t),n;function a(i){return ySt(i)?+i:null}return xG.COMPARISON_OPS2.indexOf(e)!==-1?n=a(r?t[0]:t):xG.INTERVAL_OPS.indexOf(e)!==-1?n=r?[a(t[0]),a(t[1])]:[a(t),a(t)]:xG.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(a):[a(t)]),n}function Pwe(e){return function(t){t=Fwe(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function _G(e){return function(t){return t=Fwe(e,t),{start:t,end:1/0,size:1/0}}}});var bG=fe((umr,zwe)=>{"use strict";var Iwe=Xt(),xSt=Rwe(),_St=VA();zwe.exports=function(t,r,n){for(var a=t.type==="constraint"?xSt[t._operation](t.value):t,i=a.size,o=[],s=_St(a),l=n.trace._carpetTrace,u=l?{xaxis:l.aaxis,yaxis:l.baxis,x:n.a,y:n.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:n.x,y:n.y},c=a.start;c1e3){Iwe.warn("Too many contours, clipping at 1000",t);break}return o}});var wG=fe((cmr,Bwe)=>{"use strict";var X3=Xt();Bwe.exports=function(e,t){var r,n,a,i=function(l){return l.reverse()},o=function(l){return l};switch(t){case"=":case"<":return e;case">":for(e.length!==1&&X3.warn("Contour data invalid for the specified inequality operation."),n=e[0],r=0;r{"use strict";Owe.exports=function(e,t){var r=e[0],n=r.z,a;switch(t.type){case"levels":var i=Math.min(n[0][0],n[0][1]);for(a=0;ao.level||o.starts.length&&i===o.level)}break;case"constraint":if(r.prefixBoundary=!1,r.edgepaths.length)return;var s=r.x.length,l=r.y.length,u=-1/0,c=1/0;for(a=0;a":f>u&&(r.prefixBoundary=!0);break;case"<":(fu||r.starts.length&&g===c)&&(r.prefixBoundary=!0);break;case"][":v=Math.min(f[0],f[1]),g=Math.max(f[0],f[1]),vu&&(r.prefixBoundary=!0);break}break}}});var I7=fe(ld=>{"use strict";var WA=xi(),yf=Xt(),dg=Ji(),bSt=js(),Vwe=as(),Nwe=Yi(),Uwe=Hp(),wSt=_7(),Gwe=mG(),Hwe=yG(),TSt=bG(),ASt=wG(),jwe=TG(),jA=GA(),h1=jA.LABELOPTIMIZER;ld.plot=function(t,r,n,a){var i=r.xaxis,o=r.yaxis;yf.makeTraceGroups(a,n,"contour").each(function(s){var l=WA.select(this),u=s[0],c=u.trace,f=u.x,v=u.y,g=c.contours,p=TSt(g,r,u),_=yf.ensureSingle(l,"g","heatmapcoloring"),x=[];g.coloring==="heatmap"&&(x=[s]),wSt(t,r,x,_),Gwe(p),Hwe(p);var y=i.c2p(f[0],!0),C=i.c2p(f[f.length-1],!0),k=o.c2p(v[0],!0),S=o.c2p(v[v.length-1],!0),L=[[y,S],[C,S],[C,k],[y,k]],w=p;g.type==="constraint"&&(w=ASt(p,g._operation)),MSt(l,L,g),SSt(l,w,L,g),ESt(l,p,t,u,g),CSt(l,r,t,u,L)})};function MSt(e,t,r){var n=yf.ensureSingle(e,"g","contourbg"),a=n.selectAll("path").data(r.coloring==="fill"?[0]:[]);a.enter().append("path"),a.exit().remove(),a.attr("d","M"+t.join("L")+"Z").style("stroke","none")}function SSt(e,t,r,n){var a=n.coloring==="fill"||n.type==="constraint"&&n._operation!=="=",i="M"+r.join("L")+"Z";a&&jwe(t,n);var o=yf.ensureSingle(e,"g","contourfill"),s=o.selectAll("path").data(a?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(l){var u=(l.prefixBoundary?i:"")+Wwe(l,r);u?WA.select(this).attr("d",u).style("stroke","none"):WA.select(this).remove()})}function Wwe(e,t){var r="",n=0,a=e.edgepaths.map(function(y,C){return C}),i=!0,o,s,l,u,c,f;function v(y){return Math.abs(y[1]-t[0][1])<.01}function g(y){return Math.abs(y[1]-t[2][1])<.01}function p(y){return Math.abs(y[0]-t[0][0])<.01}function _(y){return Math.abs(y[0]-t[2][0])<.01}for(;a.length;){for(f=dg.smoothopen(e.edgepaths[n],e.smoothing),r+=i?f:f.replace(/^M/,"L"),a.splice(a.indexOf(n),1),o=e.edgepaths[n][e.edgepaths[n].length-1],u=-1,l=0;l<4;l++){if(!o){yf.log("Missing end?",n,e);break}for(v(o)&&!_(o)?s=t[1]:p(o)?s=t[0]:g(o)?s=t[3]:_(o)&&(s=t[2]),c=0;c=0&&(s=x,u=c):Math.abs(o[1]-s[1])<.01?Math.abs(o[1]-x[1])<.01&&(x[0]-o[0])*(s[0]-x[0])>=0&&(s=x,u=c):yf.log("endpt to newendpt is not vert. or horz.",o,s,x)}if(o=s,u>=0)break;r+="L"+s}if(u===e.edgepaths.length){yf.log("unclosed perimeter path");break}n=u,i=a.indexOf(n)===-1,i&&(n=a[0],r+="Z")}for(n=0;nh1.MAXCOST*2)break;v&&(s/=2),o=u-s/2,l=o+s*1.5}if(f<=h1.MAXCOST)return c};function kSt(e,t,r,n){var a=t.width/2,i=t.height/2,o=e.x,s=e.y,l=e.theta,u=Math.cos(l)*a,c=Math.sin(l)*a,f=(o>n.center?n.right-o:o-n.left)/(u+Math.abs(Math.sin(l)*i)),v=(s>n.middle?n.bottom-s:s-n.top)/(Math.abs(c)+Math.cos(l)*i);if(f<1||v<1)return 1/0;var g=h1.EDGECOST*(1/(f-1)+1/(v-1));g+=h1.ANGLECOST*l*l;for(var p=o-u,_=s-c,x=o+u,y=s+c,C=0;C{"use strict";var PSt=xi(),AG=js(),FSt=VA();Ywe.exports=function(t){var r=t.contours,n=r.start,a=FSt(r),i=r.size||1,o=Math.floor((a-n)/i)+1,s=r.coloring==="lines"?0:1,l=AG.extractOpts(t);isFinite(i)||(i=1,o=1);var u=l.reversescale?AG.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),v=new Array(c),g,p,_=l.min,x=l.max;if(r.coloring==="heatmap"){for(p=0;p=x)&&(n<=_&&(n=_),a>=x&&(a=x),o=Math.floor((a-n)/i)+1,s=0),p=0;p_&&(f.unshift(_),v.unshift(v[0])),f[f.length-1]{"use strict";var z7=xi(),Xwe=Ji(),DSt=b7(),RSt=MG();Zwe.exports=function(t){var r=z7.select(t).selectAll("g.contour");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var a=z7.select(this),i=n[0].trace,o=i.contours,s=i.line,l=o.size||1,u=o.start,c=o.type==="constraint",f=!c&&o.coloring==="lines",v=!c&&o.coloring==="fill",g=f||v?RSt(i):null;a.selectAll("g.contourlevel").each(function(x){z7.select(this).selectAll("path").call(Xwe.lineGroupStyle,s.width,f?g(x.level):s.color,s.dash)});var p=o.labelfont;if(a.selectAll("g.contourlabels text").each(function(x){Xwe.font(z7.select(this),{weight:p.weight,style:p.style,variant:p.variant,textcase:p.textcase,lineposition:p.lineposition,shadow:p.shadow,family:p.family,size:p.size,color:p.color||(f?g(x.level):s.color)})}),c)a.selectAll("g.contourfill path").style("fill",i.fillcolor);else if(v){var _;a.selectAll("g.contourfill path").style("fill",function(x){return _===void 0&&(_=x.level),g(x.level+.5*l)}),_===void 0&&(_=u),a.selectAll("g.contourbg path").style("fill",g(_-.5*l))}}),DSt(t)}});var B7=fe((pmr,Kwe)=>{"use strict";var $we=js(),ISt=MG(),zSt=VA();function qSt(e,t,r){var n=t.contours,a=t.line,i=n.size||1,o=n.coloring,s=ISt(t,{isColorbar:!0});if(o==="heatmap"){var l=$we.extractOpts(t);r._fillgradient=l.reversescale?$we.flipScale(l.colorscale):l.colorscale,r._zrange=[l.min,l.max]}else o==="fill"&&(r._fillcolor=s);r._line={color:o==="lines"?s:a.color,width:n.showlines!==!1?a.width:0,dash:a.dash},r._levels={start:n.start,end:zSt(n),size:i}}Kwe.exports={min:"zmin",max:"zmax",calc:qSt}});var SG=fe((gmr,Jwe)=>{"use strict";var O7=ni(),BSt=T7();Jwe.exports=function(t,r,n,a,i){i||(i={}),i.isContour=!0;var o=BSt(t,r,n,a,i);return o&&o.forEach(function(s){var l=s.trace;l.contours.type==="constraint"&&(l.fillcolor&&O7.opacity(l.fillcolor)?s.color=O7.addOpacity(l.fillcolor,1):l.contours.showlines&&O7.opacity(l.line.color)&&(s.color=O7.addOpacity(l.line.color,1)))}),o}});var e5e=fe((mmr,Qwe)=>{"use strict";Qwe.exports={attributes:fG(),supplyDefaults:_we(),crossTraceDefaults:S7(),calc:gG(),plot:I7().plot,layerName:"contourlayer",style:q7(),colorbar:B7(),hoverPoints:SG(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:gu(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var r5e=fe((ymr,t5e)=>{"use strict";t5e.exports=e5e()});var EG=fe((xmr,l5e)=>{"use strict";var n5e=aa(),OSt=hG(),o5e=ni(),i5e=o5e.addOpacity,NSt=o5e.opacity,s5e=C7(),a5e=Xt().isArrayOrTypedArray,USt=s5e.CONSTRAINT_REDUCTION,VSt=s5e.COMPARISON_OPS2;l5e.exports=function(t,r,n,a,i,o){var s=r.contours,l,u,c,f=n("contours.operation");if(s._operation=USt[f],GSt(n,s),f==="="?l=s.showlines=!0:(l=n("contours.showlines"),c=n("fillcolor",i5e((t.line||{}).color||i,.5))),l){var v=c&&NSt(c)?i5e(r.fillcolor,1):i;u=n("line.color",v),n("line.width",2),n("line.dash")}n("line.smoothing"),OSt(n,a,u,o)};function GSt(e,t){var r;VSt.indexOf(t.operation)===-1?(e("contours.value",[0,1]),a5e(t.value)?t.value.length>2?t.value=t.value.slice(2):t.length===0?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:n5e(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),n5e(t.value)||(a5e(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var f5e=fe((_mr,c5e)=>{"use strict";var kG=Xt(),HSt=s7(),jSt=sp(),WSt=EG(),YSt=P7(),XSt=F7(),ZSt=zA(),u5e=UA();c5e.exports=function(t,r,n,a){function i(u,c){return kG.coerce(t,r,u5e,u,c)}function o(u){return kG.coerce2(t,r,u5e,u)}var s=HSt(t,r,i,a);if(!s){r.visible=!1;return}jSt(t,r,a,i),i("xhoverformat"),i("yhoverformat"),i("text"),i("hovertext"),i("hoverongaps"),i("hovertemplate"),i("hovertemplatefallback");var l=i("contours.type")==="constraint";i("connectgaps",kG.isArray1D(r.z)),l?WSt(t,r,i,a,n):(YSt(t,r,i,o),XSt(t,r,i,a)),r.contours&&r.contours.coloring==="heatmap"&&ZSt(i,a),i("zorder")}});var d5e=fe((bmr,h5e)=>{"use strict";h5e.exports={attributes:UA(),supplyDefaults:f5e(),calc:gG(),plot:I7().plot,style:q7(),colorbar:B7(),hoverPoints:SG(),moduleType:"trace",name:"contour",basePlotModule:gu(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var p5e=fe((wmr,v5e)=>{"use strict";v5e.exports=d5e()});var CG=fe((Tmr,x5e)=>{"use strict";var{hovertemplateAttrs:$St,texttemplateAttrs:KSt,templatefallbackAttrs:g5e}=Oo(),JSt=n1(),N0=Ol(),QSt=Ho(),m5e=_s(),eEt=Uc().dash,jm=ta().extendFlat,Mv=N0.marker,YA=N0.line,y5e=Mv.line;x5e.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:jm({},N0.mode,{dflt:"markers"}),text:jm({},N0.text,{}),texttemplate:KSt({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:g5e({editType:"plot"}),hovertext:jm({},N0.hovertext,{}),line:{color:YA.color,width:YA.width,dash:eEt,backoff:YA.backoff,shape:jm({},YA.shape,{values:["linear","spline"]}),smoothing:YA.smoothing,editType:"calc"},connectgaps:N0.connectgaps,cliponaxis:N0.cliponaxis,fill:jm({},N0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:JSt(),marker:jm({symbol:Mv.symbol,opacity:Mv.opacity,angle:Mv.angle,angleref:Mv.angleref,standoff:Mv.standoff,maxdisplayed:Mv.maxdisplayed,size:Mv.size,sizeref:Mv.sizeref,sizemin:Mv.sizemin,sizemode:Mv.sizemode,line:jm({width:y5e.width,dash:y5e.dash,editType:"calc"},m5e("marker.line")),gradient:Mv.gradient,editType:"calc"},m5e("marker")),textfont:N0.textfont,textposition:N0.textposition,selected:N0.selected,unselected:N0.unselected,hoverinfo:jm({},QSt.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:N0.hoveron,hovertemplate:$St(),hovertemplatefallback:g5e()}});var T5e=fe((Amr,w5e)=>{"use strict";var _5e=Xt(),tEt=r1(),Z3=Is(),rEt=vv(),nEt=lp(),b5e=h3(),iEt=up(),aEt=a1(),oEt=CG();w5e.exports=function(t,r,n,a){function i(v,g){return _5e.coerce(t,r,oEt,v,g)}var o=i("a"),s=i("b"),l=i("c"),u;if(o?(u=o.length,s?(u=Math.min(u,s.length),l&&(u=Math.min(u,l.length))):l?u=Math.min(u,l.length):u=0):s&&l&&(u=Math.min(s.length,l.length)),!u){r.visible=!1;return}r._length=u,i("sum"),i("text"),i("hovertext"),r.hoveron!=="fills"&&(i("hovertemplate"),i("hovertemplatefallback"));var c=u{"use strict";var LG=Yi();A5e.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot;return a.aLabel=LG.tickText(i.aaxis,t.a,!0).text,a.bLabel=LG.tickText(i.baxis,t.b,!0).text,a.cLabel=LG.tickText(i.caxis,t.c,!0).text,a}});var C5e=fe((Smr,k5e)=>{"use strict";var PG=aa(),sEt=pv(),lEt=o1(),uEt=F0(),cEt=gv().calcMarkerSize,S5e=["a","b","c"],E5e={a:["b","c"],b:["a","c"],c:["a","b"]};k5e.exports=function(t,r){var n=t._fullLayout[r.subplot],a=n.sum,i=r.sum||a,o={a:r.a,b:r.b,c:r.c},s=r.ids,l,u,c,f,v,g;for(l=0;l{"use strict";var fEt=y3();L5e.exports=function(t,r,n){var a=r.plotContainer;a.select(".scatterlayer").selectAll("*").remove();for(var i=r.xaxis,o=r.yaxis,s={xaxis:i,yaxis:o,plot:a,layerClipId:r._hasClipOnAxisFalse?r.clipIdRelative:null},l=r.layers.frontplot.select("g.scatterlayer"),u=0;u{"use strict";var hEt=w3();F5e.exports=function(t,r,n,a){var i=hEt(t,r,n,a);if(!i||i[0].index===!1)return;var o=i[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),i}var f=o.cd[o.index],v=o.trace,g=o.subplot;o.a=f.a,o.b=f.b,o.c=f.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var p={};p[v.subplot]={_subplot:g};var _=v._module.formatLabels(f,v,p);o.aLabel=_.aLabel,o.bLabel=_.bLabel,o.cLabel=_.cLabel;var x=f.hi||v.hoverinfo,y=[];function C(S,L){y.push(S._hovertitle+": "+L)}if(!v.hovertemplate){var k=x.split("+");k.indexOf("all")!==-1&&(k=["a","b","c"]),k.indexOf("a")!==-1&&C(g.aaxis,o.aLabel),k.indexOf("b")!==-1&&C(g.baxis,o.bLabel),k.indexOf("c")!==-1&&C(g.caxis,o.cLabel)}return o.extraText=y.join("
"),o.hovertemplate=v.hovertemplate,i}});var I5e=fe((Cmr,R5e)=>{"use strict";R5e.exports=function(t,r,n,a,i){if(r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),a[i]){var o=a[i];t.a=o.a,t.b=o.b,t.c=o.c}else t.a=r.a,t.b=r.b,t.c=r.c;return t}});var W5e=fe((Lmr,j5e)=>{"use strict";var U5e=xi(),FG=bi(),vg=Xt(),d1=vg.strTranslate,N7=vg._,_x=ni(),U7=Ji(),XA=Hp(),DG=ta().extendFlat,dEt=Hs(),Wm=Yi(),z5e=ed(),q5e=kl(),V5e=$p(),B5e=V5e.freeMode,vEt=V5e.rectMode,RG=q2(),pEt=Ac().prepSelect,gEt=Ac().selectOnClick,mEt=Ac().clearOutline,yEt=Ac().clearSelectionsCache,G5e=rc();function H5e(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}j5e.exports=H5e;var v1=H5e.prototype;v1.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};v1.plot=function(e,t){var r=this,n=t[r.id],a=t._size;r._hasClipOnAxisFalse=!1;for(var i=0;i$3*u?(y=u,x=y*$3):(x=l,y=x/$3),C=o*x/l,k=s*y/u,p=t.l+t.w*a-x/2,_=t.t+t.h*(1-i)-y/2,r.x0=p,r.y0=_,r.w=x,r.h=y,r.sum=c,r.xaxis={type:"linear",range:[f+2*g-c,c-f-2*v],domain:[a-C/2,a+C/2],_id:"x"},XA(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(B){return B.a>=r.aaxis.range[0]&&B.a<=r.aaxis.range[1]&&B.b>=r.baxis.range[1]&&B.b<=r.baxis.range[0]&&B.c>=r.caxis.range[1]&&B.c<=r.caxis.range[0]},r.yaxis={type:"linear",range:[f,c-v-g],domain:[i-k/2,i+k/2],_id:"y"},XA(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var S=r.yaxis.domain[0],L=r.aaxis=DG({},e.aaxis,{range:[f,c-v-g],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[S,S+k*$3],anchor:"free",position:0,_id:"y",_length:x});XA(L,r.graphDiv._fullLayout),L.setScale();var w=r.baxis=DG({},e.baxis,{range:[c-f-g,v],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:x});XA(w,r.graphDiv._fullLayout),w.setScale();var T=r.caxis=DG({},e.caxis,{range:[c-f-v,g],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[S,S+k*$3],anchor:"free",position:0,_id:"y",_length:x});XA(T,r.graphDiv._fullLayout),T.setScale();var A="M"+p+","+(_+y)+"h"+x+"l-"+x/2+",-"+y+"Z";r.clipDef.select("path").attr("d",A),r.layers.plotbg.select("path").attr("d",A);var m="M0,"+y+"h"+x+"l-"+x/2+",-"+y+"Z";r.clipDefRelative.select("path").attr("d",m);var F=d1(p,_);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",F),r.clipDefRelative.select("path").attr("transform",null);var E=d1(p-w._offset,_+y);r.layers.baxis.attr("transform",E),r.layers.bgrid.attr("transform",E);var I=d1(p+x/2,_)+"rotate(30)"+d1(0,-L._offset);r.layers.aaxis.attr("transform",I),r.layers.agrid.attr("transform",I);var R=d1(p+x/2,_)+"rotate(-30)"+d1(0,-T._offset);r.layers.caxis.attr("transform",R),r.layers.cgrid.attr("transform",R),r.drawAxes(!0),r.layers.aline.select("path").attr("d",L.showline?"M"+p+","+(_+y)+"l"+x/2+",-"+y:"M0,0").call(_x.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",w.showline?"M"+p+","+(_+y)+"h"+x:"M0,0").call(_x.stroke,w.linecolor||"#000").style("stroke-width",(w.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",T.showline?"M"+(p+x/2)+","+_+"l"+x/2+","+y:"M0,0").call(_x.stroke,T.linecolor||"#000").style("stroke-width",(T.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),U7.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};v1.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.slice(7)+"title",a=t.layers,i=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(i),t.drawAx(o),t.drawAx(s),e){var l=Math.max(i.showticklabels?i.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks==="outside"?s.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;a["a-title"]=RG.draw(r,"a"+n,{propContainer:i,propName:t.id+".aaxis.title.text",placeholder:N7(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-i.title.font.size/3-l,"text-anchor":"middle"}}),a["b-title"]=RG.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title.text",placeholder:N7(r,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+o.title.font.size*.83+u,"text-anchor":"middle"}}),a["c-title"]=RG.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title.text",placeholder:N7(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+s.title.font.size*.83+u,"text-anchor":"middle"}})}};v1.drawAx=function(e){var t=this,r=t.graphDiv,n=e._name,a=n.charAt(0),i=e._id,o=t.layers[n],s=30,l=a+"tickLayout",u=xEt(e);t[l]!==u&&(o.selectAll("."+i+"tick").remove(),t[l]=u),e.setScale();var c=Wm.calcTicks(e),f=Wm.clipEnds(e,c),v=Wm.makeTransTickFn(e),g=Wm.getTickSigns(e)[2],p=vg.deg2rad(s),_=g*(e.linewidth||1)/2,x=g*e.ticklen,y=t.w,C=t.h,k=a==="b"?"M0,"+_+"l"+Math.sin(p)*x+","+Math.cos(p)*x:"M"+_+",0l"+Math.cos(p)*x+","+-Math.sin(p)*x,S={a:"M0,0l"+C+",-"+y/2,b:"M0,0l-"+y/2+",-"+C,c:"M0,0l-"+C+","+y/2}[a];Wm.drawTicks(r,e,{vals:e.ticks==="inside"?f:c,layer:o,path:k,transFn:v,crisp:!1}),Wm.drawGrid(r,e,{vals:f,layer:t.layers[a+"grid"],path:S,transFn:v,crisp:!1}),Wm.drawLabels(r,e,{vals:c,layer:o,transFn:v,labelFns:Wm.makeLabelFns(e,0,s)})};function xEt(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var Yc=G5e.MINZOOM/2+.87,_Et="m-0.87,.5h"+Yc+"v3h-"+(Yc+5.2)+"l"+(Yc/2+2.6)+",-"+(Yc*.87+4.5)+"l2.6,1.5l-"+Yc/2+","+Yc*.87+"Z",bEt="m0.87,.5h-"+Yc+"v3h"+(Yc+5.2)+"l-"+(Yc/2+2.6)+",-"+(Yc*.87+4.5)+"l-2.6,1.5l"+Yc/2+","+Yc*.87+"Z",wEt="m0,1l"+Yc/2+","+Yc*.87+"l2.6,-1.5l-"+(Yc/2+2.6)+",-"+(Yc*.87+4.5)+"l-"+(Yc/2+2.6)+","+(Yc*.87+4.5)+"l2.6,1.5l"+Yc/2+",-"+Yc*.87+"Z",TEt="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",O5e=!0;v1.clearOutline=function(){yEt(this.dragOptions),mEt(this.dragOptions.gd)};v1.initInteractions=function(){var e=this,t=e.layers.plotbg.select("path").node(),r=e.graphDiv,n=r._fullLayout._zoomlayer,a,i;this.dragOptions={element:t,gd:r,plotinfo:{id:e.id,domain:r._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(E,I,R){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],a=r._fullLayout._invScaleX,i=r._fullLayout._invScaleY;var B=e.dragOptions.dragmode=r._fullLayout.dragmode;B5e(B)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,B==="zoom"?(e.dragOptions.moveFn=w,e.dragOptions.clickFn=y,e.dragOptions.doneFn=T,C(E,I,R)):B==="pan"?(e.dragOptions.moveFn=m,e.dragOptions.clickFn=y,e.dragOptions.doneFn=F,A(),e.clearOutline(r)):(vEt(B)||B5e(B))&&pEt(E,I,R,e.dragOptions,B)}};var o,s,l,u,c,f,v,g,p,_;function x(E){var I={};return I[e.id+".aaxis.min"]=E.a,I[e.id+".baxis.min"]=E.b,I[e.id+".caxis.min"]=E.c,I}function y(E,I){var R=r._fullLayout.clickmode;N5e(r),E===2&&(r.emit("plotly_doubleclick",null),FG.call("_guiRelayout",r,x({a:0,b:0,c:0}))),R.indexOf("select")>-1&&E===1&&gEt(I,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),R.indexOf("event")>-1&&q5e.click(r,I,e.id)}function C(E,I,R){var B=t.getBoundingClientRect();o=I-B.left,s=R-B.top,r._fullLayout._calcInverseTransform(r);var O=r._fullLayout._invTransform,U=vg.apply3DTransform(O)(o,s);o=U[0],s=U[1],l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l,u=e.aaxis.range[1]-l.a,f=_x.luminosity(e.graphDiv._fullLayout[e.id].bgcolor),v="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",g=!1,p=n.append("path").attr("class","zoombox").attr("transform",d1(e.x0,e.y0)).style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",v),_=n.append("path").attr("class","zoombox-corners").attr("transform",d1(e.x0,e.y0)).style({fill:_x.background,stroke:_x.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function k(E,I){return 1-I/e.h}function S(E,I){return 1-(E+(e.h-I)/Math.sqrt(3))/e.w}function L(E,I){return(E-(e.h-I)/Math.sqrt(3))/e.w}function w(E,I){var R=o+E*a,B=s+I*i,O=Math.max(0,Math.min(1,k(o,s),k(R,B))),U=Math.max(0,Math.min(1,S(o,s),S(R,B))),j=Math.max(0,Math.min(1,L(o,s),L(R,B))),q=(O/2+j)*e.w,V=(1-O/2-U)*e.w,K=(q+V)/2,ee=V-q,ce=(1-O)*e.h,me=ce-ee/$3;ee.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),_.transition().style("opacity",1).duration(200),g=!0),r.emit("plotly_relayouting",x(c))}function T(){N5e(r),c!==l&&(FG.call("_guiRelayout",r,x(c)),O5e&&r.data&&r._context.showTips&&(vg.notifier(N7(r,"Double-click to zoom back out"),"long",r),O5e=!1))}function A(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function m(E,I){var R=E/e.xaxis._m,B=I/e.yaxis._m;c={a:l.a-B,b:l.b+(R+B)/2,c:l.c-(R-B)/2};var O=[c.a,c.b,c.c].sort(vg.sorterAsc),U={a:O.indexOf(c.a),b:O.indexOf(c.b),c:O.indexOf(c.c)};O[0]<0&&(O[1]+O[0]/2<0?(O[2]+=O[0]+O[1],O[0]=O[1]=0):(O[2]+=O[0]/2,O[1]+=O[0]/2,O[0]=0),c={a:O[U.a],b:O[U.b],c:O[U.c]},I=(l.a-c.a)*e.yaxis._m,E=(l.c-c.c-l.b+c.b)*e.xaxis._m);var j=d1(e.x0+E,e.y0+I);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",j);var q=d1(-E,-I);e.clipDefRelative.select("path").attr("transform",q),e.aaxis.range=[c.a,e.sum-c.b-c.c],e.baxis.range=[e.sum-c.a-c.c,c.b],e.caxis.range=[e.sum-c.a-c.b,c.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(U7.hideOutsideRangePoints,e),r.emit("plotly_relayouting",x(c))}function F(){FG.call("_guiRelayout",r,x(c))}t.onmousemove=function(E){q5e.hover(r,E,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(E){r._dragging||z5e.unhover(r,E)},z5e.init(this.dragOptions)};function N5e(e){U5e.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var qG=fe((Pmr,Y5e)=>{"use strict";var AEt=tc(),MEt=nl().attributes,Ko=pf(),SEt=rl().overrideAll,IG=ta().extendFlat,zG={title:{text:Ko.title.text,font:Ko.title.font},color:Ko.color,tickmode:Ko.minor.tickmode,nticks:IG({},Ko.nticks,{dflt:6,min:1}),tick0:Ko.tick0,dtick:Ko.dtick,tickvals:Ko.tickvals,ticktext:Ko.ticktext,ticks:Ko.ticks,ticklen:Ko.ticklen,tickwidth:Ko.tickwidth,tickcolor:Ko.tickcolor,ticklabelstep:Ko.ticklabelstep,showticklabels:Ko.showticklabels,labelalias:Ko.labelalias,showtickprefix:Ko.showtickprefix,tickprefix:Ko.tickprefix,showticksuffix:Ko.showticksuffix,ticksuffix:Ko.ticksuffix,showexponent:Ko.showexponent,exponentformat:Ko.exponentformat,minexponent:Ko.minexponent,separatethousands:Ko.separatethousands,tickfont:Ko.tickfont,tickangle:Ko.tickangle,tickformat:Ko.tickformat,tickformatstops:Ko.tickformatstops,hoverformat:Ko.hoverformat,showline:IG({},Ko.showline,{dflt:!0}),linecolor:Ko.linecolor,linewidth:Ko.linewidth,showgrid:IG({},Ko.showgrid,{dflt:!0}),gridcolor:Ko.gridcolor,gridwidth:Ko.gridwidth,griddash:Ko.griddash,layer:Ko.layer,min:{valType:"number",dflt:0,min:0}},V7=Y5e.exports=SEt({domain:MEt({name:"ternary"}),bgcolor:{valType:"color",dflt:AEt.background},sum:{valType:"number",dflt:1,min:0},aaxis:zG,baxis:zG,caxis:zG},"plot","from-root");V7.uirevision={valType:"any",editType:"none"};V7.aaxis.uirevision=V7.baxis.uirevision=V7.caxis.uirevision={valType:"any",editType:"none"}});var bx=fe((Fmr,X5e)=>{"use strict";var EEt=Xt(),kEt=So(),CEt=nl().defaults;X5e.exports=function(t,r,n,a){var i=a.type,o=a.attributes,s=a.handleDefaults,l=a.partition||"x",u=r._subplots[i],c=u.length,f=c&&u[0].replace(/\d+$/,""),v,g;function p(C,k){return EEt.coerce(v,g,o,C,k)}for(var _=0;_{"use strict";var LEt=ni(),PEt=So(),G7=Xt(),FEt=bx(),DEt=gm(),REt=mm(),IEt=Ub(),zEt=F2(),qEt=dA(),$5e=qG(),Z5e=["aaxis","baxis","caxis"];K5e.exports=function(t,r,n){FEt(t,r,n,{type:"ternary",attributes:$5e,handleDefaults:BEt,font:r.font,paper_bgcolor:r.paper_bgcolor})};function BEt(e,t,r,n){var a=r("bgcolor"),i=r("sum");n.bgColor=LEt.combine(a,n.paper_bgcolor);for(var o,s,l,u=0;u=i&&(c.min=0,f.min=0,v.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function OEt(e,t,r,n){var a=$5e[t._name];function i(g,p){return G7.coerce(e,t,a,g,p)}i("uirevision",n.uirevision),t.type="linear";var o=i("color"),s=o!==a.color.dflt?o:r.font.color,l=t._name,u=l.charAt(0).toUpperCase(),c="Component "+u,f=i("title.text",c);t._hovertitle=f===c?f:u,G7.coerceFont(i,"title.font",r.font,{overrideDflt:{size:G7.bigFont(r.font.size),color:s}}),i("min"),zEt(e,t,i,"linear"),REt(e,t,i,"linear"),DEt(e,t,i,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),IEt(e,t,i,{outerTicks:!0});var v=i("showticklabels");v&&(G7.coerceFont(i,"tickfont",r.font,{overrideDflt:{color:s}}),i("tickangle"),i("tickformat")),qEt(e,t,i,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),i("hoverformat"),i("layer")}});var Q5e=fe(Sv=>{"use strict";var NEt=W5e(),UEt=jf().getSubplotCalcData,VEt=Xt().counterRegex,K3="ternary";Sv.name=K3;var GEt=Sv.attr="subplot";Sv.idRoot=K3;Sv.idRegex=Sv.attrRegex=VEt(K3);var HEt=Sv.attributes={};HEt[GEt]={valType:"subplotid",dflt:"ternary",editType:"calc"};Sv.layoutAttributes=qG();Sv.supplyLayoutDefaults=J5e();Sv.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,a=r._subplots[K3],i=0;i{"use strict";e4e.exports={attributes:CG(),supplyDefaults:T5e(),colorbar:Zf(),formatLabels:M5e(),calc:C5e(),plot:P5e(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:D5e(),selectPoints:ax(),eventData:I5e(),moduleType:"trace",name:"scatterternary",basePlotModule:Q5e(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var n4e=fe((zmr,r4e)=>{"use strict";r4e.exports=t4e()});var BG=fe((qmr,a4e)=>{"use strict";var oc=FA(),J3=ta().extendFlat,i4e=pl().axisHoverFormat;a4e.exports={y:oc.y,x:oc.x,x0:oc.x0,y0:oc.y0,xhoverformat:i4e("x"),yhoverformat:i4e("y"),name:J3({},oc.name,{}),orientation:J3({},oc.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:oc.fillcolor,points:J3({},oc.boxpoints,{}),jitter:J3({},oc.jitter,{}),pointpos:J3({},oc.pointpos,{}),width:J3({},oc.width,{}),marker:oc.marker,text:oc.text,hovertext:oc.hovertext,hovertemplate:oc.hovertemplate,hovertemplatefallback:oc.hovertemplatefallback,quartilemethod:oc.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:oc.offsetgroup,alignmentgroup:oc.alignmentgroup,selected:oc.selected,unselected:oc.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:oc.zorder}});var UG=fe((Bmr,o4e)=>{"use strict";var OG=DA(),NG=Xt().extendFlat;o4e.exports={violinmode:NG({},OG.boxmode,{}),violingap:NG({},OG.boxgap,{}),violingroupgap:NG({},OG.boxgroupgap,{})}});var f4e=fe((Omr,c4e)=>{"use strict";var s4e=Xt(),jEt=ni(),l4e=IA(),u4e=BG();c4e.exports=function(t,r,n,a){function i(L,w){return s4e.coerce(t,r,u4e,L,w)}function o(L,w){return s4e.coerce2(t,r,u4e,L,w)}if(l4e.handleSampleDefaults(t,r,i,a),r.visible!==!1){i("bandwidth"),i("side");var s=i("width");s||(i("scalegroup",r.name),i("scalemode"));var l=i("span"),u;Array.isArray(l)&&(u="manual"),i("spanmode",u);var c=i("line.color",(t.marker||{}).color||n),f=i("line.width"),v=i("fillcolor",jEt.addOpacity(r.line.color,.5));l4e.handlePointsDefaults(t,r,i,{prefix:""});var g=o("box.width"),p=o("box.fillcolor",v),_=o("box.line.color",c),x=o("box.line.width",f),y=i("box.visible",!!(g||p||_||x));y||(r.box={visible:!1});var C=o("meanline.color",c),k=o("meanline.width",f),S=i("meanline.visible",!!(C||k));S||(r.meanline={visible:!1}),i("quartilemethod"),i("zorder")}}});var d4e=fe((Nmr,h4e)=>{"use strict";var WEt=Xt(),YEt=UG(),XEt=t7();h4e.exports=function(t,r,n){function a(i,o){return WEt.coerce(t,r,YEt,i,o)}XEt._supply(t,r,n,a,"violin")}});var H7=fe(wx=>{"use strict";var ZEt=Xt(),$Et={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};wx.makeKDE=function(e,t,r){var n=r.length,a=$Et.gaussian,i=e.bandwidth,o=1/(n*i);return function(s){for(var l=0,u=0;u{"use strict";var VG=Xt(),GG=Yi(),KEt=RV(),v4e=H7(),JEt=Wa().BADNUM;p4e.exports=function(t,r){var n=KEt(t,r);if(n[0].t.empty)return n;for(var a=t._fullLayout,i=GG.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,l=0,u=0,c=0;c{"use strict";var rkt=n7().setPositionOffset,m4e=["v","h"];y4e.exports=function(t,r){for(var n=t.calcdata,a=r.xaxis,i=r.yaxis,o=0;o{"use strict";var HG=xi(),jG=Xt(),nkt=Ji(),WG=i7(),ikt=xU(),akt=H7();_4e.exports=function(t,r,n,a){var i=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,l=r.yaxis;function u(c,f){var v=ikt(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return nkt.smoothopen(v[0],1)}jG.makeTraceGroups(a,n,"trace violins").each(function(c){var f=HG.select(this),v=c[0],g=v.t,p=v.trace;if(p.visible!==!0||g.empty){f.remove();return}var _=g.bPos,x=g.bdPos,y=r[g.valLetter+"axis"],C=r[g.posLetter+"axis"],k=p.side==="both",S=k||p.side==="positive",L=k||p.side==="negative",w=f.selectAll("path.violin").data(jG.identity);w.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","violin"),w.exit().remove(),w.each(function(B){var O=HG.select(this),U=B.density,j=U.length,q=C.c2l(B.pos+_,!0),V=C.l2p(q),K;if(p.width)K=g.maxKDE/x;else{var ee=o._violinScaleGroupStats[p.scalegroup];K=p.scalemode==="count"?ee.maxKDE/x*(ee.maxCount/B.pts.length):ee.maxKDE/x}var ce,me,ye,ue,J,_e,ne;if(S){for(_e=new Array(j),ue=0;ue{"use strict";var w4e=xi(),Q3=ni(),okt=Ld().stylePoints;T4e.exports=function(t){var r=w4e.select(t).selectAll("g.trace.violins");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var a=n[0].trace,i=w4e.select(this),o=a.box||{},s=o.line||{},l=a.meanline||{},u=l.width;i.selectAll("path.violin").style("stroke-width",a.line.width+"px").call(Q3.stroke,a.line.color).call(Q3.fill,a.fillcolor),i.selectAll("path.box").style("stroke-width",s.width+"px").call(Q3.stroke,s.color).call(Q3.fill,o.fillcolor);var c={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};i.selectAll("path.mean").style(c).call(Q3.stroke,l.color),i.selectAll("path.meanline").style(c).call(Q3.stroke,l.color),okt(i,a,t)})}});var k4e=fe((Wmr,E4e)=>{"use strict";var skt=ni(),YG=Xt(),lkt=Yi(),M4e=OV(),S4e=H7();E4e.exports=function(t,r,n,a,i){i||(i={});var o=i.hoverLayer,s=t.cd,l=s[0].trace,u=l.hoveron,c=u.indexOf("violins")!==-1,f=u.indexOf("kde")!==-1,v=[],g,p;if(c||f){var _=M4e.hoverOnBoxes(t,r,n,a);if(f&&_.length>0){var x=t.xa,y=t.ya,C,k,S,L,w;l.orientation==="h"?(w=r,C="y",S=y,k="x",L=x):(w=n,C="x",S=x,k="y",L=y);var T=s[t.index];if(w>=T.span[0]&&w<=T.span[1]){var A=YG.extendFlat({},t),m=L.c2p(w,!0),F=S4e.getKdeValue(T,l,w),E=S4e.getPositionOnKdePath(T,l,m),I=S._offset,R=S._length;A[C+"0"]=E[0],A[C+"1"]=E[1],A[k+"0"]=A[k+"1"]=m,A[k+"Label"]=k+": "+lkt.hoverLabelText(L,w,l[k+"hoverformat"])+", "+s[0].t.labels.kde+" "+F.toFixed(3);for(var B=0,O=0;O<_.length;O++)if(_[O].attr==="med"){B=O;break}A.spikeDistance=_[B].spikeDistance;var U=C+"Spike";A[U]=_[B][U],_[B].spikeDistance=void 0,_[B][U]=void 0,A.hovertemplate=!1,v.push(A),p={},p[C+"1"]=YG.constrain(I+E[0],I,I+R),p[C+"2"]=YG.constrain(I+E[1],I,I+R),p[k+"1"]=p[k+"2"]=L._offset+m}}c&&(v=v.concat(_))}u.indexOf("points")!==-1&&(g=M4e.hoverOnPoints(t,r,n));var j=o.selectAll(".violinline-"+l.uid).data(p?[0]:[]);return j.enter().append("line").classed("violinline-"+l.uid,!0).attr("stroke-width",1.5),j.exit().remove(),j.attr(p).call(skt.stroke,t.color),a==="closest"?g?[g]:v:(g&&v.push(g),v)}});var L4e=fe((Ymr,C4e)=>{"use strict";C4e.exports={attributes:BG(),layoutAttributes:UG(),supplyDefaults:f4e(),crossTraceDefaults:IA().crossTraceDefaults,supplyLayoutDefaults:d4e(),calc:g4e(),crossTraceCalc:x4e(),plot:b4e(),style:A4e(),styleOnSelect:Ld().styleOnSelect,hoverPoints:k4e(),selectPoints:NV(),moduleType:"trace",name:"violin",basePlotModule:gu(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var F4e=fe((Xmr,P4e)=>{"use strict";P4e.exports=L4e()});var R4e=fe((Zmr,D4e)=>{"use strict";D4e.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var ZG=fe(($mr,B4e)=>{"use strict";var il=u1(),XG=Ol().line,ukt=Ho(),I4e=pl().axisHoverFormat,{hovertemplateAttrs:ckt,texttemplateAttrs:fkt,templatefallbackAttrs:z4e}=Oo(),q4e=R4e(),pg=ta().extendFlat,hkt=ni();B4e.exports={x:il.x,x0:il.x0,dx:il.dx,y:il.y,y0:il.y0,dy:il.dy,xperiod:il.xperiod,yperiod:il.yperiod,xperiod0:il.xperiod0,yperiod0:il.yperiod0,xperiodalignment:il.xperiodalignment,yperiodalignment:il.yperiodalignment,xhoverformat:I4e("x"),yhoverformat:I4e("y"),hovertext:il.hovertext,hovertemplate:ckt({},{keys:q4e.eventDataKeys}),hovertemplatefallback:z4e(),hoverinfo:pg({},ukt.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:fkt({editType:"plot"},{keys:q4e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:z4e({editType:"plot"}),text:il.text,textposition:il.textposition,insidetextanchor:pg({},il.insidetextanchor,{dflt:"middle"}),textangle:pg({},il.textangle,{dflt:0}),textfont:il.textfont,insidetextfont:il.insidetextfont,outsidetextfont:il.outsidetextfont,constraintext:il.constraintext,cliponaxis:il.cliponaxis,orientation:pg({},il.orientation,{}),offset:pg({},il.offset,{arrayOk:!1}),width:pg({},il.width,{arrayOk:!1}),marker:dkt(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:pg({},XG.color,{dflt:hkt.defaultLine}),width:pg({},XG.width,{dflt:0,editType:"plot"}),dash:XG.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:il.offsetgroup,alignmentgroup:il.alignmentgroup,zorder:il.zorder};function dkt(){var e=pg({},il.marker);return delete e.pattern,delete e.cornerradius,e}});var $G=fe((Kmr,O4e)=>{"use strict";O4e.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}});var JG=fe((Jmr,U4e)=>{"use strict";var j7=Xt(),vkt=nx(),pkt=q0().handleText,gkt=rx(),mkt=sp(),N4e=ZG(),KG=ni();function ykt(e,t,r,n){function a(f,v){return j7.coerce(e,t,N4e,f,v)}var i=gkt(e,t,n,a);if(!i){t.visible=!1;return}mkt(e,t,n,a),a("xhoverformat"),a("yhoverformat"),a("orientation",t.y&&!t.x?"v":"h"),a("offset"),a("width");var o=a("text");a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var s=a("textposition");pkt(e,t,n,a,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&a("textinfo",j7.isArrayOrTypedArray(o)?"text+value":"value");var l=a("marker.color",r);a("marker.line.color",KG.defaultLine),a("marker.line.width");var u=a("connector.visible");if(u){a("connector.fillcolor",xkt(l));var c=a("connector.line.width");c&&(a("connector.line.color"),a("connector.line.dash"))}a("zorder")}function xkt(e){var t=j7.isArrayOrTypedArray(e)?"#000":e;return KG.addOpacity(t,.5*KG.opacity(t))}function _kt(e,t){var r,n;function a(o){return j7.coerce(n._input,n,N4e,o)}for(var i=0;i{"use strict";var bkt=Xt(),wkt=$G();V4e.exports=function(e,t,r){var n=!1;function a(s,l){return bkt.coerce(e,t,wkt,s,l)}for(var i=0;i{"use strict";var ew=Xt();H4e.exports=function(t,r){for(var n=0;n{"use strict";var W4e=Yi(),Y4e=cp(),Tkt=j4e(),Akt=F0(),ZA=Wa().BADNUM;X4e.exports=function(t,r){var n=W4e.getFromId(t,r.xaxis||"x"),a=W4e.getFromId(t,r.yaxis||"y"),i,o,s,l,u,c,f,v;r.orientation==="h"?(i=n.makeCalcdata(r,"x"),s=a.makeCalcdata(r,"y"),l=Y4e(r,a,"y",s),u=!!r.yperiodalignment,c="y"):(i=a.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=Y4e(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;var g=Math.min(o.length,i.length),p=new Array(g);for(r._base=[],f=0;f{"use strict";var $4e=ix().setGroupPositions;K4e.exports=function(t,r){var n=t._fullLayout,a=t._fullData,i=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,v;for(v=0;v{"use strict";var W7=xi(),Xm=Xt(),Q4e=Ji(),Ym=Wa().BADNUM,Mkt=mx(),Skt=kh().clearMinTextSize;tTe.exports=function(t,r,n,a){var i=t._fullLayout;Skt("funnel",i),Ekt(t,r,n,a),kkt(t,r,n,a),Mkt.plot(t,r,n,a,{mode:i.funnelmode,norm:i.funnelmode,gap:i.funnelgap,groupgap:i.funnelgroupgap})};function Ekt(e,t,r,n){var a=t.xaxis,i=t.yaxis;Xm.makeTraceGroups(n,r,"trace bars").each(function(o){var s=W7.select(this),l=o[0].trace,u=Xm.ensureSingle(s,"g","regions");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.region").data(Xm.identity);f.enter().append("g").classed("region",!0),f.exit().remove();var v=f.size();f.each(function(g,p){if(!(p!==v-1&&!g.cNext)){var _=eTe(g,a,i,c),x=_[0],y=_[1],C="";x[0]!==Ym&&y[0]!==Ym&&x[1]!==Ym&&y[1]!==Ym&&x[2]!==Ym&&y[2]!==Ym&&x[3]!==Ym&&y[3]!==Ym&&(c?C+="M"+x[0]+","+y[1]+"L"+x[2]+","+y[2]+"H"+x[3]+"L"+x[1]+","+y[1]+"Z":C+="M"+x[1]+","+y[1]+"L"+x[2]+","+y[3]+"V"+y[2]+"L"+x[1]+","+y[0]+"Z"),C===""&&(C="M0,0Z"),Xm.ensureSingle(W7.select(this),"path").attr("d",C).call(Q4e.setClipUrl,t.layerClipId,e)}})})}function kkt(e,t,r,n){var a=t.xaxis,i=t.yaxis;Xm.makeTraceGroups(n,r,"trace bars").each(function(o){var s=W7.select(this),l=o[0].trace,u=Xm.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible||!l.connector.line.width){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.line").data(Xm.identity);f.enter().append("g").classed("line",!0),f.exit().remove();var v=f.size();f.each(function(g,p){if(!(p!==v-1&&!g.cNext)){var _=eTe(g,a,i,c),x=_[0],y=_[1],C="";x[3]!==void 0&&y[3]!==void 0&&(c?(C+="M"+x[0]+","+y[1]+"L"+x[2]+","+y[2],C+="M"+x[1]+","+y[1]+"L"+x[3]+","+y[2]):(C+="M"+x[1]+","+y[1]+"L"+x[2]+","+y[3],C+="M"+x[1]+","+y[0]+"L"+x[2]+","+y[2])),C===""&&(C="M0,0Z"),Xm.ensureSingle(W7.select(this),"path").attr("d",C).call(Q4e.setClipUrl,t.layerClipId,e)}})})}function eTe(e,t,r,n){var a=[],i=[],o=n?t:r,s=n?r:t;return a[0]=o.c2p(e.s0,!0),i[0]=s.c2p(e.p0,!0),a[1]=o.c2p(e.s1,!0),i[1]=s.c2p(e.p1,!0),a[2]=o.c2p(e.nextS0,!0),i[2]=s.c2p(e.nextP0,!0),a[3]=o.c2p(e.nextS1,!0),i[3]=s.c2p(e.nextP1,!0),n?[a,i]:[i,a]}});var aTe=fe((iyr,iTe)=>{"use strict";var $A=xi(),nTe=Ji(),eH=ni(),Ckt=Y1().DESELECTDIM,Lkt=_v(),Pkt=kh().resizeText,Fkt=Lkt.styleTextPoints;function Dkt(e,t,r){var n=r||$A.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");Pkt(e,n,"funnel"),n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var i=$A.select(this),o=a[0].trace;i.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o.marker;$A.select(this).call(eH.fill,s.mc||l.color).call(eH.stroke,s.mlc||l.line.color).call(nTe.dashLine,l.line.dash,s.mlw||l.line.width).style("opacity",o.selectedpoints&&!s.selected?Ckt:1)}}),Fkt(i,o,e),i.selectAll(".regions").each(function(){$A.select(this).selectAll("path").style("stroke-width",0).call(eH.fill,o.connector.fillcolor)}),i.selectAll(".lines").each(function(){var s=o.connector.line;nTe.lineGroupStyle($A.select(this).selectAll("path"),s.width,s.color,s.dash)})})}iTe.exports={style:Dkt}});var lTe=fe((ayr,sTe)=>{"use strict";var oTe=ni().opacity,Rkt=z3().hoverOnBars,tH=Xt().formatPercent;sTe.exports=function(t,r,n,a,i){var o=Rkt(t,r,n,a,i);if(o){var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=o.index,f=s[c],v=u?"x":"y";o[v+"LabelVal"]=f.s,o.percentInitial=f.begR,o.percentInitialLabel=tH(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=tH(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=tH(f.sumR,1);var g=f.hi||l.hoverinfo,p=[];if(g&&g!=="none"&&g!=="skip"){var _=g==="all",x=g.split("+"),y=function(C){return _||x.indexOf(C)!==-1};y("percent initial")&&p.push(o.percentInitialLabel+" of initial"),y("percent previous")&&p.push(o.percentPreviousLabel+" of previous"),y("percent total")&&p.push(o.percentTotalLabel+" of total")}return o.extraText=p.join("
"),o.color=Ikt(l,f),[o]}};function Ikt(e,t){var r=e.marker,n=t.mc||r.color,a=t.mlc||r.line.color,i=t.mlw||r.line.width;if(oTe(n))return n;if(oTe(a)&&i)return a}});var cTe=fe((oyr,uTe)=>{"use strict";uTe.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"percentInitial"in r&&(t.percentInitial=r.percentInitial),"percentPrevious"in r&&(t.percentPrevious=r.percentPrevious),"percentTotal"in r&&(t.percentTotal=r.percentTotal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var hTe=fe((syr,fTe)=>{"use strict";fTe.exports={attributes:ZG(),layoutAttributes:$G(),supplyDefaults:JG().supplyDefaults,crossTraceDefaults:JG().crossTraceDefaults,supplyLayoutDefaults:G4e(),calc:Z4e(),crossTraceCalc:J4e(),plot:rTe(),style:aTe().style,hoverPoints:lTe(),eventData:cTe(),selectPoints:q3(),moduleType:"trace",name:"funnel",basePlotModule:gu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var vTe=fe((lyr,dTe)=>{"use strict";dTe.exports=hTe()});var gTe=fe((uyr,pTe)=>{"use strict";pTe.exports={eventDataKeys:["initial","delta","final"]}});var iH=fe((cyr,_Te)=>{"use strict";var qs=u1(),rH=Ol().line,zkt=Ho(),mTe=pl().axisHoverFormat,{hovertemplateAttrs:qkt,texttemplateAttrs:Bkt,templatefallbackAttrs:yTe}=Oo(),xTe=gTe(),tw=ta().extendFlat,Okt=ni();function nH(e){return{marker:{color:tw({},qs.marker.color,{arrayOk:!1,editType:"style"}),line:{color:tw({},qs.marker.line.color,{arrayOk:!1,editType:"style"}),width:tw({},qs.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}_Te.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:qs.x,x0:qs.x0,dx:qs.dx,y:qs.y,y0:qs.y0,dy:qs.dy,xperiod:qs.xperiod,yperiod:qs.yperiod,xperiod0:qs.xperiod0,yperiod0:qs.yperiod0,xperiodalignment:qs.xperiodalignment,yperiodalignment:qs.yperiodalignment,xhoverformat:mTe("x"),yhoverformat:mTe("y"),hovertext:qs.hovertext,hovertemplate:qkt({},{keys:xTe.eventDataKeys}),hovertemplatefallback:yTe(),hoverinfo:tw({},zkt.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:Bkt({editType:"plot"},{keys:xTe.eventDataKeys.concat(["label"])}),texttemplatefallback:yTe({editType:"plot"}),text:qs.text,textposition:qs.textposition,insidetextanchor:qs.insidetextanchor,textangle:qs.textangle,textfont:qs.textfont,insidetextfont:qs.insidetextfont,outsidetextfont:qs.outsidetextfont,constraintext:qs.constraintext,cliponaxis:qs.cliponaxis,orientation:qs.orientation,offset:qs.offset,width:qs.width,increasing:nH("increasing"),decreasing:nH("decreasing"),totals:nH("intermediate sums and total"),connector:{line:{color:tw({},rH.color,{dflt:Okt.defaultLine}),width:tw({},rH.width,{editType:"plot"}),dash:rH.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:qs.offsetgroup,alignmentgroup:qs.alignmentgroup,zorder:qs.zorder}});var aH=fe((fyr,bTe)=>{"use strict";bTe.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"}}});var rw=fe((hyr,wTe)=>{"use strict";wTe.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var sH=fe((dyr,STe)=>{"use strict";var TTe=Xt(),Nkt=nx(),Ukt=q0().handleText,Vkt=rx(),Gkt=sp(),ATe=iH(),Hkt=ni(),MTe=rw(),jkt=MTe.INCREASING.COLOR,Wkt=MTe.DECREASING.COLOR,Ykt="#4499FF";function oH(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",Hkt.defaultLine),e(t+".marker.line.width")}function Xkt(e,t,r,n){function a(u,c){return TTe.coerce(e,t,ATe,u,c)}var i=Vkt(e,t,n,a);if(!i){t.visible=!1;return}Gkt(e,t,n,a),a("xhoverformat"),a("yhoverformat"),a("measure"),a("orientation",t.x&&!t.y?"h":"v"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var o=a("textposition");Ukt(e,t,n,a,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(a("texttemplate"),a("texttemplatefallback"),t.texttemplate||a("textinfo")),oH(a,"increasing",jkt),oH(a,"decreasing",Wkt),oH(a,"totals",Ykt);var s=a("connector.visible");if(s){a("connector.mode");var l=a("connector.line.width");l&&(a("connector.line.color"),a("connector.line.dash"))}a("zorder")}function Zkt(e,t){var r,n;function a(o){return TTe.coerce(n._input,n,ATe,o)}if(t.waterfallmode==="group")for(var i=0;i{"use strict";var $kt=Xt(),Kkt=aH();ETe.exports=function(e,t,r){var n=!1;function a(s,l){return $kt.coerce(e,t,Kkt,s,l)}for(var i=0;i{"use strict";var CTe=Yi(),LTe=cp(),PTe=Xt().mergeArray,Jkt=F0(),FTe=Wa().BADNUM;function lH(e){return e==="a"||e==="absolute"}function uH(e){return e==="t"||e==="total"}DTe.exports=function(t,r){var n=CTe.getFromId(t,r.xaxis||"x"),a=CTe.getFromId(t,r.yaxis||"y"),i,o,s,l,u,c;r.orientation==="h"?(i=n.makeCalcdata(r,"x"),s=a.makeCalcdata(r,"y"),l=LTe(r,a,"y",s),u=!!r.yperiodalignment,c="y"):(i=a.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=LTe(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var f=Math.min(o.length,i.length),v=new Array(f),g=0,p,_=!1,x=0;x{"use strict";var ITe=ix().setGroupPositions;zTe.exports=function(t,r){var n=t._fullLayout,a=t._fullData,i=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,v;for(v=0;v{"use strict";var BTe=xi(),Y7=Xt(),Qkt=Ji(),nw=Wa().BADNUM,e8t=mx(),t8t=kh().clearMinTextSize;OTe.exports=function(t,r,n,a){var i=t._fullLayout;t8t("waterfall",i),e8t.plot(t,r,n,a,{mode:i.waterfallmode,norm:i.waterfallmode,gap:i.waterfallgap,groupgap:i.waterfallgroupgap}),r8t(t,r,n,a)};function r8t(e,t,r,n){var a=t.xaxis,i=t.yaxis;Y7.makeTraceGroups(n,r,"trace bars").each(function(o){var s=BTe.select(this),l=o[0].trace,u=Y7.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=l.connector.mode,v=u.selectAll("g.line").data(Y7.identity);v.enter().append("g").classed("line",!0),v.exit().remove();var g=v.size();v.each(function(p,_){if(!(_!==g-1&&!p.cNext)){var x=n8t(p,a,i,c),y=x[0],C=x[1],k="";y[0]!==nw&&C[0]!==nw&&y[1]!==nw&&C[1]!==nw&&(f==="spanning"&&!p.isSum&&_>0&&(c?k+="M"+y[0]+","+C[1]+"V"+C[0]:k+="M"+y[1]+","+C[0]+"H"+y[0]),f!=="between"&&(p.isSum||_{"use strict";var X7=xi(),UTe=Ji(),VTe=ni(),i8t=Y1().DESELECTDIM,a8t=_v(),o8t=kh().resizeText,s8t=a8t.styleTextPoints;function l8t(e,t,r){var n=r||X7.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");o8t(e,n,"waterfall"),n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var i=X7.select(this),o=a[0].trace;i.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;X7.select(this).call(VTe.fill,l.color).call(VTe.stroke,l.line.color).call(UTe.dashLine,l.line.dash,l.line.width).style("opacity",o.selectedpoints&&!s.selected?i8t:1)}}),s8t(i,o,e),i.selectAll(".lines").each(function(){var s=o.connector.line;UTe.lineGroupStyle(X7.select(this).selectAll("path"),s.width,s.color,s.dash)})})}GTe.exports={style:l8t}});var ZTe=fe((xyr,XTe)=>{"use strict";var u8t=Yi().hoverLabelText,jTe=ni().opacity,c8t=z3().hoverOnBars,WTe=rw(),YTe={increasing:WTe.INCREASING.SYMBOL,decreasing:WTe.DECREASING.SYMBOL};XTe.exports=function(t,r,n,a,i){var o=c8t(t,r,n,a,i);if(!o)return;var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=u?"x":"y",f=u?t.xa:t.ya;function v(w){return u8t(f,w,l[c+"hoverformat"])}var g=o.index,p=s[g],_=p.isSum?p.b+p.s:p.rawS;o.initial=p.b+p.s-_,o.delta=_,o.final=o.initial+o.delta;var x=v(Math.abs(o.delta));o.deltaLabel=_<0?"("+x+")":x,o.finalLabel=v(o.final),o.initialLabel=v(o.initial);var y=p.hi||l.hoverinfo,C=[];if(y&&y!=="none"&&y!=="skip"){var k=y==="all",S=y.split("+"),L=function(w){return k||S.indexOf(w)!==-1};p.isSum||(L("final")&&(u?!L("x"):!L("y"))&&C.push(o.finalLabel),L("delta")&&(_<0?C.push(o.deltaLabel+" "+YTe.decreasing):C.push(o.deltaLabel+" "+YTe.increasing)),L("initial")&&C.push("Initial: "+o.initialLabel))}return C.length&&(o.extraText=C.join("
")),o.color=f8t(l,p),[o]};function f8t(e,t){var r=e[t.dir].marker,n=r.color,a=r.line.color,i=r.line.width;if(jTe(n))return n;if(jTe(a)&&i)return a}});var KTe=fe((_yr,$Te)=>{"use strict";$Te.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"initial"in r&&(t.initial=r.initial),"delta"in r&&(t.delta=r.delta),"final"in r&&(t.final=r.final),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var QTe=fe((byr,JTe)=>{"use strict";JTe.exports={attributes:iH(),layoutAttributes:aH(),supplyDefaults:sH().supplyDefaults,crossTraceDefaults:sH().crossTraceDefaults,supplyLayoutDefaults:kTe(),calc:RTe(),crossTraceCalc:qTe(),plot:NTe(),style:HTe().style,hoverPoints:ZTe(),eventData:KTe(),selectPoints:q3(),moduleType:"trace",name:"waterfall",basePlotModule:gu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var tAe=fe((wyr,eAe)=>{"use strict";eAe.exports=QTe()});var iw=fe((Tyr,rAe)=>{"use strict";rAe.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.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(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%",""]}}}});var cH={};zp(cH,{default:()=>d8t});var nAe,iAe,Z7,aAe,oAe,sAe,lAe,uAe,h8t,d8t,fH=Lo(()=>{"use strict";nAe=K0(ta()),iAe=K0(Ho()),Z7=K0(Oo()),aAe=K0(Ol()),oAe=K0(iw()),sAe=["rgb","rgba","rgba256","hsl","hsla"],lAe=[],uAe=[];for(let e of sAe){let t=oAe.colormodel[e];lAe.push(`For the \`${e}\` colormodel, it is [${(t.zminDflt||t.min).join(", ")}].`),uAe.push(`For the \`${e}\` colormodel, it is [${(t.zmaxDflt||t.max).join(", ")}].`)}h8t={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:sAe,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.",lAe.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.",uAe.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,nAe.extendFlat)({},iAe.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,Z7.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,Z7.templatefallbackAttrs)(),zorder:aAe.zorder},d8t=h8t});var hAe=fe((Ayr,fAe)=>{"use strict";var v8t=Xt(),p8t=(fH(),Gs(cH)).default,cAe=iw(),g8t=ag().IMAGE_URL_PREFIX;fAe.exports=function(t,r){function n(o,s){return v8t.coerce(t,r,p8t,o,s)}n("source"),r.source&&!r.source.match(g8t)&&delete r.source,r._hasSource=!!r.source;var a=n("z");if(r._hasZ=!(a===void 0||!a.length||!a[0]||!a[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}n("x0"),n("y0"),n("dx"),n("dy");var i;r._hasZ?(n("colormodel","rgb"),i=cAe.colormodel[r.colormodel],n("zmin",i.zminDflt||i.min),n("zmax",i.zmaxDflt||i.max)):r._hasSource&&(r.colormodel="rgba256",i=cAe.colormodel[r.colormodel],r.zmin=i.zminDflt,r.zmax=i.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),r._length=null,n("zorder")}});var gg=fe((Myr,hH)=>{typeof Object.create=="function"?hH.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:hH.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var dH=fe((Syr,dAe)=>{dAe.exports=M2().EventEmitter});var gAe=fe($7=>{"use strict";$7.byteLength=y8t;$7.toByteArray=_8t;$7.fromByteArray=T8t;var p1=[],Ev=[],m8t=typeof Uint8Array!="undefined"?Uint8Array:Array,vH="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Tx=0,vAe=vH.length;Tx0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function y8t(e){var t=pAe(e),r=t[0],n=t[1];return(r+n)*3/4-n}function x8t(e,t,r){return(t+r)*3/4-r}function _8t(e){var t,r=pAe(e),n=r[0],a=r[1],i=new m8t(x8t(e,n,a)),o=0,s=a>0?n-4:n,l;for(l=0;l>16&255,i[o++]=t>>8&255,i[o++]=t&255;return a===2&&(t=Ev[e.charCodeAt(l)]<<2|Ev[e.charCodeAt(l+1)]>>4,i[o++]=t&255),a===1&&(t=Ev[e.charCodeAt(l)]<<10|Ev[e.charCodeAt(l+1)]<<4|Ev[e.charCodeAt(l+2)]>>2,i[o++]=t>>8&255,i[o++]=t&255),i}function b8t(e){return p1[e>>18&63]+p1[e>>12&63]+p1[e>>6&63]+p1[e&63]}function w8t(e,t,r){for(var n,a=[],i=t;is?s:o+i));return n===1?(t=e[r-1],a.push(p1[t>>2]+p1[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],a.push(p1[t>>10]+p1[t>>4&63]+p1[t<<2&63]+"=")),a.join("")}});var mAe=fe(pH=>{pH.read=function(e,t,r,n,a){var i,o,s=a*8-n-1,l=(1<>1,c=-7,f=r?a-1:0,v=r?-1:1,g=e[t+f];for(f+=v,i=g&(1<<-c)-1,g>>=-c,c+=s;c>0;i=i*256+e[t+f],f+=v,c-=8);for(o=i&(1<<-c)-1,i>>=-c,c+=n;c>0;o=o*256+e[t+f],f+=v,c-=8);if(i===0)i=1-u;else{if(i===l)return o?NaN:(g?-1:1)*(1/0);o=o+Math.pow(2,n),i=i-u}return(g?-1:1)*o*Math.pow(2,i-n)};pH.write=function(e,t,r,n,a,i){var o,s,l,u=i*8-a-1,c=(1<>1,v=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:i-1,p=n?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=v/l:t+=v*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,a),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,a),o=0));a>=8;e[r+g]=s&255,g+=p,s/=256,a-=8);for(o=o<0;e[r+g]=o&255,g+=p,o/=256,u-=8);e[r+g-p]|=_*128}});var Mx=fe(lw=>{"use strict";var gH=gAe(),ow=mAe(),yAe=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;lw.Buffer=Bn;lw.SlowBuffer=C8t;lw.INSPECT_MAX_BYTES=50;var K7=2147483647;lw.kMaxLength=K7;Bn.TYPED_ARRAY_SUPPORT=A8t();!Bn.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&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 A8t(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(Bn.prototype,"parent",{enumerable:!0,get:function(){if(Bn.isBuffer(this))return this.buffer}});Object.defineProperty(Bn.prototype,"offset",{enumerable:!0,get:function(){if(Bn.isBuffer(this))return this.byteOffset}});function mg(e){if(e>K7)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,Bn.prototype),t}function Bn(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _H(e)}return wAe(e,t,r)}Bn.poolSize=8192;function wAe(e,t,r){if(typeof e=="string")return S8t(e,t);if(ArrayBuffer.isView(e))return E8t(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(g1(e,ArrayBuffer)||e&&g1(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(g1(e,SharedArrayBuffer)||e&&g1(e.buffer,SharedArrayBuffer)))return yH(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return Bn.from(n,t,r);let a=k8t(e);if(a)return a;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Bn.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}Bn.from=function(e,t,r){return wAe(e,t,r)};Object.setPrototypeOf(Bn.prototype,Uint8Array.prototype);Object.setPrototypeOf(Bn,Uint8Array);function TAe(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function M8t(e,t,r){return TAe(e),e<=0?mg(e):t!==void 0?typeof r=="string"?mg(e).fill(t,r):mg(e).fill(t):mg(e)}Bn.alloc=function(e,t,r){return M8t(e,t,r)};function _H(e){return TAe(e),mg(e<0?0:bH(e)|0)}Bn.allocUnsafe=function(e){return _H(e)};Bn.allocUnsafeSlow=function(e){return _H(e)};function S8t(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Bn.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=AAe(e,t)|0,n=mg(r),a=n.write(e,t);return a!==r&&(n=n.slice(0,a)),n}function mH(e){let t=e.length<0?0:bH(e.length)|0,r=mg(t);for(let n=0;n=K7)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K7.toString(16)+" bytes");return e|0}function C8t(e){return+e!=e&&(e=0),Bn.alloc(+e)}Bn.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==Bn.prototype};Bn.compare=function(t,r){if(g1(t,Uint8Array)&&(t=Bn.from(t,t.offset,t.byteLength)),g1(r,Uint8Array)&&(r=Bn.from(r,r.offset,r.byteLength)),!Bn.isBuffer(t)||!Bn.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,a=r.length;for(let i=0,o=Math.min(n,a);ia.length?(Bn.isBuffer(o)||(o=Bn.from(o)),o.copy(a,i)):Uint8Array.prototype.set.call(a,o,i);else if(Bn.isBuffer(o))o.copy(a,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return a};function AAe(e,t){if(Bn.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||g1(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return xH(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return DAe(e).length;default:if(a)return n?-1:xH(e).length;t=(""+t).toLowerCase(),a=!0}}Bn.byteLength=AAe;function L8t(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return N8t(this,t,r);case"utf8":case"utf-8":return SAe(this,t,r);case"ascii":return B8t(this,t,r);case"latin1":case"binary":return O8t(this,t,r);case"base64":return z8t(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U8t(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Bn.prototype._isBuffer=!0;function Ax(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}Bn.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;rr&&(t+=" ... "),""};yAe&&(Bn.prototype[yAe]=Bn.prototype.inspect);Bn.prototype.compare=function(t,r,n,a,i){if(g1(t,Uint8Array)&&(t=Bn.from(t,t.offset,t.byteLength)),!Bn.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),a===void 0&&(a=0),i===void 0&&(i=this.length),r<0||n>t.length||a<0||i>this.length)throw new RangeError("out of range index");if(a>=i&&r>=n)return 0;if(a>=i)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,a>>>=0,i>>>=0,this===t)return 0;let o=i-a,s=n-r,l=Math.min(o,s),u=this.slice(a,i),c=t.slice(r,n);for(let f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,TH(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0)if(a)r=0;else return-1;if(typeof t=="string"&&(t=Bn.from(t,n)),Bn.isBuffer(t))return t.length===0?-1:xAe(e,t,r,n,a);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):xAe(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function xAe(e,t,r,n,a){let i=1,o=e.length,s=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;i=2,o/=2,s/=2,r/=2}function l(c,f){return i===1?c[f]:c.readUInt16BE(f*i)}let u;if(a){let c=-1;for(u=r;uo&&(r=o-s),u=r;u>=0;u--){let c=!0;for(let f=0;fa&&(n=a)):n=a;let i=t.length;n>i/2&&(n=i/2);let o;for(o=0;o>>0,isFinite(n)?(n=n>>>0,a===void 0&&(a="utf8")):(a=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-r;if((n===void 0||n>i)&&(n=i),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");let o=!1;for(;;)switch(a){case"hex":return P8t(this,t,r,n);case"utf8":case"utf-8":return F8t(this,t,r,n);case"ascii":case"latin1":case"binary":return D8t(this,t,r,n);case"base64":return R8t(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I8t(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),o=!0}};Bn.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function z8t(e,t,r){return t===0&&r===e.length?gH.fromByteArray(e):gH.fromByteArray(e.slice(t,r))}function SAe(e,t,r){r=Math.min(e.length,r);let n=[],a=t;for(;a239?4:i>223?3:i>191?2:1;if(a+s<=r){let l,u,c,f;switch(s){case 1:i<128&&(o=i);break;case 2:l=e[a+1],(l&192)===128&&(f=(i&31)<<6|l&63,f>127&&(o=f));break;case 3:l=e[a+1],u=e[a+2],(l&192)===128&&(u&192)===128&&(f=(i&15)<<12|(l&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=e[a+1],u=e[a+2],c=e[a+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(f=(i&15)<<18|(l&63)<<12|(u&63)<<6|c&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),a+=s}return q8t(n)}var _Ae=4096;function q8t(e){let t=e.length;if(t<=_Ae)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let a="";for(let i=t;in&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}Bn.prototype.readUintLE=Bn.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||Kf(t,r,this.length);let a=this[t],i=1,o=0;for(;++o>>0,r=r>>>0,n||Kf(t,r,this.length);let a=this[t+--r],i=1;for(;r>0&&(i*=256);)a+=this[t+--r]*i;return a};Bn.prototype.readUint8=Bn.prototype.readUInt8=function(t,r){return t=t>>>0,r||Kf(t,1,this.length),this[t]};Bn.prototype.readUint16LE=Bn.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||Kf(t,2,this.length),this[t]|this[t+1]<<8};Bn.prototype.readUint16BE=Bn.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||Kf(t,2,this.length),this[t]<<8|this[t+1]};Bn.prototype.readUint32LE=Bn.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Bn.prototype.readUint32BE=Bn.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Bn.prototype.readBigUInt64LE=Zm(function(t){t=t>>>0,sw(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&KA(t,this.length-8);let a=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,i=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(a)+(BigInt(i)<>>0,sw(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&KA(t,this.length-8);let a=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],i=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(a)<>>0,r=r>>>0,n||Kf(t,r,this.length);let a=this[t],i=1,o=0;for(;++o=i&&(a-=Math.pow(2,8*r)),a};Bn.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||Kf(t,r,this.length);let a=r,i=1,o=this[t+--a];for(;a>0&&(i*=256);)o+=this[t+--a]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o};Bn.prototype.readInt8=function(t,r){return t=t>>>0,r||Kf(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Bn.prototype.readInt16LE=function(t,r){t=t>>>0,r||Kf(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};Bn.prototype.readInt16BE=function(t,r){t=t>>>0,r||Kf(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};Bn.prototype.readInt32LE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Bn.prototype.readInt32BE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Bn.prototype.readBigInt64LE=Zm(function(t){t=t>>>0,sw(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&KA(t,this.length-8);let a=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(a)<>>0,sw(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&KA(t,this.length-8);let a=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(a)<>>0,r||Kf(t,4,this.length),ow.read(this,t,!0,23,4)};Bn.prototype.readFloatBE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),ow.read(this,t,!1,23,4)};Bn.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||Kf(t,8,this.length),ow.read(this,t,!0,52,8)};Bn.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||Kf(t,8,this.length),ow.read(this,t,!1,52,8)};function s0(e,t,r,n,a,i){if(!Bn.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}Bn.prototype.writeUintLE=Bn.prototype.writeUIntLE=function(t,r,n,a){if(t=+t,r=r>>>0,n=n>>>0,!a){let s=Math.pow(2,8*n)-1;s0(this,t,r,n,s,0)}let i=1,o=0;for(this[r]=t&255;++o>>0,n=n>>>0,!a){let s=Math.pow(2,8*n)-1;s0(this,t,r,n,s,0)}let i=n-1,o=1;for(this[r+i]=t&255;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+n};Bn.prototype.writeUint8=Bn.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,1,255,0),this[r]=t&255,r+1};Bn.prototype.writeUint16LE=Bn.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};Bn.prototype.writeUint16BE=Bn.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};Bn.prototype.writeUint32LE=Bn.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};Bn.prototype.writeUint32BE=Bn.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function EAe(e,t,r,n,a){FAe(t,n,a,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,r}function kAe(e,t,r,n,a){FAe(t,n,a,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o=o>>8,e[r+2]=o,o=o>>8,e[r+1]=o,o=o>>8,e[r]=o,r+8}Bn.prototype.writeBigUInt64LE=Zm(function(t,r=0){return EAe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Bn.prototype.writeBigUInt64BE=Zm(function(t,r=0){return kAe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Bn.prototype.writeIntLE=function(t,r,n,a){if(t=+t,r=r>>>0,!a){let l=Math.pow(2,8*n-1);s0(this,t,r,n,l-1,-l)}let i=0,o=1,s=0;for(this[r]=t&255;++i>0)-s&255;return r+n};Bn.prototype.writeIntBE=function(t,r,n,a){if(t=+t,r=r>>>0,!a){let l=Math.pow(2,8*n-1);s0(this,t,r,n,l-1,-l)}let i=n-1,o=1,s=0;for(this[r+i]=t&255;--i>=0&&(o*=256);)t<0&&s===0&&this[r+i+1]!==0&&(s=1),this[r+i]=(t/o>>0)-s&255;return r+n};Bn.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};Bn.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};Bn.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};Bn.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};Bn.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};Bn.prototype.writeBigInt64LE=Zm(function(t,r=0){return EAe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Bn.prototype.writeBigInt64BE=Zm(function(t,r=0){return kAe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function CAe(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function LAe(e,t,r,n,a){return t=+t,r=r>>>0,a||CAe(e,t,r,4,34028234663852886e22,-34028234663852886e22),ow.write(e,t,r,n,23,4),r+4}Bn.prototype.writeFloatLE=function(t,r,n){return LAe(this,t,r,!0,n)};Bn.prototype.writeFloatBE=function(t,r,n){return LAe(this,t,r,!1,n)};function PAe(e,t,r,n,a){return t=+t,r=r>>>0,a||CAe(e,t,r,8,17976931348623157e292,-17976931348623157e292),ow.write(e,t,r,n,52,8),r+8}Bn.prototype.writeDoubleLE=function(t,r,n){return PAe(this,t,r,!0,n)};Bn.prototype.writeDoubleBE=function(t,r,n){return PAe(this,t,r,!1,n)};Bn.prototype.copy=function(t,r,n,a){if(!Bn.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!a&&a!==0&&(a=this.length),r>=t.length&&(r=t.length),r||(r=0),a>0&&a=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),t.length-r>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let i;if(typeof t=="number")for(i=r;i2**32?a=bAe(String(r)):typeof r=="bigint"&&(a=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(a=bAe(a)),a+="n"),n+=` It must be ${t}. Received ${a}`,n},RangeError);function bAe(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function V8t(e,t,r){sw(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&KA(t,e.length-(r+1))}function FAe(e,t,r,n,a,i){if(e>r||e3?t===0||t===BigInt(0)?s=`>= 0${o} and < 2${o} ** ${(i+1)*8}${o}`:s=`>= -(2${o} ** ${(i+1)*8-1}${o}) and < 2 ** ${(i+1)*8-1}${o}`:s=`>= ${t}${o} and <= ${r}${o}`,new aw.ERR_OUT_OF_RANGE("value",s,e)}V8t(n,a,i)}function sw(e,t){if(typeof e!="number")throw new aw.ERR_INVALID_ARG_TYPE(t,"number",e)}function KA(e,t,r){throw Math.floor(e)!==e?(sw(e,r),new aw.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new aw.ERR_BUFFER_OUT_OF_BOUNDS:new aw.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var G8t=/[^+/0-9A-Za-z-_]/g;function H8t(e){if(e=e.split("=")[0],e=e.trim().replace(G8t,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function xH(e,t){t=t||1/0;let r,n=e.length,a=null,i=[];for(let o=0;o55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=(a-55296<<10|r-56320)+65536}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function j8t(e){let t=[];for(let r=0;r>8,a=r%256,i.push(a),i.push(n);return i}function DAe(e){return gH.toByteArray(H8t(e))}function J7(e,t,r,n){let a;for(a=0;a=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function g1(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function TH(e){return e!==e}var Y8t=(function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let a=0;a<16;++a)t[n+a]=e[r]+e[a]}return t})();function Zm(e){return typeof BigInt=="undefined"?X8t:e}function X8t(){throw new Error("BigInt not supported")}});var Q7=fe((Pyr,RAe)=>{"use strict";RAe.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;t[r]=a;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==a||s.enumerable!==!0)return!1}return!0}});var JA=fe((Fyr,IAe)=>{"use strict";var Z8t=Q7();IAe.exports=function(){return Z8t()&&!!Symbol.toStringTag}});var eL=fe((Dyr,zAe)=>{"use strict";zAe.exports=Object});var BAe=fe((Ryr,qAe)=>{"use strict";qAe.exports=Error});var NAe=fe((Iyr,OAe)=>{"use strict";OAe.exports=EvalError});var VAe=fe((zyr,UAe)=>{"use strict";UAe.exports=RangeError});var HAe=fe((qyr,GAe)=>{"use strict";GAe.exports=ReferenceError});var AH=fe((Byr,jAe)=>{"use strict";jAe.exports=SyntaxError});var uw=fe((Oyr,WAe)=>{"use strict";WAe.exports=TypeError});var XAe=fe((Nyr,YAe)=>{"use strict";YAe.exports=URIError});var $Ae=fe((Uyr,ZAe)=>{"use strict";ZAe.exports=Math.abs});var JAe=fe((Vyr,KAe)=>{"use strict";KAe.exports=Math.floor});var e6e=fe((Gyr,QAe)=>{"use strict";QAe.exports=Math.max});var r6e=fe((Hyr,t6e)=>{"use strict";t6e.exports=Math.min});var i6e=fe((jyr,n6e)=>{"use strict";n6e.exports=Math.pow});var o6e=fe((Wyr,a6e)=>{"use strict";a6e.exports=Math.round});var l6e=fe((Yyr,s6e)=>{"use strict";s6e.exports=Number.isNaN||function(t){return t!==t}});var c6e=fe((Xyr,u6e)=>{"use strict";var $8t=l6e();u6e.exports=function(t){return $8t(t)||t===0?t:t<0?-1:1}});var h6e=fe((Zyr,f6e)=>{"use strict";f6e.exports=Object.getOwnPropertyDescriptor});var Sx=fe(($yr,d6e)=>{"use strict";var tL=h6e();if(tL)try{tL([],"length")}catch(e){tL=null}d6e.exports=tL});var QA=fe((Kyr,v6e)=>{"use strict";var rL=Object.defineProperty||!1;if(rL)try{rL({},"a",{value:1})}catch(e){rL=!1}v6e.exports=rL});var m6e=fe((Jyr,g6e)=>{"use strict";var p6e=typeof Symbol!="undefined"&&Symbol,K8t=Q7();g6e.exports=function(){return typeof p6e!="function"||typeof Symbol!="function"||typeof p6e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:K8t()}});var MH=fe((Qyr,y6e)=>{"use strict";y6e.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var SH=fe((e2r,x6e)=>{"use strict";var J8t=eL();x6e.exports=J8t.getPrototypeOf||null});var w6e=fe((t2r,b6e)=>{"use strict";var Q8t="Function.prototype.bind called on incompatible ",eCt=Object.prototype.toString,tCt=Math.max,rCt="[object Function]",_6e=function(t,r){for(var n=[],a=0;a{"use strict";var aCt=w6e();T6e.exports=Function.prototype.bind||aCt});var nL=fe((n2r,A6e)=>{"use strict";A6e.exports=Function.prototype.call});var iL=fe((i2r,M6e)=>{"use strict";M6e.exports=Function.prototype.apply});var E6e=fe((a2r,S6e)=>{"use strict";S6e.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var EH=fe((o2r,k6e)=>{"use strict";var oCt=cw(),sCt=iL(),lCt=nL(),uCt=E6e();k6e.exports=uCt||oCt.call(lCt,sCt)});var aL=fe((s2r,C6e)=>{"use strict";var cCt=cw(),fCt=uw(),hCt=nL(),dCt=EH();C6e.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new fCt("a function is required");return dCt(cCt,hCt,t)}});var I6e=fe((l2r,R6e)=>{"use strict";var vCt=aL(),L6e=Sx(),F6e;try{F6e=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var kH=!!F6e&&L6e&&L6e(Object.prototype,"__proto__"),D6e=Object,P6e=D6e.getPrototypeOf;R6e.exports=kH&&typeof kH.get=="function"?vCt([kH.get]):typeof P6e=="function"?function(t){return P6e(t==null?t:D6e(t))}:!1});var oL=fe((u2r,O6e)=>{"use strict";var z6e=MH(),q6e=SH(),B6e=I6e();O6e.exports=z6e?function(t){return z6e(t)}:q6e?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return q6e(t)}:B6e?function(t){return B6e(t)}:null});var CH=fe((c2r,N6e)=>{"use strict";var pCt=Function.prototype.call,gCt=Object.prototype.hasOwnProperty,mCt=cw();N6e.exports=mCt.call(pCt,gCt)});var uL=fe((f2r,W6e)=>{"use strict";var Jo,yCt=eL(),xCt=BAe(),_Ct=NAe(),bCt=VAe(),wCt=HAe(),vw=AH(),dw=uw(),TCt=XAe(),ACt=$Ae(),MCt=JAe(),SCt=e6e(),ECt=r6e(),kCt=i6e(),CCt=o6e(),LCt=c6e(),H6e=Function,LH=function(e){try{return H6e('"use strict"; return ('+e+").constructor;")()}catch(t){}},e6=Sx(),PCt=QA(),PH=function(){throw new dw},FCt=e6?(function(){try{return arguments.callee,PH}catch(e){try{return e6(arguments,"callee").get}catch(t){return PH}}})():PH,fw=m6e()(),Jf=oL(),DCt=SH(),RCt=MH(),j6e=iL(),t6=nL(),hw={},ICt=typeof Uint8Array=="undefined"||!Jf?Jo:Jf(Uint8Array),Ex={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?Jo:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Jo:ArrayBuffer,"%ArrayIteratorPrototype%":fw&&Jf?Jf([][Symbol.iterator]()):Jo,"%AsyncFromSyncIteratorPrototype%":Jo,"%AsyncFunction%":hw,"%AsyncGenerator%":hw,"%AsyncGeneratorFunction%":hw,"%AsyncIteratorPrototype%":hw,"%Atomics%":typeof Atomics=="undefined"?Jo:Atomics,"%BigInt%":typeof BigInt=="undefined"?Jo:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?Jo:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?Jo:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Jo:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":xCt,"%eval%":eval,"%EvalError%":_Ct,"%Float16Array%":typeof Float16Array=="undefined"?Jo:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?Jo:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Jo:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Jo:FinalizationRegistry,"%Function%":H6e,"%GeneratorFunction%":hw,"%Int8Array%":typeof Int8Array=="undefined"?Jo:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Jo:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Jo:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":fw&&Jf?Jf(Jf([][Symbol.iterator]())):Jo,"%JSON%":typeof JSON=="object"?JSON:Jo,"%Map%":typeof Map=="undefined"?Jo:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!fw||!Jf?Jo:Jf(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":yCt,"%Object.getOwnPropertyDescriptor%":e6,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Jo:Promise,"%Proxy%":typeof Proxy=="undefined"?Jo:Proxy,"%RangeError%":bCt,"%ReferenceError%":wCt,"%Reflect%":typeof Reflect=="undefined"?Jo:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Jo:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!fw||!Jf?Jo:Jf(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Jo:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":fw&&Jf?Jf(""[Symbol.iterator]()):Jo,"%Symbol%":fw?Symbol:Jo,"%SyntaxError%":vw,"%ThrowTypeError%":FCt,"%TypedArray%":ICt,"%TypeError%":dw,"%Uint8Array%":typeof Uint8Array=="undefined"?Jo:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Jo:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Jo:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Jo:Uint32Array,"%URIError%":TCt,"%WeakMap%":typeof WeakMap=="undefined"?Jo:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Jo:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Jo:WeakSet,"%Function.prototype.call%":t6,"%Function.prototype.apply%":j6e,"%Object.defineProperty%":PCt,"%Object.getPrototypeOf%":DCt,"%Math.abs%":ACt,"%Math.floor%":MCt,"%Math.max%":SCt,"%Math.min%":ECt,"%Math.pow%":kCt,"%Math.round%":CCt,"%Math.sign%":LCt,"%Reflect.getPrototypeOf%":RCt};if(Jf)try{null.error}catch(e){U6e=Jf(Jf(e)),Ex["%Error.prototype%"]=U6e}var U6e,zCt=function e(t){var r;if(t==="%AsyncFunction%")r=LH("async function () {}");else if(t==="%GeneratorFunction%")r=LH("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=LH("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&Jf&&(r=Jf(a.prototype))}return Ex[t]=r,r},V6e={__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"]},r6=cw(),sL=CH(),qCt=r6.call(t6,Array.prototype.concat),BCt=r6.call(j6e,Array.prototype.splice),G6e=r6.call(t6,String.prototype.replace),lL=r6.call(t6,String.prototype.slice),OCt=r6.call(t6,RegExp.prototype.exec),NCt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,UCt=/\\(\\)?/g,VCt=function(t){var r=lL(t,0,1),n=lL(t,-1);if(r==="%"&&n!=="%")throw new vw("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new vw("invalid intrinsic syntax, expected opening `%`");var a=[];return G6e(t,NCt,function(i,o,s,l){a[a.length]=s?G6e(l,UCt,"$1"):o||i}),a},GCt=function(t,r){var n=t,a;if(sL(V6e,n)&&(a=V6e[n],n="%"+a[0]+"%"),sL(Ex,n)){var i=Ex[n];if(i===hw&&(i=zCt(n)),typeof i=="undefined"&&!r)throw new dw("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:i}}throw new vw("intrinsic "+t+" does not exist!")};W6e.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new dw("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new dw('"allowMissing" argument must be a boolean');if(OCt(/^%?[^%]*%?$/,t)===null)throw new vw("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=VCt(t),a=n.length>0?n[0]:"",i=GCt("%"+a+"%",r),o=i.name,s=i.value,l=!1,u=i.alias;u&&(a=u[0],BCt(n,qCt([0,1],u)));for(var c=1,f=!0;c=n.length){var _=e6(s,v);f=!!_,f&&"get"in _&&!("originalValue"in _.get)?s=_.get:s=s[v]}else f=sL(s,v),s=s[v];f&&!l&&(Ex[o]=s)}}return s}});var kx=fe((h2r,Z6e)=>{"use strict";var Y6e=uL(),X6e=aL(),HCt=X6e([Y6e("%String.prototype.indexOf%")]);Z6e.exports=function(t,r){var n=Y6e(t,!!r);return typeof n=="function"&&HCt(t,".prototype.")>-1?X6e([n]):n}});var J6e=fe((d2r,K6e)=>{"use strict";var jCt=JA()(),WCt=kx(),FH=WCt("Object.prototype.toString"),cL=function(t){return jCt&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:FH(t)==="[object Arguments]"},$6e=function(t){return cL(t)?!0:t!==null&&typeof t=="object"&&"length"in t&&typeof t.length=="number"&&t.length>=0&&FH(t)!=="[object Array]"&&"callee"in t&&FH(t.callee)==="[object Function]"},YCt=(function(){return cL(arguments)})();cL.isLegacyArguments=$6e;K6e.exports=YCt?cL:$6e});var iMe=fe((v2r,nMe)=>{"use strict";var Q6e=kx(),XCt=JA()(),ZCt=CH(),$Ct=Sx(),IH;XCt?(eMe=Q6e("RegExp.prototype.exec"),DH={},fL=function(){throw DH},RH={toString:fL,valueOf:fL},typeof Symbol.toPrimitive=="symbol"&&(RH[Symbol.toPrimitive]=fL),IH=function(t){if(!t||typeof t!="object")return!1;var r=$Ct(t,"lastIndex"),n=r&&ZCt(r,"value");if(!n)return!1;try{eMe(t,RH)}catch(a){return a===DH}}):(tMe=Q6e("Object.prototype.toString"),rMe="[object RegExp]",IH=function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:tMe(t)===rMe});var eMe,DH,fL,RH,tMe,rMe;nMe.exports=IH});var oMe=fe((p2r,aMe)=>{"use strict";var KCt=kx(),JCt=iMe(),QCt=KCt("RegExp.prototype.exec"),e7t=uw();aMe.exports=function(t){if(!JCt(t))throw new e7t("`regex` must be a RegExp");return function(n){return QCt(t,n)!==null}}});var lMe=fe((g2r,sMe)=>{"use strict";var t7t=function*(){}.constructor;sMe.exports=()=>t7t});var hMe=fe((m2r,fMe)=>{"use strict";var cMe=kx(),r7t=oMe(),n7t=r7t(/^\s*(?:function)?\*/),i7t=JA()(),uMe=oL(),a7t=cMe("Object.prototype.toString"),o7t=cMe("Function.prototype.toString"),s7t=lMe();fMe.exports=function(t){if(typeof t!="function")return!1;if(n7t(o7t(t)))return!0;if(!i7t){var r=a7t(t);return r==="[object GeneratorFunction]"}if(!uMe)return!1;var n=s7t();return n&&uMe(t)===n.prototype}});var gMe=fe((y2r,pMe)=>{"use strict";var vMe=Function.prototype.toString,pw=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,qH,hL;if(typeof pw=="function"&&typeof Object.defineProperty=="function")try{qH=Object.defineProperty({},"length",{get:function(){throw hL}}),hL={},pw(function(){throw 42},null,qH)}catch(e){e!==hL&&(pw=null)}else pw=null;var l7t=/^\s*class\b/,BH=function(t){try{var r=vMe.call(t);return l7t.test(r)}catch(n){return!1}},zH=function(t){try{return BH(t)?!1:(vMe.call(t),!0)}catch(r){return!1}},dL=Object.prototype.toString,u7t="[object Object]",c7t="[object Function]",f7t="[object GeneratorFunction]",h7t="[object HTMLAllCollection]",d7t="[object HTML document.all class]",v7t="[object HTMLCollection]",p7t=typeof Symbol=="function"&&!!Symbol.toStringTag,g7t=!(0 in[,]),OH=function(){return!1};typeof document=="object"&&(dMe=document.all,dL.call(dMe)===dL.call(document.all)&&(OH=function(t){if((g7t||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=dL.call(t);return(r===h7t||r===d7t||r===v7t||r===u7t)&&t("")==null}catch(n){}return!1}));var dMe;pMe.exports=pw?function(t){if(OH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{pw(t,null,qH)}catch(r){if(r!==hL)return!1}return!BH(t)&&zH(t)}:function(t){if(OH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(p7t)return zH(t);if(BH(t))return!1;var r=dL.call(t);return r!==c7t&&r!==f7t&&!/^\[object HTML/.test(r)?!1:zH(t)}});var xMe=fe((x2r,yMe)=>{"use strict";var m7t=gMe(),y7t=Object.prototype.toString,mMe=Object.prototype.hasOwnProperty,x7t=function(t,r,n){for(var a=0,i=t.length;a=3&&(a=n),w7t(t)?x7t(t,r,a):typeof t=="string"?_7t(t,r,a):b7t(t,r,a)}});var bMe=fe((_2r,_Me)=>{"use strict";_Me.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var TMe=fe((b2r,wMe)=>{"use strict";var NH=bMe(),T7t=typeof globalThis=="undefined"?window:globalThis;wMe.exports=function(){for(var t=[],r=0;r{"use strict";var AMe=QA(),A7t=AH(),gw=uw(),MMe=Sx();SMe.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new gw("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new gw("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new gw("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new gw("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new gw("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new gw("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!MMe&&MMe(t,r);if(AMe)AMe(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:a===null&&l?l.enumerable:!a,value:n,writable:i===null&&l?l.writable:!i});else if(s||!a&&!i&&!o)t[r]=n;else throw new A7t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var GH=fe((T2r,kMe)=>{"use strict";var VH=QA(),EMe=function(){return!!VH};EMe.hasArrayLengthDefineBug=function(){if(!VH)return null;try{return VH([],"length",{value:1}).length!==1}catch(t){return!0}};kMe.exports=EMe});var DMe=fe((A2r,FMe)=>{"use strict";var M7t=uL(),CMe=UH(),S7t=GH()(),LMe=Sx(),PMe=uw(),E7t=M7t("%Math.floor%");FMe.exports=function(t,r){if(typeof t!="function")throw new PMe("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||E7t(r)!==r)throw new PMe("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],a=!0,i=!0;if("length"in t&&LMe){var o=LMe(t,"length");o&&!o.configurable&&(a=!1),o&&!o.writable&&(i=!1)}return(a||i||!n)&&(S7t?CMe(t,"length",r,!0,!0):CMe(t,"length",r)),t}});var IMe=fe((M2r,RMe)=>{"use strict";var k7t=cw(),C7t=iL(),L7t=EH();RMe.exports=function(){return L7t(k7t,C7t,arguments)}});var n6=fe((S2r,vL)=>{"use strict";var P7t=DMe(),zMe=QA(),F7t=aL(),qMe=IMe();vL.exports=function(t){var r=F7t(arguments),n=1+t.length-(arguments.length-1);return P7t(r,n>0?n:0,!0)};zMe?zMe(vL.exports,"apply",{value:qMe}):vL.exports.apply=qMe});var YH=fe((E2r,UMe)=>{"use strict";var mL=xMe(),D7t=TMe(),BMe=n6(),jH=kx(),gL=Sx(),pL=oL(),R7t=jH("Object.prototype.toString"),NMe=JA()(),OMe=typeof globalThis=="undefined"?window:globalThis,HH=D7t(),WH=jH("String.prototype.slice"),I7t=jH("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1}UMe.exports=function(t){if(!t||typeof t!="object")return!1;if(!NMe){var r=WH(R7t(t),8,-1);return B7t(r)?r:r!=="Object"?!1:q7t(t)}return gL?z7t(t):null}});var GMe=fe((k2r,VMe)=>{"use strict";var O7t=YH();VMe.exports=function(t){return!!O7t(t)}});var $H=fe(Qo=>{"use strict";var N7t=J6e(),U7t=hMe(),bp=YH(),HMe=GMe();function mw(e){return e.call.bind(e)}var jMe=typeof BigInt!="undefined",WMe=typeof Symbol!="undefined",kv=mw(Object.prototype.toString),V7t=mw(Number.prototype.valueOf),G7t=mw(String.prototype.valueOf),H7t=mw(Boolean.prototype.valueOf);jMe&&(YMe=mw(BigInt.prototype.valueOf));var YMe;WMe&&(XMe=mw(Symbol.prototype.valueOf));var XMe;function a6(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}Qo.isArgumentsObject=N7t;Qo.isGeneratorFunction=U7t;Qo.isTypedArray=HMe;function j7t(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}Qo.isPromise=j7t;function W7t(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):HMe(e)||$Me(e)}Qo.isArrayBufferView=W7t;function Y7t(e){return bp(e)==="Uint8Array"}Qo.isUint8Array=Y7t;function X7t(e){return bp(e)==="Uint8ClampedArray"}Qo.isUint8ClampedArray=X7t;function Z7t(e){return bp(e)==="Uint16Array"}Qo.isUint16Array=Z7t;function $7t(e){return bp(e)==="Uint32Array"}Qo.isUint32Array=$7t;function K7t(e){return bp(e)==="Int8Array"}Qo.isInt8Array=K7t;function J7t(e){return bp(e)==="Int16Array"}Qo.isInt16Array=J7t;function Q7t(e){return bp(e)==="Int32Array"}Qo.isInt32Array=Q7t;function eLt(e){return bp(e)==="Float32Array"}Qo.isFloat32Array=eLt;function tLt(e){return bp(e)==="Float64Array"}Qo.isFloat64Array=tLt;function rLt(e){return bp(e)==="BigInt64Array"}Qo.isBigInt64Array=rLt;function nLt(e){return bp(e)==="BigUint64Array"}Qo.isBigUint64Array=nLt;function xL(e){return kv(e)==="[object Map]"}xL.working=typeof Map!="undefined"&&xL(new Map);function iLt(e){return typeof Map=="undefined"?!1:xL.working?xL(e):e instanceof Map}Qo.isMap=iLt;function _L(e){return kv(e)==="[object Set]"}_L.working=typeof Set!="undefined"&&_L(new Set);function aLt(e){return typeof Set=="undefined"?!1:_L.working?_L(e):e instanceof Set}Qo.isSet=aLt;function bL(e){return kv(e)==="[object WeakMap]"}bL.working=typeof WeakMap!="undefined"&&bL(new WeakMap);function oLt(e){return typeof WeakMap=="undefined"?!1:bL.working?bL(e):e instanceof WeakMap}Qo.isWeakMap=oLt;function ZH(e){return kv(e)==="[object WeakSet]"}ZH.working=typeof WeakSet!="undefined"&&ZH(new WeakSet);function sLt(e){return ZH(e)}Qo.isWeakSet=sLt;function wL(e){return kv(e)==="[object ArrayBuffer]"}wL.working=typeof ArrayBuffer!="undefined"&&wL(new ArrayBuffer);function ZMe(e){return typeof ArrayBuffer=="undefined"?!1:wL.working?wL(e):e instanceof ArrayBuffer}Qo.isArrayBuffer=ZMe;function TL(e){return kv(e)==="[object DataView]"}TL.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&TL(new DataView(new ArrayBuffer(1),0,1));function $Me(e){return typeof DataView=="undefined"?!1:TL.working?TL(e):e instanceof DataView}Qo.isDataView=$Me;var XH=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function i6(e){return kv(e)==="[object SharedArrayBuffer]"}function KMe(e){return typeof XH=="undefined"?!1:(typeof i6.working=="undefined"&&(i6.working=i6(new XH)),i6.working?i6(e):e instanceof XH)}Qo.isSharedArrayBuffer=KMe;function lLt(e){return kv(e)==="[object AsyncFunction]"}Qo.isAsyncFunction=lLt;function uLt(e){return kv(e)==="[object Map Iterator]"}Qo.isMapIterator=uLt;function cLt(e){return kv(e)==="[object Set Iterator]"}Qo.isSetIterator=cLt;function fLt(e){return kv(e)==="[object Generator]"}Qo.isGeneratorObject=fLt;function hLt(e){return kv(e)==="[object WebAssembly.Module]"}Qo.isWebAssemblyCompiledModule=hLt;function JMe(e){return a6(e,V7t)}Qo.isNumberObject=JMe;function QMe(e){return a6(e,G7t)}Qo.isStringObject=QMe;function eSe(e){return a6(e,H7t)}Qo.isBooleanObject=eSe;function tSe(e){return jMe&&a6(e,YMe)}Qo.isBigIntObject=tSe;function rSe(e){return WMe&&a6(e,XMe)}Qo.isSymbolObject=rSe;function dLt(e){return JMe(e)||QMe(e)||eSe(e)||tSe(e)||rSe(e)}Qo.isBoxedPrimitive=dLt;function vLt(e){return typeof Uint8Array!="undefined"&&(ZMe(e)||KMe(e))}Qo.isAnyArrayBuffer=vLt;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(Qo,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var KH=fe((L2r,nSe)=>{nSe.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var nj=fe(es=>{var iSe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},a=0;a=a)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),tj(t)?r.showHidden=t:t&&es._extend(r,t),Lx(r.showHidden)&&(r.showHidden=!1),Lx(r.depth)&&(r.depth=2),Lx(r.colors)&&(r.colors=!1),Lx(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=gLt),EL(r,e,r.depth)}es.inspect=$m;$m.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]};$m.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function gLt(e,t){var r=$m.styles[t];return r?"\x1B["+$m.colors[r][0]+"m"+e+"\x1B["+$m.colors[r][1]+"m":e}function mLt(e,t){return e}function yLt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function EL(e,t,r){if(e.customInspect&&t&&SL(t.inspect)&&t.inspect!==es.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return LL(n)||(n=EL(e,n,r)),n}var a=xLt(e,t);if(a)return a;var i=Object.keys(t),o=yLt(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),s6(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return JH(t);if(i.length===0){if(SL(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(o6(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(kL(t))return e.stylize(Date.prototype.toString.call(t),"date");if(s6(t))return JH(t)}var l="",u=!1,c=["{","}"];if(oSe(t)&&(u=!0,c=["[","]"]),SL(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(o6(t)&&(l=" "+RegExp.prototype.toString.call(t)),kL(t)&&(l=" "+Date.prototype.toUTCString.call(t)),s6(t)&&(l=" "+JH(t)),i.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return o6(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var v;return u?v=_Lt(e,t,r,o,i):v=i.map(function(g){return ej(e,t,r,o,g,u)}),e.seen.pop(),bLt(v,l,c)}function xLt(e,t){if(Lx(t))return e.stylize("undefined","undefined");if(LL(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(sSe(t))return e.stylize(""+t,"number");if(tj(t))return e.stylize(""+t,"boolean");if(CL(t))return e.stylize("null","null")}function JH(e){return"["+Error.prototype.toString.call(e)+"]"}function _Lt(e,t,r,n,a){for(var i=[],o=0,s=t.length;o-1&&(i?s=s.split(` `).map(function(u){return" "+u}).join(` `).slice(2):s=` `+s.split(` `).map(function(u){return" "+u}).join(` -`))):s=e.stylize("[Circular]","special")),L2(o)){if(i&&a.match(/^\d+$/))return s;o=JSON.stringify(""+a),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function _Lt(e,t,r){var n=0,a=e.reduce(function(i,o){return n++,o.indexOf(` +`))):s=e.stylize("[Circular]","special")),Lx(o)){if(i&&a.match(/^\d+$/))return s;o=JSON.stringify(""+a),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function bLt(e,t,r){var n=0,a=e.reduce(function(i,o){return n++,o.indexOf(` `)>=0&&n++,i+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return a>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, - `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}es.types=$H();function aSe(e){return Array.isArray(e)}es.isArray=aSe;function tj(e){return typeof e=="boolean"}es.isBoolean=tj;function CL(e){return e===null}es.isNull=CL;function bLt(e){return e==null}es.isNullOrUndefined=bLt;function oSe(e){return typeof e=="number"}es.isNumber=oSe;function LL(e){return typeof e=="string"}es.isString=LL;function wLt(e){return typeof e=="symbol"}es.isSymbol=wLt;function L2(e){return e===void 0}es.isUndefined=L2;function a6(e){return mw(e)&&rj(e)==="[object RegExp]"}es.isRegExp=a6;es.types.isRegExp=a6;function mw(e){return typeof e=="object"&&e!==null}es.isObject=mw;function kL(e){return mw(e)&&rj(e)==="[object Date]"}es.isDate=kL;es.types.isDate=kL;function o6(e){return mw(e)&&(rj(e)==="[object Error]"||e instanceof Error)}es.isError=o6;es.types.isNativeError=o6;function SL(e){return typeof e=="function"}es.isFunction=SL;function TLt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}es.isPrimitive=TLt;es.isBuffer=KH();function rj(e){return Object.prototype.toString.call(e)}function QH(e){return e<10?"0"+e.toString(10):e.toString(10)}var ALt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function MLt(){var e=new Date,t=[QH(e.getHours()),QH(e.getMinutes()),QH(e.getSeconds())].join(":");return[e.getDate(),ALt[e.getMonth()],t].join(" ")}es.log=function(){console.log("%s - %s",MLt(),es.format.apply(es,arguments))};es.inherits=gg();es._extend=function(e,t){if(!t||!mw(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function sSe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var C2=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;es.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(C2&&t[C2]){var r=t[C2];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,C2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,a,i=new Promise(function(l,u){n=l,a=u}),o=[],s=0;s{"use strict";function lSe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function uSe(e){for(var t=1;t0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,a=""+n.data;n=n.next;)a+=r+n.data;return a}},{key:"concat",value:function(r){if(this.length===0)return PL.alloc(0);for(var n=PL.allocUnsafe(r>>>0),a=this.head,i=0;a;)ILt(a.data,n,i),i+=a.data.length,a=a.next;return n}},{key:"consume",value:function(r,n){var a;return ro.length?o.length:r;if(s===o.length?i+=o:i+=o.slice(0,r),r-=s,r===0){s===o.length?(++a,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++a}return this.length-=a,i}},{key:"_getBuffer",value:function(r){var n=PL.allocUnsafe(r),a=this.head,i=1;for(a.data.copy(n),r-=a.data.length;a=a.next;){var o=a.data,s=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,s),r-=s,r===0){s===o.length?(++i,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=o.slice(s));break}++i}return this.length-=i,n}},{key:RLt,value:function(r,n){return ij(this,uSe(uSe({},n),{},{depth:0,customInspect:!1}))}}]),e})()});var oj=fe((Pxr,pSe)=>{"use strict";function zLt(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return n||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(aj,this,e)):process.nextTick(aj,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(i){!t&&i?r._writableState?r._writableState.errorEmitted?process.nextTick(FL,r):(r._writableState.errorEmitted=!0,process.nextTick(vSe,r,i)):process.nextTick(vSe,r,i):t?(process.nextTick(FL,r),t(i)):process.nextTick(FL,r)}),this)}function vSe(e,t){aj(e,t),FL(e)}function FL(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function qLt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function aj(e,t){e.emit("error",t)}function BLt(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}pSe.exports={destroy:zLt,undestroy:qLt,errorOrDestroy:BLt}});var P2=fe((Fxr,ySe)=>{"use strict";function OLt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var mSe={};function Cv(e,t,r){r||(r=Error);function n(i,o,s){return typeof t=="string"?t:t(i,o,s)}var a=(function(i){OLt(o,i);function o(s,l,u){return i.call(this,n(s,l,u))||this}return o})(r);a.prototype.name=r.name,a.prototype.code=e,mSe[e]=a}function gSe(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function NLt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function ULt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function VLt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Cv("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Cv("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&NLt(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var a;if(ULt(e," argument"))a="The ".concat(e," ").concat(n," ").concat(gSe(t,"type"));else{var i=VLt(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(gSe(t,"type"))}return a+=". Received type ".concat(typeof r),a},TypeError);Cv("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Cv("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Cv("ERR_STREAM_PREMATURE_CLOSE","Premature close");Cv("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Cv("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Cv("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Cv("ERR_STREAM_WRITE_AFTER_END","write after end");Cv("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Cv("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Cv("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");ySe.exports.codes=mSe});var sj=fe((Dxr,xSe)=>{"use strict";var GLt=P2().codes.ERR_INVALID_OPT_VALUE;function HLt(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function jLt(e,t,r,n){var a=HLt(t,n,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var i=n?r:"highWaterMark";throw new GLt(i,a)}return Math.floor(a)}return e.objectMode?16:16*1024}xSe.exports={getHighWaterMark:jLt}});var bSe=fe((Rxr,_Se)=>{_Se.exports=WLt;function WLt(e,t){if(lj("noDeprecation"))return e;var r=!1;function n(){if(!r){if(lj("throwDeprecation"))throw new Error(t);lj("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function lj(e){try{if(!window.localStorage)return!1}catch(r){return!1}var t=window.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}});var fj=fe((Ixr,ESe)=>{"use strict";ESe.exports=sc;function TSe(e){var t=this;this.next=null,this.entry=null,this.finish=function(){x9t(t,e)}}var yw;sc.WritableState=l6;var YLt={deprecate:bSe()},ASe=dH(),RL=M2().Buffer,XLt=(typeof window!="undefined"||typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function ZLt(e){return RL.from(e)}function $Lt(e){return RL.isBuffer(e)||e instanceof XLt}var cj=oj(),KLt=sj(),JLt=KLt.getHighWaterMark,Km=P2().codes,QLt=Km.ERR_INVALID_ARG_TYPE,e9t=Km.ERR_METHOD_NOT_IMPLEMENTED,t9t=Km.ERR_MULTIPLE_CALLBACK,r9t=Km.ERR_STREAM_CANNOT_PIPE,n9t=Km.ERR_STREAM_DESTROYED,i9t=Km.ERR_STREAM_NULL_VALUES,a9t=Km.ERR_STREAM_WRITE_AFTER_END,o9t=Km.ERR_UNKNOWN_ENCODING,xw=cj.errorOrDestroy;gg()(sc,ASe);function s9t(){}function l6(e,t,r){yw=yw||F2(),e=e||{},typeof r!="boolean"&&(r=t instanceof yw),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=JLt(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){v9t(t,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new TSe(this)}l6.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(l6.prototype,"buffer",{get:YLt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var DL;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(DL=Function.prototype[Symbol.hasInstance],Object.defineProperty(sc,Symbol.hasInstance,{value:function(t){return DL.call(this,t)?!0:this!==sc?!1:t&&t._writableState instanceof l6}})):DL=function(t){return t instanceof this};function sc(e){yw=yw||F2();var t=this instanceof yw;if(!t&&!DL.call(sc,this))return new sc(e);this._writableState=new l6(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),ASe.call(this)}sc.prototype.pipe=function(){xw(this,new r9t)};function l9t(e,t){var r=new a9t;xw(e,r),process.nextTick(t,r)}function u9t(e,t,r,n){var a;return r===null?a=new i9t:typeof r!="string"&&!t.objectMode&&(a=new QLt("chunk",["string","Buffer"],r)),a?(xw(e,a),process.nextTick(n,a),!1):!0}sc.prototype.write=function(e,t,r){var n=this._writableState,a=!1,i=!n.objectMode&&$Lt(e);return i&&!RL.isBuffer(e)&&(e=ZLt(e)),typeof t=="function"&&(r=t,t=null),i?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=s9t),n.ending?l9t(this,r):(i||u9t(this,n,e,r))&&(n.pendingcb++,a=f9t(this,n,i,e,t,r)),a};sc.prototype.cork=function(){this._writableState.corked++};sc.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&MSe(this,e))};sc.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new o9t(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(sc.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function c9t(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=RL.from(t,r)),t}Object.defineProperty(sc.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function f9t(e,t,r,n,a,i){if(!r){var o=c9t(t,n,a);n!==o&&(r=!0,a="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var l=t.length{"use strict";var _9t=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};CSe.exports=m1;var kSe=vj(),dj=fj();gg()(m1,kSe);for(hj=_9t(dj.prototype),IL=0;IL{var qL=M2(),y1=qL.Buffer;function LSe(e,t){for(var r in e)t[r]=e[r]}y1.from&&y1.alloc&&y1.allocUnsafe&&y1.allocUnsafeSlow?PSe.exports=qL:(LSe(qL,pj),pj.Buffer=D2);function D2(e,t,r){return y1(e,t,r)}D2.prototype=Object.create(y1.prototype);LSe(y1,D2);D2.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return y1(e,t,r)};D2.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=y1(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};D2.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return y1(e)};D2.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return qL.SlowBuffer(e)}});var yj=fe(RSe=>{"use strict";var mj=FSe().Buffer,DSe=mj.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function T9t(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function A9t(e){var t=T9t(e);if(typeof t!="string"&&(mj.isEncoding===DSe||!DSe(e)))throw new Error("Unknown encoding: "+e);return t||e}RSe.StringDecoder=u6;function u6(e){this.encoding=A9t(e);var t;switch(this.encoding){case"utf16le":this.text=L9t,this.end=P9t,t=4;break;case"utf8":this.fillLast=E9t,t=4;break;case"base64":this.text=F9t,this.end=D9t,t=3;break;default:this.write=R9t,this.end=I9t;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=mj.allocUnsafe(t)}u6.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function M9t(e,t,r){var n=t.length-1;if(n=0?(a>0&&(e.lastNeed=a-1),a):--n=0?(a>0&&(e.lastNeed=a-2),a):--n=0?(a>0&&(a===2?a=0:e.lastNeed=a-3),a):0))}function S9t(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function E9t(e){var t=this.lastTotal-this.lastNeed,r=S9t(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function k9t(e,t){var r=M9t(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function C9t(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function L9t(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function P9t(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function F9t(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function D9t(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function R9t(e){return e.toString(this.encoding)}function I9t(e){return e&&e.length?this.write(e):""}});var BL=fe((Bxr,qSe)=>{"use strict";var ISe=P2().codes.ERR_STREAM_PREMATURE_CLOSE;function z9t(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),a=0;a{"use strict";var OL;function Jm(e,t,r){return t=O9t(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O9t(e){var t=N9t(e,"string");return typeof t=="symbol"?t:String(t)}function N9t(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var U9t=BL(),Qm=Symbol("lastResolve"),R2=Symbol("lastReject"),c6=Symbol("error"),NL=Symbol("ended"),I2=Symbol("lastPromise"),xj=Symbol("handlePromise"),z2=Symbol("stream");function ey(e,t){return{value:e,done:t}}function V9t(e){var t=e[Qm];if(t!==null){var r=e[z2].read();r!==null&&(e[I2]=null,e[Qm]=null,e[R2]=null,t(ey(r,!1)))}}function G9t(e){process.nextTick(V9t,e)}function H9t(e,t){return function(r,n){e.then(function(){if(t[NL]){r(ey(void 0,!0));return}t[xj](r,n)},n)}}var j9t=Object.getPrototypeOf(function(){}),W9t=Object.setPrototypeOf((OL={get stream(){return this[z2]},next:function(){var t=this,r=this[c6];if(r!==null)return Promise.reject(r);if(this[NL])return Promise.resolve(ey(void 0,!0));if(this[z2].destroyed)return new Promise(function(o,s){process.nextTick(function(){t[c6]?s(t[c6]):o(ey(void 0,!0))})});var n=this[I2],a;if(n)a=new Promise(H9t(n,this));else{var i=this[z2].read();if(i!==null)return Promise.resolve(ey(i,!1));a=new Promise(this[xj])}return this[I2]=a,a}},Jm(OL,Symbol.asyncIterator,function(){return this}),Jm(OL,"return",function(){var t=this;return new Promise(function(r,n){t[z2].destroy(null,function(a){if(a){n(a);return}r(ey(void 0,!0))})})}),OL),j9t),Y9t=function(t){var r,n=Object.create(W9t,(r={},Jm(r,z2,{value:t,writable:!0}),Jm(r,Qm,{value:null,writable:!0}),Jm(r,R2,{value:null,writable:!0}),Jm(r,c6,{value:null,writable:!0}),Jm(r,NL,{value:t._readableState.endEmitted,writable:!0}),Jm(r,xj,{value:function(i,o){var s=n[z2].read();s?(n[I2]=null,n[Qm]=null,n[R2]=null,i(ey(s,!1))):(n[Qm]=i,n[R2]=o)},writable:!0}),r));return n[I2]=null,U9t(t,function(a){if(a&&a.code!=="ERR_STREAM_PREMATURE_CLOSE"){var i=n[R2];i!==null&&(n[I2]=null,n[Qm]=null,n[R2]=null,i(a)),n[c6]=a;return}var o=n[Qm];o!==null&&(n[I2]=null,n[Qm]=null,n[R2]=null,o(ey(void 0,!0))),n[NL]=!0}),t.on("readable",G9t.bind(null,n)),n};BSe.exports=Y9t});var USe=fe((Nxr,NSe)=>{NSe.exports=function(){throw new Error("Readable.from is not available in the browser")}});var vj=fe((Vxr,KSe)=>{"use strict";KSe.exports=bs;var _w;bs.ReadableState=jSe;var Uxr=Mx().EventEmitter,HSe=function(t,r){return t.listeners(r).length},h6=dH(),UL=M2().Buffer,X9t=(typeof window!="undefined"||typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function Z9t(e){return UL.from(e)}function $9t(e){return UL.isBuffer(e)||e instanceof X9t}var _j=nj(),Wo;_j&&_j.debuglog?Wo=_j.debuglog("stream"):Wo=function(){};var K9t=dSe(),Ej=oj(),J9t=sj(),Q9t=J9t.getHighWaterMark,VL=P2().codes,ePt=VL.ERR_INVALID_ARG_TYPE,tPt=VL.ERR_STREAM_PUSH_AFTER_EOF,rPt=VL.ERR_METHOD_NOT_IMPLEMENTED,nPt=VL.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,bw,bj,wj;gg()(bs,h6);var f6=Ej.errorOrDestroy,Tj=["error","close","destroy","pause","resume"];function iPt(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function jSe(e,t,r){_w=_w||F2(),e=e||{},typeof r!="boolean"&&(r=t instanceof _w),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Q9t(this,e,"readableHighWaterMark",r),this.buffer=new K9t,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(bw||(bw=yj().StringDecoder),this.decoder=new bw(e.encoding),this.encoding=e.encoding)}function bs(e){if(_w=_w||F2(),!(this instanceof bs))return new bs(e);var t=this instanceof _w;this._readableState=new jSe(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),h6.call(this)}Object.defineProperty(bs.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});bs.prototype.destroy=Ej.destroy;bs.prototype._undestroy=Ej.undestroy;bs.prototype._destroy=function(e,t){t(e)};bs.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=UL.from(e,t),t=""),n=!0),WSe(this,e,t,!1,n)};bs.prototype.unshift=function(e){return WSe(this,e,null,!0,!1)};function WSe(e,t,r,n,a){Wo("readableAddChunk",t);var i=e._readableState;if(t===null)i.reading=!1,sPt(e,i);else{var o;if(a||(o=aPt(i,t)),o)f6(e,o);else if(i.objectMode||t&&t.length>0)if(typeof t!="string"&&!i.objectMode&&Object.getPrototypeOf(t)!==UL.prototype&&(t=Z9t(t)),n)i.endEmitted?f6(e,new nPt):Aj(e,i,t,!0);else if(i.ended)f6(e,new tPt);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||t.length!==0?Aj(e,i,t,!1):Sj(e,i)):Aj(e,i,t,!1)}else n||(i.reading=!1,Sj(e,i))}return!i.ended&&(i.length=VSe?e=VSe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function GSe(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=oPt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}bs.prototype.read=function(e){Wo("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return Wo("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Mj(this):GL(this),null;if(e=GSe(e,t),e===0&&t.ended)return t.length===0&&Mj(this),null;var n=t.needReadable;Wo("need readable",n),(t.length===0||t.length-e0?a=ZSe(e,t):a=null,a===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Mj(this)),a!==null&&this.emit("data",a),a};function sPt(e,t){if(Wo("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?GL(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,YSe(e)))}}function GL(e){var t=e._readableState;Wo("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(Wo("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(YSe,e))}function YSe(e){var t=e._readableState;Wo("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,kj(e)}function Sj(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(lPt,e,t))}function lPt(e,t){for(;!t.reading&&!t.ended&&(t.length1&&$Se(n.pipes,e)!==-1)&&!u&&(Wo("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function v(_){Wo("onerror",_),x(),e.removeListener("error",v),HSe(e,"error")===0&&f6(e,_)}iPt(e,"error",v);function g(){e.removeListener("finish",p),x()}e.once("close",g);function p(){Wo("onfinish"),e.removeListener("close",g),x()}e.once("finish",p);function x(){Wo("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(Wo("pipe resume"),r.resume()),e};function uPt(e){return function(){var r=e._readableState;Wo("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&HSe(e,"data")&&(r.flowing=!0,kj(e))}}bs.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,Wo("on readable",n.length,n.reading),n.length?GL(this):n.reading||process.nextTick(cPt,this)),r};bs.prototype.addListener=bs.prototype.on;bs.prototype.removeListener=function(e,t){var r=h6.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(XSe,this),r};bs.prototype.removeAllListeners=function(e){var t=h6.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(XSe,this),t};function XSe(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function cPt(e){Wo("readable nexttick read 0"),e.read(0)}bs.prototype.resume=function(){var e=this._readableState;return e.flowing||(Wo("resume"),e.flowing=!e.readableListening,fPt(this,e)),e.paused=!1,this};function fPt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(hPt,e,t))}function hPt(e,t){Wo("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),kj(e),t.flowing&&!t.reading&&e.read(0)}bs.prototype.pause=function(){return Wo("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Wo("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function kj(e){var t=e._readableState;for(Wo("flow",t.flowing);t.flowing&&e.read()!==null;);}bs.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(Wo("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(Wo("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(n=!0,e.pause())}});for(var a in e)this[a]===void 0&&typeof e[a]=="function"&&(this[a]=(function(s){return function(){return e[s].apply(e,arguments)}})(a));for(var i=0;i=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Mj(e){var t=e._readableState;Wo("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(dPt,t,e))}function dPt(e,t){if(Wo("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(bs.from=function(e,t){return wj===void 0&&(wj=USe()),wj(bs,e,t)});function $Se(e,t){for(var r=0,n=e.length;r{"use strict";QSe.exports=yg;var HL=P2().codes,vPt=HL.ERR_METHOD_NOT_IMPLEMENTED,pPt=HL.ERR_MULTIPLE_CALLBACK,gPt=HL.ERR_TRANSFORM_ALREADY_TRANSFORMING,mPt=HL.ERR_TRANSFORM_WITH_LENGTH_0,jL=F2();gg()(yg,jL);function yPt(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new pPt);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length{"use strict";tEe.exports=d6;var eEe=Cj();gg()(d6,eEe);function d6(e){if(!(this instanceof d6))return new d6(e);eEe.call(this,e)}d6.prototype._transform=function(e,t,r){r(null,e)}});var sEe=fe((jxr,oEe)=>{"use strict";var Lj;function _Pt(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var aEe=P2().codes,bPt=aEe.ERR_MISSING_ARGS,wPt=aEe.ERR_STREAM_DESTROYED;function nEe(e){if(e)throw e}function TPt(e){return e.setHeader&&typeof e.abort=="function"}function APt(e,t,r,n){n=_Pt(n);var a=!1;e.on("close",function(){a=!0}),Lj===void 0&&(Lj=BL()),Lj(e,{readable:t,writable:r},function(o){if(o)return n(o);a=!0,n()});var i=!1;return function(o){if(!a&&!i){if(i=!0,TPt(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new wPt("pipe"))}}}function iEe(e){e()}function MPt(e,t){return e.pipe(t)}function SPt(e){return!e.length||typeof e[e.length-1]!="function"?nEe:e.pop()}function EPt(){for(var e=arguments.length,t=new Array(e),r=0;r0;return APt(o,l,u,function(c){a||(a=c),c&&i.forEach(iEe),!l&&(i.forEach(iEe),n(a))})});return t.reduce(MPt)}oEe.exports=EPt});var uEe=fe((Wxr,lEe)=>{lEe.exports=Lv;var Pj=Mx().EventEmitter,kPt=gg();kPt(Lv,Pj);Lv.Readable=vj();Lv.Writable=fj();Lv.Duplex=F2();Lv.Transform=Cj();Lv.PassThrough=rEe();Lv.finished=BL();Lv.pipeline=sEe();Lv.Stream=Lv;function Lv(){Pj.call(this)}Lv.prototype.pipe=function(e,t){var r=this;function n(c){e.writable&&e.write(c)===!1&&r.pause&&r.pause()}r.on("data",n);function a(){r.readable&&r.resume&&r.resume()}e.on("drain",a),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",o),r.on("close",s));var i=!1;function o(){i||(i=!0,e.end())}function s(){i||(i=!0,typeof e.destroy=="function"&&e.destroy())}function l(c){if(u(),Pj.listenerCount(this,"error")===0)throw c}r.on("error",l),e.on("error",l);function u(){r.removeListener("data",n),e.removeListener("drain",a),r.removeListener("end",o),r.removeListener("close",s),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}});var Tw=fe(ts=>{var cEe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},a=0;a=a)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Ij(t)?r.showHidden=t:t&&ts._extend(r,t),B2(r.showHidden)&&(r.showHidden=!1),B2(r.depth)&&(r.depth=2),B2(r.colors)&&(r.colors=!1),B2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=LPt),ZL(r,e,r.depth)}ts.inspect=ty;ty.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]};ty.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function LPt(e,t){var r=ty.styles[t];return r?"\x1B["+ty.colors[r][0]+"m"+e+"\x1B["+ty.colors[r][1]+"m":e}function PPt(e,t){return e}function FPt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function ZL(e,t,r){if(e.customInspect&&t&&XL(t.inspect)&&t.inspect!==ts.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return JL(n)||(n=ZL(e,n,r)),n}var a=DPt(e,t);if(a)return a;var i=Object.keys(t),o=FPt(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),p6(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Fj(t);if(i.length===0){if(XL(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(v6(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if($L(t))return e.stylize(Date.prototype.toString.call(t),"date");if(p6(t))return Fj(t)}var l="",u=!1,c=["{","}"];if(hEe(t)&&(u=!0,c=["[","]"]),XL(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(v6(t)&&(l=" "+RegExp.prototype.toString.call(t)),$L(t)&&(l=" "+Date.prototype.toUTCString.call(t)),p6(t)&&(l=" "+Fj(t)),i.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return v6(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var v;return u?v=RPt(e,t,r,o,i):v=i.map(function(g){return Rj(e,t,r,o,g,u)}),e.seen.pop(),IPt(v,l,c)}function DPt(e,t){if(B2(t))return e.stylize("undefined","undefined");if(JL(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(dEe(t))return e.stylize(""+t,"number");if(Ij(t))return e.stylize(""+t,"boolean");if(KL(t))return e.stylize("null","null")}function Fj(e){return"["+Error.prototype.toString.call(e)+"]"}function RPt(e,t,r,n,a){for(var i=[],o=0,s=t.length;o{"use strict";function uSe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function cSe(e){for(var t=1;t0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,a=""+n.data;n=n.next;)a+=r+n.data;return a}},{key:"concat",value:function(r){if(this.length===0)return PL.alloc(0);for(var n=PL.allocUnsafe(r>>>0),a=this.head,i=0;a;)zLt(a.data,n,i),i+=a.data.length,a=a.next;return n}},{key:"consume",value:function(r,n){var a;return ro.length?o.length:r;if(s===o.length?i+=o:i+=o.slice(0,r),r-=s,r===0){s===o.length?(++a,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++a}return this.length-=a,i}},{key:"_getBuffer",value:function(r){var n=PL.allocUnsafe(r),a=this.head,i=1;for(a.data.copy(n),r-=a.data.length;a=a.next;){var o=a.data,s=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,s),r-=s,r===0){s===o.length?(++i,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=o.slice(s));break}++i}return this.length-=i,n}},{key:ILt,value:function(r,n){return ij(this,cSe(cSe({},n),{},{depth:0,customInspect:!1}))}}]),e})()});var oj=fe((D2r,gSe)=>{"use strict";function qLt(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return n||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(aj,this,e)):process.nextTick(aj,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(i){!t&&i?r._writableState?r._writableState.errorEmitted?process.nextTick(FL,r):(r._writableState.errorEmitted=!0,process.nextTick(pSe,r,i)):process.nextTick(pSe,r,i):t?(process.nextTick(FL,r),t(i)):process.nextTick(FL,r)}),this)}function pSe(e,t){aj(e,t),FL(e)}function FL(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function BLt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function aj(e,t){e.emit("error",t)}function OLt(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}gSe.exports={destroy:qLt,undestroy:BLt,errorOrDestroy:OLt}});var Px=fe((R2r,xSe)=>{"use strict";function NLt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var ySe={};function Cv(e,t,r){r||(r=Error);function n(i,o,s){return typeof t=="string"?t:t(i,o,s)}var a=(function(i){NLt(o,i);function o(s,l,u){return i.call(this,n(s,l,u))||this}return o})(r);a.prototype.name=r.name,a.prototype.code=e,ySe[e]=a}function mSe(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function ULt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function VLt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function GLt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Cv("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Cv("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&ULt(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var a;if(VLt(e," argument"))a="The ".concat(e," ").concat(n," ").concat(mSe(t,"type"));else{var i=GLt(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(mSe(t,"type"))}return a+=". Received type ".concat(typeof r),a},TypeError);Cv("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Cv("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Cv("ERR_STREAM_PREMATURE_CLOSE","Premature close");Cv("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Cv("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Cv("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Cv("ERR_STREAM_WRITE_AFTER_END","write after end");Cv("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Cv("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Cv("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");xSe.exports.codes=ySe});var sj=fe((I2r,_Se)=>{"use strict";var HLt=Px().codes.ERR_INVALID_OPT_VALUE;function jLt(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function WLt(e,t,r,n){var a=jLt(t,n,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var i=n?r:"highWaterMark";throw new HLt(i,a)}return Math.floor(a)}return e.objectMode?16:16*1024}_Se.exports={getHighWaterMark:WLt}});var wSe=fe((z2r,bSe)=>{bSe.exports=YLt;function YLt(e,t){if(lj("noDeprecation"))return e;var r=!1;function n(){if(!r){if(lj("throwDeprecation"))throw new Error(t);lj("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function lj(e){try{if(!window.localStorage)return!1}catch(r){return!1}var t=window.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}});var fj=fe((q2r,kSe)=>{"use strict";kSe.exports=sc;function ASe(e){var t=this;this.next=null,this.entry=null,this.finish=function(){_9t(t,e)}}var xw;sc.WritableState=u6;var XLt={deprecate:wSe()},MSe=dH(),RL=Mx().Buffer,ZLt=(typeof window!="undefined"||typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function $Lt(e){return RL.from(e)}function KLt(e){return RL.isBuffer(e)||e instanceof ZLt}var cj=oj(),JLt=sj(),QLt=JLt.getHighWaterMark,Km=Px().codes,e9t=Km.ERR_INVALID_ARG_TYPE,t9t=Km.ERR_METHOD_NOT_IMPLEMENTED,r9t=Km.ERR_MULTIPLE_CALLBACK,n9t=Km.ERR_STREAM_CANNOT_PIPE,i9t=Km.ERR_STREAM_DESTROYED,a9t=Km.ERR_STREAM_NULL_VALUES,o9t=Km.ERR_STREAM_WRITE_AFTER_END,s9t=Km.ERR_UNKNOWN_ENCODING,_w=cj.errorOrDestroy;gg()(sc,MSe);function l9t(){}function u6(e,t,r){xw=xw||Fx(),e=e||{},typeof r!="boolean"&&(r=t instanceof xw),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=QLt(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){p9t(t,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new ASe(this)}u6.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(u6.prototype,"buffer",{get:XLt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var DL;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(DL=Function.prototype[Symbol.hasInstance],Object.defineProperty(sc,Symbol.hasInstance,{value:function(t){return DL.call(this,t)?!0:this!==sc?!1:t&&t._writableState instanceof u6}})):DL=function(t){return t instanceof this};function sc(e){xw=xw||Fx();var t=this instanceof xw;if(!t&&!DL.call(sc,this))return new sc(e);this._writableState=new u6(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),MSe.call(this)}sc.prototype.pipe=function(){_w(this,new n9t)};function u9t(e,t){var r=new o9t;_w(e,r),process.nextTick(t,r)}function c9t(e,t,r,n){var a;return r===null?a=new a9t:typeof r!="string"&&!t.objectMode&&(a=new e9t("chunk",["string","Buffer"],r)),a?(_w(e,a),process.nextTick(n,a),!1):!0}sc.prototype.write=function(e,t,r){var n=this._writableState,a=!1,i=!n.objectMode&&KLt(e);return i&&!RL.isBuffer(e)&&(e=$Lt(e)),typeof t=="function"&&(r=t,t=null),i?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=l9t),n.ending?u9t(this,r):(i||c9t(this,n,e,r))&&(n.pendingcb++,a=h9t(this,n,i,e,t,r)),a};sc.prototype.cork=function(){this._writableState.corked++};sc.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&SSe(this,e))};sc.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new s9t(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(sc.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function f9t(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=RL.from(t,r)),t}Object.defineProperty(sc.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function h9t(e,t,r,n,a,i){if(!r){var o=f9t(t,n,a);n!==o&&(r=!0,a="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var l=t.length{"use strict";var b9t=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};LSe.exports=m1;var CSe=vj(),dj=fj();gg()(m1,CSe);for(hj=b9t(dj.prototype),IL=0;IL{var qL=Mx(),y1=qL.Buffer;function PSe(e,t){for(var r in e)t[r]=e[r]}y1.from&&y1.alloc&&y1.allocUnsafe&&y1.allocUnsafeSlow?FSe.exports=qL:(PSe(qL,pj),pj.Buffer=Dx);function Dx(e,t,r){return y1(e,t,r)}Dx.prototype=Object.create(y1.prototype);PSe(y1,Dx);Dx.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return y1(e,t,r)};Dx.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=y1(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};Dx.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return y1(e)};Dx.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return qL.SlowBuffer(e)}});var yj=fe(ISe=>{"use strict";var mj=DSe().Buffer,RSe=mj.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function A9t(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function M9t(e){var t=A9t(e);if(typeof t!="string"&&(mj.isEncoding===RSe||!RSe(e)))throw new Error("Unknown encoding: "+e);return t||e}ISe.StringDecoder=c6;function c6(e){this.encoding=M9t(e);var t;switch(this.encoding){case"utf16le":this.text=P9t,this.end=F9t,t=4;break;case"utf8":this.fillLast=k9t,t=4;break;case"base64":this.text=D9t,this.end=R9t,t=3;break;default:this.write=I9t,this.end=z9t;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=mj.allocUnsafe(t)}c6.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function S9t(e,t,r){var n=t.length-1;if(n=0?(a>0&&(e.lastNeed=a-1),a):--n=0?(a>0&&(e.lastNeed=a-2),a):--n=0?(a>0&&(a===2?a=0:e.lastNeed=a-3),a):0))}function E9t(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function k9t(e){var t=this.lastTotal-this.lastNeed,r=E9t(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function C9t(e,t){var r=S9t(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function L9t(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function P9t(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function F9t(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function D9t(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function R9t(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function I9t(e){return e.toString(this.encoding)}function z9t(e){return e&&e.length?this.write(e):""}});var BL=fe((N2r,BSe)=>{"use strict";var zSe=Px().codes.ERR_STREAM_PREMATURE_CLOSE;function q9t(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),a=0;a{"use strict";var OL;function Jm(e,t,r){return t=N9t(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N9t(e){var t=U9t(e,"string");return typeof t=="symbol"?t:String(t)}function U9t(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var V9t=BL(),Qm=Symbol("lastResolve"),Rx=Symbol("lastReject"),f6=Symbol("error"),NL=Symbol("ended"),Ix=Symbol("lastPromise"),xj=Symbol("handlePromise"),zx=Symbol("stream");function ey(e,t){return{value:e,done:t}}function G9t(e){var t=e[Qm];if(t!==null){var r=e[zx].read();r!==null&&(e[Ix]=null,e[Qm]=null,e[Rx]=null,t(ey(r,!1)))}}function H9t(e){process.nextTick(G9t,e)}function j9t(e,t){return function(r,n){e.then(function(){if(t[NL]){r(ey(void 0,!0));return}t[xj](r,n)},n)}}var W9t=Object.getPrototypeOf(function(){}),Y9t=Object.setPrototypeOf((OL={get stream(){return this[zx]},next:function(){var t=this,r=this[f6];if(r!==null)return Promise.reject(r);if(this[NL])return Promise.resolve(ey(void 0,!0));if(this[zx].destroyed)return new Promise(function(o,s){process.nextTick(function(){t[f6]?s(t[f6]):o(ey(void 0,!0))})});var n=this[Ix],a;if(n)a=new Promise(j9t(n,this));else{var i=this[zx].read();if(i!==null)return Promise.resolve(ey(i,!1));a=new Promise(this[xj])}return this[Ix]=a,a}},Jm(OL,Symbol.asyncIterator,function(){return this}),Jm(OL,"return",function(){var t=this;return new Promise(function(r,n){t[zx].destroy(null,function(a){if(a){n(a);return}r(ey(void 0,!0))})})}),OL),W9t),X9t=function(t){var r,n=Object.create(Y9t,(r={},Jm(r,zx,{value:t,writable:!0}),Jm(r,Qm,{value:null,writable:!0}),Jm(r,Rx,{value:null,writable:!0}),Jm(r,f6,{value:null,writable:!0}),Jm(r,NL,{value:t._readableState.endEmitted,writable:!0}),Jm(r,xj,{value:function(i,o){var s=n[zx].read();s?(n[Ix]=null,n[Qm]=null,n[Rx]=null,i(ey(s,!1))):(n[Qm]=i,n[Rx]=o)},writable:!0}),r));return n[Ix]=null,V9t(t,function(a){if(a&&a.code!=="ERR_STREAM_PREMATURE_CLOSE"){var i=n[Rx];i!==null&&(n[Ix]=null,n[Qm]=null,n[Rx]=null,i(a)),n[f6]=a;return}var o=n[Qm];o!==null&&(n[Ix]=null,n[Qm]=null,n[Rx]=null,o(ey(void 0,!0))),n[NL]=!0}),t.on("readable",H9t.bind(null,n)),n};OSe.exports=X9t});var VSe=fe((V2r,USe)=>{USe.exports=function(){throw new Error("Readable.from is not available in the browser")}});var vj=fe((H2r,JSe)=>{"use strict";JSe.exports=bs;var bw;bs.ReadableState=WSe;var G2r=M2().EventEmitter,jSe=function(t,r){return t.listeners(r).length},d6=dH(),UL=Mx().Buffer,Z9t=(typeof window!="undefined"||typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function $9t(e){return UL.from(e)}function K9t(e){return UL.isBuffer(e)||e instanceof Z9t}var _j=nj(),Xo;_j&&_j.debuglog?Xo=_j.debuglog("stream"):Xo=function(){};var J9t=vSe(),Ej=oj(),Q9t=sj(),ePt=Q9t.getHighWaterMark,VL=Px().codes,tPt=VL.ERR_INVALID_ARG_TYPE,rPt=VL.ERR_STREAM_PUSH_AFTER_EOF,nPt=VL.ERR_METHOD_NOT_IMPLEMENTED,iPt=VL.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,ww,bj,wj;gg()(bs,d6);var h6=Ej.errorOrDestroy,Tj=["error","close","destroy","pause","resume"];function aPt(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function WSe(e,t,r){bw=bw||Fx(),e=e||{},typeof r!="boolean"&&(r=t instanceof bw),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=ePt(this,e,"readableHighWaterMark",r),this.buffer=new J9t,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(ww||(ww=yj().StringDecoder),this.decoder=new ww(e.encoding),this.encoding=e.encoding)}function bs(e){if(bw=bw||Fx(),!(this instanceof bs))return new bs(e);var t=this instanceof bw;this._readableState=new WSe(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),d6.call(this)}Object.defineProperty(bs.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});bs.prototype.destroy=Ej.destroy;bs.prototype._undestroy=Ej.undestroy;bs.prototype._destroy=function(e,t){t(e)};bs.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=UL.from(e,t),t=""),n=!0),YSe(this,e,t,!1,n)};bs.prototype.unshift=function(e){return YSe(this,e,null,!0,!1)};function YSe(e,t,r,n,a){Xo("readableAddChunk",t);var i=e._readableState;if(t===null)i.reading=!1,lPt(e,i);else{var o;if(a||(o=oPt(i,t)),o)h6(e,o);else if(i.objectMode||t&&t.length>0)if(typeof t!="string"&&!i.objectMode&&Object.getPrototypeOf(t)!==UL.prototype&&(t=$9t(t)),n)i.endEmitted?h6(e,new iPt):Aj(e,i,t,!0);else if(i.ended)h6(e,new rPt);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||t.length!==0?Aj(e,i,t,!1):Sj(e,i)):Aj(e,i,t,!1)}else n||(i.reading=!1,Sj(e,i))}return!i.ended&&(i.length=GSe?e=GSe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function HSe(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=sPt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}bs.prototype.read=function(e){Xo("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return Xo("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Mj(this):GL(this),null;if(e=HSe(e,t),e===0&&t.ended)return t.length===0&&Mj(this),null;var n=t.needReadable;Xo("need readable",n),(t.length===0||t.length-e0?a=$Se(e,t):a=null,a===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Mj(this)),a!==null&&this.emit("data",a),a};function lPt(e,t){if(Xo("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?GL(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,XSe(e)))}}function GL(e){var t=e._readableState;Xo("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(Xo("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(XSe,e))}function XSe(e){var t=e._readableState;Xo("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,kj(e)}function Sj(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(uPt,e,t))}function uPt(e,t){for(;!t.reading&&!t.ended&&(t.length1&&KSe(n.pipes,e)!==-1)&&!u&&(Xo("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function v(x){Xo("onerror",x),_(),e.removeListener("error",v),jSe(e,"error")===0&&h6(e,x)}aPt(e,"error",v);function g(){e.removeListener("finish",p),_()}e.once("close",g);function p(){Xo("onfinish"),e.removeListener("close",g),_()}e.once("finish",p);function _(){Xo("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(Xo("pipe resume"),r.resume()),e};function cPt(e){return function(){var r=e._readableState;Xo("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&jSe(e,"data")&&(r.flowing=!0,kj(e))}}bs.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,Xo("on readable",n.length,n.reading),n.length?GL(this):n.reading||process.nextTick(fPt,this)),r};bs.prototype.addListener=bs.prototype.on;bs.prototype.removeListener=function(e,t){var r=d6.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(ZSe,this),r};bs.prototype.removeAllListeners=function(e){var t=d6.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(ZSe,this),t};function ZSe(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function fPt(e){Xo("readable nexttick read 0"),e.read(0)}bs.prototype.resume=function(){var e=this._readableState;return e.flowing||(Xo("resume"),e.flowing=!e.readableListening,hPt(this,e)),e.paused=!1,this};function hPt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(dPt,e,t))}function dPt(e,t){Xo("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),kj(e),t.flowing&&!t.reading&&e.read(0)}bs.prototype.pause=function(){return Xo("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Xo("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function kj(e){var t=e._readableState;for(Xo("flow",t.flowing);t.flowing&&e.read()!==null;);}bs.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(Xo("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(Xo("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(n=!0,e.pause())}});for(var a in e)this[a]===void 0&&typeof e[a]=="function"&&(this[a]=(function(s){return function(){return e[s].apply(e,arguments)}})(a));for(var i=0;i=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Mj(e){var t=e._readableState;Xo("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(vPt,t,e))}function vPt(e,t){if(Xo("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(bs.from=function(e,t){return wj===void 0&&(wj=VSe()),wj(bs,e,t)});function KSe(e,t){for(var r=0,n=e.length;r{"use strict";eEe.exports=yg;var HL=Px().codes,pPt=HL.ERR_METHOD_NOT_IMPLEMENTED,gPt=HL.ERR_MULTIPLE_CALLBACK,mPt=HL.ERR_TRANSFORM_ALREADY_TRANSFORMING,yPt=HL.ERR_TRANSFORM_WITH_LENGTH_0,jL=Fx();gg()(yg,jL);function xPt(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new gPt);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length{"use strict";rEe.exports=v6;var tEe=Cj();gg()(v6,tEe);function v6(e){if(!(this instanceof v6))return new v6(e);tEe.call(this,e)}v6.prototype._transform=function(e,t,r){r(null,e)}});var lEe=fe((Y2r,sEe)=>{"use strict";var Lj;function bPt(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var oEe=Px().codes,wPt=oEe.ERR_MISSING_ARGS,TPt=oEe.ERR_STREAM_DESTROYED;function iEe(e){if(e)throw e}function APt(e){return e.setHeader&&typeof e.abort=="function"}function MPt(e,t,r,n){n=bPt(n);var a=!1;e.on("close",function(){a=!0}),Lj===void 0&&(Lj=BL()),Lj(e,{readable:t,writable:r},function(o){if(o)return n(o);a=!0,n()});var i=!1;return function(o){if(!a&&!i){if(i=!0,APt(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new TPt("pipe"))}}}function aEe(e){e()}function SPt(e,t){return e.pipe(t)}function EPt(e){return!e.length||typeof e[e.length-1]!="function"?iEe:e.pop()}function kPt(){for(var e=arguments.length,t=new Array(e),r=0;r0;return MPt(o,l,u,function(c){a||(a=c),c&&i.forEach(aEe),!l&&(i.forEach(aEe),n(a))})});return t.reduce(SPt)}sEe.exports=kPt});var cEe=fe((X2r,uEe)=>{uEe.exports=Lv;var Pj=M2().EventEmitter,CPt=gg();CPt(Lv,Pj);Lv.Readable=vj();Lv.Writable=fj();Lv.Duplex=Fx();Lv.Transform=Cj();Lv.PassThrough=nEe();Lv.finished=BL();Lv.pipeline=lEe();Lv.Stream=Lv;function Lv(){Pj.call(this)}Lv.prototype.pipe=function(e,t){var r=this;function n(c){e.writable&&e.write(c)===!1&&r.pause&&r.pause()}r.on("data",n);function a(){r.readable&&r.resume&&r.resume()}e.on("drain",a),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",o),r.on("close",s));var i=!1;function o(){i||(i=!0,e.end())}function s(){i||(i=!0,typeof e.destroy=="function"&&e.destroy())}function l(c){if(u(),Pj.listenerCount(this,"error")===0)throw c}r.on("error",l),e.on("error",l);function u(){r.removeListener("data",n),e.removeListener("drain",a),r.removeListener("end",o),r.removeListener("close",s),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}});var Aw=fe(ts=>{var fEe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},a=0;a=a)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Ij(t)?r.showHidden=t:t&&ts._extend(r,t),Bx(r.showHidden)&&(r.showHidden=!1),Bx(r.depth)&&(r.depth=2),Bx(r.colors)&&(r.colors=!1),Bx(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=PPt),ZL(r,e,r.depth)}ts.inspect=ty;ty.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]};ty.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function PPt(e,t){var r=ty.styles[t];return r?"\x1B["+ty.colors[r][0]+"m"+e+"\x1B["+ty.colors[r][1]+"m":e}function FPt(e,t){return e}function DPt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function ZL(e,t,r){if(e.customInspect&&t&&XL(t.inspect)&&t.inspect!==ts.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return JL(n)||(n=ZL(e,n,r)),n}var a=RPt(e,t);if(a)return a;var i=Object.keys(t),o=DPt(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),g6(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Fj(t);if(i.length===0){if(XL(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(p6(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if($L(t))return e.stylize(Date.prototype.toString.call(t),"date");if(g6(t))return Fj(t)}var l="",u=!1,c=["{","}"];if(dEe(t)&&(u=!0,c=["[","]"]),XL(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(p6(t)&&(l=" "+RegExp.prototype.toString.call(t)),$L(t)&&(l=" "+Date.prototype.toUTCString.call(t)),g6(t)&&(l=" "+Fj(t)),i.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return p6(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var v;return u?v=IPt(e,t,r,o,i):v=i.map(function(g){return Rj(e,t,r,o,g,u)}),e.seen.pop(),zPt(v,l,c)}function RPt(e,t){if(Bx(t))return e.stylize("undefined","undefined");if(JL(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(vEe(t))return e.stylize(""+t,"number");if(Ij(t))return e.stylize(""+t,"boolean");if(KL(t))return e.stylize("null","null")}function Fj(e){return"["+Error.prototype.toString.call(e)+"]"}function IPt(e,t,r,n,a){for(var i=[],o=0,s=t.length;o-1&&(i?s=s.split(` `).map(function(u){return" "+u}).join(` `).slice(2):s=` `+s.split(` `).map(function(u){return" "+u}).join(` -`))):s=e.stylize("[Circular]","special")),B2(o)){if(i&&a.match(/^\d+$/))return s;o=JSON.stringify(""+a),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function IPt(e,t,r){var n=0,a=e.reduce(function(i,o){return n++,o.indexOf(` +`))):s=e.stylize("[Circular]","special")),Bx(o)){if(i&&a.match(/^\d+$/))return s;o=JSON.stringify(""+a),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function zPt(e,t,r){var n=0,a=e.reduce(function(i,o){return n++,o.indexOf(` `)>=0&&n++,i+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return a>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, - `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}ts.types=$H();function hEe(e){return Array.isArray(e)}ts.isArray=hEe;function Ij(e){return typeof e=="boolean"}ts.isBoolean=Ij;function KL(e){return e===null}ts.isNull=KL;function zPt(e){return e==null}ts.isNullOrUndefined=zPt;function dEe(e){return typeof e=="number"}ts.isNumber=dEe;function JL(e){return typeof e=="string"}ts.isString=JL;function qPt(e){return typeof e=="symbol"}ts.isSymbol=qPt;function B2(e){return e===void 0}ts.isUndefined=B2;function v6(e){return ww(e)&&zj(e)==="[object RegExp]"}ts.isRegExp=v6;ts.types.isRegExp=v6;function ww(e){return typeof e=="object"&&e!==null}ts.isObject=ww;function $L(e){return ww(e)&&zj(e)==="[object Date]"}ts.isDate=$L;ts.types.isDate=$L;function p6(e){return ww(e)&&(zj(e)==="[object Error]"||e instanceof Error)}ts.isError=p6;ts.types.isNativeError=p6;function XL(e){return typeof e=="function"}ts.isFunction=XL;function BPt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}ts.isPrimitive=BPt;ts.isBuffer=KH();function zj(e){return Object.prototype.toString.call(e)}function Dj(e){return e<10?"0"+e.toString(10):e.toString(10)}var OPt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function NPt(){var e=new Date,t=[Dj(e.getHours()),Dj(e.getMinutes()),Dj(e.getSeconds())].join(":");return[e.getDate(),OPt[e.getMonth()],t].join(" ")}ts.log=function(){console.log("%s - %s",NPt(),ts.format.apply(ts,arguments))};ts.inherits=gg();ts._extend=function(e,t){if(!t||!ww(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function vEe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var q2=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;ts.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(q2&&t[q2]){var r=t[q2];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,q2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,a,i=new Promise(function(l,u){n=l,a=u}),o=[],s=0;s{"use strict";function ry(e){"@babel/helpers - typeof";return ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ry(e)}function pEe(e,t){for(var r=0;r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function JPt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function QPt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function eFt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}g6("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);g6("ERR_INVALID_ARG_TYPE",function(e,t,r){Aw===void 0&&(Aw=e9()),Aw(typeof e=="string","'name' must be a string");var n;typeof t=="string"&&JPt(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var a;if(QPt(e," argument"))a="The ".concat(e," ").concat(n," ").concat(gEe(t,"type"));else{var i=eFt(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(gEe(t,"type"))}return a+=". Received type ".concat(ry(r)),a},TypeError);g6("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";qj===void 0&&(qj=Tw());var n=qj.inspect(t);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(n)},TypeError,RangeError);g6("ERR_INVALID_RETURN_VALUE",function(e,t,r){var n;return r&&r.constructor&&r.constructor.name?n="instance of ".concat(r.constructor.name):n="type ".concat(ry(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(n,".")},TypeError);g6("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var n="The ",a=t.length;switch(t=t.map(function(i){return'"'.concat(i,'"')}),a){case 1:n+="".concat(t[0]," argument");break;case 2:n+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:n+=t.slice(0,a-1).join(", "),n+=", and ".concat(t[a-1]," arguments");break}return"".concat(n," must be specified")},TypeError);yEe.exports.codes=mEe});var kEe=fe((Zxr,EEe)=>{"use strict";function xEe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _Ee(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}function fFt(e,t){if(t=Math.floor(t),e.length==0||t==0)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var wp="",m6="",y6="",Lh="",O2={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},hFt=10;function TEe(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(n){r[n]=e[n]}),Object.defineProperty(r,"message",{value:e.message}),r}function x6(e){return Vj(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function dFt(e,t,r){var n="",a="",i=0,o="",s=!1,l=x6(e),u=l.split(` -`),c=x6(t).split(` -`),f=0,v="";if(r==="strictEqual"&&l0(e)==="object"&&l0(t)==="object"&&e!==null&&t!==null&&(r="strictEqualObject"),u.length===1&&c.length===1&&u[0]!==c[0]){var g=u[0].length+c[0].length;if(g<=hFt){if((l0(e)!=="object"||e===null)&&(l0(t)!=="object"||t===null)&&(e!==0||t!==0))return"".concat(O2[r],` + `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}ts.types=$H();function dEe(e){return Array.isArray(e)}ts.isArray=dEe;function Ij(e){return typeof e=="boolean"}ts.isBoolean=Ij;function KL(e){return e===null}ts.isNull=KL;function qPt(e){return e==null}ts.isNullOrUndefined=qPt;function vEe(e){return typeof e=="number"}ts.isNumber=vEe;function JL(e){return typeof e=="string"}ts.isString=JL;function BPt(e){return typeof e=="symbol"}ts.isSymbol=BPt;function Bx(e){return e===void 0}ts.isUndefined=Bx;function p6(e){return Tw(e)&&zj(e)==="[object RegExp]"}ts.isRegExp=p6;ts.types.isRegExp=p6;function Tw(e){return typeof e=="object"&&e!==null}ts.isObject=Tw;function $L(e){return Tw(e)&&zj(e)==="[object Date]"}ts.isDate=$L;ts.types.isDate=$L;function g6(e){return Tw(e)&&(zj(e)==="[object Error]"||e instanceof Error)}ts.isError=g6;ts.types.isNativeError=g6;function XL(e){return typeof e=="function"}ts.isFunction=XL;function OPt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}ts.isPrimitive=OPt;ts.isBuffer=KH();function zj(e){return Object.prototype.toString.call(e)}function Dj(e){return e<10?"0"+e.toString(10):e.toString(10)}var NPt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function UPt(){var e=new Date,t=[Dj(e.getHours()),Dj(e.getMinutes()),Dj(e.getSeconds())].join(":");return[e.getDate(),NPt[e.getMonth()],t].join(" ")}ts.log=function(){console.log("%s - %s",UPt(),ts.format.apply(ts,arguments))};ts.inherits=gg();ts._extend=function(e,t){if(!t||!Tw(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function pEe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var qx=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;ts.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(qx&&t[qx]){var r=t[qx];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,qx,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,a,i=new Promise(function(l,u){n=l,a=u}),o=[],s=0;s{"use strict";function ry(e){"@babel/helpers - typeof";return ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ry(e)}function gEe(e,t){for(var r=0;r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function QPt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function eFt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function tFt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}m6("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);m6("ERR_INVALID_ARG_TYPE",function(e,t,r){Mw===void 0&&(Mw=e9()),Mw(typeof e=="string","'name' must be a string");var n;typeof t=="string"&&QPt(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var a;if(eFt(e," argument"))a="The ".concat(e," ").concat(n," ").concat(mEe(t,"type"));else{var i=tFt(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(mEe(t,"type"))}return a+=". Received type ".concat(ry(r)),a},TypeError);m6("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";qj===void 0&&(qj=Aw());var n=qj.inspect(t);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(n)},TypeError,RangeError);m6("ERR_INVALID_RETURN_VALUE",function(e,t,r){var n;return r&&r.constructor&&r.constructor.name?n="instance of ".concat(r.constructor.name):n="type ".concat(ry(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(n,".")},TypeError);m6("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var n="The ",a=t.length;switch(t=t.map(function(i){return'"'.concat(i,'"')}),a){case 1:n+="".concat(t[0]," argument");break;case 2:n+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:n+=t.slice(0,a-1).join(", "),n+=", and ".concat(t[a-1]," arguments");break}return"".concat(n," must be specified")},TypeError);xEe.exports.codes=yEe});var CEe=fe((K2r,kEe)=>{"use strict";function _Ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function bEe(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}function hFt(e,t){if(t=Math.floor(t),e.length==0||t==0)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var wp="",y6="",x6="",Lh="",Ox={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},dFt=10;function AEe(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(n){r[n]=e[n]}),Object.defineProperty(r,"message",{value:e.message}),r}function _6(e){return Vj(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function vFt(e,t,r){var n="",a="",i=0,o="",s=!1,l=_6(e),u=l.split(` +`),c=_6(t).split(` +`),f=0,v="";if(r==="strictEqual"&&l0(e)==="object"&&l0(t)==="object"&&e!==null&&t!==null&&(r="strictEqualObject"),u.length===1&&c.length===1&&u[0]!==c[0]){var g=u[0].length+c[0].length;if(g<=dFt){if((l0(e)!=="object"||e===null)&&(l0(t)!=="object"||t===null)&&(e!==0||t!==0))return"".concat(Ox[r],` `)+"".concat(u[0]," !== ").concat(c[0],` `)}else if(r!=="strictEqualObject"){var p=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(g2&&(v=` - `.concat(fFt(" ",f),"^"),f=0)}}}for(var x=u[u.length-1],_=c[c.length-1];x===_&&(f++<2?o=` - `.concat(x).concat(o):n=x,u.pop(),c.pop(),!(u.length===0||c.length===0));)x=u[u.length-1],_=c[c.length-1];var y=Math.max(u.length,c.length);if(y===0){var C=l.split(` -`);if(C.length>30)for(C[26]="".concat(wp,"...").concat(Lh);C.length>27;)C.pop();return"".concat(O2.notIdentical,` + `.concat(hFt(" ",f),"^"),f=0)}}}for(var _=u[u.length-1],x=c[c.length-1];_===x&&(f++<2?o=` + `.concat(_).concat(o):n=_,u.pop(),c.pop(),!(u.length===0||c.length===0));)_=u[u.length-1],x=c[c.length-1];var y=Math.max(u.length,c.length);if(y===0){var C=l.split(` +`);if(C.length>30)for(C[26]="".concat(wp,"...").concat(Lh);C.length>27;)C.pop();return"".concat(Ox.notIdentical,` `).concat(C.join(` `),` `)}f>3&&(o=` `.concat(wp,"...").concat(Lh).concat(o),s=!0),n!==""&&(o=` - `.concat(n).concat(o),n="");var k=0,S=O2[r]+` -`.concat(m6,"+ actual").concat(Lh," ").concat(y6,"- expected").concat(Lh),L=" ".concat(wp,"...").concat(Lh," Lines skipped");for(f=0;f1&&f>2&&(w>4?(a+=` + `.concat(n).concat(o),n="");var k=0,S=Ox[r]+` +`.concat(y6,"+ actual").concat(Lh," ").concat(x6,"- expected").concat(Lh),L=" ".concat(wp,"...").concat(Lh," Lines skipped");for(f=0;f1&&f>2&&(w>4?(a+=` `.concat(wp,"...").concat(Lh),s=!0):w>3&&(a+=` `.concat(c[f-2]),k++),a+=` `.concat(c[f-1]),k++),i=f,n+=` -`.concat(y6,"-").concat(Lh," ").concat(c[f]),k++;else if(c.length1&&f>2&&(w>4?(a+=` +`.concat(x6,"-").concat(Lh," ").concat(c[f]),k++;else if(c.length1&&f>2&&(w>4?(a+=` `.concat(wp,"...").concat(Lh),s=!0):w>3&&(a+=` `.concat(u[f-2]),k++),a+=` `.concat(u[f-1]),k++),i=f,a+=` -`.concat(m6,"+").concat(Lh," ").concat(u[f]),k++;else{var A=c[f],T=u[f],m=T!==A&&(!wEe(T,",")||T.slice(0,-1)!==A);m&&wEe(A,",")&&A.slice(0,-1)===T&&(m=!1,T+=","),m?(w>1&&f>2&&(w>4?(a+=` +`.concat(y6,"+").concat(Lh," ").concat(u[f]),k++;else{var T=c[f],A=u[f],m=A!==T&&(!TEe(A,",")||A.slice(0,-1)!==T);m&&TEe(T,",")&&T.slice(0,-1)===A&&(m=!1,A+=","),m?(w>1&&f>2&&(w>4?(a+=` `.concat(wp,"...").concat(Lh),s=!0):w>3&&(a+=` `.concat(u[f-2]),k++),a+=` `.concat(u[f-1]),k++),i=f,a+=` -`.concat(m6,"+").concat(Lh," ").concat(T),n+=` -`.concat(y6,"-").concat(Lh," ").concat(A),k+=2):(a+=n,n="",(w===1||f===0)&&(a+=` - `.concat(T),k++))}if(k>20&&f20&&f30)for(g[26]="".concat(wp,"...").concat(Lh);g.length>27;)g.pop();g.length===1?i=r.call(this,"".concat(v," ").concat(g[0])):i=r.call(this,"".concat(v,` +`).concat(a).concat(n).concat(o).concat(v)}var pFt=(function(e,t){oFt(n,e);var r=sFt(n);function n(a){var i;if(nFt(this,n),l0(a)!=="object"||a===null)throw new fFt("options","Object",a);var o=a.message,s=a.operator,l=a.stackStartFn,u=a.actual,c=a.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,o!=null)i=r.call(this,String(o));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(wp="\x1B[34m",y6="\x1B[32m",Lh="\x1B[39m",x6="\x1B[31m"):(wp="",y6="",Lh="",x6="")),l0(u)==="object"&&u!==null&&l0(c)==="object"&&c!==null&&"stack"in u&&u instanceof Error&&"stack"in c&&c instanceof Error&&(u=AEe(u),c=AEe(c)),s==="deepStrictEqual"||s==="strictEqual")i=r.call(this,vFt(u,c,s));else if(s==="notDeepStrictEqual"||s==="notStrictEqual"){var v=Ox[s],g=_6(u).split(` +`);if(s==="notStrictEqual"&&l0(u)==="object"&&u!==null&&(v=Ox.notStrictEqualObject),g.length>30)for(g[26]="".concat(wp,"...").concat(Lh);g.length>27;)g.pop();g.length===1?i=r.call(this,"".concat(v," ").concat(g[0])):i=r.call(this,"".concat(v,` `).concat(g.join(` `),` -`))}else{var p=x6(u),x="",_=O2[s];s==="notDeepEqual"||s==="notEqual"?(p="".concat(O2[s],` +`))}else{var p=_6(u),_="",x=Ox[s];s==="notDeepEqual"||s==="notEqual"?(p="".concat(Ox[s],` -`).concat(p),p.length>1024&&(p="".concat(p.slice(0,1021),"..."))):(x="".concat(x6(c)),p.length>512&&(p="".concat(p.slice(0,509),"...")),x.length>512&&(x="".concat(x.slice(0,509),"...")),s==="deepEqual"||s==="equal"?p="".concat(_,` +`).concat(p),p.length>1024&&(p="".concat(p.slice(0,1021),"..."))):(_="".concat(_6(c)),p.length>512&&(p="".concat(p.slice(0,509),"...")),_.length>512&&(_="".concat(_.slice(0,509),"...")),s==="deepEqual"||s==="equal"?p="".concat(x,` `).concat(p,` should equal -`):x=" ".concat(s," ").concat(x)),i=r.call(this,"".concat(p).concat(x))}return Error.stackTraceLimit=f,i.generatedMessage=!o,Object.defineProperty(Nj(i),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),i.code="ERR_ASSERTION",i.actual=u,i.expected=c,i.operator=s,Error.captureStackTrace&&Error.captureStackTrace(Nj(i),l),i.stack,i.name="AssertionError",MEe(i)}return nFt(n,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(i,o){return Vj(this,_Ee(_Ee({},o),{},{customInspect:!1,depth:0}))}}]),n})(Uj(Error),Vj.custom);EEe.exports=vFt});var Gj=fe(($xr,LEe)=>{"use strict";var CEe=Object.prototype.toString;LEe.exports=function(t){var r=CEe.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&CEe.call(t.callee)==="[object Function]"),n}});var OEe=fe((Kxr,BEe)=>{"use strict";var qEe;Object.keys||(w6=Object.prototype.hasOwnProperty,Hj=Object.prototype.toString,PEe=Gj(),jj=Object.prototype.propertyIsEnumerable,FEe=!jj.call({toString:null},"toString"),DEe=jj.call(function(){},"prototype"),T6=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r9=function(e){var t=e.constructor;return t&&t.prototype===e},REe={$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},IEe=(function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!REe["$"+e]&&w6.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{r9(window[e])}catch(t){return!0}}catch(t){return!0}return!1})(),zEe=function(e){if(typeof window=="undefined"||!IEe)return r9(e);try{return r9(e)}catch(t){return!1}},qEe=function(t){var r=t!==null&&typeof t=="object",n=Hj.call(t)==="[object Function]",a=PEe(t),i=r&&Hj.call(t)==="[object String]",o=[];if(!r&&!n&&!a)throw new TypeError("Object.keys called on a non-object");var s=DEe&&n;if(i&&t.length>0&&!w6.call(t,0))for(var l=0;l0)for(var u=0;u{"use strict";var pFt=Array.prototype.slice,gFt=Gj(),NEe=Object.keys,n9=NEe?function(t){return NEe(t)}:OEe(),UEe=Object.keys;n9.shim=function(){if(Object.keys){var t=(function(){var r=Object.keys(arguments);return r&&r.length===arguments.length})(1,2);t||(Object.keys=function(n){return gFt(n)?UEe(pFt.call(n)):UEe(n)})}else Object.keys=n9;return Object.keys||n9};VEe.exports=n9});var YEe=fe((Qxr,WEe)=>{"use strict";var mFt=Wj(),HEe=Q7()(),jEe=k2(),i9=eL(),yFt=jEe("Array.prototype.push"),GEe=jEe("Object.prototype.propertyIsEnumerable"),xFt=HEe?i9.getOwnPropertySymbols:null;WEe.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=i9(t);if(arguments.length===1)return n;for(var a=1;a{"use strict";var Yj=YEe(),_Ft=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n{"use strict";var $Ee=function(e){return e!==e};KEe.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||$Ee(t)&&$Ee(r))}});var a9=fe((r2r,JEe)=>{"use strict";var wFt=Xj();JEe.exports=function(){return typeof Object.is=="function"?Object.is:wFt}});var rke=fe((n2r,tke)=>{"use strict";var QEe=uL(),eke=r6(),TFt=eke(QEe("String.prototype.indexOf"));tke.exports=function(t,r){var n=QEe(t,!!r);return typeof n=="function"&&TFt(t,".prototype.")>-1?eke(n):n}});var A6=fe((i2r,oke)=>{"use strict";var AFt=Wj(),MFt=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",SFt=Object.prototype.toString,EFt=Array.prototype.concat,nke=UH(),kFt=function(e){return typeof e=="function"&&SFt.call(e)==="[object Function]"},ike=GH()(),CFt=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!kFt(n)||!n())return}ike?nke(e,t,r,!0):nke(e,t,r)},ake=function(e,t){var r=arguments.length>2?arguments[2]:{},n=AFt(t);MFt&&(n=EFt.call(n,Object.getOwnPropertySymbols(t)));for(var a=0;a{"use strict";var LFt=a9(),PFt=A6();ske.exports=function(){var t=LFt();return PFt(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var hke=fe((o2r,fke)=>{"use strict";var FFt=A6(),DFt=r6(),RFt=Xj(),uke=a9(),IFt=lke(),cke=DFt(uke(),Object);FFt(cke,{getPolyfill:uke,implementation:RFt,shim:IFt});fke.exports=cke});var Zj=fe((s2r,dke)=>{"use strict";dke.exports=function(t){return t!==t}});var $j=fe((l2r,vke)=>{"use strict";var zFt=Zj();vke.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:zFt}});var gke=fe((u2r,pke)=>{"use strict";var qFt=A6(),BFt=$j();pke.exports=function(){var t=BFt();return qFt(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var _ke=fe((c2r,xke)=>{"use strict";var OFt=r6(),NFt=A6(),UFt=Zj(),mke=$j(),VFt=gke(),yke=OFt(mke(),Number);NFt(yke,{getPolyfill:mke,implementation:UFt,shim:VFt});xke.exports=yke});var Nke=fe((f2r,Oke)=>{"use strict";function bke(e,t){return WFt(e)||jFt(e,t)||HFt(e,t)||GFt()}function GFt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HFt(e,t){if(e){if(typeof e=="string")return wke(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wke(e,t)}}function wke(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r10)return!0;for(var t=0;t57)return!0}return e.length===10&&e>=Math.pow(2,32)}function l9(e){return Object.keys(e).filter(tDt).concat(c9(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function Ike(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);a{"use strict";function Tp(e){"@babel/helpers - typeof";return Tp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tp(e)}function Uke(e,t){for(var r=0;r1?r-1:0),a=1;a1?r-1:0),a=1;a1?r-1:0),a=1;a1?r-1:0),a=1;a{"use strict";var LEe=Object.prototype.toString;PEe.exports=function(t){var r=LEe.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&LEe.call(t.callee)==="[object Function]"),n}});var NEe=fe((Q2r,OEe)=>{"use strict";var BEe;Object.keys||(T6=Object.prototype.hasOwnProperty,Hj=Object.prototype.toString,FEe=Gj(),jj=Object.prototype.propertyIsEnumerable,DEe=!jj.call({toString:null},"toString"),REe=jj.call(function(){},"prototype"),A6=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r9=function(e){var t=e.constructor;return t&&t.prototype===e},IEe={$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},zEe=(function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!IEe["$"+e]&&T6.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{r9(window[e])}catch(t){return!0}}catch(t){return!0}return!1})(),qEe=function(e){if(typeof window=="undefined"||!zEe)return r9(e);try{return r9(e)}catch(t){return!1}},BEe=function(t){var r=t!==null&&typeof t=="object",n=Hj.call(t)==="[object Function]",a=FEe(t),i=r&&Hj.call(t)==="[object String]",o=[];if(!r&&!n&&!a)throw new TypeError("Object.keys called on a non-object");var s=REe&&n;if(i&&t.length>0&&!T6.call(t,0))for(var l=0;l0)for(var u=0;u{"use strict";var gFt=Array.prototype.slice,mFt=Gj(),UEe=Object.keys,n9=UEe?function(t){return UEe(t)}:NEe(),VEe=Object.keys;n9.shim=function(){if(Object.keys){var t=(function(){var r=Object.keys(arguments);return r&&r.length===arguments.length})(1,2);t||(Object.keys=function(n){return mFt(n)?VEe(gFt.call(n)):VEe(n)})}else Object.keys=n9;return Object.keys||n9};GEe.exports=n9});var XEe=fe((txr,YEe)=>{"use strict";var yFt=Wj(),jEe=Q7()(),WEe=kx(),i9=eL(),xFt=WEe("Array.prototype.push"),HEe=WEe("Object.prototype.propertyIsEnumerable"),_Ft=jEe?i9.getOwnPropertySymbols:null;YEe.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=i9(t);if(arguments.length===1)return n;for(var a=1;a{"use strict";var Yj=XEe(),bFt=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n{"use strict";var KEe=function(e){return e!==e};JEe.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||KEe(t)&&KEe(r))}});var a9=fe((ixr,QEe)=>{"use strict";var TFt=Xj();QEe.exports=function(){return typeof Object.is=="function"?Object.is:TFt}});var nke=fe((axr,rke)=>{"use strict";var eke=uL(),tke=n6(),AFt=tke(eke("String.prototype.indexOf"));rke.exports=function(t,r){var n=eke(t,!!r);return typeof n=="function"&&AFt(t,".prototype.")>-1?tke(n):n}});var M6=fe((oxr,ske)=>{"use strict";var MFt=Wj(),SFt=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",EFt=Object.prototype.toString,kFt=Array.prototype.concat,ike=UH(),CFt=function(e){return typeof e=="function"&&EFt.call(e)==="[object Function]"},ake=GH()(),LFt=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!CFt(n)||!n())return}ake?ike(e,t,r,!0):ike(e,t,r)},oke=function(e,t){var r=arguments.length>2?arguments[2]:{},n=MFt(t);SFt&&(n=kFt.call(n,Object.getOwnPropertySymbols(t)));for(var a=0;a{"use strict";var PFt=a9(),FFt=M6();lke.exports=function(){var t=PFt();return FFt(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var dke=fe((lxr,hke)=>{"use strict";var DFt=M6(),RFt=n6(),IFt=Xj(),cke=a9(),zFt=uke(),fke=RFt(cke(),Object);DFt(fke,{getPolyfill:cke,implementation:IFt,shim:zFt});hke.exports=fke});var Zj=fe((uxr,vke)=>{"use strict";vke.exports=function(t){return t!==t}});var $j=fe((cxr,pke)=>{"use strict";var qFt=Zj();pke.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:qFt}});var mke=fe((fxr,gke)=>{"use strict";var BFt=M6(),OFt=$j();gke.exports=function(){var t=OFt();return BFt(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var bke=fe((hxr,_ke)=>{"use strict";var NFt=n6(),UFt=M6(),VFt=Zj(),yke=$j(),GFt=mke(),xke=NFt(yke(),Number);UFt(xke,{getPolyfill:yke,implementation:VFt,shim:GFt});_ke.exports=xke});var Uke=fe((dxr,Nke)=>{"use strict";function wke(e,t){return YFt(e)||WFt(e,t)||jFt(e,t)||HFt()}function HFt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jFt(e,t){if(e){if(typeof e=="string")return Tke(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Tke(e,t)}}function Tke(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r10)return!0;for(var t=0;t57)return!0}return e.length===10&&e>=Math.pow(2,32)}function l9(e){return Object.keys(e).filter(rDt).concat(c9(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function zke(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);a{"use strict";function Tp(e){"@babel/helpers - typeof";return Tp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tp(e)}function Vke(e,t){for(var r=0;r1?r-1:0),a=1;a1?r-1:0),a=1;a1?r-1:0),a=1;a1?r-1:0),a=1;a{var C6=1e3,L6=C6*60,P6=L6*60,F6=P6*24,EDt=F6*365.25;a8e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return kDt(e);if(r==="number"&&isNaN(e)===!1)return t.long?LDt(e):CDt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function kDt(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*EDt;case"days":case"day":case"d":return r*F6;case"hours":case"hour":case"hrs":case"hr":case"h":return r*P6;case"minutes":case"minute":case"mins":case"min":case"m":return r*L6;case"seconds":case"second":case"secs":case"sec":case"s":return r*C6;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function CDt(e){return e>=F6?Math.round(e/F6)+"d":e>=P6?Math.round(e/P6)+"h":e>=L6?Math.round(e/L6)+"m":e>=C6?Math.round(e/C6)+"s":e+"ms"}function LDt(e){return y9(e,F6,"day")||y9(e,P6,"hour")||y9(e,L6,"minute")||y9(e,C6,"second")||e+" ms"}function y9(e,t,r){if(!(e{Xs=s8e.exports=nW.debug=nW.default=nW;Xs.coerce=IDt;Xs.disable=DDt;Xs.enable=FDt;Xs.enabled=RDt;Xs.humanize=o8e();Xs.names=[];Xs.skips=[];Xs.formatters={};var rW;function PDt(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Xs.colors[Math.abs(t)%Xs.colors.length]}function nW(e){function t(){if(t.enabled){var r=t,n=+new Date,a=n-(rW||n);r.diff=a,r.prev=rW,r.curr=n,rW=n;for(var i=new Array(arguments.length),o=0;o{Fd=c8e.exports=l8e();Fd.log=BDt;Fd.formatArgs=qDt;Fd.save=ODt;Fd.load=u8e;Fd.useColors=zDt;Fd.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:NDt();Fd.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function zDt(){return typeof window!="undefined"&&window.process&&window.process.type==="renderer"?!0:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}Fd.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function qDt(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+Fd.humanize(this.diff),!!t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var n=0,a=0;e[0].replace(/%[a-zA-Z%]/g,function(i){i!=="%%"&&(n++,i==="%c"&&(a=n))}),e.splice(a,0,r)}}function BDt(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function ODt(e){try{e==null?Fd.storage.removeItem("debug"):Fd.storage.debug=e}catch(t){}}function u8e(){var e;try{e=Fd.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}Fd.enable(u8e());function NDt(){try{return window.localStorage}catch(e){}}});var x8e=fe((v2r,y8e)=>{var Sw=e9(),oy=f8e()("stream-parser");y8e.exports=VDt;var d8e=-1,x9=0,UDt=1,v8e=2;function VDt(e){var t=e&&typeof e._transform=="function",r=e&&typeof e._write=="function";if(!t&&!r)throw new Error("must pass a Writable or Transform stream in");oy("extending Parser into stream"),e._bytes=GDt,e._skipBytes=HDt,t&&(e._passthrough=jDt),t?e._transform=YDt:e._write=WDt}function D6(e){oy("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=d8e,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function GDt(e,t){Sw(!this._parserCallback,'there is already a "callback" set!'),Sw(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||D6(this),oy("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=x9}function HDt(e,t){Sw(!this._parserCallback,'there is already a "callback" set!'),Sw(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||D6(this),oy("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=UDt}function jDt(e,t){Sw(!this._parserCallback,'There is already a "callback" set!'),Sw(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||D6(this),oy("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=v8e}function WDt(e,t,r){this._parserInit||D6(this),oy("write(%o bytes)",e.length),typeof t=="function"&&(r=t),g8e(this,e,null,r)}function YDt(e,t,r){this._parserInit||D6(this),oy("transform(%o bytes)",e.length),typeof t!="function"&&(t=this._parserOutput),g8e(this,e,t,r)}function p8e(e,t,r,n){return e._parserBytesLeft<=0?n(new Error("got data but not currently parsing anything")):t.length<=e._parserBytesLeft?function(){return h8e(e,t,r,n)}:function(){var a=t.slice(0,e._parserBytesLeft);return h8e(e,a,r,function(i){if(i)return n(i);if(t.length>a.length)return function(){return p8e(e,t.slice(a.length),r,n)}})}}function h8e(e,t,r,n){if(e._parserBytesLeft-=t.length,oy("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===x9?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===v8e&&r(t),e._parserBytesLeft===0){var a=e._parserCallback;if(a&&e._parserState===x9&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==x9&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=d8e,e._parserBuffers.splice(0),a){var i=[];t&&i.push(t),r&&i.push(r);var o=a.length>i.length;o&&i.push(m8e(n));var s=a.apply(e,i);if(!o||n===s)return n}}else return n}var g8e=m8e(p8e);function m8e(e){return function(){for(var t=e.apply(this,arguments);typeof t=="function";)t=t();return t}}});var ds=fe(Ph=>{"use strict";var _8e=uEe().Transform,XDt=x8e();function R6(){_8e.call(this,{readableObjectMode:!0})}R6.prototype=Object.create(_8e.prototype);R6.prototype.constructor=R6;XDt(R6.prototype);Ph.ParserStream=R6;Ph.sliceEq=function(e,t,r){for(var n=t,a=0;a>16};Ph.readInt16BE=function(e,t){return Ph.readUInt16BE(e,t)<<16>>16};Ph.readUInt32LE=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+e[t+3]*16777216};Ph.readUInt32BE=function(e,t){return e[t]*16777216+(e[t+1]<<16|e[t+2]<<8|e[t+3])};Ph.readInt32LE=function(e,t){return Ph.readUInt32LE(e,t)|0};Ph.readInt32BE=function(e,t){return Ph.readUInt32BE(e,t)|0};function _9(e,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=e,t&&(this.code=t),r&&(this.statusCode=r)}_9.prototype=Object.create(Error.prototype);_9.prototype.constructor=_9;Ph.ProbeError=_9});var b8e=fe((g2r,b9)=>{"use strict";var Ew=ds().readUInt16BE,aW=ds().readUInt32BE;function I6(e,t){if(e.length<4+t)return null;var r=aW(e,t);return e.length>4&15,n=e[4]&15,a=e[5]>>4&15,i=Ew(e,6),o=8,s=0;si.width||a.width===i.width&&a.height>i.height?a:i}),r=e.reduce(function(a,i){return a.height>i.height||a.height===i.height&&a.width>i.width?a:i}),n;return t.width>r.height||t.width===r.height&&t.height>r.width?n=t:n=r,n}b9.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(QDt(e,t),!!t.sizes.length){var r=eRt(t.sizes),n=1;t.transforms.forEach(function(i){var o={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},s={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(i.type==="imir"&&(i.value===0?n=s[n]:(n=s[n],n=o[n],n=o[n])),i.type==="irot")for(var l=0;l{"use strict";function w9(e,t){var r=new Error(e);return r.code=t,r}function tRt(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function xg(e,t,r){this.input=e.subarray(t,r),this.start=t;var n=String.fromCharCode.apply(null,this.input.subarray(0,4));if(n!=="II*\0"&&n!=="MM\0*")throw w9("invalid TIFF signature","EBADDATA");this.big_endian=n[0]==="M"}xg.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}};xg.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw w9("unexpected EOF","EBADDATA");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};xg.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw w9("unexpected EOF","EBADDATA");return this.big_endian?t[e]*16777216+t[e+1]*65536+t[e+2]*256+t[e+3]:t[e]+t[e+1]*256+t[e+2]*65536+t[e+3]*16777216};xg.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};xg.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}};xg.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t],r;case 6:return r=this.input[t],r|(r&128)*33554430;case 3:return r=this.read_uint16(t),r;case 8:return r=this.read_uint16(t),r|(r&32768)*131070;case 4:return r=this.read_uint32(t),r;case 9:return r=this.read_uint32(t),r|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}};xg.prototype.scan_ifd=function(e,t,r){var n=this.read_uint16(t);t+=2;for(var a=0;athis.input.length)throw w9("unexpected EOF","EBADDATA");for(var v=[],g=c,p=0;p0&&(this.ifds_to_read.push({id:i,offset:v[0]}),f=!0);var _={is_big_endian:this.big_endian,ifd:e,tag:i,format:o,count:s,entry_offset:t+this.start,data_length:u,data_offset:c+this.start,value:v,is_subifd_link:f};if(r(_)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};oW.exports.ExifParser=xg;oW.exports.get_orientation=function(e){var t=0;try{return new xg(e,0,e.length).each(function(r){if(r.ifd===0&&r.tag===274&&Array.isArray(r.value))return t=r.value[0],!1}),t}catch(r){return-1}}});var T8e=fe((y2r,w8e)=>{"use strict";var rRt=ds().str2arr,nRt=ds().sliceEq,iRt=ds().readUInt32BE,A9=b8e(),aRt=T9(),oRt=rRt("ftyp");w8e.exports=function(e){if(nRt(e,4,oRt)){var t=A9.unbox(e,0);if(t){var r=A9.getMimeType(t.data);if(r){for(var n,a=t.end;;){var i=A9.unbox(e,a);if(!i)break;if(a=i.end,i.boxtype==="mdat")return;if(i.boxtype==="meta"){n=i.data;break}}if(n){var o=A9.readSizeFromMeta(n);if(o){var s={width:o.width,height:o.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(o.variants.length>1&&(s.variants=o.variants),o.orientation&&(s.orientation=o.orientation),o.exif_location&&o.exif_location.offset+o.exif_location.length<=e.length){var l=iRt(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+l+4,o.exif_location.offset+o.exif_location.length),c=aRt.get_orientation(u);c>0&&(s.orientation=c)}return s}}}}}}});var E8e=fe((x2r,S8e)=>{"use strict";var sRt=ds().str2arr,lRt=ds().sliceEq,A8e=ds().readInt16LE,M8e=ds().readInt32LE,uRt=ds().readUInt32LE,cRt=sRt("BM");S8e.exports=function(e){if(!(e.length<26)&&lRt(e,0,cRt)){var t,r,n=uRt(e,14);if(n===12)r=A8e(e,18),t=A8e(e,20);else if(n>12)r=M8e(e,18),t=M8e(e,22);else return;return{width:r,height:Math.abs(t),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}});var F8e=fe((_2r,P8e)=>{"use strict";var L8e=ds().str2arr,k8e=ds().sliceEq,C8e=ds().readUInt16LE,fRt=L8e("GIF87a"),hRt=L8e("GIF89a");P8e.exports=function(e){if(!(e.length<10)&&!(!k8e(e,0,fRt)&&!k8e(e,0,hRt)))return{width:C8e(e,6),height:C8e(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var R8e=fe((b2r,D8e)=>{"use strict";var sW=ds().readUInt16LE,dRt=0,vRt=1,lW=16;D8e.exports=function(e){var t=sW(e,0),r=sW(e,2),n=sW(e,4);if(!(t!==dRt||r!==vRt||!n)&&!(e.length<6+n*lW)){for(var a=[],i={width:0,height:0},o=0;oi.width||l>i.height)&&(i=u)}return{width:i.width,height:i.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}});var z8e=fe((w2r,I8e)=>{"use strict";var uW=ds().readUInt16BE,pRt=ds().str2arr,gRt=ds().sliceEq,mRt=T9(),yRt=pRt("Exif\0\0");I8e.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var r=e[t++],n;r===255;)r=e[t++];if(r>=208&&r<=217||r===1)n=0;else if(r>=192&&r<=254){if(e.length-t<2)return;n=uW(e,t)-2,t+=2}else return;if(r===217||r===218)return;var a;if(r===225&&n>=10&&gRt(e,t,yRt)&&(a=mRt.get_orientation(e.slice(t+6,t+n))),n>=5&&r>=192&&r<=207&&r!==196&&r!==200&&r!==204){if(e.length-t0&&(i.orientation=a),i}t+=n}}});var U8e=fe((T2r,N8e)=>{"use strict";var O8e=ds().str2arr,q8e=ds().sliceEq,B8e=ds().readUInt32BE,xRt=O8e(`\x89PNG\r +`));var s=new ay({actual:e,expected:t,message:r,operator:a,stackStartFn:n});throw s.generatedMessage=o,s}}Ul.match=function e(t,r,n){n8e(t,r,n,e,"match")};Ul.doesNotMatch=function e(t,r,n){n8e(t,r,n,e,"doesNotMatch")};function i8e(){for(var e=arguments.length,t=new Array(e),r=0;r{var L6=1e3,P6=L6*60,F6=P6*60,D6=F6*24,kDt=D6*365.25;o8e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return CDt(e);if(r==="number"&&isNaN(e)===!1)return t.long?PDt(e):LDt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function CDt(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*kDt;case"days":case"day":case"d":return r*D6;case"hours":case"hour":case"hrs":case"hr":case"h":return r*F6;case"minutes":case"minute":case"mins":case"min":case"m":return r*P6;case"seconds":case"second":case"secs":case"sec":case"s":return r*L6;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function LDt(e){return e>=D6?Math.round(e/D6)+"d":e>=F6?Math.round(e/F6)+"h":e>=P6?Math.round(e/P6)+"m":e>=L6?Math.round(e/L6)+"s":e+"ms"}function PDt(e){return y9(e,D6,"day")||y9(e,F6,"hour")||y9(e,P6,"minute")||y9(e,L6,"second")||e+" ms"}function y9(e,t,r){if(!(e{Xs=l8e.exports=nW.debug=nW.default=nW;Xs.coerce=zDt;Xs.disable=RDt;Xs.enable=DDt;Xs.enabled=IDt;Xs.humanize=s8e();Xs.names=[];Xs.skips=[];Xs.formatters={};var rW;function FDt(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Xs.colors[Math.abs(t)%Xs.colors.length]}function nW(e){function t(){if(t.enabled){var r=t,n=+new Date,a=n-(rW||n);r.diff=a,r.prev=rW,r.curr=n,rW=n;for(var i=new Array(arguments.length),o=0;o{Fd=f8e.exports=u8e();Fd.log=ODt;Fd.formatArgs=BDt;Fd.save=NDt;Fd.load=c8e;Fd.useColors=qDt;Fd.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:UDt();Fd.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function qDt(){return typeof window!="undefined"&&window.process&&window.process.type==="renderer"?!0:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}Fd.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function BDt(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+Fd.humanize(this.diff),!!t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var n=0,a=0;e[0].replace(/%[a-zA-Z%]/g,function(i){i!=="%%"&&(n++,i==="%c"&&(a=n))}),e.splice(a,0,r)}}function ODt(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function NDt(e){try{e==null?Fd.storage.removeItem("debug"):Fd.storage.debug=e}catch(t){}}function c8e(){var e;try{e=Fd.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}Fd.enable(c8e());function UDt(){try{return window.localStorage}catch(e){}}});var _8e=fe((gxr,x8e)=>{var Ew=e9(),oy=h8e()("stream-parser");x8e.exports=GDt;var v8e=-1,x9=0,VDt=1,p8e=2;function GDt(e){var t=e&&typeof e._transform=="function",r=e&&typeof e._write=="function";if(!t&&!r)throw new Error("must pass a Writable or Transform stream in");oy("extending Parser into stream"),e._bytes=HDt,e._skipBytes=jDt,t&&(e._passthrough=WDt),t?e._transform=XDt:e._write=YDt}function R6(e){oy("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=v8e,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function HDt(e,t){Ew(!this._parserCallback,'there is already a "callback" set!'),Ew(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||R6(this),oy("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=x9}function jDt(e,t){Ew(!this._parserCallback,'there is already a "callback" set!'),Ew(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||R6(this),oy("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=VDt}function WDt(e,t){Ew(!this._parserCallback,'There is already a "callback" set!'),Ew(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||R6(this),oy("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=p8e}function YDt(e,t,r){this._parserInit||R6(this),oy("write(%o bytes)",e.length),typeof t=="function"&&(r=t),m8e(this,e,null,r)}function XDt(e,t,r){this._parserInit||R6(this),oy("transform(%o bytes)",e.length),typeof t!="function"&&(t=this._parserOutput),m8e(this,e,t,r)}function g8e(e,t,r,n){return e._parserBytesLeft<=0?n(new Error("got data but not currently parsing anything")):t.length<=e._parserBytesLeft?function(){return d8e(e,t,r,n)}:function(){var a=t.slice(0,e._parserBytesLeft);return d8e(e,a,r,function(i){if(i)return n(i);if(t.length>a.length)return function(){return g8e(e,t.slice(a.length),r,n)}})}}function d8e(e,t,r,n){if(e._parserBytesLeft-=t.length,oy("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===x9?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===p8e&&r(t),e._parserBytesLeft===0){var a=e._parserCallback;if(a&&e._parserState===x9&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==x9&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=v8e,e._parserBuffers.splice(0),a){var i=[];t&&i.push(t),r&&i.push(r);var o=a.length>i.length;o&&i.push(y8e(n));var s=a.apply(e,i);if(!o||n===s)return n}}else return n}var m8e=y8e(g8e);function y8e(e){return function(){for(var t=e.apply(this,arguments);typeof t=="function";)t=t();return t}}});var ds=fe(Ph=>{"use strict";var b8e=cEe().Transform,ZDt=_8e();function I6(){b8e.call(this,{readableObjectMode:!0})}I6.prototype=Object.create(b8e.prototype);I6.prototype.constructor=I6;ZDt(I6.prototype);Ph.ParserStream=I6;Ph.sliceEq=function(e,t,r){for(var n=t,a=0;a>16};Ph.readInt16BE=function(e,t){return Ph.readUInt16BE(e,t)<<16>>16};Ph.readUInt32LE=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+e[t+3]*16777216};Ph.readUInt32BE=function(e,t){return e[t]*16777216+(e[t+1]<<16|e[t+2]<<8|e[t+3])};Ph.readInt32LE=function(e,t){return Ph.readUInt32LE(e,t)|0};Ph.readInt32BE=function(e,t){return Ph.readUInt32BE(e,t)|0};function _9(e,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=e,t&&(this.code=t),r&&(this.statusCode=r)}_9.prototype=Object.create(Error.prototype);_9.prototype.constructor=_9;Ph.ProbeError=_9});var w8e=fe((yxr,b9)=>{"use strict";var kw=ds().readUInt16BE,aW=ds().readUInt32BE;function z6(e,t){if(e.length<4+t)return null;var r=aW(e,t);return e.length>4&15,n=e[4]&15,a=e[5]>>4&15,i=kw(e,6),o=8,s=0;si.width||a.width===i.width&&a.height>i.height?a:i}),r=e.reduce(function(a,i){return a.height>i.height||a.height===i.height&&a.width>i.width?a:i}),n;return t.width>r.height||t.width===r.height&&t.height>r.width?n=t:n=r,n}b9.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(eRt(e,t),!!t.sizes.length){var r=tRt(t.sizes),n=1;t.transforms.forEach(function(i){var o={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},s={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(i.type==="imir"&&(i.value===0?n=s[n]:(n=s[n],n=o[n],n=o[n])),i.type==="irot")for(var l=0;l{"use strict";function w9(e,t){var r=new Error(e);return r.code=t,r}function rRt(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function xg(e,t,r){this.input=e.subarray(t,r),this.start=t;var n=String.fromCharCode.apply(null,this.input.subarray(0,4));if(n!=="II*\0"&&n!=="MM\0*")throw w9("invalid TIFF signature","EBADDATA");this.big_endian=n[0]==="M"}xg.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}};xg.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw w9("unexpected EOF","EBADDATA");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};xg.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw w9("unexpected EOF","EBADDATA");return this.big_endian?t[e]*16777216+t[e+1]*65536+t[e+2]*256+t[e+3]:t[e]+t[e+1]*256+t[e+2]*65536+t[e+3]*16777216};xg.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};xg.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}};xg.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t],r;case 6:return r=this.input[t],r|(r&128)*33554430;case 3:return r=this.read_uint16(t),r;case 8:return r=this.read_uint16(t),r|(r&32768)*131070;case 4:return r=this.read_uint32(t),r;case 9:return r=this.read_uint32(t),r|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}};xg.prototype.scan_ifd=function(e,t,r){var n=this.read_uint16(t);t+=2;for(var a=0;athis.input.length)throw w9("unexpected EOF","EBADDATA");for(var v=[],g=c,p=0;p0&&(this.ifds_to_read.push({id:i,offset:v[0]}),f=!0);var x={is_big_endian:this.big_endian,ifd:e,tag:i,format:o,count:s,entry_offset:t+this.start,data_length:u,data_offset:c+this.start,value:v,is_subifd_link:f};if(r(x)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};oW.exports.ExifParser=xg;oW.exports.get_orientation=function(e){var t=0;try{return new xg(e,0,e.length).each(function(r){if(r.ifd===0&&r.tag===274&&Array.isArray(r.value))return t=r.value[0],!1}),t}catch(r){return-1}}});var A8e=fe((_xr,T8e)=>{"use strict";var nRt=ds().str2arr,iRt=ds().sliceEq,aRt=ds().readUInt32BE,A9=w8e(),oRt=T9(),sRt=nRt("ftyp");T8e.exports=function(e){if(iRt(e,4,sRt)){var t=A9.unbox(e,0);if(t){var r=A9.getMimeType(t.data);if(r){for(var n,a=t.end;;){var i=A9.unbox(e,a);if(!i)break;if(a=i.end,i.boxtype==="mdat")return;if(i.boxtype==="meta"){n=i.data;break}}if(n){var o=A9.readSizeFromMeta(n);if(o){var s={width:o.width,height:o.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(o.variants.length>1&&(s.variants=o.variants),o.orientation&&(s.orientation=o.orientation),o.exif_location&&o.exif_location.offset+o.exif_location.length<=e.length){var l=aRt(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+l+4,o.exif_location.offset+o.exif_location.length),c=oRt.get_orientation(u);c>0&&(s.orientation=c)}return s}}}}}}});var k8e=fe((bxr,E8e)=>{"use strict";var lRt=ds().str2arr,uRt=ds().sliceEq,M8e=ds().readInt16LE,S8e=ds().readInt32LE,cRt=ds().readUInt32LE,fRt=lRt("BM");E8e.exports=function(e){if(!(e.length<26)&&uRt(e,0,fRt)){var t,r,n=cRt(e,14);if(n===12)r=M8e(e,18),t=M8e(e,20);else if(n>12)r=S8e(e,18),t=S8e(e,22);else return;return{width:r,height:Math.abs(t),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}});var D8e=fe((wxr,F8e)=>{"use strict";var P8e=ds().str2arr,C8e=ds().sliceEq,L8e=ds().readUInt16LE,hRt=P8e("GIF87a"),dRt=P8e("GIF89a");F8e.exports=function(e){if(!(e.length<10)&&!(!C8e(e,0,hRt)&&!C8e(e,0,dRt)))return{width:L8e(e,6),height:L8e(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var I8e=fe((Txr,R8e)=>{"use strict";var sW=ds().readUInt16LE,vRt=0,pRt=1,lW=16;R8e.exports=function(e){var t=sW(e,0),r=sW(e,2),n=sW(e,4);if(!(t!==vRt||r!==pRt||!n)&&!(e.length<6+n*lW)){for(var a=[],i={width:0,height:0},o=0;oi.width||l>i.height)&&(i=u)}return{width:i.width,height:i.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}});var q8e=fe((Axr,z8e)=>{"use strict";var uW=ds().readUInt16BE,gRt=ds().str2arr,mRt=ds().sliceEq,yRt=T9(),xRt=gRt("Exif\0\0");z8e.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var r=e[t++],n;r===255;)r=e[t++];if(r>=208&&r<=217||r===1)n=0;else if(r>=192&&r<=254){if(e.length-t<2)return;n=uW(e,t)-2,t+=2}else return;if(r===217||r===218)return;var a;if(r===225&&n>=10&&mRt(e,t,xRt)&&(a=yRt.get_orientation(e.slice(t+6,t+n))),n>=5&&r>=192&&r<=207&&r!==196&&r!==200&&r!==204){if(e.length-t0&&(i.orientation=a),i}t+=n}}});var V8e=fe((Mxr,U8e)=>{"use strict";var N8e=ds().str2arr,B8e=ds().sliceEq,O8e=ds().readUInt32BE,_Rt=N8e(`\x89PNG\r  -`),_Rt=O8e("IHDR");N8e.exports=function(e){if(!(e.length<24)&&q8e(e,0,xRt)&&q8e(e,12,_Rt))return{width:B8e(e,16),height:B8e(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var H8e=fe((A2r,G8e)=>{"use strict";var bRt=ds().str2arr,wRt=ds().sliceEq,V8e=ds().readUInt32BE,TRt=bRt("8BPS\0");G8e.exports=function(e){if(!(e.length<22)&&wRt(e,0,TRt))return{width:V8e(e,18),height:V8e(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var Y8e=fe((M2r,W8e)=>{"use strict";function ARt(e){return e===32||e===9||e===13||e===10}function kw(e){return typeof e=="number"&&isFinite(e)&&e>0}function MRt(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t]*>/,ERt=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,kRt=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,CRt=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,LRt=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,j8e=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function PRt(e){var t=e.match(kRt),r=e.match(CRt),n=e.match(LRt);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function x1(e){return j8e.test(e)?e.match(j8e)[0]:"px"}W8e.exports=function(e){if(MRt(e)){for(var t="",r=0;r{"use strict";var $8e=ds().str2arr,X8e=ds().sliceEq,FRt=ds().readUInt16LE,DRt=ds().readUInt16BE,RRt=ds().readUInt32LE,IRt=ds().readUInt32BE,zRt=$8e("II*\0"),qRt=$8e("MM\0*");function M9(e,t,r){return r?DRt(e,t):FRt(e,t)}function cW(e,t,r){return r?IRt(e,t):RRt(e,t)}function Z8e(e,t,r){var n=M9(e,t+2,r),a=cW(e,t+4,r);return a!==1||n!==3&&n!==4?null:n===3?M9(e,t+8,r):cW(e,t+8,r)}K8e.exports=function(e){if(!(e.length<8)&&!(!X8e(e,0,zRt)&&!X8e(e,0,qRt))){var t=e[0]===77,r=cW(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var a=M9(e,n+0,t)*12;if(!(a<=0)&&(n+=2,!(e.length-n{"use strict";var tCe=ds().str2arr,Q8e=ds().sliceEq,eCe=ds().readUInt16LE,fW=ds().readUInt32LE,BRt=T9(),ORt=tCe("RIFF"),NRt=tCe("WEBP");function URt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:eCe(e,t+6)&16383,height:eCe(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function VRt(e,t){if(e[t]===47){var r=fW(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function GRt(e,t){return{width:(e[t+6]<<16|e[t+5]<<8|e[t+4])+1,height:(e[t+9]<<16|e[t+8]<<8|e[t+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}rCe.exports=function(e){if(!(e.length<16)&&!(!Q8e(e,0,ORt)||!Q8e(e,8,NRt))){var t=12,r=null,n=0,a=fW(e,4)+8;if(!(a>e.length)){for(;t+8=10?r=r||URt(e,t+8):i==="VP8L"&&o>=5?r=r||VRt(e,t+8):i==="VP8X"&&o>=10?r=r||GRt(e,t+8):i==="EXIF"&&(n=BRt.get_orientation(e.slice(t+8,t+8+o)),t=1/0),t+=8+o}if(r)return n>0&&(r.orientation=n),r}}}});var aCe=fe((k2r,iCe)=>{"use strict";iCe.exports={avif:T8e(),bmp:E8e(),gif:F8e(),ico:R8e(),jpeg:z8e(),png:U8e(),psd:H8e(),svg:Y8e(),tiff:J8e(),webp:nCe()}});var oCe=fe((C2r,dW)=>{"use strict";var hW=aCe();function HRt(e){for(var t=Object.keys(hW),r=0;r0&&n.height>0?n:null}return null}dW.exports=function(t){return HRt(t)};dW.exports.parsers=hW});var lCe=fe(sCe=>{"use strict";var jRt=oCe(),WRt=ag().IMAGE_URL_PREFIX,YRt=M2().Buffer;sCe.getImageSize=function(e){var t=e.replace(WRt,""),r=new YRt(t,"base64");return jRt(r)}});var fCe=fe((P2r,cCe)=>{"use strict";var uCe=Xt(),XRt=nw(),ZRt=aa(),S9=Yi(),$Rt=Xt().maxRowLength,KRt=lCe().getImageSize;cCe.exports=function(t,r){var n,a;if(r._hasZ)n=r.z.length,a=$Rt(r.z);else if(r._hasSource){var i=KRt(r.source);n=i.height,a=i.width}var o=S9.getFromId(t,r.xaxis||"x"),s=S9.getFromId(t,r.yaxis||"y"),l=o.d2c(r.x0)-r.dx/2,u=s.d2c(r.y0)-r.dy/2,c,f=[l,l+a*r.dx],v=[u,u+n*r.dy];if(o&&o.type==="log")for(c=0;c{"use strict";var tIt=xi(),N2=Xt(),hCe=N2.strTranslate,rIt=Q0(),nIt=nw(),iIt=eG(),aIt=x7().STYLE;dCe.exports=function(t,r,n,a){var i=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&iIt();N2.makeTraceGroups(a,n,"im").each(function(l){var u=tIt.select(this),c=l[0],f=c.trace,v=(f.zsmooth==="fast"||f.zsmooth===!1&&s)&&!f._hasZ&&f._hasSource&&i.type==="linear"&&o.type==="linear";f._realImage=v;var g=c.z,p=c.x0,x=c.y0,_=c.w,y=c.h,C=f.dx,k=f.dy,S,L,w,A,T,m;for(m=0;S===void 0&&m<_;)S=i.c2p(p+m*C),m++;for(m=_;L===void 0&&m>0;)L=i.c2p(p+m*C),m--;for(m=0;A===void 0&&m0;)T=o.c2p(x+m*k),m--;if(LU[0];if(J||ee){var ce=S+E/2,ye=A+I/2;j+="transform:"+hCe(ce+"px",ye+"px")+"scale("+(J?-1:1)+","+(ee?-1:1)+")"+hCe(-ce+"px",-ye+"px")+";"}}V.attr("style",j);var xe=new Promise(function(ue){if(f._hasZ)ue();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===_&&f._canvas.el.height===y&&f._canvas.source===f.source)ue();else{var K=document.createElement("canvas");K.width=_,K.height=y;var _e=K.getContext("2d",{willReadFrequently:!0});f._image=f._image||new Image;var ne=f._image;ne.onload=function(){_e.drawImage(ne,0,0),f._canvas={el:K,source:f.source},ue()},ne.setAttribute("src",f.source)}}).then(function(){var ue,K;if(f._hasZ)K=O(function(ae,pe){var ie=g[pe][ae];return N2.isTypedArray(ie)&&(ie=Array.from(ie)),ie}),ue=K.toDataURL("image/png");else if(f._hasSource)if(v)ue=f.source;else{var _e=f._canvas.el.getContext("2d",{willReadFrequently:!0}),ne=_e.getImageData(0,0,_,y).data;K=O(function(ae,pe){var ie=4*(pe*_+ae);return[ne[ie],ne[ie+1],ne[ie+2],ne[ie+3]]}),ue=K.toDataURL("image/png")}V.attr({"xlink:href":ue,height:I,width:E,x:S,y:A})});t._promises.push(xe)})}});var gCe=fe((D2r,pCe)=>{"use strict";var oIt=xi();pCe.exports=function(t){oIt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var _Ce=fe((R2r,xCe)=>{"use strict";var mCe=kl(),yCe=Xt(),E9=yCe.isArrayOrTypedArray,sIt=nw();xCe.exports=function(t,r,n){var a=t.cd[0],i=a.trace,o=t.xa,s=t.ya;if(!(mCe.inbox(r-a.x0,r-(a.x0+a.w*i.dx),0)>0||mCe.inbox(n-a.y0,n-(a.y0+a.h*i.dy),0)>0)){var l=Math.floor((r-a.x0)/i.dx),u=Math.floor(Math.abs(n-a.y0)/i.dy),c;if(i._hasZ?c=a.z[u][l]:i._hasSource&&(c=i._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,u,1,1).data),!!c){var f=a.hi||i.hoverinfo,v;if(f){var g=f.split("+");g.indexOf("all")!==-1&&(g=["color"]),g.indexOf("color")!==-1&&(v=!0)}var p=sIt.colormodel[i.colormodel],x=p.colormodel||i.colormodel,_=x.length,y=i._scaler(c),C=p.suffix,k=[];(i.hovertemplate||v)&&(k.push("["+[y[0]+C[0],y[1]+C[1],y[2]+C[2]].join(", ")),_===4&&k.push(", "+y[3]+C[3]),k.push("]"),k=k.join(""),t.extraText=x.toUpperCase()+": "+k);var S;E9(i.hovertext)&&E9(i.hovertext[u])?S=i.hovertext[u][l]:E9(i.text)&&E9(i.text[u])&&(S=i.text[u][l]);var L=s.c2p(a.y0+(u+.5)*i.dy),w=a.x0+(l+.5)*i.dx,A=a.y0+(u+.5)*i.dy,T="["+c.slice(0,i.colormodel.length).join(", ")+"]";return[yCe.extendFlat(t,{index:[u,l],x0:o.c2p(a.x0+l*i.dx),x1:o.c2p(a.x0+(l+1)*i.dx),y0:L,y1:L,color:y,xVal:w,xLabelVal:w,yVal:A,yLabelVal:A,zLabelVal:T,text:S,hovertemplateLabels:{zLabel:T,colorLabel:k,"color[0]Label":y[0]+C[0],"color[1]Label":y[1]+C[1],"color[2]Label":y[2]+C[2],"color[3]Label":y[3]+C[3]}})]}}}});var wCe=fe((I2r,bCe)=>{"use strict";bCe.exports=function(t,r){return"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t.color=r.color,t.colormodel=r.trace.colormodel,t.z||(t.z=r.color),t}});var ACe=fe((z2r,TCe)=>{"use strict";TCe.exports={attributes:(fH(),Gs(cH)).default,supplyDefaults:fAe(),calc:fCe(),plot:vCe(),style:gCe(),hoverPoints:_Ce(),eventData:wCe(),moduleType:"trace",name:"image",basePlotModule:gu(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var SCe=fe((q2r,MCe)=>{"use strict";MCe.exports=ACe()});var U2=fe((B2r,kCe)=>{"use strict";var k9=Ho(),lIt=nl().attributes,uIt=Ds(),cIt=tc(),{hovertemplateAttrs:fIt,texttemplateAttrs:hIt,templatefallbackAttrs:ECe}=Oo(),sy=ta().extendFlat,dIt=Uc().pattern,C9=uIt({editType:"plot",arrayOk:!0,colorEditType:"plot"});kCe.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:cIt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:dIt,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:sy({},k9.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:fIt({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:ECe(),texttemplate:hIt({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:ECe({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:sy({},C9,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:sy({},C9,{}),outsidetextfont:sy({},C9,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:sy({},k9.showlegend,{arrayOk:!0}),legend:sy({},k9.legend,{arrayOk:!0}),legendrank:sy({},k9.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:sy({},C9,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:lIt({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"}}});var V2=fe((O2r,PCe)=>{"use strict";var vIt=aa(),z6=Xt(),pIt=U2(),gIt=nl().defaults,mIt=z0().handleText,yIt=Xt().coercePattern;function CCe(e,t){var r=z6.isArrayOrTypedArray(e),n=z6.isArrayOrTypedArray(t),a=Math.min(r?e.length:1/0,n?t.length:1/0);if(isFinite(a)||(a=0),a&&n){for(var i,o=0;o0){i=!0;break}}i||(a=0)}return{hasLabels:r,hasValues:n,len:a}}function LCe(e,t,r,n,a){var i=n("marker.line.width");i&&n("marker.line.color",a?void 0:r.paper_bgcolor);var o=n("marker.colors");yIt(n,"marker.pattern",o),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}function xIt(e,t,r,n){function a(C,k){return z6.coerce(e,t,pIt,C,k)}var i=a("labels"),o=a("values"),s=CCe(i,o),l=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(a("label0"),a("dlabel")),!l){t.visible=!1;return}t._length=l,LCe(e,t,n,a,!0),a("scalegroup");var u=a("text"),c=a("texttemplate");a("texttemplatefallback");var f;if(c||(f=a("textinfo",z6.isArrayOrTypedArray(u)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),c||f&&f!=="none"){var v=a("textposition");mIt(e,t,n,a,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var g=Array.isArray(v)||v==="auto",p=g||v==="outside";p&&a("automargin"),(v==="inside"||v==="auto"||Array.isArray(v))&&a("insidetextorientation")}else f==="none"&&a("textposition","none");gIt(t,n,a);var x=a("hole"),_=a("title.text");if(_){var y=a("title.position",x?"middle center":"top center");!x&&y==="middle center"&&(t.title.position="top center"),z6.coerceFont(a,"title.font",n.font)}a("sort"),a("direction"),a("rotation"),a("pull")}PCe.exports={handleLabelsAndValues:CCe,handleMarkerDefaults:LCe,supplyDefaults:xIt}});var L9=fe((N2r,FCe)=>{"use strict";FCe.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var RCe=fe((U2r,DCe)=>{"use strict";var _It=Xt(),bIt=L9();DCe.exports=function(t,r){function n(a,i){return _It.coerce(t,r,bIt,a,i)}n("hiddenlabels"),n("piecolorway",r.colorway),n("extendpiecolors")}});var Lw=fe((V2r,qCe)=>{"use strict";var wIt=aa(),Cw=ni(),TIt={};function AIt(e,t){var r=[],n=e._fullLayout,a=n.hiddenlabels||[],i=t.labels,o=t.marker.colors||[],s=t.values,l=t._length,u=t._hasValues&&l,c,f;if(t.dlabel)for(i=new Array(l),c=0;c=0});var S=t.type==="funnelarea"?x:t.sort;return S&&r.sort(function(L,w){return w.v-L.v}),r[0]&&(r[0].vTotal=p),r}function ICe(e){return function(r,n){if(!r||!Cw.isValid(r))return!1;let a=Cw.rgbaString(r);return e[n]||(e[n]=a),a}}function MIt(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,a=e.calcdata,i=n[r+"colorway"],o=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(i=zCe(i,TIt));for(var s=0,l=0;l{"use strict";var SIt=Sd().appendArrayMultiPointValues;BCe.exports=function(t,r){var n={curveNumber:r.index,pointNumbers:t.pts,data:r._input,fullData:r,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return t.pts.length===1&&(n.pointNumber=n.i=t.pts[0]),SIt(n,r,t.pts),r.type==="funnelarea"&&(delete n.v,delete n.i),n}});var R9=fe((H2r,o7e)=>{"use strict";var u0=xi(),EIt=Hs(),P9=kl(),jCe=ni(),_g=ea(),Qf=Xt(),kIt=Qf.strScale,NCe=Qf.strTranslate,vW=as(),WCe=kh(),CIt=WCe.recordMinTextSize,LIt=WCe.clearMinTextSize,YCe=Im().TEXTPAD,Aa=Sm(),F9=OCe(),UCe=Xt().isValidTextValue;function PIt(e,t){var r=e._context.staticPlot,n=e._fullLayout,a=n._size;LIt("pie",n),$Ce(t,e),n7e(t,a);var i=Qf.makeTraceGroups(n._pielayer,t,"trace").each(function(o){var s=u0.select(this),l=o[0],u=l.trace;NIt(o),s.attr("stroke-linejoin","round"),s.each(function(){var c=u0.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var f=[[[],[]],[[],[]]],v=!1;c.each(function(S,L){if(S.hidden){u0.select(this).selectAll("path,g").remove();return}S.pointNumber=S.i,S.curveNumber=u.index,f[S.pxmid[1]<0?0:1][S.pxmid[0]<0?0:1].push(S);var w=l.cx,A=l.cy,T=u0.select(this),m=T.selectAll("path.surface").data([S]);if(m.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),T.call(XCe,e,o),u.pull){var F=+Aa.castOption(u.pull,S.pts)||0;F>0&&(w+=F*S.pxmid[0],A+=F*S.pxmid[1])}S.cxFinal=w,S.cyFinal=A;function E(q,U,J,ee){var ce=ee*(U[0]-q[0]),ye=ee*(U[1]-q[1]);return"a"+ee*l.r+","+ee*l.r+" 0 "+S.largeArc+(J?" 1 ":" 0 ")+ce+","+ye}var I=u.hole;if(S.v===l.vTotal){var R="M"+(w+S.px0[0])+","+(A+S.px0[1])+E(S.px0,S.pxmid,!0,1)+E(S.pxmid,S.px0,!0,1)+"Z";I?m.attr("d","M"+(w+I*S.px0[0])+","+(A+I*S.px0[1])+E(S.px0,S.pxmid,!1,I)+E(S.pxmid,S.px0,!1,I)+"Z"+R):m.attr("d",R)}else{var B=E(S.px0,S.px1,!0,1);if(I){var O=1-I;m.attr("d","M"+(w+I*S.px1[0])+","+(A+I*S.px1[1])+E(S.px1,S.px0,!1,I)+"l"+O*S.px0[0]+","+O*S.px0[1]+B+"Z")}else m.attr("d","M"+w+","+A+"l"+S.px0[0]+","+S.px0[1]+B+"Z")}i7e(e,S,l);var V=Aa.castOption(u.textposition,S.pts),j=T.selectAll("g.slicetext").data(S.text&&V!=="none"?[0]:[]);j.enter().append("g").classed("slicetext",!0),j.exit().remove(),j.each(function(){var q=Qf.ensureSingle(u0.select(this),"text","",function(K){K.attr("data-notex",1)}),U=Qf.ensureUniformFontSize(e,V==="outside"?DIt(u,S,n.font):ZCe(u,S,n.font));q.text(S.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(_g.font,U).call(vW.convertToTspans,e);var J=_g.bBox(q.node()),ee;if(V==="outside")ee=HCe(J,S);else if(ee=KCe(J,S,l),V==="auto"&&ee.scale<1){var ce=Qf.ensureUniformFontSize(e,u.outsidetextfont);q.call(_g.font,ce),J=_g.bBox(q.node()),ee=HCe(J,S)}var ye=ee.textPosAngle,xe=ye===void 0?S.pxmid:D9(l.r,ye);if(ee.targetX=w+xe[0]*ee.rCenter+(ee.x||0),ee.targetY=A+xe[1]*ee.rCenter+(ee.y||0),a7e(ee,J),ee.outside){var ue=ee.targetY;S.yLabelMin=ue-J.height/2,S.yLabelMid=ue,S.yLabelMax=ue+J.height/2,S.labelExtraX=0,S.labelExtraY=0,v=!0}ee.fontSize=U.size,CIt(u.type,ee,n),o[L].transform=ee,Qf.setTransormAndDisplay(q,ee)})});var g=u0.select(this).selectAll("g.titletext").data(u.title.text?[0]:[]);if(g.enter().append("g").classed("titletext",!0),g.exit().remove(),g.each(function(){var S=Qf.ensureSingle(u0.select(this),"text","",function(A){A.attr("data-notex",1)}),L=u.title.text;u._meta&&(L=Qf.templateString(L,u._meta)),S.text(L).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(_g.font,u.title.font).call(vW.convertToTspans,e);var w;u.title.position==="middle center"?w=zIt(l):w=t7e(l,a),S.attr("transform",NCe(w.x,w.y)+kIt(Math.min(1,w.scale))+NCe(w.tx,w.ty))}),v&&BIt(f,u),FIt(c,u),v&&u.automargin){var p=_g.bBox(s.node()),x=u.domain,_=a.w*(x.x[1]-x.x[0]),y=a.h*(x.y[1]-x.y[0]),C=(.5*_-l.r)/a.w,k=(.5*y-l.r)/a.h;EIt.autoMargin(e,"pie."+u.uid+".automargin",{xl:x.x[0]-C,xr:x.x[1]+C,yb:x.y[0]-k,yt:x.y[1]+k,l:Math.max(l.cx-l.r-p.left,0),r:Math.max(p.right-(l.cx+l.r),0),b:Math.max(p.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-p.top,0),pad:5})}})});setTimeout(function(){i.selectAll("tspan").each(function(){var o=u0.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function FIt(e,t){e.each(function(r){var n=u0.select(this);if(!r.labelExtraX&&!r.labelExtraY){n.select("path.textline").remove();return}var a=n.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,Qf.setTransormAndDisplay(a,r.transform);var i=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s="M"+i+","+o,l=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var u=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(u)>Math.abs(c)?s+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(i+r.labelExtraX+l):s+="l"+r.labelExtraX+","+u+"v"+(c-u)+"h"+l}else s+="V"+(r.yLabelMid+r.labelExtraY)+"h"+l;Qf.ensureSingle(n,"path","textline").call(jCe.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function XCe(e,t,r){var n=r[0],a=n.cx,i=n.cy,o=n.trace,s=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),e.on("mouseover",function(l){var u=t._fullLayout,c=t._fullData[o.index];if(!(t._dragging||u.hovermode===!1)){var f=c.hoverinfo;if(Array.isArray(f)&&(f=P9.castHoverinfo({hoverinfo:[Aa.castOption(f,l.pts)],_module:o._module},u,0)),f==="all"&&(f="label+text+value+percent+name"),c.hovertemplate||f!=="none"&&f!=="skip"&&f){var v=l.rInscribed||0,g=a+l.pxmid[0]*(1-v),p=i+l.pxmid[1]*(1-v),x=u.separators,_=[];if(f&&f.indexOf("label")!==-1&&_.push(l.label),l.text=Aa.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf("text")!==-1){var y=l.text;Qf.isValidTextValue(y)&&_.push(y)}l.value=l.v,l.valueLabel=Aa.formatPieValue(l.v,x),f&&f.indexOf("value")!==-1&&_.push(l.valueLabel),l.percent=l.v/n.vTotal,l.percentLabel=Aa.formatPiePercent(l.percent,x),f&&f.indexOf("percent")!==-1&&_.push(l.percentLabel);var C=c.hoverlabel,k=C.font,S=[];P9.loneHover({trace:o,x0:g-v*n.r,x1:g+v*n.r,y:p,_x0:s?a+l.TL[0]:g-v*n.r,_x1:s?a+l.TR[0]:g+v*n.r,_y0:s?i+l.TL[1]:p-v*n.r,_y1:s?i+l.BL[1]:p+v*n.r,text:_.join("
"),name:c.hovertemplate||f.indexOf("name")!==-1?c.name:void 0,idealAlign:l.pxmid[0]<0?"left":"right",color:Aa.castOption(C.bgcolor,l.pts)||l.color,borderColor:Aa.castOption(C.bordercolor,l.pts),fontFamily:Aa.castOption(k.family,l.pts),fontSize:Aa.castOption(k.size,l.pts),fontColor:Aa.castOption(k.color,l.pts),nameLength:Aa.castOption(C.namelength,l.pts),textAlign:Aa.castOption(C.align,l.pts),hovertemplate:Aa.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[F9(l,c)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:t,inOut_bbox:S}),l.bbox=S[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[F9(l,c)],event:u0.event})}}),e.on("mouseout",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=u0.select(this).datum();o._hasHoverEvent&&(l.originalEvent=u0.event,t.emit("plotly_unhover",{points:[F9(f,c)],event:u0.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(P9.loneUnhover(u._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on("click",function(l){var u=t._fullLayout,c=t._fullData[o.index];t._dragging||u.hovermode===!1||(t._hoverdata=[F9(l,c)],P9.click(t,u0.event))})}function DIt(e,t,r){var n=Aa.castOption(e.outsidetextfont.color,t.pts)||Aa.castOption(e.textfont.color,t.pts)||r.color,a=Aa.castOption(e.outsidetextfont.family,t.pts)||Aa.castOption(e.textfont.family,t.pts)||r.family,i=Aa.castOption(e.outsidetextfont.size,t.pts)||Aa.castOption(e.textfont.size,t.pts)||r.size,o=Aa.castOption(e.outsidetextfont.weight,t.pts)||Aa.castOption(e.textfont.weight,t.pts)||r.weight,s=Aa.castOption(e.outsidetextfont.style,t.pts)||Aa.castOption(e.textfont.style,t.pts)||r.style,l=Aa.castOption(e.outsidetextfont.variant,t.pts)||Aa.castOption(e.textfont.variant,t.pts)||r.variant,u=Aa.castOption(e.outsidetextfont.textcase,t.pts)||Aa.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Aa.castOption(e.outsidetextfont.lineposition,t.pts)||Aa.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Aa.castOption(e.outsidetextfont.shadow,t.pts)||Aa.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n,family:a,size:i,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function ZCe(e,t,r){var n=Aa.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=Aa.castOption(e._input.textfont.color,t.pts));var a=Aa.castOption(e.insidetextfont.family,t.pts)||Aa.castOption(e.textfont.family,t.pts)||r.family,i=Aa.castOption(e.insidetextfont.size,t.pts)||Aa.castOption(e.textfont.size,t.pts)||r.size,o=Aa.castOption(e.insidetextfont.weight,t.pts)||Aa.castOption(e.textfont.weight,t.pts)||r.weight,s=Aa.castOption(e.insidetextfont.style,t.pts)||Aa.castOption(e.textfont.style,t.pts)||r.style,l=Aa.castOption(e.insidetextfont.variant,t.pts)||Aa.castOption(e.textfont.variant,t.pts)||r.variant,u=Aa.castOption(e.insidetextfont.textcase,t.pts)||Aa.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Aa.castOption(e.insidetextfont.lineposition,t.pts)||Aa.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Aa.castOption(e.insidetextfont.shadow,t.pts)||Aa.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||jCe.contrast(t.color),family:a,size:i,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function $Ce(e,t){for(var r,n,a=0;a=-4;C-=2)y(Math.PI*C,"tan");for(C=4;C>=-4;C-=2)y(Math.PI*(C+1),"tan")}if(f||g){for(C=4;C>=-4;C-=2)y(Math.PI*(C+1.5),"rad");for(C=4;C>=-4;C-=2)y(Math.PI*(C+.5),"rad")}}if(s||p||f){var k=Math.sqrt(e.width*e.width+e.height*e.height);if(_={scale:a*n*2/k,rCenter:1-a,rotate:0},_.textPosAngle=(t.startangle+t.stopangle)/2,_.scale>=1)return _;x.push(_)}(p||g)&&(_=VCe(e,n,o,l,u),_.textPosAngle=(t.startangle+t.stopangle)/2,x.push(_)),(p||v)&&(_=GCe(e,n,o,l,u),_.textPosAngle=(t.startangle+t.stopangle)/2,x.push(_));for(var S=0,L=0,w=0;w=1)break}return x[S]}function RIt(e,t){var r=e.startangle,n=e.stopangle;return r>t&&t>n||r0?1:-1)/2,y:i/(1+r*r/(n*n)),outside:!0}}function zIt(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function t7e(e,t){var r=1,n=1,a,i=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=i.title.font.size,a=r7e(i),i.title.position.indexOf("top")!==-1?(o.y-=(1+a)*e.r,s.ty-=e.titleBox.height):i.title.position.indexOf("bottom")!==-1&&(o.y+=(1+a)*e.r);var l=qIt(e.r,e.trace.aspectratio),u=t.w*(i.domain.x[1]-i.domain.x[0])/2;return i.title.position.indexOf("left")!==-1?(u=u+l,o.x-=(1+a)*l,s.tx+=e.titleBox.width/2):i.title.position.indexOf("center")!==-1?u*=2:i.title.position.indexOf("right")!==-1&&(u=u+l,o.x+=(1+a)*l,s.tx-=e.titleBox.width/2),r=u/e.titleBox.width,n=pW(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function qIt(e,t){return e/(t===void 0?1:t)}function pW(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function r7e(e){var t=e.pull;if(!t)return 0;var r;if(Qf.isArrayOrTypedArray(t))for(t=0,r=0;rt&&(t=e.pull[r]);return t}function BIt(e,t){var r,n,a,i,o,s,l,u,c,f,v,g,p;function x(k,S){return k.pxmid[1]-S.pxmid[1]}function _(k,S){return S.pxmid[1]-k.pxmid[1]}function y(k,S){S||(S={});var L=S.labelExtraY+(n?S.yLabelMax:S.yLabelMin),w=n?k.yLabelMin:k.yLabelMax,A=n?k.yLabelMax:k.yLabelMin,T=k.cyFinal+o(k.px0[1],k.px1[1]),m=L-w,F,E,I,R,B,O;if(m*l>0&&(k.labelExtraY=m),!!Qf.isArrayOrTypedArray(t.pull))for(E=0;E=(Aa.castOption(t.pull,I.pts)||0))&&((k.pxmid[1]-I.pxmid[1])*l>0?(R=I.cyFinal+o(I.px0[1],I.px1[1]),m=R-w-k.labelExtraY,m*l>0&&(k.labelExtraY+=m)):(A+k.labelExtraY-T)*l>0&&(F=3*s*Math.abs(E-f.indexOf(k)),B=I.cxFinal+i(I.px0[0],I.px1[0]),O=B+F-(k.cxFinal+k.pxmid[0])-k.labelExtraX,O*s>0&&(k.labelExtraX+=O)))}for(n=0;n<2;n++)for(a=n?x:_,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(i=r?Math.max:Math.min,s=r?1:-1,u=e[n][r],u.sort(a),c=e[1-n][r],f=c.concat(u),g=[],v=0;v1?(u=r.r,c=u/a.aspectratio):(c=r.r,u=c*a.aspectratio),u*=(1+a.baseratio)/2,l=u*c}o=Math.min(o,l/r.vTotal)}for(n=0;nt.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/t.vTotal,.5),u.ring=1-n.hole,u.rInscribed=IIt(u,t))}function D9(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function i7e(e,t,r){var n=e._fullLayout,a=r.trace,i=a.texttemplate,o=a.textinfo;if(!i&&o&&o!=="none"){var s=o.split("+"),l=function(S){return s.indexOf(S)!==-1},u=l("label"),c=l("text"),f=l("value"),v=l("percent"),g=n.separators,p;if(p=u?[t.label]:[],c){var x=Aa.getFirstFilled(a.text,t.pts);UCe(x)&&p.push(x)}f&&p.push(Aa.formatPieValue(t.v,g)),v&&p.push(Aa.formatPiePercent(t.v/r.vTotal,g)),t.text=p.join("
")}function _(S){return{label:S.label,value:S.v,valueLabel:Aa.formatPieValue(S.v,n.separators),percent:S.v/r.vTotal,percentLabel:Aa.formatPiePercent(S.v/r.vTotal,n.separators),color:S.color,text:S.text,customdata:Qf.castOption(a,S.i,"customdata")}}if(i){var y=Qf.castOption(a,t.i,"texttemplate");if(!y)t.text="";else{var C=_(t),k=Aa.getFirstFilled(a.text,t.pts);(UCe(k)||k==="")&&(C.text=k),t.text=Qf.texttemplateString({data:[C,a._meta],fallback:a.texttemplatefallback,labels:C,locale:e._fullLayout._d3locale,template:y})}}}function a7e(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),a=Math.sin(r),i=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=i*n-o*a,e.textY=i*a+o*n,e.noCenter=!0}o7e.exports={plot:PIt,formatSliceLabel:i7e,transformInsideText:KCe,determineInsideTextFont:ZCe,positionTitleOutside:t7e,prerenderTitles:$Ce,layoutAreas:n7e,attachFxHandlers:XCe,computeTransform:a7e}});var u7e=fe((j2r,l7e)=>{"use strict";var s7e=xi(),UIt=Jb(),VIt=kh().resizeText;l7e.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");VIt(t,r,"pie"),r.each(function(n){var a=n[0],i=a.trace,o=s7e.select(this);o.style({opacity:i.opacity}),o.selectAll("path.surface").each(function(s){s7e.select(this).call(UIt,s,i,t)})})}});var f7e=fe(Pw=>{"use strict";var c7e=Hs();Pw.name="pie";Pw.plot=function(e,t,r,n){c7e.plotBasePlot(Pw.name,e,t,r,n)};Pw.clean=function(e,t,r,n){c7e.cleanBasePlot(Pw.name,e,t,r,n)}});var d7e=fe((Y2r,h7e)=>{"use strict";h7e.exports={attributes:U2(),supplyDefaults:V2().supplyDefaults,supplyLayoutDefaults:RCe(),layoutAttributes:L9(),calc:Lw().calc,crossTraceCalc:Lw().crossTraceCalc,plot:R9().plot,style:u7e(),styleOne:Jb(),moduleType:"trace",name:"pie",basePlotModule:f7e(),categories:["pie-like","pie","showLegend"],meta:{}}});var p7e=fe((X2r,v7e)=>{"use strict";v7e.exports=d7e()});var m7e=fe(Fw=>{"use strict";var g7e=Hs();Fw.name="sunburst";Fw.plot=function(e,t,r,n){g7e.plotBasePlot(Fw.name,e,t,r,n)};Fw.clean=function(e,t,r,n){g7e.cleanBasePlot(Fw.name,e,t,r,n)}});var gW=fe(($2r,y7e)=>{"use strict";y7e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var B6=fe((K2r,b7e)=>{"use strict";var GIt=Ho(),{hovertemplateAttrs:HIt,texttemplateAttrs:jIt,templatefallbackAttrs:x7e}=Oo(),WIt=_s(),YIt=nl().attributes,bg=U2(),_7e=gW(),q6=ta().extendFlat,XIt=Uc().pattern;b7e.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:q6({colors:{valType:"data_array",editType:"calc"},line:{color:q6({},bg.marker.line.color,{dflt:null}),width:q6({},bg.marker.line.width,{dflt:1}),editType:"calc"},pattern:XIt,editType:"calc"},WIt("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:bg.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:jIt({editType:"plot"},{keys:_7e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:x7e({editType:"plot"}),hovertext:bg.hovertext,hoverinfo:q6({},GIt.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:HIt({},{keys:_7e.eventDataKeys}),hovertemplatefallback:x7e(),textfont:bg.textfont,insidetextorientation:bg.insidetextorientation,insidetextfont:bg.insidetextfont,outsidetextfont:q6({},bg.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:bg.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:YIt({name:"sunburst",trace:!0,editType:"calc"})}});var mW=fe((J2r,w7e)=>{"use strict";w7e.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var S7e=fe((Q2r,M7e)=>{"use strict";var T7e=Xt(),ZIt=B6(),$It=nl().defaults,KIt=z0().handleText,JIt=V2().handleMarkerDefaults,A7e=js(),QIt=A7e.hasColorscale,ezt=A7e.handleDefaults;M7e.exports=function(t,r,n,a){function i(v,g){return T7e.coerce(t,r,ZIt,v,g)}var o=i("labels"),s=i("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=i("values");l&&l.length?i("branchvalues"):i("count"),i("level"),i("maxdepth"),JIt(t,r,a,i);var u=r._hasColorscale=QIt(t,"marker","colors")||(t.marker||{}).coloraxis;u&&ezt(t,r,a,i,{prefix:"marker.",cLetter:"c"}),i("leaf.opacity",u?1:.7);var c=i("text");i("texttemplate"),i("texttemplatefallback"),r.texttemplate||i("textinfo",T7e.isArrayOrTypedArray(c)?"text+label":"label"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var f="auto";KIt(t,r,a,i,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("insidetextorientation"),i("sort"),i("rotation"),i("root.color"),$It(r,a,i),r._length=null}});var k7e=fe((e_r,E7e)=>{"use strict";var tzt=Xt(),rzt=mW();E7e.exports=function(t,r){function n(a,i){return tzt.coerce(t,r,rzt,a,i)}n("sunburstcolorway",r.colorway),n("extendsunburstcolors")}});var O6=fe((I9,C7e)=>{(function(e,t){typeof I9=="object"&&typeof C7e!="undefined"?t(I9):(e=e||self,t(e.d3=e.d3||{}))})(I9,function(e){"use strict";function t(wt,Tt){return wt.parent===Tt.parent?1:2}function r(wt){return wt.reduce(n,0)/wt.length}function n(wt,Tt){return wt+Tt.x}function a(wt){return 1+wt.reduce(i,0)}function i(wt,Tt){return Math.max(wt,Tt.y)}function o(wt){for(var Tt;Tt=wt.children;)wt=Tt[0];return wt}function s(wt){for(var Tt;Tt=wt.children;)wt=Tt[Tt.length-1];return wt}function l(){var wt=t,Tt=1,Mt=1,Lt=!1;function ft(kt){var rr,pr=0;kt.eachAfter(function(Fr){var Zr=Fr.children;Zr?(Fr.x=r(Zr),Fr.y=a(Zr)):(Fr.x=rr?pr+=wt(Fr,rr):0,Fr.y=0,rr=Fr)});var Kr=o(kt),Nr=s(kt),dn=Kr.x-wt(Kr,Nr)/2,xr=Nr.x+wt(Nr,Kr)/2;return kt.eachAfter(Lt?function(Fr){Fr.x=(Fr.x-kt.x)*Tt,Fr.y=(kt.y-Fr.y)*Mt}:function(Fr){Fr.x=(Fr.x-dn)/(xr-dn)*Tt,Fr.y=(1-(kt.y?Fr.y/kt.y:1))*Mt})}return ft.separation=function(kt){return arguments.length?(wt=kt,ft):wt},ft.size=function(kt){return arguments.length?(Lt=!1,Tt=+kt[0],Mt=+kt[1],ft):Lt?null:[Tt,Mt]},ft.nodeSize=function(kt){return arguments.length?(Lt=!0,Tt=+kt[0],Mt=+kt[1],ft):Lt?[Tt,Mt]:null},ft}function u(wt){var Tt=0,Mt=wt.children,Lt=Mt&&Mt.length;if(!Lt)Tt=1;else for(;--Lt>=0;)Tt+=Mt[Lt].value;wt.value=Tt}function c(){return this.eachAfter(u)}function f(wt){var Tt=this,Mt,Lt=[Tt],ft,kt,rr;do for(Mt=Lt.reverse(),Lt=[];Tt=Mt.pop();)if(wt(Tt),ft=Tt.children,ft)for(kt=0,rr=ft.length;kt=0;--ft)Mt.push(Lt[ft]);return this}function g(wt){for(var Tt=this,Mt=[Tt],Lt=[],ft,kt,rr;Tt=Mt.pop();)if(Lt.push(Tt),ft=Tt.children,ft)for(kt=0,rr=ft.length;kt=0;)Mt+=Lt[ft].value;Tt.value=Mt})}function x(wt){return this.eachBefore(function(Tt){Tt.children&&Tt.children.sort(wt)})}function _(wt){for(var Tt=this,Mt=y(Tt,wt),Lt=[Tt];Tt!==Mt;)Tt=Tt.parent,Lt.push(Tt);for(var ft=Lt.length;wt!==Mt;)Lt.splice(ft,0,wt),wt=wt.parent;return Lt}function y(wt,Tt){if(wt===Tt)return wt;var Mt=wt.ancestors(),Lt=Tt.ancestors(),ft=null;for(wt=Mt.pop(),Tt=Lt.pop();wt===Tt;)ft=wt,wt=Mt.pop(),Tt=Lt.pop();return ft}function C(){for(var wt=this,Tt=[wt];wt=wt.parent;)Tt.push(wt);return Tt}function k(){var wt=[];return this.each(function(Tt){wt.push(Tt)}),wt}function S(){var wt=[];return this.eachBefore(function(Tt){Tt.children||wt.push(Tt)}),wt}function L(){var wt=this,Tt=[];return wt.each(function(Mt){Mt!==wt&&Tt.push({source:Mt.parent,target:Mt})}),Tt}function w(wt,Tt){var Mt=new E(wt),Lt=+wt.value&&(Mt.value=wt.value),ft,kt=[Mt],rr,pr,Kr,Nr;for(Tt==null&&(Tt=T);ft=kt.pop();)if(Lt&&(ft.value=+ft.data.value),(pr=Tt(ft.data))&&(Nr=pr.length))for(ft.children=new Array(Nr),Kr=Nr-1;Kr>=0;--Kr)kt.push(rr=ft.children[Kr]=new E(pr[Kr])),rr.parent=ft,rr.depth=ft.depth+1;return Mt.eachBefore(F)}function A(){return w(this).eachBefore(m)}function T(wt){return wt.children}function m(wt){wt.data=wt.data.data}function F(wt){var Tt=0;do wt.height=Tt;while((wt=wt.parent)&&wt.height<++Tt)}function E(wt){this.data=wt,this.depth=this.height=0,this.parent=null}E.prototype=w.prototype={constructor:E,count:c,each:f,eachAfter:g,eachBefore:v,sum:p,sort:x,path:_,ancestors:C,descendants:k,leaves:S,links:L,copy:A};var I=Array.prototype.slice;function R(wt){for(var Tt=wt.length,Mt,Lt;Tt;)Lt=Math.random()*Tt--|0,Mt=wt[Tt],wt[Tt]=wt[Lt],wt[Lt]=Mt;return wt}function B(wt){for(var Tt=0,Mt=(wt=R(I.call(wt))).length,Lt=[],ft,kt;Tt0&&Mt*Mt>Lt*Lt+ft*ft}function q(wt,Tt){for(var Mt=0;MtKr?(ft=(Nr+Kr-kt)/(2*Nr),pr=Math.sqrt(Math.max(0,Kr/Nr-ft*ft)),Mt.x=wt.x-ft*Lt-pr*rr,Mt.y=wt.y-ft*rr+pr*Lt):(ft=(Nr+kt-Kr)/(2*Nr),pr=Math.sqrt(Math.max(0,kt/Nr-ft*ft)),Mt.x=Tt.x+ft*Lt-pr*rr,Mt.y=Tt.y+ft*rr+pr*Lt)):(Mt.x=Tt.x+Mt.r,Mt.y=Tt.y)}function xe(wt,Tt){var Mt=wt.r+Tt.r-1e-6,Lt=Tt.x-wt.x,ft=Tt.y-wt.y;return Mt>0&&Mt*Mt>Lt*Lt+ft*ft}function ue(wt){var Tt=wt._,Mt=wt.next._,Lt=Tt.r+Mt.r,ft=(Tt.x*Mt.r+Mt.x*Tt.r)/Lt,kt=(Tt.y*Mt.r+Mt.y*Tt.r)/Lt;return ft*ft+kt*kt}function K(wt){this._=wt,this.next=null,this.previous=null}function _e(wt){if(!(ft=wt.length))return 0;var Tt,Mt,Lt,ft,kt,rr,pr,Kr,Nr,dn,xr;if(Tt=wt[0],Tt.x=0,Tt.y=0,!(ft>1))return Tt.r;if(Mt=wt[1],Tt.x=-Mt.r,Mt.x=Tt.r,Mt.y=0,!(ft>2))return Tt.r+Mt.r;ye(Mt,Tt,Lt=wt[2]),Tt=new K(Tt),Mt=new K(Mt),Lt=new K(Lt),Tt.next=Lt.previous=Mt,Mt.next=Tt.previous=Lt,Lt.next=Mt.previous=Tt;e:for(pr=3;pr0)throw new Error("cycle");return pr}return Mt.id=function(Lt){return arguments.length?(wt=pe(Lt),Mt):wt},Mt.parentId=function(Lt){return arguments.length?(Tt=pe(Lt),Mt):Tt},Mt}function Te(wt,Tt){return wt.parent===Tt.parent?1:2}function Ve(wt){var Tt=wt.children;return Tt?Tt[0]:wt.t}function $e(wt){var Tt=wt.children;return Tt?Tt[Tt.length-1]:wt.t}function ot(wt,Tt,Mt){var Lt=Mt/(Tt.i-wt.i);Tt.c-=Lt,Tt.s+=Mt,wt.c+=Lt,Tt.z+=Mt,Tt.m+=Mt}function tt(wt){for(var Tt=0,Mt=0,Lt=wt.children,ft=Lt.length,kt;--ft>=0;)kt=Lt[ft],kt.z+=Tt,kt.m+=Tt,Tt+=kt.s+(Mt+=kt.c)}function nt(wt,Tt,Mt){return wt.a.parent===Tt.parent?wt.a:Mt}function We(wt,Tt){this._=wt,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=Tt}We.prototype=Object.create(E.prototype);function mt(wt){for(var Tt=new We(wt,0),Mt,Lt=[Tt],ft,kt,rr,pr;Mt=Lt.pop();)if(kt=Mt._.children)for(Mt.children=new Array(pr=kt.length),rr=pr-1;rr>=0;--rr)Lt.push(ft=Mt.children[rr]=new We(kt[rr],rr)),ft.parent=Mt;return(Tt.parent=new We(null,0)).children=[Tt],Tt}function bt(){var wt=Te,Tt=1,Mt=1,Lt=null;function ft(Nr){var dn=mt(Nr);if(dn.eachAfter(kt),dn.parent.m=-dn.z,dn.eachBefore(rr),Lt)Nr.eachBefore(Kr);else{var xr=Nr,Fr=Nr,Zr=Nr;Nr.eachBefore(function(Qt){Qt.xFr.x&&(Fr=Qt),Qt.depth>Zr.depth&&(Zr=Qt)});var Cn=xr===Fr?1:wt(xr,Fr)/2,Dt=Cn-xr.x,At=Tt/(Fr.x+Cn+Dt),Vt=Mt/(Zr.depth||1);Nr.eachBefore(function(Qt){Qt.x=(Qt.x+Dt)*At,Qt.y=Qt.depth*Vt})}return Nr}function kt(Nr){var dn=Nr.children,xr=Nr.parent.children,Fr=Nr.i?xr[Nr.i-1]:null;if(dn){tt(Nr);var Zr=(dn[0].z+dn[dn.length-1].z)/2;Fr?(Nr.z=Fr.z+wt(Nr._,Fr._),Nr.m=Nr.z-Zr):Nr.z=Zr}else Fr&&(Nr.z=Fr.z+wt(Nr._,Fr._));Nr.parent.A=pr(Nr,Fr,Nr.parent.A||xr[0])}function rr(Nr){Nr._.x=Nr.z+Nr.parent.m,Nr.m+=Nr.parent.m}function pr(Nr,dn,xr){if(dn){for(var Fr=Nr,Zr=Nr,Cn=dn,Dt=Fr.parent.children[0],At=Fr.m,Vt=Zr.m,Qt=Cn.m,Ut=Dt.m,_r;Cn=$e(Cn),Fr=Ve(Fr),Cn&&Fr;)Dt=Ve(Dt),Zr=$e(Zr),Zr.a=Nr,_r=Cn.z+Qt-Fr.z-At+wt(Cn._,Fr._),_r>0&&(ot(nt(Cn,Nr,xr),Nr,_r),At+=_r,Vt+=_r),Qt+=Cn.m,At+=Fr.m,Ut+=Dt.m,Vt+=Zr.m;Cn&&!$e(Zr)&&(Zr.t=Cn,Zr.m+=Qt-Vt),Fr&&!Ve(Dt)&&(Dt.t=Fr,Dt.m+=At-Ut,xr=Nr)}return xr}function Kr(Nr){Nr.x*=Tt,Nr.y=Nr.depth*Mt}return ft.separation=function(Nr){return arguments.length?(wt=Nr,ft):wt},ft.size=function(Nr){return arguments.length?(Lt=!1,Tt=+Nr[0],Mt=+Nr[1],ft):Lt?null:[Tt,Mt]},ft.nodeSize=function(Nr){return arguments.length?(Lt=!0,Tt=+Nr[0],Mt=+Nr[1],ft):Lt?[Tt,Mt]:null},ft}function Yt(wt,Tt,Mt,Lt,ft){for(var kt=wt.children,rr,pr=-1,Kr=kt.length,Nr=wt.value&&(ft-Mt)/wt.value;++prQt&&(Qt=Nr),Jr=At*At*rn,Ut=Math.max(Qt/Jr,Jr/Vt),Ut>_r){At-=Nr;break}_r=Ut}rr.push(Kr={value:At,dice:Zr1?Lt:1)},Mt})(jt);function fr(){var wt=or,Tt=!1,Mt=1,Lt=1,ft=[0],kt=ie,rr=ie,pr=ie,Kr=ie,Nr=ie;function dn(Fr){return Fr.x0=Fr.y0=0,Fr.x1=Mt,Fr.y1=Lt,Fr.eachBefore(xr),ft=[0],Tt&&Fr.eachBefore(it),Fr}function xr(Fr){var Zr=ft[Fr.depth],Cn=Fr.x0+Zr,Dt=Fr.y0+Zr,At=Fr.x1-Zr,Vt=Fr.y1-Zr;At=Fr-1){var Qt=kt[xr];Qt.x0=Cn,Qt.y0=Dt,Qt.x1=At,Qt.y1=Vt;return}for(var Ut=Nr[xr],_r=Zr/2+Ut,rn=xr+1,Jr=Fr-1;rn>>1;Nr[qn]<_r?rn=qn+1:Jr=qn}_r-Nr[rn-1]Vt-Dt){var Ii=(Cn*Jn+At*ri)/Zr;dn(xr,rn,ri,Cn,Dt,Ii,Vt),dn(rn,Fr,Jn,Ii,Dt,At,Vt)}else{var Vi=(Dt*Jn+Vt*ri)/Zr;dn(xr,rn,ri,Cn,Dt,At,Vi),dn(rn,Fr,Jn,Cn,Vi,At,Vt)}}}function cr(wt,Tt,Mt,Lt,ft){(wt.depth&1?Yt:Oe)(wt,Tt,Mt,Lt,ft)}var Ct=(function wt(Tt){function Mt(Lt,ft,kt,rr,pr){if((Kr=Lt._squarify)&&Kr.ratio===Tt)for(var Kr,Nr,dn,xr,Fr=-1,Zr,Cn=Kr.length,Dt=Lt.value;++Fr1?Lt:1)},Mt})(jt);e.cluster=l,e.hierarchy=w,e.pack=be,e.packEnclose=B,e.packSiblings=ne,e.partition=ze,e.stratify=Ke,e.tree=bt,e.treemap=fr,e.treemapBinary=Ot,e.treemapDice=Oe,e.treemapResquarify=Ct,e.treemapSlice=Yt,e.treemapSliceDice=cr,e.treemapSquarify=or,Object.defineProperty(e,"__esModule",{value:!0})})});var U6=fe(N6=>{"use strict";var L7e=O6(),nzt=aa(),Dw=Xt(),izt=js().makeColorScaleFuncFromTrace,azt=Lw().makePullColorFn,ozt=Lw().generateExtendedColors,szt=js().calc,lzt=Wa().ALMOST_EQUAL,uzt={},czt={},fzt={};N6.calc=function(e,t){var r=e._fullLayout,n=t.ids,a=Dw.isArrayOrTypedArray(n),i=t.labels,o=t.parents,s=t.values,l=Dw.isArrayOrTypedArray(s),u=[],c={},f={},v=function(j,q){c[j]?c[j].push(q):c[j]=[q],f[q]=1},g=function(j){return j||typeof j=="number"},p=function(j){return!l||nzt(s[j])&&s[j]>=0},x,_,y;a?(x=Math.min(n.length,o.length),_=function(j){return g(n[j])&&p(j)},y=function(j){return String(n[j])}):(x=Math.min(i.length,o.length),_=function(j){return g(i[j])&&p(j)},y=function(j){return String(i[j])}),l&&(x=Math.min(x,s.length));for(var C=0;C1){for(var T=Dw.randstr(),m=0;m{});function b1(){}function D7e(){return this.rgb().formatHex()}function xzt(){return this.rgb().formatHex8()}function _zt(){return N7e(this).formatHsl()}function R7e(){return this.rgb().formatRgb()}function cy(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=hzt.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?I7e(t):r===3?new Xc(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?q9(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?q9(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=dzt.exec(e))?new Xc(t[1],t[2],t[3],1):(t=vzt.exec(e))?new Xc(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=pzt.exec(e))?q9(t[1],t[2],t[3],t[4]):(t=gzt.exec(e))?q9(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=mzt.exec(e))?B7e(t[1],t[2]/100,t[3]/100,1):(t=yzt.exec(e))?B7e(t[1],t[2]/100,t[3]/100,t[4]):F7e.hasOwnProperty(e)?I7e(F7e[e]):e==="transparent"?new Xc(NaN,NaN,NaN,0):null}function I7e(e){return new Xc(e>>16&255,e>>8&255,e&255,1)}function q9(e,t,r,n){return n<=0&&(e=t=r=NaN),new Xc(e,t,r,n)}function G6(e){return e instanceof b1||(e=cy(e)),e?(e=e.rgb(),new Xc(e.r,e.g,e.b,e.opacity)):new Xc}function Iw(e,t,r,n){return arguments.length===1?G6(e):new Xc(e,t,r,n==null?1:n)}function Xc(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function z7e(){return`#${G2(this.r)}${G2(this.g)}${G2(this.b)}`}function bzt(){return`#${G2(this.r)}${G2(this.g)}${G2(this.b)}${G2((isNaN(this.opacity)?1:this.opacity)*255)}`}function q7e(){let e=O9(this.opacity);return`${e===1?"rgb(":"rgba("}${H2(this.r)}, ${H2(this.g)}, ${H2(this.b)}${e===1?")":`, ${e})`}`}function O9(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function H2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function G2(e){return e=H2(e),(e<16?"0":"")+e.toString(16)}function B7e(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Mp(e,t,r,n)}function N7e(e){if(e instanceof Mp)return new Mp(e.h,e.s,e.l,e.opacity);if(e instanceof b1||(e=cy(e)),!e)return new Mp;if(e instanceof Mp)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=NaN,s=i-a,l=(i+a)/2;return s?(t===i?o=(r-n)/s+(r0&&l<1?0:o,new Mp(o,s,l,e.opacity)}function H6(e,t,r,n){return arguments.length===1?N7e(e):new Mp(e,t,r,n==null?1:n)}function Mp(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function O7e(e){return e=(e||0)%360,e<0?e+360:e}function B9(e){return Math.max(0,Math.min(1,e||0))}function yW(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var uy,j2,Rw,V6,_1,hzt,dzt,vzt,pzt,gzt,mzt,yzt,F7e,N9=Co(()=>{z9();uy=.7,j2=1/uy,Rw="\\s*([+-]?\\d+)\\s*",V6="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",_1="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hzt=/^#([0-9a-f]{3,8})$/,dzt=new RegExp(`^rgb\\(${Rw},${Rw},${Rw}\\)$`),vzt=new RegExp(`^rgb\\(${_1},${_1},${_1}\\)$`),pzt=new RegExp(`^rgba\\(${Rw},${Rw},${Rw},${V6}\\)$`),gzt=new RegExp(`^rgba\\(${_1},${_1},${_1},${V6}\\)$`),mzt=new RegExp(`^hsl\\(${V6},${_1},${_1}\\)$`),yzt=new RegExp(`^hsla\\(${V6},${_1},${_1},${V6}\\)$`),F7e={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};wg(b1,cy,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:D7e,formatHex:D7e,formatHex8:xzt,formatHsl:_zt,formatRgb:R7e,toString:R7e});wg(Xc,Iw,ly(b1,{brighter(e){return e=e==null?j2:Math.pow(j2,e),new Xc(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?uy:Math.pow(uy,e),new Xc(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xc(H2(this.r),H2(this.g),H2(this.b),O9(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:z7e,formatHex:z7e,formatHex8:bzt,formatRgb:q7e,toString:q7e}));wg(Mp,H6,ly(b1,{brighter(e){return e=e==null?j2:Math.pow(j2,e),new Mp(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?uy:Math.pow(uy,e),new Mp(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new Xc(yW(e>=240?e-240:e+120,a,n),yW(e,a,n),yW(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Mp(O7e(this.h),B9(this.s),B9(this.l),O9(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=O9(this.opacity);return`${e===1?"hsl(":"hsla("}${O7e(this.h)}, ${B9(this.s)*100}%, ${B9(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var U9,V9,xW=Co(()=>{U9=Math.PI/180,V9=180/Math.PI});function W7e(e){if(e instanceof w1)return new w1(e.l,e.a,e.b,e.opacity);if(e instanceof Tg)return Y7e(e);e instanceof Xc||(e=G6(e));var t=TW(e.r),r=TW(e.g),n=TW(e.b),a=_W((.2225045*t+.7168786*r+.0606169*n)/V7e),i,o;return t===r&&r===n?i=o=a:(i=_W((.4360747*t+.3850649*r+.1430804*n)/U7e),o=_W((.0139322*t+.0971045*r+.7141733*n)/G7e)),new w1(116*a-16,500*(i-a),200*(a-o),e.opacity)}function qw(e,t,r,n){return arguments.length===1?W7e(e):new w1(e,t,r,n==null?1:n)}function w1(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function _W(e){return e>wzt?Math.pow(e,1/3):e/j7e+H7e}function bW(e){return e>zw?e*e*e:j7e*(e-H7e)}function wW(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function TW(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Tzt(e){if(e instanceof Tg)return new Tg(e.h,e.c,e.l,e.opacity);if(e instanceof w1||(e=W7e(e)),e.a===0&&e.b===0)return new Tg(NaN,0{z9();N9();xW();G9=18,U7e=.96422,V7e=1,G7e=.82521,H7e=4/29,zw=6/29,j7e=3*zw*zw,wzt=zw*zw*zw;wg(w1,qw,ly(b1,{brighter(e){return new w1(this.l+G9*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new w1(this.l-G9*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=U7e*bW(t),e=V7e*bW(e),r=G7e*bW(r),new Xc(wW(3.1338561*t-1.6168667*e-.4906146*r),wW(-.9787684*t+1.9161415*e+.033454*r),wW(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));wg(Tg,j6,ly(b1,{brighter(e){return new Tg(this.h,this.c,this.l+G9*(e==null?1:e),this.opacity)},darker(e){return new Tg(this.h,this.c,this.l-G9*(e==null?1:e),this.opacity)},rgb(){return Y7e(this).rgb()}}))});function Azt(e){if(e instanceof W2)return new W2(e.h,e.s,e.l,e.opacity);e instanceof Xc||(e=G6(e));var t=e.r/255,r=e.g/255,n=e.b/255,a=(K7e*n+Z7e*t-$7e*r)/(K7e+Z7e-$7e),i=n-a,o=(W6*(r-a)-MW*i)/H9,s=Math.sqrt(o*o+i*i)/(W6*a*(1-a)),l=s?Math.atan2(o,i)*V9-120:NaN;return new W2(l<0?l+360:l,s,a,e.opacity)}function Bw(e,t,r,n){return arguments.length===1?Azt(e):new W2(e,t,r,n==null?1:n)}function W2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var J7e,AW,MW,H9,W6,Z7e,$7e,K7e,Q7e=Co(()=>{z9();N9();xW();J7e=-.14861,AW=1.78277,MW=-.29227,H9=-.90649,W6=1.97294,Z7e=W6*H9,$7e=W6*AW,K7e=AW*MW-H9*J7e;wg(W2,Bw,ly(b1,{brighter(e){return e=e==null?j2:Math.pow(j2,e),new W2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?uy:Math.pow(uy,e),new W2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*U9,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),a=Math.sin(e);return new Xc(255*(t+r*(J7e*n+AW*a)),255*(t+r*(MW*n+H9*a)),255*(t+r*(W6*n)),this.opacity)}}))});var Y2=Co(()=>{N9();X7e();Q7e()});function SW(e,t,r,n,a){var i=e*e,o=i*e;return((1-3*e+3*i-o)*t+(4-6*i+3*o)*r+(1+3*e+3*i-3*o)*n+o*a)/6}function j9(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),a=e[n],i=e[n+1],o=n>0?e[n-1]:2*a-i,s=n{});function Y9(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),a=e[(n+t-1)%t],i=e[n%t],o=e[(n+1)%t],s=e[(n+2)%t];return SW((r-n/t)*t,a,i,o,s)}}var EW=Co(()=>{W9()});var Ow,kW=Co(()=>{Ow=e=>()=>e});function eLe(e,t){return function(r){return e+r*t}}function Mzt(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function fy(e,t){var r=t-e;return r?eLe(e,r>180||r<-180?r-360*Math.round(r/360):r):Ow(isNaN(e)?t:e)}function tLe(e){return(e=+e)==1?yu:function(t,r){return r-t?Mzt(t,r,e):Ow(isNaN(t)?r:t)}}function yu(e,t){var r=t-e;return r?eLe(e,r):Ow(isNaN(e)?t:e)}var X2=Co(()=>{kW()});function rLe(e){return function(t){var r=t.length,n=new Array(r),a=new Array(r),i=new Array(r),o,s;for(o=0;o{Y2();W9();EW();X2();Y6=(function e(t){var r=tLe(t);function n(a,i){var o=r((a=Iw(a)).r,(i=Iw(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),u=yu(a.opacity,i.opacity);return function(c){return a.r=o(c),a.g=s(c),a.b=l(c),a.opacity=u(c),a+""}}return n.gamma=e,n})(1);nLe=rLe(j9),iLe=rLe(Y9)});function Nw(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a{});function aLe(e,t){return(X9(t)?Nw:LW)(e,t)}function LW(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),o;for(o=0;o{X6();Z9()});function $9(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var FW=Co(()=>{});function c0(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Z6=Co(()=>{});function K9(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=hy(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var DW=Co(()=>{X6()});function Szt(e){return function(){return e}}function Ezt(e){return function(t){return e(t)+""}}function J9(e,t){var r=IW.lastIndex=RW.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=IW.exec(e))&&(a=RW.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:c0(n,a)})),r=RW.lastIndex;return r{Z6();IW=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,RW=new RegExp(IW.source,"g")});function hy(e,t){var r=typeof t,n;return t==null||r==="boolean"?Ow(t):(r==="number"?c0:r==="string"?(n=cy(t))?(t=n,Y6):J9:t instanceof cy?Y6:t instanceof Date?$9:X9(t)?Nw:Array.isArray(t)?LW:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?K9:c0)(e,t)}var X6=Co(()=>{Y2();CW();PW();FW();Z6();DW();zW();kW();Z9()});function oLe(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var sLe=Co(()=>{});function lLe(e,t){var r=fy(+e,+t);return function(n){var a=r(n);return a-360*Math.floor(a/360)}}var uLe=Co(()=>{X2()});function cLe(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var fLe=Co(()=>{});function qW(e,t,r,n,a,i){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n{hLe=180/Math.PI,Q9={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function vLe(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Q9:qW(t.a,t.b,t.c,t.d,t.e,t.f)}function pLe(e){return e==null?Q9:(eP||(eP=document.createElementNS("http://www.w3.org/2000/svg","g")),eP.setAttribute("transform",e),(e=eP.transform.baseVal.consolidate())?(e=e.matrix,qW(e.a,e.b,e.c,e.d,e.e,e.f)):Q9)}var eP,gLe=Co(()=>{dLe()});function mLe(e,t,r,n){function a(u){return u.length?u.pop()+" ":""}function i(u,c,f,v,g,p){if(u!==f||c!==v){var x=g.push("translate(",null,t,null,r);p.push({i:x-4,x:c0(u,f)},{i:x-2,x:c0(c,v)})}else(f||v)&&g.push("translate("+f+t+v+r)}function o(u,c,f,v){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),v.push({i:f.push(a(f)+"rotate(",null,n)-2,x:c0(u,c)})):c&&f.push(a(f)+"rotate("+c+n)}function s(u,c,f,v){u!==c?v.push({i:f.push(a(f)+"skewX(",null,n)-2,x:c0(u,c)}):c&&f.push(a(f)+"skewX("+c+n)}function l(u,c,f,v,g,p){if(u!==f||c!==v){var x=g.push(a(g)+"scale(",null,",",null,")");p.push({i:x-4,x:c0(u,f)},{i:x-2,x:c0(c,v)})}else(f!==1||v!==1)&&g.push(a(g)+"scale("+f+","+v+")")}return function(u,c){var f=[],v=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,f,v),o(u.rotate,c.rotate,f,v),s(u.skewX,c.skewX,f,v),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,v),u=c=null,function(g){for(var p=-1,x=v.length,_;++p{Z6();gLe();yLe=mLe(vLe,"px, ","px)","deg)"),xLe=mLe(pLe,", ",")",")")});function bLe(e){return((e=Math.exp(e))+1/e)/2}function Czt(e){return((e=Math.exp(e))-1/e)/2}function Lzt(e){return((e=Math.exp(2*e))-1)/(e+1)}var kzt,wLe,TLe=Co(()=>{kzt=1e-12;wLe=(function e(t,r,n){function a(i,o){var s=i[0],l=i[1],u=i[2],c=o[0],f=o[1],v=o[2],g=c-s,p=f-l,x=g*g+p*p,_,y;if(x{Y2();X2();MLe=ALe(fy),SLe=ALe(yu)});function BW(e,t){var r=yu((e=qw(e)).l,(t=qw(t)).l),n=yu(e.a,t.a),a=yu(e.b,t.b),i=yu(e.opacity,t.opacity);return function(o){return e.l=r(o),e.a=n(o),e.b=a(o),e.opacity=i(o),e+""}}var kLe=Co(()=>{Y2();X2()});function CLe(e){return function(t,r){var n=e((t=j6(t)).h,(r=j6(r)).h),a=yu(t.c,r.c),i=yu(t.l,r.l),o=yu(t.opacity,r.opacity);return function(s){return t.h=n(s),t.c=a(s),t.l=i(s),t.opacity=o(s),t+""}}}var LLe,PLe,FLe=Co(()=>{Y2();X2();LLe=CLe(fy),PLe=CLe(yu)});function DLe(e){return(function t(r){r=+r;function n(a,i){var o=e((a=Bw(a)).h,(i=Bw(i)).h),s=yu(a.s,i.s),l=yu(a.l,i.l),u=yu(a.opacity,i.opacity);return function(c){return a.h=o(c),a.s=s(c),a.l=l(Math.pow(c,r)),a.opacity=u(c),a+""}}return n.gamma=t,n})(1)}var RLe,ILe,zLe=Co(()=>{Y2();X2();RLe=DLe(fy),ILe=DLe(yu)});function OW(e,t){t===void 0&&(t=e,e=hy);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r{X6()});function BLe(e,t){for(var r=new Array(t),n=0;n{});var Z2={};zp(Z2,{interpolate:()=>hy,interpolateArray:()=>aLe,interpolateBasis:()=>j9,interpolateBasisClosed:()=>Y9,interpolateCubehelix:()=>RLe,interpolateCubehelixLong:()=>ILe,interpolateDate:()=>$9,interpolateDiscrete:()=>oLe,interpolateHcl:()=>LLe,interpolateHclLong:()=>PLe,interpolateHsl:()=>MLe,interpolateHslLong:()=>SLe,interpolateHue:()=>lLe,interpolateLab:()=>BW,interpolateNumber:()=>c0,interpolateNumberArray:()=>Nw,interpolateObject:()=>K9,interpolateRgb:()=>Y6,interpolateRgbBasis:()=>nLe,interpolateRgbBasisClosed:()=>iLe,interpolateRound:()=>cLe,interpolateString:()=>J9,interpolateTransformCss:()=>yLe,interpolateTransformSvg:()=>xLe,interpolateZoom:()=>wLe,piecewise:()=>OW,quantize:()=>BLe});var $2=Co(()=>{X6();PW();W9();EW();FW();sLe();uLe();Z6();Z9();DW();fLe();zW();_Le();TLe();CW();ELe();kLe();FLe();zLe();qLe();OLe()});var tP=fe((Hbr,NLe)=>{"use strict";var Pzt=ea(),Fzt=ni();NLe.exports=function(t,r,n,a,i){var o=r.data.data,s=o.i,l=i||o.color;if(s>=0){r.i=o.i;var u=n.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=l,r.color=l):(u.color=l,r.color=l),Pzt.pointStyle(t,n,a,r)}else Fzt.fill(t,l)}});var NW=fe((jbr,jLe)=>{"use strict";var ULe=xi(),VLe=ni(),GLe=Xt(),Dzt=kh().resizeText,Rzt=tP();function Izt(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");Dzt(e,t,"sunburst"),t.each(function(r){var n=ULe.select(this),a=r[0],i=a.trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(o){ULe.select(this).call(HLe,o,i,e)})})}function HLe(e,t,r,n){var a=t.data.data,i=!t.children,o=a.i,s=GLe.castOption(r,o,"marker.line.color")||VLe.defaultLine,l=GLe.castOption(r,o,"marker.line.width")||0;e.call(Rzt,t,r,n).style("stroke-width",l).call(VLe.stroke,s).style("opacity",i?r.leaf.opacity:null)}jLe.exports={style:Izt,styleOne:HLe}});var Ag=fe(to=>{"use strict";var K2=Xt(),zzt=ni(),qzt=np(),WLe=Sm();to.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(n){if(to.getPtId(n)===t)return r=n.copy()}),r||e};to.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(n){for(var a=n.children||[],i=0;i0)};to.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};to.isHeader=function(e,t){return!(to.isLeaf(e)||e.depth===t._maxDepth-1)};function YLe(e){return e.data.data.pid}to.getParent=function(e,t){return to.findEntryWithLevel(e,YLe(t))};to.listPath=function(e,t){var r=e.parent;if(!r)return[];var n=t?[r.data[t]]:[r];return to.listPath(r,t).concat(n)};to.getPath=function(e){return to.listPath(e,"label").join("/")+"/"};to.formatValue=WLe.formatPieValue;to.formatPercent=function(e,t){var r=K2.formatPercent(e,0);return r==="0%"&&(r=WLe.formatPiePercent(e,t)),r}});var J6=fe((Ybr,$Le)=>{"use strict";var Uw=xi(),XLe=bi(),Nzt=Sd().appendArrayPointValue,$6=kl(),ZLe=Xt(),Uzt=Rb(),Sc=Ag(),Vzt=Sm(),Gzt=Vzt.formatPieValue;$Le.exports=function(t,r,n,a,i){var o=a[0],s=o.trace,l=o.hierarchy,u=s.type==="sunburst",c=s.type==="treemap"||s.type==="icicle";"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1);var f=function(p){var x=n._fullLayout;if(!(n._dragging||x.hovermode===!1)){var _=n._fullData[s.index],y=p.data.data,C=y.i,k=Sc.isHierarchyRoot(p),S=Sc.getParent(l,p),L=Sc.getValue(p),w=function(ye){return ZLe.castOption(_,C,ye)},A=w("hovertemplate"),T=$6.castHoverinfo(_,x,C),m=x.separators,F;if(A||T&&T!=="none"&&T!=="skip"){var E,I;u&&(E=o.cx+p.pxmid[0]*(1-p.rInscribed),I=o.cy+p.pxmid[1]*(1-p.rInscribed)),c&&(E=p._hoverX,I=p._hoverY);var R={},B=[],O=[],V=function(ye){return B.indexOf(ye)!==-1};T&&(B=T==="all"?_._module.attributes.hoverinfo.flags:T.split("+")),R.label=y.label,V("label")&&R.label&&O.push(R.label),y.hasOwnProperty("v")&&(R.value=y.v,R.valueLabel=Gzt(R.value,m),V("value")&&O.push(R.valueLabel)),R.currentPath=p.currentPath=Sc.getPath(p.data),V("current path")&&!k&&O.push(R.currentPath);var j,q=[],U=function(){q.indexOf(j)===-1&&(O.push(j),q.push(j))};R.percentParent=p.percentParent=L/Sc.getValue(S),R.parent=p.parentString=Sc.getPtLabel(S),V("percent parent")&&(j=Sc.formatPercent(R.percentParent,m)+" of "+R.parent,U()),R.percentEntry=p.percentEntry=L/Sc.getValue(r),R.entry=p.entry=Sc.getPtLabel(r),V("percent entry")&&!k&&!p.onPathbar&&(j=Sc.formatPercent(R.percentEntry,m)+" of "+R.entry,U()),R.percentRoot=p.percentRoot=L/Sc.getValue(l),R.root=p.root=Sc.getPtLabel(l),V("percent root")&&!k&&(j=Sc.formatPercent(R.percentRoot,m)+" of "+R.root,U()),R.text=w("hovertext")||w("text"),V("text")&&(j=R.text,ZLe.isValidTextValue(j)&&O.push(j)),F=[K6(p,_,i.eventDataKeys)];var J={trace:_,y:I,_x0:p._x0,_x1:p._x1,_y0:p._y0,_y1:p._y1,text:O.join("
"),name:A||V("name")?_.name:void 0,color:w("hoverlabel.bgcolor")||y.color,borderColor:w("hoverlabel.bordercolor"),fontFamily:w("hoverlabel.font.family"),fontSize:w("hoverlabel.font.size"),fontColor:w("hoverlabel.font.color"),fontWeight:w("hoverlabel.font.weight"),fontStyle:w("hoverlabel.font.style"),fontVariant:w("hoverlabel.font.variant"),nameLength:w("hoverlabel.namelength"),textAlign:w("hoverlabel.align"),hovertemplate:A,hovertemplateLabels:R,eventData:F};u&&(J.x0=E-p.rInscribed*p.rpx1,J.x1=E+p.rInscribed*p.rpx1,J.idealAlign=p.pxmid[0]<0?"left":"right"),c&&(J.x=E,J.idealAlign=E<0?"left":"right");var ee=[];$6.loneHover(J,{container:x._hoverlayer.node(),outerContainer:x._paper.node(),gd:n,inOut_bbox:ee}),F[0].bbox=ee[0],s._hasHoverLabel=!0}if(c){var ce=t.select("path.surface");i.styleOne(ce,p,_,n,{hovered:!0})}s._hasHoverEvent=!0,n.emit("plotly_hover",{points:F||[K6(p,_,i.eventDataKeys)],event:Uw.event})}},v=function(p){var x=n._fullLayout,_=n._fullData[s.index],y=Uw.select(this).datum();if(s._hasHoverEvent&&(p.originalEvent=Uw.event,n.emit("plotly_unhover",{points:[K6(y,_,i.eventDataKeys)],event:Uw.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&($6.loneUnhover(x._hoverlayer.node()),s._hasHoverLabel=!1),c){var C=t.select("path.surface");i.styleOne(C,y,_,n,{hovered:!1})}},g=function(p){var x=n._fullLayout,_=n._fullData[s.index],y=u&&(Sc.isHierarchyRoot(p)||Sc.isLeaf(p)),C=Sc.getPtId(p),k=Sc.isEntry(p)?Sc.findEntryWithChild(l,C):Sc.findEntryWithLevel(l,C),S=Sc.getPtId(k),L={points:[K6(p,_,i.eventDataKeys)],event:Uw.event};y||(L.nextLevel=S);var w=Uzt.triggerHandler(n,"plotly_"+s.type+"click",L);if(w!==!1&&x.hovermode&&(n._hoverdata=[K6(p,_,i.eventDataKeys)],$6.click(n,Uw.event)),!y&&w!==!1&&!n._dragging&&!n._transitioning){XLe.call("_storeDirectGUIEdit",_,x._tracePreGUI[_.uid],{level:_.level});var A={data:[{level:S}],traces:[s.index]},T={frame:{redraw:!1,duration:i.transitionTime},transition:{duration:i.transitionTime,easing:i.transitionEasing},mode:"immediate",fromcurrent:!0};$6.loneUnhover(x._hoverlayer.node()),XLe.call("animate",n,A,T)}};t.on("mouseover",f),t.on("mouseout",v),t.on("click",g)};function K6(e,t,r){for(var n=e.data.data,a={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},i=0;i{"use strict";var Q6=xi(),Hzt=O6(),Sp=($2(),Gs(Z2)).interpolate,KLe=ea(),Fh=Xt(),jzt=as(),t9e=kh(),JLe=t9e.recordMinTextSize,Wzt=t9e.clearMinTextSize,r9e=R9(),Yzt=Sm().getRotationAngle,Xzt=r9e.computeTransform,Zzt=r9e.transformInsideText,$zt=NW().styleOne,Kzt=_v().resizeText,Jzt=J6(),UW=gW(),Po=Ag();rP.plot=function(e,t,r,n){var a=e._fullLayout,i=a._sunburstlayer,o,s,l=!r,u=!a.uniformtext.mode&&Po.hasTransition(r);if(Wzt("sunburst",a),o=i.selectAll("g.trace.sunburst").data(t,function(f){return f[0].trace.uid}),o.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),u){n&&(s=n());var c=Q6.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});c.each(function(){i.selectAll("g.trace").each(function(f){QLe(e,f,this,r)})})}else o.each(function(f){QLe(e,f,this,r)}),a.uniformtext.mode&&Kzt(e,a._sunburstlayer.selectAll(".trace"),"sunburst");l&&o.exit().remove()};function QLe(e,t,r,n){var a=e._context.staticPlot,i=e._fullLayout,o=!i.uniformtext.mode&&Po.hasTransition(n),s=Q6.select(r),l=s.selectAll("g.slice"),u=t[0],c=u.trace,f=u.hierarchy,v=Po.findEntryWithLevel(f,c.level),g=Po.getMaxDepth(c),p=i._size,x=c.domain,_=p.w*(x.x[1]-x.x[0]),y=p.h*(x.y[1]-x.y[0]),C=.5*Math.min(_,y),k=u.cx=p.l+p.w*(x.x[1]+x.x[0])/2,S=u.cy=p.t+p.h*(1-x.y[0])-y/2;if(!v)return l.remove();var L=null,w={};o&&l.each(function(ue){w[Po.getPtId(ue)]={rpx0:ue.rpx0,rpx1:ue.rpx1,x0:ue.x0,x1:ue.x1,transform:ue.transform},!L&&Po.isEntry(ue)&&(L=ue)});var A=Qzt(v).descendants(),T=v.height+1,m=0,F=g;u.hasMultipleRoots&&Po.isHierarchyRoot(v)&&(A=A.slice(1),T-=1,m=1,F+=1),A=A.filter(function(ue){return ue.y1<=F});var E=Yzt(c.rotation);E&&A.forEach(function(ue){ue.x0+=E,ue.x1+=E});var I=Math.min(T,g),R=function(ue){return(ue-m)/I*C},B=function(ue,K){return[ue*Math.cos(K),-ue*Math.sin(K)]},O=function(ue){return Fh.pathAnnulus(ue.rpx0,ue.rpx1,ue.x0,ue.x1,k,S)},V=function(ue){return k+e9e(ue)[0]*(ue.transform.rCenter||0)+(ue.transform.x||0)},j=function(ue){return S+e9e(ue)[1]*(ue.transform.rCenter||0)+(ue.transform.y||0)};l=l.data(A,Po.getPtId),l.enter().append("g").classed("slice",!0),o?l.exit().transition().each(function(){var ue=Q6.select(this),K=ue.select("path.surface");K.transition().attrTween("d",function(ne){var ae=ee(ne);return function(pe){return O(ae(pe))}});var _e=ue.select("g.slicetext");_e.attr("opacity",0)}).remove():l.exit().remove(),l.order();var q=null;if(o&&L){var U=Po.getPtId(L);l.each(function(ue){q===null&&Po.getPtId(ue)===U&&(q=ue.x1)})}var J=l;o&&(J=J.transition().each("end",function(){var ue=Q6.select(this);Po.setSliceCursor(ue,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),J.each(function(ue){var K=Q6.select(this),_e=Fh.ensureSingle(K,"path","surface",function(me){me.style("pointer-events",a?"none":"all")});ue.rpx0=R(ue.y0),ue.rpx1=R(ue.y1),ue.xmid=(ue.x0+ue.x1)/2,ue.pxmid=B(ue.rpx1,ue.xmid),ue.midangle=-(ue.xmid-Math.PI/2),ue.startangle=-(ue.x0-Math.PI/2),ue.stopangle=-(ue.x1-Math.PI/2),ue.halfangle=.5*Math.min(Fh.angleDelta(ue.x0,ue.x1)||Math.PI,Math.PI),ue.ring=1-ue.rpx0/ue.rpx1,ue.rInscribed=eqt(ue,c),o?_e.transition().attrTween("d",function(me){var be=ce(me);return function(De){return O(be(De))}}):_e.attr("d",O),K.call(Jzt,v,e,t,{eventDataKeys:UW.eventDataKeys,transitionTime:UW.CLICK_TRANSITION_TIME,transitionEasing:UW.CLICK_TRANSITION_EASING}).call(Po.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),_e.call($zt,ue,c,e);var ne=Fh.ensureSingle(K,"g","slicetext"),ae=Fh.ensureSingle(ne,"text","",function(me){me.attr("data-notex",1)}),pe=Fh.ensureUniformFontSize(e,Po.determineTextFont(c,ue,i.font));ae.text(rP.formatSliceLabel(ue,v,c,t,i)).classed("slicetext",!0).attr("text-anchor","middle").call(KLe.font,pe).call(jzt.convertToTspans,e);var ie=KLe.bBox(ae.node());ue.transform=Zzt(ie,ue,u),ue.transform.targetX=V(ue),ue.transform.targetY=j(ue);var le=function(me,be){var De=me.transform;return Xzt(De,be),De.fontSize=pe.size,JLe(c.type,De,i),Fh.getTextTransform(De)};o?ae.transition().attrTween("transform",function(me){var be=ye(me);return function(De){return le(be(De),ie)}}):ae.attr("transform",le(ue,ie))});function ee(ue){var K=Po.getPtId(ue),_e=w[K],ne=w[Po.getPtId(v)],ae;if(ne){var pe=(ue.x1>ne.x1?2*Math.PI:0)+E;ae=ue.rpx1q?2*Math.PI:0)+E;_e={x0:ae,x1:ae}}else _e={rpx0:C,rpx1:C},Fh.extendFlat(_e,xe(ue));else _e={rpx0:0,rpx1:0};else _e={x0:E,x1:E};return Sp(_e,ne)}function ye(ue){var K=w[Po.getPtId(ue)],_e,ne=ue.transform;if(K)_e=K;else if(_e={rpx1:ue.rpx1,transform:{textPosAngle:ne.textPosAngle,scale:0,rotate:ne.rotate,rCenter:ne.rCenter,x:ne.x,y:ne.y}},L)if(ue.parent)if(q){var ae=ue.x1>q?2*Math.PI:0;_e.x0=_e.x1=ae}else Fh.extendFlat(_e,xe(ue));else _e.x0=_e.x1=E;else _e.x0=_e.x1=E;var pe=Sp(_e.transform.textPosAngle,ue.transform.textPosAngle),ie=Sp(_e.rpx1,ue.rpx1),le=Sp(_e.x0,ue.x0),me=Sp(_e.x1,ue.x1),be=Sp(_e.transform.scale,ne.scale),De=Sp(_e.transform.rotate,ne.rotate),Ge=ne.rCenter===0?3:_e.transform.rCenter===0?1/3:1,ht=Sp(_e.transform.rCenter,ne.rCenter),it=function(Oe){return ht(Math.pow(Oe,Ge))};return function(Oe){var ze=ie(Oe),ct=le(Oe),et=me(Oe),qe=it(Oe),we=B(ze,(ct+et)/2),Le=pe(Oe),Ke={pxmid:we,rpx1:ze,transform:{textPosAngle:Le,rCenter:qe,x:ne.x,y:ne.y}};return JLe(c.type,ne,i),{transform:{targetX:V(Ke),targetY:j(Ke),scale:be(Oe),rotate:De(Oe),rCenter:qe}}}}function xe(ue){var K=ue.parent,_e=w[Po.getPtId(K)],ne={};if(_e){var ae=K.children,pe=ae.indexOf(ue),ie=ae.length,le=Sp(_e.x0,_e.x1);ne.x0=le(pe/ie),ne.x1=le(pe/ie)}else ne.x0=ne.x1=0;return ne}}function Qzt(e){return Hzt.partition().size([2*Math.PI,e.height+1])(e)}rP.formatSliceLabel=function(e,t,r,n,a){var i=r.texttemplate,o=r.textinfo;if(!i&&(!o||o==="none"))return"";var s=a.separators,l=n[0],u=e.data.data,c=l.hierarchy,f=Po.isHierarchyRoot(e),v=Po.getParent(c,e),g=Po.getValue(e);if(!i){var p=o.split("+"),x=function(m){return p.indexOf(m)!==-1},_=[],y;if(x("label")&&u.label&&_.push(u.label),u.hasOwnProperty("v")&&x("value")&&_.push(Po.formatValue(u.v,s)),!f){x("current path")&&_.push(Po.getPath(e.data));var C=0;x("percent parent")&&C++,x("percent entry")&&C++,x("percent root")&&C++;var k=C>1;if(C){var S,L=function(m){y=Po.formatPercent(S,s),k&&(y+=" of "+m),_.push(y)};x("percent parent")&&!f&&(S=g/Po.getValue(v),L("parent")),x("percent entry")&&(S=g/Po.getValue(t),L("entry")),x("percent root")&&(S=g/Po.getValue(c),L("root"))}}return x("text")&&(y=Fh.castOption(r,u.i,"text"),Fh.isValidTextValue(y)&&_.push(y)),_.join("
")}var w=Fh.castOption(r,u.i,"texttemplate");if(!w)return"";var A={};u.label&&(A.label=u.label),u.hasOwnProperty("v")&&(A.value=u.v,A.valueLabel=Po.formatValue(u.v,s)),A.currentPath=Po.getPath(e.data),f||(A.percentParent=g/Po.getValue(v),A.percentParentLabel=Po.formatPercent(A.percentParent,s),A.parent=Po.getPtLabel(v)),A.percentEntry=g/Po.getValue(t),A.percentEntryLabel=Po.formatPercent(A.percentEntry,s),A.entry=Po.getPtLabel(t),A.percentRoot=g/Po.getValue(c),A.percentRootLabel=Po.formatPercent(A.percentRoot,s),A.root=Po.getPtLabel(c),u.hasOwnProperty("color")&&(A.color=u.color);var T=Fh.castOption(r,u.i,"text");return(Fh.isValidTextValue(T)||T==="")&&(A.text=T),A.customdata=Fh.castOption(r,u.i,"customdata"),Fh.texttemplateString({data:[A,r._meta],fallback:r.texttemplatefallback,labels:A,locale:a._d3locale,template:w})};function eqt(e){return e.rpx0===0&&Fh.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function e9e(e){return tqt(e.rpx1,e.transform.textPosAngle)}function tqt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var i9e=fe((Zbr,n9e)=>{"use strict";n9e.exports={moduleType:"trace",name:"sunburst",basePlotModule:m7e(),categories:[],animatable:!0,attributes:B6(),layoutAttributes:mW(),supplyDefaults:S7e(),supplyLayoutDefaults:k7e(),calc:U6().calc,crossTraceCalc:U6().crossTraceCalc,plot:nP().plot,style:NW().style,colorbar:Zf(),meta:{}}});var o9e=fe(($br,a9e)=>{"use strict";a9e.exports=i9e()});var l9e=fe(Vw=>{"use strict";var s9e=Hs();Vw.name="treemap";Vw.plot=function(e,t,r,n){s9e.plotBasePlot(Vw.name,e,t,r,n)};Vw.clean=function(e,t,r,n){s9e.cleanBasePlot(Vw.name,e,t,r,n)}});var J2=fe((Jbr,u9e)=>{"use strict";u9e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var iP=fe((Qbr,h9e)=>{"use strict";var{hovertemplateAttrs:rqt,texttemplateAttrs:nqt,templatefallbackAttrs:c9e}=Oo(),iqt=_s(),aqt=nl().attributes,Q2=U2(),Dv=B6(),f9e=J2(),VW=ta().extendFlat,oqt=Uc().pattern;h9e.exports={labels:Dv.labels,parents:Dv.parents,values:Dv.values,branchvalues:Dv.branchvalues,count:Dv.count,level:Dv.level,maxdepth:Dv.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:VW({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:Dv.marker.colors,pattern:oqt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:Dv.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},iqt("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:VW({},Q2.textfont,{}),editType:"calc"},text:Q2.text,textinfo:Dv.textinfo,texttemplate:nqt({editType:"plot"},{keys:f9e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:c9e({editType:"plot"}),hovertext:Q2.hovertext,hoverinfo:Dv.hoverinfo,hovertemplate:rqt({},{keys:f9e.eventDataKeys}),hovertemplatefallback:c9e(),textfont:Q2.textfont,insidetextfont:Q2.insidetextfont,outsidetextfont:VW({},Q2.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:Q2.sort,root:Dv.root,domain:aqt({name:"treemap",trace:!0,editType:"calc"})}});var GW=fe((e3r,d9e)=>{"use strict";d9e.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var m9e=fe((t3r,g9e)=>{"use strict";var v9e=Xt(),sqt=iP(),lqt=ni(),uqt=nl().defaults,cqt=z0().handleText,fqt=Im().TEXTPAD,hqt=V2().handleMarkerDefaults,p9e=js(),dqt=p9e.hasColorscale,vqt=p9e.handleDefaults;g9e.exports=function(t,r,n,a){function i(_,y){return v9e.coerce(t,r,sqt,_,y)}var o=i("labels"),s=i("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=i("values");l&&l.length?i("branchvalues"):i("count"),i("level"),i("maxdepth");var u=i("tiling.packing");u==="squarify"&&i("tiling.squarifyratio"),i("tiling.flip"),i("tiling.pad");var c=i("text");i("texttemplate"),i("texttemplatefallback"),r.texttemplate||i("textinfo",v9e.isArrayOrTypedArray(c)?"text+label":"label"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var f=i("pathbar.visible"),v="auto";cqt(t,r,a,i,v,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("textposition");var g=r.textposition.indexOf("bottom")!==-1;hqt(t,r,a,i);var p=r._hasColorscale=dqt(t,"marker","colors")||(t.marker||{}).coloraxis;p?vqt(t,r,a,i,{prefix:"marker.",cLetter:"c"}):i("marker.depthfade",!(r.marker.colors||[]).length);var x=r.textfont.size*2;i("marker.pad.t",g?x/4:x),i("marker.pad.l",x/4),i("marker.pad.r",x/4),i("marker.pad.b",g?x:x/4),i("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:lqt.contrast(a.paper_bgcolor)}}},f&&(i("pathbar.thickness",r.pathbar.textfont.size+2*fqt),i("pathbar.side"),i("pathbar.edgeshape")),i("sort"),i("root.color"),uqt(r,a,i),r._length=null}});var x9e=fe((r3r,y9e)=>{"use strict";var pqt=Xt(),gqt=GW();y9e.exports=function(t,r){function n(a,i){return pqt.coerce(t,r,gqt,a,i)}n("treemapcolorway",r.colorway),n("extendtreemapcolors")}});var jW=fe(HW=>{"use strict";var _9e=U6();HW.calc=function(e,t){return _9e.calc(e,t)};HW.crossTraceCalc=function(e){return _9e._runCrossTraceCalc("treemap",e)}});var WW=fe((i3r,b9e)=>{"use strict";b9e.exports=function e(t,r,n){var a;n.swapXY&&(a=t.x0,t.x0=t.y0,t.y0=a,a=t.x1,t.x1=t.y1,t.y1=a),n.flipX&&(a=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-a),n.flipY&&(a=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-a);var i=t.children;if(i)for(var o=0;o{"use strict";var Gw=O6(),mqt=WW();w9e.exports=function(t,r,n){var a=n.flipX,i=n.flipY,o=n.packing==="dice-slice",s=n.pad[i?"bottom":"top"],l=n.pad[a?"right":"left"],u=n.pad[a?"left":"right"],c=n.pad[i?"top":"bottom"],f;o&&(f=l,l=s,s=f,f=u,u=c,c=f);var v=Gw.treemap().tile(yqt(n.packing,n.squarifyratio)).paddingInner(n.pad.inner).paddingLeft(l).paddingRight(u).paddingTop(s).paddingBottom(c).size(o?[r[1],r[0]]:r)(t);return(o||a||i)&&mqt(v,r,{swapXY:o,flipX:a,flipY:i}),v};function yqt(e,t){switch(e){case"squarify":return Gw.treemapSquarify.ratio(t);case"binary":return Gw.treemapBinary;case"dice":return Gw.treemapDice;case"slice":return Gw.treemapSlice;default:return Gw.treemapSliceDice}}});var aP=fe((o3r,S9e)=>{"use strict";var T9e=xi(),Hw=ni(),A9e=Xt(),XW=Ag(),xqt=kh().resizeText,_qt=tP();function bqt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");xqt(e,t,"treemap"),t.each(function(r){var n=T9e.select(this),a=r[0],i=a.trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(o){T9e.select(this).call(M9e,o,i,e,{hovered:!1})})})}function M9e(e,t,r,n,a){var i=(a||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=XW.isHierarchyRoot(t),v=1;if(i)l=r._hovered.marker.line.color,u=r._hovered.marker.line.width;else if(f&&c===r.root.color)v=100,l="rgba(0,0,0,0)",u=0;else if(l=A9e.castOption(r,s,"marker.line.color")||Hw.defaultLine,u=A9e.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var g=r.marker.depthfade;if(g){var p=Hw.combine(Hw.addOpacity(r._backgroundColor,.75),c),x;if(g===!0){var _=XW.getMaxDepth(r);isFinite(_)?XW.isLeaf(t)?x=0:x=r._maxVisibleLayers-(t.data.depth-r._entryDepth):x=t.data.height+1}else x=t.data.depth-r._entryDepth,r._atRootLevel||x++;if(x>0)for(var y=0;y{"use strict";var E9e=xi(),oP=Xt(),k9e=ea(),wqt=as(),Tqt=YW(),C9e=aP().styleOne,ZW=J2(),jw=Ag(),Aqt=J6(),$W=!0;L9e.exports=function(t,r,n,a,i){var o=i.barDifY,s=i.width,l=i.height,u=i.viewX,c=i.viewY,f=i.pathSlice,v=i.toMoveInsideSlice,g=i.strTransform,p=i.hasTransition,x=i.handleSlicesExit,_=i.makeUpdateSliceInterpolator,y=i.makeUpdateTextInterpolator,C={},k=t._context.staticPlot,S=t._fullLayout,L=r[0],w=L.trace,A=L.hierarchy,T=s/w._entryDepth,m=jw.listPath(n.data,"id"),F=Tqt(A.copy(),[s,l],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();F=F.filter(function(I){var R=m.indexOf(I.data.id);return R===-1?!1:(I.x0=T*R,I.x1=T*(R+1),I.y0=o,I.y1=o+l,I.onPathbar=!0,!0)}),F.reverse(),a=a.data(F,jw.getPtId),a.enter().append("g").classed("pathbar",!0),x(a,$W,C,[s,l],f),a.order();var E=a;p&&(E=E.transition().each("end",function(){var I=E9e.select(this);jw.setSliceCursor(I,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),E.each(function(I){I._x0=u(I.x0),I._x1=u(I.x1),I._y0=c(I.y0),I._y1=c(I.y1),I._hoverX=u(I.x1-Math.min(s,l)/2),I._hoverY=c(I.y1-l/2);var R=E9e.select(this),B=oP.ensureSingle(R,"path","surface",function(q){q.style("pointer-events",k?"none":"all")});p?B.transition().attrTween("d",function(q){var U=_(q,$W,C,[s,l]);return function(J){return f(U(J))}}):B.attr("d",f),R.call(Aqt,n,t,r,{styleOne:C9e,eventDataKeys:ZW.eventDataKeys,transitionTime:ZW.CLICK_TRANSITION_TIME,transitionEasing:ZW.CLICK_TRANSITION_EASING}).call(jw.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),B.call(C9e,I,w,t,{hovered:!1}),I._text=(jw.getPtLabel(I)||"").split("
").join(" ")||"";var O=oP.ensureSingle(R,"g","slicetext"),V=oP.ensureSingle(O,"text","",function(q){q.attr("data-notex",1)}),j=oP.ensureUniformFontSize(t,jw.determineTextFont(w,I,S.font,{onPathbar:!0}));V.text(I._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(k9e.font,j).call(wqt.convertToTspans,t),I.textBB=k9e.bBox(V.node()),I.transform=v(I,{fontSize:j.size,onPathbar:!0}),I.transform.fontSize=j.size,p?V.transition().attrTween("transform",function(q){var U=y(q,$W,C,[s,l]);return function(J){return g(U(J))}}):V.attr("transform",g(I))})}});var I9e=fe((l3r,R9e)=>{"use strict";var F9e=xi(),KW=($2(),Gs(Z2)).interpolate,dy=Ag(),eM=Xt(),D9e=Im().TEXTPAD,Mqt=m2(),Sqt=Mqt.toMoveInsideBar,Eqt=kh(),JW=Eqt.recordMinTextSize,kqt=J2(),Cqt=P9e();function e_(e){return dy.isHierarchyRoot(e)?"":dy.getPtId(e)}R9e.exports=function(t,r,n,a,i){var o=t._fullLayout,s=r[0],l=s.trace,u=l.type,c=u==="icicle",f=s.hierarchy,v=dy.findEntryWithLevel(f,l.level),g=F9e.select(n),p=g.selectAll("g.pathbar"),x=g.selectAll("g.slice");if(!v){p.remove(),x.remove();return}var _=dy.isHierarchyRoot(v),y=!o.uniformtext.mode&&dy.hasTransition(a),C=dy.getMaxDepth(l),k=function(Te){return Te.data.depth-v.data.depth-1?A+F:-(m+F):0,I={x0:T,x1:T,y0:E,y1:E+m},R=function(Te,Ve,$e){var ot=l.tiling.pad,tt=function(bt){return bt-ot<=Ve.x0},nt=function(bt){return bt+ot>=Ve.x1},We=function(bt){return bt-ot<=Ve.y0},mt=function(bt){return bt+ot>=Ve.y1};return Te.x0===Ve.x0&&Te.x1===Ve.x1&&Te.y0===Ve.y0&&Te.y1===Ve.y1?{x0:Te.x0,x1:Te.x1,y0:Te.y0,y1:Te.y1}:{x0:tt(Te.x0-ot)?0:nt(Te.x0-ot)?$e[0]:Te.x0,x1:tt(Te.x1+ot)?0:nt(Te.x1+ot)?$e[0]:Te.x1,y0:We(Te.y0-ot)?0:mt(Te.y0-ot)?$e[1]:Te.y0,y1:We(Te.y1+ot)?0:mt(Te.y1+ot)?$e[1]:Te.y1}},B=null,O={},V={},j=null,q=function(Te,Ve){return Ve?O[e_(Te)]:V[e_(Te)]},U=function(Te,Ve,$e,ot){if(Ve)return O[e_(f)]||I;var tt=V[l.level]||$e;return k(Te)?R(Te,tt,ot):{}};s.hasMultipleRoots&&_&&C++,l._maxDepth=C,l._backgroundColor=o.paper_bgcolor,l._entryDepth=v.data.depth,l._atRootLevel=_;var J=-w/2+S.l+S.w*(L.x[1]+L.x[0])/2,ee=-A/2+S.t+S.h*(1-(L.y[1]+L.y[0])/2),ce=function(Te){return J+Te},ye=function(Te){return ee+Te},xe=ye(0),ue=ce(0),K=function(Te){return ue+Te},_e=function(Te){return xe+Te};function ne(Te,Ve){return Te+","+Ve}var ae=K(0),pe=function(Te){Te.x=Math.max(ae,Te.x)},ie=l.pathbar.edgeshape,le=function(Te){var Ve=K(Math.max(Math.min(Te.x0,Te.x0),0)),$e=K(Math.min(Math.max(Te.x1,Te.x1),T)),ot=_e(Te.y0),tt=_e(Te.y1),nt=m/2,We={},mt={};We.x=Ve,mt.x=$e,We.y=mt.y=(ot+tt)/2;var bt={x:Ve,y:ot},Yt={x:$e,y:ot},jt={x:$e,y:tt},mr={x:Ve,y:tt};return ie===">"?(bt.x-=nt,Yt.x-=nt,jt.x-=nt,mr.x-=nt):ie==="/"?(jt.x-=nt,mr.x-=nt,We.x-=nt/2,mt.x-=nt/2):ie==="\\"?(bt.x-=nt,Yt.x-=nt,We.x-=nt/2,mt.x-=nt/2):ie==="<"&&(We.x-=nt,mt.x-=nt),pe(bt),pe(mr),pe(We),pe(Yt),pe(jt),pe(mt),"M"+ne(bt.x,bt.y)+"L"+ne(Yt.x,Yt.y)+"L"+ne(mt.x,mt.y)+"L"+ne(jt.x,jt.y)+"L"+ne(mr.x,mr.y)+"L"+ne(We.x,We.y)+"Z"},me=l[c?"tiling":"marker"].pad,be=function(Te){return l.textposition.indexOf(Te)!==-1},De=be("top"),Ge=be("left"),ht=be("right"),it=be("bottom"),Oe=function(Te){var Ve=ce(Te.x0),$e=ce(Te.x1),ot=ye(Te.y0),tt=ye(Te.y1),nt=$e-Ve,We=tt-ot;if(!nt||!We)return"";var mt=l.marker.cornerradius||0,bt=Math.min(mt,nt/2,We/2);bt&&Te.data&&Te.data.data&&Te.data.data.label&&(De&&(bt=Math.min(bt,me.t)),Ge&&(bt=Math.min(bt,me.l)),ht&&(bt=Math.min(bt,me.r)),it&&(bt=Math.min(bt,me.b)));var Yt=function(jt,mr){return bt?"a"+ne(bt,bt)+" 0 0 1 "+ne(jt,mr):""};return"M"+ne(Ve,ot+bt)+Yt(bt,-bt)+"L"+ne($e-bt,ot)+Yt(bt,bt)+"L"+ne($e,tt-bt)+Yt(-bt,bt)+"L"+ne(Ve+bt,tt)+Yt(-bt,-bt)+"Z"},ze=function(Te,Ve){var $e=Te.x0,ot=Te.x1,tt=Te.y0,nt=Te.y1,We=Te.textBB,mt=De||Ve.isHeader&&!it,bt=mt?"start":it?"end":"middle",Yt=be("right"),jt=be("left")||Ve.onPathbar,mr=jt?-1:Yt?1:0;if(Ve.isHeader){if($e+=(c?me:me.l)-D9e,ot-=(c?me:me.r)-D9e,$e>=ot){var or=($e+ot)/2;$e=or,ot=or}var fr;it?(fr=nt-(c?me:me.b),tt{"use strict";var Lqt=xi(),Pqt=Ag(),Fqt=kh(),Dqt=Fqt.clearMinTextSize,Rqt=_v().resizeText,z9e=I9e();q9e.exports=function(t,r,n,a,i){var o=i.type,s=i.drawDescendants,l=t._fullLayout,u=l["_"+o+"layer"],c,f,v=!n;if(Dqt(o,l),c=u.selectAll("g.trace."+o).data(r,function(p){return p[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!l.uniformtext.mode&&Pqt.hasTransition(n)){a&&(f=a());var g=Lqt.transition().duration(n.duration).ease(n.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()});g.each(function(){u.selectAll("g.trace").each(function(p){z9e(t,p,this,n,s)})})}else c.each(function(p){z9e(t,p,this,n,s)}),l.uniformtext.mode&&Rqt(t,u.selectAll(".trace"),o);v&&c.exit().remove()}});var V9e=fe((c3r,U9e)=>{"use strict";var B9e=xi(),sP=Xt(),O9e=ea(),Iqt=as(),zqt=YW(),N9e=aP().styleOne,eY=J2(),vy=Ag(),qqt=J6(),Bqt=nP().formatSliceLabel,tY=!1;U9e.exports=function(t,r,n,a,i){var o=i.width,s=i.height,l=i.viewX,u=i.viewY,c=i.pathSlice,f=i.toMoveInsideSlice,v=i.strTransform,g=i.hasTransition,p=i.handleSlicesExit,x=i.makeUpdateSliceInterpolator,_=i.makeUpdateTextInterpolator,y=i.prevEntry,C={},k=t._context.staticPlot,S=t._fullLayout,L=r[0],w=L.trace,A=w.textposition.indexOf("left")!==-1,T=w.textposition.indexOf("right")!==-1,m=w.textposition.indexOf("bottom")!==-1,F=!m&&!w.marker.pad.t||m&&!w.marker.pad.b,E=zqt(n,[o,s],{packing:w.tiling.packing,squarifyratio:w.tiling.squarifyratio,flipX:w.tiling.flip.indexOf("x")>-1,flipY:w.tiling.flip.indexOf("y")>-1,pad:{inner:w.tiling.pad,top:w.marker.pad.t,left:w.marker.pad.l,right:w.marker.pad.r,bottom:w.marker.pad.b}}),I=E.descendants(),R=1/0,B=-1/0;I.forEach(function(U){var J=U.depth;J>=w._maxDepth?(U.x0=U.x1=(U.x0+U.x1)/2,U.y0=U.y1=(U.y0+U.y1)/2):(R=Math.min(R,J),B=Math.max(B,J))}),a=a.data(I,vy.getPtId),w._maxVisibleLayers=isFinite(B)?B-R+1:0,a.enter().append("g").classed("slice",!0),p(a,tY,C,[o,s],c),a.order();var O=null;if(g&&y){var V=vy.getPtId(y);a.each(function(U){O===null&&vy.getPtId(U)===V&&(O={x0:U.x0,x1:U.x1,y0:U.y0,y1:U.y1})})}var j=function(){return O||{x0:0,x1:o,y0:0,y1:s}},q=a;return g&&(q=q.transition().each("end",function(){var U=B9e.select(this);vy.setSliceCursor(U,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),q.each(function(U){var J=vy.isHeader(U,w);U._x0=l(U.x0),U._x1=l(U.x1),U._y0=u(U.y0),U._y1=u(U.y1),U._hoverX=l(U.x1-w.marker.pad.r),U._hoverY=u(m?U.y1-w.marker.pad.b/2:U.y0+w.marker.pad.t/2);var ee=B9e.select(this),ce=sP.ensureSingle(ee,"path","surface",function(ne){ne.style("pointer-events",k?"none":"all")});g?ce.transition().attrTween("d",function(ne){var ae=x(ne,tY,j(),[o,s]);return function(pe){return c(ae(pe))}}):ce.attr("d",c),ee.call(qqt,n,t,r,{styleOne:N9e,eventDataKeys:eY.eventDataKeys,transitionTime:eY.CLICK_TRANSITION_TIME,transitionEasing:eY.CLICK_TRANSITION_EASING}).call(vy.setSliceCursor,t,{isTransitioning:t._transitioning}),ce.call(N9e,U,w,t,{hovered:!1}),U.x0===U.x1||U.y0===U.y1?U._text="":J?U._text=F?"":vy.getPtLabel(U)||"":U._text=Bqt(U,n,w,r,S)||"";var ye=sP.ensureSingle(ee,"g","slicetext"),xe=sP.ensureSingle(ye,"text","",function(ne){ne.attr("data-notex",1)}),ue=sP.ensureUniformFontSize(t,vy.determineTextFont(w,U,S.font)),K=U._text||" ",_e=J&&K.indexOf("
")===-1;xe.text(K).classed("slicetext",!0).attr("text-anchor",T?"end":A||_e?"start":"middle").call(O9e.font,ue).call(Iqt.convertToTspans,t),U.textBB=O9e.bBox(xe.node()),U.transform=f(U,{fontSize:ue.size,isHeader:J}),U.transform.fontSize=ue.size,g?xe.transition().attrTween("transform",function(ne){var ae=_(ne,tY,j(),[o,s]);return function(pe){return v(ae(pe))}}):xe.attr("transform",v(U))}),O}});var H9e=fe((f3r,G9e)=>{"use strict";var Oqt=QW(),Nqt=V9e();G9e.exports=function(t,r,n,a){return Oqt(t,r,n,a,{type:"treemap",drawDescendants:Nqt})}});var W9e=fe((h3r,j9e)=>{"use strict";j9e.exports={moduleType:"trace",name:"treemap",basePlotModule:l9e(),categories:[],animatable:!0,attributes:iP(),layoutAttributes:GW(),supplyDefaults:m9e(),supplyLayoutDefaults:x9e(),calc:jW().calc,crossTraceCalc:jW().crossTraceCalc,plot:H9e(),style:aP().style,colorbar:Zf(),meta:{}}});var X9e=fe((d3r,Y9e)=>{"use strict";Y9e.exports=W9e()});var $9e=fe(Ww=>{"use strict";var Z9e=Hs();Ww.name="icicle";Ww.plot=function(e,t,r,n){Z9e.plotBasePlot(Ww.name,e,t,r,n)};Ww.clean=function(e,t,r,n){Z9e.cleanBasePlot(Ww.name,e,t,r,n)}});var rY=fe((p3r,Q9e)=>{"use strict";var{hovertemplateAttrs:Uqt,texttemplateAttrs:Vqt,templatefallbackAttrs:K9e}=Oo(),Gqt=_s(),Hqt=nl().attributes,tM=U2(),N0=B6(),lP=iP(),J9e=J2(),jqt=ta().extendFlat,Wqt=Uc().pattern;Q9e.exports={labels:N0.labels,parents:N0.parents,values:N0.values,branchvalues:N0.branchvalues,count:N0.count,level:N0.level,maxdepth:N0.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:lP.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:jqt({colors:N0.marker.colors,line:N0.marker.line,pattern:Wqt,editType:"calc"},Gqt("marker",{colorAttr:"colors",anim:!1})),leaf:N0.leaf,pathbar:lP.pathbar,text:tM.text,textinfo:N0.textinfo,texttemplate:Vqt({editType:"plot"},{keys:J9e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:K9e({editType:"plot"}),hovertext:tM.hovertext,hoverinfo:N0.hoverinfo,hovertemplate:Uqt({},{keys:J9e.eventDataKeys}),hovertemplatefallback:K9e(),textfont:tM.textfont,insidetextfont:tM.insidetextfont,outsidetextfont:lP.outsidetextfont,textposition:lP.textposition,sort:tM.sort,root:N0.root,domain:Hqt({name:"icicle",trace:!0,editType:"calc"})}});var nY=fe((g3r,ePe)=>{"use strict";ePe.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var iPe=fe((m3r,nPe)=>{"use strict";var tPe=Xt(),Yqt=rY(),Xqt=ni(),Zqt=nl().defaults,$qt=z0().handleText,Kqt=Im().TEXTPAD,Jqt=V2().handleMarkerDefaults,rPe=js(),Qqt=rPe.hasColorscale,eBt=rPe.handleDefaults;nPe.exports=function(t,r,n,a){function i(g,p){return tPe.coerce(t,r,Yqt,g,p)}var o=i("labels"),s=i("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=i("values");l&&l.length?i("branchvalues"):i("count"),i("level"),i("maxdepth"),i("tiling.orientation"),i("tiling.flip"),i("tiling.pad");var u=i("text");i("texttemplate"),i("texttemplatefallback"),r.texttemplate||i("textinfo",tPe.isArrayOrTypedArray(u)?"text+label":"label"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var c=i("pathbar.visible"),f="auto";$qt(t,r,a,i,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("textposition"),Jqt(t,r,a,i);var v=r._hasColorscale=Qqt(t,"marker","colors")||(t.marker||{}).coloraxis;v&&eBt(t,r,a,i,{prefix:"marker.",cLetter:"c"}),i("leaf.opacity",v?1:.7),r._hovered={marker:{line:{width:2,color:Xqt.contrast(a.paper_bgcolor)}}},c&&(i("pathbar.thickness",r.pathbar.textfont.size+2*Kqt),i("pathbar.side"),i("pathbar.edgeshape")),i("sort"),i("root.color"),Zqt(r,a,i),r._length=null}});var oPe=fe((y3r,aPe)=>{"use strict";var tBt=Xt(),rBt=nY();aPe.exports=function(t,r){function n(a,i){return tBt.coerce(t,r,rBt,a,i)}n("iciclecolorway",r.colorway),n("extendiciclecolors")}});var aY=fe(iY=>{"use strict";var sPe=U6();iY.calc=function(e,t){return sPe.calc(e,t)};iY.crossTraceCalc=function(e){return sPe._runCrossTraceCalc("icicle",e)}});var uPe=fe((_3r,lPe)=>{"use strict";var nBt=O6(),iBt=WW();lPe.exports=function(t,r,n){var a=n.flipX,i=n.flipY,o=n.orientation==="h",s=n.maxDepth,l=r[0],u=r[1];s&&(l=(t.height+1)*r[0]/Math.min(t.height+1,s),u=(t.height+1)*r[1]/Math.min(t.height+1,s));var c=nBt.partition().padding(n.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||a||i)&&iBt(c,r,{swapXY:o,flipX:a,flipY:i}),c}});var oY=fe((b3r,vPe)=>{"use strict";var cPe=xi(),fPe=ni(),hPe=Xt(),aBt=kh().resizeText,oBt=tP();function sBt(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");aBt(e,t,"icicle"),t.each(function(r){var n=cPe.select(this),a=r[0],i=a.trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(o){cPe.select(this).call(dPe,o,i,e)})})}function dPe(e,t,r,n){var a=t.data.data,i=!t.children,o=a.i,s=hPe.castOption(r,o,"marker.line.color")||fPe.defaultLine,l=hPe.castOption(r,o,"marker.line.width")||0;e.call(oBt,t,r,n).style("stroke-width",l).call(fPe.stroke,s).style("opacity",i?r.leaf.opacity:null)}vPe.exports={style:sBt,styleOne:dPe}});var xPe=fe((w3r,yPe)=>{"use strict";var pPe=xi(),uP=Xt(),gPe=ea(),lBt=as(),uBt=uPe(),mPe=oY().styleOne,sY=J2(),Yw=Ag(),cBt=J6(),fBt=nP().formatSliceLabel,lY=!1;yPe.exports=function(t,r,n,a,i){var o=i.width,s=i.height,l=i.viewX,u=i.viewY,c=i.pathSlice,f=i.toMoveInsideSlice,v=i.strTransform,g=i.hasTransition,p=i.handleSlicesExit,x=i.makeUpdateSliceInterpolator,_=i.makeUpdateTextInterpolator,y=i.prevEntry,C={},k=t._context.staticPlot,S=t._fullLayout,L=r[0],w=L.trace,A=w.textposition.indexOf("left")!==-1,T=w.textposition.indexOf("right")!==-1,m=w.textposition.indexOf("bottom")!==-1,F=uBt(n,[o,s],{flipX:w.tiling.flip.indexOf("x")>-1,flipY:w.tiling.flip.indexOf("y")>-1,orientation:w.tiling.orientation,pad:{inner:w.tiling.pad},maxDepth:w._maxDepth}),E=F.descendants(),I=1/0,R=-1/0;E.forEach(function(q){var U=q.depth;U>=w._maxDepth?(q.x0=q.x1=(q.x0+q.x1)/2,q.y0=q.y1=(q.y0+q.y1)/2):(I=Math.min(I,U),R=Math.max(R,U))}),a=a.data(E,Yw.getPtId),w._maxVisibleLayers=isFinite(R)?R-I+1:0,a.enter().append("g").classed("slice",!0),p(a,lY,C,[o,s],c),a.order();var B=null;if(g&&y){var O=Yw.getPtId(y);a.each(function(q){B===null&&Yw.getPtId(q)===O&&(B={x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1})})}var V=function(){return B||{x0:0,x1:o,y0:0,y1:s}},j=a;return g&&(j=j.transition().each("end",function(){var q=pPe.select(this);Yw.setSliceCursor(q,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),j.each(function(q){q._x0=l(q.x0),q._x1=l(q.x1),q._y0=u(q.y0),q._y1=u(q.y1),q._hoverX=l(q.x1-w.tiling.pad),q._hoverY=u(m?q.y1-w.tiling.pad/2:q.y0+w.tiling.pad/2);var U=pPe.select(this),J=uP.ensureSingle(U,"path","surface",function(xe){xe.style("pointer-events",k?"none":"all")});g?J.transition().attrTween("d",function(xe){var ue=x(xe,lY,V(),[o,s],{orientation:w.tiling.orientation,flipX:w.tiling.flip.indexOf("x")>-1,flipY:w.tiling.flip.indexOf("y")>-1});return function(K){return c(ue(K))}}):J.attr("d",c),U.call(cBt,n,t,r,{styleOne:mPe,eventDataKeys:sY.eventDataKeys,transitionTime:sY.CLICK_TRANSITION_TIME,transitionEasing:sY.CLICK_TRANSITION_EASING}).call(Yw.setSliceCursor,t,{isTransitioning:t._transitioning}),J.call(mPe,q,w,t,{hovered:!1}),q.x0===q.x1||q.y0===q.y1?q._text="":q._text=fBt(q,n,w,r,S)||"";var ee=uP.ensureSingle(U,"g","slicetext"),ce=uP.ensureSingle(ee,"text","",function(xe){xe.attr("data-notex",1)}),ye=uP.ensureUniformFontSize(t,Yw.determineTextFont(w,q,S.font));ce.text(q._text||" ").classed("slicetext",!0).attr("text-anchor",T?"end":A?"start":"middle").call(gPe.font,ye).call(lBt.convertToTspans,t),q.textBB=gPe.bBox(ce.node()),q.transform=f(q,{fontSize:ye.size}),q.transform.fontSize=ye.size,g?ce.transition().attrTween("transform",function(xe){var ue=_(xe,lY,V(),[o,s]);return function(K){return v(ue(K))}}):ce.attr("transform",v(q))}),B}});var bPe=fe((T3r,_Pe)=>{"use strict";var hBt=QW(),dBt=xPe();_Pe.exports=function(t,r,n,a){return hBt(t,r,n,a,{type:"icicle",drawDescendants:dBt})}});var TPe=fe((A3r,wPe)=>{"use strict";wPe.exports={moduleType:"trace",name:"icicle",basePlotModule:$9e(),categories:[],animatable:!0,attributes:rY(),layoutAttributes:nY(),supplyDefaults:iPe(),supplyLayoutDefaults:oPe(),calc:aY().calc,crossTraceCalc:aY().crossTraceCalc,plot:bPe(),style:oY().style,colorbar:Zf(),meta:{}}});var MPe=fe((M3r,APe)=>{"use strict";APe.exports=TPe()});var EPe=fe(Xw=>{"use strict";var SPe=Hs();Xw.name="funnelarea";Xw.plot=function(e,t,r,n){SPe.plotBasePlot(Xw.name,e,t,r,n)};Xw.clean=function(e,t,r,n){SPe.cleanBasePlot(Xw.name,e,t,r,n)}});var uY=fe((E3r,CPe)=>{"use strict";var eh=U2(),vBt=Ho(),pBt=nl().attributes,{hovertemplateAttrs:gBt,texttemplateAttrs:mBt,templatefallbackAttrs:kPe}=Oo(),t_=ta().extendFlat;CPe.exports={labels:eh.labels,label0:eh.label0,dlabel:eh.dlabel,values:eh.values,marker:{colors:eh.marker.colors,line:{color:t_({},eh.marker.line.color,{dflt:null}),width:t_({},eh.marker.line.width,{dflt:1}),editType:"calc"},pattern:eh.marker.pattern,editType:"calc"},text:eh.text,hovertext:eh.hovertext,scalegroup:t_({},eh.scalegroup,{}),textinfo:t_({},eh.textinfo,{flags:["label","text","value","percent"]}),texttemplate:mBt({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:kPe({editType:"plot"}),hoverinfo:t_({},vBt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:gBt({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:kPe(),textposition:t_({},eh.textposition,{values:["inside","none"],dflt:"inside"}),textfont:eh.textfont,insidetextfont:eh.insidetextfont,title:{text:eh.title.text,font:eh.title.font,position:t_({},eh.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:pBt({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"}}});var cY=fe((k3r,LPe)=>{"use strict";var yBt=L9().hiddenlabels;LPe.exports={hiddenlabels:yBt,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var DPe=fe((C3r,FPe)=>{"use strict";var PPe=Xt(),xBt=uY(),_Bt=nl().defaults,bBt=z0().handleText,wBt=V2().handleLabelsAndValues,TBt=V2().handleMarkerDefaults;FPe.exports=function(t,r,n,a){function i(x,_){return PPe.coerce(t,r,xBt,x,_)}var o=i("labels"),s=i("values"),l=wBt(o,s),u=l.len;if(r._hasLabels=l.hasLabels,r._hasValues=l.hasValues,!r._hasLabels&&r._hasValues&&(i("label0"),i("dlabel")),!u){r.visible=!1;return}r._length=u,TBt(t,r,a,i),i("scalegroup");var c=i("text"),f=i("texttemplate");i("texttemplatefallback");var v;if(f||(v=i("textinfo",Array.isArray(c)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),f||v&&v!=="none"){var g=i("textposition");bBt(t,r,a,i,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else v==="none"&&i("textposition","none");_Bt(r,a,i);var p=i("title.text");p&&(i("title.position"),PPe.coerceFont(i,"title.font",a.font)),i("aspectratio"),i("baseratio")}});var IPe=fe((L3r,RPe)=>{"use strict";var ABt=Xt(),MBt=cY();RPe.exports=function(t,r){function n(a,i){return ABt.coerce(t,r,MBt,a,i)}n("hiddenlabels"),n("funnelareacolorway",r.colorway),n("extendfunnelareacolors")}});var fY=fe((P3r,qPe)=>{"use strict";var zPe=Lw();function SBt(e,t){return zPe.calc(e,t)}function EBt(e){zPe.crossTraceCalc(e,{type:"funnelarea"})}qPe.exports={calc:SBt,crossTraceCalc:EBt}});var VPe=fe((F3r,UPe)=>{"use strict";var r_=xi(),hY=ea(),py=Xt(),kBt=py.strScale,BPe=py.strTranslate,OPe=as(),CBt=m2(),LBt=CBt.toMoveInsideBar,NPe=kh(),PBt=NPe.recordMinTextSize,FBt=NPe.clearMinTextSize,DBt=Sm(),Zw=R9(),RBt=Zw.attachFxHandlers,IBt=Zw.determineInsideTextFont,zBt=Zw.layoutAreas,qBt=Zw.prerenderTitles,BBt=Zw.positionTitleOutside,OBt=Zw.formatSliceLabel;UPe.exports=function(t,r){var n=t._context.staticPlot,a=t._fullLayout;FBt("funnelarea",a),qBt(r,t),zBt(r,a._size),py.makeTraceGroups(a._funnelarealayer,r,"trace").each(function(i){var o=r_.select(this),s=i[0],l=s.trace;UBt(i),o.each(function(){var u=r_.select(this).selectAll("g.slice").data(i);u.enter().append("g").classed("slice",!0),u.exit().remove(),u.each(function(f,v){if(f.hidden){r_.select(this).selectAll("path,g").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var g=s.cx,p=s.cy,x=r_.select(this),_=x.selectAll("path.surface").data([f]);_.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),x.call(RBt,t,i);var y="M"+(g+f.TR[0])+","+(p+f.TR[1])+dY(f.TR,f.BR)+dY(f.BR,f.BL)+dY(f.BL,f.TL)+"Z";_.attr("d",y),OBt(t,f,s);var C=DBt.castOption(l.textposition,f.pts),k=x.selectAll("g.slicetext").data(f.text&&C!=="none"?[0]:[]);k.enter().append("g").classed("slicetext",!0),k.exit().remove(),k.each(function(){var S=py.ensureSingle(r_.select(this),"text","",function(I){I.attr("data-notex",1)}),L=py.ensureUniformFontSize(t,IBt(l,f,a.font));S.text(f.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(hY.font,L).call(OPe.convertToTspans,t);var w=hY.bBox(S.node()),A,T,m,F=Math.min(f.BL[1],f.BR[1])+p,E=Math.max(f.TL[1],f.TR[1])+p;T=Math.max(f.TL[0],f.BL[0])+g,m=Math.min(f.TR[0],f.BR[0])+g,A=LBt(T,m,F,E,w,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),A.fontSize=L.size,PBt(l.type,A,a),i[v].transform=A,py.setTransormAndDisplay(S,A)})});var c=r_.select(this).selectAll("g.titletext").data(l.title.text?[0]:[]);c.enter().append("g").classed("titletext",!0),c.exit().remove(),c.each(function(){var f=py.ensureSingle(r_.select(this),"text","",function(p){p.attr("data-notex",1)}),v=l.title.text;l._meta&&(v=py.templateString(v,l._meta)),f.text(v).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(hY.font,l.title.font).call(OPe.convertToTspans,t);var g=BBt(s,a._size);f.attr("transform",BPe(g.x,g.y)+kBt(Math.min(1,g.scale))+BPe(g.tx,g.ty))})})})};function dY(e,t){var r=t[0]-e[0],n=t[1]-e[1];return"l"+r+","+n}function NBt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function UBt(e){if(!e.length)return;var t=e[0],r=t.trace,n=r.aspectratio,a=r.baseratio;a>.999&&(a=.999);var i=Math.pow(a,2),o=t.vTotal,s=o*i/(1-i),l=o,u=s/o;function c(){var R=Math.sqrt(u);return{x:R,y:-R}}function f(){var R=c();return[R.x,R.y]}var v,g=[];g.push(f());var p,x;for(p=e.length-1;p>-1;p--)if(x=e[p],!x.hidden){var _=x.v/l;u+=_,g.push(f())}var y=1/0,C=-1/0;for(p=0;p-1;p--)if(x=e[p],!x.hidden){F+=1;var E=g[F][0],I=g[F][1];x.TL=[-E,I],x.TR=[E,I],x.BL=T,x.BR=m,x.pxmid=NBt(x.TR,x.BR),T=x.TL,m=x.TR}}});var jPe=fe((D3r,HPe)=>{"use strict";var GPe=xi(),VBt=Jb(),GBt=kh().resizeText;HPe.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");GBt(t,r,"funnelarea"),r.each(function(n){var a=n[0],i=a.trace,o=GPe.select(this);o.style({opacity:i.opacity}),o.selectAll("path.surface").each(function(s){GPe.select(this).call(VBt,s,i,t)})})}});var YPe=fe((R3r,WPe)=>{"use strict";WPe.exports={moduleType:"trace",name:"funnelarea",basePlotModule:EPe(),categories:["pie-like","funnelarea","showLegend"],attributes:uY(),layoutAttributes:cY(),supplyDefaults:DPe(),supplyLayoutDefaults:IPe(),calc:fY().calc,crossTraceCalc:fY().crossTraceCalc,plot:VPe(),style:jPe(),styleOne:Jb(),meta:{}}});var ZPe=fe((I3r,XPe)=>{"use strict";XPe.exports=YPe()});var xf=fe((z3r,$Pe)=>{"use strict";(function(){var e={1964:(function(a,i,o){a.exports={alpha_shape:o(3502),convex_hull:o(7352),delaunay_triangulate:o(7642),gl_cone3d:o(6405),gl_error3d:o(9165),gl_line3d:o(5714),gl_mesh3d:o(7201),gl_plot3d:o(4100),gl_scatter3d:o(8418),gl_streamtube3d:o(7815),gl_surface3d:o(9499),ndarray:o(9618),ndarray_linear_interpolate:o(4317)}}),4793:(function(a,i,o){"use strict";var s;var l=o(7507),u=o(3778),c=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;i.hp=p,s=m,i.IS=50;var f=2147483647;s=f,p.TYPED_ARRAY_SUPPORT=v(),!p.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&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 v(){try{var qe=new Uint8Array(1),we={foo:function(){return 42}};return Object.setPrototypeOf(we,Uint8Array.prototype),Object.setPrototypeOf(qe,we),qe.foo()===42}catch(Le){return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function g(qe){if(qe>f)throw new RangeError('The value "'+qe+'" is invalid for option "size"');var we=new Uint8Array(qe);return Object.setPrototypeOf(we,p.prototype),we}function p(qe,we,Le){if(typeof qe=="number"){if(typeof we=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return C(qe)}return x(qe,we,Le)}p.poolSize=8192;function x(qe,we,Le){if(typeof qe=="string")return k(qe,we);if(ArrayBuffer.isView(qe))return L(qe);if(qe==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof qe);if(ze(qe,ArrayBuffer)||qe&&ze(qe.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ze(qe,SharedArrayBuffer)||qe&&ze(qe.buffer,SharedArrayBuffer)))return w(qe,we,Le);if(typeof qe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Ke=qe.valueOf&&qe.valueOf();if(Ke!=null&&Ke!==qe)return p.from(Ke,we,Le);var Te=A(qe);if(Te)return Te;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof qe[Symbol.toPrimitive]=="function")return p.from(qe[Symbol.toPrimitive]("string"),we,Le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof qe)}p.from=function(qe,we,Le){return x(qe,we,Le)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function _(qe){if(typeof qe!="number")throw new TypeError('"size" argument must be of type number');if(qe<0)throw new RangeError('The value "'+qe+'" is invalid for option "size"')}function y(qe,we,Le){return _(qe),qe<=0?g(qe):we!==void 0?typeof Le=="string"?g(qe).fill(we,Le):g(qe).fill(we):g(qe)}p.alloc=function(qe,we,Le){return y(qe,we,Le)};function C(qe){return _(qe),g(qe<0?0:T(qe)|0)}p.allocUnsafe=function(qe){return C(qe)},p.allocUnsafeSlow=function(qe){return C(qe)};function k(qe,we){if((typeof we!="string"||we==="")&&(we="utf8"),!p.isEncoding(we))throw new TypeError("Unknown encoding: "+we);var Le=F(qe,we)|0,Ke=g(Le),Te=Ke.write(qe,we);return Te!==Le&&(Ke=Ke.slice(0,Te)),Ke}function S(qe){for(var we=qe.length<0?0:T(qe.length)|0,Le=g(we),Ke=0;Ke=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return qe|0}function m(qe){return+qe!=qe&&(qe=0),p.alloc(+qe)}p.isBuffer=function(we){return we!=null&&we._isBuffer===!0&&we!==p.prototype},p.compare=function(we,Le){if(ze(we,Uint8Array)&&(we=p.from(we,we.offset,we.byteLength)),ze(Le,Uint8Array)&&(Le=p.from(Le,Le.offset,Le.byteLength)),!p.isBuffer(we)||!p.isBuffer(Le))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(we===Le)return 0;for(var Ke=we.length,Te=Le.length,Ve=0,$e=Math.min(Ke,Te);Ve<$e;++Ve)if(we[Ve]!==Le[Ve]){Ke=we[Ve],Te=Le[Ve];break}return KeTe.length?p.from($e).copy(Te,Ve):Uint8Array.prototype.set.call(Te,$e,Ve);else if(p.isBuffer($e))$e.copy(Te,Ve);else throw new TypeError('"list" argument must be an Array of Buffers');Ve+=$e.length}return Te};function F(qe,we){if(p.isBuffer(qe))return qe.length;if(ArrayBuffer.isView(qe)||ze(qe,ArrayBuffer))return qe.byteLength;if(typeof qe!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof qe);var Le=qe.length,Ke=arguments.length>2&&arguments[2]===!0;if(!Ke&&Le===0)return 0;for(var Te=!1;;)switch(we){case"ascii":case"latin1":case"binary":return Le;case"utf8":case"utf-8":return De(qe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Le*2;case"hex":return Le>>>1;case"base64":return it(qe).length;default:if(Te)return Ke?-1:De(qe).length;we=(""+we).toLowerCase(),Te=!0}}p.byteLength=F;function E(qe,we,Le){var Ke=!1;if((we===void 0||we<0)&&(we=0),we>this.length||((Le===void 0||Le>this.length)&&(Le=this.length),Le<=0)||(Le>>>=0,we>>>=0,Le<=we))return"";for(qe||(qe="utf8");;)switch(qe){case"hex":return K(this,we,Le);case"utf8":case"utf-8":return ee(this,we,Le);case"ascii":return xe(this,we,Le);case"latin1":case"binary":return ue(this,we,Le);case"base64":return J(this,we,Le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _e(this,we,Le);default:if(Ke)throw new TypeError("Unknown encoding: "+qe);qe=(qe+"").toLowerCase(),Ke=!0}}p.prototype._isBuffer=!0;function I(qe,we,Le){var Ke=qe[we];qe[we]=qe[Le],qe[Le]=Ke}p.prototype.swap16=function(){var we=this.length;if(we%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Le=0;LeLe&&(we+=" ... "),""},c&&(p.prototype[c]=p.prototype.inspect),p.prototype.compare=function(we,Le,Ke,Te,Ve){if(ze(we,Uint8Array)&&(we=p.from(we,we.offset,we.byteLength)),!p.isBuffer(we))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof we);if(Le===void 0&&(Le=0),Ke===void 0&&(Ke=we?we.length:0),Te===void 0&&(Te=0),Ve===void 0&&(Ve=this.length),Le<0||Ke>we.length||Te<0||Ve>this.length)throw new RangeError("out of range index");if(Te>=Ve&&Le>=Ke)return 0;if(Te>=Ve)return-1;if(Le>=Ke)return 1;if(Le>>>=0,Ke>>>=0,Te>>>=0,Ve>>>=0,this===we)return 0;for(var $e=Ve-Te,ot=Ke-Le,tt=Math.min($e,ot),nt=this.slice(Te,Ve),We=we.slice(Le,Ke),mt=0;mt2147483647?Le=2147483647:Le<-2147483648&&(Le=-2147483648),Le=+Le,ct(Le)&&(Le=Te?0:qe.length-1),Le<0&&(Le=qe.length+Le),Le>=qe.length){if(Te)return-1;Le=qe.length-1}else if(Le<0)if(Te)Le=0;else return-1;if(typeof we=="string"&&(we=p.from(we,Ke)),p.isBuffer(we))return we.length===0?-1:B(qe,we,Le,Ke,Te);if(typeof we=="number")return we=we&255,typeof Uint8Array.prototype.indexOf=="function"?Te?Uint8Array.prototype.indexOf.call(qe,we,Le):Uint8Array.prototype.lastIndexOf.call(qe,we,Le):B(qe,[we],Le,Ke,Te);throw new TypeError("val must be string, number or Buffer")}function B(qe,we,Le,Ke,Te){var Ve=1,$e=qe.length,ot=we.length;if(Ke!==void 0&&(Ke=String(Ke).toLowerCase(),Ke==="ucs2"||Ke==="ucs-2"||Ke==="utf16le"||Ke==="utf-16le")){if(qe.length<2||we.length<2)return-1;Ve=2,$e/=2,ot/=2,Le/=2}function tt(Yt,jt){return Ve===1?Yt[jt]:Yt.readUInt16BE(jt*Ve)}var nt;if(Te){var We=-1;for(nt=Le;nt<$e;nt++)if(tt(qe,nt)===tt(we,We===-1?0:nt-We)){if(We===-1&&(We=nt),nt-We+1===ot)return We*Ve}else We!==-1&&(nt-=nt-We),We=-1}else for(Le+ot>$e&&(Le=$e-ot),nt=Le;nt>=0;nt--){for(var mt=!0,bt=0;btTe&&(Ke=Te)):Ke=Te;var Ve=we.length;Ke>Ve/2&&(Ke=Ve/2);for(var $e=0;$e>>0,isFinite(Ke)?(Ke=Ke>>>0,Te===void 0&&(Te="utf8")):(Te=Ke,Ke=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ve=this.length-Le;if((Ke===void 0||Ke>Ve)&&(Ke=Ve),we.length>0&&(Ke<0||Le<0)||Le>this.length)throw new RangeError("Attempt to write outside buffer bounds");Te||(Te="utf8");for(var $e=!1;;)switch(Te){case"hex":return O(this,we,Le,Ke);case"utf8":case"utf-8":return V(this,we,Le,Ke);case"ascii":case"latin1":case"binary":return j(this,we,Le,Ke);case"base64":return q(this,we,Le,Ke);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,we,Le,Ke);default:if($e)throw new TypeError("Unknown encoding: "+Te);Te=(""+Te).toLowerCase(),$e=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(qe,we,Le){return we===0&&Le===qe.length?l.fromByteArray(qe):l.fromByteArray(qe.slice(we,Le))}function ee(qe,we,Le){Le=Math.min(qe.length,Le);for(var Ke=[],Te=we;Te239?4:Ve>223?3:Ve>191?2:1;if(Te+ot<=Le){var tt,nt,We,mt;switch(ot){case 1:Ve<128&&($e=Ve);break;case 2:tt=qe[Te+1],(tt&192)===128&&(mt=(Ve&31)<<6|tt&63,mt>127&&($e=mt));break;case 3:tt=qe[Te+1],nt=qe[Te+2],(tt&192)===128&&(nt&192)===128&&(mt=(Ve&15)<<12|(tt&63)<<6|nt&63,mt>2047&&(mt<55296||mt>57343)&&($e=mt));break;case 4:tt=qe[Te+1],nt=qe[Te+2],We=qe[Te+3],(tt&192)===128&&(nt&192)===128&&(We&192)===128&&(mt=(Ve&15)<<18|(tt&63)<<12|(nt&63)<<6|We&63,mt>65535&&mt<1114112&&($e=mt))}}$e===null?($e=65533,ot=1):$e>65535&&($e-=65536,Ke.push($e>>>10&1023|55296),$e=56320|$e&1023),Ke.push($e),Te+=ot}return ye(Ke)}var ce=4096;function ye(qe){var we=qe.length;if(we<=ce)return String.fromCharCode.apply(String,qe);for(var Le="",Ke=0;KeKe)&&(Le=Ke);for(var Te="",Ve=we;VeKe&&(we=Ke),Le<0?(Le+=Ke,Le<0&&(Le=0)):Le>Ke&&(Le=Ke),LeLe)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(we,Le,Ke){we=we>>>0,Le=Le>>>0,Ke||ne(we,Le,this.length);for(var Te=this[we],Ve=1,$e=0;++$e>>0,Le=Le>>>0,Ke||ne(we,Le,this.length);for(var Te=this[we+--Le],Ve=1;Le>0&&(Ve*=256);)Te+=this[we+--Le]*Ve;return Te},p.prototype.readUint8=p.prototype.readUInt8=function(we,Le){return we=we>>>0,Le||ne(we,1,this.length),this[we]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(we,Le){return we=we>>>0,Le||ne(we,2,this.length),this[we]|this[we+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(we,Le){return we=we>>>0,Le||ne(we,2,this.length),this[we]<<8|this[we+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),(this[we]|this[we+1]<<8|this[we+2]<<16)+this[we+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),this[we]*16777216+(this[we+1]<<16|this[we+2]<<8|this[we+3])},p.prototype.readIntLE=function(we,Le,Ke){we=we>>>0,Le=Le>>>0,Ke||ne(we,Le,this.length);for(var Te=this[we],Ve=1,$e=0;++$e=Ve&&(Te-=Math.pow(2,8*Le)),Te},p.prototype.readIntBE=function(we,Le,Ke){we=we>>>0,Le=Le>>>0,Ke||ne(we,Le,this.length);for(var Te=Le,Ve=1,$e=this[we+--Te];Te>0&&(Ve*=256);)$e+=this[we+--Te]*Ve;return Ve*=128,$e>=Ve&&($e-=Math.pow(2,8*Le)),$e},p.prototype.readInt8=function(we,Le){return we=we>>>0,Le||ne(we,1,this.length),this[we]&128?(255-this[we]+1)*-1:this[we]},p.prototype.readInt16LE=function(we,Le){we=we>>>0,Le||ne(we,2,this.length);var Ke=this[we]|this[we+1]<<8;return Ke&32768?Ke|4294901760:Ke},p.prototype.readInt16BE=function(we,Le){we=we>>>0,Le||ne(we,2,this.length);var Ke=this[we+1]|this[we]<<8;return Ke&32768?Ke|4294901760:Ke},p.prototype.readInt32LE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),this[we]|this[we+1]<<8|this[we+2]<<16|this[we+3]<<24},p.prototype.readInt32BE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),this[we]<<24|this[we+1]<<16|this[we+2]<<8|this[we+3]},p.prototype.readFloatLE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),u.read(this,we,!0,23,4)},p.prototype.readFloatBE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),u.read(this,we,!1,23,4)},p.prototype.readDoubleLE=function(we,Le){return we=we>>>0,Le||ne(we,8,this.length),u.read(this,we,!0,52,8)},p.prototype.readDoubleBE=function(we,Le){return we=we>>>0,Le||ne(we,8,this.length),u.read(this,we,!1,52,8)};function ae(qe,we,Le,Ke,Te,Ve){if(!p.isBuffer(qe))throw new TypeError('"buffer" argument must be a Buffer instance');if(we>Te||weqe.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(we,Le,Ke,Te){if(we=+we,Le=Le>>>0,Ke=Ke>>>0,!Te){var Ve=Math.pow(2,8*Ke)-1;ae(this,we,Le,Ke,Ve,0)}var $e=1,ot=0;for(this[Le]=we&255;++ot>>0,Ke=Ke>>>0,!Te){var Ve=Math.pow(2,8*Ke)-1;ae(this,we,Le,Ke,Ve,0)}var $e=Ke-1,ot=1;for(this[Le+$e]=we&255;--$e>=0&&(ot*=256);)this[Le+$e]=we/ot&255;return Le+Ke},p.prototype.writeUint8=p.prototype.writeUInt8=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,1,255,0),this[Le]=we&255,Le+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,2,65535,0),this[Le]=we&255,this[Le+1]=we>>>8,Le+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,2,65535,0),this[Le]=we>>>8,this[Le+1]=we&255,Le+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,4,4294967295,0),this[Le+3]=we>>>24,this[Le+2]=we>>>16,this[Le+1]=we>>>8,this[Le]=we&255,Le+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,4,4294967295,0),this[Le]=we>>>24,this[Le+1]=we>>>16,this[Le+2]=we>>>8,this[Le+3]=we&255,Le+4},p.prototype.writeIntLE=function(we,Le,Ke,Te){if(we=+we,Le=Le>>>0,!Te){var Ve=Math.pow(2,8*Ke-1);ae(this,we,Le,Ke,Ve-1,-Ve)}var $e=0,ot=1,tt=0;for(this[Le]=we&255;++$e>0)-tt&255;return Le+Ke},p.prototype.writeIntBE=function(we,Le,Ke,Te){if(we=+we,Le=Le>>>0,!Te){var Ve=Math.pow(2,8*Ke-1);ae(this,we,Le,Ke,Ve-1,-Ve)}var $e=Ke-1,ot=1,tt=0;for(this[Le+$e]=we&255;--$e>=0&&(ot*=256);)we<0&&tt===0&&this[Le+$e+1]!==0&&(tt=1),this[Le+$e]=(we/ot>>0)-tt&255;return Le+Ke},p.prototype.writeInt8=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,1,127,-128),we<0&&(we=255+we+1),this[Le]=we&255,Le+1},p.prototype.writeInt16LE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,2,32767,-32768),this[Le]=we&255,this[Le+1]=we>>>8,Le+2},p.prototype.writeInt16BE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,2,32767,-32768),this[Le]=we>>>8,this[Le+1]=we&255,Le+2},p.prototype.writeInt32LE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,4,2147483647,-2147483648),this[Le]=we&255,this[Le+1]=we>>>8,this[Le+2]=we>>>16,this[Le+3]=we>>>24,Le+4},p.prototype.writeInt32BE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,4,2147483647,-2147483648),we<0&&(we=4294967295+we+1),this[Le]=we>>>24,this[Le+1]=we>>>16,this[Le+2]=we>>>8,this[Le+3]=we&255,Le+4};function pe(qe,we,Le,Ke,Te,Ve){if(Le+Ke>qe.length)throw new RangeError("Index out of range");if(Le<0)throw new RangeError("Index out of range")}function ie(qe,we,Le,Ke,Te){return we=+we,Le=Le>>>0,Te||pe(qe,we,Le,4,34028234663852886e22,-34028234663852886e22),u.write(qe,we,Le,Ke,23,4),Le+4}p.prototype.writeFloatLE=function(we,Le,Ke){return ie(this,we,Le,!0,Ke)},p.prototype.writeFloatBE=function(we,Le,Ke){return ie(this,we,Le,!1,Ke)};function le(qe,we,Le,Ke,Te){return we=+we,Le=Le>>>0,Te||pe(qe,we,Le,8,17976931348623157e292,-17976931348623157e292),u.write(qe,we,Le,Ke,52,8),Le+8}p.prototype.writeDoubleLE=function(we,Le,Ke){return le(this,we,Le,!0,Ke)},p.prototype.writeDoubleBE=function(we,Le,Ke){return le(this,we,Le,!1,Ke)},p.prototype.copy=function(we,Le,Ke,Te){if(!p.isBuffer(we))throw new TypeError("argument should be a Buffer");if(Ke||(Ke=0),!Te&&Te!==0&&(Te=this.length),Le>=we.length&&(Le=we.length),Le||(Le=0),Te>0&&Te=this.length)throw new RangeError("Index out of range");if(Te<0)throw new RangeError("sourceEnd out of bounds");Te>this.length&&(Te=this.length),we.length-Le>>0,Ke=Ke===void 0?this.length:Ke>>>0,we||(we=0);var $e;if(typeof we=="number")for($e=Le;$e55295&&Le<57344){if(!Te){if(Le>56319){(we-=3)>-1&&Ve.push(239,191,189);continue}else if($e+1===Ke){(we-=3)>-1&&Ve.push(239,191,189);continue}Te=Le;continue}if(Le<56320){(we-=3)>-1&&Ve.push(239,191,189),Te=Le;continue}Le=(Te-55296<<10|Le-56320)+65536}else Te&&(we-=3)>-1&&Ve.push(239,191,189);if(Te=null,Le<128){if((we-=1)<0)break;Ve.push(Le)}else if(Le<2048){if((we-=2)<0)break;Ve.push(Le>>6|192,Le&63|128)}else if(Le<65536){if((we-=3)<0)break;Ve.push(Le>>12|224,Le>>6&63|128,Le&63|128)}else if(Le<1114112){if((we-=4)<0)break;Ve.push(Le>>18|240,Le>>12&63|128,Le>>6&63|128,Le&63|128)}else throw new Error("Invalid code point")}return Ve}function Ge(qe){for(var we=[],Le=0;Le>8,Te=Le%256,Ve.push(Te),Ve.push(Ke);return Ve}function it(qe){return l.toByteArray(be(qe))}function Oe(qe,we,Le,Ke){for(var Te=0;Te=we.length||Te>=qe.length);++Te)we[Te+Le]=qe[Te];return Te}function ze(qe,we){return qe instanceof we||qe!=null&&qe.constructor!=null&&qe.constructor.name!=null&&qe.constructor.name===we.name}function ct(qe){return qe!==qe}var et=(function(){for(var qe="0123456789abcdef",we=new Array(256),Le=0;Le<16;++Le)for(var Ke=Le*16,Te=0;Te<16;++Te)we[Ke+Te]=qe[Le]+qe[Te];return we})()}),9216:(function(a){"use strict";a.exports=l,a.exports.isMobile=l,a.exports.default=l;let i=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,o=/CrOS/,s=/android|ipad|playbook|silk/i;function l(u){u||(u={});let c=u.ua;if(!c&&typeof navigator!="undefined"&&(c=navigator.userAgent),c&&c.headers&&typeof c.headers["user-agent"]=="string"&&(c=c.headers["user-agent"]),typeof c!="string")return!1;let f=i.test(c)&&!o.test(c)||!!u.tablet&&s.test(c);return!f&&u.tablet&&u.featureDetect&&navigator&&navigator.maxTouchPoints>1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(f=!0),f}}),6296:(function(a,i,o){"use strict";a.exports=v;var s=o(7261),l=o(9977),u=o(1811);function c(g,p){this._controllerNames=Object.keys(g),this._controllerList=this._controllerNames.map(function(x){return g[x]}),this._mode=p,this._active=g[p],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 f=c.prototype;f.flush=function(g){for(var p=this._controllerList,x=0;x0)throw new Error("Invalid string. Length must be a multiple of 4");var L=k.indexOf("=");L===-1&&(L=S);var w=L===S?0:4-L%4;return[L,w]}function g(k){var S=v(k),L=S[0],w=S[1];return(L+w)*3/4-w}function p(k,S,L){return(S+L)*3/4-L}function x(k){var S,L=v(k),w=L[0],A=L[1],T=new l(p(k,w,A)),m=0,F=A>0?w-4:w,E;for(E=0;E>16&255,T[m++]=S>>8&255,T[m++]=S&255;return A===2&&(S=s[k.charCodeAt(E)]<<2|s[k.charCodeAt(E+1)]>>4,T[m++]=S&255),A===1&&(S=s[k.charCodeAt(E)]<<10|s[k.charCodeAt(E+1)]<<4|s[k.charCodeAt(E+2)]>>2,T[m++]=S>>8&255,T[m++]=S&255),T}function _(k){return o[k>>18&63]+o[k>>12&63]+o[k>>6&63]+o[k&63]}function y(k,S,L){for(var w,A=[],T=S;TF?F:m+T));return w===1?(S=k[L-1],A.push(o[S>>2]+o[S<<4&63]+"==")):w===2&&(S=(k[L-2]<<8)+k[L-1],A.push(o[S>>10]+o[S>>4&63]+o[S<<2&63]+"=")),A.join("")}}),3865:(function(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[1]).add(c[0].mul(u[1])),u[1].mul(c[1]))}}),1318:(function(a){"use strict";a.exports=i;function i(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}}),8697:(function(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}}),7842:(function(a,i,o){"use strict";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),v=o(8697);a.exports=g;function g(p,x){if(s(p))return x?v(p,g(x)):[p[0].clone(),p[1].clone()];var _=0,y,C;if(l(p))y=p.clone();else if(typeof p=="string")y=c(p);else{if(p===0)return[u(0),u(1)];if(p===Math.floor(p))y=u(p);else{for(;p!==Math.floor(p);)p=p*Math.pow(2,256),_-=256;y=u(p)}}if(s(x))y.mul(x[1]),C=x[0].clone();else if(l(x))C=x.clone();else if(typeof x=="string")C=c(x);else if(!x)C=u(1);else if(x===Math.floor(x))C=u(x);else{for(;x!==Math.floor(x);)x=x*Math.pow(2,256),_+=256;C=u(x)}return _>0?y=y.ushln(_):_<0&&(C=C.ushln(-_)),f(y,C)}}),6330:(function(a,i,o){"use strict";var s=o(1533);a.exports=l;function l(u){return Array.isArray(u)&&u.length===2&&s(u[0])&&s(u[1])}}),5716:(function(a,i,o){"use strict";var s=o(6859);a.exports=l;function l(u){return u.cmp(new s(0))}}),1369:(function(a,i,o){"use strict";var s=o(5716);a.exports=l;function l(u){var c=u.length,f=u.words,v=0;if(c===1)v=f[0];else if(c===2)v=f[0]+f[1]*67108864;else for(var g=0;g20?52:v+32}}),1533:(function(a,i,o){"use strict";var s=o(6859);a.exports=l;function l(u){return u&&typeof u=="object"&&!!u.words}}),2651:(function(a,i,o){"use strict";var s=o(6859),l=o(2361);a.exports=u;function u(c){var f=l.exponent(c);return f<52?new s(c):new s(c*Math.pow(2,52-f)).ushln(f-52)}}),869:(function(a,i,o){"use strict";var s=o(2651),l=o(5716);a.exports=u;function u(c,f){var v=l(c),g=l(f);if(v===0)return[s(0),s(1)];if(g===0)return[s(0),s(0)];g<0&&(c=c.neg(),f=f.neg());var p=c.gcd(f);return p.cmpn(1)?[c.div(p),f.div(p)]:[c,f]}}),6768:(function(a,i,o){"use strict";var s=o(6859);a.exports=l;function l(u){return new s(u)}}),6504:(function(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[0]),u[1].mul(c[1]))}}),7721:(function(a,i,o){"use strict";var s=o(5716);a.exports=l;function l(u){return s(u[0])*s(u[1])}}),5572:(function(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[1]).sub(u[1].mul(c[0])),u[1].mul(c[1]))}}),946:(function(a,i,o){"use strict";var s=o(1369),l=o(4025);a.exports=u;function u(c){var f=c[0],v=c[1];if(f.cmpn(0)===0)return 0;var g=f.abs().divmod(v.abs()),p=g.div,x=s(p),_=g.mod,y=f.negative!==v.negative?-1:1;if(_.cmpn(0)===0)return y*x;if(x){var C=l(x)+4,k=s(_.ushln(C).divRound(v));return y*(x+k*Math.pow(2,-C))}else{var S=v.bitLength()-_.bitLength()+53,k=s(_.ushln(S).divRound(v));return S<1023?y*k*Math.pow(2,-S):(k*=Math.pow(2,-1023),y*k*Math.pow(2,1023-S))}}}),2478:(function(a){"use strict";function i(f,v,g,p,x){for(var _=x+1;p<=x;){var y=p+x>>>1,C=f[y],k=g!==void 0?g(C,v):C-v;k>=0?(_=y,x=y-1):p=y+1}return _}function o(f,v,g,p,x){for(var _=x+1;p<=x;){var y=p+x>>>1,C=f[y],k=g!==void 0?g(C,v):C-v;k>0?(_=y,x=y-1):p=y+1}return _}function s(f,v,g,p,x){for(var _=p-1;p<=x;){var y=p+x>>>1,C=f[y],k=g!==void 0?g(C,v):C-v;k<0?(_=y,p=y+1):x=y-1}return _}function l(f,v,g,p,x){for(var _=p-1;p<=x;){var y=p+x>>>1,C=f[y],k=g!==void 0?g(C,v):C-v;k<=0?(_=y,p=y+1):x=y-1}return _}function u(f,v,g,p,x){for(;p<=x;){var _=p+x>>>1,y=f[_],C=g!==void 0?g(y,v):y-v;if(C===0)return _;C<=0?p=_+1:x=_-1}return-1}function c(f,v,g,p,x,_){return typeof g=="function"?_(f,v,g,p===void 0?0:p|0,x===void 0?f.length-1:x|0):_(f,v,void 0,g===void 0?0:g|0,p===void 0?f.length-1:p|0)}a.exports={ge:function(f,v,g,p,x){return c(f,v,g,p,x,i)},gt:function(f,v,g,p,x){return c(f,v,g,p,x,o)},lt:function(f,v,g,p,x){return c(f,v,g,p,x,s)},le:function(f,v,g,p,x){return c(f,v,g,p,x,l)},eq:function(f,v,g,p,x){return c(f,v,g,p,x,u)}}}),8828:(function(a,i){"use strict";"use restrict";var o=32;i.INT_BITS=o,i.INT_MAX=2147483647,i.INT_MIN=-1<0)-(u<0)},i.abs=function(u){var c=u>>o-1;return(u^c)-c},i.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},i.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},i.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}i.countTrailingZeros=s,i.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},i.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},i.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,v=c,g=7;for(f>>>=1;f;f>>>=1)v<<=1,v|=f&1,--g;u[c]=v<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},i.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},i.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},i.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},i.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},i.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}}),6859:(function(a,i,o){a=o.nmd(a),(function(s,l){"use strict";function u(j,q){if(!j)throw new Error(q||"Assertion failed")}function c(j,q){j.super_=q;var U=function(){};U.prototype=q.prototype,j.prototype=new U,j.prototype.constructor=j}function f(j,q,U){if(f.isBN(j))return j;this.negative=0,this.words=null,this.length=0,this.red=null,j!==null&&((q==="le"||q==="be")&&(U=q,q=10),this._init(j||0,q||10,U||"be"))}typeof s=="object"?s.exports=f:l.BN=f,f.BN=f,f.wordSize=26;var v;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?v=window.Buffer:v=o(7790).Buffer}catch(j){}f.isBN=function(q){return q instanceof f?!0:q!==null&&typeof q=="object"&&q.constructor.wordSize===f.wordSize&&Array.isArray(q.words)},f.max=function(q,U){return q.cmp(U)>0?q:U},f.min=function(q,U){return q.cmp(U)<0?q:U},f.prototype._init=function(q,U,J){if(typeof q=="number")return this._initNumber(q,U,J);if(typeof q=="object")return this._initArray(q,U,J);U==="hex"&&(U=16),u(U===(U|0)&&U>=2&&U<=36),q=q.toString().replace(/\s+/g,"");var ee=0;q[0]==="-"&&(ee++,this.negative=1),ee=0;ee-=3)ye=q[ee]|q[ee-1]<<8|q[ee-2]<<16,this.words[ce]|=ye<>>26-xe&67108863,xe+=24,xe>=26&&(xe-=26,ce++);else if(J==="le")for(ee=0,ce=0;ee>>26-xe&67108863,xe+=24,xe>=26&&(xe-=26,ce++);return this.strip()};function g(j,q){var U=j.charCodeAt(q);return U>=65&&U<=70?U-55:U>=97&&U<=102?U-87:U-48&15}function p(j,q,U){var J=g(j,U);return U-1>=q&&(J|=g(j,U-1)<<4),J}f.prototype._parseHex=function(q,U,J){this.length=Math.ceil((q.length-U)/6),this.words=new Array(this.length);for(var ee=0;ee=U;ee-=2)xe=p(q,U,ee)<=18?(ce-=18,ye+=1,this.words[ye]|=xe>>>26):ce+=8;else{var ue=q.length-U;for(ee=ue%2===0?U+1:U;ee=18?(ce-=18,ye+=1,this.words[ye]|=xe>>>26):ce+=8}this.strip()};function x(j,q,U,J){for(var ee=0,ce=Math.min(j.length,U),ye=q;ye=49?ee+=xe-49+10:xe>=17?ee+=xe-17+10:ee+=xe}return ee}f.prototype._parseBase=function(q,U,J){this.words=[0],this.length=1;for(var ee=0,ce=1;ce<=67108863;ce*=U)ee++;ee--,ce=ce/U|0;for(var ye=q.length-J,xe=ye%ee,ue=Math.min(ye,ye-xe)+J,K=0,_e=J;_e1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.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"],y=[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],C=[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];f.prototype.toString=function(q,U){q=q||10,U=U|0||1;var J;if(q===16||q==="hex"){J="";for(var ee=0,ce=0,ye=0;ye>>24-ee&16777215,ee+=2,ee>=26&&(ee-=26,ye--),ce!==0||ye!==this.length-1?J=_[6-ue.length]+ue+J:J=ue+J}for(ce!==0&&(J=ce.toString(16)+J);J.length%U!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}if(q===(q|0)&&q>=2&&q<=36){var K=y[q],_e=C[q];J="";var ne=this.clone();for(ne.negative=0;!ne.isZero();){var ae=ne.modn(_e).toString(q);ne=ne.idivn(_e),ne.isZero()?J=ae+J:J=_[K-ae.length]+ae+J}for(this.isZero()&&(J="0"+J);J.length%U!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}u(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var q=this.words[0];return this.length===2?q+=this.words[1]*67108864:this.length===3&&this.words[2]===1?q+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-q:q},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(q,U){return u(typeof v!="undefined"),this.toArrayLike(v,q,U)},f.prototype.toArray=function(q,U){return this.toArrayLike(Array,q,U)},f.prototype.toArrayLike=function(q,U,J){var ee=this.byteLength(),ce=J||Math.max(1,ee);u(ee<=ce,"byte array longer than desired length"),u(ce>0,"Requested array length <= 0"),this.strip();var ye=U==="le",xe=new q(ce),ue,K,_e=this.clone();if(ye){for(K=0;!_e.isZero();K++)ue=_e.andln(255),_e.iushrn(8),xe[K]=ue;for(;K=4096&&(J+=13,U>>>=13),U>=64&&(J+=7,U>>>=7),U>=8&&(J+=4,U>>>=4),U>=2&&(J+=2,U>>>=2),J+U},f.prototype._zeroBits=function(q){if(q===0)return 26;var U=q,J=0;return(U&8191)===0&&(J+=13,U>>>=13),(U&127)===0&&(J+=7,U>>>=7),(U&15)===0&&(J+=4,U>>>=4),(U&3)===0&&(J+=2,U>>>=2),(U&1)===0&&J++,J},f.prototype.bitLength=function(){var q=this.words[this.length-1],U=this._countBits(q);return(this.length-1)*26+U};function k(j){for(var q=new Array(j.bitLength()),U=0;U>>ee}return q}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var q=0,U=0;Uq.length?this.clone().ior(q):q.clone().ior(this)},f.prototype.uor=function(q){return this.length>q.length?this.clone().iuor(q):q.clone().iuor(this)},f.prototype.iuand=function(q){var U;this.length>q.length?U=q:U=this;for(var J=0;Jq.length?this.clone().iand(q):q.clone().iand(this)},f.prototype.uand=function(q){return this.length>q.length?this.clone().iuand(q):q.clone().iuand(this)},f.prototype.iuxor=function(q){var U,J;this.length>q.length?(U=this,J=q):(U=q,J=this);for(var ee=0;eeq.length?this.clone().ixor(q):q.clone().ixor(this)},f.prototype.uxor=function(q){return this.length>q.length?this.clone().iuxor(q):q.clone().iuxor(this)},f.prototype.inotn=function(q){u(typeof q=="number"&&q>=0);var U=Math.ceil(q/26)|0,J=q%26;this._expand(U),J>0&&U--;for(var ee=0;ee0&&(this.words[ee]=~this.words[ee]&67108863>>26-J),this.strip()},f.prototype.notn=function(q){return this.clone().inotn(q)},f.prototype.setn=function(q,U){u(typeof q=="number"&&q>=0);var J=q/26|0,ee=q%26;return this._expand(J+1),U?this.words[J]=this.words[J]|1<q.length?(J=this,ee=q):(J=q,ee=this);for(var ce=0,ye=0;ye>>26;for(;ce!==0&&ye>>26;if(this.length=J.length,ce!==0)this.words[this.length]=ce,this.length++;else if(J!==this)for(;yeq.length?this.clone().iadd(q):q.clone().iadd(this)},f.prototype.isub=function(q){if(q.negative!==0){q.negative=0;var U=this.iadd(q);return q.negative=1,U._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(q),this.negative=1,this._normSign();var J=this.cmp(q);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var ee,ce;J>0?(ee=this,ce=q):(ee=q,ce=this);for(var ye=0,xe=0;xe>26,this.words[xe]=U&67108863;for(;ye!==0&&xe>26,this.words[xe]=U&67108863;if(ye===0&&xe>>26,ne=ue&67108863,ae=Math.min(K,q.length-1),pe=Math.max(0,K-j.length+1);pe<=ae;pe++){var ie=K-pe|0;ee=j.words[ie]|0,ce=q.words[pe]|0,ye=ee*ce+ne,_e+=ye/67108864|0,ne=ye&67108863}U.words[K]=ne|0,ue=_e|0}return ue!==0?U.words[K]=ue|0:U.length--,U.strip()}var L=function(q,U,J){var ee=q.words,ce=U.words,ye=J.words,xe=0,ue,K,_e,ne=ee[0]|0,ae=ne&8191,pe=ne>>>13,ie=ee[1]|0,le=ie&8191,me=ie>>>13,be=ee[2]|0,De=be&8191,Ge=be>>>13,ht=ee[3]|0,it=ht&8191,Oe=ht>>>13,ze=ee[4]|0,ct=ze&8191,et=ze>>>13,qe=ee[5]|0,we=qe&8191,Le=qe>>>13,Ke=ee[6]|0,Te=Ke&8191,Ve=Ke>>>13,$e=ee[7]|0,ot=$e&8191,tt=$e>>>13,nt=ee[8]|0,We=nt&8191,mt=nt>>>13,bt=ee[9]|0,Yt=bt&8191,jt=bt>>>13,mr=ce[0]|0,or=mr&8191,fr=mr>>>13,Ot=ce[1]|0,cr=Ot&8191,Ct=Ot>>>13,wt=ce[2]|0,Tt=wt&8191,Mt=wt>>>13,Lt=ce[3]|0,ft=Lt&8191,kt=Lt>>>13,rr=ce[4]|0,pr=rr&8191,Kr=rr>>>13,Nr=ce[5]|0,dn=Nr&8191,xr=Nr>>>13,Fr=ce[6]|0,Zr=Fr&8191,Cn=Fr>>>13,Dt=ce[7]|0,At=Dt&8191,Vt=Dt>>>13,Qt=ce[8]|0,Ut=Qt&8191,_r=Qt>>>13,rn=ce[9]|0,Jr=rn&8191,qn=rn>>>13;J.negative=q.negative^U.negative,J.length=19,ue=Math.imul(ae,or),K=Math.imul(ae,fr),K=K+Math.imul(pe,or)|0,_e=Math.imul(pe,fr);var ri=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(ri>>>26)|0,ri&=67108863,ue=Math.imul(le,or),K=Math.imul(le,fr),K=K+Math.imul(me,or)|0,_e=Math.imul(me,fr),ue=ue+Math.imul(ae,cr)|0,K=K+Math.imul(ae,Ct)|0,K=K+Math.imul(pe,cr)|0,_e=_e+Math.imul(pe,Ct)|0;var Jn=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Jn>>>26)|0,Jn&=67108863,ue=Math.imul(De,or),K=Math.imul(De,fr),K=K+Math.imul(Ge,or)|0,_e=Math.imul(Ge,fr),ue=ue+Math.imul(le,cr)|0,K=K+Math.imul(le,Ct)|0,K=K+Math.imul(me,cr)|0,_e=_e+Math.imul(me,Ct)|0,ue=ue+Math.imul(ae,Tt)|0,K=K+Math.imul(ae,Mt)|0,K=K+Math.imul(pe,Tt)|0,_e=_e+Math.imul(pe,Mt)|0;var Ii=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,ue=Math.imul(it,or),K=Math.imul(it,fr),K=K+Math.imul(Oe,or)|0,_e=Math.imul(Oe,fr),ue=ue+Math.imul(De,cr)|0,K=K+Math.imul(De,Ct)|0,K=K+Math.imul(Ge,cr)|0,_e=_e+Math.imul(Ge,Ct)|0,ue=ue+Math.imul(le,Tt)|0,K=K+Math.imul(le,Mt)|0,K=K+Math.imul(me,Tt)|0,_e=_e+Math.imul(me,Mt)|0,ue=ue+Math.imul(ae,ft)|0,K=K+Math.imul(ae,kt)|0,K=K+Math.imul(pe,ft)|0,_e=_e+Math.imul(pe,kt)|0;var Vi=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,ue=Math.imul(ct,or),K=Math.imul(ct,fr),K=K+Math.imul(et,or)|0,_e=Math.imul(et,fr),ue=ue+Math.imul(it,cr)|0,K=K+Math.imul(it,Ct)|0,K=K+Math.imul(Oe,cr)|0,_e=_e+Math.imul(Oe,Ct)|0,ue=ue+Math.imul(De,Tt)|0,K=K+Math.imul(De,Mt)|0,K=K+Math.imul(Ge,Tt)|0,_e=_e+Math.imul(Ge,Mt)|0,ue=ue+Math.imul(le,ft)|0,K=K+Math.imul(le,kt)|0,K=K+Math.imul(me,ft)|0,_e=_e+Math.imul(me,kt)|0,ue=ue+Math.imul(ae,pr)|0,K=K+Math.imul(ae,Kr)|0,K=K+Math.imul(pe,pr)|0,_e=_e+Math.imul(pe,Kr)|0;var ra=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(ra>>>26)|0,ra&=67108863,ue=Math.imul(we,or),K=Math.imul(we,fr),K=K+Math.imul(Le,or)|0,_e=Math.imul(Le,fr),ue=ue+Math.imul(ct,cr)|0,K=K+Math.imul(ct,Ct)|0,K=K+Math.imul(et,cr)|0,_e=_e+Math.imul(et,Ct)|0,ue=ue+Math.imul(it,Tt)|0,K=K+Math.imul(it,Mt)|0,K=K+Math.imul(Oe,Tt)|0,_e=_e+Math.imul(Oe,Mt)|0,ue=ue+Math.imul(De,ft)|0,K=K+Math.imul(De,kt)|0,K=K+Math.imul(Ge,ft)|0,_e=_e+Math.imul(Ge,kt)|0,ue=ue+Math.imul(le,pr)|0,K=K+Math.imul(le,Kr)|0,K=K+Math.imul(me,pr)|0,_e=_e+Math.imul(me,Kr)|0,ue=ue+Math.imul(ae,dn)|0,K=K+Math.imul(ae,xr)|0,K=K+Math.imul(pe,dn)|0,_e=_e+Math.imul(pe,xr)|0;var ha=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(ha>>>26)|0,ha&=67108863,ue=Math.imul(Te,or),K=Math.imul(Te,fr),K=K+Math.imul(Ve,or)|0,_e=Math.imul(Ve,fr),ue=ue+Math.imul(we,cr)|0,K=K+Math.imul(we,Ct)|0,K=K+Math.imul(Le,cr)|0,_e=_e+Math.imul(Le,Ct)|0,ue=ue+Math.imul(ct,Tt)|0,K=K+Math.imul(ct,Mt)|0,K=K+Math.imul(et,Tt)|0,_e=_e+Math.imul(et,Mt)|0,ue=ue+Math.imul(it,ft)|0,K=K+Math.imul(it,kt)|0,K=K+Math.imul(Oe,ft)|0,_e=_e+Math.imul(Oe,kt)|0,ue=ue+Math.imul(De,pr)|0,K=K+Math.imul(De,Kr)|0,K=K+Math.imul(Ge,pr)|0,_e=_e+Math.imul(Ge,Kr)|0,ue=ue+Math.imul(le,dn)|0,K=K+Math.imul(le,xr)|0,K=K+Math.imul(me,dn)|0,_e=_e+Math.imul(me,xr)|0,ue=ue+Math.imul(ae,Zr)|0,K=K+Math.imul(ae,Cn)|0,K=K+Math.imul(pe,Zr)|0,_e=_e+Math.imul(pe,Cn)|0;var va=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(va>>>26)|0,va&=67108863,ue=Math.imul(ot,or),K=Math.imul(ot,fr),K=K+Math.imul(tt,or)|0,_e=Math.imul(tt,fr),ue=ue+Math.imul(Te,cr)|0,K=K+Math.imul(Te,Ct)|0,K=K+Math.imul(Ve,cr)|0,_e=_e+Math.imul(Ve,Ct)|0,ue=ue+Math.imul(we,Tt)|0,K=K+Math.imul(we,Mt)|0,K=K+Math.imul(Le,Tt)|0,_e=_e+Math.imul(Le,Mt)|0,ue=ue+Math.imul(ct,ft)|0,K=K+Math.imul(ct,kt)|0,K=K+Math.imul(et,ft)|0,_e=_e+Math.imul(et,kt)|0,ue=ue+Math.imul(it,pr)|0,K=K+Math.imul(it,Kr)|0,K=K+Math.imul(Oe,pr)|0,_e=_e+Math.imul(Oe,Kr)|0,ue=ue+Math.imul(De,dn)|0,K=K+Math.imul(De,xr)|0,K=K+Math.imul(Ge,dn)|0,_e=_e+Math.imul(Ge,xr)|0,ue=ue+Math.imul(le,Zr)|0,K=K+Math.imul(le,Cn)|0,K=K+Math.imul(me,Zr)|0,_e=_e+Math.imul(me,Cn)|0,ue=ue+Math.imul(ae,At)|0,K=K+Math.imul(ae,Vt)|0,K=K+Math.imul(pe,At)|0,_e=_e+Math.imul(pe,Vt)|0;var Xi=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,ue=Math.imul(We,or),K=Math.imul(We,fr),K=K+Math.imul(mt,or)|0,_e=Math.imul(mt,fr),ue=ue+Math.imul(ot,cr)|0,K=K+Math.imul(ot,Ct)|0,K=K+Math.imul(tt,cr)|0,_e=_e+Math.imul(tt,Ct)|0,ue=ue+Math.imul(Te,Tt)|0,K=K+Math.imul(Te,Mt)|0,K=K+Math.imul(Ve,Tt)|0,_e=_e+Math.imul(Ve,Mt)|0,ue=ue+Math.imul(we,ft)|0,K=K+Math.imul(we,kt)|0,K=K+Math.imul(Le,ft)|0,_e=_e+Math.imul(Le,kt)|0,ue=ue+Math.imul(ct,pr)|0,K=K+Math.imul(ct,Kr)|0,K=K+Math.imul(et,pr)|0,_e=_e+Math.imul(et,Kr)|0,ue=ue+Math.imul(it,dn)|0,K=K+Math.imul(it,xr)|0,K=K+Math.imul(Oe,dn)|0,_e=_e+Math.imul(Oe,xr)|0,ue=ue+Math.imul(De,Zr)|0,K=K+Math.imul(De,Cn)|0,K=K+Math.imul(Ge,Zr)|0,_e=_e+Math.imul(Ge,Cn)|0,ue=ue+Math.imul(le,At)|0,K=K+Math.imul(le,Vt)|0,K=K+Math.imul(me,At)|0,_e=_e+Math.imul(me,Vt)|0,ue=ue+Math.imul(ae,Ut)|0,K=K+Math.imul(ae,_r)|0,K=K+Math.imul(pe,Ut)|0,_e=_e+Math.imul(pe,_r)|0;var oa=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(oa>>>26)|0,oa&=67108863,ue=Math.imul(Yt,or),K=Math.imul(Yt,fr),K=K+Math.imul(jt,or)|0,_e=Math.imul(jt,fr),ue=ue+Math.imul(We,cr)|0,K=K+Math.imul(We,Ct)|0,K=K+Math.imul(mt,cr)|0,_e=_e+Math.imul(mt,Ct)|0,ue=ue+Math.imul(ot,Tt)|0,K=K+Math.imul(ot,Mt)|0,K=K+Math.imul(tt,Tt)|0,_e=_e+Math.imul(tt,Mt)|0,ue=ue+Math.imul(Te,ft)|0,K=K+Math.imul(Te,kt)|0,K=K+Math.imul(Ve,ft)|0,_e=_e+Math.imul(Ve,kt)|0,ue=ue+Math.imul(we,pr)|0,K=K+Math.imul(we,Kr)|0,K=K+Math.imul(Le,pr)|0,_e=_e+Math.imul(Le,Kr)|0,ue=ue+Math.imul(ct,dn)|0,K=K+Math.imul(ct,xr)|0,K=K+Math.imul(et,dn)|0,_e=_e+Math.imul(et,xr)|0,ue=ue+Math.imul(it,Zr)|0,K=K+Math.imul(it,Cn)|0,K=K+Math.imul(Oe,Zr)|0,_e=_e+Math.imul(Oe,Cn)|0,ue=ue+Math.imul(De,At)|0,K=K+Math.imul(De,Vt)|0,K=K+Math.imul(Ge,At)|0,_e=_e+Math.imul(Ge,Vt)|0,ue=ue+Math.imul(le,Ut)|0,K=K+Math.imul(le,_r)|0,K=K+Math.imul(me,Ut)|0,_e=_e+Math.imul(me,_r)|0,ue=ue+Math.imul(ae,Jr)|0,K=K+Math.imul(ae,qn)|0,K=K+Math.imul(pe,Jr)|0,_e=_e+Math.imul(pe,qn)|0;var Ma=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Ma>>>26)|0,Ma&=67108863,ue=Math.imul(Yt,cr),K=Math.imul(Yt,Ct),K=K+Math.imul(jt,cr)|0,_e=Math.imul(jt,Ct),ue=ue+Math.imul(We,Tt)|0,K=K+Math.imul(We,Mt)|0,K=K+Math.imul(mt,Tt)|0,_e=_e+Math.imul(mt,Mt)|0,ue=ue+Math.imul(ot,ft)|0,K=K+Math.imul(ot,kt)|0,K=K+Math.imul(tt,ft)|0,_e=_e+Math.imul(tt,kt)|0,ue=ue+Math.imul(Te,pr)|0,K=K+Math.imul(Te,Kr)|0,K=K+Math.imul(Ve,pr)|0,_e=_e+Math.imul(Ve,Kr)|0,ue=ue+Math.imul(we,dn)|0,K=K+Math.imul(we,xr)|0,K=K+Math.imul(Le,dn)|0,_e=_e+Math.imul(Le,xr)|0,ue=ue+Math.imul(ct,Zr)|0,K=K+Math.imul(ct,Cn)|0,K=K+Math.imul(et,Zr)|0,_e=_e+Math.imul(et,Cn)|0,ue=ue+Math.imul(it,At)|0,K=K+Math.imul(it,Vt)|0,K=K+Math.imul(Oe,At)|0,_e=_e+Math.imul(Oe,Vt)|0,ue=ue+Math.imul(De,Ut)|0,K=K+Math.imul(De,_r)|0,K=K+Math.imul(Ge,Ut)|0,_e=_e+Math.imul(Ge,_r)|0,ue=ue+Math.imul(le,Jr)|0,K=K+Math.imul(le,qn)|0,K=K+Math.imul(me,Jr)|0,_e=_e+Math.imul(me,qn)|0;var Ga=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Ga>>>26)|0,Ga&=67108863,ue=Math.imul(Yt,Tt),K=Math.imul(Yt,Mt),K=K+Math.imul(jt,Tt)|0,_e=Math.imul(jt,Mt),ue=ue+Math.imul(We,ft)|0,K=K+Math.imul(We,kt)|0,K=K+Math.imul(mt,ft)|0,_e=_e+Math.imul(mt,kt)|0,ue=ue+Math.imul(ot,pr)|0,K=K+Math.imul(ot,Kr)|0,K=K+Math.imul(tt,pr)|0,_e=_e+Math.imul(tt,Kr)|0,ue=ue+Math.imul(Te,dn)|0,K=K+Math.imul(Te,xr)|0,K=K+Math.imul(Ve,dn)|0,_e=_e+Math.imul(Ve,xr)|0,ue=ue+Math.imul(we,Zr)|0,K=K+Math.imul(we,Cn)|0,K=K+Math.imul(Le,Zr)|0,_e=_e+Math.imul(Le,Cn)|0,ue=ue+Math.imul(ct,At)|0,K=K+Math.imul(ct,Vt)|0,K=K+Math.imul(et,At)|0,_e=_e+Math.imul(et,Vt)|0,ue=ue+Math.imul(it,Ut)|0,K=K+Math.imul(it,_r)|0,K=K+Math.imul(Oe,Ut)|0,_e=_e+Math.imul(Oe,_r)|0,ue=ue+Math.imul(De,Jr)|0,K=K+Math.imul(De,qn)|0,K=K+Math.imul(Ge,Jr)|0,_e=_e+Math.imul(Ge,qn)|0;var ss=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(ss>>>26)|0,ss&=67108863,ue=Math.imul(Yt,ft),K=Math.imul(Yt,kt),K=K+Math.imul(jt,ft)|0,_e=Math.imul(jt,kt),ue=ue+Math.imul(We,pr)|0,K=K+Math.imul(We,Kr)|0,K=K+Math.imul(mt,pr)|0,_e=_e+Math.imul(mt,Kr)|0,ue=ue+Math.imul(ot,dn)|0,K=K+Math.imul(ot,xr)|0,K=K+Math.imul(tt,dn)|0,_e=_e+Math.imul(tt,xr)|0,ue=ue+Math.imul(Te,Zr)|0,K=K+Math.imul(Te,Cn)|0,K=K+Math.imul(Ve,Zr)|0,_e=_e+Math.imul(Ve,Cn)|0,ue=ue+Math.imul(we,At)|0,K=K+Math.imul(we,Vt)|0,K=K+Math.imul(Le,At)|0,_e=_e+Math.imul(Le,Vt)|0,ue=ue+Math.imul(ct,Ut)|0,K=K+Math.imul(ct,_r)|0,K=K+Math.imul(et,Ut)|0,_e=_e+Math.imul(et,_r)|0,ue=ue+Math.imul(it,Jr)|0,K=K+Math.imul(it,qn)|0,K=K+Math.imul(Oe,Jr)|0,_e=_e+Math.imul(Oe,qn)|0;var mo=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(mo>>>26)|0,mo&=67108863,ue=Math.imul(Yt,pr),K=Math.imul(Yt,Kr),K=K+Math.imul(jt,pr)|0,_e=Math.imul(jt,Kr),ue=ue+Math.imul(We,dn)|0,K=K+Math.imul(We,xr)|0,K=K+Math.imul(mt,dn)|0,_e=_e+Math.imul(mt,xr)|0,ue=ue+Math.imul(ot,Zr)|0,K=K+Math.imul(ot,Cn)|0,K=K+Math.imul(tt,Zr)|0,_e=_e+Math.imul(tt,Cn)|0,ue=ue+Math.imul(Te,At)|0,K=K+Math.imul(Te,Vt)|0,K=K+Math.imul(Ve,At)|0,_e=_e+Math.imul(Ve,Vt)|0,ue=ue+Math.imul(we,Ut)|0,K=K+Math.imul(we,_r)|0,K=K+Math.imul(Le,Ut)|0,_e=_e+Math.imul(Le,_r)|0,ue=ue+Math.imul(ct,Jr)|0,K=K+Math.imul(ct,qn)|0,K=K+Math.imul(et,Jr)|0,_e=_e+Math.imul(et,qn)|0;var sl=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(sl>>>26)|0,sl&=67108863,ue=Math.imul(Yt,dn),K=Math.imul(Yt,xr),K=K+Math.imul(jt,dn)|0,_e=Math.imul(jt,xr),ue=ue+Math.imul(We,Zr)|0,K=K+Math.imul(We,Cn)|0,K=K+Math.imul(mt,Zr)|0,_e=_e+Math.imul(mt,Cn)|0,ue=ue+Math.imul(ot,At)|0,K=K+Math.imul(ot,Vt)|0,K=K+Math.imul(tt,At)|0,_e=_e+Math.imul(tt,Vt)|0,ue=ue+Math.imul(Te,Ut)|0,K=K+Math.imul(Te,_r)|0,K=K+Math.imul(Ve,Ut)|0,_e=_e+Math.imul(Ve,_r)|0,ue=ue+Math.imul(we,Jr)|0,K=K+Math.imul(we,qn)|0,K=K+Math.imul(Le,Jr)|0,_e=_e+Math.imul(Le,qn)|0;var Eo=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Eo>>>26)|0,Eo&=67108863,ue=Math.imul(Yt,Zr),K=Math.imul(Yt,Cn),K=K+Math.imul(jt,Zr)|0,_e=Math.imul(jt,Cn),ue=ue+Math.imul(We,At)|0,K=K+Math.imul(We,Vt)|0,K=K+Math.imul(mt,At)|0,_e=_e+Math.imul(mt,Vt)|0,ue=ue+Math.imul(ot,Ut)|0,K=K+Math.imul(ot,_r)|0,K=K+Math.imul(tt,Ut)|0,_e=_e+Math.imul(tt,_r)|0,ue=ue+Math.imul(Te,Jr)|0,K=K+Math.imul(Te,qn)|0,K=K+Math.imul(Ve,Jr)|0,_e=_e+Math.imul(Ve,qn)|0;var ao=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(ao>>>26)|0,ao&=67108863,ue=Math.imul(Yt,At),K=Math.imul(Yt,Vt),K=K+Math.imul(jt,At)|0,_e=Math.imul(jt,Vt),ue=ue+Math.imul(We,Ut)|0,K=K+Math.imul(We,_r)|0,K=K+Math.imul(mt,Ut)|0,_e=_e+Math.imul(mt,_r)|0,ue=ue+Math.imul(ot,Jr)|0,K=K+Math.imul(ot,qn)|0,K=K+Math.imul(tt,Jr)|0,_e=_e+Math.imul(tt,qn)|0;var Da=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Da>>>26)|0,Da&=67108863,ue=Math.imul(Yt,Ut),K=Math.imul(Yt,_r),K=K+Math.imul(jt,Ut)|0,_e=Math.imul(jt,_r),ue=ue+Math.imul(We,Jr)|0,K=K+Math.imul(We,qn)|0,K=K+Math.imul(mt,Jr)|0,_e=_e+Math.imul(mt,qn)|0;var bl=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(bl>>>26)|0,bl&=67108863,ue=Math.imul(Yt,Jr),K=Math.imul(Yt,qn),K=K+Math.imul(jt,Jr)|0,_e=Math.imul(jt,qn);var bo=(xe+ue|0)+((K&8191)<<13)|0;return xe=(_e+(K>>>13)|0)+(bo>>>26)|0,bo&=67108863,ye[0]=ri,ye[1]=Jn,ye[2]=Ii,ye[3]=Vi,ye[4]=ra,ye[5]=ha,ye[6]=va,ye[7]=Xi,ye[8]=oa,ye[9]=Ma,ye[10]=Ga,ye[11]=ss,ye[12]=mo,ye[13]=sl,ye[14]=Eo,ye[15]=ao,ye[16]=Da,ye[17]=bl,ye[18]=bo,xe!==0&&(ye[19]=xe,J.length++),J};Math.imul||(L=S);function w(j,q,U){U.negative=q.negative^j.negative,U.length=j.length+q.length;for(var J=0,ee=0,ce=0;ce>>26)|0,ee+=ye>>>26,ye&=67108863}U.words[ce]=xe,J=ye,ye=ee}return J!==0?U.words[ce]=J:U.length--,U.strip()}function A(j,q,U){var J=new T;return J.mulp(j,q,U)}f.prototype.mulTo=function(q,U){var J,ee=this.length+q.length;return this.length===10&&q.length===10?J=L(this,q,U):ee<63?J=S(this,q,U):ee<1024?J=w(this,q,U):J=A(this,q,U),J};function T(j,q){this.x=j,this.y=q}T.prototype.makeRBT=function(q){for(var U=new Array(q),J=f.prototype._countBits(q)-1,ee=0;ee>=1;return ee},T.prototype.permute=function(q,U,J,ee,ce,ye){for(var xe=0;xe>>1)ce++;return 1<>>13,J[2*ye+1]=ce&8191,ce=ce>>>13;for(ye=2*U;ye>=26,U+=ee/67108864|0,U+=ce>>>26,this.words[J]=ce&67108863}return U!==0&&(this.words[J]=U,this.length++),this.length=q===0?1:this.length,this},f.prototype.muln=function(q){return this.clone().imuln(q)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(q){var U=k(q);if(U.length===0)return new f(1);for(var J=this,ee=0;ee=0);var U=q%26,J=(q-U)/26,ee=67108863>>>26-U<<26-U,ce;if(U!==0){var ye=0;for(ce=0;ce>>26-U}ye&&(this.words[ce]=ye,this.length++)}if(J!==0){for(ce=this.length-1;ce>=0;ce--)this.words[ce+J]=this.words[ce];for(ce=0;ce=0);var ee;U?ee=(U-U%26)/26:ee=0;var ce=q%26,ye=Math.min((q-ce)/26,this.length),xe=67108863^67108863>>>ce<ye)for(this.length-=ye,K=0;K=0&&(_e!==0||K>=ee);K--){var ne=this.words[K]|0;this.words[K]=_e<<26-ce|ne>>>ce,_e=ne&xe}return ue&&_e!==0&&(ue.words[ue.length++]=_e),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(q,U,J){return u(this.negative===0),this.iushrn(q,U,J)},f.prototype.shln=function(q){return this.clone().ishln(q)},f.prototype.ushln=function(q){return this.clone().iushln(q)},f.prototype.shrn=function(q){return this.clone().ishrn(q)},f.prototype.ushrn=function(q){return this.clone().iushrn(q)},f.prototype.testn=function(q){u(typeof q=="number"&&q>=0);var U=q%26,J=(q-U)/26,ee=1<=0);var U=q%26,J=(q-U)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(U!==0&&J++,this.length=Math.min(J,this.length),U!==0){var ee=67108863^67108863>>>U<=67108864;U++)this.words[U]-=67108864,U===this.length-1?this.words[U+1]=1:this.words[U+1]++;return this.length=Math.max(this.length,U+1),this},f.prototype.isubn=function(q){if(u(typeof q=="number"),u(q<67108864),q<0)return this.iaddn(-q);if(this.negative!==0)return this.negative=0,this.iaddn(q),this.negative=1,this;if(this.words[0]-=q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var U=0;U>26)-(ue/67108864|0),this.words[ce+J]=ye&67108863}for(;ce>26,this.words[ce+J]=ye&67108863;if(xe===0)return this.strip();for(u(xe===-1),xe=0,ce=0;ce>26,this.words[ce]=ye&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(q,U){var J=this.length-q.length,ee=this.clone(),ce=q,ye=ce.words[ce.length-1]|0,xe=this._countBits(ye);J=26-xe,J!==0&&(ce=ce.ushln(J),ee.iushln(J),ye=ce.words[ce.length-1]|0);var ue=ee.length-ce.length,K;if(U!=="mod"){K=new f(null),K.length=ue+1,K.words=new Array(K.length);for(var _e=0;_e=0;ae--){var pe=(ee.words[ce.length+ae]|0)*67108864+(ee.words[ce.length+ae-1]|0);for(pe=Math.min(pe/ye|0,67108863),ee._ishlnsubmul(ce,pe,ae);ee.negative!==0;)pe--,ee.negative=0,ee._ishlnsubmul(ce,1,ae),ee.isZero()||(ee.negative^=1);K&&(K.words[ae]=pe)}return K&&K.strip(),ee.strip(),U!=="div"&&J!==0&&ee.iushrn(J),{div:K||null,mod:ee}},f.prototype.divmod=function(q,U,J){if(u(!q.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var ee,ce,ye;return this.negative!==0&&q.negative===0?(ye=this.neg().divmod(q,U),U!=="mod"&&(ee=ye.div.neg()),U!=="div"&&(ce=ye.mod.neg(),J&&ce.negative!==0&&ce.iadd(q)),{div:ee,mod:ce}):this.negative===0&&q.negative!==0?(ye=this.divmod(q.neg(),U),U!=="mod"&&(ee=ye.div.neg()),{div:ee,mod:ye.mod}):(this.negative&q.negative)!==0?(ye=this.neg().divmod(q.neg(),U),U!=="div"&&(ce=ye.mod.neg(),J&&ce.negative!==0&&ce.isub(q)),{div:ye.div,mod:ce}):q.length>this.length||this.cmp(q)<0?{div:new f(0),mod:this}:q.length===1?U==="div"?{div:this.divn(q.words[0]),mod:null}:U==="mod"?{div:null,mod:new f(this.modn(q.words[0]))}:{div:this.divn(q.words[0]),mod:new f(this.modn(q.words[0]))}:this._wordDiv(q,U)},f.prototype.div=function(q){return this.divmod(q,"div",!1).div},f.prototype.mod=function(q){return this.divmod(q,"mod",!1).mod},f.prototype.umod=function(q){return this.divmod(q,"mod",!0).mod},f.prototype.divRound=function(q){var U=this.divmod(q);if(U.mod.isZero())return U.div;var J=U.div.negative!==0?U.mod.isub(q):U.mod,ee=q.ushrn(1),ce=q.andln(1),ye=J.cmp(ee);return ye<0||ce===1&&ye===0?U.div:U.div.negative!==0?U.div.isubn(1):U.div.iaddn(1)},f.prototype.modn=function(q){u(q<=67108863);for(var U=(1<<26)%q,J=0,ee=this.length-1;ee>=0;ee--)J=(U*J+(this.words[ee]|0))%q;return J},f.prototype.idivn=function(q){u(q<=67108863);for(var U=0,J=this.length-1;J>=0;J--){var ee=(this.words[J]|0)+U*67108864;this.words[J]=ee/q|0,U=ee%q}return this.strip()},f.prototype.divn=function(q){return this.clone().idivn(q)},f.prototype.egcd=function(q){u(q.negative===0),u(!q.isZero());var U=this,J=q.clone();U.negative!==0?U=U.umod(q):U=U.clone();for(var ee=new f(1),ce=new f(0),ye=new f(0),xe=new f(1),ue=0;U.isEven()&&J.isEven();)U.iushrn(1),J.iushrn(1),++ue;for(var K=J.clone(),_e=U.clone();!U.isZero();){for(var ne=0,ae=1;(U.words[0]&ae)===0&&ne<26;++ne,ae<<=1);if(ne>0)for(U.iushrn(ne);ne-- >0;)(ee.isOdd()||ce.isOdd())&&(ee.iadd(K),ce.isub(_e)),ee.iushrn(1),ce.iushrn(1);for(var pe=0,ie=1;(J.words[0]&ie)===0&&pe<26;++pe,ie<<=1);if(pe>0)for(J.iushrn(pe);pe-- >0;)(ye.isOdd()||xe.isOdd())&&(ye.iadd(K),xe.isub(_e)),ye.iushrn(1),xe.iushrn(1);U.cmp(J)>=0?(U.isub(J),ee.isub(ye),ce.isub(xe)):(J.isub(U),ye.isub(ee),xe.isub(ce))}return{a:ye,b:xe,gcd:J.iushln(ue)}},f.prototype._invmp=function(q){u(q.negative===0),u(!q.isZero());var U=this,J=q.clone();U.negative!==0?U=U.umod(q):U=U.clone();for(var ee=new f(1),ce=new f(0),ye=J.clone();U.cmpn(1)>0&&J.cmpn(1)>0;){for(var xe=0,ue=1;(U.words[0]&ue)===0&&xe<26;++xe,ue<<=1);if(xe>0)for(U.iushrn(xe);xe-- >0;)ee.isOdd()&&ee.iadd(ye),ee.iushrn(1);for(var K=0,_e=1;(J.words[0]&_e)===0&&K<26;++K,_e<<=1);if(K>0)for(J.iushrn(K);K-- >0;)ce.isOdd()&&ce.iadd(ye),ce.iushrn(1);U.cmp(J)>=0?(U.isub(J),ee.isub(ce)):(J.isub(U),ce.isub(ee))}var ne;return U.cmpn(1)===0?ne=ee:ne=ce,ne.cmpn(0)<0&&ne.iadd(q),ne},f.prototype.gcd=function(q){if(this.isZero())return q.abs();if(q.isZero())return this.abs();var U=this.clone(),J=q.clone();U.negative=0,J.negative=0;for(var ee=0;U.isEven()&&J.isEven();ee++)U.iushrn(1),J.iushrn(1);do{for(;U.isEven();)U.iushrn(1);for(;J.isEven();)J.iushrn(1);var ce=U.cmp(J);if(ce<0){var ye=U;U=J,J=ye}else if(ce===0||J.cmpn(1)===0)break;U.isub(J)}while(!0);return J.iushln(ee)},f.prototype.invm=function(q){return this.egcd(q).a.umod(q)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(q){return this.words[0]&q},f.prototype.bincn=function(q){u(typeof q=="number");var U=q%26,J=(q-U)/26,ee=1<>>26,xe&=67108863,this.words[ye]=xe}return ce!==0&&(this.words[ye]=ce,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(q){var U=q<0;if(this.negative!==0&&!U)return-1;if(this.negative===0&&U)return 1;this.strip();var J;if(this.length>1)J=1;else{U&&(q=-q),u(q<=67108863,"Number is too big");var ee=this.words[0]|0;J=ee===q?0:eeq.length)return 1;if(this.length=0;J--){var ee=this.words[J]|0,ce=q.words[J]|0;if(ee!==ce){eece&&(U=1);break}}return U},f.prototype.gtn=function(q){return this.cmpn(q)===1},f.prototype.gt=function(q){return this.cmp(q)===1},f.prototype.gten=function(q){return this.cmpn(q)>=0},f.prototype.gte=function(q){return this.cmp(q)>=0},f.prototype.ltn=function(q){return this.cmpn(q)===-1},f.prototype.lt=function(q){return this.cmp(q)===-1},f.prototype.lten=function(q){return this.cmpn(q)<=0},f.prototype.lte=function(q){return this.cmp(q)<=0},f.prototype.eqn=function(q){return this.cmpn(q)===0},f.prototype.eq=function(q){return this.cmp(q)===0},f.red=function(q){return new O(q)},f.prototype.toRed=function(q){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),q.convertTo(this)._forceRed(q)},f.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(q){return this.red=q,this},f.prototype.forceRed=function(q){return u(!this.red,"Already a number in reduction context"),this._forceRed(q)},f.prototype.redAdd=function(q){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,q)},f.prototype.redIAdd=function(q){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,q)},f.prototype.redSub=function(q){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,q)},f.prototype.redISub=function(q){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,q)},f.prototype.redShl=function(q){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,q)},f.prototype.redMul=function(q){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,q),this.red.mul(this,q)},f.prototype.redIMul=function(q){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,q),this.red.imul(this,q)},f.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(q){return u(this.red&&!q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,q)};var m={k256:null,p224:null,p192:null,p25519:null};function F(j,q){this.name=j,this.p=new f(q,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}F.prototype._tmp=function(){var q=new f(null);return q.words=new Array(Math.ceil(this.n/13)),q},F.prototype.ireduce=function(q){var U=q,J;do this.split(U,this.tmp),U=this.imulK(U),U=U.iadd(this.tmp),J=U.bitLength();while(J>this.n);var ee=J0?U.isub(this.p):U.strip!==void 0?U.strip():U._strip(),U},F.prototype.split=function(q,U){q.iushrn(this.n,0,U)},F.prototype.imulK=function(q){return q.imul(this.k)};function E(){F.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}c(E,F),E.prototype.split=function(q,U){for(var J=4194303,ee=Math.min(q.length,9),ce=0;ce>>22,ye=xe}ye>>>=22,q.words[ce-10]=ye,ye===0&&q.length>10?q.length-=10:q.length-=9},E.prototype.imulK=function(q){q.words[q.length]=0,q.words[q.length+1]=0,q.length+=2;for(var U=0,J=0;J>>=26,q.words[J]=ce,U=ee}return U!==0&&(q.words[q.length++]=U),q},f._prime=function(q){if(m[q])return m[q];var U;if(q==="k256")U=new E;else if(q==="p224")U=new I;else if(q==="p192")U=new R;else if(q==="p25519")U=new B;else throw new Error("Unknown prime "+q);return m[q]=U,U};function O(j){if(typeof j=="string"){var q=f._prime(j);this.m=q.p,this.prime=q}else u(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}O.prototype._verify1=function(q){u(q.negative===0,"red works only with positives"),u(q.red,"red works only with red numbers")},O.prototype._verify2=function(q,U){u((q.negative|U.negative)===0,"red works only with positives"),u(q.red&&q.red===U.red,"red works only with red numbers")},O.prototype.imod=function(q){return this.prime?this.prime.ireduce(q)._forceRed(this):q.umod(this.m)._forceRed(this)},O.prototype.neg=function(q){return q.isZero()?q.clone():this.m.sub(q)._forceRed(this)},O.prototype.add=function(q,U){this._verify2(q,U);var J=q.add(U);return J.cmp(this.m)>=0&&J.isub(this.m),J._forceRed(this)},O.prototype.iadd=function(q,U){this._verify2(q,U);var J=q.iadd(U);return J.cmp(this.m)>=0&&J.isub(this.m),J},O.prototype.sub=function(q,U){this._verify2(q,U);var J=q.sub(U);return J.cmpn(0)<0&&J.iadd(this.m),J._forceRed(this)},O.prototype.isub=function(q,U){this._verify2(q,U);var J=q.isub(U);return J.cmpn(0)<0&&J.iadd(this.m),J},O.prototype.shl=function(q,U){return this._verify1(q),this.imod(q.ushln(U))},O.prototype.imul=function(q,U){return this._verify2(q,U),this.imod(q.imul(U))},O.prototype.mul=function(q,U){return this._verify2(q,U),this.imod(q.mul(U))},O.prototype.isqr=function(q){return this.imul(q,q.clone())},O.prototype.sqr=function(q){return this.mul(q,q)},O.prototype.sqrt=function(q){if(q.isZero())return q.clone();var U=this.m.andln(3);if(u(U%2===1),U===3){var J=this.m.add(new f(1)).iushrn(2);return this.pow(q,J)}for(var ee=this.m.subn(1),ce=0;!ee.isZero()&&ee.andln(1)===0;)ce++,ee.iushrn(1);u(!ee.isZero());var ye=new f(1).toRed(this),xe=ye.redNeg(),ue=this.m.subn(1).iushrn(1),K=this.m.bitLength();for(K=new f(2*K*K).toRed(this);this.pow(K,ue).cmp(xe)!==0;)K.redIAdd(xe);for(var _e=this.pow(K,ee),ne=this.pow(q,ee.addn(1).iushrn(1)),ae=this.pow(q,ee),pe=ce;ae.cmp(ye)!==0;){for(var ie=ae,le=0;ie.cmp(ye)!==0;le++)ie=ie.redSqr();u(le=0;ce--){for(var _e=U.words[ce],ne=K-1;ne>=0;ne--){var ae=_e>>ne&1;if(ye!==ee[0]&&(ye=this.sqr(ye)),ae===0&&xe===0){ue=0;continue}xe<<=1,xe|=ae,ue++,!(ue!==J&&(ce!==0||ne!==0))&&(ye=this.mul(ye,ee[xe]),ue=0,xe=0)}K=26}return ye},O.prototype.convertTo=function(q){var U=q.umod(this.m);return U===q?U.clone():U},O.prototype.convertFrom=function(q){var U=q.clone();return U.red=null,U},f.mont=function(q){return new V(q)};function V(j){O.call(this,j),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(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)}c(V,O),V.prototype.convertTo=function(q){return this.imod(q.ushln(this.shift))},V.prototype.convertFrom=function(q){var U=this.imod(q.mul(this.rinv));return U.red=null,U},V.prototype.imul=function(q,U){if(q.isZero()||U.isZero())return q.words[0]=0,q.length=1,q;var J=q.imul(U),ee=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ce=J.isub(ee).iushrn(this.shift),ye=ce;return ce.cmp(this.m)>=0?ye=ce.isub(this.m):ce.cmpn(0)<0&&(ye=ce.iadd(this.m)),ye._forceRed(this)},V.prototype.mul=function(q,U){if(q.isZero()||U.isZero())return new f(0)._forceRed(this);var J=q.mul(U),ee=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ce=J.isub(ee).iushrn(this.shift),ye=ce;return ce.cmp(this.m)>=0?ye=ce.isub(this.m):ce.cmpn(0)<0&&(ye=ce.iadd(this.m)),ye._forceRed(this)},V.prototype.invm=function(q){var U=this.imod(q._invmp(this.m).mul(this.r2));return U._forceRed(this)}})(a,this)}),6204:(function(a){"use strict";a.exports=i;function i(o){var s,l,u,c=o.length,f=0;for(s=0;s>>1;if(!(T<=0)){var m,F=s.mallocDouble(2*T*w),E=s.mallocInt32(w);if(w=f(C,T,F,E),w>0){if(T===1&&L)l.init(w),m=l.sweepComplete(T,S,0,w,F,E,0,w,F,E);else{var I=s.mallocDouble(2*T*A),R=s.mallocInt32(A);A=f(k,T,I,R),A>0&&(l.init(w+A),T===1?m=l.sweepBipartite(T,S,0,w,F,E,0,A,I,R):m=u(T,S,L,w,F,E,A,I,R),s.free(I),s.free(R))}s.free(F),s.free(E)}return m}}}var g;function p(C,k){g.push([C,k])}function x(C){return g=[],v(C,C,p,!0),g}function _(C,k){return g=[],v(C,k,p,!1),g}function y(C,k,S){switch(arguments.length){case 1:return x(C);case 2:return typeof k=="function"?v(C,C,k,!0):_(C,k);case 3:return v(C,k,S,!1);default:throw new Error("box-intersect: Invalid arguments")}}}),2455:(function(a,i){"use strict";function o(){function u(v,g,p,x,_,y,C,k,S,L,w){for(var A=2*v,T=x,m=A*x;T<_;++T,m+=A){var F=y[g+m],E=y[g+m+v],I=C[T];e:for(var R=k,B=A*k;RS-k?u(v,g,p,x,_,y,C,k,S,L,w):c(v,g,p,x,_,y,C,k,S,L,w)}return f}function s(){function u(p,x,_,y,C,k,S,L,w,A,T){for(var m=2*p,F=y,E=m*y;FA-w?y?u(p,x,_,C,k,S,L,w,A,T,m):c(p,x,_,C,k,S,L,w,A,T,m):y?f(p,x,_,C,k,S,L,w,A,T,m):v(p,x,_,C,k,S,L,w,A,T,m)}return g}function l(u){return u?o():s()}i.partial=l(!1),i.full=l(!0)}),7150:(function(a,i,o){"use strict";a.exports=j;var s=o(1888),l=o(8828),u=o(2455),c=u.partial,f=u.full,v=o(855),g=o(3545),p=o(8105),x=128,_=1<<22,y=1<<22,C=p("!(lo>=p0)&&!(p1>=hi)"),k=p("lo===p0"),S=p("lo0;){_e-=1;var pe=_e*T,ie=E[pe],le=E[pe+1],me=E[pe+2],be=E[pe+3],De=E[pe+4],Ge=E[pe+5],ht=_e*m,it=I[ht],Oe=I[ht+1],ze=Ge&1,ct=!!(Ge&16),et=ce,qe=ye,we=ue,Le=K;if(ze&&(et=ue,qe=K,we=ce,Le=ye),!(Ge&2&&(me=S(q,ie,le,me,et,qe,Oe),le>=me))&&!(Ge&4&&(le=L(q,ie,le,me,et,qe,it),le>=me))){var Ke=me-le,Te=De-be;if(ct){if(q*Ke*(Ke+Te)p&&_[A+g]>L;--w,A-=C){for(var T=A,m=A+C,F=0;F>>1,L=2*v,w=S,A=_[L*S+g];C=I?(w=E,A=I):F>=B?(w=m,A=F):(w=R,A=B):I>=B?(w=E,A=I):B>=F?(w=m,A=F):(w=R,A=B);for(var j=L*(k-1),q=L*w,O=0;O=p0)&&!(p1>=hi)":g};function o(p){return i[p]}function s(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+m];if(I===S)if(T===E)T+=1,A+=L;else{for(var R=0;L>R;++R){var B=C[w+R];C[w+R]=C[A],C[A++]=B}var O=k[E];k[E]=k[T],k[T++]=O}}return T}function l(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+m];if(IR;++R){var B=C[w+R];C[w+R]=C[A],C[A++]=B}var O=k[E];k[E]=k[T],k[T++]=O}}return T}function u(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+F];if(I<=S)if(T===E)T+=1,A+=L;else{for(var R=0;L>R;++R){var B=C[w+R];C[w+R]=C[A],C[A++]=B}var O=k[E];k[E]=k[T],k[T++]=O}}return T}function c(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+F];if(I<=S)if(T===E)T+=1,A+=L;else{for(var R=0;L>R;++R){var B=C[w+R];C[w+R]=C[A],C[A++]=B}var O=k[E];k[E]=k[T],k[T++]=O}}return T}function f(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+m],R=C[w+F];if(I<=S&&S<=R)if(T===E)T+=1,A+=L;else{for(var B=0;L>B;++B){var O=C[w+B];C[w+B]=C[A],C[A++]=O}var V=k[E];k[E]=k[T],k[T++]=V}}return T}function v(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+m],R=C[w+F];if(IB;++B){var O=C[w+B];C[w+B]=C[A],C[A++]=O}var V=k[E];k[E]=k[T],k[T++]=V}}return T}function g(p,x,_,y,C,k,S,L){for(var w=2*p,A=w*_,T=A,m=_,F=x,E=p+x,I=_;y>I;++I,A+=w){var R=C[A+F],B=C[A+E];if(!(R>=S)&&!(L>=B))if(m===I)m+=1,T+=w;else{for(var O=0;w>O;++O){var V=C[A+O];C[A+O]=C[T],C[T++]=V}var j=k[I];k[I]=k[m],k[m++]=j}}return m}}),4192:(function(a){"use strict";a.exports=o;var i=32;function o(x,_){_<=4*i?s(0,_-1,x):p(0,_-1,x)}function s(x,_,y){for(var C=2*(x+1),k=x+1;k<=_;++k){for(var S=y[C++],L=y[C++],w=k,A=C-2;w-- >x;){var T=y[A-2],m=y[A-1];if(Ty[_+1]:!0}function g(x,_,y,C){x*=2;var k=C[x];return k<_?!0:k===_?C[x+1]>1,w=L-C,A=L+C,T=k,m=w,F=L,E=A,I=S,R=x+1,B=_-1,O=0;v(T,m,y)&&(O=T,T=m,m=O),v(E,I,y)&&(O=E,E=I,I=O),v(T,F,y)&&(O=T,T=F,F=O),v(m,F,y)&&(O=m,m=F,F=O),v(T,E,y)&&(O=T,T=E,E=O),v(F,E,y)&&(O=F,F=E,E=O),v(m,I,y)&&(O=m,m=I,I=O),v(m,F,y)&&(O=m,m=F,F=O),v(E,I,y)&&(O=E,E=I,I=O);for(var V=y[2*m],j=y[2*m+1],q=y[2*E],U=y[2*E+1],J=2*T,ee=2*F,ce=2*I,ye=2*k,xe=2*L,ue=2*S,K=0;K<2;++K){var _e=y[J+K],ne=y[ee+K],ae=y[ce+K];y[ye+K]=_e,y[xe+K]=ne,y[ue+K]=ae}u(w,x,y),u(A,_,y);for(var pe=R;pe<=B;++pe)if(g(pe,V,j,y))pe!==R&&l(pe,R,y),++R;else if(!g(pe,q,U,y))for(;;)if(g(B,q,U,y)){g(B,V,j,y)?(c(pe,R,B,y),++R,--B):(l(pe,B,y),--B);break}else{if(--B>>1;u(C,ne);for(var ae=0,pe=0,xe=0;xe=c)ie=ie-c|0,S(p,x,pe--,ie);else if(ie>=0)S(v,g,ae--,ie);else if(ie<=-c){ie=-ie-c|0;for(var le=0;le>>1;u(C,ne);for(var ae=0,pe=0,ie=0,xe=0;xe>1===C[2*xe+3]>>1&&(me=2,xe+=1),le<0){for(var be=-(le>>1)-1,De=0;De>1)-1;me===0?S(v,g,ae--,be):me===1?S(p,x,pe--,be):me===2&&S(_,y,ie--,be)}}}function T(F,E,I,R,B,O,V,j,q,U,J,ee){var ce=0,ye=2*F,xe=E,ue=E+F,K=1,_e=1;R?_e=c:K=c;for(var ne=B;ne>>1;u(C,le);for(var me=0,ne=0;ne=c?(De=!R,ae-=c):(De=!!R,ae-=1),De)L(v,g,me++,ae);else{var Ge=ee[ae],ht=ye*ae,it=J[ht+E+1],Oe=J[ht+E+1+F];e:for(var ze=0;ze>>1;u(C,ae);for(var pe=0,ue=0;ue=c)v[pe++]=K-c;else{K-=1;var le=J[K],me=ce*K,be=U[me+E+1],De=U[me+E+1+F];e:for(var Ge=0;Ge=0;--Ge)if(v[Ge]===K){for(var ze=Ge+1;ze0;){for(var k=g.pop(),_=g.pop(),S=-1,L=-1,y=x[_],A=1;A=0||(v.flip(_,k),u(f,v,g,S,_,L),u(f,v,g,_,L,S),u(f,v,g,L,k,S),u(f,v,g,k,S,L))}}}),5023:(function(a,i,o){"use strict";var s=o(2478);a.exports=g;function l(p,x,_,y,C,k,S){this.cells=p,this.neighbor=x,this.flags=y,this.constraint=_,this.active=C,this.next=k,this.boundary=S}var u=l.prototype;function c(p,x){return p[0]-x[0]||p[1]-x[1]||p[2]-x[2]}u.locate=(function(){var p=[0,0,0];return function(x,_,y){var C=x,k=_,S=y;return _0||S.length>0;){for(;k.length>0;){var m=k.pop();if(L[m]!==-C){L[m]=C;for(var F=w[m],E=0;E<3;++E){var I=T[3*m+E];I>=0&&L[I]===0&&(A[3*m+E]?S.push(I):(k.push(I),L[I]=C))}}}var R=S;S=k,k=R,S.length=0,C=-C}var B=v(w,L,x);return _?B.concat(y.boundary):B}}),8902:(function(a,i,o){"use strict";var s=o(2478),l=o(3250)[3],u=0,c=1,f=2;a.exports=S;function v(L,w,A,T,m){this.a=L,this.b=w,this.idx=A,this.lowerIds=T,this.upperIds=m}function g(L,w,A,T){this.a=L,this.b=w,this.type=A,this.idx=T}function p(L,w){var A=L.a[0]-w.a[0]||L.a[1]-w.a[1]||L.type-w.type;return A||L.type!==u&&(A=l(L.a,L.b,w.b),A)?A:L.idx-w.idx}function x(L,w){return l(L.a,L.b,w)}function _(L,w,A,T,m){for(var F=s.lt(w,T,x),E=s.gt(w,T,x),I=F;I1&&l(A[B[V-2]],A[B[V-1]],T)>0;)L.push([B[V-1],B[V-2],m]),V-=1;B.length=V,B.push(m);for(var O=R.upperIds,V=O.length;V>1&&l(A[O[V-2]],A[O[V-1]],T)<0;)L.push([O[V-2],O[V-1],m]),V-=1;O.length=V,O.push(m)}}function y(L,w){var A;return L.a[0]R[0]&&m.push(new g(R,I,f,F),new g(I,R,c,F))}m.sort(p);for(var B=m[0].a[0]-(1+Math.abs(m[0].a[0]))*Math.pow(2,-52),O=[new v([B,1],[B,0],-1,[],[],[],[])],V=[],F=0,j=m.length;F=0}})(),u.removeTriangle=function(v,g,p){var x=this.stars;c(x[v],g,p),c(x[g],p,v),c(x[p],v,g)},u.addTriangle=function(v,g,p){var x=this.stars;x[v].push(g,p),x[g].push(p,v),x[p].push(v,g)},u.opposite=function(v,g){for(var p=this.stars[g],x=1,_=p.length;x<_;x+=2)if(p[x]===v)return p[x-1];return-1},u.flip=function(v,g){var p=this.opposite(v,g),x=this.opposite(g,v);this.removeTriangle(v,g,p),this.removeTriangle(g,v,x),this.addTriangle(v,x,p),this.addTriangle(g,p,x)},u.edges=function(){for(var v=this.stars,g=[],p=0,x=v.length;p=0;--q){var _e=V[q];U=_e[0];var ne=B[U],ae=ne[0],pe=ne[1],ie=R[ae],le=R[pe];if((ie[0]-le[0]||ie[1]-le[1])<0){var me=ae;ae=pe,pe=me}ne[0]=ae;var be=ne[1]=_e[1],De;for(j&&(De=ne[2]);q>0&&V[q-1][0]===U;){var _e=V[--q],Ge=_e[1];j?B.push([be,Ge,De]):B.push([be,Ge]),be=Ge}j?B.push([be,pe,De]):B.push([be,pe])}return J}function w(R,B,O){for(var V=B.length,j=new s(V),q=[],U=0;UB[2]?1:0)}function m(R,B,O){if(R.length!==0){if(B)for(var V=0;V0||U.length>0}function I(R,B,O){var V;if(O){V=B;for(var j=new Array(B.length),q=0;qL+1)throw new Error(k+" map requires nshades to be at least size "+C.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],p=C.map(function(I){return Math.round(I.index*L)}),w[0]=Math.min(Math.max(w[0],0),1),w[1]=Math.min(Math.max(w[1],0),1);var T=C.map(function(I,R){var B=C[R].index,O=C[R].rgb.slice();return O.length===4&&O[3]>=0&&O[3]<=1||(O[3]=w[0]+(w[1]-w[0])*B),O}),m=[];for(A=0;A=0}function g(p,x,_,y){var C=s(x,_,y);if(C===0){var k=l(s(p,x,_)),S=l(s(p,x,y));if(k===S){if(k===0){var L=v(p,x,_),w=v(p,x,y);return L===w?0:L?1:-1}return 0}else{if(S===0)return k>0||v(p,x,y)?-1:1;if(k===0)return S>0||v(p,x,_)?1:-1}return l(S-k)}var A=s(p,x,_);if(A>0)return C>0&&s(p,x,y)>0?1:-1;if(A<0)return C>0||s(p,x,y)>0?1:-1;var T=s(p,x,y);return T>0||v(p,x,_)?1:-1}}),8572:(function(a){"use strict";a.exports=function(o){return o<0?-1:o>0?1:0}}),8507:(function(a){a.exports=s;var i=Math.min;function o(l,u){return l-u}function s(l,u){var c=l.length,f=l.length-u.length;if(f)return f;switch(c){case 0:return 0;case 1:return l[0]-u[0];case 2:return l[0]+l[1]-u[0]-u[1]||i(l[0],l[1])-i(u[0],u[1]);case 3:var v=l[0]+l[1],g=u[0]+u[1];if(f=v+l[2]-(g+u[2]),f)return f;var p=i(l[0],l[1]),x=i(u[0],u[1]);return i(p,l[2])-i(x,u[2])||i(p+l[2],v)-i(x+u[2],g);case 4:var _=l[0],y=l[1],C=l[2],k=l[3],S=u[0],L=u[1],w=u[2],A=u[3];return _+y+C+k-(S+L+w+A)||i(_,y,C,k)-i(S,L,w,A,S)||i(_+y,_+C,_+k,y+C,y+k,C+k)-i(S+L,S+w,S+A,L+w,L+A,w+A)||i(_+y+C,_+y+k,_+C+k,y+C+k)-i(S+L+w,S+L+A,S+w+A,L+w+A);default:for(var T=l.slice().sort(o),m=u.slice().sort(o),F=0;Fo[l][0]&&(l=u);return sl?[[l],[s]]:[[s]]}}),4750:(function(a,i,o){"use strict";a.exports=l;var s=o(3090);function l(u){var c=s(u),f=c.length;if(f<=2)return[];for(var v=new Array(f),g=c[f-1],p=0;p=g[S]&&(k+=1);y[C]=k}}return v}function f(v,g){try{return s(v,!0)}catch(y){var p=l(v);if(p.length<=g)return[];var x=u(v,p),_=s(x,!0);return c(_,p)}}}),4769:(function(a){"use strict";function i(s,l,u,c,f,v){var g=6*f*f-6*f,p=3*f*f-4*f+1,x=-6*f*f+6*f,_=3*f*f-2*f;if(s.length){v||(v=new Array(s.length));for(var y=s.length-1;y>=0;--y)v[y]=g*s[y]+p*l[y]+x*u[y]+_*c[y];return v}return g*s+p*l+x*u[y]+_*c}function o(s,l,u,c,f,v){var g=f-1,p=f*f,x=g*g,_=(1+2*f)*x,y=f*x,C=p*(3-2*f),k=p*g;if(s.length){v||(v=new Array(s.length));for(var S=s.length-1;S>=0;--S)v[S]=_*s[S]+y*l[S]+C*u[S]+k*c[S];return v}return _*s+y*l+C*u+k*c}a.exports=o,a.exports.derivative=i}),7642:(function(a,i,o){"use strict";var s=o(8954),l=o(1682);a.exports=v;function u(g,p){this.point=g,this.index=p}function c(g,p){for(var x=g.point,_=p.point,y=x.length,C=0;C=2)return!1;O[j]=q}return!0}):B=B.filter(function(O){for(var V=0;V<=_;++V){var j=F[O[V]];if(j<0)return!1;O[V]=j}return!0}),_&1)for(var k=0;k>>31},a.exports.exponent=function(C){var k=a.exports.hi(C);return(k<<1>>>21)-1023},a.exports.fraction=function(C){var k=a.exports.lo(C),S=a.exports.hi(C),L=S&(1<<20)-1;return S&2146435072&&(L+=1048576),[k,L]},a.exports.denormalized=function(C){var k=a.exports.hi(C);return!(k&2146435072)}}),1338:(function(a){"use strict";function i(l,u,c){var f=l[c]|0;if(f<=0)return[];var v=new Array(f),g;if(c===l.length-1)for(g=0;g0)return o(l|0,u);break;case"object":if(typeof l.length=="number")return i(l,u,0);break}return[]}a.exports=s}),3134:(function(a,i,o){"use strict";a.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!="number"){c=0;for(var v=0;v=_-1)for(var A=k.length-1,m=p-x[_-1],T=0;T=_-1)for(var w=k.length-1,A=p-x[_-1],T=0;T=0;--_)if(p[--x])return!1;return!0},f.jump=function(p){var x=this.lastT(),_=this.dimension;if(!(p0;--T)y.push(u(L[T-1],w[T-1],arguments[T])),C.push(0)}},f.push=function(p){var x=this.lastT(),_=this.dimension;if(!(p1e-6?1/S:0;this._time.push(p);for(var m=_;m>0;--m){var F=u(w[m-1],A[m-1],arguments[m]);y.push(F),C.push((F-y[k++])*T)}}},f.set=function(p){var x=this.dimension;if(!(p0;--L)_.push(u(k[L-1],S[L-1],arguments[L])),y.push(0)}},f.move=function(p){var x=this.lastT(),_=this.dimension;if(!(p<=x||arguments.length!==_+1)){var y=this._state,C=this._velocity,k=y.length-this.dimension,S=this.bounds,L=S[0],w=S[1],A=p-x,T=A>1e-6?1/A:0;this._time.push(p);for(var m=_;m>0;--m){var F=arguments[m];y.push(u(L[m-1],w[m-1],y[k++]+F)),C.push(F*T)}}},f.idle=function(p){var x=this.lastT();if(!(p=0;--T)y.push(u(L[T],w[T],y[k]+A*C[k])),C.push(0),k+=1}};function v(p){for(var x=new Array(p),_=0;_=0;--R){var m=F[R];E[R]<=0?F[R]=new s(m._color,m.key,m.value,F[R+1],m.right,m._count+1):F[R]=new s(m._color,m.key,m.value,m.left,F[R+1],m._count+1)}for(var R=F.length-1;R>1;--R){var B=F[R-1],m=F[R];if(B._color===o||m._color===o)break;var O=F[R-2];if(O.left===B)if(B.left===m){var V=O.right;if(V&&V._color===i)B._color=o,O.right=u(o,V),O._color=i,R-=1;else{if(O._color=i,O.left=B.right,B._color=o,B.right=O,F[R-2]=B,F[R-1]=m,c(O),c(B),R>=3){var j=F[R-3];j.left===O?j.left=B:j.right=B}break}}else{var V=O.right;if(V&&V._color===i)B._color=o,O.right=u(o,V),O._color=i,R-=1;else{if(B.right=m.left,O._color=i,O.left=m.right,m._color=o,m.left=B,m.right=O,F[R-2]=m,F[R-1]=B,c(O),c(B),c(m),R>=3){var j=F[R-3];j.left===O?j.left=m:j.right=m}break}}else if(B.right===m){var V=O.left;if(V&&V._color===i)B._color=o,O.left=u(o,V),O._color=i,R-=1;else{if(O._color=i,O.right=B.left,B._color=o,B.left=O,F[R-2]=B,F[R-1]=m,c(O),c(B),R>=3){var j=F[R-3];j.right===O?j.right=B:j.left=B}break}}else{var V=O.left;if(V&&V._color===i)B._color=o,O.left=u(o,V),O._color=i,R-=1;else{if(B.left=m.right,O._color=i,O.right=m.left,m._color=o,m.right=B,m.left=O,F[R-2]=m,F[R-1]=B,c(O),c(B),c(m),R>=3){var j=F[R-3];j.right===O?j.right=m:j.left=m}break}}}return F[0]._color=o,new f(T,F[0])};function g(w,A){if(A.left){var T=g(w,A.left);if(T)return T}var T=w(A.key,A.value);if(T)return T;if(A.right)return g(w,A.right)}function p(w,A,T,m){var F=A(w,m.key);if(F<=0){if(m.left){var E=p(w,A,T,m.left);if(E)return E}var E=T(m.key,m.value);if(E)return E}if(m.right)return p(w,A,T,m.right)}function x(w,A,T,m,F){var E=T(w,F.key),I=T(A,F.key),R;if(E<=0&&(F.left&&(R=x(w,A,T,m,F.left),R)||I>0&&(R=m(F.key,F.value),R)))return R;if(I>0&&F.right)return x(w,A,T,m,F.right)}v.forEach=function(A,T,m){if(this.root)switch(arguments.length){case 1:return g(A,this.root);case 2:return p(T,this._compare,A,this.root);case 3:return this._compare(T,m)>=0?void 0:x(T,m,this._compare,A,this.root)}},Object.defineProperty(v,"begin",{get:function(){for(var w=[],A=this.root;A;)w.push(A),A=A.left;return new _(this,w)}}),Object.defineProperty(v,"end",{get:function(){for(var w=[],A=this.root;A;)w.push(A),A=A.right;return new _(this,w)}}),v.at=function(w){if(w<0)return new _(this,[]);for(var A=this.root,T=[];;){if(T.push(A),A.left){if(w=A.right._count)break;A=A.right}else break}return new _(this,[])},v.ge=function(w){for(var A=this._compare,T=this.root,m=[],F=0;T;){var E=A(w,T.key);m.push(T),E<=0&&(F=m.length),E<=0?T=T.left:T=T.right}return m.length=F,new _(this,m)},v.gt=function(w){for(var A=this._compare,T=this.root,m=[],F=0;T;){var E=A(w,T.key);m.push(T),E<0&&(F=m.length),E<0?T=T.left:T=T.right}return m.length=F,new _(this,m)},v.lt=function(w){for(var A=this._compare,T=this.root,m=[],F=0;T;){var E=A(w,T.key);m.push(T),E>0&&(F=m.length),E<=0?T=T.left:T=T.right}return m.length=F,new _(this,m)},v.le=function(w){for(var A=this._compare,T=this.root,m=[],F=0;T;){var E=A(w,T.key);m.push(T),E>=0&&(F=m.length),E<0?T=T.left:T=T.right}return m.length=F,new _(this,m)},v.find=function(w){for(var A=this._compare,T=this.root,m=[];T;){var F=A(w,T.key);if(m.push(T),F===0)return new _(this,m);F<=0?T=T.left:T=T.right}return new _(this,[])},v.remove=function(w){var A=this.find(w);return A?A.remove():this},v.get=function(w){for(var A=this._compare,T=this.root;T;){var m=A(w,T.key);if(m===0)return T.value;m<=0?T=T.left:T=T.right}};function _(w,A){this.tree=w,this._stack=A}var y=_.prototype;Object.defineProperty(y,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(y,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),y.clone=function(){return new _(this.tree,this._stack.slice())};function C(w,A){w.key=A.key,w.value=A.value,w.left=A.left,w.right=A.right,w._color=A._color,w._count=A._count}function k(w){for(var A,T,m,F,E=w.length-1;E>=0;--E){if(A=w[E],E===0){A._color=o;return}if(T=w[E-1],T.left===A){if(m=T.right,m.right&&m.right._color===i){if(m=T.right=l(m),F=m.right=l(m.right),T.right=m.left,m.left=T,m.right=F,m._color=T._color,A._color=o,T._color=o,F._color=o,c(T),c(m),E>1){var I=w[E-2];I.left===T?I.left=m:I.right=m}w[E-1]=m;return}else if(m.left&&m.left._color===i){if(m=T.right=l(m),F=m.left=l(m.left),T.right=F.left,m.left=F.right,F.left=T,F.right=m,F._color=T._color,T._color=o,m._color=o,A._color=o,c(T),c(m),c(F),E>1){var I=w[E-2];I.left===T?I.left=F:I.right=F}w[E-1]=F;return}if(m._color===o)if(T._color===i){T._color=o,T.right=u(i,m);return}else{T.right=u(i,m);continue}else{if(m=l(m),T.right=m.left,m.left=T,m._color=T._color,T._color=i,c(T),c(m),E>1){var I=w[E-2];I.left===T?I.left=m:I.right=m}w[E-1]=m,w[E]=T,E+11){var I=w[E-2];I.right===T?I.right=m:I.left=m}w[E-1]=m;return}else if(m.right&&m.right._color===i){if(m=T.left=l(m),F=m.right=l(m.right),T.left=F.right,m.right=F.left,F.right=T,F.left=m,F._color=T._color,T._color=o,m._color=o,A._color=o,c(T),c(m),c(F),E>1){var I=w[E-2];I.right===T?I.right=F:I.left=F}w[E-1]=F;return}if(m._color===o)if(T._color===i){T._color=o,T.left=u(i,m);return}else{T.left=u(i,m);continue}else{if(m=l(m),T.left=m.right,m.right=T,m._color=T._color,T._color=i,c(T),c(m),E>1){var I=w[E-2];I.right===T?I.right=m:I.left=m}w[E-1]=m,w[E]=T,E+1=0;--m){var T=w[m];T.left===w[m+1]?A[m]=new s(T._color,T.key,T.value,A[m+1],T.right,T._count):A[m]=new s(T._color,T.key,T.value,T.left,A[m+1],T._count)}if(T=A[A.length-1],T.left&&T.right){var F=A.length;for(T=T.left;T.right;)A.push(T),T=T.right;var E=A[F-1];A.push(new s(T._color,E.key,E.value,T.left,T.right,T._count)),A[F-1].key=T.key,A[F-1].value=T.value;for(var m=A.length-2;m>=F;--m)T=A[m],A[m]=new s(T._color,T.key,T.value,T.left,A[m+1],T._count);A[F-1].left=A[F]}if(T=A[A.length-1],T._color===i){var I=A[A.length-2];I.left===T?I.left=null:I.right===T&&(I.right=null),A.pop();for(var m=0;m0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(y,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(y,"index",{get:function(){var w=0,A=this._stack;if(A.length===0){var T=this.tree.root;return T?T._count:0}else A[A.length-1].left&&(w=A[A.length-1].left._count);for(var m=A.length-2;m>=0;--m)A[m+1]===A[m].right&&(++w,A[m].left&&(w+=A[m].left._count));return w},enumerable:!0}),y.next=function(){var w=this._stack;if(w.length!==0){var A=w[w.length-1];if(A.right)for(A=A.right;A;)w.push(A),A=A.left;else for(w.pop();w.length>0&&w[w.length-1].right===A;)A=w[w.length-1],w.pop()}},Object.defineProperty(y,"hasNext",{get:function(){var w=this._stack;if(w.length===0)return!1;if(w[w.length-1].right)return!0;for(var A=w.length-1;A>0;--A)if(w[A-1].left===w[A])return!0;return!1}}),y.update=function(w){var A=this._stack;if(A.length===0)throw new Error("Can't update empty node!");var T=new Array(A.length),m=A[A.length-1];T[T.length-1]=new s(m._color,m.key,w,m.left,m.right,m._count);for(var F=A.length-2;F>=0;--F)m=A[F],m.left===A[F+1]?T[F]=new s(m._color,m.key,m.value,T[F+1],m.right,m._count):T[F]=new s(m._color,m.key,m.value,m.left,T[F+1],m._count);return new f(this.tree._compare,T[0])},y.prev=function(){var w=this._stack;if(w.length!==0){var A=w[w.length-1];if(A.left)for(A=A.left;A;)w.push(A),A=A.right;else for(w.pop();w.length>0&&w[w.length-1].left===A;)A=w[w.length-1],w.pop()}},Object.defineProperty(y,"hasPrev",{get:function(){var w=this._stack;if(w.length===0)return!1;if(w[w.length-1].left)return!0;for(var A=w.length-1;A>0;--A)if(w[A-1].right===w[A])return!0;return!1}});function S(w,A){return wA?1:0}function L(w){return new f(w||S,null)}}),3837:(function(a,i,o){"use strict";a.exports=R;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),v=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),g=ArrayBuffer,p=DataView;function x(B){return g.isView(B)&&!(B instanceof p)}function _(B){return Array.isArray(B)||x(B)}function y(B,O){return B[0]=O[0],B[1]=O[1],B[2]=O[2],B}function C(B){this.gl=B,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=u(B)}var k=C.prototype;k.update=function(B){B=B||{};function O(ae,pe,ie){if(ie in B){var le=B[ie],me=this[ie],be;(ae?_(le)&&_(le[0]):_(le))?this[ie]=be=[pe(le[0]),pe(le[1]),pe(le[2])]:this[ie]=be=[pe(le),pe(le),pe(le)];for(var De=0;De<3;++De)if(be[De]!==me[De])return!0}return!1}var V=O.bind(this,!1,Number),j=O.bind(this,!1,Boolean),q=O.bind(this,!1,String),U=O.bind(this,!0,function(ae){if(_(ae)){if(ae.length===3)return[+ae[0],+ae[1],+ae[2],1];if(ae.length===4)return[+ae[0],+ae[1],+ae[2],+ae[3]]}return[0,0,0,1]}),J,ee=!1,ce=!1;if("bounds"in B)for(var ye=B.bounds,xe=0;xe<2;++xe)for(var ue=0;ue<3;++ue)ye[xe][ue]!==this.bounds[xe][ue]&&(ce=!0),this.bounds[xe][ue]=ye[xe][ue];if("ticks"in B){J=B.ticks,ee=!0,this.autoTicks=!1;for(var xe=0;xe<3;++xe)this.tickSpacing[xe]=0}else V("tickSpacing")&&(this.autoTicks=!0,ce=!0);if(this._firstInit&&("ticks"in B||"tickSpacing"in B||(this.autoTicks=!0),ce=!0,ee=!0,this._firstInit=!1),ce&&this.autoTicks&&(J=f.create(this.bounds,this.tickSpacing),ee=!0),ee){for(var xe=0;xe<3;++xe)J[xe].sort(function(pe,ie){return pe.x-ie.x});f.equal(J,this.ticks)?ee=!1:this.ticks=J}j("tickEnable"),q("tickFont")&&(ee=!0),q("tickFontStyle")&&(ee=!0),q("tickFontWeight")&&(ee=!0),q("tickFontVariant")&&(ee=!0),V("tickSize"),V("tickAngle"),V("tickPad"),U("tickColor");var K=q("labels");q("labelFont")&&(K=!0),q("labelFontStyle")&&(K=!0),q("labelFontWeight")&&(K=!0),q("labelFontVariant")&&(K=!0),j("labelEnable"),V("labelSize"),V("labelPad"),U("labelColor"),j("lineEnable"),j("lineMirror"),V("lineWidth"),U("lineColor"),j("lineTickEnable"),j("lineTickMirror"),V("lineTickLength"),V("lineTickWidth"),U("lineTickColor"),j("gridEnable"),V("gridWidth"),U("gridColor"),j("zeroEnable"),U("zeroLineColor"),V("zeroLineWidth"),j("backgroundEnable"),U("backgroundColor");var _e=[{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]}],ne=[{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&&(K||ee)&&this._text.update(this.bounds,this.labels,_e,this.ticks,ne):this._text=s(this.gl,this.bounds,this.labels,_e,this.ticks,ne),this._lines&&ee&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};function S(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var L=[new S,new S,new S];function w(B,O,V,j,q){for(var U=B.primalOffset,J=B.primalMinor,ee=B.mirrorOffset,ce=B.mirrorMinor,ye=j[O],xe=0;xe<3;++xe)if(O!==xe){var ue=U,K=ee,_e=J,ne=ce;ye&1<0?(_e[xe]=-1,ne[xe]=0):(_e[xe]=0,ne[xe]=1)}}var A=[0,0,0],T={model:v,view:v,projection:v,_ortho:!1};k.isOpaque=function(){return!0},k.isTransparent=function(){return!1},k.drawTransparent=function(B){};var m=0,F=[0,0,0],E=[0,0,0],I=[0,0,0];k.draw=function(B){B=B||T;for(var ie=this.gl,O=B.model||v,V=B.view||v,j=B.projection||v,q=this.bounds,U=B._ortho||!1,J=c(O,V,j,q,U),ee=J.cubeEdges,ce=J.axis,ye=V[12],xe=V[13],ue=V[14],K=V[15],_e=U?2:1,ne=_e*this.pixelRatio*(j[3]*ye+j[7]*xe+j[11]*ue+j[15]*K)/ie.drawingBufferHeight,ae=0;ae<3;++ae)this.lastCubeProps.cubeEdges[ae]=ee[ae],this.lastCubeProps.axis[ae]=ce[ae];for(var pe=L,ae=0;ae<3;++ae)w(L[ae],ae,this.bounds,ee,ce);for(var ie=this.gl,le=A,ae=0;ae<3;++ae)this.backgroundEnable[ae]?le[ae]=ce[ae]:le[ae]=0;this._background.draw(O,V,j,q,le,this.backgroundColor),this._lines.bind(O,V,j,this);for(var ae=0;ae<3;++ae){var me=[0,0,0];ce[ae]>0?me[ae]=q[1][ae]:me[ae]=q[0][ae];for(var be=0;be<2;++be){var De=(ae+1+be)%3,Ge=(ae+1+(be^1))%3;this.gridEnable[De]&&this._lines.drawGrid(De,Ge,this.bounds,me,this.gridColor[De],this.gridWidth[De]*this.pixelRatio)}for(var be=0;be<2;++be){var De=(ae+1+be)%3,Ge=(ae+1+(be^1))%3;this.zeroEnable[Ge]&&Math.min(q[0][Ge],q[1][Ge])<=0&&Math.max(q[0][Ge],q[1][Ge])>=0&&this._lines.drawZero(De,Ge,this.bounds,me,this.zeroLineColor[Ge],this.zeroLineWidth[Ge]*this.pixelRatio)}}for(var ae=0;ae<3;++ae){this.lineEnable[ae]&&this._lines.drawAxisLine(ae,this.bounds,pe[ae].primalOffset,this.lineColor[ae],this.lineWidth[ae]*this.pixelRatio),this.lineMirror[ae]&&this._lines.drawAxisLine(ae,this.bounds,pe[ae].mirrorOffset,this.lineColor[ae],this.lineWidth[ae]*this.pixelRatio);for(var ht=y(F,pe[ae].primalMinor),it=y(E,pe[ae].mirrorMinor),Oe=this.lineTickLength,be=0;be<3;++be){var ze=ne/O[5*be];ht[be]*=Oe[be]*ze,it[be]*=Oe[be]*ze}this.lineTickEnable[ae]&&this._lines.drawAxisTicks(ae,pe[ae].primalOffset,ht,this.lineTickColor[ae],this.lineTickWidth[ae]*this.pixelRatio),this.lineTickMirror[ae]&&this._lines.drawAxisTicks(ae,pe[ae].mirrorOffset,it,this.lineTickColor[ae],this.lineTickWidth[ae]*this.pixelRatio)}this._lines.unbind(),this._text.bind(O,V,j,this.pixelRatio);var ct,et=.5,qe,we;function Le(tt){we=[0,0,0],we[tt]=1}function Ke(tt,nt,We){var mt=(tt+1)%3,bt=(tt+2)%3,Yt=nt[mt],jt=nt[bt],mr=We[mt],or=We[bt];if(Yt>0&&or>0){Le(mt);return}else if(Yt>0&&or<0){Le(mt);return}else if(Yt<0&&or>0){Le(mt);return}else if(Yt<0&&or<0){Le(mt);return}else if(jt>0&&mr>0){Le(bt);return}else if(jt>0&&mr<0){Le(bt);return}else if(jt<0&&mr>0){Le(bt);return}else if(jt<0&&mr<0){Le(bt);return}}for(var ae=0;ae<3;++ae){for(var Te=pe[ae].primalMinor,Ve=pe[ae].mirrorMinor,$e=y(I,pe[ae].primalOffset),be=0;be<3;++be)this.lineTickEnable[ae]&&($e[be]+=ne*Te[be]*Math.max(this.lineTickLength[be],0)/O[5*be]);var ot=[0,0,0];if(ot[ae]=1,this.tickEnable[ae]){this.tickAngle[ae]===-3600?(this.tickAngle[ae]=0,this.tickAlign[ae]="auto"):this.tickAlign[ae]=-1,qe=1,ct=[this.tickAlign[ae],et,qe],ct[0]==="auto"?ct[0]=m:ct[0]=parseInt(""+ct[0]),we=[0,0,0],Ke(ae,Te,Ve);for(var be=0;be<3;++be)$e[be]+=ne*Te[be]*this.tickPad[be]/O[5*be];this._text.drawTicks(ae,this.tickSize[ae],this.tickAngle[ae],$e,this.tickColor[ae],ot,we,ct)}if(this.labelEnable[ae]){qe=0,we=[0,0,0],this.labels[ae].length>4&&(Le(ae),qe=1),ct=[this.labelAlign[ae],et,qe],ct[0]==="auto"?ct[0]=m:ct[0]=parseInt(""+ct[0]);for(var be=0;be<3;++be)$e[be]+=ne*Te[be]*this.labelPad[be]/O[5*be];$e[ae]+=.5*(q[0][ae]+q[1][ae]),this._text.drawLabel(ae,this.labelSize[ae],this.labelAngle[ae],$e,this.labelColor[ae],[0,0,0],we,ct)}}this._text.unbind()},k.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function R(B,O){var V=new C(B);return V.update(O),V}}),5304:(function(a,i,o){"use strict";a.exports=v;var s=o(2762),l=o(8116),u=o(1879).bg;function c(g,p,x,_){this.gl=g,this.buffer=p,this.vao=x,this.shader=_}var f=c.prototype;f.draw=function(g,p,x,_,y,C){for(var k=!1,S=0;S<3;++S)k=k||y[S];if(k){var L=this.gl;L.enable(L.POLYGON_OFFSET_FILL),L.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:g,view:p,projection:x,bounds:_,enable:y,colors:C},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),L.disable(L.POLYGON_OFFSET_FILL)}},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function v(g){for(var p=[],x=[],_=0,y=0;y<3;++y)for(var C=(y+1)%3,k=(y+2)%3,S=[0,0,0],L=[0,0,0],w=-1;w<=1;w+=2){x.push(_,_+2,_+1,_+1,_+2,_+3),S[y]=w,L[y]=w;for(var A=-1;A<=1;A+=2){S[C]=A;for(var T=-1;T<=1;T+=2)S[k]=T,p.push(S[0],S[1],S[2],L[0],L[1],L[2]),_+=1}var m=C;C=k,k=m}var F=s(g,new Float32Array(p)),E=s(g,new Uint16Array(x),g.ELEMENT_ARRAY_BUFFER),I=l(g,[{buffer:F,type:g.FLOAT,size:3,offset:0,stride:24},{buffer:F,type:g.FLOAT,size:3,offset:12,stride:24}],E),R=u(g);return R.attributes.position.location=0,R.attributes.normal.location=1,new c(g,F,I,R)}}),6429:(function(a,i,o){"use strict";a.exports=w;var s=o(8828),l=o(6760),u=o(5202),c=o(3250),f=new Array(16),v=new Array(8),g=new Array(8),p=new Array(3),x=[0,0,0];(function(){for(var A=0;A<8;++A)v[A]=[1,1,1,1],g[A]=[1,1,1]})();function _(A,T,m){for(var F=0;F<4;++F){A[F]=m[12+F];for(var E=0;E<3;++E)A[F]+=T[E]*m[4*E+F]}}var y=[[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 C(A){for(var T=0;Tce&&(V|=1<ce){V|=1<g[R][1])&&(pe=R);for(var ie=-1,R=0;R<3;++R){var le=pe^1<g[me][0]&&(me=le)}}var be=k;be[0]=be[1]=be[2]=0,be[s.log2(ie^pe)]=pe&ie,be[s.log2(pe^me)]=pe&me;var De=me^7;De===V||De===ae?(De=ie^7,be[s.log2(me^De)]=De&me):be[s.log2(ie^De)]=De&ie;for(var Ge=S,ht=V,U=0;U<3;++U)ht&1<{"use strict";var wRt=ds().str2arr,TRt=ds().sliceEq,G8e=ds().readUInt32BE,ARt=wRt("8BPS\0");H8e.exports=function(e){if(!(e.length<22)&&TRt(e,0,ARt))return{width:G8e(e,18),height:G8e(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var X8e=fe((Exr,Y8e)=>{"use strict";function MRt(e){return e===32||e===9||e===13||e===10}function Cw(e){return typeof e=="number"&&isFinite(e)&&e>0}function SRt(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t]*>/,kRt=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,CRt=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,LRt=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,PRt=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,W8e=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function FRt(e){var t=e.match(CRt),r=e.match(LRt),n=e.match(PRt);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function x1(e){return W8e.test(e)?e.match(W8e)[0]:"px"}Y8e.exports=function(e){if(SRt(e)){for(var t="",r=0;r{"use strict";var K8e=ds().str2arr,Z8e=ds().sliceEq,DRt=ds().readUInt16LE,RRt=ds().readUInt16BE,IRt=ds().readUInt32LE,zRt=ds().readUInt32BE,qRt=K8e("II*\0"),BRt=K8e("MM\0*");function M9(e,t,r){return r?RRt(e,t):DRt(e,t)}function cW(e,t,r){return r?zRt(e,t):IRt(e,t)}function $8e(e,t,r){var n=M9(e,t+2,r),a=cW(e,t+4,r);return a!==1||n!==3&&n!==4?null:n===3?M9(e,t+8,r):cW(e,t+8,r)}J8e.exports=function(e){if(!(e.length<8)&&!(!Z8e(e,0,qRt)&&!Z8e(e,0,BRt))){var t=e[0]===77,r=cW(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var a=M9(e,n+0,t)*12;if(!(a<=0)&&(n+=2,!(e.length-n{"use strict";var rCe=ds().str2arr,eCe=ds().sliceEq,tCe=ds().readUInt16LE,fW=ds().readUInt32LE,ORt=T9(),NRt=rCe("RIFF"),URt=rCe("WEBP");function VRt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:tCe(e,t+6)&16383,height:tCe(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function GRt(e,t){if(e[t]===47){var r=fW(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function HRt(e,t){return{width:(e[t+6]<<16|e[t+5]<<8|e[t+4])+1,height:(e[t+9]<<16|e[t+8]<<8|e[t+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}nCe.exports=function(e){if(!(e.length<16)&&!(!eCe(e,0,NRt)||!eCe(e,8,URt))){var t=12,r=null,n=0,a=fW(e,4)+8;if(!(a>e.length)){for(;t+8=10?r=r||VRt(e,t+8):i==="VP8L"&&o>=5?r=r||GRt(e,t+8):i==="VP8X"&&o>=10?r=r||HRt(e,t+8):i==="EXIF"&&(n=ORt.get_orientation(e.slice(t+8,t+8+o)),t=1/0),t+=8+o}if(r)return n>0&&(r.orientation=n),r}}}});var oCe=fe((Lxr,aCe)=>{"use strict";aCe.exports={avif:A8e(),bmp:k8e(),gif:D8e(),ico:I8e(),jpeg:q8e(),png:V8e(),psd:j8e(),svg:X8e(),tiff:Q8e(),webp:iCe()}});var sCe=fe((Pxr,dW)=>{"use strict";var hW=oCe();function jRt(e){for(var t=Object.keys(hW),r=0;r0&&n.height>0?n:null}return null}dW.exports=function(t){return jRt(t)};dW.exports.parsers=hW});var uCe=fe(lCe=>{"use strict";var WRt=sCe(),YRt=ag().IMAGE_URL_PREFIX,XRt=Mx().Buffer;lCe.getImageSize=function(e){var t=e.replace(YRt,""),r=new XRt(t,"base64");return WRt(r)}});var hCe=fe((Dxr,fCe)=>{"use strict";var cCe=Xt(),ZRt=iw(),$Rt=aa(),S9=Yi(),KRt=Xt().maxRowLength,JRt=uCe().getImageSize;fCe.exports=function(t,r){var n,a;if(r._hasZ)n=r.z.length,a=KRt(r.z);else if(r._hasSource){var i=JRt(r.source);n=i.height,a=i.width}var o=S9.getFromId(t,r.xaxis||"x"),s=S9.getFromId(t,r.yaxis||"y"),l=o.d2c(r.x0)-r.dx/2,u=s.d2c(r.y0)-r.dy/2,c,f=[l,l+a*r.dx],v=[u,u+n*r.dy];if(o&&o.type==="log")for(c=0;c{"use strict";var rIt=xi(),Nx=Xt(),dCe=Nx.strTranslate,nIt=ev(),iIt=iw(),aIt=eG(),oIt=x7().STYLE;vCe.exports=function(t,r,n,a){var i=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&aIt();Nx.makeTraceGroups(a,n,"im").each(function(l){var u=rIt.select(this),c=l[0],f=c.trace,v=(f.zsmooth==="fast"||f.zsmooth===!1&&s)&&!f._hasZ&&f._hasSource&&i.type==="linear"&&o.type==="linear";f._realImage=v;var g=c.z,p=c.x0,_=c.y0,x=c.w,y=c.h,C=f.dx,k=f.dy,S,L,w,T,A,m;for(m=0;S===void 0&&m0;)L=i.c2p(p+m*C),m--;for(m=0;T===void 0&&m0;)A=o.c2p(_+m*k),m--;if(LV[0];if(K||ee){var ce=S+E/2,me=T+I/2;j+="transform:"+dCe(ce+"px",me+"px")+"scale("+(K?-1:1)+","+(ee?-1:1)+")"+dCe(-ce+"px",-me+"px")+";"}}U.attr("style",j);var ye=new Promise(function(ue){if(f._hasZ)ue();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===x&&f._canvas.el.height===y&&f._canvas.source===f.source)ue();else{var J=document.createElement("canvas");J.width=x,J.height=y;var _e=J.getContext("2d",{willReadFrequently:!0});f._image=f._image||new Image;var ne=f._image;ne.onload=function(){_e.drawImage(ne,0,0),f._canvas={el:J,source:f.source},ue()},ne.setAttribute("src",f.source)}}).then(function(){var ue,J;if(f._hasZ)J=O(function(ae,pe){var ie=g[pe][ae];return Nx.isTypedArray(ie)&&(ie=Array.from(ie)),ie}),ue=J.toDataURL("image/png");else if(f._hasSource)if(v)ue=f.source;else{var _e=f._canvas.el.getContext("2d",{willReadFrequently:!0}),ne=_e.getImageData(0,0,x,y).data;J=O(function(ae,pe){var ie=4*(pe*x+ae);return[ne[ie],ne[ie+1],ne[ie+2],ne[ie+3]]}),ue=J.toDataURL("image/png")}U.attr({"xlink:href":ue,height:I,width:E,x:S,y:T})});t._promises.push(ye)})}});var mCe=fe((Ixr,gCe)=>{"use strict";var sIt=xi();gCe.exports=function(t){sIt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var bCe=fe((zxr,_Ce)=>{"use strict";var yCe=kl(),xCe=Xt(),E9=xCe.isArrayOrTypedArray,lIt=iw();_Ce.exports=function(t,r,n){var a=t.cd[0],i=a.trace,o=t.xa,s=t.ya;if(!(yCe.inbox(r-a.x0,r-(a.x0+a.w*i.dx),0)>0||yCe.inbox(n-a.y0,n-(a.y0+a.h*i.dy),0)>0)){var l=Math.floor((r-a.x0)/i.dx),u=Math.floor(Math.abs(n-a.y0)/i.dy),c;if(i._hasZ?c=a.z[u][l]:i._hasSource&&(c=i._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,u,1,1).data),!!c){var f=a.hi||i.hoverinfo,v;if(f){var g=f.split("+");g.indexOf("all")!==-1&&(g=["color"]),g.indexOf("color")!==-1&&(v=!0)}var p=lIt.colormodel[i.colormodel],_=p.colormodel||i.colormodel,x=_.length,y=i._scaler(c),C=p.suffix,k=[];(i.hovertemplate||v)&&(k.push("["+[y[0]+C[0],y[1]+C[1],y[2]+C[2]].join(", ")),x===4&&k.push(", "+y[3]+C[3]),k.push("]"),k=k.join(""),t.extraText=_.toUpperCase()+": "+k);var S;E9(i.hovertext)&&E9(i.hovertext[u])?S=i.hovertext[u][l]:E9(i.text)&&E9(i.text[u])&&(S=i.text[u][l]);var L=s.c2p(a.y0+(u+.5)*i.dy),w=a.x0+(l+.5)*i.dx,T=a.y0+(u+.5)*i.dy,A="["+c.slice(0,i.colormodel.length).join(", ")+"]";return[xCe.extendFlat(t,{index:[u,l],x0:o.c2p(a.x0+l*i.dx),x1:o.c2p(a.x0+(l+1)*i.dx),y0:L,y1:L,color:y,xVal:w,xLabelVal:w,yVal:T,yLabelVal:T,zLabelVal:A,text:S,hovertemplateLabels:{zLabel:A,colorLabel:k,"color[0]Label":y[0]+C[0],"color[1]Label":y[1]+C[1],"color[2]Label":y[2]+C[2],"color[3]Label":y[3]+C[3]}})]}}}});var TCe=fe((qxr,wCe)=>{"use strict";wCe.exports=function(t,r){return"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t.color=r.color,t.colormodel=r.trace.colormodel,t.z||(t.z=r.color),t}});var MCe=fe((Bxr,ACe)=>{"use strict";ACe.exports={attributes:(fH(),Gs(cH)).default,supplyDefaults:hAe(),calc:hCe(),plot:pCe(),style:mCe(),hoverPoints:bCe(),eventData:TCe(),moduleType:"trace",name:"image",basePlotModule:gu(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var ECe=fe((Oxr,SCe)=>{"use strict";SCe.exports=MCe()});var Ux=fe((Nxr,CCe)=>{"use strict";var k9=Ho(),uIt=nl().attributes,cIt=Ds(),fIt=tc(),{hovertemplateAttrs:hIt,texttemplateAttrs:dIt,templatefallbackAttrs:kCe}=Oo(),sy=ta().extendFlat,vIt=Uc().pattern,C9=cIt({editType:"plot",arrayOk:!0,colorEditType:"plot"});CCe.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:fIt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:vIt,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:sy({},k9.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:hIt({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:kCe(),texttemplate:dIt({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:kCe({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:sy({},C9,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:sy({},C9,{}),outsidetextfont:sy({},C9,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:sy({},k9.showlegend,{arrayOk:!0}),legend:sy({},k9.legend,{arrayOk:!0}),legendrank:sy({},k9.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:sy({},C9,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:uIt({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"}}});var Vx=fe((Uxr,FCe)=>{"use strict";var pIt=aa(),q6=Xt(),gIt=Ux(),mIt=nl().defaults,yIt=q0().handleText,xIt=Xt().coercePattern;function LCe(e,t){var r=q6.isArrayOrTypedArray(e),n=q6.isArrayOrTypedArray(t),a=Math.min(r?e.length:1/0,n?t.length:1/0);if(isFinite(a)||(a=0),a&&n){for(var i,o=0;o0){i=!0;break}}i||(a=0)}return{hasLabels:r,hasValues:n,len:a}}function PCe(e,t,r,n,a){var i=n("marker.line.width");i&&n("marker.line.color",a?void 0:r.paper_bgcolor);var o=n("marker.colors");xIt(n,"marker.pattern",o),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}function _It(e,t,r,n){function a(C,k){return q6.coerce(e,t,gIt,C,k)}var i=a("labels"),o=a("values"),s=LCe(i,o),l=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(a("label0"),a("dlabel")),!l){t.visible=!1;return}t._length=l,PCe(e,t,n,a,!0),a("scalegroup");var u=a("text"),c=a("texttemplate");a("texttemplatefallback");var f;if(c||(f=a("textinfo",q6.isArrayOrTypedArray(u)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),c||f&&f!=="none"){var v=a("textposition");yIt(e,t,n,a,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var g=Array.isArray(v)||v==="auto",p=g||v==="outside";p&&a("automargin"),(v==="inside"||v==="auto"||Array.isArray(v))&&a("insidetextorientation")}else f==="none"&&a("textposition","none");mIt(t,n,a);var _=a("hole"),x=a("title.text");if(x){var y=a("title.position",_?"middle center":"top center");!_&&y==="middle center"&&(t.title.position="top center"),q6.coerceFont(a,"title.font",n.font)}a("sort"),a("direction"),a("rotation"),a("pull")}FCe.exports={handleLabelsAndValues:LCe,handleMarkerDefaults:PCe,supplyDefaults:_It}});var L9=fe((Vxr,DCe)=>{"use strict";DCe.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var ICe=fe((Gxr,RCe)=>{"use strict";var bIt=Xt(),wIt=L9();RCe.exports=function(t,r){function n(a,i){return bIt.coerce(t,r,wIt,a,i)}n("hiddenlabels"),n("piecolorway",r.colorway),n("extendpiecolors")}});var Pw=fe((Hxr,BCe)=>{"use strict";var TIt=aa(),Lw=ni(),AIt={};function MIt(e,t){var r=[],n=e._fullLayout,a=n.hiddenlabels||[],i=t.labels,o=t.marker.colors||[],s=t.values,l=t._length,u=t._hasValues&&l,c,f;if(t.dlabel)for(i=new Array(l),c=0;c=0});var S=t.type==="funnelarea"?_:t.sort;return S&&r.sort(function(L,w){return w.v-L.v}),r[0]&&(r[0].vTotal=p),r}function zCe(e){return function(r,n){if(!r||!Lw.isValid(r))return!1;let a=Lw.rgbaString(r);return e[n]||(e[n]=a),a}}function SIt(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,a=e.calcdata,i=n[r+"colorway"],o=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(i=qCe(i,AIt));for(var s=0,l=0;l{"use strict";var EIt=Sd().appendArrayMultiPointValues;OCe.exports=function(t,r){var n={curveNumber:r.index,pointNumbers:t.pts,data:r._input,fullData:r,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return t.pts.length===1&&(n.pointNumber=n.i=t.pts[0]),EIt(n,r,t.pts),r.type==="funnelarea"&&(delete n.v,delete n.i),n}});var R9=fe((Wxr,s7e)=>{"use strict";var u0=xi(),kIt=Hs(),P9=kl(),WCe=ni(),_g=Ji(),Qf=Xt(),CIt=Qf.strScale,UCe=Qf.strTranslate,vW=as(),YCe=kh(),LIt=YCe.recordMinTextSize,PIt=YCe.clearMinTextSize,XCe=Im().TEXTPAD,Aa=Sm(),F9=NCe(),VCe=Xt().isValidTextValue;function FIt(e,t){var r=e._context.staticPlot,n=e._fullLayout,a=n._size;PIt("pie",n),KCe(t,e),i7e(t,a);var i=Qf.makeTraceGroups(n._pielayer,t,"trace").each(function(o){var s=u0.select(this),l=o[0],u=l.trace;UIt(o),s.attr("stroke-linejoin","round"),s.each(function(){var c=u0.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var f=[[[],[]],[[],[]]],v=!1;c.each(function(S,L){if(S.hidden){u0.select(this).selectAll("path,g").remove();return}S.pointNumber=S.i,S.curveNumber=u.index,f[S.pxmid[1]<0?0:1][S.pxmid[0]<0?0:1].push(S);var w=l.cx,T=l.cy,A=u0.select(this),m=A.selectAll("path.surface").data([S]);if(m.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),A.call(ZCe,e,o),u.pull){var F=+Aa.castOption(u.pull,S.pts)||0;F>0&&(w+=F*S.pxmid[0],T+=F*S.pxmid[1])}S.cxFinal=w,S.cyFinal=T;function E(q,V,K,ee){var ce=ee*(V[0]-q[0]),me=ee*(V[1]-q[1]);return"a"+ee*l.r+","+ee*l.r+" 0 "+S.largeArc+(K?" 1 ":" 0 ")+ce+","+me}var I=u.hole;if(S.v===l.vTotal){var R="M"+(w+S.px0[0])+","+(T+S.px0[1])+E(S.px0,S.pxmid,!0,1)+E(S.pxmid,S.px0,!0,1)+"Z";I?m.attr("d","M"+(w+I*S.px0[0])+","+(T+I*S.px0[1])+E(S.px0,S.pxmid,!1,I)+E(S.pxmid,S.px0,!1,I)+"Z"+R):m.attr("d",R)}else{var B=E(S.px0,S.px1,!0,1);if(I){var O=1-I;m.attr("d","M"+(w+I*S.px1[0])+","+(T+I*S.px1[1])+E(S.px1,S.px0,!1,I)+"l"+O*S.px0[0]+","+O*S.px0[1]+B+"Z")}else m.attr("d","M"+w+","+T+"l"+S.px0[0]+","+S.px0[1]+B+"Z")}a7e(e,S,l);var U=Aa.castOption(u.textposition,S.pts),j=A.selectAll("g.slicetext").data(S.text&&U!=="none"?[0]:[]);j.enter().append("g").classed("slicetext",!0),j.exit().remove(),j.each(function(){var q=Qf.ensureSingle(u0.select(this),"text","",function(J){J.attr("data-notex",1)}),V=Qf.ensureUniformFontSize(e,U==="outside"?RIt(u,S,n.font):$Ce(u,S,n.font));q.text(S.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(_g.font,V).call(vW.convertToTspans,e);var K=_g.bBox(q.node()),ee;if(U==="outside")ee=jCe(K,S);else if(ee=JCe(K,S,l),U==="auto"&&ee.scale<1){var ce=Qf.ensureUniformFontSize(e,u.outsidetextfont);q.call(_g.font,ce),K=_g.bBox(q.node()),ee=jCe(K,S)}var me=ee.textPosAngle,ye=me===void 0?S.pxmid:D9(l.r,me);if(ee.targetX=w+ye[0]*ee.rCenter+(ee.x||0),ee.targetY=T+ye[1]*ee.rCenter+(ee.y||0),o7e(ee,K),ee.outside){var ue=ee.targetY;S.yLabelMin=ue-K.height/2,S.yLabelMid=ue,S.yLabelMax=ue+K.height/2,S.labelExtraX=0,S.labelExtraY=0,v=!0}ee.fontSize=V.size,LIt(u.type,ee,n),o[L].transform=ee,Qf.setTransormAndDisplay(q,ee)})});var g=u0.select(this).selectAll("g.titletext").data(u.title.text?[0]:[]);if(g.enter().append("g").classed("titletext",!0),g.exit().remove(),g.each(function(){var S=Qf.ensureSingle(u0.select(this),"text","",function(T){T.attr("data-notex",1)}),L=u.title.text;u._meta&&(L=Qf.templateString(L,u._meta)),S.text(L).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(_g.font,u.title.font).call(vW.convertToTspans,e);var w;u.title.position==="middle center"?w=qIt(l):w=r7e(l,a),S.attr("transform",UCe(w.x,w.y)+CIt(Math.min(1,w.scale))+UCe(w.tx,w.ty))}),v&&OIt(f,u),DIt(c,u),v&&u.automargin){var p=_g.bBox(s.node()),_=u.domain,x=a.w*(_.x[1]-_.x[0]),y=a.h*(_.y[1]-_.y[0]),C=(.5*x-l.r)/a.w,k=(.5*y-l.r)/a.h;kIt.autoMargin(e,"pie."+u.uid+".automargin",{xl:_.x[0]-C,xr:_.x[1]+C,yb:_.y[0]-k,yt:_.y[1]+k,l:Math.max(l.cx-l.r-p.left,0),r:Math.max(p.right-(l.cx+l.r),0),b:Math.max(p.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-p.top,0),pad:5})}})});setTimeout(function(){i.selectAll("tspan").each(function(){var o=u0.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function DIt(e,t){e.each(function(r){var n=u0.select(this);if(!r.labelExtraX&&!r.labelExtraY){n.select("path.textline").remove();return}var a=n.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,Qf.setTransormAndDisplay(a,r.transform);var i=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s="M"+i+","+o,l=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var u=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(u)>Math.abs(c)?s+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(i+r.labelExtraX+l):s+="l"+r.labelExtraX+","+u+"v"+(c-u)+"h"+l}else s+="V"+(r.yLabelMid+r.labelExtraY)+"h"+l;Qf.ensureSingle(n,"path","textline").call(WCe.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function ZCe(e,t,r){var n=r[0],a=n.cx,i=n.cy,o=n.trace,s=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),e.on("mouseover",function(l){var u=t._fullLayout,c=t._fullData[o.index];if(!(t._dragging||u.hovermode===!1)){var f=c.hoverinfo;if(Array.isArray(f)&&(f=P9.castHoverinfo({hoverinfo:[Aa.castOption(f,l.pts)],_module:o._module},u,0)),f==="all"&&(f="label+text+value+percent+name"),c.hovertemplate||f!=="none"&&f!=="skip"&&f){var v=l.rInscribed||0,g=a+l.pxmid[0]*(1-v),p=i+l.pxmid[1]*(1-v),_=u.separators,x=[];if(f&&f.indexOf("label")!==-1&&x.push(l.label),l.text=Aa.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf("text")!==-1){var y=l.text;Qf.isValidTextValue(y)&&x.push(y)}l.value=l.v,l.valueLabel=Aa.formatPieValue(l.v,_),f&&f.indexOf("value")!==-1&&x.push(l.valueLabel),l.percent=l.v/n.vTotal,l.percentLabel=Aa.formatPiePercent(l.percent,_),f&&f.indexOf("percent")!==-1&&x.push(l.percentLabel);var C=c.hoverlabel,k=C.font,S=[];P9.loneHover({trace:o,x0:g-v*n.r,x1:g+v*n.r,y:p,_x0:s?a+l.TL[0]:g-v*n.r,_x1:s?a+l.TR[0]:g+v*n.r,_y0:s?i+l.TL[1]:p-v*n.r,_y1:s?i+l.BL[1]:p+v*n.r,text:x.join("
"),name:c.hovertemplate||f.indexOf("name")!==-1?c.name:void 0,idealAlign:l.pxmid[0]<0?"left":"right",color:Aa.castOption(C.bgcolor,l.pts)||l.color,borderColor:Aa.castOption(C.bordercolor,l.pts),fontFamily:Aa.castOption(k.family,l.pts),fontSize:Aa.castOption(k.size,l.pts),fontColor:Aa.castOption(k.color,l.pts),nameLength:Aa.castOption(C.namelength,l.pts),textAlign:Aa.castOption(C.align,l.pts),hovertemplate:Aa.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[F9(l,c)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:t,inOut_bbox:S}),l.bbox=S[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[F9(l,c)],event:u0.event})}}),e.on("mouseout",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=u0.select(this).datum();o._hasHoverEvent&&(l.originalEvent=u0.event,t.emit("plotly_unhover",{points:[F9(f,c)],event:u0.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(P9.loneUnhover(u._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on("click",function(l){var u=t._fullLayout,c=t._fullData[o.index];t._dragging||u.hovermode===!1||(t._hoverdata=[F9(l,c)],P9.click(t,u0.event))})}function RIt(e,t,r){var n=Aa.castOption(e.outsidetextfont.color,t.pts)||Aa.castOption(e.textfont.color,t.pts)||r.color,a=Aa.castOption(e.outsidetextfont.family,t.pts)||Aa.castOption(e.textfont.family,t.pts)||r.family,i=Aa.castOption(e.outsidetextfont.size,t.pts)||Aa.castOption(e.textfont.size,t.pts)||r.size,o=Aa.castOption(e.outsidetextfont.weight,t.pts)||Aa.castOption(e.textfont.weight,t.pts)||r.weight,s=Aa.castOption(e.outsidetextfont.style,t.pts)||Aa.castOption(e.textfont.style,t.pts)||r.style,l=Aa.castOption(e.outsidetextfont.variant,t.pts)||Aa.castOption(e.textfont.variant,t.pts)||r.variant,u=Aa.castOption(e.outsidetextfont.textcase,t.pts)||Aa.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Aa.castOption(e.outsidetextfont.lineposition,t.pts)||Aa.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Aa.castOption(e.outsidetextfont.shadow,t.pts)||Aa.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n,family:a,size:i,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function $Ce(e,t,r){var n=Aa.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=Aa.castOption(e._input.textfont.color,t.pts));var a=Aa.castOption(e.insidetextfont.family,t.pts)||Aa.castOption(e.textfont.family,t.pts)||r.family,i=Aa.castOption(e.insidetextfont.size,t.pts)||Aa.castOption(e.textfont.size,t.pts)||r.size,o=Aa.castOption(e.insidetextfont.weight,t.pts)||Aa.castOption(e.textfont.weight,t.pts)||r.weight,s=Aa.castOption(e.insidetextfont.style,t.pts)||Aa.castOption(e.textfont.style,t.pts)||r.style,l=Aa.castOption(e.insidetextfont.variant,t.pts)||Aa.castOption(e.textfont.variant,t.pts)||r.variant,u=Aa.castOption(e.insidetextfont.textcase,t.pts)||Aa.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Aa.castOption(e.insidetextfont.lineposition,t.pts)||Aa.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Aa.castOption(e.insidetextfont.shadow,t.pts)||Aa.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||WCe.contrast(t.color),family:a,size:i,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function KCe(e,t){for(var r,n,a=0;a=-4;C-=2)y(Math.PI*C,"tan");for(C=4;C>=-4;C-=2)y(Math.PI*(C+1),"tan")}if(f||g){for(C=4;C>=-4;C-=2)y(Math.PI*(C+1.5),"rad");for(C=4;C>=-4;C-=2)y(Math.PI*(C+.5),"rad")}}if(s||p||f){var k=Math.sqrt(e.width*e.width+e.height*e.height);if(x={scale:a*n*2/k,rCenter:1-a,rotate:0},x.textPosAngle=(t.startangle+t.stopangle)/2,x.scale>=1)return x;_.push(x)}(p||g)&&(x=GCe(e,n,o,l,u),x.textPosAngle=(t.startangle+t.stopangle)/2,_.push(x)),(p||v)&&(x=HCe(e,n,o,l,u),x.textPosAngle=(t.startangle+t.stopangle)/2,_.push(x));for(var S=0,L=0,w=0;w<_.length;w++){var T=_[w].scale;if(L=1)break}return _[S]}function IIt(e,t){var r=e.startangle,n=e.stopangle;return r>t&&t>n||r0?1:-1)/2,y:i/(1+r*r/(n*n)),outside:!0}}function qIt(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function r7e(e,t){var r=1,n=1,a,i=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=i.title.font.size,a=n7e(i),i.title.position.indexOf("top")!==-1?(o.y-=(1+a)*e.r,s.ty-=e.titleBox.height):i.title.position.indexOf("bottom")!==-1&&(o.y+=(1+a)*e.r);var l=BIt(e.r,e.trace.aspectratio),u=t.w*(i.domain.x[1]-i.domain.x[0])/2;return i.title.position.indexOf("left")!==-1?(u=u+l,o.x-=(1+a)*l,s.tx+=e.titleBox.width/2):i.title.position.indexOf("center")!==-1?u*=2:i.title.position.indexOf("right")!==-1&&(u=u+l,o.x+=(1+a)*l,s.tx-=e.titleBox.width/2),r=u/e.titleBox.width,n=pW(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function BIt(e,t){return e/(t===void 0?1:t)}function pW(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function n7e(e){var t=e.pull;if(!t)return 0;var r;if(Qf.isArrayOrTypedArray(t))for(t=0,r=0;rt&&(t=e.pull[r]);return t}function OIt(e,t){var r,n,a,i,o,s,l,u,c,f,v,g,p;function _(k,S){return k.pxmid[1]-S.pxmid[1]}function x(k,S){return S.pxmid[1]-k.pxmid[1]}function y(k,S){S||(S={});var L=S.labelExtraY+(n?S.yLabelMax:S.yLabelMin),w=n?k.yLabelMin:k.yLabelMax,T=n?k.yLabelMax:k.yLabelMin,A=k.cyFinal+o(k.px0[1],k.px1[1]),m=L-w,F,E,I,R,B,O;if(m*l>0&&(k.labelExtraY=m),!!Qf.isArrayOrTypedArray(t.pull))for(E=0;E=(Aa.castOption(t.pull,I.pts)||0))&&((k.pxmid[1]-I.pxmid[1])*l>0?(R=I.cyFinal+o(I.px0[1],I.px1[1]),m=R-w-k.labelExtraY,m*l>0&&(k.labelExtraY+=m)):(T+k.labelExtraY-A)*l>0&&(F=3*s*Math.abs(E-f.indexOf(k)),B=I.cxFinal+i(I.px0[0],I.px1[0]),O=B+F-(k.cxFinal+k.pxmid[0])-k.labelExtraX,O*s>0&&(k.labelExtraX+=O)))}for(n=0;n<2;n++)for(a=n?_:x,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(i=r?Math.max:Math.min,s=r?1:-1,u=e[n][r],u.sort(a),c=e[1-n][r],f=c.concat(u),g=[],v=0;v1?(u=r.r,c=u/a.aspectratio):(c=r.r,u=c*a.aspectratio),u*=(1+a.baseratio)/2,l=u*c}o=Math.min(o,l/r.vTotal)}for(n=0;nt.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/t.vTotal,.5),u.ring=1-n.hole,u.rInscribed=zIt(u,t))}function D9(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function a7e(e,t,r){var n=e._fullLayout,a=r.trace,i=a.texttemplate,o=a.textinfo;if(!i&&o&&o!=="none"){var s=o.split("+"),l=function(S){return s.indexOf(S)!==-1},u=l("label"),c=l("text"),f=l("value"),v=l("percent"),g=n.separators,p;if(p=u?[t.label]:[],c){var _=Aa.getFirstFilled(a.text,t.pts);VCe(_)&&p.push(_)}f&&p.push(Aa.formatPieValue(t.v,g)),v&&p.push(Aa.formatPiePercent(t.v/r.vTotal,g)),t.text=p.join("
")}function x(S){return{label:S.label,value:S.v,valueLabel:Aa.formatPieValue(S.v,n.separators),percent:S.v/r.vTotal,percentLabel:Aa.formatPiePercent(S.v/r.vTotal,n.separators),color:S.color,text:S.text,customdata:Qf.castOption(a,S.i,"customdata")}}if(i){var y=Qf.castOption(a,t.i,"texttemplate");if(!y)t.text="";else{var C=x(t),k=Aa.getFirstFilled(a.text,t.pts);(VCe(k)||k==="")&&(C.text=k),t.text=Qf.texttemplateString({data:[C,a._meta],fallback:a.texttemplatefallback,labels:C,locale:e._fullLayout._d3locale,template:y})}}}function o7e(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),a=Math.sin(r),i=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=i*n-o*a,e.textY=i*a+o*n,e.noCenter=!0}s7e.exports={plot:FIt,formatSliceLabel:a7e,transformInsideText:JCe,determineInsideTextFont:$Ce,positionTitleOutside:r7e,prerenderTitles:KCe,layoutAreas:i7e,attachFxHandlers:ZCe,computeTransform:o7e}});var c7e=fe((Yxr,u7e)=>{"use strict";var l7e=xi(),VIt=Jb(),GIt=kh().resizeText;u7e.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");GIt(t,r,"pie"),r.each(function(n){var a=n[0],i=a.trace,o=l7e.select(this);o.style({opacity:i.opacity}),o.selectAll("path.surface").each(function(s){l7e.select(this).call(VIt,s,i,t)})})}});var h7e=fe(Fw=>{"use strict";var f7e=Hs();Fw.name="pie";Fw.plot=function(e,t,r,n){f7e.plotBasePlot(Fw.name,e,t,r,n)};Fw.clean=function(e,t,r,n){f7e.cleanBasePlot(Fw.name,e,t,r,n)}});var v7e=fe((Zxr,d7e)=>{"use strict";d7e.exports={attributes:Ux(),supplyDefaults:Vx().supplyDefaults,supplyLayoutDefaults:ICe(),layoutAttributes:L9(),calc:Pw().calc,crossTraceCalc:Pw().crossTraceCalc,plot:R9().plot,style:c7e(),styleOne:Jb(),moduleType:"trace",name:"pie",basePlotModule:h7e(),categories:["pie-like","pie","showLegend"],meta:{}}});var g7e=fe(($xr,p7e)=>{"use strict";p7e.exports=v7e()});var y7e=fe(Dw=>{"use strict";var m7e=Hs();Dw.name="sunburst";Dw.plot=function(e,t,r,n){m7e.plotBasePlot(Dw.name,e,t,r,n)};Dw.clean=function(e,t,r,n){m7e.cleanBasePlot(Dw.name,e,t,r,n)}});var gW=fe((Jxr,x7e)=>{"use strict";x7e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var O6=fe((Qxr,w7e)=>{"use strict";var HIt=Ho(),{hovertemplateAttrs:jIt,texttemplateAttrs:WIt,templatefallbackAttrs:_7e}=Oo(),YIt=_s(),XIt=nl().attributes,bg=Ux(),b7e=gW(),B6=ta().extendFlat,ZIt=Uc().pattern;w7e.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:B6({colors:{valType:"data_array",editType:"calc"},line:{color:B6({},bg.marker.line.color,{dflt:null}),width:B6({},bg.marker.line.width,{dflt:1}),editType:"calc"},pattern:ZIt,editType:"calc"},YIt("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:bg.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:WIt({editType:"plot"},{keys:b7e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:_7e({editType:"plot"}),hovertext:bg.hovertext,hoverinfo:B6({},HIt.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:jIt({},{keys:b7e.eventDataKeys}),hovertemplatefallback:_7e(),textfont:bg.textfont,insidetextorientation:bg.insidetextorientation,insidetextfont:bg.insidetextfont,outsidetextfont:B6({},bg.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:bg.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:XIt({name:"sunburst",trace:!0,editType:"calc"})}});var mW=fe((e_r,T7e)=>{"use strict";T7e.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var E7e=fe((t_r,S7e)=>{"use strict";var A7e=Xt(),$It=O6(),KIt=nl().defaults,JIt=q0().handleText,QIt=Vx().handleMarkerDefaults,M7e=js(),ezt=M7e.hasColorscale,tzt=M7e.handleDefaults;S7e.exports=function(t,r,n,a){function i(v,g){return A7e.coerce(t,r,$It,v,g)}var o=i("labels"),s=i("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=i("values");l&&l.length?i("branchvalues"):i("count"),i("level"),i("maxdepth"),QIt(t,r,a,i);var u=r._hasColorscale=ezt(t,"marker","colors")||(t.marker||{}).coloraxis;u&&tzt(t,r,a,i,{prefix:"marker.",cLetter:"c"}),i("leaf.opacity",u?1:.7);var c=i("text");i("texttemplate"),i("texttemplatefallback"),r.texttemplate||i("textinfo",A7e.isArrayOrTypedArray(c)?"text+label":"label"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var f="auto";JIt(t,r,a,i,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("insidetextorientation"),i("sort"),i("rotation"),i("root.color"),KIt(r,a,i),r._length=null}});var C7e=fe((r_r,k7e)=>{"use strict";var rzt=Xt(),nzt=mW();k7e.exports=function(t,r){function n(a,i){return rzt.coerce(t,r,nzt,a,i)}n("sunburstcolorway",r.colorway),n("extendsunburstcolors")}});var N6=fe((I9,L7e)=>{(function(e,t){typeof I9=="object"&&typeof L7e!="undefined"?t(I9):(e=e||self,t(e.d3=e.d3||{}))})(I9,function(e){"use strict";function t(wt,Tt){return wt.parent===Tt.parent?1:2}function r(wt){return wt.reduce(n,0)/wt.length}function n(wt,Tt){return wt+Tt.x}function a(wt){return 1+wt.reduce(i,0)}function i(wt,Tt){return Math.max(wt,Tt.y)}function o(wt){for(var Tt;Tt=wt.children;)wt=Tt[0];return wt}function s(wt){for(var Tt;Tt=wt.children;)wt=Tt[Tt.length-1];return wt}function l(){var wt=t,Tt=1,Mt=1,Lt=!1;function ft(kt){var rr,pr=0;kt.eachAfter(function(Fr){var Zr=Fr.children;Zr?(Fr.x=r(Zr),Fr.y=a(Zr)):(Fr.x=rr?pr+=wt(Fr,rr):0,Fr.y=0,rr=Fr)});var Kr=o(kt),Nr=s(kt),dn=Kr.x-wt(Kr,Nr)/2,xr=Nr.x+wt(Nr,Kr)/2;return kt.eachAfter(Lt?function(Fr){Fr.x=(Fr.x-kt.x)*Tt,Fr.y=(kt.y-Fr.y)*Mt}:function(Fr){Fr.x=(Fr.x-dn)/(xr-dn)*Tt,Fr.y=(1-(kt.y?Fr.y/kt.y:1))*Mt})}return ft.separation=function(kt){return arguments.length?(wt=kt,ft):wt},ft.size=function(kt){return arguments.length?(Lt=!1,Tt=+kt[0],Mt=+kt[1],ft):Lt?null:[Tt,Mt]},ft.nodeSize=function(kt){return arguments.length?(Lt=!0,Tt=+kt[0],Mt=+kt[1],ft):Lt?[Tt,Mt]:null},ft}function u(wt){var Tt=0,Mt=wt.children,Lt=Mt&&Mt.length;if(!Lt)Tt=1;else for(;--Lt>=0;)Tt+=Mt[Lt].value;wt.value=Tt}function c(){return this.eachAfter(u)}function f(wt){var Tt=this,Mt,Lt=[Tt],ft,kt,rr;do for(Mt=Lt.reverse(),Lt=[];Tt=Mt.pop();)if(wt(Tt),ft=Tt.children,ft)for(kt=0,rr=ft.length;kt=0;--ft)Mt.push(Lt[ft]);return this}function g(wt){for(var Tt=this,Mt=[Tt],Lt=[],ft,kt,rr;Tt=Mt.pop();)if(Lt.push(Tt),ft=Tt.children,ft)for(kt=0,rr=ft.length;kt=0;)Mt+=Lt[ft].value;Tt.value=Mt})}function _(wt){return this.eachBefore(function(Tt){Tt.children&&Tt.children.sort(wt)})}function x(wt){for(var Tt=this,Mt=y(Tt,wt),Lt=[Tt];Tt!==Mt;)Tt=Tt.parent,Lt.push(Tt);for(var ft=Lt.length;wt!==Mt;)Lt.splice(ft,0,wt),wt=wt.parent;return Lt}function y(wt,Tt){if(wt===Tt)return wt;var Mt=wt.ancestors(),Lt=Tt.ancestors(),ft=null;for(wt=Mt.pop(),Tt=Lt.pop();wt===Tt;)ft=wt,wt=Mt.pop(),Tt=Lt.pop();return ft}function C(){for(var wt=this,Tt=[wt];wt=wt.parent;)Tt.push(wt);return Tt}function k(){var wt=[];return this.each(function(Tt){wt.push(Tt)}),wt}function S(){var wt=[];return this.eachBefore(function(Tt){Tt.children||wt.push(Tt)}),wt}function L(){var wt=this,Tt=[];return wt.each(function(Mt){Mt!==wt&&Tt.push({source:Mt.parent,target:Mt})}),Tt}function w(wt,Tt){var Mt=new E(wt),Lt=+wt.value&&(Mt.value=wt.value),ft,kt=[Mt],rr,pr,Kr,Nr;for(Tt==null&&(Tt=A);ft=kt.pop();)if(Lt&&(ft.value=+ft.data.value),(pr=Tt(ft.data))&&(Nr=pr.length))for(ft.children=new Array(Nr),Kr=Nr-1;Kr>=0;--Kr)kt.push(rr=ft.children[Kr]=new E(pr[Kr])),rr.parent=ft,rr.depth=ft.depth+1;return Mt.eachBefore(F)}function T(){return w(this).eachBefore(m)}function A(wt){return wt.children}function m(wt){wt.data=wt.data.data}function F(wt){var Tt=0;do wt.height=Tt;while((wt=wt.parent)&&wt.height<++Tt)}function E(wt){this.data=wt,this.depth=this.height=0,this.parent=null}E.prototype=w.prototype={constructor:E,count:c,each:f,eachAfter:g,eachBefore:v,sum:p,sort:_,path:x,ancestors:C,descendants:k,leaves:S,links:L,copy:T};var I=Array.prototype.slice;function R(wt){for(var Tt=wt.length,Mt,Lt;Tt;)Lt=Math.random()*Tt--|0,Mt=wt[Tt],wt[Tt]=wt[Lt],wt[Lt]=Mt;return wt}function B(wt){for(var Tt=0,Mt=(wt=R(I.call(wt))).length,Lt=[],ft,kt;Tt0&&Mt*Mt>Lt*Lt+ft*ft}function q(wt,Tt){for(var Mt=0;MtKr?(ft=(Nr+Kr-kt)/(2*Nr),pr=Math.sqrt(Math.max(0,Kr/Nr-ft*ft)),Mt.x=wt.x-ft*Lt-pr*rr,Mt.y=wt.y-ft*rr+pr*Lt):(ft=(Nr+kt-Kr)/(2*Nr),pr=Math.sqrt(Math.max(0,kt/Nr-ft*ft)),Mt.x=Tt.x+ft*Lt-pr*rr,Mt.y=Tt.y+ft*rr+pr*Lt)):(Mt.x=Tt.x+Mt.r,Mt.y=Tt.y)}function ye(wt,Tt){var Mt=wt.r+Tt.r-1e-6,Lt=Tt.x-wt.x,ft=Tt.y-wt.y;return Mt>0&&Mt*Mt>Lt*Lt+ft*ft}function ue(wt){var Tt=wt._,Mt=wt.next._,Lt=Tt.r+Mt.r,ft=(Tt.x*Mt.r+Mt.x*Tt.r)/Lt,kt=(Tt.y*Mt.r+Mt.y*Tt.r)/Lt;return ft*ft+kt*kt}function J(wt){this._=wt,this.next=null,this.previous=null}function _e(wt){if(!(ft=wt.length))return 0;var Tt,Mt,Lt,ft,kt,rr,pr,Kr,Nr,dn,xr;if(Tt=wt[0],Tt.x=0,Tt.y=0,!(ft>1))return Tt.r;if(Mt=wt[1],Tt.x=-Mt.r,Mt.x=Tt.r,Mt.y=0,!(ft>2))return Tt.r+Mt.r;me(Mt,Tt,Lt=wt[2]),Tt=new J(Tt),Mt=new J(Mt),Lt=new J(Lt),Tt.next=Lt.previous=Mt,Mt.next=Tt.previous=Lt,Lt.next=Mt.previous=Tt;e:for(pr=3;pr0)throw new Error("cycle");return pr}return Mt.id=function(Lt){return arguments.length?(wt=pe(Lt),Mt):wt},Mt.parentId=function(Lt){return arguments.length?(Tt=pe(Lt),Mt):Tt},Mt}function Te(wt,Tt){return wt.parent===Tt.parent?1:2}function Ve(wt){var Tt=wt.children;return Tt?Tt[0]:wt.t}function $e(wt){var Tt=wt.children;return Tt?Tt[Tt.length-1]:wt.t}function ot(wt,Tt,Mt){var Lt=Mt/(Tt.i-wt.i);Tt.c-=Lt,Tt.s+=Mt,wt.c+=Lt,Tt.z+=Mt,Tt.m+=Mt}function rt(wt){for(var Tt=0,Mt=0,Lt=wt.children,ft=Lt.length,kt;--ft>=0;)kt=Lt[ft],kt.z+=Tt,kt.m+=Tt,Tt+=kt.s+(Mt+=kt.c)}function it(wt,Tt,Mt){return wt.a.parent===Tt.parent?wt.a:Mt}function We(wt,Tt){this._=wt,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=Tt}We.prototype=Object.create(E.prototype);function mt(wt){for(var Tt=new We(wt,0),Mt,Lt=[Tt],ft,kt,rr,pr;Mt=Lt.pop();)if(kt=Mt._.children)for(Mt.children=new Array(pr=kt.length),rr=pr-1;rr>=0;--rr)Lt.push(ft=Mt.children[rr]=new We(kt[rr],rr)),ft.parent=Mt;return(Tt.parent=new We(null,0)).children=[Tt],Tt}function bt(){var wt=Te,Tt=1,Mt=1,Lt=null;function ft(Nr){var dn=mt(Nr);if(dn.eachAfter(kt),dn.parent.m=-dn.z,dn.eachBefore(rr),Lt)Nr.eachBefore(Kr);else{var xr=Nr,Fr=Nr,Zr=Nr;Nr.eachBefore(function(Qt){Qt.xFr.x&&(Fr=Qt),Qt.depth>Zr.depth&&(Zr=Qt)});var Cn=xr===Fr?1:wt(xr,Fr)/2,Dt=Cn-xr.x,At=Tt/(Fr.x+Cn+Dt),Vt=Mt/(Zr.depth||1);Nr.eachBefore(function(Qt){Qt.x=(Qt.x+Dt)*At,Qt.y=Qt.depth*Vt})}return Nr}function kt(Nr){var dn=Nr.children,xr=Nr.parent.children,Fr=Nr.i?xr[Nr.i-1]:null;if(dn){rt(Nr);var Zr=(dn[0].z+dn[dn.length-1].z)/2;Fr?(Nr.z=Fr.z+wt(Nr._,Fr._),Nr.m=Nr.z-Zr):Nr.z=Zr}else Fr&&(Nr.z=Fr.z+wt(Nr._,Fr._));Nr.parent.A=pr(Nr,Fr,Nr.parent.A||xr[0])}function rr(Nr){Nr._.x=Nr.z+Nr.parent.m,Nr.m+=Nr.parent.m}function pr(Nr,dn,xr){if(dn){for(var Fr=Nr,Zr=Nr,Cn=dn,Dt=Fr.parent.children[0],At=Fr.m,Vt=Zr.m,Qt=Cn.m,Ut=Dt.m,_r;Cn=$e(Cn),Fr=Ve(Fr),Cn&&Fr;)Dt=Ve(Dt),Zr=$e(Zr),Zr.a=Nr,_r=Cn.z+Qt-Fr.z-At+wt(Cn._,Fr._),_r>0&&(ot(it(Cn,Nr,xr),Nr,_r),At+=_r,Vt+=_r),Qt+=Cn.m,At+=Fr.m,Ut+=Dt.m,Vt+=Zr.m;Cn&&!$e(Zr)&&(Zr.t=Cn,Zr.m+=Qt-Vt),Fr&&!Ve(Dt)&&(Dt.t=Fr,Dt.m+=At-Ut,xr=Nr)}return xr}function Kr(Nr){Nr.x*=Tt,Nr.y=Nr.depth*Mt}return ft.separation=function(Nr){return arguments.length?(wt=Nr,ft):wt},ft.size=function(Nr){return arguments.length?(Lt=!1,Tt=+Nr[0],Mt=+Nr[1],ft):Lt?null:[Tt,Mt]},ft.nodeSize=function(Nr){return arguments.length?(Lt=!0,Tt=+Nr[0],Mt=+Nr[1],ft):Lt?[Tt,Mt]:null},ft}function Yt(wt,Tt,Mt,Lt,ft){for(var kt=wt.children,rr,pr=-1,Kr=kt.length,Nr=wt.value&&(ft-Mt)/wt.value;++prQt&&(Qt=Nr),Jr=At*At*rn,Ut=Math.max(Qt/Jr,Jr/Vt),Ut>_r){At-=Nr;break}_r=Ut}rr.push(Kr={value:At,dice:Zr1?Lt:1)},Mt})(jt);function fr(){var wt=or,Tt=!1,Mt=1,Lt=1,ft=[0],kt=ie,rr=ie,pr=ie,Kr=ie,Nr=ie;function dn(Fr){return Fr.x0=Fr.y0=0,Fr.x1=Mt,Fr.y1=Lt,Fr.eachBefore(xr),ft=[0],Tt&&Fr.eachBefore(tt),Fr}function xr(Fr){var Zr=ft[Fr.depth],Cn=Fr.x0+Zr,Dt=Fr.y0+Zr,At=Fr.x1-Zr,Vt=Fr.y1-Zr;At=Fr-1){var Qt=kt[xr];Qt.x0=Cn,Qt.y0=Dt,Qt.x1=At,Qt.y1=Vt;return}for(var Ut=Nr[xr],_r=Zr/2+Ut,rn=xr+1,Jr=Fr-1;rn>>1;Nr[qn]<_r?rn=qn+1:Jr=qn}_r-Nr[rn-1]Vt-Dt){var Ii=(Cn*Jn+At*ri)/Zr;dn(xr,rn,ri,Cn,Dt,Ii,Vt),dn(rn,Fr,Jn,Ii,Dt,At,Vt)}else{var Vi=(Dt*Jn+Vt*ri)/Zr;dn(xr,rn,ri,Cn,Dt,At,Vi),dn(rn,Fr,Jn,Cn,Vi,At,Vt)}}}function cr(wt,Tt,Mt,Lt,ft){(wt.depth&1?Yt:Oe)(wt,Tt,Mt,Lt,ft)}var Ct=(function wt(Tt){function Mt(Lt,ft,kt,rr,pr){if((Kr=Lt._squarify)&&Kr.ratio===Tt)for(var Kr,Nr,dn,xr,Fr=-1,Zr,Cn=Kr.length,Dt=Lt.value;++Fr1?Lt:1)},Mt})(jt);e.cluster=l,e.hierarchy=w,e.pack=be,e.packEnclose=B,e.packSiblings=ne,e.partition=ze,e.stratify=Ke,e.tree=bt,e.treemap=fr,e.treemapBinary=Ot,e.treemapDice=Oe,e.treemapResquarify=Ct,e.treemapSlice=Yt,e.treemapSliceDice=cr,e.treemapSquarify=or,Object.defineProperty(e,"__esModule",{value:!0})})});var V6=fe(U6=>{"use strict";var P7e=N6(),izt=aa(),Rw=Xt(),azt=js().makeColorScaleFuncFromTrace,ozt=Pw().makePullColorFn,szt=Pw().generateExtendedColors,lzt=js().calc,uzt=Wa().ALMOST_EQUAL,czt={},fzt={},hzt={};U6.calc=function(e,t){var r=e._fullLayout,n=t.ids,a=Rw.isArrayOrTypedArray(n),i=t.labels,o=t.parents,s=t.values,l=Rw.isArrayOrTypedArray(s),u=[],c={},f={},v=function(j,q){c[j]?c[j].push(q):c[j]=[q],f[q]=1},g=function(j){return j||typeof j=="number"},p=function(j){return!l||izt(s[j])&&s[j]>=0},_,x,y;a?(_=Math.min(n.length,o.length),x=function(j){return g(n[j])&&p(j)},y=function(j){return String(n[j])}):(_=Math.min(i.length,o.length),x=function(j){return g(i[j])&&p(j)},y=function(j){return String(i[j])}),l&&(_=Math.min(_,s.length));for(var C=0;C<_;C++)if(x(C)){var k=y(C),S=g(o[C])?String(o[C]):"",L={i:C,id:k,pid:S,label:g(i[C])?String(i[C]):""};l&&(L.v=+s[C]),u.push(L),v(S,k)}if(c[""]){if(c[""].length>1){for(var A=Rw.randstr(),m=0;m{});function b1(){}function R7e(){return this.rgb().formatHex()}function _zt(){return this.rgb().formatHex8()}function bzt(){return U7e(this).formatHsl()}function I7e(){return this.rgb().formatRgb()}function cy(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=dzt.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?z7e(t):r===3?new Xc(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?q9(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?q9(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=vzt.exec(e))?new Xc(t[1],t[2],t[3],1):(t=pzt.exec(e))?new Xc(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=gzt.exec(e))?q9(t[1],t[2],t[3],t[4]):(t=mzt.exec(e))?q9(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=yzt.exec(e))?O7e(t[1],t[2]/100,t[3]/100,1):(t=xzt.exec(e))?O7e(t[1],t[2]/100,t[3]/100,t[4]):D7e.hasOwnProperty(e)?z7e(D7e[e]):e==="transparent"?new Xc(NaN,NaN,NaN,0):null}function z7e(e){return new Xc(e>>16&255,e>>8&255,e&255,1)}function q9(e,t,r,n){return n<=0&&(e=t=r=NaN),new Xc(e,t,r,n)}function H6(e){return e instanceof b1||(e=cy(e)),e?(e=e.rgb(),new Xc(e.r,e.g,e.b,e.opacity)):new Xc}function zw(e,t,r,n){return arguments.length===1?H6(e):new Xc(e,t,r,n==null?1:n)}function Xc(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function q7e(){return`#${Gx(this.r)}${Gx(this.g)}${Gx(this.b)}`}function wzt(){return`#${Gx(this.r)}${Gx(this.g)}${Gx(this.b)}${Gx((isNaN(this.opacity)?1:this.opacity)*255)}`}function B7e(){let e=O9(this.opacity);return`${e===1?"rgb(":"rgba("}${Hx(this.r)}, ${Hx(this.g)}, ${Hx(this.b)}${e===1?")":`, ${e})`}`}function O9(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Hx(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Gx(e){return e=Hx(e),(e<16?"0":"")+e.toString(16)}function O7e(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Mp(e,t,r,n)}function U7e(e){if(e instanceof Mp)return new Mp(e.h,e.s,e.l,e.opacity);if(e instanceof b1||(e=cy(e)),!e)return new Mp;if(e instanceof Mp)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=NaN,s=i-a,l=(i+a)/2;return s?(t===i?o=(r-n)/s+(r0&&l<1?0:o,new Mp(o,s,l,e.opacity)}function j6(e,t,r,n){return arguments.length===1?U7e(e):new Mp(e,t,r,n==null?1:n)}function Mp(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function N7e(e){return e=(e||0)%360,e<0?e+360:e}function B9(e){return Math.max(0,Math.min(1,e||0))}function yW(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var uy,jx,Iw,G6,_1,dzt,vzt,pzt,gzt,mzt,yzt,xzt,D7e,N9=Lo(()=>{z9();uy=.7,jx=1/uy,Iw="\\s*([+-]?\\d+)\\s*",G6="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",_1="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dzt=/^#([0-9a-f]{3,8})$/,vzt=new RegExp(`^rgb\\(${Iw},${Iw},${Iw}\\)$`),pzt=new RegExp(`^rgb\\(${_1},${_1},${_1}\\)$`),gzt=new RegExp(`^rgba\\(${Iw},${Iw},${Iw},${G6}\\)$`),mzt=new RegExp(`^rgba\\(${_1},${_1},${_1},${G6}\\)$`),yzt=new RegExp(`^hsl\\(${G6},${_1},${_1}\\)$`),xzt=new RegExp(`^hsla\\(${G6},${_1},${_1},${G6}\\)$`),D7e={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};wg(b1,cy,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:R7e,formatHex:R7e,formatHex8:_zt,formatHsl:bzt,formatRgb:I7e,toString:I7e});wg(Xc,zw,ly(b1,{brighter(e){return e=e==null?jx:Math.pow(jx,e),new Xc(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?uy:Math.pow(uy,e),new Xc(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xc(Hx(this.r),Hx(this.g),Hx(this.b),O9(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:q7e,formatHex:q7e,formatHex8:wzt,formatRgb:B7e,toString:B7e}));wg(Mp,j6,ly(b1,{brighter(e){return e=e==null?jx:Math.pow(jx,e),new Mp(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?uy:Math.pow(uy,e),new Mp(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new Xc(yW(e>=240?e-240:e+120,a,n),yW(e,a,n),yW(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Mp(N7e(this.h),B9(this.s),B9(this.l),O9(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=O9(this.opacity);return`${e===1?"hsl(":"hsla("}${N7e(this.h)}, ${B9(this.s)*100}%, ${B9(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var U9,V9,xW=Lo(()=>{U9=Math.PI/180,V9=180/Math.PI});function Y7e(e){if(e instanceof w1)return new w1(e.l,e.a,e.b,e.opacity);if(e instanceof Tg)return X7e(e);e instanceof Xc||(e=H6(e));var t=TW(e.r),r=TW(e.g),n=TW(e.b),a=_W((.2225045*t+.7168786*r+.0606169*n)/G7e),i,o;return t===r&&r===n?i=o=a:(i=_W((.4360747*t+.3850649*r+.1430804*n)/V7e),o=_W((.0139322*t+.0971045*r+.7141733*n)/H7e)),new w1(116*a-16,500*(i-a),200*(a-o),e.opacity)}function Bw(e,t,r,n){return arguments.length===1?Y7e(e):new w1(e,t,r,n==null?1:n)}function w1(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function _W(e){return e>Tzt?Math.pow(e,1/3):e/W7e+j7e}function bW(e){return e>qw?e*e*e:W7e*(e-j7e)}function wW(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function TW(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Azt(e){if(e instanceof Tg)return new Tg(e.h,e.c,e.l,e.opacity);if(e instanceof w1||(e=Y7e(e)),e.a===0&&e.b===0)return new Tg(NaN,0{z9();N9();xW();G9=18,V7e=.96422,G7e=1,H7e=.82521,j7e=4/29,qw=6/29,W7e=3*qw*qw,Tzt=qw*qw*qw;wg(w1,Bw,ly(b1,{brighter(e){return new w1(this.l+G9*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new w1(this.l-G9*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=V7e*bW(t),e=G7e*bW(e),r=H7e*bW(r),new Xc(wW(3.1338561*t-1.6168667*e-.4906146*r),wW(-.9787684*t+1.9161415*e+.033454*r),wW(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));wg(Tg,W6,ly(b1,{brighter(e){return new Tg(this.h,this.c,this.l+G9*(e==null?1:e),this.opacity)},darker(e){return new Tg(this.h,this.c,this.l-G9*(e==null?1:e),this.opacity)},rgb(){return X7e(this).rgb()}}))});function Mzt(e){if(e instanceof Wx)return new Wx(e.h,e.s,e.l,e.opacity);e instanceof Xc||(e=H6(e));var t=e.r/255,r=e.g/255,n=e.b/255,a=(J7e*n+$7e*t-K7e*r)/(J7e+$7e-K7e),i=n-a,o=(Y6*(r-a)-MW*i)/H9,s=Math.sqrt(o*o+i*i)/(Y6*a*(1-a)),l=s?Math.atan2(o,i)*V9-120:NaN;return new Wx(l<0?l+360:l,s,a,e.opacity)}function Ow(e,t,r,n){return arguments.length===1?Mzt(e):new Wx(e,t,r,n==null?1:n)}function Wx(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var Q7e,AW,MW,H9,Y6,$7e,K7e,J7e,eLe=Lo(()=>{z9();N9();xW();Q7e=-.14861,AW=1.78277,MW=-.29227,H9=-.90649,Y6=1.97294,$7e=Y6*H9,K7e=Y6*AW,J7e=AW*MW-H9*Q7e;wg(Wx,Ow,ly(b1,{brighter(e){return e=e==null?jx:Math.pow(jx,e),new Wx(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?uy:Math.pow(uy,e),new Wx(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*U9,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),a=Math.sin(e);return new Xc(255*(t+r*(Q7e*n+AW*a)),255*(t+r*(MW*n+H9*a)),255*(t+r*(Y6*n)),this.opacity)}}))});var Yx=Lo(()=>{N9();Z7e();eLe()});function SW(e,t,r,n,a){var i=e*e,o=i*e;return((1-3*e+3*i-o)*t+(4-6*i+3*o)*r+(1+3*e+3*i-3*o)*n+o*a)/6}function j9(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),a=e[n],i=e[n+1],o=n>0?e[n-1]:2*a-i,s=n{});function Y9(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),a=e[(n+t-1)%t],i=e[n%t],o=e[(n+1)%t],s=e[(n+2)%t];return SW((r-n/t)*t,a,i,o,s)}}var EW=Lo(()=>{W9()});var Nw,kW=Lo(()=>{Nw=e=>()=>e});function tLe(e,t){return function(r){return e+r*t}}function Szt(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function fy(e,t){var r=t-e;return r?tLe(e,r>180||r<-180?r-360*Math.round(r/360):r):Nw(isNaN(e)?t:e)}function rLe(e){return(e=+e)==1?yu:function(t,r){return r-t?Szt(t,r,e):Nw(isNaN(t)?r:t)}}function yu(e,t){var r=t-e;return r?tLe(e,r):Nw(isNaN(e)?t:e)}var Xx=Lo(()=>{kW()});function nLe(e){return function(t){var r=t.length,n=new Array(r),a=new Array(r),i=new Array(r),o,s;for(o=0;o{Yx();W9();EW();Xx();X6=(function e(t){var r=rLe(t);function n(a,i){var o=r((a=zw(a)).r,(i=zw(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),u=yu(a.opacity,i.opacity);return function(c){return a.r=o(c),a.g=s(c),a.b=l(c),a.opacity=u(c),a+""}}return n.gamma=e,n})(1);iLe=nLe(j9),aLe=nLe(Y9)});function Uw(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a{});function oLe(e,t){return(X9(t)?Uw:LW)(e,t)}function LW(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),o;for(o=0;o{Z6();Z9()});function $9(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var FW=Lo(()=>{});function c0(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var $6=Lo(()=>{});function K9(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=hy(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var DW=Lo(()=>{Z6()});function Ezt(e){return function(){return e}}function kzt(e){return function(t){return e(t)+""}}function J9(e,t){var r=IW.lastIndex=RW.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=IW.exec(e))&&(a=RW.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:c0(n,a)})),r=RW.lastIndex;return r{$6();IW=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,RW=new RegExp(IW.source,"g")});function hy(e,t){var r=typeof t,n;return t==null||r==="boolean"?Nw(t):(r==="number"?c0:r==="string"?(n=cy(t))?(t=n,X6):J9:t instanceof cy?X6:t instanceof Date?$9:X9(t)?Uw:Array.isArray(t)?LW:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?K9:c0)(e,t)}var Z6=Lo(()=>{Yx();CW();PW();FW();$6();DW();zW();kW();Z9()});function sLe(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var lLe=Lo(()=>{});function uLe(e,t){var r=fy(+e,+t);return function(n){var a=r(n);return a-360*Math.floor(a/360)}}var cLe=Lo(()=>{Xx()});function fLe(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var hLe=Lo(()=>{});function qW(e,t,r,n,a,i){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n{dLe=180/Math.PI,Q9={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function pLe(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Q9:qW(t.a,t.b,t.c,t.d,t.e,t.f)}function gLe(e){return e==null?Q9:(eP||(eP=document.createElementNS("http://www.w3.org/2000/svg","g")),eP.setAttribute("transform",e),(e=eP.transform.baseVal.consolidate())?(e=e.matrix,qW(e.a,e.b,e.c,e.d,e.e,e.f)):Q9)}var eP,mLe=Lo(()=>{vLe()});function yLe(e,t,r,n){function a(u){return u.length?u.pop()+" ":""}function i(u,c,f,v,g,p){if(u!==f||c!==v){var _=g.push("translate(",null,t,null,r);p.push({i:_-4,x:c0(u,f)},{i:_-2,x:c0(c,v)})}else(f||v)&&g.push("translate("+f+t+v+r)}function o(u,c,f,v){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),v.push({i:f.push(a(f)+"rotate(",null,n)-2,x:c0(u,c)})):c&&f.push(a(f)+"rotate("+c+n)}function s(u,c,f,v){u!==c?v.push({i:f.push(a(f)+"skewX(",null,n)-2,x:c0(u,c)}):c&&f.push(a(f)+"skewX("+c+n)}function l(u,c,f,v,g,p){if(u!==f||c!==v){var _=g.push(a(g)+"scale(",null,",",null,")");p.push({i:_-4,x:c0(u,f)},{i:_-2,x:c0(c,v)})}else(f!==1||v!==1)&&g.push(a(g)+"scale("+f+","+v+")")}return function(u,c){var f=[],v=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,f,v),o(u.rotate,c.rotate,f,v),s(u.skewX,c.skewX,f,v),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,v),u=c=null,function(g){for(var p=-1,_=v.length,x;++p<_;)f[(x=v[p]).i]=x.x(g);return f.join("")}}}var xLe,_Le,bLe=Lo(()=>{$6();mLe();xLe=yLe(pLe,"px, ","px)","deg)"),_Le=yLe(gLe,", ",")",")")});function wLe(e){return((e=Math.exp(e))+1/e)/2}function Lzt(e){return((e=Math.exp(e))-1/e)/2}function Pzt(e){return((e=Math.exp(2*e))-1)/(e+1)}var Czt,TLe,ALe=Lo(()=>{Czt=1e-12;TLe=(function e(t,r,n){function a(i,o){var s=i[0],l=i[1],u=i[2],c=o[0],f=o[1],v=o[2],g=c-s,p=f-l,_=g*g+p*p,x,y;if(_{Yx();Xx();SLe=MLe(fy),ELe=MLe(yu)});function BW(e,t){var r=yu((e=Bw(e)).l,(t=Bw(t)).l),n=yu(e.a,t.a),a=yu(e.b,t.b),i=yu(e.opacity,t.opacity);return function(o){return e.l=r(o),e.a=n(o),e.b=a(o),e.opacity=i(o),e+""}}var CLe=Lo(()=>{Yx();Xx()});function LLe(e){return function(t,r){var n=e((t=W6(t)).h,(r=W6(r)).h),a=yu(t.c,r.c),i=yu(t.l,r.l),o=yu(t.opacity,r.opacity);return function(s){return t.h=n(s),t.c=a(s),t.l=i(s),t.opacity=o(s),t+""}}}var PLe,FLe,DLe=Lo(()=>{Yx();Xx();PLe=LLe(fy),FLe=LLe(yu)});function RLe(e){return(function t(r){r=+r;function n(a,i){var o=e((a=Ow(a)).h,(i=Ow(i)).h),s=yu(a.s,i.s),l=yu(a.l,i.l),u=yu(a.opacity,i.opacity);return function(c){return a.h=o(c),a.s=s(c),a.l=l(Math.pow(c,r)),a.opacity=u(c),a+""}}return n.gamma=t,n})(1)}var ILe,zLe,qLe=Lo(()=>{Yx();Xx();ILe=RLe(fy),zLe=RLe(yu)});function OW(e,t){t===void 0&&(t=e,e=hy);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r{Z6()});function OLe(e,t){for(var r=new Array(t),n=0;n{});var Zx={};zp(Zx,{interpolate:()=>hy,interpolateArray:()=>oLe,interpolateBasis:()=>j9,interpolateBasisClosed:()=>Y9,interpolateCubehelix:()=>ILe,interpolateCubehelixLong:()=>zLe,interpolateDate:()=>$9,interpolateDiscrete:()=>sLe,interpolateHcl:()=>PLe,interpolateHclLong:()=>FLe,interpolateHsl:()=>SLe,interpolateHslLong:()=>ELe,interpolateHue:()=>uLe,interpolateLab:()=>BW,interpolateNumber:()=>c0,interpolateNumberArray:()=>Uw,interpolateObject:()=>K9,interpolateRgb:()=>X6,interpolateRgbBasis:()=>iLe,interpolateRgbBasisClosed:()=>aLe,interpolateRound:()=>fLe,interpolateString:()=>J9,interpolateTransformCss:()=>xLe,interpolateTransformSvg:()=>_Le,interpolateZoom:()=>TLe,piecewise:()=>OW,quantize:()=>OLe});var $x=Lo(()=>{Z6();PW();W9();EW();FW();lLe();cLe();$6();Z9();DW();hLe();zW();bLe();ALe();CW();kLe();CLe();DLe();qLe();BLe();NLe()});var tP=fe((Wbr,ULe)=>{"use strict";var Fzt=Ji(),Dzt=ni();ULe.exports=function(t,r,n,a,i){var o=r.data.data,s=o.i,l=i||o.color;if(s>=0){r.i=o.i;var u=n.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=l,r.color=l):(u.color=l,r.color=l),Fzt.pointStyle(t,n,a,r)}else Dzt.fill(t,l)}});var NW=fe((Ybr,WLe)=>{"use strict";var VLe=xi(),GLe=ni(),HLe=Xt(),Rzt=kh().resizeText,Izt=tP();function zzt(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");Rzt(e,t,"sunburst"),t.each(function(r){var n=VLe.select(this),a=r[0],i=a.trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(o){VLe.select(this).call(jLe,o,i,e)})})}function jLe(e,t,r,n){var a=t.data.data,i=!t.children,o=a.i,s=HLe.castOption(r,o,"marker.line.color")||GLe.defaultLine,l=HLe.castOption(r,o,"marker.line.width")||0;e.call(Izt,t,r,n).style("stroke-width",l).call(GLe.stroke,s).style("opacity",i?r.leaf.opacity:null)}WLe.exports={style:zzt,styleOne:jLe}});var Ag=fe(to=>{"use strict";var Kx=Xt(),qzt=ni(),Bzt=np(),YLe=Sm();to.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(n){if(to.getPtId(n)===t)return r=n.copy()}),r||e};to.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(n){for(var a=n.children||[],i=0;i0)};to.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};to.isHeader=function(e,t){return!(to.isLeaf(e)||e.depth===t._maxDepth-1)};function XLe(e){return e.data.data.pid}to.getParent=function(e,t){return to.findEntryWithLevel(e,XLe(t))};to.listPath=function(e,t){var r=e.parent;if(!r)return[];var n=t?[r.data[t]]:[r];return to.listPath(r,t).concat(n)};to.getPath=function(e){return to.listPath(e,"label").join("/")+"/"};to.formatValue=YLe.formatPieValue;to.formatPercent=function(e,t){var r=Kx.formatPercent(e,0);return r==="0%"&&(r=YLe.formatPiePercent(e,t)),r}});var Q6=fe((Zbr,KLe)=>{"use strict";var Vw=xi(),ZLe=bi(),Uzt=Sd().appendArrayPointValue,K6=kl(),$Le=Xt(),Vzt=Rb(),Sc=Ag(),Gzt=Sm(),Hzt=Gzt.formatPieValue;KLe.exports=function(t,r,n,a,i){var o=a[0],s=o.trace,l=o.hierarchy,u=s.type==="sunburst",c=s.type==="treemap"||s.type==="icicle";"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1);var f=function(p){var _=n._fullLayout;if(!(n._dragging||_.hovermode===!1)){var x=n._fullData[s.index],y=p.data.data,C=y.i,k=Sc.isHierarchyRoot(p),S=Sc.getParent(l,p),L=Sc.getValue(p),w=function(me){return $Le.castOption(x,C,me)},T=w("hovertemplate"),A=K6.castHoverinfo(x,_,C),m=_.separators,F;if(T||A&&A!=="none"&&A!=="skip"){var E,I;u&&(E=o.cx+p.pxmid[0]*(1-p.rInscribed),I=o.cy+p.pxmid[1]*(1-p.rInscribed)),c&&(E=p._hoverX,I=p._hoverY);var R={},B=[],O=[],U=function(me){return B.indexOf(me)!==-1};A&&(B=A==="all"?x._module.attributes.hoverinfo.flags:A.split("+")),R.label=y.label,U("label")&&R.label&&O.push(R.label),y.hasOwnProperty("v")&&(R.value=y.v,R.valueLabel=Hzt(R.value,m),U("value")&&O.push(R.valueLabel)),R.currentPath=p.currentPath=Sc.getPath(p.data),U("current path")&&!k&&O.push(R.currentPath);var j,q=[],V=function(){q.indexOf(j)===-1&&(O.push(j),q.push(j))};R.percentParent=p.percentParent=L/Sc.getValue(S),R.parent=p.parentString=Sc.getPtLabel(S),U("percent parent")&&(j=Sc.formatPercent(R.percentParent,m)+" of "+R.parent,V()),R.percentEntry=p.percentEntry=L/Sc.getValue(r),R.entry=p.entry=Sc.getPtLabel(r),U("percent entry")&&!k&&!p.onPathbar&&(j=Sc.formatPercent(R.percentEntry,m)+" of "+R.entry,V()),R.percentRoot=p.percentRoot=L/Sc.getValue(l),R.root=p.root=Sc.getPtLabel(l),U("percent root")&&!k&&(j=Sc.formatPercent(R.percentRoot,m)+" of "+R.root,V()),R.text=w("hovertext")||w("text"),U("text")&&(j=R.text,$Le.isValidTextValue(j)&&O.push(j)),F=[J6(p,x,i.eventDataKeys)];var K={trace:x,y:I,_x0:p._x0,_x1:p._x1,_y0:p._y0,_y1:p._y1,text:O.join("
"),name:T||U("name")?x.name:void 0,color:w("hoverlabel.bgcolor")||y.color,borderColor:w("hoverlabel.bordercolor"),fontFamily:w("hoverlabel.font.family"),fontSize:w("hoverlabel.font.size"),fontColor:w("hoverlabel.font.color"),fontWeight:w("hoverlabel.font.weight"),fontStyle:w("hoverlabel.font.style"),fontVariant:w("hoverlabel.font.variant"),nameLength:w("hoverlabel.namelength"),textAlign:w("hoverlabel.align"),hovertemplate:T,hovertemplateLabels:R,eventData:F};u&&(K.x0=E-p.rInscribed*p.rpx1,K.x1=E+p.rInscribed*p.rpx1,K.idealAlign=p.pxmid[0]<0?"left":"right"),c&&(K.x=E,K.idealAlign=E<0?"left":"right");var ee=[];K6.loneHover(K,{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:n,inOut_bbox:ee}),F[0].bbox=ee[0],s._hasHoverLabel=!0}if(c){var ce=t.select("path.surface");i.styleOne(ce,p,x,n,{hovered:!0})}s._hasHoverEvent=!0,n.emit("plotly_hover",{points:F||[J6(p,x,i.eventDataKeys)],event:Vw.event})}},v=function(p){var _=n._fullLayout,x=n._fullData[s.index],y=Vw.select(this).datum();if(s._hasHoverEvent&&(p.originalEvent=Vw.event,n.emit("plotly_unhover",{points:[J6(y,x,i.eventDataKeys)],event:Vw.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(K6.loneUnhover(_._hoverlayer.node()),s._hasHoverLabel=!1),c){var C=t.select("path.surface");i.styleOne(C,y,x,n,{hovered:!1})}},g=function(p){var _=n._fullLayout,x=n._fullData[s.index],y=u&&(Sc.isHierarchyRoot(p)||Sc.isLeaf(p)),C=Sc.getPtId(p),k=Sc.isEntry(p)?Sc.findEntryWithChild(l,C):Sc.findEntryWithLevel(l,C),S=Sc.getPtId(k),L={points:[J6(p,x,i.eventDataKeys)],event:Vw.event};y||(L.nextLevel=S);var w=Vzt.triggerHandler(n,"plotly_"+s.type+"click",L);if(w!==!1&&_.hovermode&&(n._hoverdata=[J6(p,x,i.eventDataKeys)],K6.click(n,Vw.event)),!y&&w!==!1&&!n._dragging&&!n._transitioning){ZLe.call("_storeDirectGUIEdit",x,_._tracePreGUI[x.uid],{level:x.level});var T={data:[{level:S}],traces:[s.index]},A={frame:{redraw:!1,duration:i.transitionTime},transition:{duration:i.transitionTime,easing:i.transitionEasing},mode:"immediate",fromcurrent:!0};K6.loneUnhover(_._hoverlayer.node()),ZLe.call("animate",n,T,A)}};t.on("mouseover",f),t.on("mouseout",v),t.on("click",g)};function J6(e,t,r){for(var n=e.data.data,a={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},i=0;i{"use strict";var eM=xi(),jzt=N6(),Sp=($x(),Gs(Zx)).interpolate,JLe=Ji(),Fh=Xt(),Wzt=as(),r9e=kh(),QLe=r9e.recordMinTextSize,Yzt=r9e.clearMinTextSize,n9e=R9(),Xzt=Sm().getRotationAngle,Zzt=n9e.computeTransform,$zt=n9e.transformInsideText,Kzt=NW().styleOne,Jzt=_v().resizeText,Qzt=Q6(),UW=gW(),Po=Ag();rP.plot=function(e,t,r,n){var a=e._fullLayout,i=a._sunburstlayer,o,s,l=!r,u=!a.uniformtext.mode&&Po.hasTransition(r);if(Yzt("sunburst",a),o=i.selectAll("g.trace.sunburst").data(t,function(f){return f[0].trace.uid}),o.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),u){n&&(s=n());var c=eM.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});c.each(function(){i.selectAll("g.trace").each(function(f){e9e(e,f,this,r)})})}else o.each(function(f){e9e(e,f,this,r)}),a.uniformtext.mode&&Jzt(e,a._sunburstlayer.selectAll(".trace"),"sunburst");l&&o.exit().remove()};function e9e(e,t,r,n){var a=e._context.staticPlot,i=e._fullLayout,o=!i.uniformtext.mode&&Po.hasTransition(n),s=eM.select(r),l=s.selectAll("g.slice"),u=t[0],c=u.trace,f=u.hierarchy,v=Po.findEntryWithLevel(f,c.level),g=Po.getMaxDepth(c),p=i._size,_=c.domain,x=p.w*(_.x[1]-_.x[0]),y=p.h*(_.y[1]-_.y[0]),C=.5*Math.min(x,y),k=u.cx=p.l+p.w*(_.x[1]+_.x[0])/2,S=u.cy=p.t+p.h*(1-_.y[0])-y/2;if(!v)return l.remove();var L=null,w={};o&&l.each(function(ue){w[Po.getPtId(ue)]={rpx0:ue.rpx0,rpx1:ue.rpx1,x0:ue.x0,x1:ue.x1,transform:ue.transform},!L&&Po.isEntry(ue)&&(L=ue)});var T=eqt(v).descendants(),A=v.height+1,m=0,F=g;u.hasMultipleRoots&&Po.isHierarchyRoot(v)&&(T=T.slice(1),A-=1,m=1,F+=1),T=T.filter(function(ue){return ue.y1<=F});var E=Xzt(c.rotation);E&&T.forEach(function(ue){ue.x0+=E,ue.x1+=E});var I=Math.min(A,g),R=function(ue){return(ue-m)/I*C},B=function(ue,J){return[ue*Math.cos(J),-ue*Math.sin(J)]},O=function(ue){return Fh.pathAnnulus(ue.rpx0,ue.rpx1,ue.x0,ue.x1,k,S)},U=function(ue){return k+t9e(ue)[0]*(ue.transform.rCenter||0)+(ue.transform.x||0)},j=function(ue){return S+t9e(ue)[1]*(ue.transform.rCenter||0)+(ue.transform.y||0)};l=l.data(T,Po.getPtId),l.enter().append("g").classed("slice",!0),o?l.exit().transition().each(function(){var ue=eM.select(this),J=ue.select("path.surface");J.transition().attrTween("d",function(ne){var ae=ee(ne);return function(pe){return O(ae(pe))}});var _e=ue.select("g.slicetext");_e.attr("opacity",0)}).remove():l.exit().remove(),l.order();var q=null;if(o&&L){var V=Po.getPtId(L);l.each(function(ue){q===null&&Po.getPtId(ue)===V&&(q=ue.x1)})}var K=l;o&&(K=K.transition().each("end",function(){var ue=eM.select(this);Po.setSliceCursor(ue,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),K.each(function(ue){var J=eM.select(this),_e=Fh.ensureSingle(J,"path","surface",function(xe){xe.style("pointer-events",a?"none":"all")});ue.rpx0=R(ue.y0),ue.rpx1=R(ue.y1),ue.xmid=(ue.x0+ue.x1)/2,ue.pxmid=B(ue.rpx1,ue.xmid),ue.midangle=-(ue.xmid-Math.PI/2),ue.startangle=-(ue.x0-Math.PI/2),ue.stopangle=-(ue.x1-Math.PI/2),ue.halfangle=.5*Math.min(Fh.angleDelta(ue.x0,ue.x1)||Math.PI,Math.PI),ue.ring=1-ue.rpx0/ue.rpx1,ue.rInscribed=tqt(ue,c),o?_e.transition().attrTween("d",function(xe){var be=ce(xe);return function(De){return O(be(De))}}):_e.attr("d",O),J.call(Qzt,v,e,t,{eventDataKeys:UW.eventDataKeys,transitionTime:UW.CLICK_TRANSITION_TIME,transitionEasing:UW.CLICK_TRANSITION_EASING}).call(Po.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),_e.call(Kzt,ue,c,e);var ne=Fh.ensureSingle(J,"g","slicetext"),ae=Fh.ensureSingle(ne,"text","",function(xe){xe.attr("data-notex",1)}),pe=Fh.ensureUniformFontSize(e,Po.determineTextFont(c,ue,i.font));ae.text(rP.formatSliceLabel(ue,v,c,t,i)).classed("slicetext",!0).attr("text-anchor","middle").call(JLe.font,pe).call(Wzt.convertToTspans,e);var ie=JLe.bBox(ae.node());ue.transform=$zt(ie,ue,u),ue.transform.targetX=U(ue),ue.transform.targetY=j(ue);var le=function(xe,be){var De=xe.transform;return Zzt(De,be),De.fontSize=pe.size,QLe(c.type,De,i),Fh.getTextTransform(De)};o?ae.transition().attrTween("transform",function(xe){var be=me(xe);return function(De){return le(be(De),ie)}}):ae.attr("transform",le(ue,ie))});function ee(ue){var J=Po.getPtId(ue),_e=w[J],ne=w[Po.getPtId(v)],ae;if(ne){var pe=(ue.x1>ne.x1?2*Math.PI:0)+E;ae=ue.rpx1q?2*Math.PI:0)+E;_e={x0:ae,x1:ae}}else _e={rpx0:C,rpx1:C},Fh.extendFlat(_e,ye(ue));else _e={rpx0:0,rpx1:0};else _e={x0:E,x1:E};return Sp(_e,ne)}function me(ue){var J=w[Po.getPtId(ue)],_e,ne=ue.transform;if(J)_e=J;else if(_e={rpx1:ue.rpx1,transform:{textPosAngle:ne.textPosAngle,scale:0,rotate:ne.rotate,rCenter:ne.rCenter,x:ne.x,y:ne.y}},L)if(ue.parent)if(q){var ae=ue.x1>q?2*Math.PI:0;_e.x0=_e.x1=ae}else Fh.extendFlat(_e,ye(ue));else _e.x0=_e.x1=E;else _e.x0=_e.x1=E;var pe=Sp(_e.transform.textPosAngle,ue.transform.textPosAngle),ie=Sp(_e.rpx1,ue.rpx1),le=Sp(_e.x0,ue.x0),xe=Sp(_e.x1,ue.x1),be=Sp(_e.transform.scale,ne.scale),De=Sp(_e.transform.rotate,ne.rotate),Ge=ne.rCenter===0?3:_e.transform.rCenter===0?1/3:1,pt=Sp(_e.transform.rCenter,ne.rCenter),tt=function(Oe){return pt(Math.pow(Oe,Ge))};return function(Oe){var ze=ie(Oe),ut=le(Oe),et=xe(Oe),qe=tt(Oe),we=B(ze,(ut+et)/2),Le=pe(Oe),Ke={pxmid:we,rpx1:ze,transform:{textPosAngle:Le,rCenter:qe,x:ne.x,y:ne.y}};return QLe(c.type,ne,i),{transform:{targetX:U(Ke),targetY:j(Ke),scale:be(Oe),rotate:De(Oe),rCenter:qe}}}}function ye(ue){var J=ue.parent,_e=w[Po.getPtId(J)],ne={};if(_e){var ae=J.children,pe=ae.indexOf(ue),ie=ae.length,le=Sp(_e.x0,_e.x1);ne.x0=le(pe/ie),ne.x1=le(pe/ie)}else ne.x0=ne.x1=0;return ne}}function eqt(e){return jzt.partition().size([2*Math.PI,e.height+1])(e)}rP.formatSliceLabel=function(e,t,r,n,a){var i=r.texttemplate,o=r.textinfo;if(!i&&(!o||o==="none"))return"";var s=a.separators,l=n[0],u=e.data.data,c=l.hierarchy,f=Po.isHierarchyRoot(e),v=Po.getParent(c,e),g=Po.getValue(e);if(!i){var p=o.split("+"),_=function(m){return p.indexOf(m)!==-1},x=[],y;if(_("label")&&u.label&&x.push(u.label),u.hasOwnProperty("v")&&_("value")&&x.push(Po.formatValue(u.v,s)),!f){_("current path")&&x.push(Po.getPath(e.data));var C=0;_("percent parent")&&C++,_("percent entry")&&C++,_("percent root")&&C++;var k=C>1;if(C){var S,L=function(m){y=Po.formatPercent(S,s),k&&(y+=" of "+m),x.push(y)};_("percent parent")&&!f&&(S=g/Po.getValue(v),L("parent")),_("percent entry")&&(S=g/Po.getValue(t),L("entry")),_("percent root")&&(S=g/Po.getValue(c),L("root"))}}return _("text")&&(y=Fh.castOption(r,u.i,"text"),Fh.isValidTextValue(y)&&x.push(y)),x.join("
")}var w=Fh.castOption(r,u.i,"texttemplate");if(!w)return"";var T={};u.label&&(T.label=u.label),u.hasOwnProperty("v")&&(T.value=u.v,T.valueLabel=Po.formatValue(u.v,s)),T.currentPath=Po.getPath(e.data),f||(T.percentParent=g/Po.getValue(v),T.percentParentLabel=Po.formatPercent(T.percentParent,s),T.parent=Po.getPtLabel(v)),T.percentEntry=g/Po.getValue(t),T.percentEntryLabel=Po.formatPercent(T.percentEntry,s),T.entry=Po.getPtLabel(t),T.percentRoot=g/Po.getValue(c),T.percentRootLabel=Po.formatPercent(T.percentRoot,s),T.root=Po.getPtLabel(c),u.hasOwnProperty("color")&&(T.color=u.color);var A=Fh.castOption(r,u.i,"text");return(Fh.isValidTextValue(A)||A==="")&&(T.text=A),T.customdata=Fh.castOption(r,u.i,"customdata"),Fh.texttemplateString({data:[T,r._meta],fallback:r.texttemplatefallback,labels:T,locale:a._d3locale,template:w})};function tqt(e){return e.rpx0===0&&Fh.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function t9e(e){return rqt(e.rpx1,e.transform.textPosAngle)}function rqt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var a9e=fe((Kbr,i9e)=>{"use strict";i9e.exports={moduleType:"trace",name:"sunburst",basePlotModule:y7e(),categories:[],animatable:!0,attributes:O6(),layoutAttributes:mW(),supplyDefaults:E7e(),supplyLayoutDefaults:C7e(),calc:V6().calc,crossTraceCalc:V6().crossTraceCalc,plot:nP().plot,style:NW().style,colorbar:Zf(),meta:{}}});var s9e=fe((Jbr,o9e)=>{"use strict";o9e.exports=a9e()});var u9e=fe(Gw=>{"use strict";var l9e=Hs();Gw.name="treemap";Gw.plot=function(e,t,r,n){l9e.plotBasePlot(Gw.name,e,t,r,n)};Gw.clean=function(e,t,r,n){l9e.cleanBasePlot(Gw.name,e,t,r,n)}});var Jx=fe((e3r,c9e)=>{"use strict";c9e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var iP=fe((t3r,d9e)=>{"use strict";var{hovertemplateAttrs:nqt,texttemplateAttrs:iqt,templatefallbackAttrs:f9e}=Oo(),aqt=_s(),oqt=nl().attributes,Qx=Ux(),Dv=O6(),h9e=Jx(),VW=ta().extendFlat,sqt=Uc().pattern;d9e.exports={labels:Dv.labels,parents:Dv.parents,values:Dv.values,branchvalues:Dv.branchvalues,count:Dv.count,level:Dv.level,maxdepth:Dv.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:VW({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:Dv.marker.colors,pattern:sqt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:Dv.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},aqt("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:VW({},Qx.textfont,{}),editType:"calc"},text:Qx.text,textinfo:Dv.textinfo,texttemplate:iqt({editType:"plot"},{keys:h9e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:f9e({editType:"plot"}),hovertext:Qx.hovertext,hoverinfo:Dv.hoverinfo,hovertemplate:nqt({},{keys:h9e.eventDataKeys}),hovertemplatefallback:f9e(),textfont:Qx.textfont,insidetextfont:Qx.insidetextfont,outsidetextfont:VW({},Qx.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:Qx.sort,root:Dv.root,domain:oqt({name:"treemap",trace:!0,editType:"calc"})}});var GW=fe((r3r,v9e)=>{"use strict";v9e.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var y9e=fe((n3r,m9e)=>{"use strict";var p9e=Xt(),lqt=iP(),uqt=ni(),cqt=nl().defaults,fqt=q0().handleText,hqt=Im().TEXTPAD,dqt=Vx().handleMarkerDefaults,g9e=js(),vqt=g9e.hasColorscale,pqt=g9e.handleDefaults;m9e.exports=function(t,r,n,a){function i(x,y){return p9e.coerce(t,r,lqt,x,y)}var o=i("labels"),s=i("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=i("values");l&&l.length?i("branchvalues"):i("count"),i("level"),i("maxdepth");var u=i("tiling.packing");u==="squarify"&&i("tiling.squarifyratio"),i("tiling.flip"),i("tiling.pad");var c=i("text");i("texttemplate"),i("texttemplatefallback"),r.texttemplate||i("textinfo",p9e.isArrayOrTypedArray(c)?"text+label":"label"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var f=i("pathbar.visible"),v="auto";fqt(t,r,a,i,v,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("textposition");var g=r.textposition.indexOf("bottom")!==-1;dqt(t,r,a,i);var p=r._hasColorscale=vqt(t,"marker","colors")||(t.marker||{}).coloraxis;p?pqt(t,r,a,i,{prefix:"marker.",cLetter:"c"}):i("marker.depthfade",!(r.marker.colors||[]).length);var _=r.textfont.size*2;i("marker.pad.t",g?_/4:_),i("marker.pad.l",_/4),i("marker.pad.r",_/4),i("marker.pad.b",g?_:_/4),i("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:uqt.contrast(a.paper_bgcolor)}}},f&&(i("pathbar.thickness",r.pathbar.textfont.size+2*hqt),i("pathbar.side"),i("pathbar.edgeshape")),i("sort"),i("root.color"),cqt(r,a,i),r._length=null}});var _9e=fe((i3r,x9e)=>{"use strict";var gqt=Xt(),mqt=GW();x9e.exports=function(t,r){function n(a,i){return gqt.coerce(t,r,mqt,a,i)}n("treemapcolorway",r.colorway),n("extendtreemapcolors")}});var jW=fe(HW=>{"use strict";var b9e=V6();HW.calc=function(e,t){return b9e.calc(e,t)};HW.crossTraceCalc=function(e){return b9e._runCrossTraceCalc("treemap",e)}});var WW=fe((o3r,w9e)=>{"use strict";w9e.exports=function e(t,r,n){var a;n.swapXY&&(a=t.x0,t.x0=t.y0,t.y0=a,a=t.x1,t.x1=t.y1,t.y1=a),n.flipX&&(a=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-a),n.flipY&&(a=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-a);var i=t.children;if(i)for(var o=0;o{"use strict";var Hw=N6(),yqt=WW();T9e.exports=function(t,r,n){var a=n.flipX,i=n.flipY,o=n.packing==="dice-slice",s=n.pad[i?"bottom":"top"],l=n.pad[a?"right":"left"],u=n.pad[a?"left":"right"],c=n.pad[i?"top":"bottom"],f;o&&(f=l,l=s,s=f,f=u,u=c,c=f);var v=Hw.treemap().tile(xqt(n.packing,n.squarifyratio)).paddingInner(n.pad.inner).paddingLeft(l).paddingRight(u).paddingTop(s).paddingBottom(c).size(o?[r[1],r[0]]:r)(t);return(o||a||i)&&yqt(v,r,{swapXY:o,flipX:a,flipY:i}),v};function xqt(e,t){switch(e){case"squarify":return Hw.treemapSquarify.ratio(t);case"binary":return Hw.treemapBinary;case"dice":return Hw.treemapDice;case"slice":return Hw.treemapSlice;default:return Hw.treemapSliceDice}}});var aP=fe((l3r,E9e)=>{"use strict";var A9e=xi(),jw=ni(),M9e=Xt(),XW=Ag(),_qt=kh().resizeText,bqt=tP();function wqt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");_qt(e,t,"treemap"),t.each(function(r){var n=A9e.select(this),a=r[0],i=a.trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(o){A9e.select(this).call(S9e,o,i,e,{hovered:!1})})})}function S9e(e,t,r,n,a){var i=(a||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=XW.isHierarchyRoot(t),v=1;if(i)l=r._hovered.marker.line.color,u=r._hovered.marker.line.width;else if(f&&c===r.root.color)v=100,l="rgba(0,0,0,0)",u=0;else if(l=M9e.castOption(r,s,"marker.line.color")||jw.defaultLine,u=M9e.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var g=r.marker.depthfade;if(g){var p=jw.combine(jw.addOpacity(r._backgroundColor,.75),c),_;if(g===!0){var x=XW.getMaxDepth(r);isFinite(x)?XW.isLeaf(t)?_=0:_=r._maxVisibleLayers-(t.data.depth-r._entryDepth):_=t.data.height+1}else _=t.data.depth-r._entryDepth,r._atRootLevel||_++;if(_>0)for(var y=0;y<_;y++){var C=.5*y/_;c=jw.combine(jw.addOpacity(p,C),c)}}}e.call(bqt,t,r,n,c).style("stroke-width",u).call(jw.stroke,l).style("opacity",v)}E9e.exports={style:wqt,styleOne:S9e}});var F9e=fe((u3r,P9e)=>{"use strict";var k9e=xi(),oP=Xt(),C9e=Ji(),Tqt=as(),Aqt=YW(),L9e=aP().styleOne,ZW=Jx(),Ww=Ag(),Mqt=Q6(),$W=!0;P9e.exports=function(t,r,n,a,i){var o=i.barDifY,s=i.width,l=i.height,u=i.viewX,c=i.viewY,f=i.pathSlice,v=i.toMoveInsideSlice,g=i.strTransform,p=i.hasTransition,_=i.handleSlicesExit,x=i.makeUpdateSliceInterpolator,y=i.makeUpdateTextInterpolator,C={},k=t._context.staticPlot,S=t._fullLayout,L=r[0],w=L.trace,T=L.hierarchy,A=s/w._entryDepth,m=Ww.listPath(n.data,"id"),F=Aqt(T.copy(),[s,l],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();F=F.filter(function(I){var R=m.indexOf(I.data.id);return R===-1?!1:(I.x0=A*R,I.x1=A*(R+1),I.y0=o,I.y1=o+l,I.onPathbar=!0,!0)}),F.reverse(),a=a.data(F,Ww.getPtId),a.enter().append("g").classed("pathbar",!0),_(a,$W,C,[s,l],f),a.order();var E=a;p&&(E=E.transition().each("end",function(){var I=k9e.select(this);Ww.setSliceCursor(I,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),E.each(function(I){I._x0=u(I.x0),I._x1=u(I.x1),I._y0=c(I.y0),I._y1=c(I.y1),I._hoverX=u(I.x1-Math.min(s,l)/2),I._hoverY=c(I.y1-l/2);var R=k9e.select(this),B=oP.ensureSingle(R,"path","surface",function(q){q.style("pointer-events",k?"none":"all")});p?B.transition().attrTween("d",function(q){var V=x(q,$W,C,[s,l]);return function(K){return f(V(K))}}):B.attr("d",f),R.call(Mqt,n,t,r,{styleOne:L9e,eventDataKeys:ZW.eventDataKeys,transitionTime:ZW.CLICK_TRANSITION_TIME,transitionEasing:ZW.CLICK_TRANSITION_EASING}).call(Ww.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),B.call(L9e,I,w,t,{hovered:!1}),I._text=(Ww.getPtLabel(I)||"").split("
").join(" ")||"";var O=oP.ensureSingle(R,"g","slicetext"),U=oP.ensureSingle(O,"text","",function(q){q.attr("data-notex",1)}),j=oP.ensureUniformFontSize(t,Ww.determineTextFont(w,I,S.font,{onPathbar:!0}));U.text(I._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(C9e.font,j).call(Tqt.convertToTspans,t),I.textBB=C9e.bBox(U.node()),I.transform=v(I,{fontSize:j.size,onPathbar:!0}),I.transform.fontSize=j.size,p?U.transition().attrTween("transform",function(q){var V=y(q,$W,C,[s,l]);return function(K){return g(V(K))}}):U.attr("transform",g(I))})}});var z9e=fe((c3r,I9e)=>{"use strict";var D9e=xi(),KW=($x(),Gs(Zx)).interpolate,dy=Ag(),tM=Xt(),R9e=Im().TEXTPAD,Sqt=mx(),Eqt=Sqt.toMoveInsideBar,kqt=kh(),JW=kqt.recordMinTextSize,Cqt=Jx(),Lqt=F9e();function e_(e){return dy.isHierarchyRoot(e)?"":dy.getPtId(e)}I9e.exports=function(t,r,n,a,i){var o=t._fullLayout,s=r[0],l=s.trace,u=l.type,c=u==="icicle",f=s.hierarchy,v=dy.findEntryWithLevel(f,l.level),g=D9e.select(n),p=g.selectAll("g.pathbar"),_=g.selectAll("g.slice");if(!v){p.remove(),_.remove();return}var x=dy.isHierarchyRoot(v),y=!o.uniformtext.mode&&dy.hasTransition(a),C=dy.getMaxDepth(l),k=function(Te){return Te.data.depth-v.data.depth-1?T+F:-(m+F):0,I={x0:A,x1:A,y0:E,y1:E+m},R=function(Te,Ve,$e){var ot=l.tiling.pad,rt=function(bt){return bt-ot<=Ve.x0},it=function(bt){return bt+ot>=Ve.x1},We=function(bt){return bt-ot<=Ve.y0},mt=function(bt){return bt+ot>=Ve.y1};return Te.x0===Ve.x0&&Te.x1===Ve.x1&&Te.y0===Ve.y0&&Te.y1===Ve.y1?{x0:Te.x0,x1:Te.x1,y0:Te.y0,y1:Te.y1}:{x0:rt(Te.x0-ot)?0:it(Te.x0-ot)?$e[0]:Te.x0,x1:rt(Te.x1+ot)?0:it(Te.x1+ot)?$e[0]:Te.x1,y0:We(Te.y0-ot)?0:mt(Te.y0-ot)?$e[1]:Te.y0,y1:We(Te.y1+ot)?0:mt(Te.y1+ot)?$e[1]:Te.y1}},B=null,O={},U={},j=null,q=function(Te,Ve){return Ve?O[e_(Te)]:U[e_(Te)]},V=function(Te,Ve,$e,ot){if(Ve)return O[e_(f)]||I;var rt=U[l.level]||$e;return k(Te)?R(Te,rt,ot):{}};s.hasMultipleRoots&&x&&C++,l._maxDepth=C,l._backgroundColor=o.paper_bgcolor,l._entryDepth=v.data.depth,l._atRootLevel=x;var K=-w/2+S.l+S.w*(L.x[1]+L.x[0])/2,ee=-T/2+S.t+S.h*(1-(L.y[1]+L.y[0])/2),ce=function(Te){return K+Te},me=function(Te){return ee+Te},ye=me(0),ue=ce(0),J=function(Te){return ue+Te},_e=function(Te){return ye+Te};function ne(Te,Ve){return Te+","+Ve}var ae=J(0),pe=function(Te){Te.x=Math.max(ae,Te.x)},ie=l.pathbar.edgeshape,le=function(Te){var Ve=J(Math.max(Math.min(Te.x0,Te.x0),0)),$e=J(Math.min(Math.max(Te.x1,Te.x1),A)),ot=_e(Te.y0),rt=_e(Te.y1),it=m/2,We={},mt={};We.x=Ve,mt.x=$e,We.y=mt.y=(ot+rt)/2;var bt={x:Ve,y:ot},Yt={x:$e,y:ot},jt={x:$e,y:rt},mr={x:Ve,y:rt};return ie===">"?(bt.x-=it,Yt.x-=it,jt.x-=it,mr.x-=it):ie==="/"?(jt.x-=it,mr.x-=it,We.x-=it/2,mt.x-=it/2):ie==="\\"?(bt.x-=it,Yt.x-=it,We.x-=it/2,mt.x-=it/2):ie==="<"&&(We.x-=it,mt.x-=it),pe(bt),pe(mr),pe(We),pe(Yt),pe(jt),pe(mt),"M"+ne(bt.x,bt.y)+"L"+ne(Yt.x,Yt.y)+"L"+ne(mt.x,mt.y)+"L"+ne(jt.x,jt.y)+"L"+ne(mr.x,mr.y)+"L"+ne(We.x,We.y)+"Z"},xe=l[c?"tiling":"marker"].pad,be=function(Te){return l.textposition.indexOf(Te)!==-1},De=be("top"),Ge=be("left"),pt=be("right"),tt=be("bottom"),Oe=function(Te){var Ve=ce(Te.x0),$e=ce(Te.x1),ot=me(Te.y0),rt=me(Te.y1),it=$e-Ve,We=rt-ot;if(!it||!We)return"";var mt=l.marker.cornerradius||0,bt=Math.min(mt,it/2,We/2);bt&&Te.data&&Te.data.data&&Te.data.data.label&&(De&&(bt=Math.min(bt,xe.t)),Ge&&(bt=Math.min(bt,xe.l)),pt&&(bt=Math.min(bt,xe.r)),tt&&(bt=Math.min(bt,xe.b)));var Yt=function(jt,mr){return bt?"a"+ne(bt,bt)+" 0 0 1 "+ne(jt,mr):""};return"M"+ne(Ve,ot+bt)+Yt(bt,-bt)+"L"+ne($e-bt,ot)+Yt(bt,bt)+"L"+ne($e,rt-bt)+Yt(-bt,bt)+"L"+ne(Ve+bt,rt)+Yt(-bt,-bt)+"Z"},ze=function(Te,Ve){var $e=Te.x0,ot=Te.x1,rt=Te.y0,it=Te.y1,We=Te.textBB,mt=De||Ve.isHeader&&!tt,bt=mt?"start":tt?"end":"middle",Yt=be("right"),jt=be("left")||Ve.onPathbar,mr=jt?-1:Yt?1:0;if(Ve.isHeader){if($e+=(c?xe:xe.l)-R9e,ot-=(c?xe:xe.r)-R9e,$e>=ot){var or=($e+ot)/2;$e=or,ot=or}var fr;tt?(fr=it-(c?xe:xe.b),rt{"use strict";var Pqt=xi(),Fqt=Ag(),Dqt=kh(),Rqt=Dqt.clearMinTextSize,Iqt=_v().resizeText,q9e=z9e();B9e.exports=function(t,r,n,a,i){var o=i.type,s=i.drawDescendants,l=t._fullLayout,u=l["_"+o+"layer"],c,f,v=!n;if(Rqt(o,l),c=u.selectAll("g.trace."+o).data(r,function(p){return p[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!l.uniformtext.mode&&Fqt.hasTransition(n)){a&&(f=a());var g=Pqt.transition().duration(n.duration).ease(n.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()});g.each(function(){u.selectAll("g.trace").each(function(p){q9e(t,p,this,n,s)})})}else c.each(function(p){q9e(t,p,this,n,s)}),l.uniformtext.mode&&Iqt(t,u.selectAll(".trace"),o);v&&c.exit().remove()}});var G9e=fe((h3r,V9e)=>{"use strict";var O9e=xi(),sP=Xt(),N9e=Ji(),zqt=as(),qqt=YW(),U9e=aP().styleOne,eY=Jx(),vy=Ag(),Bqt=Q6(),Oqt=nP().formatSliceLabel,tY=!1;V9e.exports=function(t,r,n,a,i){var o=i.width,s=i.height,l=i.viewX,u=i.viewY,c=i.pathSlice,f=i.toMoveInsideSlice,v=i.strTransform,g=i.hasTransition,p=i.handleSlicesExit,_=i.makeUpdateSliceInterpolator,x=i.makeUpdateTextInterpolator,y=i.prevEntry,C={},k=t._context.staticPlot,S=t._fullLayout,L=r[0],w=L.trace,T=w.textposition.indexOf("left")!==-1,A=w.textposition.indexOf("right")!==-1,m=w.textposition.indexOf("bottom")!==-1,F=!m&&!w.marker.pad.t||m&&!w.marker.pad.b,E=qqt(n,[o,s],{packing:w.tiling.packing,squarifyratio:w.tiling.squarifyratio,flipX:w.tiling.flip.indexOf("x")>-1,flipY:w.tiling.flip.indexOf("y")>-1,pad:{inner:w.tiling.pad,top:w.marker.pad.t,left:w.marker.pad.l,right:w.marker.pad.r,bottom:w.marker.pad.b}}),I=E.descendants(),R=1/0,B=-1/0;I.forEach(function(V){var K=V.depth;K>=w._maxDepth?(V.x0=V.x1=(V.x0+V.x1)/2,V.y0=V.y1=(V.y0+V.y1)/2):(R=Math.min(R,K),B=Math.max(B,K))}),a=a.data(I,vy.getPtId),w._maxVisibleLayers=isFinite(B)?B-R+1:0,a.enter().append("g").classed("slice",!0),p(a,tY,C,[o,s],c),a.order();var O=null;if(g&&y){var U=vy.getPtId(y);a.each(function(V){O===null&&vy.getPtId(V)===U&&(O={x0:V.x0,x1:V.x1,y0:V.y0,y1:V.y1})})}var j=function(){return O||{x0:0,x1:o,y0:0,y1:s}},q=a;return g&&(q=q.transition().each("end",function(){var V=O9e.select(this);vy.setSliceCursor(V,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),q.each(function(V){var K=vy.isHeader(V,w);V._x0=l(V.x0),V._x1=l(V.x1),V._y0=u(V.y0),V._y1=u(V.y1),V._hoverX=l(V.x1-w.marker.pad.r),V._hoverY=u(m?V.y1-w.marker.pad.b/2:V.y0+w.marker.pad.t/2);var ee=O9e.select(this),ce=sP.ensureSingle(ee,"path","surface",function(ne){ne.style("pointer-events",k?"none":"all")});g?ce.transition().attrTween("d",function(ne){var ae=_(ne,tY,j(),[o,s]);return function(pe){return c(ae(pe))}}):ce.attr("d",c),ee.call(Bqt,n,t,r,{styleOne:U9e,eventDataKeys:eY.eventDataKeys,transitionTime:eY.CLICK_TRANSITION_TIME,transitionEasing:eY.CLICK_TRANSITION_EASING}).call(vy.setSliceCursor,t,{isTransitioning:t._transitioning}),ce.call(U9e,V,w,t,{hovered:!1}),V.x0===V.x1||V.y0===V.y1?V._text="":K?V._text=F?"":vy.getPtLabel(V)||"":V._text=Oqt(V,n,w,r,S)||"";var me=sP.ensureSingle(ee,"g","slicetext"),ye=sP.ensureSingle(me,"text","",function(ne){ne.attr("data-notex",1)}),ue=sP.ensureUniformFontSize(t,vy.determineTextFont(w,V,S.font)),J=V._text||" ",_e=K&&J.indexOf("
")===-1;ye.text(J).classed("slicetext",!0).attr("text-anchor",A?"end":T||_e?"start":"middle").call(N9e.font,ue).call(zqt.convertToTspans,t),V.textBB=N9e.bBox(ye.node()),V.transform=f(V,{fontSize:ue.size,isHeader:K}),V.transform.fontSize=ue.size,g?ye.transition().attrTween("transform",function(ne){var ae=x(ne,tY,j(),[o,s]);return function(pe){return v(ae(pe))}}):ye.attr("transform",v(V))}),O}});var j9e=fe((d3r,H9e)=>{"use strict";var Nqt=QW(),Uqt=G9e();H9e.exports=function(t,r,n,a){return Nqt(t,r,n,a,{type:"treemap",drawDescendants:Uqt})}});var Y9e=fe((v3r,W9e)=>{"use strict";W9e.exports={moduleType:"trace",name:"treemap",basePlotModule:u9e(),categories:[],animatable:!0,attributes:iP(),layoutAttributes:GW(),supplyDefaults:y9e(),supplyLayoutDefaults:_9e(),calc:jW().calc,crossTraceCalc:jW().crossTraceCalc,plot:j9e(),style:aP().style,colorbar:Zf(),meta:{}}});var Z9e=fe((p3r,X9e)=>{"use strict";X9e.exports=Y9e()});var K9e=fe(Yw=>{"use strict";var $9e=Hs();Yw.name="icicle";Yw.plot=function(e,t,r,n){$9e.plotBasePlot(Yw.name,e,t,r,n)};Yw.clean=function(e,t,r,n){$9e.cleanBasePlot(Yw.name,e,t,r,n)}});var rY=fe((m3r,ePe)=>{"use strict";var{hovertemplateAttrs:Vqt,texttemplateAttrs:Gqt,templatefallbackAttrs:J9e}=Oo(),Hqt=_s(),jqt=nl().attributes,rM=Ux(),U0=O6(),lP=iP(),Q9e=Jx(),Wqt=ta().extendFlat,Yqt=Uc().pattern;ePe.exports={labels:U0.labels,parents:U0.parents,values:U0.values,branchvalues:U0.branchvalues,count:U0.count,level:U0.level,maxdepth:U0.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:lP.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:Wqt({colors:U0.marker.colors,line:U0.marker.line,pattern:Yqt,editType:"calc"},Hqt("marker",{colorAttr:"colors",anim:!1})),leaf:U0.leaf,pathbar:lP.pathbar,text:rM.text,textinfo:U0.textinfo,texttemplate:Gqt({editType:"plot"},{keys:Q9e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:J9e({editType:"plot"}),hovertext:rM.hovertext,hoverinfo:U0.hoverinfo,hovertemplate:Vqt({},{keys:Q9e.eventDataKeys}),hovertemplatefallback:J9e(),textfont:rM.textfont,insidetextfont:rM.insidetextfont,outsidetextfont:lP.outsidetextfont,textposition:lP.textposition,sort:rM.sort,root:U0.root,domain:jqt({name:"icicle",trace:!0,editType:"calc"})}});var nY=fe((y3r,tPe)=>{"use strict";tPe.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var aPe=fe((x3r,iPe)=>{"use strict";var rPe=Xt(),Xqt=rY(),Zqt=ni(),$qt=nl().defaults,Kqt=q0().handleText,Jqt=Im().TEXTPAD,Qqt=Vx().handleMarkerDefaults,nPe=js(),eBt=nPe.hasColorscale,tBt=nPe.handleDefaults;iPe.exports=function(t,r,n,a){function i(g,p){return rPe.coerce(t,r,Xqt,g,p)}var o=i("labels"),s=i("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=i("values");l&&l.length?i("branchvalues"):i("count"),i("level"),i("maxdepth"),i("tiling.orientation"),i("tiling.flip"),i("tiling.pad");var u=i("text");i("texttemplate"),i("texttemplatefallback"),r.texttemplate||i("textinfo",rPe.isArrayOrTypedArray(u)?"text+label":"label"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var c=i("pathbar.visible"),f="auto";Kqt(t,r,a,i,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("textposition"),Qqt(t,r,a,i);var v=r._hasColorscale=eBt(t,"marker","colors")||(t.marker||{}).coloraxis;v&&tBt(t,r,a,i,{prefix:"marker.",cLetter:"c"}),i("leaf.opacity",v?1:.7),r._hovered={marker:{line:{width:2,color:Zqt.contrast(a.paper_bgcolor)}}},c&&(i("pathbar.thickness",r.pathbar.textfont.size+2*Jqt),i("pathbar.side"),i("pathbar.edgeshape")),i("sort"),i("root.color"),$qt(r,a,i),r._length=null}});var sPe=fe((_3r,oPe)=>{"use strict";var rBt=Xt(),nBt=nY();oPe.exports=function(t,r){function n(a,i){return rBt.coerce(t,r,nBt,a,i)}n("iciclecolorway",r.colorway),n("extendiciclecolors")}});var aY=fe(iY=>{"use strict";var lPe=V6();iY.calc=function(e,t){return lPe.calc(e,t)};iY.crossTraceCalc=function(e){return lPe._runCrossTraceCalc("icicle",e)}});var cPe=fe((w3r,uPe)=>{"use strict";var iBt=N6(),aBt=WW();uPe.exports=function(t,r,n){var a=n.flipX,i=n.flipY,o=n.orientation==="h",s=n.maxDepth,l=r[0],u=r[1];s&&(l=(t.height+1)*r[0]/Math.min(t.height+1,s),u=(t.height+1)*r[1]/Math.min(t.height+1,s));var c=iBt.partition().padding(n.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||a||i)&&aBt(c,r,{swapXY:o,flipX:a,flipY:i}),c}});var oY=fe((T3r,pPe)=>{"use strict";var fPe=xi(),hPe=ni(),dPe=Xt(),oBt=kh().resizeText,sBt=tP();function lBt(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");oBt(e,t,"icicle"),t.each(function(r){var n=fPe.select(this),a=r[0],i=a.trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(o){fPe.select(this).call(vPe,o,i,e)})})}function vPe(e,t,r,n){var a=t.data.data,i=!t.children,o=a.i,s=dPe.castOption(r,o,"marker.line.color")||hPe.defaultLine,l=dPe.castOption(r,o,"marker.line.width")||0;e.call(sBt,t,r,n).style("stroke-width",l).call(hPe.stroke,s).style("opacity",i?r.leaf.opacity:null)}pPe.exports={style:lBt,styleOne:vPe}});var _Pe=fe((A3r,xPe)=>{"use strict";var gPe=xi(),uP=Xt(),mPe=Ji(),uBt=as(),cBt=cPe(),yPe=oY().styleOne,sY=Jx(),Xw=Ag(),fBt=Q6(),hBt=nP().formatSliceLabel,lY=!1;xPe.exports=function(t,r,n,a,i){var o=i.width,s=i.height,l=i.viewX,u=i.viewY,c=i.pathSlice,f=i.toMoveInsideSlice,v=i.strTransform,g=i.hasTransition,p=i.handleSlicesExit,_=i.makeUpdateSliceInterpolator,x=i.makeUpdateTextInterpolator,y=i.prevEntry,C={},k=t._context.staticPlot,S=t._fullLayout,L=r[0],w=L.trace,T=w.textposition.indexOf("left")!==-1,A=w.textposition.indexOf("right")!==-1,m=w.textposition.indexOf("bottom")!==-1,F=cBt(n,[o,s],{flipX:w.tiling.flip.indexOf("x")>-1,flipY:w.tiling.flip.indexOf("y")>-1,orientation:w.tiling.orientation,pad:{inner:w.tiling.pad},maxDepth:w._maxDepth}),E=F.descendants(),I=1/0,R=-1/0;E.forEach(function(q){var V=q.depth;V>=w._maxDepth?(q.x0=q.x1=(q.x0+q.x1)/2,q.y0=q.y1=(q.y0+q.y1)/2):(I=Math.min(I,V),R=Math.max(R,V))}),a=a.data(E,Xw.getPtId),w._maxVisibleLayers=isFinite(R)?R-I+1:0,a.enter().append("g").classed("slice",!0),p(a,lY,C,[o,s],c),a.order();var B=null;if(g&&y){var O=Xw.getPtId(y);a.each(function(q){B===null&&Xw.getPtId(q)===O&&(B={x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1})})}var U=function(){return B||{x0:0,x1:o,y0:0,y1:s}},j=a;return g&&(j=j.transition().each("end",function(){var q=gPe.select(this);Xw.setSliceCursor(q,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),j.each(function(q){q._x0=l(q.x0),q._x1=l(q.x1),q._y0=u(q.y0),q._y1=u(q.y1),q._hoverX=l(q.x1-w.tiling.pad),q._hoverY=u(m?q.y1-w.tiling.pad/2:q.y0+w.tiling.pad/2);var V=gPe.select(this),K=uP.ensureSingle(V,"path","surface",function(ye){ye.style("pointer-events",k?"none":"all")});g?K.transition().attrTween("d",function(ye){var ue=_(ye,lY,U(),[o,s],{orientation:w.tiling.orientation,flipX:w.tiling.flip.indexOf("x")>-1,flipY:w.tiling.flip.indexOf("y")>-1});return function(J){return c(ue(J))}}):K.attr("d",c),V.call(fBt,n,t,r,{styleOne:yPe,eventDataKeys:sY.eventDataKeys,transitionTime:sY.CLICK_TRANSITION_TIME,transitionEasing:sY.CLICK_TRANSITION_EASING}).call(Xw.setSliceCursor,t,{isTransitioning:t._transitioning}),K.call(yPe,q,w,t,{hovered:!1}),q.x0===q.x1||q.y0===q.y1?q._text="":q._text=hBt(q,n,w,r,S)||"";var ee=uP.ensureSingle(V,"g","slicetext"),ce=uP.ensureSingle(ee,"text","",function(ye){ye.attr("data-notex",1)}),me=uP.ensureUniformFontSize(t,Xw.determineTextFont(w,q,S.font));ce.text(q._text||" ").classed("slicetext",!0).attr("text-anchor",A?"end":T?"start":"middle").call(mPe.font,me).call(uBt.convertToTspans,t),q.textBB=mPe.bBox(ce.node()),q.transform=f(q,{fontSize:me.size}),q.transform.fontSize=me.size,g?ce.transition().attrTween("transform",function(ye){var ue=x(ye,lY,U(),[o,s]);return function(J){return v(ue(J))}}):ce.attr("transform",v(q))}),B}});var wPe=fe((M3r,bPe)=>{"use strict";var dBt=QW(),vBt=_Pe();bPe.exports=function(t,r,n,a){return dBt(t,r,n,a,{type:"icicle",drawDescendants:vBt})}});var APe=fe((S3r,TPe)=>{"use strict";TPe.exports={moduleType:"trace",name:"icicle",basePlotModule:K9e(),categories:[],animatable:!0,attributes:rY(),layoutAttributes:nY(),supplyDefaults:aPe(),supplyLayoutDefaults:sPe(),calc:aY().calc,crossTraceCalc:aY().crossTraceCalc,plot:wPe(),style:oY().style,colorbar:Zf(),meta:{}}});var SPe=fe((E3r,MPe)=>{"use strict";MPe.exports=APe()});var kPe=fe(Zw=>{"use strict";var EPe=Hs();Zw.name="funnelarea";Zw.plot=function(e,t,r,n){EPe.plotBasePlot(Zw.name,e,t,r,n)};Zw.clean=function(e,t,r,n){EPe.cleanBasePlot(Zw.name,e,t,r,n)}});var uY=fe((C3r,LPe)=>{"use strict";var eh=Ux(),pBt=Ho(),gBt=nl().attributes,{hovertemplateAttrs:mBt,texttemplateAttrs:yBt,templatefallbackAttrs:CPe}=Oo(),t_=ta().extendFlat;LPe.exports={labels:eh.labels,label0:eh.label0,dlabel:eh.dlabel,values:eh.values,marker:{colors:eh.marker.colors,line:{color:t_({},eh.marker.line.color,{dflt:null}),width:t_({},eh.marker.line.width,{dflt:1}),editType:"calc"},pattern:eh.marker.pattern,editType:"calc"},text:eh.text,hovertext:eh.hovertext,scalegroup:t_({},eh.scalegroup,{}),textinfo:t_({},eh.textinfo,{flags:["label","text","value","percent"]}),texttemplate:yBt({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:CPe({editType:"plot"}),hoverinfo:t_({},pBt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:mBt({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:CPe(),textposition:t_({},eh.textposition,{values:["inside","none"],dflt:"inside"}),textfont:eh.textfont,insidetextfont:eh.insidetextfont,title:{text:eh.title.text,font:eh.title.font,position:t_({},eh.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:gBt({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"}}});var cY=fe((L3r,PPe)=>{"use strict";var xBt=L9().hiddenlabels;PPe.exports={hiddenlabels:xBt,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var RPe=fe((P3r,DPe)=>{"use strict";var FPe=Xt(),_Bt=uY(),bBt=nl().defaults,wBt=q0().handleText,TBt=Vx().handleLabelsAndValues,ABt=Vx().handleMarkerDefaults;DPe.exports=function(t,r,n,a){function i(_,x){return FPe.coerce(t,r,_Bt,_,x)}var o=i("labels"),s=i("values"),l=TBt(o,s),u=l.len;if(r._hasLabels=l.hasLabels,r._hasValues=l.hasValues,!r._hasLabels&&r._hasValues&&(i("label0"),i("dlabel")),!u){r.visible=!1;return}r._length=u,ABt(t,r,a,i),i("scalegroup");var c=i("text"),f=i("texttemplate");i("texttemplatefallback");var v;if(f||(v=i("textinfo",Array.isArray(c)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),f||v&&v!=="none"){var g=i("textposition");wBt(t,r,a,i,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else v==="none"&&i("textposition","none");bBt(r,a,i);var p=i("title.text");p&&(i("title.position"),FPe.coerceFont(i,"title.font",a.font)),i("aspectratio"),i("baseratio")}});var zPe=fe((F3r,IPe)=>{"use strict";var MBt=Xt(),SBt=cY();IPe.exports=function(t,r){function n(a,i){return MBt.coerce(t,r,SBt,a,i)}n("hiddenlabels"),n("funnelareacolorway",r.colorway),n("extendfunnelareacolors")}});var fY=fe((D3r,BPe)=>{"use strict";var qPe=Pw();function EBt(e,t){return qPe.calc(e,t)}function kBt(e){qPe.crossTraceCalc(e,{type:"funnelarea"})}BPe.exports={calc:EBt,crossTraceCalc:kBt}});var GPe=fe((R3r,VPe)=>{"use strict";var r_=xi(),hY=Ji(),py=Xt(),CBt=py.strScale,OPe=py.strTranslate,NPe=as(),LBt=mx(),PBt=LBt.toMoveInsideBar,UPe=kh(),FBt=UPe.recordMinTextSize,DBt=UPe.clearMinTextSize,RBt=Sm(),$w=R9(),IBt=$w.attachFxHandlers,zBt=$w.determineInsideTextFont,qBt=$w.layoutAreas,BBt=$w.prerenderTitles,OBt=$w.positionTitleOutside,NBt=$w.formatSliceLabel;VPe.exports=function(t,r){var n=t._context.staticPlot,a=t._fullLayout;DBt("funnelarea",a),BBt(r,t),qBt(r,a._size),py.makeTraceGroups(a._funnelarealayer,r,"trace").each(function(i){var o=r_.select(this),s=i[0],l=s.trace;VBt(i),o.each(function(){var u=r_.select(this).selectAll("g.slice").data(i);u.enter().append("g").classed("slice",!0),u.exit().remove(),u.each(function(f,v){if(f.hidden){r_.select(this).selectAll("path,g").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var g=s.cx,p=s.cy,_=r_.select(this),x=_.selectAll("path.surface").data([f]);x.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),_.call(IBt,t,i);var y="M"+(g+f.TR[0])+","+(p+f.TR[1])+dY(f.TR,f.BR)+dY(f.BR,f.BL)+dY(f.BL,f.TL)+"Z";x.attr("d",y),NBt(t,f,s);var C=RBt.castOption(l.textposition,f.pts),k=_.selectAll("g.slicetext").data(f.text&&C!=="none"?[0]:[]);k.enter().append("g").classed("slicetext",!0),k.exit().remove(),k.each(function(){var S=py.ensureSingle(r_.select(this),"text","",function(I){I.attr("data-notex",1)}),L=py.ensureUniformFontSize(t,zBt(l,f,a.font));S.text(f.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(hY.font,L).call(NPe.convertToTspans,t);var w=hY.bBox(S.node()),T,A,m,F=Math.min(f.BL[1],f.BR[1])+p,E=Math.max(f.TL[1],f.TR[1])+p;A=Math.max(f.TL[0],f.BL[0])+g,m=Math.min(f.TR[0],f.BR[0])+g,T=PBt(A,m,F,E,w,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),T.fontSize=L.size,FBt(l.type,T,a),i[v].transform=T,py.setTransormAndDisplay(S,T)})});var c=r_.select(this).selectAll("g.titletext").data(l.title.text?[0]:[]);c.enter().append("g").classed("titletext",!0),c.exit().remove(),c.each(function(){var f=py.ensureSingle(r_.select(this),"text","",function(p){p.attr("data-notex",1)}),v=l.title.text;l._meta&&(v=py.templateString(v,l._meta)),f.text(v).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(hY.font,l.title.font).call(NPe.convertToTspans,t);var g=OBt(s,a._size);f.attr("transform",OPe(g.x,g.y)+CBt(Math.min(1,g.scale))+OPe(g.tx,g.ty))})})})};function dY(e,t){var r=t[0]-e[0],n=t[1]-e[1];return"l"+r+","+n}function UBt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function VBt(e){if(!e.length)return;var t=e[0],r=t.trace,n=r.aspectratio,a=r.baseratio;a>.999&&(a=.999);var i=Math.pow(a,2),o=t.vTotal,s=o*i/(1-i),l=o,u=s/o;function c(){var R=Math.sqrt(u);return{x:R,y:-R}}function f(){var R=c();return[R.x,R.y]}var v,g=[];g.push(f());var p,_;for(p=e.length-1;p>-1;p--)if(_=e[p],!_.hidden){var x=_.v/l;u+=x,g.push(f())}var y=1/0,C=-1/0;for(p=0;p-1;p--)if(_=e[p],!_.hidden){F+=1;var E=g[F][0],I=g[F][1];_.TL=[-E,I],_.TR=[E,I],_.BL=A,_.BR=m,_.pxmid=UBt(_.TR,_.BR),A=_.TL,m=_.TR}}});var WPe=fe((I3r,jPe)=>{"use strict";var HPe=xi(),GBt=Jb(),HBt=kh().resizeText;jPe.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");HBt(t,r,"funnelarea"),r.each(function(n){var a=n[0],i=a.trace,o=HPe.select(this);o.style({opacity:i.opacity}),o.selectAll("path.surface").each(function(s){HPe.select(this).call(GBt,s,i,t)})})}});var XPe=fe((z3r,YPe)=>{"use strict";YPe.exports={moduleType:"trace",name:"funnelarea",basePlotModule:kPe(),categories:["pie-like","funnelarea","showLegend"],attributes:uY(),layoutAttributes:cY(),supplyDefaults:RPe(),supplyLayoutDefaults:zPe(),calc:fY().calc,crossTraceCalc:fY().crossTraceCalc,plot:GPe(),style:WPe(),styleOne:Jb(),meta:{}}});var $Pe=fe((q3r,ZPe)=>{"use strict";ZPe.exports=XPe()});var xf=fe((B3r,KPe)=>{"use strict";(()=>{var e={3065(a,i,o){a.exports={alpha_shape:o(3502),convex_hull:o(7352),delaunay_triangulate:o(7642),gl_cone3d:o(6405),gl_error3d:o(9165),gl_line3d:o(5714),gl_mesh3d:o(7201),gl_plot3d:o(4100),gl_scatter3d:o(8418),gl_streamtube3d:o(7815),gl_surface3d:o(9499),ndarray:o(9618),ndarray_linear_interpolate:o(4317)}},6296(a,i,o){"use strict";a.exports=v;var s=o(7261),l=o(9977),u=o(1811);function c(g,p){this._controllerNames=Object.keys(g),this._controllerList=this._controllerNames.map(function(_){return g[_]}),this._mode=p,this._active=g[p],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 f=c.prototype;f.flush=function(g){for(var p=this._controllerList,_=0;_0)throw new Error("Invalid string. Length must be a multiple of 4");var L=k.indexOf("=");L===-1&&(L=S);var w=L===S?0:4-L%4;return[L,w]}function g(k){var S=v(k),L=S[0],w=S[1];return(L+w)*3/4-w}function p(k,S,L){return(S+L)*3/4-L}function _(k){var S,L=v(k),w=L[0],T=L[1],A=new l(p(k,w,T)),m=0,F=T>0?w-4:w,E;for(E=0;E>16&255,A[m++]=S>>8&255,A[m++]=S&255;return T===2&&(S=s[k.charCodeAt(E)]<<2|s[k.charCodeAt(E+1)]>>4,A[m++]=S&255),T===1&&(S=s[k.charCodeAt(E)]<<10|s[k.charCodeAt(E+1)]<<4|s[k.charCodeAt(E+2)]>>2,A[m++]=S>>8&255,A[m++]=S&255),A}function x(k){return o[k>>18&63]+o[k>>12&63]+o[k>>6&63]+o[k&63]}function y(k,S,L){for(var w,T=[],A=S;AF?F:m+A));return w===1?(S=k[L-1],T.push(o[S>>2]+o[S<<4&63]+"==")):w===2&&(S=(k[L-2]<<8)+k[L-1],T.push(o[S>>10]+o[S>>4&63]+o[S<<2&63]+"=")),T.join("")}},3865(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[1]).add(c[0].mul(u[1])),u[1].mul(c[1]))}},1318(a){"use strict";a.exports=i;function i(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}},8697(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}},7842(a,i,o){"use strict";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),v=o(8697);a.exports=g;function g(p,_){if(s(p))return _?v(p,g(_)):[p[0].clone(),p[1].clone()];var x=0,y,C;if(l(p))y=p.clone();else if(typeof p=="string")y=c(p);else{if(p===0)return[u(0),u(1)];if(p===Math.floor(p))y=u(p);else{for(;p!==Math.floor(p);)p=p*Math.pow(2,256),x-=256;y=u(p)}}if(s(_))y.mul(_[1]),C=_[0].clone();else if(l(_))C=_.clone();else if(typeof _=="string")C=c(_);else if(!_)C=u(1);else if(_===Math.floor(_))C=u(_);else{for(;_!==Math.floor(_);)_=_*Math.pow(2,256),x+=256;C=u(_)}return x>0?y=y.ushln(x):x<0&&(C=C.ushln(-x)),f(y,C)}},6330(a,i,o){"use strict";var s=o(1533);a.exports=l;function l(u){return Array.isArray(u)&&u.length===2&&s(u[0])&&s(u[1])}},5716(a,i,o){"use strict";var s=o(6859);a.exports=l;function l(u){return u.cmp(new s(0))}},1369(a,i,o){"use strict";var s=o(5716);a.exports=l;function l(u){var c=u.length,f=u.words,v=0;if(c===1)v=f[0];else if(c===2)v=f[0]+f[1]*67108864;else for(var g=0;g20?52:v+32}},1533(a,i,o){"use strict";var s=o(6859);a.exports=l;function l(u){return u&&typeof u=="object"&&!!u.words}},2651(a,i,o){"use strict";var s=o(6859),l=o(2361);a.exports=u;function u(c){var f=l.exponent(c);return f<52?new s(c):new s(c*Math.pow(2,52-f)).ushln(f-52)}},869(a,i,o){"use strict";var s=o(2651),l=o(5716);a.exports=u;function u(c,f){var v=l(c),g=l(f);if(v===0)return[s(0),s(1)];if(g===0)return[s(0),s(0)];g<0&&(c=c.neg(),f=f.neg());var p=c.gcd(f);return p.cmpn(1)?[c.div(p),f.div(p)]:[c,f]}},6768(a,i,o){"use strict";var s=o(6859);a.exports=l;function l(u){return new s(u)}},6504(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[0]),u[1].mul(c[1]))}},7721(a,i,o){"use strict";var s=o(5716);a.exports=l;function l(u){return s(u[0])*s(u[1])}},5572(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[1]).sub(u[1].mul(c[0])),u[1].mul(c[1]))}},946(a,i,o){"use strict";var s=o(1369),l=o(4025);a.exports=u;function u(c){var f=c[0],v=c[1];if(f.cmpn(0)===0)return 0;var g=f.abs().divmod(v.abs()),p=g.div,_=s(p),x=g.mod,y=f.negative!==v.negative?-1:1;if(x.cmpn(0)===0)return y*_;if(_){var C=l(_)+4,k=s(x.ushln(C).divRound(v));return y*(_+k*Math.pow(2,-C))}else{var S=v.bitLength()-x.bitLength()+53,k=s(x.ushln(S).divRound(v));return S<1023?y*k*Math.pow(2,-S):(k*=Math.pow(2,-1023),y*k*Math.pow(2,1023-S))}}},2478(a){"use strict";function i(f,v,g,p,_){for(var x=_+1;p<=_;){var y=p+_>>>1,C=f[y],k=g!==void 0?g(C,v):C-v;k>=0?(x=y,_=y-1):p=y+1}return x}function o(f,v,g,p,_){for(var x=_+1;p<=_;){var y=p+_>>>1,C=f[y],k=g!==void 0?g(C,v):C-v;k>0?(x=y,_=y-1):p=y+1}return x}function s(f,v,g,p,_){for(var x=p-1;p<=_;){var y=p+_>>>1,C=f[y],k=g!==void 0?g(C,v):C-v;k<0?(x=y,p=y+1):_=y-1}return x}function l(f,v,g,p,_){for(var x=p-1;p<=_;){var y=p+_>>>1,C=f[y],k=g!==void 0?g(C,v):C-v;k<=0?(x=y,p=y+1):_=y-1}return x}function u(f,v,g,p,_){for(;p<=_;){var x=p+_>>>1,y=f[x],C=g!==void 0?g(y,v):y-v;if(C===0)return x;C<=0?p=x+1:_=x-1}return-1}function c(f,v,g,p,_,x){return typeof g=="function"?x(f,v,g,p===void 0?0:p|0,_===void 0?f.length-1:_|0):x(f,v,void 0,g===void 0?0:g|0,p===void 0?f.length-1:p|0)}a.exports={ge:function(f,v,g,p,_){return c(f,v,g,p,_,i)},gt:function(f,v,g,p,_){return c(f,v,g,p,_,o)},lt:function(f,v,g,p,_){return c(f,v,g,p,_,s)},le:function(f,v,g,p,_){return c(f,v,g,p,_,l)},eq:function(f,v,g,p,_){return c(f,v,g,p,_,u)}}},8828(a,i){"use strict";"use restrict";var o=32;i.INT_BITS=o,i.INT_MAX=2147483647,i.INT_MIN=-1<0)-(u<0)},i.abs=function(u){var c=u>>o-1;return(u^c)-c},i.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},i.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},i.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}i.countTrailingZeros=s,i.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},i.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},i.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,v=c,g=7;for(f>>>=1;f;f>>>=1)v<<=1,v|=f&1,--g;u[c]=v<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},i.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},i.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},i.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},i.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},i.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},6859(a,i,o){a=o.nmd(a),(function(s,l){"use strict";function u(j,q){if(!j)throw new Error(q||"Assertion failed")}function c(j,q){j.super_=q;var V=function(){};V.prototype=q.prototype,j.prototype=new V,j.prototype.constructor=j}function f(j,q,V){if(f.isBN(j))return j;this.negative=0,this.words=null,this.length=0,this.red=null,j!==null&&((q==="le"||q==="be")&&(V=q,q=10),this._init(j||0,q||10,V||"be"))}typeof s=="object"?s.exports=f:l.BN=f,f.BN=f,f.wordSize=26;var v;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?v=window.Buffer:v=o(7790).Buffer}catch(j){}f.isBN=function(q){return q instanceof f?!0:q!==null&&typeof q=="object"&&q.constructor.wordSize===f.wordSize&&Array.isArray(q.words)},f.max=function(q,V){return q.cmp(V)>0?q:V},f.min=function(q,V){return q.cmp(V)<0?q:V},f.prototype._init=function(q,V,K){if(typeof q=="number")return this._initNumber(q,V,K);if(typeof q=="object")return this._initArray(q,V,K);V==="hex"&&(V=16),u(V===(V|0)&&V>=2&&V<=36),q=q.toString().replace(/\s+/g,"");var ee=0;q[0]==="-"&&(ee++,this.negative=1),ee=0;ee-=3)me=q[ee]|q[ee-1]<<8|q[ee-2]<<16,this.words[ce]|=me<>>26-ye&67108863,ye+=24,ye>=26&&(ye-=26,ce++);else if(K==="le")for(ee=0,ce=0;ee>>26-ye&67108863,ye+=24,ye>=26&&(ye-=26,ce++);return this.strip()};function g(j,q){var V=j.charCodeAt(q);return V>=65&&V<=70?V-55:V>=97&&V<=102?V-87:V-48&15}function p(j,q,V){var K=g(j,V);return V-1>=q&&(K|=g(j,V-1)<<4),K}f.prototype._parseHex=function(q,V,K){this.length=Math.ceil((q.length-V)/6),this.words=new Array(this.length);for(var ee=0;ee=V;ee-=2)ye=p(q,V,ee)<=18?(ce-=18,me+=1,this.words[me]|=ye>>>26):ce+=8;else{var ue=q.length-V;for(ee=ue%2===0?V+1:V;ee=18?(ce-=18,me+=1,this.words[me]|=ye>>>26):ce+=8}this.strip()};function _(j,q,V,K){for(var ee=0,ce=Math.min(j.length,V),me=q;me=49?ee+=ye-49+10:ye>=17?ee+=ye-17+10:ee+=ye}return ee}f.prototype._parseBase=function(q,V,K){this.words=[0],this.length=1;for(var ee=0,ce=1;ce<=67108863;ce*=V)ee++;ee--,ce=ce/V|0;for(var me=q.length-K,ye=me%ee,ue=Math.min(me,me-ye)+K,J=0,_e=K;_e1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?""};var x=["","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"],y=[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],C=[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];f.prototype.toString=function(q,V){q=q||10,V=V|0||1;var K;if(q===16||q==="hex"){K="";for(var ee=0,ce=0,me=0;me>>24-ee&16777215,ee+=2,ee>=26&&(ee-=26,me--),ce!==0||me!==this.length-1?K=x[6-ue.length]+ue+K:K=ue+K}for(ce!==0&&(K=ce.toString(16)+K);K.length%V!==0;)K="0"+K;return this.negative!==0&&(K="-"+K),K}if(q===(q|0)&&q>=2&&q<=36){var J=y[q],_e=C[q];K="";var ne=this.clone();for(ne.negative=0;!ne.isZero();){var ae=ne.modn(_e).toString(q);ne=ne.idivn(_e),ne.isZero()?K=ae+K:K=x[J-ae.length]+ae+K}for(this.isZero()&&(K="0"+K);K.length%V!==0;)K="0"+K;return this.negative!==0&&(K="-"+K),K}u(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var q=this.words[0];return this.length===2?q+=this.words[1]*67108864:this.length===3&&this.words[2]===1?q+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-q:q},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(q,V){return u(typeof v!="undefined"),this.toArrayLike(v,q,V)},f.prototype.toArray=function(q,V){return this.toArrayLike(Array,q,V)},f.prototype.toArrayLike=function(q,V,K){var ee=this.byteLength(),ce=K||Math.max(1,ee);u(ee<=ce,"byte array longer than desired length"),u(ce>0,"Requested array length <= 0"),this.strip();var me=V==="le",ye=new q(ce),ue,J,_e=this.clone();if(me){for(J=0;!_e.isZero();J++)ue=_e.andln(255),_e.iushrn(8),ye[J]=ue;for(;J=4096&&(K+=13,V>>>=13),V>=64&&(K+=7,V>>>=7),V>=8&&(K+=4,V>>>=4),V>=2&&(K+=2,V>>>=2),K+V},f.prototype._zeroBits=function(q){if(q===0)return 26;var V=q,K=0;return(V&8191)===0&&(K+=13,V>>>=13),(V&127)===0&&(K+=7,V>>>=7),(V&15)===0&&(K+=4,V>>>=4),(V&3)===0&&(K+=2,V>>>=2),(V&1)===0&&K++,K},f.prototype.bitLength=function(){var q=this.words[this.length-1],V=this._countBits(q);return(this.length-1)*26+V};function k(j){for(var q=new Array(j.bitLength()),V=0;V>>ee}return q}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var q=0,V=0;Vq.length?this.clone().ior(q):q.clone().ior(this)},f.prototype.uor=function(q){return this.length>q.length?this.clone().iuor(q):q.clone().iuor(this)},f.prototype.iuand=function(q){var V;this.length>q.length?V=q:V=this;for(var K=0;Kq.length?this.clone().iand(q):q.clone().iand(this)},f.prototype.uand=function(q){return this.length>q.length?this.clone().iuand(q):q.clone().iuand(this)},f.prototype.iuxor=function(q){var V,K;this.length>q.length?(V=this,K=q):(V=q,K=this);for(var ee=0;eeq.length?this.clone().ixor(q):q.clone().ixor(this)},f.prototype.uxor=function(q){return this.length>q.length?this.clone().iuxor(q):q.clone().iuxor(this)},f.prototype.inotn=function(q){u(typeof q=="number"&&q>=0);var V=Math.ceil(q/26)|0,K=q%26;this._expand(V),K>0&&V--;for(var ee=0;ee0&&(this.words[ee]=~this.words[ee]&67108863>>26-K,ee++);ee=0);var K=q/26|0,ee=q%26;return this._expand(K+1),V?this.words[K]=this.words[K]|1<q.length?(K=this,ee=q):(K=q,ee=this);for(var ce=0,me=0;me>>26;for(;ce!==0&&me>>26;if(this.length=K.length,ce!==0)this.words[this.length]=ce,this.length++;else if(K!==this)for(;meq.length?this.clone().iadd(q):q.clone().iadd(this)},f.prototype.isub=function(q){if(q.negative!==0){q.negative=0;var V=this.iadd(q);return q.negative=1,V._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(q),this.negative=1,this._normSign();var K=this.cmp(q);if(K===0)return this.negative=0,this.length=1,this.words[0]=0,this;var ee,ce;K>0?(ee=this,ce=q):(ee=q,ce=this);for(var me=0,ye=0;ye>26,this.words[ye]=V&67108863;for(;me!==0&&ye>26,this.words[ye]=V&67108863;if(me===0&&ye>>26,ne=ue&67108863,ae=Math.min(J,q.length-1),pe=Math.max(0,J-j.length+1);pe<=ae;pe++){var ie=J-pe|0;ee=j.words[ie]|0,ce=q.words[pe]|0,me=ee*ce+ne,_e+=me/67108864|0,ne=me&67108863}V.words[J]=ne|0,ue=_e|0}return ue!==0?V.words[J]=ue|0:V.length--,V.strip()}var L=function(q,V,K){var ee=q.words,ce=V.words,me=K.words,ye=0,ue,J,_e,ne=ee[0]|0,ae=ne&8191,pe=ne>>>13,ie=ee[1]|0,le=ie&8191,xe=ie>>>13,be=ee[2]|0,De=be&8191,Ge=be>>>13,pt=ee[3]|0,tt=pt&8191,Oe=pt>>>13,ze=ee[4]|0,ut=ze&8191,et=ze>>>13,qe=ee[5]|0,we=qe&8191,Le=qe>>>13,Ke=ee[6]|0,Te=Ke&8191,Ve=Ke>>>13,$e=ee[7]|0,ot=$e&8191,rt=$e>>>13,it=ee[8]|0,We=it&8191,mt=it>>>13,bt=ee[9]|0,Yt=bt&8191,jt=bt>>>13,mr=ce[0]|0,or=mr&8191,fr=mr>>>13,Ot=ce[1]|0,cr=Ot&8191,Ct=Ot>>>13,wt=ce[2]|0,Tt=wt&8191,Mt=wt>>>13,Lt=ce[3]|0,ft=Lt&8191,kt=Lt>>>13,rr=ce[4]|0,pr=rr&8191,Kr=rr>>>13,Nr=ce[5]|0,dn=Nr&8191,xr=Nr>>>13,Fr=ce[6]|0,Zr=Fr&8191,Cn=Fr>>>13,Dt=ce[7]|0,At=Dt&8191,Vt=Dt>>>13,Qt=ce[8]|0,Ut=Qt&8191,_r=Qt>>>13,rn=ce[9]|0,Jr=rn&8191,qn=rn>>>13;K.negative=q.negative^V.negative,K.length=19,ue=Math.imul(ae,or),J=Math.imul(ae,fr),J=J+Math.imul(pe,or)|0,_e=Math.imul(pe,fr);var ri=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(ri>>>26)|0,ri&=67108863,ue=Math.imul(le,or),J=Math.imul(le,fr),J=J+Math.imul(xe,or)|0,_e=Math.imul(xe,fr),ue=ue+Math.imul(ae,cr)|0,J=J+Math.imul(ae,Ct)|0,J=J+Math.imul(pe,cr)|0,_e=_e+Math.imul(pe,Ct)|0;var Jn=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(Jn>>>26)|0,Jn&=67108863,ue=Math.imul(De,or),J=Math.imul(De,fr),J=J+Math.imul(Ge,or)|0,_e=Math.imul(Ge,fr),ue=ue+Math.imul(le,cr)|0,J=J+Math.imul(le,Ct)|0,J=J+Math.imul(xe,cr)|0,_e=_e+Math.imul(xe,Ct)|0,ue=ue+Math.imul(ae,Tt)|0,J=J+Math.imul(ae,Mt)|0,J=J+Math.imul(pe,Tt)|0,_e=_e+Math.imul(pe,Mt)|0;var Ii=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,ue=Math.imul(tt,or),J=Math.imul(tt,fr),J=J+Math.imul(Oe,or)|0,_e=Math.imul(Oe,fr),ue=ue+Math.imul(De,cr)|0,J=J+Math.imul(De,Ct)|0,J=J+Math.imul(Ge,cr)|0,_e=_e+Math.imul(Ge,Ct)|0,ue=ue+Math.imul(le,Tt)|0,J=J+Math.imul(le,Mt)|0,J=J+Math.imul(xe,Tt)|0,_e=_e+Math.imul(xe,Mt)|0,ue=ue+Math.imul(ae,ft)|0,J=J+Math.imul(ae,kt)|0,J=J+Math.imul(pe,ft)|0,_e=_e+Math.imul(pe,kt)|0;var Vi=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,ue=Math.imul(ut,or),J=Math.imul(ut,fr),J=J+Math.imul(et,or)|0,_e=Math.imul(et,fr),ue=ue+Math.imul(tt,cr)|0,J=J+Math.imul(tt,Ct)|0,J=J+Math.imul(Oe,cr)|0,_e=_e+Math.imul(Oe,Ct)|0,ue=ue+Math.imul(De,Tt)|0,J=J+Math.imul(De,Mt)|0,J=J+Math.imul(Ge,Tt)|0,_e=_e+Math.imul(Ge,Mt)|0,ue=ue+Math.imul(le,ft)|0,J=J+Math.imul(le,kt)|0,J=J+Math.imul(xe,ft)|0,_e=_e+Math.imul(xe,kt)|0,ue=ue+Math.imul(ae,pr)|0,J=J+Math.imul(ae,Kr)|0,J=J+Math.imul(pe,pr)|0,_e=_e+Math.imul(pe,Kr)|0;var ra=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(ra>>>26)|0,ra&=67108863,ue=Math.imul(we,or),J=Math.imul(we,fr),J=J+Math.imul(Le,or)|0,_e=Math.imul(Le,fr),ue=ue+Math.imul(ut,cr)|0,J=J+Math.imul(ut,Ct)|0,J=J+Math.imul(et,cr)|0,_e=_e+Math.imul(et,Ct)|0,ue=ue+Math.imul(tt,Tt)|0,J=J+Math.imul(tt,Mt)|0,J=J+Math.imul(Oe,Tt)|0,_e=_e+Math.imul(Oe,Mt)|0,ue=ue+Math.imul(De,ft)|0,J=J+Math.imul(De,kt)|0,J=J+Math.imul(Ge,ft)|0,_e=_e+Math.imul(Ge,kt)|0,ue=ue+Math.imul(le,pr)|0,J=J+Math.imul(le,Kr)|0,J=J+Math.imul(xe,pr)|0,_e=_e+Math.imul(xe,Kr)|0,ue=ue+Math.imul(ae,dn)|0,J=J+Math.imul(ae,xr)|0,J=J+Math.imul(pe,dn)|0,_e=_e+Math.imul(pe,xr)|0;var ha=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(ha>>>26)|0,ha&=67108863,ue=Math.imul(Te,or),J=Math.imul(Te,fr),J=J+Math.imul(Ve,or)|0,_e=Math.imul(Ve,fr),ue=ue+Math.imul(we,cr)|0,J=J+Math.imul(we,Ct)|0,J=J+Math.imul(Le,cr)|0,_e=_e+Math.imul(Le,Ct)|0,ue=ue+Math.imul(ut,Tt)|0,J=J+Math.imul(ut,Mt)|0,J=J+Math.imul(et,Tt)|0,_e=_e+Math.imul(et,Mt)|0,ue=ue+Math.imul(tt,ft)|0,J=J+Math.imul(tt,kt)|0,J=J+Math.imul(Oe,ft)|0,_e=_e+Math.imul(Oe,kt)|0,ue=ue+Math.imul(De,pr)|0,J=J+Math.imul(De,Kr)|0,J=J+Math.imul(Ge,pr)|0,_e=_e+Math.imul(Ge,Kr)|0,ue=ue+Math.imul(le,dn)|0,J=J+Math.imul(le,xr)|0,J=J+Math.imul(xe,dn)|0,_e=_e+Math.imul(xe,xr)|0,ue=ue+Math.imul(ae,Zr)|0,J=J+Math.imul(ae,Cn)|0,J=J+Math.imul(pe,Zr)|0,_e=_e+Math.imul(pe,Cn)|0;var va=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(va>>>26)|0,va&=67108863,ue=Math.imul(ot,or),J=Math.imul(ot,fr),J=J+Math.imul(rt,or)|0,_e=Math.imul(rt,fr),ue=ue+Math.imul(Te,cr)|0,J=J+Math.imul(Te,Ct)|0,J=J+Math.imul(Ve,cr)|0,_e=_e+Math.imul(Ve,Ct)|0,ue=ue+Math.imul(we,Tt)|0,J=J+Math.imul(we,Mt)|0,J=J+Math.imul(Le,Tt)|0,_e=_e+Math.imul(Le,Mt)|0,ue=ue+Math.imul(ut,ft)|0,J=J+Math.imul(ut,kt)|0,J=J+Math.imul(et,ft)|0,_e=_e+Math.imul(et,kt)|0,ue=ue+Math.imul(tt,pr)|0,J=J+Math.imul(tt,Kr)|0,J=J+Math.imul(Oe,pr)|0,_e=_e+Math.imul(Oe,Kr)|0,ue=ue+Math.imul(De,dn)|0,J=J+Math.imul(De,xr)|0,J=J+Math.imul(Ge,dn)|0,_e=_e+Math.imul(Ge,xr)|0,ue=ue+Math.imul(le,Zr)|0,J=J+Math.imul(le,Cn)|0,J=J+Math.imul(xe,Zr)|0,_e=_e+Math.imul(xe,Cn)|0,ue=ue+Math.imul(ae,At)|0,J=J+Math.imul(ae,Vt)|0,J=J+Math.imul(pe,At)|0,_e=_e+Math.imul(pe,Vt)|0;var Xi=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,ue=Math.imul(We,or),J=Math.imul(We,fr),J=J+Math.imul(mt,or)|0,_e=Math.imul(mt,fr),ue=ue+Math.imul(ot,cr)|0,J=J+Math.imul(ot,Ct)|0,J=J+Math.imul(rt,cr)|0,_e=_e+Math.imul(rt,Ct)|0,ue=ue+Math.imul(Te,Tt)|0,J=J+Math.imul(Te,Mt)|0,J=J+Math.imul(Ve,Tt)|0,_e=_e+Math.imul(Ve,Mt)|0,ue=ue+Math.imul(we,ft)|0,J=J+Math.imul(we,kt)|0,J=J+Math.imul(Le,ft)|0,_e=_e+Math.imul(Le,kt)|0,ue=ue+Math.imul(ut,pr)|0,J=J+Math.imul(ut,Kr)|0,J=J+Math.imul(et,pr)|0,_e=_e+Math.imul(et,Kr)|0,ue=ue+Math.imul(tt,dn)|0,J=J+Math.imul(tt,xr)|0,J=J+Math.imul(Oe,dn)|0,_e=_e+Math.imul(Oe,xr)|0,ue=ue+Math.imul(De,Zr)|0,J=J+Math.imul(De,Cn)|0,J=J+Math.imul(Ge,Zr)|0,_e=_e+Math.imul(Ge,Cn)|0,ue=ue+Math.imul(le,At)|0,J=J+Math.imul(le,Vt)|0,J=J+Math.imul(xe,At)|0,_e=_e+Math.imul(xe,Vt)|0,ue=ue+Math.imul(ae,Ut)|0,J=J+Math.imul(ae,_r)|0,J=J+Math.imul(pe,Ut)|0,_e=_e+Math.imul(pe,_r)|0;var oa=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(oa>>>26)|0,oa&=67108863,ue=Math.imul(Yt,or),J=Math.imul(Yt,fr),J=J+Math.imul(jt,or)|0,_e=Math.imul(jt,fr),ue=ue+Math.imul(We,cr)|0,J=J+Math.imul(We,Ct)|0,J=J+Math.imul(mt,cr)|0,_e=_e+Math.imul(mt,Ct)|0,ue=ue+Math.imul(ot,Tt)|0,J=J+Math.imul(ot,Mt)|0,J=J+Math.imul(rt,Tt)|0,_e=_e+Math.imul(rt,Mt)|0,ue=ue+Math.imul(Te,ft)|0,J=J+Math.imul(Te,kt)|0,J=J+Math.imul(Ve,ft)|0,_e=_e+Math.imul(Ve,kt)|0,ue=ue+Math.imul(we,pr)|0,J=J+Math.imul(we,Kr)|0,J=J+Math.imul(Le,pr)|0,_e=_e+Math.imul(Le,Kr)|0,ue=ue+Math.imul(ut,dn)|0,J=J+Math.imul(ut,xr)|0,J=J+Math.imul(et,dn)|0,_e=_e+Math.imul(et,xr)|0,ue=ue+Math.imul(tt,Zr)|0,J=J+Math.imul(tt,Cn)|0,J=J+Math.imul(Oe,Zr)|0,_e=_e+Math.imul(Oe,Cn)|0,ue=ue+Math.imul(De,At)|0,J=J+Math.imul(De,Vt)|0,J=J+Math.imul(Ge,At)|0,_e=_e+Math.imul(Ge,Vt)|0,ue=ue+Math.imul(le,Ut)|0,J=J+Math.imul(le,_r)|0,J=J+Math.imul(xe,Ut)|0,_e=_e+Math.imul(xe,_r)|0,ue=ue+Math.imul(ae,Jr)|0,J=J+Math.imul(ae,qn)|0,J=J+Math.imul(pe,Jr)|0,_e=_e+Math.imul(pe,qn)|0;var Ma=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(Ma>>>26)|0,Ma&=67108863,ue=Math.imul(Yt,cr),J=Math.imul(Yt,Ct),J=J+Math.imul(jt,cr)|0,_e=Math.imul(jt,Ct),ue=ue+Math.imul(We,Tt)|0,J=J+Math.imul(We,Mt)|0,J=J+Math.imul(mt,Tt)|0,_e=_e+Math.imul(mt,Mt)|0,ue=ue+Math.imul(ot,ft)|0,J=J+Math.imul(ot,kt)|0,J=J+Math.imul(rt,ft)|0,_e=_e+Math.imul(rt,kt)|0,ue=ue+Math.imul(Te,pr)|0,J=J+Math.imul(Te,Kr)|0,J=J+Math.imul(Ve,pr)|0,_e=_e+Math.imul(Ve,Kr)|0,ue=ue+Math.imul(we,dn)|0,J=J+Math.imul(we,xr)|0,J=J+Math.imul(Le,dn)|0,_e=_e+Math.imul(Le,xr)|0,ue=ue+Math.imul(ut,Zr)|0,J=J+Math.imul(ut,Cn)|0,J=J+Math.imul(et,Zr)|0,_e=_e+Math.imul(et,Cn)|0,ue=ue+Math.imul(tt,At)|0,J=J+Math.imul(tt,Vt)|0,J=J+Math.imul(Oe,At)|0,_e=_e+Math.imul(Oe,Vt)|0,ue=ue+Math.imul(De,Ut)|0,J=J+Math.imul(De,_r)|0,J=J+Math.imul(Ge,Ut)|0,_e=_e+Math.imul(Ge,_r)|0,ue=ue+Math.imul(le,Jr)|0,J=J+Math.imul(le,qn)|0,J=J+Math.imul(xe,Jr)|0,_e=_e+Math.imul(xe,qn)|0;var Ga=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(Ga>>>26)|0,Ga&=67108863,ue=Math.imul(Yt,Tt),J=Math.imul(Yt,Mt),J=J+Math.imul(jt,Tt)|0,_e=Math.imul(jt,Mt),ue=ue+Math.imul(We,ft)|0,J=J+Math.imul(We,kt)|0,J=J+Math.imul(mt,ft)|0,_e=_e+Math.imul(mt,kt)|0,ue=ue+Math.imul(ot,pr)|0,J=J+Math.imul(ot,Kr)|0,J=J+Math.imul(rt,pr)|0,_e=_e+Math.imul(rt,Kr)|0,ue=ue+Math.imul(Te,dn)|0,J=J+Math.imul(Te,xr)|0,J=J+Math.imul(Ve,dn)|0,_e=_e+Math.imul(Ve,xr)|0,ue=ue+Math.imul(we,Zr)|0,J=J+Math.imul(we,Cn)|0,J=J+Math.imul(Le,Zr)|0,_e=_e+Math.imul(Le,Cn)|0,ue=ue+Math.imul(ut,At)|0,J=J+Math.imul(ut,Vt)|0,J=J+Math.imul(et,At)|0,_e=_e+Math.imul(et,Vt)|0,ue=ue+Math.imul(tt,Ut)|0,J=J+Math.imul(tt,_r)|0,J=J+Math.imul(Oe,Ut)|0,_e=_e+Math.imul(Oe,_r)|0,ue=ue+Math.imul(De,Jr)|0,J=J+Math.imul(De,qn)|0,J=J+Math.imul(Ge,Jr)|0,_e=_e+Math.imul(Ge,qn)|0;var ss=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(ss>>>26)|0,ss&=67108863,ue=Math.imul(Yt,ft),J=Math.imul(Yt,kt),J=J+Math.imul(jt,ft)|0,_e=Math.imul(jt,kt),ue=ue+Math.imul(We,pr)|0,J=J+Math.imul(We,Kr)|0,J=J+Math.imul(mt,pr)|0,_e=_e+Math.imul(mt,Kr)|0,ue=ue+Math.imul(ot,dn)|0,J=J+Math.imul(ot,xr)|0,J=J+Math.imul(rt,dn)|0,_e=_e+Math.imul(rt,xr)|0,ue=ue+Math.imul(Te,Zr)|0,J=J+Math.imul(Te,Cn)|0,J=J+Math.imul(Ve,Zr)|0,_e=_e+Math.imul(Ve,Cn)|0,ue=ue+Math.imul(we,At)|0,J=J+Math.imul(we,Vt)|0,J=J+Math.imul(Le,At)|0,_e=_e+Math.imul(Le,Vt)|0,ue=ue+Math.imul(ut,Ut)|0,J=J+Math.imul(ut,_r)|0,J=J+Math.imul(et,Ut)|0,_e=_e+Math.imul(et,_r)|0,ue=ue+Math.imul(tt,Jr)|0,J=J+Math.imul(tt,qn)|0,J=J+Math.imul(Oe,Jr)|0,_e=_e+Math.imul(Oe,qn)|0;var yo=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(yo>>>26)|0,yo&=67108863,ue=Math.imul(Yt,pr),J=Math.imul(Yt,Kr),J=J+Math.imul(jt,pr)|0,_e=Math.imul(jt,Kr),ue=ue+Math.imul(We,dn)|0,J=J+Math.imul(We,xr)|0,J=J+Math.imul(mt,dn)|0,_e=_e+Math.imul(mt,xr)|0,ue=ue+Math.imul(ot,Zr)|0,J=J+Math.imul(ot,Cn)|0,J=J+Math.imul(rt,Zr)|0,_e=_e+Math.imul(rt,Cn)|0,ue=ue+Math.imul(Te,At)|0,J=J+Math.imul(Te,Vt)|0,J=J+Math.imul(Ve,At)|0,_e=_e+Math.imul(Ve,Vt)|0,ue=ue+Math.imul(we,Ut)|0,J=J+Math.imul(we,_r)|0,J=J+Math.imul(Le,Ut)|0,_e=_e+Math.imul(Le,_r)|0,ue=ue+Math.imul(ut,Jr)|0,J=J+Math.imul(ut,qn)|0,J=J+Math.imul(et,Jr)|0,_e=_e+Math.imul(et,qn)|0;var sl=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(sl>>>26)|0,sl&=67108863,ue=Math.imul(Yt,dn),J=Math.imul(Yt,xr),J=J+Math.imul(jt,dn)|0,_e=Math.imul(jt,xr),ue=ue+Math.imul(We,Zr)|0,J=J+Math.imul(We,Cn)|0,J=J+Math.imul(mt,Zr)|0,_e=_e+Math.imul(mt,Cn)|0,ue=ue+Math.imul(ot,At)|0,J=J+Math.imul(ot,Vt)|0,J=J+Math.imul(rt,At)|0,_e=_e+Math.imul(rt,Vt)|0,ue=ue+Math.imul(Te,Ut)|0,J=J+Math.imul(Te,_r)|0,J=J+Math.imul(Ve,Ut)|0,_e=_e+Math.imul(Ve,_r)|0,ue=ue+Math.imul(we,Jr)|0,J=J+Math.imul(we,qn)|0,J=J+Math.imul(Le,Jr)|0,_e=_e+Math.imul(Le,qn)|0;var ko=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(ko>>>26)|0,ko&=67108863,ue=Math.imul(Yt,Zr),J=Math.imul(Yt,Cn),J=J+Math.imul(jt,Zr)|0,_e=Math.imul(jt,Cn),ue=ue+Math.imul(We,At)|0,J=J+Math.imul(We,Vt)|0,J=J+Math.imul(mt,At)|0,_e=_e+Math.imul(mt,Vt)|0,ue=ue+Math.imul(ot,Ut)|0,J=J+Math.imul(ot,_r)|0,J=J+Math.imul(rt,Ut)|0,_e=_e+Math.imul(rt,_r)|0,ue=ue+Math.imul(Te,Jr)|0,J=J+Math.imul(Te,qn)|0,J=J+Math.imul(Ve,Jr)|0,_e=_e+Math.imul(Ve,qn)|0;var ao=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(ao>>>26)|0,ao&=67108863,ue=Math.imul(Yt,At),J=Math.imul(Yt,Vt),J=J+Math.imul(jt,At)|0,_e=Math.imul(jt,Vt),ue=ue+Math.imul(We,Ut)|0,J=J+Math.imul(We,_r)|0,J=J+Math.imul(mt,Ut)|0,_e=_e+Math.imul(mt,_r)|0,ue=ue+Math.imul(ot,Jr)|0,J=J+Math.imul(ot,qn)|0,J=J+Math.imul(rt,Jr)|0,_e=_e+Math.imul(rt,qn)|0;var Da=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(Da>>>26)|0,Da&=67108863,ue=Math.imul(Yt,Ut),J=Math.imul(Yt,_r),J=J+Math.imul(jt,Ut)|0,_e=Math.imul(jt,_r),ue=ue+Math.imul(We,Jr)|0,J=J+Math.imul(We,qn)|0,J=J+Math.imul(mt,Jr)|0,_e=_e+Math.imul(mt,qn)|0;var bl=(ye+ue|0)+((J&8191)<<13)|0;ye=(_e+(J>>>13)|0)+(bl>>>26)|0,bl&=67108863,ue=Math.imul(Yt,Jr),J=Math.imul(Yt,qn),J=J+Math.imul(jt,Jr)|0,_e=Math.imul(jt,qn);var wo=(ye+ue|0)+((J&8191)<<13)|0;return ye=(_e+(J>>>13)|0)+(wo>>>26)|0,wo&=67108863,me[0]=ri,me[1]=Jn,me[2]=Ii,me[3]=Vi,me[4]=ra,me[5]=ha,me[6]=va,me[7]=Xi,me[8]=oa,me[9]=Ma,me[10]=Ga,me[11]=ss,me[12]=yo,me[13]=sl,me[14]=ko,me[15]=ao,me[16]=Da,me[17]=bl,me[18]=wo,ye!==0&&(me[19]=ye,K.length++),K};Math.imul||(L=S);function w(j,q,V){V.negative=q.negative^j.negative,V.length=j.length+q.length;for(var K=0,ee=0,ce=0;ce>>26)|0,ee+=me>>>26,me&=67108863}V.words[ce]=ye,K=me,me=ee}return K!==0?V.words[ce]=K:V.length--,V.strip()}function T(j,q,V){var K=new A;return K.mulp(j,q,V)}f.prototype.mulTo=function(q,V){var K,ee=this.length+q.length;return this.length===10&&q.length===10?K=L(this,q,V):ee<63?K=S(this,q,V):ee<1024?K=w(this,q,V):K=T(this,q,V),K};function A(j,q){this.x=j,this.y=q}A.prototype.makeRBT=function(q){for(var V=new Array(q),K=f.prototype._countBits(q)-1,ee=0;ee>=1;return ee},A.prototype.permute=function(q,V,K,ee,ce,me){for(var ye=0;ye>>1)ce++;return 1<>>13,K[2*me+1]=ce&8191,ce=ce>>>13;for(me=2*V;me>=26,V+=ee/67108864|0,V+=ce>>>26,this.words[K]=ce&67108863}return V!==0&&(this.words[K]=V,this.length++),q===0&&(this.length=1,this._normSign()),this},f.prototype.muln=function(q){return this.clone().imuln(q)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(q){var V=k(q);if(V.length===0)return new f(1);for(var K=this,ee=0;ee=0);var V=q%26,K=(q-V)/26,ee=67108863>>>26-V<<26-V,ce;if(V!==0){var me=0;for(ce=0;ce>>26-V}me&&(this.words[ce]=me,this.length++)}if(K!==0){for(ce=this.length-1;ce>=0;ce--)this.words[ce+K]=this.words[ce];for(ce=0;ce=0);var ee;V?ee=(V-V%26)/26:ee=0;var ce=q%26,me=Math.min((q-ce)/26,this.length),ye=67108863^67108863>>>ce<me)for(this.length-=me,J=0;J=0&&(_e!==0||J>=ee);J--){var ne=this.words[J]|0;this.words[J]=_e<<26-ce|ne>>>ce,_e=ne&ye}return ue&&_e!==0&&(ue.words[ue.length++]=_e),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(q,V,K){return u(this.negative===0),this.iushrn(q,V,K)},f.prototype.shln=function(q){return this.clone().ishln(q)},f.prototype.ushln=function(q){return this.clone().iushln(q)},f.prototype.shrn=function(q){return this.clone().ishrn(q)},f.prototype.ushrn=function(q){return this.clone().iushrn(q)},f.prototype.testn=function(q){u(typeof q=="number"&&q>=0);var V=q%26,K=(q-V)/26,ee=1<=0);var V=q%26,K=(q-V)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=K)return this;if(V!==0&&K++,this.length=Math.min(K,this.length),V!==0){var ee=67108863^67108863>>>V<=67108864;V++)this.words[V]-=67108864,V===this.length-1?this.words[V+1]=1:this.words[V+1]++;return this.length=Math.max(this.length,V+1),this},f.prototype.isubn=function(q){if(u(typeof q=="number"),u(q<67108864),q<0)return this.iaddn(-q);if(this.negative!==0)return this.negative=0,this.iaddn(q),this.negative=1,this;if(this.words[0]-=q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var V=0;V>26)-(ue/67108864|0),this.words[ce+K]=me&67108863}for(;ce>26,this.words[ce+K]=me&67108863;if(ye===0)return this.strip();for(u(ye===-1),ye=0,ce=0;ce>26,this.words[ce]=me&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(q,V){var K=this.length-q.length,ee=this.clone(),ce=q,me=ce.words[ce.length-1]|0,ye=this._countBits(me);K=26-ye,K!==0&&(ce=ce.ushln(K),ee.iushln(K),me=ce.words[ce.length-1]|0);var ue=ee.length-ce.length,J;if(V!=="mod"){J=new f(null),J.length=ue+1,J.words=new Array(J.length);for(var _e=0;_e=0;ae--){var pe=(ee.words[ce.length+ae]|0)*67108864+(ee.words[ce.length+ae-1]|0);for(pe=Math.min(pe/me|0,67108863),ee._ishlnsubmul(ce,pe,ae);ee.negative!==0;)pe--,ee.negative=0,ee._ishlnsubmul(ce,1,ae),ee.isZero()||(ee.negative^=1);J&&(J.words[ae]=pe)}return J&&J.strip(),ee.strip(),V!=="div"&&K!==0&&ee.iushrn(K),{div:J||null,mod:ee}},f.prototype.divmod=function(q,V,K){if(u(!q.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var ee,ce,me;return this.negative!==0&&q.negative===0?(me=this.neg().divmod(q,V),V!=="mod"&&(ee=me.div.neg()),V!=="div"&&(ce=me.mod.neg(),K&&ce.negative!==0&&ce.iadd(q)),{div:ee,mod:ce}):this.negative===0&&q.negative!==0?(me=this.divmod(q.neg(),V),V!=="mod"&&(ee=me.div.neg()),{div:ee,mod:me.mod}):(this.negative&q.negative)!==0?(me=this.neg().divmod(q.neg(),V),V!=="div"&&(ce=me.mod.neg(),K&&ce.negative!==0&&ce.isub(q)),{div:me.div,mod:ce}):q.length>this.length||this.cmp(q)<0?{div:new f(0),mod:this}:q.length===1?V==="div"?{div:this.divn(q.words[0]),mod:null}:V==="mod"?{div:null,mod:new f(this.modn(q.words[0]))}:{div:this.divn(q.words[0]),mod:new f(this.modn(q.words[0]))}:this._wordDiv(q,V)},f.prototype.div=function(q){return this.divmod(q,"div",!1).div},f.prototype.mod=function(q){return this.divmod(q,"mod",!1).mod},f.prototype.umod=function(q){return this.divmod(q,"mod",!0).mod},f.prototype.divRound=function(q){var V=this.divmod(q);if(V.mod.isZero())return V.div;var K=V.mod.abs(),ee=q.abs().iushrn(1),ce=q.words[0]&1,me=K.cmp(ee);if(me<0||ce===1&&me===0)return V.div;var ye=new f(1);return ye.negative=this.negative^q.negative,V.div.iadd(ye)},f.prototype.modn=function(q){u(q<=67108863);for(var V=(1<<26)%q,K=0,ee=this.length-1;ee>=0;ee--)K=(V*K+(this.words[ee]|0))%q;return K},f.prototype.idivn=function(q){u(q<=67108863);for(var V=0,K=this.length-1;K>=0;K--){var ee=(this.words[K]|0)+V*67108864;this.words[K]=ee/q|0,V=ee%q}return this.strip()},f.prototype.divn=function(q){return this.clone().idivn(q)},f.prototype.egcd=function(q){u(q.negative===0),u(!q.isZero());var V=this,K=q.clone();V.negative!==0?V=V.umod(q):V=V.clone();for(var ee=new f(1),ce=new f(0),me=new f(0),ye=new f(1),ue=0;V.isEven()&&K.isEven();)V.iushrn(1),K.iushrn(1),++ue;for(var J=K.clone(),_e=V.clone();!V.isZero();){for(var ne=0,ae=1;(V.words[0]&ae)===0&&ne<26;++ne,ae<<=1);if(ne>0)for(V.iushrn(ne);ne-- >0;)(ee.isOdd()||ce.isOdd())&&(ee.iadd(J),ce.isub(_e)),ee.iushrn(1),ce.iushrn(1);for(var pe=0,ie=1;(K.words[0]&ie)===0&&pe<26;++pe,ie<<=1);if(pe>0)for(K.iushrn(pe);pe-- >0;)(me.isOdd()||ye.isOdd())&&(me.iadd(J),ye.isub(_e)),me.iushrn(1),ye.iushrn(1);V.cmp(K)>=0?(V.isub(K),ee.isub(me),ce.isub(ye)):(K.isub(V),me.isub(ee),ye.isub(ce))}return{a:me,b:ye,gcd:K.iushln(ue)}},f.prototype._invmp=function(q){u(q.negative===0),u(!q.isZero());var V=this,K=q.clone();V.negative!==0?V=V.umod(q):V=V.clone();for(var ee=new f(1),ce=new f(0),me=K.clone();V.cmpn(1)>0&&K.cmpn(1)>0;){for(var ye=0,ue=1;(V.words[0]&ue)===0&&ye<26;++ye,ue<<=1);if(ye>0)for(V.iushrn(ye);ye-- >0;)ee.isOdd()&&ee.iadd(me),ee.iushrn(1);for(var J=0,_e=1;(K.words[0]&_e)===0&&J<26;++J,_e<<=1);if(J>0)for(K.iushrn(J);J-- >0;)ce.isOdd()&&ce.iadd(me),ce.iushrn(1);V.cmp(K)>=0?(V.isub(K),ee.isub(ce)):(K.isub(V),ce.isub(ee))}var ne;return V.cmpn(1)===0?ne=ee:ne=ce,ne.cmpn(0)<0&&ne.iadd(q),ne},f.prototype.gcd=function(q){if(this.isZero())return q.abs();if(q.isZero())return this.abs();var V=this.clone(),K=q.clone();V.negative=0,K.negative=0;for(var ee=0;V.isEven()&&K.isEven();ee++)V.iushrn(1),K.iushrn(1);do{for(;V.isEven();)V.iushrn(1);for(;K.isEven();)K.iushrn(1);var ce=V.cmp(K);if(ce<0){var me=V;V=K,K=me}else if(ce===0||K.cmpn(1)===0)break;V.isub(K)}while(!0);return K.iushln(ee)},f.prototype.invm=function(q){return this.egcd(q).a.umod(q)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(q){return this.words[0]&q},f.prototype.bincn=function(q){u(typeof q=="number");var V=q%26,K=(q-V)/26,ee=1<>>26,ye&=67108863,this.words[me]=ye}return ce!==0&&(this.words[me]=ce,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(q){var V=q<0;if(this.negative!==0&&!V)return-1;if(this.negative===0&&V)return 1;this.strip();var K;if(this.length>1)K=1;else{V&&(q=-q),u(q<=67108863,"Number is too big");var ee=this.words[0]|0;K=ee===q?0:eeq.length)return 1;if(this.length=0;K--){var ee=this.words[K]|0,ce=q.words[K]|0;if(ee!==ce){eece&&(V=1);break}}return V},f.prototype.gtn=function(q){return this.cmpn(q)===1},f.prototype.gt=function(q){return this.cmp(q)===1},f.prototype.gten=function(q){return this.cmpn(q)>=0},f.prototype.gte=function(q){return this.cmp(q)>=0},f.prototype.ltn=function(q){return this.cmpn(q)===-1},f.prototype.lt=function(q){return this.cmp(q)===-1},f.prototype.lten=function(q){return this.cmpn(q)<=0},f.prototype.lte=function(q){return this.cmp(q)<=0},f.prototype.eqn=function(q){return this.cmpn(q)===0},f.prototype.eq=function(q){return this.cmp(q)===0},f.red=function(q){return new O(q)},f.prototype.toRed=function(q){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),q.convertTo(this)._forceRed(q)},f.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(q){return this.red=q,this},f.prototype.forceRed=function(q){return u(!this.red,"Already a number in reduction context"),this._forceRed(q)},f.prototype.redAdd=function(q){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,q)},f.prototype.redIAdd=function(q){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,q)},f.prototype.redSub=function(q){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,q)},f.prototype.redISub=function(q){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,q)},f.prototype.redShl=function(q){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,q)},f.prototype.redMul=function(q){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,q),this.red.mul(this,q)},f.prototype.redIMul=function(q){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,q),this.red.imul(this,q)},f.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(q){return u(this.red&&!q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,q)};var m={k256:null,p224:null,p192:null,p25519:null};function F(j,q){this.name=j,this.p=new f(q,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}F.prototype._tmp=function(){var q=new f(null);return q.words=new Array(Math.ceil(this.n/13)),q},F.prototype.ireduce=function(q){var V=q,K;do this.split(V,this.tmp),V=this.imulK(V),V=V.iadd(this.tmp),K=V.bitLength();while(K>this.n);var ee=K0?V.isub(this.p):V.strip!==void 0?V.strip():V._strip(),V},F.prototype.split=function(q,V){q.iushrn(this.n,0,V)},F.prototype.imulK=function(q){return q.imul(this.k)};function E(){F.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}c(E,F),E.prototype.split=function(q,V){for(var K=4194303,ee=Math.min(q.length,9),ce=0;ce>>22,me=ye}me>>>=22,q.words[ce-10]=me,me===0&&q.length>10?q.length-=10:q.length-=9},E.prototype.imulK=function(q){q.words[q.length]=0,q.words[q.length+1]=0,q.length+=2;for(var V=0,K=0;K>>=26,q.words[K]=ce,V=ee}return V!==0&&(q.words[q.length++]=V),q},f._prime=function(q){if(m[q])return m[q];var V;if(q==="k256")V=new E;else if(q==="p224")V=new I;else if(q==="p192")V=new R;else if(q==="p25519")V=new B;else throw new Error("Unknown prime "+q);return m[q]=V,V};function O(j){if(typeof j=="string"){var q=f._prime(j);this.m=q.p,this.prime=q}else u(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}O.prototype._verify1=function(q){u(q.negative===0,"red works only with positives"),u(q.red,"red works only with red numbers")},O.prototype._verify2=function(q,V){u((q.negative|V.negative)===0,"red works only with positives"),u(q.red&&q.red===V.red,"red works only with red numbers")},O.prototype.imod=function(q){return this.prime?this.prime.ireduce(q)._forceRed(this):q.umod(this.m)._forceRed(this)},O.prototype.neg=function(q){return q.isZero()?q.clone():this.m.sub(q)._forceRed(this)},O.prototype.add=function(q,V){this._verify2(q,V);var K=q.add(V);return K.cmp(this.m)>=0&&K.isub(this.m),K._forceRed(this)},O.prototype.iadd=function(q,V){this._verify2(q,V);var K=q.iadd(V);return K.cmp(this.m)>=0&&K.isub(this.m),K},O.prototype.sub=function(q,V){this._verify2(q,V);var K=q.sub(V);return K.cmpn(0)<0&&K.iadd(this.m),K._forceRed(this)},O.prototype.isub=function(q,V){this._verify2(q,V);var K=q.isub(V);return K.cmpn(0)<0&&K.iadd(this.m),K},O.prototype.shl=function(q,V){return this._verify1(q),this.imod(q.ushln(V))},O.prototype.imul=function(q,V){return this._verify2(q,V),this.imod(q.imul(V))},O.prototype.mul=function(q,V){return this._verify2(q,V),this.imod(q.mul(V))},O.prototype.isqr=function(q){return this.imul(q,q.clone())},O.prototype.sqr=function(q){return this.mul(q,q)},O.prototype.sqrt=function(q){if(q.isZero())return q.clone();var V=this.m.andln(3);if(u(V%2===1),V===3){var K=this.m.add(new f(1)).iushrn(2);return this.pow(q,K)}for(var ee=this.m.subn(1),ce=0;!ee.isZero()&&ee.andln(1)===0;)ce++,ee.iushrn(1);u(!ee.isZero());var me=new f(1).toRed(this),ye=me.redNeg(),ue=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new f(2*J*J).toRed(this);this.pow(J,ue).cmp(ye)!==0;)J.redIAdd(ye);for(var _e=this.pow(J,ee),ne=this.pow(q,ee.addn(1).iushrn(1)),ae=this.pow(q,ee),pe=ce;ae.cmp(me)!==0;){for(var ie=ae,le=0;ie.cmp(me)!==0;le++)ie=ie.redSqr();u(le=0;ce--){for(var _e=V.words[ce],ne=J-1;ne>=0;ne--){var ae=_e>>ne&1;if(me!==ee[0]&&(me=this.sqr(me)),ae===0&&ye===0){ue=0;continue}ye<<=1,ye|=ae,ue++,!(ue!==K&&(ce!==0||ne!==0))&&(me=this.mul(me,ee[ye]),ue=0,ye=0)}J=26}return me},O.prototype.convertTo=function(q){var V=q.umod(this.m);return V===q?V.clone():V},O.prototype.convertFrom=function(q){var V=q.clone();return V.red=null,V},f.mont=function(q){return new U(q)};function U(j){O.call(this,j),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(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)}c(U,O),U.prototype.convertTo=function(q){return this.imod(q.ushln(this.shift))},U.prototype.convertFrom=function(q){var V=this.imod(q.mul(this.rinv));return V.red=null,V},U.prototype.imul=function(q,V){if(q.isZero()||V.isZero())return q.words[0]=0,q.length=1,q;var K=q.imul(V),ee=K.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ce=K.isub(ee).iushrn(this.shift),me=ce;return ce.cmp(this.m)>=0?me=ce.isub(this.m):ce.cmpn(0)<0&&(me=ce.iadd(this.m)),me._forceRed(this)},U.prototype.mul=function(q,V){if(q.isZero()||V.isZero())return new f(0)._forceRed(this);var K=q.mul(V),ee=K.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ce=K.isub(ee).iushrn(this.shift),me=ce;return ce.cmp(this.m)>=0?me=ce.isub(this.m):ce.cmpn(0)<0&&(me=ce.iadd(this.m)),me._forceRed(this)},U.prototype.invm=function(q){var V=this.imod(q._invmp(this.m).mul(this.r2));return V._forceRed(this)}})(a,this)},6204(a){"use strict";a.exports=i;function i(o){var s,l,u,c=o.length,f=0;for(s=0;s>>1;if(!(A<=0)){var m,F=s.mallocDouble(2*A*w),E=s.mallocInt32(w);if(w=f(C,A,F,E),w>0){if(A===1&&L)l.init(w),m=l.sweepComplete(A,S,0,w,F,E,0,w,F,E);else{var I=s.mallocDouble(2*A*T),R=s.mallocInt32(T);T=f(k,A,I,R),T>0&&(l.init(w+T),A===1?m=l.sweepBipartite(A,S,0,w,F,E,0,T,I,R):m=u(A,S,L,w,F,E,T,I,R),s.free(I),s.free(R))}s.free(F),s.free(E)}return m}}}var g;function p(C,k){g.push([C,k])}function _(C){return g=[],v(C,C,p,!0),g}function x(C,k){return g=[],v(C,k,p,!1),g}function y(C,k,S){switch(arguments.length){case 1:return _(C);case 2:return typeof k=="function"?v(C,C,k,!0):x(C,k);case 3:return v(C,k,S,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455(a,i){"use strict";function o(){function u(v,g,p,_,x,y,C,k,S,L,w){for(var T=2*v,A=_,m=T*_;AS-k?u(v,g,p,_,x,y,C,k,S,L,w):c(v,g,p,_,x,y,C,k,S,L,w)}return f}function s(){function u(p,_,x,y,C,k,S,L,w,T,A){for(var m=2*p,F=y,E=m*y;FT-w?y?u(p,_,x,C,k,S,L,w,T,A,m):c(p,_,x,C,k,S,L,w,T,A,m):y?f(p,_,x,C,k,S,L,w,T,A,m):v(p,_,x,C,k,S,L,w,T,A,m)}return g}function l(u){return u?o():s()}i.partial=l(!1),i.full=l(!0)},7150(a,i,o){"use strict";a.exports=j;var s=o(1888),l=o(8828),u=o(2455),c=u.partial,f=u.full,v=o(855),g=o(3545),p=o(8105),_=128,x=1<<22,y=1<<22,C=p("!(lo>=p0)&&!(p1>=hi)"),k=p("lo===p0"),S=p("lo0;){_e-=1;var pe=_e*A,ie=E[pe],le=E[pe+1],xe=E[pe+2],be=E[pe+3],De=E[pe+4],Ge=E[pe+5],pt=_e*m,tt=I[pt],Oe=I[pt+1],ze=Ge&1,ut=!!(Ge&16),et=ce,qe=me,we=ue,Le=J;if(ze&&(et=ue,qe=J,we=ce,Le=me),!(Ge&2&&(xe=S(q,ie,le,xe,et,qe,Oe),le>=xe))&&!(Ge&4&&(le=L(q,ie,le,xe,et,qe,tt),le>=xe))){var Ke=xe-le,Te=De-be;if(ut){if(q*Ke*(Ke+Te)p&&x[T+g]>L;--w,T-=C){for(var A=T,m=T+C,F=0;F>>1,L=2*v,w=S,T=x[L*S+g];C=I?(w=E,T=I):F>=B?(w=m,T=F):(w=R,T=B):I>=B?(w=E,T=I):B>=F?(w=m,T=F):(w=R,T=B);for(var j=L*(k-1),q=L*w,O=0;O=p0)&&!(p1>=hi)":g};function o(p){return i[p]}function s(p,_,x,y,C,k,S){for(var L=2*p,w=L*x,T=w,A=x,m=_,F=p+_,E=x;y>E;++E,w+=L){var I=C[w+m];if(I===S)if(A===E)A+=1,T+=L;else{for(var R=0;L>R;++R){var B=C[w+R];C[w+R]=C[T],C[T++]=B}var O=k[E];k[E]=k[A],k[A++]=O}}return A}function l(p,_,x,y,C,k,S){for(var L=2*p,w=L*x,T=w,A=x,m=_,F=p+_,E=x;y>E;++E,w+=L){var I=C[w+m];if(IR;++R){var B=C[w+R];C[w+R]=C[T],C[T++]=B}var O=k[E];k[E]=k[A],k[A++]=O}}return A}function u(p,_,x,y,C,k,S){for(var L=2*p,w=L*x,T=w,A=x,m=_,F=p+_,E=x;y>E;++E,w+=L){var I=C[w+F];if(I<=S)if(A===E)A+=1,T+=L;else{for(var R=0;L>R;++R){var B=C[w+R];C[w+R]=C[T],C[T++]=B}var O=k[E];k[E]=k[A],k[A++]=O}}return A}function c(p,_,x,y,C,k,S){for(var L=2*p,w=L*x,T=w,A=x,m=_,F=p+_,E=x;y>E;++E,w+=L){var I=C[w+F];if(I<=S)if(A===E)A+=1,T+=L;else{for(var R=0;L>R;++R){var B=C[w+R];C[w+R]=C[T],C[T++]=B}var O=k[E];k[E]=k[A],k[A++]=O}}return A}function f(p,_,x,y,C,k,S){for(var L=2*p,w=L*x,T=w,A=x,m=_,F=p+_,E=x;y>E;++E,w+=L){var I=C[w+m],R=C[w+F];if(I<=S&&S<=R)if(A===E)A+=1,T+=L;else{for(var B=0;L>B;++B){var O=C[w+B];C[w+B]=C[T],C[T++]=O}var U=k[E];k[E]=k[A],k[A++]=U}}return A}function v(p,_,x,y,C,k,S){for(var L=2*p,w=L*x,T=w,A=x,m=_,F=p+_,E=x;y>E;++E,w+=L){var I=C[w+m],R=C[w+F];if(IB;++B){var O=C[w+B];C[w+B]=C[T],C[T++]=O}var U=k[E];k[E]=k[A],k[A++]=U}}return A}function g(p,_,x,y,C,k,S,L){for(var w=2*p,T=w*x,A=T,m=x,F=_,E=p+_,I=x;y>I;++I,T+=w){var R=C[T+F],B=C[T+E];if(!(R>=S)&&!(L>=B))if(m===I)m+=1,A+=w;else{for(var O=0;w>O;++O){var U=C[T+O];C[T+O]=C[A],C[A++]=U}var j=k[I];k[I]=k[m],k[m++]=j}}return m}},4192(a){"use strict";a.exports=o;var i=32;function o(_,x){x<=4*i?s(0,x-1,_):p(0,x-1,_)}function s(_,x,y){for(var C=2*(_+1),k=_+1;k<=x;++k){for(var S=y[C++],L=y[C++],w=k,T=C-2;w-- >_;){var A=y[T-2],m=y[T-1];if(Ay[x+1]:!0}function g(_,x,y,C){_*=2;var k=C[_];return k>1,w=L-C,T=L+C,A=k,m=w,F=L,E=T,I=S,R=_+1,B=x-1,O=0;v(A,m,y)&&(O=A,A=m,m=O),v(E,I,y)&&(O=E,E=I,I=O),v(A,F,y)&&(O=A,A=F,F=O),v(m,F,y)&&(O=m,m=F,F=O),v(A,E,y)&&(O=A,A=E,E=O),v(F,E,y)&&(O=F,F=E,E=O),v(m,I,y)&&(O=m,m=I,I=O),v(m,F,y)&&(O=m,m=F,F=O),v(E,I,y)&&(O=E,E=I,I=O);for(var U=y[2*m],j=y[2*m+1],q=y[2*E],V=y[2*E+1],K=2*A,ee=2*F,ce=2*I,me=2*k,ye=2*L,ue=2*S,J=0;J<2;++J){var _e=y[K+J],ne=y[ee+J],ae=y[ce+J];y[me+J]=_e,y[ye+J]=ne,y[ue+J]=ae}u(w,_,y),u(T,x,y);for(var pe=R;pe<=B;++pe)if(g(pe,U,j,y))pe!==R&&l(pe,R,y),++R;else if(!g(pe,q,V,y))for(;;)if(g(B,q,V,y)){g(B,U,j,y)?(c(pe,R,B,y),++R,--B):(l(pe,B,y),--B);break}else{if(--B>>1;u(C,ne);for(var ae=0,pe=0,ye=0;ye=c)ie=ie-c|0,S(p,_,pe--,ie);else if(ie>=0)S(v,g,ae--,ie);else if(ie<=-c){ie=-ie-c|0;for(var le=0;le>>1;u(C,ne);for(var ae=0,pe=0,ie=0,ye=0;ye>1===C[2*ye+3]>>1&&(xe=2,ye+=1),le<0){for(var be=-(le>>1)-1,De=0;De>1)-1;xe===0?S(v,g,ae--,be):xe===1?S(p,_,pe--,be):xe===2&&S(x,y,ie--,be)}}}function A(F,E,I,R,B,O,U,j,q,V,K,ee){var ce=0,me=2*F,ye=E,ue=E+F,J=1,_e=1;R?_e=c:J=c;for(var ne=B;ne>>1;u(C,le);for(var xe=0,ne=0;ne=c?(De=!R,ae-=c):(De=!!R,ae-=1),De)L(v,g,xe++,ae);else{var Ge=ee[ae],pt=me*ae,tt=K[pt+E+1],Oe=K[pt+E+1+F];e:for(var ze=0;ze>>1;u(C,ae);for(var pe=0,ue=0;ue=c)v[pe++]=J-c;else{J-=1;var le=K[J],xe=ce*J,be=V[xe+E+1],De=V[xe+E+1+F];e:for(var Ge=0;Ge=0;--Ge)if(v[Ge]===J){for(var ze=Ge+1;zef)throw new RangeError('The value "'+qe+'" is invalid for option "size"');var we=new Uint8Array(qe);return Object.setPrototypeOf(we,p.prototype),we}function p(qe,we,Le){if(typeof qe=="number"){if(typeof we=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return C(qe)}return _(qe,we,Le)}p.poolSize=8192;function _(qe,we,Le){if(typeof qe=="string")return k(qe,we);if(ArrayBuffer.isView(qe))return L(qe);if(qe==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof qe);if(ze(qe,ArrayBuffer)||qe&&ze(qe.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ze(qe,SharedArrayBuffer)||qe&&ze(qe.buffer,SharedArrayBuffer)))return w(qe,we,Le);if(typeof qe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Ke=qe.valueOf&&qe.valueOf();if(Ke!=null&&Ke!==qe)return p.from(Ke,we,Le);var Te=T(qe);if(Te)return Te;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof qe[Symbol.toPrimitive]=="function")return p.from(qe[Symbol.toPrimitive]("string"),we,Le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof qe)}p.from=function(qe,we,Le){return _(qe,we,Le)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function x(qe){if(typeof qe!="number")throw new TypeError('"size" argument must be of type number');if(qe<0)throw new RangeError('The value "'+qe+'" is invalid for option "size"')}function y(qe,we,Le){return x(qe),qe<=0?g(qe):we!==void 0?typeof Le=="string"?g(qe).fill(we,Le):g(qe).fill(we):g(qe)}p.alloc=function(qe,we,Le){return y(qe,we,Le)};function C(qe){return x(qe),g(qe<0?0:A(qe)|0)}p.allocUnsafe=function(qe){return C(qe)},p.allocUnsafeSlow=function(qe){return C(qe)};function k(qe,we){if((typeof we!="string"||we==="")&&(we="utf8"),!p.isEncoding(we))throw new TypeError("Unknown encoding: "+we);var Le=F(qe,we)|0,Ke=g(Le),Te=Ke.write(qe,we);return Te!==Le&&(Ke=Ke.slice(0,Te)),Ke}function S(qe){for(var we=qe.length<0?0:A(qe.length)|0,Le=g(we),Ke=0;Ke=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return qe|0}function m(qe){return+qe!=qe&&(qe=0),p.alloc(+qe)}p.isBuffer=function(we){return we!=null&&we._isBuffer===!0&&we!==p.prototype},p.compare=function(we,Le){if(ze(we,Uint8Array)&&(we=p.from(we,we.offset,we.byteLength)),ze(Le,Uint8Array)&&(Le=p.from(Le,Le.offset,Le.byteLength)),!p.isBuffer(we)||!p.isBuffer(Le))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(we===Le)return 0;for(var Ke=we.length,Te=Le.length,Ve=0,$e=Math.min(Ke,Te);Ve<$e;++Ve)if(we[Ve]!==Le[Ve]){Ke=we[Ve],Te=Le[Ve];break}return KeTe.length?p.from($e).copy(Te,Ve):Uint8Array.prototype.set.call(Te,$e,Ve);else if(p.isBuffer($e))$e.copy(Te,Ve);else throw new TypeError('"list" argument must be an Array of Buffers');Ve+=$e.length}return Te};function F(qe,we){if(p.isBuffer(qe))return qe.length;if(ArrayBuffer.isView(qe)||ze(qe,ArrayBuffer))return qe.byteLength;if(typeof qe!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof qe);var Le=qe.length,Ke=arguments.length>2&&arguments[2]===!0;if(!Ke&&Le===0)return 0;for(var Te=!1;;)switch(we){case"ascii":case"latin1":case"binary":return Le;case"utf8":case"utf-8":return De(qe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Le*2;case"hex":return Le>>>1;case"base64":return tt(qe).length;default:if(Te)return Ke?-1:De(qe).length;we=(""+we).toLowerCase(),Te=!0}}p.byteLength=F;function E(qe,we,Le){var Ke=!1;if((we===void 0||we<0)&&(we=0),we>this.length||((Le===void 0||Le>this.length)&&(Le=this.length),Le<=0)||(Le>>>=0,we>>>=0,Le<=we))return"";for(qe||(qe="utf8");;)switch(qe){case"hex":return J(this,we,Le);case"utf8":case"utf-8":return ee(this,we,Le);case"ascii":return ye(this,we,Le);case"latin1":case"binary":return ue(this,we,Le);case"base64":return K(this,we,Le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _e(this,we,Le);default:if(Ke)throw new TypeError("Unknown encoding: "+qe);qe=(qe+"").toLowerCase(),Ke=!0}}p.prototype._isBuffer=!0;function I(qe,we,Le){var Ke=qe[we];qe[we]=qe[Le],qe[Le]=Ke}p.prototype.swap16=function(){var we=this.length;if(we%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Le=0;LeLe&&(we+=" ... "),""},c&&(p.prototype[c]=p.prototype.inspect),p.prototype.compare=function(we,Le,Ke,Te,Ve){if(ze(we,Uint8Array)&&(we=p.from(we,we.offset,we.byteLength)),!p.isBuffer(we))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof we);if(Le===void 0&&(Le=0),Ke===void 0&&(Ke=we?we.length:0),Te===void 0&&(Te=0),Ve===void 0&&(Ve=this.length),Le<0||Ke>we.length||Te<0||Ve>this.length)throw new RangeError("out of range index");if(Te>=Ve&&Le>=Ke)return 0;if(Te>=Ve)return-1;if(Le>=Ke)return 1;if(Le>>>=0,Ke>>>=0,Te>>>=0,Ve>>>=0,this===we)return 0;for(var $e=Ve-Te,ot=Ke-Le,rt=Math.min($e,ot),it=this.slice(Te,Ve),We=we.slice(Le,Ke),mt=0;mt2147483647?Le=2147483647:Le<-2147483648&&(Le=-2147483648),Le=+Le,ut(Le)&&(Le=Te?0:qe.length-1),Le<0&&(Le=qe.length+Le),Le>=qe.length){if(Te)return-1;Le=qe.length-1}else if(Le<0)if(Te)Le=0;else return-1;if(typeof we=="string"&&(we=p.from(we,Ke)),p.isBuffer(we))return we.length===0?-1:B(qe,we,Le,Ke,Te);if(typeof we=="number")return we=we&255,typeof Uint8Array.prototype.indexOf=="function"?Te?Uint8Array.prototype.indexOf.call(qe,we,Le):Uint8Array.prototype.lastIndexOf.call(qe,we,Le):B(qe,[we],Le,Ke,Te);throw new TypeError("val must be string, number or Buffer")}function B(qe,we,Le,Ke,Te){var Ve=1,$e=qe.length,ot=we.length;if(Ke!==void 0&&(Ke=String(Ke).toLowerCase(),Ke==="ucs2"||Ke==="ucs-2"||Ke==="utf16le"||Ke==="utf-16le")){if(qe.length<2||we.length<2)return-1;Ve=2,$e/=2,ot/=2,Le/=2}function rt(Yt,jt){return Ve===1?Yt[jt]:Yt.readUInt16BE(jt*Ve)}var it;if(Te){var We=-1;for(it=Le;it<$e;it++)if(rt(qe,it)===rt(we,We===-1?0:it-We)){if(We===-1&&(We=it),it-We+1===ot)return We*Ve}else We!==-1&&(it-=it-We),We=-1}else for(Le+ot>$e&&(Le=$e-ot),it=Le;it>=0;it--){for(var mt=!0,bt=0;btTe&&(Ke=Te)):Ke=Te;var Ve=we.length;Ke>Ve/2&&(Ke=Ve/2);for(var $e=0;$e>>0,isFinite(Ke)?(Ke=Ke>>>0,Te===void 0&&(Te="utf8")):(Te=Ke,Ke=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ve=this.length-Le;if((Ke===void 0||Ke>Ve)&&(Ke=Ve),we.length>0&&(Ke<0||Le<0)||Le>this.length)throw new RangeError("Attempt to write outside buffer bounds");Te||(Te="utf8");for(var $e=!1;;)switch(Te){case"hex":return O(this,we,Le,Ke);case"utf8":case"utf-8":return U(this,we,Le,Ke);case"ascii":case"latin1":case"binary":return j(this,we,Le,Ke);case"base64":return q(this,we,Le,Ke);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,we,Le,Ke);default:if($e)throw new TypeError("Unknown encoding: "+Te);Te=(""+Te).toLowerCase(),$e=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function K(qe,we,Le){return we===0&&Le===qe.length?l.fromByteArray(qe):l.fromByteArray(qe.slice(we,Le))}function ee(qe,we,Le){Le=Math.min(qe.length,Le);for(var Ke=[],Te=we;Te239?4:Ve>223?3:Ve>191?2:1;if(Te+ot<=Le){var rt,it,We,mt;switch(ot){case 1:Ve<128&&($e=Ve);break;case 2:rt=qe[Te+1],(rt&192)===128&&(mt=(Ve&31)<<6|rt&63,mt>127&&($e=mt));break;case 3:rt=qe[Te+1],it=qe[Te+2],(rt&192)===128&&(it&192)===128&&(mt=(Ve&15)<<12|(rt&63)<<6|it&63,mt>2047&&(mt<55296||mt>57343)&&($e=mt));break;case 4:rt=qe[Te+1],it=qe[Te+2],We=qe[Te+3],(rt&192)===128&&(it&192)===128&&(We&192)===128&&(mt=(Ve&15)<<18|(rt&63)<<12|(it&63)<<6|We&63,mt>65535&&mt<1114112&&($e=mt))}}$e===null?($e=65533,ot=1):$e>65535&&($e-=65536,Ke.push($e>>>10&1023|55296),$e=56320|$e&1023),Ke.push($e),Te+=ot}return me(Ke)}var ce=4096;function me(qe){var we=qe.length;if(we<=ce)return String.fromCharCode.apply(String,qe);for(var Le="",Ke=0;KeKe)&&(Le=Ke);for(var Te="",Ve=we;VeKe&&(we=Ke),Le<0?(Le+=Ke,Le<0&&(Le=0)):Le>Ke&&(Le=Ke),LeLe)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(we,Le,Ke){we=we>>>0,Le=Le>>>0,Ke||ne(we,Le,this.length);for(var Te=this[we],Ve=1,$e=0;++$e>>0,Le=Le>>>0,Ke||ne(we,Le,this.length);for(var Te=this[we+--Le],Ve=1;Le>0&&(Ve*=256);)Te+=this[we+--Le]*Ve;return Te},p.prototype.readUint8=p.prototype.readUInt8=function(we,Le){return we=we>>>0,Le||ne(we,1,this.length),this[we]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(we,Le){return we=we>>>0,Le||ne(we,2,this.length),this[we]|this[we+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(we,Le){return we=we>>>0,Le||ne(we,2,this.length),this[we]<<8|this[we+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),(this[we]|this[we+1]<<8|this[we+2]<<16)+this[we+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),this[we]*16777216+(this[we+1]<<16|this[we+2]<<8|this[we+3])},p.prototype.readIntLE=function(we,Le,Ke){we=we>>>0,Le=Le>>>0,Ke||ne(we,Le,this.length);for(var Te=this[we],Ve=1,$e=0;++$e=Ve&&(Te-=Math.pow(2,8*Le)),Te},p.prototype.readIntBE=function(we,Le,Ke){we=we>>>0,Le=Le>>>0,Ke||ne(we,Le,this.length);for(var Te=Le,Ve=1,$e=this[we+--Te];Te>0&&(Ve*=256);)$e+=this[we+--Te]*Ve;return Ve*=128,$e>=Ve&&($e-=Math.pow(2,8*Le)),$e},p.prototype.readInt8=function(we,Le){return we=we>>>0,Le||ne(we,1,this.length),this[we]&128?(255-this[we]+1)*-1:this[we]},p.prototype.readInt16LE=function(we,Le){we=we>>>0,Le||ne(we,2,this.length);var Ke=this[we]|this[we+1]<<8;return Ke&32768?Ke|4294901760:Ke},p.prototype.readInt16BE=function(we,Le){we=we>>>0,Le||ne(we,2,this.length);var Ke=this[we+1]|this[we]<<8;return Ke&32768?Ke|4294901760:Ke},p.prototype.readInt32LE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),this[we]|this[we+1]<<8|this[we+2]<<16|this[we+3]<<24},p.prototype.readInt32BE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),this[we]<<24|this[we+1]<<16|this[we+2]<<8|this[we+3]},p.prototype.readFloatLE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),u.read(this,we,!0,23,4)},p.prototype.readFloatBE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),u.read(this,we,!1,23,4)},p.prototype.readDoubleLE=function(we,Le){return we=we>>>0,Le||ne(we,8,this.length),u.read(this,we,!0,52,8)},p.prototype.readDoubleBE=function(we,Le){return we=we>>>0,Le||ne(we,8,this.length),u.read(this,we,!1,52,8)};function ae(qe,we,Le,Ke,Te,Ve){if(!p.isBuffer(qe))throw new TypeError('"buffer" argument must be a Buffer instance');if(we>Te||weqe.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(we,Le,Ke,Te){if(we=+we,Le=Le>>>0,Ke=Ke>>>0,!Te){var Ve=Math.pow(2,8*Ke)-1;ae(this,we,Le,Ke,Ve,0)}var $e=1,ot=0;for(this[Le]=we&255;++ot>>0,Ke=Ke>>>0,!Te){var Ve=Math.pow(2,8*Ke)-1;ae(this,we,Le,Ke,Ve,0)}var $e=Ke-1,ot=1;for(this[Le+$e]=we&255;--$e>=0&&(ot*=256);)this[Le+$e]=we/ot&255;return Le+Ke},p.prototype.writeUint8=p.prototype.writeUInt8=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,1,255,0),this[Le]=we&255,Le+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,2,65535,0),this[Le]=we&255,this[Le+1]=we>>>8,Le+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,2,65535,0),this[Le]=we>>>8,this[Le+1]=we&255,Le+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,4,4294967295,0),this[Le+3]=we>>>24,this[Le+2]=we>>>16,this[Le+1]=we>>>8,this[Le]=we&255,Le+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,4,4294967295,0),this[Le]=we>>>24,this[Le+1]=we>>>16,this[Le+2]=we>>>8,this[Le+3]=we&255,Le+4},p.prototype.writeIntLE=function(we,Le,Ke,Te){if(we=+we,Le=Le>>>0,!Te){var Ve=Math.pow(2,8*Ke-1);ae(this,we,Le,Ke,Ve-1,-Ve)}var $e=0,ot=1,rt=0;for(this[Le]=we&255;++$e>0)-rt&255;return Le+Ke},p.prototype.writeIntBE=function(we,Le,Ke,Te){if(we=+we,Le=Le>>>0,!Te){var Ve=Math.pow(2,8*Ke-1);ae(this,we,Le,Ke,Ve-1,-Ve)}var $e=Ke-1,ot=1,rt=0;for(this[Le+$e]=we&255;--$e>=0&&(ot*=256);)we<0&&rt===0&&this[Le+$e+1]!==0&&(rt=1),this[Le+$e]=(we/ot>>0)-rt&255;return Le+Ke},p.prototype.writeInt8=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,1,127,-128),we<0&&(we=255+we+1),this[Le]=we&255,Le+1},p.prototype.writeInt16LE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,2,32767,-32768),this[Le]=we&255,this[Le+1]=we>>>8,Le+2},p.prototype.writeInt16BE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,2,32767,-32768),this[Le]=we>>>8,this[Le+1]=we&255,Le+2},p.prototype.writeInt32LE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,4,2147483647,-2147483648),this[Le]=we&255,this[Le+1]=we>>>8,this[Le+2]=we>>>16,this[Le+3]=we>>>24,Le+4},p.prototype.writeInt32BE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,4,2147483647,-2147483648),we<0&&(we=4294967295+we+1),this[Le]=we>>>24,this[Le+1]=we>>>16,this[Le+2]=we>>>8,this[Le+3]=we&255,Le+4};function pe(qe,we,Le,Ke,Te,Ve){if(Le+Ke>qe.length)throw new RangeError("Index out of range");if(Le<0)throw new RangeError("Index out of range")}function ie(qe,we,Le,Ke,Te){return we=+we,Le=Le>>>0,Te||pe(qe,we,Le,4,34028234663852886e22,-34028234663852886e22),u.write(qe,we,Le,Ke,23,4),Le+4}p.prototype.writeFloatLE=function(we,Le,Ke){return ie(this,we,Le,!0,Ke)},p.prototype.writeFloatBE=function(we,Le,Ke){return ie(this,we,Le,!1,Ke)};function le(qe,we,Le,Ke,Te){return we=+we,Le=Le>>>0,Te||pe(qe,we,Le,8,17976931348623157e292,-17976931348623157e292),u.write(qe,we,Le,Ke,52,8),Le+8}p.prototype.writeDoubleLE=function(we,Le,Ke){return le(this,we,Le,!0,Ke)},p.prototype.writeDoubleBE=function(we,Le,Ke){return le(this,we,Le,!1,Ke)},p.prototype.copy=function(we,Le,Ke,Te){if(!p.isBuffer(we))throw new TypeError("argument should be a Buffer");if(Ke||(Ke=0),!Te&&Te!==0&&(Te=this.length),Le>=we.length&&(Le=we.length),Le||(Le=0),Te>0&&Te=this.length)throw new RangeError("Index out of range");if(Te<0)throw new RangeError("sourceEnd out of bounds");Te>this.length&&(Te=this.length),we.length-Le>>0,Ke=Ke===void 0?this.length:Ke>>>0,we||(we=0);var $e;if(typeof we=="number")for($e=Le;$e55295&&Le<57344){if(!Te){if(Le>56319){(we-=3)>-1&&Ve.push(239,191,189);continue}else if($e+1===Ke){(we-=3)>-1&&Ve.push(239,191,189);continue}Te=Le;continue}if(Le<56320){(we-=3)>-1&&Ve.push(239,191,189),Te=Le;continue}Le=(Te-55296<<10|Le-56320)+65536}else Te&&(we-=3)>-1&&Ve.push(239,191,189);if(Te=null,Le<128){if((we-=1)<0)break;Ve.push(Le)}else if(Le<2048){if((we-=2)<0)break;Ve.push(Le>>6|192,Le&63|128)}else if(Le<65536){if((we-=3)<0)break;Ve.push(Le>>12|224,Le>>6&63|128,Le&63|128)}else if(Le<1114112){if((we-=4)<0)break;Ve.push(Le>>18|240,Le>>12&63|128,Le>>6&63|128,Le&63|128)}else throw new Error("Invalid code point")}return Ve}function Ge(qe){for(var we=[],Le=0;Le>8,Te=Le%256,Ve.push(Te),Ve.push(Ke);return Ve}function tt(qe){return l.toByteArray(be(qe))}function Oe(qe,we,Le,Ke){for(var Te=0;Te=we.length||Te>=qe.length);++Te)we[Te+Le]=qe[Te];return Te}function ze(qe,we){return qe instanceof we||qe!=null&&qe.constructor!=null&&qe.constructor.name!=null&&qe.constructor.name===we.name}function ut(qe){return qe!==qe}var et=(function(){for(var qe="0123456789abcdef",we=new Array(256),Le=0;Le<16;++Le)for(var Ke=Le*16,Te=0;Te<16;++Te)we[Ke+Te]=qe[Le]+qe[Te];return we})()},2538(a,i,o){"use strict";var s=o(8902),l=o(5542),u=o(2272),c=o(5023);a.exports=_;function f(x){return[Math.min(x[0],x[1]),Math.max(x[0],x[1])]}function v(x,y){return x[0]-y[0]||x[1]-y[1]}function g(x){return x.map(f).sort(v)}function p(x,y,C){return y in x?x[y]:C}function _(x,y,C){Array.isArray(y)?(C=C||{},y=y||[]):(C=y||{},y=[]);var k=!!p(C,"delaunay",!0),S=!!p(C,"interior",!0),L=!!p(C,"exterior",!0),w=!!p(C,"infinity",!1);if(!S&&!L||x.length===0)return[];var T=s(x,y);if(k||S!==L||w){for(var A=l(x.length,g(y)),m=0;m0;){for(var k=g.pop(),x=g.pop(),S=-1,L=-1,y=_[x],T=1;T=0||(v.flip(x,k),u(f,v,g,S,x,L),u(f,v,g,x,L,S),u(f,v,g,L,k,S),u(f,v,g,k,S,L))}}},5023(a,i,o){"use strict";var s=o(2478);a.exports=g;function l(p,_,x,y,C,k,S){this.cells=p,this.neighbor=_,this.flags=y,this.constraint=x,this.active=C,this.next=k,this.boundary=S}var u=l.prototype;function c(p,_){return p[0]-_[0]||p[1]-_[1]||p[2]-_[2]}u.locate=(function(){var p=[0,0,0];return function(_,x,y){var C=_,k=x,S=y;return x0||S.length>0;){for(;k.length>0;){var m=k.pop();if(L[m]!==-C){L[m]=C;for(var F=w[m],E=0;E<3;++E){var I=A[3*m+E];I>=0&&L[I]===0&&(T[3*m+E]?S.push(I):(k.push(I),L[I]=C))}}}var R=S;S=k,k=R,S.length=0,C=-C}var B=v(w,L,_);return x?B.concat(y.boundary):B}},8902(a,i,o){"use strict";var s=o(2478),l=o(3250)[3],u=0,c=1,f=2;a.exports=S;function v(L,w,T,A,m){this.a=L,this.b=w,this.idx=T,this.lowerIds=A,this.upperIds=m}function g(L,w,T,A){this.a=L,this.b=w,this.type=T,this.idx=A}function p(L,w){var T=L.a[0]-w.a[0]||L.a[1]-w.a[1]||L.type-w.type;return T||L.type!==u&&(T=l(L.a,L.b,w.b),T)?T:L.idx-w.idx}function _(L,w){return l(L.a,L.b,w)}function x(L,w,T,A,m){for(var F=s.lt(w,A,_),E=s.gt(w,A,_),I=F;I1&&l(T[B[U-2]],T[B[U-1]],A)>0;)L.push([B[U-1],B[U-2],m]),U-=1;B.length=U,B.push(m);for(var O=R.upperIds,U=O.length;U>1&&l(T[O[U-2]],T[O[U-1]],A)<0;)L.push([O[U-2],O[U-1],m]),U-=1;O.length=U,O.push(m)}}function y(L,w){var T;return L.a[0]R[0]&&m.push(new g(R,I,f,F),new g(I,R,c,F))}m.sort(p);for(var B=m[0].a[0]-(1+Math.abs(m[0].a[0]))*Math.pow(2,-52),O=[new v([B,1],[B,0],-1,[],[],[],[])],U=[],F=0,j=m.length;F=0}})(),u.removeTriangle=function(v,g,p){var _=this.stars;c(_[v],g,p),c(_[g],p,v),c(_[p],v,g)},u.addTriangle=function(v,g,p){var _=this.stars;_[v].push(g,p),_[g].push(p,v),_[p].push(v,g)},u.opposite=function(v,g){for(var p=this.stars[g],_=1,x=p.length;_=0;--q){var _e=U[q];V=_e[0];var ne=B[V],ae=ne[0],pe=ne[1],ie=R[ae],le=R[pe];if((ie[0]-le[0]||ie[1]-le[1])<0){var xe=ae;ae=pe,pe=xe}ne[0]=ae;var be=ne[1]=_e[1],De;for(j&&(De=ne[2]);q>0&&U[q-1][0]===V;){var _e=U[--q],Ge=_e[1];j?B.push([be,Ge,De]):B.push([be,Ge]),be=Ge}j?B.push([be,pe,De]):B.push([be,pe])}return K}function w(R,B,O){for(var U=B.length,j=new s(U),q=[],V=0;VB[2]?1:0)}function m(R,B,O){if(R.length!==0){if(B)for(var U=0;U0||V.length>0}function I(R,B,O){var U;if(O){U=B;for(var j=new Array(B.length),q=0;qL+1)throw new Error(k+" map requires nshades to be at least size "+C.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],p=C.map(function(I){return Math.round(I.index*L)}),w[0]=Math.min(Math.max(w[0],0),1),w[1]=Math.min(Math.max(w[1],0),1);var A=C.map(function(I,R){var B=C[R].index,O=C[R].rgb.slice();return O.length===4&&O[3]>=0&&O[3]<=1||(O[3]=w[0]+(w[1]-w[0])*B),O}),m=[];for(T=0;T=0}function g(p,_,x,y){var C=s(_,x,y);if(C===0){var k=l(s(p,_,x)),S=l(s(p,_,y));if(k===S){if(k===0){var L=v(p,_,x),w=v(p,_,y);return L===w?0:L?1:-1}return 0}else{if(S===0)return k>0||v(p,_,y)?-1:1;if(k===0)return S>0||v(p,_,x)?1:-1}return l(S-k)}var T=s(p,_,x);if(T>0)return C>0&&s(p,_,y)>0?1:-1;if(T<0)return C>0||s(p,_,y)>0?1:-1;var A=s(p,_,y);return A>0||v(p,_,x)?1:-1}},8572(a){"use strict";a.exports=function(o){return o<0?-1:o>0?1:0}},8507(a){a.exports=s;var i=Math.min;function o(l,u){return l-u}function s(l,u){var c=l.length,f=l.length-u.length;if(f)return f;switch(c){case 0:return 0;case 1:return l[0]-u[0];case 2:return l[0]+l[1]-u[0]-u[1]||i(l[0],l[1])-i(u[0],u[1]);case 3:var v=l[0]+l[1],g=u[0]+u[1];if(f=v+l[2]-(g+u[2]),f)return f;var p=i(l[0],l[1]),_=i(u[0],u[1]);return i(p,l[2])-i(_,u[2])||i(p+l[2],v)-i(_+u[2],g);case 4:var x=l[0],y=l[1],C=l[2],k=l[3],S=u[0],L=u[1],w=u[2],T=u[3];return x+y+C+k-(S+L+w+T)||i(x,y,C,k)-i(S,L,w,T,S)||i(x+y,x+C,x+k,y+C,y+k,C+k)-i(S+L,S+w,S+T,L+w,L+T,w+T)||i(x+y+C,x+y+k,x+C+k,y+C+k)-i(S+L+w,S+L+T,S+w+T,L+w+T);default:for(var A=l.slice().sort(o),m=u.slice().sort(o),F=0;Fo[l][0]&&(l=u);return sl?[[l],[s]]:[[s]]}},4750(a,i,o){"use strict";a.exports=l;var s=o(3090);function l(u){var c=s(u),f=c.length;if(f<=2)return[];for(var v=new Array(f),g=c[f-1],p=0;p=g[S]&&(k+=1);y[C]=k}}return v}function f(v,g){try{return s(v,!0)}catch(y){var p=l(v);if(p.length<=g)return[];var _=u(v,p),x=s(_,!0);return c(x,p)}}},4769(a){"use strict";function i(s,l,u,c,f,v){var g=6*f*f-6*f,p=3*f*f-4*f+1,_=-6*f*f+6*f,x=3*f*f-2*f;if(s.length){v||(v=new Array(s.length));for(var y=s.length-1;y>=0;--y)v[y]=g*s[y]+p*l[y]+_*u[y]+x*c[y];return v}return g*s+p*l+_*u[y]+x*c}function o(s,l,u,c,f,v){var g=f-1,p=f*f,_=g*g,x=(1+2*f)*_,y=f*_,C=p*(3-2*f),k=p*g;if(s.length){v||(v=new Array(s.length));for(var S=s.length-1;S>=0;--S)v[S]=x*s[S]+y*l[S]+C*u[S]+k*c[S];return v}return x*s+y*l+C*u+k*c}a.exports=o,a.exports.derivative=i},7642(a,i,o){"use strict";var s=o(8954),l=o(1682);a.exports=v;function u(g,p){this.point=g,this.index=p}function c(g,p){for(var _=g.point,x=p.point,y=_.length,C=0;C=2)return!1;O[j]=q}return!0}):B=B.filter(function(O){for(var U=0;U<=x;++U){var j=F[O[U]];if(j<0)return!1;O[U]=j}return!0}),x&1)for(var k=0;k>>31},a.exports.exponent=function(C){var k=a.exports.hi(C);return(k<<1>>>21)-1023},a.exports.fraction=function(C){var k=a.exports.lo(C),S=a.exports.hi(C),L=S&(1<<20)-1;return S&2146435072&&(L+=1048576),[k,L]},a.exports.denormalized=function(C){var k=a.exports.hi(C);return!(k&2146435072)}},1338(a){"use strict";function i(l,u,c){var f=l[c]|0;if(f<=0)return[];var v=new Array(f),g;if(c===l.length-1)for(g=0;g0)return o(l|0,u);break;case"object":if(typeof l.length=="number")return i(l,u,0);break}return[]}a.exports=s},3134(a,i,o){"use strict";a.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!="number"){c=0;for(var v=0;v=x-1)for(var T=k.length-1,m=p-_[x-1],A=0;A=x-1)for(var w=k.length-1,T=p-_[x-1],A=0;A=0;--x)if(p[--_])return!1;return!0},f.jump=function(p){var _=this.lastT(),x=this.dimension;if(!(p<_||arguments.length!==x+1)){var y=this._state,C=this._velocity,k=y.length-this.dimension,S=this.bounds,L=S[0],w=S[1];this._time.push(_,p);for(var T=0;T<2;++T)for(var A=0;A0;--A)y.push(u(L[A-1],w[A-1],arguments[A])),C.push(0)}},f.push=function(p){var _=this.lastT(),x=this.dimension;if(!(p<_||arguments.length!==x+1)){var y=this._state,C=this._velocity,k=y.length-this.dimension,S=p-_,L=this.bounds,w=L[0],T=L[1],A=S>1e-6?1/S:0;this._time.push(p);for(var m=x;m>0;--m){var F=u(w[m-1],T[m-1],arguments[m]);y.push(F),C.push((F-y[k++])*A)}}},f.set=function(p){var _=this.dimension;if(!(p0;--L)x.push(u(k[L-1],S[L-1],arguments[L])),y.push(0)}},f.move=function(p){var _=this.lastT(),x=this.dimension;if(!(p<=_||arguments.length!==x+1)){var y=this._state,C=this._velocity,k=y.length-this.dimension,S=this.bounds,L=S[0],w=S[1],T=p-_,A=T>1e-6?1/T:0;this._time.push(p);for(var m=x;m>0;--m){var F=arguments[m];y.push(u(L[m-1],w[m-1],y[k++]+F)),C.push(F*A)}}},f.idle=function(p){var _=this.lastT();if(!(p<_)){var x=this.dimension,y=this._state,C=this._velocity,k=y.length-x,S=this.bounds,L=S[0],w=S[1],T=p-_;this._time.push(p);for(var A=x-1;A>=0;--A)y.push(u(L[A],w[A],y[k]+T*C[k])),C.push(0),k+=1}};function v(p){for(var _=new Array(p),x=0;x=0;--R){var m=F[R];E[R]<=0?F[R]=new s(m._color,m.key,m.value,F[R+1],m.right,m._count+1):F[R]=new s(m._color,m.key,m.value,m.left,F[R+1],m._count+1)}for(var R=F.length-1;R>1;--R){var B=F[R-1],m=F[R];if(B._color===o||m._color===o)break;var O=F[R-2];if(O.left===B)if(B.left===m){var U=O.right;if(U&&U._color===i)B._color=o,O.right=u(o,U),O._color=i,R-=1;else{if(O._color=i,O.left=B.right,B._color=o,B.right=O,F[R-2]=B,F[R-1]=m,c(O),c(B),R>=3){var j=F[R-3];j.left===O?j.left=B:j.right=B}break}}else{var U=O.right;if(U&&U._color===i)B._color=o,O.right=u(o,U),O._color=i,R-=1;else{if(B.right=m.left,O._color=i,O.left=m.right,m._color=o,m.left=B,m.right=O,F[R-2]=m,F[R-1]=B,c(O),c(B),c(m),R>=3){var j=F[R-3];j.left===O?j.left=m:j.right=m}break}}else if(B.right===m){var U=O.left;if(U&&U._color===i)B._color=o,O.left=u(o,U),O._color=i,R-=1;else{if(O._color=i,O.right=B.left,B._color=o,B.left=O,F[R-2]=B,F[R-1]=m,c(O),c(B),R>=3){var j=F[R-3];j.right===O?j.right=B:j.left=B}break}}else{var U=O.left;if(U&&U._color===i)B._color=o,O.left=u(o,U),O._color=i,R-=1;else{if(B.left=m.right,O._color=i,O.right=m.left,m._color=o,m.right=B,m.left=O,F[R-2]=m,F[R-1]=B,c(O),c(B),c(m),R>=3){var j=F[R-3];j.right===O?j.right=m:j.left=m}break}}}return F[0]._color=o,new f(A,F[0])};function g(w,T){if(T.left){var A=g(w,T.left);if(A)return A}var A=w(T.key,T.value);if(A)return A;if(T.right)return g(w,T.right)}function p(w,T,A,m){var F=T(w,m.key);if(F<=0){if(m.left){var E=p(w,T,A,m.left);if(E)return E}var E=A(m.key,m.value);if(E)return E}if(m.right)return p(w,T,A,m.right)}function _(w,T,A,m,F){var E=A(w,F.key),I=A(T,F.key),R;if(E<=0&&(F.left&&(R=_(w,T,A,m,F.left),R)||I>0&&(R=m(F.key,F.value),R)))return R;if(I>0&&F.right)return _(w,T,A,m,F.right)}v.forEach=function(T,A,m){if(this.root)switch(arguments.length){case 1:return g(T,this.root);case 2:return p(A,this._compare,T,this.root);case 3:return this._compare(A,m)>=0?void 0:_(A,m,this._compare,T,this.root)}},Object.defineProperty(v,"begin",{get:function(){for(var w=[],T=this.root;T;)w.push(T),T=T.left;return new x(this,w)}}),Object.defineProperty(v,"end",{get:function(){for(var w=[],T=this.root;T;)w.push(T),T=T.right;return new x(this,w)}}),v.at=function(w){if(w<0)return new x(this,[]);for(var T=this.root,A=[];;){if(A.push(T),T.left){if(w=T.right._count)break;T=T.right}else break}return new x(this,[])},v.ge=function(w){for(var T=this._compare,A=this.root,m=[],F=0;A;){var E=T(w,A.key);m.push(A),E<=0&&(F=m.length),E<=0?A=A.left:A=A.right}return m.length=F,new x(this,m)},v.gt=function(w){for(var T=this._compare,A=this.root,m=[],F=0;A;){var E=T(w,A.key);m.push(A),E<0&&(F=m.length),E<0?A=A.left:A=A.right}return m.length=F,new x(this,m)},v.lt=function(w){for(var T=this._compare,A=this.root,m=[],F=0;A;){var E=T(w,A.key);m.push(A),E>0&&(F=m.length),E<=0?A=A.left:A=A.right}return m.length=F,new x(this,m)},v.le=function(w){for(var T=this._compare,A=this.root,m=[],F=0;A;){var E=T(w,A.key);m.push(A),E>=0&&(F=m.length),E<0?A=A.left:A=A.right}return m.length=F,new x(this,m)},v.find=function(w){for(var T=this._compare,A=this.root,m=[];A;){var F=T(w,A.key);if(m.push(A),F===0)return new x(this,m);F<=0?A=A.left:A=A.right}return new x(this,[])},v.remove=function(w){var T=this.find(w);return T?T.remove():this},v.get=function(w){for(var T=this._compare,A=this.root;A;){var m=T(w,A.key);if(m===0)return A.value;m<=0?A=A.left:A=A.right}};function x(w,T){this.tree=w,this._stack=T}var y=x.prototype;Object.defineProperty(y,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(y,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),y.clone=function(){return new x(this.tree,this._stack.slice())};function C(w,T){w.key=T.key,w.value=T.value,w.left=T.left,w.right=T.right,w._color=T._color,w._count=T._count}function k(w){for(var T,A,m,F,E=w.length-1;E>=0;--E){if(T=w[E],E===0){T._color=o;return}if(A=w[E-1],A.left===T){if(m=A.right,m.right&&m.right._color===i){if(m=A.right=l(m),F=m.right=l(m.right),A.right=m.left,m.left=A,m.right=F,m._color=A._color,T._color=o,A._color=o,F._color=o,c(A),c(m),E>1){var I=w[E-2];I.left===A?I.left=m:I.right=m}w[E-1]=m;return}else if(m.left&&m.left._color===i){if(m=A.right=l(m),F=m.left=l(m.left),A.right=F.left,m.left=F.right,F.left=A,F.right=m,F._color=A._color,A._color=o,m._color=o,T._color=o,c(A),c(m),c(F),E>1){var I=w[E-2];I.left===A?I.left=F:I.right=F}w[E-1]=F;return}if(m._color===o)if(A._color===i){A._color=o,A.right=u(i,m);return}else{A.right=u(i,m);continue}else{if(m=l(m),A.right=m.left,m.left=A,m._color=A._color,A._color=i,c(A),c(m),E>1){var I=w[E-2];I.left===A?I.left=m:I.right=m}w[E-1]=m,w[E]=A,E+11){var I=w[E-2];I.right===A?I.right=m:I.left=m}w[E-1]=m;return}else if(m.right&&m.right._color===i){if(m=A.left=l(m),F=m.right=l(m.right),A.left=F.right,m.right=F.left,F.right=A,F.left=m,F._color=A._color,A._color=o,m._color=o,T._color=o,c(A),c(m),c(F),E>1){var I=w[E-2];I.right===A?I.right=F:I.left=F}w[E-1]=F;return}if(m._color===o)if(A._color===i){A._color=o,A.left=u(i,m);return}else{A.left=u(i,m);continue}else{if(m=l(m),A.left=m.right,m.right=A,m._color=A._color,A._color=i,c(A),c(m),E>1){var I=w[E-2];I.right===A?I.right=m:I.left=m}w[E-1]=m,w[E]=A,E+1=0;--m){var A=w[m];A.left===w[m+1]?T[m]=new s(A._color,A.key,A.value,T[m+1],A.right,A._count):T[m]=new s(A._color,A.key,A.value,A.left,T[m+1],A._count)}if(A=T[T.length-1],A.left&&A.right){var F=T.length;for(A=A.left;A.right;)T.push(A),A=A.right;var E=T[F-1];T.push(new s(A._color,E.key,E.value,A.left,A.right,A._count)),T[F-1].key=A.key,T[F-1].value=A.value;for(var m=T.length-2;m>=F;--m)A=T[m],T[m]=new s(A._color,A.key,A.value,A.left,T[m+1],A._count);T[F-1].left=T[F]}if(A=T[T.length-1],A._color===i){var I=T[T.length-2];I.left===A?I.left=null:I.right===A&&(I.right=null),T.pop();for(var m=0;m0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(y,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(y,"index",{get:function(){var w=0,T=this._stack;if(T.length===0){var A=this.tree.root;return A?A._count:0}else T[T.length-1].left&&(w=T[T.length-1].left._count);for(var m=T.length-2;m>=0;--m)T[m+1]===T[m].right&&(++w,T[m].left&&(w+=T[m].left._count));return w},enumerable:!0}),y.next=function(){var w=this._stack;if(w.length!==0){var T=w[w.length-1];if(T.right)for(T=T.right;T;)w.push(T),T=T.left;else for(w.pop();w.length>0&&w[w.length-1].right===T;)T=w[w.length-1],w.pop()}},Object.defineProperty(y,"hasNext",{get:function(){var w=this._stack;if(w.length===0)return!1;if(w[w.length-1].right)return!0;for(var T=w.length-1;T>0;--T)if(w[T-1].left===w[T])return!0;return!1}}),y.update=function(w){var T=this._stack;if(T.length===0)throw new Error("Can't update empty node!");var A=new Array(T.length),m=T[T.length-1];A[A.length-1]=new s(m._color,m.key,w,m.left,m.right,m._count);for(var F=T.length-2;F>=0;--F)m=T[F],m.left===T[F+1]?A[F]=new s(m._color,m.key,m.value,A[F+1],m.right,m._count):A[F]=new s(m._color,m.key,m.value,m.left,A[F+1],m._count);return new f(this.tree._compare,A[0])},y.prev=function(){var w=this._stack;if(w.length!==0){var T=w[w.length-1];if(T.left)for(T=T.left;T;)w.push(T),T=T.right;else for(w.pop();w.length>0&&w[w.length-1].left===T;)T=w[w.length-1],w.pop()}},Object.defineProperty(y,"hasPrev",{get:function(){var w=this._stack;if(w.length===0)return!1;if(w[w.length-1].left)return!0;for(var T=w.length-1;T>0;--T)if(w[T-1].right===w[T])return!0;return!1}});function S(w,T){return wT?1:0}function L(w){return new f(w||S,null)}},3837(a,i,o){"use strict";a.exports=R;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),v=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),g=ArrayBuffer,p=DataView;function _(B){return g.isView(B)&&!(B instanceof p)}function x(B){return Array.isArray(B)||_(B)}function y(B,O){return B[0]=O[0],B[1]=O[1],B[2]=O[2],B}function C(B){this.gl=B,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=u(B)}var k=C.prototype;k.update=function(B){B=B||{};function O(ae,pe,ie){if(ie in B){var le=B[ie],xe=this[ie],be;(ae?x(le)&&x(le[0]):x(le))?this[ie]=be=[pe(le[0]),pe(le[1]),pe(le[2])]:this[ie]=be=[pe(le),pe(le),pe(le)];for(var De=0;De<3;++De)if(be[De]!==xe[De])return!0}return!1}var U=O.bind(this,!1,Number),j=O.bind(this,!1,Boolean),q=O.bind(this,!1,String),V=O.bind(this,!0,function(ae){if(x(ae)){if(ae.length===3)return[+ae[0],+ae[1],+ae[2],1];if(ae.length===4)return[+ae[0],+ae[1],+ae[2],+ae[3]]}return[0,0,0,1]}),K,ee=!1,ce=!1;if("bounds"in B)for(var me=B.bounds,ye=0;ye<2;++ye)for(var ue=0;ue<3;++ue)me[ye][ue]!==this.bounds[ye][ue]&&(ce=!0),this.bounds[ye][ue]=me[ye][ue];if("ticks"in B){K=B.ticks,ee=!0,this.autoTicks=!1;for(var ye=0;ye<3;++ye)this.tickSpacing[ye]=0}else U("tickSpacing")&&(this.autoTicks=!0,ce=!0);if(this._firstInit&&("ticks"in B||"tickSpacing"in B||(this.autoTicks=!0),ce=!0,ee=!0,this._firstInit=!1),ce&&this.autoTicks&&(K=f.create(this.bounds,this.tickSpacing),ee=!0),ee){for(var ye=0;ye<3;++ye)K[ye].sort(function(pe,ie){return pe.x-ie.x});f.equal(K,this.ticks)?ee=!1:this.ticks=K}j("tickEnable"),q("tickFont")&&(ee=!0),q("tickFontStyle")&&(ee=!0),q("tickFontWeight")&&(ee=!0),q("tickFontVariant")&&(ee=!0),U("tickSize"),U("tickAngle"),U("tickPad"),V("tickColor");var J=q("labels");q("labelFont")&&(J=!0),q("labelFontStyle")&&(J=!0),q("labelFontWeight")&&(J=!0),q("labelFontVariant")&&(J=!0),j("labelEnable"),U("labelSize"),U("labelPad"),V("labelColor"),j("lineEnable"),j("lineMirror"),U("lineWidth"),V("lineColor"),j("lineTickEnable"),j("lineTickMirror"),U("lineTickLength"),U("lineTickWidth"),V("lineTickColor"),j("gridEnable"),U("gridWidth"),V("gridColor"),j("zeroEnable"),V("zeroLineColor"),U("zeroLineWidth"),j("backgroundEnable"),V("backgroundColor");var _e=[{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]}],ne=[{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&&(J||ee)&&this._text.update(this.bounds,this.labels,_e,this.ticks,ne):this._text=s(this.gl,this.bounds,this.labels,_e,this.ticks,ne),this._lines&&ee&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};function S(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var L=[new S,new S,new S];function w(B,O,U,j,q){for(var V=B.primalOffset,K=B.primalMinor,ee=B.mirrorOffset,ce=B.mirrorMinor,me=j[O],ye=0;ye<3;++ye)if(O!==ye){var ue=V,J=ee,_e=K,ne=ce;me&1<0?(_e[ye]=-1,ne[ye]=0):(_e[ye]=0,ne[ye]=1)}}var T=[0,0,0],A={model:v,view:v,projection:v,_ortho:!1};k.isOpaque=function(){return!0},k.isTransparent=function(){return!1},k.drawTransparent=function(B){};var m=0,F=[0,0,0],E=[0,0,0],I=[0,0,0];k.draw=function(B){B=B||A;for(var ie=this.gl,O=B.model||v,U=B.view||v,j=B.projection||v,q=this.bounds,V=B._ortho||!1,K=c(O,U,j,q,V),ee=K.cubeEdges,ce=K.axis,me=U[12],ye=U[13],ue=U[14],J=U[15],_e=V?2:1,ne=_e*this.pixelRatio*(j[3]*me+j[7]*ye+j[11]*ue+j[15]*J)/ie.drawingBufferHeight,ae=0;ae<3;++ae)this.lastCubeProps.cubeEdges[ae]=ee[ae],this.lastCubeProps.axis[ae]=ce[ae];for(var pe=L,ae=0;ae<3;++ae)w(L[ae],ae,this.bounds,ee,ce);for(var ie=this.gl,le=T,ae=0;ae<3;++ae)this.backgroundEnable[ae]?le[ae]=ce[ae]:le[ae]=0;this._background.draw(O,U,j,q,le,this.backgroundColor),this._lines.bind(O,U,j,this);for(var ae=0;ae<3;++ae){var xe=[0,0,0];ce[ae]>0?xe[ae]=q[1][ae]:xe[ae]=q[0][ae];for(var be=0;be<2;++be){var De=(ae+1+be)%3,Ge=(ae+1+(be^1))%3;this.gridEnable[De]&&this._lines.drawGrid(De,Ge,this.bounds,xe,this.gridColor[De],this.gridWidth[De]*this.pixelRatio)}for(var be=0;be<2;++be){var De=(ae+1+be)%3,Ge=(ae+1+(be^1))%3;this.zeroEnable[Ge]&&Math.min(q[0][Ge],q[1][Ge])<=0&&Math.max(q[0][Ge],q[1][Ge])>=0&&this._lines.drawZero(De,Ge,this.bounds,xe,this.zeroLineColor[Ge],this.zeroLineWidth[Ge]*this.pixelRatio)}}for(var ae=0;ae<3;++ae){this.lineEnable[ae]&&this._lines.drawAxisLine(ae,this.bounds,pe[ae].primalOffset,this.lineColor[ae],this.lineWidth[ae]*this.pixelRatio),this.lineMirror[ae]&&this._lines.drawAxisLine(ae,this.bounds,pe[ae].mirrorOffset,this.lineColor[ae],this.lineWidth[ae]*this.pixelRatio);for(var pt=y(F,pe[ae].primalMinor),tt=y(E,pe[ae].mirrorMinor),Oe=this.lineTickLength,be=0;be<3;++be){var ze=ne/O[5*be];pt[be]*=Oe[be]*ze,tt[be]*=Oe[be]*ze}this.lineTickEnable[ae]&&this._lines.drawAxisTicks(ae,pe[ae].primalOffset,pt,this.lineTickColor[ae],this.lineTickWidth[ae]*this.pixelRatio),this.lineTickMirror[ae]&&this._lines.drawAxisTicks(ae,pe[ae].mirrorOffset,tt,this.lineTickColor[ae],this.lineTickWidth[ae]*this.pixelRatio)}this._lines.unbind(),this._text.bind(O,U,j,this.pixelRatio);var ut,et=.5,qe,we;function Le(rt){we=[0,0,0],we[rt]=1}function Ke(rt,it,We){var mt=(rt+1)%3,bt=(rt+2)%3,Yt=it[mt],jt=it[bt],mr=We[mt],or=We[bt];if(Yt>0&&or>0){Le(mt);return}else if(Yt>0&&or<0){Le(mt);return}else if(Yt<0&&or>0){Le(mt);return}else if(Yt<0&&or<0){Le(mt);return}else if(jt>0&&mr>0){Le(bt);return}else if(jt>0&&mr<0){Le(bt);return}else if(jt<0&&mr>0){Le(bt);return}else if(jt<0&&mr<0){Le(bt);return}}for(var ae=0;ae<3;++ae){for(var Te=pe[ae].primalMinor,Ve=pe[ae].mirrorMinor,$e=y(I,pe[ae].primalOffset),be=0;be<3;++be)this.lineTickEnable[ae]&&($e[be]+=ne*Te[be]*Math.max(this.lineTickLength[be],0)/O[5*be]);var ot=[0,0,0];if(ot[ae]=1,this.tickEnable[ae]){this.tickAngle[ae]===-3600?(this.tickAngle[ae]=0,this.tickAlign[ae]="auto"):this.tickAlign[ae]=-1,qe=1,ut=[this.tickAlign[ae],et,qe],ut[0]==="auto"?ut[0]=m:ut[0]=parseInt(""+ut[0]),we=[0,0,0],Ke(ae,Te,Ve);for(var be=0;be<3;++be)$e[be]+=ne*Te[be]*this.tickPad[be]/O[5*be];this._text.drawTicks(ae,this.tickSize[ae],this.tickAngle[ae],$e,this.tickColor[ae],ot,we,ut)}if(this.labelEnable[ae]){qe=0,we=[0,0,0],this.labels[ae].length>4&&(Le(ae),qe=1),ut=[this.labelAlign[ae],et,qe],ut[0]==="auto"?ut[0]=m:ut[0]=parseInt(""+ut[0]);for(var be=0;be<3;++be)$e[be]+=ne*Te[be]*this.labelPad[be]/O[5*be];$e[ae]+=.5*(q[0][ae]+q[1][ae]),this._text.drawLabel(ae,this.labelSize[ae],this.labelAngle[ae],$e,this.labelColor[ae],[0,0,0],we,ut)}}this._text.unbind()},k.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function R(B,O){var U=new C(B);return U.update(O),U}},5304(a,i,o){"use strict";a.exports=v;var s=o(2762),l=o(8116),u=o(1879).bg;function c(g,p,_,x){this.gl=g,this.buffer=p,this.vao=_,this.shader=x}var f=c.prototype;f.draw=function(g,p,_,x,y,C){for(var k=!1,S=0;S<3;++S)k=k||y[S];if(k){var L=this.gl;L.enable(L.POLYGON_OFFSET_FILL),L.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:g,view:p,projection:_,bounds:x,enable:y,colors:C},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),L.disable(L.POLYGON_OFFSET_FILL)}},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function v(g){for(var p=[],_=[],x=0,y=0;y<3;++y)for(var C=(y+1)%3,k=(y+2)%3,S=[0,0,0],L=[0,0,0],w=-1;w<=1;w+=2){_.push(x,x+2,x+1,x+1,x+2,x+3),S[y]=w,L[y]=w;for(var T=-1;T<=1;T+=2){S[C]=T;for(var A=-1;A<=1;A+=2)S[k]=A,p.push(S[0],S[1],S[2],L[0],L[1],L[2]),x+=1}var m=C;C=k,k=m}var F=s(g,new Float32Array(p)),E=s(g,new Uint16Array(_),g.ELEMENT_ARRAY_BUFFER),I=l(g,[{buffer:F,type:g.FLOAT,size:3,offset:0,stride:24},{buffer:F,type:g.FLOAT,size:3,offset:12,stride:24}],E),R=u(g);return R.attributes.position.location=0,R.attributes.normal.location=1,new c(g,F,I,R)}},6429(a,i,o){"use strict";a.exports=w;var s=o(8828),l=o(6760),u=o(5202),c=o(3250),f=new Array(16),v=new Array(8),g=new Array(8),p=new Array(3),_=[0,0,0];(function(){for(var T=0;T<8;++T)v[T]=[1,1,1,1],g[T]=[1,1,1]})();function x(T,A,m){for(var F=0;F<4;++F){T[F]=m[12+F];for(var E=0;E<3;++E)T[F]+=A[E]*m[4*E+F]}}var y=[[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 C(T){for(var A=0;Ace&&(U|=1<ce){U|=1<g[R][1])&&(pe=R);for(var ie=-1,R=0;R<3;++R){var le=pe^1<g[xe][0]&&(xe=le)}}var be=k;be[0]=be[1]=be[2]=0,be[s.log2(ie^pe)]=pe&ie,be[s.log2(pe^xe)]=pe&xe;var De=xe^7;De===U||De===ae?(De=ie^7,be[s.log2(xe^De)]=De&xe):be[s.log2(ie^De)]=De&ie;for(var Ge=S,pt=U,V=0;V<3;++V)pt&1<=0;--be){var De=ae[me[be]];T.push(ne*De[0],-ne*De[1],U)}}for(var F=[0,0,0],E=[0,0,0],I=[0,0,0],R=[0,0,0],B=1.25,O={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},V=0;V<3;++V){I[V]=T.length/g|0,m(.5*(k[0][V]+k[1][V]),S[V],L[V],12,B,O),R[V]=(T.length/g|0)-I[V],F[V]=T.length/g|0;for(var j=0;j=0&&(g=f.length-v-1);var p=Math.pow(10,g),x=Math.round(u*c*p),_=x+"";if(_.indexOf("e")>=0)return _;var y=x/p,C=x%p;x<0?(y=-Math.ceil(y)|0,C=-C|0):(y=Math.floor(y)|0,C=C|0);var k=""+y;if(x<0&&(k="-"+k),g){for(var S=""+C;S.length=u[0][v];--x)g.push({x:x*c[v],text:o(c[v],x)});f.push(g)}return f}function l(u,c){for(var f=0;f<3;++f){if(u[f].length!==c[f].length)return!1;for(var v=0;vk)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return y.bufferSubData(C,w,L),k}function p(y,C){for(var k=s.malloc(y.length,C),S=y.length,L=0;L=0;--S){if(C[S]!==k)return!1;k*=y[S]}return!0}v.update=function(y,C){if(typeof C!="number"&&(C=-1),this.bind(),typeof y=="object"&&typeof y.shape!="undefined"){var k=y.dtype;if(c.indexOf(k)<0&&(k="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var S=gl.getExtension("OES_element_index_uint");S&&k!=="uint16"?k="uint32":k="uint16"}if(k===y.dtype&&x(y.shape,y.stride))y.offset===0&&y.data.length===y.shape[0]?this.length=g(this.gl,this.type,this.length,this.usage,y.data,C):this.length=g(this.gl,this.type,this.length,this.usage,y.data.subarray(y.offset,y.shape[0]),C);else{var L=s.malloc(y.size,k),w=u(L,y.shape);l.assign(w,y),C<0?this.length=g(this.gl,this.type,this.length,this.usage,L,C):this.length=g(this.gl,this.type,this.length,this.usage,L.subarray(0,y.size),C),s.free(L)}}else if(Array.isArray(y)){var A;this.type===this.gl.ELEMENT_ARRAY_BUFFER?A=p(y,"uint16"):A=p(y,"float32"),C<0?this.length=g(this.gl,this.type,this.length,this.usage,A,C):this.length=g(this.gl,this.type,this.length,this.usage,A.subarray(0,y.length),C),s.free(A)}else if(typeof y=="object"&&typeof y.length=="number")this.length=g(this.gl,this.type,this.length,this.usage,y,C);else if(typeof y=="number"||y===void 0){if(C>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");y=y|0,y<=0&&(y=1),this.gl.bufferData(this.type,y|0,this.usage),this.length=y}else throw new Error("gl-buffer: Invalid data type")};function _(y,C,k,S){if(k=k||y.ARRAY_BUFFER,S=S||y.DYNAMIC_DRAW,k!==y.ARRAY_BUFFER&&k!==y.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(S!==y.DYNAMIC_DRAW&&S!==y.STATIC_DRAW&&S!==y.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var L=y.createBuffer(),w=new f(y,k,L,0,S);return w.update(C),w}a.exports=_}),6405:(function(a,i,o){"use strict";var s=o(2931);a.exports=function(u,c){var f=u.positions,v=u.vectors,g={positions:[],vertexIntensity:[],vertexIntensityBounds:u.vertexIntensityBounds,vectors:[],cells:[],coneOffset:u.coneOffset,colormap:u.colormap};if(u.positions.length===0)return c&&(c[0]=[0,0,0],c[1]=[0,0,0]),g;for(var p=0,x=1/0,_=-1/0,y=1/0,C=-1/0,k=1/0,S=-1/0,L=null,w=null,A=[],T=1/0,m=!1,F=u.coneSizemode==="raw",E=0;Ep&&(p=s.length(R)),E&&!F){var B=2*s.distance(L,I)/(s.length(w)+s.length(R));B?(T=Math.min(T,B),m=!1):m=!0}m||(L=I,w=R),A.push(R)}var O=[x,y,k],V=[_,C,S];c&&(c[0]=O,c[1]=V),p===0&&(p=1);var j=1/p;isFinite(T)||(T=1),g.vectorScale=T;var q=u.coneSize||(F?1:.5);u.absoluteConeSize&&(q=u.absoluteConeSize*j),g.coneScale=q;for(var E=0,U=0;E=1},y.isTransparent=function(){return this.opacity<1},y.pickSlots=1,y.setPickBase=function(A){this.pickId=A};function C(A){for(var T=p({colormap:A,nshades:256,format:"rgba"}),m=new Uint8Array(256*4),F=0;F<256;++F){for(var E=T[F],I=0;I<3;++I)m[4*F+I]=E[I];m[4*F+3]=E[3]*255}return g(m,[256,256,4],[4,0,1])}function k(A){for(var T=A.length,m=new Array(T),F=0;F0){var U=this.triShader;U.bind(),U.uniforms=B,this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},y.drawPick=function(A){A=A||{};for(var T=this.gl,m=A.model||x,F=A.view||x,E=A.projection||x,I=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],R=0;R<3;++R)I[0][R]=Math.max(I[0][R],this.clipBounds[0][R]),I[1][R]=Math.min(I[1][R],this.clipBounds[1][R]);this._model=[].slice.call(m),this._view=[].slice.call(F),this._projection=[].slice.call(E),this._resolution=[T.drawingBufferWidth,T.drawingBufferHeight];var B={model:m,view:F,projection:E,clipBounds:I,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},O=this.pickShader;O.bind(),O.uniforms=B,this.triangleCount>0&&(this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},y.pick=function(A){if(!A||A.id!==this.pickId)return null;var T=A.value[0]+256*A.value[1]+65536*A.value[2],m=this.cells[T],F=this.positions[m[1]].slice(0,3),E={position:F,dataCoordinate:F,index:Math.floor(m[1]/48)};return this.traceType==="cone"?E.index=Math.floor(m[1]/48):this.traceType==="streamtube"&&(E.intensity=this.intensity[m[1]],E.velocity=this.vectors[m[1]].slice(0,3),E.divergence=this.vectors[m[1]][3],E.index=T),E},y.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function S(A,T){var m=s(A,T.meshShader.vertex,T.meshShader.fragment,null,T.meshShader.attributes);return m.attributes.position.location=0,m.attributes.color.location=2,m.attributes.uv.location=3,m.attributes.vector.location=4,m}function L(A,T){var m=s(A,T.pickShader.vertex,T.pickShader.fragment,null,T.pickShader.attributes);return m.attributes.position.location=0,m.attributes.id.location=1,m.attributes.vector.location=4,m}function w(A,T,m){var F=m.shaders;arguments.length===1&&(T=A,A=T.gl);var E=S(A,F),I=L(A,F),R=c(A,g(new Uint8Array([255,255,255,255]),[1,1,4]));R.generateMipmap(),R.minFilter=A.LINEAR_MIPMAP_LINEAR,R.magFilter=A.LINEAR;var B=l(A),O=l(A),V=l(A),j=l(A),q=l(A),U=u(A,[{buffer:B,type:A.FLOAT,size:4},{buffer:q,type:A.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:V,type:A.FLOAT,size:4},{buffer:j,type:A.FLOAT,size:2},{buffer:O,type:A.FLOAT,size:4}]),J=new _(A,R,E,I,B,O,q,V,j,U,m.traceType||"cone");return J.update(T),J}a.exports=w}),614:(function(a,i,o){var s=o(3236),l=s([`precision highp float; +}`]);i.bg=function(_){return l(_,g,p,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935(a,i,o){"use strict";a.exports=C;var s=o(2762),l=o(8116),u=o(4359),c=o(1879).Q,f=window||process.global||{},v=f.__TEXT_CACHE||{};f.__TEXT_CACHE={};var g=3;function p(k,S,L,w){this.gl=k,this.shader=S,this.buffer=L,this.vao=w,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var _=p.prototype,x=[0,0];_.bind=function(k,S,L,w){this.vao.bind(),this.shader.bind();var T=this.shader.uniforms;T.model=k,T.view=S,T.projection=L,T.pixelScale=w,x[0]=this.gl.drawingBufferWidth,x[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=x},_.unbind=function(){this.vao.unbind()},_.update=function(k,S,L,w,T){var A=[];function m(V,K,ee,ce,me,ye){var ue=[ee.style,ee.weight,ee.variant,ee.family].join("_"),J=v[ue];J||(J=v[ue]={});var _e=J[K];_e||(_e=J[K]=y(K,{triangles:!0,font:ee.family,fontStyle:ee.style,fontWeight:ee.weight,fontVariant:ee.variant,textAlign:"center",textBaseline:"middle",lineSpacing:me,styletags:ye}));for(var ne=(ce||12)/12,ae=_e.positions,pe=_e.cells,ie=0,le=pe.length;ie=0;--be){var De=ae[xe[be]];A.push(ne*De[0],-ne*De[1],V)}}for(var F=[0,0,0],E=[0,0,0],I=[0,0,0],R=[0,0,0],B=1.25,O={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},U=0;U<3;++U){I[U]=A.length/g|0,m(.5*(k[0][U]+k[1][U]),S[U],L[U],12,B,O),R[U]=(A.length/g|0)-I[U],F[U]=A.length/g|0;for(var j=0;j=0&&(g=f.length-v-1);var p=Math.pow(10,g),_=Math.round(u*c*p),x=_+"";if(x.indexOf("e")>=0)return x;var y=_/p,C=_%p;_<0?(y=-Math.ceil(y)|0,C=-C|0):(y=Math.floor(y)|0,C=C|0);var k=""+y;if(_<0&&(k="-"+k),g){for(var S=""+C;S.length=u[0][v];--_)g.push({x:_*c[v],text:o(c[v],_)});f.push(g)}return f}function l(u,c){for(var f=0;f<3;++f){if(u[f].length!==c[f].length)return!1;for(var v=0;vk)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return y.bufferSubData(C,w,L),k}function p(y,C){for(var k=s.malloc(y.length,C),S=y.length,L=0;L=0;--S){if(C[S]!==k)return!1;k*=y[S]}return!0}v.update=function(y,C){if(typeof C!="number"&&(C=-1),this.bind(),typeof y=="object"&&typeof y.shape!="undefined"){var k=y.dtype;if(c.indexOf(k)<0&&(k="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var S=gl.getExtension("OES_element_index_uint");S&&k!=="uint16"?k="uint32":k="uint16"}if(k===y.dtype&&_(y.shape,y.stride))y.offset===0&&y.data.length===y.shape[0]?this.length=g(this.gl,this.type,this.length,this.usage,y.data,C):this.length=g(this.gl,this.type,this.length,this.usage,y.data.subarray(y.offset,y.shape[0]),C);else{var L=s.malloc(y.size,k),w=u(L,y.shape);l.assign(w,y),C<0?this.length=g(this.gl,this.type,this.length,this.usage,L,C):this.length=g(this.gl,this.type,this.length,this.usage,L.subarray(0,y.size),C),s.free(L)}}else if(Array.isArray(y)){var T;this.type===this.gl.ELEMENT_ARRAY_BUFFER?T=p(y,"uint16"):T=p(y,"float32"),C<0?this.length=g(this.gl,this.type,this.length,this.usage,T,C):this.length=g(this.gl,this.type,this.length,this.usage,T.subarray(0,y.length),C),s.free(T)}else if(typeof y=="object"&&typeof y.length=="number")this.length=g(this.gl,this.type,this.length,this.usage,y,C);else if(typeof y=="number"||y===void 0){if(C>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");y=y|0,y<=0&&(y=1),this.gl.bufferData(this.type,y|0,this.usage),this.length=y}else throw new Error("gl-buffer: Invalid data type")};function x(y,C,k,S){if(k=k||y.ARRAY_BUFFER,S=S||y.DYNAMIC_DRAW,k!==y.ARRAY_BUFFER&&k!==y.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(S!==y.DYNAMIC_DRAW&&S!==y.STATIC_DRAW&&S!==y.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var L=y.createBuffer(),w=new f(y,k,L,0,S);return w.update(C),w}a.exports=x},6405(a,i,o){"use strict";var s=o(2931);a.exports=function(u,c){var f=u.positions,v=u.vectors,g={positions:[],vertexIntensity:[],vertexIntensityBounds:u.vertexIntensityBounds,vectors:[],cells:[],coneOffset:u.coneOffset,colormap:u.colormap};if(u.positions.length===0)return c&&(c[0]=[0,0,0],c[1]=[0,0,0]),g;for(var p=0,_=1/0,x=-1/0,y=1/0,C=-1/0,k=1/0,S=-1/0,L=null,w=null,T=[],A=1/0,m=!1,F=u.coneSizemode==="raw",E=0;Ep&&(p=s.length(R)),E&&!F){var B=2*s.distance(L,I)/(s.length(w)+s.length(R));B?(A=Math.min(A,B),m=!1):m=!0}m||(L=I,w=R),T.push(R)}var O=[_,y,k],U=[x,C,S];c&&(c[0]=O,c[1]=U),p===0&&(p=1);var j=1/p;isFinite(A)||(A=1),g.vectorScale=A;var q=u.coneSize||(F?1:.5);u.absoluteConeSize&&(q=u.absoluteConeSize*j),g.coneScale=q;for(var E=0,V=0;E=1},y.isTransparent=function(){return this.opacity<1},y.pickSlots=1,y.setPickBase=function(T){this.pickId=T};function C(T){for(var A=p({colormap:T,nshades:256,format:"rgba"}),m=new Uint8Array(256*4),F=0;F<256;++F){for(var E=A[F],I=0;I<3;++I)m[4*F+I]=E[I];m[4*F+3]=E[3]*255}return g(m,[256,256,4],[4,0,1])}function k(T){for(var A=T.length,m=new Array(A),F=0;F0){var V=this.triShader;V.bind(),V.uniforms=B,this.triangleVAO.bind(),A.drawArrays(A.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},y.drawPick=function(T){T=T||{};for(var A=this.gl,m=T.model||_,F=T.view||_,E=T.projection||_,I=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],R=0;R<3;++R)I[0][R]=Math.max(I[0][R],this.clipBounds[0][R]),I[1][R]=Math.min(I[1][R],this.clipBounds[1][R]);this._model=[].slice.call(m),this._view=[].slice.call(F),this._projection=[].slice.call(E),this._resolution=[A.drawingBufferWidth,A.drawingBufferHeight];var B={model:m,view:F,projection:E,clipBounds:I,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},O=this.pickShader;O.bind(),O.uniforms=B,this.triangleCount>0&&(this.triangleVAO.bind(),A.drawArrays(A.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},y.pick=function(T){if(!T||T.id!==this.pickId)return null;var A=T.value[0]+256*T.value[1]+65536*T.value[2],m=this.cells[A],F=this.positions[m[1]].slice(0,3),E={position:F,dataCoordinate:F,index:Math.floor(m[1]/48)};return this.traceType==="cone"?E.index=Math.floor(m[1]/48):this.traceType==="streamtube"&&(E.intensity=this.intensity[m[1]],E.velocity=this.vectors[m[1]].slice(0,3),E.divergence=this.vectors[m[1]][3],E.index=A),E},y.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function S(T,A){var m=s(T,A.meshShader.vertex,A.meshShader.fragment,null,A.meshShader.attributes);return m.attributes.position.location=0,m.attributes.color.location=2,m.attributes.uv.location=3,m.attributes.vector.location=4,m}function L(T,A){var m=s(T,A.pickShader.vertex,A.pickShader.fragment,null,A.pickShader.attributes);return m.attributes.position.location=0,m.attributes.id.location=1,m.attributes.vector.location=4,m}function w(T,A,m){var F=m.shaders;arguments.length===1&&(A=T,T=A.gl);var E=S(T,F),I=L(T,F),R=c(T,g(new Uint8Array([255,255,255,255]),[1,1,4]));R.generateMipmap(),R.minFilter=T.LINEAR_MIPMAP_LINEAR,R.magFilter=T.LINEAR;var B=l(T),O=l(T),U=l(T),j=l(T),q=l(T),V=u(T,[{buffer:B,type:T.FLOAT,size:4},{buffer:q,type:T.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:U,type:T.FLOAT,size:4},{buffer:j,type:T.FLOAT,size:2},{buffer:O,type:T.FLOAT,size:4}]),K=new x(T,R,E,I,B,O,q,U,j,V,m.traceType||"cone");return K.update(A),K}a.exports=w},614(a,i,o){var s=o(3236),l=s([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -656,7 +656,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]);i.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},i.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}}),737:(function(a){a.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}}),5171:(function(a,i,o){var s=o(737);a.exports=function(u){return s[u]}}),9165:(function(a,i,o){"use strict";a.exports=_;var s=o(2762),l=o(8116),u=o(3436),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(y,C,k,S){this.gl=y,this.shader=S,this.buffer=C,this.vao=k,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var v=f.prototype;v.isOpaque=function(){return!this.hasAlpha},v.isTransparent=function(){return this.hasAlpha},v.drawTransparent=v.draw=function(y){var C=this.gl,k=this.shader.uniforms;this.shader.bind();var S=k.view=y.view||c,L=k.projection=y.projection||c;k.model=y.model||c,k.clipBounds=this.clipBounds,k.opacity=this.opacity;var w=S[12],A=S[13],T=S[14],m=S[15],F=y._ortho||!1,E=F?2:1,I=E*this.pixelRatio*(L[3]*w+L[7]*A+L[11]*T+L[15]*m)/C.drawingBufferHeight;this.vao.bind();for(var R=0;R<3;++R)C.lineWidth(this.lineWidth[R]*this.pixelRatio),k.capSize=this.capSize[R]*I,this.lineCount[R]&&C.drawArrays(C.LINES,this.lineOffset[R],this.lineCount[R]);this.vao.unbind()};function g(y,C){for(var k=0;k<3;++k)y[0][k]=Math.min(y[0][k],C[k]),y[1][k]=Math.max(y[1][k],C[k])}var p=(function(){for(var y=new Array(3),C=0;C<3;++C){for(var k=[],S=1;S<=2;++S)for(var L=-1;L<=1;L+=2){var w=(S+C)%3,A=[0,0,0];A[w]=L,k.push(A)}y[C]=k}return y})();function x(y,C,k,S){for(var L=p[S],w=0;w0){var B=F.slice();B[T]+=I[1][T],L.push(F[0],F[1],F[2],R[0],R[1],R[2],R[3],0,0,0,B[0],B[1],B[2],R[0],R[1],R[2],R[3],0,0,0),g(this.bounds,B),A+=2+x(L,B,R,T)}}}this.lineCount[T]=A-this.lineOffset[T]}this.buffer.update(L)}},v.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function _(y){var C=y.gl,k=s(C),S=l(C,[{buffer:k,type:C.FLOAT,size:3,offset:0,stride:40},{buffer:k,type:C.FLOAT,size:4,offset:12,stride:40},{buffer:k,type:C.FLOAT,size:3,offset:28,stride:40}]),L=u(C);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var w=new f(C,k,S,L);return w.update(y),w}}),3436:(function(a,i,o){"use strict";var s=o(3236),l=o(9405),u=s([`precision highp float; +}`]);i.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},i.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737(a){a.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171(a,i,o){var s=o(737);a.exports=function(u){return s[u]}},9165(a,i,o){"use strict";a.exports=x;var s=o(2762),l=o(8116),u=o(3436),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(y,C,k,S){this.gl=y,this.shader=S,this.buffer=C,this.vao=k,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var v=f.prototype;v.isOpaque=function(){return!this.hasAlpha},v.isTransparent=function(){return this.hasAlpha},v.drawTransparent=v.draw=function(y){var C=this.gl,k=this.shader.uniforms;this.shader.bind();var S=k.view=y.view||c,L=k.projection=y.projection||c;k.model=y.model||c,k.clipBounds=this.clipBounds,k.opacity=this.opacity;var w=S[12],T=S[13],A=S[14],m=S[15],F=y._ortho||!1,E=F?2:1,I=E*this.pixelRatio*(L[3]*w+L[7]*T+L[11]*A+L[15]*m)/C.drawingBufferHeight;this.vao.bind();for(var R=0;R<3;++R)C.lineWidth(this.lineWidth[R]*this.pixelRatio),k.capSize=this.capSize[R]*I,this.lineCount[R]&&C.drawArrays(C.LINES,this.lineOffset[R],this.lineCount[R]);this.vao.unbind()};function g(y,C){for(var k=0;k<3;++k)y[0][k]=Math.min(y[0][k],C[k]),y[1][k]=Math.max(y[1][k],C[k])}var p=(function(){for(var y=new Array(3),C=0;C<3;++C){for(var k=[],S=1;S<=2;++S)for(var L=-1;L<=1;L+=2){var w=(S+C)%3,T=[0,0,0];T[w]=L,k.push(T)}y[C]=k}return y})();function _(y,C,k,S){for(var L=p[S],w=0;w0){var B=F.slice();B[A]+=I[1][A],L.push(F[0],F[1],F[2],R[0],R[1],R[2],R[3],0,0,0,B[0],B[1],B[2],R[0],R[1],R[2],R[3],0,0,0),g(this.bounds,B),T+=2+_(L,B,R,A)}}}this.lineCount[A]=T-this.lineOffset[A]}this.buffer.update(L)}},v.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function x(y){var C=y.gl,k=s(C),S=l(C,[{buffer:k,type:C.FLOAT,size:3,offset:0,stride:40},{buffer:k,type:C.FLOAT,size:4,offset:12,stride:40},{buffer:k,type:C.FLOAT,size:3,offset:28,stride:40}]),L=u(C);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var w=new f(C,k,S,L);return w.update(y),w}},3436(a,i,o){"use strict";var s=o(3236),l=o(9405),u=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; @@ -707,13 +707,13 @@ void main() { ) discard; gl_FragColor = opacity * fragColor; -}`]);a.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}}),2260:(function(a,i,o){"use strict";var s=o(7766);a.exports=A;var l=null,u,c,f,v;function g(T){var m=T.getParameter(T.FRAMEBUFFER_BINDING),F=T.getParameter(T.RENDERBUFFER_BINDING),E=T.getParameter(T.TEXTURE_BINDING_2D);return[m,F,E]}function p(T,m){T.bindFramebuffer(T.FRAMEBUFFER,m[0]),T.bindRenderbuffer(T.RENDERBUFFER,m[1]),T.bindTexture(T.TEXTURE_2D,m[2])}function x(T,m){var F=T.getParameter(m.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(F+1);for(var E=0;E<=F;++E){for(var I=new Array(F),R=0;R1&&O.drawBuffersWEBGL(l[B]);var J=F.getExtension("WEBGL_depth_texture");J?V?T.depth=y(F,I,R,J.UNSIGNED_INT_24_8_WEBGL,F.DEPTH_STENCIL,F.DEPTH_STENCIL_ATTACHMENT):j&&(T.depth=y(F,I,R,F.UNSIGNED_SHORT,F.DEPTH_COMPONENT,F.DEPTH_ATTACHMENT)):j&&V?T._depth_rb=C(F,I,R,F.DEPTH_STENCIL,F.DEPTH_STENCIL_ATTACHMENT):j?T._depth_rb=C(F,I,R,F.DEPTH_COMPONENT16,F.DEPTH_ATTACHMENT):V&&(T._depth_rb=C(F,I,R,F.STENCIL_INDEX,F.STENCIL_ATTACHMENT));var ee=F.checkFramebufferStatus(F.FRAMEBUFFER);if(ee!==F.FRAMEBUFFER_COMPLETE){T._destroyed=!0,F.bindFramebuffer(F.FRAMEBUFFER,null),F.deleteFramebuffer(T.handle),T.handle=null,T.depth&&(T.depth.dispose(),T.depth=null),T._depth_rb&&(F.deleteRenderbuffer(T._depth_rb),T._depth_rb=null);for(var U=0;UI||F<0||F>I)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");T._shape[0]=m,T._shape[1]=F;for(var R=g(E),B=0;BR||F<0||F>R)throw new Error("gl-fbo: Parameters are too large for FBO");E=E||{};var B=1;if("color"in E){if(B=Math.max(E.color|0,0),B<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(B>1)if(I){if(B>T.getParameter(I.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+B+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var O=T.UNSIGNED_BYTE,V=T.getExtension("OES_texture_float");if(E.float&&B>0){if(!V)throw new Error("gl-fbo: Context does not support floating point textures");O=T.FLOAT}else E.preferFloat&&B>0&&V&&(O=T.FLOAT);var j=!0;"depth"in E&&(j=!!E.depth);var q=!1;return"stencil"in E&&(q=!!E.stencil),new S(T,m,F,O,B,j,q,I)}}),2992:(function(a,i,o){var s=o(3387).sprintf,l=o(5171),u=o(1848),c=o(1085);a.exports=f;function f(v,g,p){"use strict";var x=u(g)||"of unknown name (see npm glsl-shader-name)",_="unknown type";p!==void 0&&(_=p===l.FRAGMENT_SHADER?"fragment":"vertex");for(var y=s(`Error compiling %s shader %s: -`,_,x),C=s("%s%s",y,v),k=v.split(` -`),S={},L=0;L1&&O.drawBuffersWEBGL(l[B]);var K=F.getExtension("WEBGL_depth_texture");K?U?A.depth=y(F,I,R,K.UNSIGNED_INT_24_8_WEBGL,F.DEPTH_STENCIL,F.DEPTH_STENCIL_ATTACHMENT):j&&(A.depth=y(F,I,R,F.UNSIGNED_SHORT,F.DEPTH_COMPONENT,F.DEPTH_ATTACHMENT)):j&&U?A._depth_rb=C(F,I,R,F.DEPTH_STENCIL,F.DEPTH_STENCIL_ATTACHMENT):j?A._depth_rb=C(F,I,R,F.DEPTH_COMPONENT16,F.DEPTH_ATTACHMENT):U&&(A._depth_rb=C(F,I,R,F.STENCIL_INDEX,F.STENCIL_ATTACHMENT));var ee=F.checkFramebufferStatus(F.FRAMEBUFFER);if(ee!==F.FRAMEBUFFER_COMPLETE){A._destroyed=!0,F.bindFramebuffer(F.FRAMEBUFFER,null),F.deleteFramebuffer(A.handle),A.handle=null,A.depth&&(A.depth.dispose(),A.depth=null),A._depth_rb&&(F.deleteRenderbuffer(A._depth_rb),A._depth_rb=null);for(var V=0;VI||F<0||F>I)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");A._shape[0]=m,A._shape[1]=F;for(var R=g(E),B=0;BR||F<0||F>R)throw new Error("gl-fbo: Parameters are too large for FBO");E=E||{};var B=1;if("color"in E){if(B=Math.max(E.color|0,0),B<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(B>1)if(I){if(B>A.getParameter(I.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+B+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var O=A.UNSIGNED_BYTE,U=A.getExtension("OES_texture_float");if(E.float&&B>0){if(!U)throw new Error("gl-fbo: Context does not support floating point textures");O=A.FLOAT}else E.preferFloat&&B>0&&U&&(O=A.FLOAT);var j=!0;"depth"in E&&(j=!!E.depth);var q=!1;return"stencil"in E&&(q=!!E.stencil),new S(A,m,F,O,B,j,q,I)}},2992(a,i,o){var s=o(3387).sprintf,l=o(5171),u=o(1848),c=o(1085);a.exports=f;function f(v,g,p){"use strict";var _=u(g)||"of unknown name (see npm glsl-shader-name)",x="unknown type";p!==void 0&&(x=p===l.FRAGMENT_SHADER?"fragment":"vertex");for(var y=s(`Error compiling %s shader %s: +`,x,_),C=s("%s%s",y,v),k=v.split(` +`),S={},L=0;L0){for(var ue=0;ue<24;++ue)R.push(R[R.length-12]);j+=2,ce=!0}continue e}q[0][E]=Math.min(q[0][E],ye[E],xe[E]),q[1][E]=Math.max(q[1][E],ye[E],xe[E])}var K,_e;Array.isArray(J[0])?(K=J.length>F-1?J[F-1]:J.length>0?J[J.length-1]:[0,0,0,1],_e=J.length>F?J[F]:J.length>0?J[J.length-1]:[0,0,0,1]):K=_e=J,K.length===3&&(K=[K[0],K[1],K[2],1]),_e.length===3&&(_e=[_e[0],_e[1],_e[2],1]),!this.hasAlpha&&K[3]<1&&(this.hasAlpha=!0);var ne;Array.isArray(ee)?ne=ee.length>F-1?ee[F-1]:ee.length>0?ee[ee.length-1]:[0,0,0,1]:ne=ee;var ae=V;if(V+=k(ye,xe),ce){for(E=0;E<2;++E)R.push(ye[0],ye[1],ye[2],xe[0],xe[1],xe[2],ae,ne,K[0],K[1],K[2],K[3]);j+=2,ce=!1}R.push(ye[0],ye[1],ye[2],xe[0],xe[1],xe[2],ae,ne,K[0],K[1],K[2],K[3],ye[0],ye[1],ye[2],xe[0],xe[1],xe[2],ae,-ne,K[0],K[1],K[2],K[3],xe[0],xe[1],xe[2],ye[0],ye[1],ye[2],V,-ne,_e[0],_e[1],_e[2],_e[3],xe[0],xe[1],xe[2],ye[0],ye[1],ye[2],V,ne,_e[0],_e[1],_e[2],_e[3]),j+=4}}if(this.buffer.update(R),B.push(V),O.push(U[U.length-1].slice()),this.bounds=q,this.vertexCount=j,this.points=O,this.arcLength=B,"dashes"in m){var pe=m.dashes,ie=pe.slice();for(ie.unshift(0),F=1;F1.0001)return null;E+=F[L]}return Math.abs(E-1)>.001?null:[w,v(p,F),F]}}),840:(function(a,i,o){var s=o(3236),l=s([`precision highp float; +}`]),v=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];i.createShader=function(g){return l(g,u,c,null,v)},i.createPickShader=function(g){return l(g,u,f,null,v)}},5714(a,i,o){"use strict";a.exports=A;var s=o(2762),l=o(8116),u=o(7766),c=new Uint8Array(4),f=new Float32Array(c.buffer);function v(m,F,E,I){return c[0]=I,c[1]=E,c[2]=F,c[3]=m,f[0]}var g=o(2478),p=o(9618),_=o(7319),x=_.createShader,y=_.createPickShader,C=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(m,F){for(var E=0,I=0;I<3;++I){var R=m[I]-F[I];E+=R*R}return Math.sqrt(E)}function S(m){for(var F=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],E=0;E<3;++E)F[0][E]=Math.max(m[0][E],F[0][E]),F[1][E]=Math.min(m[1][E],F[1][E]);return F}function L(m,F,E,I){this.arcLength=m,this.position=F,this.index=E,this.dataCoordinate=I}function w(m,F,E,I,R,B){this.gl=m,this.shader=F,this.pickShader=E,this.buffer=I,this.vao=R,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=B,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var T=w.prototype;T.isTransparent=function(){return this.hasAlpha},T.isOpaque=function(){return!this.hasAlpha},T.pickSlots=1,T.setPickBase=function(m){this.pickId=m},T.drawTransparent=T.draw=function(m){if(this.vertexCount){var F=this.gl,E=this.shader,I=this.vao;E.bind(),E.uniforms={model:m.model||C,view:m.view||C,projection:m.projection||C,clipBounds:S(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[F.drawingBufferWidth,F.drawingBufferHeight],pixelRatio:this.pixelRatio},I.bind(),I.draw(F.TRIANGLE_STRIP,this.vertexCount),I.unbind()}},T.drawPick=function(m){if(this.vertexCount){var F=this.gl,E=this.pickShader,I=this.vao;E.bind(),E.uniforms={model:m.model||C,view:m.view||C,projection:m.projection||C,pickId:this.pickId,clipBounds:S(this.clipBounds),screenShape:[F.drawingBufferWidth,F.drawingBufferHeight],pixelRatio:this.pixelRatio},I.bind(),I.draw(F.TRIANGLE_STRIP,this.vertexCount),I.unbind()}},T.update=function(m){var F,E;this.dirty=!0;var I=!!m.connectGaps;"dashScale"in m&&(this.dashScale=m.dashScale),this.hasAlpha=!1,"opacity"in m&&(this.opacity=+m.opacity,this.opacity<1&&(this.hasAlpha=!0));var R=[],B=[],O=[],U=0,j=0,q=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],V=m.position||m.positions;if(V){var K=m.color||m.colors||[0,0,0,1],ee=m.lineWidth||1,ce=!1;e:for(F=1;F0){for(var ue=0;ue<24;++ue)R.push(R[R.length-12]);j+=2,ce=!0}continue e}q[0][E]=Math.min(q[0][E],me[E],ye[E]),q[1][E]=Math.max(q[1][E],me[E],ye[E])}var J,_e;Array.isArray(K[0])?(J=K.length>F-1?K[F-1]:K.length>0?K[K.length-1]:[0,0,0,1],_e=K.length>F?K[F]:K.length>0?K[K.length-1]:[0,0,0,1]):J=_e=K,J.length===3&&(J=[J[0],J[1],J[2],1]),_e.length===3&&(_e=[_e[0],_e[1],_e[2],1]),!this.hasAlpha&&J[3]<1&&(this.hasAlpha=!0);var ne;Array.isArray(ee)?ne=ee.length>F-1?ee[F-1]:ee.length>0?ee[ee.length-1]:[0,0,0,1]:ne=ee;var ae=U;if(U+=k(me,ye),ce){for(E=0;E<2;++E)R.push(me[0],me[1],me[2],ye[0],ye[1],ye[2],ae,ne,J[0],J[1],J[2],J[3]);j+=2,ce=!1}R.push(me[0],me[1],me[2],ye[0],ye[1],ye[2],ae,ne,J[0],J[1],J[2],J[3],me[0],me[1],me[2],ye[0],ye[1],ye[2],ae,-ne,J[0],J[1],J[2],J[3],ye[0],ye[1],ye[2],me[0],me[1],me[2],U,-ne,_e[0],_e[1],_e[2],_e[3],ye[0],ye[1],ye[2],me[0],me[1],me[2],U,ne,_e[0],_e[1],_e[2],_e[3]),j+=4}}if(this.buffer.update(R),B.push(U),O.push(V[V.length-1].slice()),this.bounds=q,this.vertexCount=j,this.points=O,this.arcLength=B,"dashes"in m){var pe=m.dashes,ie=pe.slice();for(ie.unshift(0),F=1;F1.0001)return null;E+=F[L]}return Math.abs(E-1)>.001?null:[w,v(p,F),F]}},840(a,i,o){var s=o(3236),l=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; @@ -1146,7 +1146,7 @@ void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_id = id; f_position = position; -}`]),x=s([`precision highp float; +}`]),_=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1179,7 +1179,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]),_=s([`precision highp float; +}`]),x=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1239,7 +1239,7 @@ uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } -`]);i.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},i.wireShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},i.pointShader={vertex:v,fragment:g,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},i.pickShader={vertex:p,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},i.pointPickShader={vertex:_,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},i.contourShader={vertex:y,fragment:C,attributes:[{name:"position",type:"vec3"}]}}),7201:(function(a,i,o){"use strict";var s=1e-6,l=1e-6,u=o(9405),c=o(2762),f=o(8116),v=o(7766),g=o(8406),p=o(6760),x=o(7608),_=o(9618),y=o(6729),C=o(7765),k=o(1888),S=o(840),L=o(7626),w=S.meshShader,A=S.wireShader,T=S.pointShader,m=S.pickShader,F=S.pointPickShader,E=S.contourShader,I=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function R(ue,K,_e,ne,ae,pe,ie,le,me,be,De,Ge,ht,it,Oe,ze,ct,et,qe,we,Le,Ke,Te,Ve,$e,ot,tt){this.gl=ue,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=K,this.dirty=!0,this.triShader=_e,this.lineShader=ne,this.pointShader=ae,this.pickShader=pe,this.pointPickShader=ie,this.contourShader=le,this.trianglePositions=me,this.triangleColors=De,this.triangleNormals=ht,this.triangleUVs=Ge,this.triangleIds=be,this.triangleVAO=it,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Oe,this.edgeColors=ct,this.edgeUVs=et,this.edgeIds=ze,this.edgeVAO=qe,this.edgeCount=0,this.pointPositions=we,this.pointColors=Ke,this.pointUVs=Te,this.pointSizes=Ve,this.pointIds=Le,this.pointVAO=$e,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=ot,this.contourVAO=tt,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=I,this._view=I,this._projection=I,this._resolution=[1,1]}var B=R.prototype;B.isOpaque=function(){return!this.hasAlpha},B.isTransparent=function(){return this.hasAlpha},B.pickSlots=1,B.setPickBase=function(ue){this.pickId=ue};function O(ue,K){if(!K||!K.length)return 1;for(var _e=0;_eue&&_e>0){var ne=(K[_e][0]-ue)/(K[_e][0]-K[_e-1][0]);return K[_e][1]*(1-ne)+ne*K[_e-1][1]}}return 1}function V(ue,K){for(var _e=y({colormap:ue,nshades:256,format:"rgba"}),ne=new Uint8Array(256*4),ae=0;ae<256;++ae){for(var pe=_e[ae],ie=0;ie<3;++ie)ne[4*ae+ie]=pe[ie];K?ne[4*ae+3]=255*O(ae/255,K):ne[4*ae+3]=255*pe[3]}return _(ne,[256,256,4],[4,0,1])}function j(ue){for(var K=ue.length,_e=new Array(K),ne=0;ne0){var ht=this.triShader;ht.bind(),ht.uniforms=le,this.triangleVAO.bind(),K.drawArrays(K.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var ht=this.lineShader;ht.bind(),ht.uniforms=le,this.edgeVAO.bind(),K.lineWidth(this.lineWidth*this.pixelRatio),K.drawArrays(K.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var ht=this.pointShader;ht.bind(),ht.uniforms=le,this.pointVAO.bind(),K.drawArrays(K.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var ht=this.contourShader;ht.bind(),ht.uniforms=le,this.contourVAO.bind(),K.drawArrays(K.LINES,0,this.contourCount),this.contourVAO.unbind()}},B.drawPick=function(ue){ue=ue||{};for(var K=this.gl,_e=ue.model||I,ne=ue.view||I,ae=ue.projection||I,pe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],ie=0;ie<3;++ie)pe[0][ie]=Math.max(pe[0][ie],this.clipBounds[0][ie]),pe[1][ie]=Math.min(pe[1][ie],this.clipBounds[1][ie]);this._model=[].slice.call(_e),this._view=[].slice.call(ne),this._projection=[].slice.call(ae),this._resolution=[K.drawingBufferWidth,K.drawingBufferHeight];var le={model:_e,view:ne,projection:ae,clipBounds:pe,pickId:this.pickId/255},me=this.pickShader;if(me.bind(),me.uniforms=le,this.triangleCount>0&&(this.triangleVAO.bind(),K.drawArrays(K.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),K.lineWidth(this.lineWidth*this.pixelRatio),K.drawArrays(K.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var me=this.pointPickShader;me.bind(),me.uniforms=le,this.pointVAO.bind(),K.drawArrays(K.POINTS,0,this.pointCount),this.pointVAO.unbind()}},B.pick=function(ue){if(!ue||ue.id!==this.pickId)return null;for(var K=ue.value[0]+256*ue.value[1]+65536*ue.value[2],_e=this.cells[K],ne=this.positions,ae=new Array(_e.length),pe=0;pe<_e.length;++pe)ae[pe]=ne[_e[pe]];var ie=ue.coord[0],le=ue.coord[1];if(!this.pickVertex){var me=this.positions[_e[0]],be=this.positions[_e[1]],De=this.positions[_e[2]],Ge=[(me[0]+be[0]+De[0])/3,(me[1]+be[1]+De[1])/3,(me[2]+be[2]+De[2])/3];return{_cellCenter:!0,position:[ie,le],index:K,cell:_e,cellId:K,intensity:this.intensity[K],dataCoordinate:Ge}}var ht=L(ae,[ie*this.pixelRatio,this._resolution[1]-le*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!ht)return null;for(var it=ht[2],Oe=0,pe=0;pe<_e.length;++pe)Oe+=it[pe]*this.intensity[_e[pe]];return{position:ht[1],index:_e[ht[0]],cell:_e,cellId:K,intensity:Oe,dataCoordinate:this.positions[_e[ht[0]]]}},B.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()};function q(ue){var K=u(ue,w.vertex,w.fragment);return K.attributes.position.location=0,K.attributes.color.location=2,K.attributes.uv.location=3,K.attributes.normal.location=4,K}function U(ue){var K=u(ue,A.vertex,A.fragment);return K.attributes.position.location=0,K.attributes.color.location=2,K.attributes.uv.location=3,K}function J(ue){var K=u(ue,T.vertex,T.fragment);return K.attributes.position.location=0,K.attributes.color.location=2,K.attributes.uv.location=3,K.attributes.pointSize.location=4,K}function ee(ue){var K=u(ue,m.vertex,m.fragment);return K.attributes.position.location=0,K.attributes.id.location=1,K}function ce(ue){var K=u(ue,F.vertex,F.fragment);return K.attributes.position.location=0,K.attributes.id.location=1,K.attributes.pointSize.location=4,K}function ye(ue){var K=u(ue,E.vertex,E.fragment);return K.attributes.position.location=0,K}function xe(ue,K){arguments.length===1&&(K=ue,ue=K.gl);var _e=ue.getExtension("OES_standard_derivatives")||ue.getExtension("MOZ_OES_standard_derivatives")||ue.getExtension("WEBKIT_OES_standard_derivatives");if(!_e)throw new Error("derivatives not supported");var ne=q(ue),ae=U(ue),pe=J(ue),ie=ee(ue),le=ce(ue),me=ye(ue),be=v(ue,_(new Uint8Array([255,255,255,255]),[1,1,4]));be.generateMipmap(),be.minFilter=ue.LINEAR_MIPMAP_LINEAR,be.magFilter=ue.LINEAR;var De=c(ue),Ge=c(ue),ht=c(ue),it=c(ue),Oe=c(ue),ze=f(ue,[{buffer:De,type:ue.FLOAT,size:3},{buffer:Oe,type:ue.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Ge,type:ue.FLOAT,size:4},{buffer:ht,type:ue.FLOAT,size:2},{buffer:it,type:ue.FLOAT,size:3}]),ct=c(ue),et=c(ue),qe=c(ue),we=c(ue),Le=f(ue,[{buffer:ct,type:ue.FLOAT,size:3},{buffer:we,type:ue.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:et,type:ue.FLOAT,size:4},{buffer:qe,type:ue.FLOAT,size:2}]),Ke=c(ue),Te=c(ue),Ve=c(ue),$e=c(ue),ot=c(ue),tt=f(ue,[{buffer:Ke,type:ue.FLOAT,size:3},{buffer:ot,type:ue.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Te,type:ue.FLOAT,size:4},{buffer:Ve,type:ue.FLOAT,size:2},{buffer:$e,type:ue.FLOAT,size:1}]),nt=c(ue),We=f(ue,[{buffer:nt,type:ue.FLOAT,size:3}]),mt=new R(ue,be,ne,ae,pe,ie,le,me,De,Oe,Ge,ht,it,ze,ct,we,et,qe,Le,Ke,ot,Te,Ve,$e,tt,nt,We);return mt.update(K),mt}a.exports=xe}),4437:(function(a,i,o){"use strict";a.exports=g;var s=o(3025),l=o(6296),u=o(351),c=o(8512),f=o(24),v=o(7520);function g(p,x){p=p||document.body,x=x||{};var _=[.01,1/0];"distanceLimits"in x&&(_[0]=x.distanceLimits[0],_[1]=x.distanceLimits[1]),"zoomMin"in x&&(_[0]=x.zoomMin),"zoomMax"in x&&(_[1]=x.zoomMax);var y=l({center:x.center||[0,0,0],up:x.up||[0,1,0],eye:x.eye||[0,0,10],mode:x.mode||"orbit",distanceLimits:_}),C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],k=0,S=p.clientWidth,L=p.clientHeight,w={keyBindingMode:"rotate",enableWheel:!0,view:y,element:p,delay:x.delay||16,rotateSpeed:x.rotateSpeed||1,zoomSpeed:x.zoomSpeed||1,translateSpeed:x.translateSpeed||1,flipX:!!x.flipX,flipY:!!x.flipY,modes:y.modes,_ortho:x._ortho||x.projection&&x.projection.type==="orthographic"||!1,tick:function(){var A=s(),T=this.delay,m=A-2*T;y.idle(A-T),y.recalcMatrix(m),y.flush(A-(100+T*2));for(var F=!0,E=y.computedMatrix,I=0;I<16;++I)F=F&&C[I]===E[I],C[I]=E[I];var R=p.clientWidth===S&&p.clientHeight===L;return S=p.clientWidth,L=p.clientHeight,F?!R:(k=Math.exp(y.computedRadius[0]),!0)},lookAt:function(A,T,m){y.lookAt(y.lastT(),A,T,m)},rotate:function(A,T,m){y.rotate(y.lastT(),A,T,m)},pan:function(A,T,m){y.pan(y.lastT(),A,T,m)},translate:function(A,T,m){y.translate(y.lastT(),A,T,m)}};return Object.defineProperties(w,{matrix:{get:function(){return y.computedMatrix},set:function(A){return y.setMatrix(y.lastT(),A),y.computedMatrix},enumerable:!0},mode:{get:function(){return y.getMode()},set:function(A){var T=y.computedUp.slice(),m=y.computedEye.slice(),F=y.computedCenter.slice();if(y.setMode(A),A==="turntable"){var E=s();y._active.lookAt(E,m,F,T),y._active.lookAt(E+500,m,F,[0,0,1]),y._active.flush(E)}return y.getMode()},enumerable:!0},center:{get:function(){return y.computedCenter},set:function(A){return y.lookAt(y.lastT(),null,A),y.computedCenter},enumerable:!0},eye:{get:function(){return y.computedEye},set:function(A){return y.lookAt(y.lastT(),A),y.computedEye},enumerable:!0},up:{get:function(){return y.computedUp},set:function(A){return y.lookAt(y.lastT(),null,null,A),y.computedUp},enumerable:!0},distance:{get:function(){return k},set:function(A){return y.setDistance(y.lastT(),A),A},enumerable:!0},distanceLimits:{get:function(){return y.getDistanceLimits(_)},set:function(A){return y.setDistanceLimits(A),A},enumerable:!0}}),p.addEventListener("contextmenu",function(A){return A.preventDefault(),!1}),w._lastX=-1,w._lastY=-1,w._lastMods={shift:!1,control:!1,alt:!1,meta:!1},w.enableMouseListeners=function(){w.mouseListener=u(p,A),p.addEventListener("touchstart",function(T){var m=f(T.changedTouches[0],p);A(0,m[0],m[1],w._lastMods),A(1,m[0],m[1],w._lastMods)},v?{passive:!0}:!1),p.addEventListener("touchmove",function(T){var m=f(T.changedTouches[0],p);A(1,m[0],m[1],w._lastMods),T.preventDefault()},v?{passive:!1}:!1),p.addEventListener("touchend",function(T){A(0,w._lastX,w._lastY,w._lastMods)},v?{passive:!0}:!1);function A(T,m,F,E){var I=w.keyBindingMode;if(I!==!1){var R=I==="rotate",B=I==="pan",O=I==="zoom",V=!!E.control,j=!!E.alt,q=!!E.shift,U=!!(T&1),J=!!(T&2),ee=!!(T&4),ce=1/p.clientHeight,ye=ce*(m-w._lastX),xe=ce*(F-w._lastY),ue=w.flipX?1:-1,K=w.flipY?1:-1,_e=Math.PI*w.rotateSpeed,ne=s();if(w._lastX!==-1&&w._lastY!==-1&&((R&&U&&!V&&!j&&!q||U&&!V&&!j&&q)&&y.rotate(ne,ue*_e*ye,-K*_e*xe,0),(B&&U&&!V&&!j&&!q||J||U&&V&&!j&&!q)&&y.pan(ne,-w.translateSpeed*ye*k,w.translateSpeed*xe*k,0),O&&U&&!V&&!j&&!q||ee||U&&!V&&j&&!q)){var ae=-w.zoomSpeed*xe/window.innerHeight*(ne-y.lastT())*100;y.pan(ne,0,0,k*(Math.exp(ae)-1))}return w._lastX=m,w._lastY=F,w._lastMods=E,!0}}w.wheelListener=c(p,function(T,m){if(w.keyBindingMode!==!1&&w.enableWheel){var F=w.flipX?1:-1,E=w.flipY?1:-1,I=s();if(Math.abs(T)>Math.abs(m))y.rotate(I,0,0,-T*F*Math.PI*w.rotateSpeed/window.innerWidth);else if(!w._ortho){var R=-w.zoomSpeed*E*m/window.innerHeight*(I-y.lastT())/20;y.pan(I,0,0,k*(Math.exp(R)-1))}}},!0)},w.enableMouseListeners(),w}}),799:(function(a,i,o){var s=o(3236),l=o(9405),u=s([`precision mediump float; +`]);i.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},i.wireShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},i.pointShader={vertex:v,fragment:g,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},i.pickShader={vertex:p,fragment:_,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},i.pointPickShader={vertex:x,fragment:_,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},i.contourShader={vertex:y,fragment:C,attributes:[{name:"position",type:"vec3"}]}},7201(a,i,o){"use strict";var s=1e-6,l=1e-6,u=o(9405),c=o(2762),f=o(8116),v=o(7766),g=o(8406),p=o(6760),_=o(7608),x=o(9618),y=o(6729),C=o(7765),k=o(1888),S=o(840),L=o(7626),w=S.meshShader,T=S.wireShader,A=S.pointShader,m=S.pickShader,F=S.pointPickShader,E=S.contourShader,I=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function R(ue,J,_e,ne,ae,pe,ie,le,xe,be,De,Ge,pt,tt,Oe,ze,ut,et,qe,we,Le,Ke,Te,Ve,$e,ot,rt){this.gl=ue,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=J,this.dirty=!0,this.triShader=_e,this.lineShader=ne,this.pointShader=ae,this.pickShader=pe,this.pointPickShader=ie,this.contourShader=le,this.trianglePositions=xe,this.triangleColors=De,this.triangleNormals=pt,this.triangleUVs=Ge,this.triangleIds=be,this.triangleVAO=tt,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Oe,this.edgeColors=ut,this.edgeUVs=et,this.edgeIds=ze,this.edgeVAO=qe,this.edgeCount=0,this.pointPositions=we,this.pointColors=Ke,this.pointUVs=Te,this.pointSizes=Ve,this.pointIds=Le,this.pointVAO=$e,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=ot,this.contourVAO=rt,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=I,this._view=I,this._projection=I,this._resolution=[1,1]}var B=R.prototype;B.isOpaque=function(){return!this.hasAlpha},B.isTransparent=function(){return this.hasAlpha},B.pickSlots=1,B.setPickBase=function(ue){this.pickId=ue};function O(ue,J){if(!J||!J.length)return 1;for(var _e=0;_eue&&_e>0){var ne=(J[_e][0]-ue)/(J[_e][0]-J[_e-1][0]);return J[_e][1]*(1-ne)+ne*J[_e-1][1]}}return 1}function U(ue,J){for(var _e=y({colormap:ue,nshades:256,format:"rgba"}),ne=new Uint8Array(256*4),ae=0;ae<256;++ae){for(var pe=_e[ae],ie=0;ie<3;++ie)ne[4*ae+ie]=pe[ie];J?ne[4*ae+3]=255*O(ae/255,J):ne[4*ae+3]=255*pe[3]}return x(ne,[256,256,4],[4,0,1])}function j(ue){for(var J=ue.length,_e=new Array(J),ne=0;ne0){var pt=this.triShader;pt.bind(),pt.uniforms=le,this.triangleVAO.bind(),J.drawArrays(J.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var pt=this.lineShader;pt.bind(),pt.uniforms=le,this.edgeVAO.bind(),J.lineWidth(this.lineWidth*this.pixelRatio),J.drawArrays(J.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var pt=this.pointShader;pt.bind(),pt.uniforms=le,this.pointVAO.bind(),J.drawArrays(J.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var pt=this.contourShader;pt.bind(),pt.uniforms=le,this.contourVAO.bind(),J.drawArrays(J.LINES,0,this.contourCount),this.contourVAO.unbind()}},B.drawPick=function(ue){ue=ue||{};for(var J=this.gl,_e=ue.model||I,ne=ue.view||I,ae=ue.projection||I,pe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],ie=0;ie<3;++ie)pe[0][ie]=Math.max(pe[0][ie],this.clipBounds[0][ie]),pe[1][ie]=Math.min(pe[1][ie],this.clipBounds[1][ie]);this._model=[].slice.call(_e),this._view=[].slice.call(ne),this._projection=[].slice.call(ae),this._resolution=[J.drawingBufferWidth,J.drawingBufferHeight];var le={model:_e,view:ne,projection:ae,clipBounds:pe,pickId:this.pickId/255},xe=this.pickShader;if(xe.bind(),xe.uniforms=le,this.triangleCount>0&&(this.triangleVAO.bind(),J.drawArrays(J.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),J.lineWidth(this.lineWidth*this.pixelRatio),J.drawArrays(J.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var xe=this.pointPickShader;xe.bind(),xe.uniforms=le,this.pointVAO.bind(),J.drawArrays(J.POINTS,0,this.pointCount),this.pointVAO.unbind()}},B.pick=function(ue){if(!ue||ue.id!==this.pickId)return null;for(var J=ue.value[0]+256*ue.value[1]+65536*ue.value[2],_e=this.cells[J],ne=this.positions,ae=new Array(_e.length),pe=0;pe<_e.length;++pe)ae[pe]=ne[_e[pe]];var ie=ue.coord[0],le=ue.coord[1];if(!this.pickVertex){var xe=this.positions[_e[0]],be=this.positions[_e[1]],De=this.positions[_e[2]],Ge=[(xe[0]+be[0]+De[0])/3,(xe[1]+be[1]+De[1])/3,(xe[2]+be[2]+De[2])/3];return{_cellCenter:!0,position:[ie,le],index:J,cell:_e,cellId:J,intensity:this.intensity[J],dataCoordinate:Ge}}var pt=L(ae,[ie*this.pixelRatio,this._resolution[1]-le*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!pt)return null;for(var tt=pt[2],Oe=0,pe=0;pe<_e.length;++pe)Oe+=tt[pe]*this.intensity[_e[pe]];return{position:pt[1],index:_e[pt[0]],cell:_e,cellId:J,intensity:Oe,dataCoordinate:this.positions[_e[pt[0]]]}},B.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()};function q(ue){var J=u(ue,w.vertex,w.fragment);return J.attributes.position.location=0,J.attributes.color.location=2,J.attributes.uv.location=3,J.attributes.normal.location=4,J}function V(ue){var J=u(ue,T.vertex,T.fragment);return J.attributes.position.location=0,J.attributes.color.location=2,J.attributes.uv.location=3,J}function K(ue){var J=u(ue,A.vertex,A.fragment);return J.attributes.position.location=0,J.attributes.color.location=2,J.attributes.uv.location=3,J.attributes.pointSize.location=4,J}function ee(ue){var J=u(ue,m.vertex,m.fragment);return J.attributes.position.location=0,J.attributes.id.location=1,J}function ce(ue){var J=u(ue,F.vertex,F.fragment);return J.attributes.position.location=0,J.attributes.id.location=1,J.attributes.pointSize.location=4,J}function me(ue){var J=u(ue,E.vertex,E.fragment);return J.attributes.position.location=0,J}function ye(ue,J){arguments.length===1&&(J=ue,ue=J.gl);var _e=ue.getExtension("OES_standard_derivatives")||ue.getExtension("MOZ_OES_standard_derivatives")||ue.getExtension("WEBKIT_OES_standard_derivatives");if(!_e)throw new Error("derivatives not supported");var ne=q(ue),ae=V(ue),pe=K(ue),ie=ee(ue),le=ce(ue),xe=me(ue),be=v(ue,x(new Uint8Array([255,255,255,255]),[1,1,4]));be.generateMipmap(),be.minFilter=ue.LINEAR_MIPMAP_LINEAR,be.magFilter=ue.LINEAR;var De=c(ue),Ge=c(ue),pt=c(ue),tt=c(ue),Oe=c(ue),ze=f(ue,[{buffer:De,type:ue.FLOAT,size:3},{buffer:Oe,type:ue.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Ge,type:ue.FLOAT,size:4},{buffer:pt,type:ue.FLOAT,size:2},{buffer:tt,type:ue.FLOAT,size:3}]),ut=c(ue),et=c(ue),qe=c(ue),we=c(ue),Le=f(ue,[{buffer:ut,type:ue.FLOAT,size:3},{buffer:we,type:ue.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:et,type:ue.FLOAT,size:4},{buffer:qe,type:ue.FLOAT,size:2}]),Ke=c(ue),Te=c(ue),Ve=c(ue),$e=c(ue),ot=c(ue),rt=f(ue,[{buffer:Ke,type:ue.FLOAT,size:3},{buffer:ot,type:ue.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Te,type:ue.FLOAT,size:4},{buffer:Ve,type:ue.FLOAT,size:2},{buffer:$e,type:ue.FLOAT,size:1}]),it=c(ue),We=f(ue,[{buffer:it,type:ue.FLOAT,size:3}]),mt=new R(ue,be,ne,ae,pe,ie,le,xe,De,Oe,Ge,pt,tt,ze,ut,we,et,qe,Le,Ke,ot,Te,Ve,$e,rt,it,We);return mt.update(J),mt}a.exports=ye},4437(a,i,o){"use strict";a.exports=g;var s=o(3025),l=o(6296),u=o(351),c=o(8512),f=o(24),v=o(7520);function g(p,_){p=p||document.body,_=_||{};var x=[.01,1/0];"distanceLimits"in _&&(x[0]=_.distanceLimits[0],x[1]=_.distanceLimits[1]),"zoomMin"in _&&(x[0]=_.zoomMin),"zoomMax"in _&&(x[1]=_.zoomMax);var y=l({center:_.center||[0,0,0],up:_.up||[0,1,0],eye:_.eye||[0,0,10],mode:_.mode||"orbit",distanceLimits:x}),C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],k=0,S=p.clientWidth,L=p.clientHeight,w={keyBindingMode:"rotate",enableWheel:!0,view:y,element:p,delay:_.delay||16,rotateSpeed:_.rotateSpeed||1,zoomSpeed:_.zoomSpeed||1,translateSpeed:_.translateSpeed||1,flipX:!!_.flipX,flipY:!!_.flipY,modes:y.modes,_ortho:_._ortho||_.projection&&_.projection.type==="orthographic"||!1,tick:function(){var T=s(),A=this.delay,m=T-2*A;y.idle(T-A),y.recalcMatrix(m),y.flush(T-(100+A*2));for(var F=!0,E=y.computedMatrix,I=0;I<16;++I)F=F&&C[I]===E[I],C[I]=E[I];var R=p.clientWidth===S&&p.clientHeight===L;return S=p.clientWidth,L=p.clientHeight,F?!R:(k=Math.exp(y.computedRadius[0]),!0)},lookAt:function(T,A,m){y.lookAt(y.lastT(),T,A,m)},rotate:function(T,A,m){y.rotate(y.lastT(),T,A,m)},pan:function(T,A,m){y.pan(y.lastT(),T,A,m)},translate:function(T,A,m){y.translate(y.lastT(),T,A,m)}};return Object.defineProperties(w,{matrix:{get:function(){return y.computedMatrix},set:function(T){return y.setMatrix(y.lastT(),T),y.computedMatrix},enumerable:!0},mode:{get:function(){return y.getMode()},set:function(T){var A=y.computedUp.slice(),m=y.computedEye.slice(),F=y.computedCenter.slice();if(y.setMode(T),T==="turntable"){var E=s();y._active.lookAt(E,m,F,A),y._active.lookAt(E+500,m,F,[0,0,1]),y._active.flush(E)}return y.getMode()},enumerable:!0},center:{get:function(){return y.computedCenter},set:function(T){return y.lookAt(y.lastT(),null,T),y.computedCenter},enumerable:!0},eye:{get:function(){return y.computedEye},set:function(T){return y.lookAt(y.lastT(),T),y.computedEye},enumerable:!0},up:{get:function(){return y.computedUp},set:function(T){return y.lookAt(y.lastT(),null,null,T),y.computedUp},enumerable:!0},distance:{get:function(){return k},set:function(T){return y.setDistance(y.lastT(),T),T},enumerable:!0},distanceLimits:{get:function(){return y.getDistanceLimits(x)},set:function(T){return y.setDistanceLimits(T),T},enumerable:!0}}),p.addEventListener("contextmenu",function(T){return T.preventDefault(),!1}),w._lastX=-1,w._lastY=-1,w._lastMods={shift:!1,control:!1,alt:!1,meta:!1},w.enableMouseListeners=function(){w.mouseListener=u(p,T),p.addEventListener("touchstart",function(A){var m=f(A.changedTouches[0],p);T(0,m[0],m[1],w._lastMods),T(1,m[0],m[1],w._lastMods)},v?{passive:!0}:!1),p.addEventListener("touchmove",function(A){var m=f(A.changedTouches[0],p);T(1,m[0],m[1],w._lastMods),A.preventDefault()},v?{passive:!1}:!1),p.addEventListener("touchend",function(A){T(0,w._lastX,w._lastY,w._lastMods)},v?{passive:!0}:!1);function T(A,m,F,E){var I=w.keyBindingMode;if(I!==!1){var R=I==="rotate",B=I==="pan",O=I==="zoom",U=!!E.control,j=!!E.alt,q=!!E.shift,V=!!(A&1),K=!!(A&2),ee=!!(A&4),ce=1/p.clientHeight,me=ce*(m-w._lastX),ye=ce*(F-w._lastY),ue=w.flipX?1:-1,J=w.flipY?1:-1,_e=Math.PI*w.rotateSpeed,ne=s();if(w._lastX!==-1&&w._lastY!==-1&&((R&&V&&!U&&!j&&!q||V&&!U&&!j&&q)&&y.rotate(ne,ue*_e*me,-J*_e*ye,0),(B&&V&&!U&&!j&&!q||K||V&&U&&!j&&!q)&&y.pan(ne,-w.translateSpeed*me*k,w.translateSpeed*ye*k,0),O&&V&&!U&&!j&&!q||ee||V&&!U&&j&&!q)){var ae=-w.zoomSpeed*ye/window.innerHeight*(ne-y.lastT())*100;y.pan(ne,0,0,k*(Math.exp(ae)-1))}return w._lastX=m,w._lastY=F,w._lastMods=E,!0}}w.wheelListener=c(p,function(A,m){if(w.keyBindingMode!==!1&&w.enableWheel){var F=w.flipX?1:-1,E=w.flipY?1:-1,I=s();if(Math.abs(A)>Math.abs(m))y.rotate(I,0,0,-A*F*Math.PI*w.rotateSpeed/window.innerWidth);else if(!w._ortho){var R=-w.zoomSpeed*E*m/window.innerHeight*(I-y.lastT())/20;y.pan(I,0,0,k*(Math.exp(R)-1))}}},!0)},w.enableMouseListeners(),w}},799(a,i,o){var s=o(3236),l=o(9405),u=s([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; @@ -1255,7 +1255,7 @@ varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); -}`]);a.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec2"}])}}),4100:(function(a,i,o){"use strict";var s=o(4437),l=o(3837),u=o(5445),c=o(4449),f=o(3589),v=o(2260),g=o(7169),p=o(351),x=o(4772),_=o(4040),y=o(799),C=o(9216)({tablet:!0,featureDetect:!0});a.exports={createScene:A,createCamera:s};function k(){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 S(m,F){var E=null;try{E=m.getContext("webgl",F),E||(E=m.getContext("experimental-webgl",F))}catch(I){return null}return E}function L(m){var F=Math.round(Math.log(Math.abs(m))/Math.log(10));if(F<0){var E=Math.round(Math.pow(10,-F));return Math.ceil(m*E)/E}else if(F>0){var E=Math.round(Math.pow(10,F));return Math.ceil(m/E)*E}return Math.ceil(m)}function w(m){return typeof m=="boolean"?m:!0}function A(m){m=m||{},m.camera=m.camera||{};var F=m.canvas;if(!F)if(F=document.createElement("canvas"),m.container){var E=m.container;E.appendChild(F)}else document.body.appendChild(F);var I=m.gl;if(I||(m.glOptions&&(C=!!m.glOptions.preserveDrawingBuffer),I=S(F,m.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:C})),!I)throw new Error("webgl not supported");var R=m.bounds||[[-10,-10,-10],[10,10,10]],B=new k,O=v(I,I.drawingBufferWidth,I.drawingBufferHeight,{preferFloat:!C}),V=y(I),j=m.cameraObject&&m.cameraObject._ortho===!0||m.camera.projection&&m.camera.projection.type==="orthographic"||!1,q={eye:m.camera.eye||[2,0,0],center:m.camera.center||[0,0,0],up:m.camera.up||[0,1,0],zoomMin:m.camera.zoomMax||.1,zoomMax:m.camera.zoomMin||100,mode:m.camera.mode||"turntable",_ortho:j},U=m.axes||{},J=l(I,U);J.enable=!U.disable;var ee=m.spikes||{},ce=c(I,ee),ye=[],xe=[],ue=[],K=[],_e=!0,ie=!0,ne=new Array(16),ae=new Array(16),pe={view:null,projection:ne,model:ae,_ortho:!1},ie=!0,le=[I.drawingBufferWidth,I.drawingBufferHeight],me=m.cameraObject||s(F,q),be={gl:I,contextLost:!1,pixelRatio:m.pixelRatio||1,canvas:F,selection:B,camera:me,axes:J,axesPixels:null,spikes:ce,bounds:R,objects:ye,shape:le,aspect:m.aspectRatio||[1,1,1],pickRadius:m.pickRadius||10,zNear:m.zNear||.01,zFar:m.zFar||1e3,fovy:m.fovy||Math.PI/4,clearColor:m.clearColor||[0,0,0,0],autoResize:w(m.autoResize),autoBounds:w(m.autoBounds),autoScale:!!m.autoScale,autoCenter:w(m.autoCenter),clipToBounds:w(m.clipToBounds),snapToData:!!m.snapToData,onselect:m.onselect||null,onrender:m.onrender||null,onclick:m.onclick||null,cameraParams:pe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(we){this.aspect[0]=we.x,this.aspect[1]=we.y,this.aspect[2]=we.z,ie=!0},setBounds:function(we,Le){this.bounds[0][we]=Le.min,this.bounds[1][we]=Le.max},setClearColor:function(we){this.clearColor=we},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)}},De=[I.drawingBufferWidth/be.pixelRatio|0,I.drawingBufferHeight/be.pixelRatio|0];function Ge(){if(!be._stopped&&be.autoResize){var we=F.parentNode,Le=1,Ke=1;we&&we!==document.body?(Le=we.clientWidth,Ke=we.clientHeight):(Le=window.innerWidth,Ke=window.innerHeight);var Te=Math.ceil(Le*be.pixelRatio)|0,Ve=Math.ceil(Ke*be.pixelRatio)|0;if(Te!==F.width||Ve!==F.height){F.width=Te,F.height=Ve;var $e=F.style;$e.position=$e.position||"absolute",$e.left="0px",$e.top="0px",$e.width=Le+"px",$e.height=Ke+"px",_e=!0}}}be.autoResize&&Ge(),window.addEventListener("resize",Ge);function ht(){for(var we=ye.length,Le=K.length,Ke=0;Ke0&&ue[Le-1]===0;)ue.pop(),K.pop().dispose()}be.update=function(we){be._stopped||(we=we||{},_e=!0,ie=!0)},be.add=function(we){be._stopped||(we.axes=J,ye.push(we),xe.push(-1),_e=!0,ie=!0,ht())},be.remove=function(we){if(!be._stopped){var Le=ye.indexOf(we);Le<0||(ye.splice(Le,1),xe.pop(),_e=!0,ie=!0,ht())}},be.dispose=function(){if(!be._stopped&&(be._stopped=!0,window.removeEventListener("resize",Ge),F.removeEventListener("webglcontextlost",it),be.mouseListener.enabled=!1,!be.contextLost)){J.dispose(),ce.dispose();for(var we=0;weB.distance)continue;for(var We=0;We1e-6?(C=Math.acos(k),S=Math.sin(C),L=Math.sin((1-u)*C)/S,w=Math.sin(u*C)/S):(L=1-u,w=u),o[0]=L*c+w*p,o[1]=L*f+w*x,o[2]=L*v+w*_,o[3]=L*g+w*y,o}}),5964:(function(a){"use strict";a.exports=function(i){return!i&&i!==0?"":i.toString()}}),9366:(function(a,i,o){"use strict";var s=o(4359);a.exports=u;var l={};function u(c,f,v){var g=[f.style,f.weight,f.variant,f.family].join("_"),p=l[g];if(p||(p=l[g]={}),c in p)return p[c];var x={textAlign:"center",textBaseline:"middle",lineHeight:1,font:f.family,fontStyle:f.style,fontWeight:f.weight,fontVariant:f.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};x.triangles=!0;var _=s(c,x);x.triangles=!1;var y=s(c,x),C,k;if(v&&v!==1){for(C=0;C<_.positions.length;++C)for(k=0;k<_.positions[C].length;++k)_.positions[C][k]/=v;for(C=0;C0){var E=Math.round(Math.pow(10,F));return Math.ceil(m/E)*E}return Math.ceil(m)}function w(m){return typeof m=="boolean"?m:!0}function T(m){m=m||{},m.camera=m.camera||{};var F=m.canvas;if(!F)if(F=document.createElement("canvas"),m.container){var E=m.container;E.appendChild(F)}else document.body.appendChild(F);var I=m.gl;if(I||(m.glOptions&&(C=!!m.glOptions.preserveDrawingBuffer),I=S(F,m.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:C})),!I)throw new Error("webgl not supported");var R=m.bounds||[[-10,-10,-10],[10,10,10]],B=new k,O=v(I,I.drawingBufferWidth,I.drawingBufferHeight,{preferFloat:!C}),U=y(I),j=m.cameraObject&&m.cameraObject._ortho===!0||m.camera.projection&&m.camera.projection.type==="orthographic"||!1,q={eye:m.camera.eye||[2,0,0],center:m.camera.center||[0,0,0],up:m.camera.up||[0,1,0],zoomMin:m.camera.zoomMax||.1,zoomMax:m.camera.zoomMin||100,mode:m.camera.mode||"turntable",_ortho:j},V=m.axes||{},K=l(I,V);K.enable=!V.disable;var ee=m.spikes||{},ce=c(I,ee),me=[],ye=[],ue=[],J=[],_e=!0,ie=!0,ne=new Array(16),ae=new Array(16),pe={view:null,projection:ne,model:ae,_ortho:!1},ie=!0,le=[I.drawingBufferWidth,I.drawingBufferHeight],xe=m.cameraObject||s(F,q),be={gl:I,contextLost:!1,pixelRatio:m.pixelRatio||1,canvas:F,selection:B,camera:xe,axes:K,axesPixels:null,spikes:ce,bounds:R,objects:me,shape:le,aspect:m.aspectRatio||[1,1,1],pickRadius:m.pickRadius||10,zNear:m.zNear||.01,zFar:m.zFar||1e3,fovy:m.fovy||Math.PI/4,clearColor:m.clearColor||[0,0,0,0],autoResize:w(m.autoResize),autoBounds:w(m.autoBounds),autoScale:!!m.autoScale,autoCenter:w(m.autoCenter),clipToBounds:w(m.clipToBounds),snapToData:!!m.snapToData,onselect:m.onselect||null,onrender:m.onrender||null,onclick:m.onclick||null,cameraParams:pe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(we){this.aspect[0]=we.x,this.aspect[1]=we.y,this.aspect[2]=we.z,ie=!0},setBounds:function(we,Le){this.bounds[0][we]=Le.min,this.bounds[1][we]=Le.max},setClearColor:function(we){this.clearColor=we},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)}},De=[I.drawingBufferWidth/be.pixelRatio|0,I.drawingBufferHeight/be.pixelRatio|0];function Ge(){if(!be._stopped&&be.autoResize){var we=F.parentNode,Le=1,Ke=1;we&&we!==document.body?(Le=we.clientWidth,Ke=we.clientHeight):(Le=window.innerWidth,Ke=window.innerHeight);var Te=Math.ceil(Le*be.pixelRatio)|0,Ve=Math.ceil(Ke*be.pixelRatio)|0;if(Te!==F.width||Ve!==F.height){F.width=Te,F.height=Ve;var $e=F.style;$e.position=$e.position||"absolute",$e.left="0px",$e.top="0px",$e.width=Le+"px",$e.height=Ke+"px",_e=!0}}}be.autoResize&&Ge(),window.addEventListener("resize",Ge);function pt(){for(var we=me.length,Le=J.length,Ke=0;Ke0&&ue[Le-1]===0;)ue.pop(),J.pop().dispose()}be.update=function(we){be._stopped||(we=we||{},_e=!0,ie=!0)},be.add=function(we){be._stopped||(we.axes=K,me.push(we),ye.push(-1),_e=!0,ie=!0,pt())},be.remove=function(we){if(!be._stopped){var Le=me.indexOf(we);Le<0||(me.splice(Le,1),ye.pop(),_e=!0,ie=!0,pt())}},be.dispose=function(){if(!be._stopped&&(be._stopped=!0,window.removeEventListener("resize",Ge),F.removeEventListener("webglcontextlost",tt),be.mouseListener.enabled=!1,!be.contextLost)){K.dispose(),ce.dispose();for(var we=0;weB.distance)continue;for(var We=0;We1e-6?(C=Math.acos(k),S=Math.sin(C),L=Math.sin((1-u)*C)/S,w=Math.sin(u*C)/S):(L=1-u,w=u),o[0]=L*c+w*p,o[1]=L*f+w*_,o[2]=L*v+w*x,o[3]=L*g+w*y,o}},5964(a){"use strict";a.exports=function(i){return!i&&i!==0?"":i.toString()}},9366(a,i,o){"use strict";var s=o(4359);a.exports=u;var l={};function u(c,f,v){var g=[f.style,f.weight,f.variant,f.family].join("_"),p=l[g];if(p||(p=l[g]={}),c in p)return p[c];var _={textAlign:"center",textBaseline:"middle",lineHeight:1,font:f.family,fontStyle:f.style,fontWeight:f.weight,fontVariant:f.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};_.triangles=!0;var x=s(c,_);_.triangles=!1;var y=s(c,_),C,k;if(v&&v!==1){for(C=0;C1?1:ae}function T(ae,pe,ie,le,me,be,De,Ge,ht,it,Oe,ze){this.gl=ae,this.pixelRatio=1,this.shader=pe,this.orthoShader=ie,this.projectShader=le,this.pointBuffer=me,this.colorBuffer=be,this.glyphBuffer=De,this.idBuffer=Ge,this.vao=ht,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=it,this.pickOrthoShader=Oe,this.pickProjectShader=ze,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 m=T.prototype;m.pickSlots=1,m.setPickBase=function(ae){this.pickId=ae},m.isTransparent=function(){if(this.hasAlpha)return!0;for(var ae=0;ae<3;++ae)if(this.axesProject[ae]&&this.projectHasAlpha)return!0;return!1},m.isOpaque=function(){if(!this.hasAlpha)return!0;for(var ae=0;ae<3;++ae)if(this.axesProject[ae]&&!this.projectHasAlpha)return!0;return!1};var F=[0,0],E=[0,0,0],I=[0,0,0],R=[0,0,0,1],B=[0,0,0,1],O=x.slice(),V=[0,0,0],j=[[0,0,0],[0,0,0]];function q(ae){return ae[0]=ae[1]=ae[2]=0,ae}function U(ae,pe){return ae[0]=pe[0],ae[1]=pe[1],ae[2]=pe[2],ae[3]=1,ae}function J(ae,pe,ie,le){return ae[0]=pe[0],ae[1]=pe[1],ae[2]=pe[2],ae[ie]=le,ae}function ee(ae){for(var pe=j,ie=0;ie<2;++ie)for(var le=0;le<3;++le)pe[ie][le]=Math.max(Math.min(ae[ie][le],1e8),-1e8);return pe}function ce(ae,pe,ie,le){var me=pe.axesProject,be=pe.gl,De=ae.uniforms,Ge=ie.model||x,ht=ie.view||x,it=ie.projection||x,Oe=pe.axesBounds,ze=ee(pe.clipBounds),ct;pe.axes&&pe.axes.lastCubeProps?ct=pe.axes.lastCubeProps.axis:ct=[1,1,1],F[0]=2/be.drawingBufferWidth,F[1]=2/be.drawingBufferHeight,ae.bind(),De.view=ht,De.projection=it,De.screenSize=F,De.highlightId=pe.highlightId,De.highlightScale=pe.highlightScale,De.clipBounds=ze,De.pickGroup=pe.pickId/255,De.pixelRatio=le;for(var et=0;et<3;++et)if(me[et]){De.scale=pe.projectScale[et],De.opacity=pe.projectOpacity[et];for(var qe=O,we=0;we<16;++we)qe[we]=0;for(var we=0;we<4;++we)qe[5*we]=1;qe[5*et]=0,ct[et]<0?qe[12+et]=Oe[0][et]:qe[12+et]=Oe[1][et],f(qe,Ge,qe),De.model=qe;var Le=(et+1)%3,Ke=(et+2)%3,Te=q(E),Ve=q(I);Te[Le]=1,Ve[Ke]=1;var $e=L(it,ht,Ge,U(R,Te)),ot=L(it,ht,Ge,U(B,Ve));if(Math.abs($e[1])>Math.abs(ot[1])){var tt=$e;$e=ot,ot=tt,tt=Te,Te=Ve,Ve=tt;var nt=Le;Le=Ke,Ke=nt}$e[0]<0&&(Te[Le]=-1),ot[1]>0&&(Ve[Ke]=-1);for(var We=0,mt=0,we=0;we<4;++we)We+=Math.pow(Ge[4*Le+we],2),mt+=Math.pow(Ge[4*Ke+we],2);Te[Le]/=Math.sqrt(We),Ve[Ke]/=Math.sqrt(mt),De.axes[0]=Te,De.axes[1]=Ve,De.fragClipBounds[0]=J(V,ze[0],et,-1e8),De.fragClipBounds[1]=J(V,ze[1],et,1e8),pe.vao.bind(),pe.vao.draw(be.TRIANGLES,pe.vertexCount),pe.lineWidth>0&&(be.lineWidth(pe.lineWidth*le),pe.vao.draw(be.LINES,pe.lineVertexCount,pe.vertexCount)),pe.vao.unbind()}}var ye=[-1e8,-1e8,-1e8],xe=[1e8,1e8,1e8],ue=[ye,xe];function K(ae,pe,ie,le,me,be,De){var Ge=ie.gl;if((be===ie.projectHasAlpha||De)&&ce(pe,ie,le,me),be===ie.hasAlpha||De){ae.bind();var ht=ae.uniforms;ht.model=le.model||x,ht.view=le.view||x,ht.projection=le.projection||x,F[0]=2/Ge.drawingBufferWidth,F[1]=2/Ge.drawingBufferHeight,ht.screenSize=F,ht.highlightId=ie.highlightId,ht.highlightScale=ie.highlightScale,ht.fragClipBounds=ue,ht.clipBounds=ie.axes.bounds,ht.opacity=ie.opacity,ht.pickGroup=ie.pickId/255,ht.pixelRatio=me,ie.vao.bind(),ie.vao.draw(Ge.TRIANGLES,ie.vertexCount),ie.lineWidth>0&&(Ge.lineWidth(ie.lineWidth*me),ie.vao.draw(Ge.LINES,ie.lineVertexCount,ie.vertexCount)),ie.vao.unbind()}}m.draw=function(ae){var pe=this.useOrtho?this.orthoShader:this.shader;K(pe,this.projectShader,this,ae,this.pixelRatio,!1,!1)},m.drawTransparent=function(ae){var pe=this.useOrtho?this.orthoShader:this.shader;K(pe,this.projectShader,this,ae,this.pixelRatio,!0,!1)},m.drawPick=function(ae){var pe=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;K(pe,this.pickProjectShader,this,ae,1,!0,!0)},m.pick=function(ae){if(!ae||ae.id!==this.pickId)return null;var pe=ae.value[2]+(ae.value[1]<<8)+(ae.value[0]<<16);if(pe>=this.pointCount||pe<0)return null;var ie=this.points[pe],le=this._selectResult;le.index=pe;for(var me=0;me<3;++me)le.position[me]=le.dataCoordinate[me]=ie[me];return le},m.highlight=function(ae){if(!ae)this.highlightId=[1,1,1,1];else{var pe=ae.index,ie=pe&255,le=pe>>8&255,me=pe>>16&255;this.highlightId=[ie/255,le/255,me/255,0]}};function _e(ae,pe,ie,le){var me;k(ae)?pe0){var fr=0,Ot=Ke,cr=[0,0,0,1],Ct=[0,0,0,1],wt=k(ct)&&k(ct[0]),Tt=k(we)&&k(we[0]);e:for(var le=0;le0?1-mt[0][0]:Kr<0?1+mt[1][0]:1,Nr*=Nr>0?1-mt[0][1]:Nr<0?1+mt[1][1]:1;for(var dn=[Kr,Nr],Dt=nt.cells||[],At=nt.positions||[],ot=0;otthis.buffer.length){l.free(this.buffer);for(var k=this.buffer=l.mallocUint8(c(C*y*4)),S=0;Sk)for(y=k;yC)for(y=C;y=0){for(var j=V.type.charAt(V.type.length-1)|0,q=new Array(j),U=0;U=0;)J+=1;B[O]=J}var ee=new Array(k.length);function ce(){w.program=c.program(A,w._vref,w._fref,R,B);for(var ye=0;ye=0){var m=A.charCodeAt(A.length-1)-48;if(m<2||m>4)throw new s("","Invalid data type for attribute "+w+": "+A);f(p,x,T[0],y,m,C,w)}else if(A.indexOf("mat")>=0){var m=A.charCodeAt(A.length-1)-48;if(m<2||m>4)throw new s("","Invalid data type for attribute "+w+": "+A);v(p,x,T,y,m,C,w)}else throw new s("","Unknown data type for attribute "+w+": "+A);break}}return C}}),3327:(function(a,i,o){"use strict";var s=o(216),l=o(8866);a.exports=f;function u(v){return function(){return v}}function c(v,g){for(var p=new Array(v),x=0;x4)throw new l("","Invalid data type");switch(J.charAt(0)){case"b":case"i":v["uniform"+ee+"iv"](x[B],O);break;case"v":v["uniform"+ee+"fv"](x[B],O);break;default:throw new l("","Unrecognized data type for vector "+name+": "+J)}}else if(J.indexOf("mat")===0&&J.length===4){if(ee=J.charCodeAt(J.length-1)-48,ee<2||ee>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+J);v["uniformMatrix"+ee+"fv"](x[B],!1,O);break}else throw new l("","Unknown uniform data type for "+name+": "+J)}}}}}function C(A,T){if(typeof T!="object")return[[A,T]];var m=[];for(var F in T){var E=T[F],I=A;parseInt(F)+""===F?I+="["+F+"]":I+="."+F,typeof E=="object"?m.push.apply(m,C(I,E)):m.push([I,E])}return m}function k(A){switch(A){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var T=A.indexOf("vec");if(0<=T&&T<=1&&A.length===4+T){var m=A.charCodeAt(A.length-1)-48;if(m<2||m>4)throw new l("","Invalid data type");return A.charAt(0)==="b"?c(m,!1):c(m,0)}else if(A.indexOf("mat")===0&&A.length===4){var m=A.charCodeAt(A.length-1)-48;if(m<2||m>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+A);return c(m*m,0)}else throw new l("","Unknown uniform data type for "+name+": "+A)}}function S(A,T,m){if(typeof m=="object"){var F=L(m);Object.defineProperty(A,T,{get:u(F),set:y(m),enumerable:!0,configurable:!1})}else x[m]?Object.defineProperty(A,T,{get:_(m),set:y(m),enumerable:!0,configurable:!1}):A[T]=k(p[m].type)}function L(A){var T;if(Array.isArray(A)){T=new Array(A.length);for(var m=0;m1){p[0]in v||(v[p[0]]=[]),v=v[p[0]];for(var x=1;x1)for(var C=0;C<_.size;++C)p.push({name:_.name.replace("[0]","["+C+"]"),type:y});else p.push({name:_.name,type:y})}}return p}function c(f,v){for(var g=f.getProgramParameter(v,f.ACTIVE_ATTRIBUTES),p=[],x=0;x1?1:ae}function A(ae,pe,ie,le,xe,be,De,Ge,pt,tt,Oe,ze){this.gl=ae,this.pixelRatio=1,this.shader=pe,this.orthoShader=ie,this.projectShader=le,this.pointBuffer=xe,this.colorBuffer=be,this.glyphBuffer=De,this.idBuffer=Ge,this.vao=pt,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=tt,this.pickOrthoShader=Oe,this.pickProjectShader=ze,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 m=A.prototype;m.pickSlots=1,m.setPickBase=function(ae){this.pickId=ae},m.isTransparent=function(){if(this.hasAlpha)return!0;for(var ae=0;ae<3;++ae)if(this.axesProject[ae]&&this.projectHasAlpha)return!0;return!1},m.isOpaque=function(){if(!this.hasAlpha)return!0;for(var ae=0;ae<3;++ae)if(this.axesProject[ae]&&!this.projectHasAlpha)return!0;return!1};var F=[0,0],E=[0,0,0],I=[0,0,0],R=[0,0,0,1],B=[0,0,0,1],O=_.slice(),U=[0,0,0],j=[[0,0,0],[0,0,0]];function q(ae){return ae[0]=ae[1]=ae[2]=0,ae}function V(ae,pe){return ae[0]=pe[0],ae[1]=pe[1],ae[2]=pe[2],ae[3]=1,ae}function K(ae,pe,ie,le){return ae[0]=pe[0],ae[1]=pe[1],ae[2]=pe[2],ae[ie]=le,ae}function ee(ae){for(var pe=j,ie=0;ie<2;++ie)for(var le=0;le<3;++le)pe[ie][le]=Math.max(Math.min(ae[ie][le],1e8),-1e8);return pe}function ce(ae,pe,ie,le){var xe=pe.axesProject,be=pe.gl,De=ae.uniforms,Ge=ie.model||_,pt=ie.view||_,tt=ie.projection||_,Oe=pe.axesBounds,ze=ee(pe.clipBounds),ut;pe.axes&&pe.axes.lastCubeProps?ut=pe.axes.lastCubeProps.axis:ut=[1,1,1],F[0]=2/be.drawingBufferWidth,F[1]=2/be.drawingBufferHeight,ae.bind(),De.view=pt,De.projection=tt,De.screenSize=F,De.highlightId=pe.highlightId,De.highlightScale=pe.highlightScale,De.clipBounds=ze,De.pickGroup=pe.pickId/255,De.pixelRatio=le;for(var et=0;et<3;++et)if(xe[et]){De.scale=pe.projectScale[et],De.opacity=pe.projectOpacity[et];for(var qe=O,we=0;we<16;++we)qe[we]=0;for(var we=0;we<4;++we)qe[5*we]=1;qe[5*et]=0,ut[et]<0?qe[12+et]=Oe[0][et]:qe[12+et]=Oe[1][et],f(qe,Ge,qe),De.model=qe;var Le=(et+1)%3,Ke=(et+2)%3,Te=q(E),Ve=q(I);Te[Le]=1,Ve[Ke]=1;var $e=L(tt,pt,Ge,V(R,Te)),ot=L(tt,pt,Ge,V(B,Ve));if(Math.abs($e[1])>Math.abs(ot[1])){var rt=$e;$e=ot,ot=rt,rt=Te,Te=Ve,Ve=rt;var it=Le;Le=Ke,Ke=it}$e[0]<0&&(Te[Le]=-1),ot[1]>0&&(Ve[Ke]=-1);for(var We=0,mt=0,we=0;we<4;++we)We+=Math.pow(Ge[4*Le+we],2),mt+=Math.pow(Ge[4*Ke+we],2);Te[Le]/=Math.sqrt(We),Ve[Ke]/=Math.sqrt(mt),De.axes[0]=Te,De.axes[1]=Ve,De.fragClipBounds[0]=K(U,ze[0],et,-1e8),De.fragClipBounds[1]=K(U,ze[1],et,1e8),pe.vao.bind(),pe.vao.draw(be.TRIANGLES,pe.vertexCount),pe.lineWidth>0&&(be.lineWidth(pe.lineWidth*le),pe.vao.draw(be.LINES,pe.lineVertexCount,pe.vertexCount)),pe.vao.unbind()}}var me=[-1e8,-1e8,-1e8],ye=[1e8,1e8,1e8],ue=[me,ye];function J(ae,pe,ie,le,xe,be,De){var Ge=ie.gl;if((be===ie.projectHasAlpha||De)&&ce(pe,ie,le,xe),be===ie.hasAlpha||De){ae.bind();var pt=ae.uniforms;pt.model=le.model||_,pt.view=le.view||_,pt.projection=le.projection||_,F[0]=2/Ge.drawingBufferWidth,F[1]=2/Ge.drawingBufferHeight,pt.screenSize=F,pt.highlightId=ie.highlightId,pt.highlightScale=ie.highlightScale,pt.fragClipBounds=ue,pt.clipBounds=ie.axes.bounds,pt.opacity=ie.opacity,pt.pickGroup=ie.pickId/255,pt.pixelRatio=xe,ie.vao.bind(),ie.vao.draw(Ge.TRIANGLES,ie.vertexCount),ie.lineWidth>0&&(Ge.lineWidth(ie.lineWidth*xe),ie.vao.draw(Ge.LINES,ie.lineVertexCount,ie.vertexCount)),ie.vao.unbind()}}m.draw=function(ae){var pe=this.useOrtho?this.orthoShader:this.shader;J(pe,this.projectShader,this,ae,this.pixelRatio,!1,!1)},m.drawTransparent=function(ae){var pe=this.useOrtho?this.orthoShader:this.shader;J(pe,this.projectShader,this,ae,this.pixelRatio,!0,!1)},m.drawPick=function(ae){var pe=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;J(pe,this.pickProjectShader,this,ae,1,!0,!0)},m.pick=function(ae){if(!ae||ae.id!==this.pickId)return null;var pe=ae.value[2]+(ae.value[1]<<8)+(ae.value[0]<<16);if(pe>=this.pointCount||pe<0)return null;var ie=this.points[pe],le=this._selectResult;le.index=pe;for(var xe=0;xe<3;++xe)le.position[xe]=le.dataCoordinate[xe]=ie[xe];return le},m.highlight=function(ae){if(!ae)this.highlightId=[1,1,1,1];else{var pe=ae.index,ie=pe&255,le=pe>>8&255,xe=pe>>16&255;this.highlightId=[ie/255,le/255,xe/255,0]}};function _e(ae,pe,ie,le){var xe;k(ae)?pe0){var fr=0,Ot=Ke,cr=[0,0,0,1],Ct=[0,0,0,1],wt=k(ut)&&k(ut[0]),Tt=k(we)&&k(we[0]);e:for(var le=0;le0?1-mt[0][0]:Kr<0?1+mt[1][0]:1,Nr*=Nr>0?1-mt[0][1]:Nr<0?1+mt[1][1]:1;for(var dn=[Kr,Nr],Dt=it.cells||[],At=it.positions||[],ot=0;otthis.buffer.length){l.free(this.buffer);for(var k=this.buffer=l.mallocUint8(c(C*y*4)),S=0;Sk)for(y=k;yC)for(y=C;y=0){for(var j=U.type.charAt(U.type.length-1)|0,q=new Array(j),V=0;V=0;)K+=1;B[O]=K}var ee=new Array(k.length);function ce(){w.program=c.program(T,w._vref,w._fref,R,B);for(var me=0;me=0){var m=T.charCodeAt(T.length-1)-48;if(m<2||m>4)throw new s("","Invalid data type for attribute "+w+": "+T);f(p,_,A[0],y,m,C,w)}else if(T.indexOf("mat")>=0){var m=T.charCodeAt(T.length-1)-48;if(m<2||m>4)throw new s("","Invalid data type for attribute "+w+": "+T);v(p,_,A,y,m,C,w)}else throw new s("","Unknown data type for attribute "+w+": "+T);break}}return C}},3327(a,i,o){"use strict";var s=o(216),l=o(8866);a.exports=f;function u(v){return function(){return v}}function c(v,g){for(var p=new Array(v),_=0;_4)throw new l("","Invalid data type");switch(K.charAt(0)){case"b":case"i":v["uniform"+ee+"iv"](_[B],O);break;case"v":v["uniform"+ee+"fv"](_[B],O);break;default:throw new l("","Unrecognized data type for vector "+name+": "+K)}}else if(K.indexOf("mat")===0&&K.length===4){if(ee=K.charCodeAt(K.length-1)-48,ee<2||ee>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+K);v["uniformMatrix"+ee+"fv"](_[B],!1,O);break}else throw new l("","Unknown uniform data type for "+name+": "+K)}}}}}function C(T,A){if(typeof A!="object")return[[T,A]];var m=[];for(var F in A){var E=A[F],I=T;parseInt(F)+""===F?I+="["+F+"]":I+="."+F,typeof E=="object"?m.push.apply(m,C(I,E)):m.push([I,E])}return m}function k(T){switch(T){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var A=T.indexOf("vec");if(0<=A&&A<=1&&T.length===4+A){var m=T.charCodeAt(T.length-1)-48;if(m<2||m>4)throw new l("","Invalid data type");return T.charAt(0)==="b"?c(m,!1):c(m,0)}else if(T.indexOf("mat")===0&&T.length===4){var m=T.charCodeAt(T.length-1)-48;if(m<2||m>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+T);return c(m*m,0)}else throw new l("","Unknown uniform data type for "+name+": "+T)}}function S(T,A,m){if(typeof m=="object"){var F=L(m);Object.defineProperty(T,A,{get:u(F),set:y(m),enumerable:!0,configurable:!1})}else _[m]?Object.defineProperty(T,A,{get:x(m),set:y(m),enumerable:!0,configurable:!1}):T[A]=k(p[m].type)}function L(T){var A;if(Array.isArray(T)){A=new Array(T.length);for(var m=0;m1){p[0]in v||(v[p[0]]=[]),v=v[p[0]];for(var _=1;_1)for(var C=0;C0)for(var K=0;KL)return A-1}return A},g=function(S,L,w){return Sw?w:S},p=function(S,L,w){var A=L.vectors,T=L.meshgrid,m=S[0],F=S[1],E=S[2],I=T[0].length,R=T[1].length,B=T[2].length,O=v(T[0],m),V=v(T[1],F),j=v(T[2],E),q=O+1,U=V+1,J=j+1;if(O=g(O,0,I-1),q=g(q,0,I-1),V=g(V,0,R-1),U=g(U,0,R-1),j=g(j,0,B-1),J=g(J,0,B-1),O<0||V<0||j<0||q>I-1||U>R-1||J>B-1)return s.create();var ee=T[0][O],ce=T[0][q],ye=T[1][V],xe=T[1][U],ue=T[2][j],K=T[2][J],_e=(m-ee)/(ce-ee),ne=(F-ye)/(xe-ye),ae=(E-ue)/(K-ue);isFinite(_e)||(_e=.5),isFinite(ne)||(ne=.5),isFinite(ae)||(ae=.5);var pe,ie,le,me,be,De;switch(w.reversedX&&(O=I-1-O,q=I-1-q),w.reversedY&&(V=R-1-V,U=R-1-U),w.reversedZ&&(j=B-1-j,J=B-1-J),w.filled){case 5:be=j,De=J,le=V*B,me=U*B,pe=O*B*R,ie=q*B*R;break;case 4:be=j,De=J,pe=O*B,ie=q*B,le=V*B*I,me=U*B*I;break;case 3:le=V,me=U,be=j*R,De=J*R,pe=O*R*B,ie=q*R*B;break;case 2:le=V,me=U,pe=O*R,ie=q*R,be=j*R*I,De=J*R*I;break;case 1:pe=O,ie=q,be=j*I,De=J*I,le=V*I*B,me=U*I*B;break;default:pe=O,ie=q,le=V*I,me=U*I,be=j*I*R,De=J*I*R;break}var Ge=A[pe+le+be],ht=A[pe+le+De],it=A[pe+me+be],Oe=A[pe+me+De],ze=A[ie+le+be],ct=A[ie+le+De],et=A[ie+me+be],qe=A[ie+me+De],we=s.create(),Le=s.create(),Ke=s.create(),Te=s.create();s.lerp(we,Ge,ze,_e),s.lerp(Le,ht,ct,_e),s.lerp(Ke,it,et,_e),s.lerp(Te,Oe,qe,_e);var Ve=s.create(),$e=s.create();s.lerp(Ve,we,Ke,ne),s.lerp($e,Le,Te,ne);var ot=s.create();return s.lerp(ot,Ve,$e,ae),ot},x=function(S,L){var w=L[0],A=L[1],T=L[2];return S[0]=w<0?-w:w,S[1]=A<0?-A:A,S[2]=T<0?-T:T,S},_=function(S){var L=1/0;S.sort(function(m,F){return m-F});for(var w=S.length,A=1;Aq||qeU||weJ)},ce=s.distance(L[0],L[1]),ye=10*ce/A,xe=ye*ye,ue=1,K=0,_e=w.length;_e>1&&(ue=y(w));for(var ne=0;ne<_e;ne++){var ae=s.create();s.copy(ae,w[ne]);var pe=[ae],ie=[],le=I(ae),me=ae;ie.push(le);var be=[],De=R(ae,le),Ge=s.length(De);isFinite(Ge)&&Ge>K&&(K=Ge),be.push(Ge),B.push({points:pe,velocities:ie,divergences:be});for(var ht=0;htxe&&s.scale(it,it,ye/Math.sqrt(Oe)),s.add(it,it,ae),le=I(it),s.squaredDistance(me,it)-xe>-1e-4*xe){pe.push(it),me=it,ie.push(le);var De=R(it,le),Ge=s.length(De);isFinite(Ge)&&Ge>K&&(K=Ge),be.push(Ge)}ae=it}}var ze=f(B,S.colormap,K,ue);return m?ze.tubeScale=m:(K===0&&(K=1),ze.tubeScale=T*.5*ue/K),ze};var C=o(6740),k=o(6405).createMesh;a.exports.createTubeMesh=function(S,L){return k(S,L,{shaders:C,traceType:"streamtube"})}}),990:(function(a,i,o){var s=o(9405),l=o(3236),u=l([`precision highp float; +}`]);i.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},i.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815(a,i,o){"use strict";var s=o(2931),l=o(9970),u=["xyz","xzy","yxz","yzx","zxy","zyx"],c=function(S,L,w,T){for(var A=S.points,m=S.velocities,F=S.divergences,E=[],I=[],R=[],B=[],O=[],U=[],j=0,q=0,V=l.create(),K=l.create(),ee=8,ce=0;ce0)for(var J=0;JL)return T-1}return T},g=function(S,L,w){return Sw?w:S},p=function(S,L,w){var T=L.vectors,A=L.meshgrid,m=S[0],F=S[1],E=S[2],I=A[0].length,R=A[1].length,B=A[2].length,O=v(A[0],m),U=v(A[1],F),j=v(A[2],E),q=O+1,V=U+1,K=j+1;if(O=g(O,0,I-1),q=g(q,0,I-1),U=g(U,0,R-1),V=g(V,0,R-1),j=g(j,0,B-1),K=g(K,0,B-1),O<0||U<0||j<0||q>I-1||V>R-1||K>B-1)return s.create();var ee=A[0][O],ce=A[0][q],me=A[1][U],ye=A[1][V],ue=A[2][j],J=A[2][K],_e=(m-ee)/(ce-ee),ne=(F-me)/(ye-me),ae=(E-ue)/(J-ue);isFinite(_e)||(_e=.5),isFinite(ne)||(ne=.5),isFinite(ae)||(ae=.5);var pe,ie,le,xe,be,De;switch(w.reversedX&&(O=I-1-O,q=I-1-q),w.reversedY&&(U=R-1-U,V=R-1-V),w.reversedZ&&(j=B-1-j,K=B-1-K),w.filled){case 5:be=j,De=K,le=U*B,xe=V*B,pe=O*B*R,ie=q*B*R;break;case 4:be=j,De=K,pe=O*B,ie=q*B,le=U*B*I,xe=V*B*I;break;case 3:le=U,xe=V,be=j*R,De=K*R,pe=O*R*B,ie=q*R*B;break;case 2:le=U,xe=V,pe=O*R,ie=q*R,be=j*R*I,De=K*R*I;break;case 1:pe=O,ie=q,be=j*I,De=K*I,le=U*I*B,xe=V*I*B;break;default:pe=O,ie=q,le=U*I,xe=V*I,be=j*I*R,De=K*I*R;break}var Ge=T[pe+le+be],pt=T[pe+le+De],tt=T[pe+xe+be],Oe=T[pe+xe+De],ze=T[ie+le+be],ut=T[ie+le+De],et=T[ie+xe+be],qe=T[ie+xe+De],we=s.create(),Le=s.create(),Ke=s.create(),Te=s.create();s.lerp(we,Ge,ze,_e),s.lerp(Le,pt,ut,_e),s.lerp(Ke,tt,et,_e),s.lerp(Te,Oe,qe,_e);var Ve=s.create(),$e=s.create();s.lerp(Ve,we,Ke,ne),s.lerp($e,Le,Te,ne);var ot=s.create();return s.lerp(ot,Ve,$e,ae),ot},_=function(S,L){var w=L[0],T=L[1],A=L[2];return S[0]=w<0?-w:w,S[1]=T<0?-T:T,S[2]=A<0?-A:A,S},x=function(S){var L=1/0;S.sort(function(m,F){return m-F});for(var w=S.length,T=1;Tq||qeV||weK)},ce=s.distance(L[0],L[1]),me=10*ce/T,ye=me*me,ue=1,J=0,_e=w.length;_e>1&&(ue=y(w));for(var ne=0;ne<_e;ne++){var ae=s.create();s.copy(ae,w[ne]);var pe=[ae],ie=[],le=I(ae),xe=ae;ie.push(le);var be=[],De=R(ae,le),Ge=s.length(De);isFinite(Ge)&&Ge>J&&(J=Ge),be.push(Ge),B.push({points:pe,velocities:ie,divergences:be});for(var pt=0;ptye&&s.scale(tt,tt,me/Math.sqrt(Oe)),s.add(tt,tt,ae),le=I(tt),s.squaredDistance(xe,tt)-ye>-1e-4*ye){pe.push(tt),xe=tt,ie.push(le);var De=R(tt,le),Ge=s.length(De);isFinite(Ge)&&Ge>J&&(J=Ge),be.push(Ge)}ae=tt}}var ze=f(B,S.colormap,J,ue);return m?ze.tubeScale=m:(J===0&&(J=1),ze.tubeScale=A*.5*ue/J),ze};var C=o(6740),k=o(6405).createMesh;a.exports.createTubeMesh=function(S,L){return k(S,L,{shaders:C,traceType:"streamtube"})}},990(a,i,o){var s=o(9405),l=o(3236),u=l([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; @@ -2002,13 +2002,13 @@ void main() { vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } -`]);i.createShader=function(g){var p=s(g,u,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},i.createPickShader=function(g){var p=s(g,u,v,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},i.createContourShader=function(g){var p=s(g,f,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p},i.createPickContourShader=function(g){var p=s(g,f,v,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p}}),9499:(function(a,i,o){"use strict";a.exports=pe;var s=o(8828),l=o(2762),u=o(8116),c=o(7766),f=o(1888),v=o(6729),g=o(5298),p=o(9994),x=o(9618),_=o(3711),y=o(6760),C=o(7608),k=o(2478),S=o(6199),L=o(990),w=L.createShader,A=L.createContourShader,T=L.createPickShader,m=L.createPickContourShader,F=40,E=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],I=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],R=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var ie=0;ie<3;++ie){var le=R[ie],me=(ie+1)%3,be=(ie+2)%3;le[me+0]=1,le[be+3]=1,le[ie+6]=1}})();function B(ie,le,me,be,De){this.position=ie,this.index=le,this.uv=me,this.level=be,this.dataCoordinate=De}var O=256;function V(ie,le,me,be,De,Ge,ht,it,Oe,ze,ct,et,qe,we,Le){this.gl=ie,this.shape=le,this.bounds=me,this.objectOffset=Le,this.intensityBounds=[],this._shader=be,this._pickShader=De,this._coordinateBuffer=Ge,this._vao=ht,this._colorMap=it,this._contourShader=Oe,this._contourPickShader=ze,this._contourBuffer=ct,this._contourVAO=et,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new B([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=qe,this._dynamicVAO=we,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[x(f.mallocFloat(1024),[0,0]),x(f.mallocFloat(1024),[0,0]),x(f.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var j=V.prototype;j.genColormap=function(ie,le){var me=!1,be=p([v({colormap:ie,nshades:O,format:"rgba"}).map(function(De,Ge){var ht=le?q(Ge/255,le):De[3];return ht<1&&(me=!0),[De[0],De[1],De[2],255*ht]})]);return g.divseq(be,255),this.hasAlphaScale=me,be},j.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},j.isOpaque=function(){return!this.isTransparent()},j.pickSlots=1,j.setPickBase=function(ie){this.pickId=ie};function q(ie,le){if(!le||!le.length)return 1;for(var me=0;meie&&me>0){var be=(le[me][0]-ie)/(le[me][0]-le[me-1][0]);return le[me][1]*(1-be)+be*le[me-1][1]}}return 1}var U=[0,0,0],J={showSurface:!1,showContour:!1,projections:[E.slice(),E.slice(),E.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function ee(ie,le){var me,be,De,Ge=le.axes&&le.axes.lastCubeProps.axis||U,ht=le.showSurface,it=le.showContour;for(me=0;me<3;++me)for(ht=ht||le.surfaceProject[me],be=0;be<3;++be)it=it||le.contourProject[me][be];for(me=0;me<3;++me){var Oe=J.projections[me];for(be=0;be<16;++be)Oe[be]=0;for(be=0;be<4;++be)Oe[5*be]=1;Oe[5*me]=0,Oe[12+me]=le.axesBounds[+(Ge[me]>0)][me],y(Oe,ie.model,Oe);var ze=J.clipBounds[me];for(De=0;De<2;++De)for(be=0;be<3;++be)ze[De][be]=ie.clipBounds[De][be];ze[0][me]=-1e8,ze[1][me]=1e8}return J.showSurface=ht,J.showContour=it,J}var ce={model:E,view:E,projection:E,inverseModel:E.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},ye=E.slice(),xe=[1,0,0,0,1,0,0,0,1];function ue(ie,le){ie=ie||{};var me=this.gl;me.disable(me.CULL_FACE),this._colorMap.bind(0);var be=ce;be.model=ie.model||E,be.view=ie.view||E,be.projection=ie.projection||E,be.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],be.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],be.objectOffset=this.objectOffset,be.contourColor=this.contourColor[0],be.inverseModel=C(be.inverseModel,be.model);for(var De=0;De<2;++De)for(var Ge=be.clipBounds[De],ht=0;ht<3;++ht)Ge[ht]=Math.min(Math.max(this.clipBounds[De][ht],-1e8),1e8);be.kambient=this.ambientLight,be.kdiffuse=this.diffuseLight,be.kspecular=this.specularLight,be.roughness=this.roughness,be.fresnel=this.fresnel,be.opacity=this.opacity,be.height=0,be.permutation=xe,be.vertexColor=this.vertexColor;var it=ye;for(y(it,be.view,be.model),y(it,be.projection,it),C(it,it),De=0;De<3;++De)be.eyePosition[De]=it[12+De]/it[15];var Oe=it[15];for(De=0;De<3;++De)Oe+=this.lightPosition[De]*it[4*De+3];for(De=0;De<3;++De){var ze=it[12+De];for(ht=0;ht<3;++ht)ze+=it[4*ht+De]*this.lightPosition[ht];be.lightPosition[De]=ze/Oe}var ct=ee(be,this);if(ct.showSurface){for(this._shader.bind(),this._shader.uniforms=be,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(me.TRIANGLES,this._vertexCount),De=0;De<3;++De)!this.surfaceProject[De]||!this.vertexCount||(this._shader.uniforms.model=ct.projections[De],this._shader.uniforms.clipBounds=ct.clipBounds[De],this._vao.draw(me.TRIANGLES,this._vertexCount));this._vao.unbind()}if(ct.showContour){var et=this._contourShader;be.kambient=1,be.kdiffuse=0,be.kspecular=0,be.opacity=1,et.bind(),et.uniforms=be;var qe=this._contourVAO;for(qe.bind(),De=0;De<3;++De)for(et.uniforms.permutation=R[De],me.lineWidth(this.contourWidth[De]*this.pixelRatio),ht=0;ht>4)/16)/255,De=Math.floor(be),Ge=be-De,ht=le[1]*(ie.value[1]+(ie.value[2]&15)/16)/255,it=Math.floor(ht),Oe=ht-it;De+=1,it+=1;var ze=me.position;ze[0]=ze[1]=ze[2]=0;for(var ct=0;ct<2;++ct)for(var et=ct?Ge:1-Ge,qe=0;qe<2;++qe)for(var we=qe?Oe:1-Oe,Le=De+ct,Ke=it+qe,Te=et*we,Ve=0;Ve<3;++Ve)ze[Ve]+=this._field[Ve].get(Le,Ke)*Te;for(var $e=this._pickResult.level,ot=0;ot<3;++ot)if($e[ot]=k.le(this.contourLevels[ot],ze[ot]),$e[ot]<0)this.contourLevels[ot].length>0&&($e[ot]=0);else if($e[ot]Math.abs(nt-ze[ot])&&($e[ot]+=1)}for(me.index[0]=Ge<.5?De:De+1,me.index[1]=Oe<.5?it:it+1,me.uv[0]=be/le[0],me.uv[1]=ht/le[1],Ve=0;Ve<3;++Ve)me.dataCoordinate[Ve]=this._field[Ve].get(me.index[0],me.index[1]);return me},j.padField=function(ie,le){var me=le.shape.slice(),be=ie.shape.slice();g.assign(ie.lo(1,1).hi(me[0],me[1]),le),g.assign(ie.lo(1).hi(me[0],1),le.hi(me[0],1)),g.assign(ie.lo(1,be[1]-1).hi(me[0],1),le.lo(0,me[1]-1).hi(me[0],1)),g.assign(ie.lo(0,1).hi(1,me[1]),le.hi(1)),g.assign(ie.lo(be[0]-1,1).hi(1,me[1]),le.lo(me[0]-1)),ie.set(0,0,le.get(0,0)),ie.set(0,be[1]-1,le.get(0,me[1]-1)),ie.set(be[0]-1,0,le.get(me[0]-1,0)),ie.set(be[0]-1,be[1]-1,le.get(me[0]-1,me[1]-1))};function _e(ie,le){return Array.isArray(ie)?[le(ie[0]),le(ie[1]),le(ie[2])]:[le(ie),le(ie),le(ie)]}function ne(ie){return Array.isArray(ie)?ie.length===3?[ie[0],ie[1],ie[2],1]:[ie[0],ie[1],ie[2],ie[3]]:[0,0,0,1]}function ae(ie){if(Array.isArray(ie)){if(Array.isArray(ie))return[ne(ie[0]),ne(ie[1]),ne(ie[2])];var le=ne(ie);return[le.slice(),le.slice(),le.slice()]}}j.update=function(ie){ie=ie||{},this.objectOffset=ie.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in ie&&(this.contourWidth=_e(ie.contourWidth,Number)),"showContour"in ie&&(this.showContour=_e(ie.showContour,Boolean)),"showSurface"in ie&&(this.showSurface=!!ie.showSurface),"contourTint"in ie&&(this.contourTint=_e(ie.contourTint,Boolean)),"contourColor"in ie&&(this.contourColor=ae(ie.contourColor)),"contourProject"in ie&&(this.contourProject=_e(ie.contourProject,function(Ga){return _e(Ga,Boolean)})),"surfaceProject"in ie&&(this.surfaceProject=ie.surfaceProject),"dynamicColor"in ie&&(this.dynamicColor=ae(ie.dynamicColor)),"dynamicTint"in ie&&(this.dynamicTint=_e(ie.dynamicTint,Number)),"dynamicWidth"in ie&&(this.dynamicWidth=_e(ie.dynamicWidth,Number)),"opacity"in ie&&(this.opacity=ie.opacity),"opacityscale"in ie&&(this.opacityscale=ie.opacityscale),"colorBounds"in ie&&(this.colorBounds=ie.colorBounds),"vertexColor"in ie&&(this.vertexColor=ie.vertexColor?1:0),"colormap"in ie&&this._colorMap.setPixels(this.genColormap(ie.colormap,this.opacityscale));var le=ie.field||ie.coords&&ie.coords[2]||null,me=!1;if(le||(this._field[2].shape[0]||this._field[2].shape[2]?le=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):le=this._field[2].hi(0,0)),"field"in ie||"coords"in ie){var be=(le.shape[0]+2)*(le.shape[1]+2);be>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(be))),this._field[2]=x(this._field[2].data,[le.shape[0]+2,le.shape[1]+2]),this.padField(this._field[2],le),this.shape=le.shape.slice();for(var De=this.shape,Ge=0;Ge<2;++Ge)this._field[2].size>this._field[Ge].data.length&&(f.freeFloat(this._field[Ge].data),this._field[Ge].data=f.mallocFloat(this._field[2].size)),this._field[Ge]=x(this._field[Ge].data,[De[0]+2,De[1]+2]);if(ie.coords){var ht=ie.coords;if(!Array.isArray(ht)||ht.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(Ge=0;Ge<2;++Ge){var it=ht[Ge];for(qe=0;qe<2;++qe)if(it.shape[qe]!==De[qe])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[Ge],it)}}else if(ie.ticks){var Oe=ie.ticks;if(!Array.isArray(Oe)||Oe.length!==2)throw new Error("gl-surface: invalid ticks");for(Ge=0;Ge<2;++Ge){var ze=Oe[Ge];if((Array.isArray(ze)||ze.length)&&(ze=x(ze)),ze.shape[0]!==De[Ge])throw new Error("gl-surface: invalid tick length");var ct=x(ze.data,De);ct.stride[Ge]=ze.stride[0],ct.stride[Ge^1]=0,this.padField(this._field[Ge],ct)}}else{for(Ge=0;Ge<2;++Ge){var et=[0,0];et[Ge]=1,this._field[Ge]=x(this._field[Ge].data,[De[0]+2,De[1]+2],et,0)}this._field[0].set(0,0,0);for(var qe=0;qe0){for(var oa=0;oa<5;++oa)xr.pop();wt-=1}continue e}}}Dt.push(wt)}this._contourOffsets[Fr]=Cn,this._contourCounts[Fr]=Dt}var Ma=f.mallocFloat(xr.length);for(Ge=0;GeB||I<0||I>B)throw new Error("gl-texture2d: Invalid texture size");return F._shape=[E,I],F.bind(),R.texImage2D(R.TEXTURE_2D,0,F.format,E,I,0,F.format,F.type,null),F._mipLevels=[0],F}function y(F,E,I,R,B,O){this.gl=F,this.handle=E,this.format=B,this.type=O,this._shape=[I,R],this._mipLevels=[0],this._magFilter=F.NEAREST,this._minFilter=F.NEAREST,this._wrapS=F.CLAMP_TO_EDGE,this._wrapT=F.CLAMP_TO_EDGE,this._anisoSamples=1;var V=this,j=[this._wrapS,this._wrapT];Object.defineProperties(j,[{get:function(){return V._wrapS},set:function(U){return V.wrapS=U}},{get:function(){return V._wrapT},set:function(U){return V.wrapT=U}}]),this._wrapVector=j;var q=[this._shape[0],this._shape[1]];Object.defineProperties(q,[{get:function(){return V._shape[0]},set:function(U){return V.width=U}},{get:function(){return V._shape[1]},set:function(U){return V.height=U}}]),this._shapeVector=q}var C=y.prototype;Object.defineProperties(C,{minFilter:{get:function(){return this._minFilter},set:function(F){this.bind();var E=this.gl;if(this.type===E.FLOAT&&c.indexOf(F)>=0&&(E.getExtension("OES_texture_float_linear")||(F=E.NEAREST)),f.indexOf(F)<0)throw new Error("gl-texture2d: Unknown filter mode "+F);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MIN_FILTER,F),this._minFilter=F}},magFilter:{get:function(){return this._magFilter},set:function(F){this.bind();var E=this.gl;if(this.type===E.FLOAT&&c.indexOf(F)>=0&&(E.getExtension("OES_texture_float_linear")||(F=E.NEAREST)),f.indexOf(F)<0)throw new Error("gl-texture2d: Unknown filter mode "+F);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MAG_FILTER,F),this._magFilter=F}},mipSamples:{get:function(){return this._anisoSamples},set:function(F){var E=this._anisoSamples;if(this._anisoSamples=Math.max(F,1)|0,E!==this._anisoSamples){var I=this.gl.getExtension("EXT_texture_filter_anisotropic");I&&this.gl.texParameterf(this.gl.TEXTURE_2D,I.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(F){if(this.bind(),v.indexOf(F)<0)throw new Error("gl-texture2d: Unknown wrap mode "+F);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,F),this._wrapS=F}},wrapT:{get:function(){return this._wrapT},set:function(F){if(this.bind(),v.indexOf(F)<0)throw new Error("gl-texture2d: Unknown wrap mode "+F);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,F),this._wrapT=F}},wrap:{get:function(){return this._wrapVector},set:function(F){if(Array.isArray(F)||(F=[F,F]),F.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var E=0;E<2;++E)if(v.indexOf(F[E])<0)throw new Error("gl-texture2d: Unknown wrap mode "+F);this._wrapS=F[0],this._wrapT=F[1];var I=this.gl;return this.bind(),I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_S,this._wrapS),I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_T,this._wrapT),F}},shape:{get:function(){return this._shapeVector},set:function(F){if(!Array.isArray(F))F=[F|0,F|0];else if(F.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return _(this,F[0]|0,F[1]|0),[F[0]|0,F[1]|0]}},width:{get:function(){return this._shape[0]},set:function(F){return F=F|0,_(this,F,this._shape[1]),F}},height:{get:function(){return this._shape[1]},set:function(F){return F=F|0,_(this,this._shape[0],F),F}}}),C.bind=function(F){var E=this.gl;return F!==void 0&&E.activeTexture(E.TEXTURE0+(F|0)),E.bindTexture(E.TEXTURE_2D,this.handle),F!==void 0?F|0:E.getParameter(E.ACTIVE_TEXTURE)-E.TEXTURE0},C.dispose=function(){this.gl.deleteTexture(this.handle)},C.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var F=Math.min(this._shape[0],this._shape[1]),E=0;F>0;++E,F>>>=1)this._mipLevels.indexOf(E)<0&&this._mipLevels.push(E)},C.setPixels=function(F,E,I,R){var B=this.gl;this.bind(),Array.isArray(E)?(R=I,I=E[1]|0,E=E[0]|0):(E=E||0,I=I||0),R=R||0;var O=p(F)?F:F.raw;if(O){var V=this._mipLevels.indexOf(R)<0;V?(B.texImage2D(B.TEXTURE_2D,0,this.format,this.format,this.type,O),this._mipLevels.push(R)):B.texSubImage2D(B.TEXTURE_2D,R,E,I,this.format,this.type,O)}else if(F.shape&&F.stride&&F.data){if(F.shape.length<2||E+F.shape[1]>this._shape[1]>>>R||I+F.shape[0]>this._shape[0]>>>R||E<0||I<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");S(B,E,I,R,this.format,this.type,this._mipLevels,F)}else throw new Error("gl-texture2d: Unsupported data type")};function k(F,E){return F.length===3?E[2]===1&&E[1]===F[0]*F[2]&&E[0]===F[2]:E[0]===1&&E[1]===F[0]}function S(F,E,I,R,B,O,V,j){var q=j.dtype,U=j.shape.slice();if(U.length<2||U.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var J=0,ee=0,ce=k(U,j.stride.slice());q==="float32"?J=F.FLOAT:q==="float64"?(J=F.FLOAT,ce=!1,q="float32"):q==="uint8"?J=F.UNSIGNED_BYTE:(J=F.UNSIGNED_BYTE,ce=!1,q="uint8");var ye=1;if(U.length===2)ee=F.LUMINANCE,U=[U[0],U[1],1],j=s(j.data,U,[j.stride[0],j.stride[1],1],j.offset);else if(U.length===3){if(U[2]===1)ee=F.ALPHA;else if(U[2]===2)ee=F.LUMINANCE_ALPHA;else if(U[2]===3)ee=F.RGB;else if(U[2]===4)ee=F.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");ye=U[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((ee===F.LUMINANCE||ee===F.ALPHA)&&(B===F.LUMINANCE||B===F.ALPHA)&&(ee=B),ee!==B)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var xe=j.size,ue=V.indexOf(R)<0;if(ue&&V.push(R),J===O&&ce)j.offset===0&&j.data.length===xe?ue?F.texImage2D(F.TEXTURE_2D,R,B,U[0],U[1],0,B,O,j.data):F.texSubImage2D(F.TEXTURE_2D,R,E,I,U[0],U[1],B,O,j.data):ue?F.texImage2D(F.TEXTURE_2D,R,B,U[0],U[1],0,B,O,j.data.subarray(j.offset,j.offset+xe)):F.texSubImage2D(F.TEXTURE_2D,R,E,I,U[0],U[1],B,O,j.data.subarray(j.offset,j.offset+xe));else{var K;O===F.FLOAT?K=u.mallocFloat32(xe):K=u.mallocUint8(xe);var _e=s(K,U,[U[2],U[2]*U[0],1]);J===F.FLOAT&&O===F.UNSIGNED_BYTE?x(_e,j):l.assign(_e,j),ue?F.texImage2D(F.TEXTURE_2D,R,B,U[0],U[1],0,B,O,K.subarray(0,xe)):F.texSubImage2D(F.TEXTURE_2D,R,E,I,U[0],U[1],B,O,K.subarray(0,xe)),O===F.FLOAT?u.freeFloat32(K):u.freeUint8(K)}}function L(F){var E=F.createTexture();return F.bindTexture(F.TEXTURE_2D,E),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_MIN_FILTER,F.NEAREST),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_MAG_FILTER,F.NEAREST),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_S,F.CLAMP_TO_EDGE),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_T,F.CLAMP_TO_EDGE),E}function w(F,E,I,R,B){var O=F.getParameter(F.MAX_TEXTURE_SIZE);if(E<0||E>O||I<0||I>O)throw new Error("gl-texture2d: Invalid texture shape");if(B===F.FLOAT&&!F.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var V=L(F);return F.texImage2D(F.TEXTURE_2D,0,R,E,I,0,R,B,null),new y(F,V,E,I,R,B)}function A(F,E,I,R,B,O){var V=L(F);return F.texImage2D(F.TEXTURE_2D,0,B,B,O,E),new y(F,V,I,R,B,O)}function T(F,E){var I=E.dtype,R=E.shape.slice(),B=F.getParameter(F.MAX_TEXTURE_SIZE);if(R[0]<0||R[0]>B||R[1]<0||R[1]>B)throw new Error("gl-texture2d: Invalid texture size");var O=k(R,E.stride.slice()),V=0;I==="float32"?V=F.FLOAT:I==="float64"?(V=F.FLOAT,O=!1,I="float32"):I==="uint8"?V=F.UNSIGNED_BYTE:(V=F.UNSIGNED_BYTE,O=!1,I="uint8");var j=0;if(R.length===2)j=F.LUMINANCE,R=[R[0],R[1],1],E=s(E.data,R,[E.stride[0],E.stride[1],1],E.offset);else if(R.length===3)if(R[2]===1)j=F.ALPHA;else if(R[2]===2)j=F.LUMINANCE_ALPHA;else if(R[2]===3)j=F.RGB;else if(R[2]===4)j=F.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");V===F.FLOAT&&!F.getExtension("OES_texture_float")&&(V=F.UNSIGNED_BYTE,O=!1);var q,U,J=E.size;if(O)E.offset===0&&E.data.length===J?q=E.data:q=E.data.subarray(E.offset,E.offset+J);else{var ee=[R[2],R[2]*R[0],1];U=u.malloc(J,I);var ce=s(U,R,ee,0);(I==="float32"||I==="float64")&&V===F.UNSIGNED_BYTE?x(ce,E):l.assign(ce,E),q=U.subarray(0,J)}var ye=L(F);return F.texImage2D(F.TEXTURE_2D,0,j,R[0],R[1],0,j,V,q),O||u.free(U),new y(F,ye,R[0],R[1],j,V)}function m(F){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||g(F),typeof arguments[1]=="number")return w(F,arguments[1],arguments[2],arguments[3]||F.RGBA,arguments[4]||F.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return w(F,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||F.RGBA,arguments[3]||F.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var E=arguments[1],I=p(E)?E:E.raw;if(I)return A(F,I,E.width|0,E.height|0,arguments[2]||F.RGBA,arguments[3]||F.UNSIGNED_BYTE);if(E.shape&&E.data&&E.stride)return T(F,E)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}}),1433:(function(a){"use strict";function i(o,s,l){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var u=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(l){if(l.length>u)throw new Error("gl-vao: Too many vertex attributes");for(var c=0;c1?0:Math.acos(x)}}),9226:(function(a){a.exports=i;function i(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}}),3126:(function(a){a.exports=i;function i(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}}),3990:(function(a){a.exports=i;function i(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}}),1091:(function(a){a.exports=i;function i(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}}),5911:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=l[0],g=l[1],p=l[2];return o[0]=c*p-f*g,o[1]=f*v-u*p,o[2]=u*g-c*v,o}}),5455:(function(a,i,o){a.exports=o(7056)}),7056:(function(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return Math.sqrt(l*l+u*u+c*c)}}),4008:(function(a,i,o){a.exports=o(6690)}),6690:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o}}),244:(function(a){a.exports=i;function i(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}}),2613:(function(a){a.exports=1e-6}),9922:(function(a,i,o){a.exports=l;var s=o(2613);function l(u,c){var f=u[0],v=u[1],g=u[2],p=c[0],x=c[1],_=c[2];return Math.abs(f-p)<=s*Math.max(1,Math.abs(f),Math.abs(p))&&Math.abs(v-x)<=s*Math.max(1,Math.abs(v),Math.abs(x))&&Math.abs(g-_)<=s*Math.max(1,Math.abs(g),Math.abs(_))}}),9265:(function(a){a.exports=i;function i(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}}),2681:(function(a){a.exports=i;function i(o,s){return o[0]=Math.floor(s[0]),o[1]=Math.floor(s[1]),o[2]=Math.floor(s[2]),o}}),5137:(function(a,i,o){a.exports=l;var s=o(1091)();function l(u,c,f,v,g,p){var x,_;for(c||(c=3),f||(f=0),v?_=Math.min(v*c+f,u.length):_=u.length,x=f;x<_;x+=c)s[0]=u[x],s[1]=u[x+1],s[2]=u[x+2],g(s,s,p),u[x]=s[0],u[x+1]=s[1],u[x+2]=s[2];return u}}),2825:(function(a){a.exports=i;function i(o,s,l){var u=new Float32Array(3);return u[0]=o,u[1]=s,u[2]=l,u}}),2931:(function(a,i,o){a.exports={EPSILON:o(2613),create:o(1091),clone:o(3126),angle:o(8192),fromValues:o(2825),copy:o(3990),set:o(1463),equals:o(9922),exactEquals:o(9265),add:o(5632),subtract:o(6843),sub:o(2229),multiply:o(5847),mul:o(4505),divide:o(6690),div:o(4008),min:o(8107),max:o(7417),floor:o(2681),ceil:o(9226),round:o(2447),scale:o(6621),scaleAndAdd:o(8489),distance:o(7056),dist:o(5455),squaredDistance:o(2953),sqrDist:o(6141),length:o(1387),len:o(868),squaredLength:o(3066),sqrLen:o(5486),negate:o(5093),inverse:o(811),normalize:o(3536),dot:o(244),cross:o(5911),lerp:o(6658),random:o(7636),transformMat4:o(5673),transformMat3:o(492),transformQuat:o(264),rotateX:o(6894),rotateY:o(109),rotateZ:o(8692),forEach:o(5137)}}),811:(function(a){a.exports=i;function i(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o}}),868:(function(a,i,o){a.exports=o(1387)}),1387:(function(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2];return Math.sqrt(s*s+l*l+u*u)}}),6658:(function(a){a.exports=i;function i(o,s,l,u){var c=s[0],f=s[1],v=s[2];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=v+u*(l[2]-v),o}}),7417:(function(a){a.exports=i;function i(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o}}),8107:(function(a){a.exports=i;function i(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o}}),4505:(function(a,i,o){a.exports=o(5847)}),5847:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o}}),5093:(function(a){a.exports=i;function i(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o}}),3536:(function(a){a.exports=i;function i(o,s){var l=s[0],u=s[1],c=s[2],f=l*l+u*u+c*c;return f>0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}}),7636:(function(a){a.exports=i;function i(o,s){s=s||1;var l=Math.random()*2*Math.PI,u=Math.random()*2-1,c=Math.sqrt(1-u*u)*s;return o[0]=Math.cos(l)*c,o[1]=Math.sin(l)*c,o[2]=u*s,o}}),6894:(function(a){a.exports=i;function i(o,s,l,u){var c=l[1],f=l[2],v=s[1]-c,g=s[2]-f,p=Math.sin(u),x=Math.cos(u);return o[0]=s[0],o[1]=c+v*x-g*p,o[2]=f+v*p+g*x,o}}),109:(function(a){a.exports=i;function i(o,s,l,u){var c=l[0],f=l[2],v=s[0]-c,g=s[2]-f,p=Math.sin(u),x=Math.cos(u);return o[0]=c+g*p+v*x,o[1]=s[1],o[2]=f+g*x-v*p,o}}),8692:(function(a){a.exports=i;function i(o,s,l,u){var c=l[0],f=l[1],v=s[0]-c,g=s[1]-f,p=Math.sin(u),x=Math.cos(u);return o[0]=c+v*x-g*p,o[1]=f+v*p+g*x,o[2]=s[2],o}}),2447:(function(a){a.exports=i;function i(o,s){return o[0]=Math.round(s[0]),o[1]=Math.round(s[1]),o[2]=Math.round(s[2]),o}}),6621:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o}}),8489:(function(a){a.exports=i;function i(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o}}),1463:(function(a){a.exports=i;function i(o,s,l,u){return o[0]=s,o[1]=l,o[2]=u,o}}),6141:(function(a,i,o){a.exports=o(2953)}),5486:(function(a,i,o){a.exports=o(3066)}),2953:(function(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return l*l+u*u+c*c}}),3066:(function(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2];return s*s+l*l+u*u}}),2229:(function(a,i,o){a.exports=o(6843)}),6843:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o}}),492:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2];return o[0]=u*l[0]+c*l[3]+f*l[6],o[1]=u*l[1]+c*l[4]+f*l[7],o[2]=u*l[2]+c*l[5]+f*l[8],o}}),5673:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=l[3]*u+l[7]*c+l[11]*f+l[15];return v=v||1,o[0]=(l[0]*u+l[4]*c+l[8]*f+l[12])/v,o[1]=(l[1]*u+l[5]*c+l[9]*f+l[13])/v,o[2]=(l[2]*u+l[6]*c+l[10]*f+l[14])/v,o}}),264:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=l[0],g=l[1],p=l[2],x=l[3],_=x*u+g*f-p*c,y=x*c+p*u-v*f,C=x*f+v*c-g*u,k=-v*u-g*c-p*f;return o[0]=_*x+k*-v+y*-p-C*-g,o[1]=y*x+k*-g+C*-v-_*-p,o[2]=C*x+k*-p+_*-g-y*-v,o}}),4361:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o[3]=s[3]+l[3],o}}),2335:(function(a){a.exports=i;function i(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}}),2933:(function(a){a.exports=i;function i(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}}),7536:(function(a){a.exports=i;function i(){var o=new Float32Array(4);return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o}}),4691:(function(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return Math.sqrt(l*l+u*u+c*c+f*f)}}),1373:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o[3]=s[3]/l[3],o}}),3750:(function(a){a.exports=i;function i(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]*s[3]}}),3390:(function(a){a.exports=i;function i(o,s,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}}),9970:(function(a,i,o){a.exports={create:o(7536),clone:o(2335),fromValues:o(3390),copy:o(2933),set:o(4578),add:o(4361),subtract:o(6860),multiply:o(3576),divide:o(1373),min:o(2334),max:o(160),scale:o(9288),scaleAndAdd:o(4844),distance:o(4691),squaredDistance:o(7960),length:o(6808),squaredLength:o(483),negate:o(1498),inverse:o(4494),normalize:o(5177),dot:o(3750),lerp:o(2573),random:o(9131),transformMat4:o(5352),transformQuat:o(4041)}}),4494:(function(a){a.exports=i;function i(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}}),6808:(function(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2],c=o[3];return Math.sqrt(s*s+l*l+u*u+c*c)}}),2573:(function(a){a.exports=i;function i(o,s,l,u){var c=s[0],f=s[1],v=s[2],g=s[3];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=v+u*(l[2]-v),o[3]=g+u*(l[3]-g),o}}),160:(function(a){a.exports=i;function i(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o[3]=Math.max(s[3],l[3]),o}}),2334:(function(a){a.exports=i;function i(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o[3]=Math.min(s[3],l[3]),o}}),3576:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o[3]=s[3]*l[3],o}}),1498:(function(a){a.exports=i;function i(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o[3]=-s[3],o}}),5177:(function(a){a.exports=i;function i(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],v=l*l+u*u+c*c+f*f;return v>0&&(v=1/Math.sqrt(v),o[0]=l*v,o[1]=u*v,o[2]=c*v,o[3]=f*v),o}}),9131:(function(a,i,o){var s=o(5177),l=o(9288);a.exports=u;function u(c,f){return f=f||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),s(c,c),l(c,c,f),c}}),9288:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o}}),4844:(function(a){a.exports=i;function i(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o[3]=s[3]+l[3]*u,o}}),4578:(function(a){a.exports=i;function i(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}}),7960:(function(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return l*l+u*u+c*c+f*f}}),483:(function(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2],c=o[3];return s*s+l*l+u*u+c*c}}),6860:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o[3]=s[3]-l[3],o}}),5352:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=s[3];return o[0]=l[0]*u+l[4]*c+l[8]*f+l[12]*v,o[1]=l[1]*u+l[5]*c+l[9]*f+l[13]*v,o[2]=l[2]*u+l[6]*c+l[10]*f+l[14]*v,o[3]=l[3]*u+l[7]*c+l[11]*f+l[15]*v,o}}),4041:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=l[0],g=l[1],p=l[2],x=l[3],_=x*u+g*f-p*c,y=x*c+p*u-v*f,C=x*f+v*c-g*u,k=-v*u-g*c-p*f;return o[0]=_*x+k*-v+y*-p-C*-g,o[1]=y*x+k*-g+C*-v-_*-p,o[2]=C*x+k*-p+_*-g-y*-v,o[3]=s[3],o}}),1848:(function(a,i,o){var s=o(4905),l=o(6468);a.exports=u;function u(c){for(var f=Array.isArray(c)?c:s(c),v=0;v0)continue;ot=Te.slice(0,1).join("")}return me(ot),xe+=ot.length,q=q.slice(ot.length),q.length}while(!0)}function qe(){return/[^a-fA-F0-9]/.test(V)?(me(q.join("")),O=v,R):(q.push(V),j=V,R+1)}function we(){return V==="."||/[eE]/.test(V)?(q.push(V),O=k,j=V,R+1):V==="x"&&q.length===1&&q[0]==="0"?(O=m,q.push(V),j=V,R+1):/[^\d]/.test(V)?(me(q.join("")),O=v,R):(q.push(V),j=V,R+1)}function Le(){return V==="f"&&(q.push(V),j=V,R+=1),/[eE]/.test(V)||(V==="-"||V==="+")&&/[eE]/.test(j)?(q.push(V),j=V,R+1):/[^\d]/.test(V)?(me(q.join("")),O=v,R):(q.push(V),j=V,R+1)}function Ke(){if(/[^\d\w_]/.test(V)){var Te=q.join("");return le[Te]?O=w:ie[Te]?O=L:O=S,me(q.join("")),O=v,R}return q.push(V),j=V,R+1}}}),3508:(function(a,i,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\_|texture)/.test(l)}),a.exports=s.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])}),6852:(function(a){a.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]}),7932:(function(a,i,o){var s=o(620);a.exports=s.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])}),620:(function(a){a.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]}),7827:(function(a){a.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]}),4905:(function(a,i,o){var s=o(5874);a.exports=l;function l(u,c){var f=s(c),v=[];return v=v.concat(f(u)),v=v.concat(f(null)),v}}),3236:(function(a){a.exports=function(i){typeof i=="string"&&(i=[i]);for(var o=[].slice.call(arguments,1),s=[],l=0;l>1,_=-7,y=l?c-1:0,C=l?-1:1,k=o[s+y];for(y+=C,f=k&(1<<-_)-1,k>>=-_,_+=g;_>0;f=f*256+o[s+y],y+=C,_-=8);for(v=f&(1<<-_)-1,f>>=-_,_+=u;_>0;v=v*256+o[s+y],y+=C,_-=8);if(f===0)f=1-x;else{if(f===p)return v?NaN:(k?-1:1)*(1/0);v=v+Math.pow(2,u),f=f-x}return(k?-1:1)*v*Math.pow(2,f-u)},i.write=function(o,s,l,u,c,f){var v,g,p,x=f*8-c-1,_=(1<>1,C=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=u?0:f-1,S=u?1:-1,L=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(g=isNaN(s)?1:0,v=_):(v=Math.floor(Math.log(s)/Math.LN2),s*(p=Math.pow(2,-v))<1&&(v--,p*=2),v+y>=1?s+=C/p:s+=C*Math.pow(2,1-y),s*p>=2&&(v++,p/=2),v+y>=_?(g=0,v=_):v+y>=1?(g=(s*p-1)*Math.pow(2,c),v=v+y):(g=s*Math.pow(2,y-1)*Math.pow(2,c),v=0));c>=8;o[l+k]=g&255,k+=S,g/=256,c-=8);for(v=v<0;o[l+k]=v&255,k+=S,v/=256,x-=8);o[l+k-S]|=L*128}}),8954:(function(a,i,o){"use strict";a.exports=y;var s=o(3250),l=o(6803).Fw;function u(C,k,S){this.vertices=C,this.adjacent=k,this.boundary=S,this.lastVisited=-1}u.prototype.flip=function(){var C=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=C;var k=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=k};function c(C,k,S){this.vertices=C,this.cell=k,this.index=S}function f(C,k){return l(C.vertices,k.vertices)}function v(C){return function(){var k=this.tuple;return C.apply(this,k)}}function g(C){var k=s[C+1];return k||(k=s),v(k)}var p=[];function x(C,k,S){this.dimension=C,this.vertices=k,this.simplices=S,this.interior=S.filter(function(A){return!A.boundary}),this.tuple=new Array(C+1);for(var L=0;L<=C;++L)this.tuple[L]=this.vertices[L];var w=p[C];w||(w=p[C]=g(C)),this.orient=w}var _=x.prototype;_.handleBoundaryDegeneracy=function(C,k){var S=this.dimension,L=this.vertices.length-1,w=this.tuple,A=this.vertices,T=[C];for(C.lastVisited=-L;T.length>0;){C=T.pop();for(var m=C.adjacent,F=0;F<=S;++F){var E=m[F];if(!(!E.boundary||E.lastVisited<=-L)){for(var I=E.vertices,R=0;R<=S;++R){var B=I[R];B<0?w[R]=k:w[R]=A[B]}var O=this.orient();if(O>0)return E;E.lastVisited=-L,O===0&&T.push(E)}}}return null},_.walk=function(C,k){var S=this.vertices.length-1,L=this.dimension,w=this.vertices,A=this.tuple,T=k?this.interior.length*Math.random()|0:this.interior.length-1,m=this.interior[T];e:for(;!m.boundary;){for(var F=m.vertices,E=m.adjacent,I=0;I<=L;++I)A[I]=w[F[I]];m.lastVisited=S;for(var I=0;I<=L;++I){var R=E[I];if(!(R.lastVisited>=S)){var B=A[I];A[I]=C;var O=this.orient();if(A[I]=B,O<0){m=R;continue e}else R.boundary?R.lastVisited=-S:R.lastVisited=S}}return}return m},_.addPeaks=function(C,k){var S=this.vertices.length-1,L=this.dimension,w=this.vertices,A=this.tuple,T=this.interior,m=this.simplices,F=[k];k.lastVisited=S,k.vertices[k.vertices.indexOf(-1)]=S,k.boundary=!1,T.push(k);for(var E=[];F.length>0;){var k=F.pop(),I=k.vertices,R=k.adjacent,B=I.indexOf(S);if(!(B<0)){for(var O=0;O<=L;++O)if(O!==B){var V=R[O];if(!(!V.boundary||V.lastVisited>=S)){var j=V.vertices;if(V.lastVisited!==-S){for(var q=0,U=0;U<=L;++U)j[U]<0?(q=U,A[U]=C):A[U]=w[j[U]];var J=this.orient();if(J>0){j[q]=S,V.boundary=!1,T.push(V),F.push(V),V.lastVisited=S;continue}else V.lastVisited=-S}var ee=V.adjacent,ce=I.slice(),ye=R.slice(),xe=new u(ce,ye,!0);m.push(xe);var ue=ee.indexOf(k);if(!(ue<0)){ee[ue]=xe,ye[B]=V,ce[O]=-1,ye[O]=k,R[O]=xe,xe.flip();for(var U=0;U<=L;++U){var K=ce[U];if(!(K<0||K===S)){for(var _e=new Array(L-1),ne=0,ae=0;ae<=L;++ae){var pe=ce[ae];pe<0||ae===U||(_e[ne++]=pe)}E.push(new c(_e,xe,U))}}}}}}}E.sort(f);for(var O=0;O+1=0?T[F++]=m[I]:E=I&1;if(E===(C&1)){var R=T[0];T[0]=T[1],T[1]=R}k.push(T)}}return k};function y(C,k){var S=C.length;if(S===0)throw new Error("Must have at least d+1 points");var L=C[0].length;if(S<=L)throw new Error("Must input at least d+1 points");var w=C.slice(0,L+1),A=s.apply(void 0,w);if(A===0)throw new Error("Input not in general position");for(var T=new Array(L+1),m=0;m<=L;++m)T[m]=m;A<0&&(T[0]=1,T[1]=0);for(var F=new u(T,new Array(L+1),!1),E=F.adjacent,I=new Array(L+2),m=0;m<=L;++m){for(var R=T.slice(),B=0;B<=L;++B)B===m&&(R[B]=-1);var O=R[0];R[0]=R[1],R[1]=O;var V=new u(R,new Array(L+1),!0);E[m]=V,I[m]=V}I[L+1]=F;for(var m=0;m<=L;++m)for(var R=E[m].vertices,j=E[m].adjacent,B=0;B<=L;++B){var q=R[B];if(q<0){j[B]=F;continue}for(var U=0;U<=L;++U)E[U].vertices.indexOf(q)<0&&(j[B]=E[U])}for(var J=new x(L,w,I),ee=!!k,m=L+1;m3*(I+1)?x(this,E):this.left.insert(E):this.left=A([E]);else if(E[0]>this.mid)this.right?4*(this.right.count+1)>3*(I+1)?x(this,E):this.right.insert(E):this.right=A([E]);else{var R=s.ge(this.leftPoints,E,L),B=s.ge(this.rightPoints,E,w);this.leftPoints.splice(R,0,E),this.rightPoints.splice(B,0,E)}},v.remove=function(E){var I=this.count-this.leftPoints;if(E[1]3*(I-1))return _(this,E);var B=this.left.remove(E);return B===c?(this.left=null,this.count-=1,u):(B===u&&(this.count-=1),B)}else if(E[0]>this.mid){if(!this.right)return l;var O=this.left?this.left.count:0;if(4*O>3*(I-1))return _(this,E);var B=this.right.remove(E);return B===c?(this.right=null,this.count-=1,u):(B===u&&(this.count-=1),B)}else{if(this.count===1)return this.leftPoints[0]===E?c:l;if(this.leftPoints.length===1&&this.leftPoints[0]===E){if(this.left&&this.right){for(var V=this,j=this.left;j.right;)V=j,j=j.right;if(V===this)j.right=this.right;else{var q=this.left,B=this.right;V.count-=j.count,V.right=j.left,j.left=q,j.right=B}g(this,j),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 u}for(var q=s.ge(this.leftPoints,E,L);q=0&&E[B][1]>=I;--B){var O=R(E[B]);if(O)return O}}function k(E,I){for(var R=0;Rthis.mid){if(this.right){var R=this.right.queryPoint(E,I);if(R)return R}return C(this.rightPoints,E,I)}else return k(this.leftPoints,I)},v.queryInterval=function(E,I,R){if(Ethis.mid&&this.right){var B=this.right.queryInterval(E,I,R);if(B)return B}return Ithis.mid?C(this.rightPoints,E,R):k(this.leftPoints,R)};function S(E,I){return E-I}function L(E,I){var R=E[0]-I[0];return R||E[1]-I[1]}function w(E,I){var R=E[1]-I[1];return R||E[0]-I[0]}function A(E){if(E.length===0)return null;for(var I=[],R=0;R>1],O=[],V=[],j=[],R=0;R13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}}),395:(function(a){function i(o,s,l){return o*(1-l)+s*l}a.exports=i}),2652:(function(a,i,o){var s=o(4335),l=o(6864),u=o(1903),c=o(9921),f=o(7608),v=o(5665),g={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},p=l(),x=l(),_=[0,0,0,0],y=[[0,0,0],[0,0,0],[0,0,0]],C=[0,0,0];a.exports=function(A,T,m,F,E,I){if(T||(T=[0,0,0]),m||(m=[0,0,0]),F||(F=[0,0,0]),E||(E=[0,0,0,1]),I||(I=[0,0,0,1]),!s(p,A)||(u(x,p),x[3]=0,x[7]=0,x[11]=0,x[15]=1,Math.abs(c(x)<1e-8)))return!1;var R=p[3],B=p[7],O=p[11],V=p[12],j=p[13],q=p[14],U=p[15];if(R!==0||B!==0||O!==0){_[0]=R,_[1]=B,_[2]=O,_[3]=U;var J=f(x,x);if(!J)return!1;v(x,x),k(E,_,x)}else E[0]=E[1]=E[2]=0,E[3]=1;if(T[0]=V,T[1]=j,T[2]=q,S(y,p),m[0]=g.length(y[0]),g.normalize(y[0],y[0]),F[0]=g.dot(y[0],y[1]),L(y[1],y[1],y[0],1,-F[0]),m[1]=g.length(y[1]),g.normalize(y[1],y[1]),F[0]/=m[1],F[1]=g.dot(y[0],y[2]),L(y[2],y[2],y[0],1,-F[1]),F[2]=g.dot(y[1],y[2]),L(y[2],y[2],y[1],1,-F[2]),m[2]=g.length(y[2]),g.normalize(y[2],y[2]),F[1]/=m[2],F[2]/=m[2],g.cross(C,y[1],y[2]),g.dot(y[0],C)<0)for(var ee=0;ee<3;ee++)m[ee]*=-1,y[ee][0]*=-1,y[ee][1]*=-1,y[ee][2]*=-1;return I[0]=.5*Math.sqrt(Math.max(1+y[0][0]-y[1][1]-y[2][2],0)),I[1]=.5*Math.sqrt(Math.max(1-y[0][0]+y[1][1]-y[2][2],0)),I[2]=.5*Math.sqrt(Math.max(1-y[0][0]-y[1][1]+y[2][2],0)),I[3]=.5*Math.sqrt(Math.max(1+y[0][0]+y[1][1]+y[2][2],0)),y[2][1]>y[1][2]&&(I[0]=-I[0]),y[0][2]>y[2][0]&&(I[1]=-I[1]),y[1][0]>y[0][1]&&(I[2]=-I[2]),!0};function k(w,A,T){var m=A[0],F=A[1],E=A[2],I=A[3];return w[0]=T[0]*m+T[4]*F+T[8]*E+T[12]*I,w[1]=T[1]*m+T[5]*F+T[9]*E+T[13]*I,w[2]=T[2]*m+T[6]*F+T[10]*E+T[14]*I,w[3]=T[3]*m+T[7]*F+T[11]*E+T[15]*I,w}function S(w,A){w[0][0]=A[0],w[0][1]=A[1],w[0][2]=A[2],w[1][0]=A[4],w[1][1]=A[5],w[1][2]=A[6],w[2][0]=A[8],w[2][1]=A[9],w[2][2]=A[10]}function L(w,A,T,m,F){w[0]=A[0]*m+T[0]*F,w[1]=A[1]*m+T[1]*F,w[2]=A[2]*m+T[2]*F}}),4335:(function(a){a.exports=function(o,s){var l=s[15];if(l===0)return!1;for(var u=1/l,c=0;c<16;c++)o[c]=s[c]*u;return!0}}),7442:(function(a,i,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),v=_(),g=_(),p=_();a.exports=x;function x(k,S,L,w){if(c(S)===0||c(L)===0)return!1;var A=u(S,v.translate,v.scale,v.skew,v.perspective,v.quaternion),T=u(L,g.translate,g.scale,g.skew,g.perspective,g.quaternion);return!A||!T?!1:(s(p.translate,v.translate,g.translate,w),s(p.skew,v.skew,g.skew,w),s(p.scale,v.scale,g.scale,w),s(p.perspective,v.perspective,g.perspective,w),f(p.quaternion,v.quaternion,g.quaternion,w),l(k,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}function _(){return{translate:y(),scale:y(1),skew:y(),perspective:C(),quaternion:C()}}function y(k){return[k||0,k||0,k||0]}function C(){return[0,0,0,1]}}),7182:(function(a,i,o){var s={identity:o(7894),translate:o(7656),multiply:o(6760),create:o(6864),scale:o(2504),fromRotationTranslation:o(6743)},l=s.create(),u=s.create();a.exports=function(f,v,g,p,x,_){return s.identity(f),s.fromRotationTranslation(f,_,v),f[3]=x[0],f[7]=x[1],f[11]=x[2],f[15]=x[3],s.identity(u),p[2]!==0&&(u[9]=p[2],s.multiply(f,f,u)),p[1]!==0&&(u[9]=0,u[8]=p[1],s.multiply(f,f,u)),p[0]!==0&&(u[8]=0,u[4]=p[0],s.multiply(f,f,u)),s.scale(f,f,g),f}}),1811:(function(a,i,o){"use strict";var s=o(2478),l=o(7442),u=o(7608),c=o(5567),f=o(2408),v=o(7089),g=o(6582),p=o(7656),x=o(2504),_=o(3536),y=[0,0,0];a.exports=L;function C(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 k=C.prototype;k.recalcMatrix=function(w){var A=this._time,T=s.le(A,w),m=this.computedMatrix;if(!(T<0)){var F=this._components;if(T===A.length-1)for(var E=16*T,I=0;I<16;++I)m[I]=F[E++];else{for(var R=A[T+1]-A[T],E=16*T,B=this.prevMatrix,O=!0,I=0;I<16;++I)B[I]=F[E++];for(var V=this.nextMatrix,I=0;I<16;++I)V[I]=F[E++],O=O&&B[I]===V[I];if(R<1e-6||O)for(var I=0;I<16;++I)m[I]=B[I];else l(m,B,V,(w-A[T])/R)}var j=this.computedUp;j[0]=m[1],j[1]=m[5],j[2]=m[9],_(j,j);var q=this.computedInverse;u(q,m);var U=this.computedEye,J=q[15];U[0]=q[12]/J,U[1]=q[13]/J,U[2]=q[14]/J;for(var ee=this.computedCenter,ce=Math.exp(this.computedRadius[0]),I=0;I<3;++I)ee[I]=U[I]-m[2+4*I]*ce}},k.idle=function(w){if(!(w1&&s(u[g[y-2]],u[g[y-1]],_)<=0;)y-=1,g.pop();for(g.push(x),y=p.length;y>1&&s(u[p[y-2]],u[p[y-1]],_)>=0;)y-=1,p.pop();p.push(x)}for(var C=new Array(p.length+g.length-2),k=0,f=0,S=g.length;f0;--L)C[k++]=p[L];return C}}),351:(function(a,i,o){"use strict";a.exports=l;var s=o(4687);function l(u,c){c||(c=u,u=window);var f=0,v=0,g=0,p={shift:!1,alt:!1,control:!1,meta:!1},x=!1;function _(E){var I=!1;return"altKey"in E&&(I=I||E.altKey!==p.alt,p.alt=!!E.altKey),"shiftKey"in E&&(I=I||E.shiftKey!==p.shift,p.shift=!!E.shiftKey),"ctrlKey"in E&&(I=I||E.ctrlKey!==p.control,p.control=!!E.ctrlKey),"metaKey"in E&&(I=I||E.metaKey!==p.meta,p.meta=!!E.metaKey),I}function y(E,I){var R=s.x(I),B=s.y(I);"buttons"in I&&(E=I.buttons|0),(E!==f||R!==v||B!==g||_(I))&&(f=E|0,v=R||0,g=B||0,c&&c(f,v,g,p))}function C(E){y(0,E)}function k(){(f||v||g||p.shift||p.alt||p.meta||p.control)&&(v=g=0,f=0,p.shift=p.alt=p.control=p.meta=!1,c&&c(0,0,0,p))}function S(E){_(E)&&c&&c(f,v,g,p)}function L(E){s.buttons(E)===0?y(0,E):y(f,E)}function w(E){y(f|s.buttons(E),E)}function A(E){y(f&~s.buttons(E),E)}function T(){x||(x=!0,u.addEventListener("mousemove",L),u.addEventListener("mousedown",w),u.addEventListener("mouseup",A),u.addEventListener("mouseleave",C),u.addEventListener("mouseenter",C),u.addEventListener("mouseout",C),u.addEventListener("mouseover",C),u.addEventListener("blur",k),u.addEventListener("keyup",S),u.addEventListener("keydown",S),u.addEventListener("keypress",S),u!==window&&(window.addEventListener("blur",k),window.addEventListener("keyup",S),window.addEventListener("keydown",S),window.addEventListener("keypress",S)))}function m(){x&&(x=!1,u.removeEventListener("mousemove",L),u.removeEventListener("mousedown",w),u.removeEventListener("mouseup",A),u.removeEventListener("mouseleave",C),u.removeEventListener("mouseenter",C),u.removeEventListener("mouseout",C),u.removeEventListener("mouseover",C),u.removeEventListener("blur",k),u.removeEventListener("keyup",S),u.removeEventListener("keydown",S),u.removeEventListener("keypress",S),u!==window&&(window.removeEventListener("blur",k),window.removeEventListener("keyup",S),window.removeEventListener("keydown",S),window.removeEventListener("keypress",S)))}T();var F={element:u};return Object.defineProperties(F,{enabled:{get:function(){return x},set:function(E){E?T():m()},enumerable:!0},buttons:{get:function(){return f},enumerable:!0},x:{get:function(){return v},enumerable:!0},y:{get:function(){return g},enumerable:!0},mods:{get:function(){return p},enumerable:!0}}),F}}),24:(function(a){var i={left:0,top:0};a.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,v=l.clientY||0,g=s(u);return c[0]=f-g.left,c[1]=v-g.top,c}function s(l){return l===window||l===document||l===document.body?i:l.getBoundingClientRect()}}),4687:(function(a,i){"use strict";function o(c){if(typeof c=="object"){if("buttons"in c)return c.buttons;if("which"in c){var f=c.which;if(f===2)return 4;if(f===3)return 2;if(f>0)return 1<=0)return 1<0){if(ye=1,K[ne++]=p(T[I],k,S,L),I+=J,w>0)for(ce=1,R=T[I],ae=K[ne]=p(R,k,S,L),le=K[ne+pe],De=K[ne+me],it=K[ne+Ge],(ae!==le||ae!==De||ae!==it)&&(O=T[I+B],j=T[I+V],U=T[I+q],v(ce,ye,R,O,j,U,ae,le,De,it,k,S,L),Oe=_e[ne]=xe++),ne+=1,I+=J,ce=2;ce0)for(ce=1,R=T[I],ae=K[ne]=p(R,k,S,L),le=K[ne+pe],De=K[ne+me],it=K[ne+Ge],(ae!==le||ae!==De||ae!==it)&&(O=T[I+B],j=T[I+V],U=T[I+q],v(ce,ye,R,O,j,U,ae,le,De,it,k,S,L),Oe=_e[ne]=xe++,it!==De&&g(_e[ne+me],Oe,j,U,De,it,k,S,L)),ne+=1,I+=J,ce=2;ce0){if(ce=1,K[ne++]=p(T[I],k,S,L),I+=J,A>0)for(ye=1,R=T[I],ae=K[ne]=p(R,k,S,L),De=K[ne+me],le=K[ne+pe],it=K[ne+Ge],(ae!==De||ae!==le||ae!==it)&&(O=T[I+B],j=T[I+V],U=T[I+q],v(ce,ye,R,O,j,U,ae,De,le,it,k,S,L),Oe=_e[ne]=xe++),ne+=1,I+=J,ye=2;ye0)for(ye=1,R=T[I],ae=K[ne]=p(R,k,S,L),De=K[ne+me],le=K[ne+pe],it=K[ne+Ge],(ae!==De||ae!==le||ae!==it)&&(O=T[I+B],j=T[I+V],U=T[I+q],v(ce,ye,R,O,j,U,ae,De,le,it,k,S,L),Oe=_e[ne]=xe++,it!==De&&g(_e[ne+me],Oe,U,O,it,De,k,S,L)),ne+=1,I+=J,ye=2;ye 0"),typeof f.vertex!="function"&&v("Must specify vertex creation function"),typeof f.cell!="function"&&v("Must specify cell creation function"),typeof f.phase!="function"&&v("Must specify phase function");for(var _=f.getters||[],y=new Array(p),C=0;C=0?y[C]=!0:y[C]=!1;return u(f.vertex,f.cell,f.phase,x,g,y)}}),6199:(function(a,i,o){"use strict";var s=o(1338),l={zero:function(L,w,A,T){var m=L[0],F=A[0];T|=0;var E=0,I=F;for(E=0;E2&&E[1]>2&&T(F.pick(-1,-1).lo(1,1).hi(E[0]-2,E[1]-2),m.pick(-1,-1,0).lo(1,1).hi(E[0]-2,E[1]-2),m.pick(-1,-1,1).lo(1,1).hi(E[0]-2,E[1]-2)),E[1]>2&&(A(F.pick(0,-1).lo(1).hi(E[1]-2),m.pick(0,-1,1).lo(1).hi(E[1]-2)),w(m.pick(0,-1,0).lo(1).hi(E[1]-2))),E[1]>2&&(A(F.pick(E[0]-1,-1).lo(1).hi(E[1]-2),m.pick(E[0]-1,-1,1).lo(1).hi(E[1]-2)),w(m.pick(E[0]-1,-1,0).lo(1).hi(E[1]-2))),E[0]>2&&(A(F.pick(-1,0).lo(1).hi(E[0]-2),m.pick(-1,0,0).lo(1).hi(E[0]-2)),w(m.pick(-1,0,1).lo(1).hi(E[0]-2))),E[0]>2&&(A(F.pick(-1,E[1]-1).lo(1).hi(E[0]-2),m.pick(-1,E[1]-1,0).lo(1).hi(E[0]-2)),w(m.pick(-1,E[1]-1,1).lo(1).hi(E[0]-2))),m.set(0,0,0,0),m.set(0,0,1,0),m.set(E[0]-1,0,0,0),m.set(E[0]-1,0,1,0),m.set(0,E[1]-1,0,0),m.set(0,E[1]-1,1,0),m.set(E[0]-1,E[1]-1,0,0),m.set(E[0]-1,E[1]-1,1,0),m}}function S(L){var w=L.join(),E=p[w];if(E)return E;for(var A=L.length,T=[_,y],m=1;m<=A;++m)T.push(C(m));var F=k,E=F.apply(void 0,T);return p[w]=E,E}a.exports=function(w,A,T){if(Array.isArray(T)||(typeof T=="string"?T=s(A.dimension,T):T=s(A.dimension,"clamp")),A.size===0)return w;if(A.dimension===0)return w.set(0),w;var m=S(T);return m(w,A)}}),4317:(function(a){"use strict";function i(c,f){var v=Math.floor(f),g=f-v,p=0<=v&&v0;){j<64?(w=j,j=0):(w=64,j-=64);for(var q=p[1]|0;q>0;){q<64?(A=q,q=0):(A=64,q-=64),y=O+j*m+q*F,S=V+j*I+q*R;var U=0,J=0,ee=0,ce=E,ye=m-T*E,xe=F-w*m,ue=B,K=I-T*B,_e=R-w*I;for(ee=0;ee0;){R<64?(w=R,R=0):(w=64,R-=64);for(var B=p[0]|0;B>0;){B<64?(L=B,B=0):(L=64,B-=64),y=E+R*T+B*A,S=I+R*F+B*m;var O=0,V=0,j=T,q=A-w*T,U=F,J=m-w*F;for(V=0;V0;){V<64?(A=V,V=0):(A=64,V-=64);for(var j=p[0]|0;j>0;){j<64?(L=j,j=0):(L=64,j-=64);for(var q=p[1]|0;q>0;){q<64?(w=q,q=0):(w=64,q-=64),y=B+V*F+j*T+q*m,S=O+V*R+j*E+q*I;var U=0,J=0,ee=0,ce=F,ye=T-A*F,xe=m-L*T,ue=R,K=E-A*R,_e=I-L*E;for(ee=0;eeC;){U=0,J=O-w;t:for(j=0;jce)break t;J+=E,U+=I}for(U=O,J=O-w,j=0;j>1,q=j-B,U=j+B,J=O,ee=q,ce=j,ye=U,xe=V,ue=k+1,K=S-1,_e=!0,ne,ae,pe,ie,le,me,be,De,Ge,ht=0,it=0,Oe=0,ze,ct,et,qe,we,Le,Ke,Te,Ve,$e,ot,tt,nt,We,mt,bt,Yt=F,jt=_(Yt),mr=_(Yt);ct=A*J,et=A*ee,bt=w;e:for(ze=0;ze0){ae=J,J=ee,ee=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ye,et=A*xe,bt=w;e:for(ze=0;ze0){ae=ye,ye=xe,xe=ae;break e}if(Oe<0)break e;bt+=I}ct=A*J,et=A*ce,bt=w;e:for(ze=0;ze0){ae=J,J=ce,ce=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ee,et=A*ce,bt=w;e:for(ze=0;ze0){ae=ee,ee=ce,ce=ae;break e}if(Oe<0)break e;bt+=I}ct=A*J,et=A*ye,bt=w;e:for(ze=0;ze0){ae=J,J=ye,ye=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ce,et=A*ye,bt=w;e:for(ze=0;ze0){ae=ce,ce=ye,ye=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ee,et=A*xe,bt=w;e:for(ze=0;ze0){ae=ee,ee=xe,xe=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ee,et=A*ce,bt=w;e:for(ze=0;ze0){ae=ee,ee=ce,ce=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ye,et=A*xe,bt=w;e:for(ze=0;ze0){ae=ye,ye=xe,xe=ae;break e}if(Oe<0)break e;bt+=I}for(ct=A*J,et=A*ee,qe=A*ce,we=A*ye,Le=A*xe,Ke=A*O,Te=A*j,Ve=A*V,mt=0,bt=w,ze=0;ze0)K--;else if(Oe<0){for(ct=A*me,et=A*ue,qe=A*K,bt=w,ze=0;ze0)for(;;){be=w+K*A,mt=0;e:for(ze=0;ze0){if(--KV){e:for(;;){for(be=w+ue*A,mt=0,bt=w,ze=0;ze1&&C?S(y,C[0],C[1]):S(y)}var g={"uint32,1,0":function(x,_){return function(y){var C=y.data,k=y.offset|0,S=y.shape,L=y.stride,w=L[0]|0,A=S[0]|0,T=L[1]|0,m=S[1]|0,F=T,E=T,I=1;A<=32?x(0,A-1,C,k,w,T,A,m,F,E,I):_(0,A-1,C,k,w,T,A,m,F,E,I)}}};function p(x,_){var y=[_,x].join(","),C=g[y],k=c(x,_),S=v(x,_,k);return C(k,S)}a.exports=p}),446:(function(a,i,o){"use strict";var s=o(7640),l={};function u(c){var f=c.order,v=c.dtype,g=[f,v],p=g.join(":"),x=l[p];return x||(l[p]=x=s(f,v)),x(c),c}a.exports=u}),9618:(function(a,i,o){var s=o(7163),l=typeof Float64Array!="undefined";function u(_,y){return _[0]-y[0]}function c(){var _=this.stride,y=new Array(_.length),C;for(C=0;C=0&&(T=w|0,A+=F*T,m-=T),new k(this.data,m,F,A)},S.step=function(w){var A=this.shape[0],T=this.stride[0],m=this.offset,F=0,E=Math.ceil;return typeof w=="number"&&(F=w|0,F<0?(m+=T*(A-1),A=E(-A/F)):A=E(A/F),T*=F),new k(this.data,A,T,m)},S.transpose=function(w){w=w===void 0?0:w|0;var A=this.shape,T=this.stride;return new k(this.data,A[w],T[w],this.offset)},S.pick=function(w){var A=[],T=[],m=this.offset;typeof w=="number"&&w>=0?m=m+this.stride[0]*w|0:(A.push(this.shape[0]),T.push(this.stride[0]));var F=y[A.length+1];return F(this.data,A,T,m)},function(w,A,T,m){return new k(w,A[0],T[0],m)}},2:function(_,y,C){function k(L,w,A,T,m,F){this.data=L,this.shape=[w,A],this.stride=[T,m],this.offset=F|0}var S=k.prototype;return S.dtype=_,S.dimension=2,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(S,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),S.set=function(w,A,T){return _==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*A,T):this.data[this.offset+this.stride[0]*w+this.stride[1]*A]=T},S.get=function(w,A){return _==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*A):this.data[this.offset+this.stride[0]*w+this.stride[1]*A]},S.index=function(w,A){return this.offset+this.stride[0]*w+this.stride[1]*A},S.hi=function(w,A){return new k(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof A!="number"||A<0?this.shape[1]:A|0,this.stride[0],this.stride[1],this.offset)},S.lo=function(w,A){var T=this.offset,m=0,F=this.shape[0],E=this.shape[1],I=this.stride[0],R=this.stride[1];return typeof w=="number"&&w>=0&&(m=w|0,T+=I*m,F-=m),typeof A=="number"&&A>=0&&(m=A|0,T+=R*m,E-=m),new k(this.data,F,E,I,R,T)},S.step=function(w,A){var T=this.shape[0],m=this.shape[1],F=this.stride[0],E=this.stride[1],I=this.offset,R=0,B=Math.ceil;return typeof w=="number"&&(R=w|0,R<0?(I+=F*(T-1),T=B(-T/R)):T=B(T/R),F*=R),typeof A=="number"&&(R=A|0,R<0?(I+=E*(m-1),m=B(-m/R)):m=B(m/R),E*=R),new k(this.data,T,m,F,E,I)},S.transpose=function(w,A){w=w===void 0?0:w|0,A=A===void 0?1:A|0;var T=this.shape,m=this.stride;return new k(this.data,T[w],T[A],m[w],m[A],this.offset)},S.pick=function(w,A){var T=[],m=[],F=this.offset;typeof w=="number"&&w>=0?F=F+this.stride[0]*w|0:(T.push(this.shape[0]),m.push(this.stride[0])),typeof A=="number"&&A>=0?F=F+this.stride[1]*A|0:(T.push(this.shape[1]),m.push(this.stride[1]));var E=y[T.length+1];return E(this.data,T,m,F)},function(w,A,T,m){return new k(w,A[0],A[1],T[0],T[1],m)}},3:function(_,y,C){function k(L,w,A,T,m,F,E,I){this.data=L,this.shape=[w,A,T],this.stride=[m,F,E],this.offset=I|0}var S=k.prototype;return S.dtype=_,S.dimension=3,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(S,"order",{get:function(){var w=Math.abs(this.stride[0]),A=Math.abs(this.stride[1]),T=Math.abs(this.stride[2]);return w>A?A>T?[2,1,0]:w>T?[1,2,0]:[1,0,2]:w>T?[2,0,1]:T>A?[0,1,2]:[0,2,1]}}),S.set=function(w,A,T,m){return _==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T,m):this.data[this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T]=m},S.get=function(w,A,T){return _==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T):this.data[this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T]},S.index=function(w,A,T){return this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T},S.hi=function(w,A,T){return new k(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof T!="number"||T<0?this.shape[2]:T|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},S.lo=function(w,A,T){var m=this.offset,F=0,E=this.shape[0],I=this.shape[1],R=this.shape[2],B=this.stride[0],O=this.stride[1],V=this.stride[2];return typeof w=="number"&&w>=0&&(F=w|0,m+=B*F,E-=F),typeof A=="number"&&A>=0&&(F=A|0,m+=O*F,I-=F),typeof T=="number"&&T>=0&&(F=T|0,m+=V*F,R-=F),new k(this.data,E,I,R,B,O,V,m)},S.step=function(w,A,T){var m=this.shape[0],F=this.shape[1],E=this.shape[2],I=this.stride[0],R=this.stride[1],B=this.stride[2],O=this.offset,V=0,j=Math.ceil;return typeof w=="number"&&(V=w|0,V<0?(O+=I*(m-1),m=j(-m/V)):m=j(m/V),I*=V),typeof A=="number"&&(V=A|0,V<0?(O+=R*(F-1),F=j(-F/V)):F=j(F/V),R*=V),typeof T=="number"&&(V=T|0,V<0?(O+=B*(E-1),E=j(-E/V)):E=j(E/V),B*=V),new k(this.data,m,F,E,I,R,B,O)},S.transpose=function(w,A,T){w=w===void 0?0:w|0,A=A===void 0?1:A|0,T=T===void 0?2:T|0;var m=this.shape,F=this.stride;return new k(this.data,m[w],m[A],m[T],F[w],F[A],F[T],this.offset)},S.pick=function(w,A,T){var m=[],F=[],E=this.offset;typeof w=="number"&&w>=0?E=E+this.stride[0]*w|0:(m.push(this.shape[0]),F.push(this.stride[0])),typeof A=="number"&&A>=0?E=E+this.stride[1]*A|0:(m.push(this.shape[1]),F.push(this.stride[1])),typeof T=="number"&&T>=0?E=E+this.stride[2]*T|0:(m.push(this.shape[2]),F.push(this.stride[2]));var I=y[m.length+1];return I(this.data,m,F,E)},function(w,A,T,m){return new k(w,A[0],A[1],A[2],T[0],T[1],T[2],m)}},4:function(_,y,C){function k(L,w,A,T,m,F,E,I,R,B){this.data=L,this.shape=[w,A,T,m],this.stride=[F,E,I,R],this.offset=B|0}var S=k.prototype;return S.dtype=_,S.dimension=4,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(S,"order",{get:C}),S.set=function(w,A,T,m,F){return _==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T+this.stride[3]*m,F):this.data[this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T+this.stride[3]*m]=F},S.get=function(w,A,T,m){return _==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T+this.stride[3]*m):this.data[this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T+this.stride[3]*m]},S.index=function(w,A,T,m){return this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T+this.stride[3]*m},S.hi=function(w,A,T,m){return new k(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof T!="number"||T<0?this.shape[2]:T|0,typeof m!="number"||m<0?this.shape[3]:m|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},S.lo=function(w,A,T,m){var F=this.offset,E=0,I=this.shape[0],R=this.shape[1],B=this.shape[2],O=this.shape[3],V=this.stride[0],j=this.stride[1],q=this.stride[2],U=this.stride[3];return typeof w=="number"&&w>=0&&(E=w|0,F+=V*E,I-=E),typeof A=="number"&&A>=0&&(E=A|0,F+=j*E,R-=E),typeof T=="number"&&T>=0&&(E=T|0,F+=q*E,B-=E),typeof m=="number"&&m>=0&&(E=m|0,F+=U*E,O-=E),new k(this.data,I,R,B,O,V,j,q,U,F)},S.step=function(w,A,T,m){var F=this.shape[0],E=this.shape[1],I=this.shape[2],R=this.shape[3],B=this.stride[0],O=this.stride[1],V=this.stride[2],j=this.stride[3],q=this.offset,U=0,J=Math.ceil;return typeof w=="number"&&(U=w|0,U<0?(q+=B*(F-1),F=J(-F/U)):F=J(F/U),B*=U),typeof A=="number"&&(U=A|0,U<0?(q+=O*(E-1),E=J(-E/U)):E=J(E/U),O*=U),typeof T=="number"&&(U=T|0,U<0?(q+=V*(I-1),I=J(-I/U)):I=J(I/U),V*=U),typeof m=="number"&&(U=m|0,U<0?(q+=j*(R-1),R=J(-R/U)):R=J(R/U),j*=U),new k(this.data,F,E,I,R,B,O,V,j,q)},S.transpose=function(w,A,T,m){w=w===void 0?0:w|0,A=A===void 0?1:A|0,T=T===void 0?2:T|0,m=m===void 0?3:m|0;var F=this.shape,E=this.stride;return new k(this.data,F[w],F[A],F[T],F[m],E[w],E[A],E[T],E[m],this.offset)},S.pick=function(w,A,T,m){var F=[],E=[],I=this.offset;typeof w=="number"&&w>=0?I=I+this.stride[0]*w|0:(F.push(this.shape[0]),E.push(this.stride[0])),typeof A=="number"&&A>=0?I=I+this.stride[1]*A|0:(F.push(this.shape[1]),E.push(this.stride[1])),typeof T=="number"&&T>=0?I=I+this.stride[2]*T|0:(F.push(this.shape[2]),E.push(this.stride[2])),typeof m=="number"&&m>=0?I=I+this.stride[3]*m|0:(F.push(this.shape[3]),E.push(this.stride[3]));var R=y[F.length+1];return R(this.data,F,E,I)},function(w,A,T,m){return new k(w,A[0],A[1],A[2],A[3],T[0],T[1],T[2],T[3],m)}},5:function(y,C,k){function S(w,A,T,m,F,E,I,R,B,O,V,j){this.data=w,this.shape=[A,T,m,F,E],this.stride=[I,R,B,O,V],this.offset=j|0}var L=S.prototype;return L.dtype=y,L.dimension=5,Object.defineProperty(L,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(L,"order",{get:k}),L.set=function(A,T,m,F,E,I){return y==="generic"?this.data.set(this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E,I):this.data[this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E]=I},L.get=function(A,T,m,F,E){return y==="generic"?this.data.get(this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E):this.data[this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E]},L.index=function(A,T,m,F,E){return this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E},L.hi=function(A,T,m,F,E){return new S(this.data,typeof A!="number"||A<0?this.shape[0]:A|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof m!="number"||m<0?this.shape[2]:m|0,typeof F!="number"||F<0?this.shape[3]:F|0,typeof E!="number"||E<0?this.shape[4]:E|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},L.lo=function(A,T,m,F,E){var I=this.offset,R=0,B=this.shape[0],O=this.shape[1],V=this.shape[2],j=this.shape[3],q=this.shape[4],U=this.stride[0],J=this.stride[1],ee=this.stride[2],ce=this.stride[3],ye=this.stride[4];return typeof A=="number"&&A>=0&&(R=A|0,I+=U*R,B-=R),typeof T=="number"&&T>=0&&(R=T|0,I+=J*R,O-=R),typeof m=="number"&&m>=0&&(R=m|0,I+=ee*R,V-=R),typeof F=="number"&&F>=0&&(R=F|0,I+=ce*R,j-=R),typeof E=="number"&&E>=0&&(R=E|0,I+=ye*R,q-=R),new S(this.data,B,O,V,j,q,U,J,ee,ce,ye,I)},L.step=function(A,T,m,F,E){var I=this.shape[0],R=this.shape[1],B=this.shape[2],O=this.shape[3],V=this.shape[4],j=this.stride[0],q=this.stride[1],U=this.stride[2],J=this.stride[3],ee=this.stride[4],ce=this.offset,ye=0,xe=Math.ceil;return typeof A=="number"&&(ye=A|0,ye<0?(ce+=j*(I-1),I=xe(-I/ye)):I=xe(I/ye),j*=ye),typeof T=="number"&&(ye=T|0,ye<0?(ce+=q*(R-1),R=xe(-R/ye)):R=xe(R/ye),q*=ye),typeof m=="number"&&(ye=m|0,ye<0?(ce+=U*(B-1),B=xe(-B/ye)):B=xe(B/ye),U*=ye),typeof F=="number"&&(ye=F|0,ye<0?(ce+=J*(O-1),O=xe(-O/ye)):O=xe(O/ye),J*=ye),typeof E=="number"&&(ye=E|0,ye<0?(ce+=ee*(V-1),V=xe(-V/ye)):V=xe(V/ye),ee*=ye),new S(this.data,I,R,B,O,V,j,q,U,J,ee,ce)},L.transpose=function(A,T,m,F,E){A=A===void 0?0:A|0,T=T===void 0?1:T|0,m=m===void 0?2:m|0,F=F===void 0?3:F|0,E=E===void 0?4:E|0;var I=this.shape,R=this.stride;return new S(this.data,I[A],I[T],I[m],I[F],I[E],R[A],R[T],R[m],R[F],R[E],this.offset)},L.pick=function(A,T,m,F,E){var I=[],R=[],B=this.offset;typeof A=="number"&&A>=0?B=B+this.stride[0]*A|0:(I.push(this.shape[0]),R.push(this.stride[0])),typeof T=="number"&&T>=0?B=B+this.stride[1]*T|0:(I.push(this.shape[1]),R.push(this.stride[1])),typeof m=="number"&&m>=0?B=B+this.stride[2]*m|0:(I.push(this.shape[2]),R.push(this.stride[2])),typeof F=="number"&&F>=0?B=B+this.stride[3]*F|0:(I.push(this.shape[3]),R.push(this.stride[3])),typeof E=="number"&&E>=0?B=B+this.stride[4]*E|0:(I.push(this.shape[4]),R.push(this.stride[4]));var O=C[I.length+1];return O(this.data,I,R,B)},function(A,T,m,F){return new S(A,T[0],T[1],T[2],T[3],T[4],m[0],m[1],m[2],m[3],m[4],F)}}};function v(_,y){var C=y===-1?"T":String(y),k=f[C];return y===-1?k(_):y===0?k(_,p[_][0]):k(_,p[_],c)}function g(_){if(s(_))return"buffer";if(l)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 p={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function x(_,y,C,k){if(_===void 0){var m=p.array[0];return m([])}else typeof _=="number"&&(_=[_]);y===void 0&&(y=[_.length]);var S=y.length;if(C===void 0){C=new Array(S);for(var L=S-1,w=1;L>=0;--L)C[L]=w,w*=y[L]}if(k===void 0){k=0;for(var L=0;L>>0;a.exports=c;function c(f,v){if(isNaN(f)||isNaN(v))return NaN;if(f===v)return f;if(f===0)return v<0?-l:l;var g=s.hi(f),p=s.lo(f);return v>f==f>0?p===u?(g+=1,p=0):p+=1:p===0?(p=u,g-=1):p-=1,s.pack(p,g)}}),8406:(function(a,i){var o=1e-6,s=1e-6;i.vertexNormals=function(l,u,c){for(var f=u.length,v=new Array(f),g=c===void 0?o:c,p=0;pg)for(var I=v[y],R=1/Math.sqrt(T*F),E=0;E<3;++E){var B=(E+1)%3,O=(E+2)%3;I[E]+=R*(m[B]*A[O]-m[O]*A[B])}}for(var p=0;pg)for(var R=1/Math.sqrt(V),E=0;E<3;++E)I[E]*=R;else for(var E=0;E<3;++E)I[E]=0}return v},i.faceNormals=function(l,u,c){for(var f=l.length,v=new Array(f),g=c===void 0?s:c,p=0;pg?L=1/Math.sqrt(L):L=0;for(var y=0;y<3;++y)S[y]*=L;v[p]=S}return v}}),4081:(function(a){"use strict";a.exports=i;function i(o,s,l,u,c,f,v,g,p,x){var _=s+f+x;if(y>0){var y=Math.sqrt(_+1);o[0]=.5*(v-p)/y,o[1]=.5*(g-u)/y,o[2]=.5*(l-f)/y,o[3]=.5*y}else{var C=Math.max(s,f,x),y=Math.sqrt(2*C-_+1);s>=C?(o[0]=.5*y,o[1]=.5*(c+l)/y,o[2]=.5*(g+u)/y,o[3]=.5*(v-p)/y):f>=C?(o[0]=.5*(l+c)/y,o[1]=.5*y,o[2]=.5*(p+v)/y,o[3]=.5*(g-u)/y):(o[0]=.5*(u+g)/y,o[1]=.5*(v+p)/y,o[2]=.5*y,o[3]=.5*(l-c)/y)}return o}}),9977:(function(a,i,o){"use strict";a.exports=y;var s=o(9215),l=o(6582),u=o(7399),c=o(7608),f=o(4081);function v(C,k,S){return Math.sqrt(Math.pow(C,2)+Math.pow(k,2)+Math.pow(S,2))}function g(C,k,S,L){return Math.sqrt(Math.pow(C,2)+Math.pow(k,2)+Math.pow(S,2)+Math.pow(L,2))}function p(C,k){var S=k[0],L=k[1],w=k[2],A=k[3],T=g(S,L,w,A);T>1e-6?(C[0]=S/T,C[1]=L/T,C[2]=w/T,C[3]=A/T):(C[0]=C[1]=C[2]=0,C[3]=1)}function x(C,k,S){this.radius=s([S]),this.center=s(k),this.rotation=s(C),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 _=x.prototype;_.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},_.recalcMatrix=function(C){this.radius.curve(C),this.center.curve(C),this.rotation.curve(C);var k=this.computedRotation;p(k,k);var S=this.computedMatrix;u(S,k);var L=this.computedCenter,w=this.computedEye,A=this.computedUp,T=Math.exp(this.computedRadius[0]);w[0]=L[0]+T*S[2],w[1]=L[1]+T*S[6],w[2]=L[2]+T*S[10],A[0]=S[1],A[1]=S[5],A[2]=S[9];for(var m=0;m<3;++m){for(var F=0,E=0;E<3;++E)F+=S[m+4*E]*w[E];S[12+m]=-F}},_.getMatrix=function(C,k){this.recalcMatrix(C);var S=this.computedMatrix;if(k){for(var L=0;L<16;++L)k[L]=S[L];return k}return S},_.idle=function(C){this.center.idle(C),this.radius.idle(C),this.rotation.idle(C)},_.flush=function(C){this.center.flush(C),this.radius.flush(C),this.rotation.flush(C)},_.pan=function(C,k,S,L){k=k||0,S=S||0,L=L||0,this.recalcMatrix(C);var w=this.computedMatrix,A=w[1],T=w[5],m=w[9],F=v(A,T,m);A/=F,T/=F,m/=F;var E=w[0],I=w[4],R=w[8],B=E*A+I*T+R*m;E-=A*B,I-=T*B,R-=m*B;var O=v(E,I,R);E/=O,I/=O,R/=O;var V=w[2],j=w[6],q=w[10],U=V*A+j*T+q*m,J=V*E+j*I+q*R;V-=U*A+J*E,j-=U*T+J*I,q-=U*m+J*R;var ee=v(V,j,q);V/=ee,j/=ee,q/=ee;var ce=E*k+A*S,ye=I*k+T*S,xe=R*k+m*S;this.center.move(C,ce,ye,xe);var ue=Math.exp(this.computedRadius[0]);ue=Math.max(1e-4,ue+L),this.radius.set(C,Math.log(ue))},_.rotate=function(C,k,S,L){this.recalcMatrix(C),k=k||0,S=S||0;var w=this.computedMatrix,A=w[0],T=w[4],m=w[8],F=w[1],E=w[5],I=w[9],R=w[2],B=w[6],O=w[10],V=k*A+S*F,j=k*T+S*E,q=k*m+S*I,U=-(B*q-O*j),J=-(O*V-R*q),ee=-(R*j-B*V),ce=Math.sqrt(Math.max(0,1-Math.pow(U,2)-Math.pow(J,2)-Math.pow(ee,2))),ye=g(U,J,ee,ce);ye>1e-6?(U/=ye,J/=ye,ee/=ye,ce/=ye):(U=J=ee=0,ce=1);var xe=this.computedRotation,ue=xe[0],K=xe[1],_e=xe[2],ne=xe[3],ae=ue*ce+ne*U+K*ee-_e*J,pe=K*ce+ne*J+_e*U-ue*ee,ie=_e*ce+ne*ee+ue*J-K*U,le=ne*ce-ue*U-K*J-_e*ee;if(L){U=R,J=B,ee=O;var me=Math.sin(L)/v(U,J,ee);U*=me,J*=me,ee*=me,ce=Math.cos(k),ae=ae*ce+le*U+pe*ee-ie*J,pe=pe*ce+le*J+ie*U-ae*ee,ie=ie*ce+le*ee+ae*J-pe*U,le=le*ce-ae*U-pe*J-ie*ee}var be=g(ae,pe,ie,le);be>1e-6?(ae/=be,pe/=be,ie/=be,le/=be):(ae=pe=ie=0,le=1),this.rotation.set(C,ae,pe,ie,le)},_.lookAt=function(C,k,S,L){this.recalcMatrix(C),S=S||this.computedCenter,k=k||this.computedEye,L=L||this.computedUp;var w=this.computedMatrix;l(w,k,S,L);var A=this.computedRotation;f(A,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),p(A,A),this.rotation.set(C,A[0],A[1],A[2],A[3]);for(var T=0,m=0;m<3;++m)T+=Math.pow(S[m]-k[m],2);this.radius.set(C,.5*Math.log(Math.max(T,1e-6))),this.center.set(C,S[0],S[1],S[2])},_.translate=function(C,k,S,L){this.center.move(C,k||0,S||0,L||0)},_.setMatrix=function(C,k){var S=this.computedRotation;f(S,k[0],k[1],k[2],k[4],k[5],k[6],k[8],k[9],k[10]),p(S,S),this.rotation.set(C,S[0],S[1],S[2],S[3]);var L=this.computedMatrix;c(L,k);var w=L[15];if(Math.abs(w)>1e-6){var A=L[12]/w,T=L[13]/w,m=L[14]/w;this.recalcMatrix(C);var F=Math.exp(this.computedRadius[0]);this.center.set(C,A-L[2]*F,T-L[6]*F,m-L[10]*F),this.radius.idle(C)}else this.center.idle(C),this.radius.idle(C)},_.setDistance=function(C,k){k>0&&this.radius.set(C,Math.log(k))},_.setDistanceLimits=function(C,k){C>0?C=Math.log(C):C=-1/0,k>0?k=Math.log(k):k=1/0,k=Math.max(k,C),this.radius.bounds[0][0]=C,this.radius.bounds[1][0]=k},_.getDistanceLimits=function(C){var k=this.radius.bounds;return C?(C[0]=Math.exp(k[0][0]),C[1]=Math.exp(k[1][0]),C):[Math.exp(k[0][0]),Math.exp(k[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(C){var k=this.lastT(),S=C.center;S&&this.center.set(k,S[0],S[1],S[2]);var L=C.rotation;L&&this.rotation.set(k,L[0],L[1],L[2],L[3]);var w=C.distance;w&&w>0&&this.radius.set(k,Math.log(w)),this.setDistanceLimits(C.zoomMin,C.zoomMax)};function y(C){C=C||{};var k=C.center||[0,0,0],S=C.rotation||[0,0,0,1],L=C.radius||1;k=[].slice.call(k,0,3),S=[].slice.call(S,0,4),p(S,S);var w=new x(S,k,Math.log(L));return w.setDistanceLimits(C.zoomMin,C.zoomMax),("eye"in C||"up"in C)&&w.lookAt(0,C.eye,C.center,C.up),w}}),1371:(function(a,i,o){"use strict";var s=o(3233);a.exports=function(u,c,f){return f=typeof f!="undefined"?f+"":" ",s(f,c)+u}}),3202:(function(a){a.exports=function(o,s){s||(s=[0,""]),o=String(o);var l=parseFloat(o,10);return s[0]=l,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}}),3088:(function(a,i,o){"use strict";a.exports=l;var s=o(3140);function l(u,c){for(var f=c.length|0,v=u.length,g=[new Array(f),new Array(f)],p=0;p0){I=g[O][F][0],B=O;break}R=I[B^1];for(var V=0;V<2;++V)for(var j=g[V][F],q=0;q0&&(I=U,R=J,B=V)}return E||I&&y(I,B),R}function k(m,F){var E=g[F][m][0],I=[m];y(E,F);for(var R=E[F^1],B=F;;){for(;R!==m;)I.push(R),R=C(I[I.length-2],R,!1);if(g[0][m].length+g[1][m].length===0)break;var O=I[I.length-1],V=m,j=I[1],q=C(O,V,!0);if(s(c[O],c[V],c[j],c[q])<0)break;I.push(m),R=C(O,V)}return I}function S(m,F){return F[1]===F[F.length-1]}for(var p=0;p0;){var A=g[0][p].length,T=k(p,L);S(w,T)?w.push.apply(w,T):(w.length>0&&_.push(w),w=T)}w.length>0&&_.push(w)}return _}}),5609:(function(a,i,o){"use strict";a.exports=l;var s=o(3134);function l(u,c){for(var f=s(u,c.length),v=new Array(c.length),g=new Array(c.length),p=[],x=0;x0;){var y=p.pop();v[y]=!1;for(var C=f[y],x=0;x0}A=A.filter(T);for(var m=A.length,F=new Array(m),E=new Array(m),w=0;w0;){var be=ie.pop(),De=ye[be];v(De,function(ze,ct){return ze-ct});var Ge=De.length,ht=le[be],it;if(ht===0){var j=A[be];it=[j]}for(var w=0;w=0)&&(le[Oe]=ht^1,ie.push(Oe),ht===0)){var j=A[Oe];pe(j)||(j.reverse(),it.push(j))}}ht===0&&me.push(it)}return me}}),5085:(function(a,i,o){a.exports=C;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function v(k){return function(S,L){var w=k[S];return w?!!w.queryPoint(L,f):!1}}function g(k){for(var S={},L=0;L0&&S[w]===L[0])A=k[w-1];else return 1;for(var T=1;A;){var m=A.key,F=s(L,m[0],m[1]);if(m[0][0]0)T=-1,A=A.right;else return 0;else if(F>0)A=A.left;else if(F<0)T=1,A=A.right;else return 0}return T}}function x(k){return 1}function _(k){return function(L){return k(L[0],L[1])?0:1}}function y(k,S){return function(w){return k(w[0],w[1])?0:S(w)}}function C(k){for(var S=k.length,L=[],w=[],A=0,T=0;T=x?(m=1,E=x+2*C+S):(m=-C/x,E=C*m+S)):(m=0,k>=0?(F=0,E=S):-k>=y?(F=1,E=y+2*k+S):(F=-k/y,E=k*F+S));else if(F<0)F=0,C>=0?(m=0,E=S):-C>=x?(m=1,E=x+2*C+S):(m=-C/x,E=C*m+S);else{var I=1/T;m*=I,F*=I,E=m*(x*m+_*F+2*C)+F*(_*m+y*F+2*k)+S}else{var R,B,O,V;m<0?(R=_+C,B=y+k,B>R?(O=B-R,V=x-2*_+y,O>=V?(m=1,F=0,E=x+2*C+S):(m=O/V,F=1-m,E=m*(x*m+_*F+2*C)+F*(_*m+y*F+2*k)+S)):(m=0,B<=0?(F=1,E=y+2*k+S):k>=0?(F=0,E=S):(F=-k/y,E=k*F+S))):F<0?(R=_+k,B=x+C,B>R?(O=B-R,V=x-2*_+y,O>=V?(F=1,m=0,E=y+2*k+S):(F=O/V,m=1-F,E=m*(x*m+_*F+2*C)+F*(_*m+y*F+2*k)+S)):(F=0,B<=0?(m=1,E=x+2*C+S):C>=0?(m=0,E=S):(m=-C/x,E=C*m+S))):(O=y+k-_-C,O<=0?(m=0,F=1,E=y+2*k+S):(V=x-2*_+y,O>=V?(m=1,F=0,E=x+2*C+S):(m=O/V,F=1-m,E=m*(x*m+_*F+2*C)+F*(_*m+y*F+2*k)+S)))}for(var j=1-m-F,p=0;p0){var y=f[g-1];if(s(x,y)===0&&u(y)!==_){g-=1;continue}}f[g++]=x}}return f.length=g,f}}),3233:(function(a){"use strict";var i="",o;a.exports=s;function s(l,u){if(typeof l!="string")throw new TypeError("expected a string");if(u===1)return l;if(u===2)return l+l;var c=l.length*u;if(o!==l||typeof o=="undefined")o=l,i="";else if(i.length>=c)return i.substr(0,c);for(;c>i.length&&u>1;)u&1&&(i+=l),u>>=1,l+=l;return i+=l,i=i.substr(0,c),i}}),3025:(function(a,i,o){a.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}),7004:(function(a){"use strict";a.exports=i;function i(o){for(var s=o.length,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,v=o[c];l=f+v;var g=l-f,p=v-g;p&&(o[--u]=l,l=p)}for(var x=0,c=u;c0){if(B<=0)return O;V=R+B}else if(R<0){if(B>=0)return O;V=-(R+B)}else return O;var j=g*V;return O>=j||O<=-j?O:k(F,E,I)},function(F,E,I,R){var B=F[0]-R[0],O=E[0]-R[0],V=I[0]-R[0],j=F[1]-R[1],q=E[1]-R[1],U=I[1]-R[1],J=F[2]-R[2],ee=E[2]-R[2],ce=I[2]-R[2],ye=O*U,xe=V*q,ue=V*j,K=B*U,_e=B*q,ne=O*j,ae=J*(ye-xe)+ee*(ue-K)+ce*(_e-ne),pe=(Math.abs(ye)+Math.abs(xe))*Math.abs(J)+(Math.abs(ue)+Math.abs(K))*Math.abs(ee)+(Math.abs(_e)+Math.abs(ne))*Math.abs(ce),ie=p*pe;return ae>ie||-ae>ie?ae:S(F,E,I,R)}];function w(m){var F=L[m.length];return F||(F=L[m.length]=C(m.length)),F.apply(void 0,m)}function A(m,F,E,I,R,B,O){return function(j,q,U,J,ee){switch(arguments.length){case 0:case 1:return 0;case 2:return I(j,q);case 3:return R(j,q,U);case 4:return B(j,q,U,J);case 5:return O(j,q,U,J,ee)}for(var ce=new Array(arguments.length),ye=0;ye0&&x>0||p<0&&x<0)return!1;var _=s(v,c,f),y=s(g,c,f);return _>0&&y>0||_<0&&y<0?!1:p===0&&x===0&&_===0&&y===0?l(c,f,v,g):!0}}),8545:(function(a){"use strict";a.exports=o;function i(s,l){var u=s+l,c=u-s,f=u-c,v=l-c,g=s-f,p=g+v;return p?[p,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return i(s[0],-l[0]);var f=u+c,v=new Array(f),g=0,p=0,x=0,_=Math.abs,y=s[p],C=_(y),k=-l[x],S=_(k),L,w;C=c?(L=y,p+=1,p=c?(L=y,p+=1,p>1,k=f[2*C+1];if(k===x)return C;x>1,k=f[2*C+1];if(k===x)return C;x>1,k=f[2*C+1];if(k===x)return C;x>1,k=f[2*C+1];if(k===x)return C;x>1,V=g(F[O],E);V<=0?(V===0&&(B=O),I=O+1):V>0&&(R=O-1)}return B}s=y;function C(F,E){for(var I=new Array(F.length),R=0,B=I.length;R=F.length||g(F[ye],O)!==0););}return I}s=C;function k(F,E){if(!E)return C(_(L(F,0)),F,0);for(var I=new Array(E),R=0;R>>U&1&&q.push(B[U]);E.push(q)}return x(E)}s=S;function L(F,E){if(E<0)return[];for(var I=[],R=(1<0)-(u<0)},i.abs=function(u){var c=u>>o-1;return(u^c)-c},i.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},i.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},i.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}i.countTrailingZeros=s,i.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},i.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},i.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,v=c,g=7;for(f>>>=1;f;f>>>=1)v<<=1,v|=f&1,--g;u[c]=v<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},i.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},i.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},i.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},i.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},i.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}}),2014:(function(a,i,o){"use strict";"use restrict";var s=o(3105),l=o(4623);function u(m){for(var F=0,E=Math.max,I=0,R=m.length;I>1,O=v(m[B],F);O<=0?(O===0&&(R=B),E=B+1):O>0&&(I=B-1)}return R}i.findCell=_;function y(m,F){for(var E=new Array(m.length),I=0,R=E.length;I=m.length||v(m[ce],B)!==0););}return E}i.incidence=y;function C(m,F){if(!F)return y(x(S(m,0)),m,0);for(var E=new Array(F),I=0;I>>q&1&&j.push(R[q]);F.push(j)}return p(F)}i.explode=k;function S(m,F){if(F<0)return[];for(var E=[],I=(1<>1:(K>>1)-1}function I(K){for(var _e=F(K);;){var ne=_e,ae=2*K+1,pe=2*(K+1),ie=K;if(ae0;){var ne=E(K);if(ne>=0){var ae=F(ne);if(_e0){var K=j[0];return m(0,J-1),J-=1,I(0),K}return-1}function O(K,_e){var ne=j[K];return C[ne]===_e?K:(C[ne]=-1/0,R(K),B(),C[ne]=_e,J+=1,R(J-1))}function V(K){if(!k[K]){k[K]=!0;var _e=_[K],ne=y[K];_[ne]>=0&&(_[ne]=_e),y[_e]>=0&&(y[_e]=ne),q[_e]>=0&&O(q[_e],T(_e)),q[ne]>=0&&O(q[ne],T(ne))}}for(var j=[],q=new Array(p),S=0;S>1;S>=0;--S)I(S);for(;;){var ee=B();if(ee<0||C[ee]>g)break;V(ee)}for(var ce=[],S=0;S=0&&ne>=0&&_e!==ne){var ae=q[_e],pe=q[ne];ae!==pe&&ue.push([ae,pe])}}),l.unique(l.normalize(ue)),{positions:ce,edges:ue}}}),1303:(function(a,i,o){"use strict";a.exports=u;var s=o(3250);function l(c,f){var v,g;if(f[0][0]f[1][0])v=f[1],g=f[0];else{var p=Math.min(c[0][1],c[1][1]),x=Math.max(c[0][1],c[1][1]),_=Math.min(f[0][1],f[1][1]),y=Math.max(f[0][1],f[1][1]);return x<_?x-_:p>y?p-y:x-y}var C,k;c[0][1]f[1][0])v=f[1],g=f[0];else return l(f,c);var p,x;if(c[0][0]c[1][0])p=c[1],x=c[0];else return-l(c,f);var _=s(v,g,x),y=s(v,g,p);if(_<0){if(y<=0)return _}else if(_>0){if(y>=0)return _}else if(y)return y;if(_=s(x,p,g),y=s(x,p,v),_<0){if(y<=0)return _}else if(_>0){if(y>=0)return _}else if(y)return y;return g[0]-x[0]}}),4209:(function(a,i,o){"use strict";a.exports=y;var s=o(2478),l=o(3840),u=o(3250),c=o(1303);function f(C,k,S){this.slabs=C,this.coordinates=k,this.horizontal=S}var v=f.prototype;function g(C,k){return C.y-k}function p(C,k){for(var S=null;C;){var L=C.key,w,A;L[0][0]0)if(k[0]!==L[1][0])S=C,C=C.right;else{var m=p(C.right,k);if(m)return m;C=C.left}else{if(k[0]!==L[1][0])return C;var m=p(C.right,k);if(m)return m;C=C.left}}return S}v.castUp=function(C){var k=s.le(this.coordinates,C[0]);if(k<0)return-1;var S=this.slabs[k],L=p(this.slabs[k],C),w=-1;if(L&&(w=L.value),this.coordinates[k]===C[0]){var A=null;if(L&&(A=L.key),k>0){var T=p(this.slabs[k-1],C);T&&(A?c(T.key,A)>0&&(A=T.key,w=T.value):(w=T.value,A=T.key))}var m=this.horizontal[k];if(m.length>0){var F=s.ge(m,C[1],g);if(F=m.length)return w;E=m[F]}}if(E.start)if(A){var I=u(A[0],A[1],[C[0],E.y]);A[0][0]>A[1][0]&&(I=-I),I>0&&(w=E.index)}else w=E.index;else E.y!==C[1]&&(w=E.index)}}}return w};function x(C,k,S,L){this.y=C,this.index=k,this.start=S,this.closed=L}function _(C,k,S,L){this.x=C,this.segment=k,this.create=S,this.index=L}function y(C){for(var k=C.length,S=2*k,L=new Array(S),w=0;w1&&(k=1);for(var S=1-k,L=p.length,w=new Array(L),A=0;A0||C>0&&w<0){var A=c(k,w,S,C);_.push(A),y.push(A.slice())}w<0?y.push(S.slice()):w>0?_.push(S.slice()):(_.push(S.slice()),y.push(S.slice())),C=w}return{positive:_,negative:y}}function v(p,x){for(var _=[],y=u(p[p.length-1],x),C=p[p.length-1],k=p[0],S=0;S0||y>0&&L<0)&&_.push(c(C,L,k,y)),L>=0&&_.push(k.slice()),y=L}return _}function g(p,x){for(var _=[],y=u(p[p.length-1],x),C=p[p.length-1],k=p[0],S=0;S0||y>0&&L<0)&&_.push(c(C,L,k,y)),L<=0&&_.push(k.slice()),y=L}return _}}),3387:(function(a,i,o){var s;(function(){"use strict";var l={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 u(p){return f(g(p),arguments)}function c(p,x){return u.apply(null,[p].concat(x||[]))}function f(p,x){var _=1,y=p.length,C,k="",S,L,w,A,T,m,F,E;for(S=0;S=0),w.type){case"b":C=parseInt(C,10).toString(2);break;case"c":C=String.fromCharCode(parseInt(C,10));break;case"d":case"i":C=parseInt(C,10);break;case"j":C=JSON.stringify(C,null,w.width?parseInt(w.width):0);break;case"e":C=w.precision?parseFloat(C).toExponential(w.precision):parseFloat(C).toExponential();break;case"f":C=w.precision?parseFloat(C).toFixed(w.precision):parseFloat(C);break;case"g":C=w.precision?String(Number(C.toPrecision(w.precision))):parseFloat(C);break;case"o":C=(parseInt(C,10)>>>0).toString(8);break;case"s":C=String(C),C=w.precision?C.substring(0,w.precision):C;break;case"t":C=String(!!C),C=w.precision?C.substring(0,w.precision):C;break;case"T":C=Object.prototype.toString.call(C).slice(8,-1).toLowerCase(),C=w.precision?C.substring(0,w.precision):C;break;case"u":C=parseInt(C,10)>>>0;break;case"v":C=C.valueOf(),C=w.precision?C.substring(0,w.precision):C;break;case"x":C=(parseInt(C,10)>>>0).toString(16);break;case"X":C=(parseInt(C,10)>>>0).toString(16).toUpperCase();break}l.json.test(w.type)?k+=C:(l.number.test(w.type)&&(!F||w.sign)?(E=F?"+":"-",C=C.toString().replace(l.sign,"")):E="",T=w.pad_char?w.pad_char==="0"?"0":w.pad_char.charAt(1):" ",m=w.width-(E+C).length,A=w.width&&m>0?T.repeat(m):"",k+=w.align?E+C+A:T==="0"?E+A+C:A+E+C)}return k}var v=Object.create(null);function g(p){if(v[p])return v[p];for(var x=p,_,y=[],C=0;x;){if((_=l.text.exec(x))!==null)y.push(_[0]);else if((_=l.modulo.exec(x))!==null)y.push("%");else if((_=l.placeholder.exec(x))!==null){if(_[2]){C|=1;var k=[],S=_[2],L=[];if((L=l.key.exec(S))!==null)for(k.push(L[1]);(S=S.substring(L[0].length))!=="";)if((L=l.key_access.exec(S))!==null)k.push(L[1]);else if((L=l.index_access.exec(S))!==null)k.push(L[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");_[2]=k}else C|=2;if(C===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");y.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");x=x.substring(_[0].length)}return v[p]=y}i.sprintf=u,i.vsprintf=c,typeof window!="undefined"&&(window.sprintf=u,window.vsprintf=c,s=(function(){return{sprintf:u,vsprintf:c}}).call(i,o,i,a),s!==void 0&&(a.exports=s))})()}),3711:(function(a,i,o){"use strict";a.exports=g;var s=o(2640),l=o(781),u={"2d":function(p,x,_){var y=p({order:x,scalarArguments:3,getters:_==="generic"?[0]:void 0,phase:function(k,S,L,w){return k>w|0},vertex:function(k,S,L,w,A,T,m,F,E,I,R,B,O){var V=(m<<0)+(F<<1)+(E<<2)+(I<<3)|0;if(!(V===0||V===15))switch(V){case 0:R.push([k-.5,S-.5]);break;case 1:R.push([k-.25-.25*(w+L-2*O)/(L-w),S-.25-.25*(A+L-2*O)/(L-A)]);break;case 2:R.push([k-.75-.25*(-w-L+2*O)/(w-L),S-.25-.25*(T+w-2*O)/(w-T)]);break;case 3:R.push([k-.5,S-.5-.5*(A+L+T+w-4*O)/(L-A+w-T)]);break;case 4:R.push([k-.25-.25*(T+A-2*O)/(A-T),S-.75-.25*(-A-L+2*O)/(A-L)]);break;case 5:R.push([k-.5-.5*(w+L+T+A-4*O)/(L-w+A-T),S-.5]);break;case 6:R.push([k-.5-.25*(-w-L+T+A)/(w-L+A-T),S-.5-.25*(-A-L+T+w)/(A-L+w-T)]);break;case 7:R.push([k-.75-.25*(T+A-2*O)/(A-T),S-.75-.25*(T+w-2*O)/(w-T)]);break;case 8:R.push([k-.75-.25*(-T-A+2*O)/(T-A),S-.75-.25*(-T-w+2*O)/(T-w)]);break;case 9:R.push([k-.5-.25*(w+L+-T-A)/(L-w+T-A),S-.5-.25*(A+L+-T-w)/(L-A+T-w)]);break;case 10:R.push([k-.5-.5*(-w-L+-T-A+4*O)/(w-L+T-A),S-.5]);break;case 11:R.push([k-.25-.25*(-T-A+2*O)/(T-A),S-.75-.25*(A+L-2*O)/(L-A)]);break;case 12:R.push([k-.5,S-.5-.5*(-A-L+-T-w+4*O)/(A-L+T-w)]);break;case 13:R.push([k-.75-.25*(w+L-2*O)/(L-w),S-.25-.25*(-T-w+2*O)/(T-w)]);break;case 14:R.push([k-.25-.25*(-w-L+2*O)/(w-L),S-.25-.25*(-A-L+2*O)/(A-L)]);break;case 15:R.push([k-.5,S-.5]);break}},cell:function(k,S,L,w,A,T,m,F,E){A?F.push([k,S]):F.push([S,k])}});return function(C,k){var S=[],L=[];return y(C,S,L,k),{positions:S,cells:L}}}};function c(p,x){var _=p.length+"d",y=u[_];if(y)return y(s,p,x)}function f(p,x){for(var _=l(p,x),y=_.length,C=new Array(y),k=new Array(y),S=0;SMath.max(w,A)?T[2]=1:w>Math.max(L,A)?T[0]=1:T[1]=1;for(var m=0,F=0,E=0;E<3;++E)m+=S[E]*S[E],F+=T[E]*S[E];for(var E=0;E<3;++E)T[E]-=F/m*S[E];return f(T,T),T}function _(S,L,w,A,T,m,F,E){this.center=s(w),this.up=s(A),this.right=s(T),this.radius=s([m]),this.angle=s([F,E]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(S,L),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 I=0;I<16;++I)this.computedMatrix[I]=.5;this.recalcMatrix(0)}var y=_.prototype;y.setDistanceLimits=function(S,L){S>0?S=Math.log(S):S=-1/0,L>0?L=Math.log(L):L=1/0,L=Math.max(L,S),this.radius.bounds[0][0]=S,this.radius.bounds[1][0]=L},y.getDistanceLimits=function(S){var L=this.radius.bounds[0];return S?(S[0]=Math.exp(L[0][0]),S[1]=Math.exp(L[1][0]),S):[Math.exp(L[0][0]),Math.exp(L[1][0])]},y.recalcMatrix=function(S){this.center.curve(S),this.up.curve(S),this.right.curve(S),this.radius.curve(S),this.angle.curve(S);for(var L=this.computedUp,w=this.computedRight,A=0,T=0,m=0;m<3;++m)T+=L[m]*w[m],A+=L[m]*L[m];for(var F=Math.sqrt(A),E=0,m=0;m<3;++m)w[m]-=L[m]*T/A,E+=w[m]*w[m],L[m]/=F;for(var I=Math.sqrt(E),m=0;m<3;++m)w[m]/=I;var R=this.computedToward;c(R,L,w),f(R,R);for(var B=Math.exp(this.computedRadius[0]),O=this.computedAngle[0],V=this.computedAngle[1],j=Math.cos(O),q=Math.sin(O),U=Math.cos(V),J=Math.sin(V),ee=this.computedCenter,ce=j*U,ye=q*U,xe=J,ue=-j*J,K=-q*J,_e=U,ne=this.computedEye,ae=this.computedMatrix,m=0;m<3;++m){var pe=ce*w[m]+ye*R[m]+xe*L[m];ae[4*m+1]=ue*w[m]+K*R[m]+_e*L[m],ae[4*m+2]=pe,ae[4*m+3]=0}var ie=ae[1],le=ae[5],me=ae[9],be=ae[2],De=ae[6],Ge=ae[10],ht=le*Ge-me*De,it=me*be-ie*Ge,Oe=ie*De-le*be,ze=g(ht,it,Oe);ht/=ze,it/=ze,Oe/=ze,ae[0]=ht,ae[4]=it,ae[8]=Oe;for(var m=0;m<3;++m)ne[m]=ee[m]+ae[2+4*m]*B;for(var m=0;m<3;++m){for(var E=0,ct=0;ct<3;++ct)E+=ae[m+4*ct]*ne[ct];ae[12+m]=-E}ae[15]=1},y.getMatrix=function(S,L){this.recalcMatrix(S);var w=this.computedMatrix;if(L){for(var A=0;A<16;++A)L[A]=w[A];return L}return w};var C=[0,0,0];y.rotate=function(S,L,w,A){if(this.angle.move(S,L,w),A){this.recalcMatrix(S);var T=this.computedMatrix;C[0]=T[2],C[1]=T[6],C[2]=T[10];for(var m=this.computedUp,F=this.computedRight,E=this.computedToward,I=0;I<3;++I)T[4*I]=m[I],T[4*I+1]=F[I],T[4*I+2]=E[I];u(T,T,A,C);for(var I=0;I<3;++I)m[I]=T[4*I],F[I]=T[4*I+1];this.up.set(S,m[0],m[1],m[2]),this.right.set(S,F[0],F[1],F[2])}},y.pan=function(S,L,w,A){L=L||0,w=w||0,A=A||0,this.recalcMatrix(S);var T=this.computedMatrix,m=Math.exp(this.computedRadius[0]),F=T[1],E=T[5],I=T[9],R=g(F,E,I);F/=R,E/=R,I/=R;var B=T[0],O=T[4],V=T[8],j=B*F+O*E+V*I;B-=F*j,O-=E*j,V-=I*j;var q=g(B,O,V);B/=q,O/=q,V/=q;var U=B*L+F*w,J=O*L+E*w,ee=V*L+I*w;this.center.move(S,U,J,ee);var ce=Math.exp(this.computedRadius[0]);ce=Math.max(1e-4,ce+A),this.radius.set(S,Math.log(ce))},y.translate=function(S,L,w,A){this.center.move(S,L||0,w||0,A||0)},y.setMatrix=function(S,L,w,A){var T=1;typeof w=="number"&&(T=w|0),(T<0||T>3)&&(T=1);var m=(T+2)%3,F=(T+1)%3;L||(this.recalcMatrix(S),L=this.computedMatrix);var E=L[T],I=L[T+4],R=L[T+8];if(A){var O=Math.abs(E),V=Math.abs(I),j=Math.abs(R),q=Math.max(O,V,j);O===q?(E=E<0?-1:1,I=R=0):j===q?(R=R<0?-1:1,E=I=0):(I=I<0?-1:1,E=R=0)}else{var B=g(E,I,R);E/=B,I/=B,R/=B}var U=L[m],J=L[m+4],ee=L[m+8],ce=U*E+J*I+ee*R;U-=E*ce,J-=I*ce,ee-=R*ce;var ye=g(U,J,ee);U/=ye,J/=ye,ee/=ye;var xe=I*ee-R*J,ue=R*U-E*ee,K=E*J-I*U,_e=g(xe,ue,K);xe/=_e,ue/=_e,K/=_e,this.center.jump(S,Ke,Te,Ve),this.radius.idle(S),this.up.jump(S,E,I,R),this.right.jump(S,U,J,ee);var ne,ae;if(T===2){var pe=L[1],ie=L[5],le=L[9],me=pe*U+ie*J+le*ee,be=pe*xe+ie*ue+le*K;it<0?ne=-Math.PI/2:ne=Math.PI/2,ae=Math.atan2(be,me)}else{var De=L[2],Ge=L[6],ht=L[10],it=De*E+Ge*I+ht*R,Oe=De*U+Ge*J+ht*ee,ze=De*xe+Ge*ue+ht*K;ne=Math.asin(p(it)),ae=Math.atan2(ze,Oe)}this.angle.jump(S,ae,ne),this.recalcMatrix(S);var ct=L[2],et=L[6],qe=L[10],we=this.computedMatrix;l(we,L);var Le=we[15],Ke=we[12]/Le,Te=we[13]/Le,Ve=we[14]/Le,$e=Math.exp(this.computedRadius[0]);this.center.jump(S,Ke-ct*$e,Te-et*$e,Ve-qe*$e)},y.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},y.idle=function(S){this.center.idle(S),this.up.idle(S),this.right.idle(S),this.radius.idle(S),this.angle.idle(S)},y.flush=function(S){this.center.flush(S),this.up.flush(S),this.right.flush(S),this.radius.flush(S),this.angle.flush(S)},y.setDistance=function(S,L){L>0&&this.radius.set(S,Math.log(L))},y.lookAt=function(S,L,w,A){this.recalcMatrix(S),L=L||this.computedEye,w=w||this.computedCenter,A=A||this.computedUp;var T=A[0],m=A[1],F=A[2],E=g(T,m,F);if(!(E<1e-6)){T/=E,m/=E,F/=E;var I=L[0]-w[0],R=L[1]-w[1],B=L[2]-w[2],O=g(I,R,B);if(!(O<1e-6)){I/=O,R/=O,B/=O;var V=this.computedRight,j=V[0],q=V[1],U=V[2],J=T*j+m*q+F*U;j-=J*T,q-=J*m,U-=J*F;var ee=g(j,q,U);if(!(ee<.01&&(j=m*B-F*R,q=F*I-T*B,U=T*R-m*I,ee=g(j,q,U),ee<1e-6))){j/=ee,q/=ee,U/=ee,this.up.set(S,T,m,F),this.right.set(S,j,q,U),this.center.set(S,w[0],w[1],w[2]),this.radius.set(S,Math.log(O));var ce=m*U-F*q,ye=F*j-T*U,xe=T*q-m*j,ue=g(ce,ye,xe);ce/=ue,ye/=ue,xe/=ue;var K=T*I+m*R+F*B,_e=j*I+q*R+U*B,ne=ce*I+ye*R+xe*B,ae=Math.asin(p(K)),pe=Math.atan2(ne,_e),ie=this.angle._state,le=ie[ie.length-1],me=ie[ie.length-2];le=le%(2*Math.PI);var be=Math.abs(le+2*Math.PI-pe),De=Math.abs(le-pe),Ge=Math.abs(le-2*Math.PI-pe);be0?U.pop():new ArrayBuffer(j)}i.mallocArrayBuffer=C;function k(V){return new Uint8Array(C(V),0,V)}i.mallocUint8=k;function S(V){return new Uint16Array(C(2*V),0,V)}i.mallocUint16=S;function L(V){return new Uint32Array(C(4*V),0,V)}i.mallocUint32=L;function w(V){return new Int8Array(C(V),0,V)}i.mallocInt8=w;function A(V){return new Int16Array(C(2*V),0,V)}i.mallocInt16=A;function T(V){return new Int32Array(C(4*V),0,V)}i.mallocInt32=T;function m(V){return new Float32Array(C(4*V),0,V)}i.mallocFloat32=i.mallocFloat=m;function F(V){return new Float64Array(C(8*V),0,V)}i.mallocFloat64=i.mallocDouble=F;function E(V){return c?new Uint8ClampedArray(C(V),0,V):k(V)}i.mallocUint8Clamped=E;function I(V){return f?new BigUint64Array(C(8*V),0,V):null}i.mallocBigUint64=I;function R(V){return v?new BigInt64Array(C(8*V),0,V):null}i.mallocBigInt64=R;function B(V){return new DataView(C(V),0,V)}i.mallocDataView=B;function O(V){V=s.nextPow2(V);var j=s.log2(V),q=x[j];return q.length>0?q.pop():new u(V)}i.mallocBuffer=O,i.clearCache=function(){for(var j=0;j<32;++j)g.UINT8[j].length=0,g.UINT16[j].length=0,g.UINT32[j].length=0,g.INT8[j].length=0,g.INT16[j].length=0,g.INT32[j].length=0,g.FLOAT[j].length=0,g.DOUBLE[j].length=0,g.BIGUINT64[j].length=0,g.BIGINT64[j].length=0,g.UINT8C[j].length=0,p[j].length=0,x[j].length=0}}),1755:(function(a){"use strict";"use restrict";a.exports=i;function i(s){this.roots=new Array(s),this.ranks=new Array(s);for(var l=0;l",U="",J=q.length,ee=U.length,ce=O[0]===C||O[0]===L,ye=0,xe=-ee;ye>-1&&(ye=V.indexOf(q,ye),!(ye===-1||(xe=V.indexOf(U,ye+J),xe===-1)||xe<=ye));){for(var ue=ye;ue=xe)j[ue]=null,V=V.substr(0,ue)+" "+V.substr(ue+1);else if(j[ue]!==null){var K=j[ue].indexOf(O[0]);K===-1?j[ue]+=O:ce&&(j[ue]=j[ue].substr(0,K+1)+(1+parseInt(j[ue][K+1]))+j[ue].substr(K+2))}var _e=ye+J,ne=V.substr(_e,xe-_e),ae=ne.indexOf(q);ae!==-1?ye=ae:ye=xe+ee}return j}function T(B,O,V){for(var j=O.textAlign||"start",q=O.textBaseline||"alphabetic",U=[1<<30,1<<30],J=[0,0],ee=B.length,ce=0;ce/g,` -`):V=V.replace(/\/g," ");var J="",ee=[];for(le=0;le-1?parseInt(Te[1+ot]):0,We=tt>-1?parseInt(Ve[1+tt]):0;nt!==We&&($e=$e.replace(Oe(),"?px "),De*=Math.pow(.75,We-nt),$e=$e.replace("?px ",Oe())),be+=.25*K*(We-nt)}if(U.superscripts===!0){var mt=Te.indexOf(C),bt=Ve.indexOf(C),Yt=mt>-1?parseInt(Te[1+mt]):0,jt=bt>-1?parseInt(Ve[1+bt]):0;Yt!==jt&&($e=$e.replace(Oe(),"?px "),De*=Math.pow(.75,jt-Yt),$e=$e.replace("?px ",Oe())),be-=.25*K*(jt-Yt)}if(U.bolds===!0){var mr=Te.indexOf(p)>-1,or=Ve.indexOf(p)>-1;!mr&&or&&(fr?$e=$e.replace("italic ","italic bold "):$e="bold "+$e),mr&&!or&&($e=$e.replace("bold ",""))}if(U.italics===!0){var fr=Te.indexOf(_)>-1,Ot=Ve.indexOf(_)>-1;!fr&&Ot&&($e="italic "+$e),fr&&!Ot&&($e=$e.replace("italic ",""))}O.font=$e}for(ie=0;ie0&&(q=j.size),j.lineSpacing&&j.lineSpacing>0&&(U=j.lineSpacing),j.styletags&&j.styletags.breaklines&&(J.breaklines=!!j.styletags.breaklines),j.styletags&&j.styletags.bolds&&(J.bolds=!!j.styletags.bolds),j.styletags&&j.styletags.italics&&(J.italics=!!j.styletags.italics),j.styletags&&j.styletags.subscripts&&(J.subscripts=!!j.styletags.subscripts),j.styletags&&j.styletags.superscripts&&(J.superscripts=!!j.styletags.superscripts)),V.font=[j.fontStyle,j.fontVariant,j.fontWeight,q+"px",j.font].filter(function(ce){return ce}).join(" "),V.textAlign="start",V.textBaseline="alphabetic",V.direction="ltr";var ee=m(O,V,B,q,U,J);return I(ee,j,q)}}),1538:(function(a){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function o(E){E.permitHostObjects___&&E.permitHostObjects___(o)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap=="function"){var l=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var u=new l,c=Object.freeze({});if(u.set(c,1),u.get(c)!==1)s=!0;else{a.exports=WeakMap;return}}}var f=Object.prototype.hasOwnProperty,v=Object.getOwnPropertyNames,g=Object.defineProperty,p=Object.isExtensible,x="weakmap:",_=x+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var y=new ArrayBuffer(25),C=new Uint8Array(y);crypto.getRandomValues(C),_=x+"rand:"+Array.prototype.map.call(C,function(E){return(E%36).toString(36)}).join("")+"___"}function k(E){return!(E.substr(0,x.length)==x&&E.substr(E.length-3)==="___")}if(g(Object,"getOwnPropertyNames",{value:function(I){return v(I).filter(k)}}),"getPropertyNames"in Object){var S=Object.getPropertyNames;g(Object,"getPropertyNames",{value:function(I){return S(I).filter(k)}})}function L(E){if(E!==Object(E))throw new TypeError("Not an object: "+E);var I=E[_];if(I&&I.key===E)return I;if(p(E)){I={key:E};try{return g(E,_,{value:I,writable:!1,enumerable:!1,configurable:!1}),I}catch(R){return}}}(function(){var E=Object.freeze;g(Object,"freeze",{value:function(O){return L(O),E(O)}});var I=Object.seal;g(Object,"seal",{value:function(O){return L(O),I(O)}});var R=Object.preventExtensions;g(Object,"preventExtensions",{value:function(O){return L(O),R(O)}})})();function w(E){return E.prototype=null,Object.freeze(E)}var A=!1;function T(){!A&&typeof console!="undefined"&&(A=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var m=0,F=function(){this instanceof F||T();var E=[],I=[],R=m++;function B(q,U){var J,ee=L(q);return ee?R in ee?ee[R]:U:(J=E.indexOf(q),J>=0?I[J]:U)}function O(q){var U=L(q);return U?R in U:E.indexOf(q)>=0}function V(q,U){var J,ee=L(q);return ee?ee[R]=U:(J=E.indexOf(q),J>=0?I[J]=U:(J=E.length,I[J]=U,E[J]=q)),this}function j(q){var U=L(q),J,ee;return U?R in U&&delete U[R]:(J=E.indexOf(q),J<0?!1:(ee=E.length-1,E[J]=void 0,I[J]=I[ee],E[J]=E[ee],E.length=ee,I.length=ee,!0))}return Object.create(F.prototype,{get___:{value:w(B)},has___:{value:w(O)},set___:{value:w(V)},delete___:{value:w(j)}})};F.prototype=Object.create(Object.prototype,{get:{value:function(I,R){return this.get___(I,R)},writable:!0,configurable:!0},has:{value:function(I){return this.has___(I)},writable:!0,configurable:!0},set:{value:function(I,R){return this.set___(I,R)},writable:!0,configurable:!0},delete:{value:function(I){return this.delete___(I)},writable:!0,configurable:!0}}),typeof l=="function"?(function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function E(){this instanceof F||T();var I=new l,R=void 0,B=!1;function O(U,J){return R?I.has(U)?I.get(U):R.get___(U,J):I.get(U,J)}function V(U){return I.has(U)||(R?R.has___(U):!1)}var j;s?j=function(U,J){return I.set(U,J),I.has(U)||(R||(R=new F),R.set(U,J)),this}:j=function(U,J){if(B)try{I.set(U,J)}catch(ee){R||(R=new F),R.set___(U,J)}else I.set(U,J);return this};function q(U){var J=!!I.delete(U);return R&&R.delete___(U)||J}return Object.create(F.prototype,{get___:{value:w(O)},has___:{value:w(V)},set___:{value:w(j)},delete___:{value:w(q)},permitHostObjects___:{value:w(function(U){if(U===o)B=!0;else throw new Error("bogus call to permitHostObjects___")})}})}E.prototype=F.prototype,a.exports=E,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})})():(typeof Proxy!="undefined"&&(Proxy=void 0),a.exports=F)})()}),236:(function(a,i,o){var s=o(8284);a.exports=l;function l(){var u={};return function(c){if((typeof c!="object"||c===null)&&typeof c!="function")throw new Error("Weakmap-shim: Key must be object");var f=c.valueOf(u);return f&&f.identity===u?f:s(c,u)}}}),8284:(function(a){a.exports=i;function i(o,s){var l={identity:s},u=o.valueOf;return Object.defineProperty(o,"valueOf",{value:function(c){return c!==s?u.apply(this,arguments):l},writable:!0}),l}}),606:(function(a,i,o){var s=o(236);a.exports=l;function l(){var u=s();return{get:function(c,f){var v=u(c);return v.hasOwnProperty("value")?v.value:f},set:function(c,f){return u(c).value=f,this},has:function(c){return"value"in u(c)},delete:function(c){return delete u(c).value}}}}),3349:(function(a){"use strict";function i(){return function(f,v,g,p,x,_){var y=f[0],C=g[0],k=[0],S=C;p|=0;var L=0,w=C;for(L=0;L=0!=T>=0&&x.push(k[0]+.5+.5*(A+T)/(A-T))}p+=w,++k[0]}}}function o(){return i()}var s=o;function l(f){var v={};return function(p,x,_){var y=p.dtype,C=p.order,k=[y,C.join()].join(),S=v[k];return S||(v[k]=S=f([y,C])),S(p.shape.slice(0),p.data,p.stride,p.offset|0,x,_)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}a.exports=c({funcName:"zeroCrossings"})}),781:(function(a,i,o){"use strict";a.exports=l;var s=o(3349);function l(u,c){var f=[];return c=+c||0,s(u.hi(u.shape[0]-1),f,c),f}}),7790:(function(){})},t={};function r(a){var i=t[a];if(i!==void 0)return i.exports;var o=t[a]={id:a,loaded:!1,exports:{}};return e[a].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}(function(){r.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(a){if(typeof window=="object")return window}})()})(),(function(){r.nmd=function(a){return a.paths=[],a.children||(a.children=[]),a}})();var n=r(1964);$Pe.exports=n})()});var Mg=fe((q3r,KPe)=>{"use strict";var{normalize:HBt}=ni();function jBt(e){return e?HBt(e):[0,0,0,1]}KPe.exports=jBt});var Sg=fe((B3r,nFe)=>{"use strict";var tFe=aa(),cP=js(),$w=ni(),WBt=tc().defaultLine,JPe=Gf().isArrayOrTypedArray,pY=$w.normalize(WBt),rFe=1;function QPe(e,t){return[e[0],e[1],e[2],e[3]*t]}function vY(e){return tFe(e)||!$w.isChannelArray(e)&&!$w.isValid(e)?pY:$w.normalize(e)}function eFe(e){return tFe(e)?e:rFe}function YBt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var a=JPe(n),i=JPe(t),o=cP.extractOpts(e),s=[],l,u,c,f,v;if(o.colorscale!==void 0?l=cP.makeColorScaleFuncFromTrace(e):l=vY,a?u=(p,x)=>p[x]===void 0?pY:o.colorscale===void 0?l(p[x]):$w.normalize(l(p[x])):u=vY,i?c=function(p,x){return p[x]===void 0?rFe:eFe(p[x])}:c=eFe,a||i)for(var g=0;g{"use strict";iFe.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}});var fP=fe((N3r,aFe)=>{"use strict";aFe.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var sFe=fe((U3r,oFe)=>{"use strict";var ZBt=bi();function mY(e,t,r,n){if(!t||!t.visible)return null;for(var a=ZBt.getComponentMethod("errorbars","makeComputeError")(t),i=new Array(e.length),o=0;o0){var f=n.c2l(u);n._lowerLogErrorBound||(n._lowerLogErrorBound=f),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,f)}}else i[o]=[-s[0]*r,s[1]*r]}return i}function $Bt(e){for(var t=0;t{"use strict";var JBt=xf().gl_line3d,lFe=xf().gl_scatter3d,QBt=xf().gl_error3d,eOt=xf().gl_mesh3d,tOt=xf().delaunay_triangulate,Eg=Xt(),dFe=Mg(),hP=Sg().formatColor,rOt=lT(),yY=gY(),nOt=fP(),iOt=Yi(),aOt=Sd().appendArrayPointValue,oOt=sFe();function vFe(e,t){this.scene=e,this.uid=t,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var _Y=vFe.prototype;_Y.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var t=e.index=e.data.index;return e.object.highlight&&e.object.highlight(null),this.scatterPlot&&(e.object=this.scatterPlot,this.scatterPlot.highlight(e.data)),e.textLabel="",this.textLabels&&(Eg.isArrayOrTypedArray(this.textLabels)?(this.textLabels[t]||this.textLabels[t]===0)&&(e.textLabel=this.textLabels[t]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]],!0}};function sOt(e,t,r){var n=(r+1)%3,a=(r+2)%3,i=[],o=[],s;for(s=0;s-1?-1:e.indexOf("right")>-1?1:0}function cFe(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function uOt(e){var t=0,r=0,n=[t,r];if(Array.isArray(e))for(var a=0;a=0){var u=sOt(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=eOt(u),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 dOt(e,t){var r=new vFe(e,t.uid);return r.update(t),r}pFe.exports=dOt});var MY=fe((G3r,_Fe)=>{"use strict";var kg=Ol(),vOt=Ds(),AY=_s(),bY=pl().axisHoverFormat,{hovertemplateAttrs:pOt,texttemplateAttrs:gOt,templatefallbackAttrs:mFe}=Oo(),yFe=Ho(),mOt=gY(),yOt=fP(),Ep=ta().extendFlat,xOt=rl().overrideAll,xFe=(bx(),Gs(_x)).default,_Ot=kg.line,n_=kg.marker,bOt=n_.line,wOt=Ep({width:_Ot.width,dash:{valType:"enumerated",values:xFe(mOt),dflt:"solid"}},AY("line"));function wY(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 TY=_Fe.exports=xOt({x:kg.x,y:kg.y,z:{valType:"data_array"},text:Ep({},kg.text,{}),texttemplate:gOt(),texttemplatefallback:mFe({editType:"calc"}),hovertext:Ep({},kg.hovertext,{}),hovertemplate:pOt(),hovertemplatefallback:mFe(),xhoverformat:bY("x"),yhoverformat:bY("y"),zhoverformat:bY("z"),mode:Ep({},kg.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:wY("x"),y:wY("y"),z:wY("z")},connectgaps:kg.connectgaps,line:wOt,marker:Ep({symbol:{valType:"enumerated",values:xFe(yOt),dflt:"circle",arrayOk:!0},size:Ep({},n_.size,{dflt:8}),sizeref:n_.sizeref,sizemin:n_.sizemin,sizemode:n_.sizemode,opacity:Ep({},n_.opacity,{arrayOk:!1}),colorbar:n_.colorbar,line:Ep({width:Ep({},bOt.width,{arrayOk:!1})},AY("marker.line"))},AY("marker")),textposition:Ep({},kg.textposition,{dflt:"top center"}),textfont:vOt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:yFe.opacity,hoverinfo:Ep({},yFe.hoverinfo)},"calc","nested");TY.x.editType=TY.y.editType=TY.z.editType="calc+clearAxisTypes"});var TFe=fe((H3r,wFe)=>{"use strict";var bFe=bi(),TOt=Xt(),SY=Is(),AOt=vv(),MOt=lp(),SOt=up(),EOt=MY();wFe.exports=function(t,r,n,a){function i(g,p){return TOt.coerce(t,r,EOt,g,p)}var o=kOt(t,r,i,a);if(!o){r.visible=!1;return}i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),i("mode"),SY.hasMarkers(r)&&AOt(t,r,n,a,i,{noAngle:!0,noLineDash:!0,noSelect:!0}),SY.hasLines(r)&&(i("connectgaps"),MOt(t,r,n,a,i)),SY.hasText(r)&&(i("texttemplate"),i("texttemplatefallback"),SOt(t,r,a,i,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,l=(r.marker||{}).color;i("surfaceaxis")>=0&&i("surfacecolor",s||l);for(var u=["x","y","z"],c=0;c<3;++c){var f="projection."+u[c];i(f+".show")&&(i(f+".opacity"),i(f+".scale"))}var v=bFe.getComponentMethod("errorbars","supplyDefaults");v(t,r,s||l||n,{axis:"z"}),v(t,r,s||l||n,{axis:"y",inherit:"z"}),v(t,r,s||l||n,{axis:"x",inherit:"z"})};function kOt(e,t,r,n){var a=0,i=r("x"),o=r("y"),s=r("z"),l=bFe.getComponentMethod("calendars","handleTraceDefaults");return l(e,t,["x","y","z"],n),i&&o&&s&&(a=Math.min(i.length,o.length,s.length),t._length=t._xlength=t._ylength=t._zlength=a),a}});var MFe=fe((j3r,AFe)=>{"use strict";var COt=o1(),LOt=pv();AFe.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return COt(n,r),LOt(t,r),n}});var EFe=fe((W3r,SFe)=>{SFe.exports=POt;function POt(e,t){if(typeof e!="string")throw new TypeError("must specify type string");if(t=t||{},typeof document=="undefined"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");typeof t.width=="number"&&(r.width=t.width),typeof t.height=="number"&&(r.height=t.height);var n=t,a;try{var i=[e];e.indexOf("webgl")===0&&i.push("experimental-"+e);for(var o=0;o{var FOt=EFe();kFe.exports=function(t){return FOt("webgl",t)}});var EY=fe((X3r,PFe)=>{"use strict";var LFe=ni(),DOt=function(){};PFe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=DOt);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var n=document.createElement("div");n.className="no-webgl",n.style.cursor="pointer",n.style.fontSize="24px",n.style.color=LFe.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=LFe.lightLine,n.style["z-index"]=30;var a=document.createElement("p");return a.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",a.style.position="relative",a.style.top="50%",a.style.left="50%",a.style.height="30%",a.style.width="50%",a.style.margin="-15% 0 0 -25%",n.appendChild(a),t.container.appendChild(n),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var RFe=fe((Z3r,DFe)=>{"use strict";var i_=Mg(),ROt=Xt(),IOt=["xaxis","yaxis","zaxis"];function FFe(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],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=[10,10,10],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=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var zOt=FFe.prototype;zOt.merge=function(e,t){for(var r=this,n=0;n<3;++n){var a=t[IOt[n]];if(!a.visible){r.tickEnable[n]=!1,r.labelEnable[n]=!1,r.lineEnable[n]=!1,r.lineTickEnable[n]=!1,r.gridEnable[n]=!1,r.zeroEnable[n]=!1,r.backgroundEnable[n]=!1;continue}r.labels[n]=e._meta?ROt.templateString(a.title.text,e._meta):a.title.text,"font"in a.title&&(a.title.font.color&&(r.labelColor[n]=i_(a.title.font.color)),a.title.font.family&&(r.labelFont[n]=a.title.font.family),a.title.font.size&&(r.labelSize[n]=a.title.font.size),a.title.font.weight&&(r.labelFontWeight[n]=a.title.font.weight),a.title.font.style&&(r.labelFontStyle[n]=a.title.font.style),a.title.font.variant&&(r.labelFontVariant[n]=a.title.font.variant)),"showline"in a&&(r.lineEnable[n]=a.showline),"linecolor"in a&&(r.lineColor[n]=i_(a.linecolor)),"linewidth"in a&&(r.lineWidth[n]=a.linewidth),"showgrid"in a&&(r.gridEnable[n]=a.showgrid),"gridcolor"in a&&(r.gridColor[n]=i_(a.gridcolor)),"gridwidth"in a&&(r.gridWidth[n]=a.gridwidth),a.type==="log"?r.zeroEnable[n]=!1:"zeroline"in a&&(r.zeroEnable[n]=a.zeroline),"zerolinecolor"in a&&(r.zeroLineColor[n]=i_(a.zerolinecolor)),"zerolinewidth"in a&&(r.zeroLineWidth[n]=a.zerolinewidth),"ticks"in a&&a.ticks?r.lineTickEnable[n]=!0:r.lineTickEnable[n]=!1,"ticklen"in a&&(r.lineTickLength[n]=r._defaultLineTickLength[n]=a.ticklen),"tickcolor"in a&&(r.lineTickColor[n]=i_(a.tickcolor)),"tickwidth"in a&&(r.lineTickWidth[n]=a.tickwidth),"tickangle"in a&&(r.tickAngle[n]=a.tickangle==="auto"?-3600:Math.PI*-a.tickangle/180),"showticklabels"in a&&(r.tickEnable[n]=a.showticklabels),"tickfont"in a&&(a.tickfont.color&&(r.tickColor[n]=i_(a.tickfont.color)),a.tickfont.family&&(r.tickFont[n]=a.tickfont.family),a.tickfont.size&&(r.tickSize[n]=a.tickfont.size),a.tickfont.weight&&(r.tickFontWeight[n]=a.tickfont.weight),a.tickfont.style&&(r.tickFontStyle[n]=a.tickfont.style),a.tickfont.variant&&(r.tickFontVariant[n]=a.tickfont.variant)),"mirror"in a?["ticks","all","allticks"].indexOf(a.mirror)!==-1?(r.lineTickMirror[n]=!0,r.lineMirror[n]=!0):a.mirror===!0?(r.lineTickMirror[n]=!1,r.lineMirror[n]=!0):(r.lineTickMirror[n]=!1,r.lineMirror[n]=!1):r.lineMirror[n]=!1,"showbackground"in a&&a.showbackground!==!1?(r.backgroundEnable[n]=!0,r.backgroundColor[n]=i_(a.backgroundcolor)):r.backgroundEnable[n]=!1}};function qOt(e,t){var r=new FFe;return r.merge(e,t),r}DFe.exports=qOt});var qFe=fe(($3r,zFe)=>{"use strict";var BOt=Mg(),OOt=["xaxis","yaxis","zaxis"];function IFe(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var NOt=IFe.prototype;NOt.merge=function(e){for(var t=0;t<3;++t){var r=e[OOt[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=BOt(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function UOt(e){var t=new IFe;return t.merge(e),t}zFe.exports=UOt});var NFe=fe((K3r,OFe)=>{"use strict";OFe.exports=WOt;var BFe=Yi(),VOt=Xt(),GOt=["xaxis","yaxis","zaxis"],HOt=[0,0,0];function jOt(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],a=new Array(n.length),i=0;i/g," "));a[i]=u,o.tickmode=s}}t.ticks=a;for(var i=0;i<3;++i){HOt[i]=.5*(e.glplot.bounds[0][i]+e.glplot.bounds[1][i]);for(var c=0;c<2;++c)t.bounds[c][i]=e.glplot.bounds[c][i]}e.contourLevels=jOt(a)}});var YFe=fe((J3r,WFe)=>{"use strict";var GFe=xf().gl_plot3d,YOt=GFe.createCamera,UFe=GFe.createScene,XOt=CFe(),ZOt=Uk(),pP=bi(),Dd=Xt(),vP=Dd.preserveDrawingBuffer(),gP=Yi(),kp=kl(),$Ot=Mg(),KOt=EY(),JOt=VU(),QOt=RFe(),eNt=qFe(),tNt=NFe(),rNt=rp().applyAutorangeOptions,rM,dP,HFe=!1;function jFe(e,t){var r=document.createElement("div"),n=e.container;this.graphDiv=e.graphDiv;var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top=a.style.left="0px",a.style.width=a.style.height="100%",a.style["z-index"]=20,a.style["pointer-events"]="none",r.appendChild(a),this.svgContainer=a,r.id=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=QOt(t,t[this.id]),this.spikeOptions=eNt(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=pP.getComponentMethod("annotations3d","convert"),this.drawAnnotations=pP.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var Dh=jFe.prototype;Dh.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:vP,premultipliedAlpha:!0,antialias:!0},container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:e.camera,pixelRatio:e.pixelRatio};if(e.staticMode){if(!dP&&(rM=document.createElement("canvas"),dP=XOt({canvas:rM,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!dP))throw new Error("error creating static canvas/context for image server");t.gl=dP,t.canvas=rM}return t};var VFe=!0;Dh.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=UFe(t)}catch(n){if(e.staticMode||!VFe||vP)r=!1;else{Dd.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{vP=t.glOptions.preserveDrawingBuffer=!0,e.glplot=UFe(t)}catch(a){vP=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return VFe=!1,r};Dh.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=YOt(e.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})};Dh.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return KOt(e);e.traces={},e.make4thDimension();var r=e.graphDiv,n=r.layout,a=function(){var o={};return e.isCameraChanged(n)&&(o[e.id+".camera"]=e.getCamera()),e.isAspectChanged(n)&&(o[e.id+".aspectratio"]=e.glplot.getAspectratio(),n[e.id].aspectmode!=="manual"&&(e.fullSceneLayout.aspectmode=n[e.id].aspectmode=o[e.id+".aspectmode"]="manual")),o},i=function(o){if(o.fullSceneLayout.dragmode!==!1){var s=a();o.saveLayout(n),o.graphDiv.emit("plotly_relayout",s)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",function(){i(e)}),e.glplot.canvas.addEventListener("touchstart",function(){HFe=!0}),e.glplot.canvas.addEventListener("wheel",function(o){if(r._context._scrollZoom.gl3d){if(e.camera._ortho){var s=o.deltaX>o.deltaY?1.1:.9090909090909091,l=e.glplot.getAspectratio();e.glplot.setAspectratio({x:s*l.x,y:s*l.y,z:s*l.z})}i(e)}},ZOt?{passive:!1}:!1),e.glplot.canvas.addEventListener("mousemove",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var o=a();e.graphDiv.emit("plotly_relayouting",o)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(o){r&&r.emit&&r.emit("plotly_webglcontextlost",{event:o,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0};Dh.render=function(){var e=this,t=e.graphDiv,r,n=e.svgContainer,a=e.container.getBoundingClientRect();t._fullLayout._calcInverseTransform(t);var i=t._fullLayout._invScaleX,o=t._fullLayout._invScaleY,s=a.width*i,l=a.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),tNt(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,f=e.glplot.selection,v=0;v")):r.type==="isosurface"||r.type==="volume"?(y.valueLabel=gP.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),w.push("value: "+y.valueLabel),f.textLabel&&w.push(f.textLabel),L=w.join("
")):L=f.textLabel;var A={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:x._input,fullData:x,curveNumber:x.index,pointNumber:_};kp.appendArrayPointValue(A,x,_),r._module.eventData&&(A=x._module.eventData(A,f,x,{},_));var T={points:[A]};if(e.fullSceneLayout.hovermode){var m=[];kp.loneHover({trace:x,x:(.5+.5*p[0]/p[3])*s,y:(.5-.5*p[1]/p[3])*l,xLabel:y.xLabel,yLabel:y.yLabel,zLabel:y.zLabel,text:L,name:c.name,color:kp.castHoverOption(x,_,"bgcolor")||c.color,borderColor:kp.castHoverOption(x,_,"bordercolor"),fontFamily:kp.castHoverOption(x,_,"font.family"),fontSize:kp.castHoverOption(x,_,"font.size"),fontColor:kp.castHoverOption(x,_,"font.color"),nameLength:kp.castHoverOption(x,_,"namelength"),textAlign:kp.castHoverOption(x,_,"align"),hovertemplate:Dd.castOption(x,_,"hovertemplate"),hovertemplateLabels:Dd.extendFlat({},A,y),eventData:[A]},{container:n,gd:t,inOut_bbox:m}),A.bbox=m[0]}f.distance<5&&(f.buttons||HFe)?t.emit("plotly_click",T):t.emit("plotly_hover",T),this.oldEventData=T}else kp.loneUnhover(n),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};Dh.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){Dd.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var nM=["xaxis","yaxis","zaxis"];function nNt(e,t,r){for(var n=e.fullSceneLayout,a=0;a<3;a++){var i=nM[a],o=i.charAt(0),s=n[i],l=t[o],u=t[o+"calendar"],c=t["_"+o+"length"];if(!Dd.isArrayOrTypedArray(l))r[0][a]=Math.min(r[0][a],0),r[1][a]=Math.max(r[1][a],c-1);else for(var f,v=0;v<(c||l.length);v++)if(Dd.isArrayOrTypedArray(l[v]))for(var g=0;gx[1][o])x[0][o]=-1,x[1][o]=1;else{var E=x[1][o]-x[0][o];x[0][o]-=E/32,x[1][o]+=E/32}if(C=[x[0][o],x[1][o]],C=rNt(C,l),x[0][o]=C[0],x[1][o]=C[1],l.isReversed()){var I=x[0][o];x[0][o]=x[1][o],x[1][o]=I}}else C=l.range,x[0][o]=l.r2l(C[0]),x[1][o]=l.r2l(C[1]);x[0][o]===x[1][o]&&(x[0][o]-=1,x[1][o]+=1),_[o]=x[1][o]-x[0][o],l.range=[x[0][o],x[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*g[o],max:l.range[1]*g[o]})}var R,B=c.aspectmode;if(B==="cube")R=[1,1,1];else if(B==="manual"){var O=c.aspectratio;R=[O.x,O.y,O.z]}else if(B==="auto"||B==="data"){var V=[1,1,1];for(o=0;o<3;++o){l=c[nM[o]],u=l.type;var j=y[u];V[o]=Math.pow(j.acc,1/j.count)/g[o]}B==="data"||Math.max.apply(null,V)/Math.min.apply(null,V)<=4?R=V:R=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=f.aspectratio.x=R[0],c.aspectratio.y=f.aspectratio.y=R[1],c.aspectratio.z=f.aspectratio.z=R[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var q=c.domain||null,U=t._size||null;if(q&&U){var J=n.container.style;J.position="absolute",J.left=U.l+q.x[0]*U.w+"px",J.top=U.t+(1-q.y[1])*U.h+"px",J.width=U.w*(q.x[1]-q.x[0])+"px",J.height=U.h*(q.y[1]-q.y[0])+"px"}n.glplot.redraw()}};Dh.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)};function aNt(e){return[[e.eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]}function oNt(e){return{up:{x:e.up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:e._ortho===!0?"orthographic":"perspective"}}}Dh.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),oNt(e.camera)};Dh.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,aNt(r)),t.glplot.setAspectratio(e.aspectratio);var n=r.projection.type==="orthographic",a=t.camera._ortho;n!==a&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())};Dh.isCameraChanged=function(e){var t=this,r=t.getCamera(),n=Dd.nestedProperty(e,t.id+".camera"),a=n.get();function i(u,c,f,v){var g=["up","center","eye"],p=["x","y","z"];return c[g[f]]&&u[g[f]][p[v]]===c[g[f]][p[v]]}var o=!1;if(a===void 0)o=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!i(r,a,s,l)){o=!0;break}(!a.projection||r.projection&&r.projection.type!==a.projection.type)&&(o=!0)}return o};Dh.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),n=Dd.nestedProperty(e,t.id+".aspectratio"),a=n.get();return a===void 0||a.x!==r.x||a.y!==r.y||a.z!==r.z};Dh.saveLayout=function(e){var t=this,r=t.fullLayout,n,a,i,o,s,l,u=t.isCameraChanged(e),c=t.isAspectChanged(e),f=u||c;if(f){var v={};if(u&&(n=t.getCamera(),a=Dd.nestedProperty(e,t.id+".camera"),i=a.get(),v[t.id+".camera"]=i),c&&(o=t.glplot.getAspectratio(),s=Dd.nestedProperty(e,t.id+".aspectratio"),l=s.get(),v[t.id+".aspectratio"]=l),pP.call("_storeDirectGUIEdit",e,r._preGUI,v),u){a.set(n);var g=Dd.nestedProperty(r,t.id+".camera");g.set(n)}if(c){s.set(o);var p=Dd.nestedProperty(r,t.id+".aspectratio");p.set(o),t.glplot.redraw()}}return f};Dh.updateFx=function(e,t){var r=this,n=r.camera;if(n)if(e==="orbit")n.mode="orbit",n.keyBindingMode="rotate";else if(e==="turntable"){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var a=r.graphDiv,i=a._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var c=r.id+".camera.up",f={x:0,y:0,z:1},v={};v[c]=f;var g=a.layout;pP.call("_storeDirectGUIEdit",g,i._preGUI,v),o.up=f,Dd.nestedProperty(g,c).set(f)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function sNt(e,t,r){for(var n=0,a=r-1;n0)for(var s=255/o,l=0;l<3;++l)e[i+l]=Math.min(s*e[i+l],255)}}Dh.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(rM),t.glplot.redraw();var r=t.glplot.gl,n=r.drawingBufferWidth,a=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var i=new Uint8Array(n*a*4);r.readPixels(0,0,n,a,r.RGBA,r.UNSIGNED_BYTE,i),sNt(i,n,a),lNt(i,n,a);var o=document.createElement("canvas");o.width=n,o.height=a;var s=o.getContext("2d",{willReadFrequently:!0}),l=s.createImageData(n,a);l.data.set(i),s.putImageData(l,0,0);var u;switch(e){case"jpeg":u=o.toDataURL("image/jpeg");break;case"webp":u=o.toDataURL("image/webp");break;default:u=o.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(rM),u};Dh.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[nM[t]];gP.setConvert(r,e.fullLayout),r.setScale=Dd.noop}};Dh.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},gP.setConvert(e._mockAxis,r)};WFe.exports=jFe});var ZFe=fe((Q3r,XFe)=>{"use strict";XFe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var CY=fe((ewr,$Fe)=>{"use strict";var uNt=ni(),Va=pf(),kY=ta().extendFlat,cNt=rl().overrideAll;$Fe.exports=cNt({visible:Va.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:uNt.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:Va.color,categoryorder:Va.categoryorder,categoryarray:Va.categoryarray,title:{text:Va.title.text,font:Va.title.font},type:kY({},Va.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Va.autotypenumbers,autorange:Va.autorange,autorangeoptions:{minallowed:Va.autorangeoptions.minallowed,maxallowed:Va.autorangeoptions.maxallowed,clipmin:Va.autorangeoptions.clipmin,clipmax:Va.autorangeoptions.clipmax,include:Va.autorangeoptions.include,editType:"plot"},rangemode:Va.rangemode,minallowed:Va.minallowed,maxallowed:Va.maxallowed,range:kY({},Va.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:Va.minor.tickmode,nticks:Va.nticks,tick0:Va.tick0,dtick:Va.dtick,tickvals:Va.tickvals,ticktext:Va.ticktext,ticks:Va.ticks,mirror:Va.mirror,ticklen:Va.ticklen,tickwidth:Va.tickwidth,tickcolor:Va.tickcolor,showticklabels:Va.showticklabels,labelalias:Va.labelalias,tickfont:Va.tickfont,tickangle:Va.tickangle,tickprefix:Va.tickprefix,showtickprefix:Va.showtickprefix,ticksuffix:Va.ticksuffix,showticksuffix:Va.showticksuffix,showexponent:Va.showexponent,exponentformat:Va.exponentformat,minexponent:Va.minexponent,separatethousands:Va.separatethousands,tickformat:Va.tickformat,tickformatstops:Va.tickformatstops,hoverformat:Va.hoverformat,showline:Va.showline,linecolor:Va.linecolor,linewidth:Va.linewidth,showgrid:Va.showgrid,gridcolor:kY({},Va.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:Va.gridwidth,zeroline:Va.zeroline,zerolinecolor:Va.zerolinecolor,zerolinewidth:Va.zerolinewidth},"plot","from-root")});var DY=fe((twr,KFe)=>{"use strict";var LY=CY(),fNt=nl().attributes,PY=ta().extendFlat,hNt=Xt().counterRegex;function FY(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}KFe.exports={_arrayAttrRegexps:[hNt("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:PY(FY(0,0,1),{}),center:PY(FY(0,0,0),{}),eye:PY(FY(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:fNt({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:LY,yaxis:LY,zaxis:LY,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"}});var tDe=fe((rwr,eDe)=>{"use strict";var dNt=ni(),JFe=Xt(),vNt=Mo(),pNt=CY(),gNt=SU(),mNt=vA(),QFe=["xaxis","yaxis","zaxis"],yNt=13600/187;eDe.exports=function(t,r,n){var a,i;function o(u,c){return JFe.coerce(a,i,pNt,u,c)}for(var s=0;s{"use strict";var xNt=Xt(),_Nt=ni(),bNt=bi(),wNt=b2(),TNt=tDe(),rDe=DY(),ANt=jf().getSubplotData,nDe="gl3d";iDe.exports=function(t,r,n){var a=r._basePlotModules.length>1;function i(o){if(!a){var s=xNt.validate(t[o],rDe[o]);if(s)return t[o]}}wNt(t,r,n,{type:nDe,attributes:rDe,handleDefaults:MNt,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:i,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function MNt(e,t,r,n){for(var a=r("bgcolor"),i=_Nt.combine(a,n.paper_bgcolor),o=["up","center","eye"],s=0;s.999)&&(v="turntable")}else v="turntable";r("dragmode",v),r("hovermode",n.getDfltFromLayout("hovermode"))}});var gy=fe(Rd=>{"use strict";var SNt=rl().overrideAll,ENt=tm(),kNt=YFe(),CNt=jf().getSubplotData,LNt=Xt(),PNt=Q0(),Kw="gl3d",RY="scene";Rd.name=Kw;Rd.attr=RY;Rd.idRoot=RY;Rd.idRegex=Rd.attrRegex=LNt.counterRegex("scene");Rd.attributes=ZFe();Rd.layoutAttributes=DY();Rd.baseLayoutAttrOverrides=SNt({hoverlabel:ENt.hoverlabel},"plot","nested");Rd.supplyLayoutDefaults=aDe();Rd.plot=function(t){for(var r=t._fullLayout,n=t._fullData,a=r._subplots[Kw],i=0;i{"use strict";oDe.exports={plot:gFe(),attributes:MY(),markerSymbols:fP(),supplyDefaults:TFe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:MFe(),moduleType:"trace",name:"scatter3d",basePlotModule:gy(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var uDe=fe((owr,lDe)=>{"use strict";lDe.exports=sDe()});var iM=fe((swr,hDe)=>{"use strict";var cDe=ni(),FNt=_s(),IY=pl().axisHoverFormat,{hovertemplateAttrs:DNt,templatefallbackAttrs:RNt}=Oo(),fDe=Ho(),zY=ta().extendFlat,INt=rl().overrideAll;function qY(e){return{valType:"boolean",dflt:!1}}function BY(e){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:qY("x"),y:qY("y"),z:qY("z")},color:{valType:"color",dflt:cDe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:cDe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var OY=hDe.exports=INt(zY({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:DNt(),hovertemplatefallback:RNt(),xhoverformat:IY("x"),yhoverformat:IY("y"),zhoverformat:IY("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},FNt("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:BY("x"),y:BY("y"),z:BY("z")},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:zY({},fDe.hoverinfo),showlegend:zY({},fDe.showlegend,{dflt:!1})}),"calc","nested");OY.x.editType=OY.y.editType=OY.z.editType="calc+clearAxisTypes"});var UY=fe((lwr,pDe)=>{"use strict";var zNt=bi(),dDe=Xt(),qNt=Vc(),BNt=iM(),NY=.1;function ONt(e,t){for(var r=[],n=32,a=0;a{"use strict";var gDe=Mh();mDe.exports=function(t,r){r.surfacecolor?gDe(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):gDe(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var ADe=fe((cwr,TDe)=>{"use strict";var VNt=xf().gl_surface3d,Jw=xf().ndarray,GNt=xf().ndarray_linear_interpolate.d2,HNt=d7(),jNt=v7(),aM=Xt().isArrayOrTypedArray,WNt=Sg().parseColorScale,xDe=Mg(),YNt=js().extractOpts;function bDe(e,t,r){this.scene=e,this.uid=r,this.surface=t,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var Cp=bDe.prototype;Cp.getXat=function(e,t,r,n){var a=aM(this.data.x)?aM(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?a:n.d2l(a,0,r)};Cp.getYat=function(e,t,r,n){var a=aM(this.data.y)?aM(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?a:n.d2l(a,0,r)};Cp.getZat=function(e,t,r,n){var a=this.data.z[t][e];return a===null&&this.data.connectgaps&&this.data._interpolatedZ&&(a=this.data._interpolatedZ[t][e]),r===void 0?a:n.d2l(a,0,r)};Cp.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),a=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,a],e.traceCoordinate=[this.getXat(n,a),this.getYat(n,a),this.getZat(n,a)],e.dataCoordinate=[this.getXat(n,a,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,a,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,a,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var i=0;i<3;i++){var o=e.dataCoordinate[i];o!=null&&(e.dataCoordinate[i]*=this.scene.dataScale[i])}var s=this.data.hovertext||this.data.text;return aM(s)&&s[a]&&s[a][n]!==void 0?e.textLabel=s[a][n]:s?e.textLabel=s:e.textLabel="",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};function XNt(e){var t=e[0].rgb,r=e[e.length-1].rgb;return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]&&t[3]===r[3]}var Qw=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function ZNt(e,t){if(e0){r=Qw[n];break}return r}function KNt(e,t){if(!(e<1||t<1)){for(var r=VY(e),n=VY(t),a=1,i=0;imP;)n--,n/=$Nt(n),n++,n<_De&&(n=mP);var a=Math.round(n/e);return a>1?a:1};function QNt(e,t,r){var n=r[8]+r[2]*t[0]+r[5]*t[1];return e[0]=(r[6]+r[0]*t[0]+r[3]*t[1])/n,e[1]=(r[7]+r[1]*t[0]+r[4]*t[1])/n,e}function eUt(e,t,r){return tUt(e,t,QNt,r),e}function tUt(e,t,r,n){for(var a=[0,0],i=e.shape[0],o=e.shape[1],s=0;s0&&this.contourStart[n]!==null&&this.contourEnd[n]!==null&&this.contourEnd[n]>this.contourStart[n]))for(t[n]=!0,a=this.contourStart[n];av&&(this.minValues[u]=v),this.maxValues[u]{"use strict";MDe.exports={attributes:iM(),supplyDefaults:UY().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:yDe(),plot:ADe(),moduleType:"trace",name:"surface",basePlotModule:gy(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var kDe=fe((hwr,EDe)=>{"use strict";EDe.exports=SDe()});var e5=fe((dwr,LDe)=>{"use strict";var iUt=_s(),GY=pl().axisHoverFormat,{hovertemplateAttrs:aUt,templatefallbackAttrs:oUt}=Oo(),my=iM(),CDe=Ho(),yy=ta().extendFlat;LDe.exports=yy({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:aUt({editType:"calc"}),hovertemplatefallback:oUt({editType:"calc"}),xhoverformat:GY("x"),yhoverformat:GY("y"),zhoverformat:GY("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"}},iUt("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:my.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:yy({},my.contours.x.show,{}),color:my.contours.x.color,width:my.contours.x.width,editType:"calc"},lightposition:{x:yy({},my.lightposition.x,{dflt:1e5}),y:yy({},my.lightposition.y,{dflt:1e5}),z:yy({},my.lightposition.z,{dflt:0}),editType:"calc"},lighting:yy({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},my.lighting),hoverinfo:yy({},CDe.hoverinfo,{editType:"calc"}),showlegend:yy({},CDe.showlegend,{dflt:!1})})});var xP=fe((vwr,FDe)=>{"use strict";var sUt=_s(),yP=pl().axisHoverFormat,{hovertemplateAttrs:lUt,templatefallbackAttrs:uUt}=Oo(),oM=e5(),PDe=Ho(),HY=ta().extendFlat,cUt=rl().overrideAll;function jY(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function WY(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var t5=FDe.exports=cUt(HY({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:jY("x"),y:jY("y"),z:jY("z")},caps:{x:WY("x"),y:WY("y"),z:WY("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:lUt(),hovertemplatefallback:uUt(),xhoverformat:yP("x"),yhoverformat:yP("y"),zhoverformat:yP("z"),valuehoverformat:yP("value",1),showlegend:HY({},PDe.showlegend,{dflt:!1})},sUt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:oM.opacity,lightposition:oM.lightposition,lighting:oM.lighting,flatshading:oM.flatshading,contour:oM.contour,hoverinfo:HY({},PDe.hoverinfo)}),"calc","nested");t5.flatshading.dflt=!0;t5.lighting.facenormalsepsilon.dflt=0;t5.x.editType=t5.y.editType=t5.z.editType=t5.value.editType="calc+clearAxisTypes"});var YY=fe((pwr,RDe)=>{"use strict";var fUt=Xt(),hUt=bi(),dUt=xP(),vUt=Vc();function pUt(e,t,r,n){function a(i,o){return fUt.coerce(e,t,dUt,i,o)}DDe(e,t,r,n,a)}function DDe(e,t,r,n,a){var i=a("isomin"),o=a("isomax");o!=null&&i!==void 0&&i!==null&&i>o&&(t.isomin=null,t.isomax=null);var s=a("x"),l=a("y"),u=a("z"),c=a("value");if(!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length){t.visible=!1;return}var f=hUt.getComponentMethod("calendars","handleTraceDefaults");f(e,t,["x","y","z"],n),a("valuehoverformat"),["x","y","z"].forEach(function(x){a(x+"hoverformat");var _="caps."+x,y=a(_+".show");y&&a(_+".fill");var C="slices."+x,k=a(C+".show");k&&(a(C+".fill"),a(C+".locations"))});var v=a("spaceframe.show");v&&a("spaceframe.fill");var g=a("surface.show");g&&(a("surface.count"),a("surface.fill"),a("surface.pattern"));var p=a("contour.show");p&&(a("contour.color"),a("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(x){a(x)}),vUt(e,t,n,a,{prefix:"",cLetter:"c"}),t._length=null}RDe.exports={supplyDefaults:pUt,supplyIsoDefaults:DDe}});var _P=fe((gwr,zDe)=>{"use strict";var ZY=Xt(),gUt=Mh();function mUt(e,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=T1(t.u,t._len),t._v=T1(t.v,t._len),t._w=T1(t.w,t._len),t._x=T1(t.x,t._len),t._y=T1(t.y,t._len),t._z=T1(t.z,t._len);var r=IDe(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;var n=0,a,i,o;t.starts&&(a=T1(t.starts.x||[]),i=T1(t.starts.y||[]),o=T1(t.starts.z||[]),n=Math.min(a.length,i.length,o.length)),t._startsX=a||[],t._startsY=i||[],t._startsZ=o||[];var s=0,l=1/0,u;for(u=0;u1&&(k=t[a-1],L=r[a-1],A=n[a-1]),i=0;ik?"-":"+")+"x"),p=p.replace("y",(S>L?"-":"+")+"y"),p=p.replace("z",(w>A?"-":"+")+"z");var E=function(){a=0,T=[],m=[],F=[]};(!a||a{"use strict";var yUt=Mh(),xUt=_P().processGrid,bP=_P().filter;qDe.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=bP(r.x,r._len),r._y=bP(r.y,r._len),r._z=bP(r.z,r._len),r._value=bP(r.value,r._len);var n=xUt(r);r._gridFill=n.fill,r._Xs=n.Xs,r._Ys=n.Ys,r._Zs=n.Zs,r._len=n.len;for(var a=1/0,i=-1/0,o=0;o{"use strict";BDe.exports=function(t,r,n,a){a=a||t.length;for(var i=new Array(a),o=0;o{"use strict";var _Ut=xf().gl_mesh3d,bUt=Sg().parseColorScale,wUt=Xt().isArrayOrTypedArray,TUt=Mg(),AUt=js().extractOpts,ODe=r5(),sM=function(e,t){for(var r=t.length-1;r>0;r--){var n=Math.min(t[r],t[r-1]),a=Math.max(t[r],t[r-1]);if(a>n&&n-1}function ee($e,ot){return $e===null?ot:$e}function ce($e,ot,tt){E();var nt=[ot],We=[tt];if(j>=1)nt=[ot],We=[tt];else if(j>0){var mt=U(ot,tt);nt=mt.xyzv,We=mt.abc}for(var bt=0;bt-1?tt[jt]:F(mr,or,fr);cr>-1?Yt[jt]=cr:Yt[jt]=R(mr,or,fr,ee($e,Ot))}B(Yt[0],Yt[1],Yt[2])}}function ye($e,ot,tt){var nt=function(We,mt,bt){ce($e,[ot[We],ot[mt],ot[bt]],[tt[We],tt[mt],tt[bt]])};nt(0,1,2),nt(2,3,0)}function xe($e,ot,tt){var nt=function(We,mt,bt){ce($e,[ot[We],ot[mt],ot[bt]],[tt[We],tt[mt],tt[bt]])};nt(0,1,2),nt(3,0,1),nt(2,3,0),nt(1,2,3)}function ue($e,ot,tt,nt){var We=$e[3];Went&&(We=nt);for(var mt=($e[3]-We)/($e[3]-ot[3]+1e-9),bt=[],Yt=0;Yt<4;Yt++)bt[Yt]=(1-mt)*$e[Yt]+mt*ot[Yt];return bt}function K($e,ot,tt){return $e>=ot&&$e<=tt}function _e($e){var ot=.001*(L-S);return $e>=S-ot&&$e<=L+ot}function ne($e){for(var ot=[],tt=0;tt<4;tt++){var nt=$e[tt];ot.push([e._x[nt],e._y[nt],e._z[nt],e._value[nt]])}return ot}var ae=3;function pe($e,ot,tt,nt,We,mt){mt||(mt=1),tt=[-1,-1,-1];var bt=!1,Yt=[K(ot[0][3],nt,We),K(ot[1][3],nt,We),K(ot[2][3],nt,We)];if(!Yt[0]&&!Yt[1]&&!Yt[2])return!1;var jt=function(or,fr,Ot){return _e(fr[0][3])&&_e(fr[1][3])&&_e(fr[2][3])?(ce(or,fr,Ot),!0):mtYt?[C,mt]:[mt,k];et(ot,jt[0],jt[1])}}var mr=[[Math.min(S,k),Math.max(S,k)],[Math.min(C,L),Math.max(C,L)]];["x","y","z"].forEach(function(or){for(var fr=[],Ot=0;Ot0&&(Lt.push(rr.id),or==="x"?ft.push([rr.distRatio,0,0]):or==="y"?ft.push([0,rr.distRatio,0]):ft.push([0,0,rr.distRatio]))}else or==="x"?Mt=Ke(1,g-1):or==="y"?Mt=Ke(1,p-1):Mt=Ke(1,x-1);Lt.length>0&&(or==="x"?fr[cr]=qe($e,Lt,Ct,wt,ft,fr[cr]):or==="y"?fr[cr]=we($e,Lt,Ct,wt,ft,fr[cr]):fr[cr]=Le($e,Lt,Ct,wt,ft,fr[cr]),cr++),Mt.length>0&&(or==="x"?fr[cr]=ht($e,Mt,Ct,wt,fr[cr]):or==="y"?fr[cr]=it($e,Mt,Ct,wt,fr[cr]):fr[cr]=Oe($e,Mt,Ct,wt,fr[cr]),cr++)}var pr=e.caps[or];pr.show&&pr.fill&&(q(pr.fill),or==="x"?fr[cr]=ht($e,[0,g-1],Ct,wt,fr[cr]):or==="y"?fr[cr]=it($e,[0,p-1],Ct,wt,fr[cr]):fr[cr]=Oe($e,[0,x-1],Ct,wt,fr[cr]),cr++)}}),s===0&&I(),e._meshX=w,e._meshY=A,e._meshZ=T,e._meshIntensity=m,e._Xs=c,e._Ys=f,e._Zs=v}return Ve(),e}function SUt(e,t){var r=e.glplot.gl,n=_Ut({gl:r}),a=new NDe(e,n,t.uid);return n._trace=a,a.update(t),e.glplot.add(n),a}VDe.exports={findNearestOnAxis:sM,generateIsoMeshes:UDe,createIsosurfaceTrace:SUt}});var HDe=fe((_wr,GDe)=>{"use strict";GDe.exports={attributes:xP(),supplyDefaults:YY().supplyDefaults,calc:$Y(),colorbar:{min:"cmin",max:"cmax"},plot:wP().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:gy(),categories:["gl3d","showLegend"],meta:{}}});var WDe=fe((bwr,jDe)=>{"use strict";jDe.exports=HDe()});var QY=fe((wwr,XDe)=>{"use strict";var EUt=_s(),Ou=xP(),kUt=iM(),YDe=Ho(),JY=ta().extendFlat,CUt=rl().overrideAll,TP=XDe.exports=CUt(JY({x:Ou.x,y:Ou.y,z:Ou.z,value:Ou.value,isomin:Ou.isomin,isomax:Ou.isomax,surface:Ou.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:Ou.slices,caps:Ou.caps,text:Ou.text,hovertext:Ou.hovertext,xhoverformat:Ou.xhoverformat,yhoverformat:Ou.yhoverformat,zhoverformat:Ou.zhoverformat,valuehoverformat:Ou.valuehoverformat,hovertemplate:Ou.hovertemplate,hovertemplatefallback:Ou.hovertemplatefallback},EUt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:Ou.colorbar,opacity:Ou.opacity,opacityscale:kUt.opacityscale,lightposition:Ou.lightposition,lighting:Ou.lighting,flatshading:Ou.flatshading,contour:Ou.contour,hoverinfo:JY({},YDe.hoverinfo),showlegend:JY({},YDe.showlegend,{dflt:!1})}),"calc","nested");TP.x.editType=TP.y.editType=TP.z.editType=TP.value.editType="calc+clearAxisTypes"});var $De=fe((Twr,ZDe)=>{"use strict";var LUt=Xt(),PUt=QY(),FUt=YY().supplyIsoDefaults,DUt=UY().opacityscaleDefaults;ZDe.exports=function(t,r,n,a){function i(o,s){return LUt.coerce(t,r,PUt,o,s)}FUt(t,r,n,a,i),DUt(t,r,a,i)}});var eRe=fe((Awr,QDe)=>{"use strict";var RUt=xf().gl_mesh3d,IUt=Sg().parseColorScale,zUt=Xt().isArrayOrTypedArray,qUt=Mg(),BUt=js().extractOpts,KDe=r5(),eX=wP().findNearestOnAxis,OUt=wP().generateIsoMeshes;function JDe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var tX=JDe.prototype;tX.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],a=this.data._meshZ[t],i=this.data._Ys.length,o=this.data._Zs.length,s=eX(r,this.data._Xs).id,l=eX(n,this.data._Ys).id,u=eX(a,this.data._Zs).id,c=e.index=u+o*l+o*i*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return zUt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};tX.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=OUt(e);function n(l,u,c,f){return u.map(function(v){return l.d2l(v,0,f)*c})}var a=KDe(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),i=KDe(e._meshI,e._meshJ,e._meshK),o={positions:a,cells:i,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:qUt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=BUt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=IUt(e),this.mesh.update(o)};tX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function NUt(e,t){var r=e.glplot.gl,n=RUt({gl:r}),a=new JDe(e,n,t.uid);return n._trace=a,a.update(t),e.glplot.add(n),a}QDe.exports=NUt});var rRe=fe((Mwr,tRe)=>{"use strict";tRe.exports={attributes:QY(),supplyDefaults:$De(),calc:$Y(),colorbar:{min:"cmin",max:"cmax"},plot:eRe(),moduleType:"trace",name:"volume",basePlotModule:gy(),categories:["gl3d","showLegend"],meta:{}}});var iRe=fe((Swr,nRe)=>{"use strict";nRe.exports=rRe()});var sRe=fe((Ewr,oRe)=>{"use strict";var UUt=bi(),aRe=Xt(),VUt=Vc(),GUt=e5();oRe.exports=function(t,r,n,a){function i(c,f){return aRe.coerce(t,r,GUt,c,f)}function o(c){var f=c.map(function(v){var g=i(v);return g&&aRe.isArrayOrTypedArray(g)?g:null});return f.every(function(v){return v&&v.length===f[0].length})&&f}var s=o(["x","y","z"]);if(!s){r.visible=!1;return}if(o(["i","j","k"]),r.i&&(!r.j||!r.k)||r.j&&(!r.k||!r.i)||r.k&&(!r.i||!r.j)){r.visible=!1;return}var l=UUt.getComponentMethod("calendars","handleTraceDefaults");l(t,r,["x","y","z"],a),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(c){i(c)});var u=i("contour.show");u&&(i("contour.color"),i("contour.width")),"intensity"in t?(i("intensity"),i("intensitymode"),VUt(t,r,a,i,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?i("facecolor"):"vertexcolor"in t?i("vertexcolor"):i("color",n)),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}});var uRe=fe((kwr,lRe)=>{"use strict";var HUt=Mh();lRe.exports=function(t,r){r.intensity&&HUt(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var vRe=fe((Cwr,dRe)=>{"use strict";var jUt=xf().gl_mesh3d,WUt=xf().delaunay_triangulate,YUt=xf().alpha_shape,XUt=xf().convex_hull,ZUt=Sg().parseColorScale,$Ut=Xt().isArrayOrTypedArray,aX=Mg(),KUt=js().extractOpts,cRe=r5();function hRe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var oX=hRe.prototype;oX.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return $Ut(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function fRe(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}oX.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,a=cRe(rX(r.xaxis,e.x,t.dataScale[0],e.xcalendar),rX(r.yaxis,e.y,t.dataScale[1],e.ycalendar),rX(r.zaxis,e.z,t.dataScale[2],e.zcalendar)),i;if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!iX(e.i,n)||!iX(e.j,n)||!iX(e.k,n))return;i=cRe(nX(e.i),nX(e.j),nX(e.k))}else e.alphahull===0?i=XUt(a):e.alphahull>0?i=YUt(e.alphahull,a):i=JUt(e.delaunayaxis,a);var o={positions:a,cells:i,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:aX(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=KUt(e);this.color="#fff";var l=e.intensitymode;o[l+"Intensity"]=e.intensity,o[l+"IntensityBounds"]=[s.min,s.max],o.colormap=ZUt(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=fRe(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=fRe(e.facecolor)):(this.color=e.color,o.meshColor=aX(e.color));this.mesh.update(o)};oX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function QUt(e,t){var r=e.glplot.gl,n=jUt({gl:r}),a=new hRe(e,n,t.uid);return n._trace=a,a.update(t),e.glplot.add(n),a}dRe.exports=QUt});var gRe=fe((Lwr,pRe)=>{"use strict";pRe.exports={attributes:e5(),supplyDefaults:sRe(),calc:uRe(),colorbar:{min:"cmin",max:"cmax"},plot:vRe(),moduleType:"trace",name:"mesh3d",basePlotModule:gy(),categories:["gl3d","showLegend"],meta:{}}});var yRe=fe((Pwr,mRe)=>{"use strict";mRe.exports=gRe()});var lX=fe((Fwr,_Re)=>{"use strict";var eVt=_s(),n5=pl().axisHoverFormat,{hovertemplateAttrs:tVt,templatefallbackAttrs:rVt}=Oo(),nVt=e5(),xRe=Ho(),sX=ta().extendFlat,AP={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:tVt({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:rVt({editType:"calc"}),uhoverformat:n5("u",1),vhoverformat:n5("v",1),whoverformat:n5("w",1),xhoverformat:n5("x"),yhoverformat:n5("y"),zhoverformat:n5("z"),showlegend:sX({},xRe.showlegend,{dflt:!1})};sX(AP,eVt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var iVt=["opacity","lightposition","lighting"];iVt.forEach(function(e){AP[e]=nVt[e]});AP.hoverinfo=sX({},xRe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});_Re.exports=AP});var wRe=fe((Dwr,bRe)=>{"use strict";var aVt=Xt(),oVt=Vc(),sVt=lX();bRe.exports=function(t,r,n,a){function i(g,p){return aVt.coerce(t,r,sVt,g,p)}var o=i("u"),s=i("v"),l=i("w"),u=i("x"),c=i("y"),f=i("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}var v=i("sizemode");i("sizeref",v==="raw"?1:.5),i("anchor"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),oVt(t,r,a,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}});var ARe=fe((Rwr,TRe)=>{"use strict";var lVt=Mh();TRe.exports=function(t,r){for(var n=r.u,a=r.v,i=r.w,o=Math.min(r.x.length,r.y.length,r.z.length,n.length,a.length,i.length),s=-1/0,l=1/0,u=0;u{"use strict";var uVt=xf().gl_cone3d,cVt=xf().gl_cone3d.createConeMesh,fVt=Xt().simpleMap,hVt=Sg().parseColorScale,dVt=js().extractOpts,vVt=Xt().isArrayOrTypedArray,MRe=r5();function SRe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var uX=SRe.prototype;uX.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],n=this.data.y[t],a=this.data.z[t],i=this.data.u[t],o=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,n,a,i,o,s,Math.sqrt(i*i+o*o+s*s)];var l=this.data.hovertext||this.data.text;return vVt(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var pVt={xaxis:0,yaxis:1,zaxis:2},gVt={tip:1,tail:0,cm:.25,center:.5},mVt={tip:1,tail:1,cm:.75,center:.5};function ERe(e,t){var r=e.fullSceneLayout,n=e.dataScale,a={};function i(c,f){var v=r[f],g=n[pVt[f]];return fVt(c,function(p){return v.d2l(p)*g})}a.vectors=MRe(i(t.u,"xaxis"),i(t.v,"yaxis"),i(t.w,"zaxis"),t._len),a.positions=MRe(i(t.x,"xaxis"),i(t.y,"yaxis"),i(t.z,"zaxis"),t._len);var o=dVt(t);a.colormap=hVt(t),a.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],a.coneOffset=gVt[t.anchor];var s=t.sizemode;s==="scaled"?a.coneSize=t.sizeref||.5:s==="absolute"?a.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5:s==="raw"&&(a.coneSize=t.sizeref),a.coneSizemode=s;var l=uVt(a),u=t.lightposition;return l.lightPosition=[u.x,u.y,u.z],l.ambient=t.lighting.ambient,l.diffuse=t.lighting.diffuse,l.specular=t.lighting.specular,l.roughness=t.lighting.roughness,l.fresnel=t.lighting.fresnel,l.opacity=t.opacity,t._pad=mVt[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}uX.update=function(e){this.data=e;var t=ERe(this.scene,e);this.mesh.update(t)};uX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function yVt(e,t){var r=e.glplot.gl,n=ERe(e,t),a=cVt(r,n),i=new SRe(e,t.uid);return i.mesh=a,i.data=t,a._trace=i,e.glplot.add(a),i}kRe.exports=yVt});var PRe=fe((zwr,LRe)=>{"use strict";LRe.exports={moduleType:"trace",name:"cone",basePlotModule:gy(),categories:["gl3d","showLegend"],attributes:lX(),supplyDefaults:wRe(),colorbar:{min:"cmin",max:"cmax"},calc:ARe(),plot:CRe(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var DRe=fe((qwr,FRe)=>{"use strict";FRe.exports=PRe()});var fX=fe((Bwr,IRe)=>{"use strict";var xVt=_s(),i5=pl().axisHoverFormat,{hovertemplateAttrs:_Vt,templatefallbackAttrs:bVt}=Oo(),wVt=e5(),RRe=Ho(),cX=ta().extendFlat,MP={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"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:_Vt({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:bVt({editType:"calc"}),uhoverformat:i5("u",1),vhoverformat:i5("v",1),whoverformat:i5("w",1),xhoverformat:i5("x"),yhoverformat:i5("y"),zhoverformat:i5("z"),showlegend:cX({},RRe.showlegend,{dflt:!1})};cX(MP,xVt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var TVt=["opacity","lightposition","lighting"];TVt.forEach(function(e){MP[e]=wVt[e]});MP.hoverinfo=cX({},RRe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});IRe.exports=MP});var qRe=fe((Owr,zRe)=>{"use strict";var AVt=Xt(),MVt=Vc(),SVt=fX();zRe.exports=function(t,r,n,a){function i(v,g){return AVt.coerce(t,r,SVt,v,g)}var o=i("u"),s=i("v"),l=i("w"),u=i("x"),c=i("y"),f=i("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}i("starts.x"),i("starts.y"),i("starts.z"),i("maxdisplayed"),i("sizeref"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),MVt(t,r,a,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}});var jRe=fe((Nwr,HRe)=>{"use strict";var NRe=xf().gl_streamtube3d,EVt=NRe.createTubeMesh,kVt=Xt(),CVt=Sg().parseColorScale,LVt=js().extractOpts,BRe=r5(),URe={xaxis:0,yaxis:1,zaxis:2};function VRe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var dX=VRe.prototype;dX.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var l=t[s],u=r[URe[s]];return l.l2c(o)/u}if(e.object===this.mesh){var a=e.data.position,i=e.data.velocity;return e.traceCoordinate=[n(a[0],"xaxis"),n(a[1],"yaxis"),n(a[2],"zaxis"),n(i[0],"xaxis"),n(i[1],"yaxis"),n(i[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function ORe(e){var t=e.length,r;return t>2?r=e.slice(1,t-1):t===2?r=[(e[0]+e[1])/2]:r=e,r}function hX(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function GRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,a=t._len,i={};function o(I,R){var B=r[R],O=n[URe[R]];return kVt.simpleMap(I,function(V){return B.d2l(V)*O})}if(i.vectors=BRe(o(t._u,"xaxis"),o(t._v,"yaxis"),o(t._w,"zaxis"),a),!a)return{positions:[],cells:[]};var s=o(t._Xs,"xaxis"),l=o(t._Ys,"yaxis"),u=o(t._Zs,"zaxis");i.meshgrid=[s,l,u],i.gridFill=t._gridFill;var c=t._slen;if(c)i.startingPositions=BRe(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var f=l[0],v=ORe(s),g=ORe(u),p=new Array(v.length*g.length),x=0,_=0;_{"use strict";WRe.exports={moduleType:"trace",name:"streamtube",basePlotModule:gy(),categories:["gl3d","showLegend"],attributes:fX(),supplyDefaults:qRe(),colorbar:{min:"cmin",max:"cmax"},calc:_P().calc,plot:jRe(),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}});var ZRe=fe((Vwr,XRe)=>{"use strict";XRe.exports=YRe()});var a5=fe((Gwr,eIe)=>{"use strict";var{hovertemplateAttrs:FVt,texttemplateAttrs:DVt,templatefallbackAttrs:$Re}=Oo(),RVt=n1(),A1=Ol(),IVt=Ho(),KRe=_s(),zVt=Uc().dash,a_=ta().extendFlat,qVt=rl().overrideAll,Rv=A1.marker,JRe=A1.line,QRe=Rv.line;eIe.exports=qVt({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:a_({},A1.mode,{dflt:"markers"}),text:a_({},A1.text,{}),texttemplate:DVt({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:$Re({editType:"plot"}),hovertext:a_({},A1.hovertext,{}),textfont:A1.textfont,textposition:A1.textposition,line:{color:JRe.color,width:JRe.width,dash:zVt},connectgaps:A1.connectgaps,marker:a_({symbol:Rv.symbol,opacity:Rv.opacity,angle:Rv.angle,angleref:a_({},Rv.angleref,{values:["previous","up","north"]}),standoff:Rv.standoff,size:Rv.size,sizeref:Rv.sizeref,sizemin:Rv.sizemin,sizemode:Rv.sizemode,colorbar:Rv.colorbar,line:a_({width:QRe.width,dash:QRe.dash},KRe("marker.line")),gradient:Rv.gradient},KRe("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:RVt(),selected:A1.selected,unselected:A1.unselected,hoverinfo:a_({},IVt.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:FVt(),hovertemplatefallback:$Re()},"calc","nested")});var rIe=fe((Hwr,tIe)=>{"use strict";var vX=Xt(),pX=Is(),BVt=vv(),OVt=lp(),NVt=up(),UVt=a1(),VVt=a5();tIe.exports=function(t,r,n,a){function i(g,p){return vX.coerce(t,r,VVt,g,p)}var o=i("locations"),s;if(o&&o.length){var l=i("geojson"),u;(typeof l=="string"&&l!==""||vX.isPlainObject(l))&&(u="geojson-id");var c=i("locationmode",u);c==="geojson-id"&&i("featureidkey"),s=o.length}else{var f=i("lon")||[],v=i("lat")||[];s=Math.min(f.length,v.length)}if(!s){r.visible=!1;return}r._length=s,i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("mode"),pX.hasMarkers(r)&&BVt(t,r,n,a,i,{gradient:!0}),pX.hasLines(r)&&(OVt(t,r,n,a,i),i("connectgaps")),pX.hasText(r)&&(i("texttemplate"),i("texttemplatefallback"),NVt(t,r,a,i)),i("fill"),r.fill!=="none"&&UVt(t,r,n,i),vX.coerceSelectionMarkerOpacity(r,i)}});var aIe=fe((jwr,iIe)=>{"use strict";var nIe=Yi();iIe.exports=function(t,r,n){var a={},i=n[r.geo]._subplot,o=i.mockAxis,s=t.lonlat;return a.lonLabel=nIe.tickText(o,o.c2l(s[0]),!0).text,a.latLabel=nIe.tickText(o,o.c2l(s[1]),!0).text,a}});var mX=fe((Wwr,uIe)=>{"use strict";var gX=aa(),oIe=Wa().BADNUM,GVt=pv(),HVt=o1(),jVt=P0(),WVt=Xt().isArrayOrTypedArray,sIe=Xt()._;function lIe(e){return e&&typeof e=="string"}uIe.exports=function(t,r){var n=WVt(r.locations),a=n?r.locations.length:r._length,i=new Array(a),o;r.geojson?o=function(v){return lIe(v)||gX(v)}:o=lIe;for(var s=0;s{"use strict";th.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"};th.axesNames=["lonaxis","lataxis"];th.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};th.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};th.fitboundsIncompatible=new Set(["albers usa","craig","peirce quincuncial","satellite"]);th.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:"equirectangular",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:"equirectangular",projRotate:[0,0,0]}};th.clipPad=.001;th.precision=.1;th.landColor="#F0DC82";th.waterColor="#3399FF";th.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};th.sphereSVG={type:"Sphere"};th.fillLayers={ocean:1,land:1,lakes:1};th.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};th.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];th.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];th.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var yX=fe((SP,cIe)=>{(function(e,t){typeof SP=="object"&&typeof cIe!="undefined"?t(SP):(e=e||self,t(e.topojson=e.topojson||{}))})(SP,function(e){"use strict";function t(k){return k}function r(k){if(k==null)return t;var S,L,w=k.scale[0],A=k.scale[1],T=k.translate[0],m=k.translate[1];return function(F,E){E||(S=L=0);var I=2,R=F.length,B=new Array(R);for(B[0]=(S+=F[0])*w+T,B[1]=(L+=F[1])*A+m;IT&&(T=I[0]),I[1]m&&(m=I[1])}function E(I){switch(I.type){case"GeometryCollection":I.geometries.forEach(E);break;case"Point":F(I.coordinates);break;case"MultiPoint":I.coordinates.forEach(F);break}}k.arcs.forEach(function(I){for(var R=-1,B=I.length,O;++RT&&(T=O[0]),O[1]m&&(m=O[1])});for(L in k.objects)E(k.objects[L]);return[w,A,T,m]}function a(k,S){for(var L,w=k.length,A=w-S;A<--w;)L=k[A],k[A++]=k[w],k[w]=L}function i(k,S){return typeof S=="string"&&(S=k.objects[S]),S.type==="GeometryCollection"?{type:"FeatureCollection",features:S.geometries.map(function(L){return o(k,L)})}:o(k,S)}function o(k,S){var L=S.id,w=S.bbox,A=S.properties==null?{}:S.properties,T=s(k,S);return L==null&&w==null?{type:"Feature",properties:A,geometry:T}:w==null?{type:"Feature",id:L,properties:A,geometry:T}:{type:"Feature",id:L,bbox:w,properties:A,geometry:T}}function s(k,S){var L=r(k.transform),w=k.arcs;function A(R,B){B.length&&B.pop();for(var O=w[R<0?~R:R],V=0,j=O.length;V1)w=f(k,S,L);else for(A=0,w=new Array(T=k.arcs.length);A1)for(var B=1,O=F(I[0]),V,j;BO&&(j=I[0],I[0]=I[B],I[B]=j,O=V);return I}).filter(function(E){return E.length>0})}}function x(k,S){for(var L=0,w=k.length;L>>1;k[A]=2))throw new Error("n must be \u22652");E=k.bbox||n(k);var L=E[0],w=E[1],A=E[2],T=E[3],m;S={scale:[A-L?(A-L)/(m-1):1,T-w?(T-w)/(m-1):1],translate:[L,w]}}else E=k.bbox;var F=y(S),E,I,R=k.objects,B={};function O(q){return F(q)}function V(q){var U;switch(q.type){case"GeometryCollection":U={type:"GeometryCollection",geometries:q.geometries.map(V)};break;case"Point":U={type:"Point",coordinates:O(q.coordinates)};break;case"MultiPoint":U={type:"MultiPoint",coordinates:q.coordinates.map(O)};break;default:return q}return q.id!=null&&(U.id=q.id),q.bbox!=null&&(U.bbox=q.bbox),q.properties!=null&&(U.properties=q.properties),U}function j(q){var U=0,J=1,ee=q.length,ce,ye=new Array(ee);for(ye[0]=F(q[0],0);++U{"use strict";var xX=fIe.exports={},YVt=lM().locationmodeToLayer,XVt=yX().feature;xX.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};xX.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`};xX.getTopojsonFeatures=function(e,t){var r=YVt[e.locationmode],n=t.objects[r];return XVt(t,n).features}});var cM=fe(uM=>{"use strict";var ZVt=Wa().BADNUM;uM.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,n=[],a=[],i=0;i0&&(n.push(a),a=[])}return a.length>0&&n.push(a),n};uM.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};uM.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{"use strict";var bX=Object.defineProperty,$Vt=Object.getOwnPropertyDescriptor,KVt=Object.getOwnPropertyNames,JVt=Object.prototype.hasOwnProperty,QVt=(e,t)=>{for(var r in t)bX(e,r,{get:t[r],enumerable:!0})},eGt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of KVt(t))!JVt.call(e,a)&&a!==r&&bX(e,a,{get:()=>t[a],enumerable:!(n=$Vt(t,a))||n.enumerable});return e},tGt=e=>eGt(bX({},"__esModule",{value:!0}),e),hIe={};QVt(hIe,{COUNTRIES:()=>dIe,byAlpha2:()=>aGt,byAlpha3:()=>iGt,byM49:()=>oGt,createLookup:()=>vIe,lookup:()=>rGt,lookupAlpha3:()=>nGt,sanitize:()=>_X});pIe.exports=tGt(hIe);var dIe=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\u{1F1F3}\u{1F1F7}","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function _X(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function vIe(e){let t=new Map,r=new Map,n=new Map;for(let s of e)t.set(s.iso3,s),s.iso2&&r.set(s.iso2,s),s.m49&&n.set(s.m49,s);let a=new Map;for(let s of e)for(let l of[s.name,...s.aliases]){let u=_X(l),c=a.get(u);if(c!==void 0&&c!==s.iso3)throw new Error(`Duplicate name/alias "${u}": ${c} vs ${s.iso3}`);a.set(u,s.iso3)}function i(s){if(s==null)return;let l=String(s).trim();if(!l)return;if(/^\d+$/.test(l)){let c=n.get(String(parseInt(l,10)).padStart(3,"0"));if(c)return c}if(/^[A-Za-z]{2}$/.test(l)){let c=r.get(l.toUpperCase());if(c)return c}if(/^[A-Za-z]{3}$/.test(l)){let c=t.get(l.toUpperCase());if(c)return c}let u=a.get(_X(l));return u===void 0?void 0:t.get(u)}function o(s){var l;return(l=i(s))==null?void 0:l.iso3}return{lookup:i,lookupAlpha3:o,byAlpha3:t,byAlpha2:r,byM49:n}}var fM=vIe(dIe),rGt=fM.lookup,nGt=fM.lookupAlpha3,iGt=fM.byAlpha3,aGt=fM.byAlpha2,oGt=fM.byM49});var LP=fe(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});var f0=63710088e-1,TX={centimeters:f0*100,centimetres:f0*100,degrees:360/(2*Math.PI),feet:f0*3.28084,inches:f0*39.37,kilometers:f0/1e3,kilometres:f0/1e3,meters:f0,metres:f0,miles:f0/1609.344,millimeters:f0*1e3,millimetres:f0*1e3,nauticalmiles:f0/1852,radians:1,yards:f0*1.0936},wX={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 xy(e,t,r={}){let n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function sGt(e,t,r={}){switch(e){case"Point":return AX(t).geometry;case"LineString":return SX(t).geometry;case"Polygon":return MX(t).geometry;case"MultiPoint":return yIe(t).geometry;case"MultiLineString":return mIe(t).geometry;case"MultiPolygon":return xIe(t).geometry;default:throw new Error(e+" is invalid")}}function AX(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!kP(e[0])||!kP(e[1]))throw new Error("coordinates must contain numbers");return xy({type:"Point",coordinates:e},t,r)}function lGt(e,t,r={}){return CP(e.map(n=>AX(n,t)),r)}function MX(e,t,r={}){for(let a of e){if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(a[a.length-1].length!==a[0].length)throw new Error("First and last Position are not equivalent.");for(let i=0;iMX(n,t)),r)}function SX(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return xy({type:"LineString",coordinates:e},t,r)}function cGt(e,t,r={}){return CP(e.map(n=>SX(n,t)),r)}function CP(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function mIe(e,t,r={}){return xy({type:"MultiLineString",coordinates:e},t,r)}function yIe(e,t,r={}){return xy({type:"MultiPoint",coordinates:e},t,r)}function xIe(e,t,r={}){return xy({type:"MultiPolygon",coordinates:e},t,r)}function fGt(e,t,r={}){return xy({type:"GeometryCollection",geometries:e},t,r)}function hGt(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r}function _Ie(e,t="kilometers"){let r=TX[t];if(!r)throw new Error(t+" units is invalid");return e*r}function EX(e,t="kilometers"){let r=TX[t];if(!r)throw new Error(t+" units is invalid");return e/r}function dGt(e,t){return bIe(EX(e,t))}function vGt(e){let t=e%360;return t<0&&(t+=360),t}function pGt(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function bIe(e){return e%(2*Math.PI)*180/Math.PI}function gGt(e){return e%360*Math.PI/180}function mGt(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return _Ie(EX(e,t),r)}function yGt(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=wX[t];if(!n)throw new Error("invalid original units");let a=wX[r];if(!a)throw new Error("invalid final units");return e/n*a}function kP(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function xGt(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function _Gt(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(t=>{if(!kP(t))throw new Error("bbox must only contain numbers")})}function bGt(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}Cs.areaFactors=wX;Cs.azimuthToBearing=pGt;Cs.bearingToAzimuth=vGt;Cs.convertArea=yGt;Cs.convertLength=mGt;Cs.degreesToRadians=gGt;Cs.earthRadius=f0;Cs.factors=TX;Cs.feature=xy;Cs.featureCollection=CP;Cs.geometry=sGt;Cs.geometryCollection=fGt;Cs.isNumber=kP;Cs.isObject=xGt;Cs.lengthToDegrees=dGt;Cs.lengthToRadians=EX;Cs.lineString=SX;Cs.lineStrings=cGt;Cs.multiLineString=mIe;Cs.multiPoint=yIe;Cs.multiPolygon=xIe;Cs.point=AX;Cs.points=lGt;Cs.polygon=MX;Cs.polygons=uGt;Cs.radiansToDegrees=bIe;Cs.radiansToLength=_Ie;Cs.round=hGt;Cs.validateBBox=_Gt;Cs.validateId=bGt});var FP=fe(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var ud=LP();function hM(e,t,r){if(e!==null)for(var n,a,i,o,s,l,u,c=0,f=0,v,g=e.type,p=g==="FeatureCollection",x=g==="Feature",_=p?e.features.length:1,y=0;y<_;y++){u=p?e.features[y].geometry:x?e.geometry:e,v=u?u.type==="GeometryCollection":!1,s=v?u.geometries.length:1;for(var C=0;Cl||p>u||x>c){s=f,l=n,u=p,c=x,i=0;return}var _=ud.lineString.call(void 0,[s,f],r.properties);if(t(_,n,a,x,i)===!1)return!1;i++,s=f})===!1)return!1}}})}function kGt(e,t,r){var n=r,a=!1;return AIe(e,function(i,o,s,l,u){a===!1&&r===void 0?n=i:n=t(n,i,o,s,l,u),a=!0}),n}function MIe(e,t){if(!e)throw new Error("geojson is required");PP(e,function(r,n,a){if(r.geometry!==null){var i=r.geometry.type,o=r.geometry.coordinates;switch(i){case"LineString":if(t(r,n,a,0,0)===!1)return!1;break;case"Polygon":for(var s=0;s{"use strict";Object.defineProperty(DP,"__esModule",{value:!0});var SIe=LP(),FGt=FP();function CIe(e){return FGt.geomReduce.call(void 0,e,(t,r)=>t+DGt(r),0)}function DGt(e){let t=0,r;switch(e.type){case"Polygon":return EIe(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(kIe(e[0]));for(let r=1;r=t?(n+2)%t:n+2],s=a[0]*CX,l=i[1]*CX,u=o[0]*CX;r+=(u-s)*Math.sin(l),n++}return r*RGt}var IGt=CIe;DP.area=CIe;DP.default=IGt});var FIe=fe(RP=>{"use strict";Object.defineProperty(RP,"__esModule",{value:!0});var zGt=LP(),qGt=FP();function PIe(e,t={}){let r=0,n=0,a=0;return qGt.coordEach.call(void 0,e,function(i){r+=i[0],n+=i[1],a++},!0),zGt.point.call(void 0,[r/a,n/a],t.properties)}var BGt=PIe;RP.centroid=PIe;RP.default=BGt});var RIe=fe((IP,DIe)=>{(function(e,t){t(typeof IP=="object"&&typeof DIe!="undefined"?IP:e.d3=e.d3||{})})(IP,(function(e){"use strict";function t(ne,ae){return neae?1:ne>=ae?0:NaN}function r(ne){return ne.length===1&&(ne=n(ne)),{left:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)<0?ie=me+1:le=me}return ie},right:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)>0?le=me:ie=me+1}return ie}}}function n(ne){return function(ae,pe){return t(ne(ae),pe)}}var a=r(t),i=a.right,o=a.left;function s(ne,ae){ae==null&&(ae=l);for(var pe=0,ie=ne.length-1,le=ne[0],me=new Array(ie<0?0:ie);pene?1:ae>=ne?0:NaN}function f(ne){return ne===null?NaN:+ne}function v(ne,ae){var pe=ne.length,ie=0,le=-1,me=0,be,De,Ge=0;if(ae==null)for(;++le1)return Ge/(ie-1)}function g(ne,ae){var pe=v(ne,ae);return pe&&Math.sqrt(pe)}function p(ne,ae){var pe=ne.length,ie=-1,le,me,be;if(ae==null){for(;++ie=le)for(me=be=le;++iele&&(me=le),be=le)for(me=be=le;++iele&&(me=le),be0)return[ne];if((ie=ae0)for(ne=Math.ceil(ne/De),ae=Math.floor(ae/De),be=new Array(me=Math.ceil(ae-ne+1));++le=0?(me>=L?10:me>=w?5:me>=A?2:1)*Math.pow(10,le):-Math.pow(10,-le)/(me>=L?10:me>=w?5:me>=A?2:1)}function F(ne,ae,pe){var ie=Math.abs(ae-ne)/Math.max(0,pe),le=Math.pow(10,Math.floor(Math.log(ie)/Math.LN10)),me=ie/le;return me>=L?le*=10:me>=w?le*=5:me>=A&&(le*=2),aeOe;)ze.pop(),--ct;var et=new Array(ct+1),qe;for(me=0;me<=ct;++me)qe=et[me]=[],qe.x0=me>0?ze[me-1]:it,qe.x1=me=1)return+pe(ne[ie-1],ie-1,ne);var ie,le=(ie-1)*ae,me=Math.floor(le),be=+pe(ne[me],me,ne),De=+pe(ne[me+1],me+1,ne);return be+(De-be)*(le-me)}}function B(ne,ae,pe){return ne=y.call(ne,f).sort(t),Math.ceil((pe-ae)/(2*(R(ne,.75)-R(ne,.25))*Math.pow(ne.length,-1/3)))}function O(ne,ae,pe){return Math.ceil((pe-ae)/(3.5*g(ne)*Math.pow(ne.length,-1/3)))}function V(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++ieme&&(me=le)}else for(;++ie=le)for(me=le;++ieme&&(me=le);return me}function j(ne,ae){var pe=ne.length,ie=pe,le=-1,me,be=0;if(ae==null)for(;++le=0;)for(be=ne[ae],pe=be.length;--pe>=0;)me[--le]=be[pe];return me}function J(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++iele&&(me=le)}else for(;++ie=le)for(me=le;++iele&&(me=le);return me}function ee(ne,ae){for(var pe=ae.length,ie=new Array(pe);pe--;)ie[pe]=ne[ae[pe]];return ie}function ce(ne,ae){if(pe=ne.length){var pe,ie=0,le=0,me,be=ne[le];for(ae==null&&(ae=t);++ie{(function(e,t){typeof zP=="object"&&typeof IIe!="undefined"?t(zP,RIe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(zP,(function(e,t){"use strict";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(Ze){i(a,Ze,this.t),i(this,a.s,this.s),this.s?this.t+=a.t:this.s=a.t},valueOf:function(){return this.s}};var a=new n;function i(Ze,yt,Wt){var zt=Ze.s=yt+Wt,hr=zt-yt,Ur=zt-hr;Ze.t=yt-Ur+(Wt-hr)}var o=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,f=l*2,v=180/l,g=l/180,p=Math.abs,x=Math.atan,_=Math.atan2,y=Math.cos,C=Math.ceil,k=Math.exp,S=Math.log,L=Math.pow,w=Math.sin,A=Math.sign||function(Ze){return Ze>0?1:Ze<0?-1:0},T=Math.sqrt,m=Math.tan;function F(Ze){return Ze>1?0:Ze<-1?l:Math.acos(Ze)}function E(Ze){return Ze>1?u:Ze<-1?-u:Math.asin(Ze)}function I(Ze){return(Ze=w(Ze/2))*Ze}function R(){}function B(Ze,yt){Ze&&V.hasOwnProperty(Ze.type)&&V[Ze.type](Ze,yt)}var O={Feature:function(Ze,yt){B(Ze.geometry,yt)},FeatureCollection:function(Ze,yt){for(var Wt=Ze.features,zt=-1,hr=Wt.length;++zt=0?1:-1,hr=zt*Wt,Ur=y(yt),Qr=w(yt),cn=K*Qr,yn=ue*Ur+cn*y(hr),Fn=cn*zt*w(hr);J.add(_(Fn,yn)),xe=Ze,ue=Ur,K=Qr}function le(Ze){return ee.reset(),U(Ze,_e),ee*2}function me(Ze){return[_(Ze[1],Ze[0]),E(Ze[2])]}function be(Ze){var yt=Ze[0],Wt=Ze[1],zt=y(Wt);return[zt*y(yt),zt*w(yt),w(Wt)]}function De(Ze,yt){return Ze[0]*yt[0]+Ze[1]*yt[1]+Ze[2]*yt[2]}function Ge(Ze,yt){return[Ze[1]*yt[2]-Ze[2]*yt[1],Ze[2]*yt[0]-Ze[0]*yt[2],Ze[0]*yt[1]-Ze[1]*yt[0]]}function ht(Ze,yt){Ze[0]+=yt[0],Ze[1]+=yt[1],Ze[2]+=yt[2]}function it(Ze,yt){return[Ze[0]*yt,Ze[1]*yt,Ze[2]*yt]}function Oe(Ze){var yt=T(Ze[0]*Ze[0]+Ze[1]*Ze[1]+Ze[2]*Ze[2]);Ze[0]/=yt,Ze[1]/=yt,Ze[2]/=yt}var ze,ct,et,qe,we,Le,Ke,Te,Ve=r(),$e,ot,tt={point:nt,lineStart:mt,lineEnd:bt,polygonStart:function(){tt.point=Yt,tt.lineStart=jt,tt.lineEnd=mr,Ve.reset(),_e.polygonStart()},polygonEnd:function(){_e.polygonEnd(),tt.point=nt,tt.lineStart=mt,tt.lineEnd=bt,J<0?(ze=-(et=180),ct=-(qe=90)):Ve>o?qe=90:Ve<-o&&(ct=-90),ot[0]=ze,ot[1]=et},sphere:function(){ze=-(et=180),ct=-(qe=90)}};function nt(Ze,yt){$e.push(ot=[ze=Ze,et=Ze]),ytqe&&(qe=yt)}function We(Ze,yt){var Wt=be([Ze*g,yt*g]);if(Te){var zt=Ge(Te,Wt),hr=[zt[1],-zt[0],0],Ur=Ge(hr,zt);Oe(Ur),Ur=me(Ur);var Qr=Ze-we,cn=Qr>0?1:-1,yn=Ur[0]*v*cn,Fn,en=p(Qr)>180;en^(cn*weqe&&(qe=Fn)):(yn=(yn+360)%360-180,en^(cn*weqe&&(qe=yt))),en?Zeor(ze,et)&&(et=Ze):or(Ze,et)>or(ze,et)&&(ze=Ze):et>=ze?(Zeet&&(et=Ze)):Ze>we?or(ze,Ze)>or(ze,et)&&(et=Ze):or(Ze,et)>or(ze,et)&&(ze=Ze)}else $e.push(ot=[ze=Ze,et=Ze]);ytqe&&(qe=yt),Te=Wt,we=Ze}function mt(){tt.point=We}function bt(){ot[0]=ze,ot[1]=et,tt.point=nt,Te=null}function Yt(Ze,yt){if(Te){var Wt=Ze-we;Ve.add(p(Wt)>180?Wt+(Wt>0?360:-360):Wt)}else Le=Ze,Ke=yt;_e.point(Ze,yt),We(Ze,yt)}function jt(){_e.lineStart()}function mr(){Yt(Le,Ke),_e.lineEnd(),p(Ve)>o&&(ze=-(et=180)),ot[0]=ze,ot[1]=et,Te=null}function or(Ze,yt){return(yt-=Ze)<0?yt+360:yt}function fr(Ze,yt){return Ze[0]-yt[0]}function Ot(Ze,yt){return Ze[0]<=Ze[1]?Ze[0]<=yt&&yt<=Ze[1]:ytor(zt[0],zt[1])&&(zt[1]=hr[1]),or(hr[0],zt[1])>or(zt[0],zt[1])&&(zt[0]=hr[0])):Ur.push(zt=hr);for(Qr=-1/0,Wt=Ur.length-1,yt=0,zt=Ur[Wt];yt<=Wt;zt=hr,++yt)hr=Ur[yt],(cn=or(zt[1],hr[0]))>Qr&&(Qr=cn,ze=hr[0],et=zt[1])}return $e=ot=null,ze===1/0||ct===1/0?[[NaN,NaN],[NaN,NaN]]:[[ze,ct],[et,qe]]}var Ct,wt,Tt,Mt,Lt,ft,kt,rr,pr,Kr,Nr,dn,xr,Fr,Zr,Cn,Dt={sphere:R,point:At,lineStart:Qt,lineEnd:rn,polygonStart:function(){Dt.lineStart=Jr,Dt.lineEnd=qn},polygonEnd:function(){Dt.lineStart=Qt,Dt.lineEnd=rn}};function At(Ze,yt){Ze*=g,yt*=g;var Wt=y(yt);Vt(Wt*y(Ze),Wt*w(Ze),w(yt))}function Vt(Ze,yt,Wt){++Ct,Tt+=(Ze-Tt)/Ct,Mt+=(yt-Mt)/Ct,Lt+=(Wt-Lt)/Ct}function Qt(){Dt.point=Ut}function Ut(Ze,yt){Ze*=g,yt*=g;var Wt=y(yt);Fr=Wt*y(Ze),Zr=Wt*w(Ze),Cn=w(yt),Dt.point=_r,Vt(Fr,Zr,Cn)}function _r(Ze,yt){Ze*=g,yt*=g;var Wt=y(yt),zt=Wt*y(Ze),hr=Wt*w(Ze),Ur=w(yt),Qr=_(T((Qr=Zr*Ur-Cn*hr)*Qr+(Qr=Cn*zt-Fr*Ur)*Qr+(Qr=Fr*hr-Zr*zt)*Qr),Fr*zt+Zr*hr+Cn*Ur);wt+=Qr,ft+=Qr*(Fr+(Fr=zt)),kt+=Qr*(Zr+(Zr=hr)),rr+=Qr*(Cn+(Cn=Ur)),Vt(Fr,Zr,Cn)}function rn(){Dt.point=At}function Jr(){Dt.point=ri}function qn(){Jn(dn,xr),Dt.point=At}function ri(Ze,yt){dn=Ze,xr=yt,Ze*=g,yt*=g,Dt.point=Jn;var Wt=y(yt);Fr=Wt*y(Ze),Zr=Wt*w(Ze),Cn=w(yt),Vt(Fr,Zr,Cn)}function Jn(Ze,yt){Ze*=g,yt*=g;var Wt=y(yt),zt=Wt*y(Ze),hr=Wt*w(Ze),Ur=w(yt),Qr=Zr*Ur-Cn*hr,cn=Cn*zt-Fr*Ur,yn=Fr*hr-Zr*zt,Fn=T(Qr*Qr+cn*cn+yn*yn),en=E(Fn),vn=Fn&&-en/Fn;pr+=vn*Qr,Kr+=vn*cn,Nr+=vn*yn,wt+=en,ft+=en*(Fr+(Fr=zt)),kt+=en*(Zr+(Zr=hr)),rr+=en*(Cn+(Cn=Ur)),Vt(Fr,Zr,Cn)}function Ii(Ze){Ct=wt=Tt=Mt=Lt=ft=kt=rr=pr=Kr=Nr=0,U(Ze,Dt);var yt=pr,Wt=Kr,zt=Nr,hr=yt*yt+Wt*Wt+zt*zt;return hrl?Ze+Math.round(-Ze/f)*f:Ze,yt]}ha.invert=ha;function va(Ze,yt,Wt){return(Ze%=f)?yt||Wt?ra(oa(Ze),Ma(yt,Wt)):oa(Ze):yt||Wt?Ma(yt,Wt):ha}function Xi(Ze){return function(yt,Wt){return yt+=Ze,[yt>l?yt-f:yt<-l?yt+f:yt,Wt]}}function oa(Ze){var yt=Xi(Ze);return yt.invert=Xi(-Ze),yt}function Ma(Ze,yt){var Wt=y(Ze),zt=w(Ze),hr=y(yt),Ur=w(yt);function Qr(cn,yn){var Fn=y(yn),en=y(cn)*Fn,vn=w(cn)*Fn,mn=w(yn),Pn=mn*Wt+en*zt;return[_(vn*hr-Pn*Ur,en*Wt-mn*zt),E(Pn*hr+vn*Ur)]}return Qr.invert=function(cn,yn){var Fn=y(yn),en=y(cn)*Fn,vn=w(cn)*Fn,mn=w(yn),Pn=mn*hr-vn*Ur;return[_(vn*hr+mn*Ur,en*Wt+Pn*zt),E(Pn*Wt-en*zt)]},Qr}function Ga(Ze){Ze=va(Ze[0]*g,Ze[1]*g,Ze.length>2?Ze[2]*g:0);function yt(Wt){return Wt=Ze(Wt[0]*g,Wt[1]*g),Wt[0]*=v,Wt[1]*=v,Wt}return yt.invert=function(Wt){return Wt=Ze.invert(Wt[0]*g,Wt[1]*g),Wt[0]*=v,Wt[1]*=v,Wt},yt}function ss(Ze,yt,Wt,zt,hr,Ur){if(Wt){var Qr=y(yt),cn=w(yt),yn=zt*Wt;hr==null?(hr=yt+zt*f,Ur=yt-yn/2):(hr=mo(Qr,hr),Ur=mo(Qr,Ur),(zt>0?hrUr)&&(hr+=zt*f));for(var Fn,en=hr;zt>0?en>Ur:en1&&Ze.push(Ze.pop().concat(Ze.shift()))},result:function(){var Wt=Ze;return Ze=[],yt=null,Wt}}}function ao(Ze,yt){return p(Ze[0]-yt[0])=0;--cn)hr.point((vn=en[cn])[0],vn[1]);else zt(mn.x,mn.p.x,-1,hr);mn=mn.p}mn=mn.o,en=mn.z,Pn=!Pn}while(!mn.v);hr.lineEnd()}}}function bo(Ze){if(yt=Ze.length){for(var yt,Wt=0,zt=Ze[0],hr;++Wt=0?1:-1,Ya=Qa*Ha,ho=Ya>l,Pa=ki*Zi;if(Zs.add(_(Pa*Qa*w(Ya),Ci*na+Pa*y(Ya))),Qr+=ho?Ha+Qa*f:Ha,ho^Pn>=Wt^Un>=Wt){var Js=Ge(be(mn),be(pi));Oe(Js);var fs=Ge(Ur,Js);Oe(fs);var Io=(ho^Ha>=0?-1:1)*E(fs[2]);(zt>Io||zt===Io&&(Js[0]||Js[1]))&&(cn+=ho^Ha>=0?1:-1)}}return(Qr<-o||Qr0){for(yn||(hr.polygonStart(),yn=!0),hr.lineStart(),na=0;na1&&Gn&2&&Zi.push(Zi.pop().concat(Zi.shift())),en.push(Zi.filter(ut))}}return mn}}function ut(Ze){return Ze.length>1}function Jt(Ze,yt){return((Ze=Ze.x)[0]<0?Ze[1]-u-o:u-Ze[1])-((yt=yt.x)[0]<0?yt[1]-u-o:u-yt[1])}var er=Af(function(){return!0},wr,Dr,[-l,-u]);function wr(Ze){var yt=NaN,Wt=NaN,zt=NaN,hr;return{lineStart:function(){Ze.lineStart(),hr=1},point:function(Ur,Qr){var cn=Ur>0?l:-l,yn=p(Ur-yt);p(yn-l)0?u:-u),Ze.point(zt,Wt),Ze.lineEnd(),Ze.lineStart(),Ze.point(cn,Wt),Ze.point(Ur,Wt),hr=0):zt!==cn&&yn>=l&&(p(yt-zt)o?x((w(yt)*(Ur=y(zt))*w(Wt)-w(zt)*(hr=y(yt))*w(Ze))/(hr*Ur*Qr)):(yt+zt)/2}function Dr(Ze,yt,Wt,zt){var hr;if(Ze==null)hr=Wt*u,zt.point(-l,hr),zt.point(0,hr),zt.point(l,hr),zt.point(l,0),zt.point(l,-hr),zt.point(0,-hr),zt.point(-l,-hr),zt.point(-l,0),zt.point(-l,hr);else if(p(Ze[0]-yt[0])>o){var Ur=Ze[0]0,hr=p(yt)>o;function Ur(en,vn,mn,Pn){ss(Pn,Ze,Wt,mn,en,vn)}function Qr(en,vn){return y(en)*y(vn)>yt}function cn(en){var vn,mn,Pn,On,ki;return{lineStart:function(){On=Pn=!1,ki=1},point:function(Ci,qi){var pi=[Ci,qi],Un,Gn=Qr(Ci,qi),Zi=zt?Gn?0:Fn(Ci,qi):Gn?Fn(Ci+(Ci<0?l:-l),qi):0;if(!vn&&(On=Pn=Gn)&&en.lineStart(),Gn!==Pn&&(Un=yn(vn,pi),(!Un||ao(vn,Un)||ao(pi,Un))&&(pi[2]=1)),Gn!==Pn)ki=0,Gn?(en.lineStart(),Un=yn(pi,vn),en.point(Un[0],Un[1])):(Un=yn(vn,pi),en.point(Un[0],Un[1],2),en.lineEnd()),vn=Un;else if(hr&&vn&&zt^Gn){var na;!(Zi&mn)&&(na=yn(pi,vn,!0))&&(ki=0,zt?(en.lineStart(),en.point(na[0][0],na[0][1]),en.point(na[1][0],na[1][1]),en.lineEnd()):(en.point(na[1][0],na[1][1]),en.lineEnd(),en.lineStart(),en.point(na[0][0],na[0][1],3)))}Gn&&(!vn||!ao(vn,pi))&&en.point(pi[0],pi[1]),vn=pi,Pn=Gn,mn=Zi},lineEnd:function(){Pn&&en.lineEnd(),vn=null},clean:function(){return ki|(On&&Pn)<<1}}}function yn(en,vn,mn){var Pn=be(en),On=be(vn),ki=[1,0,0],Ci=Ge(Pn,On),qi=De(Ci,Ci),pi=Ci[0],Un=qi-pi*pi;if(!Un)return!mn&&en;var Gn=yt*qi/Un,Zi=-yt*pi/Un,na=Ge(ki,Ci),Ha=it(ki,Gn),Qa=it(Ci,Zi);ht(Ha,Qa);var Ya=na,ho=De(Ha,Ya),Pa=De(Ya,Ya),Js=ho*ho-Pa*(De(Ha,Ha)-1);if(!(Js<0)){var fs=T(Js),Io=it(Ya,(-ho-fs)/Pa);if(ht(Io,Ha),Io=me(Io),!mn)return Io;var oi=en[0],ro=vn[0],Go=en[1],Qs=vn[1],zl;ro0^Io[1]<(p(Io[0]-oi)l^(oi<=Io[0]&&Io[0]<=ro)){var Yl=it(Ya,(-ho+fs)/Pa);return ht(Yl,Ha),[Io,me(Yl)]}}}function Fn(en,vn){var mn=zt?Ze:l-Ze,Pn=0;return en<-mn?Pn|=1:en>mn&&(Pn|=2),vn<-mn?Pn|=4:vn>mn&&(Pn|=8),Pn}return Af(Qr,cn,Ur,zt?[0,-Ze]:[-l,Ze-l])}function Yr(Ze,yt,Wt,zt,hr,Ur){var Qr=Ze[0],cn=Ze[1],yn=yt[0],Fn=yt[1],en=0,vn=1,mn=yn-Qr,Pn=Fn-cn,On;if(On=Wt-Qr,!(!mn&&On>0)){if(On/=mn,mn<0){if(On0){if(On>vn)return;On>en&&(en=On)}if(On=hr-Qr,!(!mn&&On<0)){if(On/=mn,mn<0){if(On>vn)return;On>en&&(en=On)}else if(mn>0){if(On0)){if(On/=Pn,Pn<0){if(On0){if(On>vn)return;On>en&&(en=On)}if(On=Ur-cn,!(!Pn&&On<0)){if(On/=Pn,Pn<0){if(On>vn)return;On>en&&(en=On)}else if(Pn>0){if(On0&&(Ze[0]=Qr+en*mn,Ze[1]=cn+en*Pn),vn<1&&(yt[0]=Qr+vn*mn,yt[1]=cn+vn*Pn),!0}}}}}var Tn=1e9,Kn=-Tn;function Qn(Ze,yt,Wt,zt){function hr(Fn,en){return Ze<=Fn&&Fn<=Wt&&yt<=en&&en<=zt}function Ur(Fn,en,vn,mn){var Pn=0,On=0;if(Fn==null||(Pn=Qr(Fn,vn))!==(On=Qr(en,vn))||yn(Fn,en)<0^vn>0)do mn.point(Pn===0||Pn===3?Ze:Wt,Pn>1?zt:yt);while((Pn=(Pn+vn+4)%4)!==On);else mn.point(en[0],en[1])}function Qr(Fn,en){return p(Fn[0]-Ze)0?0:3:p(Fn[0]-Wt)0?2:1:p(Fn[1]-yt)0?1:0:en>0?3:2}function cn(Fn,en){return yn(Fn.x,en.x)}function yn(Fn,en){var vn=Qr(Fn,1),mn=Qr(en,1);return vn!==mn?vn-mn:vn===0?en[1]-Fn[1]:vn===1?Fn[0]-en[0]:vn===2?Fn[1]-en[1]:en[0]-Fn[0]}return function(Fn){var en=Fn,vn=Eo(),mn,Pn,On,ki,Ci,qi,pi,Un,Gn,Zi,na,Ha={point:Qa,lineStart:Js,lineEnd:fs,polygonStart:ho,polygonEnd:Pa};function Qa(oi,ro){hr(oi,ro)&&en.point(oi,ro)}function Ya(){for(var oi=0,ro=0,Go=Pn.length;rozt&&(lf-mc)*(zt-Yl)>($u-Yl)*(Ze-mc)&&++oi:$u<=zt&&(lf-mc)*(zt-Yl)<($u-Yl)*(Ze-mc)&&--oi;return oi}function ho(){en=vn,mn=[],Pn=[],na=!0}function Pa(){var oi=Ya(),ro=na&&oi,Go=(mn=t.merge(mn)).length;(ro||Go)&&(Fn.polygonStart(),ro&&(Fn.lineStart(),Ur(null,null,1,Fn),Fn.lineEnd()),Go&&bl(mn,cn,oi,Ur,Fn),Fn.polygonEnd()),en=Fn,mn=Pn=On=null}function Js(){Ha.point=Io,Pn&&Pn.push(On=[]),Zi=!0,Gn=!1,pi=Un=NaN}function fs(){mn&&(Io(ki,Ci),qi&&Gn&&vn.rejoin(),mn.push(vn.result())),Ha.point=Qa,Gn&&en.lineEnd()}function Io(oi,ro){var Go=hr(oi,ro);if(Pn&&On.push([oi,ro]),Zi)ki=oi,Ci=ro,qi=Go,Zi=!1,Go&&(en.lineStart(),en.point(oi,ro));else if(Go&&Gn)en.point(oi,ro);else{var Qs=[pi=Math.max(Kn,Math.min(Tn,pi)),Un=Math.max(Kn,Math.min(Tn,Un))],zl=[oi=Math.max(Kn,Math.min(Tn,oi)),ro=Math.max(Kn,Math.min(Tn,ro))];Yr(Qs,zl,Ze,yt,Wt,zt)?(Gn||(en.lineStart(),en.point(Qs[0],Qs[1])),en.point(zl[0],zl[1]),Go||en.lineEnd(),na=!1):Go&&(en.lineStart(),en.point(oi,ro),na=!1)}pi=oi,Un=ro,Gn=Go}return Ha}}function Ai(){var Ze=0,yt=0,Wt=960,zt=500,hr,Ur,Qr;return Qr={stream:function(cn){return hr&&Ur===cn?hr:hr=Qn(Ze,yt,Wt,zt)(Ur=cn)},extent:function(cn){return arguments.length?(Ze=+cn[0][0],yt=+cn[0][1],Wt=+cn[1][0],zt=+cn[1][1],hr=Ur=null,Qr):[[Ze,yt],[Wt,zt]]}}}var Ji=r(),Ra,ii,Za,ja={sphere:R,point:R,lineStart:qo,lineEnd:R,polygonStart:R,polygonEnd:R};function qo(){ja.point=Ka,ja.lineEnd=$a}function $a(){ja.point=ja.lineEnd=R}function Ka(Ze,yt){Ze*=g,yt*=g,Ra=Ze,ii=w(yt),Za=y(yt),ja.point=Oa}function Oa(Ze,yt){Ze*=g,yt*=g;var Wt=w(yt),zt=y(yt),hr=p(Ze-Ra),Ur=y(hr),Qr=w(hr),cn=zt*Qr,yn=Za*Wt-ii*zt*Ur,Fn=ii*Wt+Za*zt*Ur;Ji.add(_(T(cn*cn+yn*yn),Fn)),Ra=Ze,ii=Wt,Za=zt}function Ni(Ze){return Ji.reset(),U(Ze,ja),+Ji}var ka=[null,null],vs={type:"LineString",coordinates:ka};function yo(Ze,yt){return ka[0]=Ze,ka[1]=yt,Ni(vs)}var so={Feature:function(Ze,yt){return ko(Ze.geometry,yt)},FeatureCollection:function(Ze,yt){for(var Wt=Ze.features,zt=-1,hr=Wt.length;++zt0&&(hr=yo(Ze[Ur],Ze[Ur-1]),hr>0&&Wt<=hr&&zt<=hr&&(Wt+zt-hr)*(1-Math.pow((Wt-zt)/hr,2))o}).map(mn)).concat(t.range(C(Ur/Fn)*Fn,hr,Fn).filter(function(Un){return p(Un%vn)>o}).map(Pn))}return qi.lines=function(){return pi().map(function(Un){return{type:"LineString",coordinates:Un}})},qi.outline=function(){return{type:"Polygon",coordinates:[On(zt).concat(ki(Qr).slice(1),On(Wt).reverse().slice(1),ki(cn).reverse().slice(1))]}},qi.extent=function(Un){return arguments.length?qi.extentMajor(Un).extentMinor(Un):qi.extentMinor()},qi.extentMajor=function(Un){return arguments.length?(zt=+Un[0][0],Wt=+Un[1][0],cn=+Un[0][1],Qr=+Un[1][1],zt>Wt&&(Un=zt,zt=Wt,Wt=Un),cn>Qr&&(Un=cn,cn=Qr,Qr=Un),qi.precision(Ci)):[[zt,cn],[Wt,Qr]]},qi.extentMinor=function(Un){return arguments.length?(yt=+Un[0][0],Ze=+Un[1][0],Ur=+Un[0][1],hr=+Un[1][1],yt>Ze&&(Un=yt,yt=Ze,Ze=Un),Ur>hr&&(Un=Ur,Ur=hr,hr=Un),qi.precision(Ci)):[[yt,Ur],[Ze,hr]]},qi.step=function(Un){return arguments.length?qi.stepMajor(Un).stepMinor(Un):qi.stepMinor()},qi.stepMajor=function(Un){return arguments.length?(en=+Un[0],vn=+Un[1],qi):[en,vn]},qi.stepMinor=function(Un){return arguments.length?(yn=+Un[0],Fn=+Un[1],qi):[yn,Fn]},qi.precision=function(Un){return arguments.length?(Ci=+Un,mn=Ls(Ur,hr,90),Pn=$s(yt,Ze,Ci),On=Ls(cn,Qr,90),ki=$s(zt,Wt,Ci),qi):Ci},qi.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function _u(){return Kc()()}function Gu(Ze,yt){var Wt=Ze[0]*g,zt=Ze[1]*g,hr=yt[0]*g,Ur=yt[1]*g,Qr=y(zt),cn=w(zt),yn=y(Ur),Fn=w(Ur),en=Qr*y(Wt),vn=Qr*w(Wt),mn=yn*y(hr),Pn=yn*w(hr),On=2*E(T(I(Ur-zt)+Qr*yn*I(hr-Wt))),ki=w(On),Ci=On?function(qi){var pi=w(qi*=On)/ki,Un=w(On-qi)/ki,Gn=Un*en+pi*mn,Zi=Un*vn+pi*Pn,na=Un*cn+pi*Fn;return[_(Zi,Gn)*v,_(na,T(Gn*Gn+Zi*Zi))*v]}:function(){return[Wt*v,zt*v]};return Ci.distance=On,Ci}function Ja(Ze){return Ze}var ps=r(),Sa=r(),ma,Ps,Ca,Pl,ll={point:R,lineStart:R,lineEnd:R,polygonStart:function(){ll.lineStart=Jc,ll.lineEnd=Bd},polygonEnd:function(){ll.lineStart=ll.lineEnd=ll.point=R,ps.add(p(Sa)),Sa.reset()},result:function(){var Ze=ps/2;return ps.reset(),Ze}};function Jc(){ll.point=lu}function lu(Ze,yt){ll.point=Mf,ma=Ca=Ze,Ps=Pl=yt}function Mf(Ze,yt){Sa.add(Pl*Ze-Ca*yt),Ca=Ze,Pl=yt}function Bd(){Mf(ma,Ps)}var Hu=1/0,Sf=Hu,kc=-Hu,Uo=kc,ns={point:Ks,lineStart:R,lineEnd:R,polygonStart:R,polygonEnd:R,result:function(){var Ze=[[Hu,Sf],[kc,Uo]];return kc=Uo=-(Sf=Hu=1/0),Ze}};function Ks(Ze,yt){Zekc&&(kc=Ze),ytUo&&(Uo=yt)}var Ef=0,ju=0,gs=0,bu=0,kf=0,ah=0,Od=0,Qc=0,uu=0,oh,hc,Fl,Yo,Ro={point:is,lineStart:Dl,lineEnd:Cc,polygonStart:function(){Ro.lineStart=sh,Ro.lineEnd=Y0},polygonEnd:function(){Ro.point=is,Ro.lineStart=Dl,Ro.lineEnd=Cc},result:function(){var Ze=uu?[Od/uu,Qc/uu]:ah?[bu/ah,kf/ah]:gs?[Ef/gs,ju/gs]:[NaN,NaN];return Ef=ju=gs=bu=kf=ah=Od=Qc=uu=0,Ze}};function is(Ze,yt){Ef+=Ze,ju+=yt,++gs}function Dl(){Ro.point=dc}function dc(Ze,yt){Ro.point=ef,is(Fl=Ze,Yo=yt)}function ef(Ze,yt){var Wt=Ze-Fl,zt=yt-Yo,hr=T(Wt*Wt+zt*zt);bu+=hr*(Fl+Ze)/2,kf+=hr*(Yo+yt)/2,ah+=hr,is(Fl=Ze,Yo=yt)}function Cc(){Ro.point=is}function sh(){Ro.point=Nd}function Y0(){Cf(oh,hc)}function Nd(Ze,yt){Ro.point=Cf,is(oh=Fl=Ze,hc=Yo=yt)}function Cf(Ze,yt){var Wt=Ze-Fl,zt=yt-Yo,hr=T(Wt*Wt+zt*zt);bu+=hr*(Fl+Ze)/2,kf+=hr*(Yo+yt)/2,ah+=hr,hr=Yo*Ze-Fl*yt,Od+=hr*(Fl+Ze),Qc+=hr*(Yo+yt),uu+=hr*3,is(Fl=Ze,Yo=yt)}function Vo(Ze){this._context=Ze}Vo.prototype={_radius:4.5,pointRadius:function(Ze){return this._radius=Ze,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(Ze,yt){switch(this._point){case 0:{this._context.moveTo(Ze,yt),this._point=1;break}case 1:{this._context.lineTo(Ze,yt);break}default:{this._context.moveTo(Ze+this._radius,yt),this._context.arc(Ze,yt,this._radius,0,f);break}}},result:R};var Ud=r(),zh,tf,Vd,rf,qh,vc={point:R,lineStart:function(){vc.point=dd},lineEnd:function(){zh&&Bh(tf,Vd),vc.point=R},polygonStart:function(){zh=!0},polygonEnd:function(){zh=null},result:function(){var Ze=+Ud;return Ud.reset(),Ze}};function dd(Ze,yt){vc.point=Bh,tf=rf=Ze,Vd=qh=yt}function Bh(Ze,yt){rf-=Ze,qh-=yt,Ud.add(T(rf*rf+qh*qh)),rf=Ze,qh=yt}function Wu(){this._string=[]}Wu.prototype={_radius:4.5,_circle:vd(4.5),pointRadius:function(Ze){return(Ze=+Ze)!==this._radius&&(this._radius=Ze,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(Ze,yt){switch(this._point){case 0:{this._string.push("M",Ze,",",yt),this._point=1;break}case 1:{this._string.push("L",Ze,",",yt);break}default:{this._circle==null&&(this._circle=vd(this._radius)),this._string.push("M",Ze,",",yt,this._circle);break}}},result:function(){if(this._string.length){var Ze=this._string.join("");return this._string=[],Ze}else return null}};function vd(Ze){return"m0,"+Ze+"a"+Ze+","+Ze+" 0 1,1 0,"+-2*Ze+"a"+Ze+","+Ze+" 0 1,1 0,"+2*Ze+"z"}function pd(Ze,yt){var Wt=4.5,zt,hr;function Ur(Qr){return Qr&&(typeof Wt=="function"&&hr.pointRadius(+Wt.apply(this,arguments)),U(Qr,zt(hr))),hr.result()}return Ur.area=function(Qr){return U(Qr,zt(ll)),ll.result()},Ur.measure=function(Qr){return U(Qr,zt(vc)),vc.result()},Ur.bounds=function(Qr){return U(Qr,zt(ns)),ns.result()},Ur.centroid=function(Qr){return U(Qr,zt(Ro)),Ro.result()},Ur.projection=function(Qr){return arguments.length?(zt=Qr==null?(Ze=null,Ja):(Ze=Qr).stream,Ur):Ze},Ur.context=function(Qr){return arguments.length?(hr=Qr==null?(yt=null,new Wu):new Vo(yt=Qr),typeof Wt!="function"&&hr.pointRadius(Wt),Ur):yt},Ur.pointRadius=function(Qr){return arguments.length?(Wt=typeof Qr=="function"?Qr:(hr.pointRadius(+Qr),+Qr),Ur):Wt},Ur.projection(Ze).context(yt)}function lh(Ze){return{stream:nf(Ze)}}function nf(Ze){return function(yt){var Wt=new uh;for(var zt in Ze)Wt[zt]=Ze[zt];return Wt.stream=yt,Wt}}function uh(){}uh.prototype={constructor:uh,point:function(Ze,yt){this.stream.point(Ze,yt)},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 af(Ze,yt,Wt){var zt=Ze.clipExtent&&Ze.clipExtent();return Ze.scale(150).translate([0,0]),zt!=null&&Ze.clipExtent(null),U(Wt,Ze.stream(ns)),yt(ns.result()),zt!=null&&Ze.clipExtent(zt),Ze}function gd(Ze,yt,Wt){return af(Ze,function(zt){var hr=yt[1][0]-yt[0][0],Ur=yt[1][1]-yt[0][1],Qr=Math.min(hr/(zt[1][0]-zt[0][0]),Ur/(zt[1][1]-zt[0][1])),cn=+yt[0][0]+(hr-Qr*(zt[1][0]+zt[0][0]))/2,yn=+yt[0][1]+(Ur-Qr*(zt[1][1]+zt[0][1]))/2;Ze.scale(150*Qr).translate([cn,yn])},Wt)}function Rl(Ze,yt,Wt){return gd(Ze,[[0,0],yt],Wt)}function ch(Ze,yt,Wt){return af(Ze,function(zt){var hr=+yt,Ur=hr/(zt[1][0]-zt[0][0]),Qr=(hr-Ur*(zt[1][0]+zt[0][0]))/2,cn=-Ur*zt[0][1];Ze.scale(150*Ur).translate([Qr,cn])},Wt)}function Lc(Ze,yt,Wt){return af(Ze,function(zt){var hr=+yt,Ur=hr/(zt[1][1]-zt[0][1]),Qr=-Ur*zt[0][0],cn=(hr-Ur*(zt[1][1]+zt[0][1]))/2;Ze.scale(150*Ur).translate([Qr,cn])},Wt)}var md=16,yd=y(30*g);function Lf(Ze,yt){return+yt?fh(Ze,yt):wu(Ze)}function wu(Ze){return nf({point:function(yt,Wt){yt=Ze(yt,Wt),this.stream.point(yt[0],yt[1])}})}function fh(Ze,yt){function Wt(zt,hr,Ur,Qr,cn,yn,Fn,en,vn,mn,Pn,On,ki,Ci){var qi=Fn-zt,pi=en-hr,Un=qi*qi+pi*pi;if(Un>4*yt&&ki--){var Gn=Qr+mn,Zi=cn+Pn,na=yn+On,Ha=T(Gn*Gn+Zi*Zi+na*na),Qa=E(na/=Ha),Ya=p(p(na)-1)yt||p((qi*fs+pi*Io)/Un-.5)>.3||Qr*mn+cn*Pn+yn*On2?oi[2]%360*g:0,fs()):[cn*v,yn*v,Fn*v]},Pa.angle=function(oi){return arguments.length?(vn=oi%360*g,fs()):vn*v},Pa.reflectX=function(oi){return arguments.length?(mn=oi?-1:1,fs()):mn<0},Pa.reflectY=function(oi){return arguments.length?(Pn=oi?-1:1,fs()):Pn<0},Pa.precision=function(oi){return arguments.length?(na=Lf(Ha,Zi=oi*oi),Io()):T(Zi)},Pa.fitExtent=function(oi,ro){return gd(Pa,oi,ro)},Pa.fitSize=function(oi,ro){return Rl(Pa,oi,ro)},Pa.fitWidth=function(oi,ro){return ch(Pa,oi,ro)},Pa.fitHeight=function(oi,ro){return Lc(Pa,oi,ro)};function fs(){var oi=Gl(Wt,0,0,mn,Pn,vn).apply(null,yt(Ur,Qr)),ro=(vn?Gl:Gd)(Wt,zt-oi[0],hr-oi[1],mn,Pn,vn);return en=va(cn,yn,Fn),Ha=ra(yt,ro),Qa=ra(en,Ha),na=Lf(Ha,Zi),Io()}function Io(){return Ya=ho=null,Pa}return function(){return yt=Ze.apply(this,arguments),Pa.invert=yt.invert&&Js,fs()}}function Hl(Ze){var yt=0,Wt=l/3,zt=xd(Ze),hr=zt(yt,Wt);return hr.parallels=function(Ur){return arguments.length?zt(yt=Ur[0]*g,Wt=Ur[1]*g):[yt*v,Wt*v]},hr}function _d(Ze){var yt=y(Ze);function Wt(zt,hr){return[zt*yt,w(hr)/yt]}return Wt.invert=function(zt,hr){return[zt/yt,E(hr*yt)]},Wt}function dh(Ze,yt){var Wt=w(Ze),zt=(Wt+w(yt))/2;if(p(zt)=.12&&Ci<.234&&ki>=-.425&&ki<-.214?hr:Ci>=.166&&Ci<.234&&ki>=-.214&&ki<-.115?Qr:Wt).invert(mn)},en.stream=function(mn){return Ze&&yt===mn?Ze:Ze=xo([Wt.stream(yt=mn),hr.stream(mn),Qr.stream(mn)])},en.precision=function(mn){return arguments.length?(Wt.precision(mn),hr.precision(mn),Qr.precision(mn),vn()):Wt.precision()},en.scale=function(mn){return arguments.length?(Wt.scale(mn),hr.scale(mn*.35),Qr.scale(mn),en.translate(Wt.translate())):Wt.scale()},en.translate=function(mn){if(!arguments.length)return Wt.translate();var Pn=Wt.scale(),On=+mn[0],ki=+mn[1];return zt=Wt.translate(mn).clipExtent([[On-.455*Pn,ki-.238*Pn],[On+.455*Pn,ki+.238*Pn]]).stream(Fn),Ur=hr.translate([On-.307*Pn,ki+.201*Pn]).clipExtent([[On-.425*Pn+o,ki+.12*Pn+o],[On-.214*Pn-o,ki+.234*Pn-o]]).stream(Fn),cn=Qr.translate([On-.205*Pn,ki+.212*Pn]).clipExtent([[On-.214*Pn+o,ki+.166*Pn+o],[On-.115*Pn-o,ki+.234*Pn-o]]).stream(Fn),vn()},en.fitExtent=function(mn,Pn){return gd(en,mn,Pn)},en.fitSize=function(mn,Pn){return Rl(en,mn,Pn)},en.fitWidth=function(mn,Pn){return ch(en,mn,Pn)},en.fitHeight=function(mn,Pn){return Lc(en,mn,Pn)};function vn(){return Ze=yt=null,en}return en.scale(1070)}function Tu(Ze){return function(yt,Wt){var zt=y(yt),hr=y(Wt),Ur=Ze(zt*hr);return[Ur*hr*w(yt),Ur*w(Wt)]}}function Au(Ze){return function(yt,Wt){var zt=T(yt*yt+Wt*Wt),hr=Ze(zt),Ur=w(hr),Qr=y(hr);return[_(yt*Ur,zt*Qr),E(zt&&Wt*Ur/zt)]}}var Il=Tu(function(Ze){return T(2/(1+Ze))});Il.invert=Au(function(Ze){return 2*E(Ze/2)});function g0(){return wl(Il).scale(124.75).clipAngle(180-.001)}var Yu=Tu(function(Ze){return(Ze=F(Ze))&&Ze/w(Ze)});Yu.invert=Au(function(Ze){return Ze});function Nh(){return wl(Yu).scale(79.4188).clipAngle(180-.001)}function Tl(Ze,yt){return[Ze,S(m((u+yt)/2))]}Tl.invert=function(Ze,yt){return[Ze,2*x(k(yt))-u]};function jl(){return Uh(Tl).scale(961/f)}function Uh(Ze){var yt=wl(Ze),Wt=yt.center,zt=yt.scale,hr=yt.translate,Ur=yt.clipExtent,Qr=null,cn,yn,Fn;yt.scale=function(vn){return arguments.length?(zt(vn),en()):zt()},yt.translate=function(vn){return arguments.length?(hr(vn),en()):hr()},yt.center=function(vn){return arguments.length?(Wt(vn),en()):Wt()},yt.clipExtent=function(vn){return arguments.length?(vn==null?Qr=cn=yn=Fn=null:(Qr=+vn[0][0],cn=+vn[0][1],yn=+vn[1][0],Fn=+vn[1][1]),en()):Qr==null?null:[[Qr,cn],[yn,Fn]]};function en(){var vn=l*zt(),mn=yt(Ga(yt.rotate()).invert([0,0]));return Ur(Qr==null?[[mn[0]-vn,mn[1]-vn],[mn[0]+vn,mn[1]+vn]]:Ze===Tl?[[Math.max(mn[0]-vn,Qr),cn],[Math.min(mn[0]+vn,yn),Fn]]:[[Qr,Math.max(mn[1]-vn,cn)],[yn,Math.min(mn[1]+vn,Fn)]])}return en()}function Vh(Ze){return m((u+Ze)/2)}function jd(Ze,yt){var Wt=y(Ze),zt=Ze===yt?w(Ze):S(Wt/y(yt))/S(Vh(yt)/Vh(Ze)),hr=Wt*L(Vh(Ze),zt)/zt;if(!zt)return Tl;function Ur(Qr,cn){hr>0?cn<-u+o&&(cn=-u+o):cn>u-o&&(cn=u-o);var yn=hr/L(Vh(cn),zt);return[yn*w(zt*Qr),hr-yn*y(zt*Qr)]}return Ur.invert=function(Qr,cn){var yn=hr-cn,Fn=A(zt)*T(Qr*Qr+yn*yn),en=_(Qr,p(yn))*A(yn);return yn*zt<0&&(en-=l*A(Qr)*A(yn)),[en/zt,2*x(L(hr/Fn,1/zt))-u]},Ur}function pc(){return Hl(jd).scale(109.5).parallels([30,30])}function gc(Ze,yt){return[Ze,yt]}gc.invert=gc;function of(){return wl(gc).scale(152.63)}function sf(Ze,yt){var Wt=y(Ze),zt=Ze===yt?w(Ze):(Wt-y(yt))/(yt-Ze),hr=Wt/zt+Ze;if(p(zt)o&&--zt>0);return[Ze/(.8707+(Ur=Wt*Wt)*(-.131979+Ur*(-.013791+Ur*Ur*Ur*(.003971-.001529*Ur)))),Wt]};function Td(){return wl(y0).scale(175.295)}function ul(Ze,yt){return[y(yt)*w(Ze),w(yt)]}ul.invert=Au(E);function Wl(){return wl(ul).scale(249.5).clipAngle(90+o)}function If(Ze,yt){var Wt=y(yt),zt=1+y(Ze)*Wt;return[Wt*w(Ze)/zt,w(yt)/zt]}If.invert=Au(function(Ze){return 2*x(Ze)});function vh(){return wl(If).scale(250).clipAngle(142)}function zf(Ze,yt){return[S(m((u+yt)/2)),-Ze]}zf.invert=function(Ze,yt){return[-yt,2*x(k(Ze))-u]};function qf(){var Ze=Uh(zf),yt=Ze.center,Wt=Ze.rotate;return Ze.center=function(zt){return arguments.length?yt([-zt[1],zt[0]]):(zt=yt(),[zt[1],-zt[0]])},Ze.rotate=function(zt){return arguments.length?Wt([zt[0],zt[1],zt.length>2?zt[2]+90:90]):(zt=Wt(),[zt[0],zt[1],zt[2]-90])},Wt([0,0,90]).scale(159.155)}e.geoAlbers=Hd,e.geoAlbersUsa=p0,e.geoArea=le,e.geoAzimuthalEqualArea=g0,e.geoAzimuthalEqualAreaRaw=Il,e.geoAzimuthalEquidistant=Nh,e.geoAzimuthalEquidistantRaw=Yu,e.geoBounds=cr,e.geoCentroid=Ii,e.geoCircle=sl,e.geoClipAntimeridian=er,e.geoClipCircle=bn,e.geoClipExtent=Ai,e.geoClipRectangle=Qn,e.geoConicConformal=pc,e.geoConicConformalRaw=jd,e.geoConicEqualArea=Pf,e.geoConicEqualAreaRaw=dh,e.geoConicEquidistant=bd,e.geoConicEquidistantRaw=sf,e.geoContains=rs,e.geoDistance=yo,e.geoEqualEarth=m0,e.geoEqualEarthRaw=Rf,e.geoEquirectangular=of,e.geoEquirectangularRaw=gc,e.geoGnomonic=Hh,e.geoGnomonicRaw=wd,e.geoGraticule=Kc,e.geoGraticule10=_u,e.geoIdentity=X0,e.geoInterpolate=Gu,e.geoLength=Ni,e.geoMercator=jl,e.geoMercatorRaw=Tl,e.geoNaturalEarth1=Td,e.geoNaturalEarth1Raw=y0,e.geoOrthographic=Wl,e.geoOrthographicRaw=ul,e.geoPath=pd,e.geoProjection=wl,e.geoProjectionMutator=xd,e.geoRotation=Ga,e.geoStereographic=vh,e.geoStereographicRaw=If,e.geoStream=U,e.geoTransform=lh,e.geoTransverseMercator=qf,e.geoTransverseMercatorRaw=zf,Object.defineProperty(e,"__esModule",{value:!0})}))});var BIe=fe((t5r,qIe)=>{"use strict";var zIe={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"},OGt=new Set(Object.values(zIe));qIe.exports={usaLocationAbbreviations:OGt,usaLocationList:zIe}});var OIe={};zp(OIe,{COUNTRIES_X:()=>NGt});var NGt,NIe=Co(()=>{"use strict";NGt=[{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:[]}]});var Cg=fe((r5r,GIe)=>{"use strict";var UGt=xi(),{COUNTRIES:VGt,createLookup:GGt}=gIe(),{area:HGt}=LIe(),{centroid:jGt}=FIe(),{coordAll:WGt}=FP(),{geoBounds:YGt}=qP(),XGt=J4(),_y=W1(),ZGt=em(),$Gt=M4(),BP=NT(),{usaLocationAbbreviations:KGt,usaLocationList:JGt}=BIe(),{COUNTRIES_X:QGt}=(NIe(),Gs(OIe)),{lookupAlpha3:eHt}=GGt([...VGt,...QGt]),tHt={"ISO-3":XGt,"USA-states":nHt,"country names":rHt};function rHt(e){let t=eHt(e);return t||(_y.log("Unrecognized country name: "+e+"."),!1)}function nHt(e){e=e.trim();let t=KGt.has(e.toUpperCase())?e.toUpperCase():JGt[e.toLowerCase()];return t||(_y.log("Unrecognized US location: "+e+"."),!1)}function iHt(e,t,r){var a;if(!t||typeof t!="string")return!1;let n=tHt[e](t);if(n){let i;if(e==="USA-states"){i=[];for(let o of r)((a=o==null?void 0:o.properties)==null?void 0:a.gu)==="USA"&&i.push(o)}else i=r;for(let o of i)if(o.id===n)return o;_y.log(`Location with id ${n} does not have a matching topojson feature at this resolution.`)}return!1}var OP=360;function LX(e){for(let t=0;t0&&e[t+1][0]<0)return t;return null}function aHt(e){var t=e.geometry,r=t.coordinates,n=e.id,a=[],i,o,s,l;switch(n==="RUS"||n==="FJI"?i=function(u){var c;if(LX(u)===null)c=u;else for(c=new Array(u.length),l=0;lc?f[v++]=[u[l][0]+OP,u[l][1]]:l===c?(f[v++]=u[l],f[v++]=[u[l][0],-90]):f[v++]=u[l];var g=BP.tester(f);g.pts.pop(),a.push(g)}:i=function(u){a.push(BP.tester(u))},t.type){case"MultiPolygon":for(o=0;oa&&(a=s,r=o)}else r=t;return!r||!r.coordinates.some(l=>l.length>0)?[NaN,NaN]:jGt(r).geometry.coordinates}function lHt(e){var t=window.PlotlyGeoAssets||{},r=[];function n(l){return new Promise(function(u,c){UGt.json(l,function(f,v){if(f){delete t[l];var g=f.status===404?'GeoJSON at URL "'+l+'" does not exist.':"Unexpected error while fetching from "+l;return c(new Error(g))}return t[l]=v,u(v)})})}function a(l){return new Promise(function(u,c){var f=0,v=setInterval(function(){if(t[l]&&t[l]!=="pending")return clearInterval(v),u(t[l]);if(f>100)return clearInterval(v),c("Unexpected error while fetching from "+l);f++},50)})}for(var i=0;iDX(FX(e));function FX(e){try{return WGt(e)}catch(t){return[]}}function DX(e){if(e.length===0)return null;if(e.length===1){let[i,o]=e[0];return[i,o,i,o]}let[[t,r],[n,a]]=YGt({type:"MultiPoint",coordinates:e});return[t,r,VIe([t,n])[1],a]}var cHt=(e,t)=>t.fitbounds==="geojson"&&e.locationmode==="geojson-id",UIe=(e,t)=>cHt(e,t)?FX(PX(e)):[],fHt=(e,t)=>DX(UIe(e,t));function VIe([e,t]){return[e,e>t?t+OP:t]}GIe.exports={locationToFeature:iHt,feature2polygons:aHt,getTraceGeojson:PX,extractTraceFeature:oHt,fetchTraceGeoData:lHt,boundsOfCoords:DX,computeBbox:uHt,coordsOf:FX,doesCrossAntiMeridian:LX,fitGeojsonBbox:fHt,fitGeojsonCoords:UIe,unwrapLonRange:VIe,ANTIMERIDIAN_LON_SHIFT:OP}});var RX=fe((n5r,WIe)=>{"use strict";var hHt=xi(),dHt=ea(),HIe=ni(),jIe=Ld(),vHt=jIe.stylePoints,pHt=jIe.styleText;WIe.exports=function(t,r){r&&gHt(t,r)};function gHt(e,t){var r=t[0].trace,n=t[0].node3;n.style("opacity",t[0].trace.opacity),vHt(n,r,e),pHt(n,r,e),n.selectAll("path.js-line").style("fill","none").each(function(a){var i=hHt.select(this),o=a.trace,s=o.line||{};i.call(HIe.stroke,s.color).call(dHt.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&i.call(HIe.fill,o.fillcolor)})}});var VP=fe((i5r,ZIe)=>{"use strict";var YIe=xi(),NP=Xt(),mHt=EP().getTopojsonFeatures,IX=cM(),UP=Cg(),XIe=rp().findExtremes,qX=Wa().BADNUM,yHt=gv().calcMarkerSize,zX=Is(),xHt=RX();function _Ht(e,t,r){var n=t.layers.frontplot.select(".scatterlayer"),a=NP.makeTraceGroups(n,r,"trace scattergeo");function i(o,s){o.lonlat[0]===qX&&YIe.select(s).remove()}a.selectAll("*").remove(),a.each(function(o){var s=YIe.select(this),l=o[0].trace;if(zX.hasLines(l)||l.fill!=="none"){var u=IX.calcTraceToLineCoords(o),c=l.fill!=="none"?IX.makePolygon(u):IX.makeLine(u);s.selectAll("path.js-line").data([{geojson:c,trace:l}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}zX.hasMarkers(l)&&s.selectAll("path.point").data(NP.identity).enter().append("path").classed("point",!0).each(function(f){i(f,this)}),zX.hasText(l)&&s.selectAll("g").data(NP.identity).enter().append("g").append("text").each(function(f){i(f,this)}),xHt(e,o)})}function bHt(e,t){var r=e[0].trace,n=t[r.geo],a=n._subplot,i=r._length,o,s;if(NP.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l==="geojson-id"?UP.extractTraceFeature(e):mHt(r,a.topojson);for(o=0;o{"use strict";var THt=kl(),AHt=Wa().BADNUM,MHt=_3(),SHt=Xt().fillText,EHt=a5();$Ie.exports=function(t,r,n){var a=t.cd,i=a[0].trace,o=t.xa,s=t.ya,l=t.subplot,u=l.projection.isLonLatOverEdges,c=l.project;function f(C){var k=C.lonlat;if(k[0]===AHt||u(k))return 1/0;var S=c(k),L=c([r,n]),w=Math.abs(S[0]-L[0]),A=Math.abs(S[1]-L[1]),T=Math.max(3,C.mrc||0);return Math.max(Math.sqrt(w*w+A*A)-T,1-3/T)}if(THt.getClosest(a,f,t),t.index!==!1){var v=a[t.index],g=v.lonlat,p=[o.c2p(g),s.c2p(g)],x=v.mrc||1;t.x0=p[0]-x,t.x1=p[0]+x,t.y0=p[1]-x,t.y1=p[1]+x,t.loc=v.loc,t.lon=g[0],t.lat=g[1];var _={};_[i.geo]={_subplot:l};var y=i._module.formatLabels(v,i,_);return t.lonLabel=y.lonLabel,t.latLabel=y.latLabel,t.color=MHt(i,v),t.extraText=kHt(i,v,t,a[0].t.labels),t.hovertemplate=i.hovertemplate,[t]}};function kHt(e,t,r,n){if(e.hovertemplate)return;var a=t.hi||e.hoverinfo,i=a==="all"?EHt.hoverinfo.flags:a.split("+"),o=i.indexOf("location")!==-1&&Array.isArray(e.locations),s=i.indexOf("lon")!==-1,l=i.indexOf("lat")!==-1,u=i.indexOf("text")!==-1,c=[];function f(v){return v+"\xB0"}return o?c.push(t.loc):s&&l?c.push("("+f(r.latLabel)+", "+f(r.lonLabel)+")"):s?c.push(n.lon+f(r.lonLabel)):l&&c.push(n.lat+f(r.latLabel)),u&&SHt(t,e,c),c.join("
")}});var QIe=fe((o5r,JIe)=>{"use strict";JIe.exports=function(t,r,n,a,i){t.lon=r.lon,t.lat=r.lat,t.location=r.loc?r.loc:null;var o=a[i];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t}});var rze=fe((s5r,tze)=>{"use strict";var eze=Is(),CHt=Wa().BADNUM;tze.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].trace,l,u,c,f,v,g=!eze.hasMarkers(s)&&!eze.hasText(s);if(g)return[];if(r===!1)for(v=0;v{(function(e,t){t(typeof GP=="object"&&typeof nze!="undefined"?GP:e.d3=e.d3||{})})(GP,(function(e){"use strict";function t(ne,ae){return neae?1:ne>=ae?0:NaN}function r(ne){return ne.length===1&&(ne=n(ne)),{left:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)<0?ie=me+1:le=me}return ie},right:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)>0?le=me:ie=me+1}return ie}}}function n(ne){return function(ae,pe){return t(ne(ae),pe)}}var a=r(t),i=a.right,o=a.left;function s(ne,ae){ae==null&&(ae=l);for(var pe=0,ie=ne.length-1,le=ne[0],me=new Array(ie<0?0:ie);pene?1:ae>=ne?0:NaN}function f(ne){return ne===null?NaN:+ne}function v(ne,ae){var pe=ne.length,ie=0,le=-1,me=0,be,De,Ge=0;if(ae==null)for(;++le1)return Ge/(ie-1)}function g(ne,ae){var pe=v(ne,ae);return pe&&Math.sqrt(pe)}function p(ne,ae){var pe=ne.length,ie=-1,le,me,be;if(ae==null){for(;++ie=le)for(me=be=le;++iele&&(me=le),be=le)for(me=be=le;++iele&&(me=le),be0)return[ne];if((ie=ae0)for(ne=Math.ceil(ne/De),ae=Math.floor(ae/De),be=new Array(me=Math.ceil(ae-ne+1));++le=0?(me>=L?10:me>=w?5:me>=A?2:1)*Math.pow(10,le):-Math.pow(10,-le)/(me>=L?10:me>=w?5:me>=A?2:1)}function F(ne,ae,pe){var ie=Math.abs(ae-ne)/Math.max(0,pe),le=Math.pow(10,Math.floor(Math.log(ie)/Math.LN10)),me=ie/le;return me>=L?le*=10:me>=w?le*=5:me>=A&&(le*=2),aeOe;)ze.pop(),--ct;var et=new Array(ct+1),qe;for(me=0;me<=ct;++me)qe=et[me]=[],qe.x0=me>0?ze[me-1]:it,qe.x1=me=1)return+pe(ne[ie-1],ie-1,ne);var ie,le=(ie-1)*ae,me=Math.floor(le),be=+pe(ne[me],me,ne),De=+pe(ne[me+1],me+1,ne);return be+(De-be)*(le-me)}}function B(ne,ae,pe){return ne=y.call(ne,f).sort(t),Math.ceil((pe-ae)/(2*(R(ne,.75)-R(ne,.25))*Math.pow(ne.length,-1/3)))}function O(ne,ae,pe){return Math.ceil((pe-ae)/(3.5*g(ne)*Math.pow(ne.length,-1/3)))}function V(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++ieme&&(me=le)}else for(;++ie=le)for(me=le;++ieme&&(me=le);return me}function j(ne,ae){var pe=ne.length,ie=pe,le=-1,me,be=0;if(ae==null)for(;++le=0;)for(be=ne[ae],pe=be.length;--pe>=0;)me[--le]=be[pe];return me}function J(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++iele&&(me=le)}else for(;++ie=le)for(me=le;++iele&&(me=le);return me}function ee(ne,ae){for(var pe=ae.length,ie=new Array(pe);pe--;)ie[pe]=ne[ae[pe]];return ie}function ce(ne,ae){if(pe=ne.length){var pe,ie=0,le=0,me,be=ne[le];for(ae==null&&(ae=t);++ie{(function(e,t){typeof HP=="object"&&typeof aze!="undefined"?t(HP,qP(),ize()):t(e.d3=e.d3||{},e.d3,e.d3)})(HP,(function(e,t,r){"use strict";var n=Math.abs,a=Math.atan,i=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,u=Math.log,c=Math.max,f=Math.min,v=Math.pow,g=Math.round,p=Math.sign||function(Me){return Me>0?1:Me<0?-1:0},x=Math.sin,_=Math.tan,y=1e-6,C=1e-12,k=Math.PI,S=k/2,L=k/4,w=Math.SQRT1_2,A=O(2),T=O(k),m=k*2,F=180/k,E=k/180;function I(Me){return Me?Me/Math.sin(Me):1}function R(Me){return Me>1?S:Me<-1?-S:Math.asin(Me)}function B(Me){return Me>1?0:Me<-1?k:Math.acos(Me)}function O(Me){return Me>0?Math.sqrt(Me):0}function V(Me){return Me=s(2*Me),(Me-1)/(Me+1)}function j(Me){return(s(Me)-s(-Me))/2}function q(Me){return(s(Me)+s(-Me))/2}function U(Me){return u(Me+O(Me*Me+1))}function J(Me){return u(Me+O(Me*Me-1))}function ee(Me){var Ce=_(Me/2),Be=2*u(o(Me/2))/(Ce*Ce);function Ne(Qe,Je){var lt=o(Qe),Gt=o(Je),Zt=x(Je),Nt=Gt*lt,Kt=-((1-Nt?u((1+Nt)/2)/(1-Nt):-.5)+Be/(1+Nt));return[Kt*Gt*x(Qe),Kt*Zt]}return Ne.invert=function(Qe,Je){var lt=O(Qe*Qe+Je*Je),Gt=-Me/2,Zt=50,Nt;if(!lt)return[0,0];do{var Kt=Gt/2,ur=o(Kt),Sr=x(Kt),Br=Sr/ur,ln=-u(n(ur));Gt-=Nt=(2/Br*ln-Be*Br-lt)/(-ln/(Sr*Sr)+1-Be/(2*ur*ur))*(ur<0?.7:1)}while(n(Nt)>y&&--Zt>0);var wn=x(Gt);return[i(Qe*wn,lt*o(Gt)),R(Je*wn/lt)]},Ne}function ce(){var Me=S,Ce=t.geoProjectionMutator(ee),Be=Ce(Me);return Be.radius=function(Ne){return arguments.length?Ce(Me=Ne*E):Me*F},Be.scale(179.976).clipAngle(147)}function ye(Me,Ce){var Be=o(Ce),Ne=I(B(Be*o(Me/=2)));return[2*Be*x(Me)*Ne,x(Ce)*Ne]}ye.invert=function(Me,Ce){if(!(Me*Me+4*Ce*Ce>k*k+y)){var Be=Me,Ne=Ce,Qe=25;do{var Je=x(Be),lt=x(Be/2),Gt=o(Be/2),Zt=x(Ne),Nt=o(Ne),Kt=x(2*Ne),ur=Zt*Zt,Sr=Nt*Nt,Br=lt*lt,ln=1-Sr*Gt*Gt,wn=ln?B(Nt*Gt)*O(In=1/ln):In=0,In,gi=2*wn*Nt*lt-Me,Bi=wn*Zt-Ce,mi=In*(Sr*Br+wn*Nt*Gt*ur),ia=In*(.5*Je*Kt-wn*2*Zt*lt),ua=In*.25*(Kt*lt-wn*Zt*Sr*Je),lo=In*(ur*Gt+wn*Br*Nt),Bo=ia*ua-lo*mi;if(!Bo)break;var Ua=(Bi*ia-gi*lo)/Bo,ls=(gi*ua-Bi*mi)/Bo;Be-=Ua,Ne-=ls}while((n(Ua)>y||n(ls)>y)&&--Qe>0);return[Be,Ne]}};function xe(){return t.geoProjection(ye).scale(152.63)}function ue(Me){var Ce=x(Me),Be=o(Me),Ne=Me>=0?1:-1,Qe=_(Ne*Me),Je=(1+Ce-Be)/2;function lt(Gt,Zt){var Nt=o(Zt),Kt=o(Gt/=2);return[(1+Nt)*x(Gt),(Ne*Zt>-i(Kt,Qe)-.001?0:-Ne*10)+Je+x(Zt)*Be-(1+Nt)*Ce*Kt]}return lt.invert=function(Gt,Zt){var Nt=0,Kt=0,ur=50;do{var Sr=o(Nt),Br=x(Nt),ln=o(Kt),wn=x(Kt),In=1+ln,gi=In*Br-Gt,Bi=Je+wn*Be-In*Ce*Sr-Zt,mi=In*Sr/2,ia=-Br*wn,ua=Ce*In*Br/2,lo=Be*ln+Ce*Sr*wn,Bo=ia*ua-lo*mi,Ua=(Bi*ia-gi*lo)/Bo/2,ls=(gi*ua-Bi*mi)/Bo;n(ls)>2&&(ls/=2),Nt-=Ua,Kt-=ls}while((n(Ua)>y||n(ls)>y)&&--ur>0);return Ne*Kt>-i(o(Nt),Qe)-.001?[Nt*2,Kt]:null},lt}function K(){var Me=20*E,Ce=Me>=0?1:-1,Be=_(Ce*Me),Ne=t.geoProjectionMutator(ue),Qe=Ne(Me),Je=Qe.stream;return Qe.parallel=function(lt){return arguments.length?(Be=_((Ce=(Me=lt*E)>=0?1:-1)*Me),Ne(Me)):Me*F},Qe.stream=function(lt){var Gt=Qe.rotate(),Zt=Je(lt),Nt=(Qe.rotate([0,0]),Je(lt)),Kt=Qe.precision();return Qe.rotate(Gt),Zt.sphere=function(){Nt.polygonStart(),Nt.lineStart();for(var ur=Ce*-180;Ce*ur<180;ur+=Ce*90)Nt.point(ur,Ce*90);if(Me)for(;Ce*(ur-=3*Ce*Kt)>=-180;)Nt.point(ur,Ce*-i(o(ur*E/2),Be)*F);Nt.lineEnd(),Nt.polygonEnd()},Zt},Qe.scale(218.695).center([0,28.0974])}function _e(Me,Ce){var Be=_(Ce/2),Ne=O(1-Be*Be),Qe=1+Ne*o(Me/=2),Je=x(Me)*Ne/Qe,lt=Be/Qe,Gt=Je*Je,Zt=lt*lt;return[4/3*Je*(3+Gt-3*Zt),4/3*lt*(3+3*Gt-Zt)]}_e.invert=function(Me,Ce){if(Me*=3/8,Ce*=3/8,!Me&&n(Ce)>1)return null;var Be=Me*Me,Ne=Ce*Ce,Qe=1+Be+Ne,Je=O((Qe-O(Qe*Qe-4*Ce*Ce))/2),lt=R(Je)/3,Gt=Je?J(n(Ce/Je))/3:U(n(Me))/3,Zt=o(lt),Nt=q(Gt),Kt=Nt*Nt-Zt*Zt;return[p(Me)*2*i(j(Gt)*Zt,.25-Kt),p(Ce)*2*i(Nt*x(lt),.25+Kt)]};function ne(){return t.geoProjection(_e).scale(66.1603)}var ae=O(8),pe=u(1+A);function ie(Me,Ce){var Be=n(Ce);return BeC&&--Ne>0);return[Me/(o(Be)*(ae-1/x(Be))),p(Ce)*Be]};function le(){return t.geoProjection(ie).scale(112.314)}function me(Me){var Ce=2*k/Me;function Be(Ne,Qe){var Je=t.geoAzimuthalEquidistantRaw(Ne,Qe);if(n(Ne)>S){var lt=i(Je[1],Je[0]),Gt=O(Je[0]*Je[0]+Je[1]*Je[1]),Zt=Ce*g((lt-S)/Ce)+S,Nt=i(x(lt-=Zt),2-o(lt));lt=Zt+R(k/Gt*x(Nt))-Nt,Je[0]=Gt*o(lt),Je[1]=Gt*x(lt)}return Je}return Be.invert=function(Ne,Qe){var Je=O(Ne*Ne+Qe*Qe);if(Je>S){var lt=i(Qe,Ne),Gt=Ce*g((lt-S)/Ce)+S,Zt=lt>Gt?-1:1,Nt=Je*o(Gt-lt),Kt=1/_(Zt*B((Nt-k)/O(k*(k-2*Nt)+Je*Je)));lt=Gt+2*a((Kt+Zt*O(Kt*Kt-3))/3),Ne=Je*o(lt),Qe=Je*x(lt)}return t.geoAzimuthalEquidistantRaw.invert(Ne,Qe)},Be}function be(){var Me=5,Ce=t.geoProjectionMutator(me),Be=Ce(Me),Ne=Be.stream,Qe=.01,Je=-o(Qe*E),lt=x(Qe*E);return Be.lobes=function(Gt){return arguments.length?Ce(Me=+Gt):Me},Be.stream=function(Gt){var Zt=Be.rotate(),Nt=Ne(Gt),Kt=(Be.rotate([0,0]),Ne(Gt));return Be.rotate(Zt),Nt.sphere=function(){Kt.polygonStart(),Kt.lineStart();for(var ur=0,Sr=360/Me,Br=2*k/Me,ln=90-180/Me,wn=S;ur0&&n(Qe)>y);return Ne<0?NaN:Be}function Oe(Me,Ce,Be){return Ce===void 0&&(Ce=40),Be===void 0&&(Be=C),function(Ne,Qe,Je,lt){var Gt,Zt,Nt;Je=Je===void 0?0:+Je,lt=lt===void 0?0:+lt;for(var Kt=0;KtGt){Je-=Zt/=2,lt-=Nt/=2;continue}Gt=ln;var wn=(Je>0?-1:1)*Be,In=(lt>0?-1:1)*Be,gi=Me(Je+wn,lt),Bi=Me(Je,lt+In),mi=(gi[0]-ur[0])/wn,ia=(gi[1]-ur[1])/wn,ua=(Bi[0]-ur[0])/In,lo=(Bi[1]-ur[1])/In,Bo=lo*mi-ia*ua,Ua=(n(Bo)<.5?.5:1)/Bo;if(Zt=(Br*ua-Sr*lo)*Ua,Nt=(Sr*ia-Br*mi)*Ua,Je+=Zt,lt+=Nt,n(Zt)0&&(Gt[1]*=1+Zt/1.5*Gt[0]*Gt[0]),Gt}return Ne.invert=Oe(Ne),Ne}function ct(){return t.geoProjection(ze()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function et(Me,Ce){var Be=Me*x(Ce),Ne=30,Qe;do Ce-=Qe=(Ce+x(Ce)-Be)/(1+o(Ce));while(n(Qe)>y&&--Ne>0);return Ce/2}function qe(Me,Ce,Be){function Ne(Qe,Je){return[Me*Qe*o(Je=et(Be,Je)),Ce*x(Je)]}return Ne.invert=function(Qe,Je){return Je=R(Je/Ce),[Qe/(Me*o(Je)),R((2*Je+x(2*Je))/Be)]},Ne}var we=qe(A/S,A,k);function Le(){return t.geoProjection(we).scale(169.529)}var Ke=2.00276,Te=1.11072;function Ve(Me,Ce){var Be=et(k,Ce);return[Ke*Me/(1/o(Ce)+Te/o(Be)),(Ce+A*x(Be))/Ke]}Ve.invert=function(Me,Ce){var Be=Ke*Ce,Ne=Ce<0?-L:L,Qe=25,Je,lt;do lt=Be-A*x(Ne),Ne-=Je=(x(2*Ne)+2*Ne-k*x(lt))/(2*o(2*Ne)+2+k*o(lt)*A*o(Ne));while(n(Je)>y&&--Qe>0);return lt=Be-A*x(Ne),[Me*(1/o(lt)+Te/o(Ne))/Ke,lt]};function $e(){return t.geoProjection(Ve).scale(160.857)}function ot(Me){var Ce=0,Be=t.geoProjectionMutator(Me),Ne=Be(Ce);return Ne.parallel=function(Qe){return arguments.length?Be(Ce=Qe*E):Ce*F},Ne}function tt(Me,Ce){return[Me*o(Ce),Ce]}tt.invert=function(Me,Ce){return[Me/o(Ce),Ce]};function nt(){return t.geoProjection(tt).scale(152.63)}function We(Me){if(!Me)return tt;var Ce=1/_(Me);function Be(Ne,Qe){var Je=Ce+Me-Qe,lt=Je&&Ne*o(Qe)/Je;return[Je*x(lt),Ce-Je*o(lt)]}return Be.invert=function(Ne,Qe){var Je=O(Ne*Ne+(Qe=Ce-Qe)*Qe),lt=Ce+Me-Je;return[Je/o(lt)*i(Ne,Qe),lt]},Be}function mt(){return ot(We).scale(123.082).center([0,26.1441]).parallel(45)}function bt(Me){function Ce(Be,Ne){var Qe=S-Ne,Je=Qe&&Be*Me*x(Qe)/Qe;return[Qe*x(Je)/Me,S-Qe*o(Je)]}return Ce.invert=function(Be,Ne){var Qe=Be*Me,Je=S-Ne,lt=O(Qe*Qe+Je*Je),Gt=i(Qe,Je);return[(lt?lt/x(lt):1)*Gt/Me,S-lt]},Ce}function Yt(){var Me=.5,Ce=t.geoProjectionMutator(bt),Be=Ce(Me);return Be.fraction=function(Ne){return arguments.length?Ce(Me=+Ne):Me},Be.scale(158.837)}var jt=qe(1,4/k,k);function mr(){return t.geoProjection(jt).scale(152.63)}function or(Me,Ce,Be,Ne,Qe,Je){var lt=o(Je),Gt;if(n(Me)>1||n(Je)>1)Gt=B(Be*Qe+Ce*Ne*lt);else{var Zt=x(Me/2),Nt=x(Je/2);Gt=2*R(O(Zt*Zt+Ce*Ne*Nt*Nt))}return n(Gt)>y?[Gt,i(Ne*x(Je),Ce*Qe-Be*Ne*lt)]:[0,0]}function fr(Me,Ce,Be){return B((Me*Me+Ce*Ce-Be*Be)/(2*Me*Ce))}function Ot(Me){return Me-2*k*l((Me+k)/(2*k))}function cr(Me,Ce,Be){for(var Ne=[[Me[0],Me[1],x(Me[1]),o(Me[1])],[Ce[0],Ce[1],x(Ce[1]),o(Ce[1])],[Be[0],Be[1],x(Be[1]),o(Be[1])]],Qe=Ne[2],Je,lt=0;lt<3;++lt,Qe=Je)Je=Ne[lt],Qe.v=or(Je[1]-Qe[1],Qe[3],Qe[2],Je[3],Je[2],Je[0]-Qe[0]),Qe.point=[0,0];var Gt=fr(Ne[0].v[0],Ne[2].v[0],Ne[1].v[0]),Zt=fr(Ne[0].v[0],Ne[1].v[0],Ne[2].v[0]),Nt=k-Gt;Ne[2].point[1]=0,Ne[0].point[0]=-(Ne[1].point[0]=Ne[0].v[0]/2);var Kt=[Ne[2].point[0]=Ne[0].point[0]+Ne[2].v[0]*o(Gt),2*(Ne[0].point[1]=Ne[1].point[1]=Ne[2].v[0]*x(Gt))];function ur(Sr,Br){var ln=x(Br),wn=o(Br),In=new Array(3),gi;for(gi=0;gi<3;++gi){var Bi=Ne[gi];if(In[gi]=or(Br-Bi[1],Bi[3],Bi[2],wn,ln,Sr-Bi[0]),!In[gi][0])return Bi.point;In[gi][1]=Ot(In[gi][1]-Bi.v[1])}var mi=Kt.slice();for(gi=0;gi<3;++gi){var ia=gi==2?0:gi+1,ua=fr(Ne[gi].v[0],In[gi][0],In[ia][0]);In[gi][1]<0&&(ua=-ua),gi?gi==1?(ua=Zt-ua,mi[0]-=In[gi][0]*o(ua),mi[1]-=In[gi][0]*x(ua)):(ua=Nt-ua,mi[0]+=In[gi][0]*o(ua),mi[1]+=In[gi][0]*x(ua)):(mi[0]+=In[gi][0]*o(ua),mi[1]-=In[gi][0]*x(ua))}return mi[0]/=3,mi[1]/=3,mi}return ur}function Ct(Me){return Me[0]*=E,Me[1]*=E,Me}function wt(){return Tt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Tt(Me,Ce,Be){var Ne=t.geoCentroid({type:"MultiPoint",coordinates:[Me,Ce,Be]}),Qe=[-Ne[0],-Ne[1]],Je=t.geoRotation(Qe),lt=cr(Ct(Je(Me)),Ct(Je(Ce)),Ct(Je(Be)));lt.invert=Oe(lt);var Gt=t.geoProjection(lt).rotate(Qe),Zt=Gt.center;return delete Gt.rotate,Gt.center=function(Nt){return arguments.length?Zt(Je(Nt)):Je.invert(Zt())},Gt.clipAngle(90)}function Mt(Me,Ce){var Be=O(1-x(Ce));return[2/T*Me*Be,T*(1-Be)]}Mt.invert=function(Me,Ce){var Be=(Be=Ce/T-1)*Be;return[Be>0?Me*O(k/Be)/2:0,R(1-Be)]};function Lt(){return t.geoProjection(Mt).scale(95.6464).center([0,30])}function ft(Me){var Ce=_(Me);function Be(Ne,Qe){return[Ne,(Ne?Ne/x(Ne):1)*(x(Qe)*o(Ne)-Ce*o(Qe))]}return Be.invert=Ce?function(Ne,Qe){Ne&&(Qe*=x(Ne)/Ne);var Je=o(Ne);return[Ne,2*i(O(Je*Je+Ce*Ce-Qe*Qe)-Je,Ce-Qe)]}:function(Ne,Qe){return[Ne,R(Ne?Qe*_(Ne)/Ne:Qe)]},Be}function kt(){return ot(ft).scale(249.828).clipAngle(90)}var rr=O(3);function pr(Me,Ce){return[rr*Me*(2*o(2*Ce/3)-1)/T,rr*T*x(Ce/3)]}pr.invert=function(Me,Ce){var Be=3*R(Ce/(rr*T));return[T*Me/(rr*(2*o(2*Be/3)-1)),Be]};function Kr(){return t.geoProjection(pr).scale(156.19)}function Nr(Me){var Ce=o(Me);function Be(Ne,Qe){return[Ne*Ce,x(Qe)/Ce]}return Be.invert=function(Ne,Qe){return[Ne/Ce,R(Qe*Ce)]},Be}function dn(){return ot(Nr).parallel(38.58).scale(195.044)}function xr(Me){var Ce=o(Me);function Be(Ne,Qe){return[Ne*Ce,(1+Ce)*_(Qe/2)]}return Be.invert=function(Ne,Qe){return[Ne/Ce,a(Qe/(1+Ce))*2]},Be}function Fr(){return ot(xr).scale(124.75)}function Zr(Me,Ce){var Be=O(8/(3*k));return[Be*Me*(1-n(Ce)/k),Be*Ce]}Zr.invert=function(Me,Ce){var Be=O(8/(3*k)),Ne=Ce/Be;return[Me/(Be*(1-n(Ne)/k)),Ne]};function Cn(){return t.geoProjection(Zr).scale(165.664)}function Dt(Me,Ce){var Be=O(4-3*x(n(Ce)));return[2/O(6*k)*Me*Be,p(Ce)*O(2*k/3)*(2-Be)]}Dt.invert=function(Me,Ce){var Be=2-n(Ce)/O(2*k/3);return[Me*O(6*k)/(2*Be),p(Ce)*R((4-Be*Be)/3)]};function At(){return t.geoProjection(Dt).scale(165.664)}function Vt(Me,Ce){var Be=O(k*(4+k));return[2/Be*Me*(1+O(1-4*Ce*Ce/(k*k))),4/Be*Ce]}Vt.invert=function(Me,Ce){var Be=O(k*(4+k))/2;return[Me*Be/(1+O(1-Ce*Ce*(4+k)/(4*k))),Ce*Be/2]};function Qt(){return t.geoProjection(Vt).scale(180.739)}function Ut(Me,Ce){var Be=(2+S)*x(Ce);Ce/=2;for(var Ne=0,Qe=1/0;Ne<10&&n(Qe)>y;Ne++){var Je=o(Ce);Ce-=Qe=(Ce+x(Ce)*(Je+2)-Be)/(2*Je*(1+Je))}return[2/O(k*(4+k))*Me*(1+o(Ce)),2*O(k/(4+k))*x(Ce)]}Ut.invert=function(Me,Ce){var Be=Ce*O((4+k)/k)/2,Ne=R(Be),Qe=o(Ne);return[Me/(2/O(k*(4+k))*(1+Qe)),R((Ne+Be*(Qe+2))/(2+S))]};function _r(){return t.geoProjection(Ut).scale(180.739)}function rn(Me,Ce){return[Me*(1+o(Ce))/O(2+k),2*Ce/O(2+k)]}rn.invert=function(Me,Ce){var Be=O(2+k),Ne=Ce*Be/2;return[Be*Me/(1+o(Ne)),Ne]};function Jr(){return t.geoProjection(rn).scale(173.044)}function qn(Me,Ce){for(var Be=(1+S)*x(Ce),Ne=0,Qe=1/0;Ne<10&&n(Qe)>y;Ne++)Ce-=Qe=(Ce+x(Ce)-Be)/(1+o(Ce));return Be=O(2+k),[Me*(1+o(Ce))/Be,2*Ce/Be]}qn.invert=function(Me,Ce){var Be=1+S,Ne=O(Be/2);return[Me*2*Ne/(1+o(Ce*=Ne)),R((Ce+x(Ce))/Be)]};function ri(){return t.geoProjection(qn).scale(173.044)}var Jn=3+2*A;function Ii(Me,Ce){var Be=x(Me/=2),Ne=o(Me),Qe=O(o(Ce)),Je=o(Ce/=2),lt=x(Ce)/(Je+A*Ne*Qe),Gt=O(2/(1+lt*lt)),Zt=O((A*Je+(Ne+Be)*Qe)/(A*Je+(Ne-Be)*Qe));return[Jn*(Gt*(Zt-1/Zt)-2*u(Zt)),Jn*(Gt*lt*(Zt+1/Zt)-2*a(lt))]}Ii.invert=function(Me,Ce){if(!(Je=_e.invert(Me/1.2,Ce*1.065)))return null;var Be=Je[0],Ne=Je[1],Qe=20,Je;Me/=Jn,Ce/=Jn;do{var lt=Be/2,Gt=Ne/2,Zt=x(lt),Nt=o(lt),Kt=x(Gt),ur=o(Gt),Sr=o(Ne),Br=O(Sr),ln=Kt/(ur+A*Nt*Br),wn=ln*ln,In=O(2/(1+wn)),gi=A*ur+(Nt+Zt)*Br,Bi=A*ur+(Nt-Zt)*Br,mi=gi/Bi,ia=O(mi),ua=ia-1/ia,lo=ia+1/ia,Bo=In*ua-2*u(ia)-Me,Ua=In*ln*lo-2*a(ln)-Ce,ls=Kt&&w*Br*Zt*wn/Kt,cl=(A*Nt*ur+Br)/(2*(ur+A*Nt*Br)*(ur+A*Nt*Br)*Br),Eu=-.5*ln*In*In*In,el=Eu*ls,yc=Eu*cl,wi=(wi=2*ur+A*Br*(Nt-Zt))*wi*ia,Di=(A*Nt*ur*Br+Sr)/wi,fl=-(A*Zt*Kt)/(Br*wi),Fc=ua*el-2*Di/ia+In*(Di+Di/mi),du=ua*yc-2*fl/ia+In*(fl+fl/mi),ms=ln*lo*el-2*ls/(1+wn)+In*lo*ls+In*ln*(Di-Di/mi),ff=ln*lo*yc-2*cl/(1+wn)+In*lo*cl+In*ln*(fl-fl/mi),ku=du*ms-ff*Fc;if(!ku)break;var hl=(Ua*du-Bo*ff)/ku,mh=(Bo*ms-Ua*Fc)/ku;Be-=hl,Ne=c(-S,f(S,Ne-mh))}while((n(hl)>y||n(mh)>y)&&--Qe>0);return n(n(Ne)-S)Ne){var ur=O(Kt),Sr=i(Nt,Zt),Br=Be*g(Sr/Be),ln=Sr-Br,wn=Me*o(ln),In=(Me*x(ln)-ln*x(wn))/(S-wn),gi=ao(ln,In),Bi=(k-Me)/Da(gi,wn,k);Zt=ur;var mi=50,ia;do Zt-=ia=(Me+Da(gi,wn,Zt)*Bi-ur)/(gi(Zt)*Bi);while(n(ia)>y&&--mi>0);Nt=ln*x(Zt),ZtNe){var Zt=O(Gt),Nt=i(lt,Je),Kt=Be*g(Nt/Be),ur=Nt-Kt;Je=Zt*o(ur),lt=Zt*x(ur);for(var Sr=Je-S,Br=x(Je),ln=lt/Br,wn=Jey||n(ln)>y)&&--wn>0);return[ur,Sr]},Zt}var Zs=bo(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function su(){return t.geoProjection(Zs).scale(149.995)}var fc=bo(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Af(){return t.geoProjection(fc).scale(153.93)}var ut=bo(5/6*k,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Jt(){return t.geoProjection(ut).scale(130.945)}function er(Me,Ce){var Be=Me*Me,Ne=Ce*Ce;return[Me*(1-.162388*Ne)*(.87-952426e-9*Be*Be),Ce*(1+Ne/12)]}er.invert=function(Me,Ce){var Be=Me,Ne=Ce,Qe=50,Je;do{var lt=Ne*Ne;Ne-=Je=(Ne*(1+lt/12)-Ce)/(1+lt/4)}while(n(Je)>y&&--Qe>0);Qe=50,Me/=1-.162388*lt;do{var Gt=(Gt=Be*Be)*Gt;Be-=Je=(Be*(.87-952426e-9*Gt)-Me)/(.87-.00476213*Gt)}while(n(Je)>y&&--Qe>0);return[Be,Ne]};function wr(){return t.geoProjection(er).scale(131.747)}var nn=bo(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Dr(){return t.geoProjection(nn).scale(131.087)}function bn(Me){var Ce=Me(S,0)[0]-Me(-S,0)[0];function Be(Ne,Qe){var Je=Ne>0?-.5:.5,lt=Me(Ne+Je*k,Qe);return lt[0]-=Je*Ce,lt}return Me.invert&&(Be.invert=function(Ne,Qe){var Je=Ne>0?-.5:.5,lt=Me.invert(Ne+Je*Ce,Qe),Gt=lt[0]-Je*k;return Gt<-k?Gt+=2*k:Gt>k&&(Gt-=2*k),lt[0]=Gt,lt}),Be}function Yr(Me,Ce){var Be=p(Me),Ne=p(Ce),Qe=o(Ce),Je=o(Me)*Qe,lt=x(Me)*Qe,Gt=x(Ne*Ce);Me=n(i(lt,Gt)),Ce=R(Je),n(Me-S)>y&&(Me%=S);var Zt=Tn(Me>k/4?S-Me:Me,Ce);return Me>k/4&&(Gt=Zt[0],Zt[0]=-Zt[1],Zt[1]=-Gt),Zt[0]*=Be,Zt[1]*=-Ne,Zt}Yr.invert=function(Me,Ce){n(Me)>1&&(Me=p(Me)*2-Me),n(Ce)>1&&(Ce=p(Ce)*2-Ce);var Be=p(Me),Ne=p(Ce),Qe=-Be*Me,Je=-Ne*Ce,lt=Je/Qe<1,Gt=Kn(lt?Je:Qe,lt?Qe:Je),Zt=Gt[0],Nt=Gt[1],Kt=o(Nt);return lt&&(Zt=-S-Zt),[Be*(i(x(Zt)*Kt,-x(Nt))+k),Ne*R(o(Zt)*Kt)]};function Tn(Me,Ce){if(Ce===S)return[0,0];var Be=x(Ce),Ne=Be*Be,Qe=Ne*Ne,Je=1+Qe,lt=1+3*Qe,Gt=1-Qe,Zt=R(1/O(Je)),Nt=Gt+Ne*Je*Zt,Kt=(1-Be)/Nt,ur=O(Kt),Sr=Kt*Je,Br=O(Sr),ln=ur*Gt,wn,In;if(Me===0)return[0,-(ln+Ne*Br)];var gi=o(Ce),Bi=1/gi,mi=2*Be*gi,ia=(-3*Ne+Zt*lt)*mi,ua=(-Nt*gi-(1-Be)*ia)/(Nt*Nt),lo=.5*ua/ur,Bo=Gt*lo-2*Ne*ur*mi,Ua=Ne*Je*ua+Kt*lt*mi,ls=-Bi*mi,cl=-Bi*Ua,Eu=-2*Bi*Bo,el=4*Me/k,yc;if(Me>.222*k||Ce.175*k){if(wn=(ln+Ne*O(Sr*(1+Qe)-ln*ln))/(1+Qe),Me>k/4)return[wn,wn];var wi=wn,Di=.5*wn;wn=.5*(Di+wi),In=50;do{var fl=O(Sr-wn*wn),Fc=wn*(Eu+ls*fl)+cl*R(wn/Br)-el;if(!Fc)break;Fc<0?Di=wn:wi=wn,wn=.5*(Di+wi)}while(n(wi-Di)>y&&--In>0)}else{wn=y,In=25;do{var du=wn*wn,ms=O(Sr-du),ff=Eu+ls*ms,ku=wn*ff+cl*R(wn/Br)-el,hl=ff+(cl-ls*du)/ms;wn-=yc=ms?ku/hl:0}while(n(yc)>y&&--In>0)}return[wn,-ln-Ne*O(Sr-wn*wn)]}function Kn(Me,Ce){for(var Be=0,Ne=1,Qe=.5,Je=50;;){var lt=Qe*Qe,Gt=O(Qe),Zt=R(1/O(1+lt)),Nt=1-lt+Qe*(1+lt)*Zt,Kt=(1-Gt)/Nt,ur=O(Kt),Sr=Kt*(1+lt),Br=ur*(1-lt),ln=Sr-Me*Me,wn=O(ln),In=Ce+Br+Qe*wn;if(n(Ne-Be)0?Be=Qe:Ne=Qe,Qe=.5*(Be+Ne)}if(!Je)return null;var gi=R(Gt),Bi=o(gi),mi=1/Bi,ia=2*Gt*Bi,ua=(-3*Qe+Zt*(1+3*lt))*ia,lo=(-Nt*Bi-(1-Gt)*ua)/(Nt*Nt),Bo=.5*lo/ur,Ua=(1-lt)*Bo-2*Qe*ur*ia,ls=-2*mi*Ua,cl=-mi*ia,Eu=-mi*(Qe*(1+lt)*lo+Kt*(1+3*lt)*ia);return[k/4*(Me*(ls+cl*wn)+Eu*R(Me/O(Sr))),gi]}function Qn(){return t.geoProjection(bn(Yr)).scale(239.75)}function Ai(Me,Ce,Be){var Ne,Qe,Je;return Me?(Ne=Ji(Me,Be),Ce?(Qe=Ji(Ce,1-Be),Je=Qe[1]*Qe[1]+Be*Ne[0]*Ne[0]*Qe[0]*Qe[0],[[Ne[0]*Qe[2]/Je,Ne[1]*Ne[2]*Qe[0]*Qe[1]/Je],[Ne[1]*Qe[1]/Je,-Ne[0]*Ne[2]*Qe[0]*Qe[2]/Je],[Ne[2]*Qe[1]*Qe[2]/Je,-Be*Ne[0]*Ne[1]*Qe[0]/Je]]):[[Ne[0],0],[Ne[1],0],[Ne[2],0]]):(Qe=Ji(Ce,1-Be),[[0,Qe[0]/Qe[1]],[1/Qe[1],0],[Qe[2]/Qe[1],0]])}function Ji(Me,Ce){var Be,Ne,Qe,Je,lt;if(Ce=1-y)return Be=(1-Ce)/4,Ne=q(Me),Je=V(Me),Qe=1/Ne,lt=Ne*j(Me),[Je+Be*(lt-Me)/(Ne*Ne),Qe-Be*Je*Qe*(lt-Me),Qe+Be*Je*Qe*(lt+Me),2*a(s(Me))-S+Be*(lt-Me)/Ne];var Gt=[1,0,0,0,0,0,0,0,0],Zt=[O(Ce),0,0,0,0,0,0,0,0],Nt=0;for(Ne=O(1-Ce),lt=1;n(Zt[Nt]/Gt[Nt])>y&&Nt<8;)Be=Gt[Nt++],Zt[Nt]=(Be-Ne)/2,Gt[Nt]=(Be+Ne)/2,Ne=O(Be*Ne),lt*=2;Qe=lt*Gt[Nt]*Me;do Je=Zt[Nt]*x(Ne=Qe)/Gt[Nt],Qe=(R(Je)+Qe)/2;while(--Nt);return[x(Qe),Je=o(Qe),Je/o(Qe-Ne),Qe]}function Ra(Me,Ce,Be){var Ne=n(Me),Qe=n(Ce),Je=j(Qe);if(Ne){var lt=1/x(Ne),Gt=1/(_(Ne)*_(Ne)),Zt=-(Gt+Be*(Je*Je*lt*lt)-1+Be),Nt=(Be-1)*Gt,Kt=(-Zt+O(Zt*Zt-4*Nt))/2;return[ii(a(1/O(Kt)),Be)*p(Me),ii(a(O((Kt/Gt-1)/Be)),1-Be)*p(Ce)]}return[0,ii(a(Je),1-Be)*p(Ce)]}function ii(Me,Ce){if(!Ce)return Me;if(Ce===1)return u(_(Me/2+L));for(var Be=1,Ne=O(1-Ce),Qe=O(Ce),Je=0;n(Qe)>y;Je++){if(Me%k){var lt=a(Ne*_(Me)/Be);lt<0&&(lt+=k),Me+=lt+~~(Me/k)*k}else Me+=Me;Qe=(Be+Ne)/2,Ne=O(Be*Ne),Qe=((Be=Qe)-Ne)/2}return Me/(v(2,Je)*Be)}function Za(Me,Ce){var Be=(A-1)/(A+1),Ne=O(1-Be*Be),Qe=ii(S,Ne*Ne),Je=-1,lt=u(_(k/4+n(Ce)/2)),Gt=s(Je*lt)/O(Be),Zt=ja(Gt*o(Je*Me),Gt*x(Je*Me)),Nt=Ra(Zt[0],Zt[1],Ne*Ne);return[-Nt[1],(Ce>=0?1:-1)*(.5*Qe-Nt[0])]}function ja(Me,Ce){var Be=Me*Me,Ne=Ce+1,Qe=1-Be-Ce*Ce;return[.5*((Me>=0?S:-S)-i(Qe,2*Me)),-.25*u(Qe*Qe+4*Be)+.5*u(Ne*Ne+Be)]}function qo(Me,Ce){var Be=Ce[0]*Ce[0]+Ce[1]*Ce[1];return[(Me[0]*Ce[0]+Me[1]*Ce[1])/Be,(Me[1]*Ce[0]-Me[0]*Ce[1])/Be]}Za.invert=function(Me,Ce){var Be=(A-1)/(A+1),Ne=O(1-Be*Be),Qe=ii(S,Ne*Ne),Je=-1,lt=Ai(.5*Qe-Ce,-Me,Ne*Ne),Gt=qo(lt[0],lt[1]),Zt=i(Gt[1],Gt[0])/Je;return[Zt,2*a(s(.5/Je*u(Be*Gt[0]*Gt[0]+Be*Gt[1]*Gt[1])))-S]};function $a(){return t.geoProjection(bn(Za)).scale(151.496)}function Ka(Me){var Ce=x(Me),Be=o(Me),Ne=Oa(Me);Ne.invert=Oa(-Me);function Qe(Je,lt){var Gt=Ne(Je,lt);Je=Gt[0],lt=Gt[1];var Zt=x(lt),Nt=o(lt),Kt=o(Je),ur=B(Ce*Zt+Be*Nt*Kt),Sr=x(ur),Br=n(Sr)>y?ur/Sr:1;return[Br*Be*x(Je),(n(Je)>S?Br:-Br)*(Ce*Nt-Be*Zt*Kt)]}return Qe.invert=function(Je,lt){var Gt=O(Je*Je+lt*lt),Zt=-x(Gt),Nt=o(Gt),Kt=Gt*Nt,ur=-lt*Zt,Sr=Gt*Ce,Br=O(Kt*Kt+ur*ur-Sr*Sr),ln=i(Kt*Sr+ur*Br,ur*Sr-Kt*Br),wn=(Gt>S?-1:1)*i(Je*Zt,Gt*o(ln)*Nt+lt*x(ln)*Zt);return Ne.invert(wn,ln)},Qe}function Oa(Me){var Ce=x(Me),Be=o(Me);return function(Ne,Qe){var Je=o(Qe),lt=o(Ne)*Je,Gt=x(Ne)*Je,Zt=x(Qe);return[i(Gt,lt*Be-Zt*Ce),R(Zt*Be+lt*Ce)]}}function Ni(){var Me=0,Ce=t.geoProjectionMutator(Ka),Be=Ce(Me),Ne=Be.rotate,Qe=Be.stream,Je=t.geoCircle();return Be.parallel=function(lt){if(!arguments.length)return Me*F;var Gt=Be.rotate();return Ce(Me=lt*E).rotate(Gt)},Be.rotate=function(lt){return arguments.length?(Ne.call(Be,[lt[0],lt[1]-Me*F]),Je.center([-lt[0],-lt[1]]),Be):(lt=Ne.call(Be),lt[1]+=Me*F,lt)},Be.stream=function(lt){return lt=Qe(lt),lt.sphere=function(){lt.polygonStart();var Gt=.01,Zt=Je.radius(90-Gt)().coordinates[0],Nt=Zt.length-1,Kt=-1,ur;for(lt.lineStart();++Kt=0;)lt.point((ur=Zt[Kt])[0],ur[1]);lt.lineEnd(),lt.polygonEnd()},lt},Be.scale(79.4187).parallel(45).clipAngle(180-.001)}var ka=3,vs=R(1-1/ka)*F,yo=Nr(0);function so(Me){var Ce=vs*E,Be=Mt(k,Ce)[0]-Mt(-k,Ce)[0],Ne=yo(0,Ce)[1],Qe=Mt(0,Ce)[1],Je=T-Qe,lt=m/Me,Gt=4/m,Zt=Ne+Je*Je*4/m;function Nt(Kt,ur){var Sr,Br=n(ur);if(Br>Ce){var ln=f(Me-1,c(0,l((Kt+k)/lt)));Kt+=k*(Me-1)/Me-ln*lt,Sr=Mt(Kt,Br),Sr[0]=Sr[0]*m/Be-m*(Me-1)/(2*Me)+ln*m/Me,Sr[1]=Ne+(Sr[1]-Qe)*4*Je/m,ur<0&&(Sr[1]=-Sr[1])}else Sr=yo(Kt,ur);return Sr[0]*=Gt,Sr[1]/=Zt,Sr}return Nt.invert=function(Kt,ur){Kt/=Gt,ur*=Zt;var Sr=n(ur);if(Sr>Ne){var Br=f(Me-1,c(0,l((Kt+k)/lt)));Kt=(Kt+k*(Me-1)/Me-Br*lt)*Be/m;var ln=Mt.invert(Kt,.25*(Sr-Ne)*m/Je+Qe);return ln[0]-=k*(Me-1)/Me-Br*lt,ur<0&&(ln[1]=-ln[1]),ln}return yo.invert(Kt,ur)},Nt}function oo(Me,Ce){return[Me,Ce&1?90-y:vs]}function ko(Me,Ce){return[Me,Ce&1?-90+y:-vs]}function pa(Me){return[Me[0]*(1-y),Me[1]]}function la(Me){var Ce=[].concat(r.range(-180,180+Me/2,Me).map(oo),r.range(180,-180-Me/2,-Me).map(ko));return{type:"Polygon",coordinates:[Me===180?Ce.map(pa):Ce]}}function As(){var Me=4,Ce=t.geoProjectionMutator(so),Be=Ce(Me),Ne=Be.stream;return Be.lobes=function(Qe){return arguments.length?Ce(Me=+Qe):Me},Be.stream=function(Qe){var Je=Be.rotate(),lt=Ne(Qe),Gt=(Be.rotate([0,0]),Ne(Qe));return Be.rotate(Je),lt.sphere=function(){t.geoStream(la(180/Me),Gt)},lt},Be.scale(239.75)}function Ms(Me){var Ce=1+Me,Be=x(1/Ce),Ne=R(Be),Qe=2*O(k/(Je=k+4*Ne*Ce)),Je,lt=.5*Qe*(Ce+O(Me*(2+Me))),Gt=Me*Me,Zt=Ce*Ce;function Nt(Kt,ur){var Sr=1-x(ur),Br,ln;if(Sr&&Sr<2){var wn=S-ur,In=25,gi;do{var Bi=x(wn),mi=o(wn),ia=Ne+i(Bi,Ce-mi),ua=1+Zt-2*Ce*mi;wn-=gi=(wn-Gt*Ne-Ce*Bi+ua*ia-.5*Sr*Je)/(2*Ce*Bi*ia)}while(n(gi)>C&&--In>0);Br=Qe*O(ua),ln=Kt*ia/k}else Br=Qe*(Me+Sr),ln=Kt*Ne/k;return[Br*x(ln),lt-Br*o(ln)]}return Nt.invert=function(Kt,ur){var Sr=Kt*Kt+(ur-=lt)*ur,Br=(1+Zt-Sr/(Qe*Qe))/(2*Ce),ln=B(Br),wn=x(ln),In=Ne+i(wn,Ce-Br);return[R(Kt/O(Sr))*k/In,R(1-2*(ln-Gt*Ne-Ce*wn+(1+Zt-2*Ce*Br)*In)/Je)]},Nt}function xu(){var Me=1,Ce=t.geoProjectionMutator(Ms),Be=Ce(Me);return Be.ratio=function(Ne){return arguments.length?Ce(Me=+Ne):Me},Be.scale(167.774).center([0,18.67])}var rs=.7109889596207567,Ls=.0528035274542;function $s(Me,Ce){return Ce>-rs?(Me=we(Me,Ce),Me[1]+=Ls,Me):tt(Me,Ce)}$s.invert=function(Me,Ce){return Ce>-rs?we.invert(Me,Ce-Ls):tt.invert(Me,Ce)};function Kc(){return t.geoProjection($s).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function _u(Me,Ce){return n(Ce)>rs?(Me=we(Me,Ce),Me[1]-=Ce>0?Ls:-Ls,Me):tt(Me,Ce)}_u.invert=function(Me,Ce){return n(Ce)>rs?we.invert(Me,Ce+(Ce>0?Ls:-Ls)):tt.invert(Me,Ce)};function Gu(){return t.geoProjection(_u).scale(152.63)}function Ja(Me,Ce,Be,Ne){var Qe=O(4*k/(2*Be+(1+Me-Ce/2)*x(2*Be)+(Me+Ce)/2*x(4*Be)+Ce/2*x(6*Be))),Je=O(Ne*x(Be)*O((1+Me*o(2*Be)+Ce*o(4*Be))/(1+Me+Ce))),lt=Be*Zt(1);function Gt(ur){return O(1+Me*o(2*ur)+Ce*o(4*ur))}function Zt(ur){var Sr=ur*Be;return(2*Sr+(1+Me-Ce/2)*x(2*Sr)+(Me+Ce)/2*x(4*Sr)+Ce/2*x(6*Sr))/Be}function Nt(ur){return Gt(ur)*x(ur)}var Kt=function(ur,Sr){var Br=Be*it(Zt,lt*x(Sr)/Be,Sr/k);isNaN(Br)&&(Br=Be*p(Sr));var ln=Qe*Gt(Br);return[ln*Je*ur/k*o(Br),ln/Je*x(Br)]};return Kt.invert=function(ur,Sr){var Br=it(Nt,Sr*Je/Qe);return[ur*k/(o(Br)*Qe*Je*Gt(Br)),R(Be*Zt(Br/Be)/lt)]},Be===0&&(Qe=O(Ne/k),Kt=function(ur,Sr){return[ur*Qe,x(Sr)/Qe]},Kt.invert=function(ur,Sr){return[ur/Qe,R(Sr*Qe)]}),Kt}function ps(){var Me=1,Ce=0,Be=45*E,Ne=2,Qe=t.geoProjectionMutator(Ja),Je=Qe(Me,Ce,Be,Ne);return Je.a=function(lt){return arguments.length?Qe(Me=+lt,Ce,Be,Ne):Me},Je.b=function(lt){return arguments.length?Qe(Me,Ce=+lt,Be,Ne):Ce},Je.psiMax=function(lt){return arguments.length?Qe(Me,Ce,Be=+lt*E,Ne):Be*F},Je.ratio=function(lt){return arguments.length?Qe(Me,Ce,Be,Ne=+lt):Ne},Je.scale(180.739)}function Sa(Me,Ce,Be,Ne,Qe,Je,lt,Gt,Zt,Nt,Kt){if(Kt.nanEncountered)return NaN;var ur,Sr,Br,ln,wn,In,gi,Bi,mi,ia;if(ur=Be-Ce,Sr=Me(Ce+ur*.25),Br=Me(Be-ur*.25),isNaN(Sr)){Kt.nanEncountered=!0;return}if(isNaN(Br)){Kt.nanEncountered=!0;return}return ln=ur*(Ne+4*Sr+Qe)/12,wn=ur*(Qe+4*Br+Je)/12,In=ln+wn,ia=(In-lt)/15,Nt>Zt?(Kt.maxDepthCount++,In+ia):Math.abs(ia)>1;do Zt[In]>Br?wn=In:ln=In,In=ln+wn>>1;while(In>ln);var gi=Zt[In+1]-Zt[In];return gi&&(gi=(Br-Zt[In+1])/gi),(In+1+gi)/lt}var ur=2*Kt(1)/k*Je/Be,Sr=function(Br,ln){var wn=Kt(n(x(ln))),In=Ne(wn)*Br;return wn/=ur,[In,ln>=0?wn:-wn]};return Sr.invert=function(Br,ln){var wn;return ln*=ur,n(ln)<1&&(wn=p(ln)*R(Qe(n(ln))*Je)),[Br/Ne(n(ln)),wn]},Sr}function Ca(){var Me=0,Ce=2.5,Be=1.183136,Ne=t.geoProjectionMutator(Ps),Qe=Ne(Me,Ce,Be);return Qe.alpha=function(Je){return arguments.length?Ne(Me=+Je,Ce,Be):Me},Qe.k=function(Je){return arguments.length?Ne(Me,Ce=+Je,Be):Ce},Qe.gamma=function(Je){return arguments.length?Ne(Me,Ce,Be=+Je):Be},Qe.scale(152.63)}function Pl(Me,Ce){return n(Me[0]-Ce[0])=0;--Zt)Be=Me[1][Zt],Ne=Be[0][0],Qe=Be[0][1],Je=Be[1][1],lt=Be[2][0],Gt=Be[2][1],Ce.push(ll([[lt-y,Gt-y],[lt-y,Je+y],[Ne+y,Je+y],[Ne+y,Qe-y]],30));return{type:"Polygon",coordinates:[r.merge(Ce)]}}function lu(Me,Ce,Be){var Ne,Qe;function Je(Zt,Nt){for(var Kt=Nt<0?-1:1,ur=Ce[+(Nt<0)],Sr=0,Br=ur.length-1;Srur[Sr][2][0];++Sr);var ln=Me(Zt-ur[Sr][1][0],Nt);return ln[0]+=Me(ur[Sr][1][0],Kt*Nt>Kt*ur[Sr][0][1]?ur[Sr][0][1]:Nt)[0],ln}Be?Je.invert=Be(Je):Me.invert&&(Je.invert=function(Zt,Nt){for(var Kt=Qe[+(Nt<0)],ur=Ce[+(Nt<0)],Sr=0,Br=Kt.length;Srln&&(wn=Br,Br=ln,ln=wn),[[ur,Br],[Sr,ln]]})}),lt):Ce.map(function(Nt){return Nt.map(function(Kt){return[[Kt[0][0]*F,Kt[0][1]*F],[Kt[1][0]*F,Kt[1][1]*F],[Kt[2][0]*F,Kt[2][1]*F]]})})},Ce!=null&<.lobes(Ce),lt}var Mf=[[[[-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 Bd(){return lu(Ve,Mf).scale(160.857)}var Hu=[[[[-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 Sf(){return lu(_u,Hu).scale(152.63)}var kc=[[[[-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 Uo(){return lu(we,kc).scale(169.529)}var ns=[[[[-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 Ks(){return lu(we,ns).scale(169.529).rotate([20,0])}var Ef=[[[[-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 ju(){return lu($s,Ef,Oe).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var gs=[[[[-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 bu(){return lu(tt,gs).scale(152.63).rotate([-20,0])}function kf(Me,Ce){return[3/m*Me*O(k*k/3-Ce*Ce),Ce]}kf.invert=function(Me,Ce){return[m/3*Me/O(k*k/3-Ce*Ce),Ce]};function ah(){return t.geoProjection(kf).scale(158.837)}function Od(Me){function Ce(Be,Ne){if(n(n(Ne)-S)2)return null;Be/=2,Ne/=2;var Je=Be*Be,lt=Ne*Ne,Gt=2*Ne/(1+Je+lt);return Gt=v((1+Gt)/(1-Gt),1/Me),[i(2*Be,1-Je-lt)/Me,R((Gt-1)/(Gt+1))]},Ce}function Qc(){var Me=.5,Ce=t.geoProjectionMutator(Od),Be=Ce(Me);return Be.spacing=function(Ne){return arguments.length?Ce(Me=+Ne):Me},Be.scale(124.75)}var uu=k/A;function oh(Me,Ce){return[Me*(1+O(o(Ce)))/2,Ce/(o(Ce/2)*o(Me/6))]}oh.invert=function(Me,Ce){var Be=n(Me),Ne=n(Ce),Qe=y,Je=S;Ney||n(In)>y)&&--Qe>0);return Qe&&[Be,Ne]};function Yo(){return t.geoProjection(Fl).scale(139.98)}function Ro(Me,Ce){return[x(Me)/o(Ce),_(Ce)*o(Me)]}Ro.invert=function(Me,Ce){var Be=Me*Me,Ne=Ce*Ce,Qe=Ne+1,Je=Be+Qe,lt=Me?w*O((Je-O(Je*Je-4*Be))/Be):1/O(Qe);return[R(Me*lt),p(Ce)*B(lt)]};function is(){return t.geoProjection(Ro).scale(144.049).clipAngle(90-.001)}function Dl(Me){var Ce=o(Me),Be=_(L+Me/2);function Ne(Qe,Je){var lt=Je-Me,Gt=n(lt)=0;)Kt=Me[Nt],ur=Kt[0]+Gt*(Br=ur)-Zt*Sr,Sr=Kt[1]+Gt*Sr+Zt*Br;return ur=Gt*(Br=ur)-Zt*Sr,Sr=Gt*Sr+Zt*Br,[ur,Sr]}return Be.invert=function(Ne,Qe){var Je=20,lt=Ne,Gt=Qe;do{for(var Zt=Ce,Nt=Me[Zt],Kt=Nt[0],ur=Nt[1],Sr=0,Br=0,ln;--Zt>=0;)Nt=Me[Zt],Sr=Kt+lt*(ln=Sr)-Gt*Br,Br=ur+lt*Br+Gt*ln,Kt=Nt[0]+lt*(ln=Kt)-Gt*ur,ur=Nt[1]+lt*ur+Gt*ln;Sr=Kt+lt*(ln=Sr)-Gt*Br,Br=ur+lt*Br+Gt*ln,Kt=lt*(ln=Kt)-Gt*ur-Ne,ur=lt*ur+Gt*ln-Qe;var wn=Sr*Sr+Br*Br,In,gi;lt-=In=(Kt*Sr+ur*Br)/wn,Gt-=gi=(ur*Sr-Kt*Br)/wn}while(n(In)+n(gi)>y*y&&--Je>0);if(Je){var Bi=O(lt*lt+Gt*Gt),mi=2*a(Bi*.5),ia=x(mi);return[i(lt*ia,Bi*o(mi)),Bi?R(Gt*ia/Bi):0]}},Be}var Y0=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Nd=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Cf=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Vo=[[.9245,0],[0,0],[.01943,0]],Ud=[[.721316,0],[0,0],[-.00881625,-.00617325]];function zh(){return vc(Y0,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function tf(){return vc(Nd,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Vd(){return vc(Cf,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function rf(){return vc(Vo,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function qh(){return vc(Ud,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function vc(Me,Ce){var Be=t.geoProjection(sh(Me)).rotate(Ce).clipAngle(90),Ne=t.geoRotation(Ce),Qe=Be.center;return delete Be.rotate,Be.center=function(Je){return arguments.length?Qe(Ne(Je)):Ne.invert(Qe())},Be}var dd=O(6),Bh=O(7);function Wu(Me,Ce){var Be=R(7*x(Ce)/(3*dd));return[dd*Me*(2*o(2*Be/3)-1)/Bh,9*x(Be/3)/Bh]}Wu.invert=function(Me,Ce){var Be=3*R(Ce*Bh/9);return[Me*Bh/(dd*(2*o(2*Be/3)-1)),R(x(Be)*3*dd/7)]};function vd(){return t.geoProjection(Wu).scale(164.859)}function pd(Me,Ce){for(var Be=(1+w)*x(Ce),Ne=Ce,Qe=0,Je;Qe<25&&(Ne-=Je=(x(Ne/2)+x(Ne)-Be)/(.5*o(Ne/2)+o(Ne)),!(n(Je)C&&--Ne>0);return Je=Be*Be,lt=Je*Je,Gt=Je*lt,[Me/(.84719-.13063*Je+Gt*Gt*(-.04515+.05494*Je-.02326*lt+.00331*Gt)),Be]};function gd(){return t.geoProjection(af).scale(175.295)}function Rl(Me,Ce){return[Me*(1+o(Ce))/2,2*(Ce-_(Ce/2))]}Rl.invert=function(Me,Ce){for(var Be=Ce/2,Ne=0,Qe=1/0;Ne<10&&n(Qe)>y;++Ne){var Je=o(Ce/2);Ce-=Qe=(Ce-_(Ce/2)-Be)/(1-.5/(Je*Je))}return[2*Me/(1+o(Ce)),Ce]};function ch(){return t.geoProjection(Rl).scale(152.63)}var Lc=[[[[-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 md(){return lu(De(1/0),Lc).rotate([20,0]).scale(152.63)}function yd(Me,Ce){var Be=x(Ce),Ne=o(Ce),Qe=p(Me);if(Me===0||n(Ce)===S)return[0,Ce];if(Ce===0)return[Me,0];if(n(Me)===S)return[Me*Ne,S*Be];var Je=k/(2*Me)-2*Me/k,lt=2*Ce/k,Gt=(1-lt*lt)/(Be-lt),Zt=Je*Je,Nt=Gt*Gt,Kt=1+Zt/Nt,ur=1+Nt/Zt,Sr=(Je*Be/Gt-Je/2)/Kt,Br=(Nt*Be/Zt+Gt/2)/ur,ln=Sr*Sr+Ne*Ne/Kt,wn=Br*Br-(Nt*Be*Be/Zt+Gt*Be-1)/ur;return[S*(Sr+O(ln)*Qe),S*(Br+O(wn<0?0:wn)*p(-Ce*Je)*Qe)]}yd.invert=function(Me,Ce){Me/=S,Ce/=S;var Be=Me*Me,Ne=Ce*Ce,Qe=Be+Ne,Je=k*k;return[Me?(Qe-1+O((1-Qe)*(1-Qe)+4*Be))/(2*Me)*S:0,it(function(lt){return Qe*(k*x(lt)-2*lt)*k+4*lt*lt*(Ce-x(lt))+2*k*lt-Je*Ce},0)]};function Lf(){return t.geoProjection(yd).scale(127.267)}var wu=1.0148,fh=.23185,Oh=-.14499,hh=.02406,Gd=wu,Gl=5*fh,wl=7*Oh,xd=9*hh,Hl=1.790857183;function _d(Me,Ce){var Be=Ce*Ce;return[Me,Ce*(wu+Be*Be*(fh+Be*(Oh+hh*Be)))]}_d.invert=function(Me,Ce){Ce>Hl?Ce=Hl:Ce<-Hl&&(Ce=-Hl);var Be=Ce,Ne;do{var Qe=Be*Be;Be-=Ne=(Be*(wu+Qe*Qe*(fh+Qe*(Oh+hh*Qe)))-Ce)/(Gd+Qe*Qe*(Gl+Qe*(wl+xd*Qe)))}while(n(Ne)>y);return[Me,Be]};function dh(){return t.geoProjection(_d).scale(139.319)}function Pf(Me,Ce){if(n(Ce)y&&--Qe>0);return lt=_(Ne),[(n(Ce)=0;)if(Ne=Ce[Gt],Be[0]===Ne[0]&&Be[1]===Ne[1]){if(Je)return[Je,Be];Je=Be}}}function Uh(Me){for(var Ce=Me.length,Be=[],Ne=Me[Ce-1],Qe=0;Qe0?[-Ne[0],0]:[180-Ne[0],180])};var Ce=pc.map(function(Be){return{face:Be,project:Me(Be)}});return[-1,0,0,1,0,1,4,5].forEach(function(Be,Ne){var Qe=Ce[Be];Qe&&(Qe.children||(Qe.children=[])).push(Ce[Ne])}),Yu(Ce[0],function(Be,Ne){return Ce[Be<-k/2?Ne<0?6:4:Be<0?Ne<0?2:0:BeNe^Br>Ne&&Be<(Sr-Nt)*(Ne-Kt)/(Br-Kt)+Nt&&(Qe=!Qe)}return Qe}function wd(Me,Ce){var Be=Ce.stream,Ne;if(!Be)throw new Error("invalid projection");switch(Me&&Me.type){case"Feature":Ne=X0;break;case"FeatureCollection":Ne=Hh;break;default:Ne=Td;break}return Ne(Me,Be)}function Hh(Me,Ce){return{type:"FeatureCollection",features:Me.features.map(function(Be){return X0(Be,Ce)})}}function X0(Me,Ce){return{type:"Feature",id:Me.id,properties:Me.properties,geometry:Td(Me.geometry,Ce)}}function y0(Me,Ce){return{type:"GeometryCollection",geometries:Me.geometries.map(function(Be){return Td(Be,Ce)})}}function Td(Me,Ce){if(!Me)return null;if(Me.type==="GeometryCollection")return y0(Me,Ce);var Be;switch(Me.type){case"Point":Be=If;break;case"MultiPoint":Be=If;break;case"LineString":Be=vh;break;case"MultiLineString":Be=vh;break;case"Polygon":Be=zf;break;case"MultiPolygon":Be=zf;break;case"Sphere":Be=zf;break;default:return null}return t.geoStream(Me,Ce(Be)),Be.result()}var ul=[],Wl=[],If={point:function(Me,Ce){ul.push([Me,Ce])},result:function(){var Me=ul.length?ul.length<2?{type:"Point",coordinates:ul[0]}:{type:"MultiPoint",coordinates:ul}:null;return ul=[],Me}},vh={lineStart:La,point:function(Me,Ce){ul.push([Me,Ce])},lineEnd:function(){ul.length&&(Wl.push(ul),ul=[])},result:function(){var Me=Wl.length?Wl.length<2?{type:"LineString",coordinates:Wl[0]}:{type:"MultiLineString",coordinates:Wl}:null;return Wl=[],Me}},zf={polygonStart:La,lineStart:La,point:function(Me,Ce){ul.push([Me,Ce])},lineEnd:function(){var Me=ul.length;if(Me){do ul.push(ul[0].slice());while(++Me<4);Wl.push(ul),ul=[]}},polygonEnd:La,result:function(){if(!Wl.length)return null;var Me=[],Ce=[];return Wl.forEach(function(Be){Rf(Be)?Me.push([Be]):Ce.push(Be)}),Ce.forEach(function(Be){var Ne=Be[0];Me.some(function(Qe){if(m0(Qe[0],Ne))return Qe.push(Be),!0})||Me.push([Be])}),Wl=[],Me.length?Me.length>1?{type:"MultiPolygon",coordinates:Me}:{type:"Polygon",coordinates:Me[0]}:null}};function qf(Me){var Ce=Me(S,0)[0]-Me(-S,0)[0];function Be(Ne,Qe){var Je=n(Ne)0?Ne-k:Ne+k,Qe),Gt=(lt[0]-lt[1])*w,Zt=(lt[0]+lt[1])*w;if(Je)return[Gt,Zt];var Nt=Ce*w,Kt=Gt>0^Zt>0?-1:1;return[Kt*Gt-p(Zt)*Nt,Kt*Zt-p(Gt)*Nt]}return Me.invert&&(Be.invert=function(Ne,Qe){var Je=(Ne+Qe)*w,lt=(Qe-Ne)*w,Gt=n(Je)<.5*Ce&&n(lt)<.5*Ce;if(!Gt){var Zt=Ce*w,Nt=Je>0^lt>0?-1:1,Kt=-Nt*Ne+(lt>0?1:-1)*Zt,ur=-Nt*Qe+(Je>0?1:-1)*Zt;Je=(-Kt-ur)*w,lt=(Kt-ur)*w}var Sr=Me.invert(Je,lt);return Gt||(Sr[0]+=Je>0?k:-k),Sr}),t.geoProjection(Be).rotate([-90,-90,45]).clipAngle(180-.001)}function Ze(){return qf(Yr).scale(176.423)}function yt(){return qf(Za).scale(111.48)}function Wt(Me,Ce){if(!(0<=(Ce=+Ce)&&Ce<=20))throw new Error("invalid digits");function Be(Nt){var Kt=Nt.length,ur=2,Sr=new Array(Kt);for(Sr[0]=+Nt[0].toFixed(Ce),Sr[1]=+Nt[1].toFixed(Ce);ur2||Br[0]!=Kt[0]||Br[1]!=Kt[1])&&(ur.push(Br),Kt=Br)}return ur.length===1&&Nt.length>1&&ur.push(Be(Nt[Nt.length-1])),ur}function Je(Nt){return Nt.map(Qe)}function lt(Nt){if(Nt==null)return Nt;var Kt;switch(Nt.type){case"GeometryCollection":Kt={type:"GeometryCollection",geometries:Nt.geometries.map(lt)};break;case"Point":Kt={type:"Point",coordinates:Be(Nt.coordinates)};break;case"MultiPoint":Kt={type:Nt.type,coordinates:Ne(Nt.coordinates)};break;case"LineString":Kt={type:Nt.type,coordinates:Qe(Nt.coordinates)};break;case"MultiLineString":case"Polygon":Kt={type:Nt.type,coordinates:Je(Nt.coordinates)};break;case"MultiPolygon":Kt={type:"MultiPolygon",coordinates:Nt.coordinates.map(Je)};break;default:return Nt}return Nt.bbox!=null&&(Kt.bbox=Nt.bbox),Kt}function Gt(Nt){var Kt={type:"Feature",properties:Nt.properties,geometry:lt(Nt.geometry)};return Nt.id!=null&&(Kt.id=Nt.id),Nt.bbox!=null&&(Kt.bbox=Nt.bbox),Kt}if(Me!=null)switch(Me.type){case"Feature":return Gt(Me);case"FeatureCollection":{var Zt={type:"FeatureCollection",features:Me.features.map(Gt)};return Me.bbox!=null&&(Zt.bbox=Me.bbox),Zt}default:return lt(Me)}return Me}function zt(Me){var Ce=x(Me);function Be(Ne,Qe){var Je=Ce?_(Ne*Ce/2)/Ce:Ne/2;if(!Qe)return[2*Je,-Me];var lt=2*a(Je*x(Qe)),Gt=1/_(Qe);return[x(lt)*Gt,Qe+(1-o(lt))*Gt-Me]}return Be.invert=function(Ne,Qe){if(n(Qe+=Me)y&&--Gt>0);var Sr=Ne*(Nt=_(lt)),Br=_(n(Qe)0?S:-S)*(Zt+Qe*(Kt-lt)/2+Qe*Qe*(Kt-2*Zt+lt)/2)]}Qr.invert=function(Me,Ce){var Be=Ce/S,Ne=Be*90,Qe=f(18,n(Ne/5)),Je=c(0,l(Qe));do{var lt=Ur[Je][1],Gt=Ur[Je+1][1],Zt=Ur[f(19,Je+2)][1],Nt=Zt-lt,Kt=Zt-2*Gt+lt,ur=2*(n(Be)-Gt)/Nt,Sr=Kt/Nt,Br=ur*(1-Sr*ur*(1-2*Sr*ur));if(Br>=0||Je===1){Ne=(Ce>=0?5:-5)*(Br+Qe);var ln=50,wn;do Qe=f(18,n(Ne)/5),Je=l(Qe),Br=Qe-Je,lt=Ur[Je][1],Gt=Ur[Je+1][1],Zt=Ur[f(19,Je+2)][1],Ne-=(wn=(Ce>=0?S:-S)*(Gt+Br*(Zt-lt)/2+Br*Br*(Zt-2*Gt+lt)/2)-Ce)*F;while(n(wn)>C&&--ln>0);break}}while(--Je>=0);var In=Ur[Je][0],gi=Ur[Je+1][0],Bi=Ur[f(19,Je+2)][0];return[Me/(gi+Br*(Bi-In)/2+Br*Br*(Bi-2*gi+In)/2),Ne*E]};function cn(){return t.geoProjection(Qr).scale(152.63)}function yn(Me){function Ce(Be,Ne){var Qe=o(Ne),Je=(Me-1)/(Me-Qe*o(Be));return[Je*Qe*x(Be),Je*x(Ne)]}return Ce.invert=function(Be,Ne){var Qe=Be*Be+Ne*Ne,Je=O(Qe),lt=(Me-O(1-Qe*(Me+1)/(Me-1)))/((Me-1)/Je+Je/(Me-1));return[i(Be*lt,Je*O(1-lt*lt)),Je?R(Ne*lt/Je):0]},Ce}function Fn(Me,Ce){var Be=yn(Me);if(!Ce)return Be;var Ne=o(Ce),Qe=x(Ce);function Je(lt,Gt){var Zt=Be(lt,Gt),Nt=Zt[1],Kt=Nt*Qe/(Me-1)+Ne;return[Zt[0]*Ne/Kt,Nt/Kt]}return Je.invert=function(lt,Gt){var Zt=(Me-1)/(Me-1-Gt*Qe);return Be.invert(Zt*lt,Zt*Gt*Ne)},Je}function en(){var Me=2,Ce=0,Be=t.geoProjectionMutator(Fn),Ne=Be(Me,Ce);return Ne.distance=function(Qe){return arguments.length?Be(Me=+Qe,Ce):Me},Ne.tilt=function(Qe){return arguments.length?Be(Me,Ce=Qe*E):Ce*F},Ne.scale(432.147).clipAngle(B(1/Me)*F-1e-6)}var vn=1e-4,mn=1e4,Pn=-180,On=Pn+vn,ki=180,Ci=ki-vn,qi=-90,pi=qi+vn,Un=90,Gn=Un-vn;function Zi(Me){return Me.length>0}function na(Me){return Math.floor(Me*mn)/mn}function Ha(Me){return Me===qi||Me===Un?[0,Me]:[Pn,na(Me)]}function Qa(Me){var Ce=Me[0],Be=Me[1],Ne=!1;return Ce<=On?(Ce=Pn,Ne=!0):Ce>=Ci&&(Ce=ki,Ne=!0),Be<=pi?(Be=qi,Ne=!0):Be>=Gn&&(Be=Un,Ne=!0),Ne?[Ce,Be]:Me}function Ya(Me){return Me.map(Qa)}function ho(Me,Ce,Be){for(var Ne=0,Qe=Me.length;Ne=Ci||Kt<=pi||Kt>=Gn){Je[lt]=Qa(Zt);for(var ur=lt+1;urOn&&Brpi&&ln=Gt)break;Be.push({index:-1,polygon:Ce,ring:Je=Je.slice(ur-1)}),Je[0]=Ha(Je[0][1]),lt=-1,Gt=Je.length}}}}function Pa(Me){var Ce,Be=Me.length,Ne={},Qe={},Je,lt,Gt,Zt,Nt;for(Ce=0;Ce0?k-Gt:Gt)*F],Nt=t.geoProjection(Me(lt)).rotate(Zt),Kt=t.geoRotation(Zt),ur=Nt.center;return delete Nt.rotate,Nt.center=function(Sr){return arguments.length?ur(Kt(Sr)):Kt.invert(ur())},Nt.clipAngle(90)}function Qs(Me){var Ce=o(Me);function Be(Ne,Qe){var Je=t.geoGnomonicRaw(Ne,Qe);return Je[0]*=Ce,Je}return Be.invert=function(Ne,Qe){return t.geoGnomonicRaw.invert(Ne/Ce,Qe)},Be}function zl(){return cu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function cu(Me,Ce){return Go(Qs,Me,Ce)}function Zu(Me){if(!(Me*=2))return t.geoAzimuthalEquidistantRaw;var Ce=-Me/2,Be=-Ce,Ne=Me*Me,Qe=_(Be),Je=.5/x(Be);function lt(Gt,Zt){var Nt=B(o(Zt)*o(Gt-Ce)),Kt=B(o(Zt)*o(Gt-Be)),ur=Zt<0?-1:1;return Nt*=Nt,Kt*=Kt,[(Nt-Kt)/(2*Me),ur*O(4*Ne*Kt-(Ne-Nt+Kt)*(Ne-Nt+Kt))/(2*Me)]}return lt.invert=function(Gt,Zt){var Nt=Zt*Zt,Kt=o(O(Nt+(Sr=Gt+Ce)*Sr)),ur=o(O(Nt+(Sr=Gt+Be)*Sr)),Sr,Br;return[i(Br=Kt-ur,Sr=(Kt+ur)*Qe),(Zt<0?-1:1)*B(O(Sr*Sr+Br*Br)*Je)]},lt}function mc(){return Yl([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Yl(Me,Ce){return Go(Zu,Me,Ce)}function lf(Me,Ce){if(n(Ce)y&&--Gt>0);return[p(Me)*(O(Qe*Qe+4)+Qe)*k/4,S*lt]};function Ju(){return t.geoProjection(fu).scale(127.16)}function Qu(Me,Ce,Be,Ne,Qe){function Je(lt,Gt){var Zt=Be*x(Ne*Gt),Nt=O(1-Zt*Zt),Kt=O(2/(1+Nt*o(lt*=Qe)));return[Me*Nt*Kt*x(lt),Ce*Zt*Kt]}return Je.invert=function(lt,Gt){var Zt=lt/Me,Nt=Gt/Ce,Kt=O(Zt*Zt+Nt*Nt),ur=2*R(Kt/2);return[i(lt*_(ur),Me*Kt)/Qe,Kt&&R(Gt*x(ur)/(Ce*Be*Kt))/Ne]},Je}function Wd(Me,Ce,Be,Ne){var Qe=k/3;Me=c(Me,y),Ce=c(Ce,y),Me=f(Me,S),Ce=f(Ce,k-y),Be=c(Be,0),Be=f(Be,100-y),Ne=c(Ne,y);var Je=Be/100+1,lt=Ne/100,Gt=B(Je*o(Qe))/Qe,Zt=x(Me)/x(Gt*S),Nt=Ce/k,Kt=O(lt*x(Me/2)/x(Ce/2)),ur=Kt/O(Nt*Zt*Gt),Sr=1/(Kt*O(Nt*Zt*Gt));return Qu(ur,Sr,Zt,Gt,Nt)}function x0(){var Me=65*E,Ce=60*E,Be=20,Ne=200,Qe=t.geoProjectionMutator(Wd),Je=Qe(Me,Ce,Be,Ne);return Je.poleline=function(lt){return arguments.length?Qe(Me=+lt*E,Ce,Be,Ne):Me*F},Je.parallels=function(lt){return arguments.length?Qe(Me,Ce=+lt*E,Be,Ne):Ce*F},Je.inflation=function(lt){return arguments.length?Qe(Me,Ce,Be=+lt,Ne):Be},Je.ratio=function(lt){return arguments.length?Qe(Me,Ce,Be,Ne=+lt):Ne},Je.scale(163.775)}function Bf(){return x0().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Al=4*k+3*O(3),Xl=2*O(2*k*O(3)/Al),cf=qe(Xl*O(3)/k,Xl,Al/6);function jh(){return t.geoProjection(cf).scale(176.84)}function Wh(Me,Ce){return[Me*O(1-3*Ce*Ce/(k*k)),Ce]}Wh.invert=function(Me,Ce){return[Me/O(1-3*Ce*Ce/(k*k)),Ce]};function Yh(){return t.geoProjection(Wh).scale(152.63)}function hu(Me,Ce){var Be=o(Ce),Ne=o(Me)*Be,Qe=1-Ne,Je=o(Me=i(x(Me)*Be,-x(Ce))),lt=x(Me);return Be=O(1-Ne*Ne),[lt*Be-Je*Qe,-Je*Be-lt*Qe]}hu.invert=function(Me,Ce){var Be=(Me*Me+Ce*Ce)/-2,Ne=O(-Be*(2+Be)),Qe=Ce*Be+Me*Ne,Je=Me*Be-Ce*Ne,lt=O(Je*Je+Qe*Qe);return[i(Ne*Qe,lt*(1+Be)),lt?-R(Ne*Je/lt):0]};function Mu(){return t.geoProjection(hu).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function _i(Me,Ce){var Be=ye(Me,Ce);return[(Be[0]+Me/S)/2,(Be[1]+Ce)/2]}_i.invert=function(Me,Ce){var Be=Me,Ne=Ce,Qe=25;do{var Je=o(Ne),lt=x(Ne),Gt=x(2*Ne),Zt=lt*lt,Nt=Je*Je,Kt=x(Be),ur=o(Be/2),Sr=x(Be/2),Br=Sr*Sr,ln=1-Nt*ur*ur,wn=ln?B(Je*ur)*O(In=1/ln):In=0,In,gi=.5*(2*wn*Je*Sr+Be/S)-Me,Bi=.5*(wn*lt+Ne)-Ce,mi=.5*In*(Nt*Br+wn*Je*ur*Zt)+.5/S,ia=In*(Kt*Gt/4-wn*lt*Sr),ua=.125*In*(Gt*Sr-wn*lt*Nt*Kt),lo=.5*In*(Zt*ur+wn*Br*Je)+.5,Bo=ia*ua-lo*mi,Ua=(Bi*ia-gi*lo)/Bo,ls=(gi*ua-Bi*mi)/Bo;Be-=Ua,Ne-=ls}while((n(Ua)>y||n(ls)>y)&&--Qe>0);return[Be,Ne]};function Su(){return t.geoProjection(_i).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=ce,e.geoAiryRaw=ee,e.geoAitoff=xe,e.geoAitoffRaw=ye,e.geoArmadillo=K,e.geoArmadilloRaw=ue,e.geoAugust=ne,e.geoAugustRaw=_e,e.geoBaker=le,e.geoBakerRaw=ie,e.geoBerghaus=be,e.geoBerghausRaw=me,e.geoBertin1953=ct,e.geoBertin1953Raw=ze,e.geoBoggs=$e,e.geoBoggsRaw=Ve,e.geoBonne=mt,e.geoBonneRaw=We,e.geoBottomley=Yt,e.geoBottomleyRaw=bt,e.geoBromley=mr,e.geoBromleyRaw=jt,e.geoChamberlin=Tt,e.geoChamberlinRaw=cr,e.geoChamberlinAfrica=wt,e.geoCollignon=Lt,e.geoCollignonRaw=Mt,e.geoCraig=kt,e.geoCraigRaw=ft,e.geoCraster=Kr,e.geoCrasterRaw=pr,e.geoCylindricalEqualArea=dn,e.geoCylindricalEqualAreaRaw=Nr,e.geoCylindricalStereographic=Fr,e.geoCylindricalStereographicRaw=xr,e.geoEckert1=Cn,e.geoEckert1Raw=Zr,e.geoEckert2=At,e.geoEckert2Raw=Dt,e.geoEckert3=Qt,e.geoEckert3Raw=Vt,e.geoEckert4=_r,e.geoEckert4Raw=Ut,e.geoEckert5=Jr,e.geoEckert5Raw=rn,e.geoEckert6=ri,e.geoEckert6Raw=qn,e.geoEisenlohr=Vi,e.geoEisenlohrRaw=Ii,e.geoFahey=va,e.geoFaheyRaw=ha,e.geoFoucaut=oa,e.geoFoucautRaw=Xi,e.geoFoucautSinusoidal=Ga,e.geoFoucautSinusoidalRaw=Ma,e.geoGilbert=sl,e.geoGingery=bl,e.geoGingeryRaw=Eo,e.geoGinzburg4=su,e.geoGinzburg4Raw=Zs,e.geoGinzburg5=Af,e.geoGinzburg5Raw=fc,e.geoGinzburg6=Jt,e.geoGinzburg6Raw=ut,e.geoGinzburg8=wr,e.geoGinzburg8Raw=er,e.geoGinzburg9=Dr,e.geoGinzburg9Raw=nn,e.geoGringorten=Qn,e.geoGringortenRaw=Yr,e.geoGuyou=$a,e.geoGuyouRaw=Za,e.geoHammer=ht,e.geoHammerRaw=De,e.geoHammerRetroazimuthal=Ni,e.geoHammerRetroazimuthalRaw=Ka,e.geoHealpix=As,e.geoHealpixRaw=so,e.geoHill=xu,e.geoHillRaw=Ms,e.geoHomolosine=Gu,e.geoHomolosineRaw=_u,e.geoHufnagel=ps,e.geoHufnagelRaw=Ja,e.geoHyperelliptical=Ca,e.geoHyperellipticalRaw=Ps,e.geoInterrupt=lu,e.geoInterruptedBoggs=Bd,e.geoInterruptedHomolosine=Sf,e.geoInterruptedMollweide=Uo,e.geoInterruptedMollweideHemispheres=Ks,e.geoInterruptedSinuMollweide=ju,e.geoInterruptedSinusoidal=bu,e.geoKavrayskiy7=ah,e.geoKavrayskiy7Raw=kf,e.geoLagrange=Qc,e.geoLagrangeRaw=Od,e.geoLarrivee=hc,e.geoLarriveeRaw=oh,e.geoLaskowski=Yo,e.geoLaskowskiRaw=Fl,e.geoLittrow=is,e.geoLittrowRaw=Ro,e.geoLoximuthal=dc,e.geoLoximuthalRaw=Dl,e.geoMiller=Cc,e.geoMillerRaw=ef,e.geoModifiedStereographic=vc,e.geoModifiedStereographicRaw=sh,e.geoModifiedStereographicAlaska=zh,e.geoModifiedStereographicGs48=tf,e.geoModifiedStereographicGs50=Vd,e.geoModifiedStereographicMiller=rf,e.geoModifiedStereographicLee=qh,e.geoMollweide=Le,e.geoMollweideRaw=we,e.geoMtFlatPolarParabolic=vd,e.geoMtFlatPolarParabolicRaw=Wu,e.geoMtFlatPolarQuartic=lh,e.geoMtFlatPolarQuarticRaw=pd,e.geoMtFlatPolarSinusoidal=uh,e.geoMtFlatPolarSinusoidalRaw=nf,e.geoNaturalEarth2=gd,e.geoNaturalEarth2Raw=af,e.geoNellHammer=ch,e.geoNellHammerRaw=Rl,e.geoInterruptedQuarticAuthalic=md,e.geoNicolosi=Lf,e.geoNicolosiRaw=yd,e.geoPatterson=dh,e.geoPattersonRaw=_d,e.geoPolyconic=Hd,e.geoPolyconicRaw=Pf,e.geoPolyhedral=Yu,e.geoPolyhedralButterfly=gc,e.geoPolyhedralCollignon=bd,e.geoPolyhedralWaterman=Gh,e.geoProject=wd,e.geoGringortenQuincuncial=Ze,e.geoPeirceQuincuncial=yt,e.geoPierceQuincuncial=yt,e.geoQuantize=Wt,e.geoQuincuncial=qf,e.geoRectangularPolyconic=hr,e.geoRectangularPolyconicRaw=zt,e.geoRobinson=cn,e.geoRobinsonRaw=Qr,e.geoSatellite=en,e.geoSatelliteRaw=Fn,e.geoSinuMollweide=Kc,e.geoSinuMollweideRaw=$s,e.geoSinusoidal=nt,e.geoSinusoidalRaw=tt,e.geoStitch=Io,e.geoTimes=ro,e.geoTimesRaw=oi,e.geoTwoPointAzimuthal=cu,e.geoTwoPointAzimuthalRaw=Qs,e.geoTwoPointAzimuthalUsa=zl,e.geoTwoPointEquidistant=Yl,e.geoTwoPointEquidistantRaw=Zu,e.geoTwoPointEquidistantUsa=mc,e.geoVanDerGrinten=$u,e.geoVanDerGrintenRaw=lf,e.geoVanDerGrinten2=gh,e.geoVanDerGrinten2Raw=ph,e.geoVanDerGrinten3=Ku,e.geoVanDerGrinten3Raw=uf,e.geoVanDerGrinten4=Ju,e.geoVanDerGrinten4Raw=fu,e.geoWagner=x0,e.geoWagner7=Bf,e.geoWagnerRaw=Wd,e.geoWagner4=jh,e.geoWagner4Raw=cf,e.geoWagner6=Yh,e.geoWagner6Raw=Wh,e.geoWiechel=Mu,e.geoWiechelRaw=hu,e.geoWinkel3=Su,e.geoWinkel3Raw=_i,Object.defineProperty(e,"__esModule",{value:!0})}))});var fze=fe((l5r,cze)=>{"use strict";var iu=xi(),BX=Xt(),LHt=bi(),o5=Math.PI/180,o_=180/Math.PI,NX={cursor:"pointer"},UX={cursor:"auto"};function PHt(e,t){var r=e.projection,n;return t._isScoped?n=FHt:t._isClipped?n=RHt:n=DHt,n(e,r)}cze.exports=PHt;function VX(e,t){return iu.behavior.zoom().translate(t.translate()).scaleExtent(t.scaleExtent()).scale(t.scale())}function GX(e,t,r){var n=e.id,a=e.graphDiv,i=a.layout,o=i[n],s=a._fullLayout,l=s[n],u={},c={};function f(v,g){u[n+"."+v]=BX.nestedProperty(o,v).get(),LHt.call("_storeDirectGUIEdit",i,s._preGUI,u);var p=BX.nestedProperty(l,v);p.get()!==g&&(p.set(g),BX.nestedProperty(o,v).set(g),c[n+"."+v]=g)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),a.emit("plotly_relayout",c)}function FHt(e,t){var r=VX(e,t);function n(){iu.select(this).style(NX)}function a(){t.scale(iu.event.scale).translate(iu.event.translate),e.render(!0);var s=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":s[0],"geo.center.lat":s[1]})}function i(s){var l=t.invert(e.midPt);s("center.lon",l[0]),s("center.lat",l[1])}function o(){iu.select(this).style(UX),GX(e,t,i)}return r.on("zoomstart",n).on("zoom",a).on("zoomend",o),r}function DHt(e,t){var r=VX(e,t),n=2,a,i,o,s,l,u,c,f,v;function g(k){return t.invert(k)}function p(k){var S=g(k);if(!S)return!0;var L=t(S);return Math.abs(L[0]-k[0])>n||Math.abs(L[1]-k[1])>n}function x(){iu.select(this).style(NX);let{x:k,y:S,width:L,height:w}=this.getBBox();a=iu.event.sourceEvent?iu.mouse(this):[k+L/2,S+w/2],i=t.rotate(),o=t.translate(),s=i,l=g(a)}function _(){let{x:k,y:S,width:L,height:w}=this.getBBox();if(u=iu.event.sourceEvent?iu.mouse(this):[k+L/2,S+w/2],p(a)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(iu.event.scale),t.translate([o[0],iu.event.translate[1]]),l?g(u)&&(f=g(u),c=[s[0]+(f[0]-l[0]),i[1],i[2]],t.rotate(c),s=c):(a=u,l=g(a)),v=!0,e.render(!0);var A=t.rotate(),T=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":T[0],"geo.center.lat":T[1],"geo.projection.rotation.lon":-A[0]})}function y(){iu.select(this).style(UX),v&&GX(e,t,C)}function C(k){var S=t.rotate(),L=t.invert(e.midPt);k("projection.rotation.lon",-S[0]),k("center.lon",L[0]),k("center.lat",L[1])}return r.on("zoomstart",x).on("zoom",_).on("zoomend",y),r}function RHt(e,t){var r={r:t.rotate(),k:t.scale()},n=VX(e,t),a=VHt(n,"zoomstart","zoom","zoomend"),i=0,o=n.on,s;n.on("zoomstart",function(){iu.select(this).style(NX);let{x:v,y:g,width:p,height:x}=this.getBBox(),_=iu.event.sourceEvent?iu.mouse(this):[v+p/2,g+x/2],y=t.rotate(),C=y,k=t.translate(),S=IHt(y);s=jP(t,_),o.call(n,"zoom",function(){let{x:L,y:w,width:A,height:T}=this.getBBox(),m=iu.event.sourceEvent?iu.mouse(this):[L+A/2,w+T/2];if(t.scale(r.k=iu.event.scale),!s)_=m,s=jP(t,_);else if(jP(t,m)){t.rotate(y).translate(k);var F=jP(t,m),E=qHt(s,F),I=OHt(zHt(S,E)),R=r.r=BHt(I,s,C);(!isFinite(R[0])||!isFinite(R[1])||!isFinite(R[2]))&&(R=C),t.rotate(R),C=R}u(a.of(this,arguments))}),l(a.of(this,arguments))}).on("zoomend",function(){iu.select(this).style(UX),o.call(n,"zoom",null),c(a.of(this,arguments)),GX(e,t,f)}).on("zoom.redraw",function(){e.render(!0);var v=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-v[0],"geo.projection.rotation.lat":-v[1]})});function l(v){i++||v({type:"zoomstart"})}function u(v){v({type:"zoom"})}function c(v){--i||v({type:"zoomend"})}function f(v){var g=t.rotate();v("projection.rotation.lon",-g[0]),v("projection.rotation.lat",-g[1])}return iu.rebind(n,a,"on")}function jP(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&NHt(r)}function IHt(e){var t=.5*e[0]*o5,r=.5*e[1]*o5,n=.5*e[2]*o5,a=Math.sin(t),i=Math.cos(t),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[i*s*u+a*o*l,a*s*u-i*o*l,i*o*u+a*s*l,i*s*l-a*o*u]}function zHt(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=t[0],s=t[1],l=t[2],u=t[3];return[r*o-n*s-a*l-i*u,r*s+n*o+a*u-i*l,r*l-n*u+a*o+i*s,r*u+n*l-a*s+i*o]}function qHt(e,t){if(!(!e||!t)){var r=UHt(e,t),n=Math.sqrt(uze(r,r)),a=.5*Math.acos(Math.max(-1,Math.min(1,uze(e,t)))),i=Math.sin(a)/n;return n&&[Math.cos(a),r[2]*i,-r[1]*i,r[0]*i]}}function BHt(e,t,r){var n=OX(t,2,e[0]);n=OX(n,1,e[1]),n=OX(n,0,e[2]-r[2]);var a=t[0],i=t[1],o=t[2],s=n[0],l=n[1],u=n[2],c=Math.atan2(i,a)*o_,f=Math.sqrt(a*a+i*i),v,g;Math.abs(l)>f?(g=(l>0?90:-90)-c,v=0):(g=Math.asin(l/f)*o_-c,v=Math.sqrt(f*f-l*l));var p=180-g-2*c,x=(Math.atan2(u,s)-Math.atan2(o,v))*o_,_=(Math.atan2(u,s)-Math.atan2(o,-v))*o_,y=sze(r[0],r[1],g,x),C=sze(r[0],r[1],p,_);return y<=C?[g,x,r[2]]:[p,_,r[2]]}function sze(e,t,r,n){var a=lze(r-e),i=lze(n-t);return Math.sqrt(a*a+i*i)}function lze(e){return(e%360+540)%360-180}function OX(e,t,r){var n=r*o5,a=e.slice(),i=t===0?1:0,o=t===2?1:2,s=Math.cos(n),l=Math.sin(n);return a[i]=e[i]*s-e[o]*l,a[o]=e[o]*s+e[i]*l,a}function OHt(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*o_,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*o_,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*o_]}function NHt(e){var t=e[0]*o5,r=e[1]*o5,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function uze(e,t){for(var r=0,n=0,a=e.length;n{"use strict";var M1=xi(),WX=qP(),GHt=WX.geoPath,HHt=WX.geoDistance,jHt=oze(),WHt=bi(),vM=Xt(),YHt=vM.strTranslate,WP=ni(),dM=ea(),hze=kl(),XHt=Hs(),jX=Yi(),{concatExtremes:ZHt,getAutoRange:dze,makePadFn:vze}=rp(),HX=ed(),$Ht=Ac().prepSelect,KHt=Ac().clearOutline,JHt=Ac().selectOnClick,QHt=fze(),Id=lM(),YX=Cg(),{unwrapLonRange:ejt}=YX,gze=EP(),tjt=yX().feature;function mze(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var Lp=mze.prototype;yze.exports=function(t){return new mze(t)};Lp.plot=function(e,t,r,n){var a=this;if(n)return a.update(e,t,!0);a._geoCalcData=e,a._fullLayout=t;var i=t[this.id],o=[],s=!1;for(var l in Id.layerNameToAdjective)if(l!=="frame"&&i["show"+l]){s=!0;break}for(var u=!1,c=0;c0&&o._module.calcGeoJSON(i,t)}if(!r){var s=this.updateProjection(e,t);if(s)return;(!this.viewInitial||this.scope!==n.scope)&&this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),XHt.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var l=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=l.selectAll(".point"),this.dataPoints.text=l.selectAll("text"),this.dataPaths.line=l.selectAll(".js-line");var u=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=u.selectAll("path"),this._render()};Lp.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],a=t._size,i=n.domain,o=n.projection,s=n.lonaxis,l=n.lataxis,u=s._ax,c=l._ax,f=this.projection=rjt(n),v=[[a.l+a.w*i.x[0],a.t+a.h*(1-i.y[1])],[a.l+a.w*i.x[1],a.t+a.h*(1-i.y[0])]],g=n.center||{},p=o.rotation||{},x=s.range||[],_=l.range||[];if(n.fitbounds){u._length=v[1][0]-v[0][0],c._length=v[1][1]-v[0][1],u.range=dze(r,u),c.range=dze(r,c);let O=[];for(let ue of e){let K=ue[0].trace;K.visible===!0&&K._module.fitCoords&&O.push(K._module.fitCoords(ue,n))}let V=ZHt(r,u),j=V.min.reduce((ue,{val:K})=>Math.min(ue,K),1/0),U=V.max.reduce((ue,{val:K})=>Math.max(ue,K),-1/0)-j,J=YX.boundsOfCoords(O.flat()),[ee,,ce]=J||[],ye=ce-ee;if(!!J&&(U>360||U<360&&yeMath.max(le,ue(me)),0),ne=V.max.reduce((le,me)=>Math.max(le,K(me)),0),ae=u._length-_e-ne,pe=ae>u._length/10?ye*u._length/ae:ye,ie=(ee+ce)/2;u.range=[ie-pe/2,ie+pe/2]}var y=(u.range[0]+u.range[1])/2,C=(c.range[0]+c.range[1])/2;if(n._isScoped)g={lon:y,lat:C};else if(n._isClipped){g={lon:y,lat:C},p={lon:y,lat:C,roll:p.roll};var k=o.type,S=Id.lonaxisSpan[k]/2||180,L=Id.lataxisSpan[k]/2||90;x=[y-S,y+S],_=[C-L,C+L]}else g={lon:y,lat:C},p={lon:y,lat:p.lat,roll:p.roll}}f.center([g.lon-p.lon,g.lat-p.lat]).rotate([-p.lon,-p.lat,p.roll]).parallels(o.parallels);var w=pze(x,_);f.fitExtent(v,w);var A=this.bounds=f.getBounds(w),T=this.fitScale=f.scale(),m=f.translate();if(f.scaleExtent=()=>{var j;let{minscale:O}=o,V=(j=o.maxscale)!=null?j:1/0;return[T*Math.min(O,V),T*Math.max(O,V)]},n.fitbounds){var F=f.getBounds(pze(u.range,c.range)),E=Math.min((A[1][0]-A[0][0])/(F[1][0]-F[0][0]),(A[1][1]-A[0][1])/(F[1][1]-F[0][1]));isFinite(E)?f.scale(E*T):vM.warn("Something went wrong during"+this.id+"fitbounds computations.")}else f.scale(o.scale*T);var I=this.midPt=[(A[0][0]+A[1][0])/2,(A[0][1]+A[1][1])/2];if(f.translate([m[0]+(I[0]-m[0]),m[1]+(I[1]-m[1])]).clipExtent(A),n._isAlbersUsa){var R=f([g.lon,g.lat]);if(R){var B=f.translate();f.translate([B[0]-(R[0]-B[0]),B[1]-(R[1]-B[1])])}}};Lp.updateBaseLayers=function(e,t){var r=this,n=r.topojson,a=r.layers,i=r.basePaths;function o(v){return v==="lonaxis"||v==="lataxis"}function s(v){return!!Id.lineLayers[v]}function l(v){return!!Id.fillLayers[v]}var u=this.hasChoropleth?Id.layersForChoropleth:Id.layers,c=u.filter(function(v){return s(v)||l(v)?t["show"+v]:o(v)?t[v].showgrid:!0}),f=r.framework.selectAll(".layer").data(c,String);f.exit().each(function(v){delete a[v],delete i[v],M1.select(this).remove()}),f.enter().append("g").attr("class",function(v){return"layer "+v}).each(function(v){var g=a[v]=M1.select(this);v==="bg"?r.bgRect=g.append("rect").style("pointer-events","all"):o(v)?i[v]=g.append("path").style("fill","none"):v==="backplot"?g.append("g").classed("choroplethlayer",!0):v==="frontplot"?g.append("g").classed("scatterlayer",!0):s(v)?i[v]=g.append("path").style("fill","none").style("stroke-miterlimit",2):l(v)&&(i[v]=g.append("path").style("stroke","none"))}),f.order(),f.each(function(v){var g=i[v],p=Id.layerNameToAdjective[v];v==="frame"?g.datum(Id.sphereSVG):s(v)||l(v)?g.datum(tjt(n,n.objects[v])):o(v)&&g.datum(njt(v,t,e)).call(WP.stroke,t[v].gridcolor).call(dM.dashLine,t[v].griddash,t[v].gridwidth),s(v)?g.call(WP.stroke,t[p+"color"]).call(dM.dashLine,"",t[p+"width"]):l(v)&&g.call(WP.fill,t[p+"color"])})};Lp.updateDims=function(e,t){var r=this.bounds,n=(t.framewidth||0)/2,a=r[0][0]-n,i=r[0][1]-n,o=r[1][0]-a+n,s=r[1][1]-i+n;dM.setRect(this.clipRect,a,i,o,s),this.bgRect.call(dM.setRect,a,i,o,s).call(WP.fill,t.bgcolor),this.xaxis._offset=a,this.xaxis._length=o,this.yaxis._offset=i,this.yaxis._length=s};Lp.updateFx=function(e,t){var r=this,n=r.graphDiv,a=r.bgRect,i=e.dragmode,o=e.clickmode;if(r.isStatic)return;function s(){var f=r.viewInitial,v={};for(var g in f)v[r.id+"."+g]=f[g];WHt.call("_guiRelayout",n,v),n.emit("plotly_doubleclick",null)}function l(f){return r.projection.invert([f[0]+r.xaxis._offset,f[1]+r.yaxis._offset])}var u=function(f,v){if(v.isRect){var g=f.range={};g[r.id]=[l([v.xmin,v.ymin]),l([v.xmax,v.ymax])]}else{var p=f.lassoPoints={};p[r.id]=v.map(l)}},c={element:r.bgRect.node(),gd:n,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(f){f===2&&KHt(n)}};if(i==="pan"){a.node().onmousedown=null;let f=QHt(r,t);if(a.call(f),!M1.event){let v=r.projection.scale(),[g,p]=r.projection.scaleExtent();(vp)&&f.event(a)}a.on("dblclick.zoom",s),n._context._scrollZoom.geo||a.on("wheel.zoom",null)}else(i==="select"||i==="lasso")&&(a.on(".zoom",null),c.prepFn=function(f,v,g){$Ht(f,v,g,c,i)},HX.init(c));a.on("mousemove",function(){var f=r.projection.invert(vM.getPositionFromD3Event());if(!f)return HX.unhover(n,M1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},hze.hover(n,M1.event,r.id)}),a.on("mouseout",function(){n._dragging||HX.unhover(n,M1.event)}),a.on("click",function(){i!=="select"&&i!=="lasso"&&(o.indexOf("select")>-1&&JHt(M1.event,n,[r.xaxis],[r.yaxis],r.id,c),o.indexOf("event")>-1&&hze.click(n,M1.event))})};Lp.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,n="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",n),e.clipRect=e.clipDef.append("rect"),e.framework=M1.select(e.container).append("g").attr("class","geo "+e.id).call(dM.setClipUrl,n,t),e.project=function(a){var i=e.projection(a);return i?[i[0]-e.xaxis._offset,i[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(a){return e.project(a)[0]}},e.yaxis={_id:"y",c2p:function(a){return e.project(a)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},jX.setConvert(e.mockAxis,r)};Lp.saveViewInitial=function(e){var t=e.center||{},r=e.projection,n=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":r.scale};var a;e._isScoped?a={"center.lon":t.lon,"center.lat":t.lat}:e._isClipped?a={"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat,"center.lon":t.lon,"center.lat":t.lat}:a={"center.lon":t.lon,"center.lat":t.lat,"projection.rotation.lon":n.lon},vM.extendFlat(this.viewInitial,a)};Lp.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};Lp._render=function(){var e=this.projection,t=e.getPath(),r;function n(i){var o=e(i.lonlat);return o?YHt(o[0],o[1]):null}function a(i){return e.isLonLatOverEdges(i.lonlat)?"none":null}for(r in this.basePaths)this.basePaths[r].attr("d",t);for(r in this.dataPaths)this.dataPaths[r].attr("d",function(i){return t(i.geojson)});for(r in this.dataPoints)this.dataPoints[r].attr("display",a).attr("transform",n)};function rjt(e){var t=e.projection,r=t.type,n=Id.projNames[r];n="geo"+vM.titleCase(n);for(var a=WX[n]||jHt[n],i=a(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?Id.lonaxisSpan[r]/2:null,s=["center","rotate","parallels","clipExtent"],l=function(f){return f?i:[]},u=0;up}else return!1},i.getPath=function(){return GHt().projection(i)},i.getBounds=function(f){return i.getPath().bounds(f)},i.precision(Id.precision),e._isSatellite&&i.tilt(t.tilt).distance(t.distance),o&&i.clipAngle(o-Id.clipPad),i}function njt(e,t,r){var n=1e-6,a=2.5,i=t[e],o=Id.scopeDefaults[t.scope],s,l,u;e==="lonaxis"?(s=o.lonaxisRange,l=o.lataxisRange,u=function(C,k){return[C,k]}):e==="lataxis"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(C,k){return[k,C]});var c={type:"linear",range:[s[0],s[1]-n],tick0:i.tick0,dtick:i.dtick};jX.setConvert(c,r);var f=jX.calcTicks(c);!t.isScoped&&e==="lonaxis"&&f.pop();for(var v=f.length,g=new Array(v),p=0;p{"use strict";var l5=tc(),ijt=nl().attributes,ajt=Uc().dash,s5=lM(),ojt=rl().overrideAll,_ze=(bx(),Gs(_x)).default,bze={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:l5.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:ajt},sjt=wze.exports=ojt({domain:ijt({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:"locations",editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:_ze(s5.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:_ze(s5.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1},minscale:{valType:"number",min:0,dflt:0},maxscale:{valType:"number",min:0,dflt:null}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:l5.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:s5.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:s5.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:s5.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:s5.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:l5.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:l5.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:l5.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:l5.background},lonaxis:bze,lataxis:bze},"plot","from-root");sjt.uirevision={valType:"any",editType:"none"}});var Mze=fe((f5r,Aze)=>{"use strict";var YP=Xt(),ljt=b2(),ujt=jf().getSubplotData,{unwrapLonRange:cjt}=Cg(),pM=lM(),fjt=XX(),Tze=pM.axesNames;Aze.exports=function(t,r,n){ljt(t,r,n,{type:"geo",attributes:fjt,handleDefaults:hjt,fullData:n,partition:"y"})};function hjt(e,t,r,n){var a=ujt(n.fullData,"geo",n.id),i=a.map(function(J){return J.index}),o=r("resolution"),s=r("scope"),l=pM.scopeDefaults[s],u=r("projection.type",l.projType),c=t._isAlbersUsa=u==="albers usa";c&&(s=t.scope="usa");var f=t._isScoped=s!=="world",v=t._isSatellite=u==="satellite",g=t._isConic=u.indexOf("conic")!==-1||u==="albers",p=t._isClipped=!!pM.lonaxisSpan[u];if(e.visible===!1){var x=YP.extendDeep({},t._template);x.showcoastlines=!1,x.showcountries=!1,x.showframe=!1,x.showlakes=!1,x.showland=!1,x.showocean=!1,x.showrivers=!1,x.showsubunits=!1,x.lonaxis&&(x.lonaxis.showgrid=!1),x.lataxis&&(x.lataxis.showgrid=!1),t._template=x}for(var _=r("visible"),y,C=0;C_e[ne]!=null)||pM.fitboundsIncompatible.has(u)?t.fitbounds=!1:ue.forEach(({dst:_e,key:ne})=>_e&&(_e[ne]=null))}}});var ZX=fe((h5r,kze)=>{"use strict";var djt=jf().getSubplotCalcData,vjt=Xt().counterRegex,pjt=xze(),S1="geo",Sze=vjt(S1),Eze={};Eze[S1]={valType:"subplotid",dflt:S1,editType:"calc"};function gjt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[S1],a=0;a{"use strict";Cze.exports={attributes:a5(),supplyDefaults:rIe(),colorbar:Zf(),formatLabels:aIe(),calc:mX(),calcGeoJSON:VP().calcGeoJSON,fitCoords:VP().fitCoords,plot:VP().plot,style:RX(),styleOnSelect:Ld().styleOnSelect,hoverPoints:KIe(),eventData:QIe(),selectPoints:rze(),moduleType:"trace",name:"scattergeo",basePlotModule:ZX(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var Fze=fe((v5r,Pze)=>{"use strict";Pze.exports=Lze()});var gM=fe((p5r,Ize)=>{"use strict";var{hovertemplateAttrs:xjt,templatefallbackAttrs:_jt}=Oo(),wy=a5(),bjt=_s(),Dze=Ho(),wjt=tc().defaultLine,by=ta().extendFlat,Rze=wy.marker.line;Ize.exports=by({locations:{valType:"data_array",editType:"calc"},locationmode:wy.locationmode,z:{valType:"data_array",editType:"calc"},geojson:by({},wy.geojson,{}),featureidkey:wy.featureidkey,text:by({},wy.text,{}),hovertext:by({},wy.hovertext,{}),marker:{line:{color:by({},Rze.color,{dflt:wjt}),width:by({},Rze.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:wy.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:wy.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:by({},Dze.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:xjt(),hovertemplatefallback:_jt(),showlegend:by({},Dze.showlegend,{dflt:!1})},bjt("",{cLetter:"z",editTypeOverride:"calc"}))});var qze=fe((g5r,zze)=>{"use strict";var XP=Xt(),Tjt=Vc(),Ajt=gM();zze.exports=function(t,r,n,a){function i(v,g){return XP.coerce(t,r,Ajt,v,g)}var o=i("locations"),s=i("z");if(!(o&&o.length&&XP.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var l=i("geojson"),u;(typeof l=="string"&&l!==""||XP.isPlainObject(l))&&(u="geojson-id");var c=i("locationmode",u);c==="geojson-id"&&i("featureidkey"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var f=i("marker.line.width");f&&i("marker.line.color"),i("marker.opacity"),Tjt(t,r,a,i,{prefix:"",cLetter:"z"}),XP.coerceSelectionMarkerOpacity(r,i)}});var $X=fe((m5r,Nze)=>{"use strict";var Bze=aa(),Mjt=Wa().BADNUM,Sjt=Mh(),Ejt=o1(),kjt=P0();function Oze(e){return e&&typeof e=="string"}Nze.exports=function(t,r){var n=r._length,a=new Array(n),i;r.geojson?i=function(c){return Oze(c)||Bze(c)}:i=Oze;for(var o=0;o{"use strict";var Cjt=xi(),Ljt=ni(),KX=ea(),Pjt=js();function Fjt(e,t){t&&Uze(e,t)}function Uze(e,t){var r=t[0].trace,n=t[0].node3,a=n.selectAll(".choroplethlocation"),i=r.marker||{},o=i.line||{},s=Pjt.makeColorScaleFuncFromTrace(r);a.each(function(l){Cjt.select(this).attr("fill",s(l.z)).call(Ljt.stroke,l.mlc||o.color).call(KX.dashLine,"",l.mlw||o.width||0).style("opacity",i.opacity)}),KX.selectedPointStyle(a,r)}function Djt(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?KX.selectedPointStyle(r.selectAll(".choroplethlocation"),n):Uze(e,t)}Vze.exports={style:Fjt,styleOnSelect:Djt}});var $P=fe((x5r,jze)=>{"use strict";var Rjt=xi(),Gze=Xt(),s_=Cg(),Ijt=EP().getTopojsonFeatures,Hze=rp().findExtremes,zjt=ZP().style;function qjt(e,t,r){var n=t.layers.backplot.select(".choroplethlayer");Gze.makeTraceGroups(n,r,"trace choropleth").each(function(a){var i=Rjt.select(this),o=i.selectAll("path.choroplethlocation").data(Gze.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),zjt(e,a)})}function Bjt(e,t){var r=e[0].trace,n=t[r.geo],a=n._subplot,i=r.locationmode,o=r._length,s=i==="geojson-id"?s_.extractTraceFeature(e):Ijt(r,a.topojson);let l=s_.fitGeojsonBbox(r,n);for(var u=[],c=[],f=0;f{"use strict";var Njt=Yi(),Ujt=gM(),Vjt=Xt().fillText,{ANTIMERIDIAN_LON_SHIFT:Gjt}=Cg();Wze.exports=function(t,r,n){var a=t.cd,i=a[0].trace,o=t.subplot,s,l,u,c,f=[r,n];let v=[r+Gjt,n];for(l=0;l")}}});var QX=fe((b5r,Yze)=>{"use strict";Yze.exports=function(t,r,n,a,i){t.location=r.location,t.z=r.z;var o=a[i];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t.ct=o.ct,t}});var eZ=fe((w5r,Xze)=>{"use strict";Xze.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s,l,u,c,f;if(r===!1)for(s=0;s{"use strict";Zze.exports={attributes:gM(),supplyDefaults:qze(),colorbar:H3(),calc:$X(),calcGeoJSON:$P().calcGeoJSON,fitCoords:$P().fitCoords,plot:$P().plot,style:ZP().style,styleOnSelect:ZP().styleOnSelect,hoverPoints:JX(),eventData:QX(),selectPoints:eZ(),moduleType:"trace",name:"choropleth",basePlotModule:ZX(),categories:["geo","noOpacity","showLegend"],meta:{}}});var Jze=fe((A5r,Kze)=>{"use strict";Kze.exports=$ze()});var KP=fe((M5r,eqe)=>{"use strict";var jjt=bi(),U0=Xt(),Wjt=_3();function Yjt(e,t,r,n){var a=e.cd,i=a[0].t,o=a[0].trace,s=e.xa,l=e.ya,u=i.x,c=i.y,f=s.c2p(t),v=l.c2p(r),g=e.distance,p;if(i.tree){var x=s.p2c(f-g),_=s.p2c(f+g),y=l.p2c(v-g),C=l.p2c(v+g);n==="x"?p=i.tree.range(Math.min(x,_),Math.min(l._rl[0],l._rl[1]),Math.max(x,_),Math.max(l._rl[0],l._rl[1])):p=i.tree.range(Math.min(x,_),Math.min(y,C),Math.max(x,_),Math.max(y,C))}else p=i.ids;var k,S,L,w,A,T,m,F,E,I=g;if(n==="x"){var R=!!o.xperiodalignment,B=!!o.yperiodalignment;for(A=0;A=Math.min(O,V)&&f<=Math.max(O,V)?0:1/0}if(T=Math.min(j,q)&&v<=Math.max(j,q)?0:1/0}E=Math.sqrt(T*T+m*m),S=p[A]}}}else for(A=p.length-1;A>-1;A--)k=p[A],L=u[k],w=c[k],T=s.c2p(L)-f,m=l.c2p(w)-v,F=Math.sqrt(T*T+m*m),F{"use strict";var tqe=20;rqe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:tqe,SYMBOL_STROKE:tqe/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}});var mM=fe((E5r,oqe)=>{"use strict";var Xjt=Ho(),Zjt=Ds(),$jt=n1(),Ll=Ol(),nqe=pl().axisHoverFormat,iqe=_s(),Kjt=(bx(),Gs(_x)).default,tZ=ta().extendFlat,Jjt=rl().overrideAll,Qjt=Ty().DASHES,aqe=Ll.line,Lg=Ll.marker,eWt=Lg.line,Ay=oqe.exports=Jjt({x:Ll.x,x0:Ll.x0,dx:Ll.dx,y:Ll.y,y0:Ll.y0,dy:Ll.dy,xperiod:Ll.xperiod,yperiod:Ll.yperiod,xperiod0:Ll.xperiod0,yperiod0:Ll.yperiod0,xperiodalignment:Ll.xperiodalignment,yperiodalignment:Ll.yperiodalignment,xhoverformat:nqe("x"),yhoverformat:nqe("y"),text:Ll.text,hovertext:Ll.hovertext,textposition:Ll.textposition,textfont:Zjt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"]}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:aqe.color,width:aqe.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:Kjt(Qjt),dflt:"solid"}},marker:tZ({},iqe("marker"),{symbol:Lg.symbol,angle:Lg.angle,size:Lg.size,sizeref:Lg.sizeref,sizemin:Lg.sizemin,sizemode:Lg.sizemode,opacity:Lg.opacity,colorbar:Lg.colorbar,line:tZ({},iqe("marker.line"),{width:eWt.width})}),connectgaps:Ll.connectgaps,fill:tZ({},Ll.fill,{dflt:"none"}),fillcolor:$jt(),selected:{marker:Ll.selected.marker,textfont:Ll.selected.textfont},unselected:{marker:Ll.unselected.marker,textfont:Ll.unselected.textfont},opacity:Xjt.opacity},"calc","nested");Ay.x.editType=Ay.y.editType=Ay.x0.editType=Ay.y0.editType="calc+clearAxisTypes";Ay.hovertemplate=Ll.hovertemplate;Ay.hovertemplatefallback=Ll.hovertemplatefallback;Ay.texttemplate=Ll.texttemplate;Ay.texttemplatefallback=Ll.texttemplatefallback});var JP=fe(rZ=>{"use strict";var sqe=Ty();rZ.isOpenSymbol=function(e){return typeof e=="string"?sqe.OPEN_RE.test(e):e%200>100};rZ.isDotSymbol=function(e){return typeof e=="string"?sqe.DOT_RE.test(e):e>200}});var cqe=fe((C5r,uqe)=>{"use strict";var lqe=Xt(),tWt=bi(),rWt=JP(),nWt=mM(),iWt=r1(),QP=Is(),aWt=r2(),oWt=sp(),sWt=vv(),lWt=lp(),uWt=a1(),cWt=up();uqe.exports=function(t,r,n,a){function i(g,p){return lqe.coerce(t,r,nWt,g,p)}var o=t.marker?rWt.isOpenSymbol(t.marker.symbol):!1,s=QP.isBubble(t),l=aWt(t,r,a,i);if(!l){r.visible=!1;return}oWt(t,r,a,i),i("xhoverformat"),i("yhoverformat");var u=l{"use strict";var fWt=cC();fqe.exports=function(t,r,n){var a=t.i;return"x"in t||(t.x=r._x[a]),"y"in t||(t.y=r._y[a]),fWt(t,r,n)}});var vqe=fe((P5r,dqe)=>{"use strict";function hWt(e,t,r,n,a){for(var i=a+1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>=0?(i=o,a=o-1):n=o+1}return i}function dWt(e,t,r,n,a){for(var i=a+1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>0?(i=o,a=o-1):n=o+1}return i}function vWt(e,t,r,n,a){for(var i=n-1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<0?(i=o,n=o+1):a=o-1}return i}function pWt(e,t,r,n,a){for(var i=n-1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<=0?(i=o,n=o+1):a=o-1}return i}function gWt(e,t,r,n,a){for(;n<=a;){var i=n+a>>>1,o=e[i],s=r!==void 0?r(o,t):o-t;if(s===0)return i;s<=0?n=i+1:a=i-1}return-1}function yM(e,t,r,n,a,i){return typeof r=="function"?i(e,t,r,n===void 0?0:n|0,a===void 0?e.length-1:a|0):i(e,t,void 0,r===void 0?0:r|0,n===void 0?e.length-1:n|0)}dqe.exports={ge:function(e,t,r,n,a){return yM(e,t,r,n,a,hWt)},gt:function(e,t,r,n,a){return yM(e,t,r,n,a,dWt)},lt:function(e,t,r,n,a){return yM(e,t,r,n,a,vWt)},le:function(e,t,r,n,a){return yM(e,t,r,n,a,pWt)},eq:function(e,t,r,n,a){return yM(e,t,r,n,a,gWt)}}});var nZ=fe((F5r,pqe)=>{pqe.exports=mWt;function mWt(e,t,r){return tr?r:e:et?t:e}});var E1=fe((D5r,mqe)=>{"use strict";mqe.exports=function(t,r,n){var a={},i,o;if(typeof r=="string"&&(r=gqe(r)),Array.isArray(r)){var s={};for(o=0;o{"use strict";var yWt=E1();yqe.exports=xWt;function xWt(e){var t;return arguments.length>1&&(e=arguments),typeof e=="string"?e=e.split(/\s/).map(parseFloat):typeof e=="number"&&(e=[e]),e.length&&typeof e[0]=="number"?e.length===1?t={width:e[0],height:e[0],x:0,y:0}:e.length===2?t={width:e[0],height:e[1],x:0,y:0}:t={x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(e=yWt(e,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),t={x:e.left||0,y:e.top||0},e.width==null?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,e.height==null?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}});var l_=fe((I5r,xqe)=>{"use strict";xqe.exports=_Wt;function _Wt(e,t){if(!e||e.length==null)throw Error("Argument should be an array");t==null?t=1:t=Math.floor(t);for(var r=Array(t*2),n=0;na&&(a=e[o]),e[o]{"use strict";_qe.exports=function(){for(var t=0;t{wqe.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}});var u_=fe((B5r,Aqe)=>{var Tqe=eF();Aqe.exports=bWt;function bWt(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=+(r||0)|0,Array.isArray(e)&&e[0]&&typeof e[0][0]=="number"){var n=e[0].length,a=e.length*n,i,o,s,l;(!t||typeof t=="string")&&(t=new(Tqe(t||"float32"))(a+r));var u=t.length-r;if(a!==u)throw new Error("source length "+a+" ("+n+"x"+e.length+") does not match destination length "+u);for(i=0,s=r;i{"use strict";Mqe.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var kqe=fe((N5r,Eqe)=>{"use strict";Eqe.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var Iqe=fe((U5r,Rqe)=>{"use strict";var Cqe=vqe(),Lqe=nZ(),wWt=u5(),TWt=l_(),Pqe=E1(),aZ=bqe(),AWt=u_(),MWt=Sqe(),SWt=eF(),Fqe=kqe(),EWt=1073741824;Rqe.exports=function(t,r){r||(r={}),t=AWt(t,"float64"),r=Pqe(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let n=aZ(r.maxDepth,255),a=aZ(r.bounds,TWt(t,2));a[0]===a[2]&&a[2]++,a[1]===a[3]&&a[3]++;let i=Dqe(t,a),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(SWt(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let y=0;yn||w>EWt){for(let q=0;qce||m>ye||F=I||J===ee)return;let xe=l[U];ee===void 0&&(ee=xe.length);for(let me=J;me=S&&De<=w&&Ge>=L&&Ge<=A&&R.push(be)}let ue=u[U],K=ue[J*4+0],_e=ue[J*4+1],ne=ue[J*4+2],ae=ue[J*4+3],pe=O(ue,J+1),ie=q*.5,le=U+1;B(V,j,ie,le,K,_e||ne||ae||pe),B(V,j+ie,ie,le,_e,ne||ae||pe),B(V+ie,j,ie,le,ne,ae||pe),B(V+ie,j+ie,ie,le,ae,pe)}function O(V,j){let q=null,U=0;for(;q===null;)if(q=V[j*4+U],U++,U>V.length)return null;return q}return R}function x(y,C,k,S,L){let w=[];for(let A=0;A{"use strict";zqe.exports=Iqe()});var Bqe=fe((G5r,qqe)=>{qqe.exports=CWt;var oZ={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},kWt=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function CWt(e){var t=[];return e.replace(kWt,function(r,n,a){var i=n.toLowerCase();for(a=PWt(a),i=="m"&&a.length>2&&(t.push([n].concat(a.splice(0,2))),i="l",n=n=="m"?"l":"L");;){if(a.length==oZ[i])return a.unshift(n),t.push(a);if(a.length{Oqe.exports=FWt;function FWt(e){var t=0,r=0,n=0,a=0;return e.map(function(i){i=i.slice();var o=i[0],s=o.toUpperCase();if(o!=s)switch(i[0]=s,o){case"a":i[6]+=n,i[7]+=a;break;case"v":i[1]+=a;break;case"h":i[1]+=n;break;default:for(var l=1;l{"use strict";Object.defineProperty(rF,"__esModule",{value:!0});var DWt=(function(){function e(t,r){var n=[],a=!0,i=!1,o=void 0;try{for(var s=t[Symbol.iterator](),l;!(a=(l=s.next()).done)&&(n.push(l.value),!(r&&n.length===r));a=!0);}catch(u){i=!0,o=u}finally{try{!a&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),xM=Math.PI*2,sZ=function(t,r,n,a,i,o,s){var l=t.x,u=t.y;l*=r,u*=n;var c=a*l-i*u,f=i*l+a*u;return{x:c+o,y:f+s}},RWt=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),a=Math.cos(t),i=Math.sin(t),o=Math.cos(t+r),s=Math.sin(t+r);return[{x:a-i*n,y:i+a*n},{x:o+s*n,y:s-o*n},{x:o,y:s}]},Uqe=function(t,r,n,a){var i=t*a-r*n<0?-1:1,o=t*n+r*a;return o>1&&(o=1),o<-1&&(o=-1),i*Math.acos(o)},IWt=function(t,r,n,a,i,o,s,l,u,c,f,v){var g=Math.pow(i,2),p=Math.pow(o,2),x=Math.pow(f,2),_=Math.pow(v,2),y=g*p-g*_-p*x;y<0&&(y=0),y/=g*_+p*x,y=Math.sqrt(y)*(s===l?-1:1);var C=y*i/o*v,k=y*-o/i*f,S=c*C-u*k+(t+n)/2,L=u*C+c*k+(r+a)/2,w=(f-C)/i,A=(v-k)/o,T=(-f-C)/i,m=(-v-k)/o,F=Uqe(1,0,w,A),E=Uqe(w,A,T,m);return l===0&&E>0&&(E-=xM),l===1&&E<0&&(E+=xM),[S,L,F,E]},zWt=function(t){var r=t.px,n=t.py,a=t.cx,i=t.cy,o=t.rx,s=t.ry,l=t.xAxisRotation,u=l===void 0?0:l,c=t.largeArcFlag,f=c===void 0?0:c,v=t.sweepFlag,g=v===void 0?0:v,p=[];if(o===0||s===0)return[];var x=Math.sin(u*xM/360),_=Math.cos(u*xM/360),y=_*(r-a)/2+x*(n-i)/2,C=-x*(r-a)/2+_*(n-i)/2;if(y===0&&C===0)return[];o=Math.abs(o),s=Math.abs(s);var k=Math.pow(y,2)/Math.pow(o,2)+Math.pow(C,2)/Math.pow(s,2);k>1&&(o*=Math.sqrt(k),s*=Math.sqrt(k));var S=IWt(r,n,a,i,o,s,f,g,x,_,y,C),L=DWt(S,4),w=L[0],A=L[1],T=L[2],m=L[3],F=Math.abs(m)/(xM/4);Math.abs(1-F)<1e-7&&(F=1);var E=Math.max(Math.ceil(F),1);m/=E;for(var I=0;I{"use strict";jqe.exports=BWt;var qWt=Gqe();function BWt(e){for(var t,r=[],n=0,a=0,i=0,o=0,s=null,l=null,u=0,c=0,f=0,v=e.length;f4?(n=g[g.length-4],a=g[g.length-3]):(n=u,a=c),r.push(g)}return r}function nF(e,t,r,n){return["C",e,t,r,n,r,n]}function Hqe(e,t,r,n,a,i){return["C",e/3+2/3*r,t/3+2/3*n,a/3+2/3*r,i/3+2/3*n,a,i]}});var lZ=fe((W5r,Yqe)=>{"use strict";Yqe.exports=function(t){return typeof t!="string"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}});var Zqe=fe((Y5r,Xqe)=>{"use strict";var OWt=Bqe(),NWt=Nqe(),UWt=Wqe(),VWt=lZ();Xqe.exports=GWt;function GWt(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!VWt(e))throw Error("String is not an SVG path.");e=OWt(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=NWt(e),e=UWt(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],r=0,n=e.length;rt[2]&&(t[2]=a[i+0]),a[i+1]>t[3]&&(t[3]=a[i+1]);return t}});var Qqe=fe((X5r,Jqe)=>{"use strict";Jqe.exports=HWt;var _M=1e20;function HWt(e,t){t||(t={});var r=t.cutoff==null?.25:t.cutoff,n=t.radius==null?8:t.radius,a=t.channel||0,i,o,s,l,u,c,f,v,g,p,x;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");i=t.width,o=t.height,l=e,t.stride?c=t.stride:c=Math.floor(e.length/i/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(v=e,f=v.getContext("2d"),i=v.width,o=v.height,g=f.getImageData(0,0,i,o),l=g.data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(v=e.canvas,f=e,i=v.width,o=v.height,g=f.getImageData(0,0,i,o),l=g.data,c=4):window.ImageData&&e instanceof window.ImageData&&(g=e,i=e.width,o=e.height,l=g.data,c=4);if(s=Math.max(i,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(i*o),p=0,x=Math.floor(u.length/c);pnBe});function nBe(e,t={}){if(!(0,tBe.default)(e))throw Error("Invalid SVG path");let r,n;t.shape||Array.isArray(t)?[r,n]=t.shape||t:(r=uZ.width=t.width||t.w||200,n=uZ.height=t.height||t.h||200);let a=Math.min(r,n),i=t.stroke||0,o=t.viewbox||t.viewBox||(0,eBe.default)(e),s=[r/(o[2]-o[0]),n/(o[3]-o[1])],l=Math.min(s[0]||0,s[1]||0)/2;Pp.fillStyle="black",Pp.fillRect(0,0,r,n),Pp.fillStyle="white",i&&(typeof i!="number"&&(i=1),Pp.strokeStyle=i>0?"white":"black",Pp.lineWidth=Math.abs(i)),Pp.translate(r*.5,n*.5),Pp.scale(l,l);let u=new Path2D(e);return Pp.fill(u),i&&Pp.stroke(u),Pp.setTransform(1,0,0,1,0,0),(0,rBe.default)(Pp,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:a*.5})}var eBe,tBe,rBe,uZ,Pp,aBe=Co(()=>{eBe=$0(Zqe()),tBe=$0(lZ()),rBe=$0(Qqe()),uZ=document.createElement("canvas"),Pp=uZ.getContext("2d",{willReadFrequently:!0})});var f_=fe((Z5r,gBe)=>{"use strict";var aF=aa(),jWt=(aBe(),Gs(iBe)).default,{normalize:iF}=ni(),WWt=bi(),h5=Xt(),Nu=h5.isArrayOrTypedArray,c5=ea(),oBe=El(),sBe=Sg().formatColor,f5=Is(),YWt=lT(),fZ=JP(),bM=Ty(),XWt=Y1().DESELECTDIM,lBe={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},ZWt=Sd().appendArrayPointValue;function $Wt(e,t){var r,n={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},a=e._context.plotGlPixelRatio;if(t.visible!==!0)return n;if(f5.hasText(t)&&(n.text=pBe(e,t),n.textSel=cBe(e,t,t.selected),n.textUnsel=cBe(e,t,t.unselected)),f5.hasMarkers(t)&&(n.marker=dZ(e,t),n.markerSel=hZ(e,t,t.selected),n.markerUnsel=hZ(e,t,t.unselected),!t.unselected&&Nu(t.marker.opacity))){var i=t.marker.opacity;for(n.markerUnsel.opacity=new Array(i.length),r=0;r500?"bold":"normal":e}function dZ(e,t){var r=t._length,n=t.marker,a={},i,o=Nu(n.symbol),s=Nu(n.angle),l=Nu(n.color),u=Nu(n.line.color),c=Nu(n.opacity),f=Nu(n.size),v=Nu(n.line.width),g;if(o||(g=fZ.isOpenSymbol(n.symbol)),o||l||u||c||s){a.symbols=new Array(r),a.angles=new Array(r),a.colors=new Array(r),a.borderColors=new Array(r);var p=n.symbol,x=n.angle,_=sBe(n,n.opacity,r),y=sBe(n.line,n.opacity,r);if(!Nu(y[0])){var C=y;for(y=Array(r),i=0;ibM.TOO_MANY_POINTS||f5.hasMarkers(t)?"rect":"round";if(u&&t.connectgaps){var f=i[0],v=i[1];for(o=0;o1?l[o]:l[0]:l,g=Nu(u)?u.length>1?u[o]:u[0]:u,p=lBe[v],x=lBe[g],_=c?c/.8+1:0,y=-x*_-x*.5;i.offset[o]=[p*_/f,y/f]}}return i}gBe.exports={style:$Wt,markerStyle:dZ,markerSelection:hZ,linePositions:JWt,errorBarPositions:QWt,textPosition:eYt}});var vZ=fe(($5r,mBe)=>{"use strict";var oF=Xt();mBe.exports=function(t,r){var n=r._scene,a={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},i={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(n=r._scene={},n.init=function(){oF.extendFlat(n,i,a)},n.init(),n.update=function(s){var l=oF.repeat(s,n.count);if(n.fill2d&&n.fill2d.update(l),n.scatter2d&&n.scatter2d.update(l),n.line2d&&n.line2d.update(l),n.error2d&&n.error2d.update(l.concat(l)),n.select2d&&n.select2d.update(l),n.glText)for(var u=0;u{"use strict";var tYt=tF(),d5=Xt(),yBe=El(),rYt=rp().findExtremes,xBe=cp(),pZ=gv(),nYt=pZ.calcMarkerSize,iYt=pZ.calcAxisExpansion,aYt=pZ.setFirstScatter,oYt=pv(),v5=f_(),sYt=vZ(),_Be=Wa().BADNUM,lYt=Ty().TOO_MANY_POINTS;wBe.exports=function(t,r){var n=t._fullLayout,a=r._xA=yBe.getFromId(t,r.xaxis,"x"),i=r._yA=yBe.getFromId(t,r.yaxis,"y"),o=n._plots[r.xaxis+r.yaxis],s=r._length,l=s>=lYt,u=s*2,c={},f,v=a.makeCalcdata(r,"x"),g=i.makeCalcdata(r,"y"),p=xBe(r,a,"x",v),x=xBe(r,i,"y",g),_=p.vals,y=x.vals;r._x=_,r._y=y,r.xperiodalignment&&(r._origX=v,r._xStarts=p.starts,r._xEnds=p.ends),r.yperiodalignment&&(r._origY=g,r._yStarts=x.starts,r._yEnds=x.ends);var C=new Array(u),k=new Array(s);for(f=0;f1&&d5.extendFlat(o.line,v5.linePositions(e,r,n)),o.errorX||o.errorY){var s=v5.errorBarPositions(e,r,n,a,i);o.errorX&&d5.extendFlat(o.errorX,s.x),o.errorY&&d5.extendFlat(o.errorY,s.y)}return o.text&&(d5.extendFlat(o.text,{positions:n},v5.textPosition(e,r,o.text,o.marker)),d5.extendFlat(o.textSel,{positions:n},v5.textPosition(e,r,o.text,o.markerSel)),d5.extendFlat(o.textUnsel,{positions:n},v5.textPosition(e,r,o.text,o.markerUnsel))),o}});var gZ=fe((J5r,MBe)=>{"use strict";var ABe=Xt(),cYt=ni(),fYt=Y1().DESELECTDIM;function hYt(e){var t=e[0],r=t.trace,n=t.t,a=n._scene,i=n.index,o=a.selectBatch[i],s=a.unselectBatch[i],l=a.textOptions[i],u=a.textSelectedOptions[i]||{},c=a.textUnselectedOptions[i]||{},f=ABe.extendFlat({},l),v,g;if(o.length||s.length){var p=u.color,x=c.color,_=l.color,y=ABe.isArrayOrTypedArray(_);for(f.color=new Array(r._length),v=0;v{"use strict";var SBe=Is(),dYt=gZ().styleTextSelection;EBe.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].trace,l=n[0].t,u=s._length,c=l.x,f=l.y,v=l._scene,g=l.index;if(!v)return o;var p=SBe.hasText(s),x=SBe.hasMarkers(s),_=!x&&!p;if(s.visible!==!0||_)return o;var y=[],C=[];if(r!==!1&&!r.degenerate)for(var k=0;k{"use strict";var vYt=KP();kBe.exports={moduleType:"trace",name:"scattergl",basePlotModule:gu(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:mM(),supplyDefaults:cqe(),crossTraceDefaults:aU(),colorbar:Zf(),formatLabels:hqe(),calc:TBe(),hoverPoints:vYt.hoverPoints,selectPoints:mZ(),meta:{}}});var PBe=fe((t4r,LBe)=>{"use strict";LBe.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var IBe=fe((r4r,RBe)=>{"use strict";var FBe=PBe();RBe.exports=pYt;var DBe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function pYt(e){var t,r=[],n=1,a;if(typeof e=="string")if(e=e.toLowerCase(),FBe[e])r=FBe[e].slice(),a="rgb";else if(e==="transparent")n=0,a="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var i=e.slice(1),o=i.length,s=o<=4;n=1,s?(r=[parseInt(i[0]+i[0],16),parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16)],o===4&&(n=parseInt(i[3]+i[3],16)/255)):(r=[parseInt(i[0]+i[1],16),parseInt(i[2]+i[3],16),parseInt(i[4]+i[5],16)],o===8&&(n=parseInt(i[6]+i[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),a="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],u=l==="rgb",i=l.replace(/a$/,"");a=i;var o=i==="cmyk"?4:i==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(v,g){if(/%$/.test(v))return g===o?parseFloat(v)/100:i==="rgb"?parseFloat(v)*255/100:parseFloat(v);if(i[g]==="h"){if(/deg$/.test(v))return parseFloat(v);if(DBe[v]!==void 0)return DBe[v]}return parseFloat(v)}),l===i&&r.push(1),n=u||r[o]===void 0?1:r[o],r=r.slice(0,o)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),a=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],a="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(a="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(a="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(a="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:a,values:r,alpha:n}}});var qBe=fe((n4r,zBe)=>{"use strict";var gYt=IBe();zBe.exports=function(t){Array.isArray(t)&&t.raw&&(t=String.raw.apply(null,arguments));var r,n,a,i=gYt(t);if(!i.space)return[];var o=[0,0,0],s=i.space[0]==="h"?[360,100,100]:[255,255,255];return r=Array(3),r[0]=Math.min(Math.max(i.values[0],o[0]),s[0]),r[1]=Math.min(Math.max(i.values[1],o[1]),s[1]),r[2]=Math.min(Math.max(i.values[2],o[2]),s[2]),i.space[0]==="h"&&(r=mYt(r)),r.push(Math.min(Math.max(i.alpha,0),1)),r};function mYt(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,a,i,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(i=n<.5?n*(1+r):n+r-n*r,a=2*n-i,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?a+(i-a)*6*o:2*o<1?i:3*o<2?a+(i-a)*(2/3-o)*6:a,s[u++]=l*255;return s}});var wM=fe((i4r,BBe)=>{"use strict";var yYt=qBe(),xYt=eF();BBe.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var n=xYt(r),a=new n(4),i=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=yYt(t),t[0]/=255,t[1]/=255,t[2]/=255),_Yt(t)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:255,i&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(i?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:1):(a[0]=Math.min(Math.max(Math.floor(t[0]*255),0),255),a[1]=Math.min(Math.max(Math.floor(t[1]*255),0),255),a[2]=Math.min(Math.max(Math.floor(t[2]*255),0),255),a[3]=t[3]==null?255:Math.min(Math.max(Math.floor(t[3]*255),0),255)),a)};function _Yt(e){return!!(e instanceof Uint8Array||e instanceof Uint8ClampedArray||Array.isArray(e)&&(e[0]>1||e[0]===0)&&(e[1]>1||e[1]===0)&&(e[2]>1||e[2]===0)&&(!e[3]||e[3]>1))}});var NBe=fe((a4r,lF)=>{"use strict";var sF=nZ();lF.exports=OBe;lF.exports.to=OBe;lF.exports.from=bYt;function OBe(e,t){t==null&&(t=!0);var r=e[0],n=e[1],a=e[2],i=e[3];i==null&&(i=t?1:255),t&&(r*=255,n*=255,a*=255,i*=255),r=sF(r,0,255)&255,n=sF(n,0,255)&255,a=sF(a,0,255)&255,i=sF(i,0,255)&255;var o=r*16777216+(n<<16)+(a<<8)+i;return o}function bYt(e,t){e=+e;var r=e>>>24,n=(e&16711680)>>>16,a=(e&65280)>>>8,i=e&255;return t===!1?[r,n,a,i]:[r/255,n/255,a/255,i/255]}});var VBe=fe((o4r,UBe)=>{UBe.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n{"use strict";GBe.exports=function(t,r,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var a=0,i=n.length;a{"use strict";p5.exports=TM;p5.exports.float32=p5.exports.float=TM;p5.exports.fract32=p5.exports.fract=wYt;var HBe=new Float32Array(1);function wYt(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=TM(e));for(var r=0,n=t.length;r{"use strict";var TYt=wM(),AYt=l_(),MYt=NBe(),SYt=tF(),cF=VBe(),EYt=E1(),kYt=yZ(),CYt=u_(),fF=uF(),LYt=u5(),PYt=rh;function rh(e,t){if(!(this instanceof rh))return new rh(e,t);typeof e=="function"?(t||(t={}),t.regl=e):(t=e,e=null),t&&t.length&&(t.positions=t),e=t.regl;let r=e._gl,n,a=[],i={},o=[],s=[null],l=[null],u=255,c=100;this.tooManyColors=!1,n=e.texture({data:new Uint8Array(u*4),width:u,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),Object.assign(this,{regl:e,gl:r,groups:o,markerCache:l,markerTextures:s,palette:a,paletteIds:i,paletteTexture:n,maxColors:u,maxSize:c,canvas:r.canvas}),this.update(t);let f={uniforms:{constPointSize:!!t.constPointSize,opacity:e.prop("opacity"),paletteSize:(p,x)=>[this.tooManyColors?0:u,n.height],pixelRatio:e.context("pixelRatio"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translate:e.prop("translate"),translateFract:e.prop("translateFract"),markerTexture:e.prop("markerTexture"),paletteTexture:n},attributes:{x:(p,x)=>x.xAttr||{buffer:x.positionBuffer,stride:8,offset:0},y:(p,x)=>x.yAttr||{buffer:x.positionBuffer,stride:8,offset:4},xFract:(p,x)=>x.xAttr?{constant:[0,0]}:{buffer:x.positionFractBuffer,stride:8,offset:0},yFract:(p,x)=>x.yAttr?{constant:[0,0]}:{buffer:x.positionFractBuffer,stride:8,offset:4},size:(p,x)=>x.size.length?{buffer:x.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(x.size*255/this.maxSize)]},borderSize:(p,x)=>x.borderSize.length?{buffer:x.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(x.borderSize*255/this.maxSize)]},colorId:(p,x)=>x.color.length?{buffer:x.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?a.slice(x.color*4,x.color*4+4):[x.color]},borderColorId:(p,x)=>x.borderColor.length?{buffer:x.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?a.slice(x.borderColor*4,x.borderColor*4+4):[x.borderColor]},isActive:(p,x)=>x.activation===!0?{constant:[1]}:x.activation?x.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:e.prop("viewport")},viewport:e.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:e.prop("elements"),count:e.prop("count"),offset:e.prop("offset"),primitive:"points"},v=Object.assign({},f);v.frag=cF([`precision highp float; +`]);i.createShader=function(g){var p=s(g,u,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},i.createPickShader=function(g){var p=s(g,u,v,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},i.createContourShader=function(g){var p=s(g,f,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p},i.createPickContourShader=function(g){var p=s(g,f,v,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p}},9499(a,i,o){"use strict";a.exports=pe;var s=o(8828),l=o(2762),u=o(8116),c=o(7766),f=o(1888),v=o(6729),g=o(5298),p=o(9994),_=o(9618),x=o(3711),y=o(6760),C=o(7608),k=o(2478),S=o(6199),L=o(990),w=L.createShader,T=L.createContourShader,A=L.createPickShader,m=L.createPickContourShader,F=40,E=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],I=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],R=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var ie=0;ie<3;++ie){var le=R[ie],xe=(ie+1)%3,be=(ie+2)%3;le[xe+0]=1,le[be+3]=1,le[ie+6]=1}})();function B(ie,le,xe,be,De){this.position=ie,this.index=le,this.uv=xe,this.level=be,this.dataCoordinate=De}var O=256;function U(ie,le,xe,be,De,Ge,pt,tt,Oe,ze,ut,et,qe,we,Le){this.gl=ie,this.shape=le,this.bounds=xe,this.objectOffset=Le,this.intensityBounds=[],this._shader=be,this._pickShader=De,this._coordinateBuffer=Ge,this._vao=pt,this._colorMap=tt,this._contourShader=Oe,this._contourPickShader=ze,this._contourBuffer=ut,this._contourVAO=et,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new B([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=qe,this._dynamicVAO=we,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[_(f.mallocFloat(1024),[0,0]),_(f.mallocFloat(1024),[0,0]),_(f.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var j=U.prototype;j.genColormap=function(ie,le){var xe=!1,be=p([v({colormap:ie,nshades:O,format:"rgba"}).map(function(De,Ge){var pt=le?q(Ge/255,le):De[3];return pt<1&&(xe=!0),[De[0],De[1],De[2],255*pt]})]);return g.divseq(be,255),this.hasAlphaScale=xe,be},j.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},j.isOpaque=function(){return!this.isTransparent()},j.pickSlots=1,j.setPickBase=function(ie){this.pickId=ie};function q(ie,le){if(!le||!le.length)return 1;for(var xe=0;xeie&&xe>0){var be=(le[xe][0]-ie)/(le[xe][0]-le[xe-1][0]);return le[xe][1]*(1-be)+be*le[xe-1][1]}}return 1}var V=[0,0,0],K={showSurface:!1,showContour:!1,projections:[E.slice(),E.slice(),E.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function ee(ie,le){var xe,be,De,Ge=le.axes&&le.axes.lastCubeProps.axis||V,pt=le.showSurface,tt=le.showContour;for(xe=0;xe<3;++xe)for(pt=pt||le.surfaceProject[xe],be=0;be<3;++be)tt=tt||le.contourProject[xe][be];for(xe=0;xe<3;++xe){var Oe=K.projections[xe];for(be=0;be<16;++be)Oe[be]=0;for(be=0;be<4;++be)Oe[5*be]=1;Oe[5*xe]=0,Oe[12+xe]=le.axesBounds[+(Ge[xe]>0)][xe],y(Oe,ie.model,Oe);var ze=K.clipBounds[xe];for(De=0;De<2;++De)for(be=0;be<3;++be)ze[De][be]=ie.clipBounds[De][be];ze[0][xe]=-1e8,ze[1][xe]=1e8}return K.showSurface=pt,K.showContour=tt,K}var ce={model:E,view:E,projection:E,inverseModel:E.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},me=E.slice(),ye=[1,0,0,0,1,0,0,0,1];function ue(ie,le){ie=ie||{};var xe=this.gl;xe.disable(xe.CULL_FACE),this._colorMap.bind(0);var be=ce;be.model=ie.model||E,be.view=ie.view||E,be.projection=ie.projection||E,be.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],be.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],be.objectOffset=this.objectOffset,be.contourColor=this.contourColor[0],be.inverseModel=C(be.inverseModel,be.model);for(var De=0;De<2;++De)for(var Ge=be.clipBounds[De],pt=0;pt<3;++pt)Ge[pt]=Math.min(Math.max(this.clipBounds[De][pt],-1e8),1e8);be.kambient=this.ambientLight,be.kdiffuse=this.diffuseLight,be.kspecular=this.specularLight,be.roughness=this.roughness,be.fresnel=this.fresnel,be.opacity=this.opacity,be.height=0,be.permutation=ye,be.vertexColor=this.vertexColor;var tt=me;for(y(tt,be.view,be.model),y(tt,be.projection,tt),C(tt,tt),De=0;De<3;++De)be.eyePosition[De]=tt[12+De]/tt[15];var Oe=tt[15];for(De=0;De<3;++De)Oe+=this.lightPosition[De]*tt[4*De+3];for(De=0;De<3;++De){var ze=tt[12+De];for(pt=0;pt<3;++pt)ze+=tt[4*pt+De]*this.lightPosition[pt];be.lightPosition[De]=ze/Oe}var ut=ee(be,this);if(ut.showSurface){for(this._shader.bind(),this._shader.uniforms=be,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(xe.TRIANGLES,this._vertexCount),De=0;De<3;++De)!this.surfaceProject[De]||!this.vertexCount||(this._shader.uniforms.model=ut.projections[De],this._shader.uniforms.clipBounds=ut.clipBounds[De],this._vao.draw(xe.TRIANGLES,this._vertexCount));this._vao.unbind()}if(ut.showContour){var et=this._contourShader;be.kambient=1,be.kdiffuse=0,be.kspecular=0,be.opacity=1,et.bind(),et.uniforms=be;var qe=this._contourVAO;for(qe.bind(),De=0;De<3;++De)for(et.uniforms.permutation=R[De],xe.lineWidth(this.contourWidth[De]*this.pixelRatio),pt=0;pt>4)/16)/255,De=Math.floor(be),Ge=be-De,pt=le[1]*(ie.value[1]+(ie.value[2]&15)/16)/255,tt=Math.floor(pt),Oe=pt-tt;De+=1,tt+=1;var ze=xe.position;ze[0]=ze[1]=ze[2]=0;for(var ut=0;ut<2;++ut)for(var et=ut?Ge:1-Ge,qe=0;qe<2;++qe)for(var we=qe?Oe:1-Oe,Le=De+ut,Ke=tt+qe,Te=et*we,Ve=0;Ve<3;++Ve)ze[Ve]+=this._field[Ve].get(Le,Ke)*Te;for(var $e=this._pickResult.level,ot=0;ot<3;++ot)if($e[ot]=k.le(this.contourLevels[ot],ze[ot]),$e[ot]<0)this.contourLevels[ot].length>0&&($e[ot]=0);else if($e[ot]Math.abs(it-ze[ot])&&($e[ot]+=1)}for(xe.index[0]=Ge<.5?De:De+1,xe.index[1]=Oe<.5?tt:tt+1,xe.uv[0]=be/le[0],xe.uv[1]=pt/le[1],Ve=0;Ve<3;++Ve)xe.dataCoordinate[Ve]=this._field[Ve].get(xe.index[0],xe.index[1]);return xe},j.padField=function(ie,le){var xe=le.shape.slice(),be=ie.shape.slice();g.assign(ie.lo(1,1).hi(xe[0],xe[1]),le),g.assign(ie.lo(1).hi(xe[0],1),le.hi(xe[0],1)),g.assign(ie.lo(1,be[1]-1).hi(xe[0],1),le.lo(0,xe[1]-1).hi(xe[0],1)),g.assign(ie.lo(0,1).hi(1,xe[1]),le.hi(1)),g.assign(ie.lo(be[0]-1,1).hi(1,xe[1]),le.lo(xe[0]-1)),ie.set(0,0,le.get(0,0)),ie.set(0,be[1]-1,le.get(0,xe[1]-1)),ie.set(be[0]-1,0,le.get(xe[0]-1,0)),ie.set(be[0]-1,be[1]-1,le.get(xe[0]-1,xe[1]-1))};function _e(ie,le){return Array.isArray(ie)?[le(ie[0]),le(ie[1]),le(ie[2])]:[le(ie),le(ie),le(ie)]}function ne(ie){return Array.isArray(ie)?ie.length===3?[ie[0],ie[1],ie[2],1]:[ie[0],ie[1],ie[2],ie[3]]:[0,0,0,1]}function ae(ie){if(Array.isArray(ie)){if(Array.isArray(ie))return[ne(ie[0]),ne(ie[1]),ne(ie[2])];var le=ne(ie);return[le.slice(),le.slice(),le.slice()]}}j.update=function(ie){ie=ie||{},this.objectOffset=ie.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in ie&&(this.contourWidth=_e(ie.contourWidth,Number)),"showContour"in ie&&(this.showContour=_e(ie.showContour,Boolean)),"showSurface"in ie&&(this.showSurface=!!ie.showSurface),"contourTint"in ie&&(this.contourTint=_e(ie.contourTint,Boolean)),"contourColor"in ie&&(this.contourColor=ae(ie.contourColor)),"contourProject"in ie&&(this.contourProject=_e(ie.contourProject,function(Ga){return _e(Ga,Boolean)})),"surfaceProject"in ie&&(this.surfaceProject=ie.surfaceProject),"dynamicColor"in ie&&(this.dynamicColor=ae(ie.dynamicColor)),"dynamicTint"in ie&&(this.dynamicTint=_e(ie.dynamicTint,Number)),"dynamicWidth"in ie&&(this.dynamicWidth=_e(ie.dynamicWidth,Number)),"opacity"in ie&&(this.opacity=ie.opacity),"opacityscale"in ie&&(this.opacityscale=ie.opacityscale),"colorBounds"in ie&&(this.colorBounds=ie.colorBounds),"vertexColor"in ie&&(this.vertexColor=ie.vertexColor?1:0),"colormap"in ie&&this._colorMap.setPixels(this.genColormap(ie.colormap,this.opacityscale));var le=ie.field||ie.coords&&ie.coords[2]||null,xe=!1;if(le||(this._field[2].shape[0]||this._field[2].shape[2]?le=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):le=this._field[2].hi(0,0)),"field"in ie||"coords"in ie){var be=(le.shape[0]+2)*(le.shape[1]+2);be>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(be))),this._field[2]=_(this._field[2].data,[le.shape[0]+2,le.shape[1]+2]),this.padField(this._field[2],le),this.shape=le.shape.slice();for(var De=this.shape,Ge=0;Ge<2;++Ge)this._field[2].size>this._field[Ge].data.length&&(f.freeFloat(this._field[Ge].data),this._field[Ge].data=f.mallocFloat(this._field[2].size)),this._field[Ge]=_(this._field[Ge].data,[De[0]+2,De[1]+2]);if(ie.coords){var pt=ie.coords;if(!Array.isArray(pt)||pt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(Ge=0;Ge<2;++Ge){var tt=pt[Ge];for(qe=0;qe<2;++qe)if(tt.shape[qe]!==De[qe])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[Ge],tt)}}else if(ie.ticks){var Oe=ie.ticks;if(!Array.isArray(Oe)||Oe.length!==2)throw new Error("gl-surface: invalid ticks");for(Ge=0;Ge<2;++Ge){var ze=Oe[Ge];if((Array.isArray(ze)||ze.length)&&(ze=_(ze)),ze.shape[0]!==De[Ge])throw new Error("gl-surface: invalid tick length");var ut=_(ze.data,De);ut.stride[Ge]=ze.stride[0],ut.stride[Ge^1]=0,this.padField(this._field[Ge],ut)}}else{for(Ge=0;Ge<2;++Ge){var et=[0,0];et[Ge]=1,this._field[Ge]=_(this._field[Ge].data,[De[0]+2,De[1]+2],et,0)}this._field[0].set(0,0,0);for(var qe=0;qe0){for(var oa=0;oa<5;++oa)xr.pop();wt-=1}continue e}}}Dt.push(wt)}this._contourOffsets[Fr]=Cn,this._contourCounts[Fr]=Dt}var Ma=f.mallocFloat(xr.length);for(Ge=0;GeB||I<0||I>B)throw new Error("gl-texture2d: Invalid texture size");return F._shape=[E,I],F.bind(),R.texImage2D(R.TEXTURE_2D,0,F.format,E,I,0,F.format,F.type,null),F._mipLevels=[0],F}function y(F,E,I,R,B,O){this.gl=F,this.handle=E,this.format=B,this.type=O,this._shape=[I,R],this._mipLevels=[0],this._magFilter=F.NEAREST,this._minFilter=F.NEAREST,this._wrapS=F.CLAMP_TO_EDGE,this._wrapT=F.CLAMP_TO_EDGE,this._anisoSamples=1;var U=this,j=[this._wrapS,this._wrapT];Object.defineProperties(j,[{get:function(){return U._wrapS},set:function(V){return U.wrapS=V}},{get:function(){return U._wrapT},set:function(V){return U.wrapT=V}}]),this._wrapVector=j;var q=[this._shape[0],this._shape[1]];Object.defineProperties(q,[{get:function(){return U._shape[0]},set:function(V){return U.width=V}},{get:function(){return U._shape[1]},set:function(V){return U.height=V}}]),this._shapeVector=q}var C=y.prototype;Object.defineProperties(C,{minFilter:{get:function(){return this._minFilter},set:function(F){this.bind();var E=this.gl;if(this.type===E.FLOAT&&c.indexOf(F)>=0&&(E.getExtension("OES_texture_float_linear")||(F=E.NEAREST)),f.indexOf(F)<0)throw new Error("gl-texture2d: Unknown filter mode "+F);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MIN_FILTER,F),this._minFilter=F}},magFilter:{get:function(){return this._magFilter},set:function(F){this.bind();var E=this.gl;if(this.type===E.FLOAT&&c.indexOf(F)>=0&&(E.getExtension("OES_texture_float_linear")||(F=E.NEAREST)),f.indexOf(F)<0)throw new Error("gl-texture2d: Unknown filter mode "+F);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MAG_FILTER,F),this._magFilter=F}},mipSamples:{get:function(){return this._anisoSamples},set:function(F){var E=this._anisoSamples;if(this._anisoSamples=Math.max(F,1)|0,E!==this._anisoSamples){var I=this.gl.getExtension("EXT_texture_filter_anisotropic");I&&this.gl.texParameterf(this.gl.TEXTURE_2D,I.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(F){if(this.bind(),v.indexOf(F)<0)throw new Error("gl-texture2d: Unknown wrap mode "+F);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,F),this._wrapS=F}},wrapT:{get:function(){return this._wrapT},set:function(F){if(this.bind(),v.indexOf(F)<0)throw new Error("gl-texture2d: Unknown wrap mode "+F);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,F),this._wrapT=F}},wrap:{get:function(){return this._wrapVector},set:function(F){if(Array.isArray(F)||(F=[F,F]),F.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var E=0;E<2;++E)if(v.indexOf(F[E])<0)throw new Error("gl-texture2d: Unknown wrap mode "+F);this._wrapS=F[0],this._wrapT=F[1];var I=this.gl;return this.bind(),I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_S,this._wrapS),I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_T,this._wrapT),F}},shape:{get:function(){return this._shapeVector},set:function(F){if(!Array.isArray(F))F=[F|0,F|0];else if(F.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return x(this,F[0]|0,F[1]|0),[F[0]|0,F[1]|0]}},width:{get:function(){return this._shape[0]},set:function(F){return F=F|0,x(this,F,this._shape[1]),F}},height:{get:function(){return this._shape[1]},set:function(F){return F=F|0,x(this,this._shape[0],F),F}}}),C.bind=function(F){var E=this.gl;return F!==void 0&&E.activeTexture(E.TEXTURE0+(F|0)),E.bindTexture(E.TEXTURE_2D,this.handle),F!==void 0?F|0:E.getParameter(E.ACTIVE_TEXTURE)-E.TEXTURE0},C.dispose=function(){this.gl.deleteTexture(this.handle)},C.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var F=Math.min(this._shape[0],this._shape[1]),E=0;F>0;++E,F>>>=1)this._mipLevels.indexOf(E)<0&&this._mipLevels.push(E)},C.setPixels=function(F,E,I,R){var B=this.gl;this.bind(),Array.isArray(E)?(R=I,I=E[1]|0,E=E[0]|0):(E=E||0,I=I||0),R=R||0;var O=p(F)?F:F.raw;if(O){var U=this._mipLevels.indexOf(R)<0;U?(B.texImage2D(B.TEXTURE_2D,0,this.format,this.format,this.type,O),this._mipLevels.push(R)):B.texSubImage2D(B.TEXTURE_2D,R,E,I,this.format,this.type,O)}else if(F.shape&&F.stride&&F.data){if(F.shape.length<2||E+F.shape[1]>this._shape[1]>>>R||I+F.shape[0]>this._shape[0]>>>R||E<0||I<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");S(B,E,I,R,this.format,this.type,this._mipLevels,F)}else throw new Error("gl-texture2d: Unsupported data type")};function k(F,E){return F.length===3?E[2]===1&&E[1]===F[0]*F[2]&&E[0]===F[2]:E[0]===1&&E[1]===F[0]}function S(F,E,I,R,B,O,U,j){var q=j.dtype,V=j.shape.slice();if(V.length<2||V.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var K=0,ee=0,ce=k(V,j.stride.slice());q==="float32"?K=F.FLOAT:q==="float64"?(K=F.FLOAT,ce=!1,q="float32"):q==="uint8"?K=F.UNSIGNED_BYTE:(K=F.UNSIGNED_BYTE,ce=!1,q="uint8");var me=1;if(V.length===2)ee=F.LUMINANCE,V=[V[0],V[1],1],j=s(j.data,V,[j.stride[0],j.stride[1],1],j.offset);else if(V.length===3){if(V[2]===1)ee=F.ALPHA;else if(V[2]===2)ee=F.LUMINANCE_ALPHA;else if(V[2]===3)ee=F.RGB;else if(V[2]===4)ee=F.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");me=V[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((ee===F.LUMINANCE||ee===F.ALPHA)&&(B===F.LUMINANCE||B===F.ALPHA)&&(ee=B),ee!==B)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ye=j.size,ue=U.indexOf(R)<0;if(ue&&U.push(R),K===O&&ce)j.offset===0&&j.data.length===ye?ue?F.texImage2D(F.TEXTURE_2D,R,B,V[0],V[1],0,B,O,j.data):F.texSubImage2D(F.TEXTURE_2D,R,E,I,V[0],V[1],B,O,j.data):ue?F.texImage2D(F.TEXTURE_2D,R,B,V[0],V[1],0,B,O,j.data.subarray(j.offset,j.offset+ye)):F.texSubImage2D(F.TEXTURE_2D,R,E,I,V[0],V[1],B,O,j.data.subarray(j.offset,j.offset+ye));else{var J;O===F.FLOAT?J=u.mallocFloat32(ye):J=u.mallocUint8(ye);var _e=s(J,V,[V[2],V[2]*V[0],1]);K===F.FLOAT&&O===F.UNSIGNED_BYTE?_(_e,j):l.assign(_e,j),ue?F.texImage2D(F.TEXTURE_2D,R,B,V[0],V[1],0,B,O,J.subarray(0,ye)):F.texSubImage2D(F.TEXTURE_2D,R,E,I,V[0],V[1],B,O,J.subarray(0,ye)),O===F.FLOAT?u.freeFloat32(J):u.freeUint8(J)}}function L(F){var E=F.createTexture();return F.bindTexture(F.TEXTURE_2D,E),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_MIN_FILTER,F.NEAREST),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_MAG_FILTER,F.NEAREST),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_S,F.CLAMP_TO_EDGE),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_T,F.CLAMP_TO_EDGE),E}function w(F,E,I,R,B){var O=F.getParameter(F.MAX_TEXTURE_SIZE);if(E<0||E>O||I<0||I>O)throw new Error("gl-texture2d: Invalid texture shape");if(B===F.FLOAT&&!F.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var U=L(F);return F.texImage2D(F.TEXTURE_2D,0,R,E,I,0,R,B,null),new y(F,U,E,I,R,B)}function T(F,E,I,R,B,O){var U=L(F);return F.texImage2D(F.TEXTURE_2D,0,B,B,O,E),new y(F,U,I,R,B,O)}function A(F,E){var I=E.dtype,R=E.shape.slice(),B=F.getParameter(F.MAX_TEXTURE_SIZE);if(R[0]<0||R[0]>B||R[1]<0||R[1]>B)throw new Error("gl-texture2d: Invalid texture size");var O=k(R,E.stride.slice()),U=0;I==="float32"?U=F.FLOAT:I==="float64"?(U=F.FLOAT,O=!1,I="float32"):I==="uint8"?U=F.UNSIGNED_BYTE:(U=F.UNSIGNED_BYTE,O=!1,I="uint8");var j=0;if(R.length===2)j=F.LUMINANCE,R=[R[0],R[1],1],E=s(E.data,R,[E.stride[0],E.stride[1],1],E.offset);else if(R.length===3)if(R[2]===1)j=F.ALPHA;else if(R[2]===2)j=F.LUMINANCE_ALPHA;else if(R[2]===3)j=F.RGB;else if(R[2]===4)j=F.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");U===F.FLOAT&&!F.getExtension("OES_texture_float")&&(U=F.UNSIGNED_BYTE,O=!1);var q,V,K=E.size;if(O)E.offset===0&&E.data.length===K?q=E.data:q=E.data.subarray(E.offset,E.offset+K);else{var ee=[R[2],R[2]*R[0],1];V=u.malloc(K,I);var ce=s(V,R,ee,0);(I==="float32"||I==="float64")&&U===F.UNSIGNED_BYTE?_(ce,E):l.assign(ce,E),q=V.subarray(0,K)}var me=L(F);return F.texImage2D(F.TEXTURE_2D,0,j,R[0],R[1],0,j,U,q),O||u.free(V),new y(F,me,R[0],R[1],j,U)}function m(F){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||g(F),typeof arguments[1]=="number")return w(F,arguments[1],arguments[2],arguments[3]||F.RGBA,arguments[4]||F.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return w(F,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||F.RGBA,arguments[3]||F.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var E=arguments[1],I=p(E)?E:E.raw;if(I)return T(F,I,E.width|0,E.height|0,arguments[2]||F.RGBA,arguments[3]||F.UNSIGNED_BYTE);if(E.shape&&E.data&&E.stride)return A(F,E)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433(a){"use strict";function i(o,s,l){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var u=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(l){if(l.length>u)throw new Error("gl-vao: Too many vertex attributes");for(var c=0;c1?0:Math.acos(_)}},9226(a){a.exports=i;function i(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}},3126(a){a.exports=i;function i(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}},3990(a){a.exports=i;function i(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}},1091(a){a.exports=i;function i(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}},5911(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=l[0],g=l[1],p=l[2];return o[0]=c*p-f*g,o[1]=f*v-u*p,o[2]=u*g-c*v,o}},5455(a,i,o){a.exports=o(7056)},7056(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return Math.sqrt(l*l+u*u+c*c)}},4008(a,i,o){a.exports=o(6690)},6690(a){a.exports=i;function i(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o}},244(a){a.exports=i;function i(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}},2613(a){a.exports=1e-6},9922(a,i,o){a.exports=l;var s=o(2613);function l(u,c){var f=u[0],v=u[1],g=u[2],p=c[0],_=c[1],x=c[2];return Math.abs(f-p)<=s*Math.max(1,Math.abs(f),Math.abs(p))&&Math.abs(v-_)<=s*Math.max(1,Math.abs(v),Math.abs(_))&&Math.abs(g-x)<=s*Math.max(1,Math.abs(g),Math.abs(x))}},9265(a){a.exports=i;function i(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}},2681(a){a.exports=i;function i(o,s){return o[0]=Math.floor(s[0]),o[1]=Math.floor(s[1]),o[2]=Math.floor(s[2]),o}},5137(a,i,o){a.exports=l;var s=o(1091)();function l(u,c,f,v,g,p){var _,x;for(c||(c=3),f||(f=0),v?x=Math.min(v*c+f,u.length):x=u.length,_=f;_0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}},7636(a){a.exports=i;function i(o,s){s=s||1;var l=Math.random()*2*Math.PI,u=Math.random()*2-1,c=Math.sqrt(1-u*u)*s;return o[0]=Math.cos(l)*c,o[1]=Math.sin(l)*c,o[2]=u*s,o}},6894(a){a.exports=i;function i(o,s,l,u){var c=l[1],f=l[2],v=s[1]-c,g=s[2]-f,p=Math.sin(u),_=Math.cos(u);return o[0]=s[0],o[1]=c+v*_-g*p,o[2]=f+v*p+g*_,o}},109(a){a.exports=i;function i(o,s,l,u){var c=l[0],f=l[2],v=s[0]-c,g=s[2]-f,p=Math.sin(u),_=Math.cos(u);return o[0]=c+g*p+v*_,o[1]=s[1],o[2]=f+g*_-v*p,o}},8692(a){a.exports=i;function i(o,s,l,u){var c=l[0],f=l[1],v=s[0]-c,g=s[1]-f,p=Math.sin(u),_=Math.cos(u);return o[0]=c+v*_-g*p,o[1]=f+v*p+g*_,o[2]=s[2],o}},2447(a){a.exports=i;function i(o,s){return o[0]=Math.round(s[0]),o[1]=Math.round(s[1]),o[2]=Math.round(s[2]),o}},6621(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o}},8489(a){a.exports=i;function i(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o}},1463(a){a.exports=i;function i(o,s,l,u){return o[0]=s,o[1]=l,o[2]=u,o}},6141(a,i,o){a.exports=o(2953)},5486(a,i,o){a.exports=o(3066)},2953(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return l*l+u*u+c*c}},3066(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2];return s*s+l*l+u*u}},2229(a,i,o){a.exports=o(6843)},6843(a){a.exports=i;function i(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o}},492(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2];return o[0]=u*l[0]+c*l[3]+f*l[6],o[1]=u*l[1]+c*l[4]+f*l[7],o[2]=u*l[2]+c*l[5]+f*l[8],o}},5673(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=l[3]*u+l[7]*c+l[11]*f+l[15];return v=v||1,o[0]=(l[0]*u+l[4]*c+l[8]*f+l[12])/v,o[1]=(l[1]*u+l[5]*c+l[9]*f+l[13])/v,o[2]=(l[2]*u+l[6]*c+l[10]*f+l[14])/v,o}},264(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=l[0],g=l[1],p=l[2],_=l[3],x=g*f-p*c,y=p*u-v*f,C=v*c-g*u;return x*=2,y*=2,C*=2,o[0]=u+_*x+g*C-p*y,o[1]=c+_*y+p*x-v*C,o[2]=f+_*C+v*y-g*x,o}},4361(a){a.exports=i;function i(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o[3]=s[3]+l[3],o}},2335(a){a.exports=i;function i(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}},2933(a){a.exports=i;function i(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}},7536(a){a.exports=i;function i(){var o=new Float32Array(4);return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o}},4691(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return Math.sqrt(l*l+u*u+c*c+f*f)}},1373(a){a.exports=i;function i(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o[3]=s[3]/l[3],o}},3750(a){a.exports=i;function i(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]*s[3]}},3390(a){a.exports=i;function i(o,s,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}},9970(a,i,o){a.exports={create:o(7536),clone:o(2335),fromValues:o(3390),copy:o(2933),set:o(4578),add:o(4361),subtract:o(6860),multiply:o(3576),divide:o(1373),min:o(2334),max:o(160),scale:o(9288),scaleAndAdd:o(4844),distance:o(4691),squaredDistance:o(7960),length:o(6808),squaredLength:o(483),negate:o(1498),inverse:o(4494),normalize:o(5177),dot:o(3750),lerp:o(2573),random:o(9131),transformMat4:o(5352),transformQuat:o(4041)}},4494(a){a.exports=i;function i(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}},6808(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2],c=o[3];return Math.sqrt(s*s+l*l+u*u+c*c)}},2573(a){a.exports=i;function i(o,s,l,u){var c=s[0],f=s[1],v=s[2],g=s[3];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=v+u*(l[2]-v),o[3]=g+u*(l[3]-g),o}},160(a){a.exports=i;function i(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o[3]=Math.max(s[3],l[3]),o}},2334(a){a.exports=i;function i(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o[3]=Math.min(s[3],l[3]),o}},3576(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o[3]=s[3]*l[3],o}},1498(a){a.exports=i;function i(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o[3]=-s[3],o}},5177(a){a.exports=i;function i(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],v=l*l+u*u+c*c+f*f;return v>0&&(v=1/Math.sqrt(v),o[0]=l*v,o[1]=u*v,o[2]=c*v,o[3]=f*v),o}},9131(a,i,o){var s=o(5177),l=o(9288);a.exports=u;function u(c,f){return f=f||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),s(c,c),l(c,c,f),c}},9288(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o}},4844(a){a.exports=i;function i(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o[3]=s[3]+l[3]*u,o}},4578(a){a.exports=i;function i(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}},7960(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return l*l+u*u+c*c+f*f}},483(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2],c=o[3];return s*s+l*l+u*u+c*c}},6860(a){a.exports=i;function i(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o[3]=s[3]-l[3],o}},5352(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=s[3];return o[0]=l[0]*u+l[4]*c+l[8]*f+l[12]*v,o[1]=l[1]*u+l[5]*c+l[9]*f+l[13]*v,o[2]=l[2]*u+l[6]*c+l[10]*f+l[14]*v,o[3]=l[3]*u+l[7]*c+l[11]*f+l[15]*v,o}},4041(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=l[0],g=l[1],p=l[2],_=l[3],x=_*u+g*f-p*c,y=_*c+p*u-v*f,C=_*f+v*c-g*u,k=-v*u-g*c-p*f;return o[0]=x*_+k*-v+y*-p-C*-g,o[1]=y*_+k*-g+C*-v-x*-p,o[2]=C*_+k*-p+x*-g-y*-v,o[3]=s[3],o}},1848(a,i,o){var s=o(4905),l=o(6468);a.exports=u;function u(c){for(var f=Array.isArray(c)?c:s(c),v=0;v0)continue;ot=Te.slice(0,1).join("")}return xe(ot),ye+=ot.length,q=q.slice(ot.length),q.length}while(!0)}function qe(){return/[^a-fA-F0-9]/.test(U)?(xe(q.join("")),O=v,R):(q.push(U),j=U,R+1)}function we(){return U==="."||/[eE]/.test(U)?(q.push(U),O=k,j=U,R+1):U==="x"&&q.length===1&&q[0]==="0"?(O=m,q.push(U),j=U,R+1):/[^\d]/.test(U)?(xe(q.join("")),O=v,R):(q.push(U),j=U,R+1)}function Le(){return U==="f"&&(q.push(U),j=U,R+=1),/[eE]/.test(U)||(U==="-"||U==="+")&&/[eE]/.test(j)?(q.push(U),j=U,R+1):/[^\d]/.test(U)?(xe(q.join("")),O=v,R):(q.push(U),j=U,R+1)}function Ke(){if(/[^\d\w_]/.test(U)){var Te=q.join("");return le[Te]?O=w:ie[Te]?O=L:O=S,xe(q.join("")),O=v,R}return q.push(U),j=U,R+1}}},3508(a,i,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\_|texture)/.test(l)}),a.exports=s.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(a){a.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(a,i,o){var s=o(620);a.exports=s.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(a){a.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(a){a.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905(a,i,o){var s=o(5874);a.exports=l;function l(u,c){var f=s(c),v=[];return v=v.concat(f(u)),v=v.concat(f(null)),v}},3236(a){a.exports=function(i){typeof i=="string"&&(i=[i]);for(var o=[].slice.call(arguments,1),s=[],l=0;l>1,x=-7,y=l?c-1:0,C=l?-1:1,k=o[s+y];for(y+=C,f=k&(1<<-x)-1,k>>=-x,x+=g;x>0;f=f*256+o[s+y],y+=C,x-=8);for(v=f&(1<<-x)-1,f>>=-x,x+=u;x>0;v=v*256+o[s+y],y+=C,x-=8);if(f===0)f=1-_;else{if(f===p)return v?NaN:(k?-1:1)*(1/0);v=v+Math.pow(2,u),f=f-_}return(k?-1:1)*v*Math.pow(2,f-u)},i.write=function(o,s,l,u,c,f){var v,g,p,_=f*8-c-1,x=(1<<_)-1,y=x>>1,C=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=u?0:f-1,S=u?1:-1,L=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(g=isNaN(s)?1:0,v=x):(v=Math.floor(Math.log(s)/Math.LN2),s*(p=Math.pow(2,-v))<1&&(v--,p*=2),v+y>=1?s+=C/p:s+=C*Math.pow(2,1-y),s*p>=2&&(v++,p/=2),v+y>=x?(g=0,v=x):v+y>=1?(g=(s*p-1)*Math.pow(2,c),v=v+y):(g=s*Math.pow(2,y-1)*Math.pow(2,c),v=0));c>=8;o[l+k]=g&255,k+=S,g/=256,c-=8);for(v=v<0;o[l+k]=v&255,k+=S,v/=256,_-=8);o[l+k-S]|=L*128}},8954(a,i,o){"use strict";a.exports=y;var s=o(3250),l=o(6803).Fw;function u(C,k,S){this.vertices=C,this.adjacent=k,this.boundary=S,this.lastVisited=-1}u.prototype.flip=function(){var C=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=C;var k=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=k};function c(C,k,S){this.vertices=C,this.cell=k,this.index=S}function f(C,k){return l(C.vertices,k.vertices)}function v(C){return function(){var k=this.tuple;return C.apply(this,k)}}function g(C){var k=s[C+1];return k||(k=s),v(k)}var p=[];function _(C,k,S){this.dimension=C,this.vertices=k,this.simplices=S,this.interior=S.filter(function(T){return!T.boundary}),this.tuple=new Array(C+1);for(var L=0;L<=C;++L)this.tuple[L]=this.vertices[L];var w=p[C];w||(w=p[C]=g(C)),this.orient=w}var x=_.prototype;x.handleBoundaryDegeneracy=function(C,k){var S=this.dimension,L=this.vertices.length-1,w=this.tuple,T=this.vertices,A=[C];for(C.lastVisited=-L;A.length>0;){C=A.pop();for(var m=C.adjacent,F=0;F<=S;++F){var E=m[F];if(!(!E.boundary||E.lastVisited<=-L)){for(var I=E.vertices,R=0;R<=S;++R){var B=I[R];B<0?w[R]=k:w[R]=T[B]}var O=this.orient();if(O>0)return E;E.lastVisited=-L,O===0&&A.push(E)}}}return null},x.walk=function(C,k){var S=this.vertices.length-1,L=this.dimension,w=this.vertices,T=this.tuple,A=k?this.interior.length*Math.random()|0:this.interior.length-1,m=this.interior[A];e:for(;!m.boundary;){for(var F=m.vertices,E=m.adjacent,I=0;I<=L;++I)T[I]=w[F[I]];m.lastVisited=S;for(var I=0;I<=L;++I){var R=E[I];if(!(R.lastVisited>=S)){var B=T[I];T[I]=C;var O=this.orient();if(T[I]=B,O<0){m=R;continue e}else R.boundary?R.lastVisited=-S:R.lastVisited=S}}return}return m},x.addPeaks=function(C,k){var S=this.vertices.length-1,L=this.dimension,w=this.vertices,T=this.tuple,A=this.interior,m=this.simplices,F=[k];k.lastVisited=S,k.vertices[k.vertices.indexOf(-1)]=S,k.boundary=!1,A.push(k);for(var E=[];F.length>0;){var k=F.pop(),I=k.vertices,R=k.adjacent,B=I.indexOf(S);if(!(B<0)){for(var O=0;O<=L;++O)if(O!==B){var U=R[O];if(!(!U.boundary||U.lastVisited>=S)){var j=U.vertices;if(U.lastVisited!==-S){for(var q=0,V=0;V<=L;++V)j[V]<0?(q=V,T[V]=C):T[V]=w[j[V]];var K=this.orient();if(K>0){j[q]=S,U.boundary=!1,A.push(U),F.push(U),U.lastVisited=S;continue}else U.lastVisited=-S}var ee=U.adjacent,ce=I.slice(),me=R.slice(),ye=new u(ce,me,!0);m.push(ye);var ue=ee.indexOf(k);if(!(ue<0)){ee[ue]=ye,me[B]=U,ce[O]=-1,me[O]=k,R[O]=ye,ye.flip();for(var V=0;V<=L;++V){var J=ce[V];if(!(J<0||J===S)){for(var _e=new Array(L-1),ne=0,ae=0;ae<=L;++ae){var pe=ce[ae];pe<0||ae===V||(_e[ne++]=pe)}E.push(new c(_e,ye,V))}}}}}}}E.sort(f);for(var O=0;O+1=0?A[F++]=m[I]:E=I&1;if(E===(C&1)){var R=A[0];A[0]=A[1],A[1]=R}k.push(A)}}return k};function y(C,k){var S=C.length;if(S===0)throw new Error("Must have at least d+1 points");var L=C[0].length;if(S<=L)throw new Error("Must input at least d+1 points");var w=C.slice(0,L+1),T=s.apply(void 0,w);if(T===0)throw new Error("Input not in general position");for(var A=new Array(L+1),m=0;m<=L;++m)A[m]=m;T<0&&(A[0]=1,A[1]=0);for(var F=new u(A,new Array(L+1),!1),E=F.adjacent,I=new Array(L+2),m=0;m<=L;++m){for(var R=A.slice(),B=0;B<=L;++B)B===m&&(R[B]=-1);var O=R[0];R[0]=R[1],R[1]=O;var U=new u(R,new Array(L+1),!0);E[m]=U,I[m]=U}I[L+1]=F;for(var m=0;m<=L;++m)for(var R=E[m].vertices,j=E[m].adjacent,B=0;B<=L;++B){var q=R[B];if(q<0){j[B]=F;continue}for(var V=0;V<=L;++V)E[V].vertices.indexOf(q)<0&&(j[B]=E[V])}for(var K=new _(L,w,I),ee=!!k,m=L+1;m3*(I+1)?_(this,E):this.left.insert(E):this.left=T([E]);else if(E[0]>this.mid)this.right?4*(this.right.count+1)>3*(I+1)?_(this,E):this.right.insert(E):this.right=T([E]);else{var R=s.ge(this.leftPoints,E,L),B=s.ge(this.rightPoints,E,w);this.leftPoints.splice(R,0,E),this.rightPoints.splice(B,0,E)}},v.remove=function(E){var I=this.count-this.leftPoints;if(E[1]3*(I-1))return x(this,E);var B=this.left.remove(E);return B===c?(this.left=null,this.count-=1,u):(B===u&&(this.count-=1),B)}else if(E[0]>this.mid){if(!this.right)return l;var O=this.left?this.left.count:0;if(4*O>3*(I-1))return x(this,E);var B=this.right.remove(E);return B===c?(this.right=null,this.count-=1,u):(B===u&&(this.count-=1),B)}else{if(this.count===1)return this.leftPoints[0]===E?c:l;if(this.leftPoints.length===1&&this.leftPoints[0]===E){if(this.left&&this.right){for(var U=this,j=this.left;j.right;)U=j,j=j.right;if(U===this)j.right=this.right;else{var q=this.left,B=this.right;U.count-=j.count,U.right=j.left,j.left=q,j.right=B}g(this,j),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 u}for(var q=s.ge(this.leftPoints,E,L);q=0&&E[B][1]>=I;--B){var O=R(E[B]);if(O)return O}}function k(E,I){for(var R=0;Rthis.mid){if(this.right){var R=this.right.queryPoint(E,I);if(R)return R}return C(this.rightPoints,E,I)}else return k(this.leftPoints,I)},v.queryInterval=function(E,I,R){if(Ethis.mid&&this.right){var B=this.right.queryInterval(E,I,R);if(B)return B}return Ithis.mid?C(this.rightPoints,E,R):k(this.leftPoints,R)};function S(E,I){return E-I}function L(E,I){var R=E[0]-I[0];return R||E[1]-I[1]}function w(E,I){var R=E[1]-I[1];return R||E[0]-I[0]}function T(E){if(E.length===0)return null;for(var I=[],R=0;R>1],O=[],U=[],j=[],R=0;R1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(f=!0),f}},5219(a){"use strict";a.exports=function(i){for(var o=i.length,s,l=0;l13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}},395(a){function i(o,s,l){return o*(1-l)+s*l}a.exports=i},2652(a,i,o){var s=o(4335),l=o(6864),u=o(1903),c=o(9921),f=o(7608),v=o(5665),g={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},p=l(),_=l(),x=[0,0,0,0],y=[[0,0,0],[0,0,0],[0,0,0]],C=[0,0,0];a.exports=function(T,A,m,F,E,I){if(A||(A=[0,0,0]),m||(m=[0,0,0]),F||(F=[0,0,0]),E||(E=[0,0,0,1]),I||(I=[0,0,0,1]),!s(p,T)||(u(_,p),_[3]=0,_[7]=0,_[11]=0,_[15]=1,Math.abs(c(_)<1e-8)))return!1;var R=p[3],B=p[7],O=p[11],U=p[12],j=p[13],q=p[14],V=p[15];if(R!==0||B!==0||O!==0){x[0]=R,x[1]=B,x[2]=O,x[3]=V;var K=f(_,_);if(!K)return!1;v(_,_),k(E,x,_)}else E[0]=E[1]=E[2]=0,E[3]=1;if(A[0]=U,A[1]=j,A[2]=q,S(y,p),m[0]=g.length(y[0]),g.normalize(y[0],y[0]),F[0]=g.dot(y[0],y[1]),L(y[1],y[1],y[0],1,-F[0]),m[1]=g.length(y[1]),g.normalize(y[1],y[1]),F[0]/=m[1],F[1]=g.dot(y[0],y[2]),L(y[2],y[2],y[0],1,-F[1]),F[2]=g.dot(y[1],y[2]),L(y[2],y[2],y[1],1,-F[2]),m[2]=g.length(y[2]),g.normalize(y[2],y[2]),F[1]/=m[2],F[2]/=m[2],g.cross(C,y[1],y[2]),g.dot(y[0],C)<0)for(var ee=0;ee<3;ee++)m[ee]*=-1,y[ee][0]*=-1,y[ee][1]*=-1,y[ee][2]*=-1;return I[0]=.5*Math.sqrt(Math.max(1+y[0][0]-y[1][1]-y[2][2],0)),I[1]=.5*Math.sqrt(Math.max(1-y[0][0]+y[1][1]-y[2][2],0)),I[2]=.5*Math.sqrt(Math.max(1-y[0][0]-y[1][1]+y[2][2],0)),I[3]=.5*Math.sqrt(Math.max(1+y[0][0]+y[1][1]+y[2][2],0)),y[2][1]>y[1][2]&&(I[0]=-I[0]),y[0][2]>y[2][0]&&(I[1]=-I[1]),y[1][0]>y[0][1]&&(I[2]=-I[2]),!0};function k(w,T,A){var m=T[0],F=T[1],E=T[2],I=T[3];return w[0]=A[0]*m+A[4]*F+A[8]*E+A[12]*I,w[1]=A[1]*m+A[5]*F+A[9]*E+A[13]*I,w[2]=A[2]*m+A[6]*F+A[10]*E+A[14]*I,w[3]=A[3]*m+A[7]*F+A[11]*E+A[15]*I,w}function S(w,T){w[0][0]=T[0],w[0][1]=T[1],w[0][2]=T[2],w[1][0]=T[4],w[1][1]=T[5],w[1][2]=T[6],w[2][0]=T[8],w[2][1]=T[9],w[2][2]=T[10]}function L(w,T,A,m,F){w[0]=T[0]*m+A[0]*F,w[1]=T[1]*m+A[1]*F,w[2]=T[2]*m+A[2]*F}},4335(a){a.exports=function(o,s){var l=s[15];if(l===0)return!1;for(var u=1/l,c=0;c<16;c++)o[c]=s[c]*u;return!0}},7442(a,i,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),v=x(),g=x(),p=x();a.exports=_;function _(k,S,L,w){if(c(S)===0||c(L)===0)return!1;var T=u(S,v.translate,v.scale,v.skew,v.perspective,v.quaternion),A=u(L,g.translate,g.scale,g.skew,g.perspective,g.quaternion);return!T||!A?!1:(s(p.translate,v.translate,g.translate,w),s(p.skew,v.skew,g.skew,w),s(p.scale,v.scale,g.scale,w),s(p.perspective,v.perspective,g.perspective,w),f(p.quaternion,v.quaternion,g.quaternion,w),l(k,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}function x(){return{translate:y(),scale:y(1),skew:y(),perspective:C(),quaternion:C()}}function y(k){return[k||0,k||0,k||0]}function C(){return[0,0,0,1]}},7182(a,i,o){var s={identity:o(7894),translate:o(7656),multiply:o(6760),create:o(6864),scale:o(2504),fromRotationTranslation:o(6743)},l=s.create(),u=s.create();a.exports=function(f,v,g,p,_,x){return s.identity(f),s.fromRotationTranslation(f,x,v),f[3]=_[0],f[7]=_[1],f[11]=_[2],f[15]=_[3],s.identity(u),p[2]!==0&&(u[9]=p[2],s.multiply(f,f,u)),p[1]!==0&&(u[9]=0,u[8]=p[1],s.multiply(f,f,u)),p[0]!==0&&(u[8]=0,u[4]=p[0],s.multiply(f,f,u)),s.scale(f,f,g),f}},1811(a,i,o){"use strict";var s=o(2478),l=o(7442),u=o(7608),c=o(5567),f=o(2408),v=o(7089),g=o(6582),p=o(7656),_=o(2504),x=o(3536),y=[0,0,0];a.exports=L;function C(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 k=C.prototype;k.recalcMatrix=function(w){var T=this._time,A=s.le(T,w),m=this.computedMatrix;if(!(A<0)){var F=this._components;if(A===T.length-1)for(var E=16*A,I=0;I<16;++I)m[I]=F[E++];else{for(var R=T[A+1]-T[A],E=16*A,B=this.prevMatrix,O=!0,I=0;I<16;++I)B[I]=F[E++];for(var U=this.nextMatrix,I=0;I<16;++I)U[I]=F[E++],O=O&&B[I]===U[I];if(R<1e-6||O)for(var I=0;I<16;++I)m[I]=B[I];else l(m,B,U,(w-T[A])/R)}var j=this.computedUp;j[0]=m[1],j[1]=m[5],j[2]=m[9],x(j,j);var q=this.computedInverse;u(q,m);var V=this.computedEye,K=q[15];V[0]=q[12]/K,V[1]=q[13]/K,V[2]=q[14]/K;for(var ee=this.computedCenter,ce=Math.exp(this.computedRadius[0]),I=0;I<3;++I)ee[I]=V[I]-m[2+4*I]*ce}},k.idle=function(w){if(!(w1&&s(u[g[y-2]],u[g[y-1]],x)<=0;)y-=1,g.pop();for(g.push(_),y=p.length;y>1&&s(u[p[y-2]],u[p[y-1]],x)>=0;)y-=1,p.pop();p.push(_)}for(var C=new Array(p.length+g.length-2),k=0,f=0,S=g.length;f0;--L)C[k++]=p[L];return C}},351(a,i,o){"use strict";a.exports=l;var s=o(4687);function l(u,c){c||(c=u,u=window);var f=0,v=0,g=0,p={shift:!1,alt:!1,control:!1,meta:!1},_=!1;function x(E){var I=!1;return"altKey"in E&&(I=I||E.altKey!==p.alt,p.alt=!!E.altKey),"shiftKey"in E&&(I=I||E.shiftKey!==p.shift,p.shift=!!E.shiftKey),"ctrlKey"in E&&(I=I||E.ctrlKey!==p.control,p.control=!!E.ctrlKey),"metaKey"in E&&(I=I||E.metaKey!==p.meta,p.meta=!!E.metaKey),I}function y(E,I){var R=s.x(I),B=s.y(I);"buttons"in I&&(E=I.buttons|0),(E!==f||R!==v||B!==g||x(I))&&(f=E|0,v=R||0,g=B||0,c&&c(f,v,g,p))}function C(E){y(0,E)}function k(){(f||v||g||p.shift||p.alt||p.meta||p.control)&&(v=g=0,f=0,p.shift=p.alt=p.control=p.meta=!1,c&&c(0,0,0,p))}function S(E){x(E)&&c&&c(f,v,g,p)}function L(E){s.buttons(E)===0?y(0,E):y(f,E)}function w(E){y(f|s.buttons(E),E)}function T(E){y(f&~s.buttons(E),E)}function A(){_||(_=!0,u.addEventListener("mousemove",L),u.addEventListener("mousedown",w),u.addEventListener("mouseup",T),u.addEventListener("mouseleave",C),u.addEventListener("mouseenter",C),u.addEventListener("mouseout",C),u.addEventListener("mouseover",C),u.addEventListener("blur",k),u.addEventListener("keyup",S),u.addEventListener("keydown",S),u.addEventListener("keypress",S),u!==window&&(window.addEventListener("blur",k),window.addEventListener("keyup",S),window.addEventListener("keydown",S),window.addEventListener("keypress",S)))}function m(){_&&(_=!1,u.removeEventListener("mousemove",L),u.removeEventListener("mousedown",w),u.removeEventListener("mouseup",T),u.removeEventListener("mouseleave",C),u.removeEventListener("mouseenter",C),u.removeEventListener("mouseout",C),u.removeEventListener("mouseover",C),u.removeEventListener("blur",k),u.removeEventListener("keyup",S),u.removeEventListener("keydown",S),u.removeEventListener("keypress",S),u!==window&&(window.removeEventListener("blur",k),window.removeEventListener("keyup",S),window.removeEventListener("keydown",S),window.removeEventListener("keypress",S)))}A();var F={element:u};return Object.defineProperties(F,{enabled:{get:function(){return _},set:function(E){E?A():m()},enumerable:!0},buttons:{get:function(){return f},enumerable:!0},x:{get:function(){return v},enumerable:!0},y:{get:function(){return g},enumerable:!0},mods:{get:function(){return p},enumerable:!0}}),F}},24(a){var i={left:0,top:0};a.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,v=l.clientY||0,g=s(u);return c[0]=f-g.left,c[1]=v-g.top,c}function s(l){return l===window||l===document||l===document.body?i:l.getBoundingClientRect()}},4687(a,i){"use strict";function o(c){if(typeof c=="object"){if("buttons"in c)return c.buttons;if("which"in c){var f=c.which;if(f===2)return 4;if(f===3)return 2;if(f>0)return 1<=0)return 1<0){if(me=1,J[ne++]=p(A[I],k,S,L),I+=K,w>0)for(ce=1,R=A[I],ae=J[ne]=p(R,k,S,L),le=J[ne+pe],De=J[ne+xe],tt=J[ne+Ge],(ae!==le||ae!==De||ae!==tt)&&(O=A[I+B],j=A[I+U],V=A[I+q],v(ce,me,R,O,j,V,ae,le,De,tt,k,S,L),Oe=_e[ne]=ye++),ne+=1,I+=K,ce=2;ce0)for(ce=1,R=A[I],ae=J[ne]=p(R,k,S,L),le=J[ne+pe],De=J[ne+xe],tt=J[ne+Ge],(ae!==le||ae!==De||ae!==tt)&&(O=A[I+B],j=A[I+U],V=A[I+q],v(ce,me,R,O,j,V,ae,le,De,tt,k,S,L),Oe=_e[ne]=ye++,tt!==De&&g(_e[ne+xe],Oe,j,V,De,tt,k,S,L)),ne+=1,I+=K,ce=2;ce0){if(ce=1,J[ne++]=p(A[I],k,S,L),I+=K,T>0)for(me=1,R=A[I],ae=J[ne]=p(R,k,S,L),De=J[ne+xe],le=J[ne+pe],tt=J[ne+Ge],(ae!==De||ae!==le||ae!==tt)&&(O=A[I+B],j=A[I+U],V=A[I+q],v(ce,me,R,O,j,V,ae,De,le,tt,k,S,L),Oe=_e[ne]=ye++),ne+=1,I+=K,me=2;me0)for(me=1,R=A[I],ae=J[ne]=p(R,k,S,L),De=J[ne+xe],le=J[ne+pe],tt=J[ne+Ge],(ae!==De||ae!==le||ae!==tt)&&(O=A[I+B],j=A[I+U],V=A[I+q],v(ce,me,R,O,j,V,ae,De,le,tt,k,S,L),Oe=_e[ne]=ye++,tt!==De&&g(_e[ne+xe],Oe,V,O,tt,De,k,S,L)),ne+=1,I+=K,me=2;me 0"),typeof f.vertex!="function"&&v("Must specify vertex creation function"),typeof f.cell!="function"&&v("Must specify cell creation function"),typeof f.phase!="function"&&v("Must specify phase function");for(var x=f.getters||[],y=new Array(p),C=0;C=0?y[C]=!0:y[C]=!1;return u(f.vertex,f.cell,f.phase,_,g,y)}},6199(a,i,o){"use strict";var s=o(1338),l={zero:function(L,w,T,A){var m=L[0],F=T[0];A|=0;var E=0,I=F;for(E=0;E2&&E[1]>2&&A(F.pick(-1,-1).lo(1,1).hi(E[0]-2,E[1]-2),m.pick(-1,-1,0).lo(1,1).hi(E[0]-2,E[1]-2),m.pick(-1,-1,1).lo(1,1).hi(E[0]-2,E[1]-2)),E[1]>2&&(T(F.pick(0,-1).lo(1).hi(E[1]-2),m.pick(0,-1,1).lo(1).hi(E[1]-2)),w(m.pick(0,-1,0).lo(1).hi(E[1]-2))),E[1]>2&&(T(F.pick(E[0]-1,-1).lo(1).hi(E[1]-2),m.pick(E[0]-1,-1,1).lo(1).hi(E[1]-2)),w(m.pick(E[0]-1,-1,0).lo(1).hi(E[1]-2))),E[0]>2&&(T(F.pick(-1,0).lo(1).hi(E[0]-2),m.pick(-1,0,0).lo(1).hi(E[0]-2)),w(m.pick(-1,0,1).lo(1).hi(E[0]-2))),E[0]>2&&(T(F.pick(-1,E[1]-1).lo(1).hi(E[0]-2),m.pick(-1,E[1]-1,0).lo(1).hi(E[0]-2)),w(m.pick(-1,E[1]-1,1).lo(1).hi(E[0]-2))),m.set(0,0,0,0),m.set(0,0,1,0),m.set(E[0]-1,0,0,0),m.set(E[0]-1,0,1,0),m.set(0,E[1]-1,0,0),m.set(0,E[1]-1,1,0),m.set(E[0]-1,E[1]-1,0,0),m.set(E[0]-1,E[1]-1,1,0),m}}function S(L){var w=L.join(),E=p[w];if(E)return E;for(var T=L.length,A=[x,y],m=1;m<=T;++m)A.push(C(m));var F=k,E=F.apply(void 0,A);return p[w]=E,E}a.exports=function(w,T,A){if(Array.isArray(A)||(typeof A=="string"?A=s(T.dimension,A):A=s(T.dimension,"clamp")),T.size===0)return w;if(T.dimension===0)return w.set(0),w;var m=S(A);return m(w,T)}},4317(a){"use strict";function i(c,f){var v=Math.floor(f),g=f-v,p=0<=v&&v0;){j<64?(w=j,j=0):(w=64,j-=64);for(var q=p[1]|0;q>0;){q<64?(T=q,q=0):(T=64,q-=64),y=O+j*m+q*F,S=U+j*I+q*R;var V=0,K=0,ee=0,ce=E,me=m-A*E,ye=F-w*m,ue=B,J=I-A*B,_e=R-w*I;for(ee=0;ee0;){R<64?(w=R,R=0):(w=64,R-=64);for(var B=p[0]|0;B>0;){B<64?(L=B,B=0):(L=64,B-=64),y=E+R*A+B*T,S=I+R*F+B*m;var O=0,U=0,j=A,q=T-w*A,V=F,K=m-w*F;for(U=0;U0;){U<64?(T=U,U=0):(T=64,U-=64);for(var j=p[0]|0;j>0;){j<64?(L=j,j=0):(L=64,j-=64);for(var q=p[1]|0;q>0;){q<64?(w=q,q=0):(w=64,q-=64),y=B+U*F+j*A+q*m,S=O+U*R+j*E+q*I;var V=0,K=0,ee=0,ce=F,me=A-T*F,ye=m-L*A,ue=R,J=E-T*R,_e=I-L*E;for(ee=0;eeC;){V=0,K=O-w;t:for(j=0;jce)break t;K+=E,V+=I}for(V=O,K=O-w,j=0;j>1,q=j-B,V=j+B,K=O,ee=q,ce=j,me=V,ye=U,ue=k+1,J=S-1,_e=!0,ne,ae,pe,ie,le,xe,be,De,Ge,pt=0,tt=0,Oe=0,ze,ut,et,qe,we,Le,Ke,Te,Ve,$e,ot,rt,it,We,mt,bt,Yt=F,jt=x(Yt),mr=x(Yt);ut=T*K,et=T*ee,bt=w;e:for(ze=0;ze0){ae=K,K=ee,ee=ae;break e}if(Oe<0)break e;bt+=I}ut=T*me,et=T*ye,bt=w;e:for(ze=0;ze0){ae=me,me=ye,ye=ae;break e}if(Oe<0)break e;bt+=I}ut=T*K,et=T*ce,bt=w;e:for(ze=0;ze0){ae=K,K=ce,ce=ae;break e}if(Oe<0)break e;bt+=I}ut=T*ee,et=T*ce,bt=w;e:for(ze=0;ze0){ae=ee,ee=ce,ce=ae;break e}if(Oe<0)break e;bt+=I}ut=T*K,et=T*me,bt=w;e:for(ze=0;ze0){ae=K,K=me,me=ae;break e}if(Oe<0)break e;bt+=I}ut=T*ce,et=T*me,bt=w;e:for(ze=0;ze0){ae=ce,ce=me,me=ae;break e}if(Oe<0)break e;bt+=I}ut=T*ee,et=T*ye,bt=w;e:for(ze=0;ze0){ae=ee,ee=ye,ye=ae;break e}if(Oe<0)break e;bt+=I}ut=T*ee,et=T*ce,bt=w;e:for(ze=0;ze0){ae=ee,ee=ce,ce=ae;break e}if(Oe<0)break e;bt+=I}ut=T*me,et=T*ye,bt=w;e:for(ze=0;ze0){ae=me,me=ye,ye=ae;break e}if(Oe<0)break e;bt+=I}for(ut=T*K,et=T*ee,qe=T*ce,we=T*me,Le=T*ye,Ke=T*O,Te=T*j,Ve=T*U,mt=0,bt=w,ze=0;ze0)J--;else if(Oe<0){for(ut=T*xe,et=T*ue,qe=T*J,bt=w,ze=0;ze0)for(;;){be=w+J*T,mt=0;e:for(ze=0;ze0){if(--JU){e:for(;;){for(be=w+ue*T,mt=0,bt=w,ze=0;ze1&&C?S(y,C[0],C[1]):S(y)}var g={"uint32,1,0":function(_,x){return function(y){var C=y.data,k=y.offset|0,S=y.shape,L=y.stride,w=L[0]|0,T=S[0]|0,A=L[1]|0,m=S[1]|0,F=A,E=A,I=1;T<=32?_(0,T-1,C,k,w,A,T,m,F,E,I):x(0,T-1,C,k,w,A,T,m,F,E,I)}}};function p(_,x){var y=[x,_].join(","),C=g[y],k=c(_,x),S=v(_,x,k);return C(k,S)}a.exports=p},446(a,i,o){"use strict";var s=o(7640),l={};function u(c){var f=c.order,v=c.dtype,g=[f,v],p=g.join(":"),_=l[p];return _||(l[p]=_=s(f,v)),_(c),c}a.exports=u},9618(a,i,o){var s=o(7163),l=typeof Float64Array!="undefined";function u(x,y){return x[0]-y[0]}function c(){var x=this.stride,y=new Array(x.length),C;for(C=0;C=0&&(A=w|0,T+=F*A,m-=A),new k(this.data,m,F,T)},S.step=function(w){var T=this.shape[0],A=this.stride[0],m=this.offset,F=0,E=Math.ceil;return typeof w=="number"&&(F=w|0,F<0?(m+=A*(T-1),T=E(-T/F)):T=E(T/F),A*=F),new k(this.data,T,A,m)},S.transpose=function(w){w=w===void 0?0:w|0;var T=this.shape,A=this.stride;return new k(this.data,T[w],A[w],this.offset)},S.pick=function(w){var T=[],A=[],m=this.offset;typeof w=="number"&&w>=0?m=m+this.stride[0]*w|0:(T.push(this.shape[0]),A.push(this.stride[0]));var F=y[T.length+1];return F(this.data,T,A,m)},function(w,T,A,m){return new k(w,T[0],A[0],m)}},2:function(x,y,C){function k(L,w,T,A,m,F){this.data=L,this.shape=[w,T],this.stride=[A,m],this.offset=F|0}var S=k.prototype;return S.dtype=x,S.dimension=2,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(S,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),S.set=function(w,T,A){return x==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*T,A):this.data[this.offset+this.stride[0]*w+this.stride[1]*T]=A},S.get=function(w,T){return x==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*T):this.data[this.offset+this.stride[0]*w+this.stride[1]*T]},S.index=function(w,T){return this.offset+this.stride[0]*w+this.stride[1]*T},S.hi=function(w,T){return new k(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof T!="number"||T<0?this.shape[1]:T|0,this.stride[0],this.stride[1],this.offset)},S.lo=function(w,T){var A=this.offset,m=0,F=this.shape[0],E=this.shape[1],I=this.stride[0],R=this.stride[1];return typeof w=="number"&&w>=0&&(m=w|0,A+=I*m,F-=m),typeof T=="number"&&T>=0&&(m=T|0,A+=R*m,E-=m),new k(this.data,F,E,I,R,A)},S.step=function(w,T){var A=this.shape[0],m=this.shape[1],F=this.stride[0],E=this.stride[1],I=this.offset,R=0,B=Math.ceil;return typeof w=="number"&&(R=w|0,R<0?(I+=F*(A-1),A=B(-A/R)):A=B(A/R),F*=R),typeof T=="number"&&(R=T|0,R<0?(I+=E*(m-1),m=B(-m/R)):m=B(m/R),E*=R),new k(this.data,A,m,F,E,I)},S.transpose=function(w,T){w=w===void 0?0:w|0,T=T===void 0?1:T|0;var A=this.shape,m=this.stride;return new k(this.data,A[w],A[T],m[w],m[T],this.offset)},S.pick=function(w,T){var A=[],m=[],F=this.offset;typeof w=="number"&&w>=0?F=F+this.stride[0]*w|0:(A.push(this.shape[0]),m.push(this.stride[0])),typeof T=="number"&&T>=0?F=F+this.stride[1]*T|0:(A.push(this.shape[1]),m.push(this.stride[1]));var E=y[A.length+1];return E(this.data,A,m,F)},function(w,T,A,m){return new k(w,T[0],T[1],A[0],A[1],m)}},3:function(x,y,C){function k(L,w,T,A,m,F,E,I){this.data=L,this.shape=[w,T,A],this.stride=[m,F,E],this.offset=I|0}var S=k.prototype;return S.dtype=x,S.dimension=3,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(S,"order",{get:function(){var w=Math.abs(this.stride[0]),T=Math.abs(this.stride[1]),A=Math.abs(this.stride[2]);return w>T?T>A?[2,1,0]:w>A?[1,2,0]:[1,0,2]:w>A?[2,0,1]:A>T?[0,1,2]:[0,2,1]}}),S.set=function(w,T,A,m){return x==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*T+this.stride[2]*A,m):this.data[this.offset+this.stride[0]*w+this.stride[1]*T+this.stride[2]*A]=m},S.get=function(w,T,A){return x==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*T+this.stride[2]*A):this.data[this.offset+this.stride[0]*w+this.stride[1]*T+this.stride[2]*A]},S.index=function(w,T,A){return this.offset+this.stride[0]*w+this.stride[1]*T+this.stride[2]*A},S.hi=function(w,T,A){return new k(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof A!="number"||A<0?this.shape[2]:A|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},S.lo=function(w,T,A){var m=this.offset,F=0,E=this.shape[0],I=this.shape[1],R=this.shape[2],B=this.stride[0],O=this.stride[1],U=this.stride[2];return typeof w=="number"&&w>=0&&(F=w|0,m+=B*F,E-=F),typeof T=="number"&&T>=0&&(F=T|0,m+=O*F,I-=F),typeof A=="number"&&A>=0&&(F=A|0,m+=U*F,R-=F),new k(this.data,E,I,R,B,O,U,m)},S.step=function(w,T,A){var m=this.shape[0],F=this.shape[1],E=this.shape[2],I=this.stride[0],R=this.stride[1],B=this.stride[2],O=this.offset,U=0,j=Math.ceil;return typeof w=="number"&&(U=w|0,U<0?(O+=I*(m-1),m=j(-m/U)):m=j(m/U),I*=U),typeof T=="number"&&(U=T|0,U<0?(O+=R*(F-1),F=j(-F/U)):F=j(F/U),R*=U),typeof A=="number"&&(U=A|0,U<0?(O+=B*(E-1),E=j(-E/U)):E=j(E/U),B*=U),new k(this.data,m,F,E,I,R,B,O)},S.transpose=function(w,T,A){w=w===void 0?0:w|0,T=T===void 0?1:T|0,A=A===void 0?2:A|0;var m=this.shape,F=this.stride;return new k(this.data,m[w],m[T],m[A],F[w],F[T],F[A],this.offset)},S.pick=function(w,T,A){var m=[],F=[],E=this.offset;typeof w=="number"&&w>=0?E=E+this.stride[0]*w|0:(m.push(this.shape[0]),F.push(this.stride[0])),typeof T=="number"&&T>=0?E=E+this.stride[1]*T|0:(m.push(this.shape[1]),F.push(this.stride[1])),typeof A=="number"&&A>=0?E=E+this.stride[2]*A|0:(m.push(this.shape[2]),F.push(this.stride[2]));var I=y[m.length+1];return I(this.data,m,F,E)},function(w,T,A,m){return new k(w,T[0],T[1],T[2],A[0],A[1],A[2],m)}},4:function(x,y,C){function k(L,w,T,A,m,F,E,I,R,B){this.data=L,this.shape=[w,T,A,m],this.stride=[F,E,I,R],this.offset=B|0}var S=k.prototype;return S.dtype=x,S.dimension=4,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(S,"order",{get:C}),S.set=function(w,T,A,m,F){return x==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*T+this.stride[2]*A+this.stride[3]*m,F):this.data[this.offset+this.stride[0]*w+this.stride[1]*T+this.stride[2]*A+this.stride[3]*m]=F},S.get=function(w,T,A,m){return x==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*T+this.stride[2]*A+this.stride[3]*m):this.data[this.offset+this.stride[0]*w+this.stride[1]*T+this.stride[2]*A+this.stride[3]*m]},S.index=function(w,T,A,m){return this.offset+this.stride[0]*w+this.stride[1]*T+this.stride[2]*A+this.stride[3]*m},S.hi=function(w,T,A,m){return new k(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof A!="number"||A<0?this.shape[2]:A|0,typeof m!="number"||m<0?this.shape[3]:m|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},S.lo=function(w,T,A,m){var F=this.offset,E=0,I=this.shape[0],R=this.shape[1],B=this.shape[2],O=this.shape[3],U=this.stride[0],j=this.stride[1],q=this.stride[2],V=this.stride[3];return typeof w=="number"&&w>=0&&(E=w|0,F+=U*E,I-=E),typeof T=="number"&&T>=0&&(E=T|0,F+=j*E,R-=E),typeof A=="number"&&A>=0&&(E=A|0,F+=q*E,B-=E),typeof m=="number"&&m>=0&&(E=m|0,F+=V*E,O-=E),new k(this.data,I,R,B,O,U,j,q,V,F)},S.step=function(w,T,A,m){var F=this.shape[0],E=this.shape[1],I=this.shape[2],R=this.shape[3],B=this.stride[0],O=this.stride[1],U=this.stride[2],j=this.stride[3],q=this.offset,V=0,K=Math.ceil;return typeof w=="number"&&(V=w|0,V<0?(q+=B*(F-1),F=K(-F/V)):F=K(F/V),B*=V),typeof T=="number"&&(V=T|0,V<0?(q+=O*(E-1),E=K(-E/V)):E=K(E/V),O*=V),typeof A=="number"&&(V=A|0,V<0?(q+=U*(I-1),I=K(-I/V)):I=K(I/V),U*=V),typeof m=="number"&&(V=m|0,V<0?(q+=j*(R-1),R=K(-R/V)):R=K(R/V),j*=V),new k(this.data,F,E,I,R,B,O,U,j,q)},S.transpose=function(w,T,A,m){w=w===void 0?0:w|0,T=T===void 0?1:T|0,A=A===void 0?2:A|0,m=m===void 0?3:m|0;var F=this.shape,E=this.stride;return new k(this.data,F[w],F[T],F[A],F[m],E[w],E[T],E[A],E[m],this.offset)},S.pick=function(w,T,A,m){var F=[],E=[],I=this.offset;typeof w=="number"&&w>=0?I=I+this.stride[0]*w|0:(F.push(this.shape[0]),E.push(this.stride[0])),typeof T=="number"&&T>=0?I=I+this.stride[1]*T|0:(F.push(this.shape[1]),E.push(this.stride[1])),typeof A=="number"&&A>=0?I=I+this.stride[2]*A|0:(F.push(this.shape[2]),E.push(this.stride[2])),typeof m=="number"&&m>=0?I=I+this.stride[3]*m|0:(F.push(this.shape[3]),E.push(this.stride[3]));var R=y[F.length+1];return R(this.data,F,E,I)},function(w,T,A,m){return new k(w,T[0],T[1],T[2],T[3],A[0],A[1],A[2],A[3],m)}},5:function(y,C,k){function S(w,T,A,m,F,E,I,R,B,O,U,j){this.data=w,this.shape=[T,A,m,F,E],this.stride=[I,R,B,O,U],this.offset=j|0}var L=S.prototype;return L.dtype=y,L.dimension=5,Object.defineProperty(L,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(L,"order",{get:k}),L.set=function(T,A,m,F,E,I){return y==="generic"?this.data.set(this.offset+this.stride[0]*T+this.stride[1]*A+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E,I):this.data[this.offset+this.stride[0]*T+this.stride[1]*A+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E]=I},L.get=function(T,A,m,F,E){return y==="generic"?this.data.get(this.offset+this.stride[0]*T+this.stride[1]*A+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E):this.data[this.offset+this.stride[0]*T+this.stride[1]*A+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E]},L.index=function(T,A,m,F,E){return this.offset+this.stride[0]*T+this.stride[1]*A+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E},L.hi=function(T,A,m,F,E){return new S(this.data,typeof T!="number"||T<0?this.shape[0]:T|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof m!="number"||m<0?this.shape[2]:m|0,typeof F!="number"||F<0?this.shape[3]:F|0,typeof E!="number"||E<0?this.shape[4]:E|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},L.lo=function(T,A,m,F,E){var I=this.offset,R=0,B=this.shape[0],O=this.shape[1],U=this.shape[2],j=this.shape[3],q=this.shape[4],V=this.stride[0],K=this.stride[1],ee=this.stride[2],ce=this.stride[3],me=this.stride[4];return typeof T=="number"&&T>=0&&(R=T|0,I+=V*R,B-=R),typeof A=="number"&&A>=0&&(R=A|0,I+=K*R,O-=R),typeof m=="number"&&m>=0&&(R=m|0,I+=ee*R,U-=R),typeof F=="number"&&F>=0&&(R=F|0,I+=ce*R,j-=R),typeof E=="number"&&E>=0&&(R=E|0,I+=me*R,q-=R),new S(this.data,B,O,U,j,q,V,K,ee,ce,me,I)},L.step=function(T,A,m,F,E){var I=this.shape[0],R=this.shape[1],B=this.shape[2],O=this.shape[3],U=this.shape[4],j=this.stride[0],q=this.stride[1],V=this.stride[2],K=this.stride[3],ee=this.stride[4],ce=this.offset,me=0,ye=Math.ceil;return typeof T=="number"&&(me=T|0,me<0?(ce+=j*(I-1),I=ye(-I/me)):I=ye(I/me),j*=me),typeof A=="number"&&(me=A|0,me<0?(ce+=q*(R-1),R=ye(-R/me)):R=ye(R/me),q*=me),typeof m=="number"&&(me=m|0,me<0?(ce+=V*(B-1),B=ye(-B/me)):B=ye(B/me),V*=me),typeof F=="number"&&(me=F|0,me<0?(ce+=K*(O-1),O=ye(-O/me)):O=ye(O/me),K*=me),typeof E=="number"&&(me=E|0,me<0?(ce+=ee*(U-1),U=ye(-U/me)):U=ye(U/me),ee*=me),new S(this.data,I,R,B,O,U,j,q,V,K,ee,ce)},L.transpose=function(T,A,m,F,E){T=T===void 0?0:T|0,A=A===void 0?1:A|0,m=m===void 0?2:m|0,F=F===void 0?3:F|0,E=E===void 0?4:E|0;var I=this.shape,R=this.stride;return new S(this.data,I[T],I[A],I[m],I[F],I[E],R[T],R[A],R[m],R[F],R[E],this.offset)},L.pick=function(T,A,m,F,E){var I=[],R=[],B=this.offset;typeof T=="number"&&T>=0?B=B+this.stride[0]*T|0:(I.push(this.shape[0]),R.push(this.stride[0])),typeof A=="number"&&A>=0?B=B+this.stride[1]*A|0:(I.push(this.shape[1]),R.push(this.stride[1])),typeof m=="number"&&m>=0?B=B+this.stride[2]*m|0:(I.push(this.shape[2]),R.push(this.stride[2])),typeof F=="number"&&F>=0?B=B+this.stride[3]*F|0:(I.push(this.shape[3]),R.push(this.stride[3])),typeof E=="number"&&E>=0?B=B+this.stride[4]*E|0:(I.push(this.shape[4]),R.push(this.stride[4]));var O=C[I.length+1];return O(this.data,I,R,B)},function(T,A,m,F){return new S(T,A[0],A[1],A[2],A[3],A[4],m[0],m[1],m[2],m[3],m[4],F)}}};function v(x,y){var C=y===-1?"T":String(y),k=f[C];return y===-1?k(x):y===0?k(x,p[x][0]):k(x,p[x],c)}function g(x){if(s(x))return"buffer";if(l)switch(Object.prototype.toString.call(x)){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(x)?"array":"generic"}var p={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function _(x,y,C,k){if(x===void 0){var m=p.array[0];return m([])}else typeof x=="number"&&(x=[x]);y===void 0&&(y=[x.length]);var S=y.length;if(C===void 0){C=new Array(S);for(var L=S-1,w=1;L>=0;--L)C[L]=w,w*=y[L]}if(k===void 0){k=0;for(var L=0;L>>0;a.exports=c;function c(f,v){if(isNaN(f)||isNaN(v))return NaN;if(f===v)return f;if(f===0)return v<0?-l:l;var g=s.hi(f),p=s.lo(f);return v>f==f>0?p===u?(g+=1,p=0):p+=1:p===0?(p=u,g-=1):p-=1,s.pack(p,g)}},8406(a,i){var o=1e-6,s=1e-6;i.vertexNormals=function(l,u,c){for(var f=u.length,v=new Array(f),g=c===void 0?o:c,p=0;pg)for(var I=v[y],R=1/Math.sqrt(A*F),E=0;E<3;++E){var B=(E+1)%3,O=(E+2)%3;I[E]+=R*(m[B]*T[O]-m[O]*T[B])}}for(var p=0;pg)for(var R=1/Math.sqrt(U),E=0;E<3;++E)I[E]*=R;else for(var E=0;E<3;++E)I[E]=0}return v},i.faceNormals=function(l,u,c){for(var f=l.length,v=new Array(f),g=c===void 0?s:c,p=0;pg?L=1/Math.sqrt(L):L=0;for(var y=0;y<3;++y)S[y]*=L;v[p]=S}return v}},4081(a){"use strict";a.exports=i;function i(o,s,l,u,c,f,v,g,p,_){var x=s+f+_;if(y>0){var y=Math.sqrt(x+1);o[0]=.5*(v-p)/y,o[1]=.5*(g-u)/y,o[2]=.5*(l-f)/y,o[3]=.5*y}else{var C=Math.max(s,f,_),y=Math.sqrt(2*C-x+1);s>=C?(o[0]=.5*y,o[1]=.5*(c+l)/y,o[2]=.5*(g+u)/y,o[3]=.5*(v-p)/y):f>=C?(o[0]=.5*(l+c)/y,o[1]=.5*y,o[2]=.5*(p+v)/y,o[3]=.5*(g-u)/y):(o[0]=.5*(u+g)/y,o[1]=.5*(v+p)/y,o[2]=.5*y,o[3]=.5*(l-c)/y)}return o}},9977(a,i,o){"use strict";a.exports=y;var s=o(9215),l=o(6582),u=o(7399),c=o(7608),f=o(4081);function v(C,k,S){return Math.sqrt(Math.pow(C,2)+Math.pow(k,2)+Math.pow(S,2))}function g(C,k,S,L){return Math.sqrt(Math.pow(C,2)+Math.pow(k,2)+Math.pow(S,2)+Math.pow(L,2))}function p(C,k){var S=k[0],L=k[1],w=k[2],T=k[3],A=g(S,L,w,T);A>1e-6?(C[0]=S/A,C[1]=L/A,C[2]=w/A,C[3]=T/A):(C[0]=C[1]=C[2]=0,C[3]=1)}function _(C,k,S){this.radius=s([S]),this.center=s(k),this.rotation=s(C),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 x=_.prototype;x.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},x.recalcMatrix=function(C){this.radius.curve(C),this.center.curve(C),this.rotation.curve(C);var k=this.computedRotation;p(k,k);var S=this.computedMatrix;u(S,k);var L=this.computedCenter,w=this.computedEye,T=this.computedUp,A=Math.exp(this.computedRadius[0]);w[0]=L[0]+A*S[2],w[1]=L[1]+A*S[6],w[2]=L[2]+A*S[10],T[0]=S[1],T[1]=S[5],T[2]=S[9];for(var m=0;m<3;++m){for(var F=0,E=0;E<3;++E)F+=S[m+4*E]*w[E];S[12+m]=-F}},x.getMatrix=function(C,k){this.recalcMatrix(C);var S=this.computedMatrix;if(k){for(var L=0;L<16;++L)k[L]=S[L];return k}return S},x.idle=function(C){this.center.idle(C),this.radius.idle(C),this.rotation.idle(C)},x.flush=function(C){this.center.flush(C),this.radius.flush(C),this.rotation.flush(C)},x.pan=function(C,k,S,L){k=k||0,S=S||0,L=L||0,this.recalcMatrix(C);var w=this.computedMatrix,T=w[1],A=w[5],m=w[9],F=v(T,A,m);T/=F,A/=F,m/=F;var E=w[0],I=w[4],R=w[8],B=E*T+I*A+R*m;E-=T*B,I-=A*B,R-=m*B;var O=v(E,I,R);E/=O,I/=O,R/=O;var U=w[2],j=w[6],q=w[10],V=U*T+j*A+q*m,K=U*E+j*I+q*R;U-=V*T+K*E,j-=V*A+K*I,q-=V*m+K*R;var ee=v(U,j,q);U/=ee,j/=ee,q/=ee;var ce=E*k+T*S,me=I*k+A*S,ye=R*k+m*S;this.center.move(C,ce,me,ye);var ue=Math.exp(this.computedRadius[0]);ue=Math.max(1e-4,ue+L),this.radius.set(C,Math.log(ue))},x.rotate=function(C,k,S,L){this.recalcMatrix(C),k=k||0,S=S||0;var w=this.computedMatrix,T=w[0],A=w[4],m=w[8],F=w[1],E=w[5],I=w[9],R=w[2],B=w[6],O=w[10],U=k*T+S*F,j=k*A+S*E,q=k*m+S*I,V=-(B*q-O*j),K=-(O*U-R*q),ee=-(R*j-B*U),ce=Math.sqrt(Math.max(0,1-Math.pow(V,2)-Math.pow(K,2)-Math.pow(ee,2))),me=g(V,K,ee,ce);me>1e-6?(V/=me,K/=me,ee/=me,ce/=me):(V=K=ee=0,ce=1);var ye=this.computedRotation,ue=ye[0],J=ye[1],_e=ye[2],ne=ye[3],ae=ue*ce+ne*V+J*ee-_e*K,pe=J*ce+ne*K+_e*V-ue*ee,ie=_e*ce+ne*ee+ue*K-J*V,le=ne*ce-ue*V-J*K-_e*ee;if(L){V=R,K=B,ee=O;var xe=Math.sin(L)/v(V,K,ee);V*=xe,K*=xe,ee*=xe,ce=Math.cos(k),ae=ae*ce+le*V+pe*ee-ie*K,pe=pe*ce+le*K+ie*V-ae*ee,ie=ie*ce+le*ee+ae*K-pe*V,le=le*ce-ae*V-pe*K-ie*ee}var be=g(ae,pe,ie,le);be>1e-6?(ae/=be,pe/=be,ie/=be,le/=be):(ae=pe=ie=0,le=1),this.rotation.set(C,ae,pe,ie,le)},x.lookAt=function(C,k,S,L){this.recalcMatrix(C),S=S||this.computedCenter,k=k||this.computedEye,L=L||this.computedUp;var w=this.computedMatrix;l(w,k,S,L);var T=this.computedRotation;f(T,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),p(T,T),this.rotation.set(C,T[0],T[1],T[2],T[3]);for(var A=0,m=0;m<3;++m)A+=Math.pow(S[m]-k[m],2);this.radius.set(C,.5*Math.log(Math.max(A,1e-6))),this.center.set(C,S[0],S[1],S[2])},x.translate=function(C,k,S,L){this.center.move(C,k||0,S||0,L||0)},x.setMatrix=function(C,k){var S=this.computedRotation;f(S,k[0],k[1],k[2],k[4],k[5],k[6],k[8],k[9],k[10]),p(S,S),this.rotation.set(C,S[0],S[1],S[2],S[3]);var L=this.computedMatrix;c(L,k);var w=L[15];if(Math.abs(w)>1e-6){var T=L[12]/w,A=L[13]/w,m=L[14]/w;this.recalcMatrix(C);var F=Math.exp(this.computedRadius[0]);this.center.set(C,T-L[2]*F,A-L[6]*F,m-L[10]*F),this.radius.idle(C)}else this.center.idle(C),this.radius.idle(C)},x.setDistance=function(C,k){k>0&&this.radius.set(C,Math.log(k))},x.setDistanceLimits=function(C,k){C>0?C=Math.log(C):C=-1/0,k>0?k=Math.log(k):k=1/0,k=Math.max(k,C),this.radius.bounds[0][0]=C,this.radius.bounds[1][0]=k},x.getDistanceLimits=function(C){var k=this.radius.bounds;return C?(C[0]=Math.exp(k[0][0]),C[1]=Math.exp(k[1][0]),C):[Math.exp(k[0][0]),Math.exp(k[1][0])]},x.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]}},x.fromJSON=function(C){var k=this.lastT(),S=C.center;S&&this.center.set(k,S[0],S[1],S[2]);var L=C.rotation;L&&this.rotation.set(k,L[0],L[1],L[2],L[3]);var w=C.distance;w&&w>0&&this.radius.set(k,Math.log(w)),this.setDistanceLimits(C.zoomMin,C.zoomMax)};function y(C){C=C||{};var k=C.center||[0,0,0],S=C.rotation||[0,0,0,1],L=C.radius||1;k=[].slice.call(k,0,3),S=[].slice.call(S,0,4),p(S,S);var w=new _(S,k,Math.log(L));return w.setDistanceLimits(C.zoomMin,C.zoomMax),("eye"in C||"up"in C)&&w.lookAt(0,C.eye,C.center,C.up),w}},1371(a,i,o){"use strict";var s=o(3233);a.exports=function(u,c,f){return f=typeof f!="undefined"?f+"":" ",s(f,c)+u}},3202(a){a.exports=function(o,s){s||(s=[0,""]),o=String(o);var l=parseFloat(o,10);return s[0]=l,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}},3088(a,i,o){"use strict";a.exports=l;var s=o(3140);function l(u,c){for(var f=c.length|0,v=u.length,g=[new Array(f),new Array(f)],p=0;p0){I=g[O][F][0],B=O;break}R=I[B^1];for(var U=0;U<2;++U)for(var j=g[U][F],q=0;q0&&(I=V,R=K,B=U)}return E||I&&y(I,B),R}function k(m,F){var E=g[F][m][0],I=[m];y(E,F);for(var R=E[F^1],B=F;;){for(;R!==m;)I.push(R),R=C(I[I.length-2],R,!1);if(g[0][m].length+g[1][m].length===0)break;var O=I[I.length-1],U=m,j=I[1],q=C(O,U,!0);if(s(c[O],c[U],c[j],c[q])<0)break;I.push(m),R=C(O,U)}return I}function S(m,F){return F[1]===F[F.length-1]}for(var p=0;p0;){var T=g[0][p].length,A=k(p,L);S(w,A)?w.push.apply(w,A):(w.length>0&&x.push(w),w=A)}w.length>0&&x.push(w)}return x}},5609(a,i,o){"use strict";a.exports=l;var s=o(3134);function l(u,c){for(var f=s(u,c.length),v=new Array(c.length),g=new Array(c.length),p=[],_=0;_0;){var y=p.pop();v[y]=!1;for(var C=f[y],_=0;_0}T=T.filter(A);for(var m=T.length,F=new Array(m),E=new Array(m),w=0;w0;){var be=ie.pop(),De=me[be];v(De,function(ze,ut){return ze-ut});var Ge=De.length,pt=le[be],tt;if(pt===0){var j=T[be];tt=[j]}for(var w=0;w=0)&&(le[Oe]=pt^1,ie.push(Oe),pt===0)){var j=T[Oe];pe(j)||(j.reverse(),tt.push(j))}}pt===0&&xe.push(tt)}return xe}},5085(a,i,o){a.exports=C;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function v(k){return function(S,L){var w=k[S];return w?!!w.queryPoint(L,f):!1}}function g(k){for(var S={},L=0;L0&&S[w]===L[0])T=k[w-1];else return 1;for(var A=1;T;){var m=T.key,F=s(L,m[0],m[1]);if(m[0][0]0)A=-1,T=T.right;else return 0;else if(F>0)T=T.left;else if(F<0)A=1,T=T.right;else return 0}return A}}function _(k){return 1}function x(k){return function(L){return k(L[0],L[1])?0:1}}function y(k,S){return function(w){return k(w[0],w[1])?0:S(w)}}function C(k){for(var S=k.length,L=[],w=[],T=0,A=0;A=_?(m=1,E=_+2*C+S):(m=-C/_,E=C*m+S)):(m=0,k>=0?(F=0,E=S):-k>=y?(F=1,E=y+2*k+S):(F=-k/y,E=k*F+S));else if(F<0)F=0,C>=0?(m=0,E=S):-C>=_?(m=1,E=_+2*C+S):(m=-C/_,E=C*m+S);else{var I=1/A;m*=I,F*=I,E=m*(_*m+x*F+2*C)+F*(x*m+y*F+2*k)+S}else{var R,B,O,U;m<0?(R=x+C,B=y+k,B>R?(O=B-R,U=_-2*x+y,O>=U?(m=1,F=0,E=_+2*C+S):(m=O/U,F=1-m,E=m*(_*m+x*F+2*C)+F*(x*m+y*F+2*k)+S)):(m=0,B<=0?(F=1,E=y+2*k+S):k>=0?(F=0,E=S):(F=-k/y,E=k*F+S))):F<0?(R=x+k,B=_+C,B>R?(O=B-R,U=_-2*x+y,O>=U?(F=1,m=0,E=y+2*k+S):(F=O/U,m=1-F,E=m*(_*m+x*F+2*C)+F*(x*m+y*F+2*k)+S)):(F=0,B<=0?(m=1,E=_+2*C+S):C>=0?(m=0,E=S):(m=-C/_,E=C*m+S))):(O=y+k-x-C,O<=0?(m=0,F=1,E=y+2*k+S):(U=_-2*x+y,O>=U?(m=1,F=0,E=_+2*C+S):(m=O/U,F=1-m,E=m*(_*m+x*F+2*C)+F*(x*m+y*F+2*k)+S)))}for(var j=1-m-F,p=0;p0){var y=f[g-1];if(s(_,y)===0&&u(y)!==x){g-=1;continue}}f[g++]=_}}return f.length=g,f}},3233(a){"use strict";var i="",o;a.exports=s;function s(l,u){if(typeof l!="string")throw new TypeError("expected a string");if(u===1)return l;if(u===2)return l+l;var c=l.length*u;if(o!==l||typeof o=="undefined")o=l,i="";else if(i.length>=c)return i.substr(0,c);for(;c>i.length&&u>1;)u&1&&(i+=l),u>>=1,l+=l;return i+=l,i=i.substr(0,c),i}},3025(a,i,o){a.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004(a){"use strict";a.exports=i;function i(o){for(var s=o.length,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,v=o[c];l=f+v;var g=l-f,p=v-g;p&&(o[--u]=l,l=p)}for(var _=0,c=u;c0){if(B<=0)return O;U=R+B}else if(R<0){if(B>=0)return O;U=-(R+B)}else return O;var j=g*U;return O>=j||O<=-j?O:k(F,E,I)},function(F,E,I,R){var B=F[0]-R[0],O=E[0]-R[0],U=I[0]-R[0],j=F[1]-R[1],q=E[1]-R[1],V=I[1]-R[1],K=F[2]-R[2],ee=E[2]-R[2],ce=I[2]-R[2],me=O*V,ye=U*q,ue=U*j,J=B*V,_e=B*q,ne=O*j,ae=K*(me-ye)+ee*(ue-J)+ce*(_e-ne),pe=(Math.abs(me)+Math.abs(ye))*Math.abs(K)+(Math.abs(ue)+Math.abs(J))*Math.abs(ee)+(Math.abs(_e)+Math.abs(ne))*Math.abs(ce),ie=p*pe;return ae>ie||-ae>ie?ae:S(F,E,I,R)}];function w(m){var F=L[m.length];return F||(F=L[m.length]=C(m.length)),F.apply(void 0,m)}function T(m,F,E,I,R,B,O){return function(j,q,V,K,ee){switch(arguments.length){case 0:case 1:return 0;case 2:return I(j,q);case 3:return R(j,q,V);case 4:return B(j,q,V,K);case 5:return O(j,q,V,K,ee)}for(var ce=new Array(arguments.length),me=0;me0&&_>0||p<0&&_<0)return!1;var x=s(v,c,f),y=s(g,c,f);return x>0&&y>0||x<0&&y<0?!1:p===0&&_===0&&x===0&&y===0?l(c,f,v,g):!0}},8545(a){"use strict";a.exports=o;function i(s,l){var u=s+l,c=u-s,f=u-c,v=l-c,g=s-f,p=g+v;return p?[p,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return i(s[0],-l[0]);var f=u+c,v=new Array(f),g=0,p=0,_=0,x=Math.abs,y=s[p],C=x(y),k=-l[_],S=x(k),L,w;C=c?(L=y,p+=1,p=c?(L=y,p+=1,p>1,k=f[2*C+1];if(k===_)return C;_>1,k=f[2*C+1];if(k===_)return C;_>1,k=f[2*C+1];if(k===_)return C;_>1,k=f[2*C+1];if(k===_)return C;_>1,U=g(F[O],E);U<=0?(U===0&&(B=O),I=O+1):U>0&&(R=O-1)}return B}s=y;function C(F,E){for(var I=new Array(F.length),R=0,B=I.length;R=F.length||g(F[me],O)!==0););}return I}s=C;function k(F,E){if(!E)return C(x(L(F,0)),F,0);for(var I=new Array(E),R=0;R>>V&1&&q.push(B[V]);E.push(q)}return _(E)}s=S;function L(F,E){if(E<0)return[];for(var I=[],R=(1<0)-(u<0)},i.abs=function(u){var c=u>>o-1;return(u^c)-c},i.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},i.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},i.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}i.countTrailingZeros=s,i.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},i.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},i.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,v=c,g=7;for(f>>>=1;f;f>>>=1)v<<=1,v|=f&1,--g;u[c]=v<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},i.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},i.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},i.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},i.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},i.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},2014(a,i,o){"use strict";"use restrict";var s=o(3105),l=o(4623);function u(m){for(var F=0,E=Math.max,I=0,R=m.length;I>1,O=v(m[B],F);O<=0?(O===0&&(R=B),E=B+1):O>0&&(I=B-1)}return R}i.findCell=x;function y(m,F){for(var E=new Array(m.length),I=0,R=E.length;I=m.length||v(m[ce],B)!==0););}return E}i.incidence=y;function C(m,F){if(!F)return y(_(S(m,0)),m,0);for(var E=new Array(F),I=0;I>>q&1&&j.push(R[q]);F.push(j)}return p(F)}i.explode=k;function S(m,F){if(F<0)return[];for(var E=[],I=(1<>1:(J>>1)-1}function I(J){for(var _e=F(J);;){var ne=_e,ae=2*J+1,pe=2*(J+1),ie=J;if(ae0;){var ne=E(J);if(ne>=0){var ae=F(ne);if(_e0){var J=j[0];return m(0,K-1),K-=1,I(0),J}return-1}function O(J,_e){var ne=j[J];return C[ne]===_e?J:(C[ne]=-1/0,R(J),B(),C[ne]=_e,K+=1,R(K-1))}function U(J){if(!k[J]){k[J]=!0;var _e=x[J],ne=y[J];x[ne]>=0&&(x[ne]=_e),y[_e]>=0&&(y[_e]=ne),q[_e]>=0&&O(q[_e],A(_e)),q[ne]>=0&&O(q[ne],A(ne))}}for(var j=[],q=new Array(p),S=0;S>1;S>=0;--S)I(S);for(;;){var ee=B();if(ee<0||C[ee]>g)break;U(ee)}for(var ce=[],S=0;S=0&&ne>=0&&_e!==ne){var ae=q[_e],pe=q[ne];ae!==pe&&ue.push([ae,pe])}}),l.unique(l.normalize(ue)),{positions:ce,edges:ue}}},1303(a,i,o){"use strict";a.exports=u;var s=o(3250);function l(c,f){var v,g;if(f[0][0]f[1][0])v=f[1],g=f[0];else{var p=Math.min(c[0][1],c[1][1]),_=Math.max(c[0][1],c[1][1]),x=Math.min(f[0][1],f[1][1]),y=Math.max(f[0][1],f[1][1]);return _y?p-y:_-y}var C,k;c[0][1]f[1][0])v=f[1],g=f[0];else return l(f,c);var p,_;if(c[0][0]c[1][0])p=c[1],_=c[0];else return-l(c,f);var x=s(v,g,_),y=s(v,g,p);if(x<0){if(y<=0)return x}else if(x>0){if(y>=0)return x}else if(y)return y;if(x=s(_,p,g),y=s(_,p,v),x<0){if(y<=0)return x}else if(x>0){if(y>=0)return x}else if(y)return y;return g[0]-_[0]}},4209(a,i,o){"use strict";a.exports=y;var s=o(2478),l=o(3840),u=o(3250),c=o(1303);function f(C,k,S){this.slabs=C,this.coordinates=k,this.horizontal=S}var v=f.prototype;function g(C,k){return C.y-k}function p(C,k){for(var S=null;C;){var L=C.key,w,T;L[0][0]0)if(k[0]!==L[1][0])S=C,C=C.right;else{var m=p(C.right,k);if(m)return m;C=C.left}else{if(k[0]!==L[1][0])return C;var m=p(C.right,k);if(m)return m;C=C.left}}return S}v.castUp=function(C){var k=s.le(this.coordinates,C[0]);if(k<0)return-1;var S=this.slabs[k],L=p(this.slabs[k],C),w=-1;if(L&&(w=L.value),this.coordinates[k]===C[0]){var T=null;if(L&&(T=L.key),k>0){var A=p(this.slabs[k-1],C);A&&(T?c(A.key,T)>0&&(T=A.key,w=A.value):(w=A.value,T=A.key))}var m=this.horizontal[k];if(m.length>0){var F=s.ge(m,C[1],g);if(F=m.length)return w;E=m[F]}}if(E.start)if(T){var I=u(T[0],T[1],[C[0],E.y]);T[0][0]>T[1][0]&&(I=-I),I>0&&(w=E.index)}else w=E.index;else E.y!==C[1]&&(w=E.index)}}}return w};function _(C,k,S,L){this.y=C,this.index=k,this.start=S,this.closed=L}function x(C,k,S,L){this.x=C,this.segment=k,this.create=S,this.index=L}function y(C){for(var k=C.length,S=2*k,L=new Array(S),w=0;w1&&(k=1);for(var S=1-k,L=p.length,w=new Array(L),T=0;T0||C>0&&w<0){var T=c(k,w,S,C);x.push(T),y.push(T.slice())}w<0?y.push(S.slice()):w>0?x.push(S.slice()):(x.push(S.slice()),y.push(S.slice())),C=w}return{positive:x,negative:y}}function v(p,_){for(var x=[],y=u(p[p.length-1],_),C=p[p.length-1],k=p[0],S=0;S0||y>0&&L<0)&&x.push(c(C,L,k,y)),L>=0&&x.push(k.slice()),y=L}return x}function g(p,_){for(var x=[],y=u(p[p.length-1],_),C=p[p.length-1],k=p[0],S=0;S0||y>0&&L<0)&&x.push(c(C,L,k,y)),L<=0&&x.push(k.slice()),y=L}return x}},3387(a,i,o){var s;(function(){"use strict";var l={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 u(p){return f(g(p),arguments)}function c(p,_){return u.apply(null,[p].concat(_||[]))}function f(p,_){var x=1,y=p.length,C,k="",S,L,w,T,A,m,F,E;for(S=0;S=0),w.type){case"b":C=parseInt(C,10).toString(2);break;case"c":C=String.fromCharCode(parseInt(C,10));break;case"d":case"i":C=parseInt(C,10);break;case"j":C=JSON.stringify(C,null,w.width?parseInt(w.width):0);break;case"e":C=w.precision?parseFloat(C).toExponential(w.precision):parseFloat(C).toExponential();break;case"f":C=w.precision?parseFloat(C).toFixed(w.precision):parseFloat(C);break;case"g":C=w.precision?String(Number(C.toPrecision(w.precision))):parseFloat(C);break;case"o":C=(parseInt(C,10)>>>0).toString(8);break;case"s":C=String(C),C=w.precision?C.substring(0,w.precision):C;break;case"t":C=String(!!C),C=w.precision?C.substring(0,w.precision):C;break;case"T":C=Object.prototype.toString.call(C).slice(8,-1).toLowerCase(),C=w.precision?C.substring(0,w.precision):C;break;case"u":C=parseInt(C,10)>>>0;break;case"v":C=C.valueOf(),C=w.precision?C.substring(0,w.precision):C;break;case"x":C=(parseInt(C,10)>>>0).toString(16);break;case"X":C=(parseInt(C,10)>>>0).toString(16).toUpperCase();break}l.json.test(w.type)?k+=C:(l.number.test(w.type)&&(!F||w.sign)?(E=F?"+":"-",C=C.toString().replace(l.sign,"")):E="",A=w.pad_char?w.pad_char==="0"?"0":w.pad_char.charAt(1):" ",m=w.width-(E+C).length,T=w.width&&m>0?A.repeat(m):"",k+=w.align?E+C+T:A==="0"?E+T+C:T+E+C)}return k}var v=Object.create(null);function g(p){if(v[p])return v[p];for(var _=p,x,y=[],C=0;_;){if((x=l.text.exec(_))!==null)y.push(x[0]);else if((x=l.modulo.exec(_))!==null)y.push("%");else if((x=l.placeholder.exec(_))!==null){if(x[2]){C|=1;var k=[],S=x[2],L=[];if((L=l.key.exec(S))!==null)for(k.push(L[1]);(S=S.substring(L[0].length))!=="";)if((L=l.key_access.exec(S))!==null)k.push(L[1]);else if((L=l.index_access.exec(S))!==null)k.push(L[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");x[2]=k}else C|=2;if(C===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");y.push({placeholder:x[0],param_no:x[1],keys:x[2],sign:x[3],pad_char:x[4],align:x[5],width:x[6],precision:x[7],type:x[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");_=_.substring(x[0].length)}return v[p]=y}i.sprintf=u,i.vsprintf=c,typeof window!="undefined"&&(window.sprintf=u,window.vsprintf=c,s=(function(){return{sprintf:u,vsprintf:c}}).call(i,o,i,a),s!==void 0&&(a.exports=s))})()},3711(a,i,o){"use strict";a.exports=g;var s=o(2640),l=o(781),u={"2d":function(p,_,x){var y=p({order:_,scalarArguments:3,getters:x==="generic"?[0]:void 0,phase:function(k,S,L,w){return k>w|0},vertex:function(k,S,L,w,T,A,m,F,E,I,R,B,O){var U=(m<<0)+(F<<1)+(E<<2)+(I<<3)|0;if(!(U===0||U===15))switch(U){case 0:R.push([k-.5,S-.5]);break;case 1:R.push([k-.25-.25*(w+L-2*O)/(L-w),S-.25-.25*(T+L-2*O)/(L-T)]);break;case 2:R.push([k-.75-.25*(-w-L+2*O)/(w-L),S-.25-.25*(A+w-2*O)/(w-A)]);break;case 3:R.push([k-.5,S-.5-.5*(T+L+A+w-4*O)/(L-T+w-A)]);break;case 4:R.push([k-.25-.25*(A+T-2*O)/(T-A),S-.75-.25*(-T-L+2*O)/(T-L)]);break;case 5:R.push([k-.5-.5*(w+L+A+T-4*O)/(L-w+T-A),S-.5]);break;case 6:R.push([k-.5-.25*(-w-L+A+T)/(w-L+T-A),S-.5-.25*(-T-L+A+w)/(T-L+w-A)]);break;case 7:R.push([k-.75-.25*(A+T-2*O)/(T-A),S-.75-.25*(A+w-2*O)/(w-A)]);break;case 8:R.push([k-.75-.25*(-A-T+2*O)/(A-T),S-.75-.25*(-A-w+2*O)/(A-w)]);break;case 9:R.push([k-.5-.25*(w+L+-A-T)/(L-w+A-T),S-.5-.25*(T+L+-A-w)/(L-T+A-w)]);break;case 10:R.push([k-.5-.5*(-w-L+-A-T+4*O)/(w-L+A-T),S-.5]);break;case 11:R.push([k-.25-.25*(-A-T+2*O)/(A-T),S-.75-.25*(T+L-2*O)/(L-T)]);break;case 12:R.push([k-.5,S-.5-.5*(-T-L+-A-w+4*O)/(T-L+A-w)]);break;case 13:R.push([k-.75-.25*(w+L-2*O)/(L-w),S-.25-.25*(-A-w+2*O)/(A-w)]);break;case 14:R.push([k-.25-.25*(-w-L+2*O)/(w-L),S-.25-.25*(-T-L+2*O)/(T-L)]);break;case 15:R.push([k-.5,S-.5]);break}},cell:function(k,S,L,w,T,A,m,F,E){T?F.push([k,S]):F.push([S,k])}});return function(C,k){var S=[],L=[];return y(C,S,L,k),{positions:S,cells:L}}}};function c(p,_){var x=p.length+"d",y=u[x];if(y)return y(s,p,_)}function f(p,_){for(var x=l(p,_),y=x.length,C=new Array(y),k=new Array(y),S=0;SMath.max(w,T)?A[2]=1:w>Math.max(L,T)?A[0]=1:A[1]=1;for(var m=0,F=0,E=0;E<3;++E)m+=S[E]*S[E],F+=A[E]*S[E];for(var E=0;E<3;++E)A[E]-=F/m*S[E];return f(A,A),A}function x(S,L,w,T,A,m,F,E){this.center=s(w),this.up=s(T),this.right=s(A),this.radius=s([m]),this.angle=s([F,E]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(S,L),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 I=0;I<16;++I)this.computedMatrix[I]=.5;this.recalcMatrix(0)}var y=x.prototype;y.setDistanceLimits=function(S,L){S>0?S=Math.log(S):S=-1/0,L>0?L=Math.log(L):L=1/0,L=Math.max(L,S),this.radius.bounds[0][0]=S,this.radius.bounds[1][0]=L},y.getDistanceLimits=function(S){var L=this.radius.bounds[0];return S?(S[0]=Math.exp(L[0][0]),S[1]=Math.exp(L[1][0]),S):[Math.exp(L[0][0]),Math.exp(L[1][0])]},y.recalcMatrix=function(S){this.center.curve(S),this.up.curve(S),this.right.curve(S),this.radius.curve(S),this.angle.curve(S);for(var L=this.computedUp,w=this.computedRight,T=0,A=0,m=0;m<3;++m)A+=L[m]*w[m],T+=L[m]*L[m];for(var F=Math.sqrt(T),E=0,m=0;m<3;++m)w[m]-=L[m]*A/T,E+=w[m]*w[m],L[m]/=F;for(var I=Math.sqrt(E),m=0;m<3;++m)w[m]/=I;var R=this.computedToward;c(R,L,w),f(R,R);for(var B=Math.exp(this.computedRadius[0]),O=this.computedAngle[0],U=this.computedAngle[1],j=Math.cos(O),q=Math.sin(O),V=Math.cos(U),K=Math.sin(U),ee=this.computedCenter,ce=j*V,me=q*V,ye=K,ue=-j*K,J=-q*K,_e=V,ne=this.computedEye,ae=this.computedMatrix,m=0;m<3;++m){var pe=ce*w[m]+me*R[m]+ye*L[m];ae[4*m+1]=ue*w[m]+J*R[m]+_e*L[m],ae[4*m+2]=pe,ae[4*m+3]=0}var ie=ae[1],le=ae[5],xe=ae[9],be=ae[2],De=ae[6],Ge=ae[10],pt=le*Ge-xe*De,tt=xe*be-ie*Ge,Oe=ie*De-le*be,ze=g(pt,tt,Oe);pt/=ze,tt/=ze,Oe/=ze,ae[0]=pt,ae[4]=tt,ae[8]=Oe;for(var m=0;m<3;++m)ne[m]=ee[m]+ae[2+4*m]*B;for(var m=0;m<3;++m){for(var E=0,ut=0;ut<3;++ut)E+=ae[m+4*ut]*ne[ut];ae[12+m]=-E}ae[15]=1},y.getMatrix=function(S,L){this.recalcMatrix(S);var w=this.computedMatrix;if(L){for(var T=0;T<16;++T)L[T]=w[T];return L}return w};var C=[0,0,0];y.rotate=function(S,L,w,T){if(this.angle.move(S,L,w),T){this.recalcMatrix(S);var A=this.computedMatrix;C[0]=A[2],C[1]=A[6],C[2]=A[10];for(var m=this.computedUp,F=this.computedRight,E=this.computedToward,I=0;I<3;++I)A[4*I]=m[I],A[4*I+1]=F[I],A[4*I+2]=E[I];u(A,A,T,C);for(var I=0;I<3;++I)m[I]=A[4*I],F[I]=A[4*I+1];this.up.set(S,m[0],m[1],m[2]),this.right.set(S,F[0],F[1],F[2])}},y.pan=function(S,L,w,T){L=L||0,w=w||0,T=T||0,this.recalcMatrix(S);var A=this.computedMatrix,m=Math.exp(this.computedRadius[0]),F=A[1],E=A[5],I=A[9],R=g(F,E,I);F/=R,E/=R,I/=R;var B=A[0],O=A[4],U=A[8],j=B*F+O*E+U*I;B-=F*j,O-=E*j,U-=I*j;var q=g(B,O,U);B/=q,O/=q,U/=q;var V=B*L+F*w,K=O*L+E*w,ee=U*L+I*w;this.center.move(S,V,K,ee);var ce=Math.exp(this.computedRadius[0]);ce=Math.max(1e-4,ce+T),this.radius.set(S,Math.log(ce))},y.translate=function(S,L,w,T){this.center.move(S,L||0,w||0,T||0)},y.setMatrix=function(S,L,w,T){var A=1;typeof w=="number"&&(A=w|0),(A<0||A>3)&&(A=1);var m=(A+2)%3,F=(A+1)%3;L||(this.recalcMatrix(S),L=this.computedMatrix);var E=L[A],I=L[A+4],R=L[A+8];if(T){var O=Math.abs(E),U=Math.abs(I),j=Math.abs(R),q=Math.max(O,U,j);O===q?(E=E<0?-1:1,I=R=0):j===q?(R=R<0?-1:1,E=I=0):(I=I<0?-1:1,E=R=0)}else{var B=g(E,I,R);E/=B,I/=B,R/=B}var V=L[m],K=L[m+4],ee=L[m+8],ce=V*E+K*I+ee*R;V-=E*ce,K-=I*ce,ee-=R*ce;var me=g(V,K,ee);V/=me,K/=me,ee/=me;var ye=I*ee-R*K,ue=R*V-E*ee,J=E*K-I*V,_e=g(ye,ue,J);ye/=_e,ue/=_e,J/=_e,this.center.jump(S,Ke,Te,Ve),this.radius.idle(S),this.up.jump(S,E,I,R),this.right.jump(S,V,K,ee);var ne,ae;if(A===2){var pe=L[1],ie=L[5],le=L[9],xe=pe*V+ie*K+le*ee,be=pe*ye+ie*ue+le*J;tt<0?ne=-Math.PI/2:ne=Math.PI/2,ae=Math.atan2(be,xe)}else{var De=L[2],Ge=L[6],pt=L[10],tt=De*E+Ge*I+pt*R,Oe=De*V+Ge*K+pt*ee,ze=De*ye+Ge*ue+pt*J;ne=Math.asin(p(tt)),ae=Math.atan2(ze,Oe)}this.angle.jump(S,ae,ne),this.recalcMatrix(S);var ut=L[2],et=L[6],qe=L[10],we=this.computedMatrix;l(we,L);var Le=we[15],Ke=we[12]/Le,Te=we[13]/Le,Ve=we[14]/Le,$e=Math.exp(this.computedRadius[0]);this.center.jump(S,Ke-ut*$e,Te-et*$e,Ve-qe*$e)},y.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},y.idle=function(S){this.center.idle(S),this.up.idle(S),this.right.idle(S),this.radius.idle(S),this.angle.idle(S)},y.flush=function(S){this.center.flush(S),this.up.flush(S),this.right.flush(S),this.radius.flush(S),this.angle.flush(S)},y.setDistance=function(S,L){L>0&&this.radius.set(S,Math.log(L))},y.lookAt=function(S,L,w,T){this.recalcMatrix(S),L=L||this.computedEye,w=w||this.computedCenter,T=T||this.computedUp;var A=T[0],m=T[1],F=T[2],E=g(A,m,F);if(!(E<1e-6)){A/=E,m/=E,F/=E;var I=L[0]-w[0],R=L[1]-w[1],B=L[2]-w[2],O=g(I,R,B);if(!(O<1e-6)){I/=O,R/=O,B/=O;var U=this.computedRight,j=U[0],q=U[1],V=U[2],K=A*j+m*q+F*V;j-=K*A,q-=K*m,V-=K*F;var ee=g(j,q,V);if(!(ee<.01&&(j=m*B-F*R,q=F*I-A*B,V=A*R-m*I,ee=g(j,q,V),ee<1e-6))){j/=ee,q/=ee,V/=ee,this.up.set(S,A,m,F),this.right.set(S,j,q,V),this.center.set(S,w[0],w[1],w[2]),this.radius.set(S,Math.log(O));var ce=m*V-F*q,me=F*j-A*V,ye=A*q-m*j,ue=g(ce,me,ye);ce/=ue,me/=ue,ye/=ue;var J=A*I+m*R+F*B,_e=j*I+q*R+V*B,ne=ce*I+me*R+ye*B,ae=Math.asin(p(J)),pe=Math.atan2(ne,_e),ie=this.angle._state,le=ie[ie.length-1],xe=ie[ie.length-2];le=le%(2*Math.PI);var be=Math.abs(le+2*Math.PI-pe),De=Math.abs(le-pe),Ge=Math.abs(le-2*Math.PI-pe);be0?V.pop():new ArrayBuffer(j)}i.mallocArrayBuffer=C;function k(U){return new Uint8Array(C(U),0,U)}i.mallocUint8=k;function S(U){return new Uint16Array(C(2*U),0,U)}i.mallocUint16=S;function L(U){return new Uint32Array(C(4*U),0,U)}i.mallocUint32=L;function w(U){return new Int8Array(C(U),0,U)}i.mallocInt8=w;function T(U){return new Int16Array(C(2*U),0,U)}i.mallocInt16=T;function A(U){return new Int32Array(C(4*U),0,U)}i.mallocInt32=A;function m(U){return new Float32Array(C(4*U),0,U)}i.mallocFloat32=i.mallocFloat=m;function F(U){return new Float64Array(C(8*U),0,U)}i.mallocFloat64=i.mallocDouble=F;function E(U){return c?new Uint8ClampedArray(C(U),0,U):k(U)}i.mallocUint8Clamped=E;function I(U){return f?new BigUint64Array(C(8*U),0,U):null}i.mallocBigUint64=I;function R(U){return v?new BigInt64Array(C(8*U),0,U):null}i.mallocBigInt64=R;function B(U){return new DataView(C(U),0,U)}i.mallocDataView=B;function O(U){U=s.nextPow2(U);var j=s.log2(U),q=_[j];return q.length>0?q.pop():new u(U)}i.mallocBuffer=O,i.clearCache=function(){for(var j=0;j<32;++j)g.UINT8[j].length=0,g.UINT16[j].length=0,g.UINT32[j].length=0,g.INT8[j].length=0,g.INT16[j].length=0,g.INT32[j].length=0,g.FLOAT[j].length=0,g.DOUBLE[j].length=0,g.BIGUINT64[j].length=0,g.BIGINT64[j].length=0,g.UINT8C[j].length=0,p[j].length=0,_[j].length=0}},1755(a){"use strict";"use restrict";a.exports=i;function i(s){this.roots=new Array(s),this.ranks=new Array(s);for(var l=0;l",V="",K=q.length,ee=V.length,ce=O[0]===C||O[0]===L,me=0,ye=-ee;me>-1&&(me=U.indexOf(q,me),!(me===-1||(ye=U.indexOf(V,me+K),ye===-1)||ye<=me));){for(var ue=me;ue=ye)j[ue]=null,U=U.substr(0,ue)+" "+U.substr(ue+1);else if(j[ue]!==null){var J=j[ue].indexOf(O[0]);J===-1?j[ue]+=O:ce&&(j[ue]=j[ue].substr(0,J+1)+(1+parseInt(j[ue][J+1]))+j[ue].substr(J+2))}var _e=me+K,ne=U.substr(_e,ye-_e),ae=ne.indexOf(q);ae!==-1?me=ae:me=ye+ee}return j}function A(B,O,U){for(var j=O.textAlign||"start",q=O.textBaseline||"alphabetic",V=[1<<30,1<<30],K=[0,0],ee=B.length,ce=0;ce/g,` +`):U=U.replace(/\/g," ");var K="",ee=[];for(le=0;le-1?parseInt(Te[1+ot]):0,We=rt>-1?parseInt(Ve[1+rt]):0;it!==We&&($e=$e.replace(Oe(),"?px "),De*=Math.pow(.75,We-it),$e=$e.replace("?px ",Oe())),be+=.25*J*(We-it)}if(V.superscripts===!0){var mt=Te.indexOf(C),bt=Ve.indexOf(C),Yt=mt>-1?parseInt(Te[1+mt]):0,jt=bt>-1?parseInt(Ve[1+bt]):0;Yt!==jt&&($e=$e.replace(Oe(),"?px "),De*=Math.pow(.75,jt-Yt),$e=$e.replace("?px ",Oe())),be-=.25*J*(jt-Yt)}if(V.bolds===!0){var mr=Te.indexOf(p)>-1,or=Ve.indexOf(p)>-1;!mr&&or&&(fr?$e=$e.replace("italic ","italic bold "):$e="bold "+$e),mr&&!or&&($e=$e.replace("bold ",""))}if(V.italics===!0){var fr=Te.indexOf(x)>-1,Ot=Ve.indexOf(x)>-1;!fr&&Ot&&($e="italic "+$e),fr&&!Ot&&($e=$e.replace("italic ",""))}O.font=$e}for(ie=0;ie0&&(q=j.size),j.lineSpacing&&j.lineSpacing>0&&(V=j.lineSpacing),j.styletags&&j.styletags.breaklines&&(K.breaklines=!!j.styletags.breaklines),j.styletags&&j.styletags.bolds&&(K.bolds=!!j.styletags.bolds),j.styletags&&j.styletags.italics&&(K.italics=!!j.styletags.italics),j.styletags&&j.styletags.subscripts&&(K.subscripts=!!j.styletags.subscripts),j.styletags&&j.styletags.superscripts&&(K.superscripts=!!j.styletags.superscripts)),U.font=[j.fontStyle,j.fontVariant,j.fontWeight,q+"px",j.font].filter(function(ce){return ce}).join(" "),U.textAlign="start",U.textBaseline="alphabetic",U.direction="ltr";var ee=m(O,U,B,q,V,K);return I(ee,j,q)}},1538(a){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function o(E){E.permitHostObjects___&&E.permitHostObjects___(o)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap=="function"){var l=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var u=new l,c=Object.freeze({});if(u.set(c,1),u.get(c)!==1)s=!0;else{a.exports=WeakMap;return}}}var f=Object.prototype.hasOwnProperty,v=Object.getOwnPropertyNames,g=Object.defineProperty,p=Object.isExtensible,_="weakmap:",x=_+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var y=new ArrayBuffer(25),C=new Uint8Array(y);crypto.getRandomValues(C),x=_+"rand:"+Array.prototype.map.call(C,function(E){return(E%36).toString(36)}).join("")+"___"}function k(E){return!(E.substr(0,_.length)==_&&E.substr(E.length-3)==="___")}if(g(Object,"getOwnPropertyNames",{value:function(I){return v(I).filter(k)}}),"getPropertyNames"in Object){var S=Object.getPropertyNames;g(Object,"getPropertyNames",{value:function(I){return S(I).filter(k)}})}function L(E){if(E!==Object(E))throw new TypeError("Not an object: "+E);var I=E[x];if(I&&I.key===E)return I;if(p(E)){I={key:E};try{return g(E,x,{value:I,writable:!1,enumerable:!1,configurable:!1}),I}catch(R){return}}}(function(){var E=Object.freeze;g(Object,"freeze",{value:function(O){return L(O),E(O)}});var I=Object.seal;g(Object,"seal",{value:function(O){return L(O),I(O)}});var R=Object.preventExtensions;g(Object,"preventExtensions",{value:function(O){return L(O),R(O)}})})();function w(E){return E.prototype=null,Object.freeze(E)}var T=!1;function A(){!T&&typeof console!="undefined"&&(T=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var m=0,F=function(){this instanceof F||A();var E=[],I=[],R=m++;function B(q,V){var K,ee=L(q);return ee?R in ee?ee[R]:V:(K=E.indexOf(q),K>=0?I[K]:V)}function O(q){var V=L(q);return V?R in V:E.indexOf(q)>=0}function U(q,V){var K,ee=L(q);return ee?ee[R]=V:(K=E.indexOf(q),K>=0?I[K]=V:(K=E.length,I[K]=V,E[K]=q)),this}function j(q){var V=L(q),K,ee;return V?R in V&&delete V[R]:(K=E.indexOf(q),K<0?!1:(ee=E.length-1,E[K]=void 0,I[K]=I[ee],E[K]=E[ee],E.length=ee,I.length=ee,!0))}return Object.create(F.prototype,{get___:{value:w(B)},has___:{value:w(O)},set___:{value:w(U)},delete___:{value:w(j)}})};F.prototype=Object.create(Object.prototype,{get:{value:function(I,R){return this.get___(I,R)},writable:!0,configurable:!0},has:{value:function(I){return this.has___(I)},writable:!0,configurable:!0},set:{value:function(I,R){return this.set___(I,R)},writable:!0,configurable:!0},delete:{value:function(I){return this.delete___(I)},writable:!0,configurable:!0}}),typeof l=="function"?(function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function E(){this instanceof F||A();var I=new l,R=void 0,B=!1;function O(V,K){return R?I.has(V)?I.get(V):R.get___(V,K):I.get(V,K)}function U(V){return I.has(V)||(R?R.has___(V):!1)}var j;s?j=function(V,K){return I.set(V,K),I.has(V)||(R||(R=new F),R.set(V,K)),this}:j=function(V,K){if(B)try{I.set(V,K)}catch(ee){R||(R=new F),R.set___(V,K)}else I.set(V,K);return this};function q(V){var K=!!I.delete(V);return R&&R.delete___(V)||K}return Object.create(F.prototype,{get___:{value:w(O)},has___:{value:w(U)},set___:{value:w(j)},delete___:{value:w(q)},permitHostObjects___:{value:w(function(V){if(V===o)B=!0;else throw new Error("bogus call to permitHostObjects___")})}})}E.prototype=F.prototype,a.exports=E,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})})():(typeof Proxy!="undefined"&&(Proxy=void 0),a.exports=F)})()},236(a,i,o){var s=o(8284);a.exports=l;function l(){var u={};return function(c){if((typeof c!="object"||c===null)&&typeof c!="function")throw new Error("Weakmap-shim: Key must be object");var f=c.valueOf(u);return f&&f.identity===u?f:s(c,u)}}},8284(a){a.exports=i;function i(o,s){var l={identity:s},u=o.valueOf;return Object.defineProperty(o,"valueOf",{value:function(c){return c!==s?u.apply(this,arguments):l},writable:!0}),l}},606(a,i,o){var s=o(236);a.exports=l;function l(){var u=s();return{get:function(c,f){var v=u(c);return v.hasOwnProperty("value")?v.value:f},set:function(c,f){return u(c).value=f,this},has:function(c){return"value"in u(c)},delete:function(c){return delete u(c).value}}}},3349(a){"use strict";function i(){return function(f,v,g,p,_,x){var y=f[0],C=g[0],k=[0],S=C;p|=0;var L=0,w=C;for(L=0;L=0!=A>=0&&_.push(k[0]+.5+.5*(T+A)/(T-A))}p+=w,++k[0]}}}function o(){return i()}var s=o;function l(f){var v={};return function(p,_,x){var y=p.dtype,C=p.order,k=[y,C.join()].join(),S=v[k];return S||(v[k]=S=f([y,C])),S(p.shape.slice(0),p.data,p.stride,p.offset|0,_,x)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}a.exports=c({funcName:"zeroCrossings"})},781(a,i,o){"use strict";a.exports=l;var s=o(3349);function l(u,c){var f=[];return c=+c||0,s(u.hi(u.shape[0]-1),f,c),f}},7790(){}};let t={};function r(a){let i=t[a];if(i!==void 0)return i.exports;let o=t[a]={id:a,loaded:!1,exports:{}};return e[a].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(a){if(typeof window=="object")return window}})(),r.nmd=a=>(a.paths=[],a.children||(a.children=[]),a);let n=r(3065);KPe.exports=n})()});var Mg=fe((O3r,JPe)=>{"use strict";var{normalize:jBt}=ni();function WBt(e){return e?jBt(e):[0,0,0,1]}JPe.exports=WBt});var Sg=fe((N3r,iFe)=>{"use strict";var rFe=aa(),cP=js(),Kw=ni(),YBt=tc().defaultLine,QPe=Gf().isArrayOrTypedArray,pY=Kw.normalize(YBt),nFe=1;function eFe(e,t){return[e[0],e[1],e[2],e[3]*t]}function vY(e){return rFe(e)||!Kw.isChannelArray(e)&&!Kw.isValid(e)?pY:Kw.normalize(e)}function tFe(e){return rFe(e)?e:nFe}function XBt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var a=QPe(n),i=QPe(t),o=cP.extractOpts(e),s=[],l,u,c,f,v;if(o.colorscale!==void 0?l=cP.makeColorScaleFuncFromTrace(e):l=vY,a?u=(p,_)=>p[_]===void 0?pY:o.colorscale===void 0?l(p[_]):Kw.normalize(l(p[_])):u=vY,i?c=function(p,_){return p[_]===void 0?nFe:tFe(p[_])}:c=tFe,a||i)for(var g=0;g{"use strict";aFe.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}});var fP=fe((V3r,oFe)=>{"use strict";oFe.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var lFe=fe((G3r,sFe)=>{"use strict";var $Bt=bi();function mY(e,t,r,n){if(!t||!t.visible)return null;for(var a=$Bt.getComponentMethod("errorbars","makeComputeError")(t),i=new Array(e.length),o=0;o0){var f=n.c2l(u);n._lowerLogErrorBound||(n._lowerLogErrorBound=f),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,f)}}else i[o]=[-s[0]*r,s[1]*r]}return i}function KBt(e){for(var t=0;t{"use strict";var QBt=xf().gl_line3d,uFe=xf().gl_scatter3d,eOt=xf().gl_error3d,tOt=xf().gl_mesh3d,rOt=xf().delaunay_triangulate,Eg=Xt(),vFe=Mg(),hP=Sg().formatColor,nOt=uT(),yY=gY(),iOt=fP(),aOt=Yi(),oOt=Sd().appendArrayPointValue,sOt=lFe();function pFe(e,t){this.scene=e,this.uid=t,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var _Y=pFe.prototype;_Y.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var t=e.index=e.data.index;return e.object.highlight&&e.object.highlight(null),this.scatterPlot&&(e.object=this.scatterPlot,this.scatterPlot.highlight(e.data)),e.textLabel="",this.textLabels&&(Eg.isArrayOrTypedArray(this.textLabels)?(this.textLabels[t]||this.textLabels[t]===0)&&(e.textLabel=this.textLabels[t]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]],!0}};function lOt(e,t,r){var n=(r+1)%3,a=(r+2)%3,i=[],o=[],s;for(s=0;s-1?-1:e.indexOf("right")>-1?1:0}function fFe(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function cOt(e){var t=0,r=0,n=[t,r];if(Array.isArray(e))for(var a=0;a=0){var u=lOt(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=tOt(u),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 vOt(e,t){var r=new pFe(e,t.uid);return r.update(t),r}gFe.exports=vOt});var MY=fe((j3r,bFe)=>{"use strict";var kg=Ol(),pOt=Ds(),AY=_s(),bY=pl().axisHoverFormat,{hovertemplateAttrs:gOt,texttemplateAttrs:mOt,templatefallbackAttrs:yFe}=Oo(),xFe=Ho(),yOt=gY(),xOt=fP(),Ep=ta().extendFlat,_Ot=rl().overrideAll,_Fe=(b2(),Gs(_2)).default,bOt=kg.line,n_=kg.marker,wOt=n_.line,TOt=Ep({width:bOt.width,dash:{valType:"enumerated",values:_Fe(yOt),dflt:"solid"}},AY("line"));function wY(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 TY=bFe.exports=_Ot({x:kg.x,y:kg.y,z:{valType:"data_array"},text:Ep({},kg.text,{}),texttemplate:mOt(),texttemplatefallback:yFe({editType:"calc"}),hovertext:Ep({},kg.hovertext,{}),hovertemplate:gOt(),hovertemplatefallback:yFe(),xhoverformat:bY("x"),yhoverformat:bY("y"),zhoverformat:bY("z"),mode:Ep({},kg.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:wY("x"),y:wY("y"),z:wY("z")},connectgaps:kg.connectgaps,line:TOt,marker:Ep({symbol:{valType:"enumerated",values:_Fe(xOt),dflt:"circle",arrayOk:!0},size:Ep({},n_.size,{dflt:8}),sizeref:n_.sizeref,sizemin:n_.sizemin,sizemode:n_.sizemode,opacity:Ep({},n_.opacity,{arrayOk:!1}),colorbar:n_.colorbar,line:Ep({width:Ep({},wOt.width,{arrayOk:!1})},AY("marker.line"))},AY("marker")),textposition:Ep({},kg.textposition,{dflt:"top center"}),textfont:pOt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:xFe.opacity,hoverinfo:Ep({},xFe.hoverinfo)},"calc","nested");TY.x.editType=TY.y.editType=TY.z.editType="calc+clearAxisTypes"});var AFe=fe((W3r,TFe)=>{"use strict";var wFe=bi(),AOt=Xt(),SY=Is(),MOt=vv(),SOt=lp(),EOt=up(),kOt=MY();TFe.exports=function(t,r,n,a){function i(g,p){return AOt.coerce(t,r,kOt,g,p)}var o=COt(t,r,i,a);if(!o){r.visible=!1;return}i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),i("mode"),SY.hasMarkers(r)&&MOt(t,r,n,a,i,{noAngle:!0,noLineDash:!0,noSelect:!0}),SY.hasLines(r)&&(i("connectgaps"),SOt(t,r,n,a,i)),SY.hasText(r)&&(i("texttemplate"),i("texttemplatefallback"),EOt(t,r,a,i,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,l=(r.marker||{}).color;i("surfaceaxis")>=0&&i("surfacecolor",s||l);for(var u=["x","y","z"],c=0;c<3;++c){var f="projection."+u[c];i(f+".show")&&(i(f+".opacity"),i(f+".scale"))}var v=wFe.getComponentMethod("errorbars","supplyDefaults");v(t,r,s||l||n,{axis:"z"}),v(t,r,s||l||n,{axis:"y",inherit:"z"}),v(t,r,s||l||n,{axis:"x",inherit:"z"})};function COt(e,t,r,n){var a=0,i=r("x"),o=r("y"),s=r("z"),l=wFe.getComponentMethod("calendars","handleTraceDefaults");return l(e,t,["x","y","z"],n),i&&o&&s&&(a=Math.min(i.length,o.length,s.length),t._length=t._xlength=t._ylength=t._zlength=a),a}});var SFe=fe((Y3r,MFe)=>{"use strict";var LOt=o1(),POt=pv();MFe.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return LOt(n,r),POt(t,r),n}});var kFe=fe((X3r,EFe)=>{EFe.exports=FOt;function FOt(e,t){if(typeof e!="string")throw new TypeError("must specify type string");if(t=t||{},typeof document=="undefined"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");typeof t.width=="number"&&(r.width=t.width),typeof t.height=="number"&&(r.height=t.height);var n=t,a;try{var i=[e];e.indexOf("webgl")===0&&i.push("experimental-"+e);for(var o=0;o{var DOt=kFe();CFe.exports=function(t){return DOt("webgl",t)}});var EY=fe(($3r,FFe)=>{"use strict";var PFe=ni(),ROt=function(){};FFe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=ROt);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var n=document.createElement("div");n.className="no-webgl",n.style.cursor="pointer",n.style.fontSize="24px",n.style.color=PFe.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=PFe.lightLine,n.style["z-index"]=30;var a=document.createElement("p");return a.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",a.style.position="relative",a.style.top="50%",a.style.left="50%",a.style.height="30%",a.style.width="50%",a.style.margin="-15% 0 0 -25%",n.appendChild(a),t.container.appendChild(n),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var IFe=fe((K3r,RFe)=>{"use strict";var i_=Mg(),IOt=Xt(),zOt=["xaxis","yaxis","zaxis"];function DFe(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],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=[10,10,10],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=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var qOt=DFe.prototype;qOt.merge=function(e,t){for(var r=this,n=0;n<3;++n){var a=t[zOt[n]];if(!a.visible){r.tickEnable[n]=!1,r.labelEnable[n]=!1,r.lineEnable[n]=!1,r.lineTickEnable[n]=!1,r.gridEnable[n]=!1,r.zeroEnable[n]=!1,r.backgroundEnable[n]=!1;continue}r.labels[n]=e._meta?IOt.templateString(a.title.text,e._meta):a.title.text,"font"in a.title&&(a.title.font.color&&(r.labelColor[n]=i_(a.title.font.color)),a.title.font.family&&(r.labelFont[n]=a.title.font.family),a.title.font.size&&(r.labelSize[n]=a.title.font.size),a.title.font.weight&&(r.labelFontWeight[n]=a.title.font.weight),a.title.font.style&&(r.labelFontStyle[n]=a.title.font.style),a.title.font.variant&&(r.labelFontVariant[n]=a.title.font.variant)),"showline"in a&&(r.lineEnable[n]=a.showline),"linecolor"in a&&(r.lineColor[n]=i_(a.linecolor)),"linewidth"in a&&(r.lineWidth[n]=a.linewidth),"showgrid"in a&&(r.gridEnable[n]=a.showgrid),"gridcolor"in a&&(r.gridColor[n]=i_(a.gridcolor)),"gridwidth"in a&&(r.gridWidth[n]=a.gridwidth),a.type==="log"?r.zeroEnable[n]=!1:"zeroline"in a&&(r.zeroEnable[n]=a.zeroline),"zerolinecolor"in a&&(r.zeroLineColor[n]=i_(a.zerolinecolor)),"zerolinewidth"in a&&(r.zeroLineWidth[n]=a.zerolinewidth),"ticks"in a&&a.ticks?r.lineTickEnable[n]=!0:r.lineTickEnable[n]=!1,"ticklen"in a&&(r.lineTickLength[n]=r._defaultLineTickLength[n]=a.ticklen),"tickcolor"in a&&(r.lineTickColor[n]=i_(a.tickcolor)),"tickwidth"in a&&(r.lineTickWidth[n]=a.tickwidth),"tickangle"in a&&(r.tickAngle[n]=a.tickangle==="auto"?-3600:Math.PI*-a.tickangle/180),"showticklabels"in a&&(r.tickEnable[n]=a.showticklabels),"tickfont"in a&&(a.tickfont.color&&(r.tickColor[n]=i_(a.tickfont.color)),a.tickfont.family&&(r.tickFont[n]=a.tickfont.family),a.tickfont.size&&(r.tickSize[n]=a.tickfont.size),a.tickfont.weight&&(r.tickFontWeight[n]=a.tickfont.weight),a.tickfont.style&&(r.tickFontStyle[n]=a.tickfont.style),a.tickfont.variant&&(r.tickFontVariant[n]=a.tickfont.variant)),"mirror"in a?["ticks","all","allticks"].indexOf(a.mirror)!==-1?(r.lineTickMirror[n]=!0,r.lineMirror[n]=!0):a.mirror===!0?(r.lineTickMirror[n]=!1,r.lineMirror[n]=!0):(r.lineTickMirror[n]=!1,r.lineMirror[n]=!1):r.lineMirror[n]=!1,"showbackground"in a&&a.showbackground!==!1?(r.backgroundEnable[n]=!0,r.backgroundColor[n]=i_(a.backgroundcolor)):r.backgroundEnable[n]=!1}};function BOt(e,t){var r=new DFe;return r.merge(e,t),r}RFe.exports=BOt});var BFe=fe((J3r,qFe)=>{"use strict";var OOt=Mg(),NOt=["xaxis","yaxis","zaxis"];function zFe(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var UOt=zFe.prototype;UOt.merge=function(e){for(var t=0;t<3;++t){var r=e[NOt[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=OOt(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function VOt(e){var t=new zFe;return t.merge(e),t}qFe.exports=VOt});var UFe=fe((Q3r,NFe)=>{"use strict";NFe.exports=YOt;var OFe=Yi(),GOt=Xt(),HOt=["xaxis","yaxis","zaxis"],jOt=[0,0,0];function WOt(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],a=new Array(n.length),i=0;i/g," "));a[i]=u,o.tickmode=s}}t.ticks=a;for(var i=0;i<3;++i){jOt[i]=.5*(e.glplot.bounds[0][i]+e.glplot.bounds[1][i]);for(var c=0;c<2;++c)t.bounds[c][i]=e.glplot.bounds[c][i]}e.contourLevels=WOt(a)}});var XFe=fe((ewr,YFe)=>{"use strict";var HFe=xf().gl_plot3d,XOt=HFe.createCamera,VFe=HFe.createScene,ZOt=LFe(),$Ot=Vk(),pP=bi(),Dd=Xt(),vP=Dd.preserveDrawingBuffer(),gP=Yi(),kp=kl(),KOt=Mg(),JOt=EY(),QOt=VU(),eNt=IFe(),tNt=BFe(),rNt=UFe(),nNt=rp().applyAutorangeOptions,nM,dP,jFe=!1;function WFe(e,t){var r=document.createElement("div"),n=e.container;this.graphDiv=e.graphDiv;var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top=a.style.left="0px",a.style.width=a.style.height="100%",a.style["z-index"]=20,a.style["pointer-events"]="none",r.appendChild(a),this.svgContainer=a,r.id=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=eNt(t,t[this.id]),this.spikeOptions=tNt(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=pP.getComponentMethod("annotations3d","convert"),this.drawAnnotations=pP.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var Dh=WFe.prototype;Dh.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:vP,premultipliedAlpha:!0,antialias:!0},container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:e.camera,pixelRatio:e.pixelRatio};if(e.staticMode){if(!dP&&(nM=document.createElement("canvas"),dP=ZOt({canvas:nM,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!dP))throw new Error("error creating static canvas/context for image server");t.gl=dP,t.canvas=nM}return t};var GFe=!0;Dh.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=VFe(t)}catch(n){if(e.staticMode||!GFe||vP)r=!1;else{Dd.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{vP=t.glOptions.preserveDrawingBuffer=!0,e.glplot=VFe(t)}catch(a){vP=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return GFe=!1,r};Dh.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=XOt(e.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})};Dh.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return JOt(e);e.traces={},e.make4thDimension();var r=e.graphDiv,n=r.layout,a=function(){var o={};return e.isCameraChanged(n)&&(o[e.id+".camera"]=e.getCamera()),e.isAspectChanged(n)&&(o[e.id+".aspectratio"]=e.glplot.getAspectratio(),n[e.id].aspectmode!=="manual"&&(e.fullSceneLayout.aspectmode=n[e.id].aspectmode=o[e.id+".aspectmode"]="manual")),o},i=function(o){if(o.fullSceneLayout.dragmode!==!1){var s=a();o.saveLayout(n),o.graphDiv.emit("plotly_relayout",s)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",function(){i(e)}),e.glplot.canvas.addEventListener("touchstart",function(){jFe=!0}),e.glplot.canvas.addEventListener("wheel",function(o){if(r._context._scrollZoom.gl3d){if(e.camera._ortho){var s=o.deltaX>o.deltaY?1.1:.9090909090909091,l=e.glplot.getAspectratio();e.glplot.setAspectratio({x:s*l.x,y:s*l.y,z:s*l.z})}i(e)}},$Ot?{passive:!1}:!1),e.glplot.canvas.addEventListener("mousemove",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var o=a();e.graphDiv.emit("plotly_relayouting",o)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(o){r&&r.emit&&r.emit("plotly_webglcontextlost",{event:o,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0};Dh.render=function(){var e=this,t=e.graphDiv,r,n=e.svgContainer,a=e.container.getBoundingClientRect();t._fullLayout._calcInverseTransform(t);var i=t._fullLayout._invScaleX,o=t._fullLayout._invScaleY,s=a.width*i,l=a.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),rNt(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,f=e.glplot.selection,v=0;v")):r.type==="isosurface"||r.type==="volume"?(y.valueLabel=gP.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),w.push("value: "+y.valueLabel),f.textLabel&&w.push(f.textLabel),L=w.join("
")):L=f.textLabel;var T={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:x};kp.appendArrayPointValue(T,_,x),r._module.eventData&&(T=_._module.eventData(T,f,_,{},x));var A={points:[T]};if(e.fullSceneLayout.hovermode){var m=[];kp.loneHover({trace:_,x:(.5+.5*p[0]/p[3])*s,y:(.5-.5*p[1]/p[3])*l,xLabel:y.xLabel,yLabel:y.yLabel,zLabel:y.zLabel,text:L,name:c.name,color:kp.castHoverOption(_,x,"bgcolor")||c.color,borderColor:kp.castHoverOption(_,x,"bordercolor"),fontFamily:kp.castHoverOption(_,x,"font.family"),fontSize:kp.castHoverOption(_,x,"font.size"),fontColor:kp.castHoverOption(_,x,"font.color"),nameLength:kp.castHoverOption(_,x,"namelength"),textAlign:kp.castHoverOption(_,x,"align"),hovertemplate:Dd.castOption(_,x,"hovertemplate"),hovertemplateLabels:Dd.extendFlat({},T,y),eventData:[T]},{container:n,gd:t,inOut_bbox:m}),T.bbox=m[0]}f.distance<5&&(f.buttons||jFe)?t.emit("plotly_click",A):t.emit("plotly_hover",A),this.oldEventData=A}else kp.loneUnhover(n),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};Dh.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){Dd.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var iM=["xaxis","yaxis","zaxis"];function iNt(e,t,r){for(var n=e.fullSceneLayout,a=0;a<3;a++){var i=iM[a],o=i.charAt(0),s=n[i],l=t[o],u=t[o+"calendar"],c=t["_"+o+"length"];if(!Dd.isArrayOrTypedArray(l))r[0][a]=Math.min(r[0][a],0),r[1][a]=Math.max(r[1][a],c-1);else for(var f,v=0;v<(c||l.length);v++)if(Dd.isArrayOrTypedArray(l[v]))for(var g=0;g_[1][o])_[0][o]=-1,_[1][o]=1;else{var E=_[1][o]-_[0][o];_[0][o]-=E/32,_[1][o]+=E/32}if(C=[_[0][o],_[1][o]],C=nNt(C,l),_[0][o]=C[0],_[1][o]=C[1],l.isReversed()){var I=_[0][o];_[0][o]=_[1][o],_[1][o]=I}}else C=l.range,_[0][o]=l.r2l(C[0]),_[1][o]=l.r2l(C[1]);_[0][o]===_[1][o]&&(_[0][o]-=1,_[1][o]+=1),x[o]=_[1][o]-_[0][o],l.range=[_[0][o],_[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*g[o],max:l.range[1]*g[o]})}var R,B=c.aspectmode;if(B==="cube")R=[1,1,1];else if(B==="manual"){var O=c.aspectratio;R=[O.x,O.y,O.z]}else if(B==="auto"||B==="data"){var U=[1,1,1];for(o=0;o<3;++o){l=c[iM[o]],u=l.type;var j=y[u];U[o]=Math.pow(j.acc,1/j.count)/g[o]}B==="data"||Math.max.apply(null,U)/Math.min.apply(null,U)<=4?R=U:R=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=f.aspectratio.x=R[0],c.aspectratio.y=f.aspectratio.y=R[1],c.aspectratio.z=f.aspectratio.z=R[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var q=c.domain||null,V=t._size||null;if(q&&V){var K=n.container.style;K.position="absolute",K.left=V.l+q.x[0]*V.w+"px",K.top=V.t+(1-q.y[1])*V.h+"px",K.width=V.w*(q.x[1]-q.x[0])+"px",K.height=V.h*(q.y[1]-q.y[0])+"px"}n.glplot.redraw()}};Dh.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)};function oNt(e){return[[e.eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]}function sNt(e){return{up:{x:e.up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:e._ortho===!0?"orthographic":"perspective"}}}Dh.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),sNt(e.camera)};Dh.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,oNt(r)),t.glplot.setAspectratio(e.aspectratio);var n=r.projection.type==="orthographic",a=t.camera._ortho;n!==a&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())};Dh.isCameraChanged=function(e){var t=this,r=t.getCamera(),n=Dd.nestedProperty(e,t.id+".camera"),a=n.get();function i(u,c,f,v){var g=["up","center","eye"],p=["x","y","z"];return c[g[f]]&&u[g[f]][p[v]]===c[g[f]][p[v]]}var o=!1;if(a===void 0)o=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!i(r,a,s,l)){o=!0;break}(!a.projection||r.projection&&r.projection.type!==a.projection.type)&&(o=!0)}return o};Dh.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),n=Dd.nestedProperty(e,t.id+".aspectratio"),a=n.get();return a===void 0||a.x!==r.x||a.y!==r.y||a.z!==r.z};Dh.saveLayout=function(e){var t=this,r=t.fullLayout,n,a,i,o,s,l,u=t.isCameraChanged(e),c=t.isAspectChanged(e),f=u||c;if(f){var v={};if(u&&(n=t.getCamera(),a=Dd.nestedProperty(e,t.id+".camera"),i=a.get(),v[t.id+".camera"]=i),c&&(o=t.glplot.getAspectratio(),s=Dd.nestedProperty(e,t.id+".aspectratio"),l=s.get(),v[t.id+".aspectratio"]=l),pP.call("_storeDirectGUIEdit",e,r._preGUI,v),u){a.set(n);var g=Dd.nestedProperty(r,t.id+".camera");g.set(n)}if(c){s.set(o);var p=Dd.nestedProperty(r,t.id+".aspectratio");p.set(o),t.glplot.redraw()}}return f};Dh.updateFx=function(e,t){var r=this,n=r.camera;if(n)if(e==="orbit")n.mode="orbit",n.keyBindingMode="rotate";else if(e==="turntable"){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var a=r.graphDiv,i=a._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var c=r.id+".camera.up",f={x:0,y:0,z:1},v={};v[c]=f;var g=a.layout;pP.call("_storeDirectGUIEdit",g,i._preGUI,v),o.up=f,Dd.nestedProperty(g,c).set(f)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function lNt(e,t,r){for(var n=0,a=r-1;n0)for(var s=255/o,l=0;l<3;++l)e[i+l]=Math.min(s*e[i+l],255)}}Dh.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(nM),t.glplot.redraw();var r=t.glplot.gl,n=r.drawingBufferWidth,a=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var i=new Uint8Array(n*a*4);r.readPixels(0,0,n,a,r.RGBA,r.UNSIGNED_BYTE,i),lNt(i,n,a),uNt(i,n,a);var o=document.createElement("canvas");o.width=n,o.height=a;var s=o.getContext("2d",{willReadFrequently:!0}),l=s.createImageData(n,a);l.data.set(i),s.putImageData(l,0,0);var u;switch(e){case"jpeg":u=o.toDataURL("image/jpeg");break;case"webp":u=o.toDataURL("image/webp");break;default:u=o.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(nM),u};Dh.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[iM[t]];gP.setConvert(r,e.fullLayout),r.setScale=Dd.noop}};Dh.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},gP.setConvert(e._mockAxis,r)};YFe.exports=WFe});var $Fe=fe((twr,ZFe)=>{"use strict";ZFe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var CY=fe((rwr,KFe)=>{"use strict";var cNt=ni(),Va=pf(),kY=ta().extendFlat,fNt=rl().overrideAll;KFe.exports=fNt({visible:Va.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:cNt.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:Va.color,categoryorder:Va.categoryorder,categoryarray:Va.categoryarray,title:{text:Va.title.text,font:Va.title.font},type:kY({},Va.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Va.autotypenumbers,autorange:Va.autorange,autorangeoptions:{minallowed:Va.autorangeoptions.minallowed,maxallowed:Va.autorangeoptions.maxallowed,clipmin:Va.autorangeoptions.clipmin,clipmax:Va.autorangeoptions.clipmax,include:Va.autorangeoptions.include,editType:"plot"},rangemode:Va.rangemode,minallowed:Va.minallowed,maxallowed:Va.maxallowed,range:kY({},Va.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:Va.minor.tickmode,nticks:Va.nticks,tick0:Va.tick0,dtick:Va.dtick,tickvals:Va.tickvals,ticktext:Va.ticktext,ticks:Va.ticks,mirror:Va.mirror,ticklen:Va.ticklen,tickwidth:Va.tickwidth,tickcolor:Va.tickcolor,showticklabels:Va.showticklabels,labelalias:Va.labelalias,tickfont:Va.tickfont,tickangle:Va.tickangle,tickprefix:Va.tickprefix,showtickprefix:Va.showtickprefix,ticksuffix:Va.ticksuffix,showticksuffix:Va.showticksuffix,showexponent:Va.showexponent,exponentformat:Va.exponentformat,minexponent:Va.minexponent,separatethousands:Va.separatethousands,tickformat:Va.tickformat,tickformatstops:Va.tickformatstops,hoverformat:Va.hoverformat,showline:Va.showline,linecolor:Va.linecolor,linewidth:Va.linewidth,showgrid:Va.showgrid,gridcolor:kY({},Va.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:Va.gridwidth,zeroline:Va.zeroline,zerolinecolor:Va.zerolinecolor,zerolinewidth:Va.zerolinewidth},"plot","from-root")});var DY=fe((nwr,JFe)=>{"use strict";var LY=CY(),hNt=nl().attributes,PY=ta().extendFlat,dNt=Xt().counterRegex;function FY(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}JFe.exports={_arrayAttrRegexps:[dNt("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:PY(FY(0,0,1),{}),center:PY(FY(0,0,0),{}),eye:PY(FY(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:hNt({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:LY,yaxis:LY,zaxis:LY,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"}});var rDe=fe((iwr,tDe)=>{"use strict";var vNt=ni(),QFe=Xt(),pNt=So(),gNt=CY(),mNt=SU(),yNt=pA(),eDe=["xaxis","yaxis","zaxis"],xNt=13600/187;tDe.exports=function(t,r,n){var a,i;function o(u,c){return QFe.coerce(a,i,gNt,u,c)}for(var s=0;s{"use strict";var _Nt=Xt(),bNt=ni(),wNt=bi(),TNt=bx(),ANt=rDe(),nDe=DY(),MNt=jf().getSubplotData,iDe="gl3d";aDe.exports=function(t,r,n){var a=r._basePlotModules.length>1;function i(o){if(!a){var s=_Nt.validate(t[o],nDe[o]);if(s)return t[o]}}TNt(t,r,n,{type:iDe,attributes:nDe,handleDefaults:SNt,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:i,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function SNt(e,t,r,n){for(var a=r("bgcolor"),i=bNt.combine(a,n.paper_bgcolor),o=["up","center","eye"],s=0;s.999)&&(v="turntable")}else v="turntable";r("dragmode",v),r("hovermode",n.getDfltFromLayout("hovermode"))}});var gy=fe(Rd=>{"use strict";var ENt=rl().overrideAll,kNt=tm(),CNt=XFe(),LNt=jf().getSubplotData,PNt=Xt(),FNt=ev(),Jw="gl3d",RY="scene";Rd.name=Jw;Rd.attr=RY;Rd.idRoot=RY;Rd.idRegex=Rd.attrRegex=PNt.counterRegex("scene");Rd.attributes=$Fe();Rd.layoutAttributes=DY();Rd.baseLayoutAttrOverrides=ENt({hoverlabel:kNt.hoverlabel},"plot","nested");Rd.supplyLayoutDefaults=oDe();Rd.plot=function(t){for(var r=t._fullLayout,n=t._fullData,a=r._subplots[Jw],i=0;i{"use strict";sDe.exports={plot:mFe(),attributes:MY(),markerSymbols:fP(),supplyDefaults:AFe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:SFe(),moduleType:"trace",name:"scatter3d",basePlotModule:gy(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var cDe=fe((lwr,uDe)=>{"use strict";uDe.exports=lDe()});var aM=fe((uwr,dDe)=>{"use strict";var fDe=ni(),DNt=_s(),IY=pl().axisHoverFormat,{hovertemplateAttrs:RNt,templatefallbackAttrs:INt}=Oo(),hDe=Ho(),zY=ta().extendFlat,zNt=rl().overrideAll;function qY(e){return{valType:"boolean",dflt:!1}}function BY(e){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:qY("x"),y:qY("y"),z:qY("z")},color:{valType:"color",dflt:fDe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:fDe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var OY=dDe.exports=zNt(zY({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:RNt(),hovertemplatefallback:INt(),xhoverformat:IY("x"),yhoverformat:IY("y"),zhoverformat:IY("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},DNt("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:BY("x"),y:BY("y"),z:BY("z")},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:zY({},hDe.hoverinfo),showlegend:zY({},hDe.showlegend,{dflt:!1})}),"calc","nested");OY.x.editType=OY.y.editType=OY.z.editType="calc+clearAxisTypes"});var UY=fe((cwr,gDe)=>{"use strict";var qNt=bi(),vDe=Xt(),BNt=Vc(),ONt=aM(),NY=.1;function NNt(e,t){for(var r=[],n=32,a=0;a{"use strict";var mDe=Mh();yDe.exports=function(t,r){r.surfacecolor?mDe(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):mDe(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var MDe=fe((hwr,ADe)=>{"use strict";var GNt=xf().gl_surface3d,Qw=xf().ndarray,HNt=xf().ndarray_linear_interpolate.d2,jNt=d7(),WNt=v7(),oM=Xt().isArrayOrTypedArray,YNt=Sg().parseColorScale,_De=Mg(),XNt=js().extractOpts;function wDe(e,t,r){this.scene=e,this.uid=r,this.surface=t,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var Cp=wDe.prototype;Cp.getXat=function(e,t,r,n){var a=oM(this.data.x)?oM(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?a:n.d2l(a,0,r)};Cp.getYat=function(e,t,r,n){var a=oM(this.data.y)?oM(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?a:n.d2l(a,0,r)};Cp.getZat=function(e,t,r,n){var a=this.data.z[t][e];return a===null&&this.data.connectgaps&&this.data._interpolatedZ&&(a=this.data._interpolatedZ[t][e]),r===void 0?a:n.d2l(a,0,r)};Cp.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),a=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,a],e.traceCoordinate=[this.getXat(n,a),this.getYat(n,a),this.getZat(n,a)],e.dataCoordinate=[this.getXat(n,a,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,a,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,a,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var i=0;i<3;i++){var o=e.dataCoordinate[i];o!=null&&(e.dataCoordinate[i]*=this.scene.dataScale[i])}var s=this.data.hovertext||this.data.text;return oM(s)&&s[a]&&s[a][n]!==void 0?e.textLabel=s[a][n]:s?e.textLabel=s:e.textLabel="",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};function ZNt(e){var t=e[0].rgb,r=e[e.length-1].rgb;return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]&&t[3]===r[3]}var e5=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function $Nt(e,t){if(e0){r=e5[n];break}return r}function JNt(e,t){if(!(e<1||t<1)){for(var r=VY(e),n=VY(t),a=1,i=0;imP;)n--,n/=KNt(n),n++,n1?a:1};function eUt(e,t,r){var n=r[8]+r[2]*t[0]+r[5]*t[1];return e[0]=(r[6]+r[0]*t[0]+r[3]*t[1])/n,e[1]=(r[7]+r[1]*t[0]+r[4]*t[1])/n,e}function tUt(e,t,r){return rUt(e,t,eUt,r),e}function rUt(e,t,r,n){for(var a=[0,0],i=e.shape[0],o=e.shape[1],s=0;s0&&this.contourStart[n]!==null&&this.contourEnd[n]!==null&&this.contourEnd[n]>this.contourStart[n]))for(t[n]=!0,a=this.contourStart[n];av&&(this.minValues[u]=v),this.maxValues[u]{"use strict";SDe.exports={attributes:aM(),supplyDefaults:UY().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:xDe(),plot:MDe(),moduleType:"trace",name:"surface",basePlotModule:gy(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var CDe=fe((vwr,kDe)=>{"use strict";kDe.exports=EDe()});var t5=fe((pwr,PDe)=>{"use strict";var aUt=_s(),GY=pl().axisHoverFormat,{hovertemplateAttrs:oUt,templatefallbackAttrs:sUt}=Oo(),my=aM(),LDe=Ho(),yy=ta().extendFlat;PDe.exports=yy({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:oUt({editType:"calc"}),hovertemplatefallback:sUt({editType:"calc"}),xhoverformat:GY("x"),yhoverformat:GY("y"),zhoverformat:GY("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"}},aUt("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:my.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:yy({},my.contours.x.show,{}),color:my.contours.x.color,width:my.contours.x.width,editType:"calc"},lightposition:{x:yy({},my.lightposition.x,{dflt:1e5}),y:yy({},my.lightposition.y,{dflt:1e5}),z:yy({},my.lightposition.z,{dflt:0}),editType:"calc"},lighting:yy({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},my.lighting),hoverinfo:yy({},LDe.hoverinfo,{editType:"calc"}),showlegend:yy({},LDe.showlegend,{dflt:!1})})});var xP=fe((gwr,DDe)=>{"use strict";var lUt=_s(),yP=pl().axisHoverFormat,{hovertemplateAttrs:uUt,templatefallbackAttrs:cUt}=Oo(),sM=t5(),FDe=Ho(),HY=ta().extendFlat,fUt=rl().overrideAll;function jY(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function WY(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var r5=DDe.exports=fUt(HY({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:jY("x"),y:jY("y"),z:jY("z")},caps:{x:WY("x"),y:WY("y"),z:WY("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:uUt(),hovertemplatefallback:cUt(),xhoverformat:yP("x"),yhoverformat:yP("y"),zhoverformat:yP("z"),valuehoverformat:yP("value",1),showlegend:HY({},FDe.showlegend,{dflt:!1})},lUt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:sM.opacity,lightposition:sM.lightposition,lighting:sM.lighting,flatshading:sM.flatshading,contour:sM.contour,hoverinfo:HY({},FDe.hoverinfo)}),"calc","nested");r5.flatshading.dflt=!0;r5.lighting.facenormalsepsilon.dflt=0;r5.x.editType=r5.y.editType=r5.z.editType=r5.value.editType="calc+clearAxisTypes"});var YY=fe((mwr,IDe)=>{"use strict";var hUt=Xt(),dUt=bi(),vUt=xP(),pUt=Vc();function gUt(e,t,r,n){function a(i,o){return hUt.coerce(e,t,vUt,i,o)}RDe(e,t,r,n,a)}function RDe(e,t,r,n,a){var i=a("isomin"),o=a("isomax");o!=null&&i!==void 0&&i!==null&&i>o&&(t.isomin=null,t.isomax=null);var s=a("x"),l=a("y"),u=a("z"),c=a("value");if(!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length){t.visible=!1;return}var f=dUt.getComponentMethod("calendars","handleTraceDefaults");f(e,t,["x","y","z"],n),a("valuehoverformat"),["x","y","z"].forEach(function(_){a(_+"hoverformat");var x="caps."+_,y=a(x+".show");y&&a(x+".fill");var C="slices."+_,k=a(C+".show");k&&(a(C+".fill"),a(C+".locations"))});var v=a("spaceframe.show");v&&a("spaceframe.fill");var g=a("surface.show");g&&(a("surface.count"),a("surface.fill"),a("surface.pattern"));var p=a("contour.show");p&&(a("contour.color"),a("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(_){a(_)}),pUt(e,t,n,a,{prefix:"",cLetter:"c"}),t._length=null}IDe.exports={supplyDefaults:gUt,supplyIsoDefaults:RDe}});var _P=fe((ywr,qDe)=>{"use strict";var ZY=Xt(),mUt=Mh();function yUt(e,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=T1(t.u,t._len),t._v=T1(t.v,t._len),t._w=T1(t.w,t._len),t._x=T1(t.x,t._len),t._y=T1(t.y,t._len),t._z=T1(t.z,t._len);var r=zDe(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;var n=0,a,i,o;t.starts&&(a=T1(t.starts.x||[]),i=T1(t.starts.y||[]),o=T1(t.starts.z||[]),n=Math.min(a.length,i.length,o.length)),t._startsX=a||[],t._startsY=i||[],t._startsZ=o||[];var s=0,l=1/0,u;for(u=0;u1&&(k=t[a-1],L=r[a-1],T=n[a-1]),i=0;ik?"-":"+")+"x"),p=p.replace("y",(S>L?"-":"+")+"y"),p=p.replace("z",(w>T?"-":"+")+"z");var E=function(){a=0,A=[],m=[],F=[]};(!a||a{"use strict";var xUt=Mh(),_Ut=_P().processGrid,bP=_P().filter;BDe.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=bP(r.x,r._len),r._y=bP(r.y,r._len),r._z=bP(r.z,r._len),r._value=bP(r.value,r._len);var n=_Ut(r);r._gridFill=n.fill,r._Xs=n.Xs,r._Ys=n.Ys,r._Zs=n.Zs,r._len=n.len;for(var a=1/0,i=-1/0,o=0;o{"use strict";ODe.exports=function(t,r,n,a){a=a||t.length;for(var i=new Array(a),o=0;o{"use strict";var bUt=xf().gl_mesh3d,wUt=Sg().parseColorScale,TUt=Xt().isArrayOrTypedArray,AUt=Mg(),MUt=js().extractOpts,NDe=n5(),lM=function(e,t){for(var r=t.length-1;r>0;r--){var n=Math.min(t[r],t[r-1]),a=Math.max(t[r],t[r-1]);if(a>n&&n-1}function ee($e,ot){return $e===null?ot:$e}function ce($e,ot,rt){E();var it=[ot],We=[rt];if(j>=1)it=[ot],We=[rt];else if(j>0){var mt=V(ot,rt);it=mt.xyzv,We=mt.abc}for(var bt=0;bt-1?rt[jt]:F(mr,or,fr);cr>-1?Yt[jt]=cr:Yt[jt]=R(mr,or,fr,ee($e,Ot))}B(Yt[0],Yt[1],Yt[2])}}function me($e,ot,rt){var it=function(We,mt,bt){ce($e,[ot[We],ot[mt],ot[bt]],[rt[We],rt[mt],rt[bt]])};it(0,1,2),it(2,3,0)}function ye($e,ot,rt){var it=function(We,mt,bt){ce($e,[ot[We],ot[mt],ot[bt]],[rt[We],rt[mt],rt[bt]])};it(0,1,2),it(3,0,1),it(2,3,0),it(1,2,3)}function ue($e,ot,rt,it){var We=$e[3];Weit&&(We=it);for(var mt=($e[3]-We)/($e[3]-ot[3]+1e-9),bt=[],Yt=0;Yt<4;Yt++)bt[Yt]=(1-mt)*$e[Yt]+mt*ot[Yt];return bt}function J($e,ot,rt){return $e>=ot&&$e<=rt}function _e($e){var ot=.001*(L-S);return $e>=S-ot&&$e<=L+ot}function ne($e){for(var ot=[],rt=0;rt<4;rt++){var it=$e[rt];ot.push([e._x[it],e._y[it],e._z[it],e._value[it]])}return ot}var ae=3;function pe($e,ot,rt,it,We,mt){mt||(mt=1),rt=[-1,-1,-1];var bt=!1,Yt=[J(ot[0][3],it,We),J(ot[1][3],it,We),J(ot[2][3],it,We)];if(!Yt[0]&&!Yt[1]&&!Yt[2])return!1;var jt=function(or,fr,Ot){return _e(fr[0][3])&&_e(fr[1][3])&&_e(fr[2][3])?(ce(or,fr,Ot),!0):mtYt?[C,mt]:[mt,k];et(ot,jt[0],jt[1])}}var mr=[[Math.min(S,k),Math.max(S,k)],[Math.min(C,L),Math.max(C,L)]];["x","y","z"].forEach(function(or){for(var fr=[],Ot=0;Ot0&&(Lt.push(rr.id),or==="x"?ft.push([rr.distRatio,0,0]):or==="y"?ft.push([0,rr.distRatio,0]):ft.push([0,0,rr.distRatio]))}else or==="x"?Mt=Ke(1,g-1):or==="y"?Mt=Ke(1,p-1):Mt=Ke(1,_-1);Lt.length>0&&(or==="x"?fr[cr]=qe($e,Lt,Ct,wt,ft,fr[cr]):or==="y"?fr[cr]=we($e,Lt,Ct,wt,ft,fr[cr]):fr[cr]=Le($e,Lt,Ct,wt,ft,fr[cr]),cr++),Mt.length>0&&(or==="x"?fr[cr]=pt($e,Mt,Ct,wt,fr[cr]):or==="y"?fr[cr]=tt($e,Mt,Ct,wt,fr[cr]):fr[cr]=Oe($e,Mt,Ct,wt,fr[cr]),cr++)}var pr=e.caps[or];pr.show&&pr.fill&&(q(pr.fill),or==="x"?fr[cr]=pt($e,[0,g-1],Ct,wt,fr[cr]):or==="y"?fr[cr]=tt($e,[0,p-1],Ct,wt,fr[cr]):fr[cr]=Oe($e,[0,_-1],Ct,wt,fr[cr]),cr++)}}),s===0&&I(),e._meshX=w,e._meshY=T,e._meshZ=A,e._meshIntensity=m,e._Xs=c,e._Ys=f,e._Zs=v}return Ve(),e}function EUt(e,t){var r=e.glplot.gl,n=bUt({gl:r}),a=new UDe(e,n,t.uid);return n._trace=a,a.update(t),e.glplot.add(n),a}GDe.exports={findNearestOnAxis:lM,generateIsoMeshes:VDe,createIsosurfaceTrace:EUt}});var jDe=fe((wwr,HDe)=>{"use strict";HDe.exports={attributes:xP(),supplyDefaults:YY().supplyDefaults,calc:$Y(),colorbar:{min:"cmin",max:"cmax"},plot:wP().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:gy(),categories:["gl3d","showLegend"],meta:{}}});var YDe=fe((Twr,WDe)=>{"use strict";WDe.exports=jDe()});var QY=fe((Awr,ZDe)=>{"use strict";var kUt=_s(),Ou=xP(),CUt=aM(),XDe=Ho(),JY=ta().extendFlat,LUt=rl().overrideAll,TP=ZDe.exports=LUt(JY({x:Ou.x,y:Ou.y,z:Ou.z,value:Ou.value,isomin:Ou.isomin,isomax:Ou.isomax,surface:Ou.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:Ou.slices,caps:Ou.caps,text:Ou.text,hovertext:Ou.hovertext,xhoverformat:Ou.xhoverformat,yhoverformat:Ou.yhoverformat,zhoverformat:Ou.zhoverformat,valuehoverformat:Ou.valuehoverformat,hovertemplate:Ou.hovertemplate,hovertemplatefallback:Ou.hovertemplatefallback},kUt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:Ou.colorbar,opacity:Ou.opacity,opacityscale:CUt.opacityscale,lightposition:Ou.lightposition,lighting:Ou.lighting,flatshading:Ou.flatshading,contour:Ou.contour,hoverinfo:JY({},XDe.hoverinfo),showlegend:JY({},XDe.showlegend,{dflt:!1})}),"calc","nested");TP.x.editType=TP.y.editType=TP.z.editType=TP.value.editType="calc+clearAxisTypes"});var KDe=fe((Mwr,$De)=>{"use strict";var PUt=Xt(),FUt=QY(),DUt=YY().supplyIsoDefaults,RUt=UY().opacityscaleDefaults;$De.exports=function(t,r,n,a){function i(o,s){return PUt.coerce(t,r,FUt,o,s)}DUt(t,r,n,a,i),RUt(t,r,a,i)}});var tRe=fe((Swr,eRe)=>{"use strict";var IUt=xf().gl_mesh3d,zUt=Sg().parseColorScale,qUt=Xt().isArrayOrTypedArray,BUt=Mg(),OUt=js().extractOpts,JDe=n5(),eX=wP().findNearestOnAxis,NUt=wP().generateIsoMeshes;function QDe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var tX=QDe.prototype;tX.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],a=this.data._meshZ[t],i=this.data._Ys.length,o=this.data._Zs.length,s=eX(r,this.data._Xs).id,l=eX(n,this.data._Ys).id,u=eX(a,this.data._Zs).id,c=e.index=u+o*l+o*i*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return qUt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};tX.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=NUt(e);function n(l,u,c,f){return u.map(function(v){return l.d2l(v,0,f)*c})}var a=JDe(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),i=JDe(e._meshI,e._meshJ,e._meshK),o={positions:a,cells:i,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:BUt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=OUt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=zUt(e),this.mesh.update(o)};tX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function UUt(e,t){var r=e.glplot.gl,n=IUt({gl:r}),a=new QDe(e,n,t.uid);return n._trace=a,a.update(t),e.glplot.add(n),a}eRe.exports=UUt});var nRe=fe((Ewr,rRe)=>{"use strict";rRe.exports={attributes:QY(),supplyDefaults:KDe(),calc:$Y(),colorbar:{min:"cmin",max:"cmax"},plot:tRe(),moduleType:"trace",name:"volume",basePlotModule:gy(),categories:["gl3d","showLegend"],meta:{}}});var aRe=fe((kwr,iRe)=>{"use strict";iRe.exports=nRe()});var lRe=fe((Cwr,sRe)=>{"use strict";var VUt=bi(),oRe=Xt(),GUt=Vc(),HUt=t5();sRe.exports=function(t,r,n,a){function i(c,f){return oRe.coerce(t,r,HUt,c,f)}function o(c){var f=c.map(function(v){var g=i(v);return g&&oRe.isArrayOrTypedArray(g)?g:null});return f.every(function(v){return v&&v.length===f[0].length})&&f}var s=o(["x","y","z"]);if(!s){r.visible=!1;return}if(o(["i","j","k"]),r.i&&(!r.j||!r.k)||r.j&&(!r.k||!r.i)||r.k&&(!r.i||!r.j)){r.visible=!1;return}var l=VUt.getComponentMethod("calendars","handleTraceDefaults");l(t,r,["x","y","z"],a),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(c){i(c)});var u=i("contour.show");u&&(i("contour.color"),i("contour.width")),"intensity"in t?(i("intensity"),i("intensitymode"),GUt(t,r,a,i,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?i("facecolor"):"vertexcolor"in t?i("vertexcolor"):i("color",n)),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}});var cRe=fe((Lwr,uRe)=>{"use strict";var jUt=Mh();uRe.exports=function(t,r){r.intensity&&jUt(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var pRe=fe((Pwr,vRe)=>{"use strict";var WUt=xf().gl_mesh3d,YUt=xf().delaunay_triangulate,XUt=xf().alpha_shape,ZUt=xf().convex_hull,$Ut=Sg().parseColorScale,KUt=Xt().isArrayOrTypedArray,aX=Mg(),JUt=js().extractOpts,fRe=n5();function dRe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var oX=dRe.prototype;oX.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return KUt(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function hRe(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}oX.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,a=fRe(rX(r.xaxis,e.x,t.dataScale[0],e.xcalendar),rX(r.yaxis,e.y,t.dataScale[1],e.ycalendar),rX(r.zaxis,e.z,t.dataScale[2],e.zcalendar)),i;if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!iX(e.i,n)||!iX(e.j,n)||!iX(e.k,n))return;i=fRe(nX(e.i),nX(e.j),nX(e.k))}else e.alphahull===0?i=ZUt(a):e.alphahull>0?i=XUt(e.alphahull,a):i=QUt(e.delaunayaxis,a);var o={positions:a,cells:i,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:aX(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=JUt(e);this.color="#fff";var l=e.intensitymode;o[l+"Intensity"]=e.intensity,o[l+"IntensityBounds"]=[s.min,s.max],o.colormap=$Ut(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=hRe(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=hRe(e.facecolor)):(this.color=e.color,o.meshColor=aX(e.color));this.mesh.update(o)};oX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function eVt(e,t){var r=e.glplot.gl,n=WUt({gl:r}),a=new dRe(e,n,t.uid);return n._trace=a,a.update(t),e.glplot.add(n),a}vRe.exports=eVt});var mRe=fe((Fwr,gRe)=>{"use strict";gRe.exports={attributes:t5(),supplyDefaults:lRe(),calc:cRe(),colorbar:{min:"cmin",max:"cmax"},plot:pRe(),moduleType:"trace",name:"mesh3d",basePlotModule:gy(),categories:["gl3d","showLegend"],meta:{}}});var xRe=fe((Dwr,yRe)=>{"use strict";yRe.exports=mRe()});var lX=fe((Rwr,bRe)=>{"use strict";var tVt=_s(),i5=pl().axisHoverFormat,{hovertemplateAttrs:rVt,templatefallbackAttrs:nVt}=Oo(),iVt=t5(),_Re=Ho(),sX=ta().extendFlat,AP={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:rVt({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:nVt({editType:"calc"}),uhoverformat:i5("u",1),vhoverformat:i5("v",1),whoverformat:i5("w",1),xhoverformat:i5("x"),yhoverformat:i5("y"),zhoverformat:i5("z"),showlegend:sX({},_Re.showlegend,{dflt:!1})};sX(AP,tVt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var aVt=["opacity","lightposition","lighting"];aVt.forEach(function(e){AP[e]=iVt[e]});AP.hoverinfo=sX({},_Re.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});bRe.exports=AP});var TRe=fe((Iwr,wRe)=>{"use strict";var oVt=Xt(),sVt=Vc(),lVt=lX();wRe.exports=function(t,r,n,a){function i(g,p){return oVt.coerce(t,r,lVt,g,p)}var o=i("u"),s=i("v"),l=i("w"),u=i("x"),c=i("y"),f=i("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}var v=i("sizemode");i("sizeref",v==="raw"?1:.5),i("anchor"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),sVt(t,r,a,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}});var MRe=fe((zwr,ARe)=>{"use strict";var uVt=Mh();ARe.exports=function(t,r){for(var n=r.u,a=r.v,i=r.w,o=Math.min(r.x.length,r.y.length,r.z.length,n.length,a.length,i.length),s=-1/0,l=1/0,u=0;u{"use strict";var cVt=xf().gl_cone3d,fVt=xf().gl_cone3d.createConeMesh,hVt=Xt().simpleMap,dVt=Sg().parseColorScale,vVt=js().extractOpts,pVt=Xt().isArrayOrTypedArray,SRe=n5();function ERe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var uX=ERe.prototype;uX.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],n=this.data.y[t],a=this.data.z[t],i=this.data.u[t],o=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,n,a,i,o,s,Math.sqrt(i*i+o*o+s*s)];var l=this.data.hovertext||this.data.text;return pVt(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var gVt={xaxis:0,yaxis:1,zaxis:2},mVt={tip:1,tail:0,cm:.25,center:.5},yVt={tip:1,tail:1,cm:.75,center:.5};function kRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,a={};function i(c,f){var v=r[f],g=n[gVt[f]];return hVt(c,function(p){return v.d2l(p)*g})}a.vectors=SRe(i(t.u,"xaxis"),i(t.v,"yaxis"),i(t.w,"zaxis"),t._len),a.positions=SRe(i(t.x,"xaxis"),i(t.y,"yaxis"),i(t.z,"zaxis"),t._len);var o=vVt(t);a.colormap=dVt(t),a.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],a.coneOffset=mVt[t.anchor];var s=t.sizemode;s==="scaled"?a.coneSize=t.sizeref||.5:s==="absolute"?a.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5:s==="raw"&&(a.coneSize=t.sizeref),a.coneSizemode=s;var l=cVt(a),u=t.lightposition;return l.lightPosition=[u.x,u.y,u.z],l.ambient=t.lighting.ambient,l.diffuse=t.lighting.diffuse,l.specular=t.lighting.specular,l.roughness=t.lighting.roughness,l.fresnel=t.lighting.fresnel,l.opacity=t.opacity,t._pad=yVt[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}uX.update=function(e){this.data=e;var t=kRe(this.scene,e);this.mesh.update(t)};uX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function xVt(e,t){var r=e.glplot.gl,n=kRe(e,t),a=fVt(r,n),i=new ERe(e,t.uid);return i.mesh=a,i.data=t,a._trace=i,e.glplot.add(a),i}CRe.exports=xVt});var FRe=fe((Bwr,PRe)=>{"use strict";PRe.exports={moduleType:"trace",name:"cone",basePlotModule:gy(),categories:["gl3d","showLegend"],attributes:lX(),supplyDefaults:TRe(),colorbar:{min:"cmin",max:"cmax"},calc:MRe(),plot:LRe(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var RRe=fe((Owr,DRe)=>{"use strict";DRe.exports=FRe()});var fX=fe((Nwr,zRe)=>{"use strict";var _Vt=_s(),a5=pl().axisHoverFormat,{hovertemplateAttrs:bVt,templatefallbackAttrs:wVt}=Oo(),TVt=t5(),IRe=Ho(),cX=ta().extendFlat,MP={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"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:bVt({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:wVt({editType:"calc"}),uhoverformat:a5("u",1),vhoverformat:a5("v",1),whoverformat:a5("w",1),xhoverformat:a5("x"),yhoverformat:a5("y"),zhoverformat:a5("z"),showlegend:cX({},IRe.showlegend,{dflt:!1})};cX(MP,_Vt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var AVt=["opacity","lightposition","lighting"];AVt.forEach(function(e){MP[e]=TVt[e]});MP.hoverinfo=cX({},IRe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});zRe.exports=MP});var BRe=fe((Uwr,qRe)=>{"use strict";var MVt=Xt(),SVt=Vc(),EVt=fX();qRe.exports=function(t,r,n,a){function i(v,g){return MVt.coerce(t,r,EVt,v,g)}var o=i("u"),s=i("v"),l=i("w"),u=i("x"),c=i("y"),f=i("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}i("starts.x"),i("starts.y"),i("starts.z"),i("maxdisplayed"),i("sizeref"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),SVt(t,r,a,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}});var WRe=fe((Vwr,jRe)=>{"use strict";var URe=xf().gl_streamtube3d,kVt=URe.createTubeMesh,CVt=Xt(),LVt=Sg().parseColorScale,PVt=js().extractOpts,ORe=n5(),VRe={xaxis:0,yaxis:1,zaxis:2};function GRe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var dX=GRe.prototype;dX.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var l=t[s],u=r[VRe[s]];return l.l2c(o)/u}if(e.object===this.mesh){var a=e.data.position,i=e.data.velocity;return e.traceCoordinate=[n(a[0],"xaxis"),n(a[1],"yaxis"),n(a[2],"zaxis"),n(i[0],"xaxis"),n(i[1],"yaxis"),n(i[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function NRe(e){var t=e.length,r;return t>2?r=e.slice(1,t-1):t===2?r=[(e[0]+e[1])/2]:r=e,r}function hX(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function HRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,a=t._len,i={};function o(I,R){var B=r[R],O=n[VRe[R]];return CVt.simpleMap(I,function(U){return B.d2l(U)*O})}if(i.vectors=ORe(o(t._u,"xaxis"),o(t._v,"yaxis"),o(t._w,"zaxis"),a),!a)return{positions:[],cells:[]};var s=o(t._Xs,"xaxis"),l=o(t._Ys,"yaxis"),u=o(t._Zs,"zaxis");i.meshgrid=[s,l,u],i.gridFill=t._gridFill;var c=t._slen;if(c)i.startingPositions=ORe(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var f=l[0],v=NRe(s),g=NRe(u),p=new Array(v.length*g.length),_=0,x=0;x{"use strict";YRe.exports={moduleType:"trace",name:"streamtube",basePlotModule:gy(),categories:["gl3d","showLegend"],attributes:fX(),supplyDefaults:BRe(),colorbar:{min:"cmin",max:"cmax"},calc:_P().calc,plot:WRe(),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}});var $Re=fe((Hwr,ZRe)=>{"use strict";ZRe.exports=XRe()});var o5=fe((jwr,tIe)=>{"use strict";var{hovertemplateAttrs:DVt,texttemplateAttrs:RVt,templatefallbackAttrs:KRe}=Oo(),IVt=n1(),A1=Ol(),zVt=Ho(),JRe=_s(),qVt=Uc().dash,a_=ta().extendFlat,BVt=rl().overrideAll,Rv=A1.marker,QRe=A1.line,eIe=Rv.line;tIe.exports=BVt({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:a_({},A1.mode,{dflt:"markers"}),text:a_({},A1.text,{}),texttemplate:RVt({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:KRe({editType:"plot"}),hovertext:a_({},A1.hovertext,{}),textfont:A1.textfont,textposition:A1.textposition,line:{color:QRe.color,width:QRe.width,dash:qVt},connectgaps:A1.connectgaps,marker:a_({symbol:Rv.symbol,opacity:Rv.opacity,angle:Rv.angle,angleref:a_({},Rv.angleref,{values:["previous","up","north"]}),standoff:Rv.standoff,size:Rv.size,sizeref:Rv.sizeref,sizemin:Rv.sizemin,sizemode:Rv.sizemode,colorbar:Rv.colorbar,line:a_({width:eIe.width,dash:eIe.dash},JRe("marker.line")),gradient:Rv.gradient},JRe("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:IVt(),selected:A1.selected,unselected:A1.unselected,hoverinfo:a_({},zVt.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:DVt(),hovertemplatefallback:KRe()},"calc","nested")});var nIe=fe((Wwr,rIe)=>{"use strict";var vX=Xt(),pX=Is(),OVt=vv(),NVt=lp(),UVt=up(),VVt=a1(),GVt=o5();rIe.exports=function(t,r,n,a){function i(g,p){return vX.coerce(t,r,GVt,g,p)}var o=i("locations"),s;if(o&&o.length){var l=i("geojson"),u;(typeof l=="string"&&l!==""||vX.isPlainObject(l))&&(u="geojson-id");var c=i("locationmode",u);c==="geojson-id"&&i("featureidkey"),s=o.length}else{var f=i("lon")||[],v=i("lat")||[];s=Math.min(f.length,v.length)}if(!s){r.visible=!1;return}r._length=s,i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("mode"),pX.hasMarkers(r)&&OVt(t,r,n,a,i,{gradient:!0}),pX.hasLines(r)&&(NVt(t,r,n,a,i),i("connectgaps")),pX.hasText(r)&&(i("texttemplate"),i("texttemplatefallback"),UVt(t,r,a,i)),i("fill"),r.fill!=="none"&&VVt(t,r,n,i),vX.coerceSelectionMarkerOpacity(r,i)}});var oIe=fe((Ywr,aIe)=>{"use strict";var iIe=Yi();aIe.exports=function(t,r,n){var a={},i=n[r.geo]._subplot,o=i.mockAxis,s=t.lonlat;return a.lonLabel=iIe.tickText(o,o.c2l(s[0]),!0).text,a.latLabel=iIe.tickText(o,o.c2l(s[1]),!0).text,a}});var mX=fe((Xwr,cIe)=>{"use strict";var gX=aa(),sIe=Wa().BADNUM,HVt=pv(),jVt=o1(),WVt=F0(),YVt=Xt().isArrayOrTypedArray,lIe=Xt()._;function uIe(e){return e&&typeof e=="string"}cIe.exports=function(t,r){var n=YVt(r.locations),a=n?r.locations.length:r._length,i=new Array(a),o;r.geojson?o=function(v){return uIe(v)||gX(v)}:o=uIe;for(var s=0;s{"use strict";th.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"};th.axesNames=["lonaxis","lataxis"];th.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};th.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};th.fitboundsIncompatible=new Set(["albers usa","craig","peirce quincuncial","satellite"]);th.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:"equirectangular",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:"equirectangular",projRotate:[0,0,0]}};th.clipPad=.001;th.precision=.1;th.landColor="#F0DC82";th.waterColor="#3399FF";th.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};th.sphereSVG={type:"Sphere"};th.fillLayers={ocean:1,land:1,lakes:1};th.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};th.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];th.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];th.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var yX=fe((SP,fIe)=>{(function(e,t){typeof SP=="object"&&typeof fIe!="undefined"?t(SP):(e=e||self,t(e.topojson=e.topojson||{}))})(SP,function(e){"use strict";function t(k){return k}function r(k){if(k==null)return t;var S,L,w=k.scale[0],T=k.scale[1],A=k.translate[0],m=k.translate[1];return function(F,E){E||(S=L=0);var I=2,R=F.length,B=new Array(R);for(B[0]=(S+=F[0])*w+A,B[1]=(L+=F[1])*T+m;IA&&(A=I[0]),I[1]m&&(m=I[1])}function E(I){switch(I.type){case"GeometryCollection":I.geometries.forEach(E);break;case"Point":F(I.coordinates);break;case"MultiPoint":I.coordinates.forEach(F);break}}k.arcs.forEach(function(I){for(var R=-1,B=I.length,O;++RA&&(A=O[0]),O[1]m&&(m=O[1])});for(L in k.objects)E(k.objects[L]);return[w,T,A,m]}function a(k,S){for(var L,w=k.length,T=w-S;T<--w;)L=k[T],k[T++]=k[w],k[w]=L}function i(k,S){return typeof S=="string"&&(S=k.objects[S]),S.type==="GeometryCollection"?{type:"FeatureCollection",features:S.geometries.map(function(L){return o(k,L)})}:o(k,S)}function o(k,S){var L=S.id,w=S.bbox,T=S.properties==null?{}:S.properties,A=s(k,S);return L==null&&w==null?{type:"Feature",properties:T,geometry:A}:w==null?{type:"Feature",id:L,properties:T,geometry:A}:{type:"Feature",id:L,bbox:w,properties:T,geometry:A}}function s(k,S){var L=r(k.transform),w=k.arcs;function T(R,B){B.length&&B.pop();for(var O=w[R<0?~R:R],U=0,j=O.length;U1)w=f(k,S,L);else for(T=0,w=new Array(A=k.arcs.length);T1)for(var B=1,O=F(I[0]),U,j;BO&&(j=I[0],I[0]=I[B],I[B]=j,O=U);return I}).filter(function(E){return E.length>0})}}function _(k,S){for(var L=0,w=k.length;L>>1;k[T]=2))throw new Error("n must be \u22652");E=k.bbox||n(k);var L=E[0],w=E[1],T=E[2],A=E[3],m;S={scale:[T-L?(T-L)/(m-1):1,A-w?(A-w)/(m-1):1],translate:[L,w]}}else E=k.bbox;var F=y(S),E,I,R=k.objects,B={};function O(q){return F(q)}function U(q){var V;switch(q.type){case"GeometryCollection":V={type:"GeometryCollection",geometries:q.geometries.map(U)};break;case"Point":V={type:"Point",coordinates:O(q.coordinates)};break;case"MultiPoint":V={type:"MultiPoint",coordinates:q.coordinates.map(O)};break;default:return q}return q.id!=null&&(V.id=q.id),q.bbox!=null&&(V.bbox=q.bbox),q.properties!=null&&(V.properties=q.properties),V}function j(q){var V=0,K=1,ee=q.length,ce,me=new Array(ee);for(me[0]=F(q[0],0);++V{"use strict";var xX=hIe.exports={},XVt=uM().locationmodeToLayer,ZVt=yX().feature;xX.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};xX.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`};xX.getTopojsonFeatures=function(e,t){var r=XVt[e.locationmode],n=t.objects[r];return ZVt(t,n).features}});var fM=fe(cM=>{"use strict";var $Vt=Wa().BADNUM;cM.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,n=[],a=[],i=0;i0&&(n.push(a),a=[])}return a.length>0&&n.push(a),n};cM.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};cM.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{"use strict";var bX=Object.defineProperty,KVt=Object.getOwnPropertyDescriptor,JVt=Object.getOwnPropertyNames,QVt=Object.prototype.hasOwnProperty,eGt=(e,t)=>{for(var r in t)bX(e,r,{get:t[r],enumerable:!0})},tGt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of JVt(t))!QVt.call(e,a)&&a!==r&&bX(e,a,{get:()=>t[a],enumerable:!(n=KVt(t,a))||n.enumerable});return e},rGt=e=>tGt(bX({},"__esModule",{value:!0}),e),dIe={};eGt(dIe,{COUNTRIES:()=>vIe,byAlpha2:()=>oGt,byAlpha3:()=>aGt,byM49:()=>sGt,createLookup:()=>pIe,lookup:()=>nGt,lookupAlpha3:()=>iGt,sanitize:()=>_X});gIe.exports=rGt(dIe);var vIe=[{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 _X(e){return e.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 pIe(e){let t=new Map,r=new Map,n=new Map;for(let s of e)t.set(s.iso3,s),s.iso2&&r.set(s.iso2,s),s.m49&&n.set(s.m49,s);let a=new Map;for(let s of e)for(let l of[s.name,...s.aliases]){let u=_X(l),c=a.get(u);if(c!==void 0&&c!==s.iso3)throw new Error(`Duplicate name/alias "${u}": ${c} vs ${s.iso3}`);a.set(u,s.iso3)}function i(s){if(s==null)return;let l=String(s).trim();if(!l)return;if(/^\d+$/.test(l)){let c=n.get(String(parseInt(l,10)).padStart(3,"0"));if(c)return c}if(/^[A-Za-z]{2}$/.test(l)){let c=r.get(l.toUpperCase());if(c)return c}if(/^[A-Za-z]{3}$/.test(l)){let c=t.get(l.toUpperCase());if(c)return c}let u=a.get(_X(l));return u===void 0?void 0:t.get(u)}function o(s){var l;return(l=i(s))==null?void 0:l.iso3}return{lookup:i,lookupAlpha3:o,byAlpha3:t,byAlpha2:r,byM49:n}}var hM=pIe(vIe),nGt=hM.lookup,iGt=hM.lookupAlpha3,aGt=hM.byAlpha3,oGt=hM.byAlpha2,sGt=hM.byM49});var LP=fe(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});var f0=63710088e-1,TX={centimeters:f0*100,centimetres:f0*100,degrees:360/(2*Math.PI),feet:f0*3.28084,inches:f0*39.37,kilometers:f0/1e3,kilometres:f0/1e3,meters:f0,metres:f0,miles:f0/1609.344,millimeters:f0*1e3,millimetres:f0*1e3,nauticalmiles:f0/1852,radians:1,yards:f0*1.0936},wX={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 xy(e,t,r={}){let n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function lGt(e,t,r={}){switch(e){case"Point":return AX(t).geometry;case"LineString":return SX(t).geometry;case"Polygon":return MX(t).geometry;case"MultiPoint":return xIe(t).geometry;case"MultiLineString":return yIe(t).geometry;case"MultiPolygon":return _Ie(t).geometry;default:throw new Error(e+" is invalid")}}function AX(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!kP(e[0])||!kP(e[1]))throw new Error("coordinates must contain numbers");return xy({type:"Point",coordinates:e},t,r)}function uGt(e,t,r={}){return CP(e.map(n=>AX(n,t)),r)}function MX(e,t,r={}){for(let a of e){if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(a[a.length-1].length!==a[0].length)throw new Error("First and last Position are not equivalent.");for(let i=0;iMX(n,t)),r)}function SX(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return xy({type:"LineString",coordinates:e},t,r)}function fGt(e,t,r={}){return CP(e.map(n=>SX(n,t)),r)}function CP(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function yIe(e,t,r={}){return xy({type:"MultiLineString",coordinates:e},t,r)}function xIe(e,t,r={}){return xy({type:"MultiPoint",coordinates:e},t,r)}function _Ie(e,t,r={}){return xy({type:"MultiPolygon",coordinates:e},t,r)}function hGt(e,t,r={}){return xy({type:"GeometryCollection",geometries:e},t,r)}function dGt(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r}function bIe(e,t="kilometers"){let r=TX[t];if(!r)throw new Error(t+" units is invalid");return e*r}function EX(e,t="kilometers"){let r=TX[t];if(!r)throw new Error(t+" units is invalid");return e/r}function vGt(e,t){return wIe(EX(e,t))}function pGt(e){let t=e%360;return t<0&&(t+=360),t}function gGt(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function wIe(e){return e%(2*Math.PI)*180/Math.PI}function mGt(e){return e%360*Math.PI/180}function yGt(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return bIe(EX(e,t),r)}function xGt(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=wX[t];if(!n)throw new Error("invalid original units");let a=wX[r];if(!a)throw new Error("invalid final units");return e/n*a}function kP(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function _Gt(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function bGt(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(t=>{if(!kP(t))throw new Error("bbox must only contain numbers")})}function wGt(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}Cs.areaFactors=wX;Cs.azimuthToBearing=gGt;Cs.bearingToAzimuth=pGt;Cs.convertArea=xGt;Cs.convertLength=yGt;Cs.degreesToRadians=mGt;Cs.earthRadius=f0;Cs.factors=TX;Cs.feature=xy;Cs.featureCollection=CP;Cs.geometry=lGt;Cs.geometryCollection=hGt;Cs.isNumber=kP;Cs.isObject=_Gt;Cs.lengthToDegrees=vGt;Cs.lengthToRadians=EX;Cs.lineString=SX;Cs.lineStrings=fGt;Cs.multiLineString=yIe;Cs.multiPoint=xIe;Cs.multiPolygon=_Ie;Cs.point=AX;Cs.points=uGt;Cs.polygon=MX;Cs.polygons=cGt;Cs.radiansToDegrees=wIe;Cs.radiansToLength=bIe;Cs.round=dGt;Cs.validateBBox=bGt;Cs.validateId=wGt});var FP=fe(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var ud=LP();function dM(e,t,r){if(e!==null)for(var n,a,i,o,s,l,u,c=0,f=0,v,g=e.type,p=g==="FeatureCollection",_=g==="Feature",x=p?e.features.length:1,y=0;yl||p>u||_>c){s=f,l=n,u=p,c=_,i=0;return}var x=ud.lineString.call(void 0,[s,f],r.properties);if(t(x,n,a,_,i)===!1)return!1;i++,s=f})===!1)return!1}}})}function CGt(e,t,r){var n=r,a=!1;return MIe(e,function(i,o,s,l,u){a===!1&&r===void 0?n=i:n=t(n,i,o,s,l,u),a=!0}),n}function SIe(e,t){if(!e)throw new Error("geojson is required");PP(e,function(r,n,a){if(r.geometry!==null){var i=r.geometry.type,o=r.geometry.coordinates;switch(i){case"LineString":if(t(r,n,a,0,0)===!1)return!1;break;case"Polygon":for(var s=0;s{"use strict";Object.defineProperty(DP,"__esModule",{value:!0});var EIe=LP(),DGt=FP();function LIe(e){return DGt.geomReduce.call(void 0,e,(t,r)=>t+RGt(r),0)}function RGt(e){let t=0,r;switch(e.type){case"Polygon":return kIe(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(CIe(e[0]));for(let r=1;r=t?(n+2)%t:n+2],s=a[0]*CX,l=i[1]*CX,u=o[0]*CX;r+=(u-s)*Math.sin(l),n++}return r*IGt}var zGt=LIe;DP.area=LIe;DP.default=zGt});var DIe=fe(RP=>{"use strict";Object.defineProperty(RP,"__esModule",{value:!0});var qGt=LP(),BGt=FP();function FIe(e,t={}){let r=0,n=0,a=0;return BGt.coordEach.call(void 0,e,function(i){r+=i[0],n+=i[1],a++},!0),qGt.point.call(void 0,[r/a,n/a],t.properties)}var OGt=FIe;RP.centroid=FIe;RP.default=OGt});var IIe=fe((IP,RIe)=>{(function(e,t){t(typeof IP=="object"&&typeof RIe!="undefined"?IP:e.d3=e.d3||{})})(IP,(function(e){"use strict";function t(ne,ae){return neae?1:ne>=ae?0:NaN}function r(ne){return ne.length===1&&(ne=n(ne)),{left:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[xe],pe)<0?ie=xe+1:le=xe}return ie},right:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[xe],pe)>0?le=xe:ie=xe+1}return ie}}}function n(ne){return function(ae,pe){return t(ne(ae),pe)}}var a=r(t),i=a.right,o=a.left;function s(ne,ae){ae==null&&(ae=l);for(var pe=0,ie=ne.length-1,le=ne[0],xe=new Array(ie<0?0:ie);pene?1:ae>=ne?0:NaN}function f(ne){return ne===null?NaN:+ne}function v(ne,ae){var pe=ne.length,ie=0,le=-1,xe=0,be,De,Ge=0;if(ae==null)for(;++le1)return Ge/(ie-1)}function g(ne,ae){var pe=v(ne,ae);return pe&&Math.sqrt(pe)}function p(ne,ae){var pe=ne.length,ie=-1,le,xe,be;if(ae==null){for(;++ie=le)for(xe=be=le;++iele&&(xe=le),be=le)for(xe=be=le;++iele&&(xe=le),be0)return[ne];if((ie=ae0)for(ne=Math.ceil(ne/De),ae=Math.floor(ae/De),be=new Array(xe=Math.ceil(ae-ne+1));++le=0?(xe>=L?10:xe>=w?5:xe>=T?2:1)*Math.pow(10,le):-Math.pow(10,-le)/(xe>=L?10:xe>=w?5:xe>=T?2:1)}function F(ne,ae,pe){var ie=Math.abs(ae-ne)/Math.max(0,pe),le=Math.pow(10,Math.floor(Math.log(ie)/Math.LN10)),xe=ie/le;return xe>=L?le*=10:xe>=w?le*=5:xe>=T&&(le*=2),aeOe;)ze.pop(),--ut;var et=new Array(ut+1),qe;for(xe=0;xe<=ut;++xe)qe=et[xe]=[],qe.x0=xe>0?ze[xe-1]:tt,qe.x1=xe=1)return+pe(ne[ie-1],ie-1,ne);var ie,le=(ie-1)*ae,xe=Math.floor(le),be=+pe(ne[xe],xe,ne),De=+pe(ne[xe+1],xe+1,ne);return be+(De-be)*(le-xe)}}function B(ne,ae,pe){return ne=y.call(ne,f).sort(t),Math.ceil((pe-ae)/(2*(R(ne,.75)-R(ne,.25))*Math.pow(ne.length,-1/3)))}function O(ne,ae,pe){return Math.ceil((pe-ae)/(3.5*g(ne)*Math.pow(ne.length,-1/3)))}function U(ne,ae){var pe=ne.length,ie=-1,le,xe;if(ae==null){for(;++ie=le)for(xe=le;++iexe&&(xe=le)}else for(;++ie=le)for(xe=le;++iexe&&(xe=le);return xe}function j(ne,ae){var pe=ne.length,ie=pe,le=-1,xe,be=0;if(ae==null)for(;++le=0;)for(be=ne[ae],pe=be.length;--pe>=0;)xe[--le]=be[pe];return xe}function K(ne,ae){var pe=ne.length,ie=-1,le,xe;if(ae==null){for(;++ie=le)for(xe=le;++iele&&(xe=le)}else for(;++ie=le)for(xe=le;++iele&&(xe=le);return xe}function ee(ne,ae){for(var pe=ae.length,ie=new Array(pe);pe--;)ie[pe]=ne[ae[pe]];return ie}function ce(ne,ae){if(pe=ne.length){var pe,ie=0,le=0,xe,be=ne[le];for(ae==null&&(ae=t);++ie{(function(e,t){typeof zP=="object"&&typeof zIe!="undefined"?t(zP,IIe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(zP,(function(e,t){"use strict";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(Ze){i(a,Ze,this.t),i(this,a.s,this.s),this.s?this.t+=a.t:this.s=a.t},valueOf:function(){return this.s}};var a=new n;function i(Ze,yt,Wt){var zt=Ze.s=yt+Wt,hr=zt-yt,Ur=zt-hr;Ze.t=yt-Ur+(Wt-hr)}var o=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,f=l*2,v=180/l,g=l/180,p=Math.abs,_=Math.atan,x=Math.atan2,y=Math.cos,C=Math.ceil,k=Math.exp,S=Math.log,L=Math.pow,w=Math.sin,T=Math.sign||function(Ze){return Ze>0?1:Ze<0?-1:0},A=Math.sqrt,m=Math.tan;function F(Ze){return Ze>1?0:Ze<-1?l:Math.acos(Ze)}function E(Ze){return Ze>1?u:Ze<-1?-u:Math.asin(Ze)}function I(Ze){return(Ze=w(Ze/2))*Ze}function R(){}function B(Ze,yt){Ze&&U.hasOwnProperty(Ze.type)&&U[Ze.type](Ze,yt)}var O={Feature:function(Ze,yt){B(Ze.geometry,yt)},FeatureCollection:function(Ze,yt){for(var Wt=Ze.features,zt=-1,hr=Wt.length;++zt=0?1:-1,hr=zt*Wt,Ur=y(yt),Qr=w(yt),cn=J*Qr,yn=ue*Ur+cn*y(hr),Fn=cn*zt*w(hr);K.add(x(Fn,yn)),ye=Ze,ue=Ur,J=Qr}function le(Ze){return ee.reset(),V(Ze,_e),ee*2}function xe(Ze){return[x(Ze[1],Ze[0]),E(Ze[2])]}function be(Ze){var yt=Ze[0],Wt=Ze[1],zt=y(Wt);return[zt*y(yt),zt*w(yt),w(Wt)]}function De(Ze,yt){return Ze[0]*yt[0]+Ze[1]*yt[1]+Ze[2]*yt[2]}function Ge(Ze,yt){return[Ze[1]*yt[2]-Ze[2]*yt[1],Ze[2]*yt[0]-Ze[0]*yt[2],Ze[0]*yt[1]-Ze[1]*yt[0]]}function pt(Ze,yt){Ze[0]+=yt[0],Ze[1]+=yt[1],Ze[2]+=yt[2]}function tt(Ze,yt){return[Ze[0]*yt,Ze[1]*yt,Ze[2]*yt]}function Oe(Ze){var yt=A(Ze[0]*Ze[0]+Ze[1]*Ze[1]+Ze[2]*Ze[2]);Ze[0]/=yt,Ze[1]/=yt,Ze[2]/=yt}var ze,ut,et,qe,we,Le,Ke,Te,Ve=r(),$e,ot,rt={point:it,lineStart:mt,lineEnd:bt,polygonStart:function(){rt.point=Yt,rt.lineStart=jt,rt.lineEnd=mr,Ve.reset(),_e.polygonStart()},polygonEnd:function(){_e.polygonEnd(),rt.point=it,rt.lineStart=mt,rt.lineEnd=bt,K<0?(ze=-(et=180),ut=-(qe=90)):Ve>o?qe=90:Ve<-o&&(ut=-90),ot[0]=ze,ot[1]=et},sphere:function(){ze=-(et=180),ut=-(qe=90)}};function it(Ze,yt){$e.push(ot=[ze=Ze,et=Ze]),ytqe&&(qe=yt)}function We(Ze,yt){var Wt=be([Ze*g,yt*g]);if(Te){var zt=Ge(Te,Wt),hr=[zt[1],-zt[0],0],Ur=Ge(hr,zt);Oe(Ur),Ur=xe(Ur);var Qr=Ze-we,cn=Qr>0?1:-1,yn=Ur[0]*v*cn,Fn,en=p(Qr)>180;en^(cn*weqe&&(qe=Fn)):(yn=(yn+360)%360-180,en^(cn*weqe&&(qe=yt))),en?Zeor(ze,et)&&(et=Ze):or(Ze,et)>or(ze,et)&&(ze=Ze):et>=ze?(Zeet&&(et=Ze)):Ze>we?or(ze,Ze)>or(ze,et)&&(et=Ze):or(Ze,et)>or(ze,et)&&(ze=Ze)}else $e.push(ot=[ze=Ze,et=Ze]);ytqe&&(qe=yt),Te=Wt,we=Ze}function mt(){rt.point=We}function bt(){ot[0]=ze,ot[1]=et,rt.point=it,Te=null}function Yt(Ze,yt){if(Te){var Wt=Ze-we;Ve.add(p(Wt)>180?Wt+(Wt>0?360:-360):Wt)}else Le=Ze,Ke=yt;_e.point(Ze,yt),We(Ze,yt)}function jt(){_e.lineStart()}function mr(){Yt(Le,Ke),_e.lineEnd(),p(Ve)>o&&(ze=-(et=180)),ot[0]=ze,ot[1]=et,Te=null}function or(Ze,yt){return(yt-=Ze)<0?yt+360:yt}function fr(Ze,yt){return Ze[0]-yt[0]}function Ot(Ze,yt){return Ze[0]<=Ze[1]?Ze[0]<=yt&&yt<=Ze[1]:ytor(zt[0],zt[1])&&(zt[1]=hr[1]),or(hr[0],zt[1])>or(zt[0],zt[1])&&(zt[0]=hr[0])):Ur.push(zt=hr);for(Qr=-1/0,Wt=Ur.length-1,yt=0,zt=Ur[Wt];yt<=Wt;zt=hr,++yt)hr=Ur[yt],(cn=or(zt[1],hr[0]))>Qr&&(Qr=cn,ze=hr[0],et=zt[1])}return $e=ot=null,ze===1/0||ut===1/0?[[NaN,NaN],[NaN,NaN]]:[[ze,ut],[et,qe]]}var Ct,wt,Tt,Mt,Lt,ft,kt,rr,pr,Kr,Nr,dn,xr,Fr,Zr,Cn,Dt={sphere:R,point:At,lineStart:Qt,lineEnd:rn,polygonStart:function(){Dt.lineStart=Jr,Dt.lineEnd=qn},polygonEnd:function(){Dt.lineStart=Qt,Dt.lineEnd=rn}};function At(Ze,yt){Ze*=g,yt*=g;var Wt=y(yt);Vt(Wt*y(Ze),Wt*w(Ze),w(yt))}function Vt(Ze,yt,Wt){++Ct,Tt+=(Ze-Tt)/Ct,Mt+=(yt-Mt)/Ct,Lt+=(Wt-Lt)/Ct}function Qt(){Dt.point=Ut}function Ut(Ze,yt){Ze*=g,yt*=g;var Wt=y(yt);Fr=Wt*y(Ze),Zr=Wt*w(Ze),Cn=w(yt),Dt.point=_r,Vt(Fr,Zr,Cn)}function _r(Ze,yt){Ze*=g,yt*=g;var Wt=y(yt),zt=Wt*y(Ze),hr=Wt*w(Ze),Ur=w(yt),Qr=x(A((Qr=Zr*Ur-Cn*hr)*Qr+(Qr=Cn*zt-Fr*Ur)*Qr+(Qr=Fr*hr-Zr*zt)*Qr),Fr*zt+Zr*hr+Cn*Ur);wt+=Qr,ft+=Qr*(Fr+(Fr=zt)),kt+=Qr*(Zr+(Zr=hr)),rr+=Qr*(Cn+(Cn=Ur)),Vt(Fr,Zr,Cn)}function rn(){Dt.point=At}function Jr(){Dt.point=ri}function qn(){Jn(dn,xr),Dt.point=At}function ri(Ze,yt){dn=Ze,xr=yt,Ze*=g,yt*=g,Dt.point=Jn;var Wt=y(yt);Fr=Wt*y(Ze),Zr=Wt*w(Ze),Cn=w(yt),Vt(Fr,Zr,Cn)}function Jn(Ze,yt){Ze*=g,yt*=g;var Wt=y(yt),zt=Wt*y(Ze),hr=Wt*w(Ze),Ur=w(yt),Qr=Zr*Ur-Cn*hr,cn=Cn*zt-Fr*Ur,yn=Fr*hr-Zr*zt,Fn=A(Qr*Qr+cn*cn+yn*yn),en=E(Fn),vn=Fn&&-en/Fn;pr+=vn*Qr,Kr+=vn*cn,Nr+=vn*yn,wt+=en,ft+=en*(Fr+(Fr=zt)),kt+=en*(Zr+(Zr=hr)),rr+=en*(Cn+(Cn=Ur)),Vt(Fr,Zr,Cn)}function Ii(Ze){Ct=wt=Tt=Mt=Lt=ft=kt=rr=pr=Kr=Nr=0,V(Ze,Dt);var yt=pr,Wt=Kr,zt=Nr,hr=yt*yt+Wt*Wt+zt*zt;return hrl?Ze+Math.round(-Ze/f)*f:Ze,yt]}ha.invert=ha;function va(Ze,yt,Wt){return(Ze%=f)?yt||Wt?ra(oa(Ze),Ma(yt,Wt)):oa(Ze):yt||Wt?Ma(yt,Wt):ha}function Xi(Ze){return function(yt,Wt){return yt+=Ze,[yt>l?yt-f:yt<-l?yt+f:yt,Wt]}}function oa(Ze){var yt=Xi(Ze);return yt.invert=Xi(-Ze),yt}function Ma(Ze,yt){var Wt=y(Ze),zt=w(Ze),hr=y(yt),Ur=w(yt);function Qr(cn,yn){var Fn=y(yn),en=y(cn)*Fn,vn=w(cn)*Fn,mn=w(yn),Pn=mn*Wt+en*zt;return[x(vn*hr-Pn*Ur,en*Wt-mn*zt),E(Pn*hr+vn*Ur)]}return Qr.invert=function(cn,yn){var Fn=y(yn),en=y(cn)*Fn,vn=w(cn)*Fn,mn=w(yn),Pn=mn*hr-vn*Ur;return[x(vn*hr+mn*Ur,en*Wt+Pn*zt),E(Pn*Wt-en*zt)]},Qr}function Ga(Ze){Ze=va(Ze[0]*g,Ze[1]*g,Ze.length>2?Ze[2]*g:0);function yt(Wt){return Wt=Ze(Wt[0]*g,Wt[1]*g),Wt[0]*=v,Wt[1]*=v,Wt}return yt.invert=function(Wt){return Wt=Ze.invert(Wt[0]*g,Wt[1]*g),Wt[0]*=v,Wt[1]*=v,Wt},yt}function ss(Ze,yt,Wt,zt,hr,Ur){if(Wt){var Qr=y(yt),cn=w(yt),yn=zt*Wt;hr==null?(hr=yt+zt*f,Ur=yt-yn/2):(hr=yo(Qr,hr),Ur=yo(Qr,Ur),(zt>0?hrUr)&&(hr+=zt*f));for(var Fn,en=hr;zt>0?en>Ur:en1&&Ze.push(Ze.pop().concat(Ze.shift()))},result:function(){var Wt=Ze;return Ze=[],yt=null,Wt}}}function ao(Ze,yt){return p(Ze[0]-yt[0])=0;--cn)hr.point((vn=en[cn])[0],vn[1]);else zt(mn.x,mn.p.x,-1,hr);mn=mn.p}mn=mn.o,en=mn.z,Pn=!Pn}while(!mn.v);hr.lineEnd()}}}function wo(Ze){if(yt=Ze.length){for(var yt,Wt=0,zt=Ze[0],hr;++Wt=0?1:-1,Ya=Qa*Ha,ho=Ya>l,Pa=ki*Zi;if(Zs.add(x(Pa*Qa*w(Ya),Ci*na+Pa*y(Ya))),Qr+=ho?Ha+Qa*f:Ha,ho^Pn>=Wt^Un>=Wt){var Js=Ge(be(mn),be(pi));Oe(Js);var fs=Ge(Ur,Js);Oe(fs);var Io=(ho^Ha>=0?-1:1)*E(fs[2]);(zt>Io||zt===Io&&(Js[0]||Js[1]))&&(cn+=ho^Ha>=0?1:-1)}}return(Qr<-o||Qr0){for(yn||(hr.polygonStart(),yn=!0),hr.lineStart(),na=0;na1&&Gn&2&&Zi.push(Zi.pop().concat(Zi.shift())),en.push(Zi.filter(ct))}}return mn}}function ct(Ze){return Ze.length>1}function Jt(Ze,yt){return((Ze=Ze.x)[0]<0?Ze[1]-u-o:u-Ze[1])-((yt=yt.x)[0]<0?yt[1]-u-o:u-yt[1])}var er=Af(function(){return!0},wr,Dr,[-l,-u]);function wr(Ze){var yt=NaN,Wt=NaN,zt=NaN,hr;return{lineStart:function(){Ze.lineStart(),hr=1},point:function(Ur,Qr){var cn=Ur>0?l:-l,yn=p(Ur-yt);p(yn-l)0?u:-u),Ze.point(zt,Wt),Ze.lineEnd(),Ze.lineStart(),Ze.point(cn,Wt),Ze.point(Ur,Wt),hr=0):zt!==cn&&yn>=l&&(p(yt-zt)o?_((w(yt)*(Ur=y(zt))*w(Wt)-w(zt)*(hr=y(yt))*w(Ze))/(hr*Ur*Qr)):(yt+zt)/2}function Dr(Ze,yt,Wt,zt){var hr;if(Ze==null)hr=Wt*u,zt.point(-l,hr),zt.point(0,hr),zt.point(l,hr),zt.point(l,0),zt.point(l,-hr),zt.point(0,-hr),zt.point(-l,-hr),zt.point(-l,0),zt.point(-l,hr);else if(p(Ze[0]-yt[0])>o){var Ur=Ze[0]0,hr=p(yt)>o;function Ur(en,vn,mn,Pn){ss(Pn,Ze,Wt,mn,en,vn)}function Qr(en,vn){return y(en)*y(vn)>yt}function cn(en){var vn,mn,Pn,On,ki;return{lineStart:function(){On=Pn=!1,ki=1},point:function(Ci,qi){var pi=[Ci,qi],Un,Gn=Qr(Ci,qi),Zi=zt?Gn?0:Fn(Ci,qi):Gn?Fn(Ci+(Ci<0?l:-l),qi):0;if(!vn&&(On=Pn=Gn)&&en.lineStart(),Gn!==Pn&&(Un=yn(vn,pi),(!Un||ao(vn,Un)||ao(pi,Un))&&(pi[2]=1)),Gn!==Pn)ki=0,Gn?(en.lineStart(),Un=yn(pi,vn),en.point(Un[0],Un[1])):(Un=yn(vn,pi),en.point(Un[0],Un[1],2),en.lineEnd()),vn=Un;else if(hr&&vn&&zt^Gn){var na;!(Zi&mn)&&(na=yn(pi,vn,!0))&&(ki=0,zt?(en.lineStart(),en.point(na[0][0],na[0][1]),en.point(na[1][0],na[1][1]),en.lineEnd()):(en.point(na[1][0],na[1][1]),en.lineEnd(),en.lineStart(),en.point(na[0][0],na[0][1],3)))}Gn&&(!vn||!ao(vn,pi))&&en.point(pi[0],pi[1]),vn=pi,Pn=Gn,mn=Zi},lineEnd:function(){Pn&&en.lineEnd(),vn=null},clean:function(){return ki|(On&&Pn)<<1}}}function yn(en,vn,mn){var Pn=be(en),On=be(vn),ki=[1,0,0],Ci=Ge(Pn,On),qi=De(Ci,Ci),pi=Ci[0],Un=qi-pi*pi;if(!Un)return!mn&&en;var Gn=yt*qi/Un,Zi=-yt*pi/Un,na=Ge(ki,Ci),Ha=tt(ki,Gn),Qa=tt(Ci,Zi);pt(Ha,Qa);var Ya=na,ho=De(Ha,Ya),Pa=De(Ya,Ya),Js=ho*ho-Pa*(De(Ha,Ha)-1);if(!(Js<0)){var fs=A(Js),Io=tt(Ya,(-ho-fs)/Pa);if(pt(Io,Ha),Io=xe(Io),!mn)return Io;var oi=en[0],ro=vn[0],Go=en[1],Qs=vn[1],zl;ro0^Io[1]<(p(Io[0]-oi)l^(oi<=Io[0]&&Io[0]<=ro)){var Yl=tt(Ya,(-ho+fs)/Pa);return pt(Yl,Ha),[Io,xe(Yl)]}}}function Fn(en,vn){var mn=zt?Ze:l-Ze,Pn=0;return en<-mn?Pn|=1:en>mn&&(Pn|=2),vn<-mn?Pn|=4:vn>mn&&(Pn|=8),Pn}return Af(Qr,cn,Ur,zt?[0,-Ze]:[-l,Ze-l])}function Yr(Ze,yt,Wt,zt,hr,Ur){var Qr=Ze[0],cn=Ze[1],yn=yt[0],Fn=yt[1],en=0,vn=1,mn=yn-Qr,Pn=Fn-cn,On;if(On=Wt-Qr,!(!mn&&On>0)){if(On/=mn,mn<0){if(On0){if(On>vn)return;On>en&&(en=On)}if(On=hr-Qr,!(!mn&&On<0)){if(On/=mn,mn<0){if(On>vn)return;On>en&&(en=On)}else if(mn>0){if(On0)){if(On/=Pn,Pn<0){if(On0){if(On>vn)return;On>en&&(en=On)}if(On=Ur-cn,!(!Pn&&On<0)){if(On/=Pn,Pn<0){if(On>vn)return;On>en&&(en=On)}else if(Pn>0){if(On0&&(Ze[0]=Qr+en*mn,Ze[1]=cn+en*Pn),vn<1&&(yt[0]=Qr+vn*mn,yt[1]=cn+vn*Pn),!0}}}}}var Tn=1e9,Kn=-Tn;function Qn(Ze,yt,Wt,zt){function hr(Fn,en){return Ze<=Fn&&Fn<=Wt&&yt<=en&&en<=zt}function Ur(Fn,en,vn,mn){var Pn=0,On=0;if(Fn==null||(Pn=Qr(Fn,vn))!==(On=Qr(en,vn))||yn(Fn,en)<0^vn>0)do mn.point(Pn===0||Pn===3?Ze:Wt,Pn>1?zt:yt);while((Pn=(Pn+vn+4)%4)!==On);else mn.point(en[0],en[1])}function Qr(Fn,en){return p(Fn[0]-Ze)0?0:3:p(Fn[0]-Wt)0?2:1:p(Fn[1]-yt)0?1:0:en>0?3:2}function cn(Fn,en){return yn(Fn.x,en.x)}function yn(Fn,en){var vn=Qr(Fn,1),mn=Qr(en,1);return vn!==mn?vn-mn:vn===0?en[1]-Fn[1]:vn===1?Fn[0]-en[0]:vn===2?Fn[1]-en[1]:en[0]-Fn[0]}return function(Fn){var en=Fn,vn=ko(),mn,Pn,On,ki,Ci,qi,pi,Un,Gn,Zi,na,Ha={point:Qa,lineStart:Js,lineEnd:fs,polygonStart:ho,polygonEnd:Pa};function Qa(oi,ro){hr(oi,ro)&&en.point(oi,ro)}function Ya(){for(var oi=0,ro=0,Go=Pn.length;rozt&&(lf-mc)*(zt-Yl)>($u-Yl)*(Ze-mc)&&++oi:$u<=zt&&(lf-mc)*(zt-Yl)<($u-Yl)*(Ze-mc)&&--oi;return oi}function ho(){en=vn,mn=[],Pn=[],na=!0}function Pa(){var oi=Ya(),ro=na&&oi,Go=(mn=t.merge(mn)).length;(ro||Go)&&(Fn.polygonStart(),ro&&(Fn.lineStart(),Ur(null,null,1,Fn),Fn.lineEnd()),Go&&bl(mn,cn,oi,Ur,Fn),Fn.polygonEnd()),en=Fn,mn=Pn=On=null}function Js(){Ha.point=Io,Pn&&Pn.push(On=[]),Zi=!0,Gn=!1,pi=Un=NaN}function fs(){mn&&(Io(ki,Ci),qi&&Gn&&vn.rejoin(),mn.push(vn.result())),Ha.point=Qa,Gn&&en.lineEnd()}function Io(oi,ro){var Go=hr(oi,ro);if(Pn&&On.push([oi,ro]),Zi)ki=oi,Ci=ro,qi=Go,Zi=!1,Go&&(en.lineStart(),en.point(oi,ro));else if(Go&&Gn)en.point(oi,ro);else{var Qs=[pi=Math.max(Kn,Math.min(Tn,pi)),Un=Math.max(Kn,Math.min(Tn,Un))],zl=[oi=Math.max(Kn,Math.min(Tn,oi)),ro=Math.max(Kn,Math.min(Tn,ro))];Yr(Qs,zl,Ze,yt,Wt,zt)?(Gn||(en.lineStart(),en.point(Qs[0],Qs[1])),en.point(zl[0],zl[1]),Go||en.lineEnd(),na=!1):Go&&(en.lineStart(),en.point(oi,ro),na=!1)}pi=oi,Un=ro,Gn=Go}return Ha}}function Ai(){var Ze=0,yt=0,Wt=960,zt=500,hr,Ur,Qr;return Qr={stream:function(cn){return hr&&Ur===cn?hr:hr=Qn(Ze,yt,Wt,zt)(Ur=cn)},extent:function(cn){return arguments.length?(Ze=+cn[0][0],yt=+cn[0][1],Wt=+cn[1][0],zt=+cn[1][1],hr=Ur=null,Qr):[[Ze,yt],[Wt,zt]]}}}var Qi=r(),Ra,ii,Za,ja={sphere:R,point:R,lineStart:qo,lineEnd:R,polygonStart:R,polygonEnd:R};function qo(){ja.point=Ka,ja.lineEnd=$a}function $a(){ja.point=ja.lineEnd=R}function Ka(Ze,yt){Ze*=g,yt*=g,Ra=Ze,ii=w(yt),Za=y(yt),ja.point=Oa}function Oa(Ze,yt){Ze*=g,yt*=g;var Wt=w(yt),zt=y(yt),hr=p(Ze-Ra),Ur=y(hr),Qr=w(hr),cn=zt*Qr,yn=Za*Wt-ii*zt*Ur,Fn=ii*Wt+Za*zt*Ur;Qi.add(x(A(cn*cn+yn*yn),Fn)),Ra=Ze,ii=Wt,Za=zt}function Ni(Ze){return Qi.reset(),V(Ze,ja),+Qi}var ka=[null,null],vs={type:"LineString",coordinates:ka};function xo(Ze,yt){return ka[0]=Ze,ka[1]=yt,Ni(vs)}var so={Feature:function(Ze,yt){return Co(Ze.geometry,yt)},FeatureCollection:function(Ze,yt){for(var Wt=Ze.features,zt=-1,hr=Wt.length;++zt0&&(hr=xo(Ze[Ur],Ze[Ur-1]),hr>0&&Wt<=hr&&zt<=hr&&(Wt+zt-hr)*(1-Math.pow((Wt-zt)/hr,2))o}).map(mn)).concat(t.range(C(Ur/Fn)*Fn,hr,Fn).filter(function(Un){return p(Un%vn)>o}).map(Pn))}return qi.lines=function(){return pi().map(function(Un){return{type:"LineString",coordinates:Un}})},qi.outline=function(){return{type:"Polygon",coordinates:[On(zt).concat(ki(Qr).slice(1),On(Wt).reverse().slice(1),ki(cn).reverse().slice(1))]}},qi.extent=function(Un){return arguments.length?qi.extentMajor(Un).extentMinor(Un):qi.extentMinor()},qi.extentMajor=function(Un){return arguments.length?(zt=+Un[0][0],Wt=+Un[1][0],cn=+Un[0][1],Qr=+Un[1][1],zt>Wt&&(Un=zt,zt=Wt,Wt=Un),cn>Qr&&(Un=cn,cn=Qr,Qr=Un),qi.precision(Ci)):[[zt,cn],[Wt,Qr]]},qi.extentMinor=function(Un){return arguments.length?(yt=+Un[0][0],Ze=+Un[1][0],Ur=+Un[0][1],hr=+Un[1][1],yt>Ze&&(Un=yt,yt=Ze,Ze=Un),Ur>hr&&(Un=Ur,Ur=hr,hr=Un),qi.precision(Ci)):[[yt,Ur],[Ze,hr]]},qi.step=function(Un){return arguments.length?qi.stepMajor(Un).stepMinor(Un):qi.stepMinor()},qi.stepMajor=function(Un){return arguments.length?(en=+Un[0],vn=+Un[1],qi):[en,vn]},qi.stepMinor=function(Un){return arguments.length?(yn=+Un[0],Fn=+Un[1],qi):[yn,Fn]},qi.precision=function(Un){return arguments.length?(Ci=+Un,mn=Ls(Ur,hr,90),Pn=$s(yt,Ze,Ci),On=Ls(cn,Qr,90),ki=$s(zt,Wt,Ci),qi):Ci},qi.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function _u(){return Kc()()}function Gu(Ze,yt){var Wt=Ze[0]*g,zt=Ze[1]*g,hr=yt[0]*g,Ur=yt[1]*g,Qr=y(zt),cn=w(zt),yn=y(Ur),Fn=w(Ur),en=Qr*y(Wt),vn=Qr*w(Wt),mn=yn*y(hr),Pn=yn*w(hr),On=2*E(A(I(Ur-zt)+Qr*yn*I(hr-Wt))),ki=w(On),Ci=On?function(qi){var pi=w(qi*=On)/ki,Un=w(On-qi)/ki,Gn=Un*en+pi*mn,Zi=Un*vn+pi*Pn,na=Un*cn+pi*Fn;return[x(Zi,Gn)*v,x(na,A(Gn*Gn+Zi*Zi))*v]}:function(){return[Wt*v,zt*v]};return Ci.distance=On,Ci}function Ja(Ze){return Ze}var ps=r(),Sa=r(),ma,Ps,Ca,Pl,ll={point:R,lineStart:R,lineEnd:R,polygonStart:function(){ll.lineStart=Jc,ll.lineEnd=Bd},polygonEnd:function(){ll.lineStart=ll.lineEnd=ll.point=R,ps.add(p(Sa)),Sa.reset()},result:function(){var Ze=ps/2;return ps.reset(),Ze}};function Jc(){ll.point=lu}function lu(Ze,yt){ll.point=Mf,ma=Ca=Ze,Ps=Pl=yt}function Mf(Ze,yt){Sa.add(Pl*Ze-Ca*yt),Ca=Ze,Pl=yt}function Bd(){Mf(ma,Ps)}var Hu=1/0,Sf=Hu,kc=-Hu,Uo=kc,ns={point:Ks,lineStart:R,lineEnd:R,polygonStart:R,polygonEnd:R,result:function(){var Ze=[[Hu,Sf],[kc,Uo]];return kc=Uo=-(Sf=Hu=1/0),Ze}};function Ks(Ze,yt){Zekc&&(kc=Ze),ytUo&&(Uo=yt)}var Ef=0,ju=0,gs=0,bu=0,kf=0,ah=0,Od=0,Qc=0,uu=0,oh,hc,Fl,Zo,Ro={point:is,lineStart:Dl,lineEnd:Cc,polygonStart:function(){Ro.lineStart=sh,Ro.lineEnd=X0},polygonEnd:function(){Ro.point=is,Ro.lineStart=Dl,Ro.lineEnd=Cc},result:function(){var Ze=uu?[Od/uu,Qc/uu]:ah?[bu/ah,kf/ah]:gs?[Ef/gs,ju/gs]:[NaN,NaN];return Ef=ju=gs=bu=kf=ah=Od=Qc=uu=0,Ze}};function is(Ze,yt){Ef+=Ze,ju+=yt,++gs}function Dl(){Ro.point=dc}function dc(Ze,yt){Ro.point=ef,is(Fl=Ze,Zo=yt)}function ef(Ze,yt){var Wt=Ze-Fl,zt=yt-Zo,hr=A(Wt*Wt+zt*zt);bu+=hr*(Fl+Ze)/2,kf+=hr*(Zo+yt)/2,ah+=hr,is(Fl=Ze,Zo=yt)}function Cc(){Ro.point=is}function sh(){Ro.point=Nd}function X0(){Cf(oh,hc)}function Nd(Ze,yt){Ro.point=Cf,is(oh=Fl=Ze,hc=Zo=yt)}function Cf(Ze,yt){var Wt=Ze-Fl,zt=yt-Zo,hr=A(Wt*Wt+zt*zt);bu+=hr*(Fl+Ze)/2,kf+=hr*(Zo+yt)/2,ah+=hr,hr=Zo*Ze-Fl*yt,Od+=hr*(Fl+Ze),Qc+=hr*(Zo+yt),uu+=hr*3,is(Fl=Ze,Zo=yt)}function Vo(Ze){this._context=Ze}Vo.prototype={_radius:4.5,pointRadius:function(Ze){return this._radius=Ze,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(Ze,yt){switch(this._point){case 0:{this._context.moveTo(Ze,yt),this._point=1;break}case 1:{this._context.lineTo(Ze,yt);break}default:{this._context.moveTo(Ze+this._radius,yt),this._context.arc(Ze,yt,this._radius,0,f);break}}},result:R};var Ud=r(),zh,tf,Vd,rf,qh,vc={point:R,lineStart:function(){vc.point=dd},lineEnd:function(){zh&&Bh(tf,Vd),vc.point=R},polygonStart:function(){zh=!0},polygonEnd:function(){zh=null},result:function(){var Ze=+Ud;return Ud.reset(),Ze}};function dd(Ze,yt){vc.point=Bh,tf=rf=Ze,Vd=qh=yt}function Bh(Ze,yt){rf-=Ze,qh-=yt,Ud.add(A(rf*rf+qh*qh)),rf=Ze,qh=yt}function Wu(){this._string=[]}Wu.prototype={_radius:4.5,_circle:vd(4.5),pointRadius:function(Ze){return(Ze=+Ze)!==this._radius&&(this._radius=Ze,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(Ze,yt){switch(this._point){case 0:{this._string.push("M",Ze,",",yt),this._point=1;break}case 1:{this._string.push("L",Ze,",",yt);break}default:{this._circle==null&&(this._circle=vd(this._radius)),this._string.push("M",Ze,",",yt,this._circle);break}}},result:function(){if(this._string.length){var Ze=this._string.join("");return this._string=[],Ze}else return null}};function vd(Ze){return"m0,"+Ze+"a"+Ze+","+Ze+" 0 1,1 0,"+-2*Ze+"a"+Ze+","+Ze+" 0 1,1 0,"+2*Ze+"z"}function pd(Ze,yt){var Wt=4.5,zt,hr;function Ur(Qr){return Qr&&(typeof Wt=="function"&&hr.pointRadius(+Wt.apply(this,arguments)),V(Qr,zt(hr))),hr.result()}return Ur.area=function(Qr){return V(Qr,zt(ll)),ll.result()},Ur.measure=function(Qr){return V(Qr,zt(vc)),vc.result()},Ur.bounds=function(Qr){return V(Qr,zt(ns)),ns.result()},Ur.centroid=function(Qr){return V(Qr,zt(Ro)),Ro.result()},Ur.projection=function(Qr){return arguments.length?(zt=Qr==null?(Ze=null,Ja):(Ze=Qr).stream,Ur):Ze},Ur.context=function(Qr){return arguments.length?(hr=Qr==null?(yt=null,new Wu):new Vo(yt=Qr),typeof Wt!="function"&&hr.pointRadius(Wt),Ur):yt},Ur.pointRadius=function(Qr){return arguments.length?(Wt=typeof Qr=="function"?Qr:(hr.pointRadius(+Qr),+Qr),Ur):Wt},Ur.projection(Ze).context(yt)}function lh(Ze){return{stream:nf(Ze)}}function nf(Ze){return function(yt){var Wt=new uh;for(var zt in Ze)Wt[zt]=Ze[zt];return Wt.stream=yt,Wt}}function uh(){}uh.prototype={constructor:uh,point:function(Ze,yt){this.stream.point(Ze,yt)},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 af(Ze,yt,Wt){var zt=Ze.clipExtent&&Ze.clipExtent();return Ze.scale(150).translate([0,0]),zt!=null&&Ze.clipExtent(null),V(Wt,Ze.stream(ns)),yt(ns.result()),zt!=null&&Ze.clipExtent(zt),Ze}function gd(Ze,yt,Wt){return af(Ze,function(zt){var hr=yt[1][0]-yt[0][0],Ur=yt[1][1]-yt[0][1],Qr=Math.min(hr/(zt[1][0]-zt[0][0]),Ur/(zt[1][1]-zt[0][1])),cn=+yt[0][0]+(hr-Qr*(zt[1][0]+zt[0][0]))/2,yn=+yt[0][1]+(Ur-Qr*(zt[1][1]+zt[0][1]))/2;Ze.scale(150*Qr).translate([cn,yn])},Wt)}function Rl(Ze,yt,Wt){return gd(Ze,[[0,0],yt],Wt)}function ch(Ze,yt,Wt){return af(Ze,function(zt){var hr=+yt,Ur=hr/(zt[1][0]-zt[0][0]),Qr=(hr-Ur*(zt[1][0]+zt[0][0]))/2,cn=-Ur*zt[0][1];Ze.scale(150*Ur).translate([Qr,cn])},Wt)}function Lc(Ze,yt,Wt){return af(Ze,function(zt){var hr=+yt,Ur=hr/(zt[1][1]-zt[0][1]),Qr=-Ur*zt[0][0],cn=(hr-Ur*(zt[1][1]+zt[0][1]))/2;Ze.scale(150*Ur).translate([Qr,cn])},Wt)}var md=16,yd=y(30*g);function Lf(Ze,yt){return+yt?fh(Ze,yt):wu(Ze)}function wu(Ze){return nf({point:function(yt,Wt){yt=Ze(yt,Wt),this.stream.point(yt[0],yt[1])}})}function fh(Ze,yt){function Wt(zt,hr,Ur,Qr,cn,yn,Fn,en,vn,mn,Pn,On,ki,Ci){var qi=Fn-zt,pi=en-hr,Un=qi*qi+pi*pi;if(Un>4*yt&&ki--){var Gn=Qr+mn,Zi=cn+Pn,na=yn+On,Ha=A(Gn*Gn+Zi*Zi+na*na),Qa=E(na/=Ha),Ya=p(p(na)-1)yt||p((qi*fs+pi*Io)/Un-.5)>.3||Qr*mn+cn*Pn+yn*On2?oi[2]%360*g:0,fs()):[cn*v,yn*v,Fn*v]},Pa.angle=function(oi){return arguments.length?(vn=oi%360*g,fs()):vn*v},Pa.reflectX=function(oi){return arguments.length?(mn=oi?-1:1,fs()):mn<0},Pa.reflectY=function(oi){return arguments.length?(Pn=oi?-1:1,fs()):Pn<0},Pa.precision=function(oi){return arguments.length?(na=Lf(Ha,Zi=oi*oi),Io()):A(Zi)},Pa.fitExtent=function(oi,ro){return gd(Pa,oi,ro)},Pa.fitSize=function(oi,ro){return Rl(Pa,oi,ro)},Pa.fitWidth=function(oi,ro){return ch(Pa,oi,ro)},Pa.fitHeight=function(oi,ro){return Lc(Pa,oi,ro)};function fs(){var oi=Gl(Wt,0,0,mn,Pn,vn).apply(null,yt(Ur,Qr)),ro=(vn?Gl:Gd)(Wt,zt-oi[0],hr-oi[1],mn,Pn,vn);return en=va(cn,yn,Fn),Ha=ra(yt,ro),Qa=ra(en,Ha),na=Lf(Ha,Zi),Io()}function Io(){return Ya=ho=null,Pa}return function(){return yt=Ze.apply(this,arguments),Pa.invert=yt.invert&&Js,fs()}}function Hl(Ze){var yt=0,Wt=l/3,zt=xd(Ze),hr=zt(yt,Wt);return hr.parallels=function(Ur){return arguments.length?zt(yt=Ur[0]*g,Wt=Ur[1]*g):[yt*v,Wt*v]},hr}function _d(Ze){var yt=y(Ze);function Wt(zt,hr){return[zt*yt,w(hr)/yt]}return Wt.invert=function(zt,hr){return[zt/yt,E(hr*yt)]},Wt}function dh(Ze,yt){var Wt=w(Ze),zt=(Wt+w(yt))/2;if(p(zt)=.12&&Ci<.234&&ki>=-.425&&ki<-.214?hr:Ci>=.166&&Ci<.234&&ki>=-.214&&ki<-.115?Qr:Wt).invert(mn)},en.stream=function(mn){return Ze&&yt===mn?Ze:Ze=_o([Wt.stream(yt=mn),hr.stream(mn),Qr.stream(mn)])},en.precision=function(mn){return arguments.length?(Wt.precision(mn),hr.precision(mn),Qr.precision(mn),vn()):Wt.precision()},en.scale=function(mn){return arguments.length?(Wt.scale(mn),hr.scale(mn*.35),Qr.scale(mn),en.translate(Wt.translate())):Wt.scale()},en.translate=function(mn){if(!arguments.length)return Wt.translate();var Pn=Wt.scale(),On=+mn[0],ki=+mn[1];return zt=Wt.translate(mn).clipExtent([[On-.455*Pn,ki-.238*Pn],[On+.455*Pn,ki+.238*Pn]]).stream(Fn),Ur=hr.translate([On-.307*Pn,ki+.201*Pn]).clipExtent([[On-.425*Pn+o,ki+.12*Pn+o],[On-.214*Pn-o,ki+.234*Pn-o]]).stream(Fn),cn=Qr.translate([On-.205*Pn,ki+.212*Pn]).clipExtent([[On-.214*Pn+o,ki+.166*Pn+o],[On-.115*Pn-o,ki+.234*Pn-o]]).stream(Fn),vn()},en.fitExtent=function(mn,Pn){return gd(en,mn,Pn)},en.fitSize=function(mn,Pn){return Rl(en,mn,Pn)},en.fitWidth=function(mn,Pn){return ch(en,mn,Pn)},en.fitHeight=function(mn,Pn){return Lc(en,mn,Pn)};function vn(){return Ze=yt=null,en}return en.scale(1070)}function Tu(Ze){return function(yt,Wt){var zt=y(yt),hr=y(Wt),Ur=Ze(zt*hr);return[Ur*hr*w(yt),Ur*w(Wt)]}}function Au(Ze){return function(yt,Wt){var zt=A(yt*yt+Wt*Wt),hr=Ze(zt),Ur=w(hr),Qr=y(hr);return[x(yt*Ur,zt*Qr),E(zt&&Wt*Ur/zt)]}}var Il=Tu(function(Ze){return A(2/(1+Ze))});Il.invert=Au(function(Ze){return 2*E(Ze/2)});function g0(){return wl(Il).scale(124.75).clipAngle(180-.001)}var Yu=Tu(function(Ze){return(Ze=F(Ze))&&Ze/w(Ze)});Yu.invert=Au(function(Ze){return Ze});function Nh(){return wl(Yu).scale(79.4188).clipAngle(180-.001)}function Tl(Ze,yt){return[Ze,S(m((u+yt)/2))]}Tl.invert=function(Ze,yt){return[Ze,2*_(k(yt))-u]};function jl(){return Uh(Tl).scale(961/f)}function Uh(Ze){var yt=wl(Ze),Wt=yt.center,zt=yt.scale,hr=yt.translate,Ur=yt.clipExtent,Qr=null,cn,yn,Fn;yt.scale=function(vn){return arguments.length?(zt(vn),en()):zt()},yt.translate=function(vn){return arguments.length?(hr(vn),en()):hr()},yt.center=function(vn){return arguments.length?(Wt(vn),en()):Wt()},yt.clipExtent=function(vn){return arguments.length?(vn==null?Qr=cn=yn=Fn=null:(Qr=+vn[0][0],cn=+vn[0][1],yn=+vn[1][0],Fn=+vn[1][1]),en()):Qr==null?null:[[Qr,cn],[yn,Fn]]};function en(){var vn=l*zt(),mn=yt(Ga(yt.rotate()).invert([0,0]));return Ur(Qr==null?[[mn[0]-vn,mn[1]-vn],[mn[0]+vn,mn[1]+vn]]:Ze===Tl?[[Math.max(mn[0]-vn,Qr),cn],[Math.min(mn[0]+vn,yn),Fn]]:[[Qr,Math.max(mn[1]-vn,cn)],[yn,Math.min(mn[1]+vn,Fn)]])}return en()}function Vh(Ze){return m((u+Ze)/2)}function jd(Ze,yt){var Wt=y(Ze),zt=Ze===yt?w(Ze):S(Wt/y(yt))/S(Vh(yt)/Vh(Ze)),hr=Wt*L(Vh(Ze),zt)/zt;if(!zt)return Tl;function Ur(Qr,cn){hr>0?cn<-u+o&&(cn=-u+o):cn>u-o&&(cn=u-o);var yn=hr/L(Vh(cn),zt);return[yn*w(zt*Qr),hr-yn*y(zt*Qr)]}return Ur.invert=function(Qr,cn){var yn=hr-cn,Fn=T(zt)*A(Qr*Qr+yn*yn),en=x(Qr,p(yn))*T(yn);return yn*zt<0&&(en-=l*T(Qr)*T(yn)),[en/zt,2*_(L(hr/Fn,1/zt))-u]},Ur}function pc(){return Hl(jd).scale(109.5).parallels([30,30])}function gc(Ze,yt){return[Ze,yt]}gc.invert=gc;function of(){return wl(gc).scale(152.63)}function sf(Ze,yt){var Wt=y(Ze),zt=Ze===yt?w(Ze):(Wt-y(yt))/(yt-Ze),hr=Wt/zt+Ze;if(p(zt)o&&--zt>0);return[Ze/(.8707+(Ur=Wt*Wt)*(-.131979+Ur*(-.013791+Ur*Ur*Ur*(.003971-.001529*Ur)))),Wt]};function Td(){return wl(y0).scale(175.295)}function ul(Ze,yt){return[y(yt)*w(Ze),w(yt)]}ul.invert=Au(E);function Wl(){return wl(ul).scale(249.5).clipAngle(90+o)}function If(Ze,yt){var Wt=y(yt),zt=1+y(Ze)*Wt;return[Wt*w(Ze)/zt,w(yt)/zt]}If.invert=Au(function(Ze){return 2*_(Ze)});function vh(){return wl(If).scale(250).clipAngle(142)}function zf(Ze,yt){return[S(m((u+yt)/2)),-Ze]}zf.invert=function(Ze,yt){return[-yt,2*_(k(Ze))-u]};function qf(){var Ze=Uh(zf),yt=Ze.center,Wt=Ze.rotate;return Ze.center=function(zt){return arguments.length?yt([-zt[1],zt[0]]):(zt=yt(),[zt[1],-zt[0]])},Ze.rotate=function(zt){return arguments.length?Wt([zt[0],zt[1],zt.length>2?zt[2]+90:90]):(zt=Wt(),[zt[0],zt[1],zt[2]-90])},Wt([0,0,90]).scale(159.155)}e.geoAlbers=Hd,e.geoAlbersUsa=p0,e.geoArea=le,e.geoAzimuthalEqualArea=g0,e.geoAzimuthalEqualAreaRaw=Il,e.geoAzimuthalEquidistant=Nh,e.geoAzimuthalEquidistantRaw=Yu,e.geoBounds=cr,e.geoCentroid=Ii,e.geoCircle=sl,e.geoClipAntimeridian=er,e.geoClipCircle=bn,e.geoClipExtent=Ai,e.geoClipRectangle=Qn,e.geoConicConformal=pc,e.geoConicConformalRaw=jd,e.geoConicEqualArea=Pf,e.geoConicEqualAreaRaw=dh,e.geoConicEquidistant=bd,e.geoConicEquidistantRaw=sf,e.geoContains=rs,e.geoDistance=xo,e.geoEqualEarth=m0,e.geoEqualEarthRaw=Rf,e.geoEquirectangular=of,e.geoEquirectangularRaw=gc,e.geoGnomonic=Hh,e.geoGnomonicRaw=wd,e.geoGraticule=Kc,e.geoGraticule10=_u,e.geoIdentity=Z0,e.geoInterpolate=Gu,e.geoLength=Ni,e.geoMercator=jl,e.geoMercatorRaw=Tl,e.geoNaturalEarth1=Td,e.geoNaturalEarth1Raw=y0,e.geoOrthographic=Wl,e.geoOrthographicRaw=ul,e.geoPath=pd,e.geoProjection=wl,e.geoProjectionMutator=xd,e.geoRotation=Ga,e.geoStereographic=vh,e.geoStereographicRaw=If,e.geoStream=V,e.geoTransform=lh,e.geoTransverseMercator=qf,e.geoTransverseMercatorRaw=zf,Object.defineProperty(e,"__esModule",{value:!0})}))});var OIe=fe((n5r,BIe)=>{"use strict";var qIe={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"},NGt=new Set(Object.values(qIe));BIe.exports={usaLocationAbbreviations:NGt,usaLocationList:qIe}});var NIe={};zp(NIe,{COUNTRIES_X:()=>UGt});var UGt,UIe=Lo(()=>{"use strict";UGt=[{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:[]}]});var Cg=fe((i5r,HIe)=>{"use strict";var VGt=xi(),{COUNTRIES:GGt,createLookup:HGt}=mIe(),{area:jGt}=PIe(),{centroid:WGt}=DIe(),{coordAll:YGt}=FP(),{geoBounds:XGt}=qP(),ZGt=Q4(),_y=W1(),$Gt=em(),KGt=S4(),BP=UT(),{usaLocationAbbreviations:JGt,usaLocationList:QGt}=OIe(),{COUNTRIES_X:eHt}=(UIe(),Gs(NIe)),{lookupAlpha3:tHt}=HGt([...GGt,...eHt]),rHt={"ISO-3":ZGt,"USA-states":iHt,"country names":nHt};function nHt(e){let t=tHt(e);return t||(_y.log("Unrecognized country name: "+e+"."),!1)}function iHt(e){e=e.trim();let t=JGt.has(e.toUpperCase())?e.toUpperCase():QGt[e.toLowerCase()];return t||(_y.log("Unrecognized US location: "+e+"."),!1)}function aHt(e,t,r){var a;if(!t||typeof t!="string")return!1;let n=rHt[e](t);if(n){let i;if(e==="USA-states"){i=[];for(let o of r)((a=o==null?void 0:o.properties)==null?void 0:a.gu)==="USA"&&i.push(o)}else i=r;for(let o of i)if(o.id===n)return o;_y.log(`Location with id ${n} does not have a matching topojson feature at this resolution.`)}return!1}var OP=360;function LX(e){for(let t=0;t0&&e[t+1][0]<0)return t;return null}function oHt(e){var t=e.geometry,r=t.coordinates,n=e.id,a=[],i,o,s,l;switch(n==="RUS"||n==="FJI"?i=function(u){var c;if(LX(u)===null)c=u;else for(c=new Array(u.length),l=0;lc?f[v++]=[u[l][0]+OP,u[l][1]]:l===c?(f[v++]=u[l],f[v++]=[u[l][0],-90]):f[v++]=u[l];var g=BP.tester(f);g.pts.pop(),a.push(g)}:i=function(u){a.push(BP.tester(u))},t.type){case"MultiPolygon":for(o=0;oa&&(a=s,r=o)}else r=t;return!r||!r.coordinates.some(l=>l.length>0)?[NaN,NaN]:WGt(r).geometry.coordinates}function uHt(e){var t=window.PlotlyGeoAssets||{},r=[];function n(l){return new Promise(function(u,c){VGt.json(l,function(f,v){if(f){delete t[l];var g=f.status===404?'GeoJSON at URL "'+l+'" does not exist.':"Unexpected error while fetching from "+l;return c(new Error(g))}return t[l]=v,u(v)})})}function a(l){return new Promise(function(u,c){var f=0,v=setInterval(function(){if(t[l]&&t[l]!=="pending")return clearInterval(v),u(t[l]);if(f>100)return clearInterval(v),c("Unexpected error while fetching from "+l);f++},50)})}for(var i=0;iDX(FX(e));function FX(e){try{return YGt(e)}catch(t){return[]}}function DX(e){if(e.length===0)return null;if(e.length===1){let[i,o]=e[0];return[i,o,i,o]}let[[t,r],[n,a]]=XGt({type:"MultiPoint",coordinates:e});return[t,r,GIe([t,n])[1],a]}var fHt=(e,t)=>t.fitbounds==="geojson"&&e.locationmode==="geojson-id",VIe=(e,t)=>fHt(e,t)?FX(PX(e)):[],hHt=(e,t)=>DX(VIe(e,t));function GIe([e,t]){return[e,e>t?t+OP:t]}HIe.exports={locationToFeature:aHt,feature2polygons:oHt,getTraceGeojson:PX,extractTraceFeature:sHt,fetchTraceGeoData:uHt,boundsOfCoords:DX,computeBbox:cHt,coordsOf:FX,doesCrossAntiMeridian:LX,fitGeojsonBbox:hHt,fitGeojsonCoords:VIe,unwrapLonRange:GIe,ANTIMERIDIAN_LON_SHIFT:OP}});var RX=fe((a5r,YIe)=>{"use strict";var dHt=xi(),vHt=Ji(),jIe=ni(),WIe=Ld(),pHt=WIe.stylePoints,gHt=WIe.styleText;YIe.exports=function(t,r){r&&mHt(t,r)};function mHt(e,t){var r=t[0].trace,n=t[0].node3;n.style("opacity",t[0].trace.opacity),pHt(n,r,e),gHt(n,r,e),n.selectAll("path.js-line").style("fill","none").each(function(a){var i=dHt.select(this),o=a.trace,s=o.line||{};i.call(jIe.stroke,s.color).call(vHt.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&i.call(jIe.fill,o.fillcolor)})}});var VP=fe((o5r,$Ie)=>{"use strict";var XIe=xi(),NP=Xt(),yHt=EP().getTopojsonFeatures,IX=fM(),UP=Cg(),ZIe=rp().findExtremes,qX=Wa().BADNUM,xHt=gv().calcMarkerSize,zX=Is(),_Ht=RX();function bHt(e,t,r){var n=t.layers.frontplot.select(".scatterlayer"),a=NP.makeTraceGroups(n,r,"trace scattergeo");function i(o,s){o.lonlat[0]===qX&&XIe.select(s).remove()}a.selectAll("*").remove(),a.each(function(o){var s=XIe.select(this),l=o[0].trace;if(zX.hasLines(l)||l.fill!=="none"){var u=IX.calcTraceToLineCoords(o),c=l.fill!=="none"?IX.makePolygon(u):IX.makeLine(u);s.selectAll("path.js-line").data([{geojson:c,trace:l}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}zX.hasMarkers(l)&&s.selectAll("path.point").data(NP.identity).enter().append("path").classed("point",!0).each(function(f){i(f,this)}),zX.hasText(l)&&s.selectAll("g").data(NP.identity).enter().append("g").append("text").each(function(f){i(f,this)}),_Ht(e,o)})}function wHt(e,t){var r=e[0].trace,n=t[r.geo],a=n._subplot,i=r._length,o,s;if(NP.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l==="geojson-id"?UP.extractTraceFeature(e):yHt(r,a.topojson);for(o=0;o{"use strict";var AHt=kl(),MHt=Wa().BADNUM,SHt=b3(),EHt=Xt().fillText,kHt=o5();KIe.exports=function(t,r,n){var a=t.cd,i=a[0].trace,o=t.xa,s=t.ya,l=t.subplot,u=l.projection.isLonLatOverEdges,c=l.project;function f(C){var k=C.lonlat;if(k[0]===MHt||u(k))return 1/0;var S=c(k),L=c([r,n]),w=Math.abs(S[0]-L[0]),T=Math.abs(S[1]-L[1]),A=Math.max(3,C.mrc||0);return Math.max(Math.sqrt(w*w+T*T)-A,1-3/A)}if(AHt.getClosest(a,f,t),t.index!==!1){var v=a[t.index],g=v.lonlat,p=[o.c2p(g),s.c2p(g)],_=v.mrc||1;t.x0=p[0]-_,t.x1=p[0]+_,t.y0=p[1]-_,t.y1=p[1]+_,t.loc=v.loc,t.lon=g[0],t.lat=g[1];var x={};x[i.geo]={_subplot:l};var y=i._module.formatLabels(v,i,x);return t.lonLabel=y.lonLabel,t.latLabel=y.latLabel,t.color=SHt(i,v),t.extraText=CHt(i,v,t,a[0].t.labels),t.hovertemplate=i.hovertemplate,[t]}};function CHt(e,t,r,n){if(e.hovertemplate)return;var a=t.hi||e.hoverinfo,i=a==="all"?kHt.hoverinfo.flags:a.split("+"),o=i.indexOf("location")!==-1&&Array.isArray(e.locations),s=i.indexOf("lon")!==-1,l=i.indexOf("lat")!==-1,u=i.indexOf("text")!==-1,c=[];function f(v){return v+"\xB0"}return o?c.push(t.loc):s&&l?c.push("("+f(r.latLabel)+", "+f(r.lonLabel)+")"):s?c.push(n.lon+f(r.lonLabel)):l&&c.push(n.lat+f(r.latLabel)),u&&EHt(t,e,c),c.join("
")}});var eze=fe((l5r,QIe)=>{"use strict";QIe.exports=function(t,r,n,a,i){t.lon=r.lon,t.lat=r.lat,t.location=r.loc?r.loc:null;var o=a[i];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t}});var nze=fe((u5r,rze)=>{"use strict";var tze=Is(),LHt=Wa().BADNUM;rze.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].trace,l,u,c,f,v,g=!tze.hasMarkers(s)&&!tze.hasText(s);if(g)return[];if(r===!1)for(v=0;v{(function(e,t){t(typeof GP=="object"&&typeof ize!="undefined"?GP:e.d3=e.d3||{})})(GP,(function(e){"use strict";function t(ne,ae){return neae?1:ne>=ae?0:NaN}function r(ne){return ne.length===1&&(ne=n(ne)),{left:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[xe],pe)<0?ie=xe+1:le=xe}return ie},right:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[xe],pe)>0?le=xe:ie=xe+1}return ie}}}function n(ne){return function(ae,pe){return t(ne(ae),pe)}}var a=r(t),i=a.right,o=a.left;function s(ne,ae){ae==null&&(ae=l);for(var pe=0,ie=ne.length-1,le=ne[0],xe=new Array(ie<0?0:ie);pene?1:ae>=ne?0:NaN}function f(ne){return ne===null?NaN:+ne}function v(ne,ae){var pe=ne.length,ie=0,le=-1,xe=0,be,De,Ge=0;if(ae==null)for(;++le1)return Ge/(ie-1)}function g(ne,ae){var pe=v(ne,ae);return pe&&Math.sqrt(pe)}function p(ne,ae){var pe=ne.length,ie=-1,le,xe,be;if(ae==null){for(;++ie=le)for(xe=be=le;++iele&&(xe=le),be=le)for(xe=be=le;++iele&&(xe=le),be0)return[ne];if((ie=ae0)for(ne=Math.ceil(ne/De),ae=Math.floor(ae/De),be=new Array(xe=Math.ceil(ae-ne+1));++le=0?(xe>=L?10:xe>=w?5:xe>=T?2:1)*Math.pow(10,le):-Math.pow(10,-le)/(xe>=L?10:xe>=w?5:xe>=T?2:1)}function F(ne,ae,pe){var ie=Math.abs(ae-ne)/Math.max(0,pe),le=Math.pow(10,Math.floor(Math.log(ie)/Math.LN10)),xe=ie/le;return xe>=L?le*=10:xe>=w?le*=5:xe>=T&&(le*=2),aeOe;)ze.pop(),--ut;var et=new Array(ut+1),qe;for(xe=0;xe<=ut;++xe)qe=et[xe]=[],qe.x0=xe>0?ze[xe-1]:tt,qe.x1=xe=1)return+pe(ne[ie-1],ie-1,ne);var ie,le=(ie-1)*ae,xe=Math.floor(le),be=+pe(ne[xe],xe,ne),De=+pe(ne[xe+1],xe+1,ne);return be+(De-be)*(le-xe)}}function B(ne,ae,pe){return ne=y.call(ne,f).sort(t),Math.ceil((pe-ae)/(2*(R(ne,.75)-R(ne,.25))*Math.pow(ne.length,-1/3)))}function O(ne,ae,pe){return Math.ceil((pe-ae)/(3.5*g(ne)*Math.pow(ne.length,-1/3)))}function U(ne,ae){var pe=ne.length,ie=-1,le,xe;if(ae==null){for(;++ie=le)for(xe=le;++iexe&&(xe=le)}else for(;++ie=le)for(xe=le;++iexe&&(xe=le);return xe}function j(ne,ae){var pe=ne.length,ie=pe,le=-1,xe,be=0;if(ae==null)for(;++le=0;)for(be=ne[ae],pe=be.length;--pe>=0;)xe[--le]=be[pe];return xe}function K(ne,ae){var pe=ne.length,ie=-1,le,xe;if(ae==null){for(;++ie=le)for(xe=le;++iele&&(xe=le)}else for(;++ie=le)for(xe=le;++iele&&(xe=le);return xe}function ee(ne,ae){for(var pe=ae.length,ie=new Array(pe);pe--;)ie[pe]=ne[ae[pe]];return ie}function ce(ne,ae){if(pe=ne.length){var pe,ie=0,le=0,xe,be=ne[le];for(ae==null&&(ae=t);++ie{(function(e,t){typeof HP=="object"&&typeof oze!="undefined"?t(HP,qP(),aze()):t(e.d3=e.d3||{},e.d3,e.d3)})(HP,(function(e,t,r){"use strict";var n=Math.abs,a=Math.atan,i=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,u=Math.log,c=Math.max,f=Math.min,v=Math.pow,g=Math.round,p=Math.sign||function(Me){return Me>0?1:Me<0?-1:0},_=Math.sin,x=Math.tan,y=1e-6,C=1e-12,k=Math.PI,S=k/2,L=k/4,w=Math.SQRT1_2,T=O(2),A=O(k),m=k*2,F=180/k,E=k/180;function I(Me){return Me?Me/Math.sin(Me):1}function R(Me){return Me>1?S:Me<-1?-S:Math.asin(Me)}function B(Me){return Me>1?0:Me<-1?k:Math.acos(Me)}function O(Me){return Me>0?Math.sqrt(Me):0}function U(Me){return Me=s(2*Me),(Me-1)/(Me+1)}function j(Me){return(s(Me)-s(-Me))/2}function q(Me){return(s(Me)+s(-Me))/2}function V(Me){return u(Me+O(Me*Me+1))}function K(Me){return u(Me+O(Me*Me-1))}function ee(Me){var Ce=x(Me/2),Be=2*u(o(Me/2))/(Ce*Ce);function Ne(Qe,Je){var lt=o(Qe),Gt=o(Je),Zt=_(Je),Nt=Gt*lt,Kt=-((1-Nt?u((1+Nt)/2)/(1-Nt):-.5)+Be/(1+Nt));return[Kt*Gt*_(Qe),Kt*Zt]}return Ne.invert=function(Qe,Je){var lt=O(Qe*Qe+Je*Je),Gt=-Me/2,Zt=50,Nt;if(!lt)return[0,0];do{var Kt=Gt/2,ur=o(Kt),Sr=_(Kt),Br=Sr/ur,ln=-u(n(ur));Gt-=Nt=(2/Br*ln-Be*Br-lt)/(-ln/(Sr*Sr)+1-Be/(2*ur*ur))*(ur<0?.7:1)}while(n(Nt)>y&&--Zt>0);var wn=_(Gt);return[i(Qe*wn,lt*o(Gt)),R(Je*wn/lt)]},Ne}function ce(){var Me=S,Ce=t.geoProjectionMutator(ee),Be=Ce(Me);return Be.radius=function(Ne){return arguments.length?Ce(Me=Ne*E):Me*F},Be.scale(179.976).clipAngle(147)}function me(Me,Ce){var Be=o(Ce),Ne=I(B(Be*o(Me/=2)));return[2*Be*_(Me)*Ne,_(Ce)*Ne]}me.invert=function(Me,Ce){if(!(Me*Me+4*Ce*Ce>k*k+y)){var Be=Me,Ne=Ce,Qe=25;do{var Je=_(Be),lt=_(Be/2),Gt=o(Be/2),Zt=_(Ne),Nt=o(Ne),Kt=_(2*Ne),ur=Zt*Zt,Sr=Nt*Nt,Br=lt*lt,ln=1-Sr*Gt*Gt,wn=ln?B(Nt*Gt)*O(In=1/ln):In=0,In,gi=2*wn*Nt*lt-Me,Bi=wn*Zt-Ce,mi=In*(Sr*Br+wn*Nt*Gt*ur),ia=In*(.5*Je*Kt-wn*2*Zt*lt),ua=In*.25*(Kt*lt-wn*Zt*Sr*Je),lo=In*(ur*Gt+wn*Br*Nt),Bo=ia*ua-lo*mi;if(!Bo)break;var Ua=(Bi*ia-gi*lo)/Bo,ls=(gi*ua-Bi*mi)/Bo;Be-=Ua,Ne-=ls}while((n(Ua)>y||n(ls)>y)&&--Qe>0);return[Be,Ne]}};function ye(){return t.geoProjection(me).scale(152.63)}function ue(Me){var Ce=_(Me),Be=o(Me),Ne=Me>=0?1:-1,Qe=x(Ne*Me),Je=(1+Ce-Be)/2;function lt(Gt,Zt){var Nt=o(Zt),Kt=o(Gt/=2);return[(1+Nt)*_(Gt),(Ne*Zt>-i(Kt,Qe)-.001?0:-Ne*10)+Je+_(Zt)*Be-(1+Nt)*Ce*Kt]}return lt.invert=function(Gt,Zt){var Nt=0,Kt=0,ur=50;do{var Sr=o(Nt),Br=_(Nt),ln=o(Kt),wn=_(Kt),In=1+ln,gi=In*Br-Gt,Bi=Je+wn*Be-In*Ce*Sr-Zt,mi=In*Sr/2,ia=-Br*wn,ua=Ce*In*Br/2,lo=Be*ln+Ce*Sr*wn,Bo=ia*ua-lo*mi,Ua=(Bi*ia-gi*lo)/Bo/2,ls=(gi*ua-Bi*mi)/Bo;n(ls)>2&&(ls/=2),Nt-=Ua,Kt-=ls}while((n(Ua)>y||n(ls)>y)&&--ur>0);return Ne*Kt>-i(o(Nt),Qe)-.001?[Nt*2,Kt]:null},lt}function J(){var Me=20*E,Ce=Me>=0?1:-1,Be=x(Ce*Me),Ne=t.geoProjectionMutator(ue),Qe=Ne(Me),Je=Qe.stream;return Qe.parallel=function(lt){return arguments.length?(Be=x((Ce=(Me=lt*E)>=0?1:-1)*Me),Ne(Me)):Me*F},Qe.stream=function(lt){var Gt=Qe.rotate(),Zt=Je(lt),Nt=(Qe.rotate([0,0]),Je(lt)),Kt=Qe.precision();return Qe.rotate(Gt),Zt.sphere=function(){Nt.polygonStart(),Nt.lineStart();for(var ur=Ce*-180;Ce*ur<180;ur+=Ce*90)Nt.point(ur,Ce*90);if(Me)for(;Ce*(ur-=3*Ce*Kt)>=-180;)Nt.point(ur,Ce*-i(o(ur*E/2),Be)*F);Nt.lineEnd(),Nt.polygonEnd()},Zt},Qe.scale(218.695).center([0,28.0974])}function _e(Me,Ce){var Be=x(Ce/2),Ne=O(1-Be*Be),Qe=1+Ne*o(Me/=2),Je=_(Me)*Ne/Qe,lt=Be/Qe,Gt=Je*Je,Zt=lt*lt;return[4/3*Je*(3+Gt-3*Zt),4/3*lt*(3+3*Gt-Zt)]}_e.invert=function(Me,Ce){if(Me*=3/8,Ce*=3/8,!Me&&n(Ce)>1)return null;var Be=Me*Me,Ne=Ce*Ce,Qe=1+Be+Ne,Je=O((Qe-O(Qe*Qe-4*Ce*Ce))/2),lt=R(Je)/3,Gt=Je?K(n(Ce/Je))/3:V(n(Me))/3,Zt=o(lt),Nt=q(Gt),Kt=Nt*Nt-Zt*Zt;return[p(Me)*2*i(j(Gt)*Zt,.25-Kt),p(Ce)*2*i(Nt*_(lt),.25+Kt)]};function ne(){return t.geoProjection(_e).scale(66.1603)}var ae=O(8),pe=u(1+T);function ie(Me,Ce){var Be=n(Ce);return BeC&&--Ne>0);return[Me/(o(Be)*(ae-1/_(Be))),p(Ce)*Be]};function le(){return t.geoProjection(ie).scale(112.314)}function xe(Me){var Ce=2*k/Me;function Be(Ne,Qe){var Je=t.geoAzimuthalEquidistantRaw(Ne,Qe);if(n(Ne)>S){var lt=i(Je[1],Je[0]),Gt=O(Je[0]*Je[0]+Je[1]*Je[1]),Zt=Ce*g((lt-S)/Ce)+S,Nt=i(_(lt-=Zt),2-o(lt));lt=Zt+R(k/Gt*_(Nt))-Nt,Je[0]=Gt*o(lt),Je[1]=Gt*_(lt)}return Je}return Be.invert=function(Ne,Qe){var Je=O(Ne*Ne+Qe*Qe);if(Je>S){var lt=i(Qe,Ne),Gt=Ce*g((lt-S)/Ce)+S,Zt=lt>Gt?-1:1,Nt=Je*o(Gt-lt),Kt=1/x(Zt*B((Nt-k)/O(k*(k-2*Nt)+Je*Je)));lt=Gt+2*a((Kt+Zt*O(Kt*Kt-3))/3),Ne=Je*o(lt),Qe=Je*_(lt)}return t.geoAzimuthalEquidistantRaw.invert(Ne,Qe)},Be}function be(){var Me=5,Ce=t.geoProjectionMutator(xe),Be=Ce(Me),Ne=Be.stream,Qe=.01,Je=-o(Qe*E),lt=_(Qe*E);return Be.lobes=function(Gt){return arguments.length?Ce(Me=+Gt):Me},Be.stream=function(Gt){var Zt=Be.rotate(),Nt=Ne(Gt),Kt=(Be.rotate([0,0]),Ne(Gt));return Be.rotate(Zt),Nt.sphere=function(){Kt.polygonStart(),Kt.lineStart();for(var ur=0,Sr=360/Me,Br=2*k/Me,ln=90-180/Me,wn=S;ur0&&n(Qe)>y);return Ne<0?NaN:Be}function Oe(Me,Ce,Be){return Ce===void 0&&(Ce=40),Be===void 0&&(Be=C),function(Ne,Qe,Je,lt){var Gt,Zt,Nt;Je=Je===void 0?0:+Je,lt=lt===void 0?0:+lt;for(var Kt=0;KtGt){Je-=Zt/=2,lt-=Nt/=2;continue}Gt=ln;var wn=(Je>0?-1:1)*Be,In=(lt>0?-1:1)*Be,gi=Me(Je+wn,lt),Bi=Me(Je,lt+In),mi=(gi[0]-ur[0])/wn,ia=(gi[1]-ur[1])/wn,ua=(Bi[0]-ur[0])/In,lo=(Bi[1]-ur[1])/In,Bo=lo*mi-ia*ua,Ua=(n(Bo)<.5?.5:1)/Bo;if(Zt=(Br*ua-Sr*lo)*Ua,Nt=(Sr*ia-Br*mi)*Ua,Je+=Zt,lt+=Nt,n(Zt)0&&(Gt[1]*=1+Zt/1.5*Gt[0]*Gt[0]),Gt}return Ne.invert=Oe(Ne),Ne}function ut(){return t.geoProjection(ze()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function et(Me,Ce){var Be=Me*_(Ce),Ne=30,Qe;do Ce-=Qe=(Ce+_(Ce)-Be)/(1+o(Ce));while(n(Qe)>y&&--Ne>0);return Ce/2}function qe(Me,Ce,Be){function Ne(Qe,Je){return[Me*Qe*o(Je=et(Be,Je)),Ce*_(Je)]}return Ne.invert=function(Qe,Je){return Je=R(Je/Ce),[Qe/(Me*o(Je)),R((2*Je+_(2*Je))/Be)]},Ne}var we=qe(T/S,T,k);function Le(){return t.geoProjection(we).scale(169.529)}var Ke=2.00276,Te=1.11072;function Ve(Me,Ce){var Be=et(k,Ce);return[Ke*Me/(1/o(Ce)+Te/o(Be)),(Ce+T*_(Be))/Ke]}Ve.invert=function(Me,Ce){var Be=Ke*Ce,Ne=Ce<0?-L:L,Qe=25,Je,lt;do lt=Be-T*_(Ne),Ne-=Je=(_(2*Ne)+2*Ne-k*_(lt))/(2*o(2*Ne)+2+k*o(lt)*T*o(Ne));while(n(Je)>y&&--Qe>0);return lt=Be-T*_(Ne),[Me*(1/o(lt)+Te/o(Ne))/Ke,lt]};function $e(){return t.geoProjection(Ve).scale(160.857)}function ot(Me){var Ce=0,Be=t.geoProjectionMutator(Me),Ne=Be(Ce);return Ne.parallel=function(Qe){return arguments.length?Be(Ce=Qe*E):Ce*F},Ne}function rt(Me,Ce){return[Me*o(Ce),Ce]}rt.invert=function(Me,Ce){return[Me/o(Ce),Ce]};function it(){return t.geoProjection(rt).scale(152.63)}function We(Me){if(!Me)return rt;var Ce=1/x(Me);function Be(Ne,Qe){var Je=Ce+Me-Qe,lt=Je&&Ne*o(Qe)/Je;return[Je*_(lt),Ce-Je*o(lt)]}return Be.invert=function(Ne,Qe){var Je=O(Ne*Ne+(Qe=Ce-Qe)*Qe),lt=Ce+Me-Je;return[Je/o(lt)*i(Ne,Qe),lt]},Be}function mt(){return ot(We).scale(123.082).center([0,26.1441]).parallel(45)}function bt(Me){function Ce(Be,Ne){var Qe=S-Ne,Je=Qe&&Be*Me*_(Qe)/Qe;return[Qe*_(Je)/Me,S-Qe*o(Je)]}return Ce.invert=function(Be,Ne){var Qe=Be*Me,Je=S-Ne,lt=O(Qe*Qe+Je*Je),Gt=i(Qe,Je);return[(lt?lt/_(lt):1)*Gt/Me,S-lt]},Ce}function Yt(){var Me=.5,Ce=t.geoProjectionMutator(bt),Be=Ce(Me);return Be.fraction=function(Ne){return arguments.length?Ce(Me=+Ne):Me},Be.scale(158.837)}var jt=qe(1,4/k,k);function mr(){return t.geoProjection(jt).scale(152.63)}function or(Me,Ce,Be,Ne,Qe,Je){var lt=o(Je),Gt;if(n(Me)>1||n(Je)>1)Gt=B(Be*Qe+Ce*Ne*lt);else{var Zt=_(Me/2),Nt=_(Je/2);Gt=2*R(O(Zt*Zt+Ce*Ne*Nt*Nt))}return n(Gt)>y?[Gt,i(Ne*_(Je),Ce*Qe-Be*Ne*lt)]:[0,0]}function fr(Me,Ce,Be){return B((Me*Me+Ce*Ce-Be*Be)/(2*Me*Ce))}function Ot(Me){return Me-2*k*l((Me+k)/(2*k))}function cr(Me,Ce,Be){for(var Ne=[[Me[0],Me[1],_(Me[1]),o(Me[1])],[Ce[0],Ce[1],_(Ce[1]),o(Ce[1])],[Be[0],Be[1],_(Be[1]),o(Be[1])]],Qe=Ne[2],Je,lt=0;lt<3;++lt,Qe=Je)Je=Ne[lt],Qe.v=or(Je[1]-Qe[1],Qe[3],Qe[2],Je[3],Je[2],Je[0]-Qe[0]),Qe.point=[0,0];var Gt=fr(Ne[0].v[0],Ne[2].v[0],Ne[1].v[0]),Zt=fr(Ne[0].v[0],Ne[1].v[0],Ne[2].v[0]),Nt=k-Gt;Ne[2].point[1]=0,Ne[0].point[0]=-(Ne[1].point[0]=Ne[0].v[0]/2);var Kt=[Ne[2].point[0]=Ne[0].point[0]+Ne[2].v[0]*o(Gt),2*(Ne[0].point[1]=Ne[1].point[1]=Ne[2].v[0]*_(Gt))];function ur(Sr,Br){var ln=_(Br),wn=o(Br),In=new Array(3),gi;for(gi=0;gi<3;++gi){var Bi=Ne[gi];if(In[gi]=or(Br-Bi[1],Bi[3],Bi[2],wn,ln,Sr-Bi[0]),!In[gi][0])return Bi.point;In[gi][1]=Ot(In[gi][1]-Bi.v[1])}var mi=Kt.slice();for(gi=0;gi<3;++gi){var ia=gi==2?0:gi+1,ua=fr(Ne[gi].v[0],In[gi][0],In[ia][0]);In[gi][1]<0&&(ua=-ua),gi?gi==1?(ua=Zt-ua,mi[0]-=In[gi][0]*o(ua),mi[1]-=In[gi][0]*_(ua)):(ua=Nt-ua,mi[0]+=In[gi][0]*o(ua),mi[1]+=In[gi][0]*_(ua)):(mi[0]+=In[gi][0]*o(ua),mi[1]-=In[gi][0]*_(ua))}return mi[0]/=3,mi[1]/=3,mi}return ur}function Ct(Me){return Me[0]*=E,Me[1]*=E,Me}function wt(){return Tt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Tt(Me,Ce,Be){var Ne=t.geoCentroid({type:"MultiPoint",coordinates:[Me,Ce,Be]}),Qe=[-Ne[0],-Ne[1]],Je=t.geoRotation(Qe),lt=cr(Ct(Je(Me)),Ct(Je(Ce)),Ct(Je(Be)));lt.invert=Oe(lt);var Gt=t.geoProjection(lt).rotate(Qe),Zt=Gt.center;return delete Gt.rotate,Gt.center=function(Nt){return arguments.length?Zt(Je(Nt)):Je.invert(Zt())},Gt.clipAngle(90)}function Mt(Me,Ce){var Be=O(1-_(Ce));return[2/A*Me*Be,A*(1-Be)]}Mt.invert=function(Me,Ce){var Be=(Be=Ce/A-1)*Be;return[Be>0?Me*O(k/Be)/2:0,R(1-Be)]};function Lt(){return t.geoProjection(Mt).scale(95.6464).center([0,30])}function ft(Me){var Ce=x(Me);function Be(Ne,Qe){return[Ne,(Ne?Ne/_(Ne):1)*(_(Qe)*o(Ne)-Ce*o(Qe))]}return Be.invert=Ce?function(Ne,Qe){Ne&&(Qe*=_(Ne)/Ne);var Je=o(Ne);return[Ne,2*i(O(Je*Je+Ce*Ce-Qe*Qe)-Je,Ce-Qe)]}:function(Ne,Qe){return[Ne,R(Ne?Qe*x(Ne)/Ne:Qe)]},Be}function kt(){return ot(ft).scale(249.828).clipAngle(90)}var rr=O(3);function pr(Me,Ce){return[rr*Me*(2*o(2*Ce/3)-1)/A,rr*A*_(Ce/3)]}pr.invert=function(Me,Ce){var Be=3*R(Ce/(rr*A));return[A*Me/(rr*(2*o(2*Be/3)-1)),Be]};function Kr(){return t.geoProjection(pr).scale(156.19)}function Nr(Me){var Ce=o(Me);function Be(Ne,Qe){return[Ne*Ce,_(Qe)/Ce]}return Be.invert=function(Ne,Qe){return[Ne/Ce,R(Qe*Ce)]},Be}function dn(){return ot(Nr).parallel(38.58).scale(195.044)}function xr(Me){var Ce=o(Me);function Be(Ne,Qe){return[Ne*Ce,(1+Ce)*x(Qe/2)]}return Be.invert=function(Ne,Qe){return[Ne/Ce,a(Qe/(1+Ce))*2]},Be}function Fr(){return ot(xr).scale(124.75)}function Zr(Me,Ce){var Be=O(8/(3*k));return[Be*Me*(1-n(Ce)/k),Be*Ce]}Zr.invert=function(Me,Ce){var Be=O(8/(3*k)),Ne=Ce/Be;return[Me/(Be*(1-n(Ne)/k)),Ne]};function Cn(){return t.geoProjection(Zr).scale(165.664)}function Dt(Me,Ce){var Be=O(4-3*_(n(Ce)));return[2/O(6*k)*Me*Be,p(Ce)*O(2*k/3)*(2-Be)]}Dt.invert=function(Me,Ce){var Be=2-n(Ce)/O(2*k/3);return[Me*O(6*k)/(2*Be),p(Ce)*R((4-Be*Be)/3)]};function At(){return t.geoProjection(Dt).scale(165.664)}function Vt(Me,Ce){var Be=O(k*(4+k));return[2/Be*Me*(1+O(1-4*Ce*Ce/(k*k))),4/Be*Ce]}Vt.invert=function(Me,Ce){var Be=O(k*(4+k))/2;return[Me*Be/(1+O(1-Ce*Ce*(4+k)/(4*k))),Ce*Be/2]};function Qt(){return t.geoProjection(Vt).scale(180.739)}function Ut(Me,Ce){var Be=(2+S)*_(Ce);Ce/=2;for(var Ne=0,Qe=1/0;Ne<10&&n(Qe)>y;Ne++){var Je=o(Ce);Ce-=Qe=(Ce+_(Ce)*(Je+2)-Be)/(2*Je*(1+Je))}return[2/O(k*(4+k))*Me*(1+o(Ce)),2*O(k/(4+k))*_(Ce)]}Ut.invert=function(Me,Ce){var Be=Ce*O((4+k)/k)/2,Ne=R(Be),Qe=o(Ne);return[Me/(2/O(k*(4+k))*(1+Qe)),R((Ne+Be*(Qe+2))/(2+S))]};function _r(){return t.geoProjection(Ut).scale(180.739)}function rn(Me,Ce){return[Me*(1+o(Ce))/O(2+k),2*Ce/O(2+k)]}rn.invert=function(Me,Ce){var Be=O(2+k),Ne=Ce*Be/2;return[Be*Me/(1+o(Ne)),Ne]};function Jr(){return t.geoProjection(rn).scale(173.044)}function qn(Me,Ce){for(var Be=(1+S)*_(Ce),Ne=0,Qe=1/0;Ne<10&&n(Qe)>y;Ne++)Ce-=Qe=(Ce+_(Ce)-Be)/(1+o(Ce));return Be=O(2+k),[Me*(1+o(Ce))/Be,2*Ce/Be]}qn.invert=function(Me,Ce){var Be=1+S,Ne=O(Be/2);return[Me*2*Ne/(1+o(Ce*=Ne)),R((Ce+_(Ce))/Be)]};function ri(){return t.geoProjection(qn).scale(173.044)}var Jn=3+2*T;function Ii(Me,Ce){var Be=_(Me/=2),Ne=o(Me),Qe=O(o(Ce)),Je=o(Ce/=2),lt=_(Ce)/(Je+T*Ne*Qe),Gt=O(2/(1+lt*lt)),Zt=O((T*Je+(Ne+Be)*Qe)/(T*Je+(Ne-Be)*Qe));return[Jn*(Gt*(Zt-1/Zt)-2*u(Zt)),Jn*(Gt*lt*(Zt+1/Zt)-2*a(lt))]}Ii.invert=function(Me,Ce){if(!(Je=_e.invert(Me/1.2,Ce*1.065)))return null;var Be=Je[0],Ne=Je[1],Qe=20,Je;Me/=Jn,Ce/=Jn;do{var lt=Be/2,Gt=Ne/2,Zt=_(lt),Nt=o(lt),Kt=_(Gt),ur=o(Gt),Sr=o(Ne),Br=O(Sr),ln=Kt/(ur+T*Nt*Br),wn=ln*ln,In=O(2/(1+wn)),gi=T*ur+(Nt+Zt)*Br,Bi=T*ur+(Nt-Zt)*Br,mi=gi/Bi,ia=O(mi),ua=ia-1/ia,lo=ia+1/ia,Bo=In*ua-2*u(ia)-Me,Ua=In*ln*lo-2*a(ln)-Ce,ls=Kt&&w*Br*Zt*wn/Kt,cl=(T*Nt*ur+Br)/(2*(ur+T*Nt*Br)*(ur+T*Nt*Br)*Br),Eu=-.5*ln*In*In*In,el=Eu*ls,yc=Eu*cl,wi=(wi=2*ur+T*Br*(Nt-Zt))*wi*ia,Di=(T*Nt*ur*Br+Sr)/wi,fl=-(T*Zt*Kt)/(Br*wi),Fc=ua*el-2*Di/ia+In*(Di+Di/mi),du=ua*yc-2*fl/ia+In*(fl+fl/mi),ms=ln*lo*el-2*ls/(1+wn)+In*lo*ls+In*ln*(Di-Di/mi),ff=ln*lo*yc-2*cl/(1+wn)+In*lo*cl+In*ln*(fl-fl/mi),ku=du*ms-ff*Fc;if(!ku)break;var hl=(Ua*du-Bo*ff)/ku,mh=(Bo*ms-Ua*Fc)/ku;Be-=hl,Ne=c(-S,f(S,Ne-mh))}while((n(hl)>y||n(mh)>y)&&--Qe>0);return n(n(Ne)-S)Ne){var ur=O(Kt),Sr=i(Nt,Zt),Br=Be*g(Sr/Be),ln=Sr-Br,wn=Me*o(ln),In=(Me*_(ln)-ln*_(wn))/(S-wn),gi=ao(ln,In),Bi=(k-Me)/Da(gi,wn,k);Zt=ur;var mi=50,ia;do Zt-=ia=(Me+Da(gi,wn,Zt)*Bi-ur)/(gi(Zt)*Bi);while(n(ia)>y&&--mi>0);Nt=ln*_(Zt),ZtNe){var Zt=O(Gt),Nt=i(lt,Je),Kt=Be*g(Nt/Be),ur=Nt-Kt;Je=Zt*o(ur),lt=Zt*_(ur);for(var Sr=Je-S,Br=_(Je),ln=lt/Br,wn=Jey||n(ln)>y)&&--wn>0);return[ur,Sr]},Zt}var Zs=wo(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function su(){return t.geoProjection(Zs).scale(149.995)}var fc=wo(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Af(){return t.geoProjection(fc).scale(153.93)}var ct=wo(5/6*k,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Jt(){return t.geoProjection(ct).scale(130.945)}function er(Me,Ce){var Be=Me*Me,Ne=Ce*Ce;return[Me*(1-.162388*Ne)*(.87-952426e-9*Be*Be),Ce*(1+Ne/12)]}er.invert=function(Me,Ce){var Be=Me,Ne=Ce,Qe=50,Je;do{var lt=Ne*Ne;Ne-=Je=(Ne*(1+lt/12)-Ce)/(1+lt/4)}while(n(Je)>y&&--Qe>0);Qe=50,Me/=1-.162388*lt;do{var Gt=(Gt=Be*Be)*Gt;Be-=Je=(Be*(.87-952426e-9*Gt)-Me)/(.87-.00476213*Gt)}while(n(Je)>y&&--Qe>0);return[Be,Ne]};function wr(){return t.geoProjection(er).scale(131.747)}var nn=wo(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Dr(){return t.geoProjection(nn).scale(131.087)}function bn(Me){var Ce=Me(S,0)[0]-Me(-S,0)[0];function Be(Ne,Qe){var Je=Ne>0?-.5:.5,lt=Me(Ne+Je*k,Qe);return lt[0]-=Je*Ce,lt}return Me.invert&&(Be.invert=function(Ne,Qe){var Je=Ne>0?-.5:.5,lt=Me.invert(Ne+Je*Ce,Qe),Gt=lt[0]-Je*k;return Gt<-k?Gt+=2*k:Gt>k&&(Gt-=2*k),lt[0]=Gt,lt}),Be}function Yr(Me,Ce){var Be=p(Me),Ne=p(Ce),Qe=o(Ce),Je=o(Me)*Qe,lt=_(Me)*Qe,Gt=_(Ne*Ce);Me=n(i(lt,Gt)),Ce=R(Je),n(Me-S)>y&&(Me%=S);var Zt=Tn(Me>k/4?S-Me:Me,Ce);return Me>k/4&&(Gt=Zt[0],Zt[0]=-Zt[1],Zt[1]=-Gt),Zt[0]*=Be,Zt[1]*=-Ne,Zt}Yr.invert=function(Me,Ce){n(Me)>1&&(Me=p(Me)*2-Me),n(Ce)>1&&(Ce=p(Ce)*2-Ce);var Be=p(Me),Ne=p(Ce),Qe=-Be*Me,Je=-Ne*Ce,lt=Je/Qe<1,Gt=Kn(lt?Je:Qe,lt?Qe:Je),Zt=Gt[0],Nt=Gt[1],Kt=o(Nt);return lt&&(Zt=-S-Zt),[Be*(i(_(Zt)*Kt,-_(Nt))+k),Ne*R(o(Zt)*Kt)]};function Tn(Me,Ce){if(Ce===S)return[0,0];var Be=_(Ce),Ne=Be*Be,Qe=Ne*Ne,Je=1+Qe,lt=1+3*Qe,Gt=1-Qe,Zt=R(1/O(Je)),Nt=Gt+Ne*Je*Zt,Kt=(1-Be)/Nt,ur=O(Kt),Sr=Kt*Je,Br=O(Sr),ln=ur*Gt,wn,In;if(Me===0)return[0,-(ln+Ne*Br)];var gi=o(Ce),Bi=1/gi,mi=2*Be*gi,ia=(-3*Ne+Zt*lt)*mi,ua=(-Nt*gi-(1-Be)*ia)/(Nt*Nt),lo=.5*ua/ur,Bo=Gt*lo-2*Ne*ur*mi,Ua=Ne*Je*ua+Kt*lt*mi,ls=-Bi*mi,cl=-Bi*Ua,Eu=-2*Bi*Bo,el=4*Me/k,yc;if(Me>.222*k||Ce.175*k){if(wn=(ln+Ne*O(Sr*(1+Qe)-ln*ln))/(1+Qe),Me>k/4)return[wn,wn];var wi=wn,Di=.5*wn;wn=.5*(Di+wi),In=50;do{var fl=O(Sr-wn*wn),Fc=wn*(Eu+ls*fl)+cl*R(wn/Br)-el;if(!Fc)break;Fc<0?Di=wn:wi=wn,wn=.5*(Di+wi)}while(n(wi-Di)>y&&--In>0)}else{wn=y,In=25;do{var du=wn*wn,ms=O(Sr-du),ff=Eu+ls*ms,ku=wn*ff+cl*R(wn/Br)-el,hl=ff+(cl-ls*du)/ms;wn-=yc=ms?ku/hl:0}while(n(yc)>y&&--In>0)}return[wn,-ln-Ne*O(Sr-wn*wn)]}function Kn(Me,Ce){for(var Be=0,Ne=1,Qe=.5,Je=50;;){var lt=Qe*Qe,Gt=O(Qe),Zt=R(1/O(1+lt)),Nt=1-lt+Qe*(1+lt)*Zt,Kt=(1-Gt)/Nt,ur=O(Kt),Sr=Kt*(1+lt),Br=ur*(1-lt),ln=Sr-Me*Me,wn=O(ln),In=Ce+Br+Qe*wn;if(n(Ne-Be)0?Be=Qe:Ne=Qe,Qe=.5*(Be+Ne)}if(!Je)return null;var gi=R(Gt),Bi=o(gi),mi=1/Bi,ia=2*Gt*Bi,ua=(-3*Qe+Zt*(1+3*lt))*ia,lo=(-Nt*Bi-(1-Gt)*ua)/(Nt*Nt),Bo=.5*lo/ur,Ua=(1-lt)*Bo-2*Qe*ur*ia,ls=-2*mi*Ua,cl=-mi*ia,Eu=-mi*(Qe*(1+lt)*lo+Kt*(1+3*lt)*ia);return[k/4*(Me*(ls+cl*wn)+Eu*R(Me/O(Sr))),gi]}function Qn(){return t.geoProjection(bn(Yr)).scale(239.75)}function Ai(Me,Ce,Be){var Ne,Qe,Je;return Me?(Ne=Qi(Me,Be),Ce?(Qe=Qi(Ce,1-Be),Je=Qe[1]*Qe[1]+Be*Ne[0]*Ne[0]*Qe[0]*Qe[0],[[Ne[0]*Qe[2]/Je,Ne[1]*Ne[2]*Qe[0]*Qe[1]/Je],[Ne[1]*Qe[1]/Je,-Ne[0]*Ne[2]*Qe[0]*Qe[2]/Je],[Ne[2]*Qe[1]*Qe[2]/Je,-Be*Ne[0]*Ne[1]*Qe[0]/Je]]):[[Ne[0],0],[Ne[1],0],[Ne[2],0]]):(Qe=Qi(Ce,1-Be),[[0,Qe[0]/Qe[1]],[1/Qe[1],0],[Qe[2]/Qe[1],0]])}function Qi(Me,Ce){var Be,Ne,Qe,Je,lt;if(Ce=1-y)return Be=(1-Ce)/4,Ne=q(Me),Je=U(Me),Qe=1/Ne,lt=Ne*j(Me),[Je+Be*(lt-Me)/(Ne*Ne),Qe-Be*Je*Qe*(lt-Me),Qe+Be*Je*Qe*(lt+Me),2*a(s(Me))-S+Be*(lt-Me)/Ne];var Gt=[1,0,0,0,0,0,0,0,0],Zt=[O(Ce),0,0,0,0,0,0,0,0],Nt=0;for(Ne=O(1-Ce),lt=1;n(Zt[Nt]/Gt[Nt])>y&&Nt<8;)Be=Gt[Nt++],Zt[Nt]=(Be-Ne)/2,Gt[Nt]=(Be+Ne)/2,Ne=O(Be*Ne),lt*=2;Qe=lt*Gt[Nt]*Me;do Je=Zt[Nt]*_(Ne=Qe)/Gt[Nt],Qe=(R(Je)+Qe)/2;while(--Nt);return[_(Qe),Je=o(Qe),Je/o(Qe-Ne),Qe]}function Ra(Me,Ce,Be){var Ne=n(Me),Qe=n(Ce),Je=j(Qe);if(Ne){var lt=1/_(Ne),Gt=1/(x(Ne)*x(Ne)),Zt=-(Gt+Be*(Je*Je*lt*lt)-1+Be),Nt=(Be-1)*Gt,Kt=(-Zt+O(Zt*Zt-4*Nt))/2;return[ii(a(1/O(Kt)),Be)*p(Me),ii(a(O((Kt/Gt-1)/Be)),1-Be)*p(Ce)]}return[0,ii(a(Je),1-Be)*p(Ce)]}function ii(Me,Ce){if(!Ce)return Me;if(Ce===1)return u(x(Me/2+L));for(var Be=1,Ne=O(1-Ce),Qe=O(Ce),Je=0;n(Qe)>y;Je++){if(Me%k){var lt=a(Ne*x(Me)/Be);lt<0&&(lt+=k),Me+=lt+~~(Me/k)*k}else Me+=Me;Qe=(Be+Ne)/2,Ne=O(Be*Ne),Qe=((Be=Qe)-Ne)/2}return Me/(v(2,Je)*Be)}function Za(Me,Ce){var Be=(T-1)/(T+1),Ne=O(1-Be*Be),Qe=ii(S,Ne*Ne),Je=-1,lt=u(x(k/4+n(Ce)/2)),Gt=s(Je*lt)/O(Be),Zt=ja(Gt*o(Je*Me),Gt*_(Je*Me)),Nt=Ra(Zt[0],Zt[1],Ne*Ne);return[-Nt[1],(Ce>=0?1:-1)*(.5*Qe-Nt[0])]}function ja(Me,Ce){var Be=Me*Me,Ne=Ce+1,Qe=1-Be-Ce*Ce;return[.5*((Me>=0?S:-S)-i(Qe,2*Me)),-.25*u(Qe*Qe+4*Be)+.5*u(Ne*Ne+Be)]}function qo(Me,Ce){var Be=Ce[0]*Ce[0]+Ce[1]*Ce[1];return[(Me[0]*Ce[0]+Me[1]*Ce[1])/Be,(Me[1]*Ce[0]-Me[0]*Ce[1])/Be]}Za.invert=function(Me,Ce){var Be=(T-1)/(T+1),Ne=O(1-Be*Be),Qe=ii(S,Ne*Ne),Je=-1,lt=Ai(.5*Qe-Ce,-Me,Ne*Ne),Gt=qo(lt[0],lt[1]),Zt=i(Gt[1],Gt[0])/Je;return[Zt,2*a(s(.5/Je*u(Be*Gt[0]*Gt[0]+Be*Gt[1]*Gt[1])))-S]};function $a(){return t.geoProjection(bn(Za)).scale(151.496)}function Ka(Me){var Ce=_(Me),Be=o(Me),Ne=Oa(Me);Ne.invert=Oa(-Me);function Qe(Je,lt){var Gt=Ne(Je,lt);Je=Gt[0],lt=Gt[1];var Zt=_(lt),Nt=o(lt),Kt=o(Je),ur=B(Ce*Zt+Be*Nt*Kt),Sr=_(ur),Br=n(Sr)>y?ur/Sr:1;return[Br*Be*_(Je),(n(Je)>S?Br:-Br)*(Ce*Nt-Be*Zt*Kt)]}return Qe.invert=function(Je,lt){var Gt=O(Je*Je+lt*lt),Zt=-_(Gt),Nt=o(Gt),Kt=Gt*Nt,ur=-lt*Zt,Sr=Gt*Ce,Br=O(Kt*Kt+ur*ur-Sr*Sr),ln=i(Kt*Sr+ur*Br,ur*Sr-Kt*Br),wn=(Gt>S?-1:1)*i(Je*Zt,Gt*o(ln)*Nt+lt*_(ln)*Zt);return Ne.invert(wn,ln)},Qe}function Oa(Me){var Ce=_(Me),Be=o(Me);return function(Ne,Qe){var Je=o(Qe),lt=o(Ne)*Je,Gt=_(Ne)*Je,Zt=_(Qe);return[i(Gt,lt*Be-Zt*Ce),R(Zt*Be+lt*Ce)]}}function Ni(){var Me=0,Ce=t.geoProjectionMutator(Ka),Be=Ce(Me),Ne=Be.rotate,Qe=Be.stream,Je=t.geoCircle();return Be.parallel=function(lt){if(!arguments.length)return Me*F;var Gt=Be.rotate();return Ce(Me=lt*E).rotate(Gt)},Be.rotate=function(lt){return arguments.length?(Ne.call(Be,[lt[0],lt[1]-Me*F]),Je.center([-lt[0],-lt[1]]),Be):(lt=Ne.call(Be),lt[1]+=Me*F,lt)},Be.stream=function(lt){return lt=Qe(lt),lt.sphere=function(){lt.polygonStart();var Gt=.01,Zt=Je.radius(90-Gt)().coordinates[0],Nt=Zt.length-1,Kt=-1,ur;for(lt.lineStart();++Kt=0;)lt.point((ur=Zt[Kt])[0],ur[1]);lt.lineEnd(),lt.polygonEnd()},lt},Be.scale(79.4187).parallel(45).clipAngle(180-.001)}var ka=3,vs=R(1-1/ka)*F,xo=Nr(0);function so(Me){var Ce=vs*E,Be=Mt(k,Ce)[0]-Mt(-k,Ce)[0],Ne=xo(0,Ce)[1],Qe=Mt(0,Ce)[1],Je=A-Qe,lt=m/Me,Gt=4/m,Zt=Ne+Je*Je*4/m;function Nt(Kt,ur){var Sr,Br=n(ur);if(Br>Ce){var ln=f(Me-1,c(0,l((Kt+k)/lt)));Kt+=k*(Me-1)/Me-ln*lt,Sr=Mt(Kt,Br),Sr[0]=Sr[0]*m/Be-m*(Me-1)/(2*Me)+ln*m/Me,Sr[1]=Ne+(Sr[1]-Qe)*4*Je/m,ur<0&&(Sr[1]=-Sr[1])}else Sr=xo(Kt,ur);return Sr[0]*=Gt,Sr[1]/=Zt,Sr}return Nt.invert=function(Kt,ur){Kt/=Gt,ur*=Zt;var Sr=n(ur);if(Sr>Ne){var Br=f(Me-1,c(0,l((Kt+k)/lt)));Kt=(Kt+k*(Me-1)/Me-Br*lt)*Be/m;var ln=Mt.invert(Kt,.25*(Sr-Ne)*m/Je+Qe);return ln[0]-=k*(Me-1)/Me-Br*lt,ur<0&&(ln[1]=-ln[1]),ln}return xo.invert(Kt,ur)},Nt}function oo(Me,Ce){return[Me,Ce&1?90-y:vs]}function Co(Me,Ce){return[Me,Ce&1?-90+y:-vs]}function pa(Me){return[Me[0]*(1-y),Me[1]]}function la(Me){var Ce=[].concat(r.range(-180,180+Me/2,Me).map(oo),r.range(180,-180-Me/2,-Me).map(Co));return{type:"Polygon",coordinates:[Me===180?Ce.map(pa):Ce]}}function As(){var Me=4,Ce=t.geoProjectionMutator(so),Be=Ce(Me),Ne=Be.stream;return Be.lobes=function(Qe){return arguments.length?Ce(Me=+Qe):Me},Be.stream=function(Qe){var Je=Be.rotate(),lt=Ne(Qe),Gt=(Be.rotate([0,0]),Ne(Qe));return Be.rotate(Je),lt.sphere=function(){t.geoStream(la(180/Me),Gt)},lt},Be.scale(239.75)}function Ms(Me){var Ce=1+Me,Be=_(1/Ce),Ne=R(Be),Qe=2*O(k/(Je=k+4*Ne*Ce)),Je,lt=.5*Qe*(Ce+O(Me*(2+Me))),Gt=Me*Me,Zt=Ce*Ce;function Nt(Kt,ur){var Sr=1-_(ur),Br,ln;if(Sr&&Sr<2){var wn=S-ur,In=25,gi;do{var Bi=_(wn),mi=o(wn),ia=Ne+i(Bi,Ce-mi),ua=1+Zt-2*Ce*mi;wn-=gi=(wn-Gt*Ne-Ce*Bi+ua*ia-.5*Sr*Je)/(2*Ce*Bi*ia)}while(n(gi)>C&&--In>0);Br=Qe*O(ua),ln=Kt*ia/k}else Br=Qe*(Me+Sr),ln=Kt*Ne/k;return[Br*_(ln),lt-Br*o(ln)]}return Nt.invert=function(Kt,ur){var Sr=Kt*Kt+(ur-=lt)*ur,Br=(1+Zt-Sr/(Qe*Qe))/(2*Ce),ln=B(Br),wn=_(ln),In=Ne+i(wn,Ce-Br);return[R(Kt/O(Sr))*k/In,R(1-2*(ln-Gt*Ne-Ce*wn+(1+Zt-2*Ce*Br)*In)/Je)]},Nt}function xu(){var Me=1,Ce=t.geoProjectionMutator(Ms),Be=Ce(Me);return Be.ratio=function(Ne){return arguments.length?Ce(Me=+Ne):Me},Be.scale(167.774).center([0,18.67])}var rs=.7109889596207567,Ls=.0528035274542;function $s(Me,Ce){return Ce>-rs?(Me=we(Me,Ce),Me[1]+=Ls,Me):rt(Me,Ce)}$s.invert=function(Me,Ce){return Ce>-rs?we.invert(Me,Ce-Ls):rt.invert(Me,Ce)};function Kc(){return t.geoProjection($s).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function _u(Me,Ce){return n(Ce)>rs?(Me=we(Me,Ce),Me[1]-=Ce>0?Ls:-Ls,Me):rt(Me,Ce)}_u.invert=function(Me,Ce){return n(Ce)>rs?we.invert(Me,Ce+(Ce>0?Ls:-Ls)):rt.invert(Me,Ce)};function Gu(){return t.geoProjection(_u).scale(152.63)}function Ja(Me,Ce,Be,Ne){var Qe=O(4*k/(2*Be+(1+Me-Ce/2)*_(2*Be)+(Me+Ce)/2*_(4*Be)+Ce/2*_(6*Be))),Je=O(Ne*_(Be)*O((1+Me*o(2*Be)+Ce*o(4*Be))/(1+Me+Ce))),lt=Be*Zt(1);function Gt(ur){return O(1+Me*o(2*ur)+Ce*o(4*ur))}function Zt(ur){var Sr=ur*Be;return(2*Sr+(1+Me-Ce/2)*_(2*Sr)+(Me+Ce)/2*_(4*Sr)+Ce/2*_(6*Sr))/Be}function Nt(ur){return Gt(ur)*_(ur)}var Kt=function(ur,Sr){var Br=Be*tt(Zt,lt*_(Sr)/Be,Sr/k);isNaN(Br)&&(Br=Be*p(Sr));var ln=Qe*Gt(Br);return[ln*Je*ur/k*o(Br),ln/Je*_(Br)]};return Kt.invert=function(ur,Sr){var Br=tt(Nt,Sr*Je/Qe);return[ur*k/(o(Br)*Qe*Je*Gt(Br)),R(Be*Zt(Br/Be)/lt)]},Be===0&&(Qe=O(Ne/k),Kt=function(ur,Sr){return[ur*Qe,_(Sr)/Qe]},Kt.invert=function(ur,Sr){return[ur/Qe,R(Sr*Qe)]}),Kt}function ps(){var Me=1,Ce=0,Be=45*E,Ne=2,Qe=t.geoProjectionMutator(Ja),Je=Qe(Me,Ce,Be,Ne);return Je.a=function(lt){return arguments.length?Qe(Me=+lt,Ce,Be,Ne):Me},Je.b=function(lt){return arguments.length?Qe(Me,Ce=+lt,Be,Ne):Ce},Je.psiMax=function(lt){return arguments.length?Qe(Me,Ce,Be=+lt*E,Ne):Be*F},Je.ratio=function(lt){return arguments.length?Qe(Me,Ce,Be,Ne=+lt):Ne},Je.scale(180.739)}function Sa(Me,Ce,Be,Ne,Qe,Je,lt,Gt,Zt,Nt,Kt){if(Kt.nanEncountered)return NaN;var ur,Sr,Br,ln,wn,In,gi,Bi,mi,ia;if(ur=Be-Ce,Sr=Me(Ce+ur*.25),Br=Me(Be-ur*.25),isNaN(Sr)){Kt.nanEncountered=!0;return}if(isNaN(Br)){Kt.nanEncountered=!0;return}return ln=ur*(Ne+4*Sr+Qe)/12,wn=ur*(Qe+4*Br+Je)/12,In=ln+wn,ia=(In-lt)/15,Nt>Zt?(Kt.maxDepthCount++,In+ia):Math.abs(ia)>1;do Zt[In]>Br?wn=In:ln=In,In=ln+wn>>1;while(In>ln);var gi=Zt[In+1]-Zt[In];return gi&&(gi=(Br-Zt[In+1])/gi),(In+1+gi)/lt}var ur=2*Kt(1)/k*Je/Be,Sr=function(Br,ln){var wn=Kt(n(_(ln))),In=Ne(wn)*Br;return wn/=ur,[In,ln>=0?wn:-wn]};return Sr.invert=function(Br,ln){var wn;return ln*=ur,n(ln)<1&&(wn=p(ln)*R(Qe(n(ln))*Je)),[Br/Ne(n(ln)),wn]},Sr}function Ca(){var Me=0,Ce=2.5,Be=1.183136,Ne=t.geoProjectionMutator(Ps),Qe=Ne(Me,Ce,Be);return Qe.alpha=function(Je){return arguments.length?Ne(Me=+Je,Ce,Be):Me},Qe.k=function(Je){return arguments.length?Ne(Me,Ce=+Je,Be):Ce},Qe.gamma=function(Je){return arguments.length?Ne(Me,Ce,Be=+Je):Be},Qe.scale(152.63)}function Pl(Me,Ce){return n(Me[0]-Ce[0])=0;--Zt)Be=Me[1][Zt],Ne=Be[0][0],Qe=Be[0][1],Je=Be[1][1],lt=Be[2][0],Gt=Be[2][1],Ce.push(ll([[lt-y,Gt-y],[lt-y,Je+y],[Ne+y,Je+y],[Ne+y,Qe-y]],30));return{type:"Polygon",coordinates:[r.merge(Ce)]}}function lu(Me,Ce,Be){var Ne,Qe;function Je(Zt,Nt){for(var Kt=Nt<0?-1:1,ur=Ce[+(Nt<0)],Sr=0,Br=ur.length-1;Srur[Sr][2][0];++Sr);var ln=Me(Zt-ur[Sr][1][0],Nt);return ln[0]+=Me(ur[Sr][1][0],Kt*Nt>Kt*ur[Sr][0][1]?ur[Sr][0][1]:Nt)[0],ln}Be?Je.invert=Be(Je):Me.invert&&(Je.invert=function(Zt,Nt){for(var Kt=Qe[+(Nt<0)],ur=Ce[+(Nt<0)],Sr=0,Br=Kt.length;Srln&&(wn=Br,Br=ln,ln=wn),[[ur,Br],[Sr,ln]]})}),lt):Ce.map(function(Nt){return Nt.map(function(Kt){return[[Kt[0][0]*F,Kt[0][1]*F],[Kt[1][0]*F,Kt[1][1]*F],[Kt[2][0]*F,Kt[2][1]*F]]})})},Ce!=null&<.lobes(Ce),lt}var Mf=[[[[-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 Bd(){return lu(Ve,Mf).scale(160.857)}var Hu=[[[[-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 Sf(){return lu(_u,Hu).scale(152.63)}var kc=[[[[-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 Uo(){return lu(we,kc).scale(169.529)}var ns=[[[[-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 Ks(){return lu(we,ns).scale(169.529).rotate([20,0])}var Ef=[[[[-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 ju(){return lu($s,Ef,Oe).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var gs=[[[[-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 bu(){return lu(rt,gs).scale(152.63).rotate([-20,0])}function kf(Me,Ce){return[3/m*Me*O(k*k/3-Ce*Ce),Ce]}kf.invert=function(Me,Ce){return[m/3*Me/O(k*k/3-Ce*Ce),Ce]};function ah(){return t.geoProjection(kf).scale(158.837)}function Od(Me){function Ce(Be,Ne){if(n(n(Ne)-S)2)return null;Be/=2,Ne/=2;var Je=Be*Be,lt=Ne*Ne,Gt=2*Ne/(1+Je+lt);return Gt=v((1+Gt)/(1-Gt),1/Me),[i(2*Be,1-Je-lt)/Me,R((Gt-1)/(Gt+1))]},Ce}function Qc(){var Me=.5,Ce=t.geoProjectionMutator(Od),Be=Ce(Me);return Be.spacing=function(Ne){return arguments.length?Ce(Me=+Ne):Me},Be.scale(124.75)}var uu=k/T;function oh(Me,Ce){return[Me*(1+O(o(Ce)))/2,Ce/(o(Ce/2)*o(Me/6))]}oh.invert=function(Me,Ce){var Be=n(Me),Ne=n(Ce),Qe=y,Je=S;Ney||n(In)>y)&&--Qe>0);return Qe&&[Be,Ne]};function Zo(){return t.geoProjection(Fl).scale(139.98)}function Ro(Me,Ce){return[_(Me)/o(Ce),x(Ce)*o(Me)]}Ro.invert=function(Me,Ce){var Be=Me*Me,Ne=Ce*Ce,Qe=Ne+1,Je=Be+Qe,lt=Me?w*O((Je-O(Je*Je-4*Be))/Be):1/O(Qe);return[R(Me*lt),p(Ce)*B(lt)]};function is(){return t.geoProjection(Ro).scale(144.049).clipAngle(90-.001)}function Dl(Me){var Ce=o(Me),Be=x(L+Me/2);function Ne(Qe,Je){var lt=Je-Me,Gt=n(lt)=0;)Kt=Me[Nt],ur=Kt[0]+Gt*(Br=ur)-Zt*Sr,Sr=Kt[1]+Gt*Sr+Zt*Br;return ur=Gt*(Br=ur)-Zt*Sr,Sr=Gt*Sr+Zt*Br,[ur,Sr]}return Be.invert=function(Ne,Qe){var Je=20,lt=Ne,Gt=Qe;do{for(var Zt=Ce,Nt=Me[Zt],Kt=Nt[0],ur=Nt[1],Sr=0,Br=0,ln;--Zt>=0;)Nt=Me[Zt],Sr=Kt+lt*(ln=Sr)-Gt*Br,Br=ur+lt*Br+Gt*ln,Kt=Nt[0]+lt*(ln=Kt)-Gt*ur,ur=Nt[1]+lt*ur+Gt*ln;Sr=Kt+lt*(ln=Sr)-Gt*Br,Br=ur+lt*Br+Gt*ln,Kt=lt*(ln=Kt)-Gt*ur-Ne,ur=lt*ur+Gt*ln-Qe;var wn=Sr*Sr+Br*Br,In,gi;lt-=In=(Kt*Sr+ur*Br)/wn,Gt-=gi=(ur*Sr-Kt*Br)/wn}while(n(In)+n(gi)>y*y&&--Je>0);if(Je){var Bi=O(lt*lt+Gt*Gt),mi=2*a(Bi*.5),ia=_(mi);return[i(lt*ia,Bi*o(mi)),Bi?R(Gt*ia/Bi):0]}},Be}var X0=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Nd=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Cf=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Vo=[[.9245,0],[0,0],[.01943,0]],Ud=[[.721316,0],[0,0],[-.00881625,-.00617325]];function zh(){return vc(X0,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function tf(){return vc(Nd,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Vd(){return vc(Cf,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function rf(){return vc(Vo,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function qh(){return vc(Ud,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function vc(Me,Ce){var Be=t.geoProjection(sh(Me)).rotate(Ce).clipAngle(90),Ne=t.geoRotation(Ce),Qe=Be.center;return delete Be.rotate,Be.center=function(Je){return arguments.length?Qe(Ne(Je)):Ne.invert(Qe())},Be}var dd=O(6),Bh=O(7);function Wu(Me,Ce){var Be=R(7*_(Ce)/(3*dd));return[dd*Me*(2*o(2*Be/3)-1)/Bh,9*_(Be/3)/Bh]}Wu.invert=function(Me,Ce){var Be=3*R(Ce*Bh/9);return[Me*Bh/(dd*(2*o(2*Be/3)-1)),R(_(Be)*3*dd/7)]};function vd(){return t.geoProjection(Wu).scale(164.859)}function pd(Me,Ce){for(var Be=(1+w)*_(Ce),Ne=Ce,Qe=0,Je;Qe<25&&(Ne-=Je=(_(Ne/2)+_(Ne)-Be)/(.5*o(Ne/2)+o(Ne)),!(n(Je)C&&--Ne>0);return Je=Be*Be,lt=Je*Je,Gt=Je*lt,[Me/(.84719-.13063*Je+Gt*Gt*(-.04515+.05494*Je-.02326*lt+.00331*Gt)),Be]};function gd(){return t.geoProjection(af).scale(175.295)}function Rl(Me,Ce){return[Me*(1+o(Ce))/2,2*(Ce-x(Ce/2))]}Rl.invert=function(Me,Ce){for(var Be=Ce/2,Ne=0,Qe=1/0;Ne<10&&n(Qe)>y;++Ne){var Je=o(Ce/2);Ce-=Qe=(Ce-x(Ce/2)-Be)/(1-.5/(Je*Je))}return[2*Me/(1+o(Ce)),Ce]};function ch(){return t.geoProjection(Rl).scale(152.63)}var Lc=[[[[-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 md(){return lu(De(1/0),Lc).rotate([20,0]).scale(152.63)}function yd(Me,Ce){var Be=_(Ce),Ne=o(Ce),Qe=p(Me);if(Me===0||n(Ce)===S)return[0,Ce];if(Ce===0)return[Me,0];if(n(Me)===S)return[Me*Ne,S*Be];var Je=k/(2*Me)-2*Me/k,lt=2*Ce/k,Gt=(1-lt*lt)/(Be-lt),Zt=Je*Je,Nt=Gt*Gt,Kt=1+Zt/Nt,ur=1+Nt/Zt,Sr=(Je*Be/Gt-Je/2)/Kt,Br=(Nt*Be/Zt+Gt/2)/ur,ln=Sr*Sr+Ne*Ne/Kt,wn=Br*Br-(Nt*Be*Be/Zt+Gt*Be-1)/ur;return[S*(Sr+O(ln)*Qe),S*(Br+O(wn<0?0:wn)*p(-Ce*Je)*Qe)]}yd.invert=function(Me,Ce){Me/=S,Ce/=S;var Be=Me*Me,Ne=Ce*Ce,Qe=Be+Ne,Je=k*k;return[Me?(Qe-1+O((1-Qe)*(1-Qe)+4*Be))/(2*Me)*S:0,tt(function(lt){return Qe*(k*_(lt)-2*lt)*k+4*lt*lt*(Ce-_(lt))+2*k*lt-Je*Ce},0)]};function Lf(){return t.geoProjection(yd).scale(127.267)}var wu=1.0148,fh=.23185,Oh=-.14499,hh=.02406,Gd=wu,Gl=5*fh,wl=7*Oh,xd=9*hh,Hl=1.790857183;function _d(Me,Ce){var Be=Ce*Ce;return[Me,Ce*(wu+Be*Be*(fh+Be*(Oh+hh*Be)))]}_d.invert=function(Me,Ce){Ce>Hl?Ce=Hl:Ce<-Hl&&(Ce=-Hl);var Be=Ce,Ne;do{var Qe=Be*Be;Be-=Ne=(Be*(wu+Qe*Qe*(fh+Qe*(Oh+hh*Qe)))-Ce)/(Gd+Qe*Qe*(Gl+Qe*(wl+xd*Qe)))}while(n(Ne)>y);return[Me,Be]};function dh(){return t.geoProjection(_d).scale(139.319)}function Pf(Me,Ce){if(n(Ce)y&&--Qe>0);return lt=x(Ne),[(n(Ce)=0;)if(Ne=Ce[Gt],Be[0]===Ne[0]&&Be[1]===Ne[1]){if(Je)return[Je,Be];Je=Be}}}function Uh(Me){for(var Ce=Me.length,Be=[],Ne=Me[Ce-1],Qe=0;Qe0?[-Ne[0],0]:[180-Ne[0],180])};var Ce=pc.map(function(Be){return{face:Be,project:Me(Be)}});return[-1,0,0,1,0,1,4,5].forEach(function(Be,Ne){var Qe=Ce[Be];Qe&&(Qe.children||(Qe.children=[])).push(Ce[Ne])}),Yu(Ce[0],function(Be,Ne){return Ce[Be<-k/2?Ne<0?6:4:Be<0?Ne<0?2:0:BeNe^Br>Ne&&Be<(Sr-Nt)*(Ne-Kt)/(Br-Kt)+Nt&&(Qe=!Qe)}return Qe}function wd(Me,Ce){var Be=Ce.stream,Ne;if(!Be)throw new Error("invalid projection");switch(Me&&Me.type){case"Feature":Ne=Z0;break;case"FeatureCollection":Ne=Hh;break;default:Ne=Td;break}return Ne(Me,Be)}function Hh(Me,Ce){return{type:"FeatureCollection",features:Me.features.map(function(Be){return Z0(Be,Ce)})}}function Z0(Me,Ce){return{type:"Feature",id:Me.id,properties:Me.properties,geometry:Td(Me.geometry,Ce)}}function y0(Me,Ce){return{type:"GeometryCollection",geometries:Me.geometries.map(function(Be){return Td(Be,Ce)})}}function Td(Me,Ce){if(!Me)return null;if(Me.type==="GeometryCollection")return y0(Me,Ce);var Be;switch(Me.type){case"Point":Be=If;break;case"MultiPoint":Be=If;break;case"LineString":Be=vh;break;case"MultiLineString":Be=vh;break;case"Polygon":Be=zf;break;case"MultiPolygon":Be=zf;break;case"Sphere":Be=zf;break;default:return null}return t.geoStream(Me,Ce(Be)),Be.result()}var ul=[],Wl=[],If={point:function(Me,Ce){ul.push([Me,Ce])},result:function(){var Me=ul.length?ul.length<2?{type:"Point",coordinates:ul[0]}:{type:"MultiPoint",coordinates:ul}:null;return ul=[],Me}},vh={lineStart:La,point:function(Me,Ce){ul.push([Me,Ce])},lineEnd:function(){ul.length&&(Wl.push(ul),ul=[])},result:function(){var Me=Wl.length?Wl.length<2?{type:"LineString",coordinates:Wl[0]}:{type:"MultiLineString",coordinates:Wl}:null;return Wl=[],Me}},zf={polygonStart:La,lineStart:La,point:function(Me,Ce){ul.push([Me,Ce])},lineEnd:function(){var Me=ul.length;if(Me){do ul.push(ul[0].slice());while(++Me<4);Wl.push(ul),ul=[]}},polygonEnd:La,result:function(){if(!Wl.length)return null;var Me=[],Ce=[];return Wl.forEach(function(Be){Rf(Be)?Me.push([Be]):Ce.push(Be)}),Ce.forEach(function(Be){var Ne=Be[0];Me.some(function(Qe){if(m0(Qe[0],Ne))return Qe.push(Be),!0})||Me.push([Be])}),Wl=[],Me.length?Me.length>1?{type:"MultiPolygon",coordinates:Me}:{type:"Polygon",coordinates:Me[0]}:null}};function qf(Me){var Ce=Me(S,0)[0]-Me(-S,0)[0];function Be(Ne,Qe){var Je=n(Ne)0?Ne-k:Ne+k,Qe),Gt=(lt[0]-lt[1])*w,Zt=(lt[0]+lt[1])*w;if(Je)return[Gt,Zt];var Nt=Ce*w,Kt=Gt>0^Zt>0?-1:1;return[Kt*Gt-p(Zt)*Nt,Kt*Zt-p(Gt)*Nt]}return Me.invert&&(Be.invert=function(Ne,Qe){var Je=(Ne+Qe)*w,lt=(Qe-Ne)*w,Gt=n(Je)<.5*Ce&&n(lt)<.5*Ce;if(!Gt){var Zt=Ce*w,Nt=Je>0^lt>0?-1:1,Kt=-Nt*Ne+(lt>0?1:-1)*Zt,ur=-Nt*Qe+(Je>0?1:-1)*Zt;Je=(-Kt-ur)*w,lt=(Kt-ur)*w}var Sr=Me.invert(Je,lt);return Gt||(Sr[0]+=Je>0?k:-k),Sr}),t.geoProjection(Be).rotate([-90,-90,45]).clipAngle(180-.001)}function Ze(){return qf(Yr).scale(176.423)}function yt(){return qf(Za).scale(111.48)}function Wt(Me,Ce){if(!(0<=(Ce=+Ce)&&Ce<=20))throw new Error("invalid digits");function Be(Nt){var Kt=Nt.length,ur=2,Sr=new Array(Kt);for(Sr[0]=+Nt[0].toFixed(Ce),Sr[1]=+Nt[1].toFixed(Ce);ur2||Br[0]!=Kt[0]||Br[1]!=Kt[1])&&(ur.push(Br),Kt=Br)}return ur.length===1&&Nt.length>1&&ur.push(Be(Nt[Nt.length-1])),ur}function Je(Nt){return Nt.map(Qe)}function lt(Nt){if(Nt==null)return Nt;var Kt;switch(Nt.type){case"GeometryCollection":Kt={type:"GeometryCollection",geometries:Nt.geometries.map(lt)};break;case"Point":Kt={type:"Point",coordinates:Be(Nt.coordinates)};break;case"MultiPoint":Kt={type:Nt.type,coordinates:Ne(Nt.coordinates)};break;case"LineString":Kt={type:Nt.type,coordinates:Qe(Nt.coordinates)};break;case"MultiLineString":case"Polygon":Kt={type:Nt.type,coordinates:Je(Nt.coordinates)};break;case"MultiPolygon":Kt={type:"MultiPolygon",coordinates:Nt.coordinates.map(Je)};break;default:return Nt}return Nt.bbox!=null&&(Kt.bbox=Nt.bbox),Kt}function Gt(Nt){var Kt={type:"Feature",properties:Nt.properties,geometry:lt(Nt.geometry)};return Nt.id!=null&&(Kt.id=Nt.id),Nt.bbox!=null&&(Kt.bbox=Nt.bbox),Kt}if(Me!=null)switch(Me.type){case"Feature":return Gt(Me);case"FeatureCollection":{var Zt={type:"FeatureCollection",features:Me.features.map(Gt)};return Me.bbox!=null&&(Zt.bbox=Me.bbox),Zt}default:return lt(Me)}return Me}function zt(Me){var Ce=_(Me);function Be(Ne,Qe){var Je=Ce?x(Ne*Ce/2)/Ce:Ne/2;if(!Qe)return[2*Je,-Me];var lt=2*a(Je*_(Qe)),Gt=1/x(Qe);return[_(lt)*Gt,Qe+(1-o(lt))*Gt-Me]}return Be.invert=function(Ne,Qe){if(n(Qe+=Me)y&&--Gt>0);var Sr=Ne*(Nt=x(lt)),Br=x(n(Qe)0?S:-S)*(Zt+Qe*(Kt-lt)/2+Qe*Qe*(Kt-2*Zt+lt)/2)]}Qr.invert=function(Me,Ce){var Be=Ce/S,Ne=Be*90,Qe=f(18,n(Ne/5)),Je=c(0,l(Qe));do{var lt=Ur[Je][1],Gt=Ur[Je+1][1],Zt=Ur[f(19,Je+2)][1],Nt=Zt-lt,Kt=Zt-2*Gt+lt,ur=2*(n(Be)-Gt)/Nt,Sr=Kt/Nt,Br=ur*(1-Sr*ur*(1-2*Sr*ur));if(Br>=0||Je===1){Ne=(Ce>=0?5:-5)*(Br+Qe);var ln=50,wn;do Qe=f(18,n(Ne)/5),Je=l(Qe),Br=Qe-Je,lt=Ur[Je][1],Gt=Ur[Je+1][1],Zt=Ur[f(19,Je+2)][1],Ne-=(wn=(Ce>=0?S:-S)*(Gt+Br*(Zt-lt)/2+Br*Br*(Zt-2*Gt+lt)/2)-Ce)*F;while(n(wn)>C&&--ln>0);break}}while(--Je>=0);var In=Ur[Je][0],gi=Ur[Je+1][0],Bi=Ur[f(19,Je+2)][0];return[Me/(gi+Br*(Bi-In)/2+Br*Br*(Bi-2*gi+In)/2),Ne*E]};function cn(){return t.geoProjection(Qr).scale(152.63)}function yn(Me){function Ce(Be,Ne){var Qe=o(Ne),Je=(Me-1)/(Me-Qe*o(Be));return[Je*Qe*_(Be),Je*_(Ne)]}return Ce.invert=function(Be,Ne){var Qe=Be*Be+Ne*Ne,Je=O(Qe),lt=(Me-O(1-Qe*(Me+1)/(Me-1)))/((Me-1)/Je+Je/(Me-1));return[i(Be*lt,Je*O(1-lt*lt)),Je?R(Ne*lt/Je):0]},Ce}function Fn(Me,Ce){var Be=yn(Me);if(!Ce)return Be;var Ne=o(Ce),Qe=_(Ce);function Je(lt,Gt){var Zt=Be(lt,Gt),Nt=Zt[1],Kt=Nt*Qe/(Me-1)+Ne;return[Zt[0]*Ne/Kt,Nt/Kt]}return Je.invert=function(lt,Gt){var Zt=(Me-1)/(Me-1-Gt*Qe);return Be.invert(Zt*lt,Zt*Gt*Ne)},Je}function en(){var Me=2,Ce=0,Be=t.geoProjectionMutator(Fn),Ne=Be(Me,Ce);return Ne.distance=function(Qe){return arguments.length?Be(Me=+Qe,Ce):Me},Ne.tilt=function(Qe){return arguments.length?Be(Me,Ce=Qe*E):Ce*F},Ne.scale(432.147).clipAngle(B(1/Me)*F-1e-6)}var vn=1e-4,mn=1e4,Pn=-180,On=Pn+vn,ki=180,Ci=ki-vn,qi=-90,pi=qi+vn,Un=90,Gn=Un-vn;function Zi(Me){return Me.length>0}function na(Me){return Math.floor(Me*mn)/mn}function Ha(Me){return Me===qi||Me===Un?[0,Me]:[Pn,na(Me)]}function Qa(Me){var Ce=Me[0],Be=Me[1],Ne=!1;return Ce<=On?(Ce=Pn,Ne=!0):Ce>=Ci&&(Ce=ki,Ne=!0),Be<=pi?(Be=qi,Ne=!0):Be>=Gn&&(Be=Un,Ne=!0),Ne?[Ce,Be]:Me}function Ya(Me){return Me.map(Qa)}function ho(Me,Ce,Be){for(var Ne=0,Qe=Me.length;Ne=Ci||Kt<=pi||Kt>=Gn){Je[lt]=Qa(Zt);for(var ur=lt+1;urOn&&Brpi&&ln=Gt)break;Be.push({index:-1,polygon:Ce,ring:Je=Je.slice(ur-1)}),Je[0]=Ha(Je[0][1]),lt=-1,Gt=Je.length}}}}function Pa(Me){var Ce,Be=Me.length,Ne={},Qe={},Je,lt,Gt,Zt,Nt;for(Ce=0;Ce0?k-Gt:Gt)*F],Nt=t.geoProjection(Me(lt)).rotate(Zt),Kt=t.geoRotation(Zt),ur=Nt.center;return delete Nt.rotate,Nt.center=function(Sr){return arguments.length?ur(Kt(Sr)):Kt.invert(ur())},Nt.clipAngle(90)}function Qs(Me){var Ce=o(Me);function Be(Ne,Qe){var Je=t.geoGnomonicRaw(Ne,Qe);return Je[0]*=Ce,Je}return Be.invert=function(Ne,Qe){return t.geoGnomonicRaw.invert(Ne/Ce,Qe)},Be}function zl(){return cu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function cu(Me,Ce){return Go(Qs,Me,Ce)}function Zu(Me){if(!(Me*=2))return t.geoAzimuthalEquidistantRaw;var Ce=-Me/2,Be=-Ce,Ne=Me*Me,Qe=x(Be),Je=.5/_(Be);function lt(Gt,Zt){var Nt=B(o(Zt)*o(Gt-Ce)),Kt=B(o(Zt)*o(Gt-Be)),ur=Zt<0?-1:1;return Nt*=Nt,Kt*=Kt,[(Nt-Kt)/(2*Me),ur*O(4*Ne*Kt-(Ne-Nt+Kt)*(Ne-Nt+Kt))/(2*Me)]}return lt.invert=function(Gt,Zt){var Nt=Zt*Zt,Kt=o(O(Nt+(Sr=Gt+Ce)*Sr)),ur=o(O(Nt+(Sr=Gt+Be)*Sr)),Sr,Br;return[i(Br=Kt-ur,Sr=(Kt+ur)*Qe),(Zt<0?-1:1)*B(O(Sr*Sr+Br*Br)*Je)]},lt}function mc(){return Yl([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Yl(Me,Ce){return Go(Zu,Me,Ce)}function lf(Me,Ce){if(n(Ce)y&&--Gt>0);return[p(Me)*(O(Qe*Qe+4)+Qe)*k/4,S*lt]};function Ju(){return t.geoProjection(fu).scale(127.16)}function Qu(Me,Ce,Be,Ne,Qe){function Je(lt,Gt){var Zt=Be*_(Ne*Gt),Nt=O(1-Zt*Zt),Kt=O(2/(1+Nt*o(lt*=Qe)));return[Me*Nt*Kt*_(lt),Ce*Zt*Kt]}return Je.invert=function(lt,Gt){var Zt=lt/Me,Nt=Gt/Ce,Kt=O(Zt*Zt+Nt*Nt),ur=2*R(Kt/2);return[i(lt*x(ur),Me*Kt)/Qe,Kt&&R(Gt*_(ur)/(Ce*Be*Kt))/Ne]},Je}function Wd(Me,Ce,Be,Ne){var Qe=k/3;Me=c(Me,y),Ce=c(Ce,y),Me=f(Me,S),Ce=f(Ce,k-y),Be=c(Be,0),Be=f(Be,100-y),Ne=c(Ne,y);var Je=Be/100+1,lt=Ne/100,Gt=B(Je*o(Qe))/Qe,Zt=_(Me)/_(Gt*S),Nt=Ce/k,Kt=O(lt*_(Me/2)/_(Ce/2)),ur=Kt/O(Nt*Zt*Gt),Sr=1/(Kt*O(Nt*Zt*Gt));return Qu(ur,Sr,Zt,Gt,Nt)}function x0(){var Me=65*E,Ce=60*E,Be=20,Ne=200,Qe=t.geoProjectionMutator(Wd),Je=Qe(Me,Ce,Be,Ne);return Je.poleline=function(lt){return arguments.length?Qe(Me=+lt*E,Ce,Be,Ne):Me*F},Je.parallels=function(lt){return arguments.length?Qe(Me,Ce=+lt*E,Be,Ne):Ce*F},Je.inflation=function(lt){return arguments.length?Qe(Me,Ce,Be=+lt,Ne):Be},Je.ratio=function(lt){return arguments.length?Qe(Me,Ce,Be,Ne=+lt):Ne},Je.scale(163.775)}function Bf(){return x0().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Al=4*k+3*O(3),Xl=2*O(2*k*O(3)/Al),cf=qe(Xl*O(3)/k,Xl,Al/6);function jh(){return t.geoProjection(cf).scale(176.84)}function Wh(Me,Ce){return[Me*O(1-3*Ce*Ce/(k*k)),Ce]}Wh.invert=function(Me,Ce){return[Me/O(1-3*Ce*Ce/(k*k)),Ce]};function Yh(){return t.geoProjection(Wh).scale(152.63)}function hu(Me,Ce){var Be=o(Ce),Ne=o(Me)*Be,Qe=1-Ne,Je=o(Me=i(_(Me)*Be,-_(Ce))),lt=_(Me);return Be=O(1-Ne*Ne),[lt*Be-Je*Qe,-Je*Be-lt*Qe]}hu.invert=function(Me,Ce){var Be=(Me*Me+Ce*Ce)/-2,Ne=O(-Be*(2+Be)),Qe=Ce*Be+Me*Ne,Je=Me*Be-Ce*Ne,lt=O(Je*Je+Qe*Qe);return[i(Ne*Qe,lt*(1+Be)),lt?-R(Ne*Je/lt):0]};function Mu(){return t.geoProjection(hu).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function _i(Me,Ce){var Be=me(Me,Ce);return[(Be[0]+Me/S)/2,(Be[1]+Ce)/2]}_i.invert=function(Me,Ce){var Be=Me,Ne=Ce,Qe=25;do{var Je=o(Ne),lt=_(Ne),Gt=_(2*Ne),Zt=lt*lt,Nt=Je*Je,Kt=_(Be),ur=o(Be/2),Sr=_(Be/2),Br=Sr*Sr,ln=1-Nt*ur*ur,wn=ln?B(Je*ur)*O(In=1/ln):In=0,In,gi=.5*(2*wn*Je*Sr+Be/S)-Me,Bi=.5*(wn*lt+Ne)-Ce,mi=.5*In*(Nt*Br+wn*Je*ur*Zt)+.5/S,ia=In*(Kt*Gt/4-wn*lt*Sr),ua=.125*In*(Gt*Sr-wn*lt*Nt*Kt),lo=.5*In*(Zt*ur+wn*Br*Je)+.5,Bo=ia*ua-lo*mi,Ua=(Bi*ia-gi*lo)/Bo,ls=(gi*ua-Bi*mi)/Bo;Be-=Ua,Ne-=ls}while((n(Ua)>y||n(ls)>y)&&--Qe>0);return[Be,Ne]};function Su(){return t.geoProjection(_i).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=ce,e.geoAiryRaw=ee,e.geoAitoff=ye,e.geoAitoffRaw=me,e.geoArmadillo=J,e.geoArmadilloRaw=ue,e.geoAugust=ne,e.geoAugustRaw=_e,e.geoBaker=le,e.geoBakerRaw=ie,e.geoBerghaus=be,e.geoBerghausRaw=xe,e.geoBertin1953=ut,e.geoBertin1953Raw=ze,e.geoBoggs=$e,e.geoBoggsRaw=Ve,e.geoBonne=mt,e.geoBonneRaw=We,e.geoBottomley=Yt,e.geoBottomleyRaw=bt,e.geoBromley=mr,e.geoBromleyRaw=jt,e.geoChamberlin=Tt,e.geoChamberlinRaw=cr,e.geoChamberlinAfrica=wt,e.geoCollignon=Lt,e.geoCollignonRaw=Mt,e.geoCraig=kt,e.geoCraigRaw=ft,e.geoCraster=Kr,e.geoCrasterRaw=pr,e.geoCylindricalEqualArea=dn,e.geoCylindricalEqualAreaRaw=Nr,e.geoCylindricalStereographic=Fr,e.geoCylindricalStereographicRaw=xr,e.geoEckert1=Cn,e.geoEckert1Raw=Zr,e.geoEckert2=At,e.geoEckert2Raw=Dt,e.geoEckert3=Qt,e.geoEckert3Raw=Vt,e.geoEckert4=_r,e.geoEckert4Raw=Ut,e.geoEckert5=Jr,e.geoEckert5Raw=rn,e.geoEckert6=ri,e.geoEckert6Raw=qn,e.geoEisenlohr=Vi,e.geoEisenlohrRaw=Ii,e.geoFahey=va,e.geoFaheyRaw=ha,e.geoFoucaut=oa,e.geoFoucautRaw=Xi,e.geoFoucautSinusoidal=Ga,e.geoFoucautSinusoidalRaw=Ma,e.geoGilbert=sl,e.geoGingery=bl,e.geoGingeryRaw=ko,e.geoGinzburg4=su,e.geoGinzburg4Raw=Zs,e.geoGinzburg5=Af,e.geoGinzburg5Raw=fc,e.geoGinzburg6=Jt,e.geoGinzburg6Raw=ct,e.geoGinzburg8=wr,e.geoGinzburg8Raw=er,e.geoGinzburg9=Dr,e.geoGinzburg9Raw=nn,e.geoGringorten=Qn,e.geoGringortenRaw=Yr,e.geoGuyou=$a,e.geoGuyouRaw=Za,e.geoHammer=pt,e.geoHammerRaw=De,e.geoHammerRetroazimuthal=Ni,e.geoHammerRetroazimuthalRaw=Ka,e.geoHealpix=As,e.geoHealpixRaw=so,e.geoHill=xu,e.geoHillRaw=Ms,e.geoHomolosine=Gu,e.geoHomolosineRaw=_u,e.geoHufnagel=ps,e.geoHufnagelRaw=Ja,e.geoHyperelliptical=Ca,e.geoHyperellipticalRaw=Ps,e.geoInterrupt=lu,e.geoInterruptedBoggs=Bd,e.geoInterruptedHomolosine=Sf,e.geoInterruptedMollweide=Uo,e.geoInterruptedMollweideHemispheres=Ks,e.geoInterruptedSinuMollweide=ju,e.geoInterruptedSinusoidal=bu,e.geoKavrayskiy7=ah,e.geoKavrayskiy7Raw=kf,e.geoLagrange=Qc,e.geoLagrangeRaw=Od,e.geoLarrivee=hc,e.geoLarriveeRaw=oh,e.geoLaskowski=Zo,e.geoLaskowskiRaw=Fl,e.geoLittrow=is,e.geoLittrowRaw=Ro,e.geoLoximuthal=dc,e.geoLoximuthalRaw=Dl,e.geoMiller=Cc,e.geoMillerRaw=ef,e.geoModifiedStereographic=vc,e.geoModifiedStereographicRaw=sh,e.geoModifiedStereographicAlaska=zh,e.geoModifiedStereographicGs48=tf,e.geoModifiedStereographicGs50=Vd,e.geoModifiedStereographicMiller=rf,e.geoModifiedStereographicLee=qh,e.geoMollweide=Le,e.geoMollweideRaw=we,e.geoMtFlatPolarParabolic=vd,e.geoMtFlatPolarParabolicRaw=Wu,e.geoMtFlatPolarQuartic=lh,e.geoMtFlatPolarQuarticRaw=pd,e.geoMtFlatPolarSinusoidal=uh,e.geoMtFlatPolarSinusoidalRaw=nf,e.geoNaturalEarth2=gd,e.geoNaturalEarth2Raw=af,e.geoNellHammer=ch,e.geoNellHammerRaw=Rl,e.geoInterruptedQuarticAuthalic=md,e.geoNicolosi=Lf,e.geoNicolosiRaw=yd,e.geoPatterson=dh,e.geoPattersonRaw=_d,e.geoPolyconic=Hd,e.geoPolyconicRaw=Pf,e.geoPolyhedral=Yu,e.geoPolyhedralButterfly=gc,e.geoPolyhedralCollignon=bd,e.geoPolyhedralWaterman=Gh,e.geoProject=wd,e.geoGringortenQuincuncial=Ze,e.geoPeirceQuincuncial=yt,e.geoPierceQuincuncial=yt,e.geoQuantize=Wt,e.geoQuincuncial=qf,e.geoRectangularPolyconic=hr,e.geoRectangularPolyconicRaw=zt,e.geoRobinson=cn,e.geoRobinsonRaw=Qr,e.geoSatellite=en,e.geoSatelliteRaw=Fn,e.geoSinuMollweide=Kc,e.geoSinuMollweideRaw=$s,e.geoSinusoidal=it,e.geoSinusoidalRaw=rt,e.geoStitch=Io,e.geoTimes=ro,e.geoTimesRaw=oi,e.geoTwoPointAzimuthal=cu,e.geoTwoPointAzimuthalRaw=Qs,e.geoTwoPointAzimuthalUsa=zl,e.geoTwoPointEquidistant=Yl,e.geoTwoPointEquidistantRaw=Zu,e.geoTwoPointEquidistantUsa=mc,e.geoVanDerGrinten=$u,e.geoVanDerGrintenRaw=lf,e.geoVanDerGrinten2=gh,e.geoVanDerGrinten2Raw=ph,e.geoVanDerGrinten3=Ku,e.geoVanDerGrinten3Raw=uf,e.geoVanDerGrinten4=Ju,e.geoVanDerGrinten4Raw=fu,e.geoWagner=x0,e.geoWagner7=Bf,e.geoWagnerRaw=Wd,e.geoWagner4=jh,e.geoWagner4Raw=cf,e.geoWagner6=Yh,e.geoWagner6Raw=Wh,e.geoWiechel=Mu,e.geoWiechelRaw=hu,e.geoWinkel3=Su,e.geoWinkel3Raw=_i,Object.defineProperty(e,"__esModule",{value:!0})}))});var hze=fe((c5r,fze)=>{"use strict";var iu=xi(),BX=Xt(),PHt=bi(),s5=Math.PI/180,o_=180/Math.PI,NX={cursor:"pointer"},UX={cursor:"auto"};function FHt(e,t){var r=e.projection,n;return t._isScoped?n=DHt:t._isClipped?n=IHt:n=RHt,n(e,r)}fze.exports=FHt;function VX(e,t){return iu.behavior.zoom().translate(t.translate()).scaleExtent(t.scaleExtent()).scale(t.scale())}function GX(e,t,r){var n=e.id,a=e.graphDiv,i=a.layout,o=i[n],s=a._fullLayout,l=s[n],u={},c={};function f(v,g){u[n+"."+v]=BX.nestedProperty(o,v).get(),PHt.call("_storeDirectGUIEdit",i,s._preGUI,u);var p=BX.nestedProperty(l,v);p.get()!==g&&(p.set(g),BX.nestedProperty(o,v).set(g),c[n+"."+v]=g)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),a.emit("plotly_relayout",c)}function DHt(e,t){var r=VX(e,t);function n(){iu.select(this).style(NX)}function a(){t.scale(iu.event.scale).translate(iu.event.translate),e.render(!0);var s=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":s[0],"geo.center.lat":s[1]})}function i(s){var l=t.invert(e.midPt);s("center.lon",l[0]),s("center.lat",l[1])}function o(){iu.select(this).style(UX),GX(e,t,i)}return r.on("zoomstart",n).on("zoom",a).on("zoomend",o),r}function RHt(e,t){var r=VX(e,t),n=2,a,i,o,s,l,u,c,f,v;function g(k){return t.invert(k)}function p(k){var S=g(k);if(!S)return!0;var L=t(S);return Math.abs(L[0]-k[0])>n||Math.abs(L[1]-k[1])>n}function _(){iu.select(this).style(NX);let{x:k,y:S,width:L,height:w}=this.getBBox();a=iu.event.sourceEvent?iu.mouse(this):[k+L/2,S+w/2],i=t.rotate(),o=t.translate(),s=i,l=g(a)}function x(){let{x:k,y:S,width:L,height:w}=this.getBBox();if(u=iu.event.sourceEvent?iu.mouse(this):[k+L/2,S+w/2],p(a)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(iu.event.scale),t.translate([o[0],iu.event.translate[1]]),l?g(u)&&(f=g(u),c=[s[0]+(f[0]-l[0]),i[1],i[2]],t.rotate(c),s=c):(a=u,l=g(a)),v=!0,e.render(!0);var T=t.rotate(),A=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":A[0],"geo.center.lat":A[1],"geo.projection.rotation.lon":-T[0]})}function y(){iu.select(this).style(UX),v&&GX(e,t,C)}function C(k){var S=t.rotate(),L=t.invert(e.midPt);k("projection.rotation.lon",-S[0]),k("center.lon",L[0]),k("center.lat",L[1])}return r.on("zoomstart",_).on("zoom",x).on("zoomend",y),r}function IHt(e,t){var r={r:t.rotate(),k:t.scale()},n=VX(e,t),a=GHt(n,"zoomstart","zoom","zoomend"),i=0,o=n.on,s;n.on("zoomstart",function(){iu.select(this).style(NX);let{x:v,y:g,width:p,height:_}=this.getBBox(),x=iu.event.sourceEvent?iu.mouse(this):[v+p/2,g+_/2],y=t.rotate(),C=y,k=t.translate(),S=zHt(y);s=jP(t,x),o.call(n,"zoom",function(){let{x:L,y:w,width:T,height:A}=this.getBBox(),m=iu.event.sourceEvent?iu.mouse(this):[L+T/2,w+A/2];if(t.scale(r.k=iu.event.scale),!s)x=m,s=jP(t,x);else if(jP(t,m)){t.rotate(y).translate(k);var F=jP(t,m),E=BHt(s,F),I=NHt(qHt(S,E)),R=r.r=OHt(I,s,C);(!isFinite(R[0])||!isFinite(R[1])||!isFinite(R[2]))&&(R=C),t.rotate(R),C=R}u(a.of(this,arguments))}),l(a.of(this,arguments))}).on("zoomend",function(){iu.select(this).style(UX),o.call(n,"zoom",null),c(a.of(this,arguments)),GX(e,t,f)}).on("zoom.redraw",function(){e.render(!0);var v=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-v[0],"geo.projection.rotation.lat":-v[1]})});function l(v){i++||v({type:"zoomstart"})}function u(v){v({type:"zoom"})}function c(v){--i||v({type:"zoomend"})}function f(v){var g=t.rotate();v("projection.rotation.lon",-g[0]),v("projection.rotation.lat",-g[1])}return iu.rebind(n,a,"on")}function jP(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&UHt(r)}function zHt(e){var t=.5*e[0]*s5,r=.5*e[1]*s5,n=.5*e[2]*s5,a=Math.sin(t),i=Math.cos(t),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[i*s*u+a*o*l,a*s*u-i*o*l,i*o*u+a*s*l,i*s*l-a*o*u]}function qHt(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=t[0],s=t[1],l=t[2],u=t[3];return[r*o-n*s-a*l-i*u,r*s+n*o+a*u-i*l,r*l-n*u+a*o+i*s,r*u+n*l-a*s+i*o]}function BHt(e,t){if(!(!e||!t)){var r=VHt(e,t),n=Math.sqrt(cze(r,r)),a=.5*Math.acos(Math.max(-1,Math.min(1,cze(e,t)))),i=Math.sin(a)/n;return n&&[Math.cos(a),r[2]*i,-r[1]*i,r[0]*i]}}function OHt(e,t,r){var n=OX(t,2,e[0]);n=OX(n,1,e[1]),n=OX(n,0,e[2]-r[2]);var a=t[0],i=t[1],o=t[2],s=n[0],l=n[1],u=n[2],c=Math.atan2(i,a)*o_,f=Math.sqrt(a*a+i*i),v,g;Math.abs(l)>f?(g=(l>0?90:-90)-c,v=0):(g=Math.asin(l/f)*o_-c,v=Math.sqrt(f*f-l*l));var p=180-g-2*c,_=(Math.atan2(u,s)-Math.atan2(o,v))*o_,x=(Math.atan2(u,s)-Math.atan2(o,-v))*o_,y=lze(r[0],r[1],g,_),C=lze(r[0],r[1],p,x);return y<=C?[g,_,r[2]]:[p,x,r[2]]}function lze(e,t,r,n){var a=uze(r-e),i=uze(n-t);return Math.sqrt(a*a+i*i)}function uze(e){return(e%360+540)%360-180}function OX(e,t,r){var n=r*s5,a=e.slice(),i=t===0?1:0,o=t===2?1:2,s=Math.cos(n),l=Math.sin(n);return a[i]=e[i]*s-e[o]*l,a[o]=e[o]*s+e[i]*l,a}function NHt(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*o_,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*o_,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*o_]}function UHt(e){var t=e[0]*s5,r=e[1]*s5,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function cze(e,t){for(var r=0,n=0,a=e.length;n{"use strict";var M1=xi(),WX=qP(),HHt=WX.geoPath,jHt=WX.geoDistance,WHt=sze(),YHt=bi(),pM=Xt(),XHt=pM.strTranslate,WP=ni(),vM=Ji(),dze=kl(),ZHt=Hs(),jX=Yi(),{concatExtremes:$Ht,getAutoRange:vze,makePadFn:pze}=rp(),HX=ed(),KHt=Ac().prepSelect,JHt=Ac().clearOutline,QHt=Ac().selectOnClick,ejt=hze(),Id=uM(),YX=Cg(),{unwrapLonRange:tjt}=YX,mze=EP(),rjt=yX().feature;function yze(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var Lp=yze.prototype;xze.exports=function(t){return new yze(t)};Lp.plot=function(e,t,r,n){var a=this;if(n)return a.update(e,t,!0);a._geoCalcData=e,a._fullLayout=t;var i=t[this.id],o=[],s=!1;for(var l in Id.layerNameToAdjective)if(l!=="frame"&&i["show"+l]){s=!0;break}for(var u=!1,c=0;c0&&o._module.calcGeoJSON(i,t)}if(!r){var s=this.updateProjection(e,t);if(s)return;(!this.viewInitial||this.scope!==n.scope)&&this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),ZHt.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var l=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=l.selectAll(".point"),this.dataPoints.text=l.selectAll("text"),this.dataPaths.line=l.selectAll(".js-line");var u=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=u.selectAll("path"),this._render()};Lp.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],a=t._size,i=n.domain,o=n.projection,s=n.lonaxis,l=n.lataxis,u=s._ax,c=l._ax,f=this.projection=njt(n),v=[[a.l+a.w*i.x[0],a.t+a.h*(1-i.y[1])],[a.l+a.w*i.x[1],a.t+a.h*(1-i.y[0])]],g=n.center||{},p=o.rotation||{},_=s.range||[],x=l.range||[];if(n.fitbounds){u._length=v[1][0]-v[0][0],c._length=v[1][1]-v[0][1],u.range=vze(r,u),c.range=vze(r,c);let O=[];for(let ue of e){let J=ue[0].trace;J.visible===!0&&J._module.fitCoords&&O.push(J._module.fitCoords(ue,n))}let U=$Ht(r,u),j=U.min.reduce((ue,{val:J})=>Math.min(ue,J),1/0),V=U.max.reduce((ue,{val:J})=>Math.max(ue,J),-1/0)-j,K=YX.boundsOfCoords(O.flat()),[ee,,ce]=K||[],me=ce-ee;if(!!K&&(V>360||V<360&&meMath.max(le,ue(xe)),0),ne=U.max.reduce((le,xe)=>Math.max(le,J(xe)),0),ae=u._length-_e-ne,pe=ae>u._length/10?me*u._length/ae:me,ie=(ee+ce)/2;u.range=[ie-pe/2,ie+pe/2]}var y=(u.range[0]+u.range[1])/2,C=(c.range[0]+c.range[1])/2;if(n._isScoped)g={lon:y,lat:C};else if(n._isClipped){g={lon:y,lat:C},p={lon:y,lat:C,roll:p.roll};var k=o.type,S=Id.lonaxisSpan[k]/2||180,L=Id.lataxisSpan[k]/2||90;_=[y-S,y+S],x=[C-L,C+L]}else g={lon:y,lat:C},p={lon:y,lat:p.lat,roll:p.roll}}f.center([g.lon-p.lon,g.lat-p.lat]).rotate([-p.lon,-p.lat,p.roll]).parallels(o.parallels);var w=gze(_,x);f.fitExtent(v,w);var T=this.bounds=f.getBounds(w),A=this.fitScale=f.scale(),m=f.translate();if(f.scaleExtent=()=>{var j;let{minscale:O}=o,U=(j=o.maxscale)!=null?j:1/0;return[A*Math.min(O,U),A*Math.max(O,U)]},n.fitbounds){var F=f.getBounds(gze(u.range,c.range)),E=Math.min((T[1][0]-T[0][0])/(F[1][0]-F[0][0]),(T[1][1]-T[0][1])/(F[1][1]-F[0][1]));isFinite(E)?f.scale(E*A):pM.warn("Something went wrong during"+this.id+"fitbounds computations.")}else f.scale(o.scale*A);var I=this.midPt=[(T[0][0]+T[1][0])/2,(T[0][1]+T[1][1])/2];if(f.translate([m[0]+(I[0]-m[0]),m[1]+(I[1]-m[1])]).clipExtent(T),n._isAlbersUsa){var R=f([g.lon,g.lat]);if(R){var B=f.translate();f.translate([B[0]-(R[0]-B[0]),B[1]-(R[1]-B[1])])}}};Lp.updateBaseLayers=function(e,t){var r=this,n=r.topojson,a=r.layers,i=r.basePaths;function o(v){return v==="lonaxis"||v==="lataxis"}function s(v){return!!Id.lineLayers[v]}function l(v){return!!Id.fillLayers[v]}var u=this.hasChoropleth?Id.layersForChoropleth:Id.layers,c=u.filter(function(v){return s(v)||l(v)?t["show"+v]:o(v)?t[v].showgrid:!0}),f=r.framework.selectAll(".layer").data(c,String);f.exit().each(function(v){delete a[v],delete i[v],M1.select(this).remove()}),f.enter().append("g").attr("class",function(v){return"layer "+v}).each(function(v){var g=a[v]=M1.select(this);v==="bg"?r.bgRect=g.append("rect").style("pointer-events","all"):o(v)?i[v]=g.append("path").style("fill","none"):v==="backplot"?g.append("g").classed("choroplethlayer",!0):v==="frontplot"?g.append("g").classed("scatterlayer",!0):s(v)?i[v]=g.append("path").style("fill","none").style("stroke-miterlimit",2):l(v)&&(i[v]=g.append("path").style("stroke","none"))}),f.order(),f.each(function(v){var g=i[v],p=Id.layerNameToAdjective[v];v==="frame"?g.datum(Id.sphereSVG):s(v)||l(v)?g.datum(rjt(n,n.objects[v])):o(v)&&g.datum(ijt(v,t,e)).call(WP.stroke,t[v].gridcolor).call(vM.dashLine,t[v].griddash,t[v].gridwidth),s(v)?g.call(WP.stroke,t[p+"color"]).call(vM.dashLine,"",t[p+"width"]):l(v)&&g.call(WP.fill,t[p+"color"])})};Lp.updateDims=function(e,t){var r=this.bounds,n=(t.framewidth||0)/2,a=r[0][0]-n,i=r[0][1]-n,o=r[1][0]-a+n,s=r[1][1]-i+n;vM.setRect(this.clipRect,a,i,o,s),this.bgRect.call(vM.setRect,a,i,o,s).call(WP.fill,t.bgcolor),this.xaxis._offset=a,this.xaxis._length=o,this.yaxis._offset=i,this.yaxis._length=s};Lp.updateFx=function(e,t){var r=this,n=r.graphDiv,a=r.bgRect,i=e.dragmode,o=e.clickmode;if(r.isStatic)return;function s(){var f=r.viewInitial,v={};for(var g in f)v[r.id+"."+g]=f[g];YHt.call("_guiRelayout",n,v),n.emit("plotly_doubleclick",null)}function l(f){return r.projection.invert([f[0]+r.xaxis._offset,f[1]+r.yaxis._offset])}var u=function(f,v){if(v.isRect){var g=f.range={};g[r.id]=[l([v.xmin,v.ymin]),l([v.xmax,v.ymax])]}else{var p=f.lassoPoints={};p[r.id]=v.map(l)}},c={element:r.bgRect.node(),gd:n,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(f){f===2&&JHt(n)}};if(i==="pan"){a.node().onmousedown=null;let f=ejt(r,t);if(a.call(f),!M1.event){let v=r.projection.scale(),[g,p]=r.projection.scaleExtent();(vp)&&f.event(a)}a.on("dblclick.zoom",s),n._context._scrollZoom.geo||a.on("wheel.zoom",null)}else(i==="select"||i==="lasso")&&(a.on(".zoom",null),c.prepFn=function(f,v,g){KHt(f,v,g,c,i)},HX.init(c));a.on("mousemove",function(){var f=r.projection.invert(pM.getPositionFromD3Event());if(!f)return HX.unhover(n,M1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},dze.hover(n,M1.event,r.id)}),a.on("mouseout",function(){n._dragging||HX.unhover(n,M1.event)}),a.on("click",function(){i!=="select"&&i!=="lasso"&&(o.indexOf("select")>-1&&QHt(M1.event,n,[r.xaxis],[r.yaxis],r.id,c),o.indexOf("event")>-1&&dze.click(n,M1.event))})};Lp.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,n="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",n),e.clipRect=e.clipDef.append("rect"),e.framework=M1.select(e.container).append("g").attr("class","geo "+e.id).call(vM.setClipUrl,n,t),e.project=function(a){var i=e.projection(a);return i?[i[0]-e.xaxis._offset,i[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(a){return e.project(a)[0]}},e.yaxis={_id:"y",c2p:function(a){return e.project(a)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},jX.setConvert(e.mockAxis,r)};Lp.saveViewInitial=function(e){var t=e.center||{},r=e.projection,n=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":r.scale};var a;e._isScoped?a={"center.lon":t.lon,"center.lat":t.lat}:e._isClipped?a={"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat,"center.lon":t.lon,"center.lat":t.lat}:a={"center.lon":t.lon,"center.lat":t.lat,"projection.rotation.lon":n.lon},pM.extendFlat(this.viewInitial,a)};Lp.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};Lp._render=function(){var e=this.projection,t=e.getPath(),r;function n(i){var o=e(i.lonlat);return o?XHt(o[0],o[1]):null}function a(i){return e.isLonLatOverEdges(i.lonlat)?"none":null}for(r in this.basePaths)this.basePaths[r].attr("d",t);for(r in this.dataPaths)this.dataPaths[r].attr("d",function(i){return t(i.geojson)});for(r in this.dataPoints)this.dataPoints[r].attr("display",a).attr("transform",n)};function njt(e){var t=e.projection,r=t.type,n=Id.projNames[r];n="geo"+pM.titleCase(n);for(var a=WX[n]||WHt[n],i=a(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?Id.lonaxisSpan[r]/2:null,s=["center","rotate","parallels","clipExtent"],l=function(f){return f?i:[]},u=0;up}else return!1},i.getPath=function(){return HHt().projection(i)},i.getBounds=function(f){return i.getPath().bounds(f)},i.precision(Id.precision),e._isSatellite&&i.tilt(t.tilt).distance(t.distance),o&&i.clipAngle(o-Id.clipPad),i}function ijt(e,t,r){var n=1e-6,a=2.5,i=t[e],o=Id.scopeDefaults[t.scope],s,l,u;e==="lonaxis"?(s=o.lonaxisRange,l=o.lataxisRange,u=function(C,k){return[C,k]}):e==="lataxis"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(C,k){return[k,C]});var c={type:"linear",range:[s[0],s[1]-n],tick0:i.tick0,dtick:i.dtick};jX.setConvert(c,r);var f=jX.calcTicks(c);!t.isScoped&&e==="lonaxis"&&f.pop();for(var v=f.length,g=new Array(v),p=0;p{"use strict";var u5=tc(),ajt=nl().attributes,ojt=Uc().dash,l5=uM(),sjt=rl().overrideAll,bze=(b2(),Gs(_2)).default,wze={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:u5.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:ojt},ljt=Tze.exports=sjt({domain:ajt({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:"locations",editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:bze(l5.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:bze(l5.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1},minscale:{valType:"number",min:0,dflt:0},maxscale:{valType:"number",min:0,dflt:null}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:u5.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:l5.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:l5.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:l5.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:l5.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:u5.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:u5.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:u5.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:u5.background},lonaxis:wze,lataxis:wze},"plot","from-root");ljt.uirevision={valType:"any",editType:"none"}});var Sze=fe((d5r,Mze)=>{"use strict";var YP=Xt(),ujt=bx(),cjt=jf().getSubplotData,{unwrapLonRange:fjt}=Cg(),gM=uM(),hjt=XX(),Aze=gM.axesNames;Mze.exports=function(t,r,n){ujt(t,r,n,{type:"geo",attributes:hjt,handleDefaults:djt,fullData:n,partition:"y"})};function djt(e,t,r,n){var a=cjt(n.fullData,"geo",n.id),i=a.map(function(K){return K.index}),o=r("resolution"),s=r("scope"),l=gM.scopeDefaults[s],u=r("projection.type",l.projType),c=t._isAlbersUsa=u==="albers usa";c&&(s=t.scope="usa");var f=t._isScoped=s!=="world",v=t._isSatellite=u==="satellite",g=t._isConic=u.indexOf("conic")!==-1||u==="albers",p=t._isClipped=!!gM.lonaxisSpan[u];if(e.visible===!1){var _=YP.extendDeep({},t._template);_.showcoastlines=!1,_.showcountries=!1,_.showframe=!1,_.showlakes=!1,_.showland=!1,_.showocean=!1,_.showrivers=!1,_.showsubunits=!1,_.lonaxis&&(_.lonaxis.showgrid=!1),_.lataxis&&(_.lataxis.showgrid=!1),t._template=_}for(var x=r("visible"),y,C=0;C_e[ne]!=null)||gM.fitboundsIncompatible.has(u)?t.fitbounds=!1:ue.forEach(({dst:_e,key:ne})=>_e&&(_e[ne]=null))}}});var ZX=fe((v5r,Cze)=>{"use strict";var vjt=jf().getSubplotCalcData,pjt=Xt().counterRegex,gjt=_ze(),S1="geo",Eze=pjt(S1),kze={};kze[S1]={valType:"subplotid",dflt:S1,editType:"calc"};function mjt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[S1],a=0;a{"use strict";Lze.exports={attributes:o5(),supplyDefaults:nIe(),colorbar:Zf(),formatLabels:oIe(),calc:mX(),calcGeoJSON:VP().calcGeoJSON,fitCoords:VP().fitCoords,plot:VP().plot,style:RX(),styleOnSelect:Ld().styleOnSelect,hoverPoints:JIe(),eventData:eze(),selectPoints:nze(),moduleType:"trace",name:"scattergeo",basePlotModule:ZX(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var Dze=fe((g5r,Fze)=>{"use strict";Fze.exports=Pze()});var mM=fe((m5r,zze)=>{"use strict";var{hovertemplateAttrs:_jt,templatefallbackAttrs:bjt}=Oo(),wy=o5(),wjt=_s(),Rze=Ho(),Tjt=tc().defaultLine,by=ta().extendFlat,Ize=wy.marker.line;zze.exports=by({locations:{valType:"data_array",editType:"calc"},locationmode:wy.locationmode,z:{valType:"data_array",editType:"calc"},geojson:by({},wy.geojson,{}),featureidkey:wy.featureidkey,text:by({},wy.text,{}),hovertext:by({},wy.hovertext,{}),marker:{line:{color:by({},Ize.color,{dflt:Tjt}),width:by({},Ize.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:wy.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:wy.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:by({},Rze.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:_jt(),hovertemplatefallback:bjt(),showlegend:by({},Rze.showlegend,{dflt:!1})},wjt("",{cLetter:"z",editTypeOverride:"calc"}))});var Bze=fe((y5r,qze)=>{"use strict";var XP=Xt(),Ajt=Vc(),Mjt=mM();qze.exports=function(t,r,n,a){function i(v,g){return XP.coerce(t,r,Mjt,v,g)}var o=i("locations"),s=i("z");if(!(o&&o.length&&XP.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var l=i("geojson"),u;(typeof l=="string"&&l!==""||XP.isPlainObject(l))&&(u="geojson-id");var c=i("locationmode",u);c==="geojson-id"&&i("featureidkey"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var f=i("marker.line.width");f&&i("marker.line.color"),i("marker.opacity"),Ajt(t,r,a,i,{prefix:"",cLetter:"z"}),XP.coerceSelectionMarkerOpacity(r,i)}});var $X=fe((x5r,Uze)=>{"use strict";var Oze=aa(),Sjt=Wa().BADNUM,Ejt=Mh(),kjt=o1(),Cjt=F0();function Nze(e){return e&&typeof e=="string"}Uze.exports=function(t,r){var n=r._length,a=new Array(n),i;r.geojson?i=function(c){return Nze(c)||Oze(c)}:i=Nze;for(var o=0;o{"use strict";var Ljt=xi(),Pjt=ni(),KX=Ji(),Fjt=js();function Djt(e,t){t&&Vze(e,t)}function Vze(e,t){var r=t[0].trace,n=t[0].node3,a=n.selectAll(".choroplethlocation"),i=r.marker||{},o=i.line||{},s=Fjt.makeColorScaleFuncFromTrace(r);a.each(function(l){Ljt.select(this).attr("fill",s(l.z)).call(Pjt.stroke,l.mlc||o.color).call(KX.dashLine,"",l.mlw||o.width||0).style("opacity",i.opacity)}),KX.selectedPointStyle(a,r)}function Rjt(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?KX.selectedPointStyle(r.selectAll(".choroplethlocation"),n):Vze(e,t)}Gze.exports={style:Djt,styleOnSelect:Rjt}});var $P=fe((b5r,Wze)=>{"use strict";var Ijt=xi(),Hze=Xt(),s_=Cg(),zjt=EP().getTopojsonFeatures,jze=rp().findExtremes,qjt=ZP().style;function Bjt(e,t,r){var n=t.layers.backplot.select(".choroplethlayer");Hze.makeTraceGroups(n,r,"trace choropleth").each(function(a){var i=Ijt.select(this),o=i.selectAll("path.choroplethlocation").data(Hze.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),qjt(e,a)})}function Ojt(e,t){var r=e[0].trace,n=t[r.geo],a=n._subplot,i=r.locationmode,o=r._length,s=i==="geojson-id"?s_.extractTraceFeature(e):zjt(r,a.topojson);let l=s_.fitGeojsonBbox(r,n);for(var u=[],c=[],f=0;f{"use strict";var Ujt=Yi(),Vjt=mM(),Gjt=Xt().fillText,{ANTIMERIDIAN_LON_SHIFT:Hjt}=Cg();Yze.exports=function(t,r,n){var a=t.cd,i=a[0].trace,o=t.subplot,s,l,u,c,f=[r,n];let v=[r+Hjt,n];for(l=0;l")}}});var QX=fe((T5r,Xze)=>{"use strict";Xze.exports=function(t,r,n,a,i){t.location=r.location,t.z=r.z;var o=a[i];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t.ct=o.ct,t}});var eZ=fe((A5r,Zze)=>{"use strict";Zze.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s,l,u,c,f;if(r===!1)for(s=0;s{"use strict";$ze.exports={attributes:mM(),supplyDefaults:Bze(),colorbar:j3(),calc:$X(),calcGeoJSON:$P().calcGeoJSON,fitCoords:$P().fitCoords,plot:$P().plot,style:ZP().style,styleOnSelect:ZP().styleOnSelect,hoverPoints:JX(),eventData:QX(),selectPoints:eZ(),moduleType:"trace",name:"choropleth",basePlotModule:ZX(),categories:["geo","noOpacity","showLegend"],meta:{}}});var Qze=fe((S5r,Jze)=>{"use strict";Jze.exports=Kze()});var KP=fe((E5r,tqe)=>{"use strict";var Wjt=bi(),V0=Xt(),Yjt=b3(),Xjt=Ji();function Zjt(e,t,r,n){var a=e.cd,i=a[0].t,o=a[0].trace,s=e.xa,l=e.ya,u=i.x,c=i.y,f=s.c2p(t),v=l.c2p(r),g=e.distance,p;if(i.tree){var _=s.p2c(f-g),x=s.p2c(f+g),y=l.p2c(v-g),C=l.p2c(v+g);n==="x"?p=i.tree.range(Math.min(_,x),Math.min(l._rl[0],l._rl[1]),Math.max(_,x),Math.max(l._rl[0],l._rl[1])):p=i.tree.range(Math.min(_,x),Math.min(y,C),Math.max(_,x),Math.max(y,C))}else p=i.ids;var k,S,L,w,T,A,m,F,E,I=g;if(n==="x"){var R=!!o.xperiodalignment,B=!!o.yperiodalignment;for(T=0;T=Math.min(O,U)&&f<=Math.max(O,U)?0:1/0}if(A=Math.min(j,q)&&v<=Math.max(j,q)?0:1/0}E=Math.sqrt(A*A+m*m),S=p[T]}}}else for(T=p.length-1;T>-1;T--)k=p[T],L=u[k],w=c[k],A=s.c2p(L)-f,m=l.c2p(w)-v,F=Math.sqrt(A*A+m*m),F{"use strict";var rqe=20;nqe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:rqe,SYMBOL_STROKE:rqe/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}});var yM=fe((C5r,sqe)=>{"use strict";var $jt=Ho(),Kjt=Ds(),Jjt=n1(),Ll=Ol(),iqe=pl().axisHoverFormat,aqe=_s(),Qjt=(b2(),Gs(_2)).default,tZ=ta().extendFlat,eWt=rl().overrideAll,tWt=Ty().DASHES,oqe=Ll.line,Lg=Ll.marker,rWt=Lg.line,Ay=sqe.exports=eWt({x:Ll.x,x0:Ll.x0,dx:Ll.dx,y:Ll.y,y0:Ll.y0,dy:Ll.dy,xperiod:Ll.xperiod,yperiod:Ll.yperiod,xperiod0:Ll.xperiod0,yperiod0:Ll.yperiod0,xperiodalignment:Ll.xperiodalignment,yperiodalignment:Ll.yperiodalignment,xhoverformat:iqe("x"),yhoverformat:iqe("y"),text:Ll.text,hovertext:Ll.hovertext,textposition:Ll.textposition,textfont:Kjt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"]}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:oqe.color,width:oqe.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:Qjt(tWt),dflt:"solid"}},marker:tZ({},aqe("marker"),{symbol:Lg.symbol,angle:Lg.angle,size:Lg.size,sizeref:Lg.sizeref,sizemin:Lg.sizemin,sizemode:Lg.sizemode,opacity:Lg.opacity,colorbar:Lg.colorbar,line:tZ({},aqe("marker.line"),{width:rWt.width})}),connectgaps:Ll.connectgaps,fill:tZ({},Ll.fill,{dflt:"none"}),fillcolor:Jjt(),selected:{marker:Ll.selected.marker,textfont:Ll.selected.textfont},unselected:{marker:Ll.unselected.marker,textfont:Ll.unselected.textfont},opacity:$jt.opacity},"calc","nested");Ay.x.editType=Ay.y.editType=Ay.x0.editType=Ay.y0.editType="calc+clearAxisTypes";Ay.hovertemplate=Ll.hovertemplate;Ay.hovertemplatefallback=Ll.hovertemplatefallback;Ay.texttemplate=Ll.texttemplate;Ay.texttemplatefallback=Ll.texttemplatefallback});var JP=fe(rZ=>{"use strict";var lqe=Ty();rZ.isOpenSymbol=function(e){return typeof e=="string"?lqe.OPEN_RE.test(e):e%200>100};rZ.isDotSymbol=function(e){return typeof e=="string"?lqe.DOT_RE.test(e):e>200}});var fqe=fe((P5r,cqe)=>{"use strict";var uqe=Xt(),nWt=bi(),iWt=JP(),aWt=yM(),oWt=r1(),QP=Is(),sWt=rx(),lWt=sp(),uWt=vv(),cWt=lp(),fWt=a1(),hWt=up();cqe.exports=function(t,r,n,a){function i(g,p){return uqe.coerce(t,r,aWt,g,p)}var o=t.marker?iWt.isOpenSymbol(t.marker.symbol):!1,s=QP.isBubble(t),l=sWt(t,r,a,i);if(!l){r.visible=!1;return}lWt(t,r,a,i),i("xhoverformat"),i("yhoverformat");var u=l{"use strict";var dWt=cC();hqe.exports=function(t,r,n){var a=t.i;return"x"in t||(t.x=r._x[a]),"y"in t||(t.y=r._y[a]),dWt(t,r,n)}});var pqe=fe((D5r,vqe)=>{"use strict";function vWt(e,t,r,n,a){for(var i=a+1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>=0?(i=o,a=o-1):n=o+1}return i}function pWt(e,t,r,n,a){for(var i=a+1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>0?(i=o,a=o-1):n=o+1}return i}function gWt(e,t,r,n,a){for(var i=n-1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<0?(i=o,n=o+1):a=o-1}return i}function mWt(e,t,r,n,a){for(var i=n-1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<=0?(i=o,n=o+1):a=o-1}return i}function yWt(e,t,r,n,a){for(;n<=a;){var i=n+a>>>1,o=e[i],s=r!==void 0?r(o,t):o-t;if(s===0)return i;s<=0?n=i+1:a=i-1}return-1}function xM(e,t,r,n,a,i){return typeof r=="function"?i(e,t,r,n===void 0?0:n|0,a===void 0?e.length-1:a|0):i(e,t,void 0,r===void 0?0:r|0,n===void 0?e.length-1:n|0)}vqe.exports={ge:function(e,t,r,n,a){return xM(e,t,r,n,a,vWt)},gt:function(e,t,r,n,a){return xM(e,t,r,n,a,pWt)},lt:function(e,t,r,n,a){return xM(e,t,r,n,a,gWt)},le:function(e,t,r,n,a){return xM(e,t,r,n,a,mWt)},eq:function(e,t,r,n,a){return xM(e,t,r,n,a,yWt)}}});var nZ=fe((R5r,gqe)=>{gqe.exports=xWt;function xWt(e,t,r){return tr?r:e:et?t:e}});var E1=fe((I5r,yqe)=>{"use strict";yqe.exports=function(t,r,n){var a={},i,o;if(typeof r=="string"&&(r=mqe(r)),Array.isArray(r)){var s={};for(o=0;o{"use strict";var _Wt=E1();xqe.exports=bWt;function bWt(e){var t;return arguments.length>1&&(e=arguments),typeof e=="string"?e=e.split(/\s/).map(parseFloat):typeof e=="number"&&(e=[e]),e.length&&typeof e[0]=="number"?e.length===1?t={width:e[0],height:e[0],x:0,y:0}:e.length===2?t={width:e[0],height:e[1],x:0,y:0}:t={x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(e=_Wt(e,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),t={x:e.left||0,y:e.top||0},e.width==null?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,e.height==null?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}});var l_=fe((q5r,_qe)=>{"use strict";_qe.exports=wWt;function wWt(e,t){if(!e||e.length==null)throw Error("Argument should be an array");t==null?t=1:t=Math.floor(t);for(var r=Array(t*2),n=0;na&&(a=e[o]),e[o]{"use strict";bqe.exports=function(){for(var t=0;t{Tqe.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}});var u_=fe((N5r,Mqe)=>{var Aqe=eF();Mqe.exports=TWt;function TWt(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=+(r||0)|0,Array.isArray(e)&&e[0]&&typeof e[0][0]=="number"){var n=e[0].length,a=e.length*n,i,o,s,l;(!t||typeof t=="string")&&(t=new(Aqe(t||"float32"))(a+r));var u=t.length-r;if(a!==u)throw new Error("source length "+a+" ("+n+"x"+e.length+") does not match destination length "+u);for(i=0,s=r;i{"use strict";Sqe.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var Cqe=fe((V5r,kqe)=>{"use strict";kqe.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var zqe=fe((G5r,Iqe)=>{"use strict";var Lqe=pqe(),Pqe=nZ(),AWt=c5(),MWt=l_(),Fqe=E1(),aZ=wqe(),SWt=u_(),EWt=Eqe(),kWt=eF(),Dqe=Cqe(),CWt=1073741824;Iqe.exports=function(t,r){r||(r={}),t=SWt(t,"float64"),r=Fqe(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let n=aZ(r.maxDepth,255),a=aZ(r.bounds,MWt(t,2));a[0]===a[2]&&a[2]++,a[1]===a[3]&&a[3]++;let i=Rqe(t,a),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(kWt(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let y=0;yn||w>CWt){for(let q=0;qce||m>me||F=I||K===ee)return;let ye=l[V];ee===void 0&&(ee=ye.length);for(let xe=K;xe=S&&De<=w&&Ge>=L&&Ge<=T&&R.push(be)}let ue=u[V],J=ue[K*4+0],_e=ue[K*4+1],ne=ue[K*4+2],ae=ue[K*4+3],pe=O(ue,K+1),ie=q*.5,le=V+1;B(U,j,ie,le,J,_e||ne||ae||pe),B(U,j+ie,ie,le,_e,ne||ae||pe),B(U+ie,j,ie,le,ne,ae||pe),B(U+ie,j+ie,ie,le,ae,pe)}function O(U,j){let q=null,V=0;for(;q===null;)if(q=U[j*4+V],V++,V>U.length)return null;return q}return R}function _(y,C,k,S,L){let w=[];for(let T=0;T{"use strict";qqe.exports=zqe()});var Oqe=fe((j5r,Bqe)=>{Bqe.exports=PWt;var oZ={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},LWt=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function PWt(e){var t=[];return e.replace(LWt,function(r,n,a){var i=n.toLowerCase();for(a=DWt(a),i=="m"&&a.length>2&&(t.push([n].concat(a.splice(0,2))),i="l",n=n=="m"?"l":"L");;){if(a.length==oZ[i])return a.unshift(n),t.push(a);if(a.length{Nqe.exports=RWt;function RWt(e){var t=0,r=0,n=0,a=0;return e.map(function(i){i=i.slice();var o=i[0],s=o.toUpperCase();if(o!=s)switch(i[0]=s,o){case"a":i[6]+=n,i[7]+=a;break;case"v":i[1]+=a;break;case"h":i[1]+=n;break;default:for(var l=1;l{"use strict";Object.defineProperty(rF,"__esModule",{value:!0});var IWt=(function(){function e(t,r){var n=[],a=!0,i=!1,o=void 0;try{for(var s=t[Symbol.iterator](),l;!(a=(l=s.next()).done)&&(n.push(l.value),!(r&&n.length===r));a=!0);}catch(u){i=!0,o=u}finally{try{!a&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),_M=Math.PI*2,sZ=function(t,r,n,a,i,o,s){var l=t.x,u=t.y;l*=r,u*=n;var c=a*l-i*u,f=i*l+a*u;return{x:c+o,y:f+s}},zWt=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),a=Math.cos(t),i=Math.sin(t),o=Math.cos(t+r),s=Math.sin(t+r);return[{x:a-i*n,y:i+a*n},{x:o+s*n,y:s-o*n},{x:o,y:s}]},Vqe=function(t,r,n,a){var i=t*a-r*n<0?-1:1,o=t*n+r*a;return o>1&&(o=1),o<-1&&(o=-1),i*Math.acos(o)},qWt=function(t,r,n,a,i,o,s,l,u,c,f,v){var g=Math.pow(i,2),p=Math.pow(o,2),_=Math.pow(f,2),x=Math.pow(v,2),y=g*p-g*x-p*_;y<0&&(y=0),y/=g*x+p*_,y=Math.sqrt(y)*(s===l?-1:1);var C=y*i/o*v,k=y*-o/i*f,S=c*C-u*k+(t+n)/2,L=u*C+c*k+(r+a)/2,w=(f-C)/i,T=(v-k)/o,A=(-f-C)/i,m=(-v-k)/o,F=Vqe(1,0,w,T),E=Vqe(w,T,A,m);return l===0&&E>0&&(E-=_M),l===1&&E<0&&(E+=_M),[S,L,F,E]},BWt=function(t){var r=t.px,n=t.py,a=t.cx,i=t.cy,o=t.rx,s=t.ry,l=t.xAxisRotation,u=l===void 0?0:l,c=t.largeArcFlag,f=c===void 0?0:c,v=t.sweepFlag,g=v===void 0?0:v,p=[];if(o===0||s===0)return[];var _=Math.sin(u*_M/360),x=Math.cos(u*_M/360),y=x*(r-a)/2+_*(n-i)/2,C=-_*(r-a)/2+x*(n-i)/2;if(y===0&&C===0)return[];o=Math.abs(o),s=Math.abs(s);var k=Math.pow(y,2)/Math.pow(o,2)+Math.pow(C,2)/Math.pow(s,2);k>1&&(o*=Math.sqrt(k),s*=Math.sqrt(k));var S=qWt(r,n,a,i,o,s,f,g,_,x,y,C),L=IWt(S,4),w=L[0],T=L[1],A=L[2],m=L[3],F=Math.abs(m)/(_M/4);Math.abs(1-F)<1e-7&&(F=1);var E=Math.max(Math.ceil(F),1);m/=E;for(var I=0;I{"use strict";Wqe.exports=NWt;var OWt=Hqe();function NWt(e){for(var t,r=[],n=0,a=0,i=0,o=0,s=null,l=null,u=0,c=0,f=0,v=e.length;f4?(n=g[g.length-4],a=g[g.length-3]):(n=u,a=c),r.push(g)}return r}function nF(e,t,r,n){return["C",e,t,r,n,r,n]}function jqe(e,t,r,n,a,i){return["C",e/3+2/3*r,t/3+2/3*n,a/3+2/3*r,i/3+2/3*n,a,i]}});var lZ=fe((X5r,Xqe)=>{"use strict";Xqe.exports=function(t){return typeof t!="string"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}});var $qe=fe((Z5r,Zqe)=>{"use strict";var UWt=Oqe(),VWt=Uqe(),GWt=Yqe(),HWt=lZ();Zqe.exports=jWt;function jWt(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!HWt(e))throw Error("String is not an SVG path.");e=UWt(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=VWt(e),e=GWt(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],r=0,n=e.length;rt[2]&&(t[2]=a[i+0]),a[i+1]>t[3]&&(t[3]=a[i+1]);return t}});var eBe=fe(($5r,Qqe)=>{"use strict";Qqe.exports=WWt;var bM=1e20;function WWt(e,t){t||(t={});var r=t.cutoff==null?.25:t.cutoff,n=t.radius==null?8:t.radius,a=t.channel||0,i,o,s,l,u,c,f,v,g,p,_;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");i=t.width,o=t.height,l=e,t.stride?c=t.stride:c=Math.floor(e.length/i/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(v=e,f=v.getContext("2d"),i=v.width,o=v.height,g=f.getImageData(0,0,i,o),l=g.data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(v=e.canvas,f=e,i=v.width,o=v.height,g=f.getImageData(0,0,i,o),l=g.data,c=4):window.ImageData&&e instanceof window.ImageData&&(g=e,i=e.width,o=e.height,l=g.data,c=4);if(s=Math.max(i,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(i*o),p=0,_=Math.floor(u.length/c);p<_;p++)l[p]=u[p*c+a]/255;else if(c!==1)throw Error("Raw data can have only 1 value per pixel");var x=Array(i*o),y=Array(i*o),C=Array(s),k=Array(s),S=Array(s+1),L=Array(s);for(p=0,_=i*o;p<_;p++){var w=l[p];x[p]=w===1?0:w===0?bM:Math.pow(Math.max(0,.5-w),2),y[p]=w===1?bM:w===0?0:Math.pow(Math.max(0,w-.5),2)}Kqe(x,i,o,C,k,L,S),Kqe(y,i,o,C,k,L,S);var T=window.Float32Array?new Float32Array(i*o):new Array(i*o);for(p=0,_=i*o;p<_;p++)T[p]=Math.min(Math.max(1-((x[p]-y[p])/n+r),0),1);return T}function Kqe(e,t,r,n,a,i,o){for(var s=0;siBe});function iBe(e,t={}){if(!(0,rBe.default)(e))throw Error("Invalid SVG path");let r,n;t.shape||Array.isArray(t)?[r,n]=t.shape||t:(r=uZ.width=t.width||t.w||200,n=uZ.height=t.height||t.h||200);let a=Math.min(r,n),i=t.stroke||0,o=t.viewbox||t.viewBox||(0,tBe.default)(e),s=[r/(o[2]-o[0]),n/(o[3]-o[1])],l=Math.min(s[0]||0,s[1]||0)/2;Pp.fillStyle="black",Pp.fillRect(0,0,r,n),Pp.fillStyle="white",i&&(typeof i!="number"&&(i=1),Pp.strokeStyle=i>0?"white":"black",Pp.lineWidth=Math.abs(i)),Pp.translate(r*.5,n*.5),Pp.scale(l,l);let u=new Path2D(e);return Pp.fill(u),i&&Pp.stroke(u),Pp.setTransform(1,0,0,1,0,0),(0,nBe.default)(Pp,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:a*.5})}var tBe,rBe,nBe,uZ,Pp,oBe=Lo(()=>{tBe=K0($qe()),rBe=K0(lZ()),nBe=K0(eBe()),uZ=document.createElement("canvas"),Pp=uZ.getContext("2d",{willReadFrequently:!0})});var f_=fe((K5r,mBe)=>{"use strict";var aF=aa(),YWt=(oBe(),Gs(aBe)).default,{normalize:iF}=ni(),XWt=bi(),d5=Xt(),Nu=d5.isArrayOrTypedArray,f5=Ji(),sBe=El(),lBe=Sg().formatColor,h5=Is(),ZWt=uT(),fZ=JP(),wM=Ty(),$Wt=Y1().DESELECTDIM,uBe={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},KWt=Sd().appendArrayPointValue;function JWt(e,t){var r,n={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},a=e._context.plotGlPixelRatio;if(t.visible!==!0)return n;if(h5.hasText(t)&&(n.text=gBe(e,t),n.textSel=fBe(e,t,t.selected),n.textUnsel=fBe(e,t,t.unselected)),h5.hasMarkers(t)&&(n.marker=dZ(e,t),n.markerSel=hZ(e,t,t.selected),n.markerUnsel=hZ(e,t,t.unselected),!t.unselected&&Nu(t.marker.opacity))){var i=t.marker.opacity;for(n.markerUnsel.opacity=new Array(i.length),r=0;r500?"bold":"normal":e}function dZ(e,t){var r=t._length,n=t.marker,a={},i,o=Nu(n.symbol),s=Nu(n.angle),l=Nu(n.color),u=Nu(n.line.color),c=Nu(n.opacity),f=Nu(n.size),v=Nu(n.line.width),g;if(o||(g=fZ.isOpenSymbol(n.symbol)),o||l||u||c||s){a.symbols=new Array(r),a.angles=new Array(r),a.colors=new Array(r),a.borderColors=new Array(r);var p=n.symbol,_=n.angle,x=lBe(n,n.opacity,r),y=lBe(n.line,n.opacity,r);if(!Nu(y[0])){var C=y;for(y=Array(r),i=0;iwM.TOO_MANY_POINTS||h5.hasMarkers(t)?"rect":"round";if(u&&t.connectgaps){var f=i[0],v=i[1];for(o=0;o1?l[o]:l[0]:l,g=Nu(u)?u.length>1?u[o]:u[0]:u,p=uBe[v],_=uBe[g],x=c?c/.8+1:0,y=-_*x-_*.5;i.offset[o]=[p*x/f,y/f]}}return i}mBe.exports={style:JWt,markerStyle:dZ,markerSelection:hZ,linePositions:eYt,errorBarPositions:tYt,textPosition:rYt}});var vZ=fe((J5r,yBe)=>{"use strict";var oF=Xt();yBe.exports=function(t,r){var n=r._scene,a={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},i={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(n=r._scene={},n.init=function(){oF.extendFlat(n,i,a)},n.init(),n.update=function(s){var l=oF.repeat(s,n.count);if(n.fill2d&&n.fill2d.update(l),n.scatter2d&&n.scatter2d.update(l),n.line2d&&n.line2d.update(l),n.error2d&&n.error2d.update(l.concat(l)),n.select2d&&n.select2d.update(l),n.glText)for(var u=0;u{"use strict";var nYt=tF(),v5=Xt(),xBe=El(),iYt=rp().findExtremes,_Be=cp(),pZ=gv(),aYt=pZ.calcMarkerSize,oYt=pZ.calcAxisExpansion,sYt=pZ.setFirstScatter,lYt=pv(),p5=f_(),uYt=vZ(),bBe=Wa().BADNUM,cYt=Ty().TOO_MANY_POINTS;TBe.exports=function(t,r){var n=t._fullLayout,a=r._xA=xBe.getFromId(t,r.xaxis,"x"),i=r._yA=xBe.getFromId(t,r.yaxis,"y"),o=n._plots[r.xaxis+r.yaxis],s=r._length,l=s>=cYt,u=s*2,c={},f,v=a.makeCalcdata(r,"x"),g=i.makeCalcdata(r,"y"),p=_Be(r,a,"x",v),_=_Be(r,i,"y",g),x=p.vals,y=_.vals;r._x=x,r._y=y,r.xperiodalignment&&(r._origX=v,r._xStarts=p.starts,r._xEnds=p.ends),r.yperiodalignment&&(r._origY=g,r._yStarts=_.starts,r._yEnds=_.ends);var C=new Array(u),k=new Array(s);for(f=0;f1&&v5.extendFlat(o.line,p5.linePositions(e,r,n)),o.errorX||o.errorY){var s=p5.errorBarPositions(e,r,n,a,i);o.errorX&&v5.extendFlat(o.errorX,s.x),o.errorY&&v5.extendFlat(o.errorY,s.y)}return o.text&&(v5.extendFlat(o.text,{positions:n},p5.textPosition(e,r,o.text,o.marker)),v5.extendFlat(o.textSel,{positions:n},p5.textPosition(e,r,o.text,o.markerSel)),v5.extendFlat(o.textUnsel,{positions:n},p5.textPosition(e,r,o.text,o.markerUnsel))),o}});var gZ=fe((e4r,SBe)=>{"use strict";var MBe=Xt(),hYt=ni(),dYt=Y1().DESELECTDIM;function vYt(e){var t=e[0],r=t.trace,n=t.t,a=n._scene,i=n.index,o=a.selectBatch[i],s=a.unselectBatch[i],l=a.textOptions[i],u=a.textSelectedOptions[i]||{},c=a.textUnselectedOptions[i]||{},f=MBe.extendFlat({},l),v,g;if(o.length||s.length){var p=u.color,_=c.color,x=l.color,y=MBe.isArrayOrTypedArray(x);for(f.color=new Array(r._length),v=0;v{"use strict";var EBe=Is(),pYt=gZ().styleTextSelection;kBe.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].trace,l=n[0].t,u=s._length,c=l.x,f=l.y,v=l._scene,g=l.index;if(!v)return o;var p=EBe.hasText(s),_=EBe.hasMarkers(s),x=!_&&!p;if(s.visible!==!0||x)return o;var y=[],C=[];if(r!==!1&&!r.degenerate)for(var k=0;k{"use strict";var gYt=KP();CBe.exports={moduleType:"trace",name:"scattergl",basePlotModule:gu(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:yM(),supplyDefaults:fqe(),crossTraceDefaults:aU(),colorbar:Zf(),formatLabels:dqe(),calc:ABe(),hoverPoints:gYt.hoverPoints,selectPoints:mZ(),meta:{}}});var FBe=fe((n4r,PBe)=>{"use strict";PBe.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var zBe=fe((i4r,IBe)=>{"use strict";var DBe=FBe();IBe.exports=mYt;var RBe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function mYt(e){var t,r=[],n=1,a;if(typeof e=="string")if(e=e.toLowerCase(),DBe[e])r=DBe[e].slice(),a="rgb";else if(e==="transparent")n=0,a="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var i=e.slice(1),o=i.length,s=o<=4;n=1,s?(r=[parseInt(i[0]+i[0],16),parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16)],o===4&&(n=parseInt(i[3]+i[3],16)/255)):(r=[parseInt(i[0]+i[1],16),parseInt(i[2]+i[3],16),parseInt(i[4]+i[5],16)],o===8&&(n=parseInt(i[6]+i[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),a="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],u=l==="rgb",i=l.replace(/a$/,"");a=i;var o=i==="cmyk"?4:i==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(v,g){if(/%$/.test(v))return g===o?parseFloat(v)/100:i==="rgb"?parseFloat(v)*255/100:parseFloat(v);if(i[g]==="h"){if(/deg$/.test(v))return parseFloat(v);if(RBe[v]!==void 0)return RBe[v]}return parseFloat(v)}),l===i&&r.push(1),n=u||r[o]===void 0?1:r[o],r=r.slice(0,o)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),a=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],a="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(a="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(a="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(a="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:a,values:r,alpha:n}}});var BBe=fe((a4r,qBe)=>{"use strict";var yYt=zBe();qBe.exports=function(t){Array.isArray(t)&&t.raw&&(t=String.raw.apply(null,arguments));var r,n,a,i=yYt(t);if(!i.space)return[];var o=[0,0,0],s=i.space[0]==="h"?[360,100,100]:[255,255,255];return r=Array(3),r[0]=Math.min(Math.max(i.values[0],o[0]),s[0]),r[1]=Math.min(Math.max(i.values[1],o[1]),s[1]),r[2]=Math.min(Math.max(i.values[2],o[2]),s[2]),i.space[0]==="h"&&(r=xYt(r)),r.push(Math.min(Math.max(i.alpha,0),1)),r};function xYt(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,a,i,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(i=n<.5?n*(1+r):n+r-n*r,a=2*n-i,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?a+(i-a)*6*o:2*o<1?i:3*o<2?a+(i-a)*(2/3-o)*6:a,s[u++]=l*255;return s}});var TM=fe((o4r,OBe)=>{"use strict";var _Yt=BBe(),bYt=eF();OBe.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var n=bYt(r),a=new n(4),i=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=_Yt(t),t[0]/=255,t[1]/=255,t[2]/=255),wYt(t)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:255,i&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(i?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:1):(a[0]=Math.min(Math.max(Math.floor(t[0]*255),0),255),a[1]=Math.min(Math.max(Math.floor(t[1]*255),0),255),a[2]=Math.min(Math.max(Math.floor(t[2]*255),0),255),a[3]=t[3]==null?255:Math.min(Math.max(Math.floor(t[3]*255),0),255)),a)};function wYt(e){return!!(e instanceof Uint8Array||e instanceof Uint8ClampedArray||Array.isArray(e)&&(e[0]>1||e[0]===0)&&(e[1]>1||e[1]===0)&&(e[2]>1||e[2]===0)&&(!e[3]||e[3]>1))}});var UBe=fe((s4r,lF)=>{"use strict";var sF=nZ();lF.exports=NBe;lF.exports.to=NBe;lF.exports.from=TYt;function NBe(e,t){t==null&&(t=!0);var r=e[0],n=e[1],a=e[2],i=e[3];i==null&&(i=t?1:255),t&&(r*=255,n*=255,a*=255,i*=255),r=sF(r,0,255)&255,n=sF(n,0,255)&255,a=sF(a,0,255)&255,i=sF(i,0,255)&255;var o=r*16777216+(n<<16)+(a<<8)+i;return o}function TYt(e,t){e=+e;var r=e>>>24,n=(e&16711680)>>>16,a=(e&65280)>>>8,i=e&255;return t===!1?[r,n,a,i]:[r/255,n/255,a/255,i/255]}});var GBe=fe((l4r,VBe)=>{VBe.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n{"use strict";HBe.exports=function(t,r,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var a=0,i=n.length;a{"use strict";g5.exports=AM;g5.exports.float32=g5.exports.float=AM;g5.exports.fract32=g5.exports.fract=AYt;var jBe=new Float32Array(1);function AYt(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=AM(e));for(var r=0,n=t.length;r{"use strict";var MYt=TM(),SYt=l_(),EYt=UBe(),kYt=tF(),cF=GBe(),CYt=E1(),LYt=yZ(),PYt=u_(),fF=uF(),FYt=c5(),DYt=rh;function rh(e,t){if(!(this instanceof rh))return new rh(e,t);typeof e=="function"?(t||(t={}),t.regl=e):(t=e,e=null),t&&t.length&&(t.positions=t),e=t.regl;let r=e._gl,n,a=[],i={},o=[],s=[null],l=[null],u=255,c=100;this.tooManyColors=!1,n=e.texture({data:new Uint8Array(u*4),width:u,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),Object.assign(this,{regl:e,gl:r,groups:o,markerCache:l,markerTextures:s,palette:a,paletteIds:i,paletteTexture:n,maxColors:u,maxSize:c,canvas:r.canvas}),this.update(t);let f={uniforms:{constPointSize:!!t.constPointSize,opacity:e.prop("opacity"),paletteSize:(p,_)=>[this.tooManyColors?0:u,n.height],pixelRatio:e.context("pixelRatio"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translate:e.prop("translate"),translateFract:e.prop("translateFract"),markerTexture:e.prop("markerTexture"),paletteTexture:n},attributes:{x:(p,_)=>_.xAttr||{buffer:_.positionBuffer,stride:8,offset:0},y:(p,_)=>_.yAttr||{buffer:_.positionBuffer,stride:8,offset:4},xFract:(p,_)=>_.xAttr?{constant:[0,0]}:{buffer:_.positionFractBuffer,stride:8,offset:0},yFract:(p,_)=>_.yAttr?{constant:[0,0]}:{buffer:_.positionFractBuffer,stride:8,offset:4},size:(p,_)=>_.size.length?{buffer:_.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(_.size*255/this.maxSize)]},borderSize:(p,_)=>_.borderSize.length?{buffer:_.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(_.borderSize*255/this.maxSize)]},colorId:(p,_)=>_.color.length?{buffer:_.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?a.slice(_.color*4,_.color*4+4):[_.color]},borderColorId:(p,_)=>_.borderColor.length?{buffer:_.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?a.slice(_.borderColor*4,_.borderColor*4+4):[_.borderColor]},isActive:(p,_)=>_.activation===!0?{constant:[1]}:_.activation?_.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:e.prop("viewport")},viewport:e.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:e.prop("elements"),count:e.prop("count"),offset:e.prop("offset"),primitive:"points"},v=Object.assign({},f);v.frag=cF([`precision highp float; #define GLSLIFY 1 uniform float opacity; @@ -2208,8 +2208,8 @@ void main() { fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; fragWidth = 1. / gl_PointSize; } -`]),this.drawCircle=e(g)}rh.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4};rh.prototype.render=function(){return arguments.length&&this.update(...arguments),this.draw(),this};rh.prototype.draw=function(){for(var e=arguments.length,t=new Array(e),r=0;r{this.drawItem(i)});return this};rh.prototype.drawItem=function(e,t){let{groups:r}=this,n=r[e];if(typeof t=="number"&&(e=t,n=r[t],t=null),!(n&&n.count&&n.opacity))return;n.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,n,t));let a=[];for(let i=1;i{let f=n[c];if(u===void 0)return f;u===null?u={positions:null}:typeof u=="function"?u={ondraw:u}:typeof u[0]=="number"&&(u={positions:u}),u=EYt(u,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),u.positions===null&&(u.positions=[]),u.tooManyColors!=null&&(this.tooManyColors=u.tooManyColors),f||(n[c]=f={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:i.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:i.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:i.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:i.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:i.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},u=Object.assign({},rh.defaults,u)),u.positions&&!("marker"in u)&&(u.marker=f.marker,delete f.marker),u.marker&&!("positions"in u)&&(u.positions=f.positions,delete f.positions);let v=0,g=0;if(kYt(f,u,[{snap:!0,size:(p,x)=>(p==null&&(p=rh.defaults.size),v+=p&&p.length?1:0,p),borderSize:(p,x)=>(p==null&&(p=rh.defaults.borderSize),v+=p&&p.length?1:0,p),opacity:parseFloat,color:(p,x)=>(p==null&&(p=rh.defaults.color),p=this.updateColor(p),g++,p),borderColor:(p,x)=>(p==null&&(p=rh.defaults.borderColor),p=this.updateColor(p),g++,p),bounds:(p,x,_)=>("range"in _||(_.range=null),p),positions:(p,x,_)=>{let{snap:y}=x,{positionBuffer:C,positionFractBuffer:k,selectionBuffer:S}=x;if(p.x||p.y)return p.x.length?x.xAttr={buffer:i.buffer(p.x),offset:0,stride:4,count:p.x.length}:x.xAttr={buffer:p.x.buffer,offset:p.x.offset*4||0,stride:(p.x.stride||1)*4,count:p.x.count},p.y.length?x.yAttr={buffer:i.buffer(p.y),offset:0,stride:4,count:p.y.length}:x.yAttr={buffer:p.y.buffer,offset:p.y.offset*4||0,stride:(p.y.stride||1)*4,count:p.y.count},x.count=Math.max(x.xAttr.count,x.yAttr.count),p;p=CYt(p,"float64");let L=x.count=Math.floor(p.length/2),w=x.bounds=L?AYt(p,2):null;if(!_.range&&!x.range&&(delete x.range,_.range=w),!_.marker&&!x.marker&&(delete x.marker,_.marker=null),y&&(y===!0||L>y)?x.tree=SYt(p,{bounds:w}):y&&y.length&&(x.tree=y),x.tree){let m={primitive:"points",usage:"static",data:x.tree,type:"uint32"};x.elements?x.elements(m):x.elements=i.elements(m)}var A=fF.float32(p);C({data:A,usage:"dynamic"});var T=fF.fract32(p,A);return k({data:T,usage:"dynamic"}),S({data:new Uint8Array(L),type:"uint8",usage:"stream"}),p}},{marker:(p,x,_)=>{let{activation:y}=x;if(y.forEach(C=>C&&C.destroy&&C.destroy()),y.length=0,!p||typeof p[0]=="number"){let C=this.addMarker(p);y[C]=!0}else{let C=[];for(let k=0,S=Math.min(p.length,x.count);k{let y=x.bounds;if(y)return p||(p=y),x.scale=[1/(p[2]-p[0]),1/(p[3]-p[1])],x.translate=[-p[0],-p[1]],x.scaleFract=fF.fract(x.scale),x.translateFract=fF.fract(x.translate),p},viewport:p=>LYt(p||[a.drawingBufferWidth,a.drawingBufferHeight])}]),v){let{count:p,size:x,borderSize:_,sizeBuffer:y}=f,C=new Uint8Array(p*2);if(x.length||_.length)for(let k=0;k=0)return a;let i;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)i=e;else{i=new Uint8Array(e.length);for(let s=0,l=e.length;sn*4&&(this.tooManyColors=!0),this.updatePalette(r),a.length===1?a[0]:a};rh.prototype.updatePalette=function(e){if(this.tooManyColors)return;let{maxColors:t,paletteTexture:r}=this,n=Math.ceil(e.length*.25/t);if(n>1){e=e.slice();for(let a=e.length*.25%t;a{e.sizeBuffer.destroy(),e.positionBuffer.destroy(),e.positionFractBuffer.destroy(),e.colorBuffer.destroy(),e.activation.forEach(t=>t&&t.destroy&&t.destroy()),e.selectionBuffer.destroy(),e.elements&&e.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(e=>e&&e.destroy&&e.destroy()),this};var FYt=function(e,t){var r=new PYt(e,t),n=r.render.bind(r);return Object.assign(n,{render:n,update:r.update.bind(r),draw:r.draw.bind(r),destroy:r.destroy.bind(r),regl:r.regl,gl:r.gl,canvas:r.gl.canvas,groups:r.groups,markers:r.markerCache,palette:r.palette}),n};jBe.exports=FYt});var Zc=fe((c4r,YBe)=>{"use strict";var WBe=Object.getOwnPropertySymbols,DYt=Object.prototype.hasOwnProperty,RYt=Object.prototype.propertyIsEnumerable;function IYt(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function zYt(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(i){return t[i]});if(n.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(i){a[i]=i}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}YBe.exports=zYt()?Object.assign:function(e,t){for(var r,n=IYt(e),a,i=1;i{"use strict";TZ.exports=vF;TZ.exports.default=vF;function vF(e,t,r){r=r||2;var n=t&&t.length,a=n?t[0]*r:e.length,i=ZBe(e,0,a,r,!0),o=[];if(!i||i.next===i.prev)return o;var s,l,u,c,f,v,g;if(n&&(i=UYt(e,t,i,r)),e.length>80*r){s=u=e[0],l=c=e[1];for(var p=r;pu&&(u=f),v>c&&(c=v);g=Math.max(u-s,c-l),g=g!==0?32767/g:0}return AM(i,o,r,s,l,g,0),o}function ZBe(e,t,r,n,a){var i,o;if(a===wZ(e,t,r,n)>0)for(i=t;i=t;i-=n)o=XBe(i,e[i],e[i+1],o);return o&&pF(o,o.next)&&(SM(o),o=o.next),o}function h_(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(pF(r,r.next)||Uu(r.prev,r,r.next)===0)){if(SM(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function AM(e,t,r,n,a,i,o){if(e){!o&&i&&WYt(e,n,a,i);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,i?BYt(e,n,a,i):qYt(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),SM(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=OYt(h_(e),t,r),AM(e,t,r,n,a,i,2)):o===2&&NYt(e,t,r,n,a,i):AM(h_(e),t,r,n,a,i,1);break}}}}function qYt(e){var t=e.prev,r=e,n=e.next;if(Uu(t,r,n)>=0)return!1;for(var a=t.x,i=r.x,o=n.x,s=t.y,l=r.y,u=n.y,c=ai?a>o?a:o:i>o?i:o,g=s>l?s>u?s:u:l>u?l:u,p=n.next;p!==t;){if(p.x>=c&&p.x<=v&&p.y>=f&&p.y<=g&&g5(a,s,i,l,o,u,p.x,p.y)&&Uu(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function BYt(e,t,r,n){var a=e.prev,i=e,o=e.next;if(Uu(a,i,o)>=0)return!1;for(var s=a.x,l=i.x,u=o.x,c=a.y,f=i.y,v=o.y,g=sl?s>u?s:u:l>u?l:u,_=c>f?c>v?c:v:f>v?f:v,y=_Z(g,p,t,r,n),C=_Z(x,_,t,r,n),k=e.prevZ,S=e.nextZ;k&&k.z>=y&&S&&S.z<=C;){if(k.x>=g&&k.x<=x&&k.y>=p&&k.y<=_&&k!==a&&k!==o&&g5(s,c,l,f,u,v,k.x,k.y)&&Uu(k.prev,k,k.next)>=0||(k=k.prevZ,S.x>=g&&S.x<=x&&S.y>=p&&S.y<=_&&S!==a&&S!==o&&g5(s,c,l,f,u,v,S.x,S.y)&&Uu(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;k&&k.z>=y;){if(k.x>=g&&k.x<=x&&k.y>=p&&k.y<=_&&k!==a&&k!==o&&g5(s,c,l,f,u,v,k.x,k.y)&&Uu(k.prev,k,k.next)>=0)return!1;k=k.prevZ}for(;S&&S.z<=C;){if(S.x>=g&&S.x<=x&&S.y>=p&&S.y<=_&&S!==a&&S!==o&&g5(s,c,l,f,u,v,S.x,S.y)&&Uu(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function OYt(e,t,r){var n=e;do{var a=n.prev,i=n.next.next;!pF(a,i)&&$Be(a,n,n.next,i)&&MM(a,i)&&MM(i,a)&&(t.push(a.i/r|0),t.push(n.i/r|0),t.push(i.i/r|0),SM(n),SM(n.next),n=e=i),n=n.next}while(n!==e);return h_(n)}function NYt(e,t,r,n,a,i){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&ZYt(o,s)){var l=KBe(o,s);o=h_(o,o.next),l=h_(l,l.next),AM(o,t,r,n,a,i,0),AM(l,t,r,n,a,i,0);return}s=s.next}o=o.next}while(o!==e)}function UYt(e,t,r,n){var a=[],i,o,s,l,u;for(i=0,o=t.length;i=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>i&&(i=s,o=r.x=r.x&&r.x>=u&&n!==r.x&&g5(ao.x||r.x===o.x&&jYt(o,r)))&&(o=r,f=v)),r=r.next;while(r!==l);return o}function jYt(e,t){return Uu(e.prev,e,t.prev)<0&&Uu(t.next,e,e.next)<0}function WYt(e,t,r,n){var a=e;do a.z===0&&(a.z=_Z(a.x,a.y,t,r,n)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next;while(a!==e);a.prevZ.nextZ=null,a.prevZ=null,YYt(a)}function YYt(e){var t,r,n,a,i,o,s,l,u=1;do{for(r=e,e=null,i=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(a=r,r=r.nextZ,s--):(a=n,n=n.nextZ,l--),i?i.nextZ=a:e=a,a.prevZ=i,i=a;r=n}i.nextZ=null,u*=2}while(o>1);return e}function _Z(e,t,r,n,a){return e=(e-r)*a|0,t=(t-n)*a|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function XYt(e){var t=e,r=e;do(t.x=(e-o)*(i-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(i-s)>=(a-o)*(n-s)}function ZYt(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!$Yt(e,t)&&(MM(e,t)&&MM(t,e)&&KYt(e,t)&&(Uu(e.prev,e,t.prev)||Uu(e,t.prev,t))||pF(e,t)&&Uu(e.prev,e,e.next)>0&&Uu(t.prev,t,t.next)>0)}function Uu(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function pF(e,t){return e.x===t.x&&e.y===t.y}function $Be(e,t,r,n){var a=dF(Uu(e,t,r)),i=dF(Uu(e,t,n)),o=dF(Uu(r,n,e)),s=dF(Uu(r,n,t));return!!(a!==i&&o!==s||a===0&&hF(e,r,t)||i===0&&hF(e,n,t)||o===0&&hF(r,e,n)||s===0&&hF(r,t,n))}function hF(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function dF(e){return e>0?1:e<0?-1:0}function $Yt(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&$Be(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function MM(e,t){return Uu(e.prev,e,e.next)<0?Uu(e,t,e.next)>=0&&Uu(e,e.prev,t)>=0:Uu(e,t,e.prev)<0||Uu(e,e.next,t)<0}function KYt(e,t){var r=e,n=!1,a=(e.x+t.x)/2,i=(e.y+t.y)/2;do r.y>i!=r.next.y>i&&r.next.y!==r.y&&a<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function KBe(e,t){var r=new bZ(e.i,e.x,e.y),n=new bZ(t.i,t.x,t.y),a=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=a,a.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function XBe(e,t,r,n){var a=new bZ(e,t,r);return n?(a.next=n.next,a.prev=n,n.next.prev=a,n.next=a):(a.prev=a,a.next=a),a}function SM(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)}function bZ(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}vF.deviation=function(e,t,r,n){var a=t&&t.length,i=a?t[0]*r:e.length,o=Math.abs(wZ(e,0,i,r));if(a)for(var s=0,l=t.length;s0&&(n+=e[a-1].length,r.holes.push(n))}return r}});var eOe=fe((h4r,QBe)=>{"use strict";var JYt=l_();QBe.exports=QYt;function QYt(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=JYt(e,t));for(var n=0;n{"use strict";tOe.exports=function(){var e,t;if(typeof WeakMap!="function")return!1;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(r){return!1}return!(String(e)!=="[object WeakMap]"||typeof e.set!="function"||e.set({},1)!==e||typeof e.delete!="function"||typeof e.has!="function"||e.get(t)!=="one")}});var iOe=fe((v4r,nOe)=>{"use strict";nOe.exports=function(){}});var My=fe((p4r,aOe)=>{"use strict";var eXt=iOe()();aOe.exports=function(e){return e!==eXt&&e!==null}});var AZ=fe((g4r,sOe)=>{"use strict";var tXt=Object.create,rXt=Object.getPrototypeOf,oOe={};sOe.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||tXt;return typeof e!="function"?!1:rXt(e(t(null),oOe))===oOe}});var MZ=fe((m4r,lOe)=>{"use strict";var nXt=My(),iXt={function:!0,object:!0};lOe.exports=function(e){return nXt(e)&&iXt[typeof e]||!1}});var Pg=fe((y4r,uOe)=>{"use strict";var aXt=My();uOe.exports=function(e){if(!aXt(e))throw new TypeError("Cannot use null or undefined");return e}});var fOe=fe((x4r,cOe)=>{"use strict";var SZ=Object.create,gF;AZ()()||(gF=EZ());cOe.exports=(function(){var e,t,r;return!gF||gF.level!==1?SZ:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(n){if(n==="__proto__"){t[n]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}t[n]=r}),Object.defineProperties(e,t),Object.defineProperty(gF,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,a){return SZ(n===null?e:n,a)})})()});var EZ=fe((_4r,hOe)=>{"use strict";var oXt=MZ(),sXt=Pg(),lXt=Object.prototype.isPrototypeOf,uXt=Object.defineProperty,cXt={configurable:!0,enumerable:!1,writable:!0,value:void 0},mF;mF=function(e,t){if(sXt(e),t===null||oXt(t))return e;throw new TypeError("Prototype must be null or an object")};hOe.exports=(function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,a){return r.call(mF(n,a),a),n}):t=function(n,a){return mF(n,a).__proto__=a,n}:t=function n(a,i){var o;return mF(a,i),o=lXt.call(n.nullPolyfill,a),o&&delete n.nullPolyfill.__proto__,i===null&&(i=n.nullPolyfill),a.__proto__=i,o&&uXt(n.nullPolyfill,"__proto__",cXt),a},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null})((function(){var e=Object.create(null),t={},r,n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{r=n.set,r.call(e,t)}catch(a){}if(Object.getPrototypeOf(e)===t)return{set:r,level:2}}return e.__proto__=t,Object.getPrototypeOf(e)===t?{level:2}:(e={},e.__proto__=t,Object.getPrototypeOf(e)===t?{level:1}:!1)})());fOe()});var yF=fe((b4r,dOe)=>{"use strict";dOe.exports=AZ()()?Object.setPrototypeOf:EZ()});var pOe=fe((w4r,vOe)=>{"use strict";var fXt=MZ();vOe.exports=function(e){if(!fXt(e))throw new TypeError(e+" is not an Object");return e}});var mOe=fe((T4r,gOe)=>{"use strict";var hXt=Object.create(null),dXt=Math.random;gOe.exports=function(){var e;do e=dXt().toString(36).slice(2);while(hXt[e]);return e}});var d_=fe((A4r,yOe)=>{"use strict";var vXt=void 0;yOe.exports=function(e){return e!==vXt&&e!==null}});var kZ=fe((M4r,xOe)=>{"use strict";var pXt=d_(),gXt={object:!0,function:!0,undefined:!0};xOe.exports=function(e){return pXt(e)?hasOwnProperty.call(gXt,typeof e):!1}});var bOe=fe((S4r,_Oe)=>{"use strict";var mXt=kZ();_Oe.exports=function(e){if(!mXt(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var TOe=fe((E4r,wOe)=>{"use strict";var yXt=bOe();wOe.exports=function(e){if(typeof e!="function"||!hasOwnProperty.call(e,"length"))return!1;try{if(typeof e.length!="number"||typeof e.call!="function"||typeof e.apply!="function")return!1}catch(t){return!1}return!yXt(e)}});var CZ=fe((k4r,AOe)=>{"use strict";var xXt=TOe(),_Xt=/^\s*class[\s{/}]/,bXt=Function.prototype.toString;AOe.exports=function(e){return!(!xXt(e)||_Xt.test(bXt.call(e)))}});var SOe=fe((C4r,MOe)=>{"use strict";MOe.exports=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}});var kOe=fe((L4r,EOe)=>{"use strict";EOe.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var LOe=fe((P4r,COe)=>{"use strict";var wXt=My(),TXt=Object.keys;COe.exports=function(e){return TXt(wXt(e)?Object(e):e)}});var FOe=fe((F4r,POe)=>{"use strict";POe.exports=kOe()()?Object.keys:LOe()});var ROe=fe((D4r,DOe)=>{"use strict";var AXt=FOe(),MXt=Pg(),SXt=Math.max;DOe.exports=function(e,t){var r,n,a=SXt(arguments.length,2),i;for(e=Object(MXt(e)),i=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n{"use strict";IOe.exports=SOe()()?Object.assign:ROe()});var LZ=fe((I4r,zOe)=>{"use strict";var EXt=My(),kXt=Array.prototype.forEach,CXt=Object.create,LXt=function(e,t){var r;for(r in e)t[r]=e[r]};zOe.exports=function(e){var t=CXt(null);return kXt.call(arguments,function(r){EXt(r)&&LXt(Object(r),t)}),t}});var BOe=fe((z4r,qOe)=>{"use strict";var PZ="razdwatrzy";qOe.exports=function(){return typeof PZ.contains!="function"?!1:PZ.contains("dwa")===!0&&PZ.contains("foo")===!1}});var NOe=fe((q4r,OOe)=>{"use strict";var PXt=String.prototype.indexOf;OOe.exports=function(e){return PXt.call(this,e,arguments[1])>-1}});var FZ=fe((B4r,UOe)=>{"use strict";UOe.exports=BOe()()?String.prototype.contains:NOe()});var Fg=fe((O4r,jOe)=>{"use strict";var _F=d_(),VOe=CZ(),GOe=xF(),HOe=LZ(),EM=FZ(),FXt=jOe.exports=function(e,t){var r,n,a,i,o;return arguments.length<2||typeof e!="string"?(i=t,t=e,e=null):i=arguments[2],_F(e)?(r=EM.call(e,"c"),n=EM.call(e,"e"),a=EM.call(e,"w")):(r=a=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:a},i?GOe(HOe(i),o):o};FXt.gs=function(e,t,r){var n,a,i,o;return typeof e!="string"?(i=r,r=t,t=e,e=null):i=arguments[3],_F(t)?VOe(t)?_F(r)?VOe(r)||(i=r,r=void 0):r=void 0:(i=t,t=r=void 0):t=void 0,_F(e)?(n=EM.call(e,"c"),a=EM.call(e,"e")):(n=!0,a=!1),o={get:t,set:r,configurable:n,enumerable:a},i?GOe(HOe(i),o):o}});var kM=fe((N4r,YOe)=>{"use strict";var WOe=Object.prototype.toString,DXt=WOe.call((function(){return arguments})());YOe.exports=function(e){return WOe.call(e)===DXt}});var CM=fe((U4r,ZOe)=>{"use strict";var XOe=Object.prototype.toString,RXt=XOe.call("");ZOe.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||XOe.call(e)===RXt)||!1}});var KOe=fe((V4r,$Oe)=>{"use strict";$Oe.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var eNe=fe((G4r,QOe)=>{var JOe=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};QOe.exports=(function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return JOe()}try{return __global__||JOe()}finally{delete Object.prototype.__global__}})()});var LM=fe((H4r,tNe)=>{"use strict";tNe.exports=KOe()()?globalThis:eNe()});var nNe=fe((j4r,rNe)=>{"use strict";var IXt=LM(),DZ={object:!0,symbol:!0};rNe.exports=function(){var e=IXt.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!DZ[typeof e.iterator]||!DZ[typeof e.toPrimitive]||!DZ[typeof e.toStringTag])}});var aNe=fe((W4r,iNe)=>{"use strict";iNe.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var RZ=fe((Y4r,oNe)=>{"use strict";var zXt=aNe();oNe.exports=function(e){if(!zXt(e))throw new TypeError(e+" is not a symbol");return e}});var fNe=fe((X4r,cNe)=>{"use strict";var sNe=Fg(),qXt=Object.create,lNe=Object.defineProperty,BXt=Object.prototype,uNe=qXt(null);cNe.exports=function(e){for(var t=0,r,n;uNe[e+(t||"")];)++t;return e+=t||"",uNe[e]=!0,r="@@"+e,lNe(BXt,r,sNe.gs(null,function(a){n||(n=!0,lNe(this,r,sNe(a)),n=!1)})),r}});var dNe=fe((Z4r,hNe)=>{"use strict";var Fp=Fg(),lc=LM().Symbol;hNe.exports=function(e){return Object.defineProperties(e,{hasInstance:Fp("",lc&&lc.hasInstance||e("hasInstance")),isConcatSpreadable:Fp("",lc&&lc.isConcatSpreadable||e("isConcatSpreadable")),iterator:Fp("",lc&&lc.iterator||e("iterator")),match:Fp("",lc&&lc.match||e("match")),replace:Fp("",lc&&lc.replace||e("replace")),search:Fp("",lc&&lc.search||e("search")),species:Fp("",lc&&lc.species||e("species")),split:Fp("",lc&&lc.split||e("split")),toPrimitive:Fp("",lc&&lc.toPrimitive||e("toPrimitive")),toStringTag:Fp("",lc&&lc.toStringTag||e("toStringTag")),unscopables:Fp("",lc&&lc.unscopables||e("unscopables"))})}});var gNe=fe(($4r,pNe)=>{"use strict";var vNe=Fg(),OXt=RZ(),PM=Object.create(null);pNe.exports=function(e){return Object.defineProperties(e,{for:vNe(function(t){return PM[t]?PM[t]:PM[t]=e(String(t))}),keyFor:vNe(function(t){var r;OXt(t);for(r in PM)if(PM[r]===t)return r})})}});var xNe=fe((K4r,yNe)=>{"use strict";var k1=Fg(),IZ=RZ(),bF=LM().Symbol,NXt=fNe(),UXt=dNe(),VXt=gNe(),GXt=Object.create,zZ=Object.defineProperties,wF=Object.defineProperty,cd,m5,mNe;if(typeof bF=="function")try{String(bF()),mNe=!0}catch(e){}else bF=null;m5=function(t){if(this instanceof m5)throw new TypeError("Symbol is not a constructor");return cd(t)};yNe.exports=cd=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return mNe?bF(t):(r=GXt(m5.prototype),t=t===void 0?"":String(t),zZ(r,{__description__:k1("",t),__name__:k1("",NXt(t))}))};UXt(cd);VXt(cd);zZ(m5.prototype,{constructor:k1(cd),toString:k1("",function(){return this.__name__})});zZ(cd.prototype,{toString:k1(function(){return"Symbol ("+IZ(this).__description__+")"}),valueOf:k1(function(){return IZ(this)})});wF(cd.prototype,cd.toPrimitive,k1("",function(){var e=IZ(this);return typeof e=="symbol"?e:e.toString()}));wF(cd.prototype,cd.toStringTag,k1("c","Symbol"));wF(m5.prototype,cd.toStringTag,k1("c",cd.prototype[cd.toStringTag]));wF(m5.prototype,cd.toPrimitive,k1("c",cd.prototype[cd.toPrimitive]))});var Sy=fe((J4r,_Ne)=>{"use strict";_Ne.exports=nNe()()?LM().Symbol:xNe()});var wNe=fe((Q4r,bNe)=>{"use strict";var HXt=Pg();bNe.exports=function(){return HXt(this).length=0,this}});var y5=fe((eTr,TNe)=>{"use strict";TNe.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var MNe=fe((tTr,ANe)=>{"use strict";var jXt=d_(),WXt=kZ(),YXt=Object.prototype.toString;ANe.exports=function(e){if(!jXt(e))return null;if(WXt(e)){var t=e.toString;if(typeof t!="function"||t===YXt)return null}try{return""+e}catch(r){return null}}});var ENe=fe((rTr,SNe)=>{"use strict";SNe.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var CNe=fe((nTr,kNe)=>{"use strict";var XXt=ENe(),ZXt=/[\n\r\u2028\u2029]/g;kNe.exports=function(e){var t=XXt(e);return t===null?"":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(ZXt,function(r){switch(r){case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),t)}});var PNe=fe((iTr,LNe)=>{"use strict";var $Xt=MNe(),KXt=CNe();LNe.exports=function(e,t,r){r&&r.errorMessage&&(e=$Xt(r.errorMessage));var n=e.indexOf("%v"),a=n>-1?KXt(t):null;if(r&&r.name){var i=e.indexOf("%n");if(i>-1){if(n>-1){var o,s,l,u;return i>n?(o=a,l=n,s=r.name,u=i):(o=r.name,l=i,s=a,u=n),e.slice(0,l)+o+e.slice(l+2,u)+s+e.slice(u+2)}return e.slice(0,i)+r.name+e.slice(i+2)}}return n>-1?e.slice(0,n)+a+e.slice(n+2):e}});var qZ=fe((aTr,FNe)=>{"use strict";var JXt=d_(),QXt=PNe();FNe.exports=function(e,t,r){if(r&&!JXt(e)){if("default"in r)return r.default;if(r.isOptional)return null}var n=r&&r.Error||TypeError,a=new n(QXt(t,e,r));throw r&&r.errorCode&&(a.code=r.errorCode),a}});var RNe=fe((oTr,DNe)=>{"use strict";var eZt=qZ(),tZt=d_();DNe.exports=function(e){if(tZt(e))return e;var t=arguments[1],r=t&&t.name?"Expected a value for %n, received %v":"Cannot use %v";return eZt(e,r,t)}});var zNe=fe((sTr,INe)=>{"use strict";var rZt=qZ(),nZt=CZ();INe.exports=function(e){if(nZt(e))return e;var t=arguments[1],r=t&&t.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return rZt(e,r,t)}});var BNe=fe((lTr,qNe)=>{"use strict";qNe.exports=function(){var e=Array.from,t,r;return typeof e!="function"?!1:(t=["raz","dwa"],r=e(t),!!(r&&r!==t&&r[1]==="dwa"))}});var NNe=fe((uTr,ONe)=>{"use strict";var iZt=Object.prototype.toString,aZt=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);ONe.exports=function(e){return typeof e=="function"&&aZt(iZt.call(e))}});var VNe=fe((cTr,UNe)=>{"use strict";UNe.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var HNe=fe((fTr,GNe)=>{"use strict";GNe.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var WNe=fe((hTr,jNe)=>{"use strict";jNe.exports=VNe()()?Math.sign:HNe()});var XNe=fe((dTr,YNe)=>{"use strict";var oZt=WNe(),sZt=Math.abs,lZt=Math.floor;YNe.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:oZt(e)*lZt(sZt(e)))}});var $Ne=fe((vTr,ZNe)=>{"use strict";var uZt=XNe(),cZt=Math.max;ZNe.exports=function(e){return cZt(0,uZt(e))}});var eUe=fe((pTr,QNe)=>{"use strict";var fZt=Sy().iterator,hZt=kM(),dZt=NNe(),vZt=$Ne(),KNe=y5(),pZt=Pg(),gZt=My(),mZt=CM(),JNe=Array.isArray,BZ=Function.prototype.call,v_={configurable:!0,enumerable:!0,writable:!0,value:null},OZ=Object.defineProperty;QNe.exports=function(e){var t=arguments[1],r=arguments[2],n,a,i,o,s,l,u,c,f,v;if(e=Object(pZt(e)),gZt(t)&&KNe(t),!this||this===Array||!dZt(this)){if(!t){if(hZt(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(JNe(e)){for(o=new Array(s=e.length),a=0;a=55296&&l<=56319&&(v+=e[++a])),v=t?BZ.call(t,r,v,i):v,n?(v_.value=v,OZ(o,i,v_)):o[i]=v,++i;s=i}}if(s===void 0)for(s=vZt(e.length),n&&(o=new n(s)),a=0;a{"use strict";tUe.exports=BNe()()?Array.from:eUe()});var iUe=fe((mTr,nUe)=>{"use strict";var yZt=rUe(),xZt=xF(),_Zt=Pg();nUe.exports=function(e){var t=Object(_Zt(e)),r=arguments[1],n=Object(arguments[2]);if(t!==e&&!r)return t;var a={};return r?yZt(r,function(i){(n.ensure||i in e)&&(a[i]=e[i])}):xZt(a,e),a}});var sUe=fe((yTr,oUe)=>{"use strict";var bZt=y5(),wZt=Pg(),TZt=Function.prototype.bind,aUe=Function.prototype.call,AZt=Object.keys,MZt=Object.prototype.propertyIsEnumerable;oUe.exports=function(e,t){return function(r,n){var a,i=arguments[2],o=arguments[3];return r=Object(wZt(r)),bZt(n),a=AZt(r),o&&a.sort(typeof o=="function"?TZt.call(o,r):void 0),typeof e!="function"&&(e=a[e]),aUe.call(e,a,function(s,l){return MZt.call(r,s)?aUe.call(n,i,r[s],s,r,l):t})}}});var uUe=fe((xTr,lUe)=>{"use strict";lUe.exports=sUe()("forEach")});var fUe=fe((_Tr,cUe)=>{"use strict";var SZt=y5(),EZt=uUe(),kZt=Function.prototype.call;cUe.exports=function(e,t){var r={},n=arguments[2];return SZt(t),EZt(e,function(a,i,o,s){r[i]=kZt.call(t,n,a,i,o,s)}),r}});var pUe=fe((bTr,vUe)=>{"use strict";var CZt=d_(),LZt=RNe(),hUe=zNe(),PZt=iUe(),FZt=LZ(),DZt=fUe(),RZt=Function.prototype.bind,IZt=Object.defineProperty,zZt=Object.prototype.hasOwnProperty,dUe;dUe=function(e,t,r){var n=LZt(t)&&hUe(t.value),a;return a=PZt(t),delete a.writable,delete a.value,a.get=function(){return!r.overwriteDefinition&&zZt.call(this,e)?n:(t.value=RZt.call(n,r.resolveContext?r.resolveContext(this):this),IZt(this,e,t),this[e])},a};vUe.exports=function(e){var t=FZt(arguments[1]);return CZt(t.resolveContext)&&hUe(t.resolveContext),DZt(e,function(r,n){return dUe(n,r,t)})}});var NZ=fe((wTr,xUe)=>{"use strict";var qZt=wNe(),BZt=xF(),OZt=y5(),NZt=Pg(),h0=Fg(),UZt=pUe(),gUe=Sy(),mUe=Object.defineProperty,yUe=Object.defineProperties,FM;xUe.exports=FM=function(e,t){if(!(this instanceof FM))throw new TypeError("Constructor requires 'new'");yUe(this,{__list__:h0("w",NZt(e)),__context__:h0("w",t),__nextIndex__:h0("w",0)}),t&&(OZt(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))};delete FM.prototype.constructor;yUe(FM.prototype,BZt({_next:h0(function(){var e;if(this.__list__){if(this.__redo__&&(e=this.__redo__.shift(),e!==void 0))return e;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){mUe(this,"__redo__",h0("c",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:h0(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(r,n){r>e&&(this.__redo__[n]=--r)},this)))}),_onClear:h0(function(){this.__redo__&&qZt.call(this.__redo__),this.__nextIndex__=0})})));mUe(FM.prototype,gUe.iterator,h0(function(){return this}))});var AUe=fe((TTr,TUe)=>{"use strict";var _Ue=yF(),bUe=FZ(),UZ=Fg(),VZt=Sy(),VZ=NZ(),wUe=Object.defineProperty,x5;x5=TUe.exports=function(e,t){if(!(this instanceof x5))throw new TypeError("Constructor requires 'new'");VZ.call(this,e),t?bUe.call(t,"key+value")?t="key+value":bUe.call(t,"key")?t="key":t="value":t="value",wUe(this,"__kind__",UZ("",t))};_Ue&&_Ue(x5,VZ);delete x5.prototype.constructor;x5.prototype=Object.create(VZ.prototype,{_resolve:UZ(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});wUe(x5.prototype,VZt.toStringTag,UZ("c","Array Iterator"))});var kUe=fe((ATr,EUe)=>{"use strict";var MUe=yF(),TF=Fg(),GZt=Sy(),GZ=NZ(),SUe=Object.defineProperty,_5;_5=EUe.exports=function(e){if(!(this instanceof _5))throw new TypeError("Constructor requires 'new'");e=String(e),GZ.call(this,e),SUe(this,"__length__",TF("",e.length))};MUe&&MUe(_5,GZ);delete _5.prototype.constructor;_5.prototype=Object.create(GZ.prototype,{_next:TF(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});SUe(_5.prototype,GZt.toStringTag,TF("c","String Iterator"))});var LUe=fe((MTr,CUe)=>{"use strict";var HZt=kM(),jZt=My(),WZt=CM(),YZt=Sy().iterator,XZt=Array.isArray;CUe.exports=function(e){return jZt(e)?XZt(e)||WZt(e)||HZt(e)?!0:typeof e[YZt]=="function":!1}});var FUe=fe((STr,PUe)=>{"use strict";var ZZt=LUe();PUe.exports=function(e){if(!ZZt(e))throw new TypeError(e+" is not iterable");return e}});var HZ=fe((ETr,IUe)=>{"use strict";var $Zt=kM(),KZt=CM(),DUe=AUe(),JZt=kUe(),QZt=FUe(),RUe=Sy().iterator;IUe.exports=function(e){return typeof QZt(e)[RUe]=="function"?e[RUe]():$Zt(e)?new DUe(e):KZt(e)?new JZt(e):new DUe(e)}});var qUe=fe((kTr,zUe)=>{"use strict";var e$t=kM(),t$t=y5(),r$t=CM(),n$t=HZ(),i$t=Array.isArray,jZ=Function.prototype.call,a$t=Array.prototype.some;zUe.exports=function(e,t){var r,n=arguments[2],a,i,o,s,l,u,c;if(i$t(e)||e$t(e)?r="array":r$t(e)?r="string":e=n$t(e),t$t(t),i=function(){o=!0},r==="array"){a$t.call(e,function(f){return jZ.call(t,n,f,i),o});return}if(r==="string"){for(l=e.length,s=0;s=55296&&c<=56319&&(u+=e[++s])),jZ.call(t,n,u,i),!o);++s);return}for(a=e.next();!a.done;){if(jZ.call(t,n,a.value,i),o)return;a=e.next()}}});var OUe=fe((CTr,BUe)=>{"use strict";BUe.exports=(function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"})()});var VUe=fe((LTr,UUe)=>{"use strict";var o$t=My(),MF=yF(),AF=pOe(),s$t=Pg(),l$t=mOe(),Dg=Fg(),u$t=HZ(),c$t=qUe(),f$t=Sy().toStringTag,NUe=OUe(),h$t=Array.isArray,YZ=Object.defineProperty,WZ=Object.prototype.hasOwnProperty,d$t=Object.getPrototypeOf,Ey;UUe.exports=Ey=function(){var e=arguments[0],t;if(!(this instanceof Ey))throw new TypeError("Constructor requires 'new'");return t=NUe&&MF&&WeakMap!==Ey?MF(new WeakMap,d$t(this)):this,o$t(e)&&(h$t(e)||(e=u$t(e))),YZ(t,"__weakMapData__",Dg("c","$weakMap$"+l$t())),e&&c$t(e,function(r){s$t(r),t.set(r[0],r[1])}),t};NUe&&(MF&&MF(Ey,WeakMap),Ey.prototype=Object.create(WeakMap.prototype,{constructor:Dg(Ey)}));Object.defineProperties(Ey.prototype,{delete:Dg(function(e){return WZ.call(AF(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:Dg(function(e){if(WZ.call(AF(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:Dg(function(e){return WZ.call(AF(e),this.__weakMapData__)}),set:Dg(function(e,t){return YZ(AF(e),this.__weakMapData__,Dg("c",t)),this}),toString:Dg(function(){return"[object WeakMap]"})});YZ(Ey.prototype,f$t,Dg("c","WeakMap"))});var XZ=fe((PTr,GUe)=>{"use strict";GUe.exports=rOe()()?WeakMap:VUe()});var jUe=fe((FTr,HUe)=>{"use strict";HUe.exports=function(e,t,r){if(typeof Array.prototype.findIndex=="function")return e.findIndex(t,r);if(typeof t!="function")throw new TypeError("predicate must be a function");var n=Object(e),a=n.length;if(a===0)return-1;for(var i=0;i{"use strict";var SF=wM(),v$t=l_(),$Z=Zc(),p$t=E1(),g$t=u_(),WUe=JBe(),m$t=eOe(),{float32:y$t,fract32:ZZ}=uF(),x$t=XZ(),YUe=u5(),_$t=jUe(),b$t=` +`]),this.drawCircle=e(g)}rh.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4};rh.prototype.render=function(){return arguments.length&&this.update(...arguments),this.draw(),this};rh.prototype.draw=function(){for(var e=arguments.length,t=new Array(e),r=0;r{this.drawItem(i)});return this};rh.prototype.drawItem=function(e,t){let{groups:r}=this,n=r[e];if(typeof t=="number"&&(e=t,n=r[t],t=null),!(n&&n.count&&n.opacity))return;n.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,n,t));let a=[];for(let i=1;i{let f=n[c];if(u===void 0)return f;u===null?u={positions:null}:typeof u=="function"?u={ondraw:u}:typeof u[0]=="number"&&(u={positions:u}),u=CYt(u,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),u.positions===null&&(u.positions=[]),u.tooManyColors!=null&&(this.tooManyColors=u.tooManyColors),f||(n[c]=f={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:i.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:i.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:i.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:i.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:i.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},u=Object.assign({},rh.defaults,u)),u.positions&&!("marker"in u)&&(u.marker=f.marker,delete f.marker),u.marker&&!("positions"in u)&&(u.positions=f.positions,delete f.positions);let v=0,g=0;if(LYt(f,u,[{snap:!0,size:(p,_)=>(p==null&&(p=rh.defaults.size),v+=p&&p.length?1:0,p),borderSize:(p,_)=>(p==null&&(p=rh.defaults.borderSize),v+=p&&p.length?1:0,p),opacity:parseFloat,color:(p,_)=>(p==null&&(p=rh.defaults.color),p=this.updateColor(p),g++,p),borderColor:(p,_)=>(p==null&&(p=rh.defaults.borderColor),p=this.updateColor(p),g++,p),bounds:(p,_,x)=>("range"in x||(x.range=null),p),positions:(p,_,x)=>{let{snap:y}=_,{positionBuffer:C,positionFractBuffer:k,selectionBuffer:S}=_;if(p.x||p.y)return p.x.length?_.xAttr={buffer:i.buffer(p.x),offset:0,stride:4,count:p.x.length}:_.xAttr={buffer:p.x.buffer,offset:p.x.offset*4||0,stride:(p.x.stride||1)*4,count:p.x.count},p.y.length?_.yAttr={buffer:i.buffer(p.y),offset:0,stride:4,count:p.y.length}:_.yAttr={buffer:p.y.buffer,offset:p.y.offset*4||0,stride:(p.y.stride||1)*4,count:p.y.count},_.count=Math.max(_.xAttr.count,_.yAttr.count),p;p=PYt(p,"float64");let L=_.count=Math.floor(p.length/2),w=_.bounds=L?SYt(p,2):null;if(!x.range&&!_.range&&(delete _.range,x.range=w),!x.marker&&!_.marker&&(delete _.marker,x.marker=null),y&&(y===!0||L>y)?_.tree=kYt(p,{bounds:w}):y&&y.length&&(_.tree=y),_.tree){let m={primitive:"points",usage:"static",data:_.tree,type:"uint32"};_.elements?_.elements(m):_.elements=i.elements(m)}var T=fF.float32(p);C({data:T,usage:"dynamic"});var A=fF.fract32(p,T);return k({data:A,usage:"dynamic"}),S({data:new Uint8Array(L),type:"uint8",usage:"stream"}),p}},{marker:(p,_,x)=>{let{activation:y}=_;if(y.forEach(C=>C&&C.destroy&&C.destroy()),y.length=0,!p||typeof p[0]=="number"){let C=this.addMarker(p);y[C]=!0}else{let C=[];for(let k=0,S=Math.min(p.length,_.count);k{let y=_.bounds;if(y)return p||(p=y),_.scale=[1/(p[2]-p[0]),1/(p[3]-p[1])],_.translate=[-p[0],-p[1]],_.scaleFract=fF.fract(_.scale),_.translateFract=fF.fract(_.translate),p},viewport:p=>FYt(p||[a.drawingBufferWidth,a.drawingBufferHeight])}]),v){let{count:p,size:_,borderSize:x,sizeBuffer:y}=f,C=new Uint8Array(p*2);if(_.length||x.length)for(let k=0;k=0)return a;let i;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)i=e;else{i=new Uint8Array(e.length);for(let s=0,l=e.length;sn*4&&(this.tooManyColors=!0),this.updatePalette(r),a.length===1?a[0]:a};rh.prototype.updatePalette=function(e){if(this.tooManyColors)return;let{maxColors:t,paletteTexture:r}=this,n=Math.ceil(e.length*.25/t);if(n>1){e=e.slice();for(let a=e.length*.25%t;a{e.sizeBuffer.destroy(),e.positionBuffer.destroy(),e.positionFractBuffer.destroy(),e.colorBuffer.destroy(),e.activation.forEach(t=>t&&t.destroy&&t.destroy()),e.selectionBuffer.destroy(),e.elements&&e.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(e=>e&&e.destroy&&e.destroy()),this};var RYt=function(e,t){var r=new DYt(e,t),n=r.render.bind(r);return Object.assign(n,{render:n,update:r.update.bind(r),draw:r.draw.bind(r),destroy:r.destroy.bind(r),regl:r.regl,gl:r.gl,canvas:r.gl.canvas,groups:r.groups,markers:r.markerCache,palette:r.palette}),n};WBe.exports=RYt});var Zc=fe((h4r,XBe)=>{"use strict";var YBe=Object.getOwnPropertySymbols,IYt=Object.prototype.hasOwnProperty,zYt=Object.prototype.propertyIsEnumerable;function qYt(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function BYt(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(i){return t[i]});if(n.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(i){a[i]=i}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}XBe.exports=BYt()?Object.assign:function(e,t){for(var r,n=qYt(e),a,i=1;i{"use strict";TZ.exports=vF;TZ.exports.default=vF;function vF(e,t,r){r=r||2;var n=t&&t.length,a=n?t[0]*r:e.length,i=$Be(e,0,a,r,!0),o=[];if(!i||i.next===i.prev)return o;var s,l,u,c,f,v,g;if(n&&(i=GYt(e,t,i,r)),e.length>80*r){s=u=e[0],l=c=e[1];for(var p=r;pu&&(u=f),v>c&&(c=v);g=Math.max(u-s,c-l),g=g!==0?32767/g:0}return MM(i,o,r,s,l,g,0),o}function $Be(e,t,r,n,a){var i,o;if(a===wZ(e,t,r,n)>0)for(i=t;i=t;i-=n)o=ZBe(i,e[i],e[i+1],o);return o&&pF(o,o.next)&&(EM(o),o=o.next),o}function h_(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(pF(r,r.next)||Uu(r.prev,r,r.next)===0)){if(EM(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function MM(e,t,r,n,a,i,o){if(e){!o&&i&&XYt(e,n,a,i);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,i?NYt(e,n,a,i):OYt(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),EM(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=UYt(h_(e),t,r),MM(e,t,r,n,a,i,2)):o===2&&VYt(e,t,r,n,a,i):MM(h_(e),t,r,n,a,i,1);break}}}}function OYt(e){var t=e.prev,r=e,n=e.next;if(Uu(t,r,n)>=0)return!1;for(var a=t.x,i=r.x,o=n.x,s=t.y,l=r.y,u=n.y,c=ai?a>o?a:o:i>o?i:o,g=s>l?s>u?s:u:l>u?l:u,p=n.next;p!==t;){if(p.x>=c&&p.x<=v&&p.y>=f&&p.y<=g&&m5(a,s,i,l,o,u,p.x,p.y)&&Uu(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function NYt(e,t,r,n){var a=e.prev,i=e,o=e.next;if(Uu(a,i,o)>=0)return!1;for(var s=a.x,l=i.x,u=o.x,c=a.y,f=i.y,v=o.y,g=sl?s>u?s:u:l>u?l:u,x=c>f?c>v?c:v:f>v?f:v,y=_Z(g,p,t,r,n),C=_Z(_,x,t,r,n),k=e.prevZ,S=e.nextZ;k&&k.z>=y&&S&&S.z<=C;){if(k.x>=g&&k.x<=_&&k.y>=p&&k.y<=x&&k!==a&&k!==o&&m5(s,c,l,f,u,v,k.x,k.y)&&Uu(k.prev,k,k.next)>=0||(k=k.prevZ,S.x>=g&&S.x<=_&&S.y>=p&&S.y<=x&&S!==a&&S!==o&&m5(s,c,l,f,u,v,S.x,S.y)&&Uu(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;k&&k.z>=y;){if(k.x>=g&&k.x<=_&&k.y>=p&&k.y<=x&&k!==a&&k!==o&&m5(s,c,l,f,u,v,k.x,k.y)&&Uu(k.prev,k,k.next)>=0)return!1;k=k.prevZ}for(;S&&S.z<=C;){if(S.x>=g&&S.x<=_&&S.y>=p&&S.y<=x&&S!==a&&S!==o&&m5(s,c,l,f,u,v,S.x,S.y)&&Uu(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function UYt(e,t,r){var n=e;do{var a=n.prev,i=n.next.next;!pF(a,i)&&KBe(a,n,n.next,i)&&SM(a,i)&&SM(i,a)&&(t.push(a.i/r|0),t.push(n.i/r|0),t.push(i.i/r|0),EM(n),EM(n.next),n=e=i),n=n.next}while(n!==e);return h_(n)}function VYt(e,t,r,n,a,i){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&KYt(o,s)){var l=JBe(o,s);o=h_(o,o.next),l=h_(l,l.next),MM(o,t,r,n,a,i,0),MM(l,t,r,n,a,i,0);return}s=s.next}o=o.next}while(o!==e)}function GYt(e,t,r,n){var a=[],i,o,s,l,u;for(i=0,o=t.length;i=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>i&&(i=s,o=r.x=r.x&&r.x>=u&&n!==r.x&&m5(ao.x||r.x===o.x&&YYt(o,r)))&&(o=r,f=v)),r=r.next;while(r!==l);return o}function YYt(e,t){return Uu(e.prev,e,t.prev)<0&&Uu(t.next,e,e.next)<0}function XYt(e,t,r,n){var a=e;do a.z===0&&(a.z=_Z(a.x,a.y,t,r,n)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next;while(a!==e);a.prevZ.nextZ=null,a.prevZ=null,ZYt(a)}function ZYt(e){var t,r,n,a,i,o,s,l,u=1;do{for(r=e,e=null,i=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(a=r,r=r.nextZ,s--):(a=n,n=n.nextZ,l--),i?i.nextZ=a:e=a,a.prevZ=i,i=a;r=n}i.nextZ=null,u*=2}while(o>1);return e}function _Z(e,t,r,n,a){return e=(e-r)*a|0,t=(t-n)*a|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function $Yt(e){var t=e,r=e;do(t.x=(e-o)*(i-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(i-s)>=(a-o)*(n-s)}function KYt(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!JYt(e,t)&&(SM(e,t)&&SM(t,e)&&QYt(e,t)&&(Uu(e.prev,e,t.prev)||Uu(e,t.prev,t))||pF(e,t)&&Uu(e.prev,e,e.next)>0&&Uu(t.prev,t,t.next)>0)}function Uu(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function pF(e,t){return e.x===t.x&&e.y===t.y}function KBe(e,t,r,n){var a=dF(Uu(e,t,r)),i=dF(Uu(e,t,n)),o=dF(Uu(r,n,e)),s=dF(Uu(r,n,t));return!!(a!==i&&o!==s||a===0&&hF(e,r,t)||i===0&&hF(e,n,t)||o===0&&hF(r,e,n)||s===0&&hF(r,t,n))}function hF(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function dF(e){return e>0?1:e<0?-1:0}function JYt(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&KBe(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function SM(e,t){return Uu(e.prev,e,e.next)<0?Uu(e,t,e.next)>=0&&Uu(e,e.prev,t)>=0:Uu(e,t,e.prev)<0||Uu(e,e.next,t)<0}function QYt(e,t){var r=e,n=!1,a=(e.x+t.x)/2,i=(e.y+t.y)/2;do r.y>i!=r.next.y>i&&r.next.y!==r.y&&a<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function JBe(e,t){var r=new bZ(e.i,e.x,e.y),n=new bZ(t.i,t.x,t.y),a=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=a,a.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function ZBe(e,t,r,n){var a=new bZ(e,t,r);return n?(a.next=n.next,a.prev=n,n.next.prev=a,n.next=a):(a.prev=a,a.next=a),a}function EM(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)}function bZ(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}vF.deviation=function(e,t,r,n){var a=t&&t.length,i=a?t[0]*r:e.length,o=Math.abs(wZ(e,0,i,r));if(a)for(var s=0,l=t.length;s0&&(n+=e[a-1].length,r.holes.push(n))}return r}});var tOe=fe((v4r,eOe)=>{"use strict";var eXt=l_();eOe.exports=tXt;function tXt(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=eXt(e,t));for(var n=0;n{"use strict";rOe.exports=function(){var e,t;if(typeof WeakMap!="function")return!1;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(r){return!1}return!(String(e)!=="[object WeakMap]"||typeof e.set!="function"||e.set({},1)!==e||typeof e.delete!="function"||typeof e.has!="function"||e.get(t)!=="one")}});var aOe=fe((g4r,iOe)=>{"use strict";iOe.exports=function(){}});var My=fe((m4r,oOe)=>{"use strict";var rXt=aOe()();oOe.exports=function(e){return e!==rXt&&e!==null}});var AZ=fe((y4r,lOe)=>{"use strict";var nXt=Object.create,iXt=Object.getPrototypeOf,sOe={};lOe.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||nXt;return typeof e!="function"?!1:iXt(e(t(null),sOe))===sOe}});var MZ=fe((x4r,uOe)=>{"use strict";var aXt=My(),oXt={function:!0,object:!0};uOe.exports=function(e){return aXt(e)&&oXt[typeof e]||!1}});var Pg=fe((_4r,cOe)=>{"use strict";var sXt=My();cOe.exports=function(e){if(!sXt(e))throw new TypeError("Cannot use null or undefined");return e}});var hOe=fe((b4r,fOe)=>{"use strict";var SZ=Object.create,gF;AZ()()||(gF=EZ());fOe.exports=(function(){var e,t,r;return!gF||gF.level!==1?SZ:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(n){if(n==="__proto__"){t[n]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}t[n]=r}),Object.defineProperties(e,t),Object.defineProperty(gF,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,a){return SZ(n===null?e:n,a)})})()});var EZ=fe((w4r,dOe)=>{"use strict";var lXt=MZ(),uXt=Pg(),cXt=Object.prototype.isPrototypeOf,fXt=Object.defineProperty,hXt={configurable:!0,enumerable:!1,writable:!0,value:void 0},mF;mF=function(e,t){if(uXt(e),t===null||lXt(t))return e;throw new TypeError("Prototype must be null or an object")};dOe.exports=(function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,a){return r.call(mF(n,a),a),n}):t=function(n,a){return mF(n,a).__proto__=a,n}:t=function n(a,i){var o;return mF(a,i),o=cXt.call(n.nullPolyfill,a),o&&delete n.nullPolyfill.__proto__,i===null&&(i=n.nullPolyfill),a.__proto__=i,o&&fXt(n.nullPolyfill,"__proto__",hXt),a},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null})((function(){var e=Object.create(null),t={},r,n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{r=n.set,r.call(e,t)}catch(a){}if(Object.getPrototypeOf(e)===t)return{set:r,level:2}}return e.__proto__=t,Object.getPrototypeOf(e)===t?{level:2}:(e={},e.__proto__=t,Object.getPrototypeOf(e)===t?{level:1}:!1)})());hOe()});var yF=fe((T4r,vOe)=>{"use strict";vOe.exports=AZ()()?Object.setPrototypeOf:EZ()});var gOe=fe((A4r,pOe)=>{"use strict";var dXt=MZ();pOe.exports=function(e){if(!dXt(e))throw new TypeError(e+" is not an Object");return e}});var yOe=fe((M4r,mOe)=>{"use strict";var vXt=Object.create(null),pXt=Math.random;mOe.exports=function(){var e;do e=pXt().toString(36).slice(2);while(vXt[e]);return e}});var d_=fe((S4r,xOe)=>{"use strict";var gXt=void 0;xOe.exports=function(e){return e!==gXt&&e!==null}});var kZ=fe((E4r,_Oe)=>{"use strict";var mXt=d_(),yXt={object:!0,function:!0,undefined:!0};_Oe.exports=function(e){return mXt(e)?hasOwnProperty.call(yXt,typeof e):!1}});var wOe=fe((k4r,bOe)=>{"use strict";var xXt=kZ();bOe.exports=function(e){if(!xXt(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var AOe=fe((C4r,TOe)=>{"use strict";var _Xt=wOe();TOe.exports=function(e){if(typeof e!="function"||!hasOwnProperty.call(e,"length"))return!1;try{if(typeof e.length!="number"||typeof e.call!="function"||typeof e.apply!="function")return!1}catch(t){return!1}return!_Xt(e)}});var CZ=fe((L4r,MOe)=>{"use strict";var bXt=AOe(),wXt=/^\s*class[\s{/}]/,TXt=Function.prototype.toString;MOe.exports=function(e){return!(!bXt(e)||wXt.test(TXt.call(e)))}});var EOe=fe((P4r,SOe)=>{"use strict";SOe.exports=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}});var COe=fe((F4r,kOe)=>{"use strict";kOe.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var POe=fe((D4r,LOe)=>{"use strict";var AXt=My(),MXt=Object.keys;LOe.exports=function(e){return MXt(AXt(e)?Object(e):e)}});var DOe=fe((R4r,FOe)=>{"use strict";FOe.exports=COe()()?Object.keys:POe()});var IOe=fe((I4r,ROe)=>{"use strict";var SXt=DOe(),EXt=Pg(),kXt=Math.max;ROe.exports=function(e,t){var r,n,a=kXt(arguments.length,2),i;for(e=Object(EXt(e)),i=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n{"use strict";zOe.exports=EOe()()?Object.assign:IOe()});var LZ=fe((q4r,qOe)=>{"use strict";var CXt=My(),LXt=Array.prototype.forEach,PXt=Object.create,FXt=function(e,t){var r;for(r in e)t[r]=e[r]};qOe.exports=function(e){var t=PXt(null);return LXt.call(arguments,function(r){CXt(r)&&FXt(Object(r),t)}),t}});var OOe=fe((B4r,BOe)=>{"use strict";var PZ="razdwatrzy";BOe.exports=function(){return typeof PZ.contains!="function"?!1:PZ.contains("dwa")===!0&&PZ.contains("foo")===!1}});var UOe=fe((O4r,NOe)=>{"use strict";var DXt=String.prototype.indexOf;NOe.exports=function(e){return DXt.call(this,e,arguments[1])>-1}});var FZ=fe((N4r,VOe)=>{"use strict";VOe.exports=OOe()()?String.prototype.contains:UOe()});var Fg=fe((U4r,WOe)=>{"use strict";var _F=d_(),GOe=CZ(),HOe=xF(),jOe=LZ(),kM=FZ(),RXt=WOe.exports=function(e,t){var r,n,a,i,o;return arguments.length<2||typeof e!="string"?(i=t,t=e,e=null):i=arguments[2],_F(e)?(r=kM.call(e,"c"),n=kM.call(e,"e"),a=kM.call(e,"w")):(r=a=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:a},i?HOe(jOe(i),o):o};RXt.gs=function(e,t,r){var n,a,i,o;return typeof e!="string"?(i=r,r=t,t=e,e=null):i=arguments[3],_F(t)?GOe(t)?_F(r)?GOe(r)||(i=r,r=void 0):r=void 0:(i=t,t=r=void 0):t=void 0,_F(e)?(n=kM.call(e,"c"),a=kM.call(e,"e")):(n=!0,a=!1),o={get:t,set:r,configurable:n,enumerable:a},i?HOe(jOe(i),o):o}});var CM=fe((V4r,XOe)=>{"use strict";var YOe=Object.prototype.toString,IXt=YOe.call((function(){return arguments})());XOe.exports=function(e){return YOe.call(e)===IXt}});var LM=fe((G4r,$Oe)=>{"use strict";var ZOe=Object.prototype.toString,zXt=ZOe.call("");$Oe.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||ZOe.call(e)===zXt)||!1}});var JOe=fe((H4r,KOe)=>{"use strict";KOe.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var tNe=fe((j4r,eNe)=>{var QOe=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};eNe.exports=(function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return QOe()}try{return __global__||QOe()}finally{delete Object.prototype.__global__}})()});var PM=fe((W4r,rNe)=>{"use strict";rNe.exports=JOe()()?globalThis:tNe()});var iNe=fe((Y4r,nNe)=>{"use strict";var qXt=PM(),DZ={object:!0,symbol:!0};nNe.exports=function(){var e=qXt.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!DZ[typeof e.iterator]||!DZ[typeof e.toPrimitive]||!DZ[typeof e.toStringTag])}});var oNe=fe((X4r,aNe)=>{"use strict";aNe.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var RZ=fe((Z4r,sNe)=>{"use strict";var BXt=oNe();sNe.exports=function(e){if(!BXt(e))throw new TypeError(e+" is not a symbol");return e}});var hNe=fe(($4r,fNe)=>{"use strict";var lNe=Fg(),OXt=Object.create,uNe=Object.defineProperty,NXt=Object.prototype,cNe=OXt(null);fNe.exports=function(e){for(var t=0,r,n;cNe[e+(t||"")];)++t;return e+=t||"",cNe[e]=!0,r="@@"+e,uNe(NXt,r,lNe.gs(null,function(a){n||(n=!0,uNe(this,r,lNe(a)),n=!1)})),r}});var vNe=fe((K4r,dNe)=>{"use strict";var Fp=Fg(),lc=PM().Symbol;dNe.exports=function(e){return Object.defineProperties(e,{hasInstance:Fp("",lc&&lc.hasInstance||e("hasInstance")),isConcatSpreadable:Fp("",lc&&lc.isConcatSpreadable||e("isConcatSpreadable")),iterator:Fp("",lc&&lc.iterator||e("iterator")),match:Fp("",lc&&lc.match||e("match")),replace:Fp("",lc&&lc.replace||e("replace")),search:Fp("",lc&&lc.search||e("search")),species:Fp("",lc&&lc.species||e("species")),split:Fp("",lc&&lc.split||e("split")),toPrimitive:Fp("",lc&&lc.toPrimitive||e("toPrimitive")),toStringTag:Fp("",lc&&lc.toStringTag||e("toStringTag")),unscopables:Fp("",lc&&lc.unscopables||e("unscopables"))})}});var mNe=fe((J4r,gNe)=>{"use strict";var pNe=Fg(),UXt=RZ(),FM=Object.create(null);gNe.exports=function(e){return Object.defineProperties(e,{for:pNe(function(t){return FM[t]?FM[t]:FM[t]=e(String(t))}),keyFor:pNe(function(t){var r;UXt(t);for(r in FM)if(FM[r]===t)return r})})}});var _Ne=fe((Q4r,xNe)=>{"use strict";var k1=Fg(),IZ=RZ(),bF=PM().Symbol,VXt=hNe(),GXt=vNe(),HXt=mNe(),jXt=Object.create,zZ=Object.defineProperties,wF=Object.defineProperty,cd,y5,yNe;if(typeof bF=="function")try{String(bF()),yNe=!0}catch(e){}else bF=null;y5=function(t){if(this instanceof y5)throw new TypeError("Symbol is not a constructor");return cd(t)};xNe.exports=cd=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return yNe?bF(t):(r=jXt(y5.prototype),t=t===void 0?"":String(t),zZ(r,{__description__:k1("",t),__name__:k1("",VXt(t))}))};GXt(cd);HXt(cd);zZ(y5.prototype,{constructor:k1(cd),toString:k1("",function(){return this.__name__})});zZ(cd.prototype,{toString:k1(function(){return"Symbol ("+IZ(this).__description__+")"}),valueOf:k1(function(){return IZ(this)})});wF(cd.prototype,cd.toPrimitive,k1("",function(){var e=IZ(this);return typeof e=="symbol"?e:e.toString()}));wF(cd.prototype,cd.toStringTag,k1("c","Symbol"));wF(y5.prototype,cd.toStringTag,k1("c",cd.prototype[cd.toStringTag]));wF(y5.prototype,cd.toPrimitive,k1("c",cd.prototype[cd.toPrimitive]))});var Sy=fe((eTr,bNe)=>{"use strict";bNe.exports=iNe()()?PM().Symbol:_Ne()});var TNe=fe((tTr,wNe)=>{"use strict";var WXt=Pg();wNe.exports=function(){return WXt(this).length=0,this}});var x5=fe((rTr,ANe)=>{"use strict";ANe.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var SNe=fe((nTr,MNe)=>{"use strict";var YXt=d_(),XXt=kZ(),ZXt=Object.prototype.toString;MNe.exports=function(e){if(!YXt(e))return null;if(XXt(e)){var t=e.toString;if(typeof t!="function"||t===ZXt)return null}try{return""+e}catch(r){return null}}});var kNe=fe((iTr,ENe)=>{"use strict";ENe.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var LNe=fe((aTr,CNe)=>{"use strict";var $Xt=kNe(),KXt=/[\n\r\u2028\u2029]/g;CNe.exports=function(e){var t=$Xt(e);return t===null?"":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(KXt,function(r){switch(r){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),t)}});var FNe=fe((oTr,PNe)=>{"use strict";var JXt=SNe(),QXt=LNe();PNe.exports=function(e,t,r){r&&r.errorMessage&&(e=JXt(r.errorMessage));var n=e.indexOf("%v"),a=n>-1?QXt(t):null;if(r&&r.name){var i=e.indexOf("%n");if(i>-1){if(n>-1){var o,s,l,u;return i>n?(o=a,l=n,s=r.name,u=i):(o=r.name,l=i,s=a,u=n),e.slice(0,l)+o+e.slice(l+2,u)+s+e.slice(u+2)}return e.slice(0,i)+r.name+e.slice(i+2)}}return n>-1?e.slice(0,n)+a+e.slice(n+2):e}});var qZ=fe((sTr,DNe)=>{"use strict";var eZt=d_(),tZt=FNe();DNe.exports=function(e,t,r){if(r&&!eZt(e)){if("default"in r)return r.default;if(r.isOptional)return null}var n=r&&r.Error||TypeError,a=new n(tZt(t,e,r));throw r&&r.errorCode&&(a.code=r.errorCode),a}});var INe=fe((lTr,RNe)=>{"use strict";var rZt=qZ(),nZt=d_();RNe.exports=function(e){if(nZt(e))return e;var t=arguments[1],r=t&&t.name?"Expected a value for %n, received %v":"Cannot use %v";return rZt(e,r,t)}});var qNe=fe((uTr,zNe)=>{"use strict";var iZt=qZ(),aZt=CZ();zNe.exports=function(e){if(aZt(e))return e;var t=arguments[1],r=t&&t.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return iZt(e,r,t)}});var ONe=fe((cTr,BNe)=>{"use strict";BNe.exports=function(){var e=Array.from,t,r;return typeof e!="function"?!1:(t=["raz","dwa"],r=e(t),!!(r&&r!==t&&r[1]==="dwa"))}});var UNe=fe((fTr,NNe)=>{"use strict";var oZt=Object.prototype.toString,sZt=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);NNe.exports=function(e){return typeof e=="function"&&sZt(oZt.call(e))}});var GNe=fe((hTr,VNe)=>{"use strict";VNe.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var jNe=fe((dTr,HNe)=>{"use strict";HNe.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var YNe=fe((vTr,WNe)=>{"use strict";WNe.exports=GNe()()?Math.sign:jNe()});var ZNe=fe((pTr,XNe)=>{"use strict";var lZt=YNe(),uZt=Math.abs,cZt=Math.floor;XNe.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:lZt(e)*cZt(uZt(e)))}});var KNe=fe((gTr,$Ne)=>{"use strict";var fZt=ZNe(),hZt=Math.max;$Ne.exports=function(e){return hZt(0,fZt(e))}});var tUe=fe((mTr,eUe)=>{"use strict";var dZt=Sy().iterator,vZt=CM(),pZt=UNe(),gZt=KNe(),JNe=x5(),mZt=Pg(),yZt=My(),xZt=LM(),QNe=Array.isArray,BZ=Function.prototype.call,v_={configurable:!0,enumerable:!0,writable:!0,value:null},OZ=Object.defineProperty;eUe.exports=function(e){var t=arguments[1],r=arguments[2],n,a,i,o,s,l,u,c,f,v;if(e=Object(mZt(e)),yZt(t)&&JNe(t),!this||this===Array||!pZt(this)){if(!t){if(vZt(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(QNe(e)){for(o=new Array(s=e.length),a=0;a=55296&&l<=56319&&(v+=e[++a])),v=t?BZ.call(t,r,v,i):v,n?(v_.value=v,OZ(o,i,v_)):o[i]=v,++i;s=i}}if(s===void 0)for(s=gZt(e.length),n&&(o=new n(s)),a=0;a{"use strict";rUe.exports=ONe()()?Array.from:tUe()});var aUe=fe((xTr,iUe)=>{"use strict";var _Zt=nUe(),bZt=xF(),wZt=Pg();iUe.exports=function(e){var t=Object(wZt(e)),r=arguments[1],n=Object(arguments[2]);if(t!==e&&!r)return t;var a={};return r?_Zt(r,function(i){(n.ensure||i in e)&&(a[i]=e[i])}):bZt(a,e),a}});var lUe=fe((_Tr,sUe)=>{"use strict";var TZt=x5(),AZt=Pg(),MZt=Function.prototype.bind,oUe=Function.prototype.call,SZt=Object.keys,EZt=Object.prototype.propertyIsEnumerable;sUe.exports=function(e,t){return function(r,n){var a,i=arguments[2],o=arguments[3];return r=Object(AZt(r)),TZt(n),a=SZt(r),o&&a.sort(typeof o=="function"?MZt.call(o,r):void 0),typeof e!="function"&&(e=a[e]),oUe.call(e,a,function(s,l){return EZt.call(r,s)?oUe.call(n,i,r[s],s,r,l):t})}}});var cUe=fe((bTr,uUe)=>{"use strict";uUe.exports=lUe()("forEach")});var hUe=fe((wTr,fUe)=>{"use strict";var kZt=x5(),CZt=cUe(),LZt=Function.prototype.call;fUe.exports=function(e,t){var r={},n=arguments[2];return kZt(t),CZt(e,function(a,i,o,s){r[i]=LZt.call(t,n,a,i,o,s)}),r}});var gUe=fe((TTr,pUe)=>{"use strict";var PZt=d_(),FZt=INe(),dUe=qNe(),DZt=aUe(),RZt=LZ(),IZt=hUe(),zZt=Function.prototype.bind,qZt=Object.defineProperty,BZt=Object.prototype.hasOwnProperty,vUe;vUe=function(e,t,r){var n=FZt(t)&&dUe(t.value),a;return a=DZt(t),delete a.writable,delete a.value,a.get=function(){return!r.overwriteDefinition&&BZt.call(this,e)?n:(t.value=zZt.call(n,r.resolveContext?r.resolveContext(this):this),qZt(this,e,t),this[e])},a};pUe.exports=function(e){var t=RZt(arguments[1]);return PZt(t.resolveContext)&&dUe(t.resolveContext),IZt(e,function(r,n){return vUe(n,r,t)})}});var NZ=fe((ATr,_Ue)=>{"use strict";var OZt=TNe(),NZt=xF(),UZt=x5(),VZt=Pg(),h0=Fg(),GZt=gUe(),mUe=Sy(),yUe=Object.defineProperty,xUe=Object.defineProperties,DM;_Ue.exports=DM=function(e,t){if(!(this instanceof DM))throw new TypeError("Constructor requires 'new'");xUe(this,{__list__:h0("w",VZt(e)),__context__:h0("w",t),__nextIndex__:h0("w",0)}),t&&(UZt(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))};delete DM.prototype.constructor;xUe(DM.prototype,NZt({_next:h0(function(){var e;if(this.__list__){if(this.__redo__&&(e=this.__redo__.shift(),e!==void 0))return e;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){yUe(this,"__redo__",h0("c",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:h0(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(r,n){r>e&&(this.__redo__[n]=--r)},this)))}),_onClear:h0(function(){this.__redo__&&OZt.call(this.__redo__),this.__nextIndex__=0})})));yUe(DM.prototype,mUe.iterator,h0(function(){return this}))});var MUe=fe((MTr,AUe)=>{"use strict";var bUe=yF(),wUe=FZ(),UZ=Fg(),HZt=Sy(),VZ=NZ(),TUe=Object.defineProperty,_5;_5=AUe.exports=function(e,t){if(!(this instanceof _5))throw new TypeError("Constructor requires 'new'");VZ.call(this,e),t?wUe.call(t,"key+value")?t="key+value":wUe.call(t,"key")?t="key":t="value":t="value",TUe(this,"__kind__",UZ("",t))};bUe&&bUe(_5,VZ);delete _5.prototype.constructor;_5.prototype=Object.create(VZ.prototype,{_resolve:UZ(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});TUe(_5.prototype,HZt.toStringTag,UZ("c","Array Iterator"))});var CUe=fe((STr,kUe)=>{"use strict";var SUe=yF(),TF=Fg(),jZt=Sy(),GZ=NZ(),EUe=Object.defineProperty,b5;b5=kUe.exports=function(e){if(!(this instanceof b5))throw new TypeError("Constructor requires 'new'");e=String(e),GZ.call(this,e),EUe(this,"__length__",TF("",e.length))};SUe&&SUe(b5,GZ);delete b5.prototype.constructor;b5.prototype=Object.create(GZ.prototype,{_next:TF(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});EUe(b5.prototype,jZt.toStringTag,TF("c","String Iterator"))});var PUe=fe((ETr,LUe)=>{"use strict";var WZt=CM(),YZt=My(),XZt=LM(),ZZt=Sy().iterator,$Zt=Array.isArray;LUe.exports=function(e){return YZt(e)?$Zt(e)||XZt(e)||WZt(e)?!0:typeof e[ZZt]=="function":!1}});var DUe=fe((kTr,FUe)=>{"use strict";var KZt=PUe();FUe.exports=function(e){if(!KZt(e))throw new TypeError(e+" is not iterable");return e}});var HZ=fe((CTr,zUe)=>{"use strict";var JZt=CM(),QZt=LM(),RUe=MUe(),e$t=CUe(),t$t=DUe(),IUe=Sy().iterator;zUe.exports=function(e){return typeof t$t(e)[IUe]=="function"?e[IUe]():JZt(e)?new RUe(e):QZt(e)?new e$t(e):new RUe(e)}});var BUe=fe((LTr,qUe)=>{"use strict";var r$t=CM(),n$t=x5(),i$t=LM(),a$t=HZ(),o$t=Array.isArray,jZ=Function.prototype.call,s$t=Array.prototype.some;qUe.exports=function(e,t){var r,n=arguments[2],a,i,o,s,l,u,c;if(o$t(e)||r$t(e)?r="array":i$t(e)?r="string":e=a$t(e),n$t(t),i=function(){o=!0},r==="array"){s$t.call(e,function(f){return jZ.call(t,n,f,i),o});return}if(r==="string"){for(l=e.length,s=0;s=55296&&c<=56319&&(u+=e[++s])),jZ.call(t,n,u,i),!o);++s);return}for(a=e.next();!a.done;){if(jZ.call(t,n,a.value,i),o)return;a=e.next()}}});var NUe=fe((PTr,OUe)=>{"use strict";OUe.exports=(function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"})()});var GUe=fe((FTr,VUe)=>{"use strict";var l$t=My(),MF=yF(),AF=gOe(),u$t=Pg(),c$t=yOe(),Dg=Fg(),f$t=HZ(),h$t=BUe(),d$t=Sy().toStringTag,UUe=NUe(),v$t=Array.isArray,YZ=Object.defineProperty,WZ=Object.prototype.hasOwnProperty,p$t=Object.getPrototypeOf,Ey;VUe.exports=Ey=function(){var e=arguments[0],t;if(!(this instanceof Ey))throw new TypeError("Constructor requires 'new'");return t=UUe&&MF&&WeakMap!==Ey?MF(new WeakMap,p$t(this)):this,l$t(e)&&(v$t(e)||(e=f$t(e))),YZ(t,"__weakMapData__",Dg("c","$weakMap$"+c$t())),e&&h$t(e,function(r){u$t(r),t.set(r[0],r[1])}),t};UUe&&(MF&&MF(Ey,WeakMap),Ey.prototype=Object.create(WeakMap.prototype,{constructor:Dg(Ey)}));Object.defineProperties(Ey.prototype,{delete:Dg(function(e){return WZ.call(AF(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:Dg(function(e){if(WZ.call(AF(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:Dg(function(e){return WZ.call(AF(e),this.__weakMapData__)}),set:Dg(function(e,t){return YZ(AF(e),this.__weakMapData__,Dg("c",t)),this}),toString:Dg(function(){return"[object WeakMap]"})});YZ(Ey.prototype,d$t,Dg("c","WeakMap"))});var XZ=fe((DTr,HUe)=>{"use strict";HUe.exports=nOe()()?WeakMap:GUe()});var WUe=fe((RTr,jUe)=>{"use strict";jUe.exports=function(e,t,r){if(typeof Array.prototype.findIndex=="function")return e.findIndex(t,r);if(typeof t!="function")throw new TypeError("predicate must be a function");var n=Object(e),a=n.length;if(a===0)return-1;for(var i=0;i{"use strict";var SF=TM(),g$t=l_(),$Z=Zc(),m$t=E1(),y$t=u_(),YUe=QBe(),x$t=tOe(),{float32:_$t,fract32:ZZ}=uF(),b$t=XZ(),XUe=c5(),w$t=WUe(),T$t=` precision highp float; attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract; @@ -2248,7 +2248,7 @@ void main() { fragColor = color / 255.; } -`,w$t=` +`,A$t=` precision highp float; uniform float dashLength, pixelRatio, thickness, opacity, id; @@ -2266,7 +2266,7 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } -`,T$t=` +`,M$t=` precision highp float; attribute vec2 position, positionFract; @@ -2294,14 +2294,14 @@ void main() { fragColor = color / 255.; fragColor.a *= opacity; } -`,A$t=` +`,S$t=` precision highp float; varying vec4 fragColor; void main() { gl_FragColor = fragColor; } -`,M$t=` +`,E$t=` precision highp float; attribute vec2 aCoord, bCoord, nextCoord, prevCoord; @@ -2505,7 +2505,7 @@ void main() { } } } -`,S$t=` +`,k$t=` precision highp float; uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; @@ -2585,7 +2585,7 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } -`;XUe.exports=al;function al(e,t){if(!(this instanceof al))return new al(e,t);if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=al.shaders.has(e)?al.shaders.get(e):al.shaders.set(e,al.createShaders(e)).get(e),this.update(t)}al.dashMult=2;al.maxPatternLength=256;al.precisionThreshold=3e6;al.maxPoints=1e4;al.maxLines=2048;al.shaders=new x$t;al.createShaders=function(e){let t=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),r={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(o,s)=>s.join==="round"?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(o,s)=>!s.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},n=e($Z({vert:b$t,frag:w$t,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r)),a;try{a=e($Z({cull:{enable:!0,face:"back"},vert:M$t,frag:S$t,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch(o){a=n}return{fill:e({primitive:"triangle",elements:(o,s)=>s.triangles,offset:0,vert:T$t,frag:A$t,uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:n,miter:a}};al.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null};al.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};al.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((t,r)=>{if(t&&Array.isArray(t))return this.draw(...t);typeof t=="number"&&(t=this.passes[t]),t&&t.count>1&&t.opacity&&(this.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&this.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>al.precisionThreshold||t.scale[1]*t.viewport.height>al.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=al.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};al.prototype.update=function(e){if(!e)return;e.length!=null?typeof e[0]=="number"&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:r}=this;if(e.forEach((a,i)=>{let o=this.passes[i];if(a!==void 0){if(a===null){this.passes[i]=null;return}if(typeof a[0]=="number"&&(a={positions:a}),a=p$t(a,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),o||(this.passes[i]=o={id:i,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},a=$Z({},al.defaults,a)),a.thickness!=null&&(o.thickness=parseFloat(a.thickness)),a.opacity!=null&&(o.opacity=parseFloat(a.opacity)),a.miterLimit!=null&&(o.miterLimit=parseFloat(a.miterLimit)),a.overlay!=null&&(o.overlay=!!a.overlay,iL-w),C=[],k=0,S=o.hole!=null?o.hole[0]:null;if(S!=null){let L=_$t(y,w=>w>=S);y=y.slice(0,L),y.push(S)}for(let L=0;Lm-S+(y[L]-k)),T=WUe(w,A);T=T.map(m=>m+k+(m+k{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var QUe=fe((RTr,JUe)=>{"use strict";var E$t=l_(),k$t=wM(),C$t=yZ(),L$t=E1(),ZUe=Zc(),$Ue=u_(),{float32:P$t,fract32:JZ}=uF();JUe.exports=F$t;var KUe=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function F$t(e,t){if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let r=e._gl,n,a,i,o,s,l,u={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},c=[];return o=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),a=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),i=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),s=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=e.buffer({usage:"static",type:"float",data:KUe}),p(t),n=e({vert:` +`;ZUe.exports=al;function al(e,t){if(!(this instanceof al))return new al(e,t);if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=al.shaders.has(e)?al.shaders.get(e):al.shaders.set(e,al.createShaders(e)).get(e),this.update(t)}al.dashMult=2;al.maxPatternLength=256;al.precisionThreshold=3e6;al.maxPoints=1e4;al.maxLines=2048;al.shaders=new b$t;al.createShaders=function(e){let t=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),r={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(o,s)=>s.join==="round"?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(o,s)=>!s.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},n=e($Z({vert:T$t,frag:A$t,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r)),a;try{a=e($Z({cull:{enable:!0,face:"back"},vert:E$t,frag:k$t,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch(o){a=n}return{fill:e({primitive:"triangle",elements:(o,s)=>s.triangles,offset:0,vert:M$t,frag:S$t,uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:n,miter:a}};al.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null};al.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};al.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((t,r)=>{if(t&&Array.isArray(t))return this.draw(...t);typeof t=="number"&&(t=this.passes[t]),t&&t.count>1&&t.opacity&&(this.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&this.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>al.precisionThreshold||t.scale[1]*t.viewport.height>al.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=al.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};al.prototype.update=function(e){if(!e)return;e.length!=null?typeof e[0]=="number"&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:r}=this;if(e.forEach((a,i)=>{let o=this.passes[i];if(a!==void 0){if(a===null){this.passes[i]=null;return}if(typeof a[0]=="number"&&(a={positions:a}),a=m$t(a,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),o||(this.passes[i]=o={id:i,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},a=$Z({},al.defaults,a)),a.thickness!=null&&(o.thickness=parseFloat(a.thickness)),a.opacity!=null&&(o.opacity=parseFloat(a.opacity)),a.miterLimit!=null&&(o.miterLimit=parseFloat(a.miterLimit)),a.overlay!=null&&(o.overlay=!!a.overlay,iL-w),C=[],k=0,S=o.hole!=null?o.hole[0]:null;if(S!=null){let L=w$t(y,w=>w>=S);y=y.slice(0,L),y.push(S)}for(let L=0;Lm-S+(y[L]-k)),A=YUe(w,T);A=A.map(m=>m+k+(m+k{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var eVe=fe((zTr,QUe)=>{"use strict";var C$t=l_(),L$t=TM(),P$t=yZ(),F$t=E1(),$Ue=Zc(),KUe=u_(),{float32:D$t,fract32:JZ}=uF();QUe.exports=R$t;var JUe=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function R$t(e,t){if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let r=e._gl,n,a,i,o,s,l,u={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},c=[];return o=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),a=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),i=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),s=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=e.buffer({usage:"static",type:"float",data:JUe}),p(t),n=e({vert:` precision highp float; attribute vec2 position, positionFract; @@ -2629,10 +2629,10 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } - `,uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:(_,y)=>[y.viewport.x,y.viewport.y,_.viewportWidth,_.viewportHeight]},attributes:{color:{buffer:o,offset:(_,y)=>y.offset*4,divisor:1},position:{buffer:a,offset:(_,y)=>y.offset*8,divisor:1},positionFract:{buffer:i,offset:(_,y)=>y.offset*8,divisor:1},error:{buffer:s,offset:(_,y)=>y.offset*16,divisor:1},direction:{buffer:l,stride:24,offset:0},lineOffset:{buffer:l,stride:24,offset:8},capOffset:{buffer:l,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:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:KUe.length}),ZUe(f,{update:p,draw:v,destroy:x,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(_){_?p(_):_===null&&x(),v()}function v(_){if(typeof _=="number")return g(_);_&&!Array.isArray(_)&&(_=[_]),e._refresh(),c.forEach((y,C)=>{if(y){if(_&&(_[C]?y.draw=!0:y.draw=!1),!y.draw){y.draw=!0;return}g(C)}})}function g(_){typeof _=="number"&&(_=c[_]),_!=null&&_&&_.count&&_.color&&_.opacity&&_.positions&&_.positions.length>1&&(_.scaleRatio=[_.scale[0]*_.viewport.width,_.scale[1]*_.viewport.height],n(_),_.after&&_.after(_))}function p(_){if(!_)return;_.length!=null?typeof _[0]=="number"&&(_=[{positions:_}]):Array.isArray(_)||(_=[_]);let y=0,C=0;if(f.groups=c=_.map((L,w)=>{let A=c[w];if(L)typeof L=="function"?L={after:L}:typeof L[0]=="number"&&(L={positions:L});else return A;return L=L$t(L,{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"}),A||(c[w]=A={id:w,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},L=ZUe({},u,L)),C$t(A,L,[{lineWidth:T=>+T*.5,capSize:T=>+T*.5,opacity:parseFloat,errors:T=>(T=$Ue(T),C+=T.length,T),positions:(T,m)=>(T=$Ue(T,"float64"),m.count=Math.floor(T.length/2),m.bounds=E$t(T,2),m.offset=y,y+=m.count,T)},{color:(T,m)=>{let F=m.count;if(T||(T="transparent"),!Array.isArray(T)||typeof T[0]=="number"){let I=T;T=Array(F);for(let R=0;R{let E=m.bounds;return T||(T=E),m.scale=[1/(T[2]-T[0]),1/(T[3]-T[1])],m.translate=[-T[0],-T[1]],m.scaleFract=JZ(m.scale),m.translateFract=JZ(m.translate),T},viewport:T=>{let m;return Array.isArray(T)?m={x:T[0],y:T[1],width:T[2]-T[0],height:T[3]-T[1]}:T?(m={x:T.x||T.left||0,y:T.y||T.top||0},T.right?m.width=T.right-m.x:m.width=T.w||T.width||0,T.bottom?m.height=T.bottom-m.y:m.height=T.h||T.height||0):m={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},m}}]),A}),y||C){let L=c.reduce((m,F,E)=>m+(F?F.count:0),0),w=new Float64Array(L*2),A=new Uint8Array(L*4),T=new Float32Array(L*4);c.forEach((m,F)=>{if(!m)return;let{positions:E,count:I,offset:R,color:B,errors:O}=m;I&&(A.set(B,R*4),T.set(O,R*4),w.set(E,R*2))});var k=P$t(w);a(k);var S=JZ(w,k);i(S),o(A),s(T)}}function x(){a.destroy(),i.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var rVe=fe((ITr,tVe)=>{var eVe=/[\'\"]/;tVe.exports=function(t){return t?(eVe.test(t.charAt(0))&&(t=t.substr(1)),eVe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var QZ=fe((zTr,D$t)=>{D$t.exports=["inherit","initial","unset"]});var e$=fe((qTr,R$t)=>{R$t.exports=["caption","icon","menu","message-box","small-caption","status-bar"]});var t$=fe((BTr,I$t)=>{I$t.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]});var r$=fe((OTr,z$t)=>{z$t.exports=["normal","italic","oblique"]});var n$=fe((NTr,q$t)=>{q$t.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]});var oVe=fe((UTr,aVe)=>{"use strict";function nVe(e,t){if(typeof e!="string")return[e];var r=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],a=t.escape||"___",i=!!t.flat;n.forEach(function(l){var u=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),c=[];function f(v,g,p){var x=r.push(v.slice(l[0].length,-l[1].length))-1;return c.push(x),a+x+a}r.forEach(function(v,g){for(var p,x=0;v!=p;)if(p=v,v=v.replace(u,f),x++>1e4)throw Error("References have circular dependency. Please, check them.");r[g]=v}),c=c.reverse(),r=r.map(function(v){return c.forEach(function(g){v=v.replace(new RegExp("(\\"+a+g+"\\"+a+")","g"),l[0]+"$1"+l[1])}),v})});var o=new RegExp("\\"+a+"([0-9]+)\\"+a);function s(l,u,c){for(var f=[],v,g=0;v=o.exec(l);){if(g++>1e4)throw Error("Circular references in parenthesis");f.push(l.slice(0,v.index)),f.push(s(u[v[1]],u)),l=l.slice(v.index+v[0].length)}return f.push(l),f}return i?r:s(r[0],r)}function iVe(e,t){if(t&&t.flat){var r=t&&t.escape||"___",n=e[0],a;if(!n)return"";for(var i=new RegExp("\\"+r+"([0-9]+)\\"+r),o=0;n!=a;){if(o++>1e4)throw Error("Circular references in "+e);a=n,n=n.replace(i,s)}return n}return e.reduce(function l(u,c){return Array.isArray(c)&&(c=c.reduce(l,"")),u+c},"");function s(l,u){if(e[u]==null)throw Error("Reference "+u+"is undefined");return e[u]}}function i$(e,t){return Array.isArray(e)?iVe(e,t):nVe(e,t)}i$.parse=nVe;i$.stringify=iVe;aVe.exports=i$});var uVe=fe((VTr,lVe)=>{"use strict";var sVe=oVe();lVe.exports=function(t,r,n){if(t==null)throw Error("First argument should be a string");if(r==null)throw Error("Separator should be a string or a RegExp");n?(typeof n=="string"||Array.isArray(n))&&(n={ignore:n}):n={},n.escape==null&&(n.escape=!0),n.ignore==null?n.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof n.ignore=="string"&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map(function(f){return f.length===1&&(f=f+f),f}));var a=sVe.parse(t,{flat:!0,brackets:n.ignore}),i=a[0],o=i.split(r);if(n.escape){for(var s=[],l=0;l{B$t.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]});var a$=fe((HTr,fVe)=>{"use strict";var O$t=cVe();fVe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||O$t.indexOf(t)!==-1}}});var pVe=fe((jTr,vVe)=>{"use strict";var N$t=rVe(),U$t=QZ(),V$t=e$(),G$t=t$(),H$t=r$(),j$t=n$(),o$=uVe(),W$t=a$().isSize;vVe.exports=dVe;var DM=dVe.cache={};function dVe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(DM[e])return DM[e];if(e==="")throw new Error("Cannot parse an empty string.");if(V$t.indexOf(e)!==-1)return DM[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=o$(e,/\s+/),n;n=r.shift();){if(U$t.indexOf(n)!==-1)return["style","variant","weight","stretch"].forEach(function(i){t[i]=n}),DM[e]=t;if(H$t.indexOf(n)!==-1){t.style=n;continue}if(n==="normal"||n==="small-caps"){t.variant=n;continue}if(j$t.indexOf(n)!==-1){t.stretch=n;continue}if(G$t.indexOf(n)!==-1){t.weight=n;continue}if(W$t(n)){var a=o$(n,"/");if(t.size=a[0],a[1]!=null?t.lineHeight=hVe(a[1]):r[0]==="/"&&(r.shift(),t.lineHeight=hVe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=o$(r.join(" "),/\s*,\s*/).map(N$t),DM[e]=t}throw new Error("Unknown or unsupported font token: "+n)}throw new Error("Missing required font-size.")}function hVe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var l$=fe((WTr,gVe)=>{"use strict";var Y$t=E1(),X$t=a$().isSize,Z$t=IM(QZ()),$$t=IM(e$()),K$t=IM(t$()),J$t=IM(r$()),Q$t=IM(n$()),eKt={normal:1,"small-caps":1},tKt={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},s$={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};gVe.exports=function(t){if(t=Y$t(t,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),t.system)return t.system&&RM(t.system,$$t),t.system;if(RM(t.style,J$t),RM(t.variant,eKt),RM(t.weight,K$t),RM(t.stretch,Q$t),t.size==null&&(t.size=s$.size),typeof t.size=="number"&&(t.size+="px"),!X$t)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=s$.family),Array.isArray(t.family)&&(t.family.length||(t.family=[s$.family]),t.family=t.family.map(function(n){return tKt[n]?n:'"'+n+'"'}).join(", "));var r=[];return r.push(t.style),t.variant!==t.style&&r.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&r.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&r.push(t.stretch),r.push(t.size+(t.lineHeight==null||t.lineHeight==="normal"||t.lineHeight+""=="1"?"":"/"+t.lineHeight)),r.push(t.family),r.filter(Boolean).join(" ")};function RM(e,t){if(e&&!t[e]&&!Z$t[e])throw Error("Unknown keyword `"+e+"`");return e}function IM(e){for(var t={},r=0;r{"use strict";mVe.exports={parse:pVe(),stringify:l$()}});var f$=fe((u$,c$)=>{(function(e,t){typeof u$=="object"&&typeof c$!="undefined"?c$.exports=t():e.createREGL=t()})(u$,(function(){"use strict";var e=function(Pe,Xe){for(var at=Object.keys(Xe),xt=0;xt1&&Xe===at&&(Xe==='"'||Xe==="'"))return['"'+o(Pe.substr(1,Pe.length-2))+'"'];var xt=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Pe);if(xt)return s(Pe.substr(0,xt.index)).concat(s(xt[1])).concat(s(Pe.substr(xt.index+xt[0].length)));var Et=Pe.split(".");if(Et.length===1)return['"'+o(Pe)+'"'];for(var Bt=[],St=0;St65535)<<4,Pe>>>=Xe,at=(Pe>255)<<3,Pe>>>=at,Xe|=at,at=(Pe>15)<<2,Pe>>>=at,Xe|=at,at=(Pe>3)<<1,Pe>>>=at,Xe|=at,Xe|Pe>>1}function q(){var Pe=T(8,function(){return[]});function Xe(Bt){var St=V(Bt),Pt=Pe[j(St)>>2];return Pt.length>0?Pt.pop():new ArrayBuffer(St)}function at(Bt){Pe[j(Bt.byteLength)>>2].push(Bt)}function xt(Bt,St){var Pt=null;switch(Bt){case m:Pt=new Int8Array(Xe(St),0,St);break;case F:Pt=new Uint8Array(Xe(St),0,St);break;case E:Pt=new Int16Array(Xe(2*St),0,St);break;case I:Pt=new Uint16Array(Xe(2*St),0,St);break;case R:Pt=new Int32Array(Xe(4*St),0,St);break;case B:Pt=new Uint32Array(Xe(4*St),0,St);break;case O:Pt=new Float32Array(Xe(4*St),0,St);break;default:return null}return Pt.length!==St?Pt.subarray(0,St):Pt}function Et(Bt){at(Bt.buffer)}return{alloc:Xe,free:at,allocType:xt,freeType:Et}}var U=q();U.zero=q();var J=3408,ee=3410,ce=3411,ye=3412,xe=3413,ue=3414,K=3415,_e=33901,ne=33902,ae=3379,pe=3386,ie=34921,le=36347,me=36348,be=35661,De=35660,Ge=34930,ht=36349,it=34076,Oe=34024,ze=7936,ct=7937,et=7938,qe=35724,we=34047,Le=36063,Ke=34852,Te=3553,Ve=34067,$e=34069,ot=33984,tt=6408,nt=5126,We=5121,mt=36160,bt=36053,Yt=36064,jt=16384,mr=function(Pe,Xe){var at=1;Xe.ext_texture_filter_anisotropic&&(at=Pe.getParameter(we));var xt=1,Et=1;Xe.webgl_draw_buffers&&(xt=Pe.getParameter(Ke),Et=Pe.getParameter(Le));var Bt=!!Xe.oes_texture_float;if(Bt){var St=Pe.createTexture();Pe.bindTexture(Te,St),Pe.texImage2D(Te,0,tt,1,1,0,tt,nt,null);var Pt=Pe.createFramebuffer();if(Pe.bindFramebuffer(mt,Pt),Pe.framebufferTexture2D(mt,Yt,Te,St,0),Pe.bindTexture(Te,null),Pe.checkFramebufferStatus(mt)!==bt)Bt=!1;else{Pe.viewport(0,0,1,1),Pe.clearColor(1,0,0,1),Pe.clear(jt);var $t=U.allocType(nt,4);Pe.readPixels(0,0,1,1,tt,nt,$t),Pe.getError()?Bt=!1:(Pe.deleteFramebuffer(Pt),Pe.deleteTexture(St),Bt=$t[0]===1),U.freeType($t)}}var Ht=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),dr=!0;if(!Ht){var Xr=Pe.createTexture(),Or=U.allocType(We,36);Pe.activeTexture(ot),Pe.bindTexture(Ve,Xr),Pe.texImage2D($e,0,tt,3,3,0,tt,We,Or),U.freeType(Or),Pe.bindTexture(Ve,null),Pe.deleteTexture(Xr),dr=!Pe.getError()}return{colorBits:[Pe.getParameter(ee),Pe.getParameter(ce),Pe.getParameter(ye),Pe.getParameter(xe)],depthBits:Pe.getParameter(ue),stencilBits:Pe.getParameter(K),subpixelBits:Pe.getParameter(J),extensions:Object.keys(Xe).filter(function($r){return!!Xe[$r]}),maxAnisotropic:at,maxDrawbuffers:xt,maxColorAttachments:Et,pointSizeDims:Pe.getParameter(_e),lineWidthDims:Pe.getParameter(ne),maxViewportDims:Pe.getParameter(pe),maxCombinedTextureUnits:Pe.getParameter(be),maxCubeMapSize:Pe.getParameter(it),maxRenderbufferSize:Pe.getParameter(Oe),maxTextureUnits:Pe.getParameter(Ge),maxTextureSize:Pe.getParameter(ae),maxAttributes:Pe.getParameter(ie),maxVertexUniforms:Pe.getParameter(le),maxVertexTextureUnits:Pe.getParameter(De),maxVaryingVectors:Pe.getParameter(me),maxFragmentUniforms:Pe.getParameter(ht),glsl:Pe.getParameter(qe),renderer:Pe.getParameter(ct),vendor:Pe.getParameter(ze),version:Pe.getParameter(et),readFloat:Bt,npotTextureCube:dr}},or=function(Pe){return Pe instanceof Uint8Array||Pe instanceof Uint16Array||Pe instanceof Uint32Array||Pe instanceof Int8Array||Pe instanceof Int16Array||Pe instanceof Int32Array||Pe instanceof Float32Array||Pe instanceof Float64Array||Pe instanceof Uint8ClampedArray};function fr(Pe){return!!Pe&&typeof Pe=="object"&&Array.isArray(Pe.shape)&&Array.isArray(Pe.stride)&&typeof Pe.offset=="number"&&Pe.shape.length===Pe.stride.length&&(Array.isArray(Pe.data)||or(Pe.data))}var Ot=function(Pe){return Object.keys(Pe).map(function(Xe){return Pe[Xe]})},cr={shape:ft,flatten:Lt};function Ct(Pe,Xe,at){for(var xt=0;xt0){var yi;if(Array.isArray(Rr[0])){Yn=Ut(Rr);for(var Sn=1,An=1;An0){if(typeof Sn[0]=="number"){var jn=U.allocType(on.dtype,Sn.length);Ii(jn,Sn),Yn(jn,li),U.freeType(jn)}else if(Array.isArray(Sn[0])||or(Sn[0])){Vn=Ut(Sn);var Wn=Qt(Sn,Vn,on.dtype);Yn(Wn,li),U.freeType(Wn)}}}else if(fr(Sn)){Vn=Sn.shape;var si=Sn.stride,zi=0,da=0,ui=0,Li=0;Vn.length===1?(zi=Vn[0],da=1,ui=si[0],Li=0):Vn.length===2&&(zi=Vn[0],da=Vn[1],ui=si[0],Li=si[1]);var Ki=Array.isArray(Sn.data)?on.dtype:Jn(Sn.data),ca=U.allocType(Ki,zi*da);Vi(ca,Sn.data,zi,da,ui,Li,Sn.offset),Yn(ca,li),U.freeType(ca)}return Nn}return Lr||Nn(Tr),Nn._reglType="buffer",Nn._buffer=on,Nn.subdata=yi,at.profile&&(Nn.stats=on.stats),Nn.destroy=function(){Or(on)},Nn}function Er(){Ot(Bt).forEach(function(Tr){Tr.buffer=Pe.createBuffer(),Pe.bindBuffer(Tr.type,Tr.buffer),Pe.bufferData(Tr.type,Tr.persistentData||Tr.byteLength,Tr.usage)})}return at.profile&&(Xe.getTotalBufferSize=function(){var Tr=0;return Object.keys(Bt).forEach(function(Rr){Tr+=Bt[Rr].stats.size}),Tr}),{create:$r,createStream:$t,destroyStream:Ht,clear:function(){Ot(Bt).forEach(Or),Pt.forEach(Or)},getBuffer:function(Tr){return Tr&&Tr._buffer instanceof St?Tr._buffer:null},restore:Er,_initBuffer:Xr}}var ha=0,va=0,Xi=1,oa=1,Ma=4,Ga=4,ss={points:ha,point:va,lines:Xi,line:oa,triangles:Ma,triangle:Ga,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},mo=0,sl=1,Eo=4,ao=5120,Da=5121,bl=5122,bo=5123,Zs=5124,su=5125,fc=34963,Af=35040,ut=35044;function Jt(Pe,Xe,at,xt){var Et={},Bt=0,St={uint8:Da,uint16:bo};Xe.oes_element_index_uint&&(St.uint32=su);function Pt(Er){this.id=Bt++,Et[this.id]=this,this.buffer=Er,this.primType=Eo,this.vertCount=0,this.type=0}Pt.prototype.bind=function(){this.buffer.bind()};var $t=[];function Ht(Er){var Tr=$t.pop();return Tr||(Tr=new Pt(at.create(null,fc,!0,!1)._buffer)),Xr(Tr,Er,Af,-1,-1,0,0),Tr}function dr(Er){$t.push(Er)}function Xr(Er,Tr,Rr,Lr,an,on,Nn){Er.buffer.bind();var Yn;if(Tr){var yi=Nn;!Nn&&(!or(Tr)||fr(Tr)&&!or(Tr.data))&&(yi=Xe.oes_element_index_uint?su:bo),at._initBuffer(Er.buffer,Tr,Rr,yi,3)}else Pe.bufferData(fc,on,Rr),Er.buffer.dtype=Yn||Da,Er.buffer.usage=Rr,Er.buffer.dimension=3,Er.buffer.byteLength=on;if(Yn=Nn,!Nn){switch(Er.buffer.dtype){case Da:case ao:Yn=Da;break;case bo:case bl:Yn=bo;break;case su:case Zs:Yn=su;break;default:}Er.buffer.dtype=Yn}Er.type=Yn;var Sn=an;Sn<0&&(Sn=Er.buffer.byteLength,Yn===bo?Sn>>=1:Yn===su&&(Sn>>=2)),Er.vertCount=Sn;var An=Lr;if(Lr<0){An=Eo;var li=Er.buffer.dimension;li===1&&(An=mo),li===2&&(An=sl),li===3&&(An=Eo)}Er.primType=An}function Or(Er){xt.elementsCount--,delete Et[Er.id],Er.buffer.destroy(),Er.buffer=null}function $r(Er,Tr){var Rr=at.create(null,fc,!0),Lr=new Pt(Rr._buffer);xt.elementsCount++;function an(on){if(!on)Rr(),Lr.primType=Eo,Lr.vertCount=0,Lr.type=Da;else if(typeof on=="number")Rr(on),Lr.primType=Eo,Lr.vertCount=on|0,Lr.type=Da;else{var Nn=null,Yn=ut,yi=-1,Sn=-1,An=0,li=0;Array.isArray(on)||or(on)||fr(on)?Nn=on:("data"in on&&(Nn=on.data),"usage"in on&&(Yn=Vt[on.usage]),"primitive"in on&&(yi=ss[on.primitive]),"count"in on&&(Sn=on.count|0),"type"in on&&(li=St[on.type]),"length"in on?An=on.length|0:(An=Sn,li===bo||li===bl?An*=2:(li===su||li===Zs)&&(An*=4))),Xr(Lr,Nn,Yn,yi,Sn,An,li)}return an}return an(Er),an._reglType="elements",an._elements=Lr,an.subdata=function(on,Nn){return Rr.subdata(on,Nn),an},an.destroy=function(){Or(Lr)},an}return{create:$r,createStream:Ht,destroyStream:dr,getElements:function(Er){return typeof Er=="function"&&Er._elements instanceof Pt?Er._elements:null},clear:function(){Ot(Et).forEach(Or)}}}var er=new Float32Array(1),wr=new Uint32Array(er.buffer),nn=5123;function Dr(Pe){for(var Xe=U.allocType(nn,Pe.length),at=0;at>>31<<15,Bt=(xt<<1>>>24)-127,St=xt>>13&1023;if(Bt<-24)Xe[at]=Et;else if(Bt<-14){var Pt=-14-Bt;Xe[at]=Et+(St+1024>>Pt)}else Bt>15?Xe[at]=Et+31744:Xe[at]=Et+(Bt+15<<10)+St}return Xe}function bn(Pe){return Array.isArray(Pe)||or(Pe)}var Yr=34467,Tn=3553,Kn=34067,Qn=34069,Ai=6408,Ji=6406,Ra=6407,ii=6409,Za=6410,ja=32854,qo=32855,$a=36194,Ka=32819,Oa=32820,Ni=33635,ka=34042,vs=6402,yo=34041,so=35904,oo=35906,ko=36193,pa=33776,la=33777,As=33778,Ms=33779,xu=35986,rs=35987,Ls=34798,$s=35840,Kc=35841,_u=35842,Gu=35843,Ja=36196,ps=5121,Sa=5123,ma=5125,Ps=5126,Ca=10242,Pl=10243,ll=10497,Jc=33071,lu=33648,Mf=10240,Bd=10241,Hu=9728,Sf=9729,kc=9984,Uo=9985,ns=9986,Ks=9987,Ef=33170,ju=4352,gs=4353,bu=4354,kf=34046,ah=3317,Od=37440,Qc=37441,uu=37443,oh=37444,hc=33984,Fl=[kc,ns,Uo,Ks],Yo=[0,ii,Za,Ra,Ai],Ro={};Ro[ii]=Ro[Ji]=Ro[vs]=1,Ro[yo]=Ro[Za]=2,Ro[Ra]=Ro[so]=3,Ro[Ai]=Ro[oo]=4;function is(Pe){return"[object "+Pe+"]"}var Dl=is("HTMLCanvasElement"),dc=is("OffscreenCanvas"),ef=is("CanvasRenderingContext2D"),Cc=is("ImageBitmap"),sh=is("HTMLImageElement"),Y0=is("HTMLVideoElement"),Nd=Object.keys(kt).concat([Dl,dc,ef,Cc,sh,Y0]),Cf=[];Cf[ps]=1,Cf[Ps]=4,Cf[ko]=2,Cf[Sa]=2,Cf[ma]=4;var Vo=[];Vo[ja]=2,Vo[qo]=2,Vo[$a]=2,Vo[yo]=4,Vo[pa]=.5,Vo[la]=.5,Vo[As]=1,Vo[Ms]=1,Vo[xu]=.5,Vo[rs]=1,Vo[Ls]=1,Vo[$s]=.5,Vo[Kc]=.25,Vo[_u]=.5,Vo[Gu]=.25,Vo[Ja]=.5;function Ud(Pe){return Array.isArray(Pe)&&(Pe.length===0||typeof Pe[0]=="number")}function zh(Pe){if(!Array.isArray(Pe))return!1;var Xe=Pe.length;return!(Xe===0||!bn(Pe[0]))}function tf(Pe){return Object.prototype.toString.call(Pe)}function Vd(Pe){return tf(Pe)===Dl}function rf(Pe){return tf(Pe)===dc}function qh(Pe){return tf(Pe)===ef}function vc(Pe){return tf(Pe)===Cc}function dd(Pe){return tf(Pe)===sh}function Bh(Pe){return tf(Pe)===Y0}function Wu(Pe){if(!Pe)return!1;var Xe=tf(Pe);return Nd.indexOf(Xe)>=0?!0:Ud(Pe)||zh(Pe)||fr(Pe)}function vd(Pe){return kt[Object.prototype.toString.call(Pe)]|0}function pd(Pe,Xe){var at=Xe.length;switch(Pe.type){case ps:case Sa:case ma:case Ps:var xt=U.allocType(Pe.type,at);xt.set(Xe),Pe.data=xt;break;case ko:Pe.data=Dr(Xe);break;default:}}function lh(Pe,Xe){return U.allocType(Pe.type===ko?Ps:Pe.type,Xe)}function nf(Pe,Xe){Pe.type===ko?(Pe.data=Dr(Xe),U.freeType(Xe)):Pe.data=Xe}function uh(Pe,Xe,at,xt,Et,Bt){for(var St=Pe.width,Pt=Pe.height,$t=Pe.channels,Ht=St*Pt*$t,dr=lh(Pe,Ht),Xr=0,Or=0;Or=1;)Pt+=St*$t*$t,$t/=2;return Pt}else return St*at*xt}function gd(Pe,Xe,at,xt,Et,Bt,St){var Pt={"don't care":ju,"dont care":ju,nice:bu,fast:gs},$t={repeat:ll,clamp:Jc,mirror:lu},Ht={nearest:Hu,linear:Sf},dr=e({mipmap:Ks,"nearest mipmap nearest":kc,"linear mipmap nearest":Uo,"nearest mipmap linear":ns,"linear mipmap linear":Ks},Ht),Xr={none:0,browser:oh},Or={uint8:ps,rgba4:Ka,rgb565:Ni,"rgb5 a1":Oa},$r={alpha:Ji,luminance:ii,"luminance alpha":Za,rgb:Ra,rgba:Ai,rgba4:ja,"rgb5 a1":qo,rgb565:$a},Er={};Xe.ext_srgb&&($r.srgb=so,$r.srgba=oo),Xe.oes_texture_float&&(Or.float32=Or.float=Ps),Xe.oes_texture_half_float&&(Or.float16=Or["half float"]=ko),Xe.webgl_depth_texture&&(e($r,{depth:vs,"depth stencil":yo}),e(Or,{uint16:Sa,uint32:ma,"depth stencil":ka})),Xe.webgl_compressed_texture_s3tc&&e(Er,{"rgb s3tc dxt1":pa,"rgba s3tc dxt1":la,"rgba s3tc dxt3":As,"rgba s3tc dxt5":Ms}),Xe.webgl_compressed_texture_atc&&e(Er,{"rgb atc":xu,"rgba atc explicit alpha":rs,"rgba atc interpolated alpha":Ls}),Xe.webgl_compressed_texture_pvrtc&&e(Er,{"rgb pvrtc 4bppv1":$s,"rgb pvrtc 2bppv1":Kc,"rgba pvrtc 4bppv1":_u,"rgba pvrtc 2bppv1":Gu}),Xe.webgl_compressed_texture_etc1&&(Er["rgb etc1"]=Ja);var Tr=Array.prototype.slice.call(Pe.getParameter(Yr));Object.keys(Er).forEach(function(vr){var gn=Er[vr];Tr.indexOf(gn)>=0&&($r[vr]=gn)});var Rr=Object.keys($r);at.textureFormats=Rr;var Lr=[];Object.keys($r).forEach(function(vr){var gn=$r[vr];Lr[gn]=vr});var an=[];Object.keys(Or).forEach(function(vr){var gn=Or[vr];an[gn]=vr});var on=[];Object.keys(Ht).forEach(function(vr){var gn=Ht[vr];on[gn]=vr});var Nn=[];Object.keys(dr).forEach(function(vr){var gn=dr[vr];Nn[gn]=vr});var Yn=[];Object.keys($t).forEach(function(vr){var gn=$t[vr];Yn[gn]=vr});var yi=Rr.reduce(function(vr,gn){var xn=$r[gn];return xn===ii||xn===Ji||xn===ii||xn===Za||xn===vs||xn===yo||Xe.ext_srgb&&(xn===so||xn===oo)?vr[xn]=xn:xn===qo||gn.indexOf("rgba")>=0?vr[xn]=Ai:vr[xn]=Ra,vr},{});function Sn(){this.internalformat=Ai,this.format=Ai,this.type=ps,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=oh,this.width=0,this.height=0,this.channels=0}function An(vr,gn){vr.internalformat=gn.internalformat,vr.format=gn.format,vr.type=gn.type,vr.compressed=gn.compressed,vr.premultiplyAlpha=gn.premultiplyAlpha,vr.flipY=gn.flipY,vr.unpackAlignment=gn.unpackAlignment,vr.colorSpace=gn.colorSpace,vr.width=gn.width,vr.height=gn.height,vr.channels=gn.channels}function li(vr,gn){if(!(typeof gn!="object"||!gn)){if("premultiplyAlpha"in gn&&(vr.premultiplyAlpha=gn.premultiplyAlpha),"flipY"in gn&&(vr.flipY=gn.flipY),"alignment"in gn&&(vr.unpackAlignment=gn.alignment),"colorSpace"in gn&&(vr.colorSpace=Xr[gn.colorSpace]),"type"in gn){var xn=gn.type;vr.type=Or[xn]}var Gi=vr.width,wo=vr.height,xs=vr.channels,Hi=!1;"shape"in gn?(Gi=gn.shape[0],wo=gn.shape[1],gn.shape.length===3&&(xs=gn.shape[2],Hi=!0)):("radius"in gn&&(Gi=wo=gn.radius),"width"in gn&&(Gi=gn.width),"height"in gn&&(wo=gn.height),"channels"in gn&&(xs=gn.channels,Hi=!0)),vr.width=Gi|0,vr.height=wo|0,vr.channels=xs|0;var ar=!1;if("format"in gn){var gr=gn.format,Pr=vr.internalformat=$r[gr];vr.format=yi[Pr],gr in Or&&("type"in gn||(vr.type=Or[gr])),gr in Er&&(vr.compressed=!0),ar=!0}!Hi&&ar?vr.channels=Ro[vr.format]:Hi&&!ar&&vr.channels!==Yo[vr.format]&&(vr.format=vr.internalformat=Yo[vr.channels])}}function Vn(vr){Pe.pixelStorei(Od,vr.flipY),Pe.pixelStorei(Qc,vr.premultiplyAlpha),Pe.pixelStorei(uu,vr.colorSpace),Pe.pixelStorei(ah,vr.unpackAlignment)}function jn(){Sn.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Wn(vr,gn){var xn=null;if(Wu(gn)?xn=gn:gn&&(li(vr,gn),"x"in gn&&(vr.xOffset=gn.x|0),"y"in gn&&(vr.yOffset=gn.y|0),Wu(gn.data)&&(xn=gn.data)),gn.copy){var Gi=Et.viewportWidth,wo=Et.viewportHeight;vr.width=vr.width||Gi-vr.xOffset,vr.height=vr.height||wo-vr.yOffset,vr.needsCopy=!0}else if(!xn)vr.width=vr.width||1,vr.height=vr.height||1,vr.channels=vr.channels||4;else if(or(xn))vr.channels=vr.channels||4,vr.data=xn,!("type"in gn)&&vr.type===ps&&(vr.type=vd(xn));else if(Ud(xn))vr.channels=vr.channels||4,pd(vr,xn),vr.alignment=1,vr.needsFree=!0;else if(fr(xn)){var xs=xn.data;!Array.isArray(xs)&&vr.type===ps&&(vr.type=vd(xs));var Hi=xn.shape,ar=xn.stride,gr,Pr,pn,Mn,sn,tn;Hi.length===3?(pn=Hi[2],tn=ar[2]):(pn=1,tn=1),gr=Hi[0],Pr=Hi[1],Mn=ar[0],sn=ar[1],vr.alignment=1,vr.width=gr,vr.height=Pr,vr.channels=pn,vr.format=vr.internalformat=Yo[pn],vr.needsFree=!0,uh(vr,xs,Mn,sn,tn,xn.offset)}else if(Vd(xn)||rf(xn)||qh(xn))Vd(xn)||rf(xn)?vr.element=xn:vr.element=xn.canvas,vr.width=vr.element.width,vr.height=vr.element.height,vr.channels=4;else if(vc(xn))vr.element=xn,vr.width=xn.width,vr.height=xn.height,vr.channels=4;else if(dd(xn))vr.element=xn,vr.width=xn.naturalWidth,vr.height=xn.naturalHeight,vr.channels=4;else if(Bh(xn))vr.element=xn,vr.width=xn.videoWidth,vr.height=xn.videoHeight,vr.channels=4;else if(zh(xn)){var Hr=vr.width||xn[0].length,Mr=vr.height||xn.length,zr=vr.channels;bn(xn[0][0])?zr=zr||xn[0][0].length:zr=zr||1;for(var yr=cr.shape(xn),hn=1,kn=0;kn>=wo,xn.height>>=wo,Wn(xn,Gi[wo]),vr.mipmask|=1<=0&&!("faces"in gn)&&(vr.genMipmaps=!0)}if("mag"in gn){var Gi=gn.mag;vr.magFilter=Ht[Gi]}var wo=vr.wrapS,xs=vr.wrapT;if("wrap"in gn){var Hi=gn.wrap;typeof Hi=="string"?wo=xs=$t[Hi]:Array.isArray(Hi)&&(wo=$t[Hi[0]],xs=$t[Hi[1]])}else{if("wrapS"in gn){var ar=gn.wrapS;wo=$t[ar]}if("wrapT"in gn){var gr=gn.wrapT;xs=$t[gr]}}if(vr.wrapS=wo,vr.wrapT=xs,"anisotropic"in gn){var Pr=gn.anisotropic;vr.anisotropic=gn.anisotropic}if("mipmap"in gn){var pn=!1;switch(typeof gn.mipmap){case"string":vr.mipmapHint=Pt[gn.mipmap],vr.genMipmaps=!0,pn=!0;break;case"boolean":pn=vr.genMipmaps=gn.mipmap;break;case"object":vr.genMipmaps=!1,pn=!0;break;default:}pn&&!("min"in gn)&&(vr.minFilter=kc)}}function po(vr,gn){Pe.texParameteri(gn,Bd,vr.minFilter),Pe.texParameteri(gn,Mf,vr.magFilter),Pe.texParameteri(gn,Ca,vr.wrapS),Pe.texParameteri(gn,Pl,vr.wrapT),Xe.ext_texture_filter_anisotropic&&Pe.texParameteri(gn,kf,vr.anisotropic),vr.genMipmaps&&(Pe.hint(Ef,vr.mipmapHint),Pe.generateMipmap(gn))}var Xo=0,no={},Us=at.maxTextureUnits,ql=Array(Us).map(function(){return null});function Ta(vr){Sn.call(this),this.mipmask=0,this.internalformat=Ai,this.id=Xo++,this.refCount=1,this.target=vr,this.texture=Pe.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new vo,St.profile&&(this.stats={size:0})}function vu(vr){Pe.activeTexture(hc),Pe.bindTexture(vr.target,vr.texture)}function ys(){var vr=ql[0];vr?Pe.bindTexture(vr.target,vr.texture):Pe.bindTexture(Tn,null)}function xc(vr){var gn=vr.texture,xn=vr.unit,Gi=vr.target;xn>=0&&(Pe.activeTexture(hc+xn),Pe.bindTexture(Gi,null),ql[xn]=null),Pe.deleteTexture(gn),vr.texture=null,vr.params=null,vr.pixels=null,vr.refCount=0,delete no[vr.id],Bt.textureCount--}e(Ta.prototype,{bind:function(){var vr=this;vr.bindCount+=1;var gn=vr.unit;if(gn<0){for(var xn=0;xn0)continue;Gi.unit=-1}ql[xn]=vr,gn=xn;break}gn>=Us,St.profile&&Bt.maxTextureUnits>sn)-pn,tn.height=tn.height||(xn.height>>sn)-Mn,vu(xn),zi(tn,Tn,pn,Mn,sn),ys(),Li(tn),Gi}function xs(Hi,ar){var gr=Hi|0,Pr=ar|0||gr;if(gr===xn.width&&Pr===xn.height)return Gi;Gi.width=xn.width=gr,Gi.height=xn.height=Pr,vu(xn);for(var pn=0;xn.mipmask>>pn;++pn){var Mn=gr>>pn,sn=Pr>>pn;if(!Mn||!sn)break;Pe.texImage2D(Tn,pn,xn.format,Mn,sn,0,xn.format,xn.type,null)}return ys(),St.profile&&(xn.stats.size=af(xn.internalformat,xn.type,gr,Pr,!1,!1)),Gi}return Gi(vr,gn),Gi.subimage=wo,Gi.resize=xs,Gi._reglType="texture2d",Gi._texture=xn,St.profile&&(Gi.stats=xn.stats),Gi.destroy=function(){xn.decRef()},Gi}function $l(vr,gn,xn,Gi,wo,xs){var Hi=new Ta(Kn);no[Hi.id]=Hi,Bt.cubeCount++;var ar=new Array(6);function gr(Mn,sn,tn,Hr,Mr,zr){var yr,hn=Hi.texInfo;for(vo.call(hn),yr=0;yr<6;++yr)ar[yr]=Na();if(typeof Mn=="number"||!Mn){var kn=Mn|0||1;for(yr=0;yr<6;++yr)ca(ar[yr],kn,kn)}else if(typeof Mn=="object")if(sn)Ia(ar[0],Mn),Ia(ar[1],sn),Ia(ar[2],tn),Ia(ar[3],Hr),Ia(ar[4],Mr),Ia(ar[5],zr);else if(_o(hn,Mn),li(Hi,Mn),"faces"in Mn){var Xn=Mn.faces;for(yr=0;yr<6;++yr)An(ar[yr],Hi),Ia(ar[yr],Xn[yr])}else for(yr=0;yr<6;++yr)Ia(ar[yr],Mn);for(An(Hi,ar[0]),hn.genMipmaps?Hi.mipmask=(ar[0].width<<1)-1:Hi.mipmask=ar[0].mipmask,Hi.internalformat=ar[0].internalformat,gr.width=ar[0].width,gr.height=ar[0].height,vu(Hi),yr=0;yr<6;++yr)Os(ar[yr],Qn+yr);for(po(hn,Kn),ys(),St.profile&&(Hi.stats.size=af(Hi.internalformat,Hi.type,gr.width,gr.height,hn.genMipmaps,!0)),gr.format=Lr[Hi.internalformat],gr.type=an[Hi.type],gr.mag=on[hn.magFilter],gr.min=Nn[hn.minFilter],gr.wrapS=Yn[hn.wrapS],gr.wrapT=Yn[hn.wrapT],yr=0;yr<6;++yr)Ns(ar[yr]);return gr}function Pr(Mn,sn,tn,Hr,Mr){var zr=tn|0,yr=Hr|0,hn=Mr|0,kn=ui();return An(kn,Hi),kn.width=0,kn.height=0,Wn(kn,sn),kn.width=kn.width||(Hi.width>>hn)-zr,kn.height=kn.height||(Hi.height>>hn)-yr,vu(Hi),zi(kn,Qn+Mn,zr,yr,hn),ys(),Li(kn),gr}function pn(Mn){var sn=Mn|0;if(sn!==Hi.width){gr.width=Hi.width=sn,gr.height=Hi.height=sn,vu(Hi);for(var tn=0;tn<6;++tn)for(var Hr=0;Hi.mipmask>>Hr;++Hr)Pe.texImage2D(Qn+tn,Hr,Hi.format,sn>>Hr,sn>>Hr,0,Hi.format,Hi.type,null);return ys(),St.profile&&(Hi.stats.size=af(Hi.internalformat,Hi.type,gr.width,gr.height,!1,!0)),gr}}return gr(vr,gn,xn,Gi,wo,xs),gr.subimage=Pr,gr.resize=pn,gr._reglType="textureCube",gr._texture=Hi,St.profile&&(gr.stats=Hi.stats),gr.destroy=function(){Hi.decRef()},gr}function xa(){for(var vr=0;vr>Gi,xn.height>>Gi,0,xn.internalformat,xn.type,null);else for(var wo=0;wo<6;++wo)Pe.texImage2D(Qn+wo,Gi,xn.internalformat,xn.width>>Gi,xn.height>>Gi,0,xn.internalformat,xn.type,null);po(xn.texInfo,xn.target)})}function Es(){for(var vr=0;vr=0?Ns=!0:$t.indexOf(vo)>=0&&(Ns=!1))),("depthTexture"in Ta||"depthStencilTexture"in Ta)&&(ql=!!(Ta.depthTexture||Ta.depthStencilTexture)),"depth"in Ta&&(typeof Ta.depth=="boolean"?Os=Ta.depth:(Xo=Ta.depth,Ss=!1)),"stencil"in Ta&&(typeof Ta.stencil=="boolean"?Ss=Ta.stencil:(no=Ta.stencil,Os=!1)),"depthStencil"in Ta&&(typeof Ta.depthStencil=="boolean"?Os=Ss=Ta.depthStencil:(Us=Ta.depthStencil,Os=!1,Ss=!1))}var ys=null,xc=null,Zl=null,$l=null;if(Array.isArray(Na))ys=Na.map(Er);else if(Na)ys=[Er(Na)];else for(ys=new Array(po),Ki=0;Ki0&&(Li.depth=Wn[0].depth,Li.stencil=Wn[0].stencil,Li.depthStencil=Wn[0].depthStencil),Wn[ui]?Wn[ui](Li):Wn[ui]=An(Li)}return e(si,{width:Ki,height:Ki,color:vo})}function zi(da){var ui,Li=da|0;if(Li===si.width)return si;var Ki=si.color;for(ui=0;ui=Ki.byteLength?ca.subdata(Ki):(ca.destroy(),An.buffers[da]=null)),An.buffers[da]||(ca=An.buffers[da]=Et.create(ui,pc,!1,!0)),Li.buffer=Et.getBuffer(ca),Li.size=Li.buffer.dimension|0,Li.normalized=!1,Li.type=Li.buffer.dtype,Li.offset=0,Li.stride=0,Li.divisor=0,Li.state=1,si[da]=1}else Et.getBuffer(ui)?(Li.buffer=Et.getBuffer(ui),Li.size=Li.buffer.dimension|0,Li.normalized=!1,Li.type=Li.buffer.dtype,Li.offset=0,Li.stride=0,Li.divisor=0,Li.state=1):Et.getBuffer(ui.buffer)?(Li.buffer=Et.getBuffer(ui.buffer),Li.size=(+ui.size||Li.buffer.dimension)|0,Li.normalized=!!ui.normalized||!1,"type"in ui?Li.type=Cn[ui.type]:Li.type=Li.buffer.dtype,Li.offset=(ui.offset||0)|0,Li.stride=(ui.stride||0)|0,Li.divisor=(ui.divisor||0)|0,Li.state=1):"x"in ui&&(Li.x=+ui.x||0,Li.y=+ui.y||0,Li.z=+ui.z||0,Li.w=+ui.w||0,Li.state=2)}for(var Ia=0;Ia1)for(var Vn=0;VnTr&&(Tr=Rr.stats.uniformsCount)}),Tr},at.getMaxAttributesCount=function(){var Tr=0;return dr.forEach(function(Rr){Rr.stats.attributesCount>Tr&&(Tr=Rr.stats.attributesCount)}),Tr});function Er(){Et={},Bt={};for(var Tr=0;Tr16&&(at=en(at,Pe.length*8));for(var xt=Array(16),Et=Array(16),Bt=0;Bt<16;Bt++)xt[Bt]=at[Bt]^909522486,Et[Bt]=at[Bt]^1549556828;var St=en(xt.concat(qf(Xe)),512+Xe.length*8);return Ze(en(Et.concat(St),768))}function Wl(Pe){for(var Xe=Hh?"0123456789ABCDEF":"0123456789abcdef",at="",xt,Et=0;Et>>4&15)+Xe.charAt(xt&15);return at}function If(Pe){for(var Xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",at="",xt=Pe.length,Et=0;EtPe.length*8?at+=X0:at+=Xe.charAt(Bt>>>6*(3-St)&63);return at}function vh(Pe,Xe){var at=Xe.length,xt=Array(),Et,Bt,St,Pt,$t=Array(Math.ceil(Pe.length/2));for(Et=0;Et<$t.length;Et++)$t[Et]=Pe.charCodeAt(Et*2)<<8|Pe.charCodeAt(Et*2+1);for(;$t.length>0;){for(Pt=Array(),St=0,Et=0;Et<$t.length;Et++)St=(St<<16)+$t[Et],Bt=Math.floor(St/at),St-=Bt*at,(Pt.length>0||Bt>0)&&(Pt[Pt.length]=Bt);xt[xt.length]=St,$t=Pt}var Ht="";for(Et=xt.length-1;Et>=0;Et--)Ht+=Xe.charAt(xt[Et]);var dr=Math.ceil(Pe.length*8/(Math.log(Xe.length)/Math.log(2)));for(Et=Ht.length;Et>>6&31,128|xt&63):xt<=65535?Xe+=String.fromCharCode(224|xt>>>12&15,128|xt>>>6&63,128|xt&63):xt<=2097151&&(Xe+=String.fromCharCode(240|xt>>>18&7,128|xt>>>12&63,128|xt>>>6&63,128|xt&63));return Xe}function qf(Pe){for(var Xe=Array(Pe.length>>2),at=0;at>5]|=(Pe.charCodeAt(at/8)&255)<<24-at%32;return Xe}function Ze(Pe){for(var Xe="",at=0;at>5]>>>24-at%32&255);return Xe}function yt(Pe,Xe){return Pe>>>Xe|Pe<<32-Xe}function Wt(Pe,Xe){return Pe>>>Xe}function zt(Pe,Xe,at){return Pe&Xe^~Pe&at}function hr(Pe,Xe,at){return Pe&Xe^Pe&at^Xe&at}function Ur(Pe){return yt(Pe,2)^yt(Pe,13)^yt(Pe,22)}function Qr(Pe){return yt(Pe,6)^yt(Pe,11)^yt(Pe,25)}function cn(Pe){return yt(Pe,7)^yt(Pe,18)^Wt(Pe,3)}function yn(Pe){return yt(Pe,17)^yt(Pe,19)^Wt(Pe,10)}var Fn=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 en(Pe,Xe){var at=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),xt=new Array(64),Et,Bt,St,Pt,$t,Ht,dr,Xr,Or,$r,Er,Tr;for(Pe[Xe>>5]|=128<<24-Xe%32,Pe[(Xe+64>>9<<4)+15]=Xe,Or=0;Or>16)+(Xe>>16)+(at>>16);return xt<<16|at&65535}function mn(Pe){return Array.prototype.slice.call(Pe)}function Pn(Pe){return mn(Pe).join("")}function On(Pe){var Xe=Pe&&Pe.cache,at=0,xt=[],Et=[],Bt=[];function St(Er,Tr){var Rr=Tr&&Tr.stable;if(!Rr){for(var Lr=0;Lr0&&(Er.push(an,"="),Er.push.apply(Er,mn(arguments)),Er.push(";")),an}return e(Tr,{def:Lr,toString:function(){return Pn([Rr.length>0?"var "+Rr.join(",")+";":"",Pn(Er)])}})}function $t(){var Er=Pt(),Tr=Pt(),Rr=Er.toString,Lr=Tr.toString;function an(on,Nn){Tr(on,Nn,"=",Er.def(on,Nn),";")}return e(function(){Er.apply(Er,mn(arguments))},{def:Er.def,entry:Er,exit:Tr,save:an,set:function(on,Nn,Yn){an(on,Nn),Er(on,Nn,"=",Yn,";")},toString:function(){return Rr()+Lr()}})}function Ht(){var Er=Pn(arguments),Tr=$t(),Rr=$t(),Lr=Tr.toString,an=Rr.toString;return e(Tr,{then:function(){return Tr.apply(Tr,mn(arguments)),this},else:function(){return Rr.apply(Rr,mn(arguments)),this},toString:function(){var on=an();return on&&(on="else{"+on+"}"),Pn(["if(",Er,"){",Lr(),"}",on])}})}var dr=Pt(),Xr={};function Or(Er,Tr){var Rr=[];function Lr(){var yi="a"+Rr.length;return Rr.push(yi),yi}Tr=Tr||0;for(var an=0;an[y.viewport.x,y.viewport.y,x.viewportWidth,x.viewportHeight]},attributes:{color:{buffer:o,offset:(x,y)=>y.offset*4,divisor:1},position:{buffer:a,offset:(x,y)=>y.offset*8,divisor:1},positionFract:{buffer:i,offset:(x,y)=>y.offset*8,divisor:1},error:{buffer:s,offset:(x,y)=>y.offset*16,divisor:1},direction:{buffer:l,stride:24,offset:0},lineOffset:{buffer:l,stride:24,offset:8},capOffset:{buffer:l,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:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:JUe.length}),$Ue(f,{update:p,draw:v,destroy:_,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(x){x?p(x):x===null&&_(),v()}function v(x){if(typeof x=="number")return g(x);x&&!Array.isArray(x)&&(x=[x]),e._refresh(),c.forEach((y,C)=>{if(y){if(x&&(x[C]?y.draw=!0:y.draw=!1),!y.draw){y.draw=!0;return}g(C)}})}function g(x){typeof x=="number"&&(x=c[x]),x!=null&&x&&x.count&&x.color&&x.opacity&&x.positions&&x.positions.length>1&&(x.scaleRatio=[x.scale[0]*x.viewport.width,x.scale[1]*x.viewport.height],n(x),x.after&&x.after(x))}function p(x){if(!x)return;x.length!=null?typeof x[0]=="number"&&(x=[{positions:x}]):Array.isArray(x)||(x=[x]);let y=0,C=0;if(f.groups=c=x.map((L,w)=>{let T=c[w];if(L)typeof L=="function"?L={after:L}:typeof L[0]=="number"&&(L={positions:L});else return T;return L=F$t(L,{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"}),T||(c[w]=T={id:w,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},L=$Ue({},u,L)),P$t(T,L,[{lineWidth:A=>+A*.5,capSize:A=>+A*.5,opacity:parseFloat,errors:A=>(A=KUe(A),C+=A.length,A),positions:(A,m)=>(A=KUe(A,"float64"),m.count=Math.floor(A.length/2),m.bounds=C$t(A,2),m.offset=y,y+=m.count,A)},{color:(A,m)=>{let F=m.count;if(A||(A="transparent"),!Array.isArray(A)||typeof A[0]=="number"){let I=A;A=Array(F);for(let R=0;R{let E=m.bounds;return A||(A=E),m.scale=[1/(A[2]-A[0]),1/(A[3]-A[1])],m.translate=[-A[0],-A[1]],m.scaleFract=JZ(m.scale),m.translateFract=JZ(m.translate),A},viewport:A=>{let m;return Array.isArray(A)?m={x:A[0],y:A[1],width:A[2]-A[0],height:A[3]-A[1]}:A?(m={x:A.x||A.left||0,y:A.y||A.top||0},A.right?m.width=A.right-m.x:m.width=A.w||A.width||0,A.bottom?m.height=A.bottom-m.y:m.height=A.h||A.height||0):m={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},m}}]),T}),y||C){let L=c.reduce((m,F,E)=>m+(F?F.count:0),0),w=new Float64Array(L*2),T=new Uint8Array(L*4),A=new Float32Array(L*4);c.forEach((m,F)=>{if(!m)return;let{positions:E,count:I,offset:R,color:B,errors:O}=m;I&&(T.set(B,R*4),A.set(O,R*4),w.set(E,R*2))});var k=D$t(w);a(k);var S=JZ(w,k);i(S),o(T),s(A)}}function _(){a.destroy(),i.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var nVe=fe((qTr,rVe)=>{var tVe=/[\'\"]/;rVe.exports=function(t){return t?(tVe.test(t.charAt(0))&&(t=t.substr(1)),tVe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var QZ=fe((BTr,I$t)=>{I$t.exports=["inherit","initial","unset"]});var e$=fe((OTr,z$t)=>{z$t.exports=["caption","icon","menu","message-box","small-caption","status-bar"]});var t$=fe((NTr,q$t)=>{q$t.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]});var r$=fe((UTr,B$t)=>{B$t.exports=["normal","italic","oblique"]});var n$=fe((VTr,O$t)=>{O$t.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]});var sVe=fe((GTr,oVe)=>{"use strict";function iVe(e,t){if(typeof e!="string")return[e];var r=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],a=t.escape||"___",i=!!t.flat;n.forEach(function(l){var u=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),c=[];function f(v,g,p){var _=r.push(v.slice(l[0].length,-l[1].length))-1;return c.push(_),a+_+a}r.forEach(function(v,g){for(var p,_=0;v!=p;)if(p=v,v=v.replace(u,f),_++>1e4)throw Error("References have circular dependency. Please, check them.");r[g]=v}),c=c.reverse(),r=r.map(function(v){return c.forEach(function(g){v=v.replace(new RegExp("(\\"+a+g+"\\"+a+")","g"),l[0]+"$1"+l[1])}),v})});var o=new RegExp("\\"+a+"([0-9]+)\\"+a);function s(l,u,c){for(var f=[],v,g=0;v=o.exec(l);){if(g++>1e4)throw Error("Circular references in parenthesis");f.push(l.slice(0,v.index)),f.push(s(u[v[1]],u)),l=l.slice(v.index+v[0].length)}return f.push(l),f}return i?r:s(r[0],r)}function aVe(e,t){if(t&&t.flat){var r=t&&t.escape||"___",n=e[0],a;if(!n)return"";for(var i=new RegExp("\\"+r+"([0-9]+)\\"+r),o=0;n!=a;){if(o++>1e4)throw Error("Circular references in "+e);a=n,n=n.replace(i,s)}return n}return e.reduce(function l(u,c){return Array.isArray(c)&&(c=c.reduce(l,"")),u+c},"");function s(l,u){if(e[u]==null)throw Error("Reference "+u+"is undefined");return e[u]}}function i$(e,t){return Array.isArray(e)?aVe(e,t):iVe(e,t)}i$.parse=iVe;i$.stringify=aVe;oVe.exports=i$});var cVe=fe((HTr,uVe)=>{"use strict";var lVe=sVe();uVe.exports=function(t,r,n){if(t==null)throw Error("First argument should be a string");if(r==null)throw Error("Separator should be a string or a RegExp");n?(typeof n=="string"||Array.isArray(n))&&(n={ignore:n}):n={},n.escape==null&&(n.escape=!0),n.ignore==null?n.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof n.ignore=="string"&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map(function(f){return f.length===1&&(f=f+f),f}));var a=lVe.parse(t,{flat:!0,brackets:n.ignore}),i=a[0],o=i.split(r);if(n.escape){for(var s=[],l=0;l{N$t.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]});var a$=fe((WTr,hVe)=>{"use strict";var U$t=fVe();hVe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||U$t.indexOf(t)!==-1}}});var gVe=fe((YTr,pVe)=>{"use strict";var V$t=nVe(),G$t=QZ(),H$t=e$(),j$t=t$(),W$t=r$(),Y$t=n$(),o$=cVe(),X$t=a$().isSize;pVe.exports=vVe;var RM=vVe.cache={};function vVe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(RM[e])return RM[e];if(e==="")throw new Error("Cannot parse an empty string.");if(H$t.indexOf(e)!==-1)return RM[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=o$(e,/\s+/),n;n=r.shift();){if(G$t.indexOf(n)!==-1)return["style","variant","weight","stretch"].forEach(function(i){t[i]=n}),RM[e]=t;if(W$t.indexOf(n)!==-1){t.style=n;continue}if(n==="normal"||n==="small-caps"){t.variant=n;continue}if(Y$t.indexOf(n)!==-1){t.stretch=n;continue}if(j$t.indexOf(n)!==-1){t.weight=n;continue}if(X$t(n)){var a=o$(n,"/");if(t.size=a[0],a[1]!=null?t.lineHeight=dVe(a[1]):r[0]==="/"&&(r.shift(),t.lineHeight=dVe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=o$(r.join(" "),/\s*,\s*/).map(V$t),RM[e]=t}throw new Error("Unknown or unsupported font token: "+n)}throw new Error("Missing required font-size.")}function dVe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var l$=fe((XTr,mVe)=>{"use strict";var Z$t=E1(),$$t=a$().isSize,K$t=zM(QZ()),J$t=zM(e$()),Q$t=zM(t$()),eKt=zM(r$()),tKt=zM(n$()),rKt={normal:1,"small-caps":1},nKt={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},s$={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};mVe.exports=function(t){if(t=Z$t(t,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),t.system)return t.system&&IM(t.system,J$t),t.system;if(IM(t.style,eKt),IM(t.variant,rKt),IM(t.weight,Q$t),IM(t.stretch,tKt),t.size==null&&(t.size=s$.size),typeof t.size=="number"&&(t.size+="px"),!$$t)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=s$.family),Array.isArray(t.family)&&(t.family.length||(t.family=[s$.family]),t.family=t.family.map(function(n){return nKt[n]?n:'"'+n+'"'}).join(", "));var r=[];return r.push(t.style),t.variant!==t.style&&r.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&r.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&r.push(t.stretch),r.push(t.size+(t.lineHeight==null||t.lineHeight==="normal"||t.lineHeight+""=="1"?"":"/"+t.lineHeight)),r.push(t.family),r.filter(Boolean).join(" ")};function IM(e,t){if(e&&!t[e]&&!K$t[e])throw Error("Unknown keyword `"+e+"`");return e}function zM(e){for(var t={},r=0;r{"use strict";yVe.exports={parse:gVe(),stringify:l$()}});var f$=fe((u$,c$)=>{(function(e,t){typeof u$=="object"&&typeof c$!="undefined"?c$.exports=t():e.createREGL=t()})(u$,(function(){"use strict";var e=function(Pe,Xe){for(var at=Object.keys(Xe),xt=0;xt1&&Xe===at&&(Xe==='"'||Xe==="'"))return['"'+o(Pe.substr(1,Pe.length-2))+'"'];var xt=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Pe);if(xt)return s(Pe.substr(0,xt.index)).concat(s(xt[1])).concat(s(Pe.substr(xt.index+xt[0].length)));var Et=Pe.split(".");if(Et.length===1)return['"'+o(Pe)+'"'];for(var Bt=[],St=0;St65535)<<4,Pe>>>=Xe,at=(Pe>255)<<3,Pe>>>=at,Xe|=at,at=(Pe>15)<<2,Pe>>>=at,Xe|=at,at=(Pe>3)<<1,Pe>>>=at,Xe|=at,Xe|Pe>>1}function q(){var Pe=A(8,function(){return[]});function Xe(Bt){var St=U(Bt),Pt=Pe[j(St)>>2];return Pt.length>0?Pt.pop():new ArrayBuffer(St)}function at(Bt){Pe[j(Bt.byteLength)>>2].push(Bt)}function xt(Bt,St){var Pt=null;switch(Bt){case m:Pt=new Int8Array(Xe(St),0,St);break;case F:Pt=new Uint8Array(Xe(St),0,St);break;case E:Pt=new Int16Array(Xe(2*St),0,St);break;case I:Pt=new Uint16Array(Xe(2*St),0,St);break;case R:Pt=new Int32Array(Xe(4*St),0,St);break;case B:Pt=new Uint32Array(Xe(4*St),0,St);break;case O:Pt=new Float32Array(Xe(4*St),0,St);break;default:return null}return Pt.length!==St?Pt.subarray(0,St):Pt}function Et(Bt){at(Bt.buffer)}return{alloc:Xe,free:at,allocType:xt,freeType:Et}}var V=q();V.zero=q();var K=3408,ee=3410,ce=3411,me=3412,ye=3413,ue=3414,J=3415,_e=33901,ne=33902,ae=3379,pe=3386,ie=34921,le=36347,xe=36348,be=35661,De=35660,Ge=34930,pt=36349,tt=34076,Oe=34024,ze=7936,ut=7937,et=7938,qe=35724,we=34047,Le=36063,Ke=34852,Te=3553,Ve=34067,$e=34069,ot=33984,rt=6408,it=5126,We=5121,mt=36160,bt=36053,Yt=36064,jt=16384,mr=function(Pe,Xe){var at=1;Xe.ext_texture_filter_anisotropic&&(at=Pe.getParameter(we));var xt=1,Et=1;Xe.webgl_draw_buffers&&(xt=Pe.getParameter(Ke),Et=Pe.getParameter(Le));var Bt=!!Xe.oes_texture_float;if(Bt){var St=Pe.createTexture();Pe.bindTexture(Te,St),Pe.texImage2D(Te,0,rt,1,1,0,rt,it,null);var Pt=Pe.createFramebuffer();if(Pe.bindFramebuffer(mt,Pt),Pe.framebufferTexture2D(mt,Yt,Te,St,0),Pe.bindTexture(Te,null),Pe.checkFramebufferStatus(mt)!==bt)Bt=!1;else{Pe.viewport(0,0,1,1),Pe.clearColor(1,0,0,1),Pe.clear(jt);var $t=V.allocType(it,4);Pe.readPixels(0,0,1,1,rt,it,$t),Pe.getError()?Bt=!1:(Pe.deleteFramebuffer(Pt),Pe.deleteTexture(St),Bt=$t[0]===1),V.freeType($t)}}var Ht=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),dr=!0;if(!Ht){var Xr=Pe.createTexture(),Or=V.allocType(We,36);Pe.activeTexture(ot),Pe.bindTexture(Ve,Xr),Pe.texImage2D($e,0,rt,3,3,0,rt,We,Or),V.freeType(Or),Pe.bindTexture(Ve,null),Pe.deleteTexture(Xr),dr=!Pe.getError()}return{colorBits:[Pe.getParameter(ee),Pe.getParameter(ce),Pe.getParameter(me),Pe.getParameter(ye)],depthBits:Pe.getParameter(ue),stencilBits:Pe.getParameter(J),subpixelBits:Pe.getParameter(K),extensions:Object.keys(Xe).filter(function($r){return!!Xe[$r]}),maxAnisotropic:at,maxDrawbuffers:xt,maxColorAttachments:Et,pointSizeDims:Pe.getParameter(_e),lineWidthDims:Pe.getParameter(ne),maxViewportDims:Pe.getParameter(pe),maxCombinedTextureUnits:Pe.getParameter(be),maxCubeMapSize:Pe.getParameter(tt),maxRenderbufferSize:Pe.getParameter(Oe),maxTextureUnits:Pe.getParameter(Ge),maxTextureSize:Pe.getParameter(ae),maxAttributes:Pe.getParameter(ie),maxVertexUniforms:Pe.getParameter(le),maxVertexTextureUnits:Pe.getParameter(De),maxVaryingVectors:Pe.getParameter(xe),maxFragmentUniforms:Pe.getParameter(pt),glsl:Pe.getParameter(qe),renderer:Pe.getParameter(ut),vendor:Pe.getParameter(ze),version:Pe.getParameter(et),readFloat:Bt,npotTextureCube:dr}},or=function(Pe){return Pe instanceof Uint8Array||Pe instanceof Uint16Array||Pe instanceof Uint32Array||Pe instanceof Int8Array||Pe instanceof Int16Array||Pe instanceof Int32Array||Pe instanceof Float32Array||Pe instanceof Float64Array||Pe instanceof Uint8ClampedArray};function fr(Pe){return!!Pe&&typeof Pe=="object"&&Array.isArray(Pe.shape)&&Array.isArray(Pe.stride)&&typeof Pe.offset=="number"&&Pe.shape.length===Pe.stride.length&&(Array.isArray(Pe.data)||or(Pe.data))}var Ot=function(Pe){return Object.keys(Pe).map(function(Xe){return Pe[Xe]})},cr={shape:ft,flatten:Lt};function Ct(Pe,Xe,at){for(var xt=0;xt0){var yi;if(Array.isArray(Rr[0])){Yn=Ut(Rr);for(var Sn=1,An=1;An0){if(typeof Sn[0]=="number"){var jn=V.allocType(on.dtype,Sn.length);Ii(jn,Sn),Yn(jn,li),V.freeType(jn)}else if(Array.isArray(Sn[0])||or(Sn[0])){Vn=Ut(Sn);var Wn=Qt(Sn,Vn,on.dtype);Yn(Wn,li),V.freeType(Wn)}}}else if(fr(Sn)){Vn=Sn.shape;var si=Sn.stride,zi=0,da=0,ui=0,Li=0;Vn.length===1?(zi=Vn[0],da=1,ui=si[0],Li=0):Vn.length===2&&(zi=Vn[0],da=Vn[1],ui=si[0],Li=si[1]);var Ki=Array.isArray(Sn.data)?on.dtype:Jn(Sn.data),ca=V.allocType(Ki,zi*da);Vi(ca,Sn.data,zi,da,ui,Li,Sn.offset),Yn(ca,li),V.freeType(ca)}return Nn}return Lr||Nn(Tr),Nn._reglType="buffer",Nn._buffer=on,Nn.subdata=yi,at.profile&&(Nn.stats=on.stats),Nn.destroy=function(){Or(on)},Nn}function Er(){Ot(Bt).forEach(function(Tr){Tr.buffer=Pe.createBuffer(),Pe.bindBuffer(Tr.type,Tr.buffer),Pe.bufferData(Tr.type,Tr.persistentData||Tr.byteLength,Tr.usage)})}return at.profile&&(Xe.getTotalBufferSize=function(){var Tr=0;return Object.keys(Bt).forEach(function(Rr){Tr+=Bt[Rr].stats.size}),Tr}),{create:$r,createStream:$t,destroyStream:Ht,clear:function(){Ot(Bt).forEach(Or),Pt.forEach(Or)},getBuffer:function(Tr){return Tr&&Tr._buffer instanceof St?Tr._buffer:null},restore:Er,_initBuffer:Xr}}var ha=0,va=0,Xi=1,oa=1,Ma=4,Ga=4,ss={points:ha,point:va,lines:Xi,line:oa,triangles:Ma,triangle:Ga,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},yo=0,sl=1,ko=4,ao=5120,Da=5121,bl=5122,wo=5123,Zs=5124,su=5125,fc=34963,Af=35040,ct=35044;function Jt(Pe,Xe,at,xt){var Et={},Bt=0,St={uint8:Da,uint16:wo};Xe.oes_element_index_uint&&(St.uint32=su);function Pt(Er){this.id=Bt++,Et[this.id]=this,this.buffer=Er,this.primType=ko,this.vertCount=0,this.type=0}Pt.prototype.bind=function(){this.buffer.bind()};var $t=[];function Ht(Er){var Tr=$t.pop();return Tr||(Tr=new Pt(at.create(null,fc,!0,!1)._buffer)),Xr(Tr,Er,Af,-1,-1,0,0),Tr}function dr(Er){$t.push(Er)}function Xr(Er,Tr,Rr,Lr,an,on,Nn){Er.buffer.bind();var Yn;if(Tr){var yi=Nn;!Nn&&(!or(Tr)||fr(Tr)&&!or(Tr.data))&&(yi=Xe.oes_element_index_uint?su:wo),at._initBuffer(Er.buffer,Tr,Rr,yi,3)}else Pe.bufferData(fc,on,Rr),Er.buffer.dtype=Yn||Da,Er.buffer.usage=Rr,Er.buffer.dimension=3,Er.buffer.byteLength=on;if(Yn=Nn,!Nn){switch(Er.buffer.dtype){case Da:case ao:Yn=Da;break;case wo:case bl:Yn=wo;break;case su:case Zs:Yn=su;break;default:}Er.buffer.dtype=Yn}Er.type=Yn;var Sn=an;Sn<0&&(Sn=Er.buffer.byteLength,Yn===wo?Sn>>=1:Yn===su&&(Sn>>=2)),Er.vertCount=Sn;var An=Lr;if(Lr<0){An=ko;var li=Er.buffer.dimension;li===1&&(An=yo),li===2&&(An=sl),li===3&&(An=ko)}Er.primType=An}function Or(Er){xt.elementsCount--,delete Et[Er.id],Er.buffer.destroy(),Er.buffer=null}function $r(Er,Tr){var Rr=at.create(null,fc,!0),Lr=new Pt(Rr._buffer);xt.elementsCount++;function an(on){if(!on)Rr(),Lr.primType=ko,Lr.vertCount=0,Lr.type=Da;else if(typeof on=="number")Rr(on),Lr.primType=ko,Lr.vertCount=on|0,Lr.type=Da;else{var Nn=null,Yn=ct,yi=-1,Sn=-1,An=0,li=0;Array.isArray(on)||or(on)||fr(on)?Nn=on:("data"in on&&(Nn=on.data),"usage"in on&&(Yn=Vt[on.usage]),"primitive"in on&&(yi=ss[on.primitive]),"count"in on&&(Sn=on.count|0),"type"in on&&(li=St[on.type]),"length"in on?An=on.length|0:(An=Sn,li===wo||li===bl?An*=2:(li===su||li===Zs)&&(An*=4))),Xr(Lr,Nn,Yn,yi,Sn,An,li)}return an}return an(Er),an._reglType="elements",an._elements=Lr,an.subdata=function(on,Nn){return Rr.subdata(on,Nn),an},an.destroy=function(){Or(Lr)},an}return{create:$r,createStream:Ht,destroyStream:dr,getElements:function(Er){return typeof Er=="function"&&Er._elements instanceof Pt?Er._elements:null},clear:function(){Ot(Et).forEach(Or)}}}var er=new Float32Array(1),wr=new Uint32Array(er.buffer),nn=5123;function Dr(Pe){for(var Xe=V.allocType(nn,Pe.length),at=0;at>>31<<15,Bt=(xt<<1>>>24)-127,St=xt>>13&1023;if(Bt<-24)Xe[at]=Et;else if(Bt<-14){var Pt=-14-Bt;Xe[at]=Et+(St+1024>>Pt)}else Bt>15?Xe[at]=Et+31744:Xe[at]=Et+(Bt+15<<10)+St}return Xe}function bn(Pe){return Array.isArray(Pe)||or(Pe)}var Yr=34467,Tn=3553,Kn=34067,Qn=34069,Ai=6408,Qi=6406,Ra=6407,ii=6409,Za=6410,ja=32854,qo=32855,$a=36194,Ka=32819,Oa=32820,Ni=33635,ka=34042,vs=6402,xo=34041,so=35904,oo=35906,Co=36193,pa=33776,la=33777,As=33778,Ms=33779,xu=35986,rs=35987,Ls=34798,$s=35840,Kc=35841,_u=35842,Gu=35843,Ja=36196,ps=5121,Sa=5123,ma=5125,Ps=5126,Ca=10242,Pl=10243,ll=10497,Jc=33071,lu=33648,Mf=10240,Bd=10241,Hu=9728,Sf=9729,kc=9984,Uo=9985,ns=9986,Ks=9987,Ef=33170,ju=4352,gs=4353,bu=4354,kf=34046,ah=3317,Od=37440,Qc=37441,uu=37443,oh=37444,hc=33984,Fl=[kc,ns,Uo,Ks],Zo=[0,ii,Za,Ra,Ai],Ro={};Ro[ii]=Ro[Qi]=Ro[vs]=1,Ro[xo]=Ro[Za]=2,Ro[Ra]=Ro[so]=3,Ro[Ai]=Ro[oo]=4;function is(Pe){return"[object "+Pe+"]"}var Dl=is("HTMLCanvasElement"),dc=is("OffscreenCanvas"),ef=is("CanvasRenderingContext2D"),Cc=is("ImageBitmap"),sh=is("HTMLImageElement"),X0=is("HTMLVideoElement"),Nd=Object.keys(kt).concat([Dl,dc,ef,Cc,sh,X0]),Cf=[];Cf[ps]=1,Cf[Ps]=4,Cf[Co]=2,Cf[Sa]=2,Cf[ma]=4;var Vo=[];Vo[ja]=2,Vo[qo]=2,Vo[$a]=2,Vo[xo]=4,Vo[pa]=.5,Vo[la]=.5,Vo[As]=1,Vo[Ms]=1,Vo[xu]=.5,Vo[rs]=1,Vo[Ls]=1,Vo[$s]=.5,Vo[Kc]=.25,Vo[_u]=.5,Vo[Gu]=.25,Vo[Ja]=.5;function Ud(Pe){return Array.isArray(Pe)&&(Pe.length===0||typeof Pe[0]=="number")}function zh(Pe){if(!Array.isArray(Pe))return!1;var Xe=Pe.length;return!(Xe===0||!bn(Pe[0]))}function tf(Pe){return Object.prototype.toString.call(Pe)}function Vd(Pe){return tf(Pe)===Dl}function rf(Pe){return tf(Pe)===dc}function qh(Pe){return tf(Pe)===ef}function vc(Pe){return tf(Pe)===Cc}function dd(Pe){return tf(Pe)===sh}function Bh(Pe){return tf(Pe)===X0}function Wu(Pe){if(!Pe)return!1;var Xe=tf(Pe);return Nd.indexOf(Xe)>=0?!0:Ud(Pe)||zh(Pe)||fr(Pe)}function vd(Pe){return kt[Object.prototype.toString.call(Pe)]|0}function pd(Pe,Xe){var at=Xe.length;switch(Pe.type){case ps:case Sa:case ma:case Ps:var xt=V.allocType(Pe.type,at);xt.set(Xe),Pe.data=xt;break;case Co:Pe.data=Dr(Xe);break;default:}}function lh(Pe,Xe){return V.allocType(Pe.type===Co?Ps:Pe.type,Xe)}function nf(Pe,Xe){Pe.type===Co?(Pe.data=Dr(Xe),V.freeType(Xe)):Pe.data=Xe}function uh(Pe,Xe,at,xt,Et,Bt){for(var St=Pe.width,Pt=Pe.height,$t=Pe.channels,Ht=St*Pt*$t,dr=lh(Pe,Ht),Xr=0,Or=0;Or=1;)Pt+=St*$t*$t,$t/=2;return Pt}else return St*at*xt}function gd(Pe,Xe,at,xt,Et,Bt,St){var Pt={"don't care":ju,"dont care":ju,nice:bu,fast:gs},$t={repeat:ll,clamp:Jc,mirror:lu},Ht={nearest:Hu,linear:Sf},dr=e({mipmap:Ks,"nearest mipmap nearest":kc,"linear mipmap nearest":Uo,"nearest mipmap linear":ns,"linear mipmap linear":Ks},Ht),Xr={none:0,browser:oh},Or={uint8:ps,rgba4:Ka,rgb565:Ni,"rgb5 a1":Oa},$r={alpha:Qi,luminance:ii,"luminance alpha":Za,rgb:Ra,rgba:Ai,rgba4:ja,"rgb5 a1":qo,rgb565:$a},Er={};Xe.ext_srgb&&($r.srgb=so,$r.srgba=oo),Xe.oes_texture_float&&(Or.float32=Or.float=Ps),Xe.oes_texture_half_float&&(Or.float16=Or["half float"]=Co),Xe.webgl_depth_texture&&(e($r,{depth:vs,"depth stencil":xo}),e(Or,{uint16:Sa,uint32:ma,"depth stencil":ka})),Xe.webgl_compressed_texture_s3tc&&e(Er,{"rgb s3tc dxt1":pa,"rgba s3tc dxt1":la,"rgba s3tc dxt3":As,"rgba s3tc dxt5":Ms}),Xe.webgl_compressed_texture_atc&&e(Er,{"rgb atc":xu,"rgba atc explicit alpha":rs,"rgba atc interpolated alpha":Ls}),Xe.webgl_compressed_texture_pvrtc&&e(Er,{"rgb pvrtc 4bppv1":$s,"rgb pvrtc 2bppv1":Kc,"rgba pvrtc 4bppv1":_u,"rgba pvrtc 2bppv1":Gu}),Xe.webgl_compressed_texture_etc1&&(Er["rgb etc1"]=Ja);var Tr=Array.prototype.slice.call(Pe.getParameter(Yr));Object.keys(Er).forEach(function(vr){var gn=Er[vr];Tr.indexOf(gn)>=0&&($r[vr]=gn)});var Rr=Object.keys($r);at.textureFormats=Rr;var Lr=[];Object.keys($r).forEach(function(vr){var gn=$r[vr];Lr[gn]=vr});var an=[];Object.keys(Or).forEach(function(vr){var gn=Or[vr];an[gn]=vr});var on=[];Object.keys(Ht).forEach(function(vr){var gn=Ht[vr];on[gn]=vr});var Nn=[];Object.keys(dr).forEach(function(vr){var gn=dr[vr];Nn[gn]=vr});var Yn=[];Object.keys($t).forEach(function(vr){var gn=$t[vr];Yn[gn]=vr});var yi=Rr.reduce(function(vr,gn){var xn=$r[gn];return xn===ii||xn===Qi||xn===ii||xn===Za||xn===vs||xn===xo||Xe.ext_srgb&&(xn===so||xn===oo)?vr[xn]=xn:xn===qo||gn.indexOf("rgba")>=0?vr[xn]=Ai:vr[xn]=Ra,vr},{});function Sn(){this.internalformat=Ai,this.format=Ai,this.type=ps,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=oh,this.width=0,this.height=0,this.channels=0}function An(vr,gn){vr.internalformat=gn.internalformat,vr.format=gn.format,vr.type=gn.type,vr.compressed=gn.compressed,vr.premultiplyAlpha=gn.premultiplyAlpha,vr.flipY=gn.flipY,vr.unpackAlignment=gn.unpackAlignment,vr.colorSpace=gn.colorSpace,vr.width=gn.width,vr.height=gn.height,vr.channels=gn.channels}function li(vr,gn){if(!(typeof gn!="object"||!gn)){if("premultiplyAlpha"in gn&&(vr.premultiplyAlpha=gn.premultiplyAlpha),"flipY"in gn&&(vr.flipY=gn.flipY),"alignment"in gn&&(vr.unpackAlignment=gn.alignment),"colorSpace"in gn&&(vr.colorSpace=Xr[gn.colorSpace]),"type"in gn){var xn=gn.type;vr.type=Or[xn]}var Gi=vr.width,To=vr.height,xs=vr.channels,Hi=!1;"shape"in gn?(Gi=gn.shape[0],To=gn.shape[1],gn.shape.length===3&&(xs=gn.shape[2],Hi=!0)):("radius"in gn&&(Gi=To=gn.radius),"width"in gn&&(Gi=gn.width),"height"in gn&&(To=gn.height),"channels"in gn&&(xs=gn.channels,Hi=!0)),vr.width=Gi|0,vr.height=To|0,vr.channels=xs|0;var ar=!1;if("format"in gn){var gr=gn.format,Pr=vr.internalformat=$r[gr];vr.format=yi[Pr],gr in Or&&("type"in gn||(vr.type=Or[gr])),gr in Er&&(vr.compressed=!0),ar=!0}!Hi&&ar?vr.channels=Ro[vr.format]:Hi&&!ar&&vr.channels!==Zo[vr.format]&&(vr.format=vr.internalformat=Zo[vr.channels])}}function Vn(vr){Pe.pixelStorei(Od,vr.flipY),Pe.pixelStorei(Qc,vr.premultiplyAlpha),Pe.pixelStorei(uu,vr.colorSpace),Pe.pixelStorei(ah,vr.unpackAlignment)}function jn(){Sn.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Wn(vr,gn){var xn=null;if(Wu(gn)?xn=gn:gn&&(li(vr,gn),"x"in gn&&(vr.xOffset=gn.x|0),"y"in gn&&(vr.yOffset=gn.y|0),Wu(gn.data)&&(xn=gn.data)),gn.copy){var Gi=Et.viewportWidth,To=Et.viewportHeight;vr.width=vr.width||Gi-vr.xOffset,vr.height=vr.height||To-vr.yOffset,vr.needsCopy=!0}else if(!xn)vr.width=vr.width||1,vr.height=vr.height||1,vr.channels=vr.channels||4;else if(or(xn))vr.channels=vr.channels||4,vr.data=xn,!("type"in gn)&&vr.type===ps&&(vr.type=vd(xn));else if(Ud(xn))vr.channels=vr.channels||4,pd(vr,xn),vr.alignment=1,vr.needsFree=!0;else if(fr(xn)){var xs=xn.data;!Array.isArray(xs)&&vr.type===ps&&(vr.type=vd(xs));var Hi=xn.shape,ar=xn.stride,gr,Pr,pn,Mn,sn,tn;Hi.length===3?(pn=Hi[2],tn=ar[2]):(pn=1,tn=1),gr=Hi[0],Pr=Hi[1],Mn=ar[0],sn=ar[1],vr.alignment=1,vr.width=gr,vr.height=Pr,vr.channels=pn,vr.format=vr.internalformat=Zo[pn],vr.needsFree=!0,uh(vr,xs,Mn,sn,tn,xn.offset)}else if(Vd(xn)||rf(xn)||qh(xn))Vd(xn)||rf(xn)?vr.element=xn:vr.element=xn.canvas,vr.width=vr.element.width,vr.height=vr.element.height,vr.channels=4;else if(vc(xn))vr.element=xn,vr.width=xn.width,vr.height=xn.height,vr.channels=4;else if(dd(xn))vr.element=xn,vr.width=xn.naturalWidth,vr.height=xn.naturalHeight,vr.channels=4;else if(Bh(xn))vr.element=xn,vr.width=xn.videoWidth,vr.height=xn.videoHeight,vr.channels=4;else if(zh(xn)){var Hr=vr.width||xn[0].length,Mr=vr.height||xn.length,zr=vr.channels;bn(xn[0][0])?zr=zr||xn[0][0].length:zr=zr||1;for(var yr=cr.shape(xn),hn=1,kn=0;kn>=To,xn.height>>=To,Wn(xn,Gi[To]),vr.mipmask|=1<=0&&!("faces"in gn)&&(vr.genMipmaps=!0)}if("mag"in gn){var Gi=gn.mag;vr.magFilter=Ht[Gi]}var To=vr.wrapS,xs=vr.wrapT;if("wrap"in gn){var Hi=gn.wrap;typeof Hi=="string"?To=xs=$t[Hi]:Array.isArray(Hi)&&(To=$t[Hi[0]],xs=$t[Hi[1]])}else{if("wrapS"in gn){var ar=gn.wrapS;To=$t[ar]}if("wrapT"in gn){var gr=gn.wrapT;xs=$t[gr]}}if(vr.wrapS=To,vr.wrapT=xs,"anisotropic"in gn){var Pr=gn.anisotropic;vr.anisotropic=gn.anisotropic}if("mipmap"in gn){var pn=!1;switch(typeof gn.mipmap){case"string":vr.mipmapHint=Pt[gn.mipmap],vr.genMipmaps=!0,pn=!0;break;case"boolean":pn=vr.genMipmaps=gn.mipmap;break;case"object":vr.genMipmaps=!1,pn=!0;break;default:}pn&&!("min"in gn)&&(vr.minFilter=kc)}}function po(vr,gn){Pe.texParameteri(gn,Bd,vr.minFilter),Pe.texParameteri(gn,Mf,vr.magFilter),Pe.texParameteri(gn,Ca,vr.wrapS),Pe.texParameteri(gn,Pl,vr.wrapT),Xe.ext_texture_filter_anisotropic&&Pe.texParameteri(gn,kf,vr.anisotropic),vr.genMipmaps&&(Pe.hint(Ef,vr.mipmapHint),Pe.generateMipmap(gn))}var $o=0,no={},Us=at.maxTextureUnits,ql=Array(Us).map(function(){return null});function Ta(vr){Sn.call(this),this.mipmask=0,this.internalformat=Ai,this.id=$o++,this.refCount=1,this.target=vr,this.texture=Pe.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new vo,St.profile&&(this.stats={size:0})}function vu(vr){Pe.activeTexture(hc),Pe.bindTexture(vr.target,vr.texture)}function ys(){var vr=ql[0];vr?Pe.bindTexture(vr.target,vr.texture):Pe.bindTexture(Tn,null)}function xc(vr){var gn=vr.texture,xn=vr.unit,Gi=vr.target;xn>=0&&(Pe.activeTexture(hc+xn),Pe.bindTexture(Gi,null),ql[xn]=null),Pe.deleteTexture(gn),vr.texture=null,vr.params=null,vr.pixels=null,vr.refCount=0,delete no[vr.id],Bt.textureCount--}e(Ta.prototype,{bind:function(){var vr=this;vr.bindCount+=1;var gn=vr.unit;if(gn<0){for(var xn=0;xn0)continue;Gi.unit=-1}ql[xn]=vr,gn=xn;break}gn>=Us,St.profile&&Bt.maxTextureUnits>sn)-pn,tn.height=tn.height||(xn.height>>sn)-Mn,vu(xn),zi(tn,Tn,pn,Mn,sn),ys(),Li(tn),Gi}function xs(Hi,ar){var gr=Hi|0,Pr=ar|0||gr;if(gr===xn.width&&Pr===xn.height)return Gi;Gi.width=xn.width=gr,Gi.height=xn.height=Pr,vu(xn);for(var pn=0;xn.mipmask>>pn;++pn){var Mn=gr>>pn,sn=Pr>>pn;if(!Mn||!sn)break;Pe.texImage2D(Tn,pn,xn.format,Mn,sn,0,xn.format,xn.type,null)}return ys(),St.profile&&(xn.stats.size=af(xn.internalformat,xn.type,gr,Pr,!1,!1)),Gi}return Gi(vr,gn),Gi.subimage=To,Gi.resize=xs,Gi._reglType="texture2d",Gi._texture=xn,St.profile&&(Gi.stats=xn.stats),Gi.destroy=function(){xn.decRef()},Gi}function $l(vr,gn,xn,Gi,To,xs){var Hi=new Ta(Kn);no[Hi.id]=Hi,Bt.cubeCount++;var ar=new Array(6);function gr(Mn,sn,tn,Hr,Mr,zr){var yr,hn=Hi.texInfo;for(vo.call(hn),yr=0;yr<6;++yr)ar[yr]=Na();if(typeof Mn=="number"||!Mn){var kn=Mn|0||1;for(yr=0;yr<6;++yr)ca(ar[yr],kn,kn)}else if(typeof Mn=="object")if(sn)Ia(ar[0],Mn),Ia(ar[1],sn),Ia(ar[2],tn),Ia(ar[3],Hr),Ia(ar[4],Mr),Ia(ar[5],zr);else if(bo(hn,Mn),li(Hi,Mn),"faces"in Mn){var Xn=Mn.faces;for(yr=0;yr<6;++yr)An(ar[yr],Hi),Ia(ar[yr],Xn[yr])}else for(yr=0;yr<6;++yr)Ia(ar[yr],Mn);for(An(Hi,ar[0]),hn.genMipmaps?Hi.mipmask=(ar[0].width<<1)-1:Hi.mipmask=ar[0].mipmask,Hi.internalformat=ar[0].internalformat,gr.width=ar[0].width,gr.height=ar[0].height,vu(Hi),yr=0;yr<6;++yr)Os(ar[yr],Qn+yr);for(po(hn,Kn),ys(),St.profile&&(Hi.stats.size=af(Hi.internalformat,Hi.type,gr.width,gr.height,hn.genMipmaps,!0)),gr.format=Lr[Hi.internalformat],gr.type=an[Hi.type],gr.mag=on[hn.magFilter],gr.min=Nn[hn.minFilter],gr.wrapS=Yn[hn.wrapS],gr.wrapT=Yn[hn.wrapT],yr=0;yr<6;++yr)Ns(ar[yr]);return gr}function Pr(Mn,sn,tn,Hr,Mr){var zr=tn|0,yr=Hr|0,hn=Mr|0,kn=ui();return An(kn,Hi),kn.width=0,kn.height=0,Wn(kn,sn),kn.width=kn.width||(Hi.width>>hn)-zr,kn.height=kn.height||(Hi.height>>hn)-yr,vu(Hi),zi(kn,Qn+Mn,zr,yr,hn),ys(),Li(kn),gr}function pn(Mn){var sn=Mn|0;if(sn!==Hi.width){gr.width=Hi.width=sn,gr.height=Hi.height=sn,vu(Hi);for(var tn=0;tn<6;++tn)for(var Hr=0;Hi.mipmask>>Hr;++Hr)Pe.texImage2D(Qn+tn,Hr,Hi.format,sn>>Hr,sn>>Hr,0,Hi.format,Hi.type,null);return ys(),St.profile&&(Hi.stats.size=af(Hi.internalformat,Hi.type,gr.width,gr.height,!1,!0)),gr}}return gr(vr,gn,xn,Gi,To,xs),gr.subimage=Pr,gr.resize=pn,gr._reglType="textureCube",gr._texture=Hi,St.profile&&(gr.stats=Hi.stats),gr.destroy=function(){Hi.decRef()},gr}function xa(){for(var vr=0;vr>Gi,xn.height>>Gi,0,xn.internalformat,xn.type,null);else for(var To=0;To<6;++To)Pe.texImage2D(Qn+To,Gi,xn.internalformat,xn.width>>Gi,xn.height>>Gi,0,xn.internalformat,xn.type,null);po(xn.texInfo,xn.target)})}function Es(){for(var vr=0;vr=0?Ns=!0:$t.indexOf(vo)>=0&&(Ns=!1))),("depthTexture"in Ta||"depthStencilTexture"in Ta)&&(ql=!!(Ta.depthTexture||Ta.depthStencilTexture)),"depth"in Ta&&(typeof Ta.depth=="boolean"?Os=Ta.depth:($o=Ta.depth,Ss=!1)),"stencil"in Ta&&(typeof Ta.stencil=="boolean"?Ss=Ta.stencil:(no=Ta.stencil,Os=!1)),"depthStencil"in Ta&&(typeof Ta.depthStencil=="boolean"?Os=Ss=Ta.depthStencil:(Us=Ta.depthStencil,Os=!1,Ss=!1))}var ys=null,xc=null,Zl=null,$l=null;if(Array.isArray(Na))ys=Na.map(Er);else if(Na)ys=[Er(Na)];else for(ys=new Array(po),Ki=0;Ki0&&(Li.depth=Wn[0].depth,Li.stencil=Wn[0].stencil,Li.depthStencil=Wn[0].depthStencil),Wn[ui]?Wn[ui](Li):Wn[ui]=An(Li)}return e(si,{width:Ki,height:Ki,color:vo})}function zi(da){var ui,Li=da|0;if(Li===si.width)return si;var Ki=si.color;for(ui=0;ui=Ki.byteLength?ca.subdata(Ki):(ca.destroy(),An.buffers[da]=null)),An.buffers[da]||(ca=An.buffers[da]=Et.create(ui,pc,!1,!0)),Li.buffer=Et.getBuffer(ca),Li.size=Li.buffer.dimension|0,Li.normalized=!1,Li.type=Li.buffer.dtype,Li.offset=0,Li.stride=0,Li.divisor=0,Li.state=1,si[da]=1}else Et.getBuffer(ui)?(Li.buffer=Et.getBuffer(ui),Li.size=Li.buffer.dimension|0,Li.normalized=!1,Li.type=Li.buffer.dtype,Li.offset=0,Li.stride=0,Li.divisor=0,Li.state=1):Et.getBuffer(ui.buffer)?(Li.buffer=Et.getBuffer(ui.buffer),Li.size=(+ui.size||Li.buffer.dimension)|0,Li.normalized=!!ui.normalized||!1,"type"in ui?Li.type=Cn[ui.type]:Li.type=Li.buffer.dtype,Li.offset=(ui.offset||0)|0,Li.stride=(ui.stride||0)|0,Li.divisor=(ui.divisor||0)|0,Li.state=1):"x"in ui&&(Li.x=+ui.x||0,Li.y=+ui.y||0,Li.z=+ui.z||0,Li.w=+ui.w||0,Li.state=2)}for(var Ia=0;Ia1)for(var Vn=0;VnTr&&(Tr=Rr.stats.uniformsCount)}),Tr},at.getMaxAttributesCount=function(){var Tr=0;return dr.forEach(function(Rr){Rr.stats.attributesCount>Tr&&(Tr=Rr.stats.attributesCount)}),Tr});function Er(){Et={},Bt={};for(var Tr=0;Tr16&&(at=en(at,Pe.length*8));for(var xt=Array(16),Et=Array(16),Bt=0;Bt<16;Bt++)xt[Bt]=at[Bt]^909522486,Et[Bt]=at[Bt]^1549556828;var St=en(xt.concat(qf(Xe)),512+Xe.length*8);return Ze(en(Et.concat(St),768))}function Wl(Pe){for(var Xe=Hh?"0123456789ABCDEF":"0123456789abcdef",at="",xt,Et=0;Et>>4&15)+Xe.charAt(xt&15);return at}function If(Pe){for(var Xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",at="",xt=Pe.length,Et=0;EtPe.length*8?at+=Z0:at+=Xe.charAt(Bt>>>6*(3-St)&63);return at}function vh(Pe,Xe){var at=Xe.length,xt=Array(),Et,Bt,St,Pt,$t=Array(Math.ceil(Pe.length/2));for(Et=0;Et<$t.length;Et++)$t[Et]=Pe.charCodeAt(Et*2)<<8|Pe.charCodeAt(Et*2+1);for(;$t.length>0;){for(Pt=Array(),St=0,Et=0;Et<$t.length;Et++)St=(St<<16)+$t[Et],Bt=Math.floor(St/at),St-=Bt*at,(Pt.length>0||Bt>0)&&(Pt[Pt.length]=Bt);xt[xt.length]=St,$t=Pt}var Ht="";for(Et=xt.length-1;Et>=0;Et--)Ht+=Xe.charAt(xt[Et]);var dr=Math.ceil(Pe.length*8/(Math.log(Xe.length)/Math.log(2)));for(Et=Ht.length;Et>>6&31,128|xt&63):xt<=65535?Xe+=String.fromCharCode(224|xt>>>12&15,128|xt>>>6&63,128|xt&63):xt<=2097151&&(Xe+=String.fromCharCode(240|xt>>>18&7,128|xt>>>12&63,128|xt>>>6&63,128|xt&63));return Xe}function qf(Pe){for(var Xe=Array(Pe.length>>2),at=0;at>5]|=(Pe.charCodeAt(at/8)&255)<<24-at%32;return Xe}function Ze(Pe){for(var Xe="",at=0;at>5]>>>24-at%32&255);return Xe}function yt(Pe,Xe){return Pe>>>Xe|Pe<<32-Xe}function Wt(Pe,Xe){return Pe>>>Xe}function zt(Pe,Xe,at){return Pe&Xe^~Pe&at}function hr(Pe,Xe,at){return Pe&Xe^Pe&at^Xe&at}function Ur(Pe){return yt(Pe,2)^yt(Pe,13)^yt(Pe,22)}function Qr(Pe){return yt(Pe,6)^yt(Pe,11)^yt(Pe,25)}function cn(Pe){return yt(Pe,7)^yt(Pe,18)^Wt(Pe,3)}function yn(Pe){return yt(Pe,17)^yt(Pe,19)^Wt(Pe,10)}var Fn=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 en(Pe,Xe){var at=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),xt=new Array(64),Et,Bt,St,Pt,$t,Ht,dr,Xr,Or,$r,Er,Tr;for(Pe[Xe>>5]|=128<<24-Xe%32,Pe[(Xe+64>>9<<4)+15]=Xe,Or=0;Or>16)+(Xe>>16)+(at>>16);return xt<<16|at&65535}function mn(Pe){return Array.prototype.slice.call(Pe)}function Pn(Pe){return mn(Pe).join("")}function On(Pe){var Xe=Pe&&Pe.cache,at=0,xt=[],Et=[],Bt=[];function St(Er,Tr){var Rr=Tr&&Tr.stable;if(!Rr){for(var Lr=0;Lr0&&(Er.push(an,"="),Er.push.apply(Er,mn(arguments)),Er.push(";")),an}return e(Tr,{def:Lr,toString:function(){return Pn([Rr.length>0?"var "+Rr.join(",")+";":"",Pn(Er)])}})}function $t(){var Er=Pt(),Tr=Pt(),Rr=Er.toString,Lr=Tr.toString;function an(on,Nn){Tr(on,Nn,"=",Er.def(on,Nn),";")}return e(function(){Er.apply(Er,mn(arguments))},{def:Er.def,entry:Er,exit:Tr,save:an,set:function(on,Nn,Yn){an(on,Nn),Er(on,Nn,"=",Yn,";")},toString:function(){return Rr()+Lr()}})}function Ht(){var Er=Pn(arguments),Tr=$t(),Rr=$t(),Lr=Tr.toString,an=Rr.toString;return e(Tr,{then:function(){return Tr.apply(Tr,mn(arguments)),this},else:function(){return Rr.apply(Rr,mn(arguments)),this},toString:function(){var on=an();return on&&(on="else{"+on+"}"),Pn(["if(",Er,"){",Lr(),"}",on])}})}var dr=Pt(),Xr={};function Or(Er,Tr){var Rr=[];function Lr(){var yi="a"+Rr.length;return Rr.push(yi),yi}Tr=Tr||0;for(var an=0;an":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},br={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},kr={cw:ve,ccw:Se};function Gr(Pe){return Array.isArray(Pe)||or(Pe)||fr(Pe)}function Wr(Pe){return Pe.sort(function(Xe,at){return Xe===Al?-1:at===Al?1:Xe=1,xt>=2,Xe)}else if(at===Ha){var Et=Pe.data;return new Ar(Et.thisDep,Et.contextDep,Et.propDep,Xe)}else{if(at===Qa)return new Ar(!1,!1,!1,Xe);if(at===Ya){for(var Bt=!1,St=!1,Pt=!1,$t=0;$t=1&&(St=!0),dr>=2&&(Pt=!0)}else Ht.type===Ha&&(Bt=Bt||Ht.data.thisDep,St=St||Ht.data.contextDep,Pt=Pt||Ht.data.propDep)}return new Ar(Bt,St,Pt,Xe)}else return new Ar(at===na,at===Zi,at===Gn,Xe)}}var ai=new Ar(!1,!1,!1,function(){});function Mi(Pe,Xe,at,xt,Et,Bt,St,Pt,$t,Ht,dr,Xr,Or,$r,Er,Tr){var Rr=Ht.Record,Lr={add:32774,subtract:32778,"reverse subtract":32779};at.ext_blend_minmax&&(Lr.min=Ee,Lr.max=Re);var an=at.angle_instanced_arrays,on=at.webgl_draw_buffers,Nn=at.oes_vertex_array_object,Yn={dirty:!0,profile:Tr.profile},yi={},Sn=[],An={},li={};function Vn(ar){return ar.replace(".","_")}function jn(ar,gr,Pr){var pn=Vn(ar);Sn.push(ar),yi[pn]=Yn[pn]=!!Pr,An[pn]=gr}function Wn(ar,gr,Pr){var pn=Vn(ar);Sn.push(ar),Array.isArray(Pr)?(Yn[pn]=Pr.slice(),yi[pn]=Pr.slice()):Yn[pn]=yi[pn]=Pr,li[pn]=gr}function si(ar){return!!isNaN(ar)}jn(ho,wn),jn(Pa,ln),Wn(Js,"blendColor",[0,0,0,0]),Wn(fs,"blendEquationSeparate",[Rt,Rt]),Wn(Io,"blendFuncSeparate",[Ft,pt,Ft,pt]),jn(oi,gi,!0),Wn(ro,"depthFunc",ir),Wn(Go,"depthRange",[0,1]),Wn(Qs,"depthMask",!0),Wn(zl,zl,[!0,!0,!0,!0]),jn(cu,Br),Wn(Zu,"cullFace",te),Wn(mc,mc,Se),Wn(Yl,Yl,1),jn(lf,mi),Wn($u,"polygonOffset",[0,0]),jn(ph,ia),jn(gh,ua),Wn(uf,"sampleCoverage",[1,!1]),jn(Ku,In),Wn(fu,"stencilMask",-1),Wn(Ju,"stencilFunc",[rt,0,-1]),Wn(Qu,"stencilOpSeparate",[W,He,He,He]),Wn(Wd,"stencilOpSeparate",[te,He,He,He]),jn(x0,Bi),Wn(Bf,"scissor",[0,0,Pe.drawingBufferWidth,Pe.drawingBufferHeight]),Wn(Al,Al,[0,0,Pe.drawingBufferWidth,Pe.drawingBufferHeight]);var zi={gl:Pe,context:Or,strings:Xe,next:yi,current:Yn,draw:Xr,elements:Bt,buffer:Et,shader:dr,attributes:Ht.state,vao:Ht,uniforms:$t,framebuffer:Pt,extensions:at,timer:$r,isBufferArgs:Gr},da={primTypes:ss,compareFuncs:sr,blendFuncs:Vr,blendEquations:Lr,stencilOps:br,glTypes:Cn,orientationType:kr};on&&(da.backBuffer=[te],da.drawBuffer=T(xt.maxDrawbuffers,function(ar){return ar===0?[0]:T(ar,function(gr){return Cr+gr})}));var ui=0;function Li(){var ar=On({cache:Er}),gr=ar.link,Pr=ar.global;ar.id=ui++,ar.batchId="0";var pn=gr(zi),Mn=ar.shared={props:"a0"};Object.keys(zi).forEach(function(zr){Mn[zr]=Pr.def(pn,".",zr)});var sn=ar.next={},tn=ar.current={};Object.keys(li).forEach(function(zr){Array.isArray(Yn[zr])&&(sn[zr]=Pr.def(Mn.next,".",zr),tn[zr]=Pr.def(Mn.current,".",zr))});var Hr=ar.constants={};Object.keys(da).forEach(function(zr){Hr[zr]=Pr.def(JSON.stringify(da[zr]))}),ar.invoke=function(zr,yr){switch(yr.type){case Un:var hn=["this",Mn.context,Mn.props,ar.batchId];return zr.def(gr(yr.data),".call(",hn.slice(0,Math.max(yr.data.length+1,4)),")");case Gn:return zr.def(Mn.props,yr.data);case Zi:return zr.def(Mn.context,yr.data);case na:return zr.def("this",yr.data);case Ha:return yr.data.append(ar,zr),yr.data.ref;case Qa:return yr.data.toString();case Ya:return yr.data.map(function(kn){return ar.invoke(zr,kn)})}},ar.attribCache={};var Mr={};return ar.scopeAttrib=function(zr){var yr=Xe.id(zr);if(yr in Mr)return Mr[yr];var hn=Ht.scope[yr];hn||(hn=Ht.scope[yr]=new Rr);var kn=Mr[yr]=gr(hn);return kn},ar}function Ki(ar){var gr=ar.static,Pr=ar.dynamic,pn;if(Xl in gr){var Mn=!!gr[Xl];pn=zn(function(tn,Hr){return Mn}),pn.enable=Mn}else if(Xl in Pr){var sn=Pr[Xl];pn=Zn(sn,function(tn,Hr){return tn.invoke(Hr,sn)})}return pn}function ca(ar,gr){var Pr=ar.static,pn=ar.dynamic;if(cf in Pr){var Mn=Pr[cf];return Mn?(Mn=Pt.getFramebuffer(Mn),zn(function(tn,Hr){var Mr=tn.link(Mn),zr=tn.shared;Hr.set(zr.framebuffer,".next",Mr);var yr=zr.context;return Hr.set(yr,"."+Ne,Mr+".width"),Hr.set(yr,"."+Qe,Mr+".height"),Mr})):zn(function(tn,Hr){var Mr=tn.shared;Hr.set(Mr.framebuffer,".next","null");var zr=Mr.context;return Hr.set(zr,"."+Ne,zr+"."+Zt),Hr.set(zr,"."+Qe,zr+"."+Nt),"null"})}else if(cf in pn){var sn=pn[cf];return Zn(sn,function(tn,Hr){var Mr=tn.invoke(Hr,sn),zr=tn.shared,yr=zr.framebuffer,hn=Hr.def(yr,".getFramebuffer(",Mr,")");Hr.set(yr,".next",hn);var kn=zr.context;return Hr.set(kn,"."+Ne,hn+"?"+hn+".width:"+kn+"."+Zt),Hr.set(kn,"."+Qe,hn+"?"+hn+".height:"+kn+"."+Nt),hn})}else return null}function Ia(ar,gr,Pr){var pn=ar.static,Mn=ar.dynamic;function sn(Mr){if(Mr in pn){var zr=pn[Mr],yr=!0,hn=zr.x|0,kn=zr.y|0,Xn,sa;return"width"in zr?Xn=zr.width|0:yr=!1,"height"in zr?sa=zr.height|0:yr=!1,new Ar(!yr&&gr&&gr.thisDep,!yr&&gr&&gr.contextDep,!yr&&gr&&gr.propDep,function(fa,Qi){var $i=fa.shared.context,Fi=Xn;"width"in zr||(Fi=Qi.def($i,".",Ne,"-",hn));var ji=sa;return"height"in zr||(ji=Qi.def($i,".",Qe,"-",kn)),[hn,kn,Fi,ji]})}else if(Mr in Mn){var Oi=Mn[Mr],Pi=Zn(Oi,function(fa,Qi){var $i=fa.invoke(Qi,Oi),Fi=fa.shared.context,ji=Qi.def($i,".x|0"),Wi=Qi.def($i,".y|0"),Fa=Qi.def('"width" in ',$i,"?",$i,".width|0:","(",Fi,".",Ne,"-",ji,")"),Vs=Qi.def('"height" in ',$i,"?",$i,".height|0:","(",Fi,".",Qe,"-",Wi,")");return[ji,Wi,Fa,Vs]});return gr&&(Pi.thisDep=Pi.thisDep||gr.thisDep,Pi.contextDep=Pi.contextDep||gr.contextDep,Pi.propDep=Pi.propDep||gr.propDep),Pi}else return gr?new Ar(gr.thisDep,gr.contextDep,gr.propDep,function(fa,Qi){var $i=fa.shared.context;return[0,0,Qi.def($i,".",Ne),Qi.def($i,".",Qe)]}):null}var tn=sn(Al);if(tn){var Hr=tn;tn=new Ar(tn.thisDep,tn.contextDep,tn.propDep,function(Mr,zr){var yr=Hr.append(Mr,zr),hn=Mr.shared.context;return zr.set(hn,"."+Je,yr[2]),zr.set(hn,"."+lt,yr[3]),yr})}return{viewport:tn,scissor_box:sn(Bf)}}function Os(ar,gr){var Pr=ar.static,pn=typeof Pr[Wh]=="string"&&typeof Pr[jh]=="string";if(pn){if(Object.keys(gr.dynamic).length>0)return null;var Mn=gr.static,sn=Object.keys(Mn);if(sn.length>0&&typeof Mn[sn[0]]=="number"){for(var tn=[],Hr=0;Hr"+ji+"?"+yr+".constant["+ji+"]:0;"}).join(""),"}}else{","if(",Xn,"(",yr,".buffer)){",fa,"=",sa,".createStream(",ur,",",yr,".buffer);","}else{",fa,"=",sa,".getBuffer(",yr,".buffer);","}",Qi,'="type" in ',yr,"?",kn.glTypes,"[",yr,".type]:",fa,".dtype;",Oi.normalized,"=!!",yr,".normalized;");function $i(Fi){zr(Oi[Fi],"=",yr,".",Fi,"|0;")}return $i("size"),$i("offset"),$i("stride"),$i("divisor"),zr("}}"),zr.exit("if(",Oi.isStream,"){",sa,".destroyStream(",fa,");","}"),Oi}Mn[sn]=Zn(tn,Hr)}),Mn}function po(ar){var gr=ar.static,Pr=ar.dynamic,pn={};return Object.keys(gr).forEach(function(Mn){var sn=gr[Mn];pn[Mn]=zn(function(tn,Hr){return typeof sn=="number"||typeof sn=="boolean"?""+sn:tn.link(sn)})}),Object.keys(Pr).forEach(function(Mn){var sn=Pr[Mn];pn[Mn]=Zn(sn,function(tn,Hr){return tn.invoke(Hr,sn)})}),pn}function Xo(ar,gr,Pr,pn,Mn){var sn=ar.static,tn=ar.dynamic,Hr=Os(ar,gr),Mr=ca(ar,Mn),zr=Ia(ar,Mr,Mn),yr=Na(ar,Mn),hn=Ns(ar,Mn),kn=Ss(ar,Mn,Hr);function Xn($i){var Fi=zr[$i];Fi&&(hn[$i]=Fi)}Xn(Al),Xn(Vn(Bf));var sa=Object.keys(hn).length>0,Oi={framebuffer:Mr,draw:yr,shader:kn,state:hn,dirty:sa,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Oi.profile=Ki(ar,Mn),Oi.uniforms=vo(Pr,Mn),Oi.drawVAO=Oi.scopeVAO=yr.vao,!Oi.drawVAO&&kn.program&&!Hr&&at.angle_instanced_arrays&&yr.static.elements){var Pi=!0,fa=kn.program.attributes.map(function($i){var Fi=gr.static[$i];return Pi=Pi&&!!Fi,Fi});if(Pi&&fa.length>0){var Qi=Ht.getVAO(Ht.createVAO({attributes:fa,elements:yr.static.elements}));Oi.drawVAO=new Ar(null,null,null,function($i,Fi){return $i.link(Qi)}),Oi.useVAO=!0}}return Hr?Oi.useVAO=!0:Oi.attributes=_o(gr,Mn),Oi.context=po(pn,Mn),Oi}function no(ar,gr,Pr){var pn=ar.shared,Mn=pn.context,sn=ar.scope();Object.keys(Pr).forEach(function(tn){gr.save(Mn,"."+tn);var Hr=Pr[tn],Mr=Hr.append(ar,gr);Array.isArray(Mr)?sn(Mn,".",tn,"=[",Mr.join(),"];"):sn(Mn,".",tn,"=",Mr,";")}),gr(sn)}function Us(ar,gr,Pr,pn){var Mn=ar.shared,sn=Mn.gl,tn=Mn.framebuffer,Hr;on&&(Hr=gr.def(Mn.extensions,".webgl_draw_buffers"));var Mr=ar.constants,zr=Mr.drawBuffer,yr=Mr.backBuffer,hn;Pr?hn=Pr.append(ar,gr):hn=gr.def(tn,".next"),pn||gr("if(",hn,"!==",tn,".cur){"),gr("if(",hn,"){",sn,".bindFramebuffer(",nr,",",hn,".framebuffer);"),on&&gr(Hr,".drawBuffersWEBGL(",zr,"[",hn,".colorAttachments.length]);"),gr("}else{",sn,".bindFramebuffer(",nr,",null);"),on&&gr(Hr,".drawBuffersWEBGL(",yr,");"),gr("}",tn,".cur=",hn,";"),pn||gr("}")}function ql(ar,gr,Pr){var pn=ar.shared,Mn=pn.gl,sn=ar.current,tn=ar.next,Hr=pn.current,Mr=pn.next,zr=ar.cond(Hr,".dirty");Sn.forEach(function(yr){var hn=Vn(yr);if(!(hn in Pr.state)){var kn,Xn;if(hn in tn){kn=tn[hn],Xn=sn[hn];var sa=T(Yn[hn].length,function(Pi){return zr.def(kn,"[",Pi,"]")});zr(ar.cond(sa.map(function(Pi,fa){return Pi+"!=="+Xn+"["+fa+"]"}).join("||")).then(Mn,".",li[hn],"(",sa,");",sa.map(function(Pi,fa){return Xn+"["+fa+"]="+Pi}).join(";"),";"))}else{kn=zr.def(Mr,".",hn);var Oi=ar.cond(kn,"!==",Hr,".",hn);zr(Oi),hn in An?Oi(ar.cond(kn).then(Mn,".enable(",An[hn],");").else(Mn,".disable(",An[hn],");"),Hr,".",hn,"=",kn,";"):Oi(Mn,".",li[hn],"(",kn,");",Hr,".",hn,"=",kn,";")}}}),Object.keys(Pr.state).length===0&&zr(Hr,".dirty=false;"),gr(zr)}function Ta(ar,gr,Pr,pn){var Mn=ar.shared,sn=ar.current,tn=Mn.current,Hr=Mn.gl,Mr;Wr(Object.keys(Pr)).forEach(function(zr){var yr=Pr[zr];if(!(pn&&!pn(yr))){var hn=yr.append(ar,gr);if(An[zr]){var kn=An[zr];En(yr)?(Mr=ar.link(hn,{stable:!0}),gr(ar.cond(Mr).then(Hr,".enable(",kn,");").else(Hr,".disable(",kn,");")),gr(tn,".",zr,"=",Mr,";")):(gr(ar.cond(hn).then(Hr,".enable(",kn,");").else(Hr,".disable(",kn,");")),gr(tn,".",zr,"=",hn,";"))}else if(bn(hn)){var Xn=sn[zr];gr(Hr,".",li[zr],"(",hn,");",hn.map(function(sa,Oi){return Xn+"["+Oi+"]="+sa}).join(";"),";")}else En(yr)?(Mr=ar.link(hn,{stable:!0}),gr(Hr,".",li[zr],"(",Mr,");",tn,".",zr,"=",Mr,";")):gr(Hr,".",li[zr],"(",hn,");",tn,".",zr,"=",hn,";")}})}function vu(ar,gr){an&&(ar.instancing=gr.def(ar.shared.extensions,".angle_instanced_arrays"))}function ys(ar,gr,Pr,pn,Mn){var sn=ar.shared,tn=ar.stats,Hr=sn.current,Mr=sn.timer,zr=Pr.profile;function yr(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var hn,kn;function Xn($i){hn=gr.def(),$i(hn,"=",yr(),";"),typeof Mn=="string"?$i(tn,".count+=",Mn,";"):$i(tn,".count++;"),$r&&(pn?(kn=gr.def(),$i(kn,"=",Mr,".getNumPendingQueries();")):$i(Mr,".beginQuery(",tn,");"))}function sa($i){$i(tn,".cpuTime+=",yr(),"-",hn,";"),$r&&(pn?$i(Mr,".pushScopeStats(",kn,",",Mr,".getNumPendingQueries(),",tn,");"):$i(Mr,".endQuery();"))}function Oi($i){var Fi=gr.def(Hr,".profile");gr(Hr,".profile=",$i,";"),gr.exit(Hr,".profile=",Fi,";")}var Pi;if(zr){if(En(zr)){zr.enable?(Xn(gr),sa(gr.exit),Oi("true")):Oi("false");return}Pi=zr.append(ar,gr),Oi(Pi)}else Pi=gr.def(Hr,".profile");var fa=ar.block();Xn(fa),gr("if(",Pi,"){",fa,"}");var Qi=ar.block();sa(Qi),gr.exit("if(",Pi,"){",Qi,"}")}function xc(ar,gr,Pr,pn,Mn){var sn=ar.shared;function tn(Mr){switch(Mr){case Bo:case Eu:case Di:return 2;case Ua:case el:case fl:return 3;case ls:case yc:case Fc:return 4;default:return 1}}function Hr(Mr,zr,yr){var hn=sn.gl,kn=gr.def(Mr,".location"),Xn=gr.def(sn.attributes,"[",kn,"]"),sa=yr.state,Oi=yr.buffer,Pi=[yr.x,yr.y,yr.z,yr.w],fa=["buffer","normalized","offset","stride"];function Qi(){gr("if(!",Xn,".buffer){",hn,".enableVertexAttribArray(",kn,");}");var Fi=yr.type,ji;if(yr.size?ji=gr.def(yr.size,"||",zr):ji=zr,gr("if(",Xn,".type!==",Fi,"||",Xn,".size!==",ji,"||",fa.map(function(Fa){return Xn+"."+Fa+"!=="+yr[Fa]}).join("||"),"){",hn,".bindBuffer(",ur,",",Oi,".buffer);",hn,".vertexAttribPointer(",[kn,ji,Fi,yr.normalized,yr.stride,yr.offset],");",Xn,".type=",Fi,";",Xn,".size=",ji,";",fa.map(function(Fa){return Xn+"."+Fa+"="+yr[Fa]+";"}).join(""),"}"),an){var Wi=yr.divisor;gr("if(",Xn,".divisor!==",Wi,"){",ar.instancing,".vertexAttribDivisorANGLE(",[kn,Wi],");",Xn,".divisor=",Wi,";}")}}function $i(){gr("if(",Xn,".buffer){",hn,".disableVertexAttribArray(",kn,");",Xn,".buffer=null;","}if(",ki.map(function(Fi,ji){return Xn+"."+Fi+"!=="+Pi[ji]}).join("||"),"){",hn,".vertexAttrib4f(",kn,",",Pi,");",ki.map(function(Fi,ji){return Xn+"."+Fi+"="+Pi[ji]+";"}).join(""),"}")}sa===qi?Qi():sa===pi?$i():(gr("if(",sa,"===",qi,"){"),Qi(),gr("}else{"),$i(),gr("}"))}pn.forEach(function(Mr){var zr=Mr.name,yr=Pr.attributes[zr],hn;if(yr){if(!Mn(yr))return;hn=yr.append(ar,gr)}else{if(!Mn(ai))return;var kn=ar.scopeAttrib(zr);hn={},Object.keys(new Rr).forEach(function(Xn){hn[Xn]=gr.def(kn,".",Xn)})}Hr(ar.link(Mr),tn(Mr.info.type),hn)})}function Zl(ar,gr,Pr,pn,Mn,sn){for(var tn=ar.shared,Hr=tn.gl,Mr,zr=0;zr1){for(var Dc=[],Kl=[],Vv=0;Vv>1)",Oi],");")}function Wi(){Pr(Pi,".drawArraysInstancedANGLE(",[kn,Xn,sa,Oi],");")}yr&&yr!=="null"?Qi?ji():(Pr("if(",yr,"){"),ji(),Pr("}else{"),Wi(),Pr("}")):Wi()}function Fi(){function ji(){Pr(sn+".drawElements("+[kn,sa,fa,Xn+"<<(("+fa+"-"+Ci+")>>1)"]+");")}function Wi(){Pr(sn+".drawArrays("+[kn,Xn,sa]+");")}yr&&yr!=="null"?Qi?ji():(Pr("if(",yr,"){"),ji(),Pr("}else{"),Wi(),Pr("}")):Wi()}an&&(typeof Oi!="number"||Oi>=0)?typeof Oi=="string"?(Pr("if(",Oi,">0){"),$i(),Pr("}else if(",Oi,"<0){"),Fi(),Pr("}")):$i():Fi()}function xa(ar,gr,Pr,pn,Mn){var sn=Li(),tn=sn.proc("body",Mn);return an&&(sn.instancing=tn.def(sn.shared.extensions,".angle_instanced_arrays")),ar(sn,tn,Pr,pn),sn.compile().body}function uo(ar,gr,Pr,pn){vu(ar,gr),Pr.useVAO?Pr.drawVAO?gr(ar.shared.vao,".setVAO(",Pr.drawVAO.append(ar,gr),");"):gr(ar.shared.vao,".setVAO(",ar.shared.vao,".targetVAO);"):(gr(ar.shared.vao,".setVAO(null);"),xc(ar,gr,Pr,pn.attributes,function(){return!0})),Zl(ar,gr,Pr,pn.uniforms,function(){return!0},!1),$l(ar,gr,gr,Pr)}function Es(ar,gr){var Pr=ar.proc("draw",1);vu(ar,Pr),no(ar,Pr,gr.context),Us(ar,Pr,gr.framebuffer),ql(ar,Pr,gr),Ta(ar,Pr,gr.state),ys(ar,Pr,gr,!1,!0);var pn=gr.shader.progVar.append(ar,Pr);if(Pr(ar.shared.gl,".useProgram(",pn,".program);"),gr.shader.program)uo(ar,Pr,gr,gr.shader.program);else{Pr(ar.shared.vao,".setVAO(null);");var Mn=ar.global.def("{}"),sn=Pr.def(pn,".id"),tn=Pr.def(Mn,"[",sn,"]");Pr(ar.cond(tn).then(tn,".call(this,a0);").else(tn,"=",Mn,"[",sn,"]=",ar.link(function(Hr){return xa(uo,ar,gr,Hr,1)}),"(",pn,");",tn,".call(this,a0);"))}Object.keys(gr.state).length>0&&Pr(ar.shared.current,".dirty=true;"),ar.shared.vao&&Pr(ar.shared.vao,".setVAO(null);")}function vr(ar,gr,Pr,pn){ar.batchId="a1",vu(ar,gr);function Mn(){return!0}xc(ar,gr,Pr,pn.attributes,Mn),Zl(ar,gr,Pr,pn.uniforms,Mn,!1),$l(ar,gr,gr,Pr)}function gn(ar,gr,Pr,pn){vu(ar,gr);var Mn=Pr.contextDep,sn=gr.def(),tn="a0",Hr="a1",Mr=gr.def();ar.shared.props=Mr,ar.batchId=sn;var zr=ar.scope(),yr=ar.scope();gr(zr.entry,"for(",sn,"=0;",sn,"<",Hr,";++",sn,"){",Mr,"=",tn,"[",sn,"];",yr,"}",zr.exit);function hn(fa){return fa.contextDep&&Mn||fa.propDep}function kn(fa){return!hn(fa)}if(Pr.needsContext&&no(ar,yr,Pr.context),Pr.needsFramebuffer&&Us(ar,yr,Pr.framebuffer),Ta(ar,yr,Pr.state,hn),Pr.profile&&hn(Pr.profile)&&ys(ar,yr,Pr,!1,!0),pn)Pr.useVAO?Pr.drawVAO?hn(Pr.drawVAO)?yr(ar.shared.vao,".setVAO(",Pr.drawVAO.append(ar,yr),");"):zr(ar.shared.vao,".setVAO(",Pr.drawVAO.append(ar,zr),");"):zr(ar.shared.vao,".setVAO(",ar.shared.vao,".targetVAO);"):(zr(ar.shared.vao,".setVAO(null);"),xc(ar,zr,Pr,pn.attributes,kn),xc(ar,yr,Pr,pn.attributes,hn)),Zl(ar,zr,Pr,pn.uniforms,kn,!1),Zl(ar,yr,Pr,pn.uniforms,hn,!0),$l(ar,zr,yr,Pr);else{var Xn=ar.global.def("{}"),sa=Pr.shader.progVar.append(ar,yr),Oi=yr.def(sa,".id"),Pi=yr.def(Xn,"[",Oi,"]");yr(ar.shared.gl,".useProgram(",sa,".program);","if(!",Pi,"){",Pi,"=",Xn,"[",Oi,"]=",ar.link(function(fa){return xa(vr,ar,Pr,fa,2)}),"(",sa,");}",Pi,".call(this,a0[",sn,"],",sn,");")}}function xn(ar,gr){var Pr=ar.proc("batch",2);ar.batchId="0",vu(ar,Pr);var pn=!1,Mn=!0;Object.keys(gr.context).forEach(function(Xn){pn=pn||gr.context[Xn].propDep}),pn||(no(ar,Pr,gr.context),Mn=!1);var sn=gr.framebuffer,tn=!1;sn?(sn.propDep?pn=tn=!0:sn.contextDep&&pn&&(tn=!0),tn||Us(ar,Pr,sn)):Us(ar,Pr,null),gr.state.viewport&&gr.state.viewport.propDep&&(pn=!0);function Hr(Xn){return Xn.contextDep&&pn||Xn.propDep}ql(ar,Pr,gr),Ta(ar,Pr,gr.state,function(Xn){return!Hr(Xn)}),(!gr.profile||!Hr(gr.profile))&&ys(ar,Pr,gr,!1,"a1"),gr.contextDep=pn,gr.needsContext=Mn,gr.needsFramebuffer=tn;var Mr=gr.shader.progVar;if(Mr.contextDep&&pn||Mr.propDep)gn(ar,Pr,gr,null);else{var zr=Mr.append(ar,Pr);if(Pr(ar.shared.gl,".useProgram(",zr,".program);"),gr.shader.program)gn(ar,Pr,gr,gr.shader.program);else{Pr(ar.shared.vao,".setVAO(null);");var yr=ar.global.def("{}"),hn=Pr.def(zr,".id"),kn=Pr.def(yr,"[",hn,"]");Pr(ar.cond(kn).then(kn,".call(this,a0,a1);").else(kn,"=",yr,"[",hn,"]=",ar.link(function(Xn){return xa(gn,ar,gr,Xn,2)}),"(",zr,");",kn,".call(this,a0,a1);"))}}Object.keys(gr.state).length>0&&Pr(ar.shared.current,".dirty=true;"),ar.shared.vao&&Pr(ar.shared.vao,".setVAO(null);")}function Gi(ar,gr){var Pr=ar.proc("scope",3);ar.batchId="a2";var pn=ar.shared,Mn=pn.current;if(no(ar,Pr,gr.context),gr.framebuffer&&gr.framebuffer.append(ar,Pr),Wr(Object.keys(gr.state)).forEach(function(Hr){var Mr=gr.state[Hr],zr=Mr.append(ar,Pr);bn(zr)?zr.forEach(function(yr,hn){si(yr)?Pr.set(ar.next[Hr],"["+hn+"]",yr):Pr.set(ar.next[Hr],"["+hn+"]",ar.link(yr,{stable:!0}))}):En(Mr)?Pr.set(pn.next,"."+Hr,ar.link(zr,{stable:!0})):Pr.set(pn.next,"."+Hr,zr)}),ys(ar,Pr,gr,!0,!0),[Yh,_i,Mu,Su,hu].forEach(function(Hr){var Mr=gr.draw[Hr];if(Mr){var zr=Mr.append(ar,Pr);si(zr)?Pr.set(pn.draw,"."+Hr,zr):Pr.set(pn.draw,"."+Hr,ar.link(zr),{stable:!0})}}),Object.keys(gr.uniforms).forEach(function(Hr){var Mr=gr.uniforms[Hr].append(ar,Pr);Array.isArray(Mr)&&(Mr="["+Mr.map(function(zr){return si(zr)?zr:ar.link(zr,{stable:!0})})+"]"),Pr.set(pn.uniforms,"["+ar.link(Xe.id(Hr),{stable:!0})+"]",Mr)}),Object.keys(gr.attributes).forEach(function(Hr){var Mr=gr.attributes[Hr].append(ar,Pr),zr=ar.scopeAttrib(Hr);Object.keys(new Rr).forEach(function(yr){Pr.set(zr,"."+yr,Mr[yr])})}),gr.scopeVAO){var sn=gr.scopeVAO.append(ar,Pr);si(sn)?Pr.set(pn.vao,".targetVAO",sn):Pr.set(pn.vao,".targetVAO",ar.link(sn,{stable:!0}))}function tn(Hr){var Mr=gr.shader[Hr];if(Mr){var zr=Mr.append(ar,Pr);si(zr)?Pr.set(pn.shader,"."+Hr,zr):Pr.set(pn.shader,"."+Hr,ar.link(zr,{stable:!0}))}}tn(jh),tn(Wh),Object.keys(gr.state).length>0&&(Pr(Mn,".dirty=true;"),Pr.exit(Mn,".dirty=true;")),Pr("a1(",ar.shared.context,",a0,",ar.batchId,");")}function wo(ar){if(!(typeof ar!="object"||bn(ar))){for(var gr=Object.keys(ar),Pr=0;Pr=0;--xa){var uo=zi[xa];uo&&uo(Er,null,0)}at.flush(),dr&&dr.update()}function Ia(){!Ki&&zi.length>0&&(Ki=g.next(ca))}function Os(){Ki&&(g.cancel(ca),Ki=null)}function Ss(xa){xa.preventDefault(),Et=!0,Os(),da.forEach(function(uo){uo()})}function Na(xa){at.getError(),Et=!1,Bt.restore(),yi.restore(),an.restore(),Sn.restore(),An.restore(),li.restore(),Nn.restore(),dr&&dr.restore(),Vn.procs.refresh(),Ia(),ui.forEach(function(uo){uo()})}si&&(si.addEventListener(de,Ss,!1),si.addEventListener(Ae,Na,!1));function Ns(){zi.length=0,Os(),si&&(si.removeEventListener(de,Ss),si.removeEventListener(Ae,Na)),yi.clear(),li.clear(),An.clear(),Nn.clear(),Sn.clear(),on.clear(),an.clear(),dr&&dr.clear(),Li.forEach(function(xa){xa()})}function vo(xa){function uo(sn){var tn=e({},sn);delete tn.uniforms,delete tn.attributes,delete tn.context,delete tn.vao,"stencil"in tn&&tn.stencil.op&&(tn.stencil.opBack=tn.stencil.opFront=tn.stencil.op,delete tn.stencil.op);function Hr(Mr){if(Mr in tn){var zr=tn[Mr];delete tn[Mr],Object.keys(zr).forEach(function(yr){tn[Mr+"."+yr]=zr[yr]})}}return Hr("blend"),Hr("depth"),Hr("cull"),Hr("stencil"),Hr("polygonOffset"),Hr("scissor"),Hr("sample"),"vao"in sn&&(tn.vao=sn.vao),tn}function Es(sn,tn){var Hr={},Mr={};return Object.keys(sn).forEach(function(zr){var yr=sn[zr];if(v.isDynamic(yr)){Mr[zr]=v.unbox(yr,zr);return}else if(tn&&Array.isArray(yr)){for(var hn=0;hn0)return ar.call(this,pn(sn|0),sn|0)}else if(Array.isArray(sn)){if(sn.length)return ar.call(this,sn,sn.length)}else return Hi.call(this,sn)}return e(Mn,{stats:wo,destroy:function(){xs.destroy()}})}var _o=li.setFBO=vo({framebuffer:v.define.call(null,Fe,"framebuffer")});function po(xa,uo){var Es=0;Vn.procs.poll();var vr=uo.color;vr&&(at.clearColor(+vr[0]||0,+vr[1]||0,+vr[2]||0,+vr[3]||0),Es|=N),"depth"in uo&&(at.clearDepth(+uo.depth),Es|=H),"stencil"in uo&&(at.clearStencil(uo.stencil|0),Es|=$),at.clear(Es)}function Xo(xa){if("framebuffer"in xa)if(xa.framebuffer&&xa.framebuffer_reglType==="framebufferCube")for(var uo=0;uo<6;++uo)_o(e({framebuffer:xa.framebuffer.faces[uo]},xa),po);else _o(xa,po);else po(null,xa)}function no(xa){zi.push(xa);function uo(){var Es=st(zi,xa);function vr(){var gn=st(zi,vr);zi[gn]=zi[zi.length-1],zi.length-=1,zi.length<=0&&Os()}zi[Es]=vr}return Ia(),{cancel:uo}}function Us(){var xa=Wn.viewport,uo=Wn.scissor_box;xa[0]=xa[1]=uo[0]=uo[1]=0,Er.viewportWidth=Er.framebufferWidth=Er.drawingBufferWidth=xa[2]=uo[2]=at.drawingBufferWidth,Er.viewportHeight=Er.framebufferHeight=Er.drawingBufferHeight=xa[3]=uo[3]=at.drawingBufferHeight}function ql(){Er.tick+=1,Er.time=vu(),Us(),Vn.procs.poll()}function Ta(){Sn.refresh(),Us(),Vn.procs.refresh(),dr&&dr.update()}function vu(){return(p()-Xr)/1e3}Ta();function ys(xa,uo){var Es;switch(xa){case"frame":return no(uo);case"lost":Es=da;break;case"restore":Es=ui;break;case"destroy":Es=Li;break;default:}return Es.push(uo),{cancel:function(){for(var vr=0;vr=0},read:jn,destroy:Ns,_gl:at,_refresh:Ta,poll:function(){ql(),dr&&dr.update()},now:vu,stats:Pt,getCachedCode:xc,preloadCachedCode:Zl});return Xe.onDone(null,$l),$l}return dt}))});var TVe=fe((XTr,wVe)=>{"use strict";var rKt=E1();wVe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},_Ve(t)?t={container:t}:nKt(t)?t={container:t}:iKt(t)?t={gl:t}:t=rKt(t,{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),t.pixelRatio||(t.pixelRatio=window.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(typeof t.container=="string"){var r=document.querySelector(t.container);if(!r)throw Error("Element "+t.container+" is not found");t.container=r}_Ve(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=bVe(),t.container.appendChild(t.canvas),xVe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=bVe(),t.container.appendChild(t.canvas),xVe(t);else throw Error("Not DOM environment. Use headless-gl.");return t.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{t.gl=t.canvas.getContext(n,t.attrs)}catch(a){}return t.gl}),t.gl};function xVe(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function _Ve(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function nKt(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function iKt(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function bVe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var MVe=fe((ZTr,AVe)=>{"use strict";var aKt=l$(),oKt=[32,126];AVe.exports=sKt;function sKt(e){e=e||{};var t=e.shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],r=e.canvas||document.createElement("canvas"),n=e.font,a=typeof e.step=="number"?[e.step,e.step]:e.step||[32,32],i=e.chars||oKt;if(n&&typeof n!="string"&&(n=aKt(n)),!Array.isArray(i))i=String(i).split("");else if(i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"){for(var o=[],s=i[0],l=0;s<=i[1];s++)o[l++]=String.fromCharCode(s);i=o}t=t.slice(),r.width=t[0],r.height=t[1];var u=r.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,r.width,r.height),u.font=n,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";for(var c=a[0]/2,f=a[1]/2,s=0;st[0]-a[0]/2&&(c=a[0]/2,f+=a[1]);return r}});var d$=fe(uc=>{"use strict";"use restrict";var h$=32;uc.INT_BITS=h$;uc.INT_MAX=2147483647;uc.INT_MIN=-1<0)-(e<0)};uc.abs=function(e){var t=e>>h$-1;return(e^t)-t};uc.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1};uc.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0};uc.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function SVe(e){var t=32;return e&=-e,e&&t--,e&65535&&(t-=16),e&16711935&&(t-=8),e&252645135&&(t-=4),e&858993459&&(t-=2),e&1431655765&&(t-=1),t}uc.countTrailingZeros=SVe;uc.nextPow2=function(e){return e+=e===0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1};uc.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};uc.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var zM=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,a=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=r&1,--a;e[t]=n<>>8&255]<<16|zM[e>>>16&255]<<8|zM[e>>>24&255]};uc.interleave2=function(e,t){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t&=65535,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1};uc.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};uc.interleave3=function(e,t,r){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|=t<<1,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|r<<2};uc.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};uc.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>SVe(e)+1}});var CVe=fe((KTr,kVe)=>{"use strict";function EVe(e,t,r){var n=e[r]|0;if(n<=0)return[];var a=new Array(n),i;if(r===e.length-1)for(i=0;i0)return lKt(e|0,t);break;case"object":if(typeof e.length=="number")return EVe(e,t,0);break}return[]}kVe.exports=uKt});var HVe=fe(os=>{"use strict";var ky=d$(),Rh=CVe(),LVe=M2().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Rh([32,0]),UINT16:Rh([32,0]),UINT32:Rh([32,0]),BIGUINT64:Rh([32,0]),INT8:Rh([32,0]),INT16:Rh([32,0]),INT32:Rh([32,0]),BIGINT64:Rh([32,0]),FLOAT:Rh([32,0]),DOUBLE:Rh([32,0]),DATA:Rh([32,0]),UINT8C:Rh([32,0]),BUFFER:Rh([32,0])});var cKt=typeof Uint8ClampedArray!="undefined",fKt=typeof BigUint64Array!="undefined",hKt=typeof BigInt64Array!="undefined",Ec=window.__TYPEDARRAY_POOL;Ec.UINT8C||(Ec.UINT8C=Rh([32,0]));Ec.BIGUINT64||(Ec.BIGUINT64=Rh([32,0]));Ec.BIGINT64||(Ec.BIGINT64=Rh([32,0]));Ec.BUFFER||(Ec.BUFFER=Rh([32,0]));var EF=Ec.DATA,kF=Ec.BUFFER;os.free=function(t){if(LVe.isBuffer(t))kF[ky.log2(t.length)].push(t);else{if(Object.prototype.toString.call(t)!=="[object ArrayBuffer]"&&(t=t.buffer),!t)return;var r=t.length||t.byteLength,n=ky.log2(r)|0;EF[n].push(t)}};function PVe(e){if(e){var t=e.length||e.byteLength,r=ky.log2(t);EF[r].push(e)}}function dKt(e){PVe(e.buffer)}os.freeUint8=os.freeUint16=os.freeUint32=os.freeBigUint64=os.freeInt8=os.freeInt16=os.freeInt32=os.freeBigInt64=os.freeFloat32=os.freeFloat=os.freeFloat64=os.freeDouble=os.freeUint8Clamped=os.freeDataView=dKt;os.freeArrayBuffer=PVe;os.freeBuffer=function(t){kF[ky.log2(t.length)].push(t)};os.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return d0(t);switch(r){case"uint8":return v$(t);case"uint16":return FVe(t);case"uint32":return DVe(t);case"int8":return RVe(t);case"int16":return IVe(t);case"int32":return zVe(t);case"float":case"float32":return qVe(t);case"double":case"float64":return BVe(t);case"uint8_clamped":return OVe(t);case"bigint64":return UVe(t);case"biguint64":return NVe(t);case"buffer":return GVe(t);case"data":case"dataview":return VVe(t);default:return null}return null};function d0(t){var t=ky.nextPow2(t),r=ky.log2(t),n=EF[r];return n.length>0?n.pop():new ArrayBuffer(t)}os.mallocArrayBuffer=d0;function v$(e){return new Uint8Array(d0(e),0,e)}os.mallocUint8=v$;function FVe(e){return new Uint16Array(d0(2*e),0,e)}os.mallocUint16=FVe;function DVe(e){return new Uint32Array(d0(4*e),0,e)}os.mallocUint32=DVe;function RVe(e){return new Int8Array(d0(e),0,e)}os.mallocInt8=RVe;function IVe(e){return new Int16Array(d0(2*e),0,e)}os.mallocInt16=IVe;function zVe(e){return new Int32Array(d0(4*e),0,e)}os.mallocInt32=zVe;function qVe(e){return new Float32Array(d0(4*e),0,e)}os.mallocFloat32=os.mallocFloat=qVe;function BVe(e){return new Float64Array(d0(8*e),0,e)}os.mallocFloat64=os.mallocDouble=BVe;function OVe(e){return cKt?new Uint8ClampedArray(d0(e),0,e):v$(e)}os.mallocUint8Clamped=OVe;function NVe(e){return fKt?new BigUint64Array(d0(8*e),0,e):null}os.mallocBigUint64=NVe;function UVe(e){return hKt?new BigInt64Array(d0(8*e),0,e):null}os.mallocBigInt64=UVe;function VVe(e){return new DataView(d0(e),0,e)}os.mallocDataView=VVe;function GVe(e){e=ky.nextPow2(e);var t=ky.log2(e),r=kF[t];return r.length>0?r.pop():new LVe(e)}os.mallocBuffer=GVe;os.clearCache=function(){for(var t=0;t<32;++t)Ec.UINT8[t].length=0,Ec.UINT16[t].length=0,Ec.UINT32[t].length=0,Ec.INT8[t].length=0,Ec.INT16[t].length=0,Ec.INT32[t].length=0,Ec.FLOAT[t].length=0,Ec.DOUBLE[t].length=0,Ec.BIGUINT64[t].length=0,Ec.BIGINT64[t].length=0,Ec.UINT8C[t].length=0,EF[t].length=0,kF[t].length=0}});var WVe=fe((QTr,jVe)=>{"use strict";var vKt=Object.prototype.toString;jVe.exports=function(e){var t;return vKt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var p$=fe((eAr,YVe)=>{YVe.exports=function(t,r){r||(r=[0,""]),t=String(t);var n=parseFloat(t,10);return r[0]=n,r[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}});var $Ve=fe((tAr,ZVe)=>{"use strict";var pKt=p$();ZVe.exports=XVe;var qM=96;function g$(e,t){var r=pKt(getComputedStyle(e).getPropertyValue(t));return r[0]*XVe(r[1],e)}function gKt(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=g$(r,"font-size")/128;return t.removeChild(r),n}function XVe(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return gKt(e,t);case"em":return g$(t,"font-size");case"rem":return g$(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 qM;case"cm":return qM/2.54;case"mm":return qM/25.4;case"pt":return qM/72;case"pc":return qM/6}return 1}});var QVe=fe((rAr,JVe)=>{"use strict";JVe.exports=PF;var mKt=PF.canvas=document.createElement("canvas"),CF=mKt.getContext("2d"),KVe=LF([32,126]);PF.createPairs=LF;PF.ascii=KVe;function PF(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},n,a=16,i=.05;t&&(t.length===2&&typeof t[0]=="number"?n=LF(t):Array.isArray(t)?n=t:(t.o?n=LF(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(a=t.fontSize),t.threshold!=null&&(i=t.threshold))),n||(n=KVe),CF.font=a+"px "+e;for(var o=0;oa*i){var c=(u-l)/a;r[s]=c*1e3}}return r}function LF(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),a=e[0];a{"use strict";rGe.exports=Cy;Cy.canvas=document.createElement("canvas");Cy.cache={};function Cy(o,t){t||(t={}),(typeof o=="string"||Array.isArray(o))&&(t.family=o);var r=Array.isArray(t.family)?t.family.join(", "):t.family;if(!r)throw Error("`family` must be defined");var n=t.size||t.fontSize||t.em||48,a=t.weight||t.fontWeight||"",i=t.style||t.fontStyle||"",o=[i,a,n].join(" ")+"px "+r,s=t.origin||"top";if(Cy.cache[r]&&n<=Cy.cache[r].em)return eGe(Cy.cache[r],s);var l=t.canvas||Cy.canvas,u=l.getContext("2d"),c={upper:t.upper!==void 0?t.upper:"H",lower:t.lower!==void 0?t.lower:"x",descent:t.descent!==void 0?t.descent:"p",ascent:t.ascent!==void 0?t.ascent:"h",tittle:t.tittle!==void 0?t.tittle:"i",overshoot:t.overshoot!==void 0?t.overshoot:"O"},f=Math.ceil(n*1.5);l.height=f,l.width=f*.5,u.font=o;var v="H",g={top:0};u.clearRect(0,0,f,f),u.textBaseline="top",u.fillStyle="black",u.fillText(v,0,0);var p=C1(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline="bottom",u.fillText(v,0,f);var x=C1(u.getImageData(0,0,f,f));g.lineHeight=g.bottom=f-x+p,u.clearRect(0,0,f,f),u.textBaseline="alphabetic",u.fillText(v,0,f);var _=C1(u.getImageData(0,0,f,f)),y=f-_-1+p;g.baseline=g.alphabetic=y,u.clearRect(0,0,f,f),u.textBaseline="middle",u.fillText(v,0,f*.5);var C=C1(u.getImageData(0,0,f,f));g.median=g.middle=f-C-1+p-f*.5,u.clearRect(0,0,f,f),u.textBaseline="hanging",u.fillText(v,0,f*.5);var k=C1(u.getImageData(0,0,f,f));g.hanging=f-k-1+p-f*.5,u.clearRect(0,0,f,f),u.textBaseline="ideographic",u.fillText(v,0,f);var S=C1(u.getImageData(0,0,f,f));if(g.ideographic=f-S-1+p,c.upper&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.upper,0,0),g.upper=C1(u.getImageData(0,0,f,f)),g.capHeight=g.baseline-g.upper),c.lower&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.lower,0,0),g.lower=C1(u.getImageData(0,0,f,f)),g.xHeight=g.baseline-g.lower),c.tittle&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.tittle,0,0),g.tittle=C1(u.getImageData(0,0,f,f))),c.ascent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.ascent,0,0),g.ascent=C1(u.getImageData(0,0,f,f))),c.descent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.descent,0,0),g.descent=tGe(u.getImageData(0,0,f,f))),c.overshoot){u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.overshoot,0,0);var L=tGe(u.getImageData(0,0,f,f));g.overshoot=L-y}for(var w in g)g[w]/=n;return g.em=n,Cy.cache[r]=g,eGe(g,s)}function eGe(e,t){var r={};typeof t=="string"&&(t=e[t]);for(var n in e)n!=="em"&&(r[n]=e[n]-t);return r}function C1(e){for(var t=e.height,r=e.data,n=3;n0;n-=4)if(r[n]!==0)return Math.floor((n-3)*.25/t)}});var sGe=fe((iAr,oGe)=>{"use strict";var b5=yVe(),yKt=E1(),xKt=f$(),_Kt=TVe(),bKt=XZ(),m$=wM(),wKt=MVe(),Ly=HVe(),TKt=u5(),AKt=WVe(),MKt=p$(),SKt=$Ve(),EKt=QVe(),kKt=Zc(),CKt=nGe(),LKt=u_(),PKt=d$(),iGe=PKt.nextPow2,aGe=new bKt,DF=!1;document.body&&(FF=document.body.appendChild(document.createElement("div")),FF.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(FF).fontStretch&&(DF=!0),document.body.removeChild(FF));var FF,Bs=function(t){FKt(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=_Kt(t),this.shader=aGe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||xKt({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(),aGe.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(AKt(t)?t:{})};Bs.prototype.createShader=function(){var t=this.regl,r=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,i){return[i.atlas.width,i.atlas.height]},atlasDim:function(a,i){return[i.atlas.cols,i.atlas.rows]},atlas:function(a,i){return i.atlas.texture},charStep:function(a,i){return i.atlas.step},em:function(a,i){return i.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:` +`),Rr;if(Xe&&(Rr=y0(Tr),Xe[Rr]))return Xe[Rr].apply(null,Et);var Lr=Function.apply(null,xt.concat(Tr));return Xe&&(Xe[Rr]=Lr),Lr.apply(null,Et)}return{global:dr,link:St,block:Pt,proc:Or,scope:$t,cond:Ht,compile:$r}}var ki="xyzw".split(""),Ci=5121,qi=1,pi=2,Un=0,Gn=1,Zi=2,na=3,Ha=4,Qa=5,Ya=6,ho="dither",Pa="blend.enable",Js="blend.color",fs="blend.equation",Io="blend.func",oi="depth.enable",ro="depth.func",Go="depth.range",Qs="depth.mask",zl="colorMask",cu="cull.enable",Zu="cull.face",mc="frontFace",Yl="lineWidth",lf="polygonOffset.enable",$u="polygonOffset.offset",ph="sample.alpha",gh="sample.enable",uf="sample.coverage",Ku="stencil.enable",fu="stencil.mask",Ju="stencil.func",Qu="stencil.opFront",Wd="stencil.opBack",x0="scissor.enable",Bf="scissor.box",Al="viewport",Xl="profile",cf="framebuffer",jh="vert",Wh="frag",Yh="elements",hu="primitive",Mu="count",_i="offset",Su="instances",Me="vao",Ce="Width",Be="Height",Ne=cf+Ce,Qe=cf+Be,Je=Al+Ce,lt=Al+Be,Gt="drawingBuffer",Zt=Gt+Ce,Nt=Gt+Be,Kt=[Io,fs,Ju,Qu,Wd,uf,Al,Bf,$u],ur=34962,Sr=34963,Br=2884,ln=3042,wn=3024,In=2960,gi=2929,Bi=3089,mi=32823,ia=32926,ua=32928,lo=5126,Bo=35664,Ua=35665,ls=35666,cl=5124,Eu=35667,el=35668,yc=35669,wi=35670,Di=35671,fl=35672,Fc=35673,du=35674,ms=35675,ff=35676,ku=35678,hl=35680,mh=4,W=1028,te=1029,ve=2304,Se=2305,Ee=32775,Re=32776,nt=519,He=7680,vt=0,Ft=1,Rt=32774,ir=513,nr=36160,Cr=36064,Vr={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},sr={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},br={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},kr={cw:ve,ccw:Se};function Gr(Pe){return Array.isArray(Pe)||or(Pe)||fr(Pe)}function Wr(Pe){return Pe.sort(function(Xe,at){return Xe===Al?-1:at===Al?1:Xe=1,xt>=2,Xe)}else if(at===Ha){var Et=Pe.data;return new Ar(Et.thisDep,Et.contextDep,Et.propDep,Xe)}else{if(at===Qa)return new Ar(!1,!1,!1,Xe);if(at===Ya){for(var Bt=!1,St=!1,Pt=!1,$t=0;$t=1&&(St=!0),dr>=2&&(Pt=!0)}else Ht.type===Ha&&(Bt=Bt||Ht.data.thisDep,St=St||Ht.data.contextDep,Pt=Pt||Ht.data.propDep)}return new Ar(Bt,St,Pt,Xe)}else return new Ar(at===na,at===Zi,at===Gn,Xe)}}var ai=new Ar(!1,!1,!1,function(){});function Mi(Pe,Xe,at,xt,Et,Bt,St,Pt,$t,Ht,dr,Xr,Or,$r,Er,Tr){var Rr=Ht.Record,Lr={add:32774,subtract:32778,"reverse subtract":32779};at.ext_blend_minmax&&(Lr.min=Ee,Lr.max=Re);var an=at.angle_instanced_arrays,on=at.webgl_draw_buffers,Nn=at.oes_vertex_array_object,Yn={dirty:!0,profile:Tr.profile},yi={},Sn=[],An={},li={};function Vn(ar){return ar.replace(".","_")}function jn(ar,gr,Pr){var pn=Vn(ar);Sn.push(ar),yi[pn]=Yn[pn]=!!Pr,An[pn]=gr}function Wn(ar,gr,Pr){var pn=Vn(ar);Sn.push(ar),Array.isArray(Pr)?(Yn[pn]=Pr.slice(),yi[pn]=Pr.slice()):Yn[pn]=yi[pn]=Pr,li[pn]=gr}function si(ar){return!!isNaN(ar)}jn(ho,wn),jn(Pa,ln),Wn(Js,"blendColor",[0,0,0,0]),Wn(fs,"blendEquationSeparate",[Rt,Rt]),Wn(Io,"blendFuncSeparate",[Ft,vt,Ft,vt]),jn(oi,gi,!0),Wn(ro,"depthFunc",ir),Wn(Go,"depthRange",[0,1]),Wn(Qs,"depthMask",!0),Wn(zl,zl,[!0,!0,!0,!0]),jn(cu,Br),Wn(Zu,"cullFace",te),Wn(mc,mc,Se),Wn(Yl,Yl,1),jn(lf,mi),Wn($u,"polygonOffset",[0,0]),jn(ph,ia),jn(gh,ua),Wn(uf,"sampleCoverage",[1,!1]),jn(Ku,In),Wn(fu,"stencilMask",-1),Wn(Ju,"stencilFunc",[nt,0,-1]),Wn(Qu,"stencilOpSeparate",[W,He,He,He]),Wn(Wd,"stencilOpSeparate",[te,He,He,He]),jn(x0,Bi),Wn(Bf,"scissor",[0,0,Pe.drawingBufferWidth,Pe.drawingBufferHeight]),Wn(Al,Al,[0,0,Pe.drawingBufferWidth,Pe.drawingBufferHeight]);var zi={gl:Pe,context:Or,strings:Xe,next:yi,current:Yn,draw:Xr,elements:Bt,buffer:Et,shader:dr,attributes:Ht.state,vao:Ht,uniforms:$t,framebuffer:Pt,extensions:at,timer:$r,isBufferArgs:Gr},da={primTypes:ss,compareFuncs:sr,blendFuncs:Vr,blendEquations:Lr,stencilOps:br,glTypes:Cn,orientationType:kr};on&&(da.backBuffer=[te],da.drawBuffer=A(xt.maxDrawbuffers,function(ar){return ar===0?[0]:A(ar,function(gr){return Cr+gr})}));var ui=0;function Li(){var ar=On({cache:Er}),gr=ar.link,Pr=ar.global;ar.id=ui++,ar.batchId="0";var pn=gr(zi),Mn=ar.shared={props:"a0"};Object.keys(zi).forEach(function(zr){Mn[zr]=Pr.def(pn,".",zr)});var sn=ar.next={},tn=ar.current={};Object.keys(li).forEach(function(zr){Array.isArray(Yn[zr])&&(sn[zr]=Pr.def(Mn.next,".",zr),tn[zr]=Pr.def(Mn.current,".",zr))});var Hr=ar.constants={};Object.keys(da).forEach(function(zr){Hr[zr]=Pr.def(JSON.stringify(da[zr]))}),ar.invoke=function(zr,yr){switch(yr.type){case Un:var hn=["this",Mn.context,Mn.props,ar.batchId];return zr.def(gr(yr.data),".call(",hn.slice(0,Math.max(yr.data.length+1,4)),")");case Gn:return zr.def(Mn.props,yr.data);case Zi:return zr.def(Mn.context,yr.data);case na:return zr.def("this",yr.data);case Ha:return yr.data.append(ar,zr),yr.data.ref;case Qa:return yr.data.toString();case Ya:return yr.data.map(function(kn){return ar.invoke(zr,kn)})}},ar.attribCache={};var Mr={};return ar.scopeAttrib=function(zr){var yr=Xe.id(zr);if(yr in Mr)return Mr[yr];var hn=Ht.scope[yr];hn||(hn=Ht.scope[yr]=new Rr);var kn=Mr[yr]=gr(hn);return kn},ar}function Ki(ar){var gr=ar.static,Pr=ar.dynamic,pn;if(Xl in gr){var Mn=!!gr[Xl];pn=zn(function(tn,Hr){return Mn}),pn.enable=Mn}else if(Xl in Pr){var sn=Pr[Xl];pn=Zn(sn,function(tn,Hr){return tn.invoke(Hr,sn)})}return pn}function ca(ar,gr){var Pr=ar.static,pn=ar.dynamic;if(cf in Pr){var Mn=Pr[cf];return Mn?(Mn=Pt.getFramebuffer(Mn),zn(function(tn,Hr){var Mr=tn.link(Mn),zr=tn.shared;Hr.set(zr.framebuffer,".next",Mr);var yr=zr.context;return Hr.set(yr,"."+Ne,Mr+".width"),Hr.set(yr,"."+Qe,Mr+".height"),Mr})):zn(function(tn,Hr){var Mr=tn.shared;Hr.set(Mr.framebuffer,".next","null");var zr=Mr.context;return Hr.set(zr,"."+Ne,zr+"."+Zt),Hr.set(zr,"."+Qe,zr+"."+Nt),"null"})}else if(cf in pn){var sn=pn[cf];return Zn(sn,function(tn,Hr){var Mr=tn.invoke(Hr,sn),zr=tn.shared,yr=zr.framebuffer,hn=Hr.def(yr,".getFramebuffer(",Mr,")");Hr.set(yr,".next",hn);var kn=zr.context;return Hr.set(kn,"."+Ne,hn+"?"+hn+".width:"+kn+"."+Zt),Hr.set(kn,"."+Qe,hn+"?"+hn+".height:"+kn+"."+Nt),hn})}else return null}function Ia(ar,gr,Pr){var pn=ar.static,Mn=ar.dynamic;function sn(Mr){if(Mr in pn){var zr=pn[Mr],yr=!0,hn=zr.x|0,kn=zr.y|0,Xn,sa;return"width"in zr?Xn=zr.width|0:yr=!1,"height"in zr?sa=zr.height|0:yr=!1,new Ar(!yr&&gr&&gr.thisDep,!yr&&gr&&gr.contextDep,!yr&&gr&&gr.propDep,function(fa,ea){var $i=fa.shared.context,Fi=Xn;"width"in zr||(Fi=ea.def($i,".",Ne,"-",hn));var ji=sa;return"height"in zr||(ji=ea.def($i,".",Qe,"-",kn)),[hn,kn,Fi,ji]})}else if(Mr in Mn){var Oi=Mn[Mr],Pi=Zn(Oi,function(fa,ea){var $i=fa.invoke(ea,Oi),Fi=fa.shared.context,ji=ea.def($i,".x|0"),Wi=ea.def($i,".y|0"),Fa=ea.def('"width" in ',$i,"?",$i,".width|0:","(",Fi,".",Ne,"-",ji,")"),Vs=ea.def('"height" in ',$i,"?",$i,".height|0:","(",Fi,".",Qe,"-",Wi,")");return[ji,Wi,Fa,Vs]});return gr&&(Pi.thisDep=Pi.thisDep||gr.thisDep,Pi.contextDep=Pi.contextDep||gr.contextDep,Pi.propDep=Pi.propDep||gr.propDep),Pi}else return gr?new Ar(gr.thisDep,gr.contextDep,gr.propDep,function(fa,ea){var $i=fa.shared.context;return[0,0,ea.def($i,".",Ne),ea.def($i,".",Qe)]}):null}var tn=sn(Al);if(tn){var Hr=tn;tn=new Ar(tn.thisDep,tn.contextDep,tn.propDep,function(Mr,zr){var yr=Hr.append(Mr,zr),hn=Mr.shared.context;return zr.set(hn,"."+Je,yr[2]),zr.set(hn,"."+lt,yr[3]),yr})}return{viewport:tn,scissor_box:sn(Bf)}}function Os(ar,gr){var Pr=ar.static,pn=typeof Pr[Wh]=="string"&&typeof Pr[jh]=="string";if(pn){if(Object.keys(gr.dynamic).length>0)return null;var Mn=gr.static,sn=Object.keys(Mn);if(sn.length>0&&typeof Mn[sn[0]]=="number"){for(var tn=[],Hr=0;Hr"+ji+"?"+yr+".constant["+ji+"]:0;"}).join(""),"}}else{","if(",Xn,"(",yr,".buffer)){",fa,"=",sa,".createStream(",ur,",",yr,".buffer);","}else{",fa,"=",sa,".getBuffer(",yr,".buffer);","}",ea,'="type" in ',yr,"?",kn.glTypes,"[",yr,".type]:",fa,".dtype;",Oi.normalized,"=!!",yr,".normalized;");function $i(Fi){zr(Oi[Fi],"=",yr,".",Fi,"|0;")}return $i("size"),$i("offset"),$i("stride"),$i("divisor"),zr("}}"),zr.exit("if(",Oi.isStream,"){",sa,".destroyStream(",fa,");","}"),Oi}Mn[sn]=Zn(tn,Hr)}),Mn}function po(ar){var gr=ar.static,Pr=ar.dynamic,pn={};return Object.keys(gr).forEach(function(Mn){var sn=gr[Mn];pn[Mn]=zn(function(tn,Hr){return typeof sn=="number"||typeof sn=="boolean"?""+sn:tn.link(sn)})}),Object.keys(Pr).forEach(function(Mn){var sn=Pr[Mn];pn[Mn]=Zn(sn,function(tn,Hr){return tn.invoke(Hr,sn)})}),pn}function $o(ar,gr,Pr,pn,Mn){var sn=ar.static,tn=ar.dynamic,Hr=Os(ar,gr),Mr=ca(ar,Mn),zr=Ia(ar,Mr,Mn),yr=Na(ar,Mn),hn=Ns(ar,Mn),kn=Ss(ar,Mn,Hr);function Xn($i){var Fi=zr[$i];Fi&&(hn[$i]=Fi)}Xn(Al),Xn(Vn(Bf));var sa=Object.keys(hn).length>0,Oi={framebuffer:Mr,draw:yr,shader:kn,state:hn,dirty:sa,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Oi.profile=Ki(ar,Mn),Oi.uniforms=vo(Pr,Mn),Oi.drawVAO=Oi.scopeVAO=yr.vao,!Oi.drawVAO&&kn.program&&!Hr&&at.angle_instanced_arrays&&yr.static.elements){var Pi=!0,fa=kn.program.attributes.map(function($i){var Fi=gr.static[$i];return Pi=Pi&&!!Fi,Fi});if(Pi&&fa.length>0){var ea=Ht.getVAO(Ht.createVAO({attributes:fa,elements:yr.static.elements}));Oi.drawVAO=new Ar(null,null,null,function($i,Fi){return $i.link(ea)}),Oi.useVAO=!0}}return Hr?Oi.useVAO=!0:Oi.attributes=bo(gr,Mn),Oi.context=po(pn,Mn),Oi}function no(ar,gr,Pr){var pn=ar.shared,Mn=pn.context,sn=ar.scope();Object.keys(Pr).forEach(function(tn){gr.save(Mn,"."+tn);var Hr=Pr[tn],Mr=Hr.append(ar,gr);Array.isArray(Mr)?sn(Mn,".",tn,"=[",Mr.join(),"];"):sn(Mn,".",tn,"=",Mr,";")}),gr(sn)}function Us(ar,gr,Pr,pn){var Mn=ar.shared,sn=Mn.gl,tn=Mn.framebuffer,Hr;on&&(Hr=gr.def(Mn.extensions,".webgl_draw_buffers"));var Mr=ar.constants,zr=Mr.drawBuffer,yr=Mr.backBuffer,hn;Pr?hn=Pr.append(ar,gr):hn=gr.def(tn,".next"),pn||gr("if(",hn,"!==",tn,".cur){"),gr("if(",hn,"){",sn,".bindFramebuffer(",nr,",",hn,".framebuffer);"),on&&gr(Hr,".drawBuffersWEBGL(",zr,"[",hn,".colorAttachments.length]);"),gr("}else{",sn,".bindFramebuffer(",nr,",null);"),on&&gr(Hr,".drawBuffersWEBGL(",yr,");"),gr("}",tn,".cur=",hn,";"),pn||gr("}")}function ql(ar,gr,Pr){var pn=ar.shared,Mn=pn.gl,sn=ar.current,tn=ar.next,Hr=pn.current,Mr=pn.next,zr=ar.cond(Hr,".dirty");Sn.forEach(function(yr){var hn=Vn(yr);if(!(hn in Pr.state)){var kn,Xn;if(hn in tn){kn=tn[hn],Xn=sn[hn];var sa=A(Yn[hn].length,function(Pi){return zr.def(kn,"[",Pi,"]")});zr(ar.cond(sa.map(function(Pi,fa){return Pi+"!=="+Xn+"["+fa+"]"}).join("||")).then(Mn,".",li[hn],"(",sa,");",sa.map(function(Pi,fa){return Xn+"["+fa+"]="+Pi}).join(";"),";"))}else{kn=zr.def(Mr,".",hn);var Oi=ar.cond(kn,"!==",Hr,".",hn);zr(Oi),hn in An?Oi(ar.cond(kn).then(Mn,".enable(",An[hn],");").else(Mn,".disable(",An[hn],");"),Hr,".",hn,"=",kn,";"):Oi(Mn,".",li[hn],"(",kn,");",Hr,".",hn,"=",kn,";")}}}),Object.keys(Pr.state).length===0&&zr(Hr,".dirty=false;"),gr(zr)}function Ta(ar,gr,Pr,pn){var Mn=ar.shared,sn=ar.current,tn=Mn.current,Hr=Mn.gl,Mr;Wr(Object.keys(Pr)).forEach(function(zr){var yr=Pr[zr];if(!(pn&&!pn(yr))){var hn=yr.append(ar,gr);if(An[zr]){var kn=An[zr];En(yr)?(Mr=ar.link(hn,{stable:!0}),gr(ar.cond(Mr).then(Hr,".enable(",kn,");").else(Hr,".disable(",kn,");")),gr(tn,".",zr,"=",Mr,";")):(gr(ar.cond(hn).then(Hr,".enable(",kn,");").else(Hr,".disable(",kn,");")),gr(tn,".",zr,"=",hn,";"))}else if(bn(hn)){var Xn=sn[zr];gr(Hr,".",li[zr],"(",hn,");",hn.map(function(sa,Oi){return Xn+"["+Oi+"]="+sa}).join(";"),";")}else En(yr)?(Mr=ar.link(hn,{stable:!0}),gr(Hr,".",li[zr],"(",Mr,");",tn,".",zr,"=",Mr,";")):gr(Hr,".",li[zr],"(",hn,");",tn,".",zr,"=",hn,";")}})}function vu(ar,gr){an&&(ar.instancing=gr.def(ar.shared.extensions,".angle_instanced_arrays"))}function ys(ar,gr,Pr,pn,Mn){var sn=ar.shared,tn=ar.stats,Hr=sn.current,Mr=sn.timer,zr=Pr.profile;function yr(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var hn,kn;function Xn($i){hn=gr.def(),$i(hn,"=",yr(),";"),typeof Mn=="string"?$i(tn,".count+=",Mn,";"):$i(tn,".count++;"),$r&&(pn?(kn=gr.def(),$i(kn,"=",Mr,".getNumPendingQueries();")):$i(Mr,".beginQuery(",tn,");"))}function sa($i){$i(tn,".cpuTime+=",yr(),"-",hn,";"),$r&&(pn?$i(Mr,".pushScopeStats(",kn,",",Mr,".getNumPendingQueries(),",tn,");"):$i(Mr,".endQuery();"))}function Oi($i){var Fi=gr.def(Hr,".profile");gr(Hr,".profile=",$i,";"),gr.exit(Hr,".profile=",Fi,";")}var Pi;if(zr){if(En(zr)){zr.enable?(Xn(gr),sa(gr.exit),Oi("true")):Oi("false");return}Pi=zr.append(ar,gr),Oi(Pi)}else Pi=gr.def(Hr,".profile");var fa=ar.block();Xn(fa),gr("if(",Pi,"){",fa,"}");var ea=ar.block();sa(ea),gr.exit("if(",Pi,"){",ea,"}")}function xc(ar,gr,Pr,pn,Mn){var sn=ar.shared;function tn(Mr){switch(Mr){case Bo:case Eu:case Di:return 2;case Ua:case el:case fl:return 3;case ls:case yc:case Fc:return 4;default:return 1}}function Hr(Mr,zr,yr){var hn=sn.gl,kn=gr.def(Mr,".location"),Xn=gr.def(sn.attributes,"[",kn,"]"),sa=yr.state,Oi=yr.buffer,Pi=[yr.x,yr.y,yr.z,yr.w],fa=["buffer","normalized","offset","stride"];function ea(){gr("if(!",Xn,".buffer){",hn,".enableVertexAttribArray(",kn,");}");var Fi=yr.type,ji;if(yr.size?ji=gr.def(yr.size,"||",zr):ji=zr,gr("if(",Xn,".type!==",Fi,"||",Xn,".size!==",ji,"||",fa.map(function(Fa){return Xn+"."+Fa+"!=="+yr[Fa]}).join("||"),"){",hn,".bindBuffer(",ur,",",Oi,".buffer);",hn,".vertexAttribPointer(",[kn,ji,Fi,yr.normalized,yr.stride,yr.offset],");",Xn,".type=",Fi,";",Xn,".size=",ji,";",fa.map(function(Fa){return Xn+"."+Fa+"="+yr[Fa]+";"}).join(""),"}"),an){var Wi=yr.divisor;gr("if(",Xn,".divisor!==",Wi,"){",ar.instancing,".vertexAttribDivisorANGLE(",[kn,Wi],");",Xn,".divisor=",Wi,";}")}}function $i(){gr("if(",Xn,".buffer){",hn,".disableVertexAttribArray(",kn,");",Xn,".buffer=null;","}if(",ki.map(function(Fi,ji){return Xn+"."+Fi+"!=="+Pi[ji]}).join("||"),"){",hn,".vertexAttrib4f(",kn,",",Pi,");",ki.map(function(Fi,ji){return Xn+"."+Fi+"="+Pi[ji]+";"}).join(""),"}")}sa===qi?ea():sa===pi?$i():(gr("if(",sa,"===",qi,"){"),ea(),gr("}else{"),$i(),gr("}"))}pn.forEach(function(Mr){var zr=Mr.name,yr=Pr.attributes[zr],hn;if(yr){if(!Mn(yr))return;hn=yr.append(ar,gr)}else{if(!Mn(ai))return;var kn=ar.scopeAttrib(zr);hn={},Object.keys(new Rr).forEach(function(Xn){hn[Xn]=gr.def(kn,".",Xn)})}Hr(ar.link(Mr),tn(Mr.info.type),hn)})}function Zl(ar,gr,Pr,pn,Mn,sn){for(var tn=ar.shared,Hr=tn.gl,Mr,zr=0;zr1){for(var Dc=[],Kl=[],Vv=0;Vv>1)",Oi],");")}function Wi(){Pr(Pi,".drawArraysInstancedANGLE(",[kn,Xn,sa,Oi],");")}yr&&yr!=="null"?ea?ji():(Pr("if(",yr,"){"),ji(),Pr("}else{"),Wi(),Pr("}")):Wi()}function Fi(){function ji(){Pr(sn+".drawElements("+[kn,sa,fa,Xn+"<<(("+fa+"-"+Ci+")>>1)"]+");")}function Wi(){Pr(sn+".drawArrays("+[kn,Xn,sa]+");")}yr&&yr!=="null"?ea?ji():(Pr("if(",yr,"){"),ji(),Pr("}else{"),Wi(),Pr("}")):Wi()}an&&(typeof Oi!="number"||Oi>=0)?typeof Oi=="string"?(Pr("if(",Oi,">0){"),$i(),Pr("}else if(",Oi,"<0){"),Fi(),Pr("}")):$i():Fi()}function xa(ar,gr,Pr,pn,Mn){var sn=Li(),tn=sn.proc("body",Mn);return an&&(sn.instancing=tn.def(sn.shared.extensions,".angle_instanced_arrays")),ar(sn,tn,Pr,pn),sn.compile().body}function uo(ar,gr,Pr,pn){vu(ar,gr),Pr.useVAO?Pr.drawVAO?gr(ar.shared.vao,".setVAO(",Pr.drawVAO.append(ar,gr),");"):gr(ar.shared.vao,".setVAO(",ar.shared.vao,".targetVAO);"):(gr(ar.shared.vao,".setVAO(null);"),xc(ar,gr,Pr,pn.attributes,function(){return!0})),Zl(ar,gr,Pr,pn.uniforms,function(){return!0},!1),$l(ar,gr,gr,Pr)}function Es(ar,gr){var Pr=ar.proc("draw",1);vu(ar,Pr),no(ar,Pr,gr.context),Us(ar,Pr,gr.framebuffer),ql(ar,Pr,gr),Ta(ar,Pr,gr.state),ys(ar,Pr,gr,!1,!0);var pn=gr.shader.progVar.append(ar,Pr);if(Pr(ar.shared.gl,".useProgram(",pn,".program);"),gr.shader.program)uo(ar,Pr,gr,gr.shader.program);else{Pr(ar.shared.vao,".setVAO(null);");var Mn=ar.global.def("{}"),sn=Pr.def(pn,".id"),tn=Pr.def(Mn,"[",sn,"]");Pr(ar.cond(tn).then(tn,".call(this,a0);").else(tn,"=",Mn,"[",sn,"]=",ar.link(function(Hr){return xa(uo,ar,gr,Hr,1)}),"(",pn,");",tn,".call(this,a0);"))}Object.keys(gr.state).length>0&&Pr(ar.shared.current,".dirty=true;"),ar.shared.vao&&Pr(ar.shared.vao,".setVAO(null);")}function vr(ar,gr,Pr,pn){ar.batchId="a1",vu(ar,gr);function Mn(){return!0}xc(ar,gr,Pr,pn.attributes,Mn),Zl(ar,gr,Pr,pn.uniforms,Mn,!1),$l(ar,gr,gr,Pr)}function gn(ar,gr,Pr,pn){vu(ar,gr);var Mn=Pr.contextDep,sn=gr.def(),tn="a0",Hr="a1",Mr=gr.def();ar.shared.props=Mr,ar.batchId=sn;var zr=ar.scope(),yr=ar.scope();gr(zr.entry,"for(",sn,"=0;",sn,"<",Hr,";++",sn,"){",Mr,"=",tn,"[",sn,"];",yr,"}",zr.exit);function hn(fa){return fa.contextDep&&Mn||fa.propDep}function kn(fa){return!hn(fa)}if(Pr.needsContext&&no(ar,yr,Pr.context),Pr.needsFramebuffer&&Us(ar,yr,Pr.framebuffer),Ta(ar,yr,Pr.state,hn),Pr.profile&&hn(Pr.profile)&&ys(ar,yr,Pr,!1,!0),pn)Pr.useVAO?Pr.drawVAO?hn(Pr.drawVAO)?yr(ar.shared.vao,".setVAO(",Pr.drawVAO.append(ar,yr),");"):zr(ar.shared.vao,".setVAO(",Pr.drawVAO.append(ar,zr),");"):zr(ar.shared.vao,".setVAO(",ar.shared.vao,".targetVAO);"):(zr(ar.shared.vao,".setVAO(null);"),xc(ar,zr,Pr,pn.attributes,kn),xc(ar,yr,Pr,pn.attributes,hn)),Zl(ar,zr,Pr,pn.uniforms,kn,!1),Zl(ar,yr,Pr,pn.uniforms,hn,!0),$l(ar,zr,yr,Pr);else{var Xn=ar.global.def("{}"),sa=Pr.shader.progVar.append(ar,yr),Oi=yr.def(sa,".id"),Pi=yr.def(Xn,"[",Oi,"]");yr(ar.shared.gl,".useProgram(",sa,".program);","if(!",Pi,"){",Pi,"=",Xn,"[",Oi,"]=",ar.link(function(fa){return xa(vr,ar,Pr,fa,2)}),"(",sa,");}",Pi,".call(this,a0[",sn,"],",sn,");")}}function xn(ar,gr){var Pr=ar.proc("batch",2);ar.batchId="0",vu(ar,Pr);var pn=!1,Mn=!0;Object.keys(gr.context).forEach(function(Xn){pn=pn||gr.context[Xn].propDep}),pn||(no(ar,Pr,gr.context),Mn=!1);var sn=gr.framebuffer,tn=!1;sn?(sn.propDep?pn=tn=!0:sn.contextDep&&pn&&(tn=!0),tn||Us(ar,Pr,sn)):Us(ar,Pr,null),gr.state.viewport&&gr.state.viewport.propDep&&(pn=!0);function Hr(Xn){return Xn.contextDep&&pn||Xn.propDep}ql(ar,Pr,gr),Ta(ar,Pr,gr.state,function(Xn){return!Hr(Xn)}),(!gr.profile||!Hr(gr.profile))&&ys(ar,Pr,gr,!1,"a1"),gr.contextDep=pn,gr.needsContext=Mn,gr.needsFramebuffer=tn;var Mr=gr.shader.progVar;if(Mr.contextDep&&pn||Mr.propDep)gn(ar,Pr,gr,null);else{var zr=Mr.append(ar,Pr);if(Pr(ar.shared.gl,".useProgram(",zr,".program);"),gr.shader.program)gn(ar,Pr,gr,gr.shader.program);else{Pr(ar.shared.vao,".setVAO(null);");var yr=ar.global.def("{}"),hn=Pr.def(zr,".id"),kn=Pr.def(yr,"[",hn,"]");Pr(ar.cond(kn).then(kn,".call(this,a0,a1);").else(kn,"=",yr,"[",hn,"]=",ar.link(function(Xn){return xa(gn,ar,gr,Xn,2)}),"(",zr,");",kn,".call(this,a0,a1);"))}}Object.keys(gr.state).length>0&&Pr(ar.shared.current,".dirty=true;"),ar.shared.vao&&Pr(ar.shared.vao,".setVAO(null);")}function Gi(ar,gr){var Pr=ar.proc("scope",3);ar.batchId="a2";var pn=ar.shared,Mn=pn.current;if(no(ar,Pr,gr.context),gr.framebuffer&&gr.framebuffer.append(ar,Pr),Wr(Object.keys(gr.state)).forEach(function(Hr){var Mr=gr.state[Hr],zr=Mr.append(ar,Pr);bn(zr)?zr.forEach(function(yr,hn){si(yr)?Pr.set(ar.next[Hr],"["+hn+"]",yr):Pr.set(ar.next[Hr],"["+hn+"]",ar.link(yr,{stable:!0}))}):En(Mr)?Pr.set(pn.next,"."+Hr,ar.link(zr,{stable:!0})):Pr.set(pn.next,"."+Hr,zr)}),ys(ar,Pr,gr,!0,!0),[Yh,_i,Mu,Su,hu].forEach(function(Hr){var Mr=gr.draw[Hr];if(Mr){var zr=Mr.append(ar,Pr);si(zr)?Pr.set(pn.draw,"."+Hr,zr):Pr.set(pn.draw,"."+Hr,ar.link(zr),{stable:!0})}}),Object.keys(gr.uniforms).forEach(function(Hr){var Mr=gr.uniforms[Hr].append(ar,Pr);Array.isArray(Mr)&&(Mr="["+Mr.map(function(zr){return si(zr)?zr:ar.link(zr,{stable:!0})})+"]"),Pr.set(pn.uniforms,"["+ar.link(Xe.id(Hr),{stable:!0})+"]",Mr)}),Object.keys(gr.attributes).forEach(function(Hr){var Mr=gr.attributes[Hr].append(ar,Pr),zr=ar.scopeAttrib(Hr);Object.keys(new Rr).forEach(function(yr){Pr.set(zr,"."+yr,Mr[yr])})}),gr.scopeVAO){var sn=gr.scopeVAO.append(ar,Pr);si(sn)?Pr.set(pn.vao,".targetVAO",sn):Pr.set(pn.vao,".targetVAO",ar.link(sn,{stable:!0}))}function tn(Hr){var Mr=gr.shader[Hr];if(Mr){var zr=Mr.append(ar,Pr);si(zr)?Pr.set(pn.shader,"."+Hr,zr):Pr.set(pn.shader,"."+Hr,ar.link(zr,{stable:!0}))}}tn(jh),tn(Wh),Object.keys(gr.state).length>0&&(Pr(Mn,".dirty=true;"),Pr.exit(Mn,".dirty=true;")),Pr("a1(",ar.shared.context,",a0,",ar.batchId,");")}function To(ar){if(!(typeof ar!="object"||bn(ar))){for(var gr=Object.keys(ar),Pr=0;Pr=0;--xa){var uo=zi[xa];uo&&uo(Er,null,0)}at.flush(),dr&&dr.update()}function Ia(){!Ki&&zi.length>0&&(Ki=g.next(ca))}function Os(){Ki&&(g.cancel(ca),Ki=null)}function Ss(xa){xa.preventDefault(),Et=!0,Os(),da.forEach(function(uo){uo()})}function Na(xa){at.getError(),Et=!1,Bt.restore(),yi.restore(),an.restore(),Sn.restore(),An.restore(),li.restore(),Nn.restore(),dr&&dr.restore(),Vn.procs.refresh(),Ia(),ui.forEach(function(uo){uo()})}si&&(si.addEventListener(de,Ss,!1),si.addEventListener(Ae,Na,!1));function Ns(){zi.length=0,Os(),si&&(si.removeEventListener(de,Ss),si.removeEventListener(Ae,Na)),yi.clear(),li.clear(),An.clear(),Nn.clear(),Sn.clear(),on.clear(),an.clear(),dr&&dr.clear(),Li.forEach(function(xa){xa()})}function vo(xa){function uo(sn){var tn=e({},sn);delete tn.uniforms,delete tn.attributes,delete tn.context,delete tn.vao,"stencil"in tn&&tn.stencil.op&&(tn.stencil.opBack=tn.stencil.opFront=tn.stencil.op,delete tn.stencil.op);function Hr(Mr){if(Mr in tn){var zr=tn[Mr];delete tn[Mr],Object.keys(zr).forEach(function(yr){tn[Mr+"."+yr]=zr[yr]})}}return Hr("blend"),Hr("depth"),Hr("cull"),Hr("stencil"),Hr("polygonOffset"),Hr("scissor"),Hr("sample"),"vao"in sn&&(tn.vao=sn.vao),tn}function Es(sn,tn){var Hr={},Mr={};return Object.keys(sn).forEach(function(zr){var yr=sn[zr];if(v.isDynamic(yr)){Mr[zr]=v.unbox(yr,zr);return}else if(tn&&Array.isArray(yr)){for(var hn=0;hn0)return ar.call(this,pn(sn|0),sn|0)}else if(Array.isArray(sn)){if(sn.length)return ar.call(this,sn,sn.length)}else return Hi.call(this,sn)}return e(Mn,{stats:To,destroy:function(){xs.destroy()}})}var bo=li.setFBO=vo({framebuffer:v.define.call(null,Fe,"framebuffer")});function po(xa,uo){var Es=0;Vn.procs.poll();var vr=uo.color;vr&&(at.clearColor(+vr[0]||0,+vr[1]||0,+vr[2]||0,+vr[3]||0),Es|=N),"depth"in uo&&(at.clearDepth(+uo.depth),Es|=H),"stencil"in uo&&(at.clearStencil(uo.stencil|0),Es|=$),at.clear(Es)}function $o(xa){if("framebuffer"in xa)if(xa.framebuffer&&xa.framebuffer_reglType==="framebufferCube")for(var uo=0;uo<6;++uo)bo(e({framebuffer:xa.framebuffer.faces[uo]},xa),po);else bo(xa,po);else po(null,xa)}function no(xa){zi.push(xa);function uo(){var Es=st(zi,xa);function vr(){var gn=st(zi,vr);zi[gn]=zi[zi.length-1],zi.length-=1,zi.length<=0&&Os()}zi[Es]=vr}return Ia(),{cancel:uo}}function Us(){var xa=Wn.viewport,uo=Wn.scissor_box;xa[0]=xa[1]=uo[0]=uo[1]=0,Er.viewportWidth=Er.framebufferWidth=Er.drawingBufferWidth=xa[2]=uo[2]=at.drawingBufferWidth,Er.viewportHeight=Er.framebufferHeight=Er.drawingBufferHeight=xa[3]=uo[3]=at.drawingBufferHeight}function ql(){Er.tick+=1,Er.time=vu(),Us(),Vn.procs.poll()}function Ta(){Sn.refresh(),Us(),Vn.procs.refresh(),dr&&dr.update()}function vu(){return(p()-Xr)/1e3}Ta();function ys(xa,uo){var Es;switch(xa){case"frame":return no(uo);case"lost":Es=da;break;case"restore":Es=ui;break;case"destroy":Es=Li;break;default:}return Es.push(uo),{cancel:function(){for(var vr=0;vr=0},read:jn,destroy:Ns,_gl:at,_refresh:Ta,poll:function(){ql(),dr&&dr.update()},now:vu,stats:Pt,getCachedCode:xc,preloadCachedCode:Zl});return Xe.onDone(null,$l),$l}return ht}))});var AVe=fe(($Tr,TVe)=>{"use strict";var iKt=E1();TVe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},bVe(t)?t={container:t}:aKt(t)?t={container:t}:oKt(t)?t={gl:t}:t=iKt(t,{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),t.pixelRatio||(t.pixelRatio=window.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(typeof t.container=="string"){var r=document.querySelector(t.container);if(!r)throw Error("Element "+t.container+" is not found");t.container=r}bVe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=wVe(),t.container.appendChild(t.canvas),_Ve(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=wVe(),t.container.appendChild(t.canvas),_Ve(t);else throw Error("Not DOM environment. Use headless-gl.");return t.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{t.gl=t.canvas.getContext(n,t.attrs)}catch(a){}return t.gl}),t.gl};function _Ve(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function bVe(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function aKt(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function oKt(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function wVe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var SVe=fe((KTr,MVe)=>{"use strict";var sKt=l$(),lKt=[32,126];MVe.exports=uKt;function uKt(e){e=e||{};var t=e.shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],r=e.canvas||document.createElement("canvas"),n=e.font,a=typeof e.step=="number"?[e.step,e.step]:e.step||[32,32],i=e.chars||lKt;if(n&&typeof n!="string"&&(n=sKt(n)),!Array.isArray(i))i=String(i).split("");else if(i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"){for(var o=[],s=i[0],l=0;s<=i[1];s++)o[l++]=String.fromCharCode(s);i=o}t=t.slice(),r.width=t[0],r.height=t[1];var u=r.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,r.width,r.height),u.font=n,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";for(var c=a[0]/2,f=a[1]/2,s=0;st[0]-a[0]/2&&(c=a[0]/2,f+=a[1]);return r}});var d$=fe(uc=>{"use strict";"use restrict";var h$=32;uc.INT_BITS=h$;uc.INT_MAX=2147483647;uc.INT_MIN=-1<0)-(e<0)};uc.abs=function(e){var t=e>>h$-1;return(e^t)-t};uc.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1};uc.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0};uc.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function EVe(e){var t=32;return e&=-e,e&&t--,e&65535&&(t-=16),e&16711935&&(t-=8),e&252645135&&(t-=4),e&858993459&&(t-=2),e&1431655765&&(t-=1),t}uc.countTrailingZeros=EVe;uc.nextPow2=function(e){return e+=e===0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1};uc.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};uc.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var qM=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,a=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=r&1,--a;e[t]=n<>>8&255]<<16|qM[e>>>16&255]<<8|qM[e>>>24&255]};uc.interleave2=function(e,t){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t&=65535,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1};uc.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};uc.interleave3=function(e,t,r){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|=t<<1,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|r<<2};uc.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};uc.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>EVe(e)+1}});var LVe=fe((QTr,CVe)=>{"use strict";function kVe(e,t,r){var n=e[r]|0;if(n<=0)return[];var a=new Array(n),i;if(r===e.length-1)for(i=0;i0)return cKt(e|0,t);break;case"object":if(typeof e.length=="number")return kVe(e,t,0);break}return[]}CVe.exports=fKt});var jVe=fe(os=>{"use strict";var ky=d$(),Rh=LVe(),PVe=Mx().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Rh([32,0]),UINT16:Rh([32,0]),UINT32:Rh([32,0]),BIGUINT64:Rh([32,0]),INT8:Rh([32,0]),INT16:Rh([32,0]),INT32:Rh([32,0]),BIGINT64:Rh([32,0]),FLOAT:Rh([32,0]),DOUBLE:Rh([32,0]),DATA:Rh([32,0]),UINT8C:Rh([32,0]),BUFFER:Rh([32,0])});var hKt=typeof Uint8ClampedArray!="undefined",dKt=typeof BigUint64Array!="undefined",vKt=typeof BigInt64Array!="undefined",Ec=window.__TYPEDARRAY_POOL;Ec.UINT8C||(Ec.UINT8C=Rh([32,0]));Ec.BIGUINT64||(Ec.BIGUINT64=Rh([32,0]));Ec.BIGINT64||(Ec.BIGINT64=Rh([32,0]));Ec.BUFFER||(Ec.BUFFER=Rh([32,0]));var EF=Ec.DATA,kF=Ec.BUFFER;os.free=function(t){if(PVe.isBuffer(t))kF[ky.log2(t.length)].push(t);else{if(Object.prototype.toString.call(t)!=="[object ArrayBuffer]"&&(t=t.buffer),!t)return;var r=t.length||t.byteLength,n=ky.log2(r)|0;EF[n].push(t)}};function FVe(e){if(e){var t=e.length||e.byteLength,r=ky.log2(t);EF[r].push(e)}}function pKt(e){FVe(e.buffer)}os.freeUint8=os.freeUint16=os.freeUint32=os.freeBigUint64=os.freeInt8=os.freeInt16=os.freeInt32=os.freeBigInt64=os.freeFloat32=os.freeFloat=os.freeFloat64=os.freeDouble=os.freeUint8Clamped=os.freeDataView=pKt;os.freeArrayBuffer=FVe;os.freeBuffer=function(t){kF[ky.log2(t.length)].push(t)};os.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return d0(t);switch(r){case"uint8":return v$(t);case"uint16":return DVe(t);case"uint32":return RVe(t);case"int8":return IVe(t);case"int16":return zVe(t);case"int32":return qVe(t);case"float":case"float32":return BVe(t);case"double":case"float64":return OVe(t);case"uint8_clamped":return NVe(t);case"bigint64":return VVe(t);case"biguint64":return UVe(t);case"buffer":return HVe(t);case"data":case"dataview":return GVe(t);default:return null}return null};function d0(t){var t=ky.nextPow2(t),r=ky.log2(t),n=EF[r];return n.length>0?n.pop():new ArrayBuffer(t)}os.mallocArrayBuffer=d0;function v$(e){return new Uint8Array(d0(e),0,e)}os.mallocUint8=v$;function DVe(e){return new Uint16Array(d0(2*e),0,e)}os.mallocUint16=DVe;function RVe(e){return new Uint32Array(d0(4*e),0,e)}os.mallocUint32=RVe;function IVe(e){return new Int8Array(d0(e),0,e)}os.mallocInt8=IVe;function zVe(e){return new Int16Array(d0(2*e),0,e)}os.mallocInt16=zVe;function qVe(e){return new Int32Array(d0(4*e),0,e)}os.mallocInt32=qVe;function BVe(e){return new Float32Array(d0(4*e),0,e)}os.mallocFloat32=os.mallocFloat=BVe;function OVe(e){return new Float64Array(d0(8*e),0,e)}os.mallocFloat64=os.mallocDouble=OVe;function NVe(e){return hKt?new Uint8ClampedArray(d0(e),0,e):v$(e)}os.mallocUint8Clamped=NVe;function UVe(e){return dKt?new BigUint64Array(d0(8*e),0,e):null}os.mallocBigUint64=UVe;function VVe(e){return vKt?new BigInt64Array(d0(8*e),0,e):null}os.mallocBigInt64=VVe;function GVe(e){return new DataView(d0(e),0,e)}os.mallocDataView=GVe;function HVe(e){e=ky.nextPow2(e);var t=ky.log2(e),r=kF[t];return r.length>0?r.pop():new PVe(e)}os.mallocBuffer=HVe;os.clearCache=function(){for(var t=0;t<32;++t)Ec.UINT8[t].length=0,Ec.UINT16[t].length=0,Ec.UINT32[t].length=0,Ec.INT8[t].length=0,Ec.INT16[t].length=0,Ec.INT32[t].length=0,Ec.FLOAT[t].length=0,Ec.DOUBLE[t].length=0,Ec.BIGUINT64[t].length=0,Ec.BIGINT64[t].length=0,Ec.UINT8C[t].length=0,EF[t].length=0,kF[t].length=0}});var YVe=fe((tAr,WVe)=>{"use strict";var gKt=Object.prototype.toString;WVe.exports=function(e){var t;return gKt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var p$=fe((rAr,XVe)=>{XVe.exports=function(t,r){r||(r=[0,""]),t=String(t);var n=parseFloat(t,10);return r[0]=n,r[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}});var KVe=fe((nAr,$Ve)=>{"use strict";var mKt=p$();$Ve.exports=ZVe;var BM=96;function g$(e,t){var r=mKt(getComputedStyle(e).getPropertyValue(t));return r[0]*ZVe(r[1],e)}function yKt(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=g$(r,"font-size")/128;return t.removeChild(r),n}function ZVe(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return yKt(e,t);case"em":return g$(t,"font-size");case"rem":return g$(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 BM;case"cm":return BM/2.54;case"mm":return BM/25.4;case"pt":return BM/72;case"pc":return BM/6}return 1}});var eGe=fe((iAr,QVe)=>{"use strict";QVe.exports=PF;var xKt=PF.canvas=document.createElement("canvas"),CF=xKt.getContext("2d"),JVe=LF([32,126]);PF.createPairs=LF;PF.ascii=JVe;function PF(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},n,a=16,i=.05;t&&(t.length===2&&typeof t[0]=="number"?n=LF(t):Array.isArray(t)?n=t:(t.o?n=LF(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(a=t.fontSize),t.threshold!=null&&(i=t.threshold))),n||(n=JVe),CF.font=a+"px "+e;for(var o=0;oa*i){var c=(u-l)/a;r[s]=c*1e3}}return r}function LF(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),a=e[0];a{"use strict";nGe.exports=Cy;Cy.canvas=document.createElement("canvas");Cy.cache={};function Cy(o,t){t||(t={}),(typeof o=="string"||Array.isArray(o))&&(t.family=o);var r=Array.isArray(t.family)?t.family.join(", "):t.family;if(!r)throw Error("`family` must be defined");var n=t.size||t.fontSize||t.em||48,a=t.weight||t.fontWeight||"",i=t.style||t.fontStyle||"",o=[i,a,n].join(" ")+"px "+r,s=t.origin||"top";if(Cy.cache[r]&&n<=Cy.cache[r].em)return tGe(Cy.cache[r],s);var l=t.canvas||Cy.canvas,u=l.getContext("2d"),c={upper:t.upper!==void 0?t.upper:"H",lower:t.lower!==void 0?t.lower:"x",descent:t.descent!==void 0?t.descent:"p",ascent:t.ascent!==void 0?t.ascent:"h",tittle:t.tittle!==void 0?t.tittle:"i",overshoot:t.overshoot!==void 0?t.overshoot:"O"},f=Math.ceil(n*1.5);l.height=f,l.width=f*.5,u.font=o;var v="H",g={top:0};u.clearRect(0,0,f,f),u.textBaseline="top",u.fillStyle="black",u.fillText(v,0,0);var p=C1(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline="bottom",u.fillText(v,0,f);var _=C1(u.getImageData(0,0,f,f));g.lineHeight=g.bottom=f-_+p,u.clearRect(0,0,f,f),u.textBaseline="alphabetic",u.fillText(v,0,f);var x=C1(u.getImageData(0,0,f,f)),y=f-x-1+p;g.baseline=g.alphabetic=y,u.clearRect(0,0,f,f),u.textBaseline="middle",u.fillText(v,0,f*.5);var C=C1(u.getImageData(0,0,f,f));g.median=g.middle=f-C-1+p-f*.5,u.clearRect(0,0,f,f),u.textBaseline="hanging",u.fillText(v,0,f*.5);var k=C1(u.getImageData(0,0,f,f));g.hanging=f-k-1+p-f*.5,u.clearRect(0,0,f,f),u.textBaseline="ideographic",u.fillText(v,0,f);var S=C1(u.getImageData(0,0,f,f));if(g.ideographic=f-S-1+p,c.upper&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.upper,0,0),g.upper=C1(u.getImageData(0,0,f,f)),g.capHeight=g.baseline-g.upper),c.lower&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.lower,0,0),g.lower=C1(u.getImageData(0,0,f,f)),g.xHeight=g.baseline-g.lower),c.tittle&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.tittle,0,0),g.tittle=C1(u.getImageData(0,0,f,f))),c.ascent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.ascent,0,0),g.ascent=C1(u.getImageData(0,0,f,f))),c.descent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.descent,0,0),g.descent=rGe(u.getImageData(0,0,f,f))),c.overshoot){u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.overshoot,0,0);var L=rGe(u.getImageData(0,0,f,f));g.overshoot=L-y}for(var w in g)g[w]/=n;return g.em=n,Cy.cache[r]=g,tGe(g,s)}function tGe(e,t){var r={};typeof t=="string"&&(t=e[t]);for(var n in e)n!=="em"&&(r[n]=e[n]-t);return r}function C1(e){for(var t=e.height,r=e.data,n=3;n0;n-=4)if(r[n]!==0)return Math.floor((n-3)*.25/t)}});var lGe=fe((oAr,sGe)=>{"use strict";var w5=xVe(),_Kt=E1(),bKt=f$(),wKt=AVe(),TKt=XZ(),m$=TM(),AKt=SVe(),Ly=jVe(),MKt=c5(),SKt=YVe(),EKt=p$(),kKt=KVe(),CKt=eGe(),LKt=Zc(),PKt=iGe(),FKt=u_(),DKt=d$(),aGe=DKt.nextPow2,oGe=new TKt,DF=!1;document.body&&(FF=document.body.appendChild(document.createElement("div")),FF.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(FF).fontStretch&&(DF=!0),document.body.removeChild(FF));var FF,Bs=function(t){RKt(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=wKt(t),this.shader=oGe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||bKt({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(),oGe.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(SKt(t)?t:{})};Bs.prototype.createShader=function(){var t=this.regl,r=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,i){return[i.atlas.width,i.atlas.height]},atlasDim:function(a,i){return[i.atlas.cols,i.atlas.rows]},atlas:function(a,i){return i.atlas.texture},charStep:function(a,i){return i.atlas.step},em:function(a,i){return i.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; @@ -2706,9 +2706,9 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),n={};return{regl:t,draw:r,atlas:n}};Bs.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=yKt(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(xe){return parseFloat(xe)}):this.opacity=parseFloat(t.opacity)),t.viewport!=null&&(this.viewport=TKt(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=LKt(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=Bs.baseFontSize+"px sans-serif");var n=!1,a=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(xe,ue){if(typeof xe=="string")try{xe=b5.parse(xe)}catch(De){xe=b5.parse(Bs.baseFontSize+"px "+xe)}else{var K=xe.style,_e=xe.weight,ne=xe.stretch,ae=xe.variant;xe=b5.parse(b5.stringify(xe)),K&&(xe.style=K),_e&&(xe.weight=_e),ne&&(xe.stretch=ne),ae&&(xe.variant=ae)}var pe=b5.stringify({size:Bs.baseFontSize,family:xe.family,stretch:DF?xe.stretch:void 0,variant:xe.variant,weight:xe.weight,style:xe.style}),ie=MKt(xe.size),le=Math.round(ie[0]*SKt(ie[1]));if(le!==r.fontSize[ue]&&(a=!0,r.fontSize[ue]=le),(!r.font[ue]||pe!=r.font[ue].baseString)&&(n=!0,r.font[ue]=Bs.fonts[pe],!r.font[ue])){var me=xe.family.join(", "),be=[xe.style];xe.style!=xe.variant&&be.push(xe.variant),xe.variant!=xe.weight&&be.push(xe.weight),DF&&xe.weight!=xe.stretch&&be.push(xe.stretch),r.font[ue]={baseString:pe,family:me,weight:xe.weight,stretch:xe.stretch,style:xe.style,variant:xe.variant,width:{},kerning:{},metrics:CKt(me,{origin:"top",fontSize:Bs.baseFontSize,fontStyle:be.join(" ")})},Bs.fonts[pe]=r.font[ue]}}),(n||a)&&this.font.forEach(function(xe,ue){var K=b5.stringify({size:r.fontSize[ue],family:xe.family,stretch:DF?xe.stretch:void 0,variant:xe.variant,weight:xe.weight,style:xe.style});if(r.fontAtlas[ue]=r.shader.atlas[K],!r.fontAtlas[ue]){var _e=xe.metrics;r.shader.atlas[K]=r.fontAtlas[ue]={fontString:K,step:Math.ceil(r.fontSize[ue]*_e.bottom*.5)*2,em:r.fontSize[ue],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:r.regl.texture()}}t.text==null&&(t.text=r.text)}),typeof t.text=="string"&&t.position&&t.position.length>2){for(var i=Array(t.position.length*.5),o=0;o2){for(var u=!t.position[0].length,c=Ly.mallocFloat(this.count*2),f=0,v=0;f1?r.align[ue]:r.align[0]:r.align;if(typeof K=="number")return K;switch(K){case"right":case"end":return-xe;case"center":case"centre":case"middle":return-xe*.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(xe,ue){var K=(r.font[ue]||r.font[0]).metrics,_e=0;return _e+=K.bottom*.5,typeof xe=="number"?_e+=xe-K.baseline:_e+=-K[xe],_e*=-1,_e})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=m$(t.color,"uint8");else{var O;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var V=t.color.length;O=Ly.mallocUint8(V);for(var j=(t.color.subarray||t.color.slice).bind(t.color),q=0;q4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(ee){var ce=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(ce);for(var ye=0;ye1?this.counts[ye]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ye]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ye*4,ye*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ye]:this.opacity,baseline:this.baselineOffset[ye]!=null?this.baselineOffset[ye]:this.baselineOffset[0],align:this.align?this.alignOffset[ye]!=null?this.alignOffset[ye]:this.alignOffset[0]:0,atlas:this.fontAtlas[ye]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ye*2,ye*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}};Bs.prototype.destroy=function(){};Bs.prototype.kerning=!0;Bs.prototype.position={constant:new Float32Array(2)};Bs.prototype.translate=null;Bs.prototype.scale=null;Bs.prototype.font=null;Bs.prototype.text="";Bs.prototype.positionOffset=[0,0];Bs.prototype.opacity=1;Bs.prototype.color=new Uint8Array([0,0,0,255]);Bs.prototype.alignOffset=[0,0];Bs.maxAtlasSize=1024;Bs.atlasCanvas=document.createElement("canvas");Bs.atlasContext=Bs.atlasCanvas.getContext("2d",{alpha:!1});Bs.baseFontSize=64;Bs.fonts={};function FKt(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}oGe.exports=Bs});var RF=fe((aAr,lGe)=>{"use strict";var DKt=EY(),RKt=f$();lGe.exports=function(t,r,n){var a=t._fullLayout,i=!0;return a._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(n);return}if(!(o.pick&&!a._has("parcoords"))){try{o.regl=RKt({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||window.devicePixelRatio,extensions:r||[],cachedCode:n||{}})}catch(s){i=!1}o.regl||(i=!1),i&&this.addEventListener("webglcontextlost",function(s){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:s,layer:o.key})},!1)}}),i||DKt({container:a._glcontainer.node()}),i}});var x$=fe((y$,vGe)=>{"use strict";var uGe=xZ(),cGe=KZ(),IKt=QUe(),fGe=sGe(),hGe=Xt(),zKt=$p().selectMode,qKt=RF(),BKt=Is(),OKt=_U(),NKt=gZ().styleTextSelection,dGe={};function UKt(e,t,r,n){var a=e._size,i=e.width*n,o=e.height*n,s=a.l*n,l=a.b*n,u=a.r*n,c=a.t*n,f=a.w*n,v=a.h*n;return[s+t.domain[0]*f,l+r.domain[0]*v,i-u-(1-t.domain[1])*f,o-c-(1-r.domain[1])*v]}var y$=vGe.exports=function(t,r,n){if(n.length){var a=t._fullLayout,i=r._scene,o=r.xaxis,s=r.yaxis,l,u;if(i){var c=qKt(t,["ANGLE_instanced_arrays","OES_element_index_uint"],dGe);if(!c){i.init();return}var f=i.count,v=a._glcanvas.data()[0].regl;if(OKt(t,r,n),i.dirty){if((i.line2d||i.error2d)&&!(i.scatter2d||i.fill2d||i.glText)&&v.clear({color:!0,depth:!0}),i.error2d===!0&&(i.error2d=IKt(v)),i.line2d===!0&&(i.line2d=cGe(v)),i.scatter2d===!0&&(i.scatter2d=uGe(v)),i.fill2d===!0&&(i.fill2d=cGe(v)),i.glText===!0)for(i.glText=new Array(f),l=0;li.glText.length){var g=f-i.glText.length;for(l=0;lJ&&(isNaN(U[ee])||isNaN(U[ee+1]));)ee-=2;q.positions=U.slice(J,ee+2)}return q}),i.line2d.update(i.lineOptions)),i.error2d){var _=(i.errorXOptions||[]).concat(i.errorYOptions||[]).map(function(q){return q||{positions:[],errors:[]}});i.error2d.update(_)}i.scatter2d&&i.scatter2d.update(i.markerOptions),i.fillOrder=hGe.repeat(null,f),i.fill2d&&(i.fillOptions=i.fillOptions.map(function(q,U){var J=n[U];if(!(!q||!J||!J[0]||!J[0].trace)){var ee=J[0],ce=ee.trace,ye=ee.t,xe=i.lineOptions[U],ue,K,_e=[];ce._ownfill&&_e.push(U),ce._nexttrace&&_e.push(U+1),_e.length&&(i.fillOrder[U]=_e);var ne=[],ae=xe&&xe.positions||ye.positions,pe,ie;if(ce.fill==="tozeroy"){for(pe=0;pepe&&isNaN(ae[ie+1]);)ie-=2;ae[pe+1]!==0&&(ne=[ae[pe],0]),ne=ne.concat(ae.slice(pe,ie+2)),ae[ie+1]!==0&&(ne=ne.concat([ae[ie],0]))}else if(ce.fill==="tozerox"){for(pe=0;pepe&&isNaN(ae[ie]);)ie-=2;ae[pe]!==0&&(ne=[0,ae[pe+1]]),ne=ne.concat(ae.slice(pe,ie+2)),ae[ie]!==0&&(ne=ne.concat([0,ae[ie+1]]))}else if(ce.fill==="toself"||ce.fill==="tonext"){for(ne=[],ue=0,q.splitNull=!0,K=0;K-1;for(let[q]of n)if(q){var S=q.trace,L=q.t,w=L.index,A=S._length,T=L.x,m=L.y;if(S.selectedpoints||C||k){if(C||(C=!0),S.selectedpoints){var F=i.selectBatch[w]=S.selectedpoints,E={};for(u=0;u{"use strict";var pGe=CBe();pGe.plot=x$();gGe.exports=pGe});var xGe=fe((sAr,yGe)=>{"use strict";yGe.exports=mGe()});var _$=fe((lAr,TGe)=>{"use strict";var VKt=Ol(),wGe=_s(),_Ge=pl().axisHoverFormat,{hovertemplateAttrs:GKt,templatefallbackAttrs:HKt}=Oo(),BM=mM(),jKt=rc().idRegex,WKt=Mo().templatedArray,w5=ta().extendFlat,Rg=VKt.marker,YKt=Rg.line,XKt=w5(wGe("marker.line",{editTypeOverride:"calc"}),{width:w5({},YKt.width,{editType:"calc"}),editType:"calc"}),IF=w5(wGe("marker"),{symbol:Rg.symbol,angle:Rg.angle,size:w5({},Rg.size,{editType:"markerSize"}),sizeref:Rg.sizeref,sizemin:Rg.sizemin,sizemode:Rg.sizemode,opacity:Rg.opacity,colorbar:Rg.colorbar,line:XKt,editType:"calc"});IF.color.editType=IF.cmin.editType=IF.cmax.editType="style";function bGe(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:jKt[e],editType:"plot"}}}TGe.exports={dimensions:WKt("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:w5({},BM.text,{}),hovertext:w5({},BM.hovertext,{}),hovertemplate:GKt(),hovertemplatefallback:HKt(),xhoverformat:_Ge("x"),yhoverformat:_Ge("y"),marker:IF,xaxes:bGe("x"),yaxes:bGe("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:BM.selected.marker,editType:"calc"},unselected:{marker:BM.unselected.marker,editType:"calc"},opacity:BM.opacity}});var zF=fe((uAr,AGe)=>{"use strict";AGe.exports=function(e,t,r,n){n||(n=1/0);var a,i;for(a=0;a{"use strict";var b$=Xt(),ZKt=Ah(),MGe=_$(),$Kt=Is(),KKt=vv(),JKt=zF(),QKt=JP().isOpenSymbol;SGe.exports=function(t,r,n,a){function i(g,p){return b$.coerce(t,r,MGe,g,p)}var o=ZKt(t,r,{name:"dimensions",handleItemDefaults:eJt}),s=i("diagonal.visible"),l=i("showupperhalf"),u=i("showlowerhalf"),c=JKt(r,o,"values");if(!c||!s&&!l&&!u){r.visible=!1;return}i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),KKt(t,r,n,a,i,{noAngleRef:!0,noLineDash:!0,noStandOff:!0});var f=QKt(r.marker.symbol),v=$Kt.isBubble(r);i("marker.line.width",f||v?1:0),tJt(t,r,a,i),b$.coerceSelectionMarkerOpacity(r,i)};function eJt(e,t){function r(a,i){return b$.coerce(e,t,MGe.dimensions,a,i)}r("label");var n=r("values");n&&n.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function tJt(e,t,r,n){var a=t.dimensions,i=a.length,o=t.showupperhalf,s=t.showlowerhalf,l=t.diagonal.visible,u,c,f=new Array(i),v=new Array(i);for(u=0;uc&&o||u{"use strict";var kGe=Xt();CGe.exports=function(t,r){var n=t._fullLayout,a=r.uid,i=n._splomScenes;i||(i=n._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s={matrix:!1,selectBatch:[],unselectBatch:[]},l=i[r.uid];return l||(l=i[a]=kGe.extendFlat({},o,s),l.draw=function(){l.matrix&&l.matrix.draw&&(l.selectBatch.length||l.unselectBatch.length?l.matrix.draw(l.unselectBatch,l.selectBatch):l.matrix.draw()),l.dirty=!1},l.destroy=function(){l.matrix&&l.matrix.destroy&&l.matrix.destroy(),l.matrixOptions=null,l.selectBatch=null,l.unselectBatch=null,l=null}),l.dirty||kGe.extendFlat(l,o),l}});var DGe=fe((hAr,FGe)=>{"use strict";var w$=Xt(),qF=El(),rJt=gv().calcMarkerSize,nJt=gv().calcAxisExpansion,iJt=pv(),PGe=f_().markerSelection,aJt=f_().markerStyle,oJt=LGe(),sJt=Wa().BADNUM,lJt=Ty().TOO_MANY_POINTS;FGe.exports=function(t,r){var n=r.dimensions,a=r._length,i={},o=i.cdata=[],s=i.data=[],l=r._visibleDims=[],u,c,f,v,g;function p(k,S){for(var L=k.makeCalcdata({v:S.values,vcalendar:r.calendar},"v"),w=0;wlJt,y;for(_?y=i.sizeAvg||Math.max(i.size,3):y=rJt(r,a),c=0;c{(function(){var e,t,r,n,a,i;typeof performance!="undefined"&&performance!==null&&performance.now?OM.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(OM.exports=function(){return(e()-a)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},n=e(),i=process.uptime()*1e9,a=n-i):Date.now?(OM.exports=function(){return Date.now()-r},r=Date.now()):(OM.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(RGe)});var qGe=fe((dAr,NF)=>{var uJt=IGe(),Ig=window,BF=["moz","webkit"],A5="AnimationFrame",M5=Ig["request"+A5],NM=Ig["cancel"+A5]||Ig["cancelRequest"+A5];for(T5=0;!M5&&T5{BGe.exports=function(t,r){var n=typeof t=="number",a=typeof r=="number";n&&!a?(r=t,t=0):!n&&!a&&(t=0,r=0),t=t|0,r=r|0;var i=r-t;if(i<0)throw new Error("array length must be positive");for(var o=new Array(i),s=0,l=t;s{"use strict";var cJt=xZ(),fJt=E1(),hJt=l_(),NGe=qGe(),dJt=OGe(),A$=u5(),vJt=u_();VGe.exports=Fy;function Fy(e,t){if(!(this instanceof Fy))return new Fy(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=cJt(e),this.canvas=this.scatter.canvas}Fy.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=NGe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,NGe(()=>{this.dirty=!1})),this)};Fy.prototype.update=function(...e){if(!e.length)return;for(let n=0;n_||!a.lower&&x<_)continue;let y=pJt(a.id,x,_),C=this.passes[y]||(this.passes[y]={});if(n.data&&(n.transpose?C.positions={x:{buffer:a.buffer,offset:_,count:l,stride:s},y:{buffer:a.buffer,offset:x,count:l,stride:s}}:C.positions={x:{buffer:a.buffer,offset:_*l,count:l},y:{buffer:a.buffer,offset:x*l,count:l}},C.bounds=UF(a.bounds,x,_)),n.domain||n.viewport||n.data){let k=o?UF(a.padding,x,_):a.padding;if(a.domain){let[S,L,w,A]=UF(a.domain,x,_);C.viewport=[f+S*u+k[0],v+L*c+k[1],f+w*u-k[2],v+A*c-k[3]]}else C.viewport=[f+_*g+g*k[0],v+x*p+p*k[1],f+(_+1)*g-g*k[2],v+(x+1)*p-p*k[3]]}n.color&&(C.color=a.color),n.size&&(C.size=a.size),n.marker&&(C.marker=a.marker),n.borderSize&&(C.borderSize=a.borderSize),n.borderColor&&(C.borderColor=a.borderColor),n.opacity&&(C.opacity=a.opacity),n.range&&(C.range=i?UF(a.range,x,_):a.range||C.bounds),a.passes.push(y)}return this};Fy.prototype.draw=function(...e){if(!e.length)this.scatter.draw();else{let t=[];for(let r=0;r{t[i+s]=n})}this.scatter.draw(...t)}return this};Fy.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function pJt(e,t,r){let n=e.id!=null?e.id:e,a=t,i=r;return n<<16|(a&255)<<8|i&255}function UF(e,t,r){let n,a,i,o,s,l,u,c,f=e[t],v=e[r];return f.length>2?(n=f[0],i=f[2],a=f[1],o=f[3]):f.length?(n=a=f[0],i=o=f[1]):(n=f.x,a=f.y,i=f.x+f.width,o=f.y+f.height),v.length>2?(s=v[0],u=v[2],l=v[1],c=v[3]):v.length?(s=l=v[0],u=c=v[1]):(s=v.x,l=v.y,u=v.x+v.width,c=v.y+v.height),[s,a,u,o]}function UGe(e){if(typeof e=="number")return[e,e,e,e];if(e.length===2)return[e[0],e[1],e[0],e[1]];{let t=A$(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var jGe=fe((gAr,HGe)=>{"use strict";var gJt=GGe(),M$=Xt(),VF=El(),mJt=$p().selectMode;HGe.exports=function(t,r,n){if(n.length)for(var a=0;a-1,E=mJt(c)||!!a.selectedpoints||F,I=!0;if(E){var R=a._length;if(a.selectedpoints){o.selectBatch=a.selectedpoints;var B=a.selectedpoints,O={};for(g=0;g{"use strict";WGe.getDimIndex=function(t,r){for(var n=r._id,a=n.charAt(0),i={x:0,y:1}[a],o=t._visibleDims,s=0;s{"use strict";var YGe=S$(),xJt=KP().calcHover,XGe=Yi().getFromId,_Jt=ta().extendFlat;function bJt(e,t,r,n,a){a||(a={});var i=(n||"").charAt(0)==="x",o=(n||"").charAt(0)==="y",s=ZGe(e,t,r);if((i||o)&&a.hoversubplots==="axis"&&s[0])for(var l=(i?e.xa:e.ya)._subplotsWith,u=a.gd,c=_Jt({},e),f=0;f{"use strict";var tHe=Xt(),JGe=tHe.pushUnique,QGe=Is(),eHe=S$();rHe.exports=function(t,r){var n=t.cd,a=n[0].trace,i=n[0].t,o=t.scene,s=o.matrixOptions.cdata,l=t.xaxis,u=t.yaxis,c=[];if(!o)return c;var f=!QGe.hasMarkers(a)&&!QGe.hasText(a);if(a.visible!==!0||f)return c;var v=eHe.getDimIndex(a,l),g=eHe.getDimIndex(a,u);if(v===!1||g===!1)return c;var p=i.xpx[v],x=i.ypx[g],_=s[v],y=s[g],C=(t.scene.selectBatch||[]).slice(),k=[];if(r!==!1&&!r.degenerate)for(var S=0;S<_.length;S++)r.contains([p[S],x[S]],null,S,t)?(c.push({pointNumber:S,x:_[S],y:y[S]}),JGe(C,S)):C.indexOf(S)!==-1?JGe(C,S):k.push(S);var L=o.matrixOptions;return!C.length&&!k.length?o.matrix.update(L,null):!o.selectBatch.length&&!o.unselectBatch.length&&o.matrix.update(o.unselectedOptions,tHe.extendFlat({},L,o.selectedOptions,o.viewOpts)),o.selectBatch=C,o.unselectBatch=k,c}});var oHe=fe((_Ar,aHe)=>{"use strict";var iHe=Xt(),wJt=pv(),TJt=f_().markerStyle;aHe.exports=function(t,r){var n=r.trace,a=t._fullLayout._splomScenes[n.uid];if(a){wJt(t,n),iHe.extendFlat(a.matrixOptions,TJt(t,n));var i=iHe.extendFlat({},a.matrixOptions,a.viewOpts);a.matrix.update(i,null)}}});var lHe=fe((bAr,sHe)=>{"use strict";var AJt=bi(),MJt=dV();sHe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:_$(),supplyDefaults:EGe(),colorbar:Zf(),calc:DGe(),plot:jGe(),hoverPoints:KGe().hoverPoints,selectPoints:nHe(),editStyle:oHe(),meta:{}};AJt.register(MJt)});var vHe=fe((wAr,dHe)=>{"use strict";var SJt=KZ(),EJt=bi(),kJt=RF(),CJt=jf().getModuleCalcData,Dy=gu(),uHe=El().getFromId,cHe=Yi().shouldShowZeroLine,fHe="splom",hHe={};function LJt(e){var t=e._fullLayout,r=EJt.getModule(fHe),n=CJt(e.calcdata,r)[0],a=kJt(e,["ANGLE_instanced_arrays","OES_element_index_uint"],hHe);a&&(t._hasOnlyLargeSploms&&E$(e),r.plot(e,{},n))}function PJt(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&E$(e);for(var n=0;n{"use strict";var pHe=lHe();pHe.basePlotModule=vHe(),gHe.exports=pHe});var xHe=fe((AAr,yHe)=>{"use strict";yHe.exports=mHe()});var L$=fe((MAr,_He)=>{"use strict";var IJt=_s(),k$=pf(),C$=Ds(),zJt=nl().attributes,GF=ta().extendFlat,qJt=Mo().templatedArray;_He.exports={domain:zJt({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:C$({editType:"plot"}),tickfont:C$({autoShadowDflt:!0,editType:"plot"}),rangefont:C$({editType:"plot"}),dimensions:qJt("dimension",{label:{valType:"string",editType:"plot"},tickvals:GF({},k$.tickvals,{editType:"plot"}),ticktext:GF({},k$.ticktext,{editType:"plot"}),tickformat:GF({},k$.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:GF({editType:"calc"},IJt("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}});var UM=fe((SAr,bHe)=>{"use strict";bHe.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}});var L1=fe((EAr,THe)=>{"use strict";var BJt=J4();function wHe(e){return[e]}THe.exports={keyFun:function(e){return e.key},repeat:wHe,descend:BJt,wrap:wHe,unwrap:function(e){return e[0]}}});var D$=fe((kAr,RHe)=>{"use strict";var Vu=UM(),Dp=xi(),OJt=L1().keyFun,HF=L1().repeat,S5=Xt().sorterAsc,NJt=Xt().strTranslate,AHe=Vu.bar.snapRatio;function MHe(e,t){return e*(1-AHe)+t*AHe}var SHe=Vu.bar.snapClose;function UJt(e,t){return e*(1-SHe)+t*SHe}function WF(e,t,r,n){if(VJt(r,n))return r;var a=e?-1:1,i=0,o=t.length-1;if(a<0){var s=i;i=o,o=s}for(var l=t[i],u=l,c=i;a*c=t[r][0]&&e<=t[r][1])return!0;return!1}function GJt(e){e.attr("x",-Vu.bar.captureWidth/2).attr("width",Vu.bar.captureWidth)}function HJt(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function jJt(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=EHe(e.brush.filter.getConsolidated(),e.height),r=[0],n,a,i,o=t.length?t[0][0]:null,s=0;se[1]+r||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}function kHe(){Dp.select(document.body).style("cursor",null)}function F$(e){e.attr("stroke-dasharray",jJt)}function jF(e,t){var r=Dp.select(e).selectAll(".highlight, .highlight-shadow"),n=t?r.transition().duration(Vu.bar.snapDuration).each("end",t):r;F$(n)}function CHe(e,t){var r=e.brush,n=r.filterSpecified,a=NaN,i={},o;if(n){var s=e.height,l=r.filter.getConsolidated(),u=EHe(l,s),c=NaN,f=NaN,v=NaN;for(o=0;o<=u.length;o++){var g=u[o];if(g&&g[0]<=t&&t<=g[1]){c=o;break}else if(f=o?o-1:NaN,g&&g[0]>t){v=o;break}}if(a=c,isNaN(a)&&(isNaN(f)||isNaN(v)?a=isNaN(f)?v:f:a=t-u[f][1]=C[0]&&y<=C[1]){i.clickableOrdinalRange=C;break}}}return i}function YJt(e,t){Dp.event.sourceEvent.stopPropagation();var r=t.height-Dp.mouse(e)[1]-2*Vu.verticalPadding,n=t.unitToPaddedPx.invert(r),a=t.brush,i=CHe(t,r),o=i.interval,s=a.svgBrush;if(s.wasDragged=!1,s.grabbingBar=i.region==="ns",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-Vu.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=i.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&a.filterSpecified?a.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=i.region?o[i.region==="s"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function LHe(e,t){Dp.event.sourceEvent.stopPropagation();var r=t.height-Dp.mouse(e)[1]-2*Vu.verticalPadding,n=t.brush.svgBrush;n.wasDragged=!0,n._dragging=!0,n.grabbingBar?n.newExtent=[r-n.grabPoint,r+n.barLength-n.grabPoint].map(t.unitToPaddedPx.invert):n.newExtent=[n.startExtent,t.unitToPaddedPx.invert(r)].sort(S5),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),jF(e.parentNode)}function XJt(e,t){var r=t.brush,n=r.filter,a=r.svgBrush;a._dragging||(PHe(e,t),LHe(e,t),t.brush.svgBrush.wasDragged=!1),a._dragging=!1;var i=Dp.event;i.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,t.parent.inBrushDrag=!1,kHe(),!a.wasDragged){a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&t.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,a.extent.length===0&&P$(r)):P$(r),a.brushCallback(t),jF(e.parentNode),a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(u?[a.newExtent]:[]),a.extent.length||P$(r),a.brushCallback(t),u?jF(e.parentNode,s):(s(),jF(e.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function PHe(e,t){var r=t.height-Dp.mouse(e)[1]-2*Vu.verticalPadding,n=CHe(t,r),a="crosshair";n.clickableOrdinalRange?a="pointer":n.region&&(a=n.region+"-resize"),Dp.select(document.body).style("cursor",a)}function ZJt(e){e.on("mousemove",function(t){Dp.event.preventDefault(),t.parent.inBrushDrag||PHe(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||kHe()}).call(Dp.behavior.drag().on("dragstart",function(t){YJt(this,t)}).on("drag",function(t){LHe(this,t)}).on("dragend",function(t){XJt(this,t)}))}function FHe(e,t){return e[0]-t[0]}function $Jt(e,t,r){var n=r._context.staticPlot,a=e.selectAll(".background").data(HF);a.enter().append("rect").classed("background",!0).call(GJt).call(HJt).style("pointer-events",n?"none":"auto").attr("transform",NJt(0,Vu.verticalPadding)),a.call(ZJt).attr("height",function(s){return s.height-Vu.verticalPadding});var i=e.selectAll(".highlight-shadow").data(HF);i.enter().append("line").classed("highlight-shadow",!0).attr("x",-Vu.bar.width/2).attr("stroke-width",Vu.bar.width+Vu.bar.strokeWidth).attr("stroke",t).attr("opacity",Vu.bar.strokeOpacity).attr("stroke-linecap","butt"),i.attr("y1",function(s){return s.height}).call(F$);var o=e.selectAll(".highlight").data(HF);o.enter().append("line").classed("highlight",!0).attr("x",-Vu.bar.width/2).attr("stroke-width",Vu.bar.width-Vu.bar.strokeWidth).attr("stroke",Vu.bar.fillColor).attr("opacity",Vu.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(F$)}function KJt(e,t,r){var n=e.selectAll("."+Vu.cn.axisBrush).data(HF,OJt);n.enter().append("g").classed(Vu.cn.axisBrush,!0),$Jt(n,t,r)}function JJt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function P$(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function QJt(e){return function(r){var n=r.brush,a=JJt(n),i=a.slice();n.filter.set(i),e()}}function DHe(e){for(var t=e.slice(),r=[],n,a=t.shift();a;){for(n=a.slice();(a=t.shift())&&a[0]<=n[1];)n[1]=Math.max(n[1],a[1]);r.push(n)}return r.length===1&&r[0][0]>r[0][1]&&(r=[]),r}function eQt(){var e=[],t,r;return{set:function(n){e=n.map(function(a){return a.slice().sort(S5)}).sort(FHe),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=DHe(e),r=e.reduce(function(a,i){return[Math.min(a[0],i[0]),Math.max(a[1],i[1])]},[1/0,-1/0])},get:function(){return e.slice()},getConsolidated:function(){return t},getBounds:function(){return r}}}function tQt(e,t,r,n,a,i){var o=eQt();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:QJt(a),brushEndCallback:i}}}function rQt(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(S5)}),t.multiselect?e=DHe(e.sort(FHe)):e=[e[0]]):e=[e.sort(S5)],t.tickvals){var r=t.tickvals.slice().sort(S5);if(e=e.map(function(n){var a=[WF(0,r,n[0],[]),WF(1,r,n[1],[])];if(a[1]>a[0])return a}).filter(function(n){return n}),!e.length)return}return e.length>1?e:e[0]}RHe.exports={makeBrush:tQt,ensureAxisBrush:KJt,cleanRanges:rQt}});var qHe=fe((CAr,zHe)=>{"use strict";var Ry=Xt(),nQt=Wf().hasColorscale,iQt=Vc(),aQt=nl().defaults,oQt=Ah(),sQt=Yi(),IHe=L$(),lQt=D$(),R$=UM().maxDimensionCount,uQt=zF();function cQt(e,t,r,n,a){var i=a("line.color",r);if(nQt(e,"line")&&Ry.isArrayOrTypedArray(i)){if(i.length)return a("line.colorscale"),iQt(e,t,n,a,{prefix:"line.",cLetter:"c"}),i.length;t.line.color=r}return 1/0}function fQt(e,t,r,n){function a(u,c){return Ry.coerce(e,t,IHe.dimensions,u,c)}var i=a("values"),o=a("visible");if(i&&i.length||(o=t.visible=!1),o){a("label"),a("tickvals"),a("ticktext"),a("tickformat");var s=a("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:s},sQt.setConvert(t._ax,n.layout),a("multiselect");var l=a("constraintrange");l&&(t.constraintrange=lQt.cleanRanges(l,t))}}zHe.exports=function(t,r,n,a){function i(c,f){return Ry.coerce(t,r,IHe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>R$&&(Ry.log("parcoords traces support up to "+R$+" dimensions at the moment"),o.splice(R$));var s=oQt(t,r,{name:"dimensions",layout:a,handleItemDefaults:fQt}),l=cQt(t,r,n,a,i);aQt(r,a,i),(!Array.isArray(s)||!s.length)&&(r.visible=!1),uQt(r,s,"values",l);var u=Ry.extendFlat({},a.font,{size:Math.round(a.font.size/1.2)});Ry.coerceFont(i,"labelfont",u),Ry.coerceFont(i,"tickfont",u,{autoShadowDflt:!0}),Ry.coerceFont(i,"rangefont",u),i("labelangle"),i("labelside"),i("unselected.line.color"),i("unselected.line.opacity")}});var OHe=fe((LAr,BHe)=>{"use strict";var hQt=Xt().isArrayOrTypedArray,I$=js(),dQt=L1().wrap;BHe.exports=function(t,r){var n,a;return I$.hasColorscale(r,"line")&&hQt(r.line.color)?(n=r.line.color,a=I$.extractOpts(r.line).colorscale,I$.calc(t,r,{vals:n,containerStr:"line",cLetter:"c"})):(n=vQt(r._length),a=[[0,r.line.color],[1,r.line.color]]),dQt({lineColor:n,cscale:a})};function vQt(e){for(var t=new Array(e),r=0;r{"use strict";var pQt=Xt().isTypedArray;YF.convertTypedArray=function(e){return pQt(e)?Array.prototype.slice.call(e):e};YF.isOrdinal=function(e){return!!e.tickvals};YF.isVisible=function(e){return e.visible||!("visible"in e)}});var ZHe=fe((FAr,XHe)=>{"use strict";var gQt=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` -`),mQt=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),VM=UM().maxDimensionCount,jHe=Xt(),NHe=1e-6,XF=2048,yQt=new Uint8Array(4),UHe=new Uint8Array(4),VHe={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function xQt(e){e.read({x:0,y:0,width:1,height:1,data:yQt})}function WHe(e,t,r,n,a){var i=e._gl;i.enable(i.SCISSOR_TEST),i.scissor(t,r,n,a),e.clear({color:[0,0,0,0],depth:1})}function _Qt(e,t,r,n,a,i){var o=i.key;function s(l){var u=Math.min(n,a-l*n);l===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],WHe(e,i.scissorX,i.scissorY,i.scissorWidth,i.viewBoxSize[1])),!r.clearOnly&&(i.count=2*u,i.offset=2*l*n,t(i),l*n+u>>8*t)%256/255}function TQt(e,t,r){for(var n=new Array(e*(VM+4)),a=0,i=0;iV&&(V=T[I].dim1.canvasX,B=I);E===0&&WHe(a,0,0,u.canvasWidth,u.canvasHeight);var j=k(r);for(I=0;I{"use strict";var bf=xi(),zg=Xt(),B$=zg.isArrayOrTypedArray,tje=zg.numberFormat,rje=ni(),nje=Yi(),kQt=zg.strRotate,P1=zg.strTranslate,CQt=as(),ZF=ea(),$He=js(),U$=L1(),Iv=U$.keyFun,F1=U$.repeat,ije=U$.unwrap,E5=z$(),Fo=UM(),aje=D$(),LQt=ZHe();function KHe(e,t,r){return zg.aggNums(e,null,t,r)}function oje(e,t){return V$(KHe(Math.min,e,t),KHe(Math.max,e,t))}function $F(e){var t=e.range;return t?V$(t[0],t[1]):oje(e.values,e._length)}function V$(e,t){return(isNaN(e)||!isFinite(e))&&(e=0),(isNaN(t)||!isFinite(t))&&(t=0),e===t&&(e===0?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function PQt(e,t){return t?function(r,n){var a=t[n];return a==null?e(r):a}:e}function FQt(e,t,r,n,a){var i=$F(r);return n?bf.scale.ordinal().domain(n.map(PQt(tje(r.tickformat),a))).range(n.map(function(o){var s=(o-i[0])/(i[1]-i[0]);return e-t+s*(2*t-e)})):bf.scale.linear().domain(i).range([e-t,t])}function DQt(e,t){return bf.scale.linear().range([t,e-t])}function RQt(e,t){return bf.scale.linear().domain($F(e)).range([t,1-t])}function IQt(e){if(e.tickvals){var t=$F(e);return bf.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function zQt(e){var t=e.map(function(i){return i[0]}),r=e.map(function(i){let[o,s,l]=rje.rgbaArray(i[1]);return bf.rgb(o,s,l)}),n=function(i){return function(o){return o[i]}},a="rgb".split("").map(function(i){return bf.scale.linear().clamp(!0).domain(t).range(r.map(n(i)))});return function(i){return a.map(function(o){return o(i)})}}function N$(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function qQt(e,t,r){var n=ije(t),a=n.trace,i=E5.convertTypedArray(n.lineColor),o=a.line,s={color:rje.normalize(a.unselected.line.color),opacity:a.unselected.line.opacity},l=$He.extractOpts(o),u=l.reversescale?$He.flipScale(n.cscale):n.cscale,c=a.domain,f=a.dimensions,v=e.width,g=a.labelangle,p=a.labelside,x=a.labelfont,_=a.tickfont,y=a.rangefont,C=zg.extendDeepNoArrays({},o,{color:i.map(bf.scale.linear().domain($F({values:i,range:[l.min,l.max],_length:a._length}))),blockLineCount:Fo.blockLineCount,canvasOverdrag:Fo.overdrag*Fo.canvasPixelRatio}),k=Math.floor(v*(c.x[1]-c.x[0])),S=Math.floor(e.height*(c.y[1]-c.y[0])),L=e.margin||{l:80,r:80,t:100,b:80},w=k,A=S;return{key:r,colCount:f.filter(E5.isVisible).length,dimensions:f,tickDistance:Fo.tickDistance,unitToColor:zQt(u),lines:C,deselectedLines:s,labelAngle:g,labelSide:p,labelFont:x,tickFont:_,rangeFont:y,layoutWidth:v,layoutHeight:e.height,domain:c,translateX:c.x[0]*v,translateY:e.height-c.y[1]*e.height,pad:L,canvasWidth:w*Fo.canvasPixelRatio+2*C.canvasOverdrag,canvasHeight:A*Fo.canvasPixelRatio,width:w,height:A,canvasPixelRatio:Fo.canvasPixelRatio}}function BQt(e,t,r){var n=r.width,a=r.height,i=r.dimensions,o=r.canvasPixelRatio,s=function(v){return n*v/Math.max(1,r.colCount-1)},l=Fo.verticalPadding/a,u=DQt(a,Fo.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=i.filter(E5.isVisible).map(function(v,g){var p=RQt(v,l),x=f[v.label];f[v.label]=(x||0)+1;var _=v.label+(x?"__"+x:""),y=v.constraintrange,C=y&&y.length;C&&!B$(y[0])&&(y=[y]);var k=C?y.map(function(R){return R.map(p)}):[[-1/0,1/0]],S=function(){var R=c;R.focusLayer&&R.focusLayer.render(R.panels,!0);var B=N$(R);!e.contextShown()&&B?(R.contextLayer&&R.contextLayer.render(R.panels,!0),e.contextShown(!0)):e.contextShown()&&!B&&(R.contextLayer&&R.contextLayer.render(R.panels,!0,!0),e.contextShown(!1))},L=v.values;L.length>v._length&&(L=L.slice(0,v._length));var w=v.tickvals,A;function T(R,B){return{val:R,text:A[B]}}function m(R,B){return R.val-B.val}if(B$(w)&&w.length){zg.isTypedArray(w)&&(w=Array.from(w)),A=v.ticktext,!B$(A)||!A.length?A=w.map(tje(v.tickformat)):A.length>w.length?A=A.slice(0,w.length):w.length>A.length&&(w=w.slice(0,A.length));for(var F=1;F=B||q>=O)return;var U=I.lineLayer.readPixel(j,O-1-q),J=U[3]!==0,ee=J?U[2]+256*(U[1]+256*U[0]):null,ce={x:j,y:q,clientX:R.clientX,clientY:R.clientY,dataIndex:I.model.key,curveNumber:ee};ee!==p&&(J?a.hover(ce):a.unhover&&a.unhover(ce),p=ee)}}),g.style("opacity",function(I){return I.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var _=s.selectAll("."+Fo.cn.parcoords).data(v,Iv);_.exit().remove(),_.enter().append("g").classed(Fo.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),_.attr("transform",function(I){return P1(I.model.translateX,I.model.translateY)});var y=_.selectAll("."+Fo.cn.parcoordsControlView).data(F1,Iv);y.enter().append("g").classed(Fo.cn.parcoordsControlView,!0),y.attr("transform",function(I){return P1(I.model.pad.l,I.model.pad.t)});var C=y.selectAll("."+Fo.cn.yAxis).data(function(I){return I.dimensions},Iv);C.enter().append("g").classed(Fo.cn.yAxis,!0),y.each(function(I){O$(C,I,u)}),g.each(function(I){if(I.viewModel){!I.lineLayer||a?I.lineLayer=LQt(this,I):I.lineLayer.update(I),(I.key||I.key===0)&&(I.viewModel[I.key]=I.lineLayer);var R=!I.context||a;I.lineLayer.render(I.viewModel.panels,R)}}),C.attr("transform",function(I){return P1(I.xScale(I.xIndex),0)}),C.call(bf.behavior.drag().origin(function(I){return I}).on("drag",function(I){var R=I.parent;f.linePickActive(!1),I.x=Math.max(-Fo.overdrag,Math.min(I.model.width+Fo.overdrag,bf.event.x)),I.canvasX=I.x*I.model.canvasPixelRatio,C.sort(function(B,O){return B.x-O.x}).each(function(B,O){B.xIndex=O,B.x=I===B?B.x:B.xScale(B.xIndex),B.canvasX=B.x*B.model.canvasPixelRatio}),O$(C,R,u),C.filter(function(B){return Math.abs(I.xIndex-B.xIndex)!==0}).attr("transform",function(B){return P1(B.xScale(B.xIndex),0)}),bf.select(this).attr("transform",P1(I.x,0)),C.each(function(B,O,V){V===I.parent.key&&(R.dimensions[O]=B)}),R.contextLayer&&R.contextLayer.render(R.panels,!1,!N$(R)),R.focusLayer.render&&R.focusLayer.render(R.panels)}).on("dragend",function(I){var R=I.parent;I.x=I.xScale(I.xIndex),I.canvasX=I.x*I.model.canvasPixelRatio,O$(C,R,u),bf.select(this).attr("transform",function(B){return P1(B.x,0)}),R.contextLayer&&R.contextLayer.render(R.panels,!1,!N$(R)),R.focusLayer&&R.focusLayer.render(R.panels),R.pickLayer&&R.pickLayer.render(R.panels,!0),f.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(R.key,R.dimensions.map(function(B){return B.crossfilterDimensionIndex}))})),C.exit().remove();var k=C.selectAll("."+Fo.cn.axisOverlays).data(F1,Iv);k.enter().append("g").classed(Fo.cn.axisOverlays,!0),k.selectAll("."+Fo.cn.axis).remove();var S=k.selectAll("."+Fo.cn.axis).data(F1,Iv);S.enter().append("g").classed(Fo.cn.axis,!0),S.each(function(I){var R=I.model.height/I.model.tickDistance,B=I.domainScale,O=B.domain();bf.select(this).call(bf.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(R,I.tickFormat).tickValues(I.ordinal?O:null).tickFormat(function(V){return E5.isOrdinal(I)?V:sje(I.model.dimensions[I.visibleIndex],V)}).scale(B)),ZF.font(S.selectAll("text"),I.model.tickFont)}),S.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),S.selectAll("text").style("cursor","default");var L=k.selectAll("."+Fo.cn.axisHeading).data(F1,Iv);L.enter().append("g").classed(Fo.cn.axisHeading,!0);var w=L.selectAll("."+Fo.cn.axisTitle).data(F1,Iv);w.enter().append("text").classed(Fo.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",i?"none":"auto"),w.text(function(I){return I.label}).each(function(I){var R=bf.select(this);ZF.font(R,I.model.labelFont),CQt.convertToTspans(R,t)}).attr("transform",function(I){var R=QHe(I.model.labelAngle,I.model.labelSide),B=Fo.axisTitleOffset;return(R.dir>0?"":P1(0,2*B+I.model.height))+kQt(R.degrees)+P1(-B*R.dx,-B*R.dy)}).attr("text-anchor",function(I){var R=QHe(I.model.labelAngle,I.model.labelSide),B=Math.abs(R.dx),O=Math.abs(R.dy);return 2*B>O?R.dir*R.dx<0?"start":"end":"middle"});var A=k.selectAll("."+Fo.cn.axisExtent).data(F1,Iv);A.enter().append("g").classed(Fo.cn.axisExtent,!0);var T=A.selectAll("."+Fo.cn.axisExtentTop).data(F1,Iv);T.enter().append("g").classed(Fo.cn.axisExtentTop,!0),T.attr("transform",P1(0,-Fo.axisExtentOffset));var m=T.selectAll("."+Fo.cn.axisExtentTopText).data(F1,Iv);m.enter().append("text").classed(Fo.cn.axisExtentTopText,!0).call(JHe),m.text(function(I){return eje(I,!0)}).each(function(I){ZF.font(bf.select(this),I.model.rangeFont)});var F=A.selectAll("."+Fo.cn.axisExtentBottom).data(F1,Iv);F.enter().append("g").classed(Fo.cn.axisExtentBottom,!0),F.attr("transform",function(I){return P1(0,I.model.height+Fo.axisExtentOffset)});var E=F.selectAll("."+Fo.cn.axisExtentBottomText).data(F1,Iv);E.enter().append("text").classed(Fo.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(JHe),E.text(function(I){return eje(I,!1)}).each(function(I){ZF.font(bf.select(this),I.model.rangeFont)}),aje.ensureAxisBrush(k,c,t)}});var H$=fe((G$,dje)=>{"use strict";var UQt=uje(),VQt=RF(),cje=z$().isVisible,hje={};function fje(e,t,r){var n=t.indexOf(r),a=e.indexOf(n);return a===-1&&(a+=t.length),a}function GQt(e,t){return function(n,a){return fje(e,t,n)-fje(e,t,a)}}var G$=dje.exports=function(t,r){var n=t._fullLayout,a=VQt(t,[],hje);if(a){var i={},o={},s={},l=n._size;r.forEach(function(g,p){var x=g[0].trace,_=s[p]=x.index;i[p]=t.data[_].dimensions,o[p]=t.data[_].dimensions.slice()});var u=function(g,p,x){var _=o[g][p],y=x.map(function(A){return A.slice()}),C="dimensions["+p+"].constraintrange",k=n._tracePreGUI[t._fullData[s[g]].uid];if(k[C]===void 0){var S=_.constraintrange;k[C]=S||null}var L=t._fullData[s[g]].dimensions[p];y.length?(y.length===1&&(y=y[0]),_.constraintrange=y,L.constraintrange=y.slice(),y=[y]):(delete _.constraintrange,delete L.constraintrange,y=null);var w={};w[C]=y,t.emit("plotly_restyle",[w,[s[g]]])},c=function(g){t.emit("plotly_hover",g)},f=function(g){t.emit("plotly_unhover",g)},v=function(g,p){var x=GQt(p,o[g].filter(cje));i[g].sort(x),o[g].filter(function(_){return!cje(_)}).sort(function(_){return o[g].indexOf(_)}).forEach(function(_){i[g].splice(i[g].indexOf(_),1),i[g].splice(o[g].indexOf(_),0,_)}),t.emit("plotly_restyle",[{dimensions:[i[g]]},[s[g]]])};UQt(t,r,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{filterChanged:u,hover:c,unhover:f,axesMoved:v})}};G$.reglPrecompiled=hje});var pje=fe(GM=>{"use strict";var vje=xi(),HQt=jf().getModuleCalcData,jQt=H$(),WQt=Q0();GM.name="parcoords";GM.plot=function(e){var t=HQt(e.calcdata,"parcoords")[0];t.length&&jQt(e,t)};GM.clean=function(e,t,r,n){var a=n._has&&n._has("parcoords"),i=t._has&&t._has("parcoords");a&&!i&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())};GM.toSVG=function(e){var t=e._fullLayout._glimages,r=vje.select(e).selectAll(".svg-container"),n=r.filter(function(i,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function a(){var i=this,o=i.toDataURL("image/png"),s=t.append("svg:image");s.attr({xmlns:WQt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:i.style.width,height:i.style.height})}n.each(a),window.setTimeout(function(){vje.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var mje=fe((IAr,gje)=>{"use strict";gje.exports={attributes:L$(),supplyDefaults:qHe(),calc:OHe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:pje(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var _je=fe((zAr,xje)=>{"use strict";var yje=mje();yje.plot=H$();xje.exports=yje});var wje=fe((qAr,bje)=>{"use strict";bje.exports=_je()});var j$=fe((BAr,Eje)=>{"use strict";var Aje=ta().extendFlat,YQt=Ho(),Tje=Ds(),XQt=_s(),{hovertemplateAttrs:Mje,templatefallbackAttrs:Sje}=Oo(),ZQt=nl().attributes,$Qt=Aje({editType:"calc"},XQt("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:Mje({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:Sje({editType:"plot"})});Eje.exports={domain:ZQt({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:Aje({},YQt.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:Mje({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:Sje({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:Tje({editType:"calc"}),tickfont:Tje({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:$Qt,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}});var Lje=fe((OAr,Cje)=>{"use strict";var k5=Xt(),KQt=Wf().hasColorscale,JQt=Vc(),QQt=nl().defaults,eer=Ah(),kje=j$(),ter=zF(),rer=Gf().isTypedArraySpec;function ner(e,t,r,n,a){a("line.shape"),a("line.hovertemplate"),a("line.hovertemplatefallback");var i=a("line.color",n.colorway[0]);if(KQt(e,"line")&&k5.isArrayOrTypedArray(i)){if(i.length)return a("line.colorscale"),JQt(e,t,n,a,{prefix:"line.",cLetter:"c"}),i.length;t.line.color=r}return 1/0}function ier(e,t){function r(u,c){return k5.coerce(e,t,kje.dimensions,u,c)}var n=r("values"),a=r("visible");if(n&&n.length||(a=t.visible=!1),a){r("label"),r("displayindex",t._index);var i=e.categoryarray,o=k5.isArrayOrTypedArray(i)&&i.length>0||rer(i),s;o&&(s="array");var l=r("categoryorder",s);l==="array"?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),!o&&l==="array"&&(t.categoryorder="trace")}}Cje.exports=function(t,r,n,a){function i(u,c){return k5.coerce(t,r,kje,u,c)}var o=eer(t,r,{name:"dimensions",handleItemDefaults:ier}),s=ner(t,r,n,a,i);QQt(r,a,i),(!Array.isArray(o)||!o.length)&&(r.visible=!1),ter(r,o,"values",s),i("hoveron"),i("hovertemplate"),i("hovertemplatefallback"),i("arrangement"),i("bundlecolors"),i("sortpaths"),i("counts");var l=a.font;k5.coerceFont(i,"labelfont",l,{overrideDflt:{size:Math.round(l.size)}}),k5.coerceFont(i,"tickfont",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var Fje=fe((NAr,Pje)=>{"use strict";var aer=L1().wrap,oer=Wf().hasColorscale,ser=Mh(),ler=Wq(),uer=ea(),HM=Xt(),cer=aa();Pje.exports=function(t,r){var n=HM.filterVisible(r.dimensions);if(n.length===0)return[];var a=n.map(function(m){var F;if(m.categoryorder==="trace")F=null;else if(m.categoryorder==="array")F=m.categoryarray;else{F=ler(m.values);for(var E=!0,I=0;I=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var Uje=fe((UAr,Nje)=>{"use strict";var Do=xi(),ber=($2(),Gs(Z2)).interpolateNumber,wer=Z8(),W$=ni(),YM=kl(),Iy=Xt(),jM=Iy.strTranslate,Dje=ea(),Ter=as();function Aer(e,t,r,n){var a=t._context.staticPlot,i=e.map(Ner.bind(0,t,r)),o=n.selectAll("g.parcatslayer").data([null]);o.enter().append("g").attr("class","parcatslayer").style("pointer-events",a?"none":"all");var s=o.selectAll("g.trace.parcats").data(i,qg),l=s.enter().append("g").attr("class","trace parcats");s.attr("transform",function(C){return jM(C.x,C.y)}),l.append("g").attr("class","paths");var u=s.select("g.paths"),c=u.selectAll("path.path").data(function(C){return C.paths},qg);c.attr("fill",function(C){return C.model.color});var f=c.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(C){return C.model.color}).attr("fill-opacity",0);Z$(f),c.attr("d",function(C){return C.svgD}),f.empty()||c.sort(Y$),c.exit().remove(),c.on("mouseover",Ser).on("mouseout",Eer).on("click",ker),l.append("g").attr("class","dimensions");var v=s.select("g.dimensions"),g=v.selectAll("g.dimension").data(function(C){return C.dimensions},qg);g.enter().append("g").attr("class","dimension"),g.attr("transform",function(C){return jM(C.x,0)}),g.exit().remove();var p=g.selectAll("g.category").data(function(C){return C.categories},qg),x=p.enter().append("g").attr("class","category");p.attr("transform",function(C){return jM(0,C.y)}),x.append("rect").attr("class","catrect").attr("pointer-events","none"),p.select("rect.catrect").attr("fill","none").attr("width",function(C){return C.width}).attr("height",function(C){return C.height}),Ije(x);var _=p.selectAll("rect.bandrect").data(function(C){return C.bands},qg);_.each(function(){Iy.raiseToTop(this)}),_.attr("fill",function(C){return C.color});var y=_.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(C){return C.color}).attr("fill-opacity",0);_.attr("fill",function(C){return C.color}).attr("width",function(C){return C.width}).attr("height",function(C){return C.height}).attr("y",function(C){return C.y}).attr("cursor",function(C){return C.parcatsViewModel.arrangement==="fixed"?"default":C.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),K$(y),_.exit().remove(),x.append("text").attr("class","catlabel").attr("pointer-events","none"),p.select("text.catlabel").attr("text-anchor",function(C){return WM(C)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(C){return WM(C)?C.width+5:-5}).attr("y",function(C){return C.height/2}).text(function(C){return C.model.categoryLabel}).each(function(C){Dje.font(Do.select(this),C.parcatsViewModel.categorylabelfont),Ter.convertToTspans(Do.select(this),t)}),x.append("text").attr("class","dimlabel"),p.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(C){return C.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(C){return C.width/2}).attr("y",-5).text(function(C,k){return k===0?C.parcatsViewModel.model.dimensions[C.model.dimensionInd].dimensionLabel:null}).each(function(C){Dje.font(Do.select(this),C.parcatsViewModel.labelfont)}),p.selectAll("rect.bandrect").on("mouseover",Ier).on("mouseout",zer),p.exit().remove(),g.call(Do.behavior.drag().origin(function(C){return{x:C.x,y:0}}).on("dragstart",qer).on("drag",Ber).on("dragend",Oer)),s.each(function(C){C.traceSelection=Do.select(this),C.pathSelection=Do.select(this).selectAll("g.paths").selectAll("path.path"),C.dimensionSelection=Do.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}Nje.exports=function(e,t,r,n){Aer(r,e,n,t)};function qg(e){return e.key}function WM(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function Y$(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColora)return 1;if(n!==a){var i=isNaN(n),o=isNaN(a);if(i!==o)return i?1:-1}}return e.length-t.length}function Ser(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){Iy.raiseToTop(this),$$(Do.select(this));var t=XM(e),r=X$(e);if(e.parcatsViewModel.graphDiv.emit("plotly_hover",{points:t,event:Do.event,constraints:r}),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var n=Do.mouse(this)[0],a=e.parcatsViewModel.graphDiv,i=e.parcatsViewModel.trace,o=a._fullLayout,s=o._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.graphDiv.getBoundingClientRect(),u,c,f;for(f=0;f"),w=Do.mouse(a)[0];YM.loneHover({trace:i,x:p-s.left+l.left,y:x-s.top+l.top,text:L,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:_,idealAlign:wW$.mostReadable(t.model.color)).attr("stroke-width",.3)}function Cer(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function Ije(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function Ler(e){e.attr("stroke","black").attr("stroke-width",1.5)}function K$(e){e.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function KF(e){var t=e.parcatsViewModel.pathSelection,r=e.categoryViewModel.model.dimensionInd,n=e.categoryViewModel.model.categoryInd;return t.filter(function(a){return a.model.categoryInds[r]===n&&a.model.color===e.color})}function Per(e){var t=Do.select(e.parentNode).selectAll("rect.bandrect");t.each(function(r){var n=KF(r);$$(n),n.each(function(){Iy.raiseToTop(this)})}),Cer(Do.select(e.parentNode))}function Fer(e){var t=Do.select(e).datum(),r=KF(t);$$(r),r.each(function(){Iy.raiseToTop(this)}),Do.select(e.parentNode).selectAll("rect.bandrect").filter(function(n){return n.color===t.color}).each(function(){Iy.raiseToTop(this),Ler(Do.select(this))})}function J$(e,t,r){var n=Do.select(e).datum(),a=n.categoryViewModel.model,i=n.parcatsViewModel.graphDiv,o=Do.select(e.parentNode).selectAll("rect.bandrect"),s=[];o.each(function(u){var c=KF(u);c.each(function(f){Array.prototype.push.apply(s,XM(f))})});var l={};l[a.dimensionInd]=a.categoryValue,i.emit(t,{points:s,event:r,constraints:l})}function Q$(e,t,r){var n=Do.select(e).datum(),a=n.categoryViewModel.model,i=n.parcatsViewModel.graphDiv,o=KF(n),s=[];o.each(function(u){Array.prototype.push.apply(s,XM(u))});var l={};l[a.dimensionInd]=a.categoryValue,n.rawColor!==void 0&&(l.color=n.rawColor),i.emit(t,{points:s,event:r,constraints:l})}function zje(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,a=e._fullLayout._invScaleY,i=Do.select(r.parentNode).select("rect.catrect"),o=i.node().getBoundingClientRect(),s=i.datum(),l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=o.top+o.height/2,v,g;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(v=o.left,g="left"):(v=o.left+o.width,g="right");var p=s.model.count,x=s.model.categoryLabel,_=p/s.parcatsViewModel.model.count,y={countLabel:p,categoryLabel:x,probabilityLabel:_.toFixed(3)},C=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&C.push(["Count:",y.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&C.push(["P("+y.categoryLabel+"):",y.probabilityLabel].join(" "));var k=C.join("
");return{trace:c,x:n*(v-t.left),y:a*(f-t.top),text:k,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:g,hovertemplate:c.hovertemplate,hovertemplateLabels:y,eventData:[{data:c._input,fullData:c,count:p,category:x,probability:_}]}}function Der(e,t,r){var n=[];return Do.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var a=this;n.push(zje(e,t,a))}),n}function Rer(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,a=e._fullLayout._invScaleY,i=r.getBoundingClientRect(),o=Do.select(r).datum(),s=o.categoryViewModel,l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=i.y+i.height/2,v,g;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(v=i.left,g="left"):(v=i.left+i.width,g="right");var p=s.model.categoryLabel,x=o.parcatsViewModel.model.count,_=0;o.categoryViewModel.bands.forEach(function(F){F.color===o.color&&(_+=F.count)});var y=s.model.count,C=0;l.pathSelection.each(function(F){F.model.color===o.color&&(C+=F.model.count)});var k=_/x,S=_/C,L=_/y,w={countLabel:_,categoryLabel:p,probabilityLabel:k.toFixed(3)},A=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&A.push(["Count:",w.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(A.push("P(color \u2229 "+p+"): "+w.probabilityLabel),A.push("P("+p+" | color): "+S.toFixed(3)),A.push("P(color | "+p+"): "+L.toFixed(3)));var T=A.join("
"),m=W$.mostReadable(o.color);return{trace:c,x:n*(v-t.left),y:a*(f-t.top),text:T,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:m,fontSize:10,idealAlign:g,hovertemplate:c.hovertemplate,hovertemplateLabels:w,eventData:[{data:c._input,fullData:c,category:p,count:x,probability:k,categorycount:y,colorcount:C,bandcolorcount:_}]}}function Ier(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=Do.mouse(this)[1];if(t<-1)return;var r=e.parcatsViewModel.graphDiv,n=r._fullLayout,a=n._paperdiv.node().getBoundingClientRect(),i=e.parcatsViewModel.hoveron,o=this;if(i==="color"?(Fer(o),Q$(o,"plotly_hover",Do.event)):(Per(o),J$(o,"plotly_hover",Do.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;i==="category"?s=zje(r,a,o):i==="color"?s=Rer(r,a,o):i==="dimension"&&(s=Der(r,a,o)),s&&YM.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function zer(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(Z$(t.pathSelection),Ije(t.dimensionSelection.selectAll("g.category")),K$(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),YM.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(Y$),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r==="color"?Q$(n,"plotly_unhover",Do.event):J$(n,"plotly_unhover",Do.event)}}function qer(e){e.parcatsViewModel.arrangement!=="fixed"&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,Do.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=Do.mouse(this)[0],n=Do.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=n&&n<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(a){return a.displayInd}),t.model.dragY=t.y,Iy.raiseToTop(this.parentNode),Do.select(this.parentNode).selectAll("rect.bandrect").each(function(a){a.yc.y+c.height/2&&(i.model.displayInd=c.model.displayInd,c.model.displayInd=s),e.dragCategoryDisplayInd=i.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement==="freeform"){a.model.dragX=Do.event.x;var f=e.parcatsViewModel.dimensions[r],v=e.parcatsViewModel.dimensions[n];f!==void 0&&a.model.dragXv.x&&(a.model.displayInd=v.model.displayInd,v.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=a.model.displayInd}tK(e.parcatsViewModel),eK(e.parcatsViewModel),Oje(e.parcatsViewModel),Bje(e.parcatsViewModel)}}function Oer(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){Do.select(this).selectAll("text").attr("font-weight","normal");var t={},r=qje(e.parcatsViewModel),n=e.parcatsViewModel.model.dimensions.map(function(v){return v.displayInd}),a=e.initialDragDimensionDisplayInds.some(function(v,g){return v!==n[g]});a&&n.forEach(function(v,g){var p=e.parcatsViewModel.model.dimensions[g].containerInd;t["dimensions["+p+"].displayindex"]=v});var i=!1;if(e.dragCategoryDisplayInd!==null){var o=e.model.categories.map(function(v){return v.displayInd});if(i=e.initialDragCategoryDisplayInds.some(function(v,g){return v!==o[g]}),i){var s=e.model.categories.slice().sort(function(v,g){return v.displayInd-g.displayInd}),l=s.map(function(v){return v.categoryValue}),u=s.map(function(v){return v.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[l],t["dimensions["+e.model.containerInd+"].ticktext"]=[u],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron==="color"?Q$(e.potentialClickBand,"plotly_click",Do.event.sourceEvent):J$(e.potentialClickBand,"plotly_click",Do.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var c=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];c.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,tK(e.parcatsViewModel),eK(e.parcatsViewModel);var f=Do.transition().duration(300).ease("cubic-in-out");f.each(function(){Oje(e.parcatsViewModel,!0),Bje(e.parcatsViewModel,!0)}).each("end",function(){(a||i)&&wer.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function qje(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;l--)u+="C"+o[l]+","+(t[l+1]+n)+" "+i[l]+","+(t[l]+n)+" "+(e[l]+r[l])+","+(t[l]+n),u+="l-"+r[l]+",0 ";return u+="Z",u}function eK(e){var t=e.dimensions,r=e.model,n=t.map(function(R){return R.categories.map(function(B){return B.y})}),a=e.model.dimensions.map(function(R){return R.categories.map(function(B){return B.displayInd})}),i=e.model.dimensions.map(function(R){return R.displayInd}),o=e.dimensions.map(function(R){return R.model.dimensionInd}),s=t.map(function(R){return R.x}),l=t.map(function(R){return R.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(R){var B=R.categoryInds.map(function(V,j){return a[j][V]}),O=o.map(function(V){return B[V]});return O}u.sort(function(R,B){var O=f(R),V=f(B);return e.sortpaths==="backward"&&(O.reverse(),V.reverse()),O.push(R.valueInds[0]),V.push(B.valueInds[0]),e.bundlecolors&&(O.unshift(R.rawColor),V.unshift(B.rawColor)),Mer(O,V)});for(var v=new Array(u.length),g=t[0].model.count,p=t[0].categories.map(function(R){return R.height}).reduce(function(R,B){return R+B}),x=0;x0?y=p*(_.count/g):y=0;for(var C=new Array(n.length),k=0;k<_.categoryInds.length;k++){var S=_.categoryInds[k],L=a[k][S],w=i[k];C[w]=n[w][L],n[w][L]+=y;var A=e.dimensions[w].categories[L],T=A.bands.length,m=A.bands[T-1];if(m===void 0||_.rawColor!==m.rawColor){var F=m===void 0?0:m.y+m.height;A.bands.push({key:F,color:_.color,rawColor:_.rawColor,height:y,width:A.width,count:_.count,y:F,categoryViewModel:A,parcatsViewModel:e})}else{var E=A.bands[T-1];E.height+=y,E.count+=_.count}}var I;e.pathShape==="hspline"?I=Rje(s,C,l,y,.5):I=Rje(s,C,l,y,0),v[x]={key:_.valueInds[0],model:_,height:y,leftXs:s,topYs:C,dimWidths:l,svgD:I,parcatsViewModel:e}}e.paths=v}function tK(e){var t=e.model.dimensions.map(function(o){return{displayInd:o.displayInd,dimensionInd:o.dimensionInd}});t.sort(function(o,s){return o.displayInd-s.displayInd});var r=[];for(var n in t){var a=t[n].dimensionInd,i=e.model.dimensions[a];r.push(Uer(e,i))}e.dimensions=r}function Uer(e,t){var r=40,n=16,a=e.model.dimensions.length,i=t.displayInd,o,s,l;a>1?o=(e.width-2*r-n)/(a-1):o=0,s=r,l=s+o*i;var u=[],c=e.model.maxCats,f=t.categories.length,v=8,g=t.count,p=e.height-v*(c-1),x,_,y,C,k,S=(c-f)*v/2,L=t.categories.map(function(w){return{displayInd:w.displayInd,categoryInd:w.categoryInd}});for(L.sort(function(w,A){return w.displayInd-A.displayInd}),k=0;k0?x=_.count/g*p:x=0,y={key:_.valueInds[0],model:_,width:n,height:x,y:_.dragY!==null?_.dragY:S,bands:[],parcatsViewModel:e},S=S+x+v,u.push(y);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:l,y:0,width:n,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var rK=fe((VAr,Vje)=>{"use strict";var Ver=Uje();Vje.exports=function(t,r,n,a){var i=t._fullLayout,o=i._paper,s=i._size;Ver(t,o,r,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},n,a)}});var Hje=fe(JF=>{"use strict";var Ger=jf().getModuleCalcData,Her=rK(),Gje="parcats";JF.name=Gje;JF.plot=function(e,t,r,n){var a=Ger(e.calcdata,Gje);if(a.length){var i=a[0];Her(e,i,r,n)}};JF.clean=function(e,t,r,n){var a=n._has&&n._has("parcats"),i=t._has&&t._has("parcats");a&&!i&&n._paperdiv.selectAll(".parcats").remove()}});var Wje=fe((HAr,jje)=>{"use strict";jje.exports={attributes:j$(),supplyDefaults:Lje(),calc:Fje(),plot:rK(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:Hje(),categories:["noOpacity"],meta:{}}});var Xje=fe((jAr,Yje)=>{"use strict";Yje.exports=Wje()});var $je=fe((WAr,Zje)=>{"use strict";Zje.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} + }`}),n={};return{regl:t,draw:r,atlas:n}};Bs.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=_Kt(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(ye){return parseFloat(ye)}):this.opacity=parseFloat(t.opacity)),t.viewport!=null&&(this.viewport=MKt(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=FKt(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=Bs.baseFontSize+"px sans-serif");var n=!1,a=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(ye,ue){if(typeof ye=="string")try{ye=w5.parse(ye)}catch(De){ye=w5.parse(Bs.baseFontSize+"px "+ye)}else{var J=ye.style,_e=ye.weight,ne=ye.stretch,ae=ye.variant;ye=w5.parse(w5.stringify(ye)),J&&(ye.style=J),_e&&(ye.weight=_e),ne&&(ye.stretch=ne),ae&&(ye.variant=ae)}var pe=w5.stringify({size:Bs.baseFontSize,family:ye.family,stretch:DF?ye.stretch:void 0,variant:ye.variant,weight:ye.weight,style:ye.style}),ie=EKt(ye.size),le=Math.round(ie[0]*kKt(ie[1]));if(le!==r.fontSize[ue]&&(a=!0,r.fontSize[ue]=le),(!r.font[ue]||pe!=r.font[ue].baseString)&&(n=!0,r.font[ue]=Bs.fonts[pe],!r.font[ue])){var xe=ye.family.join(", "),be=[ye.style];ye.style!=ye.variant&&be.push(ye.variant),ye.variant!=ye.weight&&be.push(ye.weight),DF&&ye.weight!=ye.stretch&&be.push(ye.stretch),r.font[ue]={baseString:pe,family:xe,weight:ye.weight,stretch:ye.stretch,style:ye.style,variant:ye.variant,width:{},kerning:{},metrics:PKt(xe,{origin:"top",fontSize:Bs.baseFontSize,fontStyle:be.join(" ")})},Bs.fonts[pe]=r.font[ue]}}),(n||a)&&this.font.forEach(function(ye,ue){var J=w5.stringify({size:r.fontSize[ue],family:ye.family,stretch:DF?ye.stretch:void 0,variant:ye.variant,weight:ye.weight,style:ye.style});if(r.fontAtlas[ue]=r.shader.atlas[J],!r.fontAtlas[ue]){var _e=ye.metrics;r.shader.atlas[J]=r.fontAtlas[ue]={fontString:J,step:Math.ceil(r.fontSize[ue]*_e.bottom*.5)*2,em:r.fontSize[ue],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:r.regl.texture()}}t.text==null&&(t.text=r.text)}),typeof t.text=="string"&&t.position&&t.position.length>2){for(var i=Array(t.position.length*.5),o=0;o2){for(var u=!t.position[0].length,c=Ly.mallocFloat(this.count*2),f=0,v=0;f1?r.align[ue]:r.align[0]:r.align;if(typeof J=="number")return J;switch(J){case"right":case"end":return-ye;case"center":case"centre":case"middle":return-ye*.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(ye,ue){var J=(r.font[ue]||r.font[0]).metrics,_e=0;return _e+=J.bottom*.5,typeof ye=="number"?_e+=ye-J.baseline:_e+=-J[ye],_e*=-1,_e})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=m$(t.color,"uint8");else{var O;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var U=t.color.length;O=Ly.mallocUint8(U);for(var j=(t.color.subarray||t.color.slice).bind(t.color),q=0;q4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(ee){var ce=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(ce);for(var me=0;me1?this.counts[me]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[me]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(me*4,me*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[me]:this.opacity,baseline:this.baselineOffset[me]!=null?this.baselineOffset[me]:this.baselineOffset[0],align:this.align?this.alignOffset[me]!=null?this.alignOffset[me]:this.alignOffset[0]:0,atlas:this.fontAtlas[me]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(me*2,me*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=[]}};Bs.prototype.destroy=function(){};Bs.prototype.kerning=!0;Bs.prototype.position={constant:new Float32Array(2)};Bs.prototype.translate=null;Bs.prototype.scale=null;Bs.prototype.font=null;Bs.prototype.text="";Bs.prototype.positionOffset=[0,0];Bs.prototype.opacity=1;Bs.prototype.color=new Uint8Array([0,0,0,255]);Bs.prototype.alignOffset=[0,0];Bs.maxAtlasSize=1024;Bs.atlasCanvas=document.createElement("canvas");Bs.atlasContext=Bs.atlasCanvas.getContext("2d",{alpha:!1});Bs.baseFontSize=64;Bs.fonts={};function RKt(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}sGe.exports=Bs});var RF=fe((sAr,uGe)=>{"use strict";var IKt=EY(),zKt=f$();uGe.exports=function(t,r,n){var a=t._fullLayout,i=!0;return a._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(n);return}if(!(o.pick&&!a._has("parcoords"))){try{o.regl=zKt({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||window.devicePixelRatio,extensions:r||[],cachedCode:n||{}})}catch(s){i=!1}o.regl||(i=!1),i&&this.addEventListener("webglcontextlost",function(s){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:s,layer:o.key})},!1)}}),i||IKt({container:a._glcontainer.node()}),i}});var x$=fe((y$,pGe)=>{"use strict";var cGe=xZ(),fGe=KZ(),qKt=eVe(),hGe=lGe(),dGe=Xt(),BKt=$p().selectMode,OKt=RF(),NKt=Is(),UKt=_U(),VKt=gZ().styleTextSelection,vGe={};function GKt(e,t,r,n){var a=e._size,i=e.width*n,o=e.height*n,s=a.l*n,l=a.b*n,u=a.r*n,c=a.t*n,f=a.w*n,v=a.h*n;return[s+t.domain[0]*f,l+r.domain[0]*v,i-u-(1-t.domain[1])*f,o-c-(1-r.domain[1])*v]}var y$=pGe.exports=function(t,r,n){if(n.length){var a=t._fullLayout,i=r._scene,o=r.xaxis,s=r.yaxis,l,u;if(i){var c=OKt(t,["ANGLE_instanced_arrays","OES_element_index_uint"],vGe);if(!c){i.init();return}var f=i.count,v=a._glcanvas.data()[0].regl;if(UKt(t,r,n),i.dirty){if((i.line2d||i.error2d)&&!(i.scatter2d||i.fill2d||i.glText)&&v.clear({color:!0,depth:!0}),i.error2d===!0&&(i.error2d=qKt(v)),i.line2d===!0&&(i.line2d=fGe(v)),i.scatter2d===!0&&(i.scatter2d=cGe(v)),i.fill2d===!0&&(i.fill2d=fGe(v)),i.glText===!0)for(i.glText=new Array(f),l=0;li.glText.length){var g=f-i.glText.length;for(l=0;lK&&(isNaN(V[ee])||isNaN(V[ee+1]));)ee-=2;q.positions=V.slice(K,ee+2)}return q}),i.line2d.update(i.lineOptions)),i.error2d){var x=(i.errorXOptions||[]).concat(i.errorYOptions||[]).map(function(q){return q||{positions:[],errors:[]}});i.error2d.update(x)}i.scatter2d&&i.scatter2d.update(i.markerOptions),i.fillOrder=dGe.repeat(null,f),i.fill2d&&(i.fillOptions=i.fillOptions.map(function(q,V){var K=n[V];if(!(!q||!K||!K[0]||!K[0].trace)){var ee=K[0],ce=ee.trace,me=ee.t,ye=i.lineOptions[V],ue,J,_e=[];ce._ownfill&&_e.push(V),ce._nexttrace&&_e.push(V+1),_e.length&&(i.fillOrder[V]=_e);var ne=[],ae=ye&&ye.positions||me.positions,pe,ie;if(ce.fill==="tozeroy"){for(pe=0;pepe&&isNaN(ae[ie+1]);)ie-=2;ae[pe+1]!==0&&(ne=[ae[pe],0]),ne=ne.concat(ae.slice(pe,ie+2)),ae[ie+1]!==0&&(ne=ne.concat([ae[ie],0]))}else if(ce.fill==="tozerox"){for(pe=0;pepe&&isNaN(ae[ie]);)ie-=2;ae[pe]!==0&&(ne=[0,ae[pe+1]]),ne=ne.concat(ae.slice(pe,ie+2)),ae[ie]!==0&&(ne=ne.concat([0,ae[ie+1]]))}else if(ce.fill==="toself"||ce.fill==="tonext"){for(ne=[],ue=0,q.splitNull=!0,J=0;J-1;for(let[q]of n)if(q){var S=q.trace,L=q.t,w=L.index,T=S._length,A=L.x,m=L.y;if(S.selectedpoints||C||k){if(C||(C=!0),S.selectedpoints){var F=i.selectBatch[w]=S.selectedpoints,E={};for(u=0;u{"use strict";var gGe=LBe();gGe.plot=x$();mGe.exports=gGe});var _Ge=fe((uAr,xGe)=>{"use strict";xGe.exports=yGe()});var _$=fe((cAr,AGe)=>{"use strict";var HKt=Ol(),TGe=_s(),bGe=pl().axisHoverFormat,{hovertemplateAttrs:jKt,templatefallbackAttrs:WKt}=Oo(),OM=yM(),YKt=rc().idRegex,XKt=So().templatedArray,T5=ta().extendFlat,Rg=HKt.marker,ZKt=Rg.line,$Kt=T5(TGe("marker.line",{editTypeOverride:"calc"}),{width:T5({},ZKt.width,{editType:"calc"}),editType:"calc"}),IF=T5(TGe("marker"),{symbol:Rg.symbol,angle:Rg.angle,size:T5({},Rg.size,{editType:"markerSize"}),sizeref:Rg.sizeref,sizemin:Rg.sizemin,sizemode:Rg.sizemode,opacity:Rg.opacity,colorbar:Rg.colorbar,line:$Kt,editType:"calc"});IF.color.editType=IF.cmin.editType=IF.cmax.editType="style";function wGe(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:YKt[e],editType:"plot"}}}AGe.exports={dimensions:XKt("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:T5({},OM.text,{}),hovertext:T5({},OM.hovertext,{}),hovertemplate:jKt(),hovertemplatefallback:WKt(),xhoverformat:bGe("x"),yhoverformat:bGe("y"),marker:IF,xaxes:wGe("x"),yaxes:wGe("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:OM.selected.marker,editType:"calc"},unselected:{marker:OM.unselected.marker,editType:"calc"},opacity:OM.opacity}});var zF=fe((fAr,MGe)=>{"use strict";MGe.exports=function(e,t,r,n){n||(n=1/0);var a,i;for(a=0;a{"use strict";var b$=Xt(),KKt=Ah(),SGe=_$(),JKt=Is(),QKt=vv(),eJt=zF(),tJt=JP().isOpenSymbol;EGe.exports=function(t,r,n,a){function i(g,p){return b$.coerce(t,r,SGe,g,p)}var o=KKt(t,r,{name:"dimensions",handleItemDefaults:rJt}),s=i("diagonal.visible"),l=i("showupperhalf"),u=i("showlowerhalf"),c=eJt(r,o,"values");if(!c||!s&&!l&&!u){r.visible=!1;return}i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),QKt(t,r,n,a,i,{noAngleRef:!0,noLineDash:!0,noStandOff:!0});var f=tJt(r.marker.symbol),v=JKt.isBubble(r);i("marker.line.width",f||v?1:0),nJt(t,r,a,i),b$.coerceSelectionMarkerOpacity(r,i)};function rJt(e,t){function r(a,i){return b$.coerce(e,t,SGe.dimensions,a,i)}r("label");var n=r("values");n&&n.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function nJt(e,t,r,n){var a=t.dimensions,i=a.length,o=t.showupperhalf,s=t.showlowerhalf,l=t.diagonal.visible,u,c,f=new Array(i),v=new Array(i);for(u=0;uc&&o||u{"use strict";var CGe=Xt();LGe.exports=function(t,r){var n=t._fullLayout,a=r.uid,i=n._splomScenes;i||(i=n._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s={matrix:!1,selectBatch:[],unselectBatch:[]},l=i[r.uid];return l||(l=i[a]=CGe.extendFlat({},o,s),l.draw=function(){l.matrix&&l.matrix.draw&&(l.selectBatch.length||l.unselectBatch.length?l.matrix.draw(l.unselectBatch,l.selectBatch):l.matrix.draw()),l.dirty=!1},l.destroy=function(){l.matrix&&l.matrix.destroy&&l.matrix.destroy(),l.matrixOptions=null,l.selectBatch=null,l.unselectBatch=null,l=null}),l.dirty||CGe.extendFlat(l,o),l}});var RGe=fe((vAr,DGe)=>{"use strict";var w$=Xt(),qF=El(),iJt=gv().calcMarkerSize,aJt=gv().calcAxisExpansion,oJt=pv(),FGe=f_().markerSelection,sJt=f_().markerStyle,lJt=PGe(),uJt=Wa().BADNUM,cJt=Ty().TOO_MANY_POINTS;DGe.exports=function(t,r){var n=r.dimensions,a=r._length,i={},o=i.cdata=[],s=i.data=[],l=r._visibleDims=[],u,c,f,v,g;function p(k,S){for(var L=k.makeCalcdata({v:S.values,vcalendar:r.calendar},"v"),w=0;wcJt,y;for(x?y=i.sizeAvg||Math.max(i.size,3):y=iJt(r,a),c=0;c{(function(){var e,t,r,n,a,i;typeof performance!="undefined"&&performance!==null&&performance.now?NM.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(NM.exports=function(){return(e()-a)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},n=e(),i=process.uptime()*1e9,a=n-i):Date.now?(NM.exports=function(){return Date.now()-r},r=Date.now()):(NM.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(IGe)});var BGe=fe((pAr,NF)=>{var fJt=zGe(),Ig=window,BF=["moz","webkit"],M5="AnimationFrame",S5=Ig["request"+M5],UM=Ig["cancel"+M5]||Ig["cancelRequest"+M5];for(A5=0;!S5&&A5{OGe.exports=function(t,r){var n=typeof t=="number",a=typeof r=="number";n&&!a?(r=t,t=0):!n&&!a&&(t=0,r=0),t=t|0,r=r|0;var i=r-t;if(i<0)throw new Error("array length must be positive");for(var o=new Array(i),s=0,l=t;s{"use strict";var hJt=xZ(),dJt=E1(),vJt=l_(),UGe=BGe(),pJt=NGe(),A$=c5(),gJt=u_();GGe.exports=Fy;function Fy(e,t){if(!(this instanceof Fy))return new Fy(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=hJt(e),this.canvas=this.scatter.canvas}Fy.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=UGe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,UGe(()=>{this.dirty=!1})),this)};Fy.prototype.update=function(...e){if(!e.length)return;for(let n=0;nx||!a.lower&&_{t[i+s]=n})}this.scatter.draw(...t)}return this};Fy.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function mJt(e,t,r){let n=e.id!=null?e.id:e,a=t,i=r;return n<<16|(a&255)<<8|i&255}function UF(e,t,r){let n,a,i,o,s,l,u,c,f=e[t],v=e[r];return f.length>2?(n=f[0],i=f[2],a=f[1],o=f[3]):f.length?(n=a=f[0],i=o=f[1]):(n=f.x,a=f.y,i=f.x+f.width,o=f.y+f.height),v.length>2?(s=v[0],u=v[2],l=v[1],c=v[3]):v.length?(s=l=v[0],u=c=v[1]):(s=v.x,l=v.y,u=v.x+v.width,c=v.y+v.height),[s,a,u,o]}function VGe(e){if(typeof e=="number")return[e,e,e,e];if(e.length===2)return[e[0],e[1],e[0],e[1]];{let t=A$(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var WGe=fe((yAr,jGe)=>{"use strict";var yJt=HGe(),M$=Xt(),VF=El(),xJt=$p().selectMode;jGe.exports=function(t,r,n){if(n.length)for(var a=0;a-1,E=xJt(c)||!!a.selectedpoints||F,I=!0;if(E){var R=a._length;if(a.selectedpoints){o.selectBatch=a.selectedpoints;var B=a.selectedpoints,O={};for(g=0;g{"use strict";YGe.getDimIndex=function(t,r){for(var n=r._id,a=n.charAt(0),i={x:0,y:1}[a],o=t._visibleDims,s=0;s{"use strict";var XGe=S$(),bJt=KP().calcHover,ZGe=Yi().getFromId,wJt=ta().extendFlat;function TJt(e,t,r,n,a){a||(a={});var i=(n||"").charAt(0)==="x",o=(n||"").charAt(0)==="y",s=$Ge(e,t,r);if((i||o)&&a.hoversubplots==="axis"&&s[0])for(var l=(i?e.xa:e.ya)._subplotsWith,u=a.gd,c=wJt({},e),f=0;f{"use strict";var rHe=Xt(),QGe=rHe.pushUnique,eHe=Is(),tHe=S$();nHe.exports=function(t,r){var n=t.cd,a=n[0].trace,i=n[0].t,o=t.scene,s=o.matrixOptions.cdata,l=t.xaxis,u=t.yaxis,c=[];if(!o)return c;var f=!eHe.hasMarkers(a)&&!eHe.hasText(a);if(a.visible!==!0||f)return c;var v=tHe.getDimIndex(a,l),g=tHe.getDimIndex(a,u);if(v===!1||g===!1)return c;var p=i.xpx[v],_=i.ypx[g],x=s[v],y=s[g],C=(t.scene.selectBatch||[]).slice(),k=[];if(r!==!1&&!r.degenerate)for(var S=0;S{"use strict";var aHe=Xt(),AJt=pv(),MJt=f_().markerStyle;oHe.exports=function(t,r){var n=r.trace,a=t._fullLayout._splomScenes[n.uid];if(a){AJt(t,n),aHe.extendFlat(a.matrixOptions,MJt(t,n));var i=aHe.extendFlat({},a.matrixOptions,a.viewOpts);a.matrix.update(i,null)}}});var uHe=fe((TAr,lHe)=>{"use strict";var SJt=bi(),EJt=dV();lHe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:_$(),supplyDefaults:kGe(),colorbar:Zf(),calc:RGe(),plot:WGe(),hoverPoints:JGe().hoverPoints,selectPoints:iHe(),editStyle:sHe(),meta:{}};SJt.register(EJt)});var pHe=fe((AAr,vHe)=>{"use strict";var kJt=KZ(),CJt=bi(),LJt=RF(),PJt=jf().getModuleCalcData,Dy=gu(),cHe=El().getFromId,fHe=Yi().shouldShowZeroLine,hHe="splom",dHe={};function FJt(e){var t=e._fullLayout,r=CJt.getModule(hHe),n=PJt(e.calcdata,r)[0],a=LJt(e,["ANGLE_instanced_arrays","OES_element_index_uint"],dHe);a&&(t._hasOnlyLargeSploms&&E$(e),r.plot(e,{},n))}function DJt(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&E$(e);for(var n=0;n{"use strict";var gHe=uHe();gHe.basePlotModule=pHe(),mHe.exports=gHe});var _He=fe((SAr,xHe)=>{"use strict";xHe.exports=yHe()});var L$=fe((EAr,bHe)=>{"use strict";var qJt=_s(),k$=pf(),C$=Ds(),BJt=nl().attributes,GF=ta().extendFlat,OJt=So().templatedArray;bHe.exports={domain:BJt({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:C$({editType:"plot"}),tickfont:C$({autoShadowDflt:!0,editType:"plot"}),rangefont:C$({editType:"plot"}),dimensions:OJt("dimension",{label:{valType:"string",editType:"plot"},tickvals:GF({},k$.tickvals,{editType:"plot"}),ticktext:GF({},k$.ticktext,{editType:"plot"}),tickformat:GF({},k$.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:GF({editType:"calc"},qJt("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}});var VM=fe((kAr,wHe)=>{"use strict";wHe.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}});var L1=fe((CAr,AHe)=>{"use strict";var NJt=Q4();function THe(e){return[e]}AHe.exports={keyFun:function(e){return e.key},repeat:THe,descend:NJt,wrap:THe,unwrap:function(e){return e[0]}}});var D$=fe((LAr,IHe)=>{"use strict";var Vu=VM(),Dp=xi(),UJt=L1().keyFun,HF=L1().repeat,E5=Xt().sorterAsc,VJt=Xt().strTranslate,MHe=Vu.bar.snapRatio;function SHe(e,t){return e*(1-MHe)+t*MHe}var EHe=Vu.bar.snapClose;function GJt(e,t){return e*(1-EHe)+t*EHe}function WF(e,t,r,n){if(HJt(r,n))return r;var a=e?-1:1,i=0,o=t.length-1;if(a<0){var s=i;i=o,o=s}for(var l=t[i],u=l,c=i;a*c=t[r][0]&&e<=t[r][1])return!0;return!1}function jJt(e){e.attr("x",-Vu.bar.captureWidth/2).attr("width",Vu.bar.captureWidth)}function WJt(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function YJt(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=kHe(e.brush.filter.getConsolidated(),e.height),r=[0],n,a,i,o=t.length?t[0][0]:null,s=0;se[1]+r||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}function CHe(){Dp.select(document.body).style("cursor",null)}function F$(e){e.attr("stroke-dasharray",YJt)}function jF(e,t){var r=Dp.select(e).selectAll(".highlight, .highlight-shadow"),n=t?r.transition().duration(Vu.bar.snapDuration).each("end",t):r;F$(n)}function LHe(e,t){var r=e.brush,n=r.filterSpecified,a=NaN,i={},o;if(n){var s=e.height,l=r.filter.getConsolidated(),u=kHe(l,s),c=NaN,f=NaN,v=NaN;for(o=0;o<=u.length;o++){var g=u[o];if(g&&g[0]<=t&&t<=g[1]){c=o;break}else if(f=o?o-1:NaN,g&&g[0]>t){v=o;break}}if(a=c,isNaN(a)&&(isNaN(f)||isNaN(v)?a=isNaN(f)?v:f:a=t-u[f][1]=C[0]&&y<=C[1]){i.clickableOrdinalRange=C;break}}}return i}function ZJt(e,t){Dp.event.sourceEvent.stopPropagation();var r=t.height-Dp.mouse(e)[1]-2*Vu.verticalPadding,n=t.unitToPaddedPx.invert(r),a=t.brush,i=LHe(t,r),o=i.interval,s=a.svgBrush;if(s.wasDragged=!1,s.grabbingBar=i.region==="ns",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-Vu.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=i.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&a.filterSpecified?a.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=i.region?o[i.region==="s"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function PHe(e,t){Dp.event.sourceEvent.stopPropagation();var r=t.height-Dp.mouse(e)[1]-2*Vu.verticalPadding,n=t.brush.svgBrush;n.wasDragged=!0,n._dragging=!0,n.grabbingBar?n.newExtent=[r-n.grabPoint,r+n.barLength-n.grabPoint].map(t.unitToPaddedPx.invert):n.newExtent=[n.startExtent,t.unitToPaddedPx.invert(r)].sort(E5),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),jF(e.parentNode)}function $Jt(e,t){var r=t.brush,n=r.filter,a=r.svgBrush;a._dragging||(FHe(e,t),PHe(e,t),t.brush.svgBrush.wasDragged=!1),a._dragging=!1;var i=Dp.event;i.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,t.parent.inBrushDrag=!1,CHe(),!a.wasDragged){a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&t.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,a.extent.length===0&&P$(r)):P$(r),a.brushCallback(t),jF(e.parentNode),a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(u?[a.newExtent]:[]),a.extent.length||P$(r),a.brushCallback(t),u?jF(e.parentNode,s):(s(),jF(e.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function FHe(e,t){var r=t.height-Dp.mouse(e)[1]-2*Vu.verticalPadding,n=LHe(t,r),a="crosshair";n.clickableOrdinalRange?a="pointer":n.region&&(a=n.region+"-resize"),Dp.select(document.body).style("cursor",a)}function KJt(e){e.on("mousemove",function(t){Dp.event.preventDefault(),t.parent.inBrushDrag||FHe(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||CHe()}).call(Dp.behavior.drag().on("dragstart",function(t){ZJt(this,t)}).on("drag",function(t){PHe(this,t)}).on("dragend",function(t){$Jt(this,t)}))}function DHe(e,t){return e[0]-t[0]}function JJt(e,t,r){var n=r._context.staticPlot,a=e.selectAll(".background").data(HF);a.enter().append("rect").classed("background",!0).call(jJt).call(WJt).style("pointer-events",n?"none":"auto").attr("transform",VJt(0,Vu.verticalPadding)),a.call(KJt).attr("height",function(s){return s.height-Vu.verticalPadding});var i=e.selectAll(".highlight-shadow").data(HF);i.enter().append("line").classed("highlight-shadow",!0).attr("x",-Vu.bar.width/2).attr("stroke-width",Vu.bar.width+Vu.bar.strokeWidth).attr("stroke",t).attr("opacity",Vu.bar.strokeOpacity).attr("stroke-linecap","butt"),i.attr("y1",function(s){return s.height}).call(F$);var o=e.selectAll(".highlight").data(HF);o.enter().append("line").classed("highlight",!0).attr("x",-Vu.bar.width/2).attr("stroke-width",Vu.bar.width-Vu.bar.strokeWidth).attr("stroke",Vu.bar.fillColor).attr("opacity",Vu.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(F$)}function QJt(e,t,r){var n=e.selectAll("."+Vu.cn.axisBrush).data(HF,UJt);n.enter().append("g").classed(Vu.cn.axisBrush,!0),JJt(n,t,r)}function eQt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function P$(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function tQt(e){return function(r){var n=r.brush,a=eQt(n),i=a.slice();n.filter.set(i),e()}}function RHe(e){for(var t=e.slice(),r=[],n,a=t.shift();a;){for(n=a.slice();(a=t.shift())&&a[0]<=n[1];)n[1]=Math.max(n[1],a[1]);r.push(n)}return r.length===1&&r[0][0]>r[0][1]&&(r=[]),r}function rQt(){var e=[],t,r;return{set:function(n){e=n.map(function(a){return a.slice().sort(E5)}).sort(DHe),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=RHe(e),r=e.reduce(function(a,i){return[Math.min(a[0],i[0]),Math.max(a[1],i[1])]},[1/0,-1/0])},get:function(){return e.slice()},getConsolidated:function(){return t},getBounds:function(){return r}}}function nQt(e,t,r,n,a,i){var o=rQt();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:tQt(a),brushEndCallback:i}}}function iQt(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(E5)}),t.multiselect?e=RHe(e.sort(DHe)):e=[e[0]]):e=[e.sort(E5)],t.tickvals){var r=t.tickvals.slice().sort(E5);if(e=e.map(function(n){var a=[WF(0,r,n[0],[]),WF(1,r,n[1],[])];if(a[1]>a[0])return a}).filter(function(n){return n}),!e.length)return}return e.length>1?e:e[0]}IHe.exports={makeBrush:nQt,ensureAxisBrush:QJt,cleanRanges:iQt}});var BHe=fe((PAr,qHe)=>{"use strict";var Ry=Xt(),aQt=Wf().hasColorscale,oQt=Vc(),sQt=nl().defaults,lQt=Ah(),uQt=Yi(),zHe=L$(),cQt=D$(),R$=VM().maxDimensionCount,fQt=zF();function hQt(e,t,r,n,a){var i=a("line.color",r);if(aQt(e,"line")&&Ry.isArrayOrTypedArray(i)){if(i.length)return a("line.colorscale"),oQt(e,t,n,a,{prefix:"line.",cLetter:"c"}),i.length;t.line.color=r}return 1/0}function dQt(e,t,r,n){function a(u,c){return Ry.coerce(e,t,zHe.dimensions,u,c)}var i=a("values"),o=a("visible");if(i&&i.length||(o=t.visible=!1),o){a("label"),a("tickvals"),a("ticktext"),a("tickformat");var s=a("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:s},uQt.setConvert(t._ax,n.layout),a("multiselect");var l=a("constraintrange");l&&(t.constraintrange=cQt.cleanRanges(l,t))}}qHe.exports=function(t,r,n,a){function i(c,f){return Ry.coerce(t,r,zHe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>R$&&(Ry.log("parcoords traces support up to "+R$+" dimensions at the moment"),o.splice(R$));var s=lQt(t,r,{name:"dimensions",layout:a,handleItemDefaults:dQt}),l=hQt(t,r,n,a,i);sQt(r,a,i),(!Array.isArray(s)||!s.length)&&(r.visible=!1),fQt(r,s,"values",l);var u=Ry.extendFlat({},a.font,{size:Math.round(a.font.size/1.2)});Ry.coerceFont(i,"labelfont",u),Ry.coerceFont(i,"tickfont",u,{autoShadowDflt:!0}),Ry.coerceFont(i,"rangefont",u),i("labelangle"),i("labelside"),i("unselected.line.color"),i("unselected.line.opacity")}});var NHe=fe((FAr,OHe)=>{"use strict";var vQt=Xt().isArrayOrTypedArray,I$=js(),pQt=L1().wrap;OHe.exports=function(t,r){var n,a;return I$.hasColorscale(r,"line")&&vQt(r.line.color)?(n=r.line.color,a=I$.extractOpts(r.line).colorscale,I$.calc(t,r,{vals:n,containerStr:"line",cLetter:"c"})):(n=gQt(r._length),a=[[0,r.line.color],[1,r.line.color]]),pQt({lineColor:n,cscale:a})};function gQt(e){for(var t=new Array(e),r=0;r{"use strict";var mQt=Xt().isTypedArray;YF.convertTypedArray=function(e){return mQt(e)?Array.prototype.slice.call(e):e};YF.isOrdinal=function(e){return!!e.tickvals};YF.isVisible=function(e){return e.visible||!("visible"in e)}});var $He=fe((RAr,ZHe)=>{"use strict";var yQt=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` +`),xQt=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` +`),GM=VM().maxDimensionCount,WHe=Xt(),UHe=1e-6,XF=2048,_Qt=new Uint8Array(4),VHe=new Uint8Array(4),GHe={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function bQt(e){e.read({x:0,y:0,width:1,height:1,data:_Qt})}function YHe(e,t,r,n,a){var i=e._gl;i.enable(i.SCISSOR_TEST),i.scissor(t,r,n,a),e.clear({color:[0,0,0,0],depth:1})}function wQt(e,t,r,n,a,i){var o=i.key;function s(l){var u=Math.min(n,a-l*n);l===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],YHe(e,i.scissorX,i.scissorY,i.scissorWidth,i.viewBoxSize[1])),!r.clearOnly&&(i.count=2*u,i.offset=2*l*n,t(i),l*n+u>>8*t)%256/255}function MQt(e,t,r){for(var n=new Array(e*(GM+4)),a=0,i=0;iU&&(U=A[I].dim1.canvasX,B=I);E===0&&YHe(a,0,0,u.canvasWidth,u.canvasHeight);var j=k(r);for(I=0;I{"use strict";var bf=xi(),zg=Xt(),B$=zg.isArrayOrTypedArray,rje=zg.numberFormat,nje=ni(),ije=Yi(),LQt=zg.strRotate,P1=zg.strTranslate,PQt=as(),ZF=Ji(),KHe=js(),U$=L1(),Iv=U$.keyFun,F1=U$.repeat,aje=U$.unwrap,k5=z$(),Fo=VM(),oje=D$(),FQt=$He();function JHe(e,t,r){return zg.aggNums(e,null,t,r)}function sje(e,t){return V$(JHe(Math.min,e,t),JHe(Math.max,e,t))}function $F(e){var t=e.range;return t?V$(t[0],t[1]):sje(e.values,e._length)}function V$(e,t){return(isNaN(e)||!isFinite(e))&&(e=0),(isNaN(t)||!isFinite(t))&&(t=0),e===t&&(e===0?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function DQt(e,t){return t?function(r,n){var a=t[n];return a==null?e(r):a}:e}function RQt(e,t,r,n,a){var i=$F(r);return n?bf.scale.ordinal().domain(n.map(DQt(rje(r.tickformat),a))).range(n.map(function(o){var s=(o-i[0])/(i[1]-i[0]);return e-t+s*(2*t-e)})):bf.scale.linear().domain(i).range([e-t,t])}function IQt(e,t){return bf.scale.linear().range([t,e-t])}function zQt(e,t){return bf.scale.linear().domain($F(e)).range([t,1-t])}function qQt(e){if(e.tickvals){var t=$F(e);return bf.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function BQt(e){var t=e.map(function(i){return i[0]}),r=e.map(function(i){let[o,s,l]=nje.rgbaArray(i[1]);return bf.rgb(o,s,l)}),n=function(i){return function(o){return o[i]}},a="rgb".split("").map(function(i){return bf.scale.linear().clamp(!0).domain(t).range(r.map(n(i)))});return function(i){return a.map(function(o){return o(i)})}}function N$(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function OQt(e,t,r){var n=aje(t),a=n.trace,i=k5.convertTypedArray(n.lineColor),o=a.line,s={color:nje.normalize(a.unselected.line.color),opacity:a.unselected.line.opacity},l=KHe.extractOpts(o),u=l.reversescale?KHe.flipScale(n.cscale):n.cscale,c=a.domain,f=a.dimensions,v=e.width,g=a.labelangle,p=a.labelside,_=a.labelfont,x=a.tickfont,y=a.rangefont,C=zg.extendDeepNoArrays({},o,{color:i.map(bf.scale.linear().domain($F({values:i,range:[l.min,l.max],_length:a._length}))),blockLineCount:Fo.blockLineCount,canvasOverdrag:Fo.overdrag*Fo.canvasPixelRatio}),k=Math.floor(v*(c.x[1]-c.x[0])),S=Math.floor(e.height*(c.y[1]-c.y[0])),L=e.margin||{l:80,r:80,t:100,b:80},w=k,T=S;return{key:r,colCount:f.filter(k5.isVisible).length,dimensions:f,tickDistance:Fo.tickDistance,unitToColor:BQt(u),lines:C,deselectedLines:s,labelAngle:g,labelSide:p,labelFont:_,tickFont:x,rangeFont:y,layoutWidth:v,layoutHeight:e.height,domain:c,translateX:c.x[0]*v,translateY:e.height-c.y[1]*e.height,pad:L,canvasWidth:w*Fo.canvasPixelRatio+2*C.canvasOverdrag,canvasHeight:T*Fo.canvasPixelRatio,width:w,height:T,canvasPixelRatio:Fo.canvasPixelRatio}}function NQt(e,t,r){var n=r.width,a=r.height,i=r.dimensions,o=r.canvasPixelRatio,s=function(v){return n*v/Math.max(1,r.colCount-1)},l=Fo.verticalPadding/a,u=IQt(a,Fo.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=i.filter(k5.isVisible).map(function(v,g){var p=zQt(v,l),_=f[v.label];f[v.label]=(_||0)+1;var x=v.label+(_?"__"+_:""),y=v.constraintrange,C=y&&y.length;C&&!B$(y[0])&&(y=[y]);var k=C?y.map(function(R){return R.map(p)}):[[-1/0,1/0]],S=function(){var R=c;R.focusLayer&&R.focusLayer.render(R.panels,!0);var B=N$(R);!e.contextShown()&&B?(R.contextLayer&&R.contextLayer.render(R.panels,!0),e.contextShown(!0)):e.contextShown()&&!B&&(R.contextLayer&&R.contextLayer.render(R.panels,!0,!0),e.contextShown(!1))},L=v.values;L.length>v._length&&(L=L.slice(0,v._length));var w=v.tickvals,T;function A(R,B){return{val:R,text:T[B]}}function m(R,B){return R.val-B.val}if(B$(w)&&w.length){zg.isTypedArray(w)&&(w=Array.from(w)),T=v.ticktext,!B$(T)||!T.length?T=w.map(rje(v.tickformat)):T.length>w.length?T=T.slice(0,w.length):w.length>T.length&&(w=w.slice(0,T.length));for(var F=1;F=B||q>=O)return;var V=I.lineLayer.readPixel(j,O-1-q),K=V[3]!==0,ee=K?V[2]+256*(V[1]+256*V[0]):null,ce={x:j,y:q,clientX:R.clientX,clientY:R.clientY,dataIndex:I.model.key,curveNumber:ee};ee!==p&&(K?a.hover(ce):a.unhover&&a.unhover(ce),p=ee)}}),g.style("opacity",function(I){return I.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var x=s.selectAll("."+Fo.cn.parcoords).data(v,Iv);x.exit().remove(),x.enter().append("g").classed(Fo.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),x.attr("transform",function(I){return P1(I.model.translateX,I.model.translateY)});var y=x.selectAll("."+Fo.cn.parcoordsControlView).data(F1,Iv);y.enter().append("g").classed(Fo.cn.parcoordsControlView,!0),y.attr("transform",function(I){return P1(I.model.pad.l,I.model.pad.t)});var C=y.selectAll("."+Fo.cn.yAxis).data(function(I){return I.dimensions},Iv);C.enter().append("g").classed(Fo.cn.yAxis,!0),y.each(function(I){O$(C,I,u)}),g.each(function(I){if(I.viewModel){!I.lineLayer||a?I.lineLayer=FQt(this,I):I.lineLayer.update(I),(I.key||I.key===0)&&(I.viewModel[I.key]=I.lineLayer);var R=!I.context||a;I.lineLayer.render(I.viewModel.panels,R)}}),C.attr("transform",function(I){return P1(I.xScale(I.xIndex),0)}),C.call(bf.behavior.drag().origin(function(I){return I}).on("drag",function(I){var R=I.parent;f.linePickActive(!1),I.x=Math.max(-Fo.overdrag,Math.min(I.model.width+Fo.overdrag,bf.event.x)),I.canvasX=I.x*I.model.canvasPixelRatio,C.sort(function(B,O){return B.x-O.x}).each(function(B,O){B.xIndex=O,B.x=I===B?B.x:B.xScale(B.xIndex),B.canvasX=B.x*B.model.canvasPixelRatio}),O$(C,R,u),C.filter(function(B){return Math.abs(I.xIndex-B.xIndex)!==0}).attr("transform",function(B){return P1(B.xScale(B.xIndex),0)}),bf.select(this).attr("transform",P1(I.x,0)),C.each(function(B,O,U){U===I.parent.key&&(R.dimensions[O]=B)}),R.contextLayer&&R.contextLayer.render(R.panels,!1,!N$(R)),R.focusLayer.render&&R.focusLayer.render(R.panels)}).on("dragend",function(I){var R=I.parent;I.x=I.xScale(I.xIndex),I.canvasX=I.x*I.model.canvasPixelRatio,O$(C,R,u),bf.select(this).attr("transform",function(B){return P1(B.x,0)}),R.contextLayer&&R.contextLayer.render(R.panels,!1,!N$(R)),R.focusLayer&&R.focusLayer.render(R.panels),R.pickLayer&&R.pickLayer.render(R.panels,!0),f.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(R.key,R.dimensions.map(function(B){return B.crossfilterDimensionIndex}))})),C.exit().remove();var k=C.selectAll("."+Fo.cn.axisOverlays).data(F1,Iv);k.enter().append("g").classed(Fo.cn.axisOverlays,!0),k.selectAll("."+Fo.cn.axis).remove();var S=k.selectAll("."+Fo.cn.axis).data(F1,Iv);S.enter().append("g").classed(Fo.cn.axis,!0),S.each(function(I){var R=I.model.height/I.model.tickDistance,B=I.domainScale,O=B.domain();bf.select(this).call(bf.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(R,I.tickFormat).tickValues(I.ordinal?O:null).tickFormat(function(U){return k5.isOrdinal(I)?U:lje(I.model.dimensions[I.visibleIndex],U)}).scale(B)),ZF.font(S.selectAll("text"),I.model.tickFont)}),S.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),S.selectAll("text").style("cursor","default");var L=k.selectAll("."+Fo.cn.axisHeading).data(F1,Iv);L.enter().append("g").classed(Fo.cn.axisHeading,!0);var w=L.selectAll("."+Fo.cn.axisTitle).data(F1,Iv);w.enter().append("text").classed(Fo.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",i?"none":"auto"),w.text(function(I){return I.label}).each(function(I){var R=bf.select(this);ZF.font(R,I.model.labelFont),PQt.convertToTspans(R,t)}).attr("transform",function(I){var R=eje(I.model.labelAngle,I.model.labelSide),B=Fo.axisTitleOffset;return(R.dir>0?"":P1(0,2*B+I.model.height))+LQt(R.degrees)+P1(-B*R.dx,-B*R.dy)}).attr("text-anchor",function(I){var R=eje(I.model.labelAngle,I.model.labelSide),B=Math.abs(R.dx),O=Math.abs(R.dy);return 2*B>O?R.dir*R.dx<0?"start":"end":"middle"});var T=k.selectAll("."+Fo.cn.axisExtent).data(F1,Iv);T.enter().append("g").classed(Fo.cn.axisExtent,!0);var A=T.selectAll("."+Fo.cn.axisExtentTop).data(F1,Iv);A.enter().append("g").classed(Fo.cn.axisExtentTop,!0),A.attr("transform",P1(0,-Fo.axisExtentOffset));var m=A.selectAll("."+Fo.cn.axisExtentTopText).data(F1,Iv);m.enter().append("text").classed(Fo.cn.axisExtentTopText,!0).call(QHe),m.text(function(I){return tje(I,!0)}).each(function(I){ZF.font(bf.select(this),I.model.rangeFont)});var F=T.selectAll("."+Fo.cn.axisExtentBottom).data(F1,Iv);F.enter().append("g").classed(Fo.cn.axisExtentBottom,!0),F.attr("transform",function(I){return P1(0,I.model.height+Fo.axisExtentOffset)});var E=F.selectAll("."+Fo.cn.axisExtentBottomText).data(F1,Iv);E.enter().append("text").classed(Fo.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(QHe),E.text(function(I){return tje(I,!1)}).each(function(I){ZF.font(bf.select(this),I.model.rangeFont)}),oje.ensureAxisBrush(k,c,t)}});var H$=fe((G$,vje)=>{"use strict";var GQt=cje(),HQt=RF(),fje=z$().isVisible,dje={};function hje(e,t,r){var n=t.indexOf(r),a=e.indexOf(n);return a===-1&&(a+=t.length),a}function jQt(e,t){return function(n,a){return hje(e,t,n)-hje(e,t,a)}}var G$=vje.exports=function(t,r){var n=t._fullLayout,a=HQt(t,[],dje);if(a){var i={},o={},s={},l=n._size;r.forEach(function(g,p){var _=g[0].trace,x=s[p]=_.index;i[p]=t.data[x].dimensions,o[p]=t.data[x].dimensions.slice()});var u=function(g,p,_){var x=o[g][p],y=_.map(function(T){return T.slice()}),C="dimensions["+p+"].constraintrange",k=n._tracePreGUI[t._fullData[s[g]].uid];if(k[C]===void 0){var S=x.constraintrange;k[C]=S||null}var L=t._fullData[s[g]].dimensions[p];y.length?(y.length===1&&(y=y[0]),x.constraintrange=y,L.constraintrange=y.slice(),y=[y]):(delete x.constraintrange,delete L.constraintrange,y=null);var w={};w[C]=y,t.emit("plotly_restyle",[w,[s[g]]])},c=function(g){t.emit("plotly_hover",g)},f=function(g){t.emit("plotly_unhover",g)},v=function(g,p){var _=jQt(p,o[g].filter(fje));i[g].sort(_),o[g].filter(function(x){return!fje(x)}).sort(function(x){return o[g].indexOf(x)}).forEach(function(x){i[g].splice(i[g].indexOf(x),1),i[g].splice(o[g].indexOf(x),0,x)}),t.emit("plotly_restyle",[{dimensions:[i[g]]},[s[g]]])};GQt(t,r,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{filterChanged:u,hover:c,unhover:f,axesMoved:v})}};G$.reglPrecompiled=dje});var gje=fe(HM=>{"use strict";var pje=xi(),WQt=jf().getModuleCalcData,YQt=H$(),XQt=ev();HM.name="parcoords";HM.plot=function(e){var t=WQt(e.calcdata,"parcoords")[0];t.length&&YQt(e,t)};HM.clean=function(e,t,r,n){var a=n._has&&n._has("parcoords"),i=t._has&&t._has("parcoords");a&&!i&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())};HM.toSVG=function(e){var t=e._fullLayout._glimages,r=pje.select(e).selectAll(".svg-container"),n=r.filter(function(i,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function a(){var i=this,o=i.toDataURL("image/png"),s=t.append("svg:image");s.attr({xmlns:XQt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:i.style.width,height:i.style.height})}n.each(a),window.setTimeout(function(){pje.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var yje=fe((qAr,mje)=>{"use strict";mje.exports={attributes:L$(),supplyDefaults:BHe(),calc:NHe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:gje(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var bje=fe((BAr,_je)=>{"use strict";var xje=yje();xje.plot=H$();_je.exports=xje});var Tje=fe((OAr,wje)=>{"use strict";wje.exports=bje()});var j$=fe((NAr,kje)=>{"use strict";var Mje=ta().extendFlat,ZQt=Ho(),Aje=Ds(),$Qt=_s(),{hovertemplateAttrs:Sje,templatefallbackAttrs:Eje}=Oo(),KQt=nl().attributes,JQt=Mje({editType:"calc"},$Qt("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:Sje({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:Eje({editType:"plot"})});kje.exports={domain:KQt({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:Mje({},ZQt.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:Sje({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:Eje({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:Aje({editType:"calc"}),tickfont:Aje({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:JQt,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}});var Pje=fe((UAr,Lje)=>{"use strict";var C5=Xt(),QQt=Wf().hasColorscale,eer=Vc(),ter=nl().defaults,rer=Ah(),Cje=j$(),ner=zF(),ier=Gf().isTypedArraySpec;function aer(e,t,r,n,a){a("line.shape"),a("line.hovertemplate"),a("line.hovertemplatefallback");var i=a("line.color",n.colorway[0]);if(QQt(e,"line")&&C5.isArrayOrTypedArray(i)){if(i.length)return a("line.colorscale"),eer(e,t,n,a,{prefix:"line.",cLetter:"c"}),i.length;t.line.color=r}return 1/0}function oer(e,t){function r(u,c){return C5.coerce(e,t,Cje.dimensions,u,c)}var n=r("values"),a=r("visible");if(n&&n.length||(a=t.visible=!1),a){r("label"),r("displayindex",t._index);var i=e.categoryarray,o=C5.isArrayOrTypedArray(i)&&i.length>0||ier(i),s;o&&(s="array");var l=r("categoryorder",s);l==="array"?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),!o&&l==="array"&&(t.categoryorder="trace")}}Lje.exports=function(t,r,n,a){function i(u,c){return C5.coerce(t,r,Cje,u,c)}var o=rer(t,r,{name:"dimensions",handleItemDefaults:oer}),s=aer(t,r,n,a,i);ter(r,a,i),(!Array.isArray(o)||!o.length)&&(r.visible=!1),ner(r,o,"values",s),i("hoveron"),i("hovertemplate"),i("hovertemplatefallback"),i("arrangement"),i("bundlecolors"),i("sortpaths"),i("counts");var l=a.font;C5.coerceFont(i,"labelfont",l,{overrideDflt:{size:Math.round(l.size)}}),C5.coerceFont(i,"tickfont",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var Dje=fe((VAr,Fje)=>{"use strict";var ser=L1().wrap,ler=Wf().hasColorscale,uer=Mh(),cer=Wq(),fer=Ji(),jM=Xt(),her=aa();Fje.exports=function(t,r){var n=jM.filterVisible(r.dimensions);if(n.length===0)return[];var a=n.map(function(m){var F;if(m.categoryorder==="trace")F=null;else if(m.categoryorder==="array")F=m.categoryarray;else{F=cer(m.values);for(var E=!0,I=0;I=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var Vje=fe((GAr,Uje)=>{"use strict";var Do=xi(),Ter=($x(),Gs(Zx)).interpolateNumber,Aer=Z8(),W$=ni(),XM=kl(),Iy=Xt(),WM=Iy.strTranslate,Rje=Ji(),Mer=as();function Ser(e,t,r,n){var a=t._context.staticPlot,i=e.map(Ver.bind(0,t,r)),o=n.selectAll("g.parcatslayer").data([null]);o.enter().append("g").attr("class","parcatslayer").style("pointer-events",a?"none":"all");var s=o.selectAll("g.trace.parcats").data(i,qg),l=s.enter().append("g").attr("class","trace parcats");s.attr("transform",function(C){return WM(C.x,C.y)}),l.append("g").attr("class","paths");var u=s.select("g.paths"),c=u.selectAll("path.path").data(function(C){return C.paths},qg);c.attr("fill",function(C){return C.model.color});var f=c.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(C){return C.model.color}).attr("fill-opacity",0);Z$(f),c.attr("d",function(C){return C.svgD}),f.empty()||c.sort(Y$),c.exit().remove(),c.on("mouseover",ker).on("mouseout",Cer).on("click",Ler),l.append("g").attr("class","dimensions");var v=s.select("g.dimensions"),g=v.selectAll("g.dimension").data(function(C){return C.dimensions},qg);g.enter().append("g").attr("class","dimension"),g.attr("transform",function(C){return WM(C.x,0)}),g.exit().remove();var p=g.selectAll("g.category").data(function(C){return C.categories},qg),_=p.enter().append("g").attr("class","category");p.attr("transform",function(C){return WM(0,C.y)}),_.append("rect").attr("class","catrect").attr("pointer-events","none"),p.select("rect.catrect").attr("fill","none").attr("width",function(C){return C.width}).attr("height",function(C){return C.height}),zje(_);var x=p.selectAll("rect.bandrect").data(function(C){return C.bands},qg);x.each(function(){Iy.raiseToTop(this)}),x.attr("fill",function(C){return C.color});var y=x.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(C){return C.color}).attr("fill-opacity",0);x.attr("fill",function(C){return C.color}).attr("width",function(C){return C.width}).attr("height",function(C){return C.height}).attr("y",function(C){return C.y}).attr("cursor",function(C){return C.parcatsViewModel.arrangement==="fixed"?"default":C.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),K$(y),x.exit().remove(),_.append("text").attr("class","catlabel").attr("pointer-events","none"),p.select("text.catlabel").attr("text-anchor",function(C){return YM(C)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(C){return YM(C)?C.width+5:-5}).attr("y",function(C){return C.height/2}).text(function(C){return C.model.categoryLabel}).each(function(C){Rje.font(Do.select(this),C.parcatsViewModel.categorylabelfont),Mer.convertToTspans(Do.select(this),t)}),_.append("text").attr("class","dimlabel"),p.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(C){return C.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(C){return C.width/2}).attr("y",-5).text(function(C,k){return k===0?C.parcatsViewModel.model.dimensions[C.model.dimensionInd].dimensionLabel:null}).each(function(C){Rje.font(Do.select(this),C.parcatsViewModel.labelfont)}),p.selectAll("rect.bandrect").on("mouseover",qer).on("mouseout",Ber),p.exit().remove(),g.call(Do.behavior.drag().origin(function(C){return{x:C.x,y:0}}).on("dragstart",Oer).on("drag",Ner).on("dragend",Uer)),s.each(function(C){C.traceSelection=Do.select(this),C.pathSelection=Do.select(this).selectAll("g.paths").selectAll("path.path"),C.dimensionSelection=Do.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}Uje.exports=function(e,t,r,n){Ser(r,e,n,t)};function qg(e){return e.key}function YM(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function Y$(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColora)return 1;if(n!==a){var i=isNaN(n),o=isNaN(a);if(i!==o)return i?1:-1}}return e.length-t.length}function ker(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){Iy.raiseToTop(this),$$(Do.select(this));var t=ZM(e),r=X$(e);if(e.parcatsViewModel.graphDiv.emit("plotly_hover",{points:t,event:Do.event,constraints:r}),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var n=Do.mouse(this)[0],a=e.parcatsViewModel.graphDiv,i=e.parcatsViewModel.trace,o=a._fullLayout,s=o._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.graphDiv.getBoundingClientRect(),u,c,f;for(f=0;f"),w=Do.mouse(a)[0];XM.loneHover({trace:i,x:p-s.left+l.left,y:_-s.top+l.top,text:L,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:x,idealAlign:wW$.mostReadable(t.model.color)).attr("stroke-width",.3)}function Per(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function zje(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function Fer(e){e.attr("stroke","black").attr("stroke-width",1.5)}function K$(e){e.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function KF(e){var t=e.parcatsViewModel.pathSelection,r=e.categoryViewModel.model.dimensionInd,n=e.categoryViewModel.model.categoryInd;return t.filter(function(a){return a.model.categoryInds[r]===n&&a.model.color===e.color})}function Der(e){var t=Do.select(e.parentNode).selectAll("rect.bandrect");t.each(function(r){var n=KF(r);$$(n),n.each(function(){Iy.raiseToTop(this)})}),Per(Do.select(e.parentNode))}function Rer(e){var t=Do.select(e).datum(),r=KF(t);$$(r),r.each(function(){Iy.raiseToTop(this)}),Do.select(e.parentNode).selectAll("rect.bandrect").filter(function(n){return n.color===t.color}).each(function(){Iy.raiseToTop(this),Fer(Do.select(this))})}function J$(e,t,r){var n=Do.select(e).datum(),a=n.categoryViewModel.model,i=n.parcatsViewModel.graphDiv,o=Do.select(e.parentNode).selectAll("rect.bandrect"),s=[];o.each(function(u){var c=KF(u);c.each(function(f){Array.prototype.push.apply(s,ZM(f))})});var l={};l[a.dimensionInd]=a.categoryValue,i.emit(t,{points:s,event:r,constraints:l})}function Q$(e,t,r){var n=Do.select(e).datum(),a=n.categoryViewModel.model,i=n.parcatsViewModel.graphDiv,o=KF(n),s=[];o.each(function(u){Array.prototype.push.apply(s,ZM(u))});var l={};l[a.dimensionInd]=a.categoryValue,n.rawColor!==void 0&&(l.color=n.rawColor),i.emit(t,{points:s,event:r,constraints:l})}function qje(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,a=e._fullLayout._invScaleY,i=Do.select(r.parentNode).select("rect.catrect"),o=i.node().getBoundingClientRect(),s=i.datum(),l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=o.top+o.height/2,v,g;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(v=o.left,g="left"):(v=o.left+o.width,g="right");var p=s.model.count,_=s.model.categoryLabel,x=p/s.parcatsViewModel.model.count,y={countLabel:p,categoryLabel:_,probabilityLabel:x.toFixed(3)},C=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&C.push(["Count:",y.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&C.push(["P("+y.categoryLabel+"):",y.probabilityLabel].join(" "));var k=C.join("
");return{trace:c,x:n*(v-t.left),y:a*(f-t.top),text:k,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:g,hovertemplate:c.hovertemplate,hovertemplateLabels:y,eventData:[{data:c._input,fullData:c,count:p,category:_,probability:x}]}}function Ier(e,t,r){var n=[];return Do.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var a=this;n.push(qje(e,t,a))}),n}function zer(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,a=e._fullLayout._invScaleY,i=r.getBoundingClientRect(),o=Do.select(r).datum(),s=o.categoryViewModel,l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=i.y+i.height/2,v,g;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(v=i.left,g="left"):(v=i.left+i.width,g="right");var p=s.model.categoryLabel,_=o.parcatsViewModel.model.count,x=0;o.categoryViewModel.bands.forEach(function(F){F.color===o.color&&(x+=F.count)});var y=s.model.count,C=0;l.pathSelection.each(function(F){F.model.color===o.color&&(C+=F.model.count)});var k=x/_,S=x/C,L=x/y,w={countLabel:x,categoryLabel:p,probabilityLabel:k.toFixed(3)},T=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&T.push(["Count:",w.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(T.push("P(color \u2229 "+p+"): "+w.probabilityLabel),T.push("P("+p+" | color): "+S.toFixed(3)),T.push("P(color | "+p+"): "+L.toFixed(3)));var A=T.join("
"),m=W$.mostReadable(o.color);return{trace:c,x:n*(v-t.left),y:a*(f-t.top),text:A,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:m,fontSize:10,idealAlign:g,hovertemplate:c.hovertemplate,hovertemplateLabels:w,eventData:[{data:c._input,fullData:c,category:p,count:_,probability:k,categorycount:y,colorcount:C,bandcolorcount:x}]}}function qer(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=Do.mouse(this)[1];if(t<-1)return;var r=e.parcatsViewModel.graphDiv,n=r._fullLayout,a=n._paperdiv.node().getBoundingClientRect(),i=e.parcatsViewModel.hoveron,o=this;if(i==="color"?(Rer(o),Q$(o,"plotly_hover",Do.event)):(Der(o),J$(o,"plotly_hover",Do.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;i==="category"?s=qje(r,a,o):i==="color"?s=zer(r,a,o):i==="dimension"&&(s=Ier(r,a,o)),s&&XM.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function Ber(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(Z$(t.pathSelection),zje(t.dimensionSelection.selectAll("g.category")),K$(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),XM.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(Y$),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r==="color"?Q$(n,"plotly_unhover",Do.event):J$(n,"plotly_unhover",Do.event)}}function Oer(e){e.parcatsViewModel.arrangement!=="fixed"&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,Do.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=Do.mouse(this)[0],n=Do.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=n&&n<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(a){return a.displayInd}),t.model.dragY=t.y,Iy.raiseToTop(this.parentNode),Do.select(this.parentNode).selectAll("rect.bandrect").each(function(a){a.yc.y+c.height/2&&(i.model.displayInd=c.model.displayInd,c.model.displayInd=s),e.dragCategoryDisplayInd=i.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement==="freeform"){a.model.dragX=Do.event.x;var f=e.parcatsViewModel.dimensions[r],v=e.parcatsViewModel.dimensions[n];f!==void 0&&a.model.dragXv.x&&(a.model.displayInd=v.model.displayInd,v.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=a.model.displayInd}tK(e.parcatsViewModel),eK(e.parcatsViewModel),Nje(e.parcatsViewModel),Oje(e.parcatsViewModel)}}function Uer(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){Do.select(this).selectAll("text").attr("font-weight","normal");var t={},r=Bje(e.parcatsViewModel),n=e.parcatsViewModel.model.dimensions.map(function(v){return v.displayInd}),a=e.initialDragDimensionDisplayInds.some(function(v,g){return v!==n[g]});a&&n.forEach(function(v,g){var p=e.parcatsViewModel.model.dimensions[g].containerInd;t["dimensions["+p+"].displayindex"]=v});var i=!1;if(e.dragCategoryDisplayInd!==null){var o=e.model.categories.map(function(v){return v.displayInd});if(i=e.initialDragCategoryDisplayInds.some(function(v,g){return v!==o[g]}),i){var s=e.model.categories.slice().sort(function(v,g){return v.displayInd-g.displayInd}),l=s.map(function(v){return v.categoryValue}),u=s.map(function(v){return v.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[l],t["dimensions["+e.model.containerInd+"].ticktext"]=[u],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron==="color"?Q$(e.potentialClickBand,"plotly_click",Do.event.sourceEvent):J$(e.potentialClickBand,"plotly_click",Do.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var c=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];c.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,tK(e.parcatsViewModel),eK(e.parcatsViewModel);var f=Do.transition().duration(300).ease("cubic-in-out");f.each(function(){Nje(e.parcatsViewModel,!0),Oje(e.parcatsViewModel,!0)}).each("end",function(){(a||i)&&Aer.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function Bje(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;l--)u+="C"+o[l]+","+(t[l+1]+n)+" "+i[l]+","+(t[l]+n)+" "+(e[l]+r[l])+","+(t[l]+n),u+="l-"+r[l]+",0 ";return u+="Z",u}function eK(e){var t=e.dimensions,r=e.model,n=t.map(function(R){return R.categories.map(function(B){return B.y})}),a=e.model.dimensions.map(function(R){return R.categories.map(function(B){return B.displayInd})}),i=e.model.dimensions.map(function(R){return R.displayInd}),o=e.dimensions.map(function(R){return R.model.dimensionInd}),s=t.map(function(R){return R.x}),l=t.map(function(R){return R.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(R){var B=R.categoryInds.map(function(U,j){return a[j][U]}),O=o.map(function(U){return B[U]});return O}u.sort(function(R,B){var O=f(R),U=f(B);return e.sortpaths==="backward"&&(O.reverse(),U.reverse()),O.push(R.valueInds[0]),U.push(B.valueInds[0]),e.bundlecolors&&(O.unshift(R.rawColor),U.unshift(B.rawColor)),Eer(O,U)});for(var v=new Array(u.length),g=t[0].model.count,p=t[0].categories.map(function(R){return R.height}).reduce(function(R,B){return R+B}),_=0;_0?y=p*(x.count/g):y=0;for(var C=new Array(n.length),k=0;k1?o=(e.width-2*r-n)/(a-1):o=0,s=r,l=s+o*i;var u=[],c=e.model.maxCats,f=t.categories.length,v=8,g=t.count,p=e.height-v*(c-1),_,x,y,C,k,S=(c-f)*v/2,L=t.categories.map(function(w){return{displayInd:w.displayInd,categoryInd:w.categoryInd}});for(L.sort(function(w,T){return w.displayInd-T.displayInd}),k=0;k0?_=x.count/g*p:_=0,y={key:x.valueInds[0],model:x,width:n,height:_,y:x.dragY!==null?x.dragY:S,bands:[],parcatsViewModel:e},S=S+_+v,u.push(y);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:l,y:0,width:n,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var rK=fe((HAr,Gje)=>{"use strict";var Her=Vje();Gje.exports=function(t,r,n,a){var i=t._fullLayout,o=i._paper,s=i._size;Her(t,o,r,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},n,a)}});var jje=fe(JF=>{"use strict";var jer=jf().getModuleCalcData,Wer=rK(),Hje="parcats";JF.name=Hje;JF.plot=function(e,t,r,n){var a=jer(e.calcdata,Hje);if(a.length){var i=a[0];Wer(e,i,r,n)}};JF.clean=function(e,t,r,n){var a=n._has&&n._has("parcats"),i=t._has&&t._has("parcats");a&&!i&&n._paperdiv.selectAll(".parcats").remove()}});var Yje=fe((WAr,Wje)=>{"use strict";Wje.exports={attributes:j$(),supplyDefaults:Pje(),calc:Dje(),plot:rK(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:jje(),categories:["noOpacity"],meta:{}}});var Zje=fe((YAr,Xje)=>{"use strict";Xje.exports=Yje()});var Kje=fe((XAr,$je)=>{"use strict";$je.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} @@ -2719,10 +2719,10 @@ void main() { {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} -{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}});var Jje=fe((YAr,Kje)=>{"use strict";Kje.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"}}]}});var zy=fe((XAr,nWe)=>{"use strict";var jer=(bx(),Gs(_x)).default,Wer=$je(),Yer=Jje(),Xer='\xA9 OpenStreetMap contributors',Qje="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",eWe="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",QF="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",Zer="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",$er="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",Ker="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",rWe={basic:QF,streets:QF,outdoors:QF,light:Qje,dark:eWe,satellite:Yer,"satellite-streets":Wer,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:Xer,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":Qje,"carto-darkmatter":eWe,"carto-voyager":QF,"carto-positron-nolabels":Zer,"carto-darkmatter-nolabels":$er,"carto-voyager-nolabels":Ker},tWe=jer(rWe);nWe.exports={styleValueDflt:"basic",stylesMap:rWe,styleValuesMap:tWe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",tWe.join(", "),"or use a tile service."].join(` -`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}});var ZM=fe((ZAr,lWe)=>{"use strict";var iWe=Xt(),aWe=ni().defaultLine,Jer=nl().attributes,Qer=Ds(),etr=Ol().textposition,ttr=rl().overrideAll,rtr=Mo().templatedArray,oWe=zy(),sWe=Qer({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});sWe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var ntr=lWe.exports=ttr({_arrayAttrRegexps:[iWe.counterRegex("map",".layers",!0)],domain:Jer({name:"map"}),style:{valType:"any",values:oWe.styleValuesMap,dflt:oWe.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:rtr("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:aWe},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:aWe}},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:sWe,textposition:iWe.extendFlat({},etr,{arrayOk:!1})}})},"plot","from-root");ntr.uirevision={valType:"any",editType:"none"}});var eD=fe(($Ar,hWe)=>{"use strict";var{hovertemplateAttrs:itr,texttemplateAttrs:atr,templatefallbackAttrs:uWe}=Oo(),otr=n1(),$M=a5(),C5=Ol(),cWe=ZM(),str=Ho(),ltr=_s(),p_=ta().extendFlat,utr=rl().overrideAll,ctr=ZM(),fWe=$M.line,L5=$M.marker;hWe.exports=utr({lon:$M.lon,lat:$M.lat,cluster:{enabled:{valType:"boolean"},maxzoom:p_({},ctr.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:p_({},L5.opacity,{dflt:1})},mode:p_({},C5.mode,{dflt:"markers"}),text:p_({},C5.text,{}),texttemplate:atr({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:uWe({editType:"plot"}),hovertext:p_({},C5.hovertext,{}),line:{color:fWe.color,width:fWe.width},connectgaps:C5.connectgaps,marker:p_({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:L5.opacity,size:L5.size,sizeref:L5.sizeref,sizemin:L5.sizemin,sizemode:L5.sizemode},ltr("marker")),fill:$M.fill,fillcolor:otr(),textfont:cWe.layers.symbol.textfont,textposition:cWe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:C5.selected.marker},unselected:{marker:C5.unselected.marker},hoverinfo:p_({},str.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:itr(),hovertemplatefallback:uWe()},"calc","nested")});var nK=fe((KAr,dWe)=>{"use strict";var ftr=["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"];dWe.exports={isSupportedFont:function(e){return ftr.indexOf(e)!==-1}}});var gWe=fe((JAr,pWe)=>{"use strict";var KM=Xt(),iK=Is(),htr=vv(),dtr=lp(),vtr=up(),ptr=a1(),vWe=eD(),gtr=nK().isSupportedFont;pWe.exports=function(t,r,n,a){function i(y,C){return KM.coerce(t,r,vWe,y,C)}function o(y,C){return KM.coerce2(t,r,vWe,y,C)}var s=mtr(t,r,i);if(!s){r.visible=!1;return}if(i("text"),i("texttemplate"),i("texttemplatefallback"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("mode"),i("below"),iK.hasMarkers(r)){htr(t,r,n,a,i,{noLine:!0,noAngle:!0}),i("marker.allowoverlap"),i("marker.angle");var l=r.marker;l.symbol!=="circle"&&(KM.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),KM.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}iK.hasLines(r)&&(dtr(t,r,n,a,i,{noDash:!0}),i("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||n),v=o("cluster.size"),g=o("cluster.opacity"),p=u!==!1||c!==!1||f!==!1||v!==!1||g!==!1,x=i("cluster.enabled",p);if(x||iK.hasText(r)){var _=a.font.family;vtr(t,r,a,i,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:gtr(_)?_:"Open Sans Regular",weight:a.font.weight,style:a.font.style,size:a.font.size,color:a.font.color}})}i("fill"),r.fill!=="none"&&ptr(t,r,n,i),KM.coerceSelectionMarkerOpacity(r,i)};function mtr(e,t,r){var n=r("lon")||[],a=r("lat")||[],i=Math.min(n.length,a.length);return t._length=i,i}});var aK=fe((QAr,yWe)=>{"use strict";var mWe=Yi();yWe.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot,o=i.mockAxis,s=t.lonlat;return a.lonLabel=mWe.tickText(o,o.c2l(s[0]),!0).text,a.latLabel=mWe.tickText(o,o.c2l(s[1]),!0).text,a}});var oK=fe((e6r,_We)=>{"use strict";var xWe=Xt();_We.exports=function(t,r){var n=t.split(" "),a=n[0],i=n[1],o=xWe.isArrayOrTypedArray(r)?xWe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(a){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(i){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var SWe=fe((t6r,MWe)=>{"use strict";var TWe=aa(),nh=Xt(),ytr=Wa().BADNUM,rD=cM(),bWe=js(),xtr=ea(),_tr=lT(),nD=Is(),btr=nK().isSupportedFont,wtr=oK(),Ttr=Sd().appendArrayPointValue,Atr=as().NEWLINES,Mtr=as().BR_TAG_ALL;MWe.exports=function(t,r){var n=r[0].trace,a=n.visible===!0&&n._length!==0,i=n.fill!=="none",o=nD.hasLines(n),s=nD.hasMarkers(n),l=nD.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,v=tD("fill"),g=tD("line"),p=tD("circle"),x=tD("symbol"),_={fill:v,line:g,circle:p,symbol:x};if(!a)return _;var y;if((i||o)&&(y=rD.calcTraceToLineCoords(r)),i&&(v.geojson=rD.makePolygon(y),v.layout.visibility="visible",nh.extendFlat(v.paint,{"fill-color":n.fillcolor})),o&&(g.geojson=rD.makeLine(y),g.layout.visibility="visible",nh.extendFlat(g.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var C=Str(r);p.geojson=C.geojson,p.layout.visibility="visible",f&&(p.filter=["!",["has","point_count"]],_.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":lK(n.cluster.color,n.cluster.step),"circle-radius":lK(n.cluster.size,n.cluster.step),"circle-opacity":lK(n.cluster.opacity,n.cluster.step)}},_.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":wWe(n),"text-size":12}}),nh.extendFlat(p.paint,{"circle-color":C.mcc,"circle-radius":C.mrc,"circle-opacity":C.mo})}if(u&&f&&(p.filter=["!",["has","point_count"]]),(c||l)&&(x.geojson=Etr(r,t),nh.extendFlat(x.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),c&&(nh.extendFlat(x.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&nh.extendFlat(x.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),x.layout["icon-allow-overlap"]=n.marker.allowoverlap,nh.extendFlat(x.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color,"icon-halo-color":n.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),l)){var k=(n.marker||{}).size,S=wtr(n.textposition,k);nh.extendFlat(x.layout,{"text-size":n.textfont.size,"text-anchor":S.anchor,"text-offset":S.offset,"text-font":wWe(n)}),nh.extendFlat(x.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return _};function tD(e){return{type:e,geojson:rD.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function Str(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,a=nh.isArrayOrTypedArray(r.color),i=nh.isArrayOrTypedArray(r.size),o=nh.isArrayOrTypedArray(r.opacity),s;function l(k){return t.opacity*k}function u(k){return k/2}var c;a&&(bWe.hasColorscale(t,"marker")?c=bWe.makeColorScaleFuncFromTrace(r):c=nh.identity);var f;i&&(f=_tr(t));var v;o&&(v=function(k){var S=TWe(k)?+nh.constrain(k,0,1):0;return l(S)});var g=[];for(s=0;s850?s+=" Black":a>750?s+=" Extra Bold":a>650?s+=" Bold":a>550?s+=" Semi Bold":a>450?s+=" Medium":a>350?s+=" Regular":a>250?s+=" Light":a>150?s+=" Extra Light":s+=" Thin"):i.slice(0,2).join(" ")==="Open Sans"?(s="Open Sans",a>750?s+=" Extrabold":a>650?s+=" Bold":a>550?s+=" Semibold":a>350?s+=" Regular":s+=" Light"):i.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(s="Klokantech Noto Sans",i[3]==="CJK"&&(s+=" CJK"),s+=a>500?" Bold":" Regular")),o&&(s+=" Italic"),s==="Open Sans Regular Italic"?s="Open Sans Italic":s==="Open Sans Regular Bold"?s="Open Sans Bold":s==="Open Sans Regular Bold Italic"?s="Open Sans Bold Italic":s==="Klokantech Noto Sans Regular Italic"&&(s="Klokantech Noto Sans Italic"),btr(s)||(s=r);var l=s.split(", ");return l}});var LWe=fe((r6r,CWe)=>{"use strict";var ktr=Xt(),EWe=SWe(),P5=zy().traceLayerPrefix,zv={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function kWe(e,t,r,n){this.type="scattermap",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:P5+t+"-fill",line:P5+t+"-line",circle:P5+t+"-circle",symbol:P5+t+"-symbol",cluster:P5+t+"-cluster",clusterCount:P5+t+"-cluster-count"},this.below=null}var JM=kWe.prototype;JM.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&ktr.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var a=this.subplot.map.getSource(this.sourceIds[e]);a?a.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};JM.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};JM.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var a=this.layerIds[e],i,o=this.subplot.getMapLayers(),s=0;s=0;L--){var w=S[L];a.removeLayer(u.layerIds[w])}k||a.removeSource(u.sourceIds.circle)}function v(k){for(var S=zv.nonCluster,L=0;L=0;L--){var w=S[L];a.removeLayer(u.layerIds[w]),k||a.removeSource(u.sourceIds[w])}}function p(k){l?f(k):g(k)}function x(k){s?c(k):v(k)}function _(){for(var k=s?zv.cluster:zv.nonCluster,S=0;S=0;n--){var a=r[n];t.removeLayer(this.layerIds[a]),t.removeSource(this.sourceIds[a])}};CWe.exports=function(t,r){var n=r[0].trace,a=n.cluster&&n.cluster.enabled,i=n.visible!==!0,o=new kWe(t,n.uid,a,i),s=EWe(t.gd,r),l=o.below=t.belowLookup["trace-"+n.uid],u,c,f;if(a)for(o.addSource("circle",s.circle,n.cluster),u=0;u{"use strict";var Ctr=kl(),uK=Xt(),Ltr=_3(),Ptr=uK.fillText,Ftr=Wa().BADNUM,Dtr=zy().traceLayerPrefix;function Rtr(e,t,r){var n=e.cd,a=n[0].trace,i=e.xa,o=e.ya,s=e.subplot,l=[],u=Dtr+a.uid+"-circle",c=a.cluster&&a.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(T){return T.id})}var v=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),g=v*360,p=t-g;function x(T){var m=T.lonlat;if(m[0]===Ftr||c&&l.indexOf(T.i+1)===-1)return 1/0;var F=uK.modHalf(m[0],360),E=m[1],I=s.project([F,E]),R=I.x-i.c2p([p,E]),B=I.y-o.c2p([F,r]),O=Math.max(3,T.mrc||0);return Math.max(Math.sqrt(R*R+B*B)-O,1-3/O)}if(Ctr.getClosest(n,x,e),e.index!==!1){var _=n[e.index],y=_.lonlat,C=[uK.modHalf(y[0],360)+g,y[1]],k=i.c2p(C),S=o.c2p(C),L=_.mrc||1;e.x0=k-L,e.x1=k+L,e.y0=S-L,e.y1=S+L;var w={};w[a.subplot]={_subplot:s};var A=a._module.formatLabels(_,a,w);return e.lonLabel=A.lonLabel,e.latLabel=A.latLabel,e.color=Ltr(a,_),e.extraText=PWe(a,_,n[0].t.labels),e.hovertemplate=a.hovertemplate,[e]}}function PWe(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,a=n.split("+"),i=a.indexOf("all")!==-1,o=a.indexOf("lon")!==-1,s=a.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return i||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(i||a.indexOf("text")!==-1)&&Ptr(t,e,u),u.join("
")}FWe.exports={hoverPoints:Rtr,getExtraText:PWe}});var RWe=fe((i6r,DWe)=>{"use strict";DWe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var zWe=fe((a6r,IWe)=>{"use strict";var Itr=Xt(),ztr=Is(),{BADNUM:qtr}=Wa();IWe.exports=function(t,r){var c;let{cd:n,xaxis:a,yaxis:i}=t,{trace:o}=n[0];if(!ztr.hasMarkers(o))return[];if(r===!1){for(let f of n)f.selected=0;return[]}let s=(c=a._subplot)==null?void 0:c.map,l=s!=null&&s.getRenderWorldCopies()&&r.xmax>r.xmin?s.transform.worldSize:0,u=[];for(let f=0;f{(function(e,t){typeof cK=="object"&&typeof fK!="undefined"?fK.exports=t():(e=typeof globalThis!="undefined"?globalThis:e||self,e.maplibregl=t())})(cK,(function(){"use strict";var e={},t={};function r(a,i,o){if(t[a]=o,a==="index"){var s="var sharedModule = {}; ("+t.shared+")(sharedModule); ("+t.worker+")(sharedModule);",l={};return t.shared(l),t.index(e,l),typeof window!="undefined"&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([s],{type:"text/javascript"}))),e}}r("shared",["exports"],(function(a){"use strict";function i(M,h,b,D){return new(b||(b=Promise))((function(z,G){function X(Q){try{re(D.next(Q))}catch(he){G(he)}}function Z(Q){try{re(D.throw(Q))}catch(he){G(he)}}function re(Q){var he;Q.done?z(Q.value):(he=Q.value,he instanceof b?he:new b((function(oe){oe(he)}))).then(X,Z)}re((D=D.apply(M,h||[])).next())}))}function o(M,h){this.x=M,this.y=h}function s(M){return M&&M.__esModule&&Object.prototype.hasOwnProperty.call(M,"default")?M.default:M}var l,u;typeof SuppressedError=="function"&&SuppressedError,o.prototype={clone(){return new o(this.x,this.y)},add(M){return this.clone()._add(M)},sub(M){return this.clone()._sub(M)},multByPoint(M){return this.clone()._multByPoint(M)},divByPoint(M){return this.clone()._divByPoint(M)},mult(M){return this.clone()._mult(M)},div(M){return this.clone()._div(M)},rotate(M){return this.clone()._rotate(M)},rotateAround(M,h){return this.clone()._rotateAround(M,h)},matMult(M){return this.clone()._matMult(M)},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(M){return this.x===M.x&&this.y===M.y},dist(M){return Math.sqrt(this.distSqr(M))},distSqr(M){let h=M.x-this.x,b=M.y-this.y;return h*h+b*b},angle(){return Math.atan2(this.y,this.x)},angleTo(M){return Math.atan2(this.y-M.y,this.x-M.x)},angleWith(M){return this.angleWithSep(M.x,M.y)},angleWithSep(M,h){return Math.atan2(this.x*h-this.y*M,this.x*M+this.y*h)},_matMult(M){let h=M[2]*this.x+M[3]*this.y;return this.x=M[0]*this.x+M[1]*this.y,this.y=h,this},_add(M){return this.x+=M.x,this.y+=M.y,this},_sub(M){return this.x-=M.x,this.y-=M.y,this},_mult(M){return this.x*=M,this.y*=M,this},_div(M){return this.x/=M,this.y/=M,this},_multByPoint(M){return this.x*=M.x,this.y*=M.y,this},_divByPoint(M){return this.x/=M.x,this.y/=M.y,this},_unit(){return this._div(this.mag()),this},_perp(){let M=this.y;return this.y=this.x,this.x=-M,this},_rotate(M){let h=Math.cos(M),b=Math.sin(M),D=b*this.x+h*this.y;return this.x=h*this.x-b*this.y,this.y=D,this},_rotateAround(M,h){let b=Math.cos(M),D=Math.sin(M),z=h.y+D*(this.x-h.x)+b*(this.y-h.y);return this.x=h.x+b*(this.x-h.x)-D*(this.y-h.y),this.y=z,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:o},o.convert=function(M){if(M instanceof o)return M;if(Array.isArray(M))return new o(+M[0],+M[1]);if(M.x!==void 0&&M.y!==void 0)return new o(+M.x,+M.y);throw new Error("Expected [x, y] or {x, y} point format")};var c=(function(){if(u)return l;function M(h,b,D,z){this.cx=3*h,this.bx=3*(D-h)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*b,this.by=3*(z-b)-this.cy,this.ay=1-this.cy-this.by,this.p1x=h,this.p1y=b,this.p2x=D,this.p2y=z}return u=1,l=M,M.prototype={sampleCurveX:function(h){return((this.ax*h+this.bx)*h+this.cx)*h},sampleCurveY:function(h){return((this.ay*h+this.by)*h+this.cy)*h},sampleCurveDerivativeX:function(h){return(3*this.ax*h+2*this.bx)*h+this.cx},solveCurveX:function(h,b){if(b===void 0&&(b=1e-6),h<0)return 0;if(h>1)return 1;for(var D=h,z=0;z<8;z++){var G=this.sampleCurveX(D)-h;if(Math.abs(G)G?Z=D:re=D,D=.5*(re-Z)+Z;return D},solve:function(h,b){return this.sampleCurveY(this.solveCurveX(h,b))}},l})(),f=s(c);let v,g;function p(){return v!=null||(v=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),v}function x(){if(g==null&&(g=!1,p())){let h=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(h){for(let D=0;D<25;D++){let z=4*D;h.fillStyle=`rgb(${z},${z+1},${z+2})`,h.fillRect(D%5,Math.floor(D/5),1,1)}let b=h.getImageData(0,0,5,5).data;for(let D=0;D<100;D++)if(D%4!=3&&b[D]!==D){g=!0;break}}}return g||!1}var _=1e-6,y=typeof Float32Array!="undefined"?Float32Array:Array;function C(){var M=new y(9);return y!=Float32Array&&(M[1]=0,M[2]=0,M[3]=0,M[5]=0,M[6]=0,M[7]=0),M[0]=1,M[4]=1,M[8]=1,M}function k(M){return M[0]=1,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=1,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=1,M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M}function S(){var M=new y(3);return y!=Float32Array&&(M[0]=0,M[1]=0,M[2]=0),M}function L(M){var h=M[0],b=M[1],D=M[2];return Math.sqrt(h*h+b*b+D*D)}function w(M,h,b){var D=new y(3);return D[0]=M,D[1]=h,D[2]=b,D}function A(M,h,b){return M[0]=h[0]+b[0],M[1]=h[1]+b[1],M[2]=h[2]+b[2],M}function T(M,h,b){return M[0]=h[0]*b,M[1]=h[1]*b,M[2]=h[2]*b,M}function m(M,h,b){var D=h[0],z=h[1],G=h[2],X=b[0],Z=b[1],re=b[2];return M[0]=z*re-G*Z,M[1]=G*X-D*re,M[2]=D*Z-z*X,M}var F,E=L;function I(M,h,b){var D=h[0],z=h[1],G=h[2],X=h[3];return M[0]=b[0]*D+b[4]*z+b[8]*G+b[12]*X,M[1]=b[1]*D+b[5]*z+b[9]*G+b[13]*X,M[2]=b[2]*D+b[6]*z+b[10]*G+b[14]*X,M[3]=b[3]*D+b[7]*z+b[11]*G+b[15]*X,M}function R(){var M=new y(4);return y!=Float32Array&&(M[0]=0,M[1]=0,M[2]=0),M[3]=1,M}function B(M,h,b,D){var z=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",G=Math.PI/360;h*=G,D*=G,b*=G;var X=Math.sin(h),Z=Math.cos(h),re=Math.sin(b),Q=Math.cos(b),he=Math.sin(D),oe=Math.cos(D);switch(z){case"xyz":M[0]=X*Q*oe+Z*re*he,M[1]=Z*re*oe-X*Q*he,M[2]=Z*Q*he+X*re*oe,M[3]=Z*Q*oe-X*re*he;break;case"xzy":M[0]=X*Q*oe-Z*re*he,M[1]=Z*re*oe-X*Q*he,M[2]=Z*Q*he+X*re*oe,M[3]=Z*Q*oe+X*re*he;break;case"yxz":M[0]=X*Q*oe+Z*re*he,M[1]=Z*re*oe-X*Q*he,M[2]=Z*Q*he-X*re*oe,M[3]=Z*Q*oe+X*re*he;break;case"yzx":M[0]=X*Q*oe+Z*re*he,M[1]=Z*re*oe+X*Q*he,M[2]=Z*Q*he-X*re*oe,M[3]=Z*Q*oe-X*re*he;break;case"zxy":M[0]=X*Q*oe-Z*re*he,M[1]=Z*re*oe+X*Q*he,M[2]=Z*Q*he+X*re*oe,M[3]=Z*Q*oe-X*re*he;break;case"zyx":M[0]=X*Q*oe-Z*re*he,M[1]=Z*re*oe+X*Q*he,M[2]=Z*Q*he-X*re*oe,M[3]=Z*Q*oe+X*re*he;break;default:throw new Error("Unknown angle order "+z)}return M}function O(){var M=new y(2);return y!=Float32Array&&(M[0]=0,M[1]=0),M}function V(M,h){var b=new y(2);return b[0]=M,b[1]=h,b}S(),F=new y(4),y!=Float32Array&&(F[0]=0,F[1]=0,F[2]=0,F[3]=0),S(),w(1,0,0),w(0,1,0),R(),R(),C(),O();let j=8192;function q(M,h,b){return h*(j/(M.tileSize*Math.pow(2,b-M.tileID.overscaledZ)))}function U(M){return M instanceof Error?M:new Error(typeof M=="string"?M:String(M))}function J(M,h){return(M%h+h)%h}function ee(M,h,b){return M*(1-b)+h*b}function ce(M){if(M<=0)return 0;if(M>=1)return 1;let h=M*M,b=h*M;return 4*(M<.5?b:3*(M-h)+b-.75)}function ye(M,h,b,D){let z=new f(M,h,b,D);return G=>z.solve(G)}let xe=ye(.25,.1,.25,1);function ue(M,h,b){return Math.min(b,Math.max(h,M))}function K(M,h,b){let D=b-h,z=((M-h)%D+D)%D+h;return z===h?b:z}function _e(M,...h){for(let b of h)for(let D in b)M[D]=b[D];return M}let ne=1;function ae(M,h,b){let D={};for(let z in M)D[z]=h.call(this,M[z],z,M);return D}function pe(M,h,b){let D={};for(let z in M)h.call(this,M[z],z,M)&&(D[z]=M[z]);return D}function ie(M){return Array.isArray(M)?M.map(ie):typeof M=="object"&&M?ae(M,ie):M}let le={};function me(M){le[M]||(typeof console!="undefined"&&console.warn(M),le[M]=!0)}function be(M,h,b){return(b.y-M.y)*(h.x-M.x)>(h.y-M.y)*(b.x-M.x)}function De(M){return typeof WorkerGlobalScope!="undefined"&&M!==void 0&&M instanceof WorkerGlobalScope}let Ge=null;function ht(M){return typeof ImageBitmap!="undefined"&&M instanceof ImageBitmap}let it="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Oe(M,h,b,D,z){return i(this,void 0,void 0,(function*(){if(typeof VideoFrame=="undefined")throw new Error("VideoFrame not supported");let G=new VideoFrame(M,{timestamp:0});try{let X=G==null?void 0:G.format;if(!X||!X.startsWith("BGR")&&!X.startsWith("RGB"))throw new Error(`Unrecognized format ${X}`);let Z=X.startsWith("BGR"),re=new Uint8ClampedArray(D*z*4);if(yield G.copyTo(re,(function(Q,he,oe,ke,ge){let Ue=4*Math.max(-he,0),je=(Math.max(0,oe)-oe)*ke*4+Ue,vt=4*ke,gt=Math.max(0,he),It=Math.max(0,oe);return{rect:{x:gt,y:It,width:Math.min(Q.width,he+ke)-gt,height:Math.min(Q.height,oe+ge)-It},layout:[{offset:je,stride:vt}]}})(M,h,b,D,z)),Z)for(let Q=0;Q{M.removeEventListener(h,b,D)}}}function qe(M){return M*Math.PI/180}function we(M){return M/Math.PI*180}let Le={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},Ke={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},Te="AbortError";class Ve extends Error{constructor(h=Te){super(h instanceof Error?h.message:h),this.name=Te,h instanceof Error&&h.stack&&(this.stack=h.stack)}}function $e(M){return M instanceof Error&&M.name===Te}function ot(M){if(M.aborted)throw new Ve(M.reason)}let tt={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function nt(M){return tt.REGISTERED_PROTOCOLS[M.substring(0,M.indexOf("://"))]}let We="global-dispatcher";class mt extends Error{constructor(h,b,D,z){super(`AJAXError: ${b} (${h}): ${D}`),this.status=h,this.statusText=b,this.url=D,this.body=z}}let bt=()=>{var M;return De(self)?(M=self.worker)===null||M===void 0?void 0:M.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href},Yt=function(M,h){return i(this,void 0,void 0,(function*(){var b,D;if(M.url.includes("://")&&!/^https?:|^file:/.test(M.url)){let z=nt(M.url);if(z){let G=yield z(M,h);return G.data||M.type!=="arrayBuffer"?G:_e(G,{data:new ArrayBuffer(0)})}if(De(self)&&(!((b=self.worker)===null||b===void 0)&&b.actor))return self.worker.actor.sendAsync({type:"GR",data:M,targetMapId:We},h)}if(!(z=>{var G;return z.startsWith("file:")||((G=bt())===null||G===void 0?void 0:G.startsWith("file:"))&&!/^\w+:/.test(z)})(M.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return(function(z,G){return i(this,void 0,void 0,(function*(){let X=new Request(z.url,{method:z.method||"GET",body:z.body,credentials:z.credentials,headers:z.headers,cache:z.cache,referrer:bt(),referrerPolicy:z.referrerPolicy,signal:G.signal}),Z,re;z.type!=="json"||X.headers.has("Accept")||X.headers.set("Accept","application/json");try{Z=yield fetch(X)}catch(he){throw $e(he)?he:new mt(0,U(he).message,z.url,new Blob)}if(!Z.ok){let he=yield Z.blob();throw new mt(Z.status,Z.statusText,z.url,he)}re=z.type==="arrayBuffer"||z.type==="image"?Z.arrayBuffer():z.type==="json"?Z.json():Z.text();let Q=yield re;return ot(G.signal),{data:Q,cacheControl:Z.headers.get("Cache-Control"),expires:Z.headers.get("Expires"),etag:Z.headers.get("ETag")}}))})(M,h);if(De(self)&&(!((D=self.worker)===null||D===void 0)&&D.actor))return self.worker.actor.sendAsync({type:"GR",data:M,mustQueue:!0,targetMapId:We},h)}return(function(z,G){return new Promise(((X,Z)=>{var re;let Q=new XMLHttpRequest;Q.open(z.method||"GET",z.url,!0),z.type!=="arrayBuffer"&&z.type!=="image"||(Q.responseType="arraybuffer");for(let he in z.headers)Q.setRequestHeader(he,z.headers[he]);z.type==="json"&&(Q.responseType="text",!((re=z.headers)===null||re===void 0)&&re.Accept||Q.setRequestHeader("Accept","application/json")),Q.withCredentials=z.credentials==="include",Q.onerror=()=>{Z(new Error(Q.statusText))},Q.onload=()=>{if(!G.signal.aborted)if((Q.status>=200&&Q.status<300||Q.status===0)&&Q.response!==null){let he=Q.response;if(z.type==="json")try{he=JSON.parse(Q.response)}catch(oe){return void Z(oe)}X({data:he,cacheControl:Q.getResponseHeader("Cache-Control"),expires:Q.getResponseHeader("Expires"),etag:Q.getResponseHeader("ETag")})}else{let he=new Blob([Q.response],{type:Q.getResponseHeader("Content-Type")});Z(new mt(Q.status,Q.statusText,z.url,he))}},G.signal.addEventListener("abort",(()=>{Q.abort(),Z(new Ve(G.signal.reason))})),Q.send(z.body)}))})(M,h)}))};function jt(M){if(!M||M.indexOf("://")<=0||M.startsWith("data:image/")||M.startsWith("blob:"))return!0;let h=new URL(M),b=window.location;return h.protocol===b.protocol&&h.host===b.host}function mr(M,h,b){var D;!((D=b[M])===null||D===void 0)&&D.includes(h)||(b[M]||(b[M]=[]),b[M].push(h))}function or(M,h,b){if(b!=null&&b[M]){let D=b[M].indexOf(h);D!==-1&&b[M].splice(D,1)}}class fr{constructor(h,b={}){_e(this,b),this.type=h}}class Ot extends fr{constructor(h,b={}){super("error",_e({error:h},b))}}class cr{on(h,b){return this._listeners||(this._listeners={}),mr(h,b,this._listeners),{unsubscribe:()=>{this.off(h,b)}}}off(h,b){return or(h,b,this._listeners),or(h,b,this._oneTimeListeners),this}once(h,b){return b?(this._oneTimeListeners||(this._oneTimeListeners={}),mr(h,b,this._oneTimeListeners),this):new Promise((D=>this.once(h,D)))}fire(h,b){var D,z;typeof h=="string"&&(h=new fr(h,b||{}));let G=h.type;if(this.listens(G)){h.target=this;let X=!((D=this._listeners)===null||D===void 0)&&D[G]?this._listeners[G].slice():[];for(let Q of X)Q.call(this,h);let Z=!((z=this._oneTimeListeners)===null||z===void 0)&&z[G]?this._oneTimeListeners[G].slice():[];for(let Q of Z)or(G,Q,this._oneTimeListeners),Q.call(this,h);let re=this._eventedParent;re&&(_e(h,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),re.fire(h))}else h instanceof Ot&&console.error(h.error);return this}listens(h){var b,D,z,G,X;return((D=(b=this._listeners)===null||b===void 0?void 0:b[h])===null||D===void 0?void 0:D.length)>0||((G=(z=this._oneTimeListeners)===null||z===void 0?void 0:z[h])===null||G===void 0?void 0:G.length)>0||((X=this._eventedParent)===null||X===void 0?void 0:X.listens(h))}setEventedParent(h,b){return this._eventedParent=h,this._eventedParentData=b,this}}var Ct={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let wt=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Tt(M,h){let b={};for(let D in M)D!=="ref"&&(b[D]=M[D]);return wt.forEach((D=>{D in h&&(b[D]=h[D])})),b}function Mt(M,h){if(Array.isArray(M)){if(!Array.isArray(h)||M.length!==h.length)return!1;for(let b=0;b`:M.itemType.kind==="value"?"array":`array<${h}>`}return M.kind}let oa=[Dt,At,Vt,Qt,Ut,_r,ri,rn,va(Jr),Jn,Vi,Ii,ra,ha];function Ma(M,h){if(h.kind==="error")return null;if(M.kind==="array"){if(h.kind==="array"&&(h.N===0&&h.itemType.kind==="value"||!Ma(M.itemType,h.itemType))&&(typeof M.N!="number"||M.N===h.N))return null}else{if(M.kind===h.kind)return null;if(M.kind==="value"){for(let b of oa)if(!Ma(b,h))return null}}return`Expected ${Xi(M)} but found ${Xi(h)} instead.`}function Ga(M,h){return h.some((b=>b.kind===M.kind))}function ss(M,h){return h.some((b=>b==="null"?M===null:b==="array"?Array.isArray(M):b==="object"?M&&!Array.isArray(M)&&typeof M=="object":b===typeof M))}function mo(M,h){return M.kind==="array"&&h.kind==="array"?M.itemType.kind===h.itemType.kind&&typeof M.N=="number":M.kind===h.kind}let sl=.96422,Eo=.82521,ao=4/29,Da=6/29,bl=3*Da*Da,bo=Da*Da*Da,Zs=Math.PI/180,su=180/Math.PI;function fc(M){return(M%=360)<0&&(M+=360),M}function Af([M,h,b,D]){let z,G,X=Jt((.2225045*(M=ut(M))+.7168786*(h=ut(h))+.0606169*(b=ut(b)))/1);M===h&&h===b?z=G=X:(z=Jt((.4360747*M+.3850649*h+.1430804*b)/sl),G=Jt((.0139322*M+.0971045*h+.7141733*b)/Eo));let Z=116*X-16;return[Z<0?0:Z,500*(z-X),200*(X-G),D]}function ut(M){return M<=.04045?M/12.92:Math.pow((M+.055)/1.055,2.4)}function Jt(M){return M>bo?Math.pow(M,1/3):M/bl+ao}function er([M,h,b,D]){let z=(M+16)/116,G=isNaN(h)?z:z+h/500,X=isNaN(b)?z:z-b/200;return z=1*nn(z),G=sl*nn(G),X=Eo*nn(X),[wr(3.1338561*G-1.6168667*z-.4906146*X),wr(-.9787684*G+1.9161415*z+.033454*X),wr(.0719453*G-.2289914*z+1.4052427*X),D]}function wr(M){return(M=M<=.00304?12.92*M:1.055*Math.pow(M,1/2.4)-.055)<0?0:M>1?1:M}function nn(M){return M>Da?M*M*M:bl*(M-ao)}let Dr=Object.hasOwn||function(M,h){return Object.prototype.hasOwnProperty.call(M,h)};function bn(M,h){return Dr(M,h)?M[h]:void 0}function Yr(M){return parseInt(M.padEnd(2,M),16)/255}function Tn(M,h){return Kn(h?M/100:M,0,1)}function Kn(M,h,b){return Math.min(Math.max(h,M),b)}function Qn(M){return!M.some(Number.isNaN)}let Ai={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 Ji(M,h,b){return M+b*(h-M)}function Ra(M,h,b){return M.map(((D,z)=>Ji(D,h[z],b)))}class ii{constructor(h,b,D,z=1,G=!0){this.r=h,this.g=b,this.b=D,this.a=z,G||(this.r*=z,this.g*=z,this.b*=z,z||this.overwriteGetter("rgb",[h,b,D,z]))}static parse(h){if(h instanceof ii)return h;if(typeof h!="string")return;let b=(function(D){if((D=D.toLowerCase().trim())==="transparent")return[0,0,0,0];let z=bn(Ai,D);if(z){let[X,Z,re]=z;return[X/255,Z/255,re/255,1]}if(D.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(D)){let X=D.length<6?1:2,Z=1;return[Yr(D.slice(Z,Z+=X)),Yr(D.slice(Z,Z+=X)),Yr(D.slice(Z,Z+=X)),Yr(D.slice(Z,Z+X)||"ff")]}if(D.startsWith("rgb")){let X=D.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(X){let[Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It]=X,_t=[he||" ",ge||" ",vt].join("");if(_t===" "||_t===" /"||_t===",,"||_t===",,,"){let qt=[Q,ke,je].join(""),tr=qt==="%%%"?100:qt===""?255:0;if(tr){let lr=[Kn(+re/tr,0,1),Kn(+oe/tr,0,1),Kn(+Ue/tr,0,1),gt?Tn(+gt,It):1];if(Qn(lr))return lr}}return}}let G=D.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(G){let[X,Z,re,Q,he,oe,ke,ge,Ue]=G,je=[re||" ",he||" ",ke].join("");if(je===" "||je===" /"||je===",,"||je===",,,"){let vt=[+Z,Kn(+Q,0,100),Kn(+oe,0,100),ge?Tn(+ge,Ue):1];if(Qn(vt))return(function([gt,It,_t,qt]){function tr(lr){let qr=(lr+gt/30)%12,jr=It*Math.min(_t,1-_t);return _t-jr*Math.max(-1,Math.min(qr-3,9-qr,1))}return gt=fc(gt),It/=100,_t/=100,[tr(0),tr(8),tr(4),qt]})(vt)}}})(h);return b?new ii(...b,!1):void 0}get rgb(){let{r:h,g:b,b:D,a:z}=this,G=z||1/0;return this.overwriteGetter("rgb",[h/G,b/G,D/G,z])}get hcl(){return this.overwriteGetter("hcl",(function(h){let[b,D,z,G]=Af(h),X=Math.sqrt(D*D+z*z);return[Math.round(1e4*X)?fc(Math.atan2(z,D)*su):NaN,X,b,G]})(this.rgb))}get lab(){return this.overwriteGetter("lab",Af(this.rgb))}overwriteGetter(h,b){return Object.defineProperty(this,h,{value:b}),b}toString(){let[h,b,D,z]=this.rgb;return`rgba(${[h,b,D].map((G=>Math.round(255*G))).join(",")},${z})`}static interpolate(h,b,D,z="rgb"){switch(z){case"rgb":{let[G,X,Z,re]=Ra(h.rgb,b.rgb,D);return new ii(G,X,Z,re,!1)}case"hcl":{let[G,X,Z,re]=h.hcl,[Q,he,oe,ke]=b.hcl,ge,Ue;if(isNaN(G)||isNaN(Q))isNaN(G)?isNaN(Q)?ge=NaN:(ge=Q,Z!==1&&Z!==0||(Ue=he)):(ge=G,oe!==1&&oe!==0||(Ue=X));else{let _t=Q-G;Q>G&&_t>180?_t-=360:Q180&&(_t+=360),ge=G+D*_t}let[je,vt,gt,It]=(function([_t,qt,tr,lr]){return _t=isNaN(_t)?0:_t*Zs,er([tr,Math.cos(_t)*qt,Math.sin(_t)*qt,lr])})([ge,Ue!=null?Ue:Ji(X,he,D),Ji(Z,oe,D),Ji(re,ke,D)]);return new ii(je,vt,gt,It,!1)}case"lab":{let[G,X,Z,re]=er(Ra(h.lab,b.lab,D));return new ii(G,X,Z,re,!1)}}}}ii.black=new ii(0,0,0,1),ii.white=new ii(1,1,1,1),ii.transparent=new ii(0,0,0,0),ii.red=new ii(1,0,0,1);class Za{constructor(h,b,D){this.sensitivity=h?b?"variant":"case":b?"accent":"base",this.locale=D,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(h,b){return this.collator.compare(h,b)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let ja=["bottom","center","top"];class qo{constructor(h,b,D,z,G,X){this.text=h,this.image=b,this.scale=D,this.fontStack=z,this.textColor=G,this.verticalAlign=X}}class $a{constructor(h){this.sections=h}static fromString(h){return new $a([new qo(h,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some((h=>h.text.length!==0||h.image&&h.image.name.length!==0))}static factory(h){return h instanceof $a?h:$a.fromString(h)}toString(){return this.sections.length===0?"":this.sections.map((h=>h.text)).join("")}}class Ka{constructor(h){this.values=h.slice()}static parse(h){if(h instanceof Ka)return h;if(typeof h=="number")return new Ka([h,h,h,h]);if(Array.isArray(h)&&!(h.length<1||h.length>4)){for(let b of h)if(typeof b!="number")return;switch(h.length){case 1:h=[h[0],h[0],h[0],h[0]];break;case 2:h=[h[0],h[1],h[0],h[1]];break;case 3:h=[h[0],h[1],h[2],h[1]]}return new Ka(h)}}toString(){return JSON.stringify(this.values)}static interpolate(h,b,D){return new Ka(Ra(h.values,b.values,D))}}class Oa{constructor(h){this.values=h.slice()}static parse(h){if(h instanceof Oa)return h;if(typeof h=="number")return new Oa([h]);if(Array.isArray(h)){for(let b of h)if(typeof b!="number")return;return new Oa(h)}}toString(){return JSON.stringify(this.values)}static interpolate(h,b,D){return new Oa(Ra(h.values,b.values,D))}}class Ni{constructor(h){this.values=h.slice()}static parse(h){if(h instanceof Ni)return h;if(typeof h=="string"){let D=ii.parse(h);return D?new Ni([D]):void 0}if(!Array.isArray(h))return;let b=[];for(let D of h){if(typeof D!="string")return;let z=ii.parse(D);if(!z)return;b.push(z)}return new Ni(b)}toString(){return JSON.stringify(this.values)}static interpolate(h,b,D,z="rgb"){let G=[];if(h.values.length!=b.values.length)throw new Error(`colorArray: Arrays have mismatched length (${h.values.length} vs. ${b.values.length}), cannot interpolate.`);for(let X=0;X=0&&M<=255&&typeof h=="number"&&h>=0&&h<=255&&typeof b=="number"&&b>=0&&b<=255?D===void 0||typeof D=="number"&&D>=0&&D<=1?null:`Invalid rgba value [${[M,h,b,D].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof D=="number"?[M,h,b,D]:[M,h,b]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function pa(M){if(M===null||typeof M=="string"||typeof M=="boolean"||typeof M=="number"||M instanceof oo||M instanceof ii||M instanceof Za||M instanceof $a||M instanceof Ka||M instanceof Oa||M instanceof Ni||M instanceof yo||M instanceof so)return!0;if(Array.isArray(M)){for(let h of M)if(!pa(h))return!1;return!0}if(typeof M=="object"){for(let h in M)if(!pa(M[h]))return!1;return!0}return!1}function la(M){if(M===null)return Dt;if(typeof M=="string")return Vt;if(typeof M=="boolean")return Qt;if(typeof M=="number")return At;if(M instanceof ii)return Ut;if(M instanceof oo)return _r;if(M instanceof Za)return qn;if(M instanceof $a)return ri;if(M instanceof Ka)return Jn;if(M instanceof Oa)return Vi;if(M instanceof Ni)return Ii;if(M instanceof yo)return ha;if(M instanceof so)return ra;if(Array.isArray(M)){let h=M.length,b;for(let D of M){let z=la(D);if(b){if(b===z)continue;b=Jr;break}b=z}return va(b||Jr,h)}return rn}function As(M){let h=typeof M;return M===null?"":h==="string"||h==="number"||h==="boolean"?String(M):M instanceof ii||M instanceof oo||M instanceof $a||M instanceof Ka||M instanceof Oa||M instanceof Ni||M instanceof yo||M instanceof so?M.toString():JSON.stringify(M)}class Ms{constructor(h,b){this.type=h,this.value=b}static parse(h,b){if(h.length!==2)return b.error(`'literal' expression requires exactly one argument, but found ${h.length-1} instead.`);if(!pa(h[1]))return b.error("invalid value");let D=h[1],z=la(D),G=b.expectedType;return z.kind!=="array"||z.N!==0||!G||G.kind!=="array"||typeof G.N=="number"&&G.N!==0||(z=G),new Ms(z,D)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let xu={string:Vt,number:At,boolean:Qt,object:rn};class rs{constructor(h,b){this.type=h,this.args=b}static parse(h,b){if(h.length<2)return b.error("Expected at least one argument.");let D,z=1,G=h[0];if(G==="array"){let Z,re;if(h.length>2){let Q=h[1];if(typeof Q!="string"||!(Q in xu)||Q==="object")return b.error('The item type argument of "array" must be one of string, number, boolean',1);Z=xu[Q],z++}else Z=Jr;if(h.length>3){if(h[2]!==null&&(typeof h[2]!="number"||h[2]<0||h[2]!==Math.floor(h[2])))return b.error('The length argument to "array" must be a positive integer literal',2);re=h[2],z++}D=va(Z,re)}else{if(!xu[G])throw new Error(`Types doesn't contain name = ${G}`);D=xu[G]}let X=[];for(;zh.outputDefined()))}}let Ls={"to-boolean":Qt,"to-color":Ut,"to-number":At,"to-string":Vt};class $s{constructor(h,b){this.type=h,this.args=b}static parse(h,b){if(h.length<2)return b.error("Expected at least one argument.");let D=h[0];if(!Ls[D])throw new Error(`Can't parse ${D} as it is not part of the known types`);if((D==="to-boolean"||D==="to-string")&&h.length!==2)return b.error("Expected one argument.");let z=Ls[D],G=[];for(let X=1;X4?`Invalid rgba value ${JSON.stringify(b)}: expected an array containing either three or four numeric values.`:ko(b[0],b[1],b[2],b[3]),!D))return new ii(b[0]/255,b[1]/255,b[2]/255,b[3])}throw new ka(D||`Could not parse color from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"padding":{let b;for(let D of this.args){b=D.evaluate(h);let z=Ka.parse(b);if(z)return z}throw new ka(`Could not parse padding from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"numberArray":{let b;for(let D of this.args){b=D.evaluate(h);let z=Oa.parse(b);if(z)return z}throw new ka(`Could not parse numberArray from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"colorArray":{let b;for(let D of this.args){b=D.evaluate(h);let z=Ni.parse(b);if(z)return z}throw new ka(`Could not parse colorArray from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"variableAnchorOffsetCollection":{let b;for(let D of this.args){b=D.evaluate(h);let z=yo.parse(b);if(z)return z}throw new ka(`Could not parse variableAnchorOffsetCollection from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"number":{let b=null;for(let D of this.args){if(b=D.evaluate(h),b===null)return 0;let z=Number(b);if(!isNaN(z))return z}throw new ka(`Could not convert ${JSON.stringify(b)} to number.`)}case"formatted":return $a.fromString(As(this.args[0].evaluate(h)));case"resolvedImage":return so.fromString(As(this.args[0].evaluate(h)));case"projectionDefinition":return this.args[0].evaluate(h);default:return As(this.args[0].evaluate(h))}}eachChild(h){this.args.forEach(h)}outputDefined(){return this.args.every((h=>h.outputDefined()))}}let Kc=["Unknown","Point","LineString","Polygon"];class _u{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"?Kc[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(h){let b=this._parseColorCache.get(h);return b||(b=ii.parse(h),this._parseColorCache.set(h,b)),b}}class Gu{constructor(h,b,D=[],z,G=new Cn,X=[]){this.registry=h,this.path=D,this.key=D.map((Z=>`[${Z}]`)).join(""),this.scope=G,this.errors=X,this.expectedType=z,this._isConstant=b}parse(h,b,D,z,G={}){return b?this.concat(b,D,z)._parse(h,G):this._parse(h,G)}_parse(h,b){function D(z,G,X){return X==="assert"?new rs(G,[z]):X==="coerce"?new $s(G,[z]):z}if(h!==null&&typeof h!="string"&&typeof h!="boolean"&&typeof h!="number"||(h=["literal",h]),Array.isArray(h)){if(h.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let z=h[0];if(typeof z!="string")return this.error(`Expression name must be a string, but found ${typeof z} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let G=this.registry[z];if(G){let X=G.parse(h,this);if(!X)return null;if(this.expectedType){let Z=this.expectedType,re=X.type;if(Z.kind!=="string"&&Z.kind!=="number"&&Z.kind!=="boolean"&&Z.kind!=="object"&&Z.kind!=="array"||re.kind!=="value"){if(Z.kind==="projectionDefinition"&&["string","array"].includes(re.kind)||["color","formatted","resolvedImage"].includes(Z.kind)&&["value","string"].includes(re.kind)||["padding","numberArray"].includes(Z.kind)&&["value","number","array"].includes(re.kind)||Z.kind==="colorArray"&&["value","string","array"].includes(re.kind)||Z.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(re.kind))X=D(X,Z,b.typeAnnotation||"coerce");else if(this.checkSubtype(Z,re))return null}else X=D(X,Z,b.typeAnnotation||"assert")}if(!(X instanceof Ms)&&X.type.kind!=="resolvedImage"&&this._isConstant(X)){let Z=new _u;try{X=new Ms(X.type,X.evaluate(Z))}catch(re){return this.error(re.message),null}}return X}return this.error(`Unknown expression "${z}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(h===void 0?"'undefined' value invalid. Use null instead.":typeof h=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof h} instead.`)}concat(h,b,D){let z=typeof h=="number"?this.path.concat(h):this.path,G=D?this.scope.concat(D):this.scope;return new Gu(this.registry,this._isConstant,z,b||null,G,this.errors)}error(h,...b){let D=`${this.key}${b.map((z=>`[${z}]`)).join("")}`;this.errors.push(new Zr(D,h))}checkSubtype(h,b){let D=Ma(h,b);return D&&this.error(D),D}}class Ja{constructor(h,b){this.type=b.type,this.bindings=[].concat(h),this.result=b}evaluate(h){return this.result.evaluate(h)}eachChild(h){for(let b of this.bindings)h(b[1]);h(this.result)}static parse(h,b){if(h.length<4)return b.error(`Expected at least 3 arguments, but found ${h.length-1} instead.`);let D=[];for(let G=1;G=D.length)throw new ka(`Array index out of bounds: ${b} > ${D.length-1}.`);if(b!==Math.floor(b))throw new ka(`Array index must be an integer, but found ${b} instead.`);return D[b]}eachChild(h){h(this.index),h(this.input)}outputDefined(){return!1}}class ma{constructor(h,b){this.type=Qt,this.needle=h,this.haystack=b}static parse(h,b){if(h.length!==3)return b.error(`Expected 2 arguments, but found ${h.length-1} instead.`);let D=b.parse(h[1],1,Jr),z=b.parse(h[2],2,Jr);return D&&z?Ga(D.type,[Qt,Vt,At,Dt,Jr])?new ma(D,z):b.error(`Expected first argument to be of type boolean, string, number or null, but found ${Xi(D.type)} instead`):null}evaluate(h){let b=this.needle.evaluate(h),D=this.haystack.evaluate(h);if(!D)return!1;if(!ss(b,["boolean","string","number","null"]))throw new ka(`Expected first argument to be of type boolean, string, number or null, but found ${Xi(la(b))} instead.`);if(!ss(D,["string","array"]))throw new ka(`Expected second argument to be of type array or string, but found ${Xi(la(D))} instead.`);return D.indexOf(b)>=0}eachChild(h){h(this.needle),h(this.haystack)}outputDefined(){return!0}}class Ps{constructor(h,b,D){this.type=At,this.needle=h,this.haystack=b,this.fromIndex=D}static parse(h,b){if(h.length<=2||h.length>=5)return b.error(`Expected 2 or 3 arguments, but found ${h.length-1} instead.`);let D=b.parse(h[1],1,Jr),z=b.parse(h[2],2,Jr);if(!D||!z)return null;if(!Ga(D.type,[Qt,Vt,At,Dt,Jr]))return b.error(`Expected first argument to be of type boolean, string, number or null, but found ${Xi(D.type)} instead`);if(h.length===4){let G=b.parse(h[3],3,At);return G?new Ps(D,z,G):null}return new Ps(D,z)}evaluate(h){let b=this.needle.evaluate(h),D=this.haystack.evaluate(h);if(!ss(b,["boolean","string","number","null"]))throw new ka(`Expected first argument to be of type boolean, string, number or null, but found ${Xi(la(b))} instead.`);let z;if(this.fromIndex&&(z=this.fromIndex.evaluate(h)),ss(D,["string"])){let G=D.indexOf(b,z);return G===-1?-1:[...D.slice(0,G)].length}if(ss(D,["array"]))return D.indexOf(b,z);throw new ka(`Expected second argument to be of type array or string, but found ${Xi(la(D))} instead.`)}eachChild(h){h(this.needle),h(this.haystack),this.fromIndex&&h(this.fromIndex)}outputDefined(){return!1}}class Ca{constructor(h,b,D,z,G,X){this.inputType=h,this.type=b,this.input=D,this.cases=z,this.outputs=G,this.otherwise=X}static parse(h,b){if(h.length<5)return b.error(`Expected at least 4 arguments, but found only ${h.length-1}.`);if(h.length%2!=1)return b.error("Expected an even number of arguments.");let D,z;b.expectedType&&b.expectedType.kind!=="value"&&(z=b.expectedType);let G={},X=[];for(let Q=2;QNumber.MAX_SAFE_INTEGER)return ke.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Ue=="number"&&Math.floor(Ue)!==Ue)return ke.error("Numeric branch labels must be integer values.");if(D){if(ke.checkSubtype(D,la(Ue)))return null}else D=la(Ue);if(G[String(Ue)]!==void 0)return ke.error("Branch labels must be unique.");G[String(Ue)]=X.length}let ge=b.parse(oe,Q,z);if(!ge)return null;z=z||ge.type,X.push(ge)}let Z=b.parse(h[1],1,Jr);if(!Z)return null;let re=b.parse(h[h.length-1],h.length-1,z);return re?Z.type.kind!=="value"&&b.concat(1).checkSubtype(D,Z.type)?null:new Ca(D,z,Z,G,X,re):null}evaluate(h){let b=this.input.evaluate(h);return(la(b)===this.inputType&&this.outputs[this.cases[b]]||this.otherwise).evaluate(h)}eachChild(h){h(this.input),this.outputs.forEach(h),h(this.otherwise)}outputDefined(){return this.outputs.every((h=>h.outputDefined()))&&this.otherwise.outputDefined()}}class Pl{constructor(h,b,D){this.type=h,this.branches=b,this.otherwise=D}static parse(h,b){if(h.length<4)return b.error(`Expected at least 3 arguments, but found only ${h.length-1}.`);if(h.length%2!=0)return b.error("Expected an odd number of arguments.");let D;b.expectedType&&b.expectedType.kind!=="value"&&(D=b.expectedType);let z=[];for(let X=1;Xb.outputDefined()))&&this.otherwise.outputDefined()}}class ll{constructor(h,b,D,z){this.type=h,this.input=b,this.beginIndex=D,this.endIndex=z}static parse(h,b){if(h.length<=2||h.length>=5)return b.error(`Expected 2 or 3 arguments, but found ${h.length-1} instead.`);let D=b.parse(h[1],1,Jr),z=b.parse(h[2],2,At);if(!D||!z)return null;if(!Ga(D.type,[va(Jr),Vt,Jr]))return b.error(`Expected first argument to be of type array or string, but found ${Xi(D.type)} instead`);if(h.length===4){let G=b.parse(h[3],3,At);return G?new ll(D.type,D,z,G):null}return new ll(D.type,D,z)}evaluate(h){let b=this.input.evaluate(h),D=this.beginIndex.evaluate(h),z;if(this.endIndex&&(z=this.endIndex.evaluate(h)),ss(b,["string"]))return[...b].slice(D,z).join("");if(ss(b,["array"]))return b.slice(D,z);throw new ka(`Expected first argument to be of type array or string, but found ${Xi(la(b))} instead.`)}eachChild(h){h(this.input),h(this.beginIndex),this.endIndex&&h(this.endIndex)}outputDefined(){return!1}}function Jc(M,h){let b=M.length-1,D,z,G=0,X=b,Z=0;for(;G<=X;)if(Z=Math.floor((G+X)/2),D=M[Z],z=M[Z+1],D<=h){if(Z===b||hh))throw new ka("Input is not a number.");X=Z-1}return 0}class lu{constructor(h,b,D){this.type=h,this.input=b,this.labels=[],this.outputs=[];for(let[z,G]of D)this.labels.push(z),this.outputs.push(G)}static parse(h,b){if(h.length-1<4)return b.error(`Expected at least 4 arguments, but found only ${h.length-1}.`);if((h.length-1)%2!=0)return b.error("Expected an even number of arguments.");let D=b.parse(h[1],1,At);if(!D)return null;let z=[],G=null;b.expectedType&&b.expectedType.kind!=="value"&&(G=b.expectedType);for(let X=1;X=Z)return b.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Q);let oe=b.parse(re,he,G);if(!oe)return null;G=G||oe.type,z.push([Z,oe])}return new lu(G,D,z)}evaluate(h){let b=this.labels,D=this.outputs;if(b.length===1)return D[0].evaluate(h);let z=this.input.evaluate(h);if(z<=b[0])return D[0].evaluate(h);let G=b.length;return z>=b[G-1]?D[G-1].evaluate(h):D[Jc(b,z)].evaluate(h)}eachChild(h){h(this.input);for(let b of this.outputs)h(b)}outputDefined(){return this.outputs.every((h=>h.outputDefined()))}}function Mf(M){return M&&M.__esModule&&Object.prototype.hasOwnProperty.call(M,"default")?M.default:M}var Bd,Hu,Sf=(function(){if(Hu)return Bd;function M(h,b,D,z){this.cx=3*h,this.bx=3*(D-h)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*b,this.by=3*(z-b)-this.cy,this.ay=1-this.cy-this.by,this.p1x=h,this.p1y=b,this.p2x=D,this.p2y=z}return Hu=1,Bd=M,M.prototype={sampleCurveX:function(h){return((this.ax*h+this.bx)*h+this.cx)*h},sampleCurveY:function(h){return((this.ay*h+this.by)*h+this.cy)*h},sampleCurveDerivativeX:function(h){return(3*this.ax*h+2*this.bx)*h+this.cx},solveCurveX:function(h,b){if(b===void 0&&(b=1e-6),h<0)return 0;if(h>1)return 1;for(var D=h,z=0;z<8;z++){var G=this.sampleCurveX(D)-h;if(Math.abs(G)G?Z=D:re=D,D=.5*(re-Z)+Z;return D},solve:function(h,b){return this.sampleCurveY(this.solveCurveX(h,b))}},Bd})(),kc=Mf(Sf);class Uo{constructor(h,b,D,z,G){this.type=h,this.operator=b,this.interpolation=D,this.input=z,this.labels=[],this.outputs=[];for(let[X,Z]of G)this.labels.push(X),this.outputs.push(Z)}static interpolationFactor(h,b,D,z){let G=0;if(h.name==="exponential")G=ns(b,h.base,D,z);else if(h.name==="linear")G=ns(b,1,D,z);else if(h.name==="cubic-bezier"){let X=h.controlPoints;G=new kc(X[0],X[1],X[2],X[3]).solve(ns(b,1,D,z))}return G}static parse(h,b){let[D,z,G,...X]=h;if(!Array.isArray(z)||z.length===0)return b.error("Expected an interpolation type expression.",1);if(z[0]==="linear")z={name:"linear"};else if(z[0]==="exponential"){let Q=z[1];if(typeof Q!="number")return b.error("Exponential interpolation requires a numeric base.",1,1);z={name:"exponential",base:Q}}else{if(z[0]!=="cubic-bezier")return b.error(`Unknown interpolation type ${String(z[0])}`,1,0);{let Q=z.slice(1);if(Q.length!==4||Q.some((he=>typeof he!="number"||he<0||he>1)))return b.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);z={name:"cubic-bezier",controlPoints:Q}}}if(h.length-1<4)return b.error(`Expected at least 4 arguments, but found only ${h.length-1}.`);if((h.length-1)%2!=0)return b.error("Expected an even number of arguments.");if(G=b.parse(G,2,At),!G)return null;let Z=[],re=null;D!=="interpolate-hcl"&&D!=="interpolate-lab"||b.expectedType==Ii?b.expectedType&&b.expectedType.kind!=="value"&&(re=b.expectedType):re=Ut;for(let Q=0;Q=he)return b.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ke);let Ue=b.parse(oe,ge,re);if(!Ue)return null;re=re||Ue.type,Z.push([he,Ue])}return mo(re,At)||mo(re,_r)||mo(re,Ut)||mo(re,Jn)||mo(re,Vi)||mo(re,Ii)||mo(re,ha)||mo(re,va(At))?new Uo(re,D,z,G,Z):b.error(`Type ${Xi(re)} is not interpolatable.`)}evaluate(h){let b=this.labels,D=this.outputs;if(b.length===1)return D[0].evaluate(h);let z=this.input.evaluate(h);if(z<=b[0])return D[0].evaluate(h);let G=b.length;if(z>=b[G-1])return D[G-1].evaluate(h);let X=Jc(b,z),Z=Uo.interpolationFactor(this.interpolation,z,b[X],b[X+1]),re=D[X].evaluate(h),Q=D[X+1].evaluate(h);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return Ji(re,Q,Z);case"color":return ii.interpolate(re,Q,Z);case"padding":return Ka.interpolate(re,Q,Z);case"colorArray":return Ni.interpolate(re,Q,Z);case"numberArray":return Oa.interpolate(re,Q,Z);case"variableAnchorOffsetCollection":return yo.interpolate(re,Q,Z);case"array":return Ra(re,Q,Z);case"projectionDefinition":return oo.interpolate(re,Q,Z)}case"interpolate-hcl":switch(this.type.kind){case"color":return ii.interpolate(re,Q,Z,"hcl");case"colorArray":return Ni.interpolate(re,Q,Z,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return ii.interpolate(re,Q,Z,"lab");case"colorArray":return Ni.interpolate(re,Q,Z,"lab")}}}eachChild(h){h(this.input);for(let b of this.outputs)h(b)}outputDefined(){return this.outputs.every((h=>h.outputDefined()))}}function ns(M,h,b,D){let z=D-b,G=M-b;return z===0?0:h===1?G/z:(Math.pow(h,G)-1)/(Math.pow(h,z)-1)}let Ks={color:ii.interpolate,number:Ji,padding:Ka.interpolate,numberArray:Oa.interpolate,colorArray:Ni.interpolate,variableAnchorOffsetCollection:yo.interpolate,array:Ra};class Ef{constructor(h,b){this.type=h,this.args=b}static parse(h,b){if(h.length<2)return b.error("Expected at least one argument.");let D=null,z=b.expectedType;z&&z.kind!=="value"&&(D=z);let G=[];for(let Z of h.slice(1)){let re=b.parse(Z,1+G.length,D,void 0,{typeAnnotation:"omit"});if(!re)return null;D=D||re.type,G.push(re)}if(!D)throw new Error("No output type");let X=z&&G.some((Z=>Ma(z,Z.type)));return new Ef(X?Jr:D,G)}evaluate(h){let b,D=null,z=0;for(let G of this.args)if(z++,D=G.evaluate(h),D&&D instanceof so&&!D.available&&(b||(b=D.name),D=null,z===this.args.length&&(D=b)),D!==null)break;return D}eachChild(h){this.args.forEach(h)}outputDefined(){return this.args.every((h=>h.outputDefined()))}}function ju(M,h){return M==="=="||M==="!="?h.kind==="boolean"||h.kind==="string"||h.kind==="number"||h.kind==="null"||h.kind==="value":h.kind==="string"||h.kind==="number"||h.kind==="value"}function gs(M,h,b,D){return D.compare(h,b)===0}function bu(M,h,b){let D=M!=="=="&&M!=="!=";return class qWe{constructor(G,X,Z){this.type=Qt,this.lhs=G,this.rhs=X,this.collator=Z,this.hasUntypedArgument=G.type.kind==="value"||X.type.kind==="value"}static parse(G,X){if(G.length!==3&&G.length!==4)return X.error("Expected two or three arguments.");let Z=G[0],re=X.parse(G[1],1,Jr);if(!re)return null;if(!ju(Z,re.type))return X.concat(1).error(`"${Z}" comparisons are not supported for type '${Xi(re.type)}'.`);let Q=X.parse(G[2],2,Jr);if(!Q)return null;if(!ju(Z,Q.type))return X.concat(2).error(`"${Z}" comparisons are not supported for type '${Xi(Q.type)}'.`);if(re.type.kind!==Q.type.kind&&re.type.kind!=="value"&&Q.type.kind!=="value")return X.error(`Cannot compare types '${Xi(re.type)}' and '${Xi(Q.type)}'.`);D&&(re.type.kind==="value"&&Q.type.kind!=="value"?re=new rs(Q.type,[re]):re.type.kind!=="value"&&Q.type.kind==="value"&&(Q=new rs(re.type,[Q])));let he=null;if(G.length===4){if(re.type.kind!=="string"&&Q.type.kind!=="string"&&re.type.kind!=="value"&&Q.type.kind!=="value")return X.error("Cannot use collator to compare non-string types.");if(he=X.parse(G[3],3,qn),!he)return null}return new qWe(re,Q,he)}evaluate(G){let X=this.lhs.evaluate(G),Z=this.rhs.evaluate(G);if(D&&this.hasUntypedArgument){let re=la(X),Q=la(Z);if(re.kind!==Q.kind||re.kind!=="string"&&re.kind!=="number")throw new ka(`Expected arguments for "${M}" to be (string, string) or (number, number), but found (${re.kind}, ${Q.kind}) instead.`)}if(this.collator&&!D&&this.hasUntypedArgument){let re=la(X),Q=la(Z);if(re.kind!=="string"||Q.kind!=="string")return h(G,X,Z)}return this.collator?b(G,X,Z,this.collator.evaluate(G)):h(G,X,Z)}eachChild(G){G(this.lhs),G(this.rhs),this.collator&&G(this.collator)}outputDefined(){return!0}}}let kf=bu("==",(function(M,h,b){return h===b}),gs),ah=bu("!=",(function(M,h,b){return h!==b}),(function(M,h,b,D){return!gs(0,h,b,D)})),Od=bu("<",(function(M,h,b){return h",(function(M,h,b){return h>b}),(function(M,h,b,D){return D.compare(h,b)>0})),uu=bu("<=",(function(M,h,b){return h<=b}),(function(M,h,b,D){return D.compare(h,b)<=0})),oh=bu(">=",(function(M,h,b){return h>=b}),(function(M,h,b,D){return D.compare(h,b)>=0}));class hc{constructor(h,b,D){this.type=qn,this.locale=D,this.caseSensitive=h,this.diacriticSensitive=b}static parse(h,b){if(h.length!==2)return b.error("Expected one argument.");let D=h[1];if(typeof D!="object"||Array.isArray(D))return b.error("Collator options argument must be an object.");let z=b.parse(D["case-sensitive"]!==void 0&&D["case-sensitive"],1,Qt);if(!z)return null;let G=b.parse(D["diacritic-sensitive"]!==void 0&&D["diacritic-sensitive"],1,Qt);if(!G)return null;let X=null;return D.locale&&(X=b.parse(D.locale,1,Vt),!X)?null:new hc(z,G,X)}evaluate(h){return new Za(this.caseSensitive.evaluate(h),this.diacriticSensitive.evaluate(h),this.locale?this.locale.evaluate(h):null)}eachChild(h){h(this.caseSensitive),h(this.diacriticSensitive),this.locale&&h(this.locale)}outputDefined(){return!1}}class Fl{constructor(h,b,D,z,G,X){this.type=Vt,this.number=h,this.locale=b,this.currency=D,this.unit=z,this.minFractionDigits=G,this.maxFractionDigits=X}static parse(h,b){if(h.length!==3)return b.error("Expected two arguments.");let D=b.parse(h[1],1,At);if(!D)return null;let z=h[2];if(typeof z!="object"||Array.isArray(z))return b.error("NumberFormat options argument must be an object.");let G=null;if(z.locale&&(G=b.parse(z.locale,1,Vt),!G))return null;let X=null;if(z.currency&&(X=b.parse(z.currency,1,Vt),!X))return null;let Z=null;if(z.unit&&(Z=b.parse(z.unit,1,Vt),!Z))return null;if(X&&Z)return b.error("NumberFormat options `currency` and `unit` are mutually exclusive");let re=null;if(z["min-fraction-digits"]&&(re=b.parse(z["min-fraction-digits"],1,At),!re))return null;let Q=null;return z["max-fraction-digits"]&&(Q=b.parse(z["max-fraction-digits"],1,At),!Q)?null:new Fl(D,G,X,Z,re,Q)}evaluate(h){return new Intl.NumberFormat(this.locale?this.locale.evaluate(h):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(h):void 0,unit:this.unit?this.unit.evaluate(h):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(h):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(h):void 0}).format(this.number.evaluate(h))}eachChild(h){h(this.number),this.locale&&h(this.locale),this.currency&&h(this.currency),this.unit&&h(this.unit),this.minFractionDigits&&h(this.minFractionDigits),this.maxFractionDigits&&h(this.maxFractionDigits)}outputDefined(){return!1}}class Yo{constructor(h){this.type=ri,this.sections=h}static parse(h,b){if(h.length<2)return b.error("Expected at least one argument.");let D=h[1];if(!Array.isArray(D)&&typeof D=="object")return b.error("First argument must be an image or text section.");let z=[],G=!1;for(let X=1;X<=h.length-1;++X){let Z=h[X];if(G&&typeof Z=="object"&&!Array.isArray(Z)){G=!1;let re=null;if(Z["font-scale"]&&(re=b.parse(Z["font-scale"],1,At),!re))return null;let Q=null;if(Z["text-font"]&&(Q=b.parse(Z["text-font"],1,va(Vt)),!Q))return null;let he=null;if(Z["text-color"]&&(he=b.parse(Z["text-color"],1,Ut),!he))return null;let oe=null;if(Z["vertical-align"]){if(typeof Z["vertical-align"]=="string"&&!ja.includes(Z["vertical-align"]))return b.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${Z["vertical-align"]}' instead.`);if(oe=b.parse(Z["vertical-align"],1,Vt),!oe)return null}let ke=z[z.length-1];ke.scale=re,ke.font=Q,ke.textColor=he,ke.verticalAlign=oe}else{let re=b.parse(h[X],1,Jr);if(!re)return null;let Q=re.type.kind;if(Q!=="string"&&Q!=="value"&&Q!=="null"&&Q!=="resolvedImage")return b.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");G=!0,z.push({content:re,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Yo(z)}evaluate(h){return new $a(this.sections.map((b=>{let D=b.content.evaluate(h);return la(D)===ra?new qo("",D,null,null,null,b.verticalAlign?b.verticalAlign.evaluate(h):null):new qo(As(D),null,b.scale?b.scale.evaluate(h):null,b.font?b.font.evaluate(h).join(","):null,b.textColor?b.textColor.evaluate(h):null,b.verticalAlign?b.verticalAlign.evaluate(h):null)})))}eachChild(h){for(let b of this.sections)h(b.content),b.scale&&h(b.scale),b.font&&h(b.font),b.textColor&&h(b.textColor),b.verticalAlign&&h(b.verticalAlign)}outputDefined(){return!1}}class Ro{constructor(h){this.type=ra,this.input=h}static parse(h,b){if(h.length!==2)return b.error("Expected two arguments.");let D=b.parse(h[1],1,Vt);return D?new Ro(D):b.error("No image name provided.")}evaluate(h){let b=this.input.evaluate(h),D=so.fromString(b);return D&&h.availableImages&&(D.available=h.availableImages.indexOf(b)>-1),D}eachChild(h){h(this.input)}outputDefined(){return!1}}class is{constructor(h){this.type=At,this.input=h}static parse(h,b){if(h.length!==2)return b.error(`Expected 1 argument, but found ${h.length-1} instead.`);let D=b.parse(h[1],1);return D?D.type.kind!=="array"&&D.type.kind!=="string"&&D.type.kind!=="value"?b.error(`Expected argument of type string or array, but found ${Xi(D.type)} instead.`):new is(D):null}evaluate(h){let b=this.input.evaluate(h);if(typeof b=="string")return[...b].length;if(Array.isArray(b))return b.length;throw new ka(`Expected value to be of type string or array, but found ${Xi(la(b))} instead.`)}eachChild(h){h(this.input)}outputDefined(){return!1}}let Dl=8192;function dc(M,h){let b=(180+M[0])/360,D=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+M[1]*Math.PI/360)))/360,z=Math.pow(2,h.z);return[Math.round(b*z*Dl),Math.round(D*z*Dl)]}function ef(M,h){let b=Math.pow(2,h.z);return[(z=(M[0]/Dl+h.x)/b,360*z-180),(D=(M[1]/Dl+h.y)/b,360/Math.PI*Math.atan(Math.exp((180-360*D)*Math.PI/180))-90)];var D,z}function Cc(M,h){M[0]=Math.min(M[0],h[0]),M[1]=Math.min(M[1],h[1]),M[2]=Math.max(M[2],h[0]),M[3]=Math.max(M[3],h[1])}function sh(M,h){return!(M[0]<=h[0]||M[2]>=h[2]||M[1]<=h[1]||M[3]>=h[3])}function Y0(M,h,b){let D=M[0]-h[0],z=M[1]-h[1],G=M[0]-b[0],X=M[1]-b[1];return D*X-G*z==0&&D*G<=0&&z*X<=0}function Nd(M,h,b,D){return(z=[D[0]-b[0],D[1]-b[1]])[0]*(G=[h[0]-M[0],h[1]-M[1]])[1]-z[1]*G[0]!=0&&!(!Vd(M,h,b,D)||!Vd(b,D,M,h));var z,G}function Cf(M,h,b){for(let D of b)for(let z=0;z(z=M)[1]!=(X=Z[re+1])[1]>z[1]&&z[0]<(X[0]-G[0])*(z[1]-G[1])/(X[1]-G[1])+G[0]&&(D=!D)}var z,G,X;return D}function Ud(M,h){for(let b of h)if(Vo(M,b))return!0;return!1}function zh(M,h){for(let b of M)if(!Vo(b,h))return!1;for(let b=0;b0&&Z<0||X<0&&Z>0}function rf(M,h,b){let D=[];for(let z=0;zb[2]){let z=.5*D,G=M[0]-b[0]>z?-D:b[0]-M[0]>z?D:0;G===0&&(G=M[0]-b[2]>z?-D:b[2]-M[0]>z?D:0),M[0]+=G}Cc(h,M)}function dd(M,h,b,D){let z=Math.pow(2,D.z)*Dl,G=[D.x*Dl,D.y*Dl],X=[];for(let Z of M)for(let re of Z){let Q=[re.x+G[0],re.y+G[1]];vc(Q,h,b,z),X.push(Q)}return X}function Bh(M,h,b,D){let z=Math.pow(2,D.z)*Dl,G=[D.x*Dl,D.y*Dl],X=[];for(let re of M){let Q=[];for(let he of re){let oe=[he.x+G[0],he.y+G[1]];Cc(h,oe),Q.push(oe)}X.push(Q)}if(h[2]-h[0]<=z/2){(Z=h)[0]=Z[1]=1/0,Z[2]=Z[3]=-1/0;for(let re of X)for(let Q of re)vc(Q,h,b,z)}var Z;return X}class Wu{constructor(h,b){this.type=Qt,this.geojson=h,this.geometries=b}static parse(h,b){if(h.length!==2)return b.error(`'within' expression requires exactly one argument, but found ${h.length-1} instead.`);if(pa(h[1])){let D=h[1];if(D.type==="FeatureCollection"){let z=[];for(let G of D.features){let{type:X,coordinates:Z}=G.geometry;X==="Polygon"&&z.push(Z),X==="MultiPolygon"&&z.push(...Z)}if(z.length)return new Wu(D,{type:"MultiPolygon",coordinates:z})}else if(D.type==="Feature"){let z=D.geometry.type;if(z==="Polygon"||z==="MultiPolygon")return new Wu(D,D.geometry)}else if(D.type==="Polygon"||D.type==="MultiPolygon")return new Wu(D,D)}return b.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(h){if(h.geometry()!=null&&h.canonicalID()!=null){if(h.geometryType()==="Point")return(function(b,D){let z=[1/0,1/0,-1/0,-1/0],G=[1/0,1/0,-1/0,-1/0],X=b.canonicalID();if(D.type==="Polygon"){let Z=rf(D.coordinates,G,X),re=dd(b.geometry(),z,G,X);if(!sh(z,G))return!1;for(let Q of re)if(!Vo(Q,Z))return!1}if(D.type==="MultiPolygon"){let Z=qh(D.coordinates,G,X),re=dd(b.geometry(),z,G,X);if(!sh(z,G))return!1;for(let Q of re)if(!Ud(Q,Z))return!1}return!0})(h,this.geometries);if(h.geometryType()==="LineString")return(function(b,D){let z=[1/0,1/0,-1/0,-1/0],G=[1/0,1/0,-1/0,-1/0],X=b.canonicalID();if(D.type==="Polygon"){let Z=rf(D.coordinates,G,X),re=Bh(b.geometry(),z,G,X);if(!sh(z,G))return!1;for(let Q of re)if(!zh(Q,Z))return!1}if(D.type==="MultiPolygon"){let Z=qh(D.coordinates,G,X),re=Bh(b.geometry(),z,G,X);if(!sh(z,G))return!1;for(let Q of re)if(!tf(Q,Z))return!1}return!0})(h,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let vd=class{constructor(M=[],h=(b,D)=>bD?1:0){if(this.data=M,this.length=this.data.length,this.compare=h,this.length>0)for(let b=(this.length>>1)-1;b>=0;b--)this._down(b)}push(M){this.data.push(M),this._up(this.length++)}pop(){if(this.length===0)return;let M=this.data[0],h=this.data.pop();return--this.length>0&&(this.data[0]=h,this._down(0)),M}peek(){return this.data[0]}_up(M){let{data:h,compare:b}=this,D=h[M];for(;M>0;){let z=M-1>>1,G=h[z];if(b(D,G)>=0)break;h[M]=G,M=z}h[M]=D}_down(M){let{data:h,compare:b}=this,D=this.length>>1,z=h[M];for(;M=0)break;h[M]=h[G],M=G}h[M]=z}};function pd(M,h,b=0,D=M.length-1,z=nf){for(;D>b;){if(D-b>600){let re=D-b+1,Q=h-b+1,he=Math.log(re),oe=.5*Math.exp(2*he/3),ke=.5*Math.sqrt(he*oe*(re-oe)/re)*(Q-re/2<0?-1:1);pd(M,h,Math.max(b,Math.floor(h-Q*oe/re+ke)),Math.min(D,Math.floor(h+(re-Q)*oe/re+ke)),z)}let G=M[h],X=b,Z=D;for(lh(M,b,h),z(M[D],G)>0&&lh(M,b,D);X0;)Z--}z(M[b],G)===0?lh(M,b,Z):(Z++,lh(M,Z,D)),Z<=h&&(b=Z+1),h<=Z&&(D=Z-1)}}function lh(M,h,b){let D=M[h];M[h]=M[b],M[b]=D}function nf(M,h){return Mh?1:0}function uh(M,h){if(M.length<=1)return[M];let b=[],D,z;for(let G of M){let X=gd(G);X!==0&&(G.area=Math.abs(X),z===void 0&&(z=X<0),z===X<0?(D&&b.push(D),D=[G]):D.push(G))}if(D&&b.push(D),h>1)for(let G=0;G1?(Q=h[re+1][0],he=h[re+1][1]):ge>0&&(Q+=oe/this.kx*ge,he+=ke/this.ky*ge)),oe=this.wrap(b[0]-Q)*this.kx,ke=(b[1]-he)*this.ky;let Ue=oe*oe+ke*ke;Ue180;)h-=360;return h}}function yd(M,h){return h[0]-M[0]}function Lf(M){return M[1]-M[0]+1}function wu(M,h){return M[1]>=M[0]&&M[1]M[1])return[null,null];let b=Lf(M);if(h){if(b===2)return[M,null];let z=Math.floor(b/2);return[[M[0],M[0]+z],[M[0]+z,M[1]]]}if(b===1)return[M,null];let D=Math.floor(b/2)-1;return[[M[0],M[0]+D],[M[0]+D+1,M[1]]]}function Oh(M,h){if(!wu(h,M.length))return[1/0,1/0,-1/0,-1/0];let b=[1/0,1/0,-1/0,-1/0];for(let D=h[0];D<=h[1];++D)Cc(b,M[D]);return b}function hh(M){let h=[1/0,1/0,-1/0,-1/0];for(let b of M)for(let D of b)Cc(h,D);return h}function Gd(M){return M[0]!==-1/0&&M[1]!==-1/0&&M[2]!==1/0&&M[3]!==1/0}function Gl(M,h,b){if(!Gd(M)||!Gd(h))return NaN;let D=0,z=0;return M[2]h[2]&&(D=M[0]-h[2]),M[1]>h[3]&&(z=M[1]-h[3]),M[3]=D)return D;if(sh(z,G)){if(Hd(M,h))return 0}else if(Hd(h,M))return 0;let X=1/0;for(let Z of M)for(let re=0,Q=Z.length,he=Q-1;re0;){let re=X.pop();if(re[0]>=G)continue;let Q=re[1],he=h?50:100;if(Lf(Q)<=he){if(!wu(Q,M.length))return NaN;if(h){let oe=Pf(M,Q,b,D);if(isNaN(oe)||oe===0)return oe;G=Math.min(G,oe)}else for(let oe=Q[0];oe<=Q[1];++oe){let ke=dh(M[oe],b,D);if(G=Math.min(G,ke),G===0)return 0}}else{let oe=fh(Q,h);p0(X,G,D,M,Z,oe[0]),p0(X,G,D,M,Z,oe[1])}}return G}function Il(M,h,b,D,z,G=1/0){let X=Math.min(G,z.distance(M[0],b[0]));if(X===0)return X;let Z=new vd([[0,[0,M.length-1],[0,b.length-1]]],yd);for(;Z.length>0;){let re=Z.pop();if(re[0]>=X)continue;let Q=re[1],he=re[2],oe=h?50:100,ke=D?50:100;if(Lf(Q)<=oe&&Lf(he)<=ke){if(!wu(Q,M.length)&&wu(he,b.length))return NaN;let ge;if(h&&D)ge=Hl(M,Q,b,he,z),X=Math.min(X,ge);else if(h&&!D){let Ue=M.slice(Q[0],Q[1]+1);for(let je=he[0];je<=he[1];++je)if(ge=wl(b[je],Ue,z),X=Math.min(X,ge),X===0)return X}else if(!h&&D){let Ue=b.slice(he[0],he[1]+1);for(let je=Q[0];je<=Q[1];++je)if(ge=wl(M[je],Ue,z),X=Math.min(X,ge),X===0)return X}else ge=_d(M,Q,b,he,z),X=Math.min(X,ge)}else{let ge=fh(Q,h),Ue=fh(he,D);Tu(Z,X,z,M,b,ge[0],Ue[0]),Tu(Z,X,z,M,b,ge[0],Ue[1]),Tu(Z,X,z,M,b,ge[1],Ue[0]),Tu(Z,X,z,M,b,ge[1],Ue[1])}}return X}function g0(M){return M.type==="MultiPolygon"?M.coordinates.map((h=>({type:"Polygon",coordinates:h}))):M.type==="MultiLineString"?M.coordinates.map((h=>({type:"LineString",coordinates:h}))):M.type==="MultiPoint"?M.coordinates.map((h=>({type:"Point",coordinates:h}))):[M]}class Yu{constructor(h,b){this.type=At,this.geojson=h,this.geometries=b}static parse(h,b){if(h.length!==2)return b.error(`'distance' expression requires exactly one argument, but found ${h.length-1} instead.`);if(pa(h[1])){let D=h[1];if(D.type==="FeatureCollection")return new Yu(D,D.features.map((z=>g0(z.geometry))).flat());if(D.type==="Feature")return new Yu(D,g0(D.geometry));if("type"in D&&"coordinates"in D)return new Yu(D,g0(D))}return b.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(h){if(h.geometry()!=null&&h.canonicalID()!=null){if(h.geometryType()==="Point")return(function(b,D){let z=b.geometry(),G=z.flat().map((re=>ef([re.x,re.y],b.canonical)));if(z.length===0)return NaN;let X=new md(G[0][1]),Z=1/0;for(let re of D){switch(re.type){case"Point":Z=Math.min(Z,Il(G,!1,[re.coordinates],!1,X,Z));break;case"LineString":Z=Math.min(Z,Il(G,!1,re.coordinates,!0,X,Z));break;case"Polygon":Z=Math.min(Z,Au(G,!1,re.coordinates,X,Z))}if(Z===0)return Z}return Z})(h,this.geometries);if(h.geometryType()==="LineString")return(function(b,D){let z=b.geometry(),G=z.flat().map((re=>ef([re.x,re.y],b.canonical)));if(z.length===0)return NaN;let X=new md(G[0][1]),Z=1/0;for(let re of D){switch(re.type){case"Point":Z=Math.min(Z,Il(G,!0,[re.coordinates],!1,X,Z));break;case"LineString":Z=Math.min(Z,Il(G,!0,re.coordinates,!0,X,Z));break;case"Polygon":Z=Math.min(Z,Au(G,!0,re.coordinates,X,Z))}if(Z===0)return Z}return Z})(h,this.geometries);if(h.geometryType()==="Polygon")return(function(b,D){let z=b.geometry();if(z.length===0||z[0].length===0)return NaN;let G=uh(z,0).map((re=>re.map((Q=>Q.map((he=>ef([he.x,he.y],b.canonical))))))),X=new md(G[0][0][0][1]),Z=1/0;for(let re of D)for(let Q of G){switch(re.type){case"Point":Z=Math.min(Z,Au([re.coordinates],!1,Q,X,Z));break;case"LineString":Z=Math.min(Z,Au(re.coordinates,!0,Q,X,Z));break;case"Polygon":Z=Math.min(Z,xo(Q,re.coordinates,X,Z))}if(Z===0)return Z}return Z})(h,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class Nh{constructor(h){this.type=Jr,this.key=h}static parse(h,b){if(h.length!==2)return b.error(`Expected 1 argument, but found ${h.length-1} instead.`);let D=h[1];return D==null?b.error("Global state property must be defined."):typeof D!="string"?b.error(`Global state property must be string, but found ${typeof h[1]} instead.`):new Nh(D)}evaluate(h){var b;let D=(b=h.globals)===null||b===void 0?void 0:b.globalState;return D&&Object.keys(D).length!==0?bn(D,this.key):null}eachChild(){}outputDefined(){return!1}}let Tl={"==":kf,"!=":ah,">":Qc,"<":Od,">=":oh,"<=":uu,array:rs,at:Sa,boolean:rs,case:Pl,coalesce:Ef,collator:hc,format:Yo,image:Ro,in:ma,"index-of":Ps,interpolate:Uo,"interpolate-hcl":Uo,"interpolate-lab":Uo,length:is,let:Ja,literal:Ms,match:Ca,number:rs,"number-format":Fl,object:rs,slice:ll,step:lu,string:rs,"to-boolean":$s,"to-color":$s,"to-number":$s,"to-string":$s,var:ps,within:Wu,distance:Yu,"global-state":Nh};class jl{constructor(h,b,D,z){this.name=h,this.type=b,this._evaluate=D,this.args=z}evaluate(h){return this._evaluate(h,this.args)}eachChild(h){this.args.forEach(h)}outputDefined(){return!1}static parse(h,b){let D=h[0],z=jl.definitions[D];if(!z)return b.error(`Unknown expression "${D}". If you wanted a literal array, use ["literal", [...]].`,0);let G=Array.isArray(z)?z[0]:z.type,X=Array.isArray(z)?[[z[1],z[2]]]:z.overloads,Z=X.filter((([Q])=>!Array.isArray(Q)||Q.length===h.length-1)),re=null;for(let[Q,he]of Z){re=new Gu(b.registry,gc,b.path,null,b.scope);let oe=[],ke=!1;for(let ge=1;ge{return ke=oe,Array.isArray(ke)?`(${ke.map(Xi).join(", ")})`:`(${Xi(ke.type)}...)`;var ke})).join(" | "),he=[];for(let oe=1;oe{b=h?b&&gc(D):b&&D instanceof Ms})),!!b&&of(M)&&bd(M,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function of(M){if(M instanceof jl&&(M.name==="get"&&M.args.length===1||M.name==="feature-state"||M.name==="has"&&M.args.length===1||M.name==="properties"||M.name==="geometry-type"||M.name==="id"||/^filter-/.test(M.name))||M instanceof Wu||M instanceof Yu)return!1;let h=!0;return M.eachChild((b=>{h&&!of(b)&&(h=!1)})),h}function sf(M){if(M instanceof jl&&M.name==="feature-state")return!1;let h=!0;return M.eachChild((b=>{h&&!sf(b)&&(h=!1)})),h}function bd(M,h){if(M instanceof jl&&h.indexOf(M.name)>=0)return!1;let b=!0;return M.eachChild((D=>{b&&!bd(D,h)&&(b=!1)})),b}function Gh(M){return{result:"success",value:M}}function Xu(M){return{result:"error",value:M}}function Pc(M){return M["property-type"]==="data-driven"||M["property-type"]==="cross-faded-data-driven"}function Ff(M){return!!M.expression&&M.expression.parameters.indexOf("zoom")>-1}function Df(M){return!!M.expression&&M.expression.interpolated}function La(M){return M instanceof Number?"number":M instanceof String?"string":M instanceof Boolean?"boolean":Array.isArray(M)?"array":M===null?"null":typeof M}function Rf(M){return typeof M=="object"&&M!==null&&!Array.isArray(M)&&la(M)===rn}function m0(M){return M}function wd(M,h){let b=M.stops&&typeof M.stops[0][0]=="object",D=b||!(b||M.property!==void 0),z=M.type||(Df(h)?"exponential":"interval"),G=(function(he){switch(he.type){case"color":return ii.parse;case"padding":return Ka.parse;case"numberArray":return Oa.parse;case"colorArray":return Ni.parse;default:return null}})(h);if(G&&((M=Fr({},M)).stops&&(M.stops=M.stops.map((he=>[he[0],G(he[1])]))),M.default=G(M.default?M.default:h.default)),M.colorSpace&&(X=M.colorSpace)!=="rgb"&&X!=="hcl"&&X!=="lab")throw new Error(`Unknown color space: "${M.colorSpace}"`);var X;let Z=(function(he){switch(he){case"exponential":return Td;case"interval":return y0;case"categorical":return X0;case"identity":return ul;default:throw new Error(`Unknown function type "${he}"`)}})(z),re,Q;if(z==="categorical"){re=Object.create(null);for(let he of M.stops)re[he[0]]=he[1];Q=typeof M.stops[0][0]}if(b){let he={},oe=[];for(let Ue=0;UeUe[0])),evaluate:({zoom:Ue},je)=>Td({stops:ke,base:M.base},h,Ue).evaluate(Ue,je)}}if(D){let he=z==="exponential"?{name:"exponential",base:M.base!==void 0?M.base:1}:null;return{kind:"camera",interpolationType:he,interpolationFactor:Uo.interpolationFactor.bind(void 0,he),zoomStops:M.stops.map((oe=>oe[0])),evaluate:({zoom:oe})=>Z(M,h,oe,re,Q)}}return{kind:"source",evaluate(he,oe){let ke=oe&&oe.properties?oe.properties[M.property]:void 0;return ke===void 0?Hh(M.default,h.default):Z(M,h,ke,re,Q)}}}function Hh(M,h,b){return M!==void 0?M:h!==void 0?h:b!==void 0?b:void 0}function X0(M,h,b,D,z){return Hh(typeof b===z?D[b]:void 0,M.default,h.default)}function y0(M,h,b){if(La(b)!=="number")return Hh(M.default,h.default);let D=M.stops.length;if(D===1||b<=M.stops[0][0])return M.stops[0][1];if(b>=M.stops[D-1][0])return M.stops[D-1][1];let z=Jc(M.stops.map((G=>G[0])),b);return M.stops[z][1]}function Td(M,h,b){let D=M.base!==void 0?M.base:1;if(La(b)!=="number")return Hh(M.default,h.default);let z=M.stops.length;if(z===1||b<=M.stops[0][0])return M.stops[0][1];if(b>=M.stops[z-1][0])return M.stops[z-1][1];let G=Jc(M.stops.map((he=>he[0])),b),X=(function(he,oe,ke,ge){let Ue=ge-ke,je=he-ke;return Ue===0?0:oe===1?je/Ue:(Math.pow(oe,je)-1)/(Math.pow(oe,Ue)-1)})(b,D,M.stops[G][0],M.stops[G+1][0]),Z=M.stops[G][1],re=M.stops[G+1][1],Q=Ks[h.type]||m0;return typeof Z.evaluate=="function"?{evaluate(...he){let oe=Z.evaluate.apply(void 0,he),ke=re.evaluate.apply(void 0,he);if(oe!==void 0&&ke!==void 0)return Q(oe,ke,X,M.colorSpace)}}:Q(Z,re,X,M.colorSpace)}function ul(M,h,b){switch(h.type){case"color":b=ii.parse(b);break;case"formatted":b=$a.fromString(b.toString());break;case"resolvedImage":b=so.fromString(b.toString());break;case"padding":b=Ka.parse(b);break;case"colorArray":b=Ni.parse(b);break;case"numberArray":b=Oa.parse(b);break;default:La(b)===h.type||h.type==="enum"&&h.values[b]||(b=void 0)}return Hh(b,M.default,h.default)}jl.register(Tl,{error:[{kind:"error"},[Vt],(M,[h])=>{throw new ka(h.evaluate(M))}],typeof:[Vt,[Jr],(M,[h])=>Xi(la(h.evaluate(M)))],"to-rgba":[va(At,4),[Ut],(M,[h])=>{let[b,D,z,G]=h.evaluate(M).rgb;return[255*b,255*D,255*z,G]}],rgb:[Ut,[At,At,At],Uh],rgba:[Ut,[At,At,At,At],Uh],has:{type:Qt,overloads:[[[Vt],(M,[h])=>Vh(h.evaluate(M),M.properties())],[[Vt,rn],(M,[h,b])=>Vh(h.evaluate(M),b.evaluate(M))]]},get:{type:Jr,overloads:[[[Vt],(M,[h])=>jd(h.evaluate(M),M.properties())],[[Vt,rn],(M,[h,b])=>jd(h.evaluate(M),b.evaluate(M))]]},"feature-state":[Jr,[Vt],(M,[h])=>jd(h.evaluate(M),M.featureState||{})],properties:[rn,[],M=>M.properties()],"geometry-type":[Vt,[],M=>M.geometryType()],id:[Jr,[],M=>M.id()],zoom:[At,[],M=>M.globals.zoom],"heatmap-density":[At,[],M=>M.globals.heatmapDensity||0],elevation:[At,[],M=>M.globals.elevation||0],"line-progress":[At,[],M=>M.globals.lineProgress||0],accumulated:[Jr,[],M=>M.globals.accumulated===void 0?null:M.globals.accumulated],"+":[At,pc(At),(M,h)=>{let b=0;for(let D of h)b+=D.evaluate(M);return b}],"*":[At,pc(At),(M,h)=>{let b=1;for(let D of h)b*=D.evaluate(M);return b}],"-":{type:At,overloads:[[[At,At],(M,[h,b])=>h.evaluate(M)-b.evaluate(M)],[[At],(M,[h])=>-h.evaluate(M)]]},"/":[At,[At,At],(M,[h,b])=>h.evaluate(M)/b.evaluate(M)],"%":[At,[At,At],(M,[h,b])=>h.evaluate(M)%b.evaluate(M)],ln2:[At,[],()=>Math.LN2],pi:[At,[],()=>Math.PI],e:[At,[],()=>Math.E],"^":[At,[At,At],(M,[h,b])=>Math.pow(h.evaluate(M),b.evaluate(M))],sqrt:[At,[At],(M,[h])=>Math.sqrt(h.evaluate(M))],log10:[At,[At],(M,[h])=>Math.log(h.evaluate(M))/Math.LN10],ln:[At,[At],(M,[h])=>Math.log(h.evaluate(M))],log2:[At,[At],(M,[h])=>Math.log(h.evaluate(M))/Math.LN2],sin:[At,[At],(M,[h])=>Math.sin(h.evaluate(M))],cos:[At,[At],(M,[h])=>Math.cos(h.evaluate(M))],tan:[At,[At],(M,[h])=>Math.tan(h.evaluate(M))],asin:[At,[At],(M,[h])=>Math.asin(h.evaluate(M))],acos:[At,[At],(M,[h])=>Math.acos(h.evaluate(M))],atan:[At,[At],(M,[h])=>Math.atan(h.evaluate(M))],min:[At,pc(At),(M,h)=>Math.min(...h.map((b=>b.evaluate(M))))],max:[At,pc(At),(M,h)=>Math.max(...h.map((b=>b.evaluate(M))))],abs:[At,[At],(M,[h])=>Math.abs(h.evaluate(M))],round:[At,[At],(M,[h])=>{let b=h.evaluate(M);return b<0?-Math.round(-b):Math.round(b)}],floor:[At,[At],(M,[h])=>Math.floor(h.evaluate(M))],ceil:[At,[At],(M,[h])=>Math.ceil(h.evaluate(M))],"filter-==":[Qt,[Vt,Jr],(M,[h,b])=>M.properties()[h.value]===b.value],"filter-id-==":[Qt,[Jr],(M,[h])=>M.id()===h.value],"filter-type-==":[Qt,[Vt],(M,[h])=>M.geometryType()===h.value],"filter-<":[Qt,[Vt,Jr],(M,[h,b])=>{let D=M.properties()[h.value],z=b.value;return typeof D==typeof z&&D{let b=M.id(),D=h.value;return typeof b==typeof D&&b":[Qt,[Vt,Jr],(M,[h,b])=>{let D=M.properties()[h.value],z=b.value;return typeof D==typeof z&&D>z}],"filter-id->":[Qt,[Jr],(M,[h])=>{let b=M.id(),D=h.value;return typeof b==typeof D&&b>D}],"filter-<=":[Qt,[Vt,Jr],(M,[h,b])=>{let D=M.properties()[h.value],z=b.value;return typeof D==typeof z&&D<=z}],"filter-id-<=":[Qt,[Jr],(M,[h])=>{let b=M.id(),D=h.value;return typeof b==typeof D&&b<=D}],"filter->=":[Qt,[Vt,Jr],(M,[h,b])=>{let D=M.properties()[h.value],z=b.value;return typeof D==typeof z&&D>=z}],"filter-id->=":[Qt,[Jr],(M,[h])=>{let b=M.id(),D=h.value;return typeof b==typeof D&&b>=D}],"filter-has":[Qt,[Jr],(M,[h])=>h.value in M.properties()],"filter-has-id":[Qt,[],M=>M.id()!==null&&M.id()!==void 0],"filter-type-in":[Qt,[va(Vt)],(M,[h])=>h.value.indexOf(M.geometryType())>=0],"filter-id-in":[Qt,[va(Jr)],(M,[h])=>h.value.indexOf(M.id())>=0],"filter-in-small":[Qt,[Vt,va(Jr)],(M,[h,b])=>b.value.indexOf(M.properties()[h.value])>=0],"filter-in-large":[Qt,[Vt,va(Jr)],(M,[h,b])=>(function(D,z,G,X){for(;G<=X;){let Z=G+X>>1;if(z[Z]===D)return!0;z[Z]>D?X=Z-1:G=Z+1}return!1})(M.properties()[h.value],b.value,0,b.value.length-1)],all:{type:Qt,overloads:[[[Qt,Qt],(M,[h,b])=>h.evaluate(M)&&b.evaluate(M)],[pc(Qt),(M,h)=>{for(let b of h)if(!b.evaluate(M))return!1;return!0}]]},any:{type:Qt,overloads:[[[Qt,Qt],(M,[h,b])=>h.evaluate(M)||b.evaluate(M)],[pc(Qt),(M,h)=>{for(let b of h)if(b.evaluate(M))return!0;return!1}]]},"!":[Qt,[Qt],(M,[h])=>!h.evaluate(M)],"is-supported-script":[Qt,[Vt],(M,[h])=>{let b=M.globals&&M.globals.isSupportedScript;return!b||b(h.evaluate(M))}],upcase:[Vt,[Vt],(M,[h])=>h.evaluate(M).toUpperCase()],downcase:[Vt,[Vt],(M,[h])=>h.evaluate(M).toLowerCase()],concat:[Vt,pc(Jr),(M,h)=>h.map((b=>As(b.evaluate(M)))).join("")],split:[va(Vt),[Vt,Vt],(M,[h,b])=>h.evaluate(M).split(b.evaluate(M))],join:[Vt,[va(Vt),Vt],(M,[h,b])=>h.evaluate(M).join(b.evaluate(M))],"resolved-locale":[Vt,[qn],(M,[h])=>h.evaluate(M).resolvedLocale()]});class Wl{constructor(h,b,D){this.expression=h,this._warningHistory={},this._evaluator=new _u,this._defaultValue=b?(function(z){if(z.type==="color"&&Rf(z.default))return new ii(0,0,0,0);switch(z.type){case"color":return ii.parse(z.default)||null;case"padding":return Ka.parse(z.default)||null;case"numberArray":return Oa.parse(z.default)||null;case"colorArray":return Ni.parse(z.default)||null;case"variableAnchorOffsetCollection":return yo.parse(z.default)||null;case"projectionDefinition":return oo.parse(z.default)||null;default:return z.default===void 0?null:z.default}})(b):null,this._enumValues=b&&b.type==="enum"?b.values:null,this._globalState=D}evaluateWithoutErrorHandling(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._evaluator.globals=h,this._evaluator.feature=b,this._evaluator.featureState=D,this._evaluator.canonical=z,this._evaluator.availableImages=G||null,this._evaluator.formattedSection=X,this.expression.evaluate(this._evaluator)}evaluate(h,b,D,z,G,X){this._globalState&&(h=hr(h,this._globalState)),this._evaluator.globals=h,this._evaluator.feature=b||null,this._evaluator.featureState=D||null,this._evaluator.canonical=z,this._evaluator.availableImages=G||null,this._evaluator.formattedSection=X||null;try{let Z=this.expression.evaluate(this._evaluator);if(Z==null||typeof Z=="number"&&Z!=Z)return this._defaultValue;if(this._enumValues&&!(Z in this._enumValues))throw new ka(`Expected value to be one of ${Object.keys(this._enumValues).map((re=>JSON.stringify(re))).join(", ")}, but found ${JSON.stringify(Z)} instead.`);return Z}catch(Z){return this._warningHistory[Z.message]||(this._warningHistory[Z.message]=!0,typeof console!="undefined"&&console.warn(Z.message)),this._defaultValue}}}function If(M){return Array.isArray(M)&&M.length>0&&typeof M[0]=="string"&&M[0]in Tl}function vh(M,h,b){let D=new Gu(Tl,gc,[],h?(function(G){let X={color:Ut,string:Vt,number:At,enum:Vt,boolean:Qt,formatted:ri,padding:Jn,numberArray:Vi,colorArray:Ii,projectionDefinition:_r,resolvedImage:ra,variableAnchorOffsetCollection:ha};return G.type==="array"?va(X[G.value]||Jr,G.length):X[G.type]})(h):void 0),z=D.parse(M,void 0,void 0,void 0,h&&h.type==="string"?{typeAnnotation:"coerce"}:void 0);return z?Gh(new Wl(z,h,b)):Xu(D.errors)}class zf{constructor(h,b,D){this.kind=h,this._styleExpression=b,this.isStateDependent=h!=="constant"&&!sf(b.expression),this.globalStateRefs=zt(b.expression),this._globalState=D}evaluateWithoutErrorHandling(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(h,b,D,z,G,X)}evaluate(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._styleExpression.evaluate(h,b,D,z,G,X)}}class qf{constructor(h,b,D,z,G){this.kind=h,this.zoomStops=D,this._styleExpression=b,this.isStateDependent=h!=="camera"&&!sf(b.expression),this.globalStateRefs=zt(b.expression),this.interpolationType=z,this._globalState=G}evaluateWithoutErrorHandling(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(h,b,D,z,G,X)}evaluate(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._styleExpression.evaluate(h,b,D,z,G,X)}interpolationFactor(h,b,D){return this.interpolationType?Uo.interpolationFactor(this.interpolationType,h,b,D):0}}function Ze(M,h,b){let D=vh(M,h,b);if(D.result==="error")return D;let z=D.value.expression,G=of(z);if(!G&&!Pc(h))return Xu([new Zr("","data expressions not supported")]);let X=bd(z,["zoom"]);if(!X&&!Ff(h))return Xu([new Zr("","zoom expressions not supported")]);let Z=Wt(z);return Z||X?Z instanceof Zr?Xu([Z]):Z instanceof Uo&&!Df(h)?Xu([new Zr("",'"interpolate" expressions cannot be used with this property')]):Gh(Z?new qf(G?"camera":"composite",D.value,Z.labels,Z instanceof Uo?Z.interpolation:void 0,b):new zf(G?"constant":"source",D.value,b)):Xu([new Zr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class yt{constructor(h,b){this._parameters=h,this._specification=b,Fr(this,wd(this._parameters,this._specification))}static deserialize(h){return new yt(h._parameters,h._specification)}static serialize(h){return{_parameters:h._parameters,_specification:h._specification}}}function Wt(M){let h=null;if(M instanceof Ja)h=Wt(M.result);else if(M instanceof Ef){for(let b of M.args)if(h=Wt(b),h)break}else(M instanceof lu||M instanceof Uo)&&M.input instanceof jl&&M.input.name==="zoom"&&(h=M);return h instanceof Zr||M.eachChild((b=>{let D=Wt(b);D instanceof Zr?h=D:!h&&D?h=new Zr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):h&&D&&h!==D&&(h=new Zr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),h}function zt(M,h=new Set){return M instanceof Nh&&h.add(M.key),M.eachChild((b=>{zt(b,h)})),h}function hr(M,h){let{zoom:b,heatmapDensity:D,elevation:z,lineProgress:G,isSupportedScript:X,accumulated:Z}=M!=null?M:{};return{zoom:b,heatmapDensity:D,elevation:z,lineProgress:G,isSupportedScript:X,accumulated:Z,globalState:h}}function Ur(M){if(M===!0||M===!1)return!0;if(!Array.isArray(M)||M.length===0)return!1;switch(M[0]){case"has":return M.length>=2&&M[1]!=="$id"&&M[1]!=="$type";case"in":return M.length>=3&&(typeof M[1]!="string"||Array.isArray(M[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return M.length!==3||Array.isArray(M[1])||Array.isArray(M[2]);case"any":case"all":for(let h of M.slice(1))if(!Ur(h)&&typeof h!="boolean")return!1;return!0;default:return!0}}let Qr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function cn(M,h){if(M==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Ur(M)||(M=en(M));let b=vh(M,Qr,h);if(b.result==="error")throw new Error(b.value.map((D=>`${D.key}: ${D.message}`)).join(", "));return{filter:(D,z,G)=>b.value.evaluate(D,z,{},G),needGeometry:Fn(M),getGlobalStateRefs:()=>zt(b.value.expression)}}function yn(M,h){return Mh?1:0}function Fn(M){if(!Array.isArray(M))return!1;if(M[0]==="within"||M[0]==="distance")return!0;for(let h=1;h"||h==="<="||h===">="?vn(M[1],M[2],h):h==="any"?(b=M.slice(1),["any"].concat(b.map(en))):h==="all"?["all"].concat(M.slice(1).map(en)):h==="none"?["all"].concat(M.slice(1).map(en).map(On)):h==="in"?mn(M[1],M.slice(2)):h==="!in"?On(mn(M[1],M.slice(2))):h==="has"?Pn(M[1]):h!=="!has"||On(Pn(M[1]));var b}function vn(M,h,b){switch(M){case"$type":return[`filter-type-${b}`,h];case"$id":return[`filter-id-${b}`,h];default:return[`filter-${b}`,M,h]}}function mn(M,h){if(h.length===0)return!1;switch(M){case"$type":return["filter-type-in",["literal",h]];case"$id":return["filter-id-in",["literal",h]];default:return h.length>200&&!h.some((b=>typeof b!=typeof h[0]))?["filter-in-large",M,["literal",h.sort(yn)]]:["filter-in-small",M,["literal",h]]}}function Pn(M){switch(M){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",M]}}function On(M){return["!",M]}function ki(M){let h=typeof M;if(h==="number"||h==="boolean"||h==="string"||M==null)return JSON.stringify(M);if(Array.isArray(M)){let z="[";for(let G of M)z+=`${ki(G)},`;return`${z}]`}let b=Object.keys(M).sort(),D="{";for(let z=0;zD.maximum?[new xr(h,b,`${b} is greater than the maximum value ${D.maximum}`)]:[]}function Ha(M){let h=M.valueSpec,b=pi(M.value.type),D,z,G,X={},Z=b!=="categorical"&&M.value.property===void 0,re=!Z,Q=La(M.value.stops)==="array"&&La(M.value.stops[0])==="array"&&La(M.value.stops[0][0])==="object",he=Gn({key:M.key,value:M.value,valueSpec:M.styleSpec.function,validateSpec:M.validateSpec,style:M.style,styleSpec:M.styleSpec,objectElementValidators:{stops:function(ge){if(b==="identity")return[new xr(ge.key,ge.value,'identity function may not have a "stops" property')];let Ue=[],je=ge.value;return Ue=Ue.concat(Zi({key:ge.key,value:je,valueSpec:ge.valueSpec,validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec,arrayElementValidator:oe})),La(je)==="array"&&je.length===0&&Ue.push(new xr(ge.key,je,"array must have at least one stop")),Ue},default:function(ge){return ge.validateSpec({key:ge.key,value:ge.value,valueSpec:h,validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec})}}});return b==="identity"&&Z&&he.push(new xr(M.key,M.value,'missing required property "property"')),b==="identity"||M.value.stops||he.push(new xr(M.key,M.value,'missing required property "stops"')),b==="exponential"&&M.valueSpec.expression&&!Df(M.valueSpec)&&he.push(new xr(M.key,M.value,"exponential functions not supported")),M.styleSpec.$version>=8&&(re&&!Pc(M.valueSpec)?he.push(new xr(M.key,M.value,"property functions not supported")):Z&&!Ff(M.valueSpec)&&he.push(new xr(M.key,M.value,"zoom functions not supported"))),b!=="categorical"&&!Q||M.value.property!==void 0||he.push(new xr(M.key,M.value,'"property" property is required')),he;function oe(ge){let Ue=[],je=ge.value,vt=ge.key;if(La(je)!=="array")return[new xr(vt,je,`array expected, ${La(je)} found`)];if(je.length!==2)return[new xr(vt,je,`array length 2 expected, length ${je.length} found`)];if(Q){if(La(je[0])!=="object")return[new xr(vt,je,`object expected, ${La(je[0])} found`)];if(je[0].zoom===void 0)return[new xr(vt,je,"object stop key must have zoom")];if(je[0].value===void 0)return[new xr(vt,je,"object stop key must have value")];if(G&&G>pi(je[0].zoom))return[new xr(vt,je[0].zoom,"stop zoom values must appear in ascending order")];pi(je[0].zoom)!==G&&(G=pi(je[0].zoom),z=void 0,X={}),Ue=Ue.concat(Gn({key:`${vt}[0]`,value:je[0],valueSpec:{zoom:{}},validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec,objectElementValidators:{zoom:na,value:ke}}))}else Ue=Ue.concat(ke({key:`${vt}[0]`,value:je[0],validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec},je));return If(Un(je[1]))?Ue.concat([new xr(`${vt}[1]`,je[1],"expressions are not allowed in function stops.")]):Ue.concat(ge.validateSpec({key:`${vt}[1]`,value:je[1],valueSpec:h,validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec}))}function ke(ge,Ue){let je=La(ge.value),vt=pi(ge.value),gt=ge.value!==null?ge.value:Ue;if(D){if(je!==D)return[new xr(ge.key,gt,`${je} stop domain type must match previous stop domain type ${D}`)]}else D=je;if(je!=="number"&&je!=="string"&&je!=="boolean")return[new xr(ge.key,gt,"stop domain value must be a number, string, or boolean")];if(je!=="number"&&b!=="categorical"){let It=`number expected, ${je} found`;return Pc(h)&&b===void 0&&(It+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new xr(ge.key,gt,It)]}return b!=="categorical"||je!=="number"||isFinite(vt)&&Math.floor(vt)===vt?b!=="categorical"&&je==="number"&&z!==void 0&&vtnew xr(`${M.key}${D.key}`,M.value,D.message)));let b=h.value.expression||h.value._styleExpression.expression;if(M.expressionContext==="property"&&M.propertyKey==="text-font"&&!b.outputDefined())return[new xr(M.key,M.value,`Invalid data expression for "${M.propertyKey}". Output values must be contained as literals within the expression.`)];if(M.expressionContext==="property"&&M.propertyType==="layout"&&!sf(b))return[new xr(M.key,M.value,'"feature-state" data expressions are not supported with layout properties.')];if(M.expressionContext==="filter"&&!sf(b))return[new xr(M.key,M.value,'"feature-state" data expressions are not supported with filters.')];if(M.expressionContext&&M.expressionContext.indexOf("cluster")===0){if(!bd(b,["zoom","feature-state"]))return[new xr(M.key,M.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(M.expressionContext==="cluster-initial"&&!of(b))return[new xr(M.key,M.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ya(M){let h=M.key,b=M.value,D=La(b);return D!=="string"?[new xr(h,b,`color expected, ${D} found`)]:ii.parse(String(b))?[]:[new xr(h,b,`color expected, "${b}" found`)]}function ho(M){let h=M.key,b=M.value,D=M.valueSpec,z=[];return Array.isArray(D.values)?D.values.indexOf(pi(b))===-1&&z.push(new xr(h,b,`expected one of [${D.values.join(", ")}], ${JSON.stringify(b)} found`)):Object.keys(D.values).indexOf(pi(b))===-1&&z.push(new xr(h,b,`expected one of [${Object.keys(D.values).join(", ")}], ${JSON.stringify(b)} found`)),z}function Pa(M){return Ur(Un(M.value))?Qa(Fr({},M,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Js(M)}function Js(M){let h=M.value,b=M.key;if(La(h)!=="array")return[new xr(b,h,`array expected, ${La(h)} found`)];let D=M.styleSpec,z,G=[];if(h.length<1)return[new xr(b,h,"filter array must have at least 1 element")];switch(G=G.concat(ho({key:`${b}[0]`,value:h[0],valueSpec:D.filter_operator,style:M.style,styleSpec:M.styleSpec})),pi(h[0])){case"<":case"<=":case">":case">=":h.length>=2&&pi(h[1])==="$type"&&G.push(new xr(b,h,`"$type" cannot be use with operator "${h[0]}"`));case"==":case"!=":h.length!==3&&G.push(new xr(b,h,`filter array for operator "${h[0]}" must have 3 elements`));case"in":case"!in":h.length>=2&&(z=La(h[1]),z!=="string"&&G.push(new xr(`${b}[1]`,h[1],`string expected, ${z} found`)));for(let X=2;X{oe in z&&D.push(new xr(G,z[oe],`"${oe}" is prohibited for ref layers`))})),X.layers.forEach((oe=>{pi(oe.id)===Q&&(he=oe)})),he?he.ref?D.push(new xr(G,z.ref,"ref cannot reference another ref layer")):re=pi(he.type):D.push(new xr(G,z.ref,`ref layer "${Q}" not found`))}else if(re!=="background")if(z.source){let he=X.sources&&X.sources[z.source],oe=he&&pi(he.type);he?oe==="vector"&&re==="raster"?D.push(new xr(G,z.source,`layer "${z.id}" requires a raster source`)):oe!=="raster-dem"&&re==="hillshade"||oe!=="raster-dem"&&re==="color-relief"?D.push(new xr(G,z.source,`layer "${z.id}" requires a raster-dem source`)):oe==="raster"&&re!=="raster"?D.push(new xr(G,z.source,`layer "${z.id}" requires a vector source`)):oe!=="vector"||z["source-layer"]?oe==="raster-dem"&&re!=="hillshade"&&re!=="color-relief"?D.push(new xr(G,z.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):re!=="line"||!z.paint||!z.paint["line-gradient"]||oe==="geojson"&&he.lineMetrics||D.push(new xr(G,z,`layer "${z.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):D.push(new xr(G,z,`layer "${z.id}" must specify a "source-layer"`)):D.push(new xr(G,z.source,`source "${z.source}" not found`))}else D.push(new xr(G,z,'missing required property "source"'));return re==="raster"&&(!((h=z.paint)===null||h===void 0)&&h.resampling)&&(!((b=z.paint)===null||b===void 0)&&b["raster-resampling"])&&D.push(new xr(G,z.paint,`layer "${z.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),D=D.concat(Gn({key:G,value:z,valueSpec:Z.layer,style:M.style,styleSpec:M.styleSpec,validateSpec:M.validateSpec,objectElementValidators:{"*":()=>[],type:()=>M.validateSpec({key:`${G}.type`,value:z.type,valueSpec:Z.layer.type,style:M.style,styleSpec:M.styleSpec,validateSpec:M.validateSpec,object:z,objectKey:"type"}),filter:Pa,layout:he=>Gn({layer:z,key:he.key,value:he.value,style:he.style,styleSpec:he.styleSpec,validateSpec:he.validateSpec,objectElementValidators:{"*":oe=>oi(Fr({layerType:re},oe))}}),paint:he=>Gn({layer:z,key:he.key,value:he.value,style:he.style,styleSpec:he.styleSpec,validateSpec:he.validateSpec,objectElementValidators:{"*":oe=>Io(Fr({layerType:re},oe))}})}})),D}function Go(M){let h=M.value,b=M.key,D=La(h);return D!=="string"?[new xr(b,h,`string expected, ${D} found`)]:[]}let Qs={promoteId:function({key:M,value:h}){if(La(h)==="string")return Go({key:M,value:h});{let b=[];for(let D in h)b.push(...Go({key:`${M}.${D}`,value:h[D]}));return b}}};function zl(M){let h=M.value,b=M.key,D=M.styleSpec,z=M.style,G=M.validateSpec;if(!h.type)return[new xr(b,h,'"type" is required')];let X=pi(h.type),Z;switch(X){case"vector":case"raster":return Z=Gn({key:b,value:h,valueSpec:D[`source_${X.replace("-","_")}`],style:M.style,styleSpec:D,objectElementValidators:Qs,validateSpec:G}),Z;case"raster-dem":return Z=(function(re){var Q;let he=(Q=re.sourceName)!==null&&Q!==void 0?Q:"",oe=re.value,ke=re.styleSpec,ge=ke.source_raster_dem,Ue=re.style,je=[],vt=La(oe);if(oe===void 0)return je;if(vt!=="object")return je.push(new xr("source_raster_dem",oe,`object expected, ${vt} found`)),je;let gt=pi(oe.encoding)==="custom",It=["redFactor","greenFactor","blueFactor","baseShift"],_t=re.value.encoding?`"${re.value.encoding}"`:"Default";for(let qt in oe)!gt&&It.includes(qt)?je.push(new xr(qt,oe[qt],`In "${he}": "${qt}" is only valid when "encoding" is set to "custom". ${_t} encoding found`)):ge[qt]?je=je.concat(re.validateSpec({key:qt,value:oe[qt],valueSpec:ge[qt],validateSpec:re.validateSpec,style:Ue,styleSpec:ke})):je.push(new xr(qt,oe[qt],`unknown property "${qt}"`));return je})({sourceName:b,value:h,style:M.style,styleSpec:D,validateSpec:G}),Z;case"geojson":if(Z=Gn({key:b,value:h,valueSpec:D.source_geojson,style:z,styleSpec:D,validateSpec:G,objectElementValidators:Qs}),h.cluster)for(let re in h.clusterProperties){let[Q,he]=h.clusterProperties[re],oe=typeof Q=="string"?[Q,["accumulated"],["get",re]]:Q;Z.push(...Qa({key:`${b}.${re}.map`,value:he,expressionContext:"cluster-map"})),Z.push(...Qa({key:`${b}.${re}.reduce`,value:oe,expressionContext:"cluster-reduce"}))}return Z;case"video":return Gn({key:b,value:h,valueSpec:D.source_video,style:z,validateSpec:G,styleSpec:D});case"image":return Gn({key:b,value:h,valueSpec:D.source_image,style:z,validateSpec:G,styleSpec:D});case"canvas":return[new xr(b,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return ho({key:`${b}.type`,value:h.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function cu(M){let h=M.value,b=M.styleSpec,D=b.light,z=M.style,G=[],X=La(h);if(h===void 0)return G;if(X!=="object")return G=G.concat([new xr("light",h,`object expected, ${X} found`)]),G;for(let Z in h){let re=Z.match(/^(.*)-transition$/);G=G.concat(re&&D[re[1]]&&D[re[1]].transition?M.validateSpec({key:Z,value:h[Z],valueSpec:b.transition,validateSpec:M.validateSpec,style:z,styleSpec:b}):D[Z]?M.validateSpec({key:Z,value:h[Z],valueSpec:D[Z],validateSpec:M.validateSpec,style:z,styleSpec:b}):[new xr(Z,h[Z],`unknown property "${Z}"`)])}return G}function Zu(M){let h=M.value,b=M.styleSpec,D=b.sky,z=M.style,G=La(h);if(h===void 0)return[];if(G!=="object")return[new xr("sky",h,`object expected, ${G} found`)];let X=[];for(let Z in h)X=X.concat(D[Z]?M.validateSpec({key:Z,value:h[Z],valueSpec:D[Z],style:z,styleSpec:b}):[new xr(Z,h[Z],`unknown property "${Z}"`)]);return X}function mc(M){let h=M.value,b=M.styleSpec,D=b.terrain,z=M.style,G=[],X=La(h);if(h===void 0)return G;if(X!=="object")return G=G.concat([new xr("terrain",h,`object expected, ${X} found`)]),G;for(let Z in h)G=G.concat(D[Z]?M.validateSpec({key:Z,value:h[Z],valueSpec:D[Z],validateSpec:M.validateSpec,style:z,styleSpec:b}):[new xr(Z,h[Z],`unknown property "${Z}"`)]);return G}function Yl(M){let h=[],b=M.value,D=M.key;if(Array.isArray(b)){let z=[],G=[];for(let X in b)b[X].id&&z.includes(b[X].id)&&h.push(new xr(D,b,`all the sprites' ids must be unique, but ${b[X].id} is duplicated`)),z.push(b[X].id),b[X].url&&G.includes(b[X].url)&&h.push(new xr(D,b,`all the sprites' URLs must be unique, but ${b[X].url} is duplicated`)),G.push(b[X].url),h=h.concat(Gn({key:`${D}[${X}]`,value:b[X],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:M.validateSpec}));return h}return Go({key:D,value:b})}function lf(M){return!!M&&M.constructor===Object}function $u(M){return lf(M.value)?[]:[new xr(M.key,M.value,`object expected, ${La(M.value)} found`)]}let ph={"*":()=>[],array:Zi,boolean:function(M){let h=M.value,b=M.key,D=La(h);return D!=="boolean"?[new xr(b,h,`boolean expected, ${D} found`)]:[]},number:na,color:Ya,constants:qi,enum:ho,filter:Pa,function:Ha,layer:ro,object:Gn,source:zl,light:cu,sky:Zu,terrain:mc,projection:function(M){let h=M.value,b=M.styleSpec,D=b.projection,z=M.style,G=La(h);if(h===void 0)return[];if(G!=="object")return[new xr("projection",h,`object expected, ${G} found`)];let X=[];for(let Z in h)X=X.concat(D[Z]?M.validateSpec({key:Z,value:h[Z],valueSpec:D[Z],style:z,styleSpec:b}):[new xr(Z,h[Z],`unknown property "${Z}"`)]);return X},projectionDefinition:function(M){let h=M.key,b=M.value;b=b instanceof String?b.valueOf():b;let D=La(b);return D!=="array"||(function(z){return Array.isArray(z)&&z.length===3&&typeof z[0]=="string"&&typeof z[1]=="string"&&typeof z[2]=="number"})(b)||(function(z){return!!["interpolate","step","literal"].includes(z[0])})(b)?["array","string"].includes(D)?[]:[new xr(h,b,`projection expected, invalid type "${D}" found`)]:[new xr(h,b,`projection expected, invalid array ${JSON.stringify(b)} found`)]},string:Go,formatted:function(M){return Go(M).length===0?[]:Qa(M)},resolvedImage:function(M){return Go(M).length===0?[]:Qa(M)},padding:function(M){let h=M.key,b=M.value;if(La(b)==="array"){if(b.length<1||b.length>4)return[new xr(h,b,`padding requires 1 to 4 values; ${b.length} values found`)];let D={type:"number"},z=[];for(let G=0;G[]}})),M.constants&&(b=b.concat(qi({key:"constants",value:M.constants}))),Ju(b)}function fu(M){return function(h){return M(Object.assign({},h,{validateSpec:gh}))}}function Ju(M){return[].concat(M).sort(((h,b)=>h.line-b.line))}function Qu(M){return function(...h){return Ju(M.apply(this,h))}}Ku.source=Qu(fu(zl)),Ku.sprite=Qu(fu(Yl)),Ku.glyphs=Qu(fu(uf)),Ku.light=Qu(fu(cu)),Ku.sky=Qu(fu(Zu)),Ku.terrain=Qu(fu(mc)),Ku.state=Qu(fu($u)),Ku.layer=Qu(fu(ro)),Ku.filter=Qu(fu(Pa)),Ku.paintProperty=Qu(fu(Io)),Ku.layoutProperty=Qu(fu(oi));let Wd={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class x0{constructor(h,b){this._globalState=b,this.setValue(h)}evaluate(){var h;return(h=this._literalValue)!==null&&h!==void 0?h:this._compiledValue.evaluate({})}setValue(h){if(h==null||h==="visible"||h==="none")return this._literalValue=h==="none"?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let b=vh(h,Wd,this._globalState);if(b.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,new Error(b.value.map((D=>`${D.key}: ${D.message}`)).join(", "));this._literalValue=void 0,this._compiledValue=b.value,this._globalStateRefs=zt(b.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let Bf=Ct,Al=Ku,Xl=Al.light,cf=Al.sky,jh=Al.paintProperty,Wh=Al.layoutProperty;function Yh(M,h){let b=!1;if(h!=null&&h.length)for(let D of h)M.fire(new Ot(new Error(D.message))),b=!0;return b}class hu{constructor(h,b,D){let z=this.cells=[];if(h instanceof ArrayBuffer){this.arrayBuffer=h;let X=new Int32Array(this.arrayBuffer);h=X[0],this.d=(b=X[1])+2*(D=X[2]);for(let re=0;re=oe[ge+0]&&z>=oe[ge+1])?(Z[ke]=!0,X.push(he[ke])):Z[ke]=!1}}}_forEachCell(h,b,D,z,G,X,Z,re){let Q=this._convertToCellCoord(h),he=this._convertToCellCoord(b),oe=this._convertToCellCoord(D),ke=this._convertToCellCoord(z);for(let ge=Q;ge<=oe;ge++)for(let Ue=he;Ue<=ke;Ue++){let je=this.d*Ue+ge;if((!re||re(this._convertFromCellCoord(ge),this._convertFromCellCoord(Ue),this._convertFromCellCoord(ge+1),this._convertFromCellCoord(Ue+1)))&&G.call(this,h,b,D,z,je,X,Z,re))return}}_convertFromCellCoord(h){return(h-this.padding)/this.scale}_convertToCellCoord(h){return Math.max(0,Math.min(this.d-1,Math.floor(h*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let h=this.cells,b=3+this.cells.length+1+1,D=0;for(let X of this.cells)D+=X.length;let z=new Int32Array(b+D+this.keys.length+this.bboxes.length);z[0]=this.extent,z[1]=this.n,z[2]=this.padding;let G=b;for(let X=0;XD?(this.lastIntegerZoom=D+1,this.lastIntegerZoomTime=b):this.lastFloorZoom{try{return new RegExp(`\\p{sc=${b}}`,"u").source}catch(D){return null}})).filter((b=>b));return new RegExp(h.join("|"),"u")}let ur=Kt(["Arab","Dupl","Mong","Ougr","Syrc"]);function Sr(M){return!ur.test(String.fromCodePoint(M))}function Br(M){return!(lt(M)||(h=M,/[\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(h))));var h}let ln=Kt(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function wn(M){return ln.test(String.fromCodePoint(M))}function In(M,h){return!(!h&&wn(M)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(M)))}function gi(M){for(let h of M)if(wn(h.codePointAt(0)))return!0;return!1}let Bi=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(M){this.pluginStatus=M.pluginStatus,this.pluginURL=M.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(M){if(Bi.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=M.applyArabicShaping,this.processBidirectionalText=M.processBidirectionalText,this.processStyledBidirectionalText=M.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(M,h){return i(this,void 0,void 0,(function*(){if(this.isParsed())return this.getState();if(M.pluginStatus!=="loading")return this.setState(M),M;let b=M.pluginURL,D=new Promise((G=>{this.loadScriptResolve=G}));h(b);let z=new Promise((G=>setTimeout((()=>G()),this.TIMEOUT)));if(yield Promise.race([D,z]),this.isParsed()){let G={pluginStatus:"loaded",pluginURL:b};return this.setState(G),G}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${b}`)}))}};class mi{constructor(h,b){this.isSupportedScript=ia,this.zoom=h,b?(this.now=b.now||0,this.fadeDuration=b.fadeDuration||0,this.zoomHistory=b.zoomHistory||new Qe,this.transition=b.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Qe,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let h=this.zoom,b=h-Math.floor(h),D=this.crossFadingFactor();return h>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:b+(1-b)*D}:{fromScale:.5,toScale:1,t:1-(1-D)*b}}}function ia(M){return(function(h,b){for(let D of h)if(!In(D.codePointAt(0),b))return!1;return!0})(M,Bi.getRTLTextPluginStatus()==="loaded")}let ua="-transition";class lo{constructor(h,b,D){this.property=h,this.value=b,this.expression=(function(z,G,X){if(Rf(z))return new yt(z,G);if(If(z)){let Z=Ze(z,G,X);if(Z.result==="error")throw new Error(Z.value.map((re=>`${re.key}: ${re.message}`)).join(", "));return Z.value}{let Z=z;return G.type==="color"&&typeof z=="string"?Z=ii.parse(z):G.type!=="padding"||typeof z!="number"&&!Array.isArray(z)?G.type!=="numberArray"||typeof z!="number"&&!Array.isArray(z)?G.type!=="colorArray"||typeof z!="string"&&!Array.isArray(z)?G.type==="variableAnchorOffsetCollection"&&Array.isArray(z)?Z=yo.parse(z):G.type==="projectionDefinition"&&typeof z=="string"&&(Z=oo.parse(z)):Z=Ni.parse(z):Z=Oa.parse(z):Z=Ka.parse(z),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>Z}}})(b===void 0?h.specification.default:b,h.specification,D)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(h,b,D){return this.property.possiblyEvaluate(this,h,b,D)}}class Bo{constructor(h,b){this.property=h,this.value=new lo(h,void 0,b)}transitioned(h,b){return new ls(this.property,this.value,b,_e({},h.transition,this.transition),h.now)}untransitioned(){return new ls(this.property,this.value,null,{},0)}}class Ua{constructor(h,b){this._properties=h,this._values=Object.create(h.defaultTransitionablePropertyValues),this._globalState=b}hasProperty(h){return h in this._properties.defaultTransitionablePropertyValues}getValue(h){return ie(this._values[h].value.value)}setValue(h,b){Object.hasOwn(this._values,h)||(this._values[h]=new Bo(this._values[h].property,this._globalState)),this._values[h].value=new lo(this._values[h].property,b===null?void 0:ie(b),this._globalState)}getTransition(h){return ie(this._values[h].transition)}setTransition(h,b){Object.hasOwn(this._values,h)||(this._values[h]=new Bo(this._values[h].property,this._globalState)),this._values[h].transition=ie(b)||void 0}serialize(){let h={};for(let b of Object.keys(this._values)){let D=this.getValue(b);D!==void 0&&(h[b]=D);let z=this.getTransition(b);z!==void 0&&(h[`${b}${ua}`]=z)}return h}transitioned(h,b){let D=new cl(this._properties);for(let z of Object.keys(this._values))D._values[z]=this._values[z].transitioned(h,b._values[z]);return D}untransitioned(){let h=new cl(this._properties);for(let b of Object.keys(this._values))h._values[b]=this._values[b].untransitioned();return h}}class ls{constructor(h,b,D,z,G){this.property=h,this.value=b,this.begin=G+z.delay||0,this.end=this.begin+z.duration||0,h.specification.transition&&(z.delay||z.duration)&&(this.prior=D)}possiblyEvaluate(h,b,D){let z=h.now||0,G=this.value.possiblyEvaluate(h,b,D),X=this.prior;if(X){if(z>this.end)return this.prior=null,G;if(this.value.isDataDriven())return this.prior=null,G;if(zz.zoomHistory.lastIntegerZoom?{from:h,to:b}:{from:D,to:b}}interpolate(h){return h}}class Fc{constructor(h){this.specification=h}possiblyEvaluate(h,b,D,z){if(h.value!==void 0){if(h.expression.kind==="constant"){let G=h.expression.evaluate(b,null,{},D,z);return this._calculate(G,G,G,b)}return this._calculate(h.expression.evaluate(new mi(Math.floor(b.zoom-1),b)),h.expression.evaluate(new mi(Math.floor(b.zoom),b)),h.expression.evaluate(new mi(Math.floor(b.zoom+1),b)),b)}}_calculate(h,b,D,z){return z.zoom>z.zoomHistory.lastIntegerZoom?{from:h,to:b}:{from:D,to:b}}interpolate(h){return h}}class du{constructor(h){this.specification=h}possiblyEvaluate(h,b,D,z){return!!h.expression.evaluate(b,null,{},D,z)}interpolate(){return!1}}class ms{constructor(h){this.properties=h,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let b in h){let D=h[b];D.specification.overridable&&this.overridableProperties.push(b);let z=this.defaultPropertyValues[b]=new lo(D,void 0,void 0),G=this.defaultTransitionablePropertyValues[b]=new Bo(D,void 0);this.defaultTransitioningPropertyValues[b]=G.untransitioned(),this.defaultPossiblyEvaluatedValues[b]=z.possiblyEvaluate({})}}}_i("DataDrivenProperty",Di),_i("DataConstantProperty",wi),_i("CrossFadedDataDrivenProperty",fl),_i("CrossFadedProperty",Fc),_i("ColorRampProperty",du);let ff=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",ku=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class hl extends cr{constructor(h,b,D){if(super(),this.id=h.id,this.type=h.type,this._globalState=D,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=(function(z,G){return new x0(z,G)})(this.visibility,D),h.type!=="custom"&&(this.metadata=h.metadata,this.minzoom=h.minzoom,this.maxzoom=h.maxzoom,h.type!=="background"&&(this.source=h.source,this.sourceLayer=h["source-layer"],this.filter=h.filter,this._featureFilter=cn(h.filter,D)),b.layout&&(this._unevaluatedLayout=new Eu(b.layout,D)),b.paint)){this._transitionablePaint=new Ua(b.paint,D);for(let z in h.paint)this.setPaintProperty(z,h.paint[z],{validate:!1});for(let z in h.layout)this.setLayoutProperty(z,h.layout[z],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new yc(b.paint)}}setFilter(h){this.filter=h,this._featureFilter=cn(h,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(h){var b;if(h==="visibility")return this.visibility;if(!((b=this._transitionablePaint)===null||b===void 0)&&b.hasProperty(h))throw new Error(h+ff);if(!this._unevaluatedLayout)throw new Error(`Cannot get layout property "${h}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(h)}getLayoutAffectingGlobalStateRefs(){let h=new Set;for(let b of this._visibilityExpression.getGlobalStateRefs())h.add(b);if(this._unevaluatedLayout)for(let b in this._unevaluatedLayout._values){let D=this._unevaluatedLayout._values[b];for(let z of D.getGlobalStateRefs())h.add(z)}for(let b of this._featureFilter.getGlobalStateRefs())h.add(b);return h}getPaintAffectingGlobalStateRefs(){var h;let b=new globalThis.Map;if(this._transitionablePaint)for(let D in this._transitionablePaint._values){let z=this._transitionablePaint._values[D].value;for(let G of z.getGlobalStateRefs()){let X=(h=b.get(G))!==null&&h!==void 0?h:[];X.push({name:D,value:z.value}),b.set(G,X)}}return b}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(h,b,D={}){var z;if(h==="visibility")return this.visibility=b,this._visibilityExpression.setValue(b),void this.recalculateVisibility();!((z=this._transitionablePaint)===null||z===void 0)&&z.hasProperty(h)?this.fire(new Ot(new Error(h+ff))):b!=null&&this._validate(Wh,`layers.${this.id}.layout.${h}`,h,b,D)||this._unevaluatedLayout.setValue(h,b)}getPaintProperty(h){var b,D;if(h.endsWith(ua)){let z=h.slice(0,-11);if(z==="visibility"||!((b=this._unevaluatedLayout)===null||b===void 0)&&b.hasProperty(z))throw new Error(h+ku);return this._transitionablePaint.getTransition(z)}if(h==="visibility"||!((D=this._unevaluatedLayout)===null||D===void 0)&&D.hasProperty(h))throw new Error(h+ku);return this._transitionablePaint.getValue(h)}setPaintProperty(h,b,D={}){var z;if(h==="visibility"||!((z=this._unevaluatedLayout)===null||z===void 0)&&z.hasProperty(h))return this.fire(new Ot(new Error(h+ku))),!1;if(b!=null&&this._validate(jh,`layers.${this.id}.paint.${h}`,h,b,D))return!1;if(h.endsWith(ua))return this._transitionablePaint.setTransition(h.slice(0,-11),b||void 0),!1;{let G=this._transitionablePaint._values[h],X=G.property.specification["property-type"]==="cross-faded-data-driven",Z=G.value.isDataDriven(),re=G.value;this._transitionablePaint.setValue(h,b),this._handleSpecialPaintPropertyUpdate(h);let Q=this._transitionablePaint._values[h].value;return Q.isDataDriven()||Z||X||this._handleOverridablePaintPropertyUpdate(h,re,Q)}}_handleSpecialPaintPropertyUpdate(h){}_handleOverridablePaintPropertyUpdate(h,b,D){return!1}isHidden(h=this.minzoom,b=!1){return!!(this.minzoom&&h<(b?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&h>=this.maxzoom)||this._evaluatedVisibility==="none"}updateTransitions(h){this._transitioningPaint=this._transitionablePaint.transitioned(h,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(h,b){h.getCrossfadeParameters&&(this._crossfadeParameters=h.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(h,void 0,b)),this.paint=this._transitioningPaint.possiblyEvaluate(h,void 0,b)}serialize(){var h,b;let D={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:(h=this._unevaluatedLayout)===null||h===void 0?void 0:h.serialize(),paint:(b=this._transitionablePaint)===null||b===void 0?void 0:b.serialize()};return this.visibility&&(D.layout||(D.layout={}),D.layout.visibility=this.visibility),pe(D,((z,G)=>!(z===void 0||G==="layout"&&!Object.keys(z).length||G==="paint"&&!Object.keys(z).length)))}_validate(h,b,D,z,G={}){return(G==null?void 0:G.validate)!==!1&&Yh(this,h.call(Al,{key:b,layerType:this.type,objectKey:D,value:z,styleSpec:Ct,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let h in this.paint._values){let b=this.paint.get(h);if(b instanceof el&&Pc(b.property.specification)&&(b.value.kind==="source"||b.value.kind==="composite")&&b.value.isStateDependent)return!0}return!1}}let mh;var W={get paint(){return mh=mh||new ms({"raster-opacity":new wi(Ct.paint_raster["raster-opacity"]),"raster-hue-rotate":new wi(Ct.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new wi(Ct.paint_raster["raster-brightness-min"]),"raster-brightness-max":new wi(Ct.paint_raster["raster-brightness-max"]),"raster-saturation":new wi(Ct.paint_raster["raster-saturation"]),"raster-contrast":new wi(Ct.paint_raster["raster-contrast"]),resampling:new wi(Ct.paint_raster.resampling),"raster-resampling":new wi(Ct.paint_raster["raster-resampling"]),"raster-fade-duration":new wi(Ct.paint_raster["raster-fade-duration"])})}};class te extends hl{constructor(h,b){super(h,W,b)}}let ve={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Se{constructor(h,b){this._structArray=h,this._pos1=b*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Ee{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(h,b){return h._trim(),b&&(h.isTransferred=!0,b.push(h.arrayBuffer)),{length:h.length,arrayBuffer:h.arrayBuffer}}static deserialize(h){let b=Object.create(this.prototype);return b.arrayBuffer=h.arrayBuffer,b.length=h.length,b.capacity=h.arrayBuffer.byteLength/b.bytesPerElement,b._refreshViews(),b}_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(h){this.reserve(h),this.length=h}reserve(h){if(h>this.capacity){this.capacity=Math.max(h,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let b=this.uint8;this._refreshViews(),b&&this.uint8.set(b)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function Re(M,h=1){let b=0,D=0;return{members:M.map((z=>{let G=ve[z.type].BYTES_PER_ELEMENT,X=b=rt(b,Math.max(h,G)),Z=z.components||1;return D=Math.max(D,G),b+=G*Z,{name:z.name,type:z.type,components:Z,offset:X}})),size:rt(b,Math.max(D,h)),alignment:h}}function rt(M,h){return Math.ceil(M/h)*h}class He extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b){let D=this.length;return this.resize(D+1),this.emplace(D,h,b)}emplace(h,b,D){let z=2*h;return this.int16[z+0]=b,this.int16[z+1]=D,h}}He.prototype.bytesPerElement=4,_i("StructArrayLayout2i4",He);class pt extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=3*h;return this.int16[G+0]=b,this.int16[G+1]=D,this.int16[G+2]=z,h}}pt.prototype.bytesPerElement=6,_i("StructArrayLayout3i6",pt);class Ft extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z){let G=this.length;return this.resize(G+1),this.emplace(G,h,b,D,z)}emplace(h,b,D,z,G){let X=4*h;return this.int16[X+0]=b,this.int16[X+1]=D,this.int16[X+2]=z,this.int16[X+3]=G,h}}Ft.prototype.bytesPerElement=8,_i("StructArrayLayout4i8",Ft);class Rt extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X){let Z=this.length;return this.resize(Z+1),this.emplace(Z,h,b,D,z,G,X)}emplace(h,b,D,z,G,X,Z){let re=6*h;return this.int16[re+0]=b,this.int16[re+1]=D,this.int16[re+2]=z,this.int16[re+3]=G,this.int16[re+4]=X,this.int16[re+5]=Z,h}}Rt.prototype.bytesPerElement=12,_i("StructArrayLayout2i4i12",Rt);class ir extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X){let Z=this.length;return this.resize(Z+1),this.emplace(Z,h,b,D,z,G,X)}emplace(h,b,D,z,G,X,Z){let re=4*h,Q=8*h;return this.int16[re+0]=b,this.int16[re+1]=D,this.uint8[Q+4]=z,this.uint8[Q+5]=G,this.uint8[Q+6]=X,this.uint8[Q+7]=Z,h}}ir.prototype.bytesPerElement=8,_i("StructArrayLayout2i4ub8",ir);class nr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,b){let D=this.length;return this.resize(D+1),this.emplace(D,h,b)}emplace(h,b,D){let z=2*h;return this.float32[z+0]=b,this.float32[z+1]=D,h}}nr.prototype.bytesPerElement=8,_i("StructArrayLayout2f8",nr);class Cr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X,Z,re,Q,he){let oe=this.length;return this.resize(oe+1),this.emplace(oe,h,b,D,z,G,X,Z,re,Q,he)}emplace(h,b,D,z,G,X,Z,re,Q,he,oe){let ke=10*h;return this.uint16[ke+0]=b,this.uint16[ke+1]=D,this.uint16[ke+2]=z,this.uint16[ke+3]=G,this.uint16[ke+4]=X,this.uint16[ke+5]=Z,this.uint16[ke+6]=re,this.uint16[ke+7]=Q,this.uint16[ke+8]=he,this.uint16[ke+9]=oe,h}}Cr.prototype.bytesPerElement=20,_i("StructArrayLayout10ui20",Cr);class Vr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X,Z,re){let Q=this.length;return this.resize(Q+1),this.emplace(Q,h,b,D,z,G,X,Z,re)}emplace(h,b,D,z,G,X,Z,re,Q){let he=8*h;return this.uint16[he+0]=b,this.uint16[he+1]=D,this.uint16[he+2]=z,this.uint16[he+3]=G,this.uint16[he+4]=X,this.uint16[he+5]=Z,this.uint16[he+6]=re,this.uint16[he+7]=Q,h}}Vr.prototype.bytesPerElement=16,_i("StructArrayLayout8ui16",Vr);class sr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X,Z,re,Q,he,oe,ke){let ge=this.length;return this.resize(ge+1),this.emplace(ge,h,b,D,z,G,X,Z,re,Q,he,oe,ke)}emplace(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge){let Ue=12*h;return this.int16[Ue+0]=b,this.int16[Ue+1]=D,this.int16[Ue+2]=z,this.int16[Ue+3]=G,this.uint16[Ue+4]=X,this.uint16[Ue+5]=Z,this.uint16[Ue+6]=re,this.uint16[Ue+7]=Q,this.int16[Ue+8]=he,this.int16[Ue+9]=oe,this.int16[Ue+10]=ke,this.int16[Ue+11]=ge,h}}sr.prototype.bytesPerElement=24,_i("StructArrayLayout4i4ui4i24",sr);class br extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=3*h;return this.float32[G+0]=b,this.float32[G+1]=D,this.float32[G+2]=z,h}}br.prototype.bytesPerElement=12,_i("StructArrayLayout3f12",br);class kr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(h){let b=this.length;return this.resize(b+1),this.emplace(b,h)}emplace(h,b){return this.uint32[1*h+0]=b,h}}kr.prototype.bytesPerElement=4,_i("StructArrayLayout1ul4",kr);class Gr extends Ee{_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(h,b,D,z,G,X,Z,re,Q){let he=this.length;return this.resize(he+1),this.emplace(he,h,b,D,z,G,X,Z,re,Q)}emplace(h,b,D,z,G,X,Z,re,Q,he){let oe=10*h,ke=5*h;return this.int16[oe+0]=b,this.int16[oe+1]=D,this.int16[oe+2]=z,this.int16[oe+3]=G,this.int16[oe+4]=X,this.int16[oe+5]=Z,this.uint32[ke+3]=re,this.uint16[oe+8]=Q,this.uint16[oe+9]=he,h}}Gr.prototype.bytesPerElement=20,_i("StructArrayLayout6i1ul2ui20",Gr);class Wr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X){let Z=this.length;return this.resize(Z+1),this.emplace(Z,h,b,D,z,G,X)}emplace(h,b,D,z,G,X,Z){let re=6*h;return this.int16[re+0]=b,this.int16[re+1]=D,this.int16[re+2]=z,this.int16[re+3]=G,this.int16[re+4]=X,this.int16[re+5]=Z,h}}Wr.prototype.bytesPerElement=12,_i("StructArrayLayout2i2i2i12",Wr);class Ar extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G){let X=this.length;return this.resize(X+1),this.emplace(X,h,b,D,z,G)}emplace(h,b,D,z,G,X){let Z=4*h,re=8*h;return this.float32[Z+0]=b,this.float32[Z+1]=D,this.float32[Z+2]=z,this.int16[re+6]=G,this.int16[re+7]=X,h}}Ar.prototype.bytesPerElement=16,_i("StructArrayLayout2f1f2i16",Ar);class En extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X){let Z=this.length;return this.resize(Z+1),this.emplace(Z,h,b,D,z,G,X)}emplace(h,b,D,z,G,X,Z){let re=16*h,Q=4*h,he=8*h;return this.uint8[re+0]=b,this.uint8[re+1]=D,this.float32[Q+1]=z,this.float32[Q+2]=G,this.int16[he+6]=X,this.int16[he+7]=Z,h}}En.prototype.bytesPerElement=16,_i("StructArrayLayout2ub2f2i16",En);class zn extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=3*h;return this.uint16[G+0]=b,this.uint16[G+1]=D,this.uint16[G+2]=z,h}}zn.prototype.bytesPerElement=6,_i("StructArrayLayout3ui6",zn);class Zn extends Ee{_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(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt){let It=this.length;return this.resize(It+1),this.emplace(It,h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt)}emplace(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It){let _t=24*h,qt=12*h,tr=48*h;return this.int16[_t+0]=b,this.int16[_t+1]=D,this.uint16[_t+2]=z,this.uint16[_t+3]=G,this.uint32[qt+2]=X,this.uint32[qt+3]=Z,this.uint32[qt+4]=re,this.uint16[_t+10]=Q,this.uint16[_t+11]=he,this.uint16[_t+12]=oe,this.float32[qt+7]=ke,this.float32[qt+8]=ge,this.uint8[tr+36]=Ue,this.uint8[tr+37]=je,this.uint8[tr+38]=vt,this.uint32[qt+10]=gt,this.int16[_t+22]=It,h}}Zn.prototype.bytesPerElement=48,_i("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Zn);class ai extends Ee{_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(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It,_t,qt,tr,lr,qr,jr,_n,fn,Dn,Hn){let Ln=this.length;return this.resize(Ln+1),this.emplace(Ln,h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It,_t,qt,tr,lr,qr,jr,_n,fn,Dn,Hn)}emplace(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It,_t,qt,tr,lr,qr,jr,_n,fn,Dn,Hn,Ln){let un=32*h,ei=16*h;return this.int16[un+0]=b,this.int16[un+1]=D,this.int16[un+2]=z,this.int16[un+3]=G,this.int16[un+4]=X,this.int16[un+5]=Z,this.int16[un+6]=re,this.int16[un+7]=Q,this.uint16[un+8]=he,this.uint16[un+9]=oe,this.uint16[un+10]=ke,this.uint16[un+11]=ge,this.uint16[un+12]=Ue,this.uint16[un+13]=je,this.uint16[un+14]=vt,this.uint16[un+15]=gt,this.uint16[un+16]=It,this.uint16[un+17]=_t,this.uint16[un+18]=qt,this.uint16[un+19]=tr,this.uint16[un+20]=lr,this.uint16[un+21]=qr,this.uint16[un+22]=jr,this.uint32[ei+12]=_n,this.float32[ei+13]=fn,this.float32[ei+14]=Dn,this.uint16[un+30]=Hn,this.uint16[un+31]=Ln,h}}ai.prototype.bytesPerElement=64,_i("StructArrayLayout8i15ui1ul2f2ui64",ai);class Mi extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h){let b=this.length;return this.resize(b+1),this.emplace(b,h)}emplace(h,b){return this.float32[1*h+0]=b,h}}Mi.prototype.bytesPerElement=4,_i("StructArrayLayout1f4",Mi);class Si extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=3*h;return this.uint16[6*h+0]=b,this.float32[G+1]=D,this.float32[G+2]=z,h}}Si.prototype.bytesPerElement=12,_i("StructArrayLayout1ui2f12",Si);class ya extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=4*h;return this.uint32[2*h+0]=b,this.uint16[G+2]=D,this.uint16[G+3]=z,h}}ya.prototype.bytesPerElement=8,_i("StructArrayLayout1ul2ui8",ya);class Y extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b){let D=this.length;return this.resize(D+1),this.emplace(D,h,b)}emplace(h,b,D){let z=2*h;return this.uint16[z+0]=b,this.uint16[z+1]=D,h}}Y.prototype.bytesPerElement=4,_i("StructArrayLayout2ui4",Y);class d extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h){let b=this.length;return this.resize(b+1),this.emplace(b,h)}emplace(h,b){return this.uint16[1*h+0]=b,h}}d.prototype.bytesPerElement=2,_i("StructArrayLayout1ui2",d);class P extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,b,D,z){let G=this.length;return this.resize(G+1),this.emplace(G,h,b,D,z)}emplace(h,b,D,z,G){let X=4*h;return this.float32[X+0]=b,this.float32[X+1]=D,this.float32[X+2]=z,this.float32[X+3]=G,h}}P.prototype.bytesPerElement=16,_i("StructArrayLayout4f16",P);class N extends Se{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new o(this.anchorPointX,this.anchorPointY)}}N.prototype.size=20;class H extends Gr{get(h){return new N(this,h)}}_i("CollisionBoxArray",H);class $ extends Se{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(h){this._structArray.uint8[this._pos1+37]=h}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(h){this._structArray.uint8[this._pos1+38]=h}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(h){this._structArray.uint32[this._pos4+10]=h}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}$.prototype.size=48;class se extends Zn{get(h){return new $(this,h)}}_i("PlacedSymbolArray",se);class de extends Se{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(h){this._structArray.uint32[this._pos4+12]=h}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]}}de.prototype.size=64;class Ae extends ai{get(h){return new de(this,h)}}_i("SymbolInstanceArray",Ae);class Fe extends Mi{getoffsetX(h){return this.float32[1*h+0]}}_i("GlyphOffsetArray",Fe);class Ie extends pt{getx(h){return this.int16[3*h+0]}gety(h){return this.int16[3*h+1]}gettileUnitDistanceFromAnchor(h){return this.int16[3*h+2]}}_i("SymbolLineVertexArray",Ie);class Ye extends Se{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Ye.prototype.size=12;class st extends Si{get(h){return new Ye(this,h)}}_i("TextAnchorOffsetArray",st);class dt extends Se{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}dt.prototype.size=8;class Pe extends ya{get(h){return new dt(this,h)}}_i("FeatureIndexArray",Pe);class Xe extends He{}class at extends He{}class xt extends He{}class Et extends Rt{}class Bt extends ir{}class St extends nr{}class Pt extends Cr{}class $t extends Vr{}class Ht extends sr{}class dr extends br{}class Xr extends kr{}class Or extends Wr{}class $r extends En{}class Er extends zn{}class Tr extends Y{}let Rr=Re([{name:"a_pos",components:2,type:"Int16"}],4),{members:Lr}=Rr;class an{constructor(h=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=h}prepareSegment(h,b,D,z){let G=this.segments[this.segments.length-1];return h>an.MAX_VERTEX_ARRAY_LENGTH&&me(`Max vertices per segment is ${an.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${h}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${an.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!G||G.vertexLength+h>an.MAX_VERTEX_ARRAY_LENGTH||G.sortKey!==z?this.createNewSegment(b,D,z):G}createNewSegment(h,b,D){let z={vertexOffset:h.length,primitiveOffset:b.length,vertexLength:0,primitiveLength:0,vaos:{}};return D!==void 0&&(z.sortKey=D),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(z),z}getOrCreateLatestSegment(h,b,D){return this.prepareSegment(0,h,b,D)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let h of this.segments)for(let b in h.vaos)h.vaos[b].destroy()}static simpleSegment(h,b,D,z){return new an([{vertexOffset:h,primitiveOffset:b,vertexLength:D,primitiveLength:z,vaos:{},sortKey:0}])}}function on(M,h){return 256*(M=ue(Math.floor(M),0,255))+ue(Math.floor(h),0,255)}an.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,_i("SegmentVector",an);let Nn=Re([{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"}]),Yn=Re([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var yi,Sn,An,li={exports:{}},Vn={exports:{}},jn={exports:{}},Wn=(function(){if(An)return li.exports;An=1;var M=(yi||(yi=1,Vn.exports=function(b,D){var z,G,X,Z,re,Q,he,oe;for(G=b.length-(z=3&b.length),X=D,re=3432918353,Q=461845907,oe=0;oe>>16)*re&65535)<<16)&4294967295)<<15|he>>>17))*Q+(((he>>>16)*Q&65535)<<16)&4294967295)<<13|X>>>19))+((5*(X>>>16)&65535)<<16)&4294967295))+((58964+(Z>>>16)&65535)<<16);switch(he=0,z){case 3:he^=(255&b.charCodeAt(oe+2))<<16;case 2:he^=(255&b.charCodeAt(oe+1))<<8;case 1:X^=he=(65535&(he=(he=(65535&(he^=255&b.charCodeAt(oe)))*re+(((he>>>16)*re&65535)<<16)&4294967295)<<15|he>>>17))*Q+(((he>>>16)*Q&65535)<<16)&4294967295}return X^=b.length,X=2246822507*(65535&(X^=X>>>16))+((2246822507*(X>>>16)&65535)<<16)&4294967295,X=3266489909*(65535&(X^=X>>>13))+((3266489909*(X>>>16)&65535)<<16)&4294967295,(X^=X>>>16)>>>0}),Vn.exports),h=(Sn||(Sn=1,jn.exports=function(b,D){for(var z,G=b.length,X=D^G,Z=0;G>=4;)z=1540483477*(65535&(z=255&b.charCodeAt(Z)|(255&b.charCodeAt(++Z))<<8|(255&b.charCodeAt(++Z))<<16|(255&b.charCodeAt(++Z))<<24))+((1540483477*(z>>>16)&65535)<<16),X=1540483477*(65535&X)+((1540483477*(X>>>16)&65535)<<16)^(z=1540483477*(65535&(z^=z>>>24))+((1540483477*(z>>>16)&65535)<<16)),G-=4,++Z;switch(G){case 3:X^=(255&b.charCodeAt(Z+2))<<16;case 2:X^=(255&b.charCodeAt(Z+1))<<8;case 1:X=1540483477*(65535&(X^=255&b.charCodeAt(Z)))+((1540483477*(X>>>16)&65535)<<16)}return X=1540483477*(65535&(X^=X>>>13))+((1540483477*(X>>>16)&65535)<<16),(X^=X>>>15)>>>0}),jn.exports);return li.exports=M,li.exports.murmur3=M,li.exports.murmur2=h,li.exports})(),si=s(Wn);class zi{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(h,b,D,z){this.ids.push(da(h)),this.positions.push(b,D,z)}getPositions(h){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let b=da(h),D=0,z=this.ids.length-1;for(;D>1;this.ids[X]>=b?z=X:D=X+1}let G=[];for(;this.ids[D]===b;)G.push({index:this.positions[3*D],start:this.positions[3*D+1],end:this.positions[3*D+2]}),D++;return G}static serialize(h,b){let D=new Float64Array(h.ids),z=new Uint32Array(h.positions);return ui(D,z,0,D.length-1),b&&b.push(D.buffer,z.buffer),{ids:D,positions:z}}static deserialize(h){let b=new zi;return b.ids=h.ids,b.positions=h.positions,b.indexed=!0,b}}function da(M){let h=+M;return!isNaN(h)&&h<=Number.MAX_SAFE_INTEGER?h:si(String(M))}function ui(M,h,b,D){for(;b>1],G=b-1,X=D+1;for(;;){do G++;while(M[G]z);if(G>=X)break;Li(M,G,X),Li(h,3*G,3*X),Li(h,3*G+1,3*X+1),Li(h,3*G+2,3*X+2)}X-b`u_${z}`)),this.type=D}setUniform(h,b,D){h.set(D.constantOr(this.value))}getBinding(h,b,D){return this.type==="color"?new Os(h,b):new ca(h,b)}}class vo{constructor(h,b){this.uniformNames=b.map((D=>`u_${D}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(h,b){this.pixelRatioFrom=b.pixelRatio,this.pixelRatioTo=h.pixelRatio,this.patternFrom=b.tlbr,this.patternTo=h.tlbr}setConstantDashPositions(h,b){this.dashTo=[0,h.y,h.height,h.width],this.dashFrom=[0,b.y,b.height,b.width]}setUniform(h,b,D,z){let G=null;z==="u_pattern_to"?G=this.patternTo:z==="u_pattern_from"?G=this.patternFrom:z==="u_dasharray_to"?G=this.dashTo:z==="u_dasharray_from"?G=this.dashFrom:z==="u_pixel_ratio_to"?G=this.pixelRatioTo:z==="u_pixel_ratio_from"&&(G=this.pixelRatioFrom),G!==null&&h.set(G)}getBinding(h,b,D){return D.startsWith("u_pattern")||D.startsWith("u_dasharray_")?new Ia(h,b):new ca(h,b)}}class _o{constructor(h,b,D,z){this.expression=h,this.type=D,this.maxValue=0,this.paintVertexAttributes=b.map((G=>({name:`a_${G}`,type:"Float32",components:D==="color"?2:1,offset:0}))),this.paintVertexArray=new z}populatePaintArray(h,b,D){let z=this.paintVertexArray.length,G=this.expression.evaluate(new mi(0,D),b,{},D.canonical,[],D.formattedSection);this.paintVertexArray.resize(h),this._setPaintValue(z,h,G)}updatePaintArray(h,b,D,z,G){let X=this.expression.evaluate(new mi(0,G),D,z);this._setPaintValue(h,b,X)}_setPaintValue(h,b,D){if(this.type==="color"){let z=Na(D);for(let G=h;G`u_${Z}_t`)),this.type=D,this.useIntegerZoom=z,this.zoom=G,this.maxValue=0,this.paintVertexAttributes=b.map((Z=>({name:`a_${Z}`,type:"Float32",components:D==="color"?4:2,offset:0}))),this.paintVertexArray=new X}populatePaintArray(h,b,D){let z=this.expression.evaluate(new mi(this.zoom,D),b,{},D.canonical,[],D.formattedSection),G=this.expression.evaluate(new mi(this.zoom+1,D),b,{},D.canonical,[],D.formattedSection),X=this.paintVertexArray.length;this.paintVertexArray.resize(h),this._setPaintValue(X,h,z,G)}updatePaintArray(h,b,D,z,G){let X=this.expression.evaluate(new mi(this.zoom,G),D,z),Z=this.expression.evaluate(new mi(this.zoom+1,G),D,z);this._setPaintValue(h,b,X,Z)}_setPaintValue(h,b,D,z){if(this.type==="color"){let G=Na(D),X=Na(z);for(let Z=h;Z`#define HAS_UNIFORM_${z}`)))}return h}getBinderAttributes(){let h=[];for(let b in this.binders){let D=this.binders[b];if(D instanceof _o||D instanceof po)for(let z of D.paintVertexAttributes)h.push(z.name);else if(D instanceof Xo){let z=D.getVertexAttributes();for(let G of z)h.push(G.name)}}return h}getBinderUniforms(){let h=[];for(let b in this.binders){let D=this.binders[b];if(D instanceof Ns||D instanceof vo||D instanceof po)for(let z of D.uniformNames)h.push(z)}return h}getPaintVertexBuffers(){return this._buffers}getUniforms(h,b){let D=[];for(let z in this.binders){let G=this.binders[z];if(G instanceof Ns||G instanceof vo||G instanceof po){for(let X of G.uniformNames)if(b[X]){let Z=G.getBinding(h,b[X],X);D.push({name:X,property:z,binding:Z})}}}return D}setUniforms(h,b,D,z){for(let{name:G,property:X,binding:Z}of b)this.binders[X].setUniform(Z,z,D.get(X),G)}updatePaintBuffers(h){this._buffers=[];for(let b in this.binders){let D=this.binders[b];if(h&&D instanceof Xo){let z=h.fromScale===2?D.zoomInPaintVertexBuffer:D.zoomOutPaintVertexBuffer;z&&this._buffers.push(z)}else(D instanceof _o||D instanceof po)&&D.paintVertexBuffer&&this._buffers.push(D.paintVertexBuffer)}}upload(h){for(let b in this.binders){let D=this.binders[b];(D instanceof _o||D instanceof po||D instanceof Xo)&&D.upload(h)}this.updatePaintBuffers()}destroy(){for(let h in this.binders){let b=this.binders[h];(b instanceof _o||b instanceof po||b instanceof Xo)&&b.destroy()}}}class Ta{constructor(h,b,D=()=>!0){this.programConfigurations={};for(let z of h)this.programConfigurations[z.id]=new ql(z,b,D);this.needsUpload=!1,this._featureMap=new zi,this._bufferOffset=0}populatePaintArrays(h,b,D,z){for(let G in this.programConfigurations)this.programConfigurations[G].populatePaintArrays(h,b,z);b.id!==void 0&&this._featureMap.add(b.id,D,this._bufferOffset,h),this._bufferOffset=h,this.needsUpload=!0}updatePaintArrays(h,b,D,z){for(let G of D)this.needsUpload=this.programConfigurations[G.id].updatePaintArrays(h,this._featureMap,b,G,z)||this.needsUpload}get(h){return this.programConfigurations[h]}upload(h){if(this.needsUpload){for(let b in this.programConfigurations)this.programConfigurations[b].upload(h);this.needsUpload=!1}}destroy(){for(let h in this.programConfigurations)this.programConfigurations[h].destroy()}}function vu(M,h){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"]}[M]||[M.replace(`${h}-`,"").replace(/-/g,"_")]}function ys(M,h,b){let D={color:{source:nr,composite:P},number:{source:Mi,composite:nr}},z=(function(G){return{"line-pattern":{source:Pt,composite:Pt},"fill-pattern":{source:Pt,composite:Pt},"fill-extrusion-pattern":{source:Pt,composite:Pt},"line-dasharray":{source:$t,composite:$t}}[G]})(M);return(z==null?void 0:z[b])||D[h][b]}_i("ConstantBinder",Ns),_i("CrossFadedConstantBinder",vo),_i("SourceExpressionBinder",_o),_i("CrossFadedPatternBinder",no),_i("CrossFadedDasharrayBinder",Us),_i("CompositeExpressionBinder",po),_i("ProgramConfiguration",ql,{omit:["_buffers"]}),_i("ProgramConfigurationSet",Ta);let xc=Math.pow(2,14)-1,Zl=-xc-1;function $l(M){let h=j/M.extent,b=M.loadGeometry();for(let D of b)for(let z of D){let G=Math.round(z.x*h),X=Math.round(z.y*h);z.x=ue(G,Zl,xc),z.y=ue(X,Zl,xc),(Gz.x+1||Xz.y+1)&&me("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return b}function xa(M,h){return{type:M.type,id:M.id,properties:M.properties,geometry:h?$l(M):[]}}let uo=-32768;function Es(M,h,b,D,z){M.emplaceBack(uo+8*h+D,uo+8*b+z)}class vr{constructor(h){this.zoom=h.zoom,this.overscaling=h.overscaling,this.layers=h.layers,this.layerIds=this.layers.map((b=>b.id)),this.index=h.index,this.hasDependencies=!1,this.layoutVertexArray=new at,this.indexArray=new Er,this.segments=new an,this.programConfigurations=new Ta(h.layers,h.zoom),this.stateDependentLayerIds=this.layers.filter((b=>b.isStateDependent())).map((b=>b.id))}populate(h,b,D){let z=this.layers[0],G=[],X=null,Z=!1,re=z.type==="heatmap";if(z.type==="circle"){let he=z;X=he.layout.get("circle-sort-key"),Z=!X.isConstant(),re||(re=he.paint.get("circle-pitch-alignment")==="map")}let Q=re?b.subdivisionGranularity.circle:1;for(let{feature:he,id:oe,index:ke,sourceLayerIndex:ge}of h){let Ue=this.layers[0]._featureFilter.needGeometry,je=xa(he,Ue);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),je,D))continue;let vt=Z?X.evaluate(je,{},D):void 0,gt={id:oe,properties:he.properties,type:he.type,sourceLayerIndex:ge,index:ke,geometry:Ue?je.geometry:$l(he),patterns:{},sortKey:vt};G.push(gt)}Z&&G.sort(((he,oe)=>he.sortKey-oe.sortKey));for(let he of G){let{geometry:oe,index:ke,sourceLayerIndex:ge}=he,Ue=h[ke].feature;this.addFeature(he,oe,ke,D,Q),b.featureIndex.insert(Ue,oe,ke,ge,this.index)}}update(h,b,D){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,b,this.stateDependentLayers,{imagePositions:D})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,Lr),this.indexBuffer=h.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(h,b,D,z,G=1){let X;switch(G){case 1:X=[0,7];break;case 3:X=[0,2,5,7];break;case 5:X=[0,1,3,4,6,7];break;case 7:X=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${G}; valid values are 1, 3, 5, 7.`)}let Z=X.length;for(let re of b)for(let Q of re){let he=Q.x,oe=Q.y;if(he<0||he>=j||oe<0||oe>=j)continue;let ke=this.segments.prepareSegment(Z*Z,this.layoutVertexArray,this.indexArray,h.sortKey),ge=ke.vertexLength;for(let Ue=0;Ue1){if(xs(M,h))return!0;for(let D of h)if(ar(D,M,b))return!0}for(let D of M)if(ar(D,h,b))return!0;return!1}function xs(M,h){if(M.length===0||h.length===0)return!1;for(let b=0;b1?b:b.sub(h)._mult(z)._add(h))}function Pr(M,h){let b,D,z,G=!1;for(let X of M){b=X;for(let Z=0,re=b.length-1;Zh.y!=z.y>h.y&&h.x<(z.x-D.x)*(h.y-D.y)/(z.y-D.y)+D.x&&(G=!G)}return G}function pn(M,h){let b=!1;for(let D=0,z=M.length-1;Dh.y!=X.y>h.y&&h.x<(X.x-G.x)*(h.y-G.y)/(X.y-G.y)+G.x&&(b=!b)}return b}function Mn(M,h,b){let D=b[0],z=b[2];if(M.xz.x&&h.x>z.x||M.yz.y&&h.y>z.y)return!1;let G=be(M,h,b[0]);return G!==be(M,h,b[1])||G!==be(M,h,b[2])||G!==be(M,h,b[3])}function sn(M,h,b){let D=h.paint.get(M).value;return D.kind==="constant"?D.value:b.programConfigurations.get(h.id).getMaxValue(M)}function tn(M){return Math.sqrt(M[0]*M[0]+M[1]*M[1])}function Hr(M,h,b,D,z){if(!h[0]&&!h[1])return M;let G=o.convert(h)._mult(z);b==="viewport"&&G._rotate(-D);let X=[];for(let Z of M)X.push(Z.sub(G));return X}function Mr(M){let h=[];for(let b=0;bsa(_t,vt,gt,It)))})(Q,G,Z,re),Ue=he),Xn({queryGeometry:ge,size:Ue,transform:G,unwrappedTileID:Z,getElevation:re,pitchAlignment:ke,pitchScale:oe},z)}}class $i extends vr{}let Fi;_i("HeatmapBucket",$i,{omit:["layers"]});var ji={get paint(){return Fi=Fi||new ms({"heatmap-radius":new Di(Ct.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Di(Ct.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new wi(Ct.paint_heatmap["heatmap-intensity"]),"heatmap-color":new du(Ct.paint_heatmap["heatmap-color"]),"heatmap-opacity":new wi(Ct.paint_heatmap["heatmap-opacity"])})}};function Wi(M,{width:h,height:b},D,z){if(z){if(z instanceof Uint8ClampedArray)z=new Uint8Array(z.buffer);else if(z.length!==h*b*D)throw new RangeError(`mismatched image size. expected: ${z.length} but got: ${h*b*D}`)}else z=new Uint8Array(h*b*D);return M.width=h,M.height=b,M.data=z,M}function Fa(M,{width:h,height:b},D){if(h===M.width&&b===M.height)return;let z=Wi({},{width:h,height:b},D);Vs(M,z,{x:0,y:0},{x:0,y:0},{width:Math.min(M.width,h),height:Math.min(M.height,b)},D),M.width=h,M.height=b,M.data=z.data}function Vs(M,h,b,D,z,G){if(z.width===0||z.height===0)return h;if(z.width>M.width||z.height>M.height||b.x>M.width-z.width||b.y>M.height-z.height)throw new RangeError("out of range source coordinates for image copy");if(z.width>h.width||z.height>h.height||D.x>h.width-z.width||D.y>h.height-z.height)throw new RangeError("out of range destination coordinates for image copy");let X=M.data,Z=h.data;if(X===Z)throw new Error("srcData equals dstData, so image is already copied");for(let re=0;re{h[M.evaluationKey]=re;let Q=M.expression.evaluate(h);z.setPixel(X/4/b,Z/4,Q)};if(M.clips)for(let X=0,Z=0;Xthis.max&&(this.max=oe),oe=this.dim+1||b<-1||b>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${h}, y: ${b}, dim: ${this.dim}`);return(b+1)*this.stride+(h+1)}unpack(h,b,D){return h*this.redFactor+b*this.greenFactor+D*this.blueFactor-this.baseShift}pack(h){return yQ(h,this.getUnpackVector())}getPixels(){return new Kl({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(h,b,D){if(this.dim!==h.dim)throw new Error("dem dimension mismatch");let z=b*this.dim,G=b*this.dim+this.dim,X=D*this.dim,Z=D*this.dim+this.dim;switch(b){case-1:z=G-1;break;case 1:G=z+1}switch(D){case-1:X=Z-1;break;case 1:Z=X+1}let re=-b*this.dim,Q=-D*this.dim;for(let he=X;he0)for(let X=h;X=h;X-=D)G=TQ(X/D|0,M[X],M[X+1],G);return G&&N_(G,G.next)&&(u4(G),G=G.next),G}function rx(M,h){if(!M)return M;h||(h=M);let b,D=M;do if(b=!1,D.steiner||!N_(D,D.next)&&Cu(D.prev,D,D.next)!==0)D=D.next;else{if(u4(D),D=h=D.prev,D===D.next)break;b=!0}while(b||D!==h);return h}function o4(M,h,b,D,z,G,X){if(!M)return;!X&&G&&(function(re,Q,he,oe){let ke=re;do ke.z===0&&(ke.z=VR(ke.x,ke.y,Q,he,oe)),ke.prevZ=ke.prev,ke.nextZ=ke.next,ke=ke.next;while(ke!==re);ke.prevZ.nextZ=null,ke.prevZ=null,(function(ge){let Ue,je=1;do{let vt,gt=ge;ge=null;let It=null;for(Ue=0;gt;){Ue++;let _t=gt,qt=0;for(let lr=0;lr0||tr>0&&_t;)qt!==0&&(tr===0||!_t||gt.z<=_t.z)?(vt=gt,gt=gt.nextZ,qt--):(vt=_t,_t=_t.nextZ,tr--),It?It.nextZ=vt:ge=vt,vt.prevZ=It,It=vt;gt=_t}It.nextZ=null,je*=2}while(Ue>1)})(ke)})(M,D,z,G);let Z=M;for(;M.prev!==M.next;){let re=M.prev,Q=M.next;if(G?Wrt(M,D,z,G):jrt(M))h.push(re.i,M.i,Q.i),u4(M),M=Q.next,Z=Q.next;else if((M=Q)===Z){X?X===1?o4(M=Yrt(rx(M),h),h,b,D,z,G,2):X===2&&Xrt(M,h,b,D,z,G):o4(rx(M),h,b,D,z,G,1);break}}}function jrt(M){let h=M.prev,b=M,D=M.next;if(Cu(h,b,D)>=0)return!1;let z=h.x,G=b.x,X=D.x,Z=h.y,re=b.y,Q=D.y,he=Math.min(z,G,X),oe=Math.min(Z,re,Q),ke=Math.max(z,G,X),ge=Math.max(Z,re,Q),Ue=D.next;for(;Ue!==h;){if(Ue.x>=he&&Ue.x<=ke&&Ue.y>=oe&&Ue.y<=ge&&s4(z,Z,G,re,X,Q,Ue.x,Ue.y)&&Cu(Ue.prev,Ue,Ue.next)>=0)return!1;Ue=Ue.next}return!0}function Wrt(M,h,b,D){let z=M.prev,G=M,X=M.next;if(Cu(z,G,X)>=0)return!1;let Z=z.x,re=G.x,Q=X.x,he=z.y,oe=G.y,ke=X.y,ge=Math.min(Z,re,Q),Ue=Math.min(he,oe,ke),je=Math.max(Z,re,Q),vt=Math.max(he,oe,ke),gt=VR(ge,Ue,h,b,D),It=VR(je,vt,h,b,D),_t=M.prevZ,qt=M.nextZ;for(;_t&&_t.z>=gt&&qt&&qt.z<=It;){if(_t.x>=ge&&_t.x<=je&&_t.y>=Ue&&_t.y<=vt&&_t!==z&&_t!==X&&s4(Z,he,re,oe,Q,ke,_t.x,_t.y)&&Cu(_t.prev,_t,_t.next)>=0||(_t=_t.prevZ,qt.x>=ge&&qt.x<=je&&qt.y>=Ue&&qt.y<=vt&&qt!==z&&qt!==X&&s4(Z,he,re,oe,Q,ke,qt.x,qt.y)&&Cu(qt.prev,qt,qt.next)>=0))return!1;qt=qt.nextZ}for(;_t&&_t.z>=gt;){if(_t.x>=ge&&_t.x<=je&&_t.y>=Ue&&_t.y<=vt&&_t!==z&&_t!==X&&s4(Z,he,re,oe,Q,ke,_t.x,_t.y)&&Cu(_t.prev,_t,_t.next)>=0)return!1;_t=_t.prevZ}for(;qt&&qt.z<=It;){if(qt.x>=ge&&qt.x<=je&&qt.y>=Ue&&qt.y<=vt&&qt!==z&&qt!==X&&s4(Z,he,re,oe,Q,ke,qt.x,qt.y)&&Cu(qt.prev,qt,qt.next)>=0)return!1;qt=qt.nextZ}return!0}function Yrt(M,h){let b=M;do{let D=b.prev,z=b.next.next;!N_(D,z)&&bQ(D,b,b.next,z)&&l4(D,z)&&l4(z,D)&&(h.push(D.i,b.i,z.i),u4(b),u4(b.next),b=M=z),b=b.next}while(b!==M);return rx(b)}function Xrt(M,h,b,D,z,G){let X=M;do{let Z=X.next.next;for(;Z!==X.prev;){if(X.i!==Z.i&&Qrt(X,Z)){let re=wQ(X,Z);return X=rx(X,X.next),re=rx(re,re.next),o4(X,h,b,D,z,G,0),void o4(re,h,b,D,z,G,0)}Z=Z.next}X=X.next}while(X!==M)}function Zrt(M,h){let b=M.x-h.x;return b===0&&(b=M.y-h.y,b===0)&&(b=(M.next.y-M.y)/(M.next.x-M.x)-(h.next.y-h.y)/(h.next.x-h.x)),b}function $rt(M,h){let b=(function(z,G){let X=G,Z=z.x,re=z.y,Q,he=-1/0;if(N_(z,X))return X;do{if(N_(z,X.next))return X.next;if(re<=X.y&&re>=X.next.y&&X.next.y!==X.y){let je=X.x+(re-X.y)*(X.next.x-X.x)/(X.next.y-X.y);if(je<=Z&&je>he&&(he=je,Q=X.x=X.x&&X.x>=ke&&Z!==X.x&&_Q(reQ.x||X.x===Q.x&&Krt(Q,X)))&&(Q=X,Ue=je)}X=X.next}while(X!==oe);return Q})(M,h);if(!b)return h;let D=wQ(b,M);return rx(D,D.next),rx(b,b.next)}function Krt(M,h){return Cu(M.prev,M,h.prev)<0&&Cu(h.next,M,M.next)<0}function VR(M,h,b,D,z){return(M=1431655765&((M=858993459&((M=252645135&((M=16711935&((M=(M-b)*z|0)|M<<8))|M<<4))|M<<2))|M<<1))|(h=1431655765&((h=858993459&((h=252645135&((h=16711935&((h=(h-D)*z|0)|h<<8))|h<<4))|h<<2))|h<<1))<<1}function Jrt(M){let h=M,b=M;do(h.x=(M-X)*(G-Z)&&(M-X)*(D-Z)>=(b-X)*(h-Z)&&(b-X)*(G-Z)>=(z-X)*(D-Z)}function s4(M,h,b,D,z,G,X,Z){return!(M===X&&h===Z)&&_Q(M,h,b,D,z,G,X,Z)}function Qrt(M,h){return M.next.i!==h.i&&M.prev.i!==h.i&&!(function(b,D){let z=b;do{if(z.i!==b.i&&z.next.i!==b.i&&z.i!==D.i&&z.next.i!==D.i&&bQ(z,z.next,b,D))return!0;z=z.next}while(z!==b);return!1})(M,h)&&(l4(M,h)&&l4(h,M)&&(function(b,D){let z=b,G=!1,X=(b.x+D.x)/2,Z=(b.y+D.y)/2;do z.y>Z!=z.next.y>Z&&z.next.y!==z.y&&X<(z.next.x-z.x)*(Z-z.y)/(z.next.y-z.y)+z.x&&(G=!G),z=z.next;while(z!==b);return G})(M,h)&&(Cu(M.prev,M,h.prev)||Cu(M,h.prev,h))||N_(M,h)&&Cu(M.prev,M,M.next)>0&&Cu(h.prev,h,h.next)>0)}function Cu(M,h,b){return(h.y-M.y)*(b.x-h.x)-(h.x-M.x)*(b.y-h.y)}function N_(M,h){return M.x===h.x&&M.y===h.y}function bQ(M,h,b,D){let z=ES(Cu(M,h,b)),G=ES(Cu(M,h,D)),X=ES(Cu(b,D,M)),Z=ES(Cu(b,D,h));return z!==G&&X!==Z||!(z!==0||!SS(M,b,h))||!(G!==0||!SS(M,D,h))||!(X!==0||!SS(b,M,D))||!(Z!==0||!SS(b,h,D))}function SS(M,h,b){return h.x<=Math.max(M.x,b.x)&&h.x>=Math.min(M.x,b.x)&&h.y<=Math.max(M.y,b.y)&&h.y>=Math.min(M.y,b.y)}function ES(M){return M>0?1:M<0?-1:0}function l4(M,h){return Cu(M.prev,M,M.next)<0?Cu(M,h,M.next)>=0&&Cu(M,M.prev,h)>=0:Cu(M,h,M.prev)<0||Cu(M,M.next,h)<0}function wQ(M,h){let b=GR(M.i,M.x,M.y),D=GR(h.i,h.x,h.y),z=M.next,G=h.prev;return M.next=h,h.prev=M,b.next=z,z.prev=b,D.next=b,b.prev=D,G.next=D,D.prev=G,D}function TQ(M,h,b,D){let z=GR(M,h,b);return D?(z.next=D.next,z.prev=D,D.next.prev=z,D.next=z):(z.prev=z,z.next=z),z}function u4(M){M.next.prev=M.prev,M.prev.next=M.next,M.prevZ&&(M.prevZ.nextZ=M.nextZ),M.nextZ&&(M.nextZ.prevZ=M.prevZ)}function GR(M,h,b){return{i:M,x:h,y:b,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class U_{constructor(h,b){if(b>h)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=h,this._minGranularity=b}getGranularityForZoomLevel(h){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||b>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let D=0|Math.round(h),z=0|Math.round(b),G=this._getKey(D,z);if(this._vertexDictionary.has(G))return this._vertexDictionary.get(G);let X=this._vertexBuffer.length/2;return this._vertexDictionary.set(G,X),this._vertexBuffer.push(D,z),X}_subdivideTrianglesScanline(h){if(this._granularity<2)return(function(z,G){let X=[];for(let Z=0;Z0?(X.push(re),X.push(he),X.push(Q)):(X.push(re),X.push(Q),X.push(he))}return X})(this._vertexBuffer,h);let b=[],D=h.length;for(let z=0;z=1||tr<=0)||gt&&(QG)){oe>=z&&oe<=G&&X.push(D[(Z+1)%3]);continue}!gt&&qt>0&&X.push(this._vertexToIndex(re+Ue*qt,Q+je*qt));let lr=re+Ue*Math.max(qt,0),qr=re+Ue*Math.min(tr,1);vt||this._generateIntraEdgeVertices(X,re,Q,he,oe,lr,qr),!gt&&tr<1&&X.push(this._vertexToIndex(re+Ue*tr,Q+je*tr)),(gt||oe>=z&&oe<=G)&&X.push(D[(Z+1)%3]),!gt&&(oe<=z||oe>=G)&&this._generateInterEdgeVertices(X,re,Q,he,oe,ke,ge,qr,z,G)}return X}_generateIntraEdgeVertices(h,b,D,z,G,X,Z){let re=z-b,Q=G-D,he=Q===0,oe=he?Math.min(b,z):Math.min(X,Z),ke=he?Math.max(b,z):Math.max(X,Z),ge=Math.floor(oe/this._granularityCellSize)+1,Ue=Math.ceil(ke/this._granularityCellSize)-1;if(he?b=ge;je--){let vt=je*this._granularityCellSize;h.push(this._vertexToIndex(vt,D+Q*(vt-b)/re))}}_generateInterEdgeVertices(h,b,D,z,G,X,Z,re,Q,he){let oe=G-D,ke=X-z,ge=Z-G,Ue=(Q-G)/ge,je=(he-G)/ge,vt=Math.min(Ue,je),gt=Math.max(Ue,je),It=z+ke*vt,_t=Math.floor(Math.min(It,re)/this._granularityCellSize)+1,qt=Math.ceil(Math.max(It,re)/this._granularityCellSize)-1,tr=re=1||gt<=0){let jr=D-Z,_n=X+(b-X)*Math.min((Q-Z)/jr,(he-Z)/jr);_t=Math.floor(Math.min(_n,re)/this._granularityCellSize)+1,qt=Math.ceil(Math.max(_n,re)/this._granularityCellSize)-1,tr=re<_n}let qr=oe>0?he:Q;if(tr)for(let jr=_t;jr<=qt;jr++)h.push(this._vertexToIndex(jr*this._granularityCellSize,qr));else for(let jr=qt;jr>=_t;jr--)h.push(this._vertexToIndex(jr*this._granularityCellSize,qr))}_generateOutline(h){let b=[];for(let D of h){let z=nx(D,this._granularity,!0),G=this._pointArrayToIndices(z),X=[];for(let Z=1;ZG!=(X===V_)?(h.push(b),h.push(D),h.push(this._vertexToIndex(z,X)),h.push(D),h.push(this._vertexToIndex(G,X)),h.push(this._vertexToIndex(z,X))):(h.push(D),h.push(b),h.push(this._vertexToIndex(z,X)),h.push(this._vertexToIndex(G,X)),h.push(D),h.push(this._vertexToIndex(z,X)))}_fillPoles(h,b,D){let z=this._vertexBuffer,G=j,X=h.length;for(let Z=2;Z80*oe){vt=Q[0],gt=Q[1];let _t=vt,qt=gt;for(let tr=oe;tr_t&&(_t=lr),qr>qt&&(qt=qr)}It=Math.max(_t-vt,qt-gt),It=It!==0?32767/It:0}return o4(Ue,je,oe,vt,gt,It,0),je})(D,z),re=this._convertIndices(D,Z);G=this._subdivideTrianglesScanline(re)}catch(Z){console.error(Z)}let X=[];return b&&(X=this._generateOutline(h)),this._ensureNoPoleVertices(),this._handlePoles(G),{verticesFlattened:this._vertexBuffer,indicesTriangles:G,indicesLineList:X}}_convertIndices(h,b){let D=[];for(let z of b)D.push(this._vertexToIndex(h[2*z],h[2*z+1]));return D}_pointArrayToIndices(h){let b=[];for(let D of h)b.push(this._vertexToIndex(D.x,D.y));return b}}function AQ(M,h,b,D=!0){return new ent(b,h).subdividePolygonInternal(M,D)}function nx(M,h,b=!1){if(!M||M.length<1)return[];if(M.length<2)return[];let D=M[0],z=M[M.length-1],G=b&&(D.x!==z.x||D.y!==z.y);if(h<2)return G?[...M,M[0]]:[...M];let X=Math.floor(j/h),Z=[];Z.push(new o(M[0].x,M[0].y));let re=M.length,Q=G?re:re-1;for(let he=0;he0?(Math.floor(qr/X)+1)*X:(Math.ceil(qr/X)-1)*X,Dn=qt>0?(Math.floor(jr/X)+1)*X:(Math.ceil(jr/X)-1)*X,Hn=Math.abs(qr-fn),Ln=Math.abs(jr-Dn),un=Math.abs(qr-je),ei=Math.abs(jr-vt),ci=gt?Hn/tr:Number.POSITIVE_INFINITY,ti=It?Ln/lr:Number.POSITIVE_INFINITY;if((un<=Hn||!gt)&&(ei<=Ln||!It))break;if(ci=0?X-1:G-1,Q=(Z+1)%G,he=M[2*h[re]],oe=M[2*h[Q]],ke=M[2*h[X]],ge=M[2*h[X]+1],Ue=M[2*h[Z]+1],je=!1;if(heoe)je=!1;else{let vt=Ue-ge,gt=-(M[2*h[Z]]-ke),It=ge((oe-ke)*vt+(M[2*h[Q]+1]-ge)*gt)*It&&(je=!0)}if(je){let vt=h[re],gt=h[X],It=h[Z];vt!==gt&&vt!==It&>!==It&&b.push(It,gt,vt),X--,X<0&&(X=G-1)}else{let vt=h[Q],gt=h[X],It=h[Z];vt!==gt&&vt!==It&>!==It&&b.push(It,gt,vt),Z++,Z>=G&&(Z=0)}if(re===Q)break}}function MQ(M,h,b,D,z,G,X,Z,re){let Q=z.length/2,he=X&&Z&&re;if(Qan.MAX_VERTEX_ARRAY_LENGTH&&(qt=oe.createNewSegment(ke,ge),_t=It.count,fn=!0,Dn=!0,Hn=!0,tr=0);let Ln=f4(gt,Ue,vt,It,qr,fn,qt),un=f4(gt,Ue,vt,It,jr,Dn,qt),ei=f4(gt,Ue,vt,It,_n,Hn,qt);ge.emplaceBack(tr+Ln-_t,tr+un-_t,tr+ei-_t),qt.primitiveLength++}})(h,b,D,z,G,M),he&&(function(oe,ke,ge,Ue,je,vt){let gt=[];for(let lr=0;lran.MAX_VERTEX_ARRAY_LENGTH&&(qt=oe.createNewSegment(ke,ge),_t=It.count,fn=!0,Dn=!0,tr=0);let Hn=f4(gt,Ue,vt,It,jr,fn,qt),Ln=f4(gt,Ue,vt,It,_n,Dn,qt);ge.emplaceBack(tr+Hn-_t,tr+Ln-_t),qt.primitiveLength++}})(X,b,Z,z,re,M),h.forceNewSegmentOnNextPrepare(),X==null||X.forceNewSegmentOnNextPrepare()}function f4(M,h,b,D,z,G,X){if(G){let Z=D.count;return b(h[2*z],h[2*z+1]),M[z]=D.count,D.count++,X.vertexLength++,Z}return M[z]}class HR{constructor(h){this.zoom=h.zoom,this.overscaling=h.overscaling,this.layers=h.layers,this.layerIds=this.layers.map((b=>b.id)),this.index=h.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new xt,this.indexArray=new Er,this.indexArray2=new Tr,this.programConfigurations=new Ta(h.layers,h.zoom),this.segments=new an,this.segments2=new an,this.stateDependentLayerIds=this.layers.filter((b=>b.isStateDependent())).map((b=>b.id))}populate(h,b,D){this.hasDependencies=MS("fill",this.layers,b);let z=this.layers[0].layout.get("fill-sort-key"),G=!z.isConstant(),X=[];for(let{feature:Z,id:re,index:Q,sourceLayerIndex:he}of h){let oe=this.layers[0]._featureFilter.needGeometry,ke=xa(Z,oe);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),ke,D))continue;let ge=G?z.evaluate(ke,{},D,b.availableImages):void 0,Ue={id:re,properties:Z.properties,type:Z.type,sourceLayerIndex:he,index:Q,geometry:oe?ke.geometry:$l(Z),patterns:{},sortKey:ge};X.push(Ue)}G&&X.sort(((Z,re)=>Z.sortKey-re.sortKey));for(let Z of X){let{geometry:re,index:Q,sourceLayerIndex:he}=Z;if(this.hasDependencies){let oe=UR("fill",this.layers,Z,{zoom:this.zoom},b);this.patternFeatures.push(oe)}else this.addFeature(Z,re,Q,D,{},b.subdivisionGranularity);b.featureIndex.insert(h[Q].feature,re,Q,he,this.index)}}update(h,b,D){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,b,this.stateDependentLayers,{imagePositions:D})}addFeatures(h,b,D){for(let z of this.patternFeatures)this.addFeature(z,z.geometry,z.index,b,D,h.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,Hrt),this.indexBuffer=h.createIndexBuffer(this.indexArray),this.indexBuffer2=h.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(h),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(h,b,D,z,G,X){for(let Z of uh(b,500)){let re=AQ(Z,z,X.fill.getGranularityForZoomLevel(z.z)),Q=this.layoutVertexArray;MQ(((he,oe)=>{Q.emplaceBack(he,oe)}),this.segments,this.layoutVertexArray,this.indexArray,re.verticesFlattened,re.indicesTriangles,this.segments2,this.indexArray2,re.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,h,D,{imagePositions:G,canonical:z})}}let SQ,EQ;_i("FillBucket",HR,{omit:["layers","patternFeatures"]});var rnt={get paint(){return EQ=EQ||new ms({"fill-antialias":new wi(Ct.paint_fill["fill-antialias"]),"fill-opacity":new Di(Ct.paint_fill["fill-opacity"]),"fill-color":new Di(Ct.paint_fill["fill-color"]),"fill-outline-color":new Di(Ct.paint_fill["fill-outline-color"]),"fill-translate":new wi(Ct.paint_fill["fill-translate"]),"fill-translate-anchor":new wi(Ct.paint_fill["fill-translate-anchor"]),"fill-pattern":new fl(Ct.paint_fill["fill-pattern"])})},get layout(){return SQ=SQ||new ms({"fill-sort-key":new Di(Ct.layout_fill["fill-sort-key"])})}};class nnt extends hl{constructor(h,b){super(h,rnt,b)}recalculate(h,b){super.recalculate(h,b);let D=this.paint._values["fill-outline-color"];D.value.kind==="constant"&&D.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(h){return new HR(h)}queryRadius(){return tn(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:h,geometry:b,transform:D,pixelsToTileUnits:z}){return Gi(Hr(h,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-D.bearingInRadians,z),b)}isTileClipped(){return!0}}let int=Re([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),ant=Re([{name:"a_centroid",components:2,type:"Int16"}],4),{members:ont}=int;class h4{constructor(h,b,D,z,G){this.properties={},this.extent=D,this.type=0,this.id=void 0,this._pbf=h,this._geometry=-1,this._keys=z,this._values=G,h.readFields(snt,this,b)}loadGeometry(){let h=this._pbf;h.pos=this._geometry;let b=h.readVarint()+h.pos,D=[],z,G=1,X=0,Z=0,re=0;for(;h.pos>3}if(X--,G===1||G===2)Z+=h.readSVarint(),re+=h.readSVarint(),G===1&&(z&&D.push(z),z=[]),z&&z.push(new o(Z,re));else{if(G!==7)throw new Error(`unknown command ${G}`);z&&z.push(z[0].clone())}}return z&&D.push(z),D}bbox(){let h=this._pbf;h.pos=this._geometry;let b=h.readVarint()+h.pos,D=1,z=0,G=0,X=0,Z=1/0,re=-1/0,Q=1/0,he=-1/0;for(;h.pos>3}if(z--,D===1||D===2)G+=h.readSVarint(),X+=h.readSVarint(),Gre&&(re=G),Xhe&&(he=X);else if(D!==7)throw new Error(`unknown command ${D}`)}return[Z,Q,re,he]}toGeoJSON(h,b,D){let z=this.extent*Math.pow(2,D),G=this.extent*h,X=this.extent*b,Z=this.loadGeometry();function re(ke){return[360*(ke.x+G)/z-180,360/Math.PI*Math.atan(Math.exp((1-2*(ke.y+X)/z)*Math.PI))-90]}function Q(ke){return ke.map(re)}let he;if(this.type===1){let ke=[];for(let Ue of Z)ke.push(Ue[0]);let ge=Q(ke);he=ke.length===1?{type:"Point",coordinates:ge[0]}:{type:"MultiPoint",coordinates:ge}}else if(this.type===2){let ke=Z.map(Q);he=ke.length===1?{type:"LineString",coordinates:ke[0]}:{type:"MultiLineString",coordinates:ke}}else{if(this.type!==3)throw new Error("unknown feature type");{let ke=kQ(Z),ge=[];for(let Ue of ke)ge.push(Ue.map(Q));he=ge.length===1?{type:"Polygon",coordinates:ge[0]}:{type:"MultiPolygon",coordinates:ge}}}let oe={type:"Feature",geometry:he,properties:this.properties};return this.id!=null&&(oe.id=this.id),oe}}function snt(M,h,b){M===1?h.id=b.readVarint():M===2?(function(D,z){let G=D.readVarint()+D.pos;for(;D.pos=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[h];let b=this._pbf.readVarint()+this._pbf.pos;return new h4(this._pbf,b,this.extent,this._keys,this._values)}}function cnt(M,h,b){M===15?h.version=b.readVarint():M===1?h.name=b.readString():M===5?h.extent=b.readVarint():M===2?h._features.push(b.pos):M===3?h._keys.push(b.readString()):M===4&&h._values.push((function(D){let z=null,G=D.readVarint()+D.pos;for(;D.pos>3;z=X===1?D.readString():X===2?D.readFloat():X===3?D.readDouble():X===4?D.readVarint64():X===5?D.readVarint():X===6?D.readSVarint():X===7?D.readBoolean():null}if(z==null)throw new Error("unknown feature value");return z})(b))}class CQ{constructor(h,b){this.layers=h.readFields(fnt,{},b)}}function fnt(M,h,b){if(M===3){let D=new unt(b,b.readVarint()+b.pos);D.length&&(h[D.name]=D)}}let jR=Math.pow(2,13);function d4(M,h,b,D,z,G,X,Z){M.emplaceBack(h,b,2*Math.floor(D*jR)+X,z*jR*2,G*jR*2,Math.round(Z))}class WR{constructor(h){this.zoom=h.zoom,this.overscaling=h.overscaling,this.layers=h.layers,this.layerIds=this.layers.map((b=>b.id)),this.index=h.index,this.hasDependencies=!1,this.layoutVertexArray=new Et,this.centroidVertexArray=new Xe,this.indexArray=new Er,this.programConfigurations=new Ta(h.layers,h.zoom),this.segments=new an,this.stateDependentLayerIds=this.layers.filter((b=>b.isStateDependent())).map((b=>b.id))}populate(h,b,D){this.features=[],this.hasDependencies=MS("fill-extrusion",this.layers,b);for(let{feature:z,id:G,index:X,sourceLayerIndex:Z}of h){let re=this.layers[0]._featureFilter.needGeometry,Q=xa(z,re);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),Q,D))continue;let he={id:G,sourceLayerIndex:Z,index:X,geometry:re?Q.geometry:$l(z),properties:z.properties,type:z.type,patterns:{}};this.hasDependencies?this.features.push(UR("fill-extrusion",this.layers,he,{zoom:this.zoom},b)):this.addFeature(he,he.geometry,X,D,{},b.subdivisionGranularity),b.featureIndex.insert(z,he.geometry,X,Z,this.index,!0)}}addFeatures(h,b,D){for(let z of this.features){let{geometry:G}=z;this.addFeature(z,G,z.index,b,D,h.subdivisionGranularity)}}update(h,b,D){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,b,this.stateDependentLayers,{imagePositions:D})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,ont),this.centroidVertexBuffer=h.createVertexBuffer(this.centroidVertexArray,ant.members,!0),this.indexBuffer=h.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(h,b,D,z,G,X){for(let Z of uh(b,500)){let re={x:0,y:0,sampleCount:0},Q=this.layoutVertexArray.length;this.processPolygon(re,z,h,Z,X);let he=this.layoutVertexArray.length-Q,oe=Math.floor(re.x/re.sampleCount),ke=Math.floor(re.y/re.sampleCount);for(let ge=0;ge{d4(he,oe,ke,0,0,1,1,0)}),this.segments,this.layoutVertexArray,this.indexArray,Q.verticesFlattened,Q.indicesTriangles)}_generateSideFaces(h,b){let D=0;for(let z=1;zan.MAX_VERTEX_ARRAY_LENGTH&&(b.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let Z=G.sub(X)._perp()._unit(),re=X.dist(G);D+re>32768&&(D=0),d4(this.layoutVertexArray,G.x,G.y,Z.x,Z.y,0,0,D),d4(this.layoutVertexArray,G.x,G.y,Z.x,Z.y,0,1,D),D+=re,d4(this.layoutVertexArray,X.x,X.y,Z.x,Z.y,0,0,D),d4(this.layoutVertexArray,X.x,X.y,Z.x,Z.y,0,1,D);let Q=b.segment.vertexLength;this.indexArray.emplaceBack(Q,Q+2,Q+1),this.indexArray.emplaceBack(Q+1,Q+2,Q+3),b.segment.vertexLength+=4,b.segment.primitiveLength+=2}}}function hnt(M,h){for(let b=0;bj)||M.y===h.y&&(M.y<0||M.y>j)}function LQ(M){return M.every((h=>h.x<0))||M.every((h=>h.x>j))||M.every((h=>h.y<0))||M.every((h=>h.y>j))}let PQ;_i("FillExtrusionBucket",WR,{omit:["layers","features"]});var vnt={get paint(){return PQ=PQ||new ms({"fill-extrusion-opacity":new wi(Ct["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Di(Ct["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new wi(Ct["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new wi(Ct["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new fl(Ct["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Di(Ct["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Di(Ct["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new wi(Ct["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class pnt extends hl{constructor(h,b){super(h,vnt,b)}createBucket(h){return new WR(h)}queryRadius(){return tn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:h,feature:b,featureState:D,geometry:z,transform:G,pixelsToTileUnits:X,pixelPosMatrix:Z}){let re=Hr(h,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-G.bearingInRadians,X),Q=this.paint.get("fill-extrusion-height").evaluate(b,D),he=this.paint.get("fill-extrusion-base").evaluate(b,D),oe=(function(ge,Ue){let je=[];for(let vt of ge){let gt=[vt.x,vt.y,0,1];I(gt,gt,Ue),je.push(new o(gt[0]/gt[3],gt[1]/gt[3]))}return je})(re,Z),ke=(function(ge,Ue,je,vt){let gt=[],It=[],_t=vt[8]*Ue,qt=vt[9]*Ue,tr=vt[10]*Ue,lr=vt[11]*Ue,qr=vt[8]*je,jr=vt[9]*je,_n=vt[10]*je,fn=vt[11]*je;for(let Dn of ge){let Hn=[],Ln=[];for(let un of Dn){let ei=un.x,ci=un.y,ti=vt[0]*ei+vt[4]*ci+vt[12],di=vt[1]*ei+vt[5]*ci+vt[13],_a=vt[2]*ei+vt[6]*ci+vt[14],Ao=vt[3]*ei+vt[7]*ci+vt[15],us=_a+tr,ks=Ao+lr,Uf=ti+qr,Jl=di+jr,_c=_a+_n,zc=Ao+fn,Sl=new o((ti+_t)/ks,(di+qt)/ks);Sl.z=us/ks,Hn.push(Sl);let df=new o(Uf/zc,Jl/zc);df.z=_c/zc,Ln.push(df)}gt.push(Hn),It.push(Ln)}return[gt,It]})(z,he,Q,Z);return(function(ge,Ue,je){let vt=1/0;Gi(je,Ue)&&(vt=FQ(je,Ue[0]));for(let gt=0;gt>4;if(z!==1)throw new Error(`Got v${z} data when expected v1.`);let G=DQ[15&D];if(!G)throw new Error("Unrecognized array type.");let[X]=new Uint16Array(h,2,1),[Z]=new Uint32Array(h,4,1);return new CS(Z,X,G,h)}constructor(h,b=64,D=Float64Array,z){if(isNaN(h)||h<0)throw new Error(`Unpexpected numItems value: ${h}.`);this.numItems=+h,this.nodeSize=Math.min(Math.max(+b,2),65535),this.ArrayType=D,this.IndexArrayType=h<65536?Uint16Array:Uint32Array;let G=DQ.indexOf(this.ArrayType),X=2*h*this.ArrayType.BYTES_PER_ELEMENT,Z=h*this.IndexArrayType.BYTES_PER_ELEMENT,re=(8-Z%8)%8;if(G<0)throw new Error(`Unexpected typed array class: ${D}.`);z&&z instanceof ArrayBuffer?(this.data=z,this.ids=new this.IndexArrayType(this.data,8,h),this.coords=new this.ArrayType(this.data,8+Z+re,2*h),this._pos=2*h,this._finished=!0):(this.data=new ArrayBuffer(8+X+Z+re),this.ids=new this.IndexArrayType(this.data,8,h),this.coords=new this.ArrayType(this.data,8+Z+re,2*h),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+G]),new Uint16Array(this.data,2,1)[0]=b,new Uint32Array(this.data,4,1)[0]=h)}add(h,b){let D=this._pos>>1;return this.ids[D]=D,this.coords[this._pos++]=h,this.coords[this._pos++]=b,D}finish(){let h=this._pos>>1;if(h!==this.numItems)throw new Error(`Added ${h} items when expected ${this.numItems}.`);return YR(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(h,b,D,z){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:G,coords:X,nodeSize:Z}=this,re=[0,G.length-1,0],Q=[];for(;re.length;){let he=re.pop()||0,oe=re.pop()||0,ke=re.pop()||0;if(oe-ke<=Z){for(let vt=ke;vt<=oe;vt++){let gt=X[2*vt],It=X[2*vt+1];gt>=h&><=D&&It>=b&&It<=z&&Q.push(G[vt])}continue}let ge=ke+oe>>1,Ue=X[2*ge],je=X[2*ge+1];Ue>=h&&Ue<=D&&je>=b&&je<=z&&Q.push(G[ge]),(he===0?h<=Ue:b<=je)&&(re.push(ke),re.push(ge-1),re.push(1-he)),(he===0?D>=Ue:z>=je)&&(re.push(ge+1),re.push(oe),re.push(1-he))}return Q}within(h,b,D){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:z,coords:G,nodeSize:X}=this,Z=[0,z.length-1,0],re=[],Q=D*D;for(;Z.length;){let he=Z.pop()||0,oe=Z.pop()||0,ke=Z.pop()||0;if(oe-ke<=X){for(let vt=ke;vt<=oe;vt++)IQ(G[2*vt],G[2*vt+1],h,b)<=Q&&re.push(z[vt]);continue}let ge=ke+oe>>1,Ue=G[2*ge],je=G[2*ge+1];IQ(Ue,je,h,b)<=Q&&re.push(z[ge]),(he===0?h-D<=Ue:b-D<=je)&&(Z.push(ke),Z.push(ge-1),Z.push(1-he)),(he===0?h+D>=Ue:b+D>=je)&&(Z.push(ge+1),Z.push(oe),Z.push(1-he))}return re}}function YR(M,h,b,D,z,G){if(z-D<=b)return;let X=D+z>>1;RQ(M,h,X,D,z,G),YR(M,h,b,D,X-1,1-G),YR(M,h,b,X+1,z,1-G)}function RQ(M,h,b,D,z,G){for(;z>D;){if(z-D>600){let Q=z-D+1,he=b-D+1,oe=Math.log(Q),ke=.5*Math.exp(2*oe/3),ge=.5*Math.sqrt(oe*ke*(Q-ke)/Q)*(he-Q/2<0?-1:1);RQ(M,h,b,Math.max(D,Math.floor(b-he*ke/Q+ge)),Math.min(z,Math.floor(b+(Q-he)*ke/Q+ge)),G)}let X=h[2*b+G],Z=D,re=z;for(p4(M,h,D,b),h[2*z+G]>X&&p4(M,h,D,z);ZX;)re--}h[2*D+G]===X?p4(M,h,D,re):(re++,p4(M,h,re,z)),re<=b&&(D=re+1),b<=re&&(z=re-1)}}function p4(M,h,b,D){XR(M,b,D),XR(h,2*b,2*D),XR(h,2*b+1,2*D+1)}function XR(M,h,b){let D=M[h];M[h]=M[b],M[b]=D}function IQ(M,h,b,D){let z=M-b,G=h-D;return z*z+G*G}function ZR(M,h,b,D){let z=D,G=h+(b-h>>1),X,Z=b-h,re=M[h],Q=M[h+1],he=M[b],oe=M[b+1];for(let ke=h+3;kez)X=ke,z=ge;else if(ge===z){let Ue=Math.abs(ke-G);UeD&&(X-h>3&&ZR(M,h,X,D),M[X+2]=z,b-X>3&&ZR(M,X,b,D))}function gnt(M,h,b,D,z,G){let X=z-b,Z=G-D;if(X!==0||Z!==0){let re=((M-b)*X+(h-D)*Z)/(X*X+Z*Z);re>1?(b=z,D=G):re>0&&(b+=X*re,D+=Z*re)}return X=M-b,Z=h-D,X*X+Z*Z}function hf(M,h,b,D){let z={type:h,geom:b},G={id:M==null?null:M,type:z.type,geometry:z.geom,tags:D,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(z.type){case"Point":case"MultiPoint":g4(G,z.geom);break;case"LineString":g4(G,z.geom.points);break;case"Polygon":g4(G,z.geom[0].points);break;case"MultiLineString":for(let X of z.geom)g4(G,X.points);break;case"MultiPolygon":for(let X of z.geom)g4(G,X[0].points)}return G}function $R(M){M.points.length>64&&(M.points=new Float64Array(M.points))}function g4(M,h){for(let b=0;b0&&(X+=D?(z*he-Q*G)/2:Math.sqrt(Math.pow(Q-z,2)+Math.pow(he-G,2))),z=Q,G=he}let Z=h.points.length-3;h.points[2]=1,b>0&&ZR(h.points,0,Z,b),h.points[Z+2]=1,$R(h),h.size=Math.abs(X),h.start=0,h.end=h.size}function QR(M,h,b,D){for(let z=0;z1?1:b}function PS(M){let h={type:"Feature",geometry:mnt(M),properties:M.tags};return M.id!=null&&(h.id=M.id),h}function mnt(M){let{type:h,geometry:b}=M;switch(h){case"Point":return{type:h,coordinates:zQ(b[0],b[1])};case"MultiPoint":return{type:h,coordinates:FS(b)};case"LineString":return{type:h,coordinates:FS(b.points)};case"MultiLineString":case"Polygon":return{type:h,coordinates:b.map((D=>FS(D.points)))};case"MultiPolygon":return{type:h,coordinates:b.map((D=>D.map((z=>FS(z.points)))))}}}function FS(M){let h=[];for(let b=0;b=(b/=h)&&X=D)return null;let re=[];for(let Q of M){let he=z===yh.X?Q.minX:Q.minY,oe=z===yh.X?Q.maxX:Q.maxY;if(he>=b&&oe=D))switch(Q.type){case"Point":case"MultiPoint":ynt(Q,re,b,D,z);continue;case"LineString":xnt(Q,re,b,D,z,Z);continue;case"MultiLineString":_nt(Q,re,b,D,z);continue;case"Polygon":bnt(Q,re,b,D,z);continue;case"MultiPolygon":wnt(Q,re,b,D,z);continue}}return re.length?re:null}function ynt(M,h,b,D,z){let G=[];(function(X,Z,re,Q,he){for(let oe=0;oe=re&&ke<=Q&&j_(Z,X[oe],X[oe+1],X[oe+2])}})(M.geometry,G,b,D,z),G.length&&h.push(hf(M.id,G.length===3?"Point":"MultiPoint",G,M.tags))}function xnt(M,h,b,D,z,G){let X=[];if(OQ(M.geometry,X,b,D,z,!1,G.lineMetrics),X.length)if(G.lineMetrics)for(let Z of X)h.push(hf(M.id,"LineString",Z,M.tags));else h.push(X.length>1?hf(M.id,"MultiLineString",X,M.tags):hf(M.id,"LineString",X[0],M.tags))}function _nt(M,h,b,D,z){let G=[];eI(M.geometry,G,b,D,z,!1),G.length&&h.push(G.length!==1?hf(M.id,"MultiLineString",G,M.tags):hf(M.id,"LineString",G[0],M.tags))}function bnt(M,h,b,D,z){let G=[];eI(M.geometry,G,b,D,z,!0),G.length&&h.push(hf(M.id,"Polygon",G,M.tags))}function wnt(M,h,b,D,z){let G=[];for(let X of M.geometry){let Z=[];eI(X,Z,b,D,z,!0),Z.length&&G.push(Z)}G.length&&h.push(hf(M.id,"MultiPolygon",G,M.tags))}function OQ(M,h,b,D,z,G,X){let Z=NQ(M),re=z===yh.X?Tnt:Ant,Q,he,oe=M.start;for(let vt=0;vtb&&(he=re(Z,gt,It,qt,tr,b),X&&(Z.start=oe+Q*he)):lr>D?qr=b&&(he=re(Z,gt,It,qt,tr,b),jr=!0),qr>D&&lr<=D&&(he=re(Z,gt,It,qt,tr,D),jr=!0),!G&&jr&&(X&&(Z.end=oe+Q*he),h.push(Z),Z=NQ(M)),X&&(oe+=Q)}let ke=M.points.length-3,ge=M.points[ke],Ue=M.points[ke+1],je=z===yh.X?ge:Ue;je>=b&&je<=D&&j_(Z.points,ge,Ue,M.points[ke+2]),ke=Z.points.length-3,G&&ke>=3&&(Z.points[ke]!==Z.points[0]||Z.points[ke+1]!==Z.points[1])&&j_(Z.points,Z.points[0],Z.points[1],Z.points[2]),Z.points.length&&($R(Z),h.push(Z))}function NQ(M){return{points:[],size:M.size,start:M.start,end:M.end}}function eI(M,h,b,D,z,G){for(let X of M)OQ(X,h,b,D,z,G,!1)}function j_(M,h,b,D){M.push(h,b,D)}function Tnt(M,h,b,D,z,G){let X=(G-h)/(D-h);return j_(M.points,G,b+(z-b)*X,1),X}function Ant(M,h,b,D,z,G){let X=(G-b)/(z-b);return j_(M.points,h+(D-h)*X,G,1),X}function tI(M,h){let b=h.buffer/h.extent,D=M,z=O1(M,1,-1-b,b,yh.X,-1,2,h),G=O1(M,1,1-b,2+b,yh.X,-1,2,h);return(z||G)&&(D=O1(M,1,-b,1+b,yh.X,-1,2,h)||[],z&&(D=UQ(z,1).concat(D)),G&&(D=D.concat(UQ(G,-1)))),D}function UQ(M,h){let b=[];for(let D of M)switch(D.type){case"Point":case"MultiPoint":{let z=Mnt(D.geometry,h);b.push(hf(D.id,D.type,z,D.tags));continue}case"LineString":{let z=rI(D.geometry,h);b.push(hf(D.id,D.type,z,D.tags));continue}case"MultiLineString":case"Polygon":{let z=[];for(let G of D.geometry)z.push(rI(G,h));b.push(hf(D.id,D.type,z,D.tags));continue}case"MultiPolygon":{let z=[];for(let G of D.geometry){let X=[];for(let Z of G)X.push(rI(Z,h));z.push(X)}b.push(hf(D.id,D.type,z,D.tags));continue}}return b}function Mnt(M,h){let b=[];for(let D=0;D0||((X=h.addOrUpdateProperties)==null?void 0:X.length)>0;if(D){let Z=M[0],re=KR({type:"FeatureCollection",features:[{type:"Feature",id:Z.id,geometry:h.newGeometry,properties:z?VQ(Z.tags,h):Z.tags}]},b);return re=tI(re,b),re}if(z){let Z=[];for(let re of M){let Q=zo({},re);Q.tags=VQ(Q.tags,h),Z.push(Q)}return Z}return M}function VQ(M,h){if(h.removeAllProperties)return{};let b=zo({},M||{});if(h.removeProperties)for(let D of h.removeProperties)delete b[D];if(h.addOrUpdateProperties)for(let{key:D,value:z}of h.addOrUpdateProperties)b[D]=z;return b}(function(M){M[M.X=0]="X",M[M.Y=1]="Y"})(yh||(yh={}));let nI={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:M=>M};class Ent{constructor(h){this.options=Object.assign(Object.create(nI),h),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(h){let b=[];for(let D of h){if(!D.geometry)continue;let[z,G]=D.geometry.coordinates,[X,Z]=[G_(z),H_(G)];b.push({id:D.id,type:"Point",geometry:[X,Z],tags:D.properties})}this.createIndex(b)}initialize(h){let b=[];for(let D of h)D.type==="Point"&&b.push(D);this.createIndex(b)}updateIndex(h,b,D){this.options=Object.assign(Object.create(nI),D.clusterOptions),this.initialize(h)}createIndex(h){let{log:b,minZoom:D,maxZoom:z}=this.options;b&&console.time("total time");let G=`prepare ${h.length} points`;b&&console.time(G),this.points=h;let X=[];for(let re=0;re=D;re--){let Q=Date.now();Z=this.trees[re]=this.createTree(this.cluster(Z,re)),b&&console.log("z%d: %d clusters in %dms",re,Z.numItems,Date.now()-Q)}b&&console.timeEnd("total time")}getClusters(h,b){return this.getClustersInternal(h,b).map((D=>PS(D)))}getClustersInternal(h,b){let D=((h[0]+180)%360+360)%360-180,z=Math.max(-90,Math.min(90,h[1])),G=h[2]===180?180:((h[2]+180)%360+360)%360-180,X=Math.max(-90,Math.min(90,h[3]));if(h[2]-h[0]>=360)D=-180,G=180;else if(D>G){let oe=this.getClustersInternal([D,z,180,X],b),ke=this.getClustersInternal([-180,z,G,X],b);return oe.concat(ke)}let Z=this.trees[this.limitZoom(b)],re=Z.range(G_(D),H_(X),G_(G),H_(z)),Q=Z.flatData,he=[];for(let oe of re){let ke=this.stride*oe;he.push(Q[ke+5]>1?knt(Q,ke,this.clusterProps):this.points[Q[ke+3]])}return he}getChildren(h){let b=this.getOriginId(h),D=this.getOriginZoom(h),z=new Error("No cluster with the specified id: "+h),G=this.trees[D];if(!G)throw z;let X=G.flatData;if(b*this.stride>=X.length)throw z;let Z=this.options.radius/(this.options.extent*Math.pow(2,D-1)),re=G.within(X[b*this.stride],X[b*this.stride+1],Z),Q=[];for(let he of re){let oe=he*this.stride;X[oe+4]===h&&Q.push(X[oe+5]>1?Cnt(X,oe,this.clusterProps):PS(this.points[X[oe+3]]))}if(Q.length===0)throw z;return Q}getLeaves(h,b,D){let z=[];return this.appendLeaves(z,h,b=b||10,D=D||0,0),z}getTile(h,b,D){let z=this.trees[this.limitZoom(h)];if(!z)return null;let G=Math.pow(2,h),{extent:X,radius:Z}=this.options,re=Z/X,Q=(D-re)/G,he=(D+1+re)/G,oe={transformed:!0,features:[],source:null,x:b,y:D,z:h};return this.addTileFeatures(z.range((b-re)/G,Q,(b+1+re)/G,he),z.flatData,b,D,G,oe),b===0&&this.addTileFeatures(z.range(1-re/G,Q,1,he),z.flatData,G,D,G,oe),b===G-1&&this.addTileFeatures(z.range(0,Q,re/G,he),z.flatData,-1,D,G,oe),oe}getClusterExpansionZoom(h){return this.getOriginZoom(h)}appendLeaves(h,b,D,z,G){let X=this.getChildren(b);for(let Z of X){let re=Z.properties;if(re!=null&&re.cluster?G+re.point_count<=z?G+=re.point_count:G=this.appendLeaves(h,re.cluster_id,D,z,G):G1,he,oe,ke;if(Q)he=iI(b,re,this.clusterProps),oe=b[re],ke=b[re+1];else{let je=this.points[b[re+3]];he=je.tags,[oe,ke]=je.geometry}let ge={type:1,geometry:[[Math.round(this.options.extent*(oe*G-D)),Math.round(this.options.extent*(ke*G-z))]],tags:he},Ue;Ue=Q||this.options.generateId?b[re+3]:this.points[b[re+3]].id,Ue!==void 0&&(ge.id=Ue),X.features.push(ge)}}limitZoom(h){return Math.max(this.options.minZoom,Math.min(Math.floor(+h),this.options.maxZoom+1))}cluster(h,b){let{radius:D,extent:z,reduce:G,minPoints:X}=this.options,Z=D/(z*Math.pow(2,b)),re=h.flatData,Q=[],he=this.stride;for(let oe=0;oeb&&(vt+=re[It+5])}if(vt>je&&vt>=X){let gt,It=ke*je,_t=ge*je,qt=-1,tr=(oe/he<<5)+(b+1)+this.points.length;for(let lr of Ue){let qr=lr*he;if(re[qr+2]<=b)continue;re[qr+2]=b;let jr=re[qr+5];It+=re[qr]*jr,_t+=re[qr+1]*jr,re[qr+4]=tr,G&&(gt||(gt=this.map(re,oe,!0),qt=this.clusterProps.length,this.clusterProps.push(gt)),G(gt,this.map(re,qr)))}re[oe+4]=tr,Q.push(It/vt,_t/vt,1/0,tr,-1,vt),G&&Q.push(qt)}else{for(let gt=0;gt1)for(let gt of Ue){let It=gt*he;if(!(re[It+2]<=b)){re[It+2]=b;for(let _t=0;_t>5}getOriginZoom(h){return(h-this.points.length)%32}map(h,b,D){if(h[b+5]>1){let X=this.clusterProps[h[b+6]];return D?Object.assign({},X):X}let z=this.points[h[b+3]].tags,G=this.options.map(z);return D&&G===z?Object.assign({},G):G}}function knt(M,h,b){return{id:M[h+3],type:"Point",tags:iI(M,h,b),geometry:[M[h],M[h+1]]}}function Cnt(M,h,b){return{type:"Feature",id:M[h+3],properties:iI(M,h,b),geometry:{type:"Point",coordinates:[qQ(M[h]),BQ(M[h+1])]}}}function iI(M,h,b){let D=M[h+5],z=D>=1e4?`${Math.round(D/1e3)}k`:D>=1e3?Math.round(D/100)/10+"k":D,G=M[h+6],X=G===-1?{}:Object.assign({},b[G]);return Object.assign(X,{cluster:!0,cluster_id:M[h+3],point_count:D,point_count_abbreviated:z})}let aI="geojsonvt_clip_start",oI="geojsonvt_clip_end";function GQ(M,h,b,D,z){let G=h===z.maxZoom?0:z.tolerance/((1<0&&h.size<(z?X:D))return void(b.numPoints+=h.points.length/3);let Z=[];for(let re=0;reX)&&(b.numSimplified++,Z.push(h.points[re],h.points[re+1])),b.numPoints++;z&&(function(re,Q){let he=0;for(let oe=0,ke=re.length,ge=ke-2;oe0===Q)for(let oe=0,ke=re.length;oe1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(b),D.debug>1&&console.timeEnd("invalidating");let[z,G,X]=[0,0,0],Z=GQ(h,z,G,X,D);Z.source=h;let re=DS(z,G,X);if(this.tiles[re]=Z,this.tileCoords.push({z,x:G,y:X,id:re}),D.debug){let Q=`z${z}`;this.stats[Q]=(this.stats[Q]||0)+1,this.total++}}getClusterExpansionZoom(h){return null}getChildren(h){return null}getLeaves(h,b,D){return null}getTile(h,b,D){let{extent:z,debug:G}=this.options,X=1<1&&console.log("drilling down to z%d-%d-%d",h,b,D);let re,Q=h,he=b,oe=D;for(;!re&&Q>0;)Q--,he>>=1,oe>>=1,re=this.tiles[DS(Q,he,oe)];return re!=null&&re.source?(G>1&&(console.log("found parent tile z%d-%d-%d",Q,he,oe),console.time("drilling down")),this.splitTile(re.source,Q,he,oe,h,b,D),G>1&&console.timeEnd("drilling down"),this.tiles[Z]?HQ(this.tiles[Z],z):null):null}splitTile(h,b,D,z,G,X,Z){let re=[h,b,D,z],Q=this.options,he=Q.debug;for(;re.length;){z=re.pop(),D=re.pop(),b=re.pop(),h=re.pop();let oe=1<1&&console.time("creation"),ge=this.tiles[ke]=GQ(h,b,D,z,Q),this.tileCoords.push({z:b,x:D,y:z,id:ke}),he)){he>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",b,D,z,ge.numFeatures,ge.numPoints,ge.numSimplified),console.timeEnd("creation"));let jr=`z${b}`;this.stats[jr]=(this.stats[jr]||0)+1,this.total++}if(ge.source=h,G==null){if(b===Q.indexMaxZoom||ge.numPoints<=Q.indexMaxPoints)continue}else{if(b===Q.maxZoom||b===G)continue;if(G!=null){let jr=G-b;if(D!==X>>jr||z!==Z>>jr)continue}}if(ge.source=null,!h.length)continue;he>1&&console.time("clipping");let Ue=.5*Q.buffer/Q.extent,je=.5-Ue,vt=.5+Ue,gt=1+Ue,It=null,_t=null,qt=null,tr=null,lr=O1(h,oe,D-Ue,D+vt,yh.X,ge.minX,ge.maxX,Q),qr=O1(h,oe,D+je,D+gt,yh.X,ge.minX,ge.maxX,Q);lr&&(It=O1(lr,oe,z-Ue,z+vt,yh.Y,ge.minY,ge.maxY,Q),_t=O1(lr,oe,z+je,z+gt,yh.Y,ge.minY,ge.maxY,Q)),qr&&(qt=O1(qr,oe,z-Ue,z+vt,yh.Y,ge.minY,ge.maxY,Q),tr=O1(qr,oe,z+je,z+gt,yh.Y,ge.minY,ge.maxY,Q)),he>1&&console.timeEnd("clipping"),re.push(It||[],b+1,2*D,2*z),re.push(_t||[],b+1,2*D,2*z+1),re.push(qt||[],b+1,2*D+1,2*z),re.push(tr||[],b+1,2*D+1,2*z+1)}}invalidateTiles(h){if(!h.length)return;let b=this.options,{debug:D}=b,z=1/0,G=-1/0,X=1/0,Z=-1/0;for(let he of h)z=Math.min(z,he.minX),G=Math.max(G,he.maxX),X=Math.min(X,he.minY),Z=Math.max(Z,he.maxY);let re=b.buffer/b.extent,Q=new Set;for(let he in this.tiles){let oe=this.tiles[he],ke=1<=Ue||Z=vt)continue;let gt=!1;for(let It of h)if(It.maxX>=ge&&It.minX=je&&It.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",oe.z,oe.x,oe.y,oe.numFeatures,oe.numPoints,oe.numSimplified);let It=`z${oe.z}`;this.stats[It]=(this.stats[It]||0)-1,this.total--}delete this.tiles[he],Q.add(he)}}Q.size&&(this.tileCoords=this.tileCoords.filter((he=>!Q.has(he.id))))}}function DS(M,h,b){return 32*((1<b.id)),this.index=h.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let b of this.layers)this.gradients[b.id]={};this.layoutVertexArray=new Bt,this.layoutVertexArray2=new St,this.indexArray=new Er,this.programConfigurations=new Ta(h.layers,h.zoom),this.segments=new an,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((b=>b.isStateDependent())).map((b=>b.id))}populate(h,b,D){this.hasDependencies=MS("line",this.layers,b)||this.hasLineDasharray(this.layers);let z=this.layers[0].layout.get("line-sort-key"),G=!z.isConstant(),X=[];for(let{feature:Z,id:re,index:Q,sourceLayerIndex:he}of h){let oe=this.layers[0]._featureFilter.needGeometry,ke=xa(Z,oe);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),ke,D))continue;let ge=G?z.evaluate(ke,{},D):void 0,Ue={id:re,properties:Z.properties,type:Z.type,sourceLayerIndex:he,index:Q,geometry:oe?ke.geometry:$l(Z),patterns:{},dashes:{},sortKey:ge};X.push(Ue)}G&&X.sort(((Z,re)=>Z.sortKey-re.sortKey));for(let Z of X){let{geometry:re,index:Q,sourceLayerIndex:he}=Z;this.hasDependencies?(MS("line",this.layers,b)?UR("line",this.layers,Z,{zoom:this.zoom},b):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,Z,this.zoom,b),this.patternFeatures.push(Z)):this.addFeature(Z,re,Q,D,{},{},b.subdivisionGranularity),b.featureIndex.insert(h[Q].feature,re,Q,he,this.index)}}update(h,b,D,z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,b,this.stateDependentLayers,{imagePositions:D,dashPositions:z})}addFeatures(h,b,D,z){for(let G of this.patternFeatures)this.addFeature(G,G.geometry,G.index,b,D,z,h.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=h.createVertexBuffer(this.layoutVertexArray2,Bnt)),this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,znt),this.indexBuffer=h.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(h){if(h.properties&&Object.hasOwn(h.properties,aI)&&Object.hasOwn(h.properties,oI))return{start:+h.properties[aI],end:+h.properties[oI]}}addFeature(h,b,D,z,G,X,Z){let re=this.layers[0].layout,Q=re.get("line-join").evaluate(h,{}),he=re.get("line-cap").evaluate(h,{}),oe=re.get("line-miter-limit").evaluate(h,{}),ke=re.get("line-round-limit").evaluate(h,{});this.lineClips=this.lineFeatureClips(h);for(let ge of b)this.addLine(ge,h,Q,he,oe,ke,z,Z);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,h,D,{imagePositions:G,dashPositions:X,canonical:z})}addLine(h,b,D,z,G,X,Z,re){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,h=nx(h,Z?re.line.getGranularityForZoomLevel(Z.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let _t=0;_t=2&&h[he-1].equals(h[he-2]);)he--;let oe=0;for(;oe0;if(_n&&_t>oe){let Ln=Ue.dist(je);if(Ln>2*ke){let un=Ue.sub(Ue.sub(je)._mult(ke/Ln)._round());this.updateDistance(je,un),this.addCurrentVertex(un,gt,0,0,ge),je=un}}let Dn=je&&vt,Hn=Dn?D:Q?"butt":z;if(Dn&&Hn==="round"&&(qrG&&(Hn="bevel"),Hn==="bevel"&&(qr>2&&(Hn="flipbevel"),qr100)qt=It.mult(-1);else{let Ln=qr*gt.add(It).mag()/gt.sub(It).mag();qt._perp()._mult(Ln*(fn?-1:1))}this.addCurrentVertex(Ue,qt,0,0,ge),this.addCurrentVertex(Ue,qt.mult(-1),0,0,ge)}else if(Hn==="bevel"||Hn==="fakeround"){let Ln=-Math.sqrt(qr*qr-1),un=fn?Ln:0,ei=fn?0:Ln;if(je&&this.addCurrentVertex(Ue,gt,un,ei,ge),Hn==="fakeround"){let ci=Math.round(180*jr/Math.PI/20);for(let ti=1;ti2*ke){let un=Ue.add(vt.sub(Ue)._mult(ke/Ln)._round());this.updateDistance(Ue,un),this.addCurrentVertex(un,It,0,0,ge),Ue=un}}}}addCurrentVertex(h,b,D,z,G,X=!1){let Z=b.y*z-b.x,re=-b.y-b.x*z;this.addHalfVertex(h,b.x+b.y*D,b.y-b.x*D,X,!1,D,G),this.addHalfVertex(h,Z,re,X,!0,-z,G),this.distance>WQ/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(h,b,D,z,G,X))}addHalfVertex({x:h,y:b},D,z,G,X,Z,re){let Q=.5*(this.lineClips?this.scaledDistance*(WQ-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((h<<1)+(G?1:0),(b<<1)+(X?1:0),Math.round(63*D)+128,Math.round(63*z)+128,1+(Z===0?0:Z<0?-1:1)|(63&Q)<<2,Q>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let he=re.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,he,this.e2),re.primitiveLength++),X?this.e2=he:this.e1=he}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(h,b){this.distance+=h.dist(b),this.updateScaledDistance()}hasLineDasharray(h){for(let b of h){let D=b.paint.get("line-dasharray");if(D&&!D.isConstant())return!0}return!1}addLineDashDependencies(h,b,D,z){for(let G of h){let X=G.paint.get("line-dasharray");if(!X||X.value.kind==="constant")continue;let Z=G.layout.get("line-cap").evaluate(b,{})==="round",re={dasharray:X.value.evaluate({zoom:D-1},b,{}),round:Z},Q={dasharray:X.value.evaluate({zoom:D},b,{}),round:Z},he={dasharray:X.value.evaluate({zoom:D+1},b,{}),round:Z},oe=`${re.dasharray.join(",")},${re.round}`,ke=`${Q.dasharray.join(",")},${Q.round}`,ge=`${he.dasharray.join(",")},${he.round}`;z.dashDependencies[oe]=re,z.dashDependencies[ke]=Q,z.dashDependencies[ge]=he,b.dashes[G.id]={min:oe,mid:ke,max:ge}}}}let YQ,XQ;_i("LineBucket",lI,{omit:["layers","patternFeatures"]});var ZQ={get paint(){return XQ=XQ||new ms({"line-opacity":new Di(Ct.paint_line["line-opacity"]),"line-color":new Di(Ct.paint_line["line-color"]),"line-translate":new wi(Ct.paint_line["line-translate"]),"line-translate-anchor":new wi(Ct.paint_line["line-translate-anchor"]),"line-width":new Di(Ct.paint_line["line-width"]),"line-gap-width":new Di(Ct.paint_line["line-gap-width"]),"line-offset":new Di(Ct.paint_line["line-offset"]),"line-blur":new Di(Ct.paint_line["line-blur"]),"line-dasharray":new fl(Ct.paint_line["line-dasharray"]),"line-pattern":new fl(Ct.paint_line["line-pattern"]),"line-gradient":new du(Ct.paint_line["line-gradient"])})},get layout(){return YQ=YQ||new ms({"line-cap":new Di(Ct.layout_line["line-cap"]),"line-join":new Di(Ct.layout_line["line-join"]),"line-miter-limit":new Di(Ct.layout_line["line-miter-limit"]),"line-round-limit":new Di(Ct.layout_line["line-round-limit"]),"line-sort-key":new Di(Ct.layout_line["line-sort-key"])})}};class Nnt extends Di{possiblyEvaluate(h,b){return b=new mi(Math.floor(b.zoom),{now:b.now,fadeDuration:b.fadeDuration,zoomHistory:b.zoomHistory,transition:b.transition}),super.possiblyEvaluate(h,b)}evaluate(h,b,D,z){return b=_e({},b,{zoom:Math.floor(b.zoom)}),super.evaluate(h,b,D,z)}}let RS;class Unt extends hl{constructor(h,b){super(h,ZQ,b),this.gradientVersion=0,RS||(RS=new Nnt(ZQ.paint.properties["line-width"].specification),RS.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(h){if(h==="line-gradient"){let b=this.gradientExpression();this.stepInterpolant=!!(function(D){return D._styleExpression!==void 0})(b)&&b._styleExpression.expression instanceof lu,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(h,b){super.recalculate(h,b),this.paint._values["line-floorwidth"]=RS.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,h)}createBucket(h){return new lI(h)}queryRadius(h){let b=h,D=$Q(sn("line-width",this,b),sn("line-gap-width",this,b)),z=sn("line-offset",this,b);return D/2+Math.abs(z)+tn(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:h,feature:b,featureState:D,geometry:z,transform:G,pixelsToTileUnits:X}){let Z=Hr(h,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-G.bearingInRadians,X),re=X/2*$Q(this.paint.get("line-width").evaluate(b,D),this.paint.get("line-gap-width").evaluate(b,D)),Q=this.paint.get("line-offset").evaluate(b,D);return Q&&(z=(function(he,oe){let ke=[];for(let ge of he){let Ue=Mr(ge),je=[];for(let vt=0;vt=3){for(let Ue of ge)if(pn(he,Ue))return!0}if(wo(he,ge,ke))return!0}return!1})(Z,z,re)}isTileClipped(){return!0}}function $Q(M,h){return h>0?h+2*M:M}let Vnt=Re([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Gnt=Re([{name:"a_projected_pos",components:3,type:"Float32"}],4);Re([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let Hnt=Re([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Re([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let KQ=Re([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),jnt=Re([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Wnt(M,h,b){let D=h.layout.get("text-transform").evaluate(b,{});return D==="uppercase"?M=M.toLocaleUpperCase():D==="lowercase"&&(M=M.toLocaleLowerCase()),Bi.applyArabicShaping&&(M=Bi.applyArabicShaping(M)),M}function Ynt(M,h,b){for(let D of M.sections)D.text=Wnt(D.text,h,b);return M}Re([{name:"triangle",components:3,type:"Uint16"}]),Re([{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"}]),Re([{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"}]),Re([{type:"Float32",name:"offsetX"}]),Re([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Re([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var Rc=24;let m4={"!":"\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"},Xnt={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},Znt={40:!0};function JQ(M,h,b,D,z,G){if("fontStack"in h){let X=b[h.fontStack],Z=X==null?void 0:X[M];return Z?Z.metrics.advance*h.scale+z:0}{let X=D[h.imageName];return X?X.displaySize[0]*h.scale*Rc/G+z:0}}function QQ(M,h,b,D){let z=Math.pow(M-h,2);return D?MMath.max(h,this.sections[b].scale)),0)}getMaxImageSize(h){let b=0,D=0;for(let z=0;zD)))}addImageSection(h){let b=h.image?h.image.name:"";if(b.length===0)return void me("Can't add FormattedSection with an empty image.");let D=this.getNextImageSectionCharCode();D?(this.text+=String.fromCharCode(D),this.sections.push({scale:1,verticalAlign:h.verticalAlign||"bottom",imageName:b}),this.sectionIndex.push(this.sections.length-1)):me("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(h,b,D,z,G){let X=[],Z=this.determineAverageLineWidth(h,b,D,z,G),re=this.hasZeroWidthSpaces(),Q=0,he=0,oe=this.text[Symbol.iterator](),ke=oe.next(),ge=this.text[Symbol.iterator]();ge.next();let Ue=ge.next(),je=this.text[Symbol.iterator]();je.next(),je.next();let vt=je.next();for(;!ke.done;){let gt=this.getSection(he),It=ke.value.codePointAt(0);if(Gt(It)||(Q+=JQ(It,gt,D,z,h,G)),!Ue.done){let _t=Je(It),qt=Ue.value.codePointAt(0);(Xnt[It]||_t||"imageName"in gt||!vt.done&&Znt[qt])&&X.push(eee(he+1,Q,Z,X,$nt(It,qt,_t&&re),!1))}he++,ke=oe.next(),Ue=ge.next(),vt=je.next()}return tee(eee(this.length(),Q,Z,X,0,!0))}determineAverageLineWidth(h,b,D,z,G){let X=0,Z=0;for(let re of this.text){let Q=this.getSection(Z);X+=JQ(re.codePointAt(0),Q,D,z,h,G),Z++}return X/Math.max(1,Math.ceil(X/b))}}let uI=4294967296,ree=1/uI,nee=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");class IS{constructor(h=new Uint8Array(16)){this.buf=ArrayBuffer.isView(h)?h:new Uint8Array(h),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(h,b,D=this.length){for(;this.pos>3,X=this.pos;this.type=7&z,h(G,b,this),this.pos===X&&this.skip(z)}return b}readMessage(h,b){return this.readFields(h,b,this.readVarint()+this.pos)}readFixed32(){let h=this.dataView.getUint32(this.pos,!0);return this.pos+=4,h}readSFixed32(){let h=this.dataView.getInt32(this.pos,!0);return this.pos+=4,h}readFixed64(){let h=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*uI;return this.pos+=8,h}readSFixed64(){let h=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*uI;return this.pos+=8,h}readFloat(){let h=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,h}readDouble(){let h=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,h}readVarint(h){let b=this.buf,D,z;return z=b[this.pos++],D=127&z,z<128?D:(z=b[this.pos++],D|=(127&z)<<7,z<128?D:(z=b[this.pos++],D|=(127&z)<<14,z<128?D:(z=b[this.pos++],D|=(127&z)<<21,z<128?D:(z=b[this.pos],D|=(15&z)<<28,(function(G,X,Z){let re=Z.buf,Q,he;if(he=re[Z.pos++],Q=(112&he)>>4,he<128||(he=re[Z.pos++],Q|=(127&he)<<3,he<128)||(he=re[Z.pos++],Q|=(127&he)<<10,he<128)||(he=re[Z.pos++],Q|=(127&he)<<17,he<128)||(he=re[Z.pos++],Q|=(127&he)<<24,he<128)||(he=re[Z.pos++],Q|=(1&he)<<31,he<128))return Y_(G,Q,X);throw new Error("Expected varint not more than 10 bytes")})(D,h,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let h=this.readVarint();return h%2==1?(h+1)/-2:h/2}readBoolean(){return!!this.readVarint()}readString(){let h=this.readVarint()+this.pos,b=this.pos;return this.pos=h,h-b>=12&&nee?nee.decode(this.buf.subarray(b,h)):(function(D,z,G){let X="",Z=z;for(;Z239?4:re>223?3:re>191?2:1;if(Z+ge>G)break;ge===1?re<128&&(ke=re):ge===2?(Q=D[Z+1],(192&Q)==128&&(ke=(31&re)<<6|63&Q,ke<=127&&(ke=null))):ge===3?(Q=D[Z+1],he=D[Z+2],(192&Q)==128&&(192&he)==128&&(ke=(15&re)<<12|(63&Q)<<6|63&he,(ke<=2047||ke>=55296&&ke<=57343)&&(ke=null))):ge===4&&(Q=D[Z+1],he=D[Z+2],oe=D[Z+3],(192&Q)==128&&(192&he)==128&&(192&oe)==128&&(ke=(15&re)<<18|(63&Q)<<12|(63&he)<<6|63&oe,(ke<=65535||ke>=1114112)&&(ke=null))),ke===null?(ke=65533,ge=1):ke>65535&&(ke-=65536,X+=String.fromCharCode(ke>>>10&1023|55296),ke=56320|1023&ke),X+=String.fromCharCode(ke),Z+=ge}return X})(this.buf,b,h)}readBytes(){let h=this.readVarint()+this.pos,b=this.buf.subarray(this.pos,h);return this.pos=h,b}readPackedVarint(h=[],b){let D=this.readPackedEnd();for(;this.pos127;);else if(b===2)this.pos=this.readVarint()+this.pos;else if(b===5)this.pos+=4;else{if(b!==1)throw new Error(`Unimplemented type: ${b}`);this.pos+=8}}writeTag(h,b){this.writeVarint(h<<3|b)}realloc(h){let b=this.length||16;for(;b268435455||h<0?(function(b,D){let z,G;if(b>=0?(z=b%4294967296|0,G=b/4294967296|0):(z=~(-b%4294967296),G=~(-b/4294967296),4294967295^z?z=z+1|0:(z=0,G=G+1|0)),b>=18446744073709552e3||b<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");D.realloc(10),(function(X,Z,re){re.buf[re.pos++]=127&X|128,X>>>=7,re.buf[re.pos++]=127&X|128,X>>>=7,re.buf[re.pos++]=127&X|128,X>>>=7,re.buf[re.pos++]=127&X|128,re.buf[re.pos]=127&(X>>>=7)})(z,0,D),(function(X,Z){let re=(7&X)<<4;Z.buf[Z.pos++]|=re|((X>>>=3)?128:0),X&&(Z.buf[Z.pos++]=127&X|((X>>>=7)?128:0),X&&(Z.buf[Z.pos++]=127&X|((X>>>=7)?128:0),X&&(Z.buf[Z.pos++]=127&X|((X>>>=7)?128:0),X&&(Z.buf[Z.pos++]=127&X|((X>>>=7)?128:0),X&&(Z.buf[Z.pos++]=127&X)))))})(G,D)})(h,this):(this.realloc(4),this.buf[this.pos++]=127&h|(h>127?128:0),h<=127||(this.buf[this.pos++]=127&(h>>>=7)|(h>127?128:0),h<=127||(this.buf[this.pos++]=127&(h>>>=7)|(h>127?128:0),h<=127||(this.buf[this.pos++]=h>>>7&127))))}writeSVarint(h){this.writeVarint(h<0?2*-h-1:2*h)}writeBoolean(h){this.writeVarint(+h)}writeString(h){h=String(h),this.realloc(4*h.length),this.pos++;let b=this.pos;this.pos=(function(z,G,X){for(let Z,re,Q=0;Q55295&&Z<57344){if(!re){Z>56319||Q+1===G.length?(z[X++]=239,z[X++]=191,z[X++]=189):re=Z;continue}if(Z<56320){z[X++]=239,z[X++]=191,z[X++]=189,re=Z;continue}Z=re-55296<<10|Z-56320|65536,re=null}else re&&(z[X++]=239,z[X++]=191,z[X++]=189,re=null);Z<128?z[X++]=Z:(Z<2048?z[X++]=Z>>6|192:(Z<65536?z[X++]=Z>>12|224:(z[X++]=Z>>18|240,z[X++]=Z>>12&63|128),z[X++]=Z>>6&63|128),z[X++]=63&Z|128)}return X})(this.buf,h,this.pos);let D=this.pos-b;D>=128&&iee(b,D,this),this.pos=b-1,this.writeVarint(D),this.pos+=D}writeFloat(h){this.realloc(4),this.dataView.setFloat32(this.pos,h,!0),this.pos+=4}writeDouble(h){this.realloc(8),this.dataView.setFloat64(this.pos,h,!0),this.pos+=8}writeBytes(h){let b=h.length;this.writeVarint(b),this.realloc(b);for(let D=0;D=128&&iee(D,z,this),this.pos=D-1,this.writeVarint(z),this.pos+=z}writeMessage(h,b,D){this.writeTag(h,2),this.writeRawMessage(b,D)}writePackedVarint(h,b){b.length&&this.writeMessage(h,Knt,b)}writePackedSVarint(h,b){b.length&&this.writeMessage(h,Jnt,b)}writePackedBoolean(h,b){b.length&&this.writeMessage(h,tit,b)}writePackedFloat(h,b){b.length&&this.writeMessage(h,Qnt,b)}writePackedDouble(h,b){b.length&&this.writeMessage(h,eit,b)}writePackedFixed32(h,b){b.length&&this.writeMessage(h,rit,b)}writePackedSFixed32(h,b){b.length&&this.writeMessage(h,nit,b)}writePackedFixed64(h,b){b.length&&this.writeMessage(h,iit,b)}writePackedSFixed64(h,b){b.length&&this.writeMessage(h,ait,b)}writeBytesField(h,b){this.writeTag(h,2),this.writeBytes(b)}writeFixed32Field(h,b){this.writeTag(h,5),this.writeFixed32(b)}writeSFixed32Field(h,b){this.writeTag(h,5),this.writeSFixed32(b)}writeFixed64Field(h,b){this.writeTag(h,1),this.writeFixed64(b)}writeSFixed64Field(h,b){this.writeTag(h,1),this.writeSFixed64(b)}writeVarintField(h,b){this.writeTag(h,0),this.writeVarint(b)}writeSVarintField(h,b){this.writeTag(h,0),this.writeSVarint(b)}writeStringField(h,b){this.writeTag(h,2),this.writeString(b)}writeFloatField(h,b){this.writeTag(h,5),this.writeFloat(b)}writeDoubleField(h,b){this.writeTag(h,1),this.writeDouble(b)}writeBooleanField(h,b){this.writeVarintField(h,+b)}}function Y_(M,h,b){return b?4294967296*h+(M>>>0):4294967296*(h>>>0)+(M>>>0)}function iee(M,h,b){let D=h<=16383?1:h<=2097151?2:h<=268435455?3:Math.floor(Math.log(h)/(7*Math.LN2));b.realloc(D);for(let z=b.pos-1;z>=M;z--)b.buf[z+D]=b.buf[z]}function Knt(M,h){for(let b=0;bZ.h-X.h));let D=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(h/.95)),b),h:1/0}],z=0,G=0;for(let X of M)for(let Z=D.length-1;Z>=0;Z--){let re=D[Z];if(!(X.w>re.w||X.h>re.h)){if(X.x=re.x,X.y=re.y,G=Math.max(G,X.y+X.h),z=Math.max(z,X.x+X.w),X.w===re.w&&X.h===re.h){let Q=D.pop();Q&&Zje.toCodeUnitIndex(qr)));let lr=It(je.toString(),gt);for(let qr of lr){let jr=[...qr].map((()=>0));vt.push(new W_(qr,je.sections,jr))}}else if(_t){vt=[],gt=gt.map((_n=>je.toCodeUnitIndex(_n)));let lr=0,qr=[];for(let _n of je.text)qr.push(...Array(_n.length).fill(je.sectionIndex[lr])),lr++;let jr=_t(je.text,qr,gt);for(let _n of jr){let fn=[],Dn="";for(let Hn of _n[0])fn.push(_n[1][Dn.length]),Dn+=Hn;vt.push(new W_(_n[0],je.sections,fn))}}else vt=(function(lr,qr){let jr=[],_n=0;for(let fn of qr)jr.push(lr.substring(_n,fn)),_n=fn;return _nQ){let he=Math.ceil(G/Q);z*=he/X,X=he}return{x1:D,y1:z,x2:D+G,y2:z+X}}function uee(M,h,b,D,z,G){let X=M.image,Z;if(X.content){let vt=X.content,gt=X.pixelRatio||1;Z=[vt[0]/gt,vt[1]/gt,X.displaySize[0]-vt[2]/gt,X.displaySize[1]-vt[3]/gt]}let re=h.left*G,Q=h.right*G,he,oe,ke,ge;b==="width"||b==="both"?(ge=z[0]+re-D[3],oe=z[0]+Q+D[1]):(ge=z[0]+(re+Q-X.displaySize[0])/2,oe=ge+X.displaySize[0]);let Ue=h.top*G,je=h.bottom*G;return b==="height"||b==="both"?(he=z[1]+Ue-D[0],ke=z[1]+je+D[2]):(he=z[1]+(Ue+je-X.displaySize[1])/2,ke=he+X.displaySize[1]),{image:X,top:he,right:oe,bottom:ke,left:ge,collisionPadding:Z}}_i("ImagePosition",cI),_i("ImageAtlas",oee),a.ax=void 0,(Wg=a.ax||(a.ax={}))[Wg.none=0]="none",Wg[Wg.horizontal=1]="horizontal",Wg[Wg.vertical=2]="vertical",Wg[Wg.horizontalOnly=3]="horizontalOnly";let N1=128,Yg=32640;function cee(M,h){let{expression:b}=h;if(b.kind==="constant")return{kind:"constant",layoutSize:b.evaluate(new mi(M+1))};if(b.kind==="source")return{kind:"source"};{let{zoomStops:D,interpolationType:z}=b,G=0;for(;GX.id)),this.index=h.index,this.pixelRatio=h.pixelRatio,this.sourceLayerIndex=h.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let b=this.layers[0]._unevaluatedLayout._values;this.textSizeData=cee(this.zoom,b["text-size"]),this.iconSizeData=cee(this.zoom,b["icon-size"]);let D=this.layers[0].layout,z=D.get("symbol-sort-key"),G=D.get("symbol-z-order");this.canOverlap=hI(D,"text-overlap","text-allow-overlap")!=="never"||hI(D,"icon-overlap","icon-allow-overlap")!=="never"||D.get("text-ignore-placement")||D.get("icon-ignore-placement"),this.sortFeaturesByKey=G!=="viewport-y"&&!z.isConstant(),this.sortFeaturesByY=(G==="viewport-y"||G==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,D.get("symbol-placement")==="point"&&(this.writingModes=D.get("text-writing-mode").map((X=>a.ax[X]))),this.stateDependentLayerIds=this.layers.filter((X=>X.isStateDependent())).map((X=>X.id)),this.sourceID=h.sourceID}createArrays(){this.text=new vI(new Ta(this.layers,this.zoom,(h=>h.startsWith("text")))),this.icon=new vI(new Ta(this.layers,this.zoom,(h=>h.startsWith("icon")))),this.glyphOffsetArray=new Fe,this.lineVertexArray=new Ie,this.symbolInstances=new Ae,this.textAnchorOffsets=new st}calculateGlyphDependencies(h,b,D,z,G){for(let X of h)if(b[X.codePointAt(0)]=!0,(D||z)&&G){let Z=m4[X];Z&&(b[Z.codePointAt(0)]=!0)}}populate(h,b,D){var z;let G=this.layers[0],X=G.layout,Z=X.get("text-font"),re=X.get("text-field"),Q=X.get("icon-image"),he=(re.value.kind!=="constant"||re.value.value instanceof $a&&!re.value.value.isEmpty()||re.value.value.toString().length>0)&&(Z.value.kind!=="constant"||Z.value.value.length>0),oe=Q.value.kind!=="constant"||!!Q.value.value||Object.keys(Q.parameters).length>0,ke=X.get("symbol-sort-key");if(this.features=[],!he&&!oe)return;let ge=b.iconDependencies,Ue=b.glyphDependencies,je=b.availableImages,vt=new mi(this.zoom);for(let{feature:gt,id:It,index:_t,sourceLayerIndex:qt}of h){let tr=G._featureFilter.needGeometry,lr=xa(gt,tr);if(!G._featureFilter.filter(vt,lr,D))continue;let qr,jr;if(tr||(lr.geometry=$l(gt)),he){let fn=G.getValueAndResolveTokens("text-field",lr,D,je),Dn=$a.factory(fn);this.hasRTLText||(this.hasRTLText=git(Dn)),(!this.hasRTLText||Bi.getRTLTextPluginStatus()==="unavailable"||this.hasRTLText&&Bi.isParsed())&&(qr=Ynt(Dn,G,lr))}if(oe){let fn=G.getValueAndResolveTokens("icon-image",lr,D,je);jr=fn instanceof so?fn:so.fromString(fn)}if(!qr&&!jr)continue;let _n=this.sortFeaturesByKey?ke.evaluate(lr,{},D):void 0;if(this.features.push({id:It,text:qr,icon:jr,index:_t,sourceLayerIndex:qt,geometry:lr.geometry,properties:gt.properties,type:h4.types[gt.type],sortKey:_n}),jr&&(ge[jr.name]=!0),qr){let fn=Z.evaluate(lr,{},D).join(","),Dn=X.get("text-rotation-alignment")!=="viewport"&&X.get("symbol-placement")!=="point";this.allowVerticalPlacement=(z=this.writingModes)===null||z===void 0?void 0:z.includes(a.ax.vertical);for(let Hn of qr.sections)if(Hn.image)ge[Hn.image.name]=!0;else{let Ln=Zt(qr.toString()),un=Hn.fontStack||fn;Ue[un]||(Ue[un]={}),this.calculateGlyphDependencies(Hn.text,Ue[un],Dn,this.allowVerticalPlacement,Ln)}}}X.get("symbol-placement")==="line"&&(this.features=(function(gt){let It={},_t={},qt=[],tr=0;function lr(fn){qt.push(gt[fn]),tr++}function qr(fn,Dn,Hn){let Ln=_t[fn];return delete _t[fn],_t[Dn]=Ln,qt[Ln].geometry[0].pop(),qt[Ln].geometry[0]=qt[Ln].geometry[0].concat(Hn[0]),Ln}function jr(fn,Dn,Hn){let Ln=It[Dn];return delete It[Dn],It[fn]=Ln,qt[Ln].geometry[0].shift(),qt[Ln].geometry[0]=Hn[0].concat(qt[Ln].geometry[0]),Ln}function _n(fn,Dn,Hn){let Ln=Hn?Dn[0][Dn[0].length-1]:Dn[0][0];return`${fn}:${Ln.x}:${Ln.y}`}for(let fn=0;fnfn.geometry))})(this.features)),this.sortFeaturesByKey&&this.features.sort(((gt,It)=>gt.sortKey-It.sortKey))}update(h,b,D){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(h,b,this.layers,{imagePositions:D}),this.icon.programConfigurations.updatePaintArrays(h,b,this.layers,{imagePositions:D}))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(h){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(h),this.iconCollisionBox.upload(h)),this.text.upload(h,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(h,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(h,b){let D=this.lineVertexArray.length;if(h.segment!==void 0){let z=h.dist(b[h.segment+1]),G=h.dist(b[h.segment]),X={};for(let Z=h.segment+1;Z=0;Z--)X[Z]={x:b[Z].x,y:b[Z].y,tileUnitDistanceFromAnchor:G},Z>0&&(G+=b[Z-1].dist(b[Z]));for(let Z=0;Z0}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(h,b){let D=h.placedSymbolArray.get(b),z=D.vertexStartIndex+4*D.numGlyphs;for(let G=D.vertexStartIndex;Gz[Z]-z[re]||G[re]-G[Z])),X}addToSortKeyRanges(h,b){let D=this.sortKeyRanges[this.sortKeyRanges.length-1];(D==null?void 0:D.sortKey)===b?D.symbolInstanceEnd=h+1:this.sortKeyRanges.push({sortKey:b,symbolInstanceStart:h,symbolInstanceEnd:h+1})}sortFeatures(h){if(this.sortFeaturesByY&&this.sortedAngle!==h&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(h),this.sortedAngle=h,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let b of this.symbolInstanceIndexes){let D=this.symbolInstances.get(b);this.featureSortOrder.push(D.featureIndex);let z=[D.rightJustifiedTextSymbolIndex,D.centerJustifiedTextSymbolIndex,D.leftJustifiedTextSymbolIndex];for(let G=0;G=0&&z.indexOf(X)===G&&this.addIndicesForPlacedSymbol(this.text,X)}D.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,D.verticalPlacedTextSymbolIndex),D.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,D.placedIconSymbolIndex),D.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,D.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let fee,hee;_i("SymbolBucket",X_,{omit:["layers","collisionBoxArray","features","compareText"]}),X_.MAX_GLYPHS=65535,X_.addDynamicAttributes=dI;var gI={get paint(){return hee=hee||new ms({"icon-opacity":new Di(Ct.paint_symbol["icon-opacity"]),"icon-color":new Di(Ct.paint_symbol["icon-color"]),"icon-halo-color":new Di(Ct.paint_symbol["icon-halo-color"]),"icon-halo-width":new Di(Ct.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Di(Ct.paint_symbol["icon-halo-blur"]),"icon-translate":new wi(Ct.paint_symbol["icon-translate"]),"icon-translate-anchor":new wi(Ct.paint_symbol["icon-translate-anchor"]),"text-opacity":new Di(Ct.paint_symbol["text-opacity"]),"text-color":new Di(Ct.paint_symbol["text-color"],{runtimeType:Ut,getOverride:M=>M.textColor,hasOverride:M=>!!M.textColor}),"text-halo-color":new Di(Ct.paint_symbol["text-halo-color"]),"text-halo-width":new Di(Ct.paint_symbol["text-halo-width"]),"text-halo-blur":new Di(Ct.paint_symbol["text-halo-blur"]),"text-translate":new wi(Ct.paint_symbol["text-translate"]),"text-translate-anchor":new wi(Ct.paint_symbol["text-translate-anchor"])})},get layout(){return fee=fee||new ms({"symbol-placement":new wi(Ct.layout_symbol["symbol-placement"]),"symbol-spacing":new wi(Ct.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new wi(Ct.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Di(Ct.layout_symbol["symbol-sort-key"]),"symbol-z-order":new wi(Ct.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new wi(Ct.layout_symbol["icon-allow-overlap"]),"icon-overlap":new wi(Ct.layout_symbol["icon-overlap"]),"icon-ignore-placement":new wi(Ct.layout_symbol["icon-ignore-placement"]),"icon-optional":new wi(Ct.layout_symbol["icon-optional"]),"icon-rotation-alignment":new wi(Ct.layout_symbol["icon-rotation-alignment"]),"icon-size":new Di(Ct.layout_symbol["icon-size"]),"icon-text-fit":new wi(Ct.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new wi(Ct.layout_symbol["icon-text-fit-padding"]),"icon-image":new Di(Ct.layout_symbol["icon-image"]),"icon-rotate":new Di(Ct.layout_symbol["icon-rotate"]),"icon-padding":new Di(Ct.layout_symbol["icon-padding"]),"icon-keep-upright":new wi(Ct.layout_symbol["icon-keep-upright"]),"icon-offset":new Di(Ct.layout_symbol["icon-offset"]),"icon-anchor":new Di(Ct.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new wi(Ct.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new wi(Ct.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new wi(Ct.layout_symbol["text-rotation-alignment"]),"text-field":new Di(Ct.layout_symbol["text-field"]),"text-font":new Di(Ct.layout_symbol["text-font"]),"text-size":new Di(Ct.layout_symbol["text-size"]),"text-max-width":new Di(Ct.layout_symbol["text-max-width"]),"text-line-height":new wi(Ct.layout_symbol["text-line-height"]),"text-letter-spacing":new Di(Ct.layout_symbol["text-letter-spacing"]),"text-justify":new Di(Ct.layout_symbol["text-justify"]),"text-radial-offset":new Di(Ct.layout_symbol["text-radial-offset"]),"text-variable-anchor":new wi(Ct.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Di(Ct.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Di(Ct.layout_symbol["text-anchor"]),"text-max-angle":new wi(Ct.layout_symbol["text-max-angle"]),"text-writing-mode":new wi(Ct.layout_symbol["text-writing-mode"]),"text-rotate":new Di(Ct.layout_symbol["text-rotate"]),"text-padding":new wi(Ct.layout_symbol["text-padding"]),"text-keep-upright":new wi(Ct.layout_symbol["text-keep-upright"]),"text-transform":new Di(Ct.layout_symbol["text-transform"]),"text-offset":new Di(Ct.layout_symbol["text-offset"]),"text-allow-overlap":new wi(Ct.layout_symbol["text-allow-overlap"]),"text-overlap":new wi(Ct.layout_symbol["text-overlap"]),"text-ignore-placement":new wi(Ct.layout_symbol["text-ignore-placement"]),"text-optional":new wi(Ct.layout_symbol["text-optional"])})}};class dee{constructor(h){if(h.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=h.property.overrides?h.property.overrides.runtimeType:Dt,this.defaultValue=h}evaluate(h){if(h.formattedSection){let b=this.defaultValue.property.overrides;if(b!=null&&b.hasOverride(h.formattedSection))return b.getOverride(h.formattedSection)}return h.feature&&h.featureState?this.defaultValue.evaluate(h.feature,h.featureState):this.defaultValue.property.specification.default}eachChild(h){this.defaultValue.isConstant()||h(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}_i("FormatSectionOverride",dee,{omit:["defaultValue"]});class BS extends hl{constructor(h,b){super(h,gI,b)}recalculate(h,b){if(super.recalculate(h,b),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let D=this.layout.get("text-writing-mode");if(D){let z=[];for(let G of D)z.includes(G)||z.push(G);this.layout._values["text-writing-mode"]=z}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(h,b,D,z){let G=this.layout.get(h).evaluate(b,{},D,z),X=this._unevaluatedLayout._values[h];return X.isDataDriven()||If(X.value)||!G?G:(function(Z,re){return re.replace(/{([^{}]+)}/g,((Q,he)=>Z&&he in Z?String(Z[he]):""))})(b.properties,G)}createBucket(h){return new X_(h)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let h of gI.paint.overridableProperties){if(!BS.hasPaintOverride(this.layout,h))continue;let b=this.paint.get(h),D=new dee(b),z=new Wl(D,b.property.specification),G=null;G=b.value.kind==="constant"||b.value.kind==="source"?new zf("source",z):new qf("composite",z,b.value.zoomStops),this.paint._values[h]=new el(b.property,G,b.parameters)}}_handleOverridablePaintPropertyUpdate(h,b,D){return!(!this.layout||b.isDataDriven()||D.isDataDriven())&&BS.hasPaintOverride(this.layout,h)}static hasPaintOverride(h,b){let D=h.get("text-field"),z=gI.paint.properties[b],G=!1,X=Z=>{var re;for(let Q of Z)if(!((re=z.overrides)===null||re===void 0)&&re.hasOverride(Q))return void(G=!0)};if(D.value.kind==="constant"&&D.value.value instanceof $a)X(D.value.value.sections);else if(D.value.kind==="source"||D.value.kind==="composite"){let Z=Q=>{G||(Q instanceof Ms&&la(Q.value)===ri?X(Q.value.sections):Q instanceof Yo?X(Q.sections):Q.eachChild(Z))},re=D.value;re._styleExpression&&Z(re._styleExpression.expression)}return G}}let vee;var mit={get paint(){return vee=vee||new ms({"background-color":new wi(Ct.paint_background["background-color"]),"background-pattern":new Fc(Ct.paint_background["background-pattern"]),"background-opacity":new wi(Ct.paint_background["background-opacity"])})}};class yit extends hl{constructor(h,b){super(h,mit,b)}}class xit extends hl{constructor(h,b){super(h,{},b),this.onAdd=D=>{this.implementation.onAdd&&this.implementation.onAdd(D,D.painter.context.gl)},this.onRemove=D=>{this.implementation.onRemove&&this.implementation.onRemove(D,D.painter.context.gl)},this.implementation=h}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class _it{constructor(h){this._methodToThrottle=h,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var h;this._triggered||(this._triggered=!0,(h=this._channel)===null||h===void 0||h.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let bit={once:!0},mI=63710088e-1;class Xg{constructor(h,b){if(isNaN(h)||isNaN(b))throw new Error(`Invalid LngLat object: (${h}, ${b})`);if(this.lng=+h,this.lat=+b,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Xg(K(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(h){let b=Math.PI/180,D=this.lat*b,z=h.lat*b,G=Math.sin(D)*Math.sin(z)+Math.cos(D)*Math.cos(z)*Math.cos((h.lng-this.lng)*b);return mI*Math.acos(Math.min(G,1))}static convert(h){if(h instanceof Xg)return h;if(Array.isArray(h)&&(h.length===2||h.length===3))return new Xg(Number(h[0]),Number(h[1]));if(!Array.isArray(h)&&typeof h=="object"&&h!==null)return new Xg(Number("lng"in h?h.lng:h.lon),Number(h.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let pee=2*Math.PI*mI;function gee(M){return pee*Math.cos(M*Math.PI/180)}function mee(M){return(180+M)/360}function yee(M){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+M*Math.PI/360)))/360}function xee(M,h){return M/gee(h)}function _ee(M){return 360*M-180}function OS(M){return 360/Math.PI*Math.atan(Math.exp((180-360*M)*Math.PI/180))-90}function bee(M,h){return M*gee(OS(h))}class y4{constructor(h,b,D=0){this.x=+h,this.y=+b,this.z=+D}static fromLngLat(h,b=0){let D=Xg.convert(h);return new y4(mee(D.lng),yee(D.lat),xee(b,D.lat))}toLngLat(){return new Xg(_ee(this.x),OS(this.y))}toAltitude(){return bee(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/pee*(h=OS(this.y),1/Math.cos(h*Math.PI/180));var h}}function wee(M,h,b){var D=2*Math.PI*6378137/256/Math.pow(2,b);return[M*D-2*Math.PI*6378137/2,h*D-2*Math.PI*6378137/2]}class yI{constructor(h,b,D){if(!(function(z,G,X){return!(z<0||z>25||X<0||X>=Math.pow(2,z)||G<0||G>=Math.pow(2,z))})(h,b,D))throw new Error(`x=${b}, y=${D}, z=${h} outside of bounds. 0<=x<${Math.pow(2,h)}, 0<=y<${Math.pow(2,h)} 0<=z<=25 `);this.z=h,this.x=b,this.y=D,this.key=Z_(0,h,h,b,D)}equals(h){return this.z===h.z&&this.x===h.x&&this.y===h.y}url(h,b,D){let z=(X=this.y,Z=this.z,re=wee(256*(G=this.x),256*(X=Math.pow(2,Z)-X-1),Z),Q=wee(256*(G+1),256*(X+1),Z),re[0]+","+re[1]+","+Q[0]+","+Q[1]);var G,X,Z,re,Q;let he=(function(oe,ke,ge){let Ue="";for(let je=oe;je>0;je--){let vt=1<1?"@2x":"").replace(/{quadkey}/g,he).replace(/{bbox-epsg-3857}/g,z)}isChildOf(h){let b=this.z-h.z;return b>0&&h.x===this.x>>b&&h.y===this.y>>b}getTilePoint(h){let b=Math.pow(2,this.z);return new o((h.x*b-this.x)*j,(h.y*b-this.y)*j)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Tee{constructor(h,b){this.wrap=h,this.canonical=b,this.key=Z_(h,b.z,b.z,b.x,b.y)}}class Yd{constructor(h,b,D,z,G){if(this.terrainRttPosMatrix32f=null,h= z; overscaledZ = ${h}; z = ${D}`);this.overscaledZ=h,this.wrap=b,this.canonical=new yI(D,+z,+G),this.key=Z_(b,h,D,z,G)}clone(){return new Yd(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(h){return this.overscaledZ===h.overscaledZ&&this.wrap===h.wrap&&this.canonical.equals(h.canonical)}scaledTo(h){if(h>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${h}; overscaledZ = ${this.overscaledZ}`);let b=this.canonical.z-h;return h>this.canonical.z?new Yd(h,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Yd(h,this.wrap,h,this.canonical.x>>b,this.canonical.y>>b)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(h,b){if(h>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${h}; overscaledZ = ${this.overscaledZ}`);let D=this.canonical.z-h;return h>this.canonical.z?Z_(this.wrap*+b,h,this.canonical.z,this.canonical.x,this.canonical.y):Z_(this.wrap*+b,h,h,this.canonical.x>>D,this.canonical.y>>D)}isChildOf(h){if(h.wrap!==this.wrap||this.overscaledZ-h.overscaledZ<=0)return!1;if(h.overscaledZ===0)return this.overscaledZ>0;let b=this.canonical.z-h.canonical.z;return!(b<0)&&h.canonical.x===this.canonical.x>>b&&h.canonical.y===this.canonical.y>>b}children(h){if(this.overscaledZ>=h)return[new Yd(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let b=this.canonical.z+1,D=2*this.canonical.x,z=2*this.canonical.y;return[new Yd(b,this.wrap,b,D,z),new Yd(b,this.wrap,b,D+1,z),new Yd(b,this.wrap,b,D,z+1),new Yd(b,this.wrap,b,D+1,z+1)]}isLessThan(h){return this.wraph.wrap)&&(this.overscaledZh.overscaledZ)&&(this.canonical.xh.canonical.x)&&this.canonical.y=0&&h=0&&b=Q)return null;let oe=this.canonical.x+z,ke=this.wrap;return oe<0?(ke-=Math.ceil(-oe/Q),oe=(oe%Q+Q)%Q):oe>=Q&&(ke+=Math.floor(oe/Q),oe%=Q),{tileID:new Yd(this.overscaledZ,ke,re,oe,he),x:X,y:Z}}}function Z_(M,h,b,D,z){(M*=2)<0&&(M=-1*M-1);let G=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(h){return this.expandBy(-h)}map(h){let b=new ix;return b.extend(h(new o(this.minX,this.minY))),b.extend(h(new o(this.maxX,this.minY))),b.extend(h(new o(this.minX,this.maxY))),b.extend(h(new o(this.maxX,this.maxY))),b}static fromPoints(h){let b=new ix;for(let D of h)b.extend(D);return b}contains(h){return h.x>=this.minX&&h.x<=this.maxX&&h.y>=this.minY&&h.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(h){return!this.empty()&&!h.empty()&&h.minX>=this.minX&&h.maxX<=this.maxX&&h.minY>=this.minY&&h.maxY<=this.maxY}intersects(h){return!this.empty()&&!h.empty()&&h.minX<=this.maxX&&h.maxX>=this.minX&&h.minY<=this.maxY&&h.maxY>=this.minY}}class Aee{constructor(h){this._stringToNumber={},this._numberToString=[];for(let b=0;b=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${h} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[h]}}class Mee{constructor(h,b,D,z,G){this.type="Feature",this._vectorTileFeature=h,this._x=D,this._y=z,this._z=b,this.properties=h.properties,this.id=G}projectPoint(h,b,D,z){return[360*(h.x+b)/z-180,360/Math.PI*Math.atan(Math.exp((1-2*(h.y+D)/z)*Math.PI))-90]}projectLine(h,b,D,z){return h.map((G=>this.projectPoint(G,b,D,z)))}get geometry(){if(this._geometry)return this._geometry;let h=this._vectorTileFeature,b=h.extent*Math.pow(2,this._z),D=h.extent*this._x,z=h.extent*this._y,G=h.loadGeometry();switch(h.type){case 1:{let X=[];for(let re of G)X.push(re[0]);let Z=this.projectLine(X,D,z,b);this._geometry=X.length===1?{type:"Point",coordinates:Z[0]}:{type:"MultiPoint",coordinates:Z};break}case 2:{let X=G.map((Z=>this.projectLine(Z,D,z,b)));this._geometry=X.length===1?{type:"LineString",coordinates:X[0]}:{type:"MultiLineString",coordinates:X};break}case 3:{let X=kQ(G),Z=[];for(let re of X)Z.push(re.map((Q=>this.projectLine(Q,D,z,b))));this._geometry=Z.length===1?{type:"Polygon",coordinates:Z[0]}:{type:"MultiPolygon",coordinates:Z};break}default:throw new Error(`unknown feature type: ${h.type}`)}return this._geometry}set geometry(h){this._geometry=h}toJSON(){let h={geometry:this.geometry};for(let b in this)b!=="_geometry"&&b!=="_vectorTileFeature"&&b!=="_x"&&b!=="_y"&&b!=="_z"&&(h[b]=this[b]);return h}}class $_{constructor(h,b,D){this._name=h,this.dataBuffer=b,typeof D=="number"?this._size=D:(this.nullabilityBuffer=D,this._size=D.size())}getValue(h){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(h)?null:this.getValueFromBuffer(h)}has(h){var b;return((b=this.nullabilityBuffer)==null?void 0:b.get(h))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class NS extends $_{}class xI extends NS{getValueFromBuffer(h){return this.dataBuffer[h]}}class _I extends NS{getValueFromBuffer(h){return this.dataBuffer[h]}}class See extends $_{constructor(h,b,D,z){super(h,b,z),this.delta=D}}class bI extends See{constructor(h,b,D,z){super(h,Int32Array.of(b),D,z)}getValueFromBuffer(h){return this.dataBuffer[0]+h*this.delta}}class wI extends $_{constructor(h,b,D,z){super(h,z?Int32Array.of(b):Uint32Array.of(b),D)}getValueFromBuffer(h){return this.dataBuffer[0]}}class wit{constructor(h,b,D,z,G=4096){this._name=h,this._geometryVector=b,this._idVector=D,this._propertyVectors=z,this._extent=G}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(h){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map((b=>[b.name,b])))),this.propertyVectorsMap.get(h)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let h=[],b=this.geometryVector.getGeometries();for(let D=0;D>>32-M;let AI=TI,U1=256;function MI(M,h){return M-M%h}function Tit(M){let h=M>>>0;return((255&h)<<24|(65280&h)<<8|h>>>8&65280|h>>>24&255)>>>0}let SI=(function(){if(!Number.isFinite(65536))return 65536;let M=MI(Math.floor(65536),U1);return M===0?U1:M})(),Ait=3*SI/U1+SI|0;function kee(){let M=new Uint8Array(Ait);return{dataToBePacked:new Array(33),dataPointers:new Int32Array(33),byteContainer:M,byteContainerI32:new Int32Array(M.buffer,M.byteOffset,M.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function Mit(M,h,b,D,z){switch(z){case 1:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0;Z[Q++]=ke>>>0&1,Z[Q++]=ke>>>1&1,Z[Q++]=ke>>>2&1,Z[Q++]=ke>>>3&1,Z[Q++]=ke>>>4&1,Z[Q++]=ke>>>5&1,Z[Q++]=ke>>>6&1,Z[Q++]=ke>>>7&1,Z[Q++]=ke>>>8&1,Z[Q++]=ke>>>9&1,Z[Q++]=ke>>>10&1,Z[Q++]=ke>>>11&1,Z[Q++]=ke>>>12&1,Z[Q++]=ke>>>13&1,Z[Q++]=ke>>>14&1,Z[Q++]=ke>>>15&1,Z[Q++]=ke>>>16&1,Z[Q++]=ke>>>17&1,Z[Q++]=ke>>>18&1,Z[Q++]=ke>>>19&1,Z[Q++]=ke>>>20&1,Z[Q++]=ke>>>21&1,Z[Q++]=ke>>>22&1,Z[Q++]=ke>>>23&1,Z[Q++]=ke>>>24&1,Z[Q++]=ke>>>25&1,Z[Q++]=ke>>>26&1,Z[Q++]=ke>>>27&1,Z[Q++]=ke>>>28&1,Z[Q++]=ke>>>29&1,Z[Q++]=ke>>>30&1,Z[Q++]=ke>>>31&1}})(M,h,b,D);break;case 2:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0;Z[Q++]=ke>>>0&3,Z[Q++]=ke>>>2&3,Z[Q++]=ke>>>4&3,Z[Q++]=ke>>>6&3,Z[Q++]=ke>>>8&3,Z[Q++]=ke>>>10&3,Z[Q++]=ke>>>12&3,Z[Q++]=ke>>>14&3,Z[Q++]=ke>>>16&3,Z[Q++]=ke>>>18&3,Z[Q++]=ke>>>20&3,Z[Q++]=ke>>>22&3,Z[Q++]=ke>>>24&3,Z[Q++]=ke>>>26&3,Z[Q++]=ke>>>28&3,Z[Q++]=ke>>>30&3,Z[Q++]=ge>>>0&3,Z[Q++]=ge>>>2&3,Z[Q++]=ge>>>4&3,Z[Q++]=ge>>>6&3,Z[Q++]=ge>>>8&3,Z[Q++]=ge>>>10&3,Z[Q++]=ge>>>12&3,Z[Q++]=ge>>>14&3,Z[Q++]=ge>>>16&3,Z[Q++]=ge>>>18&3,Z[Q++]=ge>>>20&3,Z[Q++]=ge>>>22&3,Z[Q++]=ge>>>24&3,Z[Q++]=ge>>>26&3,Z[Q++]=ge>>>28&3,Z[Q++]=ge>>>30&3}})(M,h,b,D);break;case 3:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0;Z[Q++]=ke>>>0&7,Z[Q++]=ke>>>3&7,Z[Q++]=ke>>>6&7,Z[Q++]=ke>>>9&7,Z[Q++]=ke>>>12&7,Z[Q++]=ke>>>15&7,Z[Q++]=ke>>>18&7,Z[Q++]=ke>>>21&7,Z[Q++]=ke>>>24&7,Z[Q++]=ke>>>27&7,Z[Q++]=7&(ke>>>30|(1&ge)<<2),Z[Q++]=ge>>>1&7,Z[Q++]=ge>>>4&7,Z[Q++]=ge>>>7&7,Z[Q++]=ge>>>10&7,Z[Q++]=ge>>>13&7,Z[Q++]=ge>>>16&7,Z[Q++]=ge>>>19&7,Z[Q++]=ge>>>22&7,Z[Q++]=ge>>>25&7,Z[Q++]=ge>>>28&7,Z[Q++]=7&(ge>>>31|(3&Ue)<<1),Z[Q++]=Ue>>>2&7,Z[Q++]=Ue>>>5&7,Z[Q++]=Ue>>>8&7,Z[Q++]=Ue>>>11&7,Z[Q++]=Ue>>>14&7,Z[Q++]=Ue>>>17&7,Z[Q++]=Ue>>>20&7,Z[Q++]=Ue>>>23&7,Z[Q++]=Ue>>>26&7,Z[Q++]=Ue>>>29&7}})(M,h,b,D);break;case 4:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0;Z[Q++]=ke>>>0&15,Z[Q++]=ke>>>4&15,Z[Q++]=ke>>>8&15,Z[Q++]=ke>>>12&15,Z[Q++]=ke>>>16&15,Z[Q++]=ke>>>20&15,Z[Q++]=ke>>>24&15,Z[Q++]=ke>>>28&15,Z[Q++]=ge>>>0&15,Z[Q++]=ge>>>4&15,Z[Q++]=ge>>>8&15,Z[Q++]=ge>>>12&15,Z[Q++]=ge>>>16&15,Z[Q++]=ge>>>20&15,Z[Q++]=ge>>>24&15,Z[Q++]=ge>>>28&15,Z[Q++]=Ue>>>0&15,Z[Q++]=Ue>>>4&15,Z[Q++]=Ue>>>8&15,Z[Q++]=Ue>>>12&15,Z[Q++]=Ue>>>16&15,Z[Q++]=Ue>>>20&15,Z[Q++]=Ue>>>24&15,Z[Q++]=Ue>>>28&15,Z[Q++]=je>>>0&15,Z[Q++]=je>>>4&15,Z[Q++]=je>>>8&15,Z[Q++]=je>>>12&15,Z[Q++]=je>>>16&15,Z[Q++]=je>>>20&15,Z[Q++]=je>>>24&15,Z[Q++]=je>>>28&15}})(M,h,b,D);break;case 5:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0,vt=G[he++]>>>0;Z[Q++]=ke>>>0&31,Z[Q++]=ke>>>5&31,Z[Q++]=ke>>>10&31,Z[Q++]=ke>>>15&31,Z[Q++]=ke>>>20&31,Z[Q++]=ke>>>25&31,Z[Q++]=31&(ke>>>30|(7&ge)<<2),Z[Q++]=ge>>>3&31,Z[Q++]=ge>>>8&31,Z[Q++]=ge>>>13&31,Z[Q++]=ge>>>18&31,Z[Q++]=ge>>>23&31,Z[Q++]=31&(ge>>>28|(1&Ue)<<4),Z[Q++]=Ue>>>1&31,Z[Q++]=Ue>>>6&31,Z[Q++]=Ue>>>11&31,Z[Q++]=Ue>>>16&31,Z[Q++]=Ue>>>21&31,Z[Q++]=Ue>>>26&31,Z[Q++]=31&(Ue>>>31|(15&je)<<1),Z[Q++]=je>>>4&31,Z[Q++]=je>>>9&31,Z[Q++]=je>>>14&31,Z[Q++]=je>>>19&31,Z[Q++]=je>>>24&31,Z[Q++]=31&(je>>>29|(3&vt)<<3),Z[Q++]=vt>>>2&31,Z[Q++]=vt>>>7&31,Z[Q++]=vt>>>12&31,Z[Q++]=vt>>>17&31,Z[Q++]=vt>>>22&31,Z[Q++]=vt>>>27&31}})(M,h,b,D);break;case 6:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0,vt=G[he++]>>>0,gt=G[he++]>>>0;Z[Q++]=ke>>>0&63,Z[Q++]=ke>>>6&63,Z[Q++]=ke>>>12&63,Z[Q++]=ke>>>18&63,Z[Q++]=ke>>>24&63,Z[Q++]=63&(ke>>>30|(15&ge)<<2),Z[Q++]=ge>>>4&63,Z[Q++]=ge>>>10&63,Z[Q++]=ge>>>16&63,Z[Q++]=ge>>>22&63,Z[Q++]=63&(ge>>>28|(3&Ue)<<4),Z[Q++]=Ue>>>2&63,Z[Q++]=Ue>>>8&63,Z[Q++]=Ue>>>14&63,Z[Q++]=Ue>>>20&63,Z[Q++]=Ue>>>26&63,Z[Q++]=je>>>0&63,Z[Q++]=je>>>6&63,Z[Q++]=je>>>12&63,Z[Q++]=je>>>18&63,Z[Q++]=je>>>24&63,Z[Q++]=63&(je>>>30|(15&vt)<<2),Z[Q++]=vt>>>4&63,Z[Q++]=vt>>>10&63,Z[Q++]=vt>>>16&63,Z[Q++]=vt>>>22&63,Z[Q++]=63&(vt>>>28|(3>)<<4),Z[Q++]=gt>>>2&63,Z[Q++]=gt>>>8&63,Z[Q++]=gt>>>14&63,Z[Q++]=gt>>>20&63,Z[Q++]=gt>>>26&63}})(M,h,b,D);break;case 7:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0,vt=G[he++]>>>0,gt=G[he++]>>>0,It=G[he++]>>>0;Z[Q++]=ke>>>0&127,Z[Q++]=ke>>>7&127,Z[Q++]=ke>>>14&127,Z[Q++]=ke>>>21&127,Z[Q++]=127&(ke>>>28|(7&ge)<<4),Z[Q++]=ge>>>3&127,Z[Q++]=ge>>>10&127,Z[Q++]=ge>>>17&127,Z[Q++]=ge>>>24&127,Z[Q++]=127&(ge>>>31|(63&Ue)<<1),Z[Q++]=Ue>>>6&127,Z[Q++]=Ue>>>13&127,Z[Q++]=Ue>>>20&127,Z[Q++]=127&(Ue>>>27|(3&je)<<5),Z[Q++]=je>>>2&127,Z[Q++]=je>>>9&127,Z[Q++]=je>>>16&127,Z[Q++]=je>>>23&127,Z[Q++]=127&(je>>>30|(31&vt)<<2),Z[Q++]=vt>>>5&127,Z[Q++]=vt>>>12&127,Z[Q++]=vt>>>19&127,Z[Q++]=127&(vt>>>26|(1>)<<6),Z[Q++]=gt>>>1&127,Z[Q++]=gt>>>8&127,Z[Q++]=gt>>>15&127,Z[Q++]=gt>>>22&127,Z[Q++]=127&(gt>>>29|(15&It)<<3),Z[Q++]=It>>>4&127,Z[Q++]=It>>>11&127,Z[Q++]=It>>>18&127,Z[Q++]=It>>>25&127}})(M,h,b,D);break;case 8:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0,vt=G[he++]>>>0,gt=G[he++]>>>0,It=G[he++]>>>0,_t=G[he++]>>>0;Z[Q++]=ke>>>0&255,Z[Q++]=ke>>>8&255,Z[Q++]=ke>>>16&255,Z[Q++]=ke>>>24&255,Z[Q++]=ge>>>0&255,Z[Q++]=ge>>>8&255,Z[Q++]=ge>>>16&255,Z[Q++]=ge>>>24&255,Z[Q++]=Ue>>>0&255,Z[Q++]=Ue>>>8&255,Z[Q++]=Ue>>>16&255,Z[Q++]=Ue>>>24&255,Z[Q++]=je>>>0&255,Z[Q++]=je>>>8&255,Z[Q++]=je>>>16&255,Z[Q++]=je>>>24&255,Z[Q++]=vt>>>0&255,Z[Q++]=vt>>>8&255,Z[Q++]=vt>>>16&255,Z[Q++]=vt>>>24&255,Z[Q++]=gt>>>0&255,Z[Q++]=gt>>>8&255,Z[Q++]=gt>>>16&255,Z[Q++]=gt>>>24&255,Z[Q++]=It>>>0&255,Z[Q++]=It>>>8&255,Z[Q++]=It>>>16&255,Z[Q++]=It>>>24&255,Z[Q++]=_t>>>0&255,Z[Q++]=_t>>>8&255,Z[Q++]=_t>>>16&255,Z[Q++]=_t>>>24&255}})(M,h,b,D);break;case 16:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<128;oe++){let ke=G[he++]>>>0;Z[Q++]=65535&ke,Z[Q++]=ke>>>16&65535}})(M,h,b,D);break;default:(function(G,X,Z,re,Q){let he=AI[Q]>>>0,oe=X,ke=0,ge=G[oe]>>>0,Ue=re;for(let je=0;je<8;je++){for(let vt=0;vt<32;vt++)if(ke+Q<=32)Z[Ue+vt]=ge>>>ke&he,ke+=Q,ke===32&&(ke=0,oe++,vt!==31&&(ge=G[oe]>>>0));else{let gt=32-ke,It=ge>>>ke;oe++,ge=G[oe]>>>0;let _t=Q-gt;Z[Ue+vt]=(It|(ge&-1>>>32-_t>>>0)<>>0)}})(M,h,b,D,z)}return h+(z<<3)|0}function Sit(M,h,b,D){if(b+2>h)throw new Error(`FastPFOR decode: byteContainer underflow at block=${D} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${b}, byteSize=${h})`);let z=M[b++],G=M[b++];if(z>32)throw new Error(`FastPFOR decode: invalid bitWidth=${z} at block=${D} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:z,exceptionCount:G,bytePosIn:b}}function Eit(M,h,b,D,z,G,X,Z,re){let{maxBits:Q,exceptionBitWidth:he,bytePosIn:oe}=(function(vt,gt,It,_t,qt,tr){if(It+1>gt)throw new Error(`FastPFOR decode: exception header underflow at block=${tr} (need 1 byte for maxBits, bytePos=${It}, byteSize=${gt})`);let lr=vt[It++];if(lr<_t||lr>32)throw new Error(`FastPFOR decode: invalid maxBits=${lr} at block=${tr} (bitWidth=${_t}, expected ${_t}..32)`);let qr=lr-_t|0;if(qr<1||qr>32)throw new Error(`FastPFOR decode: invalid exceptionBitWidth=${qr} at block=${tr} (bitWidth=${_t}, maxBits=${lr})`);if(It+qt>gt)throw new Error(`FastPFOR decode: exception positions underflow at block=${tr} (need=${qt}, have=${gt-It})`);return{maxBits:lr,exceptionBitWidth:qr,bytePosIn:It}})(z,G,X,b,D,re);if(X=oe,he===1){let vt=1<je)throw new Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${he} (ptr=${Ue}, need ${D}, size=${je}) at block ${re}`);for(let vt=0;vtM.length-1)throw new Error(`FastPFOR decode: invalid whereMeta=${Z} at pageStart=${X} (expected > 0 and pageStart+whereMeta < encoded.length=${M.length})`);let re=X+1|0,Q=X+Z|0,he=M[Q]>>>0,oe=he+3>>>2,ke=Q+1,ge=ke+oe;if(ge>=M.length)throw new Error(`FastPFOR decode: invalid byteSize=${he} (metaInts=${oe}, pageStart=${X}, packedEnd=${Q}, byteContainerStart=${ke}) causes bitmapPos=${ge} out of bounds (encoded.length=${M.length})`);let Ue=(function(gt,It,_t,qt){qt.byteContainer.length<_t&&(qt.byteContainer=new Uint8Array(2*_t),qt.byteContainerI32=void 0);let tr=qt.byteContainer,lr=_t>>>2;if(3&tr.byteOffset)for(let jr=0;jr>>8&255,tr[fn+2|0]=_n>>>16&255,tr[fn+3|0]=_n>>>24&255}else{let jr=qt.byteContainerI32;(!jr||jr.buffer!==tr.buffer||jr.byteOffset!==tr.byteOffset||jr.length>>2)),jr.set(gt.subarray(It,It+lr))}let qr=3&_t;if(qr>0){let jr=0|gt[It+lr|0],_n=lr<<2;for(let fn=0;fn>>(fn<<3)&255}return tr})(M,ke,he,G),je=he,vt=(function(gt,It,_t){let qt=0|gt[It++],tr=_t.dataToBePacked;for(let lr=2;lr<=32;lr=lr+1|0){if(!(qt>>>lr-1&1))continue;if(It>=gt.length)throw new Error(`FastPFOR decode: truncated exception stream header (bitWidth=${lr}, streamWordIndex=${It}, needWords=1, availableWords=${gt.length-It}, encodedWords=${gt.length})`);let qr=gt[It++]>>>0,jr=MI(qr+31,32),_n=qr*lr+31>>>5;if(It+_n>gt.length)throw new Error(`FastPFOR decode: truncated exception stream (bitWidth=${lr}, size=${qr}, streamWordIndex=${It}, needWords=${_n}, availableWords=${gt.length-It}, encodedWords=${gt.length})`);let fn=tr[lr];(!fn||fn.length>>5)|0,_t.exceptionSizes[lr]=qr}return It})(M,ge,G);return G.dataPointers.fill(0),(function(gt,It,_t,qt,tr,lr,qr,jr,_n,fn){let Dn=0|_t,Hn=0;for(let Ln=0;Ln0&&(Hn=Eit(tr,ti,ei,ci,jr,_n,Hn,fn,Ln))}if(Dn!==qt)throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${It}, packedStart=${_t}, consumedPackedEnd=${Dn}, expectedPackedEnd=${qt}, packedWords=${qt-_t}, encoded.length=${gt.length})`)})(M,X,re,Q,h,0|D,z/U1|0,Ue,je,G),vt}function Cit(M,h,b,D,z){switch(z){case 2:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0;oe[ge++]=Ue>>>0&3,oe[ge++]=Ue>>>2&3,oe[ge++]=Ue>>>4&3,oe[ge++]=Ue>>>6&3,oe[ge++]=Ue>>>8&3,oe[ge++]=Ue>>>10&3,oe[ge++]=Ue>>>12&3,oe[ge++]=Ue>>>14&3,oe[ge++]=Ue>>>16&3,oe[ge++]=Ue>>>18&3,oe[ge++]=Ue>>>20&3,oe[ge++]=Ue>>>22&3,oe[ge++]=Ue>>>24&3,oe[ge++]=Ue>>>26&3,oe[ge++]=Ue>>>28&3,oe[ge++]=Ue>>>30&3,oe[ge++]=je>>>0&3,oe[ge++]=je>>>2&3,oe[ge++]=je>>>4&3,oe[ge++]=je>>>6&3,oe[ge++]=je>>>8&3,oe[ge++]=je>>>10&3,oe[ge++]=je>>>12&3,oe[ge++]=je>>>14&3,oe[ge++]=je>>>16&3,oe[ge++]=je>>>18&3,oe[ge++]=je>>>20&3,oe[ge++]=je>>>22&3,oe[ge++]=je>>>24&3,oe[ge++]=je>>>26&3,oe[ge++]=je>>>28&3,oe[ge]=je>>>30&3})(M,h,b,D);case 3:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0;oe[ge++]=Ue>>>0&7,oe[ge++]=Ue>>>3&7,oe[ge++]=Ue>>>6&7,oe[ge++]=Ue>>>9&7,oe[ge++]=Ue>>>12&7,oe[ge++]=Ue>>>15&7,oe[ge++]=Ue>>>18&7,oe[ge++]=Ue>>>21&7,oe[ge++]=Ue>>>24&7,oe[ge++]=Ue>>>27&7,oe[ge++]=7&(Ue>>>30|(1&je)<<2),oe[ge++]=je>>>1&7,oe[ge++]=je>>>4&7,oe[ge++]=je>>>7&7,oe[ge++]=je>>>10&7,oe[ge++]=je>>>13&7,oe[ge++]=je>>>16&7,oe[ge++]=je>>>19&7,oe[ge++]=je>>>22&7,oe[ge++]=je>>>25&7,oe[ge++]=je>>>28&7,oe[ge++]=7&(je>>>31|(3&vt)<<1),oe[ge++]=vt>>>2&7,oe[ge++]=vt>>>5&7,oe[ge++]=vt>>>8&7,oe[ge++]=vt>>>11&7,oe[ge++]=vt>>>14&7,oe[ge++]=vt>>>17&7,oe[ge++]=vt>>>20&7,oe[ge++]=vt>>>23&7,oe[ge++]=vt>>>26&7,oe[ge]=vt>>>29&7})(M,h,b,D);case 4:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0;oe[ge++]=Ue>>>0&15,oe[ge++]=Ue>>>4&15,oe[ge++]=Ue>>>8&15,oe[ge++]=Ue>>>12&15,oe[ge++]=Ue>>>16&15,oe[ge++]=Ue>>>20&15,oe[ge++]=Ue>>>24&15,oe[ge++]=Ue>>>28&15,oe[ge++]=je>>>0&15,oe[ge++]=je>>>4&15,oe[ge++]=je>>>8&15,oe[ge++]=je>>>12&15,oe[ge++]=je>>>16&15,oe[ge++]=je>>>20&15,oe[ge++]=je>>>24&15,oe[ge++]=je>>>28&15,oe[ge++]=vt>>>0&15,oe[ge++]=vt>>>4&15,oe[ge++]=vt>>>8&15,oe[ge++]=vt>>>12&15,oe[ge++]=vt>>>16&15,oe[ge++]=vt>>>20&15,oe[ge++]=vt>>>24&15,oe[ge++]=vt>>>28&15,oe[ge++]=gt>>>0&15,oe[ge++]=gt>>>4&15,oe[ge++]=gt>>>8&15,oe[ge++]=gt>>>12&15,oe[ge++]=gt>>>16&15,oe[ge++]=gt>>>20&15,oe[ge++]=gt>>>24&15,oe[ge]=gt>>>28&15})(M,h,b,D);case 5:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0;oe[ge++]=Ue>>>0&31,oe[ge++]=Ue>>>5&31,oe[ge++]=Ue>>>10&31,oe[ge++]=Ue>>>15&31,oe[ge++]=Ue>>>20&31,oe[ge++]=Ue>>>25&31,oe[ge++]=31&(Ue>>>30|(7&je)<<2),oe[ge++]=je>>>3&31,oe[ge++]=je>>>8&31,oe[ge++]=je>>>13&31,oe[ge++]=je>>>18&31,oe[ge++]=je>>>23&31,oe[ge++]=31&(je>>>28|(1&vt)<<4),oe[ge++]=vt>>>1&31,oe[ge++]=vt>>>6&31,oe[ge++]=vt>>>11&31,oe[ge++]=vt>>>16&31,oe[ge++]=vt>>>21&31,oe[ge++]=vt>>>26&31,oe[ge++]=31&(vt>>>31|(15>)<<1),oe[ge++]=gt>>>4&31,oe[ge++]=gt>>>9&31,oe[ge++]=gt>>>14&31,oe[ge++]=gt>>>19&31,oe[ge++]=gt>>>24&31,oe[ge++]=31&(gt>>>29|(3&It)<<3),oe[ge++]=It>>>2&31,oe[ge++]=It>>>7&31,oe[ge++]=It>>>12&31,oe[ge++]=It>>>17&31,oe[ge++]=It>>>22&31,oe[ge]=It>>>27&31})(M,h,b,D);case 6:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0;oe[ge++]=Ue>>>0&63,oe[ge++]=Ue>>>6&63,oe[ge++]=Ue>>>12&63,oe[ge++]=Ue>>>18&63,oe[ge++]=Ue>>>24&63,oe[ge++]=63&(Ue>>>30|(15&je)<<2),oe[ge++]=je>>>4&63,oe[ge++]=je>>>10&63,oe[ge++]=je>>>16&63,oe[ge++]=je>>>22&63,oe[ge++]=63&(je>>>28|(3&vt)<<4),oe[ge++]=vt>>>2&63,oe[ge++]=vt>>>8&63,oe[ge++]=vt>>>14&63,oe[ge++]=vt>>>20&63,oe[ge++]=vt>>>26&63,oe[ge++]=gt>>>0&63,oe[ge++]=gt>>>6&63,oe[ge++]=gt>>>12&63,oe[ge++]=gt>>>18&63,oe[ge++]=gt>>>24&63,oe[ge++]=63&(gt>>>30|(15&It)<<2),oe[ge++]=It>>>4&63,oe[ge++]=It>>>10&63,oe[ge++]=It>>>16&63,oe[ge++]=It>>>22&63,oe[ge++]=63&(It>>>28|(3&_t)<<4),oe[ge++]=_t>>>2&63,oe[ge++]=_t>>>8&63,oe[ge++]=_t>>>14&63,oe[ge++]=_t>>>20&63,oe[ge]=_t>>>26&63})(M,h,b,D);case 7:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0;oe[ge++]=Ue>>>0&127,oe[ge++]=Ue>>>7&127,oe[ge++]=Ue>>>14&127,oe[ge++]=Ue>>>21&127,oe[ge++]=127&(Ue>>>28|(7&je)<<4),oe[ge++]=je>>>3&127,oe[ge++]=je>>>10&127,oe[ge++]=je>>>17&127,oe[ge++]=je>>>24&127,oe[ge++]=127&(je>>>31|(63&vt)<<1),oe[ge++]=vt>>>6&127,oe[ge++]=vt>>>13&127,oe[ge++]=vt>>>20&127,oe[ge++]=127&(vt>>>27|(3>)<<5),oe[ge++]=gt>>>2&127,oe[ge++]=gt>>>9&127,oe[ge++]=gt>>>16&127,oe[ge++]=gt>>>23&127,oe[ge++]=127&(gt>>>30|(31&It)<<2),oe[ge++]=It>>>5&127,oe[ge++]=It>>>12&127,oe[ge++]=It>>>19&127,oe[ge++]=127&(It>>>26|(1&_t)<<6),oe[ge++]=_t>>>1&127,oe[ge++]=_t>>>8&127,oe[ge++]=_t>>>15&127,oe[ge++]=_t>>>22&127,oe[ge++]=127&(_t>>>29|(15&qt)<<3),oe[ge++]=qt>>>4&127,oe[ge++]=qt>>>11&127,oe[ge++]=qt>>>18&127,oe[ge]=qt>>>25&127})(M,h,b,D);case 8:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0;oe[ge++]=Ue>>>0&255,oe[ge++]=Ue>>>8&255,oe[ge++]=Ue>>>16&255,oe[ge++]=Ue>>>24&255,oe[ge++]=je>>>0&255,oe[ge++]=je>>>8&255,oe[ge++]=je>>>16&255,oe[ge++]=je>>>24&255,oe[ge++]=vt>>>0&255,oe[ge++]=vt>>>8&255,oe[ge++]=vt>>>16&255,oe[ge++]=vt>>>24&255,oe[ge++]=gt>>>0&255,oe[ge++]=gt>>>8&255,oe[ge++]=gt>>>16&255,oe[ge++]=gt>>>24&255,oe[ge++]=It>>>0&255,oe[ge++]=It>>>8&255,oe[ge++]=It>>>16&255,oe[ge++]=It>>>24&255,oe[ge++]=_t>>>0&255,oe[ge++]=_t>>>8&255,oe[ge++]=_t>>>16&255,oe[ge++]=_t>>>24&255,oe[ge++]=qt>>>0&255,oe[ge++]=qt>>>8&255,oe[ge++]=qt>>>16&255,oe[ge++]=qt>>>24&255,oe[ge++]=tr>>>0&255,oe[ge++]=tr>>>8&255,oe[ge++]=tr>>>16&255,oe[ge]=tr>>>24&255})(M,h,b,D);case 9:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0;oe[ge++]=Ue>>>0&511,oe[ge++]=Ue>>>9&511,oe[ge++]=Ue>>>18&511,oe[ge++]=511&(Ue>>>27|(15&je)<<5),oe[ge++]=je>>>4&511,oe[ge++]=je>>>13&511,oe[ge++]=je>>>22&511,oe[ge++]=511&(je>>>31|(255&vt)<<1),oe[ge++]=vt>>>8&511,oe[ge++]=vt>>>17&511,oe[ge++]=511&(vt>>>26|(7>)<<6),oe[ge++]=gt>>>3&511,oe[ge++]=gt>>>12&511,oe[ge++]=gt>>>21&511,oe[ge++]=511&(gt>>>30|(127&It)<<2),oe[ge++]=It>>>7&511,oe[ge++]=It>>>16&511,oe[ge++]=511&(It>>>25|(3&_t)<<7),oe[ge++]=_t>>>2&511,oe[ge++]=_t>>>11&511,oe[ge++]=_t>>>20&511,oe[ge++]=511&(_t>>>29|(63&qt)<<3),oe[ge++]=qt>>>6&511,oe[ge++]=qt>>>15&511,oe[ge++]=511&(qt>>>24|(1&tr)<<8),oe[ge++]=tr>>>1&511,oe[ge++]=tr>>>10&511,oe[ge++]=tr>>>19&511,oe[ge++]=511&(tr>>>28|(31&lr)<<4),oe[ge++]=lr>>>5&511,oe[ge++]=lr>>>14&511,oe[ge]=lr>>>23&511})(M,h,b,D);case 10:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0,qr=Q[he+9]>>>0;oe[ge++]=Ue>>>0&1023,oe[ge++]=Ue>>>10&1023,oe[ge++]=Ue>>>20&1023,oe[ge++]=1023&(Ue>>>30|(255&je)<<2),oe[ge++]=je>>>8&1023,oe[ge++]=je>>>18&1023,oe[ge++]=1023&(je>>>28|(63&vt)<<4),oe[ge++]=vt>>>6&1023,oe[ge++]=vt>>>16&1023,oe[ge++]=1023&(vt>>>26|(15>)<<6),oe[ge++]=gt>>>4&1023,oe[ge++]=gt>>>14&1023,oe[ge++]=1023&(gt>>>24|(3&It)<<8),oe[ge++]=It>>>2&1023,oe[ge++]=It>>>12&1023,oe[ge++]=It>>>22&1023,oe[ge++]=_t>>>0&1023,oe[ge++]=_t>>>10&1023,oe[ge++]=_t>>>20&1023,oe[ge++]=1023&(_t>>>30|(255&qt)<<2),oe[ge++]=qt>>>8&1023,oe[ge++]=qt>>>18&1023,oe[ge++]=1023&(qt>>>28|(63&tr)<<4),oe[ge++]=tr>>>6&1023,oe[ge++]=tr>>>16&1023,oe[ge++]=1023&(tr>>>26|(15&lr)<<6),oe[ge++]=lr>>>4&1023,oe[ge++]=lr>>>14&1023,oe[ge++]=1023&(lr>>>24|(3&qr)<<8),oe[ge++]=qr>>>2&1023,oe[ge++]=qr>>>12&1023,oe[ge]=qr>>>22&1023})(M,h,b,D);case 11:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0,qr=Q[he+9]>>>0,jr=Q[he+10]>>>0;oe[ge++]=Ue>>>0&2047,oe[ge++]=Ue>>>11&2047,oe[ge++]=2047&(Ue>>>22|(1&je)<<10),oe[ge++]=je>>>1&2047,oe[ge++]=je>>>12&2047,oe[ge++]=2047&(je>>>23|(3&vt)<<9),oe[ge++]=vt>>>2&2047,oe[ge++]=vt>>>13&2047,oe[ge++]=2047&(vt>>>24|(7>)<<8),oe[ge++]=gt>>>3&2047,oe[ge++]=gt>>>14&2047,oe[ge++]=2047&(gt>>>25|(15&It)<<7),oe[ge++]=It>>>4&2047,oe[ge++]=It>>>15&2047,oe[ge++]=2047&(It>>>26|(31&_t)<<6),oe[ge++]=_t>>>5&2047,oe[ge++]=_t>>>16&2047,oe[ge++]=2047&(_t>>>27|(63&qt)<<5),oe[ge++]=qt>>>6&2047,oe[ge++]=qt>>>17&2047,oe[ge++]=2047&(qt>>>28|(127&tr)<<4),oe[ge++]=tr>>>7&2047,oe[ge++]=tr>>>18&2047,oe[ge++]=2047&(tr>>>29|(255&lr)<<3),oe[ge++]=lr>>>8&2047,oe[ge++]=lr>>>19&2047,oe[ge++]=2047&(lr>>>30|(511&qr)<<2),oe[ge++]=qr>>>9&2047,oe[ge++]=qr>>>20&2047,oe[ge++]=2047&(qr>>>31|(1023&jr)<<1),oe[ge++]=jr>>>10&2047,oe[ge]=jr>>>21&2047})(M,h,b,D);case 12:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0,qr=Q[he+9]>>>0,jr=Q[he+10]>>>0,_n=Q[he+11]>>>0;oe[ge++]=Ue>>>0&4095,oe[ge++]=Ue>>>12&4095,oe[ge++]=4095&(Ue>>>24|(15&je)<<8),oe[ge++]=je>>>4&4095,oe[ge++]=je>>>16&4095,oe[ge++]=4095&(je>>>28|(255&vt)<<4),oe[ge++]=vt>>>8&4095,oe[ge++]=vt>>>20&4095,oe[ge++]=gt>>>0&4095,oe[ge++]=gt>>>12&4095,oe[ge++]=4095&(gt>>>24|(15&It)<<8),oe[ge++]=It>>>4&4095,oe[ge++]=It>>>16&4095,oe[ge++]=4095&(It>>>28|(255&_t)<<4),oe[ge++]=_t>>>8&4095,oe[ge++]=_t>>>20&4095,oe[ge++]=qt>>>0&4095,oe[ge++]=qt>>>12&4095,oe[ge++]=4095&(qt>>>24|(15&tr)<<8),oe[ge++]=tr>>>4&4095,oe[ge++]=tr>>>16&4095,oe[ge++]=4095&(tr>>>28|(255&lr)<<4),oe[ge++]=lr>>>8&4095,oe[ge++]=lr>>>20&4095,oe[ge++]=qr>>>0&4095,oe[ge++]=qr>>>12&4095,oe[ge++]=4095&(qr>>>24|(15&jr)<<8),oe[ge++]=jr>>>4&4095,oe[ge++]=jr>>>16&4095,oe[ge++]=4095&(jr>>>28|(255&_n)<<4),oe[ge++]=_n>>>8&4095,oe[ge]=_n>>>20&4095})(M,h,b,D);case 16:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0,qr=Q[he+9]>>>0,jr=Q[he+10]>>>0,_n=Q[he+11]>>>0,fn=Q[he+12]>>>0,Dn=Q[he+13]>>>0,Hn=Q[he+14]>>>0,Ln=Q[he+15]>>>0;oe[ge++]=Ue>>>0&65535,oe[ge++]=Ue>>>16&65535,oe[ge++]=je>>>0&65535,oe[ge++]=je>>>16&65535,oe[ge++]=vt>>>0&65535,oe[ge++]=vt>>>16&65535,oe[ge++]=gt>>>0&65535,oe[ge++]=gt>>>16&65535,oe[ge++]=It>>>0&65535,oe[ge++]=It>>>16&65535,oe[ge++]=_t>>>0&65535,oe[ge++]=_t>>>16&65535,oe[ge++]=qt>>>0&65535,oe[ge++]=qt>>>16&65535,oe[ge++]=tr>>>0&65535,oe[ge++]=tr>>>16&65535,oe[ge++]=lr>>>0&65535,oe[ge++]=lr>>>16&65535,oe[ge++]=qr>>>0&65535,oe[ge++]=qr>>>16&65535,oe[ge++]=jr>>>0&65535,oe[ge++]=jr>>>16&65535,oe[ge++]=_n>>>0&65535,oe[ge++]=_n>>>16&65535,oe[ge++]=fn>>>0&65535,oe[ge++]=fn>>>16&65535,oe[ge++]=Dn>>>0&65535,oe[ge++]=Dn>>>16&65535,oe[ge++]=Hn>>>0&65535,oe[ge++]=Hn>>>16&65535,oe[ge++]=Ln>>>0&65535,oe[ge]=Ln>>>16&65535})(M,h,b,D);case 32:for(let Q=0;Q<32;Q=Q+1|0)b[D+Q|0]=0|M[h+Q|0];return}let G=AI[z]>>>0,X=h,Z=0,re=M[X]>>>0;for(let Q=0;Q<32;Q++)if(Z+z<=32)b[D+Q]=re>>>Z&G,Z+=z,Z===32&&(Z=0,X++,Q!==31&&(re=M[X]>>>0));else{let he=32-Z,oe=re>>>Z;X++,re=M[X]>>>0,b[D+Q]=(oe|(re&AI[z-he]>>>0)<=64)throw new Error("Varint too long")}return h.set(z),b}function Pit(M,h){let b,D;return D=M[h.get()],h.increment(),b=127&D,D<128?b:(D=M[h.get()],h.increment(),b|=(127&D)<<7,D<128?b:(D=M[h.get()],h.increment(),b|=(127&D)<<14,D<128?b:(D=M[h.get()],h.increment(),b|=(127&D)<<21,D<128?b:(D=M[h.get()],b|=(15&D)<<28,(function(z,G,X){let Z,re;if(re=G[X.get()],X.increment(),Z=(112&re)>>4,re<128||(re=G[X.get()],X.increment(),Z|=(127&re)<<3,re<128)||(re=G[X.get()],X.increment(),Z|=(127&re)<<10,re<128)||(re=G[X.get()],X.increment(),Z|=(127&re)<<17,re<128)||(re=G[X.get()],X.increment(),Z|=(127&re)<<24,re<128)||(re=G[X.get()],X.increment(),Z|=(1&re)<<31,re<128))return 4294967296*Z+(z>>>0);throw new Error("Expected varint not more than 10 bytes")})(b,M,h)))))}function Fs(M){return M>>>1^-(1&M)}function Zh(M){return M>>BigInt(1)^-(BigInt(1)&M)}function J_(M){return M%2==1?(M+1)/-2:M/2}function EI(M,h,b){if(b===void 0){b=0;for(let G=0;G=4)for(;D=4)for(;D=4)for(let D=M[0];b>4],Z=null;switch(X){case Of.DATA:Z={dictionaryType:Object.values(Hv)[15&G]};break;case Of.OFFSET:Z={offsetType:Object.values(ax)[15&G]};break;case Of.LENGTH:Z={lengthType:Object.values(Xd)[15&G]}}z.increment();let re=D[z.get()],Q=Object.values(To)[re>>5],he=Object.values(To)[re>>2&7],oe=Object.values(Zg)[3&re];z.increment();let ke=xh(D,z,2),ge=ke[0];return{physicalStreamType:X,logicalStreamType:Z,logicalLevelTechnique1:Q,logicalLevelTechnique2:he,physicalLevelTechnique:oe,numValues:ge,byteLength:ke[1],decompressedCount:ge}})(M,h);return b.logicalLevelTechnique1===To.MORTON?(function(D,z,G){let X=xh(z,G,2);return{physicalStreamType:D.physicalStreamType,logicalStreamType:D.logicalStreamType,logicalLevelTechnique1:D.logicalLevelTechnique1,logicalLevelTechnique2:D.logicalLevelTechnique2,physicalLevelTechnique:D.physicalLevelTechnique,numValues:D.numValues,byteLength:D.byteLength,decompressedCount:D.decompressedCount,numBits:X[0],coordinateShift:X[1]}})(b,M,h):To.RLE!==b.logicalLevelTechnique1&&To.RLE!==b.logicalLevelTechnique2||Zg.NONE===b.physicalLevelTechnique?b:(function(D,z,G){let X=xh(z,G,2);return{physicalStreamType:D.physicalStreamType,logicalStreamType:D.logicalStreamType,logicalLevelTechnique1:D.logicalLevelTechnique1,logicalLevelTechnique2:D.logicalLevelTechnique2,physicalLevelTechnique:D.physicalLevelTechnique,numValues:D.numValues,byteLength:D.byteLength,decompressedCount:X[1],runs:X[0],numRleValues:X[1]}})(b,M,h)}(function(M){M.PRESENT="PRESENT",M.DATA="DATA",M.OFFSET="OFFSET",M.LENGTH="LENGTH"})(Of||(Of={})),(function(M){M.NONE="NONE",M.SINGLE="SINGLE",M.SHARED="SHARED",M.VERTEX="VERTEX",M.MORTON="MORTON",M.FSST="FSST"})(Hv||(Hv={})),(function(M){M.VERTEX="VERTEX",M.INDEX="INDEX",M.STRING="STRING",M.KEY="KEY"})(ax||(ax={})),(function(M){M.VAR_BINARY="VAR_BINARY",M.GEOMETRIES="GEOMETRIES",M.PARTS="PARTS",M.RINGS="RINGS",M.TRIANGLES="TRIANGLES",M.SYMBOL="SYMBOL",M.DICTIONARY="DICTIONARY"})(Xd||(Xd={})),(function(M){M[M.FLAT=0]="FLAT",M[M.CONST=1]="CONST",M[M.SEQUENCE=2]="SEQUENCE",M[M.DICTIONARY=3]="DICTIONARY",M[M.FSST_DICTIONARY=4]="FSST_DICTIONARY"})(Ml||(Ml={}));class jv{constructor(h,b){this.values=h,this._size=b}get(h){let b=Math.floor(h/8);return(this.values[b]>>h%8&1)==1}set(h,b){let D=Math.floor(h/8);this.values[D]=this.values[D]|(b?1:0)<>h%8&1}size(){return this._size}getBuffer(){return this.values}}function Q_(M,h,b){if(!h)return M;let D=h.size(),z=new M.constructor(D),G=0;for(let X=0;X=4)for(;ge>>0;for(let ke=1;ke>>0;return oe})(X.logicalLevelTechnique2===To.RLE?EI(G,X.runs,X.numRleValues):G);break;case To.RLE:Q=EI(G,X.runs,X.numRleValues);break;case To.MORTON:CI(G),Q=G;break;case To.COMPONENTWISE_DELTA:Q=(function(he){if(he.length<2)return new Uint32Array(he);let oe=new Uint32Array(he.length);oe[0]=Fs(he[0])>>>0,oe[1]=Fs(he[1])>>>0;for(let ke=2;ke>>0,oe[ke+1]=oe[ke-1]+Fs(he[ke+1])>>>0;return oe})(G);break;case To.NONE:Q=G;break;default:throw new Error(`The specified Logical level technique is not supported: ${X.logicalLevelTechnique1}`)}return re?Q_(Q,re,0):Q})(eb(M,h,b),b,0,z)}function Kg(M,h,b){return(function(D,z){if(z.logicalLevelTechnique1===To.DELTA&&z.logicalLevelTechnique2===To.NONE)return(function(G){let X=new Int32Array(G.length+1);X[0]=0,X[1]=Fs(G[0]);let Z=X[1];for(let re=2;re!==X.length;++re)Z+=Fs(G[re-1]),X[re]=X[re-1]+Z;return new Uint32Array(X)})(D);if(z.logicalLevelTechnique1===To.RLE&&z.logicalLevelTechnique2===To.NONE)return(function(G,X,Z){let re=new Uint32Array(Z+1);re[0]=0;let Q=1,he=re[0];for(let oe=0;oe>>2,je=(function(gt,It){if(It<=gt.encodedWords.length)return gt.encodedWords;let _t=new Uint32Array(Math.max(16,2*It));return gt.encodedWords=_t,_t})(ke,Ue);(function(gt,It,_t,qt){if(It<0||_t<0||It+_t>gt.length)throw new RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${It}, byteLength=${_t}, bytes.length=${gt.length})`);let tr=Math.floor(_t/4),lr=_t%4!=0,qr=lr?tr+1:tr;if(qt.length0){let jr=gt.byteOffset+It;if(3&jr)for(let _n=0;_n0){let jr=0|gt[qt];if(qt=qt+1|0,255&jr)throw new Error(`FastPFOR decode: invalid alignedLength=${jr} (expected multiple of 256)`);if(tr+jr>lr.length)throw new Error(`FastPFOR decode: output buffer too small (outPos=${tr}, alignedLength=${jr}, out.length=${lr.length})`);qt=(function(_n,fn,Dn,Hn,Ln,un){let ei=Hn+MI(Ln,U1),ci=Hn,ti=Dn;for(;ci!==ei;){let di=Math.min(SI,ei-ci);ti=kit(_n,fn,ti,ci,di,un),ci=ci+di|0}return ti})(gt,lr,qt,tr,jr,qr),tr=tr+jr|0}return(function(jr,_n,fn,Dn,Hn,Ln){if(Ln===0)return _n;let un=0,ei=_n,ci=_n+fn,ti=Hn,di=Hn,_a=Hn+Ln,Ao=0,us=0;for(;ei>>un&255;if(un+=8,ei+=un>>>5,un&=31,Ao|=(127&ks)<28)throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${us}, partial=${Ao}, decoded=${di-ti}/${Ln}, inPos=${ei}, inEnd=${ci})`)}if(di!==_a)throw new Error(`FastPFOR VByte: truncated stream (decoded=${di-ti}, expected=${Ln}, consumedWords=${ei-_n}/${fn}, vbyteStart=${_n}, vbyteEnd=${ci})`)})(gt,qt,gt.length-qt|0,lr,tr,It-tr|0),lr})(je.subarray(0,Ue),Q,ke.decoderWorkspace);return oe.add(he),vt})(z,G,X,Z,(function(re=16){if(re<0)throw new RangeError(`initialEncodedWordCapacity must be >= 0, got ${re}`);let Q=Math.max(16,0|re);return{encodedWords:new Uint32Array(Q),decoderWorkspace:kee()}})(X>>>2))})(M,b.numValues,b.byteLength,h);case Zg.VARINT:return xh(M,h,b.numValues);case Zg.NONE:{let z=h.get();h.add(b.byteLength);let G=M.subarray(z,h.get());return new Uint32Array(G)}default:throw new Error(`Specified physicalLevelTechnique ${D} is not supported (yet).`)}}function PI(M,h,b){let D=eb(M,h,b);return D.length===1?D[0]:(function(z){return z[1]})(D)}function Dee(M,h,b){return(function(D){if(D.length===2){let z=Fs(D[1]);return[z,z]}return[Fs(D[2]),Fs(D[3])]})(eb(M,h,b))}function Ree(M,h,b){return(function(D){if(D.length===2){let z=Zh(D[1]);return[z,z]}return[Zh(D[2]),Zh(D[3])]})(K_(M,h,b.numValues))}function Iee(M,h,b,D){return(function(z,G,X){let Z;switch(G.logicalLevelTechnique1){case To.DELTA:Z=(function(re){let Q=new BigUint64Array(re.length);Q[0]=BigInt.asUintN(64,Zh(re[0]));for(let he=1;he>1,h)-b}}function Oee(M,h){let b=0;for(let D=0;D>D;return b}function tb(M,h,b,D,z,G,X){return M===$g.MORTON?(function(Z,re,Q,he,oe,ke){let ge=new Array(oe?he+1:he);for(let Ue=0;Ue[tr])),D+=_t,z+=_t}break;case Ic.LINESTRING:{let _t,qt;vt?(_t=ge[z]-ge[z-1],z++):_t=ke[D]-ke[D-1],D++,je?(qt=rb(gt,Z,_t,!1),Z+=2*_t):(qt=tb(h.vertexBufferType,gt,Ue,re,_t,!1,Q),re+=_t),b[X++]=[qt],oe&&G++}break;case Ic.POLYGON:{let _t=ke[D]-ke[D-1];D++;let qt=new Array(_t-1),tr,lr=ge[z]-ge[z-1];if(z++,je){tr=rb(gt,Z,lr,!0),Z+=2*lr;for(let qr=0;qr0&&je.push(je[0]),ke.push(je)}h[he]=ke,G&&Q++}break;case Ic.MULTIPOLYGON:{let oe=G[Q]-G[Q-1];Q++;let ke=[];for(let ge=0;ge0&>.push(gt[0]),ke.push(gt)}}h[he]=ke}}return h}[Symbol.iterator](){return null}}function Hee(M,h,b,D,z,G){return new Fit(M,h,b,D,z,G)}class Fit extends Gee{constructor(h,b,D,z,G,X){super(D,z,G,X),this._numGeometries=h,this._geometryType=b}geometryType(h){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}function jee(M,h,b,D,z){return new Dit(M,h,b,D,z)}class Dit extends Gee{constructor(h,b,D,z,G){super(b,D,z,G),this._geometryTypes=h}geometryType(h){return this._geometryTypes[h]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function Rit(M,h,b,D,z){let G=$h(M,b),X,Z,re,Q;if(US(G,D,M,b)===Ml.CONST){let It=PI(M,b,G),_t,qt,tr,lr;for(let qr=0;qrb?h[G++]:1);return D}function Wee(M,h,b,D){let z=new Uint32Array(h[h.length-1]+1),G=0;z[0]=G;let X=1,Z=0;for(let re=0;re=ke);){let ge=X[Q.increment()];if(ge<=127){let Ue=ge+3,je=X[Q.increment()],vt=Math.min(oe+Ue,Z);he.fill(je,oe,vt),oe=vt}else{let Ue=256-ge;for(let je=0;je=12?qit.decode(M.subarray(h,b)):(function(D,z,G){let X="",Z=z;for(;Z239?4:re>223?3:re>191?2:1;if(Z+ge>G)break;ge===1?re<128&&(ke=re):ge===2?(Q=D[Z+1],(192&Q)==128&&(ke=(31&re)<<6|63&Q,ke<=127&&(ke=null))):ge===3?(Q=D[Z+1],he=D[Z+2],(192&Q)==128&&(192&he)==128&&(ke=(15&re)<<12|(63&Q)<<6|63&he,(ke<=2047||ke>=55296&&ke<=57343)&&(ke=null))):ge===4&&(Q=D[Z+1],he=D[Z+2],oe=D[Z+3],(192&Q)==128&&(192&he)==128&&(192&oe)==128&&(ke=(15&re)<<18|(63&Q)<<12|(63&he)<<6|63&oe,(ke<=65535||ke>=1114112)&&(ke=null))),ke===null?(ke=65533,ge=1):ke>65535&&(ke-=65536,X+=String.fromCharCode(ke>>>10&1023|55296),ke=56320|1023&ke),X+=String.fromCharCode(ke),Z+=ge}return X})(M,h,b)}class II extends $_{constructor(h,b,D,z){super(h,D,z),this.offsetBuffer=b}}class Xee extends II{constructor(h,b,D,z){super(h,b,D,z!=null?z:b.length-1)}getValueFromBuffer(h){return RI(this.dataBuffer,this.offsetBuffer[h],this.offsetBuffer[h+1])}}class nb extends II{constructor(h,b,D,z,G){super(h,D,z,G!=null?G:b.length),this.indexBuffer=b,this.indexBuffer=b}getValueFromBuffer(h){let b=this.indexBuffer[h];return RI(this.dataBuffer,this.offsetBuffer[b],this.offsetBuffer[b+1])}}class Zee extends II{constructor(h,b,D,z,G,X,Z){super(h,D,z,Z),this.indexBuffer=b,this.symbolOffsetBuffer=G,this.symbolTableBuffer=X}getValueFromBuffer(h){this.decodedDictionary==null&&(this.symbolLengthBuffer==null&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=(function(D,z,G){let X=[],Z=new Array(z.length).fill(0);for(let re=1;re=10}function Jee(M){return M===30}function Oit(M){if(M.type==="scalarType"){let h=M.scalarType;if(h.type==="physicalType")switch(h.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if(h.type==="logicalType")return!1}else if(M.type==="complexType"){let h=M.complexType;if(h.type==="physicalType")switch(h.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",M),!1}function Nit(M){var h;return M.type==="complexType"&&((h=M.complexType)==null?void 0:h.type)==="physicalType"&&M.complexType.physicalType===0}let Uit=new TextDecoder;function zI(M,h){let b=xh(M,h,1)[0];if(b===0)return"";let D=h.get(),z=M.subarray(D,D+b);return h.add(b),Uit.decode(z)}function Qee(M,h){let b=xh(M,h,1)[0]>>>0;if(b<10||b>30)throw new Error(`Unsupported field type code ${b}. Supported: 10-29(scalars), 30(STRUCT)`);let D=$ee(b);if(Kee(b)&&(D.name=zI(M,h)),Jee(b)){let z=xh(M,h,1)[0]>>>0;D.complexType.children=new Array(z);for(let G=0;G>>0,D=$ee(b);if(!D)throw new Error(`Unsupported column type code ${b}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(Kee(b)?D.name=zI(M,h):b>=0&&b<=3?D.name="id":b===4&&(D.name="geometry"),Jee(b)){let z=xh(M,h,1)[0]>>>0,G=D.complexType;G.children=new Array(z);for(let X=0;X>>0,G=xh(M,h,1)[0]>>>0;D.columns=new Array(G);for(let X=0;X=4)for(;tr>>0,oe=X.get()+he;if(oe>D.length)throw new Error(`Block overruns tile: ${oe} > ${D.length}`);if(xh(D,X,1)[0]>>>0!=1){X.set(oe);continue}let[ke,ge]=Git(D,X),Ue=ke.featureTables[0],je=null,vt=null,gt=[],It=0;for(let qt of Ue.columns){let tr=qt.name;if((re=qt).type==="scalarType"&&((Q=re.scalarType)==null?void 0:Q.type)==="logicalType"&&re.scalarType.logicalType===0){let lr=null;if(qt.nullable){let jr=$h(D,X),_n=X.get(),fn=x4(D,jr.numValues,jr.byteLength,X);X.set(_n+jr.byteLength),lr=new jv(fn,jr.numValues)}let qr=$h(D,X);It=lr?lr.size():qr.decompressedCount,je=Hit(D,qt,X,tr,qr,lr!=null?lr:It,G)}else if(Nit(qt)){let lr=xh(D,X,1)[0];if(It===0){let qr=X.get();It=$h(D,X).decompressedCount,X.set(qr)}vt=Rit(D,lr,X,It)}else{let lr=Oit(qt)?xh(D,X,1)[0]:1;if(lr===0)continue;let qr=Bit(D,X,qt,lr,It);if(qr)if(Array.isArray(qr))for(let jr of qr)gt.push(jr);else gt.push(qr)}}let _t=new wit(Ue.name,vt,je,gt,ge);Z.push(_t),X.set(oe)}var re;return Z})(new Uint8Array(h));this.layers=b.reduce(((D,z)=>Object.assign(Object.assign({},D),{[z.name]:new Wit(z)})),{})}}class Yit{constructor(h,b){this.feature=h,this.type=h.type,this.properties=h.tags?h.tags:{},this.extent=b,"id"in h&&(typeof h.id=="string"?this.id=parseInt(h.id,10):typeof h.id!="number"||isNaN(h.id)||(this.id=h.id))}loadGeometry(){let h=[],b=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(let D of b){let z=[];for(let G of D)z.push(new o(G[0],G[1]));h.push(z)}return h}}let b4="_geojsonTileLayer";function Xit(M,h,b=""){h.writeVarintField(15,M.version||1),h.writeStringField(1,M.name||""),h.writeVarintField(5,M.extent||4096);let D={jsonPrefix:b,keys:[],values:[],keycache:{},valuecache:{}};for(let X=0;X>31}function Kit(M,h){let b=M.loadGeometry(),D=M.type,z=0,G=0;for(let X of b){let Z=1;D===1&&(Z=X.length),h.writeVarint(qI(1,Z));let re=D===3?X.length-1:X.length;for(let Q=0;Q=0&&he[3]>=0&&re.insert(Z,he[0],he[1],he[2],he[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=this.encoding!=="mlt"?new CQ(new IS(this.rawTileData)).layers:new ete(this.rawTileData).layers,this.sourceLayerCoder=new Aee(this.vtLayers?Object.keys(this.vtLayers).sort():[b4])),this.vtLayers}query(h,b,D,z){this.loadVTLayers();let G=h.params,X=j/h.tileSize/h.scale,Z=cn(G.filter,G.globalState),re=h.queryGeometry,Q=h.queryPadding*X,he=ix.fromPoints(re),oe=this.grid.query(he.minX-Q,he.minY-Q,he.maxX+Q,he.maxY+Q),ke=ix.fromPoints(h.cameraQueryGeometry).expandBy(Q),ge=this.grid3D.query(ke.minX,ke.minY,ke.maxX,ke.maxY,((vt,gt,It,_t)=>(function(qt,tr,lr,qr,jr){for(let fn of qt)if(tr<=fn.x&&lr<=fn.y&&qr>=fn.x&&jr>=fn.y)return!0;let _n=[new o(tr,lr),new o(tr,jr),new o(qr,jr),new o(qr,lr)];if(qt.length>2){for(let fn of _n)if(pn(qt,fn))return!0}for(let fn=0;fn(It||(It=$l(_t)),qt.queryIntersectsFeature({queryGeometry:re,feature:_t,featureState:tr,geometry:It,zoom:this.z,transform:h.transform,pixelsToTileUnits:X,pixelPosMatrix:h.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:h.getElevation}))))}return Ue}loadMatchingFeature(h,b,D,z,G,X,Z,re,Q,he,oe){let ke=this.bucketLayerIDs[b];if(X&&!ke.some((vt=>X.has(vt))))return;let ge=this.sourceLayerCoder.decode(D),Ue=this.vtLayers[ge].feature(z);if(G.needGeometry){let vt=xa(Ue,!0);if(!G.filter(new mi(this.tileID.overscaledZ),vt,this.tileID.canonical))return}else if(!G.filter(new mi(this.tileID.overscaledZ),Ue))return;let je=this.getId(Ue,ge);for(let vt of ke){if(X&&!X.has(vt))continue;let gt=re[vt];if(!gt)continue;let It={};je&&he&&(It=he.getState(gt.sourceLayer||b4,je));let _t=_e({},Q[vt]);_t.paint=nte(_t.paint,gt.paint,Ue,It,Z),_t.layout=nte(_t.layout,gt.layout,Ue,It,Z);let qt=!oe||oe(Ue,gt,It);if(!qt)continue;let tr=new Mee(Ue,this.z,this.x,this.y,je);tr.layer=_t;let lr=h[vt];lr===void 0&&(lr=h[vt]=[]),lr.push({featureIndex:z,feature:tr,intersectionZ:qt})}}lookupSymbolFeatures(h,b,D,z,G,X,Z,re){let Q={};this.loadVTLayers();let he=cn(G.filterSpec,G.globalState);for(let oe of h)this.loadMatchingFeature(Q,D,z,oe,he,X,Z,re,b);return Q}hasLayer(h){for(let b of this.bucketLayerIDs)for(let D of b)if(h===D)return!0;return!1}getId(h,b){var D;let z=h.id;return this.promoteId&&(z=h.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[b]],typeof z=="boolean"&&(z=Number(z)),z===void 0&&(!((D=h.properties)===null||D===void 0)&&D.cluster)&&this.promoteId&&(z=Number(h.properties.cluster_id))),z}}function nte(M,h,b,D,z){return ae(M,((G,X)=>{let Z=h instanceof yc?h.get(X):null;return Z!=null&&Z.evaluate?Z.evaluate(b,D,z):Z}))}function Qit(M,h){return h-M}function ite(M,h,b,D,z){let G=[];for(let X of M){let Z;for(let re=0;re=D&&he.x>=D||(Q.x>=D?Q=new o(D,Q.y+(D-Q.x)/(he.x-Q.x)*(he.y-Q.y))._round():he.x>=D&&(he=new o(D,Q.y+(D-Q.x)/(he.x-Q.x)*(he.y-Q.y))._round()),Q.y>=z&&he.y>=z||(Q.y>=z?Q=new o(Q.x+(z-Q.y)/(he.y-Q.y)*(he.x-Q.x),z)._round():he.y>=z&&(he=new o(Q.x+(z-Q.y)/(he.y-Q.y)*(he.x-Q.x),z)._round()),Z&&Q.equals(Z[Z.length-1])||(Z=[Q],G.push(Z)),Z.push(he)))))}}return G}function ate(M,h,b,D,z){switch(h){case 1:return(function(G,X,Z,re){let Q=[];for(let he of G)for(let oe of he){let ke=re===0?oe.x:oe.y;ke>=X&&ke<=Z&&Q.push([oe])}return Q})(M,b,D,z);case 2:return ote(M,b,D,z,!1);case 3:return ote(M,b,D,z,!0)}return[]}function eat(M,h,b,D,z){let G=D===0?tat:rat,X=[],Z=[];for(let he=0;heh&&X.push(G(oe,ke,h)):ge>b?Ue=h&&(X.push(G(oe,ke,h)),je=!0),Ue>b&&ge<=b&&(X.push(G(oe,ke,b)),je=!0),!z&&je&&(Z.push(X),X=[])}let re=M.length-1,Q=D===0?M[re].x:M[re].y;return Q>=h&&Q<=b&&X.push(M[re]),z&&X.length>0&&!X[0].equals(X[X.length-1])&&X.push(new o(X[0].x,X[0].y)),X.length>0&&Z.push(X),Z}function ote(M,h,b,D,z){let G=[];for(let X of M){let Z=eat(X,h,b,D,z);Z.length>0&&G.push(...Z)}return G}function tat(M,h,b){return new o(b,M.y+(b-M.x)/(h.x-M.x)*(h.y-M.y))}function rat(M,h,b){return new o(M.x+(b-M.y)/(h.y-M.y)*(h.x-M.x),b)}_i("FeatureIndex",rte,{omit:["rawTileData","sourceLayerCoder"]});class Jg extends o{constructor(h,b,D,z){super(h,b),this.angle=D,z!==void 0&&(this.segment=z)}clone(){return new Jg(this.x,this.y,this.angle,this.segment)}}function ste(M,h,b,D,z){if(h.segment===void 0||b===0)return!0;let G=h,X=h.segment+1,Z=0;for(;Z>-b/2;){if(X--,X<0)return!1;Z-=M[X].dist(G),G=M[X]}Z+=M[X].dist(M[X+1]),X++;let re=[],Q=0;for(;ZD;)Q-=re.shift().angleDelta;if(Q>z)return!1;X++,Z+=he.dist(oe)}return!0}function lte(M){let h=0;for(let b=0;bQ){let Ue=(Q-re)/ge,je=Ks.number(oe.x,ke.x,Ue),vt=Ks.number(oe.y,ke.y,Ue),gt=new Jg(je,vt,ke.angleTo(oe),he);return gt._round(),!X||ste(M,gt,Z,X,h)?gt:void 0}re+=ge}}function iat(M,h,b,D,z,G,X,Z,re){let Q=ute(D,G,X),he=cte(D,z),oe=he*X,ke=M[0].x===0||M[0].x===re||M[0].y===0||M[0].y===re;return h-oe=0&&qt=0&&tr=0&&ke+Q<=he){let lr=new Jg(qt,tr,It,Ue);lr._round(),D&&!ste(M,lr,G,D,z)||ge.push(lr)}}oe+=gt}return Z||ge.length||X||(ge=fte(M,oe/2,b,D,z,G,X,!0,re)),ge}function hte(M,h,b,D){let z=[],G=M.image,X=G.pixelRatio,Z=G.paddedRect.w-2,re=G.paddedRect.h-2,Q={x1:M.left,y1:M.top,x2:M.right,y2:M.bottom},he=G.stretchX||[[0,Z]],oe=G.stretchY||[[0,re]],ke=(un,ei)=>un+ei[1]-ei[0],ge=he.reduce(ke,0),Ue=oe.reduce(ke,0),je=Z-ge,vt=re-Ue,gt=0,It=ge,_t=0,qt=Ue,tr=0,lr=je,qr=0,jr=vt;if(G.content&&D){let un=G.content,ei=un[2]-un[0],ci=un[3]-un[1];(G.textFitWidth||G.textFitHeight)&&(Q=lee(M)),gt=VS(he,0,un[0]),_t=VS(oe,0,un[1]),It=VS(he,un[0],un[2]),qt=VS(oe,un[1],un[3]),tr=un[0]-gt,qr=un[1]-_t,lr=ei-It,jr=ci-qt}let _n=Q.x1,fn=Q.y1,Dn=Q.x2-_n,Hn=Q.y2-fn,Ln=(un,ei,ci,ti)=>{let di=GS(un.stretch-gt,It,Dn,_n),_a=HS(un.fixed-tr,lr,un.stretch,ge),Ao=GS(ei.stretch-_t,qt,Hn,fn),us=HS(ei.fixed-qr,jr,ei.stretch,Ue),ks=GS(ci.stretch-gt,It,Dn,_n),Uf=HS(ci.fixed-tr,lr,ci.stretch,ge),Jl=GS(ti.stretch-_t,qt,Hn,fn),_c=HS(ti.fixed-qr,jr,ti.stretch,Ue),zc=new o(di,Ao),Sl=new o(ks,Ao),df=new o(ks,Jl),_h=new o(di,Jl),bh=new o(_a/X,us/X),Ad=new o(Uf/X,_c/X),Vf=h*Math.PI/180;if(Vf){let qc=Math.sin(Vf),Bl=Math.cos(Vf),ec=[Bl,-qc,qc,Bl];zc._matMult(ec),Sl._matMult(ec),_h._matMult(ec),df._matMult(ec)}let Md=un.stretch+un.fixed,Z0=ei.stretch+ei.fixed;return{tl:zc,tr:Sl,bl:_h,br:df,tex:{x:G.paddedRect.x+1+Md,y:G.paddedRect.y+1+Z0,w:ci.stretch+ci.fixed-Md,h:ti.stretch+ti.fixed-Z0},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:bh,pixelOffsetBR:Ad,minFontScaleX:lr/X/Dn,minFontScaleY:jr/X/Hn,isSDF:b}};if(D&&(G.stretchX||G.stretchY)){let un=dte(he,je,ge),ei=dte(oe,vt,Ue);for(let ci=0;ci0&&(je=Math.max(10,je),this.circleDiameter=je)}else{let ke=!((oe=X.image)===null||oe===void 0)&&oe.content&&(X.image.textFitWidth||X.image.textFitHeight)?lee(X):{x1:X.left,y1:X.top,x2:X.right,y2:X.bottom};ke.y1=ke.y1*Z-re[0],ke.y2=ke.y2*Z+re[2],ke.x1=ke.x1*Z-re[3],ke.x2=ke.x2*Z+re[1];let ge=X.collisionPadding;if(ge&&(ke.x1-=ge[0]*Z,ke.y1-=ge[1]*Z,ke.x2+=ge[2]*Z,ke.y2+=ge[3]*Z),he){let Ue=new o(ke.x1,ke.y1),je=new o(ke.x2,ke.y1),vt=new o(ke.x1,ke.y2),gt=new o(ke.x2,ke.y2),It=he*Math.PI/180;Ue._rotate(It),je._rotate(It),vt._rotate(It),gt._rotate(It),ke.x1=Math.min(Ue.x,je.x,vt.x,gt.x),ke.x2=Math.max(Ue.x,je.x,vt.x,gt.x),ke.y1=Math.min(Ue.y,je.y,vt.y,gt.y),ke.y2=Math.max(Ue.y,je.y,vt.y,gt.y)}h.emplaceBack(b.x,b.y,ke.x1,ke.y1,ke.x2,ke.y2,D,z,G)}this.boxEndIndex=h.length}}class aat{constructor(h=[],b=(D,z)=>Dz?1:0){if(this.data=h,this.length=this.data.length,this.compare=b,this.length>0)for(let D=(this.length>>1)-1;D>=0;D--)this._down(D)}push(h){this.data.push(h),this._up(this.length++)}pop(){if(this.length===0)return;let h=this.data[0],b=this.data.pop();return--this.length>0&&(this.data[0]=b,this._down(0)),h}peek(){return this.data[0]}_up(h){let{data:b,compare:D}=this,z=b[h];for(;h>0;){let G=h-1>>1,X=b[G];if(D(z,X)>=0)break;b[h]=X,h=G}b[h]=z}_down(h){let{data:b,compare:D}=this,z=this.length>>1,G=b[h];for(;h=0)break;b[h]=b[X],h=X}b[h]=G}}function oat(M,h=1){let b=ix.fromPoints(M[0]),D=Math.min(b.width(),b.height()),z=D/2,G=new aat([],sat),{minX:X,minY:Z,maxX:re,maxY:Q}=b;if(D===0)return new o(X,Z);for(let ke=X;keoe.d||!oe.d)&&(oe=ke),ke.max-oe.d<=h||(z=ke.h/2,G.push(new ib(ke.p.x-z,ke.p.y-z,z,M)),G.push(new ib(ke.p.x+z,ke.p.y-z,z,M)),G.push(new ib(ke.p.x-z,ke.p.y+z,z,M)),G.push(new ib(ke.p.x+z,ke.p.y+z,z,M)))}return he.d>0&&oe.d-he.d<=h?he.p:oe.p}function sat(M,h){return h.max-M.max}class ib{constructor(h,b,D,z){this.p=new o(h,b),this.h=D,this.d=(function(G,X){let Z=!1,re=1/0;for(let Q of X)for(let he=0,oe=Q.length,ke=oe-1;heG.y!=Ue.y>G.y&&G.x<(Ue.x-ge.x)*(G.y-ge.y)/(Ue.y-ge.y)+ge.x&&(Z=!Z),re=Math.min(re,gr(G,ge,Ue))}return(Z?1:-1)*Math.sqrt(re)})(this.p,z),this.max=this.d+this.h*Math.SQRT2}}var Nf;a.aM=void 0,(Nf=a.aM||(a.aM={}))[Nf.center=1]="center",Nf[Nf.left=2]="left",Nf[Nf.right=3]="right",Nf[Nf.top=4]="top",Nf[Nf.bottom=5]="bottom",Nf[Nf["top-left"]=6]="top-left",Nf[Nf["top-right"]=7]="top-right",Nf[Nf["bottom-left"]=8]="bottom-left",Nf[Nf["bottom-right"]=9]="bottom-right";let BI=Number.POSITIVE_INFINITY;function vte(M,h){return h[1]!==BI?(function(b,D,z){let G=0,X=0;switch(D=Math.abs(D),z=Math.abs(z),b){case"top-right":case"top-left":case"top":X=z-7;break;case"bottom-right":case"bottom-left":case"bottom":X=7-z}switch(b){case"top-right":case"bottom-right":case"right":G=-D;break;case"top-left":case"bottom-left":case"left":G=D}return[G,X]})(M,h[0],h[1]):(function(b,D){let z=0,G=0;D<0&&(D=0);let X=D/Math.SQRT2;switch(b){case"top-right":case"top-left":G=X-7;break;case"bottom-right":case"bottom-left":G=7-X;break;case"bottom":G=7-D;break;case"top":G=D-7}switch(b){case"top-right":case"bottom-right":z=-X;break;case"top-left":case"bottom-left":z=X;break;case"left":z=D;break;case"right":z=-D}return[z,G]})(M,h[0])}function pte(M,h,b){var D;let z=M.layout,G=(D=z.get("text-variable-anchor-offset"))===null||D===void 0?void 0:D.evaluate(h,{},b);if(G){let Z=G.values,re=[];for(let Q=0;Qke*Rc));he.startsWith("top")?oe[1]-=7:he.startsWith("bottom")&&(oe[1]+=7),re[Q+1]=oe}return new yo(re)}let X=z.get("text-variable-anchor");if(X){let Z;Z=M._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[z.get("text-radial-offset").evaluate(h,{},b)*Rc,BI]:z.get("text-offset").evaluate(h,{},b).map((Q=>Q*Rc));let re=[];for(let Q of X)re.push(Q,vte(Q,Z));return new yo(re)}return null}function OI(M){switch(M){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function lat(M,h,b,D,z,G,X,Z,re,Q,he,oe){let ke=G.textMaxSize.evaluate(h,{});ke===void 0&&(ke=X);let ge=M.layers[0].layout,Ue=ge.get("icon-offset").evaluate(h,{},he),je=mte(b.horizontal),vt=X/24,gt=M.tilePixelRatio*vt,It=M.tilePixelRatio*ke/24,_t=M.tilePixelRatio*Z,qt=M.tilePixelRatio*ge.get("symbol-spacing"),tr=ge.get("text-padding")*M.tilePixelRatio,lr=(function(ci,ti,di,_a=1){let Ao=ci.get("icon-padding").evaluate(ti,{},di),us=Ao==null?void 0:Ao.values;return[us[0]*_a,us[1]*_a,us[2]*_a,us[3]*_a]})(ge,h,he,M.tilePixelRatio),qr=ge.get("text-max-angle")/180*Math.PI,jr=ge.get("text-rotation-alignment")!=="viewport"&&ge.get("symbol-placement")!=="point",_n=ge.get("icon-rotation-alignment")==="map"&&ge.get("symbol-placement")!=="point",fn=ge.get("symbol-placement"),Dn=qt/2,Hn=ge.get("icon-text-fit"),Ln;D&&Hn!=="none"&&(M.allowVerticalPlacement&&b.vertical&&(Ln=uee(D,b.vertical,Hn,ge.get("icon-text-fit-padding"),Ue,vt)),je&&(D=uee(D,je,Hn,ge.get("icon-text-fit-padding"),Ue,vt)));let un=he?oe.line.getGranularityForZoomLevel(he.z):1,ei=(ci,ti)=>{ti.x<0||ti.x>=j||ti.y<0||ti.y>=j||(function(di,_a,Ao,us,ks,Uf,Jl,_c,zc,Sl,df,_h,bh,Ad,Vf,Md,Z0,qc,Bl,ec,Ql,Bc,V1,Wv,w4){let Qg=di.addToLineVertexArray(_a,Ao),ox,ab,ob,sb,yte=0,xte=0,_te=0,bte=0,NI=-1,UI=-1,G1={},wte=si("");if(di.allowVerticalPlacement&&us.vertical){let wh=_c.layout.get("text-rotate").evaluate(Ql,{},Wv)+90;ob=new jS(zc,_a,Sl,df,_h,us.vertical,bh,Ad,Vf,wh),Jl&&(sb=new jS(zc,_a,Sl,df,_h,Jl,Z0,qc,Vf,wh))}if(ks){let wh=_c.layout.get("icon-rotate").evaluate(Ql,{}),_0=_c.layout.get("icon-text-fit")!=="none",sx=hte(ks,wh,V1,_0),Xv=Jl?hte(Jl,wh,V1,_0):void 0;ab=new jS(zc,_a,Sl,df,_h,ks,Z0,qc,!1,wh),yte=4*sx.length;let lx=di.iconSizeData,Ip=null;lx.kind==="source"?(Ip=[N1*_c.layout.get("icon-size").evaluate(Ql,{})],Ip[0]>Yg&&me(`${di.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):lx.kind==="composite"&&(Ip=[N1*Bc.compositeIconSizes[0].evaluate(Ql,{},Wv),N1*Bc.compositeIconSizes[1].evaluate(Ql,{},Wv)],(Ip[0]>Yg||Ip[1]>Yg)&&me(`${di.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),di.addSymbols(di.icon,sx,Ip,ec,Bl,Ql,a.ax.none,_a,Qg.lineStartIndex,Qg.lineLength,-1,Wv),NI=di.icon.placedSymbolArray.length-1,Xv&&(xte=4*Xv.length,di.addSymbols(di.icon,Xv,Ip,ec,Bl,Ql,a.ax.vertical,_a,Qg.lineStartIndex,Qg.lineLength,-1,Wv),UI=di.icon.placedSymbolArray.length-1)}let Tte=Object.keys(us.horizontal);for(let wh of Tte){let _0=us.horizontal[wh];if(!ox){wte=si(_0.text);let Xv=_c.layout.get("text-rotate").evaluate(Ql,{},Wv);ox=new jS(zc,_a,Sl,df,_h,_0,bh,Ad,Vf,Xv)}let sx=_0.positionedLines.length===1;if(_te+=gte(di,_a,_0,Uf,_c,Vf,Ql,Md,Qg,us.vertical?a.ax.horizontal:a.ax.horizontalOnly,sx?Tte:[wh],G1,NI,Bc,Wv),sx)break}us.vertical&&(bte+=gte(di,_a,us.vertical,Uf,_c,Vf,Ql,Md,Qg,a.ax.vertical,["vertical"],G1,UI,Bc,Wv));let cat=ox?ox.boxStartIndex:di.collisionBoxArray.length,fat=ox?ox.boxEndIndex:di.collisionBoxArray.length,hat=ob?ob.boxStartIndex:di.collisionBoxArray.length,dat=ob?ob.boxEndIndex:di.collisionBoxArray.length,vat=ab?ab.boxStartIndex:di.collisionBoxArray.length,pat=ab?ab.boxEndIndex:di.collisionBoxArray.length,gat=sb?sb.boxStartIndex:di.collisionBoxArray.length,mat=sb?sb.boxEndIndex:di.collisionBoxArray.length,Yv=-1,WS=(wh,_0)=>wh!=null&&wh.circleDiameter?Math.max(wh.circleDiameter,_0):_0;Yv=WS(ox,Yv),Yv=WS(ob,Yv),Yv=WS(ab,Yv),Yv=WS(sb,Yv);let Ate=Yv>-1?1:0;Ate&&(Yv*=w4/Rc),di.glyphOffsetArray.length>=X_.MAX_GLYPHS&&me("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ql.sortKey!==void 0&&di.addToSortKeyRanges(di.symbolInstances.length,Ql.sortKey);let yat=pte(_c,Ql,Wv),[xat,_at]=(function(wh,_0){let sx=wh.length,Xv=_0==null?void 0:_0.values;if((Xv==null?void 0:Xv.length)>0)for(let lx=0;lx=0?G1.right:-1,G1.center>=0?G1.center:-1,G1.left>=0?G1.left:-1,G1.vertical||-1,NI,UI,wte,cat,fat,hat,dat,vat,pat,gat,mat,Sl,_te,bte,yte,xte,Ate,0,bh,Yv,xat,_at)})(M,ti,ci,b,D,z,Ln,M.layers[0],M.collisionBoxArray,h.index,h.sourceLayerIndex,M.index,gt,[tr,tr,tr,tr],jr,re,_t,lr,_n,Ue,h,G,Q,he,X)};if(fn==="line")for(let ci of ite(h.geometry,0,0,j,j)){let ti=nx(ci,un),di=iat(ti,qt,qr,b.vertical||je,D,24,It,M.overscaling,j);for(let _a of di)je&&uat(M,je.text,Dn,_a)||ei(ti,_a)}else if(fn==="line-center"){for(let ci of h.geometry)if(ci.length>1){let ti=nx(ci,un),di=nat(ti,qr,b.vertical||je,D,24,It);di&&ei(ti,di)}}else if(h.type==="Polygon")for(let ci of uh(h.geometry,0)){let ti=oat(ci,16);ei(nx(ci[0],un,!0),new Jg(ti.x,ti.y,0))}else if(h.type==="LineString")for(let ci of h.geometry){let ti=nx(ci,un);ei(ti,new Jg(ti[0].x,ti[0].y,0))}else if(h.type==="Point")for(let ci of h.geometry)for(let ti of ci)ei([ti],new Jg(ti.x,ti.y,0))}function gte(M,h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue){let je=(function(It,_t,qt,tr,lr,qr,jr,_n){let fn=tr.layout.get("text-rotate").evaluate(qr,{})*Math.PI/180,Dn=[];for(let Hn of _t.positionedLines)for(let Ln of Hn.positionedGlyphs){if(!Ln.rect)continue;let un=Ln.rect||{},ei=4,ci=!0,ti=1,di=0,_a=(lr||_n)&&Ln.vertical,Ao=Ln.metrics.advance*Ln.scale/2;if(_n&&_t.verticalizable&&(di=Hn.lineOffset/2-(Ln.imageName?-(Rc-Ln.metrics.width*Ln.scale)/2:(Ln.scale-1)*Rc)),Ln.imageName){let qc=jr[Ln.imageName];ci=qc.sdf,ti=qc.pixelRatio,ei=1/ti}let us=lr?[Ln.x+Ao,Ln.y]:[0,0],ks=lr?[0,0]:[Ln.x+Ao+qt[0],Ln.y+qt[1]-di],Uf=[0,0];_a&&(Uf=ks,ks=[0,0]);let Jl=Ln.metrics.isDoubleResolution?2:1,_c=(Ln.metrics.left-ei)*Ln.scale-Ao+ks[0],zc=(-Ln.metrics.top-ei)*Ln.scale+ks[1],Sl=_c+un.w/Jl*Ln.scale/ti,df=zc+un.h/Jl*Ln.scale/ti,_h=new o(_c,zc),bh=new o(Sl,zc),Ad=new o(_c,df),Vf=new o(Sl,df);if(_a){let qc=new o(-Ao,Ao- -17),Bl=-Math.PI/2,ec=12-Ao,Ql=new o(22-ec,-(Ln.imageName?ec:0)),Bc=new o(...Uf);_h._rotateAround(Bl,qc)._add(Ql)._add(Bc),bh._rotateAround(Bl,qc)._add(Ql)._add(Bc),Ad._rotateAround(Bl,qc)._add(Ql)._add(Bc),Vf._rotateAround(Bl,qc)._add(Ql)._add(Bc)}if(fn){let qc=Math.sin(fn),Bl=Math.cos(fn),ec=[Bl,-qc,qc,Bl];_h._matMult(ec),bh._matMult(ec),Ad._matMult(ec),Vf._matMult(ec)}let Md=new o(0,0),Z0=new o(0,0);Dn.push({tl:_h,tr:bh,bl:Ad,br:Vf,tex:un,writingMode:_t.writingMode,glyphOffset:us,sectionIndex:Ln.sectionIndex,isSDF:ci,pixelOffsetTL:Md,pixelOffsetBR:Z0,minFontScaleX:0,minFontScaleY:0})}return Dn})(0,b,Z,z,G,X,D,M.allowVerticalPlacement),vt=M.textSizeData,gt=null;vt.kind==="source"?(gt=[N1*z.layout.get("text-size").evaluate(X,{})],gt[0]>Yg&&me(`${M.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):vt.kind==="composite"&&(gt=[N1*ge.compositeTextSizes[0].evaluate(X,{},Ue),N1*ge.compositeTextSizes[1].evaluate(X,{},Ue)],(gt[0]>Yg||gt[1]>Yg)&&me(`${M.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),M.addSymbols(M.text,je,gt,Z,G,X,Q,h,re.lineStartIndex,re.lineLength,ke,Ue);for(let It of he)oe[It]=M.text.placedSymbolArray.length-1;return 4*je.length}function mte(M){for(let h in M)return M[h];return null}function uat(M,h,b,D){let z=M.compareText;if(h in z){let G=z[h];for(let X=G.length-1;X>=0;X--)if(D.dist(G[X])this.process())),this.subscription=et(this.target,"message",(b=>this.receive(b)),!1),this.globalScope=De(self)?M:window}registerMessageHandler(M,h){this.messageHandlers[M]=h}unregisterMessageHandler(M){delete this.messageHandlers[M]}sendAsync(M,h){return new Promise(((b,D)=>{let z=Math.round(1e18*Math.random()).toString(36).substring(0,10),G=h?et(h.signal,"abort",(()=>{G==null||G.unsubscribe(),delete this.resolveRejects[z];let re={id:z,type:"",origin:location.origin,targetMapId:M.targetMapId,sourceMapId:this.mapId};this.target.postMessage(re)}),bit):null;this.resolveRejects[z]={resolve:re=>{G==null||G.unsubscribe(),b(re)},reject:re=>{G==null||G.unsubscribe(),D(re)}};let X=[],Z=Object.assign(Object.assign({},M),{id:z,sourceMapId:this.mapId,origin:location.origin,data:Be(M.data,X)});this.target.postMessage(Z,{transfer:X})}))}receive(M){let h=M.data,b=h.id,D=["file://","resource://android","null"],z=[h.origin,location.origin],G=h.origin===location.origin,X=z.some((Z=>D.includes(Z)));if((G||X)&&(!h.targetMapId||this.mapId===h.targetMapId)){if(h.type===""){delete this.tasks[b];let Z=this.abortControllers[b];return delete this.abortControllers[b],void(Z&&Z.abort())}if(De(self)||h.mustQueue)return this.tasks[b]=h,this.taskQueue.push(b),void this.invoker.trigger();this.processTask(b,h)}}process(){if(this.taskQueue.length===0)return;let M=this.taskQueue.shift(),h=this.tasks[M];delete this.tasks[M],this.taskQueue.length>0&&this.invoker.trigger(),h&&this.processTask(M,h)}processTask(M,h){return i(this,void 0,void 0,(function*(){if(h.type===""){let z=this.resolveRejects[M];return delete this.resolveRejects[M],z?void(h.error?z.reject(U(Ne(h.error))):z.resolve(Ne(h.data))):void 0}if(!this.messageHandlers[h.type])return void this.completeTask(M,new Error(`Could not find a registered handler for ${h.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let b=Ne(h.data),D=new AbortController;this.abortControllers[M]=D;try{let z=yield this.messageHandlers[h.type](h.sourceMapId,b,D);this.completeTask(M,null,z)}catch(z){this.completeTask(M,U(z))}}))}completeTask(M,h,b){let D=[];delete this.abortControllers[M];let z={id:M,type:"",sourceMapId:this.mapId,origin:location.origin,error:h?Be(h):null,data:Be(b,D)};this.target.postMessage(z,{transfer:D})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},a.O=function(){var M=new y(16);return y!=Float32Array&&(M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[11]=0,M[12]=0,M[13]=0,M[14]=0),M[0]=1,M[5]=1,M[10]=1,M[15]=1,M},a.P=o,a.Q=function(M,h,b){var D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je=b[0],vt=b[1],gt=b[2];return h===M?(M[12]=h[0]*je+h[4]*vt+h[8]*gt+h[12],M[13]=h[1]*je+h[5]*vt+h[9]*gt+h[13],M[14]=h[2]*je+h[6]*vt+h[10]*gt+h[14],M[15]=h[3]*je+h[7]*vt+h[11]*gt+h[15]):(z=h[1],G=h[2],X=h[3],Z=h[4],re=h[5],Q=h[6],he=h[7],oe=h[8],ke=h[9],ge=h[10],Ue=h[11],M[0]=D=h[0],M[1]=z,M[2]=G,M[3]=X,M[4]=Z,M[5]=re,M[6]=Q,M[7]=he,M[8]=oe,M[9]=ke,M[10]=ge,M[11]=Ue,M[12]=D*je+Z*vt+oe*gt+h[12],M[13]=z*je+re*vt+ke*gt+h[13],M[14]=G*je+Q*vt+ge*gt+h[14],M[15]=X*je+he*vt+Ue*gt+h[15]),M},a.R=Kl,a.S=function(M,h,b){var D=b[0],z=b[1],G=b[2];return M[0]=h[0]*D,M[1]=h[1]*D,M[2]=h[2]*D,M[3]=h[3]*D,M[4]=h[4]*z,M[5]=h[5]*z,M[6]=h[6]*z,M[7]=h[7]*z,M[8]=h[8]*G,M[9]=h[9]*G,M[10]=h[10]*G,M[11]=h[11]*G,M[12]=h[12],M[13]=h[13],M[14]=h[14],M[15]=h[15],M},a.T=NR,a.U=function(M,h,b){var D=h[0],z=h[1],G=h[2],X=h[3],Z=h[4],re=h[5],Q=h[6],he=h[7],oe=h[8],ke=h[9],ge=h[10],Ue=h[11],je=h[12],vt=h[13],gt=h[14],It=h[15],_t=b[0],qt=b[1],tr=b[2],lr=b[3];return M[0]=_t*D+qt*Z+tr*oe+lr*je,M[1]=_t*z+qt*re+tr*ke+lr*vt,M[2]=_t*G+qt*Q+tr*ge+lr*gt,M[3]=_t*X+qt*he+tr*Ue+lr*It,M[4]=(_t=b[4])*D+(qt=b[5])*Z+(tr=b[6])*oe+(lr=b[7])*je,M[5]=_t*z+qt*re+tr*ke+lr*vt,M[6]=_t*G+qt*Q+tr*ge+lr*gt,M[7]=_t*X+qt*he+tr*Ue+lr*It,M[8]=(_t=b[8])*D+(qt=b[9])*Z+(tr=b[10])*oe+(lr=b[11])*je,M[9]=_t*z+qt*re+tr*ke+lr*vt,M[10]=_t*G+qt*Q+tr*ge+lr*gt,M[11]=_t*X+qt*he+tr*Ue+lr*It,M[12]=(_t=b[12])*D+(qt=b[13])*Z+(tr=b[14])*oe+(lr=b[15])*je,M[13]=_t*z+qt*re+tr*ke+lr*vt,M[14]=_t*G+qt*Q+tr*ge+lr*gt,M[15]=_t*X+qt*he+tr*Ue+lr*It,M},a.V=function(M,h){let b={};for(let D of h)D in M&&(b[D]=M[D]);return b},a.W=Xg,a.X=K,a.Y=yee,a.Z=mee,a._=i,a.a=Ve,a.a$=function(M){var h=new y(3);return h[0]=M[0],h[1]=M[1],h[2]=M[2],h},a.a0=p,a.a1=x,a.a2=Oe,a.a3=Yd,a.a4=_ee,a.a5=OS,a.a6=j,a.a7=y4,a.a8=ix,a.a9=25,a.aA=function(M){var h=M[0],b=M[1];return Math.sqrt(h*h+b*b)},a.aB=function(M){return M[0]=0,M[1]=0,M},a.aC=function(M,h,b){return M[0]=h[0]*b,M[1]=h[1]*b,M},a.aD=dI,a.aE=I,a.aF=function(M,h,b,D){let z=h.y-M.y,G=h.x-M.x,X=D.y-b.y,Z=D.x-b.x,re=X*G-Z*z;if(re===0)return null;let Q=(Z*(M.y-b.y)-X*(M.x-b.x))/re;return new o(M.x+Q*G,M.y+Q*z)},a.aG=ite,a.aH=gn,a.aI=function(M){let h=1/0,b=1/0,D=-1/0,z=-1/0;for(let G of M)h=Math.min(h,G.x),b=Math.min(b,G.y),D=Math.max(D,G.x),z=Math.max(z,G.y);return[h,b,D,z]},a.aJ=Rc,a.aK=q,a.aL=function(M,h,b,D,z=!1){if(!b[0]&&!b[1])return[0,0];let G=z?D==="map"?-M.bearingInRadians:0:D==="viewport"?M.bearingInRadians:0;if(G){let X=Math.sin(G),Z=Math.cos(G);b=[b[0]*Z-b[1]*X,b[0]*X+b[1]*Z]}return[z?b[0]:q(h,b[0],M.zoom),z?b[1]:q(h,b[1],M.zoom)]},a.aN=hI,a.aO=OI,a.aP=fI,a.aQ=M=>M.type==="symbol",a.aR=CS,a.aS=Re,a.aT=kS,a.aU=Xe,a.aV=an,a.aW=Er,a.aX=we,a.aY=bee,a.aZ=T,a.a_=A,a.aa=yI,a.ab=M=>{let h=window.document.createElement("video");return h.muted=!0,new Promise((b=>{h.onloadstart=()=>{b(h)};for(let D of M){let z=window.document.createElement("source");jt(D)||(h.crossOrigin="Anonymous"),z.src=D,h.appendChild(z)}}))},a.ac=xr,a.ad=function(){return ne++},a.ae=H,a.af=X_,a.ag=b4,a.ah=cn,a.ai=xa,a.aj=Mee,a.ak=function(M){let h={};if(M.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((b,D,z,G)=>{let X=z||G;return h[D]=!X||X.toLowerCase(),""})),h["max-age"]){let b=parseInt(h["max-age"],10);isNaN(b)?delete h["max-age"]:h["max-age"]=b}return h},a.al=ue,a.am=85.051129,a.an=qe,a.ao=function(M){return Math.pow(2,M)},a.ap=k,a.aq=xee,a.ar=function(M){return Math.log(M)/Math.LN2},a.as=function(M){var h=M[0],b=M[1];return h*h+b*b},a.at=function(M){if(!M.length)return new Set;let h=Math.max(...M.map((re=>re.canonical.z))),b=1/0,D=-1/0,z=1/0,G=-1/0,X=[];for(let re of M){let{x:Q,y:he,z:oe}=re.canonical,ke=Math.pow(2,h-oe),ge=Q*ke,Ue=he*ke;X.push({id:re,x:ge,y:Ue}),geD&&(D=ge),UeG&&(G=Ue)}let Z=new Set;for(let re of X)re.x!==b&&re.x!==D&&re.y!==z&&re.y!==G||Z.add(re.id);return Z},a.au=function(M,h){let b=Math.abs(2*M.wrap)-+(M.wrap<0),D=Math.abs(2*h.wrap)-+(h.wrap<0);return M.overscaledZ-h.overscaledZ||D-b||h.canonical.y-M.canonical.y||h.canonical.x-M.canonical.x},a.av=class{constructor(M,h){this.max=M,this.onRemove=h,this.reset()}reset(){for(let M in this.data)for(let h of this.data[M])h.timeout&&clearTimeout(h.timeout),this.onRemove(h.value);return this.data={},this.order=[],this}add(M,h,b){let D=M.wrapped().key;this.data[D]===void 0&&(this.data[D]=[]);let z={value:h,timeout:void 0};if(b!==void 0&&(z.timeout=setTimeout((()=>{this.remove(M,z)}),b)),this.data[D].push(z),this.order.push(D),this.order.length>this.max){let G=this._getAndRemoveByKey(this.order[0]);G&&this.onRemove(G)}return this}has(M){return M.wrapped().key in this.data}getAndRemove(M){return this.has(M)?this._getAndRemoveByKey(M.wrapped().key):null}_getAndRemoveByKey(M){let h=this.data[M].shift();return h.timeout&&clearTimeout(h.timeout),this.data[M].length===0&&delete this.data[M],this.order.splice(this.order.indexOf(M),1),h.value}getByKey(M){let h=this.data[M];return h?h[0].value:null}get(M){return this.has(M)?this.data[M.wrapped().key][0].value:null}remove(M,h){if(!this.has(M))return this;let b=M.wrapped().key,D=h===void 0?0:this.data[b].indexOf(h),z=this.data[b][D];return this.data[b].splice(D,1),z.timeout&&clearTimeout(z.timeout),this.data[b].length===0&&delete this.data[b],this.onRemove(z.value),this.order.splice(this.order.indexOf(b),1),this}setMaxSize(M){for(this.max=M;this.order.length>this.max;){let h=this._getAndRemoveByKey(this.order[0]);h&&this.onRemove(h)}return this}filter(M){let h=[];for(let b in this.data)for(let D of this.data[b])M(D.value)||h.push(D);for(let b of h)this.remove(b.value.tileID,b)}},a.aw=function(M,h){let b=0,D=0;if(M.kind==="constant")D=M.layoutSize;else if(M.kind!=="source"){let{interpolationType:z,minZoom:G,maxZoom:X}=M,Z=z?ue(Uo.interpolationFactor(z,h,G,X),0,1):0;M.kind==="camera"?D=Ks.number(M.minSize,M.maxSize,Z):b=Z}return{uSizeT:b,uSize:D}},a.ay=function(M,{uSize:h,uSizeT:b},{lowerSize:D,upperSize:z}){return M.kind==="source"?D/N1:M.kind==="composite"?Ks.number(D/N1,z/N1,b):h},a.az=O,a.b=ht,a.b$=Os,a.b0=function(M,h,b){return M[0]=h[0]-b[0],M[1]=h[1]-b[1],M[2]=h[2]-b[2],M},a.b1=function(M,h){var b=h[0],D=h[1],z=h[2],G=b*b+D*D+z*z;return G>0&&(G=1/Math.sqrt(G)),M[0]=h[0]*G,M[1]=h[1]*G,M[2]=h[2]*G,M},a.b2=m,a.b3=function(M,h){return M[0]*h[0]+M[1]*h[1]+M[2]*h[2]},a.b4=function(M,h,b){return M[0]=h[0]*b[0],M[1]=h[1]*b[1],M[2]=h[2]*b[2],M[3]=h[3]*b[3],M},a.b5=L,a.b6=function(M,h,b){let D=h[0]*b[0]+h[1]*b[1]+h[2]*b[2];return D===0?null:(-(M[0]*b[0]+M[1]*b[1]+M[2]*b[2])-b[3])/D},a.b7=E,a.b8=function(M,h,b){return M[0]=h[0]*b,M[1]=h[1]*b,M[2]=h[2]*b,M[3]=h[3]*b,M},a.b9=function(M,h){return M[0]*h[0]+M[1]*h[1]+M[2]*h[2]+M[3]},a.bA=B,a.bB=function(M,h,b){var D=b[0],z=b[1],G=b[2],X=b[3],Z=h[0],re=h[1],Q=h[2],he=z*Q-G*re,oe=G*Z-D*Q,ke=D*re-z*Z;return M[0]=Z+X*(he+=he)+z*(ke+=ke)-G*(oe+=oe),M[1]=re+X*oe+G*he-D*ke,M[2]=Q+X*ke+D*oe-z*he,M},a.bC=function(M,h,b){let D=(z=[M[0],M[1],M[2],h[0],h[1],h[2],b[0],b[1],b[2]])[0]*((he=z[8])*(X=z[4])-(Z=z[5])*(Q=z[7]))+z[1]*(-he*(G=z[3])+Z*(re=z[6]))+z[2]*(Q*G-X*re);var z,G,X,Z,re,Q,he;if(D===0)return null;let oe=m([],[h[0],h[1],h[2]],[b[0],b[1],b[2]]),ke=m([],[b[0],b[1],b[2]],[M[0],M[1],M[2]]),ge=m([],[M[0],M[1],M[2]],[h[0],h[1],h[2]]),Ue=T([],oe,-M[3]);return A(Ue,Ue,T([],ke,-h[3])),A(Ue,Ue,T([],ge,-b[3])),T(Ue,Ue,1/D),Ue},a.bD=mI,a.bE=function(){return new Float64Array(4)},a.bF=function(M,h,b,D){var z=[],G=[];return z[0]=h[0]-b[0],z[1]=h[1]-b[1],z[2]=h[2]-b[2],G[0]=z[0]*Math.cos(D)-z[1]*Math.sin(D),G[1]=z[0]*Math.sin(D)+z[1]*Math.cos(D),G[2]=z[2],M[0]=G[0]+b[0],M[1]=G[1]+b[1],M[2]=G[2]+b[2],M},a.bG=function(M,h,b,D){var z=[],G=[];return z[0]=h[0]-b[0],z[1]=h[1]-b[1],z[2]=h[2]-b[2],G[0]=z[0],G[1]=z[1]*Math.cos(D)-z[2]*Math.sin(D),G[2]=z[1]*Math.sin(D)+z[2]*Math.cos(D),M[0]=G[0]+b[0],M[1]=G[1]+b[1],M[2]=G[2]+b[2],M},a.bH=function(M,h,b,D){var z=[],G=[];return z[0]=h[0]-b[0],z[1]=h[1]-b[1],z[2]=h[2]-b[2],G[0]=z[2]*Math.sin(D)+z[0]*Math.cos(D),G[1]=z[1],G[2]=z[2]*Math.cos(D)-z[0]*Math.sin(D),M[0]=G[0]+b[0],M[1]=G[1]+b[1],M[2]=G[2]+b[2],M},a.bI=function(M,h,b){var D=Math.sin(b),z=Math.cos(b),G=h[0],X=h[1],Z=h[2],re=h[3],Q=h[8],he=h[9],oe=h[10],ke=h[11];return h!==M&&(M[4]=h[4],M[5]=h[5],M[6]=h[6],M[7]=h[7],M[12]=h[12],M[13]=h[13],M[14]=h[14],M[15]=h[15]),M[0]=G*z-Q*D,M[1]=X*z-he*D,M[2]=Z*z-oe*D,M[3]=re*z-ke*D,M[8]=G*D+Q*z,M[9]=X*D+he*z,M[10]=Z*D+oe*z,M[11]=re*D+ke*z,M},a.bJ=function(M,h){let b=J(M,360),D=J(h,360),z=D-b,G=D>b?z-360:z+360;return Math.abs(z)0?X:-X},a.bM=function(M,h){let b=J(M,2*Math.PI),D=J(h,2*Math.PI);return Math.min(Math.abs(b-D),Math.abs(b-D+2*Math.PI),Math.abs(b-D-2*Math.PI))},a.bN=function(){let M={},h=Ct.$version;for(let b in Ct.$root){let D=Ct.$root[b];if(D.required){let z=null;z=b==="version"?h:D.type==="array"?[]:{},z!=null&&(M[b]=z)}}return M},a.bO=bt,a.bP=Qe,a.bQ=function M(h,b){if(Array.isArray(h)){if(!Array.isArray(b)||h.length!==b.length)return!1;for(let D=0;DM.type==="raster",a.bV=ie,a.bW=function(M,h){if(!M)return[{command:"setStyle",args:[h]}];let b=[];try{if(!Mt(M.version,h.version))return[{command:"setStyle",args:[h]}];Mt(M.center,h.center)||b.push({command:"setCenter",args:[h.center]}),Mt(M.state,h.state)||b.push({command:"setGlobalState",args:[h.state]}),Mt(M.centerAltitude,h.centerAltitude)||b.push({command:"setCenterAltitude",args:[h.centerAltitude]}),Mt(M.zoom,h.zoom)||b.push({command:"setZoom",args:[h.zoom]}),Mt(M.bearing,h.bearing)||b.push({command:"setBearing",args:[h.bearing]}),Mt(M.pitch,h.pitch)||b.push({command:"setPitch",args:[h.pitch]}),Mt(M.roll,h.roll)||b.push({command:"setRoll",args:[h.roll]}),Mt(M.sprite,h.sprite)||b.push({command:"setSprite",args:[h.sprite]}),Mt(M.glyphs,h.glyphs)||b.push({command:"setGlyphs",args:[h.glyphs]}),Mt(M.transition,h.transition)||b.push({command:"setTransition",args:[h.transition]}),Mt(M.light,h.light)||b.push({command:"setLight",args:[h.light]}),Mt(M.terrain,h.terrain)||b.push({command:"setTerrain",args:[h.terrain]}),Mt(M.sky,h.sky)||b.push({command:"setSky",args:[h.sky]}),Mt(M.projection,h.projection)||b.push({command:"setProjection",args:[h.projection]});let D={},z=[];(function(X,Z,re,Q){let he;for(he in Z=Z||{},X=X||{})Object.prototype.hasOwnProperty.call(X,he)&&(Object.prototype.hasOwnProperty.call(Z,he)||kt(he,re,Q));for(he in Z)Object.prototype.hasOwnProperty.call(Z,he)&&(Object.prototype.hasOwnProperty.call(X,he)?Mt(X[he],Z[he])||(X[he].type==="geojson"&&Z[he].type==="geojson"&&pr(X,Z,he)?Lt(re,{command:"setGeoJSONSourceData",args:[he,Z[he].data]}):rr(he,Z,re,Q)):ft(he,Z,re))})(M.sources,h.sources,z,D);let G=[];M.layers&&M.layers.forEach((X=>{"source"in X&&D[X.source]?b.push({command:"removeLayer",args:[X.id]}):G.push(X)})),b=b.concat(z),(function(X,Z,re){Z=Z||[];let Q=(X=X||[]).map(Nr),he=Z.map(Nr),oe=X.reduce(dn,{}),ke=Z.reduce(dn,{}),ge=Q.slice(),Ue=Object.create(null),je,vt,gt,It,_t;for(let qt=0,tr=0;qt_?(z=Math.acos(G),X=Math.sin(z),Z=Math.sin((1-D)*z)/X,re=Math.sin(D*z)/X):(Z=1-D,re=D),M[0]=Z*Q+re*ge,M[1]=Z*he+re*Ue,M[2]=Z*oe+re*je,M[3]=Z*ke+re*vt,M},a.bm=function(M){let h=new Float64Array(9);var b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It,_t;oe=(z=(D=M)[0])*(re=z+z),ke=(G=D[1])*re,Ue=(X=D[2])*re,je=X*(Q=G+G),gt=(Z=D[3])*re,It=Z*Q,_t=Z*(he=X+X),(b=h)[0]=1-(ge=G*Q)-(vt=X*he),b[3]=ke-_t,b[6]=Ue+It,b[1]=ke+_t,b[4]=1-oe-vt,b[7]=je-gt,b[2]=Ue-It,b[5]=je+gt,b[8]=1-oe-ge;let qt=we(-Math.asin(ue(h[2],-1,1))),tr,lr;return Math.hypot(h[5],h[8])<.001?(tr=0,lr=-we(Math.atan2(h[3],h[4]))):(tr=we(h[5]===0&&h[8]===0?0:Math.atan2(h[5],h[8])),lr=we(h[1]===0&&h[0]===0?0:Math.atan2(h[1],h[0]))),{roll:tr,pitch:qt+90,bearing:lr}},a.bn=function(M,h){return M.roll==h.roll&&M.pitch==h.pitch&&M.bearing==h.bearing},a.bo=ii,a.bp=ca,a.bq=V_,a.br=c4,a.bs=U_,a.bt=ee,a.bu=ce,a.bv=oo,a.bw=function(M,h,b,D,z){return ee(D,z,ue((M-h)/(b-h),0,1))},a.bx=function(M,h,b,D){return M[0]=h[0]+b[0]*D,M[1]=h[1]+b[1]*D,M[2]=h[2]+b[2]*D,M},a.by=J,a.bz=function(){return new Float64Array(3)},a.c=tt,a.c$=vh,a.c0=class extends Ki{constructor(M,h){super(M,h),this.current=Ss}set(M){if(M[12]!==this.current[12]||M[0]!==this.current[0])return this.current=M,void this.gl.uniformMatrix4fv(this.location,!1,M);for(let h=1;h<16;h++)if(M[h]!==this.current[h]){this.current=M,this.gl.uniformMatrix4fv(this.location,!1,M);break}}},a.c1=Ia,a.c2=class extends Ki{constructor(M,h){super(M,h),this.current=[0,0,0]}set(M){M[0]===this.current[0]&&M[1]===this.current[1]&&M[2]===this.current[2]||(this.current=M,this.gl.uniform3f(this.location,M[0],M[1],M[2]))}},a.c3=class extends Ki{constructor(M,h){super(M,h),this.current=[0,0]}set(M){M[0]===this.current[0]&&M[1]===this.current[1]||(this.current=M,this.gl.uniform2f(this.location,M[0],M[1]))}},a.c4=C,a.c5=function(M,h){var b=Math.sin(h),D=Math.cos(h);return M[0]=D,M[1]=b,M[2]=0,M[3]=-b,M[4]=D,M[5]=0,M[6]=0,M[7]=0,M[8]=1,M},a.c6=function(M,h,b){var D=h[0],z=h[1],G=h[2];return M[0]=D*b[0]+z*b[3]+G*b[6],M[1]=D*b[1]+z*b[4]+G*b[7],M[2]=D*b[2]+z*b[5]+G*b[8],M},a.c7=function(M,h,b,D,z,G,X){var Z=1/(h-b),re=1/(D-z),Q=1/(G-X);return M[0]=-2*Z,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=-2*re,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=2*Q,M[11]=0,M[12]=(h+b)*Z,M[13]=(z+D)*re,M[14]=(X+G)*Q,M[15]=1,M},a.c8=class extends Ki{constructor(M,h){super(M,h),this.current=new Array}set(M){if(M!=this.current){this.current=M;let h=new Float32Array(4*M.length);for(let b=0;b25||D<0||D>=1||b<0||b>=1)},a.cE=function(M,h){return M[0]=h[0],M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=h[1],M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=h[2],M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M},a.cF=class extends pt{},a.cG=mt,a.cH=function(M,h){tt.REGISTERED_PROTOCOLS[M]=h},a.cI=function(M){delete tt.REGISTERED_PROTOCOLS[M]},a.cJ=function(M,h){let b={};for(let z=0;zei*Rc))}let Dn=re?"center":z.get("text-justify").evaluate(oe,{},M.canonical),Hn=z.get("symbol-placement")==="point"?z.get("text-max-width").evaluate(oe,{},M.canonical)*Rc:1/0,Ln=()=>{M.bucket.allowVerticalPlacement&&Zt(lr)&&(vt.vertical=zS(gt,M.glyphMap,M.glyphPositions,M.imagePositions,ke,Hn,Z,_n,"left",jr,_t,a.ax.vertical,!0,Ue,ge))};if(!re&&fn){let un=new Set;if(Dn==="auto")for(let ci=0;ciXit(Z,re,G)),D.layers[X])})(M,b,h),b.finish()},a.cT=function(M,h,b,D,z,G){let X=ate(M,h,b,z,0);return X=ate(X,h,D,G,1),X},a.cU=class{constructor(M){this.maxEntries=M,this.map=new Map}get(M){let h=this.map.get(M);return h!==void 0&&(this.map.delete(M),this.map.set(M,h)),h}set(M,h){if(this.map.has(M))this.map.delete(M);else if(this.map.size>=this.maxEntries){let b=this.map.keys().next().value;this.map.delete(b)}this.map.set(M,h)}clear(){this.map.clear()}},a.cV=CQ,a.cW=IS,a.cX=ete,a.cY=function(M,h,b,D,z){return i(this,void 0,void 0,(function*(){if(x())try{return yield Oe(M,h,b,D,z)}catch(G){}return(function(G,X,Z,re,Q){let he=G.width,oe=G.height;ze&&ct||(ze=new OffscreenCanvas(he,oe),ct=ze.getContext("2d",{willReadFrequently:!0})),ze.width=he,ze.height=oe,ct.drawImage(G,0,0,he,oe);let ke=ct.getImageData(X,Z,re,Q);return ct.clearRect(0,0,he,oe),ke.data})(M,h,b,D,z)}))},a.cZ=mQ,a.c_=class{constructor(M,h){this.layers={[b4]:this},this.name=b4,this.version=h?h.version:1,this.extent=h?h.extent:4096,this.length=M.length,this.features=M}feature(M){return new Yit(this.features[M],this.extent)}},a.ca=class extends Ar{},a.cb=jnt,a.cc=class extends zn{},a.cd=Xh,a.ce=function(M){return M<=1?1:Math.pow(2,Math.ceil(Math.log(M)/Math.LN2))},a.cf=Gv,a.cg=function(M,h,b){var D=h[0],z=h[1],G=h[2],X=b[3]*D+b[7]*z+b[11]*G+b[15];return M[0]=(b[0]*D+b[4]*z+b[8]*G+b[12])/(X=X||1),M[1]=(b[1]*D+b[5]*z+b[9]*G+b[13])/X,M[2]=(b[2]*D+b[6]*z+b[10]*G+b[14])/X,M},a.ch=class extends Ft{},a.ci=class extends d{},a.cj=function(M,h){return M[0]===h[0]&&M[1]===h[1]&&M[2]===h[2]&&M[3]===h[3]&&M[4]===h[4]&&M[5]===h[5]&&M[6]===h[6]&&M[7]===h[7]&&M[8]===h[8]&&M[9]===h[9]&&M[10]===h[10]&&M[11]===h[11]&&M[12]===h[12]&&M[13]===h[13]&&M[14]===h[14]&&M[15]===h[15]},a.ck=function(M,h){var b=M[0],D=M[1],z=M[2],G=M[3],X=M[4],Z=M[5],re=M[6],Q=M[7],he=M[8],oe=M[9],ke=M[10],ge=M[11],Ue=M[12],je=M[13],vt=M[14],gt=M[15],It=h[0],_t=h[1],qt=h[2],tr=h[3],lr=h[4],qr=h[5],jr=h[6],_n=h[7],fn=h[8],Dn=h[9],Hn=h[10],Ln=h[11],un=h[12],ei=h[13],ci=h[14],ti=h[15];return Math.abs(b-It)<=_*Math.max(1,Math.abs(b),Math.abs(It))&&Math.abs(D-_t)<=_*Math.max(1,Math.abs(D),Math.abs(_t))&&Math.abs(z-qt)<=_*Math.max(1,Math.abs(z),Math.abs(qt))&&Math.abs(G-tr)<=_*Math.max(1,Math.abs(G),Math.abs(tr))&&Math.abs(X-lr)<=_*Math.max(1,Math.abs(X),Math.abs(lr))&&Math.abs(Z-qr)<=_*Math.max(1,Math.abs(Z),Math.abs(qr))&&Math.abs(re-jr)<=_*Math.max(1,Math.abs(re),Math.abs(jr))&&Math.abs(Q-_n)<=_*Math.max(1,Math.abs(Q),Math.abs(_n))&&Math.abs(he-fn)<=_*Math.max(1,Math.abs(he),Math.abs(fn))&&Math.abs(oe-Dn)<=_*Math.max(1,Math.abs(oe),Math.abs(Dn))&&Math.abs(ke-Hn)<=_*Math.max(1,Math.abs(ke),Math.abs(Hn))&&Math.abs(ge-Ln)<=_*Math.max(1,Math.abs(ge),Math.abs(Ln))&&Math.abs(Ue-un)<=_*Math.max(1,Math.abs(Ue),Math.abs(un))&&Math.abs(je-ei)<=_*Math.max(1,Math.abs(je),Math.abs(ei))&&Math.abs(vt-ci)<=_*Math.max(1,Math.abs(vt),Math.abs(ci))&&Math.abs(gt-ti)<=_*Math.max(1,Math.abs(gt),Math.abs(ti))},a.cl=function(M,h){return M[0]=h[0],M[1]=h[1],M[2]=h[2],M[3]=h[3],M[4]=h[4],M[5]=h[5],M[6]=h[6],M[7]=h[7],M[8]=h[8],M[9]=h[9],M[10]=h[10],M[11]=h[11],M[12]=h[12],M[13]=h[13],M[14]=h[14],M[15]=h[15],M},a.cm=M=>M.type==="circle",a.cn=M=>M.type==="heatmap",a.co=M=>M.type==="line",a.cp=M=>M.type==="fill",a.cq=M=>M.type==="fill-extrusion",a.cr=M=>M.type==="hillshade",a.cs=M=>M.type==="color-relief",a.ct=M=>M.type==="background",a.cu=M=>M.type==="custom",a.cv=ye,a.cw=function(M,h,b){if(h<=0)return M;let D=1/h;return b===void 0||Math.abs(b)<1e-10?Math.round(M*D)/D:(b>0?Math.ceil(M*D-1e-9):Math.floor(M*D+1e-10))/D},a.cx=function(M,h,b){let D=V(h.x-b.x,h.y-b.y),z=V(M.x-b.x,M.y-b.y);var G,X;return we(Math.atan2(D[0]*z[1]-D[1]*z[0],(G=D)[0]*(X=z)[0]+G[1]*X[1]))},a.cy=xe,a.cz=function(M,h){var b;if(!Ke[h])return!1;let D=M==null?void 0:M.target,z=((b=D==null?void 0:D.ownerDocument)===null||b===void 0?void 0:b.defaultView)||window;return M instanceof z.MouseEvent||M instanceof z.WheelEvent},a.d=U,a.d0=class{constructor(M,h){let b=(h=this.options=Object.assign({},Rnt,h)).debug;if(b&&console.time("preprocess data"),h.maxZoom<0||h.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(h.promoteId&&h.generateId)throw new Error("promoteId and generateId cannot be used together.");let D=KR(M,h);b&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",h.indexMaxZoom,h.indexMaxPoints),console.time("generate tiles")),D=tI(D,h),h.updateable&&(this.source=D),this.initializeIndex(D,h)}initializeIndex(M,h){this.tileIndex=h.cluster?new Ent(h.clusterOptions):new Dnt(h),M.length&&this.tileIndex.initialize(M)}getTile(M,h,b){return h=+h,b=+b,(M=+M)<0||M>24?null:this.tileIndex.getTile(M,h,b)}updateData(M,h){let b=this.options;if(!b.updateable)throw new Error("to update tile geojson `updateable` option must be set to true");let{affected:D,source:z}=(function(G,X,Z){let re=(function(he,oe){var ke,ge;return he?{removeAll:he.removeAll,remove:new Set(he.remove||[]),add:new Map((ke=he.add)==null?void 0:ke.map((Ue=>[oe.promoteId?Ue.properties[oe.promoteId]:Ue.id,Ue]))),update:new Map((ge=he.update)==null?void 0:ge.map((Ue=>[Ue.id,Ue])))}:{remove:new Set,add:new Map,update:new Map}})(X,Z),Q=[];if(re.removeAll&&(Q=G,G=[]),re.remove.size||re.add.size){let he=[];for(let oe of G)(re.remove.has(oe.id)||re.add.has(oe.id))&&he.push(oe);if(he.length){Q.push(...he);let oe=new Set(he.map((ke=>ke.id)));G=G.filter((ke=>!oe.has(ke.id)))}if(re.add.size){let oe=KR({type:"FeatureCollection",features:Array.from(re.add.values())},Z);oe=tI(oe,Z),Q.push(...oe),G.push(...oe)}}if(re.update.size){let he=new Map,oe=[];for(let ke of G)re.update.has(ke.id)?he.set(ke.id,[...he.get(ke.id)||[],ke]):oe.push(ke);for(let[ke,ge]of re.update){let Ue=he.get(ke);if(!Ue||Ue.length===0)continue;let je=Snt(Ue,ge,Z);Q.push(...Ue,...je),oe.push(...je)}G=oe}return{affected:Q,source:G}})(this.source,M,b);h&&({affected:D,source:z}=this.filterUpdate(z,D,h)),D.length&&(this.source=z,this.tileIndex.updateIndex(z,D,b))}filterUpdate(M,h,b){let D=new Set;for(let z of M)z.id!=null&&(b(PS(z))||(h.push(z),D.add(z.id)));return{affected:h,source:M=M.filter((z=>!D.has(z.id)))}}getData(){if(!this.options.updateable)throw new Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map((M=>PS(M)))}}updateClusterOptions(M,h){let b=this.options.cluster;this.options.cluster=M,this.options.clusterOptions=h,b!=M?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(M){return this.tileIndex.getClusterExpansionZoom(M)}getClusterChildren(M){return this.tileIndex.getChildren(M)}getClusterLeaves(M,h,b){return this.tileIndex.getLeaves(M,h,b)}},a.d1=Bi,a.e=_e,a.f=jt,a.g=nt,a.h=M=>i(void 0,void 0,void 0,(function*(){if(M.byteLength===0)return createImageBitmap(new ImageData(1,1));let h=new Blob([new Uint8Array(M)],{type:"image/png"});try{return createImageBitmap(h)}catch(b){throw new Error(`Could not load image because of ${U(b).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),a.i=De,a.j=M=>new Promise(((h,b)=>{let D=new Image;D.onload=()=>{h(D),URL.revokeObjectURL(D.src),D.onload=null,window.requestAnimationFrame((()=>D.src=it))},D.onerror=()=>b(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let z=new Blob([new Uint8Array(M)],{type:"image/png"});D.src=M.byteLength?URL.createObjectURL(z):it})),a.k=(M,h)=>Yt(_e(M,{type:"json"}),h),a.l=Ot,a.m=Yt,a.n=fr,a.o=(M,h)=>Yt(_e(M,{type:"arrayBuffer"}),h),a.p=aee,a.q=function(M){return new IS(M).readFields(oit,[])},a.r=function(M){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(M))},a.s=et,a.t=Dc,a.u=ms,a.v=Bf,a.w=me,a.x=Ct,a.y=Ua,a.z=Xl})),r("worker",["./shared"],(function(a){"use strict";class i{constructor(A,T){this.keyCache={},A&&this.replace(A,T)}replace(A,T){this._layerConfigs={},this._layers={},this.update(A,[],T)}update(A,T,m){for(let E of A){this._layerConfigs[E.id]=E;let I=this._layers[E.id]=a.bT(E,m);I._featureFilter=a.ah(I.filter,m),this.keyCache[E.id]&&delete this.keyCache[E.id]}for(let E of T)delete this.keyCache[E],delete this._layerConfigs[E],delete this._layers[E];this.familiesBySource={};let F=a.cJ(Object.values(this._layerConfigs),this.keyCache);for(let E of F){let I=E.map((q=>this._layers[q.id])),R=I[0];if(R.isHidden())continue;let B=R.source||"",O=this.familiesBySource[B];O||(O=this.familiesBySource[B]={});let V=R.sourceLayer||a.ag,j=O[V];j||(j=O[V]=[]),j.push(I)}}}class o{constructor(A){let T={},m=[];for(let R in A){let B=A[R],O=T[R]={};for(let V in B){let j=B[+V];if(!j||j.bitmap.width===0||j.bitmap.height===0)continue;let q={x:0,y:0,w:j.bitmap.width+2,h:j.bitmap.height+2};m.push(q),O[V]={rect:q,metrics:j.metrics}}}let{w:F,h:E}=a.p(m),I=new a.t({width:F||1,height:E||1});for(let R in A){let B=A[R];for(let O in B){let V=B[+O];if(!V||V.bitmap.width===0||V.bitmap.height===0)continue;let j=T[R][O].rect;a.t.copy(V.bitmap,I,{x:0,y:0},{x:j.x+1,y:j.y+1},V.bitmap)}}this.image=I,this.positions=T}}a.cK("GlyphAtlas",o);class s{constructor(A){this.tileID=new a.a3(A.tileID.overscaledZ,A.tileID.wrap,A.tileID.canonical.z,A.tileID.canonical.x,A.tileID.canonical.y),this.uid=A.uid,this.zoom=A.zoom,this.pixelRatio=A.pixelRatio,this.tileSize=A.tileSize,this.source=A.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=A.showCollisionBoxes,this.collectResourceTiming=!!A.collectResourceTiming,this.returnDependencies=!!A.returnDependencies,this.promoteId=A.promoteId,this.inFlightDependencies=[]}parse(A,T,m,F,E){return a._(this,void 0,void 0,(function*(){this.status="parsing",this.data=A,this.collisionBoxArray=new a.ae;let I=new a.cL(Object.keys(A.layers).sort()),R=new a.cM(this.tileID,this.promoteId);R.bucketLayerIDs=[];let B={},O={featureIndex:R,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:m,subdivisionGranularity:E},V=T.familiesBySource[this.source];for(let ie in V){let le=A.layers[ie];if(!le)continue;le.version===1&&a.w(`Vector tile source "${this.source}" layer "${ie}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let me=I.encode(ie),be=[];for(let De=0;Deht.id))))}}let j=a.bY(O.glyphDependencies,(ie=>Object.keys(ie).map(Number)));for(let ie of this.inFlightDependencies)ie==null||ie.abort();this.inFlightDependencies=[];let q=Promise.resolve({});if(Object.keys(j).length){let ie=new AbortController;this.inFlightDependencies.push(ie),q=F.sendAsync({type:"GG",data:{stacks:j,source:this.source,tileID:this.tileID,type:"glyphs"}},ie)}let U=Object.keys(O.iconDependencies),J=Promise.resolve({});if(U.length){let ie=new AbortController;this.inFlightDependencies.push(ie),J=F.sendAsync({type:"GI",data:{icons:U,source:this.source,tileID:this.tileID,type:"icons"}},ie)}let ee=Object.keys(O.patternDependencies),ce=Promise.resolve({});if(ee.length){let ie=new AbortController;this.inFlightDependencies.push(ie),ce=F.sendAsync({type:"GI",data:{icons:ee,source:this.source,tileID:this.tileID,type:"patterns"}},ie)}let ye=O.dashDependencies,xe=Promise.resolve({});if(Object.keys(ye).length){let ie=new AbortController;this.inFlightDependencies.push(ie),xe=F.sendAsync({type:"GDA",data:{dashes:ye}},ie)}let[ue,K,_e,ne]=yield Promise.all([q,J,ce,xe]),ae=new o(ue),pe=new a.cN(K,_e);for(let ie in B){let le=B[ie];le instanceof a.af?(l(le.layers,this.zoom,m),a.cO({bucket:le,glyphMap:ue,glyphPositions:ae.positions,imageMap:K,imagePositions:pe.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:O.subdivisionGranularity})):le.hasDependencies&&(le instanceof a.cP||le instanceof a.cQ||le instanceof a.cR)&&(l(le.layers,this.zoom,m),le.addFeatures(O,this.tileID.canonical,pe.patternPositions,ne))}return this.status="done",{buckets:Object.values(B).filter((ie=>!ie.isEmpty())),featureIndex:R,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ae.image,imageAtlas:pe,dashPositions:ne,glyphMap:this.returnDependencies?ue:null,iconMap:this.returnDependencies?K:null,glyphPositions:this.returnDependencies?ae.positions:null}}))}}function l(w,A,T){let m=new a.J(A);for(let F of w)F.recalculate(m,T)}class u{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(A,T){this.loading[A]=T}finishLoading(A){delete this.loading[A]}abort(A){let T=this.loading[A];T!=null&&T.abort&&(T.abort.abort(),delete this.loading[A])}setParsing(A,T){this.parsing[A]=T}consumeParsing(A){let T=this.parsing[A];if(T)return delete this.parsing[A],T}clearParsing(A){delete this.parsing[A]}markLoaded(A,T){this.loaded[A]=T}getLoaded(A){let T=this.loaded[A];if(T)return T}removeLoaded(A){delete this.loaded[A]}clearLoaded(){this.loaded={}}}class c{constructor(A){this.start=`${A}#start`,this.end=`${A}#end`,this.measure=A,performance.mark(this.start)}finish(){performance.mark(this.end);let A=performance.getEntriesByName(this.measure);return A.length===0&&(performance.measure(this.measure,this.start,this.end),A=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),A}}class f{constructor(A,T,m,F,E){this.type=A,this.properties=m||{},this.extent=E,this.pointsArray=T,this.id=F}loadGeometry(){return this.pointsArray.map((A=>A.map((T=>new a.P(T.x,T.y)))))}}class v{constructor(A,T,m){this.version=2,this._myFeatures=A,this.name=T,this.length=A.length,this.extent=m}feature(A){return this._myFeatures[A]}}class g{constructor(){this.layers={}}addLayer(A){this.layers[A.name]=A}}function p(w){let A=a.cS(w);return A.byteOffset===0&&A.byteLength===A.buffer.byteLength||(A=new Uint8Array(A)),{vectorTile:w,rawData:A.buffer}}function x(w,A,T){let{extent:m}=w,F=Math.pow(2,T.z-A.z),E=(T.x-A.x*F)*m,I=(T.y-A.y*F)*m,R=[];for(let B=0;B0&&V.addLayer(ee)}let q=p(V);return this.overzoomedTileResultCache.set(B,q),q}reloadTile(A){return a._(this,void 0,void 0,(function*(){let T=A.uid,m=this.tileState.getLoaded(T);if(!m)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(m.showCollisionBoxes=A.showCollisionBoxes,m.status==="parsing"){let F=this.tileState.consumeParsing(T);return yield this._parseWorkerTile(m,A,F)}if(m.status==="done"&&m.vectorTile)return yield this._parseWorkerTile(m,A)}))}abortTile(A){return a._(this,void 0,void 0,(function*(){this.tileState.abort(A.uid)}))}removeTile(A){return a._(this,void 0,void 0,(function*(){this.tileState.removeLoaded(A.uid)}))}}class y{constructor(){this.loaded={}}loadTile(A){return a._(this,void 0,void 0,(function*(){let{uid:T,encoding:m,rawImageData:F,redFactor:E,greenFactor:I,blueFactor:R,baseShift:B}=A,O=F.width+2,V=F.height+2,j=a.b(F)?new a.R({width:O,height:V},yield a.cY(F,-1,-1,O,V)):F,q=new a.cZ(T,j,m,E,I,R,B);return this.loaded||(this.loaded={}),this.loaded[T]=q,q}))}removeTile(A){let T=this.loaded,m=A.uid;T!=null&&T[m]&&delete T[m]}}class C{constructor(A,T,m,F=k){this.actor=A,this.layerIndex=T,this.availableImages=m,this.tileState=new u,this._createGeoJSONIndex=F}loadVectorTile(A){if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let{z:T,x:m,y:F}=A.tileID.canonical,E=this._geoJSONIndex.getTile(T,m,F);return E?p(new a.c_(E.features,{version:2,extent:a.a6})):null}loadTile(A){return a._(this,void 0,void 0,(function*(){let{uid:T}=A,m=new s(A);m.abort=new AbortController;try{let F=this.loadVectorTile(A);if(!F)return null;let{vectorTile:E,rawData:I}=F;m.vectorTile=E,this.tileState.markLoaded(T,m);let R={rawData:I};this.tileState.setParsing(T,R);try{return yield this._parseWorkerTile(m,A,R)}finally{this.tileState.clearParsing(T)}}catch(F){throw m.status="done",this.tileState.markLoaded(T,m),F}}))}_reloadLoadedTile(A){return a._(this,void 0,void 0,(function*(){let T=A.uid,m=this.tileState.getLoaded(T);if(!m)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(m.showCollisionBoxes=A.showCollisionBoxes,m.status==="parsing"){let F=this.tileState.consumeParsing(T);return yield this._parseWorkerTile(m,A,F)}if(m.status==="done"&&m.vectorTile)return yield this._parseWorkerTile(m,A)}))}_parseWorkerTile(A,T,m){return a._(this,void 0,void 0,(function*(){let F=yield A.parse(A.vectorTile,this.layerIndex,this.availableImages,this.actor,T.subdivisionGranularity);if(m){let{rawData:E}=m;F=a.e({rawTileData:E.slice(0),encoding:"mvt"},F)}return F}))}abortTile(A){return a._(this,void 0,void 0,(function*(){this.tileState.abort(A.uid)}))}removeTile(A){return a._(this,void 0,void 0,(function*(){this.tileState.removeLoaded(A.uid)}))}loadData(A){return a._(this,void 0,void 0,(function*(){var T;(T=this._pendingRequest)===null||T===void 0||T.abort();let m=this._startRequestTiming(A);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(A,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let F={};return A.request&&(F.data=A.data),this._finishRequestTiming(m,A,F),F}catch(F){if(delete this._pendingRequest,!a.$(F))throw F;return{abandoned:!0}}}))}_startRequestTiming(A){var T;if(!((T=A.request)===null||T===void 0)&&T.collectResourceTiming)return new c(A.request.url)}_finishRequestTiming(A,T,m){let F=A==null?void 0:A.finish();F&&(m.resourceTiming={[T.source]:JSON.parse(JSON.stringify(F))})}reloadTile(A){return this.tileState.getLoaded(A.uid)?this._reloadLoadedTile(A):this.loadTile(A)}loadAndProcessGeoJSON(A,T){return a._(this,void 0,void 0,(function*(){var m;if(A.request&&(A.data=(yield a.k(A.request,T)).data),A.data)return A.data=this._filterGeoJSON(A.data,A.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(A.data,A));if(A.dataDiff)return(m=this._geoJSONIndex)!==null&&m!==void 0||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},A)),void this._geoJSONIndex.updateData(A.dataDiff,this._getFilterPredicate(A.filter));if(A.updateCluster&&this._geoJSONIndex.updateClusterOptions(A.geojsonVtOptions.cluster,S(A)),this._geoJSONIndex==null)throw new Error(`Input data given to '${A.source}' is not a valid GeoJSON object.`)}))}_filterGeoJSON(A,T){if(A.type!=="FeatureCollection")return A;let m=this._getFilterPredicate(T);return m?{type:"FeatureCollection",features:A.features.filter((F=>m(F)))}:A}_getFilterPredicate(A){if(typeof A!="boolean"&&!(A!=null&&A.length))return;let T=a.c$(A,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(T.result==="error")throw new Error(T.value.map((m=>`${m.key}: ${m.message}`)).join(", "));return m=>T.value.evaluate({zoom:0},m)}removeSource(A){return a._(this,void 0,void 0,(function*(){var T;(T=this._pendingRequest)===null||T===void 0||T.abort()}))}getClusterExpansionZoom(A){return this._geoJSONIndex.getClusterExpansionZoom(A.clusterId)}getClusterChildren(A){return this._geoJSONIndex.getClusterChildren(A.clusterId)}getClusterLeaves(A){return this._geoJSONIndex.getClusterLeaves(A.clusterId,A.limit,A.offset)}}function k(w,A){let T=a.e(A.geojsonVtOptions||{},{updateable:!0,clusterOptions:S(A)});return new a.d0(w,T)}function S({geojsonVtOptions:w,clusterProperties:A}){if(!A||!w.clusterOptions)return w.clusterOptions;let T={},m={},F={accumulated:null,zoom:0},E={properties:null},I=Object.keys(A);for(let R of I){let[B,O]=A[R],V=a.c$(O),j=a.c$(typeof B=="string"?[B,["accumulated"],["get",R]]:B);T[R]=V.value,m[R]=j.value}return w.clusterOptions.map=R=>{E.properties=R;let B={};for(let O of I)B[O]=T[O].evaluate(F,E);return B},w.clusterOptions.reduce=(R,B)=>{E.properties=B;for(let O of I)F.accumulated=R[O],R[O]=m[O].evaluate(F,E)},w.clusterOptions}class L{constructor(A){this.self=A,this.actor=new a.N(A),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(T,m)=>{if(this.externalWorkerSourceTypes[T])throw new Error(`Worker source with name "${T}" already registered.`);this.externalWorkerSourceTypes[T]=m},this.self.addProtocol=a.cH,this.self.removeProtocol=a.cI,this.self.registerRTLTextPlugin=T=>{a.d1.setMethods(T)},this.self.makeRequest=a.m,this.actor.registerMessageHandler("LDT",((T,m)=>this._getDEMWorkerSource(T,m.source).loadTile(m))),this.actor.registerMessageHandler("RDT",((T,m)=>a._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(T,m.source).removeTile(m)})))),this.actor.registerMessageHandler("GCEZ",((T,m)=>a._(this,void 0,void 0,(function*(){return this._getWorkerSource(T,m.type,m.source).getClusterExpansionZoom(m)})))),this.actor.registerMessageHandler("GCC",((T,m)=>a._(this,void 0,void 0,(function*(){return this._getWorkerSource(T,m.type,m.source).getClusterChildren(m)})))),this.actor.registerMessageHandler("GCL",((T,m)=>a._(this,void 0,void 0,(function*(){return this._getWorkerSource(T,m.type,m.source).getClusterLeaves(m)})))),this.actor.registerMessageHandler("LD",((T,m)=>this._getWorkerSource(T,m.type,m.source).loadData(m))),this.actor.registerMessageHandler("LT",((T,m)=>this._getWorkerSource(T,m.type,m.source).loadTile(m))),this.actor.registerMessageHandler("RT",((T,m)=>this._getWorkerSource(T,m.type,m.source).reloadTile(m))),this.actor.registerMessageHandler("AT",((T,m)=>this._getWorkerSource(T,m.type,m.source).abortTile(m))),this.actor.registerMessageHandler("RMT",((T,m)=>this._getWorkerSource(T,m.type,m.source).removeTile(m))),this.actor.registerMessageHandler("RS",((T,m)=>a._(this,void 0,void 0,(function*(){var F,E;if(!(!((E=(F=this.workerSources[T])===null||F===void 0?void 0:F[m.type])===null||E===void 0)&&E[m.source]))return;let I=this.workerSources[T][m.type][m.source];delete this.workerSources[T][m.type][m.source],I.removeSource!==void 0&&I.removeSource(m)})))),this.actor.registerMessageHandler("RM",(T=>a._(this,void 0,void 0,(function*(){delete this.layerIndexes[T],delete this.availableImages[T],delete this.workerSources[T],delete this.demWorkerSources[T],this.globalStates.delete(T)})))),this.actor.registerMessageHandler("SR",((T,m)=>a._(this,void 0,void 0,(function*(){this.referrer=m})))),this.actor.registerMessageHandler("SRPS",((T,m)=>this._syncRTLPluginState(T,m))),this.actor.registerMessageHandler("IS",((T,m)=>a._(this,void 0,void 0,(function*(){this.self.importScripts(m)})))),this.actor.registerMessageHandler("SI",((T,m)=>this._setImages(T,m))),this.actor.registerMessageHandler("UL",((T,m)=>a._(this,void 0,void 0,(function*(){this._getLayerIndex(T).update(m.layers,m.removedIds,this._getGlobalState(T))})))),this.actor.registerMessageHandler("UGS",((T,m)=>a._(this,void 0,void 0,(function*(){let F=this._getGlobalState(T);for(let E in m)F[E]=m[E]})))),this.actor.registerMessageHandler("SL",((T,m)=>a._(this,void 0,void 0,(function*(){this._getLayerIndex(T).replace(m,this._getGlobalState(T))}))))}_getGlobalState(A){let T=this.globalStates.get(A);return T||(T={},this.globalStates.set(A,T)),T}_setImages(A,T){return a._(this,void 0,void 0,(function*(){this.availableImages[A]=T;for(let m in this.workerSources[A]){let F=this.workerSources[A][m];for(let E in F)F[E].availableImages=T}}))}_syncRTLPluginState(A,T){return a._(this,void 0,void 0,(function*(){return yield a.d1.syncState(T,this.self.importScripts)}))}_getAvailableImages(A){let T=this.availableImages[A];return T||(T=[]),T}_getLayerIndex(A){let T=this.layerIndexes[A];return T||(T=this.layerIndexes[A]=new i),T}_getWorkerSource(A,T,m){var F,E;if((F=this.workerSources)[A]||(F[A]={}),(E=this.workerSources[A])[T]||(E[T]={}),!this.workerSources[A][T][m]){let I={sendAsync:(R,B)=>(R.targetMapId=A,this.actor.sendAsync(R,B))};switch(T){case"vector":this.workerSources[A][T][m]=new _(I,this._getLayerIndex(A),this._getAvailableImages(A));break;case"geojson":this.workerSources[A][T][m]=new C(I,this._getLayerIndex(A),this._getAvailableImages(A));break;default:this.workerSources[A][T][m]=new this.externalWorkerSourceTypes[T](I,this._getLayerIndex(A),this._getAvailableImages(A))}}return this.workerSources[A][T][m]}_getDEMWorkerSource(A,T){var m,F;return(m=this.demWorkerSources)[A]||(m[A]={}),(F=this.demWorkerSources[A])[T]||(F[T]=new y),this.demWorkerSources[A][T]}}return a.i(self)&&(self.worker=new L(self)),L})),r("index",["exports","./shared"],(function(a,i){"use strict";var o="5.24.0";function s(){var Y=new i.A(4);return i.A!=Float32Array&&(Y[1]=0,Y[2]=0),Y[0]=1,Y[3]=1,Y}let l,u,c,f={frame(Y,d,P,N){let H=N||window,$=H.requestAnimationFrame((de=>{se(),d(de)})),{unsubscribe:se}=i.s(Y.signal,"abort",(()=>{se(),H.cancelAnimationFrame($),P(new i.a(Y.signal.reason))}),!1)},frameAsync(Y,d){return new Promise(((P,N)=>{this.frame(Y,P,N,d)}))},getImageData(Y,d=0){return this.getImageCanvasContext(Y).getImageData(-d,-d,Y.width+2*d,Y.height+2*d)},getImageCanvasContext(Y){let d=window.document.createElement("canvas"),P=d.getContext("2d",{willReadFrequently:!0});if(!P)throw new Error("failed to create canvas 2d context");return d.width=Y.width,d.height=Y.height,P.drawImage(Y,0,0,Y.width,Y.height),P},resolveURL:Y=>(l||(l=document.createElement("a")),l.href=Y,l.href),hardwareConcurrency:typeof navigator!="undefined"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return c!==void 0?c:!!matchMedia&&(u!=null||(u=matchMedia("(prefers-reduced-motion: reduce)")),u.matches)},set prefersReducedMotion(Y){c=Y}},v=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt!==null?this._frozenAt:performance.now()}setNow(Y){this._frozenAt=Y}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};function g(){return v.getCurrentTime()}var p,x;class _{static create(d,P,N){let H=window.document.createElement(d);return P!==void 0&&(H.className=P),N&&N.appendChild(H),H}static createNS(d,P){return window.document.createElementNS(d,P)}static disableDrag(){_.docStyle&&_.selectProp&&(_.userSelect=_.docStyle[_.selectProp],_.docStyle[_.selectProp]="none")}static enableDrag(){_.docStyle&&_.selectProp&&(_.docStyle[_.selectProp]=_.userSelect)}static suppressClickInternal(d){d.preventDefault(),d.stopPropagation(),window.removeEventListener("click",_.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",_.suppressClickInternal,!0),window.setTimeout((()=>{window.removeEventListener("click",_.suppressClickInternal,!0)}),0)}static getScale(d){let P=d.getBoundingClientRect();return{x:P.width/d.offsetWidth||1,y:P.height/d.offsetHeight||1,boundingClientRect:P}}static getPoint(d,P,N){let H=P.boundingClientRect;return new i.P((N.clientX-H.left)/P.x-d.clientLeft,(N.clientY-H.top)/P.y-d.clientTop)}static mousePos(d,P){let N=_.getScale(d);return _.getPoint(d,N,P)}static touchPos(d,P){let N=[],H=_.getScale(d);for(let $ of P)N.push(_.getPoint(d,H,$));return N}static sanitize(d){let P=new DOMParser().parseFromString(d,"text/html").body||document.createElement("body"),N=P.querySelectorAll("script");for(let H of N)H.remove();return _.clean(P),P.innerHTML}static isPossiblyDangerous(d,P){let N=P.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(d)||!N.includes("javascript:")&&!N.includes("data:"))||!!d.startsWith("on")||void 0}static clean(d){let P=d.children;for(let N of P)_.removeAttributes(N),_.clean(N)}static removeAttributes(d){for(let{name:P,value:N}of d.attributes)_.isPossiblyDangerous(P,N)&&d.removeAttribute(P)}}_.docStyle=typeof window!="undefined"&&((p=window.document)===null||p===void 0?void 0:p.documentElement.style),_.selectProp=!_.docStyle||"userSelect"in _.docStyle?"userSelect":"webkitUserSelect",(function(Y){let d,P,N,H;Y.resetRequestQueue=()=>{d=[],P=0,N=0,H={}},Y.addThrottleControl=Ae=>{let Fe=N++;return H[Fe]=Ae,Fe},Y.removeThrottleControl=Ae=>{delete H[Ae],se()},Y.getImage=(Ae,Fe,Ie=!0)=>new Promise(((Ye,st)=>{Ae.headers||(Ae.headers={}),Ae.headers.accept="image/webp,*/*",i.e(Ae,{type:"image"}),d.push({abortController:Fe,requestParameters:Ae,supportImageRefresh:Ie,state:"queued",onError:dt=>{st(dt)},onSuccess:dt=>{Ye(dt)}}),se()}));let $=Ae=>i._(this,void 0,void 0,(function*(){Ae.state="running";let{requestParameters:Fe,supportImageRefresh:Ie,onError:Ye,onSuccess:st,abortController:dt}=Ae,Pe=Ie===!1&&!i.i(self)&&!i.g(Fe.url)&&(!Fe.headers||Object.keys(Fe.headers).reduce(((xt,Et)=>xt&&Et==="accept"),!0));P++;let Xe=Pe?de(Fe,dt):i.m(Fe,dt);try{let xt=yield Xe;delete Ae.abortController,Ae.state="completed",xt.data instanceof HTMLImageElement||i.b(xt.data)?st(xt):xt.data&&st({data:yield(at=xt.data,typeof createImageBitmap=="function"?i.h(at):i.j(at)),cacheControl:xt.cacheControl,expires:xt.expires})}catch(xt){delete Ae.abortController,Ye(i.d(xt))}finally{P--,se()}var at})),se=()=>{let Ae=(()=>{for(let Fe of Object.keys(H))if(H[Fe]())return!0;return!1})()?i.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:i.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let Fe=P;Fe0;Fe++){let Ie=d.shift();Ie.abortController.signal.aborted?Fe--:$(Ie)}},de=(Ae,Fe)=>new Promise(((Ie,Ye)=>{let st=new Image,dt=Ae.url,Pe=Ae.credentials;Pe&&Pe==="include"?st.crossOrigin="use-credentials":(Pe&&Pe==="same-origin"||!i.f(dt))&&(st.crossOrigin="anonymous"),Fe.signal.addEventListener("abort",(()=>{st.src="",Ye(new i.a(Fe.signal.reason))})),st.fetchPriority="high",st.onload=()=>{st.onerror=st.onload=null,Ie({data:st})},st.onerror=()=>{st.onerror=st.onload=null,Fe.signal.aborted||Ye(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},st.src=dt}))})(x||(x={})),x.resetRequestQueue();class y{constructor(d){this._transformRequestFn=d!=null?d:null}transformRequest(d,P){return this._transformRequestFn&&this._transformRequestFn(d,P)||{url:d}}setTransformRequest(d){this._transformRequestFn=d}}function C(Y){let d=[];if(typeof Y=="string")d.push({id:"default",url:Y});else if(Y&&Y.length>0){let P=[];for(let{id:N,url:H}of Y){let $=`${N}${H}`;P.includes($)||(P.push($),d.push({id:N,url:H}))}}return d}function k(Y,d,P){try{let N=new URL(Y);return N.pathname+=`${d}${P}`,N.toString()}catch(N){throw new Error(`Invalid sprite URL "${Y}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function S(Y){let{userImage:d}=Y;return!(!(d!=null&&d.render)||!d.render()||(Y.data.replace(new Uint8Array(d.data.buffer)),0))}class L extends i.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.R({width:1,height:1}),this.dirty=!0}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(let d of Object.keys(this.images))this.removeImage(d);this.patterns={},this.atlasImage=new i.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(d){if(this.loaded!==d&&(this.loaded=d,d)){for(let{ids:P,promiseResolve:N}of this.requestors)N(this._getImagesForIds(P));this.requestors=[]}}getImage(d){let P=this.images[d];if(P&&!P.data&&P.spriteData){let N=P.spriteData;P.data=new i.R({width:N.width,height:N.height},N.context.getImageData(N.x,N.y,N.width,N.height).data),P.spriteData=null}return P}addImage(d,P){if(this.images[d])throw new Error(`Image id ${d} already exist, use updateImage instead`);this._validate(d,P)&&(this.images[d]=P)}_validate(d,P){let N=!0,H=P.data||P.spriteData;return this._validateStretch(P.stretchX,H==null?void 0:H.width)||(this.fire(new i.l(new Error(`Image "${d}" has invalid "stretchX" value`))),N=!1),this._validateStretch(P.stretchY,H==null?void 0:H.height)||(this.fire(new i.l(new Error(`Image "${d}" has invalid "stretchY" value`))),N=!1),this._validateContent(P.content,P)||(this.fire(new i.l(new Error(`Image "${d}" has invalid "content" value`))),N=!1),N}_validateStretch(d,P){if(!d)return!0;let N=0;for(let H of d){if(H[0]=d[1]))}updateImage(d,P,N=!0){let H=this.getImage(d);if(N&&(H.data.width!==P.data.width||H.data.height!==P.data.height))throw new Error(`size mismatch between old image (${H.data.width}x${H.data.height}) and new image (${P.data.width}x${P.data.height}).`);P.version=H.version+1,this.images[d]=P,this.updatedImages[d]=!0}removeImage(d){var P;let N=this.images[d];delete this.images[d],delete this.patterns[d],!((P=N.userImage)===null||P===void 0)&&P.onRemove&&N.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(d){return new Promise(((P,N)=>{let H=!0;if(!this.isLoaded())for(let $ of d)this.images[$]||(H=!1);this.isLoaded()||H?P(this._getImagesForIds(d)):this.requestors.push({ids:d,promiseResolve:P})}))}_getImagesForIds(d){var P;let N={};for(let H of d){let $=this.getImage(H);$||(this.fire(new i.n("styleimagemissing",{id:H})),$=this.getImage(H)),$?N[H]={data:$.data.clone(),pixelRatio:$.pixelRatio,sdf:$.sdf,version:$.version,stretchX:$.stretchX,stretchY:$.stretchY,content:$.content,textFitWidth:$.textFitWidth,textFitHeight:$.textFitHeight,hasRenderCallback:!!(!((P=$.userImage)===null||P===void 0)&&P.render)}:i.w(`Image "${H}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return N}getPixelSize(){let{width:d,height:P}=this.atlasImage;return{width:d,height:P}}getPattern(d){let P=this.patterns[d],N=this.getImage(d);if(!N)return null;if(P&&P.position.version===N.version)return P.position;if(P)P.position.version=N.version;else{let H={w:N.data.width+2,h:N.data.height+2,x:0,y:0},$=new i.I(H,N);this.patterns[d]={bin:H,position:$}}return this._updatePatternAtlas(),this.patterns[d].position}bind(d){let P=d.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new i.T(d,this.atlasImage,P.RGBA),this.atlasTexture.bind(P.LINEAR,P.CLAMP_TO_EDGE)}_updatePatternAtlas(){let d=[];for(let $ in this.patterns)d.push(this.patterns[$].bin);let{w:P,h:N}=i.p(d),H=this.atlasImage;H.resize({width:P||1,height:N||1});for(let $ in this.patterns){let{bin:se}=this.patterns[$],de=se.x+1,Ae=se.y+1,Fe=this.getImage($).data,Ie=Fe.width,Ye=Fe.height;i.R.copy(Fe,H,{x:0,y:0},{x:de,y:Ae},{width:Ie,height:Ye}),i.R.copy(Fe,H,{x:0,y:Ye-1},{x:de,y:Ae-1},{width:Ie,height:1}),i.R.copy(Fe,H,{x:0,y:0},{x:de,y:Ae+Ye},{width:Ie,height:1}),i.R.copy(Fe,H,{x:Ie-1,y:0},{x:de-1,y:Ae},{width:1,height:Ye}),i.R.copy(Fe,H,{x:0,y:0},{x:de+Ie,y:Ae},{width:1,height:Ye})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(d){for(let P of d){if(this.callbackDispatchedThisFrame[P])continue;this.callbackDispatchedThisFrame[P]=!0;let N=this.getImage(P);N||i.w(`Image with ID: "${P}" was not found`),S(N)&&this.updateImage(P,N)}}cloneImages(){let d={};for(let P in this.images){let N=this.images[P];d[P]=Object.assign(Object.assign({},N),{data:N.data?N.data.clone():null})}return d}}let w=1e20,A=new Float64Array(256);for(let Y=0;Y<256;Y++){let d=.5-Math.pow(Y/255,.45454545454545453);A[Y]=d*Math.abs(d)}function T(Y,d,P,N,H,$,se,de,Ae){for(let Fe=d;Fe-1);Ae++,$[Ae]=de,se[Ae]=Fe,se[Ae+1]=w}for(let de=0,Ae=0;de/[-\w]+/.test(H)?H:`'${CSS.escape(H)}'`)).join(",");return new E.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:N,fontWeight:this._fontWeight(P[0]),fontStyle:this._fontStyle(P[0]),lang:this.lang})}_fontStyle(d){return/italic/i.test(d)?"italic":/oblique/i.test(d)?"oblique":"normal"}_fontWeight(d){let P={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},N;for(let[H,$]of Object.entries(P))new RegExp(`\\b${H}\\b`,"i").test(d)&&(N=`${$}`);return N}destroy(){for(let d in this.entries){let P=this.entries[d];P.tinySDF=null,P.ideographTinySDF=null,P.glyphs={},P.requests={},P.ranges={}}this.entries={}}}E.loadGlyphRange=function(Y,d,P,N){return i._(this,void 0,void 0,(function*(){let H=256*d,$=H+255,se=yield N.transformRequest(P.replace("{fontstack}",Y).replace("{range}",`${H}-${$}`),"Glyphs"),de=yield i.o(se,new AbortController);if(!(de!=null&&de.data))throw new Error(`Could not load glyph range. range: ${d}, ${H}-${$}`);let Ae={};for(let Fe of i.q(de.data))Ae[Fe.id]=Fe;return Ae}))},E.TinySDF=class{constructor({fontSize:Y=24,buffer:d=3,radius:P=8,cutoff:N=.25,fontFamily:H="sans-serif",fontWeight:$="normal",fontStyle:se="normal",lang:de=null}={}){this.buffer=d,this.radius=P,this.cutoff=N,this.lang=de;let Ae=this.size=Y+4*d,Fe=this._createCanvas(Ae),Ie=this.ctx=Fe.getContext("2d",{willReadFrequently:!0});Ie.font=`${se} ${$} ${Y}px ${H}`,Ie.textBaseline="alphabetic",Ie.textAlign="left",Ie.fillStyle="black",this.gridOuter=new Float64Array(Ae*Ae),this.gridInner=new Float64Array(Ae*Ae),this.f=new Float64Array(Ae),this.z=new Float64Array(Ae+1),this.v=new Uint16Array(Ae)}_createCanvas(Y){if(typeof OffscreenCanvas!="undefined")return new OffscreenCanvas(Y,Y);let d=document.createElement("canvas");return d.width=d.height=Y,d}draw(Y){let{width:d,actualBoundingBoxAscent:P,actualBoundingBoxDescent:N,actualBoundingBoxLeft:H,actualBoundingBoxRight:$}=this.ctx.measureText(Y),se=Math.ceil(P),de=Math.floor(H),Ae=Math.max(0,Math.min(this.size-this.buffer,Math.ceil($)-de)),Fe=Math.max(0,Math.min(this.size-this.buffer,se+Math.ceil(N))),Ie=Ae+2*this.buffer,Ye=Fe+2*this.buffer,st=Math.max(Ie*Ye,0),dt=new Uint8ClampedArray(st),Pe={data:dt,width:Ie,height:Ye,glyphWidth:Ae,glyphHeight:Fe,glyphTop:se,glyphLeft:de,glyphAdvance:d};if(Ae===0||Fe===0)return Pe;let{ctx:Xe,buffer:at,gridInner:xt,gridOuter:Et}=this;this.lang&&(Xe.lang=this.lang),Xe.clearRect(at,at,Ae,Fe),Xe.fillText(Y,at-de,at+se);let Bt=Xe.getImageData(at,at,Ae,Fe);Et.fill(w,0,st),xt.fill(0,0,st);let St=3;for(let Ht=0;Ht1&&(Ae=d[++de]);let Ie=Math.abs(Fe-Ae.left),Ye=Math.abs(Fe-Ae.right),st=Math.min(Ie,Ye),dt,Pe=$/N*(H+1);if(Ae.isDash){let Xe=H-Math.abs(Pe);dt=Math.sqrt(st*st+Xe*Xe)}else dt=H-Math.sqrt(st*st+Pe*Pe);this.data[se+Fe]=Math.max(0,Math.min(255,dt+128))}}}addRegularDash(d){for(let de=d.length-1;de>=0;--de){let Ae=d[de],Fe=d[de+1];Ae.zeroLength?d.splice(de,1):Fe&&Fe.isDash===Ae.isDash&&(Fe.left=Ae.left,d.splice(de,1))}let P=d[0],N=d[d.length-1];P.isDash===N.isDash&&(P.left=N.left-this.width,N.right=P.right+this.width);let H=this.width*this.nextRow,$=0,se=d[$];for(let de=0;de1&&(se=d[++$]);let Ae=Math.abs(de-se.left),Fe=Math.abs(de-se.right),Ie=Math.min(Ae,Fe);this.data[H+de]=Math.max(0,Math.min(255,(se.isDash?Ie:-Ie)+128))}}addDash(d,P){let N=P?7:0,H=2*N+1;if(this.nextRow+H>this.height)return i.w("LineAtlas out of space"),null;let $=0;for(let de of d)$+=de;if($!==0){let de=this.width/$,Ae=this.getDashRanges(d,this.width,de);P?this.addRoundDash(Ae,de,N):this.addRegularDash(Ae)}let se={y:this.nextRow+N,height:2*N,width:$};return this.nextRow+=H,this.dirty=!0,se}bind(d){let P=d.gl;this.texture?(P.bindTexture(P.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,P.texSubImage2D(P.TEXTURE_2D,0,0,0,this.width,this.height,P.ALPHA,P.UNSIGNED_BYTE,this.data))):(this.texture=P.createTexture(),P.bindTexture(P.TEXTURE_2D,this.texture),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,P.REPEAT),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,P.REPEAT),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MIN_FILTER,P.LINEAR),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MAG_FILTER,P.LINEAR),P.texImage2D(P.TEXTURE_2D,0,P.ALPHA,this.width,this.height,0,P.ALPHA,P.UNSIGNED_BYTE,this.data))}}let q="maplibre_preloaded_worker_pool";class U{constructor(){this.active={}}acquire(d){if(!this.workers)for(this.workers=[];this.workers.lengthi.m(d,P)))),ce}function K(Y,d){let P=i.O();return i.Q(P,P,[1,1,0]),i.S(P,P,[.5*Y.width,.5*Y.height,1]),Y.calculatePosMatrix?i.U(P,P,Y.calculatePosMatrix(d.toUnwrapped())):P}function _e(Y,d,P,N,H,$,se){var de;let Ae=(function(st,dt,Pe){if(st)for(let Xe of st){let at=dt[Xe];if((at==null?void 0:at.source)===Pe&&at.type==="fill-extrusion")return!0}else for(let Xe in dt){let at=dt[Xe];if(at.source===Pe&&at.type==="fill-extrusion")return!0}return!1})((de=H==null?void 0:H.layers)!==null&&de!==void 0?de:null,d,Y.id),Fe=$.maxPitchScaleFactor(),Ie=Y.tilesIn(N,Fe,Ae);Ie.sort(ne);let Ye=[];for(let st of Ie)Ye.push({wrappedTileID:st.tileID.wrapped().key,queryResults:st.tile.queryRenderedFeatures(d,P,Y.getState(),st.queryGeometry,st.cameraQueryGeometry,st.scale,H,$,Fe,K($,st.tileID),se?(dt,Pe)=>se(st.tileID,dt,Pe):void 0)});return(function(st,dt){for(let Pe in st)for(let Xe of st[Pe])ae(Xe,dt);return st})((function(st){let dt={},Pe={};for(let{queryResults:Xe,wrappedTileID:at}of st){Pe[at]||(Pe[at]={});let xt=Pe[at];for(let Et in Xe){let Bt=Xe[Et];xt[Et]||(xt[Et]={});let St=xt[Et];dt[Et]||(dt[Et]=[]);for(let Pt of Bt)St[Pt.featureIndex]||(St[Pt.featureIndex]=!0,dt[Et].push(Pt))}}return dt})(Ye),Y)}function ne(Y,d){let P=Y.tileID,N=d.tileID;return P.overscaledZ-N.overscaledZ||P.canonical.y-N.canonical.y||P.wrap-N.wrap||P.canonical.x-N.canonical.x}function ae(Y,d){let P=Y.feature,N=d.getFeatureState(P.layer["source-layer"],P.id);P.source=P.layer.source,P.layer["source-layer"]&&(P.sourceLayer=P.layer["source-layer"]),P.state=N}function pe(Y,d,P,N){return i._(this,void 0,void 0,(function*(){let H=Y;if(Y.url?H=(yield i.k(yield d.transformRequest(Y.url,"Source"),P)).data:yield f.frameAsync(P,N),!H)return null;let $=i.V(i.e(H,Y),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in H&&H.vector_layers&&($.vectorLayerIds=H.vector_layers.map((se=>se.id))),$}))}class ie{constructor(d,P){d&&(P?this.setSouthWest(d).setNorthEast(P):Array.isArray(d)&&(d.length===4?this.setSouthWest([d[0],d[1]]).setNorthEast([d[2],d[3]]):this.setSouthWest(d[0]).setNorthEast(d[1])))}setNorthEast(d){return this._ne=d instanceof i.W?new i.W(d.lng,d.lat):i.W.convert(d),this}setSouthWest(d){return this._sw=d instanceof i.W?new i.W(d.lng,d.lat):i.W.convert(d),this}extend(d){let P=this._sw,N=this._ne,H,$;if(d instanceof i.W)H=d,$=d;else{if(!(d instanceof ie))return Array.isArray(d)?d.length===4||d.every(Array.isArray)?this.extend(ie.convert(d)):this.extend(i.W.convert(d)):d&&("lng"in d||"lon"in d)&&"lat"in d?this.extend(i.W.convert(d)):this;if(H=d._sw,$=d._ne,!H||!$)return this}return P||N?(P.lng=Math.min(H.lng,P.lng),P.lat=Math.min(H.lat,P.lat),N.lng=Math.max($.lng,N.lng),N.lat=Math.max($.lat,N.lat)):(this._sw=new i.W(H.lng,H.lat),this._ne=new i.W($.lng,$.lat)),this}getCenter(){return new i.W((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new i.W(this.getWest(),this.getNorth())}getSouthEast(){return new i.W(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(d){let{lng:P,lat:N}=i.W.convert(d),H=this._sw.lng<=P&&P<=this._ne.lng;return this._sw.lng>this._ne.lng&&(H=this._sw.lng>=P&&P>=this._ne.lng),this._sw.lat<=N&&N<=this._ne.lat&&H}intersects(d){if(!((d=ie.convert(d)).getNorth()>=this.getSouth()&&d.getSouth()<=this.getNorth()))return!1;let P=Math.abs(this.getEast()-this.getWest()),N=Math.abs(d.getEast()-d.getWest());if(P>=360||N>=360)return!0;let H=i.X(this.getWest(),-180,180),$=i.X(this.getEast(),-180,180),se=i.X(d.getWest(),-180,180),de=i.X(d.getEast(),-180,180),Ae=H>$,Fe=se>de;return!(!Ae||!Fe)||(Ae?de>=H||se<=$:Fe?$>=se||H<=de:se<=$&&de>=H)}static convert(d){return d instanceof ie?d:d&&new ie(d)}static fromLngLat(d,P=0){let N=360*P/40075017,H=N/Math.cos(Math.PI/180*d.lat);return new ie(new i.W(d.lng-H,d.lat-N),new i.W(d.lng+H,d.lat+N))}adjustAntiMeridian(){let d=new i.W(this._sw.lng,this._sw.lat),P=new i.W(this._ne.lng,this._ne.lat);return new ie(d,d.lng>P.lng?new i.W(P.lng+360,P.lat):P)}}class le{constructor(d,P,N){this.bounds=ie.convert(this.validateBounds(d)),this.minzoom=P||0,this.maxzoom=N||24}validateBounds(d){return Array.isArray(d)&&d.length===4?[Math.max(-180,d[0]),Math.max(-90,d[1]),Math.min(180,d[2]),Math.min(90,d[3])]:[-180,-90,180,90]}contains(d){let P=Math.pow(2,d.z),N=Math.floor(i.Z(this.bounds.getWest())*P),H=Math.floor(i.Y(this.bounds.getNorth())*P),$=Math.ceil(i.Z(this.bounds.getEast())*P),se=Math.ceil(i.Y(this.bounds.getSouth())*P);return d.x>=N&&d.x<$&&d.y>=H&&d.y{this._options.tiles=d})),this}setUrl(d){return this.setSourceProperty((()=>{this.url=d,this._options.url=d})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return i.e({},this._options)}loadTile(d){return i._(this,void 0,void 0,(function*(){let P=d.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),N={request:yield this.map._requestManager.transformRequest(P,"Tile"),uid:d.uid,tileID:d.tileID,zoom:d.tileID.overscaledZ,tileSize:this.tileSize*d.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(d),etag:d.etag};N.request.collectResourceTiming=this._collectResourceTiming;let H="RT";if(d.actor&&d.state!=="expired"){if(d.state==="loading")return new Promise((($,se)=>{d.reloadPromise={resolve:$,reject:se}}))}else d.actor=this.dispatcher.getActor(),H="LT";d.abortController=new AbortController;try{let $=yield d.actor.sendAsync({type:H,data:N},d.abortController);if(delete d.abortController,d.aborted)return;this._afterTileLoadWorkerResponse(d,$);let se={};return $!=null&&$.etagUnmodified&&(se.unmodified=!0),se}catch($){if(delete d.abortController,d.aborted)return;if($&&$.status!==404)throw $;this._afterTileLoadWorkerResponse(d,null)}}))}_getOverzoomParameters(d){return i._(this,void 0,void 0,(function*(){if(d.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let P=d.tileID.scaledTo(this.maxzoom).canonical,N=P.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:P,overzoomRequest:yield this.map._requestManager.transformRequest(N,"Tile")}}))}_afterTileLoadWorkerResponse(d,P){if(P!=null&&P.resourceTiming&&(d.resourceTiming=P.resourceTiming),P&&this.map._refreshExpiredTiles&&d.setExpiryData(P),d.etag=P==null?void 0:P.etag,d.loadVectorData(P,this.map.painter),d.reloadPromise){let N=d.reloadPromise;d.reloadPromise=null,this.loadTile(d).then(N.resolve).catch(N.reject)}}abortTile(d){return i._(this,void 0,void 0,(function*(){d.abortController&&(d.abortController.abort(),delete d.abortController),d.actor&&(yield d.actor.sendAsync({type:"AT",data:{uid:d.uid,type:this.type,source:this.id}}))}))}unloadTile(d){return i._(this,void 0,void 0,(function*(){d.unloadVectorData(),d.actor&&(yield d.actor.sendAsync({type:"RMT",data:{uid:d.uid,type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class be extends i.E{constructor(d,P,N,H){super(),this.id=d,this.dispatcher=N,this.setEventedParent(H),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=i.e({type:"raster"},P),i.e(this,i.V(P,["url","scheme","tileSize"]))}load(){return i._(this,arguments,void 0,(function*(d=!1){this._loaded=!1,this.fire(new i.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let P=yield pe(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,P&&(i.e(this,P),P.bounds&&(this.tileBounds=new le(P.bounds,this.minzoom,this.maxzoom)),this.fire(new i.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new i.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:d})))}catch(P){this._tileJSONRequest=null,this._loaded=!0,i.$(P)||this.fire(new i.l(i.d(P)))}}))}loaded(){return this._loaded}onAdd(d){this.map=d,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(d){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),d(),this.load(!0)}setTiles(d){return this.setSourceProperty((()=>{this._options.tiles=d})),this}setUrl(d){return this.setSourceProperty((()=>{this.url=d,this._options.url=d})),this}serialize(){return i.e({},this._options)}hasTile(d){return!this.tileBounds||this.tileBounds.contains(d.canonical)}loadTile(d){return i._(this,void 0,void 0,(function*(){let P=d.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);d.abortController=new AbortController;try{let N=yield x.getImage(yield this.map._requestManager.transformRequest(P,"Tile"),d.abortController,this.map._refreshExpiredTiles);if(delete d.abortController,d.aborted)return void(d.state="unloaded");if(N!=null&&N.data){this.map._refreshExpiredTiles&&(N.cacheControl||N.expires)&&d.setExpiryData({cacheControl:N.cacheControl,expires:N.expires});let H=this.map.painter.context,$=H.gl,se=N.data;d.texture=this.map.painter.getTileTexture(se.width),d.texture?d.texture.update(se,{useMipmap:!0}):(d.texture=new i.T(H,se,$.RGBA,{useMipmap:!0}),d.texture.bind($.LINEAR,$.CLAMP_TO_EDGE,$.LINEAR_MIPMAP_NEAREST)),d.state="loaded"}}catch(N){if(delete d.abortController,d.aborted)d.state="unloaded";else if(N)throw d.state="errored",N}}))}abortTile(d){return i._(this,void 0,void 0,(function*(){d.abortController&&(d.abortController.abort(),delete d.abortController)}))}unloadTile(d){return i._(this,void 0,void 0,(function*(){d.texture&&this.map.painter.saveTileTexture(d.texture)}))}hasTransition(){return!1}}class De extends be{constructor(d,P,N,H){super(d,P,N,H),this.type="raster-dem",this.maxzoom=22,this._options=i.e({type:"raster-dem"},P),this.encoding=P.encoding||"mapbox",this.redFactor=P.redFactor,this.greenFactor=P.greenFactor,this.blueFactor=P.blueFactor,this.baseShift=P.baseShift}loadTile(d){return i._(this,void 0,void 0,(function*(){let P=d.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),N=yield this.map._requestManager.transformRequest(P,"Tile");d.neighboringTiles=this._getNeighboringTiles(d.tileID),d.abortController=new AbortController;try{let H=yield x.getImage(N,d.abortController,this.map._refreshExpiredTiles);if(delete d.abortController,d.aborted)return void(d.state="unloaded");if(H!=null&&H.data){let $=H.data;this.map._refreshExpiredTiles&&(H.cacheControl||H.expires)&&d.setExpiryData({cacheControl:H.cacheControl,expires:H.expires});let se=i.b($)&&i.a0()?$:yield this.readImageNow($),de={type:this.type,uid:d.uid,source:this.id,rawImageData:se,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(d.actor&&d.state!=="expired"&&d.state!=="reloading")return;d.actor&&d.state!=="expired"||(d.actor=this.dispatcher.getActor()),d.dem=yield d.actor.sendAsync({type:"LDT",data:de}),d.needsHillshadePrepare=!0,d.needsTerrainPrepare=!0,d.state="loaded"}}catch(H){if(delete d.abortController,d.aborted)d.state="unloaded";else if(H)throw d.state="errored",H}}))}readImageNow(d){return i._(this,void 0,void 0,(function*(){if(typeof VideoFrame!="undefined"&&i.a1()){let P=d.width+2,N=d.height+2;try{return new i.R({width:P,height:N},yield i.a2(d,-1,-1,P,N))}catch(H){}}return f.getImageData(d,1)}))}_getNeighboringTiles(d){let P=d.canonical,N=Math.pow(2,P.z),H=(P.x-1+N)%N,$=P.x===0?d.wrap-1:d.wrap,se=(P.x+1+N)%N,de=P.x+1===N?d.wrap+1:d.wrap,Ae={};return Ae[new i.a3(d.overscaledZ,$,P.z,H,P.y).key]={backfilled:!1},Ae[new i.a3(d.overscaledZ,de,P.z,se,P.y).key]={backfilled:!1},P.y>0&&(Ae[new i.a3(d.overscaledZ,$,P.z,H,P.y-1).key]={backfilled:!1},Ae[new i.a3(d.overscaledZ,d.wrap,P.z,P.x,P.y-1).key]={backfilled:!1},Ae[new i.a3(d.overscaledZ,de,P.z,se,P.y-1).key]={backfilled:!1}),P.y+1$.key===N));H>-1&&Y.addOrUpdateProperties.splice(H,1)}return(Y.removeAllProperties||d.removeAllProperties)&&(P.removeAllProperties=!0),(Y.removeProperties||d.removeProperties)&&(P.removeProperties=[...Y.removeProperties||[],...d.removeProperties||[]]),(Y.addOrUpdateProperties||d.addOrUpdateProperties)&&(P.addOrUpdateProperties=[...Y.addOrUpdateProperties||[],...d.addOrUpdateProperties||[]]),(Y.newGeometry||d.newGeometry)&&(P.newGeometry=d.newGeometry||Y.newGeometry),P}function it(Y){var d,P;if(!Y)return{};let N={};return N.removeAll=Y.removeAll,N.remove=new Set(Y.remove||[]),N.add=new Map((d=Y.add)===null||d===void 0?void 0:d.map((H=>[H.id,H]))),N.update=new Map((P=Y.update)===null||P===void 0?void 0:P.map((H=>[H.id,H]))),N}function Oe(Y){return Y&&Y.length!==0?typeof Y[0]=="number"?[Y]:Y.flatMap((d=>Oe(d))):[]}function ze(Y){return Y.type==="GeometryCollection"?Y.geometries.flatMap((d=>ze(d))):Oe(Y.coordinates)}function ct(Y){let d=new ie,P;switch(Y.type){case"FeatureCollection":P=Y.features.flatMap((N=>ze(N.geometry)));break;case"Feature":P=ze(Y.geometry);break;default:P=ze(Y)}if(P.length===0)return d;for(let N of P){let[H,$]=N;d.extend([H,$])}return d}class et extends i.E{constructor(d,P,N,H){super(),this.id=d,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:P.data},this.actor=N.getActor(),this.setEventedParent(H),this._data=typeof P.data=="string"?{url:P.data}:{geojson:P.data},this._options=i.e({},P),this._collectResourceTiming=P.collectResourceTiming,P.maxzoom!==void 0&&(this.maxzoom=P.maxzoom),P.type&&(this.type=P.type),P.attribution&&(this.attribution=P.attribution),this.promoteId=P.promoteId,P.clusterMaxZoom!==void 0&&this.maxzoom<=P.clusterMaxZoom&&i.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${P.clusterMaxZoom}".`),this.workerOptions=i.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(P.buffer!==void 0?P.buffer:128),tolerance:this._pixelsToTileUnits(P.tolerance!==void 0?P.tolerance:.375),extent:i.a6,maxZoom:this.maxzoom,lineMetrics:P.lineMetrics||!1,generateId:P.generateId||!1,promoteId:typeof P.promoteId=="string"?P.promoteId:void 0,cluster:P.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(P.clusterMaxZoom),minPoints:Math.max(2,P.clusterMinPoints||2),extent:i.a6,radius:this._pixelsToTileUnits(P.clusterRadius||50),log:!1,generateId:P.generateId||!1}},clusterProperties:P.clusterProperties,filter:P.filter},P.workerOptions)}_hasPendingWorkerUpdate(){return this._pendingWorkerUpdate.data!==void 0||this._pendingWorkerUpdate.diff!==void 0||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(d){return d*(i.a6/this.tileSize)}_getClusterMaxZoom(d){let P=d?Math.round(d):this.maxzoom-1;return Number.isInteger(d)||d===void 0||i.w(`Integer expected for option 'clusterMaxZoom': provided value "${d}" rounded to "${P}"`),P}load(){return i._(this,void 0,void 0,(function*(){yield this._updateWorkerData()}))}onAdd(d){this.map=d,this.load()}setData(d,P){this._data=typeof d=="string"?{url:d}:{geojson:d},this._pendingWorkerUpdate={data:d};let N=this._updateWorkerData();return P?N:this}updateData(d,P){this._pendingWorkerUpdate.diff=(function(H,$){if(!H)return $||{};if(!$)return H||{};let se=it(H),de=it($);(function(Fe,Ie){Ie.removeAll&&(Fe.add.clear(),Fe.update.clear(),Fe.remove.clear(),Ie.remove.clear());for(let Ye of Ie.remove)Fe.add.delete(Ye),Fe.update.delete(Ye);for(let[Ye,st]of Ie.update){let dt=Fe.update.get(Ye);dt&&(Ie.update.set(Ye,ht(dt,st)),Fe.update.delete(Ye))}})(se,de);let Ae={};if((se.removeAll||de.removeAll)&&(Ae.removeAll=!0),Ae.remove=new Set([...se.remove,...de.remove]),Ae.add=new Map([...se.add,...de.add]),Ae.update=new Map([...se.update,...de.update]),Ae.remove.size&&Ae.add.size)for(let Fe of Ae.add.keys())Ae.remove.delete(Fe);return(function(Fe){let Ie={};return Fe.removeAll&&(Ie.removeAll=Fe.removeAll),Fe.remove&&(Ie.remove=Array.from(Fe.remove)),Fe.add&&(Ie.add=Array.from(Fe.add.values())),Fe.update&&(Ie.update=Array.from(Fe.update.values())),Ie})(Ae)})(this._pendingWorkerUpdate.diff,d);let N=this._updateWorkerData();return P?N:this}getData(){return i._(this,void 0,void 0,(function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}}))}getBounds(){return i._(this,void 0,void 0,(function*(){return ct(yield this.getData())}))}setClusterOptions(d){return this.workerOptions.geojsonVtOptions.cluster=d.cluster,d.clusterRadius!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(d.clusterRadius)),d.clusterMaxZoom!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(d.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(d){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:d,source:this.id}})}getClusterChildren(d){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:d,source:this.id}})}getClusterLeaves(d,P,N){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:d,limit:P,offset:N}})}_updateWorkerData(){return i._(this,void 0,void 0,(function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void i.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:d,diff:P,updateCluster:N}=this._pendingWorkerUpdate,H=this._getLoadGeoJSONParameters(d,P,N);d!==void 0?this._pendingWorkerUpdate.data=void 0:P?this._pendingWorkerUpdate.diff=void 0:N&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(H)}))}_getLoadGeoJSONParameters(d,P,N){return i._(this,void 0,void 0,(function*(){let H=i.e({type:this.type},this.workerOptions);return typeof d=="string"?(H.request=yield this.map._requestManager.transformRequest(f.resolveURL(d),"Source"),H.request.collectResourceTiming=this._collectResourceTiming,H):d!==void 0?(H.data=d,H):P?(H.dataDiff=P,H):N?(H.updateCluster=!0,H):void 0}))}_dispatchWorkerUpdate(d){return i._(this,void 0,void 0,(function*(){this._isUpdatingWorker=!0,this.fire(new i.n("dataloading",{dataType:"source"}));try{let P=yield d,N=yield this.actor.sendAsync({type:"LD",data:P});if(this._isUpdatingWorker=!1,this._removed||N.abandoned)return void this.fire(new i.n("dataabort",{dataType:"source"}));N.data&&(this._data={geojson:N.data});let H=this._applyDiffToSource(P.dataDiff),$=this._getShouldReloadTileOptions(H),se={dataType:"source"};this._applyResourceTiming(se,N),this.fire(new i.n("data",Object.assign(Object.assign({},se),{sourceDataType:"metadata"}))),this.fire(new i.n("data",Object.assign(Object.assign({},se),{sourceDataType:"content",shouldReloadTileOptions:$})))}catch(P){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new i.n("dataabort",{dataType:"source"}));this.fire(new i.l(i.d(P)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}}))}_applyResourceTiming(d,P){var N;if(!this._collectResourceTiming)return;let H=(N=P.resourceTiming)===null||N===void 0?void 0:N[this.id];if(!H)return;let $=H.slice(0);$!=null&&$.length&&i.e(d,{resourceTiming:$})}_applyDiffToSource(d){if(!d)return;let P=typeof this.promoteId=="string"?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let H=(function($,se){let de=new Map;if($==null||$.type==null)return de;if($.type==="Feature"){let Ae=Ge($,se);return Ae==null?void 0:(de.set(Ae,$),de)}if($.type==="FeatureCollection"){let Ae=new Set;for(let Fe of $.features){let Ie=Ge(Fe,se);if(Ie==null||Ae.has(Ie))return;Ae.add(Ie),de.set(Ie,Fe)}return de}})(this._data.geojson,P);if(!H)throw new Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:H}}if(!this._data.updateable)return;let N=(function(H,$,se){var de,Ae;let Fe=[];if($.removeAll)H.clear();else if($.remove)for(let Ie of $.remove){let Ye=H.get(Ie);Ye&&(Fe.push(Ye.geometry),H.delete(Ie))}if($.add)for(let Ie of $.add){let Ye=Ge(Ie,se);if(Ye==null)continue;let st=H.get(Ye);st&&Fe.push(st.geometry),Fe.push(Ie.geometry),H.set(Ye,Ie)}if($.update)for(let Ie of $.update){let Ye=H.get(Ie.id);if(!Ye)continue;let st=!!Ie.newGeometry,dt=Ie.removeAllProperties||((de=Ie.removeProperties)===null||de===void 0?void 0:de.length)>0||((Ae=Ie.addOrUpdateProperties)===null||Ae===void 0?void 0:Ae.length)>0;if(!st&&!dt)continue;Fe.push(Ye.geometry);let Pe=Object.assign({},Ye);if(H.set(Ie.id,Pe),st&&(Fe.push(Ie.newGeometry),Pe.geometry=Ie.newGeometry),dt){if(Pe.properties=Ie.removeAllProperties?{}:Object.assign({},Pe.properties||{}),Ie.removeProperties)for(let Xe of Ie.removeProperties)delete Pe.properties[Xe];if(Ie.addOrUpdateProperties)for(let{key:Xe,value:at}of Ie.addOrUpdateProperties)Pe.properties[Xe]=at}}return Fe})(this._data.updateable,d,P);return d.removeAll||this._options.cluster?void 0:N}_getShouldReloadTileOptions(d){if(d)return{affectedBounds:d.filter(Boolean).map((P=>ct(P)))}}shouldReloadTile(d,{affectedBounds:P}){if(d.state==="loading")return!0;if(d.state==="unloaded")return!1;let{buffer:N,extent:H}=this.workerOptions.geojsonVtOptions,$=(function({x:se,y:de,z:Ae},Fe=0){let Ie=i.a4((se-Fe)/Math.pow(2,Ae)),Ye=i.a5((de+1+Fe)/Math.pow(2,Ae)),st=i.a4((se+1+Fe)/Math.pow(2,Ae)),dt=i.a5((de-Fe)/Math.pow(2,Ae));return new ie([Ie,Ye],[st,dt])})(d.tileID.canonical,N/H);for(let se of P)if($.intersects(se))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(d){return i._(this,void 0,void 0,(function*(){let P=d.actor?"RT":"LT";d.actor=this.actor;let N={type:this.type,uid:d.uid,tileID:d.tileID,zoom:d.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};d.abortController=new AbortController;let H=yield this.actor.sendAsync({type:P,data:N},d.abortController);delete d.abortController,d.unloadVectorData(),d.aborted||d.loadVectorData(H,this.map.painter,P==="RT")}))}abortTile(d){return i._(this,void 0,void 0,(function*(){d.abortController&&(d.abortController.abort(),delete d.abortController),d.aborted=!0}))}unloadTile(d){return i._(this,void 0,void 0,(function*(){d.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:d.uid,type:this.type,source:this.id}})}))}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return i.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class qe extends i.E{constructor(d,P,N,H){super(),this.flippedWindingOrder=!1,this.id=d,this.dispatcher=N,this.coordinates=P.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(H),this.options=P}load(d){return i._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new i.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let P=yield x.getImage(yield this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,P!=null&&P.data&&(this.image=P.data,d&&(this.coordinates=d),this._finishLoading())}catch(P){this._request=null,this._loaded=!0,i.$(P)||this.fire(new i.l(i.d(P)))}}))}loaded(){return this._loaded}updateImage(d){return d.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=d.url,this.load(d.coordinates).finally((()=>this.texture=null)),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(d){this.map=d,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(d){this.coordinates=d;let P=d.map(i.a7.fromLngLat);var N;return this.tileID=(function(H){let $=i.a8.fromPoints(H),se=$.width(),de=$.height(),Ae=Math.max(se,de),Fe=Math.max(0,Math.floor(-Math.log(Ae)/Math.LN2)),Ie=Math.pow(2,Fe);return new i.aa(Fe,Math.floor(($.minX+$.maxX)/2*Ie),Math.floor(($.minY+$.maxY)/2*Ie))})(P),this.terrainTileRanges=this._getOverlappingTileRanges(P),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=P.map((H=>this.tileID.getTilePoint(H)._round())),this.flippedWindingOrder=((N=this.tileCoords)[1].x-N[0].x)*(N[2].y-N[0].y)-(N[1].y-N[0].y)*(N[2].x-N[0].x)<0,this.fire(new i.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let d=this.map.painter.context,P=d.gl;this.texture||(this.texture=new i.T(d,this.image,P.RGBA),this.texture.bind(P.LINEAR,P.CLAMP_TO_EDGE));let N=!1;for(let H in this.tiles){let $=this.tiles[H];$.state!=="loaded"&&($.state="loaded",$.texture=this.texture,N=!0)}N&&this.fire(new i.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(d){return i._(this,void 0,void 0,(function*(){var P;!((P=this.tileID)===null||P===void 0)&&P.equals(d.tileID.canonical)?(this.tiles[String(d.tileID.wrap)]=d,d.buckets={}):d.state="errored"}))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(d){let{minX:P,minY:N,maxX:H,maxY:$}=i.a8.fromPoints(d),se={};for(let de=0;de<=i.a9;de++){let Ae=Math.pow(2,de),Fe=Math.floor(P*Ae),Ie=Math.floor(N*Ae),Ye=Math.floor(H*Ae),st=Math.floor($*Ae),dt=(Fe%Ae+Ae)%Ae,Pe=Ye%Ae,Xe=Math.floor(Fe/Ae),at=Math.floor(Ye/Ae);se[de]={minWrap:Xe,maxWrap:at,minTileXWrapped:dt,maxTileXWrapped:Pe,minTileY:Ie,maxTileY:st}}return se}}class we extends qe{constructor(d,P,N,H){super(d,P,N,H),this._onPlayingHandler=()=>{var $;($=this.map)===null||$===void 0||$.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=P}load(){return i._(this,void 0,void 0,(function*(){this._loaded=!1;let d=this.options;this.urls=[];for(let P of d.urls)this.urls.push((yield this.map._requestManager.transformRequest(P,"Source")).url);try{let P=yield i.ab(this.urls);if(this._loaded=!0,!P)return;this.video=P,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(P){this.fire(new i.l(i.d(P)))}}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(d){if(this.video){let P=this.video.seekable;dP.end(0)?this.fire(new i.l(new i.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${P.start(0)} and ${P.end(0)}-second mark.`))):this.video.currentTime=d}}getVideo(){return this.video}onAdd(d){this.map||(this.map=d,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let d=this.map.painter.context,P=d.gl;this.texture?this.video.paused||(this.texture.bind(P.LINEAR,P.CLAMP_TO_EDGE),P.texSubImage2D(P.TEXTURE_2D,0,0,0,P.RGBA,P.UNSIGNED_BYTE,this.video)):(this.texture=new i.T(d,this.video,P.RGBA),this.texture.bind(P.LINEAR,P.CLAMP_TO_EDGE));let N=!1;for(let H in this.tiles){let $=this.tiles[H];$.state!=="loaded"&&($.state="loaded",$.texture=this.texture,N=!0)}N&&this.fire(new i.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Le extends qe{constructor(d,P,N,H){super(d,P,N,H),P.coordinates?Array.isArray(P.coordinates)&&P.coordinates.length===4&&!P.coordinates.some(($=>!Array.isArray($)||$.length!==2||$.some((se=>typeof se!="number"))))||this.fire(new i.l(new i.ac(`sources.${d}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.l(new i.ac(`sources.${d}`,null,'missing required property "coordinates"'))),P.animate&&typeof P.animate!="boolean"&&this.fire(new i.l(new i.ac(`sources.${d}`,null,'optional "animate" property must be a boolean value'))),P.canvas?typeof P.canvas=="string"||P.canvas instanceof HTMLCanvasElement||this.fire(new i.l(new i.ac(`sources.${d}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new i.l(new i.ac(`sources.${d}`,null,'missing required property "canvas"'))),this.options=P,this.animate=P.animate===void 0||P.animate}load(){return i._(this,void 0,void 0,(function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new i.l(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}))}getCanvas(){return this.canvas}onAdd(d){this.map=d,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let d=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,d=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,d=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let P=this.map.painter.context,N=P.gl;this.texture?(d||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new i.T(P,this.canvas,N.RGBA,{premultiply:!0}),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let H=!1;for(let $ in this.tiles){let se=this.tiles[$];se.state!=="loaded"&&(se.state="loaded",se.texture=this.texture,H=!0)}H&&this.fire(new i.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let d of[this.canvas.width,this.canvas.height])if(isNaN(d)||d<=0)return!0;return!1}}let Ke={},Te=Y=>{switch(Y){case"geojson":return et;case"image":return qe;case"raster":return be;case"raster-dem":return De;case"vector":return me;case"video":return we;case"canvas":return Le}return Ke[Y]},Ve="RTLPluginLoaded";class $e extends i.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=ue()}_syncState(d){return this.status=d,this.dispatcher.broadcast("SRPS",{pluginStatus:d,pluginURL:this.url}).catch((P=>{throw this.status="error",P}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(d){return i._(this,arguments,void 0,(function*(P,N=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=f.resolveURL(P),!this.url)throw new Error(`requested url ${P} is invalid`);if(this.status==="unavailable"){if(!N)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()}))}_requestImport(){return i._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new i.n(Ve))}))}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let ot=null;function tt(){return ot||(ot=new $e),ot}var nt,We;(function(Y){Y[Y.Base=0]="Base",Y[Y.Parent=1]="Parent"})(nt||(nt={})),(function(Y){Y[Y.Departing=0]="Departing",Y[Y.Incoming=1]="Incoming"})(We||(We={}));class mt{constructor(d,P){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=d,this.uid=i.ad(),this.uses=0,this.tileSize=P,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(d){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(d||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:d,fadingDirection:P,fadingParentID:N,fadeEndTime:H}){this.resetFadeLogic(),this.fadingRole=d,this.fadingDirection=P,this.fadingParentID=N,this.fadeEndTime=H}setSelfFadeLogic(d){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=d}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=g(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(d){this.demTexture&&d.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(d,P,N){if((d==null?void 0:d.etagUnmodified)!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",d){d.featureIndex&&(this.latestFeatureIndex=d.featureIndex,d.rawTileData?(this.latestRawTileData=d.rawTileData,this.latestEncoding=d.encoding,this.latestFeatureIndex.rawTileData=d.rawTileData,this.latestFeatureIndex.encoding=d.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=d.collisionBoxArray,this.buckets=(function(H,$){let se={};if(!$)return se;for(let de of H){let Ae=de.layerIds.map((Fe=>$.getLayer(Fe))).filter(Boolean);if(Ae.length!==0){de.layers=Ae,de.stateDependentLayerIds&&(de.stateDependentLayers=de.stateDependentLayerIds.map((Fe=>Ae.filter((Ie=>Ie.id===Fe))[0])));for(let Fe of Ae)se[Fe.id]=de}}return se})(d.buckets,P==null?void 0:P.style),this.hasSymbolBuckets=!1;for(let H in this.buckets){let $=this.buckets[H];if($ instanceof i.af){if(this.hasSymbolBuckets=!0,!N)break;$.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let H in this.buckets){let $=this.buckets[H];if($ instanceof i.af&&$.hasRTLText){this.hasRTLText=!0,tt().lazyLoad();break}}this.queryPadding=0;for(let H in this.buckets){let $=this.buckets[H];this.queryPadding=Math.max(this.queryPadding,P.style.getLayer(H).queryRadius($))}d.imageAtlas&&(this.imageAtlas=d.imageAtlas),d.glyphAtlasImage&&(this.glyphAtlasImage=d.glyphAtlasImage),this.dashPositions=d.dashPositions}else this.collisionBoxArray=new i.ae;else this.state="loaded"}unloadVectorData(){for(let d in this.buckets)this.buckets[d].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(d){return this.buckets[d.id]}upload(d){for(let N in this.buckets){let H=this.buckets[N];H.uploadPending()&&H.upload(d)}let P=d.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new i.T(d,this.imageAtlas.image,P.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new i.T(d,this.glyphAtlasImage,P.ALPHA),this.glyphAtlasImage=null)}prepare(d){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(d,this.imageAtlasTexture)}queryRenderedFeatures(d,P,N,H,$,se,de,Ae,Fe,Ie,Ye){var st;return!((st=this.latestFeatureIndex)===null||st===void 0)&&st.rawTileData?this.latestFeatureIndex.query({queryGeometry:H,cameraQueryGeometry:$,scale:se,tileSize:this.tileSize,pixelPosMatrix:Ie,transform:Ae,params:de,queryPadding:this.queryPadding*Fe,getElevation:Ye},d,P,N):{}}querySourceFeatures(d,P){let N=this.latestFeatureIndex;if(!(N!=null&&N.rawTileData))return;let H=N.loadVTLayers(),$=P!=null&&P.sourceLayer?P.sourceLayer:"",se=H[i.ag]||H[$];if(!se)return;let de=i.ah(P==null?void 0:P.filter,P==null?void 0:P.globalState),{z:Ae,x:Fe,y:Ie}=this.tileID.canonical,Ye={z:Ae,x:Fe,y:Ie};for(let st=0;stN)H=!1;else if(P)if(this.expirationTime({zoom:0,x:0,y:0,wrap:Pt,fullyVisible:!1}),Bt=[],St=[];if(Y.renderWorldCopies&&se.allowWorldCopies())for(let Pt=1;Pt<=3;Pt++)Bt.push(Et(-Pt)),Bt.push(Et(Pt));for(Bt.push(Et(0));Bt.length>0;){let Pt=Bt.pop(),$t=Pt.x,Ht=Pt.y,dr=Pt.fullyVisible,Xr={x:$t,y:Ht,z:Pt.zoom},Or=se.getTileBoundingVolume(Xr,Pt.wrap,Y.elevation,d);if(!dr){let Rr=Ct(P,Or,N);if(Rr===0)continue;dr=Rr===2}let $r=se.distanceToTile2d(H.x,H.y,Xr,Or),Er=Ae;de&&(Er=(d.calculateTileZoom||Mt)(Y.zoom+i.ar(Y.tileSize/d.tileSize),$r,at,xt,Y.fov)),Er=(d.roundZoom?Math.round:Math.floor)(Er),Er=Math.max(0,Er);let Tr=Math.min(Er,Ie);if(Pt.wrap=se.getWrap($,Xr,Pt.wrap),Pt.zoom>=Tr){if(Pt.zoom>1),wrap:Pt.wrap,fullyVisible:dr})}return St.sort(((Pt,$t)=>Pt.distanceSq-$t.distanceSq)).map((Pt=>Pt.tileID))}let kt=i.a8.fromPoints([new i.P(0,0),new i.P(i.a6,i.a6)]);function rr(Y){return Y==="raster"||Y==="image"||Y==="video"}function pr(Y,d,P,N,H,$,se){if(!d.hasData())return!1;let{tileID:de,fadingRole:Ae,fadingDirection:Fe,fadingParentID:Ie}=d;if(Ae===nt.Base&&Fe===We.Incoming&&Ie)return P[Ie.key]=Ie,!0;let Ye=Math.max(de.overscaledZ-H,$);for(let st=de.overscaledZ-1;st>=Ye;st--){let dt=de.scaledTo(st),Pe=Y.getLoadedTile(dt);if(Pe)return d.setCrossFadeLogic({fadingRole:nt.Base,fadingDirection:We.Incoming,fadingParentID:Pe.tileID,fadeEndTime:N+se}),Pe.setCrossFadeLogic({fadingRole:nt.Parent,fadingDirection:We.Departing,fadeEndTime:N+se}),P[dt.key]=dt,!0}return!1}function Kr(Y,d,P,N,H,$){if(!d.hasData())return!1;let se=d.tileID.children(H),de=Nr(Y,d,se,P,N,H,$);if(de)return!0;for(let Ae of se)Nr(Y,d,Ae.children(H),P,N,H,$)&&(de=!0);return de}function Nr(Y,d,P,N,H,$,se){if(P[0].overscaledZ>=$)return!1;let de=!1;for(let Ae of P){let Fe=Y.getLoadedTile(Ae);if(!Fe)continue;let{fadingRole:Ie,fadingDirection:Ye,fadingParentID:st}=Fe;Ie===nt.Base&&Ye===We.Departing&&st||(Fe.setCrossFadeLogic({fadingRole:nt.Base,fadingDirection:We.Departing,fadingParentID:d.tileID,fadeEndTime:H+se}),d.setCrossFadeLogic({fadingRole:nt.Parent,fadingDirection:We.Incoming,fadeEndTime:H+se})),N[Ae.key]=Ae,de=!0}return de}function dn(Y,d,P,N){let H=Y.tileID;return!!Y.selfFading||!Y.hasData()&&!!d.has(H)&&(Y.setSelfFadeLogic(P+N),!0)}function xr(Y,d){var P;Y.needsHillshadePrepare=!0,Y.needsTerrainPrepare=!0;let N=d.tileID.canonical.x-Y.tileID.canonical.x,H=d.tileID.canonical.y-Y.tileID.canonical.y,$=Math.pow(2,Y.tileID.canonical.z),se=d.tileID.key;N===0&&H===0||Math.abs(H)>1||(Math.abs(N)>1&&(Math.abs(N+$)===1?N+=$:Math.abs(N-$)===1&&(N-=$)),d.dem&&Y.dem&&(Y.dem.backfillBorder(d.dem,N,H),!((P=Y.neighboringTiles)===null||P===void 0)&&P[se]&&(Y.neighboringTiles[se].backfilled=!0)))}class Fr{constructor(){this._tiles={}}handleWrapJump(d){let P={};for(let N in this._tiles){let H=this._tiles[N];H.tileID=H.tileID.unwrapTo(H.tileID.wrap+d),P[H.tileID.key]=H}this._tiles=P}setFeatureState(d,P){for(let N in this._tiles)this._tiles[N].setFeatureState(d,P)}getAllTiles(){return Object.values(this._tiles)}getAllIds(d=!1){return d?Object.values(this._tiles).map((P=>P.tileID)).sort(i.au).map((P=>P.key)):Object.keys(this._tiles)}getTileById(d){return this._tiles[d]}setTile(d,P){this._tiles[d]=P}deleteTileById(d){delete this._tiles[d]}getLoadedTile(d){let P=this.getTileById(d.key);return P!=null&&P.hasData()?P:null}isIdRenderable(d,P=!1){var N;return(N=this.getTileById(d))===null||N===void 0?void 0:N.isRenderable(P)}getRenderableIds(d=0,P){let N=[];for(let H of this.getAllIds())this.isIdRenderable(H,P)&&N.push(this.getTileById(H));return P?N.sort(((H,$)=>{let se=H.tileID,de=$.tileID,Ae=new i.P(se.canonical.x,se.canonical.y)._rotate(-d),Fe=new i.P(de.canonical.x,de.canonical.y)._rotate(-d);return se.overscaledZ-de.overscaledZ||Fe.y-Ae.y||Fe.x-Ae.x})).map((H=>H.tileID.key)):N.map((H=>H.tileID)).sort(i.au).map((H=>H.key))}}class Zr extends i.E{constructor(d,P,N){super(),this.id=d,this.dispatcher=N,this.on("data",(H=>{this._dataHandler(H)})),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=((H,$,se,de)=>{let Ae=new(Te($.type))(H,$,se,de);if(Ae.id!==H)throw new Error(`Expected Source id to be ${H} instead of ${Ae.id}`);return Ae})(d,P,N,this),this._inViewTiles=new Fr,this._outOfViewCache=new i.av(0,(H=>this._unloadTile(H))),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new bt,this._didEmitContent=!1,this._updated=!1}onAdd(d){var P;this.map=d,this._maxTileCacheSize=d?d._maxTileCacheSize:null,this._maxTileCacheZoomLevels=d?d._maxTileCacheZoomLevels:null,!((P=this._source)===null||P===void 0)&&P.onAdd&&this._source.onAdd(d)}onRemove(d){var P;for(let N of this._inViewTiles.getAllTiles())N.unloadVectorData();this.clearTiles(),!((P=this._source)===null||P===void 0)&&P.onRemove&&this._source.onRemove(d),this._inViewTiles=new Fr}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let d of this._inViewTiles.getAllTiles())if(d.state!=="loaded"&&d.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let d=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,d&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(d,P,N){return i._(this,void 0,void 0,(function*(){try{let H=yield this._source.loadTile(d);this._tileLoaded(d,P,N,H)}catch(H){d.state="errored",H.status!==404?this._source.fire(new i.l(i.d(H),{tile:d})):this.update(this.transform,this.terrain)}}))}_unloadTile(d){this._source.unloadTile&&this._source.unloadTile(d)}_abortTile(d){this._source.abortTile&&this._source.abortTile(d),this._source.fire(new i.n("dataabort",{tile:d,coord:d.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(d){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let P of this._inViewTiles.getAllTiles())P.upload(d),P.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(d){var P;return this._inViewTiles.getRenderableIds((P=this.transform)===null||P===void 0?void 0:P.bearingInRadians,d)}hasRenderableParent(d){let P=d.overscaledZ-1;if(P>=this._source.minzoom){let N=this.getLoadedTile(d.scaledTo(P));if(N)return this._inViewTiles.isIdRenderable(N.tileID.key)}return!1}reload(d,P=void 0){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(let N of this._inViewTiles.getAllIds()){let H=this._inViewTiles.getTileById(N);P&&!this._source.shouldReloadTile(H,P)||(d?this._reloadTile(N,"expired"):H.state!=="errored"&&this._reloadTile(N,"reloading"))}}}_reloadTile(d,P){return i._(this,void 0,void 0,(function*(){let N=this._inViewTiles.getTileById(d);N&&(N.state!=="loading"&&(N.state=P),yield this._loadTile(N,d,P))}))}_tileLoaded(d,P,N,H){d.timeAdded=g(),d.selfFading&&(d.fadeEndTime=d.timeAdded+this._rasterFadeDuration),N==="expired"&&(d.refreshedUponExpiration=!0),this._setTileReloadTimer(P,d),H!=null&&H.unmodified||(this.getSource().type==="raster-dem"&&d.dem&&(function($,se){var de,Ae,Fe;let Ie=se.getRenderableIds();for(let Ye of Ie){if(!(!((de=$.neighboringTiles)===null||de===void 0)&&de[Ye]))continue;let st=se.getTileById(Ye);$.neighboringTiles[Ye].backfilled||xr($,st),!((Fe=(Ae=st.neighboringTiles)===null||Ae===void 0?void 0:Ae[$.tileID.key])===null||Fe===void 0)&&Fe.backfilled||xr(st,$)}})(d,this._inViewTiles),this._state.initializeTileState(d,this.map?this.map.painter:null),d.aborted||this._source.fire(new i.n("data",{dataType:"source",tile:d,coord:d.tileID})))}getTile(d){return this.getTileByID(d.key)}getTileByID(d){return this._inViewTiles.getTileById(d)}_retainLoadedChildren(d,P){let N=this._getLoadedDescendents(P),H=new Set;for(let $ of P){let se=N[$.key];if(!(se!=null&&se.length)){H.add($);continue}let de=$.overscaledZ+Zr.maxOverzooming,Ae=se.filter((Ye=>Ye.tileID.overscaledZ<=de));if(!Ae.length){H.add($);continue}let Fe=Math.min(...Ae.map((Ye=>Ye.tileID.overscaledZ))),Ie=Ae.filter((Ye=>Ye.tileID.overscaledZ===Fe)).map((Ye=>Ye.tileID));for(let Ye of Ie)d[Ye.key]=Ye;this._areDescendentsComplete(Ie,Fe,$.overscaledZ)||H.add($)}return H}_getLoadedDescendents(d){var P;let N={};for(let H of this._inViewTiles.getAllTiles().filter(($=>$.hasData())))for(let $ of d)H.tileID.isChildOf($)&&(N[P=$.key]||(N[P]=[]),N[$.key].push(H));return N}_areDescendentsComplete(d,P,N){return d.length===1&&d[0].isOverscaled()?d[0].overscaledZ===P:Math.pow(4,P-N)===d.length}getLoadedTile(d){return this._inViewTiles.getLoadedTile(d)}updateCacheSize(d){let P=Math.ceil(d.width/this._source.tileSize)+1,N=Math.ceil(d.height/this._source.tileSize)+1,H=Math.floor(P*N*(this._maxTileCacheZoomLevels===null?i.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),$=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,H):H;this._outOfViewCache.setMaxSize($)}handleWrapJump(d){let P=Math.round((d-(this._prevLng===void 0?d:this._prevLng))/360);this._prevLng=d,P&&(this._inViewTiles.handleWrapJump(P),this._resetTileReloadTimers())}update(d,P){if(!this._sourceLoaded||this._paused)return;let N;this.transform=d,this.terrain=P,this.updateCacheSize(d),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?N=d.getVisibleUnwrappedCoordinates(this._source.tileID).map((Ae=>new i.a3(Ae.canonical.z,Ae.wrap,Ae.canonical.z,Ae.canonical.x,Ae.canonical.y))):(N=ft(d,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?d.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:P,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(N=N.filter((Ae=>this._source.hasTile(Ae))))):N=[],this.usedForTerrain&&(N=this._addTerrainIdealTiles(N));let H=N.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,H&&this.fire(new i.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let $=Lt(d,this._source),se=this._updateRetainedTiles(N,$),de=rr(this._source.type);de&&this._rasterFadeDuration>0&&!P&&(function(Ae,Fe,Ie,Ye,st,dt,Pe){let Xe=g(),at=i.at(Fe);for(let xt of Fe){let Et=Ae.getTileById(xt.key);Et.fadingDirection!==We.Departing&&Et.fadeOpacity!==0||Et.resetFadeLogic(),pr(Ae,Et,Ie,Xe,Ye,st,Pe)||Kr(Ae,Et,Ie,Xe,dt,Pe)||dn(Et,at,Xe,Pe)||Et.resetFadeLogic()}})(this._inViewTiles,N,se,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),de?this._cleanUpRasterTiles(se):this._cleanUpVectorTiles(se)}_cleanUpRasterTiles(d){for(let P of this._inViewTiles.getAllIds())d[P]||this._removeTile(P)}_cleanUpVectorTiles(d){for(let P of this._inViewTiles.getAllIds()){let N=this._inViewTiles.getTileById(P);d[P]?N.clearSymbolFadeHold():N.hasSymbolBuckets?N.holdingForSymbolFade()?N.symbolFadeFinished()&&this._removeTile(P):N.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(P)}}_addTerrainIdealTiles(d){let P=[];for(let N of d)if(N.canonical.z>this._source.minzoom){let H=N.scaledTo(N.canonical.z-1);P.push(H);let $=N.scaledTo(Math.max(this._source.minzoom,Math.min(N.canonical.z,5)));P.push($)}return d.concat(P)}releaseSymbolFadeTiles(){for(let d of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(d).holdingForSymbolFade()&&this._removeTile(d)}_updateRetainedTiles(d,P){var N;let H=new Set;for(let Fe of d)this._addTile(Fe).hasData()||H.add(Fe);let $=d.reduce(((Fe,Ie)=>(Fe[Ie.key]=Ie,Fe)),{}),se=this._retainLoadedChildren($,H),de={},Ae=Math.max(P-Zr.maxUnderzooming,this._source.minzoom);for(let Fe of se){let Ie=this._inViewTiles.getTileById(Fe.key),Ye=Ie==null?void 0:Ie.wasRequested();for(let st=Fe.overscaledZ-1;st>=Ae;--st){let dt=Fe.scaledTo(st);if(de[dt.key])break;if(de[dt.key]=!0,Ie=this.getTile(dt),!Ie&&Ye&&(Ie=this._addTile(dt)),Ie){let Pe=Ie.hasData();if((Pe||!(!((N=this.map)===null||N===void 0)&&N.cancelPendingTileRequestsWhileZooming)||Ye)&&($[dt.key]=dt),Ye=Ie.wasRequested(),Pe)break}}}return $}_addTile(d){let P=this._inViewTiles.getTileById(d.key);if(P)return P;P=this._outOfViewCache.getAndRemove(d),P&&(P.resetFadeLogic(),this._setTileReloadTimer(d.key,P),P.tileID=d,this._state.initializeTileState(P,this.map?this.map.painter:null));let N=P;return P||(P=new mt(d,this._source.tileSize*d.overscaleFactor()),this._loadTile(P,d.key,P.state)),P.uses++,this._inViewTiles.setTile(d.key,P),N||this._source.fire(new i.n("dataloading",{tile:P,coord:P.tileID,dataType:"source"})),P}_setTileReloadTimer(d,P){this._clearTileReloadTimer(d);let N=P.getExpiryTimeout();N&&(this._timers[d]=setTimeout((()=>{this._reloadTile(d,"expired"),delete this._timers[d]}),N))}_clearTileReloadTimer(d){let P=this._timers[d];P&&(clearTimeout(P),delete this._timers[d])}_resetTileReloadTimers(){for(let d in this._timers)clearTimeout(this._timers[d]),delete this._timers[d];for(let d of this._inViewTiles.getAllIds()){let P=this._inViewTiles.getTileById(d);this._setTileReloadTimer(d,P)}}refreshTiles(d){for(let P of this._inViewTiles.getAllIds()){let N=this._inViewTiles.getTileById(P);(this._inViewTiles.isIdRenderable(P)||N.state=="errored")&&d.some((H=>H.equals(N.tileID.canonical)))&&this._reloadTile(P,"expired")}}_removeTile(d){let P=this._inViewTiles.getTileById(d);P&&(P.uses--,this._inViewTiles.deleteTileById(d),this._clearTileReloadTimer(d),P.uses>0||(P.hasData()&&P.state!=="reloading"?this._outOfViewCache.add(P.tileID,P,P.getExpiryTimeout()):(P.aborted=!0,this._abortTile(P),this._unloadTile(P))))}_dataHandler(d){d.dataType==="source"&&(d.sourceDataType!=="metadata"?d.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(d.sourceDataChanged,d.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let d of this._inViewTiles.getAllIds())this._removeTile(d);this._outOfViewCache.reset()}tilesIn(d,P,N){let H=[],$=this.transform;if(!$)return H;let se=$.getCoveringTilesDetailsProvider().allowWorldCopies(),de=N?$.getCameraQueryGeometry(d):d,Ae=dt=>$.screenPointToMercatorCoordinate(dt,this.terrain),Fe=this.transformBbox(d,Ae,!se),Ie=this.transformBbox(de,Ae,!se),Ye=this.getIds(),st=i.a8.fromPoints(Ie);for(let dt of Ye){let Pe=this._inViewTiles.getTileById(dt);if(Pe.holdingForSymbolFade())continue;let Xe=se?[Pe.tileID]:[Pe.tileID.unwrapTo(-1),Pe.tileID.unwrapTo(0)],at=Math.pow(2,$.zoom-Pe.tileID.overscaledZ),xt=P*Pe.queryPadding*i.a6/Pe.tileSize/at;for(let Et of Xe){let Bt=st.map((St=>Et.getTilePoint(new i.a7(St.x,St.y))));if(Bt.expandBy(xt),Bt.intersects(kt)){let St=Fe.map(($t=>Et.getTilePoint($t))),Pt=Ie.map(($t=>Et.getTilePoint($t)));H.push({tile:Pe,tileID:se?Et:Et.unwrapTo(0),queryGeometry:St,cameraQueryGeometry:Pt,scale:at})}}}return H}transformBbox(d,P,N){let H=d.map(P);if(N){let $=i.a8.fromPoints(d);$.shrinkBy(.001*Math.min($.width(),$.height()));let se=$.map(P);i.a8.fromPoints(H).covers(se)||(H=H.map((de=>de.x>.5?new i.a7(de.x-1,de.y,de.z):de)))}return H}getVisibleCoordinates(d){let P=this.getRenderableIds(d).map((N=>this._inViewTiles.getTileById(N).tileID));return this.transform&&this.transform.populateCache(P),P}hasTransition(){return!!this._source.hasTransition()||rr(this._source.type)&&(function(d,P){if(P<=0)return!1;let N=g();for(let H of d.getAllTiles())if(H.fadeEndTime>=N)return!0;return!1})(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(d){this._rasterFadeDuration=d}setFeatureState(d,P,N){d||(d=i.ag),this._state.updateState(d,P,N)}removeFeatureState(d,P,N){d||(d=i.ag),this._state.removeFeatureState(d,P,N)}getFeatureState(d,P){return d||(d=i.ag),this._state.getState(d,P)}setDependencies(d,P,N){let H=this._inViewTiles.getTileById(d);H&&H.setDependencies(P,N)}reloadTilesForDependencies(d,P){for(let N of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(N).hasDependency(d,P)&&this._reloadTile(N,"reloading");this._outOfViewCache.filter((N=>!N.hasDependency(d,P)))}areTilesLoaded(){for(let d of this._inViewTiles.getAllTiles())if(d.state!=="loaded"&&d.state!=="errored")return!1;return!0}}Zr.maxUnderzooming=10,Zr.maxOverzooming=3;class Cn{constructor(d,P){this.reset(d,P)}reset(d,P){this.points=d||[],this._distances=[0];for(let N=1;N0?(H-se)/de:0;return this.points[$].mult(1-Ae).add(this.points[P].mult(Ae))}}function Dt(Y,d){let P=!0;return Y==="always"||Y!=="never"&&d!=="never"||(P=!1),P}class At{constructor(d,P,N){let H=this.boxCells=[],$=this.circleCells=[];this.xCellCount=Math.ceil(d/N),this.yCellCount=Math.ceil(P/N);for(let se=0;sethis.width||H<0||P>this.height)return[];let Ae=[];if(d<=0&&P<=0&&this.width<=N&&this.height<=H){if($)return[{key:null,x1:d,y1:P,x2:N,y2:H}];for(let Fe=0;Fe0}hitTestCircle(d,P,N,H,$){let se=d-N,de=d+N,Ae=P-N,Fe=P+N;if(de<0||se>this.width||Fe<0||Ae>this.height)return!1;let Ie=[];return this._forEachCell(se,Ae,de,Fe,this._queryCellCircle,Ie,{hitTest:!0,overlapMode:H,circle:{x:d,y:P,radius:N},seenUids:{box:{},circle:{}}},$),Ie.length>0}_queryCell(d,P,N,H,$,se,de,Ae){let{seenUids:Fe,hitTest:Ie,overlapMode:Ye}=de,st=this.boxCells[$],dt=1e-6;if(st!==null){let Xe=this.bboxes;for(let at of st)if(!Fe.box[at]){Fe.box[at]=!0;let xt=4*at,Et=this.boxKeys[at];if(d<=Xe[xt+2]+dt&&P<=Xe[xt+3]+dt&&N>=Xe[xt+0]-dt&&H>=Xe[xt+1]-dt&&(!Ae||Ae(Et))&&(!Ie||!Dt(Ye,Et.overlapMode))&&(se.push({key:Et,x1:Xe[xt],y1:Xe[xt+1],x2:Xe[xt+2],y2:Xe[xt+3]}),Ie))return!0}}let Pe=this.circleCells[$];if(Pe!==null){let Xe=this.circles;for(let at of Pe)if(!Fe.circle[at]){Fe.circle[at]=!0;let xt=3*at,Et=this.circleKeys[at];if(this._circleAndRectCollide(Xe[xt],Xe[xt+1],Xe[xt+2],d,P,N,H)&&(!Ae||Ae(Et))&&(!Ie||!Dt(Ye,Et.overlapMode))){let Bt=Xe[xt],St=Xe[xt+1],Pt=Xe[xt+2];if(se.push({key:Et,x1:Bt-Pt,y1:St-Pt,x2:Bt+Pt,y2:St+Pt}),Ie)return!0}}}return!1}_queryCellCircle(d,P,N,H,$,se,de,Ae){let{circle:Fe,seenUids:Ie,overlapMode:Ye}=de,st=this.boxCells[$];if(st!==null){let Pe=this.bboxes;for(let Xe of st)if(!Ie.box[Xe]){Ie.box[Xe]=!0;let at=4*Xe,xt=this.boxKeys[Xe];if(this._circleAndRectCollide(Fe.x,Fe.y,Fe.radius,Pe[at+0],Pe[at+1],Pe[at+2],Pe[at+3])&&(!Ae||Ae(xt))&&!Dt(Ye,xt.overlapMode))return se.push(!0),!0}}let dt=this.circleCells[$];if(dt!==null){let Pe=this.circles;for(let Xe of dt)if(!Ie.circle[Xe]){Ie.circle[Xe]=!0;let at=3*Xe,xt=this.circleKeys[Xe];if(this._circlesCollide(Pe[at],Pe[at+1],Pe[at+2],Fe.x,Fe.y,Fe.radius)&&(!Ae||Ae(xt))&&!Dt(Ye,xt.overlapMode))return se.push(!0),!0}}}_forEachCell(d,P,N,H,$,se,de,Ae){let Fe=this._convertToXCellCoord(d),Ie=this._convertToYCellCoord(P),Ye=this._convertToXCellCoord(N),st=this._convertToYCellCoord(H);for(let dt=Fe;dt<=Ye;dt++)for(let Pe=Ie;Pe<=st;Pe++)if($.call(this,d,P,N,H,this.xCellCount*Pe+dt,se,de,Ae))return}_convertToXCellCoord(d){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(d*this.xScale)))}_convertToYCellCoord(d){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(d*this.yScale)))}_circlesCollide(d,P,N,H,$,se){let de=H-d,Ae=$-P,Fe=N+se;return Fe*Fe>de*de+Ae*Ae}_circleAndRectCollide(d,P,N,H,$,se,de){let Ae=(se-H)/2,Fe=Math.abs(d-(H+Ae));if(Fe>Ae+N)return!1;let Ie=(de-$)/2,Ye=Math.abs(P-($+Ie));if(Ye>Ie+N)return!1;if(Fe<=Ae||Ye<=Ie)return!0;let st=Fe-Ae,dt=Ye-Ie;return st*st+dt*dt<=N*N}}function Vt(Y,d){let P=1/(d[0]*d[0]+d[1]*d[1]+d[2]*d[2]),N=1/(d[8]*d[8]+d[9]*d[9]+d[10]*d[10]),H=d[0]*P,$=d[4]*P,se=d[8]*N,de=d[1]*P,Ae=d[5]*P,Fe=d[9]*N,Ie=d[2]*P,Ye=d[6]*P,st=d[10]*N;Y[0]=H,Y[1]=$,Y[2]=se,Y[4]=de,Y[5]=Ae,Y[6]=Fe,Y[8]=Ie,Y[9]=Ye,Y[10]=st;let dt=d[12],Pe=d[13],Xe=d[14];return Y[12]=-H*dt-de*Pe-Ie*Xe,Y[13]=-$*dt-Ae*Pe-Ye*Xe,Y[14]=-se*dt-Fe*Pe-st*Xe,Y[3]=0,Y[7]=0,Y[11]=0,Y[15]=1,Y}let Qt=i.O();function Ut(Y,d,P){let N=i.O();if(!Y){let{vecSouth:Ye,vecEast:st}=rn(d),dt=s();dt[0]=st[0],dt[1]=st[1],dt[2]=Ye[0],dt[3]=Ye[1],H=dt,(Ie=(se=($=dt)[0])*(Fe=$[3])-(Ae=$[2])*(de=$[1]))&&(H[0]=Fe*(Ie=1/Ie),H[1]=-de*Ie,H[2]=-Ae*Ie,H[3]=se*Ie),N[0]=dt[0],N[1]=dt[1],N[4]=dt[2],N[5]=dt[3]}var H,$,se,de,Ae,Fe,Ie;return i.S(N,N,[1/P,1/P,1]),N}function _r(Y,d,P,N){if(Y){let H=i.O();if(!d){let{vecSouth:$,vecEast:se}=rn(P);H[0]=se[0],H[1]=se[1],H[4]=$[0],H[5]=$[1]}return i.S(H,H,[N,N,1]),H}return P.pixelsToClipSpaceMatrix}function rn(Y){let d=Math.cos(Y.rollInRadians),P=Math.sin(Y.rollInRadians),N=Math.cos(Y.pitchInRadians),H=Math.cos(Y.bearingInRadians),$=Math.sin(Y.bearingInRadians),se=i.az();se[0]=-H*N*P-$*d,se[1]=-$*N*P+H*d;let de=i.aA(se);de<1e-9?i.aB(se):i.aC(se,se,1/de);let Ae=i.az();Ae[0]=H*N*d-$*P,Ae[1]=$*N*d+H*P;let Fe=i.aA(Ae);return Fe<1e-9?i.aB(Ae):i.aC(Ae,Ae,1/Fe),{vecEast:Ae,vecSouth:se}}function Jr(Y,d,P,N){let H;N?(H=[Y,d,N(Y,d),1],i.aE(H,H,P)):(H=[Y,d,0,1],ao(H,H,P));let $=H[3];return{point:new i.P(H[0]/$,H[1]/$),signedDistanceFromCamera:$,isOccluded:!1}}function qn(Y,d){return .5+Y/d*.5}function ri(Y,d){return Y.x>=-d[0]&&Y.x<=d[0]&&Y.y>=-d[1]&&Y.y<=d[1]}function Jn(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st){let dt=P?Y.textSizeData:Y.iconSizeData,Pe=i.aw(dt,d.transform.zoom),Xe=[256/d.width*2+1,256/d.height*2+1],at=P?Y.text.dynamicLayoutVertexArray:Y.icon.dynamicLayoutVertexArray;at.clear();let xt=Y.lineVertexArray,Et=P?Y.text.placedSymbolArray:Y.icon.placedSymbolArray,Bt=d.transform.width/d.transform.height,St=!1;for(let Pt=0;PtMath.abs(P.x-d.x)*N?{useVertical:!0}:(Y===i.ax.vertical?d.yP.x)?{needsFlipping:!0}:null}function ra(Y){let{projectionContext:d,pitchedLabelPlaneMatrixInverse:P,symbol:N,fontSize:H,flip:$,keepUpright:se,glyphOffsetArray:de,dynamicLayoutVertexArray:Ae,aspectRatio:Fe,rotateToLine:Ie}=Y,Ye=H/24,st=N.lineOffsetX*Ye,dt=N.lineOffsetY*Ye,Pe;if(N.numGlyphs>1){let Xe=N.glyphStartIndex+N.numGlyphs,at=N.lineStartIndex,xt=N.lineStartIndex+N.lineLength,Et=Ii(Ye,de,st,dt,$,N,Ie,d);if(!Et)return{notEnoughRoom:!0};let Bt=oa(Et.first.point.x,Et.first.point.y,d,P),St=oa(Et.last.point.x,Et.last.point.y,d,P);if(se&&!$){let Pt=Vi(N.writingMode,Bt,St,Fe);if(Pt)return Pt}Pe=[Et.first];for(let Pt=N.glyphStartIndex+1;Pt0?Bt.point:ha(d.tileAnchorPoint,Et,at,1,d),Pt=oa(at.x,at.y,d,P),$t=oa(St.x,St.y,d,P),Ht=Vi(N.writingMode,Pt,$t,Fe);if(Ht)return Ht}let Xe=mo(Ye*de.getoffsetX(N.glyphStartIndex),st,dt,$,N.segment,N.lineStartIndex,N.lineStartIndex+N.lineLength,d,Ie);if(!Xe||d.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Pe=[Xe]}for(let Xe of Pe)i.aD(Ae,Xe.point,Xe.angle);return{}}function ha(Y,d,P,N,H){let $=Y.add(Y.sub(d)._unit()),se=Xi($.x,$.y,H).point,de=P.sub(se);return P.add(de._mult(N/de.mag()))}function va(Y,d,P){let N=d.projectionCache;if(N.projections[Y])return N.projections[Y];let H=new i.P(d.lineVertexArray.getx(Y),d.lineVertexArray.gety(Y)),$=Xi(H.x,H.y,d);if($.signedDistanceFromCamera>0)return N.projections[Y]=$.point,N.anyProjectionOccluded||(N.anyProjectionOccluded=$.isOccluded),$.point;let se=Y-P.direction;return ha(P.distanceFromAnchor===0?d.tileAnchorPoint:new i.P(d.lineVertexArray.getx(se),d.lineVertexArray.gety(se)),H,P.previousVertex,P.absOffsetX-P.distanceFromAnchor+1,d)}function Xi(Y,d,P){let N=Y+P.translation[0],H=d+P.translation[1],$;return P.pitchWithMap?($=Jr(N,H,P.pitchedLabelPlaneMatrix,P.getElevation),$.isOccluded=!1):($=P.transform.projectTileCoordinates(N,H,P.unwrappedTileID,P.getElevation),$.point.x=(.5*$.point.x+.5)*P.width,$.point.y=(.5*-$.point.y+.5)*P.height),$}function oa(Y,d,P,N){if(P.pitchWithMap){let H=[Y,d,0,1];return i.aE(H,H,N),P.transform.projectTileCoordinates(H[0]/H[3],H[1]/H[3],P.unwrappedTileID,P.getElevation).point}return{x:Y/P.width*2-1,y:1-d/P.height*2}}function Ma(Y,d,P){return P.transform.projectTileCoordinates(Y,d,P.unwrappedTileID,P.getElevation)}function Ga(Y,d,P){return Y._unit()._perp()._mult(d*P)}function ss(Y,d,P,N,H,$,se,de,Ae){if(de.projectionCache.offsets[Y])return de.projectionCache.offsets[Y];let Fe=P.add(d);if(Y+Ae.direction=H)return de.projectionCache.offsets[Y]=Fe,Fe;let Ie=va(Y+Ae.direction,de,Ae),Ye=Ga(Ie.sub(P),se,Ae.direction),st=P.add(Ye),dt=Ie.add(Ye);return de.projectionCache.offsets[Y]=i.aF($,Fe,st,dt)||Fe,de.projectionCache.offsets[Y]}function mo(Y,d,P,N,H,$,se,de,Ae){let Fe=N?Y-d:Y+d,Ie=Fe>0?1:-1,Ye=0;N&&(Ie*=-1,Ye=Math.PI),Ie<0&&(Ye+=Math.PI);let st,dt=Ie>0?$+H:$+H+1;de.projectionCache.cachedAnchorPoint?st=de.projectionCache.cachedAnchorPoint:(st=Xi(de.tileAnchorPoint.x,de.tileAnchorPoint.y,de).point,de.projectionCache.cachedAnchorPoint=st);let Pe,Xe,at=st,xt=st,Et=0,Bt=0,St=Math.abs(Fe),Pt=[],$t;for(;Et+Bt<=St;){if(dt+=Ie,dt<$||dt>=se)return null;Et+=Bt,xt=at,Xe=Pe;let Xr={absOffsetX:St,direction:Ie,distanceFromAnchor:Et,previousVertex:xt};if(at=va(dt,de,Xr),P===0)Pt.push(xt),$t=at.sub(xt);else{let Or,$r=at.sub(xt);Or=$r.mag()===0?Ga(va(dt+Ie,de,Xr).sub(at),P,Ie):Ga($r,P,Ie),Xe||(Xe=xt.add(Or)),Pe=ss(dt,Or,at,$,se,Xe,P,de,Xr),Pt.push(Xe),$t=Pe.sub(Xe)}Bt=$t.mag()}let Ht=$t._mult((St-Et)/Bt)._add(Xe||xt),dr=Ye+Math.atan2(at.y-xt.y,at.x-xt.x);return Pt.push(Ht),{point:Ht,angle:Ae?dr:0,path:Pt}}let sl=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Eo(Y,d){for(let P=0;P=1;on--)Rr.push(Er.path[on]);for(let on=1;onNn.signedDistanceFromCamera<=0))?[]:on.map((Nn=>Nn.point))}let an=[];if(Rr.length>0){let on=Rr[0].clone(),Nn=Rr[0].clone();for(let Yn=1;Yn=Xr.x&&Nn.x<=Or.x&&on.y>=Xr.y&&Nn.y<=Or.y?[Rr]:Nn.xOr.x||Nn.yOr.y?[]:i.aG([Rr],Xr.x,Xr.y,Or.x,Or.y)}for(let on of an){$r.reset(on,.25*dr);let Nn=0;Nn=$r.length<=.5*dr?1:Math.ceil($r.paddedLength/Lr)+1;for(let Yn=0;Yn{let Ae=Jr(de.x,de.y,se,$.getElevation),Fe=$.transform.projectTileCoordinates(Ae.point.x,Ae.point.y,$.unwrappedTileID,$.getElevation);return Fe.point.x=(.5*Fe.point.x+.5)*$.width,Fe.point.y=(.5*-Fe.point.y+.5)*$.height,Fe}))})(d,P);return(function(H){let $=0,se=0,de=0,Ae=0;for(let Fe=0;Fese&&(se=Ae,$=de));return H.slice($,$+se)})(N)}queryRenderedSymbols(d){if(d.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let P=[],N=new i.a8;for(let Ye of d){let st=new i.P(Ye.x+Da,Ye.y+Da);N.extend(st),P.push(st)}let{minX:H,minY:$,maxX:se,maxY:de}=N,Ae=this.grid.query(H,$,se,de).concat(this.ignoredGrid.query(H,$,se,de)),Fe={},Ie={};for(let Ye of Ae){let st=Ye.key;if(Fe[st.bucketInstanceId]===void 0&&(Fe[st.bucketInstanceId]={}),Fe[st.bucketInstanceId][st.featureIndex])continue;let dt=[new i.P(Ye.x1,Ye.y1),new i.P(Ye.x2,Ye.y1),new i.P(Ye.x2,Ye.y2),new i.P(Ye.x1,Ye.y2)];i.aH(P,dt)&&(Fe[st.bucketInstanceId][st.featureIndex]=!0,Ie[st.bucketInstanceId]===void 0&&(Ie[st.bucketInstanceId]=[]),Ie[st.bucketInstanceId].push(st.featureIndex))}return Ie}insertCollisionBox(d,P,N,H,$,se){(N?this.ignoredGrid:this.grid).insert({bucketInstanceId:H,featureIndex:$,collisionGroupID:se,overlapMode:P},d[0],d[1],d[2],d[3])}insertCollisionCircles(d,P,N,H,$,se){let de=N?this.ignoredGrid:this.grid,Ae={bucketInstanceId:H,featureIndex:$,collisionGroupID:se,overlapMode:P};for(let Fe=0;Fe=this.screenRightBoundary||Hthis.screenBottomBoundary}isInsideGrid(d,P,N,H){return N>=0&&d=0&&Pthis.projectAndGetPerspectiveRatio(Lr.x,Lr.y,H,Fe,Ye)));Tr=Rr.some((Lr=>!Lr.isOccluded)),Er=Rr.map((Lr=>new i.P(Lr.x,Lr.y)))}else Tr=!0;return{box:i.aI(Er),allPointsOccluded:!Tr}}}class bo{constructor(d,P,N,H){this.opacity=d?Math.max(0,Math.min(1,d.opacity+(d.placed?P:-P))):H&&N?1:0,this.placed=N}isHidden(){return this.opacity===0&&!this.placed}}class Zs{constructor(d,P,N,H,$){this.text=new bo(d?d.text:null,P,N,$),this.icon=new bo(d?d.icon:null,P,H,$)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class su{constructor(d,P,N){this.text=d,this.icon=P,this.skipFade=N}}class fc{constructor(d,P,N,H,$){this.bucketInstanceId=d,this.featureIndex=P,this.sourceLayerIndex=N,this.bucketIndex=H,this.tileID=$}}class Af{constructor(d){this.crossSourceCollisions=d,this.maxGroupID=0,this.collisionGroups={}}get(d){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[d]){let P=++this.maxGroupID;this.collisionGroups[d]={ID:P,predicate:N=>N.collisionGroupID===P}}return this.collisionGroups[d]}}function ut(Y,d,P,N,H){let{horizontalAlign:$,verticalAlign:se}=i.aP(Y);return new i.P(-($-.5)*d+N[0]*H,-(se-.5)*P+N[1]*H)}class Jt{constructor(d,P,N,H,$){this.transform=d.clone(),this.terrain=P,this.collisionIndex=new bl(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=N,this.retainedQueryData={},this.collisionGroups=new Af(H),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=$,$&&($.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(d){let P=this.terrain;return P?(N,H)=>P.getElevation(d,N,H):null}getBucketParts(d,P,N,H){let $=N.getBucket(P),se=N.latestFeatureIndex;if(!$||!se||P.id!==$.layerIds[0])return;let de=N.collisionBoxArray,Ae=$.layers[0].layout,Fe=$.layers[0].paint,Ie=Math.pow(2,this.transform.zoom-N.tileID.overscaledZ),Ye=N.tileSize/i.a6,st=N.tileID.toUnwrapped(),dt=Ae.get("text-rotation-alignment")==="map",Pe=i.aK(N,1,this.transform.zoom),Xe=i.aL(this.collisionIndex.transform,N,Fe.get("text-translate"),Fe.get("text-translate-anchor")),at=i.aL(this.collisionIndex.transform,N,Fe.get("icon-translate"),Fe.get("icon-translate-anchor")),xt=Ut(dt,this.transform,Pe);this.retainedQueryData[$.bucketInstanceId]=new fc($.bucketInstanceId,se,$.sourceLayerIndex,$.index,N.tileID);let Et={bucket:$,layout:Ae,translationText:Xe,translationIcon:at,unwrappedTileID:st,pitchedLabelPlaneMatrix:xt,scale:Ie,textPixelRatio:Ye,holdingForFade:N.holdingForSymbolFade(),collisionBoxArray:de,partiallyEvaluatedTextSize:i.aw($.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get($.sourceID)};if(H)for(let Bt of $.sortKeyRanges){let{sortKey:St,symbolInstanceStart:Pt,symbolInstanceEnd:$t}=Bt;d.push({sortKey:St,symbolInstanceStart:Pt,symbolInstanceEnd:$t,parameters:Et})}else d.push({symbolInstanceStart:0,symbolInstanceEnd:$.symbolInstances.length,parameters:Et})}attemptAnchorPlacement(d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st,dt,Pe,Xe,at,xt,Et,Bt,St){var Pt,$t,Ht;let dr=i.aM[d.textAnchor],Xr=[d.textOffset0,d.textOffset1],Or=ut(dr,N,H,Xr,$),$r=this.collisionIndex.placeCollisionBox(P,st,Ae,Fe,Ie,de,se,at,Ye.predicate,Bt,Or,St);if((!Et||this.collisionIndex.placeCollisionBox(Et,st,Ae,Fe,Ie,de,se,xt,Ye.predicate,Bt,Or,St).placeable)&&$r.placeable){let Er;if(!((Pt=this.prevPlacement)===null||Pt===void 0)&&Pt.variableOffsets[dt.crossTileID]&&(!((Ht=($t=this.prevPlacement)===null||$t===void 0?void 0:$t.placements[dt.crossTileID])===null||Ht===void 0)&&Ht.text)&&(Er=this.prevPlacement.variableOffsets[dt.crossTileID].anchor),dt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[dt.crossTileID]={textOffset:Xr,width:N,height:H,anchor:dr,textBoxScale:$,prevAnchor:Er},this.markUsedJustification(Pe,dr,dt,Xe),Pe.allowVerticalPlacement&&(this.markUsedOrientation(Pe,Xe,dt),this.placedOrientations[dt.crossTileID]=Xe),{shift:Or,placedGlyphBoxes:$r}}}placeLayerBucketPart(d,P,N){let{bucket:H,layout:$,translationText:se,translationIcon:de,unwrappedTileID:Ae,pitchedLabelPlaneMatrix:Fe,textPixelRatio:Ie,holdingForFade:Ye,collisionBoxArray:st,partiallyEvaluatedTextSize:dt,collisionGroup:Pe}=d.parameters,Xe=$.get("text-optional"),at=$.get("icon-optional"),xt=i.aN($,"text-overlap","text-allow-overlap"),Et=xt==="always",Bt=i.aN($,"icon-overlap","icon-allow-overlap"),St=Bt==="always",Pt=$.get("text-rotation-alignment")==="map",$t=$.get("text-pitch-alignment")==="map",Ht=$.get("icon-text-fit")!=="none",dr=$.get("symbol-z-order")==="viewport-y",Xr=Et&&(St||!H.hasIconData()||at),Or=St&&(Et||!H.hasTextData()||Xe);!H.collisionArrays&&st&&H.deserializeCollisionBoxes(st);let $r=this.retainedQueryData[H.bucketInstanceId].tileID,Er=this._getTerrainElevationFunc($r),Tr=this.transform.getFastPathSimpleProjectionMatrix($r),Rr=(Lr,an,on)=>{var Nn,Yn;if(P[Lr.crossTileID])return;if(Ye)return void(this.placements[Lr.crossTileID]=new su(!1,!1,!1));let yi=!1,Sn=!1,An=!0,li=null,Vn={box:null,placeable:!1,offscreen:null,occluded:!1},jn={placeable:!1},Wn=null,si=null,zi=null,da=0,ui=0,Li=0;an.textFeatureIndex?da=an.textFeatureIndex:Lr.useRuntimeCollisionCircles&&(da=Lr.featureIndex),an.verticalTextFeatureIndex&&(ui=an.verticalTextFeatureIndex);let Ki=an.textBox;if(Ki){let Ss=_o=>{let po=i.ax.horizontal;if(H.allowVerticalPlacement&&!_o&&this.prevPlacement){let Xo=this.prevPlacement.placedOrientations[Lr.crossTileID];Xo&&(this.placedOrientations[Lr.crossTileID]=Xo,po=Xo,this.markUsedOrientation(H,po,Lr))}return po},Na=(_o,po)=>{if(H.allowVerticalPlacement&&Lr.numVerticalGlyphVertices>0&&an.verticalTextBox){for(let Xo of H.writingModes)if(Xo===i.ax.vertical?(Vn=po(),jn=Vn):Vn=_o(),Vn==null?void 0:Vn.placeable)break}else Vn=_o()},Ns=Lr.textAnchorOffsetStartIndex,vo=Lr.textAnchorOffsetEndIndex;if(vo===Ns){let _o=(po,Xo)=>{let no=this.collisionIndex.placeCollisionBox(po,xt,Ie,$r,Ae,$t,Pt,se,Pe.predicate,Er,void 0,Tr);return no!=null&&no.placeable&&(this.markUsedOrientation(H,Xo,Lr),this.placedOrientations[Lr.crossTileID]=Xo),no};Na((()=>_o(Ki,i.ax.horizontal)),(()=>{let po=an.verticalTextBox;return H.allowVerticalPlacement&&Lr.numVerticalGlyphVertices>0&&po?_o(po,i.ax.vertical):{box:null,offscreen:null}})),Ss(Vn==null?void 0:Vn.placeable)}else{let _o=i.aM[(Yn=(Nn=this.prevPlacement)===null||Nn===void 0?void 0:Nn.variableOffsets[Lr.crossTileID])===null||Yn===void 0?void 0:Yn.anchor],po=(no,Us,ql)=>{let Ta=no.x2-no.x1,vu=no.y2-no.y1,ys=Lr.textBoxScale,xc=Ht&&Bt==="never"?Us:null,Zl=null,$l=xt==="never"?1:2,xa="never";_o&&$l++;for(let uo=0;uo<$l;uo++){for(let Es=Ns;Espo(Ki,an.iconBox,i.ax.horizontal)),(()=>{let no=an.verticalTextBox;return H.allowVerticalPlacement&&!(Vn!=null&&Vn.placeable)&&Lr.numVerticalGlyphVertices>0&&no?po(no,an.verticalIconBox,i.ax.vertical):{box:null,occluded:!0,offscreen:null}})),Vn&&(yi=Vn.placeable,An=Vn.offscreen);let Xo=Ss(Vn==null?void 0:Vn.placeable);if(!yi&&this.prevPlacement){let no=this.prevPlacement.variableOffsets[Lr.crossTileID];no&&(this.variableOffsets[Lr.crossTileID]=no,this.markUsedJustification(H,no.anchor,Lr,Xo))}}}if(Wn=Vn,yi=Wn==null?void 0:Wn.placeable,An=Wn==null?void 0:Wn.offscreen,Lr.useRuntimeCollisionCircles&&Lr.centerJustifiedTextSymbolIndex>=0){let Ss=H.text.placedSymbolArray.get(Lr.centerJustifiedTextSymbolIndex),Na=i.ay(H.textSizeData,dt,Ss),Ns=$.get("text-padding");si=this.collisionIndex.placeCollisionCircles(xt,Ss,H.lineVertexArray,H.glyphOffsetArray,Na,Ae,Fe,N,$t,Pe.predicate,Lr.collisionCircleDiameter,Ns,se,Er),si.circles.length&&si.collisionDetected&&!N&&i.w("Collisions detected, but collision boxes are not shown"),yi=Et||si.circles.length>0&&!si.collisionDetected,An&&(An=si.offscreen)}if(an.iconFeatureIndex&&(Li=an.iconFeatureIndex),an.iconBox){let Ss=Na=>this.collisionIndex.placeCollisionBox(Na,Bt,Ie,$r,Ae,$t,Pt,de,Pe.predicate,Er,Ht&&li?li:void 0,Tr);jn&&jn.placeable&&an.verticalIconBox?(zi=Ss(an.verticalIconBox),Sn=zi.placeable):(zi=Ss(an.iconBox),Sn=zi.placeable),An&&(An=zi.offscreen)}let ca=Xe||Lr.numHorizontalGlyphVertices===0&&Lr.numVerticalGlyphVertices===0,Ia=at||Lr.numIconVertices===0;ca||Ia?Ia?ca||Sn&&(Sn=yi):yi=Sn&&yi:Sn=yi=Sn&&yi;let Os=Sn&&zi.placeable;if(yi&&Wn.placeable&&this.collisionIndex.insertCollisionBox(Wn.box,xt,$.get("text-ignore-placement"),H.bucketInstanceId,jn&&jn.placeable&&ui?ui:da,Pe.ID),Os&&this.collisionIndex.insertCollisionBox(zi.box,Bt,$.get("icon-ignore-placement"),H.bucketInstanceId,Li,Pe.ID),si&&yi&&this.collisionIndex.insertCollisionCircles(si.circles,xt,$.get("text-ignore-placement"),H.bucketInstanceId,da,Pe.ID),N&&this.storeCollisionData(H.bucketInstanceId,on,an,Wn,zi,si),Lr.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(H.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[Lr.crossTileID]=new su((yi||Xr)&&!(Wn!=null&&Wn.occluded),(Sn||Or)&&!(zi!=null&&zi.occluded),An||H.justReloaded),P[Lr.crossTileID]=!0};if(dr){if(d.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let Lr=H.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let an=Lr.length-1;an>=0;--an){let on=Lr[an];Rr(H.symbolInstances.get(on),H.collisionArrays[on],on)}}else for(let Lr=d.symbolInstanceStart;Lr=0&&(d.text.placedSymbolArray.get(de).crossTileID=$>=0&&de!==$?0:N.crossTileID)}markUsedOrientation(d,P,N){let H=P===i.ax.horizontal||P===i.ax.horizontalOnly?P:0,$=P===i.ax.vertical?P:0,se=[N.leftJustifiedTextSymbolIndex,N.centerJustifiedTextSymbolIndex,N.rightJustifiedTextSymbolIndex];for(let de of se)d.text.placedSymbolArray.get(de).placedOrientation=H;N.verticalPlacedTextSymbolIndex&&(d.text.placedSymbolArray.get(N.verticalPlacedTextSymbolIndex).placedOrientation=$)}commit(d){this.commitTime=d,this.zoomAtLastRecencyCheck=this.transform.zoom;let P=this.prevPlacement,N=!1;this.prevZoomAdjustment=P?P.zoomAdjustment(this.transform.zoom):0;let H=P?P.symbolFadeChange(d):1,$=P?P.opacities:{},se=P?P.variableOffsets:{},de=P?P.placedOrientations:{};for(let Ae in this.placements){let Fe=this.placements[Ae],Ie=$[Ae];Ie?(this.opacities[Ae]=new Zs(Ie,H,Fe.text,Fe.icon),N||(N=Fe.text!==Ie.text.placed),N||(N=Fe.icon!==Ie.icon.placed)):(this.opacities[Ae]=new Zs(null,H,Fe.text,Fe.icon,Fe.skipFade),N||(N=Fe.text||Fe.icon))}for(let Ae in $){let Fe=$[Ae];if(!this.opacities[Ae]){let Ie=new Zs(Fe,H,!1,!1);Ie.isHidden()||(this.opacities[Ae]=Ie,N||(N=Fe.text.placed),N||(N=Fe.icon.placed))}}for(let Ae in se)this.variableOffsets[Ae]||!this.opacities[Ae]||this.opacities[Ae].isHidden()||(this.variableOffsets[Ae]=se[Ae]);for(let Ae in de)this.placedOrientations[Ae]||!this.opacities[Ae]||this.opacities[Ae].isHidden()||(this.placedOrientations[Ae]=de[Ae]);if(P&&P.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");N?this.lastPlacementChangeTime=d:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=P?P.lastPlacementChangeTime:d)}updateLayerOpacities(d,P){let N={};for(let H of P){let $=H.getBucket(d);$&&H.latestFeatureIndex&&d.id===$.layerIds[0]&&this.updateBucketOpacities($,H.tileID,N,H.collisionBoxArray)}}updateBucketOpacities(d,P,N,H){d.hasTextData()&&(d.text.opacityVertexArray.clear(),d.text.hasVisibleVertices=!1),d.hasIconData()&&(d.icon.opacityVertexArray.clear(),d.icon.hasVisibleVertices=!1),d.hasIconCollisionBoxData()&&d.iconCollisionBox.collisionVertexArray.clear(),d.hasTextCollisionBoxData()&&d.textCollisionBox.collisionVertexArray.clear();let $=d.layers[0],se=$.layout,de=new Zs(null,0,!1,!1,!0),Ae=se.get("text-allow-overlap"),Fe=se.get("icon-allow-overlap"),Ie=$._unevaluatedLayout.hasValue("text-variable-anchor")||$._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ye=se.get("text-rotation-alignment")==="map",st=se.get("text-pitch-alignment")==="map",dt=se.get("icon-text-fit")!=="none",Pe=new Zs(null,0,Ae&&(Fe||!d.hasIconData()||se.get("icon-optional")),Fe&&(Ae||!d.hasTextData()||se.get("text-optional")),!0);!d.collisionArrays&&H&&(d.hasIconCollisionBoxData()||d.hasTextCollisionBoxData())&&d.deserializeCollisionBoxes(H);let Xe=(xt,Et,Bt)=>{for(let St=0;St0,dr=this.placedOrientations[Et.crossTileID],Xr=dr===i.ax.vertical,Or=dr===i.ax.horizontal||dr===i.ax.horizontalOnly;if(Bt>0||St>0){let Er=Qn($t.text);Xe(d.text,Bt,Xr?Ai:Er),Xe(d.text,St,Or?Ai:Er);let Tr=$t.text.isHidden(),Rr=[Et.rightJustifiedTextSymbolIndex,Et.centerJustifiedTextSymbolIndex,Et.leftJustifiedTextSymbolIndex];for(let on of Rr)on>=0&&(d.text.placedSymbolArray.get(on).hidden=Tr||Xr?1:0);Et.verticalPlacedTextSymbolIndex>=0&&(d.text.placedSymbolArray.get(Et.verticalPlacedTextSymbolIndex).hidden=Tr||Or?1:0);let Lr=this.variableOffsets[Et.crossTileID];Lr&&this.markUsedJustification(d,Lr.anchor,Et,dr);let an=this.placedOrientations[Et.crossTileID];an&&(this.markUsedJustification(d,"left",Et,an),this.markUsedOrientation(d,an,Et))}if(Ht){let Er=Qn($t.icon),Tr=!(dt&&Et.verticalPlacedIconSymbolIndex&&Xr);Et.placedIconSymbolIndex>=0&&(Xe(d.icon,Et.numIconVertices,Tr?Er:Ai),d.icon.placedSymbolArray.get(Et.placedIconSymbolIndex).hidden=$t.icon.isHidden()),Et.verticalPlacedIconSymbolIndex>=0&&(Xe(d.icon,Et.numVerticalIconVertices,Tr?Ai:Er),d.icon.placedSymbolArray.get(Et.verticalPlacedIconSymbolIndex).hidden=$t.icon.isHidden())}let $r=at!=null&&at.has(xt)?at.get(xt):{text:null,icon:null};if(d.hasIconCollisionBoxData()||d.hasTextCollisionBoxData()){let Er=d.collisionArrays[xt];if(Er){let Tr=new i.P(0,0);if(Er.textBox||Er.verticalTextBox){let Rr=!0;if(Ie){let Lr=this.variableOffsets[Pt];Lr?(Tr=ut(Lr.anchor,Lr.width,Lr.height,Lr.textOffset,Lr.textBoxScale),Ye&&Tr._rotate(st?-this.transform.bearingInRadians:this.transform.bearingInRadians)):Rr=!1}if(Er.textBox||Er.verticalTextBox){let Lr;Er.textBox&&(Lr=Xr),Er.verticalTextBox&&(Lr=Or),er(d.textCollisionBox.collisionVertexArray,$t.text.placed,!Rr||Lr,$r.text,Tr.x,Tr.y)}}if(Er.iconBox||Er.verticalIconBox){let Rr=!!(!Or&&Er.verticalIconBox),Lr;Er.iconBox&&(Lr=Rr),Er.verticalIconBox&&(Lr=!Rr),er(d.iconCollisionBox.collisionVertexArray,$t.icon.placed,Lr,$r.icon,dt?Tr.x:0,dt?Tr.y:0)}}}}if(d.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[d.bucketInstanceId]&&(this.retainedQueryData[d.bucketInstanceId].featureSortOrder=d.featureSortOrder),d.hasTextData()&&d.text.opacityVertexBuffer&&d.text.opacityVertexBuffer.updateData(d.text.opacityVertexArray),d.hasIconData()&&d.icon.opacityVertexBuffer&&d.icon.opacityVertexBuffer.updateData(d.icon.opacityVertexArray),d.hasIconCollisionBoxData()&&d.iconCollisionBox.collisionVertexBuffer&&d.iconCollisionBox.collisionVertexBuffer.updateData(d.iconCollisionBox.collisionVertexArray),d.hasTextCollisionBoxData()&&d.textCollisionBox.collisionVertexBuffer&&d.textCollisionBox.collisionVertexBuffer.updateData(d.textCollisionBox.collisionVertexArray),d.text.opacityVertexArray.length!==d.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${d.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${d.text.layoutVertexArray.length}) / 4`);if(d.icon.opacityVertexArray.length!==d.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${d.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${d.icon.layoutVertexArray.length}) / 4`);d.bucketInstanceId in this.collisionCircleArrays&&(d.collisionCircleArray=this.collisionCircleArrays[d.bucketInstanceId],delete this.collisionCircleArrays[d.bucketInstanceId])}symbolFadeChange(d){return this.fadeDuration===0?1:(d-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(d){return Math.max(0,(this.transform.zoom-d)/1.5)}hasTransitions(d){return this.stale||d-this.lastPlacementChangeTimed}setStale(){this.stale=!0}}function er(Y,d,P,N,H,$){N&&N.length!==0||(N=[0,0,0,0]);let se=N[0]-Da,de=N[1]-Da,Ae=N[2]-Da,Fe=N[3]-Da;Y.emplaceBack(d?1:0,P?1:0,H||0,$||0,se,de),Y.emplaceBack(d?1:0,P?1:0,H||0,$||0,Ae,de),Y.emplaceBack(d?1:0,P?1:0,H||0,$||0,Ae,Fe),Y.emplaceBack(d?1:0,P?1:0,H||0,$||0,se,Fe)}let wr=Math.pow(2,25),nn=Math.pow(2,24),Dr=Math.pow(2,17),bn=Math.pow(2,16),Yr=Math.pow(2,9),Tn=Math.pow(2,8),Kn=Math.pow(2,1);function Qn(Y){if(Y.opacity===0&&!Y.placed)return 0;if(Y.opacity===1&&Y.placed)return 4294967295;let d=Y.placed?1:0,P=Math.floor(127*Y.opacity);return P*wr+d*nn+P*Dr+d*bn+P*Yr+d*Tn+P*Kn+d}let Ai=0;class Ji{constructor(d){this._sortAcrossTiles=d.layout.get("symbol-z-order")!=="viewport-y"&&!d.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(d,P,N,H,$){let se=this._bucketParts;for(;this._currentTileIndexde.sortKey-Ae.sortKey)));this._currentPartIndex!this._forceFullPlacement&&g()-H>2;for(;this._currentPlacementIndex>=0;){let se=P[d[this._currentPlacementIndex]],de=this.placement.collisionIndex.transform.zoom;if(i.aQ(se)&&se.layout&&(!se.minzoom||se.minzoom<=de)&&(!se.maxzoom||se.maxzoom>de)){if(this._inProgressLayer||(this._inProgressLayer=new Ji(se)),this._inProgressLayer.continuePlacement(N[se.source],this.placement,this._showCollisionBoxes,se,$))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(d){return this.placement.commit(d),this.placement}}let ii=512/i.a6/2;class Za{constructor(d,P,N){this.tileID=d,this.bucketInstanceId=N,this._symbolsByKey={};let H=new Map;for(let $=0;$({x:Math.floor(Ae.anchorX*ii),y:Math.floor(Ae.anchorY*ii)}))),crossTileIDs:se.map((Ae=>Ae.crossTileID))};if(de.positions.length>128){let Ae=new i.aR(de.positions.length,16,Uint16Array);for(let{x:Fe,y:Ie}of de.positions)Ae.add(Fe,Ie);Ae.finish(),delete de.positions,de.index=Ae}this._symbolsByKey[$]=de}}getScaledCoordinates(d,P){let{x:N,y:H,z:$}=this.tileID.canonical,{x:se,y:de,z:Ae}=P.canonical,Fe=ii/Math.pow(2,Ae-$),Ie=(de*i.a6+d.anchorY)*Fe,Ye=H*i.a6*ii;return{x:Math.floor((se*i.a6+d.anchorX)*Fe-N*i.a6*ii),y:Math.floor(Ie-Ye)}}findMatches(d,P,N){let H=this.tileID.canonical.zd))}}class ja{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class qo{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(d){let P=Math.round((d-this.lng)/360);if(P!==0)for(let N in this.indexes){let H=this.indexes[N],$={};for(let se in H){let de=H[se];de.tileID=de.tileID.unwrapTo(de.tileID.wrap+P),$[de.tileID.key]=de}this.indexes[N]=$}this.lng=d}addBucket(d,P,N){var H,$,se;if(!((H=this.indexes[d.overscaledZ])===null||H===void 0)&&H[d.key]){if(this.indexes[d.overscaledZ][d.key].bucketInstanceId===P.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(d.overscaledZ,this.indexes[d.overscaledZ][d.key])}for(let Ae=0;Aed.overscaledZ)for(let Ie in Fe){let Ye=Fe[Ie];Ye.tileID.isChildOf(d)&&Ye.findMatches(P.symbolInstances,d,de)}else{let Ie=Fe[d.scaledTo(Number(Ae)).key];Ie&&Ie.findMatches(P.symbolInstances,d,de)}}for(let Ae=0;Ae=","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"}});var Qje=fe((ZAr,Jje)=>{"use strict";Jje.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"}}]}});var zy=fe(($Ar,iWe)=>{"use strict";var Yer=(b2(),Gs(_2)).default,Xer=Kje(),Zer=Qje(),$er='\xA9 OpenStreetMap contributors',eWe="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",tWe="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",QF="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",Ker="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",Jer="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",Qer="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",nWe={basic:QF,streets:QF,outdoors:QF,light:eWe,dark:tWe,satellite:Zer,"satellite-streets":Xer,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:$er,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":eWe,"carto-darkmatter":tWe,"carto-voyager":QF,"carto-positron-nolabels":Ker,"carto-darkmatter-nolabels":Jer,"carto-voyager-nolabels":Qer},rWe=Yer(nWe);iWe.exports={styleValueDflt:"basic",stylesMap:nWe,styleValuesMap:rWe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",rWe.join(", "),"or use a tile service."].join(` +`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}});var $M=fe((KAr,uWe)=>{"use strict";var aWe=Xt(),oWe=ni().defaultLine,etr=nl().attributes,ttr=Ds(),rtr=Ol().textposition,ntr=rl().overrideAll,itr=So().templatedArray,sWe=zy(),lWe=ttr({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});lWe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var atr=uWe.exports=ntr({_arrayAttrRegexps:[aWe.counterRegex("map",".layers",!0)],domain:etr({name:"map"}),style:{valType:"any",values:sWe.styleValuesMap,dflt:sWe.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:itr("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:oWe},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:oWe}},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:lWe,textposition:aWe.extendFlat({},rtr,{arrayOk:!1})}})},"plot","from-root");atr.uirevision={valType:"any",editType:"none"}});var eD=fe((JAr,dWe)=>{"use strict";var{hovertemplateAttrs:otr,texttemplateAttrs:str,templatefallbackAttrs:cWe}=Oo(),ltr=n1(),KM=o5(),L5=Ol(),fWe=$M(),utr=Ho(),ctr=_s(),p_=ta().extendFlat,ftr=rl().overrideAll,htr=$M(),hWe=KM.line,P5=KM.marker;dWe.exports=ftr({lon:KM.lon,lat:KM.lat,cluster:{enabled:{valType:"boolean"},maxzoom:p_({},htr.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:p_({},P5.opacity,{dflt:1})},mode:p_({},L5.mode,{dflt:"markers"}),text:p_({},L5.text,{}),texttemplate:str({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:cWe({editType:"plot"}),hovertext:p_({},L5.hovertext,{}),line:{color:hWe.color,width:hWe.width},connectgaps:L5.connectgaps,marker:p_({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:P5.opacity,size:P5.size,sizeref:P5.sizeref,sizemin:P5.sizemin,sizemode:P5.sizemode},ctr("marker")),fill:KM.fill,fillcolor:ltr(),textfont:fWe.layers.symbol.textfont,textposition:fWe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:L5.selected.marker},unselected:{marker:L5.unselected.marker},hoverinfo:p_({},utr.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:otr(),hovertemplatefallback:cWe()},"calc","nested")});var nK=fe((QAr,vWe)=>{"use strict";var dtr=["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"];vWe.exports={isSupportedFont:function(e){return dtr.indexOf(e)!==-1}}});var mWe=fe((e6r,gWe)=>{"use strict";var JM=Xt(),iK=Is(),vtr=vv(),ptr=lp(),gtr=up(),mtr=a1(),pWe=eD(),ytr=nK().isSupportedFont;gWe.exports=function(t,r,n,a){function i(y,C){return JM.coerce(t,r,pWe,y,C)}function o(y,C){return JM.coerce2(t,r,pWe,y,C)}var s=xtr(t,r,i);if(!s){r.visible=!1;return}if(i("text"),i("texttemplate"),i("texttemplatefallback"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("mode"),i("below"),iK.hasMarkers(r)){vtr(t,r,n,a,i,{noLine:!0,noAngle:!0}),i("marker.allowoverlap"),i("marker.angle");var l=r.marker;l.symbol!=="circle"&&(JM.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),JM.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}iK.hasLines(r)&&(ptr(t,r,n,a,i,{noDash:!0}),i("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||n),v=o("cluster.size"),g=o("cluster.opacity"),p=u!==!1||c!==!1||f!==!1||v!==!1||g!==!1,_=i("cluster.enabled",p);if(_||iK.hasText(r)){var x=a.font.family;gtr(t,r,a,i,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:ytr(x)?x:"Open Sans Regular",weight:a.font.weight,style:a.font.style,size:a.font.size,color:a.font.color}})}i("fill"),r.fill!=="none"&&mtr(t,r,n,i),JM.coerceSelectionMarkerOpacity(r,i)};function xtr(e,t,r){var n=r("lon")||[],a=r("lat")||[],i=Math.min(n.length,a.length);return t._length=i,i}});var aK=fe((t6r,xWe)=>{"use strict";var yWe=Yi();xWe.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot,o=i.mockAxis,s=t.lonlat;return a.lonLabel=yWe.tickText(o,o.c2l(s[0]),!0).text,a.latLabel=yWe.tickText(o,o.c2l(s[1]),!0).text,a}});var oK=fe((r6r,bWe)=>{"use strict";var _We=Xt();bWe.exports=function(t,r){var n=t.split(" "),a=n[0],i=n[1],o=_We.isArrayOrTypedArray(r)?_We.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(a){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(i){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var EWe=fe((n6r,SWe)=>{"use strict";var AWe=aa(),nh=Xt(),_tr=Wa().BADNUM,rD=fM(),wWe=js(),btr=Ji(),wtr=uT(),nD=Is(),Ttr=nK().isSupportedFont,Atr=oK(),Mtr=Sd().appendArrayPointValue,Str=as().NEWLINES,Etr=as().BR_TAG_ALL;SWe.exports=function(t,r){var n=r[0].trace,a=n.visible===!0&&n._length!==0,i=n.fill!=="none",o=nD.hasLines(n),s=nD.hasMarkers(n),l=nD.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,v=tD("fill"),g=tD("line"),p=tD("circle"),_=tD("symbol"),x={fill:v,line:g,circle:p,symbol:_};if(!a)return x;var y;if((i||o)&&(y=rD.calcTraceToLineCoords(r)),i&&(v.geojson=rD.makePolygon(y),v.layout.visibility="visible",nh.extendFlat(v.paint,{"fill-color":n.fillcolor})),o&&(g.geojson=rD.makeLine(y),g.layout.visibility="visible",nh.extendFlat(g.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var C=ktr(r);p.geojson=C.geojson,p.layout.visibility="visible",f&&(p.filter=["!",["has","point_count"]],x.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":lK(n.cluster.color,n.cluster.step),"circle-radius":lK(n.cluster.size,n.cluster.step),"circle-opacity":lK(n.cluster.opacity,n.cluster.step)}},x.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":TWe(n),"text-size":12}}),nh.extendFlat(p.paint,{"circle-color":C.mcc,"circle-radius":C.mrc,"circle-opacity":C.mo})}if(u&&f&&(p.filter=["!",["has","point_count"]]),(c||l)&&(_.geojson=Ctr(r,t),nh.extendFlat(_.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),c&&(nh.extendFlat(_.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&nh.extendFlat(_.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),_.layout["icon-allow-overlap"]=n.marker.allowoverlap,nh.extendFlat(_.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color,"icon-halo-color":n.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),l)){var k=(n.marker||{}).size,S=Atr(n.textposition,k);nh.extendFlat(_.layout,{"text-size":n.textfont.size,"text-anchor":S.anchor,"text-offset":S.offset,"text-font":TWe(n)}),nh.extendFlat(_.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return x};function tD(e){return{type:e,geojson:rD.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function ktr(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,a=nh.isArrayOrTypedArray(r.color),i=nh.isArrayOrTypedArray(r.size),o=nh.isArrayOrTypedArray(r.opacity),s;function l(k){return t.opacity*k}function u(k){return k/2}var c;a&&(wWe.hasColorscale(t,"marker")?c=wWe.makeColorScaleFuncFromTrace(r):c=nh.identity);var f;i&&(f=wtr(t));var v;o&&(v=function(k){var S=AWe(k)?+nh.constrain(k,0,1):0;return l(S)});var g=[];for(s=0;s850?s+=" Black":a>750?s+=" Extra Bold":a>650?s+=" Bold":a>550?s+=" Semi Bold":a>450?s+=" Medium":a>350?s+=" Regular":a>250?s+=" Light":a>150?s+=" Extra Light":s+=" Thin"):i.slice(0,2).join(" ")==="Open Sans"?(s="Open Sans",a>750?s+=" Extrabold":a>650?s+=" Bold":a>550?s+=" Semibold":a>350?s+=" Regular":s+=" Light"):i.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(s="Klokantech Noto Sans",i[3]==="CJK"&&(s+=" CJK"),s+=a>500?" Bold":" Regular")),o&&(s+=" Italic"),s==="Open Sans Regular Italic"?s="Open Sans Italic":s==="Open Sans Regular Bold"?s="Open Sans Bold":s==="Open Sans Regular Bold Italic"?s="Open Sans Bold Italic":s==="Klokantech Noto Sans Regular Italic"&&(s="Klokantech Noto Sans Italic"),Ttr(s)||(s=r);var l=s.split(", ");return l}});var PWe=fe((i6r,LWe)=>{"use strict";var Ltr=Xt(),kWe=EWe(),F5=zy().traceLayerPrefix,zv={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function CWe(e,t,r,n){this.type="scattermap",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:F5+t+"-fill",line:F5+t+"-line",circle:F5+t+"-circle",symbol:F5+t+"-symbol",cluster:F5+t+"-cluster",clusterCount:F5+t+"-cluster-count"},this.below=null}var QM=CWe.prototype;QM.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&Ltr.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var a=this.subplot.map.getSource(this.sourceIds[e]);a?a.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};QM.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};QM.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var a=this.layerIds[e],i,o=this.subplot.getMapLayers(),s=0;s=0;L--){var w=S[L];a.removeLayer(u.layerIds[w])}k||a.removeSource(u.sourceIds.circle)}function v(k){for(var S=zv.nonCluster,L=0;L=0;L--){var w=S[L];a.removeLayer(u.layerIds[w]),k||a.removeSource(u.sourceIds[w])}}function p(k){l?f(k):g(k)}function _(k){s?c(k):v(k)}function x(){for(var k=s?zv.cluster:zv.nonCluster,S=0;S=0;n--){var a=r[n];t.removeLayer(this.layerIds[a]),t.removeSource(this.sourceIds[a])}};LWe.exports=function(t,r){var n=r[0].trace,a=n.cluster&&n.cluster.enabled,i=n.visible!==!0,o=new CWe(t,n.uid,a,i),s=kWe(t.gd,r),l=o.below=t.belowLookup["trace-"+n.uid],u,c,f;if(a)for(o.addSource("circle",s.circle,n.cluster),u=0;u{"use strict";var Ptr=kl(),uK=Xt(),Ftr=b3(),Dtr=uK.fillText,Rtr=Wa().BADNUM,Itr=zy().traceLayerPrefix;function ztr(e,t,r){var n=e.cd,a=n[0].trace,i=e.xa,o=e.ya,s=e.subplot,l=[],u=Itr+a.uid+"-circle",c=a.cluster&&a.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(A){return A.id})}var v=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),g=v*360,p=t-g;function _(A){var m=A.lonlat;if(m[0]===Rtr||c&&l.indexOf(A.i+1)===-1)return 1/0;var F=uK.modHalf(m[0],360),E=m[1],I=s.project([F,E]),R=I.x-i.c2p([p,E]),B=I.y-o.c2p([F,r]),O=Math.max(3,A.mrc||0);return Math.max(Math.sqrt(R*R+B*B)-O,1-3/O)}if(Ptr.getClosest(n,_,e),e.index!==!1){var x=n[e.index],y=x.lonlat,C=[uK.modHalf(y[0],360)+g,y[1]],k=i.c2p(C),S=o.c2p(C),L=x.mrc||1;e.x0=k-L,e.x1=k+L,e.y0=S-L,e.y1=S+L;var w={};w[a.subplot]={_subplot:s};var T=a._module.formatLabels(x,a,w);return e.lonLabel=T.lonLabel,e.latLabel=T.latLabel,e.color=Ftr(a,x),e.extraText=FWe(a,x,n[0].t.labels),e.hovertemplate=a.hovertemplate,[e]}}function FWe(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,a=n.split("+"),i=a.indexOf("all")!==-1,o=a.indexOf("lon")!==-1,s=a.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return i||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(i||a.indexOf("text")!==-1)&&Dtr(t,e,u),u.join("
")}DWe.exports={hoverPoints:ztr,getExtraText:FWe}});var IWe=fe((o6r,RWe)=>{"use strict";RWe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var qWe=fe((s6r,zWe)=>{"use strict";var qtr=Xt(),Btr=Is(),{BADNUM:Otr}=Wa();zWe.exports=function(t,r){var c;let{cd:n,xaxis:a,yaxis:i}=t,{trace:o}=n[0];if(!Btr.hasMarkers(o))return[];if(r===!1){for(let f of n)f.selected=0;return[]}let s=(c=a._subplot)==null?void 0:c.map,l=s!=null&&s.getRenderWorldCopies()&&r.xmax>r.xmin?s.transform.worldSize:0,u=[];for(let f=0;f{(function(e,t){typeof cK=="object"&&typeof fK!="undefined"?fK.exports=t():(e=typeof globalThis!="undefined"?globalThis:e||self,e.maplibregl=t())})(cK,(function(){"use strict";var e={},t={};function r(a,i,o){if(t[a]=o,a==="index"){var s="var sharedModule = {}; ("+t.shared+")(sharedModule); ("+t.worker+")(sharedModule);",l={};return t.shared(l),t.index(e,l),typeof window!="undefined"&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([s],{type:"text/javascript"}))),e}}r("shared",["exports"],(function(a){"use strict";function i(M,h,b,D){return new(b||(b=Promise))((function(z,G){function X(Q){try{re(D.next(Q))}catch(he){G(he)}}function Z(Q){try{re(D.throw(Q))}catch(he){G(he)}}function re(Q){var he;Q.done?z(Q.value):(he=Q.value,he instanceof b?he:new b((function(oe){oe(he)}))).then(X,Z)}re((D=D.apply(M,h||[])).next())}))}function o(M,h){this.x=M,this.y=h}function s(M){return M&&M.__esModule&&Object.prototype.hasOwnProperty.call(M,"default")?M.default:M}var l,u;typeof SuppressedError=="function"&&SuppressedError,o.prototype={clone(){return new o(this.x,this.y)},add(M){return this.clone()._add(M)},sub(M){return this.clone()._sub(M)},multByPoint(M){return this.clone()._multByPoint(M)},divByPoint(M){return this.clone()._divByPoint(M)},mult(M){return this.clone()._mult(M)},div(M){return this.clone()._div(M)},rotate(M){return this.clone()._rotate(M)},rotateAround(M,h){return this.clone()._rotateAround(M,h)},matMult(M){return this.clone()._matMult(M)},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(M){return this.x===M.x&&this.y===M.y},dist(M){return Math.sqrt(this.distSqr(M))},distSqr(M){let h=M.x-this.x,b=M.y-this.y;return h*h+b*b},angle(){return Math.atan2(this.y,this.x)},angleTo(M){return Math.atan2(this.y-M.y,this.x-M.x)},angleWith(M){return this.angleWithSep(M.x,M.y)},angleWithSep(M,h){return Math.atan2(this.x*h-this.y*M,this.x*M+this.y*h)},_matMult(M){let h=M[2]*this.x+M[3]*this.y;return this.x=M[0]*this.x+M[1]*this.y,this.y=h,this},_add(M){return this.x+=M.x,this.y+=M.y,this},_sub(M){return this.x-=M.x,this.y-=M.y,this},_mult(M){return this.x*=M,this.y*=M,this},_div(M){return this.x/=M,this.y/=M,this},_multByPoint(M){return this.x*=M.x,this.y*=M.y,this},_divByPoint(M){return this.x/=M.x,this.y/=M.y,this},_unit(){return this._div(this.mag()),this},_perp(){let M=this.y;return this.y=this.x,this.x=-M,this},_rotate(M){let h=Math.cos(M),b=Math.sin(M),D=b*this.x+h*this.y;return this.x=h*this.x-b*this.y,this.y=D,this},_rotateAround(M,h){let b=Math.cos(M),D=Math.sin(M),z=h.y+D*(this.x-h.x)+b*(this.y-h.y);return this.x=h.x+b*(this.x-h.x)-D*(this.y-h.y),this.y=z,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:o},o.convert=function(M){if(M instanceof o)return M;if(Array.isArray(M))return new o(+M[0],+M[1]);if(M.x!==void 0&&M.y!==void 0)return new o(+M.x,+M.y);throw new Error("Expected [x, y] or {x, y} point format")};var c=(function(){if(u)return l;function M(h,b,D,z){this.cx=3*h,this.bx=3*(D-h)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*b,this.by=3*(z-b)-this.cy,this.ay=1-this.cy-this.by,this.p1x=h,this.p1y=b,this.p2x=D,this.p2y=z}return u=1,l=M,M.prototype={sampleCurveX:function(h){return((this.ax*h+this.bx)*h+this.cx)*h},sampleCurveY:function(h){return((this.ay*h+this.by)*h+this.cy)*h},sampleCurveDerivativeX:function(h){return(3*this.ax*h+2*this.bx)*h+this.cx},solveCurveX:function(h,b){if(b===void 0&&(b=1e-6),h<0)return 0;if(h>1)return 1;for(var D=h,z=0;z<8;z++){var G=this.sampleCurveX(D)-h;if(Math.abs(G)G?Z=D:re=D,D=.5*(re-Z)+Z;return D},solve:function(h,b){return this.sampleCurveY(this.solveCurveX(h,b))}},l})(),f=s(c);let v,g;function p(){return v!=null||(v=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),v}function _(){if(g==null&&(g=!1,p())){let h=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(h){for(let D=0;D<25;D++){let z=4*D;h.fillStyle=`rgb(${z},${z+1},${z+2})`,h.fillRect(D%5,Math.floor(D/5),1,1)}let b=h.getImageData(0,0,5,5).data;for(let D=0;D<100;D++)if(D%4!=3&&b[D]!==D){g=!0;break}}}return g||!1}var x=1e-6,y=typeof Float32Array!="undefined"?Float32Array:Array;function C(){var M=new y(9);return y!=Float32Array&&(M[1]=0,M[2]=0,M[3]=0,M[5]=0,M[6]=0,M[7]=0),M[0]=1,M[4]=1,M[8]=1,M}function k(M){return M[0]=1,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=1,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=1,M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M}function S(){var M=new y(3);return y!=Float32Array&&(M[0]=0,M[1]=0,M[2]=0),M}function L(M){var h=M[0],b=M[1],D=M[2];return Math.sqrt(h*h+b*b+D*D)}function w(M,h,b){var D=new y(3);return D[0]=M,D[1]=h,D[2]=b,D}function T(M,h,b){return M[0]=h[0]+b[0],M[1]=h[1]+b[1],M[2]=h[2]+b[2],M}function A(M,h,b){return M[0]=h[0]*b,M[1]=h[1]*b,M[2]=h[2]*b,M}function m(M,h,b){var D=h[0],z=h[1],G=h[2],X=b[0],Z=b[1],re=b[2];return M[0]=z*re-G*Z,M[1]=G*X-D*re,M[2]=D*Z-z*X,M}var F,E=L;function I(M,h,b){var D=h[0],z=h[1],G=h[2],X=h[3];return M[0]=b[0]*D+b[4]*z+b[8]*G+b[12]*X,M[1]=b[1]*D+b[5]*z+b[9]*G+b[13]*X,M[2]=b[2]*D+b[6]*z+b[10]*G+b[14]*X,M[3]=b[3]*D+b[7]*z+b[11]*G+b[15]*X,M}function R(){var M=new y(4);return y!=Float32Array&&(M[0]=0,M[1]=0,M[2]=0),M[3]=1,M}function B(M,h,b,D){var z=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",G=Math.PI/360;h*=G,D*=G,b*=G;var X=Math.sin(h),Z=Math.cos(h),re=Math.sin(b),Q=Math.cos(b),he=Math.sin(D),oe=Math.cos(D);switch(z){case"xyz":M[0]=X*Q*oe+Z*re*he,M[1]=Z*re*oe-X*Q*he,M[2]=Z*Q*he+X*re*oe,M[3]=Z*Q*oe-X*re*he;break;case"xzy":M[0]=X*Q*oe-Z*re*he,M[1]=Z*re*oe-X*Q*he,M[2]=Z*Q*he+X*re*oe,M[3]=Z*Q*oe+X*re*he;break;case"yxz":M[0]=X*Q*oe+Z*re*he,M[1]=Z*re*oe-X*Q*he,M[2]=Z*Q*he-X*re*oe,M[3]=Z*Q*oe+X*re*he;break;case"yzx":M[0]=X*Q*oe+Z*re*he,M[1]=Z*re*oe+X*Q*he,M[2]=Z*Q*he-X*re*oe,M[3]=Z*Q*oe-X*re*he;break;case"zxy":M[0]=X*Q*oe-Z*re*he,M[1]=Z*re*oe+X*Q*he,M[2]=Z*Q*he+X*re*oe,M[3]=Z*Q*oe-X*re*he;break;case"zyx":M[0]=X*Q*oe-Z*re*he,M[1]=Z*re*oe+X*Q*he,M[2]=Z*Q*he-X*re*oe,M[3]=Z*Q*oe+X*re*he;break;default:throw new Error("Unknown angle order "+z)}return M}function O(){var M=new y(2);return y!=Float32Array&&(M[0]=0,M[1]=0),M}function U(M,h){var b=new y(2);return b[0]=M,b[1]=h,b}S(),F=new y(4),y!=Float32Array&&(F[0]=0,F[1]=0,F[2]=0,F[3]=0),S(),w(1,0,0),w(0,1,0),R(),R(),C(),O();let j=8192;function q(M,h,b){return h*(j/(M.tileSize*Math.pow(2,b-M.tileID.overscaledZ)))}function V(M){return M instanceof Error?M:new Error(typeof M=="string"?M:String(M))}function K(M,h){return(M%h+h)%h}function ee(M,h,b){return M*(1-b)+h*b}function ce(M){if(M<=0)return 0;if(M>=1)return 1;let h=M*M,b=h*M;return 4*(M<.5?b:3*(M-h)+b-.75)}function me(M,h,b,D){let z=new f(M,h,b,D);return G=>z.solve(G)}let ye=me(.25,.1,.25,1);function ue(M,h,b){return Math.min(b,Math.max(h,M))}function J(M,h,b){let D=b-h,z=((M-h)%D+D)%D+h;return z===h?b:z}function _e(M,...h){for(let b of h)for(let D in b)M[D]=b[D];return M}let ne=1;function ae(M,h,b){let D={};for(let z in M)D[z]=h.call(this,M[z],z,M);return D}function pe(M,h,b){let D={};for(let z in M)h.call(this,M[z],z,M)&&(D[z]=M[z]);return D}function ie(M){return Array.isArray(M)?M.map(ie):typeof M=="object"&&M?ae(M,ie):M}let le={};function xe(M){le[M]||(typeof console!="undefined"&&console.warn(M),le[M]=!0)}function be(M,h,b){return(b.y-M.y)*(h.x-M.x)>(h.y-M.y)*(b.x-M.x)}function De(M){return typeof WorkerGlobalScope!="undefined"&&M!==void 0&&M instanceof WorkerGlobalScope}let Ge=null;function pt(M){return typeof ImageBitmap!="undefined"&&M instanceof ImageBitmap}let tt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Oe(M,h,b,D,z){return i(this,void 0,void 0,(function*(){if(typeof VideoFrame=="undefined")throw new Error("VideoFrame not supported");let G=new VideoFrame(M,{timestamp:0});try{let X=G==null?void 0:G.format;if(!X||!X.startsWith("BGR")&&!X.startsWith("RGB"))throw new Error(`Unrecognized format ${X}`);let Z=X.startsWith("BGR"),re=new Uint8ClampedArray(D*z*4);if(yield G.copyTo(re,(function(Q,he,oe,ke,ge){let Ue=4*Math.max(-he,0),je=(Math.max(0,oe)-oe)*ke*4+Ue,dt=4*ke,gt=Math.max(0,he),It=Math.max(0,oe);return{rect:{x:gt,y:It,width:Math.min(Q.width,he+ke)-gt,height:Math.min(Q.height,oe+ge)-It},layout:[{offset:je,stride:dt}]}})(M,h,b,D,z)),Z)for(let Q=0;Q{M.removeEventListener(h,b,D)}}}function qe(M){return M*Math.PI/180}function we(M){return M/Math.PI*180}let Le={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},Ke={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},Te="AbortError";class Ve extends Error{constructor(h=Te){super(h instanceof Error?h.message:h),this.name=Te,h instanceof Error&&h.stack&&(this.stack=h.stack)}}function $e(M){return M instanceof Error&&M.name===Te}function ot(M){if(M.aborted)throw new Ve(M.reason)}let rt={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function it(M){return rt.REGISTERED_PROTOCOLS[M.substring(0,M.indexOf("://"))]}let We="global-dispatcher";class mt extends Error{constructor(h,b,D,z){super(`AJAXError: ${b} (${h}): ${D}`),this.status=h,this.statusText=b,this.url=D,this.body=z}}let bt=()=>{var M;return De(self)?(M=self.worker)===null||M===void 0?void 0:M.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href},Yt=function(M,h){return i(this,void 0,void 0,(function*(){var b,D;if(M.url.includes("://")&&!/^https?:|^file:/.test(M.url)){let z=it(M.url);if(z){let G=yield z(M,h);return G.data||M.type!=="arrayBuffer"?G:_e(G,{data:new ArrayBuffer(0)})}if(De(self)&&(!((b=self.worker)===null||b===void 0)&&b.actor))return self.worker.actor.sendAsync({type:"GR",data:M,targetMapId:We},h)}if(!(z=>{var G;return z.startsWith("file:")||((G=bt())===null||G===void 0?void 0:G.startsWith("file:"))&&!/^\w+:/.test(z)})(M.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return(function(z,G){return i(this,void 0,void 0,(function*(){let X=new Request(z.url,{method:z.method||"GET",body:z.body,credentials:z.credentials,headers:z.headers,cache:z.cache,referrer:bt(),referrerPolicy:z.referrerPolicy,signal:G.signal}),Z,re;z.type!=="json"||X.headers.has("Accept")||X.headers.set("Accept","application/json");try{Z=yield fetch(X)}catch(he){throw $e(he)?he:new mt(0,V(he).message,z.url,new Blob)}if(!Z.ok){let he=yield Z.blob();throw new mt(Z.status,Z.statusText,z.url,he)}re=z.type==="arrayBuffer"||z.type==="image"?Z.arrayBuffer():z.type==="json"?Z.json():Z.text();let Q=yield re;return ot(G.signal),{data:Q,cacheControl:Z.headers.get("Cache-Control"),expires:Z.headers.get("Expires"),etag:Z.headers.get("ETag")}}))})(M,h);if(De(self)&&(!((D=self.worker)===null||D===void 0)&&D.actor))return self.worker.actor.sendAsync({type:"GR",data:M,mustQueue:!0,targetMapId:We},h)}return(function(z,G){return new Promise(((X,Z)=>{var re;let Q=new XMLHttpRequest;Q.open(z.method||"GET",z.url,!0),z.type!=="arrayBuffer"&&z.type!=="image"||(Q.responseType="arraybuffer");for(let he in z.headers)Q.setRequestHeader(he,z.headers[he]);z.type==="json"&&(Q.responseType="text",!((re=z.headers)===null||re===void 0)&&re.Accept||Q.setRequestHeader("Accept","application/json")),Q.withCredentials=z.credentials==="include",Q.onerror=()=>{Z(new Error(Q.statusText))},Q.onload=()=>{if(!G.signal.aborted)if((Q.status>=200&&Q.status<300||Q.status===0)&&Q.response!==null){let he=Q.response;if(z.type==="json")try{he=JSON.parse(Q.response)}catch(oe){return void Z(oe)}X({data:he,cacheControl:Q.getResponseHeader("Cache-Control"),expires:Q.getResponseHeader("Expires"),etag:Q.getResponseHeader("ETag")})}else{let he=new Blob([Q.response],{type:Q.getResponseHeader("Content-Type")});Z(new mt(Q.status,Q.statusText,z.url,he))}},G.signal.addEventListener("abort",(()=>{Q.abort(),Z(new Ve(G.signal.reason))})),Q.send(z.body)}))})(M,h)}))};function jt(M){if(!M||M.indexOf("://")<=0||M.startsWith("data:image/")||M.startsWith("blob:"))return!0;let h=new URL(M),b=window.location;return h.protocol===b.protocol&&h.host===b.host}function mr(M,h,b){var D;!((D=b[M])===null||D===void 0)&&D.includes(h)||(b[M]||(b[M]=[]),b[M].push(h))}function or(M,h,b){if(b!=null&&b[M]){let D=b[M].indexOf(h);D!==-1&&b[M].splice(D,1)}}class fr{constructor(h,b={}){_e(this,b),this.type=h}}class Ot extends fr{constructor(h,b={}){super("error",_e({error:h},b))}}class cr{on(h,b){return this._listeners||(this._listeners={}),mr(h,b,this._listeners),{unsubscribe:()=>{this.off(h,b)}}}off(h,b){return or(h,b,this._listeners),or(h,b,this._oneTimeListeners),this}once(h,b){return b?(this._oneTimeListeners||(this._oneTimeListeners={}),mr(h,b,this._oneTimeListeners),this):new Promise((D=>this.once(h,D)))}fire(h,b){var D,z;typeof h=="string"&&(h=new fr(h,b||{}));let G=h.type;if(this.listens(G)){h.target=this;let X=!((D=this._listeners)===null||D===void 0)&&D[G]?this._listeners[G].slice():[];for(let Q of X)Q.call(this,h);let Z=!((z=this._oneTimeListeners)===null||z===void 0)&&z[G]?this._oneTimeListeners[G].slice():[];for(let Q of Z)or(G,Q,this._oneTimeListeners),Q.call(this,h);let re=this._eventedParent;re&&(_e(h,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),re.fire(h))}else h instanceof Ot&&console.error(h.error);return this}listens(h){var b,D,z,G,X;return((D=(b=this._listeners)===null||b===void 0?void 0:b[h])===null||D===void 0?void 0:D.length)>0||((G=(z=this._oneTimeListeners)===null||z===void 0?void 0:z[h])===null||G===void 0?void 0:G.length)>0||((X=this._eventedParent)===null||X===void 0?void 0:X.listens(h))}setEventedParent(h,b){return this._eventedParent=h,this._eventedParentData=b,this}}var Ct={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let wt=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Tt(M,h){let b={};for(let D in M)D!=="ref"&&(b[D]=M[D]);return wt.forEach((D=>{D in h&&(b[D]=h[D])})),b}function Mt(M,h){if(Array.isArray(M)){if(!Array.isArray(h)||M.length!==h.length)return!1;for(let b=0;b`:M.itemType.kind==="value"?"array":`array<${h}>`}return M.kind}let oa=[Dt,At,Vt,Qt,Ut,_r,ri,rn,va(Jr),Jn,Vi,Ii,ra,ha];function Ma(M,h){if(h.kind==="error")return null;if(M.kind==="array"){if(h.kind==="array"&&(h.N===0&&h.itemType.kind==="value"||!Ma(M.itemType,h.itemType))&&(typeof M.N!="number"||M.N===h.N))return null}else{if(M.kind===h.kind)return null;if(M.kind==="value"){for(let b of oa)if(!Ma(b,h))return null}}return`Expected ${Xi(M)} but found ${Xi(h)} instead.`}function Ga(M,h){return h.some((b=>b.kind===M.kind))}function ss(M,h){return h.some((b=>b==="null"?M===null:b==="array"?Array.isArray(M):b==="object"?M&&!Array.isArray(M)&&typeof M=="object":b===typeof M))}function yo(M,h){return M.kind==="array"&&h.kind==="array"?M.itemType.kind===h.itemType.kind&&typeof M.N=="number":M.kind===h.kind}let sl=.96422,ko=.82521,ao=4/29,Da=6/29,bl=3*Da*Da,wo=Da*Da*Da,Zs=Math.PI/180,su=180/Math.PI;function fc(M){return(M%=360)<0&&(M+=360),M}function Af([M,h,b,D]){let z,G,X=Jt((.2225045*(M=ct(M))+.7168786*(h=ct(h))+.0606169*(b=ct(b)))/1);M===h&&h===b?z=G=X:(z=Jt((.4360747*M+.3850649*h+.1430804*b)/sl),G=Jt((.0139322*M+.0971045*h+.7141733*b)/ko));let Z=116*X-16;return[Z<0?0:Z,500*(z-X),200*(X-G),D]}function ct(M){return M<=.04045?M/12.92:Math.pow((M+.055)/1.055,2.4)}function Jt(M){return M>wo?Math.pow(M,1/3):M/bl+ao}function er([M,h,b,D]){let z=(M+16)/116,G=isNaN(h)?z:z+h/500,X=isNaN(b)?z:z-b/200;return z=1*nn(z),G=sl*nn(G),X=ko*nn(X),[wr(3.1338561*G-1.6168667*z-.4906146*X),wr(-.9787684*G+1.9161415*z+.033454*X),wr(.0719453*G-.2289914*z+1.4052427*X),D]}function wr(M){return(M=M<=.00304?12.92*M:1.055*Math.pow(M,1/2.4)-.055)<0?0:M>1?1:M}function nn(M){return M>Da?M*M*M:bl*(M-ao)}let Dr=Object.hasOwn||function(M,h){return Object.prototype.hasOwnProperty.call(M,h)};function bn(M,h){return Dr(M,h)?M[h]:void 0}function Yr(M){return parseInt(M.padEnd(2,M),16)/255}function Tn(M,h){return Kn(h?M/100:M,0,1)}function Kn(M,h,b){return Math.min(Math.max(h,M),b)}function Qn(M){return!M.some(Number.isNaN)}let Ai={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 Qi(M,h,b){return M+b*(h-M)}function Ra(M,h,b){return M.map(((D,z)=>Qi(D,h[z],b)))}class ii{constructor(h,b,D,z=1,G=!0){this.r=h,this.g=b,this.b=D,this.a=z,G||(this.r*=z,this.g*=z,this.b*=z,z||this.overwriteGetter("rgb",[h,b,D,z]))}static parse(h){if(h instanceof ii)return h;if(typeof h!="string")return;let b=(function(D){if((D=D.toLowerCase().trim())==="transparent")return[0,0,0,0];let z=bn(Ai,D);if(z){let[X,Z,re]=z;return[X/255,Z/255,re/255,1]}if(D.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(D)){let X=D.length<6?1:2,Z=1;return[Yr(D.slice(Z,Z+=X)),Yr(D.slice(Z,Z+=X)),Yr(D.slice(Z,Z+=X)),Yr(D.slice(Z,Z+X)||"ff")]}if(D.startsWith("rgb")){let X=D.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(X){let[Z,re,Q,he,oe,ke,ge,Ue,je,dt,gt,It]=X,_t=[he||" ",ge||" ",dt].join("");if(_t===" "||_t===" /"||_t===",,"||_t===",,,"){let qt=[Q,ke,je].join(""),tr=qt==="%%%"?100:qt===""?255:0;if(tr){let lr=[Kn(+re/tr,0,1),Kn(+oe/tr,0,1),Kn(+Ue/tr,0,1),gt?Tn(+gt,It):1];if(Qn(lr))return lr}}return}}let G=D.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(G){let[X,Z,re,Q,he,oe,ke,ge,Ue]=G,je=[re||" ",he||" ",ke].join("");if(je===" "||je===" /"||je===",,"||je===",,,"){let dt=[+Z,Kn(+Q,0,100),Kn(+oe,0,100),ge?Tn(+ge,Ue):1];if(Qn(dt))return(function([gt,It,_t,qt]){function tr(lr){let qr=(lr+gt/30)%12,jr=It*Math.min(_t,1-_t);return _t-jr*Math.max(-1,Math.min(qr-3,9-qr,1))}return gt=fc(gt),It/=100,_t/=100,[tr(0),tr(8),tr(4),qt]})(dt)}}})(h);return b?new ii(...b,!1):void 0}get rgb(){let{r:h,g:b,b:D,a:z}=this,G=z||1/0;return this.overwriteGetter("rgb",[h/G,b/G,D/G,z])}get hcl(){return this.overwriteGetter("hcl",(function(h){let[b,D,z,G]=Af(h),X=Math.sqrt(D*D+z*z);return[Math.round(1e4*X)?fc(Math.atan2(z,D)*su):NaN,X,b,G]})(this.rgb))}get lab(){return this.overwriteGetter("lab",Af(this.rgb))}overwriteGetter(h,b){return Object.defineProperty(this,h,{value:b}),b}toString(){let[h,b,D,z]=this.rgb;return`rgba(${[h,b,D].map((G=>Math.round(255*G))).join(",")},${z})`}static interpolate(h,b,D,z="rgb"){switch(z){case"rgb":{let[G,X,Z,re]=Ra(h.rgb,b.rgb,D);return new ii(G,X,Z,re,!1)}case"hcl":{let[G,X,Z,re]=h.hcl,[Q,he,oe,ke]=b.hcl,ge,Ue;if(isNaN(G)||isNaN(Q))isNaN(G)?isNaN(Q)?ge=NaN:(ge=Q,Z!==1&&Z!==0||(Ue=he)):(ge=G,oe!==1&&oe!==0||(Ue=X));else{let _t=Q-G;Q>G&&_t>180?_t-=360:Q180&&(_t+=360),ge=G+D*_t}let[je,dt,gt,It]=(function([_t,qt,tr,lr]){return _t=isNaN(_t)?0:_t*Zs,er([tr,Math.cos(_t)*qt,Math.sin(_t)*qt,lr])})([ge,Ue!=null?Ue:Qi(X,he,D),Qi(Z,oe,D),Qi(re,ke,D)]);return new ii(je,dt,gt,It,!1)}case"lab":{let[G,X,Z,re]=er(Ra(h.lab,b.lab,D));return new ii(G,X,Z,re,!1)}}}}ii.black=new ii(0,0,0,1),ii.white=new ii(1,1,1,1),ii.transparent=new ii(0,0,0,0),ii.red=new ii(1,0,0,1);class Za{constructor(h,b,D){this.sensitivity=h?b?"variant":"case":b?"accent":"base",this.locale=D,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(h,b){return this.collator.compare(h,b)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let ja=["bottom","center","top"];class qo{constructor(h,b,D,z,G,X){this.text=h,this.image=b,this.scale=D,this.fontStack=z,this.textColor=G,this.verticalAlign=X}}class $a{constructor(h){this.sections=h}static fromString(h){return new $a([new qo(h,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some((h=>h.text.length!==0||h.image&&h.image.name.length!==0))}static factory(h){return h instanceof $a?h:$a.fromString(h)}toString(){return this.sections.length===0?"":this.sections.map((h=>h.text)).join("")}}class Ka{constructor(h){this.values=h.slice()}static parse(h){if(h instanceof Ka)return h;if(typeof h=="number")return new Ka([h,h,h,h]);if(Array.isArray(h)&&!(h.length<1||h.length>4)){for(let b of h)if(typeof b!="number")return;switch(h.length){case 1:h=[h[0],h[0],h[0],h[0]];break;case 2:h=[h[0],h[1],h[0],h[1]];break;case 3:h=[h[0],h[1],h[2],h[1]]}return new Ka(h)}}toString(){return JSON.stringify(this.values)}static interpolate(h,b,D){return new Ka(Ra(h.values,b.values,D))}}class Oa{constructor(h){this.values=h.slice()}static parse(h){if(h instanceof Oa)return h;if(typeof h=="number")return new Oa([h]);if(Array.isArray(h)){for(let b of h)if(typeof b!="number")return;return new Oa(h)}}toString(){return JSON.stringify(this.values)}static interpolate(h,b,D){return new Oa(Ra(h.values,b.values,D))}}class Ni{constructor(h){this.values=h.slice()}static parse(h){if(h instanceof Ni)return h;if(typeof h=="string"){let D=ii.parse(h);return D?new Ni([D]):void 0}if(!Array.isArray(h))return;let b=[];for(let D of h){if(typeof D!="string")return;let z=ii.parse(D);if(!z)return;b.push(z)}return new Ni(b)}toString(){return JSON.stringify(this.values)}static interpolate(h,b,D,z="rgb"){let G=[];if(h.values.length!=b.values.length)throw new Error(`colorArray: Arrays have mismatched length (${h.values.length} vs. ${b.values.length}), cannot interpolate.`);for(let X=0;X=0&&M<=255&&typeof h=="number"&&h>=0&&h<=255&&typeof b=="number"&&b>=0&&b<=255?D===void 0||typeof D=="number"&&D>=0&&D<=1?null:`Invalid rgba value [${[M,h,b,D].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof D=="number"?[M,h,b,D]:[M,h,b]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function pa(M){if(M===null||typeof M=="string"||typeof M=="boolean"||typeof M=="number"||M instanceof oo||M instanceof ii||M instanceof Za||M instanceof $a||M instanceof Ka||M instanceof Oa||M instanceof Ni||M instanceof xo||M instanceof so)return!0;if(Array.isArray(M)){for(let h of M)if(!pa(h))return!1;return!0}if(typeof M=="object"){for(let h in M)if(!pa(M[h]))return!1;return!0}return!1}function la(M){if(M===null)return Dt;if(typeof M=="string")return Vt;if(typeof M=="boolean")return Qt;if(typeof M=="number")return At;if(M instanceof ii)return Ut;if(M instanceof oo)return _r;if(M instanceof Za)return qn;if(M instanceof $a)return ri;if(M instanceof Ka)return Jn;if(M instanceof Oa)return Vi;if(M instanceof Ni)return Ii;if(M instanceof xo)return ha;if(M instanceof so)return ra;if(Array.isArray(M)){let h=M.length,b;for(let D of M){let z=la(D);if(b){if(b===z)continue;b=Jr;break}b=z}return va(b||Jr,h)}return rn}function As(M){let h=typeof M;return M===null?"":h==="string"||h==="number"||h==="boolean"?String(M):M instanceof ii||M instanceof oo||M instanceof $a||M instanceof Ka||M instanceof Oa||M instanceof Ni||M instanceof xo||M instanceof so?M.toString():JSON.stringify(M)}class Ms{constructor(h,b){this.type=h,this.value=b}static parse(h,b){if(h.length!==2)return b.error(`'literal' expression requires exactly one argument, but found ${h.length-1} instead.`);if(!pa(h[1]))return b.error("invalid value");let D=h[1],z=la(D),G=b.expectedType;return z.kind!=="array"||z.N!==0||!G||G.kind!=="array"||typeof G.N=="number"&&G.N!==0||(z=G),new Ms(z,D)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let xu={string:Vt,number:At,boolean:Qt,object:rn};class rs{constructor(h,b){this.type=h,this.args=b}static parse(h,b){if(h.length<2)return b.error("Expected at least one argument.");let D,z=1,G=h[0];if(G==="array"){let Z,re;if(h.length>2){let Q=h[1];if(typeof Q!="string"||!(Q in xu)||Q==="object")return b.error('The item type argument of "array" must be one of string, number, boolean',1);Z=xu[Q],z++}else Z=Jr;if(h.length>3){if(h[2]!==null&&(typeof h[2]!="number"||h[2]<0||h[2]!==Math.floor(h[2])))return b.error('The length argument to "array" must be a positive integer literal',2);re=h[2],z++}D=va(Z,re)}else{if(!xu[G])throw new Error(`Types doesn't contain name = ${G}`);D=xu[G]}let X=[];for(;zh.outputDefined()))}}let Ls={"to-boolean":Qt,"to-color":Ut,"to-number":At,"to-string":Vt};class $s{constructor(h,b){this.type=h,this.args=b}static parse(h,b){if(h.length<2)return b.error("Expected at least one argument.");let D=h[0];if(!Ls[D])throw new Error(`Can't parse ${D} as it is not part of the known types`);if((D==="to-boolean"||D==="to-string")&&h.length!==2)return b.error("Expected one argument.");let z=Ls[D],G=[];for(let X=1;X4?`Invalid rgba value ${JSON.stringify(b)}: expected an array containing either three or four numeric values.`:Co(b[0],b[1],b[2],b[3]),!D))return new ii(b[0]/255,b[1]/255,b[2]/255,b[3])}throw new ka(D||`Could not parse color from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"padding":{let b;for(let D of this.args){b=D.evaluate(h);let z=Ka.parse(b);if(z)return z}throw new ka(`Could not parse padding from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"numberArray":{let b;for(let D of this.args){b=D.evaluate(h);let z=Oa.parse(b);if(z)return z}throw new ka(`Could not parse numberArray from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"colorArray":{let b;for(let D of this.args){b=D.evaluate(h);let z=Ni.parse(b);if(z)return z}throw new ka(`Could not parse colorArray from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"variableAnchorOffsetCollection":{let b;for(let D of this.args){b=D.evaluate(h);let z=xo.parse(b);if(z)return z}throw new ka(`Could not parse variableAnchorOffsetCollection from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"number":{let b=null;for(let D of this.args){if(b=D.evaluate(h),b===null)return 0;let z=Number(b);if(!isNaN(z))return z}throw new ka(`Could not convert ${JSON.stringify(b)} to number.`)}case"formatted":return $a.fromString(As(this.args[0].evaluate(h)));case"resolvedImage":return so.fromString(As(this.args[0].evaluate(h)));case"projectionDefinition":return this.args[0].evaluate(h);default:return As(this.args[0].evaluate(h))}}eachChild(h){this.args.forEach(h)}outputDefined(){return this.args.every((h=>h.outputDefined()))}}let Kc=["Unknown","Point","LineString","Polygon"];class _u{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"?Kc[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(h){let b=this._parseColorCache.get(h);return b||(b=ii.parse(h),this._parseColorCache.set(h,b)),b}}class Gu{constructor(h,b,D=[],z,G=new Cn,X=[]){this.registry=h,this.path=D,this.key=D.map((Z=>`[${Z}]`)).join(""),this.scope=G,this.errors=X,this.expectedType=z,this._isConstant=b}parse(h,b,D,z,G={}){return b?this.concat(b,D,z)._parse(h,G):this._parse(h,G)}_parse(h,b){function D(z,G,X){return X==="assert"?new rs(G,[z]):X==="coerce"?new $s(G,[z]):z}if(h!==null&&typeof h!="string"&&typeof h!="boolean"&&typeof h!="number"||(h=["literal",h]),Array.isArray(h)){if(h.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let z=h[0];if(typeof z!="string")return this.error(`Expression name must be a string, but found ${typeof z} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let G=this.registry[z];if(G){let X=G.parse(h,this);if(!X)return null;if(this.expectedType){let Z=this.expectedType,re=X.type;if(Z.kind!=="string"&&Z.kind!=="number"&&Z.kind!=="boolean"&&Z.kind!=="object"&&Z.kind!=="array"||re.kind!=="value"){if(Z.kind==="projectionDefinition"&&["string","array"].includes(re.kind)||["color","formatted","resolvedImage"].includes(Z.kind)&&["value","string"].includes(re.kind)||["padding","numberArray"].includes(Z.kind)&&["value","number","array"].includes(re.kind)||Z.kind==="colorArray"&&["value","string","array"].includes(re.kind)||Z.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(re.kind))X=D(X,Z,b.typeAnnotation||"coerce");else if(this.checkSubtype(Z,re))return null}else X=D(X,Z,b.typeAnnotation||"assert")}if(!(X instanceof Ms)&&X.type.kind!=="resolvedImage"&&this._isConstant(X)){let Z=new _u;try{X=new Ms(X.type,X.evaluate(Z))}catch(re){return this.error(re.message),null}}return X}return this.error(`Unknown expression "${z}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(h===void 0?"'undefined' value invalid. Use null instead.":typeof h=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof h} instead.`)}concat(h,b,D){let z=typeof h=="number"?this.path.concat(h):this.path,G=D?this.scope.concat(D):this.scope;return new Gu(this.registry,this._isConstant,z,b||null,G,this.errors)}error(h,...b){let D=`${this.key}${b.map((z=>`[${z}]`)).join("")}`;this.errors.push(new Zr(D,h))}checkSubtype(h,b){let D=Ma(h,b);return D&&this.error(D),D}}class Ja{constructor(h,b){this.type=b.type,this.bindings=[].concat(h),this.result=b}evaluate(h){return this.result.evaluate(h)}eachChild(h){for(let b of this.bindings)h(b[1]);h(this.result)}static parse(h,b){if(h.length<4)return b.error(`Expected at least 3 arguments, but found ${h.length-1} instead.`);let D=[];for(let G=1;G=D.length)throw new ka(`Array index out of bounds: ${b} > ${D.length-1}.`);if(b!==Math.floor(b))throw new ka(`Array index must be an integer, but found ${b} instead.`);return D[b]}eachChild(h){h(this.index),h(this.input)}outputDefined(){return!1}}class ma{constructor(h,b){this.type=Qt,this.needle=h,this.haystack=b}static parse(h,b){if(h.length!==3)return b.error(`Expected 2 arguments, but found ${h.length-1} instead.`);let D=b.parse(h[1],1,Jr),z=b.parse(h[2],2,Jr);return D&&z?Ga(D.type,[Qt,Vt,At,Dt,Jr])?new ma(D,z):b.error(`Expected first argument to be of type boolean, string, number or null, but found ${Xi(D.type)} instead`):null}evaluate(h){let b=this.needle.evaluate(h),D=this.haystack.evaluate(h);if(!D)return!1;if(!ss(b,["boolean","string","number","null"]))throw new ka(`Expected first argument to be of type boolean, string, number or null, but found ${Xi(la(b))} instead.`);if(!ss(D,["string","array"]))throw new ka(`Expected second argument to be of type array or string, but found ${Xi(la(D))} instead.`);return D.indexOf(b)>=0}eachChild(h){h(this.needle),h(this.haystack)}outputDefined(){return!0}}class Ps{constructor(h,b,D){this.type=At,this.needle=h,this.haystack=b,this.fromIndex=D}static parse(h,b){if(h.length<=2||h.length>=5)return b.error(`Expected 2 or 3 arguments, but found ${h.length-1} instead.`);let D=b.parse(h[1],1,Jr),z=b.parse(h[2],2,Jr);if(!D||!z)return null;if(!Ga(D.type,[Qt,Vt,At,Dt,Jr]))return b.error(`Expected first argument to be of type boolean, string, number or null, but found ${Xi(D.type)} instead`);if(h.length===4){let G=b.parse(h[3],3,At);return G?new Ps(D,z,G):null}return new Ps(D,z)}evaluate(h){let b=this.needle.evaluate(h),D=this.haystack.evaluate(h);if(!ss(b,["boolean","string","number","null"]))throw new ka(`Expected first argument to be of type boolean, string, number or null, but found ${Xi(la(b))} instead.`);let z;if(this.fromIndex&&(z=this.fromIndex.evaluate(h)),ss(D,["string"])){let G=D.indexOf(b,z);return G===-1?-1:[...D.slice(0,G)].length}if(ss(D,["array"]))return D.indexOf(b,z);throw new ka(`Expected second argument to be of type array or string, but found ${Xi(la(D))} instead.`)}eachChild(h){h(this.needle),h(this.haystack),this.fromIndex&&h(this.fromIndex)}outputDefined(){return!1}}class Ca{constructor(h,b,D,z,G,X){this.inputType=h,this.type=b,this.input=D,this.cases=z,this.outputs=G,this.otherwise=X}static parse(h,b){if(h.length<5)return b.error(`Expected at least 4 arguments, but found only ${h.length-1}.`);if(h.length%2!=1)return b.error("Expected an even number of arguments.");let D,z;b.expectedType&&b.expectedType.kind!=="value"&&(z=b.expectedType);let G={},X=[];for(let Q=2;QNumber.MAX_SAFE_INTEGER)return ke.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Ue=="number"&&Math.floor(Ue)!==Ue)return ke.error("Numeric branch labels must be integer values.");if(D){if(ke.checkSubtype(D,la(Ue)))return null}else D=la(Ue);if(G[String(Ue)]!==void 0)return ke.error("Branch labels must be unique.");G[String(Ue)]=X.length}let ge=b.parse(oe,Q,z);if(!ge)return null;z=z||ge.type,X.push(ge)}let Z=b.parse(h[1],1,Jr);if(!Z)return null;let re=b.parse(h[h.length-1],h.length-1,z);return re?Z.type.kind!=="value"&&b.concat(1).checkSubtype(D,Z.type)?null:new Ca(D,z,Z,G,X,re):null}evaluate(h){let b=this.input.evaluate(h);return(la(b)===this.inputType&&this.outputs[this.cases[b]]||this.otherwise).evaluate(h)}eachChild(h){h(this.input),this.outputs.forEach(h),h(this.otherwise)}outputDefined(){return this.outputs.every((h=>h.outputDefined()))&&this.otherwise.outputDefined()}}class Pl{constructor(h,b,D){this.type=h,this.branches=b,this.otherwise=D}static parse(h,b){if(h.length<4)return b.error(`Expected at least 3 arguments, but found only ${h.length-1}.`);if(h.length%2!=0)return b.error("Expected an odd number of arguments.");let D;b.expectedType&&b.expectedType.kind!=="value"&&(D=b.expectedType);let z=[];for(let X=1;Xb.outputDefined()))&&this.otherwise.outputDefined()}}class ll{constructor(h,b,D,z){this.type=h,this.input=b,this.beginIndex=D,this.endIndex=z}static parse(h,b){if(h.length<=2||h.length>=5)return b.error(`Expected 2 or 3 arguments, but found ${h.length-1} instead.`);let D=b.parse(h[1],1,Jr),z=b.parse(h[2],2,At);if(!D||!z)return null;if(!Ga(D.type,[va(Jr),Vt,Jr]))return b.error(`Expected first argument to be of type array or string, but found ${Xi(D.type)} instead`);if(h.length===4){let G=b.parse(h[3],3,At);return G?new ll(D.type,D,z,G):null}return new ll(D.type,D,z)}evaluate(h){let b=this.input.evaluate(h),D=this.beginIndex.evaluate(h),z;if(this.endIndex&&(z=this.endIndex.evaluate(h)),ss(b,["string"]))return[...b].slice(D,z).join("");if(ss(b,["array"]))return b.slice(D,z);throw new ka(`Expected first argument to be of type array or string, but found ${Xi(la(b))} instead.`)}eachChild(h){h(this.input),h(this.beginIndex),this.endIndex&&h(this.endIndex)}outputDefined(){return!1}}function Jc(M,h){let b=M.length-1,D,z,G=0,X=b,Z=0;for(;G<=X;)if(Z=Math.floor((G+X)/2),D=M[Z],z=M[Z+1],D<=h){if(Z===b||hh))throw new ka("Input is not a number.");X=Z-1}return 0}class lu{constructor(h,b,D){this.type=h,this.input=b,this.labels=[],this.outputs=[];for(let[z,G]of D)this.labels.push(z),this.outputs.push(G)}static parse(h,b){if(h.length-1<4)return b.error(`Expected at least 4 arguments, but found only ${h.length-1}.`);if((h.length-1)%2!=0)return b.error("Expected an even number of arguments.");let D=b.parse(h[1],1,At);if(!D)return null;let z=[],G=null;b.expectedType&&b.expectedType.kind!=="value"&&(G=b.expectedType);for(let X=1;X=Z)return b.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Q);let oe=b.parse(re,he,G);if(!oe)return null;G=G||oe.type,z.push([Z,oe])}return new lu(G,D,z)}evaluate(h){let b=this.labels,D=this.outputs;if(b.length===1)return D[0].evaluate(h);let z=this.input.evaluate(h);if(z<=b[0])return D[0].evaluate(h);let G=b.length;return z>=b[G-1]?D[G-1].evaluate(h):D[Jc(b,z)].evaluate(h)}eachChild(h){h(this.input);for(let b of this.outputs)h(b)}outputDefined(){return this.outputs.every((h=>h.outputDefined()))}}function Mf(M){return M&&M.__esModule&&Object.prototype.hasOwnProperty.call(M,"default")?M.default:M}var Bd,Hu,Sf=(function(){if(Hu)return Bd;function M(h,b,D,z){this.cx=3*h,this.bx=3*(D-h)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*b,this.by=3*(z-b)-this.cy,this.ay=1-this.cy-this.by,this.p1x=h,this.p1y=b,this.p2x=D,this.p2y=z}return Hu=1,Bd=M,M.prototype={sampleCurveX:function(h){return((this.ax*h+this.bx)*h+this.cx)*h},sampleCurveY:function(h){return((this.ay*h+this.by)*h+this.cy)*h},sampleCurveDerivativeX:function(h){return(3*this.ax*h+2*this.bx)*h+this.cx},solveCurveX:function(h,b){if(b===void 0&&(b=1e-6),h<0)return 0;if(h>1)return 1;for(var D=h,z=0;z<8;z++){var G=this.sampleCurveX(D)-h;if(Math.abs(G)G?Z=D:re=D,D=.5*(re-Z)+Z;return D},solve:function(h,b){return this.sampleCurveY(this.solveCurveX(h,b))}},Bd})(),kc=Mf(Sf);class Uo{constructor(h,b,D,z,G){this.type=h,this.operator=b,this.interpolation=D,this.input=z,this.labels=[],this.outputs=[];for(let[X,Z]of G)this.labels.push(X),this.outputs.push(Z)}static interpolationFactor(h,b,D,z){let G=0;if(h.name==="exponential")G=ns(b,h.base,D,z);else if(h.name==="linear")G=ns(b,1,D,z);else if(h.name==="cubic-bezier"){let X=h.controlPoints;G=new kc(X[0],X[1],X[2],X[3]).solve(ns(b,1,D,z))}return G}static parse(h,b){let[D,z,G,...X]=h;if(!Array.isArray(z)||z.length===0)return b.error("Expected an interpolation type expression.",1);if(z[0]==="linear")z={name:"linear"};else if(z[0]==="exponential"){let Q=z[1];if(typeof Q!="number")return b.error("Exponential interpolation requires a numeric base.",1,1);z={name:"exponential",base:Q}}else{if(z[0]!=="cubic-bezier")return b.error(`Unknown interpolation type ${String(z[0])}`,1,0);{let Q=z.slice(1);if(Q.length!==4||Q.some((he=>typeof he!="number"||he<0||he>1)))return b.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);z={name:"cubic-bezier",controlPoints:Q}}}if(h.length-1<4)return b.error(`Expected at least 4 arguments, but found only ${h.length-1}.`);if((h.length-1)%2!=0)return b.error("Expected an even number of arguments.");if(G=b.parse(G,2,At),!G)return null;let Z=[],re=null;D!=="interpolate-hcl"&&D!=="interpolate-lab"||b.expectedType==Ii?b.expectedType&&b.expectedType.kind!=="value"&&(re=b.expectedType):re=Ut;for(let Q=0;Q=he)return b.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ke);let Ue=b.parse(oe,ge,re);if(!Ue)return null;re=re||Ue.type,Z.push([he,Ue])}return yo(re,At)||yo(re,_r)||yo(re,Ut)||yo(re,Jn)||yo(re,Vi)||yo(re,Ii)||yo(re,ha)||yo(re,va(At))?new Uo(re,D,z,G,Z):b.error(`Type ${Xi(re)} is not interpolatable.`)}evaluate(h){let b=this.labels,D=this.outputs;if(b.length===1)return D[0].evaluate(h);let z=this.input.evaluate(h);if(z<=b[0])return D[0].evaluate(h);let G=b.length;if(z>=b[G-1])return D[G-1].evaluate(h);let X=Jc(b,z),Z=Uo.interpolationFactor(this.interpolation,z,b[X],b[X+1]),re=D[X].evaluate(h),Q=D[X+1].evaluate(h);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return Qi(re,Q,Z);case"color":return ii.interpolate(re,Q,Z);case"padding":return Ka.interpolate(re,Q,Z);case"colorArray":return Ni.interpolate(re,Q,Z);case"numberArray":return Oa.interpolate(re,Q,Z);case"variableAnchorOffsetCollection":return xo.interpolate(re,Q,Z);case"array":return Ra(re,Q,Z);case"projectionDefinition":return oo.interpolate(re,Q,Z)}case"interpolate-hcl":switch(this.type.kind){case"color":return ii.interpolate(re,Q,Z,"hcl");case"colorArray":return Ni.interpolate(re,Q,Z,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return ii.interpolate(re,Q,Z,"lab");case"colorArray":return Ni.interpolate(re,Q,Z,"lab")}}}eachChild(h){h(this.input);for(let b of this.outputs)h(b)}outputDefined(){return this.outputs.every((h=>h.outputDefined()))}}function ns(M,h,b,D){let z=D-b,G=M-b;return z===0?0:h===1?G/z:(Math.pow(h,G)-1)/(Math.pow(h,z)-1)}let Ks={color:ii.interpolate,number:Qi,padding:Ka.interpolate,numberArray:Oa.interpolate,colorArray:Ni.interpolate,variableAnchorOffsetCollection:xo.interpolate,array:Ra};class Ef{constructor(h,b){this.type=h,this.args=b}static parse(h,b){if(h.length<2)return b.error("Expected at least one argument.");let D=null,z=b.expectedType;z&&z.kind!=="value"&&(D=z);let G=[];for(let Z of h.slice(1)){let re=b.parse(Z,1+G.length,D,void 0,{typeAnnotation:"omit"});if(!re)return null;D=D||re.type,G.push(re)}if(!D)throw new Error("No output type");let X=z&&G.some((Z=>Ma(z,Z.type)));return new Ef(X?Jr:D,G)}evaluate(h){let b,D=null,z=0;for(let G of this.args)if(z++,D=G.evaluate(h),D&&D instanceof so&&!D.available&&(b||(b=D.name),D=null,z===this.args.length&&(D=b)),D!==null)break;return D}eachChild(h){this.args.forEach(h)}outputDefined(){return this.args.every((h=>h.outputDefined()))}}function ju(M,h){return M==="=="||M==="!="?h.kind==="boolean"||h.kind==="string"||h.kind==="number"||h.kind==="null"||h.kind==="value":h.kind==="string"||h.kind==="number"||h.kind==="value"}function gs(M,h,b,D){return D.compare(h,b)===0}function bu(M,h,b){let D=M!=="=="&&M!=="!=";return class BWe{constructor(G,X,Z){this.type=Qt,this.lhs=G,this.rhs=X,this.collator=Z,this.hasUntypedArgument=G.type.kind==="value"||X.type.kind==="value"}static parse(G,X){if(G.length!==3&&G.length!==4)return X.error("Expected two or three arguments.");let Z=G[0],re=X.parse(G[1],1,Jr);if(!re)return null;if(!ju(Z,re.type))return X.concat(1).error(`"${Z}" comparisons are not supported for type '${Xi(re.type)}'.`);let Q=X.parse(G[2],2,Jr);if(!Q)return null;if(!ju(Z,Q.type))return X.concat(2).error(`"${Z}" comparisons are not supported for type '${Xi(Q.type)}'.`);if(re.type.kind!==Q.type.kind&&re.type.kind!=="value"&&Q.type.kind!=="value")return X.error(`Cannot compare types '${Xi(re.type)}' and '${Xi(Q.type)}'.`);D&&(re.type.kind==="value"&&Q.type.kind!=="value"?re=new rs(Q.type,[re]):re.type.kind!=="value"&&Q.type.kind==="value"&&(Q=new rs(re.type,[Q])));let he=null;if(G.length===4){if(re.type.kind!=="string"&&Q.type.kind!=="string"&&re.type.kind!=="value"&&Q.type.kind!=="value")return X.error("Cannot use collator to compare non-string types.");if(he=X.parse(G[3],3,qn),!he)return null}return new BWe(re,Q,he)}evaluate(G){let X=this.lhs.evaluate(G),Z=this.rhs.evaluate(G);if(D&&this.hasUntypedArgument){let re=la(X),Q=la(Z);if(re.kind!==Q.kind||re.kind!=="string"&&re.kind!=="number")throw new ka(`Expected arguments for "${M}" to be (string, string) or (number, number), but found (${re.kind}, ${Q.kind}) instead.`)}if(this.collator&&!D&&this.hasUntypedArgument){let re=la(X),Q=la(Z);if(re.kind!=="string"||Q.kind!=="string")return h(G,X,Z)}return this.collator?b(G,X,Z,this.collator.evaluate(G)):h(G,X,Z)}eachChild(G){G(this.lhs),G(this.rhs),this.collator&&G(this.collator)}outputDefined(){return!0}}}let kf=bu("==",(function(M,h,b){return h===b}),gs),ah=bu("!=",(function(M,h,b){return h!==b}),(function(M,h,b,D){return!gs(0,h,b,D)})),Od=bu("<",(function(M,h,b){return h",(function(M,h,b){return h>b}),(function(M,h,b,D){return D.compare(h,b)>0})),uu=bu("<=",(function(M,h,b){return h<=b}),(function(M,h,b,D){return D.compare(h,b)<=0})),oh=bu(">=",(function(M,h,b){return h>=b}),(function(M,h,b,D){return D.compare(h,b)>=0}));class hc{constructor(h,b,D){this.type=qn,this.locale=D,this.caseSensitive=h,this.diacriticSensitive=b}static parse(h,b){if(h.length!==2)return b.error("Expected one argument.");let D=h[1];if(typeof D!="object"||Array.isArray(D))return b.error("Collator options argument must be an object.");let z=b.parse(D["case-sensitive"]!==void 0&&D["case-sensitive"],1,Qt);if(!z)return null;let G=b.parse(D["diacritic-sensitive"]!==void 0&&D["diacritic-sensitive"],1,Qt);if(!G)return null;let X=null;return D.locale&&(X=b.parse(D.locale,1,Vt),!X)?null:new hc(z,G,X)}evaluate(h){return new Za(this.caseSensitive.evaluate(h),this.diacriticSensitive.evaluate(h),this.locale?this.locale.evaluate(h):null)}eachChild(h){h(this.caseSensitive),h(this.diacriticSensitive),this.locale&&h(this.locale)}outputDefined(){return!1}}class Fl{constructor(h,b,D,z,G,X){this.type=Vt,this.number=h,this.locale=b,this.currency=D,this.unit=z,this.minFractionDigits=G,this.maxFractionDigits=X}static parse(h,b){if(h.length!==3)return b.error("Expected two arguments.");let D=b.parse(h[1],1,At);if(!D)return null;let z=h[2];if(typeof z!="object"||Array.isArray(z))return b.error("NumberFormat options argument must be an object.");let G=null;if(z.locale&&(G=b.parse(z.locale,1,Vt),!G))return null;let X=null;if(z.currency&&(X=b.parse(z.currency,1,Vt),!X))return null;let Z=null;if(z.unit&&(Z=b.parse(z.unit,1,Vt),!Z))return null;if(X&&Z)return b.error("NumberFormat options `currency` and `unit` are mutually exclusive");let re=null;if(z["min-fraction-digits"]&&(re=b.parse(z["min-fraction-digits"],1,At),!re))return null;let Q=null;return z["max-fraction-digits"]&&(Q=b.parse(z["max-fraction-digits"],1,At),!Q)?null:new Fl(D,G,X,Z,re,Q)}evaluate(h){return new Intl.NumberFormat(this.locale?this.locale.evaluate(h):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(h):void 0,unit:this.unit?this.unit.evaluate(h):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(h):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(h):void 0}).format(this.number.evaluate(h))}eachChild(h){h(this.number),this.locale&&h(this.locale),this.currency&&h(this.currency),this.unit&&h(this.unit),this.minFractionDigits&&h(this.minFractionDigits),this.maxFractionDigits&&h(this.maxFractionDigits)}outputDefined(){return!1}}class Zo{constructor(h){this.type=ri,this.sections=h}static parse(h,b){if(h.length<2)return b.error("Expected at least one argument.");let D=h[1];if(!Array.isArray(D)&&typeof D=="object")return b.error("First argument must be an image or text section.");let z=[],G=!1;for(let X=1;X<=h.length-1;++X){let Z=h[X];if(G&&typeof Z=="object"&&!Array.isArray(Z)){G=!1;let re=null;if(Z["font-scale"]&&(re=b.parse(Z["font-scale"],1,At),!re))return null;let Q=null;if(Z["text-font"]&&(Q=b.parse(Z["text-font"],1,va(Vt)),!Q))return null;let he=null;if(Z["text-color"]&&(he=b.parse(Z["text-color"],1,Ut),!he))return null;let oe=null;if(Z["vertical-align"]){if(typeof Z["vertical-align"]=="string"&&!ja.includes(Z["vertical-align"]))return b.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${Z["vertical-align"]}' instead.`);if(oe=b.parse(Z["vertical-align"],1,Vt),!oe)return null}let ke=z[z.length-1];ke.scale=re,ke.font=Q,ke.textColor=he,ke.verticalAlign=oe}else{let re=b.parse(h[X],1,Jr);if(!re)return null;let Q=re.type.kind;if(Q!=="string"&&Q!=="value"&&Q!=="null"&&Q!=="resolvedImage")return b.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");G=!0,z.push({content:re,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Zo(z)}evaluate(h){return new $a(this.sections.map((b=>{let D=b.content.evaluate(h);return la(D)===ra?new qo("",D,null,null,null,b.verticalAlign?b.verticalAlign.evaluate(h):null):new qo(As(D),null,b.scale?b.scale.evaluate(h):null,b.font?b.font.evaluate(h).join(","):null,b.textColor?b.textColor.evaluate(h):null,b.verticalAlign?b.verticalAlign.evaluate(h):null)})))}eachChild(h){for(let b of this.sections)h(b.content),b.scale&&h(b.scale),b.font&&h(b.font),b.textColor&&h(b.textColor),b.verticalAlign&&h(b.verticalAlign)}outputDefined(){return!1}}class Ro{constructor(h){this.type=ra,this.input=h}static parse(h,b){if(h.length!==2)return b.error("Expected two arguments.");let D=b.parse(h[1],1,Vt);return D?new Ro(D):b.error("No image name provided.")}evaluate(h){let b=this.input.evaluate(h),D=so.fromString(b);return D&&h.availableImages&&(D.available=h.availableImages.indexOf(b)>-1),D}eachChild(h){h(this.input)}outputDefined(){return!1}}class is{constructor(h){this.type=At,this.input=h}static parse(h,b){if(h.length!==2)return b.error(`Expected 1 argument, but found ${h.length-1} instead.`);let D=b.parse(h[1],1);return D?D.type.kind!=="array"&&D.type.kind!=="string"&&D.type.kind!=="value"?b.error(`Expected argument of type string or array, but found ${Xi(D.type)} instead.`):new is(D):null}evaluate(h){let b=this.input.evaluate(h);if(typeof b=="string")return[...b].length;if(Array.isArray(b))return b.length;throw new ka(`Expected value to be of type string or array, but found ${Xi(la(b))} instead.`)}eachChild(h){h(this.input)}outputDefined(){return!1}}let Dl=8192;function dc(M,h){let b=(180+M[0])/360,D=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+M[1]*Math.PI/360)))/360,z=Math.pow(2,h.z);return[Math.round(b*z*Dl),Math.round(D*z*Dl)]}function ef(M,h){let b=Math.pow(2,h.z);return[(z=(M[0]/Dl+h.x)/b,360*z-180),(D=(M[1]/Dl+h.y)/b,360/Math.PI*Math.atan(Math.exp((180-360*D)*Math.PI/180))-90)];var D,z}function Cc(M,h){M[0]=Math.min(M[0],h[0]),M[1]=Math.min(M[1],h[1]),M[2]=Math.max(M[2],h[0]),M[3]=Math.max(M[3],h[1])}function sh(M,h){return!(M[0]<=h[0]||M[2]>=h[2]||M[1]<=h[1]||M[3]>=h[3])}function X0(M,h,b){let D=M[0]-h[0],z=M[1]-h[1],G=M[0]-b[0],X=M[1]-b[1];return D*X-G*z==0&&D*G<=0&&z*X<=0}function Nd(M,h,b,D){return(z=[D[0]-b[0],D[1]-b[1]])[0]*(G=[h[0]-M[0],h[1]-M[1]])[1]-z[1]*G[0]!=0&&!(!Vd(M,h,b,D)||!Vd(b,D,M,h));var z,G}function Cf(M,h,b){for(let D of b)for(let z=0;z(z=M)[1]!=(X=Z[re+1])[1]>z[1]&&z[0]<(X[0]-G[0])*(z[1]-G[1])/(X[1]-G[1])+G[0]&&(D=!D)}var z,G,X;return D}function Ud(M,h){for(let b of h)if(Vo(M,b))return!0;return!1}function zh(M,h){for(let b of M)if(!Vo(b,h))return!1;for(let b=0;b0&&Z<0||X<0&&Z>0}function rf(M,h,b){let D=[];for(let z=0;zb[2]){let z=.5*D,G=M[0]-b[0]>z?-D:b[0]-M[0]>z?D:0;G===0&&(G=M[0]-b[2]>z?-D:b[2]-M[0]>z?D:0),M[0]+=G}Cc(h,M)}function dd(M,h,b,D){let z=Math.pow(2,D.z)*Dl,G=[D.x*Dl,D.y*Dl],X=[];for(let Z of M)for(let re of Z){let Q=[re.x+G[0],re.y+G[1]];vc(Q,h,b,z),X.push(Q)}return X}function Bh(M,h,b,D){let z=Math.pow(2,D.z)*Dl,G=[D.x*Dl,D.y*Dl],X=[];for(let re of M){let Q=[];for(let he of re){let oe=[he.x+G[0],he.y+G[1]];Cc(h,oe),Q.push(oe)}X.push(Q)}if(h[2]-h[0]<=z/2){(Z=h)[0]=Z[1]=1/0,Z[2]=Z[3]=-1/0;for(let re of X)for(let Q of re)vc(Q,h,b,z)}var Z;return X}class Wu{constructor(h,b){this.type=Qt,this.geojson=h,this.geometries=b}static parse(h,b){if(h.length!==2)return b.error(`'within' expression requires exactly one argument, but found ${h.length-1} instead.`);if(pa(h[1])){let D=h[1];if(D.type==="FeatureCollection"){let z=[];for(let G of D.features){let{type:X,coordinates:Z}=G.geometry;X==="Polygon"&&z.push(Z),X==="MultiPolygon"&&z.push(...Z)}if(z.length)return new Wu(D,{type:"MultiPolygon",coordinates:z})}else if(D.type==="Feature"){let z=D.geometry.type;if(z==="Polygon"||z==="MultiPolygon")return new Wu(D,D.geometry)}else if(D.type==="Polygon"||D.type==="MultiPolygon")return new Wu(D,D)}return b.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(h){if(h.geometry()!=null&&h.canonicalID()!=null){if(h.geometryType()==="Point")return(function(b,D){let z=[1/0,1/0,-1/0,-1/0],G=[1/0,1/0,-1/0,-1/0],X=b.canonicalID();if(D.type==="Polygon"){let Z=rf(D.coordinates,G,X),re=dd(b.geometry(),z,G,X);if(!sh(z,G))return!1;for(let Q of re)if(!Vo(Q,Z))return!1}if(D.type==="MultiPolygon"){let Z=qh(D.coordinates,G,X),re=dd(b.geometry(),z,G,X);if(!sh(z,G))return!1;for(let Q of re)if(!Ud(Q,Z))return!1}return!0})(h,this.geometries);if(h.geometryType()==="LineString")return(function(b,D){let z=[1/0,1/0,-1/0,-1/0],G=[1/0,1/0,-1/0,-1/0],X=b.canonicalID();if(D.type==="Polygon"){let Z=rf(D.coordinates,G,X),re=Bh(b.geometry(),z,G,X);if(!sh(z,G))return!1;for(let Q of re)if(!zh(Q,Z))return!1}if(D.type==="MultiPolygon"){let Z=qh(D.coordinates,G,X),re=Bh(b.geometry(),z,G,X);if(!sh(z,G))return!1;for(let Q of re)if(!tf(Q,Z))return!1}return!0})(h,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let vd=class{constructor(M=[],h=(b,D)=>bD?1:0){if(this.data=M,this.length=this.data.length,this.compare=h,this.length>0)for(let b=(this.length>>1)-1;b>=0;b--)this._down(b)}push(M){this.data.push(M),this._up(this.length++)}pop(){if(this.length===0)return;let M=this.data[0],h=this.data.pop();return--this.length>0&&(this.data[0]=h,this._down(0)),M}peek(){return this.data[0]}_up(M){let{data:h,compare:b}=this,D=h[M];for(;M>0;){let z=M-1>>1,G=h[z];if(b(D,G)>=0)break;h[M]=G,M=z}h[M]=D}_down(M){let{data:h,compare:b}=this,D=this.length>>1,z=h[M];for(;M=0)break;h[M]=h[G],M=G}h[M]=z}};function pd(M,h,b=0,D=M.length-1,z=nf){for(;D>b;){if(D-b>600){let re=D-b+1,Q=h-b+1,he=Math.log(re),oe=.5*Math.exp(2*he/3),ke=.5*Math.sqrt(he*oe*(re-oe)/re)*(Q-re/2<0?-1:1);pd(M,h,Math.max(b,Math.floor(h-Q*oe/re+ke)),Math.min(D,Math.floor(h+(re-Q)*oe/re+ke)),z)}let G=M[h],X=b,Z=D;for(lh(M,b,h),z(M[D],G)>0&&lh(M,b,D);X0;)Z--}z(M[b],G)===0?lh(M,b,Z):(Z++,lh(M,Z,D)),Z<=h&&(b=Z+1),h<=Z&&(D=Z-1)}}function lh(M,h,b){let D=M[h];M[h]=M[b],M[b]=D}function nf(M,h){return Mh?1:0}function uh(M,h){if(M.length<=1)return[M];let b=[],D,z;for(let G of M){let X=gd(G);X!==0&&(G.area=Math.abs(X),z===void 0&&(z=X<0),z===X<0?(D&&b.push(D),D=[G]):D.push(G))}if(D&&b.push(D),h>1)for(let G=0;G1?(Q=h[re+1][0],he=h[re+1][1]):ge>0&&(Q+=oe/this.kx*ge,he+=ke/this.ky*ge)),oe=this.wrap(b[0]-Q)*this.kx,ke=(b[1]-he)*this.ky;let Ue=oe*oe+ke*ke;Ue180;)h-=360;return h}}function yd(M,h){return h[0]-M[0]}function Lf(M){return M[1]-M[0]+1}function wu(M,h){return M[1]>=M[0]&&M[1]M[1])return[null,null];let b=Lf(M);if(h){if(b===2)return[M,null];let z=Math.floor(b/2);return[[M[0],M[0]+z],[M[0]+z,M[1]]]}if(b===1)return[M,null];let D=Math.floor(b/2)-1;return[[M[0],M[0]+D],[M[0]+D+1,M[1]]]}function Oh(M,h){if(!wu(h,M.length))return[1/0,1/0,-1/0,-1/0];let b=[1/0,1/0,-1/0,-1/0];for(let D=h[0];D<=h[1];++D)Cc(b,M[D]);return b}function hh(M){let h=[1/0,1/0,-1/0,-1/0];for(let b of M)for(let D of b)Cc(h,D);return h}function Gd(M){return M[0]!==-1/0&&M[1]!==-1/0&&M[2]!==1/0&&M[3]!==1/0}function Gl(M,h,b){if(!Gd(M)||!Gd(h))return NaN;let D=0,z=0;return M[2]h[2]&&(D=M[0]-h[2]),M[1]>h[3]&&(z=M[1]-h[3]),M[3]=D)return D;if(sh(z,G)){if(Hd(M,h))return 0}else if(Hd(h,M))return 0;let X=1/0;for(let Z of M)for(let re=0,Q=Z.length,he=Q-1;re0;){let re=X.pop();if(re[0]>=G)continue;let Q=re[1],he=h?50:100;if(Lf(Q)<=he){if(!wu(Q,M.length))return NaN;if(h){let oe=Pf(M,Q,b,D);if(isNaN(oe)||oe===0)return oe;G=Math.min(G,oe)}else for(let oe=Q[0];oe<=Q[1];++oe){let ke=dh(M[oe],b,D);if(G=Math.min(G,ke),G===0)return 0}}else{let oe=fh(Q,h);p0(X,G,D,M,Z,oe[0]),p0(X,G,D,M,Z,oe[1])}}return G}function Il(M,h,b,D,z,G=1/0){let X=Math.min(G,z.distance(M[0],b[0]));if(X===0)return X;let Z=new vd([[0,[0,M.length-1],[0,b.length-1]]],yd);for(;Z.length>0;){let re=Z.pop();if(re[0]>=X)continue;let Q=re[1],he=re[2],oe=h?50:100,ke=D?50:100;if(Lf(Q)<=oe&&Lf(he)<=ke){if(!wu(Q,M.length)&&wu(he,b.length))return NaN;let ge;if(h&&D)ge=Hl(M,Q,b,he,z),X=Math.min(X,ge);else if(h&&!D){let Ue=M.slice(Q[0],Q[1]+1);for(let je=he[0];je<=he[1];++je)if(ge=wl(b[je],Ue,z),X=Math.min(X,ge),X===0)return X}else if(!h&&D){let Ue=b.slice(he[0],he[1]+1);for(let je=Q[0];je<=Q[1];++je)if(ge=wl(M[je],Ue,z),X=Math.min(X,ge),X===0)return X}else ge=_d(M,Q,b,he,z),X=Math.min(X,ge)}else{let ge=fh(Q,h),Ue=fh(he,D);Tu(Z,X,z,M,b,ge[0],Ue[0]),Tu(Z,X,z,M,b,ge[0],Ue[1]),Tu(Z,X,z,M,b,ge[1],Ue[0]),Tu(Z,X,z,M,b,ge[1],Ue[1])}}return X}function g0(M){return M.type==="MultiPolygon"?M.coordinates.map((h=>({type:"Polygon",coordinates:h}))):M.type==="MultiLineString"?M.coordinates.map((h=>({type:"LineString",coordinates:h}))):M.type==="MultiPoint"?M.coordinates.map((h=>({type:"Point",coordinates:h}))):[M]}class Yu{constructor(h,b){this.type=At,this.geojson=h,this.geometries=b}static parse(h,b){if(h.length!==2)return b.error(`'distance' expression requires exactly one argument, but found ${h.length-1} instead.`);if(pa(h[1])){let D=h[1];if(D.type==="FeatureCollection")return new Yu(D,D.features.map((z=>g0(z.geometry))).flat());if(D.type==="Feature")return new Yu(D,g0(D.geometry));if("type"in D&&"coordinates"in D)return new Yu(D,g0(D))}return b.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(h){if(h.geometry()!=null&&h.canonicalID()!=null){if(h.geometryType()==="Point")return(function(b,D){let z=b.geometry(),G=z.flat().map((re=>ef([re.x,re.y],b.canonical)));if(z.length===0)return NaN;let X=new md(G[0][1]),Z=1/0;for(let re of D){switch(re.type){case"Point":Z=Math.min(Z,Il(G,!1,[re.coordinates],!1,X,Z));break;case"LineString":Z=Math.min(Z,Il(G,!1,re.coordinates,!0,X,Z));break;case"Polygon":Z=Math.min(Z,Au(G,!1,re.coordinates,X,Z))}if(Z===0)return Z}return Z})(h,this.geometries);if(h.geometryType()==="LineString")return(function(b,D){let z=b.geometry(),G=z.flat().map((re=>ef([re.x,re.y],b.canonical)));if(z.length===0)return NaN;let X=new md(G[0][1]),Z=1/0;for(let re of D){switch(re.type){case"Point":Z=Math.min(Z,Il(G,!0,[re.coordinates],!1,X,Z));break;case"LineString":Z=Math.min(Z,Il(G,!0,re.coordinates,!0,X,Z));break;case"Polygon":Z=Math.min(Z,Au(G,!0,re.coordinates,X,Z))}if(Z===0)return Z}return Z})(h,this.geometries);if(h.geometryType()==="Polygon")return(function(b,D){let z=b.geometry();if(z.length===0||z[0].length===0)return NaN;let G=uh(z,0).map((re=>re.map((Q=>Q.map((he=>ef([he.x,he.y],b.canonical))))))),X=new md(G[0][0][0][1]),Z=1/0;for(let re of D)for(let Q of G){switch(re.type){case"Point":Z=Math.min(Z,Au([re.coordinates],!1,Q,X,Z));break;case"LineString":Z=Math.min(Z,Au(re.coordinates,!0,Q,X,Z));break;case"Polygon":Z=Math.min(Z,_o(Q,re.coordinates,X,Z))}if(Z===0)return Z}return Z})(h,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class Nh{constructor(h){this.type=Jr,this.key=h}static parse(h,b){if(h.length!==2)return b.error(`Expected 1 argument, but found ${h.length-1} instead.`);let D=h[1];return D==null?b.error("Global state property must be defined."):typeof D!="string"?b.error(`Global state property must be string, but found ${typeof h[1]} instead.`):new Nh(D)}evaluate(h){var b;let D=(b=h.globals)===null||b===void 0?void 0:b.globalState;return D&&Object.keys(D).length!==0?bn(D,this.key):null}eachChild(){}outputDefined(){return!1}}let Tl={"==":kf,"!=":ah,">":Qc,"<":Od,">=":oh,"<=":uu,array:rs,at:Sa,boolean:rs,case:Pl,coalesce:Ef,collator:hc,format:Zo,image:Ro,in:ma,"index-of":Ps,interpolate:Uo,"interpolate-hcl":Uo,"interpolate-lab":Uo,length:is,let:Ja,literal:Ms,match:Ca,number:rs,"number-format":Fl,object:rs,slice:ll,step:lu,string:rs,"to-boolean":$s,"to-color":$s,"to-number":$s,"to-string":$s,var:ps,within:Wu,distance:Yu,"global-state":Nh};class jl{constructor(h,b,D,z){this.name=h,this.type=b,this._evaluate=D,this.args=z}evaluate(h){return this._evaluate(h,this.args)}eachChild(h){this.args.forEach(h)}outputDefined(){return!1}static parse(h,b){let D=h[0],z=jl.definitions[D];if(!z)return b.error(`Unknown expression "${D}". If you wanted a literal array, use ["literal", [...]].`,0);let G=Array.isArray(z)?z[0]:z.type,X=Array.isArray(z)?[[z[1],z[2]]]:z.overloads,Z=X.filter((([Q])=>!Array.isArray(Q)||Q.length===h.length-1)),re=null;for(let[Q,he]of Z){re=new Gu(b.registry,gc,b.path,null,b.scope);let oe=[],ke=!1;for(let ge=1;ge{return ke=oe,Array.isArray(ke)?`(${ke.map(Xi).join(", ")})`:`(${Xi(ke.type)}...)`;var ke})).join(" | "),he=[];for(let oe=1;oe{b=h?b&&gc(D):b&&D instanceof Ms})),!!b&&of(M)&&bd(M,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function of(M){if(M instanceof jl&&(M.name==="get"&&M.args.length===1||M.name==="feature-state"||M.name==="has"&&M.args.length===1||M.name==="properties"||M.name==="geometry-type"||M.name==="id"||/^filter-/.test(M.name))||M instanceof Wu||M instanceof Yu)return!1;let h=!0;return M.eachChild((b=>{h&&!of(b)&&(h=!1)})),h}function sf(M){if(M instanceof jl&&M.name==="feature-state")return!1;let h=!0;return M.eachChild((b=>{h&&!sf(b)&&(h=!1)})),h}function bd(M,h){if(M instanceof jl&&h.indexOf(M.name)>=0)return!1;let b=!0;return M.eachChild((D=>{b&&!bd(D,h)&&(b=!1)})),b}function Gh(M){return{result:"success",value:M}}function Xu(M){return{result:"error",value:M}}function Pc(M){return M["property-type"]==="data-driven"||M["property-type"]==="cross-faded-data-driven"}function Ff(M){return!!M.expression&&M.expression.parameters.indexOf("zoom")>-1}function Df(M){return!!M.expression&&M.expression.interpolated}function La(M){return M instanceof Number?"number":M instanceof String?"string":M instanceof Boolean?"boolean":Array.isArray(M)?"array":M===null?"null":typeof M}function Rf(M){return typeof M=="object"&&M!==null&&!Array.isArray(M)&&la(M)===rn}function m0(M){return M}function wd(M,h){let b=M.stops&&typeof M.stops[0][0]=="object",D=b||!(b||M.property!==void 0),z=M.type||(Df(h)?"exponential":"interval"),G=(function(he){switch(he.type){case"color":return ii.parse;case"padding":return Ka.parse;case"numberArray":return Oa.parse;case"colorArray":return Ni.parse;default:return null}})(h);if(G&&((M=Fr({},M)).stops&&(M.stops=M.stops.map((he=>[he[0],G(he[1])]))),M.default=G(M.default?M.default:h.default)),M.colorSpace&&(X=M.colorSpace)!=="rgb"&&X!=="hcl"&&X!=="lab")throw new Error(`Unknown color space: "${M.colorSpace}"`);var X;let Z=(function(he){switch(he){case"exponential":return Td;case"interval":return y0;case"categorical":return Z0;case"identity":return ul;default:throw new Error(`Unknown function type "${he}"`)}})(z),re,Q;if(z==="categorical"){re=Object.create(null);for(let he of M.stops)re[he[0]]=he[1];Q=typeof M.stops[0][0]}if(b){let he={},oe=[];for(let Ue=0;UeUe[0])),evaluate:({zoom:Ue},je)=>Td({stops:ke,base:M.base},h,Ue).evaluate(Ue,je)}}if(D){let he=z==="exponential"?{name:"exponential",base:M.base!==void 0?M.base:1}:null;return{kind:"camera",interpolationType:he,interpolationFactor:Uo.interpolationFactor.bind(void 0,he),zoomStops:M.stops.map((oe=>oe[0])),evaluate:({zoom:oe})=>Z(M,h,oe,re,Q)}}return{kind:"source",evaluate(he,oe){let ke=oe&&oe.properties?oe.properties[M.property]:void 0;return ke===void 0?Hh(M.default,h.default):Z(M,h,ke,re,Q)}}}function Hh(M,h,b){return M!==void 0?M:h!==void 0?h:b!==void 0?b:void 0}function Z0(M,h,b,D,z){return Hh(typeof b===z?D[b]:void 0,M.default,h.default)}function y0(M,h,b){if(La(b)!=="number")return Hh(M.default,h.default);let D=M.stops.length;if(D===1||b<=M.stops[0][0])return M.stops[0][1];if(b>=M.stops[D-1][0])return M.stops[D-1][1];let z=Jc(M.stops.map((G=>G[0])),b);return M.stops[z][1]}function Td(M,h,b){let D=M.base!==void 0?M.base:1;if(La(b)!=="number")return Hh(M.default,h.default);let z=M.stops.length;if(z===1||b<=M.stops[0][0])return M.stops[0][1];if(b>=M.stops[z-1][0])return M.stops[z-1][1];let G=Jc(M.stops.map((he=>he[0])),b),X=(function(he,oe,ke,ge){let Ue=ge-ke,je=he-ke;return Ue===0?0:oe===1?je/Ue:(Math.pow(oe,je)-1)/(Math.pow(oe,Ue)-1)})(b,D,M.stops[G][0],M.stops[G+1][0]),Z=M.stops[G][1],re=M.stops[G+1][1],Q=Ks[h.type]||m0;return typeof Z.evaluate=="function"?{evaluate(...he){let oe=Z.evaluate.apply(void 0,he),ke=re.evaluate.apply(void 0,he);if(oe!==void 0&&ke!==void 0)return Q(oe,ke,X,M.colorSpace)}}:Q(Z,re,X,M.colorSpace)}function ul(M,h,b){switch(h.type){case"color":b=ii.parse(b);break;case"formatted":b=$a.fromString(b.toString());break;case"resolvedImage":b=so.fromString(b.toString());break;case"padding":b=Ka.parse(b);break;case"colorArray":b=Ni.parse(b);break;case"numberArray":b=Oa.parse(b);break;default:La(b)===h.type||h.type==="enum"&&h.values[b]||(b=void 0)}return Hh(b,M.default,h.default)}jl.register(Tl,{error:[{kind:"error"},[Vt],(M,[h])=>{throw new ka(h.evaluate(M))}],typeof:[Vt,[Jr],(M,[h])=>Xi(la(h.evaluate(M)))],"to-rgba":[va(At,4),[Ut],(M,[h])=>{let[b,D,z,G]=h.evaluate(M).rgb;return[255*b,255*D,255*z,G]}],rgb:[Ut,[At,At,At],Uh],rgba:[Ut,[At,At,At,At],Uh],has:{type:Qt,overloads:[[[Vt],(M,[h])=>Vh(h.evaluate(M),M.properties())],[[Vt,rn],(M,[h,b])=>Vh(h.evaluate(M),b.evaluate(M))]]},get:{type:Jr,overloads:[[[Vt],(M,[h])=>jd(h.evaluate(M),M.properties())],[[Vt,rn],(M,[h,b])=>jd(h.evaluate(M),b.evaluate(M))]]},"feature-state":[Jr,[Vt],(M,[h])=>jd(h.evaluate(M),M.featureState||{})],properties:[rn,[],M=>M.properties()],"geometry-type":[Vt,[],M=>M.geometryType()],id:[Jr,[],M=>M.id()],zoom:[At,[],M=>M.globals.zoom],"heatmap-density":[At,[],M=>M.globals.heatmapDensity||0],elevation:[At,[],M=>M.globals.elevation||0],"line-progress":[At,[],M=>M.globals.lineProgress||0],accumulated:[Jr,[],M=>M.globals.accumulated===void 0?null:M.globals.accumulated],"+":[At,pc(At),(M,h)=>{let b=0;for(let D of h)b+=D.evaluate(M);return b}],"*":[At,pc(At),(M,h)=>{let b=1;for(let D of h)b*=D.evaluate(M);return b}],"-":{type:At,overloads:[[[At,At],(M,[h,b])=>h.evaluate(M)-b.evaluate(M)],[[At],(M,[h])=>-h.evaluate(M)]]},"/":[At,[At,At],(M,[h,b])=>h.evaluate(M)/b.evaluate(M)],"%":[At,[At,At],(M,[h,b])=>h.evaluate(M)%b.evaluate(M)],ln2:[At,[],()=>Math.LN2],pi:[At,[],()=>Math.PI],e:[At,[],()=>Math.E],"^":[At,[At,At],(M,[h,b])=>Math.pow(h.evaluate(M),b.evaluate(M))],sqrt:[At,[At],(M,[h])=>Math.sqrt(h.evaluate(M))],log10:[At,[At],(M,[h])=>Math.log(h.evaluate(M))/Math.LN10],ln:[At,[At],(M,[h])=>Math.log(h.evaluate(M))],log2:[At,[At],(M,[h])=>Math.log(h.evaluate(M))/Math.LN2],sin:[At,[At],(M,[h])=>Math.sin(h.evaluate(M))],cos:[At,[At],(M,[h])=>Math.cos(h.evaluate(M))],tan:[At,[At],(M,[h])=>Math.tan(h.evaluate(M))],asin:[At,[At],(M,[h])=>Math.asin(h.evaluate(M))],acos:[At,[At],(M,[h])=>Math.acos(h.evaluate(M))],atan:[At,[At],(M,[h])=>Math.atan(h.evaluate(M))],min:[At,pc(At),(M,h)=>Math.min(...h.map((b=>b.evaluate(M))))],max:[At,pc(At),(M,h)=>Math.max(...h.map((b=>b.evaluate(M))))],abs:[At,[At],(M,[h])=>Math.abs(h.evaluate(M))],round:[At,[At],(M,[h])=>{let b=h.evaluate(M);return b<0?-Math.round(-b):Math.round(b)}],floor:[At,[At],(M,[h])=>Math.floor(h.evaluate(M))],ceil:[At,[At],(M,[h])=>Math.ceil(h.evaluate(M))],"filter-==":[Qt,[Vt,Jr],(M,[h,b])=>M.properties()[h.value]===b.value],"filter-id-==":[Qt,[Jr],(M,[h])=>M.id()===h.value],"filter-type-==":[Qt,[Vt],(M,[h])=>M.geometryType()===h.value],"filter-<":[Qt,[Vt,Jr],(M,[h,b])=>{let D=M.properties()[h.value],z=b.value;return typeof D==typeof z&&D{let b=M.id(),D=h.value;return typeof b==typeof D&&b":[Qt,[Vt,Jr],(M,[h,b])=>{let D=M.properties()[h.value],z=b.value;return typeof D==typeof z&&D>z}],"filter-id->":[Qt,[Jr],(M,[h])=>{let b=M.id(),D=h.value;return typeof b==typeof D&&b>D}],"filter-<=":[Qt,[Vt,Jr],(M,[h,b])=>{let D=M.properties()[h.value],z=b.value;return typeof D==typeof z&&D<=z}],"filter-id-<=":[Qt,[Jr],(M,[h])=>{let b=M.id(),D=h.value;return typeof b==typeof D&&b<=D}],"filter->=":[Qt,[Vt,Jr],(M,[h,b])=>{let D=M.properties()[h.value],z=b.value;return typeof D==typeof z&&D>=z}],"filter-id->=":[Qt,[Jr],(M,[h])=>{let b=M.id(),D=h.value;return typeof b==typeof D&&b>=D}],"filter-has":[Qt,[Jr],(M,[h])=>h.value in M.properties()],"filter-has-id":[Qt,[],M=>M.id()!==null&&M.id()!==void 0],"filter-type-in":[Qt,[va(Vt)],(M,[h])=>h.value.indexOf(M.geometryType())>=0],"filter-id-in":[Qt,[va(Jr)],(M,[h])=>h.value.indexOf(M.id())>=0],"filter-in-small":[Qt,[Vt,va(Jr)],(M,[h,b])=>b.value.indexOf(M.properties()[h.value])>=0],"filter-in-large":[Qt,[Vt,va(Jr)],(M,[h,b])=>(function(D,z,G,X){for(;G<=X;){let Z=G+X>>1;if(z[Z]===D)return!0;z[Z]>D?X=Z-1:G=Z+1}return!1})(M.properties()[h.value],b.value,0,b.value.length-1)],all:{type:Qt,overloads:[[[Qt,Qt],(M,[h,b])=>h.evaluate(M)&&b.evaluate(M)],[pc(Qt),(M,h)=>{for(let b of h)if(!b.evaluate(M))return!1;return!0}]]},any:{type:Qt,overloads:[[[Qt,Qt],(M,[h,b])=>h.evaluate(M)||b.evaluate(M)],[pc(Qt),(M,h)=>{for(let b of h)if(b.evaluate(M))return!0;return!1}]]},"!":[Qt,[Qt],(M,[h])=>!h.evaluate(M)],"is-supported-script":[Qt,[Vt],(M,[h])=>{let b=M.globals&&M.globals.isSupportedScript;return!b||b(h.evaluate(M))}],upcase:[Vt,[Vt],(M,[h])=>h.evaluate(M).toUpperCase()],downcase:[Vt,[Vt],(M,[h])=>h.evaluate(M).toLowerCase()],concat:[Vt,pc(Jr),(M,h)=>h.map((b=>As(b.evaluate(M)))).join("")],split:[va(Vt),[Vt,Vt],(M,[h,b])=>h.evaluate(M).split(b.evaluate(M))],join:[Vt,[va(Vt),Vt],(M,[h,b])=>h.evaluate(M).join(b.evaluate(M))],"resolved-locale":[Vt,[qn],(M,[h])=>h.evaluate(M).resolvedLocale()]});class Wl{constructor(h,b,D){this.expression=h,this._warningHistory={},this._evaluator=new _u,this._defaultValue=b?(function(z){if(z.type==="color"&&Rf(z.default))return new ii(0,0,0,0);switch(z.type){case"color":return ii.parse(z.default)||null;case"padding":return Ka.parse(z.default)||null;case"numberArray":return Oa.parse(z.default)||null;case"colorArray":return Ni.parse(z.default)||null;case"variableAnchorOffsetCollection":return xo.parse(z.default)||null;case"projectionDefinition":return oo.parse(z.default)||null;default:return z.default===void 0?null:z.default}})(b):null,this._enumValues=b&&b.type==="enum"?b.values:null,this._globalState=D}evaluateWithoutErrorHandling(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._evaluator.globals=h,this._evaluator.feature=b,this._evaluator.featureState=D,this._evaluator.canonical=z,this._evaluator.availableImages=G||null,this._evaluator.formattedSection=X,this.expression.evaluate(this._evaluator)}evaluate(h,b,D,z,G,X){this._globalState&&(h=hr(h,this._globalState)),this._evaluator.globals=h,this._evaluator.feature=b||null,this._evaluator.featureState=D||null,this._evaluator.canonical=z,this._evaluator.availableImages=G||null,this._evaluator.formattedSection=X||null;try{let Z=this.expression.evaluate(this._evaluator);if(Z==null||typeof Z=="number"&&Z!=Z)return this._defaultValue;if(this._enumValues&&!(Z in this._enumValues))throw new ka(`Expected value to be one of ${Object.keys(this._enumValues).map((re=>JSON.stringify(re))).join(", ")}, but found ${JSON.stringify(Z)} instead.`);return Z}catch(Z){return this._warningHistory[Z.message]||(this._warningHistory[Z.message]=!0,typeof console!="undefined"&&console.warn(Z.message)),this._defaultValue}}}function If(M){return Array.isArray(M)&&M.length>0&&typeof M[0]=="string"&&M[0]in Tl}function vh(M,h,b){let D=new Gu(Tl,gc,[],h?(function(G){let X={color:Ut,string:Vt,number:At,enum:Vt,boolean:Qt,formatted:ri,padding:Jn,numberArray:Vi,colorArray:Ii,projectionDefinition:_r,resolvedImage:ra,variableAnchorOffsetCollection:ha};return G.type==="array"?va(X[G.value]||Jr,G.length):X[G.type]})(h):void 0),z=D.parse(M,void 0,void 0,void 0,h&&h.type==="string"?{typeAnnotation:"coerce"}:void 0);return z?Gh(new Wl(z,h,b)):Xu(D.errors)}class zf{constructor(h,b,D){this.kind=h,this._styleExpression=b,this.isStateDependent=h!=="constant"&&!sf(b.expression),this.globalStateRefs=zt(b.expression),this._globalState=D}evaluateWithoutErrorHandling(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(h,b,D,z,G,X)}evaluate(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._styleExpression.evaluate(h,b,D,z,G,X)}}class qf{constructor(h,b,D,z,G){this.kind=h,this.zoomStops=D,this._styleExpression=b,this.isStateDependent=h!=="camera"&&!sf(b.expression),this.globalStateRefs=zt(b.expression),this.interpolationType=z,this._globalState=G}evaluateWithoutErrorHandling(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(h,b,D,z,G,X)}evaluate(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._styleExpression.evaluate(h,b,D,z,G,X)}interpolationFactor(h,b,D){return this.interpolationType?Uo.interpolationFactor(this.interpolationType,h,b,D):0}}function Ze(M,h,b){let D=vh(M,h,b);if(D.result==="error")return D;let z=D.value.expression,G=of(z);if(!G&&!Pc(h))return Xu([new Zr("","data expressions not supported")]);let X=bd(z,["zoom"]);if(!X&&!Ff(h))return Xu([new Zr("","zoom expressions not supported")]);let Z=Wt(z);return Z||X?Z instanceof Zr?Xu([Z]):Z instanceof Uo&&!Df(h)?Xu([new Zr("",'"interpolate" expressions cannot be used with this property')]):Gh(Z?new qf(G?"camera":"composite",D.value,Z.labels,Z instanceof Uo?Z.interpolation:void 0,b):new zf(G?"constant":"source",D.value,b)):Xu([new Zr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class yt{constructor(h,b){this._parameters=h,this._specification=b,Fr(this,wd(this._parameters,this._specification))}static deserialize(h){return new yt(h._parameters,h._specification)}static serialize(h){return{_parameters:h._parameters,_specification:h._specification}}}function Wt(M){let h=null;if(M instanceof Ja)h=Wt(M.result);else if(M instanceof Ef){for(let b of M.args)if(h=Wt(b),h)break}else(M instanceof lu||M instanceof Uo)&&M.input instanceof jl&&M.input.name==="zoom"&&(h=M);return h instanceof Zr||M.eachChild((b=>{let D=Wt(b);D instanceof Zr?h=D:!h&&D?h=new Zr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):h&&D&&h!==D&&(h=new Zr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),h}function zt(M,h=new Set){return M instanceof Nh&&h.add(M.key),M.eachChild((b=>{zt(b,h)})),h}function hr(M,h){let{zoom:b,heatmapDensity:D,elevation:z,lineProgress:G,isSupportedScript:X,accumulated:Z}=M!=null?M:{};return{zoom:b,heatmapDensity:D,elevation:z,lineProgress:G,isSupportedScript:X,accumulated:Z,globalState:h}}function Ur(M){if(M===!0||M===!1)return!0;if(!Array.isArray(M)||M.length===0)return!1;switch(M[0]){case"has":return M.length>=2&&M[1]!=="$id"&&M[1]!=="$type";case"in":return M.length>=3&&(typeof M[1]!="string"||Array.isArray(M[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return M.length!==3||Array.isArray(M[1])||Array.isArray(M[2]);case"any":case"all":for(let h of M.slice(1))if(!Ur(h)&&typeof h!="boolean")return!1;return!0;default:return!0}}let Qr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function cn(M,h){if(M==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Ur(M)||(M=en(M));let b=vh(M,Qr,h);if(b.result==="error")throw new Error(b.value.map((D=>`${D.key}: ${D.message}`)).join(", "));return{filter:(D,z,G)=>b.value.evaluate(D,z,{},G),needGeometry:Fn(M),getGlobalStateRefs:()=>zt(b.value.expression)}}function yn(M,h){return Mh?1:0}function Fn(M){if(!Array.isArray(M))return!1;if(M[0]==="within"||M[0]==="distance")return!0;for(let h=1;h"||h==="<="||h===">="?vn(M[1],M[2],h):h==="any"?(b=M.slice(1),["any"].concat(b.map(en))):h==="all"?["all"].concat(M.slice(1).map(en)):h==="none"?["all"].concat(M.slice(1).map(en).map(On)):h==="in"?mn(M[1],M.slice(2)):h==="!in"?On(mn(M[1],M.slice(2))):h==="has"?Pn(M[1]):h!=="!has"||On(Pn(M[1]));var b}function vn(M,h,b){switch(M){case"$type":return[`filter-type-${b}`,h];case"$id":return[`filter-id-${b}`,h];default:return[`filter-${b}`,M,h]}}function mn(M,h){if(h.length===0)return!1;switch(M){case"$type":return["filter-type-in",["literal",h]];case"$id":return["filter-id-in",["literal",h]];default:return h.length>200&&!h.some((b=>typeof b!=typeof h[0]))?["filter-in-large",M,["literal",h.sort(yn)]]:["filter-in-small",M,["literal",h]]}}function Pn(M){switch(M){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",M]}}function On(M){return["!",M]}function ki(M){let h=typeof M;if(h==="number"||h==="boolean"||h==="string"||M==null)return JSON.stringify(M);if(Array.isArray(M)){let z="[";for(let G of M)z+=`${ki(G)},`;return`${z}]`}let b=Object.keys(M).sort(),D="{";for(let z=0;zD.maximum?[new xr(h,b,`${b} is greater than the maximum value ${D.maximum}`)]:[]}function Ha(M){let h=M.valueSpec,b=pi(M.value.type),D,z,G,X={},Z=b!=="categorical"&&M.value.property===void 0,re=!Z,Q=La(M.value.stops)==="array"&&La(M.value.stops[0])==="array"&&La(M.value.stops[0][0])==="object",he=Gn({key:M.key,value:M.value,valueSpec:M.styleSpec.function,validateSpec:M.validateSpec,style:M.style,styleSpec:M.styleSpec,objectElementValidators:{stops:function(ge){if(b==="identity")return[new xr(ge.key,ge.value,'identity function may not have a "stops" property')];let Ue=[],je=ge.value;return Ue=Ue.concat(Zi({key:ge.key,value:je,valueSpec:ge.valueSpec,validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec,arrayElementValidator:oe})),La(je)==="array"&&je.length===0&&Ue.push(new xr(ge.key,je,"array must have at least one stop")),Ue},default:function(ge){return ge.validateSpec({key:ge.key,value:ge.value,valueSpec:h,validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec})}}});return b==="identity"&&Z&&he.push(new xr(M.key,M.value,'missing required property "property"')),b==="identity"||M.value.stops||he.push(new xr(M.key,M.value,'missing required property "stops"')),b==="exponential"&&M.valueSpec.expression&&!Df(M.valueSpec)&&he.push(new xr(M.key,M.value,"exponential functions not supported")),M.styleSpec.$version>=8&&(re&&!Pc(M.valueSpec)?he.push(new xr(M.key,M.value,"property functions not supported")):Z&&!Ff(M.valueSpec)&&he.push(new xr(M.key,M.value,"zoom functions not supported"))),b!=="categorical"&&!Q||M.value.property!==void 0||he.push(new xr(M.key,M.value,'"property" property is required')),he;function oe(ge){let Ue=[],je=ge.value,dt=ge.key;if(La(je)!=="array")return[new xr(dt,je,`array expected, ${La(je)} found`)];if(je.length!==2)return[new xr(dt,je,`array length 2 expected, length ${je.length} found`)];if(Q){if(La(je[0])!=="object")return[new xr(dt,je,`object expected, ${La(je[0])} found`)];if(je[0].zoom===void 0)return[new xr(dt,je,"object stop key must have zoom")];if(je[0].value===void 0)return[new xr(dt,je,"object stop key must have value")];if(G&&G>pi(je[0].zoom))return[new xr(dt,je[0].zoom,"stop zoom values must appear in ascending order")];pi(je[0].zoom)!==G&&(G=pi(je[0].zoom),z=void 0,X={}),Ue=Ue.concat(Gn({key:`${dt}[0]`,value:je[0],valueSpec:{zoom:{}},validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec,objectElementValidators:{zoom:na,value:ke}}))}else Ue=Ue.concat(ke({key:`${dt}[0]`,value:je[0],validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec},je));return If(Un(je[1]))?Ue.concat([new xr(`${dt}[1]`,je[1],"expressions are not allowed in function stops.")]):Ue.concat(ge.validateSpec({key:`${dt}[1]`,value:je[1],valueSpec:h,validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec}))}function ke(ge,Ue){let je=La(ge.value),dt=pi(ge.value),gt=ge.value!==null?ge.value:Ue;if(D){if(je!==D)return[new xr(ge.key,gt,`${je} stop domain type must match previous stop domain type ${D}`)]}else D=je;if(je!=="number"&&je!=="string"&&je!=="boolean")return[new xr(ge.key,gt,"stop domain value must be a number, string, or boolean")];if(je!=="number"&&b!=="categorical"){let It=`number expected, ${je} found`;return Pc(h)&&b===void 0&&(It+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new xr(ge.key,gt,It)]}return b!=="categorical"||je!=="number"||isFinite(dt)&&Math.floor(dt)===dt?b!=="categorical"&&je==="number"&&z!==void 0&&dtnew xr(`${M.key}${D.key}`,M.value,D.message)));let b=h.value.expression||h.value._styleExpression.expression;if(M.expressionContext==="property"&&M.propertyKey==="text-font"&&!b.outputDefined())return[new xr(M.key,M.value,`Invalid data expression for "${M.propertyKey}". Output values must be contained as literals within the expression.`)];if(M.expressionContext==="property"&&M.propertyType==="layout"&&!sf(b))return[new xr(M.key,M.value,'"feature-state" data expressions are not supported with layout properties.')];if(M.expressionContext==="filter"&&!sf(b))return[new xr(M.key,M.value,'"feature-state" data expressions are not supported with filters.')];if(M.expressionContext&&M.expressionContext.indexOf("cluster")===0){if(!bd(b,["zoom","feature-state"]))return[new xr(M.key,M.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(M.expressionContext==="cluster-initial"&&!of(b))return[new xr(M.key,M.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ya(M){let h=M.key,b=M.value,D=La(b);return D!=="string"?[new xr(h,b,`color expected, ${D} found`)]:ii.parse(String(b))?[]:[new xr(h,b,`color expected, "${b}" found`)]}function ho(M){let h=M.key,b=M.value,D=M.valueSpec,z=[];return Array.isArray(D.values)?D.values.indexOf(pi(b))===-1&&z.push(new xr(h,b,`expected one of [${D.values.join(", ")}], ${JSON.stringify(b)} found`)):Object.keys(D.values).indexOf(pi(b))===-1&&z.push(new xr(h,b,`expected one of [${Object.keys(D.values).join(", ")}], ${JSON.stringify(b)} found`)),z}function Pa(M){return Ur(Un(M.value))?Qa(Fr({},M,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Js(M)}function Js(M){let h=M.value,b=M.key;if(La(h)!=="array")return[new xr(b,h,`array expected, ${La(h)} found`)];let D=M.styleSpec,z,G=[];if(h.length<1)return[new xr(b,h,"filter array must have at least 1 element")];switch(G=G.concat(ho({key:`${b}[0]`,value:h[0],valueSpec:D.filter_operator,style:M.style,styleSpec:M.styleSpec})),pi(h[0])){case"<":case"<=":case">":case">=":h.length>=2&&pi(h[1])==="$type"&&G.push(new xr(b,h,`"$type" cannot be use with operator "${h[0]}"`));case"==":case"!=":h.length!==3&&G.push(new xr(b,h,`filter array for operator "${h[0]}" must have 3 elements`));case"in":case"!in":h.length>=2&&(z=La(h[1]),z!=="string"&&G.push(new xr(`${b}[1]`,h[1],`string expected, ${z} found`)));for(let X=2;X{oe in z&&D.push(new xr(G,z[oe],`"${oe}" is prohibited for ref layers`))})),X.layers.forEach((oe=>{pi(oe.id)===Q&&(he=oe)})),he?he.ref?D.push(new xr(G,z.ref,"ref cannot reference another ref layer")):re=pi(he.type):D.push(new xr(G,z.ref,`ref layer "${Q}" not found`))}else if(re!=="background")if(z.source){let he=X.sources&&X.sources[z.source],oe=he&&pi(he.type);he?oe==="vector"&&re==="raster"?D.push(new xr(G,z.source,`layer "${z.id}" requires a raster source`)):oe!=="raster-dem"&&re==="hillshade"||oe!=="raster-dem"&&re==="color-relief"?D.push(new xr(G,z.source,`layer "${z.id}" requires a raster-dem source`)):oe==="raster"&&re!=="raster"?D.push(new xr(G,z.source,`layer "${z.id}" requires a vector source`)):oe!=="vector"||z["source-layer"]?oe==="raster-dem"&&re!=="hillshade"&&re!=="color-relief"?D.push(new xr(G,z.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):re!=="line"||!z.paint||!z.paint["line-gradient"]||oe==="geojson"&&he.lineMetrics||D.push(new xr(G,z,`layer "${z.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):D.push(new xr(G,z,`layer "${z.id}" must specify a "source-layer"`)):D.push(new xr(G,z.source,`source "${z.source}" not found`))}else D.push(new xr(G,z,'missing required property "source"'));return re==="raster"&&(!((h=z.paint)===null||h===void 0)&&h.resampling)&&(!((b=z.paint)===null||b===void 0)&&b["raster-resampling"])&&D.push(new xr(G,z.paint,`layer "${z.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),D=D.concat(Gn({key:G,value:z,valueSpec:Z.layer,style:M.style,styleSpec:M.styleSpec,validateSpec:M.validateSpec,objectElementValidators:{"*":()=>[],type:()=>M.validateSpec({key:`${G}.type`,value:z.type,valueSpec:Z.layer.type,style:M.style,styleSpec:M.styleSpec,validateSpec:M.validateSpec,object:z,objectKey:"type"}),filter:Pa,layout:he=>Gn({layer:z,key:he.key,value:he.value,style:he.style,styleSpec:he.styleSpec,validateSpec:he.validateSpec,objectElementValidators:{"*":oe=>oi(Fr({layerType:re},oe))}}),paint:he=>Gn({layer:z,key:he.key,value:he.value,style:he.style,styleSpec:he.styleSpec,validateSpec:he.validateSpec,objectElementValidators:{"*":oe=>Io(Fr({layerType:re},oe))}})}})),D}function Go(M){let h=M.value,b=M.key,D=La(h);return D!=="string"?[new xr(b,h,`string expected, ${D} found`)]:[]}let Qs={promoteId:function({key:M,value:h}){if(La(h)==="string")return Go({key:M,value:h});{let b=[];for(let D in h)b.push(...Go({key:`${M}.${D}`,value:h[D]}));return b}}};function zl(M){let h=M.value,b=M.key,D=M.styleSpec,z=M.style,G=M.validateSpec;if(!h.type)return[new xr(b,h,'"type" is required')];let X=pi(h.type),Z;switch(X){case"vector":case"raster":return Z=Gn({key:b,value:h,valueSpec:D[`source_${X.replace("-","_")}`],style:M.style,styleSpec:D,objectElementValidators:Qs,validateSpec:G}),Z;case"raster-dem":return Z=(function(re){var Q;let he=(Q=re.sourceName)!==null&&Q!==void 0?Q:"",oe=re.value,ke=re.styleSpec,ge=ke.source_raster_dem,Ue=re.style,je=[],dt=La(oe);if(oe===void 0)return je;if(dt!=="object")return je.push(new xr("source_raster_dem",oe,`object expected, ${dt} found`)),je;let gt=pi(oe.encoding)==="custom",It=["redFactor","greenFactor","blueFactor","baseShift"],_t=re.value.encoding?`"${re.value.encoding}"`:"Default";for(let qt in oe)!gt&&It.includes(qt)?je.push(new xr(qt,oe[qt],`In "${he}": "${qt}" is only valid when "encoding" is set to "custom". ${_t} encoding found`)):ge[qt]?je=je.concat(re.validateSpec({key:qt,value:oe[qt],valueSpec:ge[qt],validateSpec:re.validateSpec,style:Ue,styleSpec:ke})):je.push(new xr(qt,oe[qt],`unknown property "${qt}"`));return je})({sourceName:b,value:h,style:M.style,styleSpec:D,validateSpec:G}),Z;case"geojson":if(Z=Gn({key:b,value:h,valueSpec:D.source_geojson,style:z,styleSpec:D,validateSpec:G,objectElementValidators:Qs}),h.cluster)for(let re in h.clusterProperties){let[Q,he]=h.clusterProperties[re],oe=typeof Q=="string"?[Q,["accumulated"],["get",re]]:Q;Z.push(...Qa({key:`${b}.${re}.map`,value:he,expressionContext:"cluster-map"})),Z.push(...Qa({key:`${b}.${re}.reduce`,value:oe,expressionContext:"cluster-reduce"}))}return Z;case"video":return Gn({key:b,value:h,valueSpec:D.source_video,style:z,validateSpec:G,styleSpec:D});case"image":return Gn({key:b,value:h,valueSpec:D.source_image,style:z,validateSpec:G,styleSpec:D});case"canvas":return[new xr(b,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return ho({key:`${b}.type`,value:h.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function cu(M){let h=M.value,b=M.styleSpec,D=b.light,z=M.style,G=[],X=La(h);if(h===void 0)return G;if(X!=="object")return G=G.concat([new xr("light",h,`object expected, ${X} found`)]),G;for(let Z in h){let re=Z.match(/^(.*)-transition$/);G=G.concat(re&&D[re[1]]&&D[re[1]].transition?M.validateSpec({key:Z,value:h[Z],valueSpec:b.transition,validateSpec:M.validateSpec,style:z,styleSpec:b}):D[Z]?M.validateSpec({key:Z,value:h[Z],valueSpec:D[Z],validateSpec:M.validateSpec,style:z,styleSpec:b}):[new xr(Z,h[Z],`unknown property "${Z}"`)])}return G}function Zu(M){let h=M.value,b=M.styleSpec,D=b.sky,z=M.style,G=La(h);if(h===void 0)return[];if(G!=="object")return[new xr("sky",h,`object expected, ${G} found`)];let X=[];for(let Z in h)X=X.concat(D[Z]?M.validateSpec({key:Z,value:h[Z],valueSpec:D[Z],style:z,styleSpec:b}):[new xr(Z,h[Z],`unknown property "${Z}"`)]);return X}function mc(M){let h=M.value,b=M.styleSpec,D=b.terrain,z=M.style,G=[],X=La(h);if(h===void 0)return G;if(X!=="object")return G=G.concat([new xr("terrain",h,`object expected, ${X} found`)]),G;for(let Z in h)G=G.concat(D[Z]?M.validateSpec({key:Z,value:h[Z],valueSpec:D[Z],validateSpec:M.validateSpec,style:z,styleSpec:b}):[new xr(Z,h[Z],`unknown property "${Z}"`)]);return G}function Yl(M){let h=[],b=M.value,D=M.key;if(Array.isArray(b)){let z=[],G=[];for(let X in b)b[X].id&&z.includes(b[X].id)&&h.push(new xr(D,b,`all the sprites' ids must be unique, but ${b[X].id} is duplicated`)),z.push(b[X].id),b[X].url&&G.includes(b[X].url)&&h.push(new xr(D,b,`all the sprites' URLs must be unique, but ${b[X].url} is duplicated`)),G.push(b[X].url),h=h.concat(Gn({key:`${D}[${X}]`,value:b[X],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:M.validateSpec}));return h}return Go({key:D,value:b})}function lf(M){return!!M&&M.constructor===Object}function $u(M){return lf(M.value)?[]:[new xr(M.key,M.value,`object expected, ${La(M.value)} found`)]}let ph={"*":()=>[],array:Zi,boolean:function(M){let h=M.value,b=M.key,D=La(h);return D!=="boolean"?[new xr(b,h,`boolean expected, ${D} found`)]:[]},number:na,color:Ya,constants:qi,enum:ho,filter:Pa,function:Ha,layer:ro,object:Gn,source:zl,light:cu,sky:Zu,terrain:mc,projection:function(M){let h=M.value,b=M.styleSpec,D=b.projection,z=M.style,G=La(h);if(h===void 0)return[];if(G!=="object")return[new xr("projection",h,`object expected, ${G} found`)];let X=[];for(let Z in h)X=X.concat(D[Z]?M.validateSpec({key:Z,value:h[Z],valueSpec:D[Z],style:z,styleSpec:b}):[new xr(Z,h[Z],`unknown property "${Z}"`)]);return X},projectionDefinition:function(M){let h=M.key,b=M.value;b=b instanceof String?b.valueOf():b;let D=La(b);return D!=="array"||(function(z){return Array.isArray(z)&&z.length===3&&typeof z[0]=="string"&&typeof z[1]=="string"&&typeof z[2]=="number"})(b)||(function(z){return!!["interpolate","step","literal"].includes(z[0])})(b)?["array","string"].includes(D)?[]:[new xr(h,b,`projection expected, invalid type "${D}" found`)]:[new xr(h,b,`projection expected, invalid array ${JSON.stringify(b)} found`)]},string:Go,formatted:function(M){return Go(M).length===0?[]:Qa(M)},resolvedImage:function(M){return Go(M).length===0?[]:Qa(M)},padding:function(M){let h=M.key,b=M.value;if(La(b)==="array"){if(b.length<1||b.length>4)return[new xr(h,b,`padding requires 1 to 4 values; ${b.length} values found`)];let D={type:"number"},z=[];for(let G=0;G[]}})),M.constants&&(b=b.concat(qi({key:"constants",value:M.constants}))),Ju(b)}function fu(M){return function(h){return M(Object.assign({},h,{validateSpec:gh}))}}function Ju(M){return[].concat(M).sort(((h,b)=>h.line-b.line))}function Qu(M){return function(...h){return Ju(M.apply(this,h))}}Ku.source=Qu(fu(zl)),Ku.sprite=Qu(fu(Yl)),Ku.glyphs=Qu(fu(uf)),Ku.light=Qu(fu(cu)),Ku.sky=Qu(fu(Zu)),Ku.terrain=Qu(fu(mc)),Ku.state=Qu(fu($u)),Ku.layer=Qu(fu(ro)),Ku.filter=Qu(fu(Pa)),Ku.paintProperty=Qu(fu(Io)),Ku.layoutProperty=Qu(fu(oi));let Wd={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class x0{constructor(h,b){this._globalState=b,this.setValue(h)}evaluate(){var h;return(h=this._literalValue)!==null&&h!==void 0?h:this._compiledValue.evaluate({})}setValue(h){if(h==null||h==="visible"||h==="none")return this._literalValue=h==="none"?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let b=vh(h,Wd,this._globalState);if(b.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,new Error(b.value.map((D=>`${D.key}: ${D.message}`)).join(", "));this._literalValue=void 0,this._compiledValue=b.value,this._globalStateRefs=zt(b.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let Bf=Ct,Al=Ku,Xl=Al.light,cf=Al.sky,jh=Al.paintProperty,Wh=Al.layoutProperty;function Yh(M,h){let b=!1;if(h!=null&&h.length)for(let D of h)M.fire(new Ot(new Error(D.message))),b=!0;return b}class hu{constructor(h,b,D){let z=this.cells=[];if(h instanceof ArrayBuffer){this.arrayBuffer=h;let X=new Int32Array(this.arrayBuffer);h=X[0],this.d=(b=X[1])+2*(D=X[2]);for(let re=0;re=oe[ge+0]&&z>=oe[ge+1])?(Z[ke]=!0,X.push(he[ke])):Z[ke]=!1}}}_forEachCell(h,b,D,z,G,X,Z,re){let Q=this._convertToCellCoord(h),he=this._convertToCellCoord(b),oe=this._convertToCellCoord(D),ke=this._convertToCellCoord(z);for(let ge=Q;ge<=oe;ge++)for(let Ue=he;Ue<=ke;Ue++){let je=this.d*Ue+ge;if((!re||re(this._convertFromCellCoord(ge),this._convertFromCellCoord(Ue),this._convertFromCellCoord(ge+1),this._convertFromCellCoord(Ue+1)))&&G.call(this,h,b,D,z,je,X,Z,re))return}}_convertFromCellCoord(h){return(h-this.padding)/this.scale}_convertToCellCoord(h){return Math.max(0,Math.min(this.d-1,Math.floor(h*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let h=this.cells,b=3+this.cells.length+1+1,D=0;for(let X of this.cells)D+=X.length;let z=new Int32Array(b+D+this.keys.length+this.bboxes.length);z[0]=this.extent,z[1]=this.n,z[2]=this.padding;let G=b;for(let X=0;XD?(this.lastIntegerZoom=D+1,this.lastIntegerZoomTime=b):this.lastFloorZoom{try{return new RegExp(`\\p{sc=${b}}`,"u").source}catch(D){return null}})).filter((b=>b));return new RegExp(h.join("|"),"u")}let ur=Kt(["Arab","Dupl","Mong","Ougr","Syrc"]);function Sr(M){return!ur.test(String.fromCodePoint(M))}function Br(M){return!(lt(M)||(h=M,/[\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(h))));var h}let ln=Kt(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function wn(M){return ln.test(String.fromCodePoint(M))}function In(M,h){return!(!h&&wn(M)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(M)))}function gi(M){for(let h of M)if(wn(h.codePointAt(0)))return!0;return!1}let Bi=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(M){this.pluginStatus=M.pluginStatus,this.pluginURL=M.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(M){if(Bi.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=M.applyArabicShaping,this.processBidirectionalText=M.processBidirectionalText,this.processStyledBidirectionalText=M.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(M,h){return i(this,void 0,void 0,(function*(){if(this.isParsed())return this.getState();if(M.pluginStatus!=="loading")return this.setState(M),M;let b=M.pluginURL,D=new Promise((G=>{this.loadScriptResolve=G}));h(b);let z=new Promise((G=>setTimeout((()=>G()),this.TIMEOUT)));if(yield Promise.race([D,z]),this.isParsed()){let G={pluginStatus:"loaded",pluginURL:b};return this.setState(G),G}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${b}`)}))}};class mi{constructor(h,b){this.isSupportedScript=ia,this.zoom=h,b?(this.now=b.now||0,this.fadeDuration=b.fadeDuration||0,this.zoomHistory=b.zoomHistory||new Qe,this.transition=b.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Qe,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let h=this.zoom,b=h-Math.floor(h),D=this.crossFadingFactor();return h>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:b+(1-b)*D}:{fromScale:.5,toScale:1,t:1-(1-D)*b}}}function ia(M){return(function(h,b){for(let D of h)if(!In(D.codePointAt(0),b))return!1;return!0})(M,Bi.getRTLTextPluginStatus()==="loaded")}let ua="-transition";class lo{constructor(h,b,D){this.property=h,this.value=b,this.expression=(function(z,G,X){if(Rf(z))return new yt(z,G);if(If(z)){let Z=Ze(z,G,X);if(Z.result==="error")throw new Error(Z.value.map((re=>`${re.key}: ${re.message}`)).join(", "));return Z.value}{let Z=z;return G.type==="color"&&typeof z=="string"?Z=ii.parse(z):G.type!=="padding"||typeof z!="number"&&!Array.isArray(z)?G.type!=="numberArray"||typeof z!="number"&&!Array.isArray(z)?G.type!=="colorArray"||typeof z!="string"&&!Array.isArray(z)?G.type==="variableAnchorOffsetCollection"&&Array.isArray(z)?Z=xo.parse(z):G.type==="projectionDefinition"&&typeof z=="string"&&(Z=oo.parse(z)):Z=Ni.parse(z):Z=Oa.parse(z):Z=Ka.parse(z),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>Z}}})(b===void 0?h.specification.default:b,h.specification,D)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(h,b,D){return this.property.possiblyEvaluate(this,h,b,D)}}class Bo{constructor(h,b){this.property=h,this.value=new lo(h,void 0,b)}transitioned(h,b){return new ls(this.property,this.value,b,_e({},h.transition,this.transition),h.now)}untransitioned(){return new ls(this.property,this.value,null,{},0)}}class Ua{constructor(h,b){this._properties=h,this._values=Object.create(h.defaultTransitionablePropertyValues),this._globalState=b}hasProperty(h){return h in this._properties.defaultTransitionablePropertyValues}getValue(h){return ie(this._values[h].value.value)}setValue(h,b){Object.hasOwn(this._values,h)||(this._values[h]=new Bo(this._values[h].property,this._globalState)),this._values[h].value=new lo(this._values[h].property,b===null?void 0:ie(b),this._globalState)}getTransition(h){return ie(this._values[h].transition)}setTransition(h,b){Object.hasOwn(this._values,h)||(this._values[h]=new Bo(this._values[h].property,this._globalState)),this._values[h].transition=ie(b)||void 0}serialize(){let h={};for(let b of Object.keys(this._values)){let D=this.getValue(b);D!==void 0&&(h[b]=D);let z=this.getTransition(b);z!==void 0&&(h[`${b}${ua}`]=z)}return h}transitioned(h,b){let D=new cl(this._properties);for(let z of Object.keys(this._values))D._values[z]=this._values[z].transitioned(h,b._values[z]);return D}untransitioned(){let h=new cl(this._properties);for(let b of Object.keys(this._values))h._values[b]=this._values[b].untransitioned();return h}}class ls{constructor(h,b,D,z,G){this.property=h,this.value=b,this.begin=G+z.delay||0,this.end=this.begin+z.duration||0,h.specification.transition&&(z.delay||z.duration)&&(this.prior=D)}possiblyEvaluate(h,b,D){let z=h.now||0,G=this.value.possiblyEvaluate(h,b,D),X=this.prior;if(X){if(z>this.end)return this.prior=null,G;if(this.value.isDataDriven())return this.prior=null,G;if(zz.zoomHistory.lastIntegerZoom?{from:h,to:b}:{from:D,to:b}}interpolate(h){return h}}class Fc{constructor(h){this.specification=h}possiblyEvaluate(h,b,D,z){if(h.value!==void 0){if(h.expression.kind==="constant"){let G=h.expression.evaluate(b,null,{},D,z);return this._calculate(G,G,G,b)}return this._calculate(h.expression.evaluate(new mi(Math.floor(b.zoom-1),b)),h.expression.evaluate(new mi(Math.floor(b.zoom),b)),h.expression.evaluate(new mi(Math.floor(b.zoom+1),b)),b)}}_calculate(h,b,D,z){return z.zoom>z.zoomHistory.lastIntegerZoom?{from:h,to:b}:{from:D,to:b}}interpolate(h){return h}}class du{constructor(h){this.specification=h}possiblyEvaluate(h,b,D,z){return!!h.expression.evaluate(b,null,{},D,z)}interpolate(){return!1}}class ms{constructor(h){this.properties=h,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let b in h){let D=h[b];D.specification.overridable&&this.overridableProperties.push(b);let z=this.defaultPropertyValues[b]=new lo(D,void 0,void 0),G=this.defaultTransitionablePropertyValues[b]=new Bo(D,void 0);this.defaultTransitioningPropertyValues[b]=G.untransitioned(),this.defaultPossiblyEvaluatedValues[b]=z.possiblyEvaluate({})}}}_i("DataDrivenProperty",Di),_i("DataConstantProperty",wi),_i("CrossFadedDataDrivenProperty",fl),_i("CrossFadedProperty",Fc),_i("ColorRampProperty",du);let ff=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",ku=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class hl extends cr{constructor(h,b,D){if(super(),this.id=h.id,this.type=h.type,this._globalState=D,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=(function(z,G){return new x0(z,G)})(this.visibility,D),h.type!=="custom"&&(this.metadata=h.metadata,this.minzoom=h.minzoom,this.maxzoom=h.maxzoom,h.type!=="background"&&(this.source=h.source,this.sourceLayer=h["source-layer"],this.filter=h.filter,this._featureFilter=cn(h.filter,D)),b.layout&&(this._unevaluatedLayout=new Eu(b.layout,D)),b.paint)){this._transitionablePaint=new Ua(b.paint,D);for(let z in h.paint)this.setPaintProperty(z,h.paint[z],{validate:!1});for(let z in h.layout)this.setLayoutProperty(z,h.layout[z],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new yc(b.paint)}}setFilter(h){this.filter=h,this._featureFilter=cn(h,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(h){var b;if(h==="visibility")return this.visibility;if(!((b=this._transitionablePaint)===null||b===void 0)&&b.hasProperty(h))throw new Error(h+ff);if(!this._unevaluatedLayout)throw new Error(`Cannot get layout property "${h}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(h)}getLayoutAffectingGlobalStateRefs(){let h=new Set;for(let b of this._visibilityExpression.getGlobalStateRefs())h.add(b);if(this._unevaluatedLayout)for(let b in this._unevaluatedLayout._values){let D=this._unevaluatedLayout._values[b];for(let z of D.getGlobalStateRefs())h.add(z)}for(let b of this._featureFilter.getGlobalStateRefs())h.add(b);return h}getPaintAffectingGlobalStateRefs(){var h;let b=new globalThis.Map;if(this._transitionablePaint)for(let D in this._transitionablePaint._values){let z=this._transitionablePaint._values[D].value;for(let G of z.getGlobalStateRefs()){let X=(h=b.get(G))!==null&&h!==void 0?h:[];X.push({name:D,value:z.value}),b.set(G,X)}}return b}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(h,b,D={}){var z;if(h==="visibility")return this.visibility=b,this._visibilityExpression.setValue(b),void this.recalculateVisibility();!((z=this._transitionablePaint)===null||z===void 0)&&z.hasProperty(h)?this.fire(new Ot(new Error(h+ff))):b!=null&&this._validate(Wh,`layers.${this.id}.layout.${h}`,h,b,D)||this._unevaluatedLayout.setValue(h,b)}getPaintProperty(h){var b,D;if(h.endsWith(ua)){let z=h.slice(0,-11);if(z==="visibility"||!((b=this._unevaluatedLayout)===null||b===void 0)&&b.hasProperty(z))throw new Error(h+ku);return this._transitionablePaint.getTransition(z)}if(h==="visibility"||!((D=this._unevaluatedLayout)===null||D===void 0)&&D.hasProperty(h))throw new Error(h+ku);return this._transitionablePaint.getValue(h)}setPaintProperty(h,b,D={}){var z;if(h==="visibility"||!((z=this._unevaluatedLayout)===null||z===void 0)&&z.hasProperty(h))return this.fire(new Ot(new Error(h+ku))),!1;if(b!=null&&this._validate(jh,`layers.${this.id}.paint.${h}`,h,b,D))return!1;if(h.endsWith(ua))return this._transitionablePaint.setTransition(h.slice(0,-11),b||void 0),!1;{let G=this._transitionablePaint._values[h],X=G.property.specification["property-type"]==="cross-faded-data-driven",Z=G.value.isDataDriven(),re=G.value;this._transitionablePaint.setValue(h,b),this._handleSpecialPaintPropertyUpdate(h);let Q=this._transitionablePaint._values[h].value;return Q.isDataDriven()||Z||X||this._handleOverridablePaintPropertyUpdate(h,re,Q)}}_handleSpecialPaintPropertyUpdate(h){}_handleOverridablePaintPropertyUpdate(h,b,D){return!1}isHidden(h=this.minzoom,b=!1){return!!(this.minzoom&&h<(b?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&h>=this.maxzoom)||this._evaluatedVisibility==="none"}updateTransitions(h){this._transitioningPaint=this._transitionablePaint.transitioned(h,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(h,b){h.getCrossfadeParameters&&(this._crossfadeParameters=h.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(h,void 0,b)),this.paint=this._transitioningPaint.possiblyEvaluate(h,void 0,b)}serialize(){var h,b;let D={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:(h=this._unevaluatedLayout)===null||h===void 0?void 0:h.serialize(),paint:(b=this._transitionablePaint)===null||b===void 0?void 0:b.serialize()};return this.visibility&&(D.layout||(D.layout={}),D.layout.visibility=this.visibility),pe(D,((z,G)=>!(z===void 0||G==="layout"&&!Object.keys(z).length||G==="paint"&&!Object.keys(z).length)))}_validate(h,b,D,z,G={}){return(G==null?void 0:G.validate)!==!1&&Yh(this,h.call(Al,{key:b,layerType:this.type,objectKey:D,value:z,styleSpec:Ct,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let h in this.paint._values){let b=this.paint.get(h);if(b instanceof el&&Pc(b.property.specification)&&(b.value.kind==="source"||b.value.kind==="composite")&&b.value.isStateDependent)return!0}return!1}}let mh;var W={get paint(){return mh=mh||new ms({"raster-opacity":new wi(Ct.paint_raster["raster-opacity"]),"raster-hue-rotate":new wi(Ct.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new wi(Ct.paint_raster["raster-brightness-min"]),"raster-brightness-max":new wi(Ct.paint_raster["raster-brightness-max"]),"raster-saturation":new wi(Ct.paint_raster["raster-saturation"]),"raster-contrast":new wi(Ct.paint_raster["raster-contrast"]),resampling:new wi(Ct.paint_raster.resampling),"raster-resampling":new wi(Ct.paint_raster["raster-resampling"]),"raster-fade-duration":new wi(Ct.paint_raster["raster-fade-duration"])})}};class te extends hl{constructor(h,b){super(h,W,b)}}let ve={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Se{constructor(h,b){this._structArray=h,this._pos1=b*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Ee{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(h,b){return h._trim(),b&&(h.isTransferred=!0,b.push(h.arrayBuffer)),{length:h.length,arrayBuffer:h.arrayBuffer}}static deserialize(h){let b=Object.create(this.prototype);return b.arrayBuffer=h.arrayBuffer,b.length=h.length,b.capacity=h.arrayBuffer.byteLength/b.bytesPerElement,b._refreshViews(),b}_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(h){this.reserve(h),this.length=h}reserve(h){if(h>this.capacity){this.capacity=Math.max(h,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let b=this.uint8;this._refreshViews(),b&&this.uint8.set(b)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function Re(M,h=1){let b=0,D=0;return{members:M.map((z=>{let G=ve[z.type].BYTES_PER_ELEMENT,X=b=nt(b,Math.max(h,G)),Z=z.components||1;return D=Math.max(D,G),b+=G*Z,{name:z.name,type:z.type,components:Z,offset:X}})),size:nt(b,Math.max(D,h)),alignment:h}}function nt(M,h){return Math.ceil(M/h)*h}class He extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b){let D=this.length;return this.resize(D+1),this.emplace(D,h,b)}emplace(h,b,D){let z=2*h;return this.int16[z+0]=b,this.int16[z+1]=D,h}}He.prototype.bytesPerElement=4,_i("StructArrayLayout2i4",He);class vt extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=3*h;return this.int16[G+0]=b,this.int16[G+1]=D,this.int16[G+2]=z,h}}vt.prototype.bytesPerElement=6,_i("StructArrayLayout3i6",vt);class Ft extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z){let G=this.length;return this.resize(G+1),this.emplace(G,h,b,D,z)}emplace(h,b,D,z,G){let X=4*h;return this.int16[X+0]=b,this.int16[X+1]=D,this.int16[X+2]=z,this.int16[X+3]=G,h}}Ft.prototype.bytesPerElement=8,_i("StructArrayLayout4i8",Ft);class Rt extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X){let Z=this.length;return this.resize(Z+1),this.emplace(Z,h,b,D,z,G,X)}emplace(h,b,D,z,G,X,Z){let re=6*h;return this.int16[re+0]=b,this.int16[re+1]=D,this.int16[re+2]=z,this.int16[re+3]=G,this.int16[re+4]=X,this.int16[re+5]=Z,h}}Rt.prototype.bytesPerElement=12,_i("StructArrayLayout2i4i12",Rt);class ir extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X){let Z=this.length;return this.resize(Z+1),this.emplace(Z,h,b,D,z,G,X)}emplace(h,b,D,z,G,X,Z){let re=4*h,Q=8*h;return this.int16[re+0]=b,this.int16[re+1]=D,this.uint8[Q+4]=z,this.uint8[Q+5]=G,this.uint8[Q+6]=X,this.uint8[Q+7]=Z,h}}ir.prototype.bytesPerElement=8,_i("StructArrayLayout2i4ub8",ir);class nr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,b){let D=this.length;return this.resize(D+1),this.emplace(D,h,b)}emplace(h,b,D){let z=2*h;return this.float32[z+0]=b,this.float32[z+1]=D,h}}nr.prototype.bytesPerElement=8,_i("StructArrayLayout2f8",nr);class Cr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X,Z,re,Q,he){let oe=this.length;return this.resize(oe+1),this.emplace(oe,h,b,D,z,G,X,Z,re,Q,he)}emplace(h,b,D,z,G,X,Z,re,Q,he,oe){let ke=10*h;return this.uint16[ke+0]=b,this.uint16[ke+1]=D,this.uint16[ke+2]=z,this.uint16[ke+3]=G,this.uint16[ke+4]=X,this.uint16[ke+5]=Z,this.uint16[ke+6]=re,this.uint16[ke+7]=Q,this.uint16[ke+8]=he,this.uint16[ke+9]=oe,h}}Cr.prototype.bytesPerElement=20,_i("StructArrayLayout10ui20",Cr);class Vr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X,Z,re){let Q=this.length;return this.resize(Q+1),this.emplace(Q,h,b,D,z,G,X,Z,re)}emplace(h,b,D,z,G,X,Z,re,Q){let he=8*h;return this.uint16[he+0]=b,this.uint16[he+1]=D,this.uint16[he+2]=z,this.uint16[he+3]=G,this.uint16[he+4]=X,this.uint16[he+5]=Z,this.uint16[he+6]=re,this.uint16[he+7]=Q,h}}Vr.prototype.bytesPerElement=16,_i("StructArrayLayout8ui16",Vr);class sr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X,Z,re,Q,he,oe,ke){let ge=this.length;return this.resize(ge+1),this.emplace(ge,h,b,D,z,G,X,Z,re,Q,he,oe,ke)}emplace(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge){let Ue=12*h;return this.int16[Ue+0]=b,this.int16[Ue+1]=D,this.int16[Ue+2]=z,this.int16[Ue+3]=G,this.uint16[Ue+4]=X,this.uint16[Ue+5]=Z,this.uint16[Ue+6]=re,this.uint16[Ue+7]=Q,this.int16[Ue+8]=he,this.int16[Ue+9]=oe,this.int16[Ue+10]=ke,this.int16[Ue+11]=ge,h}}sr.prototype.bytesPerElement=24,_i("StructArrayLayout4i4ui4i24",sr);class br extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=3*h;return this.float32[G+0]=b,this.float32[G+1]=D,this.float32[G+2]=z,h}}br.prototype.bytesPerElement=12,_i("StructArrayLayout3f12",br);class kr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(h){let b=this.length;return this.resize(b+1),this.emplace(b,h)}emplace(h,b){return this.uint32[1*h+0]=b,h}}kr.prototype.bytesPerElement=4,_i("StructArrayLayout1ul4",kr);class Gr extends Ee{_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(h,b,D,z,G,X,Z,re,Q){let he=this.length;return this.resize(he+1),this.emplace(he,h,b,D,z,G,X,Z,re,Q)}emplace(h,b,D,z,G,X,Z,re,Q,he){let oe=10*h,ke=5*h;return this.int16[oe+0]=b,this.int16[oe+1]=D,this.int16[oe+2]=z,this.int16[oe+3]=G,this.int16[oe+4]=X,this.int16[oe+5]=Z,this.uint32[ke+3]=re,this.uint16[oe+8]=Q,this.uint16[oe+9]=he,h}}Gr.prototype.bytesPerElement=20,_i("StructArrayLayout6i1ul2ui20",Gr);class Wr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X){let Z=this.length;return this.resize(Z+1),this.emplace(Z,h,b,D,z,G,X)}emplace(h,b,D,z,G,X,Z){let re=6*h;return this.int16[re+0]=b,this.int16[re+1]=D,this.int16[re+2]=z,this.int16[re+3]=G,this.int16[re+4]=X,this.int16[re+5]=Z,h}}Wr.prototype.bytesPerElement=12,_i("StructArrayLayout2i2i2i12",Wr);class Ar extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G){let X=this.length;return this.resize(X+1),this.emplace(X,h,b,D,z,G)}emplace(h,b,D,z,G,X){let Z=4*h,re=8*h;return this.float32[Z+0]=b,this.float32[Z+1]=D,this.float32[Z+2]=z,this.int16[re+6]=G,this.int16[re+7]=X,h}}Ar.prototype.bytesPerElement=16,_i("StructArrayLayout2f1f2i16",Ar);class En extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X){let Z=this.length;return this.resize(Z+1),this.emplace(Z,h,b,D,z,G,X)}emplace(h,b,D,z,G,X,Z){let re=16*h,Q=4*h,he=8*h;return this.uint8[re+0]=b,this.uint8[re+1]=D,this.float32[Q+1]=z,this.float32[Q+2]=G,this.int16[he+6]=X,this.int16[he+7]=Z,h}}En.prototype.bytesPerElement=16,_i("StructArrayLayout2ub2f2i16",En);class zn extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=3*h;return this.uint16[G+0]=b,this.uint16[G+1]=D,this.uint16[G+2]=z,h}}zn.prototype.bytesPerElement=6,_i("StructArrayLayout3ui6",zn);class Zn extends Ee{_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(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,dt,gt){let It=this.length;return this.resize(It+1),this.emplace(It,h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,dt,gt)}emplace(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,dt,gt,It){let _t=24*h,qt=12*h,tr=48*h;return this.int16[_t+0]=b,this.int16[_t+1]=D,this.uint16[_t+2]=z,this.uint16[_t+3]=G,this.uint32[qt+2]=X,this.uint32[qt+3]=Z,this.uint32[qt+4]=re,this.uint16[_t+10]=Q,this.uint16[_t+11]=he,this.uint16[_t+12]=oe,this.float32[qt+7]=ke,this.float32[qt+8]=ge,this.uint8[tr+36]=Ue,this.uint8[tr+37]=je,this.uint8[tr+38]=dt,this.uint32[qt+10]=gt,this.int16[_t+22]=It,h}}Zn.prototype.bytesPerElement=48,_i("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Zn);class ai extends Ee{_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(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,dt,gt,It,_t,qt,tr,lr,qr,jr,_n,fn,Dn,Hn){let Ln=this.length;return this.resize(Ln+1),this.emplace(Ln,h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,dt,gt,It,_t,qt,tr,lr,qr,jr,_n,fn,Dn,Hn)}emplace(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,dt,gt,It,_t,qt,tr,lr,qr,jr,_n,fn,Dn,Hn,Ln){let un=32*h,ei=16*h;return this.int16[un+0]=b,this.int16[un+1]=D,this.int16[un+2]=z,this.int16[un+3]=G,this.int16[un+4]=X,this.int16[un+5]=Z,this.int16[un+6]=re,this.int16[un+7]=Q,this.uint16[un+8]=he,this.uint16[un+9]=oe,this.uint16[un+10]=ke,this.uint16[un+11]=ge,this.uint16[un+12]=Ue,this.uint16[un+13]=je,this.uint16[un+14]=dt,this.uint16[un+15]=gt,this.uint16[un+16]=It,this.uint16[un+17]=_t,this.uint16[un+18]=qt,this.uint16[un+19]=tr,this.uint16[un+20]=lr,this.uint16[un+21]=qr,this.uint16[un+22]=jr,this.uint32[ei+12]=_n,this.float32[ei+13]=fn,this.float32[ei+14]=Dn,this.uint16[un+30]=Hn,this.uint16[un+31]=Ln,h}}ai.prototype.bytesPerElement=64,_i("StructArrayLayout8i15ui1ul2f2ui64",ai);class Mi extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h){let b=this.length;return this.resize(b+1),this.emplace(b,h)}emplace(h,b){return this.float32[1*h+0]=b,h}}Mi.prototype.bytesPerElement=4,_i("StructArrayLayout1f4",Mi);class Si extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=3*h;return this.uint16[6*h+0]=b,this.float32[G+1]=D,this.float32[G+2]=z,h}}Si.prototype.bytesPerElement=12,_i("StructArrayLayout1ui2f12",Si);class ya extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=4*h;return this.uint32[2*h+0]=b,this.uint16[G+2]=D,this.uint16[G+3]=z,h}}ya.prototype.bytesPerElement=8,_i("StructArrayLayout1ul2ui8",ya);class Y extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b){let D=this.length;return this.resize(D+1),this.emplace(D,h,b)}emplace(h,b,D){let z=2*h;return this.uint16[z+0]=b,this.uint16[z+1]=D,h}}Y.prototype.bytesPerElement=4,_i("StructArrayLayout2ui4",Y);class d extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h){let b=this.length;return this.resize(b+1),this.emplace(b,h)}emplace(h,b){return this.uint16[1*h+0]=b,h}}d.prototype.bytesPerElement=2,_i("StructArrayLayout1ui2",d);class P extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,b,D,z){let G=this.length;return this.resize(G+1),this.emplace(G,h,b,D,z)}emplace(h,b,D,z,G){let X=4*h;return this.float32[X+0]=b,this.float32[X+1]=D,this.float32[X+2]=z,this.float32[X+3]=G,h}}P.prototype.bytesPerElement=16,_i("StructArrayLayout4f16",P);class N extends Se{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new o(this.anchorPointX,this.anchorPointY)}}N.prototype.size=20;class H extends Gr{get(h){return new N(this,h)}}_i("CollisionBoxArray",H);class $ extends Se{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(h){this._structArray.uint8[this._pos1+37]=h}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(h){this._structArray.uint8[this._pos1+38]=h}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(h){this._structArray.uint32[this._pos4+10]=h}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}$.prototype.size=48;class se extends Zn{get(h){return new $(this,h)}}_i("PlacedSymbolArray",se);class de extends Se{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(h){this._structArray.uint32[this._pos4+12]=h}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]}}de.prototype.size=64;class Ae extends ai{get(h){return new de(this,h)}}_i("SymbolInstanceArray",Ae);class Fe extends Mi{getoffsetX(h){return this.float32[1*h+0]}}_i("GlyphOffsetArray",Fe);class Ie extends vt{getx(h){return this.int16[3*h+0]}gety(h){return this.int16[3*h+1]}gettileUnitDistanceFromAnchor(h){return this.int16[3*h+2]}}_i("SymbolLineVertexArray",Ie);class Ye extends Se{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Ye.prototype.size=12;class st extends Si{get(h){return new Ye(this,h)}}_i("TextAnchorOffsetArray",st);class ht extends Se{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}ht.prototype.size=8;class Pe extends ya{get(h){return new ht(this,h)}}_i("FeatureIndexArray",Pe);class Xe extends He{}class at extends He{}class xt extends He{}class Et extends Rt{}class Bt extends ir{}class St extends nr{}class Pt extends Cr{}class $t extends Vr{}class Ht extends sr{}class dr extends br{}class Xr extends kr{}class Or extends Wr{}class $r extends En{}class Er extends zn{}class Tr extends Y{}let Rr=Re([{name:"a_pos",components:2,type:"Int16"}],4),{members:Lr}=Rr;class an{constructor(h=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=h}prepareSegment(h,b,D,z){let G=this.segments[this.segments.length-1];return h>an.MAX_VERTEX_ARRAY_LENGTH&&xe(`Max vertices per segment is ${an.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${h}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${an.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!G||G.vertexLength+h>an.MAX_VERTEX_ARRAY_LENGTH||G.sortKey!==z?this.createNewSegment(b,D,z):G}createNewSegment(h,b,D){let z={vertexOffset:h.length,primitiveOffset:b.length,vertexLength:0,primitiveLength:0,vaos:{}};return D!==void 0&&(z.sortKey=D),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(z),z}getOrCreateLatestSegment(h,b,D){return this.prepareSegment(0,h,b,D)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let h of this.segments)for(let b in h.vaos)h.vaos[b].destroy()}static simpleSegment(h,b,D,z){return new an([{vertexOffset:h,primitiveOffset:b,vertexLength:D,primitiveLength:z,vaos:{},sortKey:0}])}}function on(M,h){return 256*(M=ue(Math.floor(M),0,255))+ue(Math.floor(h),0,255)}an.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,_i("SegmentVector",an);let Nn=Re([{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"}]),Yn=Re([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var yi,Sn,An,li={exports:{}},Vn={exports:{}},jn={exports:{}},Wn=(function(){if(An)return li.exports;An=1;var M=(yi||(yi=1,Vn.exports=function(b,D){var z,G,X,Z,re,Q,he,oe;for(G=b.length-(z=3&b.length),X=D,re=3432918353,Q=461845907,oe=0;oe>>16)*re&65535)<<16)&4294967295)<<15|he>>>17))*Q+(((he>>>16)*Q&65535)<<16)&4294967295)<<13|X>>>19))+((5*(X>>>16)&65535)<<16)&4294967295))+((58964+(Z>>>16)&65535)<<16);switch(he=0,z){case 3:he^=(255&b.charCodeAt(oe+2))<<16;case 2:he^=(255&b.charCodeAt(oe+1))<<8;case 1:X^=he=(65535&(he=(he=(65535&(he^=255&b.charCodeAt(oe)))*re+(((he>>>16)*re&65535)<<16)&4294967295)<<15|he>>>17))*Q+(((he>>>16)*Q&65535)<<16)&4294967295}return X^=b.length,X=2246822507*(65535&(X^=X>>>16))+((2246822507*(X>>>16)&65535)<<16)&4294967295,X=3266489909*(65535&(X^=X>>>13))+((3266489909*(X>>>16)&65535)<<16)&4294967295,(X^=X>>>16)>>>0}),Vn.exports),h=(Sn||(Sn=1,jn.exports=function(b,D){for(var z,G=b.length,X=D^G,Z=0;G>=4;)z=1540483477*(65535&(z=255&b.charCodeAt(Z)|(255&b.charCodeAt(++Z))<<8|(255&b.charCodeAt(++Z))<<16|(255&b.charCodeAt(++Z))<<24))+((1540483477*(z>>>16)&65535)<<16),X=1540483477*(65535&X)+((1540483477*(X>>>16)&65535)<<16)^(z=1540483477*(65535&(z^=z>>>24))+((1540483477*(z>>>16)&65535)<<16)),G-=4,++Z;switch(G){case 3:X^=(255&b.charCodeAt(Z+2))<<16;case 2:X^=(255&b.charCodeAt(Z+1))<<8;case 1:X=1540483477*(65535&(X^=255&b.charCodeAt(Z)))+((1540483477*(X>>>16)&65535)<<16)}return X=1540483477*(65535&(X^=X>>>13))+((1540483477*(X>>>16)&65535)<<16),(X^=X>>>15)>>>0}),jn.exports);return li.exports=M,li.exports.murmur3=M,li.exports.murmur2=h,li.exports})(),si=s(Wn);class zi{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(h,b,D,z){this.ids.push(da(h)),this.positions.push(b,D,z)}getPositions(h){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let b=da(h),D=0,z=this.ids.length-1;for(;D>1;this.ids[X]>=b?z=X:D=X+1}let G=[];for(;this.ids[D]===b;)G.push({index:this.positions[3*D],start:this.positions[3*D+1],end:this.positions[3*D+2]}),D++;return G}static serialize(h,b){let D=new Float64Array(h.ids),z=new Uint32Array(h.positions);return ui(D,z,0,D.length-1),b&&b.push(D.buffer,z.buffer),{ids:D,positions:z}}static deserialize(h){let b=new zi;return b.ids=h.ids,b.positions=h.positions,b.indexed=!0,b}}function da(M){let h=+M;return!isNaN(h)&&h<=Number.MAX_SAFE_INTEGER?h:si(String(M))}function ui(M,h,b,D){for(;b>1],G=b-1,X=D+1;for(;;){do G++;while(M[G]z);if(G>=X)break;Li(M,G,X),Li(h,3*G,3*X),Li(h,3*G+1,3*X+1),Li(h,3*G+2,3*X+2)}X-b`u_${z}`)),this.type=D}setUniform(h,b,D){h.set(D.constantOr(this.value))}getBinding(h,b,D){return this.type==="color"?new Os(h,b):new ca(h,b)}}class vo{constructor(h,b){this.uniformNames=b.map((D=>`u_${D}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(h,b){this.pixelRatioFrom=b.pixelRatio,this.pixelRatioTo=h.pixelRatio,this.patternFrom=b.tlbr,this.patternTo=h.tlbr}setConstantDashPositions(h,b){this.dashTo=[0,h.y,h.height,h.width],this.dashFrom=[0,b.y,b.height,b.width]}setUniform(h,b,D,z){let G=null;z==="u_pattern_to"?G=this.patternTo:z==="u_pattern_from"?G=this.patternFrom:z==="u_dasharray_to"?G=this.dashTo:z==="u_dasharray_from"?G=this.dashFrom:z==="u_pixel_ratio_to"?G=this.pixelRatioTo:z==="u_pixel_ratio_from"&&(G=this.pixelRatioFrom),G!==null&&h.set(G)}getBinding(h,b,D){return D.startsWith("u_pattern")||D.startsWith("u_dasharray_")?new Ia(h,b):new ca(h,b)}}class bo{constructor(h,b,D,z){this.expression=h,this.type=D,this.maxValue=0,this.paintVertexAttributes=b.map((G=>({name:`a_${G}`,type:"Float32",components:D==="color"?2:1,offset:0}))),this.paintVertexArray=new z}populatePaintArray(h,b,D){let z=this.paintVertexArray.length,G=this.expression.evaluate(new mi(0,D),b,{},D.canonical,[],D.formattedSection);this.paintVertexArray.resize(h),this._setPaintValue(z,h,G)}updatePaintArray(h,b,D,z,G){let X=this.expression.evaluate(new mi(0,G),D,z);this._setPaintValue(h,b,X)}_setPaintValue(h,b,D){if(this.type==="color"){let z=Na(D);for(let G=h;G`u_${Z}_t`)),this.type=D,this.useIntegerZoom=z,this.zoom=G,this.maxValue=0,this.paintVertexAttributes=b.map((Z=>({name:`a_${Z}`,type:"Float32",components:D==="color"?4:2,offset:0}))),this.paintVertexArray=new X}populatePaintArray(h,b,D){let z=this.expression.evaluate(new mi(this.zoom,D),b,{},D.canonical,[],D.formattedSection),G=this.expression.evaluate(new mi(this.zoom+1,D),b,{},D.canonical,[],D.formattedSection),X=this.paintVertexArray.length;this.paintVertexArray.resize(h),this._setPaintValue(X,h,z,G)}updatePaintArray(h,b,D,z,G){let X=this.expression.evaluate(new mi(this.zoom,G),D,z),Z=this.expression.evaluate(new mi(this.zoom+1,G),D,z);this._setPaintValue(h,b,X,Z)}_setPaintValue(h,b,D,z){if(this.type==="color"){let G=Na(D),X=Na(z);for(let Z=h;Z`#define HAS_UNIFORM_${z}`)))}return h}getBinderAttributes(){let h=[];for(let b in this.binders){let D=this.binders[b];if(D instanceof bo||D instanceof po)for(let z of D.paintVertexAttributes)h.push(z.name);else if(D instanceof $o){let z=D.getVertexAttributes();for(let G of z)h.push(G.name)}}return h}getBinderUniforms(){let h=[];for(let b in this.binders){let D=this.binders[b];if(D instanceof Ns||D instanceof vo||D instanceof po)for(let z of D.uniformNames)h.push(z)}return h}getPaintVertexBuffers(){return this._buffers}getUniforms(h,b){let D=[];for(let z in this.binders){let G=this.binders[z];if(G instanceof Ns||G instanceof vo||G instanceof po){for(let X of G.uniformNames)if(b[X]){let Z=G.getBinding(h,b[X],X);D.push({name:X,property:z,binding:Z})}}}return D}setUniforms(h,b,D,z){for(let{name:G,property:X,binding:Z}of b)this.binders[X].setUniform(Z,z,D.get(X),G)}updatePaintBuffers(h){this._buffers=[];for(let b in this.binders){let D=this.binders[b];if(h&&D instanceof $o){let z=h.fromScale===2?D.zoomInPaintVertexBuffer:D.zoomOutPaintVertexBuffer;z&&this._buffers.push(z)}else(D instanceof bo||D instanceof po)&&D.paintVertexBuffer&&this._buffers.push(D.paintVertexBuffer)}}upload(h){for(let b in this.binders){let D=this.binders[b];(D instanceof bo||D instanceof po||D instanceof $o)&&D.upload(h)}this.updatePaintBuffers()}destroy(){for(let h in this.binders){let b=this.binders[h];(b instanceof bo||b instanceof po||b instanceof $o)&&b.destroy()}}}class Ta{constructor(h,b,D=()=>!0){this.programConfigurations={};for(let z of h)this.programConfigurations[z.id]=new ql(z,b,D);this.needsUpload=!1,this._featureMap=new zi,this._bufferOffset=0}populatePaintArrays(h,b,D,z){for(let G in this.programConfigurations)this.programConfigurations[G].populatePaintArrays(h,b,z);b.id!==void 0&&this._featureMap.add(b.id,D,this._bufferOffset,h),this._bufferOffset=h,this.needsUpload=!0}updatePaintArrays(h,b,D,z){for(let G of D)this.needsUpload=this.programConfigurations[G.id].updatePaintArrays(h,this._featureMap,b,G,z)||this.needsUpload}get(h){return this.programConfigurations[h]}upload(h){if(this.needsUpload){for(let b in this.programConfigurations)this.programConfigurations[b].upload(h);this.needsUpload=!1}}destroy(){for(let h in this.programConfigurations)this.programConfigurations[h].destroy()}}function vu(M,h){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"]}[M]||[M.replace(`${h}-`,"").replace(/-/g,"_")]}function ys(M,h,b){let D={color:{source:nr,composite:P},number:{source:Mi,composite:nr}},z=(function(G){return{"line-pattern":{source:Pt,composite:Pt},"fill-pattern":{source:Pt,composite:Pt},"fill-extrusion-pattern":{source:Pt,composite:Pt},"line-dasharray":{source:$t,composite:$t}}[G]})(M);return(z==null?void 0:z[b])||D[h][b]}_i("ConstantBinder",Ns),_i("CrossFadedConstantBinder",vo),_i("SourceExpressionBinder",bo),_i("CrossFadedPatternBinder",no),_i("CrossFadedDasharrayBinder",Us),_i("CompositeExpressionBinder",po),_i("ProgramConfiguration",ql,{omit:["_buffers"]}),_i("ProgramConfigurationSet",Ta);let xc=Math.pow(2,14)-1,Zl=-xc-1;function $l(M){let h=j/M.extent,b=M.loadGeometry();for(let D of b)for(let z of D){let G=Math.round(z.x*h),X=Math.round(z.y*h);z.x=ue(G,Zl,xc),z.y=ue(X,Zl,xc),(Gz.x+1||Xz.y+1)&&xe("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return b}function xa(M,h){return{type:M.type,id:M.id,properties:M.properties,geometry:h?$l(M):[]}}let uo=-32768;function Es(M,h,b,D,z){M.emplaceBack(uo+8*h+D,uo+8*b+z)}class vr{constructor(h){this.zoom=h.zoom,this.overscaling=h.overscaling,this.layers=h.layers,this.layerIds=this.layers.map((b=>b.id)),this.index=h.index,this.hasDependencies=!1,this.layoutVertexArray=new at,this.indexArray=new Er,this.segments=new an,this.programConfigurations=new Ta(h.layers,h.zoom),this.stateDependentLayerIds=this.layers.filter((b=>b.isStateDependent())).map((b=>b.id))}populate(h,b,D){let z=this.layers[0],G=[],X=null,Z=!1,re=z.type==="heatmap";if(z.type==="circle"){let he=z;X=he.layout.get("circle-sort-key"),Z=!X.isConstant(),re||(re=he.paint.get("circle-pitch-alignment")==="map")}let Q=re?b.subdivisionGranularity.circle:1;for(let{feature:he,id:oe,index:ke,sourceLayerIndex:ge}of h){let Ue=this.layers[0]._featureFilter.needGeometry,je=xa(he,Ue);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),je,D))continue;let dt=Z?X.evaluate(je,{},D):void 0,gt={id:oe,properties:he.properties,type:he.type,sourceLayerIndex:ge,index:ke,geometry:Ue?je.geometry:$l(he),patterns:{},sortKey:dt};G.push(gt)}Z&&G.sort(((he,oe)=>he.sortKey-oe.sortKey));for(let he of G){let{geometry:oe,index:ke,sourceLayerIndex:ge}=he,Ue=h[ke].feature;this.addFeature(he,oe,ke,D,Q),b.featureIndex.insert(Ue,oe,ke,ge,this.index)}}update(h,b,D){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,b,this.stateDependentLayers,{imagePositions:D})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,Lr),this.indexBuffer=h.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(h,b,D,z,G=1){let X;switch(G){case 1:X=[0,7];break;case 3:X=[0,2,5,7];break;case 5:X=[0,1,3,4,6,7];break;case 7:X=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${G}; valid values are 1, 3, 5, 7.`)}let Z=X.length;for(let re of b)for(let Q of re){let he=Q.x,oe=Q.y;if(he<0||he>=j||oe<0||oe>=j)continue;let ke=this.segments.prepareSegment(Z*Z,this.layoutVertexArray,this.indexArray,h.sortKey),ge=ke.vertexLength;for(let Ue=0;Ue1){if(xs(M,h))return!0;for(let D of h)if(ar(D,M,b))return!0}for(let D of M)if(ar(D,h,b))return!0;return!1}function xs(M,h){if(M.length===0||h.length===0)return!1;for(let b=0;b1?b:b.sub(h)._mult(z)._add(h))}function Pr(M,h){let b,D,z,G=!1;for(let X of M){b=X;for(let Z=0,re=b.length-1;Zh.y!=z.y>h.y&&h.x<(z.x-D.x)*(h.y-D.y)/(z.y-D.y)+D.x&&(G=!G)}return G}function pn(M,h){let b=!1;for(let D=0,z=M.length-1;Dh.y!=X.y>h.y&&h.x<(X.x-G.x)*(h.y-G.y)/(X.y-G.y)+G.x&&(b=!b)}return b}function Mn(M,h,b){let D=b[0],z=b[2];if(M.xz.x&&h.x>z.x||M.yz.y&&h.y>z.y)return!1;let G=be(M,h,b[0]);return G!==be(M,h,b[1])||G!==be(M,h,b[2])||G!==be(M,h,b[3])}function sn(M,h,b){let D=h.paint.get(M).value;return D.kind==="constant"?D.value:b.programConfigurations.get(h.id).getMaxValue(M)}function tn(M){return Math.sqrt(M[0]*M[0]+M[1]*M[1])}function Hr(M,h,b,D,z){if(!h[0]&&!h[1])return M;let G=o.convert(h)._mult(z);b==="viewport"&&G._rotate(-D);let X=[];for(let Z of M)X.push(Z.sub(G));return X}function Mr(M){let h=[];for(let b=0;bsa(_t,dt,gt,It)))})(Q,G,Z,re),Ue=he),Xn({queryGeometry:ge,size:Ue,transform:G,unwrappedTileID:Z,getElevation:re,pitchAlignment:ke,pitchScale:oe},z)}}class $i extends vr{}let Fi;_i("HeatmapBucket",$i,{omit:["layers"]});var ji={get paint(){return Fi=Fi||new ms({"heatmap-radius":new Di(Ct.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Di(Ct.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new wi(Ct.paint_heatmap["heatmap-intensity"]),"heatmap-color":new du(Ct.paint_heatmap["heatmap-color"]),"heatmap-opacity":new wi(Ct.paint_heatmap["heatmap-opacity"])})}};function Wi(M,{width:h,height:b},D,z){if(z){if(z instanceof Uint8ClampedArray)z=new Uint8Array(z.buffer);else if(z.length!==h*b*D)throw new RangeError(`mismatched image size. expected: ${z.length} but got: ${h*b*D}`)}else z=new Uint8Array(h*b*D);return M.width=h,M.height=b,M.data=z,M}function Fa(M,{width:h,height:b},D){if(h===M.width&&b===M.height)return;let z=Wi({},{width:h,height:b},D);Vs(M,z,{x:0,y:0},{x:0,y:0},{width:Math.min(M.width,h),height:Math.min(M.height,b)},D),M.width=h,M.height=b,M.data=z.data}function Vs(M,h,b,D,z,G){if(z.width===0||z.height===0)return h;if(z.width>M.width||z.height>M.height||b.x>M.width-z.width||b.y>M.height-z.height)throw new RangeError("out of range source coordinates for image copy");if(z.width>h.width||z.height>h.height||D.x>h.width-z.width||D.y>h.height-z.height)throw new RangeError("out of range destination coordinates for image copy");let X=M.data,Z=h.data;if(X===Z)throw new Error("srcData equals dstData, so image is already copied");for(let re=0;re{h[M.evaluationKey]=re;let Q=M.expression.evaluate(h);z.setPixel(X/4/b,Z/4,Q)};if(M.clips)for(let X=0,Z=0;Xthis.max&&(this.max=oe),oe=this.dim+1||b<-1||b>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${h}, y: ${b}, dim: ${this.dim}`);return(b+1)*this.stride+(h+1)}unpack(h,b,D){return h*this.redFactor+b*this.greenFactor+D*this.blueFactor-this.baseShift}pack(h){return yQ(h,this.getUnpackVector())}getPixels(){return new Kl({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(h,b,D){if(this.dim!==h.dim)throw new Error("dem dimension mismatch");let z=b*this.dim,G=b*this.dim+this.dim,X=D*this.dim,Z=D*this.dim+this.dim;switch(b){case-1:z=G-1;break;case 1:G=z+1}switch(D){case-1:X=Z-1;break;case 1:Z=X+1}let re=-b*this.dim,Q=-D*this.dim;for(let he=X;he0)for(let X=h;X=h;X-=D)G=TQ(X/D|0,M[X],M[X+1],G);return G&&N_(G,G.next)&&(c4(G),G=G.next),G}function r2(M,h){if(!M)return M;h||(h=M);let b,D=M;do if(b=!1,D.steiner||!N_(D,D.next)&&Cu(D.prev,D,D.next)!==0)D=D.next;else{if(c4(D),D=h=D.prev,D===D.next)break;b=!0}while(b||D!==h);return h}function s4(M,h,b,D,z,G,X){if(!M)return;!X&&G&&(function(re,Q,he,oe){let ke=re;do ke.z===0&&(ke.z=VR(ke.x,ke.y,Q,he,oe)),ke.prevZ=ke.prev,ke.nextZ=ke.next,ke=ke.next;while(ke!==re);ke.prevZ.nextZ=null,ke.prevZ=null,(function(ge){let Ue,je=1;do{let dt,gt=ge;ge=null;let It=null;for(Ue=0;gt;){Ue++;let _t=gt,qt=0;for(let lr=0;lr0||tr>0&&_t;)qt!==0&&(tr===0||!_t||gt.z<=_t.z)?(dt=gt,gt=gt.nextZ,qt--):(dt=_t,_t=_t.nextZ,tr--),It?It.nextZ=dt:ge=dt,dt.prevZ=It,It=dt;gt=_t}It.nextZ=null,je*=2}while(Ue>1)})(ke)})(M,D,z,G);let Z=M;for(;M.prev!==M.next;){let re=M.prev,Q=M.next;if(G?Yrt(M,D,z,G):Wrt(M))h.push(re.i,M.i,Q.i),c4(M),M=Q.next,Z=Q.next;else if((M=Q)===Z){X?X===1?s4(M=Xrt(r2(M),h),h,b,D,z,G,2):X===2&&Zrt(M,h,b,D,z,G):s4(r2(M),h,b,D,z,G,1);break}}}function Wrt(M){let h=M.prev,b=M,D=M.next;if(Cu(h,b,D)>=0)return!1;let z=h.x,G=b.x,X=D.x,Z=h.y,re=b.y,Q=D.y,he=Math.min(z,G,X),oe=Math.min(Z,re,Q),ke=Math.max(z,G,X),ge=Math.max(Z,re,Q),Ue=D.next;for(;Ue!==h;){if(Ue.x>=he&&Ue.x<=ke&&Ue.y>=oe&&Ue.y<=ge&&l4(z,Z,G,re,X,Q,Ue.x,Ue.y)&&Cu(Ue.prev,Ue,Ue.next)>=0)return!1;Ue=Ue.next}return!0}function Yrt(M,h,b,D){let z=M.prev,G=M,X=M.next;if(Cu(z,G,X)>=0)return!1;let Z=z.x,re=G.x,Q=X.x,he=z.y,oe=G.y,ke=X.y,ge=Math.min(Z,re,Q),Ue=Math.min(he,oe,ke),je=Math.max(Z,re,Q),dt=Math.max(he,oe,ke),gt=VR(ge,Ue,h,b,D),It=VR(je,dt,h,b,D),_t=M.prevZ,qt=M.nextZ;for(;_t&&_t.z>=gt&&qt&&qt.z<=It;){if(_t.x>=ge&&_t.x<=je&&_t.y>=Ue&&_t.y<=dt&&_t!==z&&_t!==X&&l4(Z,he,re,oe,Q,ke,_t.x,_t.y)&&Cu(_t.prev,_t,_t.next)>=0||(_t=_t.prevZ,qt.x>=ge&&qt.x<=je&&qt.y>=Ue&&qt.y<=dt&&qt!==z&&qt!==X&&l4(Z,he,re,oe,Q,ke,qt.x,qt.y)&&Cu(qt.prev,qt,qt.next)>=0))return!1;qt=qt.nextZ}for(;_t&&_t.z>=gt;){if(_t.x>=ge&&_t.x<=je&&_t.y>=Ue&&_t.y<=dt&&_t!==z&&_t!==X&&l4(Z,he,re,oe,Q,ke,_t.x,_t.y)&&Cu(_t.prev,_t,_t.next)>=0)return!1;_t=_t.prevZ}for(;qt&&qt.z<=It;){if(qt.x>=ge&&qt.x<=je&&qt.y>=Ue&&qt.y<=dt&&qt!==z&&qt!==X&&l4(Z,he,re,oe,Q,ke,qt.x,qt.y)&&Cu(qt.prev,qt,qt.next)>=0)return!1;qt=qt.nextZ}return!0}function Xrt(M,h){let b=M;do{let D=b.prev,z=b.next.next;!N_(D,z)&&bQ(D,b,b.next,z)&&u4(D,z)&&u4(z,D)&&(h.push(D.i,b.i,z.i),c4(b),c4(b.next),b=M=z),b=b.next}while(b!==M);return r2(b)}function Zrt(M,h,b,D,z,G){let X=M;do{let Z=X.next.next;for(;Z!==X.prev;){if(X.i!==Z.i&&ent(X,Z)){let re=wQ(X,Z);return X=r2(X,X.next),re=r2(re,re.next),s4(X,h,b,D,z,G,0),void s4(re,h,b,D,z,G,0)}Z=Z.next}X=X.next}while(X!==M)}function $rt(M,h){let b=M.x-h.x;return b===0&&(b=M.y-h.y,b===0)&&(b=(M.next.y-M.y)/(M.next.x-M.x)-(h.next.y-h.y)/(h.next.x-h.x)),b}function Krt(M,h){let b=(function(z,G){let X=G,Z=z.x,re=z.y,Q,he=-1/0;if(N_(z,X))return X;do{if(N_(z,X.next))return X.next;if(re<=X.y&&re>=X.next.y&&X.next.y!==X.y){let je=X.x+(re-X.y)*(X.next.x-X.x)/(X.next.y-X.y);if(je<=Z&&je>he&&(he=je,Q=X.x=X.x&&X.x>=ke&&Z!==X.x&&_Q(reQ.x||X.x===Q.x&&Jrt(Q,X)))&&(Q=X,Ue=je)}X=X.next}while(X!==oe);return Q})(M,h);if(!b)return h;let D=wQ(b,M);return r2(D,D.next),r2(b,b.next)}function Jrt(M,h){return Cu(M.prev,M,h.prev)<0&&Cu(h.next,M,M.next)<0}function VR(M,h,b,D,z){return(M=1431655765&((M=858993459&((M=252645135&((M=16711935&((M=(M-b)*z|0)|M<<8))|M<<4))|M<<2))|M<<1))|(h=1431655765&((h=858993459&((h=252645135&((h=16711935&((h=(h-D)*z|0)|h<<8))|h<<4))|h<<2))|h<<1))<<1}function Qrt(M){let h=M,b=M;do(h.x=(M-X)*(G-Z)&&(M-X)*(D-Z)>=(b-X)*(h-Z)&&(b-X)*(G-Z)>=(z-X)*(D-Z)}function l4(M,h,b,D,z,G,X,Z){return!(M===X&&h===Z)&&_Q(M,h,b,D,z,G,X,Z)}function ent(M,h){return M.next.i!==h.i&&M.prev.i!==h.i&&!(function(b,D){let z=b;do{if(z.i!==b.i&&z.next.i!==b.i&&z.i!==D.i&&z.next.i!==D.i&&bQ(z,z.next,b,D))return!0;z=z.next}while(z!==b);return!1})(M,h)&&(u4(M,h)&&u4(h,M)&&(function(b,D){let z=b,G=!1,X=(b.x+D.x)/2,Z=(b.y+D.y)/2;do z.y>Z!=z.next.y>Z&&z.next.y!==z.y&&X<(z.next.x-z.x)*(Z-z.y)/(z.next.y-z.y)+z.x&&(G=!G),z=z.next;while(z!==b);return G})(M,h)&&(Cu(M.prev,M,h.prev)||Cu(M,h.prev,h))||N_(M,h)&&Cu(M.prev,M,M.next)>0&&Cu(h.prev,h,h.next)>0)}function Cu(M,h,b){return(h.y-M.y)*(b.x-h.x)-(h.x-M.x)*(b.y-h.y)}function N_(M,h){return M.x===h.x&&M.y===h.y}function bQ(M,h,b,D){let z=kS(Cu(M,h,b)),G=kS(Cu(M,h,D)),X=kS(Cu(b,D,M)),Z=kS(Cu(b,D,h));return z!==G&&X!==Z||!(z!==0||!ES(M,b,h))||!(G!==0||!ES(M,D,h))||!(X!==0||!ES(b,M,D))||!(Z!==0||!ES(b,h,D))}function ES(M,h,b){return h.x<=Math.max(M.x,b.x)&&h.x>=Math.min(M.x,b.x)&&h.y<=Math.max(M.y,b.y)&&h.y>=Math.min(M.y,b.y)}function kS(M){return M>0?1:M<0?-1:0}function u4(M,h){return Cu(M.prev,M,M.next)<0?Cu(M,h,M.next)>=0&&Cu(M,M.prev,h)>=0:Cu(M,h,M.prev)<0||Cu(M,M.next,h)<0}function wQ(M,h){let b=GR(M.i,M.x,M.y),D=GR(h.i,h.x,h.y),z=M.next,G=h.prev;return M.next=h,h.prev=M,b.next=z,z.prev=b,D.next=b,b.prev=D,G.next=D,D.prev=G,D}function TQ(M,h,b,D){let z=GR(M,h,b);return D?(z.next=D.next,z.prev=D,D.next.prev=z,D.next=z):(z.prev=z,z.next=z),z}function c4(M){M.next.prev=M.prev,M.prev.next=M.next,M.prevZ&&(M.prevZ.nextZ=M.nextZ),M.nextZ&&(M.nextZ.prevZ=M.prevZ)}function GR(M,h,b){return{i:M,x:h,y:b,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class U_{constructor(h,b){if(b>h)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=h,this._minGranularity=b}getGranularityForZoomLevel(h){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||b>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let D=0|Math.round(h),z=0|Math.round(b),G=this._getKey(D,z);if(this._vertexDictionary.has(G))return this._vertexDictionary.get(G);let X=this._vertexBuffer.length/2;return this._vertexDictionary.set(G,X),this._vertexBuffer.push(D,z),X}_subdivideTrianglesScanline(h){if(this._granularity<2)return(function(z,G){let X=[];for(let Z=0;Z0?(X.push(re),X.push(he),X.push(Q)):(X.push(re),X.push(Q),X.push(he))}return X})(this._vertexBuffer,h);let b=[],D=h.length;for(let z=0;z=1||tr<=0)||gt&&(QG)){oe>=z&&oe<=G&&X.push(D[(Z+1)%3]);continue}!gt&&qt>0&&X.push(this._vertexToIndex(re+Ue*qt,Q+je*qt));let lr=re+Ue*Math.max(qt,0),qr=re+Ue*Math.min(tr,1);dt||this._generateIntraEdgeVertices(X,re,Q,he,oe,lr,qr),!gt&&tr<1&&X.push(this._vertexToIndex(re+Ue*tr,Q+je*tr)),(gt||oe>=z&&oe<=G)&&X.push(D[(Z+1)%3]),!gt&&(oe<=z||oe>=G)&&this._generateInterEdgeVertices(X,re,Q,he,oe,ke,ge,qr,z,G)}return X}_generateIntraEdgeVertices(h,b,D,z,G,X,Z){let re=z-b,Q=G-D,he=Q===0,oe=he?Math.min(b,z):Math.min(X,Z),ke=he?Math.max(b,z):Math.max(X,Z),ge=Math.floor(oe/this._granularityCellSize)+1,Ue=Math.ceil(ke/this._granularityCellSize)-1;if(he?b=ge;je--){let dt=je*this._granularityCellSize;h.push(this._vertexToIndex(dt,D+Q*(dt-b)/re))}}_generateInterEdgeVertices(h,b,D,z,G,X,Z,re,Q,he){let oe=G-D,ke=X-z,ge=Z-G,Ue=(Q-G)/ge,je=(he-G)/ge,dt=Math.min(Ue,je),gt=Math.max(Ue,je),It=z+ke*dt,_t=Math.floor(Math.min(It,re)/this._granularityCellSize)+1,qt=Math.ceil(Math.max(It,re)/this._granularityCellSize)-1,tr=re=1||gt<=0){let jr=D-Z,_n=X+(b-X)*Math.min((Q-Z)/jr,(he-Z)/jr);_t=Math.floor(Math.min(_n,re)/this._granularityCellSize)+1,qt=Math.ceil(Math.max(_n,re)/this._granularityCellSize)-1,tr=re<_n}let qr=oe>0?he:Q;if(tr)for(let jr=_t;jr<=qt;jr++)h.push(this._vertexToIndex(jr*this._granularityCellSize,qr));else for(let jr=qt;jr>=_t;jr--)h.push(this._vertexToIndex(jr*this._granularityCellSize,qr))}_generateOutline(h){let b=[];for(let D of h){let z=n2(D,this._granularity,!0),G=this._pointArrayToIndices(z),X=[];for(let Z=1;ZG!=(X===V_)?(h.push(b),h.push(D),h.push(this._vertexToIndex(z,X)),h.push(D),h.push(this._vertexToIndex(G,X)),h.push(this._vertexToIndex(z,X))):(h.push(D),h.push(b),h.push(this._vertexToIndex(z,X)),h.push(this._vertexToIndex(G,X)),h.push(D),h.push(this._vertexToIndex(z,X)))}_fillPoles(h,b,D){let z=this._vertexBuffer,G=j,X=h.length;for(let Z=2;Z80*oe){dt=Q[0],gt=Q[1];let _t=dt,qt=gt;for(let tr=oe;tr_t&&(_t=lr),qr>qt&&(qt=qr)}It=Math.max(_t-dt,qt-gt),It=It!==0?32767/It:0}return s4(Ue,je,oe,dt,gt,It,0),je})(D,z),re=this._convertIndices(D,Z);G=this._subdivideTrianglesScanline(re)}catch(Z){console.error(Z)}let X=[];return b&&(X=this._generateOutline(h)),this._ensureNoPoleVertices(),this._handlePoles(G),{verticesFlattened:this._vertexBuffer,indicesTriangles:G,indicesLineList:X}}_convertIndices(h,b){let D=[];for(let z of b)D.push(this._vertexToIndex(h[2*z],h[2*z+1]));return D}_pointArrayToIndices(h){let b=[];for(let D of h)b.push(this._vertexToIndex(D.x,D.y));return b}}function AQ(M,h,b,D=!0){return new tnt(b,h).subdividePolygonInternal(M,D)}function n2(M,h,b=!1){if(!M||M.length<1)return[];if(M.length<2)return[];let D=M[0],z=M[M.length-1],G=b&&(D.x!==z.x||D.y!==z.y);if(h<2)return G?[...M,M[0]]:[...M];let X=Math.floor(j/h),Z=[];Z.push(new o(M[0].x,M[0].y));let re=M.length,Q=G?re:re-1;for(let he=0;he0?(Math.floor(qr/X)+1)*X:(Math.ceil(qr/X)-1)*X,Dn=qt>0?(Math.floor(jr/X)+1)*X:(Math.ceil(jr/X)-1)*X,Hn=Math.abs(qr-fn),Ln=Math.abs(jr-Dn),un=Math.abs(qr-je),ei=Math.abs(jr-dt),ci=gt?Hn/tr:Number.POSITIVE_INFINITY,ti=It?Ln/lr:Number.POSITIVE_INFINITY;if((un<=Hn||!gt)&&(ei<=Ln||!It))break;if(ci=0?X-1:G-1,Q=(Z+1)%G,he=M[2*h[re]],oe=M[2*h[Q]],ke=M[2*h[X]],ge=M[2*h[X]+1],Ue=M[2*h[Z]+1],je=!1;if(heoe)je=!1;else{let dt=Ue-ge,gt=-(M[2*h[Z]]-ke),It=ge((oe-ke)*dt+(M[2*h[Q]+1]-ge)*gt)*It&&(je=!0)}if(je){let dt=h[re],gt=h[X],It=h[Z];dt!==gt&&dt!==It&>!==It&&b.push(It,gt,dt),X--,X<0&&(X=G-1)}else{let dt=h[Q],gt=h[X],It=h[Z];dt!==gt&&dt!==It&>!==It&&b.push(It,gt,dt),Z++,Z>=G&&(Z=0)}if(re===Q)break}}function MQ(M,h,b,D,z,G,X,Z,re){let Q=z.length/2,he=X&&Z&&re;if(Qan.MAX_VERTEX_ARRAY_LENGTH&&(qt=oe.createNewSegment(ke,ge),_t=It.count,fn=!0,Dn=!0,Hn=!0,tr=0);let Ln=h4(gt,Ue,dt,It,qr,fn,qt),un=h4(gt,Ue,dt,It,jr,Dn,qt),ei=h4(gt,Ue,dt,It,_n,Hn,qt);ge.emplaceBack(tr+Ln-_t,tr+un-_t,tr+ei-_t),qt.primitiveLength++}})(h,b,D,z,G,M),he&&(function(oe,ke,ge,Ue,je,dt){let gt=[];for(let lr=0;lran.MAX_VERTEX_ARRAY_LENGTH&&(qt=oe.createNewSegment(ke,ge),_t=It.count,fn=!0,Dn=!0,tr=0);let Hn=h4(gt,Ue,dt,It,jr,fn,qt),Ln=h4(gt,Ue,dt,It,_n,Dn,qt);ge.emplaceBack(tr+Hn-_t,tr+Ln-_t),qt.primitiveLength++}})(X,b,Z,z,re,M),h.forceNewSegmentOnNextPrepare(),X==null||X.forceNewSegmentOnNextPrepare()}function h4(M,h,b,D,z,G,X){if(G){let Z=D.count;return b(h[2*z],h[2*z+1]),M[z]=D.count,D.count++,X.vertexLength++,Z}return M[z]}class HR{constructor(h){this.zoom=h.zoom,this.overscaling=h.overscaling,this.layers=h.layers,this.layerIds=this.layers.map((b=>b.id)),this.index=h.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new xt,this.indexArray=new Er,this.indexArray2=new Tr,this.programConfigurations=new Ta(h.layers,h.zoom),this.segments=new an,this.segments2=new an,this.stateDependentLayerIds=this.layers.filter((b=>b.isStateDependent())).map((b=>b.id))}populate(h,b,D){this.hasDependencies=SS("fill",this.layers,b);let z=this.layers[0].layout.get("fill-sort-key"),G=!z.isConstant(),X=[];for(let{feature:Z,id:re,index:Q,sourceLayerIndex:he}of h){let oe=this.layers[0]._featureFilter.needGeometry,ke=xa(Z,oe);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),ke,D))continue;let ge=G?z.evaluate(ke,{},D,b.availableImages):void 0,Ue={id:re,properties:Z.properties,type:Z.type,sourceLayerIndex:he,index:Q,geometry:oe?ke.geometry:$l(Z),patterns:{},sortKey:ge};X.push(Ue)}G&&X.sort(((Z,re)=>Z.sortKey-re.sortKey));for(let Z of X){let{geometry:re,index:Q,sourceLayerIndex:he}=Z;if(this.hasDependencies){let oe=UR("fill",this.layers,Z,{zoom:this.zoom},b);this.patternFeatures.push(oe)}else this.addFeature(Z,re,Q,D,{},b.subdivisionGranularity);b.featureIndex.insert(h[Q].feature,re,Q,he,this.index)}}update(h,b,D){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,b,this.stateDependentLayers,{imagePositions:D})}addFeatures(h,b,D){for(let z of this.patternFeatures)this.addFeature(z,z.geometry,z.index,b,D,h.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,jrt),this.indexBuffer=h.createIndexBuffer(this.indexArray),this.indexBuffer2=h.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(h),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(h,b,D,z,G,X){for(let Z of uh(b,500)){let re=AQ(Z,z,X.fill.getGranularityForZoomLevel(z.z)),Q=this.layoutVertexArray;MQ(((he,oe)=>{Q.emplaceBack(he,oe)}),this.segments,this.layoutVertexArray,this.indexArray,re.verticesFlattened,re.indicesTriangles,this.segments2,this.indexArray2,re.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,h,D,{imagePositions:G,canonical:z})}}let SQ,EQ;_i("FillBucket",HR,{omit:["layers","patternFeatures"]});var nnt={get paint(){return EQ=EQ||new ms({"fill-antialias":new wi(Ct.paint_fill["fill-antialias"]),"fill-opacity":new Di(Ct.paint_fill["fill-opacity"]),"fill-color":new Di(Ct.paint_fill["fill-color"]),"fill-outline-color":new Di(Ct.paint_fill["fill-outline-color"]),"fill-translate":new wi(Ct.paint_fill["fill-translate"]),"fill-translate-anchor":new wi(Ct.paint_fill["fill-translate-anchor"]),"fill-pattern":new fl(Ct.paint_fill["fill-pattern"])})},get layout(){return SQ=SQ||new ms({"fill-sort-key":new Di(Ct.layout_fill["fill-sort-key"])})}};class int extends hl{constructor(h,b){super(h,nnt,b)}recalculate(h,b){super.recalculate(h,b);let D=this.paint._values["fill-outline-color"];D.value.kind==="constant"&&D.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(h){return new HR(h)}queryRadius(){return tn(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:h,geometry:b,transform:D,pixelsToTileUnits:z}){return Gi(Hr(h,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-D.bearingInRadians,z),b)}isTileClipped(){return!0}}let ant=Re([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),ont=Re([{name:"a_centroid",components:2,type:"Int16"}],4),{members:snt}=ant;class d4{constructor(h,b,D,z,G){this.properties={},this.extent=D,this.type=0,this.id=void 0,this._pbf=h,this._geometry=-1,this._keys=z,this._values=G,h.readFields(lnt,this,b)}loadGeometry(){let h=this._pbf;h.pos=this._geometry;let b=h.readVarint()+h.pos,D=[],z,G=1,X=0,Z=0,re=0;for(;h.pos>3}if(X--,G===1||G===2)Z+=h.readSVarint(),re+=h.readSVarint(),G===1&&(z&&D.push(z),z=[]),z&&z.push(new o(Z,re));else{if(G!==7)throw new Error(`unknown command ${G}`);z&&z.push(z[0].clone())}}return z&&D.push(z),D}bbox(){let h=this._pbf;h.pos=this._geometry;let b=h.readVarint()+h.pos,D=1,z=0,G=0,X=0,Z=1/0,re=-1/0,Q=1/0,he=-1/0;for(;h.pos>3}if(z--,D===1||D===2)G+=h.readSVarint(),X+=h.readSVarint(),Gre&&(re=G),Xhe&&(he=X);else if(D!==7)throw new Error(`unknown command ${D}`)}return[Z,Q,re,he]}toGeoJSON(h,b,D){let z=this.extent*Math.pow(2,D),G=this.extent*h,X=this.extent*b,Z=this.loadGeometry();function re(ke){return[360*(ke.x+G)/z-180,360/Math.PI*Math.atan(Math.exp((1-2*(ke.y+X)/z)*Math.PI))-90]}function Q(ke){return ke.map(re)}let he;if(this.type===1){let ke=[];for(let Ue of Z)ke.push(Ue[0]);let ge=Q(ke);he=ke.length===1?{type:"Point",coordinates:ge[0]}:{type:"MultiPoint",coordinates:ge}}else if(this.type===2){let ke=Z.map(Q);he=ke.length===1?{type:"LineString",coordinates:ke[0]}:{type:"MultiLineString",coordinates:ke}}else{if(this.type!==3)throw new Error("unknown feature type");{let ke=kQ(Z),ge=[];for(let Ue of ke)ge.push(Ue.map(Q));he=ge.length===1?{type:"Polygon",coordinates:ge[0]}:{type:"MultiPolygon",coordinates:ge}}}let oe={type:"Feature",geometry:he,properties:this.properties};return this.id!=null&&(oe.id=this.id),oe}}function lnt(M,h,b){M===1?h.id=b.readVarint():M===2?(function(D,z){let G=D.readVarint()+D.pos;for(;D.pos=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[h];let b=this._pbf.readVarint()+this._pbf.pos;return new d4(this._pbf,b,this.extent,this._keys,this._values)}}function fnt(M,h,b){M===15?h.version=b.readVarint():M===1?h.name=b.readString():M===5?h.extent=b.readVarint():M===2?h._features.push(b.pos):M===3?h._keys.push(b.readString()):M===4&&h._values.push((function(D){let z=null,G=D.readVarint()+D.pos;for(;D.pos>3;z=X===1?D.readString():X===2?D.readFloat():X===3?D.readDouble():X===4?D.readVarint64():X===5?D.readVarint():X===6?D.readSVarint():X===7?D.readBoolean():null}if(z==null)throw new Error("unknown feature value");return z})(b))}class CQ{constructor(h,b){this.layers=h.readFields(hnt,{},b)}}function hnt(M,h,b){if(M===3){let D=new cnt(b,b.readVarint()+b.pos);D.length&&(h[D.name]=D)}}let jR=Math.pow(2,13);function v4(M,h,b,D,z,G,X,Z){M.emplaceBack(h,b,2*Math.floor(D*jR)+X,z*jR*2,G*jR*2,Math.round(Z))}class WR{constructor(h){this.zoom=h.zoom,this.overscaling=h.overscaling,this.layers=h.layers,this.layerIds=this.layers.map((b=>b.id)),this.index=h.index,this.hasDependencies=!1,this.layoutVertexArray=new Et,this.centroidVertexArray=new Xe,this.indexArray=new Er,this.programConfigurations=new Ta(h.layers,h.zoom),this.segments=new an,this.stateDependentLayerIds=this.layers.filter((b=>b.isStateDependent())).map((b=>b.id))}populate(h,b,D){this.features=[],this.hasDependencies=SS("fill-extrusion",this.layers,b);for(let{feature:z,id:G,index:X,sourceLayerIndex:Z}of h){let re=this.layers[0]._featureFilter.needGeometry,Q=xa(z,re);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),Q,D))continue;let he={id:G,sourceLayerIndex:Z,index:X,geometry:re?Q.geometry:$l(z),properties:z.properties,type:z.type,patterns:{}};this.hasDependencies?this.features.push(UR("fill-extrusion",this.layers,he,{zoom:this.zoom},b)):this.addFeature(he,he.geometry,X,D,{},b.subdivisionGranularity),b.featureIndex.insert(z,he.geometry,X,Z,this.index,!0)}}addFeatures(h,b,D){for(let z of this.features){let{geometry:G}=z;this.addFeature(z,G,z.index,b,D,h.subdivisionGranularity)}}update(h,b,D){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,b,this.stateDependentLayers,{imagePositions:D})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,snt),this.centroidVertexBuffer=h.createVertexBuffer(this.centroidVertexArray,ont.members,!0),this.indexBuffer=h.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(h,b,D,z,G,X){for(let Z of uh(b,500)){let re={x:0,y:0,sampleCount:0},Q=this.layoutVertexArray.length;this.processPolygon(re,z,h,Z,X);let he=this.layoutVertexArray.length-Q,oe=Math.floor(re.x/re.sampleCount),ke=Math.floor(re.y/re.sampleCount);for(let ge=0;ge{v4(he,oe,ke,0,0,1,1,0)}),this.segments,this.layoutVertexArray,this.indexArray,Q.verticesFlattened,Q.indicesTriangles)}_generateSideFaces(h,b){let D=0;for(let z=1;zan.MAX_VERTEX_ARRAY_LENGTH&&(b.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let Z=G.sub(X)._perp()._unit(),re=X.dist(G);D+re>32768&&(D=0),v4(this.layoutVertexArray,G.x,G.y,Z.x,Z.y,0,0,D),v4(this.layoutVertexArray,G.x,G.y,Z.x,Z.y,0,1,D),D+=re,v4(this.layoutVertexArray,X.x,X.y,Z.x,Z.y,0,0,D),v4(this.layoutVertexArray,X.x,X.y,Z.x,Z.y,0,1,D);let Q=b.segment.vertexLength;this.indexArray.emplaceBack(Q,Q+2,Q+1),this.indexArray.emplaceBack(Q+1,Q+2,Q+3),b.segment.vertexLength+=4,b.segment.primitiveLength+=2}}}function dnt(M,h){for(let b=0;bj)||M.y===h.y&&(M.y<0||M.y>j)}function LQ(M){return M.every((h=>h.x<0))||M.every((h=>h.x>j))||M.every((h=>h.y<0))||M.every((h=>h.y>j))}let PQ;_i("FillExtrusionBucket",WR,{omit:["layers","features"]});var pnt={get paint(){return PQ=PQ||new ms({"fill-extrusion-opacity":new wi(Ct["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Di(Ct["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new wi(Ct["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new wi(Ct["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new fl(Ct["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Di(Ct["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Di(Ct["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new wi(Ct["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class gnt extends hl{constructor(h,b){super(h,pnt,b)}createBucket(h){return new WR(h)}queryRadius(){return tn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:h,feature:b,featureState:D,geometry:z,transform:G,pixelsToTileUnits:X,pixelPosMatrix:Z}){let re=Hr(h,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-G.bearingInRadians,X),Q=this.paint.get("fill-extrusion-height").evaluate(b,D),he=this.paint.get("fill-extrusion-base").evaluate(b,D),oe=(function(ge,Ue){let je=[];for(let dt of ge){let gt=[dt.x,dt.y,0,1];I(gt,gt,Ue),je.push(new o(gt[0]/gt[3],gt[1]/gt[3]))}return je})(re,Z),ke=(function(ge,Ue,je,dt){let gt=[],It=[],_t=dt[8]*Ue,qt=dt[9]*Ue,tr=dt[10]*Ue,lr=dt[11]*Ue,qr=dt[8]*je,jr=dt[9]*je,_n=dt[10]*je,fn=dt[11]*je;for(let Dn of ge){let Hn=[],Ln=[];for(let un of Dn){let ei=un.x,ci=un.y,ti=dt[0]*ei+dt[4]*ci+dt[12],di=dt[1]*ei+dt[5]*ci+dt[13],_a=dt[2]*ei+dt[6]*ci+dt[14],Mo=dt[3]*ei+dt[7]*ci+dt[15],us=_a+tr,ks=Mo+lr,Uf=ti+qr,Jl=di+jr,_c=_a+_n,zc=Mo+fn,Sl=new o((ti+_t)/ks,(di+qt)/ks);Sl.z=us/ks,Hn.push(Sl);let df=new o(Uf/zc,Jl/zc);df.z=_c/zc,Ln.push(df)}gt.push(Hn),It.push(Ln)}return[gt,It]})(z,he,Q,Z);return(function(ge,Ue,je){let dt=1/0;Gi(je,Ue)&&(dt=FQ(je,Ue[0]));for(let gt=0;gt>4;if(z!==1)throw new Error(`Got v${z} data when expected v1.`);let G=DQ[15&D];if(!G)throw new Error("Unrecognized array type.");let[X]=new Uint16Array(h,2,1),[Z]=new Uint32Array(h,4,1);return new LS(Z,X,G,h)}constructor(h,b=64,D=Float64Array,z){if(isNaN(h)||h<0)throw new Error(`Unpexpected numItems value: ${h}.`);this.numItems=+h,this.nodeSize=Math.min(Math.max(+b,2),65535),this.ArrayType=D,this.IndexArrayType=h<65536?Uint16Array:Uint32Array;let G=DQ.indexOf(this.ArrayType),X=2*h*this.ArrayType.BYTES_PER_ELEMENT,Z=h*this.IndexArrayType.BYTES_PER_ELEMENT,re=(8-Z%8)%8;if(G<0)throw new Error(`Unexpected typed array class: ${D}.`);z&&z instanceof ArrayBuffer?(this.data=z,this.ids=new this.IndexArrayType(this.data,8,h),this.coords=new this.ArrayType(this.data,8+Z+re,2*h),this._pos=2*h,this._finished=!0):(this.data=new ArrayBuffer(8+X+Z+re),this.ids=new this.IndexArrayType(this.data,8,h),this.coords=new this.ArrayType(this.data,8+Z+re,2*h),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+G]),new Uint16Array(this.data,2,1)[0]=b,new Uint32Array(this.data,4,1)[0]=h)}add(h,b){let D=this._pos>>1;return this.ids[D]=D,this.coords[this._pos++]=h,this.coords[this._pos++]=b,D}finish(){let h=this._pos>>1;if(h!==this.numItems)throw new Error(`Added ${h} items when expected ${this.numItems}.`);return YR(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(h,b,D,z){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:G,coords:X,nodeSize:Z}=this,re=[0,G.length-1,0],Q=[];for(;re.length;){let he=re.pop()||0,oe=re.pop()||0,ke=re.pop()||0;if(oe-ke<=Z){for(let dt=ke;dt<=oe;dt++){let gt=X[2*dt],It=X[2*dt+1];gt>=h&><=D&&It>=b&&It<=z&&Q.push(G[dt])}continue}let ge=ke+oe>>1,Ue=X[2*ge],je=X[2*ge+1];Ue>=h&&Ue<=D&&je>=b&&je<=z&&Q.push(G[ge]),(he===0?h<=Ue:b<=je)&&(re.push(ke),re.push(ge-1),re.push(1-he)),(he===0?D>=Ue:z>=je)&&(re.push(ge+1),re.push(oe),re.push(1-he))}return Q}within(h,b,D){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:z,coords:G,nodeSize:X}=this,Z=[0,z.length-1,0],re=[],Q=D*D;for(;Z.length;){let he=Z.pop()||0,oe=Z.pop()||0,ke=Z.pop()||0;if(oe-ke<=X){for(let dt=ke;dt<=oe;dt++)IQ(G[2*dt],G[2*dt+1],h,b)<=Q&&re.push(z[dt]);continue}let ge=ke+oe>>1,Ue=G[2*ge],je=G[2*ge+1];IQ(Ue,je,h,b)<=Q&&re.push(z[ge]),(he===0?h-D<=Ue:b-D<=je)&&(Z.push(ke),Z.push(ge-1),Z.push(1-he)),(he===0?h+D>=Ue:b+D>=je)&&(Z.push(ge+1),Z.push(oe),Z.push(1-he))}return re}}function YR(M,h,b,D,z,G){if(z-D<=b)return;let X=D+z>>1;RQ(M,h,X,D,z,G),YR(M,h,b,D,X-1,1-G),YR(M,h,b,X+1,z,1-G)}function RQ(M,h,b,D,z,G){for(;z>D;){if(z-D>600){let Q=z-D+1,he=b-D+1,oe=Math.log(Q),ke=.5*Math.exp(2*oe/3),ge=.5*Math.sqrt(oe*ke*(Q-ke)/Q)*(he-Q/2<0?-1:1);RQ(M,h,b,Math.max(D,Math.floor(b-he*ke/Q+ge)),Math.min(z,Math.floor(b+(Q-he)*ke/Q+ge)),G)}let X=h[2*b+G],Z=D,re=z;for(g4(M,h,D,b),h[2*z+G]>X&&g4(M,h,D,z);ZX;)re--}h[2*D+G]===X?g4(M,h,D,re):(re++,g4(M,h,re,z)),re<=b&&(D=re+1),b<=re&&(z=re-1)}}function g4(M,h,b,D){XR(M,b,D),XR(h,2*b,2*D),XR(h,2*b+1,2*D+1)}function XR(M,h,b){let D=M[h];M[h]=M[b],M[b]=D}function IQ(M,h,b,D){let z=M-b,G=h-D;return z*z+G*G}function ZR(M,h,b,D){let z=D,G=h+(b-h>>1),X,Z=b-h,re=M[h],Q=M[h+1],he=M[b],oe=M[b+1];for(let ke=h+3;kez)X=ke,z=ge;else if(ge===z){let Ue=Math.abs(ke-G);UeD&&(X-h>3&&ZR(M,h,X,D),M[X+2]=z,b-X>3&&ZR(M,X,b,D))}function mnt(M,h,b,D,z,G){let X=z-b,Z=G-D;if(X!==0||Z!==0){let re=((M-b)*X+(h-D)*Z)/(X*X+Z*Z);re>1?(b=z,D=G):re>0&&(b+=X*re,D+=Z*re)}return X=M-b,Z=h-D,X*X+Z*Z}function hf(M,h,b,D){let z={type:h,geom:b},G={id:M==null?null:M,type:z.type,geometry:z.geom,tags:D,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(z.type){case"Point":case"MultiPoint":m4(G,z.geom);break;case"LineString":m4(G,z.geom.points);break;case"Polygon":m4(G,z.geom[0].points);break;case"MultiLineString":for(let X of z.geom)m4(G,X.points);break;case"MultiPolygon":for(let X of z.geom)m4(G,X[0].points)}return G}function $R(M){M.points.length>64&&(M.points=new Float64Array(M.points))}function m4(M,h){for(let b=0;b0&&(X+=D?(z*he-Q*G)/2:Math.sqrt(Math.pow(Q-z,2)+Math.pow(he-G,2))),z=Q,G=he}let Z=h.points.length-3;h.points[2]=1,b>0&&ZR(h.points,0,Z,b),h.points[Z+2]=1,$R(h),h.size=Math.abs(X),h.start=0,h.end=h.size}function QR(M,h,b,D){for(let z=0;z1?1:b}function FS(M){let h={type:"Feature",geometry:ynt(M),properties:M.tags};return M.id!=null&&(h.id=M.id),h}function ynt(M){let{type:h,geometry:b}=M;switch(h){case"Point":return{type:h,coordinates:zQ(b[0],b[1])};case"MultiPoint":return{type:h,coordinates:DS(b)};case"LineString":return{type:h,coordinates:DS(b.points)};case"MultiLineString":case"Polygon":return{type:h,coordinates:b.map((D=>DS(D.points)))};case"MultiPolygon":return{type:h,coordinates:b.map((D=>D.map((z=>DS(z.points)))))}}}function DS(M){let h=[];for(let b=0;b=(b/=h)&&X=D)return null;let re=[];for(let Q of M){let he=z===yh.X?Q.minX:Q.minY,oe=z===yh.X?Q.maxX:Q.maxY;if(he>=b&&oe=D))switch(Q.type){case"Point":case"MultiPoint":xnt(Q,re,b,D,z);continue;case"LineString":_nt(Q,re,b,D,z,Z);continue;case"MultiLineString":bnt(Q,re,b,D,z);continue;case"Polygon":wnt(Q,re,b,D,z);continue;case"MultiPolygon":Tnt(Q,re,b,D,z);continue}}return re.length?re:null}function xnt(M,h,b,D,z){let G=[];(function(X,Z,re,Q,he){for(let oe=0;oe=re&&ke<=Q&&j_(Z,X[oe],X[oe+1],X[oe+2])}})(M.geometry,G,b,D,z),G.length&&h.push(hf(M.id,G.length===3?"Point":"MultiPoint",G,M.tags))}function _nt(M,h,b,D,z,G){let X=[];if(OQ(M.geometry,X,b,D,z,!1,G.lineMetrics),X.length)if(G.lineMetrics)for(let Z of X)h.push(hf(M.id,"LineString",Z,M.tags));else h.push(X.length>1?hf(M.id,"MultiLineString",X,M.tags):hf(M.id,"LineString",X[0],M.tags))}function bnt(M,h,b,D,z){let G=[];eI(M.geometry,G,b,D,z,!1),G.length&&h.push(G.length!==1?hf(M.id,"MultiLineString",G,M.tags):hf(M.id,"LineString",G[0],M.tags))}function wnt(M,h,b,D,z){let G=[];eI(M.geometry,G,b,D,z,!0),G.length&&h.push(hf(M.id,"Polygon",G,M.tags))}function Tnt(M,h,b,D,z){let G=[];for(let X of M.geometry){let Z=[];eI(X,Z,b,D,z,!0),Z.length&&G.push(Z)}G.length&&h.push(hf(M.id,"MultiPolygon",G,M.tags))}function OQ(M,h,b,D,z,G,X){let Z=NQ(M),re=z===yh.X?Ant:Mnt,Q,he,oe=M.start;for(let dt=0;dtb&&(he=re(Z,gt,It,qt,tr,b),X&&(Z.start=oe+Q*he)):lr>D?qr=b&&(he=re(Z,gt,It,qt,tr,b),jr=!0),qr>D&&lr<=D&&(he=re(Z,gt,It,qt,tr,D),jr=!0),!G&&jr&&(X&&(Z.end=oe+Q*he),h.push(Z),Z=NQ(M)),X&&(oe+=Q)}let ke=M.points.length-3,ge=M.points[ke],Ue=M.points[ke+1],je=z===yh.X?ge:Ue;je>=b&&je<=D&&j_(Z.points,ge,Ue,M.points[ke+2]),ke=Z.points.length-3,G&&ke>=3&&(Z.points[ke]!==Z.points[0]||Z.points[ke+1]!==Z.points[1])&&j_(Z.points,Z.points[0],Z.points[1],Z.points[2]),Z.points.length&&($R(Z),h.push(Z))}function NQ(M){return{points:[],size:M.size,start:M.start,end:M.end}}function eI(M,h,b,D,z,G){for(let X of M)OQ(X,h,b,D,z,G,!1)}function j_(M,h,b,D){M.push(h,b,D)}function Ant(M,h,b,D,z,G){let X=(G-h)/(D-h);return j_(M.points,G,b+(z-b)*X,1),X}function Mnt(M,h,b,D,z,G){let X=(G-b)/(z-b);return j_(M.points,h+(D-h)*X,G,1),X}function tI(M,h){let b=h.buffer/h.extent,D=M,z=O1(M,1,-1-b,b,yh.X,-1,2,h),G=O1(M,1,1-b,2+b,yh.X,-1,2,h);return(z||G)&&(D=O1(M,1,-b,1+b,yh.X,-1,2,h)||[],z&&(D=UQ(z,1).concat(D)),G&&(D=D.concat(UQ(G,-1)))),D}function UQ(M,h){let b=[];for(let D of M)switch(D.type){case"Point":case"MultiPoint":{let z=Snt(D.geometry,h);b.push(hf(D.id,D.type,z,D.tags));continue}case"LineString":{let z=rI(D.geometry,h);b.push(hf(D.id,D.type,z,D.tags));continue}case"MultiLineString":case"Polygon":{let z=[];for(let G of D.geometry)z.push(rI(G,h));b.push(hf(D.id,D.type,z,D.tags));continue}case"MultiPolygon":{let z=[];for(let G of D.geometry){let X=[];for(let Z of G)X.push(rI(Z,h));z.push(X)}b.push(hf(D.id,D.type,z,D.tags));continue}}return b}function Snt(M,h){let b=[];for(let D=0;D0||((X=h.addOrUpdateProperties)==null?void 0:X.length)>0;if(D){let Z=M[0],re=KR({type:"FeatureCollection",features:[{type:"Feature",id:Z.id,geometry:h.newGeometry,properties:z?VQ(Z.tags,h):Z.tags}]},b);return re=tI(re,b),re}if(z){let Z=[];for(let re of M){let Q=zo({},re);Q.tags=VQ(Q.tags,h),Z.push(Q)}return Z}return M}function VQ(M,h){if(h.removeAllProperties)return{};let b=zo({},M||{});if(h.removeProperties)for(let D of h.removeProperties)delete b[D];if(h.addOrUpdateProperties)for(let{key:D,value:z}of h.addOrUpdateProperties)b[D]=z;return b}(function(M){M[M.X=0]="X",M[M.Y=1]="Y"})(yh||(yh={}));let nI={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:M=>M};class knt{constructor(h){this.options=Object.assign(Object.create(nI),h),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(h){let b=[];for(let D of h){if(!D.geometry)continue;let[z,G]=D.geometry.coordinates,[X,Z]=[G_(z),H_(G)];b.push({id:D.id,type:"Point",geometry:[X,Z],tags:D.properties})}this.createIndex(b)}initialize(h){let b=[];for(let D of h)D.type==="Point"&&b.push(D);this.createIndex(b)}updateIndex(h,b,D){this.options=Object.assign(Object.create(nI),D.clusterOptions),this.initialize(h)}createIndex(h){let{log:b,minZoom:D,maxZoom:z}=this.options;b&&console.time("total time");let G=`prepare ${h.length} points`;b&&console.time(G),this.points=h;let X=[];for(let re=0;re=D;re--){let Q=Date.now();Z=this.trees[re]=this.createTree(this.cluster(Z,re)),b&&console.log("z%d: %d clusters in %dms",re,Z.numItems,Date.now()-Q)}b&&console.timeEnd("total time")}getClusters(h,b){return this.getClustersInternal(h,b).map((D=>FS(D)))}getClustersInternal(h,b){let D=((h[0]+180)%360+360)%360-180,z=Math.max(-90,Math.min(90,h[1])),G=h[2]===180?180:((h[2]+180)%360+360)%360-180,X=Math.max(-90,Math.min(90,h[3]));if(h[2]-h[0]>=360)D=-180,G=180;else if(D>G){let oe=this.getClustersInternal([D,z,180,X],b),ke=this.getClustersInternal([-180,z,G,X],b);return oe.concat(ke)}let Z=this.trees[this.limitZoom(b)],re=Z.range(G_(D),H_(X),G_(G),H_(z)),Q=Z.flatData,he=[];for(let oe of re){let ke=this.stride*oe;he.push(Q[ke+5]>1?Cnt(Q,ke,this.clusterProps):this.points[Q[ke+3]])}return he}getChildren(h){let b=this.getOriginId(h),D=this.getOriginZoom(h),z=new Error("No cluster with the specified id: "+h),G=this.trees[D];if(!G)throw z;let X=G.flatData;if(b*this.stride>=X.length)throw z;let Z=this.options.radius/(this.options.extent*Math.pow(2,D-1)),re=G.within(X[b*this.stride],X[b*this.stride+1],Z),Q=[];for(let he of re){let oe=he*this.stride;X[oe+4]===h&&Q.push(X[oe+5]>1?Lnt(X,oe,this.clusterProps):FS(this.points[X[oe+3]]))}if(Q.length===0)throw z;return Q}getLeaves(h,b,D){let z=[];return this.appendLeaves(z,h,b=b||10,D=D||0,0),z}getTile(h,b,D){let z=this.trees[this.limitZoom(h)];if(!z)return null;let G=Math.pow(2,h),{extent:X,radius:Z}=this.options,re=Z/X,Q=(D-re)/G,he=(D+1+re)/G,oe={transformed:!0,features:[],source:null,x:b,y:D,z:h};return this.addTileFeatures(z.range((b-re)/G,Q,(b+1+re)/G,he),z.flatData,b,D,G,oe),b===0&&this.addTileFeatures(z.range(1-re/G,Q,1,he),z.flatData,G,D,G,oe),b===G-1&&this.addTileFeatures(z.range(0,Q,re/G,he),z.flatData,-1,D,G,oe),oe}getClusterExpansionZoom(h){return this.getOriginZoom(h)}appendLeaves(h,b,D,z,G){let X=this.getChildren(b);for(let Z of X){let re=Z.properties;if(re!=null&&re.cluster?G+re.point_count<=z?G+=re.point_count:G=this.appendLeaves(h,re.cluster_id,D,z,G):G1,he,oe,ke;if(Q)he=iI(b,re,this.clusterProps),oe=b[re],ke=b[re+1];else{let je=this.points[b[re+3]];he=je.tags,[oe,ke]=je.geometry}let ge={type:1,geometry:[[Math.round(this.options.extent*(oe*G-D)),Math.round(this.options.extent*(ke*G-z))]],tags:he},Ue;Ue=Q||this.options.generateId?b[re+3]:this.points[b[re+3]].id,Ue!==void 0&&(ge.id=Ue),X.features.push(ge)}}limitZoom(h){return Math.max(this.options.minZoom,Math.min(Math.floor(+h),this.options.maxZoom+1))}cluster(h,b){let{radius:D,extent:z,reduce:G,minPoints:X}=this.options,Z=D/(z*Math.pow(2,b)),re=h.flatData,Q=[],he=this.stride;for(let oe=0;oeb&&(dt+=re[It+5])}if(dt>je&&dt>=X){let gt,It=ke*je,_t=ge*je,qt=-1,tr=(oe/he<<5)+(b+1)+this.points.length;for(let lr of Ue){let qr=lr*he;if(re[qr+2]<=b)continue;re[qr+2]=b;let jr=re[qr+5];It+=re[qr]*jr,_t+=re[qr+1]*jr,re[qr+4]=tr,G&&(gt||(gt=this.map(re,oe,!0),qt=this.clusterProps.length,this.clusterProps.push(gt)),G(gt,this.map(re,qr)))}re[oe+4]=tr,Q.push(It/dt,_t/dt,1/0,tr,-1,dt),G&&Q.push(qt)}else{for(let gt=0;gt1)for(let gt of Ue){let It=gt*he;if(!(re[It+2]<=b)){re[It+2]=b;for(let _t=0;_t>5}getOriginZoom(h){return(h-this.points.length)%32}map(h,b,D){if(h[b+5]>1){let X=this.clusterProps[h[b+6]];return D?Object.assign({},X):X}let z=this.points[h[b+3]].tags,G=this.options.map(z);return D&&G===z?Object.assign({},G):G}}function Cnt(M,h,b){return{id:M[h+3],type:"Point",tags:iI(M,h,b),geometry:[M[h],M[h+1]]}}function Lnt(M,h,b){return{type:"Feature",id:M[h+3],properties:iI(M,h,b),geometry:{type:"Point",coordinates:[qQ(M[h]),BQ(M[h+1])]}}}function iI(M,h,b){let D=M[h+5],z=D>=1e4?`${Math.round(D/1e3)}k`:D>=1e3?Math.round(D/100)/10+"k":D,G=M[h+6],X=G===-1?{}:Object.assign({},b[G]);return Object.assign(X,{cluster:!0,cluster_id:M[h+3],point_count:D,point_count_abbreviated:z})}let aI="geojsonvt_clip_start",oI="geojsonvt_clip_end";function GQ(M,h,b,D,z){let G=h===z.maxZoom?0:z.tolerance/((1<0&&h.size<(z?X:D))return void(b.numPoints+=h.points.length/3);let Z=[];for(let re=0;reX)&&(b.numSimplified++,Z.push(h.points[re],h.points[re+1])),b.numPoints++;z&&(function(re,Q){let he=0;for(let oe=0,ke=re.length,ge=ke-2;oe0===Q)for(let oe=0,ke=re.length;oe1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(b),D.debug>1&&console.timeEnd("invalidating");let[z,G,X]=[0,0,0],Z=GQ(h,z,G,X,D);Z.source=h;let re=RS(z,G,X);if(this.tiles[re]=Z,this.tileCoords.push({z,x:G,y:X,id:re}),D.debug){let Q=`z${z}`;this.stats[Q]=(this.stats[Q]||0)+1,this.total++}}getClusterExpansionZoom(h){return null}getChildren(h){return null}getLeaves(h,b,D){return null}getTile(h,b,D){let{extent:z,debug:G}=this.options,X=1<1&&console.log("drilling down to z%d-%d-%d",h,b,D);let re,Q=h,he=b,oe=D;for(;!re&&Q>0;)Q--,he>>=1,oe>>=1,re=this.tiles[RS(Q,he,oe)];return re!=null&&re.source?(G>1&&(console.log("found parent tile z%d-%d-%d",Q,he,oe),console.time("drilling down")),this.splitTile(re.source,Q,he,oe,h,b,D),G>1&&console.timeEnd("drilling down"),this.tiles[Z]?HQ(this.tiles[Z],z):null):null}splitTile(h,b,D,z,G,X,Z){let re=[h,b,D,z],Q=this.options,he=Q.debug;for(;re.length;){z=re.pop(),D=re.pop(),b=re.pop(),h=re.pop();let oe=1<1&&console.time("creation"),ge=this.tiles[ke]=GQ(h,b,D,z,Q),this.tileCoords.push({z:b,x:D,y:z,id:ke}),he)){he>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",b,D,z,ge.numFeatures,ge.numPoints,ge.numSimplified),console.timeEnd("creation"));let jr=`z${b}`;this.stats[jr]=(this.stats[jr]||0)+1,this.total++}if(ge.source=h,G==null){if(b===Q.indexMaxZoom||ge.numPoints<=Q.indexMaxPoints)continue}else{if(b===Q.maxZoom||b===G)continue;if(G!=null){let jr=G-b;if(D!==X>>jr||z!==Z>>jr)continue}}if(ge.source=null,!h.length)continue;he>1&&console.time("clipping");let Ue=.5*Q.buffer/Q.extent,je=.5-Ue,dt=.5+Ue,gt=1+Ue,It=null,_t=null,qt=null,tr=null,lr=O1(h,oe,D-Ue,D+dt,yh.X,ge.minX,ge.maxX,Q),qr=O1(h,oe,D+je,D+gt,yh.X,ge.minX,ge.maxX,Q);lr&&(It=O1(lr,oe,z-Ue,z+dt,yh.Y,ge.minY,ge.maxY,Q),_t=O1(lr,oe,z+je,z+gt,yh.Y,ge.minY,ge.maxY,Q)),qr&&(qt=O1(qr,oe,z-Ue,z+dt,yh.Y,ge.minY,ge.maxY,Q),tr=O1(qr,oe,z+je,z+gt,yh.Y,ge.minY,ge.maxY,Q)),he>1&&console.timeEnd("clipping"),re.push(It||[],b+1,2*D,2*z),re.push(_t||[],b+1,2*D,2*z+1),re.push(qt||[],b+1,2*D+1,2*z),re.push(tr||[],b+1,2*D+1,2*z+1)}}invalidateTiles(h){if(!h.length)return;let b=this.options,{debug:D}=b,z=1/0,G=-1/0,X=1/0,Z=-1/0;for(let he of h)z=Math.min(z,he.minX),G=Math.max(G,he.maxX),X=Math.min(X,he.minY),Z=Math.max(Z,he.maxY);let re=b.buffer/b.extent,Q=new Set;for(let he in this.tiles){let oe=this.tiles[he],ke=1<=Ue||Z=dt)continue;let gt=!1;for(let It of h)if(It.maxX>=ge&&It.minX=je&&It.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",oe.z,oe.x,oe.y,oe.numFeatures,oe.numPoints,oe.numSimplified);let It=`z${oe.z}`;this.stats[It]=(this.stats[It]||0)-1,this.total--}delete this.tiles[he],Q.add(he)}}Q.size&&(this.tileCoords=this.tileCoords.filter((he=>!Q.has(he.id))))}}function RS(M,h,b){return 32*((1<b.id)),this.index=h.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let b of this.layers)this.gradients[b.id]={};this.layoutVertexArray=new Bt,this.layoutVertexArray2=new St,this.indexArray=new Er,this.programConfigurations=new Ta(h.layers,h.zoom),this.segments=new an,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((b=>b.isStateDependent())).map((b=>b.id))}populate(h,b,D){this.hasDependencies=SS("line",this.layers,b)||this.hasLineDasharray(this.layers);let z=this.layers[0].layout.get("line-sort-key"),G=!z.isConstant(),X=[];for(let{feature:Z,id:re,index:Q,sourceLayerIndex:he}of h){let oe=this.layers[0]._featureFilter.needGeometry,ke=xa(Z,oe);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),ke,D))continue;let ge=G?z.evaluate(ke,{},D):void 0,Ue={id:re,properties:Z.properties,type:Z.type,sourceLayerIndex:he,index:Q,geometry:oe?ke.geometry:$l(Z),patterns:{},dashes:{},sortKey:ge};X.push(Ue)}G&&X.sort(((Z,re)=>Z.sortKey-re.sortKey));for(let Z of X){let{geometry:re,index:Q,sourceLayerIndex:he}=Z;this.hasDependencies?(SS("line",this.layers,b)?UR("line",this.layers,Z,{zoom:this.zoom},b):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,Z,this.zoom,b),this.patternFeatures.push(Z)):this.addFeature(Z,re,Q,D,{},{},b.subdivisionGranularity),b.featureIndex.insert(h[Q].feature,re,Q,he,this.index)}}update(h,b,D,z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,b,this.stateDependentLayers,{imagePositions:D,dashPositions:z})}addFeatures(h,b,D,z){for(let G of this.patternFeatures)this.addFeature(G,G.geometry,G.index,b,D,z,h.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=h.createVertexBuffer(this.layoutVertexArray2,Ont)),this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,qnt),this.indexBuffer=h.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(h){if(h.properties&&Object.hasOwn(h.properties,aI)&&Object.hasOwn(h.properties,oI))return{start:+h.properties[aI],end:+h.properties[oI]}}addFeature(h,b,D,z,G,X,Z){let re=this.layers[0].layout,Q=re.get("line-join").evaluate(h,{}),he=re.get("line-cap").evaluate(h,{}),oe=re.get("line-miter-limit").evaluate(h,{}),ke=re.get("line-round-limit").evaluate(h,{});this.lineClips=this.lineFeatureClips(h);for(let ge of b)this.addLine(ge,h,Q,he,oe,ke,z,Z);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,h,D,{imagePositions:G,dashPositions:X,canonical:z})}addLine(h,b,D,z,G,X,Z,re){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,h=n2(h,Z?re.line.getGranularityForZoomLevel(Z.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let _t=0;_t=2&&h[he-1].equals(h[he-2]);)he--;let oe=0;for(;oe0;if(_n&&_t>oe){let Ln=Ue.dist(je);if(Ln>2*ke){let un=Ue.sub(Ue.sub(je)._mult(ke/Ln)._round());this.updateDistance(je,un),this.addCurrentVertex(un,gt,0,0,ge),je=un}}let Dn=je&&dt,Hn=Dn?D:Q?"butt":z;if(Dn&&Hn==="round"&&(qrG&&(Hn="bevel"),Hn==="bevel"&&(qr>2&&(Hn="flipbevel"),qr100)qt=It.mult(-1);else{let Ln=qr*gt.add(It).mag()/gt.sub(It).mag();qt._perp()._mult(Ln*(fn?-1:1))}this.addCurrentVertex(Ue,qt,0,0,ge),this.addCurrentVertex(Ue,qt.mult(-1),0,0,ge)}else if(Hn==="bevel"||Hn==="fakeround"){let Ln=-Math.sqrt(qr*qr-1),un=fn?Ln:0,ei=fn?0:Ln;if(je&&this.addCurrentVertex(Ue,gt,un,ei,ge),Hn==="fakeround"){let ci=Math.round(180*jr/Math.PI/20);for(let ti=1;ti2*ke){let un=Ue.add(dt.sub(Ue)._mult(ke/Ln)._round());this.updateDistance(Ue,un),this.addCurrentVertex(un,It,0,0,ge),Ue=un}}}}addCurrentVertex(h,b,D,z,G,X=!1){let Z=b.y*z-b.x,re=-b.y-b.x*z;this.addHalfVertex(h,b.x+b.y*D,b.y-b.x*D,X,!1,D,G),this.addHalfVertex(h,Z,re,X,!0,-z,G),this.distance>WQ/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(h,b,D,z,G,X))}addHalfVertex({x:h,y:b},D,z,G,X,Z,re){let Q=.5*(this.lineClips?this.scaledDistance*(WQ-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((h<<1)+(G?1:0),(b<<1)+(X?1:0),Math.round(63*D)+128,Math.round(63*z)+128,1+(Z===0?0:Z<0?-1:1)|(63&Q)<<2,Q>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let he=re.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,he,this.e2),re.primitiveLength++),X?this.e2=he:this.e1=he}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(h,b){this.distance+=h.dist(b),this.updateScaledDistance()}hasLineDasharray(h){for(let b of h){let D=b.paint.get("line-dasharray");if(D&&!D.isConstant())return!0}return!1}addLineDashDependencies(h,b,D,z){for(let G of h){let X=G.paint.get("line-dasharray");if(!X||X.value.kind==="constant")continue;let Z=G.layout.get("line-cap").evaluate(b,{})==="round",re={dasharray:X.value.evaluate({zoom:D-1},b,{}),round:Z},Q={dasharray:X.value.evaluate({zoom:D},b,{}),round:Z},he={dasharray:X.value.evaluate({zoom:D+1},b,{}),round:Z},oe=`${re.dasharray.join(",")},${re.round}`,ke=`${Q.dasharray.join(",")},${Q.round}`,ge=`${he.dasharray.join(",")},${he.round}`;z.dashDependencies[oe]=re,z.dashDependencies[ke]=Q,z.dashDependencies[ge]=he,b.dashes[G.id]={min:oe,mid:ke,max:ge}}}}let YQ,XQ;_i("LineBucket",lI,{omit:["layers","patternFeatures"]});var ZQ={get paint(){return XQ=XQ||new ms({"line-opacity":new Di(Ct.paint_line["line-opacity"]),"line-color":new Di(Ct.paint_line["line-color"]),"line-translate":new wi(Ct.paint_line["line-translate"]),"line-translate-anchor":new wi(Ct.paint_line["line-translate-anchor"]),"line-width":new Di(Ct.paint_line["line-width"]),"line-gap-width":new Di(Ct.paint_line["line-gap-width"]),"line-offset":new Di(Ct.paint_line["line-offset"]),"line-blur":new Di(Ct.paint_line["line-blur"]),"line-dasharray":new fl(Ct.paint_line["line-dasharray"]),"line-pattern":new fl(Ct.paint_line["line-pattern"]),"line-gradient":new du(Ct.paint_line["line-gradient"])})},get layout(){return YQ=YQ||new ms({"line-cap":new Di(Ct.layout_line["line-cap"]),"line-join":new Di(Ct.layout_line["line-join"]),"line-miter-limit":new Di(Ct.layout_line["line-miter-limit"]),"line-round-limit":new Di(Ct.layout_line["line-round-limit"]),"line-sort-key":new Di(Ct.layout_line["line-sort-key"])})}};class Unt extends Di{possiblyEvaluate(h,b){return b=new mi(Math.floor(b.zoom),{now:b.now,fadeDuration:b.fadeDuration,zoomHistory:b.zoomHistory,transition:b.transition}),super.possiblyEvaluate(h,b)}evaluate(h,b,D,z){return b=_e({},b,{zoom:Math.floor(b.zoom)}),super.evaluate(h,b,D,z)}}let IS;class Vnt extends hl{constructor(h,b){super(h,ZQ,b),this.gradientVersion=0,IS||(IS=new Unt(ZQ.paint.properties["line-width"].specification),IS.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(h){if(h==="line-gradient"){let b=this.gradientExpression();this.stepInterpolant=!!(function(D){return D._styleExpression!==void 0})(b)&&b._styleExpression.expression instanceof lu,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(h,b){super.recalculate(h,b),this.paint._values["line-floorwidth"]=IS.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,h)}createBucket(h){return new lI(h)}queryRadius(h){let b=h,D=$Q(sn("line-width",this,b),sn("line-gap-width",this,b)),z=sn("line-offset",this,b);return D/2+Math.abs(z)+tn(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:h,feature:b,featureState:D,geometry:z,transform:G,pixelsToTileUnits:X}){let Z=Hr(h,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-G.bearingInRadians,X),re=X/2*$Q(this.paint.get("line-width").evaluate(b,D),this.paint.get("line-gap-width").evaluate(b,D)),Q=this.paint.get("line-offset").evaluate(b,D);return Q&&(z=(function(he,oe){let ke=[];for(let ge of he){let Ue=Mr(ge),je=[];for(let dt=0;dt=3){for(let Ue of ge)if(pn(he,Ue))return!0}if(To(he,ge,ke))return!0}return!1})(Z,z,re)}isTileClipped(){return!0}}function $Q(M,h){return h>0?h+2*M:M}let Gnt=Re([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Hnt=Re([{name:"a_projected_pos",components:3,type:"Float32"}],4);Re([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let jnt=Re([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Re([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let KQ=Re([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Wnt=Re([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Ynt(M,h,b){let D=h.layout.get("text-transform").evaluate(b,{});return D==="uppercase"?M=M.toLocaleUpperCase():D==="lowercase"&&(M=M.toLocaleLowerCase()),Bi.applyArabicShaping&&(M=Bi.applyArabicShaping(M)),M}function Xnt(M,h,b){for(let D of M.sections)D.text=Ynt(D.text,h,b);return M}Re([{name:"triangle",components:3,type:"Uint16"}]),Re([{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"}]),Re([{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"}]),Re([{type:"Float32",name:"offsetX"}]),Re([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Re([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var Rc=24;let y4={"!":"\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"},Znt={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},$nt={40:!0};function JQ(M,h,b,D,z,G){if("fontStack"in h){let X=b[h.fontStack],Z=X==null?void 0:X[M];return Z?Z.metrics.advance*h.scale+z:0}{let X=D[h.imageName];return X?X.displaySize[0]*h.scale*Rc/G+z:0}}function QQ(M,h,b,D){let z=Math.pow(M-h,2);return D?MMath.max(h,this.sections[b].scale)),0)}getMaxImageSize(h){let b=0,D=0;for(let z=0;zD)))}addImageSection(h){let b=h.image?h.image.name:"";if(b.length===0)return void xe("Can't add FormattedSection with an empty image.");let D=this.getNextImageSectionCharCode();D?(this.text+=String.fromCharCode(D),this.sections.push({scale:1,verticalAlign:h.verticalAlign||"bottom",imageName:b}),this.sectionIndex.push(this.sections.length-1)):xe("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(h,b,D,z,G){let X=[],Z=this.determineAverageLineWidth(h,b,D,z,G),re=this.hasZeroWidthSpaces(),Q=0,he=0,oe=this.text[Symbol.iterator](),ke=oe.next(),ge=this.text[Symbol.iterator]();ge.next();let Ue=ge.next(),je=this.text[Symbol.iterator]();je.next(),je.next();let dt=je.next();for(;!ke.done;){let gt=this.getSection(he),It=ke.value.codePointAt(0);if(Gt(It)||(Q+=JQ(It,gt,D,z,h,G)),!Ue.done){let _t=Je(It),qt=Ue.value.codePointAt(0);(Znt[It]||_t||"imageName"in gt||!dt.done&&$nt[qt])&&X.push(eee(he+1,Q,Z,X,Knt(It,qt,_t&&re),!1))}he++,ke=oe.next(),Ue=ge.next(),dt=je.next()}return tee(eee(this.length(),Q,Z,X,0,!0))}determineAverageLineWidth(h,b,D,z,G){let X=0,Z=0;for(let re of this.text){let Q=this.getSection(Z);X+=JQ(re.codePointAt(0),Q,D,z,h,G),Z++}return X/Math.max(1,Math.ceil(X/b))}}let uI=4294967296,ree=1/uI,nee=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");class zS{constructor(h=new Uint8Array(16)){this.buf=ArrayBuffer.isView(h)?h:new Uint8Array(h),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(h,b,D=this.length){for(;this.pos>3,X=this.pos;this.type=7&z,h(G,b,this),this.pos===X&&this.skip(z)}return b}readMessage(h,b){return this.readFields(h,b,this.readVarint()+this.pos)}readFixed32(){let h=this.dataView.getUint32(this.pos,!0);return this.pos+=4,h}readSFixed32(){let h=this.dataView.getInt32(this.pos,!0);return this.pos+=4,h}readFixed64(){let h=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*uI;return this.pos+=8,h}readSFixed64(){let h=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*uI;return this.pos+=8,h}readFloat(){let h=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,h}readDouble(){let h=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,h}readVarint(h){let b=this.buf,D,z;return z=b[this.pos++],D=127&z,z<128?D:(z=b[this.pos++],D|=(127&z)<<7,z<128?D:(z=b[this.pos++],D|=(127&z)<<14,z<128?D:(z=b[this.pos++],D|=(127&z)<<21,z<128?D:(z=b[this.pos],D|=(15&z)<<28,(function(G,X,Z){let re=Z.buf,Q,he;if(he=re[Z.pos++],Q=(112&he)>>4,he<128||(he=re[Z.pos++],Q|=(127&he)<<3,he<128)||(he=re[Z.pos++],Q|=(127&he)<<10,he<128)||(he=re[Z.pos++],Q|=(127&he)<<17,he<128)||(he=re[Z.pos++],Q|=(127&he)<<24,he<128)||(he=re[Z.pos++],Q|=(1&he)<<31,he<128))return Y_(G,Q,X);throw new Error("Expected varint not more than 10 bytes")})(D,h,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let h=this.readVarint();return h%2==1?(h+1)/-2:h/2}readBoolean(){return!!this.readVarint()}readString(){let h=this.readVarint()+this.pos,b=this.pos;return this.pos=h,h-b>=12&&nee?nee.decode(this.buf.subarray(b,h)):(function(D,z,G){let X="",Z=z;for(;Z239?4:re>223?3:re>191?2:1;if(Z+ge>G)break;ge===1?re<128&&(ke=re):ge===2?(Q=D[Z+1],(192&Q)==128&&(ke=(31&re)<<6|63&Q,ke<=127&&(ke=null))):ge===3?(Q=D[Z+1],he=D[Z+2],(192&Q)==128&&(192&he)==128&&(ke=(15&re)<<12|(63&Q)<<6|63&he,(ke<=2047||ke>=55296&&ke<=57343)&&(ke=null))):ge===4&&(Q=D[Z+1],he=D[Z+2],oe=D[Z+3],(192&Q)==128&&(192&he)==128&&(192&oe)==128&&(ke=(15&re)<<18|(63&Q)<<12|(63&he)<<6|63&oe,(ke<=65535||ke>=1114112)&&(ke=null))),ke===null?(ke=65533,ge=1):ke>65535&&(ke-=65536,X+=String.fromCharCode(ke>>>10&1023|55296),ke=56320|1023&ke),X+=String.fromCharCode(ke),Z+=ge}return X})(this.buf,b,h)}readBytes(){let h=this.readVarint()+this.pos,b=this.buf.subarray(this.pos,h);return this.pos=h,b}readPackedVarint(h=[],b){let D=this.readPackedEnd();for(;this.pos127;);else if(b===2)this.pos=this.readVarint()+this.pos;else if(b===5)this.pos+=4;else{if(b!==1)throw new Error(`Unimplemented type: ${b}`);this.pos+=8}}writeTag(h,b){this.writeVarint(h<<3|b)}realloc(h){let b=this.length||16;for(;b268435455||h<0?(function(b,D){let z,G;if(b>=0?(z=b%4294967296|0,G=b/4294967296|0):(z=~(-b%4294967296),G=~(-b/4294967296),4294967295^z?z=z+1|0:(z=0,G=G+1|0)),b>=18446744073709552e3||b<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");D.realloc(10),(function(X,Z,re){re.buf[re.pos++]=127&X|128,X>>>=7,re.buf[re.pos++]=127&X|128,X>>>=7,re.buf[re.pos++]=127&X|128,X>>>=7,re.buf[re.pos++]=127&X|128,re.buf[re.pos]=127&(X>>>=7)})(z,0,D),(function(X,Z){let re=(7&X)<<4;Z.buf[Z.pos++]|=re|((X>>>=3)?128:0),X&&(Z.buf[Z.pos++]=127&X|((X>>>=7)?128:0),X&&(Z.buf[Z.pos++]=127&X|((X>>>=7)?128:0),X&&(Z.buf[Z.pos++]=127&X|((X>>>=7)?128:0),X&&(Z.buf[Z.pos++]=127&X|((X>>>=7)?128:0),X&&(Z.buf[Z.pos++]=127&X)))))})(G,D)})(h,this):(this.realloc(4),this.buf[this.pos++]=127&h|(h>127?128:0),h<=127||(this.buf[this.pos++]=127&(h>>>=7)|(h>127?128:0),h<=127||(this.buf[this.pos++]=127&(h>>>=7)|(h>127?128:0),h<=127||(this.buf[this.pos++]=h>>>7&127))))}writeSVarint(h){this.writeVarint(h<0?2*-h-1:2*h)}writeBoolean(h){this.writeVarint(+h)}writeString(h){h=String(h),this.realloc(4*h.length),this.pos++;let b=this.pos;this.pos=(function(z,G,X){for(let Z,re,Q=0;Q55295&&Z<57344){if(!re){Z>56319||Q+1===G.length?(z[X++]=239,z[X++]=191,z[X++]=189):re=Z;continue}if(Z<56320){z[X++]=239,z[X++]=191,z[X++]=189,re=Z;continue}Z=re-55296<<10|Z-56320|65536,re=null}else re&&(z[X++]=239,z[X++]=191,z[X++]=189,re=null);Z<128?z[X++]=Z:(Z<2048?z[X++]=Z>>6|192:(Z<65536?z[X++]=Z>>12|224:(z[X++]=Z>>18|240,z[X++]=Z>>12&63|128),z[X++]=Z>>6&63|128),z[X++]=63&Z|128)}return X})(this.buf,h,this.pos);let D=this.pos-b;D>=128&&iee(b,D,this),this.pos=b-1,this.writeVarint(D),this.pos+=D}writeFloat(h){this.realloc(4),this.dataView.setFloat32(this.pos,h,!0),this.pos+=4}writeDouble(h){this.realloc(8),this.dataView.setFloat64(this.pos,h,!0),this.pos+=8}writeBytes(h){let b=h.length;this.writeVarint(b),this.realloc(b);for(let D=0;D=128&&iee(D,z,this),this.pos=D-1,this.writeVarint(z),this.pos+=z}writeMessage(h,b,D){this.writeTag(h,2),this.writeRawMessage(b,D)}writePackedVarint(h,b){b.length&&this.writeMessage(h,Jnt,b)}writePackedSVarint(h,b){b.length&&this.writeMessage(h,Qnt,b)}writePackedBoolean(h,b){b.length&&this.writeMessage(h,rit,b)}writePackedFloat(h,b){b.length&&this.writeMessage(h,eit,b)}writePackedDouble(h,b){b.length&&this.writeMessage(h,tit,b)}writePackedFixed32(h,b){b.length&&this.writeMessage(h,nit,b)}writePackedSFixed32(h,b){b.length&&this.writeMessage(h,iit,b)}writePackedFixed64(h,b){b.length&&this.writeMessage(h,ait,b)}writePackedSFixed64(h,b){b.length&&this.writeMessage(h,oit,b)}writeBytesField(h,b){this.writeTag(h,2),this.writeBytes(b)}writeFixed32Field(h,b){this.writeTag(h,5),this.writeFixed32(b)}writeSFixed32Field(h,b){this.writeTag(h,5),this.writeSFixed32(b)}writeFixed64Field(h,b){this.writeTag(h,1),this.writeFixed64(b)}writeSFixed64Field(h,b){this.writeTag(h,1),this.writeSFixed64(b)}writeVarintField(h,b){this.writeTag(h,0),this.writeVarint(b)}writeSVarintField(h,b){this.writeTag(h,0),this.writeSVarint(b)}writeStringField(h,b){this.writeTag(h,2),this.writeString(b)}writeFloatField(h,b){this.writeTag(h,5),this.writeFloat(b)}writeDoubleField(h,b){this.writeTag(h,1),this.writeDouble(b)}writeBooleanField(h,b){this.writeVarintField(h,+b)}}function Y_(M,h,b){return b?4294967296*h+(M>>>0):4294967296*(h>>>0)+(M>>>0)}function iee(M,h,b){let D=h<=16383?1:h<=2097151?2:h<=268435455?3:Math.floor(Math.log(h)/(7*Math.LN2));b.realloc(D);for(let z=b.pos-1;z>=M;z--)b.buf[z+D]=b.buf[z]}function Jnt(M,h){for(let b=0;bZ.h-X.h));let D=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(h/.95)),b),h:1/0}],z=0,G=0;for(let X of M)for(let Z=D.length-1;Z>=0;Z--){let re=D[Z];if(!(X.w>re.w||X.h>re.h)){if(X.x=re.x,X.y=re.y,G=Math.max(G,X.y+X.h),z=Math.max(z,X.x+X.w),X.w===re.w&&X.h===re.h){let Q=D.pop();Q&&Zje.toCodeUnitIndex(qr)));let lr=It(je.toString(),gt);for(let qr of lr){let jr=[...qr].map((()=>0));dt.push(new W_(qr,je.sections,jr))}}else if(_t){dt=[],gt=gt.map((_n=>je.toCodeUnitIndex(_n)));let lr=0,qr=[];for(let _n of je.text)qr.push(...Array(_n.length).fill(je.sectionIndex[lr])),lr++;let jr=_t(je.text,qr,gt);for(let _n of jr){let fn=[],Dn="";for(let Hn of _n[0])fn.push(_n[1][Dn.length]),Dn+=Hn;dt.push(new W_(_n[0],je.sections,fn))}}else dt=(function(lr,qr){let jr=[],_n=0;for(let fn of qr)jr.push(lr.substring(_n,fn)),_n=fn;return _nQ){let he=Math.ceil(G/Q);z*=he/X,X=he}return{x1:D,y1:z,x2:D+G,y2:z+X}}function uee(M,h,b,D,z,G){let X=M.image,Z;if(X.content){let dt=X.content,gt=X.pixelRatio||1;Z=[dt[0]/gt,dt[1]/gt,X.displaySize[0]-dt[2]/gt,X.displaySize[1]-dt[3]/gt]}let re=h.left*G,Q=h.right*G,he,oe,ke,ge;b==="width"||b==="both"?(ge=z[0]+re-D[3],oe=z[0]+Q+D[1]):(ge=z[0]+(re+Q-X.displaySize[0])/2,oe=ge+X.displaySize[0]);let Ue=h.top*G,je=h.bottom*G;return b==="height"||b==="both"?(he=z[1]+Ue-D[0],ke=z[1]+je+D[2]):(he=z[1]+(Ue+je-X.displaySize[1])/2,ke=he+X.displaySize[1]),{image:X,top:he,right:oe,bottom:ke,left:ge,collisionPadding:Z}}_i("ImagePosition",cI),_i("ImageAtlas",oee),a.ax=void 0,(Wg=a.ax||(a.ax={}))[Wg.none=0]="none",Wg[Wg.horizontal=1]="horizontal",Wg[Wg.vertical=2]="vertical",Wg[Wg.horizontalOnly=3]="horizontalOnly";let N1=128,Yg=32640;function cee(M,h){let{expression:b}=h;if(b.kind==="constant")return{kind:"constant",layoutSize:b.evaluate(new mi(M+1))};if(b.kind==="source")return{kind:"source"};{let{zoomStops:D,interpolationType:z}=b,G=0;for(;GX.id)),this.index=h.index,this.pixelRatio=h.pixelRatio,this.sourceLayerIndex=h.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let b=this.layers[0]._unevaluatedLayout._values;this.textSizeData=cee(this.zoom,b["text-size"]),this.iconSizeData=cee(this.zoom,b["icon-size"]);let D=this.layers[0].layout,z=D.get("symbol-sort-key"),G=D.get("symbol-z-order");this.canOverlap=hI(D,"text-overlap","text-allow-overlap")!=="never"||hI(D,"icon-overlap","icon-allow-overlap")!=="never"||D.get("text-ignore-placement")||D.get("icon-ignore-placement"),this.sortFeaturesByKey=G!=="viewport-y"&&!z.isConstant(),this.sortFeaturesByY=(G==="viewport-y"||G==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,D.get("symbol-placement")==="point"&&(this.writingModes=D.get("text-writing-mode").map((X=>a.ax[X]))),this.stateDependentLayerIds=this.layers.filter((X=>X.isStateDependent())).map((X=>X.id)),this.sourceID=h.sourceID}createArrays(){this.text=new vI(new Ta(this.layers,this.zoom,(h=>h.startsWith("text")))),this.icon=new vI(new Ta(this.layers,this.zoom,(h=>h.startsWith("icon")))),this.glyphOffsetArray=new Fe,this.lineVertexArray=new Ie,this.symbolInstances=new Ae,this.textAnchorOffsets=new st}calculateGlyphDependencies(h,b,D,z,G){for(let X of h)if(b[X.codePointAt(0)]=!0,(D||z)&&G){let Z=y4[X];Z&&(b[Z.codePointAt(0)]=!0)}}populate(h,b,D){var z;let G=this.layers[0],X=G.layout,Z=X.get("text-font"),re=X.get("text-field"),Q=X.get("icon-image"),he=(re.value.kind!=="constant"||re.value.value instanceof $a&&!re.value.value.isEmpty()||re.value.value.toString().length>0)&&(Z.value.kind!=="constant"||Z.value.value.length>0),oe=Q.value.kind!=="constant"||!!Q.value.value||Object.keys(Q.parameters).length>0,ke=X.get("symbol-sort-key");if(this.features=[],!he&&!oe)return;let ge=b.iconDependencies,Ue=b.glyphDependencies,je=b.availableImages,dt=new mi(this.zoom);for(let{feature:gt,id:It,index:_t,sourceLayerIndex:qt}of h){let tr=G._featureFilter.needGeometry,lr=xa(gt,tr);if(!G._featureFilter.filter(dt,lr,D))continue;let qr,jr;if(tr||(lr.geometry=$l(gt)),he){let fn=G.getValueAndResolveTokens("text-field",lr,D,je),Dn=$a.factory(fn);this.hasRTLText||(this.hasRTLText=mit(Dn)),(!this.hasRTLText||Bi.getRTLTextPluginStatus()==="unavailable"||this.hasRTLText&&Bi.isParsed())&&(qr=Xnt(Dn,G,lr))}if(oe){let fn=G.getValueAndResolveTokens("icon-image",lr,D,je);jr=fn instanceof so?fn:so.fromString(fn)}if(!qr&&!jr)continue;let _n=this.sortFeaturesByKey?ke.evaluate(lr,{},D):void 0;if(this.features.push({id:It,text:qr,icon:jr,index:_t,sourceLayerIndex:qt,geometry:lr.geometry,properties:gt.properties,type:d4.types[gt.type],sortKey:_n}),jr&&(ge[jr.name]=!0),qr){let fn=Z.evaluate(lr,{},D).join(","),Dn=X.get("text-rotation-alignment")!=="viewport"&&X.get("symbol-placement")!=="point";this.allowVerticalPlacement=(z=this.writingModes)===null||z===void 0?void 0:z.includes(a.ax.vertical);for(let Hn of qr.sections)if(Hn.image)ge[Hn.image.name]=!0;else{let Ln=Zt(qr.toString()),un=Hn.fontStack||fn;Ue[un]||(Ue[un]={}),this.calculateGlyphDependencies(Hn.text,Ue[un],Dn,this.allowVerticalPlacement,Ln)}}}X.get("symbol-placement")==="line"&&(this.features=(function(gt){let It={},_t={},qt=[],tr=0;function lr(fn){qt.push(gt[fn]),tr++}function qr(fn,Dn,Hn){let Ln=_t[fn];return delete _t[fn],_t[Dn]=Ln,qt[Ln].geometry[0].pop(),qt[Ln].geometry[0]=qt[Ln].geometry[0].concat(Hn[0]),Ln}function jr(fn,Dn,Hn){let Ln=It[Dn];return delete It[Dn],It[fn]=Ln,qt[Ln].geometry[0].shift(),qt[Ln].geometry[0]=Hn[0].concat(qt[Ln].geometry[0]),Ln}function _n(fn,Dn,Hn){let Ln=Hn?Dn[0][Dn[0].length-1]:Dn[0][0];return`${fn}:${Ln.x}:${Ln.y}`}for(let fn=0;fnfn.geometry))})(this.features)),this.sortFeaturesByKey&&this.features.sort(((gt,It)=>gt.sortKey-It.sortKey))}update(h,b,D){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(h,b,this.layers,{imagePositions:D}),this.icon.programConfigurations.updatePaintArrays(h,b,this.layers,{imagePositions:D}))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(h){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(h),this.iconCollisionBox.upload(h)),this.text.upload(h,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(h,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(h,b){let D=this.lineVertexArray.length;if(h.segment!==void 0){let z=h.dist(b[h.segment+1]),G=h.dist(b[h.segment]),X={};for(let Z=h.segment+1;Z=0;Z--)X[Z]={x:b[Z].x,y:b[Z].y,tileUnitDistanceFromAnchor:G},Z>0&&(G+=b[Z-1].dist(b[Z]));for(let Z=0;Z0}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(h,b){let D=h.placedSymbolArray.get(b),z=D.vertexStartIndex+4*D.numGlyphs;for(let G=D.vertexStartIndex;Gz[Z]-z[re]||G[re]-G[Z])),X}addToSortKeyRanges(h,b){let D=this.sortKeyRanges[this.sortKeyRanges.length-1];(D==null?void 0:D.sortKey)===b?D.symbolInstanceEnd=h+1:this.sortKeyRanges.push({sortKey:b,symbolInstanceStart:h,symbolInstanceEnd:h+1})}sortFeatures(h){if(this.sortFeaturesByY&&this.sortedAngle!==h&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(h),this.sortedAngle=h,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let b of this.symbolInstanceIndexes){let D=this.symbolInstances.get(b);this.featureSortOrder.push(D.featureIndex);let z=[D.rightJustifiedTextSymbolIndex,D.centerJustifiedTextSymbolIndex,D.leftJustifiedTextSymbolIndex];for(let G=0;G=0&&z.indexOf(X)===G&&this.addIndicesForPlacedSymbol(this.text,X)}D.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,D.verticalPlacedTextSymbolIndex),D.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,D.placedIconSymbolIndex),D.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,D.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let fee,hee;_i("SymbolBucket",X_,{omit:["layers","collisionBoxArray","features","compareText"]}),X_.MAX_GLYPHS=65535,X_.addDynamicAttributes=dI;var gI={get paint(){return hee=hee||new ms({"icon-opacity":new Di(Ct.paint_symbol["icon-opacity"]),"icon-color":new Di(Ct.paint_symbol["icon-color"]),"icon-halo-color":new Di(Ct.paint_symbol["icon-halo-color"]),"icon-halo-width":new Di(Ct.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Di(Ct.paint_symbol["icon-halo-blur"]),"icon-translate":new wi(Ct.paint_symbol["icon-translate"]),"icon-translate-anchor":new wi(Ct.paint_symbol["icon-translate-anchor"]),"text-opacity":new Di(Ct.paint_symbol["text-opacity"]),"text-color":new Di(Ct.paint_symbol["text-color"],{runtimeType:Ut,getOverride:M=>M.textColor,hasOverride:M=>!!M.textColor}),"text-halo-color":new Di(Ct.paint_symbol["text-halo-color"]),"text-halo-width":new Di(Ct.paint_symbol["text-halo-width"]),"text-halo-blur":new Di(Ct.paint_symbol["text-halo-blur"]),"text-translate":new wi(Ct.paint_symbol["text-translate"]),"text-translate-anchor":new wi(Ct.paint_symbol["text-translate-anchor"])})},get layout(){return fee=fee||new ms({"symbol-placement":new wi(Ct.layout_symbol["symbol-placement"]),"symbol-spacing":new wi(Ct.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new wi(Ct.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Di(Ct.layout_symbol["symbol-sort-key"]),"symbol-z-order":new wi(Ct.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new wi(Ct.layout_symbol["icon-allow-overlap"]),"icon-overlap":new wi(Ct.layout_symbol["icon-overlap"]),"icon-ignore-placement":new wi(Ct.layout_symbol["icon-ignore-placement"]),"icon-optional":new wi(Ct.layout_symbol["icon-optional"]),"icon-rotation-alignment":new wi(Ct.layout_symbol["icon-rotation-alignment"]),"icon-size":new Di(Ct.layout_symbol["icon-size"]),"icon-text-fit":new wi(Ct.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new wi(Ct.layout_symbol["icon-text-fit-padding"]),"icon-image":new Di(Ct.layout_symbol["icon-image"]),"icon-rotate":new Di(Ct.layout_symbol["icon-rotate"]),"icon-padding":new Di(Ct.layout_symbol["icon-padding"]),"icon-keep-upright":new wi(Ct.layout_symbol["icon-keep-upright"]),"icon-offset":new Di(Ct.layout_symbol["icon-offset"]),"icon-anchor":new Di(Ct.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new wi(Ct.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new wi(Ct.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new wi(Ct.layout_symbol["text-rotation-alignment"]),"text-field":new Di(Ct.layout_symbol["text-field"]),"text-font":new Di(Ct.layout_symbol["text-font"]),"text-size":new Di(Ct.layout_symbol["text-size"]),"text-max-width":new Di(Ct.layout_symbol["text-max-width"]),"text-line-height":new wi(Ct.layout_symbol["text-line-height"]),"text-letter-spacing":new Di(Ct.layout_symbol["text-letter-spacing"]),"text-justify":new Di(Ct.layout_symbol["text-justify"]),"text-radial-offset":new Di(Ct.layout_symbol["text-radial-offset"]),"text-variable-anchor":new wi(Ct.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Di(Ct.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Di(Ct.layout_symbol["text-anchor"]),"text-max-angle":new wi(Ct.layout_symbol["text-max-angle"]),"text-writing-mode":new wi(Ct.layout_symbol["text-writing-mode"]),"text-rotate":new Di(Ct.layout_symbol["text-rotate"]),"text-padding":new wi(Ct.layout_symbol["text-padding"]),"text-keep-upright":new wi(Ct.layout_symbol["text-keep-upright"]),"text-transform":new Di(Ct.layout_symbol["text-transform"]),"text-offset":new Di(Ct.layout_symbol["text-offset"]),"text-allow-overlap":new wi(Ct.layout_symbol["text-allow-overlap"]),"text-overlap":new wi(Ct.layout_symbol["text-overlap"]),"text-ignore-placement":new wi(Ct.layout_symbol["text-ignore-placement"]),"text-optional":new wi(Ct.layout_symbol["text-optional"])})}};class dee{constructor(h){if(h.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=h.property.overrides?h.property.overrides.runtimeType:Dt,this.defaultValue=h}evaluate(h){if(h.formattedSection){let b=this.defaultValue.property.overrides;if(b!=null&&b.hasOverride(h.formattedSection))return b.getOverride(h.formattedSection)}return h.feature&&h.featureState?this.defaultValue.evaluate(h.feature,h.featureState):this.defaultValue.property.specification.default}eachChild(h){this.defaultValue.isConstant()||h(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}_i("FormatSectionOverride",dee,{omit:["defaultValue"]});class OS extends hl{constructor(h,b){super(h,gI,b)}recalculate(h,b){if(super.recalculate(h,b),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let D=this.layout.get("text-writing-mode");if(D){let z=[];for(let G of D)z.includes(G)||z.push(G);this.layout._values["text-writing-mode"]=z}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(h,b,D,z){let G=this.layout.get(h).evaluate(b,{},D,z),X=this._unevaluatedLayout._values[h];return X.isDataDriven()||If(X.value)||!G?G:(function(Z,re){return re.replace(/{([^{}]+)}/g,((Q,he)=>Z&&he in Z?String(Z[he]):""))})(b.properties,G)}createBucket(h){return new X_(h)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let h of gI.paint.overridableProperties){if(!OS.hasPaintOverride(this.layout,h))continue;let b=this.paint.get(h),D=new dee(b),z=new Wl(D,b.property.specification),G=null;G=b.value.kind==="constant"||b.value.kind==="source"?new zf("source",z):new qf("composite",z,b.value.zoomStops),this.paint._values[h]=new el(b.property,G,b.parameters)}}_handleOverridablePaintPropertyUpdate(h,b,D){return!(!this.layout||b.isDataDriven()||D.isDataDriven())&&OS.hasPaintOverride(this.layout,h)}static hasPaintOverride(h,b){let D=h.get("text-field"),z=gI.paint.properties[b],G=!1,X=Z=>{var re;for(let Q of Z)if(!((re=z.overrides)===null||re===void 0)&&re.hasOverride(Q))return void(G=!0)};if(D.value.kind==="constant"&&D.value.value instanceof $a)X(D.value.value.sections);else if(D.value.kind==="source"||D.value.kind==="composite"){let Z=Q=>{G||(Q instanceof Ms&&la(Q.value)===ri?X(Q.value.sections):Q instanceof Zo?X(Q.sections):Q.eachChild(Z))},re=D.value;re._styleExpression&&Z(re._styleExpression.expression)}return G}}let vee;var yit={get paint(){return vee=vee||new ms({"background-color":new wi(Ct.paint_background["background-color"]),"background-pattern":new Fc(Ct.paint_background["background-pattern"]),"background-opacity":new wi(Ct.paint_background["background-opacity"])})}};class xit extends hl{constructor(h,b){super(h,yit,b)}}class _it extends hl{constructor(h,b){super(h,{},b),this.onAdd=D=>{this.implementation.onAdd&&this.implementation.onAdd(D,D.painter.context.gl)},this.onRemove=D=>{this.implementation.onRemove&&this.implementation.onRemove(D,D.painter.context.gl)},this.implementation=h}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class bit{constructor(h){this._methodToThrottle=h,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var h;this._triggered||(this._triggered=!0,(h=this._channel)===null||h===void 0||h.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let wit={once:!0},mI=63710088e-1;class Xg{constructor(h,b){if(isNaN(h)||isNaN(b))throw new Error(`Invalid LngLat object: (${h}, ${b})`);if(this.lng=+h,this.lat=+b,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Xg(J(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(h){let b=Math.PI/180,D=this.lat*b,z=h.lat*b,G=Math.sin(D)*Math.sin(z)+Math.cos(D)*Math.cos(z)*Math.cos((h.lng-this.lng)*b);return mI*Math.acos(Math.min(G,1))}static convert(h){if(h instanceof Xg)return h;if(Array.isArray(h)&&(h.length===2||h.length===3))return new Xg(Number(h[0]),Number(h[1]));if(!Array.isArray(h)&&typeof h=="object"&&h!==null)return new Xg(Number("lng"in h?h.lng:h.lon),Number(h.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let pee=2*Math.PI*mI;function gee(M){return pee*Math.cos(M*Math.PI/180)}function mee(M){return(180+M)/360}function yee(M){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+M*Math.PI/360)))/360}function xee(M,h){return M/gee(h)}function _ee(M){return 360*M-180}function NS(M){return 360/Math.PI*Math.atan(Math.exp((180-360*M)*Math.PI/180))-90}function bee(M,h){return M*gee(NS(h))}class x4{constructor(h,b,D=0){this.x=+h,this.y=+b,this.z=+D}static fromLngLat(h,b=0){let D=Xg.convert(h);return new x4(mee(D.lng),yee(D.lat),xee(b,D.lat))}toLngLat(){return new Xg(_ee(this.x),NS(this.y))}toAltitude(){return bee(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/pee*(h=NS(this.y),1/Math.cos(h*Math.PI/180));var h}}function wee(M,h,b){var D=2*Math.PI*6378137/256/Math.pow(2,b);return[M*D-2*Math.PI*6378137/2,h*D-2*Math.PI*6378137/2]}class yI{constructor(h,b,D){if(!(function(z,G,X){return!(z<0||z>25||X<0||X>=Math.pow(2,z)||G<0||G>=Math.pow(2,z))})(h,b,D))throw new Error(`x=${b}, y=${D}, z=${h} outside of bounds. 0<=x<${Math.pow(2,h)}, 0<=y<${Math.pow(2,h)} 0<=z<=25 `);this.z=h,this.x=b,this.y=D,this.key=Z_(0,h,h,b,D)}equals(h){return this.z===h.z&&this.x===h.x&&this.y===h.y}url(h,b,D){let z=(X=this.y,Z=this.z,re=wee(256*(G=this.x),256*(X=Math.pow(2,Z)-X-1),Z),Q=wee(256*(G+1),256*(X+1),Z),re[0]+","+re[1]+","+Q[0]+","+Q[1]);var G,X,Z,re,Q;let he=(function(oe,ke,ge){let Ue="";for(let je=oe;je>0;je--){let dt=1<1?"@2x":"").replace(/{quadkey}/g,he).replace(/{bbox-epsg-3857}/g,z)}isChildOf(h){let b=this.z-h.z;return b>0&&h.x===this.x>>b&&h.y===this.y>>b}getTilePoint(h){let b=Math.pow(2,this.z);return new o((h.x*b-this.x)*j,(h.y*b-this.y)*j)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Tee{constructor(h,b){this.wrap=h,this.canonical=b,this.key=Z_(h,b.z,b.z,b.x,b.y)}}class Yd{constructor(h,b,D,z,G){if(this.terrainRttPosMatrix32f=null,h= z; overscaledZ = ${h}; z = ${D}`);this.overscaledZ=h,this.wrap=b,this.canonical=new yI(D,+z,+G),this.key=Z_(b,h,D,z,G)}clone(){return new Yd(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(h){return this.overscaledZ===h.overscaledZ&&this.wrap===h.wrap&&this.canonical.equals(h.canonical)}scaledTo(h){if(h>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${h}; overscaledZ = ${this.overscaledZ}`);let b=this.canonical.z-h;return h>this.canonical.z?new Yd(h,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Yd(h,this.wrap,h,this.canonical.x>>b,this.canonical.y>>b)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(h,b){if(h>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${h}; overscaledZ = ${this.overscaledZ}`);let D=this.canonical.z-h;return h>this.canonical.z?Z_(this.wrap*+b,h,this.canonical.z,this.canonical.x,this.canonical.y):Z_(this.wrap*+b,h,h,this.canonical.x>>D,this.canonical.y>>D)}isChildOf(h){if(h.wrap!==this.wrap||this.overscaledZ-h.overscaledZ<=0)return!1;if(h.overscaledZ===0)return this.overscaledZ>0;let b=this.canonical.z-h.canonical.z;return!(b<0)&&h.canonical.x===this.canonical.x>>b&&h.canonical.y===this.canonical.y>>b}children(h){if(this.overscaledZ>=h)return[new Yd(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let b=this.canonical.z+1,D=2*this.canonical.x,z=2*this.canonical.y;return[new Yd(b,this.wrap,b,D,z),new Yd(b,this.wrap,b,D+1,z),new Yd(b,this.wrap,b,D,z+1),new Yd(b,this.wrap,b,D+1,z+1)]}isLessThan(h){return this.wraph.wrap)&&(this.overscaledZh.overscaledZ)&&(this.canonical.xh.canonical.x)&&this.canonical.y=0&&h=0&&b=Q)return null;let oe=this.canonical.x+z,ke=this.wrap;return oe<0?(ke-=Math.ceil(-oe/Q),oe=(oe%Q+Q)%Q):oe>=Q&&(ke+=Math.floor(oe/Q),oe%=Q),{tileID:new Yd(this.overscaledZ,ke,re,oe,he),x:X,y:Z}}}function Z_(M,h,b,D,z){(M*=2)<0&&(M=-1*M-1);let G=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(h){return this.expandBy(-h)}map(h){let b=new i2;return b.extend(h(new o(this.minX,this.minY))),b.extend(h(new o(this.maxX,this.minY))),b.extend(h(new o(this.minX,this.maxY))),b.extend(h(new o(this.maxX,this.maxY))),b}static fromPoints(h){let b=new i2;for(let D of h)b.extend(D);return b}contains(h){return h.x>=this.minX&&h.x<=this.maxX&&h.y>=this.minY&&h.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(h){return!this.empty()&&!h.empty()&&h.minX>=this.minX&&h.maxX<=this.maxX&&h.minY>=this.minY&&h.maxY<=this.maxY}intersects(h){return!this.empty()&&!h.empty()&&h.minX<=this.maxX&&h.maxX>=this.minX&&h.minY<=this.maxY&&h.maxY>=this.minY}}class Aee{constructor(h){this._stringToNumber={},this._numberToString=[];for(let b=0;b=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${h} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[h]}}class Mee{constructor(h,b,D,z,G){this.type="Feature",this._vectorTileFeature=h,this._x=D,this._y=z,this._z=b,this.properties=h.properties,this.id=G}projectPoint(h,b,D,z){return[360*(h.x+b)/z-180,360/Math.PI*Math.atan(Math.exp((1-2*(h.y+D)/z)*Math.PI))-90]}projectLine(h,b,D,z){return h.map((G=>this.projectPoint(G,b,D,z)))}get geometry(){if(this._geometry)return this._geometry;let h=this._vectorTileFeature,b=h.extent*Math.pow(2,this._z),D=h.extent*this._x,z=h.extent*this._y,G=h.loadGeometry();switch(h.type){case 1:{let X=[];for(let re of G)X.push(re[0]);let Z=this.projectLine(X,D,z,b);this._geometry=X.length===1?{type:"Point",coordinates:Z[0]}:{type:"MultiPoint",coordinates:Z};break}case 2:{let X=G.map((Z=>this.projectLine(Z,D,z,b)));this._geometry=X.length===1?{type:"LineString",coordinates:X[0]}:{type:"MultiLineString",coordinates:X};break}case 3:{let X=kQ(G),Z=[];for(let re of X)Z.push(re.map((Q=>this.projectLine(Q,D,z,b))));this._geometry=Z.length===1?{type:"Polygon",coordinates:Z[0]}:{type:"MultiPolygon",coordinates:Z};break}default:throw new Error(`unknown feature type: ${h.type}`)}return this._geometry}set geometry(h){this._geometry=h}toJSON(){let h={geometry:this.geometry};for(let b in this)b!=="_geometry"&&b!=="_vectorTileFeature"&&b!=="_x"&&b!=="_y"&&b!=="_z"&&(h[b]=this[b]);return h}}class $_{constructor(h,b,D){this._name=h,this.dataBuffer=b,typeof D=="number"?this._size=D:(this.nullabilityBuffer=D,this._size=D.size())}getValue(h){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(h)?null:this.getValueFromBuffer(h)}has(h){var b;return((b=this.nullabilityBuffer)==null?void 0:b.get(h))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class US extends $_{}class xI extends US{getValueFromBuffer(h){return this.dataBuffer[h]}}class _I extends US{getValueFromBuffer(h){return this.dataBuffer[h]}}class See extends $_{constructor(h,b,D,z){super(h,b,z),this.delta=D}}class bI extends See{constructor(h,b,D,z){super(h,Int32Array.of(b),D,z)}getValueFromBuffer(h){return this.dataBuffer[0]+h*this.delta}}class wI extends $_{constructor(h,b,D,z){super(h,z?Int32Array.of(b):Uint32Array.of(b),D)}getValueFromBuffer(h){return this.dataBuffer[0]}}class Tit{constructor(h,b,D,z,G=4096){this._name=h,this._geometryVector=b,this._idVector=D,this._propertyVectors=z,this._extent=G}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(h){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map((b=>[b.name,b])))),this.propertyVectorsMap.get(h)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let h=[],b=this.geometryVector.getGeometries();for(let D=0;D>>32-M;let AI=TI,U1=256;function MI(M,h){return M-M%h}function Ait(M){let h=M>>>0;return((255&h)<<24|(65280&h)<<8|h>>>8&65280|h>>>24&255)>>>0}let SI=(function(){if(!Number.isFinite(65536))return 65536;let M=MI(Math.floor(65536),U1);return M===0?U1:M})(),Mit=3*SI/U1+SI|0;function kee(){let M=new Uint8Array(Mit);return{dataToBePacked:new Array(33),dataPointers:new Int32Array(33),byteContainer:M,byteContainerI32:new Int32Array(M.buffer,M.byteOffset,M.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function Sit(M,h,b,D,z){switch(z){case 1:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0;Z[Q++]=ke>>>0&1,Z[Q++]=ke>>>1&1,Z[Q++]=ke>>>2&1,Z[Q++]=ke>>>3&1,Z[Q++]=ke>>>4&1,Z[Q++]=ke>>>5&1,Z[Q++]=ke>>>6&1,Z[Q++]=ke>>>7&1,Z[Q++]=ke>>>8&1,Z[Q++]=ke>>>9&1,Z[Q++]=ke>>>10&1,Z[Q++]=ke>>>11&1,Z[Q++]=ke>>>12&1,Z[Q++]=ke>>>13&1,Z[Q++]=ke>>>14&1,Z[Q++]=ke>>>15&1,Z[Q++]=ke>>>16&1,Z[Q++]=ke>>>17&1,Z[Q++]=ke>>>18&1,Z[Q++]=ke>>>19&1,Z[Q++]=ke>>>20&1,Z[Q++]=ke>>>21&1,Z[Q++]=ke>>>22&1,Z[Q++]=ke>>>23&1,Z[Q++]=ke>>>24&1,Z[Q++]=ke>>>25&1,Z[Q++]=ke>>>26&1,Z[Q++]=ke>>>27&1,Z[Q++]=ke>>>28&1,Z[Q++]=ke>>>29&1,Z[Q++]=ke>>>30&1,Z[Q++]=ke>>>31&1}})(M,h,b,D);break;case 2:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0;Z[Q++]=ke>>>0&3,Z[Q++]=ke>>>2&3,Z[Q++]=ke>>>4&3,Z[Q++]=ke>>>6&3,Z[Q++]=ke>>>8&3,Z[Q++]=ke>>>10&3,Z[Q++]=ke>>>12&3,Z[Q++]=ke>>>14&3,Z[Q++]=ke>>>16&3,Z[Q++]=ke>>>18&3,Z[Q++]=ke>>>20&3,Z[Q++]=ke>>>22&3,Z[Q++]=ke>>>24&3,Z[Q++]=ke>>>26&3,Z[Q++]=ke>>>28&3,Z[Q++]=ke>>>30&3,Z[Q++]=ge>>>0&3,Z[Q++]=ge>>>2&3,Z[Q++]=ge>>>4&3,Z[Q++]=ge>>>6&3,Z[Q++]=ge>>>8&3,Z[Q++]=ge>>>10&3,Z[Q++]=ge>>>12&3,Z[Q++]=ge>>>14&3,Z[Q++]=ge>>>16&3,Z[Q++]=ge>>>18&3,Z[Q++]=ge>>>20&3,Z[Q++]=ge>>>22&3,Z[Q++]=ge>>>24&3,Z[Q++]=ge>>>26&3,Z[Q++]=ge>>>28&3,Z[Q++]=ge>>>30&3}})(M,h,b,D);break;case 3:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0;Z[Q++]=ke>>>0&7,Z[Q++]=ke>>>3&7,Z[Q++]=ke>>>6&7,Z[Q++]=ke>>>9&7,Z[Q++]=ke>>>12&7,Z[Q++]=ke>>>15&7,Z[Q++]=ke>>>18&7,Z[Q++]=ke>>>21&7,Z[Q++]=ke>>>24&7,Z[Q++]=ke>>>27&7,Z[Q++]=7&(ke>>>30|(1&ge)<<2),Z[Q++]=ge>>>1&7,Z[Q++]=ge>>>4&7,Z[Q++]=ge>>>7&7,Z[Q++]=ge>>>10&7,Z[Q++]=ge>>>13&7,Z[Q++]=ge>>>16&7,Z[Q++]=ge>>>19&7,Z[Q++]=ge>>>22&7,Z[Q++]=ge>>>25&7,Z[Q++]=ge>>>28&7,Z[Q++]=7&(ge>>>31|(3&Ue)<<1),Z[Q++]=Ue>>>2&7,Z[Q++]=Ue>>>5&7,Z[Q++]=Ue>>>8&7,Z[Q++]=Ue>>>11&7,Z[Q++]=Ue>>>14&7,Z[Q++]=Ue>>>17&7,Z[Q++]=Ue>>>20&7,Z[Q++]=Ue>>>23&7,Z[Q++]=Ue>>>26&7,Z[Q++]=Ue>>>29&7}})(M,h,b,D);break;case 4:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0;Z[Q++]=ke>>>0&15,Z[Q++]=ke>>>4&15,Z[Q++]=ke>>>8&15,Z[Q++]=ke>>>12&15,Z[Q++]=ke>>>16&15,Z[Q++]=ke>>>20&15,Z[Q++]=ke>>>24&15,Z[Q++]=ke>>>28&15,Z[Q++]=ge>>>0&15,Z[Q++]=ge>>>4&15,Z[Q++]=ge>>>8&15,Z[Q++]=ge>>>12&15,Z[Q++]=ge>>>16&15,Z[Q++]=ge>>>20&15,Z[Q++]=ge>>>24&15,Z[Q++]=ge>>>28&15,Z[Q++]=Ue>>>0&15,Z[Q++]=Ue>>>4&15,Z[Q++]=Ue>>>8&15,Z[Q++]=Ue>>>12&15,Z[Q++]=Ue>>>16&15,Z[Q++]=Ue>>>20&15,Z[Q++]=Ue>>>24&15,Z[Q++]=Ue>>>28&15,Z[Q++]=je>>>0&15,Z[Q++]=je>>>4&15,Z[Q++]=je>>>8&15,Z[Q++]=je>>>12&15,Z[Q++]=je>>>16&15,Z[Q++]=je>>>20&15,Z[Q++]=je>>>24&15,Z[Q++]=je>>>28&15}})(M,h,b,D);break;case 5:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0,dt=G[he++]>>>0;Z[Q++]=ke>>>0&31,Z[Q++]=ke>>>5&31,Z[Q++]=ke>>>10&31,Z[Q++]=ke>>>15&31,Z[Q++]=ke>>>20&31,Z[Q++]=ke>>>25&31,Z[Q++]=31&(ke>>>30|(7&ge)<<2),Z[Q++]=ge>>>3&31,Z[Q++]=ge>>>8&31,Z[Q++]=ge>>>13&31,Z[Q++]=ge>>>18&31,Z[Q++]=ge>>>23&31,Z[Q++]=31&(ge>>>28|(1&Ue)<<4),Z[Q++]=Ue>>>1&31,Z[Q++]=Ue>>>6&31,Z[Q++]=Ue>>>11&31,Z[Q++]=Ue>>>16&31,Z[Q++]=Ue>>>21&31,Z[Q++]=Ue>>>26&31,Z[Q++]=31&(Ue>>>31|(15&je)<<1),Z[Q++]=je>>>4&31,Z[Q++]=je>>>9&31,Z[Q++]=je>>>14&31,Z[Q++]=je>>>19&31,Z[Q++]=je>>>24&31,Z[Q++]=31&(je>>>29|(3&dt)<<3),Z[Q++]=dt>>>2&31,Z[Q++]=dt>>>7&31,Z[Q++]=dt>>>12&31,Z[Q++]=dt>>>17&31,Z[Q++]=dt>>>22&31,Z[Q++]=dt>>>27&31}})(M,h,b,D);break;case 6:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0,dt=G[he++]>>>0,gt=G[he++]>>>0;Z[Q++]=ke>>>0&63,Z[Q++]=ke>>>6&63,Z[Q++]=ke>>>12&63,Z[Q++]=ke>>>18&63,Z[Q++]=ke>>>24&63,Z[Q++]=63&(ke>>>30|(15&ge)<<2),Z[Q++]=ge>>>4&63,Z[Q++]=ge>>>10&63,Z[Q++]=ge>>>16&63,Z[Q++]=ge>>>22&63,Z[Q++]=63&(ge>>>28|(3&Ue)<<4),Z[Q++]=Ue>>>2&63,Z[Q++]=Ue>>>8&63,Z[Q++]=Ue>>>14&63,Z[Q++]=Ue>>>20&63,Z[Q++]=Ue>>>26&63,Z[Q++]=je>>>0&63,Z[Q++]=je>>>6&63,Z[Q++]=je>>>12&63,Z[Q++]=je>>>18&63,Z[Q++]=je>>>24&63,Z[Q++]=63&(je>>>30|(15&dt)<<2),Z[Q++]=dt>>>4&63,Z[Q++]=dt>>>10&63,Z[Q++]=dt>>>16&63,Z[Q++]=dt>>>22&63,Z[Q++]=63&(dt>>>28|(3>)<<4),Z[Q++]=gt>>>2&63,Z[Q++]=gt>>>8&63,Z[Q++]=gt>>>14&63,Z[Q++]=gt>>>20&63,Z[Q++]=gt>>>26&63}})(M,h,b,D);break;case 7:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0,dt=G[he++]>>>0,gt=G[he++]>>>0,It=G[he++]>>>0;Z[Q++]=ke>>>0&127,Z[Q++]=ke>>>7&127,Z[Q++]=ke>>>14&127,Z[Q++]=ke>>>21&127,Z[Q++]=127&(ke>>>28|(7&ge)<<4),Z[Q++]=ge>>>3&127,Z[Q++]=ge>>>10&127,Z[Q++]=ge>>>17&127,Z[Q++]=ge>>>24&127,Z[Q++]=127&(ge>>>31|(63&Ue)<<1),Z[Q++]=Ue>>>6&127,Z[Q++]=Ue>>>13&127,Z[Q++]=Ue>>>20&127,Z[Q++]=127&(Ue>>>27|(3&je)<<5),Z[Q++]=je>>>2&127,Z[Q++]=je>>>9&127,Z[Q++]=je>>>16&127,Z[Q++]=je>>>23&127,Z[Q++]=127&(je>>>30|(31&dt)<<2),Z[Q++]=dt>>>5&127,Z[Q++]=dt>>>12&127,Z[Q++]=dt>>>19&127,Z[Q++]=127&(dt>>>26|(1>)<<6),Z[Q++]=gt>>>1&127,Z[Q++]=gt>>>8&127,Z[Q++]=gt>>>15&127,Z[Q++]=gt>>>22&127,Z[Q++]=127&(gt>>>29|(15&It)<<3),Z[Q++]=It>>>4&127,Z[Q++]=It>>>11&127,Z[Q++]=It>>>18&127,Z[Q++]=It>>>25&127}})(M,h,b,D);break;case 8:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0,dt=G[he++]>>>0,gt=G[he++]>>>0,It=G[he++]>>>0,_t=G[he++]>>>0;Z[Q++]=ke>>>0&255,Z[Q++]=ke>>>8&255,Z[Q++]=ke>>>16&255,Z[Q++]=ke>>>24&255,Z[Q++]=ge>>>0&255,Z[Q++]=ge>>>8&255,Z[Q++]=ge>>>16&255,Z[Q++]=ge>>>24&255,Z[Q++]=Ue>>>0&255,Z[Q++]=Ue>>>8&255,Z[Q++]=Ue>>>16&255,Z[Q++]=Ue>>>24&255,Z[Q++]=je>>>0&255,Z[Q++]=je>>>8&255,Z[Q++]=je>>>16&255,Z[Q++]=je>>>24&255,Z[Q++]=dt>>>0&255,Z[Q++]=dt>>>8&255,Z[Q++]=dt>>>16&255,Z[Q++]=dt>>>24&255,Z[Q++]=gt>>>0&255,Z[Q++]=gt>>>8&255,Z[Q++]=gt>>>16&255,Z[Q++]=gt>>>24&255,Z[Q++]=It>>>0&255,Z[Q++]=It>>>8&255,Z[Q++]=It>>>16&255,Z[Q++]=It>>>24&255,Z[Q++]=_t>>>0&255,Z[Q++]=_t>>>8&255,Z[Q++]=_t>>>16&255,Z[Q++]=_t>>>24&255}})(M,h,b,D);break;case 16:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<128;oe++){let ke=G[he++]>>>0;Z[Q++]=65535&ke,Z[Q++]=ke>>>16&65535}})(M,h,b,D);break;default:(function(G,X,Z,re,Q){let he=AI[Q]>>>0,oe=X,ke=0,ge=G[oe]>>>0,Ue=re;for(let je=0;je<8;je++){for(let dt=0;dt<32;dt++)if(ke+Q<=32)Z[Ue+dt]=ge>>>ke&he,ke+=Q,ke===32&&(ke=0,oe++,dt!==31&&(ge=G[oe]>>>0));else{let gt=32-ke,It=ge>>>ke;oe++,ge=G[oe]>>>0;let _t=Q-gt;Z[Ue+dt]=(It|(ge&-1>>>32-_t>>>0)<>>0)}})(M,h,b,D,z)}return h+(z<<3)|0}function Eit(M,h,b,D){if(b+2>h)throw new Error(`FastPFOR decode: byteContainer underflow at block=${D} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${b}, byteSize=${h})`);let z=M[b++],G=M[b++];if(z>32)throw new Error(`FastPFOR decode: invalid bitWidth=${z} at block=${D} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:z,exceptionCount:G,bytePosIn:b}}function kit(M,h,b,D,z,G,X,Z,re){let{maxBits:Q,exceptionBitWidth:he,bytePosIn:oe}=(function(dt,gt,It,_t,qt,tr){if(It+1>gt)throw new Error(`FastPFOR decode: exception header underflow at block=${tr} (need 1 byte for maxBits, bytePos=${It}, byteSize=${gt})`);let lr=dt[It++];if(lr<_t||lr>32)throw new Error(`FastPFOR decode: invalid maxBits=${lr} at block=${tr} (bitWidth=${_t}, expected ${_t}..32)`);let qr=lr-_t|0;if(qr<1||qr>32)throw new Error(`FastPFOR decode: invalid exceptionBitWidth=${qr} at block=${tr} (bitWidth=${_t}, maxBits=${lr})`);if(It+qt>gt)throw new Error(`FastPFOR decode: exception positions underflow at block=${tr} (need=${qt}, have=${gt-It})`);return{maxBits:lr,exceptionBitWidth:qr,bytePosIn:It}})(z,G,X,b,D,re);if(X=oe,he===1){let dt=1<je)throw new Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${he} (ptr=${Ue}, need ${D}, size=${je}) at block ${re}`);for(let dt=0;dtM.length-1)throw new Error(`FastPFOR decode: invalid whereMeta=${Z} at pageStart=${X} (expected > 0 and pageStart+whereMeta < encoded.length=${M.length})`);let re=X+1|0,Q=X+Z|0,he=M[Q]>>>0,oe=he+3>>>2,ke=Q+1,ge=ke+oe;if(ge>=M.length)throw new Error(`FastPFOR decode: invalid byteSize=${he} (metaInts=${oe}, pageStart=${X}, packedEnd=${Q}, byteContainerStart=${ke}) causes bitmapPos=${ge} out of bounds (encoded.length=${M.length})`);let Ue=(function(gt,It,_t,qt){qt.byteContainer.length<_t&&(qt.byteContainer=new Uint8Array(2*_t),qt.byteContainerI32=void 0);let tr=qt.byteContainer,lr=_t>>>2;if(3&tr.byteOffset)for(let jr=0;jr>>8&255,tr[fn+2|0]=_n>>>16&255,tr[fn+3|0]=_n>>>24&255}else{let jr=qt.byteContainerI32;(!jr||jr.buffer!==tr.buffer||jr.byteOffset!==tr.byteOffset||jr.length>>2)),jr.set(gt.subarray(It,It+lr))}let qr=3&_t;if(qr>0){let jr=0|gt[It+lr|0],_n=lr<<2;for(let fn=0;fn>>(fn<<3)&255}return tr})(M,ke,he,G),je=he,dt=(function(gt,It,_t){let qt=0|gt[It++],tr=_t.dataToBePacked;for(let lr=2;lr<=32;lr=lr+1|0){if(!(qt>>>lr-1&1))continue;if(It>=gt.length)throw new Error(`FastPFOR decode: truncated exception stream header (bitWidth=${lr}, streamWordIndex=${It}, needWords=1, availableWords=${gt.length-It}, encodedWords=${gt.length})`);let qr=gt[It++]>>>0,jr=MI(qr+31,32),_n=qr*lr+31>>>5;if(It+_n>gt.length)throw new Error(`FastPFOR decode: truncated exception stream (bitWidth=${lr}, size=${qr}, streamWordIndex=${It}, needWords=${_n}, availableWords=${gt.length-It}, encodedWords=${gt.length})`);let fn=tr[lr];(!fn||fn.length>>5)|0,_t.exceptionSizes[lr]=qr}return It})(M,ge,G);return G.dataPointers.fill(0),(function(gt,It,_t,qt,tr,lr,qr,jr,_n,fn){let Dn=0|_t,Hn=0;for(let Ln=0;Ln0&&(Hn=kit(tr,ti,ei,ci,jr,_n,Hn,fn,Ln))}if(Dn!==qt)throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${It}, packedStart=${_t}, consumedPackedEnd=${Dn}, expectedPackedEnd=${qt}, packedWords=${qt-_t}, encoded.length=${gt.length})`)})(M,X,re,Q,h,0|D,z/U1|0,Ue,je,G),dt}function Lit(M,h,b,D,z){switch(z){case 2:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0;oe[ge++]=Ue>>>0&3,oe[ge++]=Ue>>>2&3,oe[ge++]=Ue>>>4&3,oe[ge++]=Ue>>>6&3,oe[ge++]=Ue>>>8&3,oe[ge++]=Ue>>>10&3,oe[ge++]=Ue>>>12&3,oe[ge++]=Ue>>>14&3,oe[ge++]=Ue>>>16&3,oe[ge++]=Ue>>>18&3,oe[ge++]=Ue>>>20&3,oe[ge++]=Ue>>>22&3,oe[ge++]=Ue>>>24&3,oe[ge++]=Ue>>>26&3,oe[ge++]=Ue>>>28&3,oe[ge++]=Ue>>>30&3,oe[ge++]=je>>>0&3,oe[ge++]=je>>>2&3,oe[ge++]=je>>>4&3,oe[ge++]=je>>>6&3,oe[ge++]=je>>>8&3,oe[ge++]=je>>>10&3,oe[ge++]=je>>>12&3,oe[ge++]=je>>>14&3,oe[ge++]=je>>>16&3,oe[ge++]=je>>>18&3,oe[ge++]=je>>>20&3,oe[ge++]=je>>>22&3,oe[ge++]=je>>>24&3,oe[ge++]=je>>>26&3,oe[ge++]=je>>>28&3,oe[ge]=je>>>30&3})(M,h,b,D);case 3:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,dt=Q[he+2]>>>0;oe[ge++]=Ue>>>0&7,oe[ge++]=Ue>>>3&7,oe[ge++]=Ue>>>6&7,oe[ge++]=Ue>>>9&7,oe[ge++]=Ue>>>12&7,oe[ge++]=Ue>>>15&7,oe[ge++]=Ue>>>18&7,oe[ge++]=Ue>>>21&7,oe[ge++]=Ue>>>24&7,oe[ge++]=Ue>>>27&7,oe[ge++]=7&(Ue>>>30|(1&je)<<2),oe[ge++]=je>>>1&7,oe[ge++]=je>>>4&7,oe[ge++]=je>>>7&7,oe[ge++]=je>>>10&7,oe[ge++]=je>>>13&7,oe[ge++]=je>>>16&7,oe[ge++]=je>>>19&7,oe[ge++]=je>>>22&7,oe[ge++]=je>>>25&7,oe[ge++]=je>>>28&7,oe[ge++]=7&(je>>>31|(3&dt)<<1),oe[ge++]=dt>>>2&7,oe[ge++]=dt>>>5&7,oe[ge++]=dt>>>8&7,oe[ge++]=dt>>>11&7,oe[ge++]=dt>>>14&7,oe[ge++]=dt>>>17&7,oe[ge++]=dt>>>20&7,oe[ge++]=dt>>>23&7,oe[ge++]=dt>>>26&7,oe[ge]=dt>>>29&7})(M,h,b,D);case 4:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,dt=Q[he+2]>>>0,gt=Q[he+3]>>>0;oe[ge++]=Ue>>>0&15,oe[ge++]=Ue>>>4&15,oe[ge++]=Ue>>>8&15,oe[ge++]=Ue>>>12&15,oe[ge++]=Ue>>>16&15,oe[ge++]=Ue>>>20&15,oe[ge++]=Ue>>>24&15,oe[ge++]=Ue>>>28&15,oe[ge++]=je>>>0&15,oe[ge++]=je>>>4&15,oe[ge++]=je>>>8&15,oe[ge++]=je>>>12&15,oe[ge++]=je>>>16&15,oe[ge++]=je>>>20&15,oe[ge++]=je>>>24&15,oe[ge++]=je>>>28&15,oe[ge++]=dt>>>0&15,oe[ge++]=dt>>>4&15,oe[ge++]=dt>>>8&15,oe[ge++]=dt>>>12&15,oe[ge++]=dt>>>16&15,oe[ge++]=dt>>>20&15,oe[ge++]=dt>>>24&15,oe[ge++]=dt>>>28&15,oe[ge++]=gt>>>0&15,oe[ge++]=gt>>>4&15,oe[ge++]=gt>>>8&15,oe[ge++]=gt>>>12&15,oe[ge++]=gt>>>16&15,oe[ge++]=gt>>>20&15,oe[ge++]=gt>>>24&15,oe[ge]=gt>>>28&15})(M,h,b,D);case 5:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,dt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0;oe[ge++]=Ue>>>0&31,oe[ge++]=Ue>>>5&31,oe[ge++]=Ue>>>10&31,oe[ge++]=Ue>>>15&31,oe[ge++]=Ue>>>20&31,oe[ge++]=Ue>>>25&31,oe[ge++]=31&(Ue>>>30|(7&je)<<2),oe[ge++]=je>>>3&31,oe[ge++]=je>>>8&31,oe[ge++]=je>>>13&31,oe[ge++]=je>>>18&31,oe[ge++]=je>>>23&31,oe[ge++]=31&(je>>>28|(1&dt)<<4),oe[ge++]=dt>>>1&31,oe[ge++]=dt>>>6&31,oe[ge++]=dt>>>11&31,oe[ge++]=dt>>>16&31,oe[ge++]=dt>>>21&31,oe[ge++]=dt>>>26&31,oe[ge++]=31&(dt>>>31|(15>)<<1),oe[ge++]=gt>>>4&31,oe[ge++]=gt>>>9&31,oe[ge++]=gt>>>14&31,oe[ge++]=gt>>>19&31,oe[ge++]=gt>>>24&31,oe[ge++]=31&(gt>>>29|(3&It)<<3),oe[ge++]=It>>>2&31,oe[ge++]=It>>>7&31,oe[ge++]=It>>>12&31,oe[ge++]=It>>>17&31,oe[ge++]=It>>>22&31,oe[ge]=It>>>27&31})(M,h,b,D);case 6:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,dt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0;oe[ge++]=Ue>>>0&63,oe[ge++]=Ue>>>6&63,oe[ge++]=Ue>>>12&63,oe[ge++]=Ue>>>18&63,oe[ge++]=Ue>>>24&63,oe[ge++]=63&(Ue>>>30|(15&je)<<2),oe[ge++]=je>>>4&63,oe[ge++]=je>>>10&63,oe[ge++]=je>>>16&63,oe[ge++]=je>>>22&63,oe[ge++]=63&(je>>>28|(3&dt)<<4),oe[ge++]=dt>>>2&63,oe[ge++]=dt>>>8&63,oe[ge++]=dt>>>14&63,oe[ge++]=dt>>>20&63,oe[ge++]=dt>>>26&63,oe[ge++]=gt>>>0&63,oe[ge++]=gt>>>6&63,oe[ge++]=gt>>>12&63,oe[ge++]=gt>>>18&63,oe[ge++]=gt>>>24&63,oe[ge++]=63&(gt>>>30|(15&It)<<2),oe[ge++]=It>>>4&63,oe[ge++]=It>>>10&63,oe[ge++]=It>>>16&63,oe[ge++]=It>>>22&63,oe[ge++]=63&(It>>>28|(3&_t)<<4),oe[ge++]=_t>>>2&63,oe[ge++]=_t>>>8&63,oe[ge++]=_t>>>14&63,oe[ge++]=_t>>>20&63,oe[ge]=_t>>>26&63})(M,h,b,D);case 7:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,dt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0;oe[ge++]=Ue>>>0&127,oe[ge++]=Ue>>>7&127,oe[ge++]=Ue>>>14&127,oe[ge++]=Ue>>>21&127,oe[ge++]=127&(Ue>>>28|(7&je)<<4),oe[ge++]=je>>>3&127,oe[ge++]=je>>>10&127,oe[ge++]=je>>>17&127,oe[ge++]=je>>>24&127,oe[ge++]=127&(je>>>31|(63&dt)<<1),oe[ge++]=dt>>>6&127,oe[ge++]=dt>>>13&127,oe[ge++]=dt>>>20&127,oe[ge++]=127&(dt>>>27|(3>)<<5),oe[ge++]=gt>>>2&127,oe[ge++]=gt>>>9&127,oe[ge++]=gt>>>16&127,oe[ge++]=gt>>>23&127,oe[ge++]=127&(gt>>>30|(31&It)<<2),oe[ge++]=It>>>5&127,oe[ge++]=It>>>12&127,oe[ge++]=It>>>19&127,oe[ge++]=127&(It>>>26|(1&_t)<<6),oe[ge++]=_t>>>1&127,oe[ge++]=_t>>>8&127,oe[ge++]=_t>>>15&127,oe[ge++]=_t>>>22&127,oe[ge++]=127&(_t>>>29|(15&qt)<<3),oe[ge++]=qt>>>4&127,oe[ge++]=qt>>>11&127,oe[ge++]=qt>>>18&127,oe[ge]=qt>>>25&127})(M,h,b,D);case 8:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,dt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0;oe[ge++]=Ue>>>0&255,oe[ge++]=Ue>>>8&255,oe[ge++]=Ue>>>16&255,oe[ge++]=Ue>>>24&255,oe[ge++]=je>>>0&255,oe[ge++]=je>>>8&255,oe[ge++]=je>>>16&255,oe[ge++]=je>>>24&255,oe[ge++]=dt>>>0&255,oe[ge++]=dt>>>8&255,oe[ge++]=dt>>>16&255,oe[ge++]=dt>>>24&255,oe[ge++]=gt>>>0&255,oe[ge++]=gt>>>8&255,oe[ge++]=gt>>>16&255,oe[ge++]=gt>>>24&255,oe[ge++]=It>>>0&255,oe[ge++]=It>>>8&255,oe[ge++]=It>>>16&255,oe[ge++]=It>>>24&255,oe[ge++]=_t>>>0&255,oe[ge++]=_t>>>8&255,oe[ge++]=_t>>>16&255,oe[ge++]=_t>>>24&255,oe[ge++]=qt>>>0&255,oe[ge++]=qt>>>8&255,oe[ge++]=qt>>>16&255,oe[ge++]=qt>>>24&255,oe[ge++]=tr>>>0&255,oe[ge++]=tr>>>8&255,oe[ge++]=tr>>>16&255,oe[ge]=tr>>>24&255})(M,h,b,D);case 9:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,dt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0;oe[ge++]=Ue>>>0&511,oe[ge++]=Ue>>>9&511,oe[ge++]=Ue>>>18&511,oe[ge++]=511&(Ue>>>27|(15&je)<<5),oe[ge++]=je>>>4&511,oe[ge++]=je>>>13&511,oe[ge++]=je>>>22&511,oe[ge++]=511&(je>>>31|(255&dt)<<1),oe[ge++]=dt>>>8&511,oe[ge++]=dt>>>17&511,oe[ge++]=511&(dt>>>26|(7>)<<6),oe[ge++]=gt>>>3&511,oe[ge++]=gt>>>12&511,oe[ge++]=gt>>>21&511,oe[ge++]=511&(gt>>>30|(127&It)<<2),oe[ge++]=It>>>7&511,oe[ge++]=It>>>16&511,oe[ge++]=511&(It>>>25|(3&_t)<<7),oe[ge++]=_t>>>2&511,oe[ge++]=_t>>>11&511,oe[ge++]=_t>>>20&511,oe[ge++]=511&(_t>>>29|(63&qt)<<3),oe[ge++]=qt>>>6&511,oe[ge++]=qt>>>15&511,oe[ge++]=511&(qt>>>24|(1&tr)<<8),oe[ge++]=tr>>>1&511,oe[ge++]=tr>>>10&511,oe[ge++]=tr>>>19&511,oe[ge++]=511&(tr>>>28|(31&lr)<<4),oe[ge++]=lr>>>5&511,oe[ge++]=lr>>>14&511,oe[ge]=lr>>>23&511})(M,h,b,D);case 10:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,dt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0,qr=Q[he+9]>>>0;oe[ge++]=Ue>>>0&1023,oe[ge++]=Ue>>>10&1023,oe[ge++]=Ue>>>20&1023,oe[ge++]=1023&(Ue>>>30|(255&je)<<2),oe[ge++]=je>>>8&1023,oe[ge++]=je>>>18&1023,oe[ge++]=1023&(je>>>28|(63&dt)<<4),oe[ge++]=dt>>>6&1023,oe[ge++]=dt>>>16&1023,oe[ge++]=1023&(dt>>>26|(15>)<<6),oe[ge++]=gt>>>4&1023,oe[ge++]=gt>>>14&1023,oe[ge++]=1023&(gt>>>24|(3&It)<<8),oe[ge++]=It>>>2&1023,oe[ge++]=It>>>12&1023,oe[ge++]=It>>>22&1023,oe[ge++]=_t>>>0&1023,oe[ge++]=_t>>>10&1023,oe[ge++]=_t>>>20&1023,oe[ge++]=1023&(_t>>>30|(255&qt)<<2),oe[ge++]=qt>>>8&1023,oe[ge++]=qt>>>18&1023,oe[ge++]=1023&(qt>>>28|(63&tr)<<4),oe[ge++]=tr>>>6&1023,oe[ge++]=tr>>>16&1023,oe[ge++]=1023&(tr>>>26|(15&lr)<<6),oe[ge++]=lr>>>4&1023,oe[ge++]=lr>>>14&1023,oe[ge++]=1023&(lr>>>24|(3&qr)<<8),oe[ge++]=qr>>>2&1023,oe[ge++]=qr>>>12&1023,oe[ge]=qr>>>22&1023})(M,h,b,D);case 11:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,dt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0,qr=Q[he+9]>>>0,jr=Q[he+10]>>>0;oe[ge++]=Ue>>>0&2047,oe[ge++]=Ue>>>11&2047,oe[ge++]=2047&(Ue>>>22|(1&je)<<10),oe[ge++]=je>>>1&2047,oe[ge++]=je>>>12&2047,oe[ge++]=2047&(je>>>23|(3&dt)<<9),oe[ge++]=dt>>>2&2047,oe[ge++]=dt>>>13&2047,oe[ge++]=2047&(dt>>>24|(7>)<<8),oe[ge++]=gt>>>3&2047,oe[ge++]=gt>>>14&2047,oe[ge++]=2047&(gt>>>25|(15&It)<<7),oe[ge++]=It>>>4&2047,oe[ge++]=It>>>15&2047,oe[ge++]=2047&(It>>>26|(31&_t)<<6),oe[ge++]=_t>>>5&2047,oe[ge++]=_t>>>16&2047,oe[ge++]=2047&(_t>>>27|(63&qt)<<5),oe[ge++]=qt>>>6&2047,oe[ge++]=qt>>>17&2047,oe[ge++]=2047&(qt>>>28|(127&tr)<<4),oe[ge++]=tr>>>7&2047,oe[ge++]=tr>>>18&2047,oe[ge++]=2047&(tr>>>29|(255&lr)<<3),oe[ge++]=lr>>>8&2047,oe[ge++]=lr>>>19&2047,oe[ge++]=2047&(lr>>>30|(511&qr)<<2),oe[ge++]=qr>>>9&2047,oe[ge++]=qr>>>20&2047,oe[ge++]=2047&(qr>>>31|(1023&jr)<<1),oe[ge++]=jr>>>10&2047,oe[ge]=jr>>>21&2047})(M,h,b,D);case 12:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,dt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0,qr=Q[he+9]>>>0,jr=Q[he+10]>>>0,_n=Q[he+11]>>>0;oe[ge++]=Ue>>>0&4095,oe[ge++]=Ue>>>12&4095,oe[ge++]=4095&(Ue>>>24|(15&je)<<8),oe[ge++]=je>>>4&4095,oe[ge++]=je>>>16&4095,oe[ge++]=4095&(je>>>28|(255&dt)<<4),oe[ge++]=dt>>>8&4095,oe[ge++]=dt>>>20&4095,oe[ge++]=gt>>>0&4095,oe[ge++]=gt>>>12&4095,oe[ge++]=4095&(gt>>>24|(15&It)<<8),oe[ge++]=It>>>4&4095,oe[ge++]=It>>>16&4095,oe[ge++]=4095&(It>>>28|(255&_t)<<4),oe[ge++]=_t>>>8&4095,oe[ge++]=_t>>>20&4095,oe[ge++]=qt>>>0&4095,oe[ge++]=qt>>>12&4095,oe[ge++]=4095&(qt>>>24|(15&tr)<<8),oe[ge++]=tr>>>4&4095,oe[ge++]=tr>>>16&4095,oe[ge++]=4095&(tr>>>28|(255&lr)<<4),oe[ge++]=lr>>>8&4095,oe[ge++]=lr>>>20&4095,oe[ge++]=qr>>>0&4095,oe[ge++]=qr>>>12&4095,oe[ge++]=4095&(qr>>>24|(15&jr)<<8),oe[ge++]=jr>>>4&4095,oe[ge++]=jr>>>16&4095,oe[ge++]=4095&(jr>>>28|(255&_n)<<4),oe[ge++]=_n>>>8&4095,oe[ge]=_n>>>20&4095})(M,h,b,D);case 16:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,dt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0,qr=Q[he+9]>>>0,jr=Q[he+10]>>>0,_n=Q[he+11]>>>0,fn=Q[he+12]>>>0,Dn=Q[he+13]>>>0,Hn=Q[he+14]>>>0,Ln=Q[he+15]>>>0;oe[ge++]=Ue>>>0&65535,oe[ge++]=Ue>>>16&65535,oe[ge++]=je>>>0&65535,oe[ge++]=je>>>16&65535,oe[ge++]=dt>>>0&65535,oe[ge++]=dt>>>16&65535,oe[ge++]=gt>>>0&65535,oe[ge++]=gt>>>16&65535,oe[ge++]=It>>>0&65535,oe[ge++]=It>>>16&65535,oe[ge++]=_t>>>0&65535,oe[ge++]=_t>>>16&65535,oe[ge++]=qt>>>0&65535,oe[ge++]=qt>>>16&65535,oe[ge++]=tr>>>0&65535,oe[ge++]=tr>>>16&65535,oe[ge++]=lr>>>0&65535,oe[ge++]=lr>>>16&65535,oe[ge++]=qr>>>0&65535,oe[ge++]=qr>>>16&65535,oe[ge++]=jr>>>0&65535,oe[ge++]=jr>>>16&65535,oe[ge++]=_n>>>0&65535,oe[ge++]=_n>>>16&65535,oe[ge++]=fn>>>0&65535,oe[ge++]=fn>>>16&65535,oe[ge++]=Dn>>>0&65535,oe[ge++]=Dn>>>16&65535,oe[ge++]=Hn>>>0&65535,oe[ge++]=Hn>>>16&65535,oe[ge++]=Ln>>>0&65535,oe[ge]=Ln>>>16&65535})(M,h,b,D);case 32:for(let Q=0;Q<32;Q=Q+1|0)b[D+Q|0]=0|M[h+Q|0];return}let G=AI[z]>>>0,X=h,Z=0,re=M[X]>>>0;for(let Q=0;Q<32;Q++)if(Z+z<=32)b[D+Q]=re>>>Z&G,Z+=z,Z===32&&(Z=0,X++,Q!==31&&(re=M[X]>>>0));else{let he=32-Z,oe=re>>>Z;X++,re=M[X]>>>0,b[D+Q]=(oe|(re&AI[z-he]>>>0)<=64)throw new Error("Varint too long")}return h.set(z),b}function Fit(M,h){let b,D;return D=M[h.get()],h.increment(),b=127&D,D<128?b:(D=M[h.get()],h.increment(),b|=(127&D)<<7,D<128?b:(D=M[h.get()],h.increment(),b|=(127&D)<<14,D<128?b:(D=M[h.get()],h.increment(),b|=(127&D)<<21,D<128?b:(D=M[h.get()],b|=(15&D)<<28,(function(z,G,X){let Z,re;if(re=G[X.get()],X.increment(),Z=(112&re)>>4,re<128||(re=G[X.get()],X.increment(),Z|=(127&re)<<3,re<128)||(re=G[X.get()],X.increment(),Z|=(127&re)<<10,re<128)||(re=G[X.get()],X.increment(),Z|=(127&re)<<17,re<128)||(re=G[X.get()],X.increment(),Z|=(127&re)<<24,re<128)||(re=G[X.get()],X.increment(),Z|=(1&re)<<31,re<128))return 4294967296*Z+(z>>>0);throw new Error("Expected varint not more than 10 bytes")})(b,M,h)))))}function Fs(M){return M>>>1^-(1&M)}function Zh(M){return M>>BigInt(1)^-(BigInt(1)&M)}function J_(M){return M%2==1?(M+1)/-2:M/2}function EI(M,h,b){if(b===void 0){b=0;for(let G=0;G=4)for(;D=4)for(;D=4)for(let D=M[0];b>4],Z=null;switch(X){case Of.DATA:Z={dictionaryType:Object.values(Hv)[15&G]};break;case Of.OFFSET:Z={offsetType:Object.values(a2)[15&G]};break;case Of.LENGTH:Z={lengthType:Object.values(Xd)[15&G]}}z.increment();let re=D[z.get()],Q=Object.values(Ao)[re>>5],he=Object.values(Ao)[re>>2&7],oe=Object.values(Zg)[3&re];z.increment();let ke=xh(D,z,2),ge=ke[0];return{physicalStreamType:X,logicalStreamType:Z,logicalLevelTechnique1:Q,logicalLevelTechnique2:he,physicalLevelTechnique:oe,numValues:ge,byteLength:ke[1],decompressedCount:ge}})(M,h);return b.logicalLevelTechnique1===Ao.MORTON?(function(D,z,G){let X=xh(z,G,2);return{physicalStreamType:D.physicalStreamType,logicalStreamType:D.logicalStreamType,logicalLevelTechnique1:D.logicalLevelTechnique1,logicalLevelTechnique2:D.logicalLevelTechnique2,physicalLevelTechnique:D.physicalLevelTechnique,numValues:D.numValues,byteLength:D.byteLength,decompressedCount:D.decompressedCount,numBits:X[0],coordinateShift:X[1]}})(b,M,h):Ao.RLE!==b.logicalLevelTechnique1&&Ao.RLE!==b.logicalLevelTechnique2||Zg.NONE===b.physicalLevelTechnique?b:(function(D,z,G){let X=xh(z,G,2);return{physicalStreamType:D.physicalStreamType,logicalStreamType:D.logicalStreamType,logicalLevelTechnique1:D.logicalLevelTechnique1,logicalLevelTechnique2:D.logicalLevelTechnique2,physicalLevelTechnique:D.physicalLevelTechnique,numValues:D.numValues,byteLength:D.byteLength,decompressedCount:X[1],runs:X[0],numRleValues:X[1]}})(b,M,h)}(function(M){M.PRESENT="PRESENT",M.DATA="DATA",M.OFFSET="OFFSET",M.LENGTH="LENGTH"})(Of||(Of={})),(function(M){M.NONE="NONE",M.SINGLE="SINGLE",M.SHARED="SHARED",M.VERTEX="VERTEX",M.MORTON="MORTON",M.FSST="FSST"})(Hv||(Hv={})),(function(M){M.VERTEX="VERTEX",M.INDEX="INDEX",M.STRING="STRING",M.KEY="KEY"})(a2||(a2={})),(function(M){M.VAR_BINARY="VAR_BINARY",M.GEOMETRIES="GEOMETRIES",M.PARTS="PARTS",M.RINGS="RINGS",M.TRIANGLES="TRIANGLES",M.SYMBOL="SYMBOL",M.DICTIONARY="DICTIONARY"})(Xd||(Xd={})),(function(M){M[M.FLAT=0]="FLAT",M[M.CONST=1]="CONST",M[M.SEQUENCE=2]="SEQUENCE",M[M.DICTIONARY=3]="DICTIONARY",M[M.FSST_DICTIONARY=4]="FSST_DICTIONARY"})(Ml||(Ml={}));class jv{constructor(h,b){this.values=h,this._size=b}get(h){let b=Math.floor(h/8);return(this.values[b]>>h%8&1)==1}set(h,b){let D=Math.floor(h/8);this.values[D]=this.values[D]|(b?1:0)<>h%8&1}size(){return this._size}getBuffer(){return this.values}}function Q_(M,h,b){if(!h)return M;let D=h.size(),z=new M.constructor(D),G=0;for(let X=0;X=4)for(;ge>>0;for(let ke=1;ke>>0;return oe})(X.logicalLevelTechnique2===Ao.RLE?EI(G,X.runs,X.numRleValues):G);break;case Ao.RLE:Q=EI(G,X.runs,X.numRleValues);break;case Ao.MORTON:CI(G),Q=G;break;case Ao.COMPONENTWISE_DELTA:Q=(function(he){if(he.length<2)return new Uint32Array(he);let oe=new Uint32Array(he.length);oe[0]=Fs(he[0])>>>0,oe[1]=Fs(he[1])>>>0;for(let ke=2;ke>>0,oe[ke+1]=oe[ke-1]+Fs(he[ke+1])>>>0;return oe})(G);break;case Ao.NONE:Q=G;break;default:throw new Error(`The specified Logical level technique is not supported: ${X.logicalLevelTechnique1}`)}return re?Q_(Q,re,0):Q})(eb(M,h,b),b,0,z)}function Kg(M,h,b){return(function(D,z){if(z.logicalLevelTechnique1===Ao.DELTA&&z.logicalLevelTechnique2===Ao.NONE)return(function(G){let X=new Int32Array(G.length+1);X[0]=0,X[1]=Fs(G[0]);let Z=X[1];for(let re=2;re!==X.length;++re)Z+=Fs(G[re-1]),X[re]=X[re-1]+Z;return new Uint32Array(X)})(D);if(z.logicalLevelTechnique1===Ao.RLE&&z.logicalLevelTechnique2===Ao.NONE)return(function(G,X,Z){let re=new Uint32Array(Z+1);re[0]=0;let Q=1,he=re[0];for(let oe=0;oe>>2,je=(function(gt,It){if(It<=gt.encodedWords.length)return gt.encodedWords;let _t=new Uint32Array(Math.max(16,2*It));return gt.encodedWords=_t,_t})(ke,Ue);(function(gt,It,_t,qt){if(It<0||_t<0||It+_t>gt.length)throw new RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${It}, byteLength=${_t}, bytes.length=${gt.length})`);let tr=Math.floor(_t/4),lr=_t%4!=0,qr=lr?tr+1:tr;if(qt.length0){let jr=gt.byteOffset+It;if(3&jr)for(let _n=0;_n0){let jr=0|gt[qt];if(qt=qt+1|0,255&jr)throw new Error(`FastPFOR decode: invalid alignedLength=${jr} (expected multiple of 256)`);if(tr+jr>lr.length)throw new Error(`FastPFOR decode: output buffer too small (outPos=${tr}, alignedLength=${jr}, out.length=${lr.length})`);qt=(function(_n,fn,Dn,Hn,Ln,un){let ei=Hn+MI(Ln,U1),ci=Hn,ti=Dn;for(;ci!==ei;){let di=Math.min(SI,ei-ci);ti=Cit(_n,fn,ti,ci,di,un),ci=ci+di|0}return ti})(gt,lr,qt,tr,jr,qr),tr=tr+jr|0}return(function(jr,_n,fn,Dn,Hn,Ln){if(Ln===0)return _n;let un=0,ei=_n,ci=_n+fn,ti=Hn,di=Hn,_a=Hn+Ln,Mo=0,us=0;for(;ei>>un&255;if(un+=8,ei+=un>>>5,un&=31,Mo|=(127&ks)<28)throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${us}, partial=${Mo}, decoded=${di-ti}/${Ln}, inPos=${ei}, inEnd=${ci})`)}if(di!==_a)throw new Error(`FastPFOR VByte: truncated stream (decoded=${di-ti}, expected=${Ln}, consumedWords=${ei-_n}/${fn}, vbyteStart=${_n}, vbyteEnd=${ci})`)})(gt,qt,gt.length-qt|0,lr,tr,It-tr|0),lr})(je.subarray(0,Ue),Q,ke.decoderWorkspace);return oe.add(he),dt})(z,G,X,Z,(function(re=16){if(re<0)throw new RangeError(`initialEncodedWordCapacity must be >= 0, got ${re}`);let Q=Math.max(16,0|re);return{encodedWords:new Uint32Array(Q),decoderWorkspace:kee()}})(X>>>2))})(M,b.numValues,b.byteLength,h);case Zg.VARINT:return xh(M,h,b.numValues);case Zg.NONE:{let z=h.get();h.add(b.byteLength);let G=M.subarray(z,h.get());return new Uint32Array(G)}default:throw new Error(`Specified physicalLevelTechnique ${D} is not supported (yet).`)}}function PI(M,h,b){let D=eb(M,h,b);return D.length===1?D[0]:(function(z){return z[1]})(D)}function Dee(M,h,b){return(function(D){if(D.length===2){let z=Fs(D[1]);return[z,z]}return[Fs(D[2]),Fs(D[3])]})(eb(M,h,b))}function Ree(M,h,b){return(function(D){if(D.length===2){let z=Zh(D[1]);return[z,z]}return[Zh(D[2]),Zh(D[3])]})(K_(M,h,b.numValues))}function Iee(M,h,b,D){return(function(z,G,X){let Z;switch(G.logicalLevelTechnique1){case Ao.DELTA:Z=(function(re){let Q=new BigUint64Array(re.length);Q[0]=BigInt.asUintN(64,Zh(re[0]));for(let he=1;he>1,h)-b}}function Oee(M,h){let b=0;for(let D=0;D>D;return b}function tb(M,h,b,D,z,G,X){return M===$g.MORTON?(function(Z,re,Q,he,oe,ke){let ge=new Array(oe?he+1:he);for(let Ue=0;Ue[tr])),D+=_t,z+=_t}break;case Ic.LINESTRING:{let _t,qt;dt?(_t=ge[z]-ge[z-1],z++):_t=ke[D]-ke[D-1],D++,je?(qt=rb(gt,Z,_t,!1),Z+=2*_t):(qt=tb(h.vertexBufferType,gt,Ue,re,_t,!1,Q),re+=_t),b[X++]=[qt],oe&&G++}break;case Ic.POLYGON:{let _t=ke[D]-ke[D-1];D++;let qt=new Array(_t-1),tr,lr=ge[z]-ge[z-1];if(z++,je){tr=rb(gt,Z,lr,!0),Z+=2*lr;for(let qr=0;qr0&&je.push(je[0]),ke.push(je)}h[he]=ke,G&&Q++}break;case Ic.MULTIPOLYGON:{let oe=G[Q]-G[Q-1];Q++;let ke=[];for(let ge=0;ge0&>.push(gt[0]),ke.push(gt)}}h[he]=ke}}return h}[Symbol.iterator](){return null}}function Hee(M,h,b,D,z,G){return new Dit(M,h,b,D,z,G)}class Dit extends Gee{constructor(h,b,D,z,G,X){super(D,z,G,X),this._numGeometries=h,this._geometryType=b}geometryType(h){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}function jee(M,h,b,D,z){return new Rit(M,h,b,D,z)}class Rit extends Gee{constructor(h,b,D,z,G){super(b,D,z,G),this._geometryTypes=h}geometryType(h){return this._geometryTypes[h]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function Iit(M,h,b,D,z){let G=$h(M,b),X,Z,re,Q;if(VS(G,D,M,b)===Ml.CONST){let It=PI(M,b,G),_t,qt,tr,lr;for(let qr=0;qrb?h[G++]:1);return D}function Wee(M,h,b,D){let z=new Uint32Array(h[h.length-1]+1),G=0;z[0]=G;let X=1,Z=0;for(let re=0;re=ke);){let ge=X[Q.increment()];if(ge<=127){let Ue=ge+3,je=X[Q.increment()],dt=Math.min(oe+Ue,Z);he.fill(je,oe,dt),oe=dt}else{let Ue=256-ge;for(let je=0;je=12?Bit.decode(M.subarray(h,b)):(function(D,z,G){let X="",Z=z;for(;Z239?4:re>223?3:re>191?2:1;if(Z+ge>G)break;ge===1?re<128&&(ke=re):ge===2?(Q=D[Z+1],(192&Q)==128&&(ke=(31&re)<<6|63&Q,ke<=127&&(ke=null))):ge===3?(Q=D[Z+1],he=D[Z+2],(192&Q)==128&&(192&he)==128&&(ke=(15&re)<<12|(63&Q)<<6|63&he,(ke<=2047||ke>=55296&&ke<=57343)&&(ke=null))):ge===4&&(Q=D[Z+1],he=D[Z+2],oe=D[Z+3],(192&Q)==128&&(192&he)==128&&(192&oe)==128&&(ke=(15&re)<<18|(63&Q)<<12|(63&he)<<6|63&oe,(ke<=65535||ke>=1114112)&&(ke=null))),ke===null?(ke=65533,ge=1):ke>65535&&(ke-=65536,X+=String.fromCharCode(ke>>>10&1023|55296),ke=56320|1023&ke),X+=String.fromCharCode(ke),Z+=ge}return X})(M,h,b)}class II extends $_{constructor(h,b,D,z){super(h,D,z),this.offsetBuffer=b}}class Xee extends II{constructor(h,b,D,z){super(h,b,D,z!=null?z:b.length-1)}getValueFromBuffer(h){return RI(this.dataBuffer,this.offsetBuffer[h],this.offsetBuffer[h+1])}}class nb extends II{constructor(h,b,D,z,G){super(h,D,z,G!=null?G:b.length),this.indexBuffer=b,this.indexBuffer=b}getValueFromBuffer(h){let b=this.indexBuffer[h];return RI(this.dataBuffer,this.offsetBuffer[b],this.offsetBuffer[b+1])}}class Zee extends II{constructor(h,b,D,z,G,X,Z){super(h,D,z,Z),this.indexBuffer=b,this.symbolOffsetBuffer=G,this.symbolTableBuffer=X}getValueFromBuffer(h){this.decodedDictionary==null&&(this.symbolLengthBuffer==null&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=(function(D,z,G){let X=[],Z=new Array(z.length).fill(0);for(let re=1;re=10}function Jee(M){return M===30}function Nit(M){if(M.type==="scalarType"){let h=M.scalarType;if(h.type==="physicalType")switch(h.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if(h.type==="logicalType")return!1}else if(M.type==="complexType"){let h=M.complexType;if(h.type==="physicalType")switch(h.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",M),!1}function Uit(M){var h;return M.type==="complexType"&&((h=M.complexType)==null?void 0:h.type)==="physicalType"&&M.complexType.physicalType===0}let Vit=new TextDecoder;function zI(M,h){let b=xh(M,h,1)[0];if(b===0)return"";let D=h.get(),z=M.subarray(D,D+b);return h.add(b),Vit.decode(z)}function Qee(M,h){let b=xh(M,h,1)[0]>>>0;if(b<10||b>30)throw new Error(`Unsupported field type code ${b}. Supported: 10-29(scalars), 30(STRUCT)`);let D=$ee(b);if(Kee(b)&&(D.name=zI(M,h)),Jee(b)){let z=xh(M,h,1)[0]>>>0;D.complexType.children=new Array(z);for(let G=0;G>>0,D=$ee(b);if(!D)throw new Error(`Unsupported column type code ${b}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(Kee(b)?D.name=zI(M,h):b>=0&&b<=3?D.name="id":b===4&&(D.name="geometry"),Jee(b)){let z=xh(M,h,1)[0]>>>0,G=D.complexType;G.children=new Array(z);for(let X=0;X>>0,G=xh(M,h,1)[0]>>>0;D.columns=new Array(G);for(let X=0;X=4)for(;tr>>0,oe=X.get()+he;if(oe>D.length)throw new Error(`Block overruns tile: ${oe} > ${D.length}`);if(xh(D,X,1)[0]>>>0!=1){X.set(oe);continue}let[ke,ge]=Hit(D,X),Ue=ke.featureTables[0],je=null,dt=null,gt=[],It=0;for(let qt of Ue.columns){let tr=qt.name;if((re=qt).type==="scalarType"&&((Q=re.scalarType)==null?void 0:Q.type)==="logicalType"&&re.scalarType.logicalType===0){let lr=null;if(qt.nullable){let jr=$h(D,X),_n=X.get(),fn=_4(D,jr.numValues,jr.byteLength,X);X.set(_n+jr.byteLength),lr=new jv(fn,jr.numValues)}let qr=$h(D,X);It=lr?lr.size():qr.decompressedCount,je=jit(D,qt,X,tr,qr,lr!=null?lr:It,G)}else if(Uit(qt)){let lr=xh(D,X,1)[0];if(It===0){let qr=X.get();It=$h(D,X).decompressedCount,X.set(qr)}dt=Iit(D,lr,X,It)}else{let lr=Nit(qt)?xh(D,X,1)[0]:1;if(lr===0)continue;let qr=Oit(D,X,qt,lr,It);if(qr)if(Array.isArray(qr))for(let jr of qr)gt.push(jr);else gt.push(qr)}}let _t=new Tit(Ue.name,dt,je,gt,ge);Z.push(_t),X.set(oe)}var re;return Z})(new Uint8Array(h));this.layers=b.reduce(((D,z)=>Object.assign(Object.assign({},D),{[z.name]:new Yit(z)})),{})}}class Xit{constructor(h,b){this.feature=h,this.type=h.type,this.properties=h.tags?h.tags:{},this.extent=b,"id"in h&&(typeof h.id=="string"?this.id=parseInt(h.id,10):typeof h.id!="number"||isNaN(h.id)||(this.id=h.id))}loadGeometry(){let h=[],b=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(let D of b){let z=[];for(let G of D)z.push(new o(G[0],G[1]));h.push(z)}return h}}let w4="_geojsonTileLayer";function Zit(M,h,b=""){h.writeVarintField(15,M.version||1),h.writeStringField(1,M.name||""),h.writeVarintField(5,M.extent||4096);let D={jsonPrefix:b,keys:[],values:[],keycache:{},valuecache:{}};for(let X=0;X>31}function Jit(M,h){let b=M.loadGeometry(),D=M.type,z=0,G=0;for(let X of b){let Z=1;D===1&&(Z=X.length),h.writeVarint(qI(1,Z));let re=D===3?X.length-1:X.length;for(let Q=0;Q=0&&he[3]>=0&&re.insert(Z,he[0],he[1],he[2],he[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=this.encoding!=="mlt"?new CQ(new zS(this.rawTileData)).layers:new ete(this.rawTileData).layers,this.sourceLayerCoder=new Aee(this.vtLayers?Object.keys(this.vtLayers).sort():[w4])),this.vtLayers}query(h,b,D,z){this.loadVTLayers();let G=h.params,X=j/h.tileSize/h.scale,Z=cn(G.filter,G.globalState),re=h.queryGeometry,Q=h.queryPadding*X,he=i2.fromPoints(re),oe=this.grid.query(he.minX-Q,he.minY-Q,he.maxX+Q,he.maxY+Q),ke=i2.fromPoints(h.cameraQueryGeometry).expandBy(Q),ge=this.grid3D.query(ke.minX,ke.minY,ke.maxX,ke.maxY,((dt,gt,It,_t)=>(function(qt,tr,lr,qr,jr){for(let fn of qt)if(tr<=fn.x&&lr<=fn.y&&qr>=fn.x&&jr>=fn.y)return!0;let _n=[new o(tr,lr),new o(tr,jr),new o(qr,jr),new o(qr,lr)];if(qt.length>2){for(let fn of _n)if(pn(qt,fn))return!0}for(let fn=0;fn(It||(It=$l(_t)),qt.queryIntersectsFeature({queryGeometry:re,feature:_t,featureState:tr,geometry:It,zoom:this.z,transform:h.transform,pixelsToTileUnits:X,pixelPosMatrix:h.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:h.getElevation}))))}return Ue}loadMatchingFeature(h,b,D,z,G,X,Z,re,Q,he,oe){let ke=this.bucketLayerIDs[b];if(X&&!ke.some((dt=>X.has(dt))))return;let ge=this.sourceLayerCoder.decode(D),Ue=this.vtLayers[ge].feature(z);if(G.needGeometry){let dt=xa(Ue,!0);if(!G.filter(new mi(this.tileID.overscaledZ),dt,this.tileID.canonical))return}else if(!G.filter(new mi(this.tileID.overscaledZ),Ue))return;let je=this.getId(Ue,ge);for(let dt of ke){if(X&&!X.has(dt))continue;let gt=re[dt];if(!gt)continue;let It={};je&&he&&(It=he.getState(gt.sourceLayer||w4,je));let _t=_e({},Q[dt]);_t.paint=nte(_t.paint,gt.paint,Ue,It,Z),_t.layout=nte(_t.layout,gt.layout,Ue,It,Z);let qt=!oe||oe(Ue,gt,It);if(!qt)continue;let tr=new Mee(Ue,this.z,this.x,this.y,je);tr.layer=_t;let lr=h[dt];lr===void 0&&(lr=h[dt]=[]),lr.push({featureIndex:z,feature:tr,intersectionZ:qt})}}lookupSymbolFeatures(h,b,D,z,G,X,Z,re){let Q={};this.loadVTLayers();let he=cn(G.filterSpec,G.globalState);for(let oe of h)this.loadMatchingFeature(Q,D,z,oe,he,X,Z,re,b);return Q}hasLayer(h){for(let b of this.bucketLayerIDs)for(let D of b)if(h===D)return!0;return!1}getId(h,b){var D;let z=h.id;return this.promoteId&&(z=h.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[b]],typeof z=="boolean"&&(z=Number(z)),z===void 0&&(!((D=h.properties)===null||D===void 0)&&D.cluster)&&this.promoteId&&(z=Number(h.properties.cluster_id))),z}}function nte(M,h,b,D,z){return ae(M,((G,X)=>{let Z=h instanceof yc?h.get(X):null;return Z!=null&&Z.evaluate?Z.evaluate(b,D,z):Z}))}function eat(M,h){return h-M}function ite(M,h,b,D,z){let G=[];for(let X of M){let Z;for(let re=0;re=D&&he.x>=D||(Q.x>=D?Q=new o(D,Q.y+(D-Q.x)/(he.x-Q.x)*(he.y-Q.y))._round():he.x>=D&&(he=new o(D,Q.y+(D-Q.x)/(he.x-Q.x)*(he.y-Q.y))._round()),Q.y>=z&&he.y>=z||(Q.y>=z?Q=new o(Q.x+(z-Q.y)/(he.y-Q.y)*(he.x-Q.x),z)._round():he.y>=z&&(he=new o(Q.x+(z-Q.y)/(he.y-Q.y)*(he.x-Q.x),z)._round()),Z&&Q.equals(Z[Z.length-1])||(Z=[Q],G.push(Z)),Z.push(he)))))}}return G}function ate(M,h,b,D,z){switch(h){case 1:return(function(G,X,Z,re){let Q=[];for(let he of G)for(let oe of he){let ke=re===0?oe.x:oe.y;ke>=X&&ke<=Z&&Q.push([oe])}return Q})(M,b,D,z);case 2:return ote(M,b,D,z,!1);case 3:return ote(M,b,D,z,!0)}return[]}function tat(M,h,b,D,z){let G=D===0?rat:nat,X=[],Z=[];for(let he=0;heh&&X.push(G(oe,ke,h)):ge>b?Ue=h&&(X.push(G(oe,ke,h)),je=!0),Ue>b&&ge<=b&&(X.push(G(oe,ke,b)),je=!0),!z&&je&&(Z.push(X),X=[])}let re=M.length-1,Q=D===0?M[re].x:M[re].y;return Q>=h&&Q<=b&&X.push(M[re]),z&&X.length>0&&!X[0].equals(X[X.length-1])&&X.push(new o(X[0].x,X[0].y)),X.length>0&&Z.push(X),Z}function ote(M,h,b,D,z){let G=[];for(let X of M){let Z=tat(X,h,b,D,z);Z.length>0&&G.push(...Z)}return G}function rat(M,h,b){return new o(b,M.y+(b-M.x)/(h.x-M.x)*(h.y-M.y))}function nat(M,h,b){return new o(M.x+(b-M.y)/(h.y-M.y)*(h.x-M.x),b)}_i("FeatureIndex",rte,{omit:["rawTileData","sourceLayerCoder"]});class Jg extends o{constructor(h,b,D,z){super(h,b),this.angle=D,z!==void 0&&(this.segment=z)}clone(){return new Jg(this.x,this.y,this.angle,this.segment)}}function ste(M,h,b,D,z){if(h.segment===void 0||b===0)return!0;let G=h,X=h.segment+1,Z=0;for(;Z>-b/2;){if(X--,X<0)return!1;Z-=M[X].dist(G),G=M[X]}Z+=M[X].dist(M[X+1]),X++;let re=[],Q=0;for(;ZD;)Q-=re.shift().angleDelta;if(Q>z)return!1;X++,Z+=he.dist(oe)}return!0}function lte(M){let h=0;for(let b=0;bQ){let Ue=(Q-re)/ge,je=Ks.number(oe.x,ke.x,Ue),dt=Ks.number(oe.y,ke.y,Ue),gt=new Jg(je,dt,ke.angleTo(oe),he);return gt._round(),!X||ste(M,gt,Z,X,h)?gt:void 0}re+=ge}}function aat(M,h,b,D,z,G,X,Z,re){let Q=ute(D,G,X),he=cte(D,z),oe=he*X,ke=M[0].x===0||M[0].x===re||M[0].y===0||M[0].y===re;return h-oe=0&&qt=0&&tr=0&&ke+Q<=he){let lr=new Jg(qt,tr,It,Ue);lr._round(),D&&!ste(M,lr,G,D,z)||ge.push(lr)}}oe+=gt}return Z||ge.length||X||(ge=fte(M,oe/2,b,D,z,G,X,!0,re)),ge}function hte(M,h,b,D){let z=[],G=M.image,X=G.pixelRatio,Z=G.paddedRect.w-2,re=G.paddedRect.h-2,Q={x1:M.left,y1:M.top,x2:M.right,y2:M.bottom},he=G.stretchX||[[0,Z]],oe=G.stretchY||[[0,re]],ke=(un,ei)=>un+ei[1]-ei[0],ge=he.reduce(ke,0),Ue=oe.reduce(ke,0),je=Z-ge,dt=re-Ue,gt=0,It=ge,_t=0,qt=Ue,tr=0,lr=je,qr=0,jr=dt;if(G.content&&D){let un=G.content,ei=un[2]-un[0],ci=un[3]-un[1];(G.textFitWidth||G.textFitHeight)&&(Q=lee(M)),gt=GS(he,0,un[0]),_t=GS(oe,0,un[1]),It=GS(he,un[0],un[2]),qt=GS(oe,un[1],un[3]),tr=un[0]-gt,qr=un[1]-_t,lr=ei-It,jr=ci-qt}let _n=Q.x1,fn=Q.y1,Dn=Q.x2-_n,Hn=Q.y2-fn,Ln=(un,ei,ci,ti)=>{let di=HS(un.stretch-gt,It,Dn,_n),_a=jS(un.fixed-tr,lr,un.stretch,ge),Mo=HS(ei.stretch-_t,qt,Hn,fn),us=jS(ei.fixed-qr,jr,ei.stretch,Ue),ks=HS(ci.stretch-gt,It,Dn,_n),Uf=jS(ci.fixed-tr,lr,ci.stretch,ge),Jl=HS(ti.stretch-_t,qt,Hn,fn),_c=jS(ti.fixed-qr,jr,ti.stretch,Ue),zc=new o(di,Mo),Sl=new o(ks,Mo),df=new o(ks,Jl),_h=new o(di,Jl),bh=new o(_a/X,us/X),Ad=new o(Uf/X,_c/X),Vf=h*Math.PI/180;if(Vf){let qc=Math.sin(Vf),Bl=Math.cos(Vf),ec=[Bl,-qc,qc,Bl];zc._matMult(ec),Sl._matMult(ec),_h._matMult(ec),df._matMult(ec)}let Md=un.stretch+un.fixed,$0=ei.stretch+ei.fixed;return{tl:zc,tr:Sl,bl:_h,br:df,tex:{x:G.paddedRect.x+1+Md,y:G.paddedRect.y+1+$0,w:ci.stretch+ci.fixed-Md,h:ti.stretch+ti.fixed-$0},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:bh,pixelOffsetBR:Ad,minFontScaleX:lr/X/Dn,minFontScaleY:jr/X/Hn,isSDF:b}};if(D&&(G.stretchX||G.stretchY)){let un=dte(he,je,ge),ei=dte(oe,dt,Ue);for(let ci=0;ci0&&(je=Math.max(10,je),this.circleDiameter=je)}else{let ke=!((oe=X.image)===null||oe===void 0)&&oe.content&&(X.image.textFitWidth||X.image.textFitHeight)?lee(X):{x1:X.left,y1:X.top,x2:X.right,y2:X.bottom};ke.y1=ke.y1*Z-re[0],ke.y2=ke.y2*Z+re[2],ke.x1=ke.x1*Z-re[3],ke.x2=ke.x2*Z+re[1];let ge=X.collisionPadding;if(ge&&(ke.x1-=ge[0]*Z,ke.y1-=ge[1]*Z,ke.x2+=ge[2]*Z,ke.y2+=ge[3]*Z),he){let Ue=new o(ke.x1,ke.y1),je=new o(ke.x2,ke.y1),dt=new o(ke.x1,ke.y2),gt=new o(ke.x2,ke.y2),It=he*Math.PI/180;Ue._rotate(It),je._rotate(It),dt._rotate(It),gt._rotate(It),ke.x1=Math.min(Ue.x,je.x,dt.x,gt.x),ke.x2=Math.max(Ue.x,je.x,dt.x,gt.x),ke.y1=Math.min(Ue.y,je.y,dt.y,gt.y),ke.y2=Math.max(Ue.y,je.y,dt.y,gt.y)}h.emplaceBack(b.x,b.y,ke.x1,ke.y1,ke.x2,ke.y2,D,z,G)}this.boxEndIndex=h.length}}class oat{constructor(h=[],b=(D,z)=>Dz?1:0){if(this.data=h,this.length=this.data.length,this.compare=b,this.length>0)for(let D=(this.length>>1)-1;D>=0;D--)this._down(D)}push(h){this.data.push(h),this._up(this.length++)}pop(){if(this.length===0)return;let h=this.data[0],b=this.data.pop();return--this.length>0&&(this.data[0]=b,this._down(0)),h}peek(){return this.data[0]}_up(h){let{data:b,compare:D}=this,z=b[h];for(;h>0;){let G=h-1>>1,X=b[G];if(D(z,X)>=0)break;b[h]=X,h=G}b[h]=z}_down(h){let{data:b,compare:D}=this,z=this.length>>1,G=b[h];for(;h=0)break;b[h]=b[X],h=X}b[h]=G}}function sat(M,h=1){let b=i2.fromPoints(M[0]),D=Math.min(b.width(),b.height()),z=D/2,G=new oat([],lat),{minX:X,minY:Z,maxX:re,maxY:Q}=b;if(D===0)return new o(X,Z);for(let ke=X;keoe.d||!oe.d)&&(oe=ke),ke.max-oe.d<=h||(z=ke.h/2,G.push(new ib(ke.p.x-z,ke.p.y-z,z,M)),G.push(new ib(ke.p.x+z,ke.p.y-z,z,M)),G.push(new ib(ke.p.x-z,ke.p.y+z,z,M)),G.push(new ib(ke.p.x+z,ke.p.y+z,z,M)))}return he.d>0&&oe.d-he.d<=h?he.p:oe.p}function lat(M,h){return h.max-M.max}class ib{constructor(h,b,D,z){this.p=new o(h,b),this.h=D,this.d=(function(G,X){let Z=!1,re=1/0;for(let Q of X)for(let he=0,oe=Q.length,ke=oe-1;heG.y!=Ue.y>G.y&&G.x<(Ue.x-ge.x)*(G.y-ge.y)/(Ue.y-ge.y)+ge.x&&(Z=!Z),re=Math.min(re,gr(G,ge,Ue))}return(Z?1:-1)*Math.sqrt(re)})(this.p,z),this.max=this.d+this.h*Math.SQRT2}}var Nf;a.aM=void 0,(Nf=a.aM||(a.aM={}))[Nf.center=1]="center",Nf[Nf.left=2]="left",Nf[Nf.right=3]="right",Nf[Nf.top=4]="top",Nf[Nf.bottom=5]="bottom",Nf[Nf["top-left"]=6]="top-left",Nf[Nf["top-right"]=7]="top-right",Nf[Nf["bottom-left"]=8]="bottom-left",Nf[Nf["bottom-right"]=9]="bottom-right";let BI=Number.POSITIVE_INFINITY;function vte(M,h){return h[1]!==BI?(function(b,D,z){let G=0,X=0;switch(D=Math.abs(D),z=Math.abs(z),b){case"top-right":case"top-left":case"top":X=z-7;break;case"bottom-right":case"bottom-left":case"bottom":X=7-z}switch(b){case"top-right":case"bottom-right":case"right":G=-D;break;case"top-left":case"bottom-left":case"left":G=D}return[G,X]})(M,h[0],h[1]):(function(b,D){let z=0,G=0;D<0&&(D=0);let X=D/Math.SQRT2;switch(b){case"top-right":case"top-left":G=X-7;break;case"bottom-right":case"bottom-left":G=7-X;break;case"bottom":G=7-D;break;case"top":G=D-7}switch(b){case"top-right":case"bottom-right":z=-X;break;case"top-left":case"bottom-left":z=X;break;case"left":z=D;break;case"right":z=-D}return[z,G]})(M,h[0])}function pte(M,h,b){var D;let z=M.layout,G=(D=z.get("text-variable-anchor-offset"))===null||D===void 0?void 0:D.evaluate(h,{},b);if(G){let Z=G.values,re=[];for(let Q=0;Qke*Rc));he.startsWith("top")?oe[1]-=7:he.startsWith("bottom")&&(oe[1]+=7),re[Q+1]=oe}return new xo(re)}let X=z.get("text-variable-anchor");if(X){let Z;Z=M._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[z.get("text-radial-offset").evaluate(h,{},b)*Rc,BI]:z.get("text-offset").evaluate(h,{},b).map((Q=>Q*Rc));let re=[];for(let Q of X)re.push(Q,vte(Q,Z));return new xo(re)}return null}function OI(M){switch(M){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function uat(M,h,b,D,z,G,X,Z,re,Q,he,oe){let ke=G.textMaxSize.evaluate(h,{});ke===void 0&&(ke=X);let ge=M.layers[0].layout,Ue=ge.get("icon-offset").evaluate(h,{},he),je=mte(b.horizontal),dt=X/24,gt=M.tilePixelRatio*dt,It=M.tilePixelRatio*ke/24,_t=M.tilePixelRatio*Z,qt=M.tilePixelRatio*ge.get("symbol-spacing"),tr=ge.get("text-padding")*M.tilePixelRatio,lr=(function(ci,ti,di,_a=1){let Mo=ci.get("icon-padding").evaluate(ti,{},di),us=Mo==null?void 0:Mo.values;return[us[0]*_a,us[1]*_a,us[2]*_a,us[3]*_a]})(ge,h,he,M.tilePixelRatio),qr=ge.get("text-max-angle")/180*Math.PI,jr=ge.get("text-rotation-alignment")!=="viewport"&&ge.get("symbol-placement")!=="point",_n=ge.get("icon-rotation-alignment")==="map"&&ge.get("symbol-placement")!=="point",fn=ge.get("symbol-placement"),Dn=qt/2,Hn=ge.get("icon-text-fit"),Ln;D&&Hn!=="none"&&(M.allowVerticalPlacement&&b.vertical&&(Ln=uee(D,b.vertical,Hn,ge.get("icon-text-fit-padding"),Ue,dt)),je&&(D=uee(D,je,Hn,ge.get("icon-text-fit-padding"),Ue,dt)));let un=he?oe.line.getGranularityForZoomLevel(he.z):1,ei=(ci,ti)=>{ti.x<0||ti.x>=j||ti.y<0||ti.y>=j||(function(di,_a,Mo,us,ks,Uf,Jl,_c,zc,Sl,df,_h,bh,Ad,Vf,Md,$0,qc,Bl,ec,Ql,Bc,V1,Wv,T4){let Qg=di.addToLineVertexArray(_a,Mo),o2,ab,ob,sb,yte=0,xte=0,_te=0,bte=0,NI=-1,UI=-1,G1={},wte=si("");if(di.allowVerticalPlacement&&us.vertical){let wh=_c.layout.get("text-rotate").evaluate(Ql,{},Wv)+90;ob=new WS(zc,_a,Sl,df,_h,us.vertical,bh,Ad,Vf,wh),Jl&&(sb=new WS(zc,_a,Sl,df,_h,Jl,$0,qc,Vf,wh))}if(ks){let wh=_c.layout.get("icon-rotate").evaluate(Ql,{}),_0=_c.layout.get("icon-text-fit")!=="none",s2=hte(ks,wh,V1,_0),Xv=Jl?hte(Jl,wh,V1,_0):void 0;ab=new WS(zc,_a,Sl,df,_h,ks,$0,qc,!1,wh),yte=4*s2.length;let l2=di.iconSizeData,Ip=null;l2.kind==="source"?(Ip=[N1*_c.layout.get("icon-size").evaluate(Ql,{})],Ip[0]>Yg&&xe(`${di.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):l2.kind==="composite"&&(Ip=[N1*Bc.compositeIconSizes[0].evaluate(Ql,{},Wv),N1*Bc.compositeIconSizes[1].evaluate(Ql,{},Wv)],(Ip[0]>Yg||Ip[1]>Yg)&&xe(`${di.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),di.addSymbols(di.icon,s2,Ip,ec,Bl,Ql,a.ax.none,_a,Qg.lineStartIndex,Qg.lineLength,-1,Wv),NI=di.icon.placedSymbolArray.length-1,Xv&&(xte=4*Xv.length,di.addSymbols(di.icon,Xv,Ip,ec,Bl,Ql,a.ax.vertical,_a,Qg.lineStartIndex,Qg.lineLength,-1,Wv),UI=di.icon.placedSymbolArray.length-1)}let Tte=Object.keys(us.horizontal);for(let wh of Tte){let _0=us.horizontal[wh];if(!o2){wte=si(_0.text);let Xv=_c.layout.get("text-rotate").evaluate(Ql,{},Wv);o2=new WS(zc,_a,Sl,df,_h,_0,bh,Ad,Vf,Xv)}let s2=_0.positionedLines.length===1;if(_te+=gte(di,_a,_0,Uf,_c,Vf,Ql,Md,Qg,us.vertical?a.ax.horizontal:a.ax.horizontalOnly,s2?Tte:[wh],G1,NI,Bc,Wv),s2)break}us.vertical&&(bte+=gte(di,_a,us.vertical,Uf,_c,Vf,Ql,Md,Qg,a.ax.vertical,["vertical"],G1,UI,Bc,Wv));let fat=o2?o2.boxStartIndex:di.collisionBoxArray.length,hat=o2?o2.boxEndIndex:di.collisionBoxArray.length,dat=ob?ob.boxStartIndex:di.collisionBoxArray.length,vat=ob?ob.boxEndIndex:di.collisionBoxArray.length,pat=ab?ab.boxStartIndex:di.collisionBoxArray.length,gat=ab?ab.boxEndIndex:di.collisionBoxArray.length,mat=sb?sb.boxStartIndex:di.collisionBoxArray.length,yat=sb?sb.boxEndIndex:di.collisionBoxArray.length,Yv=-1,YS=(wh,_0)=>wh!=null&&wh.circleDiameter?Math.max(wh.circleDiameter,_0):_0;Yv=YS(o2,Yv),Yv=YS(ob,Yv),Yv=YS(ab,Yv),Yv=YS(sb,Yv);let Ate=Yv>-1?1:0;Ate&&(Yv*=T4/Rc),di.glyphOffsetArray.length>=X_.MAX_GLYPHS&&xe("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ql.sortKey!==void 0&&di.addToSortKeyRanges(di.symbolInstances.length,Ql.sortKey);let xat=pte(_c,Ql,Wv),[_at,bat]=(function(wh,_0){let s2=wh.length,Xv=_0==null?void 0:_0.values;if((Xv==null?void 0:Xv.length)>0)for(let l2=0;l2=0?G1.right:-1,G1.center>=0?G1.center:-1,G1.left>=0?G1.left:-1,G1.vertical||-1,NI,UI,wte,fat,hat,dat,vat,pat,gat,mat,yat,Sl,_te,bte,yte,xte,Ate,0,bh,Yv,_at,bat)})(M,ti,ci,b,D,z,Ln,M.layers[0],M.collisionBoxArray,h.index,h.sourceLayerIndex,M.index,gt,[tr,tr,tr,tr],jr,re,_t,lr,_n,Ue,h,G,Q,he,X)};if(fn==="line")for(let ci of ite(h.geometry,0,0,j,j)){let ti=n2(ci,un),di=aat(ti,qt,qr,b.vertical||je,D,24,It,M.overscaling,j);for(let _a of di)je&&cat(M,je.text,Dn,_a)||ei(ti,_a)}else if(fn==="line-center"){for(let ci of h.geometry)if(ci.length>1){let ti=n2(ci,un),di=iat(ti,qr,b.vertical||je,D,24,It);di&&ei(ti,di)}}else if(h.type==="Polygon")for(let ci of uh(h.geometry,0)){let ti=sat(ci,16);ei(n2(ci[0],un,!0),new Jg(ti.x,ti.y,0))}else if(h.type==="LineString")for(let ci of h.geometry){let ti=n2(ci,un);ei(ti,new Jg(ti[0].x,ti[0].y,0))}else if(h.type==="Point")for(let ci of h.geometry)for(let ti of ci)ei([ti],new Jg(ti.x,ti.y,0))}function gte(M,h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue){let je=(function(It,_t,qt,tr,lr,qr,jr,_n){let fn=tr.layout.get("text-rotate").evaluate(qr,{})*Math.PI/180,Dn=[];for(let Hn of _t.positionedLines)for(let Ln of Hn.positionedGlyphs){if(!Ln.rect)continue;let un=Ln.rect||{},ei=4,ci=!0,ti=1,di=0,_a=(lr||_n)&&Ln.vertical,Mo=Ln.metrics.advance*Ln.scale/2;if(_n&&_t.verticalizable&&(di=Hn.lineOffset/2-(Ln.imageName?-(Rc-Ln.metrics.width*Ln.scale)/2:(Ln.scale-1)*Rc)),Ln.imageName){let qc=jr[Ln.imageName];ci=qc.sdf,ti=qc.pixelRatio,ei=1/ti}let us=lr?[Ln.x+Mo,Ln.y]:[0,0],ks=lr?[0,0]:[Ln.x+Mo+qt[0],Ln.y+qt[1]-di],Uf=[0,0];_a&&(Uf=ks,ks=[0,0]);let Jl=Ln.metrics.isDoubleResolution?2:1,_c=(Ln.metrics.left-ei)*Ln.scale-Mo+ks[0],zc=(-Ln.metrics.top-ei)*Ln.scale+ks[1],Sl=_c+un.w/Jl*Ln.scale/ti,df=zc+un.h/Jl*Ln.scale/ti,_h=new o(_c,zc),bh=new o(Sl,zc),Ad=new o(_c,df),Vf=new o(Sl,df);if(_a){let qc=new o(-Mo,Mo- -17),Bl=-Math.PI/2,ec=12-Mo,Ql=new o(22-ec,-(Ln.imageName?ec:0)),Bc=new o(...Uf);_h._rotateAround(Bl,qc)._add(Ql)._add(Bc),bh._rotateAround(Bl,qc)._add(Ql)._add(Bc),Ad._rotateAround(Bl,qc)._add(Ql)._add(Bc),Vf._rotateAround(Bl,qc)._add(Ql)._add(Bc)}if(fn){let qc=Math.sin(fn),Bl=Math.cos(fn),ec=[Bl,-qc,qc,Bl];_h._matMult(ec),bh._matMult(ec),Ad._matMult(ec),Vf._matMult(ec)}let Md=new o(0,0),$0=new o(0,0);Dn.push({tl:_h,tr:bh,bl:Ad,br:Vf,tex:un,writingMode:_t.writingMode,glyphOffset:us,sectionIndex:Ln.sectionIndex,isSDF:ci,pixelOffsetTL:Md,pixelOffsetBR:$0,minFontScaleX:0,minFontScaleY:0})}return Dn})(0,b,Z,z,G,X,D,M.allowVerticalPlacement),dt=M.textSizeData,gt=null;dt.kind==="source"?(gt=[N1*z.layout.get("text-size").evaluate(X,{})],gt[0]>Yg&&xe(`${M.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):dt.kind==="composite"&&(gt=[N1*ge.compositeTextSizes[0].evaluate(X,{},Ue),N1*ge.compositeTextSizes[1].evaluate(X,{},Ue)],(gt[0]>Yg||gt[1]>Yg)&&xe(`${M.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),M.addSymbols(M.text,je,gt,Z,G,X,Q,h,re.lineStartIndex,re.lineLength,ke,Ue);for(let It of he)oe[It]=M.text.placedSymbolArray.length-1;return 4*je.length}function mte(M){for(let h in M)return M[h];return null}function cat(M,h,b,D){let z=M.compareText;if(h in z){let G=z[h];for(let X=G.length-1;X>=0;X--)if(D.dist(G[X])this.process())),this.subscription=et(this.target,"message",(b=>this.receive(b)),!1),this.globalScope=De(self)?M:window}registerMessageHandler(M,h){this.messageHandlers[M]=h}unregisterMessageHandler(M){delete this.messageHandlers[M]}sendAsync(M,h){return new Promise(((b,D)=>{let z=Math.round(1e18*Math.random()).toString(36).substring(0,10),G=h?et(h.signal,"abort",(()=>{G==null||G.unsubscribe(),delete this.resolveRejects[z];let re={id:z,type:"",origin:location.origin,targetMapId:M.targetMapId,sourceMapId:this.mapId};this.target.postMessage(re)}),wit):null;this.resolveRejects[z]={resolve:re=>{G==null||G.unsubscribe(),b(re)},reject:re=>{G==null||G.unsubscribe(),D(re)}};let X=[],Z=Object.assign(Object.assign({},M),{id:z,sourceMapId:this.mapId,origin:location.origin,data:Be(M.data,X)});this.target.postMessage(Z,{transfer:X})}))}receive(M){let h=M.data,b=h.id,D=["file://","resource://android","null"],z=[h.origin,location.origin],G=h.origin===location.origin,X=z.some((Z=>D.includes(Z)));if((G||X)&&(!h.targetMapId||this.mapId===h.targetMapId)){if(h.type===""){delete this.tasks[b];let Z=this.abortControllers[b];return delete this.abortControllers[b],void(Z&&Z.abort())}if(De(self)||h.mustQueue)return this.tasks[b]=h,this.taskQueue.push(b),void this.invoker.trigger();this.processTask(b,h)}}process(){if(this.taskQueue.length===0)return;let M=this.taskQueue.shift(),h=this.tasks[M];delete this.tasks[M],this.taskQueue.length>0&&this.invoker.trigger(),h&&this.processTask(M,h)}processTask(M,h){return i(this,void 0,void 0,(function*(){if(h.type===""){let z=this.resolveRejects[M];return delete this.resolveRejects[M],z?void(h.error?z.reject(V(Ne(h.error))):z.resolve(Ne(h.data))):void 0}if(!this.messageHandlers[h.type])return void this.completeTask(M,new Error(`Could not find a registered handler for ${h.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let b=Ne(h.data),D=new AbortController;this.abortControllers[M]=D;try{let z=yield this.messageHandlers[h.type](h.sourceMapId,b,D);this.completeTask(M,null,z)}catch(z){this.completeTask(M,V(z))}}))}completeTask(M,h,b){let D=[];delete this.abortControllers[M];let z={id:M,type:"",sourceMapId:this.mapId,origin:location.origin,error:h?Be(h):null,data:Be(b,D)};this.target.postMessage(z,{transfer:D})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},a.O=function(){var M=new y(16);return y!=Float32Array&&(M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[11]=0,M[12]=0,M[13]=0,M[14]=0),M[0]=1,M[5]=1,M[10]=1,M[15]=1,M},a.P=o,a.Q=function(M,h,b){var D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je=b[0],dt=b[1],gt=b[2];return h===M?(M[12]=h[0]*je+h[4]*dt+h[8]*gt+h[12],M[13]=h[1]*je+h[5]*dt+h[9]*gt+h[13],M[14]=h[2]*je+h[6]*dt+h[10]*gt+h[14],M[15]=h[3]*je+h[7]*dt+h[11]*gt+h[15]):(z=h[1],G=h[2],X=h[3],Z=h[4],re=h[5],Q=h[6],he=h[7],oe=h[8],ke=h[9],ge=h[10],Ue=h[11],M[0]=D=h[0],M[1]=z,M[2]=G,M[3]=X,M[4]=Z,M[5]=re,M[6]=Q,M[7]=he,M[8]=oe,M[9]=ke,M[10]=ge,M[11]=Ue,M[12]=D*je+Z*dt+oe*gt+h[12],M[13]=z*je+re*dt+ke*gt+h[13],M[14]=G*je+Q*dt+ge*gt+h[14],M[15]=X*je+he*dt+Ue*gt+h[15]),M},a.R=Kl,a.S=function(M,h,b){var D=b[0],z=b[1],G=b[2];return M[0]=h[0]*D,M[1]=h[1]*D,M[2]=h[2]*D,M[3]=h[3]*D,M[4]=h[4]*z,M[5]=h[5]*z,M[6]=h[6]*z,M[7]=h[7]*z,M[8]=h[8]*G,M[9]=h[9]*G,M[10]=h[10]*G,M[11]=h[11]*G,M[12]=h[12],M[13]=h[13],M[14]=h[14],M[15]=h[15],M},a.T=NR,a.U=function(M,h,b){var D=h[0],z=h[1],G=h[2],X=h[3],Z=h[4],re=h[5],Q=h[6],he=h[7],oe=h[8],ke=h[9],ge=h[10],Ue=h[11],je=h[12],dt=h[13],gt=h[14],It=h[15],_t=b[0],qt=b[1],tr=b[2],lr=b[3];return M[0]=_t*D+qt*Z+tr*oe+lr*je,M[1]=_t*z+qt*re+tr*ke+lr*dt,M[2]=_t*G+qt*Q+tr*ge+lr*gt,M[3]=_t*X+qt*he+tr*Ue+lr*It,M[4]=(_t=b[4])*D+(qt=b[5])*Z+(tr=b[6])*oe+(lr=b[7])*je,M[5]=_t*z+qt*re+tr*ke+lr*dt,M[6]=_t*G+qt*Q+tr*ge+lr*gt,M[7]=_t*X+qt*he+tr*Ue+lr*It,M[8]=(_t=b[8])*D+(qt=b[9])*Z+(tr=b[10])*oe+(lr=b[11])*je,M[9]=_t*z+qt*re+tr*ke+lr*dt,M[10]=_t*G+qt*Q+tr*ge+lr*gt,M[11]=_t*X+qt*he+tr*Ue+lr*It,M[12]=(_t=b[12])*D+(qt=b[13])*Z+(tr=b[14])*oe+(lr=b[15])*je,M[13]=_t*z+qt*re+tr*ke+lr*dt,M[14]=_t*G+qt*Q+tr*ge+lr*gt,M[15]=_t*X+qt*he+tr*Ue+lr*It,M},a.V=function(M,h){let b={};for(let D of h)D in M&&(b[D]=M[D]);return b},a.W=Xg,a.X=J,a.Y=yee,a.Z=mee,a._=i,a.a=Ve,a.a$=function(M){var h=new y(3);return h[0]=M[0],h[1]=M[1],h[2]=M[2],h},a.a0=p,a.a1=_,a.a2=Oe,a.a3=Yd,a.a4=_ee,a.a5=NS,a.a6=j,a.a7=x4,a.a8=i2,a.a9=25,a.aA=function(M){var h=M[0],b=M[1];return Math.sqrt(h*h+b*b)},a.aB=function(M){return M[0]=0,M[1]=0,M},a.aC=function(M,h,b){return M[0]=h[0]*b,M[1]=h[1]*b,M},a.aD=dI,a.aE=I,a.aF=function(M,h,b,D){let z=h.y-M.y,G=h.x-M.x,X=D.y-b.y,Z=D.x-b.x,re=X*G-Z*z;if(re===0)return null;let Q=(Z*(M.y-b.y)-X*(M.x-b.x))/re;return new o(M.x+Q*G,M.y+Q*z)},a.aG=ite,a.aH=gn,a.aI=function(M){let h=1/0,b=1/0,D=-1/0,z=-1/0;for(let G of M)h=Math.min(h,G.x),b=Math.min(b,G.y),D=Math.max(D,G.x),z=Math.max(z,G.y);return[h,b,D,z]},a.aJ=Rc,a.aK=q,a.aL=function(M,h,b,D,z=!1){if(!b[0]&&!b[1])return[0,0];let G=z?D==="map"?-M.bearingInRadians:0:D==="viewport"?M.bearingInRadians:0;if(G){let X=Math.sin(G),Z=Math.cos(G);b=[b[0]*Z-b[1]*X,b[0]*X+b[1]*Z]}return[z?b[0]:q(h,b[0],M.zoom),z?b[1]:q(h,b[1],M.zoom)]},a.aN=hI,a.aO=OI,a.aP=fI,a.aQ=M=>M.type==="symbol",a.aR=LS,a.aS=Re,a.aT=CS,a.aU=Xe,a.aV=an,a.aW=Er,a.aX=we,a.aY=bee,a.aZ=A,a.a_=T,a.aa=yI,a.ab=M=>{let h=window.document.createElement("video");return h.muted=!0,new Promise((b=>{h.onloadstart=()=>{b(h)};for(let D of M){let z=window.document.createElement("source");jt(D)||(h.crossOrigin="Anonymous"),z.src=D,h.appendChild(z)}}))},a.ac=xr,a.ad=function(){return ne++},a.ae=H,a.af=X_,a.ag=w4,a.ah=cn,a.ai=xa,a.aj=Mee,a.ak=function(M){let h={};if(M.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((b,D,z,G)=>{let X=z||G;return h[D]=!X||X.toLowerCase(),""})),h["max-age"]){let b=parseInt(h["max-age"],10);isNaN(b)?delete h["max-age"]:h["max-age"]=b}return h},a.al=ue,a.am=85.051129,a.an=qe,a.ao=function(M){return Math.pow(2,M)},a.ap=k,a.aq=xee,a.ar=function(M){return Math.log(M)/Math.LN2},a.as=function(M){var h=M[0],b=M[1];return h*h+b*b},a.at=function(M){if(!M.length)return new Set;let h=Math.max(...M.map((re=>re.canonical.z))),b=1/0,D=-1/0,z=1/0,G=-1/0,X=[];for(let re of M){let{x:Q,y:he,z:oe}=re.canonical,ke=Math.pow(2,h-oe),ge=Q*ke,Ue=he*ke;X.push({id:re,x:ge,y:Ue}),geD&&(D=ge),UeG&&(G=Ue)}let Z=new Set;for(let re of X)re.x!==b&&re.x!==D&&re.y!==z&&re.y!==G||Z.add(re.id);return Z},a.au=function(M,h){let b=Math.abs(2*M.wrap)-+(M.wrap<0),D=Math.abs(2*h.wrap)-+(h.wrap<0);return M.overscaledZ-h.overscaledZ||D-b||h.canonical.y-M.canonical.y||h.canonical.x-M.canonical.x},a.av=class{constructor(M,h){this.max=M,this.onRemove=h,this.reset()}reset(){for(let M in this.data)for(let h of this.data[M])h.timeout&&clearTimeout(h.timeout),this.onRemove(h.value);return this.data={},this.order=[],this}add(M,h,b){let D=M.wrapped().key;this.data[D]===void 0&&(this.data[D]=[]);let z={value:h,timeout:void 0};if(b!==void 0&&(z.timeout=setTimeout((()=>{this.remove(M,z)}),b)),this.data[D].push(z),this.order.push(D),this.order.length>this.max){let G=this._getAndRemoveByKey(this.order[0]);G&&this.onRemove(G)}return this}has(M){return M.wrapped().key in this.data}getAndRemove(M){return this.has(M)?this._getAndRemoveByKey(M.wrapped().key):null}_getAndRemoveByKey(M){let h=this.data[M].shift();return h.timeout&&clearTimeout(h.timeout),this.data[M].length===0&&delete this.data[M],this.order.splice(this.order.indexOf(M),1),h.value}getByKey(M){let h=this.data[M];return h?h[0].value:null}get(M){return this.has(M)?this.data[M.wrapped().key][0].value:null}remove(M,h){if(!this.has(M))return this;let b=M.wrapped().key,D=h===void 0?0:this.data[b].indexOf(h),z=this.data[b][D];return this.data[b].splice(D,1),z.timeout&&clearTimeout(z.timeout),this.data[b].length===0&&delete this.data[b],this.onRemove(z.value),this.order.splice(this.order.indexOf(b),1),this}setMaxSize(M){for(this.max=M;this.order.length>this.max;){let h=this._getAndRemoveByKey(this.order[0]);h&&this.onRemove(h)}return this}filter(M){let h=[];for(let b in this.data)for(let D of this.data[b])M(D.value)||h.push(D);for(let b of h)this.remove(b.value.tileID,b)}},a.aw=function(M,h){let b=0,D=0;if(M.kind==="constant")D=M.layoutSize;else if(M.kind!=="source"){let{interpolationType:z,minZoom:G,maxZoom:X}=M,Z=z?ue(Uo.interpolationFactor(z,h,G,X),0,1):0;M.kind==="camera"?D=Ks.number(M.minSize,M.maxSize,Z):b=Z}return{uSizeT:b,uSize:D}},a.ay=function(M,{uSize:h,uSizeT:b},{lowerSize:D,upperSize:z}){return M.kind==="source"?D/N1:M.kind==="composite"?Ks.number(D/N1,z/N1,b):h},a.az=O,a.b=pt,a.b$=Os,a.b0=function(M,h,b){return M[0]=h[0]-b[0],M[1]=h[1]-b[1],M[2]=h[2]-b[2],M},a.b1=function(M,h){var b=h[0],D=h[1],z=h[2],G=b*b+D*D+z*z;return G>0&&(G=1/Math.sqrt(G)),M[0]=h[0]*G,M[1]=h[1]*G,M[2]=h[2]*G,M},a.b2=m,a.b3=function(M,h){return M[0]*h[0]+M[1]*h[1]+M[2]*h[2]},a.b4=function(M,h,b){return M[0]=h[0]*b[0],M[1]=h[1]*b[1],M[2]=h[2]*b[2],M[3]=h[3]*b[3],M},a.b5=L,a.b6=function(M,h,b){let D=h[0]*b[0]+h[1]*b[1]+h[2]*b[2];return D===0?null:(-(M[0]*b[0]+M[1]*b[1]+M[2]*b[2])-b[3])/D},a.b7=E,a.b8=function(M,h,b){return M[0]=h[0]*b,M[1]=h[1]*b,M[2]=h[2]*b,M[3]=h[3]*b,M},a.b9=function(M,h){return M[0]*h[0]+M[1]*h[1]+M[2]*h[2]+M[3]},a.bA=B,a.bB=function(M,h,b){var D=b[0],z=b[1],G=b[2],X=b[3],Z=h[0],re=h[1],Q=h[2],he=z*Q-G*re,oe=G*Z-D*Q,ke=D*re-z*Z;return M[0]=Z+X*(he+=he)+z*(ke+=ke)-G*(oe+=oe),M[1]=re+X*oe+G*he-D*ke,M[2]=Q+X*ke+D*oe-z*he,M},a.bC=function(M,h,b){let D=(z=[M[0],M[1],M[2],h[0],h[1],h[2],b[0],b[1],b[2]])[0]*((he=z[8])*(X=z[4])-(Z=z[5])*(Q=z[7]))+z[1]*(-he*(G=z[3])+Z*(re=z[6]))+z[2]*(Q*G-X*re);var z,G,X,Z,re,Q,he;if(D===0)return null;let oe=m([],[h[0],h[1],h[2]],[b[0],b[1],b[2]]),ke=m([],[b[0],b[1],b[2]],[M[0],M[1],M[2]]),ge=m([],[M[0],M[1],M[2]],[h[0],h[1],h[2]]),Ue=A([],oe,-M[3]);return T(Ue,Ue,A([],ke,-h[3])),T(Ue,Ue,A([],ge,-b[3])),A(Ue,Ue,1/D),Ue},a.bD=mI,a.bE=function(){return new Float64Array(4)},a.bF=function(M,h,b,D){var z=[],G=[];return z[0]=h[0]-b[0],z[1]=h[1]-b[1],z[2]=h[2]-b[2],G[0]=z[0]*Math.cos(D)-z[1]*Math.sin(D),G[1]=z[0]*Math.sin(D)+z[1]*Math.cos(D),G[2]=z[2],M[0]=G[0]+b[0],M[1]=G[1]+b[1],M[2]=G[2]+b[2],M},a.bG=function(M,h,b,D){var z=[],G=[];return z[0]=h[0]-b[0],z[1]=h[1]-b[1],z[2]=h[2]-b[2],G[0]=z[0],G[1]=z[1]*Math.cos(D)-z[2]*Math.sin(D),G[2]=z[1]*Math.sin(D)+z[2]*Math.cos(D),M[0]=G[0]+b[0],M[1]=G[1]+b[1],M[2]=G[2]+b[2],M},a.bH=function(M,h,b,D){var z=[],G=[];return z[0]=h[0]-b[0],z[1]=h[1]-b[1],z[2]=h[2]-b[2],G[0]=z[2]*Math.sin(D)+z[0]*Math.cos(D),G[1]=z[1],G[2]=z[2]*Math.cos(D)-z[0]*Math.sin(D),M[0]=G[0]+b[0],M[1]=G[1]+b[1],M[2]=G[2]+b[2],M},a.bI=function(M,h,b){var D=Math.sin(b),z=Math.cos(b),G=h[0],X=h[1],Z=h[2],re=h[3],Q=h[8],he=h[9],oe=h[10],ke=h[11];return h!==M&&(M[4]=h[4],M[5]=h[5],M[6]=h[6],M[7]=h[7],M[12]=h[12],M[13]=h[13],M[14]=h[14],M[15]=h[15]),M[0]=G*z-Q*D,M[1]=X*z-he*D,M[2]=Z*z-oe*D,M[3]=re*z-ke*D,M[8]=G*D+Q*z,M[9]=X*D+he*z,M[10]=Z*D+oe*z,M[11]=re*D+ke*z,M},a.bJ=function(M,h){let b=K(M,360),D=K(h,360),z=D-b,G=D>b?z-360:z+360;return Math.abs(z)0?X:-X},a.bM=function(M,h){let b=K(M,2*Math.PI),D=K(h,2*Math.PI);return Math.min(Math.abs(b-D),Math.abs(b-D+2*Math.PI),Math.abs(b-D-2*Math.PI))},a.bN=function(){let M={},h=Ct.$version;for(let b in Ct.$root){let D=Ct.$root[b];if(D.required){let z=null;z=b==="version"?h:D.type==="array"?[]:{},z!=null&&(M[b]=z)}}return M},a.bO=bt,a.bP=Qe,a.bQ=function M(h,b){if(Array.isArray(h)){if(!Array.isArray(b)||h.length!==b.length)return!1;for(let D=0;DM.type==="raster",a.bV=ie,a.bW=function(M,h){if(!M)return[{command:"setStyle",args:[h]}];let b=[];try{if(!Mt(M.version,h.version))return[{command:"setStyle",args:[h]}];Mt(M.center,h.center)||b.push({command:"setCenter",args:[h.center]}),Mt(M.state,h.state)||b.push({command:"setGlobalState",args:[h.state]}),Mt(M.centerAltitude,h.centerAltitude)||b.push({command:"setCenterAltitude",args:[h.centerAltitude]}),Mt(M.zoom,h.zoom)||b.push({command:"setZoom",args:[h.zoom]}),Mt(M.bearing,h.bearing)||b.push({command:"setBearing",args:[h.bearing]}),Mt(M.pitch,h.pitch)||b.push({command:"setPitch",args:[h.pitch]}),Mt(M.roll,h.roll)||b.push({command:"setRoll",args:[h.roll]}),Mt(M.sprite,h.sprite)||b.push({command:"setSprite",args:[h.sprite]}),Mt(M.glyphs,h.glyphs)||b.push({command:"setGlyphs",args:[h.glyphs]}),Mt(M.transition,h.transition)||b.push({command:"setTransition",args:[h.transition]}),Mt(M.light,h.light)||b.push({command:"setLight",args:[h.light]}),Mt(M.terrain,h.terrain)||b.push({command:"setTerrain",args:[h.terrain]}),Mt(M.sky,h.sky)||b.push({command:"setSky",args:[h.sky]}),Mt(M.projection,h.projection)||b.push({command:"setProjection",args:[h.projection]});let D={},z=[];(function(X,Z,re,Q){let he;for(he in Z=Z||{},X=X||{})Object.prototype.hasOwnProperty.call(X,he)&&(Object.prototype.hasOwnProperty.call(Z,he)||kt(he,re,Q));for(he in Z)Object.prototype.hasOwnProperty.call(Z,he)&&(Object.prototype.hasOwnProperty.call(X,he)?Mt(X[he],Z[he])||(X[he].type==="geojson"&&Z[he].type==="geojson"&&pr(X,Z,he)?Lt(re,{command:"setGeoJSONSourceData",args:[he,Z[he].data]}):rr(he,Z,re,Q)):ft(he,Z,re))})(M.sources,h.sources,z,D);let G=[];M.layers&&M.layers.forEach((X=>{"source"in X&&D[X.source]?b.push({command:"removeLayer",args:[X.id]}):G.push(X)})),b=b.concat(z),(function(X,Z,re){Z=Z||[];let Q=(X=X||[]).map(Nr),he=Z.map(Nr),oe=X.reduce(dn,{}),ke=Z.reduce(dn,{}),ge=Q.slice(),Ue=Object.create(null),je,dt,gt,It,_t;for(let qt=0,tr=0;qtx?(z=Math.acos(G),X=Math.sin(z),Z=Math.sin((1-D)*z)/X,re=Math.sin(D*z)/X):(Z=1-D,re=D),M[0]=Z*Q+re*ge,M[1]=Z*he+re*Ue,M[2]=Z*oe+re*je,M[3]=Z*ke+re*dt,M},a.bm=function(M){let h=new Float64Array(9);var b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,dt,gt,It,_t;oe=(z=(D=M)[0])*(re=z+z),ke=(G=D[1])*re,Ue=(X=D[2])*re,je=X*(Q=G+G),gt=(Z=D[3])*re,It=Z*Q,_t=Z*(he=X+X),(b=h)[0]=1-(ge=G*Q)-(dt=X*he),b[3]=ke-_t,b[6]=Ue+It,b[1]=ke+_t,b[4]=1-oe-dt,b[7]=je-gt,b[2]=Ue-It,b[5]=je+gt,b[8]=1-oe-ge;let qt=we(-Math.asin(ue(h[2],-1,1))),tr,lr;return Math.hypot(h[5],h[8])<.001?(tr=0,lr=-we(Math.atan2(h[3],h[4]))):(tr=we(h[5]===0&&h[8]===0?0:Math.atan2(h[5],h[8])),lr=we(h[1]===0&&h[0]===0?0:Math.atan2(h[1],h[0]))),{roll:tr,pitch:qt+90,bearing:lr}},a.bn=function(M,h){return M.roll==h.roll&&M.pitch==h.pitch&&M.bearing==h.bearing},a.bo=ii,a.bp=ca,a.bq=V_,a.br=f4,a.bs=U_,a.bt=ee,a.bu=ce,a.bv=oo,a.bw=function(M,h,b,D,z){return ee(D,z,ue((M-h)/(b-h),0,1))},a.bx=function(M,h,b,D){return M[0]=h[0]+b[0]*D,M[1]=h[1]+b[1]*D,M[2]=h[2]+b[2]*D,M},a.by=K,a.bz=function(){return new Float64Array(3)},a.c=rt,a.c$=vh,a.c0=class extends Ki{constructor(M,h){super(M,h),this.current=Ss}set(M){if(M[12]!==this.current[12]||M[0]!==this.current[0])return this.current=M,void this.gl.uniformMatrix4fv(this.location,!1,M);for(let h=1;h<16;h++)if(M[h]!==this.current[h]){this.current=M,this.gl.uniformMatrix4fv(this.location,!1,M);break}}},a.c1=Ia,a.c2=class extends Ki{constructor(M,h){super(M,h),this.current=[0,0,0]}set(M){M[0]===this.current[0]&&M[1]===this.current[1]&&M[2]===this.current[2]||(this.current=M,this.gl.uniform3f(this.location,M[0],M[1],M[2]))}},a.c3=class extends Ki{constructor(M,h){super(M,h),this.current=[0,0]}set(M){M[0]===this.current[0]&&M[1]===this.current[1]||(this.current=M,this.gl.uniform2f(this.location,M[0],M[1]))}},a.c4=C,a.c5=function(M,h){var b=Math.sin(h),D=Math.cos(h);return M[0]=D,M[1]=b,M[2]=0,M[3]=-b,M[4]=D,M[5]=0,M[6]=0,M[7]=0,M[8]=1,M},a.c6=function(M,h,b){var D=h[0],z=h[1],G=h[2];return M[0]=D*b[0]+z*b[3]+G*b[6],M[1]=D*b[1]+z*b[4]+G*b[7],M[2]=D*b[2]+z*b[5]+G*b[8],M},a.c7=function(M,h,b,D,z,G,X){var Z=1/(h-b),re=1/(D-z),Q=1/(G-X);return M[0]=-2*Z,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=-2*re,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=2*Q,M[11]=0,M[12]=(h+b)*Z,M[13]=(z+D)*re,M[14]=(X+G)*Q,M[15]=1,M},a.c8=class extends Ki{constructor(M,h){super(M,h),this.current=new Array}set(M){if(M!=this.current){this.current=M;let h=new Float32Array(4*M.length);for(let b=0;b25||D<0||D>=1||b<0||b>=1)},a.cE=function(M,h){return M[0]=h[0],M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=h[1],M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=h[2],M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M},a.cF=class extends vt{},a.cG=mt,a.cH=function(M,h){rt.REGISTERED_PROTOCOLS[M]=h},a.cI=function(M){delete rt.REGISTERED_PROTOCOLS[M]},a.cJ=function(M,h){let b={};for(let z=0;zei*Rc))}let Dn=re?"center":z.get("text-justify").evaluate(oe,{},M.canonical),Hn=z.get("symbol-placement")==="point"?z.get("text-max-width").evaluate(oe,{},M.canonical)*Rc:1/0,Ln=()=>{M.bucket.allowVerticalPlacement&&Zt(lr)&&(dt.vertical=qS(gt,M.glyphMap,M.glyphPositions,M.imagePositions,ke,Hn,Z,_n,"left",jr,_t,a.ax.vertical,!0,Ue,ge))};if(!re&&fn){let un=new Set;if(Dn==="auto")for(let ci=0;ciZit(Z,re,G)),D.layers[X])})(M,b,h),b.finish()},a.cT=function(M,h,b,D,z,G){let X=ate(M,h,b,z,0);return X=ate(X,h,D,G,1),X},a.cU=class{constructor(M){this.maxEntries=M,this.map=new Map}get(M){let h=this.map.get(M);return h!==void 0&&(this.map.delete(M),this.map.set(M,h)),h}set(M,h){if(this.map.has(M))this.map.delete(M);else if(this.map.size>=this.maxEntries){let b=this.map.keys().next().value;this.map.delete(b)}this.map.set(M,h)}clear(){this.map.clear()}},a.cV=CQ,a.cW=zS,a.cX=ete,a.cY=function(M,h,b,D,z){return i(this,void 0,void 0,(function*(){if(_())try{return yield Oe(M,h,b,D,z)}catch(G){}return(function(G,X,Z,re,Q){let he=G.width,oe=G.height;ze&&ut||(ze=new OffscreenCanvas(he,oe),ut=ze.getContext("2d",{willReadFrequently:!0})),ze.width=he,ze.height=oe,ut.drawImage(G,0,0,he,oe);let ke=ut.getImageData(X,Z,re,Q);return ut.clearRect(0,0,he,oe),ke.data})(M,h,b,D,z)}))},a.cZ=mQ,a.c_=class{constructor(M,h){this.layers={[w4]:this},this.name=w4,this.version=h?h.version:1,this.extent=h?h.extent:4096,this.length=M.length,this.features=M}feature(M){return new Xit(this.features[M],this.extent)}},a.ca=class extends Ar{},a.cb=Wnt,a.cc=class extends zn{},a.cd=Xh,a.ce=function(M){return M<=1?1:Math.pow(2,Math.ceil(Math.log(M)/Math.LN2))},a.cf=Gv,a.cg=function(M,h,b){var D=h[0],z=h[1],G=h[2],X=b[3]*D+b[7]*z+b[11]*G+b[15];return M[0]=(b[0]*D+b[4]*z+b[8]*G+b[12])/(X=X||1),M[1]=(b[1]*D+b[5]*z+b[9]*G+b[13])/X,M[2]=(b[2]*D+b[6]*z+b[10]*G+b[14])/X,M},a.ch=class extends Ft{},a.ci=class extends d{},a.cj=function(M,h){return M[0]===h[0]&&M[1]===h[1]&&M[2]===h[2]&&M[3]===h[3]&&M[4]===h[4]&&M[5]===h[5]&&M[6]===h[6]&&M[7]===h[7]&&M[8]===h[8]&&M[9]===h[9]&&M[10]===h[10]&&M[11]===h[11]&&M[12]===h[12]&&M[13]===h[13]&&M[14]===h[14]&&M[15]===h[15]},a.ck=function(M,h){var b=M[0],D=M[1],z=M[2],G=M[3],X=M[4],Z=M[5],re=M[6],Q=M[7],he=M[8],oe=M[9],ke=M[10],ge=M[11],Ue=M[12],je=M[13],dt=M[14],gt=M[15],It=h[0],_t=h[1],qt=h[2],tr=h[3],lr=h[4],qr=h[5],jr=h[6],_n=h[7],fn=h[8],Dn=h[9],Hn=h[10],Ln=h[11],un=h[12],ei=h[13],ci=h[14],ti=h[15];return Math.abs(b-It)<=x*Math.max(1,Math.abs(b),Math.abs(It))&&Math.abs(D-_t)<=x*Math.max(1,Math.abs(D),Math.abs(_t))&&Math.abs(z-qt)<=x*Math.max(1,Math.abs(z),Math.abs(qt))&&Math.abs(G-tr)<=x*Math.max(1,Math.abs(G),Math.abs(tr))&&Math.abs(X-lr)<=x*Math.max(1,Math.abs(X),Math.abs(lr))&&Math.abs(Z-qr)<=x*Math.max(1,Math.abs(Z),Math.abs(qr))&&Math.abs(re-jr)<=x*Math.max(1,Math.abs(re),Math.abs(jr))&&Math.abs(Q-_n)<=x*Math.max(1,Math.abs(Q),Math.abs(_n))&&Math.abs(he-fn)<=x*Math.max(1,Math.abs(he),Math.abs(fn))&&Math.abs(oe-Dn)<=x*Math.max(1,Math.abs(oe),Math.abs(Dn))&&Math.abs(ke-Hn)<=x*Math.max(1,Math.abs(ke),Math.abs(Hn))&&Math.abs(ge-Ln)<=x*Math.max(1,Math.abs(ge),Math.abs(Ln))&&Math.abs(Ue-un)<=x*Math.max(1,Math.abs(Ue),Math.abs(un))&&Math.abs(je-ei)<=x*Math.max(1,Math.abs(je),Math.abs(ei))&&Math.abs(dt-ci)<=x*Math.max(1,Math.abs(dt),Math.abs(ci))&&Math.abs(gt-ti)<=x*Math.max(1,Math.abs(gt),Math.abs(ti))},a.cl=function(M,h){return M[0]=h[0],M[1]=h[1],M[2]=h[2],M[3]=h[3],M[4]=h[4],M[5]=h[5],M[6]=h[6],M[7]=h[7],M[8]=h[8],M[9]=h[9],M[10]=h[10],M[11]=h[11],M[12]=h[12],M[13]=h[13],M[14]=h[14],M[15]=h[15],M},a.cm=M=>M.type==="circle",a.cn=M=>M.type==="heatmap",a.co=M=>M.type==="line",a.cp=M=>M.type==="fill",a.cq=M=>M.type==="fill-extrusion",a.cr=M=>M.type==="hillshade",a.cs=M=>M.type==="color-relief",a.ct=M=>M.type==="background",a.cu=M=>M.type==="custom",a.cv=me,a.cw=function(M,h,b){if(h<=0)return M;let D=1/h;return b===void 0||Math.abs(b)<1e-10?Math.round(M*D)/D:(b>0?Math.ceil(M*D-1e-9):Math.floor(M*D+1e-10))/D},a.cx=function(M,h,b){let D=U(h.x-b.x,h.y-b.y),z=U(M.x-b.x,M.y-b.y);var G,X;return we(Math.atan2(D[0]*z[1]-D[1]*z[0],(G=D)[0]*(X=z)[0]+G[1]*X[1]))},a.cy=ye,a.cz=function(M,h){var b;if(!Ke[h])return!1;let D=M==null?void 0:M.target,z=((b=D==null?void 0:D.ownerDocument)===null||b===void 0?void 0:b.defaultView)||window;return M instanceof z.MouseEvent||M instanceof z.WheelEvent},a.d=V,a.d0=class{constructor(M,h){let b=(h=this.options=Object.assign({},Int,h)).debug;if(b&&console.time("preprocess data"),h.maxZoom<0||h.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(h.promoteId&&h.generateId)throw new Error("promoteId and generateId cannot be used together.");let D=KR(M,h);b&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",h.indexMaxZoom,h.indexMaxPoints),console.time("generate tiles")),D=tI(D,h),h.updateable&&(this.source=D),this.initializeIndex(D,h)}initializeIndex(M,h){this.tileIndex=h.cluster?new knt(h.clusterOptions):new Rnt(h),M.length&&this.tileIndex.initialize(M)}getTile(M,h,b){return h=+h,b=+b,(M=+M)<0||M>24?null:this.tileIndex.getTile(M,h,b)}updateData(M,h){let b=this.options;if(!b.updateable)throw new Error("to update tile geojson `updateable` option must be set to true");let{affected:D,source:z}=(function(G,X,Z){let re=(function(he,oe){var ke,ge;return he?{removeAll:he.removeAll,remove:new Set(he.remove||[]),add:new Map((ke=he.add)==null?void 0:ke.map((Ue=>[oe.promoteId?Ue.properties[oe.promoteId]:Ue.id,Ue]))),update:new Map((ge=he.update)==null?void 0:ge.map((Ue=>[Ue.id,Ue])))}:{remove:new Set,add:new Map,update:new Map}})(X,Z),Q=[];if(re.removeAll&&(Q=G,G=[]),re.remove.size||re.add.size){let he=[];for(let oe of G)(re.remove.has(oe.id)||re.add.has(oe.id))&&he.push(oe);if(he.length){Q.push(...he);let oe=new Set(he.map((ke=>ke.id)));G=G.filter((ke=>!oe.has(ke.id)))}if(re.add.size){let oe=KR({type:"FeatureCollection",features:Array.from(re.add.values())},Z);oe=tI(oe,Z),Q.push(...oe),G.push(...oe)}}if(re.update.size){let he=new Map,oe=[];for(let ke of G)re.update.has(ke.id)?he.set(ke.id,[...he.get(ke.id)||[],ke]):oe.push(ke);for(let[ke,ge]of re.update){let Ue=he.get(ke);if(!Ue||Ue.length===0)continue;let je=Ent(Ue,ge,Z);Q.push(...Ue,...je),oe.push(...je)}G=oe}return{affected:Q,source:G}})(this.source,M,b);h&&({affected:D,source:z}=this.filterUpdate(z,D,h)),D.length&&(this.source=z,this.tileIndex.updateIndex(z,D,b))}filterUpdate(M,h,b){let D=new Set;for(let z of M)z.id!=null&&(b(FS(z))||(h.push(z),D.add(z.id)));return{affected:h,source:M=M.filter((z=>!D.has(z.id)))}}getData(){if(!this.options.updateable)throw new Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map((M=>FS(M)))}}updateClusterOptions(M,h){let b=this.options.cluster;this.options.cluster=M,this.options.clusterOptions=h,b!=M?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(M){return this.tileIndex.getClusterExpansionZoom(M)}getClusterChildren(M){return this.tileIndex.getChildren(M)}getClusterLeaves(M,h,b){return this.tileIndex.getLeaves(M,h,b)}},a.d1=Bi,a.e=_e,a.f=jt,a.g=it,a.h=M=>i(void 0,void 0,void 0,(function*(){if(M.byteLength===0)return createImageBitmap(new ImageData(1,1));let h=new Blob([new Uint8Array(M)],{type:"image/png"});try{return createImageBitmap(h)}catch(b){throw new Error(`Could not load image because of ${V(b).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),a.i=De,a.j=M=>new Promise(((h,b)=>{let D=new Image;D.onload=()=>{h(D),URL.revokeObjectURL(D.src),D.onload=null,window.requestAnimationFrame((()=>D.src=tt))},D.onerror=()=>b(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let z=new Blob([new Uint8Array(M)],{type:"image/png"});D.src=M.byteLength?URL.createObjectURL(z):tt})),a.k=(M,h)=>Yt(_e(M,{type:"json"}),h),a.l=Ot,a.m=Yt,a.n=fr,a.o=(M,h)=>Yt(_e(M,{type:"arrayBuffer"}),h),a.p=aee,a.q=function(M){return new zS(M).readFields(sit,[])},a.r=function(M){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(M))},a.s=et,a.t=Dc,a.u=ms,a.v=Bf,a.w=xe,a.x=Ct,a.y=Ua,a.z=Xl})),r("worker",["./shared"],(function(a){"use strict";class i{constructor(T,A){this.keyCache={},T&&this.replace(T,A)}replace(T,A){this._layerConfigs={},this._layers={},this.update(T,[],A)}update(T,A,m){for(let E of T){this._layerConfigs[E.id]=E;let I=this._layers[E.id]=a.bT(E,m);I._featureFilter=a.ah(I.filter,m),this.keyCache[E.id]&&delete this.keyCache[E.id]}for(let E of A)delete this.keyCache[E],delete this._layerConfigs[E],delete this._layers[E];this.familiesBySource={};let F=a.cJ(Object.values(this._layerConfigs),this.keyCache);for(let E of F){let I=E.map((q=>this._layers[q.id])),R=I[0];if(R.isHidden())continue;let B=R.source||"",O=this.familiesBySource[B];O||(O=this.familiesBySource[B]={});let U=R.sourceLayer||a.ag,j=O[U];j||(j=O[U]=[]),j.push(I)}}}class o{constructor(T){let A={},m=[];for(let R in T){let B=T[R],O=A[R]={};for(let U in B){let j=B[+U];if(!j||j.bitmap.width===0||j.bitmap.height===0)continue;let q={x:0,y:0,w:j.bitmap.width+2,h:j.bitmap.height+2};m.push(q),O[U]={rect:q,metrics:j.metrics}}}let{w:F,h:E}=a.p(m),I=new a.t({width:F||1,height:E||1});for(let R in T){let B=T[R];for(let O in B){let U=B[+O];if(!U||U.bitmap.width===0||U.bitmap.height===0)continue;let j=A[R][O].rect;a.t.copy(U.bitmap,I,{x:0,y:0},{x:j.x+1,y:j.y+1},U.bitmap)}}this.image=I,this.positions=A}}a.cK("GlyphAtlas",o);class s{constructor(T){this.tileID=new a.a3(T.tileID.overscaledZ,T.tileID.wrap,T.tileID.canonical.z,T.tileID.canonical.x,T.tileID.canonical.y),this.uid=T.uid,this.zoom=T.zoom,this.pixelRatio=T.pixelRatio,this.tileSize=T.tileSize,this.source=T.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=T.showCollisionBoxes,this.collectResourceTiming=!!T.collectResourceTiming,this.returnDependencies=!!T.returnDependencies,this.promoteId=T.promoteId,this.inFlightDependencies=[]}parse(T,A,m,F,E){return a._(this,void 0,void 0,(function*(){this.status="parsing",this.data=T,this.collisionBoxArray=new a.ae;let I=new a.cL(Object.keys(T.layers).sort()),R=new a.cM(this.tileID,this.promoteId);R.bucketLayerIDs=[];let B={},O={featureIndex:R,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:m,subdivisionGranularity:E},U=A.familiesBySource[this.source];for(let ie in U){let le=T.layers[ie];if(!le)continue;le.version===1&&a.w(`Vector tile source "${this.source}" layer "${ie}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let xe=I.encode(ie),be=[];for(let De=0;Dept.id))))}}let j=a.bY(O.glyphDependencies,(ie=>Object.keys(ie).map(Number)));for(let ie of this.inFlightDependencies)ie==null||ie.abort();this.inFlightDependencies=[];let q=Promise.resolve({});if(Object.keys(j).length){let ie=new AbortController;this.inFlightDependencies.push(ie),q=F.sendAsync({type:"GG",data:{stacks:j,source:this.source,tileID:this.tileID,type:"glyphs"}},ie)}let V=Object.keys(O.iconDependencies),K=Promise.resolve({});if(V.length){let ie=new AbortController;this.inFlightDependencies.push(ie),K=F.sendAsync({type:"GI",data:{icons:V,source:this.source,tileID:this.tileID,type:"icons"}},ie)}let ee=Object.keys(O.patternDependencies),ce=Promise.resolve({});if(ee.length){let ie=new AbortController;this.inFlightDependencies.push(ie),ce=F.sendAsync({type:"GI",data:{icons:ee,source:this.source,tileID:this.tileID,type:"patterns"}},ie)}let me=O.dashDependencies,ye=Promise.resolve({});if(Object.keys(me).length){let ie=new AbortController;this.inFlightDependencies.push(ie),ye=F.sendAsync({type:"GDA",data:{dashes:me}},ie)}let[ue,J,_e,ne]=yield Promise.all([q,K,ce,ye]),ae=new o(ue),pe=new a.cN(J,_e);for(let ie in B){let le=B[ie];le instanceof a.af?(l(le.layers,this.zoom,m),a.cO({bucket:le,glyphMap:ue,glyphPositions:ae.positions,imageMap:J,imagePositions:pe.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:O.subdivisionGranularity})):le.hasDependencies&&(le instanceof a.cP||le instanceof a.cQ||le instanceof a.cR)&&(l(le.layers,this.zoom,m),le.addFeatures(O,this.tileID.canonical,pe.patternPositions,ne))}return this.status="done",{buckets:Object.values(B).filter((ie=>!ie.isEmpty())),featureIndex:R,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ae.image,imageAtlas:pe,dashPositions:ne,glyphMap:this.returnDependencies?ue:null,iconMap:this.returnDependencies?J:null,glyphPositions:this.returnDependencies?ae.positions:null}}))}}function l(w,T,A){let m=new a.J(T);for(let F of w)F.recalculate(m,A)}class u{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(T,A){this.loading[T]=A}finishLoading(T){delete this.loading[T]}abort(T){let A=this.loading[T];A!=null&&A.abort&&(A.abort.abort(),delete this.loading[T])}setParsing(T,A){this.parsing[T]=A}consumeParsing(T){let A=this.parsing[T];if(A)return delete this.parsing[T],A}clearParsing(T){delete this.parsing[T]}markLoaded(T,A){this.loaded[T]=A}getLoaded(T){let A=this.loaded[T];if(A)return A}removeLoaded(T){delete this.loaded[T]}clearLoaded(){this.loaded={}}}class c{constructor(T){this.start=`${T}#start`,this.end=`${T}#end`,this.measure=T,performance.mark(this.start)}finish(){performance.mark(this.end);let T=performance.getEntriesByName(this.measure);return T.length===0&&(performance.measure(this.measure,this.start,this.end),T=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),T}}class f{constructor(T,A,m,F,E){this.type=T,this.properties=m||{},this.extent=E,this.pointsArray=A,this.id=F}loadGeometry(){return this.pointsArray.map((T=>T.map((A=>new a.P(A.x,A.y)))))}}class v{constructor(T,A,m){this.version=2,this._myFeatures=T,this.name=A,this.length=T.length,this.extent=m}feature(T){return this._myFeatures[T]}}class g{constructor(){this.layers={}}addLayer(T){this.layers[T.name]=T}}function p(w){let T=a.cS(w);return T.byteOffset===0&&T.byteLength===T.buffer.byteLength||(T=new Uint8Array(T)),{vectorTile:w,rawData:T.buffer}}function _(w,T,A){let{extent:m}=w,F=Math.pow(2,A.z-T.z),E=(A.x-T.x*F)*m,I=(A.y-T.y*F)*m,R=[];for(let B=0;B0&&U.addLayer(ee)}let q=p(U);return this.overzoomedTileResultCache.set(B,q),q}reloadTile(T){return a._(this,void 0,void 0,(function*(){let A=T.uid,m=this.tileState.getLoaded(A);if(!m)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(m.showCollisionBoxes=T.showCollisionBoxes,m.status==="parsing"){let F=this.tileState.consumeParsing(A);return yield this._parseWorkerTile(m,T,F)}if(m.status==="done"&&m.vectorTile)return yield this._parseWorkerTile(m,T)}))}abortTile(T){return a._(this,void 0,void 0,(function*(){this.tileState.abort(T.uid)}))}removeTile(T){return a._(this,void 0,void 0,(function*(){this.tileState.removeLoaded(T.uid)}))}}class y{constructor(){this.loaded={}}loadTile(T){return a._(this,void 0,void 0,(function*(){let{uid:A,encoding:m,rawImageData:F,redFactor:E,greenFactor:I,blueFactor:R,baseShift:B}=T,O=F.width+2,U=F.height+2,j=a.b(F)?new a.R({width:O,height:U},yield a.cY(F,-1,-1,O,U)):F,q=new a.cZ(A,j,m,E,I,R,B);return this.loaded||(this.loaded={}),this.loaded[A]=q,q}))}removeTile(T){let A=this.loaded,m=T.uid;A!=null&&A[m]&&delete A[m]}}class C{constructor(T,A,m,F=k){this.actor=T,this.layerIndex=A,this.availableImages=m,this.tileState=new u,this._createGeoJSONIndex=F}loadVectorTile(T){if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let{z:A,x:m,y:F}=T.tileID.canonical,E=this._geoJSONIndex.getTile(A,m,F);return E?p(new a.c_(E.features,{version:2,extent:a.a6})):null}loadTile(T){return a._(this,void 0,void 0,(function*(){let{uid:A}=T,m=new s(T);m.abort=new AbortController;try{let F=this.loadVectorTile(T);if(!F)return null;let{vectorTile:E,rawData:I}=F;m.vectorTile=E,this.tileState.markLoaded(A,m);let R={rawData:I};this.tileState.setParsing(A,R);try{return yield this._parseWorkerTile(m,T,R)}finally{this.tileState.clearParsing(A)}}catch(F){throw m.status="done",this.tileState.markLoaded(A,m),F}}))}_reloadLoadedTile(T){return a._(this,void 0,void 0,(function*(){let A=T.uid,m=this.tileState.getLoaded(A);if(!m)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(m.showCollisionBoxes=T.showCollisionBoxes,m.status==="parsing"){let F=this.tileState.consumeParsing(A);return yield this._parseWorkerTile(m,T,F)}if(m.status==="done"&&m.vectorTile)return yield this._parseWorkerTile(m,T)}))}_parseWorkerTile(T,A,m){return a._(this,void 0,void 0,(function*(){let F=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,A.subdivisionGranularity);if(m){let{rawData:E}=m;F=a.e({rawTileData:E.slice(0),encoding:"mvt"},F)}return F}))}abortTile(T){return a._(this,void 0,void 0,(function*(){this.tileState.abort(T.uid)}))}removeTile(T){return a._(this,void 0,void 0,(function*(){this.tileState.removeLoaded(T.uid)}))}loadData(T){return a._(this,void 0,void 0,(function*(){var A;(A=this._pendingRequest)===null||A===void 0||A.abort();let m=this._startRequestTiming(T);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(T,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let F={};return T.request&&(F.data=T.data),this._finishRequestTiming(m,T,F),F}catch(F){if(delete this._pendingRequest,!a.$(F))throw F;return{abandoned:!0}}}))}_startRequestTiming(T){var A;if(!((A=T.request)===null||A===void 0)&&A.collectResourceTiming)return new c(T.request.url)}_finishRequestTiming(T,A,m){let F=T==null?void 0:T.finish();F&&(m.resourceTiming={[A.source]:JSON.parse(JSON.stringify(F))})}reloadTile(T){return this.tileState.getLoaded(T.uid)?this._reloadLoadedTile(T):this.loadTile(T)}loadAndProcessGeoJSON(T,A){return a._(this,void 0,void 0,(function*(){var m;if(T.request&&(T.data=(yield a.k(T.request,A)).data),T.data)return T.data=this._filterGeoJSON(T.data,T.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(T.data,T));if(T.dataDiff)return(m=this._geoJSONIndex)!==null&&m!==void 0||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},T)),void this._geoJSONIndex.updateData(T.dataDiff,this._getFilterPredicate(T.filter));if(T.updateCluster&&this._geoJSONIndex.updateClusterOptions(T.geojsonVtOptions.cluster,S(T)),this._geoJSONIndex==null)throw new Error(`Input data given to '${T.source}' is not a valid GeoJSON object.`)}))}_filterGeoJSON(T,A){if(T.type!=="FeatureCollection")return T;let m=this._getFilterPredicate(A);return m?{type:"FeatureCollection",features:T.features.filter((F=>m(F)))}:T}_getFilterPredicate(T){if(typeof T!="boolean"&&!(T!=null&&T.length))return;let A=a.c$(T,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(A.result==="error")throw new Error(A.value.map((m=>`${m.key}: ${m.message}`)).join(", "));return m=>A.value.evaluate({zoom:0},m)}removeSource(T){return a._(this,void 0,void 0,(function*(){var A;(A=this._pendingRequest)===null||A===void 0||A.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 k(w,T){let A=a.e(T.geojsonVtOptions||{},{updateable:!0,clusterOptions:S(T)});return new a.d0(w,A)}function S({geojsonVtOptions:w,clusterProperties:T}){if(!T||!w.clusterOptions)return w.clusterOptions;let A={},m={},F={accumulated:null,zoom:0},E={properties:null},I=Object.keys(T);for(let R of I){let[B,O]=T[R],U=a.c$(O),j=a.c$(typeof B=="string"?[B,["accumulated"],["get",R]]:B);A[R]=U.value,m[R]=j.value}return w.clusterOptions.map=R=>{E.properties=R;let B={};for(let O of I)B[O]=A[O].evaluate(F,E);return B},w.clusterOptions.reduce=(R,B)=>{E.properties=B;for(let O of I)F.accumulated=R[O],R[O]=m[O].evaluate(F,E)},w.clusterOptions}class L{constructor(T){this.self=T,this.actor=new a.N(T),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(A,m)=>{if(this.externalWorkerSourceTypes[A])throw new Error(`Worker source with name "${A}" already registered.`);this.externalWorkerSourceTypes[A]=m},this.self.addProtocol=a.cH,this.self.removeProtocol=a.cI,this.self.registerRTLTextPlugin=A=>{a.d1.setMethods(A)},this.self.makeRequest=a.m,this.actor.registerMessageHandler("LDT",((A,m)=>this._getDEMWorkerSource(A,m.source).loadTile(m))),this.actor.registerMessageHandler("RDT",((A,m)=>a._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(A,m.source).removeTile(m)})))),this.actor.registerMessageHandler("GCEZ",((A,m)=>a._(this,void 0,void 0,(function*(){return this._getWorkerSource(A,m.type,m.source).getClusterExpansionZoom(m)})))),this.actor.registerMessageHandler("GCC",((A,m)=>a._(this,void 0,void 0,(function*(){return this._getWorkerSource(A,m.type,m.source).getClusterChildren(m)})))),this.actor.registerMessageHandler("GCL",((A,m)=>a._(this,void 0,void 0,(function*(){return this._getWorkerSource(A,m.type,m.source).getClusterLeaves(m)})))),this.actor.registerMessageHandler("LD",((A,m)=>this._getWorkerSource(A,m.type,m.source).loadData(m))),this.actor.registerMessageHandler("LT",((A,m)=>this._getWorkerSource(A,m.type,m.source).loadTile(m))),this.actor.registerMessageHandler("RT",((A,m)=>this._getWorkerSource(A,m.type,m.source).reloadTile(m))),this.actor.registerMessageHandler("AT",((A,m)=>this._getWorkerSource(A,m.type,m.source).abortTile(m))),this.actor.registerMessageHandler("RMT",((A,m)=>this._getWorkerSource(A,m.type,m.source).removeTile(m))),this.actor.registerMessageHandler("RS",((A,m)=>a._(this,void 0,void 0,(function*(){var F,E;if(!(!((E=(F=this.workerSources[A])===null||F===void 0?void 0:F[m.type])===null||E===void 0)&&E[m.source]))return;let I=this.workerSources[A][m.type][m.source];delete this.workerSources[A][m.type][m.source],I.removeSource!==void 0&&I.removeSource(m)})))),this.actor.registerMessageHandler("RM",(A=>a._(this,void 0,void 0,(function*(){delete this.layerIndexes[A],delete this.availableImages[A],delete this.workerSources[A],delete this.demWorkerSources[A],this.globalStates.delete(A)})))),this.actor.registerMessageHandler("SR",((A,m)=>a._(this,void 0,void 0,(function*(){this.referrer=m})))),this.actor.registerMessageHandler("SRPS",((A,m)=>this._syncRTLPluginState(A,m))),this.actor.registerMessageHandler("IS",((A,m)=>a._(this,void 0,void 0,(function*(){this.self.importScripts(m)})))),this.actor.registerMessageHandler("SI",((A,m)=>this._setImages(A,m))),this.actor.registerMessageHandler("UL",((A,m)=>a._(this,void 0,void 0,(function*(){this._getLayerIndex(A).update(m.layers,m.removedIds,this._getGlobalState(A))})))),this.actor.registerMessageHandler("UGS",((A,m)=>a._(this,void 0,void 0,(function*(){let F=this._getGlobalState(A);for(let E in m)F[E]=m[E]})))),this.actor.registerMessageHandler("SL",((A,m)=>a._(this,void 0,void 0,(function*(){this._getLayerIndex(A).replace(m,this._getGlobalState(A))}))))}_getGlobalState(T){let A=this.globalStates.get(T);return A||(A={},this.globalStates.set(T,A)),A}_setImages(T,A){return a._(this,void 0,void 0,(function*(){this.availableImages[T]=A;for(let m in this.workerSources[T]){let F=this.workerSources[T][m];for(let E in F)F[E].availableImages=A}}))}_syncRTLPluginState(T,A){return a._(this,void 0,void 0,(function*(){return yield a.d1.syncState(A,this.self.importScripts)}))}_getAvailableImages(T){let A=this.availableImages[T];return A||(A=[]),A}_getLayerIndex(T){let A=this.layerIndexes[T];return A||(A=this.layerIndexes[T]=new i),A}_getWorkerSource(T,A,m){var F,E;if((F=this.workerSources)[T]||(F[T]={}),(E=this.workerSources[T])[A]||(E[A]={}),!this.workerSources[T][A][m]){let I={sendAsync:(R,B)=>(R.targetMapId=T,this.actor.sendAsync(R,B))};switch(A){case"vector":this.workerSources[T][A][m]=new x(I,this._getLayerIndex(T),this._getAvailableImages(T));break;case"geojson":this.workerSources[T][A][m]=new C(I,this._getLayerIndex(T),this._getAvailableImages(T));break;default:this.workerSources[T][A][m]=new this.externalWorkerSourceTypes[A](I,this._getLayerIndex(T),this._getAvailableImages(T))}}return this.workerSources[T][A][m]}_getDEMWorkerSource(T,A){var m,F;return(m=this.demWorkerSources)[T]||(m[T]={}),(F=this.demWorkerSources[T])[A]||(F[A]=new y),this.demWorkerSources[T][A]}}return a.i(self)&&(self.worker=new L(self)),L})),r("index",["exports","./shared"],(function(a,i){"use strict";var o="5.24.0";function s(){var Y=new i.A(4);return i.A!=Float32Array&&(Y[1]=0,Y[2]=0),Y[0]=1,Y[3]=1,Y}let l,u,c,f={frame(Y,d,P,N){let H=N||window,$=H.requestAnimationFrame((de=>{se(),d(de)})),{unsubscribe:se}=i.s(Y.signal,"abort",(()=>{se(),H.cancelAnimationFrame($),P(new i.a(Y.signal.reason))}),!1)},frameAsync(Y,d){return new Promise(((P,N)=>{this.frame(Y,P,N,d)}))},getImageData(Y,d=0){return this.getImageCanvasContext(Y).getImageData(-d,-d,Y.width+2*d,Y.height+2*d)},getImageCanvasContext(Y){let d=window.document.createElement("canvas"),P=d.getContext("2d",{willReadFrequently:!0});if(!P)throw new Error("failed to create canvas 2d context");return d.width=Y.width,d.height=Y.height,P.drawImage(Y,0,0,Y.width,Y.height),P},resolveURL:Y=>(l||(l=document.createElement("a")),l.href=Y,l.href),hardwareConcurrency:typeof navigator!="undefined"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return c!==void 0?c:!!matchMedia&&(u!=null||(u=matchMedia("(prefers-reduced-motion: reduce)")),u.matches)},set prefersReducedMotion(Y){c=Y}},v=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt!==null?this._frozenAt:performance.now()}setNow(Y){this._frozenAt=Y}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};function g(){return v.getCurrentTime()}var p,_;class x{static create(d,P,N){let H=window.document.createElement(d);return P!==void 0&&(H.className=P),N&&N.appendChild(H),H}static createNS(d,P){return window.document.createElementNS(d,P)}static disableDrag(){x.docStyle&&x.selectProp&&(x.userSelect=x.docStyle[x.selectProp],x.docStyle[x.selectProp]="none")}static enableDrag(){x.docStyle&&x.selectProp&&(x.docStyle[x.selectProp]=x.userSelect)}static suppressClickInternal(d){d.preventDefault(),d.stopPropagation(),window.removeEventListener("click",x.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",x.suppressClickInternal,!0),window.setTimeout((()=>{window.removeEventListener("click",x.suppressClickInternal,!0)}),0)}static getScale(d){let P=d.getBoundingClientRect();return{x:P.width/d.offsetWidth||1,y:P.height/d.offsetHeight||1,boundingClientRect:P}}static getPoint(d,P,N){let H=P.boundingClientRect;return new i.P((N.clientX-H.left)/P.x-d.clientLeft,(N.clientY-H.top)/P.y-d.clientTop)}static mousePos(d,P){let N=x.getScale(d);return x.getPoint(d,N,P)}static touchPos(d,P){let N=[],H=x.getScale(d);for(let $ of P)N.push(x.getPoint(d,H,$));return N}static sanitize(d){let P=new DOMParser().parseFromString(d,"text/html").body||document.createElement("body"),N=P.querySelectorAll("script");for(let H of N)H.remove();return x.clean(P),P.innerHTML}static isPossiblyDangerous(d,P){let N=P.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(d)||!N.includes("javascript:")&&!N.includes("data:"))||!!d.startsWith("on")||void 0}static clean(d){let P=d.children;for(let N of P)x.removeAttributes(N),x.clean(N)}static removeAttributes(d){for(let{name:P,value:N}of d.attributes)x.isPossiblyDangerous(P,N)&&d.removeAttribute(P)}}x.docStyle=typeof window!="undefined"&&((p=window.document)===null||p===void 0?void 0:p.documentElement.style),x.selectProp=!x.docStyle||"userSelect"in x.docStyle?"userSelect":"webkitUserSelect",(function(Y){let d,P,N,H;Y.resetRequestQueue=()=>{d=[],P=0,N=0,H={}},Y.addThrottleControl=Ae=>{let Fe=N++;return H[Fe]=Ae,Fe},Y.removeThrottleControl=Ae=>{delete H[Ae],se()},Y.getImage=(Ae,Fe,Ie=!0)=>new Promise(((Ye,st)=>{Ae.headers||(Ae.headers={}),Ae.headers.accept="image/webp,*/*",i.e(Ae,{type:"image"}),d.push({abortController:Fe,requestParameters:Ae,supportImageRefresh:Ie,state:"queued",onError:ht=>{st(ht)},onSuccess:ht=>{Ye(ht)}}),se()}));let $=Ae=>i._(this,void 0,void 0,(function*(){Ae.state="running";let{requestParameters:Fe,supportImageRefresh:Ie,onError:Ye,onSuccess:st,abortController:ht}=Ae,Pe=Ie===!1&&!i.i(self)&&!i.g(Fe.url)&&(!Fe.headers||Object.keys(Fe.headers).reduce(((xt,Et)=>xt&&Et==="accept"),!0));P++;let Xe=Pe?de(Fe,ht):i.m(Fe,ht);try{let xt=yield Xe;delete Ae.abortController,Ae.state="completed",xt.data instanceof HTMLImageElement||i.b(xt.data)?st(xt):xt.data&&st({data:yield(at=xt.data,typeof createImageBitmap=="function"?i.h(at):i.j(at)),cacheControl:xt.cacheControl,expires:xt.expires})}catch(xt){delete Ae.abortController,Ye(i.d(xt))}finally{P--,se()}var at})),se=()=>{let Ae=(()=>{for(let Fe of Object.keys(H))if(H[Fe]())return!0;return!1})()?i.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:i.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let Fe=P;Fe0;Fe++){let Ie=d.shift();Ie.abortController.signal.aborted?Fe--:$(Ie)}},de=(Ae,Fe)=>new Promise(((Ie,Ye)=>{let st=new Image,ht=Ae.url,Pe=Ae.credentials;Pe&&Pe==="include"?st.crossOrigin="use-credentials":(Pe&&Pe==="same-origin"||!i.f(ht))&&(st.crossOrigin="anonymous"),Fe.signal.addEventListener("abort",(()=>{st.src="",Ye(new i.a(Fe.signal.reason))})),st.fetchPriority="high",st.onload=()=>{st.onerror=st.onload=null,Ie({data:st})},st.onerror=()=>{st.onerror=st.onload=null,Fe.signal.aborted||Ye(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},st.src=ht}))})(_||(_={})),_.resetRequestQueue();class y{constructor(d){this._transformRequestFn=d!=null?d:null}transformRequest(d,P){return this._transformRequestFn&&this._transformRequestFn(d,P)||{url:d}}setTransformRequest(d){this._transformRequestFn=d}}function C(Y){let d=[];if(typeof Y=="string")d.push({id:"default",url:Y});else if(Y&&Y.length>0){let P=[];for(let{id:N,url:H}of Y){let $=`${N}${H}`;P.includes($)||(P.push($),d.push({id:N,url:H}))}}return d}function k(Y,d,P){try{let N=new URL(Y);return N.pathname+=`${d}${P}`,N.toString()}catch(N){throw new Error(`Invalid sprite URL "${Y}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function S(Y){let{userImage:d}=Y;return!(!(d!=null&&d.render)||!d.render()||(Y.data.replace(new Uint8Array(d.data.buffer)),0))}class L extends i.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.R({width:1,height:1}),this.dirty=!0}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(let d of Object.keys(this.images))this.removeImage(d);this.patterns={},this.atlasImage=new i.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(d){if(this.loaded!==d&&(this.loaded=d,d)){for(let{ids:P,promiseResolve:N}of this.requestors)N(this._getImagesForIds(P));this.requestors=[]}}getImage(d){let P=this.images[d];if(P&&!P.data&&P.spriteData){let N=P.spriteData;P.data=new i.R({width:N.width,height:N.height},N.context.getImageData(N.x,N.y,N.width,N.height).data),P.spriteData=null}return P}addImage(d,P){if(this.images[d])throw new Error(`Image id ${d} already exist, use updateImage instead`);this._validate(d,P)&&(this.images[d]=P)}_validate(d,P){let N=!0,H=P.data||P.spriteData;return this._validateStretch(P.stretchX,H==null?void 0:H.width)||(this.fire(new i.l(new Error(`Image "${d}" has invalid "stretchX" value`))),N=!1),this._validateStretch(P.stretchY,H==null?void 0:H.height)||(this.fire(new i.l(new Error(`Image "${d}" has invalid "stretchY" value`))),N=!1),this._validateContent(P.content,P)||(this.fire(new i.l(new Error(`Image "${d}" has invalid "content" value`))),N=!1),N}_validateStretch(d,P){if(!d)return!0;let N=0;for(let H of d){if(H[0]=d[1]))}updateImage(d,P,N=!0){let H=this.getImage(d);if(N&&(H.data.width!==P.data.width||H.data.height!==P.data.height))throw new Error(`size mismatch between old image (${H.data.width}x${H.data.height}) and new image (${P.data.width}x${P.data.height}).`);P.version=H.version+1,this.images[d]=P,this.updatedImages[d]=!0}removeImage(d){var P;let N=this.images[d];delete this.images[d],delete this.patterns[d],!((P=N.userImage)===null||P===void 0)&&P.onRemove&&N.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(d){return new Promise(((P,N)=>{let H=!0;if(!this.isLoaded())for(let $ of d)this.images[$]||(H=!1);this.isLoaded()||H?P(this._getImagesForIds(d)):this.requestors.push({ids:d,promiseResolve:P})}))}_getImagesForIds(d){var P;let N={};for(let H of d){let $=this.getImage(H);$||(this.fire(new i.n("styleimagemissing",{id:H})),$=this.getImage(H)),$?N[H]={data:$.data.clone(),pixelRatio:$.pixelRatio,sdf:$.sdf,version:$.version,stretchX:$.stretchX,stretchY:$.stretchY,content:$.content,textFitWidth:$.textFitWidth,textFitHeight:$.textFitHeight,hasRenderCallback:!!(!((P=$.userImage)===null||P===void 0)&&P.render)}:i.w(`Image "${H}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return N}getPixelSize(){let{width:d,height:P}=this.atlasImage;return{width:d,height:P}}getPattern(d){let P=this.patterns[d],N=this.getImage(d);if(!N)return null;if(P&&P.position.version===N.version)return P.position;if(P)P.position.version=N.version;else{let H={w:N.data.width+2,h:N.data.height+2,x:0,y:0},$=new i.I(H,N);this.patterns[d]={bin:H,position:$}}return this._updatePatternAtlas(),this.patterns[d].position}bind(d){let P=d.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new i.T(d,this.atlasImage,P.RGBA),this.atlasTexture.bind(P.LINEAR,P.CLAMP_TO_EDGE)}_updatePatternAtlas(){let d=[];for(let $ in this.patterns)d.push(this.patterns[$].bin);let{w:P,h:N}=i.p(d),H=this.atlasImage;H.resize({width:P||1,height:N||1});for(let $ in this.patterns){let{bin:se}=this.patterns[$],de=se.x+1,Ae=se.y+1,Fe=this.getImage($).data,Ie=Fe.width,Ye=Fe.height;i.R.copy(Fe,H,{x:0,y:0},{x:de,y:Ae},{width:Ie,height:Ye}),i.R.copy(Fe,H,{x:0,y:Ye-1},{x:de,y:Ae-1},{width:Ie,height:1}),i.R.copy(Fe,H,{x:0,y:0},{x:de,y:Ae+Ye},{width:Ie,height:1}),i.R.copy(Fe,H,{x:Ie-1,y:0},{x:de-1,y:Ae},{width:1,height:Ye}),i.R.copy(Fe,H,{x:0,y:0},{x:de+Ie,y:Ae},{width:1,height:Ye})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(d){for(let P of d){if(this.callbackDispatchedThisFrame[P])continue;this.callbackDispatchedThisFrame[P]=!0;let N=this.getImage(P);N||i.w(`Image with ID: "${P}" was not found`),S(N)&&this.updateImage(P,N)}}cloneImages(){let d={};for(let P in this.images){let N=this.images[P];d[P]=Object.assign(Object.assign({},N),{data:N.data?N.data.clone():null})}return d}}let w=1e20,T=new Float64Array(256);for(let Y=0;Y<256;Y++){let d=.5-Math.pow(Y/255,.45454545454545453);T[Y]=d*Math.abs(d)}function A(Y,d,P,N,H,$,se,de,Ae){for(let Fe=d;Fe-1);Ae++,$[Ae]=de,se[Ae]=Fe,se[Ae+1]=w}for(let de=0,Ae=0;de/[-\w]+/.test(H)?H:`'${CSS.escape(H)}'`)).join(",");return new E.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:N,fontWeight:this._fontWeight(P[0]),fontStyle:this._fontStyle(P[0]),lang:this.lang})}_fontStyle(d){return/italic/i.test(d)?"italic":/oblique/i.test(d)?"oblique":"normal"}_fontWeight(d){let P={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},N;for(let[H,$]of Object.entries(P))new RegExp(`\\b${H}\\b`,"i").test(d)&&(N=`${$}`);return N}destroy(){for(let d in this.entries){let P=this.entries[d];P.tinySDF=null,P.ideographTinySDF=null,P.glyphs={},P.requests={},P.ranges={}}this.entries={}}}E.loadGlyphRange=function(Y,d,P,N){return i._(this,void 0,void 0,(function*(){let H=256*d,$=H+255,se=yield N.transformRequest(P.replace("{fontstack}",Y).replace("{range}",`${H}-${$}`),"Glyphs"),de=yield i.o(se,new AbortController);if(!(de!=null&&de.data))throw new Error(`Could not load glyph range. range: ${d}, ${H}-${$}`);let Ae={};for(let Fe of i.q(de.data))Ae[Fe.id]=Fe;return Ae}))},E.TinySDF=class{constructor({fontSize:Y=24,buffer:d=3,radius:P=8,cutoff:N=.25,fontFamily:H="sans-serif",fontWeight:$="normal",fontStyle:se="normal",lang:de=null}={}){this.buffer=d,this.radius=P,this.cutoff=N,this.lang=de;let Ae=this.size=Y+4*d,Fe=this._createCanvas(Ae),Ie=this.ctx=Fe.getContext("2d",{willReadFrequently:!0});Ie.font=`${se} ${$} ${Y}px ${H}`,Ie.textBaseline="alphabetic",Ie.textAlign="left",Ie.fillStyle="black",this.gridOuter=new Float64Array(Ae*Ae),this.gridInner=new Float64Array(Ae*Ae),this.f=new Float64Array(Ae),this.z=new Float64Array(Ae+1),this.v=new Uint16Array(Ae)}_createCanvas(Y){if(typeof OffscreenCanvas!="undefined")return new OffscreenCanvas(Y,Y);let d=document.createElement("canvas");return d.width=d.height=Y,d}draw(Y){let{width:d,actualBoundingBoxAscent:P,actualBoundingBoxDescent:N,actualBoundingBoxLeft:H,actualBoundingBoxRight:$}=this.ctx.measureText(Y),se=Math.ceil(P),de=Math.floor(H),Ae=Math.max(0,Math.min(this.size-this.buffer,Math.ceil($)-de)),Fe=Math.max(0,Math.min(this.size-this.buffer,se+Math.ceil(N))),Ie=Ae+2*this.buffer,Ye=Fe+2*this.buffer,st=Math.max(Ie*Ye,0),ht=new Uint8ClampedArray(st),Pe={data:ht,width:Ie,height:Ye,glyphWidth:Ae,glyphHeight:Fe,glyphTop:se,glyphLeft:de,glyphAdvance:d};if(Ae===0||Fe===0)return Pe;let{ctx:Xe,buffer:at,gridInner:xt,gridOuter:Et}=this;this.lang&&(Xe.lang=this.lang),Xe.clearRect(at,at,Ae,Fe),Xe.fillText(Y,at-de,at+se);let Bt=Xe.getImageData(at,at,Ae,Fe);Et.fill(w,0,st),xt.fill(0,0,st);let St=3;for(let Ht=0;Ht1&&(Ae=d[++de]);let Ie=Math.abs(Fe-Ae.left),Ye=Math.abs(Fe-Ae.right),st=Math.min(Ie,Ye),ht,Pe=$/N*(H+1);if(Ae.isDash){let Xe=H-Math.abs(Pe);ht=Math.sqrt(st*st+Xe*Xe)}else ht=H-Math.sqrt(st*st+Pe*Pe);this.data[se+Fe]=Math.max(0,Math.min(255,ht+128))}}}addRegularDash(d){for(let de=d.length-1;de>=0;--de){let Ae=d[de],Fe=d[de+1];Ae.zeroLength?d.splice(de,1):Fe&&Fe.isDash===Ae.isDash&&(Fe.left=Ae.left,d.splice(de,1))}let P=d[0],N=d[d.length-1];P.isDash===N.isDash&&(P.left=N.left-this.width,N.right=P.right+this.width);let H=this.width*this.nextRow,$=0,se=d[$];for(let de=0;de1&&(se=d[++$]);let Ae=Math.abs(de-se.left),Fe=Math.abs(de-se.right),Ie=Math.min(Ae,Fe);this.data[H+de]=Math.max(0,Math.min(255,(se.isDash?Ie:-Ie)+128))}}addDash(d,P){let N=P?7:0,H=2*N+1;if(this.nextRow+H>this.height)return i.w("LineAtlas out of space"),null;let $=0;for(let de of d)$+=de;if($!==0){let de=this.width/$,Ae=this.getDashRanges(d,this.width,de);P?this.addRoundDash(Ae,de,N):this.addRegularDash(Ae)}let se={y:this.nextRow+N,height:2*N,width:$};return this.nextRow+=H,this.dirty=!0,se}bind(d){let P=d.gl;this.texture?(P.bindTexture(P.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,P.texSubImage2D(P.TEXTURE_2D,0,0,0,this.width,this.height,P.ALPHA,P.UNSIGNED_BYTE,this.data))):(this.texture=P.createTexture(),P.bindTexture(P.TEXTURE_2D,this.texture),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,P.REPEAT),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,P.REPEAT),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MIN_FILTER,P.LINEAR),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MAG_FILTER,P.LINEAR),P.texImage2D(P.TEXTURE_2D,0,P.ALPHA,this.width,this.height,0,P.ALPHA,P.UNSIGNED_BYTE,this.data))}}let q="maplibre_preloaded_worker_pool";class V{constructor(){this.active={}}acquire(d){if(!this.workers)for(this.workers=[];this.workers.lengthi.m(d,P)))),ce}function J(Y,d){let P=i.O();return i.Q(P,P,[1,1,0]),i.S(P,P,[.5*Y.width,.5*Y.height,1]),Y.calculatePosMatrix?i.U(P,P,Y.calculatePosMatrix(d.toUnwrapped())):P}function _e(Y,d,P,N,H,$,se){var de;let Ae=(function(st,ht,Pe){if(st)for(let Xe of st){let at=ht[Xe];if((at==null?void 0:at.source)===Pe&&at.type==="fill-extrusion")return!0}else for(let Xe in ht){let at=ht[Xe];if(at.source===Pe&&at.type==="fill-extrusion")return!0}return!1})((de=H==null?void 0:H.layers)!==null&&de!==void 0?de:null,d,Y.id),Fe=$.maxPitchScaleFactor(),Ie=Y.tilesIn(N,Fe,Ae);Ie.sort(ne);let Ye=[];for(let st of Ie)Ye.push({wrappedTileID:st.tileID.wrapped().key,queryResults:st.tile.queryRenderedFeatures(d,P,Y.getState(),st.queryGeometry,st.cameraQueryGeometry,st.scale,H,$,Fe,J($,st.tileID),se?(ht,Pe)=>se(st.tileID,ht,Pe):void 0)});return(function(st,ht){for(let Pe in st)for(let Xe of st[Pe])ae(Xe,ht);return st})((function(st){let ht={},Pe={};for(let{queryResults:Xe,wrappedTileID:at}of st){Pe[at]||(Pe[at]={});let xt=Pe[at];for(let Et in Xe){let Bt=Xe[Et];xt[Et]||(xt[Et]={});let St=xt[Et];ht[Et]||(ht[Et]=[]);for(let Pt of Bt)St[Pt.featureIndex]||(St[Pt.featureIndex]=!0,ht[Et].push(Pt))}}return ht})(Ye),Y)}function ne(Y,d){let P=Y.tileID,N=d.tileID;return P.overscaledZ-N.overscaledZ||P.canonical.y-N.canonical.y||P.wrap-N.wrap||P.canonical.x-N.canonical.x}function ae(Y,d){let P=Y.feature,N=d.getFeatureState(P.layer["source-layer"],P.id);P.source=P.layer.source,P.layer["source-layer"]&&(P.sourceLayer=P.layer["source-layer"]),P.state=N}function pe(Y,d,P,N){return i._(this,void 0,void 0,(function*(){let H=Y;if(Y.url?H=(yield i.k(yield d.transformRequest(Y.url,"Source"),P)).data:yield f.frameAsync(P,N),!H)return null;let $=i.V(i.e(H,Y),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in H&&H.vector_layers&&($.vectorLayerIds=H.vector_layers.map((se=>se.id))),$}))}class ie{constructor(d,P){d&&(P?this.setSouthWest(d).setNorthEast(P):Array.isArray(d)&&(d.length===4?this.setSouthWest([d[0],d[1]]).setNorthEast([d[2],d[3]]):this.setSouthWest(d[0]).setNorthEast(d[1])))}setNorthEast(d){return this._ne=d instanceof i.W?new i.W(d.lng,d.lat):i.W.convert(d),this}setSouthWest(d){return this._sw=d instanceof i.W?new i.W(d.lng,d.lat):i.W.convert(d),this}extend(d){let P=this._sw,N=this._ne,H,$;if(d instanceof i.W)H=d,$=d;else{if(!(d instanceof ie))return Array.isArray(d)?d.length===4||d.every(Array.isArray)?this.extend(ie.convert(d)):this.extend(i.W.convert(d)):d&&("lng"in d||"lon"in d)&&"lat"in d?this.extend(i.W.convert(d)):this;if(H=d._sw,$=d._ne,!H||!$)return this}return P||N?(P.lng=Math.min(H.lng,P.lng),P.lat=Math.min(H.lat,P.lat),N.lng=Math.max($.lng,N.lng),N.lat=Math.max($.lat,N.lat)):(this._sw=new i.W(H.lng,H.lat),this._ne=new i.W($.lng,$.lat)),this}getCenter(){return new i.W((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new i.W(this.getWest(),this.getNorth())}getSouthEast(){return new i.W(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(d){let{lng:P,lat:N}=i.W.convert(d),H=this._sw.lng<=P&&P<=this._ne.lng;return this._sw.lng>this._ne.lng&&(H=this._sw.lng>=P&&P>=this._ne.lng),this._sw.lat<=N&&N<=this._ne.lat&&H}intersects(d){if(!((d=ie.convert(d)).getNorth()>=this.getSouth()&&d.getSouth()<=this.getNorth()))return!1;let P=Math.abs(this.getEast()-this.getWest()),N=Math.abs(d.getEast()-d.getWest());if(P>=360||N>=360)return!0;let H=i.X(this.getWest(),-180,180),$=i.X(this.getEast(),-180,180),se=i.X(d.getWest(),-180,180),de=i.X(d.getEast(),-180,180),Ae=H>$,Fe=se>de;return!(!Ae||!Fe)||(Ae?de>=H||se<=$:Fe?$>=se||H<=de:se<=$&&de>=H)}static convert(d){return d instanceof ie?d:d&&new ie(d)}static fromLngLat(d,P=0){let N=360*P/40075017,H=N/Math.cos(Math.PI/180*d.lat);return new ie(new i.W(d.lng-H,d.lat-N),new i.W(d.lng+H,d.lat+N))}adjustAntiMeridian(){let d=new i.W(this._sw.lng,this._sw.lat),P=new i.W(this._ne.lng,this._ne.lat);return new ie(d,d.lng>P.lng?new i.W(P.lng+360,P.lat):P)}}class le{constructor(d,P,N){this.bounds=ie.convert(this.validateBounds(d)),this.minzoom=P||0,this.maxzoom=N||24}validateBounds(d){return Array.isArray(d)&&d.length===4?[Math.max(-180,d[0]),Math.max(-90,d[1]),Math.min(180,d[2]),Math.min(90,d[3])]:[-180,-90,180,90]}contains(d){let P=Math.pow(2,d.z),N=Math.floor(i.Z(this.bounds.getWest())*P),H=Math.floor(i.Y(this.bounds.getNorth())*P),$=Math.ceil(i.Z(this.bounds.getEast())*P),se=Math.ceil(i.Y(this.bounds.getSouth())*P);return d.x>=N&&d.x<$&&d.y>=H&&d.y{this._options.tiles=d})),this}setUrl(d){return this.setSourceProperty((()=>{this.url=d,this._options.url=d})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return i.e({},this._options)}loadTile(d){return i._(this,void 0,void 0,(function*(){let P=d.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),N={request:yield this.map._requestManager.transformRequest(P,"Tile"),uid:d.uid,tileID:d.tileID,zoom:d.tileID.overscaledZ,tileSize:this.tileSize*d.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(d),etag:d.etag};N.request.collectResourceTiming=this._collectResourceTiming;let H="RT";if(d.actor&&d.state!=="expired"){if(d.state==="loading")return new Promise((($,se)=>{d.reloadPromise={resolve:$,reject:se}}))}else d.actor=this.dispatcher.getActor(),H="LT";d.abortController=new AbortController;try{let $=yield d.actor.sendAsync({type:H,data:N},d.abortController);if(delete d.abortController,d.aborted)return;this._afterTileLoadWorkerResponse(d,$);let se={};return $!=null&&$.etagUnmodified&&(se.unmodified=!0),se}catch($){if(delete d.abortController,d.aborted)return;if($&&$.status!==404)throw $;this._afterTileLoadWorkerResponse(d,null)}}))}_getOverzoomParameters(d){return i._(this,void 0,void 0,(function*(){if(d.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let P=d.tileID.scaledTo(this.maxzoom).canonical,N=P.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:P,overzoomRequest:yield this.map._requestManager.transformRequest(N,"Tile")}}))}_afterTileLoadWorkerResponse(d,P){if(P!=null&&P.resourceTiming&&(d.resourceTiming=P.resourceTiming),P&&this.map._refreshExpiredTiles&&d.setExpiryData(P),d.etag=P==null?void 0:P.etag,d.loadVectorData(P,this.map.painter),d.reloadPromise){let N=d.reloadPromise;d.reloadPromise=null,this.loadTile(d).then(N.resolve).catch(N.reject)}}abortTile(d){return i._(this,void 0,void 0,(function*(){d.abortController&&(d.abortController.abort(),delete d.abortController),d.actor&&(yield d.actor.sendAsync({type:"AT",data:{uid:d.uid,type:this.type,source:this.id}}))}))}unloadTile(d){return i._(this,void 0,void 0,(function*(){d.unloadVectorData(),d.actor&&(yield d.actor.sendAsync({type:"RMT",data:{uid:d.uid,type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class be extends i.E{constructor(d,P,N,H){super(),this.id=d,this.dispatcher=N,this.setEventedParent(H),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=i.e({type:"raster"},P),i.e(this,i.V(P,["url","scheme","tileSize"]))}load(){return i._(this,arguments,void 0,(function*(d=!1){this._loaded=!1,this.fire(new i.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let P=yield pe(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,P&&(i.e(this,P),P.bounds&&(this.tileBounds=new le(P.bounds,this.minzoom,this.maxzoom)),this.fire(new i.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new i.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:d})))}catch(P){this._tileJSONRequest=null,this._loaded=!0,i.$(P)||this.fire(new i.l(i.d(P)))}}))}loaded(){return this._loaded}onAdd(d){this.map=d,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(d){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),d(),this.load(!0)}setTiles(d){return this.setSourceProperty((()=>{this._options.tiles=d})),this}setUrl(d){return this.setSourceProperty((()=>{this.url=d,this._options.url=d})),this}serialize(){return i.e({},this._options)}hasTile(d){return!this.tileBounds||this.tileBounds.contains(d.canonical)}loadTile(d){return i._(this,void 0,void 0,(function*(){let P=d.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);d.abortController=new AbortController;try{let N=yield _.getImage(yield this.map._requestManager.transformRequest(P,"Tile"),d.abortController,this.map._refreshExpiredTiles);if(delete d.abortController,d.aborted)return void(d.state="unloaded");if(N!=null&&N.data){this.map._refreshExpiredTiles&&(N.cacheControl||N.expires)&&d.setExpiryData({cacheControl:N.cacheControl,expires:N.expires});let H=this.map.painter.context,$=H.gl,se=N.data;d.texture=this.map.painter.getTileTexture(se.width),d.texture?d.texture.update(se,{useMipmap:!0}):(d.texture=new i.T(H,se,$.RGBA,{useMipmap:!0}),d.texture.bind($.LINEAR,$.CLAMP_TO_EDGE,$.LINEAR_MIPMAP_NEAREST)),d.state="loaded"}}catch(N){if(delete d.abortController,d.aborted)d.state="unloaded";else if(N)throw d.state="errored",N}}))}abortTile(d){return i._(this,void 0,void 0,(function*(){d.abortController&&(d.abortController.abort(),delete d.abortController)}))}unloadTile(d){return i._(this,void 0,void 0,(function*(){d.texture&&this.map.painter.saveTileTexture(d.texture)}))}hasTransition(){return!1}}class De extends be{constructor(d,P,N,H){super(d,P,N,H),this.type="raster-dem",this.maxzoom=22,this._options=i.e({type:"raster-dem"},P),this.encoding=P.encoding||"mapbox",this.redFactor=P.redFactor,this.greenFactor=P.greenFactor,this.blueFactor=P.blueFactor,this.baseShift=P.baseShift}loadTile(d){return i._(this,void 0,void 0,(function*(){let P=d.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),N=yield this.map._requestManager.transformRequest(P,"Tile");d.neighboringTiles=this._getNeighboringTiles(d.tileID),d.abortController=new AbortController;try{let H=yield _.getImage(N,d.abortController,this.map._refreshExpiredTiles);if(delete d.abortController,d.aborted)return void(d.state="unloaded");if(H!=null&&H.data){let $=H.data;this.map._refreshExpiredTiles&&(H.cacheControl||H.expires)&&d.setExpiryData({cacheControl:H.cacheControl,expires:H.expires});let se=i.b($)&&i.a0()?$:yield this.readImageNow($),de={type:this.type,uid:d.uid,source:this.id,rawImageData:se,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(d.actor&&d.state!=="expired"&&d.state!=="reloading")return;d.actor&&d.state!=="expired"||(d.actor=this.dispatcher.getActor()),d.dem=yield d.actor.sendAsync({type:"LDT",data:de}),d.needsHillshadePrepare=!0,d.needsTerrainPrepare=!0,d.state="loaded"}}catch(H){if(delete d.abortController,d.aborted)d.state="unloaded";else if(H)throw d.state="errored",H}}))}readImageNow(d){return i._(this,void 0,void 0,(function*(){if(typeof VideoFrame!="undefined"&&i.a1()){let P=d.width+2,N=d.height+2;try{return new i.R({width:P,height:N},yield i.a2(d,-1,-1,P,N))}catch(H){}}return f.getImageData(d,1)}))}_getNeighboringTiles(d){let P=d.canonical,N=Math.pow(2,P.z),H=(P.x-1+N)%N,$=P.x===0?d.wrap-1:d.wrap,se=(P.x+1+N)%N,de=P.x+1===N?d.wrap+1:d.wrap,Ae={};return Ae[new i.a3(d.overscaledZ,$,P.z,H,P.y).key]={backfilled:!1},Ae[new i.a3(d.overscaledZ,de,P.z,se,P.y).key]={backfilled:!1},P.y>0&&(Ae[new i.a3(d.overscaledZ,$,P.z,H,P.y-1).key]={backfilled:!1},Ae[new i.a3(d.overscaledZ,d.wrap,P.z,P.x,P.y-1).key]={backfilled:!1},Ae[new i.a3(d.overscaledZ,de,P.z,se,P.y-1).key]={backfilled:!1}),P.y+1$.key===N));H>-1&&Y.addOrUpdateProperties.splice(H,1)}return(Y.removeAllProperties||d.removeAllProperties)&&(P.removeAllProperties=!0),(Y.removeProperties||d.removeProperties)&&(P.removeProperties=[...Y.removeProperties||[],...d.removeProperties||[]]),(Y.addOrUpdateProperties||d.addOrUpdateProperties)&&(P.addOrUpdateProperties=[...Y.addOrUpdateProperties||[],...d.addOrUpdateProperties||[]]),(Y.newGeometry||d.newGeometry)&&(P.newGeometry=d.newGeometry||Y.newGeometry),P}function tt(Y){var d,P;if(!Y)return{};let N={};return N.removeAll=Y.removeAll,N.remove=new Set(Y.remove||[]),N.add=new Map((d=Y.add)===null||d===void 0?void 0:d.map((H=>[H.id,H]))),N.update=new Map((P=Y.update)===null||P===void 0?void 0:P.map((H=>[H.id,H]))),N}function Oe(Y){return Y&&Y.length!==0?typeof Y[0]=="number"?[Y]:Y.flatMap((d=>Oe(d))):[]}function ze(Y){return Y.type==="GeometryCollection"?Y.geometries.flatMap((d=>ze(d))):Oe(Y.coordinates)}function ut(Y){let d=new ie,P;switch(Y.type){case"FeatureCollection":P=Y.features.flatMap((N=>ze(N.geometry)));break;case"Feature":P=ze(Y.geometry);break;default:P=ze(Y)}if(P.length===0)return d;for(let N of P){let[H,$]=N;d.extend([H,$])}return d}class et extends i.E{constructor(d,P,N,H){super(),this.id=d,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:P.data},this.actor=N.getActor(),this.setEventedParent(H),this._data=typeof P.data=="string"?{url:P.data}:{geojson:P.data},this._options=i.e({},P),this._collectResourceTiming=P.collectResourceTiming,P.maxzoom!==void 0&&(this.maxzoom=P.maxzoom),P.type&&(this.type=P.type),P.attribution&&(this.attribution=P.attribution),this.promoteId=P.promoteId,P.clusterMaxZoom!==void 0&&this.maxzoom<=P.clusterMaxZoom&&i.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${P.clusterMaxZoom}".`),this.workerOptions=i.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(P.buffer!==void 0?P.buffer:128),tolerance:this._pixelsToTileUnits(P.tolerance!==void 0?P.tolerance:.375),extent:i.a6,maxZoom:this.maxzoom,lineMetrics:P.lineMetrics||!1,generateId:P.generateId||!1,promoteId:typeof P.promoteId=="string"?P.promoteId:void 0,cluster:P.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(P.clusterMaxZoom),minPoints:Math.max(2,P.clusterMinPoints||2),extent:i.a6,radius:this._pixelsToTileUnits(P.clusterRadius||50),log:!1,generateId:P.generateId||!1}},clusterProperties:P.clusterProperties,filter:P.filter},P.workerOptions)}_hasPendingWorkerUpdate(){return this._pendingWorkerUpdate.data!==void 0||this._pendingWorkerUpdate.diff!==void 0||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(d){return d*(i.a6/this.tileSize)}_getClusterMaxZoom(d){let P=d?Math.round(d):this.maxzoom-1;return Number.isInteger(d)||d===void 0||i.w(`Integer expected for option 'clusterMaxZoom': provided value "${d}" rounded to "${P}"`),P}load(){return i._(this,void 0,void 0,(function*(){yield this._updateWorkerData()}))}onAdd(d){this.map=d,this.load()}setData(d,P){this._data=typeof d=="string"?{url:d}:{geojson:d},this._pendingWorkerUpdate={data:d};let N=this._updateWorkerData();return P?N:this}updateData(d,P){this._pendingWorkerUpdate.diff=(function(H,$){if(!H)return $||{};if(!$)return H||{};let se=tt(H),de=tt($);(function(Fe,Ie){Ie.removeAll&&(Fe.add.clear(),Fe.update.clear(),Fe.remove.clear(),Ie.remove.clear());for(let Ye of Ie.remove)Fe.add.delete(Ye),Fe.update.delete(Ye);for(let[Ye,st]of Ie.update){let ht=Fe.update.get(Ye);ht&&(Ie.update.set(Ye,pt(ht,st)),Fe.update.delete(Ye))}})(se,de);let Ae={};if((se.removeAll||de.removeAll)&&(Ae.removeAll=!0),Ae.remove=new Set([...se.remove,...de.remove]),Ae.add=new Map([...se.add,...de.add]),Ae.update=new Map([...se.update,...de.update]),Ae.remove.size&&Ae.add.size)for(let Fe of Ae.add.keys())Ae.remove.delete(Fe);return(function(Fe){let Ie={};return Fe.removeAll&&(Ie.removeAll=Fe.removeAll),Fe.remove&&(Ie.remove=Array.from(Fe.remove)),Fe.add&&(Ie.add=Array.from(Fe.add.values())),Fe.update&&(Ie.update=Array.from(Fe.update.values())),Ie})(Ae)})(this._pendingWorkerUpdate.diff,d);let N=this._updateWorkerData();return P?N:this}getData(){return i._(this,void 0,void 0,(function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}}))}getBounds(){return i._(this,void 0,void 0,(function*(){return ut(yield this.getData())}))}setClusterOptions(d){return this.workerOptions.geojsonVtOptions.cluster=d.cluster,d.clusterRadius!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(d.clusterRadius)),d.clusterMaxZoom!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(d.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(d){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:d,source:this.id}})}getClusterChildren(d){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:d,source:this.id}})}getClusterLeaves(d,P,N){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:d,limit:P,offset:N}})}_updateWorkerData(){return i._(this,void 0,void 0,(function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void i.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:d,diff:P,updateCluster:N}=this._pendingWorkerUpdate,H=this._getLoadGeoJSONParameters(d,P,N);d!==void 0?this._pendingWorkerUpdate.data=void 0:P?this._pendingWorkerUpdate.diff=void 0:N&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(H)}))}_getLoadGeoJSONParameters(d,P,N){return i._(this,void 0,void 0,(function*(){let H=i.e({type:this.type},this.workerOptions);return typeof d=="string"?(H.request=yield this.map._requestManager.transformRequest(f.resolveURL(d),"Source"),H.request.collectResourceTiming=this._collectResourceTiming,H):d!==void 0?(H.data=d,H):P?(H.dataDiff=P,H):N?(H.updateCluster=!0,H):void 0}))}_dispatchWorkerUpdate(d){return i._(this,void 0,void 0,(function*(){this._isUpdatingWorker=!0,this.fire(new i.n("dataloading",{dataType:"source"}));try{let P=yield d,N=yield this.actor.sendAsync({type:"LD",data:P});if(this._isUpdatingWorker=!1,this._removed||N.abandoned)return void this.fire(new i.n("dataabort",{dataType:"source"}));N.data&&(this._data={geojson:N.data});let H=this._applyDiffToSource(P.dataDiff),$=this._getShouldReloadTileOptions(H),se={dataType:"source"};this._applyResourceTiming(se,N),this.fire(new i.n("data",Object.assign(Object.assign({},se),{sourceDataType:"metadata"}))),this.fire(new i.n("data",Object.assign(Object.assign({},se),{sourceDataType:"content",shouldReloadTileOptions:$})))}catch(P){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new i.n("dataabort",{dataType:"source"}));this.fire(new i.l(i.d(P)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}}))}_applyResourceTiming(d,P){var N;if(!this._collectResourceTiming)return;let H=(N=P.resourceTiming)===null||N===void 0?void 0:N[this.id];if(!H)return;let $=H.slice(0);$!=null&&$.length&&i.e(d,{resourceTiming:$})}_applyDiffToSource(d){if(!d)return;let P=typeof this.promoteId=="string"?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let H=(function($,se){let de=new Map;if($==null||$.type==null)return de;if($.type==="Feature"){let Ae=Ge($,se);return Ae==null?void 0:(de.set(Ae,$),de)}if($.type==="FeatureCollection"){let Ae=new Set;for(let Fe of $.features){let Ie=Ge(Fe,se);if(Ie==null||Ae.has(Ie))return;Ae.add(Ie),de.set(Ie,Fe)}return de}})(this._data.geojson,P);if(!H)throw new Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:H}}if(!this._data.updateable)return;let N=(function(H,$,se){var de,Ae;let Fe=[];if($.removeAll)H.clear();else if($.remove)for(let Ie of $.remove){let Ye=H.get(Ie);Ye&&(Fe.push(Ye.geometry),H.delete(Ie))}if($.add)for(let Ie of $.add){let Ye=Ge(Ie,se);if(Ye==null)continue;let st=H.get(Ye);st&&Fe.push(st.geometry),Fe.push(Ie.geometry),H.set(Ye,Ie)}if($.update)for(let Ie of $.update){let Ye=H.get(Ie.id);if(!Ye)continue;let st=!!Ie.newGeometry,ht=Ie.removeAllProperties||((de=Ie.removeProperties)===null||de===void 0?void 0:de.length)>0||((Ae=Ie.addOrUpdateProperties)===null||Ae===void 0?void 0:Ae.length)>0;if(!st&&!ht)continue;Fe.push(Ye.geometry);let Pe=Object.assign({},Ye);if(H.set(Ie.id,Pe),st&&(Fe.push(Ie.newGeometry),Pe.geometry=Ie.newGeometry),ht){if(Pe.properties=Ie.removeAllProperties?{}:Object.assign({},Pe.properties||{}),Ie.removeProperties)for(let Xe of Ie.removeProperties)delete Pe.properties[Xe];if(Ie.addOrUpdateProperties)for(let{key:Xe,value:at}of Ie.addOrUpdateProperties)Pe.properties[Xe]=at}}return Fe})(this._data.updateable,d,P);return d.removeAll||this._options.cluster?void 0:N}_getShouldReloadTileOptions(d){if(d)return{affectedBounds:d.filter(Boolean).map((P=>ut(P)))}}shouldReloadTile(d,{affectedBounds:P}){if(d.state==="loading")return!0;if(d.state==="unloaded")return!1;let{buffer:N,extent:H}=this.workerOptions.geojsonVtOptions,$=(function({x:se,y:de,z:Ae},Fe=0){let Ie=i.a4((se-Fe)/Math.pow(2,Ae)),Ye=i.a5((de+1+Fe)/Math.pow(2,Ae)),st=i.a4((se+1+Fe)/Math.pow(2,Ae)),ht=i.a5((de-Fe)/Math.pow(2,Ae));return new ie([Ie,Ye],[st,ht])})(d.tileID.canonical,N/H);for(let se of P)if($.intersects(se))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(d){return i._(this,void 0,void 0,(function*(){let P=d.actor?"RT":"LT";d.actor=this.actor;let N={type:this.type,uid:d.uid,tileID:d.tileID,zoom:d.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};d.abortController=new AbortController;let H=yield this.actor.sendAsync({type:P,data:N},d.abortController);delete d.abortController,d.unloadVectorData(),d.aborted||d.loadVectorData(H,this.map.painter,P==="RT")}))}abortTile(d){return i._(this,void 0,void 0,(function*(){d.abortController&&(d.abortController.abort(),delete d.abortController),d.aborted=!0}))}unloadTile(d){return i._(this,void 0,void 0,(function*(){d.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:d.uid,type:this.type,source:this.id}})}))}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return i.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class qe extends i.E{constructor(d,P,N,H){super(),this.flippedWindingOrder=!1,this.id=d,this.dispatcher=N,this.coordinates=P.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(H),this.options=P}load(d){return i._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new i.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let P=yield _.getImage(yield this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,P!=null&&P.data&&(this.image=P.data,d&&(this.coordinates=d),this._finishLoading())}catch(P){this._request=null,this._loaded=!0,i.$(P)||this.fire(new i.l(i.d(P)))}}))}loaded(){return this._loaded}updateImage(d){return d.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=d.url,this.load(d.coordinates).finally((()=>this.texture=null)),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(d){this.map=d,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(d){this.coordinates=d;let P=d.map(i.a7.fromLngLat);var N;return this.tileID=(function(H){let $=i.a8.fromPoints(H),se=$.width(),de=$.height(),Ae=Math.max(se,de),Fe=Math.max(0,Math.floor(-Math.log(Ae)/Math.LN2)),Ie=Math.pow(2,Fe);return new i.aa(Fe,Math.floor(($.minX+$.maxX)/2*Ie),Math.floor(($.minY+$.maxY)/2*Ie))})(P),this.terrainTileRanges=this._getOverlappingTileRanges(P),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=P.map((H=>this.tileID.getTilePoint(H)._round())),this.flippedWindingOrder=((N=this.tileCoords)[1].x-N[0].x)*(N[2].y-N[0].y)-(N[1].y-N[0].y)*(N[2].x-N[0].x)<0,this.fire(new i.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let d=this.map.painter.context,P=d.gl;this.texture||(this.texture=new i.T(d,this.image,P.RGBA),this.texture.bind(P.LINEAR,P.CLAMP_TO_EDGE));let N=!1;for(let H in this.tiles){let $=this.tiles[H];$.state!=="loaded"&&($.state="loaded",$.texture=this.texture,N=!0)}N&&this.fire(new i.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(d){return i._(this,void 0,void 0,(function*(){var P;!((P=this.tileID)===null||P===void 0)&&P.equals(d.tileID.canonical)?(this.tiles[String(d.tileID.wrap)]=d,d.buckets={}):d.state="errored"}))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(d){let{minX:P,minY:N,maxX:H,maxY:$}=i.a8.fromPoints(d),se={};for(let de=0;de<=i.a9;de++){let Ae=Math.pow(2,de),Fe=Math.floor(P*Ae),Ie=Math.floor(N*Ae),Ye=Math.floor(H*Ae),st=Math.floor($*Ae),ht=(Fe%Ae+Ae)%Ae,Pe=Ye%Ae,Xe=Math.floor(Fe/Ae),at=Math.floor(Ye/Ae);se[de]={minWrap:Xe,maxWrap:at,minTileXWrapped:ht,maxTileXWrapped:Pe,minTileY:Ie,maxTileY:st}}return se}}class we extends qe{constructor(d,P,N,H){super(d,P,N,H),this._onPlayingHandler=()=>{var $;($=this.map)===null||$===void 0||$.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=P}load(){return i._(this,void 0,void 0,(function*(){this._loaded=!1;let d=this.options;this.urls=[];for(let P of d.urls)this.urls.push((yield this.map._requestManager.transformRequest(P,"Source")).url);try{let P=yield i.ab(this.urls);if(this._loaded=!0,!P)return;this.video=P,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(P){this.fire(new i.l(i.d(P)))}}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(d){if(this.video){let P=this.video.seekable;dP.end(0)?this.fire(new i.l(new i.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${P.start(0)} and ${P.end(0)}-second mark.`))):this.video.currentTime=d}}getVideo(){return this.video}onAdd(d){this.map||(this.map=d,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let d=this.map.painter.context,P=d.gl;this.texture?this.video.paused||(this.texture.bind(P.LINEAR,P.CLAMP_TO_EDGE),P.texSubImage2D(P.TEXTURE_2D,0,0,0,P.RGBA,P.UNSIGNED_BYTE,this.video)):(this.texture=new i.T(d,this.video,P.RGBA),this.texture.bind(P.LINEAR,P.CLAMP_TO_EDGE));let N=!1;for(let H in this.tiles){let $=this.tiles[H];$.state!=="loaded"&&($.state="loaded",$.texture=this.texture,N=!0)}N&&this.fire(new i.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Le extends qe{constructor(d,P,N,H){super(d,P,N,H),P.coordinates?Array.isArray(P.coordinates)&&P.coordinates.length===4&&!P.coordinates.some(($=>!Array.isArray($)||$.length!==2||$.some((se=>typeof se!="number"))))||this.fire(new i.l(new i.ac(`sources.${d}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.l(new i.ac(`sources.${d}`,null,'missing required property "coordinates"'))),P.animate&&typeof P.animate!="boolean"&&this.fire(new i.l(new i.ac(`sources.${d}`,null,'optional "animate" property must be a boolean value'))),P.canvas?typeof P.canvas=="string"||P.canvas instanceof HTMLCanvasElement||this.fire(new i.l(new i.ac(`sources.${d}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new i.l(new i.ac(`sources.${d}`,null,'missing required property "canvas"'))),this.options=P,this.animate=P.animate===void 0||P.animate}load(){return i._(this,void 0,void 0,(function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new i.l(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}))}getCanvas(){return this.canvas}onAdd(d){this.map=d,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let d=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,d=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,d=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let P=this.map.painter.context,N=P.gl;this.texture?(d||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new i.T(P,this.canvas,N.RGBA,{premultiply:!0}),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let H=!1;for(let $ in this.tiles){let se=this.tiles[$];se.state!=="loaded"&&(se.state="loaded",se.texture=this.texture,H=!0)}H&&this.fire(new i.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let d of[this.canvas.width,this.canvas.height])if(isNaN(d)||d<=0)return!0;return!1}}let Ke={},Te=Y=>{switch(Y){case"geojson":return et;case"image":return qe;case"raster":return be;case"raster-dem":return De;case"vector":return xe;case"video":return we;case"canvas":return Le}return Ke[Y]},Ve="RTLPluginLoaded";class $e extends i.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=ue()}_syncState(d){return this.status=d,this.dispatcher.broadcast("SRPS",{pluginStatus:d,pluginURL:this.url}).catch((P=>{throw this.status="error",P}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(d){return i._(this,arguments,void 0,(function*(P,N=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=f.resolveURL(P),!this.url)throw new Error(`requested url ${P} is invalid`);if(this.status==="unavailable"){if(!N)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()}))}_requestImport(){return i._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new i.n(Ve))}))}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let ot=null;function rt(){return ot||(ot=new $e),ot}var it,We;(function(Y){Y[Y.Base=0]="Base",Y[Y.Parent=1]="Parent"})(it||(it={})),(function(Y){Y[Y.Departing=0]="Departing",Y[Y.Incoming=1]="Incoming"})(We||(We={}));class mt{constructor(d,P){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=d,this.uid=i.ad(),this.uses=0,this.tileSize=P,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(d){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(d||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:d,fadingDirection:P,fadingParentID:N,fadeEndTime:H}){this.resetFadeLogic(),this.fadingRole=d,this.fadingDirection=P,this.fadingParentID=N,this.fadeEndTime=H}setSelfFadeLogic(d){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=d}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=g(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(d){this.demTexture&&d.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(d,P,N){if((d==null?void 0:d.etagUnmodified)!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",d){d.featureIndex&&(this.latestFeatureIndex=d.featureIndex,d.rawTileData?(this.latestRawTileData=d.rawTileData,this.latestEncoding=d.encoding,this.latestFeatureIndex.rawTileData=d.rawTileData,this.latestFeatureIndex.encoding=d.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=d.collisionBoxArray,this.buckets=(function(H,$){let se={};if(!$)return se;for(let de of H){let Ae=de.layerIds.map((Fe=>$.getLayer(Fe))).filter(Boolean);if(Ae.length!==0){de.layers=Ae,de.stateDependentLayerIds&&(de.stateDependentLayers=de.stateDependentLayerIds.map((Fe=>Ae.filter((Ie=>Ie.id===Fe))[0])));for(let Fe of Ae)se[Fe.id]=de}}return se})(d.buckets,P==null?void 0:P.style),this.hasSymbolBuckets=!1;for(let H in this.buckets){let $=this.buckets[H];if($ instanceof i.af){if(this.hasSymbolBuckets=!0,!N)break;$.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let H in this.buckets){let $=this.buckets[H];if($ instanceof i.af&&$.hasRTLText){this.hasRTLText=!0,rt().lazyLoad();break}}this.queryPadding=0;for(let H in this.buckets){let $=this.buckets[H];this.queryPadding=Math.max(this.queryPadding,P.style.getLayer(H).queryRadius($))}d.imageAtlas&&(this.imageAtlas=d.imageAtlas),d.glyphAtlasImage&&(this.glyphAtlasImage=d.glyphAtlasImage),this.dashPositions=d.dashPositions}else this.collisionBoxArray=new i.ae;else this.state="loaded"}unloadVectorData(){for(let d in this.buckets)this.buckets[d].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(d){return this.buckets[d.id]}upload(d){for(let N in this.buckets){let H=this.buckets[N];H.uploadPending()&&H.upload(d)}let P=d.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new i.T(d,this.imageAtlas.image,P.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new i.T(d,this.glyphAtlasImage,P.ALPHA),this.glyphAtlasImage=null)}prepare(d){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(d,this.imageAtlasTexture)}queryRenderedFeatures(d,P,N,H,$,se,de,Ae,Fe,Ie,Ye){var st;return!((st=this.latestFeatureIndex)===null||st===void 0)&&st.rawTileData?this.latestFeatureIndex.query({queryGeometry:H,cameraQueryGeometry:$,scale:se,tileSize:this.tileSize,pixelPosMatrix:Ie,transform:Ae,params:de,queryPadding:this.queryPadding*Fe,getElevation:Ye},d,P,N):{}}querySourceFeatures(d,P){let N=this.latestFeatureIndex;if(!(N!=null&&N.rawTileData))return;let H=N.loadVTLayers(),$=P!=null&&P.sourceLayer?P.sourceLayer:"",se=H[i.ag]||H[$];if(!se)return;let de=i.ah(P==null?void 0:P.filter,P==null?void 0:P.globalState),{z:Ae,x:Fe,y:Ie}=this.tileID.canonical,Ye={z:Ae,x:Fe,y:Ie};for(let st=0;stN)H=!1;else if(P)if(this.expirationTime({zoom:0,x:0,y:0,wrap:Pt,fullyVisible:!1}),Bt=[],St=[];if(Y.renderWorldCopies&&se.allowWorldCopies())for(let Pt=1;Pt<=3;Pt++)Bt.push(Et(-Pt)),Bt.push(Et(Pt));for(Bt.push(Et(0));Bt.length>0;){let Pt=Bt.pop(),$t=Pt.x,Ht=Pt.y,dr=Pt.fullyVisible,Xr={x:$t,y:Ht,z:Pt.zoom},Or=se.getTileBoundingVolume(Xr,Pt.wrap,Y.elevation,d);if(!dr){let Rr=Ct(P,Or,N);if(Rr===0)continue;dr=Rr===2}let $r=se.distanceToTile2d(H.x,H.y,Xr,Or),Er=Ae;de&&(Er=(d.calculateTileZoom||Mt)(Y.zoom+i.ar(Y.tileSize/d.tileSize),$r,at,xt,Y.fov)),Er=(d.roundZoom?Math.round:Math.floor)(Er),Er=Math.max(0,Er);let Tr=Math.min(Er,Ie);if(Pt.wrap=se.getWrap($,Xr,Pt.wrap),Pt.zoom>=Tr){if(Pt.zoom>1),wrap:Pt.wrap,fullyVisible:dr})}return St.sort(((Pt,$t)=>Pt.distanceSq-$t.distanceSq)).map((Pt=>Pt.tileID))}let kt=i.a8.fromPoints([new i.P(0,0),new i.P(i.a6,i.a6)]);function rr(Y){return Y==="raster"||Y==="image"||Y==="video"}function pr(Y,d,P,N,H,$,se){if(!d.hasData())return!1;let{tileID:de,fadingRole:Ae,fadingDirection:Fe,fadingParentID:Ie}=d;if(Ae===it.Base&&Fe===We.Incoming&&Ie)return P[Ie.key]=Ie,!0;let Ye=Math.max(de.overscaledZ-H,$);for(let st=de.overscaledZ-1;st>=Ye;st--){let ht=de.scaledTo(st),Pe=Y.getLoadedTile(ht);if(Pe)return d.setCrossFadeLogic({fadingRole:it.Base,fadingDirection:We.Incoming,fadingParentID:Pe.tileID,fadeEndTime:N+se}),Pe.setCrossFadeLogic({fadingRole:it.Parent,fadingDirection:We.Departing,fadeEndTime:N+se}),P[ht.key]=ht,!0}return!1}function Kr(Y,d,P,N,H,$){if(!d.hasData())return!1;let se=d.tileID.children(H),de=Nr(Y,d,se,P,N,H,$);if(de)return!0;for(let Ae of se)Nr(Y,d,Ae.children(H),P,N,H,$)&&(de=!0);return de}function Nr(Y,d,P,N,H,$,se){if(P[0].overscaledZ>=$)return!1;let de=!1;for(let Ae of P){let Fe=Y.getLoadedTile(Ae);if(!Fe)continue;let{fadingRole:Ie,fadingDirection:Ye,fadingParentID:st}=Fe;Ie===it.Base&&Ye===We.Departing&&st||(Fe.setCrossFadeLogic({fadingRole:it.Base,fadingDirection:We.Departing,fadingParentID:d.tileID,fadeEndTime:H+se}),d.setCrossFadeLogic({fadingRole:it.Parent,fadingDirection:We.Incoming,fadeEndTime:H+se})),N[Ae.key]=Ae,de=!0}return de}function dn(Y,d,P,N){let H=Y.tileID;return!!Y.selfFading||!Y.hasData()&&!!d.has(H)&&(Y.setSelfFadeLogic(P+N),!0)}function xr(Y,d){var P;Y.needsHillshadePrepare=!0,Y.needsTerrainPrepare=!0;let N=d.tileID.canonical.x-Y.tileID.canonical.x,H=d.tileID.canonical.y-Y.tileID.canonical.y,$=Math.pow(2,Y.tileID.canonical.z),se=d.tileID.key;N===0&&H===0||Math.abs(H)>1||(Math.abs(N)>1&&(Math.abs(N+$)===1?N+=$:Math.abs(N-$)===1&&(N-=$)),d.dem&&Y.dem&&(Y.dem.backfillBorder(d.dem,N,H),!((P=Y.neighboringTiles)===null||P===void 0)&&P[se]&&(Y.neighboringTiles[se].backfilled=!0)))}class Fr{constructor(){this._tiles={}}handleWrapJump(d){let P={};for(let N in this._tiles){let H=this._tiles[N];H.tileID=H.tileID.unwrapTo(H.tileID.wrap+d),P[H.tileID.key]=H}this._tiles=P}setFeatureState(d,P){for(let N in this._tiles)this._tiles[N].setFeatureState(d,P)}getAllTiles(){return Object.values(this._tiles)}getAllIds(d=!1){return d?Object.values(this._tiles).map((P=>P.tileID)).sort(i.au).map((P=>P.key)):Object.keys(this._tiles)}getTileById(d){return this._tiles[d]}setTile(d,P){this._tiles[d]=P}deleteTileById(d){delete this._tiles[d]}getLoadedTile(d){let P=this.getTileById(d.key);return P!=null&&P.hasData()?P:null}isIdRenderable(d,P=!1){var N;return(N=this.getTileById(d))===null||N===void 0?void 0:N.isRenderable(P)}getRenderableIds(d=0,P){let N=[];for(let H of this.getAllIds())this.isIdRenderable(H,P)&&N.push(this.getTileById(H));return P?N.sort(((H,$)=>{let se=H.tileID,de=$.tileID,Ae=new i.P(se.canonical.x,se.canonical.y)._rotate(-d),Fe=new i.P(de.canonical.x,de.canonical.y)._rotate(-d);return se.overscaledZ-de.overscaledZ||Fe.y-Ae.y||Fe.x-Ae.x})).map((H=>H.tileID.key)):N.map((H=>H.tileID)).sort(i.au).map((H=>H.key))}}class Zr extends i.E{constructor(d,P,N){super(),this.id=d,this.dispatcher=N,this.on("data",(H=>{this._dataHandler(H)})),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=((H,$,se,de)=>{let Ae=new(Te($.type))(H,$,se,de);if(Ae.id!==H)throw new Error(`Expected Source id to be ${H} instead of ${Ae.id}`);return Ae})(d,P,N,this),this._inViewTiles=new Fr,this._outOfViewCache=new i.av(0,(H=>this._unloadTile(H))),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new bt,this._didEmitContent=!1,this._updated=!1}onAdd(d){var P;this.map=d,this._maxTileCacheSize=d?d._maxTileCacheSize:null,this._maxTileCacheZoomLevels=d?d._maxTileCacheZoomLevels:null,!((P=this._source)===null||P===void 0)&&P.onAdd&&this._source.onAdd(d)}onRemove(d){var P;for(let N of this._inViewTiles.getAllTiles())N.unloadVectorData();this.clearTiles(),!((P=this._source)===null||P===void 0)&&P.onRemove&&this._source.onRemove(d),this._inViewTiles=new Fr}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let d of this._inViewTiles.getAllTiles())if(d.state!=="loaded"&&d.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let d=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,d&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(d,P,N){return i._(this,void 0,void 0,(function*(){try{let H=yield this._source.loadTile(d);this._tileLoaded(d,P,N,H)}catch(H){d.state="errored",H.status!==404?this._source.fire(new i.l(i.d(H),{tile:d})):this.update(this.transform,this.terrain)}}))}_unloadTile(d){this._source.unloadTile&&this._source.unloadTile(d)}_abortTile(d){this._source.abortTile&&this._source.abortTile(d),this._source.fire(new i.n("dataabort",{tile:d,coord:d.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(d){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let P of this._inViewTiles.getAllTiles())P.upload(d),P.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(d){var P;return this._inViewTiles.getRenderableIds((P=this.transform)===null||P===void 0?void 0:P.bearingInRadians,d)}hasRenderableParent(d){let P=d.overscaledZ-1;if(P>=this._source.minzoom){let N=this.getLoadedTile(d.scaledTo(P));if(N)return this._inViewTiles.isIdRenderable(N.tileID.key)}return!1}reload(d,P=void 0){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(let N of this._inViewTiles.getAllIds()){let H=this._inViewTiles.getTileById(N);P&&!this._source.shouldReloadTile(H,P)||(d?this._reloadTile(N,"expired"):H.state!=="errored"&&this._reloadTile(N,"reloading"))}}}_reloadTile(d,P){return i._(this,void 0,void 0,(function*(){let N=this._inViewTiles.getTileById(d);N&&(N.state!=="loading"&&(N.state=P),yield this._loadTile(N,d,P))}))}_tileLoaded(d,P,N,H){d.timeAdded=g(),d.selfFading&&(d.fadeEndTime=d.timeAdded+this._rasterFadeDuration),N==="expired"&&(d.refreshedUponExpiration=!0),this._setTileReloadTimer(P,d),H!=null&&H.unmodified||(this.getSource().type==="raster-dem"&&d.dem&&(function($,se){var de,Ae,Fe;let Ie=se.getRenderableIds();for(let Ye of Ie){if(!(!((de=$.neighboringTiles)===null||de===void 0)&&de[Ye]))continue;let st=se.getTileById(Ye);$.neighboringTiles[Ye].backfilled||xr($,st),!((Fe=(Ae=st.neighboringTiles)===null||Ae===void 0?void 0:Ae[$.tileID.key])===null||Fe===void 0)&&Fe.backfilled||xr(st,$)}})(d,this._inViewTiles),this._state.initializeTileState(d,this.map?this.map.painter:null),d.aborted||this._source.fire(new i.n("data",{dataType:"source",tile:d,coord:d.tileID})))}getTile(d){return this.getTileByID(d.key)}getTileByID(d){return this._inViewTiles.getTileById(d)}_retainLoadedChildren(d,P){let N=this._getLoadedDescendents(P),H=new Set;for(let $ of P){let se=N[$.key];if(!(se!=null&&se.length)){H.add($);continue}let de=$.overscaledZ+Zr.maxOverzooming,Ae=se.filter((Ye=>Ye.tileID.overscaledZ<=de));if(!Ae.length){H.add($);continue}let Fe=Math.min(...Ae.map((Ye=>Ye.tileID.overscaledZ))),Ie=Ae.filter((Ye=>Ye.tileID.overscaledZ===Fe)).map((Ye=>Ye.tileID));for(let Ye of Ie)d[Ye.key]=Ye;this._areDescendentsComplete(Ie,Fe,$.overscaledZ)||H.add($)}return H}_getLoadedDescendents(d){var P;let N={};for(let H of this._inViewTiles.getAllTiles().filter(($=>$.hasData())))for(let $ of d)H.tileID.isChildOf($)&&(N[P=$.key]||(N[P]=[]),N[$.key].push(H));return N}_areDescendentsComplete(d,P,N){return d.length===1&&d[0].isOverscaled()?d[0].overscaledZ===P:Math.pow(4,P-N)===d.length}getLoadedTile(d){return this._inViewTiles.getLoadedTile(d)}updateCacheSize(d){let P=Math.ceil(d.width/this._source.tileSize)+1,N=Math.ceil(d.height/this._source.tileSize)+1,H=Math.floor(P*N*(this._maxTileCacheZoomLevels===null?i.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),$=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,H):H;this._outOfViewCache.setMaxSize($)}handleWrapJump(d){let P=Math.round((d-(this._prevLng===void 0?d:this._prevLng))/360);this._prevLng=d,P&&(this._inViewTiles.handleWrapJump(P),this._resetTileReloadTimers())}update(d,P){if(!this._sourceLoaded||this._paused)return;let N;this.transform=d,this.terrain=P,this.updateCacheSize(d),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?N=d.getVisibleUnwrappedCoordinates(this._source.tileID).map((Ae=>new i.a3(Ae.canonical.z,Ae.wrap,Ae.canonical.z,Ae.canonical.x,Ae.canonical.y))):(N=ft(d,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?d.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:P,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(N=N.filter((Ae=>this._source.hasTile(Ae))))):N=[],this.usedForTerrain&&(N=this._addTerrainIdealTiles(N));let H=N.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,H&&this.fire(new i.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let $=Lt(d,this._source),se=this._updateRetainedTiles(N,$),de=rr(this._source.type);de&&this._rasterFadeDuration>0&&!P&&(function(Ae,Fe,Ie,Ye,st,ht,Pe){let Xe=g(),at=i.at(Fe);for(let xt of Fe){let Et=Ae.getTileById(xt.key);Et.fadingDirection!==We.Departing&&Et.fadeOpacity!==0||Et.resetFadeLogic(),pr(Ae,Et,Ie,Xe,Ye,st,Pe)||Kr(Ae,Et,Ie,Xe,ht,Pe)||dn(Et,at,Xe,Pe)||Et.resetFadeLogic()}})(this._inViewTiles,N,se,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),de?this._cleanUpRasterTiles(se):this._cleanUpVectorTiles(se)}_cleanUpRasterTiles(d){for(let P of this._inViewTiles.getAllIds())d[P]||this._removeTile(P)}_cleanUpVectorTiles(d){for(let P of this._inViewTiles.getAllIds()){let N=this._inViewTiles.getTileById(P);d[P]?N.clearSymbolFadeHold():N.hasSymbolBuckets?N.holdingForSymbolFade()?N.symbolFadeFinished()&&this._removeTile(P):N.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(P)}}_addTerrainIdealTiles(d){let P=[];for(let N of d)if(N.canonical.z>this._source.minzoom){let H=N.scaledTo(N.canonical.z-1);P.push(H);let $=N.scaledTo(Math.max(this._source.minzoom,Math.min(N.canonical.z,5)));P.push($)}return d.concat(P)}releaseSymbolFadeTiles(){for(let d of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(d).holdingForSymbolFade()&&this._removeTile(d)}_updateRetainedTiles(d,P){var N;let H=new Set;for(let Fe of d)this._addTile(Fe).hasData()||H.add(Fe);let $=d.reduce(((Fe,Ie)=>(Fe[Ie.key]=Ie,Fe)),{}),se=this._retainLoadedChildren($,H),de={},Ae=Math.max(P-Zr.maxUnderzooming,this._source.minzoom);for(let Fe of se){let Ie=this._inViewTiles.getTileById(Fe.key),Ye=Ie==null?void 0:Ie.wasRequested();for(let st=Fe.overscaledZ-1;st>=Ae;--st){let ht=Fe.scaledTo(st);if(de[ht.key])break;if(de[ht.key]=!0,Ie=this.getTile(ht),!Ie&&Ye&&(Ie=this._addTile(ht)),Ie){let Pe=Ie.hasData();if((Pe||!(!((N=this.map)===null||N===void 0)&&N.cancelPendingTileRequestsWhileZooming)||Ye)&&($[ht.key]=ht),Ye=Ie.wasRequested(),Pe)break}}}return $}_addTile(d){let P=this._inViewTiles.getTileById(d.key);if(P)return P;P=this._outOfViewCache.getAndRemove(d),P&&(P.resetFadeLogic(),this._setTileReloadTimer(d.key,P),P.tileID=d,this._state.initializeTileState(P,this.map?this.map.painter:null));let N=P;return P||(P=new mt(d,this._source.tileSize*d.overscaleFactor()),this._loadTile(P,d.key,P.state)),P.uses++,this._inViewTiles.setTile(d.key,P),N||this._source.fire(new i.n("dataloading",{tile:P,coord:P.tileID,dataType:"source"})),P}_setTileReloadTimer(d,P){this._clearTileReloadTimer(d);let N=P.getExpiryTimeout();N&&(this._timers[d]=setTimeout((()=>{this._reloadTile(d,"expired"),delete this._timers[d]}),N))}_clearTileReloadTimer(d){let P=this._timers[d];P&&(clearTimeout(P),delete this._timers[d])}_resetTileReloadTimers(){for(let d in this._timers)clearTimeout(this._timers[d]),delete this._timers[d];for(let d of this._inViewTiles.getAllIds()){let P=this._inViewTiles.getTileById(d);this._setTileReloadTimer(d,P)}}refreshTiles(d){for(let P of this._inViewTiles.getAllIds()){let N=this._inViewTiles.getTileById(P);(this._inViewTiles.isIdRenderable(P)||N.state=="errored")&&d.some((H=>H.equals(N.tileID.canonical)))&&this._reloadTile(P,"expired")}}_removeTile(d){let P=this._inViewTiles.getTileById(d);P&&(P.uses--,this._inViewTiles.deleteTileById(d),this._clearTileReloadTimer(d),P.uses>0||(P.hasData()&&P.state!=="reloading"?this._outOfViewCache.add(P.tileID,P,P.getExpiryTimeout()):(P.aborted=!0,this._abortTile(P),this._unloadTile(P))))}_dataHandler(d){d.dataType==="source"&&(d.sourceDataType!=="metadata"?d.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(d.sourceDataChanged,d.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let d of this._inViewTiles.getAllIds())this._removeTile(d);this._outOfViewCache.reset()}tilesIn(d,P,N){let H=[],$=this.transform;if(!$)return H;let se=$.getCoveringTilesDetailsProvider().allowWorldCopies(),de=N?$.getCameraQueryGeometry(d):d,Ae=ht=>$.screenPointToMercatorCoordinate(ht,this.terrain),Fe=this.transformBbox(d,Ae,!se),Ie=this.transformBbox(de,Ae,!se),Ye=this.getIds(),st=i.a8.fromPoints(Ie);for(let ht of Ye){let Pe=this._inViewTiles.getTileById(ht);if(Pe.holdingForSymbolFade())continue;let Xe=se?[Pe.tileID]:[Pe.tileID.unwrapTo(-1),Pe.tileID.unwrapTo(0)],at=Math.pow(2,$.zoom-Pe.tileID.overscaledZ),xt=P*Pe.queryPadding*i.a6/Pe.tileSize/at;for(let Et of Xe){let Bt=st.map((St=>Et.getTilePoint(new i.a7(St.x,St.y))));if(Bt.expandBy(xt),Bt.intersects(kt)){let St=Fe.map(($t=>Et.getTilePoint($t))),Pt=Ie.map(($t=>Et.getTilePoint($t)));H.push({tile:Pe,tileID:se?Et:Et.unwrapTo(0),queryGeometry:St,cameraQueryGeometry:Pt,scale:at})}}}return H}transformBbox(d,P,N){let H=d.map(P);if(N){let $=i.a8.fromPoints(d);$.shrinkBy(.001*Math.min($.width(),$.height()));let se=$.map(P);i.a8.fromPoints(H).covers(se)||(H=H.map((de=>de.x>.5?new i.a7(de.x-1,de.y,de.z):de)))}return H}getVisibleCoordinates(d){let P=this.getRenderableIds(d).map((N=>this._inViewTiles.getTileById(N).tileID));return this.transform&&this.transform.populateCache(P),P}hasTransition(){return!!this._source.hasTransition()||rr(this._source.type)&&(function(d,P){if(P<=0)return!1;let N=g();for(let H of d.getAllTiles())if(H.fadeEndTime>=N)return!0;return!1})(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(d){this._rasterFadeDuration=d}setFeatureState(d,P,N){d||(d=i.ag),this._state.updateState(d,P,N)}removeFeatureState(d,P,N){d||(d=i.ag),this._state.removeFeatureState(d,P,N)}getFeatureState(d,P){return d||(d=i.ag),this._state.getState(d,P)}setDependencies(d,P,N){let H=this._inViewTiles.getTileById(d);H&&H.setDependencies(P,N)}reloadTilesForDependencies(d,P){for(let N of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(N).hasDependency(d,P)&&this._reloadTile(N,"reloading");this._outOfViewCache.filter((N=>!N.hasDependency(d,P)))}areTilesLoaded(){for(let d of this._inViewTiles.getAllTiles())if(d.state!=="loaded"&&d.state!=="errored")return!1;return!0}}Zr.maxUnderzooming=10,Zr.maxOverzooming=3;class Cn{constructor(d,P){this.reset(d,P)}reset(d,P){this.points=d||[],this._distances=[0];for(let N=1;N0?(H-se)/de:0;return this.points[$].mult(1-Ae).add(this.points[P].mult(Ae))}}function Dt(Y,d){let P=!0;return Y==="always"||Y!=="never"&&d!=="never"||(P=!1),P}class At{constructor(d,P,N){let H=this.boxCells=[],$=this.circleCells=[];this.xCellCount=Math.ceil(d/N),this.yCellCount=Math.ceil(P/N);for(let se=0;sethis.width||H<0||P>this.height)return[];let Ae=[];if(d<=0&&P<=0&&this.width<=N&&this.height<=H){if($)return[{key:null,x1:d,y1:P,x2:N,y2:H}];for(let Fe=0;Fe0}hitTestCircle(d,P,N,H,$){let se=d-N,de=d+N,Ae=P-N,Fe=P+N;if(de<0||se>this.width||Fe<0||Ae>this.height)return!1;let Ie=[];return this._forEachCell(se,Ae,de,Fe,this._queryCellCircle,Ie,{hitTest:!0,overlapMode:H,circle:{x:d,y:P,radius:N},seenUids:{box:{},circle:{}}},$),Ie.length>0}_queryCell(d,P,N,H,$,se,de,Ae){let{seenUids:Fe,hitTest:Ie,overlapMode:Ye}=de,st=this.boxCells[$],ht=1e-6;if(st!==null){let Xe=this.bboxes;for(let at of st)if(!Fe.box[at]){Fe.box[at]=!0;let xt=4*at,Et=this.boxKeys[at];if(d<=Xe[xt+2]+ht&&P<=Xe[xt+3]+ht&&N>=Xe[xt+0]-ht&&H>=Xe[xt+1]-ht&&(!Ae||Ae(Et))&&(!Ie||!Dt(Ye,Et.overlapMode))&&(se.push({key:Et,x1:Xe[xt],y1:Xe[xt+1],x2:Xe[xt+2],y2:Xe[xt+3]}),Ie))return!0}}let Pe=this.circleCells[$];if(Pe!==null){let Xe=this.circles;for(let at of Pe)if(!Fe.circle[at]){Fe.circle[at]=!0;let xt=3*at,Et=this.circleKeys[at];if(this._circleAndRectCollide(Xe[xt],Xe[xt+1],Xe[xt+2],d,P,N,H)&&(!Ae||Ae(Et))&&(!Ie||!Dt(Ye,Et.overlapMode))){let Bt=Xe[xt],St=Xe[xt+1],Pt=Xe[xt+2];if(se.push({key:Et,x1:Bt-Pt,y1:St-Pt,x2:Bt+Pt,y2:St+Pt}),Ie)return!0}}}return!1}_queryCellCircle(d,P,N,H,$,se,de,Ae){let{circle:Fe,seenUids:Ie,overlapMode:Ye}=de,st=this.boxCells[$];if(st!==null){let Pe=this.bboxes;for(let Xe of st)if(!Ie.box[Xe]){Ie.box[Xe]=!0;let at=4*Xe,xt=this.boxKeys[Xe];if(this._circleAndRectCollide(Fe.x,Fe.y,Fe.radius,Pe[at+0],Pe[at+1],Pe[at+2],Pe[at+3])&&(!Ae||Ae(xt))&&!Dt(Ye,xt.overlapMode))return se.push(!0),!0}}let ht=this.circleCells[$];if(ht!==null){let Pe=this.circles;for(let Xe of ht)if(!Ie.circle[Xe]){Ie.circle[Xe]=!0;let at=3*Xe,xt=this.circleKeys[Xe];if(this._circlesCollide(Pe[at],Pe[at+1],Pe[at+2],Fe.x,Fe.y,Fe.radius)&&(!Ae||Ae(xt))&&!Dt(Ye,xt.overlapMode))return se.push(!0),!0}}}_forEachCell(d,P,N,H,$,se,de,Ae){let Fe=this._convertToXCellCoord(d),Ie=this._convertToYCellCoord(P),Ye=this._convertToXCellCoord(N),st=this._convertToYCellCoord(H);for(let ht=Fe;ht<=Ye;ht++)for(let Pe=Ie;Pe<=st;Pe++)if($.call(this,d,P,N,H,this.xCellCount*Pe+ht,se,de,Ae))return}_convertToXCellCoord(d){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(d*this.xScale)))}_convertToYCellCoord(d){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(d*this.yScale)))}_circlesCollide(d,P,N,H,$,se){let de=H-d,Ae=$-P,Fe=N+se;return Fe*Fe>de*de+Ae*Ae}_circleAndRectCollide(d,P,N,H,$,se,de){let Ae=(se-H)/2,Fe=Math.abs(d-(H+Ae));if(Fe>Ae+N)return!1;let Ie=(de-$)/2,Ye=Math.abs(P-($+Ie));if(Ye>Ie+N)return!1;if(Fe<=Ae||Ye<=Ie)return!0;let st=Fe-Ae,ht=Ye-Ie;return st*st+ht*ht<=N*N}}function Vt(Y,d){let P=1/(d[0]*d[0]+d[1]*d[1]+d[2]*d[2]),N=1/(d[8]*d[8]+d[9]*d[9]+d[10]*d[10]),H=d[0]*P,$=d[4]*P,se=d[8]*N,de=d[1]*P,Ae=d[5]*P,Fe=d[9]*N,Ie=d[2]*P,Ye=d[6]*P,st=d[10]*N;Y[0]=H,Y[1]=$,Y[2]=se,Y[4]=de,Y[5]=Ae,Y[6]=Fe,Y[8]=Ie,Y[9]=Ye,Y[10]=st;let ht=d[12],Pe=d[13],Xe=d[14];return Y[12]=-H*ht-de*Pe-Ie*Xe,Y[13]=-$*ht-Ae*Pe-Ye*Xe,Y[14]=-se*ht-Fe*Pe-st*Xe,Y[3]=0,Y[7]=0,Y[11]=0,Y[15]=1,Y}let Qt=i.O();function Ut(Y,d,P){let N=i.O();if(!Y){let{vecSouth:Ye,vecEast:st}=rn(d),ht=s();ht[0]=st[0],ht[1]=st[1],ht[2]=Ye[0],ht[3]=Ye[1],H=ht,(Ie=(se=($=ht)[0])*(Fe=$[3])-(Ae=$[2])*(de=$[1]))&&(H[0]=Fe*(Ie=1/Ie),H[1]=-de*Ie,H[2]=-Ae*Ie,H[3]=se*Ie),N[0]=ht[0],N[1]=ht[1],N[4]=ht[2],N[5]=ht[3]}var H,$,se,de,Ae,Fe,Ie;return i.S(N,N,[1/P,1/P,1]),N}function _r(Y,d,P,N){if(Y){let H=i.O();if(!d){let{vecSouth:$,vecEast:se}=rn(P);H[0]=se[0],H[1]=se[1],H[4]=$[0],H[5]=$[1]}return i.S(H,H,[N,N,1]),H}return P.pixelsToClipSpaceMatrix}function rn(Y){let d=Math.cos(Y.rollInRadians),P=Math.sin(Y.rollInRadians),N=Math.cos(Y.pitchInRadians),H=Math.cos(Y.bearingInRadians),$=Math.sin(Y.bearingInRadians),se=i.az();se[0]=-H*N*P-$*d,se[1]=-$*N*P+H*d;let de=i.aA(se);de<1e-9?i.aB(se):i.aC(se,se,1/de);let Ae=i.az();Ae[0]=H*N*d-$*P,Ae[1]=$*N*d+H*P;let Fe=i.aA(Ae);return Fe<1e-9?i.aB(Ae):i.aC(Ae,Ae,1/Fe),{vecEast:Ae,vecSouth:se}}function Jr(Y,d,P,N){let H;N?(H=[Y,d,N(Y,d),1],i.aE(H,H,P)):(H=[Y,d,0,1],ao(H,H,P));let $=H[3];return{point:new i.P(H[0]/$,H[1]/$),signedDistanceFromCamera:$,isOccluded:!1}}function qn(Y,d){return .5+Y/d*.5}function ri(Y,d){return Y.x>=-d[0]&&Y.x<=d[0]&&Y.y>=-d[1]&&Y.y<=d[1]}function Jn(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st){let ht=P?Y.textSizeData:Y.iconSizeData,Pe=i.aw(ht,d.transform.zoom),Xe=[256/d.width*2+1,256/d.height*2+1],at=P?Y.text.dynamicLayoutVertexArray:Y.icon.dynamicLayoutVertexArray;at.clear();let xt=Y.lineVertexArray,Et=P?Y.text.placedSymbolArray:Y.icon.placedSymbolArray,Bt=d.transform.width/d.transform.height,St=!1;for(let Pt=0;PtMath.abs(P.x-d.x)*N?{useVertical:!0}:(Y===i.ax.vertical?d.yP.x)?{needsFlipping:!0}:null}function ra(Y){let{projectionContext:d,pitchedLabelPlaneMatrixInverse:P,symbol:N,fontSize:H,flip:$,keepUpright:se,glyphOffsetArray:de,dynamicLayoutVertexArray:Ae,aspectRatio:Fe,rotateToLine:Ie}=Y,Ye=H/24,st=N.lineOffsetX*Ye,ht=N.lineOffsetY*Ye,Pe;if(N.numGlyphs>1){let Xe=N.glyphStartIndex+N.numGlyphs,at=N.lineStartIndex,xt=N.lineStartIndex+N.lineLength,Et=Ii(Ye,de,st,ht,$,N,Ie,d);if(!Et)return{notEnoughRoom:!0};let Bt=oa(Et.first.point.x,Et.first.point.y,d,P),St=oa(Et.last.point.x,Et.last.point.y,d,P);if(se&&!$){let Pt=Vi(N.writingMode,Bt,St,Fe);if(Pt)return Pt}Pe=[Et.first];for(let Pt=N.glyphStartIndex+1;Pt0?Bt.point:ha(d.tileAnchorPoint,Et,at,1,d),Pt=oa(at.x,at.y,d,P),$t=oa(St.x,St.y,d,P),Ht=Vi(N.writingMode,Pt,$t,Fe);if(Ht)return Ht}let Xe=yo(Ye*de.getoffsetX(N.glyphStartIndex),st,ht,$,N.segment,N.lineStartIndex,N.lineStartIndex+N.lineLength,d,Ie);if(!Xe||d.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Pe=[Xe]}for(let Xe of Pe)i.aD(Ae,Xe.point,Xe.angle);return{}}function ha(Y,d,P,N,H){let $=Y.add(Y.sub(d)._unit()),se=Xi($.x,$.y,H).point,de=P.sub(se);return P.add(de._mult(N/de.mag()))}function va(Y,d,P){let N=d.projectionCache;if(N.projections[Y])return N.projections[Y];let H=new i.P(d.lineVertexArray.getx(Y),d.lineVertexArray.gety(Y)),$=Xi(H.x,H.y,d);if($.signedDistanceFromCamera>0)return N.projections[Y]=$.point,N.anyProjectionOccluded||(N.anyProjectionOccluded=$.isOccluded),$.point;let se=Y-P.direction;return ha(P.distanceFromAnchor===0?d.tileAnchorPoint:new i.P(d.lineVertexArray.getx(se),d.lineVertexArray.gety(se)),H,P.previousVertex,P.absOffsetX-P.distanceFromAnchor+1,d)}function Xi(Y,d,P){let N=Y+P.translation[0],H=d+P.translation[1],$;return P.pitchWithMap?($=Jr(N,H,P.pitchedLabelPlaneMatrix,P.getElevation),$.isOccluded=!1):($=P.transform.projectTileCoordinates(N,H,P.unwrappedTileID,P.getElevation),$.point.x=(.5*$.point.x+.5)*P.width,$.point.y=(.5*-$.point.y+.5)*P.height),$}function oa(Y,d,P,N){if(P.pitchWithMap){let H=[Y,d,0,1];return i.aE(H,H,N),P.transform.projectTileCoordinates(H[0]/H[3],H[1]/H[3],P.unwrappedTileID,P.getElevation).point}return{x:Y/P.width*2-1,y:1-d/P.height*2}}function Ma(Y,d,P){return P.transform.projectTileCoordinates(Y,d,P.unwrappedTileID,P.getElevation)}function Ga(Y,d,P){return Y._unit()._perp()._mult(d*P)}function ss(Y,d,P,N,H,$,se,de,Ae){if(de.projectionCache.offsets[Y])return de.projectionCache.offsets[Y];let Fe=P.add(d);if(Y+Ae.direction=H)return de.projectionCache.offsets[Y]=Fe,Fe;let Ie=va(Y+Ae.direction,de,Ae),Ye=Ga(Ie.sub(P),se,Ae.direction),st=P.add(Ye),ht=Ie.add(Ye);return de.projectionCache.offsets[Y]=i.aF($,Fe,st,ht)||Fe,de.projectionCache.offsets[Y]}function yo(Y,d,P,N,H,$,se,de,Ae){let Fe=N?Y-d:Y+d,Ie=Fe>0?1:-1,Ye=0;N&&(Ie*=-1,Ye=Math.PI),Ie<0&&(Ye+=Math.PI);let st,ht=Ie>0?$+H:$+H+1;de.projectionCache.cachedAnchorPoint?st=de.projectionCache.cachedAnchorPoint:(st=Xi(de.tileAnchorPoint.x,de.tileAnchorPoint.y,de).point,de.projectionCache.cachedAnchorPoint=st);let Pe,Xe,at=st,xt=st,Et=0,Bt=0,St=Math.abs(Fe),Pt=[],$t;for(;Et+Bt<=St;){if(ht+=Ie,ht<$||ht>=se)return null;Et+=Bt,xt=at,Xe=Pe;let Xr={absOffsetX:St,direction:Ie,distanceFromAnchor:Et,previousVertex:xt};if(at=va(ht,de,Xr),P===0)Pt.push(xt),$t=at.sub(xt);else{let Or,$r=at.sub(xt);Or=$r.mag()===0?Ga(va(ht+Ie,de,Xr).sub(at),P,Ie):Ga($r,P,Ie),Xe||(Xe=xt.add(Or)),Pe=ss(ht,Or,at,$,se,Xe,P,de,Xr),Pt.push(Xe),$t=Pe.sub(Xe)}Bt=$t.mag()}let Ht=$t._mult((St-Et)/Bt)._add(Xe||xt),dr=Ye+Math.atan2(at.y-xt.y,at.x-xt.x);return Pt.push(Ht),{point:Ht,angle:Ae?dr:0,path:Pt}}let sl=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ko(Y,d){for(let P=0;P=1;on--)Rr.push(Er.path[on]);for(let on=1;onNn.signedDistanceFromCamera<=0))?[]:on.map((Nn=>Nn.point))}let an=[];if(Rr.length>0){let on=Rr[0].clone(),Nn=Rr[0].clone();for(let Yn=1;Yn=Xr.x&&Nn.x<=Or.x&&on.y>=Xr.y&&Nn.y<=Or.y?[Rr]:Nn.xOr.x||Nn.yOr.y?[]:i.aG([Rr],Xr.x,Xr.y,Or.x,Or.y)}for(let on of an){$r.reset(on,.25*dr);let Nn=0;Nn=$r.length<=.5*dr?1:Math.ceil($r.paddedLength/Lr)+1;for(let Yn=0;Yn{let Ae=Jr(de.x,de.y,se,$.getElevation),Fe=$.transform.projectTileCoordinates(Ae.point.x,Ae.point.y,$.unwrappedTileID,$.getElevation);return Fe.point.x=(.5*Fe.point.x+.5)*$.width,Fe.point.y=(.5*-Fe.point.y+.5)*$.height,Fe}))})(d,P);return(function(H){let $=0,se=0,de=0,Ae=0;for(let Fe=0;Fese&&(se=Ae,$=de));return H.slice($,$+se)})(N)}queryRenderedSymbols(d){if(d.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let P=[],N=new i.a8;for(let Ye of d){let st=new i.P(Ye.x+Da,Ye.y+Da);N.extend(st),P.push(st)}let{minX:H,minY:$,maxX:se,maxY:de}=N,Ae=this.grid.query(H,$,se,de).concat(this.ignoredGrid.query(H,$,se,de)),Fe={},Ie={};for(let Ye of Ae){let st=Ye.key;if(Fe[st.bucketInstanceId]===void 0&&(Fe[st.bucketInstanceId]={}),Fe[st.bucketInstanceId][st.featureIndex])continue;let ht=[new i.P(Ye.x1,Ye.y1),new i.P(Ye.x2,Ye.y1),new i.P(Ye.x2,Ye.y2),new i.P(Ye.x1,Ye.y2)];i.aH(P,ht)&&(Fe[st.bucketInstanceId][st.featureIndex]=!0,Ie[st.bucketInstanceId]===void 0&&(Ie[st.bucketInstanceId]=[]),Ie[st.bucketInstanceId].push(st.featureIndex))}return Ie}insertCollisionBox(d,P,N,H,$,se){(N?this.ignoredGrid:this.grid).insert({bucketInstanceId:H,featureIndex:$,collisionGroupID:se,overlapMode:P},d[0],d[1],d[2],d[3])}insertCollisionCircles(d,P,N,H,$,se){let de=N?this.ignoredGrid:this.grid,Ae={bucketInstanceId:H,featureIndex:$,collisionGroupID:se,overlapMode:P};for(let Fe=0;Fe=this.screenRightBoundary||Hthis.screenBottomBoundary}isInsideGrid(d,P,N,H){return N>=0&&d=0&&Pthis.projectAndGetPerspectiveRatio(Lr.x,Lr.y,H,Fe,Ye)));Tr=Rr.some((Lr=>!Lr.isOccluded)),Er=Rr.map((Lr=>new i.P(Lr.x,Lr.y)))}else Tr=!0;return{box:i.aI(Er),allPointsOccluded:!Tr}}}class wo{constructor(d,P,N,H){this.opacity=d?Math.max(0,Math.min(1,d.opacity+(d.placed?P:-P))):H&&N?1:0,this.placed=N}isHidden(){return this.opacity===0&&!this.placed}}class Zs{constructor(d,P,N,H,$){this.text=new wo(d?d.text:null,P,N,$),this.icon=new wo(d?d.icon:null,P,H,$)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class su{constructor(d,P,N){this.text=d,this.icon=P,this.skipFade=N}}class fc{constructor(d,P,N,H,$){this.bucketInstanceId=d,this.featureIndex=P,this.sourceLayerIndex=N,this.bucketIndex=H,this.tileID=$}}class Af{constructor(d){this.crossSourceCollisions=d,this.maxGroupID=0,this.collisionGroups={}}get(d){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[d]){let P=++this.maxGroupID;this.collisionGroups[d]={ID:P,predicate:N=>N.collisionGroupID===P}}return this.collisionGroups[d]}}function ct(Y,d,P,N,H){let{horizontalAlign:$,verticalAlign:se}=i.aP(Y);return new i.P(-($-.5)*d+N[0]*H,-(se-.5)*P+N[1]*H)}class Jt{constructor(d,P,N,H,$){this.transform=d.clone(),this.terrain=P,this.collisionIndex=new bl(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=N,this.retainedQueryData={},this.collisionGroups=new Af(H),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=$,$&&($.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(d){let P=this.terrain;return P?(N,H)=>P.getElevation(d,N,H):null}getBucketParts(d,P,N,H){let $=N.getBucket(P),se=N.latestFeatureIndex;if(!$||!se||P.id!==$.layerIds[0])return;let de=N.collisionBoxArray,Ae=$.layers[0].layout,Fe=$.layers[0].paint,Ie=Math.pow(2,this.transform.zoom-N.tileID.overscaledZ),Ye=N.tileSize/i.a6,st=N.tileID.toUnwrapped(),ht=Ae.get("text-rotation-alignment")==="map",Pe=i.aK(N,1,this.transform.zoom),Xe=i.aL(this.collisionIndex.transform,N,Fe.get("text-translate"),Fe.get("text-translate-anchor")),at=i.aL(this.collisionIndex.transform,N,Fe.get("icon-translate"),Fe.get("icon-translate-anchor")),xt=Ut(ht,this.transform,Pe);this.retainedQueryData[$.bucketInstanceId]=new fc($.bucketInstanceId,se,$.sourceLayerIndex,$.index,N.tileID);let Et={bucket:$,layout:Ae,translationText:Xe,translationIcon:at,unwrappedTileID:st,pitchedLabelPlaneMatrix:xt,scale:Ie,textPixelRatio:Ye,holdingForFade:N.holdingForSymbolFade(),collisionBoxArray:de,partiallyEvaluatedTextSize:i.aw($.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get($.sourceID)};if(H)for(let Bt of $.sortKeyRanges){let{sortKey:St,symbolInstanceStart:Pt,symbolInstanceEnd:$t}=Bt;d.push({sortKey:St,symbolInstanceStart:Pt,symbolInstanceEnd:$t,parameters:Et})}else d.push({symbolInstanceStart:0,symbolInstanceEnd:$.symbolInstances.length,parameters:Et})}attemptAnchorPlacement(d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st,ht,Pe,Xe,at,xt,Et,Bt,St){var Pt,$t,Ht;let dr=i.aM[d.textAnchor],Xr=[d.textOffset0,d.textOffset1],Or=ct(dr,N,H,Xr,$),$r=this.collisionIndex.placeCollisionBox(P,st,Ae,Fe,Ie,de,se,at,Ye.predicate,Bt,Or,St);if((!Et||this.collisionIndex.placeCollisionBox(Et,st,Ae,Fe,Ie,de,se,xt,Ye.predicate,Bt,Or,St).placeable)&&$r.placeable){let Er;if(!((Pt=this.prevPlacement)===null||Pt===void 0)&&Pt.variableOffsets[ht.crossTileID]&&(!((Ht=($t=this.prevPlacement)===null||$t===void 0?void 0:$t.placements[ht.crossTileID])===null||Ht===void 0)&&Ht.text)&&(Er=this.prevPlacement.variableOffsets[ht.crossTileID].anchor),ht.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[ht.crossTileID]={textOffset:Xr,width:N,height:H,anchor:dr,textBoxScale:$,prevAnchor:Er},this.markUsedJustification(Pe,dr,ht,Xe),Pe.allowVerticalPlacement&&(this.markUsedOrientation(Pe,Xe,ht),this.placedOrientations[ht.crossTileID]=Xe),{shift:Or,placedGlyphBoxes:$r}}}placeLayerBucketPart(d,P,N){let{bucket:H,layout:$,translationText:se,translationIcon:de,unwrappedTileID:Ae,pitchedLabelPlaneMatrix:Fe,textPixelRatio:Ie,holdingForFade:Ye,collisionBoxArray:st,partiallyEvaluatedTextSize:ht,collisionGroup:Pe}=d.parameters,Xe=$.get("text-optional"),at=$.get("icon-optional"),xt=i.aN($,"text-overlap","text-allow-overlap"),Et=xt==="always",Bt=i.aN($,"icon-overlap","icon-allow-overlap"),St=Bt==="always",Pt=$.get("text-rotation-alignment")==="map",$t=$.get("text-pitch-alignment")==="map",Ht=$.get("icon-text-fit")!=="none",dr=$.get("symbol-z-order")==="viewport-y",Xr=Et&&(St||!H.hasIconData()||at),Or=St&&(Et||!H.hasTextData()||Xe);!H.collisionArrays&&st&&H.deserializeCollisionBoxes(st);let $r=this.retainedQueryData[H.bucketInstanceId].tileID,Er=this._getTerrainElevationFunc($r),Tr=this.transform.getFastPathSimpleProjectionMatrix($r),Rr=(Lr,an,on)=>{var Nn,Yn;if(P[Lr.crossTileID])return;if(Ye)return void(this.placements[Lr.crossTileID]=new su(!1,!1,!1));let yi=!1,Sn=!1,An=!0,li=null,Vn={box:null,placeable:!1,offscreen:null,occluded:!1},jn={placeable:!1},Wn=null,si=null,zi=null,da=0,ui=0,Li=0;an.textFeatureIndex?da=an.textFeatureIndex:Lr.useRuntimeCollisionCircles&&(da=Lr.featureIndex),an.verticalTextFeatureIndex&&(ui=an.verticalTextFeatureIndex);let Ki=an.textBox;if(Ki){let Ss=bo=>{let po=i.ax.horizontal;if(H.allowVerticalPlacement&&!bo&&this.prevPlacement){let $o=this.prevPlacement.placedOrientations[Lr.crossTileID];$o&&(this.placedOrientations[Lr.crossTileID]=$o,po=$o,this.markUsedOrientation(H,po,Lr))}return po},Na=(bo,po)=>{if(H.allowVerticalPlacement&&Lr.numVerticalGlyphVertices>0&&an.verticalTextBox){for(let $o of H.writingModes)if($o===i.ax.vertical?(Vn=po(),jn=Vn):Vn=bo(),Vn==null?void 0:Vn.placeable)break}else Vn=bo()},Ns=Lr.textAnchorOffsetStartIndex,vo=Lr.textAnchorOffsetEndIndex;if(vo===Ns){let bo=(po,$o)=>{let no=this.collisionIndex.placeCollisionBox(po,xt,Ie,$r,Ae,$t,Pt,se,Pe.predicate,Er,void 0,Tr);return no!=null&&no.placeable&&(this.markUsedOrientation(H,$o,Lr),this.placedOrientations[Lr.crossTileID]=$o),no};Na((()=>bo(Ki,i.ax.horizontal)),(()=>{let po=an.verticalTextBox;return H.allowVerticalPlacement&&Lr.numVerticalGlyphVertices>0&&po?bo(po,i.ax.vertical):{box:null,offscreen:null}})),Ss(Vn==null?void 0:Vn.placeable)}else{let bo=i.aM[(Yn=(Nn=this.prevPlacement)===null||Nn===void 0?void 0:Nn.variableOffsets[Lr.crossTileID])===null||Yn===void 0?void 0:Yn.anchor],po=(no,Us,ql)=>{let Ta=no.x2-no.x1,vu=no.y2-no.y1,ys=Lr.textBoxScale,xc=Ht&&Bt==="never"?Us:null,Zl=null,$l=xt==="never"?1:2,xa="never";bo&&$l++;for(let uo=0;uo<$l;uo++){for(let Es=Ns;Espo(Ki,an.iconBox,i.ax.horizontal)),(()=>{let no=an.verticalTextBox;return H.allowVerticalPlacement&&!(Vn!=null&&Vn.placeable)&&Lr.numVerticalGlyphVertices>0&&no?po(no,an.verticalIconBox,i.ax.vertical):{box:null,occluded:!0,offscreen:null}})),Vn&&(yi=Vn.placeable,An=Vn.offscreen);let $o=Ss(Vn==null?void 0:Vn.placeable);if(!yi&&this.prevPlacement){let no=this.prevPlacement.variableOffsets[Lr.crossTileID];no&&(this.variableOffsets[Lr.crossTileID]=no,this.markUsedJustification(H,no.anchor,Lr,$o))}}}if(Wn=Vn,yi=Wn==null?void 0:Wn.placeable,An=Wn==null?void 0:Wn.offscreen,Lr.useRuntimeCollisionCircles&&Lr.centerJustifiedTextSymbolIndex>=0){let Ss=H.text.placedSymbolArray.get(Lr.centerJustifiedTextSymbolIndex),Na=i.ay(H.textSizeData,ht,Ss),Ns=$.get("text-padding");si=this.collisionIndex.placeCollisionCircles(xt,Ss,H.lineVertexArray,H.glyphOffsetArray,Na,Ae,Fe,N,$t,Pe.predicate,Lr.collisionCircleDiameter,Ns,se,Er),si.circles.length&&si.collisionDetected&&!N&&i.w("Collisions detected, but collision boxes are not shown"),yi=Et||si.circles.length>0&&!si.collisionDetected,An&&(An=si.offscreen)}if(an.iconFeatureIndex&&(Li=an.iconFeatureIndex),an.iconBox){let Ss=Na=>this.collisionIndex.placeCollisionBox(Na,Bt,Ie,$r,Ae,$t,Pt,de,Pe.predicate,Er,Ht&&li?li:void 0,Tr);jn&&jn.placeable&&an.verticalIconBox?(zi=Ss(an.verticalIconBox),Sn=zi.placeable):(zi=Ss(an.iconBox),Sn=zi.placeable),An&&(An=zi.offscreen)}let ca=Xe||Lr.numHorizontalGlyphVertices===0&&Lr.numVerticalGlyphVertices===0,Ia=at||Lr.numIconVertices===0;ca||Ia?Ia?ca||Sn&&(Sn=yi):yi=Sn&&yi:Sn=yi=Sn&&yi;let Os=Sn&&zi.placeable;if(yi&&Wn.placeable&&this.collisionIndex.insertCollisionBox(Wn.box,xt,$.get("text-ignore-placement"),H.bucketInstanceId,jn&&jn.placeable&&ui?ui:da,Pe.ID),Os&&this.collisionIndex.insertCollisionBox(zi.box,Bt,$.get("icon-ignore-placement"),H.bucketInstanceId,Li,Pe.ID),si&&yi&&this.collisionIndex.insertCollisionCircles(si.circles,xt,$.get("text-ignore-placement"),H.bucketInstanceId,da,Pe.ID),N&&this.storeCollisionData(H.bucketInstanceId,on,an,Wn,zi,si),Lr.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(H.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[Lr.crossTileID]=new su((yi||Xr)&&!(Wn!=null&&Wn.occluded),(Sn||Or)&&!(zi!=null&&zi.occluded),An||H.justReloaded),P[Lr.crossTileID]=!0};if(dr){if(d.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let Lr=H.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let an=Lr.length-1;an>=0;--an){let on=Lr[an];Rr(H.symbolInstances.get(on),H.collisionArrays[on],on)}}else for(let Lr=d.symbolInstanceStart;Lr=0&&(d.text.placedSymbolArray.get(de).crossTileID=$>=0&&de!==$?0:N.crossTileID)}markUsedOrientation(d,P,N){let H=P===i.ax.horizontal||P===i.ax.horizontalOnly?P:0,$=P===i.ax.vertical?P:0,se=[N.leftJustifiedTextSymbolIndex,N.centerJustifiedTextSymbolIndex,N.rightJustifiedTextSymbolIndex];for(let de of se)d.text.placedSymbolArray.get(de).placedOrientation=H;N.verticalPlacedTextSymbolIndex&&(d.text.placedSymbolArray.get(N.verticalPlacedTextSymbolIndex).placedOrientation=$)}commit(d){this.commitTime=d,this.zoomAtLastRecencyCheck=this.transform.zoom;let P=this.prevPlacement,N=!1;this.prevZoomAdjustment=P?P.zoomAdjustment(this.transform.zoom):0;let H=P?P.symbolFadeChange(d):1,$=P?P.opacities:{},se=P?P.variableOffsets:{},de=P?P.placedOrientations:{};for(let Ae in this.placements){let Fe=this.placements[Ae],Ie=$[Ae];Ie?(this.opacities[Ae]=new Zs(Ie,H,Fe.text,Fe.icon),N||(N=Fe.text!==Ie.text.placed),N||(N=Fe.icon!==Ie.icon.placed)):(this.opacities[Ae]=new Zs(null,H,Fe.text,Fe.icon,Fe.skipFade),N||(N=Fe.text||Fe.icon))}for(let Ae in $){let Fe=$[Ae];if(!this.opacities[Ae]){let Ie=new Zs(Fe,H,!1,!1);Ie.isHidden()||(this.opacities[Ae]=Ie,N||(N=Fe.text.placed),N||(N=Fe.icon.placed))}}for(let Ae in se)this.variableOffsets[Ae]||!this.opacities[Ae]||this.opacities[Ae].isHidden()||(this.variableOffsets[Ae]=se[Ae]);for(let Ae in de)this.placedOrientations[Ae]||!this.opacities[Ae]||this.opacities[Ae].isHidden()||(this.placedOrientations[Ae]=de[Ae]);if(P&&P.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");N?this.lastPlacementChangeTime=d:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=P?P.lastPlacementChangeTime:d)}updateLayerOpacities(d,P){let N={};for(let H of P){let $=H.getBucket(d);$&&H.latestFeatureIndex&&d.id===$.layerIds[0]&&this.updateBucketOpacities($,H.tileID,N,H.collisionBoxArray)}}updateBucketOpacities(d,P,N,H){d.hasTextData()&&(d.text.opacityVertexArray.clear(),d.text.hasVisibleVertices=!1),d.hasIconData()&&(d.icon.opacityVertexArray.clear(),d.icon.hasVisibleVertices=!1),d.hasIconCollisionBoxData()&&d.iconCollisionBox.collisionVertexArray.clear(),d.hasTextCollisionBoxData()&&d.textCollisionBox.collisionVertexArray.clear();let $=d.layers[0],se=$.layout,de=new Zs(null,0,!1,!1,!0),Ae=se.get("text-allow-overlap"),Fe=se.get("icon-allow-overlap"),Ie=$._unevaluatedLayout.hasValue("text-variable-anchor")||$._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ye=se.get("text-rotation-alignment")==="map",st=se.get("text-pitch-alignment")==="map",ht=se.get("icon-text-fit")!=="none",Pe=new Zs(null,0,Ae&&(Fe||!d.hasIconData()||se.get("icon-optional")),Fe&&(Ae||!d.hasTextData()||se.get("text-optional")),!0);!d.collisionArrays&&H&&(d.hasIconCollisionBoxData()||d.hasTextCollisionBoxData())&&d.deserializeCollisionBoxes(H);let Xe=(xt,Et,Bt)=>{for(let St=0;St0,dr=this.placedOrientations[Et.crossTileID],Xr=dr===i.ax.vertical,Or=dr===i.ax.horizontal||dr===i.ax.horizontalOnly;if(Bt>0||St>0){let Er=Qn($t.text);Xe(d.text,Bt,Xr?Ai:Er),Xe(d.text,St,Or?Ai:Er);let Tr=$t.text.isHidden(),Rr=[Et.rightJustifiedTextSymbolIndex,Et.centerJustifiedTextSymbolIndex,Et.leftJustifiedTextSymbolIndex];for(let on of Rr)on>=0&&(d.text.placedSymbolArray.get(on).hidden=Tr||Xr?1:0);Et.verticalPlacedTextSymbolIndex>=0&&(d.text.placedSymbolArray.get(Et.verticalPlacedTextSymbolIndex).hidden=Tr||Or?1:0);let Lr=this.variableOffsets[Et.crossTileID];Lr&&this.markUsedJustification(d,Lr.anchor,Et,dr);let an=this.placedOrientations[Et.crossTileID];an&&(this.markUsedJustification(d,"left",Et,an),this.markUsedOrientation(d,an,Et))}if(Ht){let Er=Qn($t.icon),Tr=!(ht&&Et.verticalPlacedIconSymbolIndex&&Xr);Et.placedIconSymbolIndex>=0&&(Xe(d.icon,Et.numIconVertices,Tr?Er:Ai),d.icon.placedSymbolArray.get(Et.placedIconSymbolIndex).hidden=$t.icon.isHidden()),Et.verticalPlacedIconSymbolIndex>=0&&(Xe(d.icon,Et.numVerticalIconVertices,Tr?Ai:Er),d.icon.placedSymbolArray.get(Et.verticalPlacedIconSymbolIndex).hidden=$t.icon.isHidden())}let $r=at!=null&&at.has(xt)?at.get(xt):{text:null,icon:null};if(d.hasIconCollisionBoxData()||d.hasTextCollisionBoxData()){let Er=d.collisionArrays[xt];if(Er){let Tr=new i.P(0,0);if(Er.textBox||Er.verticalTextBox){let Rr=!0;if(Ie){let Lr=this.variableOffsets[Pt];Lr?(Tr=ct(Lr.anchor,Lr.width,Lr.height,Lr.textOffset,Lr.textBoxScale),Ye&&Tr._rotate(st?-this.transform.bearingInRadians:this.transform.bearingInRadians)):Rr=!1}if(Er.textBox||Er.verticalTextBox){let Lr;Er.textBox&&(Lr=Xr),Er.verticalTextBox&&(Lr=Or),er(d.textCollisionBox.collisionVertexArray,$t.text.placed,!Rr||Lr,$r.text,Tr.x,Tr.y)}}if(Er.iconBox||Er.verticalIconBox){let Rr=!!(!Or&&Er.verticalIconBox),Lr;Er.iconBox&&(Lr=Rr),Er.verticalIconBox&&(Lr=!Rr),er(d.iconCollisionBox.collisionVertexArray,$t.icon.placed,Lr,$r.icon,ht?Tr.x:0,ht?Tr.y:0)}}}}if(d.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[d.bucketInstanceId]&&(this.retainedQueryData[d.bucketInstanceId].featureSortOrder=d.featureSortOrder),d.hasTextData()&&d.text.opacityVertexBuffer&&d.text.opacityVertexBuffer.updateData(d.text.opacityVertexArray),d.hasIconData()&&d.icon.opacityVertexBuffer&&d.icon.opacityVertexBuffer.updateData(d.icon.opacityVertexArray),d.hasIconCollisionBoxData()&&d.iconCollisionBox.collisionVertexBuffer&&d.iconCollisionBox.collisionVertexBuffer.updateData(d.iconCollisionBox.collisionVertexArray),d.hasTextCollisionBoxData()&&d.textCollisionBox.collisionVertexBuffer&&d.textCollisionBox.collisionVertexBuffer.updateData(d.textCollisionBox.collisionVertexArray),d.text.opacityVertexArray.length!==d.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${d.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${d.text.layoutVertexArray.length}) / 4`);if(d.icon.opacityVertexArray.length!==d.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${d.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${d.icon.layoutVertexArray.length}) / 4`);d.bucketInstanceId in this.collisionCircleArrays&&(d.collisionCircleArray=this.collisionCircleArrays[d.bucketInstanceId],delete this.collisionCircleArrays[d.bucketInstanceId])}symbolFadeChange(d){return this.fadeDuration===0?1:(d-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(d){return Math.max(0,(this.transform.zoom-d)/1.5)}hasTransitions(d){return this.stale||d-this.lastPlacementChangeTimed}setStale(){this.stale=!0}}function er(Y,d,P,N,H,$){N&&N.length!==0||(N=[0,0,0,0]);let se=N[0]-Da,de=N[1]-Da,Ae=N[2]-Da,Fe=N[3]-Da;Y.emplaceBack(d?1:0,P?1:0,H||0,$||0,se,de),Y.emplaceBack(d?1:0,P?1:0,H||0,$||0,Ae,de),Y.emplaceBack(d?1:0,P?1:0,H||0,$||0,Ae,Fe),Y.emplaceBack(d?1:0,P?1:0,H||0,$||0,se,Fe)}let wr=Math.pow(2,25),nn=Math.pow(2,24),Dr=Math.pow(2,17),bn=Math.pow(2,16),Yr=Math.pow(2,9),Tn=Math.pow(2,8),Kn=Math.pow(2,1);function Qn(Y){if(Y.opacity===0&&!Y.placed)return 0;if(Y.opacity===1&&Y.placed)return 4294967295;let d=Y.placed?1:0,P=Math.floor(127*Y.opacity);return P*wr+d*nn+P*Dr+d*bn+P*Yr+d*Tn+P*Kn+d}let Ai=0;class Qi{constructor(d){this._sortAcrossTiles=d.layout.get("symbol-z-order")!=="viewport-y"&&!d.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(d,P,N,H,$){let se=this._bucketParts;for(;this._currentTileIndexde.sortKey-Ae.sortKey)));this._currentPartIndex!this._forceFullPlacement&&g()-H>2;for(;this._currentPlacementIndex>=0;){let se=P[d[this._currentPlacementIndex]],de=this.placement.collisionIndex.transform.zoom;if(i.aQ(se)&&se.layout&&(!se.minzoom||se.minzoom<=de)&&(!se.maxzoom||se.maxzoom>de)){if(this._inProgressLayer||(this._inProgressLayer=new Qi(se)),this._inProgressLayer.continuePlacement(N[se.source],this.placement,this._showCollisionBoxes,se,$))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(d){return this.placement.commit(d),this.placement}}let ii=512/i.a6/2;class Za{constructor(d,P,N){this.tileID=d,this.bucketInstanceId=N,this._symbolsByKey={};let H=new Map;for(let $=0;$({x:Math.floor(Ae.anchorX*ii),y:Math.floor(Ae.anchorY*ii)}))),crossTileIDs:se.map((Ae=>Ae.crossTileID))};if(de.positions.length>128){let Ae=new i.aR(de.positions.length,16,Uint16Array);for(let{x:Fe,y:Ie}of de.positions)Ae.add(Fe,Ie);Ae.finish(),delete de.positions,de.index=Ae}this._symbolsByKey[$]=de}}getScaledCoordinates(d,P){let{x:N,y:H,z:$}=this.tileID.canonical,{x:se,y:de,z:Ae}=P.canonical,Fe=ii/Math.pow(2,Ae-$),Ie=(de*i.a6+d.anchorY)*Fe,Ye=H*i.a6*ii;return{x:Math.floor((se*i.a6+d.anchorX)*Fe-N*i.a6*ii),y:Math.floor(Ie-Ye)}}findMatches(d,P,N){let H=this.tileID.canonical.zd))}}class ja{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class qo{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(d){let P=Math.round((d-this.lng)/360);if(P!==0)for(let N in this.indexes){let H=this.indexes[N],$={};for(let se in H){let de=H[se];de.tileID=de.tileID.unwrapTo(de.tileID.wrap+P),$[de.tileID.key]=de}this.indexes[N]=$}this.lng=d}addBucket(d,P,N){var H,$,se;if(!((H=this.indexes[d.overscaledZ])===null||H===void 0)&&H[d.key]){if(this.indexes[d.overscaledZ][d.key].bucketInstanceId===P.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(d.overscaledZ,this.indexes[d.overscaledZ][d.key])}for(let Ae=0;Aed.overscaledZ)for(let Ie in Fe){let Ye=Fe[Ie];Ye.tileID.isChildOf(d)&&Ye.findMatches(P.symbolInstances,d,de)}else{let Ie=Fe[d.scaledTo(Number(Ae)).key];Ie&&Ie.findMatches(P.symbolInstances,d,de)}}for(let Ae=0;Ae{let dt=Ye==="float"?"vec2":"vec4",Pe=st.match(/color/)?"color":dt;return de[st]?Fe==="define"?` +`))),vertexSource:d=d.replace(P,((Ae,Fe,Ie,Ye,st)=>{let ht=Ye==="float"?"vec2":"vec4",Pe=st.match(/color/)?"color":ht;return de[st]?Fe==="define"?` #ifndef HAS_UNIFORM_u_${st} uniform lowp float u_${st}_t; -in ${Ie} ${dt} a_${st}; +in ${Ie} ${ht} a_${st}; out ${Ie} ${Ye} ${st}; #else uniform ${Ie} ${Ye} u_${st}; @@ -3500,7 +3500,7 @@ uniform ${Ie} ${Ye} u_${st}; `:Fe==="define"?` #ifndef HAS_UNIFORM_u_${st} uniform lowp float u_${st}_t; -in ${Ie} ${dt} a_${st}; +in ${Ie} ${ht} a_${st}; #else uniform ${Ie} ${Ye} u_${st}; #endif @@ -3516,11 +3516,11 @@ uniform ${Ie} ${Ye} u_${st}; #else ${Ie} ${Ye} ${st} = u_${st}; #endif -`})),staticAttributes:N,staticUniforms:se}}class ka{constructor(d,P,N){this.vertexBuffer=d,this.indexBuffer=P,this.segments=N}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var vs=i.aS([{name:"a_pos",type:"Int16",components:2}]);let yo="#define PROJECTION_MERCATOR",so="mercator";class oo{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return so}get shaderDefine(){return yo}get shaderPreludeCode(){return Oa.projectionMercator}get vertexShaderPreludeCode(){return Oa.projectionMercator.vertexSource}get subdivisionGranularity(){return i.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(d){}getMeshFromTileID(d,P,N,H,$){if(this._cachedMesh)return this._cachedMesh;let se=new i.aU;se.emplaceBack(0,0),se.emplaceBack(i.a6,0),se.emplaceBack(0,i.a6),se.emplaceBack(i.a6,i.a6);let de=d.createVertexBuffer(se,vs.members),Ae=i.aV.simpleSegment(0,0,4,2),Fe=new i.aW;Fe.emplaceBack(1,0,2),Fe.emplaceBack(1,2,3);let Ie=d.createIndexBuffer(Fe);return this._cachedMesh=new ka(de,Ie,Ae),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(d){}}class ko{constructor(d=0,P=0,N=0,H=0){if(isNaN(d)||d<0||isNaN(P)||P<0||isNaN(N)||N<0||isNaN(H)||H<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=d,this.bottom=P,this.left=N,this.right=H}interpolate(d,P,N){return P.top!=null&&d.top!=null&&(this.top=i.H.number(d.top,P.top,N)),P.bottom!=null&&d.bottom!=null&&(this.bottom=i.H.number(d.bottom,P.bottom,N)),P.left!=null&&d.left!=null&&(this.left=i.H.number(d.left,P.left,N)),P.right!=null&&d.right!=null&&(this.right=i.H.number(d.right,P.right,N)),this}getCenter(d,P){let N=i.al((this.left+d-this.right)/2,0,d),H=i.al((this.top+P-this.bottom)/2,0,P);return new i.P(N,H)}equals(d){return this.top===d.top&&this.bottom===d.bottom&&this.left===d.left&&this.right===d.right}clone(){return new ko(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function pa(Y,d){if(!Y.renderWorldCopies||Y.lngRange)return;let P=d.lng-Y.center.lng;d.lng+=P>180?-360:P<-180?360:0}function la(Y){return Math.max(0,Math.floor(Y))}class As{constructor(d,P){var N;this.applyConstrain=(H,$)=>this._constrainOverride!==null?this._constrainOverride(H,$):this._callbacks.defaultConstrain(H,$),this._callbacks=d,this._tileSize=512,this._renderWorldCopies=(P==null?void 0:P.renderWorldCopies)===void 0||!!(P!=null&&P.renderWorldCopies),this._minZoom=(P==null?void 0:P.minZoom)||0,this._maxZoom=(P==null?void 0:P.maxZoom)||22,this._minPitch=(P==null?void 0:P.minPitch)==null?0:P==null?void 0:P.minPitch,this._maxPitch=(P==null?void 0:P.maxPitch)==null?60:P==null?void 0:P.maxPitch,this._constrainOverride=(N=P==null?void 0:P.constrainOverride)!==null&&N!==void 0?N:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new i.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=la(this._zoom),this._scale=i.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new ko,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(d,P,N){this._constrainOverride=d.constrainOverride,this._latRange=d.latRange,this._lngRange=d.lngRange,this._width=d.width,this._height=d.height,this._center=d.center,this._elevation=d.elevation,this._minElevationForCurrentTile=d.minElevationForCurrentTile,this._zoom=d.zoom,this._tileZoom=la(this._zoom),this._scale=i.ao(this._zoom),this._bearingInRadians=d.bearingInRadians,this._fovInRadians=d.fovInRadians,this._pitchInRadians=d.pitchInRadians,this._rollInRadians=d.rollInRadians,this._unmodified=d.unmodified,this._edgeInsets=new ko(d.padding.top,d.padding.bottom,d.padding.left,d.padding.right),this._minZoom=d.minZoom,this._maxZoom=d.maxZoom,this._minPitch=d.minPitch,this._maxPitch=d.maxPitch,this._renderWorldCopies=d.renderWorldCopies,this._cameraToCenterDistance=d.cameraToCenterDistance,this._nearZ=d.nearZ,this._farZ=d.farZ,this._autoCalculateNearFarZ=!N&&d.autoCalculateNearFarZ,P&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(d){this._minElevationForCurrentTile=d}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(d){this._minZoom!==d&&(this._minZoom=d,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(d){this._maxZoom!==d&&(this._maxZoom=d,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(d){this._minPitch!==d&&(this._minPitch=d,this.setPitch(Math.max(this.pitch,d)))}get maxPitch(){return this._maxPitch}setMaxPitch(d){this._maxPitch!==d&&(this._maxPitch=d,this.setPitch(Math.min(this.pitch,d)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(d){d===void 0?d=!0:d===null&&(d=!1),this._renderWorldCopies=d}get constrainOverride(){return this._constrainOverride}setConstrainOverride(d){d===void 0&&(d=null),this._constrainOverride!==d&&(this._constrainOverride=d,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 i.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(d){let P=i.X(d,-180,180)*Math.PI/180;var N,H,$,se,de,Ae,Fe,Ie,Ye;this._bearingInRadians!==P&&(this._unmodified=!1,this._bearingInRadians=P,this._calcMatrices(),this._rotationMatrix=s(),N=this._rotationMatrix,$=-this._bearingInRadians,se=(H=this._rotationMatrix)[0],de=H[1],Ae=H[2],Fe=H[3],Ie=Math.sin($),Ye=Math.cos($),N[0]=se*Ye+Ae*Ie,N[1]=de*Ye+Fe*Ie,N[2]=se*-Ie+Ae*Ye,N[3]=de*-Ie+Fe*Ye)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(d){let P=i.al(d,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==P&&(this._unmodified=!1,this._pitchInRadians=P,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(d){let P=d/180*Math.PI;this._rollInRadians!==P&&(this._unmodified=!1,this._rollInRadians=P,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return i.aX(this._fovInRadians)}setFov(d){d=i.al(d,.1,150),this.fov!==d&&(this._unmodified=!1,this._fovInRadians=i.an(d),this._calcMatrices())}get zoom(){return this._zoom}setZoom(d){let P=this.applyConstrain(this._center,d).zoom;this._zoom!==P&&(this._unmodified=!1,this._zoom=P,this._tileZoom=Math.max(0,Math.floor(P)),this._scale=i.ao(P),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(d){d.lat===this._center.lat&&d.lng===this._center.lng||(this._unmodified=!1,this._center=d,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(d){d!==this._elevation&&(this._elevation=d,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(d){this._edgeInsets.equals(d)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,d,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(d,P){this._autoCalculateNearFarZ=!1,this._nearZ=d,this._farZ=P,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(d){return this._edgeInsets.equals(d)}interpolatePadding(d,P,N){this._unmodified=!1,this._edgeInsets.interpolate(d,P,N),this.constrainInternal(),this._calcMatrices()}resize(d,P,N=!0){this._width=d,this._height=P,N&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var d,P;return((d=this._latRange)===null||d===void 0?void 0:d.length)!==2||((P=this._lngRange)===null||P===void 0?void 0:P.length)!==2?null:new ie([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(d){d?(this._lngRange=[d.getWest(),d.getEast()],this._latRange=[d.getSouth(),d.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-i.am,i.am])}getCameraQueryGeometry(d,P){if(P.length===1)return[P[0],d];{let{minX:N,minY:H,maxX:$,maxY:se}=i.a8.fromPoints(P).extend(d);return[new i.P(N,H),new i.P($,H),new i.P($,se),new i.P(N,se),new i.P(N,H)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let d=this._unmodified,{center:P,zoom:N}=this.applyConstrain(this.center,this.zoom);this.setCenter(P),this.setZoom(N),this._unmodified=d,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let d=i.ap(new Float64Array(16));i.S(d,d,[this._width/2,-this._height/2,1]),i.Q(d,d,[1,-1,0]),this._clipSpaceToPixelsMatrix=d,d=i.ap(new Float64Array(16)),i.S(d,d,[1,-1,1]),i.Q(d,d,[-1,-1,0]),i.S(d,d,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=d,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(d,P,N,H){let $=N!==void 0?N:this.bearing,se=H=H!==void 0?H:this.pitch,{distanceToCenter:de,clampedElevation:Ae}=this._distanceToCenterFromAltElevationPitch(P,this.elevation,se),{x:Fe,y:Ie}=cr(se,$),Ye=i.a7.fromLngLat(d,P),st,dt,Pe=i.aY(1,Ye.y),Xe=0;do{if(Xe+=1,Xe>10)break;dt=de/Pe,st=new i.a7(Ye.x+Fe*dt,Ye.y+Ie*dt),Pe=1/st.meterInMercatorCoordinateUnits()}while(Math.abs(de-dt*Pe)>1e-12);return{center:st.toLngLat(),elevation:Ae,zoom:i.ar(this.height/2/Math.tan(this.fovInRadians/2)/dt/this.tileSize)}}recalculateZoomAndCenter(d){if(this.elevation-d==0)return;let P=1/this.worldSize,N=i.aq(1,this.center.lat)*this.worldSize,H=i.a7.fromLngLat(this.center,this.elevation),$=H.x/P,se=H.y/P,de=H.z/P,Ae=this.pitch,Fe=this.bearing,{x:Ie,y:Ye,z:st}=cr(Ae,Fe),dt=this.cameraToCenterDistance,Pe=$+dt*-Ie,Xe=se+dt*-Ye,at=de+dt*st,{distanceToCenter:xt,clampedElevation:Et}=this._distanceToCenterFromAltElevationPitch(at/N,d,Ae),Bt=xt*N,St=new i.a7((Pe+Ie*Bt)*P,(Xe+Ye*Bt)*P,0).toLngLat(),Pt=i.aq(1,St.lat),$t=i.ar(this.height/2/Math.tan(this.fovInRadians/2)/xt/Pt/this.tileSize);this._elevation=Et,this._center=St,this.setZoom($t)}_distanceToCenterFromAltElevationPitch(d,P,N){let H=-Math.cos(i.an(N)),$=d-P,se,de=P;return H*$>=0||Math.abs(H)<.1?(se=1e4,de=d+se*H):se=-$/H,{distanceToCenter:se,clampedElevation:de}}getCameraPoint(){let d=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.P(d*Math.sin(this.rollInRadians),d*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let d=i.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/d).toLngLat()}getMercatorTileCoordinates(d){if(!d)return[0,0,1,1];let P=d.canonical.z>=0?1<this.max[0]||d.aabb.min[1]>this.max[1]||d.aabb.min[2]>this.max[2]||d.aabb.max[0]0?(P+=d[H]*this.min[H],N+=d[H]*this.max[H]):(N+=d[H]*this.min[H],P+=d[H]*this.max[H]);return P>=0?2:N<0?0:1}}class xu{distanceToTile2d(d,P,N,H){let $=H,se=$.distanceX([d,P]),de=$.distanceY([d,P]);return Math.hypot(se,de)}getWrap(d,P,N){return N}getTileBoundingVolume(d,P,N,H){var $,se;let de=0,Ae=0;if(H!=null&&H.terrain){let Ie=new i.a3(d.z,P,d.z,d.x,d.y),Ye=H.terrain.getMinMaxElevation(Ie);de=($=Ye.minElevation)!==null&&$!==void 0?$:Math.min(0,N),Ae=(se=Ye.maxElevation)!==null&&se!==void 0?se:Math.max(0,N)}let Fe=1<H}allowWorldCopies(){return!0}prepareNextFrame(){}}class rs{constructor(d,P,N){this.points=d,this.planes=P,this.aabb=N}static fromInvProjectionMatrix(d,P=1,N=0,H,$){let se=$?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],de=Math.pow(2,N),Ae=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((st=>(function(dt,Pe,Xe,at){let xt=i.aE([],dt,Pe),Et=1/xt[3]/Xe*at;return i.b4(xt,xt,[Et,Et,1/xt[3],Et])})(st,d,P,de)));H&&(function(st,dt,Pe,Xe){let at=Xe?4:0,xt=Xe?0:4,Et=0,Bt=[],St=[];for(let Ht=0;Ht<4;Ht++){let dr=i.b0([],st[Ht+xt],st[Ht+at]),Xr=i.b5(dr);i.aZ(dr,dr,1/Xr),Bt.push(Xr),St.push(dr)}for(let Ht=0;Ht<4;Ht++){let dr=i.b6(st[Ht+at],St[Ht],Pe);Et=dr!==null&&dr>=0?Math.max(Et,dr):Math.max(Et,Bt[Ht])}let Pt=(function(Ht,dr){let Xr=i.b0([],Ht[dr[0]],Ht[dr[1]]),Or=i.b0([],Ht[dr[2]],Ht[dr[1]]),$r=[0,0,0,0];return i.b1($r,i.b2([],Xr,Or)),$r[3]=-i.b3($r,Ht[dr[0]]),$r})(st,dt),$t=(function(Ht,dr){let Xr=i.b7(Ht),Or=i.b8([],Ht,1/Xr),$r=i.b0([],dr,i.aZ([],Or,i.b3(dr,Or))),Er=i.b7($r);if(Er>0){let Tr=Math.sqrt(1-Or[3]*Or[3]),Rr=i.aZ([],Or,-Or[3]),Lr=i.a_([],Rr,i.aZ([],$r,Tr/Er));return i.b9(dr,Lr)}return null})(Pe,Pt);if($t!==null){let Ht=$t/i.b3(St[0],Pt);Et=Math.min(Et,Ht)}for(let Ht=0;Ht<4;Ht++){let dr=Math.min(Et,Bt[Ht]);st[Ht+xt]=[st[Ht+at][0]+St[Ht][0]*dr,st[Ht+at][1]+St[Ht][1]*dr,st[Ht+at][2]+St[Ht][2]*dr,1]}})(Ae,se[0],H,$);let Fe=se.map((st=>{let dt=i.b0([],Ae[st[0]],Ae[st[1]]),Pe=i.b0([],Ae[st[2]],Ae[st[1]]),Xe=i.b1([],i.b2([],dt,Pe)),at=-i.b3(Xe,Ae[st[1]]);return Xe.concat(at)})),Ie=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],Ye=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let st of Ae)for(let dt=0;dt<3;dt++)Ie[dt]=Math.min(Ie[dt],st[dt]),Ye[dt]=Math.max(Ye[dt],st[dt]);return new rs(Ae,Fe,new Ms(Ie,Ye))}}class Ls{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(d){this._helper.setMinZoom(d)}setMaxZoom(d){this._helper.setMaxZoom(d)}setMinPitch(d){this._helper.setMinPitch(d)}setMaxPitch(d){this._helper.setMaxPitch(d)}setRenderWorldCopies(d){this._helper.setRenderWorldCopies(d)}setBearing(d){this._helper.setBearing(d)}setPitch(d){this._helper.setPitch(d)}setRoll(d){this._helper.setRoll(d)}setFov(d){this._helper.setFov(d)}setZoom(d){this._helper.setZoom(d)}setCenter(d){this._helper.setCenter(d)}setElevation(d){this._helper.setElevation(d)}setMinElevationForCurrentTile(d){this._helper.setMinElevationForCurrentTile(d)}setPadding(d){this._helper.setPadding(d)}interpolatePadding(d,P,N){this._helper.interpolatePadding(d,P,N)}isPaddingEqual(d){return this._helper.isPaddingEqual(d)}resize(d,P,N=!0){this._helper.resize(d,P,N)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(d){this._helper.setMaxBounds(d)}setConstrainOverride(d){this._helper.setConstrainOverride(d)}overrideNearFarZ(d,P){this._helper.overrideNearFarZ(d,P)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(d){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),d)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(d,P){}constructor(d){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(P,N)=>{N=i.al(+N,this.minZoom,this.maxZoom);let H={center:new i.W(P.lng,P.lat),zoom:N},$=this._helper._lngRange;if(!this._helper._renderWorldCopies&&$===null){let St=179.9999999999;$=[-St,St]}let se=this.tileSize*i.ao(H.zoom),de=0,Ae=se,Fe=0,Ie=se,Ye=0,st=0,{x:dt,y:Pe}=this.size;if(this._helper._latRange){let St=this._helper._latRange;de=i.Y(St[1])*se,Ae=i.Y(St[0])*se,Ae-deAe&&(Et=Ae-St)}if($){let St=(Fe+Ie)/2,Pt=Xe;this._helper._renderWorldCopies&&(Pt=i.X(Xe,St-se/2,St+se/2));let $t=dt/2;Pt-$tIe&&(xt=Ie-$t)}if(xt!==void 0||Et!==void 0){let St=new i.P(xt!=null?xt:Xe,Et!=null?Et:at);H.center=mr(se,St).wrap()}return H},this.applyConstrain=(P,N)=>this._helper.applyConstrain(P,N),this._helper=new As({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(P,N)=>this.defaultConstrain(P,N)},d),this._coveringTilesDetailsProvider=new xu}clone(){let d=new Ls;return d.apply(this,!1),d}apply(d,P,N){this._helper.apply(d,P,N)}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(d){let P=[new i.ba(0,d)];if(this._helper._renderWorldCopies){let N=this.screenPointToMercatorCoordinate(new i.P(0,0)),H=this.screenPointToMercatorCoordinate(new i.P(this._helper._width,0)),$=this.screenPointToMercatorCoordinate(new i.P(this._helper._width,this._helper._height)),se=this.screenPointToMercatorCoordinate(new i.P(0,this._helper._height)),de=Math.floor(Math.min(N.x,H.x,$.x,se.x)),Ae=Math.floor(Math.max(N.x,H.x,$.x,se.x)),Fe=1;for(let Ie=de-Fe;Ie<=Ae+Fe;Ie++)Ie!==0&&P.push(new i.ba(Ie,d))}return P}getCameraFrustum(){return rs.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(d){let P=this.screenPointToLocation(this.centerPoint,d),N=d?d.getElevationForLngLatZoom(P,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(N)}setLocationAtPoint(d,P){let N=i.aq(this.elevation,this.center.lat),H=this.screenPointToMercatorCoordinateAtZ(P,N),$=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,N),se=i.a7.fromLngLat(d),de=new i.a7(se.x-(H.x-$.x),se.y-(H.y-$.y));this.setCenter(de==null?void 0:de.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(d,P){return P?this.coordinatePoint(i.a7.fromLngLat(d),P.getElevationForLngLat(d,this),this._pixelMatrix3D):this.coordinatePoint(i.a7.fromLngLat(d))}screenPointToLocation(d,P){var N;return(N=this.screenPointToMercatorCoordinate(d,P))===null||N===void 0?void 0:N.toLngLat()}screenPointToMercatorCoordinate(d,P){if(P){let N=P.pointCoordinate(d);if(N!=null)return N}return this.screenPointToMercatorCoordinateAtZ(d)}screenPointToMercatorCoordinateAtZ(d,P){let N=P||0,H=[d.x,d.y,0,1],$=[d.x,d.y,1,1];i.aE(H,H,this._pixelMatrixInverse),i.aE($,$,this._pixelMatrixInverse);let se=H[3],de=$[3],Ae=H[1]/se,Fe=$[1]/de,Ie=H[2]/se,Ye=$[2]/de,st=Ie===Ye?0:(N-Ie)/(Ye-Ie);return new i.a7(i.H.number(H[0]/se,$[0]/de,st)/this.worldSize,i.H.number(Ae,Fe,st)/this.worldSize,N)}coordinatePoint(d,P=0,N=this._pixelMatrix){let H=[d.x*this.worldSize,d.y*this.worldSize,P,1];return i.aE(H,H,N),new i.P(H[0]/H[3],H[1]/H[3])}getBounds(){let d=Math.max(0,this._helper._height/2-or(this));return new ie().extend(this.screenPointToLocation(new i.P(0,d))).extend(this.screenPointToLocation(new i.P(this._helper._width,d))).extend(this.screenPointToLocation(new i.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new i.P(0,this._helper._height)))}isPointOnMapSurface(d,P){return P?P.pointCoordinate(d)!=null:d.y>this.height/2-or(this)}calculatePosMatrix(d,P=!1,N){var H;let $=(H=d.key)!==null&&H!==void 0?H:i.bb(d.wrap,d.canonical.z,d.canonical.z,d.canonical.x,d.canonical.y),se=P?this._alignedPosMatrixCache:this._posMatrixCache;if(se.has($)){let Fe=se.get($);return N?Fe.f32:Fe.f64}let de=fr(d,this.worldSize);i.U(de,P?this._alignedProjMatrix:this._viewProjMatrix,de);let Ae={f64:de,f32:new Float32Array(de)};return se.set($,Ae),N?Ae.f32:Ae.f64}calculateFogMatrix(d){let P=d.key,N=this._fogMatrixCacheF32;if(N.has(P))return N.get(P);let H=fr(d,this.worldSize);return i.U(H,this._fogMatrix,H),N.set(P,new Float32Array(H)),N.get(P)}calculateCenterFromCameraLngLatAlt(d,P,N,H){return this._helper.calculateCenterFromCameraLngLatAlt(d,P,N,H)}_calculateNearFarZIfNeeded(d,P,N){if(!this._helper.autoCalculateNearFarZ)return;let H=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),$=d-H*this._helper._pixelPerMeter/Math.cos(P),se=H<0?$:d,de=Math.PI/2+this.pitchInRadians,Ae=i.an(this.fov)*(Math.abs(Math.cos(i.an(this.roll)))*this.height+Math.abs(Math.sin(i.an(this.roll)))*this.width)/this.height*(.5+N.y/this.height),Fe=Math.sin(Ae)*se/Math.sin(i.al(Math.PI-de-Ae,.01,Math.PI-.01)),Ie=or(this),Ye=Math.atan(Ie/this._helper.cameraToCenterDistance),st=i.an(.75),dt=Ye>st?2*Ye*(.5+N.y/(2*Ie)):st,Pe=Math.sin(dt)*se/Math.sin(i.al(Math.PI-de-dt,.01,Math.PI-.01)),Xe=Math.min(Fe,Pe);this._helper._farZ=1.01*(Math.cos(Math.PI/2-P)*Xe+se),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let d=this.centerOffset,P=jt(this.worldSize,this.center),N=P.x,H=P.y;this._helper._pixelPerMeter=i.aq(1,this.center.lat)*this.worldSize;let $=i.an(Math.min(this.pitch,Yt)),se=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos($)),de;var Ae,Fe;this._calculateNearFarZIfNeeded(se,$,d),de=new Float64Array(16),i.bc(de,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(Ae=this._invProjMatrix)[0]=1/(Fe=de)[0],Ae[1]=0,Ae[2]=0,Ae[3]=0,Ae[4]=0,Ae[5]=1/Fe[5],Ae[6]=0,Ae[7]=0,Ae[8]=0,Ae[9]=0,Ae[10]=0,Ae[11]=1/Fe[14],Ae[12]=0,Ae[13]=0,Ae[14]=-1,Ae[15]=Fe[10]/Fe[14],de[8]=2*-d.x/this._helper._width,de[9]=2*d.y/this._helper._height,this._projectionMatrix=i.bd(de),i.S(de,de,[1,-1,1]),i.Q(de,de,[0,0,-this._helper.cameraToCenterDistance]),i.be(de,de,-this.rollInRadians),i.bf(de,de,this.pitchInRadians),i.be(de,de,-this.bearingInRadians),i.Q(de,de,[-N,-H,0]),this._mercatorMatrix=i.S([],de,[this.worldSize,this.worldSize,this.worldSize]),i.S(de,de,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=i.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,de),i.Q(de,de,[0,0,-this.elevation]),this._viewProjMatrix=de,this._invViewProjMatrix=i.bg([],de);let Ie=[0,0,-1,1];i.aE(Ie,Ie,this._invViewProjMatrix),this._cameraPosition=[Ie[0]/Ie[3],Ie[1]/Ie[3],Ie[2]/Ie[3]],this._fogMatrix=new Float64Array(16),i.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,se,this._helper._farZ),this._fogMatrix[8]=2*-d.x/this.width,this._fogMatrix[9]=2*d.y/this.height,i.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),i.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),i.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),i.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),i.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),i.Q(this._fogMatrix,this._fogMatrix,[-N,-H,0]),i.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),i.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=i.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,de);let Ye=this._helper._width%2/2,st=this._helper._height%2/2,dt=Math.cos(this.bearingInRadians),Pe=Math.sin(-this.bearingInRadians),Xe=N-Math.round(N)+dt*Ye+Pe*st,at=H-Math.round(H)+dt*st+Pe*Ye,xt=new Float64Array(de);if(i.Q(xt,xt,[Xe>.5?Xe-1:Xe,at>.5?at-1:at,0]),this._alignedProjMatrix=xt,de=i.bg(new Float64Array(16),this._pixelMatrix),!de)throw new Error("failed to invert matrix");this._pixelMatrixInverse=de,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let d=this.screenPointToMercatorCoordinate(new i.P(0,0)),P=[d.x*this.worldSize,d.y*this.worldSize,0,1];return i.aE(P,P,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let d=i.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/d).toLngLat()}lngLatToCameraDepth(d,P){let N=i.a7.fromLngLat(d),H=[N.x*this.worldSize,N.y*this.worldSize,P,1];return i.aE(H,H,this._viewProjMatrix),H[2]/H[3]}getProjectionData(d){let{overscaledTileID:P,aligned:N,applyTerrainMatrix:H}=d,$=this._helper.getMercatorTileCoordinates(P),se=P?this.calculatePosMatrix(P,N,!0):null,de;return de=P!=null&&P.terrainRttPosMatrix32f&&H?P.terrainRttPosMatrix32f:se||i.bh(),{mainMatrix:de,tileMercatorCoords:$,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:de}}isLocationOccluded(d){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(d,P,N){return 1}transformLightDirection(d){return i.a$(d)}getRayDirectionFromPixel(d){throw new Error("Not implemented.")}projectTileCoordinates(d,P,N,H){let $=this.calculatePosMatrix(N),se;H?(se=[d,P,H(d,P),1],i.aE(se,se,$)):(se=[d,P,0,1],ao(se,se,$));let de=se[3];return{point:new i.P(se[0]/de,se[1]/de),signedDistanceFromCamera:de,isOccluded:!1}}populateCache(d){for(let P of d)this.calculatePosMatrix(P)}getMatrixForModel(d,P){let N=i.a7.fromLngLat(d,P),H=N.meterInMercatorCoordinateUnits(),$=i.bi();return i.Q($,$,[N.x,N.y,N.z]),i.be($,$,Math.PI),i.bf($,$,Math.PI/2),i.S($,$,[-H,H,H]),$}getProjectionDataForCustomLayer(d=!0){let P=new i.a3(0,0,0,0,0),N=this.getProjectionData({overscaledTileID:P,applyGlobeMatrix:d}),H=fr(P,this.worldSize);i.U(H,this._viewProjMatrix,H),N.tileMercatorCoords=[0,0,1,1];let $=[i.a6,i.a6,this.worldSize/this._helper.pixelsPerMeter],se=i.bj();return i.S(se,H,$),N.fallbackMatrix=se,N.mainMatrix=se,N}getFastPathSimpleProjectionMatrix(d){return this.calculatePosMatrix(d)}}function $s(){i.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function Kc(Y){if(Y.useSlerp)if(Y.k<1){let d=i.bk(Y.startEulerAngles.roll,Y.startEulerAngles.pitch,Y.startEulerAngles.bearing),P=i.bk(Y.endEulerAngles.roll,Y.endEulerAngles.pitch,Y.endEulerAngles.bearing),N=new Float64Array(4);i.bl(N,d,P,Y.k);let H=i.bm(N);Y.tr.setRoll(H.roll),Y.tr.setPitch(H.pitch),Y.tr.setBearing(H.bearing)}else Y.tr.setRoll(Y.endEulerAngles.roll),Y.tr.setPitch(Y.endEulerAngles.pitch),Y.tr.setBearing(Y.endEulerAngles.bearing);else Y.tr.setRoll(i.H.number(Y.startEulerAngles.roll,Y.endEulerAngles.roll,Y.k)),Y.tr.setPitch(i.H.number(Y.startEulerAngles.pitch,Y.endEulerAngles.pitch,Y.k)),Y.tr.setBearing(i.H.number(Y.startEulerAngles.bearing,Y.endEulerAngles.bearing,Y.k))}function _u(Y,d,P,N,H){let $=H.padding,se=jt(H.worldSize,P.getNorthWest()),de=jt(H.worldSize,P.getNorthEast()),Ae=jt(H.worldSize,P.getSouthEast()),Fe=jt(H.worldSize,P.getSouthWest()),Ie=i.an(-N),Ye=se.rotate(Ie),st=de.rotate(Ie),dt=Ae.rotate(Ie),Pe=Fe.rotate(Ie),Xe=new i.P(Math.max(Ye.x,st.x,Pe.x,dt.x),Math.max(Ye.y,st.y,Pe.y,dt.y)),at=new i.P(Math.min(Ye.x,st.x,Pe.x,dt.x),Math.min(Ye.y,st.y,Pe.y,dt.y)),xt=Xe.sub(at),Et=(H.width-($.left+$.right+d.left+d.right))/xt.x,Bt=(H.height-($.top+$.bottom+d.top+d.bottom))/xt.y;if(Bt<0||Et<0)return void $s();let St=Math.min(i.ar(H.scale*Math.min(Et,Bt)),Y.maxZoom),Pt=i.P.convert(Y.offset),$t=new i.P((d.left-d.right)/2,(d.top-d.bottom)/2).rotate(i.an(N)),Ht=Pt.add($t).mult(H.scale/i.ao(St));return{center:mr(H.worldSize,se.add(Ae).div(2).sub(Ht)),zoom:St,bearing:N}}class Gu{get useGlobeControls(){return!1}handlePanInertia(d,P){let N=d.mag(),H=Math.abs(or(P));return{easingOffset:d.mult(Math.min(.75*H/N,1)),easingCenter:P.center}}handleMapControlsRollPitchBearingZoom(d,P){d.bearingDelta&&P.setBearing(P.bearing+d.bearingDelta),d.pitchDelta&&P.setPitch(P.pitch+d.pitchDelta),d.rollDelta&&P.setRoll(P.roll+d.rollDelta),d.zoomDelta&&P.setZoom(P.zoom+d.zoomDelta)}handleMapControlsPan(d,P,N){d.around.distSqr(P.centerPoint)<.01||P.setLocationAtPoint(N,d.around)}cameraForBoxAndBearing(d,P,N,H,$){return _u(d,P,N,H,$)}handleJumpToCenterZoom(d,P){d.zoom!==(P.zoom!==void 0?+P.zoom:d.zoom)&&d.setZoom(+P.zoom),P.center!==void 0&&d.setCenter(i.W.convert(P.center))}handleEaseTo(d,P){let N=d.zoom,H=d.padding,$={roll:d.roll,pitch:d.pitch,bearing:d.bearing},se={roll:P.roll===void 0?d.roll:P.roll,pitch:P.pitch===void 0?d.pitch:P.pitch,bearing:P.bearing===void 0?d.bearing:P.bearing},de=P.zoom!==void 0,Ae=!d.isPaddingEqual(P.padding),Fe=!1,Ie=de?+P.zoom:d.zoom,Ye=d.centerPoint.add(P.offsetAsPoint),st=d.screenPointToLocation(Ye),{center:dt,zoom:Pe}=d.applyConstrain(i.W.convert(P.center||st),Ie!=null?Ie:N);pa(d,dt);let Xe=jt(d.worldSize,st),at=jt(d.worldSize,dt).sub(Xe),xt=i.ao(Pe-N);return Fe=Pe!==N,{easeFunc:Et=>{if(Fe&&d.setZoom(i.H.number(N,Pe,Et)),i.bn($,se)||Kc({startEulerAngles:$,endEulerAngles:se,tr:d,k:Et,useSlerp:$.roll!=se.roll}),Ae&&(d.interpolatePadding(H,P.padding,Et),Ye=d.centerPoint.add(P.offsetAsPoint)),P.around)d.setLocationAtPoint(P.around,P.aroundPoint);else{let Bt=i.ao(d.zoom-N),St=Pe>N?Math.min(2,xt):Math.max(.5,xt),Pt=Math.pow(St,1-Et),$t=mr(d.worldSize,Xe.add(at.mult(Et*Pt)).mult(Bt));d.setLocationAtPoint(d.renderWorldCopies?$t.wrap():$t,Ye)}},isZooming:Fe,elevationCenter:dt}}handleFlyTo(d,P){let N=P.zoom!==void 0,H=d.zoom,$=d.applyConstrain(i.W.convert(P.center||P.locationAtOffset),N?+P.zoom:H),se=$.center,de=$.zoom;pa(d,se);let Ae=jt(d.worldSize,P.locationAtOffset),Fe=jt(d.worldSize,se).sub(Ae),Ie=Fe.mag(),Ye=i.ao(de-H),st;if(P.minZoom!==void 0){let dt=Math.min(+P.minZoom,H,de),Pe=d.applyConstrain(se,dt).zoom;st=i.ao(Pe-H)}return{easeFunc:(dt,Pe,Xe,at)=>{d.setZoom(dt===1?de:H+i.ar(Pe));let xt=dt===1?se:mr(d.worldSize,Ae.add(Fe.mult(Xe)).mult(Pe));d.setLocationAtPoint(d.renderWorldCopies?xt.wrap():xt,at)},scaleOfZoom:Ye,targetCenter:se,scaleOfMinZoom:st,pixelPathLength:Ie}}}class Ja{constructor(d,P,N){this.blendFunction=d,this.blendColor=P,this.mask=N}}Ja.Replace=[1,0],Ja.disabled=new Ja(Ja.Replace,i.bo.transparent,[!1,!1,!1,!1]),Ja.unblended=new Ja(Ja.Replace,i.bo.transparent,[!0,!0,!0,!0]),Ja.alphaBlended=new Ja([1,771],i.bo.transparent,[!0,!0,!0,!0]);let ps=2305;class Sa{constructor(d,P,N){this.enable=d,this.mode=P,this.frontFace=N}}Sa.disabled=new Sa(!1,1029,ps),Sa.backCCW=new Sa(!0,1029,ps),Sa.frontCCW=new Sa(!0,1028,ps);class ma{constructor(d,P,N){this.func=d,this.mask=P,this.range=N}}ma.ReadOnly=!1,ma.ReadWrite=!0,ma.disabled=new ma(519,ma.ReadOnly,[0,1]);let Ps=7680;class Ca{constructor(d,P,N,H,$,se){this.test=d,this.ref=P,this.mask=N,this.fail=H,this.depthFail=$,this.pass=se}}function Pl(Y){return typeof WebGL2RenderingContext!="undefined"&&Y instanceof WebGL2RenderingContext}Ca.disabled=new Ca({func:519,mask:0},0,0,Ps,Ps,Ps);class ll{get awaitingQuery(){return!!this._readbackQueue}constructor(d){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=d;let P=d.context,N=P.gl;this._texFormat=N.RGBA,this._texType=N.UNSIGNED_BYTE;let H=new i.aU;H.emplaceBack(-1,-1),H.emplaceBack(2,-1),H.emplaceBack(-1,2);let $=new i.aW;$.emplaceBack(0,1,2),this._fullscreenTriangle=new ka(P.createVertexBuffer(H,vs.members),P.createIndexBuffer($),i.aV.simpleSegment(0,0,H.length,$.length)),this._resultBuffer=new Uint8Array(4),P.activeTexture.set(N.TEXTURE1);let se=N.createTexture();N.bindTexture(N.TEXTURE_2D,se),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_S,N.CLAMP_TO_EDGE),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_T,N.CLAMP_TO_EDGE),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MIN_FILTER,N.NEAREST),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MAG_FILTER,N.NEAREST),N.texImage2D(N.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=P.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(se),Pl(N)&&(this._pbo=N.createBuffer(),N.bindBuffer(N.PIXEL_PACK_BUFFER,this._pbo),N.bufferData(N.PIXEL_PACK_BUFFER,4,N.STREAM_READ),N.bindBuffer(N.PIXEL_PACK_BUFFER,null))}destroy(){let d=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),d.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(d,P){let N=this._updateCount;return this._readbackQueue?N>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():N>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(d,P),this._updateCount++,this._measuredError}_bindFramebuffer(){let d=this._cachedRenderContext.context,P=d.gl;d.activeTexture.set(P.TEXTURE1),P.bindTexture(P.TEXTURE_2D,this._fbo.colorAttachment.get()),d.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(d,P){let N=this._cachedRenderContext.context,H=N.gl;if(this._bindFramebuffer(),N.viewport.set([0,0,this._texWidth,this._texHeight]),N.clear({color:i.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(N,H.TRIANGLES,ma.disabled,Ca.disabled,Ja.unblended,Sa.disabled,(($,se)=>({u_input:$,u_output_expected:se}))(d,P),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Pl(H)){H.bindBuffer(H.PIXEL_PACK_BUFFER,this._pbo),H.readBuffer(H.COLOR_ATTACHMENT0),H.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),H.bindBuffer(H.PIXEL_PACK_BUFFER,null);let $=H.fenceSync(H.SYNC_GPU_COMMANDS_COMPLETE,0);H.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:$}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let d=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Pl(d)){let P=d.clientWaitSync(this._readbackQueue.sync,0,0);if(P===d.WAIT_FAILED)return i.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(P===d.TIMEOUT_EXPIRED)return;d.bindBuffer(d.PIXEL_PACK_BUFFER,this._pbo),d.getBufferSubData(d.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),d.bindBuffer(d.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),d.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=ll._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(d){let P=0;return P+=d[0]/256,P+=d[1]/65536,P+=d[2]/16777216,d[3]<127&&(P=-P),P/128}}let Jc=i.a6/128;function lu(Y,d){let P=Y.granularity!==void 0?Math.max(Y.granularity,1):1,N=P+(Y.generateBorders?2:0),H=P+(Y.extendToNorthPole||Y.generateBorders?1:0)+(Y.extendToSouthPole||Y.generateBorders?1:0),$=N+1,se=H+1,de=Y.generateBorders?-1:0,Ae=Y.generateBorders||Y.extendToNorthPole?-1:0,Fe=P+(Y.generateBorders?1:0),Ie=P+(Y.generateBorders||Y.extendToSouthPole?1:0),Ye=$*se,st=N*H*6,dt=$*se>65536;if(dt&&d==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let Pe=dt||d==="32bit",Xe=new Int16Array(2*Ye),at=0;for(let Bt=Ae;Bt<=Ie;Bt++)for(let St=de;St<=Fe;St++){let Pt=St/P*i.a6;St===-1&&(Pt=-Jc),St===P+1&&(Pt=i.a6+Jc);let $t=Bt/P*i.a6;Bt===-1&&($t=Y.extendToNorthPole?i.bq:-Jc),Bt===P+1&&($t=Y.extendToSouthPole?i.br:i.a6+Jc),Xe[at++]=Pt,Xe[at++]=$t}let xt=Pe?new Uint32Array(st):new Uint16Array(st),Et=0;for(let Bt=0;Bt0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(d){this._mercatorProjection.updateGPUdependent(d),this._verticalPerspectiveProjection.updateGPUdependent(d)}getMeshFromTileID(d,P,N,H,$){return this.currentProjection.getMeshFromTileID(d,P,N,H,$)}setProjection(d){this._transitionable.setValue("type",(d==null?void 0:d.type)||"mercator")}updateTransitions(d){this._transitioning=this._transitionable.transitioned(d,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(d){this.properties=this._transitioning.possiblyEvaluate(d)}setErrorQueryLatitudeDegrees(d){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(d),this._mercatorProjection.setErrorQueryLatitudeDegrees(d)}}function kc(Y){let d=Ks(Y.worldSize,Y.center.lat);return 2*Math.PI*d}function Uo(Y,d,P,N,H){let $=1/(1<1e-6){let N=Y[0]/P,H=Math.acos(Y[2]/P),$=(N>0?H:-H)/Math.PI*180;return new i.W(i.X($,-180,180),d)}return new i.W(0,d)}function ju(Y){return Math.cos(Y*Math.PI/180)}function gs(Y,d){let P=ju(Y),N=ju(d);return i.ar(N/P)}function bu(Y,d){let P=Y.rotate(d.bearingInRadians),N=d.zoom+gs(d.center.lat,0),H=i.bt(1/ju(d.center.lat),1/ju(Math.min(Math.abs(d.center.lat),60)),i.bw(N,7,3,0,1)),$=360/kc({worldSize:d.worldSize,center:{lat:d.center.lat}});return new i.W(d.center.lng-P.x*$*H,i.al(d.center.lat+P.y*$,-i.am,i.am))}function kf(Y){let d=.5*Y,P=Math.sin(d),N=Math.cos(d);return Math.log(P+N)-Math.log(N-P)}function ah(Y,d,P,N){let H=Y.lat+P*N;if(Math.abs(P)>1){let $=(Math.sign(Y.lat+P)!==Math.sign(Y.lat)?-Math.abs(Y.lat):Math.abs(Y.lat))*Math.PI/180,se=Math.abs(Y.lat+P)*Math.PI/180,de=kf($+N*(se-$)),Ae=kf($),Fe=kf(se);return new i.W(Y.lng+d*((de-Ae)/(Fe-Ae)),H)}return new i.W(Y.lng+d*N,H)}class Od{constructor(d){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=d}swapBuffers(){if(!this._hadAnyChanges)return;let d=this._cachePrevious;this._cachePrevious=this._cache,this._cache=d,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(d,P,N,H){let $=`${d.z}_${d.x}_${d.y}_${H!=null&&H.terrain?"t":""}`,se=this._cache.get($);if(se)return se;let de=this._cachePrevious.get($);if(de)return this._cache.set($,de),de;let Ae=this._boundingVolumeFactory(d,P,N,H);return this._cache.set($,Ae),this._hadAnyChanges=!0,Ae}}class Qc{constructor(d,P,N,H){this.min=N,this.max=H,this.points=d,this.planes=P}static fromAabb(d,P){let N=[];for(let H=0;H<8;H++)N.push([1&~H?d[0]:P[0],(H>>1&1)==1?P[1]:d[1],(H>>2&1)==1?P[2]:d[2]]);return new Qc(N,[[-1,0,0,P[0]],[1,0,0,-d[0]],[0,-1,0,P[1]],[0,1,0,-d[1]],[0,0,-1,P[2]],[0,0,1,-d[2]]],d,P)}static fromCenterSizeAngles(d,P,N){let H=i.bA([],N[0],N[1],N[2]),$=i.bB([],[P[0],0,0],H),se=i.bB([],[0,P[1],0],H),de=i.bB([],[0,0,P[2]],H),Ae=[...d],Fe=[...d];for(let Ye=0;Ye<8;Ye++)for(let st=0;st<3;st++){let dt=d[st]+$[st]*(1&~Ye?-1:1)+se[st]*((Ye>>1&1)==1?1:-1)+de[st]*((Ye>>2&1)==1?1:-1);Ae[st]=Math.min(Ae[st],dt),Fe[st]=Math.max(Fe[st],dt)}let Ie=[];for(let Ye=0;Ye<8;Ye++){let st=[...d];i.a_(st,st,i.aZ([],$,1&~Ye?-1:1)),i.a_(st,st,i.aZ([],se,(Ye>>1&1)==1?1:-1)),i.a_(st,st,i.aZ([],de,(Ye>>2&1)==1?1:-1)),Ie.push(st)}return new Qc(Ie,[[...$,-i.b3($,Ie[0])],[...se,-i.b3(se,Ie[0])],[...de,-i.b3(de,Ie[0])],[-$[0],-$[1],-$[2],-i.b3($,Ie[7])],[-se[0],-se[1],-se[2],-i.b3(se,Ie[7])],[-de[0],-de[1],-de[2],-i.b3(de,Ie[7])]],Ae,Fe)}intersectsFrustum(d){let P=!0,N=this.points.length,H=this.planes.length,$=d.planes.length,se=d.points.length;for(let de=0;de<$;de++){let Ae=d.planes[de],Fe=0;for(let Ie=0;Ie=0&&Fe++}if(Fe===0)return 0;Fe=0&&Fe++}if(Fe===0)return 0}return 1}intersectsPlane(d){let P=this.points.length,N=0;for(let H=0;H=0&&N++}return N===P?2:N===0?0:1}}function uu(Y,d,P){let N=Y-d;return N<0?-N:Math.max(0,N-P)}function oh(Y,d,P,N,H){let $=Y-P,se;return se=$<0?Math.min(-$,1+$-H):$>H?Math.min(Math.max($-H,0),1-$):0,Math.max(se,uu(d,N,H))}class hc{constructor(){this._boundingVolumeCache=new Od(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(d,P,N,H){let $=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(d,P,N,H){return this._boundingVolumeCache.getTileBoundingVolume(d,P,N,H)}_computeTileBoundingVolume(d,P,N,H){var $,se;let de=0,Ae=0;if(H!=null&&H.terrain){let Fe=new i.a3(d.z,P,d.z,d.x,d.y),Ie=H.terrain.getMinMaxElevation(Fe);de=($=Ie.minElevation)!==null&&$!==void 0?$:Math.min(0,N),Ae=(se=Ie.maxElevation)!==null&&se!==void 0?se:Math.max(0,N)}if(de/=i.bD,Ae/=i.bD,de+=1,Ae+=1,d.z<=0)return Qc.fromAabb([-Ae,-Ae,-Ae],[Ae,Ae,Ae]);if(d.z===1)return Qc.fromAabb([d.x===0?-Ae:0,d.y===0?0:-Ae,-Ae],[d.x===0?0:Ae,d.y===0?Ae:0,Ae]);{let Fe=[Uo(0,0,d.x,d.y,d.z),Uo(i.a6,0,d.x,d.y,d.z),Uo(i.a6,i.a6,d.x,d.y,d.z),Uo(0,i.a6,d.x,d.y,d.z)],Ie=[];for(let $r of Fe)Ie.push(i.aZ([],$r,Ae));if(Ae!==de)for(let $r of Fe)Ie.push(i.aZ([],$r,de));d.y===0&&Ie.push([0,1,0]),d.y===(1<=(1<{let H=i.al(P.lat,-i.am,i.am),$=i.al(+N,this.minZoom+gs(0,H),this.maxZoom);return{center:new i.W(P.lng,H),zoom:$}},this.applyConstrain=(P,N)=>this._helper.applyConstrain(P,N),this._helper=new As({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(P,N)=>this.defaultConstrain(P,N)},d),this._coveringTilesDetailsProvider=new hc}clone(){let d=new Yo;return d.apply(this,!1),d}apply(d,P,N){this._globeLatitudeErrorCorrectionRadians=N||0,this._helper.apply(d,P)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let d=i.bz();return d[0]=this._cameraPosition[0],d[1]=this._cameraPosition[1],d[2]=this._cameraPosition[2],d}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(d){let{overscaledTileID:P,applyGlobeMatrix:N}=d,H=this._helper.getMercatorTileCoordinates(P);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:H,clippingPlane:this._cachedClippingPlane,projectionTransition:N?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(d){let P=this.pitchInRadians,N=this.cameraToCenterDistance/d,H=Math.sin(P)*N,$=Math.cos(P)*N+1,se=1/Math.sqrt(H*H+$*$)*1,de=-H,Ae=$,Fe=Math.sqrt(de*de+Ae*Ae);de/=Fe,Ae/=Fe;let Ie=[0,de,Ae];i.bF(Ie,Ie,[0,0,0],-this.bearingInRadians),i.bG(Ie,Ie,[0,0,0],-1*this.center.lat*Math.PI/180),i.bH(Ie,Ie,[0,0,0],this.center.lng*Math.PI/180);let Ye=1/i.b5(Ie);return i.aZ(Ie,Ie,Ye),[...Ie,-se*Ye]}isLocationOccluded(d){return!this.isSurfacePointVisible(ns(d))}transformLightDirection(d){let P=this._helper._center.lng*Math.PI/180,N=this._helper._center.lat*Math.PI/180,H=Math.cos(N),$=[Math.sin(P)*H,Math.sin(N),Math.cos(P)*H],se=[$[2],0,-$[0]],de=[0,0,0];i.b2(de,se,$),i.b1(se,se),i.b1(de,de);let Ae=[0,0,0];return i.b1(Ae,[se[0]*d[0]+de[0]*d[1]+$[0]*d[2],se[1]*d[0]+de[1]*d[1]+$[1]*d[2],se[2]*d[0]+de[2]*d[1]+$[2]*d[2]]),Ae}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(d,P,N){let H=(function(de,Ae,Fe){let Ie=1/(1<$&&($=st),dtde&&(de=dt)}let Ie=[Fe.lng+se,Fe.lat+Ae,Fe.lng+$,Fe.lat+de];return this.isSurfacePointOnScreen([0,1,0])&&(Ie[3]=90,Ie[0]=-180,Ie[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(Ie[1]=-90,Ie[0]=-180,Ie[2]=180),new ie(Ie)}calculateCenterFromCameraLngLatAlt(d,P,N,H){return this._helper.calculateCenterFromCameraLngLatAlt(d,P,N,H)}setLocationAtPoint(d,P){let N=ns(this.unprojectScreenPoint(P)),H=ns(d),$=i.bz();i.bK($);let se=i.bz();i.bH(se,N,$,-this.center.lng*Math.PI/180),i.bG(se,se,$,this.center.lat*Math.PI/180);let de=H[0]*H[0]+H[2]*H[2],Ae=se[0]*se[0];if(de=-xt&&Pe<=xt,Bt=at>=-xt&&at<=xt,St,Pt;if(Et&&Bt){let Xr=this.center.lng*Math.PI/180,Or=this.center.lat*Math.PI/180;i.bM(Ye,Xr)+i.bM(Pe,Or)=0}isSurfacePointOnScreen(d){if(!this.isSurfacePointVisible(d))return!1;let P=i.bE();return i.aE(P,[...d,1],this._globeViewProjMatrixNoCorrection),P[0]/=P[3],P[1]/=P[3],P[2]/=P[3],P[0]>-1&&P[0]<1&&P[1]>-1&&P[1]<1&&P[2]>-1&&P[2]<1}rayPlanetIntersection(d,P){let N=i.b3(d,P),H=i.bz(),$=i.bz();i.aZ($,P,N),i.b0(H,d,$);let se=1-i.b3(H,H);if(se<0)return null;let de=i.b3(d,d)-1,Ae=-N+(N<0?1:-1)*Math.sqrt(se),Fe=de/Ae,Ie=Ae;return{tMin:Math.min(Fe,Ie),tMax:Math.max(Fe,Ie)}}unprojectScreenPoint(d){let P=this._cameraPosition,N=this.getRayDirectionFromPixel(d),H=this.rayPlanetIntersection(P,N);if(H){let Ie=i.bz();i.a_(Ie,P,[N[0]*H.tMin,N[1]*H.tMin,N[2]*H.tMin]);let Ye=i.bz();return i.b1(Ye,Ie),Ef(Ye)}let $=this._cachedClippingPlane,se=$[0]*N[0]+$[1]*N[1]+$[2]*N[2],de=-i.b9($,P)/se,Ae=i.bz();if(de>0)i.a_(Ae,P,[N[0]*de,N[1]*de,N[2]*de]);else{let Ie=i.bz();i.a_(Ie,P,[2*N[0],2*N[1],2*N[2]]);let Ye=i.b9(this._cachedClippingPlane,Ie);i.b0(Ae,Ie,[this._cachedClippingPlane[0]*Ye,this._cachedClippingPlane[1]*Ye,this._cachedClippingPlane[2]*Ye])}let Fe=(function(Ie){let Ye=i.bz();return Ye[0]=Ie[0]*-Ie[3],Ye[1]=Ie[1]*-Ie[3],Ye[2]=Ie[2]*-Ie[3],{center:Ye,radius:Math.sqrt(1-Ie[3]*Ie[3])}})($);return Ef((function(Ie,Ye,st){let dt=i.bz();i.b0(dt,st,Ie);let Pe=i.bz();return i.bx(Pe,Ie,dt,Ye/i.b7(dt)),Pe})(Fe.center,Fe.radius,Ae))}getMatrixForModel(d,P){let N=i.W.convert(d),H=1/i.bD,$=i.bi();return i.bI($,$,N.lng/180*Math.PI),i.bf($,$,-N.lat/180*Math.PI),i.Q($,$,[0,0,1+P/i.bD]),i.bf($,$,.5*Math.PI),i.S($,$,[H,H,H]),$}getProjectionDataForCustomLayer(d=!0){let P=this.getProjectionData({overscaledTileID:new i.a3(0,0,0,0,0),applyGlobeMatrix:d});return P.tileMercatorCoords=[0,0,1,1],P}getFastPathSimpleProjectionMatrix(d){}}class Ro{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(d){this._helper.setMinZoom(d)}setMaxZoom(d){this._helper.setMaxZoom(d)}setMinPitch(d){this._helper.setMinPitch(d)}setMaxPitch(d){this._helper.setMaxPitch(d)}setRenderWorldCopies(d){this._helper.setRenderWorldCopies(d)}setBearing(d){this._helper.setBearing(d)}setPitch(d){this._helper.setPitch(d)}setRoll(d){this._helper.setRoll(d)}setFov(d){this._helper.setFov(d)}setZoom(d){this._helper.setZoom(d)}setCenter(d){this._helper.setCenter(d)}setElevation(d){this._helper.setElevation(d)}setMinElevationForCurrentTile(d){this._helper.setMinElevationForCurrentTile(d)}setPadding(d){this._helper.setPadding(d)}interpolatePadding(d,P,N){this._helper.interpolatePadding(d,P,N)}isPaddingEqual(d){return this._helper.isPaddingEqual(d)}resize(d,P,N=!0){this._helper.resize(d,P,N)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(d){this._helper.setMaxBounds(d)}setConstrainOverride(d){this._helper.setConstrainOverride(d)}overrideNearFarZ(d,P){this._helper.overrideNearFarZ(d,P)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(d){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),d)}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(d,P){this._globeness=d,this._globeLatitudeErrorCorrectionRadians=P,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(d){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(P,N)=>this.currentTransform.defaultConstrain(P,N),this.applyConstrain=(P,N)=>this._helper.applyConstrain(P,N),this._helper=new As({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(P,N)=>this.defaultConstrain(P,N)},d),this._globeness=1,this._mercatorTransform=new Ls,this._verticalPerspectiveTransform=new Yo}clone(){let d=new Ro;return d._globeness=this._globeness,d._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,d.apply(this,!1),d}apply(d,P){this._helper.apply(d,P),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(d){let P=this._mercatorTransform.getProjectionData(d),N=this._verticalPerspectiveTransform.getProjectionData(d);return{mainMatrix:this.isGlobeRendering?N.mainMatrix:P.mainMatrix,clippingPlane:N.clippingPlane,tileMercatorCoords:N.tileMercatorCoords,projectionTransition:d.applyGlobeMatrix?this._globeness:0,fallbackMatrix:P.fallbackMatrix}}isLocationOccluded(d){return this.currentTransform.isLocationOccluded(d)}transformLightDirection(d){return this.currentTransform.transformLightDirection(d)}getPixelScale(){return i.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return i.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(d,P,N){let H=this._mercatorTransform.getPitchedTextCorrection(d,P,N),$=this._verticalPerspectiveTransform.getPitchedTextCorrection(d,P,N);return i.bt(H,$,this._globeness)}projectTileCoordinates(d,P,N,H){return this.currentTransform.projectTileCoordinates(d,P,N,H)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(d){return this.currentTransform.calculateFogMatrix(d)}getVisibleUnwrappedCoordinates(d){return this.currentTransform.getVisibleUnwrappedCoordinates(d)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(d){this._mercatorTransform.recalculateZoomAndCenter(d),this._verticalPerspectiveTransform.recalculateZoomAndCenter(d)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(d,P){return this.currentTransform.lngLatToCameraDepth(d,P)}populateCache(d){this._mercatorTransform.populateCache(d),this._verticalPerspectiveTransform.populateCache(d)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(d,P,N,H){return this._helper.calculateCenterFromCameraLngLatAlt(d,P,N,H)}setLocationAtPoint(d,P){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(d,P),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(d,P),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(d,P){return this.currentTransform.locationToScreenPoint(d,P)}screenPointToMercatorCoordinate(d,P){return this.currentTransform.screenPointToMercatorCoordinate(d,P)}screenPointToLocation(d,P){return this.currentTransform.screenPointToLocation(d,P)}isPointOnMapSurface(d,P){return this.currentTransform.isPointOnMapSurface(d,P)}getRayDirectionFromPixel(d){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(d)}getMatrixForModel(d,P){return this.currentTransform.getMatrixForModel(d,P)}getProjectionDataForCustomLayer(d=!0){let P=this._mercatorTransform.getProjectionDataForCustomLayer(d);if(!this.isGlobeRendering)return P;let N=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(d);return N.fallbackMatrix=P.mainMatrix,N}getFastPathSimpleProjectionMatrix(d){return this.currentTransform.getFastPathSimpleProjectionMatrix(d)}}class is{get useGlobeControls(){return!0}handlePanInertia(d,P){let N=bu(d,P);return Math.abs(N.lng-P.center.lng)>180&&(N.lng=P.center.lng+179.5*Math.sign(N.lng-P.center.lng)),{easingCenter:N,easingOffset:new i.P(0,0)}}handleMapControlsRollPitchBearingZoom(d,P){let N=d.around,H=P.screenPointToLocation(N);d.bearingDelta&&P.setBearing(P.bearing+d.bearingDelta),d.pitchDelta&&P.setPitch(P.pitch+d.pitchDelta),d.rollDelta&&P.setRoll(P.roll+d.rollDelta);let $=P.zoom;d.zoomDelta&&P.setZoom(P.zoom+d.zoomDelta);let se=P.zoom-$;if(se===0)return;let de=i.bJ(P.center.lng,H.lng),Ae=de/(Math.abs(de/180)+1),Fe=i.bJ(P.center.lat,H.lat),Ie=P.getRayDirectionFromPixel(N),Ye=P.cameraPosition,st=-1*i.b3(Ye,Ie),dt=i.bz();i.a_(dt,Ye,[Ie[0]*st,Ie[1]*st,Ie[2]*st]);let Pe=i.b5(dt)-1,Xe=Math.exp(.5*-Math.max(Pe-.3,0)),at=Ks(P.worldSize,P.center.lat)/Math.min(P.width,P.height),xt=i.bw(at,.9,.5,1,.25),Et=(1-i.ao(-se))*Math.min(Xe,xt),Bt=P.center.lat,St=P.zoom,Pt=new i.W(P.center.lng+Ae*Et,i.al(P.center.lat+Fe*Et,-i.am,i.am));P.setLocationAtPoint(H,N);let $t=P.center,Ht=i.bw(Math.abs(de),45,85,0,1),dr=i.bw(at,.75,.35,0,1),Xr=Math.pow(Math.max(Ht,dr),.25),Or=i.bJ($t.lng,Pt.lng),$r=i.bJ($t.lat,Pt.lat);P.setCenter(new i.W($t.lng+Or*Xr,$t.lat+$r*Xr).wrap()),P.setZoom(St+gs(Bt,P.center.lat))}handleMapControlsPan(d,P,N){if(!d.panDelta)return;let H=P.center.lat,$=P.zoom;P.setCenter(bu(d.panDelta,P).wrap()),P.setZoom($+gs(H,P.center.lat))}cameraForBoxAndBearing(d,P,N,H,$){let se=_u(d,P,N,H,$),de=P.left/$.width*2-1,Ae=($.width-P.right)/$.width*2-1,Fe=P.top/$.height*-2+1,Ie=($.height-P.bottom)/$.height*-2+1,Ye=i.bJ(N.getWest(),N.getEast())<0,st=Ye?N.getEast():N.getWest(),dt=Ye?N.getWest():N.getEast(),Pe=Math.max(N.getNorth(),N.getSouth()),Xe=Math.min(N.getNorth(),N.getSouth()),at=st+.5*i.bJ(st,dt),xt=Pe+.5*i.bJ(Pe,Xe),Et=$.clone();Et.setCenter(se.center),Et.setBearing(se.bearing),Et.setPitch(0),Et.setRoll(0),Et.setZoom(se.zoom);let Bt=Et.modelViewProjectionMatrix,St=[ns(N.getNorthWest()),ns(N.getNorthEast()),ns(N.getSouthWest()),ns(N.getSouthEast()),ns(new i.W(dt,xt)),ns(new i.W(st,xt)),ns(new i.W(at,Pe)),ns(new i.W(at,Xe))],Pt=ns(se.center),$t=Number.POSITIVE_INFINITY;for(let Ht of St)de<0&&($t=is.getLesserNonNegativeNonNull($t,is.solveVectorScale(Ht,Pt,Bt,"x",de))),Ae>0&&($t=is.getLesserNonNegativeNonNull($t,is.solveVectorScale(Ht,Pt,Bt,"x",Ae))),Fe>0&&($t=is.getLesserNonNegativeNonNull($t,is.solveVectorScale(Ht,Pt,Bt,"y",Fe))),Ie<0&&($t=is.getLesserNonNegativeNonNull($t,is.solveVectorScale(Ht,Pt,Bt,"y",Ie)));if(Number.isFinite($t)&&$t!==0)return se.zoom=Math.min(Et.zoom+i.ar($t),d.maxZoom),se;$s()}handleJumpToCenterZoom(d,P){let N=d.center.lat,H=d.applyConstrain(P.center?i.W.convert(P.center):d.center,d.zoom).center;d.setCenter(H.wrap());let $=P.zoom!==void 0?+P.zoom:d.zoom+gs(N,H.lat);d.zoom!==$&&d.setZoom($)}handleEaseTo(d,P){let N=d.zoom,H=d.center,$=d.padding,se={roll:d.roll,pitch:d.pitch,bearing:d.bearing},de={roll:P.roll===void 0?d.roll:P.roll,pitch:P.pitch===void 0?d.pitch:P.pitch,bearing:P.bearing===void 0?d.bearing:P.bearing},Ae=P.zoom!==void 0,Fe=!d.isPaddingEqual(P.padding),Ie=!1,Ye=P.center?i.W.convert(P.center):H,st=d.applyConstrain(Ye,N).center;pa(d,st);let dt=d.clone();dt.setCenter(st),dt.setZoom(Ae?+P.zoom:N+gs(H.lat,Ye.lat)),dt.setBearing(P.bearing);let Pe=new i.P(i.al(d.centerPoint.x+P.offsetAsPoint.x,0,d.width),i.al(d.centerPoint.y+P.offsetAsPoint.y,0,d.height));dt.setLocationAtPoint(st,Pe);let Xe=(P.offset&&P.offsetAsPoint.mag())>0?dt.center:st,at=Ae?+P.zoom:N+gs(H.lat,Xe.lat),xt=N+gs(H.lat,0),Et=at+gs(Xe.lat,0),Bt=i.bJ(H.lng,Xe.lng),St=i.bJ(H.lat,Xe.lat),Pt=i.ao(Et-xt);return Ie=at!==N,{easeFunc:$t=>{if(i.bn(se,de)||Kc({startEulerAngles:se,endEulerAngles:de,tr:d,k:$t,useSlerp:se.roll!=de.roll}),Fe&&d.interpolatePadding($,P.padding,$t),P.around)i.w("Easing around a point is not supported under globe projection."),d.setLocationAtPoint(P.around,P.aroundPoint);else{let Ht=Et>xt?Math.min(2,Pt):Math.max(.5,Pt),dr=Math.pow(Ht,1-$t),Xr=ah(H,Bt,St,$t*dr);d.setCenter(Xr.wrap())}if(Ie){let Ht=i.H.number(xt,Et,$t)+gs(0,d.center.lat);d.setZoom(Ht)}},isZooming:Ie,elevationCenter:Xe}}handleFlyTo(d,P){let N=P.zoom!==void 0,H=d.center,$=d.zoom,se=d.padding,de=!d.isPaddingEqual(P.padding),Ae=d.applyConstrain(i.W.convert(P.center||P.locationAtOffset),$).center,Fe=N?+P.zoom:d.zoom+gs(d.center.lat,Ae.lat),Ie=d.clone();Ie.setCenter(Ae),Ie.setZoom(Fe),Ie.setBearing(P.bearing);let Ye=new i.P(i.al(d.centerPoint.x+P.offsetAsPoint.x,0,d.width),i.al(d.centerPoint.y+P.offsetAsPoint.y,0,d.height));Ie.setLocationAtPoint(Ae,Ye);let st=Ie.center;pa(d,st);let dt=(function(St,Pt,$t){let Ht=ns(Pt),dr=ns($t),Xr=i.b3(Ht,dr),Or=Math.acos(Xr),$r=kc(St);return Or/(2*Math.PI)*$r})(d,H,st),Pe=$+gs(H.lat,0),Xe=Fe+gs(st.lat,0),at=i.ao(Xe-Pe),xt;if(typeof P.minZoom=="number"){let St=+P.minZoom+gs(st.lat,0),Pt=Math.min(St,Pe,Xe)+gs(0,st.lat),$t=d.applyConstrain(st,Pt).zoom+gs(st.lat,0);xt=i.ao($t-Pe)}let Et=i.bJ(H.lng,st.lng),Bt=i.bJ(H.lat,st.lat);return{easeFunc:(St,Pt,$t,Ht)=>{let dr=ah(H,Et,Bt,$t);de&&d.interpolatePadding(se,P.padding,St);let Xr=St===1?st:dr;d.setCenter(Xr.wrap());let Or=Pe+i.ar(Pt);d.setZoom(St===1?Fe:Or+gs(0,Xr.lat))},scaleOfZoom:at,targetCenter:st,scaleOfMinZoom:xt,pixelPathLength:dt}}static solveVectorScale(d,P,N,H,$){let se=H==="x"?[N[0],N[4],N[8],N[12]]:[N[1],N[5],N[9],N[13]],de=[N[3],N[7],N[11],N[15]],Ae=d[0]*se[0]+d[1]*se[1]+d[2]*se[2],Fe=d[0]*de[0]+d[1]*de[1]+d[2]*de[2],Ie=P[0]*se[0]+P[1]*se[1]+P[2]*se[2],Ye=P[0]*de[0]+P[1]*de[1]+P[2]*de[2];return Ie+$*Fe===Ae+$*Ye||de[3]*(Ae-Ie)+se[3]*(Ye-Fe)+Ae*Ye==Ie*Fe?null:(Ie+se[3]-$*Ye-$*de[3])/(Ie-Ae-$*Ye+$*Fe)}static getLesserNonNegativeNonNull(d,P){return P!==null&&P>=0&&Pi.C(Y,d==null?void 0:d.filter((P=>P.identifier!=="source.canvas"))),ef=i.bN();class Cc extends i.E{constructor(d,P={}){var N,H;super(),this._rtlPluginLoaded=()=>{for(let se in this.tileManagers){let de=this.tileManagers[se].getSource().type;de!=="vector"&&de!=="geojson"||this.tileManagers[se].reload()}},this.map=d,this.dispatcher=new xe(ye(),d._getMapId()),this.dispatcher.registerMessageHandler("GG",((se,de)=>this.getGlyphs(se,de))),this.dispatcher.registerMessageHandler("GI",((se,de)=>this.getImages(se,de))),this.dispatcher.registerMessageHandler("GDA",((se,de)=>this.getDashes(se,de))),this.imageManager=new L,this.imageManager.setEventedParent(this);let $=((N=d._container)===null||N===void 0?void 0:N.lang)||typeof document!="undefined"&&((H=document.documentElement)===null||H===void 0?void 0:H.lang)||void 0;this.glyphManager=new E(d._requestManager,P.localIdeographFontFamily,$),this.lineAtlas=new j(256,512),this.crossTileSymbolIndex=new $a,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",i.bO()),tt().on(Ve,this._rtlPluginLoaded),this.on("data",(se=>{if(se.dataType!=="source"||se.sourceDataType!=="metadata")return;let de=this.tileManagers[se.sourceId];if(!de)return;let Ae=de.getSource();if(Ae!=null&&Ae.vectorLayerIds)for(let Fe in this._layers){let Ie=this._layers[Fe];Ie.source===Ae.id&&this._validateLayer(Ie)}}))}_setInitialValues(){var d;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new i.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new(((d=this.crossTileSymbolIndex)===null||d===void 0?void 0:d.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(d,P){var N,H,$;this._checkLoaded();let se=P===null?($=(H=(N=this.stylesheet.state)===null||N===void 0?void 0:N[d])===null||H===void 0?void 0:H.default)!==null&&$!==void 0?$:null:P;if(i.bQ(se,this._globalState[d]))return this;this._globalState[d]=se,this._applyGlobalStateChanges([d])}getGlobalState(){return this._globalState}setGlobalState(d){this._checkLoaded();let P=[];for(let N in d)!i.bQ(this._globalState[N],d[N].default)&&(P.push(N),this._globalState[N]=d[N].default);this._applyGlobalStateChanges(P)}_applyGlobalStateChanges(d){if(d.length===0)return;let P=new Set,N={};for(let H of d){N[H]=this._globalState[H];for(let $ in this._layers){let se=this._layers[$],de=se.getLayoutAffectingGlobalStateRefs(),Ae=se.getPaintAffectingGlobalStateRefs(),Fe=se.getVisibilityAffectingGlobalStateRefs();if(de.has(H)&&P.add(se.source),Ae.has(H))for(let{name:Ie,value:Ye}of Ae.get(H))this._updatePaintProperty(se,Ie,Ye);Fe!=null&&Fe.has(H)&&(se.recalculateVisibility(),this._updateLayer(se))}}this.dispatcher.broadcast("UGS",N);for(let H in this.tileManagers)P.has(H)&&(this._reloadSource(H),this._changed=!0)}loadURL(d){return i._(this,arguments,void 0,(function*(P,N={},H){this.fire(new i.n("dataloading",{dataType:"style"})),N.validate=typeof N.validate!="boolean"||N.validate,this._loadStyleRequest=new AbortController;let $=this._loadStyleRequest;try{let se=yield this.map._requestManager.transformRequest(P,"Style");i.bR($.signal);let de=yield i.k(se,$);this._loadStyleRequest===$&&(this._loadStyleRequest=null),this._load(de.data,N,H)}catch(se){this._loadStyleRequest===$&&(this._loadStyleRequest=null),se&&!$.signal.aborted&&this.fire(new i.l(i.d(se)))}}))}loadJSON(d,P={},N){this.fire(new i.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,f.frameAsync(this._frameRequest,this.map._ownerWindow).then((()=>{this._frameRequest=null,P.validate=P.validate!==!1,this._load(d,P,N)})).catch((()=>{}))}loadEmpty(){this.fire(new i.n("dataloading",{dataType:"style"})),this._load(ef,{validate:!1})}_load(d,P,N){var H,$;let se=P.transformStyle?P.transformStyle(N,d):d;if(!P.validate||!dc(this,i.F(se))){se=Object.assign({},se),this._loaded=!0,this.stylesheet=se;for(let de in se.sources)this.addSource(de,se.sources[de],{validate:!1});se.sprite?this._loadSprite(se.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(se.glyphs),this._createLayers(),this.light=new B(this.stylesheet.light),this._setProjectionInternal(((H=this.stylesheet.projection)===null||H===void 0?void 0:H.type)||"mercator"),this.sky=new V(this.stylesheet.sky),this.map.setTerrain(($=this.stylesheet.terrain)!==null&&$!==void 0?$:null),this.fire(new i.n("data",{dataType:"style"})),this.fire(new i.n("style.load"))}}_createLayers(){var d,P,N;let H=i.bS(this.stylesheet.layers);this.setGlobalState((d=this.stylesheet.state)!==null&&d!==void 0?d:null),this.dispatcher.broadcast("SL",H),this._order=H.map(($=>$.id)),this._layers={},this._serializedLayers=null;for(let $ of H){let se=i.bT($,this._globalState);if(se.setEventedParent(this,{layer:{id:$.id}}),this._layers[$.id]=se,i.bU(se)&&this.tileManagers[se.source]){let de=(N=(P=$.paint)===null||P===void 0?void 0:P["raster-fade-duration"])!==null&&N!==void 0?N:se.paint.get("raster-fade-duration");this.tileManagers[se.source].setRasterFadeDuration(de)}}}_loadSprite(d,P=!1,N=void 0){this.imageManager.setLoaded(!1);let H=new AbortController,$;this._spriteRequest=H,(function(se,de,Ae,Fe){return i._(this,void 0,void 0,(function*(){let Ie=C(se),Ye=Ae>1?"@2x":"",st={},dt={};for(let{id:Pe,url:Xe}of Ie){let at=yield de.transformRequest(k(Xe,Ye,".json"),"SpriteJSON");st[Pe]=i.k(at,Fe);let xt=yield de.transformRequest(k(Xe,Ye,".png"),"SpriteImage");dt[Pe]=x.getImage(xt,Fe)}return yield Promise.all([...Object.values(st),...Object.values(dt)]),(function(Pe,Xe){return i._(this,void 0,void 0,(function*(){let at={};for(let xt in Pe){at[xt]={};let Et=f.getImageCanvasContext((yield Xe[xt]).data),Bt=(yield Pe[xt]).data;for(let St in Bt){let{width:Pt,height:$t,x:Ht,y:dr,sdf:Xr,pixelRatio:Or,stretchX:$r,stretchY:Er,content:Tr,textFitWidth:Rr,textFitHeight:Lr}=Bt[St];at[xt][St]={data:null,pixelRatio:Or,sdf:Xr,stretchX:$r,stretchY:Er,content:Tr,textFitWidth:Rr,textFitHeight:Lr,spriteData:{width:Pt,height:$t,x:Ht,y:dr,context:Et}}}}return at}))})(st,dt)}))})(d,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then((se=>{if(this._spriteRequest=null,se)for(let de in se){this._spritesImagesIds[de]=[];let Ae=this._spritesImagesIds[de]?this._spritesImagesIds[de].filter((Fe=>!(Fe in se))):[];for(let Fe of Ae)this.imageManager.removeImage(Fe),this._changedImages[Fe]=!0;for(let Fe in se[de]){let Ie=de==="default"?Fe:`${de}:${Fe}`;this._spritesImagesIds[de].push(Ie),Ie in this.imageManager.images?this.imageManager.updateImage(Ie,se[de][Fe],!1):this.imageManager.addImage(Ie,se[de][Fe]),P&&(this._changedImages[Ie]=!0)}}})).catch((se=>{this._spriteRequest=null,$=se,H.signal.aborted||this.fire(new i.l($))})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),P&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.n("data",{dataType:"style"})),N&&N($)}))}_unloadSprite(){for(let d of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(d),this._changedImages[d]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.n("data",{dataType:"style"}))}_validateLayer(d){let P=this.tileManagers[d.source];if(!P)return;let N=d.sourceLayer;if(!N)return;let H=P.getSource();(H.type==="geojson"||H.vectorLayerIds&&!H.vectorLayerIds.includes(N))&&this.fire(new i.l(new Error(`Source layer "${N}" does not exist on source "${H.id}" as specified by style layer "${d.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let d in this.tileManagers)if(!this.tileManagers[d].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(d,P=!1){let N=this._serializedAllLayers();if(!d||d.length===0)return Object.values(P?i.bV(N):N);let H=[];for(let $ of d)if(N[$]){let se=P?i.bV(N[$]):N[$];H.push(se)}return H}_serializedAllLayers(){let d=this._serializedLayers;if(d)return d;d=this._serializedLayers={};let P=Object.keys(this._layers);for(let N of P){let H=this._layers[N];H.type!=="custom"&&(d[N]=H.serialize())}return d}hasTransitions(){var d,P,N;if(!((d=this.light)===null||d===void 0)&&d.hasTransition()||!((P=this.sky)===null||P===void 0)&&P.hasTransition()||!((N=this.projection)===null||N===void 0)&&N.hasTransition())return!0;for(let H in this.tileManagers)if(this.tileManagers[H].hasTransition())return!0;for(let H in this._layers)if(this._layers[H].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(d){if(!this._loaded)return;let P=this._changed;if(P){let H=Object.keys(this._updatedLayers),$=Object.keys(this._removedLayers);(H.length||$.length)&&this._updateWorkerLayers(H,$);for(let se in this._updatedSources){let de=this._updatedSources[se];if(de==="reload")this._reloadSource(se);else{if(de!=="clear")throw new Error(`Invalid action ${de}`);this._clearSource(se)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let se in this._updatedPaintProps)this._layers[se].updateTransitions(d);this.light.updateTransitions(d),this.sky.updateTransitions(d),this._resetUpdates()}let N={};for(let H in this.tileManagers){let $=this.tileManagers[H];N[H]=$.used,$.used=!1}for(let H of this._order){let $=this._layers[H];$.recalculate(d,this._availableImages),!$.isHidden(d.zoom)&&$.source&&(this.tileManagers[$.source].used=!0)}for(let H in N){let $=this.tileManagers[H];!!N[H]!=!!$.used&&$.fire(new i.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:H}))}this.light.recalculate(d),this.sky.recalculate(d),this.projection.recalculate(d),this.z=d.zoom,P&&this.fire(new i.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let d=Object.keys(this._changedImages);if(d.length){for(let P in this.tileManagers)this.tileManagers[P].reloadTilesForDependencies(["icons","patterns"],d);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let d in this.tileManagers)this.tileManagers[d].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(d,P){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(d,!1),removedIds:P})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(d,P={}){var N;this._checkLoaded();let H=this.serialize();if(d=P.transformStyle?P.transformStyle(H,d):d,((N=P.validate)===null||N===void 0||N)&&dc(this,i.F(d)))return!1;(d=i.bV(d)).layers=i.bS(d.layers);let $=i.bW(H,d),se=this._getOperationsToPerform($);if(se.unimplemented.length>0)throw new Error(`Unimplemented: ${se.unimplemented.join(", ")}.`);if(se.operations.length===0)return!1;for(let de of se.operations)de();return this.stylesheet=d,this._serializedLayers=null,this.fire(new i.n("style.load",{style:this})),!0}_getOperationsToPerform(d){let P=[],N=[];for(let H of d)switch(H.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":P.push((()=>this.addLayer.apply(this,H.args)));break;case"removeLayer":P.push((()=>this.removeLayer.apply(this,H.args)));break;case"setPaintProperty":P.push((()=>this.setPaintProperty.apply(this,H.args)));break;case"setLayoutProperty":P.push((()=>this.setLayoutProperty.apply(this,H.args)));break;case"setFilter":P.push((()=>this.setFilter.apply(this,H.args)));break;case"addSource":P.push((()=>this.addSource.apply(this,H.args)));break;case"removeSource":P.push((()=>this.removeSource.apply(this,H.args)));break;case"setLayerZoomRange":P.push((()=>this.setLayerZoomRange.apply(this,H.args)));break;case"setLight":P.push((()=>this.setLight.apply(this,H.args)));break;case"setGeoJSONSourceData":P.push((()=>this.setGeoJSONSourceData.apply(this,H.args)));break;case"setGlyphs":P.push((()=>this.setGlyphs.apply(this,H.args)));break;case"setSprite":P.push((()=>this.setSprite.apply(this,H.args)));break;case"setTerrain":P.push((()=>this.map.setTerrain.apply(this,H.args)));break;case"setSky":P.push((()=>this.setSky.apply(this,H.args)));break;case"setProjection":this.setProjection.apply(this,H.args);break;case"setGlobalState":P.push((()=>this.setGlobalState.apply(this,H.args)));break;case"setTransition":P.push((()=>{}));break;default:N.push(H.command)}return{operations:P,unimplemented:N}}addImage(d,P){if(this.getImage(d))return this.fire(new i.l(new Error(`An image named "${d}" already exists.`)));this.imageManager.addImage(d,P),this._afterImageUpdated(d)}updateImage(d,P){this.imageManager.updateImage(d,P)}getImage(d){return this.imageManager.getImage(d)}removeImage(d){if(!this.getImage(d))return this.fire(new i.l(new Error(`An image named "${d}" does not exist.`)));this.imageManager.removeImage(d),this._afterImageUpdated(d)}_afterImageUpdated(d){this._availableImages=this.imageManager.listImages(),this._changedImages[d]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(d,P,N={}){var H;if(this._checkLoaded(),this.tileManagers[d]!==void 0)throw new Error(`Source "${d}" already exists.`);if(!P.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(P).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(P.type)&&this._validate(i.F.source,`sources.${d}`,P,null,N))return;!((H=this.map)===null||H===void 0)&&H._collectResourceTiming&&(P.collectResourceTiming=!0);let $=this.tileManagers[d]=new Zr(d,P,this.dispatcher);$.style=this,$.setEventedParent(this,(()=>({isSourceLoaded:$.loaded(),source:$.serialize(),sourceId:d}))),$.onAdd(this.map),this._changed=!0}removeSource(d){if(this._checkLoaded(),this.tileManagers[d]===void 0)throw new Error(`There is no source with this ID=${d}`);for(let N in this._layers)if(this._layers[N].source===d)return this.fire(new i.l(new Error(`Source "${d}" cannot be removed while layer "${N}" is using it.`)));let P=this.tileManagers[d];delete this.tileManagers[d],delete this._updatedSources[d],P.fire(new i.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:d})),P.setEventedParent(null),P.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(d,P){if(this._checkLoaded(),this.tileManagers[d]===void 0)throw new Error(`There is no source with this ID=${d}`);let N=this.tileManagers[d].getSource();if(N.type!=="geojson")throw new Error(`geojsonSource.type is ${N.type}, which is !== 'geojson`);N.setData(P),this._changed=!0}getSource(d){var P;return(P=this.tileManagers[d])===null||P===void 0?void 0:P.getSource()}addLayer(d,P,N={}){this._checkLoaded();let H=d.id;if(this.getLayer(H))return void this.fire(new i.l(new Error(`Layer "${H}" already exists on this map.`)));let $;if(d.type==="custom"){if(dc(this,i.bX(d)))return;$=i.bT(d,this._globalState)}else{if("source"in d&&typeof d.source=="object"&&(this.addSource(H,d.source),d=i.bV(d),d=i.e(d,{source:H})),this._validate(i.F.layer,`layers.${H}`,d,{arrayIndex:-1},N))return;$=i.bT(d,this._globalState),this._validateLayer($),$.setEventedParent(this,{layer:{id:H}})}let se=P?this._order.indexOf(P):this._order.length;if(P&&se===-1)this.fire(new i.l(new Error(`Cannot add layer "${H}" before non-existing layer "${P}".`)));else{if(this._order.splice(se,0,H),this._layerOrderChanged=!0,this._layers[H]=$,this._removedLayers[H]&&$.source&&$.type!=="custom"){let de=this._removedLayers[H];delete this._removedLayers[H],de.type!==$.type?this._updatedSources[$.source]="clear":(this._updatedSources[$.source]="reload",this.tileManagers[$.source].pause())}this._updateLayer($),$.onAdd&&$.onAdd(this.map)}}moveLayer(d,P){if(this._checkLoaded(),this._changed=!0,!this._layers[d])return void this.fire(new i.l(new Error(`The layer '${d}' does not exist in the map's style and cannot be moved.`)));if(d===P)return;let N=this._order.indexOf(d);this._order.splice(N,1);let H=P?this._order.indexOf(P):this._order.length;P&&H===-1?this.fire(new i.l(new Error(`Cannot move layer "${d}" before non-existing layer "${P}".`))):(this._order.splice(H,0,d),this._layerOrderChanged=!0)}removeLayer(d){this._checkLoaded();let P=this._layers[d];if(!P)return void this.fire(new i.l(new Error(`Cannot remove non-existing layer "${d}".`)));P.setEventedParent(null);let N=this._order.indexOf(d);this._order.splice(N,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[d]=P,delete this._layers[d],this._serializedLayers&&delete this._serializedLayers[d],delete this._updatedLayers[d],delete this._updatedPaintProps[d],P.onRemove&&P.onRemove(this.map)}getLayer(d){return this._layers[d]}getLayersOrder(){return[...this._order]}hasLayer(d){return d in this._layers}setLayerZoomRange(d,P,N){this._checkLoaded();let H=this.getLayer(d);H?H.minzoom===P&&H.maxzoom===N||(P!=null&&(H.minzoom=P),N!=null&&(H.maxzoom=N),this._updateLayer(H)):this.fire(new i.l(new Error(`Cannot set the zoom range of non-existing layer "${d}".`)))}setFilter(d,P,N={}){this._checkLoaded();let H=this.getLayer(d);if(H){if(!i.bQ(H.filter,P))return P==null?(H.setFilter(void 0),void this._updateLayer(H)):void(this._validate(i.F.filter,`layers.${H.id}.filter`,P,null,N)||(H.setFilter(i.bV(P)),this._updateLayer(H)))}else this.fire(new i.l(new Error(`Cannot filter non-existing layer "${d}".`)))}getFilter(d){return i.bV(this.getLayer(d).filter)}setLayoutProperty(d,P,N,H={}){this._checkLoaded();let $=this.getLayer(d);$?i.bQ($.getLayoutProperty(P),N)||($.setLayoutProperty(P,N,H),this._updateLayer($)):this.fire(new i.l(new Error(`Cannot style non-existing layer "${d}".`)))}getLayoutProperty(d,P){let N=this.getLayer(d);if(N)return N.getLayoutProperty(P);this.fire(new i.l(new Error(`Cannot get style of non-existing layer "${d}".`)))}setPaintProperty(d,P,N,H={}){this._checkLoaded();let $=this.getLayer(d);$?i.bQ($.getPaintProperty(P),N)||this._updatePaintProperty($,P,N,H):this.fire(new i.l(new Error(`Cannot style non-existing layer "${d}".`)))}_updatePaintProperty(d,P,N,H={}){d.setPaintProperty(P,N,H)&&this._updateLayer(d),i.bU(d)&&P==="raster-fade-duration"&&this.tileManagers[d.source].setRasterFadeDuration(N),this._changed=!0,this._updatedPaintProps[d.id]=!0,this._serializedLayers=null}getPaintProperty(d,P){return this.getLayer(d).getPaintProperty(P)}setFeatureState(d,P){this._checkLoaded();let N=d.source,H=d.sourceLayer,$=this.tileManagers[N];if($===void 0)return void this.fire(new i.l(new Error(`The source '${N}' does not exist in the map's style.`)));let se=$.getSource().type;se==="geojson"&&H?this.fire(new i.l(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):se!=="vector"||H?(d.id===void 0&&this.fire(new i.l(new Error("The feature id parameter must be provided."))),$.setFeatureState(H,d.id,P)):this.fire(new i.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(d,P){this._checkLoaded();let N=d.source,H=this.tileManagers[N];if(H===void 0)return void this.fire(new i.l(new Error(`The source '${N}' does not exist in the map's style.`)));let $=H.getSource().type,se=$==="vector"?d.sourceLayer:void 0;$!=="vector"||se?P&&typeof d.id!="string"&&typeof d.id!="number"?this.fire(new i.l(new Error("A feature id is required to remove its specific state property."))):H.removeFeatureState(se,d.id,P):this.fire(new i.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(d){this._checkLoaded();let P=d.source,N=d.sourceLayer,H=this.tileManagers[P];if(H!==void 0)return H.getSource().type!=="vector"||N?(d.id===void 0&&this.fire(new i.l(new Error("The feature id parameter must be provided."))),H.getFeatureState(N,d.id)):void this.fire(new i.l(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new i.l(new Error(`The source '${P}' does not exist in the map's style.`)))}getTransition(){var d;return i.e({duration:300,delay:0},(d=this.stylesheet)===null||d===void 0?void 0:d.transition)}serialize(){if(!this._loaded)return;let d=i.bY(this.tileManagers,($=>$.serialize())),P=this._serializeByIds(this._order,!0),N=this.map.getTerrain()||void 0,H=this.stylesheet;return i.bZ({version:H.version,name:H.name,metadata:H.metadata,light:H.light,sky:H.sky,center:H.center,zoom:H.zoom,bearing:H.bearing,pitch:H.pitch,sprite:H.sprite,glyphs:H.glyphs,transition:H.transition,projection:H.projection,sources:d,layers:P,terrain:N},($=>$!==void 0))}_updateLayer(d){this._updatedLayers[d.id]=!0,d.source&&!this._updatedSources[d.source]&&this.tileManagers[d.source].getSource().type!=="raster"&&(this._updatedSources[d.source]="reload",this.tileManagers[d.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(d){let P=se=>this._layers[se].type==="fill-extrusion",N={},H=[];for(let se=this._order.length-1;se>=0;se--){let de=this._order[se];if(P(de)){N[de]=se;for(let Ae of d){let Fe=Ae[de];if(Fe)for(let Ie of Fe)H.push(Ie)}}}H.sort(((se,de)=>de.intersectionZ-se.intersectionZ));let $=[];for(let se=this._order.length-1;se>=0;se--){let de=this._order[se];if(P(de))for(let Ae=H.length-1;Ae>=0;Ae--){let Fe=H[Ae].feature;if(N[Fe.layer.id]this.map.terrain.getElevation(Ie,Ye,st):void 0));return this.placement&&$.push((function(Fe,Ie,Ye,st,dt,Pe,Xe){let at={},xt=Pe.queryRenderedSymbols(st),Et=[];for(let Bt of Object.keys(xt).map(Number))Et.push(Xe[Bt]);Et.sort(ne);for(let Bt of Et){let St=Bt.featureIndex.lookupSymbolFeatures(xt[Bt.bucketInstanceId],Ie,Bt.bucketIndex,Bt.sourceLayerIndex,{filterSpec:dt.filter,globalState:dt.globalState},dt.layers,dt.availableImages,Fe);for(let Pt in St){at[Pt]||(at[Pt]=[]);let $t=St[Pt];$t.sort(((Ht,dr)=>{let Xr=Bt.featureSortOrder;if(Xr){let Or=Xr.indexOf(Ht.featureIndex);return Xr.indexOf(dr.featureIndex)-Or}return dr.featureIndex-Ht.featureIndex}));for(let Ht of $t)at[Pt].push(Ht)}}return(function(Bt,St,Pt){for(let $t in Bt)for(let Ht of Bt[$t])ae(Ht,Pt[St[$t].source]);return Bt})(at,Fe,Ye)})(this._layers,se,this.tileManagers,d,Ae,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures($)}querySourceFeatures(d,P){P!=null&&P.filter&&this._validate(i.F.filter,"querySourceFeatures.filter",P.filter,null,P);let N=this.tileManagers[d];return N?(function(H,$){let se=H.getRenderableIds().map((Fe=>H.getTileByID(Fe))),de=[],Ae={};for(let Fe of se){let Ie=Fe.tileID.canonical.key;Ae[Ie]||(Ae[Ie]=!0,Fe.querySourceFeatures(de,$))}return de})(N,P?Object.assign(Object.assign({},P),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(d,P={}){this._checkLoaded();let N=this.light.getLight(),H=!1;for(let se in d)if(!i.bQ(d[se],N[se])){H=!0;break}if(!H)return;let $={now:g(),transition:i.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(d,P),this.light.updateTransitions($)}getProjection(){var d;return(d=this.stylesheet)===null||d===void 0?void 0:d.projection}setProjection(d){this._checkLoaded();let P=d!=null?d:{type:"mercator"};if(this.stylesheet.projection=d,this.projection){if(this.projection.name===P.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(P.type)}getSky(){var d;return(d=this.stylesheet)===null||d===void 0?void 0:d.sky}setSky(d,P={}){this._checkLoaded();let N=this.getSky(),H=!1;if(!d&&!N)return;if(d&&!N)H=!0;else if(!d&&N)H=!0;else for(let se in d)if(!i.bQ(d[se],N[se])){H=!0;break}if(!H)return;let $={now:g(),transition:i.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=d,this.sky.setSky(d,P),this.sky.updateTransitions($)}_setProjectionInternal(d){let P=(function(N,H){let $={constrainOverride:H};if(Array.isArray(N)){let se=new Sf({type:N});return{projection:se,transform:new Ro($),cameraHelper:new Dl(se)}}switch(N){case"mercator":return{projection:new oo,transform:new Ls($),cameraHelper:new Gu};case"globe":{let se=new Sf({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:se,transform:new Ro($),cameraHelper:new Dl(se)}}case"vertical-perspective":return{projection:new Bd,transform:new Yo($),cameraHelper:new is};default:return i.w(`Unknown projection name: ${N}. Falling back to mercator projection.`),{projection:new oo,transform:new Ls($),cameraHelper:new Gu}}})(d,this.map.transformConstrain);this.projection=P.projection,this.map.migrateProjection(P.transform,P.cameraHelper);for(let N in this.tileManagers)this.tileManagers[N].reload()}_validate(d,P,N,H,$={}){return($==null?void 0:$.validate)!==!1&&dc(this,d.call(i.F,i.e({key:P,style:this.serialize(),value:N,styleSpec:i.x},H)))}_remove(d=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),tt().off(Ve,this._rtlPluginLoaded);for(let P in this._layers)this._layers[P].setEventedParent(null);for(let P in this.tileManagers){let N=this.tileManagers[P];N.setEventedParent(null),N.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),d&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(d)}_clearSource(d){this.tileManagers[d].clearTiles()}_reloadSource(d){this.tileManagers[d].resume(),this.tileManagers[d].reload()}_updateSources(d){for(let P in this.tileManagers)this.tileManagers[P].update(d,this.map.terrain)}_generateCollisionBoxes(){for(let d in this.tileManagers)this._reloadSource(d)}_updatePlacement(d,P,N,H,$=!1){let se=!1,de=!1,Ae={};for(let Fe of this._order){let Ie=this._layers[Fe];if(Ie.type!=="symbol")continue;if(!Ae[Ie.source]){let st=this.tileManagers[Ie.source];Ae[Ie.source]=st.getRenderableIds(!0).map((dt=>st.getTileByID(dt))).sort(((dt,Pe)=>Pe.tileID.overscaledZ-dt.tileID.overscaledZ||(dt.tileID.isLessThan(Pe.tileID)?-1:1)))}let Ye=this.crossTileSymbolIndex.addLayer(Ie,Ae[Ie.source],d.center.lng);se||(se=Ye)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),$||($=this._layerOrderChanged||N===0),($||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(g(),d.zoom))&&(this.pauseablePlacement=new Ra(d,this.map.terrain,this._order,$,P,N,H,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ae),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(g()),de=!0),se&&this.pauseablePlacement.placement.setStale()),de||se)for(let Fe of this._order){let Ie=this._layers[Fe];Ie.type==="symbol"&&this.placement.updateLayerOpacities(Ie,Ae[Ie.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(g())}_releaseSymbolFadeTiles(){for(let d in this.tileManagers)this.tileManagers[d].releaseSymbolFadeTiles()}getImages(d,P){return i._(this,void 0,void 0,(function*(){let N=yield this.imageManager.getImages(P.icons);this._updateTilesForChangedImages();let H=this.tileManagers[P.source];return H&&H.setDependencies(P.tileID.key,P.type,P.icons),N}))}getGlyphs(d,P){return i._(this,void 0,void 0,(function*(){let N=yield this.glyphManager.getGlyphs(P.stacks),H=this.tileManagers[P.source];return H&&H.setDependencies(P.tileID.key,P.type,[""]),N}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(d,P={}){this._checkLoaded(),d&&this._validate(i.F.glyphs,"glyphs",d,null,P)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=d,this.glyphManager.entries={},this.glyphManager.setURL(d))}getDashes(d,P){return i._(this,void 0,void 0,(function*(){let N={};for(let[H,$]of Object.entries(P.dashes))N[H]=this.lineAtlas.getDash($.dasharray,$.round);return N}))}addSprite(d,P,N={},H){this._checkLoaded();let $=[{id:d,url:P}],se=[...C(this.stylesheet.sprite),...$];this._validate(i.F.sprite,"sprite",se,null,N)||(this.stylesheet.sprite=se,this._loadSprite($,!0,H))}removeSprite(d){this._checkLoaded();let P=C(this.stylesheet.sprite);if(P.find((N=>N.id===d))){if(this._spritesImagesIds[d])for(let N of this._spritesImagesIds[d])this.imageManager.removeImage(N),this._changedImages[N]=!0;P.splice(P.findIndex((N=>N.id===d)),1),this.stylesheet.sprite=P.length>0?P:void 0,delete this._spritesImagesIds[d],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.n("data",{dataType:"style"}))}else this.fire(new i.l(new Error(`Sprite "${d}" doesn't exists on this map.`)))}getSprite(){return C(this.stylesheet.sprite)}setSprite(d,P={},N){this._checkLoaded(),d&&this._validate(i.F.sprite,"sprite",d,null,P)||(this.stylesheet.sprite=d,d?this._loadSprite(d,!0,N):(this._unloadSprite(),N&&N(null)))}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(let d in this.tileManagers){let P=this.tileManagers[d];P.setEventedParent(null),P.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(let d in this._layers){let P=this._layers[d];P.setEventedParent(null),P.onRemove&&P.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var sh=i.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Y0{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(d,P,N,H,$,se,de,Ae,Fe){this.context=d;let Ie=this.boundPaintVertexBuffers.length!==H.length;for(let Ye=0;!Ie&&Ye({u_texture:0,u_ele_delta:Y,u_fog_matrix:d,u_fog_color:P?P.properties.get("fog-color"):i.bo.white,u_fog_ground_blend:P?P.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:H?0:P?P.calculateFogBlendOpacity(N):0,u_horizon_color:P?P.properties.get("horizon-color"):i.bo.white,u_horizon_fog_blend:P?P.properties.get("horizon-fog-blend"):1,u_is_globe_mode:H?1:0}),Cf={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function Vo(Y){let d=[];for(let P of Y){if(P===null)continue;let N=P.split(" ");d.push(N.pop())}return d}class Ud{constructor(d,P,N,H,$,se,de,Ae,Fe=[]){let Ie=d.gl;this.program=Ie.createProgram();let Ye=Vo(P.staticAttributes),st=N?N.getBinderAttributes():[],dt=Ye.concat(st),Pe=Oa.prelude.staticUniforms?Vo(Oa.prelude.staticUniforms):[],Xe=de.staticUniforms?Vo(de.staticUniforms):[],at=P.staticUniforms?Vo(P.staticUniforms):[],xt=N?N.getBinderUniforms():[],Et=Pe.concat(Xe).concat(at).concat(xt),Bt=[];for(let Or of Et)Bt.includes(Or)||Bt.push(Or);let St=N?N.defines():[];Pl(Ie)&&St.unshift("#version 300 es"),$&&St.push("#define OVERDRAW_INSPECTOR;"),se&&St.push("#define TERRAIN3D;"),Ae&&St.push(Ae),Fe&&St.push(...Fe);let Pt=St.concat(Oa.prelude.fragmentSource,de.fragmentSource,P.fragmentSource).join(` +`})),staticAttributes:N,staticUniforms:se}}class ka{constructor(d,P,N){this.vertexBuffer=d,this.indexBuffer=P,this.segments=N}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var vs=i.aS([{name:"a_pos",type:"Int16",components:2}]);let xo="#define PROJECTION_MERCATOR",so="mercator";class oo{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return so}get shaderDefine(){return xo}get shaderPreludeCode(){return Oa.projectionMercator}get vertexShaderPreludeCode(){return Oa.projectionMercator.vertexSource}get subdivisionGranularity(){return i.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(d){}getMeshFromTileID(d,P,N,H,$){if(this._cachedMesh)return this._cachedMesh;let se=new i.aU;se.emplaceBack(0,0),se.emplaceBack(i.a6,0),se.emplaceBack(0,i.a6),se.emplaceBack(i.a6,i.a6);let de=d.createVertexBuffer(se,vs.members),Ae=i.aV.simpleSegment(0,0,4,2),Fe=new i.aW;Fe.emplaceBack(1,0,2),Fe.emplaceBack(1,2,3);let Ie=d.createIndexBuffer(Fe);return this._cachedMesh=new ka(de,Ie,Ae),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(d){}}class Co{constructor(d=0,P=0,N=0,H=0){if(isNaN(d)||d<0||isNaN(P)||P<0||isNaN(N)||N<0||isNaN(H)||H<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=d,this.bottom=P,this.left=N,this.right=H}interpolate(d,P,N){return P.top!=null&&d.top!=null&&(this.top=i.H.number(d.top,P.top,N)),P.bottom!=null&&d.bottom!=null&&(this.bottom=i.H.number(d.bottom,P.bottom,N)),P.left!=null&&d.left!=null&&(this.left=i.H.number(d.left,P.left,N)),P.right!=null&&d.right!=null&&(this.right=i.H.number(d.right,P.right,N)),this}getCenter(d,P){let N=i.al((this.left+d-this.right)/2,0,d),H=i.al((this.top+P-this.bottom)/2,0,P);return new i.P(N,H)}equals(d){return this.top===d.top&&this.bottom===d.bottom&&this.left===d.left&&this.right===d.right}clone(){return new Co(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function pa(Y,d){if(!Y.renderWorldCopies||Y.lngRange)return;let P=d.lng-Y.center.lng;d.lng+=P>180?-360:P<-180?360:0}function la(Y){return Math.max(0,Math.floor(Y))}class As{constructor(d,P){var N;this.applyConstrain=(H,$)=>this._constrainOverride!==null?this._constrainOverride(H,$):this._callbacks.defaultConstrain(H,$),this._callbacks=d,this._tileSize=512,this._renderWorldCopies=(P==null?void 0:P.renderWorldCopies)===void 0||!!(P!=null&&P.renderWorldCopies),this._minZoom=(P==null?void 0:P.minZoom)||0,this._maxZoom=(P==null?void 0:P.maxZoom)||22,this._minPitch=(P==null?void 0:P.minPitch)==null?0:P==null?void 0:P.minPitch,this._maxPitch=(P==null?void 0:P.maxPitch)==null?60:P==null?void 0:P.maxPitch,this._constrainOverride=(N=P==null?void 0:P.constrainOverride)!==null&&N!==void 0?N:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new i.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=la(this._zoom),this._scale=i.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new Co,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(d,P,N){this._constrainOverride=d.constrainOverride,this._latRange=d.latRange,this._lngRange=d.lngRange,this._width=d.width,this._height=d.height,this._center=d.center,this._elevation=d.elevation,this._minElevationForCurrentTile=d.minElevationForCurrentTile,this._zoom=d.zoom,this._tileZoom=la(this._zoom),this._scale=i.ao(this._zoom),this._bearingInRadians=d.bearingInRadians,this._fovInRadians=d.fovInRadians,this._pitchInRadians=d.pitchInRadians,this._rollInRadians=d.rollInRadians,this._unmodified=d.unmodified,this._edgeInsets=new Co(d.padding.top,d.padding.bottom,d.padding.left,d.padding.right),this._minZoom=d.minZoom,this._maxZoom=d.maxZoom,this._minPitch=d.minPitch,this._maxPitch=d.maxPitch,this._renderWorldCopies=d.renderWorldCopies,this._cameraToCenterDistance=d.cameraToCenterDistance,this._nearZ=d.nearZ,this._farZ=d.farZ,this._autoCalculateNearFarZ=!N&&d.autoCalculateNearFarZ,P&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(d){this._minElevationForCurrentTile=d}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(d){this._minZoom!==d&&(this._minZoom=d,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(d){this._maxZoom!==d&&(this._maxZoom=d,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(d){this._minPitch!==d&&(this._minPitch=d,this.setPitch(Math.max(this.pitch,d)))}get maxPitch(){return this._maxPitch}setMaxPitch(d){this._maxPitch!==d&&(this._maxPitch=d,this.setPitch(Math.min(this.pitch,d)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(d){d===void 0?d=!0:d===null&&(d=!1),this._renderWorldCopies=d}get constrainOverride(){return this._constrainOverride}setConstrainOverride(d){d===void 0&&(d=null),this._constrainOverride!==d&&(this._constrainOverride=d,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 i.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(d){let P=i.X(d,-180,180)*Math.PI/180;var N,H,$,se,de,Ae,Fe,Ie,Ye;this._bearingInRadians!==P&&(this._unmodified=!1,this._bearingInRadians=P,this._calcMatrices(),this._rotationMatrix=s(),N=this._rotationMatrix,$=-this._bearingInRadians,se=(H=this._rotationMatrix)[0],de=H[1],Ae=H[2],Fe=H[3],Ie=Math.sin($),Ye=Math.cos($),N[0]=se*Ye+Ae*Ie,N[1]=de*Ye+Fe*Ie,N[2]=se*-Ie+Ae*Ye,N[3]=de*-Ie+Fe*Ye)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(d){let P=i.al(d,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==P&&(this._unmodified=!1,this._pitchInRadians=P,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(d){let P=d/180*Math.PI;this._rollInRadians!==P&&(this._unmodified=!1,this._rollInRadians=P,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return i.aX(this._fovInRadians)}setFov(d){d=i.al(d,.1,150),this.fov!==d&&(this._unmodified=!1,this._fovInRadians=i.an(d),this._calcMatrices())}get zoom(){return this._zoom}setZoom(d){let P=this.applyConstrain(this._center,d).zoom;this._zoom!==P&&(this._unmodified=!1,this._zoom=P,this._tileZoom=Math.max(0,Math.floor(P)),this._scale=i.ao(P),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(d){d.lat===this._center.lat&&d.lng===this._center.lng||(this._unmodified=!1,this._center=d,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(d){d!==this._elevation&&(this._elevation=d,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(d){this._edgeInsets.equals(d)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,d,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(d,P){this._autoCalculateNearFarZ=!1,this._nearZ=d,this._farZ=P,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(d){return this._edgeInsets.equals(d)}interpolatePadding(d,P,N){this._unmodified=!1,this._edgeInsets.interpolate(d,P,N),this.constrainInternal(),this._calcMatrices()}resize(d,P,N=!0){this._width=d,this._height=P,N&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var d,P;return((d=this._latRange)===null||d===void 0?void 0:d.length)!==2||((P=this._lngRange)===null||P===void 0?void 0:P.length)!==2?null:new ie([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(d){d?(this._lngRange=[d.getWest(),d.getEast()],this._latRange=[d.getSouth(),d.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-i.am,i.am])}getCameraQueryGeometry(d,P){if(P.length===1)return[P[0],d];{let{minX:N,minY:H,maxX:$,maxY:se}=i.a8.fromPoints(P).extend(d);return[new i.P(N,H),new i.P($,H),new i.P($,se),new i.P(N,se),new i.P(N,H)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let d=this._unmodified,{center:P,zoom:N}=this.applyConstrain(this.center,this.zoom);this.setCenter(P),this.setZoom(N),this._unmodified=d,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let d=i.ap(new Float64Array(16));i.S(d,d,[this._width/2,-this._height/2,1]),i.Q(d,d,[1,-1,0]),this._clipSpaceToPixelsMatrix=d,d=i.ap(new Float64Array(16)),i.S(d,d,[1,-1,1]),i.Q(d,d,[-1,-1,0]),i.S(d,d,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=d,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(d,P,N,H){let $=N!==void 0?N:this.bearing,se=H=H!==void 0?H:this.pitch,{distanceToCenter:de,clampedElevation:Ae}=this._distanceToCenterFromAltElevationPitch(P,this.elevation,se),{x:Fe,y:Ie}=cr(se,$),Ye=i.a7.fromLngLat(d,P),st,ht,Pe=i.aY(1,Ye.y),Xe=0;do{if(Xe+=1,Xe>10)break;ht=de/Pe,st=new i.a7(Ye.x+Fe*ht,Ye.y+Ie*ht),Pe=1/st.meterInMercatorCoordinateUnits()}while(Math.abs(de-ht*Pe)>1e-12);return{center:st.toLngLat(),elevation:Ae,zoom:i.ar(this.height/2/Math.tan(this.fovInRadians/2)/ht/this.tileSize)}}recalculateZoomAndCenter(d){if(this.elevation-d==0)return;let P=1/this.worldSize,N=i.aq(1,this.center.lat)*this.worldSize,H=i.a7.fromLngLat(this.center,this.elevation),$=H.x/P,se=H.y/P,de=H.z/P,Ae=this.pitch,Fe=this.bearing,{x:Ie,y:Ye,z:st}=cr(Ae,Fe),ht=this.cameraToCenterDistance,Pe=$+ht*-Ie,Xe=se+ht*-Ye,at=de+ht*st,{distanceToCenter:xt,clampedElevation:Et}=this._distanceToCenterFromAltElevationPitch(at/N,d,Ae),Bt=xt*N,St=new i.a7((Pe+Ie*Bt)*P,(Xe+Ye*Bt)*P,0).toLngLat(),Pt=i.aq(1,St.lat),$t=i.ar(this.height/2/Math.tan(this.fovInRadians/2)/xt/Pt/this.tileSize);this._elevation=Et,this._center=St,this.setZoom($t)}_distanceToCenterFromAltElevationPitch(d,P,N){let H=-Math.cos(i.an(N)),$=d-P,se,de=P;return H*$>=0||Math.abs(H)<.1?(se=1e4,de=d+se*H):se=-$/H,{distanceToCenter:se,clampedElevation:de}}getCameraPoint(){let d=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.P(d*Math.sin(this.rollInRadians),d*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let d=i.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/d).toLngLat()}getMercatorTileCoordinates(d){if(!d)return[0,0,1,1];let P=d.canonical.z>=0?1<this.max[0]||d.aabb.min[1]>this.max[1]||d.aabb.min[2]>this.max[2]||d.aabb.max[0]0?(P+=d[H]*this.min[H],N+=d[H]*this.max[H]):(N+=d[H]*this.min[H],P+=d[H]*this.max[H]);return P>=0?2:N<0?0:1}}class xu{distanceToTile2d(d,P,N,H){let $=H,se=$.distanceX([d,P]),de=$.distanceY([d,P]);return Math.hypot(se,de)}getWrap(d,P,N){return N}getTileBoundingVolume(d,P,N,H){var $,se;let de=0,Ae=0;if(H!=null&&H.terrain){let Ie=new i.a3(d.z,P,d.z,d.x,d.y),Ye=H.terrain.getMinMaxElevation(Ie);de=($=Ye.minElevation)!==null&&$!==void 0?$:Math.min(0,N),Ae=(se=Ye.maxElevation)!==null&&se!==void 0?se:Math.max(0,N)}let Fe=1<H}allowWorldCopies(){return!0}prepareNextFrame(){}}class rs{constructor(d,P,N){this.points=d,this.planes=P,this.aabb=N}static fromInvProjectionMatrix(d,P=1,N=0,H,$){let se=$?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],de=Math.pow(2,N),Ae=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((st=>(function(ht,Pe,Xe,at){let xt=i.aE([],ht,Pe),Et=1/xt[3]/Xe*at;return i.b4(xt,xt,[Et,Et,1/xt[3],Et])})(st,d,P,de)));H&&(function(st,ht,Pe,Xe){let at=Xe?4:0,xt=Xe?0:4,Et=0,Bt=[],St=[];for(let Ht=0;Ht<4;Ht++){let dr=i.b0([],st[Ht+xt],st[Ht+at]),Xr=i.b5(dr);i.aZ(dr,dr,1/Xr),Bt.push(Xr),St.push(dr)}for(let Ht=0;Ht<4;Ht++){let dr=i.b6(st[Ht+at],St[Ht],Pe);Et=dr!==null&&dr>=0?Math.max(Et,dr):Math.max(Et,Bt[Ht])}let Pt=(function(Ht,dr){let Xr=i.b0([],Ht[dr[0]],Ht[dr[1]]),Or=i.b0([],Ht[dr[2]],Ht[dr[1]]),$r=[0,0,0,0];return i.b1($r,i.b2([],Xr,Or)),$r[3]=-i.b3($r,Ht[dr[0]]),$r})(st,ht),$t=(function(Ht,dr){let Xr=i.b7(Ht),Or=i.b8([],Ht,1/Xr),$r=i.b0([],dr,i.aZ([],Or,i.b3(dr,Or))),Er=i.b7($r);if(Er>0){let Tr=Math.sqrt(1-Or[3]*Or[3]),Rr=i.aZ([],Or,-Or[3]),Lr=i.a_([],Rr,i.aZ([],$r,Tr/Er));return i.b9(dr,Lr)}return null})(Pe,Pt);if($t!==null){let Ht=$t/i.b3(St[0],Pt);Et=Math.min(Et,Ht)}for(let Ht=0;Ht<4;Ht++){let dr=Math.min(Et,Bt[Ht]);st[Ht+xt]=[st[Ht+at][0]+St[Ht][0]*dr,st[Ht+at][1]+St[Ht][1]*dr,st[Ht+at][2]+St[Ht][2]*dr,1]}})(Ae,se[0],H,$);let Fe=se.map((st=>{let ht=i.b0([],Ae[st[0]],Ae[st[1]]),Pe=i.b0([],Ae[st[2]],Ae[st[1]]),Xe=i.b1([],i.b2([],ht,Pe)),at=-i.b3(Xe,Ae[st[1]]);return Xe.concat(at)})),Ie=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],Ye=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let st of Ae)for(let ht=0;ht<3;ht++)Ie[ht]=Math.min(Ie[ht],st[ht]),Ye[ht]=Math.max(Ye[ht],st[ht]);return new rs(Ae,Fe,new Ms(Ie,Ye))}}class Ls{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(d){this._helper.setMinZoom(d)}setMaxZoom(d){this._helper.setMaxZoom(d)}setMinPitch(d){this._helper.setMinPitch(d)}setMaxPitch(d){this._helper.setMaxPitch(d)}setRenderWorldCopies(d){this._helper.setRenderWorldCopies(d)}setBearing(d){this._helper.setBearing(d)}setPitch(d){this._helper.setPitch(d)}setRoll(d){this._helper.setRoll(d)}setFov(d){this._helper.setFov(d)}setZoom(d){this._helper.setZoom(d)}setCenter(d){this._helper.setCenter(d)}setElevation(d){this._helper.setElevation(d)}setMinElevationForCurrentTile(d){this._helper.setMinElevationForCurrentTile(d)}setPadding(d){this._helper.setPadding(d)}interpolatePadding(d,P,N){this._helper.interpolatePadding(d,P,N)}isPaddingEqual(d){return this._helper.isPaddingEqual(d)}resize(d,P,N=!0){this._helper.resize(d,P,N)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(d){this._helper.setMaxBounds(d)}setConstrainOverride(d){this._helper.setConstrainOverride(d)}overrideNearFarZ(d,P){this._helper.overrideNearFarZ(d,P)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(d){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),d)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(d,P){}constructor(d){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(P,N)=>{N=i.al(+N,this.minZoom,this.maxZoom);let H={center:new i.W(P.lng,P.lat),zoom:N},$=this._helper._lngRange;if(!this._helper._renderWorldCopies&&$===null){let St=179.9999999999;$=[-St,St]}let se=this.tileSize*i.ao(H.zoom),de=0,Ae=se,Fe=0,Ie=se,Ye=0,st=0,{x:ht,y:Pe}=this.size;if(this._helper._latRange){let St=this._helper._latRange;de=i.Y(St[1])*se,Ae=i.Y(St[0])*se,Ae-deAe&&(Et=Ae-St)}if($){let St=(Fe+Ie)/2,Pt=Xe;this._helper._renderWorldCopies&&(Pt=i.X(Xe,St-se/2,St+se/2));let $t=ht/2;Pt-$tIe&&(xt=Ie-$t)}if(xt!==void 0||Et!==void 0){let St=new i.P(xt!=null?xt:Xe,Et!=null?Et:at);H.center=mr(se,St).wrap()}return H},this.applyConstrain=(P,N)=>this._helper.applyConstrain(P,N),this._helper=new As({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(P,N)=>this.defaultConstrain(P,N)},d),this._coveringTilesDetailsProvider=new xu}clone(){let d=new Ls;return d.apply(this,!1),d}apply(d,P,N){this._helper.apply(d,P,N)}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(d){let P=[new i.ba(0,d)];if(this._helper._renderWorldCopies){let N=this.screenPointToMercatorCoordinate(new i.P(0,0)),H=this.screenPointToMercatorCoordinate(new i.P(this._helper._width,0)),$=this.screenPointToMercatorCoordinate(new i.P(this._helper._width,this._helper._height)),se=this.screenPointToMercatorCoordinate(new i.P(0,this._helper._height)),de=Math.floor(Math.min(N.x,H.x,$.x,se.x)),Ae=Math.floor(Math.max(N.x,H.x,$.x,se.x)),Fe=1;for(let Ie=de-Fe;Ie<=Ae+Fe;Ie++)Ie!==0&&P.push(new i.ba(Ie,d))}return P}getCameraFrustum(){return rs.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(d){let P=this.screenPointToLocation(this.centerPoint,d),N=d?d.getElevationForLngLatZoom(P,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(N)}setLocationAtPoint(d,P){let N=i.aq(this.elevation,this.center.lat),H=this.screenPointToMercatorCoordinateAtZ(P,N),$=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,N),se=i.a7.fromLngLat(d),de=new i.a7(se.x-(H.x-$.x),se.y-(H.y-$.y));this.setCenter(de==null?void 0:de.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(d,P){return P?this.coordinatePoint(i.a7.fromLngLat(d),P.getElevationForLngLat(d,this),this._pixelMatrix3D):this.coordinatePoint(i.a7.fromLngLat(d))}screenPointToLocation(d,P){var N;return(N=this.screenPointToMercatorCoordinate(d,P))===null||N===void 0?void 0:N.toLngLat()}screenPointToMercatorCoordinate(d,P){if(P){let N=P.pointCoordinate(d);if(N!=null)return N}return this.screenPointToMercatorCoordinateAtZ(d)}screenPointToMercatorCoordinateAtZ(d,P){let N=P||0,H=[d.x,d.y,0,1],$=[d.x,d.y,1,1];i.aE(H,H,this._pixelMatrixInverse),i.aE($,$,this._pixelMatrixInverse);let se=H[3],de=$[3],Ae=H[1]/se,Fe=$[1]/de,Ie=H[2]/se,Ye=$[2]/de,st=Ie===Ye?0:(N-Ie)/(Ye-Ie);return new i.a7(i.H.number(H[0]/se,$[0]/de,st)/this.worldSize,i.H.number(Ae,Fe,st)/this.worldSize,N)}coordinatePoint(d,P=0,N=this._pixelMatrix){let H=[d.x*this.worldSize,d.y*this.worldSize,P,1];return i.aE(H,H,N),new i.P(H[0]/H[3],H[1]/H[3])}getBounds(){let d=Math.max(0,this._helper._height/2-or(this));return new ie().extend(this.screenPointToLocation(new i.P(0,d))).extend(this.screenPointToLocation(new i.P(this._helper._width,d))).extend(this.screenPointToLocation(new i.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new i.P(0,this._helper._height)))}isPointOnMapSurface(d,P){return P?P.pointCoordinate(d)!=null:d.y>this.height/2-or(this)}calculatePosMatrix(d,P=!1,N){var H;let $=(H=d.key)!==null&&H!==void 0?H:i.bb(d.wrap,d.canonical.z,d.canonical.z,d.canonical.x,d.canonical.y),se=P?this._alignedPosMatrixCache:this._posMatrixCache;if(se.has($)){let Fe=se.get($);return N?Fe.f32:Fe.f64}let de=fr(d,this.worldSize);i.U(de,P?this._alignedProjMatrix:this._viewProjMatrix,de);let Ae={f64:de,f32:new Float32Array(de)};return se.set($,Ae),N?Ae.f32:Ae.f64}calculateFogMatrix(d){let P=d.key,N=this._fogMatrixCacheF32;if(N.has(P))return N.get(P);let H=fr(d,this.worldSize);return i.U(H,this._fogMatrix,H),N.set(P,new Float32Array(H)),N.get(P)}calculateCenterFromCameraLngLatAlt(d,P,N,H){return this._helper.calculateCenterFromCameraLngLatAlt(d,P,N,H)}_calculateNearFarZIfNeeded(d,P,N){if(!this._helper.autoCalculateNearFarZ)return;let H=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),$=d-H*this._helper._pixelPerMeter/Math.cos(P),se=H<0?$:d,de=Math.PI/2+this.pitchInRadians,Ae=i.an(this.fov)*(Math.abs(Math.cos(i.an(this.roll)))*this.height+Math.abs(Math.sin(i.an(this.roll)))*this.width)/this.height*(.5+N.y/this.height),Fe=Math.sin(Ae)*se/Math.sin(i.al(Math.PI-de-Ae,.01,Math.PI-.01)),Ie=or(this),Ye=Math.atan(Ie/this._helper.cameraToCenterDistance),st=i.an(.75),ht=Ye>st?2*Ye*(.5+N.y/(2*Ie)):st,Pe=Math.sin(ht)*se/Math.sin(i.al(Math.PI-de-ht,.01,Math.PI-.01)),Xe=Math.min(Fe,Pe);this._helper._farZ=1.01*(Math.cos(Math.PI/2-P)*Xe+se),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let d=this.centerOffset,P=jt(this.worldSize,this.center),N=P.x,H=P.y;this._helper._pixelPerMeter=i.aq(1,this.center.lat)*this.worldSize;let $=i.an(Math.min(this.pitch,Yt)),se=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos($)),de;var Ae,Fe;this._calculateNearFarZIfNeeded(se,$,d),de=new Float64Array(16),i.bc(de,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(Ae=this._invProjMatrix)[0]=1/(Fe=de)[0],Ae[1]=0,Ae[2]=0,Ae[3]=0,Ae[4]=0,Ae[5]=1/Fe[5],Ae[6]=0,Ae[7]=0,Ae[8]=0,Ae[9]=0,Ae[10]=0,Ae[11]=1/Fe[14],Ae[12]=0,Ae[13]=0,Ae[14]=-1,Ae[15]=Fe[10]/Fe[14],de[8]=2*-d.x/this._helper._width,de[9]=2*d.y/this._helper._height,this._projectionMatrix=i.bd(de),i.S(de,de,[1,-1,1]),i.Q(de,de,[0,0,-this._helper.cameraToCenterDistance]),i.be(de,de,-this.rollInRadians),i.bf(de,de,this.pitchInRadians),i.be(de,de,-this.bearingInRadians),i.Q(de,de,[-N,-H,0]),this._mercatorMatrix=i.S([],de,[this.worldSize,this.worldSize,this.worldSize]),i.S(de,de,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=i.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,de),i.Q(de,de,[0,0,-this.elevation]),this._viewProjMatrix=de,this._invViewProjMatrix=i.bg([],de);let Ie=[0,0,-1,1];i.aE(Ie,Ie,this._invViewProjMatrix),this._cameraPosition=[Ie[0]/Ie[3],Ie[1]/Ie[3],Ie[2]/Ie[3]],this._fogMatrix=new Float64Array(16),i.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,se,this._helper._farZ),this._fogMatrix[8]=2*-d.x/this.width,this._fogMatrix[9]=2*d.y/this.height,i.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),i.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),i.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),i.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),i.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),i.Q(this._fogMatrix,this._fogMatrix,[-N,-H,0]),i.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),i.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=i.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,de);let Ye=this._helper._width%2/2,st=this._helper._height%2/2,ht=Math.cos(this.bearingInRadians),Pe=Math.sin(-this.bearingInRadians),Xe=N-Math.round(N)+ht*Ye+Pe*st,at=H-Math.round(H)+ht*st+Pe*Ye,xt=new Float64Array(de);if(i.Q(xt,xt,[Xe>.5?Xe-1:Xe,at>.5?at-1:at,0]),this._alignedProjMatrix=xt,de=i.bg(new Float64Array(16),this._pixelMatrix),!de)throw new Error("failed to invert matrix");this._pixelMatrixInverse=de,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let d=this.screenPointToMercatorCoordinate(new i.P(0,0)),P=[d.x*this.worldSize,d.y*this.worldSize,0,1];return i.aE(P,P,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let d=i.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/d).toLngLat()}lngLatToCameraDepth(d,P){let N=i.a7.fromLngLat(d),H=[N.x*this.worldSize,N.y*this.worldSize,P,1];return i.aE(H,H,this._viewProjMatrix),H[2]/H[3]}getProjectionData(d){let{overscaledTileID:P,aligned:N,applyTerrainMatrix:H}=d,$=this._helper.getMercatorTileCoordinates(P),se=P?this.calculatePosMatrix(P,N,!0):null,de;return de=P!=null&&P.terrainRttPosMatrix32f&&H?P.terrainRttPosMatrix32f:se||i.bh(),{mainMatrix:de,tileMercatorCoords:$,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:de}}isLocationOccluded(d){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(d,P,N){return 1}transformLightDirection(d){return i.a$(d)}getRayDirectionFromPixel(d){throw new Error("Not implemented.")}projectTileCoordinates(d,P,N,H){let $=this.calculatePosMatrix(N),se;H?(se=[d,P,H(d,P),1],i.aE(se,se,$)):(se=[d,P,0,1],ao(se,se,$));let de=se[3];return{point:new i.P(se[0]/de,se[1]/de),signedDistanceFromCamera:de,isOccluded:!1}}populateCache(d){for(let P of d)this.calculatePosMatrix(P)}getMatrixForModel(d,P){let N=i.a7.fromLngLat(d,P),H=N.meterInMercatorCoordinateUnits(),$=i.bi();return i.Q($,$,[N.x,N.y,N.z]),i.be($,$,Math.PI),i.bf($,$,Math.PI/2),i.S($,$,[-H,H,H]),$}getProjectionDataForCustomLayer(d=!0){let P=new i.a3(0,0,0,0,0),N=this.getProjectionData({overscaledTileID:P,applyGlobeMatrix:d}),H=fr(P,this.worldSize);i.U(H,this._viewProjMatrix,H),N.tileMercatorCoords=[0,0,1,1];let $=[i.a6,i.a6,this.worldSize/this._helper.pixelsPerMeter],se=i.bj();return i.S(se,H,$),N.fallbackMatrix=se,N.mainMatrix=se,N}getFastPathSimpleProjectionMatrix(d){return this.calculatePosMatrix(d)}}function $s(){i.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function Kc(Y){if(Y.useSlerp)if(Y.k<1){let d=i.bk(Y.startEulerAngles.roll,Y.startEulerAngles.pitch,Y.startEulerAngles.bearing),P=i.bk(Y.endEulerAngles.roll,Y.endEulerAngles.pitch,Y.endEulerAngles.bearing),N=new Float64Array(4);i.bl(N,d,P,Y.k);let H=i.bm(N);Y.tr.setRoll(H.roll),Y.tr.setPitch(H.pitch),Y.tr.setBearing(H.bearing)}else Y.tr.setRoll(Y.endEulerAngles.roll),Y.tr.setPitch(Y.endEulerAngles.pitch),Y.tr.setBearing(Y.endEulerAngles.bearing);else Y.tr.setRoll(i.H.number(Y.startEulerAngles.roll,Y.endEulerAngles.roll,Y.k)),Y.tr.setPitch(i.H.number(Y.startEulerAngles.pitch,Y.endEulerAngles.pitch,Y.k)),Y.tr.setBearing(i.H.number(Y.startEulerAngles.bearing,Y.endEulerAngles.bearing,Y.k))}function _u(Y,d,P,N,H){let $=H.padding,se=jt(H.worldSize,P.getNorthWest()),de=jt(H.worldSize,P.getNorthEast()),Ae=jt(H.worldSize,P.getSouthEast()),Fe=jt(H.worldSize,P.getSouthWest()),Ie=i.an(-N),Ye=se.rotate(Ie),st=de.rotate(Ie),ht=Ae.rotate(Ie),Pe=Fe.rotate(Ie),Xe=new i.P(Math.max(Ye.x,st.x,Pe.x,ht.x),Math.max(Ye.y,st.y,Pe.y,ht.y)),at=new i.P(Math.min(Ye.x,st.x,Pe.x,ht.x),Math.min(Ye.y,st.y,Pe.y,ht.y)),xt=Xe.sub(at),Et=(H.width-($.left+$.right+d.left+d.right))/xt.x,Bt=(H.height-($.top+$.bottom+d.top+d.bottom))/xt.y;if(Bt<0||Et<0)return void $s();let St=Math.min(i.ar(H.scale*Math.min(Et,Bt)),Y.maxZoom),Pt=i.P.convert(Y.offset),$t=new i.P((d.left-d.right)/2,(d.top-d.bottom)/2).rotate(i.an(N)),Ht=Pt.add($t).mult(H.scale/i.ao(St));return{center:mr(H.worldSize,se.add(Ae).div(2).sub(Ht)),zoom:St,bearing:N}}class Gu{get useGlobeControls(){return!1}handlePanInertia(d,P){let N=d.mag(),H=Math.abs(or(P));return{easingOffset:d.mult(Math.min(.75*H/N,1)),easingCenter:P.center}}handleMapControlsRollPitchBearingZoom(d,P){d.bearingDelta&&P.setBearing(P.bearing+d.bearingDelta),d.pitchDelta&&P.setPitch(P.pitch+d.pitchDelta),d.rollDelta&&P.setRoll(P.roll+d.rollDelta),d.zoomDelta&&P.setZoom(P.zoom+d.zoomDelta)}handleMapControlsPan(d,P,N){d.around.distSqr(P.centerPoint)<.01||P.setLocationAtPoint(N,d.around)}cameraForBoxAndBearing(d,P,N,H,$){return _u(d,P,N,H,$)}handleJumpToCenterZoom(d,P){d.zoom!==(P.zoom!==void 0?+P.zoom:d.zoom)&&d.setZoom(+P.zoom),P.center!==void 0&&d.setCenter(i.W.convert(P.center))}handleEaseTo(d,P){let N=d.zoom,H=d.padding,$={roll:d.roll,pitch:d.pitch,bearing:d.bearing},se={roll:P.roll===void 0?d.roll:P.roll,pitch:P.pitch===void 0?d.pitch:P.pitch,bearing:P.bearing===void 0?d.bearing:P.bearing},de=P.zoom!==void 0,Ae=!d.isPaddingEqual(P.padding),Fe=!1,Ie=de?+P.zoom:d.zoom,Ye=d.centerPoint.add(P.offsetAsPoint),st=d.screenPointToLocation(Ye),{center:ht,zoom:Pe}=d.applyConstrain(i.W.convert(P.center||st),Ie!=null?Ie:N);pa(d,ht);let Xe=jt(d.worldSize,st),at=jt(d.worldSize,ht).sub(Xe),xt=i.ao(Pe-N);return Fe=Pe!==N,{easeFunc:Et=>{if(Fe&&d.setZoom(i.H.number(N,Pe,Et)),i.bn($,se)||Kc({startEulerAngles:$,endEulerAngles:se,tr:d,k:Et,useSlerp:$.roll!=se.roll}),Ae&&(d.interpolatePadding(H,P.padding,Et),Ye=d.centerPoint.add(P.offsetAsPoint)),P.around)d.setLocationAtPoint(P.around,P.aroundPoint);else{let Bt=i.ao(d.zoom-N),St=Pe>N?Math.min(2,xt):Math.max(.5,xt),Pt=Math.pow(St,1-Et),$t=mr(d.worldSize,Xe.add(at.mult(Et*Pt)).mult(Bt));d.setLocationAtPoint(d.renderWorldCopies?$t.wrap():$t,Ye)}},isZooming:Fe,elevationCenter:ht}}handleFlyTo(d,P){let N=P.zoom!==void 0,H=d.zoom,$=d.applyConstrain(i.W.convert(P.center||P.locationAtOffset),N?+P.zoom:H),se=$.center,de=$.zoom;pa(d,se);let Ae=jt(d.worldSize,P.locationAtOffset),Fe=jt(d.worldSize,se).sub(Ae),Ie=Fe.mag(),Ye=i.ao(de-H),st;if(P.minZoom!==void 0){let ht=Math.min(+P.minZoom,H,de),Pe=d.applyConstrain(se,ht).zoom;st=i.ao(Pe-H)}return{easeFunc:(ht,Pe,Xe,at)=>{d.setZoom(ht===1?de:H+i.ar(Pe));let xt=ht===1?se:mr(d.worldSize,Ae.add(Fe.mult(Xe)).mult(Pe));d.setLocationAtPoint(d.renderWorldCopies?xt.wrap():xt,at)},scaleOfZoom:Ye,targetCenter:se,scaleOfMinZoom:st,pixelPathLength:Ie}}}class Ja{constructor(d,P,N){this.blendFunction=d,this.blendColor=P,this.mask=N}}Ja.Replace=[1,0],Ja.disabled=new Ja(Ja.Replace,i.bo.transparent,[!1,!1,!1,!1]),Ja.unblended=new Ja(Ja.Replace,i.bo.transparent,[!0,!0,!0,!0]),Ja.alphaBlended=new Ja([1,771],i.bo.transparent,[!0,!0,!0,!0]);let ps=2305;class Sa{constructor(d,P,N){this.enable=d,this.mode=P,this.frontFace=N}}Sa.disabled=new Sa(!1,1029,ps),Sa.backCCW=new Sa(!0,1029,ps),Sa.frontCCW=new Sa(!0,1028,ps);class ma{constructor(d,P,N){this.func=d,this.mask=P,this.range=N}}ma.ReadOnly=!1,ma.ReadWrite=!0,ma.disabled=new ma(519,ma.ReadOnly,[0,1]);let Ps=7680;class Ca{constructor(d,P,N,H,$,se){this.test=d,this.ref=P,this.mask=N,this.fail=H,this.depthFail=$,this.pass=se}}function Pl(Y){return typeof WebGL2RenderingContext!="undefined"&&Y instanceof WebGL2RenderingContext}Ca.disabled=new Ca({func:519,mask:0},0,0,Ps,Ps,Ps);class ll{get awaitingQuery(){return!!this._readbackQueue}constructor(d){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=d;let P=d.context,N=P.gl;this._texFormat=N.RGBA,this._texType=N.UNSIGNED_BYTE;let H=new i.aU;H.emplaceBack(-1,-1),H.emplaceBack(2,-1),H.emplaceBack(-1,2);let $=new i.aW;$.emplaceBack(0,1,2),this._fullscreenTriangle=new ka(P.createVertexBuffer(H,vs.members),P.createIndexBuffer($),i.aV.simpleSegment(0,0,H.length,$.length)),this._resultBuffer=new Uint8Array(4),P.activeTexture.set(N.TEXTURE1);let se=N.createTexture();N.bindTexture(N.TEXTURE_2D,se),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_S,N.CLAMP_TO_EDGE),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_T,N.CLAMP_TO_EDGE),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MIN_FILTER,N.NEAREST),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MAG_FILTER,N.NEAREST),N.texImage2D(N.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=P.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(se),Pl(N)&&(this._pbo=N.createBuffer(),N.bindBuffer(N.PIXEL_PACK_BUFFER,this._pbo),N.bufferData(N.PIXEL_PACK_BUFFER,4,N.STREAM_READ),N.bindBuffer(N.PIXEL_PACK_BUFFER,null))}destroy(){let d=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),d.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(d,P){let N=this._updateCount;return this._readbackQueue?N>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():N>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(d,P),this._updateCount++,this._measuredError}_bindFramebuffer(){let d=this._cachedRenderContext.context,P=d.gl;d.activeTexture.set(P.TEXTURE1),P.bindTexture(P.TEXTURE_2D,this._fbo.colorAttachment.get()),d.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(d,P){let N=this._cachedRenderContext.context,H=N.gl;if(this._bindFramebuffer(),N.viewport.set([0,0,this._texWidth,this._texHeight]),N.clear({color:i.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(N,H.TRIANGLES,ma.disabled,Ca.disabled,Ja.unblended,Sa.disabled,(($,se)=>({u_input:$,u_output_expected:se}))(d,P),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Pl(H)){H.bindBuffer(H.PIXEL_PACK_BUFFER,this._pbo),H.readBuffer(H.COLOR_ATTACHMENT0),H.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),H.bindBuffer(H.PIXEL_PACK_BUFFER,null);let $=H.fenceSync(H.SYNC_GPU_COMMANDS_COMPLETE,0);H.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:$}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let d=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Pl(d)){let P=d.clientWaitSync(this._readbackQueue.sync,0,0);if(P===d.WAIT_FAILED)return i.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(P===d.TIMEOUT_EXPIRED)return;d.bindBuffer(d.PIXEL_PACK_BUFFER,this._pbo),d.getBufferSubData(d.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),d.bindBuffer(d.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),d.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=ll._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(d){let P=0;return P+=d[0]/256,P+=d[1]/65536,P+=d[2]/16777216,d[3]<127&&(P=-P),P/128}}let Jc=i.a6/128;function lu(Y,d){let P=Y.granularity!==void 0?Math.max(Y.granularity,1):1,N=P+(Y.generateBorders?2:0),H=P+(Y.extendToNorthPole||Y.generateBorders?1:0)+(Y.extendToSouthPole||Y.generateBorders?1:0),$=N+1,se=H+1,de=Y.generateBorders?-1:0,Ae=Y.generateBorders||Y.extendToNorthPole?-1:0,Fe=P+(Y.generateBorders?1:0),Ie=P+(Y.generateBorders||Y.extendToSouthPole?1:0),Ye=$*se,st=N*H*6,ht=$*se>65536;if(ht&&d==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let Pe=ht||d==="32bit",Xe=new Int16Array(2*Ye),at=0;for(let Bt=Ae;Bt<=Ie;Bt++)for(let St=de;St<=Fe;St++){let Pt=St/P*i.a6;St===-1&&(Pt=-Jc),St===P+1&&(Pt=i.a6+Jc);let $t=Bt/P*i.a6;Bt===-1&&($t=Y.extendToNorthPole?i.bq:-Jc),Bt===P+1&&($t=Y.extendToSouthPole?i.br:i.a6+Jc),Xe[at++]=Pt,Xe[at++]=$t}let xt=Pe?new Uint32Array(st):new Uint16Array(st),Et=0;for(let Bt=0;Bt0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(d){this._mercatorProjection.updateGPUdependent(d),this._verticalPerspectiveProjection.updateGPUdependent(d)}getMeshFromTileID(d,P,N,H,$){return this.currentProjection.getMeshFromTileID(d,P,N,H,$)}setProjection(d){this._transitionable.setValue("type",(d==null?void 0:d.type)||"mercator")}updateTransitions(d){this._transitioning=this._transitionable.transitioned(d,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(d){this.properties=this._transitioning.possiblyEvaluate(d)}setErrorQueryLatitudeDegrees(d){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(d),this._mercatorProjection.setErrorQueryLatitudeDegrees(d)}}function kc(Y){let d=Ks(Y.worldSize,Y.center.lat);return 2*Math.PI*d}function Uo(Y,d,P,N,H){let $=1/(1<1e-6){let N=Y[0]/P,H=Math.acos(Y[2]/P),$=(N>0?H:-H)/Math.PI*180;return new i.W(i.X($,-180,180),d)}return new i.W(0,d)}function ju(Y){return Math.cos(Y*Math.PI/180)}function gs(Y,d){let P=ju(Y),N=ju(d);return i.ar(N/P)}function bu(Y,d){let P=Y.rotate(d.bearingInRadians),N=d.zoom+gs(d.center.lat,0),H=i.bt(1/ju(d.center.lat),1/ju(Math.min(Math.abs(d.center.lat),60)),i.bw(N,7,3,0,1)),$=360/kc({worldSize:d.worldSize,center:{lat:d.center.lat}});return new i.W(d.center.lng-P.x*$*H,i.al(d.center.lat+P.y*$,-i.am,i.am))}function kf(Y){let d=.5*Y,P=Math.sin(d),N=Math.cos(d);return Math.log(P+N)-Math.log(N-P)}function ah(Y,d,P,N){let H=Y.lat+P*N;if(Math.abs(P)>1){let $=(Math.sign(Y.lat+P)!==Math.sign(Y.lat)?-Math.abs(Y.lat):Math.abs(Y.lat))*Math.PI/180,se=Math.abs(Y.lat+P)*Math.PI/180,de=kf($+N*(se-$)),Ae=kf($),Fe=kf(se);return new i.W(Y.lng+d*((de-Ae)/(Fe-Ae)),H)}return new i.W(Y.lng+d*N,H)}class Od{constructor(d){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=d}swapBuffers(){if(!this._hadAnyChanges)return;let d=this._cachePrevious;this._cachePrevious=this._cache,this._cache=d,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(d,P,N,H){let $=`${d.z}_${d.x}_${d.y}_${H!=null&&H.terrain?"t":""}`,se=this._cache.get($);if(se)return se;let de=this._cachePrevious.get($);if(de)return this._cache.set($,de),de;let Ae=this._boundingVolumeFactory(d,P,N,H);return this._cache.set($,Ae),this._hadAnyChanges=!0,Ae}}class Qc{constructor(d,P,N,H){this.min=N,this.max=H,this.points=d,this.planes=P}static fromAabb(d,P){let N=[];for(let H=0;H<8;H++)N.push([1&~H?d[0]:P[0],(H>>1&1)==1?P[1]:d[1],(H>>2&1)==1?P[2]:d[2]]);return new Qc(N,[[-1,0,0,P[0]],[1,0,0,-d[0]],[0,-1,0,P[1]],[0,1,0,-d[1]],[0,0,-1,P[2]],[0,0,1,-d[2]]],d,P)}static fromCenterSizeAngles(d,P,N){let H=i.bA([],N[0],N[1],N[2]),$=i.bB([],[P[0],0,0],H),se=i.bB([],[0,P[1],0],H),de=i.bB([],[0,0,P[2]],H),Ae=[...d],Fe=[...d];for(let Ye=0;Ye<8;Ye++)for(let st=0;st<3;st++){let ht=d[st]+$[st]*(1&~Ye?-1:1)+se[st]*((Ye>>1&1)==1?1:-1)+de[st]*((Ye>>2&1)==1?1:-1);Ae[st]=Math.min(Ae[st],ht),Fe[st]=Math.max(Fe[st],ht)}let Ie=[];for(let Ye=0;Ye<8;Ye++){let st=[...d];i.a_(st,st,i.aZ([],$,1&~Ye?-1:1)),i.a_(st,st,i.aZ([],se,(Ye>>1&1)==1?1:-1)),i.a_(st,st,i.aZ([],de,(Ye>>2&1)==1?1:-1)),Ie.push(st)}return new Qc(Ie,[[...$,-i.b3($,Ie[0])],[...se,-i.b3(se,Ie[0])],[...de,-i.b3(de,Ie[0])],[-$[0],-$[1],-$[2],-i.b3($,Ie[7])],[-se[0],-se[1],-se[2],-i.b3(se,Ie[7])],[-de[0],-de[1],-de[2],-i.b3(de,Ie[7])]],Ae,Fe)}intersectsFrustum(d){let P=!0,N=this.points.length,H=this.planes.length,$=d.planes.length,se=d.points.length;for(let de=0;de<$;de++){let Ae=d.planes[de],Fe=0;for(let Ie=0;Ie=0&&Fe++}if(Fe===0)return 0;Fe=0&&Fe++}if(Fe===0)return 0}return 1}intersectsPlane(d){let P=this.points.length,N=0;for(let H=0;H=0&&N++}return N===P?2:N===0?0:1}}function uu(Y,d,P){let N=Y-d;return N<0?-N:Math.max(0,N-P)}function oh(Y,d,P,N,H){let $=Y-P,se;return se=$<0?Math.min(-$,1+$-H):$>H?Math.min(Math.max($-H,0),1-$):0,Math.max(se,uu(d,N,H))}class hc{constructor(){this._boundingVolumeCache=new Od(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(d,P,N,H){let $=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(d,P,N,H){return this._boundingVolumeCache.getTileBoundingVolume(d,P,N,H)}_computeTileBoundingVolume(d,P,N,H){var $,se;let de=0,Ae=0;if(H!=null&&H.terrain){let Fe=new i.a3(d.z,P,d.z,d.x,d.y),Ie=H.terrain.getMinMaxElevation(Fe);de=($=Ie.minElevation)!==null&&$!==void 0?$:Math.min(0,N),Ae=(se=Ie.maxElevation)!==null&&se!==void 0?se:Math.max(0,N)}if(de/=i.bD,Ae/=i.bD,de+=1,Ae+=1,d.z<=0)return Qc.fromAabb([-Ae,-Ae,-Ae],[Ae,Ae,Ae]);if(d.z===1)return Qc.fromAabb([d.x===0?-Ae:0,d.y===0?0:-Ae,-Ae],[d.x===0?0:Ae,d.y===0?Ae:0,Ae]);{let Fe=[Uo(0,0,d.x,d.y,d.z),Uo(i.a6,0,d.x,d.y,d.z),Uo(i.a6,i.a6,d.x,d.y,d.z),Uo(0,i.a6,d.x,d.y,d.z)],Ie=[];for(let $r of Fe)Ie.push(i.aZ([],$r,Ae));if(Ae!==de)for(let $r of Fe)Ie.push(i.aZ([],$r,de));d.y===0&&Ie.push([0,1,0]),d.y===(1<=(1<{let H=i.al(P.lat,-i.am,i.am),$=i.al(+N,this.minZoom+gs(0,H),this.maxZoom);return{center:new i.W(P.lng,H),zoom:$}},this.applyConstrain=(P,N)=>this._helper.applyConstrain(P,N),this._helper=new As({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(P,N)=>this.defaultConstrain(P,N)},d),this._coveringTilesDetailsProvider=new hc}clone(){let d=new Zo;return d.apply(this,!1),d}apply(d,P,N){this._globeLatitudeErrorCorrectionRadians=N||0,this._helper.apply(d,P)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let d=i.bz();return d[0]=this._cameraPosition[0],d[1]=this._cameraPosition[1],d[2]=this._cameraPosition[2],d}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(d){let{overscaledTileID:P,applyGlobeMatrix:N}=d,H=this._helper.getMercatorTileCoordinates(P);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:H,clippingPlane:this._cachedClippingPlane,projectionTransition:N?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(d){let P=this.pitchInRadians,N=this.cameraToCenterDistance/d,H=Math.sin(P)*N,$=Math.cos(P)*N+1,se=1/Math.sqrt(H*H+$*$)*1,de=-H,Ae=$,Fe=Math.sqrt(de*de+Ae*Ae);de/=Fe,Ae/=Fe;let Ie=[0,de,Ae];i.bF(Ie,Ie,[0,0,0],-this.bearingInRadians),i.bG(Ie,Ie,[0,0,0],-1*this.center.lat*Math.PI/180),i.bH(Ie,Ie,[0,0,0],this.center.lng*Math.PI/180);let Ye=1/i.b5(Ie);return i.aZ(Ie,Ie,Ye),[...Ie,-se*Ye]}isLocationOccluded(d){return!this.isSurfacePointVisible(ns(d))}transformLightDirection(d){let P=this._helper._center.lng*Math.PI/180,N=this._helper._center.lat*Math.PI/180,H=Math.cos(N),$=[Math.sin(P)*H,Math.sin(N),Math.cos(P)*H],se=[$[2],0,-$[0]],de=[0,0,0];i.b2(de,se,$),i.b1(se,se),i.b1(de,de);let Ae=[0,0,0];return i.b1(Ae,[se[0]*d[0]+de[0]*d[1]+$[0]*d[2],se[1]*d[0]+de[1]*d[1]+$[1]*d[2],se[2]*d[0]+de[2]*d[1]+$[2]*d[2]]),Ae}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(d,P,N){let H=(function(de,Ae,Fe){let Ie=1/(1<$&&($=st),htde&&(de=ht)}let Ie=[Fe.lng+se,Fe.lat+Ae,Fe.lng+$,Fe.lat+de];return this.isSurfacePointOnScreen([0,1,0])&&(Ie[3]=90,Ie[0]=-180,Ie[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(Ie[1]=-90,Ie[0]=-180,Ie[2]=180),new ie(Ie)}calculateCenterFromCameraLngLatAlt(d,P,N,H){return this._helper.calculateCenterFromCameraLngLatAlt(d,P,N,H)}setLocationAtPoint(d,P){let N=ns(this.unprojectScreenPoint(P)),H=ns(d),$=i.bz();i.bK($);let se=i.bz();i.bH(se,N,$,-this.center.lng*Math.PI/180),i.bG(se,se,$,this.center.lat*Math.PI/180);let de=H[0]*H[0]+H[2]*H[2],Ae=se[0]*se[0];if(de=-xt&&Pe<=xt,Bt=at>=-xt&&at<=xt,St,Pt;if(Et&&Bt){let Xr=this.center.lng*Math.PI/180,Or=this.center.lat*Math.PI/180;i.bM(Ye,Xr)+i.bM(Pe,Or)=0}isSurfacePointOnScreen(d){if(!this.isSurfacePointVisible(d))return!1;let P=i.bE();return i.aE(P,[...d,1],this._globeViewProjMatrixNoCorrection),P[0]/=P[3],P[1]/=P[3],P[2]/=P[3],P[0]>-1&&P[0]<1&&P[1]>-1&&P[1]<1&&P[2]>-1&&P[2]<1}rayPlanetIntersection(d,P){let N=i.b3(d,P),H=i.bz(),$=i.bz();i.aZ($,P,N),i.b0(H,d,$);let se=1-i.b3(H,H);if(se<0)return null;let de=i.b3(d,d)-1,Ae=-N+(N<0?1:-1)*Math.sqrt(se),Fe=de/Ae,Ie=Ae;return{tMin:Math.min(Fe,Ie),tMax:Math.max(Fe,Ie)}}unprojectScreenPoint(d){let P=this._cameraPosition,N=this.getRayDirectionFromPixel(d),H=this.rayPlanetIntersection(P,N);if(H){let Ie=i.bz();i.a_(Ie,P,[N[0]*H.tMin,N[1]*H.tMin,N[2]*H.tMin]);let Ye=i.bz();return i.b1(Ye,Ie),Ef(Ye)}let $=this._cachedClippingPlane,se=$[0]*N[0]+$[1]*N[1]+$[2]*N[2],de=-i.b9($,P)/se,Ae=i.bz();if(de>0)i.a_(Ae,P,[N[0]*de,N[1]*de,N[2]*de]);else{let Ie=i.bz();i.a_(Ie,P,[2*N[0],2*N[1],2*N[2]]);let Ye=i.b9(this._cachedClippingPlane,Ie);i.b0(Ae,Ie,[this._cachedClippingPlane[0]*Ye,this._cachedClippingPlane[1]*Ye,this._cachedClippingPlane[2]*Ye])}let Fe=(function(Ie){let Ye=i.bz();return Ye[0]=Ie[0]*-Ie[3],Ye[1]=Ie[1]*-Ie[3],Ye[2]=Ie[2]*-Ie[3],{center:Ye,radius:Math.sqrt(1-Ie[3]*Ie[3])}})($);return Ef((function(Ie,Ye,st){let ht=i.bz();i.b0(ht,st,Ie);let Pe=i.bz();return i.bx(Pe,Ie,ht,Ye/i.b7(ht)),Pe})(Fe.center,Fe.radius,Ae))}getMatrixForModel(d,P){let N=i.W.convert(d),H=1/i.bD,$=i.bi();return i.bI($,$,N.lng/180*Math.PI),i.bf($,$,-N.lat/180*Math.PI),i.Q($,$,[0,0,1+P/i.bD]),i.bf($,$,.5*Math.PI),i.S($,$,[H,H,H]),$}getProjectionDataForCustomLayer(d=!0){let P=this.getProjectionData({overscaledTileID:new i.a3(0,0,0,0,0),applyGlobeMatrix:d});return P.tileMercatorCoords=[0,0,1,1],P}getFastPathSimpleProjectionMatrix(d){}}class Ro{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(d){this._helper.setMinZoom(d)}setMaxZoom(d){this._helper.setMaxZoom(d)}setMinPitch(d){this._helper.setMinPitch(d)}setMaxPitch(d){this._helper.setMaxPitch(d)}setRenderWorldCopies(d){this._helper.setRenderWorldCopies(d)}setBearing(d){this._helper.setBearing(d)}setPitch(d){this._helper.setPitch(d)}setRoll(d){this._helper.setRoll(d)}setFov(d){this._helper.setFov(d)}setZoom(d){this._helper.setZoom(d)}setCenter(d){this._helper.setCenter(d)}setElevation(d){this._helper.setElevation(d)}setMinElevationForCurrentTile(d){this._helper.setMinElevationForCurrentTile(d)}setPadding(d){this._helper.setPadding(d)}interpolatePadding(d,P,N){this._helper.interpolatePadding(d,P,N)}isPaddingEqual(d){return this._helper.isPaddingEqual(d)}resize(d,P,N=!0){this._helper.resize(d,P,N)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(d){this._helper.setMaxBounds(d)}setConstrainOverride(d){this._helper.setConstrainOverride(d)}overrideNearFarZ(d,P){this._helper.overrideNearFarZ(d,P)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(d){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),d)}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(d,P){this._globeness=d,this._globeLatitudeErrorCorrectionRadians=P,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(d){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(P,N)=>this.currentTransform.defaultConstrain(P,N),this.applyConstrain=(P,N)=>this._helper.applyConstrain(P,N),this._helper=new As({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(P,N)=>this.defaultConstrain(P,N)},d),this._globeness=1,this._mercatorTransform=new Ls,this._verticalPerspectiveTransform=new Zo}clone(){let d=new Ro;return d._globeness=this._globeness,d._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,d.apply(this,!1),d}apply(d,P){this._helper.apply(d,P),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(d){let P=this._mercatorTransform.getProjectionData(d),N=this._verticalPerspectiveTransform.getProjectionData(d);return{mainMatrix:this.isGlobeRendering?N.mainMatrix:P.mainMatrix,clippingPlane:N.clippingPlane,tileMercatorCoords:N.tileMercatorCoords,projectionTransition:d.applyGlobeMatrix?this._globeness:0,fallbackMatrix:P.fallbackMatrix}}isLocationOccluded(d){return this.currentTransform.isLocationOccluded(d)}transformLightDirection(d){return this.currentTransform.transformLightDirection(d)}getPixelScale(){return i.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return i.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(d,P,N){let H=this._mercatorTransform.getPitchedTextCorrection(d,P,N),$=this._verticalPerspectiveTransform.getPitchedTextCorrection(d,P,N);return i.bt(H,$,this._globeness)}projectTileCoordinates(d,P,N,H){return this.currentTransform.projectTileCoordinates(d,P,N,H)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(d){return this.currentTransform.calculateFogMatrix(d)}getVisibleUnwrappedCoordinates(d){return this.currentTransform.getVisibleUnwrappedCoordinates(d)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(d){this._mercatorTransform.recalculateZoomAndCenter(d),this._verticalPerspectiveTransform.recalculateZoomAndCenter(d)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(d,P){return this.currentTransform.lngLatToCameraDepth(d,P)}populateCache(d){this._mercatorTransform.populateCache(d),this._verticalPerspectiveTransform.populateCache(d)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(d,P,N,H){return this._helper.calculateCenterFromCameraLngLatAlt(d,P,N,H)}setLocationAtPoint(d,P){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(d,P),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(d,P),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(d,P){return this.currentTransform.locationToScreenPoint(d,P)}screenPointToMercatorCoordinate(d,P){return this.currentTransform.screenPointToMercatorCoordinate(d,P)}screenPointToLocation(d,P){return this.currentTransform.screenPointToLocation(d,P)}isPointOnMapSurface(d,P){return this.currentTransform.isPointOnMapSurface(d,P)}getRayDirectionFromPixel(d){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(d)}getMatrixForModel(d,P){return this.currentTransform.getMatrixForModel(d,P)}getProjectionDataForCustomLayer(d=!0){let P=this._mercatorTransform.getProjectionDataForCustomLayer(d);if(!this.isGlobeRendering)return P;let N=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(d);return N.fallbackMatrix=P.mainMatrix,N}getFastPathSimpleProjectionMatrix(d){return this.currentTransform.getFastPathSimpleProjectionMatrix(d)}}class is{get useGlobeControls(){return!0}handlePanInertia(d,P){let N=bu(d,P);return Math.abs(N.lng-P.center.lng)>180&&(N.lng=P.center.lng+179.5*Math.sign(N.lng-P.center.lng)),{easingCenter:N,easingOffset:new i.P(0,0)}}handleMapControlsRollPitchBearingZoom(d,P){let N=d.around,H=P.screenPointToLocation(N);d.bearingDelta&&P.setBearing(P.bearing+d.bearingDelta),d.pitchDelta&&P.setPitch(P.pitch+d.pitchDelta),d.rollDelta&&P.setRoll(P.roll+d.rollDelta);let $=P.zoom;d.zoomDelta&&P.setZoom(P.zoom+d.zoomDelta);let se=P.zoom-$;if(se===0)return;let de=i.bJ(P.center.lng,H.lng),Ae=de/(Math.abs(de/180)+1),Fe=i.bJ(P.center.lat,H.lat),Ie=P.getRayDirectionFromPixel(N),Ye=P.cameraPosition,st=-1*i.b3(Ye,Ie),ht=i.bz();i.a_(ht,Ye,[Ie[0]*st,Ie[1]*st,Ie[2]*st]);let Pe=i.b5(ht)-1,Xe=Math.exp(.5*-Math.max(Pe-.3,0)),at=Ks(P.worldSize,P.center.lat)/Math.min(P.width,P.height),xt=i.bw(at,.9,.5,1,.25),Et=(1-i.ao(-se))*Math.min(Xe,xt),Bt=P.center.lat,St=P.zoom,Pt=new i.W(P.center.lng+Ae*Et,i.al(P.center.lat+Fe*Et,-i.am,i.am));P.setLocationAtPoint(H,N);let $t=P.center,Ht=i.bw(Math.abs(de),45,85,0,1),dr=i.bw(at,.75,.35,0,1),Xr=Math.pow(Math.max(Ht,dr),.25),Or=i.bJ($t.lng,Pt.lng),$r=i.bJ($t.lat,Pt.lat);P.setCenter(new i.W($t.lng+Or*Xr,$t.lat+$r*Xr).wrap()),P.setZoom(St+gs(Bt,P.center.lat))}handleMapControlsPan(d,P,N){if(!d.panDelta)return;let H=P.center.lat,$=P.zoom;P.setCenter(bu(d.panDelta,P).wrap()),P.setZoom($+gs(H,P.center.lat))}cameraForBoxAndBearing(d,P,N,H,$){let se=_u(d,P,N,H,$),de=P.left/$.width*2-1,Ae=($.width-P.right)/$.width*2-1,Fe=P.top/$.height*-2+1,Ie=($.height-P.bottom)/$.height*-2+1,Ye=i.bJ(N.getWest(),N.getEast())<0,st=Ye?N.getEast():N.getWest(),ht=Ye?N.getWest():N.getEast(),Pe=Math.max(N.getNorth(),N.getSouth()),Xe=Math.min(N.getNorth(),N.getSouth()),at=st+.5*i.bJ(st,ht),xt=Pe+.5*i.bJ(Pe,Xe),Et=$.clone();Et.setCenter(se.center),Et.setBearing(se.bearing),Et.setPitch(0),Et.setRoll(0),Et.setZoom(se.zoom);let Bt=Et.modelViewProjectionMatrix,St=[ns(N.getNorthWest()),ns(N.getNorthEast()),ns(N.getSouthWest()),ns(N.getSouthEast()),ns(new i.W(ht,xt)),ns(new i.W(st,xt)),ns(new i.W(at,Pe)),ns(new i.W(at,Xe))],Pt=ns(se.center),$t=Number.POSITIVE_INFINITY;for(let Ht of St)de<0&&($t=is.getLesserNonNegativeNonNull($t,is.solveVectorScale(Ht,Pt,Bt,"x",de))),Ae>0&&($t=is.getLesserNonNegativeNonNull($t,is.solveVectorScale(Ht,Pt,Bt,"x",Ae))),Fe>0&&($t=is.getLesserNonNegativeNonNull($t,is.solveVectorScale(Ht,Pt,Bt,"y",Fe))),Ie<0&&($t=is.getLesserNonNegativeNonNull($t,is.solveVectorScale(Ht,Pt,Bt,"y",Ie)));if(Number.isFinite($t)&&$t!==0)return se.zoom=Math.min(Et.zoom+i.ar($t),d.maxZoom),se;$s()}handleJumpToCenterZoom(d,P){let N=d.center.lat,H=d.applyConstrain(P.center?i.W.convert(P.center):d.center,d.zoom).center;d.setCenter(H.wrap());let $=P.zoom!==void 0?+P.zoom:d.zoom+gs(N,H.lat);d.zoom!==$&&d.setZoom($)}handleEaseTo(d,P){let N=d.zoom,H=d.center,$=d.padding,se={roll:d.roll,pitch:d.pitch,bearing:d.bearing},de={roll:P.roll===void 0?d.roll:P.roll,pitch:P.pitch===void 0?d.pitch:P.pitch,bearing:P.bearing===void 0?d.bearing:P.bearing},Ae=P.zoom!==void 0,Fe=!d.isPaddingEqual(P.padding),Ie=!1,Ye=P.center?i.W.convert(P.center):H,st=d.applyConstrain(Ye,N).center;pa(d,st);let ht=d.clone();ht.setCenter(st),ht.setZoom(Ae?+P.zoom:N+gs(H.lat,Ye.lat)),ht.setBearing(P.bearing);let Pe=new i.P(i.al(d.centerPoint.x+P.offsetAsPoint.x,0,d.width),i.al(d.centerPoint.y+P.offsetAsPoint.y,0,d.height));ht.setLocationAtPoint(st,Pe);let Xe=(P.offset&&P.offsetAsPoint.mag())>0?ht.center:st,at=Ae?+P.zoom:N+gs(H.lat,Xe.lat),xt=N+gs(H.lat,0),Et=at+gs(Xe.lat,0),Bt=i.bJ(H.lng,Xe.lng),St=i.bJ(H.lat,Xe.lat),Pt=i.ao(Et-xt);return Ie=at!==N,{easeFunc:$t=>{if(i.bn(se,de)||Kc({startEulerAngles:se,endEulerAngles:de,tr:d,k:$t,useSlerp:se.roll!=de.roll}),Fe&&d.interpolatePadding($,P.padding,$t),P.around)i.w("Easing around a point is not supported under globe projection."),d.setLocationAtPoint(P.around,P.aroundPoint);else{let Ht=Et>xt?Math.min(2,Pt):Math.max(.5,Pt),dr=Math.pow(Ht,1-$t),Xr=ah(H,Bt,St,$t*dr);d.setCenter(Xr.wrap())}if(Ie){let Ht=i.H.number(xt,Et,$t)+gs(0,d.center.lat);d.setZoom(Ht)}},isZooming:Ie,elevationCenter:Xe}}handleFlyTo(d,P){let N=P.zoom!==void 0,H=d.center,$=d.zoom,se=d.padding,de=!d.isPaddingEqual(P.padding),Ae=d.applyConstrain(i.W.convert(P.center||P.locationAtOffset),$).center,Fe=N?+P.zoom:d.zoom+gs(d.center.lat,Ae.lat),Ie=d.clone();Ie.setCenter(Ae),Ie.setZoom(Fe),Ie.setBearing(P.bearing);let Ye=new i.P(i.al(d.centerPoint.x+P.offsetAsPoint.x,0,d.width),i.al(d.centerPoint.y+P.offsetAsPoint.y,0,d.height));Ie.setLocationAtPoint(Ae,Ye);let st=Ie.center;pa(d,st);let ht=(function(St,Pt,$t){let Ht=ns(Pt),dr=ns($t),Xr=i.b3(Ht,dr),Or=Math.acos(Xr),$r=kc(St);return Or/(2*Math.PI)*$r})(d,H,st),Pe=$+gs(H.lat,0),Xe=Fe+gs(st.lat,0),at=i.ao(Xe-Pe),xt;if(typeof P.minZoom=="number"){let St=+P.minZoom+gs(st.lat,0),Pt=Math.min(St,Pe,Xe)+gs(0,st.lat),$t=d.applyConstrain(st,Pt).zoom+gs(st.lat,0);xt=i.ao($t-Pe)}let Et=i.bJ(H.lng,st.lng),Bt=i.bJ(H.lat,st.lat);return{easeFunc:(St,Pt,$t,Ht)=>{let dr=ah(H,Et,Bt,$t);de&&d.interpolatePadding(se,P.padding,St);let Xr=St===1?st:dr;d.setCenter(Xr.wrap());let Or=Pe+i.ar(Pt);d.setZoom(St===1?Fe:Or+gs(0,Xr.lat))},scaleOfZoom:at,targetCenter:st,scaleOfMinZoom:xt,pixelPathLength:ht}}static solveVectorScale(d,P,N,H,$){let se=H==="x"?[N[0],N[4],N[8],N[12]]:[N[1],N[5],N[9],N[13]],de=[N[3],N[7],N[11],N[15]],Ae=d[0]*se[0]+d[1]*se[1]+d[2]*se[2],Fe=d[0]*de[0]+d[1]*de[1]+d[2]*de[2],Ie=P[0]*se[0]+P[1]*se[1]+P[2]*se[2],Ye=P[0]*de[0]+P[1]*de[1]+P[2]*de[2];return Ie+$*Fe===Ae+$*Ye||de[3]*(Ae-Ie)+se[3]*(Ye-Fe)+Ae*Ye==Ie*Fe?null:(Ie+se[3]-$*Ye-$*de[3])/(Ie-Ae-$*Ye+$*Fe)}static getLesserNonNegativeNonNull(d,P){return P!==null&&P>=0&&Pi.C(Y,d==null?void 0:d.filter((P=>P.identifier!=="source.canvas"))),ef=i.bN();class Cc extends i.E{constructor(d,P={}){var N,H;super(),this._rtlPluginLoaded=()=>{for(let se in this.tileManagers){let de=this.tileManagers[se].getSource().type;de!=="vector"&&de!=="geojson"||this.tileManagers[se].reload()}},this.map=d,this.dispatcher=new ye(me(),d._getMapId()),this.dispatcher.registerMessageHandler("GG",((se,de)=>this.getGlyphs(se,de))),this.dispatcher.registerMessageHandler("GI",((se,de)=>this.getImages(se,de))),this.dispatcher.registerMessageHandler("GDA",((se,de)=>this.getDashes(se,de))),this.imageManager=new L,this.imageManager.setEventedParent(this);let $=((N=d._container)===null||N===void 0?void 0:N.lang)||typeof document!="undefined"&&((H=document.documentElement)===null||H===void 0?void 0:H.lang)||void 0;this.glyphManager=new E(d._requestManager,P.localIdeographFontFamily,$),this.lineAtlas=new j(256,512),this.crossTileSymbolIndex=new $a,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",i.bO()),rt().on(Ve,this._rtlPluginLoaded),this.on("data",(se=>{if(se.dataType!=="source"||se.sourceDataType!=="metadata")return;let de=this.tileManagers[se.sourceId];if(!de)return;let Ae=de.getSource();if(Ae!=null&&Ae.vectorLayerIds)for(let Fe in this._layers){let Ie=this._layers[Fe];Ie.source===Ae.id&&this._validateLayer(Ie)}}))}_setInitialValues(){var d;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new i.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new(((d=this.crossTileSymbolIndex)===null||d===void 0?void 0:d.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(d,P){var N,H,$;this._checkLoaded();let se=P===null?($=(H=(N=this.stylesheet.state)===null||N===void 0?void 0:N[d])===null||H===void 0?void 0:H.default)!==null&&$!==void 0?$:null:P;if(i.bQ(se,this._globalState[d]))return this;this._globalState[d]=se,this._applyGlobalStateChanges([d])}getGlobalState(){return this._globalState}setGlobalState(d){this._checkLoaded();let P=[];for(let N in d)!i.bQ(this._globalState[N],d[N].default)&&(P.push(N),this._globalState[N]=d[N].default);this._applyGlobalStateChanges(P)}_applyGlobalStateChanges(d){if(d.length===0)return;let P=new Set,N={};for(let H of d){N[H]=this._globalState[H];for(let $ in this._layers){let se=this._layers[$],de=se.getLayoutAffectingGlobalStateRefs(),Ae=se.getPaintAffectingGlobalStateRefs(),Fe=se.getVisibilityAffectingGlobalStateRefs();if(de.has(H)&&P.add(se.source),Ae.has(H))for(let{name:Ie,value:Ye}of Ae.get(H))this._updatePaintProperty(se,Ie,Ye);Fe!=null&&Fe.has(H)&&(se.recalculateVisibility(),this._updateLayer(se))}}this.dispatcher.broadcast("UGS",N);for(let H in this.tileManagers)P.has(H)&&(this._reloadSource(H),this._changed=!0)}loadURL(d){return i._(this,arguments,void 0,(function*(P,N={},H){this.fire(new i.n("dataloading",{dataType:"style"})),N.validate=typeof N.validate!="boolean"||N.validate,this._loadStyleRequest=new AbortController;let $=this._loadStyleRequest;try{let se=yield this.map._requestManager.transformRequest(P,"Style");i.bR($.signal);let de=yield i.k(se,$);this._loadStyleRequest===$&&(this._loadStyleRequest=null),this._load(de.data,N,H)}catch(se){this._loadStyleRequest===$&&(this._loadStyleRequest=null),se&&!$.signal.aborted&&this.fire(new i.l(i.d(se)))}}))}loadJSON(d,P={},N){this.fire(new i.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,f.frameAsync(this._frameRequest,this.map._ownerWindow).then((()=>{this._frameRequest=null,P.validate=P.validate!==!1,this._load(d,P,N)})).catch((()=>{}))}loadEmpty(){this.fire(new i.n("dataloading",{dataType:"style"})),this._load(ef,{validate:!1})}_load(d,P,N){var H,$;let se=P.transformStyle?P.transformStyle(N,d):d;if(!P.validate||!dc(this,i.F(se))){se=Object.assign({},se),this._loaded=!0,this.stylesheet=se;for(let de in se.sources)this.addSource(de,se.sources[de],{validate:!1});se.sprite?this._loadSprite(se.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(se.glyphs),this._createLayers(),this.light=new B(this.stylesheet.light),this._setProjectionInternal(((H=this.stylesheet.projection)===null||H===void 0?void 0:H.type)||"mercator"),this.sky=new U(this.stylesheet.sky),this.map.setTerrain(($=this.stylesheet.terrain)!==null&&$!==void 0?$:null),this.fire(new i.n("data",{dataType:"style"})),this.fire(new i.n("style.load"))}}_createLayers(){var d,P,N;let H=i.bS(this.stylesheet.layers);this.setGlobalState((d=this.stylesheet.state)!==null&&d!==void 0?d:null),this.dispatcher.broadcast("SL",H),this._order=H.map(($=>$.id)),this._layers={},this._serializedLayers=null;for(let $ of H){let se=i.bT($,this._globalState);if(se.setEventedParent(this,{layer:{id:$.id}}),this._layers[$.id]=se,i.bU(se)&&this.tileManagers[se.source]){let de=(N=(P=$.paint)===null||P===void 0?void 0:P["raster-fade-duration"])!==null&&N!==void 0?N:se.paint.get("raster-fade-duration");this.tileManagers[se.source].setRasterFadeDuration(de)}}}_loadSprite(d,P=!1,N=void 0){this.imageManager.setLoaded(!1);let H=new AbortController,$;this._spriteRequest=H,(function(se,de,Ae,Fe){return i._(this,void 0,void 0,(function*(){let Ie=C(se),Ye=Ae>1?"@2x":"",st={},ht={};for(let{id:Pe,url:Xe}of Ie){let at=yield de.transformRequest(k(Xe,Ye,".json"),"SpriteJSON");st[Pe]=i.k(at,Fe);let xt=yield de.transformRequest(k(Xe,Ye,".png"),"SpriteImage");ht[Pe]=_.getImage(xt,Fe)}return yield Promise.all([...Object.values(st),...Object.values(ht)]),(function(Pe,Xe){return i._(this,void 0,void 0,(function*(){let at={};for(let xt in Pe){at[xt]={};let Et=f.getImageCanvasContext((yield Xe[xt]).data),Bt=(yield Pe[xt]).data;for(let St in Bt){let{width:Pt,height:$t,x:Ht,y:dr,sdf:Xr,pixelRatio:Or,stretchX:$r,stretchY:Er,content:Tr,textFitWidth:Rr,textFitHeight:Lr}=Bt[St];at[xt][St]={data:null,pixelRatio:Or,sdf:Xr,stretchX:$r,stretchY:Er,content:Tr,textFitWidth:Rr,textFitHeight:Lr,spriteData:{width:Pt,height:$t,x:Ht,y:dr,context:Et}}}}return at}))})(st,ht)}))})(d,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then((se=>{if(this._spriteRequest=null,se)for(let de in se){this._spritesImagesIds[de]=[];let Ae=this._spritesImagesIds[de]?this._spritesImagesIds[de].filter((Fe=>!(Fe in se))):[];for(let Fe of Ae)this.imageManager.removeImage(Fe),this._changedImages[Fe]=!0;for(let Fe in se[de]){let Ie=de==="default"?Fe:`${de}:${Fe}`;this._spritesImagesIds[de].push(Ie),Ie in this.imageManager.images?this.imageManager.updateImage(Ie,se[de][Fe],!1):this.imageManager.addImage(Ie,se[de][Fe]),P&&(this._changedImages[Ie]=!0)}}})).catch((se=>{this._spriteRequest=null,$=se,H.signal.aborted||this.fire(new i.l($))})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),P&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.n("data",{dataType:"style"})),N&&N($)}))}_unloadSprite(){for(let d of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(d),this._changedImages[d]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.n("data",{dataType:"style"}))}_validateLayer(d){let P=this.tileManagers[d.source];if(!P)return;let N=d.sourceLayer;if(!N)return;let H=P.getSource();(H.type==="geojson"||H.vectorLayerIds&&!H.vectorLayerIds.includes(N))&&this.fire(new i.l(new Error(`Source layer "${N}" does not exist on source "${H.id}" as specified by style layer "${d.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let d in this.tileManagers)if(!this.tileManagers[d].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(d,P=!1){let N=this._serializedAllLayers();if(!d||d.length===0)return Object.values(P?i.bV(N):N);let H=[];for(let $ of d)if(N[$]){let se=P?i.bV(N[$]):N[$];H.push(se)}return H}_serializedAllLayers(){let d=this._serializedLayers;if(d)return d;d=this._serializedLayers={};let P=Object.keys(this._layers);for(let N of P){let H=this._layers[N];H.type!=="custom"&&(d[N]=H.serialize())}return d}hasTransitions(){var d,P,N;if(!((d=this.light)===null||d===void 0)&&d.hasTransition()||!((P=this.sky)===null||P===void 0)&&P.hasTransition()||!((N=this.projection)===null||N===void 0)&&N.hasTransition())return!0;for(let H in this.tileManagers)if(this.tileManagers[H].hasTransition())return!0;for(let H in this._layers)if(this._layers[H].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(d){if(!this._loaded)return;let P=this._changed;if(P){let H=Object.keys(this._updatedLayers),$=Object.keys(this._removedLayers);(H.length||$.length)&&this._updateWorkerLayers(H,$);for(let se in this._updatedSources){let de=this._updatedSources[se];if(de==="reload")this._reloadSource(se);else{if(de!=="clear")throw new Error(`Invalid action ${de}`);this._clearSource(se)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let se in this._updatedPaintProps)this._layers[se].updateTransitions(d);this.light.updateTransitions(d),this.sky.updateTransitions(d),this._resetUpdates()}let N={};for(let H in this.tileManagers){let $=this.tileManagers[H];N[H]=$.used,$.used=!1}for(let H of this._order){let $=this._layers[H];$.recalculate(d,this._availableImages),!$.isHidden(d.zoom)&&$.source&&(this.tileManagers[$.source].used=!0)}for(let H in N){let $=this.tileManagers[H];!!N[H]!=!!$.used&&$.fire(new i.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:H}))}this.light.recalculate(d),this.sky.recalculate(d),this.projection.recalculate(d),this.z=d.zoom,P&&this.fire(new i.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let d=Object.keys(this._changedImages);if(d.length){for(let P in this.tileManagers)this.tileManagers[P].reloadTilesForDependencies(["icons","patterns"],d);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let d in this.tileManagers)this.tileManagers[d].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(d,P){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(d,!1),removedIds:P})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(d,P={}){var N;this._checkLoaded();let H=this.serialize();if(d=P.transformStyle?P.transformStyle(H,d):d,((N=P.validate)===null||N===void 0||N)&&dc(this,i.F(d)))return!1;(d=i.bV(d)).layers=i.bS(d.layers);let $=i.bW(H,d),se=this._getOperationsToPerform($);if(se.unimplemented.length>0)throw new Error(`Unimplemented: ${se.unimplemented.join(", ")}.`);if(se.operations.length===0)return!1;for(let de of se.operations)de();return this.stylesheet=d,this._serializedLayers=null,this.fire(new i.n("style.load",{style:this})),!0}_getOperationsToPerform(d){let P=[],N=[];for(let H of d)switch(H.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":P.push((()=>this.addLayer.apply(this,H.args)));break;case"removeLayer":P.push((()=>this.removeLayer.apply(this,H.args)));break;case"setPaintProperty":P.push((()=>this.setPaintProperty.apply(this,H.args)));break;case"setLayoutProperty":P.push((()=>this.setLayoutProperty.apply(this,H.args)));break;case"setFilter":P.push((()=>this.setFilter.apply(this,H.args)));break;case"addSource":P.push((()=>this.addSource.apply(this,H.args)));break;case"removeSource":P.push((()=>this.removeSource.apply(this,H.args)));break;case"setLayerZoomRange":P.push((()=>this.setLayerZoomRange.apply(this,H.args)));break;case"setLight":P.push((()=>this.setLight.apply(this,H.args)));break;case"setGeoJSONSourceData":P.push((()=>this.setGeoJSONSourceData.apply(this,H.args)));break;case"setGlyphs":P.push((()=>this.setGlyphs.apply(this,H.args)));break;case"setSprite":P.push((()=>this.setSprite.apply(this,H.args)));break;case"setTerrain":P.push((()=>this.map.setTerrain.apply(this,H.args)));break;case"setSky":P.push((()=>this.setSky.apply(this,H.args)));break;case"setProjection":this.setProjection.apply(this,H.args);break;case"setGlobalState":P.push((()=>this.setGlobalState.apply(this,H.args)));break;case"setTransition":P.push((()=>{}));break;default:N.push(H.command)}return{operations:P,unimplemented:N}}addImage(d,P){if(this.getImage(d))return this.fire(new i.l(new Error(`An image named "${d}" already exists.`)));this.imageManager.addImage(d,P),this._afterImageUpdated(d)}updateImage(d,P){this.imageManager.updateImage(d,P)}getImage(d){return this.imageManager.getImage(d)}removeImage(d){if(!this.getImage(d))return this.fire(new i.l(new Error(`An image named "${d}" does not exist.`)));this.imageManager.removeImage(d),this._afterImageUpdated(d)}_afterImageUpdated(d){this._availableImages=this.imageManager.listImages(),this._changedImages[d]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(d,P,N={}){var H;if(this._checkLoaded(),this.tileManagers[d]!==void 0)throw new Error(`Source "${d}" already exists.`);if(!P.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(P).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(P.type)&&this._validate(i.F.source,`sources.${d}`,P,null,N))return;!((H=this.map)===null||H===void 0)&&H._collectResourceTiming&&(P.collectResourceTiming=!0);let $=this.tileManagers[d]=new Zr(d,P,this.dispatcher);$.style=this,$.setEventedParent(this,(()=>({isSourceLoaded:$.loaded(),source:$.serialize(),sourceId:d}))),$.onAdd(this.map),this._changed=!0}removeSource(d){if(this._checkLoaded(),this.tileManagers[d]===void 0)throw new Error(`There is no source with this ID=${d}`);for(let N in this._layers)if(this._layers[N].source===d)return this.fire(new i.l(new Error(`Source "${d}" cannot be removed while layer "${N}" is using it.`)));let P=this.tileManagers[d];delete this.tileManagers[d],delete this._updatedSources[d],P.fire(new i.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:d})),P.setEventedParent(null),P.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(d,P){if(this._checkLoaded(),this.tileManagers[d]===void 0)throw new Error(`There is no source with this ID=${d}`);let N=this.tileManagers[d].getSource();if(N.type!=="geojson")throw new Error(`geojsonSource.type is ${N.type}, which is !== 'geojson`);N.setData(P),this._changed=!0}getSource(d){var P;return(P=this.tileManagers[d])===null||P===void 0?void 0:P.getSource()}addLayer(d,P,N={}){this._checkLoaded();let H=d.id;if(this.getLayer(H))return void this.fire(new i.l(new Error(`Layer "${H}" already exists on this map.`)));let $;if(d.type==="custom"){if(dc(this,i.bX(d)))return;$=i.bT(d,this._globalState)}else{if("source"in d&&typeof d.source=="object"&&(this.addSource(H,d.source),d=i.bV(d),d=i.e(d,{source:H})),this._validate(i.F.layer,`layers.${H}`,d,{arrayIndex:-1},N))return;$=i.bT(d,this._globalState),this._validateLayer($),$.setEventedParent(this,{layer:{id:H}})}let se=P?this._order.indexOf(P):this._order.length;if(P&&se===-1)this.fire(new i.l(new Error(`Cannot add layer "${H}" before non-existing layer "${P}".`)));else{if(this._order.splice(se,0,H),this._layerOrderChanged=!0,this._layers[H]=$,this._removedLayers[H]&&$.source&&$.type!=="custom"){let de=this._removedLayers[H];delete this._removedLayers[H],de.type!==$.type?this._updatedSources[$.source]="clear":(this._updatedSources[$.source]="reload",this.tileManagers[$.source].pause())}this._updateLayer($),$.onAdd&&$.onAdd(this.map)}}moveLayer(d,P){if(this._checkLoaded(),this._changed=!0,!this._layers[d])return void this.fire(new i.l(new Error(`The layer '${d}' does not exist in the map's style and cannot be moved.`)));if(d===P)return;let N=this._order.indexOf(d);this._order.splice(N,1);let H=P?this._order.indexOf(P):this._order.length;P&&H===-1?this.fire(new i.l(new Error(`Cannot move layer "${d}" before non-existing layer "${P}".`))):(this._order.splice(H,0,d),this._layerOrderChanged=!0)}removeLayer(d){this._checkLoaded();let P=this._layers[d];if(!P)return void this.fire(new i.l(new Error(`Cannot remove non-existing layer "${d}".`)));P.setEventedParent(null);let N=this._order.indexOf(d);this._order.splice(N,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[d]=P,delete this._layers[d],this._serializedLayers&&delete this._serializedLayers[d],delete this._updatedLayers[d],delete this._updatedPaintProps[d],P.onRemove&&P.onRemove(this.map)}getLayer(d){return this._layers[d]}getLayersOrder(){return[...this._order]}hasLayer(d){return d in this._layers}setLayerZoomRange(d,P,N){this._checkLoaded();let H=this.getLayer(d);H?H.minzoom===P&&H.maxzoom===N||(P!=null&&(H.minzoom=P),N!=null&&(H.maxzoom=N),this._updateLayer(H)):this.fire(new i.l(new Error(`Cannot set the zoom range of non-existing layer "${d}".`)))}setFilter(d,P,N={}){this._checkLoaded();let H=this.getLayer(d);if(H){if(!i.bQ(H.filter,P))return P==null?(H.setFilter(void 0),void this._updateLayer(H)):void(this._validate(i.F.filter,`layers.${H.id}.filter`,P,null,N)||(H.setFilter(i.bV(P)),this._updateLayer(H)))}else this.fire(new i.l(new Error(`Cannot filter non-existing layer "${d}".`)))}getFilter(d){return i.bV(this.getLayer(d).filter)}setLayoutProperty(d,P,N,H={}){this._checkLoaded();let $=this.getLayer(d);$?i.bQ($.getLayoutProperty(P),N)||($.setLayoutProperty(P,N,H),this._updateLayer($)):this.fire(new i.l(new Error(`Cannot style non-existing layer "${d}".`)))}getLayoutProperty(d,P){let N=this.getLayer(d);if(N)return N.getLayoutProperty(P);this.fire(new i.l(new Error(`Cannot get style of non-existing layer "${d}".`)))}setPaintProperty(d,P,N,H={}){this._checkLoaded();let $=this.getLayer(d);$?i.bQ($.getPaintProperty(P),N)||this._updatePaintProperty($,P,N,H):this.fire(new i.l(new Error(`Cannot style non-existing layer "${d}".`)))}_updatePaintProperty(d,P,N,H={}){d.setPaintProperty(P,N,H)&&this._updateLayer(d),i.bU(d)&&P==="raster-fade-duration"&&this.tileManagers[d.source].setRasterFadeDuration(N),this._changed=!0,this._updatedPaintProps[d.id]=!0,this._serializedLayers=null}getPaintProperty(d,P){return this.getLayer(d).getPaintProperty(P)}setFeatureState(d,P){this._checkLoaded();let N=d.source,H=d.sourceLayer,$=this.tileManagers[N];if($===void 0)return void this.fire(new i.l(new Error(`The source '${N}' does not exist in the map's style.`)));let se=$.getSource().type;se==="geojson"&&H?this.fire(new i.l(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):se!=="vector"||H?(d.id===void 0&&this.fire(new i.l(new Error("The feature id parameter must be provided."))),$.setFeatureState(H,d.id,P)):this.fire(new i.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(d,P){this._checkLoaded();let N=d.source,H=this.tileManagers[N];if(H===void 0)return void this.fire(new i.l(new Error(`The source '${N}' does not exist in the map's style.`)));let $=H.getSource().type,se=$==="vector"?d.sourceLayer:void 0;$!=="vector"||se?P&&typeof d.id!="string"&&typeof d.id!="number"?this.fire(new i.l(new Error("A feature id is required to remove its specific state property."))):H.removeFeatureState(se,d.id,P):this.fire(new i.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(d){this._checkLoaded();let P=d.source,N=d.sourceLayer,H=this.tileManagers[P];if(H!==void 0)return H.getSource().type!=="vector"||N?(d.id===void 0&&this.fire(new i.l(new Error("The feature id parameter must be provided."))),H.getFeatureState(N,d.id)):void this.fire(new i.l(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new i.l(new Error(`The source '${P}' does not exist in the map's style.`)))}getTransition(){var d;return i.e({duration:300,delay:0},(d=this.stylesheet)===null||d===void 0?void 0:d.transition)}serialize(){if(!this._loaded)return;let d=i.bY(this.tileManagers,($=>$.serialize())),P=this._serializeByIds(this._order,!0),N=this.map.getTerrain()||void 0,H=this.stylesheet;return i.bZ({version:H.version,name:H.name,metadata:H.metadata,light:H.light,sky:H.sky,center:H.center,zoom:H.zoom,bearing:H.bearing,pitch:H.pitch,sprite:H.sprite,glyphs:H.glyphs,transition:H.transition,projection:H.projection,sources:d,layers:P,terrain:N},($=>$!==void 0))}_updateLayer(d){this._updatedLayers[d.id]=!0,d.source&&!this._updatedSources[d.source]&&this.tileManagers[d.source].getSource().type!=="raster"&&(this._updatedSources[d.source]="reload",this.tileManagers[d.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(d){let P=se=>this._layers[se].type==="fill-extrusion",N={},H=[];for(let se=this._order.length-1;se>=0;se--){let de=this._order[se];if(P(de)){N[de]=se;for(let Ae of d){let Fe=Ae[de];if(Fe)for(let Ie of Fe)H.push(Ie)}}}H.sort(((se,de)=>de.intersectionZ-se.intersectionZ));let $=[];for(let se=this._order.length-1;se>=0;se--){let de=this._order[se];if(P(de))for(let Ae=H.length-1;Ae>=0;Ae--){let Fe=H[Ae].feature;if(N[Fe.layer.id]this.map.terrain.getElevation(Ie,Ye,st):void 0));return this.placement&&$.push((function(Fe,Ie,Ye,st,ht,Pe,Xe){let at={},xt=Pe.queryRenderedSymbols(st),Et=[];for(let Bt of Object.keys(xt).map(Number))Et.push(Xe[Bt]);Et.sort(ne);for(let Bt of Et){let St=Bt.featureIndex.lookupSymbolFeatures(xt[Bt.bucketInstanceId],Ie,Bt.bucketIndex,Bt.sourceLayerIndex,{filterSpec:ht.filter,globalState:ht.globalState},ht.layers,ht.availableImages,Fe);for(let Pt in St){at[Pt]||(at[Pt]=[]);let $t=St[Pt];$t.sort(((Ht,dr)=>{let Xr=Bt.featureSortOrder;if(Xr){let Or=Xr.indexOf(Ht.featureIndex);return Xr.indexOf(dr.featureIndex)-Or}return dr.featureIndex-Ht.featureIndex}));for(let Ht of $t)at[Pt].push(Ht)}}return(function(Bt,St,Pt){for(let $t in Bt)for(let Ht of Bt[$t])ae(Ht,Pt[St[$t].source]);return Bt})(at,Fe,Ye)})(this._layers,se,this.tileManagers,d,Ae,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures($)}querySourceFeatures(d,P){P!=null&&P.filter&&this._validate(i.F.filter,"querySourceFeatures.filter",P.filter,null,P);let N=this.tileManagers[d];return N?(function(H,$){let se=H.getRenderableIds().map((Fe=>H.getTileByID(Fe))),de=[],Ae={};for(let Fe of se){let Ie=Fe.tileID.canonical.key;Ae[Ie]||(Ae[Ie]=!0,Fe.querySourceFeatures(de,$))}return de})(N,P?Object.assign(Object.assign({},P),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(d,P={}){this._checkLoaded();let N=this.light.getLight(),H=!1;for(let se in d)if(!i.bQ(d[se],N[se])){H=!0;break}if(!H)return;let $={now:g(),transition:i.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(d,P),this.light.updateTransitions($)}getProjection(){var d;return(d=this.stylesheet)===null||d===void 0?void 0:d.projection}setProjection(d){this._checkLoaded();let P=d!=null?d:{type:"mercator"};if(this.stylesheet.projection=d,this.projection){if(this.projection.name===P.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(P.type)}getSky(){var d;return(d=this.stylesheet)===null||d===void 0?void 0:d.sky}setSky(d,P={}){this._checkLoaded();let N=this.getSky(),H=!1;if(!d&&!N)return;if(d&&!N)H=!0;else if(!d&&N)H=!0;else for(let se in d)if(!i.bQ(d[se],N[se])){H=!0;break}if(!H)return;let $={now:g(),transition:i.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=d,this.sky.setSky(d,P),this.sky.updateTransitions($)}_setProjectionInternal(d){let P=(function(N,H){let $={constrainOverride:H};if(Array.isArray(N)){let se=new Sf({type:N});return{projection:se,transform:new Ro($),cameraHelper:new Dl(se)}}switch(N){case"mercator":return{projection:new oo,transform:new Ls($),cameraHelper:new Gu};case"globe":{let se=new Sf({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:se,transform:new Ro($),cameraHelper:new Dl(se)}}case"vertical-perspective":return{projection:new Bd,transform:new Zo($),cameraHelper:new is};default:return i.w(`Unknown projection name: ${N}. Falling back to mercator projection.`),{projection:new oo,transform:new Ls($),cameraHelper:new Gu}}})(d,this.map.transformConstrain);this.projection=P.projection,this.map.migrateProjection(P.transform,P.cameraHelper);for(let N in this.tileManagers)this.tileManagers[N].reload()}_validate(d,P,N,H,$={}){return($==null?void 0:$.validate)!==!1&&dc(this,d.call(i.F,i.e({key:P,style:this.serialize(),value:N,styleSpec:i.x},H)))}_remove(d=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),rt().off(Ve,this._rtlPluginLoaded);for(let P in this._layers)this._layers[P].setEventedParent(null);for(let P in this.tileManagers){let N=this.tileManagers[P];N.setEventedParent(null),N.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),d&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(d)}_clearSource(d){this.tileManagers[d].clearTiles()}_reloadSource(d){this.tileManagers[d].resume(),this.tileManagers[d].reload()}_updateSources(d){for(let P in this.tileManagers)this.tileManagers[P].update(d,this.map.terrain)}_generateCollisionBoxes(){for(let d in this.tileManagers)this._reloadSource(d)}_updatePlacement(d,P,N,H,$=!1){let se=!1,de=!1,Ae={};for(let Fe of this._order){let Ie=this._layers[Fe];if(Ie.type!=="symbol")continue;if(!Ae[Ie.source]){let st=this.tileManagers[Ie.source];Ae[Ie.source]=st.getRenderableIds(!0).map((ht=>st.getTileByID(ht))).sort(((ht,Pe)=>Pe.tileID.overscaledZ-ht.tileID.overscaledZ||(ht.tileID.isLessThan(Pe.tileID)?-1:1)))}let Ye=this.crossTileSymbolIndex.addLayer(Ie,Ae[Ie.source],d.center.lng);se||(se=Ye)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),$||($=this._layerOrderChanged||N===0),($||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(g(),d.zoom))&&(this.pauseablePlacement=new Ra(d,this.map.terrain,this._order,$,P,N,H,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ae),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(g()),de=!0),se&&this.pauseablePlacement.placement.setStale()),de||se)for(let Fe of this._order){let Ie=this._layers[Fe];Ie.type==="symbol"&&this.placement.updateLayerOpacities(Ie,Ae[Ie.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(g())}_releaseSymbolFadeTiles(){for(let d in this.tileManagers)this.tileManagers[d].releaseSymbolFadeTiles()}getImages(d,P){return i._(this,void 0,void 0,(function*(){let N=yield this.imageManager.getImages(P.icons);this._updateTilesForChangedImages();let H=this.tileManagers[P.source];return H&&H.setDependencies(P.tileID.key,P.type,P.icons),N}))}getGlyphs(d,P){return i._(this,void 0,void 0,(function*(){let N=yield this.glyphManager.getGlyphs(P.stacks),H=this.tileManagers[P.source];return H&&H.setDependencies(P.tileID.key,P.type,[""]),N}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(d,P={}){this._checkLoaded(),d&&this._validate(i.F.glyphs,"glyphs",d,null,P)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=d,this.glyphManager.entries={},this.glyphManager.setURL(d))}getDashes(d,P){return i._(this,void 0,void 0,(function*(){let N={};for(let[H,$]of Object.entries(P.dashes))N[H]=this.lineAtlas.getDash($.dasharray,$.round);return N}))}addSprite(d,P,N={},H){this._checkLoaded();let $=[{id:d,url:P}],se=[...C(this.stylesheet.sprite),...$];this._validate(i.F.sprite,"sprite",se,null,N)||(this.stylesheet.sprite=se,this._loadSprite($,!0,H))}removeSprite(d){this._checkLoaded();let P=C(this.stylesheet.sprite);if(P.find((N=>N.id===d))){if(this._spritesImagesIds[d])for(let N of this._spritesImagesIds[d])this.imageManager.removeImage(N),this._changedImages[N]=!0;P.splice(P.findIndex((N=>N.id===d)),1),this.stylesheet.sprite=P.length>0?P:void 0,delete this._spritesImagesIds[d],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.n("data",{dataType:"style"}))}else this.fire(new i.l(new Error(`Sprite "${d}" doesn't exists on this map.`)))}getSprite(){return C(this.stylesheet.sprite)}setSprite(d,P={},N){this._checkLoaded(),d&&this._validate(i.F.sprite,"sprite",d,null,P)||(this.stylesheet.sprite=d,d?this._loadSprite(d,!0,N):(this._unloadSprite(),N&&N(null)))}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(let d in this.tileManagers){let P=this.tileManagers[d];P.setEventedParent(null),P.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(let d in this._layers){let P=this._layers[d];P.setEventedParent(null),P.onRemove&&P.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var sh=i.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class X0{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(d,P,N,H,$,se,de,Ae,Fe){this.context=d;let Ie=this.boundPaintVertexBuffers.length!==H.length;for(let Ye=0;!Ie&&Ye({u_texture:0,u_ele_delta:Y,u_fog_matrix:d,u_fog_color:P?P.properties.get("fog-color"):i.bo.white,u_fog_ground_blend:P?P.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:H?0:P?P.calculateFogBlendOpacity(N):0,u_horizon_color:P?P.properties.get("horizon-color"):i.bo.white,u_horizon_fog_blend:P?P.properties.get("horizon-fog-blend"):1,u_is_globe_mode:H?1:0}),Cf={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function Vo(Y){let d=[];for(let P of Y){if(P===null)continue;let N=P.split(" ");d.push(N.pop())}return d}class Ud{constructor(d,P,N,H,$,se,de,Ae,Fe=[]){let Ie=d.gl;this.program=Ie.createProgram();let Ye=Vo(P.staticAttributes),st=N?N.getBinderAttributes():[],ht=Ye.concat(st),Pe=Oa.prelude.staticUniforms?Vo(Oa.prelude.staticUniforms):[],Xe=de.staticUniforms?Vo(de.staticUniforms):[],at=P.staticUniforms?Vo(P.staticUniforms):[],xt=N?N.getBinderUniforms():[],Et=Pe.concat(Xe).concat(at).concat(xt),Bt=[];for(let Or of Et)Bt.includes(Or)||Bt.push(Or);let St=N?N.defines():[];Pl(Ie)&&St.unshift("#version 300 es"),$&&St.push("#define OVERDRAW_INSPECTOR;"),se&&St.push("#define TERRAIN3D;"),Ae&&St.push(Ae),Fe&&St.push(...Fe);let Pt=St.concat(Oa.prelude.fragmentSource,de.fragmentSource,P.fragmentSource).join(` `),$t=St.concat(Oa.prelude.vertexSource,de.vertexSource,P.vertexSource).join(` -`);Pl(Ie)||(Pt=(function(Or){return Or.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")})(Pt),$t=(function(Or){return Or.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")})($t));let Ht=Ie.createShader(Ie.FRAGMENT_SHADER);if(Ie.isContextLost())return void(this.failedToCreate=!0);if(Ie.shaderSource(Ht,Pt),Ie.compileShader(Ht),!Ie.getShaderParameter(Ht,Ie.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${Ie.getShaderInfoLog(Ht)}`);Ie.attachShader(this.program,Ht);let dr=Ie.createShader(Ie.VERTEX_SHADER);if(Ie.isContextLost())return void(this.failedToCreate=!0);if(Ie.shaderSource(dr,$t),Ie.compileShader(dr),!Ie.getShaderParameter(dr,Ie.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${Ie.getShaderInfoLog(dr)}`);Ie.attachShader(this.program,dr),this.attributes={};let Xr={};this.numAttributes=dt.length;for(let Or=0;Or({u_depth:new i.b_(Or,$r.u_depth),u_terrain:new i.b_(Or,$r.u_terrain),u_terrain_dim:new i.bp(Or,$r.u_terrain_dim),u_terrain_matrix:new i.c0(Or,$r.u_terrain_matrix),u_terrain_unpack:new i.c1(Or,$r.u_terrain_unpack),u_terrain_exaggeration:new i.bp(Or,$r.u_terrain_exaggeration)}))(d,Xr),this.projectionUniforms=((Or,$r)=>({u_projection_matrix:new i.c0(Or,$r.u_projection_matrix),u_projection_tile_mercator_coords:new i.c1(Or,$r.u_projection_tile_mercator_coords),u_projection_clipping_plane:new i.c1(Or,$r.u_projection_clipping_plane),u_projection_transition:new i.bp(Or,$r.u_projection_transition),u_projection_fallback_matrix:new i.c0(Or,$r.u_projection_fallback_matrix)}))(d,Xr),this.binderUniforms=N?N.getUniforms(d,Xr):[]}draw(d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st,dt,Pe,Xe,at,xt,Et,Bt){var St;let Pt=d.gl;if(this.failedToCreate)return;if(d.program.set(this.program),d.setDepthMode(N),d.setStencilMode(H),d.setColorMode($),d.setCullFace(se),Ae){d.activeTexture.set(Pt.TEXTURE2),Pt.bindTexture(Pt.TEXTURE_2D,Ae.depthTexture),d.activeTexture.set(Pt.TEXTURE3),Pt.bindTexture(Pt.TEXTURE_2D,Ae.texture);for(let Ht in this.terrainUniforms)this.terrainUniforms[Ht].set(Ae[Ht])}if(Fe)for(let Ht in Fe)this.projectionUniforms[Cf[Ht]].set(Fe[Ht]);if(de)for(let Ht in this.fixedUniforms)this.fixedUniforms[Ht].set(de[Ht]);at&&at.setUniforms(d,this.binderUniforms,Pe,{zoom:Xe});let $t=0;switch(P){case Pt.LINES:$t=2;break;case Pt.TRIANGLES:$t=3;break;case Pt.LINE_STRIP:$t=1}for(let Ht of dt.get())Ht.vaos||(Ht.vaos={}),(St=Ht.vaos)[Ie]||(St[Ie]=new Y0),Ht.vaos[Ie].bind(d,this,Ye,at?at.getPaintVertexBuffers():[],st,Ht.vertexOffset,xt,Et,Bt),Pt.drawElements(P,Ht.primitiveLength*$t,Pt.UNSIGNED_SHORT,Ht.primitiveOffset*$t*2)}}function zh(Y,d,P){let N=1/i.aK(P,1,d.transform.tileZoom),H=Math.pow(2,P.tileID.overscaledZ),$=P.tileSize*Math.pow(2,d.transform.tileZoom)/H,se=$*(P.tileID.canonical.x+P.tileID.wrap*H),de=$*P.tileID.canonical.y;return{u_image:0,u_texsize:P.imageAtlasTexture.size,u_scale:[N,Y.fromScale,Y.toScale],u_fade:Y.t,u_pixel_coord_upper:[se>>16,de>>16],u_pixel_coord_lower:[65535&se,65535&de]}}let tf=(Y,d,P,N)=>{let H=Y.style.light,$=H.properties.get("position"),se=[$.x,$.y,$.z],de=i.c4();H.properties.get("anchor")==="viewport"&&i.c5(de,Y.transform.bearingInRadians),i.c6(se,se,de);let Ae=Y.transform.transformLightDirection(se),Fe=H.properties.get("color");return{u_lightpos:se,u_lightpos_globe:Ae,u_lightintensity:H.properties.get("intensity"),u_lightcolor:[Fe.r,Fe.g,Fe.b],u_vertical_gradient:+d,u_opacity:P,u_fill_translate:N}},Vd=(Y,d,P,N,H,$,se)=>i.e(tf(Y,d,P,N),zh($,Y,se),{u_height_factor:-Math.pow(2,H.overscaledZ)/se.tileSize/8}),rf=(Y,d,P,N)=>i.e(zh(d,Y,P),{u_fill_translate:N}),qh=(Y,d)=>({u_world:Y,u_fill_translate:d}),vc=(Y,d,P,N,H)=>i.e(rf(Y,d,P,H),{u_world:N}),dd=(Y,d,P,N,H)=>{let $=Y.transform,se,de,Ae=0;if(P.paint.get("circle-pitch-alignment")==="map"){let Fe=i.aK(d,1,$.zoom);se=!0,de=[Fe,Fe],Ae=Fe/(i.a6*Math.pow(2,d.tileID.overscaledZ))*2*Math.PI*H}else se=!1,de=$.pixelsToGLUnits;return{u_camera_to_center_distance:$.cameraToCenterDistance,u_scale_with_map:+(P.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+se,u_device_pixel_ratio:Y.pixelRatio,u_extrude_scale:de,u_globe_extrude_scale:Ae,u_translate:N}},Bh=Y=>({u_pixel_extrude_scale:[1/Y.width,1/Y.height]}),Wu=Y=>({u_viewport_size:[Y.width,Y.height]}),vd=(Y,d=1)=>({u_color:Y,u_overlay:0,u_overlay_scale:d}),pd=(Y,d,P,N)=>{let H=i.aK(Y,1,d)/(i.a6*Math.pow(2,Y.tileID.overscaledZ))*2*Math.PI*N;return{u_extrude_scale:i.aK(Y,1,d),u_intensity:P,u_globe_extrude_scale:H}},lh=(Y,d,P,N)=>{let H=i.O();i.c7(H,0,Y.width,Y.height,0,0,1);let $=Y.context.gl;return{u_matrix:H,u_world:[$.drawingBufferWidth,$.drawingBufferHeight],u_image:P,u_color_ramp:N,u_opacity:d.paint.get("heatmap-opacity")}},nf=(Y,d,P)=>{let N=P.paint.get("hillshade-accent-color"),H;switch(P.paint.get("hillshade-method")){case"basic":H=4;break;case"combined":H=1;break;case"igor":H=2;break;case"multidirectional":H=3;break;default:H=0}let $=P.getIlluminationProperties();for(let se=0;se<$.directionRadians.length;se++)P.paint.get("hillshade-illumination-anchor")==="viewport"&&($.directionRadians[se]+=Y.transform.bearingInRadians);return{u_image:0,u_latrange:af(0,d.tileID),u_exaggeration:P.paint.get("hillshade-exaggeration"),u_altitudes:$.altitudeRadians,u_azimuths:$.directionRadians,u_accent:N,u_method:H,u_highlights:$.highlightColor,u_shadows:$.shadowColor}},uh=(Y,d)=>{let P=d.stride,N=i.O();return i.c7(N,0,i.a6,-i.a6,0,0,1),i.Q(N,N,[0,-i.a6,0]),{u_matrix:N,u_image:1,u_dimension:[P,P],u_zoom:Y.overscaledZ,u_unpack:d.getUnpackVector()}};function af(Y,d){let P=Math.pow(2,d.canonical.z),N=d.canonical.y;return[new i.a7(0,N/P).toLngLat().lat,new i.a7(0,(N+1)/P).toLngLat().lat]}let gd=(Y,d,P=0)=>({u_image:0,u_unpack:d.getUnpackVector(),u_dimension:[d.stride,d.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:P,u_opacity:Y.paint.get("color-relief-opacity")}),Rl=(Y,d,P,N)=>{let H=Y.transform;return{u_translation:wu(Y,d,P),u_ratio:N/i.aK(d,1,H.zoom),u_device_pixel_ratio:Y.pixelRatio,u_units_to_pixels:[1/H.pixelsToGLUnits[0],1/H.pixelsToGLUnits[1]]}},ch=(Y,d,P,N,H)=>i.e(Rl(Y,d,P,N),{u_image:0,u_image_height:H}),Lc=(Y,d,P,N,H)=>{let $=Y.transform,se=Lf(d,$);return{u_translation:wu(Y,d,P),u_texsize:d.imageAtlasTexture.size,u_ratio:N/i.aK(d,1,$.zoom),u_device_pixel_ratio:Y.pixelRatio,u_image:0,u_scale:[se,H.fromScale,H.toScale],u_fade:H.t,u_units_to_pixels:[1/$.pixelsToGLUnits[0],1/$.pixelsToGLUnits[1]]}},md=(Y,d,P,N,H)=>{let $=Lf(d,Y.transform);return i.e(Rl(Y,d,P,N),{u_tileratio:$,u_crossfade_from:H.fromScale,u_crossfade_to:H.toScale,u_image:0,u_mix:H.t,u_lineatlas_width:Y.lineAtlas.width,u_lineatlas_height:Y.lineAtlas.height})},yd=(Y,d,P,N,H,$)=>{let se=Lf(d,Y.transform);return i.e(Rl(Y,d,P,N),{u_image:0,u_image_height:$,u_tileratio:se,u_crossfade_from:H.fromScale,u_crossfade_to:H.toScale,u_image_dash:1,u_mix:H.t,u_lineatlas_width:Y.lineAtlas.width,u_lineatlas_height:Y.lineAtlas.height})};function Lf(Y,d){return 1/i.aK(Y,1,d.tileZoom)}function wu(Y,d,P){return i.aL(Y.transform,d,P.paint.get("line-translate"),P.paint.get("line-translate-anchor"))}let fh=(Y,d,P,N,H)=>{return{u_tl_parent:Y,u_scale_parent:d,u_buffer_scale:1,u_fade_t:P.mix,u_opacity:P.opacity*N.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:N.paint.get("raster-brightness-min"),u_brightness_high:N.paint.get("raster-brightness-max"),u_saturation_factor:(se=N.paint.get("raster-saturation"),se>0?1-1/(1.001-se):-se),u_contrast_factor:($=N.paint.get("raster-contrast"),$>0?1/(1-$):1+$),u_spin_weights:Oh(N.paint.get("raster-hue-rotate")),u_coords_top:[H[0].x,H[0].y,H[1].x,H[1].y],u_coords_bottom:[H[3].x,H[3].y,H[2].x,H[2].y]};var $,se};function Oh(Y){Y*=Math.PI/180;let d=Math.sin(Y),P=Math.cos(Y);return[(2*P+1)/3,(-Math.sqrt(3)*d-P+1)/3,(Math.sqrt(3)*d-P+1)/3]}let hh=(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st)=>{let dt=se.transform;return{u_is_size_zoom_constant:+(Y==="constant"||Y==="source"),u_is_size_feature_constant:+(Y==="constant"||Y==="camera"),u_size_t:d?d.uSizeT:0,u_size:d?d.uSize:0,u_camera_to_center_distance:dt.cameraToCenterDistance,u_pitch:dt.pitch/360*2*Math.PI,u_rotate_symbol:+P,u_aspect_ratio:dt.width/dt.height,u_fade_change:se.options.fadeDuration?se.symbolFadeChange:1,u_label_plane_matrix:de,u_coord_matrix:Ae,u_is_text:+Ie,u_pitch_with_map:+N,u_is_along_line:H,u_is_variable_anchor:$,u_texsize:Ye,u_texture:0,u_translation:Fe,u_pitched_scale:st}},Gd=(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st,dt)=>{let Pe=se.transform;return i.e(hh(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,dt),{u_gamma_scale:N?Math.cos(Pe.pitch*Math.PI/180)*Pe.cameraToCenterDistance:1,u_device_pixel_ratio:se.pixelRatio,u_is_halo:st?1:0,u_is_plain:1})},Gl=(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st)=>i.e(Gd(Y,d,P,N,H,$,se,de,Ae,Fe,!0,Ie,!0,st),{u_texsize_icon:Ye,u_texture_icon:1}),wl=(Y,d)=>({u_opacity:Y,u_color:d}),xd=(Y,d,P,N,H)=>i.e((function($,se,de,Ae){let Fe=de.imageManager.getPattern($.from.toString()),Ie=de.imageManager.getPattern($.to.toString()),{width:Ye,height:st}=de.imageManager.getPixelSize(),dt=Math.pow(2,Ae.tileID.overscaledZ),Pe=Ae.tileSize*Math.pow(2,de.transform.tileZoom)/dt,Xe=Pe*(Ae.tileID.canonical.x+Ae.tileID.wrap*dt),at=Pe*Ae.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Fe.tl,u_pattern_br_a:Fe.br,u_pattern_tl_b:Ie.tl,u_pattern_br_b:Ie.br,u_texsize:[Ye,st],u_mix:se.t,u_pattern_size_a:Fe.displaySize,u_pattern_size_b:Ie.displaySize,u_scale_a:se.fromScale,u_scale_b:se.toScale,u_tile_units_to_pixels:1/i.aK(Ae,1,de.transform.tileZoom),u_pixel_coord_upper:[Xe>>16,at>>16],u_pixel_coord_lower:[65535&Xe,65535&at]}})(P,H,d,N),{u_opacity:Y}),Hl=(Y,d)=>{},_d={fillExtrusion:(Y,d)=>({u_lightpos:new i.c2(Y,d.u_lightpos),u_lightpos_globe:new i.c2(Y,d.u_lightpos_globe),u_lightintensity:new i.bp(Y,d.u_lightintensity),u_lightcolor:new i.c2(Y,d.u_lightcolor),u_vertical_gradient:new i.bp(Y,d.u_vertical_gradient),u_opacity:new i.bp(Y,d.u_opacity),u_fill_translate:new i.c3(Y,d.u_fill_translate)}),fillExtrusionPattern:(Y,d)=>({u_lightpos:new i.c2(Y,d.u_lightpos),u_lightpos_globe:new i.c2(Y,d.u_lightpos_globe),u_lightintensity:new i.bp(Y,d.u_lightintensity),u_lightcolor:new i.c2(Y,d.u_lightcolor),u_vertical_gradient:new i.bp(Y,d.u_vertical_gradient),u_height_factor:new i.bp(Y,d.u_height_factor),u_opacity:new i.bp(Y,d.u_opacity),u_fill_translate:new i.c3(Y,d.u_fill_translate),u_image:new i.b_(Y,d.u_image),u_texsize:new i.c3(Y,d.u_texsize),u_pixel_coord_upper:new i.c3(Y,d.u_pixel_coord_upper),u_pixel_coord_lower:new i.c3(Y,d.u_pixel_coord_lower),u_scale:new i.c2(Y,d.u_scale),u_fade:new i.bp(Y,d.u_fade)}),fill:(Y,d)=>({u_fill_translate:new i.c3(Y,d.u_fill_translate)}),fillPattern:(Y,d)=>({u_image:new i.b_(Y,d.u_image),u_texsize:new i.c3(Y,d.u_texsize),u_pixel_coord_upper:new i.c3(Y,d.u_pixel_coord_upper),u_pixel_coord_lower:new i.c3(Y,d.u_pixel_coord_lower),u_scale:new i.c2(Y,d.u_scale),u_fade:new i.bp(Y,d.u_fade),u_fill_translate:new i.c3(Y,d.u_fill_translate)}),fillOutline:(Y,d)=>({u_world:new i.c3(Y,d.u_world),u_fill_translate:new i.c3(Y,d.u_fill_translate)}),fillOutlinePattern:(Y,d)=>({u_world:new i.c3(Y,d.u_world),u_image:new i.b_(Y,d.u_image),u_texsize:new i.c3(Y,d.u_texsize),u_pixel_coord_upper:new i.c3(Y,d.u_pixel_coord_upper),u_pixel_coord_lower:new i.c3(Y,d.u_pixel_coord_lower),u_scale:new i.c2(Y,d.u_scale),u_fade:new i.bp(Y,d.u_fade),u_fill_translate:new i.c3(Y,d.u_fill_translate)}),circle:(Y,d)=>({u_camera_to_center_distance:new i.bp(Y,d.u_camera_to_center_distance),u_scale_with_map:new i.b_(Y,d.u_scale_with_map),u_pitch_with_map:new i.b_(Y,d.u_pitch_with_map),u_extrude_scale:new i.c3(Y,d.u_extrude_scale),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_globe_extrude_scale:new i.bp(Y,d.u_globe_extrude_scale),u_translate:new i.c3(Y,d.u_translate)}),collisionBox:(Y,d)=>({u_pixel_extrude_scale:new i.c3(Y,d.u_pixel_extrude_scale)}),collisionCircle:(Y,d)=>({u_viewport_size:new i.c3(Y,d.u_viewport_size)}),debug:(Y,d)=>({u_color:new i.b$(Y,d.u_color),u_overlay:new i.b_(Y,d.u_overlay),u_overlay_scale:new i.bp(Y,d.u_overlay_scale)}),depth:Hl,clippingMask:Hl,heatmap:(Y,d)=>({u_extrude_scale:new i.bp(Y,d.u_extrude_scale),u_intensity:new i.bp(Y,d.u_intensity),u_globe_extrude_scale:new i.bp(Y,d.u_globe_extrude_scale)}),heatmapTexture:(Y,d)=>({u_matrix:new i.c0(Y,d.u_matrix),u_world:new i.c3(Y,d.u_world),u_image:new i.b_(Y,d.u_image),u_color_ramp:new i.b_(Y,d.u_color_ramp),u_opacity:new i.bp(Y,d.u_opacity)}),hillshade:(Y,d)=>({u_image:new i.b_(Y,d.u_image),u_latrange:new i.c3(Y,d.u_latrange),u_exaggeration:new i.bp(Y,d.u_exaggeration),u_altitudes:new i.c9(Y,d.u_altitudes),u_azimuths:new i.c9(Y,d.u_azimuths),u_accent:new i.b$(Y,d.u_accent),u_method:new i.b_(Y,d.u_method),u_shadows:new i.c8(Y,d.u_shadows),u_highlights:new i.c8(Y,d.u_highlights)}),hillshadePrepare:(Y,d)=>({u_matrix:new i.c0(Y,d.u_matrix),u_image:new i.b_(Y,d.u_image),u_dimension:new i.c3(Y,d.u_dimension),u_zoom:new i.bp(Y,d.u_zoom),u_unpack:new i.c1(Y,d.u_unpack)}),colorRelief:(Y,d)=>({u_image:new i.b_(Y,d.u_image),u_unpack:new i.c1(Y,d.u_unpack),u_dimension:new i.c3(Y,d.u_dimension),u_elevation_stops:new i.b_(Y,d.u_elevation_stops),u_color_stops:new i.b_(Y,d.u_color_stops),u_color_ramp_size:new i.b_(Y,d.u_color_ramp_size),u_opacity:new i.bp(Y,d.u_opacity)}),line:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels)}),lineGradient:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels),u_image:new i.b_(Y,d.u_image),u_image_height:new i.bp(Y,d.u_image_height)}),linePattern:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_texsize:new i.c3(Y,d.u_texsize),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_image:new i.b_(Y,d.u_image),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels),u_scale:new i.c2(Y,d.u_scale),u_fade:new i.bp(Y,d.u_fade)}),lineSDF:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels),u_image:new i.b_(Y,d.u_image),u_mix:new i.bp(Y,d.u_mix),u_tileratio:new i.bp(Y,d.u_tileratio),u_crossfade_from:new i.bp(Y,d.u_crossfade_from),u_crossfade_to:new i.bp(Y,d.u_crossfade_to),u_lineatlas_width:new i.bp(Y,d.u_lineatlas_width),u_lineatlas_height:new i.bp(Y,d.u_lineatlas_height)}),lineGradientSDF:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels),u_image:new i.b_(Y,d.u_image),u_image_height:new i.bp(Y,d.u_image_height),u_tileratio:new i.bp(Y,d.u_tileratio),u_crossfade_from:new i.bp(Y,d.u_crossfade_from),u_crossfade_to:new i.bp(Y,d.u_crossfade_to),u_image_dash:new i.b_(Y,d.u_image_dash),u_mix:new i.bp(Y,d.u_mix),u_lineatlas_width:new i.bp(Y,d.u_lineatlas_width),u_lineatlas_height:new i.bp(Y,d.u_lineatlas_height)}),raster:(Y,d)=>({u_tl_parent:new i.c3(Y,d.u_tl_parent),u_scale_parent:new i.bp(Y,d.u_scale_parent),u_buffer_scale:new i.bp(Y,d.u_buffer_scale),u_fade_t:new i.bp(Y,d.u_fade_t),u_opacity:new i.bp(Y,d.u_opacity),u_image0:new i.b_(Y,d.u_image0),u_image1:new i.b_(Y,d.u_image1),u_brightness_low:new i.bp(Y,d.u_brightness_low),u_brightness_high:new i.bp(Y,d.u_brightness_high),u_saturation_factor:new i.bp(Y,d.u_saturation_factor),u_contrast_factor:new i.bp(Y,d.u_contrast_factor),u_spin_weights:new i.c2(Y,d.u_spin_weights),u_coords_top:new i.c1(Y,d.u_coords_top),u_coords_bottom:new i.c1(Y,d.u_coords_bottom)}),symbolIcon:(Y,d)=>({u_is_size_zoom_constant:new i.b_(Y,d.u_is_size_zoom_constant),u_is_size_feature_constant:new i.b_(Y,d.u_is_size_feature_constant),u_size_t:new i.bp(Y,d.u_size_t),u_size:new i.bp(Y,d.u_size),u_camera_to_center_distance:new i.bp(Y,d.u_camera_to_center_distance),u_pitch:new i.bp(Y,d.u_pitch),u_rotate_symbol:new i.b_(Y,d.u_rotate_symbol),u_aspect_ratio:new i.bp(Y,d.u_aspect_ratio),u_fade_change:new i.bp(Y,d.u_fade_change),u_label_plane_matrix:new i.c0(Y,d.u_label_plane_matrix),u_coord_matrix:new i.c0(Y,d.u_coord_matrix),u_is_text:new i.b_(Y,d.u_is_text),u_pitch_with_map:new i.b_(Y,d.u_pitch_with_map),u_is_along_line:new i.b_(Y,d.u_is_along_line),u_is_variable_anchor:new i.b_(Y,d.u_is_variable_anchor),u_texsize:new i.c3(Y,d.u_texsize),u_texture:new i.b_(Y,d.u_texture),u_translation:new i.c3(Y,d.u_translation),u_pitched_scale:new i.bp(Y,d.u_pitched_scale)}),symbolSDF:(Y,d)=>({u_is_size_zoom_constant:new i.b_(Y,d.u_is_size_zoom_constant),u_is_size_feature_constant:new i.b_(Y,d.u_is_size_feature_constant),u_size_t:new i.bp(Y,d.u_size_t),u_size:new i.bp(Y,d.u_size),u_camera_to_center_distance:new i.bp(Y,d.u_camera_to_center_distance),u_pitch:new i.bp(Y,d.u_pitch),u_rotate_symbol:new i.b_(Y,d.u_rotate_symbol),u_aspect_ratio:new i.bp(Y,d.u_aspect_ratio),u_fade_change:new i.bp(Y,d.u_fade_change),u_label_plane_matrix:new i.c0(Y,d.u_label_plane_matrix),u_coord_matrix:new i.c0(Y,d.u_coord_matrix),u_is_text:new i.b_(Y,d.u_is_text),u_pitch_with_map:new i.b_(Y,d.u_pitch_with_map),u_is_along_line:new i.b_(Y,d.u_is_along_line),u_is_variable_anchor:new i.b_(Y,d.u_is_variable_anchor),u_texsize:new i.c3(Y,d.u_texsize),u_texture:new i.b_(Y,d.u_texture),u_gamma_scale:new i.bp(Y,d.u_gamma_scale),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_is_halo:new i.b_(Y,d.u_is_halo),u_is_plain:new i.b_(Y,d.u_is_plain),u_translation:new i.c3(Y,d.u_translation),u_pitched_scale:new i.bp(Y,d.u_pitched_scale)}),symbolTextAndIcon:(Y,d)=>({u_is_size_zoom_constant:new i.b_(Y,d.u_is_size_zoom_constant),u_is_size_feature_constant:new i.b_(Y,d.u_is_size_feature_constant),u_size_t:new i.bp(Y,d.u_size_t),u_size:new i.bp(Y,d.u_size),u_camera_to_center_distance:new i.bp(Y,d.u_camera_to_center_distance),u_pitch:new i.bp(Y,d.u_pitch),u_rotate_symbol:new i.b_(Y,d.u_rotate_symbol),u_aspect_ratio:new i.bp(Y,d.u_aspect_ratio),u_fade_change:new i.bp(Y,d.u_fade_change),u_label_plane_matrix:new i.c0(Y,d.u_label_plane_matrix),u_coord_matrix:new i.c0(Y,d.u_coord_matrix),u_is_text:new i.b_(Y,d.u_is_text),u_pitch_with_map:new i.b_(Y,d.u_pitch_with_map),u_is_along_line:new i.b_(Y,d.u_is_along_line),u_is_variable_anchor:new i.b_(Y,d.u_is_variable_anchor),u_texsize:new i.c3(Y,d.u_texsize),u_texsize_icon:new i.c3(Y,d.u_texsize_icon),u_texture:new i.b_(Y,d.u_texture),u_texture_icon:new i.b_(Y,d.u_texture_icon),u_gamma_scale:new i.bp(Y,d.u_gamma_scale),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_is_halo:new i.b_(Y,d.u_is_halo),u_translation:new i.c3(Y,d.u_translation),u_pitched_scale:new i.bp(Y,d.u_pitched_scale)}),background:(Y,d)=>({u_opacity:new i.bp(Y,d.u_opacity),u_color:new i.b$(Y,d.u_color)}),backgroundPattern:(Y,d)=>({u_opacity:new i.bp(Y,d.u_opacity),u_image:new i.b_(Y,d.u_image),u_pattern_tl_a:new i.c3(Y,d.u_pattern_tl_a),u_pattern_br_a:new i.c3(Y,d.u_pattern_br_a),u_pattern_tl_b:new i.c3(Y,d.u_pattern_tl_b),u_pattern_br_b:new i.c3(Y,d.u_pattern_br_b),u_texsize:new i.c3(Y,d.u_texsize),u_mix:new i.bp(Y,d.u_mix),u_pattern_size_a:new i.c3(Y,d.u_pattern_size_a),u_pattern_size_b:new i.c3(Y,d.u_pattern_size_b),u_scale_a:new i.bp(Y,d.u_scale_a),u_scale_b:new i.bp(Y,d.u_scale_b),u_pixel_coord_upper:new i.c3(Y,d.u_pixel_coord_upper),u_pixel_coord_lower:new i.c3(Y,d.u_pixel_coord_lower),u_tile_units_to_pixels:new i.bp(Y,d.u_tile_units_to_pixels)}),terrain:(Y,d)=>({u_texture:new i.b_(Y,d.u_texture),u_ele_delta:new i.bp(Y,d.u_ele_delta),u_fog_matrix:new i.c0(Y,d.u_fog_matrix),u_fog_color:new i.b$(Y,d.u_fog_color),u_fog_ground_blend:new i.bp(Y,d.u_fog_ground_blend),u_fog_ground_blend_opacity:new i.bp(Y,d.u_fog_ground_blend_opacity),u_horizon_color:new i.b$(Y,d.u_horizon_color),u_horizon_fog_blend:new i.bp(Y,d.u_horizon_fog_blend),u_is_globe_mode:new i.bp(Y,d.u_is_globe_mode)}),terrainDepth:(Y,d)=>({u_ele_delta:new i.bp(Y,d.u_ele_delta)}),terrainCoords:(Y,d)=>({u_texture:new i.b_(Y,d.u_texture),u_terrain_coords_id:new i.bp(Y,d.u_terrain_coords_id),u_ele_delta:new i.bp(Y,d.u_ele_delta)}),projectionErrorMeasurement:(Y,d)=>({u_input:new i.bp(Y,d.u_input),u_output_expected:new i.bp(Y,d.u_output_expected)}),atmosphere:(Y,d)=>({u_sun_pos:new i.c2(Y,d.u_sun_pos),u_atmosphere_blend:new i.bp(Y,d.u_atmosphere_blend),u_globe_position:new i.c2(Y,d.u_globe_position),u_globe_radius:new i.bp(Y,d.u_globe_radius),u_inv_proj_matrix:new i.c0(Y,d.u_inv_proj_matrix)}),sky:(Y,d)=>({u_sky_color:new i.b$(Y,d.u_sky_color),u_horizon_color:new i.b$(Y,d.u_horizon_color),u_horizon:new i.c3(Y,d.u_horizon),u_horizon_normal:new i.c3(Y,d.u_horizon_normal),u_sky_horizon_blend:new i.bp(Y,d.u_sky_horizon_blend),u_sky_blend:new i.bp(Y,d.u_sky_blend)})};class dh{constructor(d,P,N){this.context=d;let H=d.gl;this.buffer=H.createBuffer(),this.dynamicDraw=!!N,this.context.unbindVAO(),d.bindElementBuffer.set(this.buffer),H.bufferData(H.ELEMENT_ARRAY_BUFFER,P.arrayBuffer,this.dynamicDraw?H.DYNAMIC_DRAW:H.STATIC_DRAW),this.dynamicDraw||P.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(d){let P=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),P.bufferSubData(P.ELEMENT_ARRAY_BUFFER,0,d.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Pf={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Hd{constructor(d,P,N,H){this.length=P.length,this.attributes=N,this.itemSize=P.bytesPerElement,this.dynamicDraw=H,this.context=d;let $=d.gl;this.buffer=$.createBuffer(),d.bindVertexBuffer.set(this.buffer),$.bufferData($.ARRAY_BUFFER,P.arrayBuffer,this.dynamicDraw?$.DYNAMIC_DRAW:$.STATIC_DRAW),this.dynamicDraw||P.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(d){if(d.length!==this.length)throw new Error(`Length of new data is ${d.length}, which doesn't match current length of ${this.length}`);let P=this.context.gl;this.bind(),P.bufferSubData(P.ARRAY_BUFFER,0,d.arrayBuffer)}enableAttributes(d,P){for(let N of this.attributes){let H=P.attributes[N.name];H!==void 0&&d.enableVertexAttribArray(H)}}setVertexAttribPointers(d,P,N){for(let H of this.attributes){let $=P.attributes[H.name];$!==void 0&&d.vertexAttribPointer($,H.components,d[Pf[H.type]],!1,this.itemSize,H.offset+this.itemSize*(N||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class xo{constructor(d){this.gl=d.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(d){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class p0 extends xo{getDefault(){return i.bo.transparent}set(d){let P=this.current;(d.r!==P.r||d.g!==P.g||d.b!==P.b||d.a!==P.a||this.dirty)&&(this.gl.clearColor(d.r,d.g,d.b,d.a),this.current=d,this.dirty=!1)}}class Tu extends xo{getDefault(){return 1}set(d){(d!==this.current||this.dirty)&&(this.gl.clearDepth(d),this.current=d,this.dirty=!1)}}class Au extends xo{getDefault(){return 0}set(d){(d!==this.current||this.dirty)&&(this.gl.clearStencil(d),this.current=d,this.dirty=!1)}}class Il extends xo{getDefault(){return[!0,!0,!0,!0]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||d[2]!==P[2]||d[3]!==P[3]||this.dirty)&&(this.gl.colorMask(d[0],d[1],d[2],d[3]),this.current=d,this.dirty=!1)}}class g0 extends xo{getDefault(){return!0}set(d){(d!==this.current||this.dirty)&&(this.gl.depthMask(d),this.current=d,this.dirty=!1)}}class Yu extends xo{getDefault(){return 255}set(d){(d!==this.current||this.dirty)&&(this.gl.stencilMask(d),this.current=d,this.dirty=!1)}}class Nh extends xo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(d){let P=this.current;(d.func!==P.func||d.ref!==P.ref||d.mask!==P.mask||this.dirty)&&(this.gl.stencilFunc(d.func,d.ref,d.mask),this.current=d,this.dirty=!1)}}class Tl extends xo{getDefault(){let d=this.gl;return[d.KEEP,d.KEEP,d.KEEP]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||d[2]!==P[2]||this.dirty)&&(this.gl.stencilOp(d[0],d[1],d[2]),this.current=d,this.dirty=!1)}}class jl extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;d?P.enable(P.STENCIL_TEST):P.disable(P.STENCIL_TEST),this.current=d,this.dirty=!1}}class Uh extends xo{getDefault(){return[0,1]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||this.dirty)&&(this.gl.depthRange(d[0],d[1]),this.current=d,this.dirty=!1)}}class Vh extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;d?P.enable(P.DEPTH_TEST):P.disable(P.DEPTH_TEST),this.current=d,this.dirty=!1}}class jd extends xo{getDefault(){return this.gl.LESS}set(d){(d!==this.current||this.dirty)&&(this.gl.depthFunc(d),this.current=d,this.dirty=!1)}}class pc extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;d?P.enable(P.BLEND):P.disable(P.BLEND),this.current=d,this.dirty=!1}}class gc extends xo{getDefault(){let d=this.gl;return[d.ONE,d.ZERO]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||this.dirty)&&(this.gl.blendFunc(d[0],d[1]),this.current=d,this.dirty=!1)}}class of extends xo{getDefault(){return i.bo.transparent}set(d){let P=this.current;(d.r!==P.r||d.g!==P.g||d.b!==P.b||d.a!==P.a||this.dirty)&&(this.gl.blendColor(d.r,d.g,d.b,d.a),this.current=d,this.dirty=!1)}}class sf extends xo{getDefault(){return this.gl.FUNC_ADD}set(d){(d!==this.current||this.dirty)&&(this.gl.blendEquation(d),this.current=d,this.dirty=!1)}}class bd extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;d?P.enable(P.CULL_FACE):P.disable(P.CULL_FACE),this.current=d,this.dirty=!1}}class Gh extends xo{getDefault(){return this.gl.BACK}set(d){(d!==this.current||this.dirty)&&(this.gl.cullFace(d),this.current=d,this.dirty=!1)}}class Xu extends xo{getDefault(){return this.gl.CCW}set(d){(d!==this.current||this.dirty)&&(this.gl.frontFace(d),this.current=d,this.dirty=!1)}}class Pc extends xo{getDefault(){return null}set(d){(d!==this.current||this.dirty)&&(this.gl.useProgram(d),this.current=d,this.dirty=!1)}}class Ff extends xo{getDefault(){return this.gl.TEXTURE0}set(d){(d!==this.current||this.dirty)&&(this.gl.activeTexture(d),this.current=d,this.dirty=!1)}}class Df extends xo{getDefault(){let d=this.gl;return[0,0,d.drawingBufferWidth,d.drawingBufferHeight]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||d[2]!==P[2]||d[3]!==P[3]||this.dirty)&&(this.gl.viewport(d[0],d[1],d[2],d[3]),this.current=d,this.dirty=!1)}}class La extends xo{getDefault(){return null}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.bindFramebuffer(P.FRAMEBUFFER,d),this.current=d,this.dirty=!1}}class Rf extends xo{getDefault(){return null}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.bindRenderbuffer(P.RENDERBUFFER,d),this.current=d,this.dirty=!1}}class m0 extends xo{getDefault(){return null}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.bindTexture(P.TEXTURE_2D,d),this.current=d,this.dirty=!1}}class wd extends xo{getDefault(){return null}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.bindBuffer(P.ARRAY_BUFFER,d),this.current=d,this.dirty=!1}}class Hh extends xo{getDefault(){return null}set(d){let P=this.gl;P.bindBuffer(P.ELEMENT_ARRAY_BUFFER,d),this.current=d,this.dirty=!1}}class X0 extends xo{getDefault(){return null}set(d){var P;if(d===this.current&&!this.dirty)return;let N=this.gl;Pl(N)?N.bindVertexArray(d):(P=N.getExtension("OES_vertex_array_object"))===null||P===void 0||P.bindVertexArrayOES(d),this.current=d,this.dirty=!1}}class y0 extends xo{getDefault(){return 4}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.pixelStorei(P.UNPACK_ALIGNMENT,d),this.current=d,this.dirty=!1}}class Td extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL,d),this.current=d,this.dirty=!1}}class ul extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.pixelStorei(P.UNPACK_FLIP_Y_WEBGL,d),this.current=d,this.dirty=!1}}class Wl extends xo{constructor(d,P){super(d),this.context=d,this.parent=P}getDefault(){return null}}class If extends Wl{setDirty(){this.dirty=!0}set(d){if(d===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let P=this.gl;P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_2D,d,0),this.current=d,this.dirty=!1}}class vh extends Wl{set(d){if(d===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let P=this.gl;P.framebufferRenderbuffer(P.FRAMEBUFFER,P.DEPTH_ATTACHMENT,P.RENDERBUFFER,d),this.current=d,this.dirty=!1}}class zf extends Wl{set(d){if(d===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let P=this.gl;P.framebufferRenderbuffer(P.FRAMEBUFFER,P.DEPTH_STENCIL_ATTACHMENT,P.RENDERBUFFER,d),this.current=d,this.dirty=!1}}let qf="Framebuffer is not complete";class Ze{constructor(d,P,N,H,$){this.context=d,this.width=P,this.height=N;let se=d.gl,de=this.framebuffer=se.createFramebuffer();if(this.colorAttachment=new If(d,de),H)this.depthAttachment=$?new zf(d,de):new vh(d,de);else if($)throw new Error("Stencil cannot be set without depth");if(se.checkFramebufferStatus(se.FRAMEBUFFER)!==se.FRAMEBUFFER_COMPLETE)throw new Error(qf)}destroy(){let d=this.context.gl,P=this.colorAttachment.get();if(P&&d.deleteTexture(P),this.depthAttachment){let N=this.depthAttachment.get();N&&d.deleteRenderbuffer(N)}d.deleteFramebuffer(this.framebuffer)}}class yt{constructor(d){var P,N;if(this.gl=d,this.clearColor=new p0(this),this.clearDepth=new Tu(this),this.clearStencil=new Au(this),this.colorMask=new Il(this),this.depthMask=new g0(this),this.stencilMask=new Yu(this),this.stencilFunc=new Nh(this),this.stencilOp=new Tl(this),this.stencilTest=new jl(this),this.depthRange=new Uh(this),this.depthTest=new Vh(this),this.depthFunc=new jd(this),this.blend=new pc(this),this.blendFunc=new gc(this),this.blendColor=new of(this),this.blendEquation=new sf(this),this.cullFace=new bd(this),this.cullFaceSide=new Gh(this),this.frontFace=new Xu(this),this.program=new Pc(this),this.activeTexture=new Ff(this),this.viewport=new Df(this),this.bindFramebuffer=new La(this),this.bindRenderbuffer=new Rf(this),this.bindTexture=new m0(this),this.bindVertexBuffer=new wd(this),this.bindElementBuffer=new Hh(this),this.bindVertexArray=new X0(this),this.pixelStoreUnpack=new y0(this),this.pixelStoreUnpackPremultiplyAlpha=new Td(this),this.pixelStoreUnpackFlipY=new ul(this),this.extTextureFilterAnisotropic=d.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=d.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=d.getParameter(d.MAX_TEXTURE_SIZE),Pl(d)){this.HALF_FLOAT=d.HALF_FLOAT;let H=d.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(P=d.RGBA16F)!==null&&P!==void 0?P:H==null?void 0:H.RGBA16F_EXT,this.RGB16F=(N=d.RGB16F)!==null&&N!==void 0?N:H==null?void 0:H.RGB16F_EXT,d.getExtension("EXT_color_buffer_float")}else{d.getExtension("EXT_color_buffer_half_float"),d.getExtension("OES_texture_half_float_linear");let H=d.getExtension("OES_texture_half_float");this.HALF_FLOAT=H==null?void 0:H.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(d,P){return new dh(this,d,P)}createVertexBuffer(d,P,N){return new Hd(this,d,P,N)}createRenderbuffer(d,P,N){let H=this.gl,$=H.createRenderbuffer();return this.bindRenderbuffer.set($),H.renderbufferStorage(H.RENDERBUFFER,d,P,N),this.bindRenderbuffer.set(null),$}createFramebuffer(d,P,N,H){return new Ze(this,d,P,N,H)}clear({color:d,depth:P,stencil:N}){let H=this.gl,$=0;d&&($|=H.COLOR_BUFFER_BIT,this.clearColor.set(d),this.colorMask.set([!0,!0,!0,!0])),P!==void 0&&($|=H.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(P),this.depthMask.set(!0)),N!==void 0&&($|=H.STENCIL_BUFFER_BIT,this.clearStencil.set(N),this.stencilMask.set(255)),H.clear($)}setCullFace(d){d.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(d.mode),this.frontFace.set(d.frontFace))}setDepthMode(d){d.func!==this.gl.ALWAYS||d.mask?(this.depthTest.set(!0),this.depthFunc.set(d.func),this.depthMask.set(d.mask),this.depthRange.set(d.range)):this.depthTest.set(!1)}setStencilMode(d){d.test.func!==this.gl.ALWAYS||d.mask?(this.stencilTest.set(!0),this.stencilMask.set(d.mask),this.stencilOp.set([d.fail,d.depthFail,d.pass]),this.stencilFunc.set({func:d.test.func,ref:d.ref,mask:d.test.mask})):this.stencilTest.set(!1)}setColorMode(d){i.bQ(d.blendFunction,Ja.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(d.blendFunction),this.blendColor.set(d.blendColor)),this.colorMask.set(d.mask)}createVertexArray(){var d;return Pl(this.gl)?this.gl.createVertexArray():(d=this.gl.getExtension("OES_vertex_array_object"))===null||d===void 0?void 0:d.createVertexArrayOES()}deleteVertexArray(d){var P;Pl(this.gl)?this.gl.deleteVertexArray(d):(P=this.gl.getExtension("OES_vertex_array_object"))===null||P===void 0||P.deleteVertexArrayOES(d)}unbindVAO(){this.bindVertexArray.set(null)}}let Wt;function zt(Y,d,P,N,H){var $,se;let de=Y.context,Ae=Y.transform,Fe=de.gl,Ie=Y.useProgram("collisionBox"),Ye=[],st=0,dt=0;for(let Bt of N){let St=d.getTile(Bt).getBucket(P);if(!St)continue;let Pt=H?St.textCollisionBox:St.iconCollisionBox,$t=St.collisionCircleArray;$t.length>0&&(Ye.push({circleArray:$t,circleOffset:dt,coord:Bt}),st+=$t.length/4,dt=st),Pt&&Ie.draw(de,Fe.LINES,ma.disabled,Ca.disabled,Y.colorModeForRenderPass(),Sa.disabled,Bh(Y.transform),($=Y.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData(Bt),Ae.getProjectionData({overscaledTileID:Bt,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),P.id,Pt.layoutVertexBuffer,Pt.indexBuffer,Pt.segments,null,Y.transform.zoom,null,null,Pt.collisionVertexBuffer)}if(!H||!Ye.length)return;let Pe=Y.useProgram("collisionCircle"),Xe=new i.ca;Xe.resize(4*st),Xe._trim();let at=0;for(let Bt of Ye)for(let St=0;St=0&&(Xe[xt.associatedIconIndex]={shiftedAnchor:Lr,angle:an})}else Eo(xt.numGlyphs,dt)}if(Ae){Pe.clear();let at=Y.icon.placedSymbolArray;for(let xt=0;xtY.style.map.terrain.getElevation(Rr,Ta,vu):null,ql=P.layout.get("text-rotation-alignment")==="map";Jn(an,Y,H,Ki,no,Bt,Fe,ql,Rr.toUnwrapped(),xt.width,xt.height,Ia,Us)}let Ns=H&&Xr||Na,vo=St||Ns?hr:Bt?Ki:Y.transform.clipSpaceToPixelsMatrix,_o=Yn&&P.paint.get(H?"text-halo-width":"icon-halo-width").constantOr(1)!==0,po;po=Yn?an.iconsInText?Gl(yi.kind,li,Pt,Bt,St,Ns,Y,vo,ca,Ia,jn,da,$r):Gd(yi.kind,li,Pt,Bt,St,Ns,Y,vo,ca,Ia,H,jn,_o,$r):hh(yi.kind,li,Pt,Bt,St,Ns,Y,vo,ca,Ia,H,jn,$r);let Xo={program:An,buffers:on,uniformValues:po,projectionData:Os,atlasTexture:Wn,atlasTextureIcon:ui,atlasInterpolation:si,atlasInterpolationIcon:zi,isSDF:Yn,hasHalo:_o};if($t&&an.canOverlap){Ht=!0;let no=on.segments.get();for(let Us of no)Or.push({segments:new i.aV([Us]),sortKey:Us.sortKey,state:Xo,terrainData:Vn})}else Or.push({segments:on.segments,sortKey:0,state:Xo,terrainData:Vn})}Ht&&Or.sort(((Rr,Lr)=>Rr.sortKey-Lr.sortKey));let Er=(Pe=P.paint.get(H?"text-halo-width":"icon-halo-width").constantOr(null))!==null&&Pe!==void 0?Pe:1/0,Tr=P.layout.get("text-letter-spacing").constantOr(0)*i.aJ<0||Er>1;for(let Rr of Or){let Lr=Rr.state;Xe.activeTexture.set(at.TEXTURE0),Lr.atlasTexture.bind(Lr.atlasInterpolation,at.CLAMP_TO_EDGE),Lr.atlasTextureIcon&&(Xe.activeTexture.set(at.TEXTURE1),Lr.atlasTextureIcon&&Lr.atlasTextureIcon.bind(Lr.atlasInterpolationIcon,at.CLAMP_TO_EDGE));let an=Lr.isSDF&&Lr.hasHalo;if(an){let on=Lr.uniformValues;on.u_is_halo=1,Tr&&(on.u_is_plain=0,en(Lr.buffers,Rr.segments,P,Y,Lr.program,dr,Ie,Ye,on,Lr.projectionData,Rr.terrainData),on.u_is_halo=0,on.u_is_plain=1)}en(Lr.buffers,Rr.segments,P,Y,Lr.program,dr,Ie,Ye,Lr.uniformValues,Lr.projectionData,Rr.terrainData),an&&!Tr&&(Lr.uniformValues.u_is_halo=0)}}function en(Y,d,P,N,H,$,se,de,Ae,Fe,Ie){let Ye=N.context;H.draw(Ye,Ye.gl.TRIANGLES,$,se,de,Sa.backCCW,Ae,Ie,Fe,P.id,Y.layoutVertexBuffer,Y.indexBuffer,d,P.paint,N.transform.zoom,Y.programConfigurations.get(P.id),Y.dynamicLayoutVertexBuffer,Y.opacityVertexBuffer)}function vn(Y,d,P,N,H){let $=Y.context,se=$.gl,de=Ca.disabled,Ae=new Ja([se.ONE,se.ONE],i.bo.transparent,[!0,!0,!0,!0]),Fe=d.getBucket(P);if(!Fe)return;let Ie=N.key,Ye=P.heatmapFbos.get(Ie);Ye||(Ye=Pn($,d.tileSize,d.tileSize),P.heatmapFbos.set(Ie,Ye)),$.bindFramebuffer.set(Ye.framebuffer),$.viewport.set([0,0,d.tileSize,d.tileSize]),$.clear({color:i.bo.transparent});let st=Fe.programConfigurations.get(P.id),dt=Y.useProgram("heatmap",st,!H),Pe=Y.transform.getProjectionData({overscaledTileID:d.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Xe=Y.style.map.terrain.getTerrainData(N);dt.draw($,se.TRIANGLES,ma.disabled,de,Ae,Sa.disabled,pd(d,Y.transform.zoom,P.paint.get("heatmap-intensity"),1),Xe,Pe,P.id,Fe.layoutVertexBuffer,Fe.indexBuffer,Fe.segments,P.paint,Y.transform.zoom,st)}function mn(Y,d,P,N,H){let $=Y.context,se=$.gl,de=Y.transform;$.setColorMode(Y.colorModeForRenderPass());let Ae=On($,d),Fe=P.key,Ie=d.heatmapFbos.get(Fe);if(!Ie)return;$.activeTexture.set(se.TEXTURE0),se.bindTexture(se.TEXTURE_2D,Ie.colorAttachment.get()),$.activeTexture.set(se.TEXTURE1),Ae.bind(se.LINEAR,se.CLAMP_TO_EDGE);let Ye=de.getProjectionData({overscaledTileID:P,applyTerrainMatrix:H,applyGlobeMatrix:!N});Y.useProgram("heatmapTexture").draw($,se.TRIANGLES,ma.disabled,Ca.disabled,Y.colorModeForRenderPass(),Sa.disabled,lh(Y,d,0,1),null,Ye,d.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments,d.paint,de.zoom),Ie.destroy(),d.heatmapFbos.delete(Fe)}function Pn(Y,d,P){var N,H;let $=Y.gl,se=$.createTexture();$.bindTexture($.TEXTURE_2D,se),$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_S,$.CLAMP_TO_EDGE),$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_T,$.CLAMP_TO_EDGE),$.texParameteri($.TEXTURE_2D,$.TEXTURE_MIN_FILTER,$.LINEAR),$.texParameteri($.TEXTURE_2D,$.TEXTURE_MAG_FILTER,$.LINEAR);let de=(N=Y.HALF_FLOAT)!==null&&N!==void 0?N:$.UNSIGNED_BYTE,Ae=(H=Y.RGBA16F)!==null&&H!==void 0?H:$.RGBA;$.texImage2D($.TEXTURE_2D,0,Ae,d,P,0,$.RGBA,de,null);let Fe=Y.createFramebuffer(d,P,!1,!1);return Fe.colorAttachment.set(se),Fe}function On(Y,d){return d.colorRampTexture||(d.colorRampTexture=new i.T(Y,d.colorRamp,Y.gl.RGBA)),d.colorRampTexture}function ki(Y,d,P,N,H,$,se,de){let Ae=256;if(H.stepInterpolant){let Fe=d.getSource().maxzoom,Ie=se.canonical.z===Fe?Math.ceil(1<Y.options.anisotropicFilterPitch&&dt.texParameterf(dt.TEXTURE_2D,st.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,st.extTextureFilterAnisotropicMax);let Rr=(Ie=Y.style.map.terrain)===null||Ie===void 0?void 0:Ie.getTerrainData(Ht),Lr=Xe.getProjectionData({overscaledTileID:Ht,aligned:Et,applyGlobeMatrix:!Fe,applyTerrainMatrix:!0}),an=fh(Er,$r,Tr.fadeMix,P,de),on=at.getMeshFromTileID(st,Ht.canonical,$,se,"raster");Pe.draw(st,dt.TRIANGLES,dr,H?H[Ht.overscaledZ]:Ca.disabled,xt,Ae?Sa.frontCCW:Sa.backCCW,an,Rr,Lr,P.id,on.vertexBuffer,on.indexBuffer,on.segments)}}function Js(Y,d,P,N){let H={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(P===0||N)return H;if(Y.fadingParentID){let $=d.getLoadedTile(Y.fadingParentID);if(!$)return H;let se=Math.pow(2,$.tileID.overscaledZ-Y.tileID.overscaledZ),de=[Y.tileID.canonical.x*se%1,Y.tileID.canonical.y*se%1],Ae=(function(Fe,Ie,Ye){let st=g(),dt=(st-Ie.timeAdded)/Ye,Pe=Fe.fadingDirection===We.Incoming,Xe=i.al((st-Fe.timeAdded)/Ye,0,1),at=i.al(1-dt,0,1),xt=Pe?Xe:at;return{tileOpacity:xt,parentTileOpacity:Pe?at:Xe,fadeMix:{opacity:1,mix:1-xt}}})(Y,$,P);return{parentTile:$,parentScaleBy:se,parentTopLeft:de,fadeValues:Ae}}if(Y.selfFading){let $=(function(se,de){let Ae=(g()-se.timeAdded)/de,Fe=i.al(Ae,0,1);return{tileOpacity:Fe,fadeMix:{opacity:Fe,mix:0}}})(Y,P);return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:$}}return H}let fs=new i.bo(1,0,0,1),Io=new i.bo(0,1,0,1),oi=new i.bo(0,0,1,1),ro=new i.bo(1,0,1,1),Go=new i.bo(0,1,1,1);function Qs(Y,d,P,N){cu(Y,0,d+P/2,Y.transform.width,P,N)}function zl(Y,d,P,N){cu(Y,d-P/2,0,P,Y.transform.height,N)}function cu(Y,d,P,N,H,$){let se=Y.context,de=se.gl;de.enable(de.SCISSOR_TEST),de.scissor(d*Y.pixelRatio,P*Y.pixelRatio,N*Y.pixelRatio,H*Y.pixelRatio),se.clear({color:$}),de.disable(de.SCISSOR_TEST)}function Zu(Y,d,P){var N;let H=Y.context,$=H.gl,se=Y.useProgram("debug"),de=ma.disabled,Ae=Ca.disabled,Fe=Y.colorModeForRenderPass(),Ie="$debug",Ye=(N=Y.style.map.terrain)===null||N===void 0?void 0:N.getTerrainData(P);H.activeTexture.set($.TEXTURE0);let st=d.getTileByID(P.key).latestRawTileData,dt=Math.floor(((st==null?void 0:st.byteLength)||0)/1024),Pe=d.getTile(P).tileSize,Xe=512/Math.min(Pe,512)*(P.overscaledZ/Y.transform.zoom)*.5,at=P.canonical.toString();P.overscaledZ!==P.canonical.z&&(at+=` => ${P.overscaledZ}`),(function(Et,Bt){Et.initDebugOverlayCanvas();let St=Et.debugOverlayCanvas,Pt=Et.context.gl,$t=Et.debugOverlayCanvas.getContext("2d");$t.clearRect(0,0,St.width,St.height),$t.shadowColor="white",$t.shadowBlur=2,$t.lineWidth=1.5,$t.strokeStyle="white",$t.textBaseline="top",$t.font="bold 36px Open Sans, sans-serif",$t.fillText(Bt,5,5),$t.strokeText(Bt,5,5),Et.debugOverlayTexture.update(St),Et.debugOverlayTexture.bind(Pt.LINEAR,Pt.CLAMP_TO_EDGE)})(Y,`${at} ${dt}kB`);let xt=Y.transform.getProjectionData({overscaledTileID:P,applyGlobeMatrix:!0,applyTerrainMatrix:!0});se.draw(H,$.TRIANGLES,de,Ae,Ja.alphaBlended,Sa.disabled,vd(i.bo.transparent,Xe),null,xt,Ie,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments),se.draw(H,$.LINE_STRIP,de,Ae,Fe,Sa.disabled,vd(i.bo.red),Ye,xt,Ie,Y.debugBuffer,Y.tileBorderIndexBuffer,Y.debugSegments)}function mc(Y,d,P,N){let{isRenderingGlobe:H}=N,$=Y.context,se=$.gl,de=Y.transform,Ae=Y.colorModeForRenderPass(),Fe=Y.getDepthModeFor3D(),Ie=Y.useProgram("terrain");$.bindFramebuffer.set(null),$.viewport.set([0,0,Y.width,Y.height]);for(let Ye of P){let st=d.getTerrainMesh(Ye.tileID),dt=Y.renderToTexture.getTexture(Ye),Pe=d.getTerrainData(Ye.tileID);$.activeTexture.set(se.TEXTURE0),se.bindTexture(se.TEXTURE_2D,dt.texture);let Xe=d.getMeshFrameDelta(de.zoom),at=de.calculateFogMatrix(Ye.tileID.toUnwrapped()),xt=Nd(Xe,at,Y.style.sky,de.pitch,H),Et=de.getProjectionData({overscaledTileID:Ye.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});Ie.draw($,se.TRIANGLES,Fe,Ca.disabled,Ae,Sa.backCCW,xt,Pe,Et,"terrain",st.vertexBuffer,st.indexBuffer,st.segments)}}function Yl(Y,d){if(!d.mesh){let P=new i.aU;P.emplaceBack(-1,-1),P.emplaceBack(1,-1),P.emplaceBack(1,1),P.emplaceBack(-1,1);let N=new i.aW;N.emplaceBack(0,1,2),N.emplaceBack(0,2,3),d.mesh=new ka(Y.createVertexBuffer(P,vs.members),Y.createIndexBuffer(N),i.aV.simpleSegment(0,0,P.length,N.length))}return d.mesh}let lf={symbol:function(Y,d,P,N,H,$){if(Y.renderPass!=="translucent")return;let{isRenderingToTexture:se}=$,de=Ca.disabled,Ae=Y.colorModeForRenderPass();(P._unevaluatedLayout.hasValue("text-variable-anchor")||P._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&(function(Fe,Ie,Ye,st,dt,Pe,Xe,at,xt){var Et;let Bt=Ie.transform,St=Ie.style.map.terrain,Pt=dt==="map",$t=Pe==="map";for(let Ht of Fe){let dr=st.getTile(Ht),Xr=dr.getBucket(Ye);if(!(!((Et=Xr==null?void 0:Xr.text)===null||Et===void 0)&&Et.segments.get().length))continue;let Or=i.aw(Xr.textSizeData,Bt.zoom),$r=i.aK(dr,1,Ie.transform.zoom),Er=Ut(Pt,Ie.transform,$r),Tr=Ye.layout.get("icon-text-fit")!=="none"&&Xr.hasIconData();if(Or){let Rr=Math.pow(2,Bt.zoom-dr.tileID.overscaledZ),Lr=St?(an,on)=>St.getElevation(Ht,an,on):null;cn(Xr,Pt,$t,xt,Bt,Er,Rr,Or,Tr,i.aL(Bt,dr,Xe,at),Ht.toUnwrapped(),Lr)}}})(N,Y,P,d,P.layout.get("text-rotation-alignment"),P.layout.get("text-pitch-alignment"),P.paint.get("text-translate"),P.paint.get("text-translate-anchor"),H),P.paint.get("icon-opacity").constantOr(1)!==0&&Fn(Y,d,P,N,!1,P.paint.get("icon-translate"),P.paint.get("icon-translate-anchor"),P.layout.get("icon-rotation-alignment"),P.layout.get("icon-pitch-alignment"),P.layout.get("icon-keep-upright"),de,Ae,se),P.paint.get("text-opacity").constantOr(1)!==0&&Fn(Y,d,P,N,!0,P.paint.get("text-translate"),P.paint.get("text-translate-anchor"),P.layout.get("text-rotation-alignment"),P.layout.get("text-pitch-alignment"),P.layout.get("text-keep-upright"),de,Ae,se),d.map.showCollisionBoxes&&(zt(Y,d,P,N,!0),zt(Y,d,P,N,!1))},circle:function(Y,d,P,N,H){var $;if(Y.renderPass!=="translucent")return;let{isRenderingToTexture:se}=H,de=P.paint.get("circle-opacity"),Ae=P.paint.get("circle-stroke-width"),Fe=P.paint.get("circle-stroke-opacity"),Ie=!P.layout.get("circle-sort-key").isConstant();if(de.constantOr(1)===0&&(Ae.constantOr(1)===0||Fe.constantOr(1)===0))return;let Ye=Y.context,st=Ye.gl,dt=Y.transform,Pe=Y.getDepthModeForSublayer(0,ma.ReadOnly),Xe=Ca.disabled,at=Y.colorModeForRenderPass(),xt=[],Et=dt.getCircleRadiusCorrection();for(let Bt of N){let St=d.getTile(Bt),Pt=St.getBucket(P);if(!Pt)continue;let $t=P.paint.get("circle-translate"),Ht=P.paint.get("circle-translate-anchor"),dr=i.aL(dt,St,$t,Ht),Xr=Pt.programConfigurations.get(P.id),Or=Y.useProgram("circle",Xr),$r=Pt.layoutVertexBuffer,Er=Pt.indexBuffer,Tr=($=Y.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData(Bt),Rr={programConfiguration:Xr,program:Or,layoutVertexBuffer:$r,indexBuffer:Er,uniformValues:dd(Y,St,P,dr,Et),terrainData:Tr,projectionData:dt.getProjectionData({overscaledTileID:Bt,applyGlobeMatrix:!se,applyTerrainMatrix:!0})};if(Ie){let Lr=Pt.segments.get();for(let an of Lr)xt.push({segments:new i.aV([an]),sortKey:an.sortKey,state:Rr})}else xt.push({segments:Pt.segments,sortKey:0,state:Rr})}Ie&&xt.sort(((Bt,St)=>Bt.sortKey-St.sortKey));for(let Bt of xt){let{programConfiguration:St,program:Pt,layoutVertexBuffer:$t,indexBuffer:Ht,uniformValues:dr,terrainData:Xr,projectionData:Or}=Bt.state;Pt.draw(Ye,st.TRIANGLES,Pe,Xe,at,Sa.backCCW,dr,Xr,Or,P.id,$t,Ht,Bt.segments,P.paint,Y.transform.zoom,St)}},heatmap:function(Y,d,P,N,H){if(P.paint.get("heatmap-opacity")===0)return;let $=Y.context,{isRenderingToTexture:se,isRenderingGlobe:de}=H;if(Y.style.map.terrain){for(let Ae of N){let Fe=d.getTile(Ae);d.hasRenderableParent(Ae)||(Y.renderPass==="offscreen"?vn(Y,Fe,P,Ae,de):Y.renderPass==="translucent"&&mn(Y,P,Ae,se,de))}$.viewport.set([0,0,Y.width,Y.height])}else Y.renderPass==="offscreen"?(function(Ae,Fe,Ie,Ye){let st=Ae.context,dt=st.gl,Pe=Ae.transform,Xe=Ca.disabled,at=new Ja([dt.ONE,dt.ONE],i.bo.transparent,[!0,!0,!0,!0]);(function(xt,Et,Bt){let St=xt.gl;xt.activeTexture.set(St.TEXTURE1),xt.viewport.set([0,0,Et.width/4,Et.height/4]);let Pt=Bt.heatmapFbos.get(i.cd);Pt?(St.bindTexture(St.TEXTURE_2D,Pt.colorAttachment.get()),xt.bindFramebuffer.set(Pt.framebuffer)):(Pt=Pn(xt,Et.width/4,Et.height/4),Bt.heatmapFbos.set(i.cd,Pt))})(st,Ae,Ie),st.clear({color:i.bo.transparent});for(let xt of Ye){if(Fe.hasRenderableParent(xt))continue;let Et=Fe.getTile(xt),Bt=Et.getBucket(Ie);if(!Bt)continue;let St=Bt.programConfigurations.get(Ie.id),Pt=Ae.useProgram("heatmap",St),$t=Pe.getProjectionData({overscaledTileID:xt,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Ht=Pe.getCircleRadiusCorrection();Pt.draw(st,dt.TRIANGLES,ma.disabled,Xe,at,Sa.backCCW,pd(Et,Pe.zoom,Ie.paint.get("heatmap-intensity"),Ht),null,$t,Ie.id,Bt.layoutVertexBuffer,Bt.indexBuffer,Bt.segments,Ie.paint,Pe.zoom,St)}st.viewport.set([0,0,Ae.width,Ae.height])})(Y,d,P,N):Y.renderPass==="translucent"&&(function(Ae,Fe){let Ie=Ae.context,Ye=Ie.gl;Ie.setColorMode(Ae.colorModeForRenderPass());let st=Fe.heatmapFbos.get(i.cd);st&&(Ie.activeTexture.set(Ye.TEXTURE0),Ye.bindTexture(Ye.TEXTURE_2D,st.colorAttachment.get()),Ie.activeTexture.set(Ye.TEXTURE1),On(Ie,Fe).bind(Ye.LINEAR,Ye.CLAMP_TO_EDGE),Ae.useProgram("heatmapTexture").draw(Ie,Ye.TRIANGLES,ma.disabled,Ca.disabled,Ae.colorModeForRenderPass(),Sa.disabled,lh(Ae,Fe,0,1),null,null,Fe.id,Ae.viewportBuffer,Ae.quadTriangleIndexBuffer,Ae.viewportSegments,Fe.paint,Ae.transform.zoom))})(Y,P)},line:function(Y,d,P,N,H){var $;if(Y.renderPass!=="translucent")return;let{isRenderingToTexture:se}=H,de=P.paint.get("line-opacity"),Ae=P.paint.get("line-width");if(de.constantOr(1)===0||Ae.constantOr(1)===0)return;let Fe=Y.getDepthModeForSublayer(0,ma.ReadOnly),Ie=Y.colorModeForRenderPass(),Ye=P.paint.get("line-dasharray"),st=Ye.constantOr(1),dt=P.paint.get("line-pattern"),Pe=dt.constantOr(1),Xe=P.paint.get("line-gradient"),at=P.getCrossfadeParameters(),xt;xt=Pe?"linePattern":st&&Xe?"lineGradientSDF":st?"lineSDF":Xe?"lineGradient":"line";let Et=Y.context,Bt=Et.gl,St=Y.transform,Pt=!0;for(let $t of N){let Ht=d.getTile($t);if(Pe&&!Ht.patternsLoaded())continue;let dr=Ht.getBucket(P);if(!dr)continue;let Xr=dr.programConfigurations.get(P.id),Or=Y.context.program.get(),$r=Y.useProgram(xt,Xr),Er=Pt||$r.program!==Or,Tr=($=Y.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData($t),Rr=dt.constantOr(null),Lr=Ye==null?void 0:Ye.constantOr(null);if(Rr&&Ht.imageAtlas){let yi=Ht.imageAtlas,Sn=yi.patternPositions[Rr.to.toString()],An=yi.patternPositions[Rr.from.toString()];Sn&&An&&Xr.setConstantPatternPositions(Sn,An)}else if(Lr){let yi=P.layout.get("line-cap").constantOr(null)==="round",Sn=Y.lineAtlas.getDash(Lr.to,yi),An=Y.lineAtlas.getDash(Lr.from,yi);Xr.setConstantDashPositions(Sn,An)}let an=St.getProjectionData({overscaledTileID:$t,applyGlobeMatrix:!se,applyTerrainMatrix:!0}),on=St.getPixelScale(),Nn;Pe?(Nn=Lc(Y,Ht,P,on,at),Ci(Et,Bt,Ht,Xr,at)):st&&Xe?(Nn=yd(Y,Ht,P,on,at,dr.lineClipsArray.length),Un(Y,d,Et,Bt,P,dr,$t,Xr,at)):st?(Nn=md(Y,Ht,P,on,at),qi(Y,Et,Bt,Xr,Er,at)):Xe?(Nn=ch(Y,Ht,P,on,dr.lineClipsArray.length),pi(Y,d,Et,Bt,P,dr,$t)):Nn=Rl(Y,Ht,P,on);let Yn=Y.stencilModeForClipping($t);$r.draw(Et,Bt.TRIANGLES,Fe,Yn,Ie,Sa.disabled,Nn,Tr,an,P.id,dr.layoutVertexBuffer,dr.indexBuffer,dr.segments,P.paint,Y.transform.zoom,Xr,dr.layoutVertexBuffer2),Pt=!1}},fill:function(Y,d,P,N,H){let $=P.paint.get("fill-color"),se=P.paint.get("fill-opacity");if(se.constantOr(1)===0)return;let{isRenderingToTexture:de}=H,Ae=Y.colorModeForRenderPass(),Fe=P.paint.get("fill-pattern"),Ie=Y.opaquePassEnabledForLayer()&&!Fe.constantOr(1)&&$.constantOr(i.bo.transparent).a===1&&se.constantOr(0)===1?"opaque":"translucent";if(Y.renderPass===Ie){let Ye=Y.getDepthModeForSublayer(1,Y.renderPass==="opaque"?ma.ReadWrite:ma.ReadOnly);Zi(Y,d,P,N,Ye,Ae,!1,de)}if(Y.renderPass==="translucent"&&P.paint.get("fill-antialias")){let Ye=Y.getDepthModeForSublayer(P.getPaintProperty("fill-outline-color")?2:0,ma.ReadOnly);Zi(Y,d,P,N,Ye,Ae,!0,de)}},fillExtrusion:function(Y,d,P,N,H){let $=P.paint.get("fill-extrusion-opacity");if($===0)return;let{isRenderingToTexture:se}=H;if(Y.renderPass==="translucent"){let de=new ma(Y.context.gl.LEQUAL,ma.ReadWrite,Y.depthRangeFor3D);if($!==1||P.paint.get("fill-extrusion-pattern").constantOr(1))na(Y,d,P,N,de,Ca.disabled,Ja.disabled,se),na(Y,d,P,N,de,Y.stencilModeFor3D(),Y.colorModeForRenderPass(),se);else{let Ae=Y.colorModeForRenderPass();na(Y,d,P,N,de,Ca.disabled,Ae,se)}}},hillshade:function(Y,d,P,N,H){if(Y.renderPass!=="offscreen"&&Y.renderPass!=="translucent")return;let{isRenderingToTexture:$}=H,se=Y.context,de=Y.style.projection.useSubdivision,Ae=Y.getDepthModeForSublayer(0,ma.ReadOnly),Fe=Y.colorModeForRenderPass();if(Y.renderPass==="offscreen")(function(Ie,Ye,st,dt,Pe,Xe,at){let xt=Ie.context,Et=xt.gl,Bt=dt.paint.get("resampling")==="nearest"?Et.NEAREST:Et.LINEAR;for(let St of st){let Pt=Ye.getTile(St),$t=Pt.dem;if(!($t!=null&&$t.data)||!Pt.needsHillshadePrepare)continue;let Ht=$t.dim,dr=$t.stride,Xr=$t.getPixels();if(xt.activeTexture.set(Et.TEXTURE1),xt.pixelStoreUnpackPremultiplyAlpha.set(!1),Pt.demTexture||(Pt.demTexture=Ie.getTileTexture(dr)),Pt.demTexture){let $r=Pt.demTexture;$r.update(Xr,{premultiply:!1}),$r.bind(Et.NEAREST,Et.CLAMP_TO_EDGE)}else Pt.demTexture=new i.T(xt,Xr,Et.RGBA,{premultiply:!1}),Pt.demTexture.bind(Et.NEAREST,Et.CLAMP_TO_EDGE);xt.activeTexture.set(Et.TEXTURE0);let Or=Pt.fbo;if(!Or){let $r=new i.T(xt,{width:Ht,height:Ht,data:null},Et.RGBA);$r.bind(Bt,Et.CLAMP_TO_EDGE),Or=Pt.fbo=xt.createFramebuffer(Ht,Ht,!0,!1),Or.colorAttachment.set($r.texture)}xt.bindFramebuffer.set(Or.framebuffer),xt.viewport.set([0,0,Ht,Ht]),Ie.useProgram("hillshadePrepare").draw(xt,Et.TRIANGLES,Pe,Xe,at,Sa.disabled,uh(Pt.tileID,$t),null,null,dt.id,Ie.rasterBoundsBuffer,Ie.quadTriangleIndexBuffer,Ie.rasterBoundsSegments),Pt.needsHillshadePrepare=!1}})(Y,d,N,P,Ae,Ca.disabled,Fe),se.viewport.set([0,0,Y.width,Y.height]);else if(Y.renderPass==="translucent")if(de){let[Ie,Ye,st]=Y.stencilConfigForOverlapTwoPass(N);Ha(Y,d,P,st,Ie,Ae,Fe,!1,$),Ha(Y,d,P,st,Ye,Ae,Fe,!0,$)}else{let[Ie,Ye]=Y.getStencilConfigForOverlapAndUpdateStencilID(N);Ha(Y,d,P,Ye,Ie,Ae,Fe,!1,$)}},colorRelief:function(Y,d,P,N,H){if(Y.renderPass!=="translucent"||!N.length)return;let{isRenderingToTexture:$}=H,se=Y.style.projection.useSubdivision,de=Y.getDepthModeForSublayer(0,ma.ReadOnly),Ae=Y.colorModeForRenderPass();if(se){let[Fe,Ie,Ye]=Y.stencilConfigForOverlapTwoPass(N);Ya(Y,d,P,Ye,Fe,de,Ae,!1,$),Ya(Y,d,P,Ye,Ie,de,Ae,!0,$)}else{let[Fe,Ie]=Y.getStencilConfigForOverlapAndUpdateStencilID(N);Ya(Y,d,P,Ie,Fe,de,Ae,!1,$)}},raster:function(Y,d,P,N,H){if(Y.renderPass!=="translucent"||P.paint.get("raster-opacity")===0||!N.length)return;let{isRenderingToTexture:$}=H,se=d.getSource(),de=Y.style.projection.useSubdivision;if(se instanceof qe)Pa(Y,d,P,N,null,!1,!1,se.tileCoords,se.flippedWindingOrder,$);else if(de){let[Ae,Fe,Ie]=Y.stencilConfigForOverlapTwoPass(N);Pa(Y,d,P,Ie,Ae,!1,!0,ho,!1,$),Pa(Y,d,P,Ie,Fe,!0,!0,ho,!1,$)}else{let[Ae,Fe]=Y.getStencilConfigForOverlapAndUpdateStencilID(N);Pa(Y,d,P,Fe,Ae,!1,!0,ho,!1,$)}},background:function(Y,d,P,N,H){var $;let se=P.paint.get("background-color"),de=P.paint.get("background-opacity");if(de===0)return;let{isRenderingToTexture:Ae}=H,Fe=Y.context,Ie=Fe.gl,Ye=Y.style.projection,st=Y.transform,dt=st.tileSize,Pe=P.paint.get("background-pattern");if(Y.isPatternMissing(Pe))return;let Xe=!Pe&&se.a===1&&de===1&&Y.opaquePassEnabledForLayer()?"opaque":"translucent";if(Y.renderPass!==Xe)return;let at=Ca.disabled,xt=Y.getDepthModeForSublayer(0,Xe==="opaque"?ma.ReadWrite:ma.ReadOnly),Et=Y.colorModeForRenderPass(),Bt=Y.useProgram(Pe?"backgroundPattern":"background"),St=N||ft(st,{tileSize:dt,terrain:Y.style.map.terrain});Pe&&(Fe.activeTexture.set(Ie.TEXTURE0),Y.imageManager.bind(Y.context));let Pt=P.getCrossfadeParameters();for(let $t of St){let Ht=st.getProjectionData({overscaledTileID:$t,applyGlobeMatrix:!Ae,applyTerrainMatrix:!0}),dr=Pe?xd(de,Y,Pe,{tileID:$t,tileSize:dt},Pt):wl(de,se),Xr=($=Y.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData($t),Or=Ye.getMeshFromTileID(Fe,$t.canonical,!1,!0,"raster");Bt.draw(Fe,Ie.TRIANGLES,xt,at,Et,Sa.backCCW,dr,Xr,Ht,P.id,Or.vertexBuffer,Or.indexBuffer,Or.segments)}},sky:function(Y,d){let P=Y.context,N=P.gl,H=((Ie,Ye,st)=>{let dt=Math.cos(Ye.rollInRadians),Pe=Math.sin(Ye.rollInRadians),Xe=or(Ye),at=Ye.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:Ie.properties.get("sky-color"),u_horizon_color:Ie.properties.get("horizon-color"),u_horizon:[(Ye.width/2-Xe*Pe)*st,(Ye.height/2+Xe*dt)*st],u_horizon_normal:[-Pe,dt],u_sky_horizon_blend:Ie.properties.get("sky-horizon-blend")*Ye.height/2*st,u_sky_blend:at}})(d,Y.style.map.transform,Y.pixelRatio),$=new ma(N.LEQUAL,ma.ReadWrite,[0,1]),se=Ca.disabled,de=Y.colorModeForRenderPass(),Ae=Y.useProgram("sky"),Fe=Yl(P,d);Ae.draw(P,N.TRIANGLES,$,se,de,Sa.disabled,H,null,void 0,"sky",Fe.vertexBuffer,Fe.indexBuffer,Fe.segments)},atmosphere:function(Y,d,P){let N=Y.context,H=N.gl,$=Y.useProgram("atmosphere"),se=new ma(H.LEQUAL,ma.ReadOnly,[0,1]),de=Y.transform,Ae=(function(at,xt){let Et=at.properties.get("position"),Bt=[-Et.x,-Et.y,-Et.z],St=i.ap(new Float64Array(16));return at.properties.get("anchor")==="map"&&(i.be(St,St,xt.rollInRadians),i.bf(St,St,-xt.pitchInRadians),i.be(St,St,xt.bearingInRadians),i.bf(St,St,xt.center.lat*Math.PI/180),i.bI(St,St,-xt.center.lng*Math.PI/180)),i.cg(Bt,Bt,St),Bt})(P,Y.transform),Fe=de.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Ie=d.properties.get("atmosphere-blend")*Fe.projectionTransition;if(Ie===0)return;let Ye=Ks(de.worldSize,de.center.lat),st=de.inverseProjectionMatrix,dt=new Float64Array(4);dt[3]=1,i.aE(dt,dt,de.modelViewProjectionMatrix),dt[0]/=dt[3],dt[1]/=dt[3],dt[2]/=dt[3],dt[3]=1,i.aE(dt,dt,st),dt[0]/=dt[3],dt[1]/=dt[3],dt[2]/=dt[3],dt[3]=1;let Pe=((at,xt,Et,Bt,St)=>({u_sun_pos:at,u_atmosphere_blend:xt,u_globe_position:Et,u_globe_radius:Bt,u_inv_proj_matrix:St}))(Ae,Ie,[dt[0],dt[1],dt[2]],Ye,st),Xe=Yl(N,d);$.draw(N,H.TRIANGLES,se,Ca.disabled,Ja.alphaBlended,Sa.disabled,Pe,null,null,"atmosphere",Xe.vertexBuffer,Xe.indexBuffer,Xe.segments)},custom:function(Y,d,P,N){let{isRenderingGlobe:H}=N,$=Y.context,se=P.implementation,de=Y.style.projection,Ae=Y.transform,Fe=Ae.getProjectionDataForCustomLayer(H),Ie={farZ:Ae.farZ,nearZ:Ae.nearZ,fov:Ae.fov*Math.PI/180,modelViewProjectionMatrix:Ae.modelViewProjectionMatrix,projectionMatrix:Ae.projectionMatrix,shaderData:{variantName:de.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; +`);Pl(Ie)||(Pt=(function(Or){return Or.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")})(Pt),$t=(function(Or){return Or.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")})($t));let Ht=Ie.createShader(Ie.FRAGMENT_SHADER);if(Ie.isContextLost())return void(this.failedToCreate=!0);if(Ie.shaderSource(Ht,Pt),Ie.compileShader(Ht),!Ie.getShaderParameter(Ht,Ie.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${Ie.getShaderInfoLog(Ht)}`);Ie.attachShader(this.program,Ht);let dr=Ie.createShader(Ie.VERTEX_SHADER);if(Ie.isContextLost())return void(this.failedToCreate=!0);if(Ie.shaderSource(dr,$t),Ie.compileShader(dr),!Ie.getShaderParameter(dr,Ie.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${Ie.getShaderInfoLog(dr)}`);Ie.attachShader(this.program,dr),this.attributes={};let Xr={};this.numAttributes=ht.length;for(let Or=0;Or({u_depth:new i.b_(Or,$r.u_depth),u_terrain:new i.b_(Or,$r.u_terrain),u_terrain_dim:new i.bp(Or,$r.u_terrain_dim),u_terrain_matrix:new i.c0(Or,$r.u_terrain_matrix),u_terrain_unpack:new i.c1(Or,$r.u_terrain_unpack),u_terrain_exaggeration:new i.bp(Or,$r.u_terrain_exaggeration)}))(d,Xr),this.projectionUniforms=((Or,$r)=>({u_projection_matrix:new i.c0(Or,$r.u_projection_matrix),u_projection_tile_mercator_coords:new i.c1(Or,$r.u_projection_tile_mercator_coords),u_projection_clipping_plane:new i.c1(Or,$r.u_projection_clipping_plane),u_projection_transition:new i.bp(Or,$r.u_projection_transition),u_projection_fallback_matrix:new i.c0(Or,$r.u_projection_fallback_matrix)}))(d,Xr),this.binderUniforms=N?N.getUniforms(d,Xr):[]}draw(d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st,ht,Pe,Xe,at,xt,Et,Bt){var St;let Pt=d.gl;if(this.failedToCreate)return;if(d.program.set(this.program),d.setDepthMode(N),d.setStencilMode(H),d.setColorMode($),d.setCullFace(se),Ae){d.activeTexture.set(Pt.TEXTURE2),Pt.bindTexture(Pt.TEXTURE_2D,Ae.depthTexture),d.activeTexture.set(Pt.TEXTURE3),Pt.bindTexture(Pt.TEXTURE_2D,Ae.texture);for(let Ht in this.terrainUniforms)this.terrainUniforms[Ht].set(Ae[Ht])}if(Fe)for(let Ht in Fe)this.projectionUniforms[Cf[Ht]].set(Fe[Ht]);if(de)for(let Ht in this.fixedUniforms)this.fixedUniforms[Ht].set(de[Ht]);at&&at.setUniforms(d,this.binderUniforms,Pe,{zoom:Xe});let $t=0;switch(P){case Pt.LINES:$t=2;break;case Pt.TRIANGLES:$t=3;break;case Pt.LINE_STRIP:$t=1}for(let Ht of ht.get())Ht.vaos||(Ht.vaos={}),(St=Ht.vaos)[Ie]||(St[Ie]=new X0),Ht.vaos[Ie].bind(d,this,Ye,at?at.getPaintVertexBuffers():[],st,Ht.vertexOffset,xt,Et,Bt),Pt.drawElements(P,Ht.primitiveLength*$t,Pt.UNSIGNED_SHORT,Ht.primitiveOffset*$t*2)}}function zh(Y,d,P){let N=1/i.aK(P,1,d.transform.tileZoom),H=Math.pow(2,P.tileID.overscaledZ),$=P.tileSize*Math.pow(2,d.transform.tileZoom)/H,se=$*(P.tileID.canonical.x+P.tileID.wrap*H),de=$*P.tileID.canonical.y;return{u_image:0,u_texsize:P.imageAtlasTexture.size,u_scale:[N,Y.fromScale,Y.toScale],u_fade:Y.t,u_pixel_coord_upper:[se>>16,de>>16],u_pixel_coord_lower:[65535&se,65535&de]}}let tf=(Y,d,P,N)=>{let H=Y.style.light,$=H.properties.get("position"),se=[$.x,$.y,$.z],de=i.c4();H.properties.get("anchor")==="viewport"&&i.c5(de,Y.transform.bearingInRadians),i.c6(se,se,de);let Ae=Y.transform.transformLightDirection(se),Fe=H.properties.get("color");return{u_lightpos:se,u_lightpos_globe:Ae,u_lightintensity:H.properties.get("intensity"),u_lightcolor:[Fe.r,Fe.g,Fe.b],u_vertical_gradient:+d,u_opacity:P,u_fill_translate:N}},Vd=(Y,d,P,N,H,$,se)=>i.e(tf(Y,d,P,N),zh($,Y,se),{u_height_factor:-Math.pow(2,H.overscaledZ)/se.tileSize/8}),rf=(Y,d,P,N)=>i.e(zh(d,Y,P),{u_fill_translate:N}),qh=(Y,d)=>({u_world:Y,u_fill_translate:d}),vc=(Y,d,P,N,H)=>i.e(rf(Y,d,P,H),{u_world:N}),dd=(Y,d,P,N,H)=>{let $=Y.transform,se,de,Ae=0;if(P.paint.get("circle-pitch-alignment")==="map"){let Fe=i.aK(d,1,$.zoom);se=!0,de=[Fe,Fe],Ae=Fe/(i.a6*Math.pow(2,d.tileID.overscaledZ))*2*Math.PI*H}else se=!1,de=$.pixelsToGLUnits;return{u_camera_to_center_distance:$.cameraToCenterDistance,u_scale_with_map:+(P.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+se,u_device_pixel_ratio:Y.pixelRatio,u_extrude_scale:de,u_globe_extrude_scale:Ae,u_translate:N}},Bh=Y=>({u_pixel_extrude_scale:[1/Y.width,1/Y.height]}),Wu=Y=>({u_viewport_size:[Y.width,Y.height]}),vd=(Y,d=1)=>({u_color:Y,u_overlay:0,u_overlay_scale:d}),pd=(Y,d,P,N)=>{let H=i.aK(Y,1,d)/(i.a6*Math.pow(2,Y.tileID.overscaledZ))*2*Math.PI*N;return{u_extrude_scale:i.aK(Y,1,d),u_intensity:P,u_globe_extrude_scale:H}},lh=(Y,d,P,N)=>{let H=i.O();i.c7(H,0,Y.width,Y.height,0,0,1);let $=Y.context.gl;return{u_matrix:H,u_world:[$.drawingBufferWidth,$.drawingBufferHeight],u_image:P,u_color_ramp:N,u_opacity:d.paint.get("heatmap-opacity")}},nf=(Y,d,P)=>{let N=P.paint.get("hillshade-accent-color"),H;switch(P.paint.get("hillshade-method")){case"basic":H=4;break;case"combined":H=1;break;case"igor":H=2;break;case"multidirectional":H=3;break;default:H=0}let $=P.getIlluminationProperties();for(let se=0;se<$.directionRadians.length;se++)P.paint.get("hillshade-illumination-anchor")==="viewport"&&($.directionRadians[se]+=Y.transform.bearingInRadians);return{u_image:0,u_latrange:af(0,d.tileID),u_exaggeration:P.paint.get("hillshade-exaggeration"),u_altitudes:$.altitudeRadians,u_azimuths:$.directionRadians,u_accent:N,u_method:H,u_highlights:$.highlightColor,u_shadows:$.shadowColor}},uh=(Y,d)=>{let P=d.stride,N=i.O();return i.c7(N,0,i.a6,-i.a6,0,0,1),i.Q(N,N,[0,-i.a6,0]),{u_matrix:N,u_image:1,u_dimension:[P,P],u_zoom:Y.overscaledZ,u_unpack:d.getUnpackVector()}};function af(Y,d){let P=Math.pow(2,d.canonical.z),N=d.canonical.y;return[new i.a7(0,N/P).toLngLat().lat,new i.a7(0,(N+1)/P).toLngLat().lat]}let gd=(Y,d,P=0)=>({u_image:0,u_unpack:d.getUnpackVector(),u_dimension:[d.stride,d.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:P,u_opacity:Y.paint.get("color-relief-opacity")}),Rl=(Y,d,P,N)=>{let H=Y.transform;return{u_translation:wu(Y,d,P),u_ratio:N/i.aK(d,1,H.zoom),u_device_pixel_ratio:Y.pixelRatio,u_units_to_pixels:[1/H.pixelsToGLUnits[0],1/H.pixelsToGLUnits[1]]}},ch=(Y,d,P,N,H)=>i.e(Rl(Y,d,P,N),{u_image:0,u_image_height:H}),Lc=(Y,d,P,N,H)=>{let $=Y.transform,se=Lf(d,$);return{u_translation:wu(Y,d,P),u_texsize:d.imageAtlasTexture.size,u_ratio:N/i.aK(d,1,$.zoom),u_device_pixel_ratio:Y.pixelRatio,u_image:0,u_scale:[se,H.fromScale,H.toScale],u_fade:H.t,u_units_to_pixels:[1/$.pixelsToGLUnits[0],1/$.pixelsToGLUnits[1]]}},md=(Y,d,P,N,H)=>{let $=Lf(d,Y.transform);return i.e(Rl(Y,d,P,N),{u_tileratio:$,u_crossfade_from:H.fromScale,u_crossfade_to:H.toScale,u_image:0,u_mix:H.t,u_lineatlas_width:Y.lineAtlas.width,u_lineatlas_height:Y.lineAtlas.height})},yd=(Y,d,P,N,H,$)=>{let se=Lf(d,Y.transform);return i.e(Rl(Y,d,P,N),{u_image:0,u_image_height:$,u_tileratio:se,u_crossfade_from:H.fromScale,u_crossfade_to:H.toScale,u_image_dash:1,u_mix:H.t,u_lineatlas_width:Y.lineAtlas.width,u_lineatlas_height:Y.lineAtlas.height})};function Lf(Y,d){return 1/i.aK(Y,1,d.tileZoom)}function wu(Y,d,P){return i.aL(Y.transform,d,P.paint.get("line-translate"),P.paint.get("line-translate-anchor"))}let fh=(Y,d,P,N,H)=>{return{u_tl_parent:Y,u_scale_parent:d,u_buffer_scale:1,u_fade_t:P.mix,u_opacity:P.opacity*N.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:N.paint.get("raster-brightness-min"),u_brightness_high:N.paint.get("raster-brightness-max"),u_saturation_factor:(se=N.paint.get("raster-saturation"),se>0?1-1/(1.001-se):-se),u_contrast_factor:($=N.paint.get("raster-contrast"),$>0?1/(1-$):1+$),u_spin_weights:Oh(N.paint.get("raster-hue-rotate")),u_coords_top:[H[0].x,H[0].y,H[1].x,H[1].y],u_coords_bottom:[H[3].x,H[3].y,H[2].x,H[2].y]};var $,se};function Oh(Y){Y*=Math.PI/180;let d=Math.sin(Y),P=Math.cos(Y);return[(2*P+1)/3,(-Math.sqrt(3)*d-P+1)/3,(Math.sqrt(3)*d-P+1)/3]}let hh=(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st)=>{let ht=se.transform;return{u_is_size_zoom_constant:+(Y==="constant"||Y==="source"),u_is_size_feature_constant:+(Y==="constant"||Y==="camera"),u_size_t:d?d.uSizeT:0,u_size:d?d.uSize:0,u_camera_to_center_distance:ht.cameraToCenterDistance,u_pitch:ht.pitch/360*2*Math.PI,u_rotate_symbol:+P,u_aspect_ratio:ht.width/ht.height,u_fade_change:se.options.fadeDuration?se.symbolFadeChange:1,u_label_plane_matrix:de,u_coord_matrix:Ae,u_is_text:+Ie,u_pitch_with_map:+N,u_is_along_line:H,u_is_variable_anchor:$,u_texsize:Ye,u_texture:0,u_translation:Fe,u_pitched_scale:st}},Gd=(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st,ht)=>{let Pe=se.transform;return i.e(hh(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,ht),{u_gamma_scale:N?Math.cos(Pe.pitch*Math.PI/180)*Pe.cameraToCenterDistance:1,u_device_pixel_ratio:se.pixelRatio,u_is_halo:st?1:0,u_is_plain:1})},Gl=(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st)=>i.e(Gd(Y,d,P,N,H,$,se,de,Ae,Fe,!0,Ie,!0,st),{u_texsize_icon:Ye,u_texture_icon:1}),wl=(Y,d)=>({u_opacity:Y,u_color:d}),xd=(Y,d,P,N,H)=>i.e((function($,se,de,Ae){let Fe=de.imageManager.getPattern($.from.toString()),Ie=de.imageManager.getPattern($.to.toString()),{width:Ye,height:st}=de.imageManager.getPixelSize(),ht=Math.pow(2,Ae.tileID.overscaledZ),Pe=Ae.tileSize*Math.pow(2,de.transform.tileZoom)/ht,Xe=Pe*(Ae.tileID.canonical.x+Ae.tileID.wrap*ht),at=Pe*Ae.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Fe.tl,u_pattern_br_a:Fe.br,u_pattern_tl_b:Ie.tl,u_pattern_br_b:Ie.br,u_texsize:[Ye,st],u_mix:se.t,u_pattern_size_a:Fe.displaySize,u_pattern_size_b:Ie.displaySize,u_scale_a:se.fromScale,u_scale_b:se.toScale,u_tile_units_to_pixels:1/i.aK(Ae,1,de.transform.tileZoom),u_pixel_coord_upper:[Xe>>16,at>>16],u_pixel_coord_lower:[65535&Xe,65535&at]}})(P,H,d,N),{u_opacity:Y}),Hl=(Y,d)=>{},_d={fillExtrusion:(Y,d)=>({u_lightpos:new i.c2(Y,d.u_lightpos),u_lightpos_globe:new i.c2(Y,d.u_lightpos_globe),u_lightintensity:new i.bp(Y,d.u_lightintensity),u_lightcolor:new i.c2(Y,d.u_lightcolor),u_vertical_gradient:new i.bp(Y,d.u_vertical_gradient),u_opacity:new i.bp(Y,d.u_opacity),u_fill_translate:new i.c3(Y,d.u_fill_translate)}),fillExtrusionPattern:(Y,d)=>({u_lightpos:new i.c2(Y,d.u_lightpos),u_lightpos_globe:new i.c2(Y,d.u_lightpos_globe),u_lightintensity:new i.bp(Y,d.u_lightintensity),u_lightcolor:new i.c2(Y,d.u_lightcolor),u_vertical_gradient:new i.bp(Y,d.u_vertical_gradient),u_height_factor:new i.bp(Y,d.u_height_factor),u_opacity:new i.bp(Y,d.u_opacity),u_fill_translate:new i.c3(Y,d.u_fill_translate),u_image:new i.b_(Y,d.u_image),u_texsize:new i.c3(Y,d.u_texsize),u_pixel_coord_upper:new i.c3(Y,d.u_pixel_coord_upper),u_pixel_coord_lower:new i.c3(Y,d.u_pixel_coord_lower),u_scale:new i.c2(Y,d.u_scale),u_fade:new i.bp(Y,d.u_fade)}),fill:(Y,d)=>({u_fill_translate:new i.c3(Y,d.u_fill_translate)}),fillPattern:(Y,d)=>({u_image:new i.b_(Y,d.u_image),u_texsize:new i.c3(Y,d.u_texsize),u_pixel_coord_upper:new i.c3(Y,d.u_pixel_coord_upper),u_pixel_coord_lower:new i.c3(Y,d.u_pixel_coord_lower),u_scale:new i.c2(Y,d.u_scale),u_fade:new i.bp(Y,d.u_fade),u_fill_translate:new i.c3(Y,d.u_fill_translate)}),fillOutline:(Y,d)=>({u_world:new i.c3(Y,d.u_world),u_fill_translate:new i.c3(Y,d.u_fill_translate)}),fillOutlinePattern:(Y,d)=>({u_world:new i.c3(Y,d.u_world),u_image:new i.b_(Y,d.u_image),u_texsize:new i.c3(Y,d.u_texsize),u_pixel_coord_upper:new i.c3(Y,d.u_pixel_coord_upper),u_pixel_coord_lower:new i.c3(Y,d.u_pixel_coord_lower),u_scale:new i.c2(Y,d.u_scale),u_fade:new i.bp(Y,d.u_fade),u_fill_translate:new i.c3(Y,d.u_fill_translate)}),circle:(Y,d)=>({u_camera_to_center_distance:new i.bp(Y,d.u_camera_to_center_distance),u_scale_with_map:new i.b_(Y,d.u_scale_with_map),u_pitch_with_map:new i.b_(Y,d.u_pitch_with_map),u_extrude_scale:new i.c3(Y,d.u_extrude_scale),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_globe_extrude_scale:new i.bp(Y,d.u_globe_extrude_scale),u_translate:new i.c3(Y,d.u_translate)}),collisionBox:(Y,d)=>({u_pixel_extrude_scale:new i.c3(Y,d.u_pixel_extrude_scale)}),collisionCircle:(Y,d)=>({u_viewport_size:new i.c3(Y,d.u_viewport_size)}),debug:(Y,d)=>({u_color:new i.b$(Y,d.u_color),u_overlay:new i.b_(Y,d.u_overlay),u_overlay_scale:new i.bp(Y,d.u_overlay_scale)}),depth:Hl,clippingMask:Hl,heatmap:(Y,d)=>({u_extrude_scale:new i.bp(Y,d.u_extrude_scale),u_intensity:new i.bp(Y,d.u_intensity),u_globe_extrude_scale:new i.bp(Y,d.u_globe_extrude_scale)}),heatmapTexture:(Y,d)=>({u_matrix:new i.c0(Y,d.u_matrix),u_world:new i.c3(Y,d.u_world),u_image:new i.b_(Y,d.u_image),u_color_ramp:new i.b_(Y,d.u_color_ramp),u_opacity:new i.bp(Y,d.u_opacity)}),hillshade:(Y,d)=>({u_image:new i.b_(Y,d.u_image),u_latrange:new i.c3(Y,d.u_latrange),u_exaggeration:new i.bp(Y,d.u_exaggeration),u_altitudes:new i.c9(Y,d.u_altitudes),u_azimuths:new i.c9(Y,d.u_azimuths),u_accent:new i.b$(Y,d.u_accent),u_method:new i.b_(Y,d.u_method),u_shadows:new i.c8(Y,d.u_shadows),u_highlights:new i.c8(Y,d.u_highlights)}),hillshadePrepare:(Y,d)=>({u_matrix:new i.c0(Y,d.u_matrix),u_image:new i.b_(Y,d.u_image),u_dimension:new i.c3(Y,d.u_dimension),u_zoom:new i.bp(Y,d.u_zoom),u_unpack:new i.c1(Y,d.u_unpack)}),colorRelief:(Y,d)=>({u_image:new i.b_(Y,d.u_image),u_unpack:new i.c1(Y,d.u_unpack),u_dimension:new i.c3(Y,d.u_dimension),u_elevation_stops:new i.b_(Y,d.u_elevation_stops),u_color_stops:new i.b_(Y,d.u_color_stops),u_color_ramp_size:new i.b_(Y,d.u_color_ramp_size),u_opacity:new i.bp(Y,d.u_opacity)}),line:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels)}),lineGradient:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels),u_image:new i.b_(Y,d.u_image),u_image_height:new i.bp(Y,d.u_image_height)}),linePattern:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_texsize:new i.c3(Y,d.u_texsize),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_image:new i.b_(Y,d.u_image),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels),u_scale:new i.c2(Y,d.u_scale),u_fade:new i.bp(Y,d.u_fade)}),lineSDF:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels),u_image:new i.b_(Y,d.u_image),u_mix:new i.bp(Y,d.u_mix),u_tileratio:new i.bp(Y,d.u_tileratio),u_crossfade_from:new i.bp(Y,d.u_crossfade_from),u_crossfade_to:new i.bp(Y,d.u_crossfade_to),u_lineatlas_width:new i.bp(Y,d.u_lineatlas_width),u_lineatlas_height:new i.bp(Y,d.u_lineatlas_height)}),lineGradientSDF:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels),u_image:new i.b_(Y,d.u_image),u_image_height:new i.bp(Y,d.u_image_height),u_tileratio:new i.bp(Y,d.u_tileratio),u_crossfade_from:new i.bp(Y,d.u_crossfade_from),u_crossfade_to:new i.bp(Y,d.u_crossfade_to),u_image_dash:new i.b_(Y,d.u_image_dash),u_mix:new i.bp(Y,d.u_mix),u_lineatlas_width:new i.bp(Y,d.u_lineatlas_width),u_lineatlas_height:new i.bp(Y,d.u_lineatlas_height)}),raster:(Y,d)=>({u_tl_parent:new i.c3(Y,d.u_tl_parent),u_scale_parent:new i.bp(Y,d.u_scale_parent),u_buffer_scale:new i.bp(Y,d.u_buffer_scale),u_fade_t:new i.bp(Y,d.u_fade_t),u_opacity:new i.bp(Y,d.u_opacity),u_image0:new i.b_(Y,d.u_image0),u_image1:new i.b_(Y,d.u_image1),u_brightness_low:new i.bp(Y,d.u_brightness_low),u_brightness_high:new i.bp(Y,d.u_brightness_high),u_saturation_factor:new i.bp(Y,d.u_saturation_factor),u_contrast_factor:new i.bp(Y,d.u_contrast_factor),u_spin_weights:new i.c2(Y,d.u_spin_weights),u_coords_top:new i.c1(Y,d.u_coords_top),u_coords_bottom:new i.c1(Y,d.u_coords_bottom)}),symbolIcon:(Y,d)=>({u_is_size_zoom_constant:new i.b_(Y,d.u_is_size_zoom_constant),u_is_size_feature_constant:new i.b_(Y,d.u_is_size_feature_constant),u_size_t:new i.bp(Y,d.u_size_t),u_size:new i.bp(Y,d.u_size),u_camera_to_center_distance:new i.bp(Y,d.u_camera_to_center_distance),u_pitch:new i.bp(Y,d.u_pitch),u_rotate_symbol:new i.b_(Y,d.u_rotate_symbol),u_aspect_ratio:new i.bp(Y,d.u_aspect_ratio),u_fade_change:new i.bp(Y,d.u_fade_change),u_label_plane_matrix:new i.c0(Y,d.u_label_plane_matrix),u_coord_matrix:new i.c0(Y,d.u_coord_matrix),u_is_text:new i.b_(Y,d.u_is_text),u_pitch_with_map:new i.b_(Y,d.u_pitch_with_map),u_is_along_line:new i.b_(Y,d.u_is_along_line),u_is_variable_anchor:new i.b_(Y,d.u_is_variable_anchor),u_texsize:new i.c3(Y,d.u_texsize),u_texture:new i.b_(Y,d.u_texture),u_translation:new i.c3(Y,d.u_translation),u_pitched_scale:new i.bp(Y,d.u_pitched_scale)}),symbolSDF:(Y,d)=>({u_is_size_zoom_constant:new i.b_(Y,d.u_is_size_zoom_constant),u_is_size_feature_constant:new i.b_(Y,d.u_is_size_feature_constant),u_size_t:new i.bp(Y,d.u_size_t),u_size:new i.bp(Y,d.u_size),u_camera_to_center_distance:new i.bp(Y,d.u_camera_to_center_distance),u_pitch:new i.bp(Y,d.u_pitch),u_rotate_symbol:new i.b_(Y,d.u_rotate_symbol),u_aspect_ratio:new i.bp(Y,d.u_aspect_ratio),u_fade_change:new i.bp(Y,d.u_fade_change),u_label_plane_matrix:new i.c0(Y,d.u_label_plane_matrix),u_coord_matrix:new i.c0(Y,d.u_coord_matrix),u_is_text:new i.b_(Y,d.u_is_text),u_pitch_with_map:new i.b_(Y,d.u_pitch_with_map),u_is_along_line:new i.b_(Y,d.u_is_along_line),u_is_variable_anchor:new i.b_(Y,d.u_is_variable_anchor),u_texsize:new i.c3(Y,d.u_texsize),u_texture:new i.b_(Y,d.u_texture),u_gamma_scale:new i.bp(Y,d.u_gamma_scale),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_is_halo:new i.b_(Y,d.u_is_halo),u_is_plain:new i.b_(Y,d.u_is_plain),u_translation:new i.c3(Y,d.u_translation),u_pitched_scale:new i.bp(Y,d.u_pitched_scale)}),symbolTextAndIcon:(Y,d)=>({u_is_size_zoom_constant:new i.b_(Y,d.u_is_size_zoom_constant),u_is_size_feature_constant:new i.b_(Y,d.u_is_size_feature_constant),u_size_t:new i.bp(Y,d.u_size_t),u_size:new i.bp(Y,d.u_size),u_camera_to_center_distance:new i.bp(Y,d.u_camera_to_center_distance),u_pitch:new i.bp(Y,d.u_pitch),u_rotate_symbol:new i.b_(Y,d.u_rotate_symbol),u_aspect_ratio:new i.bp(Y,d.u_aspect_ratio),u_fade_change:new i.bp(Y,d.u_fade_change),u_label_plane_matrix:new i.c0(Y,d.u_label_plane_matrix),u_coord_matrix:new i.c0(Y,d.u_coord_matrix),u_is_text:new i.b_(Y,d.u_is_text),u_pitch_with_map:new i.b_(Y,d.u_pitch_with_map),u_is_along_line:new i.b_(Y,d.u_is_along_line),u_is_variable_anchor:new i.b_(Y,d.u_is_variable_anchor),u_texsize:new i.c3(Y,d.u_texsize),u_texsize_icon:new i.c3(Y,d.u_texsize_icon),u_texture:new i.b_(Y,d.u_texture),u_texture_icon:new i.b_(Y,d.u_texture_icon),u_gamma_scale:new i.bp(Y,d.u_gamma_scale),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_is_halo:new i.b_(Y,d.u_is_halo),u_translation:new i.c3(Y,d.u_translation),u_pitched_scale:new i.bp(Y,d.u_pitched_scale)}),background:(Y,d)=>({u_opacity:new i.bp(Y,d.u_opacity),u_color:new i.b$(Y,d.u_color)}),backgroundPattern:(Y,d)=>({u_opacity:new i.bp(Y,d.u_opacity),u_image:new i.b_(Y,d.u_image),u_pattern_tl_a:new i.c3(Y,d.u_pattern_tl_a),u_pattern_br_a:new i.c3(Y,d.u_pattern_br_a),u_pattern_tl_b:new i.c3(Y,d.u_pattern_tl_b),u_pattern_br_b:new i.c3(Y,d.u_pattern_br_b),u_texsize:new i.c3(Y,d.u_texsize),u_mix:new i.bp(Y,d.u_mix),u_pattern_size_a:new i.c3(Y,d.u_pattern_size_a),u_pattern_size_b:new i.c3(Y,d.u_pattern_size_b),u_scale_a:new i.bp(Y,d.u_scale_a),u_scale_b:new i.bp(Y,d.u_scale_b),u_pixel_coord_upper:new i.c3(Y,d.u_pixel_coord_upper),u_pixel_coord_lower:new i.c3(Y,d.u_pixel_coord_lower),u_tile_units_to_pixels:new i.bp(Y,d.u_tile_units_to_pixels)}),terrain:(Y,d)=>({u_texture:new i.b_(Y,d.u_texture),u_ele_delta:new i.bp(Y,d.u_ele_delta),u_fog_matrix:new i.c0(Y,d.u_fog_matrix),u_fog_color:new i.b$(Y,d.u_fog_color),u_fog_ground_blend:new i.bp(Y,d.u_fog_ground_blend),u_fog_ground_blend_opacity:new i.bp(Y,d.u_fog_ground_blend_opacity),u_horizon_color:new i.b$(Y,d.u_horizon_color),u_horizon_fog_blend:new i.bp(Y,d.u_horizon_fog_blend),u_is_globe_mode:new i.bp(Y,d.u_is_globe_mode)}),terrainDepth:(Y,d)=>({u_ele_delta:new i.bp(Y,d.u_ele_delta)}),terrainCoords:(Y,d)=>({u_texture:new i.b_(Y,d.u_texture),u_terrain_coords_id:new i.bp(Y,d.u_terrain_coords_id),u_ele_delta:new i.bp(Y,d.u_ele_delta)}),projectionErrorMeasurement:(Y,d)=>({u_input:new i.bp(Y,d.u_input),u_output_expected:new i.bp(Y,d.u_output_expected)}),atmosphere:(Y,d)=>({u_sun_pos:new i.c2(Y,d.u_sun_pos),u_atmosphere_blend:new i.bp(Y,d.u_atmosphere_blend),u_globe_position:new i.c2(Y,d.u_globe_position),u_globe_radius:new i.bp(Y,d.u_globe_radius),u_inv_proj_matrix:new i.c0(Y,d.u_inv_proj_matrix)}),sky:(Y,d)=>({u_sky_color:new i.b$(Y,d.u_sky_color),u_horizon_color:new i.b$(Y,d.u_horizon_color),u_horizon:new i.c3(Y,d.u_horizon),u_horizon_normal:new i.c3(Y,d.u_horizon_normal),u_sky_horizon_blend:new i.bp(Y,d.u_sky_horizon_blend),u_sky_blend:new i.bp(Y,d.u_sky_blend)})};class dh{constructor(d,P,N){this.context=d;let H=d.gl;this.buffer=H.createBuffer(),this.dynamicDraw=!!N,this.context.unbindVAO(),d.bindElementBuffer.set(this.buffer),H.bufferData(H.ELEMENT_ARRAY_BUFFER,P.arrayBuffer,this.dynamicDraw?H.DYNAMIC_DRAW:H.STATIC_DRAW),this.dynamicDraw||P.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(d){let P=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),P.bufferSubData(P.ELEMENT_ARRAY_BUFFER,0,d.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Pf={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Hd{constructor(d,P,N,H){this.length=P.length,this.attributes=N,this.itemSize=P.bytesPerElement,this.dynamicDraw=H,this.context=d;let $=d.gl;this.buffer=$.createBuffer(),d.bindVertexBuffer.set(this.buffer),$.bufferData($.ARRAY_BUFFER,P.arrayBuffer,this.dynamicDraw?$.DYNAMIC_DRAW:$.STATIC_DRAW),this.dynamicDraw||P.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(d){if(d.length!==this.length)throw new Error(`Length of new data is ${d.length}, which doesn't match current length of ${this.length}`);let P=this.context.gl;this.bind(),P.bufferSubData(P.ARRAY_BUFFER,0,d.arrayBuffer)}enableAttributes(d,P){for(let N of this.attributes){let H=P.attributes[N.name];H!==void 0&&d.enableVertexAttribArray(H)}}setVertexAttribPointers(d,P,N){for(let H of this.attributes){let $=P.attributes[H.name];$!==void 0&&d.vertexAttribPointer($,H.components,d[Pf[H.type]],!1,this.itemSize,H.offset+this.itemSize*(N||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class _o{constructor(d){this.gl=d.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(d){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class p0 extends _o{getDefault(){return i.bo.transparent}set(d){let P=this.current;(d.r!==P.r||d.g!==P.g||d.b!==P.b||d.a!==P.a||this.dirty)&&(this.gl.clearColor(d.r,d.g,d.b,d.a),this.current=d,this.dirty=!1)}}class Tu extends _o{getDefault(){return 1}set(d){(d!==this.current||this.dirty)&&(this.gl.clearDepth(d),this.current=d,this.dirty=!1)}}class Au extends _o{getDefault(){return 0}set(d){(d!==this.current||this.dirty)&&(this.gl.clearStencil(d),this.current=d,this.dirty=!1)}}class Il extends _o{getDefault(){return[!0,!0,!0,!0]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||d[2]!==P[2]||d[3]!==P[3]||this.dirty)&&(this.gl.colorMask(d[0],d[1],d[2],d[3]),this.current=d,this.dirty=!1)}}class g0 extends _o{getDefault(){return!0}set(d){(d!==this.current||this.dirty)&&(this.gl.depthMask(d),this.current=d,this.dirty=!1)}}class Yu extends _o{getDefault(){return 255}set(d){(d!==this.current||this.dirty)&&(this.gl.stencilMask(d),this.current=d,this.dirty=!1)}}class Nh extends _o{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(d){let P=this.current;(d.func!==P.func||d.ref!==P.ref||d.mask!==P.mask||this.dirty)&&(this.gl.stencilFunc(d.func,d.ref,d.mask),this.current=d,this.dirty=!1)}}class Tl extends _o{getDefault(){let d=this.gl;return[d.KEEP,d.KEEP,d.KEEP]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||d[2]!==P[2]||this.dirty)&&(this.gl.stencilOp(d[0],d[1],d[2]),this.current=d,this.dirty=!1)}}class jl extends _o{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;d?P.enable(P.STENCIL_TEST):P.disable(P.STENCIL_TEST),this.current=d,this.dirty=!1}}class Uh extends _o{getDefault(){return[0,1]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||this.dirty)&&(this.gl.depthRange(d[0],d[1]),this.current=d,this.dirty=!1)}}class Vh extends _o{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;d?P.enable(P.DEPTH_TEST):P.disable(P.DEPTH_TEST),this.current=d,this.dirty=!1}}class jd extends _o{getDefault(){return this.gl.LESS}set(d){(d!==this.current||this.dirty)&&(this.gl.depthFunc(d),this.current=d,this.dirty=!1)}}class pc extends _o{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;d?P.enable(P.BLEND):P.disable(P.BLEND),this.current=d,this.dirty=!1}}class gc extends _o{getDefault(){let d=this.gl;return[d.ONE,d.ZERO]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||this.dirty)&&(this.gl.blendFunc(d[0],d[1]),this.current=d,this.dirty=!1)}}class of extends _o{getDefault(){return i.bo.transparent}set(d){let P=this.current;(d.r!==P.r||d.g!==P.g||d.b!==P.b||d.a!==P.a||this.dirty)&&(this.gl.blendColor(d.r,d.g,d.b,d.a),this.current=d,this.dirty=!1)}}class sf extends _o{getDefault(){return this.gl.FUNC_ADD}set(d){(d!==this.current||this.dirty)&&(this.gl.blendEquation(d),this.current=d,this.dirty=!1)}}class bd extends _o{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;d?P.enable(P.CULL_FACE):P.disable(P.CULL_FACE),this.current=d,this.dirty=!1}}class Gh extends _o{getDefault(){return this.gl.BACK}set(d){(d!==this.current||this.dirty)&&(this.gl.cullFace(d),this.current=d,this.dirty=!1)}}class Xu extends _o{getDefault(){return this.gl.CCW}set(d){(d!==this.current||this.dirty)&&(this.gl.frontFace(d),this.current=d,this.dirty=!1)}}class Pc extends _o{getDefault(){return null}set(d){(d!==this.current||this.dirty)&&(this.gl.useProgram(d),this.current=d,this.dirty=!1)}}class Ff extends _o{getDefault(){return this.gl.TEXTURE0}set(d){(d!==this.current||this.dirty)&&(this.gl.activeTexture(d),this.current=d,this.dirty=!1)}}class Df extends _o{getDefault(){let d=this.gl;return[0,0,d.drawingBufferWidth,d.drawingBufferHeight]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||d[2]!==P[2]||d[3]!==P[3]||this.dirty)&&(this.gl.viewport(d[0],d[1],d[2],d[3]),this.current=d,this.dirty=!1)}}class La extends _o{getDefault(){return null}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.bindFramebuffer(P.FRAMEBUFFER,d),this.current=d,this.dirty=!1}}class Rf extends _o{getDefault(){return null}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.bindRenderbuffer(P.RENDERBUFFER,d),this.current=d,this.dirty=!1}}class m0 extends _o{getDefault(){return null}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.bindTexture(P.TEXTURE_2D,d),this.current=d,this.dirty=!1}}class wd extends _o{getDefault(){return null}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.bindBuffer(P.ARRAY_BUFFER,d),this.current=d,this.dirty=!1}}class Hh extends _o{getDefault(){return null}set(d){let P=this.gl;P.bindBuffer(P.ELEMENT_ARRAY_BUFFER,d),this.current=d,this.dirty=!1}}class Z0 extends _o{getDefault(){return null}set(d){var P;if(d===this.current&&!this.dirty)return;let N=this.gl;Pl(N)?N.bindVertexArray(d):(P=N.getExtension("OES_vertex_array_object"))===null||P===void 0||P.bindVertexArrayOES(d),this.current=d,this.dirty=!1}}class y0 extends _o{getDefault(){return 4}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.pixelStorei(P.UNPACK_ALIGNMENT,d),this.current=d,this.dirty=!1}}class Td extends _o{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL,d),this.current=d,this.dirty=!1}}class ul extends _o{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.pixelStorei(P.UNPACK_FLIP_Y_WEBGL,d),this.current=d,this.dirty=!1}}class Wl extends _o{constructor(d,P){super(d),this.context=d,this.parent=P}getDefault(){return null}}class If extends Wl{setDirty(){this.dirty=!0}set(d){if(d===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let P=this.gl;P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_2D,d,0),this.current=d,this.dirty=!1}}class vh extends Wl{set(d){if(d===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let P=this.gl;P.framebufferRenderbuffer(P.FRAMEBUFFER,P.DEPTH_ATTACHMENT,P.RENDERBUFFER,d),this.current=d,this.dirty=!1}}class zf extends Wl{set(d){if(d===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let P=this.gl;P.framebufferRenderbuffer(P.FRAMEBUFFER,P.DEPTH_STENCIL_ATTACHMENT,P.RENDERBUFFER,d),this.current=d,this.dirty=!1}}let qf="Framebuffer is not complete";class Ze{constructor(d,P,N,H,$){this.context=d,this.width=P,this.height=N;let se=d.gl,de=this.framebuffer=se.createFramebuffer();if(this.colorAttachment=new If(d,de),H)this.depthAttachment=$?new zf(d,de):new vh(d,de);else if($)throw new Error("Stencil cannot be set without depth");if(se.checkFramebufferStatus(se.FRAMEBUFFER)!==se.FRAMEBUFFER_COMPLETE)throw new Error(qf)}destroy(){let d=this.context.gl,P=this.colorAttachment.get();if(P&&d.deleteTexture(P),this.depthAttachment){let N=this.depthAttachment.get();N&&d.deleteRenderbuffer(N)}d.deleteFramebuffer(this.framebuffer)}}class yt{constructor(d){var P,N;if(this.gl=d,this.clearColor=new p0(this),this.clearDepth=new Tu(this),this.clearStencil=new Au(this),this.colorMask=new Il(this),this.depthMask=new g0(this),this.stencilMask=new Yu(this),this.stencilFunc=new Nh(this),this.stencilOp=new Tl(this),this.stencilTest=new jl(this),this.depthRange=new Uh(this),this.depthTest=new Vh(this),this.depthFunc=new jd(this),this.blend=new pc(this),this.blendFunc=new gc(this),this.blendColor=new of(this),this.blendEquation=new sf(this),this.cullFace=new bd(this),this.cullFaceSide=new Gh(this),this.frontFace=new Xu(this),this.program=new Pc(this),this.activeTexture=new Ff(this),this.viewport=new Df(this),this.bindFramebuffer=new La(this),this.bindRenderbuffer=new Rf(this),this.bindTexture=new m0(this),this.bindVertexBuffer=new wd(this),this.bindElementBuffer=new Hh(this),this.bindVertexArray=new Z0(this),this.pixelStoreUnpack=new y0(this),this.pixelStoreUnpackPremultiplyAlpha=new Td(this),this.pixelStoreUnpackFlipY=new ul(this),this.extTextureFilterAnisotropic=d.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=d.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=d.getParameter(d.MAX_TEXTURE_SIZE),Pl(d)){this.HALF_FLOAT=d.HALF_FLOAT;let H=d.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(P=d.RGBA16F)!==null&&P!==void 0?P:H==null?void 0:H.RGBA16F_EXT,this.RGB16F=(N=d.RGB16F)!==null&&N!==void 0?N:H==null?void 0:H.RGB16F_EXT,d.getExtension("EXT_color_buffer_float")}else{d.getExtension("EXT_color_buffer_half_float"),d.getExtension("OES_texture_half_float_linear");let H=d.getExtension("OES_texture_half_float");this.HALF_FLOAT=H==null?void 0:H.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(d,P){return new dh(this,d,P)}createVertexBuffer(d,P,N){return new Hd(this,d,P,N)}createRenderbuffer(d,P,N){let H=this.gl,$=H.createRenderbuffer();return this.bindRenderbuffer.set($),H.renderbufferStorage(H.RENDERBUFFER,d,P,N),this.bindRenderbuffer.set(null),$}createFramebuffer(d,P,N,H){return new Ze(this,d,P,N,H)}clear({color:d,depth:P,stencil:N}){let H=this.gl,$=0;d&&($|=H.COLOR_BUFFER_BIT,this.clearColor.set(d),this.colorMask.set([!0,!0,!0,!0])),P!==void 0&&($|=H.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(P),this.depthMask.set(!0)),N!==void 0&&($|=H.STENCIL_BUFFER_BIT,this.clearStencil.set(N),this.stencilMask.set(255)),H.clear($)}setCullFace(d){d.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(d.mode),this.frontFace.set(d.frontFace))}setDepthMode(d){d.func!==this.gl.ALWAYS||d.mask?(this.depthTest.set(!0),this.depthFunc.set(d.func),this.depthMask.set(d.mask),this.depthRange.set(d.range)):this.depthTest.set(!1)}setStencilMode(d){d.test.func!==this.gl.ALWAYS||d.mask?(this.stencilTest.set(!0),this.stencilMask.set(d.mask),this.stencilOp.set([d.fail,d.depthFail,d.pass]),this.stencilFunc.set({func:d.test.func,ref:d.ref,mask:d.test.mask})):this.stencilTest.set(!1)}setColorMode(d){i.bQ(d.blendFunction,Ja.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(d.blendFunction),this.blendColor.set(d.blendColor)),this.colorMask.set(d.mask)}createVertexArray(){var d;return Pl(this.gl)?this.gl.createVertexArray():(d=this.gl.getExtension("OES_vertex_array_object"))===null||d===void 0?void 0:d.createVertexArrayOES()}deleteVertexArray(d){var P;Pl(this.gl)?this.gl.deleteVertexArray(d):(P=this.gl.getExtension("OES_vertex_array_object"))===null||P===void 0||P.deleteVertexArrayOES(d)}unbindVAO(){this.bindVertexArray.set(null)}}let Wt;function zt(Y,d,P,N,H){var $,se;let de=Y.context,Ae=Y.transform,Fe=de.gl,Ie=Y.useProgram("collisionBox"),Ye=[],st=0,ht=0;for(let Bt of N){let St=d.getTile(Bt).getBucket(P);if(!St)continue;let Pt=H?St.textCollisionBox:St.iconCollisionBox,$t=St.collisionCircleArray;$t.length>0&&(Ye.push({circleArray:$t,circleOffset:ht,coord:Bt}),st+=$t.length/4,ht=st),Pt&&Ie.draw(de,Fe.LINES,ma.disabled,Ca.disabled,Y.colorModeForRenderPass(),Sa.disabled,Bh(Y.transform),($=Y.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData(Bt),Ae.getProjectionData({overscaledTileID:Bt,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),P.id,Pt.layoutVertexBuffer,Pt.indexBuffer,Pt.segments,null,Y.transform.zoom,null,null,Pt.collisionVertexBuffer)}if(!H||!Ye.length)return;let Pe=Y.useProgram("collisionCircle"),Xe=new i.ca;Xe.resize(4*st),Xe._trim();let at=0;for(let Bt of Ye)for(let St=0;St=0&&(Xe[xt.associatedIconIndex]={shiftedAnchor:Lr,angle:an})}else ko(xt.numGlyphs,ht)}if(Ae){Pe.clear();let at=Y.icon.placedSymbolArray;for(let xt=0;xtY.style.map.terrain.getElevation(Rr,Ta,vu):null,ql=P.layout.get("text-rotation-alignment")==="map";Jn(an,Y,H,Ki,no,Bt,Fe,ql,Rr.toUnwrapped(),xt.width,xt.height,Ia,Us)}let Ns=H&&Xr||Na,vo=St||Ns?hr:Bt?Ki:Y.transform.clipSpaceToPixelsMatrix,bo=Yn&&P.paint.get(H?"text-halo-width":"icon-halo-width").constantOr(1)!==0,po;po=Yn?an.iconsInText?Gl(yi.kind,li,Pt,Bt,St,Ns,Y,vo,ca,Ia,jn,da,$r):Gd(yi.kind,li,Pt,Bt,St,Ns,Y,vo,ca,Ia,H,jn,bo,$r):hh(yi.kind,li,Pt,Bt,St,Ns,Y,vo,ca,Ia,H,jn,$r);let $o={program:An,buffers:on,uniformValues:po,projectionData:Os,atlasTexture:Wn,atlasTextureIcon:ui,atlasInterpolation:si,atlasInterpolationIcon:zi,isSDF:Yn,hasHalo:bo};if($t&&an.canOverlap){Ht=!0;let no=on.segments.get();for(let Us of no)Or.push({segments:new i.aV([Us]),sortKey:Us.sortKey,state:$o,terrainData:Vn})}else Or.push({segments:on.segments,sortKey:0,state:$o,terrainData:Vn})}Ht&&Or.sort(((Rr,Lr)=>Rr.sortKey-Lr.sortKey));let Er=(Pe=P.paint.get(H?"text-halo-width":"icon-halo-width").constantOr(null))!==null&&Pe!==void 0?Pe:1/0,Tr=P.layout.get("text-letter-spacing").constantOr(0)*i.aJ<0||Er>1;for(let Rr of Or){let Lr=Rr.state;Xe.activeTexture.set(at.TEXTURE0),Lr.atlasTexture.bind(Lr.atlasInterpolation,at.CLAMP_TO_EDGE),Lr.atlasTextureIcon&&(Xe.activeTexture.set(at.TEXTURE1),Lr.atlasTextureIcon&&Lr.atlasTextureIcon.bind(Lr.atlasInterpolationIcon,at.CLAMP_TO_EDGE));let an=Lr.isSDF&&Lr.hasHalo;if(an){let on=Lr.uniformValues;on.u_is_halo=1,Tr&&(on.u_is_plain=0,en(Lr.buffers,Rr.segments,P,Y,Lr.program,dr,Ie,Ye,on,Lr.projectionData,Rr.terrainData),on.u_is_halo=0,on.u_is_plain=1)}en(Lr.buffers,Rr.segments,P,Y,Lr.program,dr,Ie,Ye,Lr.uniformValues,Lr.projectionData,Rr.terrainData),an&&!Tr&&(Lr.uniformValues.u_is_halo=0)}}function en(Y,d,P,N,H,$,se,de,Ae,Fe,Ie){let Ye=N.context;H.draw(Ye,Ye.gl.TRIANGLES,$,se,de,Sa.backCCW,Ae,Ie,Fe,P.id,Y.layoutVertexBuffer,Y.indexBuffer,d,P.paint,N.transform.zoom,Y.programConfigurations.get(P.id),Y.dynamicLayoutVertexBuffer,Y.opacityVertexBuffer)}function vn(Y,d,P,N,H){let $=Y.context,se=$.gl,de=Ca.disabled,Ae=new Ja([se.ONE,se.ONE],i.bo.transparent,[!0,!0,!0,!0]),Fe=d.getBucket(P);if(!Fe)return;let Ie=N.key,Ye=P.heatmapFbos.get(Ie);Ye||(Ye=Pn($,d.tileSize,d.tileSize),P.heatmapFbos.set(Ie,Ye)),$.bindFramebuffer.set(Ye.framebuffer),$.viewport.set([0,0,d.tileSize,d.tileSize]),$.clear({color:i.bo.transparent});let st=Fe.programConfigurations.get(P.id),ht=Y.useProgram("heatmap",st,!H),Pe=Y.transform.getProjectionData({overscaledTileID:d.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Xe=Y.style.map.terrain.getTerrainData(N);ht.draw($,se.TRIANGLES,ma.disabled,de,Ae,Sa.disabled,pd(d,Y.transform.zoom,P.paint.get("heatmap-intensity"),1),Xe,Pe,P.id,Fe.layoutVertexBuffer,Fe.indexBuffer,Fe.segments,P.paint,Y.transform.zoom,st)}function mn(Y,d,P,N,H){let $=Y.context,se=$.gl,de=Y.transform;$.setColorMode(Y.colorModeForRenderPass());let Ae=On($,d),Fe=P.key,Ie=d.heatmapFbos.get(Fe);if(!Ie)return;$.activeTexture.set(se.TEXTURE0),se.bindTexture(se.TEXTURE_2D,Ie.colorAttachment.get()),$.activeTexture.set(se.TEXTURE1),Ae.bind(se.LINEAR,se.CLAMP_TO_EDGE);let Ye=de.getProjectionData({overscaledTileID:P,applyTerrainMatrix:H,applyGlobeMatrix:!N});Y.useProgram("heatmapTexture").draw($,se.TRIANGLES,ma.disabled,Ca.disabled,Y.colorModeForRenderPass(),Sa.disabled,lh(Y,d,0,1),null,Ye,d.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments,d.paint,de.zoom),Ie.destroy(),d.heatmapFbos.delete(Fe)}function Pn(Y,d,P){var N,H;let $=Y.gl,se=$.createTexture();$.bindTexture($.TEXTURE_2D,se),$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_S,$.CLAMP_TO_EDGE),$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_T,$.CLAMP_TO_EDGE),$.texParameteri($.TEXTURE_2D,$.TEXTURE_MIN_FILTER,$.LINEAR),$.texParameteri($.TEXTURE_2D,$.TEXTURE_MAG_FILTER,$.LINEAR);let de=(N=Y.HALF_FLOAT)!==null&&N!==void 0?N:$.UNSIGNED_BYTE,Ae=(H=Y.RGBA16F)!==null&&H!==void 0?H:$.RGBA;$.texImage2D($.TEXTURE_2D,0,Ae,d,P,0,$.RGBA,de,null);let Fe=Y.createFramebuffer(d,P,!1,!1);return Fe.colorAttachment.set(se),Fe}function On(Y,d){return d.colorRampTexture||(d.colorRampTexture=new i.T(Y,d.colorRamp,Y.gl.RGBA)),d.colorRampTexture}function ki(Y,d,P,N,H,$,se,de){let Ae=256;if(H.stepInterpolant){let Fe=d.getSource().maxzoom,Ie=se.canonical.z===Fe?Math.ceil(1<Y.options.anisotropicFilterPitch&&ht.texParameterf(ht.TEXTURE_2D,st.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,st.extTextureFilterAnisotropicMax);let Rr=(Ie=Y.style.map.terrain)===null||Ie===void 0?void 0:Ie.getTerrainData(Ht),Lr=Xe.getProjectionData({overscaledTileID:Ht,aligned:Et,applyGlobeMatrix:!Fe,applyTerrainMatrix:!0}),an=fh(Er,$r,Tr.fadeMix,P,de),on=at.getMeshFromTileID(st,Ht.canonical,$,se,"raster");Pe.draw(st,ht.TRIANGLES,dr,H?H[Ht.overscaledZ]:Ca.disabled,xt,Ae?Sa.frontCCW:Sa.backCCW,an,Rr,Lr,P.id,on.vertexBuffer,on.indexBuffer,on.segments)}}function Js(Y,d,P,N){let H={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(P===0||N)return H;if(Y.fadingParentID){let $=d.getLoadedTile(Y.fadingParentID);if(!$)return H;let se=Math.pow(2,$.tileID.overscaledZ-Y.tileID.overscaledZ),de=[Y.tileID.canonical.x*se%1,Y.tileID.canonical.y*se%1],Ae=(function(Fe,Ie,Ye){let st=g(),ht=(st-Ie.timeAdded)/Ye,Pe=Fe.fadingDirection===We.Incoming,Xe=i.al((st-Fe.timeAdded)/Ye,0,1),at=i.al(1-ht,0,1),xt=Pe?Xe:at;return{tileOpacity:xt,parentTileOpacity:Pe?at:Xe,fadeMix:{opacity:1,mix:1-xt}}})(Y,$,P);return{parentTile:$,parentScaleBy:se,parentTopLeft:de,fadeValues:Ae}}if(Y.selfFading){let $=(function(se,de){let Ae=(g()-se.timeAdded)/de,Fe=i.al(Ae,0,1);return{tileOpacity:Fe,fadeMix:{opacity:Fe,mix:0}}})(Y,P);return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:$}}return H}let fs=new i.bo(1,0,0,1),Io=new i.bo(0,1,0,1),oi=new i.bo(0,0,1,1),ro=new i.bo(1,0,1,1),Go=new i.bo(0,1,1,1);function Qs(Y,d,P,N){cu(Y,0,d+P/2,Y.transform.width,P,N)}function zl(Y,d,P,N){cu(Y,d-P/2,0,P,Y.transform.height,N)}function cu(Y,d,P,N,H,$){let se=Y.context,de=se.gl;de.enable(de.SCISSOR_TEST),de.scissor(d*Y.pixelRatio,P*Y.pixelRatio,N*Y.pixelRatio,H*Y.pixelRatio),se.clear({color:$}),de.disable(de.SCISSOR_TEST)}function Zu(Y,d,P){var N;let H=Y.context,$=H.gl,se=Y.useProgram("debug"),de=ma.disabled,Ae=Ca.disabled,Fe=Y.colorModeForRenderPass(),Ie="$debug",Ye=(N=Y.style.map.terrain)===null||N===void 0?void 0:N.getTerrainData(P);H.activeTexture.set($.TEXTURE0);let st=d.getTileByID(P.key).latestRawTileData,ht=Math.floor(((st==null?void 0:st.byteLength)||0)/1024),Pe=d.getTile(P).tileSize,Xe=512/Math.min(Pe,512)*(P.overscaledZ/Y.transform.zoom)*.5,at=P.canonical.toString();P.overscaledZ!==P.canonical.z&&(at+=` => ${P.overscaledZ}`),(function(Et,Bt){Et.initDebugOverlayCanvas();let St=Et.debugOverlayCanvas,Pt=Et.context.gl,$t=Et.debugOverlayCanvas.getContext("2d");$t.clearRect(0,0,St.width,St.height),$t.shadowColor="white",$t.shadowBlur=2,$t.lineWidth=1.5,$t.strokeStyle="white",$t.textBaseline="top",$t.font="bold 36px Open Sans, sans-serif",$t.fillText(Bt,5,5),$t.strokeText(Bt,5,5),Et.debugOverlayTexture.update(St),Et.debugOverlayTexture.bind(Pt.LINEAR,Pt.CLAMP_TO_EDGE)})(Y,`${at} ${ht}kB`);let xt=Y.transform.getProjectionData({overscaledTileID:P,applyGlobeMatrix:!0,applyTerrainMatrix:!0});se.draw(H,$.TRIANGLES,de,Ae,Ja.alphaBlended,Sa.disabled,vd(i.bo.transparent,Xe),null,xt,Ie,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments),se.draw(H,$.LINE_STRIP,de,Ae,Fe,Sa.disabled,vd(i.bo.red),Ye,xt,Ie,Y.debugBuffer,Y.tileBorderIndexBuffer,Y.debugSegments)}function mc(Y,d,P,N){let{isRenderingGlobe:H}=N,$=Y.context,se=$.gl,de=Y.transform,Ae=Y.colorModeForRenderPass(),Fe=Y.getDepthModeFor3D(),Ie=Y.useProgram("terrain");$.bindFramebuffer.set(null),$.viewport.set([0,0,Y.width,Y.height]);for(let Ye of P){let st=d.getTerrainMesh(Ye.tileID),ht=Y.renderToTexture.getTexture(Ye),Pe=d.getTerrainData(Ye.tileID);$.activeTexture.set(se.TEXTURE0),se.bindTexture(se.TEXTURE_2D,ht.texture);let Xe=d.getMeshFrameDelta(de.zoom),at=de.calculateFogMatrix(Ye.tileID.toUnwrapped()),xt=Nd(Xe,at,Y.style.sky,de.pitch,H),Et=de.getProjectionData({overscaledTileID:Ye.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});Ie.draw($,se.TRIANGLES,Fe,Ca.disabled,Ae,Sa.backCCW,xt,Pe,Et,"terrain",st.vertexBuffer,st.indexBuffer,st.segments)}}function Yl(Y,d){if(!d.mesh){let P=new i.aU;P.emplaceBack(-1,-1),P.emplaceBack(1,-1),P.emplaceBack(1,1),P.emplaceBack(-1,1);let N=new i.aW;N.emplaceBack(0,1,2),N.emplaceBack(0,2,3),d.mesh=new ka(Y.createVertexBuffer(P,vs.members),Y.createIndexBuffer(N),i.aV.simpleSegment(0,0,P.length,N.length))}return d.mesh}let lf={symbol:function(Y,d,P,N,H,$){if(Y.renderPass!=="translucent")return;let{isRenderingToTexture:se}=$,de=Ca.disabled,Ae=Y.colorModeForRenderPass();(P._unevaluatedLayout.hasValue("text-variable-anchor")||P._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&(function(Fe,Ie,Ye,st,ht,Pe,Xe,at,xt){var Et;let Bt=Ie.transform,St=Ie.style.map.terrain,Pt=ht==="map",$t=Pe==="map";for(let Ht of Fe){let dr=st.getTile(Ht),Xr=dr.getBucket(Ye);if(!(!((Et=Xr==null?void 0:Xr.text)===null||Et===void 0)&&Et.segments.get().length))continue;let Or=i.aw(Xr.textSizeData,Bt.zoom),$r=i.aK(dr,1,Ie.transform.zoom),Er=Ut(Pt,Ie.transform,$r),Tr=Ye.layout.get("icon-text-fit")!=="none"&&Xr.hasIconData();if(Or){let Rr=Math.pow(2,Bt.zoom-dr.tileID.overscaledZ),Lr=St?(an,on)=>St.getElevation(Ht,an,on):null;cn(Xr,Pt,$t,xt,Bt,Er,Rr,Or,Tr,i.aL(Bt,dr,Xe,at),Ht.toUnwrapped(),Lr)}}})(N,Y,P,d,P.layout.get("text-rotation-alignment"),P.layout.get("text-pitch-alignment"),P.paint.get("text-translate"),P.paint.get("text-translate-anchor"),H),P.paint.get("icon-opacity").constantOr(1)!==0&&Fn(Y,d,P,N,!1,P.paint.get("icon-translate"),P.paint.get("icon-translate-anchor"),P.layout.get("icon-rotation-alignment"),P.layout.get("icon-pitch-alignment"),P.layout.get("icon-keep-upright"),de,Ae,se),P.paint.get("text-opacity").constantOr(1)!==0&&Fn(Y,d,P,N,!0,P.paint.get("text-translate"),P.paint.get("text-translate-anchor"),P.layout.get("text-rotation-alignment"),P.layout.get("text-pitch-alignment"),P.layout.get("text-keep-upright"),de,Ae,se),d.map.showCollisionBoxes&&(zt(Y,d,P,N,!0),zt(Y,d,P,N,!1))},circle:function(Y,d,P,N,H){var $;if(Y.renderPass!=="translucent")return;let{isRenderingToTexture:se}=H,de=P.paint.get("circle-opacity"),Ae=P.paint.get("circle-stroke-width"),Fe=P.paint.get("circle-stroke-opacity"),Ie=!P.layout.get("circle-sort-key").isConstant();if(de.constantOr(1)===0&&(Ae.constantOr(1)===0||Fe.constantOr(1)===0))return;let Ye=Y.context,st=Ye.gl,ht=Y.transform,Pe=Y.getDepthModeForSublayer(0,ma.ReadOnly),Xe=Ca.disabled,at=Y.colorModeForRenderPass(),xt=[],Et=ht.getCircleRadiusCorrection();for(let Bt of N){let St=d.getTile(Bt),Pt=St.getBucket(P);if(!Pt)continue;let $t=P.paint.get("circle-translate"),Ht=P.paint.get("circle-translate-anchor"),dr=i.aL(ht,St,$t,Ht),Xr=Pt.programConfigurations.get(P.id),Or=Y.useProgram("circle",Xr),$r=Pt.layoutVertexBuffer,Er=Pt.indexBuffer,Tr=($=Y.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData(Bt),Rr={programConfiguration:Xr,program:Or,layoutVertexBuffer:$r,indexBuffer:Er,uniformValues:dd(Y,St,P,dr,Et),terrainData:Tr,projectionData:ht.getProjectionData({overscaledTileID:Bt,applyGlobeMatrix:!se,applyTerrainMatrix:!0})};if(Ie){let Lr=Pt.segments.get();for(let an of Lr)xt.push({segments:new i.aV([an]),sortKey:an.sortKey,state:Rr})}else xt.push({segments:Pt.segments,sortKey:0,state:Rr})}Ie&&xt.sort(((Bt,St)=>Bt.sortKey-St.sortKey));for(let Bt of xt){let{programConfiguration:St,program:Pt,layoutVertexBuffer:$t,indexBuffer:Ht,uniformValues:dr,terrainData:Xr,projectionData:Or}=Bt.state;Pt.draw(Ye,st.TRIANGLES,Pe,Xe,at,Sa.backCCW,dr,Xr,Or,P.id,$t,Ht,Bt.segments,P.paint,Y.transform.zoom,St)}},heatmap:function(Y,d,P,N,H){if(P.paint.get("heatmap-opacity")===0)return;let $=Y.context,{isRenderingToTexture:se,isRenderingGlobe:de}=H;if(Y.style.map.terrain){for(let Ae of N){let Fe=d.getTile(Ae);d.hasRenderableParent(Ae)||(Y.renderPass==="offscreen"?vn(Y,Fe,P,Ae,de):Y.renderPass==="translucent"&&mn(Y,P,Ae,se,de))}$.viewport.set([0,0,Y.width,Y.height])}else Y.renderPass==="offscreen"?(function(Ae,Fe,Ie,Ye){let st=Ae.context,ht=st.gl,Pe=Ae.transform,Xe=Ca.disabled,at=new Ja([ht.ONE,ht.ONE],i.bo.transparent,[!0,!0,!0,!0]);(function(xt,Et,Bt){let St=xt.gl;xt.activeTexture.set(St.TEXTURE1),xt.viewport.set([0,0,Et.width/4,Et.height/4]);let Pt=Bt.heatmapFbos.get(i.cd);Pt?(St.bindTexture(St.TEXTURE_2D,Pt.colorAttachment.get()),xt.bindFramebuffer.set(Pt.framebuffer)):(Pt=Pn(xt,Et.width/4,Et.height/4),Bt.heatmapFbos.set(i.cd,Pt))})(st,Ae,Ie),st.clear({color:i.bo.transparent});for(let xt of Ye){if(Fe.hasRenderableParent(xt))continue;let Et=Fe.getTile(xt),Bt=Et.getBucket(Ie);if(!Bt)continue;let St=Bt.programConfigurations.get(Ie.id),Pt=Ae.useProgram("heatmap",St),$t=Pe.getProjectionData({overscaledTileID:xt,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Ht=Pe.getCircleRadiusCorrection();Pt.draw(st,ht.TRIANGLES,ma.disabled,Xe,at,Sa.backCCW,pd(Et,Pe.zoom,Ie.paint.get("heatmap-intensity"),Ht),null,$t,Ie.id,Bt.layoutVertexBuffer,Bt.indexBuffer,Bt.segments,Ie.paint,Pe.zoom,St)}st.viewport.set([0,0,Ae.width,Ae.height])})(Y,d,P,N):Y.renderPass==="translucent"&&(function(Ae,Fe){let Ie=Ae.context,Ye=Ie.gl;Ie.setColorMode(Ae.colorModeForRenderPass());let st=Fe.heatmapFbos.get(i.cd);st&&(Ie.activeTexture.set(Ye.TEXTURE0),Ye.bindTexture(Ye.TEXTURE_2D,st.colorAttachment.get()),Ie.activeTexture.set(Ye.TEXTURE1),On(Ie,Fe).bind(Ye.LINEAR,Ye.CLAMP_TO_EDGE),Ae.useProgram("heatmapTexture").draw(Ie,Ye.TRIANGLES,ma.disabled,Ca.disabled,Ae.colorModeForRenderPass(),Sa.disabled,lh(Ae,Fe,0,1),null,null,Fe.id,Ae.viewportBuffer,Ae.quadTriangleIndexBuffer,Ae.viewportSegments,Fe.paint,Ae.transform.zoom))})(Y,P)},line:function(Y,d,P,N,H){var $;if(Y.renderPass!=="translucent")return;let{isRenderingToTexture:se}=H,de=P.paint.get("line-opacity"),Ae=P.paint.get("line-width");if(de.constantOr(1)===0||Ae.constantOr(1)===0)return;let Fe=Y.getDepthModeForSublayer(0,ma.ReadOnly),Ie=Y.colorModeForRenderPass(),Ye=P.paint.get("line-dasharray"),st=Ye.constantOr(1),ht=P.paint.get("line-pattern"),Pe=ht.constantOr(1),Xe=P.paint.get("line-gradient"),at=P.getCrossfadeParameters(),xt;xt=Pe?"linePattern":st&&Xe?"lineGradientSDF":st?"lineSDF":Xe?"lineGradient":"line";let Et=Y.context,Bt=Et.gl,St=Y.transform,Pt=!0;for(let $t of N){let Ht=d.getTile($t);if(Pe&&!Ht.patternsLoaded())continue;let dr=Ht.getBucket(P);if(!dr)continue;let Xr=dr.programConfigurations.get(P.id),Or=Y.context.program.get(),$r=Y.useProgram(xt,Xr),Er=Pt||$r.program!==Or,Tr=($=Y.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData($t),Rr=ht.constantOr(null),Lr=Ye==null?void 0:Ye.constantOr(null);if(Rr&&Ht.imageAtlas){let yi=Ht.imageAtlas,Sn=yi.patternPositions[Rr.to.toString()],An=yi.patternPositions[Rr.from.toString()];Sn&&An&&Xr.setConstantPatternPositions(Sn,An)}else if(Lr){let yi=P.layout.get("line-cap").constantOr(null)==="round",Sn=Y.lineAtlas.getDash(Lr.to,yi),An=Y.lineAtlas.getDash(Lr.from,yi);Xr.setConstantDashPositions(Sn,An)}let an=St.getProjectionData({overscaledTileID:$t,applyGlobeMatrix:!se,applyTerrainMatrix:!0}),on=St.getPixelScale(),Nn;Pe?(Nn=Lc(Y,Ht,P,on,at),Ci(Et,Bt,Ht,Xr,at)):st&&Xe?(Nn=yd(Y,Ht,P,on,at,dr.lineClipsArray.length),Un(Y,d,Et,Bt,P,dr,$t,Xr,at)):st?(Nn=md(Y,Ht,P,on,at),qi(Y,Et,Bt,Xr,Er,at)):Xe?(Nn=ch(Y,Ht,P,on,dr.lineClipsArray.length),pi(Y,d,Et,Bt,P,dr,$t)):Nn=Rl(Y,Ht,P,on);let Yn=Y.stencilModeForClipping($t);$r.draw(Et,Bt.TRIANGLES,Fe,Yn,Ie,Sa.disabled,Nn,Tr,an,P.id,dr.layoutVertexBuffer,dr.indexBuffer,dr.segments,P.paint,Y.transform.zoom,Xr,dr.layoutVertexBuffer2),Pt=!1}},fill:function(Y,d,P,N,H){let $=P.paint.get("fill-color"),se=P.paint.get("fill-opacity");if(se.constantOr(1)===0)return;let{isRenderingToTexture:de}=H,Ae=Y.colorModeForRenderPass(),Fe=P.paint.get("fill-pattern"),Ie=Y.opaquePassEnabledForLayer()&&!Fe.constantOr(1)&&$.constantOr(i.bo.transparent).a===1&&se.constantOr(0)===1?"opaque":"translucent";if(Y.renderPass===Ie){let Ye=Y.getDepthModeForSublayer(1,Y.renderPass==="opaque"?ma.ReadWrite:ma.ReadOnly);Zi(Y,d,P,N,Ye,Ae,!1,de)}if(Y.renderPass==="translucent"&&P.paint.get("fill-antialias")){let Ye=Y.getDepthModeForSublayer(P.getPaintProperty("fill-outline-color")?2:0,ma.ReadOnly);Zi(Y,d,P,N,Ye,Ae,!0,de)}},fillExtrusion:function(Y,d,P,N,H){let $=P.paint.get("fill-extrusion-opacity");if($===0)return;let{isRenderingToTexture:se}=H;if(Y.renderPass==="translucent"){let de=new ma(Y.context.gl.LEQUAL,ma.ReadWrite,Y.depthRangeFor3D);if($!==1||P.paint.get("fill-extrusion-pattern").constantOr(1))na(Y,d,P,N,de,Ca.disabled,Ja.disabled,se),na(Y,d,P,N,de,Y.stencilModeFor3D(),Y.colorModeForRenderPass(),se);else{let Ae=Y.colorModeForRenderPass();na(Y,d,P,N,de,Ca.disabled,Ae,se)}}},hillshade:function(Y,d,P,N,H){if(Y.renderPass!=="offscreen"&&Y.renderPass!=="translucent")return;let{isRenderingToTexture:$}=H,se=Y.context,de=Y.style.projection.useSubdivision,Ae=Y.getDepthModeForSublayer(0,ma.ReadOnly),Fe=Y.colorModeForRenderPass();if(Y.renderPass==="offscreen")(function(Ie,Ye,st,ht,Pe,Xe,at){let xt=Ie.context,Et=xt.gl,Bt=ht.paint.get("resampling")==="nearest"?Et.NEAREST:Et.LINEAR;for(let St of st){let Pt=Ye.getTile(St),$t=Pt.dem;if(!($t!=null&&$t.data)||!Pt.needsHillshadePrepare)continue;let Ht=$t.dim,dr=$t.stride,Xr=$t.getPixels();if(xt.activeTexture.set(Et.TEXTURE1),xt.pixelStoreUnpackPremultiplyAlpha.set(!1),Pt.demTexture||(Pt.demTexture=Ie.getTileTexture(dr)),Pt.demTexture){let $r=Pt.demTexture;$r.update(Xr,{premultiply:!1}),$r.bind(Et.NEAREST,Et.CLAMP_TO_EDGE)}else Pt.demTexture=new i.T(xt,Xr,Et.RGBA,{premultiply:!1}),Pt.demTexture.bind(Et.NEAREST,Et.CLAMP_TO_EDGE);xt.activeTexture.set(Et.TEXTURE0);let Or=Pt.fbo;if(!Or){let $r=new i.T(xt,{width:Ht,height:Ht,data:null},Et.RGBA);$r.bind(Bt,Et.CLAMP_TO_EDGE),Or=Pt.fbo=xt.createFramebuffer(Ht,Ht,!0,!1),Or.colorAttachment.set($r.texture)}xt.bindFramebuffer.set(Or.framebuffer),xt.viewport.set([0,0,Ht,Ht]),Ie.useProgram("hillshadePrepare").draw(xt,Et.TRIANGLES,Pe,Xe,at,Sa.disabled,uh(Pt.tileID,$t),null,null,ht.id,Ie.rasterBoundsBuffer,Ie.quadTriangleIndexBuffer,Ie.rasterBoundsSegments),Pt.needsHillshadePrepare=!1}})(Y,d,N,P,Ae,Ca.disabled,Fe),se.viewport.set([0,0,Y.width,Y.height]);else if(Y.renderPass==="translucent")if(de){let[Ie,Ye,st]=Y.stencilConfigForOverlapTwoPass(N);Ha(Y,d,P,st,Ie,Ae,Fe,!1,$),Ha(Y,d,P,st,Ye,Ae,Fe,!0,$)}else{let[Ie,Ye]=Y.getStencilConfigForOverlapAndUpdateStencilID(N);Ha(Y,d,P,Ye,Ie,Ae,Fe,!1,$)}},colorRelief:function(Y,d,P,N,H){if(Y.renderPass!=="translucent"||!N.length)return;let{isRenderingToTexture:$}=H,se=Y.style.projection.useSubdivision,de=Y.getDepthModeForSublayer(0,ma.ReadOnly),Ae=Y.colorModeForRenderPass();if(se){let[Fe,Ie,Ye]=Y.stencilConfigForOverlapTwoPass(N);Ya(Y,d,P,Ye,Fe,de,Ae,!1,$),Ya(Y,d,P,Ye,Ie,de,Ae,!0,$)}else{let[Fe,Ie]=Y.getStencilConfigForOverlapAndUpdateStencilID(N);Ya(Y,d,P,Ie,Fe,de,Ae,!1,$)}},raster:function(Y,d,P,N,H){if(Y.renderPass!=="translucent"||P.paint.get("raster-opacity")===0||!N.length)return;let{isRenderingToTexture:$}=H,se=d.getSource(),de=Y.style.projection.useSubdivision;if(se instanceof qe)Pa(Y,d,P,N,null,!1,!1,se.tileCoords,se.flippedWindingOrder,$);else if(de){let[Ae,Fe,Ie]=Y.stencilConfigForOverlapTwoPass(N);Pa(Y,d,P,Ie,Ae,!1,!0,ho,!1,$),Pa(Y,d,P,Ie,Fe,!0,!0,ho,!1,$)}else{let[Ae,Fe]=Y.getStencilConfigForOverlapAndUpdateStencilID(N);Pa(Y,d,P,Fe,Ae,!1,!0,ho,!1,$)}},background:function(Y,d,P,N,H){var $;let se=P.paint.get("background-color"),de=P.paint.get("background-opacity");if(de===0)return;let{isRenderingToTexture:Ae}=H,Fe=Y.context,Ie=Fe.gl,Ye=Y.style.projection,st=Y.transform,ht=st.tileSize,Pe=P.paint.get("background-pattern");if(Y.isPatternMissing(Pe))return;let Xe=!Pe&&se.a===1&&de===1&&Y.opaquePassEnabledForLayer()?"opaque":"translucent";if(Y.renderPass!==Xe)return;let at=Ca.disabled,xt=Y.getDepthModeForSublayer(0,Xe==="opaque"?ma.ReadWrite:ma.ReadOnly),Et=Y.colorModeForRenderPass(),Bt=Y.useProgram(Pe?"backgroundPattern":"background"),St=N||ft(st,{tileSize:ht,terrain:Y.style.map.terrain});Pe&&(Fe.activeTexture.set(Ie.TEXTURE0),Y.imageManager.bind(Y.context));let Pt=P.getCrossfadeParameters();for(let $t of St){let Ht=st.getProjectionData({overscaledTileID:$t,applyGlobeMatrix:!Ae,applyTerrainMatrix:!0}),dr=Pe?xd(de,Y,Pe,{tileID:$t,tileSize:ht},Pt):wl(de,se),Xr=($=Y.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData($t),Or=Ye.getMeshFromTileID(Fe,$t.canonical,!1,!0,"raster");Bt.draw(Fe,Ie.TRIANGLES,xt,at,Et,Sa.backCCW,dr,Xr,Ht,P.id,Or.vertexBuffer,Or.indexBuffer,Or.segments)}},sky:function(Y,d){let P=Y.context,N=P.gl,H=((Ie,Ye,st)=>{let ht=Math.cos(Ye.rollInRadians),Pe=Math.sin(Ye.rollInRadians),Xe=or(Ye),at=Ye.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:Ie.properties.get("sky-color"),u_horizon_color:Ie.properties.get("horizon-color"),u_horizon:[(Ye.width/2-Xe*Pe)*st,(Ye.height/2+Xe*ht)*st],u_horizon_normal:[-Pe,ht],u_sky_horizon_blend:Ie.properties.get("sky-horizon-blend")*Ye.height/2*st,u_sky_blend:at}})(d,Y.style.map.transform,Y.pixelRatio),$=new ma(N.LEQUAL,ma.ReadWrite,[0,1]),se=Ca.disabled,de=Y.colorModeForRenderPass(),Ae=Y.useProgram("sky"),Fe=Yl(P,d);Ae.draw(P,N.TRIANGLES,$,se,de,Sa.disabled,H,null,void 0,"sky",Fe.vertexBuffer,Fe.indexBuffer,Fe.segments)},atmosphere:function(Y,d,P){let N=Y.context,H=N.gl,$=Y.useProgram("atmosphere"),se=new ma(H.LEQUAL,ma.ReadOnly,[0,1]),de=Y.transform,Ae=(function(at,xt){let Et=at.properties.get("position"),Bt=[-Et.x,-Et.y,-Et.z],St=i.ap(new Float64Array(16));return at.properties.get("anchor")==="map"&&(i.be(St,St,xt.rollInRadians),i.bf(St,St,-xt.pitchInRadians),i.be(St,St,xt.bearingInRadians),i.bf(St,St,xt.center.lat*Math.PI/180),i.bI(St,St,-xt.center.lng*Math.PI/180)),i.cg(Bt,Bt,St),Bt})(P,Y.transform),Fe=de.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Ie=d.properties.get("atmosphere-blend")*Fe.projectionTransition;if(Ie===0)return;let Ye=Ks(de.worldSize,de.center.lat),st=de.inverseProjectionMatrix,ht=new Float64Array(4);ht[3]=1,i.aE(ht,ht,de.modelViewProjectionMatrix),ht[0]/=ht[3],ht[1]/=ht[3],ht[2]/=ht[3],ht[3]=1,i.aE(ht,ht,st),ht[0]/=ht[3],ht[1]/=ht[3],ht[2]/=ht[3],ht[3]=1;let Pe=((at,xt,Et,Bt,St)=>({u_sun_pos:at,u_atmosphere_blend:xt,u_globe_position:Et,u_globe_radius:Bt,u_inv_proj_matrix:St}))(Ae,Ie,[ht[0],ht[1],ht[2]],Ye,st),Xe=Yl(N,d);$.draw(N,H.TRIANGLES,se,Ca.disabled,Ja.alphaBlended,Sa.disabled,Pe,null,null,"atmosphere",Xe.vertexBuffer,Xe.indexBuffer,Xe.segments)},custom:function(Y,d,P,N){let{isRenderingGlobe:H}=N,$=Y.context,se=P.implementation,de=Y.style.projection,Ae=Y.transform,Fe=Ae.getProjectionDataForCustomLayer(H),Ie={farZ:Ae.farZ,nearZ:Ae.nearZ,fov:Ae.fov*Math.PI/180,modelViewProjectionMatrix:Ae.modelViewProjectionMatrix,projectionMatrix:Ae.projectionMatrix,shaderData:{variantName:de.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; uniform mat4 u_projection_matrix; -${de.shaderPreludeCode.vertexSource}`,define:de.shaderDefine},defaultProjectionData:Fe},Ye=se.renderingMode?se.renderingMode:"2d";if(Y.renderPass==="offscreen"){let st=se.prerender;st&&(Y.setCustomLayerDefaults(),$.setColorMode(Y.colorModeForRenderPass()),st.call(se,$.gl,Ie),$.setDirty(),Y.setBaseState())}else if(Y.renderPass==="translucent"){Y.setCustomLayerDefaults(),$.setColorMode(Y.colorModeForRenderPass()),$.setStencilMode(Ca.disabled);let st=Ye==="3d"?Y.getDepthModeFor3D():Y.getDepthModeForSublayer(0,ma.ReadOnly);$.setDepthMode(st),se.render($.gl,Ie),$.setDirty(),Y.setBaseState(),$.bindFramebuffer.set(null)}},debug:function(Y,d,P){for(let N of P)Zu(Y,d,N)},debugPadding:function(Y){let d=Y.transform.padding;Qs(Y,Y.transform.height-(d.top||0),3,fs),Qs(Y,d.bottom||0,3,Io),zl(Y,d.left||0,3,oi),zl(Y,Y.transform.width-(d.right||0),3,ro);let P=Y.transform.centerPoint;(function(N,H,$,se){cu(N,H-1,$-10,2,20,se),cu(N,H-10,$-1,20,2,se)})(Y,P.x,Y.transform.height-P.y,Go)},terrainDepth:function(Y,d){let P=Y.context,N=P.gl,H=Y.transform,$=Ja.unblended,se=new ma(N.LEQUAL,ma.ReadWrite,[0,1]),de=d.tileManager.getRenderableTiles(),Ae=Y.useProgram("terrainDepth");P.bindFramebuffer.set(d.getFramebuffer("depth").framebuffer),P.viewport.set([0,0,Y.width/devicePixelRatio,Y.height/devicePixelRatio]),P.clear({color:i.bo.transparent,depth:1});for(let Fe of de){let Ie=d.getTerrainMesh(Fe.tileID),Ye=d.getTerrainData(Fe.tileID),st=H.getProjectionData({overscaledTileID:Fe.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),dt={u_ele_delta:d.getMeshFrameDelta(H.zoom)};Ae.draw(P,N.TRIANGLES,se,Ca.disabled,$,Sa.backCCW,dt,Ye,st,"terrain",Ie.vertexBuffer,Ie.indexBuffer,Ie.segments)}P.bindFramebuffer.set(null),P.viewport.set([0,0,Y.width,Y.height])},terrainCoords:function(Y,d){let P=Y.context,N=P.gl,H=Y.transform,$=Ja.unblended,se=new ma(N.LEQUAL,ma.ReadWrite,[0,1]),de=d.getCoordsTexture(),Ae=d.tileManager.getRenderableTiles(),Fe=Y.useProgram("terrainCoords");P.bindFramebuffer.set(d.getFramebuffer("coords").framebuffer),P.viewport.set([0,0,Y.width/devicePixelRatio,Y.height/devicePixelRatio]),P.clear({color:i.bo.transparent,depth:1}),d.coordsIndex=[];for(let Ie of Ae){let Ye=d.getTerrainMesh(Ie.tileID),st=d.getTerrainData(Ie.tileID);P.activeTexture.set(N.TEXTURE0),N.bindTexture(N.TEXTURE_2D,de.texture);let dt={u_terrain_coords_id:(255-d.coordsIndex.length)/255,u_texture:0,u_ele_delta:d.getMeshFrameDelta(H.zoom)},Pe=H.getProjectionData({overscaledTileID:Ie.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});Fe.draw(P,N.TRIANGLES,se,Ca.disabled,$,Sa.backCCW,dt,st,Pe,"terrain",Ye.vertexBuffer,Ye.indexBuffer,Ye.segments),d.coordsIndex.push(Ie.tileID.key)}P.bindFramebuffer.set(null),P.viewport.set([0,0,Y.width,Y.height])}};class $u{constructor(d,P){this.drawFunctions=lf,this.context=new yt(d),this.transform=P,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:i.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Zr.maxOverzooming+Zr.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new $a}resize(d,P,N){if(this.width=Math.floor(d*N),this.height=Math.floor(P*N),this.pixelRatio=N,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let H of this.style._order)this.style._layers[H].resize()}setup(){let d=this.context,P=new i.aU;P.emplaceBack(0,0),P.emplaceBack(i.a6,0),P.emplaceBack(0,i.a6),P.emplaceBack(i.a6,i.a6),this.tileExtentBuffer=d.createVertexBuffer(P,vs.members),this.tileExtentSegments=i.aV.simpleSegment(0,0,4,2);let N=new i.aU;N.emplaceBack(0,0),N.emplaceBack(i.a6,0),N.emplaceBack(0,i.a6),N.emplaceBack(i.a6,i.a6),this.debugBuffer=d.createVertexBuffer(N,vs.members),this.debugSegments=i.aV.simpleSegment(0,0,4,5);let H=new i.ch;H.emplaceBack(0,0,0,0),H.emplaceBack(i.a6,0,i.a6,0),H.emplaceBack(0,i.a6,0,i.a6),H.emplaceBack(i.a6,i.a6,i.a6,i.a6),this.rasterBoundsBuffer=d.createVertexBuffer(H,sh.members),this.rasterBoundsSegments=i.aV.simpleSegment(0,0,4,2);let $=new i.aU;$.emplaceBack(0,0),$.emplaceBack(i.a6,0),$.emplaceBack(0,i.a6),$.emplaceBack(i.a6,i.a6),this.rasterBoundsBufferPosOnly=d.createVertexBuffer($,vs.members),this.rasterBoundsSegmentsPosOnly=i.aV.simpleSegment(0,0,4,5);let se=new i.aU;se.emplaceBack(0,0),se.emplaceBack(1,0),se.emplaceBack(0,1),se.emplaceBack(1,1),this.viewportBuffer=d.createVertexBuffer(se,vs.members),this.viewportSegments=i.aV.simpleSegment(0,0,4,2);let de=new i.ci;de.emplaceBack(0),de.emplaceBack(1),de.emplaceBack(3),de.emplaceBack(2),de.emplaceBack(0),this.tileBorderIndexBuffer=d.createIndexBuffer(de);let Ae=new i.aW;Ae.emplaceBack(1,0,2),Ae.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=d.createIndexBuffer(Ae);let Fe=this.context.gl;this.stencilClearMode=new Ca({func:Fe.ALWAYS,mask:0},0,255,Fe.ZERO,Fe.ZERO,Fe.ZERO),this.tileExtentMesh=new ka(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let d=this.context,P=d.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let N=i.O();i.c7(N,0,this.width,this.height,0,0,1),i.S(N,N,[P.drawingBufferWidth,P.drawingBufferHeight,0]);let H={mainMatrix:N,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:N};this.useProgram("clippingMask",null,!0).draw(d,P.TRIANGLES,ma.disabled,this.stencilClearMode,Ja.disabled,Sa.disabled,null,null,H,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(d,P,N){if(this.currentStencilSource===d.source||!d.isTileClipped()||!(P!=null&&P.length))return;this.currentStencilSource=d.source,this.nextStencilID+P.length>256&&this.clearStencil();let H=this.context;H.setColorMode(Ja.disabled),H.setDepthMode(ma.disabled);let $={};for(let se of P)$[se.key]=this.nextStencilID++;this._renderTileMasks($,P,N,!0),this._renderTileMasks($,P,N,!1),this._tileClippingMaskIDs=$}_renderTileMasks(d,P,N,H){var $;let se=this.context,de=se.gl,Ae=this.style.projection,Fe=this.transform,Ie=this.useProgram("clippingMask");for(let Ye of P){let st=d[Ye.key],dt=($=this.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData(Ye),Pe=Ae.getMeshFromTileID(this.context,Ye.canonical,H,!0,"stencil"),Xe=Fe.getProjectionData({overscaledTileID:Ye,applyGlobeMatrix:!N,applyTerrainMatrix:!0});Ie.draw(se,de.TRIANGLES,ma.disabled,new Ca({func:de.ALWAYS,mask:0},st,255,de.KEEP,de.KEEP,de.REPLACE),Ja.disabled,N?Sa.disabled:Sa.backCCW,null,dt,Xe,"$clipping",Pe.vertexBuffer,Pe.indexBuffer,Pe.segments)}}_renderTilesDepthBuffer(){var d;let P=this.context,N=P.gl,H=this.style.projection,$=this.transform,se=this.useProgram("depth"),de=this.getDepthModeFor3D(),Ae=ft($,{tileSize:$.tileSize});for(let Fe of Ae){let Ie=(d=this.style.map.terrain)===null||d===void 0?void 0:d.getTerrainData(Fe),Ye=H.getMeshFromTileID(this.context,Fe.canonical,!0,!0,"raster"),st=$.getProjectionData({overscaledTileID:Fe,applyGlobeMatrix:!0,applyTerrainMatrix:!0});se.draw(P,N.TRIANGLES,de,Ca.disabled,Ja.disabled,Sa.backCCW,null,Ie,st,"$clipping",Ye.vertexBuffer,Ye.indexBuffer,Ye.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let d=this.nextStencilID++,P=this.context.gl;return new Ca({func:P.NOTEQUAL,mask:255},d,255,P.KEEP,P.KEEP,P.REPLACE)}stencilModeForClipping(d){let P=this.context.gl;return new Ca({func:P.EQUAL,mask:255},this._tileClippingMaskIDs[d.key],0,P.KEEP,P.KEEP,P.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(d){let P=this.context.gl,N=d.sort(((se,de)=>de.overscaledZ-se.overscaledZ)),H=N[N.length-1].overscaledZ,$=N[0].overscaledZ-H+1;if($>1){this.currentStencilSource=void 0,this.nextStencilID+$>256&&this.clearStencil();let se={};for(let de=0;de<$;de++)se[de+H]=new Ca({func:P.GEQUAL,mask:255},de+this.nextStencilID,255,P.KEEP,P.KEEP,P.REPLACE);return this.nextStencilID+=$,[se,N]}return[{[H]:Ca.disabled},N]}stencilConfigForOverlapTwoPass(d){let P=this.context.gl,N=d.sort(((se,de)=>de.overscaledZ-se.overscaledZ)),H=N[N.length-1].overscaledZ,$=N[0].overscaledZ-H+1;if(this.clearStencil(),$>1){let se={},de={};for(let Ae=0;Ae<$;Ae++)se[Ae+H]=new Ca({func:P.GREATER,mask:255},$+1+Ae,255,P.KEEP,P.KEEP,P.REPLACE),de[Ae+H]=new Ca({func:P.GREATER,mask:255},1+Ae,255,P.KEEP,P.KEEP,P.REPLACE);return this.nextStencilID=2*$+1,[se,de,N]}return this.nextStencilID=3,[{[H]:new Ca({func:P.GREATER,mask:255},2,255,P.KEEP,P.KEEP,P.REPLACE)},{[H]:new Ca({func:P.GREATER,mask:255},1,255,P.KEEP,P.KEEP,P.REPLACE)},N]}colorModeForRenderPass(){let d=this.context.gl;return this._showOverdrawInspector?new Ja([d.CONSTANT_COLOR,d.ONE],new i.bo(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Ja.unblended:Ja.alphaBlended}getDepthModeForSublayer(d,P,N){if(!this.opaquePassEnabledForLayer())return ma.disabled;let H=1-((1+this.currentLayer)*this.numSublayers+d)*this.depthEpsilon;return new ma(N||this.context.gl.LEQUAL,P,[H,H])}getDepthModeFor3D(){return new ma(this.context.gl.LEQUAL,ma.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer0};for(let dt in de){let Pe=de[dt];Pe.used&&Pe.prepare(this.context),Ae[dt]=Pe.getVisibleCoordinates(!1),Fe[dt]=Ae[dt].slice().reverse(),Ie[dt]=Pe.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let dt=0;dtthis.useProgram(dt)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:P.showOverdrawInspector?i.bo.black:i.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=P.showOverdrawInspector,this.depthRangeFor3D=[0,1-(d._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=se.length-1;this.currentLayer>=0;this.currentLayer--){let dt=this.style._layers[se[this.currentLayer]],Pe=de[dt.source],Xe=Ae[dt.source];this._renderTileClippingMasks(dt,Xe,!1),this.renderLayer(this,Pe,dt,Xe,Ye)}this.renderPass="translucent";let st=!1;for(this.currentLayer=0;this.currentLayerPt.source&&!Pt.isHidden(Xe)?[Pe.tileManagers[Pt.source]]:[])),Et=xt.filter((Pt=>Pt.getSource().type==="vector")),Bt=xt.filter((Pt=>Pt.getSource().type!=="vector")),St=Pt=>{(!at||at.getSource().maxzoom0?P.pop():null}isPatternMissing(d){if(!d)return!1;if(!d.from||!d.to)return!0;let P=this.imageManager.getPattern(d.from.toString()),N=this.imageManager.getPattern(d.to.toString());return!P||!N}useProgram(d,P,N=!1,H=[]){var $;this.cache||(this.cache={});let se=!!this.style.map.terrain,de=this.style.projection,Ae=N?Oa.projectionMercator:de.shaderPreludeCode,Fe=N?yo:de.shaderDefine,Ie=d+(P?P.cacheKey:"")+`/${N?so:de.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(se?"/terrain":"")+(H?`/${H.join("/")}`:"");return($=this.cache)[Ie]||($[Ie]=new Ud(this.context,Oa[d],P,_d[d],this._showOverdrawInspector,se,Ae,Fe,H)),this.cache[Ie]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let d=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(d.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new i.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var d,P;if(this._tileTextures){for(let N in this._tileTextures){let H=this._tileTextures[N];if(H)for(let $ of H)$.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((d=this.tileExtentMesh.vertexBuffer)===null||d===void 0||d.destroy()),this.tileExtentMesh&&((P=this.tileExtentMesh.indexBuffer)===null||P===void 0||P.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let N in this.cache){let H=this.cache[N];H!=null&&H.program&&this.context.gl.deleteProgram(H.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:d,drawingBufferHeight:P}=this.context.gl;return this.width!==d||this.height!==P}}function ph(Y,d){let P,N=!1,H=null,$=()=>{H=null,N&&(Y(...P),H=setTimeout($,d),N=!1)};return(...se)=>(N=!0,P=se,H||$(),H)}$u.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class gh{constructor(d){this._getCurrentHash=()=>{let P=window.location.hash.replace("#","");if(this._hashName){let N,H=P.split("&").map(($=>$.split("=")));for(let $ of H)$[0]===this._hashName&&(N=$);return(N&&N[1]||"").split("/")}return P.split("/")},this._onHashChange=()=>{let P=this._getCurrentHash();if(!this._isValidHash(P))return!1;let N=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(P[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+P[2],+P[1]],zoom:+P[0],bearing:N,pitch:+(P[4]||0)}),!0},this._updateHashUnthrottled=()=>{let P=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,P)},this._removeHash=()=>{let P=this._getCurrentHash();if(P.length===0)return;let N=P.join("/"),H=N;H.split("&").length>0&&(H=H.split("&")[0]),this._hashName&&(H=`${this._hashName}=${N}`);let $=window.location.hash.replace(H,"");$.startsWith("#&")?$=$.slice(0,1)+$.slice(2):$==="#"&&($="");let se=window.location.href.replace(/(#.+)?$/,$);se=se.replace("&&","&"),window.history.replaceState(window.history.state,null,se)},this._updateHash=ph(this._updateHashUnthrottled,300),this._hashName=d&&encodeURIComponent(d)}addTo(d){return this._map=d,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(d){let P=this._map.getCenter(),N=Math.round(100*this._map.getZoom())/100,H=Math.ceil((N*Math.LN2+Math.log(512/360/.5))/Math.LN10),$=Math.pow(10,H),se=Math.round(P.lng*$)/$,de=Math.round(P.lat*$)/$,Ae=this._map.getBearing(),Fe=this._map.getPitch(),Ie="";if(Ie+=d?`/${se}/${de}/${N}`:`${N}/${de}/${se}`,(Ae||Fe)&&(Ie+="/"+Math.round(10*Ae)/10),Fe&&(Ie+=`/${Math.round(Fe)}`),this._hashName){let Ye=this._hashName,st=!1,dt=window.location.hash.slice(1).split("&").map((Pe=>{let Xe=Pe.split("=")[0];return Xe===Ye?(st=!0,`${Xe}=${Ie}`):Pe})).filter((Pe=>Pe));return st||dt.push(`${Ye}=${Ie}`),`#${dt.join("&")}`}return`#${Ie}`}_isValidHash(d){if(d.length<3||d.some(isNaN))return!1;try{new i.W(+d[2],+d[1])}catch($){return!1}let P=+d[0],N=+(d[3]||0),H=+(d[4]||0);return P>=this._map.getMinZoom()&&P<=this._map.getMaxZoom()&&N>=-180&&N<=180&&H>=this._map.getMinPitch()&&H<=this._map.getMaxPitch()}}let uf={linearity:.3,easing:i.cv(0,0,.3,1)},Ku=i.e({deceleration:2500,maxSpeed:1400},uf),fu=i.e({deceleration:20,maxSpeed:1400},uf),Ju=i.e({deceleration:1e3,maxSpeed:360},uf),Qu=i.e({deceleration:1e3,maxSpeed:90},uf),Wd=i.e({deceleration:1e3,maxSpeed:360},uf);class x0{constructor(d){this._map=d,this.clear()}clear(){this._inertiaBuffer=[]}record(d){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:g(),settings:d})}_drainInertiaBuffer(){let d=this._inertiaBuffer,P=g();for(;d.length>0&&P-d[0].time>160;)d.shift()}_onMoveEnd(d){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let P={zoom:0,bearing:0,pitch:0,roll:0,pan:new i.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:$}of this._inertiaBuffer)P.zoom+=$.zoomDelta||0,P.bearing+=$.bearingDelta||0,P.pitch+=$.pitchDelta||0,P.roll+=$.rollDelta||0,$.panDelta&&P.pan._add($.panDelta),$.around&&(P.around=$.around),$.pinchAround&&(P.pinchAround=$.pinchAround);let N=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,H={};if(P.pan.mag()){let $=Al(P.pan.mag(),N,i.e({},Ku,d||{})),se=P.pan.mult($.amount/P.pan.mag()),de=this._map.cameraHelper.handlePanInertia(se,this._map.transform);H.center=de.easingCenter,H.offset=de.easingOffset,Bf(H,$)}if(P.zoom){let $=Al(P.zoom,N,fu);H.zoom=i.cw(this._map.transform.zoom+$.amount,this._map.getZoomSnap(),$.amount),Bf(H,$)}if(P.bearing){let $=Al(P.bearing,N,Ju);H.bearing=this._map.transform.bearing+i.al($.amount,-179,179),Bf(H,$)}if(P.pitch){let $=Al(P.pitch,N,Qu);H.pitch=this._map.transform.pitch+$.amount,Bf(H,$)}if(P.roll){let $=Al(P.roll,N,Wd);H.roll=this._map.transform.roll+i.al($.amount,-179,179),Bf(H,$)}if(H.zoom||H.bearing){let $=P.pinchAround===void 0?P.around:P.pinchAround;H.around=$?this._map.unproject($):this._map.getCenter()}return this.clear(),i.e(H,{noMoveStart:!0})}}function Bf(Y,d){(!Y.duration||Y.durationP.unproject(Ae))),de=$.reduce(((Ae,Fe,Ie,Ye)=>Ae.add(Fe.div(Ye.length))),new i.P(0,0));super(d,{points:$,point:de,lngLats:se,lngLat:P.unproject(de),originalEvent:N}),this._defaultPrevented=!1}}class jh extends i.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(d,P,N){super(d,{originalEvent:N}),this._defaultPrevented=!1}}class Wh{constructor(d,P){this._map=d,this._clickTolerance=P.clickTolerance}reset(){delete this._mousedownPos}wheel(d){return this._firePreventable(new jh(d.type,this._map,d))}mousedown(d,P){return this._mousedownPos=P,this._firePreventable(new Xl(d.type,this._map,d))}mouseup(d){this._map.fire(new Xl(d.type,this._map,d))}click(d,P){this._mousedownPos&&this._mousedownPos.dist(P)>=this._clickTolerance||this._map.fire(new Xl(d.type,this._map,d))}dblclick(d){return this._firePreventable(new Xl(d.type,this._map,d))}mouseover(d){this._map.fire(new Xl(d.type,this._map,d))}mouseout(d){this._map.fire(new Xl(d.type,this._map,d))}touchstart(d){return this._firePreventable(new cf(d.type,this._map,d))}touchmove(d){this._map.fire(new cf(d.type,this._map,d))}touchend(d){this._map.fire(new cf(d.type,this._map,d))}touchcancel(d){this._map.fire(new cf(d.type,this._map,d))}_firePreventable(d){if(this._map.fire(d),d.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Yh{constructor(d){this._map=d}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(d){this._map.fire(new Xl(d.type,this._map,d))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Xl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(d){this._delayContextMenu?this._contextMenuEvent=d:this._ignoreContextMenu||this._map.fire(new Xl(d.type,this._map,d)),this._map.listens("contextmenu")&&d.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class hu{constructor(d){this._map=d}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(d){return this.transform.screenPointToLocation(i.P.convert(d),this._map.terrain)}}class Mu{constructor(d,P){this._map=d,this._tr=new hu(d),this._el=d.getCanvasContainer(),this._container=d.getContainer(),this._clickTolerance=P.clickTolerance||1,P.boxZoom&&typeof P.boxZoom=="object"&&(this._boxZoomEnd=P.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(d,P){this.isEnabled()&&d.shiftKey&&d.button===0&&(_.disableDrag(),this._startPos=this._lastPos=P,this._active=!0)}mousemoveWindow(d,P){if(!this._active)return;let N=P;if(this._lastPos.equals(N)||!this._box&&N.dist(this._startPos)$.fitScreenCoordinates(N,H,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",d)}keydown(d){this._active&&d.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",d))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),_.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(d,P){return this._map.fire(new i.n(d,{originalEvent:P}))}}function _i(Y,d){if(Y.length!==d.length)throw new Error(`The number of touches and points are not equal - touches ${Y.length}, points ${d.length}`);let P={};for(let N=0;Nthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=d.timeStamp),N.length===this.numTouches&&(this.centroid=(function(H){let $=new i.P(0,0);for(let se of H)$._add(se);return $.div(H.length)})(P),this.touches=_i(N,P)))}touchmove(d,P,N){if(this.aborted||!this.centroid)return;let H=_i(N,P);for(let $ in this.touches){let se=H[$];(!se||se.dist(this.touches[$])>30)&&(this.aborted=!0)}}touchend(d,P,N){if((!this.centroid||d.timeStamp-this.startTime>500)&&(this.aborted=!0),N.length===0){let H=!this.aborted&&this.centroid;if(this.reset(),H)return H}}}class Me{constructor(d){this.singleTap=new Su(d),this.numTaps=d.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(d,P,N){this.singleTap.touchstart(d,P,N)}touchmove(d,P,N){this.singleTap.touchmove(d,P,N)}touchend(d,P,N){let H=this.singleTap.touchend(d,P,N);if(H){let $=d.timeStamp-this.lastTime<500,se=!this.lastTap||this.lastTap.dist(H)<30;if($&&se||this.reset(),this.count++,this.lastTime=d.timeStamp,this.lastTap=H,this.count===this.numTaps)return this.reset(),H}}}class Ce{constructor(d){this._tr=new hu(d),this._zoomIn=new Me({numTouches:1,numTaps:2}),this._zoomOut=new Me({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(d,P,N){this._zoomIn.touchstart(d,P,N),this._zoomOut.touchstart(d,P,N)}touchmove(d,P,N){this._zoomIn.touchmove(d,P,N),this._zoomOut.touchmove(d,P,N)}touchend(d,P,N){let H=this._zoomIn.touchend(d,P,N),$=this._zoomOut.touchend(d,P,N),se=this._tr;return H?(this._active=!0,d.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:de=>de.easeTo({duration:300,zoom:i.cw(se.zoom+1,de.getZoomSnap()),around:se.unproject(H)},{originalEvent:d})}):$?(this._active=!0,d.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:de=>de.easeTo({duration:300,zoom:i.cw(se.zoom-1,de.getZoomSnap()),around:se.unproject($)},{originalEvent:d})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Be{constructor(d){this._enabled=!!d.enable,this._moveStateManager=d.moveStateManager,this._clickTolerance=d.clickTolerance||1,this._moveFunction=d.move,this._activateOnStart=!!d.activateOnStart,d.assignEvents(this),this.reset()}reset(d){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(d)}_move(...d){let P=this._moveFunction(...d);if(P.bearingDelta||P.pitchDelta||P.rollDelta||P.around||P.panDelta)return this._active=!0,P}dragStart(d,P){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(d)&&(this._moveStateManager.startMove(d),this._lastPoint=Array.isArray(P)?P[0]:P,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(d,P){if(!this.isEnabled())return;let N=this._lastPoint;if(!N)return;if(d.preventDefault(),!this._moveStateManager.isValidMoveEvent(d))return void this.reset(d);let H=Array.isArray(P)?P[0]:P;return!this._moved&&H.dist(N)!0}),P=new Gt){this.mouseMoveStateManager=d,this.oneFingerTouchMoveStateManager=P}_executeRelevantHandler(d,P,N){return d instanceof MouseEvent?P(d):typeof TouchEvent!="undefined"&&d instanceof TouchEvent?N(d):void 0}startMove(d){this._executeRelevantHandler(d,(P=>{this.mouseMoveStateManager.startMove(P)}),(P=>{this.oneFingerTouchMoveStateManager.startMove(P)}))}endMove(d){this._executeRelevantHandler(d,(P=>{this.mouseMoveStateManager.endMove(P)}),(P=>{this.oneFingerTouchMoveStateManager.endMove(P)}))}isValidStartEvent(d){return this._executeRelevantHandler(d,(P=>this.mouseMoveStateManager.isValidStartEvent(P)),(P=>this.oneFingerTouchMoveStateManager.isValidStartEvent(P)))}isValidMoveEvent(d){return this._executeRelevantHandler(d,(P=>this.mouseMoveStateManager.isValidMoveEvent(P)),(P=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(P)))}isValidEndEvent(d){return this._executeRelevantHandler(d,(P=>this.mouseMoveStateManager.isValidEndEvent(P)),(P=>this.oneFingerTouchMoveStateManager.isValidEndEvent(P)))}}let Nt=Y=>{Y.mousedown=Y.dragStart,Y.mousemoveWindow=Y.dragMove,Y.mouseup=Y.dragEnd,Y.contextmenu=d=>{d.preventDefault()}};class Kt{constructor(d,P){this._clickTolerance=d.clickTolerance||1,this._map=P,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new i.P(0,0)}_shouldBePrevented(d){return d<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(d,P,N){return this._calculateTransform(d,P,N)}touchmove(d,P,N){if(this._active){if(!this._shouldBePrevented(N.length))return d.preventDefault(),this._calculateTransform(d,P,N);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",d)}}touchend(d,P,N){this._calculateTransform(d,P,N),this._active&&this._shouldBePrevented(N.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(d,P,N){N.length>0&&(this._active=!0);let H=_i(N,P),$=new i.P(0,0),se=new i.P(0,0),de=0;for(let Fe in H){let Ie=H[Fe],Ye=this._touches[Fe];Ye&&($._add(Ie),se._add(Ie.sub(Ye)),de++,H[Fe]=Ie)}if(this._touches=H,this._shouldBePrevented(de)||!se.mag())return;let Ae=se.div(de);return this._sum._add(Ae),this._sum.mag()Math.abs(Y.x)}class Bi extends ur{constructor(d){super(),this._currentTouchCount=0,this._map=d}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(d,P,N){super.touchstart(d,P,N),this._currentTouchCount=N.length}_start(d){this._lastPoints=d,gi(d[0].sub(d[1]))&&(this._valid=!1)}_move(d,P,N){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let H=d[0].sub(this._lastPoints[0]),$=d[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(H,$,N.timeStamp),this._valid?(this._lastPoints=d,this._active=!0,{pitchDelta:(H.y+$.y)/2*-.5}):void 0}gestureBeginsVertically(d,P,N){if(this._valid!==void 0)return this._valid;let H=d.mag()>=2,$=P.mag()>=2;if(!H&&!$)return;if(!H||!$)return this._firstMove===void 0&&(this._firstMove=N),N-this._firstMove<100&&void 0;let se=d.y>0==P.y>0;return gi(d)&&gi(P)&&se}}let mi={panStep:100,bearingStep:15,pitchStep:10};class ia{constructor(d){this._tr=new hu(d);let P=mi;this._panStep=P.panStep,this._bearingStep=P.bearingStep,this._pitchStep=P.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(d){if(d.altKey||d.ctrlKey||d.metaKey)return;let P=0,N=0,H=0,$=0,se=0;switch(d.keyCode){case 61:case 107:case 171:case 187:P=1;break;case 189:case 109:case 173:P=-1;break;case 37:d.shiftKey?N=-1:(d.preventDefault(),$=-1);break;case 39:d.shiftKey?N=1:(d.preventDefault(),$=1);break;case 38:d.shiftKey?H=1:(d.preventDefault(),se=-1);break;case 40:d.shiftKey?H=-1:(d.preventDefault(),se=1);break;default:return}return this._rotationDisabled&&(N=0,H=0),{cameraAnimation:de=>{let Ae=this._tr;de.easeTo({duration:300,easeId:"keyboardHandler",easing:ua,zoom:P?i.cw(Ae.zoom+P*(d.shiftKey?2:1),de.getZoomSnap()):Ae.zoom,bearing:Ae.bearing+N*this._bearingStep,pitch:Ae.pitch+H*this._pitchStep,offset:[-$*this._panStep,-se*this._panStep],center:Ae.center},{originalEvent:d})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function ua(Y){return Y*(2-Y)}let lo=4.000244140625,Bo=1/450;class Ua{constructor(d,P){this._onTimeout=N=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(N)},this._map=d,this._tr=new hu(d),this._triggerRenderFrame=P,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Bo}setZoomRate(d){this._defaultZoomRate=d}setWheelZoomRate(d){this._wheelZoomRate=d}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(d){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!d&&d.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(d){return!!this._map.cooperativeGestures.isEnabled()&&!(d.ctrlKey||this._map.cooperativeGestures.isBypassed(d))}wheel(d){if(!this.isEnabled())return;if(this._shouldBePrevented(d))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",d);let P=d.deltaMode===WheelEvent.DOM_DELTA_LINE?40*d.deltaY:d.deltaY,N=g(),H=N-(this._lastWheelEventTime||0);this._lastWheelEventTime=N,P!==0&&P%lo==0?this._type="wheel":P!==0&&Math.abs(P)<4?this._type="trackpad":H>400?(this._type=null,this._lastValue=P,this._timeout=setTimeout(this._onTimeout,40,d)):this._type||(this._type=Math.abs(H*P)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,P+=this._lastValue)),d.shiftKey&&P&&(P/=4),this._type&&(this._lastWheelEvent=d,this._delta-=P,this._active||this._start(d)),d.preventDefault()}_start(d){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let P=_.mousePos(this._map.getCanvas(),d),N=this._tr;this._aroundPoint=this._aroundCenter?N.transform.locationToScreenPoint(i.W.convert(N.center)):P,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let d=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let de=d.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=de),typeof this._targetZoom=="number"&&(this._targetZoom+=de)}if(this._delta!==0){let de=this._type==="wheel"&&Math.abs(this._delta)>lo?this._wheelZoomRate:this._defaultZoomRate,Ae=2/(1+Math.exp(-Math.abs(this._delta*de)));this._delta<0&&Ae!==0&&(Ae=1/Ae);let Fe=typeof this._targetZoom!="number"?d.scale:i.ao(this._targetZoom),Ie=d.applyConstrain(d.getCameraLngLat(),i.ar(Fe*Ae)).zoom,Ye=this._map.getZoomSnap();if(this._type==="wheel"&&Ye>0){let st=i.cw(d.zoom,Ye);this._targetZoom=i.cw(Ie,Ye,Ie-st)}else this._targetZoom=Ie;this._type==="wheel"&&(this._startZoom=d.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let P=typeof this._targetZoom!="number"?d.zoom:this._targetZoom,N=this._startZoom,H=this._easing,$,se=!1;if(this._type==="wheel"&&N&&H){let de=g()-this._lastWheelEventTime,Ae=Math.min((de+5)/200,1),Fe=H(Ae);$=i.H.number(N,P,Fe),Ae<1?this._needsRerender=!0:se=!0}else $=P,se=!0;return this._active=!0,se&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout}),200)),this._lastExpectedZoom=$,{noInertia:!0,needsRenderFrame:!se,zoomDelta:$-d.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(d){let P=i.cy;if(this._prevEase){let N=this._prevEase,H=(g()-N.start)/N.duration,$=N.easing(H+.01)-N.easing(H),se=.27/Math.sqrt($*$+1e-4)*.01,de=Math.sqrt(.0729-se*se);P=i.cv(se,de,.25,1)}return this._prevEase={start:g(),duration:d,easing:P},P}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ls{constructor(d,P){this._clickZoom=d,this._tapZoom=P}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class cl{constructor(d){this._tr=new hu(d),this.reset()}reset(){this._active=!1}dblclick(d,P){return d.preventDefault(),{cameraAnimation:N=>{N.easeTo({duration:300,zoom:i.cw(this._tr.zoom+(d.shiftKey?-1:1),N.getZoomSnap()),around:this._tr.unproject(P)},{originalEvent:d})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Eu{constructor(){this._tap=new Me({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(d){this._zoomRate=d!=null?d:1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(d,P,N){if(!this._swipePoint)if(this._tapTime){let H=P[0],$=d.timeStamp-this._tapTime<500,se=this._tapPoint.dist(H)<30;$&&se?N.length>0&&(this._swipePoint=H,this._swipeTouch=N[0].identifier):this.reset()}else this._tap.touchstart(d,P,N)}touchmove(d,P,N){if(this._tapTime){if(this._swipePoint){if(N[0].identifier!==this._swipeTouch)return;let H=P[0],$=H.y-this._swipePoint.y;return this._swipePoint=H,d.preventDefault(),this._active=!0,{zoomDelta:$/128*this._zoomRate}}}else this._tap.touchmove(d,P,N)}touchend(d,P,N){if(this._tapTime)this._swipePoint&&N.length===0&&this.reset();else{let H=this._tap.touchend(d,P,N);H&&(this._tapTime=d.timeStamp,this._tapPoint=H)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class el{constructor(d,P,N){this._el=d,this._mousePan=P,this._touchPan=N}enable(d){this._inertiaOptions=d||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class yc{constructor(d,P,N,H){this._pitchWithRotate=d.pitchWithRotate,this._rollEnabled=d.rollEnabled,this._mouseRotate=P,this._mousePitch=N,this._mouseRoll=H}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class wi{constructor(d,P,N,H){this._el=d,this._touchZoom=P,this._touchRotate=N,this._tapDragZoom=H,this._rotationDisabled=!1,this._enabled=!0}enable(d){this._touchZoom.enable(d),this._rotationDisabled||this._touchRotate.enable(d),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(d){this._touchZoom.setZoomRate(d),this._tapDragZoom.setZoomRate(d)}setZoomThreshold(d){this._touchZoom.setZoomThreshold(d)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Di{constructor(d,P){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=d,this._options=P,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let d=this._map.getCanvasContainer();d.classList.add("maplibregl-cooperative-gestures"),this._container=_.create("div","maplibregl-cooperative-gesture-screen",d);let P=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(P=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let N=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),H=document.createElement("div");H.className="maplibregl-desktop-message",H.textContent=P,this._container.appendChild(H);let $=document.createElement("div");$.className="maplibregl-mobile-message",$.textContent=N,this._container.appendChild($),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(d){return d[this._bypassKey]}notifyGestureBlocked(d,P){this._enabled&&(this._map.fire(new i.n("cooperativegestureprevented",{gestureType:d,originalEvent:P})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}let fl=Y=>Y.zoom||Y.drag||Y.roll||Y.pitch||Y.rotate;class Fc extends i.n{}function du(Y){var d;return((d=Y.panDelta)===null||d===void 0?void 0:d.mag())||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta||Y.rollDelta}class ms{get _ownerDocument(){var d;return((d=this._el)===null||d===void 0?void 0:d.ownerDocument)||document}get _ownerWindow(){var d,P;return((P=(d=this._el)===null||d===void 0?void 0:d.ownerDocument)===null||P===void 0?void 0:P.defaultView)||window}constructor(d,P){this.handleWindowEvent=H=>{this.handleEvent(H,`${H.type}Window`)},this.handleEvent=(H,$)=>{if(H.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let se=H.type==="renderFrame"?void 0:H,de={needsRenderFrame:!1},Ae={},Fe={};for(let{handlerName:st,handler:dt,allowed:Pe}of this._handlers){if(!dt.isEnabled())continue;let Xe;if(this._blockedByActive(Fe,Pe,st))dt.reset();else if(dt[$||H.type]){if(i.cz(H,$||H.type)){let at=_.mousePos(this._map.getCanvas(),H);Xe=dt[$||H.type](H,at)}else if(i.cA(H,$||H.type)){let at=this._getMapTouches(H.touches),xt=_.touchPos(this._map.getCanvas(),at);Xe=dt[$||H.type](H,xt,at)}else i.cB($||H.type)||(Xe=dt[$||H.type](H));this.mergeHandlerResult(de,Ae,Xe,st,se),Xe!=null&&Xe.needsRenderFrame&&this._triggerRenderFrame()}(Xe||dt.isActive())&&(Fe[st]=dt)}let Ie={};for(let st in this._previousActiveHandlers)Fe[st]||(Ie[st]=se);this._previousActiveHandlers=Fe,(Object.keys(Ie).length||du(de))&&(this._changes.push([de,Ae,Ie]),this._triggerRenderFrame()),(Object.keys(Fe).length||du(de))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Ye}=de;Ye&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Ye(this._map))},this._map=d,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new x0(d),this._bearingSnap=P.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(P);let N=this._el;this._listeners=[[N,"touchstart",{passive:!0}],[N,"touchmove",{passive:!1}],[N,"touchend",void 0],[N,"touchcancel",void 0],[N,"mousedown",void 0],[N,"mousemove",void 0],[N,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[N,"mouseover",void 0],[N,"mouseout",void 0],[N,"dblclick",void 0],[N,"click",void 0],[N,"keydown",{capture:!1}],[N,"keyup",void 0],[N,"wheel",{passive:!1}],[N,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[H,$,se]of this._listeners)H.addEventListener($,H===this._ownerDocument?this.handleWindowEvent:this.handleEvent,se)}destroy(){for(let[d,P,N]of this._listeners)d.removeEventListener(P,d===this._ownerDocument?this.handleWindowEvent:this.handleEvent,N)}_addDefaultHandlers(d){let P=this._map,N=P.getCanvasContainer();this._add("mapEvent",new Wh(P,d));let H=P.boxZoom=new Mu(P,d);this._add("boxZoom",H),d.interactive&&d.boxZoom&&H.enable();let $=P.cooperativeGestures=new Di(P,d.cooperativeGestures);this._add("cooperativeGestures",$),d.cooperativeGestures&&$.enable();let se=new Ce(P),de=new cl(P);P.doubleClickZoom=new ls(de,se),this._add("tapZoom",se),this._add("clickZoom",de),d.interactive&&d.doubleClickZoom&&P.doubleClickZoom.enable();let Ae=new Eu;this._add("tapDragZoom",Ae);let Fe=P.touchPitch=new Bi(P);this._add("touchPitch",Fe),d.interactive&&d.touchPitch&&P.touchPitch.enable(d.touchPitch);let Ie=()=>P.project(P.getCenter()),Ye=(function({enable:St,clickTolerance:Pt,aroundCenter:$t=!0,minPixelCenterThreshold:Ht=100,rotateDegreesPerPixelMoved:dr=.8},Xr){let Or=new lt({checkCorrectEvent:$r=>$r.button===0&&$r.ctrlKey||$r.button===2&&!$r.ctrlKey});return new Be({clickTolerance:Pt,move:($r,Er)=>{let Tr=Xr();if($t&&Math.abs(Tr.y-$r.y)>Ht)return{bearingDelta:i.cx(new i.P($r.x,Er.y),Er,Tr)};let Rr=(Er.x-$r.x)*dr;return $t&&Er.ydr.button===0&&dr.ctrlKey||dr.button===2});return new Be({clickTolerance:Pt,move:(dr,Xr)=>({pitchDelta:(Xr.y-dr.y)*$t}),moveStateManager:Ht,enable:St,assignEvents:Nt})})(d),dt=(function({enable:St,clickTolerance:Pt,rollDegreesPerPixelMoved:$t=.3},Ht){let dr=new lt({checkCorrectEvent:Xr=>Xr.button===2&&Xr.ctrlKey});return new Be({clickTolerance:Pt,move:(Xr,Or)=>{let $r=Ht(),Er=(Or.x-Xr.x)*$t;return Or.y<$r.y&&(Er=-Er),{rollDelta:Er}},moveStateManager:dr,enable:St,assignEvents:Nt})})(d,Ie);P.dragRotate=new yc(d,Ye,st,dt),this._add("mouseRotate",Ye,["mousePitch"]),this._add("mousePitch",st,["mouseRotate","mouseRoll"]),this._add("mouseRoll",dt,["mousePitch"]),d.interactive&&d.dragRotate&&P.dragRotate.enable();let Pe=(function({enable:St,clickTolerance:Pt}){let $t=new lt({checkCorrectEvent:Ht=>Ht.button===0&&!Ht.ctrlKey});return new Be({clickTolerance:Pt,move:(Ht,dr)=>({around:dr,panDelta:dr.sub(Ht)}),activateOnStart:!0,moveStateManager:$t,enable:St,assignEvents:Nt})})(d),Xe=new Kt(d,P);P.dragPan=new el(N,Pe,Xe),this._add("mousePan",Pe),this._add("touchPan",Xe,["touchZoom","touchRotate"]),d.interactive&&d.dragPan&&P.dragPan.enable(d.dragPan);let at=new In,xt=new ln;P.touchZoomRotate=new wi(N,xt,at,Ae),this._add("touchRotate",at,["touchPan","touchZoom"]),this._add("touchZoom",xt,["touchPan","touchRotate"]),d.interactive&&d.touchZoomRotate&&P.touchZoomRotate.enable(d.touchZoomRotate),this._add("blockableMapEvent",new Yh(P));let Et=P.scrollZoom=new Ua(P,(()=>this._triggerRenderFrame()));this._add("scrollZoom",Et,["mousePan"]),d.interactive&&d.scrollZoom&&P.scrollZoom.enable(d.scrollZoom);let Bt=P.keyboard=new ia(P);this._add("keyboard",Bt),d.interactive&&d.keyboard&&P.keyboard.enable()}_add(d,P,N){this._handlers.push({handlerName:d,handler:P,allowed:N}),this._handlersById[d]=P}stop(d){if(!this._updatingCamera){for(let{handler:P}of this._handlers)P.reset();this._inertia.clear(),this._fireEvents({},{},d),this._changes=[]}}isActive(){for(let{handler:d}of this._handlers)if(d.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!fl(this._eventsInProgress)||this.isZooming()}_blockedByActive(d,P,N){for(let H in d)if(H!==N&&!(P!=null&&P.includes(H)))return!0;return!1}_getMapTouches(d){let P=[];for(let N of d)this._el.contains(N.target)&&P.push(N);return P}mergeHandlerResult(d,P,N,H,$){if(!N)return;i.e(d,N);let se={handlerName:H,originalEvent:N.originalEvent||$};N.zoomDelta!==void 0&&(P.zoom=se),N.panDelta!==void 0&&(P.drag=se),N.rollDelta!==void 0&&(P.roll=se),N.pitchDelta!==void 0&&(P.pitch=se),N.bearingDelta!==void 0&&(P.rotate=se)}_applyChanges(){let d={},P={},N={};for(let[H,$,se]of this._changes)H.panDelta&&(d.panDelta=(d.panDelta||new i.P(0,0))._add(H.panDelta)),H.zoomDelta&&(d.zoomDelta=(d.zoomDelta||0)+H.zoomDelta),H.bearingDelta&&(d.bearingDelta=(d.bearingDelta||0)+H.bearingDelta),H.pitchDelta&&(d.pitchDelta=(d.pitchDelta||0)+H.pitchDelta),H.rollDelta&&(d.rollDelta=(d.rollDelta||0)+H.rollDelta),H.around!==void 0&&(d.around=H.around),H.pinchAround!==void 0&&(d.pinchAround=H.pinchAround),H.noInertia&&(d.noInertia=H.noInertia),i.e(P,$),i.e(N,se);this._updateMapTransform(d,P,N),this._changes=[]}_updateMapTransform(d,P,N){let H=this._map,$=H._getTransformForUpdate(),se=H.terrain;if(!(du(d)||se&&this._terrainMovement))return void this._fireEvents(P,N,!0);H._stop(!0);let{panDelta:de,zoomDelta:Ae,bearingDelta:Fe,pitchDelta:Ie,rollDelta:Ye,around:st,pinchAround:dt}=d;dt!==void 0&&(st=dt),st||(st=H.transform.centerPoint),se&&!$.isPointOnMapSurface(st)&&(st=$.centerPoint);let Pe={panDelta:de,zoomDelta:Ae,rollDelta:Ye,pitchDelta:Ie,bearingDelta:Fe,around:st};this._map.cameraHelper.useGlobeControls&&!$.isPointOnMapSurface(st)&&(st=$.centerPoint);let Xe=st.distSqr($.centerPoint)<.01?$.center:$.screenPointToLocation(de?st.sub(de):st);this._handleMapControls({terrain:se,tr:$,deltasForHelper:Pe,preZoomAroundLoc:Xe,combinedEventsInProgress:P,panDelta:de}),H._applyUpdatedTransform($),this._map._update(),d.noInertia||this._inertia.record(d),this._fireEvents(P,N,!0)}_handleMapControls({terrain:d,tr:P,deltasForHelper:N,preZoomAroundLoc:H,combinedEventsInProgress:$,panDelta:se}){let de=this._map.cameraHelper;if(de.handleMapControlsRollPitchBearingZoom(N,P),d)return de.useGlobeControls?(this._terrainMovement||!$.drag&&!$.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void de.handleMapControlsPan(N,P,H)):this._terrainMovement||!$.drag&&!$.zoom?void($.drag&&this._terrainMovement&&se?P.setCenter(P.screenPointToLocation(P.centerPoint.sub(se))):de.handleMapControlsPan(N,P,H)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void de.handleMapControlsPan(N,P,H));de.handleMapControlsPan(N,P,H)}_fireEvents(d,P,N){let H=fl(this._eventsInProgress),$=fl(d),se={};for(let Ye in d){let{originalEvent:st}=d[Ye];this._eventsInProgress[Ye]||(se[`${Ye}start`]=st),this._eventsInProgress[Ye]=d[Ye]}!H&&$&&this._fireEvent("movestart",$.originalEvent);for(let Ye in se)this._fireEvent(Ye,se[Ye]);$&&this._fireEvent("move",$.originalEvent);for(let Ye in d){let{originalEvent:st}=d[Ye];this._fireEvent(Ye,st)}let de={},Ae;for(let Ye in this._eventsInProgress){let{handlerName:st,originalEvent:dt}=this._eventsInProgress[Ye];this._handlersById[st].isActive()||(delete this._eventsInProgress[Ye],Ae=P[st]||dt,de[`${Ye}end`]=Ae)}for(let Ye in de)this._fireEvent(Ye,de[Ye]);let Fe=fl(this._eventsInProgress),Ie=(H||$)&&!Fe;if(Ie&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Ye=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&Ye.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(Ye)}if(N&&Ie){this._updatingCamera=!0;let Ye=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),st=dt=>dt!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Fc("renderFrame",{timeStamp:d})),this._applyChanges()}))}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ff extends i.E{constructor(d,P,N){super(),this._renderFrameCallback=()=>{let H=Math.min((g()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(H)),H<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=d,this._bearingSnap=N.bearingSnap,this._zoomSnap=N.zoomSnap,this.cameraHelper=P,this.on("moveend",(()=>{delete this._requestedCameraState}))}migrateProjection(d,P){d.apply(this.transform,!0),this.transform=d,this.cameraHelper=P}getCenter(){return new i.W(this.transform.center.lng,this.transform.center.lat)}setCenter(d,P){return this.jumpTo({center:d},P)}getCenterElevation(){return this.transform.elevation}setCenterElevation(d,P){return this.jumpTo({elevation:d},P),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(d){this._centerClampedToGround=d}panBy(d,P,N){return d=i.P.convert(d).mult(-1),this.panTo(this.transform.center,i.e({offset:d},P),N)}panTo(d,P,N){return this.easeTo(i.e({center:d},P),N)}getZoom(){return this.transform.zoom}setZoom(d,P){return this.jumpTo({zoom:d},P),this}zoomTo(d,P,N){return this.easeTo(i.e({zoom:d},P),N)}zoomIn(d,P){return this.zoomTo(i.cw(this.getZoom()+1,this._zoomSnap),d,P),this}zoomOut(d,P){return this.zoomTo(i.cw(this.getZoom()-1,this._zoomSnap),d,P),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(d,P){return d!=this.transform.fov&&(this.transform.setFov(d),this.fire(new i.n("movestart",P)).fire(new i.n("move",P)).fire(new i.n("moveend",P))),this}getBearing(){return this.transform.bearing}setZoomSnap(d){return this._zoomSnap=d,this}getZoomSnap(){return this._zoomSnap}setBearing(d,P){return this.jumpTo({bearing:d},P),this}getPadding(){return this.transform.padding}setPadding(d,P){return this.jumpTo({padding:d},P),this}rotateTo(d,P,N){return this.easeTo(i.e({bearing:d},P),N)}resetNorth(d,P){return this.rotateTo(0,i.e({duration:1e3},d),P),this}resetNorthPitch(d,P){return this.easeTo(i.e({bearing:0,pitch:0,roll:0,duration:1e3},d),P),this}snapToNorth(d,P){return Math.abs(this.getBearing()){Xe.easeFunc(at),this.terrain&&!d.freezeElevation&&this._updateElevation(at),this._applyUpdatedTransform(N),this._fireMoveEvents(P)}),(at=>{this.terrain&&d.freezeElevation&&this._finalizeElevation(),this._afterEase(P,at)}),d),this}_prepareEase(d,P,N={}){this._moving=!0,P||N.moving||this.fire(new i.n("movestart",d)),this._zooming&&!N.zooming&&this.fire(new i.n("zoomstart",d)),this._rotating&&!N.rotating&&this.fire(new i.n("rotatestart",d)),this._pitching&&!N.pitching&&this.fire(new i.n("pitchstart",d)),this._rolling&&!N.rolling&&this.fire(new i.n("rollstart",d))}_prepareElevation(d){this._elevationCenter=d,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(d,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(d){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 P=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(d<1&&P!==this._elevationTarget){let N=this._elevationTarget-this._elevationStart;this._elevationStart+=d*(N-(P-(N*d+this._elevationStart))/(1-d)),this._elevationTarget=P}this.transform.setElevation(i.H.number(this._elevationStart,this._elevationTarget,d))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(d){if(!this.terrain&&d.elevation>=0&&d.pitch<=90)return{};let P=d.getCameraLngLat(),N=d.getCameraAltitude(),H=this.terrain?this.terrain.getElevationForLngLatZoom(P,d.zoom):0;if(Nthis._elevateCameraIfInsideTerrain(H))),this.transformCameraUpdate&&P.push((H=>this.transformCameraUpdate(H))),!P.length)return;let N=d.clone();for(let H of P){let $=N.clone(),{center:se,zoom:de,roll:Ae,pitch:Fe,bearing:Ie,elevation:Ye}=H($);se&&$.setCenter(se),Ye!==void 0&&$.setElevation(Ye),de!==void 0&&$.setZoom(de),Ae!==void 0&&$.setRoll(Ae),Fe!==void 0&&$.setPitch(Fe),Ie!==void 0&&$.setBearing(Ie),N.apply($,!1)}this.transform.apply(N,!1)}_fireMoveEvents(d){this.fire(new i.n("move",d)),this._zooming&&this.fire(new i.n("zoom",d)),this._rotating&&this.fire(new i.n("rotate",d)),this._pitching&&this.fire(new i.n("pitch",d)),this._rolling&&this.fire(new i.n("roll",d))}_afterEase(d,P){if(this._easeId&&P&&this._easeId===P)return;delete this._easeId;let N=this._zooming,H=this._rotating,$=this._pitching,se=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,N&&this.fire(new i.n("zoomend",d)),H&&this.fire(new i.n("rotateend",d)),$&&this.fire(new i.n("pitchend",d)),se&&this.fire(new i.n("rollend",d)),this.fire(new i.n("moveend",d))}flyTo(d,P){if(!d.essential&&f.prefersReducedMotion){let Er=i.V(d,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(Er,P)}this.stop(),"zoom"in(d=i.e({offset:[0,0],speed:1.2,curve:1.42,easing:i.cy},d))&&this._zoomSnap&&(d.zoom=i.cw(d.zoom,this._zoomSnap));let N=this._getTransformForUpdate(),H=N.bearing,$=N.pitch,se=N.roll,de=N.padding,Ae="bearing"in d?this._normalizeBearing(d.bearing,H):H,Fe="pitch"in d?+d.pitch:$,Ie="roll"in d?this._normalizeBearing(d.roll,se):se,Ye="padding"in d?d.padding:N.padding,st=i.P.convert(d.offset),dt=N.centerPoint.add(st),Pe=N.screenPointToLocation(dt),Xe=this.cameraHelper.handleFlyTo(N,{bearing:Ae,pitch:Fe,roll:Ie,padding:Ye,locationAtOffset:Pe,offsetAsPoint:st,center:d.center,minZoom:d.minZoom,zoom:d.zoom}),at=d.curve,xt=Math.max(N.width,N.height),Et=xt/Xe.scaleOfZoom,Bt=Xe.pixelPathLength;typeof Xe.scaleOfMinZoom=="number"&&(at=Math.sqrt(xt/Xe.scaleOfMinZoom/Bt*2));let St=at*at;function Pt(Er){let Tr=(Et*Et-xt*xt+(Er?-1:1)*St*St*Bt*Bt)/(2*(Er?Et:xt)*St*Bt);return Math.log(Math.sqrt(Tr*Tr+1)-Tr)}function $t(Er){return(Math.exp(Er)-Math.exp(-Er))/2}function Ht(Er){return(Math.exp(Er)+Math.exp(-Er))/2}let dr=Pt(!1),Xr=function(Er){return Ht(dr)/Ht(dr+at*Er)},Or=function(Er){return xt*((Ht(dr)*($t(Tr=dr+at*Er)/Ht(Tr))-$t(dr))/St)/Bt;var Tr},$r=(Pt(!0)-dr)/at;if(Math.abs(Bt)<2e-6||!isFinite($r)){if(Math.abs(xt-Et)<1e-6)return this.easeTo(d,P);let Er=Et0,Xr=Tr=>Math.exp(Er*at*Tr)}return d.duration="duration"in d?+d.duration:1e3*$r/("screenSpeed"in d?+d.screenSpeed/at:+d.speed),d.maxDuration&&d.duration>d.maxDuration&&(d.duration=0),this._zooming=!0,this._rotating=H!==Ae,this._pitching=Fe!==$,this._rolling=Ie!==se,this._padding=!N.isPaddingEqual(Ye),this._prepareEase(P,!1),this.terrain&&this._prepareElevation(Xe.targetCenter),this._ease((Er=>{let Tr=Er*$r,Rr=1/Xr(Tr),Lr=Or(Tr);this._rotating&&N.setBearing(i.H.number(H,Ae,Er)),this._pitching&&N.setPitch(i.H.number($,Fe,Er)),this._rolling&&N.setRoll(i.H.number(se,Ie,Er)),this._padding&&(N.interpolatePadding(de,Ye,Er),dt=N.centerPoint.add(st)),Xe.easeFunc(Er,Rr,Lr,dt),this.terrain&&!d.freezeElevation&&this._updateElevation(Er),this._applyUpdatedTransform(N),this._fireMoveEvents(P)}),(()=>{this.terrain&&d.freezeElevation&&this._finalizeElevation(),this._afterEase(P)}),d),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(d,P){var N;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let H=this._onEaseEnd;delete this._onEaseEnd,H.call(this,P)}return d||(N=this.handlers)===null||N===void 0||N.stop(!1),this}_ease(d,P,N){N.animate===!1||N.duration===0?(d(1),P()):(this._easeStart=g(),this._easeOptions=N,this._onEaseFrame=d,this._onEaseEnd=P,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(d,P){d=i.X(d,-180,180);let N=Math.abs(d-P);return Math.abs(d-360-P)MapLibre'};class hl{constructor(d=ku){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=P=>{!P||P.sourceDataType!=="metadata"&&P.sourceDataType!=="visibility"&&P.dataType!=="style"&&P.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=d}getDefaultPosition(){return"bottom-right"}onAdd(d){return this._map=d,this._compact=this.options.compact,this._container=_.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=_.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=_.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(d,P){let N=this._map._getUIString(`AttributionControl.${P}`);d.title=N,d.setAttribute("aria-label",N)}_updateAttributions(){if(!this._map.style)return;let d=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?d=d.concat(this.options.customAttribution.map((H=>typeof H!="string"?"":H))):typeof this.options.customAttribution=="string"&&d.push(this.options.customAttribution)),this._map.style.stylesheet){let H=this._map.style.stylesheet;this.styleOwner=H.owner,this.styleId=H.id}let P=this._map.style.tileManagers;for(let H in P){let $=P[H];if($.used||$.usedForTerrain){let se=$.getSource();se.attribution&&!d.includes(se.attribution)&&d.push(se.attribution)}}d=d.filter((H=>String(H).trim())),d.sort(((H,$)=>H.length-$.length)),d=d.filter(((H,$)=>{for(let se=$+1;se{let P=this._container.children;if(P.length){let N=P[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&N.classList.add("maplibregl-compact"):N.classList.remove("maplibregl-compact")}},this.options=d}getDefaultPosition(){return"bottom-left"}onAdd(d){var P;this._map=d,this._compact=(P=this.options)===null||P===void 0?void 0:P.compact,this._container=_.create("div","maplibregl-ctrl");let N=_.create("a","maplibregl-ctrl-logo");return N.target="_blank",N.rel="noopener nofollow",N.href="https://maplibre.org/",N.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),N.setAttribute("rel","noopener nofollow"),this._container.appendChild(N),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class W{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(d){let P=++this._id;return this._queue.push({callback:d,id:P,cancelled:!1}),P}remove(d){let P=this._currentlyRunning,N=P?this._queue.concat(P):this._queue;for(let H of N)if(H.id===d)return void(H.cancelled=!0)}run(d=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let P=this._currentlyRunning=this._queue;this._queue=[];for(let N of P)if(!N.cancelled&&(N.callback(d),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var te=i.aS([{name:"a_pos3d",type:"Int16",components:3}]);class ve extends i.E{constructor(d){super(),this._lastTilesetChange=g(),this.tileManager=d,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=d._source.tileSize*2**this.deltaZoom,d.usedForTerrain=!0,d.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(d,P){this.tileManager.update(d,P),this._renderableTilesKeys=[];let N={};for(let H of ft(d,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:P,calculateTileZoom:this.tileManager._source.calculateTileZoom}))N[H.key]=!0,this._renderableTilesKeys.push(H.key),this._tiles[H.key]||(H.terrainRttPosMatrix32f=new Float64Array(16),i.c7(H.terrainRttPosMatrix32f,0,i.a6,i.a6,0,0,1),this._tiles[H.key]=new mt(H,this.tileSize),this._lastTilesetChange=g());for(let H in this._tiles)N[H]||delete this._tiles[H]}freeRtt(d){for(let P in this._tiles){let N=this._tiles[P];(!d||N.tileID.equals(d)||N.tileID.isChildOf(d)||d.isChildOf(N.tileID))&&(N.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((d=>this.getTileByID(d)))}getTileByID(d){return this._tiles[d]}getTerrainCoords(d,P){return P?this._getTerrainCoordsForTileRanges(d,P):this._getTerrainCoordsForRegularTile(d)}_getTerrainCoordsForRegularTile(d){let P={};for(let N of this._renderableTilesKeys){let H=this._tiles[N].tileID,$=d.clone(),se=i.bj();if(H.canonical.equals(d.canonical))i.c7(se,0,i.a6,i.a6,0,0,1);else if(H.canonical.isChildOf(d.canonical)){let de=H.canonical.z-d.canonical.z,Ae=H.canonical.x-(H.canonical.x>>de<>de<>de;i.c7(se,0,Ie,Ie,0,0,1),i.Q(se,se,[-Ae*Ie,-Fe*Ie,0])}else{if(!d.canonical.isChildOf(H.canonical))continue;{let de=d.canonical.z-H.canonical.z,Ae=d.canonical.x-(d.canonical.x>>de<>de<>de;i.c7(se,0,i.a6,i.a6,0,0,1),i.Q(se,se,[Ae*Ie,Fe*Ie,0]),i.S(se,se,[1/2**de,1/2**de,0])}}$.terrainRttPosMatrix32f=new Float32Array(se),P[N]=$}return P}_getTerrainCoordsForTileRanges(d,P){let N={};for(let H of this._renderableTilesKeys){let $=this._tiles[H].tileID;if(!this._isWithinTileRanges($,P))continue;let se=d.clone(),de=i.bj();if($.canonical.z===d.canonical.z){let Ae=d.canonical.x-$.canonical.x+d.wrap*(1<d.canonical.z){let Ae=$.canonical.z-d.canonical.z,Fe=$.canonical.x-($.canonical.x>>Ae<>Ae<>Ae),st=d.canonical.y-($.canonical.y>>Ae),dt=i.a6>>Ae;i.c7(de,0,dt,dt,0,0,1),i.Q(de,de,[-Fe*dt+Ye*i.a6,-Ie*dt+st*i.a6,0])}else{let Ae=d.canonical.z-$.canonical.z,Fe=d.canonical.x-(d.canonical.x>>Ae<>Ae<>Ae)-$.canonical.x,st=(d.canonical.y>>Ae)-$.canonical.y,dt=i.a6<$.maxzoom&&(se=$.maxzoom),se<$.minzoom)return;(N=this._sourceTileCache)[H=d.key]||(N[H]=d.scaledTo(se).key);let de=this.findTileInCaches(this._sourceTileCache[d.key]);if(!(de!=null&&de.dem)&&P)for(;se>=$.minzoom&&!(de!=null&&de.dem);)de=this.findTileInCaches(d.scaledTo(se--).key);return de}findTileInCaches(d){let P=this.tileManager.getTileByID(d);return P||(P=this.tileManager._outOfViewCache.getByKey(d),P)}anyTilesAfterTime(d=Date.now()){return this._lastTilesetChange>=d}_isWithinTileRanges(d,P){let N=P[d.canonical.z];return!!N&&(d.wrap>N.minWrap||d.wrap=N.minTileXWrapped&&d.canonical.x<=N.maxTileXWrapped&&d.canonical.y>=N.minTileY&&d.canonical.y<=N.maxTileY)}}class Se{constructor(d,P,N){this._meshCache={},this.painter=d,this.tileManager=new ve(P),this.options=N,this.exaggeration=typeof N.exaggeration=="number"?N.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null);for(let d in this._meshCache)this._meshCache[d].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(d,P,N,H=i.a6){var $;let se=d.normalizeCoordinates(P,N,H);if(!se)return 0;let de=this.getTerrainData(se.tileID),Ae=($=de.tile)===null||$===void 0?void 0:$.dem;if(!Ae)return 0;let Fe=i.cC([],[se.x/H*i.a6,se.y/H*i.a6],de.u_terrain_matrix),Ie=[Fe[0]*Ae.dim,Fe[1]*Ae.dim],Ye=Math.floor(Ie[0]),st=Math.floor(Ie[1]),dt=Ie[0]-Ye,Pe=Ie[1]-st;return Ae.get(Ye,st)*(1-dt)*(1-Pe)+Ae.get(Ye+1,st)*dt*(1-Pe)+Ae.get(Ye,st+1)*(1-dt)*Pe+Ae.get(Ye+1,st+1)*dt*Pe}getElevationForLngLatZoom(d,P){if(!i.cD(P,d.wrap()))return 0;let{tileID:N,mercatorX:H,mercatorY:$}=this._getOverscaledTileIDFromLngLatZoom(d,P);return this.getElevation(N,H%i.a6,$%i.a6,i.a6)}getElevationForLngLat(d,P){let N=ft(P,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),H=0;for(let $ of N)$.canonical.z>H&&(H=Math.min($.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(d,H)}getElevation(d,P,N,H=i.a6){return this.getDEMElevation(d,P,N,H)*this.exaggeration}getTerrainData(d){var P,N;if(!this._emptyDemTexture){let se=this.painter.context,de=new i.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new i.T(se,de,se.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new i.T(se,new i.R({width:1,height:1}),se.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(se.gl.NEAREST,se.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=i.ap([])}let H=this.tileManager.getSourceTile(d,!0);if(H!=null&&H.dem&&(!H.demTexture||H.needsTerrainPrepare)){let se=this.painter.context;H.demTexture=this.painter.getTileTexture(H.dem.stride),H.demTexture?H.demTexture.update(H.dem.getPixels(),{premultiply:!1}):H.demTexture=new i.T(se,H.dem.getPixels(),se.gl.RGBA,{premultiply:!1}),H.demTexture.bind(se.gl.NEAREST,se.gl.CLAMP_TO_EDGE),H.needsTerrainPrepare=!1}let $=H&&H.toString()+H.tileID.key+d.key;if($&&!this._demMatrixCache[$]){let se=this.tileManager.getSource().maxzoom,de=d.canonical.z-H.tileID.canonical.z;d.overscaledZ>d.canonical.z&&(d.canonical.z>=se?de=d.canonical.z-se:i.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Ae=d.canonical.x-(d.canonical.x>>de<>de<>8<<4|$>>8,P[se+3]=0;let N=new i.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(P.buffer)),H=new i.T(d,N,d.gl.RGBA,{premultiply:!1});return H.bind(d.gl.NEAREST,d.gl.CLAMP_TO_EDGE),this._coordsTexture=H,H}pointCoordinate(d){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let P=new Uint8Array(4),N=this.painter.context,H=N.gl,$=Math.round(d.x*this.painter.pixelRatio/devicePixelRatio),se=Math.round(d.y*this.painter.pixelRatio/devicePixelRatio),de=Math.round(this.painter.height/devicePixelRatio);N.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),H.readPixels($,de-se-1,1,1,H.RGBA,H.UNSIGNED_BYTE,P),N.bindFramebuffer.set(null);let Ae=P[0]+(P[2]>>4<<8),Fe=P[1]+((15&P[2])<<8),Ie=this.coordsIndex[255-P[3]],Ye=Ie&&this.tileManager.getTileByID(Ie);if(!Ye)return null;let st=this._coordsTextureSize,dt=(1<0,H=N&&d.canonical.y===0,$=N&&d.canonical.y===(1<d.id!==P)),this._recentlyUsed.push(d.id)}stampObject(d){d.stamp=++this._stamp}getOrCreateFreeObject(){for(let P of this._recentlyUsed)if(!this._objects[P].inUse)return this._objects[P];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let d=this._createObject(this._objects.length);return this._objects.push(d),d}freeObject(d){d.inUse=!1}freeAllObjects(){for(let d of this._objects)this.freeObject(d)}isFull(){return!(this._objects.length!d.inUse))===!1}}let Re={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class rt{constructor(d,P){this.painter=d,this.terrain=P,this.pool=new Ee(d.context,30,P.tileManager.tileSize*P.qualityFactor)}destruct(){this.pool.destruct()}getTexture(d){return this.pool.getObjectForId(d.rtt[this._stacks.length-1].id).texture}prepareForRender(d,P){var N,H,$;this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=d._order.filter((se=>!d._layers[se].isHidden(P))),this._coordsAscending={};for(let se in d.tileManagers){this._coordsAscending[se]={};let de=d.tileManagers[se].getVisibleCoordinates(),Ae=d.tileManagers[se].getSource(),Fe=Ae instanceof qe?Ae.terrainTileRanges:null;for(let Ie of de){let Ye=this.terrain.tileManager.getTerrainCoords(Ie,Fe);for(let st in Ye)($=this._coordsAscending[se])[st]||($[st]=[]),this._coordsAscending[se][st].push(Ye[st])}}this._rttFingerprints={};for(let se of d._order){let de=d._layers[se],Ae=de.source;if(Re[de.type]&&!this._rttFingerprints[Ae]){this._rttFingerprints[Ae]={};let Fe=(H=(N=d.tileManagers[Ae])===null||N===void 0?void 0:N.getState().revision)!==null&&H!==void 0?H:0;for(let Ie in this._coordsAscending[Ae])this._rttFingerprints[Ae][Ie]=`${this._coordsAscending[Ae][Ie].map((Ye=>Ye.key)).sort().join()}#${Fe}`}}for(let se of this._renderableTiles)for(let de in this._rttFingerprints){let Ae=this._rttFingerprints[de][se.tileID.key];Ae&&Ae!==se.rttFingerprint[de]&&(se.rtt=[])}}renderLayer(d,P){if(d.isHidden(this.painter.transform.zoom))return!1;let N=Object.assign(Object.assign({},P),{isRenderingToTexture:!0}),H=d.type,$=this.painter,se=this._renderableLayerIds[this._renderableLayerIds.length-1]===d.id;if(Re[H]&&(this._prevType&&Re[this._prevType]||this._stacks.push([]),this._prevType=H,this._stacks[this._stacks.length-1].push(d.id),!se))return!0;if(Re[this._prevType]||Re[H]&&se){this._prevType=H;let de=this._stacks.length-1,Ae=this._stacks[de]||[];for(let Fe of this._renderableTiles){if(this.pool.isFull()&&(mc(this.painter,this.terrain,this._rttTiles,N),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Fe),Fe.rtt[de]){let Ye=this.pool.getObjectForId(Fe.rtt[de].id);if(Ye.stamp===Fe.rtt[de].stamp){this.pool.useObject(Ye);continue}}let Ie=this.pool.getOrCreateFreeObject();this.pool.useObject(Ie),this.pool.stampObject(Ie),Fe.rtt[de]={id:Ie.id,stamp:Ie.stamp},$.context.bindFramebuffer.set(Ie.fbo.framebuffer),$.context.clear({color:i.bo.transparent,stencil:0}),$.currentStencilSource=void 0;for(let Ye of Ae){let st=$.style._layers[Ye],dt=st.source?this._coordsAscending[st.source][Fe.tileID.key]:[Fe.tileID];$.context.viewport.set([0,0,Ie.fbo.width,Ie.fbo.height]),$._renderTileClippingMasks(st,dt,!0),$.renderLayer($,$.style.tileManagers[st.source],st,dt,N),st.source&&(Fe.rttFingerprint[st.source]=this._rttFingerprints[st.source][Fe.tileID.key])}}return mc(this.painter,this.terrain,this._rttTiles,N),this._rttTiles=[],this.pool.freeAllObjects(),Re[H]}return!1}}let He={"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"},pt=o,Ft={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:ku,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:i.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},Rt=class extends ff{get _ownerWindow(){var Y,d;return((d=(Y=this._container)===null||Y===void 0?void 0:Y.ownerDocument)===null||d===void 0?void 0:d.defaultView)||window}constructor(Y){var d,P,N;let H=Object.assign(Object.assign(Object.assign({},Ft),Y),{canvasContextAttributes:Object.assign(Object.assign({},Ft.canvasContextAttributes),Y.canvasContextAttributes)});if(H.minZoom!=null&&H.maxZoom!=null&&H.minZoom>H.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(H.minPitch!=null&&H.maxPitch!=null&&H.minPitch>H.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(H.minPitch!=null&&H.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(H.maxPitch!=null&&H.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let $=new Ls,se=new Gu;H.minZoom!==void 0&&$.setMinZoom(H.minZoom),H.maxZoom!==void 0&&$.setMaxZoom(H.maxZoom),H.minPitch!==void 0&&$.setMinPitch(H.minPitch),H.maxPitch!==void 0&&$.setMaxPitch(H.maxPitch),H.renderWorldCopies!==void 0&&$.setRenderWorldCopies(H.renderWorldCopies),H.transformConstrain!==null&&$.setConstrainOverride(H.transformConstrain),super($,se,{bearingSnap:H.bearingSnap,zoomSnap:H.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new W,this._controls=[],this._mapId=i.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=Ae=>{if(Ae.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let Fe of Object.values(this.style._layers))if(Fe.type==="custom"&&console.warn(`Custom layer with id '${Fe.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),Fe._listeners)for(let[Ie]of Object.entries(Fe._listeners))console.warn(`Custom layer with id '${Fe.id}' had event listeners for event '${Ie}' 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 i.n("webglcontextlost",{originalEvent:Ae}))}else this.fire(new i.n("webglcontextlost",{originalEvent:Ae}))},this._contextRestored=Ae=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new i.n("webglcontextrestored",{originalEvent:Ae}))},this._onMapScroll=Ae=>{if(Ae.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=H.interactive,this._maxTileCacheSize=H.maxTileCacheSize,this._maxTileCacheZoomLevels=H.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},H.canvasContextAttributes),this._trackResize=H.trackResize===!0,this._bearingSnap=H.bearingSnap,this._zoomSnap=H.zoomSnap,this._centerClampedToGround=H.centerClampedToGround,this._refreshExpiredTiles=H.refreshExpiredTiles===!0,this._fadeDuration=H.fadeDuration,this._crossSourceCollisions=H.crossSourceCollisions===!0,this._collectResourceTiming=H.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},He),H.locale),this._clickTolerance=H.clickTolerance,this._overridePixelRatio=H.pixelRatio,this._maxCanvasSize=H.maxCanvasSize,this._zoomLevelsToOverscale=H.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=H.transformCameraUpdate,this.transformConstrain=H.transformConstrain,this.cancelPendingTileRequestsWhileZooming=H.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(H.anisotropicFilterPitch),H.reduceMotion!==void 0&&(f.prefersReducedMotion=H.reduceMotion),this._imageQueueHandle=x.addThrottleControl((()=>this.isMoving())),this._requestManager=new y(H.transformRequest),this._container=this._resolveContainer(H.container),H.maxBounds&&this.setMaxBounds(H.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",(()=>this._update(!1))),this.on("moveend",(()=>this._update(!1))),this.on("zoom",(()=>this._update(!0))),this.on("terrain",(()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)})),this.once("idle",(()=>this._idleTriggered=!0)),typeof window!="undefined"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new ms(this,H),this._hash=H.hash?new gh(typeof H.hash=="string"&&H.hash||void 0).addTo(this):void 0,!((d=this._hash)===null||d===void 0)&&d._onHashChange()||(this.jumpTo({center:H.center,elevation:H.elevation,zoom:H.zoom,bearing:H.bearing,pitch:H.pitch,roll:H.roll}),H.bounds&&(this.resize(),this.fitBounds(H.bounds,i.e({},H.fitBoundsOptions,{duration:0}))));let de=typeof H.style=="string"||((N=(P=H.style)===null||P===void 0?void 0:P.projection)===null||N===void 0?void 0:N.type)!=="globe";this.resize(null,de),this._localIdeographFontFamily=H.localIdeographFontFamily,this._validateStyle=H.validateStyle,H.style&&this.setStyle(H.style,{localIdeographFontFamily:H.localIdeographFontFamily}),H.attributionControl&&this.addControl(new hl(typeof H.attributionControl=="boolean"?void 0:H.attributionControl)),H.maplibreLogo&&this.addControl(new mh,H.logoPosition),this.on("style.load",(()=>{if(de||this._resizeTransform(),this.transform.unmodified){let Ae=i.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(Ae)}})),this.on("data",(Ae=>{this._update(Ae.dataType==="style"),this.fire(new i.n(`${Ae.dataType}data`,Ae))})),this.on("dataloading",(Ae=>{this.fire(new i.n(`${Ae.dataType}dataloading`,Ae))})),this.on("dataabort",(Ae=>{this.fire(new i.n("sourcedataabort",Ae))}))}_getMapId(){return this._mapId}setGlobalStateProperty(Y,d){return this.style.setGlobalStateProperty(Y,d),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(Y,d){if(d===void 0&&(d=Y.getDefaultPosition?Y.getDefaultPosition():"top-right"),!(Y!=null&&Y.onAdd))return this.fire(new i.l(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let P=Y.onAdd(this);this._controls.push(Y);let N=this._controlPositions[d];return d.includes("bottom")?N.insertBefore(P,N.firstChild):N.appendChild(P),this}removeControl(Y){if(!(Y!=null&&Y.onRemove))return this.fire(new i.l(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let d=this._controls.indexOf(Y);return d>-1&&this._controls.splice(d,1),Y.onRemove(this),this}hasControl(Y){return this._controls.includes(Y)}coveringTiles(Y){return ft(this.transform,Y)}calculateCameraOptionsFromTo(Y,d,P,N){return N==null&&this.terrain&&(N=this.terrain.getElevationForLngLat(P,this.transform)),super.calculateCameraOptionsFromTo(Y,d,P,N)}resize(Y,d=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(d);let P=!this._moving;return P&&(this.stop(),this.fire(new i.n("movestart",Y)).fire(new i.n("move",Y))),this.fire(new i.n("resize",Y)),P&&this.fire(new i.n("moveend",Y)),this}_resizeInternal(Y=!0){let[d,P]=this._containerDimensions(),N=this._getClampedPixelRatio(d,P);if(this._resizeCanvas(d,P,N),this.painter.resize(d,P,N),this.painter.overLimit()){let H=this.painter.context.gl;this._maxCanvasSize=[H.drawingBufferWidth,H.drawingBufferHeight];let $=this._getClampedPixelRatio(d,P);this._resizeCanvas(d,P,$),this.painter.resize(d,P,$)}this._resizeTransform(Y)}_resizeTransform(Y=!0){var d;let[P,N]=this._containerDimensions();this.transform.resize(P,N,Y),(d=this._requestedCameraState)===null||d===void 0||d.resize(P,N,Y)}_getClampedPixelRatio(Y,d){let{0:P,1:N}=this._maxCanvasSize,H=this.getPixelRatio(),$=Y*H,se=d*H;return Math.min($>P?P/$:1,se>N?N/se:1)*H}getPixelRatio(){var Y;return(Y=this._overridePixelRatio)!==null&&Y!==void 0?Y:devicePixelRatio}setPixelRatio(Y){this._overridePixelRatio=Y,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Y){return this.transform.setMaxBounds(ie.convert(Y)),this._update()}setMinZoom(Y){if((Y=Y==null?-2:Y)>=-2&&Y<=this.transform.maxZoom){let d=this.transform.zoom,P=this._getTransformForUpdate();return P.setMinZoom(Y),this._applyUpdatedTransform(P),this._update(),d!==this.transform.zoom&&this.fire(new i.n("zoomstart")).fire(new i.n("zoom")).fire(new i.n("zoomend")).fire(new i.n("movestart")).fire(new i.n("move")).fire(new i.n("moveend")),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(Y){if((Y=Y==null?22:Y)>=this.transform.minZoom){let d=this.transform.zoom,P=this._getTransformForUpdate();return P.setMaxZoom(Y),this._applyUpdatedTransform(P),this._update(),d!==this.transform.zoom&&this.fire(new i.n("zoomstart")).fire(new i.n("zoom")).fire(new i.n("zoomend")).fire(new i.n("movestart")).fire(new i.n("move")).fire(new i.n("moveend")),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Y){if((Y=Y==null?0:Y)<0)throw new Error("minPitch must be greater than or equal to 0");if(Y>=0&&Y<=this.transform.maxPitch){let d=this.transform.pitch,P=this._getTransformForUpdate();return P.setMinPitch(Y),this._applyUpdatedTransform(P),this._update(),d!==this.transform.pitch&&this.fire(new i.n("pitchstart")).fire(new i.n("pitch")).fire(new i.n("pitchend")).fire(new i.n("movestart")).fire(new i.n("move")).fire(new i.n("moveend")),this}throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(Y){if((Y=Y==null?60:Y)>180)throw new Error("maxPitch must be less than or equal to 180");if(Y>=this.transform.minPitch){let d=this.transform.pitch,P=this._getTransformForUpdate();return P.setMaxPitch(Y),this._applyUpdatedTransform(P),this._update(),d!==this.transform.pitch&&this.fire(new i.n("pitchstart")).fire(new i.n("pitch")).fire(new i.n("pitchend")).fire(new i.n("movestart")).fire(new i.n("move")).fire(new i.n("moveend")),this}throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(Y){if((Y=Y==null?20:Y)>180)throw new Error("anisotropicFilterPitch must be less than or equal to 180");if(Y<0)throw new Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=Y,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Y){return this.transform.setRenderWorldCopies(Y),this._update()}setTransformConstrain(Y){return this.transform.setConstrainOverride(Y),this._update()}project(Y){return this.transform.locationToScreenPoint(i.W.convert(Y),this.style&&this.terrain)}unproject(Y){return this.transform.screenPointToLocation(i.P.convert(Y),this.terrain)}isMoving(){var Y;return this._moving||((Y=this.handlers)===null||Y===void 0?void 0:Y.isMoving())}isZooming(){var Y;return this._zooming||((Y=this.handlers)===null||Y===void 0?void 0:Y.isZooming())}isRotating(){var Y;return this._rotating||((Y=this.handlers)===null||Y===void 0?void 0:Y.isRotating())}_createDelegatedListener(Y,d,P){if(Y==="mouseenter"||Y==="mouseover"){let N=!1;return{layers:d,listener:P,delegates:{mousemove:$=>{let se=d.filter((Ae=>this.getLayer(Ae))),de=se.length!==0?this.queryRenderedFeatures($.point,{layers:se}):[];de.length?N||(N=!0,P.call(this,new Xl(Y,this,$.originalEvent,{features:de}))):N=!1},mouseout:()=>{N=!1}}}}if(Y==="mouseleave"||Y==="mouseout"){let N=!1;return{layers:d,listener:P,delegates:{mousemove:se=>{let de=d.filter((Ae=>this.getLayer(Ae)));(de.length!==0?this.queryRenderedFeatures(se.point,{layers:de}):[]).length?N=!0:N&&(N=!1,P.call(this,new Xl(Y,this,se.originalEvent)))},mouseout:se=>{N&&(N=!1,P.call(this,new Xl(Y,this,se.originalEvent)))}}}}{let N=H=>{let $=d.filter((de=>this.getLayer(de))),se=$.length!==0?this.queryRenderedFeatures(H.point,{layers:$}):[];se.length&&(H.features=se,P.call(this,H),delete H.features)};return{layers:d,listener:P,delegates:{[Y]:N}}}}_saveDelegatedListener(Y,d){var P;this._delegatedListeners||(this._delegatedListeners={}),(P=this._delegatedListeners)[Y]||(P[Y]=[]),this._delegatedListeners[Y].push(d)}_removeDelegatedListener(Y,d,P){var N;if(!(!((N=this._delegatedListeners)===null||N===void 0)&&N[Y]))return;let H=this._delegatedListeners[Y];for(let $=0;$d.includes(de)))){for(let de in se.delegates)this.off(de,se.delegates[de]);return void H.splice($,1)}}}on(Y,d,P){if(P===void 0)return super.on(Y,d);let N=typeof d=="string"?[d]:d,H=this._createDelegatedListener(Y,N,P);this._saveDelegatedListener(Y,H);for(let $ in H.delegates)this.on($,H.delegates[$]);return{unsubscribe:()=>{this._removeDelegatedListener(Y,N,P)}}}once(Y,d,P){if(P===void 0)return super.once(Y,d);let N=typeof d=="string"?[d]:d,H=this._createDelegatedListener(Y,N,P);for(let $ in H.delegates){let se=H.delegates[$];H.delegates[$]=(...de)=>{this._removeDelegatedListener(Y,N,P),se(...de)}}this._saveDelegatedListener(Y,H);for(let $ in H.delegates)this.once($,H.delegates[$]);return this}off(Y,d,P){return P===void 0?super.off(Y,d):(this._removeDelegatedListener(Y,typeof d=="string"?[d]:d,P),this)}queryRenderedFeatures(Y,d){if(!this.style)return[];let P,N=Y instanceof i.P||Array.isArray(Y),H=N?Y:[[0,0],[this.transform.width,this.transform.height]];if(d||(d=(N?{}:Y)||{}),H instanceof i.P||typeof H[0]=="number")P=[i.P.convert(H)];else{let $=i.P.convert(H[0]),se=i.P.convert(H[1]);P=[$,new i.P(se.x,$.y),se,new i.P($.x,se.y),$]}return this.style.queryRenderedFeatures(P,d,this.transform)}querySourceFeatures(Y,d){return this.style.querySourceFeatures(Y,d)}setStyle(Y,d){return(d=i.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},d)).diff!==!1&&d.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Y?(this._diffStyle(Y,d),this):(this._localIdeographFontFamily=d.localIdeographFontFamily,this._updateStyle(Y,d))}setTransformRequest(Y){return this._requestManager.setTransformRequest(Y),this}_getUIString(Y){let d=this._locale[Y];if(d==null)throw new Error(`Missing UI string '${Y}'`);return d}_updateStyle(Y,d){var P,N,H;if((P=this._diffStyleRequest)===null||P===void 0||P.abort(),this._diffStyleRequest=null,d.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(Y,d)));let $=this.style&&d.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Y)),Y?(this.style=new Cc(this,d||{}),this.style.setEventedParent(this,{style:this.style}),typeof Y=="string"?this.style.loadURL(Y,d,$):this.style.loadJSON(Y,d,$),this):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),(H=(N=this.style)===null||N===void 0?void 0:N.projection)===null||H===void 0||H.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Cc(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(Y,d){return i._(this,void 0,void 0,(function*(){var P;if((P=this._diffStyleRequest)===null||P===void 0||P.abort(),typeof Y=="string"){let N=Y;this._diffStyleRequest=new AbortController;let H=this._diffStyleRequest;try{let $=yield this._requestManager.transformRequest(N,"Style");if(H.signal.aborted)return void(this._diffStyleRequest=null);let se=yield i.k($,H);this._diffStyleRequest=null,this._updateDiff(se.data,d)}catch($){this._diffStyleRequest=null,i.$($)||this.fire(new i.l(i.d($)))}}else typeof Y=="object"&&(this._diffStyleRequest=null,this._updateDiff(Y,d))}))}_updateDiff(Y,d){try{this.style.setState(Y,d)&&this._update(!0)}catch(P){i.w(`Unable to perform style diff: ${i.d(P).message}. Rebuilding the style from scratch.`),this._updateStyle(Y,d)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();i.w("There is no style added to the map.")}addSource(Y,d){return this._lazyInitEmptyStyle(),this.style.addSource(Y,d),this._update(!0)}isSourceLoaded(Y){var d;let P=(d=this.style)===null||d===void 0?void 0:d.tileManagers[Y];if(P!==void 0)return P.loaded();this.fire(new i.l(new Error(`There is no tile manager with ID '${Y}'`)))}setTerrain(Y){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Y){let d=this.style.tileManagers[Y.source];if(!d)throw new Error(`cannot load terrain, because there exists no source with ID: ${Y.source}`);this.terrain===null&&d.reload();for(let P in this.style._layers){let N=this.style._layers[P];N.type==="hillshade"&&N.source===Y.source&&i.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),N.type==="color-relief"&&N.source===Y.source&&i.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Se(this.painter,d,Y),this.painter.renderToTexture=new rt(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=P=>{var N;P.dataType==="style"?this.terrain.tileManager.freeRtt():P.dataType==="source"&&P.tile&&(P.sourceId!==Y.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((N=P.source)===null||N===void 0?void 0:N.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(P.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new i.n("terrain",{terrain:Y})),this}getTerrain(){var Y,d;return(d=(Y=this.terrain)===null||Y===void 0?void 0:Y.options)!==null&&d!==void 0?d:null}areTilesLoaded(){var Y;let d=(Y=this.style)===null||Y===void 0?void 0:Y.tileManagers;for(let P of Object.values(d))if(!P.areTilesLoaded())return!1;return!0}removeSource(Y){return this.style.removeSource(Y),this._update(!0)}getSource(Y){return this.style.getSource(Y)}setSourceTileLodParams(Y,d,P){if(P){let N=this.getSource(P);if(!N)throw new Error(`There is no source with ID "${P}", cannot set LOD parameters`);N.calculateTileZoom=Tt(Math.max(1,Y),Math.max(1,d))}else for(let N in this.style.tileManagers)this.style.tileManagers[N].getSource().calculateTileZoom=Tt(Math.max(1,Y),Math.max(1,d));return this._update(!0),this}refreshTiles(Y,d){let P=this.style.tileManagers[Y];if(!P)throw new Error(`There is no tile manager with ID "${Y}", cannot refresh tile`);d===void 0?P.reload(!0):P.refreshTiles(d.map((N=>new i.aa(N.z,N.x,N.y))))}addImage(Y,d,P={}){let{pixelRatio:N=1,sdf:H=!1,stretchX:$,stretchY:se,content:de,textFitWidth:Ae,textFitHeight:Fe}=P;if(this._lazyInitEmptyStyle(),!(d instanceof HTMLImageElement||i.b(d))){if(d.width===void 0||d.height===void 0)return this.fire(new i.l(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Ie,height:Ye,data:st}=d,dt=d;return this.style.addImage(Y,{data:new i.R({width:Ie,height:Ye},new Uint8Array(st)),pixelRatio:N,stretchX:$,stretchY:se,content:de,textFitWidth:Ae,textFitHeight:Fe,sdf:H,version:0,userImage:dt}),dt.onAdd&&dt.onAdd(this,Y),this}}{let{width:Ie,height:Ye,data:st}=f.getImageData(d);this.style.addImage(Y,{data:new i.R({width:Ie,height:Ye},st),pixelRatio:N,stretchX:$,stretchY:se,content:de,textFitWidth:Ae,textFitHeight:Fe,sdf:H,version:0})}}updateImage(Y,d){let P=this.style.getImage(Y);if(!P)return this.fire(new i.l(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let N=d instanceof HTMLImageElement||i.b(d)?f.getImageData(d):d,{width:H,height:$,data:se}=N;if(H===void 0||$===void 0)return this.fire(new i.l(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(H!==P.data.width||$!==P.data.height)return this.fire(new i.l(new Error("The width and height of the updated image must be that same as the previous version of the image")));let de=!(d instanceof HTMLImageElement||i.b(d));return P.data.replace(se,de),this.style.updateImage(Y,P),this}getImage(Y){return this.style.getImage(Y)}hasImage(Y){return Y?!!this.style.getImage(Y):(this.fire(new i.l(new Error("Missing required image id"))),!1)}removeImage(Y){this.style.removeImage(Y)}loadImage(Y){return i._(this,void 0,void 0,(function*(){return x.getImage(yield this._requestManager.transformRequest(Y,"Image"),new AbortController)}))}listImages(){return this.style.listImages()}addLayer(Y,d){return this._lazyInitEmptyStyle(),this.style.addLayer(Y,d),this._update(!0)}moveLayer(Y,d){return this.style.moveLayer(Y,d),this._update(!0)}removeLayer(Y){return this.style.removeLayer(Y),this._update(!0)}getLayer(Y){return this.style.getLayer(Y)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Y,d,P){return this.style.setLayerZoomRange(Y,d,P),this._update(!0)}setFilter(Y,d,P={}){return this.style.setFilter(Y,d,P),this._update(!0)}getFilter(Y){return this.style.getFilter(Y)}setPaintProperty(Y,d,P,N={}){return this.style.setPaintProperty(Y,d,P,N),this._update(!0)}getPaintProperty(Y,d){return this.style.getPaintProperty(Y,d)}setLayoutProperty(Y,d,P,N={}){return this.style.setLayoutProperty(Y,d,P,N),this._update(!0)}getLayoutProperty(Y,d){return this.style.getLayoutProperty(Y,d)}setGlyphs(Y,d={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Y,d),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Y,d,P={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Y,d,P,(N=>{N||this._update(!0)})),this}removeSprite(Y){return this._lazyInitEmptyStyle(),this.style.removeSprite(Y),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Y,d={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Y,d,(P=>{P||this._update(!0)})),this}setLight(Y,d={}){return this._lazyInitEmptyStyle(),this.style.setLight(Y,d),this._update(!0)}getLight(){return this.style.getLight()}setSky(Y,d={}){return this._lazyInitEmptyStyle(),this.style.setSky(Y,d),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Y,d){return this.style.setFeatureState(Y,d),this._update()}removeFeatureState(Y,d){return this.style.removeFeatureState(Y,d),this._update()}getFeatureState(Y){return this.style.getFeatureState(Y)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Y=0,d=0;return this._container&&(Y=this._container.clientWidth||400,d=this._container.clientHeight||300),[Y,d]}_setupResizeObserver(){var Y;let d=!1,P=ph((H=>{this._trackResize&&!this._removed&&(this.resize(H),this.redraw())}),50),N=(Y=this._ownerWindow.ResizeObserver)!==null&&Y!==void 0?Y:ResizeObserver;this._resizeObserver=new N((H=>{d?P(H):d=!0})),this._resizeObserver.observe(this._container)}_resolveContainer(Y){if(typeof Y=="string"){let d=document.getElementById(Y);if(!d)throw new Error(`Container '${Y}' not found.`);return d}if(Y instanceof HTMLElement||Y&&typeof Y=="object"&&Y.nodeType===1)return Y;throw new Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let Y=this._container;Y.classList.add("maplibregl-map");let d=this._canvasContainer=_.create("div","maplibregl-canvas-container",Y);this._interactive&&d.classList.add("maplibregl-interactive"),this._canvas=_.create("canvas","maplibregl-canvas",d),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 P=this._containerDimensions(),N=this._getClampedPixelRatio(P[0],P[1]);this._resizeCanvas(P[0],P[1],N);let H=this._controlContainer=_.create("div","maplibregl-control-container",Y),$=this._controlPositions={};for(let se of["top-left","top-right","bottom-left","bottom-right"])$[se]=_.create("div",`maplibregl-ctrl-${se} `,H);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Y,d,P){this._canvas.width=Math.floor(P*Y),this._canvas.height=Math.floor(P*d),this._canvas.style.width=`${Y}px`,this._canvas.style.height=`${d}px`}_setupPainter(){let Y=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),d=null;this._canvas.addEventListener("webglcontextcreationerror",(N=>{d={requestedAttributes:Y},N&&(d.statusMessage=N.statusMessage,d.type=N.type)}),{once:!0});let P=null;if(P=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,Y):this._canvas.getContext("webgl2",Y)||this._canvas.getContext("webgl",Y),!P){let N="Failed to initialize WebGL";throw d?(d.message=N,new Error(JSON.stringify(d))):new Error(N)}this.painter=new $u(P,this.transform)}migrateProjection(Y,d){super.migrateProjection(Y,d),this.painter.transform=Y,this.fire(new i.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(Y){var d;return!((d=this.style)===null||d===void 0)&&d._loaded?(this._styleDirty||(this._styleDirty=Y),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Y){return this._update(),this._renderTaskQueue.add(Y)}_cancelRenderFrame(Y){this._renderTaskQueue.remove(Y)}_render(Y){var d,P,N,H,$,se;let de=this._idleTriggered?this._fadeDuration:0,Ae=((d=this.style.projection)===null||d===void 0?void 0:d.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Y),this._removed)return;let Fe=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let st=this.transform.zoom,dt=g();this.style.zoomHistory.update(st,dt);let Pe=new i.J(st,{now:dt,fadeDuration:de,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Xe=Pe.crossFadingFactor();Xe===1&&Xe===this._crossFadingFactor||(Fe=!0,this._crossFadingFactor=Xe),this.style.update(Pe)}let Ie=((P=this.style.projection)===null||P===void 0?void 0:P.transitionState)>0!==Ae;(N=this.style.projection)===null||N===void 0||N.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((H=this.style.projection)===null||H===void 0?void 0:H.transitionState,($=this.style.projection)===null||$===void 0?void 0:$.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||Ie)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=(se=this.style)===null||se===void 0?void 0:se._updatePlacement(this.transform,this.showCollisionBoxes,de,this._crossSourceCollisions,Ie),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:de,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new i.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new i.n("load"))),this.style&&(this.style.hasTransitions()||Fe)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Ye=this._sourcesDirty||this._styleDirty||this._placementDirty;return Ye||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new i.n("idle")),!this._loaded||this._fullyLoaded||Ye||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var Y,d;this._hash&&this._hash.remove();for(let N of this._controls)N.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),(Y=this._diffStyleRequest)===null||Y===void 0||Y.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window!="undefined"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),x.removeThrottleControl(this._imageQueueHandle),(d=this._resizeObserver)===null||d===void 0||d.disconnect();let P=this.painter.context.gl.getExtension("WEBGL_lose_context");P!=null&&P.loseContext&&P.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new i.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,f.frame(this._frameRequest,(Y=>{this._frameRequest=null;try{this._render(Y)}catch(d){if(!i.$(d)&&!(function(P){return P.message===qf})(d))throw d}}),(()=>{}),this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Y){this._showTileBoundaries!==Y&&(this._showTileBoundaries=Y,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Y){this._showPadding!==Y&&(this._showPadding=Y,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Y){this._showCollisionBoxes!==Y&&(this._showCollisionBoxes=Y,Y?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Y){this._showOverdrawInspector!==Y&&(this._showOverdrawInspector=Y,this._update())}get repaint(){return!!this._repaint}set repaint(Y){this._repaint!==Y&&(this._repaint=Y,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Y){this._vertices=Y,this._update()}get version(){return pt}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(Y){return this._lazyInitEmptyStyle(),this.style.setProjection(Y),this._update(!0)}},ir={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class nr{constructor(d,P,N=!1){this.mousedown=$=>{this.startMove($,_.mousePos(this.element,$)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=$=>{this.move($,_.mousePos(this.element,$))},this.mouseup=$=>{this._rotatePitchHandler.dragEnd($),this.offTemp()},this.touchstart=$=>{$.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=_.touchPos(this.element,$.targetTouches)[0],this.startMove($,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=$=>{$.targetTouches.length!==1?this.reset():(this._lastPos=_.touchPos(this.element,$.targetTouches)[0],this.move($,this._lastPos))},this.touchend=$=>{$.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=P;let H=new Zt;this._rotatePitchHandler=new Be({clickTolerance:3,move:($,se)=>{let de=P.getBoundingClientRect(),Ae=new i.P((de.bottom-de.top)/2,(de.right-de.left)/2);return{bearingDelta:i.cx(new i.P($.x,se.y),se,Ae),pitchDelta:N?-.5*(se.y-$.y):void 0}},moveStateManager:H,enable:!0,assignEvents:()=>{}}),this.map=d,P.addEventListener("mousedown",this.mousedown),P.addEventListener("touchstart",this.touchstart,{passive:!1}),P.addEventListener("touchcancel",this.reset)}startMove(d,P){this._rotatePitchHandler.dragStart(d,P),_.disableDrag()}move(d,P){let N=this.map,{bearingDelta:H,pitchDelta:$}=this._rotatePitchHandler.dragMove(d,P)||{};H&&N.setBearing(N.getBearing()+H),$&&N.setPitch(N.getPitch()+$)}off(){let d=this.element;d.removeEventListener("mousedown",this.mousedown),d.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),d.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){_.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}let Cr;function Vr(Y,d,P,N=!1){if(N||!P.getCoveringTilesDetailsProvider().allowWorldCopies())return Y==null?void 0:Y.wrap();let H=new i.W(Y.lng,Y.lat);if(Y=new i.W(Y.lng,Y.lat),d){let $=new i.W(Y.lng-360,Y.lat),se=new i.W(Y.lng+360,Y.lat),de=P.locationToScreenPoint(Y).distSqr(d);P.locationToScreenPoint($).distSqr(d)180;){let $=P.locationToScreenPoint(Y);if($.x>=0&&$.y>=0&&$.x<=P.width&&$.y<=P.height)break;Y.lng>P.center.lng?Y.lng-=360:Y.lng+=360}return Y.lng!==H.lng&&P.isPointOnMapSurface(P.locationToScreenPoint(Y))?Y:H}let sr={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function br(Y,d,P){let N=Y.classList;for(let H in sr)N.remove(`maplibregl-${P}-anchor-${H}`);N.add(`maplibregl-${P}-anchor-${d}`)}class kr extends i.E{constructor(d){if(super(),this._onClick=P=>{this.fire(new i.n("click",{originalEvent:P}))},this._onKeyPress=P=>{P.code!=="Space"&&P.code!=="Enter"||this.togglePopup()},this._onMapClick=P=>{let N=P.originalEvent.target,H=this._element;this._popup&&(N===H||H.contains(N))&&this.togglePopup()},this._update=P=>{if(!this._map)return;let N=this._map.loaded()&&!this._map.isMoving();((P==null?void 0:P.type)==="terrain"||(P==null?void 0:P.type)==="render"&&!N)&&this._map.once("render",this._update),this._lngLat=Vr(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let H="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?H=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(H=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let $="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?$="rotateX(0deg)":this._pitchAlignment==="map"&&($=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||P&&P.type!=="moveend"||(this._pos=this._pos.round()),this._element.style.transform=`${sr[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${$} ${H}`,f.frameAsync(new AbortController,this._map._ownerWindow).then((()=>{this._updateOpacity((P==null?void 0:P.type)==="moveend")})).catch((()=>{}))},this._onMove=P=>{if(!this._isDragging){let N=this._clickTolerance||this._map._clickTolerance;this._isDragging=P.point.dist(this._pointerdownPos)>=N}this._isDragging&&(this._pos=P.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 i.n("dragstart"))),this.fire(new i.n("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new i.n("dragend")),this._state="inactive"},this._addDragHandler=P=>{this._element.contains(P.originalEvent.target)&&(P.preventDefault(),this._positionDelta=P.point.sub(this._pos).add(this._offset),this._pointerdownPos=P.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=(d==null?void 0:d.anchor)||"center",this._color=(d==null?void 0:d.color)||"#3FB1CE",this._scale=(d==null?void 0:d.scale)||1,this._draggable=(d==null?void 0:d.draggable)||!1,this._clickTolerance=(d==null?void 0:d.clickTolerance)||0,this._subpixelPositioning=(d==null?void 0:d.subpixelPositioning)||!1,this._isDragging=!1,this._state="inactive",this._rotation=(d==null?void 0:d.rotation)||0,this._rotationAlignment=(d==null?void 0:d.rotationAlignment)||"auto",this._pitchAlignment=d!=null&&d.pitchAlignment&&d.pitchAlignment!=="auto"?d.pitchAlignment:this._rotationAlignment,this.setOpacity(d==null?void 0:d.opacity,d==null?void 0:d.opacityWhenCovered),d==null?void 0:d.element)this._element=d.element,this._offset=i.P.convert((d==null?void 0:d.offset)||[0,0]);else{this._defaultMarker=!0,this._element=_.create("div");let P=_.createNS("http://www.w3.org/2000/svg","svg"),N=41,H=27;P.setAttributeNS(null,"display","block"),P.setAttributeNS(null,"height",`${N}px`),P.setAttributeNS(null,"width",`${H}px`),P.setAttributeNS(null,"viewBox",`0 0 ${H} ${N}`);let $=_.createNS("http://www.w3.org/2000/svg","g");$.setAttributeNS(null,"stroke","none"),$.setAttributeNS(null,"stroke-width","1"),$.setAttributeNS(null,"fill","none"),$.setAttributeNS(null,"fill-rule","evenodd");let se=_.createNS("http://www.w3.org/2000/svg","g");se.setAttributeNS(null,"fill-rule","nonzero");let de=_.createNS("http://www.w3.org/2000/svg","g");de.setAttributeNS(null,"transform","translate(3.0, 29.0)"),de.setAttributeNS(null,"fill","#000000");let Ae=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let xt of Ae){let Et=_.createNS("http://www.w3.org/2000/svg","ellipse");Et.setAttributeNS(null,"opacity","0.04"),Et.setAttributeNS(null,"cx","10.5"),Et.setAttributeNS(null,"cy","5.80029008"),Et.setAttributeNS(null,"rx",xt.rx),Et.setAttributeNS(null,"ry",xt.ry),de.appendChild(Et)}let Fe=_.createNS("http://www.w3.org/2000/svg","g");Fe.setAttributeNS(null,"fill",this._color);let Ie=_.createNS("http://www.w3.org/2000/svg","path");Ie.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Fe.appendChild(Ie);let Ye=_.createNS("http://www.w3.org/2000/svg","g");Ye.setAttributeNS(null,"opacity","0.25"),Ye.setAttributeNS(null,"fill","#000000");let st=_.createNS("http://www.w3.org/2000/svg","path");st.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ye.appendChild(st);let dt=_.createNS("http://www.w3.org/2000/svg","g");dt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),dt.setAttributeNS(null,"fill","#FFFFFF");let Pe=_.createNS("http://www.w3.org/2000/svg","g");Pe.setAttributeNS(null,"transform","translate(8.0, 8.0)");let Xe=_.createNS("http://www.w3.org/2000/svg","circle");Xe.setAttributeNS(null,"fill","#000000"),Xe.setAttributeNS(null,"opacity","0.25"),Xe.setAttributeNS(null,"cx","5.5"),Xe.setAttributeNS(null,"cy","5.5"),Xe.setAttributeNS(null,"r","5.4999962");let at=_.createNS("http://www.w3.org/2000/svg","circle");at.setAttributeNS(null,"fill","#FFFFFF"),at.setAttributeNS(null,"cx","5.5"),at.setAttributeNS(null,"cy","5.5"),at.setAttributeNS(null,"r","5.4999962"),Pe.appendChild(Xe),Pe.appendChild(at),se.appendChild(de),se.appendChild(Fe),se.appendChild(Ye),se.appendChild(dt),se.appendChild(Pe),P.appendChild(se),P.setAttributeNS(null,"height",N*this._scale+"px"),P.setAttributeNS(null,"width",H*this._scale+"px"),this._element.appendChild(P),this._offset=i.P.convert((d==null?void 0:d.offset)||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(P=>{P.preventDefault()})),this._element.addEventListener("mousedown",(P=>{P.preventDefault()})),br(this._element,this._anchor,"marker"),d==null?void 0:d.className)for(let P of d.className.split(" "))this._element.classList.add(P);this._popup=null}addTo(d){return this.remove(),this._map=d,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",d._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),d.getCanvasContainer().appendChild(this._element),d.on("move",this._update),d.on("moveend",this._update),d.on("terrain",this._update),d.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(d){return this._lngLat=i.W.convert(d),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(d){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),d){if(!("offset"in d.options)){let H=Math.abs(13.5)/Math.SQRT2;d.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[H,-1*(38.1-13.5+H)],"bottom-right":[-H,-1*(38.1-13.5+H)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=d,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(d){return this._subpixelPositioning=d,this}getPopup(){return this._popup}togglePopup(){let d=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:d?(d.isOpen()?d.remove():(d.setLngLat(this._lngLat),d.addTo(this._map)),this):this}_updateOpacity(d=!1){var P,N;let H=(P=this._map)===null||P===void 0?void 0:P.terrain,$=this._map.transform.isLocationOccluded(this._lngLat);if(!H||$){let dt=$?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==dt&&(this._element.style.opacity=dt,this._element.classList.toggle("maplibregl-marker-covered",$)))}if(d)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}let se=this._map,de=se.terrain.depthAtPoint(this._pos),Ae=se.terrain.getElevationForLngLat(this._lngLat,se.transform);if(se.transform.lngLatToCameraDepth(this._lngLat,Ae)-de<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let Fe=-this._offset.y/se.transform.pixelsPerMeter,Ie=Math.sin(se.getPitch()*Math.PI/180)*Fe,Ye=se.terrain.depthAtPoint(new i.P(this._pos.x,this._pos.y-this._offset.y)),st=se.transform.lngLatToCameraDepth(this._lngLat,Ae+Ie)-Ye>.006;!((N=this._popup)===null||N===void 0)&&N.isOpen()&&st&&this._popup.remove(),this._element.style.opacity=st?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",st)}getOffset(){return this._offset}setOffset(d){return this._offset=i.P.convert(d),this._update(),this}addClassName(d){this._element.classList.add(d)}removeClassName(d){this._element.classList.remove(d)}toggleClassName(d){return this._element.classList.toggle(d)}setDraggable(d){return this._draggable=!!d,this._map&&(d?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(d){return this._rotation=d||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(d){return this._rotationAlignment=d||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(d){return this._pitchAlignment=d&&d!=="auto"?d:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(d,P){return(this._opacity===void 0||d===void 0&&P===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),d!==void 0&&(this._opacity=String(d)),P!==void 0&&(this._opacityWhenCovered=String(P)),this._map&&this._updateOpacity(!0),this}}let Gr={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Wr=0,Ar=!1,En={maxWidth:100,unit:"metric"};function zn(Y,d,P){let N=(P==null?void 0:P.maxWidth)||100,H=Y._container.clientHeight/2,$=Y._container.clientWidth/2,se=Y.unproject([$-N/2,H]),de=Y.unproject([$+N/2,H]),Ae=Math.round(Y.project(de).x-Y.project(se).x),Fe=Math.min(N,Ae,Y._container.clientWidth),Ie=se.distanceTo(de);if((P==null?void 0:P.unit)==="imperial"){let Ye=3.2808*Ie;Ye>5280?Zn(d,Fe,Ye/5280,Y._getUIString("ScaleControl.Miles")):Zn(d,Fe,Ye,Y._getUIString("ScaleControl.Feet"))}else(P==null?void 0:P.unit)==="nautical"?Zn(d,Fe,Ie/1852,Y._getUIString("ScaleControl.NauticalMiles")):Ie>=1e3?Zn(d,Fe,Ie/1e3,Y._getUIString("ScaleControl.Kilometers")):Zn(d,Fe,Ie,Y._getUIString("ScaleControl.Meters"))}function Zn(Y,d,P,N){let H=(function($){let se=Math.pow(10,`${Math.floor($)}`.length-1),de=$/se;return de=de>=10?10:de>=5?5:de>=3?3:de>=2?2:de>=1?1:(function(Ae){let Fe=Math.pow(10,Math.ceil(-Math.log(Ae)/Math.LN10));return Math.round(Ae*Fe)/Fe})(de),se*de})(P);Y.style.width=d*(H/P)+"px",Y.innerHTML=`${H} ${N}`}let ai={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},Mi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Si(Y){if(Y){if(typeof Y=="number"){let d=Math.round(Math.abs(Y)/Math.SQRT2);return{center:new i.P(0,0),top:new i.P(0,Y),"top-left":new i.P(d,d),"top-right":new i.P(-d,d),bottom:new i.P(0,-Y),"bottom-left":new i.P(d,-d),"bottom-right":new i.P(-d,-d),left:new i.P(Y,0),right:new i.P(-Y,0)}}if(Y instanceof i.P||Array.isArray(Y)){let d=i.P.convert(Y);return{center:d,top:d,"top-left":d,"top-right":d,bottom:d,"bottom-left":d,"bottom-right":d,left:d,right:d}}return{center:i.P.convert(Y.center||[0,0]),top:i.P.convert(Y.top||[0,0]),"top-left":i.P.convert(Y["top-left"]||[0,0]),"top-right":i.P.convert(Y["top-right"]||[0,0]),bottom:i.P.convert(Y.bottom||[0,0]),"bottom-left":i.P.convert(Y["bottom-left"]||[0,0]),"bottom-right":i.P.convert(Y["bottom-right"]||[0,0]),left:i.P.convert(Y.left||[0,0]),right:i.P.convert(Y.right||[0,0])}}return Si(new i.P(0,0))}let ya=o;a.AJAXError=i.cG,a.EXTENT=i.a6,a.Event=i.n,a.Evented=i.E,a.LngLat=i.W,a.MercatorCoordinate=i.a7,a.Point=i.P,a.addProtocol=i.cH,a.config=i.c,a.removeProtocol=i.cI,a.AttributionControl=hl,a.BoxZoomHandler=Mu,a.CanvasSource=Le,a.CooperativeGesturesHandler=Di,a.DoubleClickZoomHandler=ls,a.DragPanHandler=el,a.DragRotateHandler=yc,a.EdgeInsets=ko,a.FullscreenControl=class extends i.E{constructor(Y={}){var d;super(),this._onFullscreenChange=()=>{var P;let N=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;!((P=N==null?void 0:N.shadowRoot)===null||P===void 0)&&P.fullscreenElement;)N=N.shadowRoot.fullscreenElement;N===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(d=Y.pseudo)!==null&&d!==void 0&&d,Y!=null&&Y.container&&(Y.container instanceof HTMLElement?this._container=Y.container:i.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(Y){return this._map=Y,this._container||(this._container=this._map.getContainer()),this._controlContainer=_.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 Y=this._fullscreenButton=_.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);_.create("span","maplibregl-ctrl-icon",Y).setAttribute("aria-hidden","true"),Y.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let Y=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Y),this._fullscreenButton.title=Y}_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 i.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new i.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},a.GeoJSONSource=et,a.GeolocateControl=class extends i.E{constructor(Y){super(),this._onSuccess=d=>{if(this._map){if(this._isOutOfMapMaxBounds(d))return this._setErrorState(),this.fire(new i.n("outofmaxbounds",d)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=d,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(d),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(d),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new i.n("geolocate",d)),this._finish()}},this._updateCamera=d=>{let P=new i.W(d.coords.longitude,d.coords.latitude),N=d.coords.accuracy,H=this._map.getBearing(),$=i.e({bearing:H},this.options.fitBoundsOptions),se=ie.fromLngLat(P,N);this._map.fitBounds(se,$,{geolocateSource:!0})},this._updateMarker=d=>{if(d){let P=new i.W(d.coords.longitude,d.coords.latitude);this._accuracyCircleMarker.setLngLat(P).addTo(this._map),this._userLocationDotMarker.setLngLat(P).addTo(this._map),this._accuracy=d.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=d=>{if(this._map){if(d.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 P=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=P,this._geolocateButton.setAttribute("aria-label",P),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(d.code===3&&Ar)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new i.n("error",d)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=d=>{if(!this._map)return;let P=(d==null?void 0:d[0])instanceof ResizeObserverEntry;d.geolocateSource||this._watchState!=="ACTIVE_LOCK"||P||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 i.n("trackuserlocationend")),this.fire(new i.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(d=>{d.preventDefault()})),this._geolocateButton=_.create("button","maplibregl-ctrl-geolocate",this._container),_.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=d=>{if(this._map){if(d===!1){i.w("Geolocation support is not available so the GeolocateControl will be disabled.");let P=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=P,this._geolocateButton.setAttribute("aria-label",P)}else{let P=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=P,this._geolocateButton.setAttribute("aria-label",P)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=_.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new kr({element:this._dotElement}),this._circleElement=_.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new kr({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=i.e({},Gr,Y)}onAdd(Y){return this._map=Y,this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return i._(this,arguments,void 0,(function*(d=!1){if(Cr!==void 0&&!d)return Cr;if(window.navigator.permissions===void 0)return Cr=!!window.navigator.geolocation,Cr;try{Cr=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(P){Cr=!!window.navigator.geolocation}return Cr}))})().then((d=>this._finishSetupUI(d))),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,Wr=0,Ar=!1}_isOutOfMapMaxBounds(Y){let d=this._map.getMaxBounds(),P=Y.coords;return d&&(P.longituded.getEast()||P.latituded.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let Y=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&Y))return;let d=this._map.project(Y),P=this._map.unproject([d.x+100,d.y]),N=Y.distanceTo(P)/100,H=2*this._accuracy/N;this._circleElement.style.width=`${H.toFixed(2)}px`,this._circleElement.style.height=`${H.toFixed(2)}px`}trigger(){if(!this._setup)return i.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new i.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Wr--,Ar=!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 i.n("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.n("trackuserlocationstart")),this.fire(new i.n("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let Y;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Wr++,Wr>1?(Y={maximumAge:6e5,timeout:0},Ar=!0):(Y=this.options.positionOptions,Ar=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Y)}}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)}},a.GlobeControl=class{constructor(){this._toggleProjection=()=>{var Y;let d=(Y=this._map.getProjection())===null||Y===void 0?void 0:Y.type;this._map.setProjection(d!=="mercator"&&d?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var Y;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((Y=this._map.getProjection())===null||Y===void 0?void 0:Y.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(Y){return this._map=Y,this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=_.create("button","maplibregl-ctrl-globe",this._container),_.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}},a.Hash=gh,a.ImageSource=qe,a.KeyboardHandler=ia,a.LngLatBounds=ie,a.LogoControl=mh,a.Map=Rt,a.MapLibreMap=Rt,a.MapMouseEvent=Xl,a.MapTouchEvent=cf,a.MapWheelEvent=jh,a.Marker=kr,a.NavigationControl=class{constructor(Y){this._updateZoomButtons=()=>{let d=this._map.getZoom(),P=d===this._map.getMaxZoom(),N=d===this._map.getMinZoom();this._zoomInButton.disabled=P,this._zoomOutButton.disabled=N,this._zoomInButton.setAttribute("aria-disabled",P.toString()),this._zoomOutButton.setAttribute("aria-disabled",N.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(d,P)=>{let N=this._map._getUIString(`NavigationControl.${P}`);d.title=N,d.setAttribute("aria-label",N)},this.options=i.e({},ir,Y),this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(d=>d.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(d=>this._map.zoomIn({},{originalEvent:d}))),_.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(d=>this._map.zoomOut({},{originalEvent:d}))),_.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(d=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:d}):this._map.resetNorth({},{originalEvent:d})})),this._compassIcon=_.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Y){return this._map=Y,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new nr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(Y,d){let P=_.create("button",Y,this._container);return P.type="button",P.addEventListener("click",d),P}},a.Popup=class extends i.E{constructor(Y){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new i.n("close"))),this),this._update=d=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=_.create("div","maplibregl-popup",this._map.getContainer()),this._tip=_.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let de of this.options.className.split(" "))this._container.classList.add(de);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}let P;if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Vr(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),d&&"point"in d&&d.point&&(P=d.point),this._trackPointer&&!P)return;let N=this._flatPos=this._pos=this._trackPointer&&P?P:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&P?P:this._map.transform.locationToScreenPoint(this._lngLat));let H=this.options.anchor,$=Si(this.options.offset);if(!H){let de=this._container.offsetWidth,Ae=this._container.offsetHeight,Fe=(function(Ye){var st,dt,Pe,Xe;return Ye?{top:(st=Ye.top)!==null&&st!==void 0?st:0,right:(dt=Ye.right)!==null&&dt!==void 0?dt:0,bottom:(Pe=Ye.bottom)!==null&&Pe!==void 0?Pe:0,left:(Xe=Ye.left)!==null&&Xe!==void 0?Xe:0}:{top:0,right:0,bottom:0,left:0}})(this.options.padding),Ie;Ie=N.y+$.bottom.ythis._map.transform.height-Ae-Fe.bottom?["bottom"]:[],N.xthis._map.transform.width-de/2-Fe.right&&Ie.push("right"),H=Ie.length===0?"bottom":Ie.join("-")}let se=N.add($[H]);this.options.subpixelPositioning||(se=se.round()),this._container.style.transform=`${sr[H]} translate(${se.x}px,${se.y}px)`,br(this._container,H,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=i.e(Object.create(ai),Y)}addTo(Y){return this._map&&this.remove(),this._map=Y,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 i.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(Y){return this._lngLat=i.W.convert(Y),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(Y){return this.setDOMContent(document.createTextNode(Y))}setHTML(Y){let d=document.createDocumentFragment(),P=document.createElement("body"),N;for(P.innerHTML=Y;N=P.firstChild,N;)d.appendChild(N);return this.setDOMContent(d)}getMaxWidth(){var Y;return(Y=this._container)===null||Y===void 0?void 0:Y.style.maxWidth}setMaxWidth(Y){return this.options.maxWidth=Y,this._update(),this}setDOMContent(Y){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=_.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Y),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Y){return this._container&&this._container.classList.add(Y),this}removeClassName(Y){return this._container&&this._container.classList.remove(Y),this}setOffset(Y){return this.options.offset=Y,this._update(),this}toggleClassName(Y){if(this._container)return this._container.classList.toggle(Y)}setSubpixelPositioning(Y){this.options.subpixelPositioning=Y}setPadding(Y){this.options.padding=Y,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=_.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 Y=this._container.querySelector(Mi);Y&&Y.focus()}},a.RasterDEMTileSource=De,a.RasterTileSource=be,a.ScaleControl=class{constructor(Y){this._onMove=()=>{zn(this._map,this._container,this.options)},this.setUnit=d=>{this.options.unit=d,zn(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},En),Y)}getDefaultPosition(){return"bottom-left"}onAdd(Y){return this._map=Y,this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Y.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}},a.ScrollZoomHandler=Ua,a.Style=Cc,a.TerrainControl=class{constructor(Y){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=Y}onAdd(Y){return this._map=Y,this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=_.create("button","maplibregl-ctrl-terrain",this._container),_.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}},a.TwoFingersTouchPitchHandler=Bi,a.TwoFingersTouchRotateHandler=In,a.TwoFingersTouchZoomHandler=ln,a.TwoFingersTouchZoomRotateHandler=wi,a.VectorTileSource=me,a.VideoSource=we,a.addSourceType=(Y,d)=>i._(void 0,void 0,void 0,(function*(){if(Te(Y))throw new Error(`A source type called "${Y}" already exists.`);((P,N)=>{Ke[P]=N})(Y,d)})),a.clearPrewarmedResources=function(){let Y=ee;Y&&(Y.isPreloaded()&&Y.numActive()===1?(Y.release(q),ee=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},a.createTileMesh=lu,a.getGlobalDispatcher=ue,a.getMaxParallelImageRequests=function(){return i.c.MAX_PARALLEL_IMAGE_REQUESTS},a.getRTLTextPluginStatus=function(){return tt().getRTLTextPluginStatus()},a.getVersion=function(){return ya},a.getWorkerCount=function(){return U.workerCount},a.getWorkerUrl=function(){return i.c.WORKER_URL},a.importScriptInWorkers=function(Y){return ue().broadcast("IS",Y)},a.isTimeFrozen=function(){return v.isFrozen()},a.now=g,a.prewarm=function(){ye().acquire(q)},a.restoreNow=function(){v.restoreNow()},a.setMaxParallelImageRequests=function(Y){i.c.MAX_PARALLEL_IMAGE_REQUESTS=Y},a.setNow=function(Y){v.setNow(Y)},a.setRTLTextPlugin=function(Y,d){return tt().setRTLTextPlugin(Y,d)},a.setWorkerCount=function(Y){U.workerCount=Y},a.setWorkerUrl=function(Y){i.c.WORKER_URL=Y}}));var n=e;return n}))});var GWe=fe((I6r,VWe)=>{"use strict";var g_=Xt(),Btr=as().sanitizeHTML,Otr=oK(),OWe=zy();function NWe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=OWe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var qv=NWe.prototype;qv.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=oD(t)};qv.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};qv.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};qv.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};qv.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};qv.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};qv.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!oD(e)){var r=Ntr(e);t.addSource(this.idSource,r)}};qv.findFollowingMapLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function UWe(e){var t={},r={};switch(e.type){case"circle":g_.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":g_.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":g_.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,a=Otr(n.textposition,n.iconsize);g_.extendFlat(t,{"icon-image":n.icon,"icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":a.anchor,"text-offset":a.offset,"symbol-placement":n.placement}),g_.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":g_.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function Ntr(e){var t=e.sourcetype,r=e.source,n={type:t},a;return t==="geojson"?a="data":t==="vector"?a=typeof r=="string"?"url":"tiles":t==="raster"?(a="tiles",n.tileSize=256):t==="image"&&(a="url",n.coordinates=e.coordinates),n[a]=r,e.sourceattribution&&(n.attribution=Btr(e.sourceattribution)),n}VWe.exports=function(t,r,n){var a=new NWe(t,r);return a.update(n),a}});var QWe=fe((z6r,JWe)=>{"use strict";var hK=BWe(),lD=Xt(),WWe=Cg(),HWe=bi(),Utr=Yi(),Vtr=ed(),sD=kl(),YWe=$p(),Gtr=YWe.drawMode,Htr=YWe.selectMode,jtr=Ac().prepSelect,Wtr=Ac().clearOutline,Ytr=Ac().clearSelectionsCache,Xtr=Ac().selectOnClick,qy=zy(),Ztr=GWe();function XWe(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var cc=XWe.prototype;cc.plot=function(e,t,r){var n=this,a;n.map?a=new Promise(function(i,o){n.updateMap(e,t,i,o)}):a=new Promise(function(i,o){n.createMap(e,t,i,o)}),r.push(a)};cc.createMap=function(e,t,r,n){var a=this,i=t[a.id],o=a.styleObj=KWe(i.style),s=i.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null;let u={container:a.div,style:o.style,center:dK(i.center),zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,maxBounds:l,interactive:!a.isStatic,canvasContextAttributes:{preserveDrawingBuffer:a.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},c=i._fitBounds;c&&(u.bounds=[[c.west,c.south],[c.east,c.north]],u.fitBoundsOptions={padding:qy.fitBoundsPadding});let f=a.map=new hK.Map(u).addControl(new hK.AttributionControl({compact:!0}));var v={};f.on("styleimagemissing",function(p){var x=p.id;if(!v[x]&&/^[a-zA-Z0-9-]+$/.test(x)){v[x]=!0;var _=new Image(15,15);_.onload=function(){f.addImage(x,_,{sdf:!0})},_.crossOrigin="Anonymous",_.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+x+".svg"}}),f.setTransformRequest(function(p){return p=p.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),p=p.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),p=p.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:p}}),f._canvas.style.left="0px",f._canvas.style.top="0px",a.rejectOnError(n),a.isStatic||a.initFx(e,t);var g=[];g.push(new Promise(function(p){f.once("load",p)})),g=g.concat(WWe.fetchTraceGeoData(e)),Promise.all(g).then(function(){c&&ZWe(a,i),$We(a,i),a.fillBelowLookup(e,t),a.updateData(e),a.updateLayout(t),a.resolveOnRender(r)}).catch(n)};cc.updateMap=function(e,t,r,n){var a=this,i=a.map,o=t[this.id];a.rejectOnError(n);var s=[],l=KWe(o.style);JSON.stringify(a.styleObj)!==JSON.stringify(l)&&(a.styleObj=l,i.setStyle(l.style),a.traceHash={},s.push(new Promise(function(u){i.once("styledata",u)}))),s=s.concat(WWe.fetchTraceGeoData(e)),Promise.all(s).then(function(){a.fillBelowLookup(e,t),a.updateData(e);let u=o._fitBounds;u&&(i.fitBounds([[u.west,u.south],[u.east,u.north]],{padding:qy.fitBoundsPadding,animate:!1}),ZWe(a,o),$We(a,o)),a.updateLayout(t),a.resolveOnRender(r)}).catch(n)};function ZWe(e,t){let{center:r,zoom:n}=e.getView();t._input.center=t.center=r,t._input.zoom=t.zoom=n,t._input._fitView={center:zo({},r),zoom:n}}function $We(e,t){let r=e.getView();e.viewInitial={center:lD.extendFlat({},r.center),bearing:t.bearing,pitch:t.pitch,zoom:r.zoom}}cc.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,a,i,o=this.belowLookup={},s=!1;for(a=0;a1)for(a=0;at.project(n).x,_subplot:t},t.yaxis={_id:"y",c2p:n=>t.project(n).y,_subplot:t},t.updateFramework(e),t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},Utr.setConvert(t.mockAxis,e)};cc.initFx=function(e,t){var r=this,n=r.gd,a=r.map;a.on("moveend",function(s){if(r.map){var l=n._fullLayout;if(s.originalEvent||r.wheeling){var u=l[r.id];HWe.call("_storeDirectGUIEdit",n.layout,l._preGUI,r.getViewEdits(u));var c=r.getView();u._input.center=u.center=c.center,u._input.zoom=u.zoom=c.zoom,u._input.bearing=u.bearing=c.bearing,u._input.pitch=u.pitch=c.pitch,n.emit("plotly_relayout",r.getViewEditsWithDerived(c))}s.originalEvent&&s.originalEvent.type==="mouseup"?r.dragging=!1:r.wheeling&&(r.wheeling=!1),l&&l._rehover&&l._rehover()}}),a.on("wheel",function(){r.wheeling=!0}),a.on("mousemove",function(s){var l=r.div.getBoundingClientRect(),u=[s.originalEvent.offsetX,s.originalEvent.offsetY];s.target.getBoundingClientRect=function(){return l},r.xaxis.p2c=function(){return a.unproject(u).lng},r.yaxis.p2c=function(){return a.unproject(u).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&sD.hover(n,s,r.id)},sD.hover(n,s,r.id),n._fullLayout._hoversubplot=r.id});function i(){sD.loneUnhover(t._hoverlayer)}a.on("dragstart",function(){r.dragging=!0,i()}),a.on("zoomstart",i),a.on("mouseout",function(){n._fullLayout._hoversubplot=null});function o(){var s=r.getView();n.emit("plotly_relayouting",r.getViewEditsWithDerived(s))}a.on("drag",o),a.on("zoom",o),a.on("dblclick",function(){var s=n._fullLayout[r.id];HWe.call("_storeDirectGUIEdit",n.layout,n._fullLayout._preGUI,r.getViewEdits(s));var l=r.viewInitial;a.setCenter(dK(l.center)),a.setZoom(l.zoom),a.setBearing(l.bearing),a.setPitch(l.pitch);var u=r.getView();s._input.center=s.center=u.center,s._input.zoom=s.zoom=u.zoom,s._input.bearing=s.bearing=u.bearing,s._input.pitch=s.pitch=u.pitch,n.emit("plotly_doubleclick",null),n.emit("plotly_relayout",r.getViewEditsWithDerived(u))}),r.clearOutline=function(){Ytr(r.dragOptions),Wtr(r.dragOptions.gd)},r.onClickInPanFn=function(s){return function(l){var u=n._fullLayout.clickmode;u.indexOf("select")>-1&&Xtr(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&sD.click(n,l.originalEvent)}}};cc.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function a(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var i=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[a([u.xmin,u.ymin]),a([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(a)}};var s=t.dragOptions;t.dragOptions=lD.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),Htr(i)||Gtr(i)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){jtr(l,u,c,t.dragOptions,i)},Vtr.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};cc.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};cc.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,a;if(r.length!==n.length){for(a=0;a$tr});function $tr(e,t){let r=[];for(let l of e){if(l.subplot!==t||l.visible!==!0)continue;if(l.type==="choroplethmap")return null;let{lat:u,lon:c}=l;if(!c||!u)continue;let f=Math.min(c.length,u.length);for(let v=0;v{"use strict";eYe=$0(Cg())});var aYe=fe((B6r,iYe)=>{"use strict";var vK=Xt(),Ktr=b2(),Jtr=Ah(),nYe=ZM(),{getMapFitBounds:Qtr}=(rYe(),Gs(tYe));iYe.exports=function(t,r,n){Ktr(t,r,n,{type:"map",attributes:nYe,handleDefaults:err,partition:"y",fullData:n})};function err(e,t,r,n){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");let a=r("fitbounds");var i=r("bounds.west"),o=r("bounds.east"),s=r("bounds.south"),l=r("bounds.north");(i===void 0||o===void 0||s===void 0||l===void 0)&&delete t.bounds,Jtr(e,t,{name:"layers",handleItemDefaults:trr}),t._fitBounds=null;let{_fitView:{center:u,zoom:c}={},center:f,zoom:v}=e,g=(f==null?void 0:f.lon)===(u==null?void 0:u.lon)&&(f==null?void 0:f.lat)===(u==null?void 0:u.lat)&&v===c;if(a&&g){let p=Qtr(n.fullData,n.id);p&&(t._fitBounds=p)}t._input=e}function trr(e,t){function r(l,u){return vK.coerce(e,t,nYe.layers,l,u)}var n=r("visible");if(n){var a=r("sourcetype"),i=a==="raster"||a==="image";r("source"),r("sourceattribution"),a==="vector"&&r("sourcelayer"),a==="image"&&r("coordinates");var o;i&&(o="raster");var s=r("type",o);i&&s!=="raster"&&(s=t.type="raster",vK.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),s==="circle"&&r("circle.radius"),s==="line"&&(r("line.width"),r("line.dash")),s==="fill"&&r("fill.outlinecolor"),s==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),vK.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var uD=fe(V0=>{"use strict";var pK=Xt(),oYe=pK.strTranslate,rrr=pK.strScale,nrr=jf().getSubplotCalcData,irr=Q0(),arr=xi(),sYe=ea(),orr=as(),srr=QWe(),By="map";V0.name=By;V0.attr="subplot";V0.idRoot=By;V0.idRegex=V0.attrRegex=pK.counterRegex(By);V0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};V0.layoutAttributes=ZM();V0.supplyLayoutDefaults=aYe();V0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,a=r._subplots[By],i=0;ix/2){var _=f.split("|").join("
");g.text(_).attr("data-unformatted",_).call(orr.convertToTspans,e),p=sYe.bBox(g.node())}g.attr("transform",oYe(-3,-p.height+8)),v.insert("rect",".static-attribution").attr({x:-p.width-6,y:-p.height-3,width:p.width+6,height:p.height+3,fill:"rgba(255, 255, 255, 0.75)"});var y=1;p.width+6>x&&(y=x/(p.width+6));var C=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];v.attr("transform",oYe(C[0],C[1])+rrr(y))}};V0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[By],n=0;n{"use strict";lYe.exports={attributes:eD(),supplyDefaults:gWe(),colorbar:Zf(),formatLabels:aK(),calc:mX(),plot:LWe(),hoverPoints:aD().hoverPoints,eventData:RWe(),selectPoints:zWe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:uD(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var fYe=fe((U6r,cYe)=>{"use strict";cYe.exports=uYe()});var gK=fe((V6r,hYe)=>{"use strict";var Bg=gM(),lrr=_s(),{hovertemplateAttrs:urr,templatefallbackAttrs:crr}=Oo(),frr=Ho(),Oy=ta().extendFlat;hYe.exports=Oy({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Oy({},Bg.featureidkey,{}),below:{valType:"string",editType:"plot"},text:Bg.text,hovertext:Bg.hovertext,marker:{line:{color:Oy({},Bg.marker.line.color,{editType:"plot"}),width:Oy({},Bg.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Oy({},Bg.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Oy({},Bg.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Oy({},Bg.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:Bg.hoverinfo,hovertemplate:urr({},{keys:["properties"]}),hovertemplatefallback:crr(),showlegend:Oy({},frr.showlegend,{dflt:!1})},lrr("",{cLetter:"z",editTypeOverride:"calc"}))});var vYe=fe((G6r,dYe)=>{"use strict";var QM=Xt(),hrr=Vc(),drr=gK();dYe.exports=function(t,r,n,a){function i(c,f){return QM.coerce(t,r,drr,c,f)}var o=i("locations"),s=i("z"),l=i("geojson");if(!QM.isArrayOrTypedArray(o)||!o.length||!QM.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||QM.isPlainObject(l))){r.visible=!1;return}i("featureidkey"),r._length=Math.min(o.length,s.length),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var u=i("marker.line.width");u&&i("marker.line.color"),i("marker.opacity"),hrr(t,r,a,i,{prefix:"",cLetter:"z"}),QM.coerceSelectionMarkerOpacity(r,i)}});var mK=fe((H6r,mYe)=>{"use strict";var vrr=aa(),Og=Xt(),prr=js(),grr=ea(),mrr=cM().makeBlank,pYe=Cg();function yrr(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:"none"},paint:{}},a={layout:{visibility:"none"},paint:{}},i=t._opts={fill:n,line:a,geojson:mrr()};if(!r)return i;var o=pYe.extractTraceFeature(e);if(!o)return i;var s=prr.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;Og.isArrayOrTypedArray(l.opacity)&&(c=function(C){var k=C.mo;return vrr(k)?+Og.constrain(k,0,1):0});var f;Og.isArrayOrTypedArray(u.color)&&(f=function(C){return C.mlc});var v;Og.isArrayOrTypedArray(u.width)&&(v=function(C){return C.mlw});for(var g=0;g{"use strict";var xYe=mK().convert,xrr=mK().convertOnSelect,yYe=zy().traceLayerPrefix;function _Ye(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",yYe+t+"-fill"],["line",yYe+t+"-line"]],this.below=null}var F5=_Ye.prototype;F5.update=function(e){this._update(xYe(e)),e[0].trace._glTrace=this};F5.updateOnSelect=function(e){this._update(xrr(e))};F5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};F5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};bYe.exports=function(t,r){var n=r[0].trace,a=new _Ye(t,n.uid),i=a.sourceId,o=xYe(r),s=a.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(i,{type:"geojson",data:o.geojson}),a._addLayers(o,s),r[0].trace._glTrace=a,a}});var AYe=fe((W6r,TYe)=>{"use strict";TYe.exports={attributes:gK(),supplyDefaults:vYe(),colorbar:H3(),calc:$X(),plot:wYe(),hoverPoints:JX(),eventData:QX(),selectPoints:eZ(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var a=r[n].id;if(typeof a=="string"&&a.indexOf("water")===0){for(var i=n+1;i{"use strict";MYe.exports=AYe()});var xK=fe((X6r,kYe)=>{"use strict";var _rr=_s(),{hovertemplateAttrs:brr,templatefallbackAttrs:wrr}=Oo(),EYe=Ho(),cD=eD(),yK=ta().extendFlat;kYe.exports=yK({lon:cD.lon,lat:cD.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:cD.text,hovertext:cD.hovertext,hoverinfo:yK({},EYe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:brr(),hovertemplatefallback:wrr(),showlegend:yK({},EYe.showlegend,{dflt:!1})},_rr("",{cLetter:"z",editTypeOverride:"calc"}))});var LYe=fe((Z6r,CYe)=>{"use strict";var Trr=Xt(),Arr=Vc(),Mrr=xK();CYe.exports=function(t,r,n,a){function i(u,c){return Trr.coerce(t,r,Mrr,u,c)}var o=i("lon")||[],s=i("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,i("z"),i("radius"),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),Arr(t,r,a,i,{prefix:"",cLetter:"z"})}});var DYe=fe(($6r,FYe)=>{"use strict";var _K=aa(),Srr=Xt().isArrayOrTypedArray,bK=Wa().BADNUM,Err=Mh(),PYe=Xt()._;FYe.exports=function(t,r){for(var n=r._length,a=new Array(n),i=r.z,o=Srr(i)&&i.length,s=0;s{"use strict";var krr=aa(),wK=Xt(),RYe=ni(),IYe=js(),zYe=Wa().BADNUM,Crr=cM().makeBlank;qYe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,a={layout:{visibility:"none"},paint:{}},i=r._opts={heatmap:a,geojson:Crr()};if(!n)return i;var o=[],s,l=r.z,u=r.radius,c=wK.isArrayOrTypedArray(l)&&l.length,f=wK.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:g},properties:p})}}var _=IYe.extractOpts(r),y=_.reversescale?IYe.flipScale(_.colorscale):_.colorscale,C=y[0][1],k=RYe.opacity(C)<1?C:RYe.addOpacity(C,0),S=["interpolate",["linear"],["heatmap-density"],0,k];for(s=1;s{"use strict";var OYe=BYe(),Lrr=zy().traceLayerPrefix;function NYe(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",Lrr+t+"-heatmap"]],this.below=null}var fD=NYe.prototype;fD.update=function(e){var t=this.subplot,r=this.layerList,n=OYe(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(n,a),this.below=a);for(var i=0;i=0;r--)e.removeLayer(t[r][1])};fD.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};UYe.exports=function(t,r){var n=r[0].trace,a=new NYe(t,n.uid),i=a.sourceId,o=OYe(r),s=a.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(i,{type:"geojson",data:o.geojson}),a._addLayers(o,s),a}});var HYe=fe((Q6r,GYe)=>{"use strict";var Prr=Yi(),Frr=aD().hoverPoints,Drr=aD().getExtraText;GYe.exports=function(t,r,n){var a=Frr(t,r,n);if(a){var i=a[0],o=i.cd,s=o[0].trace,l=o[i.index];if(delete i.color,"z"in l){var u=i.subplot.mockAxis;i.z=l.z,i.zLabel=Prr.tickText(u,u.c2l(l.z),"hover").text}return i.extraText=Drr(s,l,o[0].t.labels),[i]}}});var WYe=fe((eMr,jYe)=>{"use strict";jYe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var XYe=fe((tMr,YYe)=>{"use strict";YYe.exports={attributes:xK(),supplyDefaults:LYe(),colorbar:H3(),formatLabels:aK(),calc:DYe(),plot:VYe(),hoverPoints:HYe(),eventData:WYe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";ZYe.exports=XYe()});var AK=fe((iMr,tXe)=>{"use strict";var Rrr=Ds(),Irr=Ho(),KYe=tc(),TK=hb(),zrr=nl().attributes,{hovertemplateAttrs:JYe,templatefallbackAttrs:QYe}=Oo(),qrr=_s(),Brr=Mo().templatedArray,Orr=pl().descriptionOnlyNumbers,eXe=ta().extendFlat,Nrr=rl().overrideAll,nMr=tXe.exports=Nrr({hoverinfo:eXe({},Irr.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:TK.hoverlabel,domain:zrr({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},direction:{valType:"enumerated",values:["forward","reversed"],dflt:"forward"},valueformat:{valType:"string",dflt:".3s",description:Orr("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:Rrr({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:KYe.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:TK.hoverlabel,hovertemplate:JYe({},{keys:["value","label"]}),hovertemplatefallback:QYe(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"},sort:{valType:"enumerated",values:["auto","input"],dflt:"auto"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:KYe.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:TK.hoverlabel,hovertemplate:JYe({},{keys:["value","label"]}),hovertemplatefallback:QYe(),colorscales:Brr("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:eXe(qrr().colorscale,{dflt:[[0,"white"],[1,"black"]]})}),sort:{valType:"enumerated",values:["auto","input"],dflt:"auto"}}},"calc","nested")});var aXe=fe((aMr,iXe)=>{"use strict";var D5=Xt(),hD=AK(),m_=ni(),Urr=nl().defaults,rXe=AT(),nXe=Mo(),Vrr=Ah();iXe.exports=function(t,r,n,a){function i(S,L){return D5.coerce(t,r,hD,S,L)}var o=D5.extendDeep(a.hoverlabel,t.hoverlabel),s=t.node,l=nXe.newContainer(r,"node");function u(S,L){return D5.coerce(s,l,hD.node,S,L)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",t.hoverinfo),rXe(s,l,u,o),u("hovertemplate"),u("align"),u("sort");var c=a.colorway;let f=S=>c[S%c.length];u("color",l.label.map((S,L)=>m_.addOpacity(f(L),.8))),u("customdata");var v=t.link||{},g=nXe.newContainer(r,"link");function p(S,L){return D5.coerce(v,g,hD.link,S,L)}p("label"),p("arrowlen"),p("source"),p("target"),p("value"),p("line.color"),p("line.width"),p("hoverinfo",t.hoverinfo),rXe(v,g,p,o),p("hovertemplate"),p("sort");var x=m_.luminosity(a.paper_bgcolor)<.333,_=x?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",y=p("color",_);function C(S){if(!m_.isValid(S))return S;let L=m_.opacity(S);return L<=.8?m_.addOpacity(S,L+.2):x?m_.brighten(S,10):m_.adjustLightness(S,-10)}p("hovercolor",Array.isArray(y)?y.map(C):C(y)),p("customdata"),Vrr(v,g,{name:"colorscales",handleItemDefaults:Grr}),Urr(r,a,i),i("orientation"),i("direction"),i("valueformat"),i("valuesuffix");let k=l.x.length&&l.y.length?"freeform":void 0;i("arrangement",k),D5.coerceFont(i,"textfont",a.font,{autoShadowDflt:!0}),r._length=null};function Grr(e,t){function r(n,a){return D5.coerce(e,t,hD.link.colorscales,n,a)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var MK=fe((oMr,oXe)=>{"use strict";oXe.exports=Hrr;function Hrr(e){for(var t=e.length,r=new Array(t),n=new Array(t),a=new Array(t),i=new Array(t),o=new Array(t),s=new Array(t),l=0;l0;){_=C[C.length-1];var k=e[_];if(i[_]=0&&s[_].push(o[L])}i[_]=S}else{if(n[_]===r[_]){for(var w=[],A=[],T=0,S=y.length-1;S>=0;--S){var m=y[S];if(a[m]=!1,w.push(m),A.push(s[m]),T+=s[m].length,o[m]=c.length,m===_){y.length=S;break}}c.push(w);for(var F=new Array(T),S=0;S{"use strict";var jrr=MK(),R5=Xt(),Wrr=L1().wrap,eS=R5.isArrayOrTypedArray,sXe=R5.isIndex,lXe=js();function Yrr(e){var t=e.node,r=e.link,n=[],a=eS(r.color),i=eS(r.hovercolor),o=eS(r.customdata),s={},l={},u=r.colorscales.length,c;for(c=0;cp&&(p=r.source[c]),r.target[c]>p&&(p=r.target[c]);var x=p+1;e.node._count=x;var _,y=e.node.groups,C={};for(c=0;c0&&sXe(T,x)&&sXe(m,x)&&!(C.hasOwnProperty(T)&&C.hasOwnProperty(m)&&C[T]===C[m])){C.hasOwnProperty(m)&&(m=C[m]),C.hasOwnProperty(T)&&(T=C[T]),T=+T,m=+m,s[T]=s[m]=!0;var F="";r.label&&r.label[c]&&(F=r.label[c]);var E=null;F&&l.hasOwnProperty(F)&&(E=l[F]),n.push({pointNumber:c,label:F,color:a?r.color[c]:r.color,hovercolor:i?r.hovercolor[c]:r.hovercolor,customdata:o?r.customdata[c]:r.customdata,concentrationscale:E,source:T,target:m,value:+A}),w.source.push(T),w.target.push(m)}}var I=x+y.length,R=eS(t.color),B=eS(t.customdata),O=[];for(c=0;cx-1,childrenNodes:[],pointNumber:c,label:V,color:R?t.color[c]:t.color,customdata:B?t.customdata[c]:t.customdata})}var j=!1;return Xrr(I,w.source,w.target)&&(j=!0),{circular:j,links:n,nodes:O,groups:y,groupLookup:C}}function Xrr(e,t,r){for(var n=R5.init2dArray(e,0),a=0;a1})}uXe.exports=function(t,r){var n=Yrr(r);return Wrr({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var hXe=fe((dD,fXe)=>{(function(e,t){typeof dD=="object"&&typeof fXe!="undefined"?t(dD):(e=e||self,t(e.d3=e.d3||{}))})(dD,function(e){"use strict";function t(A){var T=+this._x.call(null,A),m=+this._y.call(null,A);return r(this.cover(T,m),T,m,A)}function r(A,T,m,F){if(isNaN(T)||isNaN(m))return A;var E,I=A._root,R={data:F},B=A._x0,O=A._y0,V=A._x1,j=A._y1,q,U,J,ee,ce,ye,xe,ue;if(!I)return A._root=R,A;for(;I.length;)if((ce=T>=(q=(B+V)/2))?B=q:V=q,(ye=m>=(U=(O+j)/2))?O=U:j=U,E=I,!(I=I[xe=ye<<1|ce]))return E[xe]=R,A;if(J=+A._x.call(null,I.data),ee=+A._y.call(null,I.data),T===J&&m===ee)return R.next=I,E?E[xe]=R:A._root=R,A;do E=E?E[xe]=new Array(4):A._root=new Array(4),(ce=T>=(q=(B+V)/2))?B=q:V=q,(ye=m>=(U=(O+j)/2))?O=U:j=U;while((xe=ye<<1|ce)===(ue=(ee>=U)<<1|J>=q));return E[ue]=I,E[xe]=R,A}function n(A){var T,m,F=A.length,E,I,R=new Array(F),B=new Array(F),O=1/0,V=1/0,j=-1/0,q=-1/0;for(m=0;mj&&(j=E),Iq&&(q=I));if(O>j||V>q)return this;for(this.cover(O,V).cover(j,q),m=0;mA||A>=E||F>T||T>=I;)switch(V=(Tj||(B=ee.y0)>q||(O=ee.x1)=xe)<<1|A>=ye)&&(ee=U[U.length-1],U[U.length-1]=U[U.length-1-ce],U[U.length-1-ce]=ee)}else{var ue=A-+this._x.call(null,J.data),K=T-+this._y.call(null,J.data),_e=ue*ue+K*K;if(_e=(U=(R+O)/2))?R=U:O=U,(ce=q>=(J=(B+V)/2))?B=J:V=J,T=m,!(m=m[ye=ce<<1|ee]))return this;if(!m.length)break;(T[ye+1&3]||T[ye+2&3]||T[ye+3&3])&&(F=T,xe=ye)}for(;m.data!==A;)if(E=m,!(m=m.next))return this;return(I=m.next)&&delete m.next,E?(I?E.next=I:delete E.next,this):T?(I?T[ye]=I:delete T[ye],(m=T[0]||T[1]||T[2]||T[3])&&m===(T[3]||T[2]||T[1]||T[0])&&!m.length&&(F?F[xe]=m:this._root=m),this):(this._root=I,this)}function c(A){for(var T=0,m=A.length;T{(function(e,t){t(typeof vD=="object"&&typeof dXe!="undefined"?vD:e.d3=e.d3||{})})(vD,(function(e){"use strict";var t="$";function r(){}r.prototype=n.prototype={constructor:r,has:function(x){return t+x in this},get:function(x){return this[t+x]},set:function(x,_){return this[t+x]=_,this},remove:function(x){var _=t+x;return _ in this&&delete this[_]},clear:function(){for(var x in this)x[0]===t&&delete this[x]},keys:function(){var x=[];for(var _ in this)_[0]===t&&x.push(_.slice(1));return x},values:function(){var x=[];for(var _ in this)_[0]===t&&x.push(this[_]);return x},entries:function(){var x=[];for(var _ in this)_[0]===t&&x.push({key:_.slice(1),value:this[_]});return x},size:function(){var x=0;for(var _ in this)_[0]===t&&++x;return x},empty:function(){for(var x in this)if(x[0]===t)return!1;return!0},each:function(x){for(var _ in this)_[0]===t&&x(this[_],_.slice(1),this)}};function n(x,_){var y=new r;if(x instanceof r)x.each(function(w,A){y.set(A,w)});else if(Array.isArray(x)){var C=-1,k=x.length,S;if(_==null)for(;++C=x.length)return y!=null&&w.sort(y),C!=null?C(w):w;for(var F=-1,E=w.length,I=x[A++],R,B,O=n(),V,j=T();++Fx.length)return w;var T,m=_[A-1];return C!=null&&A>=x.length?T=w.entries():(T=[],w.each(function(F,E){T.push({key:E,values:L(F,A)})})),m!=null?T.sort(function(F,E){return m(F.key,E.key)}):T}return k={object:function(w){return S(w,0,i,o)},map:function(w){return S(w,0,s,l)},entries:function(w){return L(S(w,0,s,l),0)},key:function(w){return x.push(w),k},sortKeys:function(w){return _[x.length-1]=w,k},sortValues:function(w){return y=w,k},rollup:function(w){return C=w,k}}}function i(){return{}}function o(x,_,y){x[_]=y}function s(){return n()}function l(x,_,y){x.set(_,y)}function u(){}var c=n.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(x){return x+="",this[t+x]=x,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(x,_){var y=new u;if(x instanceof u)x.each(function(S){y.add(S)});else if(x){var C=-1,k=x.length;if(_==null)for(;++C{(function(e,t){typeof pD=="object"&&typeof vXe!="undefined"?t(pD):(e=e||self,t(e.d3=e.d3||{}))})(pD,function(e){"use strict";var t={value:function(){}};function r(){for(var s=0,l=arguments.length,u={},c;s=0&&(c=u.slice(f+1),u=u.slice(0,f)),u&&!l.hasOwnProperty(u))throw new Error("unknown type: "+u);return{type:u,name:c}})}n.prototype=r.prototype={constructor:n,on:function(s,l){var u=this._,c=a(s+"",u),f,v=-1,g=c.length;if(arguments.length<2){for(;++v0)for(var u=new Array(f),c=0,f,v;c{(function(e,t){typeof gD=="object"&&typeof gXe!="undefined"?t(gD):(e=e||self,t(e.d3=e.d3||{}))})(gD,function(e){"use strict";var t=0,r=0,n=0,a=1e3,i,o,s=0,l=0,u=0,c=typeof performance=="object"&&performance.now?performance:Date,f=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(A){setTimeout(A,17)};function v(){return l||(f(g),l=c.now()+u)}function g(){l=0}function p(){this._call=this._time=this._next=null}p.prototype=x.prototype={constructor:p,restart:function(A,T,m){if(typeof A!="function")throw new TypeError("callback is not a function");m=(m==null?v():+m)+(T==null?0:+T),!this._next&&o!==this&&(o?o._next=this:i=this,o=this),this._call=A,this._time=m,S()},stop:function(){this._call&&(this._call=null,this._time=1/0,S())}};function x(A,T,m){var F=new p;return F.restart(A,T,m),F}function _(){v(),++t;for(var A=i,T;A;)(T=l-A._time)>=0&&A._call.call(null,T),A=A._next;--t}function y(){l=(s=c.now())+u,t=r=0;try{_()}finally{t=0,k(),l=0}}function C(){var A=c.now(),T=A-s;T>a&&(u-=T,s=A)}function k(){for(var A,T=i,m,F=1/0;T;)T._call?(F>T._time&&(F=T._time),A=T,T=T._next):(m=T._next,T._next=null,T=A?A._next=m:i=m);o=A,S(F)}function S(A){if(!t){r&&(r=clearTimeout(r));var T=A-l;T>24?(A<1/0&&(r=setTimeout(y,A-c.now()-u)),n&&(n=clearInterval(n))):(n||(s=c.now(),n=setInterval(C,a)),t=1,f(y))}}function L(A,T,m){var F=new p;return T=T==null?0:+T,F.restart(function(E){F.stop(),A(E+T)},T,m),F}function w(A,T,m){var F=new p,E=T;return T==null?(F.restart(A,T,m),F):(T=+T,m=m==null?v():+m,F.restart(function I(R){R+=E,F.restart(I,E+=T,m),A(R)},T,m),F)}e.interval=w,e.now=v,e.timeout=L,e.timer=x,e.timerFlush=_,Object.defineProperty(e,"__esModule",{value:!0})})});var xXe=fe((mD,yXe)=>{(function(e,t){typeof mD=="object"&&typeof yXe!="undefined"?t(mD,hXe(),SK(),pXe(),mXe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(mD,(function(e,t,r,n,a){"use strict";function i(A,T){var m;A==null&&(A=0),T==null&&(T=0);function F(){var E,I=m.length,R,B=0,O=0;for(E=0;Eq.index){var me=U-pe.x-pe.vx,be=J-pe.y-pe.vy,De=me*me+be*be;DeU+le||neJ+le||aeO.r&&(O.r=O[V].r)}function B(){if(T){var O,V=T.length,j;for(m=new Array(V),O=0;O1?(ce==null?B.remove(ee):B.set(ee,J(ce)),T):B.get(ee)},find:function(ee,ce,ye){var xe=0,ue=A.length,K,_e,ne,ae,pe;for(ye==null?ye=1/0:ye*=ye,xe=0;xe1?(V.on(ee,ce),T):V.on(ee)}}}function k(){var A,T,m,F=o(-30),E,I=1,R=1/0,B=.81;function O(U){var J,ee=A.length,ce=t.quadtree(A,p,x).visitAfter(j);for(m=U,J=0;J=R)return;(U.data!==T||U.next)&&(ye===0&&(ye=s(),K+=ye*ye),xe===0&&(xe=s(),K+=xe*xe),K{(function(e,t){typeof yD=="object"&&typeof _Xe!="undefined"?t(yD):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(yD,(function(e){"use strict";function t(Dt,At){return DtAt?1:Dt>=At?0:NaN}function r(Dt){let At=Dt,Vt=Dt;Dt.length===1&&(At=(rn,Jr)=>Dt(rn)-Jr,Vt=n(Dt));function Qt(rn,Jr,qn,ri){for(qn==null&&(qn=0),ri==null&&(ri=rn.length);qn>>1;Vt(rn[Jn],Jr)<0?qn=Jn+1:ri=Jn}return qn}function Ut(rn,Jr,qn,ri){for(qn==null&&(qn=0),ri==null&&(ri=rn.length);qn>>1;Vt(rn[Jn],Jr)>0?ri=Jn:qn=Jn+1}return qn}function _r(rn,Jr,qn,ri){qn==null&&(qn=0),ri==null&&(ri=rn.length);let Jn=Qt(rn,Jr,qn,ri-1);return Jn>qn&&At(rn[Jn-1],Jr)>-At(rn[Jn],Jr)?Jn-1:Jn}return{left:Qt,center:_r,right:Ut}}function n(Dt){return(At,Vt)=>t(Dt(At),Vt)}function a(Dt){return Dt===null?NaN:+Dt}function*i(Dt,At){if(At===void 0)for(let Vt of Dt)Vt!=null&&(Vt=+Vt)>=Vt&&(yield Vt);else{let Vt=-1;for(let Qt of Dt)(Qt=At(Qt,++Vt,Dt))!=null&&(Qt=+Qt)>=Qt&&(yield Qt)}}let o=r(t),s=o.right,l=o.left,u=r(a).center;function c(Dt,At){let Vt=0;if(At===void 0)for(let Qt of Dt)Qt!=null&&(Qt=+Qt)>=Qt&&++Vt;else{let Qt=-1;for(let Ut of Dt)(Ut=At(Ut,++Qt,Dt))!=null&&(Ut=+Ut)>=Ut&&++Vt}return Vt}function f(Dt){return Dt.length|0}function v(Dt){return!(Dt>0)}function g(Dt){return typeof Dt!="object"||"length"in Dt?Dt:Array.from(Dt)}function p(Dt){return At=>Dt(...At)}function x(...Dt){let At=typeof Dt[Dt.length-1]=="function"&&p(Dt.pop());Dt=Dt.map(g);let Vt=Dt.map(f),Qt=Dt.length-1,Ut=new Array(Qt+1).fill(0),_r=[];if(Qt<0||Vt.some(v))return _r;for(;;){_r.push(Ut.map((Jr,qn)=>Dt[qn][Jr]));let rn=Qt;for(;++Ut[rn]===Vt[rn];){if(rn===0)return At?_r.map(At):_r;Ut[rn--]=0}}}function _(Dt,At){var Vt=0,Qt=0;return Float64Array.from(Dt,At===void 0?Ut=>Vt+=+Ut||0:Ut=>Vt+=+At(Ut,Qt++,Dt)||0)}function y(Dt,At){return AtDt?1:At>=Dt?0:NaN}function C(Dt,At){let Vt=0,Qt,Ut=0,_r=0;if(At===void 0)for(let rn of Dt)rn!=null&&(rn=+rn)>=rn&&(Qt=rn-Ut,Ut+=Qt/++Vt,_r+=Qt*(rn-Ut));else{let rn=-1;for(let Jr of Dt)(Jr=At(Jr,++rn,Dt))!=null&&(Jr=+Jr)>=Jr&&(Qt=Jr-Ut,Ut+=Qt/++Vt,_r+=Qt*(Jr-Ut))}if(Vt>1)return _r/(Vt-1)}function k(Dt,At){let Vt=C(Dt,At);return Vt&&Math.sqrt(Vt)}function S(Dt,At){let Vt,Qt;if(At===void 0)for(let Ut of Dt)Ut!=null&&(Vt===void 0?Ut>=Ut&&(Vt=Qt=Ut):(Vt>Ut&&(Vt=Ut),Qt=_r&&(Vt=Qt=_r):(Vt>_r&&(Vt=_r),Qt<_r&&(Qt=_r)))}return[Vt,Qt]}class L{constructor(){this._partials=new Float64Array(32),this._n=0}add(At){let Vt=this._partials,Qt=0;for(let Ut=0;Ut0){for(rn=At[--Vt];Vt>0&&(Qt=rn,Ut=At[--Vt],rn=Qt+Ut,_r=Ut-(rn-Qt),!_r););Vt>0&&(_r<0&&At[Vt-1]<0||_r>0&&At[Vt-1]>0)&&(Ut=_r*2,Qt=rn+Ut,Ut==Qt-rn&&(rn=Qt))}return rn}}function w(Dt,At){let Vt=new L;if(At===void 0)for(let Qt of Dt)(Qt=+Qt)&&Vt.add(Qt);else{let Qt=-1;for(let Ut of Dt)(Ut=+At(Ut,++Qt,Dt))&&Vt.add(Ut)}return+Vt}function A(Dt,At){let Vt=new L,Qt=-1;return Float64Array.from(Dt,At===void 0?Ut=>Vt.add(+Ut||0):Ut=>Vt.add(+At(Ut,++Qt,Dt)||0))}class T extends Map{constructor(At,Vt=R){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:Vt}}),At!=null)for(let[Qt,Ut]of At)this.set(Qt,Ut)}get(At){return super.get(F(this,At))}has(At){return super.has(F(this,At))}set(At,Vt){return super.set(E(this,At),Vt)}delete(At){return super.delete(I(this,At))}}class m extends Set{constructor(At,Vt=R){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:Vt}}),At!=null)for(let Qt of At)this.add(Qt)}has(At){return super.has(F(this,At))}add(At){return super.add(E(this,At))}delete(At){return super.delete(I(this,At))}}function F({_intern:Dt,_key:At},Vt){let Qt=At(Vt);return Dt.has(Qt)?Dt.get(Qt):Vt}function E({_intern:Dt,_key:At},Vt){let Qt=At(Vt);return Dt.has(Qt)?Dt.get(Qt):(Dt.set(Qt,Vt),Vt)}function I({_intern:Dt,_key:At},Vt){let Qt=At(Vt);return Dt.has(Qt)&&(Vt=Dt.get(Vt),Dt.delete(Qt)),Vt}function R(Dt){return Dt!==null&&typeof Dt=="object"?Dt.valueOf():Dt}function B(Dt){return Dt}function O(Dt,...At){return ce(Dt,B,B,At)}function V(Dt,...At){return ce(Dt,Array.from,B,At)}function j(Dt,At,...Vt){return ce(Dt,B,At,Vt)}function q(Dt,At,...Vt){return ce(Dt,Array.from,At,Vt)}function U(Dt,...At){return ce(Dt,B,ee,At)}function J(Dt,...At){return ce(Dt,Array.from,ee,At)}function ee(Dt){if(Dt.length!==1)throw new Error("duplicate key");return Dt[0]}function ce(Dt,At,Vt,Qt){return(function Ut(_r,rn){if(rn>=Qt.length)return Vt(_r);let Jr=new T,qn=Qt[rn++],ri=-1;for(let Jn of _r){let Ii=qn(Jn,++ri,_r),Vi=Jr.get(Ii);Vi?Vi.push(Jn):Jr.set(Ii,[Jn])}for(let[Jn,Ii]of Jr)Jr.set(Jn,Ut(Ii,rn));return At(Jr)})(Dt,0)}function ye(Dt,At){return Array.from(At,Vt=>Dt[Vt])}function xe(Dt,...At){if(typeof Dt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");Dt=Array.from(Dt);let[Vt=t]=At;if(Vt.length===1||At.length>1){let Qt=Uint32Array.from(Dt,(Ut,_r)=>_r);return At.length>1?(At=At.map(Ut=>Dt.map(Ut)),Qt.sort((Ut,_r)=>{for(let rn of At){let Jr=t(rn[Ut],rn[_r]);if(Jr)return Jr}})):(Vt=Dt.map(Vt),Qt.sort((Ut,_r)=>t(Vt[Ut],Vt[_r]))),ye(Dt,Qt)}return Dt.sort(Vt)}function ue(Dt,At,Vt){return(At.length===1?xe(j(Dt,At,Vt),(([Qt,Ut],[_r,rn])=>t(Ut,rn)||t(Qt,_r))):xe(O(Dt,Vt),(([Qt,Ut],[_r,rn])=>At(Ut,rn)||t(Qt,_r)))).map(([Qt])=>Qt)}var K=Array.prototype,_e=K.slice;function ne(Dt){return function(){return Dt}}var ae=Math.sqrt(50),pe=Math.sqrt(10),ie=Math.sqrt(2);function le(Dt,At,Vt){var Qt,Ut=-1,_r,rn,Jr;if(At=+At,Dt=+Dt,Vt=+Vt,Dt===At&&Vt>0)return[Dt];if((Qt=At0){let qn=Math.round(Dt/Jr),ri=Math.round(At/Jr);for(qn*JrAt&&--ri,rn=new Array(_r=ri-qn+1);++Ut<_r;)rn[Ut]=(qn+Ut)*Jr}else{Jr=-Jr;let qn=Math.round(Dt*Jr),ri=Math.round(At*Jr);for(qn/JrAt&&--ri,rn=new Array(_r=ri-qn+1);++Ut<_r;)rn[Ut]=(qn+Ut)/Jr}return Qt&&rn.reverse(),rn}function me(Dt,At,Vt){var Qt=(At-Dt)/Math.max(0,Vt),Ut=Math.floor(Math.log(Qt)/Math.LN10),_r=Qt/Math.pow(10,Ut);return Ut>=0?(_r>=ae?10:_r>=pe?5:_r>=ie?2:1)*Math.pow(10,Ut):-Math.pow(10,-Ut)/(_r>=ae?10:_r>=pe?5:_r>=ie?2:1)}function be(Dt,At,Vt){var Qt=Math.abs(At-Dt)/Math.max(0,Vt),Ut=Math.pow(10,Math.floor(Math.log(Qt)/Math.LN10)),_r=Qt/Ut;return _r>=ae?Ut*=10:_r>=pe?Ut*=5:_r>=ie&&(Ut*=2),At0?(Dt=Math.floor(Dt/Ut)*Ut,At=Math.ceil(At/Ut)*Ut):Ut<0&&(Dt=Math.ceil(Dt*Ut)/Ut,At=Math.floor(At*Ut)/Ut),Qt=Ut}}function Ge(Dt){return Math.ceil(Math.log(c(Dt))/Math.LN2)+1}function ht(){var Dt=B,At=S,Vt=Ge;function Qt(Ut){Array.isArray(Ut)||(Ut=Array.from(Ut));var _r,rn=Ut.length,Jr,qn=new Array(rn);for(_r=0;_r=Ii)if(Xi>=Ii&&At===S){let Ma=me(Jn,Ii,oa);isFinite(Ma)&&(Ma>0?Ii=(Math.floor(Ii/Ma)+1)*Ma:Ma<0&&(Ii=(Math.ceil(Ii*-Ma)+1)/-Ma))}else Vi.pop()}for(var ra=Vi.length;Vi[0]<=Jn;)Vi.shift(),--ra;for(;Vi[ra-1]>Ii;)Vi.pop(),--ra;var ha=new Array(ra+1),va;for(_r=0;_r<=ra;++_r)va=ha[_r]=[],va.x0=_r>0?Vi[_r-1]:Jn,va.x1=_r=Qt)&&(Vt=Qt);else{let Qt=-1;for(let Ut of Dt)(Ut=At(Ut,++Qt,Dt))!=null&&(Vt=Ut)&&(Vt=Ut)}return Vt}function Oe(Dt,At){let Vt;if(At===void 0)for(let Qt of Dt)Qt!=null&&(Vt>Qt||Vt===void 0&&Qt>=Qt)&&(Vt=Qt);else{let Qt=-1;for(let Ut of Dt)(Ut=At(Ut,++Qt,Dt))!=null&&(Vt>Ut||Vt===void 0&&Ut>=Ut)&&(Vt=Ut)}return Vt}function ze(Dt,At,Vt=0,Qt=Dt.length-1,Ut=t){for(;Qt>Vt;){if(Qt-Vt>600){let qn=Qt-Vt+1,ri=At-Vt+1,Jn=Math.log(qn),Ii=.5*Math.exp(2*Jn/3),Vi=.5*Math.sqrt(Jn*Ii*(qn-Ii)/qn)*(ri-qn/2<0?-1:1),ra=Math.max(Vt,Math.floor(At-ri*Ii/qn+Vi)),ha=Math.min(Qt,Math.floor(At+(qn-ri)*Ii/qn+Vi));ze(Dt,At,ra,ha,Ut)}let _r=Dt[At],rn=Vt,Jr=Qt;for(ct(Dt,Vt,At),Ut(Dt[Qt],_r)>0&&ct(Dt,Vt,Qt);rn0;)--Jr}Ut(Dt[Vt],_r)===0?ct(Dt,Vt,Jr):(++Jr,ct(Dt,Jr,Qt)),Jr<=At&&(Vt=Jr+1),At<=Jr&&(Qt=Jr-1)}return Dt}function ct(Dt,At,Vt){let Qt=Dt[At];Dt[At]=Dt[Vt],Dt[Vt]=Qt}function et(Dt,At,Vt){if(Dt=Float64Array.from(i(Dt,Vt)),!!(Qt=Dt.length)){if((At=+At)<=0||Qt<2)return Oe(Dt);if(At>=1)return it(Dt);var Qt,Ut=(Qt-1)*At,_r=Math.floor(Ut),rn=it(ze(Dt,_r).subarray(0,_r+1)),Jr=Oe(Dt.subarray(_r+1));return rn+(Jr-rn)*(Ut-_r)}}function qe(Dt,At,Vt=a){if(Qt=Dt.length){if((At=+At)<=0||Qt<2)return+Vt(Dt[0],0,Dt);if(At>=1)return+Vt(Dt[Qt-1],Qt-1,Dt);var Qt,Ut=(Qt-1)*At,_r=Math.floor(Ut),rn=+Vt(Dt[_r],_r,Dt),Jr=+Vt(Dt[_r+1],_r+1,Dt);return rn+(Jr-rn)*(Ut-_r)}}function we(Dt,At,Vt){return Math.ceil((Vt-At)/(2*(et(Dt,.75)-et(Dt,.25))*Math.pow(c(Dt),-1/3)))}function Le(Dt,At,Vt){return Math.ceil((Vt-At)/(3.5*k(Dt)*Math.pow(c(Dt),-1/3)))}function Ke(Dt,At){let Vt,Qt=-1,Ut=-1;if(At===void 0)for(let _r of Dt)++Ut,_r!=null&&(Vt<_r||Vt===void 0&&_r>=_r)&&(Vt=_r,Qt=Ut);else for(let _r of Dt)(_r=At(_r,++Ut,Dt))!=null&&(Vt<_r||Vt===void 0&&_r>=_r)&&(Vt=_r,Qt=Ut);return Qt}function Te(Dt,At){let Vt=0,Qt=0;if(At===void 0)for(let Ut of Dt)Ut!=null&&(Ut=+Ut)>=Ut&&(++Vt,Qt+=Ut);else{let Ut=-1;for(let _r of Dt)(_r=At(_r,++Ut,Dt))!=null&&(_r=+_r)>=_r&&(++Vt,Qt+=_r)}if(Vt)return Qt/Vt}function Ve(Dt,At){return et(Dt,.5,At)}function*$e(Dt){for(let At of Dt)yield*Cte(At)}function ot(Dt){return Array.from($e(Dt))}function tt(Dt,At){let Vt,Qt=-1,Ut=-1;if(At===void 0)for(let _r of Dt)++Ut,_r!=null&&(Vt>_r||Vt===void 0&&_r>=_r)&&(Vt=_r,Qt=Ut);else for(let _r of Dt)(_r=At(_r,++Ut,Dt))!=null&&(Vt>_r||Vt===void 0&&_r>=_r)&&(Vt=_r,Qt=Ut);return Qt}function nt(Dt,At=We){let Vt=[],Qt,Ut=!1;for(let _r of Dt)Ut&&Vt.push(At(Qt,_r)),Qt=_r,Ut=!0;return Vt}function We(Dt,At){return[Dt,At]}function mt(Dt,At,Vt){Dt=+Dt,At=+At,Vt=(Ut=arguments.length)<2?(At=Dt,Dt=0,1):Ut<3?1:+Vt;for(var Qt=-1,Ut=Math.max(0,Math.ceil((At-Dt)/Vt))|0,_r=new Array(Ut);++Qt0:t(rn,rn)===0)&&(Vt=_r,Ut=rn,Qt=!0)}}else for(let Ut of Dt)(Qt?At(Ut,Vt)>0:At(Ut,Ut)===0)&&(Vt=Ut,Qt=!0);return Vt}function mr(Dt,At=t){if(At.length===1)return Ke(Dt,At);let Vt,Qt=-1,Ut=-1;for(let _r of Dt)++Ut,(Qt<0?At(_r,_r)===0:At(_r,Vt)>0)&&(Vt=_r,Qt=Ut);return Qt}function or(Dt,At){let Vt=Yt(Dt,At);return Vt<0?void 0:Vt}var fr=Ot(Math.random);function Ot(Dt){return function(Vt,Qt=0,Ut=Vt.length){let _r=Ut-(Qt=+Qt);for(;_r;){let rn=Dt()*_r--|0,Jr=Vt[_r+Qt];Vt[_r+Qt]=Vt[rn+Qt],Vt[rn+Qt]=Jr}return Vt}}function cr(Dt,At){let Vt=0;if(At===void 0)for(let Qt of Dt)(Qt=+Qt)&&(Vt+=Qt);else{let Qt=-1;for(let Ut of Dt)(Ut=+At(Ut,++Qt,Dt))&&(Vt+=Ut)}return Vt}function Ct(Dt){if(!(_r=Dt.length))return[];for(var At=-1,Vt=Oe(Dt,wt),Qt=new Array(Vt);++AtAt(Vt,Qt,Dt))}function rr(Dt,At,Vt){if(typeof At!="function")throw new TypeError("reducer is not a function");let Qt=Dt[Symbol.iterator](),Ut,_r,rn=-1;if(arguments.length<3){if({done:Ut,value:Vt}=Qt.next(),Ut)return;++rn}for(;{done:Ut,value:_r}=Qt.next(),!Ut;)Vt=At(Vt,_r,++rn,Dt);return Vt}function pr(Dt){if(typeof Dt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(Dt).reverse()}function Kr(Dt,...At){Dt=new Set(Dt);for(let Vt of At)for(let Qt of Vt)Dt.delete(Qt);return Dt}function Nr(Dt,At){let Vt=At[Symbol.iterator](),Qt=new Set;for(let Ut of Dt){if(Qt.has(Ut))return!1;let _r,rn;for(;({value:_r,done:rn}=Vt.next())&&!rn;){if(Object.is(Ut,_r))return!1;Qt.add(_r)}}return!0}function dn(Dt){return Dt instanceof Set?Dt:new Set(Dt)}function xr(Dt,...At){Dt=new Set(Dt),At=At.map(dn);e:for(let Vt of Dt)for(let Qt of At)if(!Qt.has(Vt)){Dt.delete(Vt);continue e}return Dt}function Fr(Dt,At){let Vt=Dt[Symbol.iterator](),Qt=new Set;for(let Ut of At){if(Qt.has(Ut))continue;let _r,rn;for(;{value:_r,done:rn}=Vt.next();){if(rn)return!1;if(Qt.add(_r),Object.is(Ut,_r))break}}return!0}function Zr(Dt,At){return Fr(At,Dt)}function Cn(...Dt){let At=new Set;for(let Vt of Dt)for(let Qt of Vt)At.add(Qt);return At}e.Adder=L,e.InternMap=T,e.InternSet=m,e.ascending=t,e.bin=ht,e.bisect=s,e.bisectCenter=u,e.bisectLeft=l,e.bisectRight=s,e.bisector=r,e.count=c,e.cross=x,e.cumsum=_,e.descending=y,e.deviation=k,e.difference=Kr,e.disjoint=Nr,e.every=Mt,e.extent=S,e.fcumsum=A,e.filter=ft,e.fsum=w,e.greatest=jt,e.greatestIndex=mr,e.group=O,e.groupSort=ue,e.groups=V,e.histogram=ht,e.index=U,e.indexes=J,e.intersection=xr,e.least=bt,e.leastIndex=Yt,e.map=kt,e.max=it,e.maxIndex=Ke,e.mean=Te,e.median=Ve,e.merge=ot,e.min=Oe,e.minIndex=tt,e.nice=De,e.pairs=nt,e.permute=ye,e.quantile=et,e.quantileSorted=qe,e.quickselect=ze,e.range=mt,e.reduce=rr,e.reverse=pr,e.rollup=j,e.rollups=q,e.scan=or,e.shuffle=fr,e.shuffler=Ot,e.some=Lt,e.sort=xe,e.subset=Zr,e.sum=cr,e.superset=Fr,e.thresholdFreedmanDiaconis=we,e.thresholdScott=Le,e.thresholdSturges=Ge,e.tickIncrement=me,e.tickStep=be,e.ticks=le,e.transpose=Ct,e.union=Cn,e.variance=C,e.zip=Tt,Object.defineProperty(e,"__esModule",{value:!0})}))});var TXe=fe((xD,wXe)=>{(function(e,t){typeof xD=="object"&&typeof wXe!="undefined"?t(xD):(e=e||self,t(e.d3=e.d3||{}))})(xD,function(e){"use strict";var t=Math.PI,r=2*t,n=1e-6,a=r-n;function i(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function o(){return new i}i.prototype=o.prototype={constructor:i,moveTo:function(s,l){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(s,l){this._+="L"+(this._x1=+s)+","+(this._y1=+l)},quadraticCurveTo:function(s,l,u,c){this._+="Q"+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+c)},bezierCurveTo:function(s,l,u,c,f,v){this._+="C"+ +s+","+ +l+","+ +u+","+ +c+","+(this._x1=+f)+","+(this._y1=+v)},arcTo:function(s,l,u,c,f){s=+s,l=+l,u=+u,c=+c,f=+f;var v=this._x1,g=this._y1,p=u-s,x=c-l,_=v-s,y=g-l,C=_*_+y*y;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=l);else if(C>n)if(!(Math.abs(y*p-x*_)>n)||!f)this._+="L"+(this._x1=s)+","+(this._y1=l);else{var k=u-v,S=c-g,L=p*p+x*x,w=k*k+S*S,A=Math.sqrt(L),T=Math.sqrt(C),m=f*Math.tan((t-Math.acos((L+C-w)/(2*A*T)))/2),F=m/T,E=m/A;Math.abs(F-1)>n&&(this._+="L"+(s+F*_)+","+(l+F*y)),this._+="A"+f+","+f+",0,0,"+ +(y*k>_*S)+","+(this._x1=s+E*p)+","+(this._y1=l+E*x)}},arc:function(s,l,u,c,f,v){s=+s,l=+l,u=+u,v=!!v;var g=u*Math.cos(c),p=u*Math.sin(c),x=s+g,_=l+p,y=1^v,C=v?c-f:f-c;if(u<0)throw new Error("negative radius: "+u);this._x1===null?this._+="M"+x+","+_:(Math.abs(this._x1-x)>n||Math.abs(this._y1-_)>n)&&(this._+="L"+x+","+_),u&&(C<0&&(C=C%r+r),C>a?this._+="A"+u+","+u+",0,1,"+y+","+(s-g)+","+(l-p)+"A"+u+","+u+",0,1,"+y+","+(this._x1=x)+","+(this._y1=_):C>n&&(this._+="A"+u+","+u+",0,"+ +(C>=t)+","+y+","+(this._x1=s+u*Math.cos(f))+","+(this._y1=l+u*Math.sin(f))))},rect:function(s,l,u,c){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)+"h"+ +u+"v"+ +c+"h"+-u+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var EK=fe((_D,AXe)=>{(function(e,t){typeof _D=="object"&&typeof AXe!="undefined"?t(_D,TXe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(_D,function(e,t){"use strict";function r(ut){return function(){return ut}}var n=Math.abs,a=Math.atan2,i=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,f=Math.PI,v=f/2,g=2*f;function p(ut){return ut>1?0:ut<-1?f:Math.acos(ut)}function x(ut){return ut>=1?v:ut<=-1?-v:Math.asin(ut)}function _(ut){return ut.innerRadius}function y(ut){return ut.outerRadius}function C(ut){return ut.startAngle}function k(ut){return ut.endAngle}function S(ut){return ut&&ut.padAngle}function L(ut,Jt,er,wr,nn,Dr,bn,Yr){var Tn=er-ut,Kn=wr-Jt,Qn=bn-nn,Ai=Yr-Dr,Ji=Ai*Tn-Qn*Kn;if(!(Ji*JiAs*As+Ms*Ms&&(yo=oo,so=ko),{cx:yo,cy:so,x01:-Qn,y01:-Ai,x11:yo*(nn/Ni-1),y11:so*(nn/Ni-1)}}function A(){var ut=_,Jt=y,er=r(0),wr=null,nn=C,Dr=k,bn=S,Yr=null;function Tn(){var Kn,Qn,Ai=+ut.apply(this,arguments),Ji=+Jt.apply(this,arguments),Ra=nn.apply(this,arguments)-v,ii=Dr.apply(this,arguments)-v,Za=n(ii-Ra),ja=ii>Ra;if(Yr||(Yr=Kn=t.path()),Jic))Yr.moveTo(0,0);else if(Za>g-c)Yr.moveTo(Ji*i(Ra),Ji*l(Ra)),Yr.arc(0,0,Ji,Ra,ii,!ja),Ai>c&&(Yr.moveTo(Ai*i(ii),Ai*l(ii)),Yr.arc(0,0,Ai,ii,Ra,ja));else{var qo=Ra,$a=ii,Ka=Ra,Oa=ii,Ni=Za,ka=Za,vs=bn.apply(this,arguments)/2,yo=vs>c&&(wr?+wr.apply(this,arguments):u(Ai*Ai+Ji*Ji)),so=s(n(Ji-Ai)/2,+er.apply(this,arguments)),oo=so,ko=so,pa,la;if(yo>c){var As=x(yo/Ai*l(vs)),Ms=x(yo/Ji*l(vs));(Ni-=As*2)>c?(As*=ja?1:-1,Ka+=As,Oa-=As):(Ni=0,Ka=Oa=(Ra+ii)/2),(ka-=Ms*2)>c?(Ms*=ja?1:-1,qo+=Ms,$a-=Ms):(ka=0,qo=$a=(Ra+ii)/2)}var xu=Ji*i(qo),rs=Ji*l(qo),Ls=Ai*i(Oa),$s=Ai*l(Oa);if(so>c){var Kc=Ji*i($a),_u=Ji*l($a),Gu=Ai*i(Ka),Ja=Ai*l(Ka),ps;if(Zac?ko>c?(pa=w(Gu,Ja,xu,rs,Ji,ko,ja),la=w(Kc,_u,Ls,$s,Ji,ko,ja),Yr.moveTo(pa.cx+pa.x01,pa.cy+pa.y01),koc)||!(Ni>c)?Yr.lineTo(Ls,$s):oo>c?(pa=w(Ls,$s,Kc,_u,Ai,-oo,ja),la=w(xu,rs,Gu,Ja,Ai,-oo,ja),Yr.lineTo(pa.cx+pa.x01,pa.cy+pa.y01),oo=Ji;--Ra)Yr.point($a[Ra],Ka[Ra]);Yr.lineEnd(),Yr.areaEnd()}ja&&($a[Ai]=+ut(Za,Ai,Qn),Ka[Ai]=+er(Za,Ai,Qn),Yr.point(Jt?+Jt(Za,Ai,Qn):$a[Ai],wr?+wr(Za,Ai,Qn):Ka[Ai]))}if(qo)return Yr=null,qo+""||null}function Kn(){return I().defined(nn).curve(bn).context(Dr)}return Tn.x=function(Qn){return arguments.length?(ut=typeof Qn=="function"?Qn:r(+Qn),Jt=null,Tn):ut},Tn.x0=function(Qn){return arguments.length?(ut=typeof Qn=="function"?Qn:r(+Qn),Tn):ut},Tn.x1=function(Qn){return arguments.length?(Jt=Qn==null?null:typeof Qn=="function"?Qn:r(+Qn),Tn):Jt},Tn.y=function(Qn){return arguments.length?(er=typeof Qn=="function"?Qn:r(+Qn),wr=null,Tn):er},Tn.y0=function(Qn){return arguments.length?(er=typeof Qn=="function"?Qn:r(+Qn),Tn):er},Tn.y1=function(Qn){return arguments.length?(wr=Qn==null?null:typeof Qn=="function"?Qn:r(+Qn),Tn):wr},Tn.lineX0=Tn.lineY0=function(){return Kn().x(ut).y(er)},Tn.lineY1=function(){return Kn().x(ut).y(wr)},Tn.lineX1=function(){return Kn().x(Jt).y(er)},Tn.defined=function(Qn){return arguments.length?(nn=typeof Qn=="function"?Qn:r(!!Qn),Tn):nn},Tn.curve=function(Qn){return arguments.length?(bn=Qn,Dr!=null&&(Yr=bn(Dr)),Tn):bn},Tn.context=function(Qn){return arguments.length?(Qn==null?Dr=Yr=null:Yr=bn(Dr=Qn),Tn):Dr},Tn}function B(ut,Jt){return Jtut?1:Jt>=ut?0:NaN}function O(ut){return ut}function V(){var ut=O,Jt=B,er=null,wr=r(0),nn=r(g),Dr=r(0);function bn(Yr){var Tn,Kn=Yr.length,Qn,Ai,Ji=0,Ra=new Array(Kn),ii=new Array(Kn),Za=+wr.apply(this,arguments),ja=Math.min(g,Math.max(-g,nn.apply(this,arguments)-Za)),qo,$a=Math.min(Math.abs(ja)/Kn,Dr.apply(this,arguments)),Ka=$a*(ja<0?-1:1),Oa;for(Tn=0;Tn0&&(Ji+=Oa);for(Jt!=null?Ra.sort(function(Ni,ka){return Jt(ii[Ni],ii[ka])}):er!=null&&Ra.sort(function(Ni,ka){return er(Yr[Ni],Yr[ka])}),Tn=0,Ai=Ji?(ja-Kn*Ka)/Ji:0;Tn0?Oa*Ai:0)+Ka,ii[Qn]={data:Yr[Qn],index:Tn,value:Oa,startAngle:Za,endAngle:qo,padAngle:$a};return ii}return bn.value=function(Yr){return arguments.length?(ut=typeof Yr=="function"?Yr:r(+Yr),bn):ut},bn.sortValues=function(Yr){return arguments.length?(Jt=Yr,er=null,bn):Jt},bn.sort=function(Yr){return arguments.length?(er=Yr,Jt=null,bn):er},bn.startAngle=function(Yr){return arguments.length?(wr=typeof Yr=="function"?Yr:r(+Yr),bn):wr},bn.endAngle=function(Yr){return arguments.length?(nn=typeof Yr=="function"?Yr:r(+Yr),bn):nn},bn.padAngle=function(Yr){return arguments.length?(Dr=typeof Yr=="function"?Yr:r(+Yr),bn):Dr},bn}var j=U(m);function q(ut){this._curve=ut}q.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(ut,Jt){this._curve.point(Jt*Math.sin(ut),Jt*-Math.cos(ut))}};function U(ut){function Jt(er){return new q(ut(er))}return Jt._curve=ut,Jt}function J(ut){var Jt=ut.curve;return ut.angle=ut.x,delete ut.x,ut.radius=ut.y,delete ut.y,ut.curve=function(er){return arguments.length?Jt(U(er)):Jt()._curve},ut}function ee(){return J(I().curve(j))}function ce(){var ut=R().curve(j),Jt=ut.curve,er=ut.lineX0,wr=ut.lineX1,nn=ut.lineY0,Dr=ut.lineY1;return ut.angle=ut.x,delete ut.x,ut.startAngle=ut.x0,delete ut.x0,ut.endAngle=ut.x1,delete ut.x1,ut.radius=ut.y,delete ut.y,ut.innerRadius=ut.y0,delete ut.y0,ut.outerRadius=ut.y1,delete ut.y1,ut.lineStartAngle=function(){return J(er())},delete ut.lineX0,ut.lineEndAngle=function(){return J(wr())},delete ut.lineX1,ut.lineInnerRadius=function(){return J(nn())},delete ut.lineY0,ut.lineOuterRadius=function(){return J(Dr())},delete ut.lineY1,ut.curve=function(bn){return arguments.length?Jt(U(bn)):Jt()._curve},ut}function ye(ut,Jt){return[(Jt=+Jt)*Math.cos(ut-=Math.PI/2),Jt*Math.sin(ut)]}var xe=Array.prototype.slice;function ue(ut){return ut.source}function K(ut){return ut.target}function _e(ut){var Jt=ue,er=K,wr=F,nn=E,Dr=null;function bn(){var Yr,Tn=xe.call(arguments),Kn=Jt.apply(this,Tn),Qn=er.apply(this,Tn);if(Dr||(Dr=Yr=t.path()),ut(Dr,+wr.apply(this,(Tn[0]=Kn,Tn)),+nn.apply(this,Tn),+wr.apply(this,(Tn[0]=Qn,Tn)),+nn.apply(this,Tn)),Yr)return Dr=null,Yr+""||null}return bn.source=function(Yr){return arguments.length?(Jt=Yr,bn):Jt},bn.target=function(Yr){return arguments.length?(er=Yr,bn):er},bn.x=function(Yr){return arguments.length?(wr=typeof Yr=="function"?Yr:r(+Yr),bn):wr},bn.y=function(Yr){return arguments.length?(nn=typeof Yr=="function"?Yr:r(+Yr),bn):nn},bn.context=function(Yr){return arguments.length?(Dr=Yr==null?null:Yr,bn):Dr},bn}function ne(ut,Jt,er,wr,nn){ut.moveTo(Jt,er),ut.bezierCurveTo(Jt=(Jt+wr)/2,er,Jt,nn,wr,nn)}function ae(ut,Jt,er,wr,nn){ut.moveTo(Jt,er),ut.bezierCurveTo(Jt,er=(er+nn)/2,wr,er,wr,nn)}function pe(ut,Jt,er,wr,nn){var Dr=ye(Jt,er),bn=ye(Jt,er=(er+nn)/2),Yr=ye(wr,er),Tn=ye(wr,nn);ut.moveTo(Dr[0],Dr[1]),ut.bezierCurveTo(bn[0],bn[1],Yr[0],Yr[1],Tn[0],Tn[1])}function ie(){return _e(ne)}function le(){return _e(ae)}function me(){var ut=_e(pe);return ut.angle=ut.x,delete ut.x,ut.radius=ut.y,delete ut.y,ut}var be={draw:function(ut,Jt){var er=Math.sqrt(Jt/f);ut.moveTo(er,0),ut.arc(0,0,er,0,g)}},De={draw:function(ut,Jt){var er=Math.sqrt(Jt/5)/2;ut.moveTo(-3*er,-er),ut.lineTo(-er,-er),ut.lineTo(-er,-3*er),ut.lineTo(er,-3*er),ut.lineTo(er,-er),ut.lineTo(3*er,-er),ut.lineTo(3*er,er),ut.lineTo(er,er),ut.lineTo(er,3*er),ut.lineTo(-er,3*er),ut.lineTo(-er,er),ut.lineTo(-3*er,er),ut.closePath()}},Ge=Math.sqrt(1/3),ht=Ge*2,it={draw:function(ut,Jt){var er=Math.sqrt(Jt/ht),wr=er*Ge;ut.moveTo(0,-er),ut.lineTo(wr,0),ut.lineTo(0,er),ut.lineTo(-wr,0),ut.closePath()}},Oe=.8908130915292852,ze=Math.sin(f/10)/Math.sin(7*f/10),ct=Math.sin(g/10)*ze,et=-Math.cos(g/10)*ze,qe={draw:function(ut,Jt){var er=Math.sqrt(Jt*Oe),wr=ct*er,nn=et*er;ut.moveTo(0,-er),ut.lineTo(wr,nn);for(var Dr=1;Dr<5;++Dr){var bn=g*Dr/5,Yr=Math.cos(bn),Tn=Math.sin(bn);ut.lineTo(Tn*er,-Yr*er),ut.lineTo(Yr*wr-Tn*nn,Tn*wr+Yr*nn)}ut.closePath()}},we={draw:function(ut,Jt){var er=Math.sqrt(Jt),wr=-er/2;ut.rect(wr,wr,er,er)}},Le=Math.sqrt(3),Ke={draw:function(ut,Jt){var er=-Math.sqrt(Jt/(Le*3));ut.moveTo(0,er*2),ut.lineTo(-Le*er,-er),ut.lineTo(Le*er,-er),ut.closePath()}},Te=-.5,Ve=Math.sqrt(3)/2,$e=1/Math.sqrt(12),ot=($e/2+1)*3,tt={draw:function(ut,Jt){var er=Math.sqrt(Jt/ot),wr=er/2,nn=er*$e,Dr=wr,bn=er*$e+er,Yr=-Dr,Tn=bn;ut.moveTo(wr,nn),ut.lineTo(Dr,bn),ut.lineTo(Yr,Tn),ut.lineTo(Te*wr-Ve*nn,Ve*wr+Te*nn),ut.lineTo(Te*Dr-Ve*bn,Ve*Dr+Te*bn),ut.lineTo(Te*Yr-Ve*Tn,Ve*Yr+Te*Tn),ut.lineTo(Te*wr+Ve*nn,Te*nn-Ve*wr),ut.lineTo(Te*Dr+Ve*bn,Te*bn-Ve*Dr),ut.lineTo(Te*Yr+Ve*Tn,Te*Tn-Ve*Yr),ut.closePath()}},nt=[be,De,it,we,qe,Ke,tt];function We(){var ut=r(be),Jt=r(64),er=null;function wr(){var nn;if(er||(er=nn=t.path()),ut.apply(this,arguments).draw(er,+Jt.apply(this,arguments)),nn)return er=null,nn+""||null}return wr.type=function(nn){return arguments.length?(ut=typeof nn=="function"?nn:r(nn),wr):ut},wr.size=function(nn){return arguments.length?(Jt=typeof nn=="function"?nn:r(+nn),wr):Jt},wr.context=function(nn){return arguments.length?(er=nn==null?null:nn,wr):er},wr}function mt(){}function bt(ut,Jt,er){ut._context.bezierCurveTo((2*ut._x0+ut._x1)/3,(2*ut._y0+ut._y1)/3,(ut._x0+2*ut._x1)/3,(ut._y0+2*ut._y1)/3,(ut._x0+4*ut._x1+Jt)/6,(ut._y0+4*ut._y1+er)/6)}function Yt(ut){this._context=ut}Yt.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:bt(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(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ut,Jt):this._context.moveTo(ut,Jt);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:bt(this,ut,Jt);break}this._x0=this._x1,this._x1=ut,this._y0=this._y1,this._y1=Jt}};function jt(ut){return new Yt(ut)}function mr(ut){this._context=ut}mr.prototype={areaStart:mt,areaEnd:mt,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(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1,this._x2=ut,this._y2=Jt;break;case 1:this._point=2,this._x3=ut,this._y3=Jt;break;case 2:this._point=3,this._x4=ut,this._y4=Jt,this._context.moveTo((this._x0+4*this._x1+ut)/6,(this._y0+4*this._y1+Jt)/6);break;default:bt(this,ut,Jt);break}this._x0=this._x1,this._x1=ut,this._y0=this._y1,this._y1=Jt}};function or(ut){return new mr(ut)}function fr(ut){this._context=ut}fr.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(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var er=(this._x0+4*this._x1+ut)/6,wr=(this._y0+4*this._y1+Jt)/6;this._line?this._context.lineTo(er,wr):this._context.moveTo(er,wr);break;case 3:this._point=4;default:bt(this,ut,Jt);break}this._x0=this._x1,this._x1=ut,this._y0=this._y1,this._y1=Jt}};function Ot(ut){return new fr(ut)}function cr(ut,Jt){this._basis=new Yt(ut),this._beta=Jt}cr.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var ut=this._x,Jt=this._y,er=ut.length-1;if(er>0)for(var wr=ut[0],nn=Jt[0],Dr=ut[er]-wr,bn=Jt[er]-nn,Yr=-1,Tn;++Yr<=er;)Tn=Yr/er,this._basis.point(this._beta*ut[Yr]+(1-this._beta)*(wr+Tn*Dr),this._beta*Jt[Yr]+(1-this._beta)*(nn+Tn*bn));this._x=this._y=null,this._basis.lineEnd()},point:function(ut,Jt){this._x.push(+ut),this._y.push(+Jt)}};var Ct=(function ut(Jt){function er(wr){return Jt===1?new Yt(wr):new cr(wr,Jt)}return er.beta=function(wr){return ut(+wr)},er})(.85);function wt(ut,Jt,er){ut._context.bezierCurveTo(ut._x1+ut._k*(ut._x2-ut._x0),ut._y1+ut._k*(ut._y2-ut._y0),ut._x2+ut._k*(ut._x1-Jt),ut._y2+ut._k*(ut._y1-er),ut._x2,ut._y2)}function Tt(ut,Jt){this._context=ut,this._k=(1-Jt)/6}Tt.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:wt(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ut,Jt):this._context.moveTo(ut,Jt);break;case 1:this._point=2,this._x1=ut,this._y1=Jt;break;case 2:this._point=3;default:wt(this,ut,Jt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var Mt=(function ut(Jt){function er(wr){return new Tt(wr,Jt)}return er.tension=function(wr){return ut(+wr)},er})(0);function Lt(ut,Jt){this._context=ut,this._k=(1-Jt)/6}Lt.prototype={areaStart:mt,areaEnd:mt,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(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1,this._x3=ut,this._y3=Jt;break;case 1:this._point=2,this._context.moveTo(this._x4=ut,this._y4=Jt);break;case 2:this._point=3,this._x5=ut,this._y5=Jt;break;default:wt(this,ut,Jt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var ft=(function ut(Jt){function er(wr){return new Lt(wr,Jt)}return er.tension=function(wr){return ut(+wr)},er})(0);function kt(ut,Jt){this._context=ut,this._k=(1-Jt)/6}kt.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(ut,Jt){switch(ut=+ut,Jt=+Jt,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:wt(this,ut,Jt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var rr=(function ut(Jt){function er(wr){return new kt(wr,Jt)}return er.tension=function(wr){return ut(+wr)},er})(0);function pr(ut,Jt,er){var wr=ut._x1,nn=ut._y1,Dr=ut._x2,bn=ut._y2;if(ut._l01_a>c){var Yr=2*ut._l01_2a+3*ut._l01_a*ut._l12_a+ut._l12_2a,Tn=3*ut._l01_a*(ut._l01_a+ut._l12_a);wr=(wr*Yr-ut._x0*ut._l12_2a+ut._x2*ut._l01_2a)/Tn,nn=(nn*Yr-ut._y0*ut._l12_2a+ut._y2*ut._l01_2a)/Tn}if(ut._l23_a>c){var Kn=2*ut._l23_2a+3*ut._l23_a*ut._l12_a+ut._l12_2a,Qn=3*ut._l23_a*(ut._l23_a+ut._l12_a);Dr=(Dr*Kn+ut._x1*ut._l23_2a-Jt*ut._l12_2a)/Qn,bn=(bn*Kn+ut._y1*ut._l23_2a-er*ut._l12_2a)/Qn}ut._context.bezierCurveTo(wr,nn,Dr,bn,ut._x2,ut._y2)}function Kr(ut,Jt){this._context=ut,this._alpha=Jt}Kr.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(ut,Jt){if(ut=+ut,Jt=+Jt,this._point){var er=this._x2-ut,wr=this._y2-Jt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(er*er+wr*wr,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ut,Jt):this._context.moveTo(ut,Jt);break;case 1:this._point=2;break;case 2:this._point=3;default:pr(this,ut,Jt);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=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var Nr=(function ut(Jt){function er(wr){return Jt?new Kr(wr,Jt):new Tt(wr,0)}return er.alpha=function(wr){return ut(+wr)},er})(.5);function dn(ut,Jt){this._context=ut,this._alpha=Jt}dn.prototype={areaStart:mt,areaEnd:mt,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(ut,Jt){if(ut=+ut,Jt=+Jt,this._point){var er=this._x2-ut,wr=this._y2-Jt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(er*er+wr*wr,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=ut,this._y3=Jt;break;case 1:this._point=2,this._context.moveTo(this._x4=ut,this._y4=Jt);break;case 2:this._point=3,this._x5=ut,this._y5=Jt;break;default:pr(this,ut,Jt);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=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var xr=(function ut(Jt){function er(wr){return Jt?new dn(wr,Jt):new Lt(wr,0)}return er.alpha=function(wr){return ut(+wr)},er})(.5);function Fr(ut,Jt){this._context=ut,this._alpha=Jt}Fr.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(ut,Jt){if(ut=+ut,Jt=+Jt,this._point){var er=this._x2-ut,wr=this._y2-Jt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(er*er+wr*wr,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:pr(this,ut,Jt);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=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var Zr=(function ut(Jt){function er(wr){return Jt?new Fr(wr,Jt):new kt(wr,0)}return er.alpha=function(wr){return ut(+wr)},er})(.5);function Cn(ut){this._context=ut}Cn.prototype={areaStart:mt,areaEnd:mt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(ut,Jt){ut=+ut,Jt=+Jt,this._point?this._context.lineTo(ut,Jt):(this._point=1,this._context.moveTo(ut,Jt))}};function Dt(ut){return new Cn(ut)}function At(ut){return ut<0?-1:1}function Vt(ut,Jt,er){var wr=ut._x1-ut._x0,nn=Jt-ut._x1,Dr=(ut._y1-ut._y0)/(wr||nn<0&&-0),bn=(er-ut._y1)/(nn||wr<0&&-0),Yr=(Dr*nn+bn*wr)/(wr+nn);return(At(Dr)+At(bn))*Math.min(Math.abs(Dr),Math.abs(bn),.5*Math.abs(Yr))||0}function Qt(ut,Jt){var er=ut._x1-ut._x0;return er?(3*(ut._y1-ut._y0)/er-Jt)/2:Jt}function Ut(ut,Jt,er){var wr=ut._x0,nn=ut._y0,Dr=ut._x1,bn=ut._y1,Yr=(Dr-wr)/3;ut._context.bezierCurveTo(wr+Yr,nn+Yr*Jt,Dr-Yr,bn-Yr*er,Dr,bn)}function _r(ut){this._context=ut}_r.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:Ut(this,this._t0,Qt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ut,Jt){var er=NaN;if(ut=+ut,Jt=+Jt,!(ut===this._x1&&Jt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ut,Jt):this._context.moveTo(ut,Jt);break;case 1:this._point=2;break;case 2:this._point=3,Ut(this,Qt(this,er=Vt(this,ut,Jt)),er);break;default:Ut(this,this._t0,er=Vt(this,ut,Jt));break}this._x0=this._x1,this._x1=ut,this._y0=this._y1,this._y1=Jt,this._t0=er}}};function rn(ut){this._context=new Jr(ut)}(rn.prototype=Object.create(_r.prototype)).point=function(ut,Jt){_r.prototype.point.call(this,Jt,ut)};function Jr(ut){this._context=ut}Jr.prototype={moveTo:function(ut,Jt){this._context.moveTo(Jt,ut)},closePath:function(){this._context.closePath()},lineTo:function(ut,Jt){this._context.lineTo(Jt,ut)},bezierCurveTo:function(ut,Jt,er,wr,nn,Dr){this._context.bezierCurveTo(Jt,ut,wr,er,Dr,nn)}};function qn(ut){return new _r(ut)}function ri(ut){return new rn(ut)}function Jn(ut){this._context=ut}Jn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var ut=this._x,Jt=this._y,er=ut.length;if(er)if(this._line?this._context.lineTo(ut[0],Jt[0]):this._context.moveTo(ut[0],Jt[0]),er===2)this._context.lineTo(ut[1],Jt[1]);else for(var wr=Ii(ut),nn=Ii(Jt),Dr=0,bn=1;bn=0;--Jt)nn[Jt]=(bn[Jt]-nn[Jt+1])/Dr[Jt];for(Dr[er-1]=(ut[er]+nn[er-1])/2,Jt=0;Jt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ut,Jt):this._context.moveTo(ut,Jt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Jt),this._context.lineTo(ut,Jt);else{var er=this._x*(1-this._t)+ut*this._t;this._context.lineTo(er,this._y),this._context.lineTo(er,Jt)}break}}this._x=ut,this._y=Jt}};function ha(ut){return new ra(ut,.5)}function va(ut){return new ra(ut,0)}function Xi(ut){return new ra(ut,1)}function oa(ut,Jt){if((bn=ut.length)>1)for(var er=1,wr,nn,Dr=ut[Jt[0]],bn,Yr=Dr.length;er=0;)er[Jt]=Jt;return er}function Ga(ut,Jt){return ut[Jt]}function ss(){var ut=r([]),Jt=Ma,er=oa,wr=Ga;function nn(Dr){var bn=ut.apply(this,arguments),Yr,Tn=Dr.length,Kn=bn.length,Qn=new Array(Kn),Ai;for(Yr=0;Yr0){for(var er,wr,nn=0,Dr=ut[0].length,bn;nn0)for(var er,wr=0,nn,Dr,bn,Yr,Tn,Kn=ut[Jt[0]].length;wr0?(nn[0]=bn,nn[1]=bn+=Dr):Dr<0?(nn[1]=Yr,nn[0]=Yr+=Dr):(nn[0]=0,nn[1]=Dr)}function Eo(ut,Jt){if((nn=ut.length)>0){for(var er=0,wr=ut[Jt[0]],nn,Dr=wr.length;er0)||!((Dr=(nn=ut[Jt[0]]).length)>0))){for(var er=0,wr=1,nn,Dr,bn;wrDr&&(Dr=nn,er=Jt);return er}function bo(ut){var Jt=ut.map(Zs);return Ma(ut).sort(function(er,wr){return Jt[er]-Jt[wr]})}function Zs(ut){for(var Jt=0,er=-1,wr=ut.length,nn;++er{(function(e,t){typeof bD=="object"&&typeof MXe!="undefined"?t(bD,bXe(),EK()):(e=e||self,t(e.d3=e.d3||{},e.d3,e.d3))})(bD,function(e,t,r){"use strict";function n(w){return w.target.depth}function a(w){return w.depth}function i(w,A){return A-1-w.height}function o(w,A){return w.sourceLinks.length?w.depth:A-1}function s(w){return w.targetLinks.length?w.depth:w.sourceLinks.length?t.min(w.sourceLinks,n)-1:0}function l(w){return function(){return w}}function u(w,A){return f(w.source,A.source)||w.index-A.index}function c(w,A){return f(w.target,A.target)||w.index-A.index}function f(w,A){return w.y0-A.y0}function v(w){return w.value}function g(w){return w.index}function p(w){return w.nodes}function x(w){return w.links}function _(w,A){let T=w.get(A);if(!T)throw new Error("missing: "+A);return T}function y({nodes:w}){for(let A of w){let T=A.y0,m=T;for(let F of A.sourceLinks)F.y0=T+F.width/2,T+=F.width;for(let F of A.targetLinks)F.y1=m+F.width/2,m+=F.width}}function C(){let w=0,A=0,T=1,m=1,F=24,E=8,I,R=g,B=o,O,V,j=p,q=x,U=6,J=2/3;function ee(){let it={nodes:j.apply(null,arguments),links:q.apply(null,arguments)};return ce(it),ye(it),xe(it),ue(it),ne(it),y(it),it}ee.update=function(it){return y(it),it},ee.nodeId=function(it){return arguments.length?(R=typeof it=="function"?it:l(it),ee):R},ee.nodeAlign=function(it){return arguments.length?(B=typeof it=="function"?it:l(it),ee):B},ee.nodeSort=function(it){return arguments.length?(O=it,ee):O},ee.nodeWidth=function(it){return arguments.length?(F=+it,ee):F},ee.nodePadding=function(it){return arguments.length?(E=I=+it,ee):E},ee.nodes=function(it){return arguments.length?(j=typeof it=="function"?it:l(it),ee):j},ee.links=function(it){return arguments.length?(q=typeof it=="function"?it:l(it),ee):q},ee.linkSort=function(it){return arguments.length?(V=it,ee):V},ee.size=function(it){return arguments.length?(w=A=0,T=+it[0],m=+it[1],ee):[T-w,m-A]},ee.extent=function(it){return arguments.length?(w=+it[0][0],T=+it[1][0],A=+it[0][1],m=+it[1][1],ee):[[w,A],[T,m]]},ee.iterations=function(it){return arguments.length?(U=+it,ee):U};function ce({nodes:it,links:Oe}){for(let[ct,et]of it.entries())et.index=ct,et.sourceLinks=[],et.targetLinks=[];let ze=new Map(it.map((ct,et)=>[R(ct,et,it),ct]));for(let[ct,et]of Oe.entries()){et.index=ct;let{source:qe,target:we}=et;typeof qe!="object"&&(qe=et.source=_(ze,qe)),typeof we!="object"&&(we=et.target=_(ze,we)),qe.sourceLinks.push(et),we.targetLinks.push(et)}if(V!=null)for(let{sourceLinks:ct,targetLinks:et}of it)ct.sort(V),et.sort(V)}function ye({nodes:it}){for(let Oe of it)Oe.value=Oe.fixedValue===void 0?Math.max(t.sum(Oe.sourceLinks,v),t.sum(Oe.targetLinks,v)):Oe.fixedValue}function xe({nodes:it}){let Oe=it.length,ze=new Set(it),ct=new Set,et=0;for(;ze.size;){for(let qe of ze){qe.depth=et;for(let{target:we}of qe.sourceLinks)ct.add(we)}if(++et>Oe)throw new Error("circular link");ze=ct,ct=new Set}}function ue({nodes:it}){let Oe=it.length,ze=new Set(it),ct=new Set,et=0;for(;ze.size;){for(let qe of ze){qe.height=et;for(let{source:we}of qe.targetLinks)ct.add(we)}if(++et>Oe)throw new Error("circular link");ze=ct,ct=new Set}}function K({nodes:it}){let Oe=t.max(it,et=>et.depth)+1,ze=(T-w-F)/(Oe-1),ct=new Array(Oe);for(let et of it){let qe=Math.max(0,Math.min(Oe-1,Math.floor(B.call(null,et,Oe))));et.layer=qe,et.x0=w+qe*ze,et.x1=et.x0+F,ct[qe]?ct[qe].push(et):ct[qe]=[et]}if(O)for(let et of ct)et.sort(O);return ct}function _e(it){let Oe=t.min(it,ze=>(m-A-(ze.length-1)*I)/t.sum(ze,v));for(let ze of it){let ct=A;for(let et of ze){et.y0=ct,et.y1=ct+et.value*Oe,ct=et.y1+I;for(let qe of et.sourceLinks)qe.width=qe.value*Oe}ct=(m-ct+I)/(ze.length+1);for(let et=0;etze.length)-1)),_e(Oe);for(let ze=0;ze0))continue;let Te=(Le/Ke-we.y0)*Oe;we.y0+=Te,we.y1+=Te,be(we)}O===void 0&&qe.sort(f),ie(qe,ze)}}function pe(it,Oe,ze){for(let ct=it.length,et=ct-2;et>=0;--et){let qe=it[et];for(let we of qe){let Le=0,Ke=0;for(let{target:Ve,value:$e}of we.sourceLinks){let ot=$e*(Ve.layer-we.layer);Le+=ht(we,Ve)*ot,Ke+=ot}if(!(Ke>0))continue;let Te=(Le/Ke-we.y0)*Oe;we.y0+=Te,we.y1+=Te,be(we)}O===void 0&&qe.sort(f),ie(qe,ze)}}function ie(it,Oe){let ze=it.length>>1,ct=it[ze];me(it,ct.y0-I,ze-1,Oe),le(it,ct.y1+I,ze+1,Oe),me(it,m,it.length-1,Oe),le(it,A,0,Oe)}function le(it,Oe,ze,ct){for(;ze1e-6&&(et.y0+=qe,et.y1+=qe),Oe=et.y1+I}}function me(it,Oe,ze,ct){for(;ze>=0;--ze){let et=it[ze],qe=(et.y1-Oe)*ct;qe>1e-6&&(et.y0-=qe,et.y1-=qe),Oe=et.y0-I}}function be({sourceLinks:it,targetLinks:Oe}){if(V===void 0){for(let{source:{sourceLinks:ze}}of Oe)ze.sort(c);for(let{target:{targetLinks:ze}}of it)ze.sort(u)}}function De(it){if(V===void 0)for(let{sourceLinks:Oe,targetLinks:ze}of it)Oe.sort(c),ze.sort(u)}function Ge(it,Oe){let ze=it.y0-(it.sourceLinks.length-1)*I/2;for(let{target:ct,width:et}of it.sourceLinks){if(ct===Oe)break;ze+=et+I}for(let{source:ct,width:et}of Oe.targetLinks){if(ct===it)break;ze-=et}return ze}function ht(it,Oe){let ze=Oe.y0-(Oe.targetLinks.length-1)*I/2;for(let{source:ct,width:et}of Oe.targetLinks){if(ct===it)break;ze+=et+I}for(let{target:ct,width:et}of it.sourceLinks){if(ct===Oe)break;ze-=et}return ze}return ee}function k(w){return[w.source.x1,w.y0]}function S(w){return[w.target.x0,w.y1]}function L(){return r.linkHorizontal().source(k).target(S)}e.sankey=C,e.sankeyCenter=s,e.sankeyJustify=o,e.sankeyLeft=a,e.sankeyLinkHorizontal=L,e.sankeyRight=i,Object.defineProperty(e,"__esModule",{value:!0})})});var kXe=fe((wD,EXe)=>{(function(e,t){t(typeof wD=="object"&&typeof EXe!="undefined"?wD:e.d3=e.d3||{})})(wD,(function(e){"use strict";function t(ne,ae){return neae?1:ne>=ae?0:NaN}function r(ne){return ne.length===1&&(ne=n(ne)),{left:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)<0?ie=me+1:le=me}return ie},right:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)>0?le=me:ie=me+1}return ie}}}function n(ne){return function(ae,pe){return t(ne(ae),pe)}}var a=r(t),i=a.right,o=a.left;function s(ne,ae){ae==null&&(ae=l);for(var pe=0,ie=ne.length-1,le=ne[0],me=new Array(ie<0?0:ie);pene?1:ae>=ne?0:NaN}function f(ne){return ne===null?NaN:+ne}function v(ne,ae){var pe=ne.length,ie=0,le=-1,me=0,be,De,Ge=0;if(ae==null)for(;++le1)return Ge/(ie-1)}function g(ne,ae){var pe=v(ne,ae);return pe&&Math.sqrt(pe)}function p(ne,ae){var pe=ne.length,ie=-1,le,me,be;if(ae==null){for(;++ie=le)for(me=be=le;++iele&&(me=le),be=le)for(me=be=le;++iele&&(me=le),be0)return[ne];if((ie=ae0)for(ne=Math.ceil(ne/De),ae=Math.floor(ae/De),be=new Array(me=Math.ceil(ae-ne+1));++le=0?(me>=L?10:me>=w?5:me>=A?2:1)*Math.pow(10,le):-Math.pow(10,-le)/(me>=L?10:me>=w?5:me>=A?2:1)}function F(ne,ae,pe){var ie=Math.abs(ae-ne)/Math.max(0,pe),le=Math.pow(10,Math.floor(Math.log(ie)/Math.LN10)),me=ie/le;return me>=L?le*=10:me>=w?le*=5:me>=A&&(le*=2),aeOe;)ze.pop(),--ct;var et=new Array(ct+1),qe;for(me=0;me<=ct;++me)qe=et[me]=[],qe.x0=me>0?ze[me-1]:it,qe.x1=me=1)return+pe(ne[ie-1],ie-1,ne);var ie,le=(ie-1)*ae,me=Math.floor(le),be=+pe(ne[me],me,ne),De=+pe(ne[me+1],me+1,ne);return be+(De-be)*(le-me)}}function B(ne,ae,pe){return ne=y.call(ne,f).sort(t),Math.ceil((pe-ae)/(2*(R(ne,.75)-R(ne,.25))*Math.pow(ne.length,-1/3)))}function O(ne,ae,pe){return Math.ceil((pe-ae)/(3.5*g(ne)*Math.pow(ne.length,-1/3)))}function V(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++ieme&&(me=le)}else for(;++ie=le)for(me=le;++ieme&&(me=le);return me}function j(ne,ae){var pe=ne.length,ie=pe,le=-1,me,be=0;if(ae==null)for(;++le=0;)for(be=ne[ae],pe=be.length;--pe>=0;)me[--le]=be[pe];return me}function J(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++iele&&(me=le)}else for(;++ie=le)for(me=le;++iele&&(me=le);return me}function ee(ne,ae){for(var pe=ae.length,ie=new Array(pe);pe--;)ie[pe]=ne[ae[pe]];return ie}function ce(ne,ae){if(pe=ne.length){var pe,ie=0,le=0,me,be=ne[le];for(ae==null&&(ae=t);++ie{var Zrr=MK();CXe.exports=function(t,r){var n=[],a=[],i=[],o={},s=[],l;function u(k){i[k]=!1,o.hasOwnProperty(k)&&Object.keys(o[k]).forEach(function(S){delete o[k][S],i[S]&&u(S)})}function c(k){var S=!1;a.push(k),i[k]=!0;var L,w;for(L=0;L=k})}function g(k){v(k);for(var S=t,L=Zrr(S),w=L.components.filter(function(R){return R.length>1}),A=1/0,T,m=0;m{(function(e,t){typeof TD=="object"&&typeof PXe!="undefined"?t(TD,kXe(),SK(),EK(),LXe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(TD,(function(e,t,r,n,a){"use strict";a=a&&a.hasOwnProperty("default")?a.default:a;function i(Oe){return Oe.target.depth}function o(Oe){return Oe.depth}function s(Oe,ze){return ze-1-Oe.height}function l(Oe,ze){return Oe.sourceLinks.length?Oe.depth:ze-1}function u(Oe){return Oe.targetLinks.length?Oe.depth:Oe.sourceLinks.length?t.min(Oe.sourceLinks,i)-1:0}function c(Oe){return function(){return Oe}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Oe){return typeof Oe}:function(Oe){return Oe&&typeof Symbol=="function"&&Oe.constructor===Symbol&&Oe!==Symbol.prototype?"symbol":typeof Oe};function v(Oe,ze){return p(Oe.source,ze.source)||Oe.index-ze.index}function g(Oe,ze){return p(Oe.target,ze.target)||Oe.index-ze.index}function p(Oe,ze){return Oe.partOfCycle===ze.partOfCycle?Oe.y0-ze.y0:Oe.circularLinkType==="top"||ze.circularLinkType==="bottom"?-1:1}function x(Oe){return Oe.value}function _(Oe){return(Oe.y0+Oe.y1)/2}function y(Oe){return _(Oe.source)}function C(Oe){return _(Oe.target)}function k(Oe){return Oe.index}function S(Oe){return Oe.nodes}function L(Oe){return Oe.links}function w(Oe,ze){var ct=Oe.get(ze);if(!ct)throw new Error("missing: "+ze);return ct}function A(Oe,ze){return ze(Oe)}var T=25,m=10,F=.3;function E(){var Oe=0,ze=0,ct=1,et=1,qe=24,we,Le=k,Ke=l,Te=S,Ve=L,$e=32,ot=2,tt,nt=null;function We(){var Ot={nodes:Te.apply(null,arguments),links:Ve.apply(null,arguments)};mt(Ot),I(Ot,Le,nt),bt(Ot),mr(Ot),R(Ot,Le),or(Ot,$e,Le),fr(Ot);for(var cr=4,Ct=0;Ct0?cr+T+m:cr,Ct=Ct>0?Ct+T+m:Ct,wt=wt>0?wt+T+m:wt,Tt=Tt>0?Tt+T+m:Tt,{top:cr,bottom:Ct,left:Tt,right:wt}}function jt(Ot,cr){var Ct=t.max(Ot.nodes,function(rr){return rr.column}),wt=ct-Oe,Tt=et-ze,Mt=wt+cr.right+cr.left,Lt=Tt+cr.top+cr.bottom,ft=wt/Mt,kt=Tt/Lt;return Oe=Oe*ft+cr.left,ct=cr.right==0?ct:ct*ft,ze=ze*kt+cr.top,et=et*kt,Ot.nodes.forEach(function(rr){rr.x0=Oe+rr.column*((ct-Oe-qe)/Ct),rr.x1=rr.x0+qe}),kt}function mr(Ot){var cr,Ct,wt;for(cr=Ot.nodes,Ct=[],wt=0;cr.length;++wt,cr=Ct,Ct=[])cr.forEach(function(Tt){Tt.depth=wt,Tt.sourceLinks.forEach(function(Mt){Ct.indexOf(Mt.target)<0&&!Mt.circular&&Ct.push(Mt.target)})});for(cr=Ot.nodes,Ct=[],wt=0;cr.length;++wt,cr=Ct,Ct=[])cr.forEach(function(Tt){Tt.height=wt,Tt.targetLinks.forEach(function(Mt){Ct.indexOf(Mt.source)<0&&!Mt.circular&&Ct.push(Mt.source)})});Ot.nodes.forEach(function(Tt){Tt.column=Math.floor(Ke.call(null,Tt,wt))})}function or(Ot,cr,Ct){var wt=r.nest().key(function(rr){return rr.column}).sortKeys(t.ascending).entries(Ot.nodes).map(function(rr){return rr.values});Lt(Ct),kt();for(var Tt=1,Mt=cr;Mt>0;--Mt)ft(Tt*=.99,Ct),kt();function Lt(rr){if(tt){var pr=1/0;wt.forEach(function(xr){var Fr=et*tt/(xr.length+1);pr=Fr0))if(xr==0&&dn==1)Zr=Fr.y1-Fr.y0,Fr.y0=et/2-Zr/2,Fr.y1=et/2+Zr/2;else if(xr==Kr-1&&dn==1)Zr=Fr.y1-Fr.y0,Fr.y0=et/2-Zr/2,Fr.y1=et/2+Zr/2;else{var Cn=0,Dt=t.mean(Fr.sourceLinks,C),At=t.mean(Fr.targetLinks,y);Dt&&At?Cn=(Dt+At)/2:Cn=Dt||At;var Vt=(Cn-_(Fr))*rr;Fr.y0+=Vt,Fr.y1+=Vt}})})}function kt(){wt.forEach(function(rr){var pr,Kr,Nr=ze,dn=rr.length,xr;for(rr.sort(p),xr=0;xr0&&(pr.y0+=Kr,pr.y1+=Kr),Nr=pr.y1+we;if(Kr=Nr-we-et,Kr>0)for(Nr=pr.y0-=Kr,pr.y1-=Kr,xr=dn-2;xr>=0;--xr)pr=rr[xr],Kr=pr.y1+we-Nr,Kr>0&&(pr.y0-=Kr,pr.y1-=Kr),Nr=pr.y0})}}function fr(Ot){Ot.nodes.forEach(function(cr){cr.sourceLinks.sort(g),cr.targetLinks.sort(v)}),Ot.nodes.forEach(function(cr){var Ct=cr.y0,wt=Ct,Tt=cr.y1,Mt=Tt;cr.sourceLinks.forEach(function(Lt){Lt.circular?(Lt.y0=Tt-Lt.width/2,Tt=Tt-Lt.width):(Lt.y0=Ct+Lt.width/2,Ct+=Lt.width)}),cr.targetLinks.forEach(function(Lt){Lt.circular?(Lt.y1=Mt-Lt.width/2,Mt=Mt-Lt.width):(Lt.y1=wt+Lt.width/2,wt+=Lt.width)})})}return We}function I(Oe,ze,ct){var et=0;if(ct===null){for(var qe=[],we=0;weze.source.column)}function V(Oe,ze){var ct=0;Oe.sourceLinks.forEach(function(qe){ct=qe.circular&&!ht(qe,ze)?ct+1:ct});var et=0;return Oe.targetLinks.forEach(function(qe){et=qe.circular&&!ht(qe,ze)?et+1:et}),ct+et}function j(Oe){var ze=Oe.source.sourceLinks,ct=0;ze.forEach(function(we){ct=we.circular?ct+1:ct});var et=Oe.target.targetLinks,qe=0;return et.forEach(function(we){qe=we.circular?qe+1:qe}),!(ct>1||qe>1)}function q(Oe,ze,ct){return Oe.sort(ee),Oe.forEach(function(et,qe){var we=0;if(ht(et,ct)&&j(et))et.circularPathData.verticalBuffer=we+et.width/2;else{var Le=0;for(Le;Lewe?Ke:we}et.circularPathData.verticalBuffer=we+et.width/2}}),Oe}function U(Oe,ze,ct,et){var qe=5,we=t.min(Oe.links,function(Te){return Te.source.y0});Oe.links.forEach(function(Te){Te.circular&&(Te.circularPathData={})});var Le=Oe.links.filter(function(Te){return Te.circularLinkType=="top"});q(Le,ze,et);var Ke=Oe.links.filter(function(Te){return Te.circularLinkType=="bottom"});q(Ke,ze,et),Oe.links.forEach(function(Te){if(Te.circular){if(Te.circularPathData.arcRadius=Te.width+m,Te.circularPathData.leftNodeBuffer=qe,Te.circularPathData.rightNodeBuffer=qe,Te.circularPathData.sourceWidth=Te.source.x1-Te.source.x0,Te.circularPathData.sourceX=Te.source.x0+Te.circularPathData.sourceWidth,Te.circularPathData.targetX=Te.target.x0,Te.circularPathData.sourceY=Te.y0,Te.circularPathData.targetY=Te.y1,ht(Te,et)&&j(Te))Te.circularPathData.leftSmallArcRadius=m+Te.width/2,Te.circularPathData.leftLargeArcRadius=m+Te.width/2,Te.circularPathData.rightSmallArcRadius=m+Te.width/2,Te.circularPathData.rightLargeArcRadius=m+Te.width/2,Te.circularLinkType=="bottom"?(Te.circularPathData.verticalFullExtent=Te.source.y1+T+Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.rightLargeArcRadius):(Te.circularPathData.verticalFullExtent=Te.source.y0-T-Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.rightLargeArcRadius);else{var Ve=Te.source.column,$e=Te.circularLinkType,ot=Oe.links.filter(function(We){return We.source.column==Ve&&We.circularLinkType==$e});Te.circularLinkType=="bottom"?ot.sort(ye):ot.sort(ce);var tt=0;ot.forEach(function(We,mt){We.circularLinkID==Te.circularLinkID&&(Te.circularPathData.leftSmallArcRadius=m+Te.width/2+tt,Te.circularPathData.leftLargeArcRadius=m+Te.width/2+mt*ze+tt),tt=tt+We.width}),Ve=Te.target.column,ot=Oe.links.filter(function(We){return We.target.column==Ve&&We.circularLinkType==$e}),Te.circularLinkType=="bottom"?ot.sort(ue):ot.sort(xe),tt=0,ot.forEach(function(We,mt){We.circularLinkID==Te.circularLinkID&&(Te.circularPathData.rightSmallArcRadius=m+Te.width/2+tt,Te.circularPathData.rightLargeArcRadius=m+Te.width/2+mt*ze+tt),tt=tt+We.width}),Te.circularLinkType=="bottom"?(Te.circularPathData.verticalFullExtent=Math.max(ct,Te.source.y1,Te.target.y1)+T+Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.rightLargeArcRadius):(Te.circularPathData.verticalFullExtent=we-T-Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.rightLargeArcRadius)}Te.circularPathData.leftInnerExtent=Te.circularPathData.sourceX+Te.circularPathData.leftNodeBuffer,Te.circularPathData.rightInnerExtent=Te.circularPathData.targetX-Te.circularPathData.rightNodeBuffer,Te.circularPathData.leftFullExtent=Te.circularPathData.sourceX+Te.circularPathData.leftLargeArcRadius+Te.circularPathData.leftNodeBuffer,Te.circularPathData.rightFullExtent=Te.circularPathData.targetX-Te.circularPathData.rightLargeArcRadius-Te.circularPathData.rightNodeBuffer}if(Te.circular)Te.path=J(Te);else{var nt=n.linkHorizontal().source(function(We){var mt=We.source.x0+(We.source.x1-We.source.x0),bt=We.y0;return[mt,bt]}).target(function(We){var mt=We.target.x0,bt=We.y1;return[mt,bt]});Te.path=nt(Te)}})}function J(Oe){var ze="";return Oe.circularLinkType=="top"?ze="M"+Oe.circularPathData.sourceX+" "+Oe.circularPathData.sourceY+" L"+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.sourceY+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftSmallArcRadius+" 0 0 0 "+Oe.circularPathData.leftFullExtent+" "+(Oe.circularPathData.sourceY-Oe.circularPathData.leftSmallArcRadius)+" L"+Oe.circularPathData.leftFullExtent+" "+Oe.circularPathData.verticalLeftInnerExtent+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftLargeArcRadius+" 0 0 0 "+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" L"+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightLargeArcRadius+" 0 0 0 "+Oe.circularPathData.rightFullExtent+" "+Oe.circularPathData.verticalRightInnerExtent+" L"+Oe.circularPathData.rightFullExtent+" "+(Oe.circularPathData.targetY-Oe.circularPathData.rightSmallArcRadius)+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightSmallArcRadius+" 0 0 0 "+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.targetY+" L"+Oe.circularPathData.targetX+" "+Oe.circularPathData.targetY:ze="M"+Oe.circularPathData.sourceX+" "+Oe.circularPathData.sourceY+" L"+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.sourceY+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftSmallArcRadius+" 0 0 1 "+Oe.circularPathData.leftFullExtent+" "+(Oe.circularPathData.sourceY+Oe.circularPathData.leftSmallArcRadius)+" L"+Oe.circularPathData.leftFullExtent+" "+Oe.circularPathData.verticalLeftInnerExtent+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftLargeArcRadius+" 0 0 1 "+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" L"+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightLargeArcRadius+" 0 0 1 "+Oe.circularPathData.rightFullExtent+" "+Oe.circularPathData.verticalRightInnerExtent+" L"+Oe.circularPathData.rightFullExtent+" "+(Oe.circularPathData.targetY+Oe.circularPathData.rightSmallArcRadius)+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightSmallArcRadius+" 0 0 1 "+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.targetY+" L"+Oe.circularPathData.targetX+" "+Oe.circularPathData.targetY,ze}function ee(Oe,ze){return K(Oe)==K(ze)?Oe.circularLinkType=="bottom"?ye(Oe,ze):ce(Oe,ze):K(ze)-K(Oe)}function ce(Oe,ze){return Oe.y0-ze.y0}function ye(Oe,ze){return ze.y0-Oe.y0}function xe(Oe,ze){return Oe.y1-ze.y1}function ue(Oe,ze){return ze.y1-Oe.y1}function K(Oe){return Oe.target.column-Oe.source.column}function _e(Oe){return Oe.target.x0-Oe.source.x1}function ne(Oe,ze){var ct=B(Oe),et=_e(ze)/Math.tan(ct),qe=Ge(Oe)=="up"?Oe.y1+et:Oe.y1-et;return qe}function ae(Oe,ze){var ct=B(Oe),et=_e(ze)/Math.tan(ct),qe=Ge(Oe)=="up"?Oe.y1-et:Oe.y1+et;return qe}function pe(Oe,ze,ct,et){Oe.links.forEach(function(qe){if(!qe.circular&&qe.target.column-qe.source.column>1){var we=qe.source.column+1,Le=qe.target.column-1,Ke=1,Te=Le-we+1;for(Ke=1;we<=Le;we++,Ke++)Oe.nodes.forEach(function(Ve){if(Ve.column==we){var $e=Ke/(Te+1),ot=Math.pow(1-$e,3),tt=3*$e*Math.pow(1-$e,2),nt=3*Math.pow($e,2)*(1-$e),We=Math.pow($e,3),mt=ot*qe.y0+tt*qe.y0+nt*qe.y1+We*qe.y1,bt=mt-qe.width/2,Yt=mt+qe.width/2,jt;bt>Ve.y0&&btVe.y0&&YtVe.y1&&le(mr,jt,ze,ct)})):btVe.y1&&(jt=Yt-Ve.y0+10,Ve=le(Ve,jt,ze,ct),Oe.nodes.forEach(function(mr){A(mr,et)==A(Ve,et)||mr.column!=Ve.column||mr.y0Ve.y1&&le(mr,jt,ze,ct)}))}})}})}function ie(Oe,ze){return Oe.y0>ze.y0&&Oe.y0ze.y0&&Oe.y1ze.y1}function le(Oe,ze,ct,et){return Oe.y0+ze>=ct&&Oe.y1+ze<=et&&(Oe.y0=Oe.y0+ze,Oe.y1=Oe.y1+ze,Oe.targetLinks.forEach(function(qe){qe.y1=qe.y1+ze}),Oe.sourceLinks.forEach(function(qe){qe.y0=qe.y0+ze})),Oe}function me(Oe,ze,ct,et){Oe.nodes.forEach(function(qe){et&&qe.y+(qe.y1-qe.y0)>ze&&(qe.y=qe.y-(qe.y+(qe.y1-qe.y0)-ze));var we=Oe.links.filter(function(Te){return A(Te.source,ct)==A(qe,ct)}),Le=we.length;Le>1&&we.sort(function(Te,Ve){if(!Te.circular&&!Ve.circular){if(Te.target.column==Ve.target.column)return Te.y1-Ve.y1;if(De(Te,Ve)){if(Te.target.column>Ve.target.column){var $e=ae(Ve,Te);return Te.y1-$e}if(Ve.target.column>Te.target.column){var ot=ae(Te,Ve);return ot-Ve.y1}}else return Te.y1-Ve.y1}if(Te.circular&&!Ve.circular)return Te.circularLinkType=="top"?-1:1;if(Ve.circular&&!Te.circular)return Ve.circularLinkType=="top"?1:-1;if(Te.circular&&Ve.circular)return Te.circularLinkType===Ve.circularLinkType&&Te.circularLinkType=="top"?Te.target.column===Ve.target.column?Te.target.y1-Ve.target.y1:Ve.target.column-Te.target.column:Te.circularLinkType===Ve.circularLinkType&&Te.circularLinkType=="bottom"?Te.target.column===Ve.target.column?Ve.target.y1-Te.target.y1:Te.target.column-Ve.target.column:Te.circularLinkType=="top"?-1:1});var Ke=qe.y0;we.forEach(function(Te){Te.y0=Ke+Te.width/2,Ke=Ke+Te.width}),we.forEach(function(Te,Ve){if(Te.circularLinkType=="bottom"){var $e=Ve+1,ot=0;for($e;$e1&&qe.sort(function(Ke,Te){if(!Ke.circular&&!Te.circular){if(Ke.source.column==Te.source.column)return Ke.y0-Te.y0;if(De(Ke,Te)){if(Te.source.column0?"up":"down"}function ht(Oe,ze){return A(Oe.source,ze)==A(Oe.target,ze)}function it(Oe,ze,ct){var et=Oe.nodes,qe=Oe.links,we=!1,Le=!1;if(qe.forEach(function(tt){tt.circularLinkType=="top"?we=!0:tt.circularLinkType=="bottom"&&(Le=!0)}),we==!1||Le==!1){var Ke=t.min(et,function(tt){return tt.y0}),Te=t.max(et,function(tt){return tt.y1}),Ve=Te-Ke,$e=ct-ze,ot=$e/Ve;et.forEach(function(tt){var nt=(tt.y1-tt.y0)*ot;tt.y0=(tt.y0-Ke)*ot,tt.y1=tt.y0+nt}),qe.forEach(function(tt){tt.y0=(tt.y0-Ke)*ot,tt.y1=(tt.y1-Ke)*ot,tt.width=tt.width*ot})}}e.sankeyCircular=E,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,"__esModule",{value:!0})}))});var kK=fe((cMr,DXe)=>{"use strict";DXe.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"}}});var YXe=fe((fMr,WXe)=>{"use strict";var RXe=xXe(),$rr=($2(),Gs(Z2)).interpolateNumber,I5=xi(),tS=SXe(),Krr=FXe(),ws=kK(),D1=ni(),Jrr=ea(),R1=Xt(),y_=R1.strTranslate,IXe=R1.strRotate,PK=L1(),rS=PK.keyFun,AD=PK.repeat,UXe=PK.unwrap,zXe=as(),Qrr=bi(),VXe=nc(),enr=VXe.CAP_SHIFT,tnr=VXe.LINE_SPACING,rnr=3;function nnr(e,t,r){var n=UXe(t),a=n.trace,i=a.domain,o=a.orientation==="h",s=a.direction==="reversed",l=a.node.pad,u=a.node.thickness,c={justify:tS.sankeyJustify,left:tS.sankeyLeft,right:tS.sankeyRight,center:tS.sankeyCenter}[a.node.align],f=e.width*(i.x[1]-i.x[0]),v=e.height*(i.y[1]-i.y[0]),g=n._nodes,p=n._links,x=n.circular,_;x?_=Krr.sankeyCircular().circularLinkGap(0):_=tS.sankey(),_.iterations(ws.sankeyIterations).size(o?[f,v]:[v,f]).nodeWidth(u).nodePadding(l).nodeId(function(V){return V.pointNumber}).nodeAlign(c).nodes(g).links(p);function y(V){a[V].sort==="input"&&(x?R1.warn(`Circular Sankey diagrams do not support the "input" ${V}.sort mode; falling back to the default sort.`):_[`${V}Sort`](null))}y("link"),y("node");var C=_();_.nodePadding()=J||(U=J-q.y0,U>1e-6&&(q.y0+=U,q.y1+=U)),J=q.y1+l})}function I(V){var j=V.map(function(xe,ue){return{x0:xe.x0,index:ue}}).sort(function(xe,ue){return xe.x0-ue.x0}),q=[],U=-1,J,ee=-1/0,ce;for(k=0;kee+u&&(U+=1,J=ye.x0),ee=ye.x0,q[U]||(q[U]=[]),q[U].push(ye),ce=J-ye.x0,ye.x0+=ce,ye.x1+=ce}return q}if(a.node.x.length&&a.node.y.length){for(k=0;k0?" L "+a.targetX+" "+a.targetY:"")+"Z"):(r="M "+(a.targetX-t)+" "+(a.targetY-n)+" L "+(a.rightInnerExtent-t)+" "+(a.targetY-n)+" A "+(a.rightLargeArcRadius+n)+" "+(a.rightSmallArcRadius+n)+" 0 0 0 "+(a.rightFullExtent-n-t)+" "+(a.targetY+a.rightSmallArcRadius)+" L "+(a.rightFullExtent-n-t)+" "+a.verticalRightInnerExtent,i&&o?r+=" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.rightInnerExtent-n-t)+" "+(a.verticalFullExtent+n)+" L "+(a.rightFullExtent+n-t-(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent+n)+" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent:i?r+=" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.rightFullExtent-t-n-(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" L "+(a.leftFullExtent+n+(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent:r+=" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.rightInnerExtent-t)+" "+(a.verticalFullExtent+n)+" L "+a.leftInnerExtent+" "+(a.verticalFullExtent+n)+" A "+(a.leftLargeArcRadius+n)+" "+(a.leftLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent,r+=" L "+(a.leftFullExtent+n)+" "+(a.sourceY+a.leftSmallArcRadius)+" A "+(a.leftLargeArcRadius+n)+" "+(a.leftSmallArcRadius+n)+" 0 0 0 "+a.leftInnerExtent+" "+(a.sourceY-n)+" L "+a.sourceX+" "+(a.sourceY-n)+" L "+a.sourceX+" "+(a.sourceY+n)+" L "+a.leftInnerExtent+" "+(a.sourceY+n)+" A "+(a.leftLargeArcRadius-n)+" "+(a.leftSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent-n)+" "+(a.sourceY+a.leftSmallArcRadius)+" L "+(a.leftFullExtent-n)+" "+a.verticalLeftInnerExtent,i&&o?r+=" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent-n-(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" L "+(a.rightFullExtent+n-t+(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.rightFullExtent+n-t)+" "+a.verticalRightInnerExtent:i?r+=" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+(a.verticalFullExtent+n)+" L "+(a.rightFullExtent-t-n)+" "+(a.verticalFullExtent+n)+" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.rightFullExtent+n-t)+" "+a.verticalRightInnerExtent:r+=" A "+(a.leftLargeArcRadius-n)+" "+(a.leftLargeArcRadius-n)+" 0 0 1 "+a.leftInnerExtent+" "+(a.verticalFullExtent-n)+" L "+(a.rightInnerExtent-t)+" "+(a.verticalFullExtent-n)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightLargeArcRadius-n)+" 0 0 1 "+(a.rightFullExtent+n-t)+" "+a.verticalRightInnerExtent,r+=" L "+(a.rightFullExtent+n-t)+" "+(a.targetY+a.rightSmallArcRadius)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.rightInnerExtent-t)+" "+(a.targetY+n)+" L "+(a.targetX-t)+" "+(a.targetY+n)+(t>0?" L "+a.targetX+" "+a.targetY:"")+"Z"),r}function FK(){var e=.5;function t(r){var n=r.linkArrowLength;if(r.link.circular)return anr(r.link,n);var a=Math.abs((r.link.target.x0-r.link.source.x1)/2);n>a&&(n=a);var i=r.link.source.x1,o=r.link.target.x0-n,s=$rr(i,o),l=s(e),u=s(1-e),c=r.link.y0-r.link.width/2,f=r.link.y0+r.link.width/2,v=r.link.y1-r.link.width/2,g=r.link.y1+r.link.width/2,p="M"+i+","+c,x="C"+l+","+c+" "+u+","+v+" "+o+","+v,_="C"+u+","+g+" "+l+","+f+" "+i+","+f,y=n>0?"L"+(o+n)+","+(v+r.link.width/2):"";return y+="L"+o+","+g,p+x+y+_+"Z"}return t}function onr(e,t){var r=ws.nodePadAcross,n=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var a=t.dx,i=Math.max(.5,t.dy),o="node_"+t.pointNumber;return t.group&&(o=R1.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:o,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(a),visibleHeight:i,zoneX:-r,zoneY:-n,zoneWidth:a+2*r,zoneHeight:i+2*n,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:t.originalLayer===1,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,reversed:e.reversed,rgb:D1.rgb(t.color),alpha:D1.parse(t.color).alpha,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,o].join("_"),interactionState:e.interactionState,figure:e}}function LK(e){e.attr("transform",function(t){return y_(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function snr(e){e.call(LK)}function GXe(e,t){e.call(snr),t.attr("d",FK())}function qXe(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function CK(e){return e.link.width>1||e.linkLineWidth>0}function BXe(e){return e.horizontal?e.reversed?y_(e.translateX+e.width,e.translateY)+"matrix(-1 0 0 1 0 0)":y_(e.translateX,e.translateY)+"matrix(1 0 0 1 0 0)":e.reversed?y_(e.translateX,e.translateY+e.height)+"matrix(0 -1 1 0 0 0)":y_(e.translateX,e.translateY)+"matrix(0 1 1 0 0 0)"}function OXe(e,t,r){e.on(".basic",null).on("mouseover.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.hover(this,n,t),n.interactionState.hovered=[this,n])}).on("mousemove.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.follow(this,n),n.interactionState.hovered=[this,n])}).on("mouseout.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.unhover(this,n,t),n.interactionState.hovered=!1)}).on("click.basic",function(n){n.interactionState.hovered&&(r.unhover(this,n,t),n.interactionState.hovered=!1),!n.interactionState.dragInProgress&&!n.partOfGroup&&r.select(this,n,t)})}function lnr(e,t,r,n){var a=I5.behavior.drag().origin(function(i){return{x:i.node.x0+i.visibleWidth/2,y:i.node.y0+i.visibleHeight/2}}).on("dragstart",function(i){if(i.arrangement!=="fixed"&&(R1.ensureSingle(n._fullLayout._infolayer,"g","dragcover",function(s){n._fullLayout._dragCover=s}),R1.raiseToTop(this),i.interactionState.dragInProgress=i.node,NXe(i.node),i.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,i.interactionState.hovered),i.interactionState.hovered=!1),i.arrangement==="snap")){var o=i.traceId+"|"+i.key;i.forceLayouts[o]?i.forceLayouts[o].alpha(1):unr(e,o,i,n),cnr(e,t,i,o,n)}}).on("drag",function(i){if(i.arrangement!=="fixed"){var o=I5.event.x,s=I5.event.y;i.arrangement==="snap"?(i.node.x0=o-i.visibleWidth/2,i.node.x1=o+i.visibleWidth/2,i.node.y0=s-i.visibleHeight/2,i.node.y1=s+i.visibleHeight/2):(i.arrangement==="freeform"&&(i.node.x0=o-i.visibleWidth/2,i.node.x1=o+i.visibleWidth/2),s=Math.max(0,Math.min(i.size-i.visibleHeight/2,s)),i.node.y0=s-i.visibleHeight/2,i.node.y1=s+i.visibleHeight/2),NXe(i.node),i.arrangement!=="snap"&&(i.sankey.update(i.graph),GXe(e.filter(jXe(i)),t))}}).on("dragend",function(i){if(i.arrangement!=="fixed"){i.interactionState.dragInProgress=!1;for(var o=0;o0)window.requestAnimationFrame(i);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,HXe(r,a)}})}function fnr(e,t,r,n){return function(){for(var i=0,o=0;o0&&n.forceLayouts[t].alpha(0)}}function HXe(e,t){for(var r=[],n=[],a=0;aCK(_)?D1.rgb(_.linkLineColor):_.rgb).style("stroke-opacity",_=>CK(_)?D1.opacity(_.linkLineColor):_.alpha).style("fill",_=>_.rgb).style("fill-opacity",_=>_.alpha).style("stroke-width",_=>CK(_)?_.linkLineWidth:1).attr("d",FK()),f.style("opacity",function(){return e._context.staticPlot||o||s?1:0}).transition().ease(ws.ease).duration(ws.duration).style("opacity",1),f.exit().transition().ease(ws.ease).duration(ws.duration).style("opacity",0).remove();var v=u.selectAll("."+ws.cn.sankeyNodeSet).data(AD,rS);v.enter().append("g").classed(ws.cn.sankeyNodeSet,!0),v.style("cursor",function(_){switch(_.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var g=v.selectAll("."+ws.cn.sankeyNode).data(function(_){var y=_.graph.nodes;return hnr(y),y.map(onr.bind(null,_))},rS);g.enter().append("g").classed(ws.cn.sankeyNode,!0).call(LK).style("opacity",function(_){return(e._context.staticPlot||o)&&!_.partOfGroup?1:0}),g.call(OXe,u,a.nodeEvents).call(lnr,f,a,e),g.transition().ease(ws.ease).duration(ws.duration).call(LK).style("opacity",function(_){return _.partOfGroup?0:1}),g.exit().transition().ease(ws.ease).duration(ws.duration).style("opacity",0).remove();var p=g.selectAll("."+ws.cn.nodeRect).data(AD);p.enter().append("rect").classed(ws.cn.nodeRect,!0).call(qXe),p.style("stroke-width",function(_){return _.nodeLineWidth}).style("stroke",function(_){return D1.rgb(_.nodeLineColor)}).style("stroke-opacity",function(_){return D1.opacity(_.nodeLineColor)}).style("fill",_=>_.rgb).style("fill-opacity",_=>_.alpha),p.transition().ease(ws.ease).duration(ws.duration).call(qXe);var x=g.selectAll("."+ws.cn.nodeLabel).data(AD);x.enter().append("text").classed(ws.cn.nodeLabel,!0).style("cursor","default"),x.attr("data-notex",1).text(function(_){return _.node.label}).each(function(_){var y=I5.select(this);Jrr.font(y,_.textFont),zXe.convertToTspans(y,e)}).attr("text-anchor",function(_){return _.horizontal&&_.left!==_.reversed?"end":"start"}).attr("transform",function(_){var y=I5.select(this),C=zXe.lineCount(y),k=_.textFont.size*((C-1)*tnr-enr),S=_.nodeLineWidth/2+rnr;if(!_.horizontal){var A=_.reversed?(_.visibleWidth+k)/2:(_.visibleWidth-k)/2,L=_.reversed?IXe(90):"scale(-1,1)"+IXe(90);return y_(A,S)+L}var w=S,A=(_.visibleHeight-k)/2;return _.left?w=-w:w+=_.visibleWidth,y_(w,A)+(_.reversed?"scale(-1,1)":"")}),x.transition().ease(ws.ease).duration(ws.duration)}});var IK=fe((hMr,rZe)=>{"use strict";var fd=xi(),RK=Xt(),MD=RK.numberFormat,pnr=YXe(),z5=kl(),gnr=ni(),Ny=kK().cn,nS=RK._;function XXe(e){return e!==""}function q5(e,t){return e.filter(function(r){return r.key===t.traceId})}function ZXe(e,t){fd.select(e).select("path").style("fill-opacity",t),fd.select(e).select("rect").style("fill-opacity",t)}function $Xe(e){fd.select(e).select("text.name").style("fill","black")}function KXe(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function JXe(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function QXe(e,t,r){t&&r&&q5(r,t).selectAll("."+Ny.sankeyLink).filter(KXe(t)).call(eZe.bind(0,t,r,!1))}function DK(e,t,r){t&&r&&q5(r,t).selectAll("."+Ny.sankeyLink).filter(KXe(t)).call(tZe.bind(0,t,r,!1))}function eZe(e,t,r,n){n.style("fill",function(a){if(!a.link.concentrationscale)return a.hoverRgb}).style("fill-opacity",function(a){if(!a.link.concentrationscale)return a.hoverAlpha}),n.each(function(a){var i=a.link.label;i!==""&&q5(t,e).selectAll("."+Ny.sankeyLink).filter(function(o){return o.link.label===i}).style("fill",function(o){if(!o.link.concentrationscale)return o.hoverRgb}).style("fill-opacity",function(o){if(!o.link.concentrationscale)return o.hoverAlpha})}),r&&q5(t,e).selectAll("."+Ny.sankeyNode).filter(JXe(e)).call(QXe)}function tZe(e,t,r,n){n.style("fill",function(a){return a.rgb}).style("fill-opacity",function(a){return a.alpha}),n.each(function(a){var i=a.link.label;i!==""&&q5(t,e).selectAll("."+Ny.sankeyLink).filter(function(o){return o.link.label===i}).style("fill",o=>o.rgb).style("fill-opacity",o=>o.alpha)}),r&&q5(t,e).selectAll(Ny.sankeyNode).filter(JXe(e)).call(DK)}function Vl(e,t){var r=e.hoverlabel||{},n=RK.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}rZe.exports=function(t,r){for(var n=t._fullLayout,a=n._paper,i=n._size,o=0;o"),color:Vl(A,"bgcolor")||gnr.addOpacity(I.color,1),borderColor:Vl(A,"bordercolor"),fontFamily:Vl(A,"font.family"),fontSize:Vl(A,"font.size"),fontColor:Vl(A,"font.color"),fontWeight:Vl(A,"font.weight"),fontStyle:Vl(A,"font.style"),fontVariant:Vl(A,"font.variant"),fontTextcase:Vl(A,"font.textcase"),fontLineposition:Vl(A,"font.lineposition"),fontShadow:Vl(A,"font.shadow"),nameLength:Vl(A,"namelength"),textAlign:Vl(A,"align"),idealAlign:fd.event.x"),color:Vl(A,"bgcolor")||w.rgb,borderColor:Vl(A,"bordercolor"),fontFamily:Vl(A,"font.family"),fontSize:Vl(A,"font.size"),fontColor:Vl(A,"font.color"),fontWeight:Vl(A,"font.weight"),fontStyle:Vl(A,"font.style"),fontVariant:Vl(A,"font.variant"),fontTextcase:Vl(A,"font.textcase"),fontLineposition:Vl(A,"font.lineposition"),fontShadow:Vl(A,"font.shadow"),nameLength:Vl(A,"namelength"),textAlign:Vl(A,"align"),idealAlign:"left",hovertemplate:A.hovertemplate,hovertemplateLabels:B,eventData:[w.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});ZXe(j,.85),$Xe(j)}}},S=function(L,w,A){t._fullLayout.hovermode!==!1&&(fd.select(L).call(DK,w,A),w.node.trace.node.hoverinfo!=="skip"&&(w.node.fullData=w.node.trace,t.emit("plotly_unhover",{event:fd.event,points:[w.node]})),z5.loneUnhover(n._hoverlayer.node()))};pnr(t,a,r,{width:i.w,height:i.h,margin:{t:i.t,r:i.r,b:i.b,l:i.l}},{linkEvents:{hover:u,follow:x,unhover:_,select:l},nodeEvents:{hover:C,follow:k,unhover:S,select:y}})}});var nZe=fe(x_=>{"use strict";var mnr=rl().overrideAll,ynr=jf().getModuleCalcData,xnr=IK(),_nr=tm(),bnr=np(),wnr=ed(),Tnr=Ac().prepSelect,zK=Xt(),Anr=bi(),SD="sankey";x_.name=SD;x_.baseLayoutAttrOverrides=mnr({hoverlabel:_nr.hoverlabel},"plot","nested");x_.plot=function(e){var t=ynr(e.calcdata,SD)[0];xnr(e,t),x_.updateFx(e)};x_.clean=function(e,t,r,n){var a=n._has&&n._has(SD),i=t._has&&t._has(SD);a&&!i&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())};x_.updateFx=function(e){for(var t=0;t{"use strict";iZe.exports=function(t,r){for(var n=t.cd,a=[],i=n[0].trace,o=i._sankey,s=o.graph.nodes,l=i.orientation==="v",u=i.direction==="reversed",c=0;c{"use strict";oZe.exports={attributes:AK(),supplyDefaults:aXe(),calc:cXe(),plot:IK(),moduleType:"trace",name:"sankey",basePlotModule:nZe(),selectPoints:aZe(),categories:["noOpacity"],meta:{}}});var uZe=fe((gMr,lZe)=>{"use strict";lZe.exports=sZe()});var fZe=fe(B5=>{"use strict";var cZe=Hs();B5.name="indicator";B5.plot=function(e,t,r,n){cZe.plotBasePlot(B5.name,e,t,r,n)};B5.clean=function(e,t,r,n){cZe.cleanBasePlot(B5.name,e,t,r,n)}});var BK=fe((yMr,mZe)=>{"use strict";var Uy=ta().extendFlat,dZe=ta().extendDeep,Snr=rl().overrideAll,vZe=Ds(),pZe=tc(),Enr=nl().attributes,au=pf(),knr=Mo().templatedArray,ED=tw(),hZe=pl().descriptionOnlyNumbers,qK=vZe({editType:"plot",colorEditType:"plot"}),iS={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:pZe.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},gZe={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},Cnr=knr("step",dZe({},iS,{range:gZe}));mZe.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:Enr({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:Uy({},qK,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:hZe("value")},font:Uy({},qK,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:hZe("value")},increasing:{symbol:{valType:"string",dflt:ED.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:ED.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:ED.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:ED.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:Uy({},qK,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:dZe({},iS,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:pZe.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:Snr({range:gZe,visible:Uy({},au.visible,{dflt:!0}),tickmode:au.minor.tickmode,nticks:au.nticks,tick0:au.tick0,dtick:au.dtick,tickvals:au.tickvals,ticktext:au.ticktext,ticks:Uy({},au.ticks,{dflt:"outside"}),ticklen:au.ticklen,tickwidth:au.tickwidth,tickcolor:au.tickcolor,ticklabelstep:au.ticklabelstep,showticklabels:au.showticklabels,labelalias:au.labelalias,tickfont:vZe({}),tickangle:au.tickangle,tickformat:au.tickformat,tickformatstops:au.tickformatstops,tickprefix:au.tickprefix,showtickprefix:au.showtickprefix,ticksuffix:au.ticksuffix,showticksuffix:au.showticksuffix,separatethousands:au.separatethousands,exponentformat:au.exponentformat,minexponent:au.minexponent,showexponent:au.showexponent,editType:"plot"},"plot"),steps:Cnr,threshold:{line:{color:Uy({},iS.line.color,{}),width:Uy({},iS.line.width,{dflt:1}),editType:"plot"},thickness:Uy({},iS.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var OK=fe((xMr,yZe)=>{"use strict";yZe.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var bZe=fe((_Mr,_Ze)=>{"use strict";var I1=Xt(),CD=BK(),Lnr=nl().defaults,xZe=Mo(),Pnr=Ah(),kD=OK(),Fnr=Fx(),Dnr=Ub(),Rnr=gm(),Inr=mm();function znr(e,t,r,n){function a(w,A){return I1.coerce(e,t,CD,w,A)}Lnr(t,n,a),a("mode"),t._hasNumber=t.mode.indexOf("number")!==-1,t._hasDelta=t.mode.indexOf("delta")!==-1,t._hasGauge=t.mode.indexOf("gauge")!==-1;var i=a("value");t._range=[0,typeof i=="number"?1.5*i:1];var o=new Array(2),s;if(t._hasNumber){a("number.valueformat");var l=I1.extendFlat({},n.font);l.size=void 0,I1.coerceFont(a,"number.font",l),t.number.font.size===void 0&&(t.number.font.size=kD.defaultNumberFontSize,o[0]=!0),a("number.prefix"),a("number.suffix"),s=t.number.font.size}var u;if(t._hasDelta){var c=I1.extendFlat({},n.font);c.size=void 0,I1.coerceFont(a,"delta.font",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||kD.defaultNumberFontSize),o[1]=!0),a("delta.reference",t.value),a("delta.relative"),a("delta.valueformat",t.delta.relative?"2%":""),a("delta.increasing.symbol"),a("delta.increasing.color"),a("delta.decreasing.symbol"),a("delta.decreasing.color"),a("delta.position"),a("delta.prefix"),a("delta.suffix"),u=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var f=I1.extendFlat({},n.font);f.size=.25*(s||u||kD.defaultNumberFontSize),I1.coerceFont(a,"title.font",f),a("title.text");var v,g,p,x;function _(w,A){return I1.coerce(v,g,CD.gauge,w,A)}function y(w,A){return I1.coerce(p,x,CD.gauge.axis,w,A)}if(t._hasGauge){v=e.gauge,v||(v={}),g=xZe.newContainer(t,"gauge"),_("shape");var C=t._isBullet=t.gauge.shape==="bullet";C||a("title.align","center");var k=t._isAngular=t.gauge.shape==="angular";k||a("align","center"),_("bgcolor",n.paper_bgcolor),_("borderwidth"),_("bordercolor"),_("bar.color"),_("bar.line.color"),_("bar.line.width");var S=kD.valueThickness*(t.gauge.shape==="bullet"?.5:1);_("bar.thickness",S),Pnr(v,g,{name:"steps",handleItemDefaults:qnr}),_("threshold.value"),_("threshold.thickness"),_("threshold.line.width"),_("threshold.line.color"),p={},v&&(p=v.axis||{}),x=xZe.newContainer(g,"axis"),y("visible"),t._range=y("range",t._range);var L={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};Fnr(p,x,y,"linear"),Inr(p,x,y,"linear",L),Rnr(p,x,y,"linear",L),Dnr(p,x,y,L)}else a("title.align","center"),a("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function qnr(e,t){function r(n,a){return I1.coerce(e,t,CD.gauge.steps,n,a)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}_Ze.exports={supplyDefaults:znr}});var TZe=fe((bMr,wZe)=>{"use strict";function Bnr(e,t){var r=[],n=t.value;typeof t._lastValue!="number"&&(t._lastValue=t.value);var a=t._lastValue,i=a;return t._hasDelta&&typeof t.delta.reference=="number"&&(i=t.delta.reference),r[0]={y:n,lastY:a,delta:n-i,relativeDelta:(n-i)/i},r}wZe.exports={calc:Bnr}});var CZe=fe((wMr,kZe)=>{"use strict";var A_=xi(),Onr=($2(),Gs(Z2)).interpolate,AZe=($2(),Gs(Z2)).interpolateNumber,Vy=Xt(),Nnr=Vy.strScale,oS=Vy.strTranslate,Unr=Vy.rad2deg,Vnr=nc().MID_SHIFT,T_=ea(),__=OK(),PD=as(),ih=Yi(),Gnr=vA(),Hnr=gC(),jnr=pf(),O5=ni(),NK={left:"start",center:"middle",right:"end"},b_={left:0,center:.5,right:1},MZe=/[yzafpnµmkMGTPEZY]/;function sS(e){return e&&e.duration>0}kZe.exports=function(t,r,n,a){var i=t._fullLayout,o;sS(n)&&a&&(o=a()),Vy.makeTraceGroups(i._indicatorlayer,r,"trace").each(function(s){var l=s[0],u=l.trace,c=A_.select(this),f=u._hasGauge,v=u._isAngular,g=u._isBullet,p=u.domain,x={w:i._size.w*(p.x[1]-p.x[0]),h:i._size.h*(p.y[1]-p.y[0]),l:i._size.l+i._size.w*p.x[0],r:i._size.r+i._size.w*(1-p.x[1]),t:i._size.t+i._size.h*(1-p.y[1]),b:i._size.b+i._size.h*p.y[0]},_=x.l+x.w/2,y=x.t+x.h/2,C=Math.min(x.w/2,x.h),k=__.innerRadius*C,S,L,w,A=u.align||"center";if(L=y,!f)S=x.l+b_[A]*x.w,w=function(j){return SZe(j,x.w,x.h)};else if(v&&(S=_,L=y+C/2,w=function(j){return $nr(j,.9*k)}),g){var T=__.bulletPadding,m=1-__.bulletNumberDomainSize+T;S=x.l+(m+(1-m)*b_[A])*x.w,w=function(j){return SZe(j,(__.bulletNumberDomainSize-T)*x.w,x.h)}}Xnr(t,c,s,{numbersX:S,numbersY:L,numbersScaler:w,transitionOpts:n,onComplete:o});var F,E;f&&(F={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},E={range:u.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var I=c.selectAll("g.angular").data(v?s:[]);I.exit().remove();var R=c.selectAll("g.angularaxis").data(v?s:[]);R.exit().remove(),v&&Ynr(t,c,s,{radius:C,innerRadius:k,gauge:I,layer:R,size:x,gaugeBg:F,gaugeOutline:E,transitionOpts:n,onComplete:o});var B=c.selectAll("g.bullet").data(g?s:[]);B.exit().remove();var O=c.selectAll("g.bulletaxis").data(g?s:[]);O.exit().remove(),g&&Wnr(t,c,s,{gauge:B,layer:O,size:x,gaugeBg:F,gaugeOutline:E,transitionOpts:n,onComplete:o});var V=c.selectAll("text.title").data(s);V.exit().remove(),V.enter().append("text").classed("title",!0),V.attr("text-anchor",function(){return g?NK.right:NK[u.title.align]}).text(u.title.text).call(T_.font,u.title.font).call(PD.convertToTspans,t),V.attr("transform",function(){var j=x.l+x.w*b_[u.title.align],q,U=__.titlePadding,J=T_.bBox(V.node());if(f){if(v)if(u.gauge.axis.visible){var ee=T_.bBox(R.node());q=ee.top-U-J.bottom}else q=x.t+x.h/2-C/2-J.bottom-U;g&&(q=L-(J.top+J.bottom)/2,j=x.l-__.bulletPadding*x.w)}else q=u._numbersTop-U-J.bottom;return oS(j,q)})})};function Wnr(e,t,r,n){var a=r[0].trace,i=n.gauge,o=n.layer,s=n.gaugeBg,l=n.gaugeOutline,u=n.size,c=a.domain,f=n.transitionOpts,v=n.onComplete,g,p,x,_,y;i.enter().append("g").classed("bullet",!0),i.attr("transform",oS(u.l,u.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var C=u.h,k=a.gauge.bar.thickness*C,S=c.x[0],L=c.x[0]+(c.x[1]-c.x[0])*(a._hasNumber||a._hasDelta?1-__.bulletNumberDomainSize:1);g=aS(e,a.gauge.axis),g._id="xbulletaxis",g.domain=[S,L],g.setScale(),p=ih.calcTicks(g),x=ih.makeTransTickFn(g),_=ih.getTickSigns(g)[2],y=u.t+u.h,g.visible&&(ih.drawTicks(e,g,{vals:g.ticks==="inside"?ih.clipEnds(g,p):p,layer:o,path:ih.makeTickPath(g,y,_),transFn:x}),ih.drawLabels(e,g,{vals:p,layer:o,transFn:x,labelFns:ih.makeLabelFns(g,y)}));function w(R){R.attr("width",function(B){return Math.max(0,g.c2p(B.range[1])-g.c2p(B.range[0]))}).attr("x",function(B){return g.c2p(B.range[0])}).attr("y",function(B){return .5*(1-B.thickness)*C}).attr("height",function(B){return B.thickness*C})}var A=[s].concat(a.gauge.steps),T=i.selectAll("g.bg-bullet").data(A);T.enter().append("g").classed("bg-bullet",!0).append("rect"),T.select("rect").call(w).call(w_),T.exit().remove();var m=i.selectAll("g.value-bullet").data([a.gauge.bar]);m.enter().append("g").classed("value-bullet",!0).append("rect"),m.select("rect").attr("height",k).attr("y",(C-k)/2).call(w_),sS(f)?m.select("rect").transition().duration(f.duration).ease(f.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()}).attr("width",Math.max(0,g.c2p(Math.min(a.gauge.axis.range[1],r[0].y)))):m.select("rect").attr("width",typeof r[0].y=="number"?Math.max(0,g.c2p(Math.min(a.gauge.axis.range[1],r[0].y))):0),m.exit().remove();var F=r.filter(function(){return a.gauge.threshold.value||a.gauge.threshold.value===0}),E=i.selectAll("g.threshold-bullet").data(F);E.enter().append("g").classed("threshold-bullet",!0).append("line"),E.select("line").attr("x1",g.c2p(a.gauge.threshold.value)).attr("x2",g.c2p(a.gauge.threshold.value)).attr("y1",(1-a.gauge.threshold.thickness)/2*C).attr("y2",(1-(1-a.gauge.threshold.thickness)/2)*C).call(O5.stroke,a.gauge.threshold.line.color).style("stroke-width",a.gauge.threshold.line.width),E.exit().remove();var I=i.selectAll("g.gauge-outline").data([l]);I.enter().append("g").classed("gauge-outline",!0).append("rect"),I.select("rect").call(w).call(w_),I.exit().remove()}function Ynr(e,t,r,n){var a=r[0].trace,i=n.size,o=n.radius,s=n.innerRadius,l=n.gaugeBg,u=n.gaugeOutline,c=[i.l+i.w/2,i.t+i.h/2+o/2],f=n.gauge,v=n.layer,g=n.transitionOpts,p=n.onComplete,x=Math.PI/2;function _(ce){var ye=a.gauge.axis.range[0],xe=a.gauge.axis.range[1],ue=(ce-ye)/(xe-ye)*Math.PI-x;return ue<-x?-x:ue>x?x:ue}function y(ce){return A_.svg.arc().innerRadius((s+o)/2-ce/2*(o-s)).outerRadius((s+o)/2+ce/2*(o-s)).startAngle(-x)}function C(ce){ce.attr("d",function(ye){return y(ye.thickness).startAngle(_(ye.range[0])).endAngle(_(ye.range[1]))()})}var k,S,L,w;f.enter().append("g").classed("angular",!0),f.attr("transform",oS(c[0],c[1])),v.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),v.selectAll("g.xangularaxistick,path,text").remove(),k=aS(e,a.gauge.axis),k.type="linear",k.range=a.gauge.axis.range,k._id="xangularaxis",k.ticklabeloverflow="allow",k.setScale();var A=function(ce){return(k.range[0]-ce.x)/(k.range[1]-k.range[0])*Math.PI+Math.PI},T={},m=ih.makeLabelFns(k,0),F=m.labelStandoff;T.xFn=function(ce){var ye=A(ce);return Math.cos(ye)*F},T.yFn=function(ce){var ye=A(ce),xe=Math.sin(ye)>0?.2:1;return-Math.sin(ye)*(F+ce.fontSize*xe)+Math.abs(Math.cos(ye))*(ce.fontSize*Vnr)},T.anchorFn=function(ce){var ye=A(ce),xe=Math.cos(ye);return Math.abs(xe)<.1?"middle":xe>0?"start":"end"},T.heightFn=function(ce,ye,xe){var ue=A(ce);return-.5*(1+Math.sin(ue))*xe};var E=function(ce){return oS(c[0]+o*Math.cos(ce),c[1]-o*Math.sin(ce))};L=function(ce){return E(A(ce))};var I=function(ce){var ye=A(ce);return E(ye)+"rotate("+-Unr(ye)+")"};if(S=ih.calcTicks(k),w=ih.getTickSigns(k)[2],k.visible){w=k.ticks==="inside"?-1:1;var R=(k.linewidth||1)/2;ih.drawTicks(e,k,{vals:S,layer:v,path:"M"+w*R+",0h"+w*k.ticklen,transFn:I}),ih.drawLabels(e,k,{vals:S,layer:v,transFn:L,labelFns:T})}var B=[l].concat(a.gauge.steps),O=f.selectAll("g.bg-arc").data(B);O.enter().append("g").classed("bg-arc",!0).append("path"),O.select("path").call(C).call(w_),O.exit().remove();var V=y(a.gauge.bar.thickness),j=f.selectAll("g.value-arc").data([a.gauge.bar]);j.enter().append("g").classed("value-arc",!0).append("path");var q=j.select("path");sS(g)?(q.transition().duration(g.duration).ease(g.easing).each("end",function(){p&&p()}).each("interrupt",function(){p&&p()}).attrTween("d",Znr(V,_(r[0].lastY),_(r[0].y))),a._lastValue=r[0].y):q.attr("d",typeof r[0].y=="number"?V.endAngle(_(r[0].y)):"M0,0Z"),q.call(w_),j.exit().remove(),B=[];var U=a.gauge.threshold.value;(U||U===0)&&B.push({range:[U,U],color:a.gauge.threshold.color,line:{color:a.gauge.threshold.line.color,width:a.gauge.threshold.line.width},thickness:a.gauge.threshold.thickness});var J=f.selectAll("g.threshold-arc").data(B);J.enter().append("g").classed("threshold-arc",!0).append("path"),J.select("path").call(C).call(w_),J.exit().remove();var ee=f.selectAll("g.gauge-outline").data([u]);ee.enter().append("g").classed("gauge-outline",!0).append("path"),ee.select("path").call(C).call(w_),ee.exit().remove()}function Xnr(e,t,r,n){var a=r[0].trace,i=n.numbersX,o=n.numbersY,s=a.align||"center",l=NK[s],u=n.transitionOpts,c=n.onComplete,f=Vy.ensureSingle(t,"g","numbers"),v,g,p,x=[];a._hasNumber&&x.push("number"),a._hasDelta&&(x.push("delta"),a.delta.position==="left"&&x.reverse());var _=f.selectAll("text").data(x);_.enter().append("text"),_.attr("text-anchor",function(){return l}).attr("class",function(E){return E}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),_.exit().remove();function y(E,I,R,B){if(E.match("s")&&R>=0!=B>=0&&!I(R).slice(-1).match(MZe)&&!I(B).slice(-1).match(MZe)){var O=E.slice().replace("s","f").replace(/\d+/,function(j){return parseInt(j)-1}),V=aS(e,{tickformat:O});return function(j){return Math.abs(j)<1?ih.tickText(V,j).text:I(j)}}else return I}function C(){var E=aS(e,{tickformat:a.number.valueformat},a._range);E.setScale(),ih.prepTicks(E);var I=function(j){return ih.tickText(E,j).text},R=a.number.suffix,B=a.number.prefix,O=f.select("text.number");function V(){var j=typeof r[0].y=="number"?B+I(r[0].y)+R:"-";O.text(j).call(T_.font,a.number.font).call(PD.convertToTspans,e)}return sS(u)?O.transition().duration(u.duration).ease(u.easing).each("end",function(){V(),c&&c()}).each("interrupt",function(){V(),c&&c()}).attrTween("text",function(){var j=A_.select(this),q=AZe(r[0].lastY,r[0].y);a._lastValue=r[0].y;var U=y(a.number.valueformat,I,r[0].lastY,r[0].y);return function(J){j.text(B+U(q(J))+R)}}):V(),v=EZe(B+I(r[0].y)+R,a.number.font,l,e),O}function k(){var E=aS(e,{tickformat:a.delta.valueformat},a._range);E.setScale(),ih.prepTicks(E);var I=function(J){return ih.tickText(E,J).text},R=a.delta.suffix,B=a.delta.prefix,O=function(J){var ee=a.delta.relative?J.relativeDelta:J.delta;return ee},V=function(J,ee){return J===0||typeof J!="number"||isNaN(J)?"-":(J>0?a.delta.increasing.symbol:a.delta.decreasing.symbol)+B+ee(J)+R},j=function(J){return J.delta>=0?a.delta.increasing.color:a.delta.decreasing.color};a._deltaLastValue===void 0&&(a._deltaLastValue=O(r[0]));var q=f.select("text.delta");q.call(T_.font,a.delta.font).call(O5.fill,j({delta:a._deltaLastValue}));function U(){q.text(V(O(r[0]),I)).call(O5.fill,j(r[0])).call(PD.convertToTspans,e)}return sS(u)?q.transition().duration(u.duration).ease(u.easing).tween("text",function(){var J=A_.select(this),ee=O(r[0]),ce=a._deltaLastValue,ye=y(a.delta.valueformat,I,ce,ee),xe=AZe(ce,ee);return a._deltaLastValue=ee,function(ue){J.text(V(xe(ue),ye)),J.call(O5.fill,j({delta:xe(ue)}))}}).each("end",function(){U(),c&&c()}).each("interrupt",function(){U(),c&&c()}):U(),g=EZe(V(O(r[0]),I),a.delta.font,l,e),q}var S=a.mode+a.align,L;if(a._hasDelta&&(L=k(),S+=a.delta.position+a.delta.font.size+a.delta.font.family+a.delta.valueformat,S+=a.delta.increasing.symbol+a.delta.decreasing.symbol,p=g),a._hasNumber&&(C(),S+=a.number.font.size+a.number.font.family+a.number.valueformat+a.number.suffix+a.number.prefix,p=v),a._hasDelta&&a._hasNumber){var w=[(v.left+v.right)/2,(v.top+v.bottom)/2],A=[(g.left+g.right)/2,(g.top+g.bottom)/2],T,m,F=.75*a.delta.font.size;a.delta.position==="left"&&(T=LD(a,"deltaPos",0,-1*(v.width*b_[a.align]+g.width*(1-b_[a.align])+F),S,Math.min),m=w[1]-A[1],p={width:v.width+g.width+F,height:Math.max(v.height,g.height),left:g.left+T,right:v.right,top:Math.min(v.top,g.top+m),bottom:Math.max(v.bottom,g.bottom+m)}),a.delta.position==="right"&&(T=LD(a,"deltaPos",0,v.width*(1-b_[a.align])+g.width*b_[a.align]+F,S,Math.max),m=w[1]-A[1],p={width:v.width+g.width+F,height:Math.max(v.height,g.height),left:v.left,right:g.right+T,top:Math.min(v.top,g.top+m),bottom:Math.max(v.bottom,g.bottom+m)}),a.delta.position==="bottom"&&(T=null,m=g.height,p={width:Math.max(v.width,g.width),height:v.height+g.height,left:Math.min(v.left,g.left),right:Math.max(v.right,g.right),top:v.bottom-v.height,bottom:v.bottom+g.height}),a.delta.position==="top"&&(T=null,m=v.top,p={width:Math.max(v.width,g.width),height:v.height+g.height,left:Math.min(v.left,g.left),right:Math.max(v.right,g.right),top:v.bottom-v.height-g.height,bottom:v.bottom}),L.attr({dx:T,dy:m})}(a._hasNumber||a._hasDelta)&&f.attr("transform",function(){var E=n.numbersScaler(p);S+=E[2];var I=LD(a,"numbersScale",1,E[0],S,Math.min),R;a._scaleNumbers||(I=1),a._isAngular?R=o-I*p.bottom:R=o-I*(p.top+p.bottom)/2,a._numbersTop=I*p.top+R;var B=p[s];s==="center"&&(B=(p.left+p.right)/2);var O=i-I*B;return O=LD(a,"numbersTranslate",0,O,S,Math.max),oS(O,R)+Nnr(I)})}function w_(e){e.each(function(t){O5.stroke(A_.select(this),t.line.color)}).each(function(t){O5.fill(A_.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function Znr(e,t,r){return function(){var n=Onr(t,r);return function(a){return e.endAngle(n(a))()}}}function aS(e,t,r){var n=e._fullLayout,a=Vy.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),i={type:"linear",_id:"x"+t._id},o={letter:"x",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function s(l,u){return Vy.coerce(a,i,jnr,l,u)}return Gnr(a,i,s,o,n),Hnr(a,i,s,o),i}function SZe(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+"x"+r]}function $nr(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function EZe(e,t,r,n){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),i=A_.select(a);return i.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(PD.convertToTspans,n).call(T_.font,t),T_.bBox(i.node())}function LD(e,t,r,n,a,i){var o="_cache"+t;e[o]&&e[o].key===a||(e[o]={key:a,value:r});var s=Vy.aggNums(i,null,[e[o].value,n],2);return e[o].value=s,s}});var PZe=fe((TMr,LZe)=>{"use strict";LZe.exports={moduleType:"trace",name:"indicator",basePlotModule:fZe(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:BK(),supplyDefaults:bZe().supplyDefaults,calc:TZe().calc,plot:CZe(),meta:{}}});var DZe=fe((AMr,FZe)=>{"use strict";FZe.exports=PZe()});var UK=fe((SMr,qZe)=>{"use strict";var RZe=Fm(),FD=ta().extendFlat,Knr=rl().overrideAll,IZe=Ds(),Jnr=nl().attributes,zZe=pl().descriptionOnlyNumbers,MMr=qZe.exports=Knr({domain:Jnr({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:zZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:FD({},RZe.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:FD({},IZe({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:zZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:FD({},RZe.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:FD({},IZe({arrayOk:!0}))}},"calc","from-root")});var OZe=fe((EMr,BZe)=>{"use strict";var VK=Xt(),Qnr=UK(),eir=nl().defaults;function tir(e,t){for(var r=e.columnorder||[],n=e.header.values.length,a=r.slice(0,n),i=a.slice().sort(function(l,u){return l-u}),o=a.map(function(l){return i.indexOf(l)}),s=o.length;s{"use strict";var rir=L1().wrap;NZe.exports=function(){return rir({})}});var GK=fe((CMr,VZe)=>{"use strict";VZe.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"
",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"}}});var KZe=fe((LMr,$Ze)=>{"use strict";var GZe=GK(),jK=ta().extendFlat,nir=aa(),iir=Gf().isTypedArray,DD=Gf().isArrayOrTypedArray;$Ze.exports=function(t,r){var n=HK(r.cells.values),a=function(m){return m.slice(r.header.values.length,m.length)},i=HK(r.header.values);i.length&&!i[0].length&&(i[0]=[""],i=HK(i));var o=i.concat(a(n).map(function(){return ZZe((i[0]||[""]).length)})),s=r.domain,l=Math.floor(t._fullLayout._size.w*(s.x[1]-s.x[0])),u=Math.floor(t._fullLayout._size.h*(s.y[1]-s.y[0])),c=r.header.values.length?o[0].map(function(){return r.header.height}):[GZe.emptyHeaderHeight],f=n.length?n[0].map(function(){return r.cells.height}):[],v=c.reduce(HZe,0),g=u-v,p=g+GZe.uplift,x=YZe(f,p),_=YZe(c,v),y=WZe(_,[]),C=WZe(x,y),k={},S=r.columnorder;DD(S)&&(S=Array.from(S)),S=S.concat(a(n.map(function(m,F){return F})));var L=o.map(function(m,F){var E=DD(r.columnwidth)?r.columnwidth[Math.min(F,r.columnwidth.length-1)]:r.columnwidth;return nir(E)?Number(E):1}),w=L.reduce(HZe,0);L=L.map(function(m){return m/w*l});var A=Math.max(WK(r.header.line.width),WK(r.cells.line.width)),T={key:r.uid+t._context.staticPlot,translateX:s.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-s.y[1]),size:t._fullLayout._size,width:l,maxLineWidth:A,height:u,columnOrder:S,groupHeight:u,rowBlocks:C,headerRowBlocks:y,scrollY:0,cells:jK({},r.cells,{values:n}),headerCells:jK({},r.header,{values:o}),gdColumns:o.map(function(m){return m[0]}),gdColumnsOriginalOrder:o.map(function(m){return m[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(m,F){var E=k[m];k[m]=(E||0)+1;var I=m+"__"+k[m];return{key:I,label:m,specIndex:F,xIndex:S[F],xScale:jZe,x:void 0,calcdata:void 0,columnWidth:L[F]}})};return T.columns.forEach(function(m){m.calcdata=T,m.x=jZe(m)}),T};function WK(e){if(DD(e)){for(var t=0,r=0;r=t||u===e.length-1)&&(r[a]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o=XZe(),a+=i,s=u+1,i=0);return r}function XZe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var JZe=fe(YK=>{"use strict";var RD=ta().extendFlat;YK.splitToPanels=function(e){var t=[0,0],r=RD({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:RD({},e.calcdata,{cells:e.calcdata.headerCells})}),n=RD({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),a=RD({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks});return[n,a,r]};YK.splitToCells=function(e){var t=air(e);return(e.values||[]).slice(t[0],t[1]).map(function(r,n){var a=typeof r=="string"&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:n+a,key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}})};function air(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}});var nJ=fe((FMr,u$e)=>{"use strict";var Ei=GK(),_l=xi(),XK=Xt(),oir=XK.numberFormat,Ts=L1(),ZK=ea(),sir=as(),lir=Xt().raiseToTop,Bv=Xt().strTranslate,uir=Xt().cancelTransition,cir=KZe(),a$e=JZe(),QZe=ni();u$e.exports=function(t,r){var n=!t._context.staticPlot,a=t._fullLayout._paper.selectAll("."+Ei.cn.table).data(r.map(function(C){var k=Ts.unwrap(C),S=k.trace;return cir(t,S)}),Ts.keyFun);a.exit().remove(),a.enter().append("g").classed(Ei.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"),a.attr("width",function(C){return C.width+C.size.l+C.size.r}).attr("height",function(C){return C.height+C.size.t+C.size.b}).attr("transform",function(C){return Bv(C.translateX,C.translateY)});var i=a.selectAll("."+Ei.cn.tableControlView).data(Ts.repeat,Ts.keyFun),o=i.enter().append("g").classed(Ei.cn.tableControlView,!0).style("box-sizing","content-box");if(n){var s="onwheel"in document?"wheel":"mousewheel";o.on("mousemove",function(C){i.filter(function(k){return C===k}).call(lS,t)}).on(s,function(C){if(!C.scrollbarState.wheeling){C.scrollbarState.wheeling=!0;var k=C.scrollY+_l.event.deltaY,S=zD(t,i,null,k)(C);S||(_l.event.stopPropagation(),_l.event.preventDefault()),C.scrollbarState.wheeling=!1}}).call(lS,t,!0)}i.attr("transform",function(C){return Bv(C.size.l,C.size.t)});var l=i.selectAll("."+Ei.cn.scrollBackground).data(Ts.repeat,Ts.keyFun);l.enter().append("rect").classed(Ei.cn.scrollBackground,!0).attr("fill","none"),l.attr("width",function(C){return C.width}).attr("height",function(C){return C.height}),i.each(function(C){ZK.setClipUrl(_l.select(this),e$e(t,C),t)});var u=i.selectAll("."+Ei.cn.yColumn).data(function(C){return C.columns},Ts.keyFun);u.enter().append("g").classed(Ei.cn.yColumn,!0),u.exit().remove(),u.attr("transform",function(C){return Bv(C.x,0)}),n&&u.call(_l.behavior.drag().origin(function(C){var k=_l.select(this);return n$e(k,C,-Ei.uplift),lir(this),C.calcdata.columnDragInProgress=!0,lS(i.filter(function(S){return C.calcdata.key===S.key}),t),C}).on("drag",function(C){var k=_l.select(this),S=function(A){return(C===A?_l.event.x:A.x)+A.columnWidth/2};C.x=Math.max(-Ei.overdrag,Math.min(C.calcdata.width+Ei.overdrag-C.columnWidth,_l.event.x));var L=o$e(u).filter(function(A){return A.calcdata.key===C.calcdata.key}),w=L.sort(function(A,T){return S(A)-S(T)});w.forEach(function(A,T){A.xIndex=T,A.x=C===A?A.x:A.xScale(A)}),u.filter(function(A){return C!==A}).transition().ease(Ei.transitionEase).duration(Ei.transitionDuration).attr("transform",function(A){return Bv(A.x,0)}),k.call(uir).attr("transform",Bv(C.x,-Ei.uplift))}).on("dragend",function(C){var k=_l.select(this),S=C.calcdata;C.x=C.xScale(C),C.calcdata.columnDragInProgress=!1,n$e(k,C,0),_ir(t,S,S.columns.map(function(L){return L.xIndex}))})),u.each(function(C){ZK.setClipUrl(_l.select(this),t$e(t,C),t)});var c=u.selectAll("."+Ei.cn.columnBlock).data(a$e.splitToPanels,Ts.keyFun);c.enter().append("g").classed(Ei.cn.columnBlock,!0).attr("id",function(C){return C.key}),c.style("cursor",function(C){return C.dragHandle?"ew-resize":C.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var f=c.filter(bir),v=c.filter(eJ);n&&v.call(_l.behavior.drag().origin(function(C){return _l.event.stopPropagation(),C}).on("drag",zD(t,i,-1)).on("dragend",function(){})),$K(t,i,f,c),$K(t,i,v,c);var g=i.selectAll("."+Ei.cn.scrollAreaClip).data(Ts.repeat,Ts.keyFun);g.enter().append("clipPath").classed(Ei.cn.scrollAreaClip,!0).attr("id",function(C){return e$e(t,C)});var p=g.selectAll("."+Ei.cn.scrollAreaClipRect).data(Ts.repeat,Ts.keyFun);p.enter().append("rect").classed(Ei.cn.scrollAreaClipRect,!0).attr("x",-Ei.overdrag).attr("y",-Ei.uplift).attr("fill","none"),p.attr("width",function(C){return C.width+2*Ei.overdrag}).attr("height",function(C){return C.height+Ei.uplift});var x=u.selectAll("."+Ei.cn.columnBoundary).data(Ts.repeat,Ts.keyFun);x.enter().append("g").classed(Ei.cn.columnBoundary,!0);var _=u.selectAll("."+Ei.cn.columnBoundaryClippath).data(Ts.repeat,Ts.keyFun);_.enter().append("clipPath").classed(Ei.cn.columnBoundaryClippath,!0),_.attr("id",function(C){return t$e(t,C)});var y=_.selectAll("."+Ei.cn.columnBoundaryRect).data(Ts.repeat,Ts.keyFun);y.enter().append("rect").classed(Ei.cn.columnBoundaryRect,!0).attr("fill","none"),y.attr("width",function(C){return C.columnWidth+2*ID(C)}).attr("height",function(C){return C.calcdata.height+2*ID(C)+Ei.uplift}).attr("x",function(C){return-ID(C)}).attr("y",function(C){return-ID(C)}),tJ(null,v,i)};function ID(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function e$e(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function t$e(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function o$e(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function lS(e,t,r){function n(u){var c=u.rowBlocks;return JK(c,c.length-1)+(c.length?qD(c[c.length-1],1/0):1)}var a=e.selectAll("."+Ei.cn.scrollbarKit).data(Ts.repeat,Ts.keyFun);a.enter().append("g").classed(Ei.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),a.each(function(u){var c=u.scrollbarState;c.totalHeight=n(u),c.scrollableAreaHeight=u.groupHeight-KK(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Ei.goldenRatio*Ei.scrollbarWidth),c.barWiggleRoom=c.currentlyVisibleHeight-c.barLength,c.wiggleRoom=Math.max(0,c.totalHeight-c.scrollableAreaHeight),c.topY=c.barWiggleRoom===0?0:u.scrollY/c.wiggleRoom*c.barWiggleRoom,c.bottomY=c.topY+c.barLength,c.dragMultiplier=c.wiggleRoom/c.barWiggleRoom}).attr("transform",function(u){var c=u.width+Ei.scrollbarWidth/2+Ei.scrollbarOffset;return Bv(c,KK(u))});var i=a.selectAll("."+Ei.cn.scrollbar).data(Ts.repeat,Ts.keyFun);i.enter().append("g").classed(Ei.cn.scrollbar,!0);var o=i.selectAll("."+Ei.cn.scrollbarSlider).data(Ts.repeat,Ts.keyFun);o.enter().append("g").classed(Ei.cn.scrollbarSlider,!0),o.attr("transform",function(u){return Bv(0,u.scrollbarState.topY||0)});var s=o.selectAll("."+Ei.cn.scrollbarGlyph).data(Ts.repeat,Ts.keyFun);s.enter().append("line").classed(Ei.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Ei.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Ei.scrollbarWidth/2),s.attr("y2",function(u){return u.scrollbarState.barLength-Ei.scrollbarWidth/2}).attr("stroke-opacity",function(u){return u.columnDragInProgress||!u.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Ei.scrollbarHideDelay).duration(Ei.scrollbarHideDuration).attr("stroke-opacity",0);var l=i.selectAll("."+Ei.cn.scrollbarCaptureZone).data(Ts.repeat,Ts.keyFun);l.enter().append("line").classed(Ei.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Ei.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(u){var c=_l.event.y,f=this.getBoundingClientRect(),v=u.scrollbarState,g=c-f.top,p=_l.scale.linear().domain([0,v.scrollableAreaHeight]).range([0,v.totalHeight]).clamp(!0);v.topY<=g&&g<=v.bottomY||zD(t,e,null,p(g-v.barLength/2))(u)}).call(_l.behavior.drag().origin(function(u){return _l.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on("drag",zD(t,e)).on("dragend",function(){})),l.attr("y2",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function $K(e,t,r,n){var a=fir(r),i=hir(a);gir(i);var o=dir(i);yir(o);var s=pir(i),l=vir(s);mir(l),s$e(l,t,n,e),rJ(i)}function fir(e){var t=e.selectAll("."+Ei.cn.columnCells).data(Ts.repeat,Ts.keyFun);return t.enter().append("g").classed(Ei.cn.columnCells,!0),t.exit().remove(),t}function hir(e){var t=e.selectAll("."+Ei.cn.columnCell).data(a$e.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ei.cn.columnCell,!0),t.exit().remove(),t}function dir(e){var t=e.selectAll("."+Ei.cn.cellRect).data(Ts.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Ei.cn.cellRect,!0),t}function vir(e){var t=e.selectAll("."+Ei.cn.cellText).data(Ts.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Ei.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){_l.event.stopPropagation()}),t}function pir(e){var t=e.selectAll("."+Ei.cn.cellTextHolder).data(Ts.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ei.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function gir(e){e.each(function(t,r){var n=t.calcdata.cells.font,a=t.column.specIndex,i={size:hd(n.size,a,r),color:hd(n.color,a,r),family:hd(n.family,a,r),weight:hd(n.weight,a,r),style:hd(n.style,a,r),variant:hd(n.variant,a,r),textcase:hd(n.textcase,a,r),lineposition:hd(n.lineposition,a,r),shadow:hd(n.shadow,a,r)};t.rowNumber=t.key,t.align=hd(t.calcdata.cells.align,a,r),t.cellBorderWidth=hd(t.calcdata.cells.line.width,a,r),t.font=i})}function mir(e){e.each(function(t){ZK.font(_l.select(this),t.font)})}function yir(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=_l.select(this);QZe.stroke(r,hd(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),QZe.fill(r,hd(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function s$e(e,t,r,n){e.text(function(a){var i=a.column.specIndex,o=a.rowNumber,s=a.value,l=typeof s=="string",u=l&&s.match(/
/i),c=!l||u;a.mayHaveMarkup=l&&s.match(/[<&>]/);var f=xir(s);a.latex=f;var v=f?"":hd(a.calcdata.cells.prefix,i,o)||"",g=f?"":hd(a.calcdata.cells.suffix,i,o)||"",p=f?null:hd(a.calcdata.cells.format,i,o)||null,x=v+(p?oir(p)(a.value):a.value)+g,_;a.wrappingNeeded=!a.wrapped&&!c&&!f&&(_=r$e(x)),a.cellHeightMayIncrease=u||f||a.mayHaveMarkup||(_===void 0?r$e(x):_),a.needsConvertToTspans=a.mayHaveMarkup||a.wrappingNeeded||a.latex;var y;if(a.wrappingNeeded){var C=Ei.wrapSplitCharacter===" "?x.replace(/a&&n.push(i),a+=l}return n}function tJ(e,t,r){var n=o$e(t)[0];if(n!==void 0){var a=n.rowBlocks,i=n.calcdata,o=JK(a,a.length),s=n.calcdata.groupHeight-KK(n),l=i.scrollY=Math.max(0,Math.min(o-s,i.scrollY)),u=wir(a,l,s);u.length===1&&(u[0]===a.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),t.each(function(c,f){c.page=u[f],c.scrollY=l}),t.attr("transform",function(c){var f=JK(c.rowBlocks,c.page)-c.scrollY;return Bv(0,f)}),e&&(i$e(e,r,t,u,n.prevPages,n,0),i$e(e,r,t,u,n.prevPages,n,1),lS(r,e))}}function zD(e,t,r,n){return function(i){var o=i.calcdata?i.calcdata:i,s=t.filter(function(f){return o.key===f.key}),l=r||o.scrollbarState.dragMultiplier,u=o.scrollY;o.scrollY=n===void 0?o.scrollY+l*_l.event.dy:n;var c=s.selectAll("."+Ei.cn.yColumn).selectAll("."+Ei.cn.columnBlock).filter(eJ);return tJ(e,c,s),o.scrollY===u}}function i$e(e,t,r,n,a,i,o){var s=n[o]!==a[o];s&&(clearTimeout(i.currentRepaint[o]),i.currentRepaint[o]=setTimeout(function(){var l=r.filter(function(u,c){return c===o&&n[c]!==a[c]});$K(e,t,l,r),a[o]=n[o]}))}function Tir(e,t,r,n){return function(){var i=_l.select(t.parentNode);i.each(function(o){var s=o.fragments;i.selectAll("tspan.line").each(function(x,_){s[_].width=this.getComputedTextLength()});var l=s[s.length-1].width,u=s.slice(0,-1),c=[],f,v,g=0,p=o.column.columnWidth-2*Ei.cellPad;for(o.value="";u.length;)f=u.shift(),v=f.width+l,g+v>p&&(o.value+=c.join(Ei.wrapSpacer)+Ei.lineBreaker,c=[],g=0),c.push(f.text),g+=v;g&&(o.value+=c.join(Ei.wrapSpacer)),o.wrapped=!0}),i.selectAll("tspan.line").remove(),s$e(i.select("."+Ei.cn.cellText),r,e,n),_l.select(t.parentNode.parentNode).call(rJ)}}function Air(e,t,r,n,a){return function(){if(!a.settledY){var o=_l.select(t.parentNode),s=QK(a),l=a.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=a.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Ei.cellPad:u,f=Math.max(c,u),v=f-s.rows[l].rowHeight;v&&(s.rows[l].rowHeight=f,e.selectAll("."+Ei.cn.columnCell).call(rJ),tJ(null,e.filter(eJ),0),lS(r,n,!0)),o.attr("transform",function(){var g=this,p=g.parentNode,x=p.getBoundingClientRect(),_=_l.select(g.parentNode).select("."+Ei.cn.cellRect).node().getBoundingClientRect(),y=g.transform.baseVal.consolidate(),C=_.top-x.top+(y?y.matrix.f:Ei.cellPad);return Bv(l$e(a,_l.select(g.parentNode).select("."+Ei.cn.cellTextHolder).node().getBoundingClientRect().width),C)}),a.settledY=!0}}}function l$e(e,t){switch(e.align){case"left":return Ei.cellPad;case"right":return e.column.columnWidth-(t||0)-Ei.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Ei.cellPad}}function rJ(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+qD(s,1/0)},0),n=QK(t),a=qD(n,t.key),i=a+r;return Bv(0,i)}).selectAll("."+Ei.cn.cellRect).attr("height",function(t){return Sir(QK(t),t.key).rowHeight})}function JK(e,t){for(var r=0,n=t-1;n>=0;n--)r+=Mir(e[n]);return r}function qD(e,t){for(var r=0,n=0;n{"use strict";var Eir=jf().getModuleCalcData,kir=nJ(),BD="table";OD.name=BD;OD.plot=function(e){var t=Eir(e.calcdata,BD)[0];t.length&&kir(e,t)};OD.clean=function(e,t,r,n){var a=n._has&&n._has(BD),i=t._has&&t._has(BD);a&&!i&&n._paperdiv.selectAll(".table").remove()}});var h$e=fe((RMr,f$e)=>{"use strict";f$e.exports={attributes:UK(),supplyDefaults:OZe(),calc:UZe(),plot:nJ(),moduleType:"trace",name:"table",basePlotModule:c$e(),categories:["noOpacity"],meta:{}}});var v$e=fe((IMr,d$e)=>{"use strict";d$e.exports=h$e()});var x$e=fe((zMr,y$e)=>{"use strict";var p$e=Ds(),g$e=tc(),iJ=pf(),Cir=pl().descriptionWithDates,Lir=rl().overrideAll,m$e=Uc().dash,aJ=ta().extendFlat;y$e.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:p$e({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:iJ.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:aJ({},iJ.labelalias,{editType:"calc"}),tickfont:p$e({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:Cir("tick label")},tickformatstops:Lir(iJ.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:g$e.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:aJ({},m$e,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:aJ({},m$e,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:g$e.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}});var UD=fe((qMr,w$e)=>{"use strict";var Pir=Ds(),_$e=x$e(),b$e=tc(),ND=Pir({editType:"calc"}),Fir=Ol().zorder;ND.family.dflt='"Open Sans", verdana, arial, sans-serif';ND.size.dflt=12;ND.color.dflt=b$e.defaultLine;w$e.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:_$e,baxis:_$e,font:ND,color:{valType:"color",dflt:b$e.defaultLine,editType:"plot"},zorder:Fir}});var M$e=fe((BMr,A$e)=>{"use strict";var T$e=Xt().isArray1D;A$e.exports=function(t,r,n){var a=n("x"),i=a&&a.length,o=n("y"),s=o&&o.length;if(!i&&!s)return!1;if(r._cheater=!a,(!i||T$e(a))&&(!s||T$e(o))){var l=i?a.length:1/0;s&&(l=Math.min(l,o.length)),r.a&&r.a.length&&(l=Math.min(l,r.a.length)),r.b&&r.b.length&&(l=Math.min(l,r.b.length)),r._length=l}else r._length=null;return!0}});var k$e=fe((OMr,E$e)=>{"use strict";var Dir=UD(),S$e=ni().addOpacity,Rir=bi(),uS=Xt(),Iir=Fx(),zir=gm(),qir=mm(),Bir=dC(),Oir=Hp(),Nir=Yb();E$e.exports=function(t,r,n){var a=n.letter,i=n.font||{},o=Dir[a+"axis"];function s(m,F){return uS.coerce(t,r,o,m,F)}function l(m,F){return uS.coerce2(t,r,o,m,F)}n.name&&(r._name=n.name,r._id=n.name),s("autotypenumbers",n.autotypenumbersDflt);var u=s("type");if(u==="-"&&(n.data&&Uir(r,n.data),r.type==="-"?r.type="linear":u=t.type=r.type),s("smoothing"),s("cheatertype"),s("showticklabels"),s("labelprefix",a+" = "),s("labelsuffix"),s("showtickprefix"),s("showticksuffix"),s("separatethousands"),s("tickformat"),s("exponentformat"),s("minexponent"),s("showexponent"),s("categoryorder"),s("tickmode"),s("tickvals"),s("ticktext"),s("tick0"),s("dtick"),r.tickmode==="array"&&(s("arraytick0"),s("arraydtick")),s("labelpadding"),r._hovertitle=a,u==="date"){var c=Rir.getComponentMethod("calendars","handleDefaults");c(t,r,"calendar",n.calendar)}Oir(r,n.fullLayout),r.c2p=uS.identity;var f=s("color",n.dfltColor),v=f===t.color?f:i.color,g=s("title.text");g&&(uS.coerceFont(s,"title.font",i,{overrideDflt:{size:uS.bigFont(i.size),color:v}}),s("title.offset")),s("tickangle");var p=s("autorange",!r.isValidRange(t.range));p&&s("rangemode"),s("range"),r.cleanRange(),s("fixedrange"),Iir(t,r,s,u),qir(t,r,s,u,n),zir(t,r,s,u,n),Bir(t,r,s,{data:n.data,dataAttr:a});var x=s("gridcolor",S$e(f,.3)),_=l("gridwidth"),y=l("griddash"),C=s("showgrid");C||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var k=l("startlinecolor",f),S=l("startlinewidth",_),L=s("startline",r.showgrid||!!k||!!S);L||(delete r.startlinecolor,delete r.startlinewidth);var w=l("endlinecolor",f),A=l("endlinewidth",_),T=s("endline",r.showgrid||!!w||!!A);return T||(delete r.endlinecolor,delete r.endlinewidth),C?(s("minorgridcount"),s("minorgridwidth",_),s("minorgriddash",y),s("minorgridcolor",S$e(x,.06)),r.minorgridcount||(delete r.minorgridwidth,delete r.minorgriddash,delete r.minorgridcolor)):(delete r.gridcolor,delete r.gridwidth,delete r.griddash),r.showticklabels==="none"&&(delete r.tickfont,delete r.tickangle,delete r.showexponent,delete r.exponentformat,delete r.minexponent,delete r.tickformat,delete r.showticksuffix,delete r.showtickprefix),r.showticksuffix||delete r.ticksuffix,r.showtickprefix||delete r.tickprefix,s("tickmode"),r};function Uir(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),a=n+"calendar",i=e[a];e.type=Nir(t,i,{autotypenumbers:e.autotypenumbers})}}});var L$e=fe((NMr,C$e)=>{"use strict";var Vir=k$e(),Gir=Mo();C$e.exports=function(t,r,n,a,i){var o=a("a");o||(a("da"),a("a0"));var s=a("b");s||(a("db"),a("b0")),Hir(t,r,n,i)};function Hir(e,t,r,n){var a=["aaxis","baxis"];a.forEach(function(i){var o=i.charAt(0),s=e[i]||{},l=Gir.newContainer(t,i),u={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:i,data:e[o],calendar:t.calendar,dfltColor:n,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};Vir(s,l,u),l._categories=l._categories||[],!e[i]&&s.type!=="-"&&(e[i]={type:s.type})})}});var D$e=fe((UMr,F$e)=>{"use strict";var P$e=Xt(),jir=M$e(),Wir=L$e(),Yir=UD(),Xir=tc();F$e.exports=function(t,r,n,a){function i(l,u){return P$e.coerce(t,r,Yir,l,u)}r._clipPathId="clip"+r.uid+"carpet";var o=i("color",Xir.defaultLine);if(P$e.coerceFont(i,"font",a.font),i("carpet"),Wir(t,r,a,i,o),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var s=jir(t,r,i);s||(r.visible=!1),r._cheater&&i("cheaterslope"),i("zorder")}});var oJ=fe((VMr,R$e)=>{"use strict";var Zir=Xt().isArrayOrTypedArray;R$e.exports=function(t,r,n){var a;for(Zir(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],a=0;a{"use strict";I$e.exports=function(t,r,n){if(t.length===0)return"";var a,i=[],o=n?3:1;for(a=0;a{"use strict";z$e.exports=function(t,r,n,a,i,o){var s=i[0]*t.dpdx(r),l=i[1]*t.dpdy(n),u=1,c=1;if(o){var f=Math.sqrt(i[0]*i[0]+i[1]*i[1]),v=Math.sqrt(o[0]*o[0]+o[1]*o[1]),g=(i[0]*o[0]+i[1]*o[1])/f/v;c=Math.max(0,g)}var p=Math.atan2(l,s)*180/Math.PI;return p<-90?(p+=180,u=-u):p>90&&(p-=180,u=-u),{angle:p,flip:u,p:t.c2p(a,r,n),offsetMultplier:c}}});var j$e=fe((jMr,H$e)=>{"use strict";var jD=xi(),VD=ea(),GD=oJ(),N$e=sJ(),cS=q$e(),lJ=as(),v0=Xt(),U$e=v0.strRotate,HD=v0.strTranslate,V$e=nc();H$e.exports=function(t,r,n,a){var i=t._context.staticPlot,o=r.xaxis,s=r.yaxis,l=t._fullLayout,u=l._clips;v0.makeTraceGroups(a,n,"trace").each(function(c){var f=jD.select(this),v=c[0],g=v.trace,p=g.aaxis,x=g.baxis,_=v0.ensureSingle(f,"g","minorlayer"),y=v0.ensureSingle(f,"g","majorlayer"),C=v0.ensureSingle(f,"g","boundarylayer"),k=v0.ensureSingle(f,"g","labellayer");f.style("opacity",g.opacity),N5(o,s,y,p,"a",p._gridlines,!0,i),N5(o,s,y,x,"b",x._gridlines,!0,i),N5(o,s,_,p,"a",p._minorgridlines,!0,i),N5(o,s,_,x,"b",x._minorgridlines,!0,i),N5(o,s,C,p,"a-boundary",p._boundarylines,i),N5(o,s,C,x,"b-boundary",x._boundarylines,i);var S=B$e(t,o,s,g,v,k,p._labels,"a-label"),L=B$e(t,o,s,g,v,k,x._labels,"b-label");Kir(t,k,g,v,o,s,S,L),$ir(g,v,u,o,s)})};function $ir(e,t,r,n,a){var i,o,s,l,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var c=v0.ensureSingle(u,"path","carpetboundary"),f=t.clipsegments,v=[];for(l=0;l0?"start":"end","data-notex":1}).call(VD.font,f.font).text(f.text).call(lJ.convertToTspans,e),y=VD.bBox(this);_.attr("transform",HD(g.p[0],g.p[1])+U$e(g.angle)+HD(f.axis.labelpadding*x,y.height*.3)),u=Math.max(u,y.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function Kir(e,t,r,n,a,i,o,s){var l,u,c,f,v=v0.aggNums(Math.min,null,r.a),g=v0.aggNums(Math.max,null,r.a),p=v0.aggNums(Math.min,null,r.b),x=v0.aggNums(Math.max,null,r.b);l=.5*(v+g),u=p,c=r.ab2xy(l,u,!0),f=r.dxyda_rough(l,u),o.angle===void 0&&v0.extendFlat(o,cS(r,a,i,c,r.dxydb_rough(l,u))),O$e(e,t,r,n,c,f,r.aaxis,a,i,o,"a-title"),l=v,u=.5*(p+x),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&v0.extendFlat(s,cS(r,a,i,c,r.dxyda_rough(l,u))),O$e(e,t,r,n,c,f,r.baxis,a,i,s,"b-title")}var G$e=V$e.LINE_SPACING,Jir=(1-V$e.MID_SHIFT)/G$e+1;function O$e(e,t,r,n,a,i,o,s,l,u,c){var f=[];o.title.text&&f.push(o.title.text);var v=t.selectAll("text."+c).data(f),g=u.maxExtent;v.enter().append("text").classed(c,!0),v.each(function(){var p=cS(r,s,l,a,i);["start","both"].indexOf(o.showticklabels)===-1&&(g=0);var x=o.title.font.size;g+=x+o.title.offset;var _=u.angle+(u.flip<0?180:0),y=(_-p.angle+450)%360,C=y>90&&y<270,k=jD.select(this);k.text(o.title.text).call(lJ.convertToTspans,e),C&&(g=(-lJ.lineCount(k)+Jir)*G$e*x-g),k.attr("transform",HD(p.p[0],p.p[1])+U$e(p.angle)+HD(0,g)).attr("text-anchor","middle").call(VD.font,o.title.font)}),v.exit().remove()}});var Y$e=fe((WMr,W$e)=>{"use strict";var WD=Xt().isArrayOrTypedArray;W$e.exports=function(e,t,r){var n,a,i,o,s,l,u=[],c=WD(e)?e.length:e,f=WD(t)?t.length:t,v=WD(e)?e:null,g=WD(t)?t:null;v&&(i=(v.length-1)/(v[v.length-1]-v[0])/(c-1)),g&&(o=(g.length-1)/(g[g.length-1]-g[0])/(f-1));var p,x=1/0,_=-1/0;for(a=0;a{"use strict";var X$e=Xt().isArrayOrTypedArray;$$e.exports=function(e){return Z$e(e,0)};function Z$e(e,t){if(!X$e(e)||t>=10)return null;for(var r=1/0,n=-1/0,a=e.length,i=0;i{"use strict";var Qir=Yi(),Gy=ta().extendFlat;J$e.exports=function(t,r,n){var a,i,o,s,l,u,c,f,v,g,p,x,_,y,C=t["_"+r],k=t[r+"axis"],S=k._gridlines=[],L=k._minorgridlines=[],w=k._boundarylines=[],A=t["_"+n],T=t[n+"axis"];k.tickmode==="array"&&(k.tickvals=C.slice());var m=t._xctrl,F=t._yctrl,E=m[0].length,I=m.length,R=t._a.length,B=t._b.length;Qir.prepTicks(k),k.tickmode==="array"&&delete k.tickvals;var O=k.smoothing?3:1;function V(q){var U,J,ee,ce,ye,xe,ue,K,_e,ne,ae,pe,ie=[],le=[],me={};if(r==="b")for(J=t.b2j(q),ee=Math.floor(Math.max(0,Math.min(B-2,J))),ce=J-ee,me.length=B,me.crossLength=R,me.xy=function(be){return t.evalxy([],be,J)},me.dxy=function(be,De){return t.dxydi([],be,ee,De,ce)},U=0;U0&&(_e=t.dxydi([],U-1,ee,0,ce),ie.push(ye[0]+_e[0]/3),le.push(ye[1]+_e[1]/3),ne=t.dxydi([],U-1,ee,1,ce),ie.push(K[0]-ne[0]/3),le.push(K[1]-ne[1]/3)),ie.push(K[0]),le.push(K[1]),ye=K;else for(U=t.a2i(q),xe=Math.floor(Math.max(0,Math.min(R-2,U))),ue=U-xe,me.length=R,me.crossLength=B,me.xy=function(be){return t.evalxy([],U,be)},me.dxy=function(be,De){return t.dxydj([],xe,be,ue,De)},J=0;J0&&(ae=t.dxydj([],xe,J-1,ue,0),ie.push(ye[0]+ae[0]/3),le.push(ye[1]+ae[1]/3),pe=t.dxydj([],xe,J-1,ue,1),ie.push(K[0]-pe[0]/3),le.push(K[1]-pe[1]/3)),ie.push(K[0]),le.push(K[1]),ye=K;return me.axisLetter=r,me.axis=k,me.crossAxis=T,me.value=q,me.constvar=n,me.index=f,me.x=ie,me.y=le,me.smoothing=T.smoothing,me}function j(q){var U,J,ee,ce,ye,xe=[],ue=[],K={};if(K.length=C.length,K.crossLength=A.length,r==="b")for(ee=Math.max(0,Math.min(B-2,q)),ye=Math.min(1,Math.max(0,q-ee)),K.xy=function(_e){return t.evalxy([],_e,q)},K.dxy=function(_e,ne){return t.dxydi([],_e,ee,ne,ye)},U=0;UC.length-1)&&S.push(Gy(j(i),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(f=u;fC.length-1)&&!(p<0||p>C.length-1))for(x=C[o],_=C[p],a=0;aC[C.length-1])&&L.push(Gy(V(g),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash})));k.startline&&w.push(Gy(j(0),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&w.push(Gy(j(C.length-1),{color:k.endlinecolor,width:k.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((C[C.length-1]-k.tick0)/k.dtick*(1+s)),Math.ceil((C[0]-k.tick0)/k.dtick/(1+s))].sort(function(q,U){return q-U}),u=l[0],c=l[1],f=u;f<=c;f++)v=k.tick0+k.dtick*f,S.push(Gy(V(v),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(f=u-1;fC[C.length-1])&&L.push(Gy(V(g),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash}));k.startline&&w.push(Gy(V(C[0]),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&w.push(Gy(V(C[C.length-1]),{color:k.endlinecolor,width:k.endlinewidth}))}}});var nKe=fe((ZMr,rKe)=>{"use strict";var eKe=Yi(),tKe=ta().extendFlat;rKe.exports=function(t,r){var n,a,i,o,s,l=r._labels=[],u=r._gridlines;for(n=0;n{"use strict";iKe.exports=function(t,r,n,a){var i,o,s,l=[],u=!!n.smoothing,c=!!a.smoothing,f=t[0].length-1,v=t.length-1;for(i=0,o=[],s=[];i<=f;i++)o[i]=t[0][i],s[i]=r[0][i];for(l.push({x:o,y:s,bicubic:u}),i=0,o=[],s=[];i<=v;i++)o[i]=t[i][f],s[i]=r[i][f];for(l.push({x:o,y:s,bicubic:c}),i=f,o=[],s=[];i>=0;i--)o[f-i]=t[v][i],s[f-i]=r[v][i];for(l.push({x:o,y:s,bicubic:u}),i=v,o=[],s=[];i>=0;i--)o[v-i]=t[i][0],s[v-i]=r[i][0];return l.push({x:o,y:s,bicubic:c}),l}});var sKe=fe((KMr,oKe)=>{"use strict";var ear=Xt();oKe.exports=function(t,r,n){var a,i,o,s=[],l=[],u=t[0].length,c=t.length;function f(ee,ce){var ye=0,xe,ue=0;return ee>0&&(xe=t[ce][ee-1])!==void 0&&(ue++,ye+=xe),ee0&&(xe=t[ce-1][ee])!==void 0&&(ue++,ye+=xe),ce0&&i0&&aT);return ear.log("Smoother converged to",m,"after",E,"iterations"),t}});var uKe=fe((JMr,lKe)=>{"use strict";lKe.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var hKe=fe((QMr,fKe)=>{"use strict";var cKe=.5;fKe.exports=function(t,r,n,a){var i=t[0]-r[0],o=t[1]-r[1],s=n[0]-r[0],l=n[1]-r[1],u=Math.pow(i*i+o*o,cKe/2),c=Math.pow(s*s+l*l,cKe/2),f=(c*c*i-u*u*s)*a,v=(c*c*o-u*u*l)*a,g=c*(u+c)*3,p=u*(u+c)*3;return[[r[0]+(g&&f/g),r[1]+(g&&v/g)],[r[0]-(p&&f/p),r[1]-(p&&v/p)]]}});var vKe=fe((eSr,dKe)=>{"use strict";var uJ=hKe(),YD=Xt().ensureArray;function U5(e,t,r){var n=-.5*r[0]+1.5*t[0],a=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*a+e[1])/3]}dKe.exports=function(t,r,n,a,i,o){var s,l,u,c,f,v,g,p,x,_,y=n[0].length,C=n.length,k=i?3*y-2:y,S=o?3*C-2:C;for(t=YD(t,S),r=YD(r,S),u=0;u{"use strict";pKe.exports=function(e,t,r,n,a){var i=t-2,o=r-2;return n&&a?function(s,l,u){s||(s=[]);var c,f,v,g,p,x,_=Math.max(0,Math.min(Math.floor(l),i)),y=Math.max(0,Math.min(Math.floor(u),o)),C=Math.max(0,Math.min(1,l-_)),k=Math.max(0,Math.min(1,u-y));_*=3,y*=3;var S=C*C,L=S*C,w=1-C,A=w*w,T=A*w,m=k*k,F=m*k,E=1-k,I=E*E,R=I*E;for(x=0;x{"use strict";mKe.exports=function(e,t,r){return t&&r?function(n,a,i,o,s){n||(n=[]);var l,u,c,f,v,g;a*=3,i*=3;var p=o*o,x=1-o,_=x*x,y=x*o*2,C=-3*_,k=3*(_-y),S=3*(y-p),L=3*p,w=s*s,A=w*s,T=1-s,m=T*T,F=m*T;for(g=0;g{"use strict";xKe.exports=function(e,t,r){return t&&r?function(n,a,i,o,s){n||(n=[]);var l,u,c,f,v,g;a*=3,i*=3;var p=o*o,x=p*o,_=1-o,y=_*_,C=y*_,k=s*s,S=1-s,L=S*S,w=S*s*2,A=-3*L,T=3*(L-w),m=3*(w-k),F=3*k;for(g=0;g{"use strict";var bKe=uKe(),wKe=VE().findBin,tar=vKe(),rar=gKe(),nar=yKe(),iar=_Ke();TKe.exports=function(t){var r=t._a,n=t._b,a=r.length,i=n.length,o=t.aaxis,s=t.baxis,l=r[0],u=r[a-1],c=n[0],f=n[i-1],v=r[r.length-1]-r[0],g=n[n.length-1]-n[0],p=v*bKe.RELATIVE_CULL_TOLERANCE,x=g*bKe.RELATIVE_CULL_TOLERANCE;l-=p,u+=p,c-=x,f+=x,t.isVisible=function(_,y){return _>l&&_c&&yu||yf},t.setScale=function(){var _=t._x,y=t._y,C=tar(t._xctrl,t._yctrl,_,y,o.smoothing,s.smoothing);t._xctrl=C[0],t._yctrl=C[1],t.evalxy=rar([t._xctrl,t._yctrl],a,i,o.smoothing,s.smoothing),t.dxydi=nar([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=iar([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(_){var y=Math.max(0,Math.floor(_[0]),a-2),C=_[0]-y;return(1-C)*r[y]+C*r[y+1]},t.j2b=function(_){var y=Math.max(0,Math.floor(_[1]),a-2),C=_[1]-y;return(1-C)*n[y]+C*n[y+1]},t.ij2ab=function(_){return[t.i2a(_[0]),t.j2b(_[1])]},t.a2i=function(_){var y=Math.max(0,Math.min(wKe(_,r),a-2)),C=r[y],k=r[y+1];return Math.max(0,Math.min(a-1,y+(_-C)/(k-C)))},t.b2j=function(_){var y=Math.max(0,Math.min(wKe(_,n),i-2)),C=n[y],k=n[y+1];return Math.max(0,Math.min(i-1,y+(_-C)/(k-C)))},t.ab2ij=function(_){return[t.a2i(_[0]),t.b2j(_[1])]},t.i2c=function(_,y){return t.evalxy([],_,y)},t.ab2xy=function(_,y,C){if(!C&&(_r[a-1]|yn[i-1]))return[!1,!1];var k=t.a2i(_),S=t.b2j(y),L=t.evalxy([],k,S);if(C){var w=0,A=0,T=[],m,F,E,I;_r[a-1]?(m=a-2,F=1,w=(_-r[a-1])/(r[a-1]-r[a-2])):(m=Math.max(0,Math.min(a-2,Math.floor(k))),F=k-m),yn[i-1]?(E=i-2,I=1,A=(y-n[i-1])/(n[i-1]-n[i-2])):(E=Math.max(0,Math.min(i-2,Math.floor(S))),I=S-E),w&&(t.dxydi(T,m,E,F,I),L[0]+=T[0]*w,L[1]+=T[1]*w),A&&(t.dxydj(T,m,E,F,I),L[0]+=T[0]*A,L[1]+=T[1]*A)}return L},t.c2p=function(_,y,C){return[y.c2p(_[0]),C.c2p(_[1])]},t.p2x=function(_,y,C){return[y.p2c(_[0]),C.p2c(_[1])]},t.dadi=function(_){var y=Math.max(0,Math.min(r.length-2,_));return r[y+1]-r[y]},t.dbdj=function(_){var y=Math.max(0,Math.min(n.length-2,_));return n[y+1]-n[y]},t.dxyda=function(_,y,C,k){var S=t.dxydi(null,_,y,C,k),L=t.dadi(_,C);return[S[0]/L,S[1]/L]},t.dxydb=function(_,y,C,k){var S=t.dxydj(null,_,y,C,k),L=t.dbdj(y,k);return[S[0]/L,S[1]/L]},t.dxyda_rough=function(_,y,C){var k=v*(C||.1),S=t.ab2xy(_+k,y,!0),L=t.ab2xy(_-k,y,!0);return[(S[0]-L[0])*.5/k,(S[1]-L[1])*.5/k]},t.dxydb_rough=function(_,y,C){var k=g*(C||.1),S=t.ab2xy(_,y+k,!0),L=t.ab2xy(_,y-k,!0);return[(S[0]-L[0])*.5/k,(S[1]-L[1])*.5/k]},t.dpdx=function(_){return _._m},t.dpdy=function(_){return _._m}}});var FKe=fe((aSr,PKe)=>{"use strict";var XD=Yi(),MKe=Xt().isArray1D,aar=Y$e(),SKe=K$e(),EKe=Q$e(),kKe=nKe(),oar=aKe(),CKe=h7(),LKe=sKe(),sar=c7(),lar=AKe();PKe.exports=function(t,r){var n=XD.getFromId(t,r.xaxis),a=XD.getFromId(t,r.yaxis),i=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&MKe(s)&&u.push("x"),l&&MKe(l)&&u.push("y"),u.length&&sar(r,i,o,"a","b",u);var c=r._a=r._a||r.a,f=r._b=r._b||r.b;s=r._x||r.x,l=r._y||r.y;var v={};if(r._cheater){var g=i.cheatertype==="index"?c.length:c,p=o.cheatertype==="index"?f.length:f;s=aar(g,p,r.cheaterslope)}r._x=s=CKe(s),r._y=l=CKe(l),LKe(s,c,f),LKe(l,c,f),lar(r),r.setScale();var x=SKe(s),_=SKe(l),y=.5*(x[1]-x[0]),C=.5*(x[1]+x[0]),k=.5*(_[1]-_[0]),S=.5*(_[1]+_[0]),L=1.3;return x=[C-y*L,C+y*L],_=[S-k*L,S+k*L],r._extremes[n._id]=XD.findExtremes(n,x,{padded:!0}),r._extremes[a._id]=XD.findExtremes(a,_,{padded:!0}),EKe(r,"a","b"),EKe(r,"b","a"),kKe(r,i),kKe(r,o),v.clipsegments=oar(r._xctrl,r._yctrl,i,o),v.x=s,v.y=l,v.a=c,v.b=f,[v]}});var RKe=fe((oSr,DKe)=>{"use strict";DKe.exports={attributes:UD(),supplyDefaults:D$e(),plot:j$e(),calc:FKe(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:gu(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var zKe=fe((sSr,IKe)=>{"use strict";IKe.exports=RKe()});var cJ=fe((lSr,NKe)=>{"use strict";var uar=n1(),G0=Ol(),car=Ho(),{hovertemplateAttrs:far,texttemplateAttrs:har,templatefallbackAttrs:qKe}=Oo(),BKe=_s(),Hy=ta().extendFlat,Ov=G0.marker,V5=G0.line,OKe=Ov.line;NKe.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:Hy({},G0.mode,{dflt:"markers"}),text:Hy({},G0.text,{}),texttemplate:har({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:qKe({editType:"plot"}),hovertext:Hy({},G0.hovertext,{}),line:{color:V5.color,width:V5.width,dash:V5.dash,backoff:V5.backoff,shape:Hy({},V5.shape,{values:["linear","spline"]}),smoothing:V5.smoothing,editType:"calc"},connectgaps:G0.connectgaps,fill:Hy({},G0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:uar(),marker:Hy({symbol:Ov.symbol,opacity:Ov.opacity,maxdisplayed:Ov.maxdisplayed,angle:Ov.angle,angleref:Ov.angleref,standoff:Ov.standoff,size:Ov.size,sizeref:Ov.sizeref,sizemin:Ov.sizemin,sizemode:Ov.sizemode,line:Hy({width:OKe.width,dash:OKe.dash,editType:"calc"},BKe("marker.line")),gradient:Ov.gradient,editType:"calc"},BKe("marker")),textfont:G0.textfont,textposition:G0.textposition,selected:G0.selected,unselected:G0.unselected,hoverinfo:Hy({},car.hoverinfo,{flags:["a","b","text","name"]}),hoveron:G0.hoveron,hovertemplate:far(),hovertemplatefallback:qKe(),zorder:G0.zorder}});var HKe=fe((uSr,GKe)=>{"use strict";var UKe=Xt(),dar=r1(),G5=Is(),par=vv(),gar=lp(),VKe=f3(),mar=up(),yar=a1(),xar=cJ();GKe.exports=function(t,r,n,a){function i(v,g){return UKe.coerce(t,r,xar,v,g)}i("carpet"),r.xaxis="x",r.yaxis="y";var o=i("a"),s=i("b"),l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,i("text"),i("texttemplate"),i("texttemplatefallback"),i("hovertext");var u=l{"use strict";jKe.exports=function(t,r){var n={},a=r._carpet,i=a.ab2ij([t.a,t.b]),o=Math.floor(i[0]),s=i[0]-o,l=Math.floor(i[1]),u=i[1]-l,c=a.evalxy([],o,l,s,u);return n.yLabel=c[1].toFixed(3),n}});var ZD=fe((fSr,YKe)=>{"use strict";YKe.exports=function(e,t){for(var r=e._fullData.length,n,a=0;a{"use strict";var XKe=aa(),_ar=pv(),bar=o1(),war=P0(),Tar=gv().calcMarkerSize,Aar=ZD();ZKe.exports=function(t,r){var n=r._carpetTrace=Aar(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){var a;r.xaxis=n.xaxis,r.yaxis=n.yaxis;var i=r._length,o=new Array(i),s,l,u=!1;for(a=0;a{"use strict";var Mar=m3(),KKe=Yi(),Sar=ea();JKe.exports=function(t,r,n,a){var i,o,s,l=n[0][0].carpet,u=KKe.getFromId(t,l.xaxis||"x"),c=KKe.getFromId(t,l.yaxis||"y"),f={xaxis:u,yaxis:c,plot:r.plot};for(i=0;i{"use strict";var Ear=b3(),kar=Xt().fillText;eJe.exports=function(t,r,n,a){var i=Ear(t,r,n,a);if(!i||i[0].index===!1)return;var o=i[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),i}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var v=o.trace,g=v._carpet,p=v._module.formatLabels(f,v);o.yLabel=p.yLabel,delete o.text;var x=[];function _(k,S){var L;k.labelprefix&&k.labelprefix.length>0?L=k.labelprefix.replace(/ = $/,""):L=k._hovertitle,x.push(L+": "+S.toFixed(3)+k.labelsuffix)}if(!v.hovertemplate){var y=f.hi||v.hoverinfo,C=y.split("+");C.indexOf("all")!==-1&&(C=["a","b","text"]),C.indexOf("a")!==-1&&_(g.aaxis,f.a),C.indexOf("b")!==-1&&_(g.baxis,f.b),x.push("y: "+o.yLabel),C.indexOf("text")!==-1&&kar(f,v,x),o.extraText=x.join("
")}return i}});var nJe=fe((pSr,rJe)=>{"use strict";rJe.exports=function(t,r,n,a,i){var o=a[i];return t.a=o.a,t.b=o.b,t.y=o.y,t}});var aJe=fe((gSr,iJe)=>{"use strict";iJe.exports={attributes:cJ(),supplyDefaults:HKe(),colorbar:Zf(),formatLabels:WKe(),calc:$Ke(),plot:QKe(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:tJe(),selectPoints:a2(),eventData:nJe(),moduleType:"trace",name:"scattercarpet",basePlotModule:gu(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var sJe=fe((mSr,oJe)=>{"use strict";oJe.exports=aJe()});var fJ=fe((ySr,lJe)=>{"use strict";var Nv=O3(),Ng=NA(),Car=_s(),Lar=ta().extendFlat,z1=Ng.contours;lJe.exports=Lar({carpet:{valType:"string",editType:"calc"},z:Nv.z,a:Nv.x,a0:Nv.x0,da:Nv.dx,b:Nv.y,b0:Nv.y0,db:Nv.dy,text:Nv.text,hovertext:Nv.hovertext,transpose:Nv.transpose,atype:Nv.xtype,btype:Nv.ytype,fillcolor:Ng.fillcolor,autocontour:Ng.autocontour,ncontours:Ng.ncontours,contours:{type:z1.type,start:z1.start,end:z1.end,size:z1.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:z1.showlines,showlabels:z1.showlabels,labelfont:z1.labelfont,labelformat:z1.labelformat,operation:z1.operation,value:z1.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:Ng.line.color,width:Ng.line.width,dash:Ng.line.dash,smoothing:Ng.line.smoothing,editType:"plot"},zorder:Ng.zorder},Car("",{cLetter:"z",autoColorDflt:!1}))});var hJ=fe((xSr,fJe)=>{"use strict";var uJe=Xt(),Par=s7(),cJe=fJ(),Far=EG(),Dar=P7(),Rar=F7();fJe.exports=function(t,r,n,a){function i(u,c){return uJe.coerce(t,r,cJe,u,c)}function o(u){return uJe.coerce2(t,r,cJe,u)}if(i("carpet"),t.a&&t.b){var s=Par(t,r,i,a,"a","b");if(!s){r.visible=!1;return}i("text");var l=i("contours.type")==="constraint";l?Far(t,r,i,a,n,{hasHover:!1}):(Dar(t,r,i,o),Rar(t,r,i,a,{hasHover:!1}))}else r._defaultColor=n,r._length=null;i("zorder")}});var pJe=fe((_Sr,vJe)=>{"use strict";var Iar=Mh(),hJe=Xt(),zar=c7(),qar=h7(),Bar=d7(),Oar=v7(),dJe=$V(),Nar=hJ(),Uar=ZD(),Var=pG();vJe.exports=function(t,r){var n=r._carpetTrace=Uar(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){if(!r.a||!r.b){var a=t.data[n.index],i=t.data[r.index];i.a||(i.a=a.a),i.b||(i.b=a.b),Nar(i,r,r._defaultColor,t._fullLayout)}var o=Gar(t,r);return Var(r,r._z),o}};function Gar(e,t){var r=t._carpetTrace,n=r.aaxis,a=r.baxis,i,o,s,l,u,c,f;n._minDtick=0,a._minDtick=0,hJe.isArray1D(t.z)&&zar(t,n,a,"a","b",["z"]),i=t._a=t._a||t.a,l=t._b=t._b||t.b,i=i?n.makeCalcdata(t,"_a"):[],l=l?a.makeCalcdata(t,"_b"):[],o=t.a0||0,s=t.da||1,u=t.b0||0,c=t.db||1,f=t._z=qar(t._z||t.z,t.transpose),t._emptypoints=Oar(f),Bar(f,t._emptypoints);var v=hJe.maxRowLength(f),g=t.xtype==="scaled"?"":i,p=dJe(t,g,o,s,v,n),x=t.ytype==="scaled"?"":l,_=dJe(t,x,u,c,f.length,a),y={a:p,b:_,z:f};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&Iar(e,t,{vals:f,containerStr:"",cLetter:"z"}),[y]}});var mJe=fe((bSr,gJe)=>{"use strict";var Har=Xt().isArrayOrTypedArray;gJe.exports=function(e,t,r,n){var a,i,o,s,l,u,c,f,v,g,p,x,_,y=Har(r)?"a":"b",C=y==="a"?e.aaxis:e.baxis,k=C.smoothing,S=y==="a"?e.a2i:e.b2j,L=y==="a"?r:n,w=y==="a"?n:r,A=y==="a"?t.a.length:t.b.length,T=y==="a"?t.b.length:t.a.length,m=Math.floor(y==="a"?e.b2j(w):e.a2i(w)),F=y==="a"?function(ce){return e.evalxy([],ce,m)}:function(ce){return e.evalxy([],m,ce)};k&&(o=Math.max(0,Math.min(T-2,m)),s=m-o,i=y==="a"?function(ce,ye){return e.dxydi([],ce,o,ye,s)}:function(ce,ye){return e.dxydj([],o,ce,s,ye)});var E=S(L[0]),I=S(L[1]),R=E0?Math.floor:Math.ceil,V=R>0?Math.ceil:Math.floor,j=R>0?Math.min:Math.max,q=R>0?Math.max:Math.min,U=O(E+B),J=V(I-B);c=F(E);var ee=[[c]];for(a=U;a*R{"use strict";var KD=xi(),JD=oJ(),wJe=sJ(),fS=ea(),Ug=Xt(),jar=mG(),War=yG(),M_=I7(),$D=VA(),Yar=wG(),Xar=bG(),Zar=TG(),$ar=ZD(),yJe=mJe();TJe.exports=function(t,r,n,a){var i=r.xaxis,o=r.yaxis;Ug.makeTraceGroups(a,n,"contour").each(function(s){var l=KD.select(this),u=s[0],c=u.trace,f=c._carpetTrace=$ar(t,c),v=t.calcdata[f.index][0];if(!f.visible||f.visible==="legendonly")return;var g=u.a,p=u.b,x=c.contours,_=Xar(x,r,u),y=x.type==="constraint",C=x._operation,k=y?C==="="?"lines":"fill":x.coloring;function S(O){var V=f.ab2xy(O[0],O[1],!0);return[i.c2p(V[0]),o.c2p(V[1])]}var L=[[g[0],p[p.length-1]],[g[g.length-1],p[p.length-1]],[g[g.length-1],p[0]],[g[0],p[0]]];jar(_);var w=(g[g.length-1]-g[0])*1e-8,A=(p[p.length-1]-p[0])*1e-8;War(_,w,A);var T=_;x.type==="constraint"&&(T=Yar(_,C)),Kar(_,S);var m,F,E,I,R=[];for(I=v.clipsegments.length-1;I>=0;I--)m=v.clipsegments[I],F=JD([],m.x,i.c2p),E=JD([],m.y,o.c2p),F.reverse(),E.reverse(),R.push(wJe(F,E,m.bicubic));var B="M"+R.join("L")+"Z";eor(l,v.clipsegments,i,o,y,k),tor(c,l,i,o,T,L,S,f,v,k,B),Jar(l,_,t,u,x,r,f),fS.setClipUrl(l,f._clipPathId,t)})};function Kar(e,t){var r,n,a,i,o,s,l,u,c;for(r=0;r_&&(n.max=_),n.len=n.max-n.min}function xJe(e,t,r){var n=e.getPointAtLength(t),a=e.getPointAtLength(r),i=a.x-n.x,o=a.y-n.y,s=Math.sqrt(i*i+o*o);return[i/s,o/s]}function _Je(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function bJe(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function eor(e,t,r,n,a,i){var o,s,l,u,c=Ug.ensureSingle(e,"g","contourbg"),f=c.selectAll("path").data(i==="fill"&&!a?[0]:[]);f.enter().append("path"),f.exit().remove();var v=[];for(u=0;u=0&&(g=F,x=_):Math.abs(v[1]-g[1])=0&&(g=F,x=_):Ug.log("endpt to newendpt is not vert. or horz.",v,g,F)}if(x>=0)break;u+=T(v,g),v=g}if(x===t.edgepaths.length){Ug.log("unclosed perimeter path");break}l=x,f=c.indexOf(l)===-1,f&&(l=c[0],u+=T(v,g)+"Z",v=null)}for(l=0;l{"use strict";MJe.exports={attributes:fJ(),supplyDefaults:hJ(),colorbar:B7(),calc:pJe(),plot:AJe(),style:q7(),moduleType:"trace",name:"contourcarpet",basePlotModule:gu(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var kJe=fe((ASr,EJe)=>{"use strict";EJe.exports=SJe()});var eR=fe((MSr,DJe)=>{"use strict";var QD=Xt().extendFlat,hS=Ol(),CJe=pl().axisHoverFormat,{hovertemplateAttrs:nor,templatefallbackAttrs:ior}=Oo(),PJe=Uc().dash,aor=hb(),FJe=tw(),oor=FJe.INCREASING.COLOR,sor=FJe.DECREASING.COLOR,dJ=hS.line;function LJe(e){return{line:{color:QD({},dJ.color,{dflt:e}),width:dJ.width,dash:PJe,editType:"style"},editType:"style"}}DJe.exports={xperiod:hS.xperiod,xperiod0:hS.xperiod0,xperiodalignment:hS.xperiodalignment,xhoverformat:CJe("x"),yhoverformat:CJe("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:QD({},dJ.width,{}),dash:QD({},PJe,{}),editType:"style"},increasing:LJe(oor),decreasing:LJe(sor),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:nor({},{keys:["open","high","low","close"]}),hovertemplatefallback:ior(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:QD({},aor.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:hS.zorder}});var vJ=fe((SSr,RJe)=>{"use strict";var lor=bi(),uor=Xt();RJe.exports=function(t,r,n,a){var i=n("x"),o=n("open"),s=n("high"),l=n("low"),u=n("close");n("hoverlabel.split");var c=lor.getComponentMethod("calendars","handleTraceDefaults");if(c(t,r,["x"],a),!!(o&&s&&l&&u)){var f=Math.min(o.length,s.length,l.length,u.length);return i&&(f=Math.min(f,uor.minRowLength(i))),r._length=f,f}}});var qJe=fe((ESr,zJe)=>{"use strict";var cor=Xt(),hor=vJ(),dor=sp(),vor=eR();zJe.exports=function(t,r,n,a){function i(s,l){return cor.coerce(t,r,vor,s,l)}var o=hor(t,r,i,a);if(!o){r.visible=!1;return}dor(t,r,a,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),i("line.dash"),IJe(t,r,i,"increasing"),IJe(t,r,i,"decreasing"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("tickwidth"),a._requestRangeslider[r.xaxis]=!0,i("zorder")};function IJe(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}});var pJ=fe((kSr,OJe)=>{"use strict";var H5=Xt(),tR=H5._,rR=Yi(),por=cp(),dS=Wa().BADNUM;function gor(e,t){var r=rR.getFromId(e,t.xaxis),n=rR.getFromId(e,t.yaxis),a=yor(e,r,t),i=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var l=BJe(e,t,o,s,n,mor);return t._extremes[r._id]=rR.findExtremes(r,s,{vpad:i/2}),l.length?(H5.extendFlat(l[0].t,{wHover:i/2,tickLen:a}),l):[{t:{empty:!0}}]}function mor(e,t,r,n){return{o:e,h:t,l:r,c:n}}function BJe(e,t,r,n,a,i){for(var o=a.makeCalcdata(t,"open"),s=a.makeCalcdata(t,"high"),l=a.makeCalcdata(t,"low"),u=a.makeCalcdata(t,"close"),c=H5.isArrayOrTypedArray(t.text),f=H5.isArrayOrTypedArray(t.hovertext),v=!0,g=null,p=!!t.xperiodalignment,x=[],_=0;_g):v=L>C,g=L;var w=i(C,k,S,L);w.pos=y,w.yc=(C+L)/2,w.i=_,w.dir=v?"increasing":"decreasing",w.x=w.pos,w.y=[S,k],p&&(w.orig_p=r[_]),c&&(w.tx=t.text[_]),f&&(w.htx=t.hovertext[_]),x.push(w)}else x.push({pos:y,empty:!0})}return t._extremes[a._id]=rR.findExtremes(a,H5.concat(l,s),{padded:!0}),x.length&&(x[0].t={labels:{open:tR(e,"open:")+" ",high:tR(e,"high:")+" ",low:tR(e,"low:")+" ",close:tR(e,"close:")+" "}}),x}function yor(e,t,r){var n=r._minDiff;if(!n){var a=e._fullData,i=[];n=1/0;var o;for(o=0;o{"use strict";var xor=xi(),NJe=Xt();UJe.exports=function(t,r,n,a){var i=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;NJe.makeTraceGroups(a,n,"trace ohlc").each(function(l){var u=xor.select(this),c=l[0],f=c.t,v=c.trace;if(v.visible!==!0||f.empty){u.remove();return}var g=f.tickLen,p=u.selectAll("path").data(NJe.identity);p.enter().append("path"),p.exit().remove(),p.attr("d",function(x){if(x.empty)return"M0,0Z";var _=o.c2p(x.pos-g,!0),y=o.c2p(x.pos+g,!0),C=s?(_+y)/2:o.c2p(x.pos,!0),k=i.c2p(x.o,!0),S=i.c2p(x.h,!0),L=i.c2p(x.l,!0),w=i.c2p(x.c,!0);return"M"+_+","+k+"H"+C+"M"+C+","+S+"V"+L+"M"+y+","+w+"H"+C})})}});var HJe=fe((LSr,GJe)=>{"use strict";var gJ=xi(),_or=ea(),bor=ni();GJe.exports=function(t,r,n){var a=n||gJ.select(t).selectAll("g.ohlclayer").selectAll("g.trace");a.style("opacity",function(i){return i[0].trace.opacity}),a.each(function(i){var o=i[0].trace;gJ.select(this).selectAll("path").each(function(s){if(!s.empty){var l=o[s.dir].line;gJ.select(this).style("fill","none").call(bor.stroke,l.color).call(_or.dashLine,l.dash,l.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var yJ=fe((PSr,ZJe)=>{"use strict";var mJ=Yi(),wor=Xt(),nR=kl(),Tor=ni(),Aor=Xt().fillText,jJe=tw(),Mor={increasing:jJe.INCREASING.SYMBOL,decreasing:jJe.DECREASING.SYMBOL};function Sor(e,t,r,n){var a=e.cd,i=a[0].trace;return i.hoverlabel.split?YJe(e,t,r,n):XJe(e,t,r,n)}function WJe(e,t,r,n){var a=e.cd,i=e.xa,o=a[0].trace,s=a[0].t,l=o.type,u=l==="ohlc"?"l":"min",c=l==="ohlc"?"h":"max",f,v,g=s.bPos||0,p=function(F){return F.pos+g-t},x=s.bdPos||s.tickLen,_=s.wHover,y=Math.min(1,x/Math.abs(i.r2c(i.range[1])-i.r2c(i.range[0])));f=e.maxHoverDistance-y,v=e.maxSpikeDistance-y;function C(F){var E=p(F);return nR.inbox(E-_,E+_,f)}function k(F){var E=F[u],I=F[c];return E===I||nR.inbox(E-r,I-r,f)}function S(F){return(C(F)+k(F))/2}var L=nR.getDistanceFunction(n,C,k,S);if(nR.getClosest(a,L,e),e.index===!1)return null;var w=a[e.index];if(w.empty)return null;var A=w.dir,T=o[A],m=T.line.color;return Tor.opacity(m)&&T.line.width?e.color=m:e.color=T.fillcolor,e.x0=i.c2p(w.pos+g-x,!0),e.x1=i.c2p(w.pos+g+x,!0),e.xLabelVal=w.orig_p!==void 0?w.orig_p:w.pos,e.spikeDistance=S(w)*v/f,e.xSpike=i.c2p(w.pos,!0),e}function YJe(e,t,r,n){var a=e.cd,i=e.ya,o=a[0].trace,s=a[0].t,l=[],u=WJe(e,t,r,n);if(!u)return[];var c=a[u.index],f=c.hi||o.hoverinfo||"";if(f==="none"||f==="skip")return[];for(var v=["high","open","close","low"],g={},p=0;p"+s.labels[x]+mJ.hoverLabelText(i,_,o.yhoverformat)):(C=wor.extendFlat({},u),C.y0=C.y1=y,C.yLabelVal=_,C.yLabel=s.labels[x]+mJ.hoverLabelText(i,_,o.yhoverformat),C.name="",l.push(C),g[_]=C)}return l}function XJe(e,t,r,n){var a=e.cd,i=e.ya,o=a[0].trace,s=a[0].t,l=WJe(e,t,r,n);if(!l)return[];var u=l.index,c=a[u],f=l.index=c.i,v=c.dir;function g(S){return s.labels[S]+mJ.hoverLabelText(i,o[S][f],o.yhoverformat)}var p=c.hi||o.hoverinfo||"",x=p.split("+"),_=p==="all",y=_||x.indexOf("y")!==-1,C=_||x.indexOf("text")!==-1,k=y?[g("open"),g("high"),g("low"),g("close")+" "+Mor[v]]:[];return C&&Aor(c,o,k),l.extraText=k.join("
"),l.y0=l.y1=i.c2p(c.yc,!0),[l]}ZJe.exports={hoverPoints:Sor,hoverSplit:YJe,hoverOnPoints:XJe}});var xJ=fe((FSr,$Je)=>{"use strict";$Je.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s,l=n[0].t.bPos||0;if(r===!1)for(s=0;s{"use strict";KJe.exports={moduleType:"trace",name:"ohlc",basePlotModule:gu(),categories:["cartesian","svg","showLegend"],meta:{},attributes:eR(),supplyDefaults:qJe(),calc:pJ().calc,plot:VJe(),style:HJe(),hoverPoints:yJ().hoverPoints,selectPoints:xJ()}});var eQe=fe((RSr,QJe)=>{"use strict";QJe.exports=JJe()});var bJ=fe((ISr,nQe)=>{"use strict";var _J=Xt().extendFlat,tQe=pl().axisHoverFormat,zd=eR(),j5=PA();function rQe(e){return{line:{color:_J({},j5.line.color,{dflt:e}),width:j5.line.width,editType:"style"},fillcolor:j5.fillcolor,editType:"style"}}nQe.exports={xperiod:zd.xperiod,xperiod0:zd.xperiod0,xperiodalignment:zd.xperiodalignment,xhoverformat:tQe("x"),yhoverformat:tQe("y"),x:zd.x,open:zd.open,high:zd.high,low:zd.low,close:zd.close,line:{width:_J({},j5.line.width,{}),editType:"style"},increasing:rQe(zd.increasing.line.color.dflt),decreasing:rQe(zd.decreasing.line.color.dflt),text:zd.text,hovertext:zd.hovertext,hovertemplate:zd.hovertemplate,hovertemplatefallback:zd.hovertemplatefallback,whiskerwidth:_J({},j5.whiskerwidth,{dflt:0}),hoverlabel:zd.hoverlabel,zorder:j5.zorder}});var oQe=fe((zSr,aQe)=>{"use strict";var Eor=Xt(),kor=ni(),Cor=vJ(),Lor=sp(),Por=bJ();aQe.exports=function(t,r,n,a){function i(s,l){return Eor.coerce(t,r,Por,s,l)}var o=Cor(t,r,i,a);if(!o){r.visible=!1;return}Lor(t,r,a,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),iQe(t,r,i,"increasing"),iQe(t,r,i,"decreasing"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("whiskerwidth"),a._requestRangeslider[r.xaxis]=!0,i("zorder")};function iQe(e,t,r,n){var a=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",kor.addOpacity(a,.5))}});var cQe=fe((qSr,uQe)=>{"use strict";var sQe=Xt(),lQe=Yi(),For=cp(),Dor=pJ().calcCommon;uQe.exports=function(e,t){var r=e._fullLayout,n=lQe.getFromId(e,t.xaxis),a=lQe.getFromId(e,t.yaxis),i=n.makeCalcdata(t,"x"),o=For(t,n,"x",i).vals,s=Dor(e,t,i,o,a,Ror);return s.length?(sQe.extendFlat(s[0].t,{num:r._numBoxes,dPos:sQe.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function Ror(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var hQe=fe((BSr,fQe)=>{"use strict";fQe.exports={moduleType:"trace",name:"candlestick",basePlotModule:gu(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:bJ(),layoutAttributes:FA(),supplyLayoutDefaults:t7().supplyLayoutDefaults,crossTraceCalc:n7().crossTraceCalc,supplyDefaults:oQe(),calc:cQe(),plot:i7().plot,layerName:"boxlayer",style:a7().style,hoverPoints:yJ().hoverPoints,selectPoints:xJ()}});var vQe=fe((OSr,dQe)=>{"use strict";dQe.exports=hQe()});var TJ=fe((NSr,pQe)=>{"use strict";var aR=Xt(),Ior=Hp(),iR=aR.deg2rad,wJ=aR.rad2deg;pQe.exports=function(t,r,n){switch(Ior(t,n),t._id){case"x":case"radialaxis":zor(t,r);break;case"angularaxis":Oor(t,r);break}};function zor(e,t){var r=t._subplot;e.setGeometry=function(){var n=e._rl[0],a=e._rl[1],i=r.innerRadius,o=(r.radius-i)/(a-n),s=i/o,l=n>a?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var c=e.c2l(u)-n;return(l(c)?c:0)+s},e.g2c=function(u){return e.l2c(u+n-s)},e.g2p=function(u){return u*o},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function qor(e,t){return t==="degrees"?iR(e):e}function Bor(e,t){return t==="degrees"?wJ(e):e}function Oor(e,t){var r=e.type;if(r==="linear"){var n=e.d2c,a=e.c2d;e.d2c=function(i,o){return qor(n(i),o)},e.c2d=function(i,o){return a(Bor(i,o))}}e.makeCalcdata=function(i,o){var s=i[o],l=i._length,u,c,f=function(_){return e.d2c(_,i.thetaunit)};if(s)for(u=new Array(l),c=0;c{"use strict";gQe.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}});var lR=fe((VSr,bQe)=>{"use strict";var S_=Xt(),mQe=NT().tester,AJ=S_.findIndexOfMin,xQe=S_.isAngleInsideSector,Nor=S_.angleDelta,yQe=S_.angleDist;function Uor(e,t,r,n,a){if(!xQe(t,n))return!1;var i,o;r[0]0?o:1/0},n=AJ(t,r),a=S_.mod(n+1,t.length);return[t[n],t[a]]}function sR(e){return Math.abs(e)>1e-10?e:0}function MJ(e,t,r){t=t||0,r=r||0;for(var n=e.length,a=new Array(n),i=0;i{"use strict";function wQe(e){return e<0?-1:e>0?1:0}function Y5(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function X5(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function TQe(e,t){return t*e.radius}function Zor(e,t,r,n){var a=X5(e,Y5([r,t])),i=a[0],o=a[1],s=X5(e,Y5([n,t])),l=s[0],u=s[1];if(t===0)return["M"+i+","+o,"L"+l+","+u].join(" ");var c=TQe(e,1/Math.abs(t));return["M"+i+","+o,"A"+c+","+c+" 0 0,"+(t<0?1:0)+" "+l+","+u].join(" ")}function $or(e,t,r,n){var a=TQe(e,1/(t+1)),i=X5(e,Y5([t,r])),o=i[0],s=i[1],l=X5(e,Y5([t,n])),u=l[0],c=l[1];if(wQe(r)!==wQe(n)){var f=X5(e,Y5([t,0])),v=f[0],g=f[1];return["M"+o+","+s,"A"+a+","+a+" 0 0,"+(0{"use strict";var E_=xi(),C_=bi(),ol=Xt(),q1=ol.strRotate,$c=ol.strTranslate,hR=ni(),vS=ea(),Kor=Hs(),qd=Yi(),Jor=Hp(),Qor=TJ(),esr=rp().doAutoRange,Vg=NN(),fR=ed(),MQe=kl(),tsr=qx(),rsr=Ac().prepSelect,nsr=Ac().selectOnClick,EJ=Ac().clearOutline,SQe=np(),EQe=ST(),kQe=RT().redrawReglTraces,isr=nc().MID_SHIFT,jy=oR(),Gg=lR(),dR=SJ(),uR=dR.smith,asr=dR.reactanceArc,osr=dR.resistanceArc,cR=dR.smithTransform,ssr=ol._,CQe=ol.mod,Wy=ol.deg2rad,k_=ol.rad2deg;function LQe(e,t,r){this.isSmith=r||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=e._fullLayout,a="clip"+n._uid+t;this.clipIds.forTraces=a+"-for-traces",this.clipPaths.forTraces=n._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=n["_"+(r?"smith":"polar")+"layer"].append("g").attr("class",t),this.getHole=function(i){return this.isSmith?0:i.hole},this.getSector=function(i){return this.isSmith?[0,360]:i.sector},this.getRadial=function(i){return this.isSmith?i.realaxis:i.radialaxis},this.getAngular=function(i){return this.isSmith?i.imaginaryaxis:i.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var wf=LQe.prototype;DQe.exports=function(t,r,n){return new LQe(t,r,n)};wf.plot=function(e,t){for(var r=this,n=t[r.id],a=!1,i=0;i_?(y=u,C=u*_,L=(c-C)/a.h/2,k=[s[0],s[1]],S=[l[0]+L,l[1]-L]):(y=c/_,C=c,L=(u-y)/a.w/2,k=[s[0]+L,s[1]-L],S=[l[0],l[1]]),r.xLength2=y,r.yLength2=C,r.xDomain2=k,r.yDomain2=S;var w=r.xOffset2=a.l+a.w*k[0],A=r.yOffset2=a.t+a.h*(1-S[1]),T=r.radius=y/g,m=r.innerRadius=r.getHole(t)*T,F=r.cx=w-T*v[0],E=r.cy=A+T*v[3],I=r.cxx=F-w,R=r.cyy=E-A,B=i.side,O;B==="counterclockwise"?(O=B,B="top"):B==="clockwise"&&(O=B,B="bottom"),r.radialAxis=r.mockAxis(e,t,i,{_id:"x",side:B,_trueSide:O,domain:[m/a.w,T/a.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:k}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:S});var V=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",V).attr("transform",$c(I,R)),n.frontplot.attr("transform",$c(w,A)).call(vS.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",V).attr("transform",$c(F,E)).call(hR.fill,t.bgcolor)};wf.mockAxis=function(e,t,r,n){var a=ol.extendFlat({},r,n);return Qor(a,t,e),a};wf.mockCartesianAxis=function(e,t,r){var n=this,a=n.isSmith,i=r._id,o=ol.extendFlat({type:"linear"},r);Jor(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var l=n.sectorBBox,u=s[i],c=n.radialAxis._rl,f=(c[1]-c[0])/(1-n.getHole(t));o.range=[l[u[0]]*f,l[u[1]]*f]},o.isPtWithinRange=i==="x"&&!a?function(l){return n.isPtInside(l)}:function(){return!0},o.setRange(),o.setScale(),o};wf.doAutoRange=function(e,t){var r=this,n=r.gd,a=r.radialAxis,i=r.getRadial(t);esr(n,a);var o=a.range;if(i.range=o.slice(),i._input.range=o.slice(),a._rl=[a.r2l(o[0],null,"gregorian"),a.r2l(o[1],null,"gregorian")],a.minallowed!==void 0){var s=a.r2l(a.minallowed);a._rl[0]>a._rl[1]?a._rl[1]=Math.max(a._rl[1],s):a._rl[0]=Math.max(a._rl[0],s)}if(a.maxallowed!==void 0){var l=a.r2l(a.maxallowed);a._rl[0]90&&c<=270&&(f.tickangle=180);var p=g?function(T){var m=cR(r,uR([T.x,0]));return $c(m[0]-s,m[1]-l)}:function(T){return $c(f.l2p(T.x)+o,0)},x=g?function(T){return osr(r,T.x,-1/0,1/0)}:function(T){return r.pathArc(f.r2p(T.x)+o)},_=PQe(u);if(r.radialTickLayout!==_&&(a["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=_),v){f.setScale();var y=0,C=g?(f.tickvals||[]).filter(function(T){return T>=0}).map(function(T){return qd.tickText(f,T,!0,!1)}):qd.calcTicks(f),k=g?C:qd.clipEnds(f,C),S=qd.getTickSigns(f)[2];g&&((f.ticks==="top"&&f.side==="bottom"||f.ticks==="bottom"&&f.side==="top")&&(S=-S),f.ticks==="top"&&f.side==="top"&&(y=-f.ticklen),f.ticks==="bottom"&&f.side==="bottom"&&(y=f.ticklen)),qd.drawTicks(n,f,{vals:C,layer:a["radial-axis"],path:qd.makeTickPath(f,0,S),transFn:p,crisp:!1}),qd.drawGrid(n,f,{vals:k,layer:a["radial-grid"],path:x,transFn:ol.noop,crisp:!1}),qd.drawLabels(n,f,{vals:C,layer:a["radial-axis"],transFn:p,labelFns:qd.makeLabelFns(f,y)})}var L=r.radialAxisAngle=r.vangles?k_(FQe(Wy(u.angle),r.vangles)):u.angle,w=$c(s,l),A=w+q1(-L);pS(a["radial-axis"],v&&(u.showticklabels||u.ticks),{transform:A}),pS(a["radial-grid"],v&&u.showgrid,{transform:g?"":w}),pS(a["radial-line"].select("line"),v&&u.showline,{x1:g?-i:o,y1:0,x2:i,y2:0,transform:A}).attr("stroke-width",u.linewidth).call(hR.stroke,u.linecolor)};wf.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,a=n.gd,i=n.radius,o=n.cx,s=n.cy,l=n.getRadial(t),u=n.id+"title",c=0;if(l.title){var f=vS.bBox(n.layers["radial-axis"].node()).height,v=l.title.font.size,g=l.side;c=g==="top"?v:g==="counterclockwise"?-(f+v*.4):f+v*.8}var p=r!==void 0?r:n.radialAxisAngle,x=Wy(p),_=Math.cos(x),y=Math.sin(x),C=o+i/2*_+c*y,k=s-i/2*y+c*_;n.layers["radial-axis-title"]=tsr.draw(a,u,{propContainer:l,propName:n.id+".radialaxis.title.text",placeholder:ssr(a,"Click to enter radial axis title"),attributes:{x:C,y:k,"text-anchor":"middle"},transform:{rotate:-p}})}};wf.updateAngularAxis=function(e,t){var r=this,n=r.gd,a=r.layers,i=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getAngular(t),c=r.angularAxis,f=r.isSmith;f||(r.fillViewInitialKey("angularaxis.rotation",u.rotation),c.setGeometry(),c.setScale());var v=f?function(m){var F=cR(r,uR([0,m.x]));return Math.atan2(F[0]-s,F[1]-l)-Math.PI/2}:function(m){return c.t2g(m.x)};c.type==="linear"&&c.thetaunit==="radians"&&(c.tick0=k_(c.tick0),c.dtick=k_(c.dtick));var g=function(m){return $c(s+i*Math.cos(m),l-i*Math.sin(m))},p=f?function(m){var F=cR(r,uR([0,m.x]));return $c(F[0],F[1])}:function(m){return g(v(m))},x=f?function(m){var F=cR(r,uR([0,m.x])),E=Math.atan2(F[0]-s,F[1]-l)-Math.PI/2;return $c(F[0],F[1])+q1(-k_(E))}:function(m){var F=v(m);return g(F)+q1(-k_(F))},_=f?function(m){return asr(r,m.x,0,1/0)}:function(m){var F=v(m),E=Math.cos(F),I=Math.sin(F);return"M"+[s+o*E,l-o*I]+"L"+[s+i*E,l-i*I]},y=qd.makeLabelFns(c,0),C=y.labelStandoff,k={};k.xFn=function(m){var F=v(m);return Math.cos(F)*C},k.yFn=function(m){var F=v(m),E=Math.sin(F)>0?.2:1;return-Math.sin(F)*(C+m.fontSize*E)+Math.abs(Math.cos(F))*(m.fontSize*isr)},k.anchorFn=function(m){var F=v(m),E=Math.cos(F);return Math.abs(E)<.1?"middle":E>0?"start":"end"},k.heightFn=function(m,F,E){var I=v(m);return-.5*(1+Math.sin(I))*E};var S=PQe(u);r.angularTickLayout!==S&&(a["angular-axis"].selectAll("."+c._id+"tick").remove(),r.angularTickLayout=S);var L=f?[1/0].concat(c.tickvals||[]).map(function(m){return qd.tickText(c,m,!0,!1)}):qd.calcTicks(c);f&&(L[0].text="\u221E",L[0].fontSize*=1.75);var w;if(t.gridshape==="linear"?(w=L.map(v),ol.angleDelta(w[0],w[1])<0&&(w=w.slice().reverse())):w=null,r.vangles=w,c.type==="category"&&(L=L.filter(function(m){return ol.isAngleInsideSector(v(m),r.sectorInRad)})),c.visible){var A=c.ticks==="inside"?-1:1,T=(c.linewidth||1)/2;qd.drawTicks(n,c,{vals:L,layer:a["angular-axis"],path:"M"+A*T+",0h"+A*c.ticklen,transFn:x,crisp:!1}),qd.drawGrid(n,c,{vals:L,layer:a["angular-grid"],path:_,transFn:ol.noop,crisp:!1}),qd.drawLabels(n,c,{vals:L,layer:a["angular-axis"],repositionOnUpdate:!0,transFn:p,labelFns:k})}pS(a["angular-line"].select("path"),u.showline,{d:r.pathSubplot(),transform:$c(s,l)}).attr("stroke-width",u.linewidth).call(hR.stroke,u.linecolor)};wf.updateFx=function(e,t){if(!this.gd._context.staticPlot){var r=!this.isSmith;r&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e)}};wf.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,a=t.layers,i=e._zoomlayer,o=jy.MINZOOM,s=jy.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,v=t.cxx,g=t.cyy,p=t.sectorInRad,x=t.vangles,_=t.radialAxis,y=Gg.clampTiny,C=Gg.findXYatLength,k=Gg.findEnclosingVertexAngles,S=jy.cornerHalfWidth,L=jy.cornerLen/2,w,A,T=Vg.makeDragger(a,"path","maindrag",e.dragmode===!1?"none":"crosshair");E_.select(T).attr("d",t.pathSubplot()).attr("transform",$c(c,f)),T.onmousemove=function(be){MQe.hover(n,be,t.id),n._fullLayout._lasthover=T,n._fullLayout._hoversubplot=t.id},T.onmouseout=function(be){n._dragging||fR.unhover(n,be)};var m={element:T,gd:n,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},F,E,I,R,B,O,V,j,q;function U(be,De){return Math.sqrt(be*be+De*De)}function J(be,De){return U(be-v,De-g)}function ee(be,De){return Math.atan2(g-De,be-v)}function ce(be,De){return[be*Math.cos(De),be*Math.sin(-De)]}function ye(be,De){if(be===0)return t.pathSector(2*S);var Ge=L/be,ht=De-Ge,it=De+Ge,Oe=Math.max(0,Math.min(be,l)),ze=Oe-S,ct=Oe+S;return"M"+ce(ze,ht)+"A"+[ze,ze]+" 0,0,0 "+ce(ze,it)+"L"+ce(ct,it)+"A"+[ct,ct]+" 0,0,1 "+ce(ct,ht)+"Z"}function xe(be,De,Ge){if(be===0)return t.pathSector(2*S);var ht=ce(be,De),it=ce(be,Ge),Oe=y((ht[0]+it[0])/2),ze=y((ht[1]+it[1])/2),ct,et;if(Oe&&ze){var qe=ze/Oe,we=-1/qe,Le=C(S,qe,Oe,ze);ct=C(L,we,Le[0][0],Le[0][1]),et=C(L,we,Le[1][0],Le[1][1])}else{var Ke,Te;ze?(Ke=L,Te=S):(Ke=S,Te=L),ct=[[Oe-Ke,ze-Te],[Oe+Ke,ze-Te]],et=[[Oe-Ke,ze+Te],[Oe+Ke,ze+Te]]}return"M"+ct.join("L")+"L"+et.reverse().join("L")+"Z"}function ue(){I=null,R=null,B=t.pathSubplot(),O=!1;var be=n._fullLayout[t.id];V=hR.luminosity(be.bgcolor),j=Vg.makeZoombox(i,V,c,f,B),j.attr("fill-rule","evenodd"),q=Vg.makeCorners(i,c,f),EJ(n)}function K(be,De){return De=Math.max(Math.min(De,l),u),beo?(be-1&&be===1&&nsr(De,n,[t.xaxis],[t.yaxis],t.id,m),Ge.indexOf("event")>-1&&MQe.click(n,De,t.id)}m.prepFn=function(be,De,Ge){var ht=n._fullLayout.dragmode,it=T.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var Oe=n._fullLayout._invTransform;w=n._fullLayout._invScaleX,A=n._fullLayout._invScaleY;var ze=ol.apply3DTransform(Oe)(De-it.left,Ge-it.top);if(F=ze[0],E=ze[1],x){var ct=Gg.findPolygonOffset(l,p[0],p[1],x);F+=v+ct[0],E+=g+ct[1]}switch(ht){case"zoom":m.clickFn=me,r||(x?m.moveFn=pe:m.moveFn=ne,m.doneFn=ie,ue(be,De,Ge));break;case"select":case"lasso":rsr(be,De,Ge,m,ht);break}},fR.init(m)};wf.updateRadialDrag=function(e,t,r){var n=this,a=n.gd,i=n.layers,o=n.radius,s=n.innerRadius,l=n.cx,u=n.cy,c=n.radialAxis,f=jy.radialDragBoxSize,v=f/2;if(!c.visible)return;var g=Wy(n.radialAxisAngle),p=c._rl,x=p[0],_=p[1],y=p[r],C=.75*(p[1]-p[0])/(1-n.getHole(t))/o,k,S,L;r?(k=l+(o+v)*Math.cos(g),S=u-(o+v)*Math.sin(g),L="radialdrag"):(k=l+(s-v)*Math.cos(g),S=u-(s-v)*Math.sin(g),L="radialdrag-inner");var w=Vg.makeRectDragger(i,L,"crosshair",-v,-v,f,f),A={element:w,gd:a};e.dragmode===!1&&(A.dragmode=!1),pS(E_.select(w),c.visible&&s0!=(r?F>x:F<_)){F=null;return}var U=a._fullLayout,J=U[n.id];c.range[r]=F,c._rl[r]=F,n.updateRadialAxis(U,J),n.xaxis.setRange(),n.xaxis.setScale(),n.yaxis.setRange(),n.yaxis.setScale();var ee=!1;for(var ce in n.traceHash){var ye=n.traceHash[ce],xe=ol.filterVisible(ye),ue=ye[0][0].trace._module;ue.plot(a,n,xe,J),C_.traceIs(ce,"gl")&&xe.length&&(ee=!0)}ee&&(EQe(a),kQe(a))}A.prepFn=function(){T=null,m=null,F=null,A.moveFn=E,A.doneFn=R,EJ(a)},A.clampFn=function(V,j){return Math.sqrt(V*V+j*j)=90||a>90&&i>=450?g=1:s<=0&&u<=0?g=0:g=Math.max(s,u),a<=180&&i>=180||a>180&&i>=540?c=-1:o>=0&&l>=0?c=0:c=Math.min(o,l),a<=270&&i>=270||a>270&&i>=630?f=-1:s>=0&&u>=0?f=0:f=Math.min(s,u),i>=360?v=1:o<=0&&l<=0?v=0:v=Math.max(o,l),[c,f,v,g]}function FQe(e,t){var r=function(a){return ol.angleDist(e,a)},n=ol.findIndexOfMin(t,r);return t[n]}function pS(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var CJ=fe((jSr,OQe)=>{"use strict";var usr=tc(),Ea=pf(),csr=nl().attributes,H0=Xt().extendFlat,RQe=rl().overrideAll,IQe=RQe({color:Ea.color,showline:H0({},Ea.showline,{dflt:!0}),linecolor:Ea.linecolor,linewidth:Ea.linewidth,showgrid:H0({},Ea.showgrid,{dflt:!0}),gridcolor:Ea.gridcolor,gridwidth:Ea.gridwidth,griddash:Ea.griddash},"plot","from-root"),zQe=RQe({tickmode:Ea.minor.tickmode,nticks:Ea.nticks,tick0:Ea.tick0,dtick:Ea.dtick,tickvals:Ea.tickvals,ticktext:Ea.ticktext,ticks:Ea.ticks,ticklen:Ea.ticklen,tickwidth:Ea.tickwidth,tickcolor:Ea.tickcolor,ticklabelstep:Ea.ticklabelstep,showticklabels:Ea.showticklabels,labelalias:Ea.labelalias,minorloglabels:Ea.minorloglabels,showtickprefix:Ea.showtickprefix,tickprefix:Ea.tickprefix,showticksuffix:Ea.showticksuffix,ticksuffix:Ea.ticksuffix,showexponent:Ea.showexponent,exponentformat:Ea.exponentformat,minexponent:Ea.minexponent,separatethousands:Ea.separatethousands,tickfont:Ea.tickfont,tickangle:Ea.tickangle,tickformat:Ea.tickformat,tickformatstops:Ea.tickformatstops,layer:Ea.layer},"plot","from-root"),qQe={visible:H0({},Ea.visible,{dflt:!0}),type:H0({},Ea.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Ea.autotypenumbers,autorangeoptions:{minallowed:Ea.autorangeoptions.minallowed,maxallowed:Ea.autorangeoptions.maxallowed,clipmin:Ea.autorangeoptions.clipmin,clipmax:Ea.autorangeoptions.clipmax,include:Ea.autorangeoptions.include,editType:"plot"},autorange:H0({},Ea.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:H0({},Ea.minallowed,{editType:"plot"}),maxallowed:H0({},Ea.maxallowed,{editType:"plot"}),range:H0({},Ea.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:Ea.categoryorder,categoryarray:Ea.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:Ea.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:H0({},Ea.title.text,{editType:"plot",dflt:""}),font:H0({},Ea.title.font,{editType:"plot"}),editType:"plot"},hoverformat:Ea.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};H0(qQe,IQe,zQe);var BQe={visible:H0({},Ea.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:Ea.autotypenumbers,categoryorder:Ea.categoryorder,categoryarray:Ea.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:Ea.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};H0(BQe,IQe,zQe);OQe.exports={domain:csr({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:usr.background},radialaxis:qQe,angularaxis:BQe,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var GQe=fe((WSr,VQe)=>{"use strict";var vR=Xt(),fsr=ni(),hsr=Mo(),dsr=b2(),vsr=jf().getSubplotData,psr=Fx(),gsr=Ub(),msr=gm(),ysr=mm(),xsr=dC(),_sr=hA(),bsr=pO(),wsr=Yb(),UQe=CJ(),Tsr=TJ(),pR=oR(),NQe=pR.axisNames;function Asr(e,t,r,n){var a=r("bgcolor");n.bgColor=fsr.combine(a,n.paper_bgcolor);var i=r("sector");r("hole");var o=vsr(n.fullData,pR.name,n.id),s=n.layoutOut,l;function u(j,q){return r(l+"."+j,q)}for(var c=0;c{"use strict";var Ssr=jf().getSubplotCalcData,Esr=Xt().counterRegex,ksr=kJ(),jQe=oR(),WQe=jQe.attr,L_=jQe.name,HQe=Esr(L_),YQe={};YQe[WQe]={valType:"subplotid",dflt:L_,editType:"calc"};function Csr(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[L_],a=0;a{"use strict";var{hovertemplateAttrs:Psr,texttemplateAttrs:Fsr,templatefallbackAttrs:ZQe}=Oo(),mR=ta().extendFlat,Dsr=n1(),j0=Ol(),Rsr=Ho(),Z5=j0.line;$Qe.exports={mode:j0.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:j0.text,texttemplate:Fsr({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:ZQe({editType:"plot"}),hovertext:j0.hovertext,line:{color:Z5.color,width:Z5.width,dash:Z5.dash,backoff:Z5.backoff,shape:mR({},Z5.shape,{values:["linear","spline"]}),smoothing:Z5.smoothing,editType:"calc"},connectgaps:j0.connectgaps,marker:j0.marker,cliponaxis:mR({},j0.cliponaxis,{dflt:!1}),textposition:j0.textposition,textfont:j0.textfont,fill:mR({},j0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:Dsr(),hoverinfo:mR({},Rsr.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:j0.hoveron,hovertemplate:Psr(),hovertemplatefallback:ZQe(),selected:j0.selected,unselected:j0.unselected}});var xR=fe((ZSr,QQe)=>{"use strict";var yR=Xt(),$5=Is(),Isr=vv(),zsr=lp(),KQe=f3(),qsr=up(),Bsr=a1(),Osr=r1().PTS_LINESONLY,Nsr=gS();function Usr(e,t,r,n){function a(s,l){return yR.coerce(e,t,Nsr,s,l)}var i=JQe(e,t,n,a);if(!i){t.visible=!1;return}a("thetaunit"),a("mode",i{"use strict";var Vsr=Xt(),eet=Yi();tet.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot,o,s;i?(o=i.radialAxis,s=i.angularAxis):(i=n[r.subplot],o=i.radialaxis,s=i.angularaxis);var l=o.c2l(t.r);a.rLabel=eet.tickText(o,l,!0).text;var u=s.thetaunit==="degrees"?Vsr.rad2deg(t.theta):t.theta;return a.thetaLabel=eet.tickText(s,u,!0).text,a}});var iet=fe((KSr,net)=>{"use strict";var ret=aa(),Gsr=Wa().BADNUM,Hsr=Yi(),jsr=pv(),Wsr=o1(),Ysr=P0(),Xsr=gv().calcMarkerSize;net.exports=function(t,r){for(var n=t._fullLayout,a=r.subplot,i=n[a].radialaxis,o=n[a].angularaxis,s=i.makeCalcdata(r,"r"),l=o.makeCalcdata(r,"theta"),u=r._length,c=new Array(u),f=0;f{"use strict";var Zsr=m3(),aet=Wa().BADNUM;oet.exports=function(t,r,n){for(var a=r.layers.frontplot.select("g.scatterlayer"),i=r.xaxis,o=r.yaxis,s={xaxis:i,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=r.radialAxis,u=r.angularAxis,c=0;c{"use strict";var $sr=b3();function Ksr(e,t,r,n){var a=$sr(e,t,r,n);if(!(!a||a[0].index===!1)){var i=a[0];if(i.index===void 0)return a;var o=e.subplot,s=i.cd[i.index],l=i.trace;if(o.isPtInside(s))return i.xLabelVal=void 0,i.yLabelVal=void 0,uet(s,l,o,i),i.hovertemplate=l.hovertemplate,a}}function uet(e,t,r,n){var a=r.radialAxis,i=r.angularAxis;a._hovertitle="r",i._hovertitle="\u03B8";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.rLabel=s.rLabel,n.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,u=[];function c(v,g){u.push(v._hovertitle+": "+g)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["r","theta","text"]),f.indexOf("r")!==-1&&c(a,n.rLabel),f.indexOf("theta")!==-1&&c(i,n.thetaLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}cet.exports={hoverPoints:Ksr,makeHoverPointText:uet}});var het=fe((eEr,fet)=>{"use strict";fet.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:gR(),categories:["polar","symbols","showLegend","scatter-like"],attributes:gS(),supplyDefaults:xR().supplyDefaults,colorbar:Zf(),formatLabels:_R(),calc:iet(),plot:set(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:bR().hoverPoints,selectPoints:a2(),meta:{}}});var vet=fe((tEr,det)=>{"use strict";det.exports=het()});var LJ=fe((iEr,get)=>{"use strict";var pet=gS(),{cliponaxis:rEr,hoveron:nEr}=pet,Jsr=Ete(pet,["cliponaxis","hoveron"]),{connectgaps:Qsr,line:{color:elr,dash:tlr,width:rlr},fill:nlr,fillcolor:ilr,marker:alr,textfont:olr,textposition:slr}=mM();get.exports=tl(zo({},Jsr),{connectgaps:Qsr,fill:nlr,fillcolor:ilr,line:{color:elr,dash:tlr,editType:"calc",width:rlr},marker:alr,textfont:olr,textposition:slr})});var xet=fe((oEr,yet)=>{"use strict";var met=Xt(),PJ=Is(),llr=xR().handleRThetaDefaults,ulr=vv(),clr=lp(),flr=up(),hlr=a1(),dlr=r1().PTS_LINESONLY,vlr=LJ();yet.exports=function(t,r,n,a){function i(s,l){return met.coerce(t,r,vlr,s,l)}var o=llr(t,r,a,i);if(!o){r.visible=!1;return}i("thetaunit"),i("mode",o{"use strict";var plr=_R();_et.exports=function(t,r,n){var a=t.i;return"r"in t||(t.r=r._r[a]),"theta"in t||(t.theta=r._theta[a]),plr(t,r,n)}});var Tet=fe((lEr,wet)=>{"use strict";var glr=pv(),mlr=gv().calcMarkerSize,ylr=f_(),xlr=Yi(),_lr=Ty().TOO_MANY_POINTS;wet.exports=function(t,r){var n=t._fullLayout,a=r.subplot,i=n[a].radialaxis,o=n[a].angularaxis,s=r._r=i.makeCalcdata(r,"r"),l=r._theta=o.makeCalcdata(r,"theta"),u=r._length,c={};u{"use strict";var blr=KP(),wlr=bR().makeHoverPointText;function Tlr(e,t,r,n){var a=e.cd,i=a[0].t,o=i.r,s=i.theta,l=blr.hoverPoints(e,t,r,n);if(!(!l||l[0].index===!1)){var u=l[0];if(u.index===void 0)return l;var c=e.subplot,f=u.cd[u.index],v=u.trace;if(f.r=o[u.index],f.theta=s[u.index],!!c.isPtInside(f))return u.xLabelVal=void 0,u.yLabelVal=void 0,wlr(f,v,c,u),l}}Aet.exports={hoverPoints:Tlr}});var ket=fe((cEr,Eet)=>{"use strict";Eet.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:gR(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:LJ(),supplyDefaults:xet(),colorbar:Zf(),formatLabels:bet(),calc:Tet(),hoverPoints:Met().hoverPoints,selectPoints:mZ(),meta:{}}});var Cet=fe((fEr,FJ)=>{"use strict";var Alr=tF(),Mlr=aa(),Slr=x$(),Elr=vZ(),wR=f_(),TR=Xt(),klr=Ty().TOO_MANY_POINTS,Clr={};FJ.exports=function(t,r,n){if(n.length){var a=r.radialAxis,i=r.angularAxis,o=Elr(t,r);return n.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var l=s[0],u=l.trace,c=l.t,f=u._length,v=c.r,g=c.theta,p=c.opts,x,_=v.slice(),y=g.slice();for(x=0;x=klr&&(p.marker.cluster=c.tree),p.marker&&(p.markerSel.positions=p.markerUnsel.positions=p.marker.positions=C),p.line&&C.length>1&&TR.extendFlat(p.line,wR.linePositions(t,u,C)),p.text&&(TR.extendFlat(p.text,{positions:C},wR.textPosition(t,u,p.text,p.marker)),TR.extendFlat(p.textSel,{positions:C},wR.textPosition(t,u,p.text,p.markerSel)),TR.extendFlat(p.textUnsel,{positions:C},wR.textPosition(t,u,p.text,p.markerUnsel))),p.fill&&!o.fill2d&&(o.fill2d=!0),p.marker&&!o.scatter2d&&(o.scatter2d=!0),p.line&&!o.line2d&&(o.line2d=!0),p.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(p.line),o.fillOptions.push(p.fill),o.markerOptions.push(p.marker),o.markerSelectedOptions.push(p.markerSel),o.markerUnselectedOptions.push(p.markerUnsel),o.textOptions.push(p.text),o.textSelectedOptions.push(p.textSel),o.textUnselectedOptions.push(p.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),c.x=k,c.y=S,c.rawx=k,c.rawy=S,c.r=v,c.theta=g,c.positions=C,c._scene=o,c.index=o.count,o.count++}}),Slr(t,r,n)}};FJ.exports.reglPrecompiled=Clr});var Fet=fe((hEr,Pet)=>{"use strict";var Let=ket();Let.plot=Cet();Pet.exports=Let});var Ret=fe((dEr,Det)=>{"use strict";Det.exports=Fet()});var DJ=fe((vEr,Iet)=>{"use strict";var{hovertemplateAttrs:Llr,templatefallbackAttrs:Plr}=Oo(),K5=ta().extendFlat,Yy=gS(),Xy=u1();Iet.exports={r:Yy.r,theta:Yy.theta,r0:Yy.r0,dr:Yy.dr,theta0:Yy.theta0,dtheta:Yy.dtheta,thetaunit:Yy.thetaunit,base:K5({},Xy.base,{}),offset:K5({},Xy.offset,{}),width:K5({},Xy.width,{}),text:K5({},Xy.text,{}),hovertext:K5({},Xy.hovertext,{}),marker:Flr(),hoverinfo:Yy.hoverinfo,hovertemplate:Llr(),hovertemplatefallback:Plr(),selected:Xy.selected,unselected:Xy.unselected};function Flr(){var e=K5({},Xy.marker);return delete e.cornerradius,e}});var RJ=fe((pEr,zet)=>{"use strict";zet.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var Oet=fe((gEr,Bet)=>{"use strict";var qet=Xt(),Dlr=xR().handleRThetaDefaults,Rlr=ZC(),Ilr=DJ();Bet.exports=function(t,r,n,a){function i(s,l){return qet.coerce(t,r,Ilr,s,l)}var o=Dlr(t,r,a,i);if(!o){r.visible=!1;return}i("thetaunit"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),Rlr(t,r,i,n,a),qet.coerceSelectionMarkerOpacity(r,i)}});var Uet=fe((mEr,Net)=>{"use strict";var zlr=Xt(),qlr=RJ();Net.exports=function(e,t,r){var n={},a;function i(l,u){return zlr.coerce(e[a]||{},t[a],qlr,l,u)}for(var o=0;o{"use strict";var Vet=Wf().hasColorscale,Get=Mh(),Blr=Xt().isArrayOrTypedArray,Olr=EA(),Nlr=i2().setGroupPositions,Ulr=P0(),Vlr=bi().traceIs,Glr=Xt().extendFlat;function Hlr(e,t){for(var r=e._fullLayout,n=t.subplot,a=r[n].radialaxis,i=r[n].angularaxis,o=a.makeCalcdata(t,"r"),s=i.makeCalcdata(t,"theta"),l=t._length,u=new Array(l),c=o,f=s,v=0;v{"use strict";var jet=xi(),AR=aa(),J5=Xt(),Wlr=ea(),zJ=lR();Wet.exports=function(t,r,n){var a=t._context.staticPlot,i=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=Ylr(r),c=r.layers.frontplot.select("g.barlayer");J5.makeTraceGroups(c,n,"trace bars").each(function(){var f=jet.select(this),v=J5.ensureSingle(f,"g","points"),g=v.selectAll("g.point").data(J5.identity);g.enter().append("g").style("vector-effect",a?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),g.exit().remove(),g.each(function(p){var x=jet.select(this),_=p.rp0=s.c2p(p.s0),y=p.rp1=s.c2p(p.s1),C=p.thetag0=l.c2g(p.p0),k=p.thetag1=l.c2g(p.p1),S;if(!AR(_)||!AR(y)||!AR(C)||!AR(k)||_===y||C===k)S="M0,0Z";else{var L=s.c2g(p.s1),w=(C+k)/2;p.ct=[i.c2p(L*Math.cos(w)),o.c2p(L*Math.sin(w))],S=u(_,y,C,k)}J5.ensureSingle(x,"path").attr("d",S)}),Wlr.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function Ylr(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,a,i,o){var s,l;J5.angleDelta(i,o)>0?(s=i,l=o):(s=o,l=i);var u=zJ.findEnclosingVertexAngles(s,e.vangles)[0],c=zJ.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return zJ.pathPolygonAnnulus(n,a,s,l,f,t,r)}:function(n,a,i,o){return J5.pathAnnulus(n,a,i,o,t,r)}}});var Zet=fe((_Er,Xet)=>{"use strict";var Xlr=kl(),qJ=Xt(),Zlr=I3().getTraceColor,$lr=qJ.fillText,Klr=bR().makeHoverPointText,Jlr=lR().isPtInsidePolygon;Xet.exports=function(t,r,n){var a=t.cd,i=a[0].trace,o=t.subplot,s=o.radialAxis,l=o.angularAxis,u=o.vangles,c=u?Jlr:qJ.isPtInsideSector,f=t.maxHoverDistance,v=l._period||2*Math.PI,g=Math.abs(s.g2p(Math.sqrt(r*r+n*n))),p=Math.atan2(n,r);s.range[0]>s.range[1]&&(p+=Math.PI);var x=function(k){return c(g,p,[k.rp0,k.rp1],[k.thetag0,k.thetag1],u)?f+Math.min(1,Math.abs(k.thetag1-k.thetag0)/v)-1+(k.rp1-g)/(k.rp1-k.rp0)-1:1/0};if(Xlr.getClosest(a,x,t),t.index!==!1){var _=t.index,y=a[_];t.x0=t.x1=y.ct[0],t.y0=t.y1=y.ct[1];var C=qJ.extendFlat({},y,{r:y.s,theta:y.p});return $lr(y,i,t),Klr(C,i,o,t),t.hovertemplate=i.hovertemplate,t.color=Zlr(i,y),t.xLabelVal=t.yLabelVal=void 0,y.s<0&&(t.idealAlign="left"),[t]}}});var Ket=fe((bEr,$et)=>{"use strict";$et.exports={moduleType:"trace",name:"barpolar",basePlotModule:gR(),categories:["polar","bar","showLegend"],attributes:DJ(),layoutAttributes:RJ(),supplyDefaults:Oet(),supplyLayoutDefaults:Uet(),calc:IJ().calc,crossTraceCalc:IJ().crossTraceCalc,plot:Yet(),colorbar:Zf(),formatLabels:_R(),style:_v().style,styleOnSelect:_v().styleOnSelect,hoverPoints:Zet(),selectPoints:z3(),meta:{}}});var Qet=fe((wEr,Jet)=>{"use strict";Jet.exports=Ket()});var BJ=fe((TEr,ett)=>{"use strict";ett.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var OJ=fe((AEr,itt)=>{"use strict";var Qlr=tc(),ou=pf(),eur=nl().attributes,Zy=Xt().extendFlat,ttt=rl().overrideAll,rtt=ttt({color:ou.color,showline:Zy({},ou.showline,{dflt:!0}),linecolor:ou.linecolor,linewidth:ou.linewidth,showgrid:Zy({},ou.showgrid,{dflt:!0}),gridcolor:ou.gridcolor,gridwidth:ou.gridwidth,griddash:ou.griddash},"plot","from-root"),ntt=ttt({ticklen:ou.ticklen,tickwidth:Zy({},ou.tickwidth,{dflt:2}),tickcolor:ou.tickcolor,showticklabels:ou.showticklabels,labelalias:ou.labelalias,showtickprefix:ou.showtickprefix,tickprefix:ou.tickprefix,showticksuffix:ou.showticksuffix,ticksuffix:ou.ticksuffix,tickfont:ou.tickfont,tickformat:ou.tickformat,hoverformat:ou.hoverformat,layer:ou.layer},"plot","from-root"),tur=Zy({visible:Zy({},ou.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:Zy({},ou.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},rtt,ntt),rur=Zy({visible:Zy({},ou.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:ou.ticks,editType:"calc"},rtt,ntt);itt.exports={domain:eur({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:Qlr.background},realaxis:tur,imaginaryaxis:rur,editType:"calc"}});var stt=fe((MEr,ott)=>{"use strict";var Q5=Xt(),nur=ni(),iur=Mo(),aur=b2(),our=jf().getSubplotData,sur=mm(),lur=gm(),uur=hA(),cur=Hp(),e4=OJ(),NJ=BJ(),att=NJ.axisNames,fur=dur(function(e){return Q5.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function hur(e,t,r,n){var a=r("bgcolor");n.bgColor=nur.combine(a,n.paper_bgcolor);var i=our(n.fullData,NJ.name,n.id),o=n.layoutOut,s;function l(L,w){return r(s+"."+L,w)}for(var u=0;u{"use strict";var vur=jf().getSubplotCalcData,pur=Xt().counterRegex,gur=kJ(),utt=BJ(),ctt=utt.attr,P_=utt.name,ltt=pur(P_),ftt={};ftt[ctt]={valType:"subplotid",dflt:P_,editType:"calc"};function mur(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[P_],a=0;a{"use strict";var{hovertemplateAttrs:xur,texttemplateAttrs:_ur,templatefallbackAttrs:vtt}=Oo(),MR=ta().extendFlat,bur=n1(),W0=Ol(),wur=Ho(),t4=W0.line;ptt.exports={mode:W0.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:W0.text,texttemplate:_ur({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:vtt({editType:"plot"}),hovertext:W0.hovertext,line:{color:t4.color,width:t4.width,dash:t4.dash,backoff:t4.backoff,shape:MR({},t4.shape,{values:["linear","spline"]}),smoothing:t4.smoothing,editType:"calc"},connectgaps:W0.connectgaps,marker:W0.marker,cliponaxis:MR({},W0.cliponaxis,{dflt:!1}),textposition:W0.textposition,textfont:W0.textfont,fill:MR({},W0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:bur(),hoverinfo:MR({},wur.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:W0.hoveron,hovertemplate:xur(),hovertemplatefallback:vtt(),selected:W0.selected,unselected:W0.unselected}});var ytt=fe((kEr,mtt)=>{"use strict";var SR=Xt(),r4=Is(),Tur=vv(),Aur=lp(),gtt=f3(),Mur=up(),Sur=a1(),Eur=r1().PTS_LINESONLY,kur=UJ();mtt.exports=function(t,r,n,a){function i(l,u){return SR.coerce(t,r,kur,l,u)}var o=Cur(t,r,a,i);if(!o){r.visible=!1;return}i("mode",o{"use strict";var xtt=Yi();_tt.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot;return a.realLabel=xtt.tickText(i.radialAxis,t.real,!0).text,a.imagLabel=xtt.tickText(i.angularAxis,t.imag,!0).text,a}});var Att=fe((LEr,Ttt)=>{"use strict";var wtt=aa(),Lur=Wa().BADNUM,Pur=pv(),Fur=o1(),Dur=P0(),Rur=gv().calcMarkerSize;Ttt.exports=function(t,r){for(var n=t._fullLayout,a=r.subplot,i=n[a].realaxis,o=n[a].imaginaryaxis,s=i.makeCalcdata(r,"real"),l=o.makeCalcdata(r,"imag"),u=r._length,c=new Array(u),f=0;f{"use strict";var Iur=m3(),Mtt=Wa().BADNUM,zur=SJ(),qur=zur.smith;Stt.exports=function(t,r,n){for(var a=r.layers.frontplot.select("g.scatterlayer"),i=r.xaxis,o=r.yaxis,s={xaxis:i,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=0;l{"use strict";var Bur=b3();function Our(e,t,r,n){var a=Bur(e,t,r,n);if(!(!a||a[0].index===!1)){var i=a[0];if(i.index===void 0)return a;var o=e.subplot,s=i.cd[i.index],l=i.trace;if(o.isPtInside(s))return i.xLabelVal=void 0,i.yLabelVal=void 0,ktt(s,l,o,i),i.hovertemplate=l.hovertemplate,a}}function ktt(e,t,r,n){var a=r.radialAxis,i=r.angularAxis;a._hovertitle="real",i._hovertitle="imag";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.realLabel=s.realLabel,n.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,u=[];function c(v,g){u.push(v._hovertitle+": "+g)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["real","imag","text"]),f.indexOf("real")!==-1&&c(a,n.realLabel),f.indexOf("imag")!==-1&&c(i,n.imagLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}Ctt.exports={hoverPoints:Our,makeHoverPointText:ktt}});var Ftt=fe((DEr,Ptt)=>{"use strict";Ptt.exports={moduleType:"trace",name:"scattersmith",basePlotModule:dtt(),categories:["smith","symbols","showLegend","scatter-like"],attributes:UJ(),supplyDefaults:ytt(),colorbar:Zf(),formatLabels:btt(),calc:Att(),plot:Ett(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:Ltt().hoverPoints,selectPoints:a2(),meta:{}}});var Rtt=fe((REr,Dtt)=>{"use strict";Dtt.exports=Ftt()});var GJ=fe((IEr,Itt)=>{"use strict";var Nur=Ho(),Uur=Oo().hovertemplateAttrs,ER=pl().axisHoverFormat,VJ=ta().extendFlat,Vur=_s(),Gur=Uc().dash,Hur=Fm(),F_=Ol(),jur={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:F_.x0,dx:F_.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:F_.y0,dy:F_.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:ER("x"),yhoverformat:ER("y"),uhoverformat:ER("u","noDate"),vhoverformat:ER("v","noDate"),hoverinfo:VJ({},Nur.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:Uur({},{keys:["x","y","u","v","text","name"]}),text:F_.text,textposition:F_.textposition,textfont:F_.textfont,marker:VJ({arrowsize:VJ({},Hur.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:Gur,editType:"style"},editType:"calc"},Vur("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"}};Itt.exports=jur});var qtt=fe((zEr,ztt)=>{"use strict";var mS=Xt(),Wur=GJ(),Yur=r2(),Xur=Wf().hasColorscale,Zur=Vc();ztt.exports=function(t,r,n,a){function i(p,x){return mS.coerce(t,r,Wur,p,x)}var o=Yur(t,r,a,i);if(!o){r.visible=!1;return}var s=i("u"),l=i("v");if(!mS.isArrayOrTypedArray(s)||s.length===0){r.u=new Array(o);for(var u=0;u{"use strict";var Hg=Xt(),n4=Yi(),yS=aa(),Btt=Wa().BADNUM,$ur=Mh(),Kur=P0(),Jur=.97;Ott.exports=function(t,r){let n=r._xA=n4.getFromId(t,r.xaxis||"x","x"),a=r._yA=n4.getFromId(t,r.yaxis||"y","y"),i=n.makeCalcdata(r,"x"),o=a.makeCalcdata(r,"y"),s=Math.min(i.length,o.length);r._length=s;let l=new Array(s);var u=1/0,c=-1/0,f=1/0,v=-1/0;let g=r.marker.color,p=Hg.isArrayOrTypedArray(g),x=r.u||[],_=r.v||[],{anchor:y,lengthmode:C,arrowref:k}=r,S=y==="tip",L=y==="center";for(var w=1/0,A=-1/0,T=1/0,m=-1/0,F=1/0,E=-1/0,I=1/0,R=-1/0,B=0,O=0;OA&&(A=i[O]),o[O]m&&(m=o[O]),UE&&(E=U),JR&&(R=J);var ee=Math.sqrt(U*U+J*J);if(ee>c&&(c=ee),eev&&(v=ce))}}else V.x=Btt,V.y=Btt}if(r._maxNorm=c,C==="scaled"||k==="paper"){let ie=A-w,le=m-T;var ye;ie===0&&le===0?ye=1:ye=(ie+le+Math.sqrt((ie-le)*(ie-le)+4*B*ie*le))/(2*(B-1)),ye*=Jur,r._scaleFactor=ye/r._maxNorm}else r._scaleFactor=1;r._scaleFactor*=r.lengthfactor;let xe=new Array(s),ue=new Array(s),K=new Array(s),_e=new Array(s);for(var ne,ae,O=0;O{"use strict";Utt.exports=function(t,r){}});var kR=fe((OEr,jtt)=>{"use strict";var HJ=xi(),Gtt=Xt(),xS=ea(),Qur=js(),ecr=Y1().DESELECTDIM;function jJ(e,t){var r=t.marker||{},n=Qur.makeColorScaleFuncFromTrace(r);e.style("stroke",function(a){var i=r.color,o;if(Gtt.isArrayOrTypedArray(i)&&i.length>a.i&&isFinite(i[a.i]))o=i[a.i];else{var s=t.u&&t.u[a.i]||0,l=t.v&&t.v[a.i]||0;o=Math.sqrt(s*s+l*l)}return n(o)})}function tcr(e){var t=HJ.select(e).selectAll("g.trace.quiver");t.each(function(r){Htt(e,r,HJ.select(this))})}function rcr(e,t,r){Htt(e,t,r)}function Htt(e,t,r){var n=t[0].trace,a=n.marker||{},i=a.line||{},o=Gtt.isArrayOrTypedArray(a.color)?void 0:a.color,s=n._hasColorscale;if(r)if(n.selectedpoints){var l=(n.selected||{}).marker||{},u=(n.unselected||{}).marker||{},c=l.line||{},f=u.line||{};r.selectAll("path.js-line").each(function(g){var p=HJ.select(this),x=!g.selected,_=x?u.color:l.color,y=x?f.width!==void 0?f.width:i.width:c.width!==void 0?c.width:i.width;_?(xS.lineGroupStyle(p,y,_,i.dash),p.style("stroke-opacity",1)):(xS.lineGroupStyle(p,y,o,i.dash),s&&jJ(p,n),p.style("stroke-opacity",x?ecr:1))}),xS.selectedTextStyle(r.selectAll("text"),n)}else{var v=r.selectAll("path.js-line");v.call(xS.lineGroupStyle,i.width,o,i.dash),s&&jJ(v,n),v.style("stroke-opacity",1),xS.textPointStyle(r.selectAll("text"),n,e)}}jtt.exports={style:tcr,styleOnSelect:rcr,colorscaleStroke:jJ}});var Xtt=fe((NEr,Ytt)=>{"use strict";var Rp=xi(),ncr=Xt(),_S=ea(),icr=kR().colorscaleStroke,CR=Math.PI/12,acr=5.8,ocr=1.5,scr=.7;Ytt.exports=function(t,r,n,a,i,o){var s,l,u=!i,c=!!i&&i.duration>0;if(s=a.selectAll("g.trace").data(n,function(v){return v[0].trace.uid}),s.enter().append("g").attr("class",function(v){return"trace quiver trace"+v[0].trace.uid}).style("stroke-miterlimit",2),s.order(),c){o&&(l=o());var f=Rp.transition().duration(i.duration).ease(i.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});f.each(function(){a.selectAll("g.trace").each(function(v,g){Wtt(t,g,r,v,n,this,i)})})}else s.each(function(v,g){Wtt(t,g,r,v,n,this,i)});u&&s.exit().remove()};function Wtt(e,t,r,n,a,i,o){var s=n[0].trace,l=r.xaxis,u=r.yaxis;n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=Rp.select(i);var c=Rp.select(i).selectAll("g.lines").data([n]);c.enter().append("g").classed("lines",!0),_S.setClipUrl(c,r.layerClipId,e);var f=c.selectAll("path.js-line").data(n);f.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),f.exit().remove();let{anchor:v,maxNorm:g=0,arrowref:p}=s,x=p==="paper"?s._scaleFactor*Math.sqrt(Math.abs(l._m*u._m)):s._scaleFactor,_=s.marker.arrowsize;f.each(function(A){let T=Rp.select(this);if(A.x===void 0||A.y===void 0){T.attr("d",null);return}let m=(p==="paper"?A._u*Math.sign(l._m):Rp.round(l._m*A._u))*x,F=(p==="paper"?A._v*Math.sign(u._m):Rp.round(u._m*A._v))*x,E=(s._input.marker||{}).arrowsize!==void 0;var I,R,B,O;v==="tip"?(I=l.c2p(A.x)-m,B=u.c2p(A.y)-F,R=l.c2p(A.x),O=u.c2p(A.y)):v==="center"?(I=l.c2p(A.x)-m/2,B=u.c2p(A.y)-F/2,R=l.c2p(A.x)+m/2,O=u.c2p(A.y)+F/2):(I=l.c2p(A.x),B=u.c2p(A.y),R=l.c2p(A.x)+m,O=u.c2p(A.y)+F),A._px0=I,A._py0=B,A._px1=R,A._py1=O;var V=s.marker.line.width;E||(V=Math.max(V,ocr));let j=Math.sqrt((R-I)*(R-I)+(O-B)*(O-B)),q=scr*j,U=Math.min(acr*_*V,q),J=Math.atan2(O-B,R-I),ee=R-U*Math.cos(J-CR),ce=O-U*Math.sin(J-CR),ye=R-U*Math.cos(J+CR),xe=O-U*Math.sin(J+CR),ue="M"+I+","+B+"L"+R+","+O+"L"+ee+","+ce+"L"+R+","+O+"L"+ye+","+xe;T.attr("d",ue)});var y=s.marker||{},C=y.line||{},k=ncr.isArrayOrTypedArray(y.color)?void 0:y.color;_S.lineGroupStyle(f,C.width,k,C.dash),s._hasColorscale&&icr(f,s);var S=Rp.select(i).selectAll("g.text").data([n]);S.enter().append("g").classed("text",!0),_S.setClipUrl(S,r.layerClipId,e);var L=S.selectAll("g.textpoint").data(n);if(L.enter().append("g").classed("textpoint",!0).append("text"),L.exit().remove(),L.each(function(A){var T=Rp.select(this),m=_S.translatePoint(A,T.select("text"),l,u);m||T.remove()}),L.selectAll("text").call(_S.textPointStyle,s,e).each(function(A){var T=l.c2p(A.x),m=u.c2p(A.y);Rp.select(this).selectAll("tspan.line").each(function(){Rp.select(this).attr({x:T,y:m})})}),o&&o.duration>0){var w=Rp.transition().duration(o.duration).ease(o.easing);f.transition(w).style("opacity",1)}}});var Ktt=fe((UEr,$tt)=>{"use strict";var Ztt=Xt(),lcr=kl(),ucr=_3();function ccr(e,t,r,n,a,i){let o=a-r,s=i-n,l=o*o+s*s;if(!l)return Math.sqrt((e-r)*(e-r)+(t-n)*(t-n));var u=((e-r)*o+(t-n)*s)/l;u=Math.max(0,Math.min(1,u));let c=r+u*o,f=n+u*s;return Math.sqrt((e-c)*(e-c)+(t-f)*(t-f))}$tt.exports=function(t,r,n,a){var i=t.cd,o=i[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=function(k){return k._px0===void 0?1/0:ccr(u,c,k._px0,k._py0,k._px1,k._py1)};if(lcr.getClosest(i,f,t),t.index!==!1){var v=i[t.index],g=s.c2p(v.x,!0),p=l.c2p(v.y,!0),x=Math.sqrt((u-g)*(u-g)+(c-p)*(c-p));t.index=v.i;var _=o.u?o.u[v.i]:0,y=o.v?o.v[v.i]:0,C="u: "+_+", v: "+y;return Ztt.extendFlat(t,{color:ucr(o,v),x0:g-3,x1:g+3,xLabelVal:v.x,y0:p-3,y1:p+3,yLabelVal:v.y,uLabelVal:_,vLabelVal:y,extraText:C,spikeDistance:x,hovertemplate:o.hovertemplate}),Ztt.fillText(v,o,t),[t]}}});var ert=fe((VEr,Qtt)=>{"use strict";var LR=Yi(),Jtt=Xt();Qtt.exports=function(t,r,n){var a={},i={_fullLayout:n},o=LR.getFromTrace(i,r,"x"),s=LR.getFromTrace(i,r,"y"),l=t.x,u=t.y;a.xLabel=LR.tickText(o,o.c2l(l),!0).text,a.yLabel=LR.tickText(s,s.c2l(u),!0).text;var c=r.u?r.u[t.i]:0,f=r.v?r.v[t.i]:0,v=r.uhoverformat,g=r.vhoverformat;return a.uLabel=v?Jtt.numberFormat(v)(c):String(c),a.vLabel=g?Jtt.numberFormat(g)(f):String(f),a}});var rrt=fe((GEr,trt)=>{"use strict";trt.exports=function(t,r,n,a,i){return t.x=r.x,t.y=r.y,t.u=n.u?n.u[i]:void 0,t.v=n.v?n.v[i]:void 0,t}});var irt=fe((HEr,nrt)=>{"use strict";nrt.exports={moduleType:"trace",name:"quiver",basePlotModule:gu(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:GJ(),supplyDefaults:qtt(),calc:Ntt(),crossTraceCalc:Vtt(),plot:Xtt(),style:kR().style,styleOnSelect:kR().styleOnSelect,hoverPoints:Ktt(),formatLabels:ert(),eventData:rrt(),selectPoints:a2(),colorbar:Zf(),animatable:!0,meta:{}}});var ort=fe((jEr,art)=>{"use strict";art.exports=irt()});var Ih=fe((WEr,lrt)=>{var FR=Zc();function srt(){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={}}FR(srt.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,a){return n=(e!=null&&e.year?e.calendar():typeof n=="string"?this.instance(n,a):n)||this.instance(),n.newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(r){return e[r]})}},substituteChineseDigits:function(e,t){return function(r){for(var n="",a=0;r>0;){var i=r%10;n=(i===0?"":e[i]+t[a])+n,a++,r=Math.floor(r/10)}return n.indexOf(e[1]+t[1])===0&&(n=n.substr(1)),n||e[0]}}});function WJ(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(io.local.invalidDate||io.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function PR(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}FR(WJ.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e==null?this:e,t,r)},year:function(e){return arguments.length===0?this._year:this.set(e,"y")},month:function(e){return arguments.length===0?this._month:this.set(e,"m")},day:function(e){return arguments.length===0?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(io.local.invalidDate||io.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,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(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(io.local.differentCalendars||io.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+PR(Math.abs(this.year()),4)+"-"+PR(this.month(),2)+"-"+PR(this.day(),2)}});function YJ(){this.shortYearCutoff="+10"}FR(YJ.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new WJ(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,io.local.invalidYear||io.regionalOptions[""].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,io.local.invalidYear||io.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+PR(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,io.local.invalidYear||io.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,io.local.invalidMonth||io.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,io.local.invalidMonth||io.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,io.local.invalidYear||io.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,io.local.invalidDate||io.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,r==="d"||r==="w"){var n=e.toJD()+t*(r==="w"?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=e.year()+(r==="y"?t:0),o=e.monthOfYear()+(r==="m"?t:0),a=e.day(),s=function(c){for(;of-1+c.minMonth;)i++,o-=f,f=c.monthsInYear(i)};r==="y"?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):r==="m"&&(s(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var l=[i,this.fromMonthOfYear(i,o),a];return this._validateLevel--,l}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,t,r,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(t[0]===0||e.year()>0!=t[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],i=r<0?-1:1;t=this._add(e,r*a[0]+i*a[1],a[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,io.local.invalidDate||io.regionalOptions[""].invalidDate);var n=r==="y"?t:e.year(),a=r==="m"?t:e.month(),i=r==="d"?t:e.day();return(r==="y"||r==="m")&&(i=Math.min(i,this.daysInMonth(n,a))),e.date(n,a,i)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||e!==0;if(n){var a=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=a-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate),a=new Date(n.year(),n.month()-1,n.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var io=lrt.exports=new srt;io.cdate=WJ;io.baseCalendar=YJ;io.calendars.gregorian=XJ});var urt=fe(()=>{var ZJ=Zc(),Tf=Ih();ZJ(Tf.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"});Tf.local=Tf.regionalOptions[""];ZJ(Tf.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});ZJ(Tf.baseCalendar.prototype,{UNIX_EPOCH:Tf.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:Tf.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(e,t,r){if(typeof e!="string"&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw Tf.local.invalidFormat||Tf.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,i=r.monthNumbers||this.local.monthNumbers,o=r.monthNamesShort||this.local.monthNamesShort,s=r.monthNames||this.local.monthNames,l=r.calculateWeek||this.local.calculateWeek,u=function(S,L){for(var w=1;k+w1},c=function(S,L,w,A){var T=""+L;if(u(S,A))for(;T.length1},C=function(I,R){var B=y(I,R),O=[2,3,B?4:2,B?4:2,10,11,20]["oyYJ@!".indexOf(I)+1],V=new RegExp("^-?\\d{1,"+O+"}"),j=t.substring(T).match(V);if(!j)throw(Tf.local.missingNumberAt||Tf.regionalOptions[""].missingNumberAt).replace(/\{0\}/,T);return T+=j[0].length,parseInt(j[0],10)},k=this,S=function(){if(typeof s=="function"){y("m");var I=s.call(k,t.substring(T));return T+=I.length,I}return C("m")},L=function(I,R,B,O){for(var V=y(I,O)?B:R,j=0;j-1){v=1,g=p;for(var E=this.daysInMonth(f,v);g>E;E=this.daysInMonth(f,v))v++,g-=E}return c>-1?this.fromJD(c):this.newDate(f,v,g)},determineDate:function(e,t,r,n,a){r&&typeof r!="object"&&(a=n,n=r,r=null),typeof n!="string"&&(a=n,n="");var i=this,o=function(s){try{return i.parseDate(n,s,a)}catch(f){}s=s.toLowerCase();for(var l=(s.match(/^c/)&&r?r.newDate():null)||i.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=u.exec(s);c;)l.add(parseInt(c[1],10),c[2]||"d"),c=u.exec(s);return l};return t=t?t.newDate():null,e=e==null?t:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?t:i.today().add(e,"d"):i.newDate(e),e}})});var crt=fe(()=>{var $y=Ih(),fcr=Zc(),$J=$y.instance();function DR(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}DR.prototype=new $y.baseCalendar;fcr(DR.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if(typeof e=="string"){var r=e.match(dcr);return r?r[0]:""}var n=this._validateYear(e),a=e.month(),i=""+this.toChineseMonth(n,a);return t&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(e){if(typeof e=="string"){var t=e.match(vcr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=this.toChineseMonth(r,n),i=["\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"][a-1];return this.isIntercalaryMonth(r,n)&&(i="\u95F0"+i),i},monthNamesShort:function(e){if(typeof e=="string"){var t=e.match(pcr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=this.toChineseMonth(r,n),i=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][a-1];return this.isIntercalaryMonth(r,n)&&(i="\u95F0"+i),i},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),n;if(isNaN(r))t[0]==="\u95F0"&&(n=!0,t=t.substring(1)),t[t.length-1]==="\u6708"&&(t=t.substring(0,t.length-1)),r=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(t);else{var a=t[t.length-1];n=a==="i"||a==="I"}var i=this.toMonthIndex(e,r,n);return i},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(e,t){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var n=this.intercalaryMonth(e),a=r&&t!==n;if(a||t<1||t>12)throw $y.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return n?!r&&t<=n?i=t-1:i=t:i=t-1,i},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),n=r?12:11;if(t<0||t>n)throw $y.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return r?t>13;return r},isIntercalaryMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,t,r){var n=this._validateYear(e,$y.local.invalidyear),a=Jy[n-Jy[0]],i=a>>9&4095,o=a>>5&15,s=a&31,l;l=$J.newDate(i,o,s),l.add(4-(l.dayOfWeek()||7),"d");var u=this.toJD(e,t,r)-l.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=Ky[e-Ky[0]],n=r>>13,a=n?12:11;if(t>a)throw $y.local.invalidMonth.replace(/\{0\}/,this.local.name);var i=r&1<<12-t?30:29;return i},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,i,r,$y.local.invalidDate);e=this._validateYear(n.year()),t=n.month(),r=n.day();var a=this.isIntercalaryMonth(e,t),i=this.toChineseMonth(e,t),o=mcr(e,i,r,a);return $J.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=$J.fromJD(e),r=gcr(t.year(),t.month(),t.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(e){var t=e.match(hcr),r=this._validateYear(+t[1]),n=+t[2],a=!!t[3],i=this.toMonthIndex(r,n,a),o=+t[4];return this.newDate(r,i,o)},add:function(e,t,r){var n=e.year(),a=e.month(),i=this.isIntercalaryMonth(n,a),o=this.toChineseMonth(n,a),s=Object.getPrototypeOf(DR.prototype).add.call(this,e,t,r);if(r==="y"){var l=s.year(),u=s.month(),c=this.isIntercalaryMonth(l,o),f=i&&c?this.toMonthIndex(l,o,!0):this.toMonthIndex(l,o,!1);f!==u&&s.month(f)}return s}});var hcr=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,dcr=/^\d?\d[iI]?/m,vcr=/^闰?十?[一二三四五六七八九]?月/m,pcr=/^闰?十?[一二三四五六七八九]?/m;$y.calendars.chinese=DR;var Ky=[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],Jy=[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 gcr(e,t,r,n){var a,i;if(typeof e=="object")a=e,i=t||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var s=typeof t=="number"&&t>=1&&t<=12;if(!s)throw new Error("Solar month outside range 1 - 12");var l=typeof r=="number"&&r>=1&&r<=31;if(!l)throw new Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},i=n||{}}var u=Jy[a.year-Jy[0]],c=a.year<<9|a.month<<5|a.day;i.year=c>=u?a.year:a.year-1,u=Jy[i.year-Jy[0]];var f=u>>9&4095,v=u>>5&15,g=u&31,p,x=new Date(f,v-1,g),_=new Date(a.year,a.month-1,a.day);p=Math.round((_-x)/(24*3600*1e3));var y=Ky[i.year-Ky[0]],C;for(C=0;C<13;C++){var k=y&1<<12-C?30:29;if(p>13;return!S||C=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var l=typeof t=="number"&&t>=1&&t<=12;if(!l)throw new Error("Lunar month outside range 1 - 12");var u=typeof r=="number"&&r>=1&&r<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var c;typeof n=="object"?(c=!1,i=n):(c=!!n,i=a||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var v=Ky[o.year-Ky[0]],g=v>>13,p;g&&(o.month>g||o.isIntercalary)?p=o.month:p=o.month-1;for(var x=0;x>9&4095,k=y>>5&15,S=y&31,L=new Date(C,k-1,S+f);return i.year=L.getFullYear(),i.month=1+L.getMonth(),i.day=L.getDate(),i}});var frt=fe(()=>{var D_=Ih(),ycr=Zc();function KJ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}KJ.prototype=new D_.baseCalendar;ycr(KJ.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(r){var t=this._validate(r,this.minMonth,this.minDay,D_.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,D_.local.invalidYear||D_.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,D_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,D_.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-(n-1)*30+1;return this.newDate(r,n,a)}});D_.calendars.coptic=KJ});var hrt=fe(()=>{var jg=Ih(),xcr=Zc();function JJ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}JJ.prototype=new jg.baseCalendar;xcr(JJ.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,jg.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,jg.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,jg.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,jg.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,jg.local.invalidDate);return(n.day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,jg.local.invalidDate);return{century:_cr[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,t,r){var n=this._validate(e,t,r,jg.local.invalidDate);return e=n.year()+(n.year()<0?1:0),t=n.month(),r=n.day(),r+(t>1?16:0)+(t>2?(t-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,n)}});var _cr={20:"Fruitbat",21:"Anchovy"};jg.calendars.discworld=JJ});var drt=fe(()=>{var R_=Ih(),bcr=Zc();function QJ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}QJ.prototype=new R_.baseCalendar;bcr(QJ.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(r){var t=this._validate(r,this.minMonth,this.minDay,R_.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,R_.local.invalidYear||R_.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,R_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,R_.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-(n-1)*30+1;return this.newDate(r,n,a)}});R_.calendars.ethiopian=QJ});var vrt=fe(()=>{var Qy=Ih(),wcr=Zc();function eQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}eQ.prototype=new Qy.baseCalendar;wcr(eQ.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Qy.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,RR(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Qy.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Qy.local.invalidYear);return e=t.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Qy.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&RR(this.daysInYear(e),10)===5?30:t===9&&RR(this.daysInYear(e),10)===3?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,Qy.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(e,t,r){var n=this._validate(e,t,r,Qy.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var a=e<=0?e+1:e,i=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(t<7){for(var o=7;o<=this.monthsInYear(e);o++)i+=this.daysInMonth(e,o);for(var o=1;o=this.toJD(t===-1?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});function RR(e,t){return e-t*Math.floor(e/t)}Qy.calendars.hebrew=eQ});var prt=fe(()=>{var bS=Ih(),Tcr=Zc();function tQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}tQ.prototype=new bS.baseCalendar;Tcr(tQ.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(e){var t=this._validate(e,this.minMonth,this.minDay,bS.local.invalidYear);return(t.year()*11+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,bS.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,bS.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e=e<=0?e+1:e,r+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});bS.calendars.islamic=tQ});var grt=fe(()=>{var wS=Ih(),Acr=Zc();function rQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}rQ.prototype=new wS.baseCalendar;Acr(rQ.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(r){var t=this._validate(r,this.minMonth,this.minDay,wS.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%4===0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,wS.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,wS.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=t+1524,n=Math.floor((r-122.1)/365.25),a=Math.floor(365.25*n),i=Math.floor((r-a)/30.6001),o=i-Math.floor(i<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-a-Math.floor(30.6001*i);return s<=0&&s--,this.newDate(s,o,l)}});wS.calendars.julian=rQ});var yrt=fe(()=>{var Uv=Ih(),Mcr=Zc();function iQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}iQ.prototype=new Uv.baseCalendar;Mcr(iQ.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,Uv.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Uv.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var n=Math.floor(e/20);return r+"."+n+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=t*20+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Uv.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,Uv.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Uv.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,Uv.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,Uv.local.invalidDate);return n.day()},weekDay:function(e,t,r){return this._validate(e,t,r,Uv.local.invalidDate),!0},extraInfo:function(e,t,r){var n=this._validate(e,t,r,Uv.local.invalidDate),a=n.toJD(),i=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var t=nQ(e+8+340,365);return[Math.floor(t/20)+1,nQ(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[mrt(e+20,20),mrt(e+4,13)]},toJD:function(e,t,r){var n=this._validate(e,t,r,Uv.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e=e%360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}});function nQ(e,t){return e-t*Math.floor(e/t)}function mrt(e,t){return nQ(e-1,t)+1}Uv.calendars.mayan=iQ});var _rt=fe(()=>{var I_=Ih(),Scr=Zc();function aQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}aQ.prototype=new I_.baseCalendar;var xrt=I_.instance("gregorian");Scr(aQ.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,I_.local.invalidYear||I_.regionalOptions[""].invalidYear);return xrt.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,I_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(a,t,r){var n=this._validate(a,t,r,I_.local.invalidMonth),a=n.year();a<0&&a++;for(var i=n.day(),o=1;o=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}});I_.calendars.nanakshahi=aQ});var brt=fe(()=>{var z_=Ih(),Ecr=Zc();function oQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}oQ.prototype=new z_.baseCalendar;Ecr(oQ.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(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,z_.local.invalidYear);if(e=t.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var r=0,n=this.minMonth;n<=12;n++)r+=this.NEPALI_CALENDAR_DATA[e][n];return r},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,z_.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},toJD:function(e,t,r){var n=this._validate(e,t,r,z_.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var a=z_.instance(),i=0,o=t,s=e;this._createMissingCalendarData(e);var l=e-(o>9||o===9&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(t!==9&&(i=r,o--);o!==9;)o<=0&&(o=12,s--),i+=this.NEPALI_CALENDAR_DATA[s][o],o--;return t===9?(i+=r-this.NEPALI_CALENDAR_DATA[s][0],i<0&&(i+=a.daysInYear(l))):i+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],a.newDate(l,1,1).add(i,"d").toJD()},fromJD:function(e){var t=z_.instance(),r=t.fromJD(e),n=r.year(),a=r.dayOfYear(),i=n+56;this._createMissingCalendarData(i);for(var o=9,s=this.NEPALI_CALENDAR_DATA[i][0],l=this.NEPALI_CALENDAR_DATA[i][o]-s+1;a>l;)o++,o>12&&(o=1,i++),l+=this.NEPALI_CALENDAR_DATA[i][o];var u=this.NEPALI_CALENDAR_DATA[i][o]-(l-a);return this.newDate(i,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r{var i4=Ih(),kcr=Zc();function zR(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function IR(e){var t=e-475;e<0&&t++;var r=.242197,n=r*t,a=r*(t+1),i=n-Math.floor(n),o=a-Math.floor(a);return i>o}zR.prototype=new i4.baseCalendar;kcr(zR.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,i4.local.invalidYear);return IR(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-((n.dayOfWeek()+1)%7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,i4.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,i4.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var a=0;if(e>0)for(var i=1;i0?e-1:e)*365+a+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=475+(e-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,IR(r)?30:29)&&(r++,r===0&&r++);var n=e-this.toJD(r,1,1)+1,a=n<=186?Math.ceil(n/31):Math.ceil((n-6)/30),i=e-this.toJD(r,a,1)+1;return this.newDate(r,a,i)}});i4.calendars.persian=zR;i4.calendars.jalali=zR});var Trt=fe(()=>{var q_=Ih(),Ccr=Zc(),qR=q_.instance();function sQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}sQ.prototype=new q_.baseCalendar;Ccr(sQ.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(r){var t=this._validate(r,this.minMonth,this.minDay,q_.local.invalidYear),r=this._t2gYear(t.year());return qR.leapYear(r)},weekOfYear:function(a,t,r){var n=this._validate(a,this.minMonth,this.minDay,q_.local.invalidYear),a=this._t2gYear(n.year());return qR.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,q_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(a,t,r){var n=this._validate(a,t,r,q_.local.invalidDate),a=this._t2gYear(n.year());return qR.toJD(a,n.month(),n.day())},fromJD:function(e){var t=qR.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}});q_.calendars.taiwan=sQ});var Art=fe(()=>{var B_=Ih(),Lcr=Zc(),BR=B_.instance();function lQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}lQ.prototype=new B_.baseCalendar;Lcr(lQ.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(r){var t=this._validate(r,this.minMonth,this.minDay,B_.local.invalidYear),r=this._t2gYear(t.year());return BR.leapYear(r)},weekOfYear:function(a,t,r){var n=this._validate(a,this.minMonth,this.minDay,B_.local.invalidYear),a=this._t2gYear(n.year());return BR.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,B_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(a,t,r){var n=this._validate(a,t,r,B_.local.invalidDate),a=this._t2gYear(n.year());return BR.toJD(a,n.month(),n.day())},fromJD:function(e){var t=BR.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}});B_.calendars.thai=lQ});var Mrt=fe(()=>{var O_=Ih(),Pcr=Zc();function uQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}uQ.prototype=new O_.baseCalendar;Pcr(uQ.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,O_.local.invalidYear);return this.daysInYear(t.year())===355},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,O_.local.invalidMonth),n=r.toJD()-24e5+.5,a=0,i=0;in)return ex[a]-ex[a-1];a++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,O_.local.invalidDate),a=12*(n.year()-1)+n.month()-15292,i=n.day()+ex[a-1]-1;return i+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var a=r+15292,i=Math.floor((a-1)/12),o=i+1,s=a-12*i,l=t-ex[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var n=O_.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(e=e.year!=null?e.year:e,n=e>=1276&&e<=1500),n},_validate:function(e,t,r,n){var a=O_.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}});O_.calendars.ummalqura=uQ;var ex=[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]});var Ert=fe((Tkr,Srt)=>{"use strict";Srt.exports=Ih();urt();crt();frt();hrt();drt();vrt();prt();grt();yrt();_rt();brt();wrt();Trt();Art();Mrt()});var Rrt=fe((Akr,Drt)=>{"use strict";var Crt=Ert(),TS=Xt(),Lrt=Wa(),Fcr=Lrt.EPOCHJD,Dcr=Lrt.ONEDAY,hQ={valType:"enumerated",values:TS.sortObjectKeys(Crt.calendars),editType:"calc",dflt:"gregorian"},Prt=function(e,t,r,n){var a={};return a[r]=hQ,TS.coerce(e,t,a,r,n)},Rcr=function(e,t,r,n){for(var a=0;a{"use strict";Irt.exports=Rrt()});var Ncr=fe((Skr,Brt)=>{var qrt=_2e();qrt.register([w_e(),ube(),A3e(),j3e(),awe(),t5e(),v5e(),r4e(),P4e(),dTe(),eAe(),SCe(),p7e(),o9e(),X9e(),MPe(),ZPe(),uDe(),kDe(),WDe(),iRe(),yRe(),DRe(),ZRe(),Fze(),Jze(),xGe(),xHe(),wje(),Xje(),fYe(),SYe(),$Ye(),uZe(),DZe(),v$e(),zKe(),sJe(),kJe(),eQe(),vQe(),vet(),Ret(),Qet(),Rtt(),ort(),zrt()]);Brt.exports=qrt});return Ncr();})(); +${de.shaderPreludeCode.vertexSource}`,define:de.shaderDefine},defaultProjectionData:Fe},Ye=se.renderingMode?se.renderingMode:"2d";if(Y.renderPass==="offscreen"){let st=se.prerender;st&&(Y.setCustomLayerDefaults(),$.setColorMode(Y.colorModeForRenderPass()),st.call(se,$.gl,Ie),$.setDirty(),Y.setBaseState())}else if(Y.renderPass==="translucent"){Y.setCustomLayerDefaults(),$.setColorMode(Y.colorModeForRenderPass()),$.setStencilMode(Ca.disabled);let st=Ye==="3d"?Y.getDepthModeFor3D():Y.getDepthModeForSublayer(0,ma.ReadOnly);$.setDepthMode(st),se.render($.gl,Ie),$.setDirty(),Y.setBaseState(),$.bindFramebuffer.set(null)}},debug:function(Y,d,P){for(let N of P)Zu(Y,d,N)},debugPadding:function(Y){let d=Y.transform.padding;Qs(Y,Y.transform.height-(d.top||0),3,fs),Qs(Y,d.bottom||0,3,Io),zl(Y,d.left||0,3,oi),zl(Y,Y.transform.width-(d.right||0),3,ro);let P=Y.transform.centerPoint;(function(N,H,$,se){cu(N,H-1,$-10,2,20,se),cu(N,H-10,$-1,20,2,se)})(Y,P.x,Y.transform.height-P.y,Go)},terrainDepth:function(Y,d){let P=Y.context,N=P.gl,H=Y.transform,$=Ja.unblended,se=new ma(N.LEQUAL,ma.ReadWrite,[0,1]),de=d.tileManager.getRenderableTiles(),Ae=Y.useProgram("terrainDepth");P.bindFramebuffer.set(d.getFramebuffer("depth").framebuffer),P.viewport.set([0,0,Y.width/devicePixelRatio,Y.height/devicePixelRatio]),P.clear({color:i.bo.transparent,depth:1});for(let Fe of de){let Ie=d.getTerrainMesh(Fe.tileID),Ye=d.getTerrainData(Fe.tileID),st=H.getProjectionData({overscaledTileID:Fe.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),ht={u_ele_delta:d.getMeshFrameDelta(H.zoom)};Ae.draw(P,N.TRIANGLES,se,Ca.disabled,$,Sa.backCCW,ht,Ye,st,"terrain",Ie.vertexBuffer,Ie.indexBuffer,Ie.segments)}P.bindFramebuffer.set(null),P.viewport.set([0,0,Y.width,Y.height])},terrainCoords:function(Y,d){let P=Y.context,N=P.gl,H=Y.transform,$=Ja.unblended,se=new ma(N.LEQUAL,ma.ReadWrite,[0,1]),de=d.getCoordsTexture(),Ae=d.tileManager.getRenderableTiles(),Fe=Y.useProgram("terrainCoords");P.bindFramebuffer.set(d.getFramebuffer("coords").framebuffer),P.viewport.set([0,0,Y.width/devicePixelRatio,Y.height/devicePixelRatio]),P.clear({color:i.bo.transparent,depth:1}),d.coordsIndex=[];for(let Ie of Ae){let Ye=d.getTerrainMesh(Ie.tileID),st=d.getTerrainData(Ie.tileID);P.activeTexture.set(N.TEXTURE0),N.bindTexture(N.TEXTURE_2D,de.texture);let ht={u_terrain_coords_id:(255-d.coordsIndex.length)/255,u_texture:0,u_ele_delta:d.getMeshFrameDelta(H.zoom)},Pe=H.getProjectionData({overscaledTileID:Ie.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});Fe.draw(P,N.TRIANGLES,se,Ca.disabled,$,Sa.backCCW,ht,st,Pe,"terrain",Ye.vertexBuffer,Ye.indexBuffer,Ye.segments),d.coordsIndex.push(Ie.tileID.key)}P.bindFramebuffer.set(null),P.viewport.set([0,0,Y.width,Y.height])}};class $u{constructor(d,P){this.drawFunctions=lf,this.context=new yt(d),this.transform=P,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:i.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Zr.maxOverzooming+Zr.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new $a}resize(d,P,N){if(this.width=Math.floor(d*N),this.height=Math.floor(P*N),this.pixelRatio=N,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let H of this.style._order)this.style._layers[H].resize()}setup(){let d=this.context,P=new i.aU;P.emplaceBack(0,0),P.emplaceBack(i.a6,0),P.emplaceBack(0,i.a6),P.emplaceBack(i.a6,i.a6),this.tileExtentBuffer=d.createVertexBuffer(P,vs.members),this.tileExtentSegments=i.aV.simpleSegment(0,0,4,2);let N=new i.aU;N.emplaceBack(0,0),N.emplaceBack(i.a6,0),N.emplaceBack(0,i.a6),N.emplaceBack(i.a6,i.a6),this.debugBuffer=d.createVertexBuffer(N,vs.members),this.debugSegments=i.aV.simpleSegment(0,0,4,5);let H=new i.ch;H.emplaceBack(0,0,0,0),H.emplaceBack(i.a6,0,i.a6,0),H.emplaceBack(0,i.a6,0,i.a6),H.emplaceBack(i.a6,i.a6,i.a6,i.a6),this.rasterBoundsBuffer=d.createVertexBuffer(H,sh.members),this.rasterBoundsSegments=i.aV.simpleSegment(0,0,4,2);let $=new i.aU;$.emplaceBack(0,0),$.emplaceBack(i.a6,0),$.emplaceBack(0,i.a6),$.emplaceBack(i.a6,i.a6),this.rasterBoundsBufferPosOnly=d.createVertexBuffer($,vs.members),this.rasterBoundsSegmentsPosOnly=i.aV.simpleSegment(0,0,4,5);let se=new i.aU;se.emplaceBack(0,0),se.emplaceBack(1,0),se.emplaceBack(0,1),se.emplaceBack(1,1),this.viewportBuffer=d.createVertexBuffer(se,vs.members),this.viewportSegments=i.aV.simpleSegment(0,0,4,2);let de=new i.ci;de.emplaceBack(0),de.emplaceBack(1),de.emplaceBack(3),de.emplaceBack(2),de.emplaceBack(0),this.tileBorderIndexBuffer=d.createIndexBuffer(de);let Ae=new i.aW;Ae.emplaceBack(1,0,2),Ae.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=d.createIndexBuffer(Ae);let Fe=this.context.gl;this.stencilClearMode=new Ca({func:Fe.ALWAYS,mask:0},0,255,Fe.ZERO,Fe.ZERO,Fe.ZERO),this.tileExtentMesh=new ka(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let d=this.context,P=d.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let N=i.O();i.c7(N,0,this.width,this.height,0,0,1),i.S(N,N,[P.drawingBufferWidth,P.drawingBufferHeight,0]);let H={mainMatrix:N,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:N};this.useProgram("clippingMask",null,!0).draw(d,P.TRIANGLES,ma.disabled,this.stencilClearMode,Ja.disabled,Sa.disabled,null,null,H,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(d,P,N){if(this.currentStencilSource===d.source||!d.isTileClipped()||!(P!=null&&P.length))return;this.currentStencilSource=d.source,this.nextStencilID+P.length>256&&this.clearStencil();let H=this.context;H.setColorMode(Ja.disabled),H.setDepthMode(ma.disabled);let $={};for(let se of P)$[se.key]=this.nextStencilID++;this._renderTileMasks($,P,N,!0),this._renderTileMasks($,P,N,!1),this._tileClippingMaskIDs=$}_renderTileMasks(d,P,N,H){var $;let se=this.context,de=se.gl,Ae=this.style.projection,Fe=this.transform,Ie=this.useProgram("clippingMask");for(let Ye of P){let st=d[Ye.key],ht=($=this.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData(Ye),Pe=Ae.getMeshFromTileID(this.context,Ye.canonical,H,!0,"stencil"),Xe=Fe.getProjectionData({overscaledTileID:Ye,applyGlobeMatrix:!N,applyTerrainMatrix:!0});Ie.draw(se,de.TRIANGLES,ma.disabled,new Ca({func:de.ALWAYS,mask:0},st,255,de.KEEP,de.KEEP,de.REPLACE),Ja.disabled,N?Sa.disabled:Sa.backCCW,null,ht,Xe,"$clipping",Pe.vertexBuffer,Pe.indexBuffer,Pe.segments)}}_renderTilesDepthBuffer(){var d;let P=this.context,N=P.gl,H=this.style.projection,$=this.transform,se=this.useProgram("depth"),de=this.getDepthModeFor3D(),Ae=ft($,{tileSize:$.tileSize});for(let Fe of Ae){let Ie=(d=this.style.map.terrain)===null||d===void 0?void 0:d.getTerrainData(Fe),Ye=H.getMeshFromTileID(this.context,Fe.canonical,!0,!0,"raster"),st=$.getProjectionData({overscaledTileID:Fe,applyGlobeMatrix:!0,applyTerrainMatrix:!0});se.draw(P,N.TRIANGLES,de,Ca.disabled,Ja.disabled,Sa.backCCW,null,Ie,st,"$clipping",Ye.vertexBuffer,Ye.indexBuffer,Ye.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let d=this.nextStencilID++,P=this.context.gl;return new Ca({func:P.NOTEQUAL,mask:255},d,255,P.KEEP,P.KEEP,P.REPLACE)}stencilModeForClipping(d){let P=this.context.gl;return new Ca({func:P.EQUAL,mask:255},this._tileClippingMaskIDs[d.key],0,P.KEEP,P.KEEP,P.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(d){let P=this.context.gl,N=d.sort(((se,de)=>de.overscaledZ-se.overscaledZ)),H=N[N.length-1].overscaledZ,$=N[0].overscaledZ-H+1;if($>1){this.currentStencilSource=void 0,this.nextStencilID+$>256&&this.clearStencil();let se={};for(let de=0;de<$;de++)se[de+H]=new Ca({func:P.GEQUAL,mask:255},de+this.nextStencilID,255,P.KEEP,P.KEEP,P.REPLACE);return this.nextStencilID+=$,[se,N]}return[{[H]:Ca.disabled},N]}stencilConfigForOverlapTwoPass(d){let P=this.context.gl,N=d.sort(((se,de)=>de.overscaledZ-se.overscaledZ)),H=N[N.length-1].overscaledZ,$=N[0].overscaledZ-H+1;if(this.clearStencil(),$>1){let se={},de={};for(let Ae=0;Ae<$;Ae++)se[Ae+H]=new Ca({func:P.GREATER,mask:255},$+1+Ae,255,P.KEEP,P.KEEP,P.REPLACE),de[Ae+H]=new Ca({func:P.GREATER,mask:255},1+Ae,255,P.KEEP,P.KEEP,P.REPLACE);return this.nextStencilID=2*$+1,[se,de,N]}return this.nextStencilID=3,[{[H]:new Ca({func:P.GREATER,mask:255},2,255,P.KEEP,P.KEEP,P.REPLACE)},{[H]:new Ca({func:P.GREATER,mask:255},1,255,P.KEEP,P.KEEP,P.REPLACE)},N]}colorModeForRenderPass(){let d=this.context.gl;return this._showOverdrawInspector?new Ja([d.CONSTANT_COLOR,d.ONE],new i.bo(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Ja.unblended:Ja.alphaBlended}getDepthModeForSublayer(d,P,N){if(!this.opaquePassEnabledForLayer())return ma.disabled;let H=1-((1+this.currentLayer)*this.numSublayers+d)*this.depthEpsilon;return new ma(N||this.context.gl.LEQUAL,P,[H,H])}getDepthModeFor3D(){return new ma(this.context.gl.LEQUAL,ma.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer0};for(let ht in de){let Pe=de[ht];Pe.used&&Pe.prepare(this.context),Ae[ht]=Pe.getVisibleCoordinates(!1),Fe[ht]=Ae[ht].slice().reverse(),Ie[ht]=Pe.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let ht=0;htthis.useProgram(ht)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:P.showOverdrawInspector?i.bo.black:i.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=P.showOverdrawInspector,this.depthRangeFor3D=[0,1-(d._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=se.length-1;this.currentLayer>=0;this.currentLayer--){let ht=this.style._layers[se[this.currentLayer]],Pe=de[ht.source],Xe=Ae[ht.source];this._renderTileClippingMasks(ht,Xe,!1),this.renderLayer(this,Pe,ht,Xe,Ye)}this.renderPass="translucent";let st=!1;for(this.currentLayer=0;this.currentLayerPt.source&&!Pt.isHidden(Xe)?[Pe.tileManagers[Pt.source]]:[])),Et=xt.filter((Pt=>Pt.getSource().type==="vector")),Bt=xt.filter((Pt=>Pt.getSource().type!=="vector")),St=Pt=>{(!at||at.getSource().maxzoom0?P.pop():null}isPatternMissing(d){if(!d)return!1;if(!d.from||!d.to)return!0;let P=this.imageManager.getPattern(d.from.toString()),N=this.imageManager.getPattern(d.to.toString());return!P||!N}useProgram(d,P,N=!1,H=[]){var $;this.cache||(this.cache={});let se=!!this.style.map.terrain,de=this.style.projection,Ae=N?Oa.projectionMercator:de.shaderPreludeCode,Fe=N?xo:de.shaderDefine,Ie=d+(P?P.cacheKey:"")+`/${N?so:de.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(se?"/terrain":"")+(H?`/${H.join("/")}`:"");return($=this.cache)[Ie]||($[Ie]=new Ud(this.context,Oa[d],P,_d[d],this._showOverdrawInspector,se,Ae,Fe,H)),this.cache[Ie]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let d=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(d.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new i.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var d,P;if(this._tileTextures){for(let N in this._tileTextures){let H=this._tileTextures[N];if(H)for(let $ of H)$.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((d=this.tileExtentMesh.vertexBuffer)===null||d===void 0||d.destroy()),this.tileExtentMesh&&((P=this.tileExtentMesh.indexBuffer)===null||P===void 0||P.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let N in this.cache){let H=this.cache[N];H!=null&&H.program&&this.context.gl.deleteProgram(H.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:d,drawingBufferHeight:P}=this.context.gl;return this.width!==d||this.height!==P}}function ph(Y,d){let P,N=!1,H=null,$=()=>{H=null,N&&(Y(...P),H=setTimeout($,d),N=!1)};return(...se)=>(N=!0,P=se,H||$(),H)}$u.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class gh{constructor(d){this._getCurrentHash=()=>{let P=window.location.hash.replace("#","");if(this._hashName){let N,H=P.split("&").map(($=>$.split("=")));for(let $ of H)$[0]===this._hashName&&(N=$);return(N&&N[1]||"").split("/")}return P.split("/")},this._onHashChange=()=>{let P=this._getCurrentHash();if(!this._isValidHash(P))return!1;let N=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(P[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+P[2],+P[1]],zoom:+P[0],bearing:N,pitch:+(P[4]||0)}),!0},this._updateHashUnthrottled=()=>{let P=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,P)},this._removeHash=()=>{let P=this._getCurrentHash();if(P.length===0)return;let N=P.join("/"),H=N;H.split("&").length>0&&(H=H.split("&")[0]),this._hashName&&(H=`${this._hashName}=${N}`);let $=window.location.hash.replace(H,"");$.startsWith("#&")?$=$.slice(0,1)+$.slice(2):$==="#"&&($="");let se=window.location.href.replace(/(#.+)?$/,$);se=se.replace("&&","&"),window.history.replaceState(window.history.state,null,se)},this._updateHash=ph(this._updateHashUnthrottled,300),this._hashName=d&&encodeURIComponent(d)}addTo(d){return this._map=d,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(d){let P=this._map.getCenter(),N=Math.round(100*this._map.getZoom())/100,H=Math.ceil((N*Math.LN2+Math.log(512/360/.5))/Math.LN10),$=Math.pow(10,H),se=Math.round(P.lng*$)/$,de=Math.round(P.lat*$)/$,Ae=this._map.getBearing(),Fe=this._map.getPitch(),Ie="";if(Ie+=d?`/${se}/${de}/${N}`:`${N}/${de}/${se}`,(Ae||Fe)&&(Ie+="/"+Math.round(10*Ae)/10),Fe&&(Ie+=`/${Math.round(Fe)}`),this._hashName){let Ye=this._hashName,st=!1,ht=window.location.hash.slice(1).split("&").map((Pe=>{let Xe=Pe.split("=")[0];return Xe===Ye?(st=!0,`${Xe}=${Ie}`):Pe})).filter((Pe=>Pe));return st||ht.push(`${Ye}=${Ie}`),`#${ht.join("&")}`}return`#${Ie}`}_isValidHash(d){if(d.length<3||d.some(isNaN))return!1;try{new i.W(+d[2],+d[1])}catch($){return!1}let P=+d[0],N=+(d[3]||0),H=+(d[4]||0);return P>=this._map.getMinZoom()&&P<=this._map.getMaxZoom()&&N>=-180&&N<=180&&H>=this._map.getMinPitch()&&H<=this._map.getMaxPitch()}}let uf={linearity:.3,easing:i.cv(0,0,.3,1)},Ku=i.e({deceleration:2500,maxSpeed:1400},uf),fu=i.e({deceleration:20,maxSpeed:1400},uf),Ju=i.e({deceleration:1e3,maxSpeed:360},uf),Qu=i.e({deceleration:1e3,maxSpeed:90},uf),Wd=i.e({deceleration:1e3,maxSpeed:360},uf);class x0{constructor(d){this._map=d,this.clear()}clear(){this._inertiaBuffer=[]}record(d){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:g(),settings:d})}_drainInertiaBuffer(){let d=this._inertiaBuffer,P=g();for(;d.length>0&&P-d[0].time>160;)d.shift()}_onMoveEnd(d){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let P={zoom:0,bearing:0,pitch:0,roll:0,pan:new i.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:$}of this._inertiaBuffer)P.zoom+=$.zoomDelta||0,P.bearing+=$.bearingDelta||0,P.pitch+=$.pitchDelta||0,P.roll+=$.rollDelta||0,$.panDelta&&P.pan._add($.panDelta),$.around&&(P.around=$.around),$.pinchAround&&(P.pinchAround=$.pinchAround);let N=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,H={};if(P.pan.mag()){let $=Al(P.pan.mag(),N,i.e({},Ku,d||{})),se=P.pan.mult($.amount/P.pan.mag()),de=this._map.cameraHelper.handlePanInertia(se,this._map.transform);H.center=de.easingCenter,H.offset=de.easingOffset,Bf(H,$)}if(P.zoom){let $=Al(P.zoom,N,fu);H.zoom=i.cw(this._map.transform.zoom+$.amount,this._map.getZoomSnap(),$.amount),Bf(H,$)}if(P.bearing){let $=Al(P.bearing,N,Ju);H.bearing=this._map.transform.bearing+i.al($.amount,-179,179),Bf(H,$)}if(P.pitch){let $=Al(P.pitch,N,Qu);H.pitch=this._map.transform.pitch+$.amount,Bf(H,$)}if(P.roll){let $=Al(P.roll,N,Wd);H.roll=this._map.transform.roll+i.al($.amount,-179,179),Bf(H,$)}if(H.zoom||H.bearing){let $=P.pinchAround===void 0?P.around:P.pinchAround;H.around=$?this._map.unproject($):this._map.getCenter()}return this.clear(),i.e(H,{noMoveStart:!0})}}function Bf(Y,d){(!Y.duration||Y.durationP.unproject(Ae))),de=$.reduce(((Ae,Fe,Ie,Ye)=>Ae.add(Fe.div(Ye.length))),new i.P(0,0));super(d,{points:$,point:de,lngLats:se,lngLat:P.unproject(de),originalEvent:N}),this._defaultPrevented=!1}}class jh extends i.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(d,P,N){super(d,{originalEvent:N}),this._defaultPrevented=!1}}class Wh{constructor(d,P){this._map=d,this._clickTolerance=P.clickTolerance}reset(){delete this._mousedownPos}wheel(d){return this._firePreventable(new jh(d.type,this._map,d))}mousedown(d,P){return this._mousedownPos=P,this._firePreventable(new Xl(d.type,this._map,d))}mouseup(d){this._map.fire(new Xl(d.type,this._map,d))}click(d,P){this._mousedownPos&&this._mousedownPos.dist(P)>=this._clickTolerance||this._map.fire(new Xl(d.type,this._map,d))}dblclick(d){return this._firePreventable(new Xl(d.type,this._map,d))}mouseover(d){this._map.fire(new Xl(d.type,this._map,d))}mouseout(d){this._map.fire(new Xl(d.type,this._map,d))}touchstart(d){return this._firePreventable(new cf(d.type,this._map,d))}touchmove(d){this._map.fire(new cf(d.type,this._map,d))}touchend(d){this._map.fire(new cf(d.type,this._map,d))}touchcancel(d){this._map.fire(new cf(d.type,this._map,d))}_firePreventable(d){if(this._map.fire(d),d.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Yh{constructor(d){this._map=d}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(d){this._map.fire(new Xl(d.type,this._map,d))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Xl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(d){this._delayContextMenu?this._contextMenuEvent=d:this._ignoreContextMenu||this._map.fire(new Xl(d.type,this._map,d)),this._map.listens("contextmenu")&&d.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class hu{constructor(d){this._map=d}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(d){return this.transform.screenPointToLocation(i.P.convert(d),this._map.terrain)}}class Mu{constructor(d,P){this._map=d,this._tr=new hu(d),this._el=d.getCanvasContainer(),this._container=d.getContainer(),this._clickTolerance=P.clickTolerance||1,P.boxZoom&&typeof P.boxZoom=="object"&&(this._boxZoomEnd=P.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(d,P){this.isEnabled()&&d.shiftKey&&d.button===0&&(x.disableDrag(),this._startPos=this._lastPos=P,this._active=!0)}mousemoveWindow(d,P){if(!this._active)return;let N=P;if(this._lastPos.equals(N)||!this._box&&N.dist(this._startPos)$.fitScreenCoordinates(N,H,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",d)}keydown(d){this._active&&d.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",d))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),x.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(d,P){return this._map.fire(new i.n(d,{originalEvent:P}))}}function _i(Y,d){if(Y.length!==d.length)throw new Error(`The number of touches and points are not equal - touches ${Y.length}, points ${d.length}`);let P={};for(let N=0;Nthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=d.timeStamp),N.length===this.numTouches&&(this.centroid=(function(H){let $=new i.P(0,0);for(let se of H)$._add(se);return $.div(H.length)})(P),this.touches=_i(N,P)))}touchmove(d,P,N){if(this.aborted||!this.centroid)return;let H=_i(N,P);for(let $ in this.touches){let se=H[$];(!se||se.dist(this.touches[$])>30)&&(this.aborted=!0)}}touchend(d,P,N){if((!this.centroid||d.timeStamp-this.startTime>500)&&(this.aborted=!0),N.length===0){let H=!this.aborted&&this.centroid;if(this.reset(),H)return H}}}class Me{constructor(d){this.singleTap=new Su(d),this.numTaps=d.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(d,P,N){this.singleTap.touchstart(d,P,N)}touchmove(d,P,N){this.singleTap.touchmove(d,P,N)}touchend(d,P,N){let H=this.singleTap.touchend(d,P,N);if(H){let $=d.timeStamp-this.lastTime<500,se=!this.lastTap||this.lastTap.dist(H)<30;if($&&se||this.reset(),this.count++,this.lastTime=d.timeStamp,this.lastTap=H,this.count===this.numTaps)return this.reset(),H}}}class Ce{constructor(d){this._tr=new hu(d),this._zoomIn=new Me({numTouches:1,numTaps:2}),this._zoomOut=new Me({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(d,P,N){this._zoomIn.touchstart(d,P,N),this._zoomOut.touchstart(d,P,N)}touchmove(d,P,N){this._zoomIn.touchmove(d,P,N),this._zoomOut.touchmove(d,P,N)}touchend(d,P,N){let H=this._zoomIn.touchend(d,P,N),$=this._zoomOut.touchend(d,P,N),se=this._tr;return H?(this._active=!0,d.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:de=>de.easeTo({duration:300,zoom:i.cw(se.zoom+1,de.getZoomSnap()),around:se.unproject(H)},{originalEvent:d})}):$?(this._active=!0,d.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:de=>de.easeTo({duration:300,zoom:i.cw(se.zoom-1,de.getZoomSnap()),around:se.unproject($)},{originalEvent:d})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Be{constructor(d){this._enabled=!!d.enable,this._moveStateManager=d.moveStateManager,this._clickTolerance=d.clickTolerance||1,this._moveFunction=d.move,this._activateOnStart=!!d.activateOnStart,d.assignEvents(this),this.reset()}reset(d){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(d)}_move(...d){let P=this._moveFunction(...d);if(P.bearingDelta||P.pitchDelta||P.rollDelta||P.around||P.panDelta)return this._active=!0,P}dragStart(d,P){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(d)&&(this._moveStateManager.startMove(d),this._lastPoint=Array.isArray(P)?P[0]:P,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(d,P){if(!this.isEnabled())return;let N=this._lastPoint;if(!N)return;if(d.preventDefault(),!this._moveStateManager.isValidMoveEvent(d))return void this.reset(d);let H=Array.isArray(P)?P[0]:P;return!this._moved&&H.dist(N)!0}),P=new Gt){this.mouseMoveStateManager=d,this.oneFingerTouchMoveStateManager=P}_executeRelevantHandler(d,P,N){return d instanceof MouseEvent?P(d):typeof TouchEvent!="undefined"&&d instanceof TouchEvent?N(d):void 0}startMove(d){this._executeRelevantHandler(d,(P=>{this.mouseMoveStateManager.startMove(P)}),(P=>{this.oneFingerTouchMoveStateManager.startMove(P)}))}endMove(d){this._executeRelevantHandler(d,(P=>{this.mouseMoveStateManager.endMove(P)}),(P=>{this.oneFingerTouchMoveStateManager.endMove(P)}))}isValidStartEvent(d){return this._executeRelevantHandler(d,(P=>this.mouseMoveStateManager.isValidStartEvent(P)),(P=>this.oneFingerTouchMoveStateManager.isValidStartEvent(P)))}isValidMoveEvent(d){return this._executeRelevantHandler(d,(P=>this.mouseMoveStateManager.isValidMoveEvent(P)),(P=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(P)))}isValidEndEvent(d){return this._executeRelevantHandler(d,(P=>this.mouseMoveStateManager.isValidEndEvent(P)),(P=>this.oneFingerTouchMoveStateManager.isValidEndEvent(P)))}}let Nt=Y=>{Y.mousedown=Y.dragStart,Y.mousemoveWindow=Y.dragMove,Y.mouseup=Y.dragEnd,Y.contextmenu=d=>{d.preventDefault()}};class Kt{constructor(d,P){this._clickTolerance=d.clickTolerance||1,this._map=P,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new i.P(0,0)}_shouldBePrevented(d){return d<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(d,P,N){return this._calculateTransform(d,P,N)}touchmove(d,P,N){if(this._active){if(!this._shouldBePrevented(N.length))return d.preventDefault(),this._calculateTransform(d,P,N);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",d)}}touchend(d,P,N){this._calculateTransform(d,P,N),this._active&&this._shouldBePrevented(N.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(d,P,N){N.length>0&&(this._active=!0);let H=_i(N,P),$=new i.P(0,0),se=new i.P(0,0),de=0;for(let Fe in H){let Ie=H[Fe],Ye=this._touches[Fe];Ye&&($._add(Ie),se._add(Ie.sub(Ye)),de++,H[Fe]=Ie)}if(this._touches=H,this._shouldBePrevented(de)||!se.mag())return;let Ae=se.div(de);return this._sum._add(Ae),this._sum.mag()Math.abs(Y.x)}class Bi extends ur{constructor(d){super(),this._currentTouchCount=0,this._map=d}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(d,P,N){super.touchstart(d,P,N),this._currentTouchCount=N.length}_start(d){this._lastPoints=d,gi(d[0].sub(d[1]))&&(this._valid=!1)}_move(d,P,N){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let H=d[0].sub(this._lastPoints[0]),$=d[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(H,$,N.timeStamp),this._valid?(this._lastPoints=d,this._active=!0,{pitchDelta:(H.y+$.y)/2*-.5}):void 0}gestureBeginsVertically(d,P,N){if(this._valid!==void 0)return this._valid;let H=d.mag()>=2,$=P.mag()>=2;if(!H&&!$)return;if(!H||!$)return this._firstMove===void 0&&(this._firstMove=N),N-this._firstMove<100&&void 0;let se=d.y>0==P.y>0;return gi(d)&&gi(P)&&se}}let mi={panStep:100,bearingStep:15,pitchStep:10};class ia{constructor(d){this._tr=new hu(d);let P=mi;this._panStep=P.panStep,this._bearingStep=P.bearingStep,this._pitchStep=P.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(d){if(d.altKey||d.ctrlKey||d.metaKey)return;let P=0,N=0,H=0,$=0,se=0;switch(d.keyCode){case 61:case 107:case 171:case 187:P=1;break;case 189:case 109:case 173:P=-1;break;case 37:d.shiftKey?N=-1:(d.preventDefault(),$=-1);break;case 39:d.shiftKey?N=1:(d.preventDefault(),$=1);break;case 38:d.shiftKey?H=1:(d.preventDefault(),se=-1);break;case 40:d.shiftKey?H=-1:(d.preventDefault(),se=1);break;default:return}return this._rotationDisabled&&(N=0,H=0),{cameraAnimation:de=>{let Ae=this._tr;de.easeTo({duration:300,easeId:"keyboardHandler",easing:ua,zoom:P?i.cw(Ae.zoom+P*(d.shiftKey?2:1),de.getZoomSnap()):Ae.zoom,bearing:Ae.bearing+N*this._bearingStep,pitch:Ae.pitch+H*this._pitchStep,offset:[-$*this._panStep,-se*this._panStep],center:Ae.center},{originalEvent:d})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function ua(Y){return Y*(2-Y)}let lo=4.000244140625,Bo=1/450;class Ua{constructor(d,P){this._onTimeout=N=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(N)},this._map=d,this._tr=new hu(d),this._triggerRenderFrame=P,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Bo}setZoomRate(d){this._defaultZoomRate=d}setWheelZoomRate(d){this._wheelZoomRate=d}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(d){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!d&&d.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(d){return!!this._map.cooperativeGestures.isEnabled()&&!(d.ctrlKey||this._map.cooperativeGestures.isBypassed(d))}wheel(d){if(!this.isEnabled())return;if(this._shouldBePrevented(d))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",d);let P=d.deltaMode===WheelEvent.DOM_DELTA_LINE?40*d.deltaY:d.deltaY,N=g(),H=N-(this._lastWheelEventTime||0);this._lastWheelEventTime=N,P!==0&&P%lo==0?this._type="wheel":P!==0&&Math.abs(P)<4?this._type="trackpad":H>400?(this._type=null,this._lastValue=P,this._timeout=setTimeout(this._onTimeout,40,d)):this._type||(this._type=Math.abs(H*P)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,P+=this._lastValue)),d.shiftKey&&P&&(P/=4),this._type&&(this._lastWheelEvent=d,this._delta-=P,this._active||this._start(d)),d.preventDefault()}_start(d){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let P=x.mousePos(this._map.getCanvas(),d),N=this._tr;this._aroundPoint=this._aroundCenter?N.transform.locationToScreenPoint(i.W.convert(N.center)):P,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let d=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let de=d.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=de),typeof this._targetZoom=="number"&&(this._targetZoom+=de)}if(this._delta!==0){let de=this._type==="wheel"&&Math.abs(this._delta)>lo?this._wheelZoomRate:this._defaultZoomRate,Ae=2/(1+Math.exp(-Math.abs(this._delta*de)));this._delta<0&&Ae!==0&&(Ae=1/Ae);let Fe=typeof this._targetZoom!="number"?d.scale:i.ao(this._targetZoom),Ie=d.applyConstrain(d.getCameraLngLat(),i.ar(Fe*Ae)).zoom,Ye=this._map.getZoomSnap();if(this._type==="wheel"&&Ye>0){let st=i.cw(d.zoom,Ye);this._targetZoom=i.cw(Ie,Ye,Ie-st)}else this._targetZoom=Ie;this._type==="wheel"&&(this._startZoom=d.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let P=typeof this._targetZoom!="number"?d.zoom:this._targetZoom,N=this._startZoom,H=this._easing,$,se=!1;if(this._type==="wheel"&&N&&H){let de=g()-this._lastWheelEventTime,Ae=Math.min((de+5)/200,1),Fe=H(Ae);$=i.H.number(N,P,Fe),Ae<1?this._needsRerender=!0:se=!0}else $=P,se=!0;return this._active=!0,se&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout}),200)),this._lastExpectedZoom=$,{noInertia:!0,needsRenderFrame:!se,zoomDelta:$-d.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(d){let P=i.cy;if(this._prevEase){let N=this._prevEase,H=(g()-N.start)/N.duration,$=N.easing(H+.01)-N.easing(H),se=.27/Math.sqrt($*$+1e-4)*.01,de=Math.sqrt(.0729-se*se);P=i.cv(se,de,.25,1)}return this._prevEase={start:g(),duration:d,easing:P},P}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ls{constructor(d,P){this._clickZoom=d,this._tapZoom=P}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class cl{constructor(d){this._tr=new hu(d),this.reset()}reset(){this._active=!1}dblclick(d,P){return d.preventDefault(),{cameraAnimation:N=>{N.easeTo({duration:300,zoom:i.cw(this._tr.zoom+(d.shiftKey?-1:1),N.getZoomSnap()),around:this._tr.unproject(P)},{originalEvent:d})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Eu{constructor(){this._tap=new Me({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(d){this._zoomRate=d!=null?d:1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(d,P,N){if(!this._swipePoint)if(this._tapTime){let H=P[0],$=d.timeStamp-this._tapTime<500,se=this._tapPoint.dist(H)<30;$&&se?N.length>0&&(this._swipePoint=H,this._swipeTouch=N[0].identifier):this.reset()}else this._tap.touchstart(d,P,N)}touchmove(d,P,N){if(this._tapTime){if(this._swipePoint){if(N[0].identifier!==this._swipeTouch)return;let H=P[0],$=H.y-this._swipePoint.y;return this._swipePoint=H,d.preventDefault(),this._active=!0,{zoomDelta:$/128*this._zoomRate}}}else this._tap.touchmove(d,P,N)}touchend(d,P,N){if(this._tapTime)this._swipePoint&&N.length===0&&this.reset();else{let H=this._tap.touchend(d,P,N);H&&(this._tapTime=d.timeStamp,this._tapPoint=H)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class el{constructor(d,P,N){this._el=d,this._mousePan=P,this._touchPan=N}enable(d){this._inertiaOptions=d||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class yc{constructor(d,P,N,H){this._pitchWithRotate=d.pitchWithRotate,this._rollEnabled=d.rollEnabled,this._mouseRotate=P,this._mousePitch=N,this._mouseRoll=H}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class wi{constructor(d,P,N,H){this._el=d,this._touchZoom=P,this._touchRotate=N,this._tapDragZoom=H,this._rotationDisabled=!1,this._enabled=!0}enable(d){this._touchZoom.enable(d),this._rotationDisabled||this._touchRotate.enable(d),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(d){this._touchZoom.setZoomRate(d),this._tapDragZoom.setZoomRate(d)}setZoomThreshold(d){this._touchZoom.setZoomThreshold(d)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Di{constructor(d,P){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=d,this._options=P,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let d=this._map.getCanvasContainer();d.classList.add("maplibregl-cooperative-gestures"),this._container=x.create("div","maplibregl-cooperative-gesture-screen",d);let P=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(P=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let N=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),H=document.createElement("div");H.className="maplibregl-desktop-message",H.textContent=P,this._container.appendChild(H);let $=document.createElement("div");$.className="maplibregl-mobile-message",$.textContent=N,this._container.appendChild($),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(d){return d[this._bypassKey]}notifyGestureBlocked(d,P){this._enabled&&(this._map.fire(new i.n("cooperativegestureprevented",{gestureType:d,originalEvent:P})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}let fl=Y=>Y.zoom||Y.drag||Y.roll||Y.pitch||Y.rotate;class Fc extends i.n{}function du(Y){var d;return((d=Y.panDelta)===null||d===void 0?void 0:d.mag())||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta||Y.rollDelta}class ms{get _ownerDocument(){var d;return((d=this._el)===null||d===void 0?void 0:d.ownerDocument)||document}get _ownerWindow(){var d,P;return((P=(d=this._el)===null||d===void 0?void 0:d.ownerDocument)===null||P===void 0?void 0:P.defaultView)||window}constructor(d,P){this.handleWindowEvent=H=>{this.handleEvent(H,`${H.type}Window`)},this.handleEvent=(H,$)=>{if(H.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let se=H.type==="renderFrame"?void 0:H,de={needsRenderFrame:!1},Ae={},Fe={};for(let{handlerName:st,handler:ht,allowed:Pe}of this._handlers){if(!ht.isEnabled())continue;let Xe;if(this._blockedByActive(Fe,Pe,st))ht.reset();else if(ht[$||H.type]){if(i.cz(H,$||H.type)){let at=x.mousePos(this._map.getCanvas(),H);Xe=ht[$||H.type](H,at)}else if(i.cA(H,$||H.type)){let at=this._getMapTouches(H.touches),xt=x.touchPos(this._map.getCanvas(),at);Xe=ht[$||H.type](H,xt,at)}else i.cB($||H.type)||(Xe=ht[$||H.type](H));this.mergeHandlerResult(de,Ae,Xe,st,se),Xe!=null&&Xe.needsRenderFrame&&this._triggerRenderFrame()}(Xe||ht.isActive())&&(Fe[st]=ht)}let Ie={};for(let st in this._previousActiveHandlers)Fe[st]||(Ie[st]=se);this._previousActiveHandlers=Fe,(Object.keys(Ie).length||du(de))&&(this._changes.push([de,Ae,Ie]),this._triggerRenderFrame()),(Object.keys(Fe).length||du(de))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Ye}=de;Ye&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Ye(this._map))},this._map=d,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new x0(d),this._bearingSnap=P.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(P);let N=this._el;this._listeners=[[N,"touchstart",{passive:!0}],[N,"touchmove",{passive:!1}],[N,"touchend",void 0],[N,"touchcancel",void 0],[N,"mousedown",void 0],[N,"mousemove",void 0],[N,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[N,"mouseover",void 0],[N,"mouseout",void 0],[N,"dblclick",void 0],[N,"click",void 0],[N,"keydown",{capture:!1}],[N,"keyup",void 0],[N,"wheel",{passive:!1}],[N,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[H,$,se]of this._listeners)H.addEventListener($,H===this._ownerDocument?this.handleWindowEvent:this.handleEvent,se)}destroy(){for(let[d,P,N]of this._listeners)d.removeEventListener(P,d===this._ownerDocument?this.handleWindowEvent:this.handleEvent,N)}_addDefaultHandlers(d){let P=this._map,N=P.getCanvasContainer();this._add("mapEvent",new Wh(P,d));let H=P.boxZoom=new Mu(P,d);this._add("boxZoom",H),d.interactive&&d.boxZoom&&H.enable();let $=P.cooperativeGestures=new Di(P,d.cooperativeGestures);this._add("cooperativeGestures",$),d.cooperativeGestures&&$.enable();let se=new Ce(P),de=new cl(P);P.doubleClickZoom=new ls(de,se),this._add("tapZoom",se),this._add("clickZoom",de),d.interactive&&d.doubleClickZoom&&P.doubleClickZoom.enable();let Ae=new Eu;this._add("tapDragZoom",Ae);let Fe=P.touchPitch=new Bi(P);this._add("touchPitch",Fe),d.interactive&&d.touchPitch&&P.touchPitch.enable(d.touchPitch);let Ie=()=>P.project(P.getCenter()),Ye=(function({enable:St,clickTolerance:Pt,aroundCenter:$t=!0,minPixelCenterThreshold:Ht=100,rotateDegreesPerPixelMoved:dr=.8},Xr){let Or=new lt({checkCorrectEvent:$r=>$r.button===0&&$r.ctrlKey||$r.button===2&&!$r.ctrlKey});return new Be({clickTolerance:Pt,move:($r,Er)=>{let Tr=Xr();if($t&&Math.abs(Tr.y-$r.y)>Ht)return{bearingDelta:i.cx(new i.P($r.x,Er.y),Er,Tr)};let Rr=(Er.x-$r.x)*dr;return $t&&Er.ydr.button===0&&dr.ctrlKey||dr.button===2});return new Be({clickTolerance:Pt,move:(dr,Xr)=>({pitchDelta:(Xr.y-dr.y)*$t}),moveStateManager:Ht,enable:St,assignEvents:Nt})})(d),ht=(function({enable:St,clickTolerance:Pt,rollDegreesPerPixelMoved:$t=.3},Ht){let dr=new lt({checkCorrectEvent:Xr=>Xr.button===2&&Xr.ctrlKey});return new Be({clickTolerance:Pt,move:(Xr,Or)=>{let $r=Ht(),Er=(Or.x-Xr.x)*$t;return Or.y<$r.y&&(Er=-Er),{rollDelta:Er}},moveStateManager:dr,enable:St,assignEvents:Nt})})(d,Ie);P.dragRotate=new yc(d,Ye,st,ht),this._add("mouseRotate",Ye,["mousePitch"]),this._add("mousePitch",st,["mouseRotate","mouseRoll"]),this._add("mouseRoll",ht,["mousePitch"]),d.interactive&&d.dragRotate&&P.dragRotate.enable();let Pe=(function({enable:St,clickTolerance:Pt}){let $t=new lt({checkCorrectEvent:Ht=>Ht.button===0&&!Ht.ctrlKey});return new Be({clickTolerance:Pt,move:(Ht,dr)=>({around:dr,panDelta:dr.sub(Ht)}),activateOnStart:!0,moveStateManager:$t,enable:St,assignEvents:Nt})})(d),Xe=new Kt(d,P);P.dragPan=new el(N,Pe,Xe),this._add("mousePan",Pe),this._add("touchPan",Xe,["touchZoom","touchRotate"]),d.interactive&&d.dragPan&&P.dragPan.enable(d.dragPan);let at=new In,xt=new ln;P.touchZoomRotate=new wi(N,xt,at,Ae),this._add("touchRotate",at,["touchPan","touchZoom"]),this._add("touchZoom",xt,["touchPan","touchRotate"]),d.interactive&&d.touchZoomRotate&&P.touchZoomRotate.enable(d.touchZoomRotate),this._add("blockableMapEvent",new Yh(P));let Et=P.scrollZoom=new Ua(P,(()=>this._triggerRenderFrame()));this._add("scrollZoom",Et,["mousePan"]),d.interactive&&d.scrollZoom&&P.scrollZoom.enable(d.scrollZoom);let Bt=P.keyboard=new ia(P);this._add("keyboard",Bt),d.interactive&&d.keyboard&&P.keyboard.enable()}_add(d,P,N){this._handlers.push({handlerName:d,handler:P,allowed:N}),this._handlersById[d]=P}stop(d){if(!this._updatingCamera){for(let{handler:P}of this._handlers)P.reset();this._inertia.clear(),this._fireEvents({},{},d),this._changes=[]}}isActive(){for(let{handler:d}of this._handlers)if(d.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!fl(this._eventsInProgress)||this.isZooming()}_blockedByActive(d,P,N){for(let H in d)if(H!==N&&!(P!=null&&P.includes(H)))return!0;return!1}_getMapTouches(d){let P=[];for(let N of d)this._el.contains(N.target)&&P.push(N);return P}mergeHandlerResult(d,P,N,H,$){if(!N)return;i.e(d,N);let se={handlerName:H,originalEvent:N.originalEvent||$};N.zoomDelta!==void 0&&(P.zoom=se),N.panDelta!==void 0&&(P.drag=se),N.rollDelta!==void 0&&(P.roll=se),N.pitchDelta!==void 0&&(P.pitch=se),N.bearingDelta!==void 0&&(P.rotate=se)}_applyChanges(){let d={},P={},N={};for(let[H,$,se]of this._changes)H.panDelta&&(d.panDelta=(d.panDelta||new i.P(0,0))._add(H.panDelta)),H.zoomDelta&&(d.zoomDelta=(d.zoomDelta||0)+H.zoomDelta),H.bearingDelta&&(d.bearingDelta=(d.bearingDelta||0)+H.bearingDelta),H.pitchDelta&&(d.pitchDelta=(d.pitchDelta||0)+H.pitchDelta),H.rollDelta&&(d.rollDelta=(d.rollDelta||0)+H.rollDelta),H.around!==void 0&&(d.around=H.around),H.pinchAround!==void 0&&(d.pinchAround=H.pinchAround),H.noInertia&&(d.noInertia=H.noInertia),i.e(P,$),i.e(N,se);this._updateMapTransform(d,P,N),this._changes=[]}_updateMapTransform(d,P,N){let H=this._map,$=H._getTransformForUpdate(),se=H.terrain;if(!(du(d)||se&&this._terrainMovement))return void this._fireEvents(P,N,!0);H._stop(!0);let{panDelta:de,zoomDelta:Ae,bearingDelta:Fe,pitchDelta:Ie,rollDelta:Ye,around:st,pinchAround:ht}=d;ht!==void 0&&(st=ht),st||(st=H.transform.centerPoint),se&&!$.isPointOnMapSurface(st)&&(st=$.centerPoint);let Pe={panDelta:de,zoomDelta:Ae,rollDelta:Ye,pitchDelta:Ie,bearingDelta:Fe,around:st};this._map.cameraHelper.useGlobeControls&&!$.isPointOnMapSurface(st)&&(st=$.centerPoint);let Xe=st.distSqr($.centerPoint)<.01?$.center:$.screenPointToLocation(de?st.sub(de):st);this._handleMapControls({terrain:se,tr:$,deltasForHelper:Pe,preZoomAroundLoc:Xe,combinedEventsInProgress:P,panDelta:de}),H._applyUpdatedTransform($),this._map._update(),d.noInertia||this._inertia.record(d),this._fireEvents(P,N,!0)}_handleMapControls({terrain:d,tr:P,deltasForHelper:N,preZoomAroundLoc:H,combinedEventsInProgress:$,panDelta:se}){let de=this._map.cameraHelper;if(de.handleMapControlsRollPitchBearingZoom(N,P),d)return de.useGlobeControls?(this._terrainMovement||!$.drag&&!$.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void de.handleMapControlsPan(N,P,H)):this._terrainMovement||!$.drag&&!$.zoom?void($.drag&&this._terrainMovement&&se?P.setCenter(P.screenPointToLocation(P.centerPoint.sub(se))):de.handleMapControlsPan(N,P,H)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void de.handleMapControlsPan(N,P,H));de.handleMapControlsPan(N,P,H)}_fireEvents(d,P,N){let H=fl(this._eventsInProgress),$=fl(d),se={};for(let Ye in d){let{originalEvent:st}=d[Ye];this._eventsInProgress[Ye]||(se[`${Ye}start`]=st),this._eventsInProgress[Ye]=d[Ye]}!H&&$&&this._fireEvent("movestart",$.originalEvent);for(let Ye in se)this._fireEvent(Ye,se[Ye]);$&&this._fireEvent("move",$.originalEvent);for(let Ye in d){let{originalEvent:st}=d[Ye];this._fireEvent(Ye,st)}let de={},Ae;for(let Ye in this._eventsInProgress){let{handlerName:st,originalEvent:ht}=this._eventsInProgress[Ye];this._handlersById[st].isActive()||(delete this._eventsInProgress[Ye],Ae=P[st]||ht,de[`${Ye}end`]=Ae)}for(let Ye in de)this._fireEvent(Ye,de[Ye]);let Fe=fl(this._eventsInProgress),Ie=(H||$)&&!Fe;if(Ie&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Ye=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&Ye.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(Ye)}if(N&&Ie){this._updatingCamera=!0;let Ye=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),st=ht=>ht!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Fc("renderFrame",{timeStamp:d})),this._applyChanges()}))}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ff extends i.E{constructor(d,P,N){super(),this._renderFrameCallback=()=>{let H=Math.min((g()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(H)),H<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=d,this._bearingSnap=N.bearingSnap,this._zoomSnap=N.zoomSnap,this.cameraHelper=P,this.on("moveend",(()=>{delete this._requestedCameraState}))}migrateProjection(d,P){d.apply(this.transform,!0),this.transform=d,this.cameraHelper=P}getCenter(){return new i.W(this.transform.center.lng,this.transform.center.lat)}setCenter(d,P){return this.jumpTo({center:d},P)}getCenterElevation(){return this.transform.elevation}setCenterElevation(d,P){return this.jumpTo({elevation:d},P),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(d){this._centerClampedToGround=d}panBy(d,P,N){return d=i.P.convert(d).mult(-1),this.panTo(this.transform.center,i.e({offset:d},P),N)}panTo(d,P,N){return this.easeTo(i.e({center:d},P),N)}getZoom(){return this.transform.zoom}setZoom(d,P){return this.jumpTo({zoom:d},P),this}zoomTo(d,P,N){return this.easeTo(i.e({zoom:d},P),N)}zoomIn(d,P){return this.zoomTo(i.cw(this.getZoom()+1,this._zoomSnap),d,P),this}zoomOut(d,P){return this.zoomTo(i.cw(this.getZoom()-1,this._zoomSnap),d,P),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(d,P){return d!=this.transform.fov&&(this.transform.setFov(d),this.fire(new i.n("movestart",P)).fire(new i.n("move",P)).fire(new i.n("moveend",P))),this}getBearing(){return this.transform.bearing}setZoomSnap(d){return this._zoomSnap=d,this}getZoomSnap(){return this._zoomSnap}setBearing(d,P){return this.jumpTo({bearing:d},P),this}getPadding(){return this.transform.padding}setPadding(d,P){return this.jumpTo({padding:d},P),this}rotateTo(d,P,N){return this.easeTo(i.e({bearing:d},P),N)}resetNorth(d,P){return this.rotateTo(0,i.e({duration:1e3},d),P),this}resetNorthPitch(d,P){return this.easeTo(i.e({bearing:0,pitch:0,roll:0,duration:1e3},d),P),this}snapToNorth(d,P){return Math.abs(this.getBearing()){Xe.easeFunc(at),this.terrain&&!d.freezeElevation&&this._updateElevation(at),this._applyUpdatedTransform(N),this._fireMoveEvents(P)}),(at=>{this.terrain&&d.freezeElevation&&this._finalizeElevation(),this._afterEase(P,at)}),d),this}_prepareEase(d,P,N={}){this._moving=!0,P||N.moving||this.fire(new i.n("movestart",d)),this._zooming&&!N.zooming&&this.fire(new i.n("zoomstart",d)),this._rotating&&!N.rotating&&this.fire(new i.n("rotatestart",d)),this._pitching&&!N.pitching&&this.fire(new i.n("pitchstart",d)),this._rolling&&!N.rolling&&this.fire(new i.n("rollstart",d))}_prepareElevation(d){this._elevationCenter=d,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(d,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(d){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 P=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(d<1&&P!==this._elevationTarget){let N=this._elevationTarget-this._elevationStart;this._elevationStart+=d*(N-(P-(N*d+this._elevationStart))/(1-d)),this._elevationTarget=P}this.transform.setElevation(i.H.number(this._elevationStart,this._elevationTarget,d))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(d){if(!this.terrain&&d.elevation>=0&&d.pitch<=90)return{};let P=d.getCameraLngLat(),N=d.getCameraAltitude(),H=this.terrain?this.terrain.getElevationForLngLatZoom(P,d.zoom):0;if(Nthis._elevateCameraIfInsideTerrain(H))),this.transformCameraUpdate&&P.push((H=>this.transformCameraUpdate(H))),!P.length)return;let N=d.clone();for(let H of P){let $=N.clone(),{center:se,zoom:de,roll:Ae,pitch:Fe,bearing:Ie,elevation:Ye}=H($);se&&$.setCenter(se),Ye!==void 0&&$.setElevation(Ye),de!==void 0&&$.setZoom(de),Ae!==void 0&&$.setRoll(Ae),Fe!==void 0&&$.setPitch(Fe),Ie!==void 0&&$.setBearing(Ie),N.apply($,!1)}this.transform.apply(N,!1)}_fireMoveEvents(d){this.fire(new i.n("move",d)),this._zooming&&this.fire(new i.n("zoom",d)),this._rotating&&this.fire(new i.n("rotate",d)),this._pitching&&this.fire(new i.n("pitch",d)),this._rolling&&this.fire(new i.n("roll",d))}_afterEase(d,P){if(this._easeId&&P&&this._easeId===P)return;delete this._easeId;let N=this._zooming,H=this._rotating,$=this._pitching,se=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,N&&this.fire(new i.n("zoomend",d)),H&&this.fire(new i.n("rotateend",d)),$&&this.fire(new i.n("pitchend",d)),se&&this.fire(new i.n("rollend",d)),this.fire(new i.n("moveend",d))}flyTo(d,P){if(!d.essential&&f.prefersReducedMotion){let Er=i.V(d,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(Er,P)}this.stop(),"zoom"in(d=i.e({offset:[0,0],speed:1.2,curve:1.42,easing:i.cy},d))&&this._zoomSnap&&(d.zoom=i.cw(d.zoom,this._zoomSnap));let N=this._getTransformForUpdate(),H=N.bearing,$=N.pitch,se=N.roll,de=N.padding,Ae="bearing"in d?this._normalizeBearing(d.bearing,H):H,Fe="pitch"in d?+d.pitch:$,Ie="roll"in d?this._normalizeBearing(d.roll,se):se,Ye="padding"in d?d.padding:N.padding,st=i.P.convert(d.offset),ht=N.centerPoint.add(st),Pe=N.screenPointToLocation(ht),Xe=this.cameraHelper.handleFlyTo(N,{bearing:Ae,pitch:Fe,roll:Ie,padding:Ye,locationAtOffset:Pe,offsetAsPoint:st,center:d.center,minZoom:d.minZoom,zoom:d.zoom}),at=d.curve,xt=Math.max(N.width,N.height),Et=xt/Xe.scaleOfZoom,Bt=Xe.pixelPathLength;typeof Xe.scaleOfMinZoom=="number"&&(at=Math.sqrt(xt/Xe.scaleOfMinZoom/Bt*2));let St=at*at;function Pt(Er){let Tr=(Et*Et-xt*xt+(Er?-1:1)*St*St*Bt*Bt)/(2*(Er?Et:xt)*St*Bt);return Math.log(Math.sqrt(Tr*Tr+1)-Tr)}function $t(Er){return(Math.exp(Er)-Math.exp(-Er))/2}function Ht(Er){return(Math.exp(Er)+Math.exp(-Er))/2}let dr=Pt(!1),Xr=function(Er){return Ht(dr)/Ht(dr+at*Er)},Or=function(Er){return xt*((Ht(dr)*($t(Tr=dr+at*Er)/Ht(Tr))-$t(dr))/St)/Bt;var Tr},$r=(Pt(!0)-dr)/at;if(Math.abs(Bt)<2e-6||!isFinite($r)){if(Math.abs(xt-Et)<1e-6)return this.easeTo(d,P);let Er=Et0,Xr=Tr=>Math.exp(Er*at*Tr)}return d.duration="duration"in d?+d.duration:1e3*$r/("screenSpeed"in d?+d.screenSpeed/at:+d.speed),d.maxDuration&&d.duration>d.maxDuration&&(d.duration=0),this._zooming=!0,this._rotating=H!==Ae,this._pitching=Fe!==$,this._rolling=Ie!==se,this._padding=!N.isPaddingEqual(Ye),this._prepareEase(P,!1),this.terrain&&this._prepareElevation(Xe.targetCenter),this._ease((Er=>{let Tr=Er*$r,Rr=1/Xr(Tr),Lr=Or(Tr);this._rotating&&N.setBearing(i.H.number(H,Ae,Er)),this._pitching&&N.setPitch(i.H.number($,Fe,Er)),this._rolling&&N.setRoll(i.H.number(se,Ie,Er)),this._padding&&(N.interpolatePadding(de,Ye,Er),ht=N.centerPoint.add(st)),Xe.easeFunc(Er,Rr,Lr,ht),this.terrain&&!d.freezeElevation&&this._updateElevation(Er),this._applyUpdatedTransform(N),this._fireMoveEvents(P)}),(()=>{this.terrain&&d.freezeElevation&&this._finalizeElevation(),this._afterEase(P)}),d),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(d,P){var N;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let H=this._onEaseEnd;delete this._onEaseEnd,H.call(this,P)}return d||(N=this.handlers)===null||N===void 0||N.stop(!1),this}_ease(d,P,N){N.animate===!1||N.duration===0?(d(1),P()):(this._easeStart=g(),this._easeOptions=N,this._onEaseFrame=d,this._onEaseEnd=P,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(d,P){d=i.X(d,-180,180);let N=Math.abs(d-P);return Math.abs(d-360-P)MapLibre
'};class hl{constructor(d=ku){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=P=>{!P||P.sourceDataType!=="metadata"&&P.sourceDataType!=="visibility"&&P.dataType!=="style"&&P.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=d}getDefaultPosition(){return"bottom-right"}onAdd(d){return this._map=d,this._compact=this.options.compact,this._container=x.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=x.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=x.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(d,P){let N=this._map._getUIString(`AttributionControl.${P}`);d.title=N,d.setAttribute("aria-label",N)}_updateAttributions(){if(!this._map.style)return;let d=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?d=d.concat(this.options.customAttribution.map((H=>typeof H!="string"?"":H))):typeof this.options.customAttribution=="string"&&d.push(this.options.customAttribution)),this._map.style.stylesheet){let H=this._map.style.stylesheet;this.styleOwner=H.owner,this.styleId=H.id}let P=this._map.style.tileManagers;for(let H in P){let $=P[H];if($.used||$.usedForTerrain){let se=$.getSource();se.attribution&&!d.includes(se.attribution)&&d.push(se.attribution)}}d=d.filter((H=>String(H).trim())),d.sort(((H,$)=>H.length-$.length)),d=d.filter(((H,$)=>{for(let se=$+1;se{let P=this._container.children;if(P.length){let N=P[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&N.classList.add("maplibregl-compact"):N.classList.remove("maplibregl-compact")}},this.options=d}getDefaultPosition(){return"bottom-left"}onAdd(d){var P;this._map=d,this._compact=(P=this.options)===null||P===void 0?void 0:P.compact,this._container=x.create("div","maplibregl-ctrl");let N=x.create("a","maplibregl-ctrl-logo");return N.target="_blank",N.rel="noopener nofollow",N.href="https://maplibre.org/",N.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),N.setAttribute("rel","noopener nofollow"),this._container.appendChild(N),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class W{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(d){let P=++this._id;return this._queue.push({callback:d,id:P,cancelled:!1}),P}remove(d){let P=this._currentlyRunning,N=P?this._queue.concat(P):this._queue;for(let H of N)if(H.id===d)return void(H.cancelled=!0)}run(d=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let P=this._currentlyRunning=this._queue;this._queue=[];for(let N of P)if(!N.cancelled&&(N.callback(d),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var te=i.aS([{name:"a_pos3d",type:"Int16",components:3}]);class ve extends i.E{constructor(d){super(),this._lastTilesetChange=g(),this.tileManager=d,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=d._source.tileSize*2**this.deltaZoom,d.usedForTerrain=!0,d.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(d,P){this.tileManager.update(d,P),this._renderableTilesKeys=[];let N={};for(let H of ft(d,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:P,calculateTileZoom:this.tileManager._source.calculateTileZoom}))N[H.key]=!0,this._renderableTilesKeys.push(H.key),this._tiles[H.key]||(H.terrainRttPosMatrix32f=new Float64Array(16),i.c7(H.terrainRttPosMatrix32f,0,i.a6,i.a6,0,0,1),this._tiles[H.key]=new mt(H,this.tileSize),this._lastTilesetChange=g());for(let H in this._tiles)N[H]||delete this._tiles[H]}freeRtt(d){for(let P in this._tiles){let N=this._tiles[P];(!d||N.tileID.equals(d)||N.tileID.isChildOf(d)||d.isChildOf(N.tileID))&&(N.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((d=>this.getTileByID(d)))}getTileByID(d){return this._tiles[d]}getTerrainCoords(d,P){return P?this._getTerrainCoordsForTileRanges(d,P):this._getTerrainCoordsForRegularTile(d)}_getTerrainCoordsForRegularTile(d){let P={};for(let N of this._renderableTilesKeys){let H=this._tiles[N].tileID,$=d.clone(),se=i.bj();if(H.canonical.equals(d.canonical))i.c7(se,0,i.a6,i.a6,0,0,1);else if(H.canonical.isChildOf(d.canonical)){let de=H.canonical.z-d.canonical.z,Ae=H.canonical.x-(H.canonical.x>>de<>de<>de;i.c7(se,0,Ie,Ie,0,0,1),i.Q(se,se,[-Ae*Ie,-Fe*Ie,0])}else{if(!d.canonical.isChildOf(H.canonical))continue;{let de=d.canonical.z-H.canonical.z,Ae=d.canonical.x-(d.canonical.x>>de<>de<>de;i.c7(se,0,i.a6,i.a6,0,0,1),i.Q(se,se,[Ae*Ie,Fe*Ie,0]),i.S(se,se,[1/2**de,1/2**de,0])}}$.terrainRttPosMatrix32f=new Float32Array(se),P[N]=$}return P}_getTerrainCoordsForTileRanges(d,P){let N={};for(let H of this._renderableTilesKeys){let $=this._tiles[H].tileID;if(!this._isWithinTileRanges($,P))continue;let se=d.clone(),de=i.bj();if($.canonical.z===d.canonical.z){let Ae=d.canonical.x-$.canonical.x+d.wrap*(1<d.canonical.z){let Ae=$.canonical.z-d.canonical.z,Fe=$.canonical.x-($.canonical.x>>Ae<>Ae<>Ae),st=d.canonical.y-($.canonical.y>>Ae),ht=i.a6>>Ae;i.c7(de,0,ht,ht,0,0,1),i.Q(de,de,[-Fe*ht+Ye*i.a6,-Ie*ht+st*i.a6,0])}else{let Ae=d.canonical.z-$.canonical.z,Fe=d.canonical.x-(d.canonical.x>>Ae<>Ae<>Ae)-$.canonical.x,st=(d.canonical.y>>Ae)-$.canonical.y,ht=i.a6<$.maxzoom&&(se=$.maxzoom),se<$.minzoom)return;(N=this._sourceTileCache)[H=d.key]||(N[H]=d.scaledTo(se).key);let de=this.findTileInCaches(this._sourceTileCache[d.key]);if(!(de!=null&&de.dem)&&P)for(;se>=$.minzoom&&!(de!=null&&de.dem);)de=this.findTileInCaches(d.scaledTo(se--).key);return de}findTileInCaches(d){let P=this.tileManager.getTileByID(d);return P||(P=this.tileManager._outOfViewCache.getByKey(d),P)}anyTilesAfterTime(d=Date.now()){return this._lastTilesetChange>=d}_isWithinTileRanges(d,P){let N=P[d.canonical.z];return!!N&&(d.wrap>N.minWrap||d.wrap=N.minTileXWrapped&&d.canonical.x<=N.maxTileXWrapped&&d.canonical.y>=N.minTileY&&d.canonical.y<=N.maxTileY)}}class Se{constructor(d,P,N){this._meshCache={},this.painter=d,this.tileManager=new ve(P),this.options=N,this.exaggeration=typeof N.exaggeration=="number"?N.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null);for(let d in this._meshCache)this._meshCache[d].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(d,P,N,H=i.a6){var $;let se=d.normalizeCoordinates(P,N,H);if(!se)return 0;let de=this.getTerrainData(se.tileID),Ae=($=de.tile)===null||$===void 0?void 0:$.dem;if(!Ae)return 0;let Fe=i.cC([],[se.x/H*i.a6,se.y/H*i.a6],de.u_terrain_matrix),Ie=[Fe[0]*Ae.dim,Fe[1]*Ae.dim],Ye=Math.floor(Ie[0]),st=Math.floor(Ie[1]),ht=Ie[0]-Ye,Pe=Ie[1]-st;return Ae.get(Ye,st)*(1-ht)*(1-Pe)+Ae.get(Ye+1,st)*ht*(1-Pe)+Ae.get(Ye,st+1)*(1-ht)*Pe+Ae.get(Ye+1,st+1)*ht*Pe}getElevationForLngLatZoom(d,P){if(!i.cD(P,d.wrap()))return 0;let{tileID:N,mercatorX:H,mercatorY:$}=this._getOverscaledTileIDFromLngLatZoom(d,P);return this.getElevation(N,H%i.a6,$%i.a6,i.a6)}getElevationForLngLat(d,P){let N=ft(P,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),H=0;for(let $ of N)$.canonical.z>H&&(H=Math.min($.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(d,H)}getElevation(d,P,N,H=i.a6){return this.getDEMElevation(d,P,N,H)*this.exaggeration}getTerrainData(d){var P,N;if(!this._emptyDemTexture){let se=this.painter.context,de=new i.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new i.T(se,de,se.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new i.T(se,new i.R({width:1,height:1}),se.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(se.gl.NEAREST,se.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=i.ap([])}let H=this.tileManager.getSourceTile(d,!0);if(H!=null&&H.dem&&(!H.demTexture||H.needsTerrainPrepare)){let se=this.painter.context;H.demTexture=this.painter.getTileTexture(H.dem.stride),H.demTexture?H.demTexture.update(H.dem.getPixels(),{premultiply:!1}):H.demTexture=new i.T(se,H.dem.getPixels(),se.gl.RGBA,{premultiply:!1}),H.demTexture.bind(se.gl.NEAREST,se.gl.CLAMP_TO_EDGE),H.needsTerrainPrepare=!1}let $=H&&H.toString()+H.tileID.key+d.key;if($&&!this._demMatrixCache[$]){let se=this.tileManager.getSource().maxzoom,de=d.canonical.z-H.tileID.canonical.z;d.overscaledZ>d.canonical.z&&(d.canonical.z>=se?de=d.canonical.z-se:i.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Ae=d.canonical.x-(d.canonical.x>>de<>de<>8<<4|$>>8,P[se+3]=0;let N=new i.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(P.buffer)),H=new i.T(d,N,d.gl.RGBA,{premultiply:!1});return H.bind(d.gl.NEAREST,d.gl.CLAMP_TO_EDGE),this._coordsTexture=H,H}pointCoordinate(d){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let P=new Uint8Array(4),N=this.painter.context,H=N.gl,$=Math.round(d.x*this.painter.pixelRatio/devicePixelRatio),se=Math.round(d.y*this.painter.pixelRatio/devicePixelRatio),de=Math.round(this.painter.height/devicePixelRatio);N.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),H.readPixels($,de-se-1,1,1,H.RGBA,H.UNSIGNED_BYTE,P),N.bindFramebuffer.set(null);let Ae=P[0]+(P[2]>>4<<8),Fe=P[1]+((15&P[2])<<8),Ie=this.coordsIndex[255-P[3]],Ye=Ie&&this.tileManager.getTileByID(Ie);if(!Ye)return null;let st=this._coordsTextureSize,ht=(1<0,H=N&&d.canonical.y===0,$=N&&d.canonical.y===(1<d.id!==P)),this._recentlyUsed.push(d.id)}stampObject(d){d.stamp=++this._stamp}getOrCreateFreeObject(){for(let P of this._recentlyUsed)if(!this._objects[P].inUse)return this._objects[P];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let d=this._createObject(this._objects.length);return this._objects.push(d),d}freeObject(d){d.inUse=!1}freeAllObjects(){for(let d of this._objects)this.freeObject(d)}isFull(){return!(this._objects.length!d.inUse))===!1}}let Re={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class nt{constructor(d,P){this.painter=d,this.terrain=P,this.pool=new Ee(d.context,30,P.tileManager.tileSize*P.qualityFactor)}destruct(){this.pool.destruct()}getTexture(d){return this.pool.getObjectForId(d.rtt[this._stacks.length-1].id).texture}prepareForRender(d,P){var N,H,$;this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=d._order.filter((se=>!d._layers[se].isHidden(P))),this._coordsAscending={};for(let se in d.tileManagers){this._coordsAscending[se]={};let de=d.tileManagers[se].getVisibleCoordinates(),Ae=d.tileManagers[se].getSource(),Fe=Ae instanceof qe?Ae.terrainTileRanges:null;for(let Ie of de){let Ye=this.terrain.tileManager.getTerrainCoords(Ie,Fe);for(let st in Ye)($=this._coordsAscending[se])[st]||($[st]=[]),this._coordsAscending[se][st].push(Ye[st])}}this._rttFingerprints={};for(let se of d._order){let de=d._layers[se],Ae=de.source;if(Re[de.type]&&!this._rttFingerprints[Ae]){this._rttFingerprints[Ae]={};let Fe=(H=(N=d.tileManagers[Ae])===null||N===void 0?void 0:N.getState().revision)!==null&&H!==void 0?H:0;for(let Ie in this._coordsAscending[Ae])this._rttFingerprints[Ae][Ie]=`${this._coordsAscending[Ae][Ie].map((Ye=>Ye.key)).sort().join()}#${Fe}`}}for(let se of this._renderableTiles)for(let de in this._rttFingerprints){let Ae=this._rttFingerprints[de][se.tileID.key];Ae&&Ae!==se.rttFingerprint[de]&&(se.rtt=[])}}renderLayer(d,P){if(d.isHidden(this.painter.transform.zoom))return!1;let N=Object.assign(Object.assign({},P),{isRenderingToTexture:!0}),H=d.type,$=this.painter,se=this._renderableLayerIds[this._renderableLayerIds.length-1]===d.id;if(Re[H]&&(this._prevType&&Re[this._prevType]||this._stacks.push([]),this._prevType=H,this._stacks[this._stacks.length-1].push(d.id),!se))return!0;if(Re[this._prevType]||Re[H]&&se){this._prevType=H;let de=this._stacks.length-1,Ae=this._stacks[de]||[];for(let Fe of this._renderableTiles){if(this.pool.isFull()&&(mc(this.painter,this.terrain,this._rttTiles,N),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Fe),Fe.rtt[de]){let Ye=this.pool.getObjectForId(Fe.rtt[de].id);if(Ye.stamp===Fe.rtt[de].stamp){this.pool.useObject(Ye);continue}}let Ie=this.pool.getOrCreateFreeObject();this.pool.useObject(Ie),this.pool.stampObject(Ie),Fe.rtt[de]={id:Ie.id,stamp:Ie.stamp},$.context.bindFramebuffer.set(Ie.fbo.framebuffer),$.context.clear({color:i.bo.transparent,stencil:0}),$.currentStencilSource=void 0;for(let Ye of Ae){let st=$.style._layers[Ye],ht=st.source?this._coordsAscending[st.source][Fe.tileID.key]:[Fe.tileID];$.context.viewport.set([0,0,Ie.fbo.width,Ie.fbo.height]),$._renderTileClippingMasks(st,ht,!0),$.renderLayer($,$.style.tileManagers[st.source],st,ht,N),st.source&&(Fe.rttFingerprint[st.source]=this._rttFingerprints[st.source][Fe.tileID.key])}}return mc(this.painter,this.terrain,this._rttTiles,N),this._rttTiles=[],this.pool.freeAllObjects(),Re[H]}return!1}}let He={"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"},vt=o,Ft={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:ku,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:i.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},Rt=class extends ff{get _ownerWindow(){var Y,d;return((d=(Y=this._container)===null||Y===void 0?void 0:Y.ownerDocument)===null||d===void 0?void 0:d.defaultView)||window}constructor(Y){var d,P,N;let H=Object.assign(Object.assign(Object.assign({},Ft),Y),{canvasContextAttributes:Object.assign(Object.assign({},Ft.canvasContextAttributes),Y.canvasContextAttributes)});if(H.minZoom!=null&&H.maxZoom!=null&&H.minZoom>H.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(H.minPitch!=null&&H.maxPitch!=null&&H.minPitch>H.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(H.minPitch!=null&&H.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(H.maxPitch!=null&&H.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let $=new Ls,se=new Gu;H.minZoom!==void 0&&$.setMinZoom(H.minZoom),H.maxZoom!==void 0&&$.setMaxZoom(H.maxZoom),H.minPitch!==void 0&&$.setMinPitch(H.minPitch),H.maxPitch!==void 0&&$.setMaxPitch(H.maxPitch),H.renderWorldCopies!==void 0&&$.setRenderWorldCopies(H.renderWorldCopies),H.transformConstrain!==null&&$.setConstrainOverride(H.transformConstrain),super($,se,{bearingSnap:H.bearingSnap,zoomSnap:H.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new W,this._controls=[],this._mapId=i.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=Ae=>{if(Ae.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let Fe of Object.values(this.style._layers))if(Fe.type==="custom"&&console.warn(`Custom layer with id '${Fe.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),Fe._listeners)for(let[Ie]of Object.entries(Fe._listeners))console.warn(`Custom layer with id '${Fe.id}' had event listeners for event '${Ie}' 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 i.n("webglcontextlost",{originalEvent:Ae}))}else this.fire(new i.n("webglcontextlost",{originalEvent:Ae}))},this._contextRestored=Ae=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new i.n("webglcontextrestored",{originalEvent:Ae}))},this._onMapScroll=Ae=>{if(Ae.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=H.interactive,this._maxTileCacheSize=H.maxTileCacheSize,this._maxTileCacheZoomLevels=H.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},H.canvasContextAttributes),this._trackResize=H.trackResize===!0,this._bearingSnap=H.bearingSnap,this._zoomSnap=H.zoomSnap,this._centerClampedToGround=H.centerClampedToGround,this._refreshExpiredTiles=H.refreshExpiredTiles===!0,this._fadeDuration=H.fadeDuration,this._crossSourceCollisions=H.crossSourceCollisions===!0,this._collectResourceTiming=H.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},He),H.locale),this._clickTolerance=H.clickTolerance,this._overridePixelRatio=H.pixelRatio,this._maxCanvasSize=H.maxCanvasSize,this._zoomLevelsToOverscale=H.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=H.transformCameraUpdate,this.transformConstrain=H.transformConstrain,this.cancelPendingTileRequestsWhileZooming=H.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(H.anisotropicFilterPitch),H.reduceMotion!==void 0&&(f.prefersReducedMotion=H.reduceMotion),this._imageQueueHandle=_.addThrottleControl((()=>this.isMoving())),this._requestManager=new y(H.transformRequest),this._container=this._resolveContainer(H.container),H.maxBounds&&this.setMaxBounds(H.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",(()=>this._update(!1))),this.on("moveend",(()=>this._update(!1))),this.on("zoom",(()=>this._update(!0))),this.on("terrain",(()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)})),this.once("idle",(()=>this._idleTriggered=!0)),typeof window!="undefined"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new ms(this,H),this._hash=H.hash?new gh(typeof H.hash=="string"&&H.hash||void 0).addTo(this):void 0,!((d=this._hash)===null||d===void 0)&&d._onHashChange()||(this.jumpTo({center:H.center,elevation:H.elevation,zoom:H.zoom,bearing:H.bearing,pitch:H.pitch,roll:H.roll}),H.bounds&&(this.resize(),this.fitBounds(H.bounds,i.e({},H.fitBoundsOptions,{duration:0}))));let de=typeof H.style=="string"||((N=(P=H.style)===null||P===void 0?void 0:P.projection)===null||N===void 0?void 0:N.type)!=="globe";this.resize(null,de),this._localIdeographFontFamily=H.localIdeographFontFamily,this._validateStyle=H.validateStyle,H.style&&this.setStyle(H.style,{localIdeographFontFamily:H.localIdeographFontFamily}),H.attributionControl&&this.addControl(new hl(typeof H.attributionControl=="boolean"?void 0:H.attributionControl)),H.maplibreLogo&&this.addControl(new mh,H.logoPosition),this.on("style.load",(()=>{if(de||this._resizeTransform(),this.transform.unmodified){let Ae=i.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(Ae)}})),this.on("data",(Ae=>{this._update(Ae.dataType==="style"),this.fire(new i.n(`${Ae.dataType}data`,Ae))})),this.on("dataloading",(Ae=>{this.fire(new i.n(`${Ae.dataType}dataloading`,Ae))})),this.on("dataabort",(Ae=>{this.fire(new i.n("sourcedataabort",Ae))}))}_getMapId(){return this._mapId}setGlobalStateProperty(Y,d){return this.style.setGlobalStateProperty(Y,d),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(Y,d){if(d===void 0&&(d=Y.getDefaultPosition?Y.getDefaultPosition():"top-right"),!(Y!=null&&Y.onAdd))return this.fire(new i.l(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let P=Y.onAdd(this);this._controls.push(Y);let N=this._controlPositions[d];return d.includes("bottom")?N.insertBefore(P,N.firstChild):N.appendChild(P),this}removeControl(Y){if(!(Y!=null&&Y.onRemove))return this.fire(new i.l(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let d=this._controls.indexOf(Y);return d>-1&&this._controls.splice(d,1),Y.onRemove(this),this}hasControl(Y){return this._controls.includes(Y)}coveringTiles(Y){return ft(this.transform,Y)}calculateCameraOptionsFromTo(Y,d,P,N){return N==null&&this.terrain&&(N=this.terrain.getElevationForLngLat(P,this.transform)),super.calculateCameraOptionsFromTo(Y,d,P,N)}resize(Y,d=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(d);let P=!this._moving;return P&&(this.stop(),this.fire(new i.n("movestart",Y)).fire(new i.n("move",Y))),this.fire(new i.n("resize",Y)),P&&this.fire(new i.n("moveend",Y)),this}_resizeInternal(Y=!0){let[d,P]=this._containerDimensions(),N=this._getClampedPixelRatio(d,P);if(this._resizeCanvas(d,P,N),this.painter.resize(d,P,N),this.painter.overLimit()){let H=this.painter.context.gl;this._maxCanvasSize=[H.drawingBufferWidth,H.drawingBufferHeight];let $=this._getClampedPixelRatio(d,P);this._resizeCanvas(d,P,$),this.painter.resize(d,P,$)}this._resizeTransform(Y)}_resizeTransform(Y=!0){var d;let[P,N]=this._containerDimensions();this.transform.resize(P,N,Y),(d=this._requestedCameraState)===null||d===void 0||d.resize(P,N,Y)}_getClampedPixelRatio(Y,d){let{0:P,1:N}=this._maxCanvasSize,H=this.getPixelRatio(),$=Y*H,se=d*H;return Math.min($>P?P/$:1,se>N?N/se:1)*H}getPixelRatio(){var Y;return(Y=this._overridePixelRatio)!==null&&Y!==void 0?Y:devicePixelRatio}setPixelRatio(Y){this._overridePixelRatio=Y,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Y){return this.transform.setMaxBounds(ie.convert(Y)),this._update()}setMinZoom(Y){if((Y=Y==null?-2:Y)>=-2&&Y<=this.transform.maxZoom){let d=this.transform.zoom,P=this._getTransformForUpdate();return P.setMinZoom(Y),this._applyUpdatedTransform(P),this._update(),d!==this.transform.zoom&&this.fire(new i.n("zoomstart")).fire(new i.n("zoom")).fire(new i.n("zoomend")).fire(new i.n("movestart")).fire(new i.n("move")).fire(new i.n("moveend")),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(Y){if((Y=Y==null?22:Y)>=this.transform.minZoom){let d=this.transform.zoom,P=this._getTransformForUpdate();return P.setMaxZoom(Y),this._applyUpdatedTransform(P),this._update(),d!==this.transform.zoom&&this.fire(new i.n("zoomstart")).fire(new i.n("zoom")).fire(new i.n("zoomend")).fire(new i.n("movestart")).fire(new i.n("move")).fire(new i.n("moveend")),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Y){if((Y=Y==null?0:Y)<0)throw new Error("minPitch must be greater than or equal to 0");if(Y>=0&&Y<=this.transform.maxPitch){let d=this.transform.pitch,P=this._getTransformForUpdate();return P.setMinPitch(Y),this._applyUpdatedTransform(P),this._update(),d!==this.transform.pitch&&this.fire(new i.n("pitchstart")).fire(new i.n("pitch")).fire(new i.n("pitchend")).fire(new i.n("movestart")).fire(new i.n("move")).fire(new i.n("moveend")),this}throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(Y){if((Y=Y==null?60:Y)>180)throw new Error("maxPitch must be less than or equal to 180");if(Y>=this.transform.minPitch){let d=this.transform.pitch,P=this._getTransformForUpdate();return P.setMaxPitch(Y),this._applyUpdatedTransform(P),this._update(),d!==this.transform.pitch&&this.fire(new i.n("pitchstart")).fire(new i.n("pitch")).fire(new i.n("pitchend")).fire(new i.n("movestart")).fire(new i.n("move")).fire(new i.n("moveend")),this}throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(Y){if((Y=Y==null?20:Y)>180)throw new Error("anisotropicFilterPitch must be less than or equal to 180");if(Y<0)throw new Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=Y,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Y){return this.transform.setRenderWorldCopies(Y),this._update()}setTransformConstrain(Y){return this.transform.setConstrainOverride(Y),this._update()}project(Y){return this.transform.locationToScreenPoint(i.W.convert(Y),this.style&&this.terrain)}unproject(Y){return this.transform.screenPointToLocation(i.P.convert(Y),this.terrain)}isMoving(){var Y;return this._moving||((Y=this.handlers)===null||Y===void 0?void 0:Y.isMoving())}isZooming(){var Y;return this._zooming||((Y=this.handlers)===null||Y===void 0?void 0:Y.isZooming())}isRotating(){var Y;return this._rotating||((Y=this.handlers)===null||Y===void 0?void 0:Y.isRotating())}_createDelegatedListener(Y,d,P){if(Y==="mouseenter"||Y==="mouseover"){let N=!1;return{layers:d,listener:P,delegates:{mousemove:$=>{let se=d.filter((Ae=>this.getLayer(Ae))),de=se.length!==0?this.queryRenderedFeatures($.point,{layers:se}):[];de.length?N||(N=!0,P.call(this,new Xl(Y,this,$.originalEvent,{features:de}))):N=!1},mouseout:()=>{N=!1}}}}if(Y==="mouseleave"||Y==="mouseout"){let N=!1;return{layers:d,listener:P,delegates:{mousemove:se=>{let de=d.filter((Ae=>this.getLayer(Ae)));(de.length!==0?this.queryRenderedFeatures(se.point,{layers:de}):[]).length?N=!0:N&&(N=!1,P.call(this,new Xl(Y,this,se.originalEvent)))},mouseout:se=>{N&&(N=!1,P.call(this,new Xl(Y,this,se.originalEvent)))}}}}{let N=H=>{let $=d.filter((de=>this.getLayer(de))),se=$.length!==0?this.queryRenderedFeatures(H.point,{layers:$}):[];se.length&&(H.features=se,P.call(this,H),delete H.features)};return{layers:d,listener:P,delegates:{[Y]:N}}}}_saveDelegatedListener(Y,d){var P;this._delegatedListeners||(this._delegatedListeners={}),(P=this._delegatedListeners)[Y]||(P[Y]=[]),this._delegatedListeners[Y].push(d)}_removeDelegatedListener(Y,d,P){var N;if(!(!((N=this._delegatedListeners)===null||N===void 0)&&N[Y]))return;let H=this._delegatedListeners[Y];for(let $=0;$d.includes(de)))){for(let de in se.delegates)this.off(de,se.delegates[de]);return void H.splice($,1)}}}on(Y,d,P){if(P===void 0)return super.on(Y,d);let N=typeof d=="string"?[d]:d,H=this._createDelegatedListener(Y,N,P);this._saveDelegatedListener(Y,H);for(let $ in H.delegates)this.on($,H.delegates[$]);return{unsubscribe:()=>{this._removeDelegatedListener(Y,N,P)}}}once(Y,d,P){if(P===void 0)return super.once(Y,d);let N=typeof d=="string"?[d]:d,H=this._createDelegatedListener(Y,N,P);for(let $ in H.delegates){let se=H.delegates[$];H.delegates[$]=(...de)=>{this._removeDelegatedListener(Y,N,P),se(...de)}}this._saveDelegatedListener(Y,H);for(let $ in H.delegates)this.once($,H.delegates[$]);return this}off(Y,d,P){return P===void 0?super.off(Y,d):(this._removeDelegatedListener(Y,typeof d=="string"?[d]:d,P),this)}queryRenderedFeatures(Y,d){if(!this.style)return[];let P,N=Y instanceof i.P||Array.isArray(Y),H=N?Y:[[0,0],[this.transform.width,this.transform.height]];if(d||(d=(N?{}:Y)||{}),H instanceof i.P||typeof H[0]=="number")P=[i.P.convert(H)];else{let $=i.P.convert(H[0]),se=i.P.convert(H[1]);P=[$,new i.P(se.x,$.y),se,new i.P($.x,se.y),$]}return this.style.queryRenderedFeatures(P,d,this.transform)}querySourceFeatures(Y,d){return this.style.querySourceFeatures(Y,d)}setStyle(Y,d){return(d=i.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},d)).diff!==!1&&d.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Y?(this._diffStyle(Y,d),this):(this._localIdeographFontFamily=d.localIdeographFontFamily,this._updateStyle(Y,d))}setTransformRequest(Y){return this._requestManager.setTransformRequest(Y),this}_getUIString(Y){let d=this._locale[Y];if(d==null)throw new Error(`Missing UI string '${Y}'`);return d}_updateStyle(Y,d){var P,N,H;if((P=this._diffStyleRequest)===null||P===void 0||P.abort(),this._diffStyleRequest=null,d.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(Y,d)));let $=this.style&&d.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Y)),Y?(this.style=new Cc(this,d||{}),this.style.setEventedParent(this,{style:this.style}),typeof Y=="string"?this.style.loadURL(Y,d,$):this.style.loadJSON(Y,d,$),this):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),(H=(N=this.style)===null||N===void 0?void 0:N.projection)===null||H===void 0||H.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Cc(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(Y,d){return i._(this,void 0,void 0,(function*(){var P;if((P=this._diffStyleRequest)===null||P===void 0||P.abort(),typeof Y=="string"){let N=Y;this._diffStyleRequest=new AbortController;let H=this._diffStyleRequest;try{let $=yield this._requestManager.transformRequest(N,"Style");if(H.signal.aborted)return void(this._diffStyleRequest=null);let se=yield i.k($,H);this._diffStyleRequest=null,this._updateDiff(se.data,d)}catch($){this._diffStyleRequest=null,i.$($)||this.fire(new i.l(i.d($)))}}else typeof Y=="object"&&(this._diffStyleRequest=null,this._updateDiff(Y,d))}))}_updateDiff(Y,d){try{this.style.setState(Y,d)&&this._update(!0)}catch(P){i.w(`Unable to perform style diff: ${i.d(P).message}. Rebuilding the style from scratch.`),this._updateStyle(Y,d)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();i.w("There is no style added to the map.")}addSource(Y,d){return this._lazyInitEmptyStyle(),this.style.addSource(Y,d),this._update(!0)}isSourceLoaded(Y){var d;let P=(d=this.style)===null||d===void 0?void 0:d.tileManagers[Y];if(P!==void 0)return P.loaded();this.fire(new i.l(new Error(`There is no tile manager with ID '${Y}'`)))}setTerrain(Y){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Y){let d=this.style.tileManagers[Y.source];if(!d)throw new Error(`cannot load terrain, because there exists no source with ID: ${Y.source}`);this.terrain===null&&d.reload();for(let P in this.style._layers){let N=this.style._layers[P];N.type==="hillshade"&&N.source===Y.source&&i.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),N.type==="color-relief"&&N.source===Y.source&&i.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Se(this.painter,d,Y),this.painter.renderToTexture=new nt(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=P=>{var N;P.dataType==="style"?this.terrain.tileManager.freeRtt():P.dataType==="source"&&P.tile&&(P.sourceId!==Y.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((N=P.source)===null||N===void 0?void 0:N.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(P.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new i.n("terrain",{terrain:Y})),this}getTerrain(){var Y,d;return(d=(Y=this.terrain)===null||Y===void 0?void 0:Y.options)!==null&&d!==void 0?d:null}areTilesLoaded(){var Y;let d=(Y=this.style)===null||Y===void 0?void 0:Y.tileManagers;for(let P of Object.values(d))if(!P.areTilesLoaded())return!1;return!0}removeSource(Y){return this.style.removeSource(Y),this._update(!0)}getSource(Y){return this.style.getSource(Y)}setSourceTileLodParams(Y,d,P){if(P){let N=this.getSource(P);if(!N)throw new Error(`There is no source with ID "${P}", cannot set LOD parameters`);N.calculateTileZoom=Tt(Math.max(1,Y),Math.max(1,d))}else for(let N in this.style.tileManagers)this.style.tileManagers[N].getSource().calculateTileZoom=Tt(Math.max(1,Y),Math.max(1,d));return this._update(!0),this}refreshTiles(Y,d){let P=this.style.tileManagers[Y];if(!P)throw new Error(`There is no tile manager with ID "${Y}", cannot refresh tile`);d===void 0?P.reload(!0):P.refreshTiles(d.map((N=>new i.aa(N.z,N.x,N.y))))}addImage(Y,d,P={}){let{pixelRatio:N=1,sdf:H=!1,stretchX:$,stretchY:se,content:de,textFitWidth:Ae,textFitHeight:Fe}=P;if(this._lazyInitEmptyStyle(),!(d instanceof HTMLImageElement||i.b(d))){if(d.width===void 0||d.height===void 0)return this.fire(new i.l(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Ie,height:Ye,data:st}=d,ht=d;return this.style.addImage(Y,{data:new i.R({width:Ie,height:Ye},new Uint8Array(st)),pixelRatio:N,stretchX:$,stretchY:se,content:de,textFitWidth:Ae,textFitHeight:Fe,sdf:H,version:0,userImage:ht}),ht.onAdd&&ht.onAdd(this,Y),this}}{let{width:Ie,height:Ye,data:st}=f.getImageData(d);this.style.addImage(Y,{data:new i.R({width:Ie,height:Ye},st),pixelRatio:N,stretchX:$,stretchY:se,content:de,textFitWidth:Ae,textFitHeight:Fe,sdf:H,version:0})}}updateImage(Y,d){let P=this.style.getImage(Y);if(!P)return this.fire(new i.l(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let N=d instanceof HTMLImageElement||i.b(d)?f.getImageData(d):d,{width:H,height:$,data:se}=N;if(H===void 0||$===void 0)return this.fire(new i.l(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(H!==P.data.width||$!==P.data.height)return this.fire(new i.l(new Error("The width and height of the updated image must be that same as the previous version of the image")));let de=!(d instanceof HTMLImageElement||i.b(d));return P.data.replace(se,de),this.style.updateImage(Y,P),this}getImage(Y){return this.style.getImage(Y)}hasImage(Y){return Y?!!this.style.getImage(Y):(this.fire(new i.l(new Error("Missing required image id"))),!1)}removeImage(Y){this.style.removeImage(Y)}loadImage(Y){return i._(this,void 0,void 0,(function*(){return _.getImage(yield this._requestManager.transformRequest(Y,"Image"),new AbortController)}))}listImages(){return this.style.listImages()}addLayer(Y,d){return this._lazyInitEmptyStyle(),this.style.addLayer(Y,d),this._update(!0)}moveLayer(Y,d){return this.style.moveLayer(Y,d),this._update(!0)}removeLayer(Y){return this.style.removeLayer(Y),this._update(!0)}getLayer(Y){return this.style.getLayer(Y)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Y,d,P){return this.style.setLayerZoomRange(Y,d,P),this._update(!0)}setFilter(Y,d,P={}){return this.style.setFilter(Y,d,P),this._update(!0)}getFilter(Y){return this.style.getFilter(Y)}setPaintProperty(Y,d,P,N={}){return this.style.setPaintProperty(Y,d,P,N),this._update(!0)}getPaintProperty(Y,d){return this.style.getPaintProperty(Y,d)}setLayoutProperty(Y,d,P,N={}){return this.style.setLayoutProperty(Y,d,P,N),this._update(!0)}getLayoutProperty(Y,d){return this.style.getLayoutProperty(Y,d)}setGlyphs(Y,d={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Y,d),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Y,d,P={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Y,d,P,(N=>{N||this._update(!0)})),this}removeSprite(Y){return this._lazyInitEmptyStyle(),this.style.removeSprite(Y),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Y,d={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Y,d,(P=>{P||this._update(!0)})),this}setLight(Y,d={}){return this._lazyInitEmptyStyle(),this.style.setLight(Y,d),this._update(!0)}getLight(){return this.style.getLight()}setSky(Y,d={}){return this._lazyInitEmptyStyle(),this.style.setSky(Y,d),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Y,d){return this.style.setFeatureState(Y,d),this._update()}removeFeatureState(Y,d){return this.style.removeFeatureState(Y,d),this._update()}getFeatureState(Y){return this.style.getFeatureState(Y)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Y=0,d=0;return this._container&&(Y=this._container.clientWidth||400,d=this._container.clientHeight||300),[Y,d]}_setupResizeObserver(){var Y;let d=!1,P=ph((H=>{this._trackResize&&!this._removed&&(this.resize(H),this.redraw())}),50),N=(Y=this._ownerWindow.ResizeObserver)!==null&&Y!==void 0?Y:ResizeObserver;this._resizeObserver=new N((H=>{d?P(H):d=!0})),this._resizeObserver.observe(this._container)}_resolveContainer(Y){if(typeof Y=="string"){let d=document.getElementById(Y);if(!d)throw new Error(`Container '${Y}' not found.`);return d}if(Y instanceof HTMLElement||Y&&typeof Y=="object"&&Y.nodeType===1)return Y;throw new Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let Y=this._container;Y.classList.add("maplibregl-map");let d=this._canvasContainer=x.create("div","maplibregl-canvas-container",Y);this._interactive&&d.classList.add("maplibregl-interactive"),this._canvas=x.create("canvas","maplibregl-canvas",d),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 P=this._containerDimensions(),N=this._getClampedPixelRatio(P[0],P[1]);this._resizeCanvas(P[0],P[1],N);let H=this._controlContainer=x.create("div","maplibregl-control-container",Y),$=this._controlPositions={};for(let se of["top-left","top-right","bottom-left","bottom-right"])$[se]=x.create("div",`maplibregl-ctrl-${se} `,H);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Y,d,P){this._canvas.width=Math.floor(P*Y),this._canvas.height=Math.floor(P*d),this._canvas.style.width=`${Y}px`,this._canvas.style.height=`${d}px`}_setupPainter(){let Y=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),d=null;this._canvas.addEventListener("webglcontextcreationerror",(N=>{d={requestedAttributes:Y},N&&(d.statusMessage=N.statusMessage,d.type=N.type)}),{once:!0});let P=null;if(P=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,Y):this._canvas.getContext("webgl2",Y)||this._canvas.getContext("webgl",Y),!P){let N="Failed to initialize WebGL";throw d?(d.message=N,new Error(JSON.stringify(d))):new Error(N)}this.painter=new $u(P,this.transform)}migrateProjection(Y,d){super.migrateProjection(Y,d),this.painter.transform=Y,this.fire(new i.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(Y){var d;return!((d=this.style)===null||d===void 0)&&d._loaded?(this._styleDirty||(this._styleDirty=Y),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Y){return this._update(),this._renderTaskQueue.add(Y)}_cancelRenderFrame(Y){this._renderTaskQueue.remove(Y)}_render(Y){var d,P,N,H,$,se;let de=this._idleTriggered?this._fadeDuration:0,Ae=((d=this.style.projection)===null||d===void 0?void 0:d.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Y),this._removed)return;let Fe=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let st=this.transform.zoom,ht=g();this.style.zoomHistory.update(st,ht);let Pe=new i.J(st,{now:ht,fadeDuration:de,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Xe=Pe.crossFadingFactor();Xe===1&&Xe===this._crossFadingFactor||(Fe=!0,this._crossFadingFactor=Xe),this.style.update(Pe)}let Ie=((P=this.style.projection)===null||P===void 0?void 0:P.transitionState)>0!==Ae;(N=this.style.projection)===null||N===void 0||N.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((H=this.style.projection)===null||H===void 0?void 0:H.transitionState,($=this.style.projection)===null||$===void 0?void 0:$.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||Ie)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=(se=this.style)===null||se===void 0?void 0:se._updatePlacement(this.transform,this.showCollisionBoxes,de,this._crossSourceCollisions,Ie),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:de,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new i.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new i.n("load"))),this.style&&(this.style.hasTransitions()||Fe)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Ye=this._sourcesDirty||this._styleDirty||this._placementDirty;return Ye||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new i.n("idle")),!this._loaded||this._fullyLoaded||Ye||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var Y,d;this._hash&&this._hash.remove();for(let N of this._controls)N.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),(Y=this._diffStyleRequest)===null||Y===void 0||Y.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window!="undefined"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),_.removeThrottleControl(this._imageQueueHandle),(d=this._resizeObserver)===null||d===void 0||d.disconnect();let P=this.painter.context.gl.getExtension("WEBGL_lose_context");P!=null&&P.loseContext&&P.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new i.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,f.frame(this._frameRequest,(Y=>{this._frameRequest=null;try{this._render(Y)}catch(d){if(!i.$(d)&&!(function(P){return P.message===qf})(d))throw d}}),(()=>{}),this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Y){this._showTileBoundaries!==Y&&(this._showTileBoundaries=Y,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Y){this._showPadding!==Y&&(this._showPadding=Y,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Y){this._showCollisionBoxes!==Y&&(this._showCollisionBoxes=Y,Y?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Y){this._showOverdrawInspector!==Y&&(this._showOverdrawInspector=Y,this._update())}get repaint(){return!!this._repaint}set repaint(Y){this._repaint!==Y&&(this._repaint=Y,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Y){this._vertices=Y,this._update()}get version(){return vt}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(Y){return this._lazyInitEmptyStyle(),this.style.setProjection(Y),this._update(!0)}},ir={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class nr{constructor(d,P,N=!1){this.mousedown=$=>{this.startMove($,x.mousePos(this.element,$)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=$=>{this.move($,x.mousePos(this.element,$))},this.mouseup=$=>{this._rotatePitchHandler.dragEnd($),this.offTemp()},this.touchstart=$=>{$.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=x.touchPos(this.element,$.targetTouches)[0],this.startMove($,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=$=>{$.targetTouches.length!==1?this.reset():(this._lastPos=x.touchPos(this.element,$.targetTouches)[0],this.move($,this._lastPos))},this.touchend=$=>{$.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=P;let H=new Zt;this._rotatePitchHandler=new Be({clickTolerance:3,move:($,se)=>{let de=P.getBoundingClientRect(),Ae=new i.P((de.bottom-de.top)/2,(de.right-de.left)/2);return{bearingDelta:i.cx(new i.P($.x,se.y),se,Ae),pitchDelta:N?-.5*(se.y-$.y):void 0}},moveStateManager:H,enable:!0,assignEvents:()=>{}}),this.map=d,P.addEventListener("mousedown",this.mousedown),P.addEventListener("touchstart",this.touchstart,{passive:!1}),P.addEventListener("touchcancel",this.reset)}startMove(d,P){this._rotatePitchHandler.dragStart(d,P),x.disableDrag()}move(d,P){let N=this.map,{bearingDelta:H,pitchDelta:$}=this._rotatePitchHandler.dragMove(d,P)||{};H&&N.setBearing(N.getBearing()+H),$&&N.setPitch(N.getPitch()+$)}off(){let d=this.element;d.removeEventListener("mousedown",this.mousedown),d.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),d.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){x.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}let Cr;function Vr(Y,d,P,N=!1){if(N||!P.getCoveringTilesDetailsProvider().allowWorldCopies())return Y==null?void 0:Y.wrap();let H=new i.W(Y.lng,Y.lat);if(Y=new i.W(Y.lng,Y.lat),d){let $=new i.W(Y.lng-360,Y.lat),se=new i.W(Y.lng+360,Y.lat),de=P.locationToScreenPoint(Y).distSqr(d);P.locationToScreenPoint($).distSqr(d)180;){let $=P.locationToScreenPoint(Y);if($.x>=0&&$.y>=0&&$.x<=P.width&&$.y<=P.height)break;Y.lng>P.center.lng?Y.lng-=360:Y.lng+=360}return Y.lng!==H.lng&&P.isPointOnMapSurface(P.locationToScreenPoint(Y))?Y:H}let sr={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function br(Y,d,P){let N=Y.classList;for(let H in sr)N.remove(`maplibregl-${P}-anchor-${H}`);N.add(`maplibregl-${P}-anchor-${d}`)}class kr extends i.E{constructor(d){if(super(),this._onClick=P=>{this.fire(new i.n("click",{originalEvent:P}))},this._onKeyPress=P=>{P.code!=="Space"&&P.code!=="Enter"||this.togglePopup()},this._onMapClick=P=>{let N=P.originalEvent.target,H=this._element;this._popup&&(N===H||H.contains(N))&&this.togglePopup()},this._update=P=>{if(!this._map)return;let N=this._map.loaded()&&!this._map.isMoving();((P==null?void 0:P.type)==="terrain"||(P==null?void 0:P.type)==="render"&&!N)&&this._map.once("render",this._update),this._lngLat=Vr(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let H="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?H=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(H=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let $="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?$="rotateX(0deg)":this._pitchAlignment==="map"&&($=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||P&&P.type!=="moveend"||(this._pos=this._pos.round()),this._element.style.transform=`${sr[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${$} ${H}`,f.frameAsync(new AbortController,this._map._ownerWindow).then((()=>{this._updateOpacity((P==null?void 0:P.type)==="moveend")})).catch((()=>{}))},this._onMove=P=>{if(!this._isDragging){let N=this._clickTolerance||this._map._clickTolerance;this._isDragging=P.point.dist(this._pointerdownPos)>=N}this._isDragging&&(this._pos=P.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 i.n("dragstart"))),this.fire(new i.n("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new i.n("dragend")),this._state="inactive"},this._addDragHandler=P=>{this._element.contains(P.originalEvent.target)&&(P.preventDefault(),this._positionDelta=P.point.sub(this._pos).add(this._offset),this._pointerdownPos=P.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=(d==null?void 0:d.anchor)||"center",this._color=(d==null?void 0:d.color)||"#3FB1CE",this._scale=(d==null?void 0:d.scale)||1,this._draggable=(d==null?void 0:d.draggable)||!1,this._clickTolerance=(d==null?void 0:d.clickTolerance)||0,this._subpixelPositioning=(d==null?void 0:d.subpixelPositioning)||!1,this._isDragging=!1,this._state="inactive",this._rotation=(d==null?void 0:d.rotation)||0,this._rotationAlignment=(d==null?void 0:d.rotationAlignment)||"auto",this._pitchAlignment=d!=null&&d.pitchAlignment&&d.pitchAlignment!=="auto"?d.pitchAlignment:this._rotationAlignment,this.setOpacity(d==null?void 0:d.opacity,d==null?void 0:d.opacityWhenCovered),d==null?void 0:d.element)this._element=d.element,this._offset=i.P.convert((d==null?void 0:d.offset)||[0,0]);else{this._defaultMarker=!0,this._element=x.create("div");let P=x.createNS("http://www.w3.org/2000/svg","svg"),N=41,H=27;P.setAttributeNS(null,"display","block"),P.setAttributeNS(null,"height",`${N}px`),P.setAttributeNS(null,"width",`${H}px`),P.setAttributeNS(null,"viewBox",`0 0 ${H} ${N}`);let $=x.createNS("http://www.w3.org/2000/svg","g");$.setAttributeNS(null,"stroke","none"),$.setAttributeNS(null,"stroke-width","1"),$.setAttributeNS(null,"fill","none"),$.setAttributeNS(null,"fill-rule","evenodd");let se=x.createNS("http://www.w3.org/2000/svg","g");se.setAttributeNS(null,"fill-rule","nonzero");let de=x.createNS("http://www.w3.org/2000/svg","g");de.setAttributeNS(null,"transform","translate(3.0, 29.0)"),de.setAttributeNS(null,"fill","#000000");let Ae=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let xt of Ae){let Et=x.createNS("http://www.w3.org/2000/svg","ellipse");Et.setAttributeNS(null,"opacity","0.04"),Et.setAttributeNS(null,"cx","10.5"),Et.setAttributeNS(null,"cy","5.80029008"),Et.setAttributeNS(null,"rx",xt.rx),Et.setAttributeNS(null,"ry",xt.ry),de.appendChild(Et)}let Fe=x.createNS("http://www.w3.org/2000/svg","g");Fe.setAttributeNS(null,"fill",this._color);let Ie=x.createNS("http://www.w3.org/2000/svg","path");Ie.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Fe.appendChild(Ie);let Ye=x.createNS("http://www.w3.org/2000/svg","g");Ye.setAttributeNS(null,"opacity","0.25"),Ye.setAttributeNS(null,"fill","#000000");let st=x.createNS("http://www.w3.org/2000/svg","path");st.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ye.appendChild(st);let ht=x.createNS("http://www.w3.org/2000/svg","g");ht.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ht.setAttributeNS(null,"fill","#FFFFFF");let Pe=x.createNS("http://www.w3.org/2000/svg","g");Pe.setAttributeNS(null,"transform","translate(8.0, 8.0)");let Xe=x.createNS("http://www.w3.org/2000/svg","circle");Xe.setAttributeNS(null,"fill","#000000"),Xe.setAttributeNS(null,"opacity","0.25"),Xe.setAttributeNS(null,"cx","5.5"),Xe.setAttributeNS(null,"cy","5.5"),Xe.setAttributeNS(null,"r","5.4999962");let at=x.createNS("http://www.w3.org/2000/svg","circle");at.setAttributeNS(null,"fill","#FFFFFF"),at.setAttributeNS(null,"cx","5.5"),at.setAttributeNS(null,"cy","5.5"),at.setAttributeNS(null,"r","5.4999962"),Pe.appendChild(Xe),Pe.appendChild(at),se.appendChild(de),se.appendChild(Fe),se.appendChild(Ye),se.appendChild(ht),se.appendChild(Pe),P.appendChild(se),P.setAttributeNS(null,"height",N*this._scale+"px"),P.setAttributeNS(null,"width",H*this._scale+"px"),this._element.appendChild(P),this._offset=i.P.convert((d==null?void 0:d.offset)||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(P=>{P.preventDefault()})),this._element.addEventListener("mousedown",(P=>{P.preventDefault()})),br(this._element,this._anchor,"marker"),d==null?void 0:d.className)for(let P of d.className.split(" "))this._element.classList.add(P);this._popup=null}addTo(d){return this.remove(),this._map=d,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",d._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),d.getCanvasContainer().appendChild(this._element),d.on("move",this._update),d.on("moveend",this._update),d.on("terrain",this._update),d.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(d){return this._lngLat=i.W.convert(d),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(d){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),d){if(!("offset"in d.options)){let H=Math.abs(13.5)/Math.SQRT2;d.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[H,-1*(38.1-13.5+H)],"bottom-right":[-H,-1*(38.1-13.5+H)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=d,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(d){return this._subpixelPositioning=d,this}getPopup(){return this._popup}togglePopup(){let d=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:d?(d.isOpen()?d.remove():(d.setLngLat(this._lngLat),d.addTo(this._map)),this):this}_updateOpacity(d=!1){var P,N;let H=(P=this._map)===null||P===void 0?void 0:P.terrain,$=this._map.transform.isLocationOccluded(this._lngLat);if(!H||$){let ht=$?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==ht&&(this._element.style.opacity=ht,this._element.classList.toggle("maplibregl-marker-covered",$)))}if(d)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}let se=this._map,de=se.terrain.depthAtPoint(this._pos),Ae=se.terrain.getElevationForLngLat(this._lngLat,se.transform);if(se.transform.lngLatToCameraDepth(this._lngLat,Ae)-de<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let Fe=-this._offset.y/se.transform.pixelsPerMeter,Ie=Math.sin(se.getPitch()*Math.PI/180)*Fe,Ye=se.terrain.depthAtPoint(new i.P(this._pos.x,this._pos.y-this._offset.y)),st=se.transform.lngLatToCameraDepth(this._lngLat,Ae+Ie)-Ye>.006;!((N=this._popup)===null||N===void 0)&&N.isOpen()&&st&&this._popup.remove(),this._element.style.opacity=st?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",st)}getOffset(){return this._offset}setOffset(d){return this._offset=i.P.convert(d),this._update(),this}addClassName(d){this._element.classList.add(d)}removeClassName(d){this._element.classList.remove(d)}toggleClassName(d){return this._element.classList.toggle(d)}setDraggable(d){return this._draggable=!!d,this._map&&(d?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(d){return this._rotation=d||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(d){return this._rotationAlignment=d||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(d){return this._pitchAlignment=d&&d!=="auto"?d:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(d,P){return(this._opacity===void 0||d===void 0&&P===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),d!==void 0&&(this._opacity=String(d)),P!==void 0&&(this._opacityWhenCovered=String(P)),this._map&&this._updateOpacity(!0),this}}let Gr={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Wr=0,Ar=!1,En={maxWidth:100,unit:"metric"};function zn(Y,d,P){let N=(P==null?void 0:P.maxWidth)||100,H=Y._container.clientHeight/2,$=Y._container.clientWidth/2,se=Y.unproject([$-N/2,H]),de=Y.unproject([$+N/2,H]),Ae=Math.round(Y.project(de).x-Y.project(se).x),Fe=Math.min(N,Ae,Y._container.clientWidth),Ie=se.distanceTo(de);if((P==null?void 0:P.unit)==="imperial"){let Ye=3.2808*Ie;Ye>5280?Zn(d,Fe,Ye/5280,Y._getUIString("ScaleControl.Miles")):Zn(d,Fe,Ye,Y._getUIString("ScaleControl.Feet"))}else(P==null?void 0:P.unit)==="nautical"?Zn(d,Fe,Ie/1852,Y._getUIString("ScaleControl.NauticalMiles")):Ie>=1e3?Zn(d,Fe,Ie/1e3,Y._getUIString("ScaleControl.Kilometers")):Zn(d,Fe,Ie,Y._getUIString("ScaleControl.Meters"))}function Zn(Y,d,P,N){let H=(function($){let se=Math.pow(10,`${Math.floor($)}`.length-1),de=$/se;return de=de>=10?10:de>=5?5:de>=3?3:de>=2?2:de>=1?1:(function(Ae){let Fe=Math.pow(10,Math.ceil(-Math.log(Ae)/Math.LN10));return Math.round(Ae*Fe)/Fe})(de),se*de})(P);Y.style.width=d*(H/P)+"px",Y.innerHTML=`${H} ${N}`}let ai={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},Mi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Si(Y){if(Y){if(typeof Y=="number"){let d=Math.round(Math.abs(Y)/Math.SQRT2);return{center:new i.P(0,0),top:new i.P(0,Y),"top-left":new i.P(d,d),"top-right":new i.P(-d,d),bottom:new i.P(0,-Y),"bottom-left":new i.P(d,-d),"bottom-right":new i.P(-d,-d),left:new i.P(Y,0),right:new i.P(-Y,0)}}if(Y instanceof i.P||Array.isArray(Y)){let d=i.P.convert(Y);return{center:d,top:d,"top-left":d,"top-right":d,bottom:d,"bottom-left":d,"bottom-right":d,left:d,right:d}}return{center:i.P.convert(Y.center||[0,0]),top:i.P.convert(Y.top||[0,0]),"top-left":i.P.convert(Y["top-left"]||[0,0]),"top-right":i.P.convert(Y["top-right"]||[0,0]),bottom:i.P.convert(Y.bottom||[0,0]),"bottom-left":i.P.convert(Y["bottom-left"]||[0,0]),"bottom-right":i.P.convert(Y["bottom-right"]||[0,0]),left:i.P.convert(Y.left||[0,0]),right:i.P.convert(Y.right||[0,0])}}return Si(new i.P(0,0))}let ya=o;a.AJAXError=i.cG,a.EXTENT=i.a6,a.Event=i.n,a.Evented=i.E,a.LngLat=i.W,a.MercatorCoordinate=i.a7,a.Point=i.P,a.addProtocol=i.cH,a.config=i.c,a.removeProtocol=i.cI,a.AttributionControl=hl,a.BoxZoomHandler=Mu,a.CanvasSource=Le,a.CooperativeGesturesHandler=Di,a.DoubleClickZoomHandler=ls,a.DragPanHandler=el,a.DragRotateHandler=yc,a.EdgeInsets=Co,a.FullscreenControl=class extends i.E{constructor(Y={}){var d;super(),this._onFullscreenChange=()=>{var P;let N=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;!((P=N==null?void 0:N.shadowRoot)===null||P===void 0)&&P.fullscreenElement;)N=N.shadowRoot.fullscreenElement;N===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(d=Y.pseudo)!==null&&d!==void 0&&d,Y!=null&&Y.container&&(Y.container instanceof HTMLElement?this._container=Y.container:i.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(Y){return this._map=Y,this._container||(this._container=this._map.getContainer()),this._controlContainer=x.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 Y=this._fullscreenButton=x.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);x.create("span","maplibregl-ctrl-icon",Y).setAttribute("aria-hidden","true"),Y.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let Y=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Y),this._fullscreenButton.title=Y}_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 i.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new i.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},a.GeoJSONSource=et,a.GeolocateControl=class extends i.E{constructor(Y){super(),this._onSuccess=d=>{if(this._map){if(this._isOutOfMapMaxBounds(d))return this._setErrorState(),this.fire(new i.n("outofmaxbounds",d)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=d,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(d),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(d),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new i.n("geolocate",d)),this._finish()}},this._updateCamera=d=>{let P=new i.W(d.coords.longitude,d.coords.latitude),N=d.coords.accuracy,H=this._map.getBearing(),$=i.e({bearing:H},this.options.fitBoundsOptions),se=ie.fromLngLat(P,N);this._map.fitBounds(se,$,{geolocateSource:!0})},this._updateMarker=d=>{if(d){let P=new i.W(d.coords.longitude,d.coords.latitude);this._accuracyCircleMarker.setLngLat(P).addTo(this._map),this._userLocationDotMarker.setLngLat(P).addTo(this._map),this._accuracy=d.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=d=>{if(this._map){if(d.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 P=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=P,this._geolocateButton.setAttribute("aria-label",P),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(d.code===3&&Ar)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new i.n("error",d)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=d=>{if(!this._map)return;let P=(d==null?void 0:d[0])instanceof ResizeObserverEntry;d.geolocateSource||this._watchState!=="ACTIVE_LOCK"||P||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 i.n("trackuserlocationend")),this.fire(new i.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(d=>{d.preventDefault()})),this._geolocateButton=x.create("button","maplibregl-ctrl-geolocate",this._container),x.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=d=>{if(this._map){if(d===!1){i.w("Geolocation support is not available so the GeolocateControl will be disabled.");let P=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=P,this._geolocateButton.setAttribute("aria-label",P)}else{let P=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=P,this._geolocateButton.setAttribute("aria-label",P)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=x.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new kr({element:this._dotElement}),this._circleElement=x.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new kr({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=i.e({},Gr,Y)}onAdd(Y){return this._map=Y,this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return i._(this,arguments,void 0,(function*(d=!1){if(Cr!==void 0&&!d)return Cr;if(window.navigator.permissions===void 0)return Cr=!!window.navigator.geolocation,Cr;try{Cr=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(P){Cr=!!window.navigator.geolocation}return Cr}))})().then((d=>this._finishSetupUI(d))),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,Wr=0,Ar=!1}_isOutOfMapMaxBounds(Y){let d=this._map.getMaxBounds(),P=Y.coords;return d&&(P.longituded.getEast()||P.latituded.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let Y=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&Y))return;let d=this._map.project(Y),P=this._map.unproject([d.x+100,d.y]),N=Y.distanceTo(P)/100,H=2*this._accuracy/N;this._circleElement.style.width=`${H.toFixed(2)}px`,this._circleElement.style.height=`${H.toFixed(2)}px`}trigger(){if(!this._setup)return i.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new i.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Wr--,Ar=!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 i.n("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.n("trackuserlocationstart")),this.fire(new i.n("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let Y;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Wr++,Wr>1?(Y={maximumAge:6e5,timeout:0},Ar=!0):(Y=this.options.positionOptions,Ar=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Y)}}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)}},a.GlobeControl=class{constructor(){this._toggleProjection=()=>{var Y;let d=(Y=this._map.getProjection())===null||Y===void 0?void 0:Y.type;this._map.setProjection(d!=="mercator"&&d?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var Y;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((Y=this._map.getProjection())===null||Y===void 0?void 0:Y.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(Y){return this._map=Y,this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=x.create("button","maplibregl-ctrl-globe",this._container),x.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}},a.Hash=gh,a.ImageSource=qe,a.KeyboardHandler=ia,a.LngLatBounds=ie,a.LogoControl=mh,a.Map=Rt,a.MapLibreMap=Rt,a.MapMouseEvent=Xl,a.MapTouchEvent=cf,a.MapWheelEvent=jh,a.Marker=kr,a.NavigationControl=class{constructor(Y){this._updateZoomButtons=()=>{let d=this._map.getZoom(),P=d===this._map.getMaxZoom(),N=d===this._map.getMinZoom();this._zoomInButton.disabled=P,this._zoomOutButton.disabled=N,this._zoomInButton.setAttribute("aria-disabled",P.toString()),this._zoomOutButton.setAttribute("aria-disabled",N.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(d,P)=>{let N=this._map._getUIString(`NavigationControl.${P}`);d.title=N,d.setAttribute("aria-label",N)},this.options=i.e({},ir,Y),this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(d=>d.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(d=>this._map.zoomIn({},{originalEvent:d}))),x.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(d=>this._map.zoomOut({},{originalEvent:d}))),x.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(d=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:d}):this._map.resetNorth({},{originalEvent:d})})),this._compassIcon=x.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Y){return this._map=Y,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new nr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(Y,d){let P=x.create("button",Y,this._container);return P.type="button",P.addEventListener("click",d),P}},a.Popup=class extends i.E{constructor(Y){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new i.n("close"))),this),this._update=d=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=x.create("div","maplibregl-popup",this._map.getContainer()),this._tip=x.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let de of this.options.className.split(" "))this._container.classList.add(de);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}let P;if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Vr(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),d&&"point"in d&&d.point&&(P=d.point),this._trackPointer&&!P)return;let N=this._flatPos=this._pos=this._trackPointer&&P?P:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&P?P:this._map.transform.locationToScreenPoint(this._lngLat));let H=this.options.anchor,$=Si(this.options.offset);if(!H){let de=this._container.offsetWidth,Ae=this._container.offsetHeight,Fe=(function(Ye){var st,ht,Pe,Xe;return Ye?{top:(st=Ye.top)!==null&&st!==void 0?st:0,right:(ht=Ye.right)!==null&&ht!==void 0?ht:0,bottom:(Pe=Ye.bottom)!==null&&Pe!==void 0?Pe:0,left:(Xe=Ye.left)!==null&&Xe!==void 0?Xe:0}:{top:0,right:0,bottom:0,left:0}})(this.options.padding),Ie;Ie=N.y+$.bottom.ythis._map.transform.height-Ae-Fe.bottom?["bottom"]:[],N.xthis._map.transform.width-de/2-Fe.right&&Ie.push("right"),H=Ie.length===0?"bottom":Ie.join("-")}let se=N.add($[H]);this.options.subpixelPositioning||(se=se.round()),this._container.style.transform=`${sr[H]} translate(${se.x}px,${se.y}px)`,br(this._container,H,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=i.e(Object.create(ai),Y)}addTo(Y){return this._map&&this.remove(),this._map=Y,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 i.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(Y){return this._lngLat=i.W.convert(Y),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(Y){return this.setDOMContent(document.createTextNode(Y))}setHTML(Y){let d=document.createDocumentFragment(),P=document.createElement("body"),N;for(P.innerHTML=Y;N=P.firstChild,N;)d.appendChild(N);return this.setDOMContent(d)}getMaxWidth(){var Y;return(Y=this._container)===null||Y===void 0?void 0:Y.style.maxWidth}setMaxWidth(Y){return this.options.maxWidth=Y,this._update(),this}setDOMContent(Y){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=x.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Y),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Y){return this._container&&this._container.classList.add(Y),this}removeClassName(Y){return this._container&&this._container.classList.remove(Y),this}setOffset(Y){return this.options.offset=Y,this._update(),this}toggleClassName(Y){if(this._container)return this._container.classList.toggle(Y)}setSubpixelPositioning(Y){this.options.subpixelPositioning=Y}setPadding(Y){this.options.padding=Y,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=x.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 Y=this._container.querySelector(Mi);Y&&Y.focus()}},a.RasterDEMTileSource=De,a.RasterTileSource=be,a.ScaleControl=class{constructor(Y){this._onMove=()=>{zn(this._map,this._container,this.options)},this.setUnit=d=>{this.options.unit=d,zn(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},En),Y)}getDefaultPosition(){return"bottom-left"}onAdd(Y){return this._map=Y,this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Y.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}},a.ScrollZoomHandler=Ua,a.Style=Cc,a.TerrainControl=class{constructor(Y){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=Y}onAdd(Y){return this._map=Y,this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=x.create("button","maplibregl-ctrl-terrain",this._container),x.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}},a.TwoFingersTouchPitchHandler=Bi,a.TwoFingersTouchRotateHandler=In,a.TwoFingersTouchZoomHandler=ln,a.TwoFingersTouchZoomRotateHandler=wi,a.VectorTileSource=xe,a.VideoSource=we,a.addSourceType=(Y,d)=>i._(void 0,void 0,void 0,(function*(){if(Te(Y))throw new Error(`A source type called "${Y}" already exists.`);((P,N)=>{Ke[P]=N})(Y,d)})),a.clearPrewarmedResources=function(){let Y=ee;Y&&(Y.isPreloaded()&&Y.numActive()===1?(Y.release(q),ee=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},a.createTileMesh=lu,a.getGlobalDispatcher=ue,a.getMaxParallelImageRequests=function(){return i.c.MAX_PARALLEL_IMAGE_REQUESTS},a.getRTLTextPluginStatus=function(){return rt().getRTLTextPluginStatus()},a.getVersion=function(){return ya},a.getWorkerCount=function(){return V.workerCount},a.getWorkerUrl=function(){return i.c.WORKER_URL},a.importScriptInWorkers=function(Y){return ue().broadcast("IS",Y)},a.isTimeFrozen=function(){return v.isFrozen()},a.now=g,a.prewarm=function(){me().acquire(q)},a.restoreNow=function(){v.restoreNow()},a.setMaxParallelImageRequests=function(Y){i.c.MAX_PARALLEL_IMAGE_REQUESTS=Y},a.setNow=function(Y){v.setNow(Y)},a.setRTLTextPlugin=function(Y,d){return rt().setRTLTextPlugin(Y,d)},a.setWorkerCount=function(Y){V.workerCount=Y},a.setWorkerUrl=function(Y){i.c.WORKER_URL=Y}}));var n=e;return n}))});var HWe=fe((q6r,GWe)=>{"use strict";var g_=Xt(),Ntr=as().sanitizeHTML,Utr=oK(),NWe=zy();function UWe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=NWe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var qv=UWe.prototype;qv.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=oD(t)};qv.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};qv.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};qv.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};qv.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};qv.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};qv.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!oD(e)){var r=Vtr(e);t.addSource(this.idSource,r)}};qv.findFollowingMapLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function VWe(e){var t={},r={};switch(e.type){case"circle":g_.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":g_.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":g_.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,a=Utr(n.textposition,n.iconsize);g_.extendFlat(t,{"icon-image":n.icon,"icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":a.anchor,"text-offset":a.offset,"symbol-placement":n.placement}),g_.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":g_.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function Vtr(e){var t=e.sourcetype,r=e.source,n={type:t},a;return t==="geojson"?a="data":t==="vector"?a=typeof r=="string"?"url":"tiles":t==="raster"?(a="tiles",n.tileSize=256):t==="image"&&(a="url",n.coordinates=e.coordinates),n[a]=r,e.sourceattribution&&(n.attribution=Ntr(e.sourceattribution)),n}GWe.exports=function(t,r,n){var a=new UWe(t,r);return a.update(n),a}});var eYe=fe((B6r,QWe)=>{"use strict";var hK=OWe(),lD=Xt(),YWe=Cg(),jWe=bi(),Gtr=Yi(),Htr=ed(),sD=kl(),XWe=$p(),jtr=XWe.drawMode,Wtr=XWe.selectMode,Ytr=Ac().prepSelect,Xtr=Ac().clearOutline,Ztr=Ac().clearSelectionsCache,$tr=Ac().selectOnClick,qy=zy(),Ktr=HWe();function ZWe(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var cc=ZWe.prototype;cc.plot=function(e,t,r){var n=this,a;n.map?a=new Promise(function(i,o){n.updateMap(e,t,i,o)}):a=new Promise(function(i,o){n.createMap(e,t,i,o)}),r.push(a)};cc.createMap=function(e,t,r,n){var a=this,i=t[a.id],o=a.styleObj=JWe(i.style),s=i.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null;let u={container:a.div,style:o.style,center:dK(i.center),zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,maxBounds:l,interactive:!a.isStatic,canvasContextAttributes:{preserveDrawingBuffer:a.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},c=i._fitBounds;c&&(u.bounds=[[c.west,c.south],[c.east,c.north]],u.fitBoundsOptions={padding:qy.fitBoundsPadding});let f=a.map=new hK.Map(u).addControl(new hK.AttributionControl({compact:!0}));var v={};f.on("styleimagemissing",function(p){var _=p.id;if(!v[_]&&/^[a-zA-Z0-9-]+$/.test(_)){v[_]=!0;var x=new Image(15,15);x.onload=function(){f.addImage(_,x,{sdf:!0})},x.crossOrigin="Anonymous",x.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+_+".svg"}}),f.setTransformRequest(function(p){return p=p.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),p=p.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),p=p.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:p}}),f._canvas.style.left="0px",f._canvas.style.top="0px",a.rejectOnError(n),a.isStatic||a.initFx(e,t);var g=[];g.push(new Promise(function(p){f.once("load",p)})),g=g.concat(YWe.fetchTraceGeoData(e)),Promise.all(g).then(function(){c&&$We(a,i),KWe(a,i),a.fillBelowLookup(e,t),a.updateData(e),a.updateLayout(t),a.resolveOnRender(r)}).catch(n)};cc.updateMap=function(e,t,r,n){var a=this,i=a.map,o=t[this.id];a.rejectOnError(n);var s=[],l=JWe(o.style);JSON.stringify(a.styleObj)!==JSON.stringify(l)&&(a.styleObj=l,i.setStyle(l.style),a.traceHash={},s.push(new Promise(function(u){i.once("styledata",u)}))),s=s.concat(YWe.fetchTraceGeoData(e)),Promise.all(s).then(function(){a.fillBelowLookup(e,t),a.updateData(e);let u=o._fitBounds;u&&(i.fitBounds([[u.west,u.south],[u.east,u.north]],{padding:qy.fitBoundsPadding,animate:!1}),$We(a,o),KWe(a,o)),a.updateLayout(t),a.resolveOnRender(r)}).catch(n)};function $We(e,t){let{center:r,zoom:n}=e.getView();t._input.center=t.center=r,t._input.zoom=t.zoom=n,t._input._fitView={center:zo({},r),zoom:n}}function KWe(e,t){let r=e.getView();e.viewInitial={center:lD.extendFlat({},r.center),bearing:t.bearing,pitch:t.pitch,zoom:r.zoom}}cc.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,a,i,o=this.belowLookup={},s=!1;for(a=0;a1)for(a=0;at.project(n).x,_subplot:t},t.yaxis={_id:"y",c2p:n=>t.project(n).y,_subplot:t},t.updateFramework(e),t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},Gtr.setConvert(t.mockAxis,e)};cc.initFx=function(e,t){var r=this,n=r.gd,a=r.map;a.on("moveend",function(s){if(r.map){var l=n._fullLayout;if(s.originalEvent||r.wheeling){var u=l[r.id];jWe.call("_storeDirectGUIEdit",n.layout,l._preGUI,r.getViewEdits(u));var c=r.getView();u._input.center=u.center=c.center,u._input.zoom=u.zoom=c.zoom,u._input.bearing=u.bearing=c.bearing,u._input.pitch=u.pitch=c.pitch,n.emit("plotly_relayout",r.getViewEditsWithDerived(c))}s.originalEvent&&s.originalEvent.type==="mouseup"?r.dragging=!1:r.wheeling&&(r.wheeling=!1),l&&l._rehover&&l._rehover()}}),a.on("wheel",function(){r.wheeling=!0}),a.on("mousemove",function(s){var l=r.div.getBoundingClientRect(),u=[s.originalEvent.offsetX,s.originalEvent.offsetY];s.target.getBoundingClientRect=function(){return l},r.xaxis.p2c=function(){return a.unproject(u).lng},r.yaxis.p2c=function(){return a.unproject(u).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&sD.hover(n,s,r.id)},sD.hover(n,s,r.id),n._fullLayout._hoversubplot=r.id});function i(){sD.loneUnhover(t._hoverlayer)}a.on("dragstart",function(){r.dragging=!0,i()}),a.on("zoomstart",i),a.on("mouseout",function(){n._fullLayout._hoversubplot=null});function o(){var s=r.getView();n.emit("plotly_relayouting",r.getViewEditsWithDerived(s))}a.on("drag",o),a.on("zoom",o),a.on("dblclick",function(){var s=n._fullLayout[r.id];jWe.call("_storeDirectGUIEdit",n.layout,n._fullLayout._preGUI,r.getViewEdits(s));var l=r.viewInitial;a.setCenter(dK(l.center)),a.setZoom(l.zoom),a.setBearing(l.bearing),a.setPitch(l.pitch);var u=r.getView();s._input.center=s.center=u.center,s._input.zoom=s.zoom=u.zoom,s._input.bearing=s.bearing=u.bearing,s._input.pitch=s.pitch=u.pitch,n.emit("plotly_doubleclick",null),n.emit("plotly_relayout",r.getViewEditsWithDerived(u))}),r.clearOutline=function(){Ztr(r.dragOptions),Xtr(r.dragOptions.gd)},r.onClickInPanFn=function(s){return function(l){var u=n._fullLayout.clickmode;u.indexOf("select")>-1&&$tr(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&sD.click(n,l.originalEvent)}}};cc.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function a(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var i=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[a([u.xmin,u.ymin]),a([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(a)}};var s=t.dragOptions;t.dragOptions=lD.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),Wtr(i)||jtr(i)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){Ytr(l,u,c,t.dragOptions,i)},Htr.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};cc.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};cc.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,a;if(r.length!==n.length){for(a=0;aJtr});function Jtr(e,t){let r=[];for(let l of e){if(l.subplot!==t||l.visible!==!0)continue;if(l.type==="choroplethmap")return null;let{lat:u,lon:c}=l;if(!c||!u)continue;let f=Math.min(c.length,u.length);for(let v=0;v{"use strict";tYe=K0(Cg())});var oYe=fe((N6r,aYe)=>{"use strict";var vK=Xt(),Qtr=bx(),err=Ah(),iYe=$M(),{getMapFitBounds:trr}=(nYe(),Gs(rYe));aYe.exports=function(t,r,n){Qtr(t,r,n,{type:"map",attributes:iYe,handleDefaults:rrr,partition:"y",fullData:n})};function rrr(e,t,r,n){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");let a=r("fitbounds");var i=r("bounds.west"),o=r("bounds.east"),s=r("bounds.south"),l=r("bounds.north");(i===void 0||o===void 0||s===void 0||l===void 0)&&delete t.bounds,err(e,t,{name:"layers",handleItemDefaults:nrr}),t._fitBounds=null;let{_fitView:{center:u,zoom:c}={},center:f,zoom:v}=e,g=(f==null?void 0:f.lon)===(u==null?void 0:u.lon)&&(f==null?void 0:f.lat)===(u==null?void 0:u.lat)&&v===c;if(a&&g){let p=trr(n.fullData,n.id);p&&(t._fitBounds=p)}t._input=e}function nrr(e,t){function r(l,u){return vK.coerce(e,t,iYe.layers,l,u)}var n=r("visible");if(n){var a=r("sourcetype"),i=a==="raster"||a==="image";r("source"),r("sourceattribution"),a==="vector"&&r("sourcelayer"),a==="image"&&r("coordinates");var o;i&&(o="raster");var s=r("type",o);i&&s!=="raster"&&(s=t.type="raster",vK.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),s==="circle"&&r("circle.radius"),s==="line"&&(r("line.width"),r("line.dash")),s==="fill"&&r("fill.outlinecolor"),s==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),vK.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var uD=fe(G0=>{"use strict";var pK=Xt(),sYe=pK.strTranslate,irr=pK.strScale,arr=jf().getSubplotCalcData,orr=ev(),srr=xi(),lYe=Ji(),lrr=as(),urr=eYe(),By="map";G0.name=By;G0.attr="subplot";G0.idRoot=By;G0.idRegex=G0.attrRegex=pK.counterRegex(By);G0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};G0.layoutAttributes=$M();G0.supplyLayoutDefaults=oYe();G0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,a=r._subplots[By],i=0;i_/2){var x=f.split("|").join("
");g.text(x).attr("data-unformatted",x).call(lrr.convertToTspans,e),p=lYe.bBox(g.node())}g.attr("transform",sYe(-3,-p.height+8)),v.insert("rect",".static-attribution").attr({x:-p.width-6,y:-p.height-3,width:p.width+6,height:p.height+3,fill:"rgba(255, 255, 255, 0.75)"});var y=1;p.width+6>_&&(y=_/(p.width+6));var C=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];v.attr("transform",sYe(C[0],C[1])+irr(y))}};G0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[By],n=0;n{"use strict";uYe.exports={attributes:eD(),supplyDefaults:mWe(),colorbar:Zf(),formatLabels:aK(),calc:mX(),plot:PWe(),hoverPoints:aD().hoverPoints,eventData:IWe(),selectPoints:qWe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:uD(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var hYe=fe((G6r,fYe)=>{"use strict";fYe.exports=cYe()});var gK=fe((H6r,dYe)=>{"use strict";var Bg=mM(),crr=_s(),{hovertemplateAttrs:frr,templatefallbackAttrs:hrr}=Oo(),drr=Ho(),Oy=ta().extendFlat;dYe.exports=Oy({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Oy({},Bg.featureidkey,{}),below:{valType:"string",editType:"plot"},text:Bg.text,hovertext:Bg.hovertext,marker:{line:{color:Oy({},Bg.marker.line.color,{editType:"plot"}),width:Oy({},Bg.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Oy({},Bg.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Oy({},Bg.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Oy({},Bg.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:Bg.hoverinfo,hovertemplate:frr({},{keys:["properties"]}),hovertemplatefallback:hrr(),showlegend:Oy({},drr.showlegend,{dflt:!1})},crr("",{cLetter:"z",editTypeOverride:"calc"}))});var pYe=fe((j6r,vYe)=>{"use strict";var eS=Xt(),vrr=Vc(),prr=gK();vYe.exports=function(t,r,n,a){function i(c,f){return eS.coerce(t,r,prr,c,f)}var o=i("locations"),s=i("z"),l=i("geojson");if(!eS.isArrayOrTypedArray(o)||!o.length||!eS.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||eS.isPlainObject(l))){r.visible=!1;return}i("featureidkey"),r._length=Math.min(o.length,s.length),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var u=i("marker.line.width");u&&i("marker.line.color"),i("marker.opacity"),vrr(t,r,a,i,{prefix:"",cLetter:"z"}),eS.coerceSelectionMarkerOpacity(r,i)}});var mK=fe((W6r,yYe)=>{"use strict";var grr=aa(),Og=Xt(),mrr=js(),yrr=Ji(),xrr=fM().makeBlank,gYe=Cg();function _rr(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:"none"},paint:{}},a={layout:{visibility:"none"},paint:{}},i=t._opts={fill:n,line:a,geojson:xrr()};if(!r)return i;var o=gYe.extractTraceFeature(e);if(!o)return i;var s=mrr.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;Og.isArrayOrTypedArray(l.opacity)&&(c=function(C){var k=C.mo;return grr(k)?+Og.constrain(k,0,1):0});var f;Og.isArrayOrTypedArray(u.color)&&(f=function(C){return C.mlc});var v;Og.isArrayOrTypedArray(u.width)&&(v=function(C){return C.mlw});for(var g=0;g{"use strict";var _Ye=mK().convert,brr=mK().convertOnSelect,xYe=zy().traceLayerPrefix;function bYe(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",xYe+t+"-fill"],["line",xYe+t+"-line"]],this.below=null}var D5=bYe.prototype;D5.update=function(e){this._update(_Ye(e)),e[0].trace._glTrace=this};D5.updateOnSelect=function(e){this._update(brr(e))};D5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};D5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};wYe.exports=function(t,r){var n=r[0].trace,a=new bYe(t,n.uid),i=a.sourceId,o=_Ye(r),s=a.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(i,{type:"geojson",data:o.geojson}),a._addLayers(o,s),r[0].trace._glTrace=a,a}});var MYe=fe((X6r,AYe)=>{"use strict";AYe.exports={attributes:gK(),supplyDefaults:pYe(),colorbar:j3(),calc:$X(),plot:TYe(),hoverPoints:JX(),eventData:QX(),selectPoints:eZ(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var a=r[n].id;if(typeof a=="string"&&a.indexOf("water")===0){for(var i=n+1;i{"use strict";SYe.exports=MYe()});var xK=fe(($6r,CYe)=>{"use strict";var wrr=_s(),{hovertemplateAttrs:Trr,templatefallbackAttrs:Arr}=Oo(),kYe=Ho(),cD=eD(),yK=ta().extendFlat;CYe.exports=yK({lon:cD.lon,lat:cD.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:cD.text,hovertext:cD.hovertext,hoverinfo:yK({},kYe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:Trr(),hovertemplatefallback:Arr(),showlegend:yK({},kYe.showlegend,{dflt:!1})},wrr("",{cLetter:"z",editTypeOverride:"calc"}))});var PYe=fe((K6r,LYe)=>{"use strict";var Mrr=Xt(),Srr=Vc(),Err=xK();LYe.exports=function(t,r,n,a){function i(u,c){return Mrr.coerce(t,r,Err,u,c)}var o=i("lon")||[],s=i("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,i("z"),i("radius"),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),Srr(t,r,a,i,{prefix:"",cLetter:"z"})}});var RYe=fe((J6r,DYe)=>{"use strict";var _K=aa(),krr=Xt().isArrayOrTypedArray,bK=Wa().BADNUM,Crr=Mh(),FYe=Xt()._;DYe.exports=function(t,r){for(var n=r._length,a=new Array(n),i=r.z,o=krr(i)&&i.length,s=0;s{"use strict";var Lrr=aa(),wK=Xt(),IYe=ni(),zYe=js(),qYe=Wa().BADNUM,Prr=fM().makeBlank;BYe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,a={layout:{visibility:"none"},paint:{}},i=r._opts={heatmap:a,geojson:Prr()};if(!n)return i;var o=[],s,l=r.z,u=r.radius,c=wK.isArrayOrTypedArray(l)&&l.length,f=wK.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:g},properties:p})}}var x=zYe.extractOpts(r),y=x.reversescale?zYe.flipScale(x.colorscale):x.colorscale,C=y[0][1],k=IYe.opacity(C)<1?C:IYe.addOpacity(C,0),S=["interpolate",["linear"],["heatmap-density"],0,k];for(s=1;s{"use strict";var NYe=OYe(),Frr=zy().traceLayerPrefix;function UYe(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",Frr+t+"-heatmap"]],this.below=null}var fD=UYe.prototype;fD.update=function(e){var t=this.subplot,r=this.layerList,n=NYe(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(n,a),this.below=a);for(var i=0;i=0;r--)e.removeLayer(t[r][1])};fD.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};VYe.exports=function(t,r){var n=r[0].trace,a=new UYe(t,n.uid),i=a.sourceId,o=NYe(r),s=a.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(i,{type:"geojson",data:o.geojson}),a._addLayers(o,s),a}});var jYe=fe((tMr,HYe)=>{"use strict";var Drr=Yi(),Rrr=aD().hoverPoints,Irr=aD().getExtraText;HYe.exports=function(t,r,n){var a=Rrr(t,r,n);if(a){var i=a[0],o=i.cd,s=o[0].trace,l=o[i.index];if(delete i.color,"z"in l){var u=i.subplot.mockAxis;i.z=l.z,i.zLabel=Drr.tickText(u,u.c2l(l.z),"hover").text}return i.extraText=Irr(s,l,o[0].t.labels),[i]}}});var YYe=fe((rMr,WYe)=>{"use strict";WYe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var ZYe=fe((nMr,XYe)=>{"use strict";XYe.exports={attributes:xK(),supplyDefaults:PYe(),colorbar:j3(),formatLabels:aK(),calc:RYe(),plot:GYe(),hoverPoints:jYe(),eventData:YYe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";$Ye.exports=ZYe()});var AK=fe((oMr,rXe)=>{"use strict";var zrr=Ds(),qrr=Ho(),JYe=tc(),TK=hb(),Brr=nl().attributes,{hovertemplateAttrs:QYe,templatefallbackAttrs:eXe}=Oo(),Orr=_s(),Nrr=So().templatedArray,Urr=pl().descriptionOnlyNumbers,tXe=ta().extendFlat,Vrr=rl().overrideAll,aMr=rXe.exports=Vrr({hoverinfo:tXe({},qrr.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:TK.hoverlabel,domain:Brr({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},direction:{valType:"enumerated",values:["forward","reversed"],dflt:"forward"},valueformat:{valType:"string",dflt:".3s",description:Urr("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:zrr({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:JYe.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:TK.hoverlabel,hovertemplate:QYe({},{keys:["value","label"]}),hovertemplatefallback:eXe(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"},sort:{valType:"enumerated",values:["auto","input"],dflt:"auto"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:JYe.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:TK.hoverlabel,hovertemplate:QYe({},{keys:["value","label"]}),hovertemplatefallback:eXe(),colorscales:Nrr("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:tXe(Orr().colorscale,{dflt:[[0,"white"],[1,"black"]]})}),sort:{valType:"enumerated",values:["auto","input"],dflt:"auto"}}},"calc","nested")});var oXe=fe((sMr,aXe)=>{"use strict";var R5=Xt(),hD=AK(),m_=ni(),Grr=nl().defaults,nXe=MT(),iXe=So(),Hrr=Ah();aXe.exports=function(t,r,n,a){function i(S,L){return R5.coerce(t,r,hD,S,L)}var o=R5.extendDeep(a.hoverlabel,t.hoverlabel),s=t.node,l=iXe.newContainer(r,"node");function u(S,L){return R5.coerce(s,l,hD.node,S,L)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",t.hoverinfo),nXe(s,l,u,o),u("hovertemplate"),u("align"),u("sort");var c=a.colorway;let f=S=>c[S%c.length];u("color",l.label.map((S,L)=>m_.addOpacity(f(L),.8))),u("customdata");var v=t.link||{},g=iXe.newContainer(r,"link");function p(S,L){return R5.coerce(v,g,hD.link,S,L)}p("label"),p("arrowlen"),p("source"),p("target"),p("value"),p("line.color"),p("line.width"),p("hoverinfo",t.hoverinfo),nXe(v,g,p,o),p("hovertemplate"),p("sort");var _=m_.luminosity(a.paper_bgcolor)<.333,x=_?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",y=p("color",x);function C(S){if(!m_.isValid(S))return S;let L=m_.opacity(S);return L<=.8?m_.addOpacity(S,L+.2):_?m_.brighten(S,10):m_.adjustLightness(S,-10)}p("hovercolor",Array.isArray(y)?y.map(C):C(y)),p("customdata"),Hrr(v,g,{name:"colorscales",handleItemDefaults:jrr}),Grr(r,a,i),i("orientation"),i("direction"),i("valueformat"),i("valuesuffix");let k=l.x.length&&l.y.length?"freeform":void 0;i("arrangement",k),R5.coerceFont(i,"textfont",a.font,{autoShadowDflt:!0}),r._length=null};function jrr(e,t){function r(n,a){return R5.coerce(e,t,hD.link.colorscales,n,a)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var MK=fe((lMr,sXe)=>{"use strict";sXe.exports=Wrr;function Wrr(e){for(var t=e.length,r=new Array(t),n=new Array(t),a=new Array(t),i=new Array(t),o=new Array(t),s=new Array(t),l=0;l0;){x=C[C.length-1];var k=e[x];if(i[x]=0&&s[x].push(o[L])}i[x]=S}else{if(n[x]===r[x]){for(var w=[],T=[],A=0,S=y.length-1;S>=0;--S){var m=y[S];if(a[m]=!1,w.push(m),T.push(s[m]),A+=s[m].length,o[m]=c.length,m===x){y.length=S;break}}c.push(w);for(var F=new Array(A),S=0;S{"use strict";var Yrr=MK(),I5=Xt(),Xrr=L1().wrap,tS=I5.isArrayOrTypedArray,lXe=I5.isIndex,uXe=js();function Zrr(e){var t=e.node,r=e.link,n=[],a=tS(r.color),i=tS(r.hovercolor),o=tS(r.customdata),s={},l={},u=r.colorscales.length,c;for(c=0;cp&&(p=r.source[c]),r.target[c]>p&&(p=r.target[c]);var _=p+1;e.node._count=_;var x,y=e.node.groups,C={};for(c=0;c0&&lXe(A,_)&&lXe(m,_)&&!(C.hasOwnProperty(A)&&C.hasOwnProperty(m)&&C[A]===C[m])){C.hasOwnProperty(m)&&(m=C[m]),C.hasOwnProperty(A)&&(A=C[A]),A=+A,m=+m,s[A]=s[m]=!0;var F="";r.label&&r.label[c]&&(F=r.label[c]);var E=null;F&&l.hasOwnProperty(F)&&(E=l[F]),n.push({pointNumber:c,label:F,color:a?r.color[c]:r.color,hovercolor:i?r.hovercolor[c]:r.hovercolor,customdata:o?r.customdata[c]:r.customdata,concentrationscale:E,source:A,target:m,value:+T}),w.source.push(A),w.target.push(m)}}var I=_+y.length,R=tS(t.color),B=tS(t.customdata),O=[];for(c=0;c_-1,childrenNodes:[],pointNumber:c,label:U,color:R?t.color[c]:t.color,customdata:B?t.customdata[c]:t.customdata})}var j=!1;return $rr(I,w.source,w.target)&&(j=!0),{circular:j,links:n,nodes:O,groups:y,groupLookup:C}}function $rr(e,t,r){for(var n=I5.init2dArray(e,0),a=0;a1})}cXe.exports=function(t,r){var n=Zrr(r);return Xrr({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var dXe=fe((dD,hXe)=>{(function(e,t){typeof dD=="object"&&typeof hXe!="undefined"?t(dD):(e=e||self,t(e.d3=e.d3||{}))})(dD,function(e){"use strict";function t(T){var A=+this._x.call(null,T),m=+this._y.call(null,T);return r(this.cover(A,m),A,m,T)}function r(T,A,m,F){if(isNaN(A)||isNaN(m))return T;var E,I=T._root,R={data:F},B=T._x0,O=T._y0,U=T._x1,j=T._y1,q,V,K,ee,ce,me,ye,ue;if(!I)return T._root=R,T;for(;I.length;)if((ce=A>=(q=(B+U)/2))?B=q:U=q,(me=m>=(V=(O+j)/2))?O=V:j=V,E=I,!(I=I[ye=me<<1|ce]))return E[ye]=R,T;if(K=+T._x.call(null,I.data),ee=+T._y.call(null,I.data),A===K&&m===ee)return R.next=I,E?E[ye]=R:T._root=R,T;do E=E?E[ye]=new Array(4):T._root=new Array(4),(ce=A>=(q=(B+U)/2))?B=q:U=q,(me=m>=(V=(O+j)/2))?O=V:j=V;while((ye=me<<1|ce)===(ue=(ee>=V)<<1|K>=q));return E[ue]=I,E[ye]=R,T}function n(T){var A,m,F=T.length,E,I,R=new Array(F),B=new Array(F),O=1/0,U=1/0,j=-1/0,q=-1/0;for(m=0;mj&&(j=E),Iq&&(q=I));if(O>j||U>q)return this;for(this.cover(O,U).cover(j,q),m=0;mT||T>=E||F>A||A>=I;)switch(U=(Aj||(B=ee.y0)>q||(O=ee.x1)=ye)<<1|T>=me)&&(ee=V[V.length-1],V[V.length-1]=V[V.length-1-ce],V[V.length-1-ce]=ee)}else{var ue=T-+this._x.call(null,K.data),J=A-+this._y.call(null,K.data),_e=ue*ue+J*J;if(_e=(V=(R+O)/2))?R=V:O=V,(ce=q>=(K=(B+U)/2))?B=K:U=K,A=m,!(m=m[me=ce<<1|ee]))return this;if(!m.length)break;(A[me+1&3]||A[me+2&3]||A[me+3&3])&&(F=A,ye=me)}for(;m.data!==T;)if(E=m,!(m=m.next))return this;return(I=m.next)&&delete m.next,E?(I?E.next=I:delete E.next,this):A?(I?A[me]=I:delete A[me],(m=A[0]||A[1]||A[2]||A[3])&&m===(A[3]||A[2]||A[1]||A[0])&&!m.length&&(F?F[ye]=m:this._root=m),this):(this._root=I,this)}function c(T){for(var A=0,m=T.length;A{(function(e,t){t(typeof vD=="object"&&typeof vXe!="undefined"?vD:e.d3=e.d3||{})})(vD,(function(e){"use strict";var t="$";function r(){}r.prototype=n.prototype={constructor:r,has:function(_){return t+_ in this},get:function(_){return this[t+_]},set:function(_,x){return this[t+_]=x,this},remove:function(_){var x=t+_;return x in this&&delete this[x]},clear:function(){for(var _ in this)_[0]===t&&delete this[_]},keys:function(){var _=[];for(var x in this)x[0]===t&&_.push(x.slice(1));return _},values:function(){var _=[];for(var x in this)x[0]===t&&_.push(this[x]);return _},entries:function(){var _=[];for(var x in this)x[0]===t&&_.push({key:x.slice(1),value:this[x]});return _},size:function(){var _=0;for(var x in this)x[0]===t&&++_;return _},empty:function(){for(var _ in this)if(_[0]===t)return!1;return!0},each:function(_){for(var x in this)x[0]===t&&_(this[x],x.slice(1),this)}};function n(_,x){var y=new r;if(_ instanceof r)_.each(function(w,T){y.set(T,w)});else if(Array.isArray(_)){var C=-1,k=_.length,S;if(x==null)for(;++C=_.length)return y!=null&&w.sort(y),C!=null?C(w):w;for(var F=-1,E=w.length,I=_[T++],R,B,O=n(),U,j=A();++F_.length)return w;var A,m=x[T-1];return C!=null&&T>=_.length?A=w.entries():(A=[],w.each(function(F,E){A.push({key:E,values:L(F,T)})})),m!=null?A.sort(function(F,E){return m(F.key,E.key)}):A}return k={object:function(w){return S(w,0,i,o)},map:function(w){return S(w,0,s,l)},entries:function(w){return L(S(w,0,s,l),0)},key:function(w){return _.push(w),k},sortKeys:function(w){return x[_.length-1]=w,k},sortValues:function(w){return y=w,k},rollup:function(w){return C=w,k}}}function i(){return{}}function o(_,x,y){_[x]=y}function s(){return n()}function l(_,x,y){_.set(x,y)}function u(){}var c=n.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(_){return _+="",this[t+_]=_,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(_,x){var y=new u;if(_ instanceof u)_.each(function(S){y.add(S)});else if(_){var C=-1,k=_.length;if(x==null)for(;++C{(function(e,t){typeof pD=="object"&&typeof pXe!="undefined"?t(pD):(e=e||self,t(e.d3=e.d3||{}))})(pD,function(e){"use strict";var t={value:function(){}};function r(){for(var s=0,l=arguments.length,u={},c;s=0&&(c=u.slice(f+1),u=u.slice(0,f)),u&&!l.hasOwnProperty(u))throw new Error("unknown type: "+u);return{type:u,name:c}})}n.prototype=r.prototype={constructor:n,on:function(s,l){var u=this._,c=a(s+"",u),f,v=-1,g=c.length;if(arguments.length<2){for(;++v0)for(var u=new Array(f),c=0,f,v;c{(function(e,t){typeof gD=="object"&&typeof mXe!="undefined"?t(gD):(e=e||self,t(e.d3=e.d3||{}))})(gD,function(e){"use strict";var t=0,r=0,n=0,a=1e3,i,o,s=0,l=0,u=0,c=typeof performance=="object"&&performance.now?performance:Date,f=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(T){setTimeout(T,17)};function v(){return l||(f(g),l=c.now()+u)}function g(){l=0}function p(){this._call=this._time=this._next=null}p.prototype=_.prototype={constructor:p,restart:function(T,A,m){if(typeof T!="function")throw new TypeError("callback is not a function");m=(m==null?v():+m)+(A==null?0:+A),!this._next&&o!==this&&(o?o._next=this:i=this,o=this),this._call=T,this._time=m,S()},stop:function(){this._call&&(this._call=null,this._time=1/0,S())}};function _(T,A,m){var F=new p;return F.restart(T,A,m),F}function x(){v(),++t;for(var T=i,A;T;)(A=l-T._time)>=0&&T._call.call(null,A),T=T._next;--t}function y(){l=(s=c.now())+u,t=r=0;try{x()}finally{t=0,k(),l=0}}function C(){var T=c.now(),A=T-s;A>a&&(u-=A,s=T)}function k(){for(var T,A=i,m,F=1/0;A;)A._call?(F>A._time&&(F=A._time),T=A,A=A._next):(m=A._next,A._next=null,A=T?T._next=m:i=m);o=T,S(F)}function S(T){if(!t){r&&(r=clearTimeout(r));var A=T-l;A>24?(T<1/0&&(r=setTimeout(y,T-c.now()-u)),n&&(n=clearInterval(n))):(n||(s=c.now(),n=setInterval(C,a)),t=1,f(y))}}function L(T,A,m){var F=new p;return A=A==null?0:+A,F.restart(function(E){F.stop(),T(E+A)},A,m),F}function w(T,A,m){var F=new p,E=A;return A==null?(F.restart(T,A,m),F):(A=+A,m=m==null?v():+m,F.restart(function I(R){R+=E,F.restart(I,E+=A,m),T(R)},A,m),F)}e.interval=w,e.now=v,e.timeout=L,e.timer=_,e.timerFlush=x,Object.defineProperty(e,"__esModule",{value:!0})})});var _Xe=fe((mD,xXe)=>{(function(e,t){typeof mD=="object"&&typeof xXe!="undefined"?t(mD,dXe(),SK(),gXe(),yXe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(mD,(function(e,t,r,n,a){"use strict";function i(T,A){var m;T==null&&(T=0),A==null&&(A=0);function F(){var E,I=m.length,R,B=0,O=0;for(E=0;Eq.index){var xe=V-pe.x-pe.vx,be=K-pe.y-pe.vy,De=xe*xe+be*be;DeV+le||neK+le||aeO.r&&(O.r=O[U].r)}function B(){if(A){var O,U=A.length,j;for(m=new Array(U),O=0;O1?(ce==null?B.remove(ee):B.set(ee,K(ce)),A):B.get(ee)},find:function(ee,ce,me){var ye=0,ue=T.length,J,_e,ne,ae,pe;for(me==null?me=1/0:me*=me,ye=0;ye1?(U.on(ee,ce),A):U.on(ee)}}}function k(){var T,A,m,F=o(-30),E,I=1,R=1/0,B=.81;function O(V){var K,ee=T.length,ce=t.quadtree(T,p,_).visitAfter(j);for(m=V,K=0;K=R)return;(V.data!==A||V.next)&&(me===0&&(me=s(),J+=me*me),ye===0&&(ye=s(),J+=ye*ye),J{(function(e,t){typeof yD=="object"&&typeof bXe!="undefined"?t(yD):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(yD,(function(e){"use strict";function t(Dt,At){return DtAt?1:Dt>=At?0:NaN}function r(Dt){let At=Dt,Vt=Dt;Dt.length===1&&(At=(rn,Jr)=>Dt(rn)-Jr,Vt=n(Dt));function Qt(rn,Jr,qn,ri){for(qn==null&&(qn=0),ri==null&&(ri=rn.length);qn>>1;Vt(rn[Jn],Jr)<0?qn=Jn+1:ri=Jn}return qn}function Ut(rn,Jr,qn,ri){for(qn==null&&(qn=0),ri==null&&(ri=rn.length);qn>>1;Vt(rn[Jn],Jr)>0?ri=Jn:qn=Jn+1}return qn}function _r(rn,Jr,qn,ri){qn==null&&(qn=0),ri==null&&(ri=rn.length);let Jn=Qt(rn,Jr,qn,ri-1);return Jn>qn&&At(rn[Jn-1],Jr)>-At(rn[Jn],Jr)?Jn-1:Jn}return{left:Qt,center:_r,right:Ut}}function n(Dt){return(At,Vt)=>t(Dt(At),Vt)}function a(Dt){return Dt===null?NaN:+Dt}function*i(Dt,At){if(At===void 0)for(let Vt of Dt)Vt!=null&&(Vt=+Vt)>=Vt&&(yield Vt);else{let Vt=-1;for(let Qt of Dt)(Qt=At(Qt,++Vt,Dt))!=null&&(Qt=+Qt)>=Qt&&(yield Qt)}}let o=r(t),s=o.right,l=o.left,u=r(a).center;function c(Dt,At){let Vt=0;if(At===void 0)for(let Qt of Dt)Qt!=null&&(Qt=+Qt)>=Qt&&++Vt;else{let Qt=-1;for(let Ut of Dt)(Ut=At(Ut,++Qt,Dt))!=null&&(Ut=+Ut)>=Ut&&++Vt}return Vt}function f(Dt){return Dt.length|0}function v(Dt){return!(Dt>0)}function g(Dt){return typeof Dt!="object"||"length"in Dt?Dt:Array.from(Dt)}function p(Dt){return At=>Dt(...At)}function _(...Dt){let At=typeof Dt[Dt.length-1]=="function"&&p(Dt.pop());Dt=Dt.map(g);let Vt=Dt.map(f),Qt=Dt.length-1,Ut=new Array(Qt+1).fill(0),_r=[];if(Qt<0||Vt.some(v))return _r;for(;;){_r.push(Ut.map((Jr,qn)=>Dt[qn][Jr]));let rn=Qt;for(;++Ut[rn]===Vt[rn];){if(rn===0)return At?_r.map(At):_r;Ut[rn--]=0}}}function x(Dt,At){var Vt=0,Qt=0;return Float64Array.from(Dt,At===void 0?Ut=>Vt+=+Ut||0:Ut=>Vt+=+At(Ut,Qt++,Dt)||0)}function y(Dt,At){return AtDt?1:At>=Dt?0:NaN}function C(Dt,At){let Vt=0,Qt,Ut=0,_r=0;if(At===void 0)for(let rn of Dt)rn!=null&&(rn=+rn)>=rn&&(Qt=rn-Ut,Ut+=Qt/++Vt,_r+=Qt*(rn-Ut));else{let rn=-1;for(let Jr of Dt)(Jr=At(Jr,++rn,Dt))!=null&&(Jr=+Jr)>=Jr&&(Qt=Jr-Ut,Ut+=Qt/++Vt,_r+=Qt*(Jr-Ut))}if(Vt>1)return _r/(Vt-1)}function k(Dt,At){let Vt=C(Dt,At);return Vt&&Math.sqrt(Vt)}function S(Dt,At){let Vt,Qt;if(At===void 0)for(let Ut of Dt)Ut!=null&&(Vt===void 0?Ut>=Ut&&(Vt=Qt=Ut):(Vt>Ut&&(Vt=Ut),Qt=_r&&(Vt=Qt=_r):(Vt>_r&&(Vt=_r),Qt<_r&&(Qt=_r)))}return[Vt,Qt]}class L{constructor(){this._partials=new Float64Array(32),this._n=0}add(At){let Vt=this._partials,Qt=0;for(let Ut=0;Ut0){for(rn=At[--Vt];Vt>0&&(Qt=rn,Ut=At[--Vt],rn=Qt+Ut,_r=Ut-(rn-Qt),!_r););Vt>0&&(_r<0&&At[Vt-1]<0||_r>0&&At[Vt-1]>0)&&(Ut=_r*2,Qt=rn+Ut,Ut==Qt-rn&&(rn=Qt))}return rn}}function w(Dt,At){let Vt=new L;if(At===void 0)for(let Qt of Dt)(Qt=+Qt)&&Vt.add(Qt);else{let Qt=-1;for(let Ut of Dt)(Ut=+At(Ut,++Qt,Dt))&&Vt.add(Ut)}return+Vt}function T(Dt,At){let Vt=new L,Qt=-1;return Float64Array.from(Dt,At===void 0?Ut=>Vt.add(+Ut||0):Ut=>Vt.add(+At(Ut,++Qt,Dt)||0))}class A extends Map{constructor(At,Vt=R){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:Vt}}),At!=null)for(let[Qt,Ut]of At)this.set(Qt,Ut)}get(At){return super.get(F(this,At))}has(At){return super.has(F(this,At))}set(At,Vt){return super.set(E(this,At),Vt)}delete(At){return super.delete(I(this,At))}}class m extends Set{constructor(At,Vt=R){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:Vt}}),At!=null)for(let Qt of At)this.add(Qt)}has(At){return super.has(F(this,At))}add(At){return super.add(E(this,At))}delete(At){return super.delete(I(this,At))}}function F({_intern:Dt,_key:At},Vt){let Qt=At(Vt);return Dt.has(Qt)?Dt.get(Qt):Vt}function E({_intern:Dt,_key:At},Vt){let Qt=At(Vt);return Dt.has(Qt)?Dt.get(Qt):(Dt.set(Qt,Vt),Vt)}function I({_intern:Dt,_key:At},Vt){let Qt=At(Vt);return Dt.has(Qt)&&(Vt=Dt.get(Vt),Dt.delete(Qt)),Vt}function R(Dt){return Dt!==null&&typeof Dt=="object"?Dt.valueOf():Dt}function B(Dt){return Dt}function O(Dt,...At){return ce(Dt,B,B,At)}function U(Dt,...At){return ce(Dt,Array.from,B,At)}function j(Dt,At,...Vt){return ce(Dt,B,At,Vt)}function q(Dt,At,...Vt){return ce(Dt,Array.from,At,Vt)}function V(Dt,...At){return ce(Dt,B,ee,At)}function K(Dt,...At){return ce(Dt,Array.from,ee,At)}function ee(Dt){if(Dt.length!==1)throw new Error("duplicate key");return Dt[0]}function ce(Dt,At,Vt,Qt){return(function Ut(_r,rn){if(rn>=Qt.length)return Vt(_r);let Jr=new A,qn=Qt[rn++],ri=-1;for(let Jn of _r){let Ii=qn(Jn,++ri,_r),Vi=Jr.get(Ii);Vi?Vi.push(Jn):Jr.set(Ii,[Jn])}for(let[Jn,Ii]of Jr)Jr.set(Jn,Ut(Ii,rn));return At(Jr)})(Dt,0)}function me(Dt,At){return Array.from(At,Vt=>Dt[Vt])}function ye(Dt,...At){if(typeof Dt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");Dt=Array.from(Dt);let[Vt=t]=At;if(Vt.length===1||At.length>1){let Qt=Uint32Array.from(Dt,(Ut,_r)=>_r);return At.length>1?(At=At.map(Ut=>Dt.map(Ut)),Qt.sort((Ut,_r)=>{for(let rn of At){let Jr=t(rn[Ut],rn[_r]);if(Jr)return Jr}})):(Vt=Dt.map(Vt),Qt.sort((Ut,_r)=>t(Vt[Ut],Vt[_r]))),me(Dt,Qt)}return Dt.sort(Vt)}function ue(Dt,At,Vt){return(At.length===1?ye(j(Dt,At,Vt),(([Qt,Ut],[_r,rn])=>t(Ut,rn)||t(Qt,_r))):ye(O(Dt,Vt),(([Qt,Ut],[_r,rn])=>At(Ut,rn)||t(Qt,_r)))).map(([Qt])=>Qt)}var J=Array.prototype,_e=J.slice;function ne(Dt){return function(){return Dt}}var ae=Math.sqrt(50),pe=Math.sqrt(10),ie=Math.sqrt(2);function le(Dt,At,Vt){var Qt,Ut=-1,_r,rn,Jr;if(At=+At,Dt=+Dt,Vt=+Vt,Dt===At&&Vt>0)return[Dt];if((Qt=At0){let qn=Math.round(Dt/Jr),ri=Math.round(At/Jr);for(qn*JrAt&&--ri,rn=new Array(_r=ri-qn+1);++Ut<_r;)rn[Ut]=(qn+Ut)*Jr}else{Jr=-Jr;let qn=Math.round(Dt*Jr),ri=Math.round(At*Jr);for(qn/JrAt&&--ri,rn=new Array(_r=ri-qn+1);++Ut<_r;)rn[Ut]=(qn+Ut)/Jr}return Qt&&rn.reverse(),rn}function xe(Dt,At,Vt){var Qt=(At-Dt)/Math.max(0,Vt),Ut=Math.floor(Math.log(Qt)/Math.LN10),_r=Qt/Math.pow(10,Ut);return Ut>=0?(_r>=ae?10:_r>=pe?5:_r>=ie?2:1)*Math.pow(10,Ut):-Math.pow(10,-Ut)/(_r>=ae?10:_r>=pe?5:_r>=ie?2:1)}function be(Dt,At,Vt){var Qt=Math.abs(At-Dt)/Math.max(0,Vt),Ut=Math.pow(10,Math.floor(Math.log(Qt)/Math.LN10)),_r=Qt/Ut;return _r>=ae?Ut*=10:_r>=pe?Ut*=5:_r>=ie&&(Ut*=2),At0?(Dt=Math.floor(Dt/Ut)*Ut,At=Math.ceil(At/Ut)*Ut):Ut<0&&(Dt=Math.ceil(Dt*Ut)/Ut,At=Math.floor(At*Ut)/Ut),Qt=Ut}}function Ge(Dt){return Math.ceil(Math.log(c(Dt))/Math.LN2)+1}function pt(){var Dt=B,At=S,Vt=Ge;function Qt(Ut){Array.isArray(Ut)||(Ut=Array.from(Ut));var _r,rn=Ut.length,Jr,qn=new Array(rn);for(_r=0;_r=Ii)if(Xi>=Ii&&At===S){let Ma=xe(Jn,Ii,oa);isFinite(Ma)&&(Ma>0?Ii=(Math.floor(Ii/Ma)+1)*Ma:Ma<0&&(Ii=(Math.ceil(Ii*-Ma)+1)/-Ma))}else Vi.pop()}for(var ra=Vi.length;Vi[0]<=Jn;)Vi.shift(),--ra;for(;Vi[ra-1]>Ii;)Vi.pop(),--ra;var ha=new Array(ra+1),va;for(_r=0;_r<=ra;++_r)va=ha[_r]=[],va.x0=_r>0?Vi[_r-1]:Jn,va.x1=_r=Qt)&&(Vt=Qt);else{let Qt=-1;for(let Ut of Dt)(Ut=At(Ut,++Qt,Dt))!=null&&(Vt=Ut)&&(Vt=Ut)}return Vt}function Oe(Dt,At){let Vt;if(At===void 0)for(let Qt of Dt)Qt!=null&&(Vt>Qt||Vt===void 0&&Qt>=Qt)&&(Vt=Qt);else{let Qt=-1;for(let Ut of Dt)(Ut=At(Ut,++Qt,Dt))!=null&&(Vt>Ut||Vt===void 0&&Ut>=Ut)&&(Vt=Ut)}return Vt}function ze(Dt,At,Vt=0,Qt=Dt.length-1,Ut=t){for(;Qt>Vt;){if(Qt-Vt>600){let qn=Qt-Vt+1,ri=At-Vt+1,Jn=Math.log(qn),Ii=.5*Math.exp(2*Jn/3),Vi=.5*Math.sqrt(Jn*Ii*(qn-Ii)/qn)*(ri-qn/2<0?-1:1),ra=Math.max(Vt,Math.floor(At-ri*Ii/qn+Vi)),ha=Math.min(Qt,Math.floor(At+(qn-ri)*Ii/qn+Vi));ze(Dt,At,ra,ha,Ut)}let _r=Dt[At],rn=Vt,Jr=Qt;for(ut(Dt,Vt,At),Ut(Dt[Qt],_r)>0&&ut(Dt,Vt,Qt);rn0;)--Jr}Ut(Dt[Vt],_r)===0?ut(Dt,Vt,Jr):(++Jr,ut(Dt,Jr,Qt)),Jr<=At&&(Vt=Jr+1),At<=Jr&&(Qt=Jr-1)}return Dt}function ut(Dt,At,Vt){let Qt=Dt[At];Dt[At]=Dt[Vt],Dt[Vt]=Qt}function et(Dt,At,Vt){if(Dt=Float64Array.from(i(Dt,Vt)),!!(Qt=Dt.length)){if((At=+At)<=0||Qt<2)return Oe(Dt);if(At>=1)return tt(Dt);var Qt,Ut=(Qt-1)*At,_r=Math.floor(Ut),rn=tt(ze(Dt,_r).subarray(0,_r+1)),Jr=Oe(Dt.subarray(_r+1));return rn+(Jr-rn)*(Ut-_r)}}function qe(Dt,At,Vt=a){if(Qt=Dt.length){if((At=+At)<=0||Qt<2)return+Vt(Dt[0],0,Dt);if(At>=1)return+Vt(Dt[Qt-1],Qt-1,Dt);var Qt,Ut=(Qt-1)*At,_r=Math.floor(Ut),rn=+Vt(Dt[_r],_r,Dt),Jr=+Vt(Dt[_r+1],_r+1,Dt);return rn+(Jr-rn)*(Ut-_r)}}function we(Dt,At,Vt){return Math.ceil((Vt-At)/(2*(et(Dt,.75)-et(Dt,.25))*Math.pow(c(Dt),-1/3)))}function Le(Dt,At,Vt){return Math.ceil((Vt-At)/(3.5*k(Dt)*Math.pow(c(Dt),-1/3)))}function Ke(Dt,At){let Vt,Qt=-1,Ut=-1;if(At===void 0)for(let _r of Dt)++Ut,_r!=null&&(Vt<_r||Vt===void 0&&_r>=_r)&&(Vt=_r,Qt=Ut);else for(let _r of Dt)(_r=At(_r,++Ut,Dt))!=null&&(Vt<_r||Vt===void 0&&_r>=_r)&&(Vt=_r,Qt=Ut);return Qt}function Te(Dt,At){let Vt=0,Qt=0;if(At===void 0)for(let Ut of Dt)Ut!=null&&(Ut=+Ut)>=Ut&&(++Vt,Qt+=Ut);else{let Ut=-1;for(let _r of Dt)(_r=At(_r,++Ut,Dt))!=null&&(_r=+_r)>=_r&&(++Vt,Qt+=_r)}if(Vt)return Qt/Vt}function Ve(Dt,At){return et(Dt,.5,At)}function*$e(Dt){for(let At of Dt)yield*Cte(At)}function ot(Dt){return Array.from($e(Dt))}function rt(Dt,At){let Vt,Qt=-1,Ut=-1;if(At===void 0)for(let _r of Dt)++Ut,_r!=null&&(Vt>_r||Vt===void 0&&_r>=_r)&&(Vt=_r,Qt=Ut);else for(let _r of Dt)(_r=At(_r,++Ut,Dt))!=null&&(Vt>_r||Vt===void 0&&_r>=_r)&&(Vt=_r,Qt=Ut);return Qt}function it(Dt,At=We){let Vt=[],Qt,Ut=!1;for(let _r of Dt)Ut&&Vt.push(At(Qt,_r)),Qt=_r,Ut=!0;return Vt}function We(Dt,At){return[Dt,At]}function mt(Dt,At,Vt){Dt=+Dt,At=+At,Vt=(Ut=arguments.length)<2?(At=Dt,Dt=0,1):Ut<3?1:+Vt;for(var Qt=-1,Ut=Math.max(0,Math.ceil((At-Dt)/Vt))|0,_r=new Array(Ut);++Qt0:t(rn,rn)===0)&&(Vt=_r,Ut=rn,Qt=!0)}}else for(let Ut of Dt)(Qt?At(Ut,Vt)>0:At(Ut,Ut)===0)&&(Vt=Ut,Qt=!0);return Vt}function mr(Dt,At=t){if(At.length===1)return Ke(Dt,At);let Vt,Qt=-1,Ut=-1;for(let _r of Dt)++Ut,(Qt<0?At(_r,_r)===0:At(_r,Vt)>0)&&(Vt=_r,Qt=Ut);return Qt}function or(Dt,At){let Vt=Yt(Dt,At);return Vt<0?void 0:Vt}var fr=Ot(Math.random);function Ot(Dt){return function(Vt,Qt=0,Ut=Vt.length){let _r=Ut-(Qt=+Qt);for(;_r;){let rn=Dt()*_r--|0,Jr=Vt[_r+Qt];Vt[_r+Qt]=Vt[rn+Qt],Vt[rn+Qt]=Jr}return Vt}}function cr(Dt,At){let Vt=0;if(At===void 0)for(let Qt of Dt)(Qt=+Qt)&&(Vt+=Qt);else{let Qt=-1;for(let Ut of Dt)(Ut=+At(Ut,++Qt,Dt))&&(Vt+=Ut)}return Vt}function Ct(Dt){if(!(_r=Dt.length))return[];for(var At=-1,Vt=Oe(Dt,wt),Qt=new Array(Vt);++AtAt(Vt,Qt,Dt))}function rr(Dt,At,Vt){if(typeof At!="function")throw new TypeError("reducer is not a function");let Qt=Dt[Symbol.iterator](),Ut,_r,rn=-1;if(arguments.length<3){if({done:Ut,value:Vt}=Qt.next(),Ut)return;++rn}for(;{done:Ut,value:_r}=Qt.next(),!Ut;)Vt=At(Vt,_r,++rn,Dt);return Vt}function pr(Dt){if(typeof Dt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(Dt).reverse()}function Kr(Dt,...At){Dt=new Set(Dt);for(let Vt of At)for(let Qt of Vt)Dt.delete(Qt);return Dt}function Nr(Dt,At){let Vt=At[Symbol.iterator](),Qt=new Set;for(let Ut of Dt){if(Qt.has(Ut))return!1;let _r,rn;for(;({value:_r,done:rn}=Vt.next())&&!rn;){if(Object.is(Ut,_r))return!1;Qt.add(_r)}}return!0}function dn(Dt){return Dt instanceof Set?Dt:new Set(Dt)}function xr(Dt,...At){Dt=new Set(Dt),At=At.map(dn);e:for(let Vt of Dt)for(let Qt of At)if(!Qt.has(Vt)){Dt.delete(Vt);continue e}return Dt}function Fr(Dt,At){let Vt=Dt[Symbol.iterator](),Qt=new Set;for(let Ut of At){if(Qt.has(Ut))continue;let _r,rn;for(;{value:_r,done:rn}=Vt.next();){if(rn)return!1;if(Qt.add(_r),Object.is(Ut,_r))break}}return!0}function Zr(Dt,At){return Fr(At,Dt)}function Cn(...Dt){let At=new Set;for(let Vt of Dt)for(let Qt of Vt)At.add(Qt);return At}e.Adder=L,e.InternMap=A,e.InternSet=m,e.ascending=t,e.bin=pt,e.bisect=s,e.bisectCenter=u,e.bisectLeft=l,e.bisectRight=s,e.bisector=r,e.count=c,e.cross=_,e.cumsum=x,e.descending=y,e.deviation=k,e.difference=Kr,e.disjoint=Nr,e.every=Mt,e.extent=S,e.fcumsum=T,e.filter=ft,e.fsum=w,e.greatest=jt,e.greatestIndex=mr,e.group=O,e.groupSort=ue,e.groups=U,e.histogram=pt,e.index=V,e.indexes=K,e.intersection=xr,e.least=bt,e.leastIndex=Yt,e.map=kt,e.max=tt,e.maxIndex=Ke,e.mean=Te,e.median=Ve,e.merge=ot,e.min=Oe,e.minIndex=rt,e.nice=De,e.pairs=it,e.permute=me,e.quantile=et,e.quantileSorted=qe,e.quickselect=ze,e.range=mt,e.reduce=rr,e.reverse=pr,e.rollup=j,e.rollups=q,e.scan=or,e.shuffle=fr,e.shuffler=Ot,e.some=Lt,e.sort=ye,e.subset=Zr,e.sum=cr,e.superset=Fr,e.thresholdFreedmanDiaconis=we,e.thresholdScott=Le,e.thresholdSturges=Ge,e.tickIncrement=xe,e.tickStep=be,e.ticks=le,e.transpose=Ct,e.union=Cn,e.variance=C,e.zip=Tt,Object.defineProperty(e,"__esModule",{value:!0})}))});var AXe=fe((xD,TXe)=>{(function(e,t){typeof xD=="object"&&typeof TXe!="undefined"?t(xD):(e=e||self,t(e.d3=e.d3||{}))})(xD,function(e){"use strict";var t=Math.PI,r=2*t,n=1e-6,a=r-n;function i(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function o(){return new i}i.prototype=o.prototype={constructor:i,moveTo:function(s,l){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(s,l){this._+="L"+(this._x1=+s)+","+(this._y1=+l)},quadraticCurveTo:function(s,l,u,c){this._+="Q"+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+c)},bezierCurveTo:function(s,l,u,c,f,v){this._+="C"+ +s+","+ +l+","+ +u+","+ +c+","+(this._x1=+f)+","+(this._y1=+v)},arcTo:function(s,l,u,c,f){s=+s,l=+l,u=+u,c=+c,f=+f;var v=this._x1,g=this._y1,p=u-s,_=c-l,x=v-s,y=g-l,C=x*x+y*y;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=l);else if(C>n)if(!(Math.abs(y*p-_*x)>n)||!f)this._+="L"+(this._x1=s)+","+(this._y1=l);else{var k=u-v,S=c-g,L=p*p+_*_,w=k*k+S*S,T=Math.sqrt(L),A=Math.sqrt(C),m=f*Math.tan((t-Math.acos((L+C-w)/(2*T*A)))/2),F=m/A,E=m/T;Math.abs(F-1)>n&&(this._+="L"+(s+F*x)+","+(l+F*y)),this._+="A"+f+","+f+",0,0,"+ +(y*k>x*S)+","+(this._x1=s+E*p)+","+(this._y1=l+E*_)}},arc:function(s,l,u,c,f,v){s=+s,l=+l,u=+u,v=!!v;var g=u*Math.cos(c),p=u*Math.sin(c),_=s+g,x=l+p,y=1^v,C=v?c-f:f-c;if(u<0)throw new Error("negative radius: "+u);this._x1===null?this._+="M"+_+","+x:(Math.abs(this._x1-_)>n||Math.abs(this._y1-x)>n)&&(this._+="L"+_+","+x),u&&(C<0&&(C=C%r+r),C>a?this._+="A"+u+","+u+",0,1,"+y+","+(s-g)+","+(l-p)+"A"+u+","+u+",0,1,"+y+","+(this._x1=_)+","+(this._y1=x):C>n&&(this._+="A"+u+","+u+",0,"+ +(C>=t)+","+y+","+(this._x1=s+u*Math.cos(f))+","+(this._y1=l+u*Math.sin(f))))},rect:function(s,l,u,c){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)+"h"+ +u+"v"+ +c+"h"+-u+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var EK=fe((_D,MXe)=>{(function(e,t){typeof _D=="object"&&typeof MXe!="undefined"?t(_D,AXe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(_D,function(e,t){"use strict";function r(ct){return function(){return ct}}var n=Math.abs,a=Math.atan2,i=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,f=Math.PI,v=f/2,g=2*f;function p(ct){return ct>1?0:ct<-1?f:Math.acos(ct)}function _(ct){return ct>=1?v:ct<=-1?-v:Math.asin(ct)}function x(ct){return ct.innerRadius}function y(ct){return ct.outerRadius}function C(ct){return ct.startAngle}function k(ct){return ct.endAngle}function S(ct){return ct&&ct.padAngle}function L(ct,Jt,er,wr,nn,Dr,bn,Yr){var Tn=er-ct,Kn=wr-Jt,Qn=bn-nn,Ai=Yr-Dr,Qi=Ai*Tn-Qn*Kn;if(!(Qi*QiAs*As+Ms*Ms&&(xo=oo,so=Co),{cx:xo,cy:so,x01:-Qn,y01:-Ai,x11:xo*(nn/Ni-1),y11:so*(nn/Ni-1)}}function T(){var ct=x,Jt=y,er=r(0),wr=null,nn=C,Dr=k,bn=S,Yr=null;function Tn(){var Kn,Qn,Ai=+ct.apply(this,arguments),Qi=+Jt.apply(this,arguments),Ra=nn.apply(this,arguments)-v,ii=Dr.apply(this,arguments)-v,Za=n(ii-Ra),ja=ii>Ra;if(Yr||(Yr=Kn=t.path()),Qic))Yr.moveTo(0,0);else if(Za>g-c)Yr.moveTo(Qi*i(Ra),Qi*l(Ra)),Yr.arc(0,0,Qi,Ra,ii,!ja),Ai>c&&(Yr.moveTo(Ai*i(ii),Ai*l(ii)),Yr.arc(0,0,Ai,ii,Ra,ja));else{var qo=Ra,$a=ii,Ka=Ra,Oa=ii,Ni=Za,ka=Za,vs=bn.apply(this,arguments)/2,xo=vs>c&&(wr?+wr.apply(this,arguments):u(Ai*Ai+Qi*Qi)),so=s(n(Qi-Ai)/2,+er.apply(this,arguments)),oo=so,Co=so,pa,la;if(xo>c){var As=_(xo/Ai*l(vs)),Ms=_(xo/Qi*l(vs));(Ni-=As*2)>c?(As*=ja?1:-1,Ka+=As,Oa-=As):(Ni=0,Ka=Oa=(Ra+ii)/2),(ka-=Ms*2)>c?(Ms*=ja?1:-1,qo+=Ms,$a-=Ms):(ka=0,qo=$a=(Ra+ii)/2)}var xu=Qi*i(qo),rs=Qi*l(qo),Ls=Ai*i(Oa),$s=Ai*l(Oa);if(so>c){var Kc=Qi*i($a),_u=Qi*l($a),Gu=Ai*i(Ka),Ja=Ai*l(Ka),ps;if(Zac?Co>c?(pa=w(Gu,Ja,xu,rs,Qi,Co,ja),la=w(Kc,_u,Ls,$s,Qi,Co,ja),Yr.moveTo(pa.cx+pa.x01,pa.cy+pa.y01),Coc)||!(Ni>c)?Yr.lineTo(Ls,$s):oo>c?(pa=w(Ls,$s,Kc,_u,Ai,-oo,ja),la=w(xu,rs,Gu,Ja,Ai,-oo,ja),Yr.lineTo(pa.cx+pa.x01,pa.cy+pa.y01),oo=Qi;--Ra)Yr.point($a[Ra],Ka[Ra]);Yr.lineEnd(),Yr.areaEnd()}ja&&($a[Ai]=+ct(Za,Ai,Qn),Ka[Ai]=+er(Za,Ai,Qn),Yr.point(Jt?+Jt(Za,Ai,Qn):$a[Ai],wr?+wr(Za,Ai,Qn):Ka[Ai]))}if(qo)return Yr=null,qo+""||null}function Kn(){return I().defined(nn).curve(bn).context(Dr)}return Tn.x=function(Qn){return arguments.length?(ct=typeof Qn=="function"?Qn:r(+Qn),Jt=null,Tn):ct},Tn.x0=function(Qn){return arguments.length?(ct=typeof Qn=="function"?Qn:r(+Qn),Tn):ct},Tn.x1=function(Qn){return arguments.length?(Jt=Qn==null?null:typeof Qn=="function"?Qn:r(+Qn),Tn):Jt},Tn.y=function(Qn){return arguments.length?(er=typeof Qn=="function"?Qn:r(+Qn),wr=null,Tn):er},Tn.y0=function(Qn){return arguments.length?(er=typeof Qn=="function"?Qn:r(+Qn),Tn):er},Tn.y1=function(Qn){return arguments.length?(wr=Qn==null?null:typeof Qn=="function"?Qn:r(+Qn),Tn):wr},Tn.lineX0=Tn.lineY0=function(){return Kn().x(ct).y(er)},Tn.lineY1=function(){return Kn().x(ct).y(wr)},Tn.lineX1=function(){return Kn().x(Jt).y(er)},Tn.defined=function(Qn){return arguments.length?(nn=typeof Qn=="function"?Qn:r(!!Qn),Tn):nn},Tn.curve=function(Qn){return arguments.length?(bn=Qn,Dr!=null&&(Yr=bn(Dr)),Tn):bn},Tn.context=function(Qn){return arguments.length?(Qn==null?Dr=Yr=null:Yr=bn(Dr=Qn),Tn):Dr},Tn}function B(ct,Jt){return Jtct?1:Jt>=ct?0:NaN}function O(ct){return ct}function U(){var ct=O,Jt=B,er=null,wr=r(0),nn=r(g),Dr=r(0);function bn(Yr){var Tn,Kn=Yr.length,Qn,Ai,Qi=0,Ra=new Array(Kn),ii=new Array(Kn),Za=+wr.apply(this,arguments),ja=Math.min(g,Math.max(-g,nn.apply(this,arguments)-Za)),qo,$a=Math.min(Math.abs(ja)/Kn,Dr.apply(this,arguments)),Ka=$a*(ja<0?-1:1),Oa;for(Tn=0;Tn0&&(Qi+=Oa);for(Jt!=null?Ra.sort(function(Ni,ka){return Jt(ii[Ni],ii[ka])}):er!=null&&Ra.sort(function(Ni,ka){return er(Yr[Ni],Yr[ka])}),Tn=0,Ai=Qi?(ja-Kn*Ka)/Qi:0;Tn0?Oa*Ai:0)+Ka,ii[Qn]={data:Yr[Qn],index:Tn,value:Oa,startAngle:Za,endAngle:qo,padAngle:$a};return ii}return bn.value=function(Yr){return arguments.length?(ct=typeof Yr=="function"?Yr:r(+Yr),bn):ct},bn.sortValues=function(Yr){return arguments.length?(Jt=Yr,er=null,bn):Jt},bn.sort=function(Yr){return arguments.length?(er=Yr,Jt=null,bn):er},bn.startAngle=function(Yr){return arguments.length?(wr=typeof Yr=="function"?Yr:r(+Yr),bn):wr},bn.endAngle=function(Yr){return arguments.length?(nn=typeof Yr=="function"?Yr:r(+Yr),bn):nn},bn.padAngle=function(Yr){return arguments.length?(Dr=typeof Yr=="function"?Yr:r(+Yr),bn):Dr},bn}var j=V(m);function q(ct){this._curve=ct}q.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(ct,Jt){this._curve.point(Jt*Math.sin(ct),Jt*-Math.cos(ct))}};function V(ct){function Jt(er){return new q(ct(er))}return Jt._curve=ct,Jt}function K(ct){var Jt=ct.curve;return ct.angle=ct.x,delete ct.x,ct.radius=ct.y,delete ct.y,ct.curve=function(er){return arguments.length?Jt(V(er)):Jt()._curve},ct}function ee(){return K(I().curve(j))}function ce(){var ct=R().curve(j),Jt=ct.curve,er=ct.lineX0,wr=ct.lineX1,nn=ct.lineY0,Dr=ct.lineY1;return ct.angle=ct.x,delete ct.x,ct.startAngle=ct.x0,delete ct.x0,ct.endAngle=ct.x1,delete ct.x1,ct.radius=ct.y,delete ct.y,ct.innerRadius=ct.y0,delete ct.y0,ct.outerRadius=ct.y1,delete ct.y1,ct.lineStartAngle=function(){return K(er())},delete ct.lineX0,ct.lineEndAngle=function(){return K(wr())},delete ct.lineX1,ct.lineInnerRadius=function(){return K(nn())},delete ct.lineY0,ct.lineOuterRadius=function(){return K(Dr())},delete ct.lineY1,ct.curve=function(bn){return arguments.length?Jt(V(bn)):Jt()._curve},ct}function me(ct,Jt){return[(Jt=+Jt)*Math.cos(ct-=Math.PI/2),Jt*Math.sin(ct)]}var ye=Array.prototype.slice;function ue(ct){return ct.source}function J(ct){return ct.target}function _e(ct){var Jt=ue,er=J,wr=F,nn=E,Dr=null;function bn(){var Yr,Tn=ye.call(arguments),Kn=Jt.apply(this,Tn),Qn=er.apply(this,Tn);if(Dr||(Dr=Yr=t.path()),ct(Dr,+wr.apply(this,(Tn[0]=Kn,Tn)),+nn.apply(this,Tn),+wr.apply(this,(Tn[0]=Qn,Tn)),+nn.apply(this,Tn)),Yr)return Dr=null,Yr+""||null}return bn.source=function(Yr){return arguments.length?(Jt=Yr,bn):Jt},bn.target=function(Yr){return arguments.length?(er=Yr,bn):er},bn.x=function(Yr){return arguments.length?(wr=typeof Yr=="function"?Yr:r(+Yr),bn):wr},bn.y=function(Yr){return arguments.length?(nn=typeof Yr=="function"?Yr:r(+Yr),bn):nn},bn.context=function(Yr){return arguments.length?(Dr=Yr==null?null:Yr,bn):Dr},bn}function ne(ct,Jt,er,wr,nn){ct.moveTo(Jt,er),ct.bezierCurveTo(Jt=(Jt+wr)/2,er,Jt,nn,wr,nn)}function ae(ct,Jt,er,wr,nn){ct.moveTo(Jt,er),ct.bezierCurveTo(Jt,er=(er+nn)/2,wr,er,wr,nn)}function pe(ct,Jt,er,wr,nn){var Dr=me(Jt,er),bn=me(Jt,er=(er+nn)/2),Yr=me(wr,er),Tn=me(wr,nn);ct.moveTo(Dr[0],Dr[1]),ct.bezierCurveTo(bn[0],bn[1],Yr[0],Yr[1],Tn[0],Tn[1])}function ie(){return _e(ne)}function le(){return _e(ae)}function xe(){var ct=_e(pe);return ct.angle=ct.x,delete ct.x,ct.radius=ct.y,delete ct.y,ct}var be={draw:function(ct,Jt){var er=Math.sqrt(Jt/f);ct.moveTo(er,0),ct.arc(0,0,er,0,g)}},De={draw:function(ct,Jt){var er=Math.sqrt(Jt/5)/2;ct.moveTo(-3*er,-er),ct.lineTo(-er,-er),ct.lineTo(-er,-3*er),ct.lineTo(er,-3*er),ct.lineTo(er,-er),ct.lineTo(3*er,-er),ct.lineTo(3*er,er),ct.lineTo(er,er),ct.lineTo(er,3*er),ct.lineTo(-er,3*er),ct.lineTo(-er,er),ct.lineTo(-3*er,er),ct.closePath()}},Ge=Math.sqrt(1/3),pt=Ge*2,tt={draw:function(ct,Jt){var er=Math.sqrt(Jt/pt),wr=er*Ge;ct.moveTo(0,-er),ct.lineTo(wr,0),ct.lineTo(0,er),ct.lineTo(-wr,0),ct.closePath()}},Oe=.8908130915292852,ze=Math.sin(f/10)/Math.sin(7*f/10),ut=Math.sin(g/10)*ze,et=-Math.cos(g/10)*ze,qe={draw:function(ct,Jt){var er=Math.sqrt(Jt*Oe),wr=ut*er,nn=et*er;ct.moveTo(0,-er),ct.lineTo(wr,nn);for(var Dr=1;Dr<5;++Dr){var bn=g*Dr/5,Yr=Math.cos(bn),Tn=Math.sin(bn);ct.lineTo(Tn*er,-Yr*er),ct.lineTo(Yr*wr-Tn*nn,Tn*wr+Yr*nn)}ct.closePath()}},we={draw:function(ct,Jt){var er=Math.sqrt(Jt),wr=-er/2;ct.rect(wr,wr,er,er)}},Le=Math.sqrt(3),Ke={draw:function(ct,Jt){var er=-Math.sqrt(Jt/(Le*3));ct.moveTo(0,er*2),ct.lineTo(-Le*er,-er),ct.lineTo(Le*er,-er),ct.closePath()}},Te=-.5,Ve=Math.sqrt(3)/2,$e=1/Math.sqrt(12),ot=($e/2+1)*3,rt={draw:function(ct,Jt){var er=Math.sqrt(Jt/ot),wr=er/2,nn=er*$e,Dr=wr,bn=er*$e+er,Yr=-Dr,Tn=bn;ct.moveTo(wr,nn),ct.lineTo(Dr,bn),ct.lineTo(Yr,Tn),ct.lineTo(Te*wr-Ve*nn,Ve*wr+Te*nn),ct.lineTo(Te*Dr-Ve*bn,Ve*Dr+Te*bn),ct.lineTo(Te*Yr-Ve*Tn,Ve*Yr+Te*Tn),ct.lineTo(Te*wr+Ve*nn,Te*nn-Ve*wr),ct.lineTo(Te*Dr+Ve*bn,Te*bn-Ve*Dr),ct.lineTo(Te*Yr+Ve*Tn,Te*Tn-Ve*Yr),ct.closePath()}},it=[be,De,tt,we,qe,Ke,rt];function We(){var ct=r(be),Jt=r(64),er=null;function wr(){var nn;if(er||(er=nn=t.path()),ct.apply(this,arguments).draw(er,+Jt.apply(this,arguments)),nn)return er=null,nn+""||null}return wr.type=function(nn){return arguments.length?(ct=typeof nn=="function"?nn:r(nn),wr):ct},wr.size=function(nn){return arguments.length?(Jt=typeof nn=="function"?nn:r(+nn),wr):Jt},wr.context=function(nn){return arguments.length?(er=nn==null?null:nn,wr):er},wr}function mt(){}function bt(ct,Jt,er){ct._context.bezierCurveTo((2*ct._x0+ct._x1)/3,(2*ct._y0+ct._y1)/3,(ct._x0+2*ct._x1)/3,(ct._y0+2*ct._y1)/3,(ct._x0+4*ct._x1+Jt)/6,(ct._y0+4*ct._y1+er)/6)}function Yt(ct){this._context=ct}Yt.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:bt(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(ct,Jt){switch(ct=+ct,Jt=+Jt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ct,Jt):this._context.moveTo(ct,Jt);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:bt(this,ct,Jt);break}this._x0=this._x1,this._x1=ct,this._y0=this._y1,this._y1=Jt}};function jt(ct){return new Yt(ct)}function mr(ct){this._context=ct}mr.prototype={areaStart:mt,areaEnd:mt,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(ct,Jt){switch(ct=+ct,Jt=+Jt,this._point){case 0:this._point=1,this._x2=ct,this._y2=Jt;break;case 1:this._point=2,this._x3=ct,this._y3=Jt;break;case 2:this._point=3,this._x4=ct,this._y4=Jt,this._context.moveTo((this._x0+4*this._x1+ct)/6,(this._y0+4*this._y1+Jt)/6);break;default:bt(this,ct,Jt);break}this._x0=this._x1,this._x1=ct,this._y0=this._y1,this._y1=Jt}};function or(ct){return new mr(ct)}function fr(ct){this._context=ct}fr.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(ct,Jt){switch(ct=+ct,Jt=+Jt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var er=(this._x0+4*this._x1+ct)/6,wr=(this._y0+4*this._y1+Jt)/6;this._line?this._context.lineTo(er,wr):this._context.moveTo(er,wr);break;case 3:this._point=4;default:bt(this,ct,Jt);break}this._x0=this._x1,this._x1=ct,this._y0=this._y1,this._y1=Jt}};function Ot(ct){return new fr(ct)}function cr(ct,Jt){this._basis=new Yt(ct),this._beta=Jt}cr.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var ct=this._x,Jt=this._y,er=ct.length-1;if(er>0)for(var wr=ct[0],nn=Jt[0],Dr=ct[er]-wr,bn=Jt[er]-nn,Yr=-1,Tn;++Yr<=er;)Tn=Yr/er,this._basis.point(this._beta*ct[Yr]+(1-this._beta)*(wr+Tn*Dr),this._beta*Jt[Yr]+(1-this._beta)*(nn+Tn*bn));this._x=this._y=null,this._basis.lineEnd()},point:function(ct,Jt){this._x.push(+ct),this._y.push(+Jt)}};var Ct=(function ct(Jt){function er(wr){return Jt===1?new Yt(wr):new cr(wr,Jt)}return er.beta=function(wr){return ct(+wr)},er})(.85);function wt(ct,Jt,er){ct._context.bezierCurveTo(ct._x1+ct._k*(ct._x2-ct._x0),ct._y1+ct._k*(ct._y2-ct._y0),ct._x2+ct._k*(ct._x1-Jt),ct._y2+ct._k*(ct._y1-er),ct._x2,ct._y2)}function Tt(ct,Jt){this._context=ct,this._k=(1-Jt)/6}Tt.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:wt(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ct,Jt){switch(ct=+ct,Jt=+Jt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ct,Jt):this._context.moveTo(ct,Jt);break;case 1:this._point=2,this._x1=ct,this._y1=Jt;break;case 2:this._point=3;default:wt(this,ct,Jt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ct,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var Mt=(function ct(Jt){function er(wr){return new Tt(wr,Jt)}return er.tension=function(wr){return ct(+wr)},er})(0);function Lt(ct,Jt){this._context=ct,this._k=(1-Jt)/6}Lt.prototype={areaStart:mt,areaEnd:mt,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(ct,Jt){switch(ct=+ct,Jt=+Jt,this._point){case 0:this._point=1,this._x3=ct,this._y3=Jt;break;case 1:this._point=2,this._context.moveTo(this._x4=ct,this._y4=Jt);break;case 2:this._point=3,this._x5=ct,this._y5=Jt;break;default:wt(this,ct,Jt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ct,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var ft=(function ct(Jt){function er(wr){return new Lt(wr,Jt)}return er.tension=function(wr){return ct(+wr)},er})(0);function kt(ct,Jt){this._context=ct,this._k=(1-Jt)/6}kt.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(ct,Jt){switch(ct=+ct,Jt=+Jt,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:wt(this,ct,Jt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ct,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var rr=(function ct(Jt){function er(wr){return new kt(wr,Jt)}return er.tension=function(wr){return ct(+wr)},er})(0);function pr(ct,Jt,er){var wr=ct._x1,nn=ct._y1,Dr=ct._x2,bn=ct._y2;if(ct._l01_a>c){var Yr=2*ct._l01_2a+3*ct._l01_a*ct._l12_a+ct._l12_2a,Tn=3*ct._l01_a*(ct._l01_a+ct._l12_a);wr=(wr*Yr-ct._x0*ct._l12_2a+ct._x2*ct._l01_2a)/Tn,nn=(nn*Yr-ct._y0*ct._l12_2a+ct._y2*ct._l01_2a)/Tn}if(ct._l23_a>c){var Kn=2*ct._l23_2a+3*ct._l23_a*ct._l12_a+ct._l12_2a,Qn=3*ct._l23_a*(ct._l23_a+ct._l12_a);Dr=(Dr*Kn+ct._x1*ct._l23_2a-Jt*ct._l12_2a)/Qn,bn=(bn*Kn+ct._y1*ct._l23_2a-er*ct._l12_2a)/Qn}ct._context.bezierCurveTo(wr,nn,Dr,bn,ct._x2,ct._y2)}function Kr(ct,Jt){this._context=ct,this._alpha=Jt}Kr.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(ct,Jt){if(ct=+ct,Jt=+Jt,this._point){var er=this._x2-ct,wr=this._y2-Jt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(er*er+wr*wr,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ct,Jt):this._context.moveTo(ct,Jt);break;case 1:this._point=2;break;case 2:this._point=3;default:pr(this,ct,Jt);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=ct,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var Nr=(function ct(Jt){function er(wr){return Jt?new Kr(wr,Jt):new Tt(wr,0)}return er.alpha=function(wr){return ct(+wr)},er})(.5);function dn(ct,Jt){this._context=ct,this._alpha=Jt}dn.prototype={areaStart:mt,areaEnd:mt,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(ct,Jt){if(ct=+ct,Jt=+Jt,this._point){var er=this._x2-ct,wr=this._y2-Jt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(er*er+wr*wr,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=ct,this._y3=Jt;break;case 1:this._point=2,this._context.moveTo(this._x4=ct,this._y4=Jt);break;case 2:this._point=3,this._x5=ct,this._y5=Jt;break;default:pr(this,ct,Jt);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=ct,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var xr=(function ct(Jt){function er(wr){return Jt?new dn(wr,Jt):new Lt(wr,0)}return er.alpha=function(wr){return ct(+wr)},er})(.5);function Fr(ct,Jt){this._context=ct,this._alpha=Jt}Fr.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(ct,Jt){if(ct=+ct,Jt=+Jt,this._point){var er=this._x2-ct,wr=this._y2-Jt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(er*er+wr*wr,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:pr(this,ct,Jt);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=ct,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var Zr=(function ct(Jt){function er(wr){return Jt?new Fr(wr,Jt):new kt(wr,0)}return er.alpha=function(wr){return ct(+wr)},er})(.5);function Cn(ct){this._context=ct}Cn.prototype={areaStart:mt,areaEnd:mt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(ct,Jt){ct=+ct,Jt=+Jt,this._point?this._context.lineTo(ct,Jt):(this._point=1,this._context.moveTo(ct,Jt))}};function Dt(ct){return new Cn(ct)}function At(ct){return ct<0?-1:1}function Vt(ct,Jt,er){var wr=ct._x1-ct._x0,nn=Jt-ct._x1,Dr=(ct._y1-ct._y0)/(wr||nn<0&&-0),bn=(er-ct._y1)/(nn||wr<0&&-0),Yr=(Dr*nn+bn*wr)/(wr+nn);return(At(Dr)+At(bn))*Math.min(Math.abs(Dr),Math.abs(bn),.5*Math.abs(Yr))||0}function Qt(ct,Jt){var er=ct._x1-ct._x0;return er?(3*(ct._y1-ct._y0)/er-Jt)/2:Jt}function Ut(ct,Jt,er){var wr=ct._x0,nn=ct._y0,Dr=ct._x1,bn=ct._y1,Yr=(Dr-wr)/3;ct._context.bezierCurveTo(wr+Yr,nn+Yr*Jt,Dr-Yr,bn-Yr*er,Dr,bn)}function _r(ct){this._context=ct}_r.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:Ut(this,this._t0,Qt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ct,Jt){var er=NaN;if(ct=+ct,Jt=+Jt,!(ct===this._x1&&Jt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ct,Jt):this._context.moveTo(ct,Jt);break;case 1:this._point=2;break;case 2:this._point=3,Ut(this,Qt(this,er=Vt(this,ct,Jt)),er);break;default:Ut(this,this._t0,er=Vt(this,ct,Jt));break}this._x0=this._x1,this._x1=ct,this._y0=this._y1,this._y1=Jt,this._t0=er}}};function rn(ct){this._context=new Jr(ct)}(rn.prototype=Object.create(_r.prototype)).point=function(ct,Jt){_r.prototype.point.call(this,Jt,ct)};function Jr(ct){this._context=ct}Jr.prototype={moveTo:function(ct,Jt){this._context.moveTo(Jt,ct)},closePath:function(){this._context.closePath()},lineTo:function(ct,Jt){this._context.lineTo(Jt,ct)},bezierCurveTo:function(ct,Jt,er,wr,nn,Dr){this._context.bezierCurveTo(Jt,ct,wr,er,Dr,nn)}};function qn(ct){return new _r(ct)}function ri(ct){return new rn(ct)}function Jn(ct){this._context=ct}Jn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var ct=this._x,Jt=this._y,er=ct.length;if(er)if(this._line?this._context.lineTo(ct[0],Jt[0]):this._context.moveTo(ct[0],Jt[0]),er===2)this._context.lineTo(ct[1],Jt[1]);else for(var wr=Ii(ct),nn=Ii(Jt),Dr=0,bn=1;bn=0;--Jt)nn[Jt]=(bn[Jt]-nn[Jt+1])/Dr[Jt];for(Dr[er-1]=(ct[er]+nn[er-1])/2,Jt=0;Jt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(ct,Jt){switch(ct=+ct,Jt=+Jt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ct,Jt):this._context.moveTo(ct,Jt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Jt),this._context.lineTo(ct,Jt);else{var er=this._x*(1-this._t)+ct*this._t;this._context.lineTo(er,this._y),this._context.lineTo(er,Jt)}break}}this._x=ct,this._y=Jt}};function ha(ct){return new ra(ct,.5)}function va(ct){return new ra(ct,0)}function Xi(ct){return new ra(ct,1)}function oa(ct,Jt){if((bn=ct.length)>1)for(var er=1,wr,nn,Dr=ct[Jt[0]],bn,Yr=Dr.length;er=0;)er[Jt]=Jt;return er}function Ga(ct,Jt){return ct[Jt]}function ss(){var ct=r([]),Jt=Ma,er=oa,wr=Ga;function nn(Dr){var bn=ct.apply(this,arguments),Yr,Tn=Dr.length,Kn=bn.length,Qn=new Array(Kn),Ai;for(Yr=0;Yr0){for(var er,wr,nn=0,Dr=ct[0].length,bn;nn0)for(var er,wr=0,nn,Dr,bn,Yr,Tn,Kn=ct[Jt[0]].length;wr0?(nn[0]=bn,nn[1]=bn+=Dr):Dr<0?(nn[1]=Yr,nn[0]=Yr+=Dr):(nn[0]=0,nn[1]=Dr)}function ko(ct,Jt){if((nn=ct.length)>0){for(var er=0,wr=ct[Jt[0]],nn,Dr=wr.length;er0)||!((Dr=(nn=ct[Jt[0]]).length)>0))){for(var er=0,wr=1,nn,Dr,bn;wrDr&&(Dr=nn,er=Jt);return er}function wo(ct){var Jt=ct.map(Zs);return Ma(ct).sort(function(er,wr){return Jt[er]-Jt[wr]})}function Zs(ct){for(var Jt=0,er=-1,wr=ct.length,nn;++er{(function(e,t){typeof bD=="object"&&typeof SXe!="undefined"?t(bD,wXe(),EK()):(e=e||self,t(e.d3=e.d3||{},e.d3,e.d3))})(bD,function(e,t,r){"use strict";function n(w){return w.target.depth}function a(w){return w.depth}function i(w,T){return T-1-w.height}function o(w,T){return w.sourceLinks.length?w.depth:T-1}function s(w){return w.targetLinks.length?w.depth:w.sourceLinks.length?t.min(w.sourceLinks,n)-1:0}function l(w){return function(){return w}}function u(w,T){return f(w.source,T.source)||w.index-T.index}function c(w,T){return f(w.target,T.target)||w.index-T.index}function f(w,T){return w.y0-T.y0}function v(w){return w.value}function g(w){return w.index}function p(w){return w.nodes}function _(w){return w.links}function x(w,T){let A=w.get(T);if(!A)throw new Error("missing: "+T);return A}function y({nodes:w}){for(let T of w){let A=T.y0,m=A;for(let F of T.sourceLinks)F.y0=A+F.width/2,A+=F.width;for(let F of T.targetLinks)F.y1=m+F.width/2,m+=F.width}}function C(){let w=0,T=0,A=1,m=1,F=24,E=8,I,R=g,B=o,O,U,j=p,q=_,V=6,K=2/3;function ee(){let tt={nodes:j.apply(null,arguments),links:q.apply(null,arguments)};return ce(tt),me(tt),ye(tt),ue(tt),ne(tt),y(tt),tt}ee.update=function(tt){return y(tt),tt},ee.nodeId=function(tt){return arguments.length?(R=typeof tt=="function"?tt:l(tt),ee):R},ee.nodeAlign=function(tt){return arguments.length?(B=typeof tt=="function"?tt:l(tt),ee):B},ee.nodeSort=function(tt){return arguments.length?(O=tt,ee):O},ee.nodeWidth=function(tt){return arguments.length?(F=+tt,ee):F},ee.nodePadding=function(tt){return arguments.length?(E=I=+tt,ee):E},ee.nodes=function(tt){return arguments.length?(j=typeof tt=="function"?tt:l(tt),ee):j},ee.links=function(tt){return arguments.length?(q=typeof tt=="function"?tt:l(tt),ee):q},ee.linkSort=function(tt){return arguments.length?(U=tt,ee):U},ee.size=function(tt){return arguments.length?(w=T=0,A=+tt[0],m=+tt[1],ee):[A-w,m-T]},ee.extent=function(tt){return arguments.length?(w=+tt[0][0],A=+tt[1][0],T=+tt[0][1],m=+tt[1][1],ee):[[w,T],[A,m]]},ee.iterations=function(tt){return arguments.length?(V=+tt,ee):V};function ce({nodes:tt,links:Oe}){for(let[ut,et]of tt.entries())et.index=ut,et.sourceLinks=[],et.targetLinks=[];let ze=new Map(tt.map((ut,et)=>[R(ut,et,tt),ut]));for(let[ut,et]of Oe.entries()){et.index=ut;let{source:qe,target:we}=et;typeof qe!="object"&&(qe=et.source=x(ze,qe)),typeof we!="object"&&(we=et.target=x(ze,we)),qe.sourceLinks.push(et),we.targetLinks.push(et)}if(U!=null)for(let{sourceLinks:ut,targetLinks:et}of tt)ut.sort(U),et.sort(U)}function me({nodes:tt}){for(let Oe of tt)Oe.value=Oe.fixedValue===void 0?Math.max(t.sum(Oe.sourceLinks,v),t.sum(Oe.targetLinks,v)):Oe.fixedValue}function ye({nodes:tt}){let Oe=tt.length,ze=new Set(tt),ut=new Set,et=0;for(;ze.size;){for(let qe of ze){qe.depth=et;for(let{target:we}of qe.sourceLinks)ut.add(we)}if(++et>Oe)throw new Error("circular link");ze=ut,ut=new Set}}function ue({nodes:tt}){let Oe=tt.length,ze=new Set(tt),ut=new Set,et=0;for(;ze.size;){for(let qe of ze){qe.height=et;for(let{source:we}of qe.targetLinks)ut.add(we)}if(++et>Oe)throw new Error("circular link");ze=ut,ut=new Set}}function J({nodes:tt}){let Oe=t.max(tt,et=>et.depth)+1,ze=(A-w-F)/(Oe-1),ut=new Array(Oe);for(let et of tt){let qe=Math.max(0,Math.min(Oe-1,Math.floor(B.call(null,et,Oe))));et.layer=qe,et.x0=w+qe*ze,et.x1=et.x0+F,ut[qe]?ut[qe].push(et):ut[qe]=[et]}if(O)for(let et of ut)et.sort(O);return ut}function _e(tt){let Oe=t.min(tt,ze=>(m-T-(ze.length-1)*I)/t.sum(ze,v));for(let ze of tt){let ut=T;for(let et of ze){et.y0=ut,et.y1=ut+et.value*Oe,ut=et.y1+I;for(let qe of et.sourceLinks)qe.width=qe.value*Oe}ut=(m-ut+I)/(ze.length+1);for(let et=0;etze.length)-1)),_e(Oe);for(let ze=0;ze0))continue;let Te=(Le/Ke-we.y0)*Oe;we.y0+=Te,we.y1+=Te,be(we)}O===void 0&&qe.sort(f),ie(qe,ze)}}function pe(tt,Oe,ze){for(let ut=tt.length,et=ut-2;et>=0;--et){let qe=tt[et];for(let we of qe){let Le=0,Ke=0;for(let{target:Ve,value:$e}of we.sourceLinks){let ot=$e*(Ve.layer-we.layer);Le+=pt(we,Ve)*ot,Ke+=ot}if(!(Ke>0))continue;let Te=(Le/Ke-we.y0)*Oe;we.y0+=Te,we.y1+=Te,be(we)}O===void 0&&qe.sort(f),ie(qe,ze)}}function ie(tt,Oe){let ze=tt.length>>1,ut=tt[ze];xe(tt,ut.y0-I,ze-1,Oe),le(tt,ut.y1+I,ze+1,Oe),xe(tt,m,tt.length-1,Oe),le(tt,T,0,Oe)}function le(tt,Oe,ze,ut){for(;ze1e-6&&(et.y0+=qe,et.y1+=qe),Oe=et.y1+I}}function xe(tt,Oe,ze,ut){for(;ze>=0;--ze){let et=tt[ze],qe=(et.y1-Oe)*ut;qe>1e-6&&(et.y0-=qe,et.y1-=qe),Oe=et.y0-I}}function be({sourceLinks:tt,targetLinks:Oe}){if(U===void 0){for(let{source:{sourceLinks:ze}}of Oe)ze.sort(c);for(let{target:{targetLinks:ze}}of tt)ze.sort(u)}}function De(tt){if(U===void 0)for(let{sourceLinks:Oe,targetLinks:ze}of tt)Oe.sort(c),ze.sort(u)}function Ge(tt,Oe){let ze=tt.y0-(tt.sourceLinks.length-1)*I/2;for(let{target:ut,width:et}of tt.sourceLinks){if(ut===Oe)break;ze+=et+I}for(let{source:ut,width:et}of Oe.targetLinks){if(ut===tt)break;ze-=et}return ze}function pt(tt,Oe){let ze=Oe.y0-(Oe.targetLinks.length-1)*I/2;for(let{source:ut,width:et}of Oe.targetLinks){if(ut===tt)break;ze+=et+I}for(let{target:ut,width:et}of tt.sourceLinks){if(ut===Oe)break;ze-=et}return ze}return ee}function k(w){return[w.source.x1,w.y0]}function S(w){return[w.target.x0,w.y1]}function L(){return r.linkHorizontal().source(k).target(S)}e.sankey=C,e.sankeyCenter=s,e.sankeyJustify=o,e.sankeyLeft=a,e.sankeyLinkHorizontal=L,e.sankeyRight=i,Object.defineProperty(e,"__esModule",{value:!0})})});var CXe=fe((wD,kXe)=>{(function(e,t){t(typeof wD=="object"&&typeof kXe!="undefined"?wD:e.d3=e.d3||{})})(wD,(function(e){"use strict";function t(ne,ae){return neae?1:ne>=ae?0:NaN}function r(ne){return ne.length===1&&(ne=n(ne)),{left:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[xe],pe)<0?ie=xe+1:le=xe}return ie},right:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[xe],pe)>0?le=xe:ie=xe+1}return ie}}}function n(ne){return function(ae,pe){return t(ne(ae),pe)}}var a=r(t),i=a.right,o=a.left;function s(ne,ae){ae==null&&(ae=l);for(var pe=0,ie=ne.length-1,le=ne[0],xe=new Array(ie<0?0:ie);pene?1:ae>=ne?0:NaN}function f(ne){return ne===null?NaN:+ne}function v(ne,ae){var pe=ne.length,ie=0,le=-1,xe=0,be,De,Ge=0;if(ae==null)for(;++le1)return Ge/(ie-1)}function g(ne,ae){var pe=v(ne,ae);return pe&&Math.sqrt(pe)}function p(ne,ae){var pe=ne.length,ie=-1,le,xe,be;if(ae==null){for(;++ie=le)for(xe=be=le;++iele&&(xe=le),be=le)for(xe=be=le;++iele&&(xe=le),be0)return[ne];if((ie=ae0)for(ne=Math.ceil(ne/De),ae=Math.floor(ae/De),be=new Array(xe=Math.ceil(ae-ne+1));++le=0?(xe>=L?10:xe>=w?5:xe>=T?2:1)*Math.pow(10,le):-Math.pow(10,-le)/(xe>=L?10:xe>=w?5:xe>=T?2:1)}function F(ne,ae,pe){var ie=Math.abs(ae-ne)/Math.max(0,pe),le=Math.pow(10,Math.floor(Math.log(ie)/Math.LN10)),xe=ie/le;return xe>=L?le*=10:xe>=w?le*=5:xe>=T&&(le*=2),aeOe;)ze.pop(),--ut;var et=new Array(ut+1),qe;for(xe=0;xe<=ut;++xe)qe=et[xe]=[],qe.x0=xe>0?ze[xe-1]:tt,qe.x1=xe=1)return+pe(ne[ie-1],ie-1,ne);var ie,le=(ie-1)*ae,xe=Math.floor(le),be=+pe(ne[xe],xe,ne),De=+pe(ne[xe+1],xe+1,ne);return be+(De-be)*(le-xe)}}function B(ne,ae,pe){return ne=y.call(ne,f).sort(t),Math.ceil((pe-ae)/(2*(R(ne,.75)-R(ne,.25))*Math.pow(ne.length,-1/3)))}function O(ne,ae,pe){return Math.ceil((pe-ae)/(3.5*g(ne)*Math.pow(ne.length,-1/3)))}function U(ne,ae){var pe=ne.length,ie=-1,le,xe;if(ae==null){for(;++ie=le)for(xe=le;++iexe&&(xe=le)}else for(;++ie=le)for(xe=le;++iexe&&(xe=le);return xe}function j(ne,ae){var pe=ne.length,ie=pe,le=-1,xe,be=0;if(ae==null)for(;++le=0;)for(be=ne[ae],pe=be.length;--pe>=0;)xe[--le]=be[pe];return xe}function K(ne,ae){var pe=ne.length,ie=-1,le,xe;if(ae==null){for(;++ie=le)for(xe=le;++iele&&(xe=le)}else for(;++ie=le)for(xe=le;++iele&&(xe=le);return xe}function ee(ne,ae){for(var pe=ae.length,ie=new Array(pe);pe--;)ie[pe]=ne[ae[pe]];return ie}function ce(ne,ae){if(pe=ne.length){var pe,ie=0,le=0,xe,be=ne[le];for(ae==null&&(ae=t);++ie{var Krr=MK();LXe.exports=function(t,r){var n=[],a=[],i=[],o={},s=[],l;function u(k){i[k]=!1,o.hasOwnProperty(k)&&Object.keys(o[k]).forEach(function(S){delete o[k][S],i[S]&&u(S)})}function c(k){var S=!1;a.push(k),i[k]=!0;var L,w;for(L=0;L=k})}function g(k){v(k);for(var S=t,L=Krr(S),w=L.components.filter(function(R){return R.length>1}),T=1/0,A,m=0;m{(function(e,t){typeof TD=="object"&&typeof FXe!="undefined"?t(TD,CXe(),SK(),EK(),PXe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(TD,(function(e,t,r,n,a){"use strict";a=a&&a.hasOwnProperty("default")?a.default:a;function i(Oe){return Oe.target.depth}function o(Oe){return Oe.depth}function s(Oe,ze){return ze-1-Oe.height}function l(Oe,ze){return Oe.sourceLinks.length?Oe.depth:ze-1}function u(Oe){return Oe.targetLinks.length?Oe.depth:Oe.sourceLinks.length?t.min(Oe.sourceLinks,i)-1:0}function c(Oe){return function(){return Oe}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Oe){return typeof Oe}:function(Oe){return Oe&&typeof Symbol=="function"&&Oe.constructor===Symbol&&Oe!==Symbol.prototype?"symbol":typeof Oe};function v(Oe,ze){return p(Oe.source,ze.source)||Oe.index-ze.index}function g(Oe,ze){return p(Oe.target,ze.target)||Oe.index-ze.index}function p(Oe,ze){return Oe.partOfCycle===ze.partOfCycle?Oe.y0-ze.y0:Oe.circularLinkType==="top"||ze.circularLinkType==="bottom"?-1:1}function _(Oe){return Oe.value}function x(Oe){return(Oe.y0+Oe.y1)/2}function y(Oe){return x(Oe.source)}function C(Oe){return x(Oe.target)}function k(Oe){return Oe.index}function S(Oe){return Oe.nodes}function L(Oe){return Oe.links}function w(Oe,ze){var ut=Oe.get(ze);if(!ut)throw new Error("missing: "+ze);return ut}function T(Oe,ze){return ze(Oe)}var A=25,m=10,F=.3;function E(){var Oe=0,ze=0,ut=1,et=1,qe=24,we,Le=k,Ke=l,Te=S,Ve=L,$e=32,ot=2,rt,it=null;function We(){var Ot={nodes:Te.apply(null,arguments),links:Ve.apply(null,arguments)};mt(Ot),I(Ot,Le,it),bt(Ot),mr(Ot),R(Ot,Le),or(Ot,$e,Le),fr(Ot);for(var cr=4,Ct=0;Ct0?cr+A+m:cr,Ct=Ct>0?Ct+A+m:Ct,wt=wt>0?wt+A+m:wt,Tt=Tt>0?Tt+A+m:Tt,{top:cr,bottom:Ct,left:Tt,right:wt}}function jt(Ot,cr){var Ct=t.max(Ot.nodes,function(rr){return rr.column}),wt=ut-Oe,Tt=et-ze,Mt=wt+cr.right+cr.left,Lt=Tt+cr.top+cr.bottom,ft=wt/Mt,kt=Tt/Lt;return Oe=Oe*ft+cr.left,ut=cr.right==0?ut:ut*ft,ze=ze*kt+cr.top,et=et*kt,Ot.nodes.forEach(function(rr){rr.x0=Oe+rr.column*((ut-Oe-qe)/Ct),rr.x1=rr.x0+qe}),kt}function mr(Ot){var cr,Ct,wt;for(cr=Ot.nodes,Ct=[],wt=0;cr.length;++wt,cr=Ct,Ct=[])cr.forEach(function(Tt){Tt.depth=wt,Tt.sourceLinks.forEach(function(Mt){Ct.indexOf(Mt.target)<0&&!Mt.circular&&Ct.push(Mt.target)})});for(cr=Ot.nodes,Ct=[],wt=0;cr.length;++wt,cr=Ct,Ct=[])cr.forEach(function(Tt){Tt.height=wt,Tt.targetLinks.forEach(function(Mt){Ct.indexOf(Mt.source)<0&&!Mt.circular&&Ct.push(Mt.source)})});Ot.nodes.forEach(function(Tt){Tt.column=Math.floor(Ke.call(null,Tt,wt))})}function or(Ot,cr,Ct){var wt=r.nest().key(function(rr){return rr.column}).sortKeys(t.ascending).entries(Ot.nodes).map(function(rr){return rr.values});Lt(Ct),kt();for(var Tt=1,Mt=cr;Mt>0;--Mt)ft(Tt*=.99,Ct),kt();function Lt(rr){if(rt){var pr=1/0;wt.forEach(function(xr){var Fr=et*rt/(xr.length+1);pr=Fr0))if(xr==0&&dn==1)Zr=Fr.y1-Fr.y0,Fr.y0=et/2-Zr/2,Fr.y1=et/2+Zr/2;else if(xr==Kr-1&&dn==1)Zr=Fr.y1-Fr.y0,Fr.y0=et/2-Zr/2,Fr.y1=et/2+Zr/2;else{var Cn=0,Dt=t.mean(Fr.sourceLinks,C),At=t.mean(Fr.targetLinks,y);Dt&&At?Cn=(Dt+At)/2:Cn=Dt||At;var Vt=(Cn-x(Fr))*rr;Fr.y0+=Vt,Fr.y1+=Vt}})})}function kt(){wt.forEach(function(rr){var pr,Kr,Nr=ze,dn=rr.length,xr;for(rr.sort(p),xr=0;xr0&&(pr.y0+=Kr,pr.y1+=Kr),Nr=pr.y1+we;if(Kr=Nr-we-et,Kr>0)for(Nr=pr.y0-=Kr,pr.y1-=Kr,xr=dn-2;xr>=0;--xr)pr=rr[xr],Kr=pr.y1+we-Nr,Kr>0&&(pr.y0-=Kr,pr.y1-=Kr),Nr=pr.y0})}}function fr(Ot){Ot.nodes.forEach(function(cr){cr.sourceLinks.sort(g),cr.targetLinks.sort(v)}),Ot.nodes.forEach(function(cr){var Ct=cr.y0,wt=Ct,Tt=cr.y1,Mt=Tt;cr.sourceLinks.forEach(function(Lt){Lt.circular?(Lt.y0=Tt-Lt.width/2,Tt=Tt-Lt.width):(Lt.y0=Ct+Lt.width/2,Ct+=Lt.width)}),cr.targetLinks.forEach(function(Lt){Lt.circular?(Lt.y1=Mt-Lt.width/2,Mt=Mt-Lt.width):(Lt.y1=wt+Lt.width/2,wt+=Lt.width)})})}return We}function I(Oe,ze,ut){var et=0;if(ut===null){for(var qe=[],we=0;weze.source.column)}function U(Oe,ze){var ut=0;Oe.sourceLinks.forEach(function(qe){ut=qe.circular&&!pt(qe,ze)?ut+1:ut});var et=0;return Oe.targetLinks.forEach(function(qe){et=qe.circular&&!pt(qe,ze)?et+1:et}),ut+et}function j(Oe){var ze=Oe.source.sourceLinks,ut=0;ze.forEach(function(we){ut=we.circular?ut+1:ut});var et=Oe.target.targetLinks,qe=0;return et.forEach(function(we){qe=we.circular?qe+1:qe}),!(ut>1||qe>1)}function q(Oe,ze,ut){return Oe.sort(ee),Oe.forEach(function(et,qe){var we=0;if(pt(et,ut)&&j(et))et.circularPathData.verticalBuffer=we+et.width/2;else{var Le=0;for(Le;Lewe?Ke:we}et.circularPathData.verticalBuffer=we+et.width/2}}),Oe}function V(Oe,ze,ut,et){var qe=5,we=t.min(Oe.links,function(Te){return Te.source.y0});Oe.links.forEach(function(Te){Te.circular&&(Te.circularPathData={})});var Le=Oe.links.filter(function(Te){return Te.circularLinkType=="top"});q(Le,ze,et);var Ke=Oe.links.filter(function(Te){return Te.circularLinkType=="bottom"});q(Ke,ze,et),Oe.links.forEach(function(Te){if(Te.circular){if(Te.circularPathData.arcRadius=Te.width+m,Te.circularPathData.leftNodeBuffer=qe,Te.circularPathData.rightNodeBuffer=qe,Te.circularPathData.sourceWidth=Te.source.x1-Te.source.x0,Te.circularPathData.sourceX=Te.source.x0+Te.circularPathData.sourceWidth,Te.circularPathData.targetX=Te.target.x0,Te.circularPathData.sourceY=Te.y0,Te.circularPathData.targetY=Te.y1,pt(Te,et)&&j(Te))Te.circularPathData.leftSmallArcRadius=m+Te.width/2,Te.circularPathData.leftLargeArcRadius=m+Te.width/2,Te.circularPathData.rightSmallArcRadius=m+Te.width/2,Te.circularPathData.rightLargeArcRadius=m+Te.width/2,Te.circularLinkType=="bottom"?(Te.circularPathData.verticalFullExtent=Te.source.y1+A+Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.rightLargeArcRadius):(Te.circularPathData.verticalFullExtent=Te.source.y0-A-Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.rightLargeArcRadius);else{var Ve=Te.source.column,$e=Te.circularLinkType,ot=Oe.links.filter(function(We){return We.source.column==Ve&&We.circularLinkType==$e});Te.circularLinkType=="bottom"?ot.sort(me):ot.sort(ce);var rt=0;ot.forEach(function(We,mt){We.circularLinkID==Te.circularLinkID&&(Te.circularPathData.leftSmallArcRadius=m+Te.width/2+rt,Te.circularPathData.leftLargeArcRadius=m+Te.width/2+mt*ze+rt),rt=rt+We.width}),Ve=Te.target.column,ot=Oe.links.filter(function(We){return We.target.column==Ve&&We.circularLinkType==$e}),Te.circularLinkType=="bottom"?ot.sort(ue):ot.sort(ye),rt=0,ot.forEach(function(We,mt){We.circularLinkID==Te.circularLinkID&&(Te.circularPathData.rightSmallArcRadius=m+Te.width/2+rt,Te.circularPathData.rightLargeArcRadius=m+Te.width/2+mt*ze+rt),rt=rt+We.width}),Te.circularLinkType=="bottom"?(Te.circularPathData.verticalFullExtent=Math.max(ut,Te.source.y1,Te.target.y1)+A+Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.rightLargeArcRadius):(Te.circularPathData.verticalFullExtent=we-A-Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.rightLargeArcRadius)}Te.circularPathData.leftInnerExtent=Te.circularPathData.sourceX+Te.circularPathData.leftNodeBuffer,Te.circularPathData.rightInnerExtent=Te.circularPathData.targetX-Te.circularPathData.rightNodeBuffer,Te.circularPathData.leftFullExtent=Te.circularPathData.sourceX+Te.circularPathData.leftLargeArcRadius+Te.circularPathData.leftNodeBuffer,Te.circularPathData.rightFullExtent=Te.circularPathData.targetX-Te.circularPathData.rightLargeArcRadius-Te.circularPathData.rightNodeBuffer}if(Te.circular)Te.path=K(Te);else{var it=n.linkHorizontal().source(function(We){var mt=We.source.x0+(We.source.x1-We.source.x0),bt=We.y0;return[mt,bt]}).target(function(We){var mt=We.target.x0,bt=We.y1;return[mt,bt]});Te.path=it(Te)}})}function K(Oe){var ze="";return Oe.circularLinkType=="top"?ze="M"+Oe.circularPathData.sourceX+" "+Oe.circularPathData.sourceY+" L"+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.sourceY+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftSmallArcRadius+" 0 0 0 "+Oe.circularPathData.leftFullExtent+" "+(Oe.circularPathData.sourceY-Oe.circularPathData.leftSmallArcRadius)+" L"+Oe.circularPathData.leftFullExtent+" "+Oe.circularPathData.verticalLeftInnerExtent+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftLargeArcRadius+" 0 0 0 "+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" L"+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightLargeArcRadius+" 0 0 0 "+Oe.circularPathData.rightFullExtent+" "+Oe.circularPathData.verticalRightInnerExtent+" L"+Oe.circularPathData.rightFullExtent+" "+(Oe.circularPathData.targetY-Oe.circularPathData.rightSmallArcRadius)+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightSmallArcRadius+" 0 0 0 "+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.targetY+" L"+Oe.circularPathData.targetX+" "+Oe.circularPathData.targetY:ze="M"+Oe.circularPathData.sourceX+" "+Oe.circularPathData.sourceY+" L"+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.sourceY+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftSmallArcRadius+" 0 0 1 "+Oe.circularPathData.leftFullExtent+" "+(Oe.circularPathData.sourceY+Oe.circularPathData.leftSmallArcRadius)+" L"+Oe.circularPathData.leftFullExtent+" "+Oe.circularPathData.verticalLeftInnerExtent+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftLargeArcRadius+" 0 0 1 "+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" L"+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightLargeArcRadius+" 0 0 1 "+Oe.circularPathData.rightFullExtent+" "+Oe.circularPathData.verticalRightInnerExtent+" L"+Oe.circularPathData.rightFullExtent+" "+(Oe.circularPathData.targetY+Oe.circularPathData.rightSmallArcRadius)+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightSmallArcRadius+" 0 0 1 "+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.targetY+" L"+Oe.circularPathData.targetX+" "+Oe.circularPathData.targetY,ze}function ee(Oe,ze){return J(Oe)==J(ze)?Oe.circularLinkType=="bottom"?me(Oe,ze):ce(Oe,ze):J(ze)-J(Oe)}function ce(Oe,ze){return Oe.y0-ze.y0}function me(Oe,ze){return ze.y0-Oe.y0}function ye(Oe,ze){return Oe.y1-ze.y1}function ue(Oe,ze){return ze.y1-Oe.y1}function J(Oe){return Oe.target.column-Oe.source.column}function _e(Oe){return Oe.target.x0-Oe.source.x1}function ne(Oe,ze){var ut=B(Oe),et=_e(ze)/Math.tan(ut),qe=Ge(Oe)=="up"?Oe.y1+et:Oe.y1-et;return qe}function ae(Oe,ze){var ut=B(Oe),et=_e(ze)/Math.tan(ut),qe=Ge(Oe)=="up"?Oe.y1-et:Oe.y1+et;return qe}function pe(Oe,ze,ut,et){Oe.links.forEach(function(qe){if(!qe.circular&&qe.target.column-qe.source.column>1){var we=qe.source.column+1,Le=qe.target.column-1,Ke=1,Te=Le-we+1;for(Ke=1;we<=Le;we++,Ke++)Oe.nodes.forEach(function(Ve){if(Ve.column==we){var $e=Ke/(Te+1),ot=Math.pow(1-$e,3),rt=3*$e*Math.pow(1-$e,2),it=3*Math.pow($e,2)*(1-$e),We=Math.pow($e,3),mt=ot*qe.y0+rt*qe.y0+it*qe.y1+We*qe.y1,bt=mt-qe.width/2,Yt=mt+qe.width/2,jt;bt>Ve.y0&&btVe.y0&&YtVe.y1&&le(mr,jt,ze,ut)})):btVe.y1&&(jt=Yt-Ve.y0+10,Ve=le(Ve,jt,ze,ut),Oe.nodes.forEach(function(mr){T(mr,et)==T(Ve,et)||mr.column!=Ve.column||mr.y0Ve.y1&&le(mr,jt,ze,ut)}))}})}})}function ie(Oe,ze){return Oe.y0>ze.y0&&Oe.y0ze.y0&&Oe.y1ze.y1}function le(Oe,ze,ut,et){return Oe.y0+ze>=ut&&Oe.y1+ze<=et&&(Oe.y0=Oe.y0+ze,Oe.y1=Oe.y1+ze,Oe.targetLinks.forEach(function(qe){qe.y1=qe.y1+ze}),Oe.sourceLinks.forEach(function(qe){qe.y0=qe.y0+ze})),Oe}function xe(Oe,ze,ut,et){Oe.nodes.forEach(function(qe){et&&qe.y+(qe.y1-qe.y0)>ze&&(qe.y=qe.y-(qe.y+(qe.y1-qe.y0)-ze));var we=Oe.links.filter(function(Te){return T(Te.source,ut)==T(qe,ut)}),Le=we.length;Le>1&&we.sort(function(Te,Ve){if(!Te.circular&&!Ve.circular){if(Te.target.column==Ve.target.column)return Te.y1-Ve.y1;if(De(Te,Ve)){if(Te.target.column>Ve.target.column){var $e=ae(Ve,Te);return Te.y1-$e}if(Ve.target.column>Te.target.column){var ot=ae(Te,Ve);return ot-Ve.y1}}else return Te.y1-Ve.y1}if(Te.circular&&!Ve.circular)return Te.circularLinkType=="top"?-1:1;if(Ve.circular&&!Te.circular)return Ve.circularLinkType=="top"?1:-1;if(Te.circular&&Ve.circular)return Te.circularLinkType===Ve.circularLinkType&&Te.circularLinkType=="top"?Te.target.column===Ve.target.column?Te.target.y1-Ve.target.y1:Ve.target.column-Te.target.column:Te.circularLinkType===Ve.circularLinkType&&Te.circularLinkType=="bottom"?Te.target.column===Ve.target.column?Ve.target.y1-Te.target.y1:Te.target.column-Ve.target.column:Te.circularLinkType=="top"?-1:1});var Ke=qe.y0;we.forEach(function(Te){Te.y0=Ke+Te.width/2,Ke=Ke+Te.width}),we.forEach(function(Te,Ve){if(Te.circularLinkType=="bottom"){var $e=Ve+1,ot=0;for($e;$e1&&qe.sort(function(Ke,Te){if(!Ke.circular&&!Te.circular){if(Ke.source.column==Te.source.column)return Ke.y0-Te.y0;if(De(Ke,Te)){if(Te.source.column0?"up":"down"}function pt(Oe,ze){return T(Oe.source,ze)==T(Oe.target,ze)}function tt(Oe,ze,ut){var et=Oe.nodes,qe=Oe.links,we=!1,Le=!1;if(qe.forEach(function(rt){rt.circularLinkType=="top"?we=!0:rt.circularLinkType=="bottom"&&(Le=!0)}),we==!1||Le==!1){var Ke=t.min(et,function(rt){return rt.y0}),Te=t.max(et,function(rt){return rt.y1}),Ve=Te-Ke,$e=ut-ze,ot=$e/Ve;et.forEach(function(rt){var it=(rt.y1-rt.y0)*ot;rt.y0=(rt.y0-Ke)*ot,rt.y1=rt.y0+it}),qe.forEach(function(rt){rt.y0=(rt.y0-Ke)*ot,rt.y1=(rt.y1-Ke)*ot,rt.width=rt.width*ot})}}e.sankeyCircular=E,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,"__esModule",{value:!0})}))});var kK=fe((hMr,RXe)=>{"use strict";RXe.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"}}});var XXe=fe((dMr,YXe)=>{"use strict";var IXe=_Xe(),Jrr=($x(),Gs(Zx)).interpolateNumber,z5=xi(),rS=EXe(),Qrr=DXe(),ws=kK(),D1=ni(),enr=Ji(),R1=Xt(),y_=R1.strTranslate,zXe=R1.strRotate,PK=L1(),nS=PK.keyFun,AD=PK.repeat,VXe=PK.unwrap,qXe=as(),tnr=bi(),GXe=nc(),rnr=GXe.CAP_SHIFT,nnr=GXe.LINE_SPACING,inr=3;function anr(e,t,r){var n=VXe(t),a=n.trace,i=a.domain,o=a.orientation==="h",s=a.direction==="reversed",l=a.node.pad,u=a.node.thickness,c={justify:rS.sankeyJustify,left:rS.sankeyLeft,right:rS.sankeyRight,center:rS.sankeyCenter}[a.node.align],f=e.width*(i.x[1]-i.x[0]),v=e.height*(i.y[1]-i.y[0]),g=n._nodes,p=n._links,_=n.circular,x;_?x=Qrr.sankeyCircular().circularLinkGap(0):x=rS.sankey(),x.iterations(ws.sankeyIterations).size(o?[f,v]:[v,f]).nodeWidth(u).nodePadding(l).nodeId(function(U){return U.pointNumber}).nodeAlign(c).nodes(g).links(p);function y(U){a[U].sort==="input"&&(_?R1.warn(`Circular Sankey diagrams do not support the "input" ${U}.sort mode; falling back to the default sort.`):x[`${U}Sort`](null))}y("link"),y("node");var C=x();x.nodePadding()=K||(V=K-q.y0,V>1e-6&&(q.y0+=V,q.y1+=V)),K=q.y1+l})}function I(U){var j=U.map(function(ye,ue){return{x0:ye.x0,index:ue}}).sort(function(ye,ue){return ye.x0-ue.x0}),q=[],V=-1,K,ee=-1/0,ce;for(k=0;kee+u&&(V+=1,K=me.x0),ee=me.x0,q[V]||(q[V]=[]),q[V].push(me),ce=K-me.x0,me.x0+=ce,me.x1+=ce}return q}if(a.node.x.length&&a.node.y.length){for(k=0;k0?" L "+a.targetX+" "+a.targetY:"")+"Z"):(r="M "+(a.targetX-t)+" "+(a.targetY-n)+" L "+(a.rightInnerExtent-t)+" "+(a.targetY-n)+" A "+(a.rightLargeArcRadius+n)+" "+(a.rightSmallArcRadius+n)+" 0 0 0 "+(a.rightFullExtent-n-t)+" "+(a.targetY+a.rightSmallArcRadius)+" L "+(a.rightFullExtent-n-t)+" "+a.verticalRightInnerExtent,i&&o?r+=" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.rightInnerExtent-n-t)+" "+(a.verticalFullExtent+n)+" L "+(a.rightFullExtent+n-t-(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent+n)+" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent:i?r+=" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.rightFullExtent-t-n-(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" L "+(a.leftFullExtent+n+(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent:r+=" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.rightInnerExtent-t)+" "+(a.verticalFullExtent+n)+" L "+a.leftInnerExtent+" "+(a.verticalFullExtent+n)+" A "+(a.leftLargeArcRadius+n)+" "+(a.leftLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent,r+=" L "+(a.leftFullExtent+n)+" "+(a.sourceY+a.leftSmallArcRadius)+" A "+(a.leftLargeArcRadius+n)+" "+(a.leftSmallArcRadius+n)+" 0 0 0 "+a.leftInnerExtent+" "+(a.sourceY-n)+" L "+a.sourceX+" "+(a.sourceY-n)+" L "+a.sourceX+" "+(a.sourceY+n)+" L "+a.leftInnerExtent+" "+(a.sourceY+n)+" A "+(a.leftLargeArcRadius-n)+" "+(a.leftSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent-n)+" "+(a.sourceY+a.leftSmallArcRadius)+" L "+(a.leftFullExtent-n)+" "+a.verticalLeftInnerExtent,i&&o?r+=" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent-n-(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" L "+(a.rightFullExtent+n-t+(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.rightFullExtent+n-t)+" "+a.verticalRightInnerExtent:i?r+=" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+(a.verticalFullExtent+n)+" L "+(a.rightFullExtent-t-n)+" "+(a.verticalFullExtent+n)+" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.rightFullExtent+n-t)+" "+a.verticalRightInnerExtent:r+=" A "+(a.leftLargeArcRadius-n)+" "+(a.leftLargeArcRadius-n)+" 0 0 1 "+a.leftInnerExtent+" "+(a.verticalFullExtent-n)+" L "+(a.rightInnerExtent-t)+" "+(a.verticalFullExtent-n)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightLargeArcRadius-n)+" 0 0 1 "+(a.rightFullExtent+n-t)+" "+a.verticalRightInnerExtent,r+=" L "+(a.rightFullExtent+n-t)+" "+(a.targetY+a.rightSmallArcRadius)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.rightInnerExtent-t)+" "+(a.targetY+n)+" L "+(a.targetX-t)+" "+(a.targetY+n)+(t>0?" L "+a.targetX+" "+a.targetY:"")+"Z"),r}function FK(){var e=.5;function t(r){var n=r.linkArrowLength;if(r.link.circular)return snr(r.link,n);var a=Math.abs((r.link.target.x0-r.link.source.x1)/2);n>a&&(n=a);var i=r.link.source.x1,o=r.link.target.x0-n,s=Jrr(i,o),l=s(e),u=s(1-e),c=r.link.y0-r.link.width/2,f=r.link.y0+r.link.width/2,v=r.link.y1-r.link.width/2,g=r.link.y1+r.link.width/2,p="M"+i+","+c,_="C"+l+","+c+" "+u+","+v+" "+o+","+v,x="C"+u+","+g+" "+l+","+f+" "+i+","+f,y=n>0?"L"+(o+n)+","+(v+r.link.width/2):"";return y+="L"+o+","+g,p+_+y+x+"Z"}return t}function lnr(e,t){var r=ws.nodePadAcross,n=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var a=t.dx,i=Math.max(.5,t.dy),o="node_"+t.pointNumber;return t.group&&(o=R1.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:o,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(a),visibleHeight:i,zoneX:-r,zoneY:-n,zoneWidth:a+2*r,zoneHeight:i+2*n,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:t.originalLayer===1,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,reversed:e.reversed,rgb:D1.rgb(t.color),alpha:D1.parse(t.color).alpha,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,o].join("_"),interactionState:e.interactionState,figure:e}}function LK(e){e.attr("transform",function(t){return y_(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function unr(e){e.call(LK)}function HXe(e,t){e.call(unr),t.attr("d",FK())}function BXe(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function CK(e){return e.link.width>1||e.linkLineWidth>0}function OXe(e){return e.horizontal?e.reversed?y_(e.translateX+e.width,e.translateY)+"matrix(-1 0 0 1 0 0)":y_(e.translateX,e.translateY)+"matrix(1 0 0 1 0 0)":e.reversed?y_(e.translateX,e.translateY+e.height)+"matrix(0 -1 1 0 0 0)":y_(e.translateX,e.translateY)+"matrix(0 1 1 0 0 0)"}function NXe(e,t,r){e.on(".basic",null).on("mouseover.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.hover(this,n,t),n.interactionState.hovered=[this,n])}).on("mousemove.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.follow(this,n),n.interactionState.hovered=[this,n])}).on("mouseout.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.unhover(this,n,t),n.interactionState.hovered=!1)}).on("click.basic",function(n){n.interactionState.hovered&&(r.unhover(this,n,t),n.interactionState.hovered=!1),!n.interactionState.dragInProgress&&!n.partOfGroup&&r.select(this,n,t)})}function cnr(e,t,r,n){var a=z5.behavior.drag().origin(function(i){return{x:i.node.x0+i.visibleWidth/2,y:i.node.y0+i.visibleHeight/2}}).on("dragstart",function(i){if(i.arrangement!=="fixed"&&(R1.ensureSingle(n._fullLayout._infolayer,"g","dragcover",function(s){n._fullLayout._dragCover=s}),R1.raiseToTop(this),i.interactionState.dragInProgress=i.node,UXe(i.node),i.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,i.interactionState.hovered),i.interactionState.hovered=!1),i.arrangement==="snap")){var o=i.traceId+"|"+i.key;i.forceLayouts[o]?i.forceLayouts[o].alpha(1):fnr(e,o,i,n),hnr(e,t,i,o,n)}}).on("drag",function(i){if(i.arrangement!=="fixed"){var o=z5.event.x,s=z5.event.y;i.arrangement==="snap"?(i.node.x0=o-i.visibleWidth/2,i.node.x1=o+i.visibleWidth/2,i.node.y0=s-i.visibleHeight/2,i.node.y1=s+i.visibleHeight/2):(i.arrangement==="freeform"&&(i.node.x0=o-i.visibleWidth/2,i.node.x1=o+i.visibleWidth/2),s=Math.max(0,Math.min(i.size-i.visibleHeight/2,s)),i.node.y0=s-i.visibleHeight/2,i.node.y1=s+i.visibleHeight/2),UXe(i.node),i.arrangement!=="snap"&&(i.sankey.update(i.graph),HXe(e.filter(WXe(i)),t))}}).on("dragend",function(i){if(i.arrangement!=="fixed"){i.interactionState.dragInProgress=!1;for(var o=0;o0)window.requestAnimationFrame(i);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,jXe(r,a)}})}function dnr(e,t,r,n){return function(){for(var i=0,o=0;o0&&n.forceLayouts[t].alpha(0)}}function jXe(e,t){for(var r=[],n=[],a=0;aCK(x)?D1.rgb(x.linkLineColor):x.rgb).style("stroke-opacity",x=>CK(x)?D1.opacity(x.linkLineColor):x.alpha).style("fill",x=>x.rgb).style("fill-opacity",x=>x.alpha).style("stroke-width",x=>CK(x)?x.linkLineWidth:1).attr("d",FK()),f.style("opacity",function(){return e._context.staticPlot||o||s?1:0}).transition().ease(ws.ease).duration(ws.duration).style("opacity",1),f.exit().transition().ease(ws.ease).duration(ws.duration).style("opacity",0).remove();var v=u.selectAll("."+ws.cn.sankeyNodeSet).data(AD,nS);v.enter().append("g").classed(ws.cn.sankeyNodeSet,!0),v.style("cursor",function(x){switch(x.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var g=v.selectAll("."+ws.cn.sankeyNode).data(function(x){var y=x.graph.nodes;return vnr(y),y.map(lnr.bind(null,x))},nS);g.enter().append("g").classed(ws.cn.sankeyNode,!0).call(LK).style("opacity",function(x){return(e._context.staticPlot||o)&&!x.partOfGroup?1:0}),g.call(NXe,u,a.nodeEvents).call(cnr,f,a,e),g.transition().ease(ws.ease).duration(ws.duration).call(LK).style("opacity",function(x){return x.partOfGroup?0:1}),g.exit().transition().ease(ws.ease).duration(ws.duration).style("opacity",0).remove();var p=g.selectAll("."+ws.cn.nodeRect).data(AD);p.enter().append("rect").classed(ws.cn.nodeRect,!0).call(BXe),p.style("stroke-width",function(x){return x.nodeLineWidth}).style("stroke",function(x){return D1.rgb(x.nodeLineColor)}).style("stroke-opacity",function(x){return D1.opacity(x.nodeLineColor)}).style("fill",x=>x.rgb).style("fill-opacity",x=>x.alpha),p.transition().ease(ws.ease).duration(ws.duration).call(BXe);var _=g.selectAll("."+ws.cn.nodeLabel).data(AD);_.enter().append("text").classed(ws.cn.nodeLabel,!0).style("cursor","default"),_.attr("data-notex",1).text(function(x){return x.node.label}).each(function(x){var y=z5.select(this);enr.font(y,x.textFont),qXe.convertToTspans(y,e)}).attr("text-anchor",function(x){return x.horizontal&&x.left!==x.reversed?"end":"start"}).attr("transform",function(x){var y=z5.select(this),C=qXe.lineCount(y),k=x.textFont.size*((C-1)*nnr-rnr),S=x.nodeLineWidth/2+inr;if(!x.horizontal){var T=x.reversed?(x.visibleWidth+k)/2:(x.visibleWidth-k)/2,L=x.reversed?zXe(90):"scale(-1,1)"+zXe(90);return y_(T,S)+L}var w=S,T=(x.visibleHeight-k)/2;return x.left?w=-w:w+=x.visibleWidth,y_(w,T)+(x.reversed?"scale(-1,1)":"")}),_.transition().ease(ws.ease).duration(ws.duration)}});var IK=fe((vMr,nZe)=>{"use strict";var fd=xi(),RK=Xt(),MD=RK.numberFormat,mnr=XXe(),q5=kl(),ynr=ni(),Ny=kK().cn,iS=RK._;function ZXe(e){return e!==""}function B5(e,t){return e.filter(function(r){return r.key===t.traceId})}function $Xe(e,t){fd.select(e).select("path").style("fill-opacity",t),fd.select(e).select("rect").style("fill-opacity",t)}function KXe(e){fd.select(e).select("text.name").style("fill","black")}function JXe(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function QXe(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function eZe(e,t,r){t&&r&&B5(r,t).selectAll("."+Ny.sankeyLink).filter(JXe(t)).call(tZe.bind(0,t,r,!1))}function DK(e,t,r){t&&r&&B5(r,t).selectAll("."+Ny.sankeyLink).filter(JXe(t)).call(rZe.bind(0,t,r,!1))}function tZe(e,t,r,n){n.style("fill",function(a){if(!a.link.concentrationscale)return a.hoverRgb}).style("fill-opacity",function(a){if(!a.link.concentrationscale)return a.hoverAlpha}),n.each(function(a){var i=a.link.label;i!==""&&B5(t,e).selectAll("."+Ny.sankeyLink).filter(function(o){return o.link.label===i}).style("fill",function(o){if(!o.link.concentrationscale)return o.hoverRgb}).style("fill-opacity",function(o){if(!o.link.concentrationscale)return o.hoverAlpha})}),r&&B5(t,e).selectAll("."+Ny.sankeyNode).filter(QXe(e)).call(eZe)}function rZe(e,t,r,n){n.style("fill",function(a){return a.rgb}).style("fill-opacity",function(a){return a.alpha}),n.each(function(a){var i=a.link.label;i!==""&&B5(t,e).selectAll("."+Ny.sankeyLink).filter(function(o){return o.link.label===i}).style("fill",o=>o.rgb).style("fill-opacity",o=>o.alpha)}),r&&B5(t,e).selectAll(Ny.sankeyNode).filter(QXe(e)).call(DK)}function Vl(e,t){var r=e.hoverlabel||{},n=RK.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}nZe.exports=function(t,r){for(var n=t._fullLayout,a=n._paper,i=n._size,o=0;o"),color:Vl(T,"bgcolor")||ynr.addOpacity(I.color,1),borderColor:Vl(T,"bordercolor"),fontFamily:Vl(T,"font.family"),fontSize:Vl(T,"font.size"),fontColor:Vl(T,"font.color"),fontWeight:Vl(T,"font.weight"),fontStyle:Vl(T,"font.style"),fontVariant:Vl(T,"font.variant"),fontTextcase:Vl(T,"font.textcase"),fontLineposition:Vl(T,"font.lineposition"),fontShadow:Vl(T,"font.shadow"),nameLength:Vl(T,"namelength"),textAlign:Vl(T,"align"),idealAlign:fd.event.x"),color:Vl(T,"bgcolor")||w.rgb,borderColor:Vl(T,"bordercolor"),fontFamily:Vl(T,"font.family"),fontSize:Vl(T,"font.size"),fontColor:Vl(T,"font.color"),fontWeight:Vl(T,"font.weight"),fontStyle:Vl(T,"font.style"),fontVariant:Vl(T,"font.variant"),fontTextcase:Vl(T,"font.textcase"),fontLineposition:Vl(T,"font.lineposition"),fontShadow:Vl(T,"font.shadow"),nameLength:Vl(T,"namelength"),textAlign:Vl(T,"align"),idealAlign:"left",hovertemplate:T.hovertemplate,hovertemplateLabels:B,eventData:[w.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});$Xe(j,.85),KXe(j)}}},S=function(L,w,T){t._fullLayout.hovermode!==!1&&(fd.select(L).call(DK,w,T),w.node.trace.node.hoverinfo!=="skip"&&(w.node.fullData=w.node.trace,t.emit("plotly_unhover",{event:fd.event,points:[w.node]})),q5.loneUnhover(n._hoverlayer.node()))};mnr(t,a,r,{width:i.w,height:i.h,margin:{t:i.t,r:i.r,b:i.b,l:i.l}},{linkEvents:{hover:u,follow:_,unhover:x,select:l},nodeEvents:{hover:C,follow:k,unhover:S,select:y}})}});var iZe=fe(x_=>{"use strict";var xnr=rl().overrideAll,_nr=jf().getModuleCalcData,bnr=IK(),wnr=tm(),Tnr=np(),Anr=ed(),Mnr=Ac().prepSelect,zK=Xt(),Snr=bi(),SD="sankey";x_.name=SD;x_.baseLayoutAttrOverrides=xnr({hoverlabel:wnr.hoverlabel},"plot","nested");x_.plot=function(e){var t=_nr(e.calcdata,SD)[0];bnr(e,t),x_.updateFx(e)};x_.clean=function(e,t,r,n){var a=n._has&&n._has(SD),i=t._has&&t._has(SD);a&&!i&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())};x_.updateFx=function(e){for(var t=0;t{"use strict";aZe.exports=function(t,r){for(var n=t.cd,a=[],i=n[0].trace,o=i._sankey,s=o.graph.nodes,l=i.orientation==="v",u=i.direction==="reversed",c=0;c{"use strict";sZe.exports={attributes:AK(),supplyDefaults:oXe(),calc:fXe(),plot:IK(),moduleType:"trace",name:"sankey",basePlotModule:iZe(),selectPoints:oZe(),categories:["noOpacity"],meta:{}}});var cZe=fe((yMr,uZe)=>{"use strict";uZe.exports=lZe()});var hZe=fe(O5=>{"use strict";var fZe=Hs();O5.name="indicator";O5.plot=function(e,t,r,n){fZe.plotBasePlot(O5.name,e,t,r,n)};O5.clean=function(e,t,r,n){fZe.cleanBasePlot(O5.name,e,t,r,n)}});var BK=fe((_Mr,yZe)=>{"use strict";var Uy=ta().extendFlat,vZe=ta().extendDeep,knr=rl().overrideAll,pZe=Ds(),gZe=tc(),Cnr=nl().attributes,au=pf(),Lnr=So().templatedArray,ED=rw(),dZe=pl().descriptionOnlyNumbers,qK=pZe({editType:"plot",colorEditType:"plot"}),aS={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:gZe.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},mZe={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},Pnr=Lnr("step",vZe({},aS,{range:mZe}));yZe.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:Cnr({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:Uy({},qK,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:dZe("value")},font:Uy({},qK,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:dZe("value")},increasing:{symbol:{valType:"string",dflt:ED.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:ED.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:ED.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:ED.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:Uy({},qK,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:vZe({},aS,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:gZe.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:knr({range:mZe,visible:Uy({},au.visible,{dflt:!0}),tickmode:au.minor.tickmode,nticks:au.nticks,tick0:au.tick0,dtick:au.dtick,tickvals:au.tickvals,ticktext:au.ticktext,ticks:Uy({},au.ticks,{dflt:"outside"}),ticklen:au.ticklen,tickwidth:au.tickwidth,tickcolor:au.tickcolor,ticklabelstep:au.ticklabelstep,showticklabels:au.showticklabels,labelalias:au.labelalias,tickfont:pZe({}),tickangle:au.tickangle,tickformat:au.tickformat,tickformatstops:au.tickformatstops,tickprefix:au.tickprefix,showtickprefix:au.showtickprefix,ticksuffix:au.ticksuffix,showticksuffix:au.showticksuffix,separatethousands:au.separatethousands,exponentformat:au.exponentformat,minexponent:au.minexponent,showexponent:au.showexponent,editType:"plot"},"plot"),steps:Pnr,threshold:{line:{color:Uy({},aS.line.color,{}),width:Uy({},aS.line.width,{dflt:1}),editType:"plot"},thickness:Uy({},aS.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var OK=fe((bMr,xZe)=>{"use strict";xZe.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var wZe=fe((wMr,bZe)=>{"use strict";var I1=Xt(),CD=BK(),Fnr=nl().defaults,_Ze=So(),Dnr=Ah(),kD=OK(),Rnr=F2(),Inr=Ub(),znr=gm(),qnr=mm();function Bnr(e,t,r,n){function a(w,T){return I1.coerce(e,t,CD,w,T)}Fnr(t,n,a),a("mode"),t._hasNumber=t.mode.indexOf("number")!==-1,t._hasDelta=t.mode.indexOf("delta")!==-1,t._hasGauge=t.mode.indexOf("gauge")!==-1;var i=a("value");t._range=[0,typeof i=="number"?1.5*i:1];var o=new Array(2),s;if(t._hasNumber){a("number.valueformat");var l=I1.extendFlat({},n.font);l.size=void 0,I1.coerceFont(a,"number.font",l),t.number.font.size===void 0&&(t.number.font.size=kD.defaultNumberFontSize,o[0]=!0),a("number.prefix"),a("number.suffix"),s=t.number.font.size}var u;if(t._hasDelta){var c=I1.extendFlat({},n.font);c.size=void 0,I1.coerceFont(a,"delta.font",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||kD.defaultNumberFontSize),o[1]=!0),a("delta.reference",t.value),a("delta.relative"),a("delta.valueformat",t.delta.relative?"2%":""),a("delta.increasing.symbol"),a("delta.increasing.color"),a("delta.decreasing.symbol"),a("delta.decreasing.color"),a("delta.position"),a("delta.prefix"),a("delta.suffix"),u=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var f=I1.extendFlat({},n.font);f.size=.25*(s||u||kD.defaultNumberFontSize),I1.coerceFont(a,"title.font",f),a("title.text");var v,g,p,_;function x(w,T){return I1.coerce(v,g,CD.gauge,w,T)}function y(w,T){return I1.coerce(p,_,CD.gauge.axis,w,T)}if(t._hasGauge){v=e.gauge,v||(v={}),g=_Ze.newContainer(t,"gauge"),x("shape");var C=t._isBullet=t.gauge.shape==="bullet";C||a("title.align","center");var k=t._isAngular=t.gauge.shape==="angular";k||a("align","center"),x("bgcolor",n.paper_bgcolor),x("borderwidth"),x("bordercolor"),x("bar.color"),x("bar.line.color"),x("bar.line.width");var S=kD.valueThickness*(t.gauge.shape==="bullet"?.5:1);x("bar.thickness",S),Dnr(v,g,{name:"steps",handleItemDefaults:Onr}),x("threshold.value"),x("threshold.thickness"),x("threshold.line.width"),x("threshold.line.color"),p={},v&&(p=v.axis||{}),_=_Ze.newContainer(g,"axis"),y("visible"),t._range=y("range",t._range);var L={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};Rnr(p,_,y,"linear"),qnr(p,_,y,"linear",L),znr(p,_,y,"linear",L),Inr(p,_,y,L)}else a("title.align","center"),a("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function Onr(e,t){function r(n,a){return I1.coerce(e,t,CD.gauge.steps,n,a)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}bZe.exports={supplyDefaults:Bnr}});var AZe=fe((TMr,TZe)=>{"use strict";function Nnr(e,t){var r=[],n=t.value;typeof t._lastValue!="number"&&(t._lastValue=t.value);var a=t._lastValue,i=a;return t._hasDelta&&typeof t.delta.reference=="number"&&(i=t.delta.reference),r[0]={y:n,lastY:a,delta:n-i,relativeDelta:(n-i)/i},r}TZe.exports={calc:Nnr}});var LZe=fe((AMr,CZe)=>{"use strict";var A_=xi(),Unr=($x(),Gs(Zx)).interpolate,MZe=($x(),Gs(Zx)).interpolateNumber,Vy=Xt(),Vnr=Vy.strScale,sS=Vy.strTranslate,Gnr=Vy.rad2deg,Hnr=nc().MID_SHIFT,T_=Ji(),__=OK(),PD=as(),ih=Yi(),jnr=pA(),Wnr=gC(),Ynr=pf(),N5=ni(),NK={left:"start",center:"middle",right:"end"},b_={left:0,center:.5,right:1},SZe=/[yzafpnµmkMGTPEZY]/;function lS(e){return e&&e.duration>0}CZe.exports=function(t,r,n,a){var i=t._fullLayout,o;lS(n)&&a&&(o=a()),Vy.makeTraceGroups(i._indicatorlayer,r,"trace").each(function(s){var l=s[0],u=l.trace,c=A_.select(this),f=u._hasGauge,v=u._isAngular,g=u._isBullet,p=u.domain,_={w:i._size.w*(p.x[1]-p.x[0]),h:i._size.h*(p.y[1]-p.y[0]),l:i._size.l+i._size.w*p.x[0],r:i._size.r+i._size.w*(1-p.x[1]),t:i._size.t+i._size.h*(1-p.y[1]),b:i._size.b+i._size.h*p.y[0]},x=_.l+_.w/2,y=_.t+_.h/2,C=Math.min(_.w/2,_.h),k=__.innerRadius*C,S,L,w,T=u.align||"center";if(L=y,!f)S=_.l+b_[T]*_.w,w=function(j){return EZe(j,_.w,_.h)};else if(v&&(S=x,L=y+C/2,w=function(j){return Jnr(j,.9*k)}),g){var A=__.bulletPadding,m=1-__.bulletNumberDomainSize+A;S=_.l+(m+(1-m)*b_[T])*_.w,w=function(j){return EZe(j,(__.bulletNumberDomainSize-A)*_.w,_.h)}}$nr(t,c,s,{numbersX:S,numbersY:L,numbersScaler:w,transitionOpts:n,onComplete:o});var F,E;f&&(F={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},E={range:u.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var I=c.selectAll("g.angular").data(v?s:[]);I.exit().remove();var R=c.selectAll("g.angularaxis").data(v?s:[]);R.exit().remove(),v&&Znr(t,c,s,{radius:C,innerRadius:k,gauge:I,layer:R,size:_,gaugeBg:F,gaugeOutline:E,transitionOpts:n,onComplete:o});var B=c.selectAll("g.bullet").data(g?s:[]);B.exit().remove();var O=c.selectAll("g.bulletaxis").data(g?s:[]);O.exit().remove(),g&&Xnr(t,c,s,{gauge:B,layer:O,size:_,gaugeBg:F,gaugeOutline:E,transitionOpts:n,onComplete:o});var U=c.selectAll("text.title").data(s);U.exit().remove(),U.enter().append("text").classed("title",!0),U.attr("text-anchor",function(){return g?NK.right:NK[u.title.align]}).text(u.title.text).call(T_.font,u.title.font).call(PD.convertToTspans,t),U.attr("transform",function(){var j=_.l+_.w*b_[u.title.align],q,V=__.titlePadding,K=T_.bBox(U.node());if(f){if(v)if(u.gauge.axis.visible){var ee=T_.bBox(R.node());q=ee.top-V-K.bottom}else q=_.t+_.h/2-C/2-K.bottom-V;g&&(q=L-(K.top+K.bottom)/2,j=_.l-__.bulletPadding*_.w)}else q=u._numbersTop-V-K.bottom;return sS(j,q)})})};function Xnr(e,t,r,n){var a=r[0].trace,i=n.gauge,o=n.layer,s=n.gaugeBg,l=n.gaugeOutline,u=n.size,c=a.domain,f=n.transitionOpts,v=n.onComplete,g,p,_,x,y;i.enter().append("g").classed("bullet",!0),i.attr("transform",sS(u.l,u.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var C=u.h,k=a.gauge.bar.thickness*C,S=c.x[0],L=c.x[0]+(c.x[1]-c.x[0])*(a._hasNumber||a._hasDelta?1-__.bulletNumberDomainSize:1);g=oS(e,a.gauge.axis),g._id="xbulletaxis",g.domain=[S,L],g.setScale(),p=ih.calcTicks(g),_=ih.makeTransTickFn(g),x=ih.getTickSigns(g)[2],y=u.t+u.h,g.visible&&(ih.drawTicks(e,g,{vals:g.ticks==="inside"?ih.clipEnds(g,p):p,layer:o,path:ih.makeTickPath(g,y,x),transFn:_}),ih.drawLabels(e,g,{vals:p,layer:o,transFn:_,labelFns:ih.makeLabelFns(g,y)}));function w(R){R.attr("width",function(B){return Math.max(0,g.c2p(B.range[1])-g.c2p(B.range[0]))}).attr("x",function(B){return g.c2p(B.range[0])}).attr("y",function(B){return .5*(1-B.thickness)*C}).attr("height",function(B){return B.thickness*C})}var T=[s].concat(a.gauge.steps),A=i.selectAll("g.bg-bullet").data(T);A.enter().append("g").classed("bg-bullet",!0).append("rect"),A.select("rect").call(w).call(w_),A.exit().remove();var m=i.selectAll("g.value-bullet").data([a.gauge.bar]);m.enter().append("g").classed("value-bullet",!0).append("rect"),m.select("rect").attr("height",k).attr("y",(C-k)/2).call(w_),lS(f)?m.select("rect").transition().duration(f.duration).ease(f.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()}).attr("width",Math.max(0,g.c2p(Math.min(a.gauge.axis.range[1],r[0].y)))):m.select("rect").attr("width",typeof r[0].y=="number"?Math.max(0,g.c2p(Math.min(a.gauge.axis.range[1],r[0].y))):0),m.exit().remove();var F=r.filter(function(){return a.gauge.threshold.value||a.gauge.threshold.value===0}),E=i.selectAll("g.threshold-bullet").data(F);E.enter().append("g").classed("threshold-bullet",!0).append("line"),E.select("line").attr("x1",g.c2p(a.gauge.threshold.value)).attr("x2",g.c2p(a.gauge.threshold.value)).attr("y1",(1-a.gauge.threshold.thickness)/2*C).attr("y2",(1-(1-a.gauge.threshold.thickness)/2)*C).call(N5.stroke,a.gauge.threshold.line.color).style("stroke-width",a.gauge.threshold.line.width),E.exit().remove();var I=i.selectAll("g.gauge-outline").data([l]);I.enter().append("g").classed("gauge-outline",!0).append("rect"),I.select("rect").call(w).call(w_),I.exit().remove()}function Znr(e,t,r,n){var a=r[0].trace,i=n.size,o=n.radius,s=n.innerRadius,l=n.gaugeBg,u=n.gaugeOutline,c=[i.l+i.w/2,i.t+i.h/2+o/2],f=n.gauge,v=n.layer,g=n.transitionOpts,p=n.onComplete,_=Math.PI/2;function x(ce){var me=a.gauge.axis.range[0],ye=a.gauge.axis.range[1],ue=(ce-me)/(ye-me)*Math.PI-_;return ue<-_?-_:ue>_?_:ue}function y(ce){return A_.svg.arc().innerRadius((s+o)/2-ce/2*(o-s)).outerRadius((s+o)/2+ce/2*(o-s)).startAngle(-_)}function C(ce){ce.attr("d",function(me){return y(me.thickness).startAngle(x(me.range[0])).endAngle(x(me.range[1]))()})}var k,S,L,w;f.enter().append("g").classed("angular",!0),f.attr("transform",sS(c[0],c[1])),v.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),v.selectAll("g.xangularaxistick,path,text").remove(),k=oS(e,a.gauge.axis),k.type="linear",k.range=a.gauge.axis.range,k._id="xangularaxis",k.ticklabeloverflow="allow",k.setScale();var T=function(ce){return(k.range[0]-ce.x)/(k.range[1]-k.range[0])*Math.PI+Math.PI},A={},m=ih.makeLabelFns(k,0),F=m.labelStandoff;A.xFn=function(ce){var me=T(ce);return Math.cos(me)*F},A.yFn=function(ce){var me=T(ce),ye=Math.sin(me)>0?.2:1;return-Math.sin(me)*(F+ce.fontSize*ye)+Math.abs(Math.cos(me))*(ce.fontSize*Hnr)},A.anchorFn=function(ce){var me=T(ce),ye=Math.cos(me);return Math.abs(ye)<.1?"middle":ye>0?"start":"end"},A.heightFn=function(ce,me,ye){var ue=T(ce);return-.5*(1+Math.sin(ue))*ye};var E=function(ce){return sS(c[0]+o*Math.cos(ce),c[1]-o*Math.sin(ce))};L=function(ce){return E(T(ce))};var I=function(ce){var me=T(ce);return E(me)+"rotate("+-Gnr(me)+")"};if(S=ih.calcTicks(k),w=ih.getTickSigns(k)[2],k.visible){w=k.ticks==="inside"?-1:1;var R=(k.linewidth||1)/2;ih.drawTicks(e,k,{vals:S,layer:v,path:"M"+w*R+",0h"+w*k.ticklen,transFn:I}),ih.drawLabels(e,k,{vals:S,layer:v,transFn:L,labelFns:A})}var B=[l].concat(a.gauge.steps),O=f.selectAll("g.bg-arc").data(B);O.enter().append("g").classed("bg-arc",!0).append("path"),O.select("path").call(C).call(w_),O.exit().remove();var U=y(a.gauge.bar.thickness),j=f.selectAll("g.value-arc").data([a.gauge.bar]);j.enter().append("g").classed("value-arc",!0).append("path");var q=j.select("path");lS(g)?(q.transition().duration(g.duration).ease(g.easing).each("end",function(){p&&p()}).each("interrupt",function(){p&&p()}).attrTween("d",Knr(U,x(r[0].lastY),x(r[0].y))),a._lastValue=r[0].y):q.attr("d",typeof r[0].y=="number"?U.endAngle(x(r[0].y)):"M0,0Z"),q.call(w_),j.exit().remove(),B=[];var V=a.gauge.threshold.value;(V||V===0)&&B.push({range:[V,V],color:a.gauge.threshold.color,line:{color:a.gauge.threshold.line.color,width:a.gauge.threshold.line.width},thickness:a.gauge.threshold.thickness});var K=f.selectAll("g.threshold-arc").data(B);K.enter().append("g").classed("threshold-arc",!0).append("path"),K.select("path").call(C).call(w_),K.exit().remove();var ee=f.selectAll("g.gauge-outline").data([u]);ee.enter().append("g").classed("gauge-outline",!0).append("path"),ee.select("path").call(C).call(w_),ee.exit().remove()}function $nr(e,t,r,n){var a=r[0].trace,i=n.numbersX,o=n.numbersY,s=a.align||"center",l=NK[s],u=n.transitionOpts,c=n.onComplete,f=Vy.ensureSingle(t,"g","numbers"),v,g,p,_=[];a._hasNumber&&_.push("number"),a._hasDelta&&(_.push("delta"),a.delta.position==="left"&&_.reverse());var x=f.selectAll("text").data(_);x.enter().append("text"),x.attr("text-anchor",function(){return l}).attr("class",function(E){return E}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),x.exit().remove();function y(E,I,R,B){if(E.match("s")&&R>=0!=B>=0&&!I(R).slice(-1).match(SZe)&&!I(B).slice(-1).match(SZe)){var O=E.slice().replace("s","f").replace(/\d+/,function(j){return parseInt(j)-1}),U=oS(e,{tickformat:O});return function(j){return Math.abs(j)<1?ih.tickText(U,j).text:I(j)}}else return I}function C(){var E=oS(e,{tickformat:a.number.valueformat},a._range);E.setScale(),ih.prepTicks(E);var I=function(j){return ih.tickText(E,j).text},R=a.number.suffix,B=a.number.prefix,O=f.select("text.number");function U(){var j=typeof r[0].y=="number"?B+I(r[0].y)+R:"-";O.text(j).call(T_.font,a.number.font).call(PD.convertToTspans,e)}return lS(u)?O.transition().duration(u.duration).ease(u.easing).each("end",function(){U(),c&&c()}).each("interrupt",function(){U(),c&&c()}).attrTween("text",function(){var j=A_.select(this),q=MZe(r[0].lastY,r[0].y);a._lastValue=r[0].y;var V=y(a.number.valueformat,I,r[0].lastY,r[0].y);return function(K){j.text(B+V(q(K))+R)}}):U(),v=kZe(B+I(r[0].y)+R,a.number.font,l,e),O}function k(){var E=oS(e,{tickformat:a.delta.valueformat},a._range);E.setScale(),ih.prepTicks(E);var I=function(K){return ih.tickText(E,K).text},R=a.delta.suffix,B=a.delta.prefix,O=function(K){var ee=a.delta.relative?K.relativeDelta:K.delta;return ee},U=function(K,ee){return K===0||typeof K!="number"||isNaN(K)?"-":(K>0?a.delta.increasing.symbol:a.delta.decreasing.symbol)+B+ee(K)+R},j=function(K){return K.delta>=0?a.delta.increasing.color:a.delta.decreasing.color};a._deltaLastValue===void 0&&(a._deltaLastValue=O(r[0]));var q=f.select("text.delta");q.call(T_.font,a.delta.font).call(N5.fill,j({delta:a._deltaLastValue}));function V(){q.text(U(O(r[0]),I)).call(N5.fill,j(r[0])).call(PD.convertToTspans,e)}return lS(u)?q.transition().duration(u.duration).ease(u.easing).tween("text",function(){var K=A_.select(this),ee=O(r[0]),ce=a._deltaLastValue,me=y(a.delta.valueformat,I,ce,ee),ye=MZe(ce,ee);return a._deltaLastValue=ee,function(ue){K.text(U(ye(ue),me)),K.call(N5.fill,j({delta:ye(ue)}))}}).each("end",function(){V(),c&&c()}).each("interrupt",function(){V(),c&&c()}):V(),g=kZe(U(O(r[0]),I),a.delta.font,l,e),q}var S=a.mode+a.align,L;if(a._hasDelta&&(L=k(),S+=a.delta.position+a.delta.font.size+a.delta.font.family+a.delta.valueformat,S+=a.delta.increasing.symbol+a.delta.decreasing.symbol,p=g),a._hasNumber&&(C(),S+=a.number.font.size+a.number.font.family+a.number.valueformat+a.number.suffix+a.number.prefix,p=v),a._hasDelta&&a._hasNumber){var w=[(v.left+v.right)/2,(v.top+v.bottom)/2],T=[(g.left+g.right)/2,(g.top+g.bottom)/2],A,m,F=.75*a.delta.font.size;a.delta.position==="left"&&(A=LD(a,"deltaPos",0,-1*(v.width*b_[a.align]+g.width*(1-b_[a.align])+F),S,Math.min),m=w[1]-T[1],p={width:v.width+g.width+F,height:Math.max(v.height,g.height),left:g.left+A,right:v.right,top:Math.min(v.top,g.top+m),bottom:Math.max(v.bottom,g.bottom+m)}),a.delta.position==="right"&&(A=LD(a,"deltaPos",0,v.width*(1-b_[a.align])+g.width*b_[a.align]+F,S,Math.max),m=w[1]-T[1],p={width:v.width+g.width+F,height:Math.max(v.height,g.height),left:v.left,right:g.right+A,top:Math.min(v.top,g.top+m),bottom:Math.max(v.bottom,g.bottom+m)}),a.delta.position==="bottom"&&(A=null,m=g.height,p={width:Math.max(v.width,g.width),height:v.height+g.height,left:Math.min(v.left,g.left),right:Math.max(v.right,g.right),top:v.bottom-v.height,bottom:v.bottom+g.height}),a.delta.position==="top"&&(A=null,m=v.top,p={width:Math.max(v.width,g.width),height:v.height+g.height,left:Math.min(v.left,g.left),right:Math.max(v.right,g.right),top:v.bottom-v.height-g.height,bottom:v.bottom}),L.attr({dx:A,dy:m})}(a._hasNumber||a._hasDelta)&&f.attr("transform",function(){var E=n.numbersScaler(p);S+=E[2];var I=LD(a,"numbersScale",1,E[0],S,Math.min),R;a._scaleNumbers||(I=1),a._isAngular?R=o-I*p.bottom:R=o-I*(p.top+p.bottom)/2,a._numbersTop=I*p.top+R;var B=p[s];s==="center"&&(B=(p.left+p.right)/2);var O=i-I*B;return O=LD(a,"numbersTranslate",0,O,S,Math.max),sS(O,R)+Vnr(I)})}function w_(e){e.each(function(t){N5.stroke(A_.select(this),t.line.color)}).each(function(t){N5.fill(A_.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function Knr(e,t,r){return function(){var n=Unr(t,r);return function(a){return e.endAngle(n(a))()}}}function oS(e,t,r){var n=e._fullLayout,a=Vy.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),i={type:"linear",_id:"x"+t._id},o={letter:"x",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function s(l,u){return Vy.coerce(a,i,Ynr,l,u)}return jnr(a,i,s,o,n),Wnr(a,i,s,o),i}function EZe(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+"x"+r]}function Jnr(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function kZe(e,t,r,n){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),i=A_.select(a);return i.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(PD.convertToTspans,n).call(T_.font,t),T_.bBox(i.node())}function LD(e,t,r,n,a,i){var o="_cache"+t;e[o]&&e[o].key===a||(e[o]={key:a,value:r});var s=Vy.aggNums(i,null,[e[o].value,n],2);return e[o].value=s,s}});var FZe=fe((MMr,PZe)=>{"use strict";PZe.exports={moduleType:"trace",name:"indicator",basePlotModule:hZe(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:BK(),supplyDefaults:wZe().supplyDefaults,calc:AZe().calc,plot:LZe(),meta:{}}});var RZe=fe((SMr,DZe)=>{"use strict";DZe.exports=FZe()});var UK=fe((kMr,BZe)=>{"use strict";var IZe=Fm(),FD=ta().extendFlat,Qnr=rl().overrideAll,zZe=Ds(),eir=nl().attributes,qZe=pl().descriptionOnlyNumbers,EMr=BZe.exports=Qnr({domain:eir({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:qZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:FD({},IZe.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:FD({},zZe({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:qZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:FD({},IZe.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:FD({},zZe({arrayOk:!0}))}},"calc","from-root")});var NZe=fe((CMr,OZe)=>{"use strict";var VK=Xt(),tir=UK(),rir=nl().defaults;function nir(e,t){for(var r=e.columnorder||[],n=e.header.values.length,a=r.slice(0,n),i=a.slice().sort(function(l,u){return l-u}),o=a.map(function(l){return i.indexOf(l)}),s=o.length;s{"use strict";var iir=L1().wrap;UZe.exports=function(){return iir({})}});var GK=fe((PMr,GZe)=>{"use strict";GZe.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"
",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"}}});var JZe=fe((FMr,KZe)=>{"use strict";var HZe=GK(),jK=ta().extendFlat,air=aa(),oir=Gf().isTypedArray,DD=Gf().isArrayOrTypedArray;KZe.exports=function(t,r){var n=HK(r.cells.values),a=function(m){return m.slice(r.header.values.length,m.length)},i=HK(r.header.values);i.length&&!i[0].length&&(i[0]=[""],i=HK(i));var o=i.concat(a(n).map(function(){return $Ze((i[0]||[""]).length)})),s=r.domain,l=Math.floor(t._fullLayout._size.w*(s.x[1]-s.x[0])),u=Math.floor(t._fullLayout._size.h*(s.y[1]-s.y[0])),c=r.header.values.length?o[0].map(function(){return r.header.height}):[HZe.emptyHeaderHeight],f=n.length?n[0].map(function(){return r.cells.height}):[],v=c.reduce(jZe,0),g=u-v,p=g+HZe.uplift,_=XZe(f,p),x=XZe(c,v),y=YZe(x,[]),C=YZe(_,y),k={},S=r.columnorder;DD(S)&&(S=Array.from(S)),S=S.concat(a(n.map(function(m,F){return F})));var L=o.map(function(m,F){var E=DD(r.columnwidth)?r.columnwidth[Math.min(F,r.columnwidth.length-1)]:r.columnwidth;return air(E)?Number(E):1}),w=L.reduce(jZe,0);L=L.map(function(m){return m/w*l});var T=Math.max(WK(r.header.line.width),WK(r.cells.line.width)),A={key:r.uid+t._context.staticPlot,translateX:s.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-s.y[1]),size:t._fullLayout._size,width:l,maxLineWidth:T,height:u,columnOrder:S,groupHeight:u,rowBlocks:C,headerRowBlocks:y,scrollY:0,cells:jK({},r.cells,{values:n}),headerCells:jK({},r.header,{values:o}),gdColumns:o.map(function(m){return m[0]}),gdColumnsOriginalOrder:o.map(function(m){return m[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(m,F){var E=k[m];k[m]=(E||0)+1;var I=m+"__"+k[m];return{key:I,label:m,specIndex:F,xIndex:S[F],xScale:WZe,x:void 0,calcdata:void 0,columnWidth:L[F]}})};return A.columns.forEach(function(m){m.calcdata=A,m.x=WZe(m)}),A};function WK(e){if(DD(e)){for(var t=0,r=0;r=t||u===e.length-1)&&(r[a]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o=ZZe(),a+=i,s=u+1,i=0);return r}function ZZe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var QZe=fe(YK=>{"use strict";var RD=ta().extendFlat;YK.splitToPanels=function(e){var t=[0,0],r=RD({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:RD({},e.calcdata,{cells:e.calcdata.headerCells})}),n=RD({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),a=RD({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks});return[n,a,r]};YK.splitToCells=function(e){var t=sir(e);return(e.values||[]).slice(t[0],t[1]).map(function(r,n){var a=typeof r=="string"&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:n+a,key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}})};function sir(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}});var nJ=fe((RMr,c$e)=>{"use strict";var Ei=GK(),_l=xi(),XK=Xt(),lir=XK.numberFormat,Ts=L1(),ZK=Ji(),uir=as(),cir=Xt().raiseToTop,Bv=Xt().strTranslate,fir=Xt().cancelTransition,hir=JZe(),o$e=QZe(),e$e=ni();c$e.exports=function(t,r){var n=!t._context.staticPlot,a=t._fullLayout._paper.selectAll("."+Ei.cn.table).data(r.map(function(C){var k=Ts.unwrap(C),S=k.trace;return hir(t,S)}),Ts.keyFun);a.exit().remove(),a.enter().append("g").classed(Ei.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"),a.attr("width",function(C){return C.width+C.size.l+C.size.r}).attr("height",function(C){return C.height+C.size.t+C.size.b}).attr("transform",function(C){return Bv(C.translateX,C.translateY)});var i=a.selectAll("."+Ei.cn.tableControlView).data(Ts.repeat,Ts.keyFun),o=i.enter().append("g").classed(Ei.cn.tableControlView,!0).style("box-sizing","content-box");if(n){var s="onwheel"in document?"wheel":"mousewheel";o.on("mousemove",function(C){i.filter(function(k){return C===k}).call(uS,t)}).on(s,function(C){if(!C.scrollbarState.wheeling){C.scrollbarState.wheeling=!0;var k=C.scrollY+_l.event.deltaY,S=zD(t,i,null,k)(C);S||(_l.event.stopPropagation(),_l.event.preventDefault()),C.scrollbarState.wheeling=!1}}).call(uS,t,!0)}i.attr("transform",function(C){return Bv(C.size.l,C.size.t)});var l=i.selectAll("."+Ei.cn.scrollBackground).data(Ts.repeat,Ts.keyFun);l.enter().append("rect").classed(Ei.cn.scrollBackground,!0).attr("fill","none"),l.attr("width",function(C){return C.width}).attr("height",function(C){return C.height}),i.each(function(C){ZK.setClipUrl(_l.select(this),t$e(t,C),t)});var u=i.selectAll("."+Ei.cn.yColumn).data(function(C){return C.columns},Ts.keyFun);u.enter().append("g").classed(Ei.cn.yColumn,!0),u.exit().remove(),u.attr("transform",function(C){return Bv(C.x,0)}),n&&u.call(_l.behavior.drag().origin(function(C){var k=_l.select(this);return i$e(k,C,-Ei.uplift),cir(this),C.calcdata.columnDragInProgress=!0,uS(i.filter(function(S){return C.calcdata.key===S.key}),t),C}).on("drag",function(C){var k=_l.select(this),S=function(T){return(C===T?_l.event.x:T.x)+T.columnWidth/2};C.x=Math.max(-Ei.overdrag,Math.min(C.calcdata.width+Ei.overdrag-C.columnWidth,_l.event.x));var L=s$e(u).filter(function(T){return T.calcdata.key===C.calcdata.key}),w=L.sort(function(T,A){return S(T)-S(A)});w.forEach(function(T,A){T.xIndex=A,T.x=C===T?T.x:T.xScale(T)}),u.filter(function(T){return C!==T}).transition().ease(Ei.transitionEase).duration(Ei.transitionDuration).attr("transform",function(T){return Bv(T.x,0)}),k.call(fir).attr("transform",Bv(C.x,-Ei.uplift))}).on("dragend",function(C){var k=_l.select(this),S=C.calcdata;C.x=C.xScale(C),C.calcdata.columnDragInProgress=!1,i$e(k,C,0),wir(t,S,S.columns.map(function(L){return L.xIndex}))})),u.each(function(C){ZK.setClipUrl(_l.select(this),r$e(t,C),t)});var c=u.selectAll("."+Ei.cn.columnBlock).data(o$e.splitToPanels,Ts.keyFun);c.enter().append("g").classed(Ei.cn.columnBlock,!0).attr("id",function(C){return C.key}),c.style("cursor",function(C){return C.dragHandle?"ew-resize":C.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var f=c.filter(Tir),v=c.filter(eJ);n&&v.call(_l.behavior.drag().origin(function(C){return _l.event.stopPropagation(),C}).on("drag",zD(t,i,-1)).on("dragend",function(){})),$K(t,i,f,c),$K(t,i,v,c);var g=i.selectAll("."+Ei.cn.scrollAreaClip).data(Ts.repeat,Ts.keyFun);g.enter().append("clipPath").classed(Ei.cn.scrollAreaClip,!0).attr("id",function(C){return t$e(t,C)});var p=g.selectAll("."+Ei.cn.scrollAreaClipRect).data(Ts.repeat,Ts.keyFun);p.enter().append("rect").classed(Ei.cn.scrollAreaClipRect,!0).attr("x",-Ei.overdrag).attr("y",-Ei.uplift).attr("fill","none"),p.attr("width",function(C){return C.width+2*Ei.overdrag}).attr("height",function(C){return C.height+Ei.uplift});var _=u.selectAll("."+Ei.cn.columnBoundary).data(Ts.repeat,Ts.keyFun);_.enter().append("g").classed(Ei.cn.columnBoundary,!0);var x=u.selectAll("."+Ei.cn.columnBoundaryClippath).data(Ts.repeat,Ts.keyFun);x.enter().append("clipPath").classed(Ei.cn.columnBoundaryClippath,!0),x.attr("id",function(C){return r$e(t,C)});var y=x.selectAll("."+Ei.cn.columnBoundaryRect).data(Ts.repeat,Ts.keyFun);y.enter().append("rect").classed(Ei.cn.columnBoundaryRect,!0).attr("fill","none"),y.attr("width",function(C){return C.columnWidth+2*ID(C)}).attr("height",function(C){return C.calcdata.height+2*ID(C)+Ei.uplift}).attr("x",function(C){return-ID(C)}).attr("y",function(C){return-ID(C)}),tJ(null,v,i)};function ID(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function t$e(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function r$e(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function s$e(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function uS(e,t,r){function n(u){var c=u.rowBlocks;return JK(c,c.length-1)+(c.length?qD(c[c.length-1],1/0):1)}var a=e.selectAll("."+Ei.cn.scrollbarKit).data(Ts.repeat,Ts.keyFun);a.enter().append("g").classed(Ei.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),a.each(function(u){var c=u.scrollbarState;c.totalHeight=n(u),c.scrollableAreaHeight=u.groupHeight-KK(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Ei.goldenRatio*Ei.scrollbarWidth),c.barWiggleRoom=c.currentlyVisibleHeight-c.barLength,c.wiggleRoom=Math.max(0,c.totalHeight-c.scrollableAreaHeight),c.topY=c.barWiggleRoom===0?0:u.scrollY/c.wiggleRoom*c.barWiggleRoom,c.bottomY=c.topY+c.barLength,c.dragMultiplier=c.wiggleRoom/c.barWiggleRoom}).attr("transform",function(u){var c=u.width+Ei.scrollbarWidth/2+Ei.scrollbarOffset;return Bv(c,KK(u))});var i=a.selectAll("."+Ei.cn.scrollbar).data(Ts.repeat,Ts.keyFun);i.enter().append("g").classed(Ei.cn.scrollbar,!0);var o=i.selectAll("."+Ei.cn.scrollbarSlider).data(Ts.repeat,Ts.keyFun);o.enter().append("g").classed(Ei.cn.scrollbarSlider,!0),o.attr("transform",function(u){return Bv(0,u.scrollbarState.topY||0)});var s=o.selectAll("."+Ei.cn.scrollbarGlyph).data(Ts.repeat,Ts.keyFun);s.enter().append("line").classed(Ei.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Ei.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Ei.scrollbarWidth/2),s.attr("y2",function(u){return u.scrollbarState.barLength-Ei.scrollbarWidth/2}).attr("stroke-opacity",function(u){return u.columnDragInProgress||!u.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Ei.scrollbarHideDelay).duration(Ei.scrollbarHideDuration).attr("stroke-opacity",0);var l=i.selectAll("."+Ei.cn.scrollbarCaptureZone).data(Ts.repeat,Ts.keyFun);l.enter().append("line").classed(Ei.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Ei.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(u){var c=_l.event.y,f=this.getBoundingClientRect(),v=u.scrollbarState,g=c-f.top,p=_l.scale.linear().domain([0,v.scrollableAreaHeight]).range([0,v.totalHeight]).clamp(!0);v.topY<=g&&g<=v.bottomY||zD(t,e,null,p(g-v.barLength/2))(u)}).call(_l.behavior.drag().origin(function(u){return _l.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on("drag",zD(t,e)).on("dragend",function(){})),l.attr("y2",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function $K(e,t,r,n){var a=dir(r),i=vir(a);yir(i);var o=pir(i);_ir(o);var s=mir(i),l=gir(s);xir(l),l$e(l,t,n,e),rJ(i)}function dir(e){var t=e.selectAll("."+Ei.cn.columnCells).data(Ts.repeat,Ts.keyFun);return t.enter().append("g").classed(Ei.cn.columnCells,!0),t.exit().remove(),t}function vir(e){var t=e.selectAll("."+Ei.cn.columnCell).data(o$e.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ei.cn.columnCell,!0),t.exit().remove(),t}function pir(e){var t=e.selectAll("."+Ei.cn.cellRect).data(Ts.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Ei.cn.cellRect,!0),t}function gir(e){var t=e.selectAll("."+Ei.cn.cellText).data(Ts.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Ei.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){_l.event.stopPropagation()}),t}function mir(e){var t=e.selectAll("."+Ei.cn.cellTextHolder).data(Ts.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ei.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function yir(e){e.each(function(t,r){var n=t.calcdata.cells.font,a=t.column.specIndex,i={size:hd(n.size,a,r),color:hd(n.color,a,r),family:hd(n.family,a,r),weight:hd(n.weight,a,r),style:hd(n.style,a,r),variant:hd(n.variant,a,r),textcase:hd(n.textcase,a,r),lineposition:hd(n.lineposition,a,r),shadow:hd(n.shadow,a,r)};t.rowNumber=t.key,t.align=hd(t.calcdata.cells.align,a,r),t.cellBorderWidth=hd(t.calcdata.cells.line.width,a,r),t.font=i})}function xir(e){e.each(function(t){ZK.font(_l.select(this),t.font)})}function _ir(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=_l.select(this);e$e.stroke(r,hd(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),e$e.fill(r,hd(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function l$e(e,t,r,n){e.text(function(a){var i=a.column.specIndex,o=a.rowNumber,s=a.value,l=typeof s=="string",u=l&&s.match(/
/i),c=!l||u;a.mayHaveMarkup=l&&s.match(/[<&>]/);var f=bir(s);a.latex=f;var v=f?"":hd(a.calcdata.cells.prefix,i,o)||"",g=f?"":hd(a.calcdata.cells.suffix,i,o)||"",p=f?null:hd(a.calcdata.cells.format,i,o)||null,_=v+(p?lir(p)(a.value):a.value)+g,x;a.wrappingNeeded=!a.wrapped&&!c&&!f&&(x=n$e(_)),a.cellHeightMayIncrease=u||f||a.mayHaveMarkup||(x===void 0?n$e(_):x),a.needsConvertToTspans=a.mayHaveMarkup||a.wrappingNeeded||a.latex;var y;if(a.wrappingNeeded){var C=Ei.wrapSplitCharacter===" "?_.replace(/a&&n.push(i),a+=l}return n}function tJ(e,t,r){var n=s$e(t)[0];if(n!==void 0){var a=n.rowBlocks,i=n.calcdata,o=JK(a,a.length),s=n.calcdata.groupHeight-KK(n),l=i.scrollY=Math.max(0,Math.min(o-s,i.scrollY)),u=Air(a,l,s);u.length===1&&(u[0]===a.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),t.each(function(c,f){c.page=u[f],c.scrollY=l}),t.attr("transform",function(c){var f=JK(c.rowBlocks,c.page)-c.scrollY;return Bv(0,f)}),e&&(a$e(e,r,t,u,n.prevPages,n,0),a$e(e,r,t,u,n.prevPages,n,1),uS(r,e))}}function zD(e,t,r,n){return function(i){var o=i.calcdata?i.calcdata:i,s=t.filter(function(f){return o.key===f.key}),l=r||o.scrollbarState.dragMultiplier,u=o.scrollY;o.scrollY=n===void 0?o.scrollY+l*_l.event.dy:n;var c=s.selectAll("."+Ei.cn.yColumn).selectAll("."+Ei.cn.columnBlock).filter(eJ);return tJ(e,c,s),o.scrollY===u}}function a$e(e,t,r,n,a,i,o){var s=n[o]!==a[o];s&&(clearTimeout(i.currentRepaint[o]),i.currentRepaint[o]=setTimeout(function(){var l=r.filter(function(u,c){return c===o&&n[c]!==a[c]});$K(e,t,l,r),a[o]=n[o]}))}function Mir(e,t,r,n){return function(){var i=_l.select(t.parentNode);i.each(function(o){var s=o.fragments;i.selectAll("tspan.line").each(function(_,x){s[x].width=this.getComputedTextLength()});var l=s[s.length-1].width,u=s.slice(0,-1),c=[],f,v,g=0,p=o.column.columnWidth-2*Ei.cellPad;for(o.value="";u.length;)f=u.shift(),v=f.width+l,g+v>p&&(o.value+=c.join(Ei.wrapSpacer)+Ei.lineBreaker,c=[],g=0),c.push(f.text),g+=v;g&&(o.value+=c.join(Ei.wrapSpacer)),o.wrapped=!0}),i.selectAll("tspan.line").remove(),l$e(i.select("."+Ei.cn.cellText),r,e,n),_l.select(t.parentNode.parentNode).call(rJ)}}function Sir(e,t,r,n,a){return function(){if(!a.settledY){var o=_l.select(t.parentNode),s=QK(a),l=a.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=a.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Ei.cellPad:u,f=Math.max(c,u),v=f-s.rows[l].rowHeight;v&&(s.rows[l].rowHeight=f,e.selectAll("."+Ei.cn.columnCell).call(rJ),tJ(null,e.filter(eJ),0),uS(r,n,!0)),o.attr("transform",function(){var g=this,p=g.parentNode,_=p.getBoundingClientRect(),x=_l.select(g.parentNode).select("."+Ei.cn.cellRect).node().getBoundingClientRect(),y=g.transform.baseVal.consolidate(),C=x.top-_.top+(y?y.matrix.f:Ei.cellPad);return Bv(u$e(a,_l.select(g.parentNode).select("."+Ei.cn.cellTextHolder).node().getBoundingClientRect().width),C)}),a.settledY=!0}}}function u$e(e,t){switch(e.align){case"left":return Ei.cellPad;case"right":return e.column.columnWidth-(t||0)-Ei.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Ei.cellPad}}function rJ(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+qD(s,1/0)},0),n=QK(t),a=qD(n,t.key),i=a+r;return Bv(0,i)}).selectAll("."+Ei.cn.cellRect).attr("height",function(t){return kir(QK(t),t.key).rowHeight})}function JK(e,t){for(var r=0,n=t-1;n>=0;n--)r+=Eir(e[n]);return r}function qD(e,t){for(var r=0,n=0;n{"use strict";var Cir=jf().getModuleCalcData,Lir=nJ(),BD="table";OD.name=BD;OD.plot=function(e){var t=Cir(e.calcdata,BD)[0];t.length&&Lir(e,t)};OD.clean=function(e,t,r,n){var a=n._has&&n._has(BD),i=t._has&&t._has(BD);a&&!i&&n._paperdiv.selectAll(".table").remove()}});var d$e=fe((zMr,h$e)=>{"use strict";h$e.exports={attributes:UK(),supplyDefaults:NZe(),calc:VZe(),plot:nJ(),moduleType:"trace",name:"table",basePlotModule:f$e(),categories:["noOpacity"],meta:{}}});var p$e=fe((qMr,v$e)=>{"use strict";v$e.exports=d$e()});var _$e=fe((BMr,x$e)=>{"use strict";var g$e=Ds(),m$e=tc(),iJ=pf(),Pir=pl().descriptionWithDates,Fir=rl().overrideAll,y$e=Uc().dash,aJ=ta().extendFlat;x$e.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:g$e({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:iJ.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:aJ({},iJ.labelalias,{editType:"calc"}),tickfont:g$e({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:Pir("tick label")},tickformatstops:Fir(iJ.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:m$e.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:aJ({},y$e,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:aJ({},y$e,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:m$e.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}});var UD=fe((OMr,T$e)=>{"use strict";var Dir=Ds(),b$e=_$e(),w$e=tc(),ND=Dir({editType:"calc"}),Rir=Ol().zorder;ND.family.dflt='"Open Sans", verdana, arial, sans-serif';ND.size.dflt=12;ND.color.dflt=w$e.defaultLine;T$e.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:b$e,baxis:b$e,font:ND,color:{valType:"color",dflt:w$e.defaultLine,editType:"plot"},zorder:Rir}});var S$e=fe((NMr,M$e)=>{"use strict";var A$e=Xt().isArray1D;M$e.exports=function(t,r,n){var a=n("x"),i=a&&a.length,o=n("y"),s=o&&o.length;if(!i&&!s)return!1;if(r._cheater=!a,(!i||A$e(a))&&(!s||A$e(o))){var l=i?a.length:1/0;s&&(l=Math.min(l,o.length)),r.a&&r.a.length&&(l=Math.min(l,r.a.length)),r.b&&r.b.length&&(l=Math.min(l,r.b.length)),r._length=l}else r._length=null;return!0}});var C$e=fe((UMr,k$e)=>{"use strict";var Iir=UD(),E$e=ni().addOpacity,zir=bi(),cS=Xt(),qir=F2(),Bir=gm(),Oir=mm(),Nir=dC(),Uir=Hp(),Vir=Yb();k$e.exports=function(t,r,n){var a=n.letter,i=n.font||{},o=Iir[a+"axis"];function s(m,F){return cS.coerce(t,r,o,m,F)}function l(m,F){return cS.coerce2(t,r,o,m,F)}n.name&&(r._name=n.name,r._id=n.name),s("autotypenumbers",n.autotypenumbersDflt);var u=s("type");if(u==="-"&&(n.data&&Gir(r,n.data),r.type==="-"?r.type="linear":u=t.type=r.type),s("smoothing"),s("cheatertype"),s("showticklabels"),s("labelprefix",a+" = "),s("labelsuffix"),s("showtickprefix"),s("showticksuffix"),s("separatethousands"),s("tickformat"),s("exponentformat"),s("minexponent"),s("showexponent"),s("categoryorder"),s("tickmode"),s("tickvals"),s("ticktext"),s("tick0"),s("dtick"),r.tickmode==="array"&&(s("arraytick0"),s("arraydtick")),s("labelpadding"),r._hovertitle=a,u==="date"){var c=zir.getComponentMethod("calendars","handleDefaults");c(t,r,"calendar",n.calendar)}Uir(r,n.fullLayout),r.c2p=cS.identity;var f=s("color",n.dfltColor),v=f===t.color?f:i.color,g=s("title.text");g&&(cS.coerceFont(s,"title.font",i,{overrideDflt:{size:cS.bigFont(i.size),color:v}}),s("title.offset")),s("tickangle");var p=s("autorange",!r.isValidRange(t.range));p&&s("rangemode"),s("range"),r.cleanRange(),s("fixedrange"),qir(t,r,s,u),Oir(t,r,s,u,n),Bir(t,r,s,u,n),Nir(t,r,s,{data:n.data,dataAttr:a});var _=s("gridcolor",E$e(f,.3)),x=l("gridwidth"),y=l("griddash"),C=s("showgrid");C||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var k=l("startlinecolor",f),S=l("startlinewidth",x),L=s("startline",r.showgrid||!!k||!!S);L||(delete r.startlinecolor,delete r.startlinewidth);var w=l("endlinecolor",f),T=l("endlinewidth",x),A=s("endline",r.showgrid||!!w||!!T);return A||(delete r.endlinecolor,delete r.endlinewidth),C?(s("minorgridcount"),s("minorgridwidth",x),s("minorgriddash",y),s("minorgridcolor",E$e(_,.06)),r.minorgridcount||(delete r.minorgridwidth,delete r.minorgriddash,delete r.minorgridcolor)):(delete r.gridcolor,delete r.gridwidth,delete r.griddash),r.showticklabels==="none"&&(delete r.tickfont,delete r.tickangle,delete r.showexponent,delete r.exponentformat,delete r.minexponent,delete r.tickformat,delete r.showticksuffix,delete r.showtickprefix),r.showticksuffix||delete r.ticksuffix,r.showtickprefix||delete r.tickprefix,s("tickmode"),r};function Gir(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),a=n+"calendar",i=e[a];e.type=Vir(t,i,{autotypenumbers:e.autotypenumbers})}}});var P$e=fe((VMr,L$e)=>{"use strict";var Hir=C$e(),jir=So();L$e.exports=function(t,r,n,a,i){var o=a("a");o||(a("da"),a("a0"));var s=a("b");s||(a("db"),a("b0")),Wir(t,r,n,i)};function Wir(e,t,r,n){var a=["aaxis","baxis"];a.forEach(function(i){var o=i.charAt(0),s=e[i]||{},l=jir.newContainer(t,i),u={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:i,data:e[o],calendar:t.calendar,dfltColor:n,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};Hir(s,l,u),l._categories=l._categories||[],!e[i]&&s.type!=="-"&&(e[i]={type:s.type})})}});var R$e=fe((GMr,D$e)=>{"use strict";var F$e=Xt(),Yir=S$e(),Xir=P$e(),Zir=UD(),$ir=tc();D$e.exports=function(t,r,n,a){function i(l,u){return F$e.coerce(t,r,Zir,l,u)}r._clipPathId="clip"+r.uid+"carpet";var o=i("color",$ir.defaultLine);if(F$e.coerceFont(i,"font",a.font),i("carpet"),Xir(t,r,a,i,o),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var s=Yir(t,r,i);s||(r.visible=!1),r._cheater&&i("cheaterslope"),i("zorder")}});var oJ=fe((HMr,I$e)=>{"use strict";var Kir=Xt().isArrayOrTypedArray;I$e.exports=function(t,r,n){var a;for(Kir(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],a=0;a{"use strict";z$e.exports=function(t,r,n){if(t.length===0)return"";var a,i=[],o=n?3:1;for(a=0;a{"use strict";q$e.exports=function(t,r,n,a,i,o){var s=i[0]*t.dpdx(r),l=i[1]*t.dpdy(n),u=1,c=1;if(o){var f=Math.sqrt(i[0]*i[0]+i[1]*i[1]),v=Math.sqrt(o[0]*o[0]+o[1]*o[1]),g=(i[0]*o[0]+i[1]*o[1])/f/v;c=Math.max(0,g)}var p=Math.atan2(l,s)*180/Math.PI;return p<-90?(p+=180,u=-u):p>90&&(p-=180,u=-u),{angle:p,flip:u,p:t.c2p(a,r,n),offsetMultplier:c}}});var W$e=fe((YMr,j$e)=>{"use strict";var jD=xi(),VD=Ji(),GD=oJ(),U$e=sJ(),fS=B$e(),lJ=as(),v0=Xt(),V$e=v0.strRotate,HD=v0.strTranslate,G$e=nc();j$e.exports=function(t,r,n,a){var i=t._context.staticPlot,o=r.xaxis,s=r.yaxis,l=t._fullLayout,u=l._clips;v0.makeTraceGroups(a,n,"trace").each(function(c){var f=jD.select(this),v=c[0],g=v.trace,p=g.aaxis,_=g.baxis,x=v0.ensureSingle(f,"g","minorlayer"),y=v0.ensureSingle(f,"g","majorlayer"),C=v0.ensureSingle(f,"g","boundarylayer"),k=v0.ensureSingle(f,"g","labellayer");f.style("opacity",g.opacity),U5(o,s,y,p,"a",p._gridlines,!0,i),U5(o,s,y,_,"b",_._gridlines,!0,i),U5(o,s,x,p,"a",p._minorgridlines,!0,i),U5(o,s,x,_,"b",_._minorgridlines,!0,i),U5(o,s,C,p,"a-boundary",p._boundarylines,i),U5(o,s,C,_,"b-boundary",_._boundarylines,i);var S=O$e(t,o,s,g,v,k,p._labels,"a-label"),L=O$e(t,o,s,g,v,k,_._labels,"b-label");Qir(t,k,g,v,o,s,S,L),Jir(g,v,u,o,s)})};function Jir(e,t,r,n,a){var i,o,s,l,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var c=v0.ensureSingle(u,"path","carpetboundary"),f=t.clipsegments,v=[];for(l=0;l0?"start":"end","data-notex":1}).call(VD.font,f.font).text(f.text).call(lJ.convertToTspans,e),y=VD.bBox(this);x.attr("transform",HD(g.p[0],g.p[1])+V$e(g.angle)+HD(f.axis.labelpadding*_,y.height*.3)),u=Math.max(u,y.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function Qir(e,t,r,n,a,i,o,s){var l,u,c,f,v=v0.aggNums(Math.min,null,r.a),g=v0.aggNums(Math.max,null,r.a),p=v0.aggNums(Math.min,null,r.b),_=v0.aggNums(Math.max,null,r.b);l=.5*(v+g),u=p,c=r.ab2xy(l,u,!0),f=r.dxyda_rough(l,u),o.angle===void 0&&v0.extendFlat(o,fS(r,a,i,c,r.dxydb_rough(l,u))),N$e(e,t,r,n,c,f,r.aaxis,a,i,o,"a-title"),l=v,u=.5*(p+_),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&v0.extendFlat(s,fS(r,a,i,c,r.dxyda_rough(l,u))),N$e(e,t,r,n,c,f,r.baxis,a,i,s,"b-title")}var H$e=G$e.LINE_SPACING,ear=(1-G$e.MID_SHIFT)/H$e+1;function N$e(e,t,r,n,a,i,o,s,l,u,c){var f=[];o.title.text&&f.push(o.title.text);var v=t.selectAll("text."+c).data(f),g=u.maxExtent;v.enter().append("text").classed(c,!0),v.each(function(){var p=fS(r,s,l,a,i);["start","both"].indexOf(o.showticklabels)===-1&&(g=0);var _=o.title.font.size;g+=_+o.title.offset;var x=u.angle+(u.flip<0?180:0),y=(x-p.angle+450)%360,C=y>90&&y<270,k=jD.select(this);k.text(o.title.text).call(lJ.convertToTspans,e),C&&(g=(-lJ.lineCount(k)+ear)*H$e*_-g),k.attr("transform",HD(p.p[0],p.p[1])+V$e(p.angle)+HD(0,g)).attr("text-anchor","middle").call(VD.font,o.title.font)}),v.exit().remove()}});var X$e=fe((XMr,Y$e)=>{"use strict";var WD=Xt().isArrayOrTypedArray;Y$e.exports=function(e,t,r){var n,a,i,o,s,l,u=[],c=WD(e)?e.length:e,f=WD(t)?t.length:t,v=WD(e)?e:null,g=WD(t)?t:null;v&&(i=(v.length-1)/(v[v.length-1]-v[0])/(c-1)),g&&(o=(g.length-1)/(g[g.length-1]-g[0])/(f-1));var p,_=1/0,x=-1/0;for(a=0;a{"use strict";var Z$e=Xt().isArrayOrTypedArray;K$e.exports=function(e){return $$e(e,0)};function $$e(e,t){if(!Z$e(e)||t>=10)return null;for(var r=1/0,n=-1/0,a=e.length,i=0;i{"use strict";var tar=Yi(),Gy=ta().extendFlat;Q$e.exports=function(t,r,n){var a,i,o,s,l,u,c,f,v,g,p,_,x,y,C=t["_"+r],k=t[r+"axis"],S=k._gridlines=[],L=k._minorgridlines=[],w=k._boundarylines=[],T=t["_"+n],A=t[n+"axis"];k.tickmode==="array"&&(k.tickvals=C.slice());var m=t._xctrl,F=t._yctrl,E=m[0].length,I=m.length,R=t._a.length,B=t._b.length;tar.prepTicks(k),k.tickmode==="array"&&delete k.tickvals;var O=k.smoothing?3:1;function U(q){var V,K,ee,ce,me,ye,ue,J,_e,ne,ae,pe,ie=[],le=[],xe={};if(r==="b")for(K=t.b2j(q),ee=Math.floor(Math.max(0,Math.min(B-2,K))),ce=K-ee,xe.length=B,xe.crossLength=R,xe.xy=function(be){return t.evalxy([],be,K)},xe.dxy=function(be,De){return t.dxydi([],be,ee,De,ce)},V=0;V0&&(_e=t.dxydi([],V-1,ee,0,ce),ie.push(me[0]+_e[0]/3),le.push(me[1]+_e[1]/3),ne=t.dxydi([],V-1,ee,1,ce),ie.push(J[0]-ne[0]/3),le.push(J[1]-ne[1]/3)),ie.push(J[0]),le.push(J[1]),me=J;else for(V=t.a2i(q),ye=Math.floor(Math.max(0,Math.min(R-2,V))),ue=V-ye,xe.length=R,xe.crossLength=B,xe.xy=function(be){return t.evalxy([],V,be)},xe.dxy=function(be,De){return t.dxydj([],ye,be,ue,De)},K=0;K0&&(ae=t.dxydj([],ye,K-1,ue,0),ie.push(me[0]+ae[0]/3),le.push(me[1]+ae[1]/3),pe=t.dxydj([],ye,K-1,ue,1),ie.push(J[0]-pe[0]/3),le.push(J[1]-pe[1]/3)),ie.push(J[0]),le.push(J[1]),me=J;return xe.axisLetter=r,xe.axis=k,xe.crossAxis=A,xe.value=q,xe.constvar=n,xe.index=f,xe.x=ie,xe.y=le,xe.smoothing=A.smoothing,xe}function j(q){var V,K,ee,ce,me,ye=[],ue=[],J={};if(J.length=C.length,J.crossLength=T.length,r==="b")for(ee=Math.max(0,Math.min(B-2,q)),me=Math.min(1,Math.max(0,q-ee)),J.xy=function(_e){return t.evalxy([],_e,q)},J.dxy=function(_e,ne){return t.dxydi([],_e,ee,ne,me)},V=0;VC.length-1)&&S.push(Gy(j(i),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(f=u;fC.length-1)&&!(p<0||p>C.length-1))for(_=C[o],x=C[p],a=0;aC[C.length-1])&&L.push(Gy(U(g),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash})));k.startline&&w.push(Gy(j(0),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&w.push(Gy(j(C.length-1),{color:k.endlinecolor,width:k.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((C[C.length-1]-k.tick0)/k.dtick*(1+s)),Math.ceil((C[0]-k.tick0)/k.dtick/(1+s))].sort(function(q,V){return q-V}),u=l[0],c=l[1],f=u;f<=c;f++)v=k.tick0+k.dtick*f,S.push(Gy(U(v),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(f=u-1;fC[C.length-1])&&L.push(Gy(U(g),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash}));k.startline&&w.push(Gy(U(C[0]),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&w.push(Gy(U(C[C.length-1]),{color:k.endlinecolor,width:k.endlinewidth}))}}});var iKe=fe((KMr,nKe)=>{"use strict";var tKe=Yi(),rKe=ta().extendFlat;nKe.exports=function(t,r){var n,a,i,o,s,l=r._labels=[],u=r._gridlines;for(n=0;n{"use strict";aKe.exports=function(t,r,n,a){var i,o,s,l=[],u=!!n.smoothing,c=!!a.smoothing,f=t[0].length-1,v=t.length-1;for(i=0,o=[],s=[];i<=f;i++)o[i]=t[0][i],s[i]=r[0][i];for(l.push({x:o,y:s,bicubic:u}),i=0,o=[],s=[];i<=v;i++)o[i]=t[i][f],s[i]=r[i][f];for(l.push({x:o,y:s,bicubic:c}),i=f,o=[],s=[];i>=0;i--)o[f-i]=t[v][i],s[f-i]=r[v][i];for(l.push({x:o,y:s,bicubic:u}),i=v,o=[],s=[];i>=0;i--)o[v-i]=t[i][0],s[v-i]=r[i][0];return l.push({x:o,y:s,bicubic:c}),l}});var lKe=fe((QMr,sKe)=>{"use strict";var rar=Xt();sKe.exports=function(t,r,n){var a,i,o,s=[],l=[],u=t[0].length,c=t.length;function f(ee,ce){var me=0,ye,ue=0;return ee>0&&(ye=t[ce][ee-1])!==void 0&&(ue++,me+=ye),ee0&&(ye=t[ce-1][ee])!==void 0&&(ue++,me+=ye),ce0&&i0&&aA);return rar.log("Smoother converged to",m,"after",E,"iterations"),t}});var cKe=fe((eSr,uKe)=>{"use strict";uKe.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var dKe=fe((tSr,hKe)=>{"use strict";var fKe=.5;hKe.exports=function(t,r,n,a){var i=t[0]-r[0],o=t[1]-r[1],s=n[0]-r[0],l=n[1]-r[1],u=Math.pow(i*i+o*o,fKe/2),c=Math.pow(s*s+l*l,fKe/2),f=(c*c*i-u*u*s)*a,v=(c*c*o-u*u*l)*a,g=c*(u+c)*3,p=u*(u+c)*3;return[[r[0]+(g&&f/g),r[1]+(g&&v/g)],[r[0]-(p&&f/p),r[1]-(p&&v/p)]]}});var pKe=fe((rSr,vKe)=>{"use strict";var uJ=dKe(),YD=Xt().ensureArray;function V5(e,t,r){var n=-.5*r[0]+1.5*t[0],a=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*a+e[1])/3]}vKe.exports=function(t,r,n,a,i,o){var s,l,u,c,f,v,g,p,_,x,y=n[0].length,C=n.length,k=i?3*y-2:y,S=o?3*C-2:C;for(t=YD(t,S),r=YD(r,S),u=0;u{"use strict";gKe.exports=function(e,t,r,n,a){var i=t-2,o=r-2;return n&&a?function(s,l,u){s||(s=[]);var c,f,v,g,p,_,x=Math.max(0,Math.min(Math.floor(l),i)),y=Math.max(0,Math.min(Math.floor(u),o)),C=Math.max(0,Math.min(1,l-x)),k=Math.max(0,Math.min(1,u-y));x*=3,y*=3;var S=C*C,L=S*C,w=1-C,T=w*w,A=T*w,m=k*k,F=m*k,E=1-k,I=E*E,R=I*E;for(_=0;_{"use strict";yKe.exports=function(e,t,r){return t&&r?function(n,a,i,o,s){n||(n=[]);var l,u,c,f,v,g;a*=3,i*=3;var p=o*o,_=1-o,x=_*_,y=_*o*2,C=-3*x,k=3*(x-y),S=3*(y-p),L=3*p,w=s*s,T=w*s,A=1-s,m=A*A,F=m*A;for(g=0;g{"use strict";_Ke.exports=function(e,t,r){return t&&r?function(n,a,i,o,s){n||(n=[]);var l,u,c,f,v,g;a*=3,i*=3;var p=o*o,_=p*o,x=1-o,y=x*x,C=y*x,k=s*s,S=1-s,L=S*S,w=S*s*2,T=-3*L,A=3*(L-w),m=3*(w-k),F=3*k;for(g=0;g{"use strict";var wKe=cKe(),TKe=GE().findBin,nar=pKe(),iar=mKe(),aar=xKe(),oar=bKe();AKe.exports=function(t){var r=t._a,n=t._b,a=r.length,i=n.length,o=t.aaxis,s=t.baxis,l=r[0],u=r[a-1],c=n[0],f=n[i-1],v=r[r.length-1]-r[0],g=n[n.length-1]-n[0],p=v*wKe.RELATIVE_CULL_TOLERANCE,_=g*wKe.RELATIVE_CULL_TOLERANCE;l-=p,u+=p,c-=_,f+=_,t.isVisible=function(x,y){return x>l&&xc&&yu||yf},t.setScale=function(){var x=t._x,y=t._y,C=nar(t._xctrl,t._yctrl,x,y,o.smoothing,s.smoothing);t._xctrl=C[0],t._yctrl=C[1],t.evalxy=iar([t._xctrl,t._yctrl],a,i,o.smoothing,s.smoothing),t.dxydi=aar([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=oar([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(x){var y=Math.max(0,Math.floor(x[0]),a-2),C=x[0]-y;return(1-C)*r[y]+C*r[y+1]},t.j2b=function(x){var y=Math.max(0,Math.floor(x[1]),a-2),C=x[1]-y;return(1-C)*n[y]+C*n[y+1]},t.ij2ab=function(x){return[t.i2a(x[0]),t.j2b(x[1])]},t.a2i=function(x){var y=Math.max(0,Math.min(TKe(x,r),a-2)),C=r[y],k=r[y+1];return Math.max(0,Math.min(a-1,y+(x-C)/(k-C)))},t.b2j=function(x){var y=Math.max(0,Math.min(TKe(x,n),i-2)),C=n[y],k=n[y+1];return Math.max(0,Math.min(i-1,y+(x-C)/(k-C)))},t.ab2ij=function(x){return[t.a2i(x[0]),t.b2j(x[1])]},t.i2c=function(x,y){return t.evalxy([],x,y)},t.ab2xy=function(x,y,C){if(!C&&(xr[a-1]|yn[i-1]))return[!1,!1];var k=t.a2i(x),S=t.b2j(y),L=t.evalxy([],k,S);if(C){var w=0,T=0,A=[],m,F,E,I;xr[a-1]?(m=a-2,F=1,w=(x-r[a-1])/(r[a-1]-r[a-2])):(m=Math.max(0,Math.min(a-2,Math.floor(k))),F=k-m),yn[i-1]?(E=i-2,I=1,T=(y-n[i-1])/(n[i-1]-n[i-2])):(E=Math.max(0,Math.min(i-2,Math.floor(S))),I=S-E),w&&(t.dxydi(A,m,E,F,I),L[0]+=A[0]*w,L[1]+=A[1]*w),T&&(t.dxydj(A,m,E,F,I),L[0]+=A[0]*T,L[1]+=A[1]*T)}return L},t.c2p=function(x,y,C){return[y.c2p(x[0]),C.c2p(x[1])]},t.p2x=function(x,y,C){return[y.p2c(x[0]),C.p2c(x[1])]},t.dadi=function(x){var y=Math.max(0,Math.min(r.length-2,x));return r[y+1]-r[y]},t.dbdj=function(x){var y=Math.max(0,Math.min(n.length-2,x));return n[y+1]-n[y]},t.dxyda=function(x,y,C,k){var S=t.dxydi(null,x,y,C,k),L=t.dadi(x,C);return[S[0]/L,S[1]/L]},t.dxydb=function(x,y,C,k){var S=t.dxydj(null,x,y,C,k),L=t.dbdj(y,k);return[S[0]/L,S[1]/L]},t.dxyda_rough=function(x,y,C){var k=v*(C||.1),S=t.ab2xy(x+k,y,!0),L=t.ab2xy(x-k,y,!0);return[(S[0]-L[0])*.5/k,(S[1]-L[1])*.5/k]},t.dxydb_rough=function(x,y,C){var k=g*(C||.1),S=t.ab2xy(x,y+k,!0),L=t.ab2xy(x,y-k,!0);return[(S[0]-L[0])*.5/k,(S[1]-L[1])*.5/k]},t.dpdx=function(x){return x._m},t.dpdy=function(x){return x._m}}});var DKe=fe((sSr,FKe)=>{"use strict";var XD=Yi(),SKe=Xt().isArray1D,sar=X$e(),EKe=J$e(),kKe=eKe(),CKe=iKe(),lar=oKe(),LKe=h7(),PKe=lKe(),uar=c7(),car=MKe();FKe.exports=function(t,r){var n=XD.getFromId(t,r.xaxis),a=XD.getFromId(t,r.yaxis),i=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&SKe(s)&&u.push("x"),l&&SKe(l)&&u.push("y"),u.length&&uar(r,i,o,"a","b",u);var c=r._a=r._a||r.a,f=r._b=r._b||r.b;s=r._x||r.x,l=r._y||r.y;var v={};if(r._cheater){var g=i.cheatertype==="index"?c.length:c,p=o.cheatertype==="index"?f.length:f;s=sar(g,p,r.cheaterslope)}r._x=s=LKe(s),r._y=l=LKe(l),PKe(s,c,f),PKe(l,c,f),car(r),r.setScale();var _=EKe(s),x=EKe(l),y=.5*(_[1]-_[0]),C=.5*(_[1]+_[0]),k=.5*(x[1]-x[0]),S=.5*(x[1]+x[0]),L=1.3;return _=[C-y*L,C+y*L],x=[S-k*L,S+k*L],r._extremes[n._id]=XD.findExtremes(n,_,{padded:!0}),r._extremes[a._id]=XD.findExtremes(a,x,{padded:!0}),kKe(r,"a","b"),kKe(r,"b","a"),CKe(r,i),CKe(r,o),v.clipsegments=lar(r._xctrl,r._yctrl,i,o),v.x=s,v.y=l,v.a=c,v.b=f,[v]}});var IKe=fe((lSr,RKe)=>{"use strict";RKe.exports={attributes:UD(),supplyDefaults:R$e(),plot:W$e(),calc:DKe(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:gu(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var qKe=fe((uSr,zKe)=>{"use strict";zKe.exports=IKe()});var cJ=fe((cSr,UKe)=>{"use strict";var far=n1(),H0=Ol(),har=Ho(),{hovertemplateAttrs:dar,texttemplateAttrs:par,templatefallbackAttrs:BKe}=Oo(),OKe=_s(),Hy=ta().extendFlat,Ov=H0.marker,G5=H0.line,NKe=Ov.line;UKe.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:Hy({},H0.mode,{dflt:"markers"}),text:Hy({},H0.text,{}),texttemplate:par({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:BKe({editType:"plot"}),hovertext:Hy({},H0.hovertext,{}),line:{color:G5.color,width:G5.width,dash:G5.dash,backoff:G5.backoff,shape:Hy({},G5.shape,{values:["linear","spline"]}),smoothing:G5.smoothing,editType:"calc"},connectgaps:H0.connectgaps,fill:Hy({},H0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:far(),marker:Hy({symbol:Ov.symbol,opacity:Ov.opacity,maxdisplayed:Ov.maxdisplayed,angle:Ov.angle,angleref:Ov.angleref,standoff:Ov.standoff,size:Ov.size,sizeref:Ov.sizeref,sizemin:Ov.sizemin,sizemode:Ov.sizemode,line:Hy({width:NKe.width,dash:NKe.dash,editType:"calc"},OKe("marker.line")),gradient:Ov.gradient,editType:"calc"},OKe("marker")),textfont:H0.textfont,textposition:H0.textposition,selected:H0.selected,unselected:H0.unselected,hoverinfo:Hy({},har.hoverinfo,{flags:["a","b","text","name"]}),hoveron:H0.hoveron,hovertemplate:dar(),hovertemplatefallback:BKe(),zorder:H0.zorder}});var jKe=fe((fSr,HKe)=>{"use strict";var VKe=Xt(),gar=r1(),H5=Is(),mar=vv(),yar=lp(),GKe=h3(),xar=up(),_ar=a1(),bar=cJ();HKe.exports=function(t,r,n,a){function i(v,g){return VKe.coerce(t,r,bar,v,g)}i("carpet"),r.xaxis="x",r.yaxis="y";var o=i("a"),s=i("b"),l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,i("text"),i("texttemplate"),i("texttemplatefallback"),i("hovertext");var u=l{"use strict";WKe.exports=function(t,r){var n={},a=r._carpet,i=a.ab2ij([t.a,t.b]),o=Math.floor(i[0]),s=i[0]-o,l=Math.floor(i[1]),u=i[1]-l,c=a.evalxy([],o,l,s,u);return n.yLabel=c[1].toFixed(3),n}});var ZD=fe((dSr,XKe)=>{"use strict";XKe.exports=function(e,t){for(var r=e._fullData.length,n,a=0;a{"use strict";var ZKe=aa(),war=pv(),Tar=o1(),Aar=F0(),Mar=gv().calcMarkerSize,Sar=ZD();$Ke.exports=function(t,r){var n=r._carpetTrace=Sar(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){var a;r.xaxis=n.xaxis,r.yaxis=n.yaxis;var i=r._length,o=new Array(i),s,l,u=!1;for(a=0;a{"use strict";var Ear=y3(),JKe=Yi(),kar=Ji();QKe.exports=function(t,r,n,a){var i,o,s,l=n[0][0].carpet,u=JKe.getFromId(t,l.xaxis||"x"),c=JKe.getFromId(t,l.yaxis||"y"),f={xaxis:u,yaxis:c,plot:r.plot};for(i=0;i{"use strict";var Car=w3(),Lar=Xt().fillText;tJe.exports=function(t,r,n,a){var i=Car(t,r,n,a);if(!i||i[0].index===!1)return;var o=i[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),i}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var v=o.trace,g=v._carpet,p=v._module.formatLabels(f,v);o.yLabel=p.yLabel,delete o.text;var _=[];function x(k,S){var L;k.labelprefix&&k.labelprefix.length>0?L=k.labelprefix.replace(/ = $/,""):L=k._hovertitle,_.push(L+": "+S.toFixed(3)+k.labelsuffix)}if(!v.hovertemplate){var y=f.hi||v.hoverinfo,C=y.split("+");C.indexOf("all")!==-1&&(C=["a","b","text"]),C.indexOf("a")!==-1&&x(g.aaxis,f.a),C.indexOf("b")!==-1&&x(g.baxis,f.b),_.push("y: "+o.yLabel),C.indexOf("text")!==-1&&Lar(f,v,_),o.extraText=_.join("
")}return i}});var iJe=fe((mSr,nJe)=>{"use strict";nJe.exports=function(t,r,n,a,i){var o=a[i];return t.a=o.a,t.b=o.b,t.y=o.y,t}});var oJe=fe((ySr,aJe)=>{"use strict";aJe.exports={attributes:cJ(),supplyDefaults:jKe(),colorbar:Zf(),formatLabels:YKe(),calc:KKe(),plot:eJe(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:rJe(),selectPoints:ax(),eventData:iJe(),moduleType:"trace",name:"scattercarpet",basePlotModule:gu(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var lJe=fe((xSr,sJe)=>{"use strict";sJe.exports=oJe()});var fJ=fe((_Sr,uJe)=>{"use strict";var Nv=N3(),Ng=UA(),Par=_s(),Far=ta().extendFlat,z1=Ng.contours;uJe.exports=Far({carpet:{valType:"string",editType:"calc"},z:Nv.z,a:Nv.x,a0:Nv.x0,da:Nv.dx,b:Nv.y,b0:Nv.y0,db:Nv.dy,text:Nv.text,hovertext:Nv.hovertext,transpose:Nv.transpose,atype:Nv.xtype,btype:Nv.ytype,fillcolor:Ng.fillcolor,autocontour:Ng.autocontour,ncontours:Ng.ncontours,contours:{type:z1.type,start:z1.start,end:z1.end,size:z1.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:z1.showlines,showlabels:z1.showlabels,labelfont:z1.labelfont,labelformat:z1.labelformat,operation:z1.operation,value:z1.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:Ng.line.color,width:Ng.line.width,dash:Ng.line.dash,smoothing:Ng.line.smoothing,editType:"plot"},zorder:Ng.zorder},Par("",{cLetter:"z",autoColorDflt:!1}))});var hJ=fe((bSr,hJe)=>{"use strict";var cJe=Xt(),Dar=s7(),fJe=fJ(),Rar=EG(),Iar=P7(),zar=F7();hJe.exports=function(t,r,n,a){function i(u,c){return cJe.coerce(t,r,fJe,u,c)}function o(u){return cJe.coerce2(t,r,fJe,u)}if(i("carpet"),t.a&&t.b){var s=Dar(t,r,i,a,"a","b");if(!s){r.visible=!1;return}i("text");var l=i("contours.type")==="constraint";l?Rar(t,r,i,a,n,{hasHover:!1}):(Iar(t,r,i,o),zar(t,r,i,a,{hasHover:!1}))}else r._defaultColor=n,r._length=null;i("zorder")}});var gJe=fe((wSr,pJe)=>{"use strict";var qar=Mh(),dJe=Xt(),Bar=c7(),Oar=h7(),Nar=d7(),Uar=v7(),vJe=$V(),Var=hJ(),Gar=ZD(),Har=pG();pJe.exports=function(t,r){var n=r._carpetTrace=Gar(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){if(!r.a||!r.b){var a=t.data[n.index],i=t.data[r.index];i.a||(i.a=a.a),i.b||(i.b=a.b),Var(i,r,r._defaultColor,t._fullLayout)}var o=jar(t,r);return Har(r,r._z),o}};function jar(e,t){var r=t._carpetTrace,n=r.aaxis,a=r.baxis,i,o,s,l,u,c,f;n._minDtick=0,a._minDtick=0,dJe.isArray1D(t.z)&&Bar(t,n,a,"a","b",["z"]),i=t._a=t._a||t.a,l=t._b=t._b||t.b,i=i?n.makeCalcdata(t,"_a"):[],l=l?a.makeCalcdata(t,"_b"):[],o=t.a0||0,s=t.da||1,u=t.b0||0,c=t.db||1,f=t._z=Oar(t._z||t.z,t.transpose),t._emptypoints=Uar(f),Nar(f,t._emptypoints);var v=dJe.maxRowLength(f),g=t.xtype==="scaled"?"":i,p=vJe(t,g,o,s,v,n),_=t.ytype==="scaled"?"":l,x=vJe(t,_,u,c,f.length,a),y={a:p,b:x,z:f};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&qar(e,t,{vals:f,containerStr:"",cLetter:"z"}),[y]}});var yJe=fe((TSr,mJe)=>{"use strict";var War=Xt().isArrayOrTypedArray;mJe.exports=function(e,t,r,n){var a,i,o,s,l,u,c,f,v,g,p,_,x,y=War(r)?"a":"b",C=y==="a"?e.aaxis:e.baxis,k=C.smoothing,S=y==="a"?e.a2i:e.b2j,L=y==="a"?r:n,w=y==="a"?n:r,T=y==="a"?t.a.length:t.b.length,A=y==="a"?t.b.length:t.a.length,m=Math.floor(y==="a"?e.b2j(w):e.a2i(w)),F=y==="a"?function(ce){return e.evalxy([],ce,m)}:function(ce){return e.evalxy([],m,ce)};k&&(o=Math.max(0,Math.min(A-2,m)),s=m-o,i=y==="a"?function(ce,me){return e.dxydi([],ce,o,me,s)}:function(ce,me){return e.dxydj([],o,ce,s,me)});var E=S(L[0]),I=S(L[1]),R=E0?Math.floor:Math.ceil,U=R>0?Math.ceil:Math.floor,j=R>0?Math.min:Math.max,q=R>0?Math.max:Math.min,V=O(E+B),K=U(I-B);c=F(E);var ee=[[c]];for(a=V;a*R{"use strict";var KD=xi(),JD=oJ(),TJe=sJ(),hS=Ji(),Ug=Xt(),Yar=mG(),Xar=yG(),M_=I7(),$D=GA(),Zar=wG(),$ar=bG(),Kar=TG(),Jar=ZD(),xJe=yJe();AJe.exports=function(t,r,n,a){var i=r.xaxis,o=r.yaxis;Ug.makeTraceGroups(a,n,"contour").each(function(s){var l=KD.select(this),u=s[0],c=u.trace,f=c._carpetTrace=Jar(t,c),v=t.calcdata[f.index][0];if(!f.visible||f.visible==="legendonly")return;var g=u.a,p=u.b,_=c.contours,x=$ar(_,r,u),y=_.type==="constraint",C=_._operation,k=y?C==="="?"lines":"fill":_.coloring;function S(O){var U=f.ab2xy(O[0],O[1],!0);return[i.c2p(U[0]),o.c2p(U[1])]}var L=[[g[0],p[p.length-1]],[g[g.length-1],p[p.length-1]],[g[g.length-1],p[0]],[g[0],p[0]]];Yar(x);var w=(g[g.length-1]-g[0])*1e-8,T=(p[p.length-1]-p[0])*1e-8;Xar(x,w,T);var A=x;_.type==="constraint"&&(A=Zar(x,C)),Qar(x,S);var m,F,E,I,R=[];for(I=v.clipsegments.length-1;I>=0;I--)m=v.clipsegments[I],F=JD([],m.x,i.c2p),E=JD([],m.y,o.c2p),F.reverse(),E.reverse(),R.push(TJe(F,E,m.bicubic));var B="M"+R.join("L")+"Z";ror(l,v.clipsegments,i,o,y,k),nor(c,l,i,o,A,L,S,f,v,k,B),eor(l,x,t,u,_,r,f),hS.setClipUrl(l,f._clipPathId,t)})};function Qar(e,t){var r,n,a,i,o,s,l,u,c;for(r=0;rx&&(n.max=x),n.len=n.max-n.min}function _Je(e,t,r){var n=e.getPointAtLength(t),a=e.getPointAtLength(r),i=a.x-n.x,o=a.y-n.y,s=Math.sqrt(i*i+o*o);return[i/s,o/s]}function bJe(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function wJe(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function ror(e,t,r,n,a,i){var o,s,l,u,c=Ug.ensureSingle(e,"g","contourbg"),f=c.selectAll("path").data(i==="fill"&&!a?[0]:[]);f.enter().append("path"),f.exit().remove();var v=[];for(u=0;u=0&&(g=F,_=x):Math.abs(v[1]-g[1])=0&&(g=F,_=x):Ug.log("endpt to newendpt is not vert. or horz.",v,g,F)}if(_>=0)break;u+=A(v,g),v=g}if(_===t.edgepaths.length){Ug.log("unclosed perimeter path");break}l=_,f=c.indexOf(l)===-1,f&&(l=c[0],u+=A(v,g)+"Z",v=null)}for(l=0;l{"use strict";SJe.exports={attributes:fJ(),supplyDefaults:hJ(),colorbar:B7(),calc:gJe(),plot:MJe(),style:q7(),moduleType:"trace",name:"contourcarpet",basePlotModule:gu(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var CJe=fe((SSr,kJe)=>{"use strict";kJe.exports=EJe()});var eR=fe((ESr,RJe)=>{"use strict";var QD=Xt().extendFlat,dS=Ol(),LJe=pl().axisHoverFormat,{hovertemplateAttrs:aor,templatefallbackAttrs:oor}=Oo(),FJe=Uc().dash,sor=hb(),DJe=rw(),lor=DJe.INCREASING.COLOR,uor=DJe.DECREASING.COLOR,dJ=dS.line;function PJe(e){return{line:{color:QD({},dJ.color,{dflt:e}),width:dJ.width,dash:FJe,editType:"style"},editType:"style"}}RJe.exports={xperiod:dS.xperiod,xperiod0:dS.xperiod0,xperiodalignment:dS.xperiodalignment,xhoverformat:LJe("x"),yhoverformat:LJe("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:QD({},dJ.width,{}),dash:QD({},FJe,{}),editType:"style"},increasing:PJe(lor),decreasing:PJe(uor),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:aor({},{keys:["open","high","low","close"]}),hovertemplatefallback:oor(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:QD({},sor.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:dS.zorder}});var vJ=fe((kSr,IJe)=>{"use strict";var cor=bi(),hor=Xt();IJe.exports=function(t,r,n,a){var i=n("x"),o=n("open"),s=n("high"),l=n("low"),u=n("close");n("hoverlabel.split");var c=cor.getComponentMethod("calendars","handleTraceDefaults");if(c(t,r,["x"],a),!!(o&&s&&l&&u)){var f=Math.min(o.length,s.length,l.length,u.length);return i&&(f=Math.min(f,hor.minRowLength(i))),r._length=f,f}}});var BJe=fe((CSr,qJe)=>{"use strict";var dor=Xt(),vor=vJ(),por=sp(),gor=eR();qJe.exports=function(t,r,n,a){function i(s,l){return dor.coerce(t,r,gor,s,l)}var o=vor(t,r,i,a);if(!o){r.visible=!1;return}por(t,r,a,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),i("line.dash"),zJe(t,r,i,"increasing"),zJe(t,r,i,"decreasing"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("tickwidth"),a._requestRangeslider[r.xaxis]=!0,i("zorder")};function zJe(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}});var pJ=fe((LSr,NJe)=>{"use strict";var j5=Xt(),tR=j5._,rR=Yi(),mor=cp(),vS=Wa().BADNUM;function yor(e,t){var r=rR.getFromId(e,t.xaxis),n=rR.getFromId(e,t.yaxis),a=_or(e,r,t),i=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var l=OJe(e,t,o,s,n,xor);return t._extremes[r._id]=rR.findExtremes(r,s,{vpad:i/2}),l.length?(j5.extendFlat(l[0].t,{wHover:i/2,tickLen:a}),l):[{t:{empty:!0}}]}function xor(e,t,r,n){return{o:e,h:t,l:r,c:n}}function OJe(e,t,r,n,a,i){for(var o=a.makeCalcdata(t,"open"),s=a.makeCalcdata(t,"high"),l=a.makeCalcdata(t,"low"),u=a.makeCalcdata(t,"close"),c=j5.isArrayOrTypedArray(t.text),f=j5.isArrayOrTypedArray(t.hovertext),v=!0,g=null,p=!!t.xperiodalignment,_=[],x=0;xg):v=L>C,g=L;var w=i(C,k,S,L);w.pos=y,w.yc=(C+L)/2,w.i=x,w.dir=v?"increasing":"decreasing",w.x=w.pos,w.y=[S,k],p&&(w.orig_p=r[x]),c&&(w.tx=t.text[x]),f&&(w.htx=t.hovertext[x]),_.push(w)}else _.push({pos:y,empty:!0})}return t._extremes[a._id]=rR.findExtremes(a,j5.concat(l,s),{padded:!0}),_.length&&(_[0].t={labels:{open:tR(e,"open:")+" ",high:tR(e,"high:")+" ",low:tR(e,"low:")+" ",close:tR(e,"close:")+" "}}),_}function _or(e,t,r){var n=r._minDiff;if(!n){var a=e._fullData,i=[];n=1/0;var o;for(o=0;o{"use strict";var bor=xi(),UJe=Xt();VJe.exports=function(t,r,n,a){var i=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;UJe.makeTraceGroups(a,n,"trace ohlc").each(function(l){var u=bor.select(this),c=l[0],f=c.t,v=c.trace;if(v.visible!==!0||f.empty){u.remove();return}var g=f.tickLen,p=u.selectAll("path").data(UJe.identity);p.enter().append("path"),p.exit().remove(),p.attr("d",function(_){if(_.empty)return"M0,0Z";var x=o.c2p(_.pos-g,!0),y=o.c2p(_.pos+g,!0),C=s?(x+y)/2:o.c2p(_.pos,!0),k=i.c2p(_.o,!0),S=i.c2p(_.h,!0),L=i.c2p(_.l,!0),w=i.c2p(_.c,!0);return"M"+x+","+k+"H"+C+"M"+C+","+S+"V"+L+"M"+y+","+w+"H"+C})})}});var jJe=fe((FSr,HJe)=>{"use strict";var gJ=xi(),wor=Ji(),Tor=ni();HJe.exports=function(t,r,n){var a=n||gJ.select(t).selectAll("g.ohlclayer").selectAll("g.trace");a.style("opacity",function(i){return i[0].trace.opacity}),a.each(function(i){var o=i[0].trace;gJ.select(this).selectAll("path").each(function(s){if(!s.empty){var l=o[s.dir].line;gJ.select(this).style("fill","none").call(Tor.stroke,l.color).call(wor.dashLine,l.dash,l.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var yJ=fe((DSr,$Je)=>{"use strict";var mJ=Yi(),Aor=Xt(),nR=kl(),Mor=ni(),Sor=Xt().fillText,WJe=rw(),Eor={increasing:WJe.INCREASING.SYMBOL,decreasing:WJe.DECREASING.SYMBOL};function kor(e,t,r,n){var a=e.cd,i=a[0].trace;return i.hoverlabel.split?XJe(e,t,r,n):ZJe(e,t,r,n)}function YJe(e,t,r,n){var a=e.cd,i=e.xa,o=a[0].trace,s=a[0].t,l=o.type,u=l==="ohlc"?"l":"min",c=l==="ohlc"?"h":"max",f,v,g=s.bPos||0,p=function(F){return F.pos+g-t},_=s.bdPos||s.tickLen,x=s.wHover,y=Math.min(1,_/Math.abs(i.r2c(i.range[1])-i.r2c(i.range[0])));f=e.maxHoverDistance-y,v=e.maxSpikeDistance-y;function C(F){var E=p(F);return nR.inbox(E-x,E+x,f)}function k(F){var E=F[u],I=F[c];return E===I||nR.inbox(E-r,I-r,f)}function S(F){return(C(F)+k(F))/2}var L=nR.getDistanceFunction(n,C,k,S);if(nR.getClosest(a,L,e),e.index===!1)return null;var w=a[e.index];if(w.empty)return null;var T=w.dir,A=o[T],m=A.line.color;return Mor.opacity(m)&&A.line.width?e.color=m:e.color=A.fillcolor,e.x0=i.c2p(w.pos+g-_,!0),e.x1=i.c2p(w.pos+g+_,!0),e.xLabelVal=w.orig_p!==void 0?w.orig_p:w.pos,e.spikeDistance=S(w)*v/f,e.xSpike=i.c2p(w.pos,!0),e}function XJe(e,t,r,n){var a=e.cd,i=e.ya,o=a[0].trace,s=a[0].t,l=[],u=YJe(e,t,r,n);if(!u)return[];var c=a[u.index],f=c.hi||o.hoverinfo||"";if(f==="none"||f==="skip")return[];for(var v=["high","open","close","low"],g={},p=0;p"+s.labels[_]+mJ.hoverLabelText(i,x,o.yhoverformat)):(C=Aor.extendFlat({},u),C.y0=C.y1=y,C.yLabelVal=x,C.yLabel=s.labels[_]+mJ.hoverLabelText(i,x,o.yhoverformat),C.name="",l.push(C),g[x]=C)}return l}function ZJe(e,t,r,n){var a=e.cd,i=e.ya,o=a[0].trace,s=a[0].t,l=YJe(e,t,r,n);if(!l)return[];var u=l.index,c=a[u],f=l.index=c.i,v=c.dir;function g(S){return s.labels[S]+mJ.hoverLabelText(i,o[S][f],o.yhoverformat)}var p=c.hi||o.hoverinfo||"",_=p.split("+"),x=p==="all",y=x||_.indexOf("y")!==-1,C=x||_.indexOf("text")!==-1,k=y?[g("open"),g("high"),g("low"),g("close")+" "+Eor[v]]:[];return C&&Sor(c,o,k),l.extraText=k.join("
"),l.y0=l.y1=i.c2p(c.yc,!0),[l]}$Je.exports={hoverPoints:kor,hoverSplit:XJe,hoverOnPoints:ZJe}});var xJ=fe((RSr,KJe)=>{"use strict";KJe.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s,l=n[0].t.bPos||0;if(r===!1)for(s=0;s{"use strict";JJe.exports={moduleType:"trace",name:"ohlc",basePlotModule:gu(),categories:["cartesian","svg","showLegend"],meta:{},attributes:eR(),supplyDefaults:BJe(),calc:pJ().calc,plot:GJe(),style:jJe(),hoverPoints:yJ().hoverPoints,selectPoints:xJ()}});var tQe=fe((zSr,eQe)=>{"use strict";eQe.exports=QJe()});var bJ=fe((qSr,iQe)=>{"use strict";var _J=Xt().extendFlat,rQe=pl().axisHoverFormat,zd=eR(),W5=FA();function nQe(e){return{line:{color:_J({},W5.line.color,{dflt:e}),width:W5.line.width,editType:"style"},fillcolor:W5.fillcolor,editType:"style"}}iQe.exports={xperiod:zd.xperiod,xperiod0:zd.xperiod0,xperiodalignment:zd.xperiodalignment,xhoverformat:rQe("x"),yhoverformat:rQe("y"),x:zd.x,open:zd.open,high:zd.high,low:zd.low,close:zd.close,line:{width:_J({},W5.line.width,{}),editType:"style"},increasing:nQe(zd.increasing.line.color.dflt),decreasing:nQe(zd.decreasing.line.color.dflt),text:zd.text,hovertext:zd.hovertext,hovertemplate:zd.hovertemplate,hovertemplatefallback:zd.hovertemplatefallback,whiskerwidth:_J({},W5.whiskerwidth,{dflt:0}),hoverlabel:zd.hoverlabel,zorder:W5.zorder}});var sQe=fe((BSr,oQe)=>{"use strict";var Cor=Xt(),Lor=ni(),Por=vJ(),For=sp(),Dor=bJ();oQe.exports=function(t,r,n,a){function i(s,l){return Cor.coerce(t,r,Dor,s,l)}var o=Por(t,r,i,a);if(!o){r.visible=!1;return}For(t,r,a,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),aQe(t,r,i,"increasing"),aQe(t,r,i,"decreasing"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("whiskerwidth"),a._requestRangeslider[r.xaxis]=!0,i("zorder")};function aQe(e,t,r,n){var a=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",Lor.addOpacity(a,.5))}});var fQe=fe((OSr,cQe)=>{"use strict";var lQe=Xt(),uQe=Yi(),Ror=cp(),Ior=pJ().calcCommon;cQe.exports=function(e,t){var r=e._fullLayout,n=uQe.getFromId(e,t.xaxis),a=uQe.getFromId(e,t.yaxis),i=n.makeCalcdata(t,"x"),o=Ror(t,n,"x",i).vals,s=Ior(e,t,i,o,a,zor);return s.length?(lQe.extendFlat(s[0].t,{num:r._numBoxes,dPos:lQe.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function zor(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var dQe=fe((NSr,hQe)=>{"use strict";hQe.exports={moduleType:"trace",name:"candlestick",basePlotModule:gu(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:bJ(),layoutAttributes:DA(),supplyLayoutDefaults:t7().supplyLayoutDefaults,crossTraceCalc:n7().crossTraceCalc,supplyDefaults:sQe(),calc:fQe(),plot:i7().plot,layerName:"boxlayer",style:a7().style,hoverPoints:yJ().hoverPoints,selectPoints:xJ()}});var pQe=fe((USr,vQe)=>{"use strict";vQe.exports=dQe()});var TJ=fe((VSr,gQe)=>{"use strict";var aR=Xt(),qor=Hp(),iR=aR.deg2rad,wJ=aR.rad2deg;gQe.exports=function(t,r,n){switch(qor(t,n),t._id){case"x":case"radialaxis":Bor(t,r);break;case"angularaxis":Uor(t,r);break}};function Bor(e,t){var r=t._subplot;e.setGeometry=function(){var n=e._rl[0],a=e._rl[1],i=r.innerRadius,o=(r.radius-i)/(a-n),s=i/o,l=n>a?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var c=e.c2l(u)-n;return(l(c)?c:0)+s},e.g2c=function(u){return e.l2c(u+n-s)},e.g2p=function(u){return u*o},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function Oor(e,t){return t==="degrees"?iR(e):e}function Nor(e,t){return t==="degrees"?wJ(e):e}function Uor(e,t){var r=e.type;if(r==="linear"){var n=e.d2c,a=e.c2d;e.d2c=function(i,o){return Oor(n(i),o)},e.c2d=function(i,o){return a(Nor(i,o))}}e.makeCalcdata=function(i,o){var s=i[o],l=i._length,u,c,f=function(x){return e.d2c(x,i.thetaunit)};if(s)for(u=new Array(l),c=0;c{"use strict";mQe.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}});var lR=fe((HSr,wQe)=>{"use strict";var S_=Xt(),yQe=UT().tester,AJ=S_.findIndexOfMin,_Qe=S_.isAngleInsideSector,Vor=S_.angleDelta,xQe=S_.angleDist;function Gor(e,t,r,n,a){if(!_Qe(t,n))return!1;var i,o;r[0]0?o:1/0},n=AJ(t,r),a=S_.mod(n+1,t.length);return[t[n],t[a]]}function sR(e){return Math.abs(e)>1e-10?e:0}function MJ(e,t,r){t=t||0,r=r||0;for(var n=e.length,a=new Array(n),i=0;i{"use strict";function TQe(e){return e<0?-1:e>0?1:0}function X5(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function Z5(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function AQe(e,t){return t*e.radius}function Kor(e,t,r,n){var a=Z5(e,X5([r,t])),i=a[0],o=a[1],s=Z5(e,X5([n,t])),l=s[0],u=s[1];if(t===0)return["M"+i+","+o,"L"+l+","+u].join(" ");var c=AQe(e,1/Math.abs(t));return["M"+i+","+o,"A"+c+","+c+" 0 0,"+(t<0?1:0)+" "+l+","+u].join(" ")}function Jor(e,t,r,n){var a=AQe(e,1/(t+1)),i=Z5(e,X5([t,r])),o=i[0],s=i[1],l=Z5(e,X5([t,n])),u=l[0],c=l[1];if(TQe(r)!==TQe(n)){var f=Z5(e,X5([t,0])),v=f[0],g=f[1];return["M"+o+","+s,"A"+a+","+a+" 0 0,"+(0{"use strict";var E_=xi(),C_=bi(),ol=Xt(),q1=ol.strRotate,$c=ol.strTranslate,hR=ni(),pS=Ji(),Qor=Hs(),qd=Yi(),esr=Hp(),tsr=TJ(),rsr=rp().doAutoRange,Vg=NN(),fR=ed(),SQe=kl(),nsr=q2(),isr=Ac().prepSelect,asr=Ac().selectOnClick,EJ=Ac().clearOutline,EQe=np(),kQe=ET(),CQe=IT().redrawReglTraces,osr=nc().MID_SHIFT,jy=oR(),Gg=lR(),dR=SJ(),uR=dR.smith,ssr=dR.reactanceArc,lsr=dR.resistanceArc,cR=dR.smithTransform,usr=ol._,LQe=ol.mod,Wy=ol.deg2rad,k_=ol.rad2deg;function PQe(e,t,r){this.isSmith=r||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=e._fullLayout,a="clip"+n._uid+t;this.clipIds.forTraces=a+"-for-traces",this.clipPaths.forTraces=n._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=n["_"+(r?"smith":"polar")+"layer"].append("g").attr("class",t),this.getHole=function(i){return this.isSmith?0:i.hole},this.getSector=function(i){return this.isSmith?[0,360]:i.sector},this.getRadial=function(i){return this.isSmith?i.realaxis:i.radialaxis},this.getAngular=function(i){return this.isSmith?i.imaginaryaxis:i.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var wf=PQe.prototype;RQe.exports=function(t,r,n){return new PQe(t,r,n)};wf.plot=function(e,t){for(var r=this,n=t[r.id],a=!1,i=0;ix?(y=u,C=u*x,L=(c-C)/a.h/2,k=[s[0],s[1]],S=[l[0]+L,l[1]-L]):(y=c/x,C=c,L=(u-y)/a.w/2,k=[s[0]+L,s[1]-L],S=[l[0],l[1]]),r.xLength2=y,r.yLength2=C,r.xDomain2=k,r.yDomain2=S;var w=r.xOffset2=a.l+a.w*k[0],T=r.yOffset2=a.t+a.h*(1-S[1]),A=r.radius=y/g,m=r.innerRadius=r.getHole(t)*A,F=r.cx=w-A*v[0],E=r.cy=T+A*v[3],I=r.cxx=F-w,R=r.cyy=E-T,B=i.side,O;B==="counterclockwise"?(O=B,B="top"):B==="clockwise"&&(O=B,B="bottom"),r.radialAxis=r.mockAxis(e,t,i,{_id:"x",side:B,_trueSide:O,domain:[m/a.w,A/a.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:k}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:S});var U=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",U).attr("transform",$c(I,R)),n.frontplot.attr("transform",$c(w,T)).call(pS.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",U).attr("transform",$c(F,E)).call(hR.fill,t.bgcolor)};wf.mockAxis=function(e,t,r,n){var a=ol.extendFlat({},r,n);return tsr(a,t,e),a};wf.mockCartesianAxis=function(e,t,r){var n=this,a=n.isSmith,i=r._id,o=ol.extendFlat({type:"linear"},r);esr(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var l=n.sectorBBox,u=s[i],c=n.radialAxis._rl,f=(c[1]-c[0])/(1-n.getHole(t));o.range=[l[u[0]]*f,l[u[1]]*f]},o.isPtWithinRange=i==="x"&&!a?function(l){return n.isPtInside(l)}:function(){return!0},o.setRange(),o.setScale(),o};wf.doAutoRange=function(e,t){var r=this,n=r.gd,a=r.radialAxis,i=r.getRadial(t);rsr(n,a);var o=a.range;if(i.range=o.slice(),i._input.range=o.slice(),a._rl=[a.r2l(o[0],null,"gregorian"),a.r2l(o[1],null,"gregorian")],a.minallowed!==void 0){var s=a.r2l(a.minallowed);a._rl[0]>a._rl[1]?a._rl[1]=Math.max(a._rl[1],s):a._rl[0]=Math.max(a._rl[0],s)}if(a.maxallowed!==void 0){var l=a.r2l(a.maxallowed);a._rl[0]90&&c<=270&&(f.tickangle=180);var p=g?function(A){var m=cR(r,uR([A.x,0]));return $c(m[0]-s,m[1]-l)}:function(A){return $c(f.l2p(A.x)+o,0)},_=g?function(A){return lsr(r,A.x,-1/0,1/0)}:function(A){return r.pathArc(f.r2p(A.x)+o)},x=FQe(u);if(r.radialTickLayout!==x&&(a["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=x),v){f.setScale();var y=0,C=g?(f.tickvals||[]).filter(function(A){return A>=0}).map(function(A){return qd.tickText(f,A,!0,!1)}):qd.calcTicks(f),k=g?C:qd.clipEnds(f,C),S=qd.getTickSigns(f)[2];g&&((f.ticks==="top"&&f.side==="bottom"||f.ticks==="bottom"&&f.side==="top")&&(S=-S),f.ticks==="top"&&f.side==="top"&&(y=-f.ticklen),f.ticks==="bottom"&&f.side==="bottom"&&(y=f.ticklen)),qd.drawTicks(n,f,{vals:C,layer:a["radial-axis"],path:qd.makeTickPath(f,0,S),transFn:p,crisp:!1}),qd.drawGrid(n,f,{vals:k,layer:a["radial-grid"],path:_,transFn:ol.noop,crisp:!1}),qd.drawLabels(n,f,{vals:C,layer:a["radial-axis"],transFn:p,labelFns:qd.makeLabelFns(f,y)})}var L=r.radialAxisAngle=r.vangles?k_(DQe(Wy(u.angle),r.vangles)):u.angle,w=$c(s,l),T=w+q1(-L);gS(a["radial-axis"],v&&(u.showticklabels||u.ticks),{transform:T}),gS(a["radial-grid"],v&&u.showgrid,{transform:g?"":w}),gS(a["radial-line"].select("line"),v&&u.showline,{x1:g?-i:o,y1:0,x2:i,y2:0,transform:T}).attr("stroke-width",u.linewidth).call(hR.stroke,u.linecolor)};wf.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,a=n.gd,i=n.radius,o=n.cx,s=n.cy,l=n.getRadial(t),u=n.id+"title",c=0;if(l.title){var f=pS.bBox(n.layers["radial-axis"].node()).height,v=l.title.font.size,g=l.side;c=g==="top"?v:g==="counterclockwise"?-(f+v*.4):f+v*.8}var p=r!==void 0?r:n.radialAxisAngle,_=Wy(p),x=Math.cos(_),y=Math.sin(_),C=o+i/2*x+c*y,k=s-i/2*y+c*x;n.layers["radial-axis-title"]=nsr.draw(a,u,{propContainer:l,propName:n.id+".radialaxis.title.text",placeholder:usr(a,"Click to enter radial axis title"),attributes:{x:C,y:k,"text-anchor":"middle"},transform:{rotate:-p}})}};wf.updateAngularAxis=function(e,t){var r=this,n=r.gd,a=r.layers,i=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getAngular(t),c=r.angularAxis,f=r.isSmith;f||(r.fillViewInitialKey("angularaxis.rotation",u.rotation),c.setGeometry(),c.setScale());var v=f?function(m){var F=cR(r,uR([0,m.x]));return Math.atan2(F[0]-s,F[1]-l)-Math.PI/2}:function(m){return c.t2g(m.x)};c.type==="linear"&&c.thetaunit==="radians"&&(c.tick0=k_(c.tick0),c.dtick=k_(c.dtick));var g=function(m){return $c(s+i*Math.cos(m),l-i*Math.sin(m))},p=f?function(m){var F=cR(r,uR([0,m.x]));return $c(F[0],F[1])}:function(m){return g(v(m))},_=f?function(m){var F=cR(r,uR([0,m.x])),E=Math.atan2(F[0]-s,F[1]-l)-Math.PI/2;return $c(F[0],F[1])+q1(-k_(E))}:function(m){var F=v(m);return g(F)+q1(-k_(F))},x=f?function(m){return ssr(r,m.x,0,1/0)}:function(m){var F=v(m),E=Math.cos(F),I=Math.sin(F);return"M"+[s+o*E,l-o*I]+"L"+[s+i*E,l-i*I]},y=qd.makeLabelFns(c,0),C=y.labelStandoff,k={};k.xFn=function(m){var F=v(m);return Math.cos(F)*C},k.yFn=function(m){var F=v(m),E=Math.sin(F)>0?.2:1;return-Math.sin(F)*(C+m.fontSize*E)+Math.abs(Math.cos(F))*(m.fontSize*osr)},k.anchorFn=function(m){var F=v(m),E=Math.cos(F);return Math.abs(E)<.1?"middle":E>0?"start":"end"},k.heightFn=function(m,F,E){var I=v(m);return-.5*(1+Math.sin(I))*E};var S=FQe(u);r.angularTickLayout!==S&&(a["angular-axis"].selectAll("."+c._id+"tick").remove(),r.angularTickLayout=S);var L=f?[1/0].concat(c.tickvals||[]).map(function(m){return qd.tickText(c,m,!0,!1)}):qd.calcTicks(c);f&&(L[0].text="\u221E",L[0].fontSize*=1.75);var w;if(t.gridshape==="linear"?(w=L.map(v),ol.angleDelta(w[0],w[1])<0&&(w=w.slice().reverse())):w=null,r.vangles=w,c.type==="category"&&(L=L.filter(function(m){return ol.isAngleInsideSector(v(m),r.sectorInRad)})),c.visible){var T=c.ticks==="inside"?-1:1,A=(c.linewidth||1)/2;qd.drawTicks(n,c,{vals:L,layer:a["angular-axis"],path:"M"+T*A+",0h"+T*c.ticklen,transFn:_,crisp:!1}),qd.drawGrid(n,c,{vals:L,layer:a["angular-grid"],path:x,transFn:ol.noop,crisp:!1}),qd.drawLabels(n,c,{vals:L,layer:a["angular-axis"],repositionOnUpdate:!0,transFn:p,labelFns:k})}gS(a["angular-line"].select("path"),u.showline,{d:r.pathSubplot(),transform:$c(s,l)}).attr("stroke-width",u.linewidth).call(hR.stroke,u.linecolor)};wf.updateFx=function(e,t){if(!this.gd._context.staticPlot){var r=!this.isSmith;r&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e)}};wf.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,a=t.layers,i=e._zoomlayer,o=jy.MINZOOM,s=jy.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,v=t.cxx,g=t.cyy,p=t.sectorInRad,_=t.vangles,x=t.radialAxis,y=Gg.clampTiny,C=Gg.findXYatLength,k=Gg.findEnclosingVertexAngles,S=jy.cornerHalfWidth,L=jy.cornerLen/2,w,T,A=Vg.makeDragger(a,"path","maindrag",e.dragmode===!1?"none":"crosshair");E_.select(A).attr("d",t.pathSubplot()).attr("transform",$c(c,f)),A.onmousemove=function(be){SQe.hover(n,be,t.id),n._fullLayout._lasthover=A,n._fullLayout._hoversubplot=t.id},A.onmouseout=function(be){n._dragging||fR.unhover(n,be)};var m={element:A,gd:n,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},F,E,I,R,B,O,U,j,q;function V(be,De){return Math.sqrt(be*be+De*De)}function K(be,De){return V(be-v,De-g)}function ee(be,De){return Math.atan2(g-De,be-v)}function ce(be,De){return[be*Math.cos(De),be*Math.sin(-De)]}function me(be,De){if(be===0)return t.pathSector(2*S);var Ge=L/be,pt=De-Ge,tt=De+Ge,Oe=Math.max(0,Math.min(be,l)),ze=Oe-S,ut=Oe+S;return"M"+ce(ze,pt)+"A"+[ze,ze]+" 0,0,0 "+ce(ze,tt)+"L"+ce(ut,tt)+"A"+[ut,ut]+" 0,0,1 "+ce(ut,pt)+"Z"}function ye(be,De,Ge){if(be===0)return t.pathSector(2*S);var pt=ce(be,De),tt=ce(be,Ge),Oe=y((pt[0]+tt[0])/2),ze=y((pt[1]+tt[1])/2),ut,et;if(Oe&&ze){var qe=ze/Oe,we=-1/qe,Le=C(S,qe,Oe,ze);ut=C(L,we,Le[0][0],Le[0][1]),et=C(L,we,Le[1][0],Le[1][1])}else{var Ke,Te;ze?(Ke=L,Te=S):(Ke=S,Te=L),ut=[[Oe-Ke,ze-Te],[Oe+Ke,ze-Te]],et=[[Oe-Ke,ze+Te],[Oe+Ke,ze+Te]]}return"M"+ut.join("L")+"L"+et.reverse().join("L")+"Z"}function ue(){I=null,R=null,B=t.pathSubplot(),O=!1;var be=n._fullLayout[t.id];U=hR.luminosity(be.bgcolor),j=Vg.makeZoombox(i,U,c,f,B),j.attr("fill-rule","evenodd"),q=Vg.makeCorners(i,c,f),EJ(n)}function J(be,De){return De=Math.max(Math.min(De,l),u),beo?(be-1&&be===1&&asr(De,n,[t.xaxis],[t.yaxis],t.id,m),Ge.indexOf("event")>-1&&SQe.click(n,De,t.id)}m.prepFn=function(be,De,Ge){var pt=n._fullLayout.dragmode,tt=A.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var Oe=n._fullLayout._invTransform;w=n._fullLayout._invScaleX,T=n._fullLayout._invScaleY;var ze=ol.apply3DTransform(Oe)(De-tt.left,Ge-tt.top);if(F=ze[0],E=ze[1],_){var ut=Gg.findPolygonOffset(l,p[0],p[1],_);F+=v+ut[0],E+=g+ut[1]}switch(pt){case"zoom":m.clickFn=xe,r||(_?m.moveFn=pe:m.moveFn=ne,m.doneFn=ie,ue(be,De,Ge));break;case"select":case"lasso":isr(be,De,Ge,m,pt);break}},fR.init(m)};wf.updateRadialDrag=function(e,t,r){var n=this,a=n.gd,i=n.layers,o=n.radius,s=n.innerRadius,l=n.cx,u=n.cy,c=n.radialAxis,f=jy.radialDragBoxSize,v=f/2;if(!c.visible)return;var g=Wy(n.radialAxisAngle),p=c._rl,_=p[0],x=p[1],y=p[r],C=.75*(p[1]-p[0])/(1-n.getHole(t))/o,k,S,L;r?(k=l+(o+v)*Math.cos(g),S=u-(o+v)*Math.sin(g),L="radialdrag"):(k=l+(s-v)*Math.cos(g),S=u-(s-v)*Math.sin(g),L="radialdrag-inner");var w=Vg.makeRectDragger(i,L,"crosshair",-v,-v,f,f),T={element:w,gd:a};e.dragmode===!1&&(T.dragmode=!1),gS(E_.select(w),c.visible&&s0!=(r?F>_:F=90||a>90&&i>=450?g=1:s<=0&&u<=0?g=0:g=Math.max(s,u),a<=180&&i>=180||a>180&&i>=540?c=-1:o>=0&&l>=0?c=0:c=Math.min(o,l),a<=270&&i>=270||a>270&&i>=630?f=-1:s>=0&&u>=0?f=0:f=Math.min(s,u),i>=360?v=1:o<=0&&l<=0?v=0:v=Math.max(o,l),[c,f,v,g]}function DQe(e,t){var r=function(a){return ol.angleDist(e,a)},n=ol.findIndexOfMin(t,r);return t[n]}function gS(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var CJ=fe((YSr,NQe)=>{"use strict";var fsr=tc(),Ea=pf(),hsr=nl().attributes,j0=Xt().extendFlat,IQe=rl().overrideAll,zQe=IQe({color:Ea.color,showline:j0({},Ea.showline,{dflt:!0}),linecolor:Ea.linecolor,linewidth:Ea.linewidth,showgrid:j0({},Ea.showgrid,{dflt:!0}),gridcolor:Ea.gridcolor,gridwidth:Ea.gridwidth,griddash:Ea.griddash},"plot","from-root"),qQe=IQe({tickmode:Ea.minor.tickmode,nticks:Ea.nticks,tick0:Ea.tick0,dtick:Ea.dtick,tickvals:Ea.tickvals,ticktext:Ea.ticktext,ticks:Ea.ticks,ticklen:Ea.ticklen,tickwidth:Ea.tickwidth,tickcolor:Ea.tickcolor,ticklabelstep:Ea.ticklabelstep,showticklabels:Ea.showticklabels,labelalias:Ea.labelalias,minorloglabels:Ea.minorloglabels,showtickprefix:Ea.showtickprefix,tickprefix:Ea.tickprefix,showticksuffix:Ea.showticksuffix,ticksuffix:Ea.ticksuffix,showexponent:Ea.showexponent,exponentformat:Ea.exponentformat,minexponent:Ea.minexponent,separatethousands:Ea.separatethousands,tickfont:Ea.tickfont,tickangle:Ea.tickangle,tickformat:Ea.tickformat,tickformatstops:Ea.tickformatstops,layer:Ea.layer},"plot","from-root"),BQe={visible:j0({},Ea.visible,{dflt:!0}),type:j0({},Ea.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Ea.autotypenumbers,autorangeoptions:{minallowed:Ea.autorangeoptions.minallowed,maxallowed:Ea.autorangeoptions.maxallowed,clipmin:Ea.autorangeoptions.clipmin,clipmax:Ea.autorangeoptions.clipmax,include:Ea.autorangeoptions.include,editType:"plot"},autorange:j0({},Ea.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:j0({},Ea.minallowed,{editType:"plot"}),maxallowed:j0({},Ea.maxallowed,{editType:"plot"}),range:j0({},Ea.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:Ea.categoryorder,categoryarray:Ea.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:Ea.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:j0({},Ea.title.text,{editType:"plot",dflt:""}),font:j0({},Ea.title.font,{editType:"plot"}),editType:"plot"},hoverformat:Ea.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};j0(BQe,zQe,qQe);var OQe={visible:j0({},Ea.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:Ea.autotypenumbers,categoryorder:Ea.categoryorder,categoryarray:Ea.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:Ea.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};j0(OQe,zQe,qQe);NQe.exports={domain:hsr({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:fsr.background},radialaxis:BQe,angularaxis:OQe,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var HQe=fe((XSr,GQe)=>{"use strict";var vR=Xt(),dsr=ni(),vsr=So(),psr=bx(),gsr=jf().getSubplotData,msr=F2(),ysr=Ub(),xsr=gm(),_sr=mm(),bsr=dC(),wsr=dA(),Tsr=pO(),Asr=Yb(),VQe=CJ(),Msr=TJ(),pR=oR(),UQe=pR.axisNames;function Ssr(e,t,r,n){var a=r("bgcolor");n.bgColor=dsr.combine(a,n.paper_bgcolor);var i=r("sector");r("hole");var o=gsr(n.fullData,pR.name,n.id),s=n.layoutOut,l;function u(j,q){return r(l+"."+j,q)}for(var c=0;c{"use strict";var ksr=jf().getSubplotCalcData,Csr=Xt().counterRegex,Lsr=kJ(),WQe=oR(),YQe=WQe.attr,L_=WQe.name,jQe=Csr(L_),XQe={};XQe[YQe]={valType:"subplotid",dflt:L_,editType:"calc"};function Psr(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[L_],a=0;a{"use strict";var{hovertemplateAttrs:Dsr,texttemplateAttrs:Rsr,templatefallbackAttrs:$Qe}=Oo(),mR=ta().extendFlat,Isr=n1(),W0=Ol(),zsr=Ho(),$5=W0.line;KQe.exports={mode:W0.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:W0.text,texttemplate:Rsr({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:$Qe({editType:"plot"}),hovertext:W0.hovertext,line:{color:$5.color,width:$5.width,dash:$5.dash,backoff:$5.backoff,shape:mR({},$5.shape,{values:["linear","spline"]}),smoothing:$5.smoothing,editType:"calc"},connectgaps:W0.connectgaps,marker:W0.marker,cliponaxis:mR({},W0.cliponaxis,{dflt:!1}),textposition:W0.textposition,textfont:W0.textfont,fill:mR({},W0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:Isr(),hoverinfo:mR({},zsr.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:W0.hoveron,hovertemplate:Dsr(),hovertemplatefallback:$Qe(),selected:W0.selected,unselected:W0.unselected}});var xR=fe((KSr,eet)=>{"use strict";var yR=Xt(),K5=Is(),qsr=vv(),Bsr=lp(),JQe=h3(),Osr=up(),Nsr=a1(),Usr=r1().PTS_LINESONLY,Vsr=mS();function Gsr(e,t,r,n){function a(s,l){return yR.coerce(e,t,Vsr,s,l)}var i=QQe(e,t,n,a);if(!i){t.visible=!1;return}a("thetaunit"),a("mode",i{"use strict";var Hsr=Xt(),tet=Yi();ret.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot,o,s;i?(o=i.radialAxis,s=i.angularAxis):(i=n[r.subplot],o=i.radialaxis,s=i.angularaxis);var l=o.c2l(t.r);a.rLabel=tet.tickText(o,l,!0).text;var u=s.thetaunit==="degrees"?Hsr.rad2deg(t.theta):t.theta;return a.thetaLabel=tet.tickText(s,u,!0).text,a}});var aet=fe((QSr,iet)=>{"use strict";var net=aa(),jsr=Wa().BADNUM,Wsr=Yi(),Ysr=pv(),Xsr=o1(),Zsr=F0(),$sr=gv().calcMarkerSize;iet.exports=function(t,r){for(var n=t._fullLayout,a=r.subplot,i=n[a].radialaxis,o=n[a].angularaxis,s=i.makeCalcdata(r,"r"),l=o.makeCalcdata(r,"theta"),u=r._length,c=new Array(u),f=0;f{"use strict";var Ksr=y3(),oet=Wa().BADNUM;set.exports=function(t,r,n){for(var a=r.layers.frontplot.select("g.scatterlayer"),i=r.xaxis,o=r.yaxis,s={xaxis:i,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=r.radialAxis,u=r.angularAxis,c=0;c{"use strict";var Jsr=w3();function Qsr(e,t,r,n){var a=Jsr(e,t,r,n);if(!(!a||a[0].index===!1)){var i=a[0];if(i.index===void 0)return a;var o=e.subplot,s=i.cd[i.index],l=i.trace;if(o.isPtInside(s))return i.xLabelVal=void 0,i.yLabelVal=void 0,cet(s,l,o,i),i.hovertemplate=l.hovertemplate,a}}function cet(e,t,r,n){var a=r.radialAxis,i=r.angularAxis;a._hovertitle="r",i._hovertitle="\u03B8";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.rLabel=s.rLabel,n.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,u=[];function c(v,g){u.push(v._hovertitle+": "+g)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["r","theta","text"]),f.indexOf("r")!==-1&&c(a,n.rLabel),f.indexOf("theta")!==-1&&c(i,n.thetaLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}fet.exports={hoverPoints:Qsr,makeHoverPointText:cet}});var det=fe((rEr,het)=>{"use strict";het.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:gR(),categories:["polar","symbols","showLegend","scatter-like"],attributes:mS(),supplyDefaults:xR().supplyDefaults,colorbar:Zf(),formatLabels:_R(),calc:aet(),plot:uet(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:bR().hoverPoints,selectPoints:ax(),meta:{}}});var pet=fe((nEr,vet)=>{"use strict";vet.exports=det()});var LJ=fe((oEr,met)=>{"use strict";var get=mS(),{cliponaxis:iEr,hoveron:aEr}=get,elr=Ete(get,["cliponaxis","hoveron"]),{connectgaps:tlr,line:{color:rlr,dash:nlr,width:ilr},fill:alr,fillcolor:olr,marker:slr,textfont:llr,textposition:ulr}=yM();met.exports=tl(zo({},elr),{connectgaps:tlr,fill:alr,fillcolor:olr,line:{color:rlr,dash:nlr,editType:"calc",width:ilr},marker:slr,textfont:llr,textposition:ulr})});var _et=fe((lEr,xet)=>{"use strict";var yet=Xt(),PJ=Is(),clr=xR().handleRThetaDefaults,flr=vv(),hlr=lp(),dlr=up(),vlr=a1(),plr=r1().PTS_LINESONLY,glr=LJ();xet.exports=function(t,r,n,a){function i(s,l){return yet.coerce(t,r,glr,s,l)}var o=clr(t,r,a,i);if(!o){r.visible=!1;return}i("thetaunit"),i("mode",o{"use strict";var mlr=_R();bet.exports=function(t,r,n){var a=t.i;return"r"in t||(t.r=r._r[a]),"theta"in t||(t.theta=r._theta[a]),mlr(t,r,n)}});var Aet=fe((cEr,Tet)=>{"use strict";var ylr=pv(),xlr=gv().calcMarkerSize,_lr=f_(),blr=Yi(),wlr=Ty().TOO_MANY_POINTS;Tet.exports=function(t,r){var n=t._fullLayout,a=r.subplot,i=n[a].radialaxis,o=n[a].angularaxis,s=r._r=i.makeCalcdata(r,"r"),l=r._theta=o.makeCalcdata(r,"theta"),u=r._length,c={};u{"use strict";var Tlr=KP(),Alr=bR().makeHoverPointText;function Mlr(e,t,r,n){var a=e.cd,i=a[0].t,o=i.r,s=i.theta,l=Tlr.hoverPoints(e,t,r,n);if(!(!l||l[0].index===!1)){var u=l[0];if(u.index===void 0)return l;var c=e.subplot,f=u.cd[u.index],v=u.trace;if(f.r=o[u.index],f.theta=s[u.index],!!c.isPtInside(f))return u.xLabelVal=void 0,u.yLabelVal=void 0,Alr(f,v,c,u),l}}Met.exports={hoverPoints:Mlr}});var Cet=fe((hEr,ket)=>{"use strict";ket.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:gR(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:LJ(),supplyDefaults:_et(),colorbar:Zf(),formatLabels:wet(),calc:Aet(),hoverPoints:Eet().hoverPoints,selectPoints:mZ(),meta:{}}});var Let=fe((dEr,FJ)=>{"use strict";var Slr=tF(),Elr=aa(),klr=x$(),Clr=vZ(),wR=f_(),TR=Xt(),Llr=Ty().TOO_MANY_POINTS,Plr={};FJ.exports=function(t,r,n){if(n.length){var a=r.radialAxis,i=r.angularAxis,o=Clr(t,r);return n.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var l=s[0],u=l.trace,c=l.t,f=u._length,v=c.r,g=c.theta,p=c.opts,_,x=v.slice(),y=g.slice();for(_=0;_=Llr&&(p.marker.cluster=c.tree),p.marker&&(p.markerSel.positions=p.markerUnsel.positions=p.marker.positions=C),p.line&&C.length>1&&TR.extendFlat(p.line,wR.linePositions(t,u,C)),p.text&&(TR.extendFlat(p.text,{positions:C},wR.textPosition(t,u,p.text,p.marker)),TR.extendFlat(p.textSel,{positions:C},wR.textPosition(t,u,p.text,p.markerSel)),TR.extendFlat(p.textUnsel,{positions:C},wR.textPosition(t,u,p.text,p.markerUnsel))),p.fill&&!o.fill2d&&(o.fill2d=!0),p.marker&&!o.scatter2d&&(o.scatter2d=!0),p.line&&!o.line2d&&(o.line2d=!0),p.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(p.line),o.fillOptions.push(p.fill),o.markerOptions.push(p.marker),o.markerSelectedOptions.push(p.markerSel),o.markerUnselectedOptions.push(p.markerUnsel),o.textOptions.push(p.text),o.textSelectedOptions.push(p.textSel),o.textUnselectedOptions.push(p.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),c.x=k,c.y=S,c.rawx=k,c.rawy=S,c.r=v,c.theta=g,c.positions=C,c._scene=o,c.index=o.count,o.count++}}),klr(t,r,n)}};FJ.exports.reglPrecompiled=Plr});var Det=fe((vEr,Fet)=>{"use strict";var Pet=Cet();Pet.plot=Let();Fet.exports=Pet});var Iet=fe((pEr,Ret)=>{"use strict";Ret.exports=Det()});var DJ=fe((gEr,zet)=>{"use strict";var{hovertemplateAttrs:Flr,templatefallbackAttrs:Dlr}=Oo(),J5=ta().extendFlat,Yy=mS(),Xy=u1();zet.exports={r:Yy.r,theta:Yy.theta,r0:Yy.r0,dr:Yy.dr,theta0:Yy.theta0,dtheta:Yy.dtheta,thetaunit:Yy.thetaunit,base:J5({},Xy.base,{}),offset:J5({},Xy.offset,{}),width:J5({},Xy.width,{}),text:J5({},Xy.text,{}),hovertext:J5({},Xy.hovertext,{}),marker:Rlr(),hoverinfo:Yy.hoverinfo,hovertemplate:Flr(),hovertemplatefallback:Dlr(),selected:Xy.selected,unselected:Xy.unselected};function Rlr(){var e=J5({},Xy.marker);return delete e.cornerradius,e}});var RJ=fe((mEr,qet)=>{"use strict";qet.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var Net=fe((yEr,Oet)=>{"use strict";var Bet=Xt(),Ilr=xR().handleRThetaDefaults,zlr=ZC(),qlr=DJ();Oet.exports=function(t,r,n,a){function i(s,l){return Bet.coerce(t,r,qlr,s,l)}var o=Ilr(t,r,a,i);if(!o){r.visible=!1;return}i("thetaunit"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),zlr(t,r,i,n,a),Bet.coerceSelectionMarkerOpacity(r,i)}});var Vet=fe((xEr,Uet)=>{"use strict";var Blr=Xt(),Olr=RJ();Uet.exports=function(e,t,r){var n={},a;function i(l,u){return Blr.coerce(e[a]||{},t[a],Olr,l,u)}for(var o=0;o{"use strict";var Get=Wf().hasColorscale,Het=Mh(),Nlr=Xt().isArrayOrTypedArray,Ulr=kA(),Vlr=ix().setGroupPositions,Glr=F0(),Hlr=bi().traceIs,jlr=Xt().extendFlat;function Wlr(e,t){for(var r=e._fullLayout,n=t.subplot,a=r[n].radialaxis,i=r[n].angularaxis,o=a.makeCalcdata(t,"r"),s=i.makeCalcdata(t,"theta"),l=t._length,u=new Array(l),c=o,f=s,v=0;v{"use strict";var Wet=xi(),AR=aa(),Q5=Xt(),Xlr=Ji(),zJ=lR();Yet.exports=function(t,r,n){var a=t._context.staticPlot,i=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=Zlr(r),c=r.layers.frontplot.select("g.barlayer");Q5.makeTraceGroups(c,n,"trace bars").each(function(){var f=Wet.select(this),v=Q5.ensureSingle(f,"g","points"),g=v.selectAll("g.point").data(Q5.identity);g.enter().append("g").style("vector-effect",a?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),g.exit().remove(),g.each(function(p){var _=Wet.select(this),x=p.rp0=s.c2p(p.s0),y=p.rp1=s.c2p(p.s1),C=p.thetag0=l.c2g(p.p0),k=p.thetag1=l.c2g(p.p1),S;if(!AR(x)||!AR(y)||!AR(C)||!AR(k)||x===y||C===k)S="M0,0Z";else{var L=s.c2g(p.s1),w=(C+k)/2;p.ct=[i.c2p(L*Math.cos(w)),o.c2p(L*Math.sin(w))],S=u(x,y,C,k)}Q5.ensureSingle(_,"path").attr("d",S)}),Xlr.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function Zlr(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,a,i,o){var s,l;Q5.angleDelta(i,o)>0?(s=i,l=o):(s=o,l=i);var u=zJ.findEnclosingVertexAngles(s,e.vangles)[0],c=zJ.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return zJ.pathPolygonAnnulus(n,a,s,l,f,t,r)}:function(n,a,i,o){return Q5.pathAnnulus(n,a,i,o,t,r)}}});var $et=fe((wEr,Zet)=>{"use strict";var $lr=kl(),qJ=Xt(),Klr=z3().getTraceColor,Jlr=qJ.fillText,Qlr=bR().makeHoverPointText,eur=lR().isPtInsidePolygon;Zet.exports=function(t,r,n){var a=t.cd,i=a[0].trace,o=t.subplot,s=o.radialAxis,l=o.angularAxis,u=o.vangles,c=u?eur:qJ.isPtInsideSector,f=t.maxHoverDistance,v=l._period||2*Math.PI,g=Math.abs(s.g2p(Math.sqrt(r*r+n*n))),p=Math.atan2(n,r);s.range[0]>s.range[1]&&(p+=Math.PI);var _=function(k){return c(g,p,[k.rp0,k.rp1],[k.thetag0,k.thetag1],u)?f+Math.min(1,Math.abs(k.thetag1-k.thetag0)/v)-1+(k.rp1-g)/(k.rp1-k.rp0)-1:1/0};if($lr.getClosest(a,_,t),t.index!==!1){var x=t.index,y=a[x];t.x0=t.x1=y.ct[0],t.y0=t.y1=y.ct[1];var C=qJ.extendFlat({},y,{r:y.s,theta:y.p});return Jlr(y,i,t),Qlr(C,i,o,t),t.hovertemplate=i.hovertemplate,t.color=Klr(i,y),t.xLabelVal=t.yLabelVal=void 0,y.s<0&&(t.idealAlign="left"),[t]}}});var Jet=fe((TEr,Ket)=>{"use strict";Ket.exports={moduleType:"trace",name:"barpolar",basePlotModule:gR(),categories:["polar","bar","showLegend"],attributes:DJ(),layoutAttributes:RJ(),supplyDefaults:Net(),supplyLayoutDefaults:Vet(),calc:IJ().calc,crossTraceCalc:IJ().crossTraceCalc,plot:Xet(),colorbar:Zf(),formatLabels:_R(),style:_v().style,styleOnSelect:_v().styleOnSelect,hoverPoints:$et(),selectPoints:q3(),meta:{}}});var ett=fe((AEr,Qet)=>{"use strict";Qet.exports=Jet()});var BJ=fe((MEr,ttt)=>{"use strict";ttt.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var OJ=fe((SEr,att)=>{"use strict";var tur=tc(),ou=pf(),rur=nl().attributes,Zy=Xt().extendFlat,rtt=rl().overrideAll,ntt=rtt({color:ou.color,showline:Zy({},ou.showline,{dflt:!0}),linecolor:ou.linecolor,linewidth:ou.linewidth,showgrid:Zy({},ou.showgrid,{dflt:!0}),gridcolor:ou.gridcolor,gridwidth:ou.gridwidth,griddash:ou.griddash},"plot","from-root"),itt=rtt({ticklen:ou.ticklen,tickwidth:Zy({},ou.tickwidth,{dflt:2}),tickcolor:ou.tickcolor,showticklabels:ou.showticklabels,labelalias:ou.labelalias,showtickprefix:ou.showtickprefix,tickprefix:ou.tickprefix,showticksuffix:ou.showticksuffix,ticksuffix:ou.ticksuffix,tickfont:ou.tickfont,tickformat:ou.tickformat,hoverformat:ou.hoverformat,layer:ou.layer},"plot","from-root"),nur=Zy({visible:Zy({},ou.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:Zy({},ou.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},ntt,itt),iur=Zy({visible:Zy({},ou.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:ou.ticks,editType:"calc"},ntt,itt);att.exports={domain:rur({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:tur.background},realaxis:nur,imaginaryaxis:iur,editType:"calc"}});var ltt=fe((EEr,stt)=>{"use strict";var e4=Xt(),aur=ni(),our=So(),sur=bx(),lur=jf().getSubplotData,uur=mm(),cur=gm(),fur=dA(),hur=Hp(),t4=OJ(),NJ=BJ(),ott=NJ.axisNames,dur=pur(function(e){return e4.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function vur(e,t,r,n){var a=r("bgcolor");n.bgColor=aur.combine(a,n.paper_bgcolor);var i=lur(n.fullData,NJ.name,n.id),o=n.layoutOut,s;function l(L,w){return r(s+"."+L,w)}for(var u=0;u{"use strict";var gur=jf().getSubplotCalcData,mur=Xt().counterRegex,yur=kJ(),ctt=BJ(),ftt=ctt.attr,P_=ctt.name,utt=mur(P_),htt={};htt[ftt]={valType:"subplotid",dflt:P_,editType:"calc"};function xur(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[P_],a=0;a{"use strict";var{hovertemplateAttrs:bur,texttemplateAttrs:wur,templatefallbackAttrs:ptt}=Oo(),MR=ta().extendFlat,Tur=n1(),Y0=Ol(),Aur=Ho(),r4=Y0.line;gtt.exports={mode:Y0.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:Y0.text,texttemplate:wur({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:ptt({editType:"plot"}),hovertext:Y0.hovertext,line:{color:r4.color,width:r4.width,dash:r4.dash,backoff:r4.backoff,shape:MR({},r4.shape,{values:["linear","spline"]}),smoothing:r4.smoothing,editType:"calc"},connectgaps:Y0.connectgaps,marker:Y0.marker,cliponaxis:MR({},Y0.cliponaxis,{dflt:!1}),textposition:Y0.textposition,textfont:Y0.textfont,fill:MR({},Y0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:Tur(),hoverinfo:MR({},Aur.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:Y0.hoveron,hovertemplate:bur(),hovertemplatefallback:ptt(),selected:Y0.selected,unselected:Y0.unselected}});var xtt=fe((LEr,ytt)=>{"use strict";var SR=Xt(),n4=Is(),Mur=vv(),Sur=lp(),mtt=h3(),Eur=up(),kur=a1(),Cur=r1().PTS_LINESONLY,Lur=UJ();ytt.exports=function(t,r,n,a){function i(l,u){return SR.coerce(t,r,Lur,l,u)}var o=Pur(t,r,a,i);if(!o){r.visible=!1;return}i("mode",o{"use strict";var _tt=Yi();btt.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot;return a.realLabel=_tt.tickText(i.radialAxis,t.real,!0).text,a.imagLabel=_tt.tickText(i.angularAxis,t.imag,!0).text,a}});var Mtt=fe((FEr,Att)=>{"use strict";var Ttt=aa(),Fur=Wa().BADNUM,Dur=pv(),Rur=o1(),Iur=F0(),zur=gv().calcMarkerSize;Att.exports=function(t,r){for(var n=t._fullLayout,a=r.subplot,i=n[a].realaxis,o=n[a].imaginaryaxis,s=i.makeCalcdata(r,"real"),l=o.makeCalcdata(r,"imag"),u=r._length,c=new Array(u),f=0;f{"use strict";var qur=y3(),Stt=Wa().BADNUM,Bur=SJ(),Our=Bur.smith;Ett.exports=function(t,r,n){for(var a=r.layers.frontplot.select("g.scatterlayer"),i=r.xaxis,o=r.yaxis,s={xaxis:i,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=0;l{"use strict";var Nur=w3();function Uur(e,t,r,n){var a=Nur(e,t,r,n);if(!(!a||a[0].index===!1)){var i=a[0];if(i.index===void 0)return a;var o=e.subplot,s=i.cd[i.index],l=i.trace;if(o.isPtInside(s))return i.xLabelVal=void 0,i.yLabelVal=void 0,Ctt(s,l,o,i),i.hovertemplate=l.hovertemplate,a}}function Ctt(e,t,r,n){var a=r.radialAxis,i=r.angularAxis;a._hovertitle="real",i._hovertitle="imag";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.realLabel=s.realLabel,n.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,u=[];function c(v,g){u.push(v._hovertitle+": "+g)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["real","imag","text"]),f.indexOf("real")!==-1&&c(a,n.realLabel),f.indexOf("imag")!==-1&&c(i,n.imagLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}Ltt.exports={hoverPoints:Uur,makeHoverPointText:Ctt}});var Dtt=fe((IEr,Ftt)=>{"use strict";Ftt.exports={moduleType:"trace",name:"scattersmith",basePlotModule:vtt(),categories:["smith","symbols","showLegend","scatter-like"],attributes:UJ(),supplyDefaults:xtt(),colorbar:Zf(),formatLabels:wtt(),calc:Mtt(),plot:ktt(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:Ptt().hoverPoints,selectPoints:ax(),meta:{}}});var Itt=fe((zEr,Rtt)=>{"use strict";Rtt.exports=Dtt()});var GJ=fe((qEr,ztt)=>{"use strict";var Vur=Ho(),Gur=Oo().hovertemplateAttrs,ER=pl().axisHoverFormat,VJ=ta().extendFlat,Hur=_s(),jur=Uc().dash,Wur=Fm(),F_=Ol(),Yur={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:F_.x0,dx:F_.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:F_.y0,dy:F_.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:ER("x"),yhoverformat:ER("y"),uhoverformat:ER("u","noDate"),vhoverformat:ER("v","noDate"),hoverinfo:VJ({},Vur.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:Gur({},{keys:["x","y","u","v","text","name"]}),text:F_.text,textposition:F_.textposition,textfont:F_.textfont,marker:VJ({arrowsize:VJ({},Wur.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:jur,editType:"style"},editType:"calc"},Hur("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"}};ztt.exports=Yur});var Btt=fe((BEr,qtt)=>{"use strict";var yS=Xt(),Xur=GJ(),Zur=rx(),$ur=Wf().hasColorscale,Kur=Vc();qtt.exports=function(t,r,n,a){function i(p,_){return yS.coerce(t,r,Xur,p,_)}var o=Zur(t,r,a,i);if(!o){r.visible=!1;return}var s=i("u"),l=i("v");if(!yS.isArrayOrTypedArray(s)||s.length===0){r.u=new Array(o);for(var u=0;u{"use strict";var Hg=Xt(),i4=Yi(),xS=aa(),Ott=Wa().BADNUM,Jur=Mh(),Qur=F0(),ecr=.97;Ntt.exports=function(t,r){let n=r._xA=i4.getFromId(t,r.xaxis||"x","x"),a=r._yA=i4.getFromId(t,r.yaxis||"y","y"),i=n.makeCalcdata(r,"x"),o=a.makeCalcdata(r,"y"),s=Math.min(i.length,o.length);r._length=s;let l=new Array(s);var u=1/0,c=-1/0,f=1/0,v=-1/0;let g=r.marker.color,p=Hg.isArrayOrTypedArray(g),_=r.u||[],x=r.v||[],{anchor:y,lengthmode:C,arrowref:k}=r,S=y==="tip",L=y==="center";for(var w=1/0,T=-1/0,A=1/0,m=-1/0,F=1/0,E=-1/0,I=1/0,R=-1/0,B=0,O=0;OT&&(T=i[O]),o[O]m&&(m=o[O]),VE&&(E=V),KR&&(R=K);var ee=Math.sqrt(V*V+K*K);if(ee>c&&(c=ee),eev&&(v=ce))}}else U.x=Ott,U.y=Ott}if(r._maxNorm=c,C==="scaled"||k==="paper"){let ie=T-w,le=m-A;var me;ie===0&&le===0?me=1:me=(ie+le+Math.sqrt((ie-le)*(ie-le)+4*B*ie*le))/(2*(B-1)),me*=ecr,r._scaleFactor=me/r._maxNorm}else r._scaleFactor=1;r._scaleFactor*=r.lengthfactor;let ye=new Array(s),ue=new Array(s),J=new Array(s),_e=new Array(s);for(var ne,ae,O=0;O{"use strict";Vtt.exports=function(t,r){}});var kR=fe((UEr,Wtt)=>{"use strict";var HJ=xi(),Htt=Xt(),_S=Ji(),tcr=js(),rcr=Y1().DESELECTDIM;function jJ(e,t){var r=t.marker||{},n=tcr.makeColorScaleFuncFromTrace(r);e.style("stroke",function(a){var i=r.color,o;if(Htt.isArrayOrTypedArray(i)&&i.length>a.i&&isFinite(i[a.i]))o=i[a.i];else{var s=t.u&&t.u[a.i]||0,l=t.v&&t.v[a.i]||0;o=Math.sqrt(s*s+l*l)}return a.mcc=n(o),a.mcc})}function ncr(e){var t=HJ.select(e).selectAll("g.trace.quiver");t.each(function(r){jtt(e,r,HJ.select(this))})}function icr(e,t,r){jtt(e,t,r)}function jtt(e,t,r){var n=t[0].trace,a=n.marker||{},i=a.line||{},o=Htt.isArrayOrTypedArray(a.color)?void 0:a.color,s=n._hasColorscale;if(r)if(n.selectedpoints){var l=(n.selected||{}).marker||{},u=(n.unselected||{}).marker||{},c=l.line||{},f=u.line||{};r.selectAll("path.js-line").each(function(g){var p=HJ.select(this),_=!g.selected,x=_?u.color:l.color,y=_?f.width!==void 0?f.width:i.width:c.width!==void 0?c.width:i.width;x?(_S.lineGroupStyle(p,y,x,i.dash),p.style("stroke-opacity",1)):(_S.lineGroupStyle(p,y,o,i.dash),s&&jJ(p,n),p.style("stroke-opacity",_?rcr:1))}),_S.selectedTextStyle(r.selectAll("text"),n)}else{var v=r.selectAll("path.js-line");v.call(_S.lineGroupStyle,i.width,o,i.dash),s&&jJ(v,n),v.style("stroke-opacity",1),_S.textPointStyle(r.selectAll("text"),n,e)}}Wtt.exports={style:ncr,styleOnSelect:icr,colorscaleStroke:jJ}});var Ztt=fe((VEr,Xtt)=>{"use strict";var Rp=xi(),acr=Xt(),bS=Ji(),ocr=kR().colorscaleStroke,CR=Math.PI/12,scr=5.8,lcr=1.5,ucr=.7;Xtt.exports=function(t,r,n,a,i,o){var s,l,u=!i,c=!!i&&i.duration>0;if(s=a.selectAll("g.trace").data(n,function(v){return v[0].trace.uid}),s.enter().append("g").attr("class",function(v){return"trace quiver trace"+v[0].trace.uid}).style("stroke-miterlimit",2),s.order(),c){o&&(l=o());var f=Rp.transition().duration(i.duration).ease(i.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});f.each(function(){a.selectAll("g.trace").each(function(v,g){Ytt(t,g,r,v,n,this,i)})})}else s.each(function(v,g){Ytt(t,g,r,v,n,this,i)});u&&s.exit().remove()};function Ytt(e,t,r,n,a,i,o){var s=n[0].trace,l=r.xaxis,u=r.yaxis;n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=Rp.select(i);var c=Rp.select(i).selectAll("g.lines").data([n]);c.enter().append("g").classed("lines",!0),bS.setClipUrl(c,r.layerClipId,e);var f=c.selectAll("path.js-line").data(n);f.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),f.exit().remove();let{anchor:v,maxNorm:g=0,arrowref:p}=s,_=p==="paper"?s._scaleFactor*Math.sqrt(Math.abs(l._m*u._m)):s._scaleFactor,x=s.marker.arrowsize;f.each(function(T){let A=Rp.select(this);if(T.x===void 0||T.y===void 0){A.attr("d",null);return}let m=(p==="paper"?T._u*Math.sign(l._m):Rp.round(l._m*T._u))*_,F=(p==="paper"?T._v*Math.sign(u._m):Rp.round(u._m*T._v))*_,E=(s._input.marker||{}).arrowsize!==void 0;var I,R,B,O;v==="tip"?(I=l.c2p(T.x)-m,B=u.c2p(T.y)-F,R=l.c2p(T.x),O=u.c2p(T.y)):v==="center"?(I=l.c2p(T.x)-m/2,B=u.c2p(T.y)-F/2,R=l.c2p(T.x)+m/2,O=u.c2p(T.y)+F/2):(I=l.c2p(T.x),B=u.c2p(T.y),R=l.c2p(T.x)+m,O=u.c2p(T.y)+F),T._px0=I,T._py0=B,T._px1=R,T._py1=O;var U=s.marker.line.width;E||(U=Math.max(U,lcr));let j=Math.sqrt((R-I)*(R-I)+(O-B)*(O-B)),q=ucr*j,V=Math.min(scr*x*U,q),K=Math.atan2(O-B,R-I),ee=R-V*Math.cos(K-CR),ce=O-V*Math.sin(K-CR),me=R-V*Math.cos(K+CR),ye=O-V*Math.sin(K+CR),ue="M"+I+","+B+"L"+R+","+O+"L"+ee+","+ce+"L"+R+","+O+"L"+me+","+ye;A.attr("d",ue)});var y=s.marker||{},C=y.line||{},k=acr.isArrayOrTypedArray(y.color)?void 0:y.color;bS.lineGroupStyle(f,C.width,k,C.dash),s._hasColorscale&&ocr(f,s);var S=Rp.select(i).selectAll("g.text").data([n]);S.enter().append("g").classed("text",!0),bS.setClipUrl(S,r.layerClipId,e);var L=S.selectAll("g.textpoint").data(n);if(L.enter().append("g").classed("textpoint",!0).append("text"),L.exit().remove(),L.each(function(T){var A=Rp.select(this),m=bS.translatePoint(T,A.select("text"),l,u);m||A.remove()}),L.selectAll("text").call(bS.textPointStyle,s,e).each(function(T){var A=l.c2p(T.x),m=u.c2p(T.y);Rp.select(this).selectAll("tspan.line").each(function(){Rp.select(this).attr({x:A,y:m})})}),o&&o.duration>0){var w=Rp.transition().duration(o.duration).ease(o.easing);f.transition(w).style("opacity",1)}}});var Jtt=fe((GEr,Ktt)=>{"use strict";var $tt=Xt(),ccr=kl(),fcr=b3();function hcr(e,t,r,n,a,i){let o=a-r,s=i-n,l=o*o+s*s;if(!l)return Math.sqrt((e-r)*(e-r)+(t-n)*(t-n));var u=((e-r)*o+(t-n)*s)/l;u=Math.max(0,Math.min(1,u));let c=r+u*o,f=n+u*s;return Math.sqrt((e-c)*(e-c)+(t-f)*(t-f))}Ktt.exports=function(t,r,n,a){var i=t.cd,o=i[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=function(k){return k._px0===void 0?1/0:hcr(u,c,k._px0,k._py0,k._px1,k._py1)};if(ccr.getClosest(i,f,t),t.index!==!1){var v=i[t.index],g=s.c2p(v.x,!0),p=l.c2p(v.y,!0),_=Math.sqrt((u-g)*(u-g)+(c-p)*(c-p));t.index=v.i;var x=o.u?o.u[v.i]:0,y=o.v?o.v[v.i]:0,C="u: "+x+", v: "+y;return $tt.extendFlat(t,{color:fcr(o,v),x0:g-3,x1:g+3,xLabelVal:v.x,y0:p-3,y1:p+3,yLabelVal:v.y,uLabelVal:x,vLabelVal:y,extraText:C,spikeDistance:_,hovertemplate:o.hovertemplate}),$tt.fillText(v,o,t),[t]}}});var trt=fe((HEr,ert)=>{"use strict";var LR=Yi(),Qtt=Xt();ert.exports=function(t,r,n){var a={},i={_fullLayout:n},o=LR.getFromTrace(i,r,"x"),s=LR.getFromTrace(i,r,"y"),l=t.x,u=t.y;a.xLabel=LR.tickText(o,o.c2l(l),!0).text,a.yLabel=LR.tickText(s,s.c2l(u),!0).text;var c=r.u?r.u[t.i]:0,f=r.v?r.v[t.i]:0,v=r.uhoverformat,g=r.vhoverformat;return a.uLabel=v?Qtt.numberFormat(v)(c):String(c),a.vLabel=g?Qtt.numberFormat(g)(f):String(f),a}});var nrt=fe((jEr,rrt)=>{"use strict";rrt.exports=function(t,r,n,a,i){return t.x=r.x,t.y=r.y,t.u=n.u?n.u[i]:void 0,t.v=n.v?n.v[i]:void 0,t}});var art=fe((WEr,irt)=>{"use strict";irt.exports={moduleType:"trace",name:"quiver",basePlotModule:gu(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:GJ(),supplyDefaults:Btt(),calc:Utt(),crossTraceCalc:Gtt(),plot:Ztt(),style:kR().style,styleOnSelect:kR().styleOnSelect,hoverPoints:Jtt(),formatLabels:trt(),eventData:nrt(),selectPoints:ax(),colorbar:Zf(),animatable:!0,meta:{}}});var srt=fe((YEr,ort)=>{"use strict";ort.exports=art()});var Ih=fe((XEr,urt)=>{var FR=Zc();function lrt(){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={}}FR(lrt.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,a){return n=(e!=null&&e.year?e.calendar():typeof n=="string"?this.instance(n,a):n)||this.instance(),n.newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(r){return e[r]})}},substituteChineseDigits:function(e,t){return function(r){for(var n="",a=0;r>0;){var i=r%10;n=(i===0?"":e[i]+t[a])+n,a++,r=Math.floor(r/10)}return n.indexOf(e[1]+t[1])===0&&(n=n.substr(1)),n||e[0]}}});function WJ(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(io.local.invalidDate||io.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function PR(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}FR(WJ.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e==null?this:e,t,r)},year:function(e){return arguments.length===0?this._year:this.set(e,"y")},month:function(e){return arguments.length===0?this._month:this.set(e,"m")},day:function(e){return arguments.length===0?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(io.local.invalidDate||io.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,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(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(io.local.differentCalendars||io.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+PR(Math.abs(this.year()),4)+"-"+PR(this.month(),2)+"-"+PR(this.day(),2)}});function YJ(){this.shortYearCutoff="+10"}FR(YJ.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new WJ(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,io.local.invalidYear||io.regionalOptions[""].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,io.local.invalidYear||io.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+PR(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,io.local.invalidYear||io.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,io.local.invalidMonth||io.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,io.local.invalidMonth||io.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,io.local.invalidYear||io.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,io.local.invalidDate||io.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,r==="d"||r==="w"){var n=e.toJD()+t*(r==="w"?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=e.year()+(r==="y"?t:0),o=e.monthOfYear()+(r==="m"?t:0),a=e.day(),s=function(c){for(;of-1+c.minMonth;)i++,o-=f,f=c.monthsInYear(i)};r==="y"?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):r==="m"&&(s(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var l=[i,this.fromMonthOfYear(i,o),a];return this._validateLevel--,l}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,t,r,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(t[0]===0||e.year()>0!=t[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],i=r<0?-1:1;t=this._add(e,r*a[0]+i*a[1],a[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,io.local.invalidDate||io.regionalOptions[""].invalidDate);var n=r==="y"?t:e.year(),a=r==="m"?t:e.month(),i=r==="d"?t:e.day();return(r==="y"||r==="m")&&(i=Math.min(i,this.daysInMonth(n,a))),e.date(n,a,i)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||e!==0;if(n){var a=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=a-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate),a=new Date(n.year(),n.month()-1,n.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var io=urt.exports=new lrt;io.cdate=WJ;io.baseCalendar=YJ;io.calendars.gregorian=XJ});var crt=fe(()=>{var ZJ=Zc(),Tf=Ih();ZJ(Tf.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"});Tf.local=Tf.regionalOptions[""];ZJ(Tf.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});ZJ(Tf.baseCalendar.prototype,{UNIX_EPOCH:Tf.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:Tf.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(e,t,r){if(typeof e!="string"&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw Tf.local.invalidFormat||Tf.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,i=r.monthNumbers||this.local.monthNumbers,o=r.monthNamesShort||this.local.monthNamesShort,s=r.monthNames||this.local.monthNames,l=r.calculateWeek||this.local.calculateWeek,u=function(S,L){for(var w=1;k+w1},c=function(S,L,w,T){var A=""+L;if(u(S,T))for(;A.length1},C=function(I,R){var B=y(I,R),O=[2,3,B?4:2,B?4:2,10,11,20]["oyYJ@!".indexOf(I)+1],U=new RegExp("^-?\\d{1,"+O+"}"),j=t.substring(A).match(U);if(!j)throw(Tf.local.missingNumberAt||Tf.regionalOptions[""].missingNumberAt).replace(/\{0\}/,A);return A+=j[0].length,parseInt(j[0],10)},k=this,S=function(){if(typeof s=="function"){y("m");var I=s.call(k,t.substring(A));return A+=I.length,I}return C("m")},L=function(I,R,B,O){for(var U=y(I,O)?B:R,j=0;j-1){v=1,g=p;for(var E=this.daysInMonth(f,v);g>E;E=this.daysInMonth(f,v))v++,g-=E}return c>-1?this.fromJD(c):this.newDate(f,v,g)},determineDate:function(e,t,r,n,a){r&&typeof r!="object"&&(a=n,n=r,r=null),typeof n!="string"&&(a=n,n="");var i=this,o=function(s){try{return i.parseDate(n,s,a)}catch(f){}s=s.toLowerCase();for(var l=(s.match(/^c/)&&r?r.newDate():null)||i.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=u.exec(s);c;)l.add(parseInt(c[1],10),c[2]||"d"),c=u.exec(s);return l};return t=t?t.newDate():null,e=e==null?t:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?t:i.today().add(e,"d"):i.newDate(e),e}})});var frt=fe(()=>{var $y=Ih(),dcr=Zc(),$J=$y.instance();function DR(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}DR.prototype=new $y.baseCalendar;dcr(DR.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if(typeof e=="string"){var r=e.match(pcr);return r?r[0]:""}var n=this._validateYear(e),a=e.month(),i=""+this.toChineseMonth(n,a);return t&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(e){if(typeof e=="string"){var t=e.match(gcr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=this.toChineseMonth(r,n),i=["\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"][a-1];return this.isIntercalaryMonth(r,n)&&(i="\u95F0"+i),i},monthNamesShort:function(e){if(typeof e=="string"){var t=e.match(mcr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=this.toChineseMonth(r,n),i=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][a-1];return this.isIntercalaryMonth(r,n)&&(i="\u95F0"+i),i},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),n;if(isNaN(r))t[0]==="\u95F0"&&(n=!0,t=t.substring(1)),t[t.length-1]==="\u6708"&&(t=t.substring(0,t.length-1)),r=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(t);else{var a=t[t.length-1];n=a==="i"||a==="I"}var i=this.toMonthIndex(e,r,n);return i},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(e,t){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var n=this.intercalaryMonth(e),a=r&&t!==n;if(a||t<1||t>12)throw $y.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return n?!r&&t<=n?i=t-1:i=t:i=t-1,i},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),n=r?12:11;if(t<0||t>n)throw $y.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return r?t>13;return r},isIntercalaryMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,t,r){var n=this._validateYear(e,$y.local.invalidyear),a=Jy[n-Jy[0]],i=a>>9&4095,o=a>>5&15,s=a&31,l;l=$J.newDate(i,o,s),l.add(4-(l.dayOfWeek()||7),"d");var u=this.toJD(e,t,r)-l.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=Ky[e-Ky[0]],n=r>>13,a=n?12:11;if(t>a)throw $y.local.invalidMonth.replace(/\{0\}/,this.local.name);var i=r&1<<12-t?30:29;return i},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,i,r,$y.local.invalidDate);e=this._validateYear(n.year()),t=n.month(),r=n.day();var a=this.isIntercalaryMonth(e,t),i=this.toChineseMonth(e,t),o=xcr(e,i,r,a);return $J.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=$J.fromJD(e),r=ycr(t.year(),t.month(),t.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(e){var t=e.match(vcr),r=this._validateYear(+t[1]),n=+t[2],a=!!t[3],i=this.toMonthIndex(r,n,a),o=+t[4];return this.newDate(r,i,o)},add:function(e,t,r){var n=e.year(),a=e.month(),i=this.isIntercalaryMonth(n,a),o=this.toChineseMonth(n,a),s=Object.getPrototypeOf(DR.prototype).add.call(this,e,t,r);if(r==="y"){var l=s.year(),u=s.month(),c=this.isIntercalaryMonth(l,o),f=i&&c?this.toMonthIndex(l,o,!0):this.toMonthIndex(l,o,!1);f!==u&&s.month(f)}return s}});var vcr=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,pcr=/^\d?\d[iI]?/m,gcr=/^闰?十?[一二三四五六七八九]?月/m,mcr=/^闰?十?[一二三四五六七八九]?/m;$y.calendars.chinese=DR;var Ky=[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],Jy=[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 ycr(e,t,r,n){var a,i;if(typeof e=="object")a=e,i=t||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var s=typeof t=="number"&&t>=1&&t<=12;if(!s)throw new Error("Solar month outside range 1 - 12");var l=typeof r=="number"&&r>=1&&r<=31;if(!l)throw new Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},i=n||{}}var u=Jy[a.year-Jy[0]],c=a.year<<9|a.month<<5|a.day;i.year=c>=u?a.year:a.year-1,u=Jy[i.year-Jy[0]];var f=u>>9&4095,v=u>>5&15,g=u&31,p,_=new Date(f,v-1,g),x=new Date(a.year,a.month-1,a.day);p=Math.round((x-_)/(24*3600*1e3));var y=Ky[i.year-Ky[0]],C;for(C=0;C<13;C++){var k=y&1<<12-C?30:29;if(p>13;return!S||C=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var l=typeof t=="number"&&t>=1&&t<=12;if(!l)throw new Error("Lunar month outside range 1 - 12");var u=typeof r=="number"&&r>=1&&r<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var c;typeof n=="object"?(c=!1,i=n):(c=!!n,i=a||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var v=Ky[o.year-Ky[0]],g=v>>13,p;g&&(o.month>g||o.isIntercalary)?p=o.month:p=o.month-1;for(var _=0;_>9&4095,k=y>>5&15,S=y&31,L=new Date(C,k-1,S+f);return i.year=L.getFullYear(),i.month=1+L.getMonth(),i.day=L.getDate(),i}});var hrt=fe(()=>{var D_=Ih(),_cr=Zc();function KJ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}KJ.prototype=new D_.baseCalendar;_cr(KJ.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(r){var t=this._validate(r,this.minMonth,this.minDay,D_.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,D_.local.invalidYear||D_.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,D_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,D_.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-(n-1)*30+1;return this.newDate(r,n,a)}});D_.calendars.coptic=KJ});var drt=fe(()=>{var jg=Ih(),bcr=Zc();function JJ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}JJ.prototype=new jg.baseCalendar;bcr(JJ.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,jg.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,jg.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,jg.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,jg.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,jg.local.invalidDate);return(n.day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,jg.local.invalidDate);return{century:wcr[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,t,r){var n=this._validate(e,t,r,jg.local.invalidDate);return e=n.year()+(n.year()<0?1:0),t=n.month(),r=n.day(),r+(t>1?16:0)+(t>2?(t-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,n)}});var wcr={20:"Fruitbat",21:"Anchovy"};jg.calendars.discworld=JJ});var vrt=fe(()=>{var R_=Ih(),Tcr=Zc();function QJ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}QJ.prototype=new R_.baseCalendar;Tcr(QJ.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(r){var t=this._validate(r,this.minMonth,this.minDay,R_.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,R_.local.invalidYear||R_.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,R_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,R_.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-(n-1)*30+1;return this.newDate(r,n,a)}});R_.calendars.ethiopian=QJ});var prt=fe(()=>{var Qy=Ih(),Acr=Zc();function eQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}eQ.prototype=new Qy.baseCalendar;Acr(eQ.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Qy.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,RR(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Qy.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Qy.local.invalidYear);return e=t.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Qy.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&RR(this.daysInYear(e),10)===5?30:t===9&&RR(this.daysInYear(e),10)===3?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,Qy.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(e,t,r){var n=this._validate(e,t,r,Qy.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var a=e<=0?e+1:e,i=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(t<7){for(var o=7;o<=this.monthsInYear(e);o++)i+=this.daysInMonth(e,o);for(var o=1;o=this.toJD(t===-1?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});function RR(e,t){return e-t*Math.floor(e/t)}Qy.calendars.hebrew=eQ});var grt=fe(()=>{var wS=Ih(),Mcr=Zc();function tQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}tQ.prototype=new wS.baseCalendar;Mcr(tQ.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(e){var t=this._validate(e,this.minMonth,this.minDay,wS.local.invalidYear);return(t.year()*11+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,wS.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,wS.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e=e<=0?e+1:e,r+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});wS.calendars.islamic=tQ});var mrt=fe(()=>{var TS=Ih(),Scr=Zc();function rQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}rQ.prototype=new TS.baseCalendar;Scr(rQ.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(r){var t=this._validate(r,this.minMonth,this.minDay,TS.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%4===0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,TS.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,TS.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=t+1524,n=Math.floor((r-122.1)/365.25),a=Math.floor(365.25*n),i=Math.floor((r-a)/30.6001),o=i-Math.floor(i<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-a-Math.floor(30.6001*i);return s<=0&&s--,this.newDate(s,o,l)}});TS.calendars.julian=rQ});var xrt=fe(()=>{var Uv=Ih(),Ecr=Zc();function iQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}iQ.prototype=new Uv.baseCalendar;Ecr(iQ.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,Uv.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Uv.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var n=Math.floor(e/20);return r+"."+n+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=t*20+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Uv.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,Uv.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Uv.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,Uv.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,Uv.local.invalidDate);return n.day()},weekDay:function(e,t,r){return this._validate(e,t,r,Uv.local.invalidDate),!0},extraInfo:function(e,t,r){var n=this._validate(e,t,r,Uv.local.invalidDate),a=n.toJD(),i=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var t=nQ(e+8+340,365);return[Math.floor(t/20)+1,nQ(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[yrt(e+20,20),yrt(e+4,13)]},toJD:function(e,t,r){var n=this._validate(e,t,r,Uv.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e=e%360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}});function nQ(e,t){return e-t*Math.floor(e/t)}function yrt(e,t){return nQ(e-1,t)+1}Uv.calendars.mayan=iQ});var brt=fe(()=>{var I_=Ih(),kcr=Zc();function aQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}aQ.prototype=new I_.baseCalendar;var _rt=I_.instance("gregorian");kcr(aQ.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,I_.local.invalidYear||I_.regionalOptions[""].invalidYear);return _rt.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,I_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(a,t,r){var n=this._validate(a,t,r,I_.local.invalidMonth),a=n.year();a<0&&a++;for(var i=n.day(),o=1;o=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}});I_.calendars.nanakshahi=aQ});var wrt=fe(()=>{var z_=Ih(),Ccr=Zc();function oQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}oQ.prototype=new z_.baseCalendar;Ccr(oQ.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(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,z_.local.invalidYear);if(e=t.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var r=0,n=this.minMonth;n<=12;n++)r+=this.NEPALI_CALENDAR_DATA[e][n];return r},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,z_.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},toJD:function(e,t,r){var n=this._validate(e,t,r,z_.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var a=z_.instance(),i=0,o=t,s=e;this._createMissingCalendarData(e);var l=e-(o>9||o===9&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(t!==9&&(i=r,o--);o!==9;)o<=0&&(o=12,s--),i+=this.NEPALI_CALENDAR_DATA[s][o],o--;return t===9?(i+=r-this.NEPALI_CALENDAR_DATA[s][0],i<0&&(i+=a.daysInYear(l))):i+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],a.newDate(l,1,1).add(i,"d").toJD()},fromJD:function(e){var t=z_.instance(),r=t.fromJD(e),n=r.year(),a=r.dayOfYear(),i=n+56;this._createMissingCalendarData(i);for(var o=9,s=this.NEPALI_CALENDAR_DATA[i][0],l=this.NEPALI_CALENDAR_DATA[i][o]-s+1;a>l;)o++,o>12&&(o=1,i++),l+=this.NEPALI_CALENDAR_DATA[i][o];var u=this.NEPALI_CALENDAR_DATA[i][o]-(l-a);return this.newDate(i,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r{var a4=Ih(),Lcr=Zc();function zR(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function IR(e){var t=e-475;e<0&&t++;var r=.242197,n=r*t,a=r*(t+1),i=n-Math.floor(n),o=a-Math.floor(a);return i>o}zR.prototype=new a4.baseCalendar;Lcr(zR.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,a4.local.invalidYear);return IR(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-((n.dayOfWeek()+1)%7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,a4.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,a4.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var a=0;if(e>0)for(var i=1;i0?e-1:e)*365+a+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=475+(e-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,IR(r)?30:29)&&(r++,r===0&&r++);var n=e-this.toJD(r,1,1)+1,a=n<=186?Math.ceil(n/31):Math.ceil((n-6)/30),i=e-this.toJD(r,a,1)+1;return this.newDate(r,a,i)}});a4.calendars.persian=zR;a4.calendars.jalali=zR});var Art=fe(()=>{var q_=Ih(),Pcr=Zc(),qR=q_.instance();function sQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}sQ.prototype=new q_.baseCalendar;Pcr(sQ.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(r){var t=this._validate(r,this.minMonth,this.minDay,q_.local.invalidYear),r=this._t2gYear(t.year());return qR.leapYear(r)},weekOfYear:function(a,t,r){var n=this._validate(a,this.minMonth,this.minDay,q_.local.invalidYear),a=this._t2gYear(n.year());return qR.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,q_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(a,t,r){var n=this._validate(a,t,r,q_.local.invalidDate),a=this._t2gYear(n.year());return qR.toJD(a,n.month(),n.day())},fromJD:function(e){var t=qR.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}});q_.calendars.taiwan=sQ});var Mrt=fe(()=>{var B_=Ih(),Fcr=Zc(),BR=B_.instance();function lQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}lQ.prototype=new B_.baseCalendar;Fcr(lQ.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(r){var t=this._validate(r,this.minMonth,this.minDay,B_.local.invalidYear),r=this._t2gYear(t.year());return BR.leapYear(r)},weekOfYear:function(a,t,r){var n=this._validate(a,this.minMonth,this.minDay,B_.local.invalidYear),a=this._t2gYear(n.year());return BR.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,B_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(a,t,r){var n=this._validate(a,t,r,B_.local.invalidDate),a=this._t2gYear(n.year());return BR.toJD(a,n.month(),n.day())},fromJD:function(e){var t=BR.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}});B_.calendars.thai=lQ});var Srt=fe(()=>{var O_=Ih(),Dcr=Zc();function uQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}uQ.prototype=new O_.baseCalendar;Dcr(uQ.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,O_.local.invalidYear);return this.daysInYear(t.year())===355},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,O_.local.invalidMonth),n=r.toJD()-24e5+.5,a=0,i=0;in)return e2[a]-e2[a-1];a++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,O_.local.invalidDate),a=12*(n.year()-1)+n.month()-15292,i=n.day()+e2[a-1]-1;return i+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var a=r+15292,i=Math.floor((a-1)/12),o=i+1,s=a-12*i,l=t-e2[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var n=O_.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(e=e.year!=null?e.year:e,n=e>=1276&&e<=1500),n},_validate:function(e,t,r,n){var a=O_.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}});O_.calendars.ummalqura=uQ;var e2=[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]});var krt=fe((Mkr,Ert)=>{"use strict";Ert.exports=Ih();crt();frt();hrt();drt();vrt();prt();grt();mrt();xrt();brt();wrt();Trt();Art();Mrt();Srt()});var Irt=fe((Skr,Rrt)=>{"use strict";var Lrt=krt(),AS=Xt(),Prt=Wa(),Rcr=Prt.EPOCHJD,Icr=Prt.ONEDAY,hQ={valType:"enumerated",values:AS.sortObjectKeys(Lrt.calendars),editType:"calc",dflt:"gregorian"},Frt=function(e,t,r,n){var a={};return a[r]=hQ,AS.coerce(e,t,a,r,n)},zcr=function(e,t,r,n){for(var a=0;a{"use strict";zrt.exports=Irt()});var Vcr=fe((kkr,Ort)=>{var Brt=bxe();Brt.register([T_e(),cbe(),M3e(),W3e(),owe(),r5e(),p5e(),n4e(),F4e(),vTe(),tAe(),ECe(),g7e(),s9e(),Z9e(),SPe(),$Pe(),cDe(),CDe(),YDe(),aRe(),xRe(),RRe(),$Re(),Dze(),Qze(),_Ge(),_He(),Tje(),Zje(),hYe(),EYe(),KYe(),cZe(),RZe(),p$e(),qKe(),lJe(),CJe(),tQe(),pQe(),pet(),Iet(),ett(),Itt(),srt(),qrt()]);Ort.exports=Brt});return Vcr();})(); /*! * The buffer module from node.js, for the browser. * diff --git a/plotly/package_data/widgetbundle.js b/plotly/package_data/widgetbundle.js index 72d8f8e2df4..8f29fef28b3 100644 --- a/plotly/package_data/widgetbundle.js +++ b/plotly/package_data/widgetbundle.js @@ -1,93 +1,93 @@ -var _X=Object.create;var yE=Object.defineProperty;var xX=Object.getOwnPropertyDescriptor;var bX=Object.getOwnPropertyNames;var wX=Object.getPrototypeOf,TX=Object.prototype.hasOwnProperty;var AX=(oe,ye)=>()=>(ye||oe((ye={exports:{}}).exports,ye),ye.exports);var MX=(oe,ye,Fe,dt)=>{if(ye&&typeof ye=="object"||typeof ye=="function")for(let Zt of bX(ye))!TX.call(oe,Zt)&&Zt!==Fe&&yE(oe,Zt,{get:()=>ye[Zt],enumerable:!(dt=xX(ye,Zt))||dt.enumerable});return oe};var SX=(oe,ye,Fe)=>(Fe=oe!=null?_X(wX(oe)):{},MX(ye||!oe||!oe.__esModule?yE(Fe,"default",{value:oe,enumerable:!0}):Fe,oe));var CR=AX((kR,bx)=>{(function(oe,ye){typeof bx=="object"&&bx.exports?bx.exports=ye():oe.moduleName=ye()})(typeof self<"u"?self:kR,()=>{"use strict";var oe=(()=>{var ye=Object.create,Fe=Object.defineProperty,dt=Object.defineProperties,Zt=Object.getOwnPropertyDescriptor,yr=Object.getOwnPropertyDescriptors,Xr=Object.getOwnPropertyNames,ga=Object.getOwnPropertySymbols,ya=Object.getPrototypeOf,Cn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,On=(J,V)=>(V=Symbol[J])?V:Symbol.for("Symbol."+J),Fi=J=>{throw TypeError(J)},ho=(J,V,p)=>V in J?Fe(J,V,{enumerable:!0,configurable:!0,writable:!0,value:p}):J[V]=p,Li=(J,V)=>{for(var p in V||(V={}))Cn.call(V,p)&&ho(J,p,V[p]);if(ga)for(var p of ga(V))xn.call(V,p)&&ho(J,p,V[p]);return J},lo=(J,V)=>dt(J,yr(V)),Lo=(J,V)=>{var p={};for(var b in J)Cn.call(J,b)&&V.indexOf(b)<0&&(p[b]=J[b]);if(J!=null&&ga)for(var b of ga(J))V.indexOf(b)<0&&xn.call(J,b)&&(p[b]=J[b]);return p},zi=(J,V,p)=>function(){if(p)throw p[0];try{return J&&(V=(0,J[Xr(J)[0]])(J=0)),V}catch(E){throw p=[E],E}},ze=(J,V)=>function(){try{return V||(0,J[Xr(J)[0]])((V={exports:{}}).exports,V),V.exports}catch(b){throw V=0,b}},bu=(J,V)=>{for(var p in V)Fe(J,p,{get:V[p],enumerable:!0})},uf=(J,V,p,b)=>{if(V&&typeof V=="object"||typeof V=="function")for(let E of Xr(V))!Cn.call(J,E)&&E!==p&&Fe(J,E,{get:()=>V[E],enumerable:!(b=Zt(V,E))||b.enumerable});return J},Yl=(J,V,p)=>(p=J!=null?ye(ya(J)):{},uf(V||!J||!J.__esModule?Fe(p,"default",{value:J,enumerable:!0}):p,J)),Po=J=>uf(Fe({},"__esModule",{value:!0}),J),Oh=function(J,V){this[0]=J,this[1]=V},ad=J=>{var V=J[On("asyncIterator")],p=!1,b,E={};return V==null?(V=J[On("iterator")](),b=k=>E[k]=l=>V[k](l)):(V=V.call(J),b=k=>E[k]=l=>{if(p){if(p=!1,k==="throw")throw l;return l}return p=!0,{done:!1,value:new Oh(new Promise(e=>{var t=V[k](l);t instanceof Object||Fi("Object expected"),e(t)}),1)}}),E[On("iterator")]=()=>E,b("next"),"throw"in V?b("throw"):E.throw=k=>{throw k},"return"in V&&b("return"),E},ev=ze({"src/version.js"(J){"use strict";J.version="4.0.0"}}),DR=ze({"node_modules/native-promise-only/lib/npo.src.js"(J,V){(function(b,E,k){E[b]=E[b]||k(),typeof V<"u"&&V.exports&&(V.exports=E[b])})("Promise",typeof window<"u"?window:J,function(){"use strict";var b,E,k,l=Object.prototype.toString,e=typeof setImmediate<"u"?function(w){return setImmediate(w)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(w,S,M,C){return Object.defineProperty(w,S,{value:M,writable:!0,configurable:C!==!1})}}catch{b=function(S,M,C){return S[M]=C,S}}k=function(){var w,S,M;function C(_,T){this.fn=_,this.self=T,this.next=void 0}return{add:function(T,f){M=new C(T,f),S?S.next=M:w=M,S=M,M=void 0},drain:function(){var T=w;for(w=S=E=void 0;T;)T.fn.call(T.self),T=T.next}}}();function t(i,w){k.add(i,w),E||(E=e(k.drain))}function n(i){var w,S=typeof i;return i!=null&&(S=="object"||S=="function")&&(w=i.then),typeof w=="function"?w:!1}function r(){for(var i=0;i0&&t(r,S))}catch(M){s.call(new m(S),M)}}}function s(i){var w=this;w.triggered||(w.triggered=!0,w.def&&(w=w.def),w.msg=i,w.state=2,w.chain.length>0&&t(r,w))}function c(i,w,S,M){for(var C=0;CEe?1:de>=Ee?0:NaN}p.descending=function(de,Ee){return Eede?1:Ee>=de?0:NaN},p.min=function(de,Ee){var qe=-1,tt=de.length,at,ct;if(arguments.length===1){for(;++qe=ct){at=ct;break}for(;++qect&&(at=ct)}else{for(;++qe=ct){at=ct;break}for(;++qect&&(at=ct)}return at},p.max=function(de,Ee){var qe=-1,tt=de.length,at,ct;if(arguments.length===1){for(;++qe=ct){at=ct;break}for(;++qeat&&(at=ct)}else{for(;++qe=ct){at=ct;break}for(;++qeat&&(at=ct)}return at},p.extent=function(de,Ee){var qe=-1,tt=de.length,at,ct,Nt;if(arguments.length===1){for(;++qe=ct){at=Nt=ct;break}for(;++qect&&(at=ct),Nt=ct){at=Nt=ct;break}for(;++qect&&(at=ct),Nt1)return Nt/(Jt-1)},p.deviation=function(){var de=p.variance.apply(this,arguments);return de&&Math.sqrt(de)};function h(de){return{left:function(Ee,qe,tt,at){for(arguments.length<3&&(tt=0),arguments.length<4&&(at=Ee.length);tt>>1;de(Ee[ct],qe)<0?tt=ct+1:at=ct}return tt},right:function(Ee,qe,tt,at){for(arguments.length<3&&(tt=0),arguments.length<4&&(at=Ee.length);tt>>1;de(Ee[ct],qe)>0?at=ct:tt=ct+1}return tt}}}var v=h(s);p.bisectLeft=v.left,p.bisect=p.bisectRight=v.right,p.bisector=function(de){return h(de.length===1?function(Ee,qe){return s(de(Ee),qe)}:de)},p.shuffle=function(de,Ee,qe){(tt=arguments.length)<3&&(qe=de.length,tt<2&&(Ee=0));for(var tt=qe-Ee,at,ct;tt;)ct=Math.random()*tt--|0,at=de[tt+Ee],de[tt+Ee]=de[ct+Ee],de[ct+Ee]=at;return de},p.permute=function(de,Ee){for(var qe=Ee.length,tt=new Array(qe);qe--;)tt[qe]=de[Ee[qe]];return tt},p.pairs=function(de){for(var Ee=0,qe=de.length-1,tt,at=de[0],ct=new Array(qe<0?0:qe);Ee=0;)for(Nt=de[Ee],qe=Nt.length;--qe>=0;)ct[--at]=Nt[qe];return ct};var i=Math.abs;p.range=function(de,Ee,qe){if(arguments.length<3&&(qe=1,arguments.length<2&&(Ee=de,de=0)),(Ee-de)/qe===1/0)throw new Error("infinite range");var tt=[],at=w(i(qe)),ct=-1,Nt;if(de*=at,Ee*=at,qe*=at,qe<0)for(;(Nt=de+qe*++ct)>Ee;)tt.push(Nt/at);else for(;(Nt=de+qe*++ct)=Ee.length)return at?at.call(de,Jt):tt?Jt.sort(tt):Jt;for(var gr=-1,Hr=Jt.length,Vr=Ee[mr++],ca,Aa,Yr,oa=new M,fa;++gr=Ee.length)return St;var mr=[],gr=qe[Jt++];return St.forEach(function(Hr,Vr){mr.push({key:Hr,values:Nt(Vr,Jt)})}),gr?mr.sort(function(Hr,Vr){return gr(Hr.key,Vr.key)}):mr}return de.map=function(St,Jt){return ct(Jt,St,0)},de.entries=function(St){return Nt(ct(p.map,St,0),0)},de.key=function(St){return Ee.push(St),de},de.sortKeys=function(St){return qe[Ee.length-1]=St,de},de.sortValues=function(St){return tt=St,de},de.rollup=function(St){return at=St,de},de},p.set=function(de){var Ee=new O;if(de)for(var qe=0,tt=de.length;qe=0&&(tt=de.slice(qe+1),de=de.slice(0,qe)),de)return arguments.length<2?this[de].on(tt):this[de].on(tt,Ee);if(arguments.length===2){if(Ee==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(tt,null);return this}};function $(de){var Ee=[],qe=new M;function tt(){for(var at=Ee,ct=-1,Nt=at.length,St;++ct=0&&(qe=de.slice(0,Ee))!=="xmlns"&&(de=de.slice(Ee+1)),he.hasOwnProperty(qe)?{space:he[qe],local:de}:de}},q.attr=function(de,Ee){if(arguments.length<2){if(typeof de=="string"){var qe=this.node();return de=p.ns.qualify(de),de.local?qe.getAttributeNS(de.space,de.local):qe.getAttribute(de)}for(Ee in de)this.each(xe(Ee,de[Ee]));return this}return this.each(xe(de,Ee))};function xe(de,Ee){de=p.ns.qualify(de);function qe(){this.removeAttribute(de)}function tt(){this.removeAttributeNS(de.space,de.local)}function at(){this.setAttribute(de,Ee)}function ct(){this.setAttributeNS(de.space,de.local,Ee)}function Nt(){var Jt=Ee.apply(this,arguments);Jt==null?this.removeAttribute(de):this.setAttribute(de,Jt)}function St(){var Jt=Ee.apply(this,arguments);Jt==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,Jt)}return Ee==null?de.local?tt:qe:typeof Ee=="function"?de.local?St:Nt:de.local?ct:at}function we(de){return de.trim().replace(/\s+/g," ")}q.classed=function(de,Ee){if(arguments.length<2){if(typeof de=="string"){var qe=this.node(),tt=(de=Se(de)).length,at=-1;if(Ee=qe.classList){for(;++at=0;)(ct=qe[tt])&&(at&&at!==ct.nextSibling&&at.parentNode.insertBefore(ct,at),at=ct);return this},q.sort=function(de){de=Ae.apply(this,arguments);for(var Ee=-1,qe=this.length;++Ee=Ee&&(Ee=at+1);!(Jt=Nt[Ee])&&++Ee0&&(de=de.slice(0,at));var Nt=Tt.get(de);Nt&&(de=Nt,ct=$t);function St(){var gr=this[tt];gr&&(this.removeEventListener(de,gr,gr.$),delete this[tt])}function Jt(){var gr=ct(Ee,E(arguments));St.call(this),this.addEventListener(de,this[tt]=gr,gr.$=qe),gr._=Ee}function mr(){var gr=new RegExp("^__on([^.]+)"+p.requote(de)+"$"),Hr;for(var Vr in this)if(Hr=Vr.match(gr)){var ca=this[Vr];this.removeEventListener(Hr[1],ca,ca.$),delete this[Vr]}}return at?Ee?Jt:St:Ee?j:mr}var Tt=p.map({mouseenter:"mouseover",mouseleave:"mouseout"});k&&Tt.forEach(function(de){"on"+de in k&&Tt.remove(de)});function At(de,Ee){return function(qe){var tt=p.event;p.event=qe,Ee[0]=this.__data__;try{de.apply(this,Ee)}finally{p.event=tt}}}function $t(de,Ee){var qe=At(de,Ee);return function(tt){var at=this,ct=tt.relatedTarget;(!ct||ct!==at&&!(ct.compareDocumentPosition(at)&8))&&qe.call(at,tt)}}var rr,_r=0;function Xt(de){var Ee=".dragsuppress-"+ ++_r,qe="click"+Ee,tt=p.select(e(de)).on("touchmove"+Ee,Q).on("dragstart"+Ee,Q).on("selectstart"+Ee,Q);if(rr==null&&(rr="onselectstart"in de?!1:F(de.style,"userSelect")),rr){var at=l(de).style,ct=at[rr];at[rr]="none"}return function(Nt){if(tt.on(Ee,null),rr&&(at[rr]=ct),Nt){var St=function(){tt.on(qe,null)};tt.on(qe,function(){Q(),St()},!0),setTimeout(St,0)}}}p.mouse=function(de){return Ot(de,re())};var or=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ot(de,Ee){Ee.changedTouches&&(Ee=Ee.changedTouches[0]);var qe=de.ownerSVGElement||de;if(qe.createSVGPoint){var tt=qe.createSVGPoint();if(or<0){var at=e(de);if(at.scrollX||at.scrollY){qe=p.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var ct=qe[0][0].getScreenCTM();or=!(ct.f||ct.e),qe.remove()}}return or?(tt.x=Ee.pageX,tt.y=Ee.pageY):(tt.x=Ee.clientX,tt.y=Ee.clientY),tt=tt.matrixTransform(de.getScreenCTM().inverse()),[tt.x,tt.y]}var Nt=de.getBoundingClientRect();return[Ee.clientX-Nt.left-de.clientLeft,Ee.clientY-Nt.top-de.clientTop]}p.touch=function(de,Ee,qe){if(arguments.length<3&&(qe=Ee,Ee=re().changedTouches),Ee){for(var tt=0,at=Ee.length,ct;tt0?1:de<0?-1:0}function Pt(de,Ee,qe){return(Ee[0]-de[0])*(qe[1]-de[1])-(Ee[1]-de[1])*(qe[0]-de[0])}function Ct(de){return de>1?0:de<-1?Ne:Math.acos(de)}function qt(de){return de>1?Je:de<-1?-Je:Math.asin(de)}function Vt(de){return((de=Math.exp(de))-1/de)/2}function Ht(de){return((de=Math.exp(de))+1/de)/2}function Sr(de){return((de=Math.exp(2*de))-1)/(de+1)}function Kr(de){return(de=Math.sin(de/2))*de}var Yt=Math.SQRT2,Rt=2,nr=4;p.interpolateZoom=function(de,Ee){var qe=de[0],tt=de[1],at=de[2],ct=Ee[0],Nt=Ee[1],St=Ee[2],Jt=ct-qe,mr=Nt-tt,gr=Jt*Jt+mr*mr,Hr,Vr;if(gr0&&(be=be.transition().duration(Nt)),be.call(Ma.event)}function xi(){oa&&oa.domain(Yr.range().map(function(be){return(be-de.x)/de.k}).map(Yr.invert)),Ea&&Ea.domain(fa.range().map(function(be){return(be-de.y)/de.k}).map(fa.invert))}function di(be){St++||be({type:"zoomstart"})}function uo(be){xi(),be({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function pe(be){--St||(be({type:"zoomend"}),qe=null)}function y(){var be=this,Re=Aa.of(be,arguments),je=0,Ze=p.select(e(be)).on(mr,Dt).on(gr,Gt),ut=sa(p.mouse(be)),ft=Xt(be);Qi.call(be),di(Re);function Dt(){je=1,zn(p.mouse(be),ut),uo(Re)}function Gt(){Ze.on(mr,null).on(gr,null),ft(je),pe(Re)}}function N(){var be=this,Re=Aa.of(be,arguments),je={},Ze=0,ut,ft=".zoom-"+p.event.changedTouches[0].identifier,Dt="touchmove"+ft,Gt="touchend"+ft,Kt=[],st=p.select(be),It=Xt(be);ir(),di(Re),st.on(Jt,null).on(Vr,ir);function Ut(){var hr=p.touches(be);return ut=de.k,hr.forEach(function(vr){vr.identifier in je&&(je[vr.identifier]=sa(vr))}),hr}function ir(){var hr=p.event.target;p.select(hr).on(Dt,dr).on(Gt,Ar),Kt.push(hr);for(var vr=p.event.changedTouches,Or=0,Cr=vr.length;Or1){var Ta=ta[0],Ra=ta[1],ua=Ta[0]-Ra[0],ia=Ta[1]-Ra[1];Ze=ua*ua+ia*ia}}function dr(){var hr=p.touches(be),vr,Or,Cr,ta;Qi.call(be);for(var ka=0,Ta=hr.length;ka1?1:Ee,qe=qe<0?0:qe>1?1:qe,at=qe<=.5?qe*(1+Ee):qe+Ee-qe*Ee,tt=2*qe-at;function ct(St){return St>360?St-=360:St<0&&(St+=360),St<60?tt+(at-tt)*St/60:St<180?at:St<240?tt+(at-tt)*(240-St)/60:tt}function Nt(St){return Math.round(ct(St)*255)}return new Oa(Nt(de+120),Nt(de),Nt(de-120))}p.hcl=La;function La(de,Ee,qe){return this instanceof La?(this.h=+de,this.c=+Ee,void(this.l=+qe)):arguments.length<2?de instanceof La?new La(de.h,de.c,de.l):de instanceof ja?en(de.l,de.a,de.b):en((de=Dr((de=p.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new La(de,Ee,qe)}var un=La.prototype=new Qr;un.brighter=function(de){return new La(this.h,this.c,Math.min(100,this.l+Nn*(arguments.length?de:1)))},un.darker=function(de){return new La(this.h,this.c,Math.max(0,this.l-Nn*(arguments.length?de:1)))},un.rgb=function(){return Xa(this.h,this.c,this.l).rgb()};function Xa(de,Ee,qe){return isNaN(de)&&(de=0),isNaN(Ee)&&(Ee=0),new ja(qe,Math.cos(de*=et)*Ee,Math.sin(de)*Ee)}p.lab=ja;function ja(de,Ee,qe){return this instanceof ja?(this.l=+de,this.a=+Ee,void(this.b=+qe)):arguments.length<2?de instanceof ja?new ja(de.l,de.a,de.b):de instanceof La?Xa(de.h,de.c,de.l):Dr((de=Oa(de)).r,de.g,de.b):new ja(de,Ee,qe)}var Nn=18,yn=.95047,Un=1,li=1.08883,Yn=ja.prototype=new Qr;Yn.brighter=function(de){return new ja(Math.min(100,this.l+Nn*(arguments.length?de:1)),this.a,this.b)},Yn.darker=function(de){return new ja(Math.max(0,this.l-Nn*(arguments.length?de:1)),this.a,this.b)},Yn.rgb=function(){return on(this.l,this.a,this.b)};function on(de,Ee,qe){var tt=(de+16)/116,at=tt+Ee/500,ct=tt-qe/200;return at=vi(at)*yn,tt=vi(tt)*Un,ct=vi(ct)*li,new Oa(Ja(3.2404542*at-1.5371385*tt-.4985314*ct),Ja(-.969266*at+1.8760108*tt+.041556*ct),Ja(.0556434*at-.2040259*tt+1.0572252*ct))}function en(de,Ee,qe){return de>0?new La(Math.atan2(qe,Ee)*Mt,Math.sqrt(Ee*Ee+qe*qe),de):new La(NaN,NaN,de)}function vi(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function Yi(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function Ja(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}p.rgb=Oa;function Oa(de,Ee,qe){return this instanceof Oa?(this.r=~~de,this.g=~~Ee,void(this.b=~~qe)):arguments.length<2?de instanceof Oa?new Oa(de.r,de.g,de.b):Tr(""+de,Oa,Pa):new Oa(de,Ee,qe)}function lt(de){return new Oa(de>>16,de>>8&255,de&255)}function rt(de){return lt(de)+""}var fr=Oa.prototype=new Qr;fr.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Ee=this.r,qe=this.g,tt=this.b,at=30;return!Ee&&!qe&&!tt?new Oa(at,at,at):(Ee&&Ee>4,tt=tt>>4|tt,at=Jt&240,at=at>>4|at,ct=Jt&15,ct=ct<<4|ct):de.length===7&&(tt=(Jt&16711680)>>16,at=(Jt&65280)>>8,ct=Jt&255)),Ee(tt,at,ct))}function Ir(de,Ee,qe){var tt=Math.min(de/=255,Ee/=255,qe/=255),at=Math.max(de,Ee,qe),ct=at-tt,Nt,St,Jt=(at+tt)/2;return ct?(St=Jt<.5?ct/(at+tt):ct/(2-at-tt),de==at?Nt=(Ee-qe)/ct+(Ee0&&Jt<1?0:Nt),new Zr(Nt,St,Jt)}function Dr(de,Ee,qe){de=ot(de),Ee=ot(Ee),qe=ot(qe);var tt=Yi((.4124564*de+.3575761*Ee+.1804375*qe)/yn),at=Yi((.2126729*de+.7151522*Ee+.072175*qe)/Un),ct=Yi((.0193339*de+.119192*Ee+.9503041*qe)/li);return ja(116*at-16,500*(tt-at),200*(at-ct))}function ot(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function kt(de){var Ee=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Ee*2.55):Ee}var jt=p.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});jt.forEach(function(de,Ee){jt.set(de,lt(Ee))});function ar(de){return typeof de=="function"?de:function(){return de}}p.functor=ar,p.xhr=Er(D);function Er(de){return function(Ee,qe,tt){return arguments.length===2&&typeof qe=="function"&&(tt=qe,qe=null),xr(Ee,qe,de,tt)}}function xr(de,Ee,qe,tt){var at={},ct=p.dispatch("beforesend","progress","load","error"),Nt={},St=new XMLHttpRequest,Jt=null;self.XDomainRequest&&!("withCredentials"in St)&&/^(http(s)?:)?\/\//.test(de)&&(St=new XDomainRequest),"onload"in St?St.onload=St.onerror=mr:St.onreadystatechange=function(){St.readyState>3&&mr()};function mr(){var gr=St.status,Hr;if(!gr&&Lr(St)||gr>=200&&gr<300||gr===304){try{Hr=qe.call(at,St)}catch(Vr){ct.error.call(at,Vr);return}ct.load.call(at,Hr)}else ct.error.call(at,St)}return St.onprogress=function(gr){var Hr=p.event;p.event=gr;try{ct.progress.call(at,St)}finally{p.event=Hr}},at.header=function(gr,Hr){return gr=(gr+"").toLowerCase(),arguments.length<2?Nt[gr]:(Hr==null?delete Nt[gr]:Nt[gr]=Hr+"",at)},at.mimeType=function(gr){return arguments.length?(Ee=gr==null?null:gr+"",at):Ee},at.responseType=function(gr){return arguments.length?(Jt=gr,at):Jt},at.response=function(gr){return qe=gr,at},["get","post"].forEach(function(gr){at[gr]=function(){return at.send.apply(at,[gr].concat(E(arguments)))}}),at.send=function(gr,Hr,Vr){if(arguments.length===2&&typeof Hr=="function"&&(Vr=Hr,Hr=null),St.open(gr,de,!0),Ee!=null&&!("accept"in Nt)&&(Nt.accept=Ee+",*/*"),St.setRequestHeader)for(var ca in Nt)St.setRequestHeader(ca,Nt[ca]);return Ee!=null&&St.overrideMimeType&&St.overrideMimeType(Ee),Jt!=null&&(St.responseType=Jt),Vr!=null&&at.on("error",Vr).on("load",function(Aa){Vr(null,Aa)}),ct.beforesend.call(at,St),St.send(Hr??null),at},at.abort=function(){return St.abort(),at},p.rebind(at,ct,"on"),tt==null?at:at.get(zr(tt))}function zr(de){return de.length===1?function(Ee,qe){de(Ee==null?qe:null)}:de}function Lr(de){var Ee=de.responseType;return Ee&&Ee!=="text"?de.response:de.responseText}p.dsv=function(de,Ee){var qe=new RegExp('["'+de+` +var _X=Object.create;var yE=Object.defineProperty;var xX=Object.getOwnPropertyDescriptor;var bX=Object.getOwnPropertyNames;var wX=Object.getPrototypeOf,TX=Object.prototype.hasOwnProperty;var AX=(oe,ye)=>()=>(ye||oe((ye={exports:{}}).exports,ye),ye.exports);var MX=(oe,ye,Fe,dt)=>{if(ye&&typeof ye=="object"||typeof ye=="function")for(let Zt of bX(ye))!TX.call(oe,Zt)&&Zt!==Fe&&yE(oe,Zt,{get:()=>ye[Zt],enumerable:!(dt=xX(ye,Zt))||dt.enumerable});return oe};var SX=(oe,ye,Fe)=>(Fe=oe!=null?_X(wX(oe)):{},MX(ye||!oe||!oe.__esModule?yE(Fe,"default",{value:oe,enumerable:!0}):Fe,oe));var CR=AX((kR,bx)=>{(function(oe,ye){typeof bx=="object"&&bx.exports?bx.exports=ye():oe.moduleName=ye()})(typeof self<"u"?self:kR,()=>{"use strict";var oe=(()=>{var ye=Object.create,Fe=Object.defineProperty,dt=Object.defineProperties,Zt=Object.getOwnPropertyDescriptor,yr=Object.getOwnPropertyDescriptors,Xr=Object.getOwnPropertyNames,ga=Object.getOwnPropertySymbols,ya=Object.getPrototypeOf,Cn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,On=(J,G)=>(G=Symbol[J])?G:Symbol.for("Symbol."+J),Fi=J=>{throw TypeError(J)},ho=(J,G,p)=>G in J?Fe(J,G,{enumerable:!0,configurable:!0,writable:!0,value:p}):J[G]=p,Li=(J,G)=>{for(var p in G||(G={}))Cn.call(G,p)&&ho(J,p,G[p]);if(ga)for(var p of ga(G))xn.call(G,p)&&ho(J,p,G[p]);return J},lo=(J,G)=>dt(J,yr(G)),Lo=(J,G)=>{var p={};for(var b in J)Cn.call(J,b)&&G.indexOf(b)<0&&(p[b]=J[b]);if(J!=null&&ga)for(var b of ga(J))G.indexOf(b)<0&&xn.call(J,b)&&(p[b]=J[b]);return p},zi=(J,G,p)=>function(){if(p)throw p[0];try{return J&&(G=(0,J[Xr(J)[0]])(J=0)),G}catch(E){throw p=[E],E}},ze=(J,G)=>function(){try{return G||(0,J[Xr(J)[0]])((G={exports:{}}).exports,G),G.exports}catch(b){throw G=0,b}},bu=(J,G)=>{for(var p in G)Fe(J,p,{get:G[p],enumerable:!0})},uf=(J,G,p,b)=>{if(G&&typeof G=="object"||typeof G=="function")for(let E of Xr(G))!Cn.call(J,E)&&E!==p&&Fe(J,E,{get:()=>G[E],enumerable:!(b=Zt(G,E))||b.enumerable});return J},Yl=(J,G,p)=>(p=J!=null?ye(ya(J)):{},uf(G||!J||!J.__esModule?Fe(p,"default",{value:J,enumerable:!0}):p,J)),Po=J=>uf(Fe({},"__esModule",{value:!0}),J),Oh=function(J,G){this[0]=J,this[1]=G},ad=J=>{var G=J[On("asyncIterator")],p=!1,b,E={};return G==null?(G=J[On("iterator")](),b=k=>E[k]=l=>G[k](l)):(G=G.call(J),b=k=>E[k]=l=>{if(p){if(p=!1,k==="throw")throw l;return l}return p=!0,{done:!1,value:new Oh(new Promise(e=>{var t=G[k](l);t instanceof Object||Fi("Object expected"),e(t)}),1)}}),E[On("iterator")]=()=>E,b("next"),"throw"in G?b("throw"):E.throw=k=>{throw k},"return"in G&&b("return"),E},ev=ze({"src/version.js"(J){"use strict";J.version="4.1.0"}}),DR=ze({"node_modules/native-promise-only/lib/npo.src.js"(J,G){(function(b,E,k){E[b]=E[b]||k(),typeof G<"u"&&G.exports&&(G.exports=E[b])})("Promise",typeof window<"u"?window:J,function(){"use strict";var b,E,k,l=Object.prototype.toString,e=typeof setImmediate<"u"?function(T){return setImmediate(T)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(T,S,M,C){return Object.defineProperty(T,S,{value:M,writable:!0,configurable:C!==!1})}}catch{b=function(S,M,C){return S[M]=C,S}}k=function(){var T,S,M;function C(_,w){this.fn=_,this.self=w,this.next=void 0}return{add:function(w,h){M=new C(w,h),S?S.next=M:T=M,S=M,M=void 0},drain:function(){var w=T;for(T=S=E=void 0;w;)w.fn.call(w.self),w=w.next}}}();function t(i,T){k.add(i,T),E||(E=e(k.drain))}function n(i){var T,S=typeof i;return i!=null&&(S=="object"||S=="function")&&(T=i.then),typeof T=="function"?T:!1}function r(){for(var i=0;i0&&t(r,S))}catch(M){s.call(new g(S),M)}}}function s(i){var T=this;T.triggered||(T.triggered=!0,T.def&&(T=T.def),T.msg=i,T.state=2,T.chain.length>0&&t(r,T))}function c(i,T,S,M){for(var C=0;CEe?1:de>=Ee?0:NaN}p.descending=function(de,Ee){return Eede?1:Ee>=de?0:NaN},p.min=function(de,Ee){var Ve=-1,tt=de.length,at,ct;if(arguments.length===1){for(;++Ve=ct){at=ct;break}for(;++Vect&&(at=ct)}else{for(;++Ve=ct){at=ct;break}for(;++Vect&&(at=ct)}return at},p.max=function(de,Ee){var Ve=-1,tt=de.length,at,ct;if(arguments.length===1){for(;++Ve=ct){at=ct;break}for(;++Veat&&(at=ct)}else{for(;++Ve=ct){at=ct;break}for(;++Veat&&(at=ct)}return at},p.extent=function(de,Ee){var Ve=-1,tt=de.length,at,ct,Nt;if(arguments.length===1){for(;++Ve=ct){at=Nt=ct;break}for(;++Vect&&(at=ct),Nt=ct){at=Nt=ct;break}for(;++Vect&&(at=ct),Nt1)return Nt/(Jt-1)},p.deviation=function(){var de=p.variance.apply(this,arguments);return de&&Math.sqrt(de)};function f(de){return{left:function(Ee,Ve,tt,at){for(arguments.length<3&&(tt=0),arguments.length<4&&(at=Ee.length);tt>>1;de(Ee[ct],Ve)<0?tt=ct+1:at=ct}return tt},right:function(Ee,Ve,tt,at){for(arguments.length<3&&(tt=0),arguments.length<4&&(at=Ee.length);tt>>1;de(Ee[ct],Ve)>0?at=ct:tt=ct+1}return tt}}}var v=f(s);p.bisectLeft=v.left,p.bisect=p.bisectRight=v.right,p.bisector=function(de){return f(de.length===1?function(Ee,Ve){return s(de(Ee),Ve)}:de)},p.shuffle=function(de,Ee,Ve){(tt=arguments.length)<3&&(Ve=de.length,tt<2&&(Ee=0));for(var tt=Ve-Ee,at,ct;tt;)ct=Math.random()*tt--|0,at=de[tt+Ee],de[tt+Ee]=de[ct+Ee],de[ct+Ee]=at;return de},p.permute=function(de,Ee){for(var Ve=Ee.length,tt=new Array(Ve);Ve--;)tt[Ve]=de[Ee[Ve]];return tt},p.pairs=function(de){for(var Ee=0,Ve=de.length-1,tt,at=de[0],ct=new Array(Ve<0?0:Ve);Ee=0;)for(Nt=de[Ee],Ve=Nt.length;--Ve>=0;)ct[--at]=Nt[Ve];return ct};var i=Math.abs;p.range=function(de,Ee,Ve){if(arguments.length<3&&(Ve=1,arguments.length<2&&(Ee=de,de=0)),(Ee-de)/Ve===1/0)throw new Error("infinite range");var tt=[],at=T(i(Ve)),ct=-1,Nt;if(de*=at,Ee*=at,Ve*=at,Ve<0)for(;(Nt=de+Ve*++ct)>Ee;)tt.push(Nt/at);else for(;(Nt=de+Ve*++ct)=Ee.length)return at?at.call(de,Jt):tt?Jt.sort(tt):Jt;for(var gr=-1,Hr=Jt.length,Vr=Ee[mr++],ca,Aa,Yr,oa=new M,fa;++gr=Ee.length)return St;var mr=[],gr=Ve[Jt++];return St.forEach(function(Hr,Vr){mr.push({key:Hr,values:Nt(Vr,Jt)})}),gr?mr.sort(function(Hr,Vr){return gr(Hr.key,Vr.key)}):mr}return de.map=function(St,Jt){return ct(Jt,St,0)},de.entries=function(St){return Nt(ct(p.map,St,0),0)},de.key=function(St){return Ee.push(St),de},de.sortKeys=function(St){return Ve[Ee.length-1]=St,de},de.sortValues=function(St){return tt=St,de},de.rollup=function(St){return at=St,de},de},p.set=function(de){var Ee=new O;if(de)for(var Ve=0,tt=de.length;Ve=0&&(tt=de.slice(Ve+1),de=de.slice(0,Ve)),de)return arguments.length<2?this[de].on(tt):this[de].on(tt,Ee);if(arguments.length===2){if(Ee==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(tt,null);return this}};function $(de){var Ee=[],Ve=new M;function tt(){for(var at=Ee,ct=-1,Nt=at.length,St;++ct=0&&(Ve=de.slice(0,Ee))!=="xmlns"&&(de=de.slice(Ee+1)),he.hasOwnProperty(Ve)?{space:he[Ve],local:de}:de}},q.attr=function(de,Ee){if(arguments.length<2){if(typeof de=="string"){var Ve=this.node();return de=p.ns.qualify(de),de.local?Ve.getAttributeNS(de.space,de.local):Ve.getAttribute(de)}for(Ee in de)this.each(xe(Ee,de[Ee]));return this}return this.each(xe(de,Ee))};function xe(de,Ee){de=p.ns.qualify(de);function Ve(){this.removeAttribute(de)}function tt(){this.removeAttributeNS(de.space,de.local)}function at(){this.setAttribute(de,Ee)}function ct(){this.setAttributeNS(de.space,de.local,Ee)}function Nt(){var Jt=Ee.apply(this,arguments);Jt==null?this.removeAttribute(de):this.setAttribute(de,Jt)}function St(){var Jt=Ee.apply(this,arguments);Jt==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,Jt)}return Ee==null?de.local?tt:Ve:typeof Ee=="function"?de.local?St:Nt:de.local?ct:at}function we(de){return de.trim().replace(/\s+/g," ")}q.classed=function(de,Ee){if(arguments.length<2){if(typeof de=="string"){var Ve=this.node(),tt=(de=Se(de)).length,at=-1;if(Ee=Ve.classList){for(;++at=0;)(ct=Ve[tt])&&(at&&at!==ct.nextSibling&&at.parentNode.insertBefore(ct,at),at=ct);return this},q.sort=function(de){de=Ae.apply(this,arguments);for(var Ee=-1,Ve=this.length;++Ee=Ee&&(Ee=at+1);!(Jt=Nt[Ee])&&++Ee0&&(de=de.slice(0,at));var Nt=Tt.get(de);Nt&&(de=Nt,ct=$t);function St(){var gr=this[tt];gr&&(this.removeEventListener(de,gr,gr.$),delete this[tt])}function Jt(){var gr=ct(Ee,E(arguments));St.call(this),this.addEventListener(de,this[tt]=gr,gr.$=Ve),gr._=Ee}function mr(){var gr=new RegExp("^__on([^.]+)"+p.requote(de)+"$"),Hr;for(var Vr in this)if(Hr=Vr.match(gr)){var ca=this[Vr];this.removeEventListener(Hr[1],ca,ca.$),delete this[Vr]}}return at?Ee?Jt:St:Ee?j:mr}var Tt=p.map({mouseenter:"mouseover",mouseleave:"mouseout"});k&&Tt.forEach(function(de){"on"+de in k&&Tt.remove(de)});function At(de,Ee){return function(Ve){var tt=p.event;p.event=Ve,Ee[0]=this.__data__;try{de.apply(this,Ee)}finally{p.event=tt}}}function $t(de,Ee){var Ve=At(de,Ee);return function(tt){var at=this,ct=tt.relatedTarget;(!ct||ct!==at&&!(ct.compareDocumentPosition(at)&8))&&Ve.call(at,tt)}}var rr,_r=0;function Xt(de){var Ee=".dragsuppress-"+ ++_r,Ve="click"+Ee,tt=p.select(e(de)).on("touchmove"+Ee,Q).on("dragstart"+Ee,Q).on("selectstart"+Ee,Q);if(rr==null&&(rr="onselectstart"in de?!1:F(de.style,"userSelect")),rr){var at=l(de).style,ct=at[rr];at[rr]="none"}return function(Nt){if(tt.on(Ee,null),rr&&(at[rr]=ct),Nt){var St=function(){tt.on(Ve,null)};tt.on(Ve,function(){Q(),St()},!0),setTimeout(St,0)}}}p.mouse=function(de){return Ot(de,re())};var or=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ot(de,Ee){Ee.changedTouches&&(Ee=Ee.changedTouches[0]);var Ve=de.ownerSVGElement||de;if(Ve.createSVGPoint){var tt=Ve.createSVGPoint();if(or<0){var at=e(de);if(at.scrollX||at.scrollY){Ve=p.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var ct=Ve[0][0].getScreenCTM();or=!(ct.f||ct.e),Ve.remove()}}return or?(tt.x=Ee.pageX,tt.y=Ee.pageY):(tt.x=Ee.clientX,tt.y=Ee.clientY),tt=tt.matrixTransform(de.getScreenCTM().inverse()),[tt.x,tt.y]}var Nt=de.getBoundingClientRect();return[Ee.clientX-Nt.left-de.clientLeft,Ee.clientY-Nt.top-de.clientTop]}p.touch=function(de,Ee,Ve){if(arguments.length<3&&(Ve=Ee,Ee=re().changedTouches),Ee){for(var tt=0,at=Ee.length,ct;tt0?1:de<0?-1:0}function Pt(de,Ee,Ve){return(Ee[0]-de[0])*(Ve[1]-de[1])-(Ee[1]-de[1])*(Ve[0]-de[0])}function Ct(de){return de>1?0:de<-1?Ne:Math.acos(de)}function qt(de){return de>1?Je:de<-1?-Je:Math.asin(de)}function Vt(de){return((de=Math.exp(de))-1/de)/2}function Ht(de){return((de=Math.exp(de))+1/de)/2}function Sr(de){return((de=Math.exp(2*de))-1)/(de+1)}function Kr(de){return(de=Math.sin(de/2))*de}var Yt=Math.SQRT2,Rt=2,nr=4;p.interpolateZoom=function(de,Ee){var Ve=de[0],tt=de[1],at=de[2],ct=Ee[0],Nt=Ee[1],St=Ee[2],Jt=ct-Ve,mr=Nt-tt,gr=Jt*Jt+mr*mr,Hr,Vr;if(gr0&&(be=be.transition().duration(Nt)),be.call(Ma.event)}function xi(){oa&&oa.domain(Yr.range().map(function(be){return(be-de.x)/de.k}).map(Yr.invert)),Ea&&Ea.domain(fa.range().map(function(be){return(be-de.y)/de.k}).map(fa.invert))}function di(be){St++||be({type:"zoomstart"})}function uo(be){xi(),be({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function pe(be){--St||(be({type:"zoomend"}),Ve=null)}function y(){var be=this,Re=Aa.of(be,arguments),je=0,Ze=p.select(e(be)).on(mr,Dt).on(gr,Gt),ut=sa(p.mouse(be)),ft=Xt(be);Qi.call(be),di(Re);function Dt(){je=1,zn(p.mouse(be),ut),uo(Re)}function Gt(){Ze.on(mr,null).on(gr,null),ft(je),pe(Re)}}function N(){var be=this,Re=Aa.of(be,arguments),je={},Ze=0,ut,ft=".zoom-"+p.event.changedTouches[0].identifier,Dt="touchmove"+ft,Gt="touchend"+ft,Kt=[],st=p.select(be),It=Xt(be);ir(),di(Re),st.on(Jt,null).on(Vr,ir);function Ut(){var hr=p.touches(be);return ut=de.k,hr.forEach(function(vr){vr.identifier in je&&(je[vr.identifier]=sa(vr))}),hr}function ir(){var hr=p.event.target;p.select(hr).on(Dt,dr).on(Gt,Ar),Kt.push(hr);for(var vr=p.event.changedTouches,Or=0,Cr=vr.length;Or1){var Ta=ta[0],Ra=ta[1],ua=Ta[0]-Ra[0],ia=Ta[1]-Ra[1];Ze=ua*ua+ia*ia}}function dr(){var hr=p.touches(be),vr,Or,Cr,ta;Qi.call(be);for(var ka=0,Ta=hr.length;ka1?1:Ee,Ve=Ve<0?0:Ve>1?1:Ve,at=Ve<=.5?Ve*(1+Ee):Ve+Ee-Ve*Ee,tt=2*Ve-at;function ct(St){return St>360?St-=360:St<0&&(St+=360),St<60?tt+(at-tt)*St/60:St<180?at:St<240?tt+(at-tt)*(240-St)/60:tt}function Nt(St){return Math.round(ct(St)*255)}return new Oa(Nt(de+120),Nt(de),Nt(de-120))}p.hcl=La;function La(de,Ee,Ve){return this instanceof La?(this.h=+de,this.c=+Ee,void(this.l=+Ve)):arguments.length<2?de instanceof La?new La(de.h,de.c,de.l):de instanceof ja?en(de.l,de.a,de.b):en((de=Dr((de=p.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new La(de,Ee,Ve)}var un=La.prototype=new Qr;un.brighter=function(de){return new La(this.h,this.c,Math.min(100,this.l+Nn*(arguments.length?de:1)))},un.darker=function(de){return new La(this.h,this.c,Math.max(0,this.l-Nn*(arguments.length?de:1)))},un.rgb=function(){return Xa(this.h,this.c,this.l).rgb()};function Xa(de,Ee,Ve){return isNaN(de)&&(de=0),isNaN(Ee)&&(Ee=0),new ja(Ve,Math.cos(de*=et)*Ee,Math.sin(de)*Ee)}p.lab=ja;function ja(de,Ee,Ve){return this instanceof ja?(this.l=+de,this.a=+Ee,void(this.b=+Ve)):arguments.length<2?de instanceof ja?new ja(de.l,de.a,de.b):de instanceof La?Xa(de.h,de.c,de.l):Dr((de=Oa(de)).r,de.g,de.b):new ja(de,Ee,Ve)}var Nn=18,yn=.95047,Un=1,li=1.08883,Yn=ja.prototype=new Qr;Yn.brighter=function(de){return new ja(Math.min(100,this.l+Nn*(arguments.length?de:1)),this.a,this.b)},Yn.darker=function(de){return new ja(Math.max(0,this.l-Nn*(arguments.length?de:1)),this.a,this.b)},Yn.rgb=function(){return on(this.l,this.a,this.b)};function on(de,Ee,Ve){var tt=(de+16)/116,at=tt+Ee/500,ct=tt-Ve/200;return at=vi(at)*yn,tt=vi(tt)*Un,ct=vi(ct)*li,new Oa(Ja(3.2404542*at-1.5371385*tt-.4985314*ct),Ja(-.969266*at+1.8760108*tt+.041556*ct),Ja(.0556434*at-.2040259*tt+1.0572252*ct))}function en(de,Ee,Ve){return de>0?new La(Math.atan2(Ve,Ee)*Mt,Math.sqrt(Ee*Ee+Ve*Ve),de):new La(NaN,NaN,de)}function vi(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function Yi(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function Ja(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}p.rgb=Oa;function Oa(de,Ee,Ve){return this instanceof Oa?(this.r=~~de,this.g=~~Ee,void(this.b=~~Ve)):arguments.length<2?de instanceof Oa?new Oa(de.r,de.g,de.b):Tr(""+de,Oa,Pa):new Oa(de,Ee,Ve)}function lt(de){return new Oa(de>>16,de>>8&255,de&255)}function rt(de){return lt(de)+""}var fr=Oa.prototype=new Qr;fr.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Ee=this.r,Ve=this.g,tt=this.b,at=30;return!Ee&&!Ve&&!tt?new Oa(at,at,at):(Ee&&Ee>4,tt=tt>>4|tt,at=Jt&240,at=at>>4|at,ct=Jt&15,ct=ct<<4|ct):de.length===7&&(tt=(Jt&16711680)>>16,at=(Jt&65280)>>8,ct=Jt&255)),Ee(tt,at,ct))}function Ir(de,Ee,Ve){var tt=Math.min(de/=255,Ee/=255,Ve/=255),at=Math.max(de,Ee,Ve),ct=at-tt,Nt,St,Jt=(at+tt)/2;return ct?(St=Jt<.5?ct/(at+tt):ct/(2-at-tt),de==at?Nt=(Ee-Ve)/ct+(Ee0&&Jt<1?0:Nt),new Zr(Nt,St,Jt)}function Dr(de,Ee,Ve){de=ot(de),Ee=ot(Ee),Ve=ot(Ve);var tt=Yi((.4124564*de+.3575761*Ee+.1804375*Ve)/yn),at=Yi((.2126729*de+.7151522*Ee+.072175*Ve)/Un),ct=Yi((.0193339*de+.119192*Ee+.9503041*Ve)/li);return ja(116*at-16,500*(tt-at),200*(at-ct))}function ot(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function kt(de){var Ee=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Ee*2.55):Ee}var jt=p.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});jt.forEach(function(de,Ee){jt.set(de,lt(Ee))});function ar(de){return typeof de=="function"?de:function(){return de}}p.functor=ar,p.xhr=Er(D);function Er(de){return function(Ee,Ve,tt){return arguments.length===2&&typeof Ve=="function"&&(tt=Ve,Ve=null),xr(Ee,Ve,de,tt)}}function xr(de,Ee,Ve,tt){var at={},ct=p.dispatch("beforesend","progress","load","error"),Nt={},St=new XMLHttpRequest,Jt=null;self.XDomainRequest&&!("withCredentials"in St)&&/^(http(s)?:)?\/\//.test(de)&&(St=new XDomainRequest),"onload"in St?St.onload=St.onerror=mr:St.onreadystatechange=function(){St.readyState>3&&mr()};function mr(){var gr=St.status,Hr;if(!gr&&Lr(St)||gr>=200&&gr<300||gr===304){try{Hr=Ve.call(at,St)}catch(Vr){ct.error.call(at,Vr);return}ct.load.call(at,Hr)}else ct.error.call(at,St)}return St.onprogress=function(gr){var Hr=p.event;p.event=gr;try{ct.progress.call(at,St)}finally{p.event=Hr}},at.header=function(gr,Hr){return gr=(gr+"").toLowerCase(),arguments.length<2?Nt[gr]:(Hr==null?delete Nt[gr]:Nt[gr]=Hr+"",at)},at.mimeType=function(gr){return arguments.length?(Ee=gr==null?null:gr+"",at):Ee},at.responseType=function(gr){return arguments.length?(Jt=gr,at):Jt},at.response=function(gr){return Ve=gr,at},["get","post"].forEach(function(gr){at[gr]=function(){return at.send.apply(at,[gr].concat(E(arguments)))}}),at.send=function(gr,Hr,Vr){if(arguments.length===2&&typeof Hr=="function"&&(Vr=Hr,Hr=null),St.open(gr,de,!0),Ee!=null&&!("accept"in Nt)&&(Nt.accept=Ee+",*/*"),St.setRequestHeader)for(var ca in Nt)St.setRequestHeader(ca,Nt[ca]);return Ee!=null&&St.overrideMimeType&&St.overrideMimeType(Ee),Jt!=null&&(St.responseType=Jt),Vr!=null&&at.on("error",Vr).on("load",function(Aa){Vr(null,Aa)}),ct.beforesend.call(at,St),St.send(Hr??null),at},at.abort=function(){return St.abort(),at},p.rebind(at,ct,"on"),tt==null?at:at.get(zr(tt))}function zr(de){return de.length===1?function(Ee,Ve){de(Ee==null?Ve:null)}:de}function Lr(de){var Ee=de.responseType;return Ee&&Ee!=="text"?de.response:de.responseText}p.dsv=function(de,Ee){var Ve=new RegExp('["'+de+` ]`),tt=de.charCodeAt(0);function at(mr,gr,Hr){arguments.length<3&&(Hr=gr,gr=null);var Vr=xr(mr,Ee,gr==null?ct:Nt(gr),Hr);return Vr.row=function(ca){return arguments.length?Vr.response((gr=ca)==null?ct:Nt(ca)):gr},Vr}function ct(mr){return at.parse(mr.responseText)}function Nt(mr){return function(gr){return at.parse(gr.responseText,mr)}}at.parse=function(mr,gr){var Hr;return at.parseRows(mr,function(Vr,ca){if(Hr)return Hr(Vr,ca-1);var Aa=function(Yr){for(var oa={},fa=Vr.length,Ea=0;Ea=Aa)return Vr;if(Ea)return Ea=!1,Hr;var hn=Yr;if(mr.charCodeAt(hn)===34){for(var Tn=hn;Tn++24?(isFinite(Ee)&&(clearTimeout(pn),pn=setTimeout(rn,Ee)),wa=0):(wa=1,tn(rn))}p.timer.flush=function(){Ri(),Gn()};function Ri(){for(var de=Date.now(),Ee=aa;Ee;)de>=Ee.t&&Ee.c(de-Ee.t)&&(Ee.c=null),Ee=Ee.n;return de}function Gn(){for(var de,Ee=aa,qe=1/0;Ee;)Ee.c?(Ee.t=0;--St)Yr.push(at[mr[Hr[St]][2]]);for(St=+ca;St1&&Pt(de[qe[tt-2]],de[qe[tt-1]],de[at])<=0;)--tt;qe[tt++]=at}return qe.slice(0,tt)}function Ai(de,Ee){return de[0]-Ee[0]||de[1]-Ee[1]}p.geom.polygon=function(de){return G(de,jn),de};var jn=p.geom.polygon.prototype=[];jn.area=function(){for(var de=-1,Ee=this.length,qe,tt=this[Ee-1],at=0;++deht)St=St.L;else if(Nt=Ee-Wo(St,qe),Nt>ht){if(!St.R){tt=St;break}St=St.R}else{ct>-ht?(tt=St.P,at=St):Nt>-ht?(tt=St,at=St.N):tt=at=St;break}var Jt=go(de);if(oo.insert(tt,Jt),!(!tt&&!at)){if(tt===at){Xi(tt),at=go(tt.site),oo.insert(Jt,at),Jt.edge=at.edge=Vo(tt.site,Jt.site),Io(tt),Io(at);return}if(!at){Jt.edge=Vo(tt.site,Jt.site);return}Xi(tt),Xi(at);var mr=tt.site,gr=mr.x,Hr=mr.y,Vr=de.x-gr,ca=de.y-Hr,Aa=at.site,Yr=Aa.x-gr,oa=Aa.y-Hr,fa=2*(Vr*oa-ca*Yr),Ea=Vr*Vr+ca*ca,Ma=Yr*Yr+oa*oa,sa={x:(oa*Ea-ca*Ma)/fa+gr,y:(Vr*Ma-Yr*Ea)/fa+Hr};Ts(at.edge,mr,Aa,sa),Jt.edge=Vo(mr,de,null,sa),at.edge=Vo(de,Aa,null,sa),Io(tt),Io(at)}}function jo(de,Ee){var qe=de.site,tt=qe.x,at=qe.y,ct=at-Ee;if(!ct)return tt;var Nt=de.P;if(!Nt)return-1/0;qe=Nt.site;var St=qe.x,Jt=qe.y,mr=Jt-Ee;if(!mr)return St;var gr=St-tt,Hr=1/ct-1/mr,Vr=gr/mr;return Hr?(-Vr+Math.sqrt(Vr*Vr-2*Hr*(gr*gr/(-2*mr)-Jt+mr/2+at-ct/2)))/Hr+tt:(tt+St)/2}function Wo(de,Ee){var qe=de.N;if(qe)return jo(qe,Ee);var tt=de.site;return tt.y===Ee?tt.x:1/0}function to(de){this.site=de,this.edges=[]}to.prototype.prepare=function(){for(var de=this.edges,Ee=de.length,qe;Ee--;)qe=de[Ee].edge,(!qe.b||!qe.a)&&de.splice(Ee,1);return de.sort(pi),de.length};function wo(de){for(var Ee=de[0][0],qe=de[1][0],tt=de[0][1],at=de[1][1],ct,Nt,St,Jt,mr=io,gr=mr.length,Hr,Vr,ca,Aa,Yr,oa;gr--;)if(Hr=mr[gr],!(!Hr||!Hr.prepare()))for(ca=Hr.edges,Aa=ca.length,Vr=0;Vrht||i(Jt-Nt)>ht)&&(ca.splice(Vr,0,new Bo(Vs(Hr.site,oa,i(St-Ee)ht?{x:Ee,y:i(ct-Ee)ht?{x:i(Nt-at)ht?{x:qe,y:i(ct-qe)ht?{x:i(Nt-tt)=-De)){var Vr=Jt*Jt+mr*mr,ca=gr*gr+oa*oa,Aa=(oa*Vr-mr*ca)/Hr,Yr=(Jt*ca-gr*Vr)/Hr,oa=Yr+St,fa=Mi.pop()||new Vi;fa.arc=de,fa.site=at,fa.x=Aa+Nt,fa.y=oa+Math.sqrt(Aa*Aa+Yr*Yr),fa.cy=oa,de.circle=fa;for(var Ea=null,Ma=Hi._;Ma;)if(fa.y0)){if(Yr/=ca,ca<0){if(Yr0){if(Yr>Vr)return;Yr>Hr&&(Hr=Yr)}if(Yr=qe-St,!(!ca&&Yr<0)){if(Yr/=ca,ca<0){if(Yr>Vr)return;Yr>Hr&&(Hr=Yr)}else if(ca>0){if(Yr0)){if(Yr/=Aa,Aa<0){if(Yr0){if(Yr>Vr)return;Yr>Hr&&(Hr=Yr)}if(Yr=tt-Jt,!(!Aa&&Yr<0)){if(Yr/=Aa,Aa<0){if(Yr>Vr)return;Yr>Hr&&(Hr=Yr)}else if(Aa>0){if(Yr0&&(at.a={x:St+Hr*ca,y:Jt+Hr*Aa}),Vr<1&&(at.b={x:St+Vr*ca,y:Jt+Vr*Aa}),at}}}}}}function Uo(de){for(var Ee=qi,qe=Ko(de[0][0],de[0][1],de[1][0],de[1][1]),tt=Ee.length,at;tt--;)at=Ee[tt],(!Ls(at,de)||!qe(at)||i(at.a.x-at.b.x)=ct)return;if(gr>Vr){if(!tt)tt={x:Aa,y:Nt};else if(tt.y>=St)return;qe={x:Aa,y:St}}else{if(!tt)tt={x:Aa,y:St};else if(tt.y1)if(gr>Vr){if(!tt)tt={x:(Nt-fa)/oa,y:Nt};else if(tt.y>=St)return;qe={x:(St-fa)/oa,y:St}}else{if(!tt)tt={x:(St-fa)/oa,y:St};else if(tt.y=ct)return;qe={x:ct,y:oa*ct+fa}}else{if(!tt)tt={x:ct,y:oa*ct+fa};else if(tt.x=gr&&fa.x<=Vr&&fa.y>=Hr&&fa.y<=ca?[[gr,ca],[Vr,ca],[Vr,Hr],[gr,Hr]]:[];Ea.point=Jt[Yr]}),mr}function St(Jt){return Jt.map(function(mr,gr){return{x:Math.round(tt(mr,gr)/ht)*ht,y:Math.round(at(mr,gr)/ht)*ht,i:gr}})}return Nt.links=function(Jt){return hl(St(Jt)).edges.filter(function(mr){return mr.l&&mr.r}).map(function(mr){return{source:Jt[mr.l.i],target:Jt[mr.r.i]}})},Nt.triangles=function(Jt){var mr=[];return hl(St(Jt)).cells.forEach(function(gr,Hr){for(var Vr=gr.site,ca=gr.edges.sort(pi),Aa=-1,Yr=ca.length,oa,fa,Ea=ca[Yr-1].edge,Ma=Ea.l===Vr?Ea.r:Ea.l;++AaMa&&(Ma=gr.x),gr.y>sa&&(sa=gr.y),ca.push(gr.x),Aa.push(gr.y);else for(Yr=0;YrMa&&(Ma=hn),Tn>sa&&(sa=Tn),ca.push(hn),Aa.push(Tn)}var zn=Ma-fa,$n=sa-Ea;zn>$n?sa=Ea+zn:Ma=fa+$n;function xi(pe,y,N,ie,fe,be,Re,je){if(!(isNaN(N)||isNaN(ie)))if(pe.leaf){var Ze=pe.x,ut=pe.y;if(Ze!=null)if(i(Ze-N)+i(ut-ie)<.01)di(pe,y,N,ie,fe,be,Re,je);else{var ft=pe.point;pe.x=pe.y=pe.point=null,di(pe,ft,Ze,ut,fe,be,Re,je),di(pe,y,N,ie,fe,be,Re,je)}else pe.x=N,pe.y=ie,pe.point=y}else di(pe,y,N,ie,fe,be,Re,je)}function di(pe,y,N,ie,fe,be,Re,je){var Ze=(fe+Re)*.5,ut=(be+je)*.5,ft=N>=Ze,Dt=ie>=ut,Gt=Dt<<1|ft;pe.leaf=!1,pe=pe.nodes[Gt]||(pe.nodes[Gt]=Fl()),ft?fe=Ze:Re=Ze,Dt?be=ut:je=ut,xi(pe,y,N,ie,fe,be,Re,je)}var uo=Fl();if(uo.add=function(pe){xi(uo,pe,+Hr(pe,++Yr),+Vr(pe,Yr),fa,Ea,Ma,sa)},uo.visit=function(pe){pl(pe,uo,fa,Ea,Ma,sa)},uo.find=function(pe){return $u(uo,pe[0],pe[1],fa,Ea,Ma,sa)},Yr=-1,Ee==null){for(;++Yrct||Vr>Nt||ca=hn,$n=qe>=Tn,xi=$n<<1|zn,di=xi+4;xiqe&&(ct=Ee.slice(qe,ct),St[Nt]?St[Nt]+=ct:St[++Nt]=ct),(tt=tt[0])===(at=at[0])?St[Nt]?St[Nt]+=at:St[++Nt]=at:(St[++Nt]=null,Jt.push({i:Nt,x:vs(tt,at)})),qe=rl.lastIndex;return qe=0&&!(tt=p.interpolators[qe](de,Ee)););return tt}p.interpolators=[function(de,Ee){var qe=typeof Ee;return(qe==="string"?jt.has(Ee.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Ee)?uu:os:Ee instanceof Qr?uu:Array.isArray(Ee)?zu:qe==="object"&&isNaN(Ee)?tl:vs)(de,Ee)}],p.interpolateArray=zu;function zu(de,Ee){var qe=[],tt=[],at=de.length,ct=Ee.length,Nt=Math.min(de.length,Ee.length),St;for(St=0;St=0?de.slice(0,Ee):de,tt=Ee>=0?de.slice(Ee+1):"in";return qe=bc.get(qe)||Ku,tt=Lh.get(tt)||D,rh(tt(qe.apply(null,b.call(arguments,1))))};function rh(de){return function(Ee){return Ee<=0?0:Ee>=1?1:de(Ee)}}function Ju(de){return function(Ee){return 1-de(1-Ee)}}function ss(de){return function(Ee){return .5*(Ee<.5?de(2*Ee):2-de(2-2*Ee))}}function ah(de){return de*de}function wc(de){return de*de*de}function pc(de){if(de<=0)return 0;if(de>=1)return 1;var Ee=de*de,qe=Ee*de;return 4*(de<.5?qe:3*(de-Ee)+qe-.75)}function Nf(de){return function(Ee){return Math.pow(Ee,de)}}function Bu(de){return 1-Math.cos(de*Je)}function Tc(de){return Math.pow(2,10*(de-1))}function Ou(de){return 1-Math.sqrt(1-de*de)}function Gc(de,Ee){var qe;return arguments.length<2&&(Ee=.45),arguments.length?qe=Ee/We*Math.asin(1/de):(de=1,qe=Ee/4),function(tt){return 1+de*Math.pow(2,-10*tt)*Math.sin((tt-qe)*We/Ee)}}function pf(de){return de||(de=1.70158),function(Ee){return Ee*Ee*((de+1)*Ee-de)}}function $l(de){return de<1/2.75?7.5625*de*de:de<2/2.75?7.5625*(de-=1.5/2.75)*de+.75:de<2.5/2.75?7.5625*(de-=2.25/2.75)*de+.9375:7.5625*(de-=2.625/2.75)*de+.984375}p.interpolateHcl=jf;function jf(de,Ee){de=p.hcl(de),Ee=p.hcl(Ee);var qe=de.h,tt=de.c,at=de.l,ct=Ee.h-qe,Nt=Ee.c-tt,St=Ee.l-at;return isNaN(Nt)&&(Nt=0,tt=isNaN(tt)?Ee.c:tt),isNaN(ct)?(ct=0,qe=isNaN(qe)?Ee.h:qe):ct>180?ct-=360:ct<-180&&(ct+=360),function(Jt){return Xa(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateHsl=Hc;function Hc(de,Ee){de=p.hsl(de),Ee=p.hsl(Ee);var qe=de.h,tt=de.s,at=de.l,ct=Ee.h-qe,Nt=Ee.s-tt,St=Ee.l-at;return isNaN(Nt)&&(Nt=0,tt=isNaN(tt)?Ee.s:tt),isNaN(ct)?(ct=0,qe=isNaN(qe)?Ee.h:qe):ct>180?ct-=360:ct<-180&&(ct+=360),function(Jt){return Pa(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateLab=Wc;function Wc(de,Ee){de=p.lab(de),Ee=p.lab(Ee);var qe=de.l,tt=de.a,at=de.b,ct=Ee.l-qe,Nt=Ee.a-tt,St=Ee.b-at;return function(Jt){return on(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateRound=Qu;function Qu(de,Ee){return Ee-=de,function(qe){return Math.round(de+Ee*qe)}}p.transform=function(de){var Ee=k.createElementNS(p.ns.prefix.svg,"g");return(p.transform=function(qe){if(qe!=null){Ee.setAttribute("transform",qe);var tt=Ee.transform.baseVal.consolidate()}return new Yc(tt?tt.matrix:Xc)})(de)};function Yc(de){var Ee=[de.a,de.b],qe=[de.c,de.d],tt=Uf(Ee),at=Nu(Ee,qe),ct=Uf(al(qe,Ee,-at))||0;Ee[0]*qe[1]180?Ee+=360:Ee-de>180&&(de+=360),tt.push({i:qe.push(ju(qe)+"rotate(",null,")")-2,x:vs(de,Ee)})):Ee&&qe.push(ju(qe)+"rotate("+Ee+")")}function ec(de,Ee,qe,tt){de!==Ee?tt.push({i:qe.push(ju(qe)+"skewX(",null,")")-2,x:vs(de,Ee)}):Ee&&qe.push(ju(qe)+"skewX("+Ee+")")}function cu(de,Ee,qe,tt){if(de[0]!==Ee[0]||de[1]!==Ee[1]){var at=qe.push(ju(qe)+"scale(",null,",",null,")");tt.push({i:at-4,x:vs(de[0],Ee[0])},{i:at-2,x:vs(de[1],Ee[1])})}else(Ee[0]!==1||Ee[1]!==1)&&qe.push(ju(qe)+"scale("+Ee+")")}function tc(de,Ee){var qe=[],tt=[];return de=p.transform(de),Ee=p.transform(Ee),Ac(de.translate,Ee.translate,qe,tt),Zc(de.rotate,Ee.rotate,qe,tt),ec(de.skew,Ee.skew,qe,tt),cu(de.scale,Ee.scale,qe,tt),de=Ee=null,function(at){for(var ct=-1,Nt=tt.length,St;++ct0?ct=sa:(qe.c=null,qe.t=NaN,qe=null,Ee.end({type:"end",alpha:ct=0})):sa>0&&(Ee.start({type:"start",alpha:ct=sa}),qe=ai(de.tick)),de):ct},de.start=function(){var sa,hn=ca.length,Tn=Aa.length,zn=tt[0],$n=tt[1],xi,di;for(sa=0;sa=0;)ct.push(gr=mr[Jt]),gr.parent=St,gr.depth=St.depth+1;qe&&(St.value=0),St.children=mr}else qe&&(St.value=+qe.call(tt,St,St.depth)||0),delete St.children;return El(at,function(Hr){var Vr,ca;de&&(Vr=Hr.children)&&Vr.sort(de),qe&&(ca=Hr.parent)&&(ca.value+=Hr.value)}),Nt}return tt.sort=function(at){return arguments.length?(de=at,tt):de},tt.children=function(at){return arguments.length?(Ee=at,tt):Ee},tt.value=function(at){return arguments.length?(qe=at,tt):qe},tt.revalue=function(at){return qe&&(Sl(at,function(ct){ct.children&&(ct.value=0)}),El(at,function(ct){var Nt;ct.children||(ct.value=+qe.call(tt,ct,ct.depth)||0),(Nt=ct.parent)&&(Nt.value+=ct.value)})),at},tt};function fu(de,Ee){return p.rebind(de,Ee,"sort","children","value"),de.nodes=de,de.links=_l,de}function Sl(de,Ee){for(var qe=[de];(de=qe.pop())!=null;)if(Ee(de),(at=de.children)&&(tt=at.length))for(var tt,at;--tt>=0;)qe.push(at[tt])}function El(de,Ee){for(var qe=[de],tt=[];(de=qe.pop())!=null;)if(tt.push(de),(Nt=de.children)&&(ct=Nt.length))for(var at=-1,ct,Nt;++atat&&(at=St),tt.push(St)}for(Nt=0;Nttt&&(qe=Ee,tt=at);return qe}function _f(de){return de.reduce(Mu,0)}function Mu(de,Ee){return de+Ee[1]}p.layout.histogram=function(){var de=!0,Ee=Number,qe=Vu,tt=ic;function at(ct,Vr){for(var St=[],Jt=ct.map(Ee,this),mr=qe.call(this,Jt,Vr),gr=tt.call(this,mr,Jt,Vr),Hr,Vr=-1,ca=Jt.length,Aa=gr.length-1,Yr=de?1:1/ca,oa;++Vr0)for(Vr=-1;++Vr=mr[0]&&oa<=mr[1]&&(Hr=St[p.bisect(gr,oa,1,Aa)-1],Hr.y+=Yr,Hr.push(ct[Vr]));return St}return at.value=function(ct){return arguments.length?(Ee=ct,at):Ee},at.range=function(ct){return arguments.length?(qe=ar(ct),at):qe},at.bins=function(ct){return arguments.length?(tt=typeof ct=="number"?function(Nt){return Sc(Nt,ct)}:ar(ct),at):tt},at.frequency=function(ct){return arguments.length?(de=!!ct,at):de},at};function ic(de,Ee){return Sc(de,Math.ceil(Math.log(Ee.length)/Math.LN2+1))}function Sc(de,Ee){for(var qe=-1,tt=+de[0],at=(de[1]-tt)/Ee,ct=[];++qe<=Ee;)ct[qe]=at*qe+tt;return ct}function Vu(de){return[p.min(de),p.max(de)]}p.layout.pack=function(){var de=p.layout.hierarchy().sort(xo),Ee=0,qe=[1,1],tt;function at(ct,Nt){var St=de.call(this,ct,Nt),Jt=St[0],mr=qe[0],gr=qe[1],Hr=tt==null?Math.sqrt:typeof tt=="function"?tt:function(){return tt};if(Jt.x=Jt.y=0,El(Jt,function(ca){ca.r=+Hr(ca.value)}),El(Jt,xf),Ee){var Vr=Ee*(tt?1:Math.max(2*Jt.r/mr,2*Jt.r/gr))/2;El(Jt,function(ca){ca.r+=Vr}),El(Jt,xf),El(Jt,function(ca){ca.r-=Vr})}return Hf(Jt,mr/2,gr/2,tt?1:1/Math.max(2*Jt.r/mr,2*Jt.r/gr)),St}return at.size=function(ct){return arguments.length?(qe=ct,at):qe},at.radius=function(ct){return arguments.length?(tt=ct==null||typeof ct=="function"?ct:+ct,at):tt},at.padding=function(ct){return arguments.length?(Ee=+ct,at):Ee},fu(at,de)};function xo(de,Ee){return de.value-Ee.value}function Ec(de,Ee){var qe=de._pack_next;de._pack_next=Ee,Ee._pack_prev=de,Ee._pack_next=qe,qe._pack_prev=Ee}function xh(de,Ee){de._pack_next=Ee,Ee._pack_prev=de}function Vf(de,Ee){var qe=Ee.x-de.x,tt=Ee.y-de.y,at=de.r+Ee.r;return .999*at*at>qe*qe+tt*tt}function xf(de){if(!(Ee=de.children)||!(Vr=Ee.length))return;var Ee,qe=1/0,tt=-1/0,at=1/0,ct=-1/0,Nt,St,Jt,mr,gr,Hr,Vr;function ca(sa){qe=Math.min(sa.x-sa.r,qe),tt=Math.max(sa.x+sa.r,tt),at=Math.min(sa.y-sa.r,at),ct=Math.max(sa.y+sa.r,ct)}if(Ee.forEach(Gf),Nt=Ee[0],Nt.x=-Nt.r,Nt.y=0,ca(Nt),Vr>1&&(St=Ee[1],St.x=St.r,St.y=0,ca(St),Vr>2))for(Jt=Ee[2],il(Nt,St,Jt),ca(Jt),Ec(Nt,Jt),Nt._pack_prev=Jt,Ec(Jt,St),St=Nt._pack_next,mr=3;mroa.x&&(oa=hn),hn.depth>fa.depth&&(fa=hn)});var Ea=Ee(Yr,oa)/2-Yr.x,Ma=qe[0]/(oa.x+Ee(oa,Yr)/2+Ea),sa=qe[1]/(fa.depth||1);Sl(ca,function(hn){hn.x=(hn.x+Ea)*Ma,hn.y=hn.depth*sa})}return Vr}function ct(gr){for(var Hr={A:null,children:[gr]},Vr=[Hr],ca;(ca=Vr.pop())!=null;)for(var Aa=ca.children,Yr,oa=0,fa=Aa.length;oa0&&(Lc(Ft(Yr,gr,Vr),gr,hn),fa+=hn,Ea+=hn),Ma+=Yr.m,fa+=ca.m,sa+=oa.m,Ea+=Aa.m;Yr&&!Cc(Aa)&&(Aa.t=Yr,Aa.m+=Ma-Ea),ca&&!kc(oa)&&(oa.t=ca,oa.m+=fa-sa,Vr=gr)}return Vr}function mr(gr){gr.x*=qe[0],gr.y=gr.depth*qe[1]}return at.separation=function(gr){return arguments.length?(Ee=gr,at):Ee},at.size=function(gr){return arguments.length?(tt=(qe=gr)==null?mr:null,at):tt?null:qe},at.nodeSize=function(gr){return arguments.length?(tt=(qe=gr)==null?null:mr,at):tt?qe:null},fu(at,de)};function kl(de,Ee){return de.parent==Ee.parent?1:2}function kc(de){var Ee=de.children;return Ee.length?Ee[0]:de.t}function Cc(de){var Ee=de.children,qe;return(qe=Ee.length)?Ee[qe-1]:de.t}function Lc(de,Ee,qe){var tt=qe/(Ee.i-de.i);Ee.c-=tt,Ee.s+=qe,de.c+=tt,Ee.z+=qe,Ee.m+=qe}function vc(de){for(var Ee=0,qe=0,tt=de.children,at=tt.length,ct;--at>=0;)ct=tt[at],ct.z+=Ee,ct.m+=Ee,Ee+=ct.s+(qe+=ct.c)}function Ft(de,Ee,qe){return de.a.parent===Ee.parent?de.a:qe}p.layout.cluster=function(){var de=p.layout.hierarchy().sort(null).value(null),Ee=kl,qe=[1,1],tt=!1;function at(ct,Nt){var St=de.call(this,ct,Nt),Jt=St[0],mr,gr=0;El(Jt,function(Yr){var oa=Yr.children;oa&&oa.length?(Yr.x=Fr(oa),Yr.y=tr(oa)):(Yr.x=mr?gr+=Ee(Yr,mr):0,Yr.y=0,mr=Yr)});var Hr=wr(Jt),Vr=ea(Jt),ca=Hr.x-Ee(Hr,Vr)/2,Aa=Vr.x+Ee(Vr,Hr)/2;return El(Jt,tt?function(Yr){Yr.x=(Yr.x-Jt.x)*qe[0],Yr.y=(Jt.y-Yr.y)*qe[1]}:function(Yr){Yr.x=(Yr.x-ca)/(Aa-ca)*qe[0],Yr.y=(1-(Jt.y?Yr.y/Jt.y:1))*qe[1]}),St}return at.separation=function(ct){return arguments.length?(Ee=ct,at):Ee},at.size=function(ct){return arguments.length?(tt=(qe=ct)==null,at):tt?null:qe},at.nodeSize=function(ct){return arguments.length?(tt=(qe=ct)!=null,at):tt?qe:null},fu(at,de)};function tr(de){return 1+p.max(de,function(Ee){return Ee.y})}function Fr(de){return de.reduce(function(Ee,qe){return Ee+qe.x},0)/de.length}function wr(de){var Ee=de.children;return Ee&&Ee.length?wr(Ee[0]):de}function ea(de){var Ee=de.children,qe;return Ee&&(qe=Ee.length)?ea(Ee[qe-1]):de}p.layout.treemap=function(){var de=p.layout.hierarchy(),Ee=Math.round,qe=[1,1],tt=null,at=ba,ct=!1,Nt,St="squarify",Jt=.5*(1+Math.sqrt(5));function mr(Yr,oa){for(var fa=-1,Ea=Yr.length,Ma,sa;++fa0;)Ea.push(sa=Ma[$n-1]),Ea.area+=sa.area,St!=="squarify"||(Tn=Vr(Ea,zn))<=hn?(Ma.pop(),hn=Tn):(Ea.area-=Ea.pop().area,ca(Ea,zn,fa,!1),zn=Math.min(fa.dx,fa.dy),Ea.length=Ea.area=0,hn=1/0);Ea.length&&(ca(Ea,zn,fa,!0),Ea.length=Ea.area=0),oa.forEach(gr)}}function Hr(Yr){var oa=Yr.children;if(oa&&oa.length){var fa=at(Yr),Ea=oa.slice(),Ma,sa=[];for(mr(Ea,fa.dx*fa.dy/Yr.value),sa.area=0;Ma=Ea.pop();)sa.push(Ma),sa.area+=Ma.area,Ma.z!=null&&(ca(sa,Ma.z?fa.dx:fa.dy,fa,!Ea.length),sa.length=sa.area=0);oa.forEach(Hr)}}function Vr(Yr,oa){for(var fa=Yr.area,Ea,Ma=0,sa=1/0,hn=-1,Tn=Yr.length;++hnMa&&(Ma=Ea));return fa*=fa,oa*=oa,fa?Math.max(oa*Ma*Jt/fa,fa/(oa*sa*Jt)):1/0}function ca(Yr,oa,fa,Ea){var Ma=-1,sa=Yr.length,hn=fa.x,Tn=fa.y,zn=oa?Ee(Yr.area/oa):0,$n;if(oa==fa.dx){for((Ea||zn>fa.dy)&&(zn=fa.dy);++Mafa.dx)&&(zn=fa.dx);++Ma1);return de+Ee*tt*Math.sqrt(-2*Math.log(ct)/ct)}},logNormal:function(){var de=p.random.normal.apply(p,arguments);return function(){return Math.exp(de())}},bates:function(de){var Ee=p.random.irwinHall(de);return function(){return Ee()/de}},irwinHall:function(de){return function(){for(var Ee=0,qe=0;qe2?vn:mn,mr=tt?Tu:vf;return at=Jt(de,Ee,mr,qe),ct=Jt(Ee,de,mr,Fu),St}function St(Jt){return at(Jt)}return St.invert=function(Jt){return ct(Jt)},St.domain=function(Jt){return arguments.length?(de=Jt.map(Number),Nt()):de},St.range=function(Jt){return arguments.length?(Ee=Jt,Nt()):Ee},St.rangeRound=function(Jt){return St.range(Jt).interpolate(Qu)},St.clamp=function(Jt){return arguments.length?(tt=Jt,Nt()):tt},St.interpolate=function(Jt){return arguments.length?(qe=Jt,Nt()):qe},St.ticks=function(Jt){return ri(de,Jt)},St.tickFormat=function(Jt,mr){return d3_scale_linearTickFormat(de,Jt,mr)},St.nice=function(Jt){return _i(de,Jt),Nt()},St.copy=function(){return Sn(de,Ee,qe,tt)},Nt()}function yi(de,Ee){return p.rebind(de,Ee,"range","rangeRound","interpolate","clamp")}function _i(de,Ee){return Da(de,Ha(ki(de,Ee)[2])),Da(de,Ha(ki(de,Ee)[2])),de}function ki(de,Ee){Ee==null&&(Ee=10);var qe=Na(de),tt=qe[1]-qe[0],at=Math.pow(10,Math.floor(Math.log(tt/Ee)/Math.LN10)),ct=Ee/tt*at;return ct<=.15?at*=10:ct<=.35?at*=5:ct<=.75&&(at*=2),qe[0]=Math.ceil(qe[0]/at)*at,qe[1]=Math.floor(qe[1]/at)*at+at*.5,qe[2]=at,qe}function ri(de,Ee){return p.range.apply(p,ki(de,Ee))}var En={s:1,g:1,p:1,r:1,e:1};function Ln(de){return-Math.floor(Math.log(de)/Math.LN10+.01)}function Ni(de,Ee){var qe=Ln(Ee[2]);return de in En?Math.abs(qe-Ln(Math.max(i(Ee[0]),i(Ee[1]))))+ +(de!=="e"):qe-(de==="%")*2}p.scale.log=function(){return Zi(p.scale.linear().domain([0,1]),10,!0,[1,10])};function Zi(de,Ee,qe,tt){function at(St){return(qe?Math.log(St<0?0:St):-Math.log(St>0?0:-St))/Math.log(Ee)}function ct(St){return qe?Math.pow(Ee,St):-Math.pow(Ee,-St)}function Nt(St){return de(at(St))}return Nt.invert=function(St){return ct(de.invert(St))},Nt.domain=function(St){return arguments.length?(qe=St[0]>=0,de.domain((tt=St.map(Number)).map(at)),Nt):tt},Nt.base=function(St){return arguments.length?(Ee=+St,de.domain(tt.map(at)),Nt):Ee},Nt.nice=function(){var St=Da(tt.map(at),qe?Math:Co);return de.domain(St),tt=St.map(ct),Nt},Nt.ticks=function(){var St=Na(tt),Jt=[],mr=St[0],gr=St[1],Hr=Math.floor(at(mr)),Vr=Math.ceil(at(gr)),ca=Ee%1?2:Ee;if(isFinite(Vr-Hr)){if(qe){for(;Hr0;Aa--)Jt.push(ct(Hr)*Aa);for(Hr=0;Jt[Hr]gr;Vr--);Jt=Jt.slice(Hr,Vr)}return Jt},Nt.copy=function(){return Zi(de.copy(),Ee,qe,tt)},yi(Nt,de)}var Co={floor:function(de){return-Math.ceil(-de)},ceil:function(de){return-Math.floor(-de)}};p.scale.pow=function(){return Do(p.scale.linear(),1,[0,1])};function Do(de,Ee,qe){var tt=Fo(Ee),at=Fo(1/Ee);function ct(Nt){return de(tt(Nt))}return ct.invert=function(Nt){return at(de.invert(Nt))},ct.domain=function(Nt){return arguments.length?(de.domain((qe=Nt.map(Number)).map(tt)),ct):qe},ct.ticks=function(Nt){return ri(qe,Nt)},ct.tickFormat=function(Nt,St){return d3_scale_linearTickFormat(qe,Nt,St)},ct.nice=function(Nt){return ct.domain(_i(qe,Nt))},ct.exponent=function(Nt){return arguments.length?(tt=Fo(Ee=Nt),at=Fo(1/Ee),de.domain(qe.map(tt)),ct):Ee},ct.copy=function(){return Do(de.copy(),Ee,qe)},yi(ct,de)}function Fo(de){return function(Ee){return Ee<0?-Math.pow(-Ee,de):Math.pow(Ee,de)}}p.scale.sqrt=function(){return p.scale.pow().exponent(.5)},p.scale.ordinal=function(){return Yo([],{t:"range",a:[[]]})};function Yo(de,Ee){var qe,tt,at;function ct(St){return tt[((qe.get(St)||(Ee.t==="range"?qe.set(St,de.push(St)):NaN))-1)%tt.length]}function Nt(St,Jt){return p.range(de.length).map(function(mr){return St+Jt*mr})}return ct.domain=function(St){if(!arguments.length)return de;de=[],qe=new M;for(var Jt=-1,mr=St.length,gr;++Jt0?qe[ct-1]:de[0],ctVr?0:1;if(gr=Ke)return Jt(gr,Aa)+(mr?Jt(mr,1-Aa):"")+"Z";var Yr,oa,fa,Ea,Ma=0,sa=0,hn,Tn,zn,$n,xi,di,uo,pe,y=[];if((Ea=(+Nt.apply(this,arguments)||0)/2)&&(fa=tt===zl?Math.sqrt(mr*mr+gr*gr):+tt.apply(this,arguments),Aa||(sa*=-1),gr&&(sa=qt(fa/gr*Math.sin(Ea))),mr&&(Ma=qt(fa/mr*Math.sin(Ea)))),gr){hn=gr*Math.cos(Hr+sa),Tn=gr*Math.sin(Hr+sa),zn=gr*Math.cos(Vr-sa),$n=gr*Math.sin(Vr-sa);var N=Math.abs(Vr-Hr-2*sa)<=Ne?0:1;if(sa&&mc(hn,Tn,zn,$n)===Aa^N){var ie=(Hr+Vr)/2;hn=gr*Math.cos(ie),Tn=gr*Math.sin(ie),zn=$n=null}}else hn=Tn=0;if(mr){xi=mr*Math.cos(Vr-Ma),di=mr*Math.sin(Vr-Ma),uo=mr*Math.cos(Hr+Ma),pe=mr*Math.sin(Hr+Ma);var fe=Math.abs(Hr-Vr+2*Ma)<=Ne?0:1;if(Ma&&mc(xi,di,uo,pe)===1-Aa^fe){var be=(Hr+Vr)/2;xi=mr*Math.cos(be),di=mr*Math.sin(be),uo=pe=null}}else xi=di=0;if(ca>ht&&(Yr=Math.min(Math.abs(gr-mr)/2,+qe.apply(this,arguments)))>.001){oa=mr0?0:1}function Jc(de,Ee,qe,tt,at){var ct=de[0]-Ee[0],Nt=de[1]-Ee[1],St=(at?tt:-tt)/Math.sqrt(ct*ct+Nt*Nt),Jt=St*Nt,mr=-St*ct,gr=de[0]+Jt,Hr=de[1]+mr,Vr=Ee[0]+Jt,ca=Ee[1]+mr,Aa=(gr+Vr)/2,Yr=(Hr+ca)/2,oa=Vr-gr,fa=ca-Hr,Ea=oa*oa+fa*fa,Ma=qe-tt,sa=gr*ca-Vr*Hr,hn=(fa<0?-1:1)*Math.sqrt(Math.max(0,Ma*Ma*Ea-sa*sa)),Tn=(sa*fa-oa*hn)/Ea,zn=(-sa*oa-fa*hn)/Ea,$n=(sa*fa+oa*hn)/Ea,xi=(-sa*oa+fa*hn)/Ea,di=Tn-Aa,uo=zn-Yr,pe=$n-Aa,y=xi-Yr;return di*di+uo*uo>pe*pe+y*y&&(Tn=$n,zn=xi),[[Tn-Jt,zn-mr],[Tn*qe/Ma,zn*qe/Ma]]}function oc(){return!0}function du(de){var Ee=no,qe=Di,tt=oc,at=Ql,ct=at.key,Nt=.7;function St(Jt){var mr=[],gr=[],Hr=-1,Vr=Jt.length,ca,Aa=ar(Ee),Yr=ar(qe);function oa(){mr.push("M",at(de(gr),Nt))}for(;++Hr1?de.join("L"):de+"Z"}function Eu(de){return de.join("L")+"Z"}function bf(de){for(var Ee=0,qe=de.length,tt=de[0],at=[tt[0],",",tt[1]];++Ee1&&at.push("H",tt[0]),at.join("")}function lh(de){for(var Ee=0,qe=de.length,tt=de[0],at=[tt[0],",",tt[1]];++Ee1){St=Ee[1],ct=de[Jt],Jt++,tt+="C"+(at[0]+Nt[0])+","+(at[1]+Nt[1])+","+(ct[0]-St[0])+","+(ct[1]-St[1])+","+ct[0]+","+ct[1];for(var mr=2;mr9&&(ct=qe*3/Math.sqrt(ct),Nt[St]=ct*tt,Nt[St+1]=ct*at));for(St=-1;++St<=Jt;)ct=(de[Math.min(Jt,St+1)][0]-de[Math.max(0,St-1)][0])/(6*(1+Nt[St]*Nt[St])),Ee.push([ct||0,Nt[St]*ct||0]);return Ee}function Pr(de){return de.length<3?Ql(de):de[0]+wf(de,Wt(de))}p.svg.line.radial=function(){var de=du(Br);return de.radius=de.x,delete de.x,de.angle=de.y,delete de.y,de};function Br(de){for(var Ee,qe=-1,tt=de.length,at,ct;++qeNe)+",1 "+Hr}function mr(gr,Hr,Vr,ca){return"Q 0,0 "+ca}return ct.radius=function(gr){return arguments.length?(qe=ar(gr),ct):qe},ct.source=function(gr){return arguments.length?(de=ar(gr),ct):de},ct.target=function(gr){return arguments.length?(Ee=ar(gr),ct):Ee},ct.startAngle=function(gr){return arguments.length?(tt=ar(gr),ct):tt},ct.endAngle=function(gr){return arguments.length?(at=ar(gr),ct):at},ct};function la(de){return de.radius}p.svg.diagonal=function(){var de=jr,Ee=Jr,qe=xa;function tt(at,ct){var Nt=de.call(this,at,ct),St=Ee.call(this,at,ct),Jt=(Nt.y+St.y)/2,mr=[Nt,{x:Nt.x,y:Jt},{x:St.x,y:Jt},St];return mr=mr.map(qe),"M"+mr[0]+"C"+mr[1]+" "+mr[2]+" "+mr[3]}return tt.source=function(at){return arguments.length?(de=ar(at),tt):de},tt.target=function(at){return arguments.length?(Ee=ar(at),tt):Ee},tt.projection=function(at){return arguments.length?(qe=at,tt):qe},tt};function xa(de){return[de.x,de.y]}p.svg.diagonal.radial=function(){var de=p.svg.diagonal(),Ee=xa,qe=de.projection;return de.projection=function(tt){return arguments.length?qe(Ba(Ee=tt)):Ee},de};function Ba(de){return function(){var Ee=de.apply(this,arguments),qe=Ee[0],tt=Ee[1]-Je;return[qe*Math.cos(tt),qe*Math.sin(tt)]}}p.svg.symbol=function(){var de=wn,Ee=an;function qe(tt,at){return(Si.get(de.call(this,tt,at))||ii)(Ee.call(this,tt,at))}return qe.type=function(tt){return arguments.length?(de=ar(tt),qe):de},qe.size=function(tt){return arguments.length?(Ee=ar(tt),qe):Ee},qe};function an(){return 64}function wn(){return"circle"}function ii(de){var Ee=Math.sqrt(de/Ne);return"M0,"+Ee+"A"+Ee+","+Ee+" 0 1,1 0,"+-Ee+"A"+Ee+","+Ee+" 0 1,1 0,"+Ee+"Z"}var Si=p.map({circle:ii,cross:function(de){var Ee=Math.sqrt(de/5)/2;return"M"+-3*Ee+","+-Ee+"H"+-Ee+"V"+-3*Ee+"H"+Ee+"V"+-Ee+"H"+3*Ee+"V"+Ee+"H"+Ee+"V"+3*Ee+"H"+-Ee+"V"+Ee+"H"+-3*Ee+"Z"},diamond:function(de){var Ee=Math.sqrt(de/(2*Ji)),qe=Ee*Ji;return"M0,"+-Ee+"L"+qe+",0 0,"+Ee+" "+-qe+",0Z"},square:function(de){var Ee=Math.sqrt(de)/2;return"M"+-Ee+","+-Ee+"L"+Ee+","+-Ee+" "+Ee+","+Ee+" "+-Ee+","+Ee+"Z"},"triangle-down":function(de){var Ee=Math.sqrt(de/oi),qe=Ee*oi/2;return"M0,"+qe+"L"+Ee+","+-qe+" "+-Ee+","+-qe+"Z"},"triangle-up":function(de){var Ee=Math.sqrt(de/oi),qe=Ee*oi/2;return"M0,"+-qe+"L"+Ee+","+qe+" "+-Ee+","+qe+"Z"}});p.svg.symbolTypes=Si.keys();var oi=Math.sqrt(3),Ji=Math.tan(30*et);q.transition=function(de){for(var Ee=ol||++ys,qe=hi(de),tt=[],at,ct,Nt=jl||{time:Date.now(),ease:pc,delay:0,duration:250},St=-1,Jt=this.length;++St0;)Hr[--Ea].call(de,fa);if(oa>=1)return Nt.event&&Nt.event.end.call(de,de.__data__,Ee),--ct.count?delete ct[tt]:delete de[qe],1}Nt||(St=at.time,Jt=ai(Vr,0,St),Nt=ct[tt]={tween:new M,time:St,timer:Jt,delay:at.delay,duration:at.duration,ease:at.ease,index:Ee},at=null,++ct.count)}p.svg.axis=function(){var de=p.scale.linear(),Ee=sl,qe=6,tt=6,at=3,ct=[10],Nt=null,St;function Jt(mr){mr.each(function(){var gr=p.select(this),Hr=this.__chart__||de,Vr=this.__chart__=de.copy(),ca=Nt??(Vr.ticks?Vr.ticks.apply(Vr,ct):Vr.domain()),Aa=St??(Vr.tickFormat?Vr.tickFormat.apply(Vr,ct):D),Yr=gr.selectAll(".tick").data(ca,Vr),oa=Yr.enter().insert("g",".domain").attr("class","tick").style("opacity",ht),fa=p.transition(Yr.exit()).style("opacity",ht).remove(),Ea=p.transition(Yr.order()).style("opacity",1),Ma=Math.max(qe,0)+at,sa,hn=Za(Vr),Tn=gr.selectAll(".domain").data([0]),zn=(Tn.enter().append("path").attr("class","domain"),p.transition(Tn));oa.append("line"),oa.append("text");var $n=oa.select("line"),xi=Ea.select("line"),di=Yr.select("text").text(Aa),uo=oa.select("text"),pe=Ea.select("text"),y=Ee==="top"||Ee==="left"?-1:1,N,ie,fe,be;if(Ee==="bottom"||Ee==="top"?(sa=tu,N="x",fe="y",ie="x2",be="y2",di.attr("dy",y<0?"0em":".71em").style("text-anchor","middle"),zn.attr("d","M"+hn[0]+","+y*tt+"V0H"+hn[1]+"V"+y*tt)):(sa=Ps,N="y",fe="x",ie="y2",be="x2",di.attr("dy",".32em").style("text-anchor",y<0?"end":"start"),zn.attr("d","M"+y*tt+","+hn[0]+"H0V"+hn[1]+"H"+y*tt)),$n.attr(be,y*qe),uo.attr(fe,y*Ma),xi.attr(ie,0).attr(be,y*qe),pe.attr(N,0).attr(fe,y*Ma),Vr.rangeBand){var Re=Vr,je=Re.rangeBand()/2;Hr=Vr=function(Ze){return Re(Ze)+je}}else Hr.rangeBand?Hr=Vr:fa.call(sa,Vr,Hr);oa.call(sa,Hr,Vr),Ea.call(sa,Vr,Vr)})}return Jt.scale=function(mr){return arguments.length?(de=mr,Jt):de},Jt.orient=function(mr){return arguments.length?(Ee=mr in sc?mr+"":sl,Jt):Ee},Jt.ticks=function(){return arguments.length?(ct=E(arguments),Jt):ct},Jt.tickValues=function(mr){return arguments.length?(Nt=mr,Jt):Nt},Jt.tickFormat=function(mr){return arguments.length?(St=mr,Jt):St},Jt.tickSize=function(mr){var gr=arguments.length;return gr?(qe=+mr,tt=+arguments[gr-1],Jt):qe},Jt.innerTickSize=function(mr){return arguments.length?(qe=+mr,Jt):qe},Jt.outerTickSize=function(mr){return arguments.length?(tt=+mr,Jt):tt},Jt.tickPadding=function(mr){return arguments.length?(at=+mr,Jt):at},Jt.tickSubdivide=function(){return arguments.length&&Jt},Jt};var sl="bottom",sc={top:1,right:1,bottom:1,left:1};function tu(de,Ee,qe){de.attr("transform",function(tt){var at=Ee(tt);return"translate("+(isFinite(at)?at:qe(tt))+",0)"})}function Ps(de,Ee,qe){de.attr("transform",function(tt){var at=Ee(tt);return"translate(0,"+(isFinite(at)?at:qe(tt))+")"})}p.svg.brush=function(){var de=ne(gr,"brushstart","brush","brushend"),Ee=null,qe=null,tt=[0,0],at=[0,0],ct,Nt,St=!0,Jt=!0,mr=pu[0];function gr(Yr){Yr.each(function(){var oa=p.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Aa).on("touchstart.brush",Aa),fa=oa.selectAll(".background").data([0]);fa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),oa.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ea=oa.selectAll(".resize").data(mr,D);Ea.exit().remove(),Ea.enter().append("g").attr("class",function(Tn){return"resize "+Tn}).style("cursor",function(Tn){return gc[Tn]}).append("rect").attr("x",function(Tn){return/[ew]$/.test(Tn)?-3:null}).attr("y",function(Tn){return/^[ns]/.test(Tn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ea.style("display",gr.empty()?"none":null);var Ma=p.transition(oa),sa=p.transition(fa),hn;Ee&&(hn=Za(Ee),sa.attr("x",hn[0]).attr("width",hn[1]-hn[0]),Vr(Ma)),qe&&(hn=Za(qe),sa.attr("y",hn[0]).attr("height",hn[1]-hn[0]),ca(Ma)),Hr(Ma)})}gr.event=function(Yr){Yr.each(function(){var oa=de.of(this,arguments),fa={x:tt,y:at,i:ct,j:Nt},Ea=this.__chart__||fa;this.__chart__=fa,ol?p.select(this).transition().each("start.brush",function(){ct=Ea.i,Nt=Ea.j,tt=Ea.x,at=Ea.y,oa({type:"brushstart"})}).tween("brush:brush",function(){var Ma=zu(tt,fa.x),sa=zu(at,fa.y);return ct=Nt=null,function(hn){tt=fa.x=Ma(hn),at=fa.y=sa(hn),oa({type:"brush",mode:"resize"})}}).each("end.brush",function(){ct=fa.i,Nt=fa.j,oa({type:"brush",mode:"resize"}),oa({type:"brushend"})}):(oa({type:"brushstart"}),oa({type:"brush",mode:"resize"}),oa({type:"brushend"}))})};function Hr(Yr){Yr.selectAll(".resize").attr("transform",function(oa){return"translate("+tt[+/e$/.test(oa)]+","+at[+/^s/.test(oa)]+")"})}function Vr(Yr){Yr.select(".extent").attr("x",tt[0]),Yr.selectAll(".extent,.n>rect,.s>rect").attr("width",tt[1]-tt[0])}function ca(Yr){Yr.select(".extent").attr("y",at[0]),Yr.selectAll(".extent,.e>rect,.w>rect").attr("height",at[1]-at[0])}function Aa(){var Yr=this,oa=p.select(p.event.target),fa=de.of(Yr,arguments),Ea=p.select(Yr),Ma=oa.datum(),sa=!/^(n|s)$/.test(Ma)&&Ee,hn=!/^(e|w)$/.test(Ma)&&qe,Tn=oa.classed("extent"),zn=Xt(Yr),$n,xi=p.mouse(Yr),di,uo=p.select(e(Yr)).on("keydown.brush",N).on("keyup.brush",ie);if(p.event.changedTouches?uo.on("touchmove.brush",fe).on("touchend.brush",Re):uo.on("mousemove.brush",fe).on("mouseup.brush",Re),Ea.interrupt().selectAll("*").interrupt(),Tn)xi[0]=tt[0]-xi[0],xi[1]=at[0]-xi[1];else if(Ma){var pe=+/w$/.test(Ma),y=+/^n/.test(Ma);di=[tt[1-pe]-xi[0],at[1-y]-xi[1]],xi[0]=tt[pe],xi[1]=at[y]}else p.event.altKey&&($n=xi.slice());Ea.style("pointer-events","none").selectAll(".resize").style("display",null),p.select("body").style("cursor",oa.style("cursor")),fa({type:"brushstart"}),fe();function N(){p.event.keyCode==32&&(Tn||($n=null,xi[0]-=tt[1],xi[1]-=at[1],Tn=2),Q())}function ie(){p.event.keyCode==32&&Tn==2&&(xi[0]+=tt[1],xi[1]+=at[1],Tn=0,Q())}function fe(){var je=p.mouse(Yr),Ze=!1;di&&(je[0]+=di[0],je[1]+=di[1]),Tn||(p.event.altKey?($n||($n=[(tt[0]+tt[1])/2,(at[0]+at[1])/2]),xi[0]=tt[+(je[0]<$n[0])],xi[1]=at[+(je[1]<$n[1])]):$n=null),sa&&be(je,Ee,0)&&(Vr(Ea),Ze=!0),hn&&be(je,qe,1)&&(ca(Ea),Ze=!0),Ze&&(Hr(Ea),fa({type:"brush",mode:Tn?"move":"resize"}))}function be(je,Ze,ut){var ft=Za(Ze),Dt=ft[0],Gt=ft[1],Kt=xi[ut],st=ut?at:tt,It=st[1]-st[0],Ut,ir;if(Tn&&(Dt-=Kt,Gt-=It+Kt),Ut=(ut?Jt:St)?Math.max(Dt,Math.min(Gt,je[ut])):je[ut],Tn?ir=(Ut+=Kt)+It:($n&&(Kt=Math.max(Dt,Math.min(Gt,2*$n[ut]-Ut))),Kt0))return At;do At.push($t=new Date(+yt)),Ae(yt,Tt),le(yt);while($t=gt)for(;le(gt),!yt(gt);)gt.setTime(gt-1)},function(gt,Tt){if(gt>=gt)if(Tt<0)for(;++Tt<=0;)for(;Ae(gt,-1),!yt(gt););else for(;--Tt>=0;)for(;Ae(gt,1),!yt(gt););})},Be&&(Ye.count=function(yt,gt){return b.setTime(+yt),E.setTime(+gt),le(b),le(E),Math.floor(Be(b,E))},Ye.every=function(yt){return yt=Math.floor(yt),!isFinite(yt)||!(yt>0)?null:yt>1?Ye.filter(Xe?function(gt){return Xe(gt)%yt===0}:function(gt){return Ye.count(0,gt)%yt===0}):Ye}),Ye}var l=k(function(){},function(le,Ae){le.setTime(+le+Ae)},function(le,Ae){return Ae-le});l.every=function(le){return le=Math.floor(le),!isFinite(le)||!(le>0)?null:le>1?k(function(Ae){Ae.setTime(Math.floor(Ae/le)*le)},function(Ae,Be){Ae.setTime(+Ae+Be*le)},function(Ae,Be){return(Be-Ae)/le}):l};var e=l.range,t=1e3,n=6e4,r=36e5,a=864e5,o=6048e5,s=k(function(le){le.setTime(le-le.getMilliseconds())},function(le,Ae){le.setTime(+le+Ae*t)},function(le,Ae){return(Ae-le)/t},function(le){return le.getUTCSeconds()}),c=s.range,m=k(function(le){le.setTime(le-le.getMilliseconds()-le.getSeconds()*t)},function(le,Ae){le.setTime(+le+Ae*n)},function(le,Ae){return(Ae-le)/n},function(le){return le.getMinutes()}),h=m.range,v=k(function(le){le.setTime(le-le.getMilliseconds()-le.getSeconds()*t-le.getMinutes()*n)},function(le,Ae){le.setTime(+le+Ae*r)},function(le,Ae){return(Ae-le)/r},function(le){return le.getHours()}),g=v.range,i=k(function(le){le.setHours(0,0,0,0)},function(le,Ae){le.setDate(le.getDate()+Ae)},function(le,Ae){return(Ae-le-(Ae.getTimezoneOffset()-le.getTimezoneOffset())*n)/a},function(le){return le.getDate()-1}),w=i.range;function S(le){return k(function(Ae){Ae.setDate(Ae.getDate()-(Ae.getDay()+7-le)%7),Ae.setHours(0,0,0,0)},function(Ae,Be){Ae.setDate(Ae.getDate()+Be*7)},function(Ae,Be){return(Be-Ae-(Be.getTimezoneOffset()-Ae.getTimezoneOffset())*n)/o})}var M=S(0),C=S(1),_=S(2),T=S(3),f=S(4),u=S(5),A=S(6),x=M.range,z=C.range,I=_.range,O=T.range,D=f.range,B=u.range,F=A.range,P=k(function(le){le.setDate(1),le.setHours(0,0,0,0)},function(le,Ae){le.setMonth(le.getMonth()+Ae)},function(le,Ae){return Ae.getMonth()-le.getMonth()+(Ae.getFullYear()-le.getFullYear())*12},function(le){return le.getMonth()}),j=P.range,U=k(function(le){le.setMonth(0,1),le.setHours(0,0,0,0)},function(le,Ae){le.setFullYear(le.getFullYear()+Ae)},function(le,Ae){return Ae.getFullYear()-le.getFullYear()},function(le){return le.getFullYear()});U.every=function(le){return!isFinite(le=Math.floor(le))||!(le>0)?null:k(function(Ae){Ae.setFullYear(Math.floor(Ae.getFullYear()/le)*le),Ae.setMonth(0,1),Ae.setHours(0,0,0,0)},function(Ae,Be){Ae.setFullYear(Ae.getFullYear()+Be*le)})};var $=U.range,Q=k(function(le){le.setUTCSeconds(0,0)},function(le,Ae){le.setTime(+le+Ae*n)},function(le,Ae){return(Ae-le)/n},function(le){return le.getUTCMinutes()}),re=Q.range,ne=k(function(le){le.setUTCMinutes(0,0,0)},function(le,Ae){le.setTime(+le+Ae*r)},function(le,Ae){return(Ae-le)/r},function(le){return le.getUTCHours()}),se=ne.range,G=k(function(le){le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCDate(le.getUTCDate()+Ae)},function(le,Ae){return(Ae-le)/a},function(le){return le.getUTCDate()-1}),X=G.range;function K(le){return k(function(Ae){Ae.setUTCDate(Ae.getUTCDate()-(Ae.getUTCDay()+7-le)%7),Ae.setUTCHours(0,0,0,0)},function(Ae,Be){Ae.setUTCDate(Ae.getUTCDate()+Be*7)},function(Ae,Be){return(Be-Ae)/o})}var H=K(0),Y=K(1),q=K(2),Z=K(3),ee=K(4),ae=K(5),he=K(6),xe=H.range,we=Y.range,Me=q.range,Se=Z.range,Ie=ee.range,Ve=ae.range,Ge=he.range,ke=k(function(le){le.setUTCDate(1),le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCMonth(le.getUTCMonth()+Ae)},function(le,Ae){return Ae.getUTCMonth()-le.getUTCMonth()+(Ae.getUTCFullYear()-le.getUTCFullYear())*12},function(le){return le.getUTCMonth()}),_e=ke.range,ce=k(function(le){le.setUTCMonth(0,1),le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCFullYear(le.getUTCFullYear()+Ae)},function(le,Ae){return Ae.getUTCFullYear()-le.getUTCFullYear()},function(le){return le.getUTCFullYear()});ce.every=function(le){return!isFinite(le=Math.floor(le))||!(le>0)?null:k(function(Ae){Ae.setUTCFullYear(Math.floor(Ae.getUTCFullYear()/le)*le),Ae.setUTCMonth(0,1),Ae.setUTCHours(0,0,0,0)},function(Ae,Be){Ae.setUTCFullYear(Ae.getUTCFullYear()+Be*le)})};var ve=ce.range;p.timeDay=i,p.timeDays=w,p.timeFriday=u,p.timeFridays=B,p.timeHour=v,p.timeHours=g,p.timeInterval=k,p.timeMillisecond=l,p.timeMilliseconds=e,p.timeMinute=m,p.timeMinutes=h,p.timeMonday=C,p.timeMondays=z,p.timeMonth=P,p.timeMonths=j,p.timeSaturday=A,p.timeSaturdays=F,p.timeSecond=s,p.timeSeconds=c,p.timeSunday=M,p.timeSundays=x,p.timeThursday=f,p.timeThursdays=D,p.timeTuesday=_,p.timeTuesdays=I,p.timeWednesday=T,p.timeWednesdays=O,p.timeWeek=M,p.timeWeeks=x,p.timeYear=U,p.timeYears=$,p.utcDay=G,p.utcDays=X,p.utcFriday=ae,p.utcFridays=Ve,p.utcHour=ne,p.utcHours=se,p.utcMillisecond=l,p.utcMilliseconds=e,p.utcMinute=Q,p.utcMinutes=re,p.utcMonday=Y,p.utcMondays=we,p.utcMonth=ke,p.utcMonths=_e,p.utcSaturday=he,p.utcSaturdays=Ge,p.utcSecond=s,p.utcSeconds=c,p.utcSunday=H,p.utcSundays=xe,p.utcThursday=ee,p.utcThursdays=Ie,p.utcTuesday=q,p.utcTuesdays=Me,p.utcWednesday=Z,p.utcWednesdays=Se,p.utcWeek=H,p.utcWeeks=xe,p.utcYear=ce,p.utcYears=ve,Object.defineProperty(p,"__esModule",{value:!0})})}}),jm=ze({"node_modules/d3-time-format/dist/d3-time-format.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,kw()):(p=p||self,b(p.d3=p.d3||{},p.d3))})(J,function(p,b){"use strict";function E(Je){if(0<=Je.y&&Je.y<100){var et=new Date(-1,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L);return et.setFullYear(Je.y),et}return new Date(Je.y,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L)}function k(Je){if(0<=Je.y&&Je.y<100){var et=new Date(Date.UTC(-1,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L));return et.setUTCFullYear(Je.y),et}return new Date(Date.UTC(Je.y,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L))}function l(Je,et,Mt){return{y:Je,m:et,d:Mt,H:0,M:0,S:0,L:0}}function e(Je){var et=Je.dateTime,Mt=Je.date,pt=Je.time,Pt=Je.periods,Ct=Je.days,qt=Je.shortDays,Vt=Je.months,Ht=Je.shortMonths,Sr=c(Pt),Kr=m(Pt),Yt=c(Ct),Rt=m(Ct),nr=c(qt),ur=m(qt),cr=c(Vt),Rr=m(Vt),Qr=c(Ht),Zr=m(Ht),ha={a:Yi,A:Ja,b:Oa,B:lt,c:null,d:P,e:P,f:re,g:ae,G:xe,H:j,I:U,j:$,L:Q,m:ne,M:se,p:rt,q:fr,Q:Xt,s:or,S:G,u:X,U:K,V:Y,w:q,W:Z,x:null,X:null,y:ee,Y:he,Z:we,"%":_r},Pa={a:lr,A:Tr,b:Ir,B:Dr,c:null,d:Me,e:Me,f:ke,g:Tt,G:$t,H:Se,I:Ie,j:Ve,L:Ge,m:_e,M:ce,p:ot,q:kt,Q:Xt,s:or,S:ve,u:le,U:Ae,V:Xe,w:Ye,W:yt,x:null,X:null,y:gt,Y:At,Z:rr,"%":_r},La={a:yn,A:Un,b:li,B:Yn,c:on,d:f,e:f,f:O,g:M,G:S,H:A,I:A,j:u,L:I,m:T,M:x,p:Nn,q:_,Q:B,s:F,S:z,u:v,U:g,V:i,w:h,W:w,x:en,X:vi,y:M,Y:S,Z:C,"%":D};ha.x=un(Mt,ha),ha.X=un(pt,ha),ha.c=un(et,ha),Pa.x=un(Mt,Pa),Pa.X=un(pt,Pa),Pa.c=un(et,Pa);function un(jt,ar){return function(Er){var xr=[],zr=-1,Lr=0,aa=jt.length,Sa,wa,pn;for(Er instanceof Date||(Er=new Date(+Er));++zr53)return null;"w"in xr||(xr.w=1),"Z"in xr?(Lr=k(l(xr.y,0,1)),aa=Lr.getUTCDay(),Lr=aa>4||aa===0?b.utcMonday.ceil(Lr):b.utcMonday(Lr),Lr=b.utcDay.offset(Lr,(xr.V-1)*7),xr.y=Lr.getUTCFullYear(),xr.m=Lr.getUTCMonth(),xr.d=Lr.getUTCDate()+(xr.w+6)%7):(Lr=E(l(xr.y,0,1)),aa=Lr.getDay(),Lr=aa>4||aa===0?b.timeMonday.ceil(Lr):b.timeMonday(Lr),Lr=b.timeDay.offset(Lr,(xr.V-1)*7),xr.y=Lr.getFullYear(),xr.m=Lr.getMonth(),xr.d=Lr.getDate()+(xr.w+6)%7)}else("W"in xr||"U"in xr)&&("w"in xr||(xr.w="u"in xr?xr.u%7:"W"in xr?1:0),aa="Z"in xr?k(l(xr.y,0,1)).getUTCDay():E(l(xr.y,0,1)).getDay(),xr.m=0,xr.d="W"in xr?(xr.w+6)%7+xr.W*7-(aa+5)%7:xr.w+xr.U*7-(aa+6)%7);return"Z"in xr?(xr.H+=xr.Z/100|0,xr.M+=xr.Z%100,k(xr)):E(xr)}}function ja(jt,ar,Er,xr){for(var zr=0,Lr=ar.length,aa=Er.length,Sa,wa;zr=aa)return-1;if(Sa=ar.charCodeAt(zr++),Sa===37){if(Sa=ar.charAt(zr++),wa=La[Sa in t?ar.charAt(zr++):Sa],!wa||(xr=wa(jt,Er,xr))<0)return-1}else if(Sa!=Er.charCodeAt(xr++))return-1}return xr}function Nn(jt,ar,Er){var xr=Sr.exec(ar.slice(Er));return xr?(jt.p=Kr[xr[0].toLowerCase()],Er+xr[0].length):-1}function yn(jt,ar,Er){var xr=nr.exec(ar.slice(Er));return xr?(jt.w=ur[xr[0].toLowerCase()],Er+xr[0].length):-1}function Un(jt,ar,Er){var xr=Yt.exec(ar.slice(Er));return xr?(jt.w=Rt[xr[0].toLowerCase()],Er+xr[0].length):-1}function li(jt,ar,Er){var xr=Qr.exec(ar.slice(Er));return xr?(jt.m=Zr[xr[0].toLowerCase()],Er+xr[0].length):-1}function Yn(jt,ar,Er){var xr=cr.exec(ar.slice(Er));return xr?(jt.m=Rr[xr[0].toLowerCase()],Er+xr[0].length):-1}function on(jt,ar,Er){return ja(jt,et,ar,Er)}function en(jt,ar,Er){return ja(jt,Mt,ar,Er)}function vi(jt,ar,Er){return ja(jt,pt,ar,Er)}function Yi(jt){return qt[jt.getDay()]}function Ja(jt){return Ct[jt.getDay()]}function Oa(jt){return Ht[jt.getMonth()]}function lt(jt){return Vt[jt.getMonth()]}function rt(jt){return Pt[+(jt.getHours()>=12)]}function fr(jt){return 1+~~(jt.getMonth()/3)}function lr(jt){return qt[jt.getUTCDay()]}function Tr(jt){return Ct[jt.getUTCDay()]}function Ir(jt){return Ht[jt.getUTCMonth()]}function Dr(jt){return Vt[jt.getUTCMonth()]}function ot(jt){return Pt[+(jt.getUTCHours()>=12)]}function kt(jt){return 1+~~(jt.getUTCMonth()/3)}return{format:function(jt){var ar=un(jt+="",ha);return ar.toString=function(){return jt},ar},parse:function(jt){var ar=Xa(jt+="",!1);return ar.toString=function(){return jt},ar},utcFormat:function(jt){var ar=un(jt+="",Pa);return ar.toString=function(){return jt},ar},utcParse:function(jt){var ar=Xa(jt+="",!0);return ar.toString=function(){return jt},ar}}}var t={"-":"",_:" ",0:"0"},n=/^\s*\d+/,r=/^%/,a=/[\\^$*+?|[\]().{}]/g;function o(Je,et,Mt){var pt=Je<0?"-":"",Pt=(pt?-Je:Je)+"",Ct=Pt.length;return pt+(Ct68?1900:2e3),Mt+pt[0].length):-1}function C(Je,et,Mt){var pt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(et.slice(Mt,Mt+6));return pt?(Je.Z=pt[1]?0:-(pt[2]+(pt[3]||"00")),Mt+pt[0].length):-1}function _(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+1));return pt?(Je.q=pt[0]*3-3,Mt+pt[0].length):-1}function T(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.m=pt[0]-1,Mt+pt[0].length):-1}function f(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.d=+pt[0],Mt+pt[0].length):-1}function u(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+3));return pt?(Je.m=0,Je.d=+pt[0],Mt+pt[0].length):-1}function A(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.H=+pt[0],Mt+pt[0].length):-1}function x(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.M=+pt[0],Mt+pt[0].length):-1}function z(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.S=+pt[0],Mt+pt[0].length):-1}function I(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+3));return pt?(Je.L=+pt[0],Mt+pt[0].length):-1}function O(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+6));return pt?(Je.L=Math.floor(pt[0]/1e3),Mt+pt[0].length):-1}function D(Je,et,Mt){var pt=r.exec(et.slice(Mt,Mt+1));return pt?Mt+pt[0].length:-1}function B(Je,et,Mt){var pt=n.exec(et.slice(Mt));return pt?(Je.Q=+pt[0],Mt+pt[0].length):-1}function F(Je,et,Mt){var pt=n.exec(et.slice(Mt));return pt?(Je.s=+pt[0],Mt+pt[0].length):-1}function P(Je,et){return o(Je.getDate(),et,2)}function j(Je,et){return o(Je.getHours(),et,2)}function U(Je,et){return o(Je.getHours()%12||12,et,2)}function $(Je,et){return o(1+b.timeDay.count(b.timeYear(Je),Je),et,3)}function Q(Je,et){return o(Je.getMilliseconds(),et,3)}function re(Je,et){return Q(Je,et)+"000"}function ne(Je,et){return o(Je.getMonth()+1,et,2)}function se(Je,et){return o(Je.getMinutes(),et,2)}function G(Je,et){return o(Je.getSeconds(),et,2)}function X(Je){var et=Je.getDay();return et===0?7:et}function K(Je,et){return o(b.timeSunday.count(b.timeYear(Je)-1,Je),et,2)}function H(Je){var et=Je.getDay();return et>=4||et===0?b.timeThursday(Je):b.timeThursday.ceil(Je)}function Y(Je,et){return Je=H(Je),o(b.timeThursday.count(b.timeYear(Je),Je)+(b.timeYear(Je).getDay()===4),et,2)}function q(Je){return Je.getDay()}function Z(Je,et){return o(b.timeMonday.count(b.timeYear(Je)-1,Je),et,2)}function ee(Je,et){return o(Je.getFullYear()%100,et,2)}function ae(Je,et){return Je=H(Je),o(Je.getFullYear()%100,et,2)}function he(Je,et){return o(Je.getFullYear()%1e4,et,4)}function xe(Je,et){var Mt=Je.getDay();return Je=Mt>=4||Mt===0?b.timeThursday(Je):b.timeThursday.ceil(Je),o(Je.getFullYear()%1e4,et,4)}function we(Je){var et=Je.getTimezoneOffset();return(et>0?"-":(et*=-1,"+"))+o(et/60|0,"0",2)+o(et%60,"0",2)}function Me(Je,et){return o(Je.getUTCDate(),et,2)}function Se(Je,et){return o(Je.getUTCHours(),et,2)}function Ie(Je,et){return o(Je.getUTCHours()%12||12,et,2)}function Ve(Je,et){return o(1+b.utcDay.count(b.utcYear(Je),Je),et,3)}function Ge(Je,et){return o(Je.getUTCMilliseconds(),et,3)}function ke(Je,et){return Ge(Je,et)+"000"}function _e(Je,et){return o(Je.getUTCMonth()+1,et,2)}function ce(Je,et){return o(Je.getUTCMinutes(),et,2)}function ve(Je,et){return o(Je.getUTCSeconds(),et,2)}function le(Je){var et=Je.getUTCDay();return et===0?7:et}function Ae(Je,et){return o(b.utcSunday.count(b.utcYear(Je)-1,Je),et,2)}function Be(Je){var et=Je.getUTCDay();return et>=4||et===0?b.utcThursday(Je):b.utcThursday.ceil(Je)}function Xe(Je,et){return Je=Be(Je),o(b.utcThursday.count(b.utcYear(Je),Je)+(b.utcYear(Je).getUTCDay()===4),et,2)}function Ye(Je){return Je.getUTCDay()}function yt(Je,et){return o(b.utcMonday.count(b.utcYear(Je)-1,Je),et,2)}function gt(Je,et){return o(Je.getUTCFullYear()%100,et,2)}function Tt(Je,et){return Je=Be(Je),o(Je.getUTCFullYear()%100,et,2)}function At(Je,et){return o(Je.getUTCFullYear()%1e4,et,4)}function $t(Je,et){var Mt=Je.getUTCDay();return Je=Mt>=4||Mt===0?b.utcThursday(Je):b.utcThursday.ceil(Je),o(Je.getUTCFullYear()%1e4,et,4)}function rr(){return"+0000"}function _r(){return"%"}function Xt(Je){return+Je}function or(Je){return Math.floor(+Je/1e3)}var Ot;vt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function vt(Je){return Ot=e(Je),p.timeFormat=Ot.format,p.timeParse=Ot.parse,p.utcFormat=Ot.utcFormat,p.utcParse=Ot.utcParse,Ot}var ht="%Y-%m-%dT%H:%M:%S.%LZ";function De(Je){return Je.toISOString()}var Ne=Date.prototype.toISOString?De:p.utcFormat(ht);function We(Je){var et=new Date(Je);return isNaN(et)?null:et}var Ke=+new Date("2000-01-01T00:00:00.000Z")?We:p.utcParse(ht);p.isoFormat=Ne,p.isoParse=Ke,p.timeFormatDefaultLocale=vt,p.timeFormatLocale=e,Object.defineProperty(p,"__esModule",{value:!0})})}}),Cw=ze({"node_modules/d3-format/dist/d3-format.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=typeof globalThis<"u"?globalThis:p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(T){return Math.abs(T=Math.round(T))>=1e21?T.toLocaleString("en").replace(/,/g,""):T.toString(10)}function E(T,f){if((u=(T=f?T.toExponential(f-1):T.toExponential()).indexOf("e"))<0)return null;var u,A=T.slice(0,u);return[A.length>1?A[0]+A.slice(2):A,+T.slice(u+1)]}function k(T){return T=E(Math.abs(T)),T?T[1]:NaN}function l(T,f){return function(u,A){for(var x=u.length,z=[],I=0,O=T[0],D=0;x>0&&O>0&&(D+O+1>A&&(O=Math.max(1,A-D)),z.push(u.substring(x-=O,x+O)),!((D+=O+1)>A));)O=T[I=(I+1)%T.length];return z.reverse().join(f)}}function e(T){return function(f){return f.replace(/[0-9]/g,function(u){return T[+u]})}}var t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function n(T){if(!(f=t.exec(T)))throw new Error("invalid format: "+T);var f;return new r({fill:f[1],align:f[2],sign:f[3],symbol:f[4],zero:f[5],width:f[6],comma:f[7],precision:f[8]&&f[8].slice(1),trim:f[9],type:f[10]})}n.prototype=r.prototype;function r(T){this.fill=T.fill===void 0?" ":T.fill+"",this.align=T.align===void 0?">":T.align+"",this.sign=T.sign===void 0?"-":T.sign+"",this.symbol=T.symbol===void 0?"":T.symbol+"",this.zero=!!T.zero,this.width=T.width===void 0?void 0:+T.width,this.comma=!!T.comma,this.precision=T.precision===void 0?void 0:+T.precision,this.trim=!!T.trim,this.type=T.type===void 0?"":T.type+""}r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function a(T){e:for(var f=T.length,u=1,A=-1,x;u0&&(A=0);break}return A>0?T.slice(0,A)+T.slice(x+1):T}var o;function s(T,f){var u=E(T,f);if(!u)return T+"";var A=u[0],x=u[1],z=x-(o=Math.max(-8,Math.min(8,Math.floor(x/3)))*3)+1,I=A.length;return z===I?A:z>I?A+new Array(z-I+1).join("0"):z>0?A.slice(0,z)+"."+A.slice(z):"0."+new Array(1-z).join("0")+E(T,Math.max(0,f+z-1))[0]}function c(T,f){var u=E(T,f);if(!u)return T+"";var A=u[0],x=u[1];return x<0?"0."+new Array(-x).join("0")+A:A.length>x+1?A.slice(0,x+1)+"."+A.slice(x+1):A+new Array(x-A.length+2).join("0")}var m={"%":function(T,f){return(T*100).toFixed(f)},b:function(T){return Math.round(T).toString(2)},c:function(T){return T+""},d:b,e:function(T,f){return T.toExponential(f)},f:function(T,f){return T.toFixed(f)},g:function(T,f){return T.toPrecision(f)},o:function(T){return Math.round(T).toString(8)},p:function(T,f){return c(T*100,f)},r:c,s,X:function(T){return Math.round(T).toString(16).toUpperCase()},x:function(T){return Math.round(T).toString(16)}};function h(T){return T}var v=Array.prototype.map,g=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function i(T){var f=T.grouping===void 0||T.thousands===void 0?h:l(v.call(T.grouping,Number),T.thousands+""),u=T.currency===void 0?"":T.currency[0]+"",A=T.currency===void 0?"":T.currency[1]+"",x=T.decimal===void 0?".":T.decimal+"",z=T.numerals===void 0?h:e(v.call(T.numerals,String)),I=T.percent===void 0?"%":T.percent+"",O=T.minus===void 0?"-":T.minus+"",D=T.nan===void 0?"NaN":T.nan+"";function B(P){P=n(P);var j=P.fill,U=P.align,$=P.sign,Q=P.symbol,re=P.zero,ne=P.width,se=P.comma,G=P.precision,X=P.trim,K=P.type;K==="n"?(se=!0,K="g"):m[K]||(G===void 0&&(G=12),X=!0,K="g"),(re||j==="0"&&U==="=")&&(re=!0,j="0",U="=");var H=Q==="$"?u:Q==="#"&&/[boxX]/.test(K)?"0"+K.toLowerCase():"",Y=Q==="$"?A:/[%p]/.test(K)?I:"",q=m[K],Z=/[defgprs%]/.test(K);G=G===void 0?6:/[gprs]/.test(K)?Math.max(1,Math.min(21,G)):Math.max(0,Math.min(20,G));function ee(ae){var he=H,xe=Y,we,Me,Se;if(K==="c")xe=q(ae)+xe,ae="";else{ae=+ae;var Ie=ae<0||1/ae<0;if(ae=isNaN(ae)?D:q(Math.abs(ae),G),X&&(ae=a(ae)),Ie&&+ae==0&&$!=="+"&&(Ie=!1),he=(Ie?$==="("?$:O:$==="-"||$==="("?"":$)+he,xe=(K==="s"?g[8+o/3]:"")+xe+(Ie&&$==="("?")":""),Z){for(we=-1,Me=ae.length;++weSe||Se>57){xe=(Se===46?x+ae.slice(we+1):ae.slice(we))+xe,ae=ae.slice(0,we);break}}}se&&!re&&(ae=f(ae,1/0));var Ve=he.length+ae.length+xe.length,Ge=Ve>1)+he+ae+xe+Ge.slice(Ve);break;default:ae=Ge+he+ae+xe;break}return z(ae)}return ee.toString=function(){return P+""},ee}function F(P,j){var U=B((P=n(P),P.type="f",P)),$=Math.max(-8,Math.min(8,Math.floor(k(j)/3)))*3,Q=Math.pow(10,-$),re=g[8+$/3];return function(ne){return U(Q*ne)+re}}return{format:B,formatPrefix:F}}var w;S({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function S(T){return w=i(T),p.format=w.format,p.formatPrefix=w.formatPrefix,w}function M(T){return Math.max(0,-k(Math.abs(T)))}function C(T,f){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(k(f)/3)))*3-k(Math.abs(T)))}function _(T,f){return T=Math.abs(T),f=Math.abs(f)-T,Math.max(0,k(f)-k(T))+1}p.FormatSpecifier=r,p.formatDefaultLocale=S,p.formatLocale=i,p.formatSpecifier=n,p.precisionFixed=M,p.precisionPrefix=C,p.precisionRound=_,Object.defineProperty(p,"__esModule",{value:!0})})}}),FR=ze({"node_modules/is-string-blank/index.js"(J,V){"use strict";V.exports=function(p){for(var b=p.length,E,k=0;k13)&&E!==32&&E!==133&&E!==160&&E!==5760&&E!==6158&&(E<8192||E>8205)&&E!==8232&&E!==8233&&E!==8239&&E!==8287&&E!==8288&&E!==12288&&E!==65279)return!1;return!0}}}),ao=ze({"node_modules/fast-isnumeric/index.js"(J,V){"use strict";var p=FR();V.exports=function(b){var E=typeof b;if(E==="string"){var k=b;if(b=+b,b===0&&p(k))return!1}else if(E!=="number")return!1;return b-b<1}}}),No=ze({"src/constants/numerical.js"(J,V){"use strict";V.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}}}),Lw=ze({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=typeof globalThis<"u"?globalThis:p||self,b(p["base64-arraybuffer"]={}))})(J,function(p){"use strict";for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=typeof Uint8Array>"u"?[]:new Uint8Array(256),k=0;k>2],o+=b[(n[r]&3)<<4|n[r+1]>>4],o+=b[(n[r+1]&15)<<2|n[r+2]>>6],o+=b[n[r+2]&63];return a%3===2?o=o.substring(0,o.length-1)+"=":a%3===1&&(o=o.substring(0,o.length-2)+"=="),o},e=function(t){var n=t.length*.75,r=t.length,a,o=0,s,c,m,h;t[t.length-1]==="="&&(n--,t[t.length-2]==="="&&n--);var v=new ArrayBuffer(n),g=new Uint8Array(v);for(a=0;a>4,g[o++]=(c&15)<<4|m>>2,g[o++]=(m&3)<<6|h&63;return v};p.decode=e,p.encode=l,Object.defineProperty(p,"__esModule",{value:!0})})}}),tv=ze({"src/lib/is_plain_object.js"(J,V){"use strict";V.exports=function(b){return window&&window.process&&window.process.versions?Object.prototype.toString.call(b)==="[object Object]":Object.prototype.toString.call(b)==="[object Object]"&&Object.getPrototypeOf(b).hasOwnProperty("hasOwnProperty")}}}),Ff=ze({"src/lib/array.js"(J){"use strict";var V=Lw().decode,p=tv(),b=Array.isArray,E=ArrayBuffer,k=DataView;function l(s){return E.isView(s)&&!(s instanceof k)}J.isTypedArray=l;function e(s){return b(s)||l(s)}J.isArrayOrTypedArray=e;function t(s){return!e(s[0])}J.isArray1D=t,J.ensureArray=function(s,c){return b(s)||(s=[]),s.length=c,s};var n={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};n.uint8c=n.u1c,n.uint8=n.u1,n.int8=n.i1,n.uint16=n.u2,n.int16=n.i2,n.uint32=n.u4,n.int32=n.i4,n.float32=n.f4,n.float64=n.f8;function r(s){return s.constructor===ArrayBuffer}J.isArrayBuffer=r,J.decodeTypedArraySpec=function(s){var c=[],m=a(s),h=m.dtype,v=n[h];if(!v)throw new Error('Error in dtype: "'+h+'"');var g=v.BYTES_PER_ELEMENT,i=m.bdata;r(i)||(i=V(i));var w=m.shape===void 0?[i.byteLength/g]:(""+m.shape).split(",");w.reverse();var S=w.length,M,C,_=+w[0],T=g*_,f=0;if(S===1)c=new v(i);else if(S===2)for(M=+w[1],C=0;C2)return v[M]=v[M]|l,w.set(S,null);if(i){for(c=M;c0)return Math.log(E)/Math.LN10;var l=Math.log(Math.min(k[0],k[1]))/Math.LN10;return p(l)||(l=Math.log(Math.max(k[0],k[1]))/Math.LN10-6),l}}}),OR=ze({"src/lib/relink_private.js"(J,V){"use strict";var p=Ff().isArrayOrTypedArray,b=tv();V.exports=function E(k,l){for(var e in l){var t=l[e],n=k[e];if(n!==t)if(e.charAt(0)==="_"||typeof t=="function"){if(e in k)continue;k[e]=t}else if(p(t)&&p(n)&&b(t[0])){if(e==="customdata"||e==="ids")continue;for(var r=Math.min(t.length,n.length),a=0;aNR,modHalf:()=>jR});function NR(J,V){let p=J%V;return p<0?p+V:p}function jR(J,V){return Math.abs(J)>V/2?J-Math.round(J/V)*V:J}var Um=zi({"src/lib/mod.ts"(){"use strict"}}),Ki=ze({"src/lib/extend.js"(J){"use strict";var V=tv(),p=Array.isArray;function b(k,l){var e,t;for(e=0;e{for(var Qe in Ue)p(Le,Qe,{get:Ue[Qe],enumerable:!0})},e=(Le,Ue,Qe,_t)=>{if(Ue&&typeof Ue=="object"||typeof Ue=="function")for(let wt of E(Ue))!k.call(Le,wt)&&wt!==Qe&&p(Le,wt,{get:()=>Ue[wt],enumerable:!(_t=b(Ue,wt))||_t.enumerable});return Le},t=Le=>e(p({},"__esModule",{value:!0}),Le),n={};l(n,{a98:()=>So,average:()=>Tr,averageAngle:()=>rt,averageNumber:()=>fr,blend:()=>ll,blerp:()=>Ye,clampChroma:()=>dr,clampGamut:()=>ir,clampRgb:()=>Ut,colorsNamed:()=>s,convertA98ToXyz65:()=>Ot,convertCubehelixToRgb:()=>Nn,convertDlchToLab65:()=>oo,convertHsiToRgb:()=>ds,convertHslToRgb:()=>wo,convertHsvToRgb:()=>Ts,convertHwbToRgb:()=>yo,convertItpToXyz65:()=>ms,convertJabToJch:()=>Nu,convertJabToRgb:()=>Hc,convertJabToXyz65:()=>Gc,convertJchToJab:()=>al,convertLab65ToDlch:()=>qn,convertLab65ToRgb:()=>rn,convertLab65ToXyz65:()=>tn,convertLabToLch:()=>kt,convertLabToRgb:()=>vl,convertLabToXyz50:()=>tc,convertLchToLab:()=>ar,convertLchuvToLuv:()=>qu,convertLrgbToOklab:()=>tr,convertLrgbToRgb:()=>Pt,convertLuvToLchuv:()=>hu,convertLuvToXyz50:()=>Gf,convertOkhslToOklab:()=>_i,convertOkhsvToOklab:()=>Ln,convertOklabToLrgb:()=>ba,convertOklabToOkhsl:()=>yi,convertOklabToOkhsv:()=>En,convertOklabToRgb:()=>Na,convertP3ToXyz65:()=>zo,convertProphotoToXyz50:()=>mc,convertRec2020ToXyz65:()=>Wu,convertRgbToCubehelix:()=>Xa,convertRgbToHsi:()=>jo,convertRgbToHsl:()=>pi,convertRgbToHsv:()=>Bo,convertRgbToHwb:()=>bs,convertRgbToJab:()=>$l,convertRgbToLab:()=>mf,convertRgbToLab65:()=>fn,convertRgbToLrgb:()=>Ke,convertRgbToOklab:()=>wr,convertRgbToXyb:()=>eu,convertRgbToXyz50:()=>rc,convertRgbToXyz65:()=>et,convertRgbToYiq:()=>Ba,convertXybToRgb:()=>mt,convertXyz50ToLab:()=>ac,convertXyz50ToLuv:()=>Vu,convertXyz50ToProphoto:()=>xl,convertXyz50ToRgb:()=>Tu,convertXyz50ToXyz65:()=>jr,convertXyz65ToA98:()=>De,convertXyz65ToItp:()=>zu,convertXyz65ToJab:()=>wc,convertXyz65ToLab65:()=>no,convertXyz65ToP3:()=>js,convertXyz65ToRec2020:()=>bf,convertXyz65ToRgb:()=>qt,convertXyz65ToXyz50:()=>Br,convertYiqToRgb:()=>wn,converter:()=>P,cubehelix:()=>Ws,differenceCie76:()=>on,differenceCie94:()=>en,differenceCiede2000:()=>vi,differenceCmc:()=>Yi,differenceEuclidean:()=>Yn,differenceHueChroma:()=>li,differenceHueNaive:()=>Un,differenceHueSaturation:()=>yn,differenceHyab:()=>Ja,differenceItp:()=>lt,differenceKotsarenkoRamos:()=>Oa,displayable:()=>st,dlab:()=>Zo,dlch:()=>es,easingGamma:()=>je,easingInOutSine:()=>Mo,easingMidpoint:()=>Hr,easingSmootherstep:()=>Wi,easingSmoothstep:()=>so,easingSmoothstepInverse:()=>ti,filterBrightness:()=>ma,filterContrast:()=>da,filterDeficiencyDeuter:()=>Jn,filterDeficiencyProt:()=>In,filterDeficiencyTrit:()=>Ei,filterGrayscale:()=>kn,filterHueRotate:()=>ui,filterInvert:()=>Dn,filterSaturate:()=>za,filterSepia:()=>Fa,fixupAlpha:()=>$t,fixupHueDecreasing:()=>cr,fixupHueIncreasing:()=>ur,fixupHueLonger:()=>nr,fixupHueShorter:()=>Rt,formatCss:()=>wi,formatHex:()=>sl,formatHex8:()=>sc,formatHsl:()=>Ps,formatRgb:()=>tu,getMode:()=>se,hsi:()=>$o,hsl:()=>_s,hsv:()=>Go,hwb:()=>Ys,inGamut:()=>It,interpolate:()=>oa,interpolateWith:()=>fa,interpolateWithPremultipliedAlpha:()=>Ea,interpolatorLinear:()=>At,interpolatorPiecewise:()=>Tt,interpolatorSplineBasis:()=>hn,interpolatorSplineBasisClosed:()=>Tn,interpolatorSplineMonotone:()=>ie,interpolatorSplineMonotone2:()=>fe,interpolatorSplineMonotoneClosed:()=>be,interpolatorSplineNatural:()=>$n,interpolatorSplineNaturalClosed:()=>xi,itp:()=>Ll,jab:()=>mo,jch:()=>ru,lab:()=>Rs,lab65:()=>Yu,lch:()=>Ul,lch65:()=>ql,lchuv:()=>fo,lerp:()=>Be,lrgb:()=>Xo,luv:()=>Os,mapAlphaDivide:()=>ct,mapAlphaMultiply:()=>at,mapTransferGamma:()=>St,mapTransferLinear:()=>Nt,mapper:()=>tt,modeA98:()=>Ht,modeCubehelix:()=>Dr,modeDlab:()=>go,modeDlch:()=>Ao,modeHsi:()=>to,modeHsl:()=>Vs,modeHsv:()=>Pi,modeHwb:()=>dl,modeItp:()=>bc,modeJab:()=>Qu,modeJch:()=>ju,modeLab:()=>Sl,modeLab65:()=>oh,modeLch:()=>nl,modeLch65:()=>Kc,modeLchuv:()=>kl,modeLrgb:()=>Cc,modeLuv:()=>vc,modeOkhsl:()=>ri,modeOkhsv:()=>Zi,modeOklab:()=>Yo,modeOklch:()=>ns,modeP3:()=>zl,modeProphoto:()=>oc,modeRec2020:()=>Qc,modeRgb:()=>_r,modeXyb:()=>Bt,modeXyz50:()=>Wt,modeXyz65:()=>la,modeYiq:()=>Si,nearest:()=>vr,okhsl:()=>ra,okhsv:()=>Ya,oklab:()=>Ka,oklch:()=>Bi,p3:()=>rs,parse:()=>_e,parseHex:()=>g,parseHsl:()=>Ss,parseHslLegacy:()=>Uo,parseHwb:()=>hl,parseLab:()=>ih,parseLch:()=>$c,parseNamed:()=>m,parseOklab:()=>Do,parseOklch:()=>Gs,parseRgb:()=>ve,parseRgbLegacy:()=>O,parseTransparent:()=>Ae,prophoto:()=>Is,random:()=>qe,rec2020:()=>Oi,removeParser:()=>X,rgb:()=>Wr,round:()=>Qi,samples:()=>ut,serializeHex:()=>jl,serializeHex8:()=>Hs,serializeHsl:()=>hi,serializeRgb:()=>Cu,toGamut:()=>Ar,trilerp:()=>yt,unlerp:()=>Xe,useMode:()=>ne,useParser:()=>G,wcagContrast:()=>Bs,wcagLuminance:()=>zs,xyb:()=>na,xyz50:()=>pa,xyz65:()=>Wa,yiq:()=>ln}),V.exports=t(n);var r=(Le,Ue)=>{if(typeof Le=="number"){if(Ue===3)return{mode:"rgb",r:(Le>>8&15|Le>>4&240)/255,g:(Le>>4&15|Le&240)/255,b:(Le&15|Le<<4&240)/255};if(Ue===4)return{mode:"rgb",r:(Le>>12&15|Le>>8&240)/255,g:(Le>>8&15|Le>>4&240)/255,b:(Le>>4&15|Le&240)/255,alpha:(Le&15|Le<<4&240)/255};if(Ue===6)return{mode:"rgb",r:(Le>>16&255)/255,g:(Le>>8&255)/255,b:(Le&255)/255};if(Ue===8)return{mode:"rgb",r:(Le>>24&255)/255,g:(Le>>16&255)/255,b:(Le>>8&255)/255,alpha:(Le&255)/255}}},a=r,o={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},s=o,c=Le=>a(s[Le.toLowerCase()],6),m=c,h=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,v=Le=>{let Ue;return(Ue=Le.match(h))?a(parseInt(Ue[1],16),Ue[1].length):void 0},g=v,i="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",w=`(?:${i}|none)`,S=`${i}%`,M=`(?:${i}%|none)`,C=`(?:${i}%|${i})`,_=`(?:${i}%|${i}|none)`,T=`(?:${i}(deg|grad|rad|turn)|${i})`,f=`(?:${i}(deg|grad|rad|turn)|${i}|none)`,u="\\s*,\\s*",A=new RegExp("^"+_+"$"),x=new RegExp(`^rgba?\\(\\s*${i}${u}${i}${u}${i}\\s*(?:,\\s*${C}\\s*)?\\)$`),z=new RegExp(`^rgba?\\(\\s*${S}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),I=Le=>{let Ue={mode:"rgb"},Qe;if(Qe=Le.match(x))Qe[1]!==void 0&&(Ue.r=Qe[1]/255),Qe[2]!==void 0&&(Ue.g=Qe[2]/255),Qe[3]!==void 0&&(Ue.b=Qe[3]/255);else if(Qe=Le.match(z))Qe[1]!==void 0&&(Ue.r=Qe[1]/100),Qe[2]!==void 0&&(Ue.g=Qe[2]/100),Qe[3]!==void 0&&(Ue.b=Qe[3]/100);else return;return Qe[4]!==void 0?Ue.alpha=Math.max(0,Math.min(1,Qe[4]/100)):Qe[5]!==void 0&&(Ue.alpha=Math.max(0,Math.min(1,+Qe[5]))),Ue},O=I,D=(Le,Ue)=>Le===void 0?void 0:typeof Le!="object"?_e(Le):Le.mode!==void 0?Le:Ue?lo(Li({},Le),{mode:Ue}):void 0,B=D,F=(Le="rgb")=>Ue=>(Ue=B(Ue,Le))!==void 0?Ue.mode===Le?Ue:j[Ue.mode][Le]?j[Ue.mode][Le](Ue):Le==="rgb"?j[Ue.mode].rgb(Ue):j.rgb[Le](j[Ue.mode].rgb(Ue)):void 0,P=F,j={},U={},$=[],Q={},re=Le=>Le,ne=Le=>(j[Le.mode]=Li(Li({},j[Le.mode]),Le.toMode),Object.keys(Le.fromMode||{}).forEach(Ue=>{j[Ue]||(j[Ue]={}),j[Ue][Le.mode]=Le.fromMode[Ue]}),Le.ranges||(Le.ranges={}),Le.difference||(Le.difference={}),Le.channels.forEach(Ue=>{if(Le.ranges[Ue]===void 0&&(Le.ranges[Ue]=[0,1]),!Le.interpolate[Ue])throw new Error(`Missing interpolator for: ${Ue}`);typeof Le.interpolate[Ue]=="function"&&(Le.interpolate[Ue]={use:Le.interpolate[Ue]}),Le.interpolate[Ue].fixup||(Le.interpolate[Ue].fixup=re)}),U[Le.mode]=Le,(Le.parse||[]).forEach(Ue=>{G(Ue,Le.mode)}),P(Le.mode)),se=Le=>U[Le],G=(Le,Ue)=>{if(typeof Le=="string"){if(!Ue)throw new Error("'mode' required when 'parser' is a string");Q[Le]=Ue}else typeof Le=="function"&&$.indexOf(Le)<0&&$.push(Le)},X=Le=>{if(typeof Le=="string")delete Q[Le];else if(typeof Le=="function"){let Ue=$.indexOf(Le);Ue>0&&$.splice(Ue,1)}},K=/[^\x00-\x7F]|[a-zA-Z_]/,H=/[^\x00-\x7F]|[-\w]/,Y={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},q=0;function Z(Le){let Ue=Le[q],Qe=Le[q+1];return Ue==="-"||Ue==="+"?/\d/.test(Qe)||Qe==="."&&/\d/.test(Le[q+2]):Ue==="."?/\d/.test(Qe):/\d/.test(Ue)}function ee(Le){if(q>=Le.length)return!1;let Ue=Le[q];if(K.test(Ue))return!0;if(Ue==="-"){if(Le.length-q<2)return!1;let Qe=Le[q+1];return!!(Qe==="-"||K.test(Qe))}return!1}var ae={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function he(Le){let Ue="";if((Le[q]==="-"||Le[q]==="+")&&(Ue+=Le[q++]),Ue+=xe(Le),Le[q]==="."&&/\d/.test(Le[q+1])&&(Ue+=Le[q++]+xe(Le)),(Le[q]==="e"||Le[q]==="E")&&((Le[q+1]==="-"||Le[q+1]==="+")&&/\d/.test(Le[q+2])?Ue+=Le[q++]+Le[q++]+xe(Le):/\d/.test(Le[q+1])&&(Ue+=Le[q++]+xe(Le))),ee(Le)){let Qe=we(Le);return Qe==="deg"||Qe==="rad"||Qe==="turn"||Qe==="grad"?{type:Y.Hue,value:Ue*ae[Qe]}:void 0}return Le[q]==="%"?(q++,{type:Y.Percentage,value:+Ue}):{type:Y.Number,value:+Ue}}function xe(Le){let Ue="";for(;/\d/.test(Le[q]);)Ue+=Le[q++];return Ue}function we(Le){let Ue="";for(;q24?(isFinite(Ee)&&(clearTimeout(pn),pn=setTimeout(rn,Ee)),wa=0):(wa=1,tn(rn))}p.timer.flush=function(){Ri(),Gn()};function Ri(){for(var de=Date.now(),Ee=aa;Ee;)de>=Ee.t&&Ee.c(de-Ee.t)&&(Ee.c=null),Ee=Ee.n;return de}function Gn(){for(var de,Ee=aa,Ve=1/0;Ee;)Ee.c?(Ee.t=0;--St)Yr.push(at[mr[Hr[St]][2]]);for(St=+ca;St1&&Pt(de[Ve[tt-2]],de[Ve[tt-1]],de[at])<=0;)--tt;Ve[tt++]=at}return Ve.slice(0,tt)}function Ai(de,Ee){return de[0]-Ee[0]||de[1]-Ee[1]}p.geom.polygon=function(de){return V(de,jn),de};var jn=p.geom.polygon.prototype=[];jn.area=function(){for(var de=-1,Ee=this.length,Ve,tt=this[Ee-1],at=0;++deht)St=St.L;else if(Nt=Ee-Wo(St,Ve),Nt>ht){if(!St.R){tt=St;break}St=St.R}else{ct>-ht?(tt=St.P,at=St):Nt>-ht?(tt=St,at=St.N):tt=at=St;break}var Jt=go(de);if(oo.insert(tt,Jt),!(!tt&&!at)){if(tt===at){Zi(tt),at=go(tt.site),oo.insert(Jt,at),Jt.edge=at.edge=Vo(tt.site,Jt.site),Io(tt),Io(at);return}if(!at){Jt.edge=Vo(tt.site,Jt.site);return}Zi(tt),Zi(at);var mr=tt.site,gr=mr.x,Hr=mr.y,Vr=de.x-gr,ca=de.y-Hr,Aa=at.site,Yr=Aa.x-gr,oa=Aa.y-Hr,fa=2*(Vr*oa-ca*Yr),Ea=Vr*Vr+ca*ca,Ma=Yr*Yr+oa*oa,sa={x:(oa*Ea-ca*Ma)/fa+gr,y:(Vr*Ma-Yr*Ea)/fa+Hr};Ts(at.edge,mr,Aa,sa),Jt.edge=Vo(mr,de,null,sa),at.edge=Vo(de,Aa,null,sa),Io(tt),Io(at)}}function jo(de,Ee){var Ve=de.site,tt=Ve.x,at=Ve.y,ct=at-Ee;if(!ct)return tt;var Nt=de.P;if(!Nt)return-1/0;Ve=Nt.site;var St=Ve.x,Jt=Ve.y,mr=Jt-Ee;if(!mr)return St;var gr=St-tt,Hr=1/ct-1/mr,Vr=gr/mr;return Hr?(-Vr+Math.sqrt(Vr*Vr-2*Hr*(gr*gr/(-2*mr)-Jt+mr/2+at-ct/2)))/Hr+tt:(tt+St)/2}function Wo(de,Ee){var Ve=de.N;if(Ve)return jo(Ve,Ee);var tt=de.site;return tt.y===Ee?tt.x:1/0}function to(de){this.site=de,this.edges=[]}to.prototype.prepare=function(){for(var de=this.edges,Ee=de.length,Ve;Ee--;)Ve=de[Ee].edge,(!Ve.b||!Ve.a)&&de.splice(Ee,1);return de.sort(pi),de.length};function wo(de){for(var Ee=de[0][0],Ve=de[1][0],tt=de[0][1],at=de[1][1],ct,Nt,St,Jt,mr=io,gr=mr.length,Hr,Vr,ca,Aa,Yr,oa;gr--;)if(Hr=mr[gr],!(!Hr||!Hr.prepare()))for(ca=Hr.edges,Aa=ca.length,Vr=0;Vrht||i(Jt-Nt)>ht)&&(ca.splice(Vr,0,new Bo(Vs(Hr.site,oa,i(St-Ee)ht?{x:Ee,y:i(ct-Ee)ht?{x:i(Nt-at)ht?{x:Ve,y:i(ct-Ve)ht?{x:i(Nt-tt)=-De)){var Vr=Jt*Jt+mr*mr,ca=gr*gr+oa*oa,Aa=(oa*Vr-mr*ca)/Hr,Yr=(Jt*ca-gr*Vr)/Hr,oa=Yr+St,fa=Mi.pop()||new Vi;fa.arc=de,fa.site=at,fa.x=Aa+Nt,fa.y=oa+Math.sqrt(Aa*Aa+Yr*Yr),fa.cy=oa,de.circle=fa;for(var Ea=null,Ma=Hi._;Ma;)if(fa.y0)){if(Yr/=ca,ca<0){if(Yr0){if(Yr>Vr)return;Yr>Hr&&(Hr=Yr)}if(Yr=Ve-St,!(!ca&&Yr<0)){if(Yr/=ca,ca<0){if(Yr>Vr)return;Yr>Hr&&(Hr=Yr)}else if(ca>0){if(Yr0)){if(Yr/=Aa,Aa<0){if(Yr0){if(Yr>Vr)return;Yr>Hr&&(Hr=Yr)}if(Yr=tt-Jt,!(!Aa&&Yr<0)){if(Yr/=Aa,Aa<0){if(Yr>Vr)return;Yr>Hr&&(Hr=Yr)}else if(Aa>0){if(Yr0&&(at.a={x:St+Hr*ca,y:Jt+Hr*Aa}),Vr<1&&(at.b={x:St+Vr*ca,y:Jt+Vr*Aa}),at}}}}}}function Uo(de){for(var Ee=qi,Ve=Ko(de[0][0],de[0][1],de[1][0],de[1][1]),tt=Ee.length,at;tt--;)at=Ee[tt],(!Ls(at,de)||!Ve(at)||i(at.a.x-at.b.x)=ct)return;if(gr>Vr){if(!tt)tt={x:Aa,y:Nt};else if(tt.y>=St)return;Ve={x:Aa,y:St}}else{if(!tt)tt={x:Aa,y:St};else if(tt.y1)if(gr>Vr){if(!tt)tt={x:(Nt-fa)/oa,y:Nt};else if(tt.y>=St)return;Ve={x:(St-fa)/oa,y:St}}else{if(!tt)tt={x:(St-fa)/oa,y:St};else if(tt.y=ct)return;Ve={x:ct,y:oa*ct+fa}}else{if(!tt)tt={x:ct,y:oa*ct+fa};else if(tt.x=gr&&fa.x<=Vr&&fa.y>=Hr&&fa.y<=ca?[[gr,ca],[Vr,ca],[Vr,Hr],[gr,Hr]]:[];Ea.point=Jt[Yr]}),mr}function St(Jt){return Jt.map(function(mr,gr){return{x:Math.round(tt(mr,gr)/ht)*ht,y:Math.round(at(mr,gr)/ht)*ht,i:gr}})}return Nt.links=function(Jt){return hl(St(Jt)).edges.filter(function(mr){return mr.l&&mr.r}).map(function(mr){return{source:Jt[mr.l.i],target:Jt[mr.r.i]}})},Nt.triangles=function(Jt){var mr=[];return hl(St(Jt)).cells.forEach(function(gr,Hr){for(var Vr=gr.site,ca=gr.edges.sort(pi),Aa=-1,Yr=ca.length,oa,fa,Ea=ca[Yr-1].edge,Ma=Ea.l===Vr?Ea.r:Ea.l;++AaMa&&(Ma=gr.x),gr.y>sa&&(sa=gr.y),ca.push(gr.x),Aa.push(gr.y);else for(Yr=0;YrMa&&(Ma=hn),Tn>sa&&(sa=Tn),ca.push(hn),Aa.push(Tn)}var zn=Ma-fa,$n=sa-Ea;zn>$n?sa=Ea+zn:Ma=fa+$n;function xi(pe,y,N,ie,fe,be,Re,je){if(!(isNaN(N)||isNaN(ie)))if(pe.leaf){var Ze=pe.x,ut=pe.y;if(Ze!=null)if(i(Ze-N)+i(ut-ie)<.01)di(pe,y,N,ie,fe,be,Re,je);else{var ft=pe.point;pe.x=pe.y=pe.point=null,di(pe,ft,Ze,ut,fe,be,Re,je),di(pe,y,N,ie,fe,be,Re,je)}else pe.x=N,pe.y=ie,pe.point=y}else di(pe,y,N,ie,fe,be,Re,je)}function di(pe,y,N,ie,fe,be,Re,je){var Ze=(fe+Re)*.5,ut=(be+je)*.5,ft=N>=Ze,Dt=ie>=ut,Gt=Dt<<1|ft;pe.leaf=!1,pe=pe.nodes[Gt]||(pe.nodes[Gt]=Fl()),ft?fe=Ze:Re=Ze,Dt?be=ut:je=ut,xi(pe,y,N,ie,fe,be,Re,je)}var uo=Fl();if(uo.add=function(pe){xi(uo,pe,+Hr(pe,++Yr),+Vr(pe,Yr),fa,Ea,Ma,sa)},uo.visit=function(pe){pl(pe,uo,fa,Ea,Ma,sa)},uo.find=function(pe){return $u(uo,pe[0],pe[1],fa,Ea,Ma,sa)},Yr=-1,Ee==null){for(;++Yrct||Vr>Nt||ca=hn,$n=Ve>=Tn,xi=$n<<1|zn,di=xi+4;xiVe&&(ct=Ee.slice(Ve,ct),St[Nt]?St[Nt]+=ct:St[++Nt]=ct),(tt=tt[0])===(at=at[0])?St[Nt]?St[Nt]+=at:St[++Nt]=at:(St[++Nt]=null,Jt.push({i:Nt,x:vs(tt,at)})),Ve=rl.lastIndex;return Ve=0&&!(tt=p.interpolators[Ve](de,Ee)););return tt}p.interpolators=[function(de,Ee){var Ve=typeof Ee;return(Ve==="string"?jt.has(Ee.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Ee)?uu:os:Ee instanceof Qr?uu:Array.isArray(Ee)?zu:Ve==="object"&&isNaN(Ee)?tl:vs)(de,Ee)}],p.interpolateArray=zu;function zu(de,Ee){var Ve=[],tt=[],at=de.length,ct=Ee.length,Nt=Math.min(de.length,Ee.length),St;for(St=0;St=0?de.slice(0,Ee):de,tt=Ee>=0?de.slice(Ee+1):"in";return Ve=bc.get(Ve)||Ku,tt=Lh.get(tt)||D,rh(tt(Ve.apply(null,b.call(arguments,1))))};function rh(de){return function(Ee){return Ee<=0?0:Ee>=1?1:de(Ee)}}function Ju(de){return function(Ee){return 1-de(1-Ee)}}function ss(de){return function(Ee){return .5*(Ee<.5?de(2*Ee):2-de(2-2*Ee))}}function ah(de){return de*de}function wc(de){return de*de*de}function pc(de){if(de<=0)return 0;if(de>=1)return 1;var Ee=de*de,Ve=Ee*de;return 4*(de<.5?Ve:3*(de-Ee)+Ve-.75)}function Nf(de){return function(Ee){return Math.pow(Ee,de)}}function Bu(de){return 1-Math.cos(de*Je)}function Tc(de){return Math.pow(2,10*(de-1))}function Ou(de){return 1-Math.sqrt(1-de*de)}function Gc(de,Ee){var Ve;return arguments.length<2&&(Ee=.45),arguments.length?Ve=Ee/We*Math.asin(1/de):(de=1,Ve=Ee/4),function(tt){return 1+de*Math.pow(2,-10*tt)*Math.sin((tt-Ve)*We/Ee)}}function pf(de){return de||(de=1.70158),function(Ee){return Ee*Ee*((de+1)*Ee-de)}}function $l(de){return de<1/2.75?7.5625*de*de:de<2/2.75?7.5625*(de-=1.5/2.75)*de+.75:de<2.5/2.75?7.5625*(de-=2.25/2.75)*de+.9375:7.5625*(de-=2.625/2.75)*de+.984375}p.interpolateHcl=jf;function jf(de,Ee){de=p.hcl(de),Ee=p.hcl(Ee);var Ve=de.h,tt=de.c,at=de.l,ct=Ee.h-Ve,Nt=Ee.c-tt,St=Ee.l-at;return isNaN(Nt)&&(Nt=0,tt=isNaN(tt)?Ee.c:tt),isNaN(ct)?(ct=0,Ve=isNaN(Ve)?Ee.h:Ve):ct>180?ct-=360:ct<-180&&(ct+=360),function(Jt){return Xa(Ve+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateHsl=Hc;function Hc(de,Ee){de=p.hsl(de),Ee=p.hsl(Ee);var Ve=de.h,tt=de.s,at=de.l,ct=Ee.h-Ve,Nt=Ee.s-tt,St=Ee.l-at;return isNaN(Nt)&&(Nt=0,tt=isNaN(tt)?Ee.s:tt),isNaN(ct)?(ct=0,Ve=isNaN(Ve)?Ee.h:Ve):ct>180?ct-=360:ct<-180&&(ct+=360),function(Jt){return Pa(Ve+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateLab=Wc;function Wc(de,Ee){de=p.lab(de),Ee=p.lab(Ee);var Ve=de.l,tt=de.a,at=de.b,ct=Ee.l-Ve,Nt=Ee.a-tt,St=Ee.b-at;return function(Jt){return on(Ve+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateRound=Qu;function Qu(de,Ee){return Ee-=de,function(Ve){return Math.round(de+Ee*Ve)}}p.transform=function(de){var Ee=k.createElementNS(p.ns.prefix.svg,"g");return(p.transform=function(Ve){if(Ve!=null){Ee.setAttribute("transform",Ve);var tt=Ee.transform.baseVal.consolidate()}return new Yc(tt?tt.matrix:Xc)})(de)};function Yc(de){var Ee=[de.a,de.b],Ve=[de.c,de.d],tt=Uf(Ee),at=Nu(Ee,Ve),ct=Uf(al(Ve,Ee,-at))||0;Ee[0]*Ve[1]180?Ee+=360:Ee-de>180&&(de+=360),tt.push({i:Ve.push(ju(Ve)+"rotate(",null,")")-2,x:vs(de,Ee)})):Ee&&Ve.push(ju(Ve)+"rotate("+Ee+")")}function ec(de,Ee,Ve,tt){de!==Ee?tt.push({i:Ve.push(ju(Ve)+"skewX(",null,")")-2,x:vs(de,Ee)}):Ee&&Ve.push(ju(Ve)+"skewX("+Ee+")")}function cu(de,Ee,Ve,tt){if(de[0]!==Ee[0]||de[1]!==Ee[1]){var at=Ve.push(ju(Ve)+"scale(",null,",",null,")");tt.push({i:at-4,x:vs(de[0],Ee[0])},{i:at-2,x:vs(de[1],Ee[1])})}else(Ee[0]!==1||Ee[1]!==1)&&Ve.push(ju(Ve)+"scale("+Ee+")")}function tc(de,Ee){var Ve=[],tt=[];return de=p.transform(de),Ee=p.transform(Ee),Ac(de.translate,Ee.translate,Ve,tt),Zc(de.rotate,Ee.rotate,Ve,tt),ec(de.skew,Ee.skew,Ve,tt),cu(de.scale,Ee.scale,Ve,tt),de=Ee=null,function(at){for(var ct=-1,Nt=tt.length,St;++ct0?ct=sa:(Ve.c=null,Ve.t=NaN,Ve=null,Ee.end({type:"end",alpha:ct=0})):sa>0&&(Ee.start({type:"start",alpha:ct=sa}),Ve=ai(de.tick)),de):ct},de.start=function(){var sa,hn=ca.length,Tn=Aa.length,zn=tt[0],$n=tt[1],xi,di;for(sa=0;sa=0;)ct.push(gr=mr[Jt]),gr.parent=St,gr.depth=St.depth+1;Ve&&(St.value=0),St.children=mr}else Ve&&(St.value=+Ve.call(tt,St,St.depth)||0),delete St.children;return El(at,function(Hr){var Vr,ca;de&&(Vr=Hr.children)&&Vr.sort(de),Ve&&(ca=Hr.parent)&&(ca.value+=Hr.value)}),Nt}return tt.sort=function(at){return arguments.length?(de=at,tt):de},tt.children=function(at){return arguments.length?(Ee=at,tt):Ee},tt.value=function(at){return arguments.length?(Ve=at,tt):Ve},tt.revalue=function(at){return Ve&&(Sl(at,function(ct){ct.children&&(ct.value=0)}),El(at,function(ct){var Nt;ct.children||(ct.value=+Ve.call(tt,ct,ct.depth)||0),(Nt=ct.parent)&&(Nt.value+=ct.value)})),at},tt};function fu(de,Ee){return p.rebind(de,Ee,"sort","children","value"),de.nodes=de,de.links=_l,de}function Sl(de,Ee){for(var Ve=[de];(de=Ve.pop())!=null;)if(Ee(de),(at=de.children)&&(tt=at.length))for(var tt,at;--tt>=0;)Ve.push(at[tt])}function El(de,Ee){for(var Ve=[de],tt=[];(de=Ve.pop())!=null;)if(tt.push(de),(Nt=de.children)&&(ct=Nt.length))for(var at=-1,ct,Nt;++atat&&(at=St),tt.push(St)}for(Nt=0;Nttt&&(Ve=Ee,tt=at);return Ve}function _f(de){return de.reduce(Mu,0)}function Mu(de,Ee){return de+Ee[1]}p.layout.histogram=function(){var de=!0,Ee=Number,Ve=Vu,tt=ic;function at(ct,Vr){for(var St=[],Jt=ct.map(Ee,this),mr=Ve.call(this,Jt,Vr),gr=tt.call(this,mr,Jt,Vr),Hr,Vr=-1,ca=Jt.length,Aa=gr.length-1,Yr=de?1:1/ca,oa;++Vr0)for(Vr=-1;++Vr=mr[0]&&oa<=mr[1]&&(Hr=St[p.bisect(gr,oa,1,Aa)-1],Hr.y+=Yr,Hr.push(ct[Vr]));return St}return at.value=function(ct){return arguments.length?(Ee=ct,at):Ee},at.range=function(ct){return arguments.length?(Ve=ar(ct),at):Ve},at.bins=function(ct){return arguments.length?(tt=typeof ct=="number"?function(Nt){return Sc(Nt,ct)}:ar(ct),at):tt},at.frequency=function(ct){return arguments.length?(de=!!ct,at):de},at};function ic(de,Ee){return Sc(de,Math.ceil(Math.log(Ee.length)/Math.LN2+1))}function Sc(de,Ee){for(var Ve=-1,tt=+de[0],at=(de[1]-tt)/Ee,ct=[];++Ve<=Ee;)ct[Ve]=at*Ve+tt;return ct}function Vu(de){return[p.min(de),p.max(de)]}p.layout.pack=function(){var de=p.layout.hierarchy().sort(xo),Ee=0,Ve=[1,1],tt;function at(ct,Nt){var St=de.call(this,ct,Nt),Jt=St[0],mr=Ve[0],gr=Ve[1],Hr=tt==null?Math.sqrt:typeof tt=="function"?tt:function(){return tt};if(Jt.x=Jt.y=0,El(Jt,function(ca){ca.r=+Hr(ca.value)}),El(Jt,xf),Ee){var Vr=Ee*(tt?1:Math.max(2*Jt.r/mr,2*Jt.r/gr))/2;El(Jt,function(ca){ca.r+=Vr}),El(Jt,xf),El(Jt,function(ca){ca.r-=Vr})}return Hf(Jt,mr/2,gr/2,tt?1:1/Math.max(2*Jt.r/mr,2*Jt.r/gr)),St}return at.size=function(ct){return arguments.length?(Ve=ct,at):Ve},at.radius=function(ct){return arguments.length?(tt=ct==null||typeof ct=="function"?ct:+ct,at):tt},at.padding=function(ct){return arguments.length?(Ee=+ct,at):Ee},fu(at,de)};function xo(de,Ee){return de.value-Ee.value}function Ec(de,Ee){var Ve=de._pack_next;de._pack_next=Ee,Ee._pack_prev=de,Ee._pack_next=Ve,Ve._pack_prev=Ee}function xh(de,Ee){de._pack_next=Ee,Ee._pack_prev=de}function Vf(de,Ee){var Ve=Ee.x-de.x,tt=Ee.y-de.y,at=de.r+Ee.r;return .999*at*at>Ve*Ve+tt*tt}function xf(de){if(!(Ee=de.children)||!(Vr=Ee.length))return;var Ee,Ve=1/0,tt=-1/0,at=1/0,ct=-1/0,Nt,St,Jt,mr,gr,Hr,Vr;function ca(sa){Ve=Math.min(sa.x-sa.r,Ve),tt=Math.max(sa.x+sa.r,tt),at=Math.min(sa.y-sa.r,at),ct=Math.max(sa.y+sa.r,ct)}if(Ee.forEach(Gf),Nt=Ee[0],Nt.x=-Nt.r,Nt.y=0,ca(Nt),Vr>1&&(St=Ee[1],St.x=St.r,St.y=0,ca(St),Vr>2))for(Jt=Ee[2],il(Nt,St,Jt),ca(Jt),Ec(Nt,Jt),Nt._pack_prev=Jt,Ec(Jt,St),St=Nt._pack_next,mr=3;mroa.x&&(oa=hn),hn.depth>fa.depth&&(fa=hn)});var Ea=Ee(Yr,oa)/2-Yr.x,Ma=Ve[0]/(oa.x+Ee(oa,Yr)/2+Ea),sa=Ve[1]/(fa.depth||1);Sl(ca,function(hn){hn.x=(hn.x+Ea)*Ma,hn.y=hn.depth*sa})}return Vr}function ct(gr){for(var Hr={A:null,children:[gr]},Vr=[Hr],ca;(ca=Vr.pop())!=null;)for(var Aa=ca.children,Yr,oa=0,fa=Aa.length;oa0&&(Lc(Ft(Yr,gr,Vr),gr,hn),fa+=hn,Ea+=hn),Ma+=Yr.m,fa+=ca.m,sa+=oa.m,Ea+=Aa.m;Yr&&!Cc(Aa)&&(Aa.t=Yr,Aa.m+=Ma-Ea),ca&&!kc(oa)&&(oa.t=ca,oa.m+=fa-sa,Vr=gr)}return Vr}function mr(gr){gr.x*=Ve[0],gr.y=gr.depth*Ve[1]}return at.separation=function(gr){return arguments.length?(Ee=gr,at):Ee},at.size=function(gr){return arguments.length?(tt=(Ve=gr)==null?mr:null,at):tt?null:Ve},at.nodeSize=function(gr){return arguments.length?(tt=(Ve=gr)==null?null:mr,at):tt?Ve:null},fu(at,de)};function kl(de,Ee){return de.parent==Ee.parent?1:2}function kc(de){var Ee=de.children;return Ee.length?Ee[0]:de.t}function Cc(de){var Ee=de.children,Ve;return(Ve=Ee.length)?Ee[Ve-1]:de.t}function Lc(de,Ee,Ve){var tt=Ve/(Ee.i-de.i);Ee.c-=tt,Ee.s+=Ve,de.c+=tt,Ee.z+=Ve,Ee.m+=Ve}function vc(de){for(var Ee=0,Ve=0,tt=de.children,at=tt.length,ct;--at>=0;)ct=tt[at],ct.z+=Ee,ct.m+=Ee,Ee+=ct.s+(Ve+=ct.c)}function Ft(de,Ee,Ve){return de.a.parent===Ee.parent?de.a:Ve}p.layout.cluster=function(){var de=p.layout.hierarchy().sort(null).value(null),Ee=kl,Ve=[1,1],tt=!1;function at(ct,Nt){var St=de.call(this,ct,Nt),Jt=St[0],mr,gr=0;El(Jt,function(Yr){var oa=Yr.children;oa&&oa.length?(Yr.x=Fr(oa),Yr.y=tr(oa)):(Yr.x=mr?gr+=Ee(Yr,mr):0,Yr.y=0,mr=Yr)});var Hr=wr(Jt),Vr=ea(Jt),ca=Hr.x-Ee(Hr,Vr)/2,Aa=Vr.x+Ee(Vr,Hr)/2;return El(Jt,tt?function(Yr){Yr.x=(Yr.x-Jt.x)*Ve[0],Yr.y=(Jt.y-Yr.y)*Ve[1]}:function(Yr){Yr.x=(Yr.x-ca)/(Aa-ca)*Ve[0],Yr.y=(1-(Jt.y?Yr.y/Jt.y:1))*Ve[1]}),St}return at.separation=function(ct){return arguments.length?(Ee=ct,at):Ee},at.size=function(ct){return arguments.length?(tt=(Ve=ct)==null,at):tt?null:Ve},at.nodeSize=function(ct){return arguments.length?(tt=(Ve=ct)!=null,at):tt?Ve:null},fu(at,de)};function tr(de){return 1+p.max(de,function(Ee){return Ee.y})}function Fr(de){return de.reduce(function(Ee,Ve){return Ee+Ve.x},0)/de.length}function wr(de){var Ee=de.children;return Ee&&Ee.length?wr(Ee[0]):de}function ea(de){var Ee=de.children,Ve;return Ee&&(Ve=Ee.length)?ea(Ee[Ve-1]):de}p.layout.treemap=function(){var de=p.layout.hierarchy(),Ee=Math.round,Ve=[1,1],tt=null,at=ba,ct=!1,Nt,St="squarify",Jt=.5*(1+Math.sqrt(5));function mr(Yr,oa){for(var fa=-1,Ea=Yr.length,Ma,sa;++fa0;)Ea.push(sa=Ma[$n-1]),Ea.area+=sa.area,St!=="squarify"||(Tn=Vr(Ea,zn))<=hn?(Ma.pop(),hn=Tn):(Ea.area-=Ea.pop().area,ca(Ea,zn,fa,!1),zn=Math.min(fa.dx,fa.dy),Ea.length=Ea.area=0,hn=1/0);Ea.length&&(ca(Ea,zn,fa,!0),Ea.length=Ea.area=0),oa.forEach(gr)}}function Hr(Yr){var oa=Yr.children;if(oa&&oa.length){var fa=at(Yr),Ea=oa.slice(),Ma,sa=[];for(mr(Ea,fa.dx*fa.dy/Yr.value),sa.area=0;Ma=Ea.pop();)sa.push(Ma),sa.area+=Ma.area,Ma.z!=null&&(ca(sa,Ma.z?fa.dx:fa.dy,fa,!Ea.length),sa.length=sa.area=0);oa.forEach(Hr)}}function Vr(Yr,oa){for(var fa=Yr.area,Ea,Ma=0,sa=1/0,hn=-1,Tn=Yr.length;++hnMa&&(Ma=Ea));return fa*=fa,oa*=oa,fa?Math.max(oa*Ma*Jt/fa,fa/(oa*sa*Jt)):1/0}function ca(Yr,oa,fa,Ea){var Ma=-1,sa=Yr.length,hn=fa.x,Tn=fa.y,zn=oa?Ee(Yr.area/oa):0,$n;if(oa==fa.dx){for((Ea||zn>fa.dy)&&(zn=fa.dy);++Mafa.dx)&&(zn=fa.dx);++Ma1);return de+Ee*tt*Math.sqrt(-2*Math.log(ct)/ct)}},logNormal:function(){var de=p.random.normal.apply(p,arguments);return function(){return Math.exp(de())}},bates:function(de){var Ee=p.random.irwinHall(de);return function(){return Ee()/de}},irwinHall:function(de){return function(){for(var Ee=0,Ve=0;Ve2?vn:mn,mr=tt?Tu:vf;return at=Jt(de,Ee,mr,Ve),ct=Jt(Ee,de,mr,Fu),St}function St(Jt){return at(Jt)}return St.invert=function(Jt){return ct(Jt)},St.domain=function(Jt){return arguments.length?(de=Jt.map(Number),Nt()):de},St.range=function(Jt){return arguments.length?(Ee=Jt,Nt()):Ee},St.rangeRound=function(Jt){return St.range(Jt).interpolate(Qu)},St.clamp=function(Jt){return arguments.length?(tt=Jt,Nt()):tt},St.interpolate=function(Jt){return arguments.length?(Ve=Jt,Nt()):Ve},St.ticks=function(Jt){return ri(de,Jt)},St.tickFormat=function(Jt,mr){return d3_scale_linearTickFormat(de,Jt,mr)},St.nice=function(Jt){return _i(de,Jt),Nt()},St.copy=function(){return Sn(de,Ee,Ve,tt)},Nt()}function yi(de,Ee){return p.rebind(de,Ee,"range","rangeRound","interpolate","clamp")}function _i(de,Ee){return Da(de,Ha(ki(de,Ee)[2])),Da(de,Ha(ki(de,Ee)[2])),de}function ki(de,Ee){Ee==null&&(Ee=10);var Ve=Na(de),tt=Ve[1]-Ve[0],at=Math.pow(10,Math.floor(Math.log(tt/Ee)/Math.LN10)),ct=Ee/tt*at;return ct<=.15?at*=10:ct<=.35?at*=5:ct<=.75&&(at*=2),Ve[0]=Math.ceil(Ve[0]/at)*at,Ve[1]=Math.floor(Ve[1]/at)*at+at*.5,Ve[2]=at,Ve}function ri(de,Ee){return p.range.apply(p,ki(de,Ee))}var En={s:1,g:1,p:1,r:1,e:1};function Ln(de){return-Math.floor(Math.log(de)/Math.LN10+.01)}function Ni(de,Ee){var Ve=Ln(Ee[2]);return de in En?Math.abs(Ve-Ln(Math.max(i(Ee[0]),i(Ee[1]))))+ +(de!=="e"):Ve-(de==="%")*2}p.scale.log=function(){return $i(p.scale.linear().domain([0,1]),10,!0,[1,10])};function $i(de,Ee,Ve,tt){function at(St){return(Ve?Math.log(St<0?0:St):-Math.log(St>0?0:-St))/Math.log(Ee)}function ct(St){return Ve?Math.pow(Ee,St):-Math.pow(Ee,-St)}function Nt(St){return de(at(St))}return Nt.invert=function(St){return ct(de.invert(St))},Nt.domain=function(St){return arguments.length?(Ve=St[0]>=0,de.domain((tt=St.map(Number)).map(at)),Nt):tt},Nt.base=function(St){return arguments.length?(Ee=+St,de.domain(tt.map(at)),Nt):Ee},Nt.nice=function(){var St=Da(tt.map(at),Ve?Math:Co);return de.domain(St),tt=St.map(ct),Nt},Nt.ticks=function(){var St=Na(tt),Jt=[],mr=St[0],gr=St[1],Hr=Math.floor(at(mr)),Vr=Math.ceil(at(gr)),ca=Ee%1?2:Ee;if(isFinite(Vr-Hr)){if(Ve){for(;Hr0;Aa--)Jt.push(ct(Hr)*Aa);for(Hr=0;Jt[Hr]gr;Vr--);Jt=Jt.slice(Hr,Vr)}return Jt},Nt.copy=function(){return $i(de.copy(),Ee,Ve,tt)},yi(Nt,de)}var Co={floor:function(de){return-Math.ceil(-de)},ceil:function(de){return-Math.floor(-de)}};p.scale.pow=function(){return Do(p.scale.linear(),1,[0,1])};function Do(de,Ee,Ve){var tt=Fo(Ee),at=Fo(1/Ee);function ct(Nt){return de(tt(Nt))}return ct.invert=function(Nt){return at(de.invert(Nt))},ct.domain=function(Nt){return arguments.length?(de.domain((Ve=Nt.map(Number)).map(tt)),ct):Ve},ct.ticks=function(Nt){return ri(Ve,Nt)},ct.tickFormat=function(Nt,St){return d3_scale_linearTickFormat(Ve,Nt,St)},ct.nice=function(Nt){return ct.domain(_i(Ve,Nt))},ct.exponent=function(Nt){return arguments.length?(tt=Fo(Ee=Nt),at=Fo(1/Ee),de.domain(Ve.map(tt)),ct):Ee},ct.copy=function(){return Do(de.copy(),Ee,Ve)},yi(ct,de)}function Fo(de){return function(Ee){return Ee<0?-Math.pow(-Ee,de):Math.pow(Ee,de)}}p.scale.sqrt=function(){return p.scale.pow().exponent(.5)},p.scale.ordinal=function(){return Yo([],{t:"range",a:[[]]})};function Yo(de,Ee){var Ve,tt,at;function ct(St){return tt[((Ve.get(St)||(Ee.t==="range"?Ve.set(St,de.push(St)):NaN))-1)%tt.length]}function Nt(St,Jt){return p.range(de.length).map(function(mr){return St+Jt*mr})}return ct.domain=function(St){if(!arguments.length)return de;de=[],Ve=new M;for(var Jt=-1,mr=St.length,gr;++Jt0?Ve[ct-1]:de[0],ctVr?0:1;if(gr=Ke)return Jt(gr,Aa)+(mr?Jt(mr,1-Aa):"")+"Z";var Yr,oa,fa,Ea,Ma=0,sa=0,hn,Tn,zn,$n,xi,di,uo,pe,y=[];if((Ea=(+Nt.apply(this,arguments)||0)/2)&&(fa=tt===zl?Math.sqrt(mr*mr+gr*gr):+tt.apply(this,arguments),Aa||(sa*=-1),gr&&(sa=qt(fa/gr*Math.sin(Ea))),mr&&(Ma=qt(fa/mr*Math.sin(Ea)))),gr){hn=gr*Math.cos(Hr+sa),Tn=gr*Math.sin(Hr+sa),zn=gr*Math.cos(Vr-sa),$n=gr*Math.sin(Vr-sa);var N=Math.abs(Vr-Hr-2*sa)<=Ne?0:1;if(sa&&mc(hn,Tn,zn,$n)===Aa^N){var ie=(Hr+Vr)/2;hn=gr*Math.cos(ie),Tn=gr*Math.sin(ie),zn=$n=null}}else hn=Tn=0;if(mr){xi=mr*Math.cos(Vr-Ma),di=mr*Math.sin(Vr-Ma),uo=mr*Math.cos(Hr+Ma),pe=mr*Math.sin(Hr+Ma);var fe=Math.abs(Hr-Vr+2*Ma)<=Ne?0:1;if(Ma&&mc(xi,di,uo,pe)===1-Aa^fe){var be=(Hr+Vr)/2;xi=mr*Math.cos(be),di=mr*Math.sin(be),uo=pe=null}}else xi=di=0;if(ca>ht&&(Yr=Math.min(Math.abs(gr-mr)/2,+Ve.apply(this,arguments)))>.001){oa=mr0?0:1}function Jc(de,Ee,Ve,tt,at){var ct=de[0]-Ee[0],Nt=de[1]-Ee[1],St=(at?tt:-tt)/Math.sqrt(ct*ct+Nt*Nt),Jt=St*Nt,mr=-St*ct,gr=de[0]+Jt,Hr=de[1]+mr,Vr=Ee[0]+Jt,ca=Ee[1]+mr,Aa=(gr+Vr)/2,Yr=(Hr+ca)/2,oa=Vr-gr,fa=ca-Hr,Ea=oa*oa+fa*fa,Ma=Ve-tt,sa=gr*ca-Vr*Hr,hn=(fa<0?-1:1)*Math.sqrt(Math.max(0,Ma*Ma*Ea-sa*sa)),Tn=(sa*fa-oa*hn)/Ea,zn=(-sa*oa-fa*hn)/Ea,$n=(sa*fa+oa*hn)/Ea,xi=(-sa*oa+fa*hn)/Ea,di=Tn-Aa,uo=zn-Yr,pe=$n-Aa,y=xi-Yr;return di*di+uo*uo>pe*pe+y*y&&(Tn=$n,zn=xi),[[Tn-Jt,zn-mr],[Tn*Ve/Ma,zn*Ve/Ma]]}function oc(){return!0}function du(de){var Ee=no,Ve=Di,tt=oc,at=Ql,ct=at.key,Nt=.7;function St(Jt){var mr=[],gr=[],Hr=-1,Vr=Jt.length,ca,Aa=ar(Ee),Yr=ar(Ve);function oa(){mr.push("M",at(de(gr),Nt))}for(;++Hr1?de.join("L"):de+"Z"}function Eu(de){return de.join("L")+"Z"}function bf(de){for(var Ee=0,Ve=de.length,tt=de[0],at=[tt[0],",",tt[1]];++Ee1&&at.push("H",tt[0]),at.join("")}function lh(de){for(var Ee=0,Ve=de.length,tt=de[0],at=[tt[0],",",tt[1]];++Ee1){St=Ee[1],ct=de[Jt],Jt++,tt+="C"+(at[0]+Nt[0])+","+(at[1]+Nt[1])+","+(ct[0]-St[0])+","+(ct[1]-St[1])+","+ct[0]+","+ct[1];for(var mr=2;mr9&&(ct=Ve*3/Math.sqrt(ct),Nt[St]=ct*tt,Nt[St+1]=ct*at));for(St=-1;++St<=Jt;)ct=(de[Math.min(Jt,St+1)][0]-de[Math.max(0,St-1)][0])/(6*(1+Nt[St]*Nt[St])),Ee.push([ct||0,Nt[St]*ct||0]);return Ee}function Pr(de){return de.length<3?Ql(de):de[0]+wf(de,Wt(de))}p.svg.line.radial=function(){var de=du(Br);return de.radius=de.x,delete de.x,de.angle=de.y,delete de.y,de};function Br(de){for(var Ee,Ve=-1,tt=de.length,at,ct;++VeNe)+",1 "+Hr}function mr(gr,Hr,Vr,ca){return"Q 0,0 "+ca}return ct.radius=function(gr){return arguments.length?(Ve=ar(gr),ct):Ve},ct.source=function(gr){return arguments.length?(de=ar(gr),ct):de},ct.target=function(gr){return arguments.length?(Ee=ar(gr),ct):Ee},ct.startAngle=function(gr){return arguments.length?(tt=ar(gr),ct):tt},ct.endAngle=function(gr){return arguments.length?(at=ar(gr),ct):at},ct};function la(de){return de.radius}p.svg.diagonal=function(){var de=jr,Ee=Jr,Ve=xa;function tt(at,ct){var Nt=de.call(this,at,ct),St=Ee.call(this,at,ct),Jt=(Nt.y+St.y)/2,mr=[Nt,{x:Nt.x,y:Jt},{x:St.x,y:Jt},St];return mr=mr.map(Ve),"M"+mr[0]+"C"+mr[1]+" "+mr[2]+" "+mr[3]}return tt.source=function(at){return arguments.length?(de=ar(at),tt):de},tt.target=function(at){return arguments.length?(Ee=ar(at),tt):Ee},tt.projection=function(at){return arguments.length?(Ve=at,tt):Ve},tt};function xa(de){return[de.x,de.y]}p.svg.diagonal.radial=function(){var de=p.svg.diagonal(),Ee=xa,Ve=de.projection;return de.projection=function(tt){return arguments.length?Ve(Ba(Ee=tt)):Ee},de};function Ba(de){return function(){var Ee=de.apply(this,arguments),Ve=Ee[0],tt=Ee[1]-Je;return[Ve*Math.cos(tt),Ve*Math.sin(tt)]}}p.svg.symbol=function(){var de=wn,Ee=an;function Ve(tt,at){return(Si.get(de.call(this,tt,at))||ii)(Ee.call(this,tt,at))}return Ve.type=function(tt){return arguments.length?(de=ar(tt),Ve):de},Ve.size=function(tt){return arguments.length?(Ee=ar(tt),Ve):Ee},Ve};function an(){return 64}function wn(){return"circle"}function ii(de){var Ee=Math.sqrt(de/Ne);return"M0,"+Ee+"A"+Ee+","+Ee+" 0 1,1 0,"+-Ee+"A"+Ee+","+Ee+" 0 1,1 0,"+Ee+"Z"}var Si=p.map({circle:ii,cross:function(de){var Ee=Math.sqrt(de/5)/2;return"M"+-3*Ee+","+-Ee+"H"+-Ee+"V"+-3*Ee+"H"+Ee+"V"+-Ee+"H"+3*Ee+"V"+Ee+"H"+Ee+"V"+3*Ee+"H"+-Ee+"V"+Ee+"H"+-3*Ee+"Z"},diamond:function(de){var Ee=Math.sqrt(de/(2*Ji)),Ve=Ee*Ji;return"M0,"+-Ee+"L"+Ve+",0 0,"+Ee+" "+-Ve+",0Z"},square:function(de){var Ee=Math.sqrt(de)/2;return"M"+-Ee+","+-Ee+"L"+Ee+","+-Ee+" "+Ee+","+Ee+" "+-Ee+","+Ee+"Z"},"triangle-down":function(de){var Ee=Math.sqrt(de/oi),Ve=Ee*oi/2;return"M0,"+Ve+"L"+Ee+","+-Ve+" "+-Ee+","+-Ve+"Z"},"triangle-up":function(de){var Ee=Math.sqrt(de/oi),Ve=Ee*oi/2;return"M0,"+-Ve+"L"+Ee+","+Ve+" "+-Ee+","+Ve+"Z"}});p.svg.symbolTypes=Si.keys();var oi=Math.sqrt(3),Ji=Math.tan(30*et);q.transition=function(de){for(var Ee=ol||++ys,Ve=hi(de),tt=[],at,ct,Nt=jl||{time:Date.now(),ease:pc,delay:0,duration:250},St=-1,Jt=this.length;++St0;)Hr[--Ea].call(de,fa);if(oa>=1)return Nt.event&&Nt.event.end.call(de,de.__data__,Ee),--ct.count?delete ct[tt]:delete de[Ve],1}Nt||(St=at.time,Jt=ai(Vr,0,St),Nt=ct[tt]={tween:new M,time:St,timer:Jt,delay:at.delay,duration:at.duration,ease:at.ease,index:Ee},at=null,++ct.count)}p.svg.axis=function(){var de=p.scale.linear(),Ee=sl,Ve=6,tt=6,at=3,ct=[10],Nt=null,St;function Jt(mr){mr.each(function(){var gr=p.select(this),Hr=this.__chart__||de,Vr=this.__chart__=de.copy(),ca=Nt??(Vr.ticks?Vr.ticks.apply(Vr,ct):Vr.domain()),Aa=St??(Vr.tickFormat?Vr.tickFormat.apply(Vr,ct):D),Yr=gr.selectAll(".tick").data(ca,Vr),oa=Yr.enter().insert("g",".domain").attr("class","tick").style("opacity",ht),fa=p.transition(Yr.exit()).style("opacity",ht).remove(),Ea=p.transition(Yr.order()).style("opacity",1),Ma=Math.max(Ve,0)+at,sa,hn=Za(Vr),Tn=gr.selectAll(".domain").data([0]),zn=(Tn.enter().append("path").attr("class","domain"),p.transition(Tn));oa.append("line"),oa.append("text");var $n=oa.select("line"),xi=Ea.select("line"),di=Yr.select("text").text(Aa),uo=oa.select("text"),pe=Ea.select("text"),y=Ee==="top"||Ee==="left"?-1:1,N,ie,fe,be;if(Ee==="bottom"||Ee==="top"?(sa=tu,N="x",fe="y",ie="x2",be="y2",di.attr("dy",y<0?"0em":".71em").style("text-anchor","middle"),zn.attr("d","M"+hn[0]+","+y*tt+"V0H"+hn[1]+"V"+y*tt)):(sa=Ps,N="y",fe="x",ie="y2",be="x2",di.attr("dy",".32em").style("text-anchor",y<0?"end":"start"),zn.attr("d","M"+y*tt+","+hn[0]+"H0V"+hn[1]+"H"+y*tt)),$n.attr(be,y*Ve),uo.attr(fe,y*Ma),xi.attr(ie,0).attr(be,y*Ve),pe.attr(N,0).attr(fe,y*Ma),Vr.rangeBand){var Re=Vr,je=Re.rangeBand()/2;Hr=Vr=function(Ze){return Re(Ze)+je}}else Hr.rangeBand?Hr=Vr:fa.call(sa,Vr,Hr);oa.call(sa,Hr,Vr),Ea.call(sa,Vr,Vr)})}return Jt.scale=function(mr){return arguments.length?(de=mr,Jt):de},Jt.orient=function(mr){return arguments.length?(Ee=mr in sc?mr+"":sl,Jt):Ee},Jt.ticks=function(){return arguments.length?(ct=E(arguments),Jt):ct},Jt.tickValues=function(mr){return arguments.length?(Nt=mr,Jt):Nt},Jt.tickFormat=function(mr){return arguments.length?(St=mr,Jt):St},Jt.tickSize=function(mr){var gr=arguments.length;return gr?(Ve=+mr,tt=+arguments[gr-1],Jt):Ve},Jt.innerTickSize=function(mr){return arguments.length?(Ve=+mr,Jt):Ve},Jt.outerTickSize=function(mr){return arguments.length?(tt=+mr,Jt):tt},Jt.tickPadding=function(mr){return arguments.length?(at=+mr,Jt):at},Jt.tickSubdivide=function(){return arguments.length&&Jt},Jt};var sl="bottom",sc={top:1,right:1,bottom:1,left:1};function tu(de,Ee,Ve){de.attr("transform",function(tt){var at=Ee(tt);return"translate("+(isFinite(at)?at:Ve(tt))+",0)"})}function Ps(de,Ee,Ve){de.attr("transform",function(tt){var at=Ee(tt);return"translate(0,"+(isFinite(at)?at:Ve(tt))+")"})}p.svg.brush=function(){var de=ne(gr,"brushstart","brush","brushend"),Ee=null,Ve=null,tt=[0,0],at=[0,0],ct,Nt,St=!0,Jt=!0,mr=pu[0];function gr(Yr){Yr.each(function(){var oa=p.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Aa).on("touchstart.brush",Aa),fa=oa.selectAll(".background").data([0]);fa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),oa.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ea=oa.selectAll(".resize").data(mr,D);Ea.exit().remove(),Ea.enter().append("g").attr("class",function(Tn){return"resize "+Tn}).style("cursor",function(Tn){return gc[Tn]}).append("rect").attr("x",function(Tn){return/[ew]$/.test(Tn)?-3:null}).attr("y",function(Tn){return/^[ns]/.test(Tn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ea.style("display",gr.empty()?"none":null);var Ma=p.transition(oa),sa=p.transition(fa),hn;Ee&&(hn=Za(Ee),sa.attr("x",hn[0]).attr("width",hn[1]-hn[0]),Vr(Ma)),Ve&&(hn=Za(Ve),sa.attr("y",hn[0]).attr("height",hn[1]-hn[0]),ca(Ma)),Hr(Ma)})}gr.event=function(Yr){Yr.each(function(){var oa=de.of(this,arguments),fa={x:tt,y:at,i:ct,j:Nt},Ea=this.__chart__||fa;this.__chart__=fa,ol?p.select(this).transition().each("start.brush",function(){ct=Ea.i,Nt=Ea.j,tt=Ea.x,at=Ea.y,oa({type:"brushstart"})}).tween("brush:brush",function(){var Ma=zu(tt,fa.x),sa=zu(at,fa.y);return ct=Nt=null,function(hn){tt=fa.x=Ma(hn),at=fa.y=sa(hn),oa({type:"brush",mode:"resize"})}}).each("end.brush",function(){ct=fa.i,Nt=fa.j,oa({type:"brush",mode:"resize"}),oa({type:"brushend"})}):(oa({type:"brushstart"}),oa({type:"brush",mode:"resize"}),oa({type:"brushend"}))})};function Hr(Yr){Yr.selectAll(".resize").attr("transform",function(oa){return"translate("+tt[+/e$/.test(oa)]+","+at[+/^s/.test(oa)]+")"})}function Vr(Yr){Yr.select(".extent").attr("x",tt[0]),Yr.selectAll(".extent,.n>rect,.s>rect").attr("width",tt[1]-tt[0])}function ca(Yr){Yr.select(".extent").attr("y",at[0]),Yr.selectAll(".extent,.e>rect,.w>rect").attr("height",at[1]-at[0])}function Aa(){var Yr=this,oa=p.select(p.event.target),fa=de.of(Yr,arguments),Ea=p.select(Yr),Ma=oa.datum(),sa=!/^(n|s)$/.test(Ma)&&Ee,hn=!/^(e|w)$/.test(Ma)&&Ve,Tn=oa.classed("extent"),zn=Xt(Yr),$n,xi=p.mouse(Yr),di,uo=p.select(e(Yr)).on("keydown.brush",N).on("keyup.brush",ie);if(p.event.changedTouches?uo.on("touchmove.brush",fe).on("touchend.brush",Re):uo.on("mousemove.brush",fe).on("mouseup.brush",Re),Ea.interrupt().selectAll("*").interrupt(),Tn)xi[0]=tt[0]-xi[0],xi[1]=at[0]-xi[1];else if(Ma){var pe=+/w$/.test(Ma),y=+/^n/.test(Ma);di=[tt[1-pe]-xi[0],at[1-y]-xi[1]],xi[0]=tt[pe],xi[1]=at[y]}else p.event.altKey&&($n=xi.slice());Ea.style("pointer-events","none").selectAll(".resize").style("display",null),p.select("body").style("cursor",oa.style("cursor")),fa({type:"brushstart"}),fe();function N(){p.event.keyCode==32&&(Tn||($n=null,xi[0]-=tt[1],xi[1]-=at[1],Tn=2),Q())}function ie(){p.event.keyCode==32&&Tn==2&&(xi[0]+=tt[1],xi[1]+=at[1],Tn=0,Q())}function fe(){var je=p.mouse(Yr),Ze=!1;di&&(je[0]+=di[0],je[1]+=di[1]),Tn||(p.event.altKey?($n||($n=[(tt[0]+tt[1])/2,(at[0]+at[1])/2]),xi[0]=tt[+(je[0]<$n[0])],xi[1]=at[+(je[1]<$n[1])]):$n=null),sa&&be(je,Ee,0)&&(Vr(Ea),Ze=!0),hn&&be(je,Ve,1)&&(ca(Ea),Ze=!0),Ze&&(Hr(Ea),fa({type:"brush",mode:Tn?"move":"resize"}))}function be(je,Ze,ut){var ft=Za(Ze),Dt=ft[0],Gt=ft[1],Kt=xi[ut],st=ut?at:tt,It=st[1]-st[0],Ut,ir;if(Tn&&(Dt-=Kt,Gt-=It+Kt),Ut=(ut?Jt:St)?Math.max(Dt,Math.min(Gt,je[ut])):je[ut],Tn?ir=(Ut+=Kt)+It:($n&&(Kt=Math.max(Dt,Math.min(Gt,2*$n[ut]-Ut))),Kt0))return At;do At.push($t=new Date(+yt)),Ae(yt,Tt),le(yt);while($t=gt)for(;le(gt),!yt(gt);)gt.setTime(gt-1)},function(gt,Tt){if(gt>=gt)if(Tt<0)for(;++Tt<=0;)for(;Ae(gt,-1),!yt(gt););else for(;--Tt>=0;)for(;Ae(gt,1),!yt(gt););})},Be&&(Ye.count=function(yt,gt){return b.setTime(+yt),E.setTime(+gt),le(b),le(E),Math.floor(Be(b,E))},Ye.every=function(yt){return yt=Math.floor(yt),!isFinite(yt)||!(yt>0)?null:yt>1?Ye.filter(Xe?function(gt){return Xe(gt)%yt===0}:function(gt){return Ye.count(0,gt)%yt===0}):Ye}),Ye}var l=k(function(){},function(le,Ae){le.setTime(+le+Ae)},function(le,Ae){return Ae-le});l.every=function(le){return le=Math.floor(le),!isFinite(le)||!(le>0)?null:le>1?k(function(Ae){Ae.setTime(Math.floor(Ae/le)*le)},function(Ae,Be){Ae.setTime(+Ae+Be*le)},function(Ae,Be){return(Be-Ae)/le}):l};var e=l.range,t=1e3,n=6e4,r=36e5,a=864e5,o=6048e5,s=k(function(le){le.setTime(le-le.getMilliseconds())},function(le,Ae){le.setTime(+le+Ae*t)},function(le,Ae){return(Ae-le)/t},function(le){return le.getUTCSeconds()}),c=s.range,g=k(function(le){le.setTime(le-le.getMilliseconds()-le.getSeconds()*t)},function(le,Ae){le.setTime(+le+Ae*n)},function(le,Ae){return(Ae-le)/n},function(le){return le.getMinutes()}),f=g.range,v=k(function(le){le.setTime(le-le.getMilliseconds()-le.getSeconds()*t-le.getMinutes()*n)},function(le,Ae){le.setTime(+le+Ae*r)},function(le,Ae){return(Ae-le)/r},function(le){return le.getHours()}),m=v.range,i=k(function(le){le.setHours(0,0,0,0)},function(le,Ae){le.setDate(le.getDate()+Ae)},function(le,Ae){return(Ae-le-(Ae.getTimezoneOffset()-le.getTimezoneOffset())*n)/a},function(le){return le.getDate()-1}),T=i.range;function S(le){return k(function(Ae){Ae.setDate(Ae.getDate()-(Ae.getDay()+7-le)%7),Ae.setHours(0,0,0,0)},function(Ae,Be){Ae.setDate(Ae.getDate()+Be*7)},function(Ae,Be){return(Be-Ae-(Be.getTimezoneOffset()-Ae.getTimezoneOffset())*n)/o})}var M=S(0),C=S(1),_=S(2),w=S(3),h=S(4),u=S(5),A=S(6),x=M.range,z=C.range,I=_.range,O=w.range,D=h.range,B=u.range,F=A.range,P=k(function(le){le.setDate(1),le.setHours(0,0,0,0)},function(le,Ae){le.setMonth(le.getMonth()+Ae)},function(le,Ae){return Ae.getMonth()-le.getMonth()+(Ae.getFullYear()-le.getFullYear())*12},function(le){return le.getMonth()}),j=P.range,U=k(function(le){le.setMonth(0,1),le.setHours(0,0,0,0)},function(le,Ae){le.setFullYear(le.getFullYear()+Ae)},function(le,Ae){return Ae.getFullYear()-le.getFullYear()},function(le){return le.getFullYear()});U.every=function(le){return!isFinite(le=Math.floor(le))||!(le>0)?null:k(function(Ae){Ae.setFullYear(Math.floor(Ae.getFullYear()/le)*le),Ae.setMonth(0,1),Ae.setHours(0,0,0,0)},function(Ae,Be){Ae.setFullYear(Ae.getFullYear()+Be*le)})};var $=U.range,Q=k(function(le){le.setUTCSeconds(0,0)},function(le,Ae){le.setTime(+le+Ae*n)},function(le,Ae){return(Ae-le)/n},function(le){return le.getUTCMinutes()}),re=Q.range,ne=k(function(le){le.setUTCMinutes(0,0,0)},function(le,Ae){le.setTime(+le+Ae*r)},function(le,Ae){return(Ae-le)/r},function(le){return le.getUTCHours()}),se=ne.range,V=k(function(le){le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCDate(le.getUTCDate()+Ae)},function(le,Ae){return(Ae-le)/a},function(le){return le.getUTCDate()-1}),Z=V.range;function K(le){return k(function(Ae){Ae.setUTCDate(Ae.getUTCDate()-(Ae.getUTCDay()+7-le)%7),Ae.setUTCHours(0,0,0,0)},function(Ae,Be){Ae.setUTCDate(Ae.getUTCDate()+Be*7)},function(Ae,Be){return(Be-Ae)/o})}var H=K(0),X=K(1),q=K(2),W=K(3),ee=K(4),ae=K(5),he=K(6),xe=H.range,we=X.range,Me=q.range,Se=W.range,Ie=ee.range,Ge=ae.range,qe=he.range,ke=k(function(le){le.setUTCDate(1),le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCMonth(le.getUTCMonth()+Ae)},function(le,Ae){return Ae.getUTCMonth()-le.getUTCMonth()+(Ae.getUTCFullYear()-le.getUTCFullYear())*12},function(le){return le.getUTCMonth()}),_e=ke.range,ue=k(function(le){le.setUTCMonth(0,1),le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCFullYear(le.getUTCFullYear()+Ae)},function(le,Ae){return Ae.getUTCFullYear()-le.getUTCFullYear()},function(le){return le.getUTCFullYear()});ue.every=function(le){return!isFinite(le=Math.floor(le))||!(le>0)?null:k(function(Ae){Ae.setUTCFullYear(Math.floor(Ae.getUTCFullYear()/le)*le),Ae.setUTCMonth(0,1),Ae.setUTCHours(0,0,0,0)},function(Ae,Be){Ae.setUTCFullYear(Ae.getUTCFullYear()+Be*le)})};var ve=ue.range;p.timeDay=i,p.timeDays=T,p.timeFriday=u,p.timeFridays=B,p.timeHour=v,p.timeHours=m,p.timeInterval=k,p.timeMillisecond=l,p.timeMilliseconds=e,p.timeMinute=g,p.timeMinutes=f,p.timeMonday=C,p.timeMondays=z,p.timeMonth=P,p.timeMonths=j,p.timeSaturday=A,p.timeSaturdays=F,p.timeSecond=s,p.timeSeconds=c,p.timeSunday=M,p.timeSundays=x,p.timeThursday=h,p.timeThursdays=D,p.timeTuesday=_,p.timeTuesdays=I,p.timeWednesday=w,p.timeWednesdays=O,p.timeWeek=M,p.timeWeeks=x,p.timeYear=U,p.timeYears=$,p.utcDay=V,p.utcDays=Z,p.utcFriday=ae,p.utcFridays=Ge,p.utcHour=ne,p.utcHours=se,p.utcMillisecond=l,p.utcMilliseconds=e,p.utcMinute=Q,p.utcMinutes=re,p.utcMonday=X,p.utcMondays=we,p.utcMonth=ke,p.utcMonths=_e,p.utcSaturday=he,p.utcSaturdays=qe,p.utcSecond=s,p.utcSeconds=c,p.utcSunday=H,p.utcSundays=xe,p.utcThursday=ee,p.utcThursdays=Ie,p.utcTuesday=q,p.utcTuesdays=Me,p.utcWednesday=W,p.utcWednesdays=Se,p.utcWeek=H,p.utcWeeks=xe,p.utcYear=ue,p.utcYears=ve,Object.defineProperty(p,"__esModule",{value:!0})})}}),jm=ze({"node_modules/d3-time-format/dist/d3-time-format.js"(J,G){(function(p,b){typeof J=="object"&&typeof G<"u"?b(J,kw()):(p=p||self,b(p.d3=p.d3||{},p.d3))})(J,function(p,b){"use strict";function E(Je){if(0<=Je.y&&Je.y<100){var et=new Date(-1,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L);return et.setFullYear(Je.y),et}return new Date(Je.y,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L)}function k(Je){if(0<=Je.y&&Je.y<100){var et=new Date(Date.UTC(-1,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L));return et.setUTCFullYear(Je.y),et}return new Date(Date.UTC(Je.y,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L))}function l(Je,et,Mt){return{y:Je,m:et,d:Mt,H:0,M:0,S:0,L:0}}function e(Je){var et=Je.dateTime,Mt=Je.date,pt=Je.time,Pt=Je.periods,Ct=Je.days,qt=Je.shortDays,Vt=Je.months,Ht=Je.shortMonths,Sr=c(Pt),Kr=g(Pt),Yt=c(Ct),Rt=g(Ct),nr=c(qt),ur=g(qt),cr=c(Vt),Rr=g(Vt),Qr=c(Ht),Zr=g(Ht),ha={a:Yi,A:Ja,b:Oa,B:lt,c:null,d:P,e:P,f:re,g:ae,G:xe,H:j,I:U,j:$,L:Q,m:ne,M:se,p:rt,q:fr,Q:Xt,s:or,S:V,u:Z,U:K,V:X,w:q,W,x:null,X:null,y:ee,Y:he,Z:we,"%":_r},Pa={a:lr,A:Tr,b:Ir,B:Dr,c:null,d:Me,e:Me,f:ke,g:Tt,G:$t,H:Se,I:Ie,j:Ge,L:qe,m:_e,M:ue,p:ot,q:kt,Q:Xt,s:or,S:ve,u:le,U:Ae,V:Xe,w:Ye,W:yt,x:null,X:null,y:gt,Y:At,Z:rr,"%":_r},La={a:yn,A:Un,b:li,B:Yn,c:on,d:h,e:h,f:O,g:M,G:S,H:A,I:A,j:u,L:I,m:w,M:x,p:Nn,q:_,Q:B,s:F,S:z,u:v,U:m,V:i,w:f,W:T,x:en,X:vi,y:M,Y:S,Z:C,"%":D};ha.x=un(Mt,ha),ha.X=un(pt,ha),ha.c=un(et,ha),Pa.x=un(Mt,Pa),Pa.X=un(pt,Pa),Pa.c=un(et,Pa);function un(jt,ar){return function(Er){var xr=[],zr=-1,Lr=0,aa=jt.length,Sa,wa,pn;for(Er instanceof Date||(Er=new Date(+Er));++zr53)return null;"w"in xr||(xr.w=1),"Z"in xr?(Lr=k(l(xr.y,0,1)),aa=Lr.getUTCDay(),Lr=aa>4||aa===0?b.utcMonday.ceil(Lr):b.utcMonday(Lr),Lr=b.utcDay.offset(Lr,(xr.V-1)*7),xr.y=Lr.getUTCFullYear(),xr.m=Lr.getUTCMonth(),xr.d=Lr.getUTCDate()+(xr.w+6)%7):(Lr=E(l(xr.y,0,1)),aa=Lr.getDay(),Lr=aa>4||aa===0?b.timeMonday.ceil(Lr):b.timeMonday(Lr),Lr=b.timeDay.offset(Lr,(xr.V-1)*7),xr.y=Lr.getFullYear(),xr.m=Lr.getMonth(),xr.d=Lr.getDate()+(xr.w+6)%7)}else("W"in xr||"U"in xr)&&("w"in xr||(xr.w="u"in xr?xr.u%7:"W"in xr?1:0),aa="Z"in xr?k(l(xr.y,0,1)).getUTCDay():E(l(xr.y,0,1)).getDay(),xr.m=0,xr.d="W"in xr?(xr.w+6)%7+xr.W*7-(aa+5)%7:xr.w+xr.U*7-(aa+6)%7);return"Z"in xr?(xr.H+=xr.Z/100|0,xr.M+=xr.Z%100,k(xr)):E(xr)}}function ja(jt,ar,Er,xr){for(var zr=0,Lr=ar.length,aa=Er.length,Sa,wa;zr=aa)return-1;if(Sa=ar.charCodeAt(zr++),Sa===37){if(Sa=ar.charAt(zr++),wa=La[Sa in t?ar.charAt(zr++):Sa],!wa||(xr=wa(jt,Er,xr))<0)return-1}else if(Sa!=Er.charCodeAt(xr++))return-1}return xr}function Nn(jt,ar,Er){var xr=Sr.exec(ar.slice(Er));return xr?(jt.p=Kr[xr[0].toLowerCase()],Er+xr[0].length):-1}function yn(jt,ar,Er){var xr=nr.exec(ar.slice(Er));return xr?(jt.w=ur[xr[0].toLowerCase()],Er+xr[0].length):-1}function Un(jt,ar,Er){var xr=Yt.exec(ar.slice(Er));return xr?(jt.w=Rt[xr[0].toLowerCase()],Er+xr[0].length):-1}function li(jt,ar,Er){var xr=Qr.exec(ar.slice(Er));return xr?(jt.m=Zr[xr[0].toLowerCase()],Er+xr[0].length):-1}function Yn(jt,ar,Er){var xr=cr.exec(ar.slice(Er));return xr?(jt.m=Rr[xr[0].toLowerCase()],Er+xr[0].length):-1}function on(jt,ar,Er){return ja(jt,et,ar,Er)}function en(jt,ar,Er){return ja(jt,Mt,ar,Er)}function vi(jt,ar,Er){return ja(jt,pt,ar,Er)}function Yi(jt){return qt[jt.getDay()]}function Ja(jt){return Ct[jt.getDay()]}function Oa(jt){return Ht[jt.getMonth()]}function lt(jt){return Vt[jt.getMonth()]}function rt(jt){return Pt[+(jt.getHours()>=12)]}function fr(jt){return 1+~~(jt.getMonth()/3)}function lr(jt){return qt[jt.getUTCDay()]}function Tr(jt){return Ct[jt.getUTCDay()]}function Ir(jt){return Ht[jt.getUTCMonth()]}function Dr(jt){return Vt[jt.getUTCMonth()]}function ot(jt){return Pt[+(jt.getUTCHours()>=12)]}function kt(jt){return 1+~~(jt.getUTCMonth()/3)}return{format:function(jt){var ar=un(jt+="",ha);return ar.toString=function(){return jt},ar},parse:function(jt){var ar=Xa(jt+="",!1);return ar.toString=function(){return jt},ar},utcFormat:function(jt){var ar=un(jt+="",Pa);return ar.toString=function(){return jt},ar},utcParse:function(jt){var ar=Xa(jt+="",!0);return ar.toString=function(){return jt},ar}}}var t={"-":"",_:" ",0:"0"},n=/^\s*\d+/,r=/^%/,a=/[\\^$*+?|[\]().{}]/g;function o(Je,et,Mt){var pt=Je<0?"-":"",Pt=(pt?-Je:Je)+"",Ct=Pt.length;return pt+(Ct68?1900:2e3),Mt+pt[0].length):-1}function C(Je,et,Mt){var pt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(et.slice(Mt,Mt+6));return pt?(Je.Z=pt[1]?0:-(pt[2]+(pt[3]||"00")),Mt+pt[0].length):-1}function _(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+1));return pt?(Je.q=pt[0]*3-3,Mt+pt[0].length):-1}function w(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.m=pt[0]-1,Mt+pt[0].length):-1}function h(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.d=+pt[0],Mt+pt[0].length):-1}function u(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+3));return pt?(Je.m=0,Je.d=+pt[0],Mt+pt[0].length):-1}function A(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.H=+pt[0],Mt+pt[0].length):-1}function x(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.M=+pt[0],Mt+pt[0].length):-1}function z(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.S=+pt[0],Mt+pt[0].length):-1}function I(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+3));return pt?(Je.L=+pt[0],Mt+pt[0].length):-1}function O(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+6));return pt?(Je.L=Math.floor(pt[0]/1e3),Mt+pt[0].length):-1}function D(Je,et,Mt){var pt=r.exec(et.slice(Mt,Mt+1));return pt?Mt+pt[0].length:-1}function B(Je,et,Mt){var pt=n.exec(et.slice(Mt));return pt?(Je.Q=+pt[0],Mt+pt[0].length):-1}function F(Je,et,Mt){var pt=n.exec(et.slice(Mt));return pt?(Je.s=+pt[0],Mt+pt[0].length):-1}function P(Je,et){return o(Je.getDate(),et,2)}function j(Je,et){return o(Je.getHours(),et,2)}function U(Je,et){return o(Je.getHours()%12||12,et,2)}function $(Je,et){return o(1+b.timeDay.count(b.timeYear(Je),Je),et,3)}function Q(Je,et){return o(Je.getMilliseconds(),et,3)}function re(Je,et){return Q(Je,et)+"000"}function ne(Je,et){return o(Je.getMonth()+1,et,2)}function se(Je,et){return o(Je.getMinutes(),et,2)}function V(Je,et){return o(Je.getSeconds(),et,2)}function Z(Je){var et=Je.getDay();return et===0?7:et}function K(Je,et){return o(b.timeSunday.count(b.timeYear(Je)-1,Je),et,2)}function H(Je){var et=Je.getDay();return et>=4||et===0?b.timeThursday(Je):b.timeThursday.ceil(Je)}function X(Je,et){return Je=H(Je),o(b.timeThursday.count(b.timeYear(Je),Je)+(b.timeYear(Je).getDay()===4),et,2)}function q(Je){return Je.getDay()}function W(Je,et){return o(b.timeMonday.count(b.timeYear(Je)-1,Je),et,2)}function ee(Je,et){return o(Je.getFullYear()%100,et,2)}function ae(Je,et){return Je=H(Je),o(Je.getFullYear()%100,et,2)}function he(Je,et){return o(Je.getFullYear()%1e4,et,4)}function xe(Je,et){var Mt=Je.getDay();return Je=Mt>=4||Mt===0?b.timeThursday(Je):b.timeThursday.ceil(Je),o(Je.getFullYear()%1e4,et,4)}function we(Je){var et=Je.getTimezoneOffset();return(et>0?"-":(et*=-1,"+"))+o(et/60|0,"0",2)+o(et%60,"0",2)}function Me(Je,et){return o(Je.getUTCDate(),et,2)}function Se(Je,et){return o(Je.getUTCHours(),et,2)}function Ie(Je,et){return o(Je.getUTCHours()%12||12,et,2)}function Ge(Je,et){return o(1+b.utcDay.count(b.utcYear(Je),Je),et,3)}function qe(Je,et){return o(Je.getUTCMilliseconds(),et,3)}function ke(Je,et){return qe(Je,et)+"000"}function _e(Je,et){return o(Je.getUTCMonth()+1,et,2)}function ue(Je,et){return o(Je.getUTCMinutes(),et,2)}function ve(Je,et){return o(Je.getUTCSeconds(),et,2)}function le(Je){var et=Je.getUTCDay();return et===0?7:et}function Ae(Je,et){return o(b.utcSunday.count(b.utcYear(Je)-1,Je),et,2)}function Be(Je){var et=Je.getUTCDay();return et>=4||et===0?b.utcThursday(Je):b.utcThursday.ceil(Je)}function Xe(Je,et){return Je=Be(Je),o(b.utcThursday.count(b.utcYear(Je),Je)+(b.utcYear(Je).getUTCDay()===4),et,2)}function Ye(Je){return Je.getUTCDay()}function yt(Je,et){return o(b.utcMonday.count(b.utcYear(Je)-1,Je),et,2)}function gt(Je,et){return o(Je.getUTCFullYear()%100,et,2)}function Tt(Je,et){return Je=Be(Je),o(Je.getUTCFullYear()%100,et,2)}function At(Je,et){return o(Je.getUTCFullYear()%1e4,et,4)}function $t(Je,et){var Mt=Je.getUTCDay();return Je=Mt>=4||Mt===0?b.utcThursday(Je):b.utcThursday.ceil(Je),o(Je.getUTCFullYear()%1e4,et,4)}function rr(){return"+0000"}function _r(){return"%"}function Xt(Je){return+Je}function or(Je){return Math.floor(+Je/1e3)}var Ot;vt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function vt(Je){return Ot=e(Je),p.timeFormat=Ot.format,p.timeParse=Ot.parse,p.utcFormat=Ot.utcFormat,p.utcParse=Ot.utcParse,Ot}var ht="%Y-%m-%dT%H:%M:%S.%LZ";function De(Je){return Je.toISOString()}var Ne=Date.prototype.toISOString?De:p.utcFormat(ht);function We(Je){var et=new Date(Je);return isNaN(et)?null:et}var Ke=+new Date("2000-01-01T00:00:00.000Z")?We:p.utcParse(ht);p.isoFormat=Ne,p.isoParse=Ke,p.timeFormatDefaultLocale=vt,p.timeFormatLocale=e,Object.defineProperty(p,"__esModule",{value:!0})})}}),Cw=ze({"node_modules/d3-format/dist/d3-format.js"(J,G){(function(p,b){typeof J=="object"&&typeof G<"u"?b(J):(p=typeof globalThis<"u"?globalThis:p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(w){return Math.abs(w=Math.round(w))>=1e21?w.toLocaleString("en").replace(/,/g,""):w.toString(10)}function E(w,h){if((u=(w=h?w.toExponential(h-1):w.toExponential()).indexOf("e"))<0)return null;var u,A=w.slice(0,u);return[A.length>1?A[0]+A.slice(2):A,+w.slice(u+1)]}function k(w){return w=E(Math.abs(w)),w?w[1]:NaN}function l(w,h){return function(u,A){for(var x=u.length,z=[],I=0,O=w[0],D=0;x>0&&O>0&&(D+O+1>A&&(O=Math.max(1,A-D)),z.push(u.substring(x-=O,x+O)),!((D+=O+1)>A));)O=w[I=(I+1)%w.length];return z.reverse().join(h)}}function e(w){return function(h){return h.replace(/[0-9]/g,function(u){return w[+u]})}}var t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function n(w){if(!(h=t.exec(w)))throw new Error("invalid format: "+w);var h;return new r({fill:h[1],align:h[2],sign:h[3],symbol:h[4],zero:h[5],width:h[6],comma:h[7],precision:h[8]&&h[8].slice(1),trim:h[9],type:h[10]})}n.prototype=r.prototype;function r(w){this.fill=w.fill===void 0?" ":w.fill+"",this.align=w.align===void 0?">":w.align+"",this.sign=w.sign===void 0?"-":w.sign+"",this.symbol=w.symbol===void 0?"":w.symbol+"",this.zero=!!w.zero,this.width=w.width===void 0?void 0:+w.width,this.comma=!!w.comma,this.precision=w.precision===void 0?void 0:+w.precision,this.trim=!!w.trim,this.type=w.type===void 0?"":w.type+""}r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function a(w){e:for(var h=w.length,u=1,A=-1,x;u0&&(A=0);break}return A>0?w.slice(0,A)+w.slice(x+1):w}var o;function s(w,h){var u=E(w,h);if(!u)return w+"";var A=u[0],x=u[1],z=x-(o=Math.max(-8,Math.min(8,Math.floor(x/3)))*3)+1,I=A.length;return z===I?A:z>I?A+new Array(z-I+1).join("0"):z>0?A.slice(0,z)+"."+A.slice(z):"0."+new Array(1-z).join("0")+E(w,Math.max(0,h+z-1))[0]}function c(w,h){var u=E(w,h);if(!u)return w+"";var A=u[0],x=u[1];return x<0?"0."+new Array(-x).join("0")+A:A.length>x+1?A.slice(0,x+1)+"."+A.slice(x+1):A+new Array(x-A.length+2).join("0")}var g={"%":function(w,h){return(w*100).toFixed(h)},b:function(w){return Math.round(w).toString(2)},c:function(w){return w+""},d:b,e:function(w,h){return w.toExponential(h)},f:function(w,h){return w.toFixed(h)},g:function(w,h){return w.toPrecision(h)},o:function(w){return Math.round(w).toString(8)},p:function(w,h){return c(w*100,h)},r:c,s,X:function(w){return Math.round(w).toString(16).toUpperCase()},x:function(w){return Math.round(w).toString(16)}};function f(w){return w}var v=Array.prototype.map,m=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function i(w){var h=w.grouping===void 0||w.thousands===void 0?f:l(v.call(w.grouping,Number),w.thousands+""),u=w.currency===void 0?"":w.currency[0]+"",A=w.currency===void 0?"":w.currency[1]+"",x=w.decimal===void 0?".":w.decimal+"",z=w.numerals===void 0?f:e(v.call(w.numerals,String)),I=w.percent===void 0?"%":w.percent+"",O=w.minus===void 0?"-":w.minus+"",D=w.nan===void 0?"NaN":w.nan+"";function B(P){P=n(P);var j=P.fill,U=P.align,$=P.sign,Q=P.symbol,re=P.zero,ne=P.width,se=P.comma,V=P.precision,Z=P.trim,K=P.type;K==="n"?(se=!0,K="g"):g[K]||(V===void 0&&(V=12),Z=!0,K="g"),(re||j==="0"&&U==="=")&&(re=!0,j="0",U="=");var H=Q==="$"?u:Q==="#"&&/[boxX]/.test(K)?"0"+K.toLowerCase():"",X=Q==="$"?A:/[%p]/.test(K)?I:"",q=g[K],W=/[defgprs%]/.test(K);V=V===void 0?6:/[gprs]/.test(K)?Math.max(1,Math.min(21,V)):Math.max(0,Math.min(20,V));function ee(ae){var he=H,xe=X,we,Me,Se;if(K==="c")xe=q(ae)+xe,ae="";else{ae=+ae;var Ie=ae<0||1/ae<0;if(ae=isNaN(ae)?D:q(Math.abs(ae),V),Z&&(ae=a(ae)),Ie&&+ae==0&&$!=="+"&&(Ie=!1),he=(Ie?$==="("?$:O:$==="-"||$==="("?"":$)+he,xe=(K==="s"?m[8+o/3]:"")+xe+(Ie&&$==="("?")":""),W){for(we=-1,Me=ae.length;++weSe||Se>57){xe=(Se===46?x+ae.slice(we+1):ae.slice(we))+xe,ae=ae.slice(0,we);break}}}se&&!re&&(ae=h(ae,1/0));var Ge=he.length+ae.length+xe.length,qe=Ge>1)+he+ae+xe+qe.slice(Ge);break;default:ae=qe+he+ae+xe;break}return z(ae)}return ee.toString=function(){return P+""},ee}function F(P,j){var U=B((P=n(P),P.type="f",P)),$=Math.max(-8,Math.min(8,Math.floor(k(j)/3)))*3,Q=Math.pow(10,-$),re=m[8+$/3];return function(ne){return U(Q*ne)+re}}return{format:B,formatPrefix:F}}var T;S({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function S(w){return T=i(w),p.format=T.format,p.formatPrefix=T.formatPrefix,T}function M(w){return Math.max(0,-k(Math.abs(w)))}function C(w,h){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(k(h)/3)))*3-k(Math.abs(w)))}function _(w,h){return w=Math.abs(w),h=Math.abs(h)-w,Math.max(0,k(h)-k(w))+1}p.FormatSpecifier=r,p.formatDefaultLocale=S,p.formatLocale=i,p.formatSpecifier=n,p.precisionFixed=M,p.precisionPrefix=C,p.precisionRound=_,Object.defineProperty(p,"__esModule",{value:!0})})}}),FR=ze({"node_modules/is-string-blank/index.js"(J,G){"use strict";G.exports=function(p){for(var b=p.length,E,k=0;k13)&&E!==32&&E!==133&&E!==160&&E!==5760&&E!==6158&&(E<8192||E>8205)&&E!==8232&&E!==8233&&E!==8239&&E!==8287&&E!==8288&&E!==12288&&E!==65279)return!1;return!0}}}),ao=ze({"node_modules/fast-isnumeric/index.js"(J,G){"use strict";var p=FR();G.exports=function(b){var E=typeof b;if(E==="string"){var k=b;if(b=+b,b===0&&p(k))return!1}else if(E!=="number")return!1;return b-b<1}}}),No=ze({"src/constants/numerical.js"(J,G){"use strict";G.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}}}),Lw=ze({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(J,G){(function(p,b){typeof J=="object"&&typeof G<"u"?b(J):(p=typeof globalThis<"u"?globalThis:p||self,b(p["base64-arraybuffer"]={}))})(J,function(p){"use strict";for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=typeof Uint8Array>"u"?[]:new Uint8Array(256),k=0;k>2],o+=b[(n[r]&3)<<4|n[r+1]>>4],o+=b[(n[r+1]&15)<<2|n[r+2]>>6],o+=b[n[r+2]&63];return a%3===2?o=o.substring(0,o.length-1)+"=":a%3===1&&(o=o.substring(0,o.length-2)+"=="),o},e=function(t){var n=t.length*.75,r=t.length,a,o=0,s,c,g,f;t[t.length-1]==="="&&(n--,t[t.length-2]==="="&&n--);var v=new ArrayBuffer(n),m=new Uint8Array(v);for(a=0;a>4,m[o++]=(c&15)<<4|g>>2,m[o++]=(g&3)<<6|f&63;return v};p.decode=e,p.encode=l,Object.defineProperty(p,"__esModule",{value:!0})})}}),tv=ze({"src/lib/is_plain_object.js"(J,G){"use strict";G.exports=function(b){return window&&window.process&&window.process.versions?Object.prototype.toString.call(b)==="[object Object]":Object.prototype.toString.call(b)==="[object Object]"&&Object.getPrototypeOf(b).hasOwnProperty("hasOwnProperty")}}}),Ff=ze({"src/lib/array.js"(J){"use strict";var G=Lw().decode,p=tv(),b=Array.isArray,E=ArrayBuffer,k=DataView;function l(s){return E.isView(s)&&!(s instanceof k)}J.isTypedArray=l;function e(s){return b(s)||l(s)}J.isArrayOrTypedArray=e;function t(s){return!e(s[0])}J.isArray1D=t,J.ensureArray=function(s,c){return b(s)||(s=[]),s.length=c,s};var n={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};n.uint8c=n.u1c,n.uint8=n.u1,n.int8=n.i1,n.uint16=n.u2,n.int16=n.i2,n.uint32=n.u4,n.int32=n.i4,n.float32=n.f4,n.float64=n.f8;function r(s){return s.constructor===ArrayBuffer}J.isArrayBuffer=r,J.decodeTypedArraySpec=function(s){var c=[],g=a(s),f=g.dtype,v=n[f];if(!v)throw new Error('Error in dtype: "'+f+'"');var m=v.BYTES_PER_ELEMENT,i=g.bdata;r(i)||(i=G(i));var T=g.shape===void 0?[i.byteLength/m]:(""+g.shape).split(",");T.reverse();var S=T.length,M,C,_=+T[0],w=m*_,h=0;if(S===1)c=new v(i);else if(S===2)for(M=+T[1],C=0;C2)return v[M]=v[M]|l,T.set(S,null);if(i){for(c=M;c0)return Math.log(E)/Math.LN10;var l=Math.log(Math.min(k[0],k[1]))/Math.LN10;return p(l)||(l=Math.log(Math.max(k[0],k[1]))/Math.LN10-6),l}}}),OR=ze({"src/lib/relink_private.js"(J,G){"use strict";var p=Ff().isArrayOrTypedArray,b=tv();G.exports=function E(k,l){for(var e in l){var t=l[e],n=k[e];if(n!==t)if(e.charAt(0)==="_"||typeof t=="function"){if(e in k)continue;k[e]=t}else if(p(t)&&p(n)&&b(t[0])){if(e==="customdata"||e==="ids")continue;for(var r=Math.min(t.length,n.length),a=0;aNR,modHalf:()=>jR});function NR(J,G){let p=J%G;return p<0?p+G:p}function jR(J,G){return Math.abs(J)>G/2?J-Math.round(J/G)*G:J}var Um=zi({"src/lib/mod.ts"(){"use strict"}}),Ki=ze({"src/lib/extend.js"(J){"use strict";var G=tv(),p=Array.isArray;function b(k,l){var e,t;for(e=0;e{for(var Qe in Ue)p(Le,Qe,{get:Ue[Qe],enumerable:!0})},e=(Le,Ue,Qe,_t)=>{if(Ue&&typeof Ue=="object"||typeof Ue=="function")for(let wt of E(Ue))!k.call(Le,wt)&&wt!==Qe&&p(Le,wt,{get:()=>Ue[wt],enumerable:!(_t=b(Ue,wt))||_t.enumerable});return Le},t=Le=>e(p({},"__esModule",{value:!0}),Le),n={};l(n,{a98:()=>So,average:()=>Tr,averageAngle:()=>rt,averageNumber:()=>fr,blend:()=>ll,blerp:()=>Ye,clampChroma:()=>dr,clampGamut:()=>ir,clampRgb:()=>Ut,colorsNamed:()=>s,convertA98ToXyz65:()=>Ot,convertCubehelixToRgb:()=>Nn,convertDlchToLab65:()=>oo,convertHsiToRgb:()=>ds,convertHslToRgb:()=>wo,convertHsvToRgb:()=>Ts,convertHwbToRgb:()=>yo,convertItpToXyz65:()=>ms,convertJabToJch:()=>Nu,convertJabToRgb:()=>Hc,convertJabToXyz65:()=>Gc,convertJchToJab:()=>al,convertLab65ToDlch:()=>qn,convertLab65ToRgb:()=>rn,convertLab65ToXyz65:()=>tn,convertLabToLch:()=>kt,convertLabToRgb:()=>vl,convertLabToXyz50:()=>tc,convertLchToLab:()=>ar,convertLchuvToLuv:()=>qu,convertLrgbToOklab:()=>tr,convertLrgbToRgb:()=>Pt,convertLuvToLchuv:()=>hu,convertLuvToXyz50:()=>Gf,convertOkhslToOklab:()=>_i,convertOkhsvToOklab:()=>Ln,convertOklabToLrgb:()=>ba,convertOklabToOkhsl:()=>yi,convertOklabToOkhsv:()=>En,convertOklabToRgb:()=>Na,convertP3ToXyz65:()=>zo,convertProphotoToXyz50:()=>mc,convertRec2020ToXyz65:()=>Wu,convertRgbToCubehelix:()=>Xa,convertRgbToHsi:()=>jo,convertRgbToHsl:()=>pi,convertRgbToHsv:()=>Bo,convertRgbToHwb:()=>bs,convertRgbToJab:()=>$l,convertRgbToLab:()=>mf,convertRgbToLab65:()=>fn,convertRgbToLrgb:()=>Ke,convertRgbToOklab:()=>wr,convertRgbToXyb:()=>eu,convertRgbToXyz50:()=>rc,convertRgbToXyz65:()=>et,convertRgbToYiq:()=>Ba,convertXybToRgb:()=>mt,convertXyz50ToLab:()=>ac,convertXyz50ToLuv:()=>Vu,convertXyz50ToProphoto:()=>xl,convertXyz50ToRgb:()=>Tu,convertXyz50ToXyz65:()=>jr,convertXyz65ToA98:()=>De,convertXyz65ToItp:()=>zu,convertXyz65ToJab:()=>wc,convertXyz65ToLab65:()=>no,convertXyz65ToP3:()=>js,convertXyz65ToRec2020:()=>bf,convertXyz65ToRgb:()=>qt,convertXyz65ToXyz50:()=>Br,convertYiqToRgb:()=>wn,converter:()=>P,cubehelix:()=>Ws,differenceCie76:()=>on,differenceCie94:()=>en,differenceCiede2000:()=>vi,differenceCmc:()=>Yi,differenceEuclidean:()=>Yn,differenceHueChroma:()=>li,differenceHueNaive:()=>Un,differenceHueSaturation:()=>yn,differenceHyab:()=>Ja,differenceItp:()=>lt,differenceKotsarenkoRamos:()=>Oa,displayable:()=>st,dlab:()=>Zo,dlch:()=>es,easingGamma:()=>je,easingInOutSine:()=>Mo,easingMidpoint:()=>Hr,easingSmootherstep:()=>Wi,easingSmoothstep:()=>so,easingSmoothstepInverse:()=>ti,filterBrightness:()=>ma,filterContrast:()=>da,filterDeficiencyDeuter:()=>Jn,filterDeficiencyProt:()=>In,filterDeficiencyTrit:()=>Ei,filterGrayscale:()=>kn,filterHueRotate:()=>ui,filterInvert:()=>Dn,filterSaturate:()=>za,filterSepia:()=>Fa,fixupAlpha:()=>$t,fixupHueDecreasing:()=>cr,fixupHueIncreasing:()=>ur,fixupHueLonger:()=>nr,fixupHueShorter:()=>Rt,formatCss:()=>wi,formatHex:()=>sl,formatHex8:()=>sc,formatHsl:()=>Ps,formatRgb:()=>tu,getMode:()=>se,hsi:()=>$o,hsl:()=>_s,hsv:()=>Go,hwb:()=>Ys,inGamut:()=>It,interpolate:()=>oa,interpolateWith:()=>fa,interpolateWithPremultipliedAlpha:()=>Ea,interpolatorLinear:()=>At,interpolatorPiecewise:()=>Tt,interpolatorSplineBasis:()=>hn,interpolatorSplineBasisClosed:()=>Tn,interpolatorSplineMonotone:()=>ie,interpolatorSplineMonotone2:()=>fe,interpolatorSplineMonotoneClosed:()=>be,interpolatorSplineNatural:()=>$n,interpolatorSplineNaturalClosed:()=>xi,itp:()=>Ll,jab:()=>mo,jch:()=>ru,lab:()=>Rs,lab65:()=>Yu,lch:()=>Ul,lch65:()=>ql,lchuv:()=>fo,lerp:()=>Be,lrgb:()=>Xo,luv:()=>Os,mapAlphaDivide:()=>ct,mapAlphaMultiply:()=>at,mapTransferGamma:()=>St,mapTransferLinear:()=>Nt,mapper:()=>tt,modeA98:()=>Ht,modeCubehelix:()=>Dr,modeDlab:()=>go,modeDlch:()=>Ao,modeHsi:()=>to,modeHsl:()=>Vs,modeHsv:()=>Pi,modeHwb:()=>dl,modeItp:()=>bc,modeJab:()=>Qu,modeJch:()=>ju,modeLab:()=>Sl,modeLab65:()=>oh,modeLch:()=>nl,modeLch65:()=>Kc,modeLchuv:()=>kl,modeLrgb:()=>Cc,modeLuv:()=>vc,modeOkhsl:()=>ri,modeOkhsv:()=>$i,modeOklab:()=>Yo,modeOklch:()=>ns,modeP3:()=>zl,modeProphoto:()=>oc,modeRec2020:()=>Qc,modeRgb:()=>_r,modeXyb:()=>Bt,modeXyz50:()=>Wt,modeXyz65:()=>la,modeYiq:()=>Si,nearest:()=>vr,okhsl:()=>ra,okhsv:()=>Ya,oklab:()=>Ka,oklch:()=>Bi,p3:()=>rs,parse:()=>_e,parseHex:()=>m,parseHsl:()=>Ss,parseHslLegacy:()=>Uo,parseHwb:()=>hl,parseLab:()=>ih,parseLch:()=>$c,parseNamed:()=>g,parseOklab:()=>Do,parseOklch:()=>Gs,parseRgb:()=>ve,parseRgbLegacy:()=>O,parseTransparent:()=>Ae,prophoto:()=>Is,random:()=>Ve,rec2020:()=>Oi,removeParser:()=>Z,rgb:()=>Wr,round:()=>Qi,samples:()=>ut,serializeHex:()=>jl,serializeHex8:()=>Hs,serializeHsl:()=>hi,serializeRgb:()=>Cu,toGamut:()=>Ar,trilerp:()=>yt,unlerp:()=>Xe,useMode:()=>ne,useParser:()=>V,wcagContrast:()=>Bs,wcagLuminance:()=>zs,xyb:()=>na,xyz50:()=>pa,xyz65:()=>Wa,yiq:()=>ln}),G.exports=t(n);var r=(Le,Ue)=>{if(typeof Le=="number"){if(Ue===3)return{mode:"rgb",r:(Le>>8&15|Le>>4&240)/255,g:(Le>>4&15|Le&240)/255,b:(Le&15|Le<<4&240)/255};if(Ue===4)return{mode:"rgb",r:(Le>>12&15|Le>>8&240)/255,g:(Le>>8&15|Le>>4&240)/255,b:(Le>>4&15|Le&240)/255,alpha:(Le&15|Le<<4&240)/255};if(Ue===6)return{mode:"rgb",r:(Le>>16&255)/255,g:(Le>>8&255)/255,b:(Le&255)/255};if(Ue===8)return{mode:"rgb",r:(Le>>24&255)/255,g:(Le>>16&255)/255,b:(Le>>8&255)/255,alpha:(Le&255)/255}}},a=r,o={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},s=o,c=Le=>a(s[Le.toLowerCase()],6),g=c,f=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,v=Le=>{let Ue;return(Ue=Le.match(f))?a(parseInt(Ue[1],16),Ue[1].length):void 0},m=v,i="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",T=`(?:${i}|none)`,S=`${i}%`,M=`(?:${i}%|none)`,C=`(?:${i}%|${i})`,_=`(?:${i}%|${i}|none)`,w=`(?:${i}(deg|grad|rad|turn)|${i})`,h=`(?:${i}(deg|grad|rad|turn)|${i}|none)`,u="\\s*,\\s*",A=new RegExp("^"+_+"$"),x=new RegExp(`^rgba?\\(\\s*${i}${u}${i}${u}${i}\\s*(?:,\\s*${C}\\s*)?\\)$`),z=new RegExp(`^rgba?\\(\\s*${S}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),I=Le=>{let Ue={mode:"rgb"},Qe;if(Qe=Le.match(x))Qe[1]!==void 0&&(Ue.r=Qe[1]/255),Qe[2]!==void 0&&(Ue.g=Qe[2]/255),Qe[3]!==void 0&&(Ue.b=Qe[3]/255);else if(Qe=Le.match(z))Qe[1]!==void 0&&(Ue.r=Qe[1]/100),Qe[2]!==void 0&&(Ue.g=Qe[2]/100),Qe[3]!==void 0&&(Ue.b=Qe[3]/100);else return;return Qe[4]!==void 0?Ue.alpha=Math.max(0,Math.min(1,Qe[4]/100)):Qe[5]!==void 0&&(Ue.alpha=Math.max(0,Math.min(1,+Qe[5]))),Ue},O=I,D=(Le,Ue)=>Le===void 0?void 0:typeof Le!="object"?_e(Le):Le.mode!==void 0?Le:Ue?lo(Li({},Le),{mode:Ue}):void 0,B=D,F=(Le="rgb")=>Ue=>(Ue=B(Ue,Le))!==void 0?Ue.mode===Le?Ue:j[Ue.mode][Le]?j[Ue.mode][Le](Ue):Le==="rgb"?j[Ue.mode].rgb(Ue):j.rgb[Le](j[Ue.mode].rgb(Ue)):void 0,P=F,j={},U={},$=[],Q={},re=Le=>Le,ne=Le=>(j[Le.mode]=Li(Li({},j[Le.mode]),Le.toMode),Object.keys(Le.fromMode||{}).forEach(Ue=>{j[Ue]||(j[Ue]={}),j[Ue][Le.mode]=Le.fromMode[Ue]}),Le.ranges||(Le.ranges={}),Le.difference||(Le.difference={}),Le.channels.forEach(Ue=>{if(Le.ranges[Ue]===void 0&&(Le.ranges[Ue]=[0,1]),!Le.interpolate[Ue])throw new Error(`Missing interpolator for: ${Ue}`);typeof Le.interpolate[Ue]=="function"&&(Le.interpolate[Ue]={use:Le.interpolate[Ue]}),Le.interpolate[Ue].fixup||(Le.interpolate[Ue].fixup=re)}),U[Le.mode]=Le,(Le.parse||[]).forEach(Ue=>{V(Ue,Le.mode)}),P(Le.mode)),se=Le=>U[Le],V=(Le,Ue)=>{if(typeof Le=="string"){if(!Ue)throw new Error("'mode' required when 'parser' is a string");Q[Le]=Ue}else typeof Le=="function"&&$.indexOf(Le)<0&&$.push(Le)},Z=Le=>{if(typeof Le=="string")delete Q[Le];else if(typeof Le=="function"){let Ue=$.indexOf(Le);Ue>0&&$.splice(Ue,1)}},K=/[^\x00-\x7F]|[a-zA-Z_]/,H=/[^\x00-\x7F]|[-\w]/,X={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},q=0;function W(Le){let Ue=Le[q],Qe=Le[q+1];return Ue==="-"||Ue==="+"?/\d/.test(Qe)||Qe==="."&&/\d/.test(Le[q+2]):Ue==="."?/\d/.test(Qe):/\d/.test(Ue)}function ee(Le){if(q>=Le.length)return!1;let Ue=Le[q];if(K.test(Ue))return!0;if(Ue==="-"){if(Le.length-q<2)return!1;let Qe=Le[q+1];return!!(Qe==="-"||K.test(Qe))}return!1}var ae={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function he(Le){let Ue="";if((Le[q]==="-"||Le[q]==="+")&&(Ue+=Le[q++]),Ue+=xe(Le),Le[q]==="."&&/\d/.test(Le[q+1])&&(Ue+=Le[q++]+xe(Le)),(Le[q]==="e"||Le[q]==="E")&&((Le[q+1]==="-"||Le[q+1]==="+")&&/\d/.test(Le[q+2])?Ue+=Le[q++]+Le[q++]+xe(Le):/\d/.test(Le[q+1])&&(Ue+=Le[q++]+xe(Le))),ee(Le)){let Qe=we(Le);return Qe==="deg"||Qe==="rad"||Qe==="turn"||Qe==="grad"?{type:X.Hue,value:Ue*ae[Qe]}:void 0}return Le[q]==="%"?(q++,{type:X.Percentage,value:+Ue}):{type:X.Number,value:+Ue}}function xe(Le){let Ue="";for(;/\d/.test(Le[q]);)Ue+=Le[q++];return Ue}function we(Le){let Ue="";for(;q4)){if(Qe.length===4){if(Qe[3].type!==Y.Alpha)return;Qe[3]=Qe[3].value}return Qe.length===3&&Qe.push({type:Y.None,value:void 0}),Qe.every(wt=>wt.type!==Y.Alpha)?Qe:void 0}}function Ge(Le,Ue){Le._i=0;let Qe=Le[Le._i++];if(!Qe||Qe.type!==Y.Function)return;let _t=Ve(Le,Ue);if(_t)return _t.unshift(Qe.value),_t}var ke=Le=>{if(typeof Le!="string")return;let Ue=Se(Le),Qe=Ue?Ge(Ue,!0):void 0,_t,wt=0,Lt=$.length;for(;wtLe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Ae=le,Be=(Le,Ue,Qe)=>Le+Qe*(Ue-Le),Xe=(Le,Ue,Qe)=>(Qe-Le)/(Ue-Le),Ye=(Le,Ue,Qe,_t,wt,Lt)=>Be(Be(Le,Ue,wt),Be(Qe,_t,wt),Lt),yt=(Le,Ue,Qe,_t,wt,Lt,pr,Gr,va,Qa,Ga)=>Be(Ye(Le,Ue,Qe,_t,va,Qa),Ye(wt,Lt,pr,Gr,va,Qa),Ga),gt=Le=>{let Ue=[];for(let Qe=0;QeUe=>{let Qe=gt(Ue);return _t=>{let wt=_t*Qe.length,Lt=_t>=1?Qe.length-1:Math.max(Math.floor(wt),0),pr=Qe[Lt];return pr===void 0?void 0:Le(pr[0],pr[1],wt-Lt)}},At=Tt(Be),$t=Le=>{let Ue=!1,Qe=Le.map(_t=>_t!==void 0?(Ue=!0,_t):1);return Ue?Qe:Le},rr={mode:"rgb",channels:["r","g","b","alpha"],parse:[ve,g,O,m,Ae,"srgb"],serialize:"srgb",interpolate:{r:At,g:At,b:At,alpha:{use:At,fixup:$t}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},_r=rr,Xt=(Le=0)=>Math.pow(Math.abs(Le),563/256)*Math.sign(Le),or=Le=>{let Ue=Xt(Le.r),Qe=Xt(Le.g),_t=Xt(Le.b),wt={mode:"xyz65",x:.5766690429101305*Ue+.1855582379065463*Qe+.1882286462349947*_t,y:.297344975250536*Ue+.6273635662554661*Qe+.0752914584939979*_t,z:.0270313613864123*Ue+.0706888525358272*Qe+.9913375368376386*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Ot=or,vt=Le=>Math.pow(Math.abs(Le),256/563)*Math.sign(Le),ht=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"a98",r:vt(Le*2.0415879038107465-Ue*.5650069742788597-.3447313507783297*Qe),g:vt(Le*-.9692436362808798+Ue*1.8759675015077206+.0415550574071756*Qe),b:vt(Le*.0134442806320312-Ue*.1183623922310184+1.0151749943912058*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},De=ht,Ne=(Le=0)=>{let Ue=Math.abs(Le);return Ue<=.04045?Le/12.92:(Math.sign(Le)||1)*Math.pow((Ue+.055)/1.055,2.4)},We=({r:Le,g:Ue,b:Qe,alpha:_t})=>{let wt={mode:"lrgb",r:Ne(Le),g:Ne(Ue),b:Ne(Qe)};return _t!==void 0&&(wt.alpha=_t),wt},Ke=We,Je=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz65",x:.4123907992659593*Ue+.357584339383878*Qe+.1804807884018343*_t,y:.2126390058715102*Ue+.715168678767756*Qe+.0721923153607337*_t,z:.0193308187155918*Ue+.119194779794626*Qe+.9505321522496607*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},et=Je,Mt=(Le=0)=>{let Ue=Math.abs(Le);return Ue>.0031308?(Math.sign(Le)||1)*(1.055*Math.pow(Ue,1/2.4)-.055):Le*12.92},pt=({r:Le,g:Ue,b:Qe,alpha:_t},wt="rgb")=>{let Lt={mode:wt,r:Mt(Le),g:Mt(Ue),b:Mt(Qe)};return _t!==void 0&&(Lt.alpha=_t),Lt},Pt=pt,Ct=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*3.2409699419045226-Ue*1.537383177570094-.4986107602930034*Qe,g:Le*-.9692436362808796+Ue*1.8759675015077204+.0415550574071756*Qe,b:Le*.0556300796969936-Ue*.2039769588889765+1.0569715142428784*Qe});return _t!==void 0&&(wt.alpha=_t),wt},qt=Ct,Vt=lo(Li({},_r),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:Le=>De(et(Le)),xyz65:De},toMode:{rgb:Le=>qt(Ot(Le)),xyz65:Ot}}),Ht=Vt,Sr=Le=>(Le=Le%360)<0?Le+360:Le,Kr=Sr,Yt=(Le,Ue)=>Le.map((Qe,_t,wt)=>{if(Qe===void 0)return Qe;let Lt=Kr(Qe);return _t===0||Le[_t-1]===void 0?Lt:Ue(Lt-Kr(wt[_t-1]))}).reduce((Qe,_t)=>!Qe.length||_t===void 0||Qe[Qe.length-1]===void 0?(Qe.push(_t),Qe):(Qe.push(_t+Qe[Qe.length-1]),Qe),[]),Rt=Le=>Yt(Le,Ue=>Math.abs(Ue)<=180?Ue:Ue-360*Math.sign(Ue)),nr=Le=>Yt(Le,Ue=>Math.abs(Ue)>=180||Ue===0?Ue:Ue-360*Math.sign(Ue)),ur=Le=>Yt(Le,Ue=>Ue>=0?Ue:Ue+360),cr=Le=>Yt(Le,Ue=>Ue<=0?Ue:Ue-360),Rr=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Qr=Math.PI/180,Zr=180/Math.PI,ha=Rr[3]*Rr[4],Pa=Rr[1]*Rr[4],La=Rr[1]*Rr[2]-Rr[0]*Rr[3],un=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(La*Qe+Le*ha-Ue*Pa)/(La+ha-Pa),Lt=Qe-wt,pr=(Rr[4]*(Ue-wt)-Rr[2]*Lt)/Rr[3],Gr={mode:"cubehelix",l:wt,s:wt===0||wt===1?void 0:Math.sqrt(Lt*Lt+pr*pr)/(Rr[4]*wt*(1-wt))};return Gr.s&&(Gr.h=Math.atan2(pr,Lt)*Zr-120),_t!==void 0&&(Gr.alpha=_t),Gr},Xa=un,ja=({h:Le,s:Ue,l:Qe,alpha:_t})=>{let wt={mode:"rgb"};Le=(Le===void 0?0:Le+120)*Qr,Qe===void 0&&(Qe=0);let Lt=Ue===void 0?0:Ue*Qe*(1-Qe),pr=Math.cos(Le),Gr=Math.sin(Le);return wt.r=Qe+Lt*(Rr[0]*pr+Rr[1]*Gr),wt.g=Qe+Lt*(Rr[2]*pr+Rr[3]*Gr),wt.b=Qe+Lt*(Rr[4]*pr+Rr[5]*Gr),_t!==void 0&&(wt.alpha=_t),wt},Nn=ja,yn=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0||!Le.s||!Ue.s)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h),wt=Math.sin((_t-Qe+360)/2*Math.PI/180);return 2*Math.sqrt(Le.s*Ue.s)*wt},Un=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h);return Math.abs(_t-Qe)>180?Qe-(_t-360*Math.sign(_t-Qe)):_t-Qe},li=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0||!Le.c||!Ue.c)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h),wt=Math.sin((_t-Qe+360)/2*Math.PI/180);return 2*Math.sqrt(Le.c*Ue.c)*wt},Yn=(Le="rgb",Ue=[1,1,1,0])=>{let Qe=se(Le),_t=Qe.channels,wt=Qe.difference,Lt=P(Le);return(pr,Gr)=>{let va=Lt(pr),Qa=Lt(Gr);return Math.sqrt(_t.reduce((Ga,Ua,An)=>{let dn=wt[Ua]?wt[Ua](va,Qa):va[Ua]-Qa[Ua];return Ga+(Ue[An]||0)*Math.pow(isNaN(dn)?0:dn,2)},0))}},on=()=>Yn("lab65"),en=(Le=1,Ue=.045,Qe=.015)=>{let _t=P("lab65");return(wt,Lt)=>{let pr=_t(wt),Gr=_t(Lt),va=pr.l,Qa=pr.a,Ga=pr.b,Ua=Math.sqrt(Qa*Qa+Ga*Ga),An=Gr.l,dn=Gr.a,_n=Gr.b,Mn=Math.sqrt(dn*dn+_n*_n),Bn=Math.pow(va-An,2),Zn=Math.pow(Ua-Mn,2),Ci=Math.pow(Qa-dn,2)+Math.pow(Ga-_n,2)-Zn;return Math.sqrt(Bn/Math.pow(Le,2)+Zn/Math.pow(1+Ue*Ua,2)+Ci/Math.pow(1+Qe*Ua,2))}},vi=(Le=1,Ue=1,Qe=1)=>{let _t=P("lab65");return(wt,Lt)=>{let pr=_t(wt),Gr=_t(Lt),va=pr.l,Qa=pr.a,Ga=pr.b,Ua=Math.sqrt(Qa*Qa+Ga*Ga),An=Gr.l,dn=Gr.a,_n=Gr.b,Mn=Math.sqrt(dn*dn+_n*_n),Bn=(Ua+Mn)/2,Zn=.5*(1-Math.sqrt(Math.pow(Bn,7)/(Math.pow(Bn,7)+Math.pow(25,7)))),Ci=Qa*(1+Zn),qo=dn*(1+Zn),As=Math.sqrt(Ci*Ci+Ga*Ga),ls=Math.sqrt(qo*qo+_n*_n),Vl=Math.abs(Ci)+Math.abs(Ga)===0?0:Math.atan2(Ga,Ci);Vl+=(Vl<0)*2*Math.PI;let au=Math.abs(qo)+Math.abs(_n)===0?0:Math.atan2(_n,qo);au+=(au<0)*2*Math.PI;let Lu=An-va,uh=ls-As,wh=As*ls===0?0:au-Vl;wh-=(wh>Math.PI)*2*Math.PI,wh+=(wh<-Math.PI)*2*Math.PI;let Gh=2*Math.sqrt(As*ls)*Math.sin(wh/2),Gd=(va+An)/2,Ad=(As+ls)/2,ch;As*ls===0?ch=Vl+au:(ch=(Vl+au)/2,ch-=(Math.abs(Vl-au)>Math.PI)*Math.PI,ch+=(ch<0)*2*Math.PI);let Mv=Math.pow(Gd-50,2),vp=1-.17*Math.cos(ch-Math.PI/6)+.24*Math.cos(2*ch)+.32*Math.cos(3*ch+Math.PI/30)-.2*Math.cos(4*ch-63*Math.PI/180),mp=1+.015*Mv/Math.sqrt(20+Mv),gp=1+.045*Ad,yp=1+.015*Ad*vp,xg=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*ch-275)/25,2)),p0=2*Math.sqrt(Math.pow(Ad,7)/(Math.pow(Ad,7)+Math.pow(25,7))),Md=-1*Math.sin(2*xg)*p0;return Math.sqrt(Math.pow(Lu/(Le*mp),2)+Math.pow(uh/(Ue*gp),2)+Math.pow(Gh/(Qe*yp),2)+Md*uh/(Ue*gp)*Gh/(Qe*yp))}},Yi=(Le=1,Ue=1)=>{let Qe=P("lab65");return(_t,wt)=>{let Lt=Qe(_t),pr=Lt.l,Gr=Lt.a,va=Lt.b,Qa=Math.sqrt(Gr*Gr+va*va),Ga=Math.atan2(va,Gr);Ga=Ga+2*Math.PI*(Ga<0);let Ua=Qe(wt),An=Ua.l,dn=Ua.a,_n=Ua.b,Mn=Math.sqrt(dn*dn+_n*_n),Bn=Math.pow(pr-An,2),Zn=Math.pow(Qa-Mn,2),Ci=Math.pow(Gr-dn,2)+Math.pow(va-_n,2)-Zn,qo=Math.sqrt(Math.pow(Qa,4)/(Math.pow(Qa,4)+1900)),As=Ga>=164/180*Math.PI&&Ga<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(Ga+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(Ga+35/180*Math.PI)),ls=pr<16?.511:.040975*pr/(1+.01765*pr),Vl=.0638*Qa/(1+.0131*Qa)+.638,au=Vl*(qo*As+1-qo);return Math.sqrt(Bn/Math.pow(Le*ls,2)+Zn/Math.pow(Ue*Vl,2)+Ci/Math.pow(au,2))}},Ja=()=>{let Le=P("lab65");return(Ue,Qe)=>{let _t=Le(Ue),wt=Le(Qe),Lt=_t.l-wt.l,pr=_t.a-wt.a,Gr=_t.b-wt.b;return Math.abs(Lt)+Math.sqrt(pr*pr+Gr*Gr)}},Oa=()=>Yn("yiq",[.5053,.299,.1957]),lt=()=>Yn("itp",[518400,129600,518400]),rt=Le=>{let Ue=Le.reduce((_t,wt)=>{if(wt!==void 0){let Lt=wt*Math.PI/180;_t.sin+=Math.sin(Lt),_t.cos+=Math.cos(Lt)}return _t},{sin:0,cos:0}),Qe=Math.atan2(Ue.sin,Ue.cos)*180/Math.PI;return Qe<0?360+Qe:Qe},fr=Le=>{let Ue=Le.filter(Qe=>Qe!==void 0);return Ue.length?Ue.reduce((Qe,_t)=>Qe+_t,0)/Ue.length:void 0},lr=Le=>typeof Le=="function";function Tr(Le,Ue="rgb",Qe){let _t=se(Ue),wt=Le.map(P(Ue));return _t.channels.reduce((Lt,pr)=>{let Gr=wt.map(va=>va[pr]).filter(va=>va!==void 0);if(Gr.length){let va;lr(Qe)?va=Qe:Qe&&lr(Qe[pr])?va=Qe[pr]:_t.average&&lr(_t.average[pr])?va=_t.average[pr]:va=fr,Lt[pr]=va(Gr,pr)}return Lt},{mode:Ue})}var Ir={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Xa},toMode:{rgb:Nn},interpolate:{h:{use:At,fixup:Rt},s:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:yn},average:{h:rt}},Dr=Ir,ot=({l:Le,a:Ue,b:Qe,alpha:_t},wt="lch")=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let Lt=Math.sqrt(Ue*Ue+Qe*Qe),pr={mode:wt,l:Le,c:Lt};return Lt&&(pr.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(pr.alpha=_t),pr},kt=ot,jt=({l:Le,c:Ue,h:Qe,alpha:_t},wt="lab")=>{Qe===void 0&&(Qe=0);let Lt={mode:wt,l:Le,a:Ue?Ue*Math.cos(Qe/180*Math.PI):0,b:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(Lt.alpha=_t),Lt},ar=jt,Er=Math.pow(29,3)/Math.pow(3,3),xr=Math.pow(6,3)/Math.pow(29,3),zr={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Lr={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},aa=Math.pow(29,3)/Math.pow(3,3),Sa=Math.pow(6,3)/Math.pow(29,3),wa=Le=>Math.pow(Le,3)>xr?Math.pow(Le,3):(116*Le-16)/Er,pn=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+16)/116,Lt=Ue/500+wt,pr=wt-Qe/200,Gr={mode:"xyz65",x:wa(Lt)*Lr.X,y:wa(wt)*Lr.Y,z:wa(pr)*Lr.Z};return _t!==void 0&&(Gr.alpha=_t),Gr},tn=pn,ai=Le=>qt(tn(Le)),rn=ai,Ri=Le=>Le>xr?Math.cbrt(Le):(Er*Le+16)/116,Gn=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ri(Le/Lr.X),Lt=Ri(Ue/Lr.Y),pr=Ri(Qe/Lr.Z),Gr={mode:"lab65",l:116*Lt-16,a:500*(wt-Lt),b:200*(Lt-pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},no=Gn,Di=Le=>{let Ue=no(et(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},fn=Di,Ai=1,jn=1,Xn=26/180*Math.PI,eo=Math.cos(Xn),gi=Math.sin(Xn),qi=100/Math.log(139/100),io=({l:Le,c:Ue,h:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"lab65",l:(Math.exp(Le*Ai/qi)-1)/.0039},Lt=(Math.exp(.0435*Ue*jn*Ai)-1)/.075,pr=Lt*Math.cos(Qe/180*Math.PI-Xn),Gr=Lt*Math.sin(Qe/180*Math.PI-Xn);return wt.a=pr*eo-Gr/.83*gi,wt.b=pr*gi+Gr/.83*eo,_t!==void 0&&(wt.alpha=_t),wt},oo=io,Vn=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ue*eo+Qe*gi,Lt=.83*(Qe*eo-Ue*gi),pr=Math.sqrt(wt*wt+Lt*Lt),Gr={mode:"dlch",l:qi/Ai*Math.log(1+.0039*Le),c:Math.log(1+.075*pr)/(.0435*jn*Ai)};return Gr.c&&(Gr.h=Kr((Math.atan2(Lt,wt)+Xn)/Math.PI*180)),_t!==void 0&&(Gr.alpha=_t),Gr},qn=Vn,Hi=Le=>oo(kt(Le,"dlch")),Mi=Le=>ar(qn(Le),"dlab"),Ro={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Hi,rgb:Le=>rn(Hi(Le))},fromMode:{lab65:Mi,rgb:Le=>Mi(fn(Le))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:$t}}},go=Ro,Eo={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:oo,dlab:Le=>ar(Le,"dlab"),rgb:Le=>rn(oo(Le))},fromMode:{lab65:qn,dlab:Le=>kt(Le,"dlch"),rgb:Le=>qn(fn(Le))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:At,c:At,h:{use:At,fixup:Rt},alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},Ao=Eo;function ds({h:Le,s:Ue,i:Qe,alpha:_t}){Le=Kr(Le!==void 0?Le:0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.abs(Le/60%2-1),Lt;switch(Math.floor(Le/60)){case 0:Lt={r:Qe*(1+Ue*(3/(2-wt)-1)),g:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),b:Qe*(1-Ue)};break;case 1:Lt={r:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),g:Qe*(1+Ue*(3/(2-wt)-1)),b:Qe*(1-Ue)};break;case 2:Lt={r:Qe*(1-Ue),g:Qe*(1+Ue*(3/(2-wt)-1)),b:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1))};break;case 3:Lt={r:Qe*(1-Ue),g:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),b:Qe*(1+Ue*(3/(2-wt)-1))};break;case 4:Lt={r:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),g:Qe*(1-Ue),b:Qe*(1+Ue*(3/(2-wt)-1))};break;case 5:Lt={r:Qe*(1+Ue*(3/(2-wt)-1)),g:Qe*(1-Ue),b:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1))};break;default:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue),b:Qe*(1-Ue)}}return Lt.mode="rgb",_t!==void 0&&(Lt.alpha=_t),Lt}function jo({r:Le,g:Ue,b:Qe,alpha:_t}){Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.max(Le,Ue,Qe),Lt=Math.min(Le,Ue,Qe),pr={mode:"hsi",s:Le+Ue+Qe===0?0:1-3*Lt/(Le+Ue+Qe),i:(Le+Ue+Qe)/3};return wt-Lt!==0&&(pr.h=(wt===Le?(Ue-Qe)/(wt-Lt)+(Ue{switch(Ue){case"deg":return+Le;case"rad":return Le/Math.PI*180;case"grad":return Le/10*9;case"turn":return Le*360}},Io=Vi,Xi=new RegExp(`^hsla?\\(\\s*${T}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),Ko=Le=>{let Ue=Le.match(Xi);if(!Ue)return;let Qe={mode:"hsl"};return Ue[3]!==void 0?Qe.h=+Ue[3]:Ue[1]!==void 0&&Ue[2]!==void 0&&(Qe.h=Io(Ue[1],Ue[2])),Ue[4]!==void 0&&(Qe.s=Math.min(Math.max(0,Ue[4]/100),1)),Ue[5]!==void 0&&(Qe.l=Math.min(Math.max(0,Ue[5]/100),1)),Ue[6]!==void 0?Qe.alpha=Math.max(0,Math.min(1,Ue[6]/100)):Ue[7]!==void 0&&(Qe.alpha=Math.max(0,Math.min(1,+Ue[7]))),Qe},Uo=Ko;function Ls(Le,Ue){if(!Ue||Ue[0]!=="hsl"&&Ue[0]!=="hsla")return;let Qe={mode:"hsl"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Percentage)return;Qe.h=_t.value}if(wt.type!==Y.None){if(wt.type===Y.Hue)return;Qe.s=wt.value/100}if(Lt.type!==Y.None){if(Lt.type===Y.Hue)return;Qe.l=Lt.value/100}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Ss=Ls,Vo={mode:"hsl",toMode:{rgb:wo},fromMode:{rgb:pi},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Ss,Uo],serialize:Le=>`hsl(${Le.h!==void 0?Le.h:"none"} ${Le.s!==void 0?Le.s*100+"%":"none"} ${Le.l!==void 0?Le.l*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},s:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:yn},average:{h:rt}},Vs=Vo;function Ts({h:Le,s:Ue,v:Qe,alpha:_t}){Le=Kr(Le!==void 0?Le:0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.abs(Le/60%2-1),Lt;switch(Math.floor(Le/60)){case 0:Lt={r:Qe,g:Qe*(1-Ue*wt),b:Qe*(1-Ue)};break;case 1:Lt={r:Qe*(1-Ue*wt),g:Qe,b:Qe*(1-Ue)};break;case 2:Lt={r:Qe*(1-Ue),g:Qe,b:Qe*(1-Ue*wt)};break;case 3:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue*wt),b:Qe};break;case 4:Lt={r:Qe*(1-Ue*wt),g:Qe*(1-Ue),b:Qe};break;case 5:Lt={r:Qe,g:Qe*(1-Ue),b:Qe*(1-Ue*wt)};break;default:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue),b:Qe*(1-Ue)}}return Lt.mode="rgb",_t!==void 0&&(Lt.alpha=_t),Lt}function Bo({r:Le,g:Ue,b:Qe,alpha:_t}){Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.max(Le,Ue,Qe),Lt=Math.min(Le,Ue,Qe),pr={mode:"hsv",s:wt===0?0:1-Lt/wt,v:wt};return wt-Lt!==0&&(pr.h=(wt===Le?(Ue-Qe)/(wt-Lt)+(Ue1){let wt=Ue+Qe;Ue/=wt,Qe/=wt}return Ts({h:Le,s:Qe===1?1:1-Ue/(1-Qe),v:1-Qe,alpha:_t})}function bs(Le){let Ue=Bo(Le);if(Ue===void 0)return;let Qe=Ue.s!==void 0?Ue.s:0,_t=Ue.v!==void 0?Ue.v:0,wt={mode:"hwb",w:(1-Qe)*_t,b:1-_t};return Ue.h!==void 0&&(wt.h=Ue.h),Ue.alpha!==void 0&&(wt.alpha=Ue.alpha),wt}function Dl(Le,Ue){if(!Ue||Ue[0]!=="hwb")return;let Qe={mode:"hwb"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Percentage)return;Qe.h=_t.value}if(wt.type!==Y.None){if(wt.type===Y.Hue)return;Qe.w=wt.value/100}if(Lt.type!==Y.None){if(Lt.type===Y.Hue)return;Qe.b=Lt.value/100}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var hl=Dl,ps={mode:"hwb",toMode:{rgb:yo},fromMode:{rgb:bs},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[hl],serialize:Le=>`hwb(${Le.h!==void 0?Le.h:"none"} ${Le.w!==void 0?Le.w*100+"%":"none"} ${Le.b!==void 0?Le.b*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},w:At,b:At,alpha:{use:At,fixup:$t}},difference:{h:Un},average:{h:rt}},dl=ps,wu=203,lu=.1593017578125,xc=78.84375,Fl=.8359375,pl=18.8515625,$u=18.6875;function uu(Le){if(Le<0)return 0;let Ue=Math.pow(Le,1/xc);return 1e4*Math.pow(Math.max(0,Ue-Fl)/(pl-$u*Ue),1/lu)}function tl(Le){if(Le<0)return 0;let Ue=Math.pow(Le/1e4,lu);return Math.pow((Fl+pl*Ue)/(1+$u*Ue),xc)}var vs=Le=>Math.max(Le/wu,0),os=({i:Le,t:Ue,p:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=uu(Le+.008609037037932761*Ue+.11102962500302593*Qe),Lt=uu(Le-.00860903703793275*Ue-.11102962500302599*Qe),pr=uu(Le+.5600313357106791*Ue-.32062717498731885*Qe),Gr={mode:"xyz65",x:vs(2.070152218389422*wt-1.3263473389671556*Lt+.2066510476294051*pr),y:vs(.3647385209748074*wt+.680566024947227*Lt-.0453045459220346*pr),z:vs(-.049747207535812*wt-.0492609666966138*Lt+1.1880659249923042*pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},ms=os,rl=(Le=0)=>Math.max(Le*wu,0),Fu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{let wt=rl(Le),Lt=rl(Ue),pr=rl(Qe),Gr=tl(.3592832590121217*wt+.6976051147779502*Lt-.0358915932320289*pr),va=tl(-.1920808463704995*wt+1.1004767970374323*Lt+.0753748658519118*pr),Qa=tl(.0070797844607477*wt+.0748396662186366*Lt+.8433265453898765*pr),Ga=.5*Gr+.5*va,Ua=1.61376953125*Gr-3.323486328125*va+1.709716796875*Qa,An=4.378173828125*Gr-4.24560546875*va-.132568359375*Qa,dn={mode:"itp",i:Ga,t:Ua,p:An};return _t!==void 0&&(dn.alpha=_t),dn},zu=Fu,Ku={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:ms,rgb:Le=>qt(ms(Le))},fromMode:{xyz65:zu,rgb:Le=>zu(et(Le))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:At,t:At,p:At,alpha:{use:At,fixup:$t}}},bc=Ku,Lh=134.03437499999998,rh=16295499532821565e-27,Ju=Le=>{if(Le<0)return 0;let Ue=Math.pow(Le/1e4,lu);return Math.pow((Fl+pl*Ue)/(1+$u*Ue),Lh)},ss=(Le=0)=>Math.max(Le*203,0),ah=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le=ss(Le),Ue=ss(Ue),Qe=ss(Qe);let wt=1.15*Le-.15*Qe,Lt=.66*Ue+.34*Le,pr=Ju(.41478972*wt+.579999*Lt+.014648*Qe),Gr=Ju(-.20151*wt+1.120649*Lt+.0531008*Qe),va=Ju(-.0166008*wt+.2648*Lt+.6684799*Qe),Qa=(pr+Gr)/2,Ga={mode:"jab",j:.44*Qa/(1-.56*Qa)-rh,a:3.524*pr-4.066708*Gr+.542708*va,b:.199076*pr+1.096799*Gr-1.295875*va};return _t!==void 0&&(Ga.alpha=_t),Ga},wc=ah,pc=134.03437499999998,Nf=16295499532821565e-27,Bu=Le=>{if(Le<0)return 0;let Ue=Math.pow(Le,1/pc);return 1e4*Math.pow((Fl-Ue)/($u*Ue-pl),1/lu)},Tc=Le=>Le/203,Ou=({j:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+Nf)/(.44+.56*(Le+Nf)),Lt=Bu(wt+.13860504*Ue+.058047316*Qe),pr=Bu(wt-.13860504*Ue-.058047316*Qe),Gr=Bu(wt-.096019242*Ue-.8118919*Qe),va={mode:"xyz65",x:Tc(1.661373024652174*Lt-.914523081304348*pr+.23136208173913045*Gr),y:Tc(-.3250758611844533*Lt+1.571847026732543*pr-.21825383453227928*Gr),z:Tc(-.090982811*Lt-.31272829*pr+1.5227666*Gr)};return _t!==void 0&&(va.alpha=_t),va},Gc=Ou,pf=Le=>{let Ue=wc(et(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},$l=pf,jf=Le=>qt(Gc(Le)),Hc=jf,Wc={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:$l,xyz65:wc},toMode:{rgb:Hc,xyz65:Gc},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:At,a:At,b:At,alpha:{use:At,fixup:$t}}},Qu=Wc,Yc=({j:Le,a:Ue,b:Qe,alpha:_t})=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.sqrt(Ue*Ue+Qe*Qe),Lt={mode:"jch",j:Le,c:wt};return wt&&(Lt.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(Lt.alpha=_t),Lt},Nu=Yc,Uf=({j:Le,c:Ue,h:Qe,alpha:_t})=>{Qe===void 0&&(Qe=0);let wt={mode:"jab",j:Le,a:Ue?Ue*Math.cos(Qe/180*Math.PI):0,b:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(wt.alpha=_t),wt},al=Uf,Xc={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:al,rgb:Le=>Hc(al(Le))},fromMode:{rgb:Le=>Nu($l(Le)),jab:Nu},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:At,fixup:Rt},c:At,j:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},ju=Xc,Ac=Math.pow(29,3)/Math.pow(3,3),Zc=Math.pow(6,3)/Math.pow(29,3),ec=Le=>Math.pow(Le,3)>Zc?Math.pow(Le,3):(116*Le-16)/Ac,cu=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+16)/116,Lt=Ue/500+wt,pr=wt-Qe/200,Gr={mode:"xyz50",x:ec(Lt)*zr.X,y:ec(wt)*zr.Y,z:ec(pr)*zr.Z};return _t!==void 0&&(Gr.alpha=_t),Gr},tc=cu,vf=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*3.1341359569958707-Ue*1.6173863321612538-.4906619460083532*Qe,g:Le*-.978795502912089+Ue*1.916254567259524+.03344273116131949*Qe,b:Le*.07195537988411677-Ue*.2289768264158322+1.405386058324125*Qe});return _t!==void 0&&(wt.alpha=_t),wt},Tu=vf,nh=Le=>Tu(tc(Le)),vl=nh,ml=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz50",x:.436065742824811*Ue+.3851514688337912*Qe+.14307845442264197*_t,y:.22249319175623702*Ue+.7168870538238823*Qe+.06061979053616537*_t,z:.013923904500943465*Ue+.09708128566574634*Qe+.7140993584005155*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},rc=ml,yl=Le=>Le>Zc?Math.cbrt(Le):(Ac*Le+16)/116,qf=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=yl(Le/zr.X),Lt=yl(Ue/zr.Y),pr=yl(Qe/zr.Z),Gr={mode:"lab",l:116*Lt-16,a:500*(wt-Lt),b:200*(Lt-pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},ac=qf,Mc=Le=>{let Ue=ac(rc(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},mf=Mc;function Jo(Le,Ue){if(!Ue||Ue[0]!=="lab")return;let Qe={mode:"lab"},[,_t,wt,Lt,pr]=Ue;if(!(_t.type===Y.Hue||wt.type===Y.Hue||Lt.type===Y.Hue))return _t.type!==Y.None&&(Qe.l=Math.min(Math.max(0,_t.value),100)),wt.type!==Y.None&&(Qe.a=wt.type===Y.Number?wt.value:wt.value*125/100),Lt.type!==Y.None&&(Qe.b=Lt.type===Y.Number?Lt.value:Lt.value*125/100),pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var ih=Jo,fu={mode:"lab",toMode:{xyz50:tc,rgb:vl},fromMode:{xyz50:ac,rgb:mf},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[ih],serialize:Le=>`lab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:$t}}},Sl=fu,El=lo(Li({},Sl),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:tn,rgb:rn},fromMode:{xyz65:no,rgb:fn},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),oh=El;function Au(Le,Ue){if(!Ue||Ue[0]!=="lch")return;let Qe={mode:"lch"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Hue)return;Qe.l=Math.min(Math.max(0,_t.value),100)}if(wt.type!==Y.None&&(Qe.c=Math.max(0,wt.type===Y.Number?wt.value:wt.value*150/100)),Lt.type!==Y.None){if(Lt.type===Y.Percentage)return;Qe.h=Lt.value}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var $c=Au,_l={mode:"lch",toMode:{lab:ar,rgb:Le=>vl(ar(Le))},fromMode:{rgb:Le=>kt(mf(Le)),lab:kt},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[$c],serialize:Le=>`lch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},c:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},nl=_l,gf=lo(Li({},nl),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:Le=>ar(Le,"lab65"),rgb:Le=>rn(ar(Le,"lab65"))},fromMode:{rgb:Le=>kt(fn(Le),"lch65"),lab65:Le=>kt(Le,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Kc=gf,sh=({l:Le,u:Ue,v:Qe,alpha:_t})=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.sqrt(Ue*Ue+Qe*Qe),Lt={mode:"lchuv",l:Le,c:wt};return wt&&(Lt.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(Lt.alpha=_t),Lt},hu=sh,Uu=({l:Le,c:Ue,h:Qe,alpha:_t})=>{Qe===void 0&&(Qe=0);let wt={mode:"luv",l:Le,u:Ue?Ue*Math.cos(Qe/180*Math.PI):0,v:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(wt.alpha=_t),wt},qu=Uu,nc=(Le,Ue,Qe)=>4*Le/(Le+15*Ue+3*Qe),yf=(Le,Ue,Qe)=>9*Ue/(Le+15*Ue+3*Qe),_f=nc(zr.X,zr.Y,zr.Z),Mu=yf(zr.X,zr.Y,zr.Z),ic=Le=>Le<=Zc?Ac*Le:116*Math.cbrt(Le)-16,Sc=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=ic(Ue/zr.Y),Lt=nc(Le,Ue,Qe),pr=yf(Le,Ue,Qe);!isFinite(Lt)||!isFinite(pr)?wt=Lt=pr=0:(Lt=13*wt*(Lt-_f),pr=13*wt*(pr-Mu));let Gr={mode:"luv",l:wt,u:Lt,v:pr};return _t!==void 0&&(Gr.alpha=_t),Gr},Vu=Sc,xo=(Le,Ue,Qe)=>4*Le/(Le+15*Ue+3*Qe),Ec=(Le,Ue,Qe)=>9*Ue/(Le+15*Ue+3*Qe),xh=xo(zr.X,zr.Y,zr.Z),Vf=Ec(zr.X,zr.Y,zr.Z),xf=({l:Le,u:Ue,v:Qe,alpha:_t})=>{if(Le===void 0&&(Le=0),Le===0)return{mode:"xyz50",x:0,y:0,z:0};Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ue/(13*Le)+xh,Lt=Qe/(13*Le)+Vf,pr=zr.Y*(Le<=8?Le/Ac:Math.pow((Le+16)/116,3)),Gr=pr*(9*wt)/(4*Lt),va=pr*(12-3*wt-20*Lt)/(4*Lt),Qa={mode:"xyz50",x:Gr,y:pr,z:va};return _t!==void 0&&(Qa.alpha=_t),Qa},Gf=xf,bh=Le=>hu(Vu(rc(Le))),Hf=Le=>Tu(Gf(qu(Le))),il={mode:"lchuv",toMode:{luv:qu,rgb:Hf},fromMode:{rgb:bh,luv:hu},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:At,fixup:Rt},c:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},kl=il,kc=lo(Li({},_r),{mode:"lrgb",toMode:{rgb:Pt},fromMode:{rgb:Ke},parse:["srgb-linear"],serialize:"srgb-linear"}),Cc=kc,Lc={mode:"luv",toMode:{xyz50:Gf,rgb:Le=>Tu(Gf(Le))},fromMode:{xyz50:Vu,rgb:Le=>Vu(rc(Le))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:At,u:At,v:At,alpha:{use:At,fixup:$t}}},vc=Lc,Ft=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.cbrt(.412221469470763*Le+.5363325372617348*Ue+.0514459932675022*Qe),Lt=Math.cbrt(.2119034958178252*Le+.6806995506452344*Ue+.1073969535369406*Qe),pr=Math.cbrt(.0883024591900564*Le+.2817188391361215*Ue+.6299787016738222*Qe),Gr={mode:"oklab",l:.210454268309314*wt+.7936177747023054*Lt-.0040720430116193*pr,a:1.9779985324311684*wt-2.42859224204858*Lt+.450593709617411*pr,b:.0259040424655478*wt+.7827717124575296*Lt-.8086757549230774*pr};return _t!==void 0&&(Gr.alpha=_t),Gr},tr=Ft,Fr=Le=>{let Ue=tr(Ke(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},wr=Fr,ea=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.pow(Le+.3963377773761749*Ue+.2158037573099136*Qe,3),Lt=Math.pow(Le-.1055613458156586*Ue-.0638541728258133*Qe,3),pr=Math.pow(Le-.0894841775298119*Ue-1.2914855480194092*Qe,3),Gr={mode:"lrgb",r:4.076741636075957*wt-3.3077115392580616*Lt+.2309699031821044*pr,g:-1.2684379732850317*wt+2.6097573492876887*Lt-.3413193760026573*pr,b:-.0041960761386756*wt-.7034186179359362*Lt+1.7076146940746117*pr};return _t!==void 0&&(Gr.alpha=_t),Gr},ba=ea,Ia=Le=>Pt(ba(Le)),Na=Ia;function Za(Le){let _t=1.170873786407767;return .5*(_t*Le-.206+Math.sqrt((_t*Le-.206)*(_t*Le-.206)+4*.03*_t*Le))}function mn(Le){return(Le*Le+.206*Le)/(1.170873786407767*(Le+.03))}function Da(Le,Ue){let Qe,_t,wt,Lt,pr,Gr,va,Qa;-1.88170328*Le-.80936493*Ue>1?(Qe=1.19086277,_t=1.76576728,wt=.59662641,Lt=.75515197,pr=.56771245,Gr=4.0767416621,va=-3.3077115913,Qa=.2309699292):1.81444104*Le-1.19445276*Ue>1?(Qe=.73956515,_t=-.45954404,wt=.08285427,Lt=.1254107,pr=.14503204,Gr=-1.2684380046,va=2.6097574011,Qa=-.3413193965):(Qe=1.35733652,_t=-.00915799,wt=-1.1513021,Lt=-.50559606,pr=.00692167,Gr=-.0041960863,va=-.7034186147,Qa=1.707614701);let Ga=Qe+_t*Le+wt*Ue+Lt*Le*Le+pr*Le*Ue,Ua=.3963377774*Le+.2158037573*Ue,An=-.1055613458*Le-.0638541728*Ue,dn=-.0894841775*Le-1.291485548*Ue;{let _n=1+Ga*Ua,Mn=1+Ga*An,Bn=1+Ga*dn,Zn=_n*_n*_n,Ci=Mn*Mn*Mn,qo=Bn*Bn*Bn,As=3*Ua*_n*_n,ls=3*An*Mn*Mn,Vl=3*dn*Bn*Bn,au=6*Ua*Ua*_n,Lu=6*An*An*Mn,uh=6*dn*dn*Bn,wh=Gr*Zn+va*Ci+Qa*qo,Gh=Gr*As+va*ls+Qa*Vl,Gd=Gr*au+va*Lu+Qa*uh;Ga=Ga-wh*Gh/(Gh*Gh-.5*wh*Gd)}return Ga}function Ha(Le,Ue){let Qe=Da(Le,Ue),_t=ba({l:1,a:Qe*Le,b:Qe*Ue}),wt=Math.cbrt(1/Math.max(_t.r,_t.g,_t.b)),Lt=wt*Qe;return[wt,Lt]}function $a(Le,Ue,Qe,_t,wt,Lt=null){Lt||(Lt=Ha(Le,Ue));let pr;if((Qe-wt)*Lt[1]-(Lt[0]-wt)*_t<=0)pr=Lt[1]*wt/(_t*Lt[0]+Lt[1]*(wt-Qe));else{pr=Lt[1]*(wt-1)/(_t*(Lt[0]-1)+Lt[1]*(wt-Qe));{let Gr=Qe-wt,va=_t,Qa=.3963377774*Le+.2158037573*Ue,Ga=-.1055613458*Le-.0638541728*Ue,Ua=-.0894841775*Le-1.291485548*Ue,An=Gr+va*Qa,dn=Gr+va*Ga,_n=Gr+va*Ua;{let Mn=wt*(1-pr)+pr*Qe,Bn=pr*_t,Zn=Mn+Bn*Qa,Ci=Mn+Bn*Ga,qo=Mn+Bn*Ua,As=Zn*Zn*Zn,ls=Ci*Ci*Ci,Vl=qo*qo*qo,au=3*An*Zn*Zn,Lu=3*dn*Ci*Ci,uh=3*_n*qo*qo,wh=6*An*An*Zn,Gh=6*dn*dn*Ci,Gd=6*_n*_n*qo,Ad=4.0767416621*As-3.3077115913*ls+.2309699292*Vl-1,ch=4.0767416621*au-3.3077115913*Lu+.2309699292*uh,Mv=4.0767416621*wh-3.3077115913*Gh+.2309699292*Gd,vp=ch/(ch*ch-.5*Ad*Mv),mp=-Ad*vp,gp=-1.2684380046*As+2.6097574011*ls-.3413193965*Vl-1,yp=-1.2684380046*au+2.6097574011*Lu-.3413193965*uh,xg=-1.2684380046*wh+2.6097574011*Gh-.3413193965*Gd,p0=yp/(yp*yp-.5*gp*xg),Md=-gp*p0,v0=-.0041960863*As-.7034186147*ls+1.707614701*Vl-1,m0=-.0041960863*au-.7034186147*Lu+1.707614701*uh,Hd=-.0041960863*wh-.7034186147*Gh+1.707614701*Gd,_p=m0/(m0*m0-.5*v0*Hd),bg=-v0*_p;mp=vp>=0?mp:1e6,Md=p0>=0?Md:1e6,bg=_p>=0?bg:1e6,pr+=Math.min(mp,Math.min(Md,bg))}}}return pr}function vn(Le,Ue,Qe=null){Qe||(Qe=Ha(Le,Ue));let _t=Qe[0],wt=Qe[1];return[wt/_t,wt/(1-_t)]}function Sn(Le,Ue,Qe){let _t=Ha(Ue,Qe),wt=$a(Ue,Qe,Le,1,Le,_t),Lt=vn(Ue,Qe,_t),pr=.11516993+1/(7.4477897+4.1590124*Qe+Ue*(-2.19557347+1.75198401*Qe+Ue*(-2.13704948-10.02301043*Qe+Ue*(-4.24894561+5.38770819*Qe+4.69891013*Ue)))),Gr=.11239642+1/(1.6132032-.68124379*Qe+Ue*(.40370612+.90148123*Qe+Ue*(-.27087943+.6122399*Qe+Ue*(.00299215-.45399568*Qe-.14661872*Ue)))),va=wt/Math.min(Le*Lt[0],(1-Le)*Lt[1]),Qa=Le*pr,Ga=(1-Le)*Gr,Ua=.9*va*Math.sqrt(Math.sqrt(1/(1/(Qa*Qa*Qa*Qa)+1/(Ga*Ga*Ga*Ga))));return Qa=Le*.4,Ga=(1-Le)*.8,[Math.sqrt(1/(1/(Qa*Qa)+1/(Ga*Ga))),Ua,wt]}function yi(Le){let Ue=Le.l!==void 0?Le.l:0,Qe=Le.a!==void 0?Le.a:0,_t=Le.b!==void 0?Le.b:0,wt={mode:"okhsl",l:Za(Ue)};Le.alpha!==void 0&&(wt.alpha=Le.alpha);let Lt=Math.sqrt(Qe*Qe+_t*_t);if(!Lt)return wt.s=0,wt;let[pr,Gr,va]=Sn(Ue,Qe/Lt,_t/Lt),Qa;if(Ltyi(wr(Le))},toMode:{oklab:_i,rgb:Le=>Na(_i(Le))}}),ri=ki;function En(Le){let Ue=Le.l!==void 0?Le.l:0,Qe=Le.a!==void 0?Le.a:0,_t=Le.b!==void 0?Le.b:0,wt=Math.sqrt(Qe*Qe+_t*_t),Lt=wt?Qe/wt:1,pr=wt?_t/wt:1,[Gr,va]=vn(Lt,pr),Qa=.5,Ga=1-Qa/Gr,Ua=va/(wt+Ue*va),An=Ua*Ue,dn=Ua*wt,_n=mn(An),Mn=dn*_n/An,Bn=ba({l:_n,a:Lt*Mn,b:pr*Mn}),Zn=Math.cbrt(1/Math.max(Bn.r,Bn.g,Bn.b,0));Ue=Ue/Zn,wt=wt/Zn*Za(Ue)/Ue,Ue=Za(Ue);let Ci={mode:"okhsv",s:wt?(Qa+va)*dn/(va*Qa+va*Ga*dn):0,v:Ue?Ue/An:0};return Ci.s&&(Ci.h=Kr(Math.atan2(_t,Qe)*180/Math.PI)),Le.alpha!==void 0&&(Ci.alpha=Le.alpha),Ci}function Ln(Le){let Ue={mode:"oklab"};Le.alpha!==void 0&&(Ue.alpha=Le.alpha);let Qe=Le.h!==void 0?Le.h:0,_t=Le.s!==void 0?Le.s:0,wt=Le.v!==void 0?Le.v:0,Lt=Math.cos(Qe/180*Math.PI),pr=Math.sin(Qe/180*Math.PI),[Gr,va]=vn(Lt,pr),Qa=.5,Ga=1-Qa/Gr,Ua=1-_t*Qa/(Qa+va-va*Ga*_t),An=_t*va*Qa/(Qa+va-va*Ga*_t),dn=mn(Ua),_n=An*dn/Ua,Mn=ba({l:dn,a:Lt*_n,b:pr*_n}),Bn=Math.cbrt(1/Math.max(Mn.r,Mn.g,Mn.b,0)),Zn=mn(wt*Ua),Ci=An*Zn/Ua;return Ue.l=Zn*Bn,Ue.a=Ci*Lt*Bn,Ue.b=Ci*pr*Bn,Ue}var Ni=lo(Li({},Pi),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:En,rgb:Le=>En(wr(Le))},toMode:{oklab:Ln,rgb:Le=>Na(Ln(Le))}}),Zi=Ni;function Co(Le,Ue){if(!Ue||Ue[0]!=="oklab")return;let Qe={mode:"oklab"},[,_t,wt,Lt,pr]=Ue;if(!(_t.type===Y.Hue||wt.type===Y.Hue||Lt.type===Y.Hue))return _t.type!==Y.None&&(Qe.l=Math.min(Math.max(0,_t.type===Y.Number?_t.value:_t.value/100),1)),wt.type!==Y.None&&(Qe.a=wt.type===Y.Number?wt.value:wt.value*.4/100),Lt.type!==Y.None&&(Qe.b=Lt.type===Y.Number?Lt.value:Lt.value*.4/100),pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Do=Co,Fo=lo(Li({},Sl),{mode:"oklab",toMode:{lrgb:ba,rgb:Na},fromMode:{lrgb:tr,rgb:wr},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Do],serialize:Le=>`oklab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`}),Yo=Fo;function bo(Le,Ue){if(!Ue||Ue[0]!=="oklch")return;let Qe={mode:"oklch"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Hue)return;Qe.l=Math.min(Math.max(0,_t.type===Y.Number?_t.value:_t.value/100),1)}if(wt.type!==Y.None&&(Qe.c=Math.max(0,wt.type===Y.Number?wt.value:wt.value*.4/100)),Lt.type!==Y.None){if(Lt.type===Y.Percentage)return;Qe.h=Lt.value}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Gs=bo,Es=lo(Li({},nl),{mode:"oklch",toMode:{oklab:Le=>ar(Le,"oklab"),rgb:Le=>Na(ar(Le,"oklab"))},fromMode:{rgb:Le=>kt(wr(Le),"oklch"),oklab:Le=>kt(Le,"oklch")},parse:[Gs],serialize:Le=>`oklch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),ns=Es,Kn=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz65",x:.486570948648216*Ue+.265667693169093*Qe+.1982172852343625*_t,y:.2289745640697487*Ue+.6917385218365062*Qe+.079286914093745*_t,z:0*Ue+.0451133818589026*Qe+1.043944368900976*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},zo=Kn,gs=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*2.4934969119414263-Ue*.9313836179191242-.402710784450717*Qe,g:Le*-.8294889695615749+Ue*1.7626640603183465+.0236246858419436*Qe,b:Le*.0358458302437845-Ue*.0761723892680418+.9568845240076871*Qe},"p3");return _t!==void 0&&(wt.alpha=_t),wt},js=gs,Cl=lo(Li({},_r),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:Le=>js(et(Le)),xyz65:js},toMode:{rgb:Le=>qt(zo(Le)),xyz65:zo}}),zl=Cl,Kl=Le=>{let Ue=Math.abs(Le);return Ue>=1/512?Math.sign(Le)*Math.pow(Ue,1/1.8):16*Le},Gu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"prophoto",r:Kl(Le*1.3457868816471585-Ue*.2555720873797946-.0511018649755453*Qe),g:Kl(Le*-.5446307051249019+Ue*1.5082477428451466+.0205274474364214*Qe),b:Kl(Le*0+Ue*0+1.2119675456389452*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},xl=Gu,Hu=(Le=0)=>{let Ue=Math.abs(Le);return Ue>=16/512?Math.sign(Le)*Math.pow(Ue,1.8):Le/16},Su=Le=>{let Ue=Hu(Le.r),Qe=Hu(Le.g),_t=Hu(Le.b),wt={mode:"xyz50",x:.7977666449006423*Ue+.1351812974005331*Qe+.0313477341283922*_t,y:.2880748288194013*Ue+.7118352342418731*Qe+899369387256e-16*_t,z:0*Ue+0*Qe+.8251046025104602*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},mc=Su,Jc=lo(Li({},_r),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:xl,rgb:Le=>xl(rc(Le))},toMode:{xyz50:mc,rgb:Le=>Tu(mc(Le))}}),oc=Jc,du=1.09929682680944,Jl=.018053968510807,Ql=Le=>{let Ue=Math.abs(Le);return Ue>Jl?(Math.sign(Le)||1)*(du*Math.pow(Ue,.45)-(du-1)):4.5*Le},Eu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"rec2020",r:Ql(Le*1.7166511879712683-Ue*.3556707837763925-.2533662813736599*Qe),g:Ql(Le*-.6666843518324893+Ue*1.6164812366349395+.0157685458139111*Qe),b:Ql(Le*.0176398574453108-Ue*.0427706132578085+.9421031212354739*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},bf=Eu,lh=1.09929682680944,Pc=.018053968510807,Ks=(Le=0)=>{let Ue=Math.abs(Le);return Ue{let Ue=Ks(Le.r),Qe=Ks(Le.g),_t=Ks(Le.b),wt={mode:"xyz65",x:.6369580483012911*Ue+.1446169035862083*Qe+.1688809751641721*_t,y:.262700212011267*Ue+.6779980715188708*Qe+.059301716469862*_t,z:0*Ue+.0280726930490874*Qe+1.0609850577107909*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Wu=Bl,wf=lo(Li({},_r),{mode:"rec2020",fromMode:{xyz65:bf,rgb:Le=>bf(et(Le))},toMode:{xyz65:Wu,rgb:Le=>qt(Wu(Le))},parse:["rec2020"],serialize:"rec2020"}),Qc=wf,ku=.0037930732552754493,Ol=Math.cbrt(ku),Nl=Le=>Math.cbrt(Le)-Ol,fi=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt=Nl(.3*Ue+.622*Qe+.078*_t+ku),pr=Nl(.23*Ue+.692*Qe+.078*_t+ku),Gr=Nl(.2434226892454782*Ue+.2047674442449682*Qe+.5518098665095535*_t+ku),va={mode:"xyb",x:(Lt-pr)/2,y:(Lt+pr)/2,b:Gr-(Lt+pr)/2};return wt!==void 0&&(va.alpha=wt),va},eu=fi,$e=Le=>Math.pow(Le+Ol,3),nt=({x:Le,y:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=$e(Le+Ue)-ku,Lt=$e(Ue-Le)-ku,pr=$e(Qe+Ue)-ku,Gr=Pt({r:11.031566904639861*wt-9.866943908131562*Lt-.16462299650829934*pr,g:-3.2541473810744237*wt+4.418770377582723*Lt-.16462299650829934*pr,b:-3.6588512867136815*wt+2.7129230459360922*Lt+1.9459282407775895*pr});return _t!==void 0&&(Gr.alpha=_t),Gr},mt=nt,xt={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:mt},fromMode:{rgb:eu},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:At,y:At,b:At,alpha:{use:At,fixup:$t}}},Bt=xt,zt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Tu,lab:ac},fromMode:{rgb:rc,lab:tc},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:$t}}},Wt=zt,Pr=Le=>{let{x:Ue,y:Qe,z:_t,alpha:wt}=Le;Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0),_t===void 0&&(_t=0);let Lt={mode:"xyz50",x:1.0479298208405488*Ue+.0229467933410191*Qe-.0501922295431356*_t,y:.0296278156881593*Ue+.990434484573249*Qe-.0170738250293851*_t,z:-.0092430581525912*Ue+.0150551448965779*Qe+.7518742899580008*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},Br=Pr,kr=Le=>{let{x:Ue,y:Qe,z:_t,alpha:wt}=Le;Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0),_t===void 0&&(_t=0);let Lt={mode:"xyz65",x:.9554734527042182*Ue-.0230985368742614*Qe+.0632593086610217*_t,y:-.0283697069632081*Ue+1.0099954580058226*Qe+.021041398966943*_t,z:.0123140016883199*Ue-.0205076964334779*Qe+1.3303659366080753*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},jr=kr,Jr={mode:"xyz65",toMode:{rgb:qt,xyz50:Br},fromMode:{rgb:et,xyz50:jr},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:$t}}},la=Jr,xa=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"yiq",y:.29889531*Le+.58662247*Ue+.11448223*Qe,i:.59597799*Le-.2741761*Ue-.32180189*Qe,q:.21147017*Le-.52261711*Ue+.31114694*Qe};return _t!==void 0&&(wt.alpha=_t),wt},Ba=xa,an=({y:Le,i:Ue,q:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"rgb",r:Le+.95608445*Ue+.6208885*Qe,g:Le-.27137664*Ue-.6486059*Qe,b:Le-1.10561724*Ue+1.70250126*Qe};return _t!==void 0&&(wt.alpha=_t),wt},wn=an,ii={mode:"yiq",toMode:{rgb:wn},fromMode:{rgb:Ba},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:At,i:At,q:At,alpha:{use:At,fixup:$t}}},Si=ii,oi=(Le,Ue)=>Math.round(Le*(Ue=Math.pow(10,Ue)))/Ue,Ji=(Le=4)=>Ue=>typeof Ue=="number"?oi(Ue,Le):Ue,Qi=Ji,Oo=Qi(2),Qo=Le=>Math.max(0,Math.min(1,Le||0)),vo=Le=>Math.round(Qo(Le)*255),ys=P("rgb"),ol=P("hsl"),jl=Le=>{if(Le===void 0)return;let Ue=vo(Le.r),Qe=vo(Le.g),_t=vo(Le.b);return"#"+(1<<24|Ue<<16|Qe<<8|_t).toString(16).slice(1)},Hs=Le=>{if(Le===void 0)return;let Ue=vo(Le.alpha!==void 0?Le.alpha:1);return jl(Le)+(256|Ue).toString(16).slice(1)},Cu=Le=>{if(Le===void 0)return;let Ue=vo(Le.r),Qe=vo(Le.g),_t=vo(Le.b);return Le.alpha===void 0||Le.alpha===1?`rgb(${Ue}, ${Qe}, ${_t})`:`rgba(${Ue}, ${Qe}, ${_t}, ${Oo(Qo(Le.alpha))})`},hi=Le=>{if(Le===void 0)return;let Ue=Oo(Le.h||0),Qe=Oo(Qo(Le.s)*100)+"%",_t=Oo(Qo(Le.l)*100)+"%";return Le.alpha===void 0||Le.alpha===1?`hsl(${Ue}, ${Qe}, ${_t})`:`hsla(${Ue}, ${Qe}, ${_t}, ${Oo(Qo(Le.alpha))})`},wi=Le=>{let Ue=B(Le);if(!Ue)return;let Qe=se(Ue.mode);if(!Qe.serialize||typeof Qe.serialize=="string"){let _t=`color(${Qe.serialize||`--${Ue.mode}`} `;return Qe.channels.forEach((wt,Lt)=>{wt!=="alpha"&&(_t+=(Lt?" ":"")+(Ue[wt]!==void 0?Ue[wt]:"none"))}),Ue.alpha!==void 0&&Ue.alpha<1&&(_t+=` / ${Ue.alpha}`),_t+")"}if(typeof Qe.serialize=="function")return Qe.serialize(Ue)},sl=Le=>jl(ys(Le)),sc=Le=>Hs(ys(Le)),tu=Le=>Cu(ys(Le)),Ps=Le=>hi(ol(Le)),gc={normal:(Le,Ue)=>Ue,multiply:(Le,Ue)=>Le*Ue,screen:(Le,Ue)=>Le+Ue-Le*Ue,"hard-light":(Le,Ue)=>Ue<.5?Le*2*Ue:2*Ue*(1-Le)-1,overlay:(Le,Ue)=>Le<.5?Ue*2*Le:2*Le*(1-Ue)-1,darken:(Le,Ue)=>Math.min(Le,Ue),lighten:(Le,Ue)=>Math.max(Le,Ue),"color-dodge":(Le,Ue)=>Le===0?0:Ue===1?1:Math.min(1,Le/(1-Ue)),"color-burn":(Le,Ue)=>Le===1?1:Ue===0?0:1-Math.min(1,(1-Le)/Ue),"soft-light":(Le,Ue)=>Ue<.5?Le-(1-2*Ue)*Le*(1-Le):Le+(2*Ue-1)*((Le<.25?((16*Le-12)*Le+4)*Le:Math.sqrt(Le))-Le),difference:(Le,Ue)=>Math.abs(Le-Ue),exclusion:(Le,Ue)=>Le+Ue-2*Le*Ue},pu=(Le,Ue="normal",Qe="rgb")=>{let _t=typeof Ue=="function"?Ue:gc[Ue],wt=P(Qe),Lt=se(Qe).channels;return Le.map(Gr=>{let va=wt(Gr);return va.alpha===void 0&&(va.alpha=1),va}).reduce((Gr,va)=>{if(Gr===void 0)return va;let Qa=va.alpha+Gr.alpha*(1-va.alpha);return Lt.reduce((Ga,Ua)=>(Ua!=="alpha"&&(Qa===0?Ga[Ua]=0:(Ga[Ua]=va.alpha*(1-Gr.alpha)*va[Ua]+va.alpha*Gr.alpha*_t(Gr[Ua],va[Ua])+(1-va.alpha)*Gr.alpha*Gr[Ua],Ga[Ua]=Math.max(0,Math.min(1,Ga[Ua]/Qa)))),Ga),{mode:Qe,alpha:Qa})})},ll=pu,ef=([Le,Ue])=>Le+Math.random()*(Ue-Le),de=Le=>Object.keys(Le).reduce((Ue,Qe)=>{let _t=Le[Qe];return Ue[Qe]=Array.isArray(_t)?_t:[_t,_t],Ue},{}),Ee=(Le="rgb",Ue={})=>{let Qe=se(Le),_t=de(Ue);return Qe.channels.reduce((wt,Lt)=>((_t.alpha||Lt!=="alpha")&&(wt[Lt]=ef(_t[Lt]||Qe.ranges[Lt])),wt),{mode:Le})},qe=Ee,tt=(Le,Ue="rgb",Qe=!1)=>{let _t=Ue?se(Ue).channels:null,wt=Ue?P(Ue):B;return Lt=>{let pr=wt(Lt);if(!pr)return;let Gr=(_t||se(pr.mode).channels).reduce((Qa,Ga)=>{let Ua=Le(pr[Ga],Ga,pr,Ue);return Ua!==void 0&&!isNaN(Ua)&&(Qa[Ga]=Ua),Qa},{mode:pr.mode});if(!Qe)return Gr;let va=B(Lt);return va&&va.mode!==Gr.mode?P(va.mode)(Gr):Gr}},at=(Le,Ue,Qe)=>Ue!=="alpha"?(Le||0)*(Qe.alpha!==void 0?Qe.alpha:1):Le,ct=(Le,Ue,Qe)=>Ue!=="alpha"&&Qe.alpha!==0?(Le||0)/(Qe.alpha!==void 0?Qe.alpha:1):Le,Nt=(Le=1,Ue=0)=>(Qe,_t)=>_t!=="alpha"?Qe*Le+Ue:Qe,St=(Le=1,Ue=1,Qe=0)=>(_t,wt)=>wt!=="alpha"?Le*Math.pow(_t,Ue)+Qe:_t,Jt=Le=>{Le[0]===void 0&&(Le[0]=0),Le[Le.length-1]===void 0&&(Le[Le.length-1]=1);let Ue=1,Qe,_t,wt,Lt;for(;UeUe=>Le<=0?1:Le>=1?0:Math.pow(Ue,Math.log(.5)/Math.log(Le)),Hr=gr,Vr=Le=>typeof Le=="function",ca=Le=>Le&&typeof Le=="object",Aa=Le=>typeof Le=="number",Yr=(Le,Ue="rgb",Qe,_t)=>{let wt=se(Ue),Lt=P(Ue),pr=[],Gr=[],va={};Le.forEach(An=>{Array.isArray(An)?(pr.push(Lt(An[0])),Gr.push(An[1])):Aa(An)||Vr(An)?va[Gr.length]=An:(pr.push(Lt(An)),Gr.push(void 0))}),mr(Gr);let Qa=wt.channels.reduce((An,dn)=>{let _n;return ca(Qe)&&ca(Qe[dn])&&Qe[dn].fixup?_n=Qe[dn].fixup:ca(wt.interpolate[dn])&&wt.interpolate[dn].fixup?_n=wt.interpolate[dn].fixup:_n=Mn=>Mn,An[dn]=_n(pr.map(Mn=>Mn[dn])),An},{});if(_t){let An=pr.map((dn,_n)=>wt.channels.reduce((Mn,Bn)=>(Mn[Bn]=Qa[Bn][_n],Mn),{mode:Ue}));Qa=wt.channels.reduce((dn,_n)=>(dn[_n]=An.map(Mn=>{let Bn=_t(Mn[_n],_n,Mn,Ue);return isNaN(Bn)?void 0:Bn}),dn),{})}let Ga=wt.channels.reduce((An,dn)=>{let _n;return Vr(Qe)?_n=Qe:ca(Qe)&&Vr(Qe[dn])?_n=Qe[dn]:ca(Qe)&&ca(Qe[dn])&&Qe[dn].use?_n=Qe[dn].use:Vr(wt.interpolate[dn])?_n=wt.interpolate[dn]:ca(wt.interpolate[dn])&&(_n=wt.interpolate[dn].use),An[dn]=_n(Qa[dn]),An},{}),Ua=pr.length-1;return An=>{if(An=Math.min(Math.max(0,An),1),An<=Gr[0])return pr[0];if(An>Gr[Ua])return pr[Ua];let dn=0;for(;Gr[dn]{let ls=Ga[As](Ci);return ls!==void 0&&(qo[As]=ls),qo},{mode:Ue})}},oa=(Le,Ue="rgb",Qe)=>Yr(Le,Ue,Qe),fa=(Le,Ue)=>(Qe,_t="rgb",wt)=>{let Lt=Ue?tt(Ue,_t):void 0,pr=Yr(Qe,_t,wt,Le);return Lt?Gr=>Lt(pr(Gr)):pr},Ea=fa(at,ct),Ma=(Le,Ue)=>(Le+Ue)%Ue,sa=(Le,Ue,Qe,_t,wt)=>{let Lt=wt*wt,pr=Lt*wt;return((1-3*wt+3*Lt-pr)*Le+(4-6*Lt+3*pr)*Ue+(1+3*wt+3*Lt-3*pr)*Qe+pr*_t)/6},hn=Le=>Ue=>{let Qe=Le.length-1,_t=Ue>=1?Qe-1:Math.max(0,Math.floor(Ue*Qe));return sa(_t>0?Le[_t-1]:2*Le[_t]-Le[_t+1],Le[_t],Le[_t+1],_tUe=>{let Qe=Le.length-1,_t=Math.floor(Ue*Qe);return sa(Le[Ma(_t-1,Le.length)],Le[Ma(_t,Le.length)],Le[Ma(_t+1,Le.length)],Le[Ma(_t+2,Le.length)],(Ue-_t/Qe)*Qe)},zn=Le=>{let Ue,Qe=Le.length-1,_t=new Array(Qe),wt=new Array(Qe),Lt=new Array(Qe);for(_t[1]=1/4,wt[1]=(6*Le[1]-Le[0])/4,Ue=2;Ue0&&(Lt[Qe-1]=wt[Qe-1]),Ue=Qe-2;Ue>0;--Ue)Lt[Ue]=wt[Ue]-_t[Ue]*Lt[Ue+1];return Lt},$n=Le=>hn(zn(Le)),xi=Le=>Tn(zn(Le)),di=Math.sign,uo=Math.min,pe=Math.abs,y=Le=>{let Ue=Le.length-1,Qe=[],_t=[],wt=[];for(let Lt=0;Lt0?.5*(Le[Lt+1]-Le[Lt-1])*Ue:void 0),wt.push(Lt>0?(di(Qe[Lt-1])+di(Qe[Lt]))*uo(pe(Qe[Lt-1]),pe(Qe[Lt]),.5*pe(_t[Lt])):void 0);return[Qe,_t,wt]},N=(Le,Ue,Qe)=>{let _t=Le.length-1,wt=_t*_t;return Lt=>{let pr;Lt>=1?pr=_t-1:pr=Math.max(0,Math.floor(Lt*_t));let Gr=Lt-pr/_t,va=Gr*Gr,Qa=va*Gr;return(Ue[pr]+Ue[pr+1]-2*Qe[pr])*wt*Qa+(3*Qe[pr]-2*Ue[pr]-Ue[pr+1])*_t*va+Ue[pr]*Gr+Le[pr]}},ie=Le=>{if(Le.length<3)return At(Le);let Ue=Le.length-1,[Qe,,_t]=y(Le);return _t[0]=Qe[0],_t[Ue]=Qe[Ue-1],N(Le,_t,Qe)},fe=Le=>{if(Le.length<3)return At(Le);let Ue=Le.length-1,[Qe,_t,wt]=y(Le);return _t[0]=(Le[1]*2-Le[0]*1.5-Le[2]*.5)*Ue,_t[Ue]=(Le[Ue]*1.5-Le[Ue-1]*2+Le[Ue-2]*.5)*Ue,wt[0]=_t[0]*Qe[0]<=0?0:pe(_t[0])>2*pe(Qe[0])?2*Qe[0]:_t[0],wt[Ue]=_t[Ue]*Qe[Ue-1]<=0?0:pe(_t[Ue])>2*pe(Qe[Ue-1])?2*Qe[Ue-1]:_t[Ue],N(Le,wt,Qe)},be=Le=>{let Ue=Le.length-1,[Qe,_t,wt]=y(Le);_t[0]=.5*(Le[1]-Le[Ue])*Ue,_t[Ue]=.5*(Le[0]-Le[Ue-1])*Ue;let Lt=(Le[0]-Le[Ue])*Ue,pr=Lt;return wt[0]=(di(Lt)+di(Qe[0]))*uo(pe(Lt),pe(Qe[0]),.5*pe(_t[0])),wt[Ue]=(di(Qe[Ue-1])+di(pr))*uo(pe(Qe[Ue-1]),pe(pr),.5*pe(_t[Ue])),N(Le,wt,Qe)},Re=(Le=1)=>Le===1?Ue=>Ue:Ue=>Math.pow(Ue,Le),je=Re,Ze=(Le=2,Ue=1)=>{let Qe=je(Ue);if(Le<2)return Le<1?[]:[Qe(.5)];let _t=[];for(let wt=0;wt{let Ue={mode:Le.mode,r:Math.max(0,Math.min(Le.r!==void 0?Le.r:0,1)),g:Math.max(0,Math.min(Le.g!==void 0?Le.g:0,1)),b:Math.max(0,Math.min(Le.b!==void 0?Le.b:0,1))};return Le.alpha!==void 0&&(Ue.alpha=Le.alpha),Ue},Gt=Le=>Dt(ft(Le)),Kt=Le=>Le!==void 0&&(Le.r===void 0||Le.r>=0&&Le.r<=1)&&(Le.g===void 0||Le.g>=0&&Le.g<=1)&&(Le.b===void 0||Le.b>=0&&Le.b<=1);function st(Le){return Kt(ft(Le))}function It(Le="rgb"){let{gamut:Ue}=se(Le);if(!Ue)return _t=>!0;let Qe=P(typeof Ue=="string"?Ue:Le);return _t=>Kt(Qe(_t))}function Ut(Le){return Le=B(Le),Le===void 0||st(Le)?Le:P(Le.mode)(Gt(Le))}function ir(Le="rgb"){let{gamut:Ue}=se(Le);if(!Ue)return Lt=>B(Lt);let Qe=typeof Ue=="string"?Ue:Le,_t=P(Qe),wt=It(Qe);return Lt=>{let pr=B(Lt);if(!pr)return;let Gr=_t(pr);if(wt(Gr))return pr;let va=Dt(Gr);return pr.mode===va.mode?va:P(pr.mode)(va)}}function dr(Le,Ue="lch",Qe="rgb"){Le=B(Le);let _t=Qe==="rgb"?st:It(Qe),wt=Qe==="rgb"?Gt:ir(Qe);if(Le===void 0||_t(Le))return Le;let Lt=P(Le.mode);Le=P(Ue)(Le);let pr=lo(Li({},Le),{c:0});if(!_t(pr))return Lt(wt(pr));let Gr=0,va=Le.c!==void 0?Le.c:0,Qa=se(Ue).ranges.c,Ga=(Qa[1]-Qa[0])/Math.pow(2,13),Ua=pr.c;for(;va-Gr>Ga;)pr.c=Gr+(va-Gr)*.5,_t(pr)?(Ua=pr.c,Gr=pr.c):va=pr.c;return Lt(_t(pr)?pr:lo(Li({},pr),{c:Ua}))}function Ar(Le="rgb",Ue="oklch",Qe=Yn("oklch"),_t=.02){let wt=P(Le),Lt=se(Le);if(!Lt.gamut)return Ga=>wt(Ga);let pr=It(Le),Gr=ir(Le),va=P(Ue),{ranges:Qa}=se(Ue);if(!Qa.l||!Qa.c)throw new Error("LCH-like space expected");return Ga=>{if(Ga=B(Ga),Ga===void 0)return;let Ua=Li({},va(Ga));if(Ua.l===void 0&&(Ua.l=0),Ua.c===void 0&&(Ua.c=0),Ua.l>=Qa.l[1]){let Bn=lo(Li({},Lt.white),{mode:Le});return Ga.alpha!==void 0&&(Bn.alpha=Ga.alpha),Bn}if(Ua.l<=Qa.l[0]){let Bn=lo(Li({},Lt.black),{mode:Le});return Ga.alpha!==void 0&&(Bn.alpha=Ga.alpha),Bn}if(pr(Ua))return wt(Ua);let An=0,dn=Ua.c,_n=(Qa.c[1]-Qa.c[0])/4e3,Mn=Gr(Ua);for(;dn-An>_n;)Ua.c=(An+dn)*.5,Mn=Gr(Ua),pr(Ua)||Qe&&_t>0&&Qe(Ua,Mn)<=_t?An=Ua.c:dn=Ua.c;return wt(pr(Ua)?Ua:Mn)}}var hr=(Le,Ue=Yn(),Qe=_t=>_t)=>{let _t=Le.map((wt,Lt)=>({color:Qe(wt),i:Lt}));return(wt,Lt=1,pr=1/0)=>(isFinite(Lt)&&(Lt=Math.max(1,Math.min(Lt,_t.length-1))),_t.forEach(Gr=>{Gr.d=Ue(wt,Gr.color)}),_t.sort((Gr,va)=>Gr.d-va.d).slice(0,Lt).filter(Gr=>Gr.dLe[Gr.i]))},vr=hr,Or=Le=>Math.max(Le,0),Cr=Le=>Math.max(Math.min(Le,1),0),ta=(Le,Ue,Qe)=>Le===void 0||Ue===void 0?void 0:Le+Qe*(Ue-Le),ka=Le=>{let Ue=1-Cr(Le);return[.393+.607*Ue,.769-.769*Ue,.189-.189*Ue,0,.349-.349*Ue,.686+.314*Ue,.168-.168*Ue,0,.272-.272*Ue,.534-.534*Ue,.131+.869*Ue,0,0,0,0,1]},Ta=Le=>{let Ue=Or(Le);return[.213+.787*Ue,.715-.715*Ue,.072-.072*Ue,0,.213-.213*Ue,.715+.285*Ue,.072-.072*Ue,0,.213-.213*Ue,.715-.715*Ue,.072+.928*Ue,0,0,0,0,1]},Ra=Le=>{let Ue=1-Cr(Le);return[.2126+.7874*Ue,.7152-.7152*Ue,.0722-.0722*Ue,0,.2126-.2126*Ue,.7152+.2848*Ue,.0722-.0722*Ue,0,.2126-.2126*Ue,.7152-.7152*Ue,.0722+.9278*Ue,0,0,0,0,1]},ua=Le=>{let Ue=Math.PI*Le/180,Qe=Math.cos(Ue),_t=Math.sin(Ue);return[.213+Qe*.787-_t*.213,.715-Qe*.715-_t*.715,.072-Qe*.072+_t*.928,0,.213-Qe*.213+_t*.143,.715+Qe*.285+_t*.14,.072-Qe*.072-_t*.283,0,.213-Qe*.213-_t*.787,.715-Qe*.715+_t*.715,.072+Qe*.928+_t*.072,0,0,0,0,1]},ia=(Le,Ue,Qe=!1)=>{let _t=P(Ue),wt=se(Ue).channels;return Lt=>{let pr=_t(Lt);if(!pr)return;let Gr={mode:Ue},va,Qa=wt.length;for(let Ua=0;Ua{let Qe=Or(Le);return tt(Nt(Qe),Ue,!0)},da=(Le=1,Ue="rgb")=>{let Qe=Or(Le);return tt(Nt(Qe,(1-Qe)/2),Ue,!0)},Fa=(Le=1,Ue="rgb")=>ia(ka(Le),Ue,!0),za=(Le=1,Ue="rgb")=>ia(Ta(Le),Ue,!0),kn=(Le=1,Ue="rgb")=>ia(Ra(Le),Ue,!0),Dn=(Le=1,Ue="rgb")=>{let Qe=Cr(Le);return tt((_t,wt)=>wt==="alpha"?_t:ta(Qe,1-Qe,_t),Ue,!0)},ui=(Le=0,Ue="rgb")=>ia(ua(Le),Ue,!0),cn=P("rgb"),sn=[[1,0,-0,0,1,0,-0,-0,1],[.856167,.182038,-.038205,.029342,.955115,.015544,-.00288,-.001563,1.004443],[.734766,.334872,-.069637,.05184,.919198,.028963,-.004928,-.004209,1.009137],[.630323,.465641,-.095964,.069181,.890046,.040773,-.006308,-.007724,1.014032],[.539009,.579343,-.118352,.082546,.866121,.051332,-.007136,-.011959,1.019095],[.458064,.679578,-.137642,.092785,.846313,.060902,-.007494,-.016807,1.024301],[.38545,.769005,-.154455,.100526,.829802,.069673,-.007442,-.02219,1.029632],[.319627,.849633,-.169261,.106241,.815969,.07779,-.007025,-.028051,1.035076],[.259411,.923008,-.18242,.110296,.80434,.085364,-.006276,-.034346,1.040622],[.203876,.990338,-.194214,.112975,.794542,.092483,-.005222,-.041043,1.046265],[.152286,1.052583,-.204868,.114503,.786281,.099216,-.003882,-.048116,1.051998]],ei=[[1,0,-0,0,1,0,-0,-0,1],[.866435,.177704,-.044139,.049567,.939063,.01137,-.003453,.007233,.99622],[.760729,.319078,-.079807,.090568,.889315,.020117,-.006027,.013325,.992702],[.675425,.43385,-.109275,.125303,.847755,.026942,-.00795,.018572,.989378],[.605511,.52856,-.134071,.155318,.812366,.032316,-.009376,.023176,.9862],[.547494,.607765,-.155259,.181692,.781742,.036566,-.01041,.027275,.983136],[.498864,.674741,-.173604,.205199,.754872,.039929,-.011131,.030969,.980162],[.457771,.731899,-.18967,.226409,.731012,.042579,-.011595,.034333,.977261],[.422823,.781057,-.203881,.245752,.709602,.044646,-.011843,.037423,.974421],[.392952,.82361,-.216562,.263559,.69021,.046232,-.01191,.040281,.97163],[.367322,.860646,-.227968,.280085,.672501,.047413,-.01182,.04294,.968881]],Pn=[[1,0,-0,0,1,0,-0,-0,1],[.92667,.092514,-.019184,.021191,.964503,.014306,.008437,.054813,.93675],[.89572,.13333,-.02905,.029997,.9454,.024603,.013027,.104707,.882266],[.905871,.127791,-.033662,.026856,.941251,.031893,.01341,.148296,.838294],[.948035,.08949,-.037526,.014364,.946792,.038844,.010853,.193991,.795156],[1.017277,.027029,-.044306,-.006113,.958479,.047634,.006379,.248708,.744913],[1.104996,-.046633,-.058363,-.032137,.971635,.060503,.001336,.317922,.680742],[1.193214,-.109812,-.083402,-.058496,.97941,.079086,-.002346,.403492,.598854],[1.257728,-.139648,-.118081,-.078003,.975409,.102594,-.003316,.501214,.502102],[1.278864,-.125333,-.153531,-.084748,.957674,.127074,-989e-6,.601151,.399838],[1.255528,-.076749,-.178779,-.078411,.930809,.147602,.004733,.691367,.3039]],Rn=(Le,Ue)=>{let Qe=Math.max(0,Math.min(1,Ue)),_t=Math.round(Qe/.1),wt=Math.round(Qe%.1),Lt=Le[_t];if(wt>0&&_tBe(Lt[va],pr[va],wt))}return pr=>{let Gr=B(pr);if(Gr===void 0)return;let{r:va,g:Qa,b:Ga}=cn(Gr),Ua={mode:"rgb",r:Lt[0]*va+Lt[1]*Qa+Lt[2]*Ga,g:Lt[3]*va+Lt[4]*Qa+Lt[5]*Ga,b:Lt[6]*va+Lt[7]*Qa+Lt[8]*Ga};return Gr.alpha!==void 0&&(Ua.alpha=Gr.alpha),P(Gr.mode)(Ua)}},In=(Le=1)=>Rn(sn,Le),Jn=(Le=1)=>Rn(ei,Le),Ei=(Le=1)=>Rn(Pn,Le),so=Le=>Le*Le*(3-2*Le),ti=Le=>.5-Math.sin(Math.asin(1-2*Le)/3),bi=Le=>Le*Le*Le*(Le*(Le*6-15)+10),Wi=bi,ro=Le=>(1-Math.cos(Le*Math.PI))/2,Mo=ro;function zs(Le){let Ue=P("lrgb")(Le);return .2126*Ue.r+.7152*Ue.g+.0722*Ue.b}function Bs(Le,Ue){let Qe=zs(Le),_t=zs(Ue);return(Math.max(Qe,_t)+.05)/(Math.min(Qe,_t)+.05)}var So=ne(Ht),Ws=ne(Dr),Zo=ne(go),es=ne(Ao),$o=ne(to),_s=ne(Vs),Go=ne(Pi),Ys=ne(dl),Ll=ne(bc),mo=ne(Qu),ru=ne(ju),Rs=ne(Sl),Yu=ne(oh),Ul=ne(nl),ql=ne(Kc),fo=ne(kl),Xo=ne(Cc),Os=ne(vc),ra=ne(ri),Ya=ne(Zi),Ka=ne(Yo),Bi=ne(ns),rs=ne(zl),Is=ne(oc),Oi=ne(Qc),Wr=ne(_r),na=ne(Bt),pa=ne(Wt),Wa=ne(la),ln=ne(Si)}}),av=ze({"src/plot_api/plot_config.js"(J,V){"use strict";var p={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},b={};function E(k,l){for(var e in k){var t=k[e];t.valType?l[e]=t.dflt:(l[e]||(l[e]={}),E(t,l[e]))}}E(p,b),V.exports={configAttributes:p,dfltConfig:b}}}),Pw=ze({"src/lib/notifier.js"(J,V){"use strict";var p=ci(),b=ao(),E=[];V.exports=function(k,l,e){var t;if(((t=e?._context)==null?void 0:t.displayNotifier)===!1||E.indexOf(k)!==-1)return;E.push(k);var n=1e3;b(l)?n=l:l==="long"&&(n=3e3);var r=p.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var a=r.selectAll(".notifier-note").data(E);function o(s){s.duration(700).style("opacity",0).each("end",function(c){var m=E.indexOf(c);m!==-1&&E.splice(m,1),p.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var c=p.select(this);c.append("button").classed("notifier-close",!0).html("×").on("click",function(){c.transition().call(o)});for(var m=c.append("p"),h=s.split(//g),v=0;v1){var l=["LOG:"];for(k=0;k1){var e=[];for(k=0;k"),"long")}},E.warn=function(){var k;if(p.logging>0){var l=["WARN:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}},E.error=function(){var k;if(p.logging>0){var l=["ERROR:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}}}}),fc=ze({"src/components/color/attributes.js"(J){"use strict";J.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],J.defaultLine="#444",J.lightLine="#eee",J.background="#fff",J.borderLine="#BEC8D9",J.lightFraction=100*10/11}}),Qn=ze({"src/components/color/index.js"(J,V){"use strict";var{converter:p,formatHex:b,formatRgb:E,wcagContrast:k,wcagLuminance:l}=UR(),{isArrayOrTypedArray:e}=Ff(),{warn:t}=ap(),{background:n,defaultLine:r,defaults:a,lightLine:o}=fc(),s=p("rgb"),c=p("hsl"),m=q=>{if(typeof q!="string")return;let Z=q.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(Z))try{return s(Z)}catch{return}},h=q=>q>0?q>1?1:q:0,v={mode:"rgb",r:0,g:0,b:0,alpha:1},g=q=>Math.round(q*255e6)/255e6,i=q=>lo(Li({},q),{r:g(q.r),g:g(q.g),b:g(q.b)}),w=q=>E(i(q)),S=q=>b(i(q)),M=(q,Z)=>{var ee;let ae=m(q);return ae?((ee=ae.alpha)!=null||(ae.alpha=1),ae):(!Z&&q!=null&&t(`Invalid color specifier: "${q}". Defaulting to "#000"`),v)},C=q=>w(lo(Li({},M(q)),{alpha:1})),_=q=>q?M(q).alpha:0,T=q=>e(q)&&q.length>2&&Number.isFinite(q[0])&&Number.isFinite(q[1])&&Number.isFinite(q[2]),f=q=>{let[Z,ee,ae,he]=q,xe=Math.max(Z,ee,ae)>1?1/255:1,we=he??1;return{mode:"rgb",r:Z*xe,g:ee*xe,b:ae*xe,alpha:we>1?we/255:we}},u=(q,Z)=>{let ee=T(q)?f(q):M(q,!0),ae=[h(ee.r),h(ee.g),h(ee.b),h(ee.alpha)];return Z==="uint8"||Z==="uint8_clamped"?Uint8Array.from(ae,he=>Math.round(he*255)):Z==="float32"?Float32Array.from(ae):Z==="float64"?Float64Array.from(ae):ae},A=(q,Z)=>w(lo(Li({},M(q)),{alpha:h(Z)})),x=(q,Z)=>{let ee=M(q),ae=ee.alpha;if(ae===1)return w(ee);let he=M(Z||n),xe=he.alpha,we=(Me,Se)=>(xe===1?Se:1-xe+Se*xe)*(1-ae)+Me*ae;return w({mode:"rgb",r:we(ee.r,he.r),g:we(ee.g,he.g),b:we(ee.b,he.b)})},z=(q,Z,ee)=>{let ae=M(q),he=M(Z),xe=(we,Me)=>ee*we+(1-ee)*Me;return w({mode:"rgb",r:xe(ae.r,he.r),g:xe(ae.g,he.g),b:xe(ae.b,he.b)})},I=(q,Z)=>{let ee=M(q),ae=c(ee)||{mode:"hsl",h:0,s:0,l:0};return w(s(lo(Li({},ae),{l:h((ae.l*100+Z)/100),alpha:ee.alpha})))},O=(q,Z)=>k(M(q),M(Z)),D=q=>O(q,n)>O(q,r),B=w(M(n)),F=w(M(r)),P=(q,Z,ee)=>(M(q).alpha!==1&&(q=x(q,n)),D(q)?Z?I(q,Z):B:ee?I(q,-ee):F),j=(q,Z)=>{q.style({stroke:C(Z),"stroke-opacity":M(Z).alpha})},U=(q,Z)=>{q.style({fill:C(Z),"fill-opacity":M(Z).alpha})},$=(q,Z)=>!!(q&&Z&&C(q)===C(Z)),Q=q=>m(q)!==void 0,re=(q,Z)=>{Z=Z===0?0:Z||10;let ee=M(q),ae=Z/100;return w(lo(Li({},ee),{r:h(ee.r+ae),g:h(ee.g+ae),b:h(ee.b+ae)}))},ne=(q,Z,ee)=>{let ae=M(q),he=M(Z),xe=ee/100,we=he.alpha-ae.alpha,Me=2*xe-1,Se=((Me*we===-1?Me:(Me+we)/(1+Me*we))+1)/2,Ie=1-Se,Ve=(Ge,ke)=>Ie*Ge+Se*ke;return w({mode:"rgb",r:Ve(ae.r,he.r),g:Ve(ae.g,he.g),b:Ve(ae.b,he.b),alpha:ae.alpha*(1-xe)+he.alpha*xe})},se=(q,Z=["#000","#fff"])=>{let ee,ae=-1/0;for(let he of Z){let xe=O(q,he);xe>ae&&(ae=xe,ee=w(M(he)))}return ee},G=q=>w(M(q)),X=q=>S(M(q)).toUpperCase(),K=q=>{let Z=M(q);return[h(Z.r)*255,h(Z.g)*255,h(Z.b)*255,h(Z.alpha)]},H=([q,Z,ee,ae])=>w({mode:"rgb",r:q/255,g:Z/255,b:ee/255,alpha:ae}),Y=q=>{let Z=M(q);return l({mode:"rgb",r:h(Z.r),g:h(Z.g),b:h(Z.b)})};V.exports={addOpacity:A,adjustLightness:I,background:n,brighten:re,combine:x,contrast:P,defaultLine:r,defaults:a,equals:$,fill:U,hexString:X,interpolate:z,isChannelArray:T,isDark:D,isValid:Q,lightLine:o,luminosity:Y,mix:ne,mostReadable:se,normalize:u,opacity:_,parse:M,rgb:C,rgbaArray:K,rgbaArrayToString:H,rgbaString:G,stroke:j,wcagContrast:O}}}),Bv=ze({"src/components/colorscale/scales.js"(J,V){"use strict";var p=Qn(),b={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},E=b.RdBu;function k(t,n){if(n||(n=E),!t)return n;function r(){try{t=b[t]||JSON.parse(t)}catch{t=n}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),l(t)?t:n}function l(t){var n=0;if(!Array.isArray(t)||t.length<2||!t[0]||!t[t.length-1]||+t[0][0]!=0||+t[t.length-1][0]!=1)return!1;for(var r=0;rqR});function qR(J,V="",p,b){let E=V+(p?"":"$"),k=b===!1?"":"^";return J==="xy"?new RegExp(k+"x"+n1+"y"+n1+E):new RegExp(k+J+n1+E)}var n1,Vm=zi({"src/lib/regex.ts"(){"use strict";n1="([2-9]|[1-9][0-9]+)?"}}),VR=ze({"src/lib/coerce.js"(J){"use strict";var V=ao(),p=Ki().extendFlat,b=ws(),E=Bv(),k=Qn(),l=np().DESELECTDIM,e=r1(),t=(Vm(),Po(Ov)).counter,n=(Um(),Po(zv)).modHalf,r=Ff().isArrayOrTypedArray,a=Ff().isTypedArraySpec,o=Ff().decodeTypedArraySpec;J.valObjectMeta={data_array:{coerceFunction:function(c,m,h){m.set(r(c)?c:a(c)?o(c):h)}},enumerated:{coerceFunction:function(c,m,h,v){v.coerceNumber&&(c=+c),v.values.indexOf(c)===-1?m.set(h):m.set(c)},validateFunction:function(c,m){m.coerceNumber&&(c=+c);for(var h=m.values,v=0;vi===!0||i===!1;g(c)||v.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(g)?m.set(c):m.set(h)}},number:{coerceFunction:function(c,m,h,v){a(c)&&(c=o(c)),!V(c)||v.min!==void 0&&cv.max?m.set(h):m.set(+c)}},integer:{coerceFunction:function(c,m,h,v){if((v.extras||[]).indexOf(c)!==-1){m.set(c);return}a(c)&&(c=o(c)),c%1||!V(c)||v.min!==void 0&&cv.max?m.set(h):m.set(+c)}},string:{coerceFunction:function(c,m,h,v){if(typeof c!="string"){var g=typeof c=="number";v.strict===!0||!g?m.set(h):m.set(String(c))}else v.noBlank&&!c?m.set(h):m.set(c)}},color:{coerceFunction:function(c,m,h){a(c)&&(c=o(c)),k.isValid(c)?m.set(c):m.set(h)}},colorlist:{coerceFunction:function(c,m,h){!Array.isArray(c)||!c.length?m.set(h):c.every(v=>k.isValid(v))?m.set(c):m.set(h)}},colorscale:{coerceFunction:function(c,m,h){m.set(E.get(c,h))}},angle:{coerceFunction:function(c,m,h){a(c)&&(c=o(c)),c==="auto"?m.set("auto"):V(c)?m.set(n(+c,360)):m.set(h)}},subplotid:{coerceFunction:function(c,m,h,v){var g=v.regex||t(h);let i=w=>typeof w=="string"&&g.test(w);i(c)||v.arrayOk&&r(c)&&c.length>0&&c.every(i)?m.set(c):m.set(h)},validateFunction:function(c,m){var h=m.dflt;return c===h?!0:typeof c!="string"?!1:!!t(h).test(c)}},flaglist:{coerceFunction:function(c,m,h,v){if((v.extras||[]).indexOf(c)!==-1){m.set(c);return}if(typeof c!="string"){m.set(h);return}for(var g=c.split("+"),i=0;iLi({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.texttemplateAttrs=({editType:k="calc",arrayOk:l}={},e={})=>Li({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.shapeTexttemplateAttrs=({editType:k="arraydraw",newshape:l}={},e={})=>({valType:"string",dflt:"",editType:k}),J.templatefallbackAttrs=({editType:k="none"}={})=>({valType:"any",dflt:"-",editType:k})}}),Sx=ze({"src/components/shapes/label_texttemplate.js"(J,V){"use strict";function p(M,C){return C?C.d2l(M):M}function b(M,C){return C?C.l2d(M):M}function E(M){return M.x0}function k(M){return M.x1}function l(M){return M.y0}function e(M){return M.y1}function t(M){return M.x0shift||0}function n(M){return M.x1shift||0}function r(M){return M.y0shift||0}function a(M){return M.y1shift||0}function o(M,C){return p(M.x1,C)+n(M)-p(M.x0,C)-t(M)}function s(M,C,_){return p(M.y1,_)+a(M)-p(M.y0,_)-r(M)}function c(M,C){return Math.abs(o(M,C))}function m(M,C,_){return Math.abs(s(M,C,_))}function h(M,C,_){return M.type!=="line"?void 0:Math.sqrt(Math.pow(o(M,C),2)+Math.pow(s(M,C,_),2))}function v(M,C){return b((p(M.x1,C)+n(M)+p(M.x0,C)+t(M))/2,C)}function g(M,C,_){return b((p(M.y1,_)+a(M)+p(M.y0,_)+r(M))/2,_)}function i(M,C,_){return M.type!=="line"?void 0:s(M,C,_)/o(M,C)}var w=["x0","x1","y0","y1","dy","height","ycenter"],S=["x0","x1","y0","y1","dx","width","xcenter"];V.exports={x0:E,x1:k,y0:l,y1:e,slope:i,dx:o,dy:s,width:c,height:m,length:h,xcenter:v,ycenter:g,simpleXVariables:w,simpleYVariables:S}}}),yI=ze({"src/components/shapes/draw_newshape/attributes.js"(J,V){"use strict";var p=Al().overrideAll,b=ws(),E=Qs(),k=Uc().dash,l=Ki().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Sx();V.exports=p({newshape:{visible:l({},b.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:l({},b.legend,{}),legendgroup:l({},b.legendgroup,{}),legendgrouptitle:{text:l({},b.legendgrouptitle.text,{}),font:E({})},legendrank:l({},b.legendrank,{}),legendwidth:l({},b.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:l({},k,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:l({},b.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(n)}),texttemplatefallback:t({editType:"arraydraw"}),font:E({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),_I=ze({"src/components/selections/draw_newselection/attributes.js"(J,V){"use strict";var p=Uc().dash,b=Ki().extendFlat;V.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:b({},p,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),Ex=ze({"src/plots/pad_attributes.js"(J,V){"use strict";V.exports=function(p){var b=p.editType;return{t:{valType:"number",dflt:0,editType:b},r:{valType:"number",dflt:0,editType:b},b:{valType:"number",dflt:0,editType:b},l:{valType:"number",dflt:0,editType:b},editType:b}}}}),Gm=ze({"src/plots/layout_attributes.js"(J,V){"use strict";var p=Qs(),b=o1(),E=fc(),k=yI(),l=_I(),e=Ex(),t=Ki().extendFlat,n=p({editType:"calc"});n.family.dflt='"Open Sans", verdana, arial, sans-serif',n.size.dflt=12,n.color.dflt=E.defaultLine,V.exports={font:n,title:{text:{valType:"string",editType:"layoutstyle"},font:p({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:p({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:t(e({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:E.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:E.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:E.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:k.newshape,activeshape:k.activeshape,newselection:l.newselection,activeselection:l.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:t({},b.transition,{editType:"none"})}}}),xI=ze({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var J=document.createElement("style");J.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",J.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(J)}})()}}),mi=ze({"src/registry.js"(J){"use strict";var V=ap(),p=Ax(),b=Rw(),E=i1().addStyleRule,k=Ki(),l=ws(),e=Gm(),t=k.extendFlat,n=k.extendDeepAll;J.modules={},J.allCategories={},J.allTypes=[],J.subplotsRegistry={},J.componentsRegistry={},J.layoutArrayContainers=[],J.layoutArrayRegexes=[],J.traceLayoutAttributes={},J.localeRegistry={},J.apiMethodRegistry={},J.collectableSubplotTypes=null,J.register=function(i){if(J.collectableSubplotTypes=null,i)i&&!Array.isArray(i)&&(i=[i]);else throw new Error("No argument passed to Plotly.register.");for(var w=0;w=i&&D<=w?D:l}if(typeof D!="string"&&typeof D!="number")return l;D=String(D);var U=v(B),$=D.charAt(0);U&&($==="G"||$==="g")&&(D=D.slice(1),B="");var Q=U&&B.slice(0,7)==="chinese",re=D.match(Q?m:c);if(!re)return l;var ne=re[1],se=re[3]||"1",G=Number(re[5]||1),X=Number(re[7]||0),K=Number(re[9]||0),H=Number(re[11]||0);if(U){if(ne.length===2)return l;ne=Number(ne);var Y;try{var q=o.getComponentMethod("calendars","getCal")(B);if(Q){var Z=se.charAt(se.length-1)==="i";se=parseInt(se,10),Y=q.newDate(ne,q.toMonthIndex(ne,se,Z),G)}else Y=q.newDate(ne,Number(se),G)}catch{return l}return Y?(Y.toJD()-a)*e+X*t+K*n+H*r:l}ne.length===2?ne=(Number(ne)+2e3-h)%100+h:ne=Number(ne),se-=1;var ee=new Date(Date.UTC(2e3,se,G,X,K));return ee.setUTCFullYear(ne),ee.getUTCMonth()!==se||ee.getUTCDate()!==G?l:ee.getTime()+H*r},i=J.MIN_MS=J.dateTime2ms("-9999"),w=J.MAX_MS=J.dateTime2ms("9999-12-31 23:59:59.9999"),J.isDateTime=function(D,B){return J.dateTime2ms(D,B)!==l};function S(D,B){return String(D+Math.pow(10,B)).slice(1)}var M=90*e,C=3*t,_=5*n;J.ms2DateTime=function(D,B,F){if(typeof D!="number"||!(D>=i&&D<=w))return l;B||(B=0);var P=Math.floor(E(D+.05,1)*10),j=Math.round(D-P/10),U,$,Q,re,ne,se;if(v(F)){var G=Math.floor(j/e)+a,X=Math.floor(E(D,e));try{U=o.getComponentMethod("calendars","getCal")(F).fromJD(G).formatDate("yyyy-mm-dd")}catch{U=s("G%Y-%m-%d")(new Date(j))}if(U.charAt(0)==="-")for(;U.length<11;)U="-0"+U.slice(1);else for(;U.length<10;)U="0"+U;$=B=i+e&&D<=w-e))return l;var B=Math.floor(E(D+.05,1)*10),F=new Date(Math.round(D-B/10)),P=V("%Y-%m-%d")(F),j=F.getHours(),U=F.getMinutes(),$=F.getSeconds(),Q=F.getUTCMilliseconds()*10+B;return T(P,j,U,$,Q)};function T(D,B,F,P,j){if((B||F||P||j)&&(D+=" "+S(B,2)+":"+S(F,2),(P||j)&&(D+=":"+S(P,2),j))){for(var U=4;j%10===0;)U-=1,j/=10;D+="."+S(j,U)}return D}J.cleanDate=function(D,B,F){if(D===l)return B;if(J.isJSDate(D)||typeof D=="number"&&isFinite(D)){if(v(F))return b.error("JS Dates and milliseconds are incompatible with world calendars",D),B;if(D=J.ms2DateTimeLocal(+D),!D&&B!==void 0)return B}else if(!J.isDateTime(D,F))return b.error("unrecognized date",D),B;return D};var f=/%\d?f/g,u=/%h/g,A={1:"1",2:"1",3:"2",4:"2"};function x(D,B,F,P){D=D.replace(f,function(U){var $=Math.min(+U.charAt(1)||6,6),Q=(B/1e3%1+2).toFixed($).slice(2).replace(/0+$/,"")||"0";return Q});var j=new Date(Math.floor(B+.05));if(D=D.replace(u,function(){return A[F("%q")(j)]}),v(P))try{D=o.getComponentMethod("calendars","worldCalFmt")(D,B,P)}catch{return"Invalid"}return F(D)(j)}var z=[59,59.9,59.99,59.999,59.9999];function I(D,B){var F=E(D+.05,e),P=S(Math.floor(F/t),2)+":"+S(E(Math.floor(F/n),60),2);if(B!=="M"){p(B)||(B=0);var j=Math.min(E(D/r,60),z[B]),U=(100+j).toFixed(B).slice(1);B>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),P+=":"+U}return P}J.formatDate=function(D,B,F,P,j,U){if(j=v(j)&&j,!B)if(F==="y")B=U.year;else if(F==="m")B=U.month;else if(F==="d")B=U.dayMonth+` +`||Ue[q]===" "||Ue[q]===" ");)q++;continue}if(_t===",")return;if(_t===")"){Qe.push({type:X.ParenClose});continue}if(_t==="+"){if(q--,W(Ue)){Qe.push(he(Ue));continue}return}if(_t==="-"){if(q--,W(Ue)){Qe.push(he(Ue));continue}if(ee(Ue)){Qe.push({type:X.Ident,value:we(Ue)});continue}return}if(_t==="."){if(q--,W(Ue)){Qe.push(he(Ue));continue}return}if(_t==="/"){for(;q4)){if(Qe.length===4){if(Qe[3].type!==X.Alpha)return;Qe[3]=Qe[3].value}return Qe.length===3&&Qe.push({type:X.None,value:void 0}),Qe.every(wt=>wt.type!==X.Alpha)?Qe:void 0}}function qe(Le,Ue){Le._i=0;let Qe=Le[Le._i++];if(!Qe||Qe.type!==X.Function)return;let _t=Ge(Le,Ue);if(_t)return _t.unshift(Qe.value),_t}var ke=Le=>{if(typeof Le!="string")return;let Ue=Se(Le),Qe=Ue?qe(Ue,!0):void 0,_t,wt=0,Lt=$.length;for(;wtLe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Ae=le,Be=(Le,Ue,Qe)=>Le+Qe*(Ue-Le),Xe=(Le,Ue,Qe)=>(Qe-Le)/(Ue-Le),Ye=(Le,Ue,Qe,_t,wt,Lt)=>Be(Be(Le,Ue,wt),Be(Qe,_t,wt),Lt),yt=(Le,Ue,Qe,_t,wt,Lt,pr,Gr,va,Qa,Ga)=>Be(Ye(Le,Ue,Qe,_t,va,Qa),Ye(wt,Lt,pr,Gr,va,Qa),Ga),gt=Le=>{let Ue=[];for(let Qe=0;QeUe=>{let Qe=gt(Ue);return _t=>{let wt=_t*Qe.length,Lt=_t>=1?Qe.length-1:Math.max(Math.floor(wt),0),pr=Qe[Lt];return pr===void 0?void 0:Le(pr[0],pr[1],wt-Lt)}},At=Tt(Be),$t=Le=>{let Ue=!1,Qe=Le.map(_t=>_t!==void 0?(Ue=!0,_t):1);return Ue?Qe:Le},rr={mode:"rgb",channels:["r","g","b","alpha"],parse:[ve,m,O,g,Ae,"srgb"],serialize:"srgb",interpolate:{r:At,g:At,b:At,alpha:{use:At,fixup:$t}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},_r=rr,Xt=(Le=0)=>Math.pow(Math.abs(Le),563/256)*Math.sign(Le),or=Le=>{let Ue=Xt(Le.r),Qe=Xt(Le.g),_t=Xt(Le.b),wt={mode:"xyz65",x:.5766690429101305*Ue+.1855582379065463*Qe+.1882286462349947*_t,y:.297344975250536*Ue+.6273635662554661*Qe+.0752914584939979*_t,z:.0270313613864123*Ue+.0706888525358272*Qe+.9913375368376386*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Ot=or,vt=Le=>Math.pow(Math.abs(Le),256/563)*Math.sign(Le),ht=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"a98",r:vt(Le*2.0415879038107465-Ue*.5650069742788597-.3447313507783297*Qe),g:vt(Le*-.9692436362808798+Ue*1.8759675015077206+.0415550574071756*Qe),b:vt(Le*.0134442806320312-Ue*.1183623922310184+1.0151749943912058*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},De=ht,Ne=(Le=0)=>{let Ue=Math.abs(Le);return Ue<=.04045?Le/12.92:(Math.sign(Le)||1)*Math.pow((Ue+.055)/1.055,2.4)},We=({r:Le,g:Ue,b:Qe,alpha:_t})=>{let wt={mode:"lrgb",r:Ne(Le),g:Ne(Ue),b:Ne(Qe)};return _t!==void 0&&(wt.alpha=_t),wt},Ke=We,Je=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz65",x:.4123907992659593*Ue+.357584339383878*Qe+.1804807884018343*_t,y:.2126390058715102*Ue+.715168678767756*Qe+.0721923153607337*_t,z:.0193308187155918*Ue+.119194779794626*Qe+.9505321522496607*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},et=Je,Mt=(Le=0)=>{let Ue=Math.abs(Le);return Ue>.0031308?(Math.sign(Le)||1)*(1.055*Math.pow(Ue,1/2.4)-.055):Le*12.92},pt=({r:Le,g:Ue,b:Qe,alpha:_t},wt="rgb")=>{let Lt={mode:wt,r:Mt(Le),g:Mt(Ue),b:Mt(Qe)};return _t!==void 0&&(Lt.alpha=_t),Lt},Pt=pt,Ct=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*3.2409699419045226-Ue*1.537383177570094-.4986107602930034*Qe,g:Le*-.9692436362808796+Ue*1.8759675015077204+.0415550574071756*Qe,b:Le*.0556300796969936-Ue*.2039769588889765+1.0569715142428784*Qe});return _t!==void 0&&(wt.alpha=_t),wt},qt=Ct,Vt=lo(Li({},_r),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:Le=>De(et(Le)),xyz65:De},toMode:{rgb:Le=>qt(Ot(Le)),xyz65:Ot}}),Ht=Vt,Sr=Le=>(Le=Le%360)<0?Le+360:Le,Kr=Sr,Yt=(Le,Ue)=>Le.map((Qe,_t,wt)=>{if(Qe===void 0)return Qe;let Lt=Kr(Qe);return _t===0||Le[_t-1]===void 0?Lt:Ue(Lt-Kr(wt[_t-1]))}).reduce((Qe,_t)=>!Qe.length||_t===void 0||Qe[Qe.length-1]===void 0?(Qe.push(_t),Qe):(Qe.push(_t+Qe[Qe.length-1]),Qe),[]),Rt=Le=>Yt(Le,Ue=>Math.abs(Ue)<=180?Ue:Ue-360*Math.sign(Ue)),nr=Le=>Yt(Le,Ue=>Math.abs(Ue)>=180||Ue===0?Ue:Ue-360*Math.sign(Ue)),ur=Le=>Yt(Le,Ue=>Ue>=0?Ue:Ue+360),cr=Le=>Yt(Le,Ue=>Ue<=0?Ue:Ue-360),Rr=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Qr=Math.PI/180,Zr=180/Math.PI,ha=Rr[3]*Rr[4],Pa=Rr[1]*Rr[4],La=Rr[1]*Rr[2]-Rr[0]*Rr[3],un=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(La*Qe+Le*ha-Ue*Pa)/(La+ha-Pa),Lt=Qe-wt,pr=(Rr[4]*(Ue-wt)-Rr[2]*Lt)/Rr[3],Gr={mode:"cubehelix",l:wt,s:wt===0||wt===1?void 0:Math.sqrt(Lt*Lt+pr*pr)/(Rr[4]*wt*(1-wt))};return Gr.s&&(Gr.h=Math.atan2(pr,Lt)*Zr-120),_t!==void 0&&(Gr.alpha=_t),Gr},Xa=un,ja=({h:Le,s:Ue,l:Qe,alpha:_t})=>{let wt={mode:"rgb"};Le=(Le===void 0?0:Le+120)*Qr,Qe===void 0&&(Qe=0);let Lt=Ue===void 0?0:Ue*Qe*(1-Qe),pr=Math.cos(Le),Gr=Math.sin(Le);return wt.r=Qe+Lt*(Rr[0]*pr+Rr[1]*Gr),wt.g=Qe+Lt*(Rr[2]*pr+Rr[3]*Gr),wt.b=Qe+Lt*(Rr[4]*pr+Rr[5]*Gr),_t!==void 0&&(wt.alpha=_t),wt},Nn=ja,yn=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0||!Le.s||!Ue.s)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h),wt=Math.sin((_t-Qe+360)/2*Math.PI/180);return 2*Math.sqrt(Le.s*Ue.s)*wt},Un=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h);return Math.abs(_t-Qe)>180?Qe-(_t-360*Math.sign(_t-Qe)):_t-Qe},li=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0||!Le.c||!Ue.c)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h),wt=Math.sin((_t-Qe+360)/2*Math.PI/180);return 2*Math.sqrt(Le.c*Ue.c)*wt},Yn=(Le="rgb",Ue=[1,1,1,0])=>{let Qe=se(Le),_t=Qe.channels,wt=Qe.difference,Lt=P(Le);return(pr,Gr)=>{let va=Lt(pr),Qa=Lt(Gr);return Math.sqrt(_t.reduce((Ga,Ua,An)=>{let dn=wt[Ua]?wt[Ua](va,Qa):va[Ua]-Qa[Ua];return Ga+(Ue[An]||0)*Math.pow(isNaN(dn)?0:dn,2)},0))}},on=()=>Yn("lab65"),en=(Le=1,Ue=.045,Qe=.015)=>{let _t=P("lab65");return(wt,Lt)=>{let pr=_t(wt),Gr=_t(Lt),va=pr.l,Qa=pr.a,Ga=pr.b,Ua=Math.sqrt(Qa*Qa+Ga*Ga),An=Gr.l,dn=Gr.a,_n=Gr.b,Mn=Math.sqrt(dn*dn+_n*_n),Bn=Math.pow(va-An,2),Zn=Math.pow(Ua-Mn,2),Ci=Math.pow(Qa-dn,2)+Math.pow(Ga-_n,2)-Zn;return Math.sqrt(Bn/Math.pow(Le,2)+Zn/Math.pow(1+Ue*Ua,2)+Ci/Math.pow(1+Qe*Ua,2))}},vi=(Le=1,Ue=1,Qe=1)=>{let _t=P("lab65");return(wt,Lt)=>{let pr=_t(wt),Gr=_t(Lt),va=pr.l,Qa=pr.a,Ga=pr.b,Ua=Math.sqrt(Qa*Qa+Ga*Ga),An=Gr.l,dn=Gr.a,_n=Gr.b,Mn=Math.sqrt(dn*dn+_n*_n),Bn=(Ua+Mn)/2,Zn=.5*(1-Math.sqrt(Math.pow(Bn,7)/(Math.pow(Bn,7)+Math.pow(25,7)))),Ci=Qa*(1+Zn),qo=dn*(1+Zn),As=Math.sqrt(Ci*Ci+Ga*Ga),ls=Math.sqrt(qo*qo+_n*_n),Vl=Math.abs(Ci)+Math.abs(Ga)===0?0:Math.atan2(Ga,Ci);Vl+=(Vl<0)*2*Math.PI;let au=Math.abs(qo)+Math.abs(_n)===0?0:Math.atan2(_n,qo);au+=(au<0)*2*Math.PI;let Lu=An-va,uh=ls-As,wh=As*ls===0?0:au-Vl;wh-=(wh>Math.PI)*2*Math.PI,wh+=(wh<-Math.PI)*2*Math.PI;let Gh=2*Math.sqrt(As*ls)*Math.sin(wh/2),Gd=(va+An)/2,Ad=(As+ls)/2,ch;As*ls===0?ch=Vl+au:(ch=(Vl+au)/2,ch-=(Math.abs(Vl-au)>Math.PI)*Math.PI,ch+=(ch<0)*2*Math.PI);let Mv=Math.pow(Gd-50,2),vp=1-.17*Math.cos(ch-Math.PI/6)+.24*Math.cos(2*ch)+.32*Math.cos(3*ch+Math.PI/30)-.2*Math.cos(4*ch-63*Math.PI/180),mp=1+.015*Mv/Math.sqrt(20+Mv),gp=1+.045*Ad,yp=1+.015*Ad*vp,x1=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*ch-275)/25,2)),p0=2*Math.sqrt(Math.pow(Ad,7)/(Math.pow(Ad,7)+Math.pow(25,7))),Md=-1*Math.sin(2*x1)*p0;return Math.sqrt(Math.pow(Lu/(Le*mp),2)+Math.pow(uh/(Ue*gp),2)+Math.pow(Gh/(Qe*yp),2)+Md*uh/(Ue*gp)*Gh/(Qe*yp))}},Yi=(Le=1,Ue=1)=>{let Qe=P("lab65");return(_t,wt)=>{let Lt=Qe(_t),pr=Lt.l,Gr=Lt.a,va=Lt.b,Qa=Math.sqrt(Gr*Gr+va*va),Ga=Math.atan2(va,Gr);Ga=Ga+2*Math.PI*(Ga<0);let Ua=Qe(wt),An=Ua.l,dn=Ua.a,_n=Ua.b,Mn=Math.sqrt(dn*dn+_n*_n),Bn=Math.pow(pr-An,2),Zn=Math.pow(Qa-Mn,2),Ci=Math.pow(Gr-dn,2)+Math.pow(va-_n,2)-Zn,qo=Math.sqrt(Math.pow(Qa,4)/(Math.pow(Qa,4)+1900)),As=Ga>=164/180*Math.PI&&Ga<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(Ga+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(Ga+35/180*Math.PI)),ls=pr<16?.511:.040975*pr/(1+.01765*pr),Vl=.0638*Qa/(1+.0131*Qa)+.638,au=Vl*(qo*As+1-qo);return Math.sqrt(Bn/Math.pow(Le*ls,2)+Zn/Math.pow(Ue*Vl,2)+Ci/Math.pow(au,2))}},Ja=()=>{let Le=P("lab65");return(Ue,Qe)=>{let _t=Le(Ue),wt=Le(Qe),Lt=_t.l-wt.l,pr=_t.a-wt.a,Gr=_t.b-wt.b;return Math.abs(Lt)+Math.sqrt(pr*pr+Gr*Gr)}},Oa=()=>Yn("yiq",[.5053,.299,.1957]),lt=()=>Yn("itp",[518400,129600,518400]),rt=Le=>{let Ue=Le.reduce((_t,wt)=>{if(wt!==void 0){let Lt=wt*Math.PI/180;_t.sin+=Math.sin(Lt),_t.cos+=Math.cos(Lt)}return _t},{sin:0,cos:0}),Qe=Math.atan2(Ue.sin,Ue.cos)*180/Math.PI;return Qe<0?360+Qe:Qe},fr=Le=>{let Ue=Le.filter(Qe=>Qe!==void 0);return Ue.length?Ue.reduce((Qe,_t)=>Qe+_t,0)/Ue.length:void 0},lr=Le=>typeof Le=="function";function Tr(Le,Ue="rgb",Qe){let _t=se(Ue),wt=Le.map(P(Ue));return _t.channels.reduce((Lt,pr)=>{let Gr=wt.map(va=>va[pr]).filter(va=>va!==void 0);if(Gr.length){let va;lr(Qe)?va=Qe:Qe&&lr(Qe[pr])?va=Qe[pr]:_t.average&&lr(_t.average[pr])?va=_t.average[pr]:va=fr,Lt[pr]=va(Gr,pr)}return Lt},{mode:Ue})}var Ir={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Xa},toMode:{rgb:Nn},interpolate:{h:{use:At,fixup:Rt},s:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:yn},average:{h:rt}},Dr=Ir,ot=({l:Le,a:Ue,b:Qe,alpha:_t},wt="lch")=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let Lt=Math.sqrt(Ue*Ue+Qe*Qe),pr={mode:wt,l:Le,c:Lt};return Lt&&(pr.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(pr.alpha=_t),pr},kt=ot,jt=({l:Le,c:Ue,h:Qe,alpha:_t},wt="lab")=>{Qe===void 0&&(Qe=0);let Lt={mode:wt,l:Le,a:Ue?Ue*Math.cos(Qe/180*Math.PI):0,b:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(Lt.alpha=_t),Lt},ar=jt,Er=Math.pow(29,3)/Math.pow(3,3),xr=Math.pow(6,3)/Math.pow(29,3),zr={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Lr={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},aa=Math.pow(29,3)/Math.pow(3,3),Sa=Math.pow(6,3)/Math.pow(29,3),wa=Le=>Math.pow(Le,3)>xr?Math.pow(Le,3):(116*Le-16)/Er,pn=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+16)/116,Lt=Ue/500+wt,pr=wt-Qe/200,Gr={mode:"xyz65",x:wa(Lt)*Lr.X,y:wa(wt)*Lr.Y,z:wa(pr)*Lr.Z};return _t!==void 0&&(Gr.alpha=_t),Gr},tn=pn,ai=Le=>qt(tn(Le)),rn=ai,Ri=Le=>Le>xr?Math.cbrt(Le):(Er*Le+16)/116,Gn=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ri(Le/Lr.X),Lt=Ri(Ue/Lr.Y),pr=Ri(Qe/Lr.Z),Gr={mode:"lab65",l:116*Lt-16,a:500*(wt-Lt),b:200*(Lt-pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},no=Gn,Di=Le=>{let Ue=no(et(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},fn=Di,Ai=1,jn=1,Xn=26/180*Math.PI,eo=Math.cos(Xn),gi=Math.sin(Xn),qi=100/Math.log(139/100),io=({l:Le,c:Ue,h:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"lab65",l:(Math.exp(Le*Ai/qi)-1)/.0039},Lt=(Math.exp(.0435*Ue*jn*Ai)-1)/.075,pr=Lt*Math.cos(Qe/180*Math.PI-Xn),Gr=Lt*Math.sin(Qe/180*Math.PI-Xn);return wt.a=pr*eo-Gr/.83*gi,wt.b=pr*gi+Gr/.83*eo,_t!==void 0&&(wt.alpha=_t),wt},oo=io,Vn=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ue*eo+Qe*gi,Lt=.83*(Qe*eo-Ue*gi),pr=Math.sqrt(wt*wt+Lt*Lt),Gr={mode:"dlch",l:qi/Ai*Math.log(1+.0039*Le),c:Math.log(1+.075*pr)/(.0435*jn*Ai)};return Gr.c&&(Gr.h=Kr((Math.atan2(Lt,wt)+Xn)/Math.PI*180)),_t!==void 0&&(Gr.alpha=_t),Gr},qn=Vn,Hi=Le=>oo(kt(Le,"dlch")),Mi=Le=>ar(qn(Le),"dlab"),Ro={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Hi,rgb:Le=>rn(Hi(Le))},fromMode:{lab65:Mi,rgb:Le=>Mi(fn(Le))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:$t}}},go=Ro,Eo={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:oo,dlab:Le=>ar(Le,"dlab"),rgb:Le=>rn(oo(Le))},fromMode:{lab65:qn,dlab:Le=>kt(Le,"dlch"),rgb:Le=>qn(fn(Le))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:At,c:At,h:{use:At,fixup:Rt},alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},Ao=Eo;function ds({h:Le,s:Ue,i:Qe,alpha:_t}){Le=Kr(Le!==void 0?Le:0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.abs(Le/60%2-1),Lt;switch(Math.floor(Le/60)){case 0:Lt={r:Qe*(1+Ue*(3/(2-wt)-1)),g:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),b:Qe*(1-Ue)};break;case 1:Lt={r:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),g:Qe*(1+Ue*(3/(2-wt)-1)),b:Qe*(1-Ue)};break;case 2:Lt={r:Qe*(1-Ue),g:Qe*(1+Ue*(3/(2-wt)-1)),b:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1))};break;case 3:Lt={r:Qe*(1-Ue),g:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),b:Qe*(1+Ue*(3/(2-wt)-1))};break;case 4:Lt={r:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),g:Qe*(1-Ue),b:Qe*(1+Ue*(3/(2-wt)-1))};break;case 5:Lt={r:Qe*(1+Ue*(3/(2-wt)-1)),g:Qe*(1-Ue),b:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1))};break;default:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue),b:Qe*(1-Ue)}}return Lt.mode="rgb",_t!==void 0&&(Lt.alpha=_t),Lt}function jo({r:Le,g:Ue,b:Qe,alpha:_t}){Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.max(Le,Ue,Qe),Lt=Math.min(Le,Ue,Qe),pr={mode:"hsi",s:Le+Ue+Qe===0?0:1-3*Lt/(Le+Ue+Qe),i:(Le+Ue+Qe)/3};return wt-Lt!==0&&(pr.h=(wt===Le?(Ue-Qe)/(wt-Lt)+(Ue{switch(Ue){case"deg":return+Le;case"rad":return Le/Math.PI*180;case"grad":return Le/10*9;case"turn":return Le*360}},Io=Vi,Zi=new RegExp(`^hsla?\\(\\s*${w}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),Ko=Le=>{let Ue=Le.match(Zi);if(!Ue)return;let Qe={mode:"hsl"};return Ue[3]!==void 0?Qe.h=+Ue[3]:Ue[1]!==void 0&&Ue[2]!==void 0&&(Qe.h=Io(Ue[1],Ue[2])),Ue[4]!==void 0&&(Qe.s=Math.min(Math.max(0,Ue[4]/100),1)),Ue[5]!==void 0&&(Qe.l=Math.min(Math.max(0,Ue[5]/100),1)),Ue[6]!==void 0?Qe.alpha=Math.max(0,Math.min(1,Ue[6]/100)):Ue[7]!==void 0&&(Qe.alpha=Math.max(0,Math.min(1,+Ue[7]))),Qe},Uo=Ko;function Ls(Le,Ue){if(!Ue||Ue[0]!=="hsl"&&Ue[0]!=="hsla")return;let Qe={mode:"hsl"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==X.None){if(_t.type===X.Percentage)return;Qe.h=_t.value}if(wt.type!==X.None){if(wt.type===X.Hue)return;Qe.s=wt.value/100}if(Lt.type!==X.None){if(Lt.type===X.Hue)return;Qe.l=Lt.value/100}return pr.type!==X.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===X.Number?pr.value:pr.value/100))),Qe}var Ss=Ls,Vo={mode:"hsl",toMode:{rgb:wo},fromMode:{rgb:pi},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Ss,Uo],serialize:Le=>`hsl(${Le.h!==void 0?Le.h:"none"} ${Le.s!==void 0?Le.s*100+"%":"none"} ${Le.l!==void 0?Le.l*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},s:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:yn},average:{h:rt}},Vs=Vo;function Ts({h:Le,s:Ue,v:Qe,alpha:_t}){Le=Kr(Le!==void 0?Le:0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.abs(Le/60%2-1),Lt;switch(Math.floor(Le/60)){case 0:Lt={r:Qe,g:Qe*(1-Ue*wt),b:Qe*(1-Ue)};break;case 1:Lt={r:Qe*(1-Ue*wt),g:Qe,b:Qe*(1-Ue)};break;case 2:Lt={r:Qe*(1-Ue),g:Qe,b:Qe*(1-Ue*wt)};break;case 3:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue*wt),b:Qe};break;case 4:Lt={r:Qe*(1-Ue*wt),g:Qe*(1-Ue),b:Qe};break;case 5:Lt={r:Qe,g:Qe*(1-Ue),b:Qe*(1-Ue*wt)};break;default:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue),b:Qe*(1-Ue)}}return Lt.mode="rgb",_t!==void 0&&(Lt.alpha=_t),Lt}function Bo({r:Le,g:Ue,b:Qe,alpha:_t}){Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.max(Le,Ue,Qe),Lt=Math.min(Le,Ue,Qe),pr={mode:"hsv",s:wt===0?0:1-Lt/wt,v:wt};return wt-Lt!==0&&(pr.h=(wt===Le?(Ue-Qe)/(wt-Lt)+(Ue1){let wt=Ue+Qe;Ue/=wt,Qe/=wt}return Ts({h:Le,s:Qe===1?1:1-Ue/(1-Qe),v:1-Qe,alpha:_t})}function bs(Le){let Ue=Bo(Le);if(Ue===void 0)return;let Qe=Ue.s!==void 0?Ue.s:0,_t=Ue.v!==void 0?Ue.v:0,wt={mode:"hwb",w:(1-Qe)*_t,b:1-_t};return Ue.h!==void 0&&(wt.h=Ue.h),Ue.alpha!==void 0&&(wt.alpha=Ue.alpha),wt}function Dl(Le,Ue){if(!Ue||Ue[0]!=="hwb")return;let Qe={mode:"hwb"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==X.None){if(_t.type===X.Percentage)return;Qe.h=_t.value}if(wt.type!==X.None){if(wt.type===X.Hue)return;Qe.w=wt.value/100}if(Lt.type!==X.None){if(Lt.type===X.Hue)return;Qe.b=Lt.value/100}return pr.type!==X.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===X.Number?pr.value:pr.value/100))),Qe}var hl=Dl,ps={mode:"hwb",toMode:{rgb:yo},fromMode:{rgb:bs},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[hl],serialize:Le=>`hwb(${Le.h!==void 0?Le.h:"none"} ${Le.w!==void 0?Le.w*100+"%":"none"} ${Le.b!==void 0?Le.b*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},w:At,b:At,alpha:{use:At,fixup:$t}},difference:{h:Un},average:{h:rt}},dl=ps,wu=203,lu=.1593017578125,xc=78.84375,Fl=.8359375,pl=18.8515625,$u=18.6875;function uu(Le){if(Le<0)return 0;let Ue=Math.pow(Le,1/xc);return 1e4*Math.pow(Math.max(0,Ue-Fl)/(pl-$u*Ue),1/lu)}function tl(Le){if(Le<0)return 0;let Ue=Math.pow(Le/1e4,lu);return Math.pow((Fl+pl*Ue)/(1+$u*Ue),xc)}var vs=Le=>Math.max(Le/wu,0),os=({i:Le,t:Ue,p:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=uu(Le+.008609037037932761*Ue+.11102962500302593*Qe),Lt=uu(Le-.00860903703793275*Ue-.11102962500302599*Qe),pr=uu(Le+.5600313357106791*Ue-.32062717498731885*Qe),Gr={mode:"xyz65",x:vs(2.070152218389422*wt-1.3263473389671556*Lt+.2066510476294051*pr),y:vs(.3647385209748074*wt+.680566024947227*Lt-.0453045459220346*pr),z:vs(-.049747207535812*wt-.0492609666966138*Lt+1.1880659249923042*pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},ms=os,rl=(Le=0)=>Math.max(Le*wu,0),Fu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{let wt=rl(Le),Lt=rl(Ue),pr=rl(Qe),Gr=tl(.3592832590121217*wt+.6976051147779502*Lt-.0358915932320289*pr),va=tl(-.1920808463704995*wt+1.1004767970374323*Lt+.0753748658519118*pr),Qa=tl(.0070797844607477*wt+.0748396662186366*Lt+.8433265453898765*pr),Ga=.5*Gr+.5*va,Ua=1.61376953125*Gr-3.323486328125*va+1.709716796875*Qa,An=4.378173828125*Gr-4.24560546875*va-.132568359375*Qa,dn={mode:"itp",i:Ga,t:Ua,p:An};return _t!==void 0&&(dn.alpha=_t),dn},zu=Fu,Ku={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:ms,rgb:Le=>qt(ms(Le))},fromMode:{xyz65:zu,rgb:Le=>zu(et(Le))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:At,t:At,p:At,alpha:{use:At,fixup:$t}}},bc=Ku,Lh=134.03437499999998,rh=16295499532821565e-27,Ju=Le=>{if(Le<0)return 0;let Ue=Math.pow(Le/1e4,lu);return Math.pow((Fl+pl*Ue)/(1+$u*Ue),Lh)},ss=(Le=0)=>Math.max(Le*203,0),ah=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le=ss(Le),Ue=ss(Ue),Qe=ss(Qe);let wt=1.15*Le-.15*Qe,Lt=.66*Ue+.34*Le,pr=Ju(.41478972*wt+.579999*Lt+.014648*Qe),Gr=Ju(-.20151*wt+1.120649*Lt+.0531008*Qe),va=Ju(-.0166008*wt+.2648*Lt+.6684799*Qe),Qa=(pr+Gr)/2,Ga={mode:"jab",j:.44*Qa/(1-.56*Qa)-rh,a:3.524*pr-4.066708*Gr+.542708*va,b:.199076*pr+1.096799*Gr-1.295875*va};return _t!==void 0&&(Ga.alpha=_t),Ga},wc=ah,pc=134.03437499999998,Nf=16295499532821565e-27,Bu=Le=>{if(Le<0)return 0;let Ue=Math.pow(Le,1/pc);return 1e4*Math.pow((Fl-Ue)/($u*Ue-pl),1/lu)},Tc=Le=>Le/203,Ou=({j:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+Nf)/(.44+.56*(Le+Nf)),Lt=Bu(wt+.13860504*Ue+.058047316*Qe),pr=Bu(wt-.13860504*Ue-.058047316*Qe),Gr=Bu(wt-.096019242*Ue-.8118919*Qe),va={mode:"xyz65",x:Tc(1.661373024652174*Lt-.914523081304348*pr+.23136208173913045*Gr),y:Tc(-.3250758611844533*Lt+1.571847026732543*pr-.21825383453227928*Gr),z:Tc(-.090982811*Lt-.31272829*pr+1.5227666*Gr)};return _t!==void 0&&(va.alpha=_t),va},Gc=Ou,pf=Le=>{let Ue=wc(et(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},$l=pf,jf=Le=>qt(Gc(Le)),Hc=jf,Wc={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:$l,xyz65:wc},toMode:{rgb:Hc,xyz65:Gc},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:At,a:At,b:At,alpha:{use:At,fixup:$t}}},Qu=Wc,Yc=({j:Le,a:Ue,b:Qe,alpha:_t})=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.sqrt(Ue*Ue+Qe*Qe),Lt={mode:"jch",j:Le,c:wt};return wt&&(Lt.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(Lt.alpha=_t),Lt},Nu=Yc,Uf=({j:Le,c:Ue,h:Qe,alpha:_t})=>{Qe===void 0&&(Qe=0);let wt={mode:"jab",j:Le,a:Ue?Ue*Math.cos(Qe/180*Math.PI):0,b:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(wt.alpha=_t),wt},al=Uf,Xc={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:al,rgb:Le=>Hc(al(Le))},fromMode:{rgb:Le=>Nu($l(Le)),jab:Nu},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:At,fixup:Rt},c:At,j:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},ju=Xc,Ac=Math.pow(29,3)/Math.pow(3,3),Zc=Math.pow(6,3)/Math.pow(29,3),ec=Le=>Math.pow(Le,3)>Zc?Math.pow(Le,3):(116*Le-16)/Ac,cu=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+16)/116,Lt=Ue/500+wt,pr=wt-Qe/200,Gr={mode:"xyz50",x:ec(Lt)*zr.X,y:ec(wt)*zr.Y,z:ec(pr)*zr.Z};return _t!==void 0&&(Gr.alpha=_t),Gr},tc=cu,vf=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*3.1341359569958707-Ue*1.6173863321612538-.4906619460083532*Qe,g:Le*-.978795502912089+Ue*1.916254567259524+.03344273116131949*Qe,b:Le*.07195537988411677-Ue*.2289768264158322+1.405386058324125*Qe});return _t!==void 0&&(wt.alpha=_t),wt},Tu=vf,nh=Le=>Tu(tc(Le)),vl=nh,ml=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz50",x:.436065742824811*Ue+.3851514688337912*Qe+.14307845442264197*_t,y:.22249319175623702*Ue+.7168870538238823*Qe+.06061979053616537*_t,z:.013923904500943465*Ue+.09708128566574634*Qe+.7140993584005155*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},rc=ml,yl=Le=>Le>Zc?Math.cbrt(Le):(Ac*Le+16)/116,qf=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=yl(Le/zr.X),Lt=yl(Ue/zr.Y),pr=yl(Qe/zr.Z),Gr={mode:"lab",l:116*Lt-16,a:500*(wt-Lt),b:200*(Lt-pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},ac=qf,Mc=Le=>{let Ue=ac(rc(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},mf=Mc;function Jo(Le,Ue){if(!Ue||Ue[0]!=="lab")return;let Qe={mode:"lab"},[,_t,wt,Lt,pr]=Ue;if(!(_t.type===X.Hue||wt.type===X.Hue||Lt.type===X.Hue))return _t.type!==X.None&&(Qe.l=Math.min(Math.max(0,_t.value),100)),wt.type!==X.None&&(Qe.a=wt.type===X.Number?wt.value:wt.value*125/100),Lt.type!==X.None&&(Qe.b=Lt.type===X.Number?Lt.value:Lt.value*125/100),pr.type!==X.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===X.Number?pr.value:pr.value/100))),Qe}var ih=Jo,fu={mode:"lab",toMode:{xyz50:tc,rgb:vl},fromMode:{xyz50:ac,rgb:mf},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[ih],serialize:Le=>`lab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:$t}}},Sl=fu,El=lo(Li({},Sl),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:tn,rgb:rn},fromMode:{xyz65:no,rgb:fn},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),oh=El;function Au(Le,Ue){if(!Ue||Ue[0]!=="lch")return;let Qe={mode:"lch"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==X.None){if(_t.type===X.Hue)return;Qe.l=Math.min(Math.max(0,_t.value),100)}if(wt.type!==X.None&&(Qe.c=Math.max(0,wt.type===X.Number?wt.value:wt.value*150/100)),Lt.type!==X.None){if(Lt.type===X.Percentage)return;Qe.h=Lt.value}return pr.type!==X.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===X.Number?pr.value:pr.value/100))),Qe}var $c=Au,_l={mode:"lch",toMode:{lab:ar,rgb:Le=>vl(ar(Le))},fromMode:{rgb:Le=>kt(mf(Le)),lab:kt},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[$c],serialize:Le=>`lch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},c:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},nl=_l,gf=lo(Li({},nl),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:Le=>ar(Le,"lab65"),rgb:Le=>rn(ar(Le,"lab65"))},fromMode:{rgb:Le=>kt(fn(Le),"lch65"),lab65:Le=>kt(Le,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Kc=gf,sh=({l:Le,u:Ue,v:Qe,alpha:_t})=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.sqrt(Ue*Ue+Qe*Qe),Lt={mode:"lchuv",l:Le,c:wt};return wt&&(Lt.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(Lt.alpha=_t),Lt},hu=sh,Uu=({l:Le,c:Ue,h:Qe,alpha:_t})=>{Qe===void 0&&(Qe=0);let wt={mode:"luv",l:Le,u:Ue?Ue*Math.cos(Qe/180*Math.PI):0,v:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(wt.alpha=_t),wt},qu=Uu,nc=(Le,Ue,Qe)=>4*Le/(Le+15*Ue+3*Qe),yf=(Le,Ue,Qe)=>9*Ue/(Le+15*Ue+3*Qe),_f=nc(zr.X,zr.Y,zr.Z),Mu=yf(zr.X,zr.Y,zr.Z),ic=Le=>Le<=Zc?Ac*Le:116*Math.cbrt(Le)-16,Sc=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=ic(Ue/zr.Y),Lt=nc(Le,Ue,Qe),pr=yf(Le,Ue,Qe);!isFinite(Lt)||!isFinite(pr)?wt=Lt=pr=0:(Lt=13*wt*(Lt-_f),pr=13*wt*(pr-Mu));let Gr={mode:"luv",l:wt,u:Lt,v:pr};return _t!==void 0&&(Gr.alpha=_t),Gr},Vu=Sc,xo=(Le,Ue,Qe)=>4*Le/(Le+15*Ue+3*Qe),Ec=(Le,Ue,Qe)=>9*Ue/(Le+15*Ue+3*Qe),xh=xo(zr.X,zr.Y,zr.Z),Vf=Ec(zr.X,zr.Y,zr.Z),xf=({l:Le,u:Ue,v:Qe,alpha:_t})=>{if(Le===void 0&&(Le=0),Le===0)return{mode:"xyz50",x:0,y:0,z:0};Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ue/(13*Le)+xh,Lt=Qe/(13*Le)+Vf,pr=zr.Y*(Le<=8?Le/Ac:Math.pow((Le+16)/116,3)),Gr=pr*(9*wt)/(4*Lt),va=pr*(12-3*wt-20*Lt)/(4*Lt),Qa={mode:"xyz50",x:Gr,y:pr,z:va};return _t!==void 0&&(Qa.alpha=_t),Qa},Gf=xf,bh=Le=>hu(Vu(rc(Le))),Hf=Le=>Tu(Gf(qu(Le))),il={mode:"lchuv",toMode:{luv:qu,rgb:Hf},fromMode:{rgb:bh,luv:hu},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:At,fixup:Rt},c:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},kl=il,kc=lo(Li({},_r),{mode:"lrgb",toMode:{rgb:Pt},fromMode:{rgb:Ke},parse:["srgb-linear"],serialize:"srgb-linear"}),Cc=kc,Lc={mode:"luv",toMode:{xyz50:Gf,rgb:Le=>Tu(Gf(Le))},fromMode:{xyz50:Vu,rgb:Le=>Vu(rc(Le))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:At,u:At,v:At,alpha:{use:At,fixup:$t}}},vc=Lc,Ft=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.cbrt(.412221469470763*Le+.5363325372617348*Ue+.0514459932675022*Qe),Lt=Math.cbrt(.2119034958178252*Le+.6806995506452344*Ue+.1073969535369406*Qe),pr=Math.cbrt(.0883024591900564*Le+.2817188391361215*Ue+.6299787016738222*Qe),Gr={mode:"oklab",l:.210454268309314*wt+.7936177747023054*Lt-.0040720430116193*pr,a:1.9779985324311684*wt-2.42859224204858*Lt+.450593709617411*pr,b:.0259040424655478*wt+.7827717124575296*Lt-.8086757549230774*pr};return _t!==void 0&&(Gr.alpha=_t),Gr},tr=Ft,Fr=Le=>{let Ue=tr(Ke(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},wr=Fr,ea=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.pow(Le+.3963377773761749*Ue+.2158037573099136*Qe,3),Lt=Math.pow(Le-.1055613458156586*Ue-.0638541728258133*Qe,3),pr=Math.pow(Le-.0894841775298119*Ue-1.2914855480194092*Qe,3),Gr={mode:"lrgb",r:4.076741636075957*wt-3.3077115392580616*Lt+.2309699031821044*pr,g:-1.2684379732850317*wt+2.6097573492876887*Lt-.3413193760026573*pr,b:-.0041960761386756*wt-.7034186179359362*Lt+1.7076146940746117*pr};return _t!==void 0&&(Gr.alpha=_t),Gr},ba=ea,Ia=Le=>Pt(ba(Le)),Na=Ia;function Za(Le){let _t=1.170873786407767;return .5*(_t*Le-.206+Math.sqrt((_t*Le-.206)*(_t*Le-.206)+4*.03*_t*Le))}function mn(Le){return(Le*Le+.206*Le)/(1.170873786407767*(Le+.03))}function Da(Le,Ue){let Qe,_t,wt,Lt,pr,Gr,va,Qa;-1.88170328*Le-.80936493*Ue>1?(Qe=1.19086277,_t=1.76576728,wt=.59662641,Lt=.75515197,pr=.56771245,Gr=4.0767416621,va=-3.3077115913,Qa=.2309699292):1.81444104*Le-1.19445276*Ue>1?(Qe=.73956515,_t=-.45954404,wt=.08285427,Lt=.1254107,pr=.14503204,Gr=-1.2684380046,va=2.6097574011,Qa=-.3413193965):(Qe=1.35733652,_t=-.00915799,wt=-1.1513021,Lt=-.50559606,pr=.00692167,Gr=-.0041960863,va=-.7034186147,Qa=1.707614701);let Ga=Qe+_t*Le+wt*Ue+Lt*Le*Le+pr*Le*Ue,Ua=.3963377774*Le+.2158037573*Ue,An=-.1055613458*Le-.0638541728*Ue,dn=-.0894841775*Le-1.291485548*Ue;{let _n=1+Ga*Ua,Mn=1+Ga*An,Bn=1+Ga*dn,Zn=_n*_n*_n,Ci=Mn*Mn*Mn,qo=Bn*Bn*Bn,As=3*Ua*_n*_n,ls=3*An*Mn*Mn,Vl=3*dn*Bn*Bn,au=6*Ua*Ua*_n,Lu=6*An*An*Mn,uh=6*dn*dn*Bn,wh=Gr*Zn+va*Ci+Qa*qo,Gh=Gr*As+va*ls+Qa*Vl,Gd=Gr*au+va*Lu+Qa*uh;Ga=Ga-wh*Gh/(Gh*Gh-.5*wh*Gd)}return Ga}function Ha(Le,Ue){let Qe=Da(Le,Ue),_t=ba({l:1,a:Qe*Le,b:Qe*Ue}),wt=Math.cbrt(1/Math.max(_t.r,_t.g,_t.b)),Lt=wt*Qe;return[wt,Lt]}function $a(Le,Ue,Qe,_t,wt,Lt=null){Lt||(Lt=Ha(Le,Ue));let pr;if((Qe-wt)*Lt[1]-(Lt[0]-wt)*_t<=0)pr=Lt[1]*wt/(_t*Lt[0]+Lt[1]*(wt-Qe));else{pr=Lt[1]*(wt-1)/(_t*(Lt[0]-1)+Lt[1]*(wt-Qe));{let Gr=Qe-wt,va=_t,Qa=.3963377774*Le+.2158037573*Ue,Ga=-.1055613458*Le-.0638541728*Ue,Ua=-.0894841775*Le-1.291485548*Ue,An=Gr+va*Qa,dn=Gr+va*Ga,_n=Gr+va*Ua;{let Mn=wt*(1-pr)+pr*Qe,Bn=pr*_t,Zn=Mn+Bn*Qa,Ci=Mn+Bn*Ga,qo=Mn+Bn*Ua,As=Zn*Zn*Zn,ls=Ci*Ci*Ci,Vl=qo*qo*qo,au=3*An*Zn*Zn,Lu=3*dn*Ci*Ci,uh=3*_n*qo*qo,wh=6*An*An*Zn,Gh=6*dn*dn*Ci,Gd=6*_n*_n*qo,Ad=4.0767416621*As-3.3077115913*ls+.2309699292*Vl-1,ch=4.0767416621*au-3.3077115913*Lu+.2309699292*uh,Mv=4.0767416621*wh-3.3077115913*Gh+.2309699292*Gd,vp=ch/(ch*ch-.5*Ad*Mv),mp=-Ad*vp,gp=-1.2684380046*As+2.6097574011*ls-.3413193965*Vl-1,yp=-1.2684380046*au+2.6097574011*Lu-.3413193965*uh,x1=-1.2684380046*wh+2.6097574011*Gh-.3413193965*Gd,p0=yp/(yp*yp-.5*gp*x1),Md=-gp*p0,v0=-.0041960863*As-.7034186147*ls+1.707614701*Vl-1,m0=-.0041960863*au-.7034186147*Lu+1.707614701*uh,Hd=-.0041960863*wh-.7034186147*Gh+1.707614701*Gd,_p=m0/(m0*m0-.5*v0*Hd),b1=-v0*_p;mp=vp>=0?mp:1e6,Md=p0>=0?Md:1e6,b1=_p>=0?b1:1e6,pr+=Math.min(mp,Math.min(Md,b1))}}}return pr}function vn(Le,Ue,Qe=null){Qe||(Qe=Ha(Le,Ue));let _t=Qe[0],wt=Qe[1];return[wt/_t,wt/(1-_t)]}function Sn(Le,Ue,Qe){let _t=Ha(Ue,Qe),wt=$a(Ue,Qe,Le,1,Le,_t),Lt=vn(Ue,Qe,_t),pr=.11516993+1/(7.4477897+4.1590124*Qe+Ue*(-2.19557347+1.75198401*Qe+Ue*(-2.13704948-10.02301043*Qe+Ue*(-4.24894561+5.38770819*Qe+4.69891013*Ue)))),Gr=.11239642+1/(1.6132032-.68124379*Qe+Ue*(.40370612+.90148123*Qe+Ue*(-.27087943+.6122399*Qe+Ue*(.00299215-.45399568*Qe-.14661872*Ue)))),va=wt/Math.min(Le*Lt[0],(1-Le)*Lt[1]),Qa=Le*pr,Ga=(1-Le)*Gr,Ua=.9*va*Math.sqrt(Math.sqrt(1/(1/(Qa*Qa*Qa*Qa)+1/(Ga*Ga*Ga*Ga))));return Qa=Le*.4,Ga=(1-Le)*.8,[Math.sqrt(1/(1/(Qa*Qa)+1/(Ga*Ga))),Ua,wt]}function yi(Le){let Ue=Le.l!==void 0?Le.l:0,Qe=Le.a!==void 0?Le.a:0,_t=Le.b!==void 0?Le.b:0,wt={mode:"okhsl",l:Za(Ue)};Le.alpha!==void 0&&(wt.alpha=Le.alpha);let Lt=Math.sqrt(Qe*Qe+_t*_t);if(!Lt)return wt.s=0,wt;let[pr,Gr,va]=Sn(Ue,Qe/Lt,_t/Lt),Qa;if(Ltyi(wr(Le))},toMode:{oklab:_i,rgb:Le=>Na(_i(Le))}}),ri=ki;function En(Le){let Ue=Le.l!==void 0?Le.l:0,Qe=Le.a!==void 0?Le.a:0,_t=Le.b!==void 0?Le.b:0,wt=Math.sqrt(Qe*Qe+_t*_t),Lt=wt?Qe/wt:1,pr=wt?_t/wt:1,[Gr,va]=vn(Lt,pr),Qa=.5,Ga=1-Qa/Gr,Ua=va/(wt+Ue*va),An=Ua*Ue,dn=Ua*wt,_n=mn(An),Mn=dn*_n/An,Bn=ba({l:_n,a:Lt*Mn,b:pr*Mn}),Zn=Math.cbrt(1/Math.max(Bn.r,Bn.g,Bn.b,0));Ue=Ue/Zn,wt=wt/Zn*Za(Ue)/Ue,Ue=Za(Ue);let Ci={mode:"okhsv",s:wt?(Qa+va)*dn/(va*Qa+va*Ga*dn):0,v:Ue?Ue/An:0};return Ci.s&&(Ci.h=Kr(Math.atan2(_t,Qe)*180/Math.PI)),Le.alpha!==void 0&&(Ci.alpha=Le.alpha),Ci}function Ln(Le){let Ue={mode:"oklab"};Le.alpha!==void 0&&(Ue.alpha=Le.alpha);let Qe=Le.h!==void 0?Le.h:0,_t=Le.s!==void 0?Le.s:0,wt=Le.v!==void 0?Le.v:0,Lt=Math.cos(Qe/180*Math.PI),pr=Math.sin(Qe/180*Math.PI),[Gr,va]=vn(Lt,pr),Qa=.5,Ga=1-Qa/Gr,Ua=1-_t*Qa/(Qa+va-va*Ga*_t),An=_t*va*Qa/(Qa+va-va*Ga*_t),dn=mn(Ua),_n=An*dn/Ua,Mn=ba({l:dn,a:Lt*_n,b:pr*_n}),Bn=Math.cbrt(1/Math.max(Mn.r,Mn.g,Mn.b,0)),Zn=mn(wt*Ua),Ci=An*Zn/Ua;return Ue.l=Zn*Bn,Ue.a=Ci*Lt*Bn,Ue.b=Ci*pr*Bn,Ue}var Ni=lo(Li({},Pi),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:En,rgb:Le=>En(wr(Le))},toMode:{oklab:Ln,rgb:Le=>Na(Ln(Le))}}),$i=Ni;function Co(Le,Ue){if(!Ue||Ue[0]!=="oklab")return;let Qe={mode:"oklab"},[,_t,wt,Lt,pr]=Ue;if(!(_t.type===X.Hue||wt.type===X.Hue||Lt.type===X.Hue))return _t.type!==X.None&&(Qe.l=Math.min(Math.max(0,_t.type===X.Number?_t.value:_t.value/100),1)),wt.type!==X.None&&(Qe.a=wt.type===X.Number?wt.value:wt.value*.4/100),Lt.type!==X.None&&(Qe.b=Lt.type===X.Number?Lt.value:Lt.value*.4/100),pr.type!==X.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===X.Number?pr.value:pr.value/100))),Qe}var Do=Co,Fo=lo(Li({},Sl),{mode:"oklab",toMode:{lrgb:ba,rgb:Na},fromMode:{lrgb:tr,rgb:wr},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Do],serialize:Le=>`oklab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`}),Yo=Fo;function bo(Le,Ue){if(!Ue||Ue[0]!=="oklch")return;let Qe={mode:"oklch"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==X.None){if(_t.type===X.Hue)return;Qe.l=Math.min(Math.max(0,_t.type===X.Number?_t.value:_t.value/100),1)}if(wt.type!==X.None&&(Qe.c=Math.max(0,wt.type===X.Number?wt.value:wt.value*.4/100)),Lt.type!==X.None){if(Lt.type===X.Percentage)return;Qe.h=Lt.value}return pr.type!==X.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===X.Number?pr.value:pr.value/100))),Qe}var Gs=bo,Es=lo(Li({},nl),{mode:"oklch",toMode:{oklab:Le=>ar(Le,"oklab"),rgb:Le=>Na(ar(Le,"oklab"))},fromMode:{rgb:Le=>kt(wr(Le),"oklch"),oklab:Le=>kt(Le,"oklch")},parse:[Gs],serialize:Le=>`oklch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),ns=Es,Kn=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz65",x:.486570948648216*Ue+.265667693169093*Qe+.1982172852343625*_t,y:.2289745640697487*Ue+.6917385218365062*Qe+.079286914093745*_t,z:0*Ue+.0451133818589026*Qe+1.043944368900976*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},zo=Kn,gs=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*2.4934969119414263-Ue*.9313836179191242-.402710784450717*Qe,g:Le*-.8294889695615749+Ue*1.7626640603183465+.0236246858419436*Qe,b:Le*.0358458302437845-Ue*.0761723892680418+.9568845240076871*Qe},"p3");return _t!==void 0&&(wt.alpha=_t),wt},js=gs,Cl=lo(Li({},_r),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:Le=>js(et(Le)),xyz65:js},toMode:{rgb:Le=>qt(zo(Le)),xyz65:zo}}),zl=Cl,Kl=Le=>{let Ue=Math.abs(Le);return Ue>=1/512?Math.sign(Le)*Math.pow(Ue,1/1.8):16*Le},Gu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"prophoto",r:Kl(Le*1.3457868816471585-Ue*.2555720873797946-.0511018649755453*Qe),g:Kl(Le*-.5446307051249019+Ue*1.5082477428451466+.0205274474364214*Qe),b:Kl(Le*0+Ue*0+1.2119675456389452*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},xl=Gu,Hu=(Le=0)=>{let Ue=Math.abs(Le);return Ue>=16/512?Math.sign(Le)*Math.pow(Ue,1.8):Le/16},Su=Le=>{let Ue=Hu(Le.r),Qe=Hu(Le.g),_t=Hu(Le.b),wt={mode:"xyz50",x:.7977666449006423*Ue+.1351812974005331*Qe+.0313477341283922*_t,y:.2880748288194013*Ue+.7118352342418731*Qe+899369387256e-16*_t,z:0*Ue+0*Qe+.8251046025104602*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},mc=Su,Jc=lo(Li({},_r),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:xl,rgb:Le=>xl(rc(Le))},toMode:{xyz50:mc,rgb:Le=>Tu(mc(Le))}}),oc=Jc,du=1.09929682680944,Jl=.018053968510807,Ql=Le=>{let Ue=Math.abs(Le);return Ue>Jl?(Math.sign(Le)||1)*(du*Math.pow(Ue,.45)-(du-1)):4.5*Le},Eu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"rec2020",r:Ql(Le*1.7166511879712683-Ue*.3556707837763925-.2533662813736599*Qe),g:Ql(Le*-.6666843518324893+Ue*1.6164812366349395+.0157685458139111*Qe),b:Ql(Le*.0176398574453108-Ue*.0427706132578085+.9421031212354739*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},bf=Eu,lh=1.09929682680944,Pc=.018053968510807,Ks=(Le=0)=>{let Ue=Math.abs(Le);return Ue{let Ue=Ks(Le.r),Qe=Ks(Le.g),_t=Ks(Le.b),wt={mode:"xyz65",x:.6369580483012911*Ue+.1446169035862083*Qe+.1688809751641721*_t,y:.262700212011267*Ue+.6779980715188708*Qe+.059301716469862*_t,z:0*Ue+.0280726930490874*Qe+1.0609850577107909*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Wu=Bl,wf=lo(Li({},_r),{mode:"rec2020",fromMode:{xyz65:bf,rgb:Le=>bf(et(Le))},toMode:{xyz65:Wu,rgb:Le=>qt(Wu(Le))},parse:["rec2020"],serialize:"rec2020"}),Qc=wf,ku=.0037930732552754493,Ol=Math.cbrt(ku),Nl=Le=>Math.cbrt(Le)-Ol,fi=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt=Nl(.3*Ue+.622*Qe+.078*_t+ku),pr=Nl(.23*Ue+.692*Qe+.078*_t+ku),Gr=Nl(.2434226892454782*Ue+.2047674442449682*Qe+.5518098665095535*_t+ku),va={mode:"xyb",x:(Lt-pr)/2,y:(Lt+pr)/2,b:Gr-(Lt+pr)/2};return wt!==void 0&&(va.alpha=wt),va},eu=fi,$e=Le=>Math.pow(Le+Ol,3),nt=({x:Le,y:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=$e(Le+Ue)-ku,Lt=$e(Ue-Le)-ku,pr=$e(Qe+Ue)-ku,Gr=Pt({r:11.031566904639861*wt-9.866943908131562*Lt-.16462299650829934*pr,g:-3.2541473810744237*wt+4.418770377582723*Lt-.16462299650829934*pr,b:-3.6588512867136815*wt+2.7129230459360922*Lt+1.9459282407775895*pr});return _t!==void 0&&(Gr.alpha=_t),Gr},mt=nt,xt={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:mt},fromMode:{rgb:eu},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:At,y:At,b:At,alpha:{use:At,fixup:$t}}},Bt=xt,zt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Tu,lab:ac},fromMode:{rgb:rc,lab:tc},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:$t}}},Wt=zt,Pr=Le=>{let{x:Ue,y:Qe,z:_t,alpha:wt}=Le;Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0),_t===void 0&&(_t=0);let Lt={mode:"xyz50",x:1.0479298208405488*Ue+.0229467933410191*Qe-.0501922295431356*_t,y:.0296278156881593*Ue+.990434484573249*Qe-.0170738250293851*_t,z:-.0092430581525912*Ue+.0150551448965779*Qe+.7518742899580008*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},Br=Pr,kr=Le=>{let{x:Ue,y:Qe,z:_t,alpha:wt}=Le;Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0),_t===void 0&&(_t=0);let Lt={mode:"xyz65",x:.9554734527042182*Ue-.0230985368742614*Qe+.0632593086610217*_t,y:-.0283697069632081*Ue+1.0099954580058226*Qe+.021041398966943*_t,z:.0123140016883199*Ue-.0205076964334779*Qe+1.3303659366080753*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},jr=kr,Jr={mode:"xyz65",toMode:{rgb:qt,xyz50:Br},fromMode:{rgb:et,xyz50:jr},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:$t}}},la=Jr,xa=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"yiq",y:.29889531*Le+.58662247*Ue+.11448223*Qe,i:.59597799*Le-.2741761*Ue-.32180189*Qe,q:.21147017*Le-.52261711*Ue+.31114694*Qe};return _t!==void 0&&(wt.alpha=_t),wt},Ba=xa,an=({y:Le,i:Ue,q:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"rgb",r:Le+.95608445*Ue+.6208885*Qe,g:Le-.27137664*Ue-.6486059*Qe,b:Le-1.10561724*Ue+1.70250126*Qe};return _t!==void 0&&(wt.alpha=_t),wt},wn=an,ii={mode:"yiq",toMode:{rgb:wn},fromMode:{rgb:Ba},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:At,i:At,q:At,alpha:{use:At,fixup:$t}}},Si=ii,oi=(Le,Ue)=>Math.round(Le*(Ue=Math.pow(10,Ue)))/Ue,Ji=(Le=4)=>Ue=>typeof Ue=="number"?oi(Ue,Le):Ue,Qi=Ji,Oo=Qi(2),Qo=Le=>Math.max(0,Math.min(1,Le||0)),vo=Le=>Math.round(Qo(Le)*255),ys=P("rgb"),ol=P("hsl"),jl=Le=>{if(Le===void 0)return;let Ue=vo(Le.r),Qe=vo(Le.g),_t=vo(Le.b);return"#"+(1<<24|Ue<<16|Qe<<8|_t).toString(16).slice(1)},Hs=Le=>{if(Le===void 0)return;let Ue=vo(Le.alpha!==void 0?Le.alpha:1);return jl(Le)+(256|Ue).toString(16).slice(1)},Cu=Le=>{if(Le===void 0)return;let Ue=vo(Le.r),Qe=vo(Le.g),_t=vo(Le.b);return Le.alpha===void 0||Le.alpha===1?`rgb(${Ue}, ${Qe}, ${_t})`:`rgba(${Ue}, ${Qe}, ${_t}, ${Oo(Qo(Le.alpha))})`},hi=Le=>{if(Le===void 0)return;let Ue=Oo(Le.h||0),Qe=Oo(Qo(Le.s)*100)+"%",_t=Oo(Qo(Le.l)*100)+"%";return Le.alpha===void 0||Le.alpha===1?`hsl(${Ue}, ${Qe}, ${_t})`:`hsla(${Ue}, ${Qe}, ${_t}, ${Oo(Qo(Le.alpha))})`},wi=Le=>{let Ue=B(Le);if(!Ue)return;let Qe=se(Ue.mode);if(!Qe.serialize||typeof Qe.serialize=="string"){let _t=`color(${Qe.serialize||`--${Ue.mode}`} `;return Qe.channels.forEach((wt,Lt)=>{wt!=="alpha"&&(_t+=(Lt?" ":"")+(Ue[wt]!==void 0?Ue[wt]:"none"))}),Ue.alpha!==void 0&&Ue.alpha<1&&(_t+=` / ${Ue.alpha}`),_t+")"}if(typeof Qe.serialize=="function")return Qe.serialize(Ue)},sl=Le=>jl(ys(Le)),sc=Le=>Hs(ys(Le)),tu=Le=>Cu(ys(Le)),Ps=Le=>hi(ol(Le)),gc={normal:(Le,Ue)=>Ue,multiply:(Le,Ue)=>Le*Ue,screen:(Le,Ue)=>Le+Ue-Le*Ue,"hard-light":(Le,Ue)=>Ue<.5?Le*2*Ue:2*Ue*(1-Le)-1,overlay:(Le,Ue)=>Le<.5?Ue*2*Le:2*Le*(1-Ue)-1,darken:(Le,Ue)=>Math.min(Le,Ue),lighten:(Le,Ue)=>Math.max(Le,Ue),"color-dodge":(Le,Ue)=>Le===0?0:Ue===1?1:Math.min(1,Le/(1-Ue)),"color-burn":(Le,Ue)=>Le===1?1:Ue===0?0:1-Math.min(1,(1-Le)/Ue),"soft-light":(Le,Ue)=>Ue<.5?Le-(1-2*Ue)*Le*(1-Le):Le+(2*Ue-1)*((Le<.25?((16*Le-12)*Le+4)*Le:Math.sqrt(Le))-Le),difference:(Le,Ue)=>Math.abs(Le-Ue),exclusion:(Le,Ue)=>Le+Ue-2*Le*Ue},pu=(Le,Ue="normal",Qe="rgb")=>{let _t=typeof Ue=="function"?Ue:gc[Ue],wt=P(Qe),Lt=se(Qe).channels;return Le.map(Gr=>{let va=wt(Gr);return va.alpha===void 0&&(va.alpha=1),va}).reduce((Gr,va)=>{if(Gr===void 0)return va;let Qa=va.alpha+Gr.alpha*(1-va.alpha);return Lt.reduce((Ga,Ua)=>(Ua!=="alpha"&&(Qa===0?Ga[Ua]=0:(Ga[Ua]=va.alpha*(1-Gr.alpha)*va[Ua]+va.alpha*Gr.alpha*_t(Gr[Ua],va[Ua])+(1-va.alpha)*Gr.alpha*Gr[Ua],Ga[Ua]=Math.max(0,Math.min(1,Ga[Ua]/Qa)))),Ga),{mode:Qe,alpha:Qa})})},ll=pu,ef=([Le,Ue])=>Le+Math.random()*(Ue-Le),de=Le=>Object.keys(Le).reduce((Ue,Qe)=>{let _t=Le[Qe];return Ue[Qe]=Array.isArray(_t)?_t:[_t,_t],Ue},{}),Ee=(Le="rgb",Ue={})=>{let Qe=se(Le),_t=de(Ue);return Qe.channels.reduce((wt,Lt)=>((_t.alpha||Lt!=="alpha")&&(wt[Lt]=ef(_t[Lt]||Qe.ranges[Lt])),wt),{mode:Le})},Ve=Ee,tt=(Le,Ue="rgb",Qe=!1)=>{let _t=Ue?se(Ue).channels:null,wt=Ue?P(Ue):B;return Lt=>{let pr=wt(Lt);if(!pr)return;let Gr=(_t||se(pr.mode).channels).reduce((Qa,Ga)=>{let Ua=Le(pr[Ga],Ga,pr,Ue);return Ua!==void 0&&!isNaN(Ua)&&(Qa[Ga]=Ua),Qa},{mode:pr.mode});if(!Qe)return Gr;let va=B(Lt);return va&&va.mode!==Gr.mode?P(va.mode)(Gr):Gr}},at=(Le,Ue,Qe)=>Ue!=="alpha"?(Le||0)*(Qe.alpha!==void 0?Qe.alpha:1):Le,ct=(Le,Ue,Qe)=>Ue!=="alpha"&&Qe.alpha!==0?(Le||0)/(Qe.alpha!==void 0?Qe.alpha:1):Le,Nt=(Le=1,Ue=0)=>(Qe,_t)=>_t!=="alpha"?Qe*Le+Ue:Qe,St=(Le=1,Ue=1,Qe=0)=>(_t,wt)=>wt!=="alpha"?Le*Math.pow(_t,Ue)+Qe:_t,Jt=Le=>{Le[0]===void 0&&(Le[0]=0),Le[Le.length-1]===void 0&&(Le[Le.length-1]=1);let Ue=1,Qe,_t,wt,Lt;for(;UeUe=>Le<=0?1:Le>=1?0:Math.pow(Ue,Math.log(.5)/Math.log(Le)),Hr=gr,Vr=Le=>typeof Le=="function",ca=Le=>Le&&typeof Le=="object",Aa=Le=>typeof Le=="number",Yr=(Le,Ue="rgb",Qe,_t)=>{let wt=se(Ue),Lt=P(Ue),pr=[],Gr=[],va={};Le.forEach(An=>{Array.isArray(An)?(pr.push(Lt(An[0])),Gr.push(An[1])):Aa(An)||Vr(An)?va[Gr.length]=An:(pr.push(Lt(An)),Gr.push(void 0))}),mr(Gr);let Qa=wt.channels.reduce((An,dn)=>{let _n;return ca(Qe)&&ca(Qe[dn])&&Qe[dn].fixup?_n=Qe[dn].fixup:ca(wt.interpolate[dn])&&wt.interpolate[dn].fixup?_n=wt.interpolate[dn].fixup:_n=Mn=>Mn,An[dn]=_n(pr.map(Mn=>Mn[dn])),An},{});if(_t){let An=pr.map((dn,_n)=>wt.channels.reduce((Mn,Bn)=>(Mn[Bn]=Qa[Bn][_n],Mn),{mode:Ue}));Qa=wt.channels.reduce((dn,_n)=>(dn[_n]=An.map(Mn=>{let Bn=_t(Mn[_n],_n,Mn,Ue);return isNaN(Bn)?void 0:Bn}),dn),{})}let Ga=wt.channels.reduce((An,dn)=>{let _n;return Vr(Qe)?_n=Qe:ca(Qe)&&Vr(Qe[dn])?_n=Qe[dn]:ca(Qe)&&ca(Qe[dn])&&Qe[dn].use?_n=Qe[dn].use:Vr(wt.interpolate[dn])?_n=wt.interpolate[dn]:ca(wt.interpolate[dn])&&(_n=wt.interpolate[dn].use),An[dn]=_n(Qa[dn]),An},{}),Ua=pr.length-1;return An=>{if(An=Math.min(Math.max(0,An),1),An<=Gr[0])return pr[0];if(An>Gr[Ua])return pr[Ua];let dn=0;for(;Gr[dn]{let ls=Ga[As](Ci);return ls!==void 0&&(qo[As]=ls),qo},{mode:Ue})}},oa=(Le,Ue="rgb",Qe)=>Yr(Le,Ue,Qe),fa=(Le,Ue)=>(Qe,_t="rgb",wt)=>{let Lt=Ue?tt(Ue,_t):void 0,pr=Yr(Qe,_t,wt,Le);return Lt?Gr=>Lt(pr(Gr)):pr},Ea=fa(at,ct),Ma=(Le,Ue)=>(Le+Ue)%Ue,sa=(Le,Ue,Qe,_t,wt)=>{let Lt=wt*wt,pr=Lt*wt;return((1-3*wt+3*Lt-pr)*Le+(4-6*Lt+3*pr)*Ue+(1+3*wt+3*Lt-3*pr)*Qe+pr*_t)/6},hn=Le=>Ue=>{let Qe=Le.length-1,_t=Ue>=1?Qe-1:Math.max(0,Math.floor(Ue*Qe));return sa(_t>0?Le[_t-1]:2*Le[_t]-Le[_t+1],Le[_t],Le[_t+1],_tUe=>{let Qe=Le.length-1,_t=Math.floor(Ue*Qe);return sa(Le[Ma(_t-1,Le.length)],Le[Ma(_t,Le.length)],Le[Ma(_t+1,Le.length)],Le[Ma(_t+2,Le.length)],(Ue-_t/Qe)*Qe)},zn=Le=>{let Ue,Qe=Le.length-1,_t=new Array(Qe),wt=new Array(Qe),Lt=new Array(Qe);for(_t[1]=1/4,wt[1]=(6*Le[1]-Le[0])/4,Ue=2;Ue0&&(Lt[Qe-1]=wt[Qe-1]),Ue=Qe-2;Ue>0;--Ue)Lt[Ue]=wt[Ue]-_t[Ue]*Lt[Ue+1];return Lt},$n=Le=>hn(zn(Le)),xi=Le=>Tn(zn(Le)),di=Math.sign,uo=Math.min,pe=Math.abs,y=Le=>{let Ue=Le.length-1,Qe=[],_t=[],wt=[];for(let Lt=0;Lt0?.5*(Le[Lt+1]-Le[Lt-1])*Ue:void 0),wt.push(Lt>0?(di(Qe[Lt-1])+di(Qe[Lt]))*uo(pe(Qe[Lt-1]),pe(Qe[Lt]),.5*pe(_t[Lt])):void 0);return[Qe,_t,wt]},N=(Le,Ue,Qe)=>{let _t=Le.length-1,wt=_t*_t;return Lt=>{let pr;Lt>=1?pr=_t-1:pr=Math.max(0,Math.floor(Lt*_t));let Gr=Lt-pr/_t,va=Gr*Gr,Qa=va*Gr;return(Ue[pr]+Ue[pr+1]-2*Qe[pr])*wt*Qa+(3*Qe[pr]-2*Ue[pr]-Ue[pr+1])*_t*va+Ue[pr]*Gr+Le[pr]}},ie=Le=>{if(Le.length<3)return At(Le);let Ue=Le.length-1,[Qe,,_t]=y(Le);return _t[0]=Qe[0],_t[Ue]=Qe[Ue-1],N(Le,_t,Qe)},fe=Le=>{if(Le.length<3)return At(Le);let Ue=Le.length-1,[Qe,_t,wt]=y(Le);return _t[0]=(Le[1]*2-Le[0]*1.5-Le[2]*.5)*Ue,_t[Ue]=(Le[Ue]*1.5-Le[Ue-1]*2+Le[Ue-2]*.5)*Ue,wt[0]=_t[0]*Qe[0]<=0?0:pe(_t[0])>2*pe(Qe[0])?2*Qe[0]:_t[0],wt[Ue]=_t[Ue]*Qe[Ue-1]<=0?0:pe(_t[Ue])>2*pe(Qe[Ue-1])?2*Qe[Ue-1]:_t[Ue],N(Le,wt,Qe)},be=Le=>{let Ue=Le.length-1,[Qe,_t,wt]=y(Le);_t[0]=.5*(Le[1]-Le[Ue])*Ue,_t[Ue]=.5*(Le[0]-Le[Ue-1])*Ue;let Lt=(Le[0]-Le[Ue])*Ue,pr=Lt;return wt[0]=(di(Lt)+di(Qe[0]))*uo(pe(Lt),pe(Qe[0]),.5*pe(_t[0])),wt[Ue]=(di(Qe[Ue-1])+di(pr))*uo(pe(Qe[Ue-1]),pe(pr),.5*pe(_t[Ue])),N(Le,wt,Qe)},Re=(Le=1)=>Le===1?Ue=>Ue:Ue=>Math.pow(Ue,Le),je=Re,Ze=(Le=2,Ue=1)=>{let Qe=je(Ue);if(Le<2)return Le<1?[]:[Qe(.5)];let _t=[];for(let wt=0;wt{let Ue={mode:Le.mode,r:Math.max(0,Math.min(Le.r!==void 0?Le.r:0,1)),g:Math.max(0,Math.min(Le.g!==void 0?Le.g:0,1)),b:Math.max(0,Math.min(Le.b!==void 0?Le.b:0,1))};return Le.alpha!==void 0&&(Ue.alpha=Le.alpha),Ue},Gt=Le=>Dt(ft(Le)),Kt=Le=>Le!==void 0&&(Le.r===void 0||Le.r>=0&&Le.r<=1)&&(Le.g===void 0||Le.g>=0&&Le.g<=1)&&(Le.b===void 0||Le.b>=0&&Le.b<=1);function st(Le){return Kt(ft(Le))}function It(Le="rgb"){let{gamut:Ue}=se(Le);if(!Ue)return _t=>!0;let Qe=P(typeof Ue=="string"?Ue:Le);return _t=>Kt(Qe(_t))}function Ut(Le){return Le=B(Le),Le===void 0||st(Le)?Le:P(Le.mode)(Gt(Le))}function ir(Le="rgb"){let{gamut:Ue}=se(Le);if(!Ue)return Lt=>B(Lt);let Qe=typeof Ue=="string"?Ue:Le,_t=P(Qe),wt=It(Qe);return Lt=>{let pr=B(Lt);if(!pr)return;let Gr=_t(pr);if(wt(Gr))return pr;let va=Dt(Gr);return pr.mode===va.mode?va:P(pr.mode)(va)}}function dr(Le,Ue="lch",Qe="rgb"){Le=B(Le);let _t=Qe==="rgb"?st:It(Qe),wt=Qe==="rgb"?Gt:ir(Qe);if(Le===void 0||_t(Le))return Le;let Lt=P(Le.mode);Le=P(Ue)(Le);let pr=lo(Li({},Le),{c:0});if(!_t(pr))return Lt(wt(pr));let Gr=0,va=Le.c!==void 0?Le.c:0,Qa=se(Ue).ranges.c,Ga=(Qa[1]-Qa[0])/Math.pow(2,13),Ua=pr.c;for(;va-Gr>Ga;)pr.c=Gr+(va-Gr)*.5,_t(pr)?(Ua=pr.c,Gr=pr.c):va=pr.c;return Lt(_t(pr)?pr:lo(Li({},pr),{c:Ua}))}function Ar(Le="rgb",Ue="oklch",Qe=Yn("oklch"),_t=.02){let wt=P(Le),Lt=se(Le);if(!Lt.gamut)return Ga=>wt(Ga);let pr=It(Le),Gr=ir(Le),va=P(Ue),{ranges:Qa}=se(Ue);if(!Qa.l||!Qa.c)throw new Error("LCH-like space expected");return Ga=>{if(Ga=B(Ga),Ga===void 0)return;let Ua=Li({},va(Ga));if(Ua.l===void 0&&(Ua.l=0),Ua.c===void 0&&(Ua.c=0),Ua.l>=Qa.l[1]){let Bn=lo(Li({},Lt.white),{mode:Le});return Ga.alpha!==void 0&&(Bn.alpha=Ga.alpha),Bn}if(Ua.l<=Qa.l[0]){let Bn=lo(Li({},Lt.black),{mode:Le});return Ga.alpha!==void 0&&(Bn.alpha=Ga.alpha),Bn}if(pr(Ua))return wt(Ua);let An=0,dn=Ua.c,_n=(Qa.c[1]-Qa.c[0])/4e3,Mn=Gr(Ua);for(;dn-An>_n;)Ua.c=(An+dn)*.5,Mn=Gr(Ua),pr(Ua)||Qe&&_t>0&&Qe(Ua,Mn)<=_t?An=Ua.c:dn=Ua.c;return wt(pr(Ua)?Ua:Mn)}}var hr=(Le,Ue=Yn(),Qe=_t=>_t)=>{let _t=Le.map((wt,Lt)=>({color:Qe(wt),i:Lt}));return(wt,Lt=1,pr=1/0)=>(isFinite(Lt)&&(Lt=Math.max(1,Math.min(Lt,_t.length-1))),_t.forEach(Gr=>{Gr.d=Ue(wt,Gr.color)}),_t.sort((Gr,va)=>Gr.d-va.d).slice(0,Lt).filter(Gr=>Gr.dLe[Gr.i]))},vr=hr,Or=Le=>Math.max(Le,0),Cr=Le=>Math.max(Math.min(Le,1),0),ta=(Le,Ue,Qe)=>Le===void 0||Ue===void 0?void 0:Le+Qe*(Ue-Le),ka=Le=>{let Ue=1-Cr(Le);return[.393+.607*Ue,.769-.769*Ue,.189-.189*Ue,0,.349-.349*Ue,.686+.314*Ue,.168-.168*Ue,0,.272-.272*Ue,.534-.534*Ue,.131+.869*Ue,0,0,0,0,1]},Ta=Le=>{let Ue=Or(Le);return[.213+.787*Ue,.715-.715*Ue,.072-.072*Ue,0,.213-.213*Ue,.715+.285*Ue,.072-.072*Ue,0,.213-.213*Ue,.715-.715*Ue,.072+.928*Ue,0,0,0,0,1]},Ra=Le=>{let Ue=1-Cr(Le);return[.2126+.7874*Ue,.7152-.7152*Ue,.0722-.0722*Ue,0,.2126-.2126*Ue,.7152+.2848*Ue,.0722-.0722*Ue,0,.2126-.2126*Ue,.7152-.7152*Ue,.0722+.9278*Ue,0,0,0,0,1]},ua=Le=>{let Ue=Math.PI*Le/180,Qe=Math.cos(Ue),_t=Math.sin(Ue);return[.213+Qe*.787-_t*.213,.715-Qe*.715-_t*.715,.072-Qe*.072+_t*.928,0,.213-Qe*.213+_t*.143,.715+Qe*.285+_t*.14,.072-Qe*.072-_t*.283,0,.213-Qe*.213-_t*.787,.715-Qe*.715+_t*.715,.072+Qe*.928+_t*.072,0,0,0,0,1]},ia=(Le,Ue,Qe=!1)=>{let _t=P(Ue),wt=se(Ue).channels;return Lt=>{let pr=_t(Lt);if(!pr)return;let Gr={mode:Ue},va,Qa=wt.length;for(let Ua=0;Ua{let Qe=Or(Le);return tt(Nt(Qe),Ue,!0)},da=(Le=1,Ue="rgb")=>{let Qe=Or(Le);return tt(Nt(Qe,(1-Qe)/2),Ue,!0)},Fa=(Le=1,Ue="rgb")=>ia(ka(Le),Ue,!0),za=(Le=1,Ue="rgb")=>ia(Ta(Le),Ue,!0),kn=(Le=1,Ue="rgb")=>ia(Ra(Le),Ue,!0),Dn=(Le=1,Ue="rgb")=>{let Qe=Cr(Le);return tt((_t,wt)=>wt==="alpha"?_t:ta(Qe,1-Qe,_t),Ue,!0)},ui=(Le=0,Ue="rgb")=>ia(ua(Le),Ue,!0),cn=P("rgb"),sn=[[1,0,-0,0,1,0,-0,-0,1],[.856167,.182038,-.038205,.029342,.955115,.015544,-.00288,-.001563,1.004443],[.734766,.334872,-.069637,.05184,.919198,.028963,-.004928,-.004209,1.009137],[.630323,.465641,-.095964,.069181,.890046,.040773,-.006308,-.007724,1.014032],[.539009,.579343,-.118352,.082546,.866121,.051332,-.007136,-.011959,1.019095],[.458064,.679578,-.137642,.092785,.846313,.060902,-.007494,-.016807,1.024301],[.38545,.769005,-.154455,.100526,.829802,.069673,-.007442,-.02219,1.029632],[.319627,.849633,-.169261,.106241,.815969,.07779,-.007025,-.028051,1.035076],[.259411,.923008,-.18242,.110296,.80434,.085364,-.006276,-.034346,1.040622],[.203876,.990338,-.194214,.112975,.794542,.092483,-.005222,-.041043,1.046265],[.152286,1.052583,-.204868,.114503,.786281,.099216,-.003882,-.048116,1.051998]],ei=[[1,0,-0,0,1,0,-0,-0,1],[.866435,.177704,-.044139,.049567,.939063,.01137,-.003453,.007233,.99622],[.760729,.319078,-.079807,.090568,.889315,.020117,-.006027,.013325,.992702],[.675425,.43385,-.109275,.125303,.847755,.026942,-.00795,.018572,.989378],[.605511,.52856,-.134071,.155318,.812366,.032316,-.009376,.023176,.9862],[.547494,.607765,-.155259,.181692,.781742,.036566,-.01041,.027275,.983136],[.498864,.674741,-.173604,.205199,.754872,.039929,-.011131,.030969,.980162],[.457771,.731899,-.18967,.226409,.731012,.042579,-.011595,.034333,.977261],[.422823,.781057,-.203881,.245752,.709602,.044646,-.011843,.037423,.974421],[.392952,.82361,-.216562,.263559,.69021,.046232,-.01191,.040281,.97163],[.367322,.860646,-.227968,.280085,.672501,.047413,-.01182,.04294,.968881]],Pn=[[1,0,-0,0,1,0,-0,-0,1],[.92667,.092514,-.019184,.021191,.964503,.014306,.008437,.054813,.93675],[.89572,.13333,-.02905,.029997,.9454,.024603,.013027,.104707,.882266],[.905871,.127791,-.033662,.026856,.941251,.031893,.01341,.148296,.838294],[.948035,.08949,-.037526,.014364,.946792,.038844,.010853,.193991,.795156],[1.017277,.027029,-.044306,-.006113,.958479,.047634,.006379,.248708,.744913],[1.104996,-.046633,-.058363,-.032137,.971635,.060503,.001336,.317922,.680742],[1.193214,-.109812,-.083402,-.058496,.97941,.079086,-.002346,.403492,.598854],[1.257728,-.139648,-.118081,-.078003,.975409,.102594,-.003316,.501214,.502102],[1.278864,-.125333,-.153531,-.084748,.957674,.127074,-989e-6,.601151,.399838],[1.255528,-.076749,-.178779,-.078411,.930809,.147602,.004733,.691367,.3039]],Rn=(Le,Ue)=>{let Qe=Math.max(0,Math.min(1,Ue)),_t=Math.round(Qe/.1),wt=Math.round(Qe%.1),Lt=Le[_t];if(wt>0&&_tBe(Lt[va],pr[va],wt))}return pr=>{let Gr=B(pr);if(Gr===void 0)return;let{r:va,g:Qa,b:Ga}=cn(Gr),Ua={mode:"rgb",r:Lt[0]*va+Lt[1]*Qa+Lt[2]*Ga,g:Lt[3]*va+Lt[4]*Qa+Lt[5]*Ga,b:Lt[6]*va+Lt[7]*Qa+Lt[8]*Ga};return Gr.alpha!==void 0&&(Ua.alpha=Gr.alpha),P(Gr.mode)(Ua)}},In=(Le=1)=>Rn(sn,Le),Jn=(Le=1)=>Rn(ei,Le),Ei=(Le=1)=>Rn(Pn,Le),so=Le=>Le*Le*(3-2*Le),ti=Le=>.5-Math.sin(Math.asin(1-2*Le)/3),bi=Le=>Le*Le*Le*(Le*(Le*6-15)+10),Wi=bi,ro=Le=>(1-Math.cos(Le*Math.PI))/2,Mo=ro;function zs(Le){let Ue=P("lrgb")(Le);return .2126*Ue.r+.7152*Ue.g+.0722*Ue.b}function Bs(Le,Ue){let Qe=zs(Le),_t=zs(Ue);return(Math.max(Qe,_t)+.05)/(Math.min(Qe,_t)+.05)}var So=ne(Ht),Ws=ne(Dr),Zo=ne(go),es=ne(Ao),$o=ne(to),_s=ne(Vs),Go=ne(Pi),Ys=ne(dl),Ll=ne(bc),mo=ne(Qu),ru=ne(ju),Rs=ne(Sl),Yu=ne(oh),Ul=ne(nl),ql=ne(Kc),fo=ne(kl),Xo=ne(Cc),Os=ne(vc),ra=ne(ri),Ya=ne($i),Ka=ne(Yo),Bi=ne(ns),rs=ne(zl),Is=ne(oc),Oi=ne(Qc),Wr=ne(_r),na=ne(Bt),pa=ne(Wt),Wa=ne(la),ln=ne(Si)}}),av=ze({"src/plot_api/plot_config.js"(J,G){"use strict";var p={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt: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:{}}},b={};function E(k,l){for(var e in k){var t=k[e];t.valType?l[e]=t.dflt:(l[e]||(l[e]={}),E(t,l[e]))}}E(p,b),G.exports={configAttributes:p,dfltConfig:b}}}),Pw=ze({"src/lib/notifier.js"(J,G){"use strict";var p=ci(),b=ao(),E=[];G.exports=function(k,l,e){var t;if(((t=e?._context)==null?void 0:t.displayNotifier)===!1||E.indexOf(k)!==-1)return;E.push(k);var n=1e3;b(l)?n=l:l==="long"&&(n=3e3);var r=p.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var a=r.selectAll(".notifier-note").data(E);function o(s){s.duration(700).style("opacity",0).each("end",function(c){var g=E.indexOf(c);g!==-1&&E.splice(g,1),p.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var c=p.select(this);c.append("button").classed("notifier-close",!0).html("×").on("click",function(){c.transition().call(o)});for(var g=c.append("p"),f=s.split(//g),v=0;v1){var l=["LOG:"];for(k=0;k1){var e=[];for(k=0;k"),"long")}},E.warn=function(){var k;if(p.logging>0){var l=["WARN:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}},E.error=function(){var k;if(p.logging>0){var l=["ERROR:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}}}}),fc=ze({"src/components/color/attributes.js"(J){"use strict";J.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],J.defaultLine="#444",J.lightLine="#eee",J.background="#fff",J.borderLine="#BEC8D9",J.lightFraction=100*10/11}}),Qn=ze({"src/components/color/index.js"(J,G){"use strict";var{converter:p,formatHex:b,formatRgb:E,wcagContrast:k,wcagLuminance:l}=UR(),{isArrayOrTypedArray:e}=Ff(),{warn:t}=ap(),{background:n,defaultLine:r,defaults:a,lightLine:o}=fc(),s=p("rgb"),c=p("hsl"),g=W=>{if(typeof W!="string")return;let ee=W.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(ee))try{return s(ee)}catch{return}},f=W=>W>0?W>1?1:W:0,v={mode:"rgb",r:0,g:0,b:0,alpha:1},m=W=>Math.round(W*255e6)/255e6,i=W=>lo(Li({},W),{r:m(W.r),g:m(W.g),b:m(W.b)}),T=W=>E(i(W)),S=W=>b(i(W)),M=W=>{var ee,ae,he,xe;return typeof W=="string"?`"${W}"`:e(W)?`${(ae=(ee=W.constructor)==null?void 0:ee.name)!=null?ae:"Array"}(${W.length})`:typeof W=="object"?(xe=(he=W.constructor)==null?void 0:he.name)!=null?xe:"Object":`${typeof W} ${W}`},C=(W,ee)=>{var ae;let he=g(W);return he?((ae=he.alpha)!=null||(he.alpha=1),he):(!ee&&W!=null&&t(`Invalid color specifier: ${M(W)}. Defaulting to "#000"`),v)},_=W=>T(lo(Li({},C(W)),{alpha:1})),w=W=>W?C(W).alpha:0,h=W=>e(W)&&W.length>2&&Number.isFinite(W[0])&&Number.isFinite(W[1])&&Number.isFinite(W[2]),u=W=>{let[ee,ae,he,xe]=W,we=Math.max(ee,ae,he)>1?1/255:1,Me=xe??1;return{mode:"rgb",r:ee*we,g:ae*we,b:he*we,alpha:Me>1?Me/255:Me}},A=(W,ee)=>{let ae=h(W)?u(W):C(W,!0),he=[f(ae.r),f(ae.g),f(ae.b),f(ae.alpha)];return ee==="uint8"||ee==="uint8_clamped"?Uint8Array.from(he,xe=>Math.round(xe*255)):ee==="float32"?Float32Array.from(he):ee==="float64"?Float64Array.from(he):he},x=(W,ee)=>T(lo(Li({},C(W)),{alpha:f(ee)})),z=(W,ee)=>{let ae=C(W),he=ae.alpha;if(he===1)return T(ae);let xe=C(ee||n),we=xe.alpha,Me=(Se,Ie)=>(we===1?Ie:1-we+Ie*we)*(1-he)+Se*he;return T({mode:"rgb",r:Me(ae.r,xe.r),g:Me(ae.g,xe.g),b:Me(ae.b,xe.b)})},I=(W,ee,ae)=>{let he=C(W),xe=C(ee),we=(Me,Se)=>ae*Me+(1-ae)*Se;return T({mode:"rgb",r:we(he.r,xe.r),g:we(he.g,xe.g),b:we(he.b,xe.b)})},O=(W,ee)=>{let ae=C(W),he=c(ae)||{mode:"hsl",h:0,s:0,l:0};return T(s(lo(Li({},he),{l:f((he.l*100+ee)/100),alpha:ae.alpha})))},D=(W,ee)=>k(C(W),C(ee)),B=W=>D(W,n)>D(W,r),F=T(C(n)),P=T(C(r)),j=(W,ee,ae)=>(C(W).alpha!==1&&(W=z(W,n)),B(W)?ee?O(W,ee):F:ae?O(W,-ae):P),U=(W,ee)=>{W.style({stroke:_(ee),"stroke-opacity":C(ee).alpha})},$=(W,ee)=>{W.style({fill:_(ee),"fill-opacity":C(ee).alpha})},Q=(W,ee)=>!!(W&&ee&&_(W)===_(ee)),re=W=>g(W)!==void 0,ne=(W,ee)=>{ee=ee===0?0:ee||10;let ae=C(W),he=ee/100;return T(lo(Li({},ae),{r:f(ae.r+he),g:f(ae.g+he),b:f(ae.b+he)}))},se=(W,ee,ae)=>{let he=C(W),xe=C(ee),we=ae/100,Me=xe.alpha-he.alpha,Se=2*we-1,Ie=((Se*Me===-1?Se:(Se+Me)/(1+Se*Me))+1)/2,Ge=1-Ie,qe=(ke,_e)=>Ge*ke+Ie*_e;return T({mode:"rgb",r:qe(he.r,xe.r),g:qe(he.g,xe.g),b:qe(he.b,xe.b),alpha:he.alpha*(1-we)+xe.alpha*we})},V=(W,ee=["#000","#fff"])=>{let ae,he=-1/0;for(let xe of ee){let we=D(W,xe);we>he&&(he=we,ae=T(C(xe)))}return ae},Z=W=>T(C(W)),K=W=>S(C(W)).toUpperCase(),H=W=>{let ee=C(W);return[f(ee.r)*255,f(ee.g)*255,f(ee.b)*255,f(ee.alpha)]},X=([W,ee,ae,he])=>T({mode:"rgb",r:W/255,g:ee/255,b:ae/255,alpha:he}),q=W=>{let ee=C(W);return l({mode:"rgb",r:f(ee.r),g:f(ee.g),b:f(ee.b)})};G.exports={addOpacity:x,adjustLightness:O,background:n,brighten:ne,combine:z,contrast:j,defaultLine:r,defaults:a,equals:Q,fill:$,hexString:K,interpolate:I,isChannelArray:h,isDark:B,isValid:re,lightLine:o,luminosity:q,mix:se,mostReadable:V,normalize:A,opacity:w,parse:C,rgb:_,rgbaArray:H,rgbaArrayToString:X,rgbaString:Z,stroke:U,wcagContrast:D}}}),Bv=ze({"src/components/colorscale/scales.js"(J,G){"use strict";var p=Qn(),b={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},E=b.RdBu;function k(t,n){if(n||(n=E),!t)return n;function r(){try{t=b[t]||JSON.parse(t)}catch{t=n}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),l(t)?t:n}function l(t){var n=0;if(!Array.isArray(t)||t.length<2||!t[0]||!t[t.length-1]||+t[0][0]!=0||+t[t.length-1][0]!=1)return!1;for(var r=0;rqR});function qR(J,G="",p,b){let E=G+(p?"":"$"),k=b===!1?"":"^";return J==="xy"?new RegExp(k+"x"+ng+"y"+ng+E):new RegExp(k+J+ng+E)}var ng,Vm=zi({"src/lib/regex.ts"(){"use strict";ng="([2-9]|[1-9][0-9]+)?"}}),VR=ze({"src/lib/coerce.js"(J){"use strict";var G=ao(),p=Ki().extendFlat,b=ws(),E=Bv(),k=Qn(),l=np().DESELECTDIM,e=rg(),t=(Vm(),Po(Ov)).counter,n=(Um(),Po(zv)).modHalf,r=Ff().isArrayOrTypedArray,a=Ff().isTypedArraySpec,o=Ff().decodeTypedArraySpec;J.valObjectMeta={data_array:{coerceFunction:function(c,g,f){g.set(r(c)?c:a(c)?o(c):f)}},enumerated:{coerceFunction:function(c,g,f,v){v.coerceNumber&&(c=+c),v.values.indexOf(c)===-1?g.set(f):g.set(c)},validateFunction:function(c,g){g.coerceNumber&&(c=+c);for(var f=g.values,v=0;vi===!0||i===!1;m(c)||v.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(m)?g.set(c):g.set(f)}},number:{coerceFunction:function(c,g,f,v){a(c)&&(c=o(c)),!G(c)||v.min!==void 0&&cv.max?g.set(f):g.set(+c)}},integer:{coerceFunction:function(c,g,f,v){if((v.extras||[]).indexOf(c)!==-1){g.set(c);return}a(c)&&(c=o(c)),c%1||!G(c)||v.min!==void 0&&cv.max?g.set(f):g.set(+c)}},string:{coerceFunction:function(c,g,f,v){if(typeof c!="string"){var m=typeof c=="number";v.strict===!0||!m?g.set(f):g.set(String(c))}else v.noBlank&&!c?g.set(f):g.set(c)}},color:{coerceFunction:function(c,g,f){a(c)&&(c=o(c)),k.isValid(c)?g.set(c):g.set(f)}},colorlist:{coerceFunction:function(c,g,f){!Array.isArray(c)||!c.length?g.set(f):c.every(v=>k.isValid(v))?g.set(c):g.set(f)}},colorscale:{coerceFunction:function(c,g,f){g.set(E.get(c,f))}},angle:{coerceFunction:function(c,g,f){a(c)&&(c=o(c)),c==="auto"?g.set("auto"):G(c)?g.set(n(+c,360)):g.set(f)}},subplotid:{coerceFunction:function(c,g,f,v){var m=v.regex||t(f);let i=T=>typeof T=="string"&&m.test(T);i(c)||v.arrayOk&&r(c)&&c.length>0&&c.every(i)?g.set(c):g.set(f)},validateFunction:function(c,g){var f=g.dflt;return c===f?!0:typeof c!="string"?!1:!!t(f).test(c)}},flaglist:{coerceFunction:function(c,g,f,v){if((v.extras||[]).indexOf(c)!==-1){g.set(c);return}if(typeof c!="string"){g.set(f);return}for(var m=c.split("+"),i=0;iLi({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.texttemplateAttrs=({editType:k="calc",arrayOk:l}={},e={})=>Li({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.shapeTexttemplateAttrs=({editType:k="arraydraw",newshape:l}={},e={})=>({valType:"string",dflt:"",editType:k}),J.templatefallbackAttrs=({editType:k="none"}={})=>({valType:"any",dflt:"-",editType:k})}}),Sx=ze({"src/components/shapes/label_texttemplate.js"(J,G){"use strict";function p(M,C){return C?C.d2l(M):M}function b(M,C){return C?C.l2d(M):M}function E(M){return M.x0}function k(M){return M.x1}function l(M){return M.y0}function e(M){return M.y1}function t(M){return M.x0shift||0}function n(M){return M.x1shift||0}function r(M){return M.y0shift||0}function a(M){return M.y1shift||0}function o(M,C){return p(M.x1,C)+n(M)-p(M.x0,C)-t(M)}function s(M,C,_){return p(M.y1,_)+a(M)-p(M.y0,_)-r(M)}function c(M,C){return Math.abs(o(M,C))}function g(M,C,_){return Math.abs(s(M,C,_))}function f(M,C,_){return M.type!=="line"?void 0:Math.sqrt(Math.pow(o(M,C),2)+Math.pow(s(M,C,_),2))}function v(M,C){return b((p(M.x1,C)+n(M)+p(M.x0,C)+t(M))/2,C)}function m(M,C,_){return b((p(M.y1,_)+a(M)+p(M.y0,_)+r(M))/2,_)}function i(M,C,_){return M.type!=="line"?void 0:s(M,C,_)/o(M,C)}var T=["x0","x1","y0","y1","dy","height","ycenter"],S=["x0","x1","y0","y1","dx","width","xcenter"];G.exports={x0:E,x1:k,y0:l,y1:e,slope:i,dx:o,dy:s,width:c,height:g,length:f,xcenter:v,ycenter:m,simpleXVariables:T,simpleYVariables:S}}}),yI=ze({"src/components/shapes/draw_newshape/attributes.js"(J,G){"use strict";var p=Al().overrideAll,b=ws(),E=Qs(),k=Uc().dash,l=Ki().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Sx();G.exports=p({newshape:{visible:l({},b.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:l({},b.legend,{}),legendgroup:l({},b.legendgroup,{}),legendgrouptitle:{text:l({},b.legendgrouptitle.text,{}),font:E({})},legendrank:l({},b.legendrank,{}),legendwidth:l({},b.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:l({},k,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:l({},b.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(n)}),texttemplatefallback:t({editType:"arraydraw"}),font:E({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),_I=ze({"src/components/selections/draw_newselection/attributes.js"(J,G){"use strict";var p=Uc().dash,b=Ki().extendFlat;G.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:b({},p,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),Ex=ze({"src/plots/pad_attributes.js"(J,G){"use strict";G.exports=function(p){var b=p.editType;return{t:{valType:"number",dflt:0,editType:b},r:{valType:"number",dflt:0,editType:b},b:{valType:"number",dflt:0,editType:b},l:{valType:"number",dflt:0,editType:b},editType:b}}}}),Gm=ze({"src/plots/layout_attributes.js"(J,G){"use strict";var p=Qs(),b=og(),E=fc(),k=yI(),l=_I(),e=Ex(),t=Ki().extendFlat,n=p({editType:"calc"});n.family.dflt='"Open Sans", verdana, arial, sans-serif',n.size.dflt=12,n.color.dflt=E.defaultLine,G.exports={font:n,title:{text:{valType:"string",editType:"layoutstyle"},font:p({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:p({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:t(e({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:E.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:E.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:E.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:k.newshape,activeshape:k.activeshape,newselection:l.newselection,activeselection:l.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:t({},b.transition,{editType:"none"})}}}),xI=ze({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var J=document.createElement("style");J.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",J.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(J)}})()}}),mi=ze({"src/registry.js"(J){"use strict";var G=ap(),p=Ax(),b=Rw(),E=ig().addStyleRule,k=Ki(),l=ws(),e=Gm(),t=k.extendFlat,n=k.extendDeepAll;J.modules={},J.allCategories={},J.allTypes=[],J.subplotsRegistry={},J.componentsRegistry={},J.layoutArrayContainers=[],J.layoutArrayRegexes=[],J.traceLayoutAttributes={},J.localeRegistry={},J.apiMethodRegistry={},J.collectableSubplotTypes=null,J.register=function(i){if(J.collectableSubplotTypes=null,i)i&&!Array.isArray(i)&&(i=[i]);else throw new Error("No argument passed to Plotly.register.");for(var T=0;T=i&&D<=T?D:l}if(typeof D!="string"&&typeof D!="number")return l;D=String(D);var U=v(B),$=D.charAt(0);U&&($==="G"||$==="g")&&(D=D.slice(1),B="");var Q=U&&B.slice(0,7)==="chinese",re=D.match(Q?g:c);if(!re)return l;var ne=re[1],se=re[3]||"1",V=Number(re[5]||1),Z=Number(re[7]||0),K=Number(re[9]||0),H=Number(re[11]||0);if(U){if(ne.length===2)return l;ne=Number(ne);var X;try{var q=o.getComponentMethod("calendars","getCal")(B);if(Q){var W=se.charAt(se.length-1)==="i";se=parseInt(se,10),X=q.newDate(ne,q.toMonthIndex(ne,se,W),V)}else X=q.newDate(ne,Number(se),V)}catch{return l}return X?(X.toJD()-a)*e+Z*t+K*n+H*r:l}ne.length===2?ne=(Number(ne)+2e3-f)%100+f:ne=Number(ne),se-=1;var ee=new Date(Date.UTC(2e3,se,V,Z,K));return ee.setUTCFullYear(ne),ee.getUTCMonth()!==se||ee.getUTCDate()!==V?l:ee.getTime()+H*r},i=J.MIN_MS=J.dateTime2ms("-9999"),T=J.MAX_MS=J.dateTime2ms("9999-12-31 23:59:59.9999"),J.isDateTime=function(D,B){return J.dateTime2ms(D,B)!==l};function S(D,B){return String(D+Math.pow(10,B)).slice(1)}var M=90*e,C=3*t,_=5*n;J.ms2DateTime=function(D,B,F){if(typeof D!="number"||!(D>=i&&D<=T))return l;B||(B=0);var P=Math.floor(E(D+.05,1)*10),j=Math.round(D-P/10),U,$,Q,re,ne,se;if(v(F)){var V=Math.floor(j/e)+a,Z=Math.floor(E(D,e));try{U=o.getComponentMethod("calendars","getCal")(F).fromJD(V).formatDate("yyyy-mm-dd")}catch{U=s("G%Y-%m-%d")(new Date(j))}if(U.charAt(0)==="-")for(;U.length<11;)U="-0"+U.slice(1);else for(;U.length<10;)U="0"+U;$=B=i+e&&D<=T-e))return l;var B=Math.floor(E(D+.05,1)*10),F=new Date(Math.round(D-B/10)),P=G("%Y-%m-%d")(F),j=F.getHours(),U=F.getMinutes(),$=F.getSeconds(),Q=F.getUTCMilliseconds()*10+B;return w(P,j,U,$,Q)};function w(D,B,F,P,j){if((B||F||P||j)&&(D+=" "+S(B,2)+":"+S(F,2),(P||j)&&(D+=":"+S(P,2),j))){for(var U=4;j%10===0;)U-=1,j/=10;D+="."+S(j,U)}return D}J.cleanDate=function(D,B,F){if(D===l)return B;if(J.isJSDate(D)||typeof D=="number"&&isFinite(D)){if(v(F))return b.error("JS Dates and milliseconds are incompatible with world calendars",D),B;if(D=J.ms2DateTimeLocal(+D),!D&&B!==void 0)return B}else if(!J.isDateTime(D,F))return b.error("unrecognized date",D),B;return D};var h=/%\d?f/g,u=/%h/g,A={1:"1",2:"1",3:"2",4:"2"};function x(D,B,F,P){D=D.replace(h,function(U){var $=Math.min(+U.charAt(1)||6,6),Q=(B/1e3%1+2).toFixed($).slice(2).replace(/0+$/,"")||"0";return Q});var j=new Date(Math.floor(B+.05));if(D=D.replace(u,function(){return A[F("%q")(j)]}),v(P))try{D=o.getComponentMethod("calendars","worldCalFmt")(D,B,P)}catch{return"Invalid"}return F(D)(j)}var z=[59,59.9,59.99,59.999,59.9999];function I(D,B){var F=E(D+.05,e),P=S(Math.floor(F/t),2)+":"+S(E(Math.floor(F/n),60),2);if(B!=="M"){p(B)||(B=0);var j=Math.min(E(D/r,60),z[B]),U=(100+j).toFixed(B).slice(1);B>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),P+=":"+U}return P}J.formatDate=function(D,B,F,P,j,U){if(j=v(j)&&j,!B)if(F==="y")B=U.year;else if(F==="m")B=U.month;else if(F==="d")B=U.dayMonth+` `+U.year;else return I(D,F)+` -`+x(U.dayMonthYear,D,P,j);return x(B,D,P,j)};var O=3*e;J.incrementMonth=function(D,B,F){F=v(F)&&F;var P=E(D,e);if(D=Math.round(D-P),F)try{var j=Math.round(D/e)+a,U=o.getComponentMethod("calendars","getCal")(F),$=U.fromJD(j);return B%12?U.add($,B,"m"):U.add($,B/12,"y"),($.toJD()-a)*e+P}catch{b.error("invalid ms "+D+" in calendar "+F)}var Q=new Date(D+O);return Q.setUTCMonth(Q.getUTCMonth()+B)+P-O},J.findExactDates=function(D,B){for(var F=0,P=0,j=0,U=0,$,Q,re=v(B)&&o.getComponentMethod("calendars","getCal")(B),ne=0;ne1?(a[c-1]-a[0])/(c-1):1,v,g;for(h>=0?g=o?l:e:g=o?n:t,r+=h*k*(o?-1:1)*(h>=0?1:-1);s90&&p.log("Long binary search..."),s-1};function l(r,a){return ra}function n(r,a){return r>=a}J.sorterAsc=function(r,a){return r-a},J.sorterDes=function(r,a){return a-r},J.distinctVals=function(r){var a=r.slice();a.sort(J.sorterAsc);var o;for(o=a.length-1;o>-1&&a[o]===E;o--);for(var s=a[o]-a[0]||1,c=s/(o||1)/1e4,m=[],h,v=0;v<=o;v++){var g=a[v],i=g-h;h===void 0?(m.push(g),h=g):i>c&&(s=Math.min(s,i),m.push(g),h=g)}return{vals:m,minDiff:s}},J.roundUp=function(r,a,o){for(var s=0,c=a.length-1,m,h=0,v=o?0:1,g=o?1:0,i=o?Math.ceil:Math.floor;s0&&(s=1),o&&s)return r.sort(a)}return s?r:r.reverse()},J.findIndexOfMin=function(r,a){a=a||b;for(var o=1/0,s,c=0;czw});function wI(J){return Object.keys(J).sort()}var zw,Nv=zi({"src/lib/sort_object_keys.ts"(){"use strict";zw=wI}}),TI=ze({"src/lib/stats.js"(J){"use strict";var V=ao(),p=Ff().isArrayOrTypedArray;J.aggNums=function(b,E,k,l){var e,t;if((!l||l>k.length)&&(l=k.length),V(E)||(E=!1),p(k[0])){for(t=new Array(l),e=0;eb.length-1)return b[b.length-1];var k=E%1;return k*b[Math.ceil(E)]+(1-k)*b[Math.floor(E)]}}}),AI=ze({"src/lib/angles.js"(J,V){"use strict";var p=(Um(),Po(zv)),b=p.mod,E=p.modHalf,k=Math.PI,l=2*k;function e(g){return g/180*k}function t(g){return g/k*180}function n(g){return Math.abs(g[1]-g[0])>l-1e-14}function r(g,i){return E(i-g,l)}function a(g,i){return Math.abs(r(g,i))}function o(g,i){if(n(i))return!0;var w,S;i[0]S&&(S+=l);var M=b(g,l),C=M+l;return M>=w&&M<=S||C>=w&&C<=S}function s(g,i,w,S){if(!o(i,S))return!1;var M,C;return w[0]=M&&g<=C}function c(g,i,w,S,M,C,_){M=M||0,C=C||0;var T=n([w,S]),f,u,A,x,z;T?(f=0,u=k,A=l):w1/3&&p.x<2/3},J.isRightAnchor=function(p){return p.xanchor==="right"||p.xanchor==="auto"&&p.x>=2/3},J.isTopAnchor=function(p){return p.yanchor==="top"||p.yanchor==="auto"&&p.y>=2/3},J.isMiddleAnchor=function(p){return p.yanchor==="middle"||p.yanchor==="auto"&&p.y>1/3&&p.y<2/3},J.isBottomAnchor=function(p){return p.yanchor==="bottom"||p.yanchor==="auto"&&p.y<=1/3}}}),SI=ze({"src/lib/geometry2d.js"(J){"use strict";var V=(Um(),Po(zv)).mod;J.segmentsIntersect=p;function p(e,t,n,r,a,o,s,c){var m=n-e,h=a-e,v=s-a,g=r-t,i=o-t,w=c-o,S=m*w-v*g;if(S===0)return null;var M=(h*w-v*i)/S,C=(h*g-m*i)/S;return C<0||C>1||M<0||M>1?null:{x:e+m*M,y:t+g*M}}J.segmentDistance=function(t,n,r,a,o,s,c,m){if(p(t,n,r,a,o,s,c,m))return 0;var h=r-t,v=a-n,g=c-o,i=m-s,w=h*h+v*v,S=g*g+i*i,M=Math.min(b(h,v,w,o-t,s-n),b(h,v,w,c-t,m-n),b(g,i,S,t-o,n-s),b(g,i,S,r-o,a-s));return Math.sqrt(M)};function b(e,t,n,r,a){var o=r*e+a*t;if(o<0)return r*r+a*a;if(o>n){var s=r-e,c=a-t;return s*s+c*c}else{var m=r*t-a*e;return m*m/n}}var E,k,l;J.getTextLocation=function(t,n,r,a){if((t!==k||a!==l)&&(E={},k=t,l=a),E[r])return E[r];var o=t.getPointAtLength(V(r-a/2,n)),s=t.getPointAtLength(V(r+a/2,n)),c=Math.atan((s.y-o.y)/(s.x-o.x)),m=t.getPointAtLength(V(r,n)),h=(m.x*4+o.x+s.x)/6,v=(m.y*4+o.y+s.y)/6,g={x:h,y:v,theta:c};return E[r]=g,g},J.clearLocationCache=function(){k=null},J.getVisibleSegment=function(t,n,r){var a=n.left,o=n.right,s=n.top,c=n.bottom,m=0,h=t.getTotalLength(),v=h,g,i;function w(M){var C=t.getPointAtLength(M);M===0?g=C:M===h&&(i=C);var _=C.xo?C.x-o:0,T=C.yc?C.y-c:0;return Math.sqrt(_*_+T*T)}for(var S=w(m);S;){if(m+=S+r,m>v)return;S=w(m)}for(S=w(v);S;){if(v-=S+r,m>v)return;S=w(v)}return{min:m,max:v,len:v-m,total:h,isClosed:m===0&&v===h&&Math.abs(g.x-i.x)<.1&&Math.abs(g.y-i.y)<.1}},J.findPointOnPath=function(t,n,r,a){a=a||{};for(var o=a.pathLength||t.getTotalLength(),s=a.tolerance||.001,c=a.iterationLimit||30,m=t.getPointAtLength(0)[r]>t.getPointAtLength(o)[r]?-1:1,h=0,v=0,g=o,i,w,S;h0?g=i:v=i,h++}return w}}}),Cx=ze({"src/lib/throttle.js"(J){"use strict";var V={};J.throttle=function(E,k,l){var e=V[E],t=Date.now();if(!e){for(var n in V)V[n].tse.ts+k){r();return}e.timer=setTimeout(function(){r(),e.timer=null},k)},J.done=function(b){var E=V[b];return!E||!E.timer?Promise.resolve():new Promise(function(k){var l=E.onDone;E.onDone=function(){l&&l(),k(),E.onDone=null}})},J.clear=function(b){if(b)p(V[b]),delete V[b];else for(var E in V)J.clear(E)};function p(b){b&&b.timer!==null&&(clearTimeout(b.timer),b.timer=null)}}}),EI=ze({"src/lib/clear_responsive.js"(J,V){"use strict";V.exports=function(b){b._responsiveChartHandler&&(window.removeEventListener("resize",b._responsiveChartHandler),delete b._responsiveChartHandler)}}}),kI=ze({"node_modules/is-mobile/index.js"(J,V){"use strict";V.exports=k,V.exports.isMobile=k,V.exports.default=k;var p=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,b=/CrOS/,E=/android|ipad|playbook|silk/i;function k(l){l||(l={});let e=l.ua;if(!e&&typeof navigator<"u"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;let t=p.test(e)&&!b.test(e)||!!l.tablet&&E.test(e);return!t&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(t=!0),t}}}),CI=ze({"src/lib/preserve_drawing_buffer.js"(J,V){"use strict";var p=ao(),b=kI();V.exports=function(l){var e;if(l&&l.hasOwnProperty("userAgent")?e=l.userAgent:e=E(),typeof e!="string")return!0;var t=b({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!t)for(var n=e.split(" "),r=1;r-1;o--){var s=n[o];if(s.slice(0,8)==="Version/"){var c=s.slice(8).split(".")[0];if(p(c)&&(c=+c),c>=13)return!0}}}return t};function E(){var k;return typeof navigator<"u"&&(k=navigator.userAgent),k&&k.headers&&typeof k.headers["user-agent"]=="string"&&(k=k.headers["user-agent"]),k}}}),LI=ze({"src/lib/make_trace_groups.js"(J,V){"use strict";var p=ci();V.exports=function(E,k,l){var e=E.selectAll("g."+l.replace(/\s/g,".")).data(k,function(n){return n[0].trace.uid});e.exit().remove(),e.enter().append("g").attr("class",l),e.order();var t=E.classed("rangeplot")?"nodeRangePlot3":"node3";return e.each(function(n){n[0][t]=p.select(this)}),e}}}),PI=ze({"src/lib/localize.js"(J,V){"use strict";var p=mi();V.exports=function(E,k){for(var l=E._context.locale,e=0;e<2;e++){for(var t=E._context.locales,n=0;n<2;n++){var r=(t[l]||{}).dictionary;if(r){var a=r[k];if(a)return a}t=p.localeRegistry}var o=l.split("-")[0];if(o===l)break;l=o}return k}}}),Bw=ze({"src/lib/filter_unique.js"(J,V){"use strict";V.exports=function(b){for(var E={},k=[],l=0,e=0;e1?(k*b+k*E)/k:b+E,e=String(l).length;if(e>16){var t=String(E).length,n=String(b).length;if(e>=n+t){var r=parseFloat(l).toPrecision(12);r.indexOf("e+")===-1&&(l=+r)}}return l}}}),Ow={};bu(Ow,{default:()=>qw});function DI(J){return typeof J=="string"&&(J=J.replace(Uw,"")),(0,Nw.default)(J)?Number(J):jw.BADNUM}var Nw,jw,Uw,qw,FI=zi({"src/lib/clean_number.ts"(){"use strict";Nw=Yl(ao()),jw=Yl(No()),Uw=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,qw=DI}}),zI=ze({"src/lib/slugify.js"(J,V){"use strict";var p=/<[^>]*>/g,b=/[\p{S}\p{P}]/gu,E=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,k=/�/g,l=/\s+/g,e="-",t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(t+"{3,}","g"),r=new RegExp(t+"$","g"),a=60;function o(s){return typeof s.toWellFormed=="function"?s.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(s))}V.exports=function(c,m=a){var h=o(c??"").replace(k,"").replace(p," ").replace(b,v=>v===e?v:"").toLowerCase().trim().replace(l,e).replace(E,"").replace(n,e);return h.length<=m?h:Array.from(h).slice(0,m).join("").replace(r,"")}}}),Nr=ze({"src/lib/index.js"(J,V){"use strict";var p=ci(),b=jm().utcFormat,E=Cw().format,k=ao(),l=No(),e=l.FP_SAFE,t=-e,n=l.BADNUM,r=V.exports={};r.adjustFormat=function(q){if(!q||/^\d[.]\df/.test(q)||/[.]\d%/.test(q))return q;if(q==="0.f")return"~f";if(/^\d%/.test(q))return"~%";if(/^\ds/.test(q))return"~s";var Z=(q.match(/^[+\-( ]?/)||[""])[0],ee=q.slice(Z.length);return!/^[~,.0$#]/.test(ee)&&/[&fps]/.test(ee)?Z+"~"+ee:q};var a={};r.warnBadFormat=function(Y){var q=String(Y);a[q]||(a[q]=1,r.warn('encountered bad format: "'+q+'"'))},r.noFormat=function(Y){return String(Y)},r.numberFormat=function(Y){var q;try{q=E(r.adjustFormat(Y))}catch{return r.warnBadFormat(Y),r.noFormat}return q},r.nestedProperty=r1(),r.keyedContainer=zR(),r.relativeAttr=BR(),r.isPlainObject=tv(),r.toLogRange=Tx(),r.relinkPrivateKeys=OR();var o=Ff();r.isArrayBuffer=o.isArrayBuffer,r.isTypedArray=o.isTypedArray,r.isArrayOrTypedArray=o.isArrayOrTypedArray,r.isArray1D=o.isArray1D,r.ensureArray=o.ensureArray,r.concat=o.concat,r.maxRowLength=o.maxRowLength,r.minRowLength=o.minRowLength;var s=(Um(),Po(zv));r.mod=s.mod,r.modHalf=s.modHalf;var c=VR();r.valObjectMeta=c.valObjectMeta,r.coerce=c.coerce,r.coerce2=c.coerce2,r.coerceFont=c.coerceFont,r.coercePattern=c.coercePattern,r.coerceHoverinfo=c.coerceHoverinfo,r.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,r.validate=c.validate;var m=bI();r.dateTime2ms=m.dateTime2ms,r.isDateTime=m.isDateTime,r.ms2DateTime=m.ms2DateTime,r.ms2DateTimeLocal=m.ms2DateTimeLocal,r.cleanDate=m.cleanDate,r.isJSDate=m.isJSDate,r.formatDate=m.formatDate,r.incrementMonth=m.incrementMonth,r.dateTick0=m.dateTick0,r.dfltRange=m.dfltRange,r.findExactDates=m.findExactDates,r.MIN_MS=m.MIN_MS,r.MAX_MS=m.MAX_MS;var h=kx();r.findBin=h.findBin,r.sorterAsc=h.sorterAsc,r.sorterDes=h.sorterDes,r.distinctVals=h.distinctVals,r.roundUp=h.roundUp,r.sort=h.sort,r.findIndexOfMin=h.findIndexOfMin,r.sortObjectKeys=(Nv(),Po(nv)).default;var v=TI();r.aggNums=v.aggNums,r.len=v.len,r.mean=v.mean,r.geometricMean=v.geometricMean,r.median=v.median,r.midRange=v.midRange,r.variance=v.variance,r.stdev=v.stdev,r.interp=v.interp;var g=Mx();r.init2dArray=g.init2dArray,r.transposeRagged=g.transposeRagged,r.dot=g.dot,r.translationMatrix=g.translationMatrix,r.rotationMatrix=g.rotationMatrix,r.rotationXYMatrix=g.rotationXYMatrix,r.apply3DTransform=g.apply3DTransform,r.apply2DTransform=g.apply2DTransform,r.apply2DTransform2=g.apply2DTransform2,r.convertCssMatrix=g.convertCssMatrix,r.inverseTransformMatrix=g.inverseTransformMatrix;var i=AI();r.deg2rad=i.deg2rad,r.rad2deg=i.rad2deg,r.angleDelta=i.angleDelta,r.angleDist=i.angleDist,r.isFullCircle=i.isFullCircle,r.isAngleInsideSector=i.isAngleInsideSector,r.isPtInsideSector=i.isPtInsideSector,r.pathArc=i.pathArc,r.pathSector=i.pathSector,r.pathAnnulus=i.pathAnnulus;var w=MI();r.isLeftAnchor=w.isLeftAnchor,r.isCenterAnchor=w.isCenterAnchor,r.isRightAnchor=w.isRightAnchor,r.isTopAnchor=w.isTopAnchor,r.isMiddleAnchor=w.isMiddleAnchor,r.isBottomAnchor=w.isBottomAnchor;var S=SI();r.segmentsIntersect=S.segmentsIntersect,r.segmentDistance=S.segmentDistance,r.getTextLocation=S.getTextLocation,r.clearLocationCache=S.clearLocationCache,r.getVisibleSegment=S.getVisibleSegment,r.findPointOnPath=S.findPointOnPath;var M=Ki();r.extendFlat=M.extendFlat,r.extendDeep=M.extendDeep,r.extendDeepAll=M.extendDeepAll,r.extendDeepNoArrays=M.extendDeepNoArrays;var C=ap();r.log=C.log,r.warn=C.warn,r.error=C.error;var _=(Vm(),Po(Ov));r.counterRegex=_.counter;var T=Cx();r.throttle=T.throttle,r.throttleDone=T.done,r.clearThrottle=T.clear;var f=i1();r.getGraphDiv=f.getGraphDiv,r.isPlotDiv=f.isPlotDiv,r.removeElement=f.removeElement,r.addStyleRule=f.addStyleRule,r.addRelatedStyleRule=f.addRelatedStyleRule,r.deleteRelatedStyleRule=f.deleteRelatedStyleRule,r.setStyleOnHover=f.setStyleOnHover,r.getFullTransformMatrix=f.getFullTransformMatrix,r.getElementTransformMatrix=f.getElementTransformMatrix,r.getElementAndAncestors=f.getElementAndAncestors,r.equalDomRects=f.equalDomRects,r.clearResponsive=EI(),r.preserveDrawingBuffer=CI(),r.makeTraceGroups=LI(),r._=PI(),r.notifier=Pw(),r.filterUnique=Bw(),r.filterVisible=RI(),r.pushUnique=Rw(),r.increment=II(),r.cleanNumber=(FI(),Po(Ow)).default,r.slugify=zI(),r.ensureNumber=function(q){return k(q)?(q=Number(q),q>e||q=q?!1:k(Y)&&Y>=0&&Y%1===0},r.noop=Ax(),r.identity=s1(),r.repeat=function(Y,q){for(var Z=new Array(q),ee=0;eeZ?Math.max(Z,Math.min(q,Y)):Math.max(q,Math.min(Z,Y))},r.bBoxIntersect=function(Y,q,Z){return Z=Z||0,Y.left<=q.right+Z&&q.left<=Y.right+Z&&Y.top<=q.bottom+Z&&q.top<=Y.bottom+Z},r.simpleMap=function(Y,q,Z,ee,ae){for(var he=Y.length,xe=new Array(he),we=0;we=Math.pow(2,Z)?ae>10?(r.warn("randstr failed uniqueness"),xe):Y(q,Z,ee,(ae||0)+1):xe},r.OptionControl=function(Y,q){Y||(Y={}),q||(q="opt");var Z={};return Z.optionList=[],Z._newoption=function(ee){ee[q]=Y,Z[ee.name]=ee,Z.optionList.push(ee)},Z["_"+q]=Y,Z},r.smooth=function(Y,q){if(q=Math.round(q)||0,q<2)return Y;var Z=Y.length,ee=2*Z,ae=2*q-1,he=new Array(ae),xe=new Array(Z),we,Me,Se,Ie;for(we=0;we=ee&&(Se-=ee*Math.floor(Se/ee)),Se<0?Se=-1-Se:Se>=Z&&(Se=ee-1-Se),Ie+=Y[Se]*he[Me];xe[we]=Ie}return xe},r.syncOrAsync=function(Y,q,Z){var ee,ae;function he(){return r.syncOrAsync(Y,q,Z)}for(;Y.length;)if(ae=Y.splice(0,1)[0],ee=ae(q),ee&&ee.then)return ee.then(he);return Z&&Z(q)},r.stripTrailingSlash=function(Y){return Y.slice(-1)==="/"?Y.slice(0,-1):Y},r.noneOrAll=function(Y,q,Z){if(Y){var ee=!1,ae=!0,he,xe;for(he=0;he0?ae:0})},r.fillArray=function(Y,q,Z,ee){if(ee=ee||r.identity,r.isArrayOrTypedArray(Y))for(var ae=0;aez.test(window.navigator.userAgent);var I=/Firefox\/(\d+)\.\d+/;r.getFirefoxVersion=function(){var Y=I.exec(window.navigator.userAgent);if(Y&&Y.length===2){var q=parseInt(Y[1]);if(!isNaN(q))return q}return null},r.isD3Selection=function(Y){return Y instanceof p.selection},r.ensureSingle=function(Y,q,Z,ee){var ae=Y.select(q+(Z?"."+Z:""));if(ae.size())return ae;var he=Y.append(q);return Z&&he.classed(Z,!0),ee&&he.call(ee),he},r.ensureSingleById=function(Y,q,Z,ee){var ae=Y.select(q+"#"+Z);if(ae.size())return ae;var he=Y.append(q).attr("id",Z);return ee&&he.call(ee),he},r.objectFromPath=function(Y,q){for(var Z=Y.split("."),ee,ae=ee={},he=0;he1?ae+xe[1]:"";if(he&&(xe.length>1||we.length>4||Z))for(;ee.test(we);)we=we.replace(ee,"$1"+he+"$2");return we+Me},r.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var F=/^\w*$/;r.templateString=function(Y,q){var Z={};return Y.replace(r.TEMPLATE_STRING_REGEX,function(ee,ae){var he;return F.test(ae)?he=q[ae]:(Z[ae]=Z[ae]||r.nestedProperty(q,ae).get,he=Z[ae](!0)),he!==void 0?he:""})};var P={max:10,count:0,name:"hovertemplate"};r.hovertemplateString=Y=>ne(lo(Li({},Y),{opts:P}));var j={max:10,count:0,name:"texttemplate"};r.texttemplateString=Y=>ne(lo(Li({},Y),{opts:j}));var U=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function $(Y){var q=Y.match(U);return q?{key:q[1],op:q[2],number:Number(q[3])}:{key:Y,op:null,number:null}}var Q={max:10,count:0,name:"texttemplate",parseMultDiv:!0};r.texttemplateStringForShapes=Y=>ne(lo(Li({},Y),{opts:Q}));var re=/^[:|\|]/;function ne({data:Y=[],locale:q,fallback:Z,labels:ee={},opts:ae,template:he}){return he.replace(r.TEMPLATE_STRING_REGEX,(xe,we,Me)=>{let Se=["xother","yother"].includes(we),Ie=["_xother","_yother"].includes(we),Ve=["_xother_","_yother_"].includes(we),Ge=["xother_","yother_"].includes(we),ke=Se||Ie||Ge||Ve;(Ie||Ve)&&(we=we.substring(1)),(Ge||Ve)&&(we=we.substring(0,we.length-1));let _e=null,ce=null;if(ae.parseMultDiv){var ve=$(we);we=ve.key,_e=ve.op,ce=ve.number}let le;if(ke){if(ee[we]===void 0)return"";le=ee[we]}else for(let Ye of Y)if(Ye){if(Ye.hasOwnProperty(we)){le=Ye[we];break}if(F.test(we)||(le=r.nestedProperty(Ye,we).get(!0)),le!==void 0)break}if(le===void 0){let{count:Ye,max:yt,name:gt}=ae,Tt=Z===!1?xe:Z;return Ye=se&&xe<=G,Se=we>=se&&we<=G;if(Me&&(ee=10*ee+xe-se),Se&&(ae=10*ae+we-se),!Me||!Se){if(ee!==ae)return ee-ae;if(xe!==we)return xe-we}}return ae-ee};var X=2e9;r.seedPseudoRandom=function(){X=2e9},r.pseudoRandom=function(){var Y=X;return X=(69069*X+1)%4294967296,Math.abs(X-Y)<429496729?r.pseudoRandom():X/4294967296},r.fillText=function(Y,q,Z){var ee=Array.isArray(Z)?function(xe){Z.push(xe)}:function(xe){Z.text=xe},ae=r.extractOption(Y,q,"htx","hovertext");if(r.isValidTextValue(ae))return ee(ae);var he=r.extractOption(Y,q,"tx","text");if(r.isValidTextValue(he))return ee(he)},r.isValidTextValue=function(Y){return Y||Y===0},r.formatPercent=function(Y,q){q=q||0;for(var Z=(Math.round(100*Y*Math.pow(10,q))*Math.pow(.1,q)).toFixed(q)+"%",ee=0;ee1&&(Se=1):Se=0,r.strTranslate(ae-Se*(Z+xe),he-Se*(ee+we))+r.strScale(Se)+(Me?"rotate("+Me+(q?"":" "+Z+" "+ee)+")":"")},r.setTransormAndDisplay=function(Y,q){Y.attr("transform",r.getTextTransform(q)),Y.style("display",q.scale?null:"none")},r.ensureUniformFontSize=function(Y,q){var Z=r.extendFlat({},q);return Z.size=Math.max(q.size,Y._fullLayout.uniformtext.minsize||0),Z},r.join2=function(Y,q,Z){var ee=Y.length;return ee>1?Y.slice(0,-1).join(q)+Z+Y[ee-1]:Y.join(q)},r.bigFont=function(Y){return Math.round(1.2*Y)};var K=r.getFirefoxVersion(),H=K!==null&&K<86;r.getPositionFromD3Event=function(){return H?[p.event.layerX,p.event.layerY]:[p.event.offsetX,p.event.offsetY]}}}),BI=ze({"build/plotcss.js"(){"use strict";var J=Nr(),V={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;text-decoration:underline;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--account":"margin-top:16px;padding:8px;border-radius:3px;font-size:.9em;background-color:#edf1f8;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(b in V)p=b.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),J.addStyleRule(p,V[b]);var p,b}}),Vw=ze({"node_modules/is-browser/client.js"(J,V){V.exports=!0}}),Gw=ze({"node_modules/has-hover/index.js"(J,V){"use strict";var p=Vw(),b;typeof window.matchMedia=="function"?b=!window.matchMedia("(hover: none)").matches:b=p,V.exports=b}}),jv=ze({"node_modules/events/events.js"(J,V){"use strict";var p=typeof Reflect=="object"?Reflect:null,b=p&&typeof p.apply=="function"?p.apply:function(C,_,T){return Function.prototype.apply.call(C,_,T)},E;p&&typeof p.ownKeys=="function"?E=p.ownKeys:Object.getOwnPropertySymbols?E=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:E=function(C){return Object.getOwnPropertyNames(C)};function k(M){console&&console.warn&&console.warn(M)}var l=Number.isNaN||function(C){return C!==C};function e(){e.init.call(this)}V.exports=e,V.exports.once=i,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var t=10;function n(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return t},set:function(M){if(typeof M!="number"||M<0||l(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");t=M}}),e.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},e.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||l(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function r(M){return M._maxListeners===void 0?e.defaultMaxListeners:M._maxListeners}e.prototype.getMaxListeners=function(){return r(this)},e.prototype.emit=function(C){for(var _=[],T=1;T0&&(A=_[0]),A instanceof Error)throw A;var x=new Error("Unhandled error."+(A?" ("+A.message+")":""));throw x.context=A,x}var z=u[C];if(z===void 0)return!1;if(typeof z=="function")b(z,this,_);else for(var I=z.length,O=h(z,I),T=0;T0&&A.length>f&&!A.warned){A.warned=!0;var x=new Error("Possible EventEmitter memory leak detected. "+A.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");x.name="MaxListenersExceededWarning",x.emitter=M,x.type=C,x.count=A.length,k(x)}return M}e.prototype.addListener=function(C,_){return a(this,C,_,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(C,_){return a(this,C,_,!0)};function o(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(M,C,_){var T={fired:!1,wrapFn:void 0,target:M,type:C,listener:_},f=o.bind(T);return f.listener=_,T.wrapFn=f,f}e.prototype.once=function(C,_){return n(_),this.on(C,s(this,C,_)),this},e.prototype.prependOnceListener=function(C,_){return n(_),this.prependListener(C,s(this,C,_)),this},e.prototype.removeListener=function(C,_){var T,f,u,A,x;if(n(_),f=this._events,f===void 0)return this;if(T=f[C],T===void 0)return this;if(T===_||T.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete f[C],f.removeListener&&this.emit("removeListener",C,T.listener||_));else if(typeof T!="function"){for(u=-1,A=T.length-1;A>=0;A--)if(T[A]===_||T[A].listener===_){x=T[A].listener,u=A;break}if(u<0)return this;u===0?T.shift():v(T,u),T.length===1&&(f[C]=T[0]),f.removeListener!==void 0&&this.emit("removeListener",C,x||_)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(C){var _,T,f;if(T=this._events,T===void 0)return this;if(T.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):T[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete T[C]),this;if(arguments.length===0){var u=Object.keys(T),A;for(f=0;f=0;f--)this.removeListener(C,_[f]);return this};function c(M,C,_){var T=M._events;if(T===void 0)return[];var f=T[C];return f===void 0?[]:typeof f=="function"?_?[f.listener||f]:[f]:_?g(f):h(f,f.length)}e.prototype.listeners=function(C){return c(this,C,!0)},e.prototype.rawListeners=function(C){return c(this,C,!1)},e.listenerCount=function(M,C){return typeof M.listenerCount=="function"?M.listenerCount(C):m.call(M,C)},e.prototype.listenerCount=m;function m(M){var C=this._events;if(C!==void 0){var _=C[M];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}e.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]};function h(M,C){for(var _=new Array(C),T=0;T{},{passive:!0}),E},triggerHandler:function(E,k,l){var e,t=E._ev;if(!t)return;var n=t._events[k];if(!n)return;function r(o){if(o.listener){if(t.removeListener(k,o.listener),!o.fired)return o.fired=!0,o.listener.apply(t,[l])}else return o.apply(t,[l])}n=Array.isArray(n)?n:[n];var a;for(a=0;ab.queueLength&&(l.undoQueue.queue.shift(),l.undoQueue.index--)},k.startSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!0,l.undoQueue.beginSequence=!0},k.stopSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!1,l.undoQueue.beginSequence=!1},k.undo=function(e){var t,n;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=P.length)return!1;if(I.dimensions===2){if(D++,O.length===D)return I;var j=O[D];if(!S(j))return!1;I=P[F][j]}else I=P[F]}else I=P}}return I}function S(I){return I===Math.round(I)&&I>=0}function M(I){var O,D;O=V.modules[I]._module,D=O.basePlotModule;var B={};B.type=null;var F=n({},b),P=n({},O.attributes);J.crawl(P,function($,Q,re,ne,se){o(F,se).set(void 0),$===void 0&&o(P,se).set(void 0)}),n(B,F),V.traceIs(I,"noOpacity")&&delete B.opacity,V.traceIs(I,"showLegend")||(delete B.showlegend,delete B.legendgroup),V.traceIs(I,"noHover")&&(delete B.hoverinfo,delete B.hoverlabel),O.selectPoints||delete B.selectedpoints,n(B,P),D.attributes&&n(B,D.attributes),B.type=I;var j={meta:O.meta||{},categories:O.categories||{},animatable:!!O.animatable,type:I,attributes:T(B)};if(O.layoutAttributes){var U={};n(U,O.layoutAttributes),j.layoutAttributes=T(U)}return O.animatable||J.crawl(j,function($){J.isValObject($)&&"anim"in $&&delete $.anim}),j}function C(){var I={},O,D;n(I,E);for(O in V.subplotsRegistry)if(D=V.subplotsRegistry[O],!!D.layoutAttributes)if(Array.isArray(D.attr))for(var B=0;B=r&&(n._input||{})._templateitemname;o&&(a=r);var s=t+"["+a+"]",c;function m(){c={},o&&(c[s]={},c[s][b]=o)}m();function h(w,S){c[w]=S}function v(w,S){o?V.nestedProperty(c[s],w).set(S):c[s+"."+w]=S}function g(){var w=c;return m(),w}function i(w,S){w&&v(w,S);var M=g();for(var C in M)V.nestedProperty(e,C).set(M[C])}return{modifyBase:h,modifyItem:v,getUpdateObj:g,applyUpdate:i}}}}),hc=ze({"src/plots/cartesian/constants.js"(J,V){"use strict";var p=(Vm(),Po(Ov)).counter;V.exports={idRegex:{x:p("x","( domain)?"),y:p("y","( domain)?")},attrRegex:p("[xy]axis"),xAxisMatch:p("xaxis"),yAxisMatch:p("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}}),Xl=ze({"src/plots/cartesian/axis_ids.js"(J){"use strict";var V=mi(),p=hc();J.id2name=function(k){if(!(typeof k!="string"||!k.match(p.AX_ID_PATTERN))){var l=k.split(" ")[0].slice(1);return l==="1"&&(l=""),k.charAt(0)+"axis"+l}},J.name2id=function(k){if(k.match(p.AX_NAME_PATTERN)){var l=k.slice(5);return l==="1"&&(l=""),k.charAt(0)+l}},J.cleanId=function(k,l,e){var t=/( domain)$/.test(k);if(!(typeof k!="string"||!k.match(p.AX_ID_PATTERN))&&!(l&&k.charAt(0)!==l)&&!(t&&!e)){var n=k.split(" ")[0].slice(1).replace(/^0+/,"");return n==="1"&&(n=""),k.charAt(0)+n+(t&&e?" domain":"")}},J.list=function(E,k,l){var e=E._fullLayout;if(!e)return[];var t=J.listIds(E,k),n=new Array(t.length),r;for(r=0;re?1:-1:+(E.slice(1)||1)-+(k.slice(1)||1)},J.ref2id=function(E){return/^[xyz]/.test(E)?E.split(" ")[0]:!1};function b(E,k){if(k&&k.length){for(var l=0;l0?".":"")+o;p.isPlainObject(s)?e(s,n,c,a+1):n(c,o,s)}})}}}),cl=ze({"src/plots/plots.js"(J,V){"use strict";var p=ci(),b=jm().timeFormatLocale,E=Cw().formatLocale,k=ao(),l=Lw(),e=ev().version,t=mi(),n=Wm(),r=hs(),a=Nr(),o=Qn(),s=No().BADNUM,c=Xl(),m=iv().clearOutline,h=Lx(),v=o1(),g=Hw(),i=zf().getModuleCalcData,w=a.relinkPrivateKeys,S=a._,M=V.exports={};a.extendFlat(M,t),M.attributes=ws(),M.attributes.type.values=M.allTypes,M.fontAttrs=Qs(),M.layoutAttributes=Gm();var C=NI();M.executeAPICommand=C.executeAPICommand,M.computeAPICommandBindings=C.computeAPICommandBindings,M.manageCommandObserver=C.manageCommandObserver,M.hasSimpleAPICommandBindings=C.hasSimpleAPICommandBindings,M.redrawText=function(G){return G=a.getGraphDiv(G),new Promise(function(X){setTimeout(function(){G._fullLayout&&(t.getComponentMethod("annotations","draw")(G),t.getComponentMethod("legend","draw")(G),t.getComponentMethod("colorbar","draw")(G),X(M.previousPromises(G)))},300)})},M.resize=function(G){G=a.getGraphDiv(G);var X,K=new Promise(function(H,Y){(!G||a.isHidden(G))&&Y(new Error("Resize must be passed a displayed plot div element.")),G._redrawTimer&&clearTimeout(G._redrawTimer),G._resolveResize&&(X=G._resolveResize),G._resolveResize=H,G._redrawTimer=setTimeout(function(){if(!G.layout||G.layout.width&&G.layout.height||a.isHidden(G)){H(G);return}delete G.layout.width,delete G.layout.height;var q=G.changed;G.autoplay=!0,t.call("relayout",G,{autosize:!0}).then(function(){G.changed=q,G._resolveResize===H&&(delete G._resolveResize,H(G))})},100)});return X&&X(K),K},M.previousPromises=function(G){if((G._promises||[]).length)return Promise.all(G._promises).then(function(){G._promises=[]})},M.sendDataToCloud=function(G,X){G.emit("plotly_beforeexport");let K=new URL(X).origin;var H=M.graphJson(G,!1,"object");H.version=e;var Y=new URL(X);Y.searchParams.set("origin",window.location.origin);var q=window.open(Y.href,"_blank");if(!q){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),G.emit("plotly_exportfail");return}var Z=function(ee){ee.origin===K&&ee.data&&ee.data.type==="CHART_AUTH_SUCCESS"&&(q.postMessage({type:"chart",chart:H},K),window.removeEventListener("message",Z),G.emit("plotly_afterexport"))};return window.addEventListener("message",Z),!1};var _=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],T=["year","month","dayMonth","dayMonthYear"];M.supplyDefaults=function(G,X){var K=X&&X.skipUpdateCalc,H=G._fullLayout||{};if(H._skipDefaults){delete H._skipDefaults;return}var Y=G._fullLayout={},q=G.layout||{},Z=G._fullData||[],ee=G._fullData=[],ae=G.data||[],he=G.calcdata||[],xe=G._context||{},we;G._transitionData||M.createTransitionData(G),Y._dfltTitle={plot:S(G,"Click to enter Plot title"),subtitle:S(G,"Click to enter Plot subtitle"),x:S(G,"Click to enter X axis title"),y:S(G,"Click to enter Y axis title"),colorbar:S(G,"Click to enter Colorscale title"),annotation:S(G,"new text")},Y._traceWord=S(G,"trace");var Me=A(G,_);if(H._initialAutoSizeIsDone){var Se=H.width,Ie=H.height;M.supplyLayoutGlobalDefaults(q,Y,Me),q.width||(Y.width=Se),q.height||(Y.height=Ie),M.sanitizeMargins(Y)}else{M.supplyLayoutGlobalDefaults(q,Y,Me);var Ve=!q.width||!q.height,Ge=Y.autosize,ke=xe.autosizable,_e=Ve&&(Ge||ke);_e?M.plotAutoSize(G,q,Y):Ve&&M.sanitizeMargins(Y),!Ge&&Ve&&(q.width=Y.width,q.height=Y.height)}Y._d3locale=x(Me,Y.separators),Y._extraFormat=A(G,T),Y._initialAutoSizeIsDone=!0,Y._dataLength=ae.length,Y._modules=[],Y._visibleModules=[],Y._basePlotModules=[];var ce=Y._subplots=u(),ve=Y._splomAxes={x:{},y:{}},le=Y._splomSubplots={};Y._splomGridDflt={},Y._scatterStackOpts={},Y._firstScatter={},Y._alignmentOpts={},Y._colorAxes={},Y._requestRangeslider={},Y._traceUids=f(Z,ae),M.supplyDataDefaults(ae,ee,q,Y);var Ae=Object.keys(ve.x),Be=Object.keys(ve.y);if(Ae.length>1&&Be.length>1){for(t.getComponentMethod("grid","sizeDefaults")(q,Y),we=0;we15&&Be.length>15&&Y.shapes.length===0&&Y.images.length===0,M.linkSubplots(ee,Y,Z,H),M.cleanPlot(ee,Y,Z,H);var Tt=!!(H._has&&H._has("cartesian")),At=!!(Y._has&&Y._has("cartesian")),$t=Tt,rr=At;$t&&!rr?H._bgLayer.remove():rr&&!$t&&(Y._shouldCreateBgLayer=!0),H._zoomlayer&&!G._dragging&&m({_fullLayout:H}),z(ee,Y),w(Y,H),t.getComponentMethod("colorscale","crossTraceDefaults")(ee,Y),Y._preGUI||(Y._preGUI={}),Y._tracePreGUI||(Y._tracePreGUI={});var _r=Y._tracePreGUI,Xt={},or;for(or in _r)Xt[or]="old";for(we=0;we0){var xe=1-2*q;Z=Math.round(xe*Z),ee=Math.round(xe*ee)}}var we=M.layoutAttributes.width.min,Me=M.layoutAttributes.height.min;Z1,Ie=!K.height&&Math.abs(H.height-ee)>1;(Ie||Se)&&(Se&&(H.width=Z),Ie&&(H.height=ee)),X._initialAutoSize||(X._initialAutoSize={width:Z,height:ee}),M.sanitizeMargins(H)},M.supplyLayoutModuleDefaults=function(G,X,K,H){var Y=t.componentsRegistry,q=X._basePlotModules,Z,ee,ae,he=t.subplotsRegistry.cartesian;for(Z in Y)ae=Y[Z],ae.includeBasePlot&&ae.includeBasePlot(G,X);q.length||q.push(he),X._has("cartesian")&&(t.getComponentMethod("grid","contentDefaults")(G,X),he.finalizeSubplots(G,X));for(var xe in X._subplots)X._subplots[xe].sort(a.subplotSort);for(ee=0;ee1&&(K.l/=Ge,K.r/=Ge)}if(Me){var ke=(K.t+K.b)/Me;ke>1&&(K.t/=ke,K.b/=ke)}var _e=K.xl!==void 0?K.xl:K.x,ce=K.xr!==void 0?K.xr:K.x,ve=K.yt!==void 0?K.yt:K.y,le=K.yb!==void 0?K.yb:K.y;Se[X]={l:{val:_e,size:K.l+Ve},r:{val:ce,size:K.r+Ve},b:{val:le,size:K.b+Ve},t:{val:ve,size:K.t+Ve}},Ie[X]=1}if(!H._replotting)return M.doAutoMargin(G)}};function P(G){if("_redrawFromAutoMarginCount"in G._fullLayout)return!1;var X=c.list(G,"",!0);for(var K in X)if(X[K].autoshift||X[K].shift)return!0;return!1}M.doAutoMargin=function(G){var X=G._fullLayout,K=X.width,H=X.height;X._size||(X._size={}),D(X);var Y=X._size,q=X.margin,Z={t:0,b:0,l:0,r:0},ee=a.extendFlat({},Y),ae=q.l,he=q.r,xe=q.t,we=q.b,Me=X._pushmargin,Se=X._pushmarginIds,Ie=X.minreducedwidth,Ve=X.minreducedheight;if(q.autoexpand!==!1){for(var Ge in Me)Se[Ge]||delete Me[Ge];var ke=G._fullLayout._reservedMargin;for(var _e in ke)for(var ce in ke[_e]){var ve=ke[_e][ce];Z[ce]=Math.max(Z[ce],ve)}Me.base={l:{val:0,size:ae},r:{val:1,size:he},t:{val:1,size:xe},b:{val:0,size:we}};for(var le in Z){var Ae=0;for(var Be in Me)Be!=="base"&&k(Me[Be][le].size)&&(Ae=Me[Be][le].size>Ae?Me[Be][le].size:Ae);var Xe=Math.max(0,q[le]-Ae);Z[le]=Math.max(0,Z[le]-Xe)}for(var Ye in Me){var yt=Me[Ye].l||{},gt=Me[Ye].b||{},Tt=yt.val,At=yt.size,$t=gt.val,rr=gt.size,_r=K-Z.r-Z.l,Xt=H-Z.t-Z.b;for(var or in Me){if(k(At)&&Me[or].r){var Ot=Me[or].r.val,vt=Me[or].r.size;if(Ot>Tt){var ht=(At*Ot+(vt-_r)*Tt)/(Ot-Tt),De=(vt*(1-Tt)+(At-_r)*(1-Ot))/(Ot-Tt);ht+De>ae+he&&(ae=ht,he=De)}}if(k(rr)&&Me[or].t){var Ne=Me[or].t.val,We=Me[or].t.size;if(Ne>$t){var Ke=(rr*Ne+(We-Xt)*$t)/(Ne-$t),Je=(We*(1-$t)+(rr-Xt)*(1-Ne))/(Ne-$t);Ke+Je>we+xe&&(we=Ke,xe=Je)}}}}}var et=a.constrain(K-q.l-q.r,B,Ie),Mt=a.constrain(H-q.t-q.b,F,Ve),pt=Math.max(0,K-et),Pt=Math.max(0,H-Mt);if(pt){var Ct=(ae+he)/pt;Ct>1&&(ae/=Ct,he/=Ct)}if(Pt){var qt=(we+xe)/Pt;qt>1&&(we/=qt,xe/=qt)}if(Y.l=Math.round(ae)+Z.l,Y.r=Math.round(he)+Z.r,Y.t=Math.round(xe)+Z.t,Y.b=Math.round(we)+Z.b,Y.p=Math.round(q.pad),Y.w=Math.round(K)-Y.l-Y.r,Y.h=Math.round(H)-Y.t-Y.b,!X._replotting&&(M.didMarginChange(ee,Y)||P(G))){"_redrawFromAutoMarginCount"in X?X._redrawFromAutoMarginCount++:X._redrawFromAutoMarginCount=1;var Vt=3*(1+Object.keys(Se).length);if(X._redrawFromAutoMarginCount1)return!0}return!1},M.graphJson=function(G,X=!1,K="json",H=!1,Y=!1){(H&&X&&!G._fullData||H&&!X&&!G._fullLayout)&&M.supplyDefaults(G);var q=H?G._fullData:G.data,Z=H?G._fullLayout:G.layout,ee=(G._transitionData||{})._frames;function ae(we,Me){if(typeof we=="function")return Me?"_function_":null;if(a.isPlainObject(we)){var Se={};return Object.keys(we).sort().forEach(function(ke){if(["_","["].indexOf(ke.charAt(0))===-1){if(typeof we[ke]=="function"){Me&&(Se[ke]="_function");return}Se[ke]=ae(we[ke],Me)}}),Se}var Ie=Array.isArray(we),Ve=a.isTypedArray(we);if((Ie||Ve)&&we.dtype&&we.shape){var Ge=we.bdata;return ae({dtype:we.dtype,shape:we.shape,bdata:a.isArrayBuffer(Ge)?l.encode(Ge):Ge},Me)}return Ie?we.map(function(ke){return ae(ke,Me)}):Ve?a.simpleMap(we,a.identity):a.isJSDate(we)?a.ms2DateTimeLocal(+we):we}var he={data:(q||[]).map(function(we){var Me=ae(we);return X&&delete Me.fit,Me})};if(!X&&(he.layout=ae(Z),H)){var xe=Z._size;he.layout.computed={margin:{b:xe.b,l:xe.l,r:xe.r,t:xe.t}}}return ee&&(he.frames=ae(ee)),Y&&(he.config=ae(G._context,!0)),K==="object"?he:JSON.stringify(he)},M.modifyFrames=function(G,X){var K,H,Y,q=G._transitionData._frames,Z=G._transitionData._frameHash;for(K=0;K0&&(G._transitioningWithDuration=!0),G._transitionData._interruptCallbacks.push(function(){H=!0}),K.redraw&&G._transitionData._interruptCallbacks.push(function(){return t.call("redraw",G)}),G._transitionData._interruptCallbacks.push(function(){G.emit("plotly_transitioninterrupted",[])});var Me=0,Se=0;function Ie(){return Me++,function(){Se++,!H&&Se===Me&&ee(we)}}K.runFn(Ie),setTimeout(Ie())})}function ee(we){if(G._transitionData)return q(G._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(K.redraw)return t.call("redraw",G)}).then(function(){G._transitioning=!1,G._transitioningWithDuration=!1,G.emit("plotly_transitioned",[])}).then(we)}function ae(){if(G._transitionData)return G._transitioning=!1,Y(G._transitionData._interruptCallbacks)}var he=[M.previousPromises,ae,K.prepareFn,M.rehover,M.reselect,Z],xe=a.syncOrAsync(he,G);return(!xe||!xe.then)&&(xe=Promise.resolve()),xe.then(function(){return G})}M.doCalcdata=function(G,X){var K=c.list(G),H=G._fullData,Y=G._fullLayout,q,Z,ee,ae=new Array(H.length),he=(G.calcdata||[]).slice();for(G.calcdata=ae,Y._numBoxes=0,Y._numViolins=0,Y._violinScaleGroupStats={},G._hmpixcount=0,G._hmlumcount=0,Y._piecolormap={},Y._sunburstcolormap={},Y._treemapcolormap={},Y._iciclecolormap={},Y._funnelareacolormap={},ee=0;eeQ?Q.match(l):null;J.matchTex=e,J.convertToTspans=function(Q,re,ne){var se=Q.text(),G=!Q.attr("data-notex")&&re&&re._context.typesetMath&&e(se);G&&!m()&&(G=null);var X=V.select(Q.node().parentNode);if(X.empty())return;var K=Q.attr("class")?Q.attr("class").split(" ")[0]:"text";K+="-math",X.selectAll("svg."+K).remove(),X.selectAll("g."+K+"-group").remove(),Q.style("display",null).attr({"data-unformatted":se,"data-math":"N"});function H(){X.empty()||(K=Q.attr("class")+"-math",X.select("svg."+K).remove()),Q.text("").style("white-space","pre");var Y=P(Q.node(),se);Y&&Q.style("pointer-events","all"),J.positionText(Q),ne&&ne.call(Q)}return G?(re&&re._promises||[]).push(new Promise(function(Y){Q.style("display","none");var q=parseInt(Q.node().style.fontSize,10),Z={fontSize:q},ee=Q.attr("text-anchor");h(G[2],Z,function(ae,he,xe){X.selectAll("svg."+K).remove(),X.selectAll("g."+K+"-group").remove();var we=ae&&ae.select("svg");if(!we||!we.node()){H(),Y();return}Q.style("display","none");var Me=X.append("g").classed(K+"-group",!0).attr({"pointer-events":"none","data-unformatted":se,"data-math":"Y"});Me.node().appendChild(we.node()),he&&he.node()&&we.node().insertBefore(he.node().cloneNode(!0),we.node().firstChild);var Se=xe.width,Ie=xe.height;we.attr({class:K,height:Ie,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":Z.fontSize+"px"});var Ve=Q.node().style.fill||"black",Ge=we.select("g");Ge.attr({fill:Ve,stroke:Ve});var ke=Ge.node().getBoundingClientRect(),_e=ke.width,ce=ke.height;(_e>Se||ce>Ie)&&(we.style("overflow","hidden"),ke=we.node().getBoundingClientRect(),_e=ke.width,ce=ke.height);var ve=+Q.attr("x"),le=+Q.attr("y"),Ae=q||Q.node().getBoundingClientRect().height,Be=-Ae/4;K[0]==="y"?Me.attr({transform:"rotate("+[-90,ve,le]+")"+b(-_e/2,Be-ce/2)}):K[0]==="l"?le=Be-ce/2:K[0]==="a"&&K.indexOf("atitle")!==0?(ve=0,le=Be):(ve=ve-_e*(ee==="middle"?.5:ee==="end"?1:0),le=le+Be-ce/2),we.attr({x:ve,y:le}),ne&&ne.call(Q,Me),Y(Me)})})):H(),Q};var t=/(<|<|<)/g,n=/(>|>|>)/g;function r(Q){return Q.replace(t,"\\lt ").replace(n,"\\gt ")}var a=null,o=()=>typeof MathJax<"u"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,s=!1,c=!1;function m(){let Q=o();return Q===3||Q===4?!0:(Q===null?s||(s=!0,p.warn("MathJax is not loaded. Math equations will not be rendered.")):c||(c=!0,p.warn("Unsupported MathJax version:",MathJax.version)),!1)}function h(Q,re,ne){let se=o();var G;let X=function(){if(!a){let q=MathJax._.output.svg_ts.SVG,Z=p.extendFlat({},MathJax.config.svg,{fontCache:"local"});se===4&&(Z.linebreaks=p.extendFlat({},Z.linebreaks,{inline:!1})),a=MathJax._.mathjax.mathjax.document(document,p.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new q(Z)}))}let H="math-output-"+p.randstr({},64);G=V.select("body").append("div").attr({id:H}).style({visibility:"hidden",position:"absolute","font-size":re.fontSize+"px"});let Y=r(Q).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return a.convert(Y,{display:!1})}).then(function(q){G.node().appendChild(q)})},K=function(){let H=G.select(".MathJax"),Y=!H.empty()&&G.select("svg").node();if(!Y)p.log("There was an error in the tex syntax.",Q),ne();else{let q=Y.getBoundingClientRect(),Z=H.select("defs");ne(H,Z,q)}G.remove()};Promise.resolve().then(X).then(K).catch(H=>{p.log("MathJax typesetting failed.",Q,H),G&&G.remove(),ne()})}var v={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},g={sub:"0.3em",sup:"-0.6em"},i={sub:"-0.21em",sup:"0.42em"},w="\u200B",S=["http:","https:","mailto:","",void 0,":"],M=J.NEWLINES=/(\r\n?|\n)/g,C=/(<[^<>]*>)/,_=/<(\/?)([^ >]*)(\s+(.*))?>/i,T=//i;J.BR_TAG_ALL=//gi;var f=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,u=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,A=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,x=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function z(Q,re){if(!Q)return null;var ne=Q.match(re),se=ne&&(ne[3]||ne[4]);return se&&B(se)}var I=/(^|;)\s*color:/;J.plainText=function(Q,re){re=re||{};for(var ne=re.len!==void 0&&re.len!==-1?re.len:1/0,se=re.allowedTags!==void 0?re.allowedTags:["br"],G="...",X=G.length,K=Q.split(C),H=[],Y="",q=0,Z=0;ZX?H.push(ee.slice(0,Math.max(0,we-X))+G):H.push(ee.slice(0,we));break}Y=""}}return H.join("")};var O={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},D=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function B(Q){return Q.replace(D,function(re,ne){var se;return ne.charAt(0)==="#"?se=F(ne.charAt(1)==="x"?parseInt(ne.slice(2),16):parseInt(ne.slice(1),10)):se=O[ne],se||re})}J.convertEntities=B;function F(Q){if(!(Q>1114111)){var re=String.fromCodePoint;if(re)return re(Q);var ne=String.fromCharCode;return Q<=65535?ne(Q):ne((Q>>10)+55232,Q%1024+56320)}}function P(Q,re){re=re.replace(M," ");var ne=!1,se=[],G,X=-1;function K(){X++;var _e=document.createElementNS(E.svg,"tspan");V.select(_e).attr({class:"line",dy:X*k+"em"}),Q.appendChild(_e),G=_e;var ce=se;if(se=[{node:_e}],ce.length>1)for(var ve=1;ve.",re);return}var ce=se.pop();_e!==ce.type&&p.log("Start tag <"+ce.type+"> doesnt match end tag <"+_e+">. Pretending it did match.",re),G=se[se.length-1].node}var Z=T.test(re);Z?K():(G=Q,se=[{node:Q}]);for(var ee=re.split(C),ae=0;ae=0;g--,i++){var w=m[g];v[i]=[1-w[0],w[1]]}return v}function s(m,h){h=h||{};for(var v=m.domain,g=m.range,i=g.length,w=new Array(i),S=0;Sv-m?m=v-(h-v):h-v=0?w=n.colorscale.sequential:w=n.colorscale.sequentialminus,s._sync("colorscale",w)}}}}),fl=ze({"src/components/colorscale/index.js"(J,V){"use strict";var p=Bv(),b=Bf();V.exports={moduleType:"component",name:"colorscale",attributes:qs(),layoutAttributes:Ww(),supplyLayoutDefaults:jI(),handleDefaults:qc(),crossTraceDefaults:UI(),calc:Qf(),scales:p.scales,defaultScale:p.defaultScale,getScale:p.get,isValidScale:p.isValid,hasColorscale:b.hasColorscale,extractOpts:b.extractOpts,extractScale:b.extractScale,flipScale:b.flipScale,makeColorScaleFunc:b.makeColorScaleFunc,makeColorScaleFuncFromTrace:b.makeColorScaleFuncFromTrace}}}),el=ze({"src/traces/scatter/subtypes.js"(J,V){"use strict";var p=Nr(),b=Ff().isTypedArraySpec;V.exports={hasLines:function(E){return E.visible&&E.mode&&E.mode.indexOf("lines")!==-1},hasMarkers:function(E){return E.visible&&(E.mode&&E.mode.indexOf("markers")!==-1||E.type==="splom")},hasText:function(E){return E.visible&&E.mode&&E.mode.indexOf("text")!==-1},isBubble:function(E){var k=E.marker;return p.isPlainObject(k)&&(p.isArrayOrTypedArray(k.size)||b(k.size))}}}}),l1=ze({"src/traces/scatter/make_bubble_size_func.js"(J,V){"use strict";var p=ao();V.exports=function(E,k){k||(k=2);var l=E.marker,e=l.sizeref||1,t=l.sizemin||0,n=l.sizemode==="area"?function(r){return Math.sqrt(r/e)}:function(r){return r/e};return function(r){var a=n(r/k);return p(a)&&a>0?Math.max(a,t):0}}}}),kh=ze({"src/components/fx/helpers.js"(J){"use strict";var V=Nr();J.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},J.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var n=e.xaxes||[],r=e.yaxes||[],a=0;a=0&&n.index{let o=r.toLowerCase(),s=r,c=l(a);for(o==="m"&&c.length>2&&(t.push([s,...c.splice(0,2)]),o="l",s=s==="m"?"l":"L");;){if(c.length===p[o])return t.push([s,...c]),"";if(c.length0&&(ce=100,_e=_e.replace("-open","")),_e.indexOf("-dot")>0&&(ce+=200,_e=_e.replace("-dot","")),_e=g.symbolNames.indexOf(_e),_e>=0&&(_e+=ce)}return _e%100>=T||_e>=400?0:Math.floor(Math.max(_e,0))};function u(_e,ce,ve,le){var Ae=_e%100;return g.symbolFuncs[Ae](ce,ve,le)+(_e>=200?f:"")}var A=E("~f"),x={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};g.gradient=function(_e,ce,ve,le,Ae,Be){var Xe=x[le];return z(_e,ce,ve,Xe.type,Ae,Be,Xe.start,Xe.stop,!1,Xe.reversed)};function z(_e,ce,ve,le,Ae,Be,Xe,Ye,yt,gt){var Tt=Ae.length,At;le==="linear"?At={node:"linearGradient",attrs:{x1:Xe.x,y1:Xe.y,x2:Ye.x,y2:Ye.y,gradientUnits:yt?"userSpaceOnUse":"objectBoundingBox"},reversed:gt}:le==="radial"&&(At={node:"radialGradient",reversed:gt});for(var $t=new Array(Tt),rr=0;rr=0&&_e.i===void 0&&(_e.i=Be.i),ce.style("opacity",le.selectedOpacityFn?le.selectedOpacityFn(_e):_e.mo===void 0?Xe.opacity:_e.mo),le.ms2mrc){var yt;_e.ms==="various"||Xe.size==="various"?yt=3:yt=le.ms2mrc(_e.ms),_e.mrc=yt,le.selectedSizeFn&&(yt=_e.mrc=le.selectedSizeFn(_e));var gt=g.symbolNumber(_e.mx||Xe.symbol)||0;_e.om=gt%200>=100;var Tt=ke(_e,ve),At=Z(_e,ve);ce.attr("d",u(gt,yt,Tt,At))}var $t=!1,rr,_r,Xt;if(_e.so)Xt=Ye.outlierwidth,_r=Ye.outliercolor,rr=Xe.outliercolor;else{var or=(Ye||{}).width;Xt=(_e.mlw+1||or+1||(_e.trace?(_e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in _e?_r=_e.mlcc=le.lineScale(_e.mlc):b.isArrayOrTypedArray(Ye.color)?_r=e.defaultLine:_r=Ye.color,b.isArrayOrTypedArray(Xe.color)&&(rr=e.defaultLine,$t=!0),"mc"in _e?rr=_e.mcc=le.markerScale(_e.mc):rr=Xe.color||Xe.colors||"rgba(0,0,0,0)",le.selectedColorFn&&(rr=le.selectedColorFn(_e))}let Ot=_e.mld||(Ye||{}).dash;if(Ot&&g.dashLine(ce,Ot,Xt),_e.om)ce.call(e.stroke,rr).style({"stroke-width":(Xt||1)+"px",fill:"none"});else{ce.style("stroke-width",(_e.isBlank?0:Xt)+"px");var vt=Xe.gradient,ht=_e.mgt;ht?$t=!0:ht=vt&&vt.type,b.isArrayOrTypedArray(ht)&&(ht=ht[0],x[ht]||(ht=0));var De=Xe.pattern,Ne=g.getPatternAttr,We=De&&(Ne(De.shape,_e.i,"")||Ne(De.path,_e.i,""));if(ht&&ht!=="none"){var Ke=_e.mgc;Ke?$t=!0:Ke=vt.color;var Je=ve.uid;$t&&(Je+="-"+_e.i),g.gradient(ce,Ae,Je,ht,[[0,Ke],[1,rr]],"fill")}else if(We){var et=!1,Mt=De.fgcolor;!Mt&&Be&&Be.color&&(Mt=Be.color,et=!0);var pt=Ne(Mt,_e.i,Be&&Be.color||null),Pt=Ne(De.bgcolor,_e.i,null),Ct=De.fgopacity,qt=Ne(De.size,_e.i,8),Vt=Ne(De.solidity,_e.i,.3);et=et||_e.mcc||b.isArrayOrTypedArray(De.shape)||b.isArrayOrTypedArray(De.path)||b.isArrayOrTypedArray(De.bgcolor)||b.isArrayOrTypedArray(De.fgcolor)||b.isArrayOrTypedArray(De.size)||b.isArrayOrTypedArray(De.solidity);var Ht=ve.uid;et&&(Ht+="-"+_e.i),g.pattern(ce,"point",Ae,Ht,We,qt,Vt,_e.mcc,De.fillmode,Pt,pt,Ct)}else b.isArrayOrTypedArray(rr)?e.fill(ce,rr[_e.i]):e.fill(ce,rr);Xt&&e.stroke(ce,_r)}},g.makePointStyleFns=function(_e){var ce={},ve=_e.marker;return ce.markerScale=g.tryColorscale(ve,""),ce.lineScale=g.tryColorscale(ve,"line"),l.traceIs(_e,"symbols")&&(ce.ms2mrc=m.isBubble(_e)?h(_e):function(){return(ve.size||6)/2}),_e.selectedpoints&&b.extendFlat(ce,g.makeSelectedPointStyleFns(_e)),ce},g.makeSelectedPointStyleFns=function(_e){var ce={},ve=_e.selected||{},le=_e.unselected||{},Ae=_e.marker||{},Be=ve.marker||{},Xe=le.marker||{},Ye=Ae.opacity,yt=Be.opacity,gt=Xe.opacity,Tt=yt!==void 0,At=gt!==void 0;(b.isArrayOrTypedArray(Ye)||Tt||At)&&(ce.selectedOpacityFn=function(De){var Ne=De.mo===void 0?Ae.opacity:De.mo;return De.selected?Tt?yt:Ne:At?gt:c*Ne});var $t=Ae.color,rr=Be.color,_r=Xe.color;(rr||_r)&&(ce.selectedColorFn=function(De){var Ne=De.mcc||$t;return De.selected?rr||Ne:_r||Ne});var Xt=Ae.size,or=Be.size,Ot=Xe.size,vt=or!==void 0,ht=Ot!==void 0;return l.traceIs(_e,"symbols")&&(vt||ht)&&(ce.selectedSizeFn=function(De){var Ne=De.mrc||Xt/2;return De.selected?vt?or/2:Ne:ht?Ot/2:Ne}),ce},g.makeSelectedTextStyleFns=function(_e){var ce={},ve=_e.selected||{},le=_e.unselected||{},Ae=_e.textfont||{},Be=ve.textfont||{},Xe=le.textfont||{},Ye=Ae.color,yt=Be.color,gt=Xe.color;return ce.selectedTextColorFn=function(Tt){var At=Tt.tc||Ye;return Tt.selected?yt||At:gt||(yt?At:e.addOpacity(At,c))},ce},g.selectedPointStyle=function(_e,ce){if(!(!_e.size()||!ce.selectedpoints)){var ve=g.makeSelectedPointStyleFns(ce),le=ce.marker||{},Ae=[];ve.selectedOpacityFn&&Ae.push(function(Be,Xe){Be.style("opacity",ve.selectedOpacityFn(Xe))}),ve.selectedColorFn&&Ae.push(function(Be,Xe){e.fill(Be,ve.selectedColorFn(Xe))}),ve.selectedSizeFn&&Ae.push(function(Be,Xe){var Ye=Xe.mx||le.symbol||0,yt=ve.selectedSizeFn(Xe);Be.attr("d",u(g.symbolNumber(Ye),yt,ke(Xe,ce),Z(Xe,ce))),Xe.mrc2=yt}),Ae.length&&_e.each(function(Be){for(var Xe=p.select(this),Ye=0;Ye0?ve:0}g.textPointStyle=function(_e,ce,ve){if(_e.size()){var le;if(ce.selectedpoints){var Ae=g.makeSelectedTextStyleFns(ce);le=Ae.selectedTextColorFn}var Be=ce.texttemplate,Xe=ve._fullLayout;_e.each(function(Ye){var yt=p.select(this),gt=Be?b.extractOption(Ye,ce,"txt","texttemplate"):b.extractOption(Ye,ce,"tx","text");if(!gt&>!==0){yt.remove();return}if(Be){var Tt=ce._module.formatLabels,At=Tt?Tt(Ye,ce,Xe):{},$t={};v($t,ce,Ye.i),gt=b.texttemplateString({data:[$t,Ye,ce._meta],fallback:ce.texttemplatefallback,labels:At,locale:Xe._d3locale,template:gt})}var rr=Ye.tp||ce.textposition,_r=D(Ye,ce),Xt=le?le(Ye):Ye.tc||ce.textfont.color;yt.call(g.font,{family:Ye.tf||ce.textfont.family,weight:Ye.tw||ce.textfont.weight,style:Ye.ty||ce.textfont.style,variant:Ye.tv||ce.textfont.variant,textcase:Ye.tC||ce.textfont.textcase,lineposition:Ye.tE||ce.textfont.lineposition,shadow:Ye.tS||ce.textfont.shadow,size:_r,color:Xt}).text(gt).call(r.convertToTspans,ve).call(O,rr,_r,Ye.mrc)})}},g.selectedTextStyle=function(_e,ce){if(!(!_e.size()||!ce.selectedpoints)){var ve=g.makeSelectedTextStyleFns(ce);_e.each(function(le){var Ae=p.select(this),Be=ve.selectedTextColorFn(le),Xe=le.tp||ce.textposition,Ye=D(le,ce);e.fill(Ae,Be);var yt=l.traceIs(ce,"bar-like");O(Ae,Xe,Ye,le.mrc2||le.mrc,yt)})}};var B=.5;g.smoothopen=function(_e,ce){if(_e.length<3)return"M"+_e.join("L");var ve="M"+_e[0],le=[],Ae;for(Ae=1;Ae<_e.length-1;Ae++)le.push(Q(_e[Ae-1],_e[Ae],_e[Ae+1],ce));for(ve+="Q"+le[0][0]+" "+_e[1],Ae=2;Ae<_e.length-1;Ae++)ve+="C"+le[Ae-2][1]+" "+le[Ae-1][0]+" "+_e[Ae];return ve+="Q"+le[_e.length-3][1]+" "+_e[_e.length-1],ve},g.smoothclosed=function(_e,ce){if(_e.length<3)return"M"+_e.join("L")+"Z";var ve="M"+_e[0],le=_e.length-1,Ae=[Q(_e[le],_e[0],_e[1],ce)],Be;for(Be=1;Be=yt||De>=Tt&&De<=yt)&&(Ne<=At&&Ne>=gt||Ne>=At&&Ne<=gt)&&(_e=[De,Ne])}return _e}g.applyBackoff=se,g.makeTester=function(){var _e=b.ensureSingleById(p.select("body"),"svg","js-plotly-tester",function(ve){ve.attr(a.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),ce=b.ensureSingle(_e,"path","js-reference-point",function(ve){ve.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});g.tester=_e,g.testref=ce},g.savedBBoxes={};var G=0,X=1e4;g.bBox=function(_e,ce,ve){ve||(ve=K(_e));var le;if(ve){if(le=g.savedBBoxes[ve],le)return b.extendFlat({},le)}else if(_e.childNodes.length===1){var Ae=_e.childNodes[0];if(ve=K(Ae),ve){var Be=+Ae.getAttribute("x")||0,Xe=+Ae.getAttribute("y")||0,Ye=Ae.getAttribute("transform");if(!Ye){var yt=g.bBox(Ae,!1,ve);return Be&&(yt.left+=Be,yt.right+=Be),Xe&&(yt.top+=Xe,yt.bottom+=Xe),yt}if(ve+="~"+Be+"~"+Xe+"~"+Ye,le=g.savedBBoxes[ve],le)return b.extendFlat({},le)}}var gt,Tt;ce?gt=_e:(Tt=g.tester.node(),gt=_e.cloneNode(!0),Tt.appendChild(gt)),p.select(gt).attr("transform",null).call(r.positionText,0,0);var At=gt.getBoundingClientRect(),$t=g.testref.node().getBoundingClientRect();ce||Tt.removeChild(gt);var rr={height:At.height,width:At.width,left:At.left-$t.left,top:At.top-$t.top,right:At.right-$t.left,bottom:At.bottom-$t.top};return G>=X&&(g.savedBBoxes={},G=0),ve&&(g.savedBBoxes[ve]=rr),G++,b.extendFlat({},rr)};function K(_e){var ce=_e.getAttribute("data-unformatted");if(ce!==null)return ce+_e.getAttribute("data-math")+_e.getAttribute("text-anchor")+_e.getAttribute("style")}g.setClipUrl=function(_e,ce,ve){_e.attr("clip-path",H(ce,ve))};function H(_e,ce){if(!_e)return null;var ve=ce._context,le=ve._exportedPlot?"":ve._baseUrl||"";return le?"url('"+le+"#"+_e+"')":"url(#"+_e+")"}g.getTranslate=function(_e){var ce=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ve=_e.attr?"attr":"getAttribute",le=_e[ve]("transform")||"",Ae=le.replace(ce,function(Be,Xe,Ye){return[Xe,Ye].join(" ")}).split(" ");return{x:+Ae[0]||0,y:+Ae[1]||0}},g.setTranslate=function(_e,ce,ve){var le=/(\btranslate\(.*?\);?)/,Ae=_e.attr?"attr":"getAttribute",Be=_e.attr?"attr":"setAttribute",Xe=_e[Ae]("transform")||"";return ce=ce||0,ve=ve||0,Xe=Xe.replace(le,"").trim(),Xe+=n(ce,ve),Xe=Xe.trim(),_e[Be]("transform",Xe),Xe},g.getScale=function(_e){var ce=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ve=_e.attr?"attr":"getAttribute",le=_e[ve]("transform")||"",Ae=le.replace(ce,function(Be,Xe,Ye){return[Xe,Ye].join(" ")}).split(" ");return{x:+Ae[0]||1,y:+Ae[1]||1}},g.setScale=function(_e,ce,ve){var le=/(\bscale\(.*?\);?)/,Ae=_e.attr?"attr":"getAttribute",Be=_e.attr?"attr":"setAttribute",Xe=_e[Ae]("transform")||"";return ce=ce||1,ve=ve||1,Xe=Xe.replace(le,"").trim(),Xe+="scale("+ce+","+ve+")",Xe=Xe.trim(),_e[Be]("transform",Xe),Xe};var Y=/\s*sc.*/;g.setPointGroupScale=function(_e,ce,ve){if(ce=ce||1,ve=ve||1,!!_e){var le=ce===1&&ve===1?"":"scale("+ce+","+ve+")";_e.each(function(){var Ae=(this.getAttribute("transform")||"").replace(Y,"");Ae+=le,Ae=Ae.trim(),this.setAttribute("transform",Ae)})}};var q=/translate\([^)]*\)\s*$/;g.setTextPointsScale=function(_e,ce,ve){_e&&_e.each(function(){var le,Ae=p.select(this),Be=Ae.select("text");if(Be.node()){var Xe=parseFloat(Be.attr("x")||0),Ye=parseFloat(Be.attr("y")||0),yt=(Ae.attr("transform")||"").match(q);ce===1&&ve===1?le=[]:le=[n(Xe,Ye),"scale("+ce+","+ve+")",n(-Xe,-Ye)],yt&&le.push(yt),Ae.attr("transform",le.join(""))}})};function Z(_e,ce){var ve;return _e&&(ve=_e.mf),ve===void 0&&(ve=ce.marker&&ce.marker.standoff||0),!ce._geo&&!ce._xA?-ve:ve}g.getMarkerStandoff=Z;var ee=Math.atan2,ae=Math.cos,he=Math.sin;function xe(_e,ce){var ve=ce[0],le=ce[1];return[ve*ae(_e)-le*he(_e),ve*he(_e)+le*ae(_e)]}var we,Me,Se,Ie,Ve,Ge;function ke(_e,ce){var ve=_e.ma;ve===void 0&&(ve=ce.marker.angle,(!k(ve)||b.isArrayOrTypedArray(ve))&&(ve=0));var le,Ae,Be=ce.marker.angleref;if(Be==="previous"||Be==="north"){if(ce._geo){var Xe=ce._geo.project(_e.lonlat);le=Xe[0],Ae=Xe[1]}else{var Ye=ce._xA,yt=ce._yA;if(Ye&&yt)le=Ye.c2p(_e.x),Ae=yt.c2p(_e.y);else return 90}if(ce._geo){var gt=_e.lonlat[0],Tt=_e.lonlat[1],At=ce._geo.project([gt,Tt+1e-5]),$t=ce._geo.project([gt+1e-5,Tt]),rr=ee($t[1]-Ae,$t[0]-le),_r=ee(At[1]-Ae,At[0]-le),Xt;if(Be==="north")Xt=ve/180*Math.PI;else if(Be==="previous"){var or=gt/180*Math.PI,Ot=Tt/180*Math.PI,vt=we/180*Math.PI,ht=Me/180*Math.PI,De=vt-or,Ne=ae(ht)*he(De),We=he(ht)*ae(Ot)-ae(ht)*he(Ot)*ae(De);Xt=-ee(Ne,We)-Math.PI,we=gt,Me=Tt}var Ke=xe(rr,[ae(Xt),0]),Je=xe(_r,[he(Xt),0]);ve=ee(Ke[1]+Je[1],Ke[0]+Je[0])/Math.PI*180,Be==="previous"&&!(Ge===ce.uid&&_e.i===Ve+1)&&(ve=null)}if(Be==="previous"&&!ce._geo)if(Ge===ce.uid&&_e.i===Ve+1&&k(le)&&k(Ae)){var et=le-Se,Mt=Ae-Ie,pt=ce.line&&ce.line.shape||"",Pt=pt.slice(pt.length-1);Pt==="h"&&(Mt=0),Pt==="v"&&(et=0),ve+=ee(Mt,et)/Math.PI*180+90}else ve=null}return Se=le,Ie=Ae,Ve=_e.i,Ge=ce.uid,ve}g.getMarkerAngle=ke}}),qv=ze({"src/components/titles/index.js"(J,V){"use strict";var p=ci(),b=ao(),E=cl(),k=mi(),l=Nr(),e=l.strTranslate,t=$i(),n=Qn(),r=Cs(),a=np(),o=dc().OPPOSITE_SIDE,s=/ [XY][0-9]* /,c=1.6,m=1.6;function h(v,g,i){var w=v._fullLayout,S=i.propContainer,M=i.propName,C=i.placeholder,_=i.traceIndex,T=i.avoid||{},f=i.attributes,u=i.transform,A=i.containerGroup,x=1,z=S.title,I=(z&&z.text?z.text:"").trim(),O=!1,D=z&&z.font?z.font:{},B=D.family,F=D.size,P=D.color,j=D.weight,U=D.style,$=D.variant,Q=D.textcase,re=D.lineposition,ne=D.shadow,se=i.subtitlePropName,G=!!se,X=i.subtitlePlaceholder,K=(S.title||{}).subtitle||{text:"",font:{}},H=(K.text||"").trim(),Y=!1,q=1,Z=K.font,ee=Z.family,ae=Z.size,he=Z.color,xe=Z.weight,we=Z.style,Me=Z.variant,Se=Z.textcase,Ie=Z.lineposition,Ve=Z.shadow,Ge;M==="title.text"?Ge="titleText":M.indexOf("axis")!==-1?Ge="axisTitleText":M.indexOf("colorbar")!==-1&&(Ge="colorbarTitleText");var ke=v._context.edits[Ge];function _e(rr,_r){return rr===void 0||_r===void 0?!1:rr.replace(s," % ")===_r.replace(s," % ")}I===""?x=0:_e(I,C)&&(ke||(I=""),x=.2,O=!0),G&&(H===""?q=0:_e(H,X)&&(ke||(H=""),q=.2,Y=!0)),i._meta?I=l.templateString(I,i._meta):w._meta&&(I=l.templateString(I,w._meta));var ce=I||H||ke,ve;A||(A=l.ensureSingle(w._infolayer,"g","g-"+g),ve=w._hColorbarMoveTitle);var le=A.selectAll("text."+g).data(ce?[0]:[]);le.enter().append("text"),le.text(I).attr("class",g),le.exit().remove();var Ae=null,Be=g+"-subtitle",Xe=H||ke;if(G&&(Ae=A.selectAll("text."+Be).data(Xe?[0]:[]),Ae.enter().append("text"),Ae.text(H).attr("class",Be),Ae.exit().remove()),!ce)return A;function Ye(rr,_r){l.syncOrAsync([yt,gt],{title:rr,subtitle:_r})}function yt(rr){var _r=rr.title,Xt=rr.subtitle,or;!u&&ve&&(u={}),u?(or="",u.rotate&&(or+="rotate("+[u.rotate,f.x,f.y]+")"),(u.offset||ve)&&(or+=e(0,(u.offset||0)-(ve||0)))):or=null,_r.attr("transform",or);function Ot(Ke){if(Ke){var Je=p.select(Ke.node().parentNode).select("."+Be);if(!Je.empty()){var et=Ke.node().getBBox();if(et.height){var Mt=et.y+et.height+c*ae;Je.attr("y",Mt)}}}}if(_r.style("opacity",x*n.opacity(P)).call(t.font,{color:n.rgb(P),size:p.round(F,2),family:B,weight:j,style:U,variant:$,textcase:Q,shadow:ne,lineposition:re}).attr(f).call(r.convertToTspans,v,Ot),Xt&&!Xt.empty()){var vt=A.select("."+g+"-math-group"),ht=_r.node().getBBox(),De=vt.node()?vt.node().getBBox():void 0,Ne=De?De.y+De.height+c*ae:ht.y+ht.height+m*ae,We=l.extendFlat({},f,{y:Ne});Xt.attr("transform",or),Xt.style("opacity",q*n.opacity(he)).call(t.font,{color:n.rgb(he),size:p.round(ae,2),family:ee,weight:xe,style:we,variant:Me,textcase:Se,shadow:Ve,lineposition:Ie}).attr(We).call(r.convertToTspans,v)}return E.previousPromises(v)}function gt(rr){var _r=rr.title,Xt=p.select(_r.node().parentNode);if(T&&T.selection&&T.side&&I){Xt.attr("transform",null);var or=o[T.side],Ot=T.side==="left"||T.side==="top"?-1:1,vt=b(T.pad)?T.pad:2,ht=t.bBox(Xt.node()),De={t:0,b:0,l:0,r:0},Ne=v._fullLayout._reservedMargin;for(var We in Ne)for(var Ke in Ne[We]){var Je=Ne[We][Ke];De[Ke]=Math.max(De[Ke],Je)}var et={left:De.l,top:De.t,right:w.width-De.r,bottom:w.height-De.b},Mt=T.maxShift||Ot*(et[T.side]-ht[T.side]),pt=0;if(Mt<0)pt=Mt;else{var Pt=T.offsetLeft||0,Ct=T.offsetTop||0;ht.left-=Pt,ht.right-=Pt,ht.top-=Ct,ht.bottom-=Ct,T.selection.each(function(){var Vt=t.bBox(this);l.bBoxIntersect(ht,Vt,vt)&&(pt=Math.max(pt,Ot*(Vt[T.side]-ht[or])+vt))}),pt=Math.min(Mt,pt),S._titleScoot=Math.abs(pt)}if(pt>0||Mt<0){var qt={left:[-pt,0],right:[pt,0],top:[0,-pt],bottom:[0,pt]}[T.side];Xt.attr("transform",e(qt[0],qt[1]))}}}le.call(Ye,Ae);function Tt(rr,_r){rr.text(_r).on("mouseover.opacity",function(){p.select(this).transition().duration(a.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){p.select(this).transition().duration(a.HIDE_PLACEHOLDER).style("opacity",0)})}if(ke&&(I?le.on(".opacity",null):(Tt(le,C),O=!0),le.call(r.makeEditable,{gd:v}).on("edit",function(rr){_!==void 0?k.call("_guiRestyle",v,M,rr,_):k.call("_guiRelayout",v,M,rr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ye)}).on("input",function(rr){this.text(rr||" ").call(r.positionText,f.x,f.y)}),G)){if(G&&!I){var At=le.node().getBBox(),$t=At.y+At.height+m*ae;Ae.attr("y",$t)}H?Ae.on(".opacity",null):(Tt(Ae,X),Y=!0),Ae.call(r.makeEditable,{gd:v}).on("edit",function(rr){k.call("_guiRelayout",v,"title.subtitle.text",rr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ye)}).on("input",function(rr){this.text(rr||" ").call(r.positionText,Ae.attr("x"),Ae.attr("y"))})}return le.classed("js-placeholder",O),Ae&&!Ae.empty()&&Ae.classed("js-placeholder",Y),A}V.exports={draw:h,SUBTITLE_PADDING_EM:m,SUBTITLE_PADDING_MATHJAX_EM:c}}}),Dd=ze({"src/plots/cartesian/set_convert.js"(J,V){"use strict";var p=ci(),b=jm().utcFormat,E=Nr(),k=E.numberFormat,l=ao(),e=E.cleanNumber,t=E.ms2DateTime,n=E.dateTime2ms,r=E.ensureNumber,a=E.isArrayOrTypedArray,o=No(),s=o.FP_SAFE,c=o.BADNUM,m=o.LOG_CLIP,h=o.ONEWEEK,v=o.ONEDAY,g=o.ONEHOUR,i=o.ONEMIN,w=o.ONESEC,S=Xl(),M=hc(),C=M.HOUR_PATTERN,_=M.WEEKDAY_PATTERN;function T(u){return Math.pow(10,u)}function f(u){return u!=null}V.exports=function(A,x){x=x||{};var z=A._id||"x",I=z.charAt(0);function O(H,Y){if(H>0)return Math.log(H)/Math.LN10;if(H<=0&&Y&&A.range&&A.range.length===2){var q=A.range[0],Z=A.range[1];return .5*(q+Z-2*m*Math.abs(q-Z))}else return c}function D(H,Y,q,Z){if((Z||{}).msUTC&&l(H))return+H;var ee=n(H,q||A.calendar);if(ee===c)if(l(H)){H=+H;var ae=Math.floor(E.mod(H+.05,1)*10),he=Math.round(H-ae/10);ee=n(new Date(he))+ae/10}else return c;return ee}function B(H,Y,q){return t(H,Y,q||A.calendar)}function F(H){return A._categories[Math.round(H)]}function P(H){if(f(H)){if(A._categoriesMap===void 0&&(A._categoriesMap={}),A._categoriesMap[H]!==void 0)return A._categoriesMap[H];A._categories.push(typeof H=="number"?String(H):H);var Y=A._categories.length-1;return A._categoriesMap[H]=Y,Y}return c}function j(H,Y){for(var q=new Array(Y),Z=0;ZA.range[1]&&(q=!q);for(var Z=q?-1:1,ee=Z*H,ae=0,he=0;hewe)ae=he+1;else{ae=ee<(xe+we)/2?he:he+1;break}}var Me=A._B[ae]||0;return isFinite(Me)?re(H,A._m2,Me):0},G=function(H){var Y=A._rangebreaks.length;if(!Y)return ne(H,A._m,A._b);for(var q=0,Z=0;ZA._rangebreaks[Z].pmax&&(q=Z+1);return ne(H,A._m2,A._B[q])}}A.c2l=A.type==="log"?O:r,A.l2c=A.type==="log"?T:r,A.l2p=se,A.p2l=G,A.c2p=A.type==="log"?function(H,Y){return se(O(H,Y))}:se,A.p2c=A.type==="log"?function(H){return T(G(H))}:G,["linear","-"].indexOf(A.type)!==-1?(A.d2r=A.r2d=A.d2c=A.r2c=A.d2l=A.r2l=e,A.c2d=A.c2r=A.l2d=A.l2r=r,A.d2p=A.r2p=function(H){return A.l2p(e(H))},A.p2d=A.p2r=G,A.cleanPos=r):A.type==="log"?(A.d2r=A.d2l=function(H,Y){return O(e(H),Y)},A.r2d=A.r2c=function(H){return T(e(H))},A.d2c=A.r2l=e,A.c2d=A.l2r=r,A.c2r=O,A.l2d=T,A.d2p=function(H,Y){return A.l2p(A.d2r(H,Y))},A.p2d=function(H){return T(G(H))},A.r2p=function(H){return A.l2p(e(H))},A.p2r=G,A.cleanPos=r):A.type==="date"?(A.d2r=A.r2d=E.identity,A.d2c=A.r2c=A.d2l=A.r2l=D,A.c2d=A.c2r=A.l2d=A.l2r=B,A.d2p=A.r2p=function(H,Y,q){return A.l2p(D(H,0,q))},A.p2d=A.p2r=function(H,Y,q){return B(G(H),Y,q)},A.cleanPos=function(H){return E.cleanDate(H,c,A.calendar)}):A.type==="category"?(A.d2c=A.d2l=P,A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=$,A.r2c=function(H){var Y=Q(H);return Y!==void 0?Y:A.fraction2r(.5)},A.l2r=A.c2r=r,A.r2l=Q,A.d2p=function(H){return A.l2p(A.r2c(H))},A.p2d=function(H){return F(G(H))},A.r2p=A.d2p,A.p2r=G,A.cleanPos=function(H){return typeof H=="string"&&H!==""?H:r(H)}):A.type==="multicategory"&&(A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=$,A.r2c=function(H){var Y=$(H);return Y!==void 0?Y:A.fraction2r(.5)},A.r2c_just_indices=U,A.l2r=A.c2r=r,A.r2l=$,A.d2p=function(H){return A.l2p(A.r2c(H))},A.p2d=function(H){return F(G(H))},A.r2p=A.d2p,A.p2r=G,A.cleanPos=function(H){return Array.isArray(H)||typeof H=="string"&&H!==""?H:r(H)},A.setupMultiCategory=function(H){var Y=A._traceIndices,q,Z,ee=A._matchGroup;if(ee&&A._categories.length===0){for(var ae in ee)if(ae!==z){var he=x[S.id2name(ae)];Y=Y.concat(he._traceIndices)}}var xe=[[0,{}],[0,{}]],we=[];for(q=0;qhe[1]&&(Z[ae?0:1]=q,ee[1]=he[1]),ee[0]>=ee[1])if(Y!==void 0){var xe=he[0]+1;q!==void 0&&(xe=Math.min(xe,he[1])),Z[ae?0:1]=A.l2r(xe)}else q!==void 0&&(Z[ae?1:0]=A.l2r(he[1]-1))}},A.cleanRange=function(H,Y){A._cleanRange(H,Y),A.limitRange(H)},A._cleanRange=function(H,Y){Y||(Y={}),H||(H="range");var q=E.nestedProperty(A,H).get(),Z,ee;if(A.type==="date"?ee=E.dfltRange(A.calendar):I==="y"?ee=M.DFLTRANGEY:A._name==="realaxis"?ee=[0,1]:ee=Y.dfltRange||M.DFLTRANGEX,ee=ee.slice(),(A.rangemode==="tozero"||A.rangemode==="nonnegative")&&(ee[0]=0),!q||q.length!==2){E.nestedProperty(A,H).set(ee);return}var ae=q[0]===null,he=q[1]===null;for(A.type==="date"&&!A.autorange&&(q[0]=E.cleanDate(q[0],c,A.calendar),q[1]=E.cleanDate(q[1],c,A.calendar)),Z=0;Z<2;Z++)if(A.type==="date"){if(!E.isDateTime(q[Z],A.calendar)){A[H]=ee;break}if(A.r2l(q[0])===A.r2l(q[1])){var xe=E.constrain(A.r2l(q[0]),E.MIN_MS+1e3,E.MAX_MS-1e3);q[0]=A.l2r(xe-1e3),q[1]=A.l2r(xe+1e3);break}}else{if(!l(q[Z]))if(!(ae||he)&&l(q[1-Z]))q[Z]=q[1-Z]*(Z?10:.1);else{A[H]=ee;break}if(q[Z]<-s?q[Z]=-s:q[Z]>s&&(q[Z]=s),q[0]===q[1]){var we=Math.max(1,Math.abs(q[0]*1e-6));q[0]-=we,q[1]+=we}}},A.setScale=function(H){var Y=x._size;if(A.overlaying){var q=S.getFromId({_fullLayout:x},A.overlaying);A.domain=q.domain}var Z=H&&A._r?"_r":"range",ee=A.calendar;A.cleanRange(Z);var ae=A.r2l(A[Z][0],ee),he=A.r2l(A[Z][1],ee),xe=I==="y";if(xe?(A._offset=Y.t+(1-A.domain[1])*Y.h,A._length=Y.h*(A.domain[1]-A.domain[0]),A._m=A._length/(ae-he),A._b=-A._m*he):(A._offset=Y.l+A.domain[0]*Y.w,A._length=Y.w*(A.domain[1]-A.domain[0]),A._m=A._length/(he-ae),A._b=-A._m*ae),A._rangebreaks=[],A._lBreaks=0,A._m2=0,A._B=[],A.rangebreaks){var we,Me;if(A._rangebreaks=A.locateBreaks(Math.min(ae,he),Math.max(ae,he)),A._rangebreaks.length){for(we=0;wehe&&(Se=!Se),Se&&A._rangebreaks.reverse();var Ie=Se?-1:1;for(A._m2=Ie*A._length/(Math.abs(he-ae)-A._lBreaks),A._B.push(-A._m2*(xe?he:ae)),we=0;weee&&(ee+=7,aeee&&(ee+=24,ae=Z&&ae=Z&&H=Ye.min&&(leYe.max&&(Ye.max=Ae),Be=!1)}Be&&he.push({min:le,max:Ae})}};for(q=0;qw*2}function o(m){return Math.max(1,(m-1)/1e3)}function s(m,h){for(var v=m.length,g=o(v),i=0,w=0,S={},M=0;Mi*2}function c(m){return k(m[0])&&k(m[1])}}}),md=ze({"src/plots/cartesian/autorange.js"(J,V){"use strict";var p=ci(),b=ao(),E=Nr(),k=No().FP_SAFE,l=mi(),e=$i(),t=Xl(),n=t.getFromId,r=t.isLinked;V.exports={applyAutorangeOptions:A,getAutoRange:a,makePadFn:s,doAutoRange:v,findExtremes:g,concatExtremes:h};function a(x,z){var I,O,D=[],B=x._fullLayout,F=s(B,z,0),P=s(B,z,1),j=h(x,z),U=j.min,$=j.max;if(U.length===0||$.length===0)return E.simpleMap(z.range,z.r2l);var Q=U[0].val,re=$[0].val;for(I=1;I0&&(we=Y-F(ee)-P(ae),we>q?Me/we>Z&&(he=ee,xe=ae,Z=Me/we):Me/Y>Z&&(he={val:ee.val,nopad:1},xe={val:ae.val,nopad:1},Z=Me/Y));function Se(_e,ce){return Math.max(_e,P(ce))}if(Q===re){var Ie=Q-1,Ve=Q+1;if(K)if(Q===0)D=[0,1];else{var Ge=(Q>0?$:U).reduce(Se,0),ke=Q/(1-Math.min(.5,Ge/Y));D=Q>0?[0,ke]:[ke,0]}else H?D=[Math.max(0,Ie),Math.max(1,Ve)]:D=[Ie,Ve]}else K?(he.val>=0&&(he={val:0,nopad:1}),xe.val<=0&&(xe={val:0,nopad:1})):H&&(he.val-Z*F(he)<0&&(he={val:0,nopad:1}),xe.val<=0&&(xe={val:1,nopad:1})),Z=(xe.val-he.val-o(z,ee.val,ae.val))/(Y-F(he)-P(xe)),D=[he.val-Z*F(he),xe.val+Z*P(xe)];return D=A(D,z),z.limitRange&&z.limitRange(),se&&D.reverse(),E.simpleMap(D,z.l2r||Number)}function o(x,z,I){var O=0;if(x.rangebreaks)for(var D=x.locateBreaks(z,I),B=0;B0?I.ppadplus:I.ppadminus)||I.ppad||0),ee=q((x._m>0?I.ppadminus:I.ppadplus)||I.ppad||0),ae=q(I.vpadplus||I.vpad),he=q(I.vpadminus||I.vpad);if(!U){if(H=1/0,Y=-1/0,j)for(Q=0;Q0&&(H=re),re>Y&&re-k&&(H=re),re>Y&&re=Me;Q--)we(Q);return{min:O,max:D,opts:I}}function i(x,z,I,O){S(x,z,I,O,C)}function w(x,z,I,O){S(x,z,I,O,_)}function S(x,z,I,O,D){for(var B=O.tozero,F=O.extrapad,P=!0,j=0;j=I&&(U.extrapad||!F)){P=!1;break}else D(z,U.val)&&U.pad<=I&&(F||!U.extrapad)&&(x.splice(j,1),j--)}if(P){var $=B&&z===0;x.push({val:z,pad:$?0:I,extrapad:$?!1:F})}}function M(x){return b(x)&&Math.abs(x)=z}function T(x,z){var I=z.autorangeoptions;return I&&I.minallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.minallowed:I&&I.clipmin!==void 0&&u(z,I.clipmin,I.clipmax)?Math.max(x,z.d2l(I.clipmin)):x}function f(x,z){var I=z.autorangeoptions;return I&&I.maxallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.maxallowed:I&&I.clipmax!==void 0&&u(z,I.clipmin,I.clipmax)?Math.min(x,z.d2l(I.clipmax)):x}function u(x,z,I){return z!==void 0&&I!==void 0?(z=x.d2l(z),I=x.d2l(I),z=j&&(B=j,I=j),F<=j&&(F=j,O=j)}}return I=T(I,z),O=f(O,z),[I,O]}}}),Gi=ze({"src/plots/cartesian/axes.js"(J,V){"use strict";var p=ci(),b=ao(),E=cl(),k=mi(),l=Nr(),e=l.strTranslate,t=Cs(),n=qv(),r=Qn(),a=$i(),o=cf(),s=Xw(),c=hc(),m=No(),h=m.ONEMAXYEAR,v=m.ONEAVGYEAR,g=m.ONEMINYEAR,i=m.ONEMAXQUARTER,w=m.ONEAVGQUARTER,S=m.ONEMINQUARTER,M=m.ONEMAXMONTH,C=m.ONEAVGMONTH,_=m.ONEMINMONTH,T=m.ONEWEEK,f=m.ONEDAY,u=f/2,A=m.ONEHOUR,x=m.ONEMIN,z=m.ONESEC,I=m.ONEMILLI,O=m.ONEMICROSEC,D=m.MINUS_SIGN,B=m.BADNUM,F={K:"zeroline"},P={K:"gridline",L:"path"},j={K:"minor-gridline",L:"path"},U={K:"tick",L:"path"},$={K:"tick",L:"text"},Q={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},re=dc(),ne=re.MID_SHIFT,se=re.CAP_SHIFT,G=re.LINE_SPACING,X=re.OPPOSITE_SIDE,K=3,H=V.exports={};H.setConvert=Dd();var Y=Xm(),q=Xl(),Z=q.idSort,ee=q.isLinked;H.id2name=q.id2name,H.name2id=q.name2id,H.cleanId=q.cleanId,H.list=q.list,H.listIds=q.listIds,H.getFromId=q.getFromId,H.getFromTrace=q.getFromTrace;var ae=md();H.getAutoRange=ae.getAutoRange,H.findExtremes=ae.findExtremes;var he=1e-4;function xe(lt){var rt=(lt[1]-lt[0])*he;return[lt[0]-rt,lt[1]+rt]}function we(lt,rt,fr){if(![fr,lt,rt].every(b)||fr===0)return lt;let lr=Math.round((lt-rt)/fr),Tr=rt+lr*fr;return lt!==Tr&&Math.abs(lt-Tr)xr+" domain")),kt=kt.concat(Ir||[]),ar.length>Dr?(l.warn("Array attribute "+jt+" has more entries than expected, truncating to "+Dr),ar=ar.slice(0,Dr)):ar.length2e-6||((fr-lt._forceTick0)/lt._minDtick%1+1.000001)%1>2e-6)&&(lt._minDtick=0))},H.saveRangeInitial=function(lt,rt){for(var fr=H.list(lt,"",!0),lr=!1,Tr=0;TrEr*.3||jt(lr)||jt(Tr))){var xr=fr.dtick/2;lt+=lt+xrDr){var ot=Number(fr.slice(1));Ir.exactYears>Dr&&ot%12===0?lt=H.tickIncrement(lt,"M6","reverse")+f*1.5:Ir.exactMonths>Dr?lt=H.tickIncrement(lt,"M1","reverse")+f*15.5:lt-=u;var kt=H.tickIncrement(lt,fr);if(kt<=lr)return kt}return lt}H.prepMinorTicks=function(lt,rt,fr){var lr,Tr;if(!((lr=rt.minor)!=null&&lr.dtick)){delete lt.dtick;var Ir=rt.dtick&&b(rt._tmin),Dr;if(Ir){var ot=H.tickIncrement(rt._tmin,rt.dtick,!0);Dr=[rt._tmin,ot*.99+rt._tmin*.01]}else{var kt=l.simpleMap(rt.range,rt.r2l);Dr=[kt[0],.8*kt[0]+.2*kt[1]]}if(lt.range=l.simpleMap(Dr,rt.l2r),lt._isMinor=!0,H.prepTicks(lt,fr),Ir){var jt=b(rt.dtick),ar=b(lt.dtick),Er=jt?rt.dtick:+rt.dtick.substring(1),xr=ar?lt.dtick:+lt.dtick.substring(1);jt&&ar?ke(Er,xr)?Er===2*T&&xr===2*f&&(lt.dtick=T):Er===2*T&&xr===3*f?lt.dtick=T:Er===T&&!(rt._input.minor||{}).nticks?lt.dtick=f:_e(Er/xr,2.5)?lt.dtick=Er/2:lt.dtick=Er:String(rt.dtick).charAt(0)==="M"?ar?lt.dtick="M1":ke(Er,xr)?Er>=12&&xr===2&&(lt.dtick="M3"):lt.dtick=rt.dtick:String(lt.dtick).charAt(0)==="L"?String(rt.dtick).charAt(0)==="L"?ke(Er,xr)||(lt.dtick=_e(Er/xr,2.5)?rt.dtick/2:rt.dtick):lt.dtick="D1":lt.dtick==="D2"&&+rt.dtick>1&&(lt.dtick=1)}lt.range=rt.range}((Tr=rt.minor)==null?void 0:Tr._tick0Init)===void 0&&(lt.tick0=rt.tick0)};function ke(lt,rt){return Math.abs((lt/rt+.5)%1-.5)<.001}function _e(lt,rt){return Math.abs(lt/rt-1)<.001}H.prepTicks=function(lt,rt){var fr=l.simpleMap(lt.range,lt.r2l,void 0,void 0,rt);if(lt.tickmode==="auto"||!lt.dtick){var lr=lt.nticks,Tr;lr||(lt.type==="category"||lt.type==="multicategory"?(Tr=lt.tickfont?l.bigFont(lt.tickfont.size||12):15,lr=lt._length/Tr):(Tr=lt._id.charAt(0)==="y"?40:80,lr=l.constrain(lt._length/Tr,4,9)+1),lt._name==="radialaxis"&&(lr*=2)),lt.minor&<.minor.tickmode!=="array"||lt.tickmode==="array"&&(lr*=100),lt._roughDTick=Math.abs(fr[1]-fr[0])/lr,H.autoTicks(lt,lt._roughDTick),lt._minDtick>0&<.dtick0?(Ir=lr-1,Dr=lr):(Ir=lr,Dr=lr);var ot=lt[Ir].value,kt=lt[Dr].value,jt=Math.abs(kt-ot),ar=fr||jt,Er=0;ar>=g?jt>=g&&jt<=h?Er=jt:Er=v:fr===w&&ar>=S?jt>=S&&jt<=i?Er=jt:Er=w:ar>=_?jt>=_&&jt<=M?Er=jt:Er=C:fr===T&&ar>=T?Er=T:ar>=f?Er=f:fr===u&&ar>=u?Er=u:fr===A&&ar>=A&&(Er=A);var xr;Er>=jt&&(Er=jt,xr=!0);var zr=Tr+Er;if(rt.rangebreaks&&Er>0){for(var Lr=84,aa=0,Sa=0;SaT&&(Er=jt)}(Er>0||lr===0)&&(lt[lr].periodX=Tr+Er/2)}}H.calcTicks=function(rt,fr){for(var lr=rt.type,Tr=rt.calendar,Ir=rt.ticklabelstep,Dr=rt.ticklabelmode==="period",ot=rt.range[0]>rt.range[1],kt=!rt.ticklabelindex||l.isArrayOrTypedArray(rt.ticklabelindex)?rt.ticklabelindex:[rt.ticklabelindex],jt=l.simpleMap(rt.range,rt.r2l,void 0,void 0,fr),ar=jt[1]=(ai?0:1);rn--){var Ri=!rn;rn?(rt._dtickInit=rt.dtick,rt._tick0Init=rt.tick0):ai&&(rt.minor._dtickInit=rt.minor.dtick,rt.minor._tick0Init=rt.minor.tick0);var Gn=rn?rt:l.extendFlat({},rt,ai?rt.minor:{minor:{}});if(Ri?H.prepMinorTicks(Gn,rt,fr):H.prepTicks(Gn,fr),Gn.tickmode==="array"){rn?(Sa=[],Lr=Xe(rt,!Ri)):(wa=[],aa=Xe(rt,!Ri));continue}if(Gn.tickmode==="sync"){Sa=[],Lr=Be(rt);continue}var no=xe(jt),Di=no[0],fn=no[1],Ai=b(Gn.dtick),jn=lr==="log"&&!(Ai||Gn.dtick.charAt(0)==="L"),Xn=H.tickFirst(Gn,fr);if(rn){if(rt._tmin=Xn,Xn=fn:gi<=fn;gi=H.tickIncrement(gi,oo,ar,Tr)){if(rn&&qi++,Gn.rangebreaks&&!ar){if(gi=xr)break}if(Sa.length>zr||gi===eo)break;eo=gi;var qn={value:we(gi,Vn,oo)};rn?(gi===Xn&&(qn.first=!0),jn&&gi!==(gi|0)&&(qn.simpleLabel=!0),Ir>1&&qi%Ir&&(qn.skipLabel=!0),Sa.push(qn)):(qn.minor=!0,wa.push(qn))}}if(!wa||wa.length<3)kt=!1;else{var Hi=(wa[2].value-wa[1].value)*(ot?-1:1);Oa(Hi,rt.tickformat)||(kt=!1,wa=wa.slice(1))}if(!kt)pn=Sa;else{var Mi=Sa.concat(wa);Dr&&Sa.length&&(Mi=Mi.slice(1)),Mi=Mi.sort(function(Bo,_o){return Bo.value-_o.value}).filter(function(Bo,_o,Pi){return _o===0||Bo.value!==Pi[_o-1].value});var Ro=Mi.map(function(Bo,_o){return Bo.minor===void 0&&!Bo.skipLabel?_o:null}).filter(function(Bo){return Bo!==null});Ro.forEach(function(Bo){kt.map(function(_o){var Pi=Bo+_o;Pi>=0&&Pi-1;pi--){if(Sa[pi].drop){Sa.splice(pi,1);continue}Sa[pi].value=on(Sa[pi].value,rt);var Ko=rt.c2p(Sa[pi].value);(Vi?Xi>Ko-Io:Xixr||yoxr&&(Pi.periodX=xr),yoTr&&LrTr&&Sav)rt/=v,lr=Tr(10),lt.dtick="M"+12*_r(rt,lr,Ye);else if(Ir>C)rt/=C,lt.dtick="M"+_r(rt,1,yt);else if(Ir>f){if(lt.dtick=_r(rt,f,lt._hasDayOfWeekBreaks?[1,2,7,14]:Tt),!fr){var Dr=H.getTickFormat(lt),ot=lt.ticklabelmode==="period";ot&&(lt._rawTick0=lt.tick0),/%[uVW]/.test(Dr)?lt.tick0=l.dateTick0(lt.calendar,2):lt.tick0=l.dateTick0(lt.calendar,1),ot&&(lt._dowTick0=lt.tick0)}}else Ir>A?lt.dtick=_r(rt,A,yt):Ir>x?lt.dtick=_r(rt,x,gt):Ir>z?lt.dtick=_r(rt,z,gt):(lr=Tr(10),lt.dtick=_r(rt,lr,Ye))}else if(lt.type==="log"){lt.tick0=0;var kt=l.simpleMap(lt.range,lt.r2l);if(lt._isMinor&&(rt*=1.5),rt>.7)lt.dtick=Math.ceil(rt);else if(Math.abs(kt[1]-kt[0])<1){var jt=1.5*Math.abs((kt[1]-kt[0])/rt);rt=Math.abs(Math.pow(10,kt[1])-Math.pow(10,kt[0]))/jt,lr=Tr(10),lt.dtick="L"+_r(rt,lr,Ye)}else lt.dtick=rt>.3?"D2":"D1"}else lt.type==="category"||lt.type==="multicategory"?(lt.tick0=0,lt.dtick=Math.ceil(Math.max(rt,1))):Yn(lt)?(lt.tick0=0,lr=1,lt.dtick=_r(rt,lr,rr)):(lt.tick0=0,lr=Tr(10),lt.dtick=_r(rt,lr,Ye));if(lt.dtick===0&&(lt.dtick=1),!b(lt.dtick)&&typeof lt.dtick!="string"){var ar=lt.dtick;throw lt.dtick=1,"ax.dtick error: "+String(ar)}};function Xt(lt){var rt=lt.dtick;if(lt._tickexponent=0,!b(rt)&&typeof rt!="string"&&(rt=1),(lt.type==="category"||lt.type==="multicategory")&&(lt._tickround=null),lt.type==="date"){var fr=lt.r2l(lt.tick0),lr=lt.l2r(fr).replace(/(^-|i)/g,""),Tr=lr.length;if(String(rt).charAt(0)==="M")Tr>10||lr.slice(5)!=="01-01"?lt._tickround="d":lt._tickround=+rt.slice(1)%12===0?"y":"m";else if(rt>=f&&Tr<=10||rt>=f*15)lt._tickround="d";else if(rt>=x&&Tr<=16||rt>=A)lt._tickround="M";else if(rt>=z&&Tr<=19||rt>=x)lt._tickround="S";else{var Ir=lt.l2r(fr+rt).replace(/^-/,"").length;lt._tickround=Math.max(Tr,Ir)-20,lt._tickround<0&&(lt._tickround=4)}}else if(b(rt)||rt.charAt(0)==="L"){var Dr=lt.range.map(lt.r2d||Number);b(rt)||(rt=Number(rt.slice(1))),lt._tickround=2-Math.floor(Math.log(rt)/Math.LN10+.01);var ot=Math.max(Math.abs(Dr[0]),Math.abs(Dr[1])),kt=Math.floor(Math.log(ot)/Math.LN10+.01),jt=lt.minexponent===void 0?3:lt.minexponent;Math.abs(kt)>jt&&(Mt(lt.exponentformat)&<.exponentformat!=="SI extended"&&!pt(kt)||Mt(lt.exponentformat)&<.exponentformat==="SI extended"&&!Pt(kt)?lt._tickexponent=3*Math.round((kt-1)/3):lt._tickexponent=kt)}else lt._tickround=null}H.tickIncrement=function(lt,rt,fr,lr){var Tr=fr?-1:1;if(b(rt))return l.increment(lt,Tr*rt);var Ir=rt.charAt(0),Dr=Tr*Number(rt.slice(1));if(Ir==="M")return l.incrementMonth(lt,Dr,lr);if(Ir==="L")return Math.log(Math.pow(10,lt)+Dr)/Math.LN10;if(Ir==="D"){var ot=rt==="D2"?$t:At,kt=lt+Tr*.01,jt=l.roundUp(l.mod(kt,1),ot,fr);return Math.floor(kt)+Math.log(p.round(Math.pow(10,jt),1))/Math.LN10}throw"unrecognized dtick "+String(rt)},H.tickFirst=function(lt,rt){var fr=lt.r2l||Number,lr=l.simpleMap(lt.range,fr,void 0,void 0,rt),Tr=lr[1]=0&&ai<=lt._length?tn:null};if(kt&&l.isArrayOrTypedArray(lt.ticktext)){var Lr=l.simpleMap(lt.range,lt.r2l),aa=(Math.abs(Lr[1]-Lr[0])-(lt._lBreaks||0))/1e4;for(xr=0;xr"+ot;else{var jt=en(lt),ar=lt._trueSide||lt.side;(!jt&&ar==="top"||jt&&ar==="bottom")&&(Dr+="
")}rt.text=Dr}function vt(lt,rt,fr,lr,Tr){var Ir=lt.dtick,Dr=rt.x,ot=lt.tickformat,kt=typeof Ir=="string"&&Ir.charAt(0);if(Tr==="never"&&(Tr=""),lr&&kt!=="L"&&(Ir="L3",kt="L"),ot||kt==="L")rt.text=qt(Math.pow(10,Dr),lt,Tr,lr);else if(b(Ir)||kt==="D"&&(lt.minorloglabels==="complete"||l.mod(Dr+.01,1)<.1)){var jt;lt.minorloglabels==="complete"&&!(l.mod(Dr+.01,1)<.1)&&(jt=!0,rt.fontSize*=.75);var ar=Math.pow(10,Dr).toExponential(0),Er=ar.split("e"),xr=+Er[1],zr=Math.abs(xr),Lr=lt.exponentformat;Lr==="power"||Mt(Lr)&&Lr!=="SI extended"&&pt(xr)||Mt(Lr)&&Lr==="SI extended"&&Pt(xr)?(rt.text=Er[0],zr>0&&(rt.text+="x10"),rt.text==="1x10"&&(rt.text="10"),xr!==0&&xr!==1&&(rt.text+=""+(xr>0?"":D)+zr+""),rt.fontSize*=1.25):(Lr==="e"||Lr==="E")&&zr>2?rt.text=Er[0]+Lr+(xr>0?"+":D)+zr:(rt.text=qt(Math.pow(10,Dr),lt,"","fakehover"),Ir==="D1"&<._id.charAt(0)==="y"&&(rt.dy-=rt.fontSize/6))}else if(kt==="D")rt.text=lt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,l.mod(Dr,1)))),rt.fontSize*=.75;else throw"unrecognized dtick "+String(Ir);if(lt.dtick==="D1"){var aa=String(rt.text).charAt(0);(aa==="0"||aa==="1")&&(lt._id.charAt(0)==="y"?rt.dx-=rt.fontSize/4:(rt.dy+=rt.fontSize/2,rt.dx+=(lt.range[1]>lt.range[0]?1:-1)*rt.fontSize*(Dr<0?.5:.25)))}}function ht(lt,rt){var fr=lt._categories[Math.round(rt.x)];fr===void 0&&(fr=""),rt.text=String(fr)}function De(lt,rt,fr){var lr=Math.round(rt.x),Tr=lt._categories[lr]||[],Ir=Tr[1]===void 0?"":String(Tr[1]),Dr=Tr[0]===void 0?"":String(Tr[0]);fr?rt.text=Dr+" - "+Ir:(rt.text=Ir,rt.text2=Dr)}function Ne(lt,rt,fr,lr,Tr){Tr==="never"?Tr="":lt.showexponent==="all"&&Math.abs(rt.x/lt.dtick)<1e-6&&(Tr="hide"),rt.text=qt(rt.x,lt,Tr,lr)}function We(lt,rt,fr,lr,Tr){if(lt.thetaunit==="radians"&&!fr){var Ir=rt.x/180;if(Ir===0)rt.text="0";else{var Dr=Ke(Ir);if(Dr[1]>=100)rt.text=qt(l.deg2rad(rt.x),lt,Tr,lr);else{var ot=rt.x<0;Dr[1]===1?Dr[0]===1?rt.text="\u03C0":rt.text=Dr[0]+"\u03C0":rt.text=["",Dr[0],"","\u2044","",Dr[1],"","\u03C0"].join(""),ot&&(rt.text=D+rt.text)}}}else rt.text=qt(rt.x,lt,Tr,lr)}function Ke(lt){function rt(ot,kt){return Math.abs(ot-kt)<=1e-6}function fr(ot,kt){return rt(kt,0)?ot:fr(kt,ot%kt)}function lr(ot){for(var kt=1;!rt(Math.round(ot*kt)/kt,ot);)kt*=10;return kt}var Tr=lr(lt),Ir=lt*Tr,Dr=Math.abs(fr(Ir,Tr));return[Math.round(Ir/Dr),Math.round(Tr/Dr)]}var Je=["f","p","n","\u03BC","m","","k","M","G","T"],et=["q","r","y","z","a",...Je,"P","E","Z","Y","R","Q"],Mt=lt=>["SI","SI extended","B"].includes(lt);function pt(lt){return lt>14||lt<-15}function Pt(lt){return lt>32||lt<-30}function Ct(lt,rt){return Mt(rt)?!!(rt==="SI extended"&&Pt(lt)||rt!=="SI extended"&&pt(lt)):!1}function qt(lt,rt,fr,lr){var Tr=lt<0,Ir=rt._tickround,Dr=fr||rt.exponentformat||"B",ot=rt._tickexponent,kt=H.getTickFormat(rt),jt=rt.separatethousands;if(lr){var ar={exponentformat:Dr,minexponent:rt.minexponent,dtick:rt.showexponent==="none"?rt.dtick:b(lt)&&Math.abs(lt)||1,range:rt.showexponent==="none"?rt.range.map(rt.r2d):[0,lt||1]};Xt(ar),Ir=(Number(ar._tickround)||0)+4,ot=ar._tickexponent,rt.hoverformat&&(kt=rt.hoverformat)}if(kt)return rt._numFormat(kt)(lt).replace(/-/g,D);Dr==="none"&&(ot=0),lt=Math.abs(lt);let Er=Math.pow(10,-Ir)/2;if(lt"+xr+"":Dr==="B"&&ot===9?lt+="B":Mt(Dr)&&(lt+=Dr==="SI extended"?et[ot/3+10]:Je[ot/3+5])}return Tr?D+lt:lt}H.getTickFormat=function(lt){var rt;function fr(kt){return typeof kt!="string"?kt:Number(kt.replace("M",""))*C}function lr(kt,jt){var ar=["L","D"];if(typeof kt==typeof jt){if(typeof kt=="number")return kt-jt;var Er=ar.indexOf(kt.charAt(0)),xr=ar.indexOf(jt.charAt(0));return Er===xr?Number(kt.replace(/(L|D)/g,""))-Number(jt.replace(/(L|D)/g,"")):Er-xr}else return typeof kt=="number"?1:-1}function Tr(kt,jt,ar){var Er=ar||function(Lr){return Lr},xr=jt[0],zr=jt[1];return(!xr&&typeof xr!="number"||Er(xr)<=Er(kt))&&(!zr&&typeof zr!="number"||Er(zr)>=Er(kt))}function Ir(kt,jt){var ar=jt[0]===null,Er=jt[1]===null,xr=lr(kt,jt[0])>=0,zr=lr(kt,jt[1])<=0;return(ar||xr)&&(Er||zr)}var Dr,ot;if(lt.tickformatstops&<.tickformatstops.length>0)switch(lt.type){case"date":case"linear":{for(rt=0;rt=0&&Tr.unshift(Tr.splice(ar,1).shift())}});var ot={false:{left:0,right:0}};return l.syncOrAsync(Tr.map(function(kt){return function(){if(kt){var jt=H.getFromId(lt,kt);fr||(fr={}),fr.axShifts=ot,fr.overlayingShiftedAx=Dr;var ar=H.drawOne(lt,jt,fr);return jt._shiftPusher&&Yi(jt,jt._fullDepth||0,ot,!0),jt._r=jt.range.slice(),jt._rl=l.simpleMap(jt._r,jt.r2l),ar}}}))},H.drawOne=function(lt,rt,fr){fr=fr||{};var lr=fr.axShifts||{},Tr=fr.overlayingShiftedAx||[],Ir,Dr,ot;rt.setScale();var kt=lt._fullLayout,jt=rt._id,ar=jt.charAt(0),Er=H.counterLetter(jt),xr=kt._plots[rt._mainSubplot],zr=rt.zerolinelayer==="above traces";if(!xr)return;if(rt._shiftPusher=rt.autoshift||Tr.indexOf(rt._id)!==-1||Tr.indexOf(rt.overlaying)!==-1,rt._shiftPusher&rt.anchor==="free"){var Lr=rt.linewidth/2||0;rt.ticks==="inside"&&(Lr+=rt.ticklen),Yi(rt,Lr,lr,!0),Yi(rt,rt.shift||0,lr,!1)}(fr.skipTitle!==!0||rt._shift===void 0)&&(rt._shift=Ja(rt,lr));var aa=xr[ar+"axislayer"],Sa=rt._mainLinePosition,wa=Sa+=rt._shift,pn=rt._mainMirrorPosition,tn=rt._vals=H.calcTicks(rt),ai=[rt.mirror,wa,pn].join("_");for(Ir=0;Ir0?_o.bottom-Ts:0,Bo))));var Dl=0,hl=0;if(rt._shiftPusher&&(Dl=Math.max(Bo,_o.height>0?Vo==="l"?Ts-_o.left:_o.right-Ts:0),rt.title.text!==kt._dfltTitle[ar]&&(hl=(rt._titleStandoff||0)+(rt._titleScoot||0),Vo==="l"&&(hl+=Rr(rt))),rt._fullDepth=Math.max(Dl,hl)),rt.automargin){Pi={x:0,y:0,r:0,l:0,t:0,b:0};var ps=[0,1],dl=typeof rt._shift=="number"?rt._shift:0;if(ar==="x"){if(Vo==="b"?Pi[Vo]=rt._depth:(Pi[Vo]=rt._depth=Math.max(_o.width>0?Ts-_o.top:0,Bo),ps.reverse()),_o.width>0){var wu=_o.right-(rt._offset+rt._length);wu>0&&(Pi.xr=1,Pi.r=wu);var lu=rt._offset-_o.left;lu>0&&(Pi.xl=0,Pi.l=lu)}}else if(Vo==="l"?(rt._depth=Math.max(_o.height>0?Ts-_o.left:0,Bo),Pi[Vo]=rt._depth-dl):(rt._depth=Math.max(_o.height>0?_o.right-Ts:0,Bo),Pi[Vo]=rt._depth+dl,ps.reverse()),_o.height>0){var xc=_o.bottom-(rt._offset+rt._length);xc>0&&(Pi.yb=0,Pi.b=xc);var Fl=rt._offset-_o.top;Fl>0&&(Pi.yt=1,Pi.t=Fl)}Pi[Er]=rt.anchor==="free"?rt.position:rt._anchorAxis.domain[ps[0]],rt.title.text!==kt._dfltTitle[ar]&&(Pi[Vo]+=Rr(rt)+(rt.title.standoff||0)),rt.mirror&&rt.anchor!=="free"&&(yo={x:0,y:0,r:0,l:0,t:0,b:0},yo[Vs]=rt.linewidth,rt.mirror&&rt.mirror!==!0&&(yo[Vs]+=Bo),rt.mirror===!0||rt.mirror==="ticks"?yo[Er]=rt._anchorAxis.domain[ps[1]]:(rt.mirror==="all"||rt.mirror==="allticks")&&(yo[Er]=[rt._counterDomainMin,rt._counterDomainMax][ps[1]]))}Ss&&(bs=k.getComponentMethod("rangeslider","autoMarginOpts")(lt,rt)),typeof rt.automargin=="string"&&(Vt(Pi,rt.automargin),Vt(yo,rt.automargin)),E.autoMargin(lt,un(rt),Pi),E.autoMargin(lt,Xa(rt),yo),E.autoMargin(lt,ja(rt),bs)}),l.syncOrAsync(Uo)}};function Vt(lt,rt){if(lt){var fr=Object.keys(Q).reduce(function(lr,Tr){return rt.indexOf(Tr)!==-1&&Q[Tr].forEach(function(Ir){lr[Ir]=1}),lr},{});Object.keys(lt).forEach(function(lr){fr[lr]||(lr.length===1?lt[lr]=0:delete lt[lr])})}}function Ht(lt,rt){var fr=[],lr,Tr=function(Ir,Dr){var ot=Ir.xbnd[Dr];ot!==null&&fr.push(l.extendFlat({},Ir,{x:ot}))};if(rt.length){for(lr=0;lrlt.range[1],ot=lt.ticklabelposition&<.ticklabelposition.indexOf("inside")!==-1,kt=!ot;if(fr){var jt=Dr?-1:1;fr=fr*jt}if(lr){var ar=lt.side,Er=ot&&(ar==="top"||ar==="left")||kt&&(ar==="bottom"||ar==="right")?1:-1;lr=lr*Er}return lt._id.charAt(0)==="x"?function(xr){return e(Tr+lt._offset+lt.l2p(Rt(xr))+fr,Ir+lr)}:function(xr){return e(Ir+lr,Tr+lt._offset+lt.l2p(Rt(xr))+fr)}};function Rt(lt){return lt.periodX!==void 0?lt.periodX:lt.x}function nr(lt){var rt=lt.ticklabelposition||"",fr=lt.tickson||"",lr=function(Lr){return rt.indexOf(Lr)!==-1},Tr=lr("top"),Ir=lr("left"),Dr=lr("right"),ot=lr("bottom"),kt=lr("inside"),jt=fr!=="boundaries"&&(ot||Ir||Tr||Dr);if(!jt&&!kt)return[0,0];var ar=lt.side,Er=jt?(lt.tickwidth||0)/2:0,xr=K,zr=lt.tickfont?lt.tickfont.size:12;return(ot||Tr)&&(Er+=zr*se,xr+=(lt.linewidth||0)/2),(Ir||Dr)&&(Er+=(lt.linewidth||0)/2,xr+=K),kt&&ar==="top"&&(xr-=zr*(1-se)),(Ir||Tr)&&(Er=-Er),(ar==="bottom"||ar==="right")&&(xr=-xr),[jt?Er:0,kt?xr:0]}H.makeTickPath=function(lt,rt,fr,lr){lr||(lr={});var Tr=lr.minor;if(Tr&&!lt.minor)return"";var Ir=lr.len!==void 0?lr.len:Tr?lt.minor.ticklen:lt.ticklen,Dr=lt._id.charAt(0),ot=(lt.linewidth||1)/2;return Dr==="x"?"M0,"+(rt+ot*fr)+"v"+Ir*fr:"M"+(rt+ot*fr)+",0h"+Ir*fr},H.makeLabelFns=function(lt,rt,fr){var lr=lt.ticklabelposition||"",Tr=lt.tickson||"",Ir=function(Xn){return lr.indexOf(Xn)!==-1},Dr=Ir("top"),ot=Ir("left"),kt=Ir("right"),jt=Ir("bottom"),ar=Tr!=="boundaries"&&(jt||ot||Dr||kt),Er=Ir("inside"),xr=lr==="inside"&<.ticks==="inside"||!Er&<.ticks==="outside"&&Tr!=="boundaries",zr=0,Lr=0,aa=xr?lt.ticklen:0;if(Er?aa*=-1:ar&&(aa=0),xr&&(zr+=aa,fr)){var Sa=l.deg2rad(fr);zr=aa*Math.cos(Sa)+1,Lr=aa*Math.sin(Sa)}lt.showticklabels&&(xr||lt.showline)&&(zr+=.2*lt.tickfont.size),zr+=(lt.linewidth||1)/2*(Er?-1:1);var wa={labelStandoff:zr,labelShift:Lr},pn,tn,ai,rn,Ri=0,Gn=lt.side,no=lt._id.charAt(0),Di=lt.tickangle,fn;if(no==="x")fn=!Er&&Gn==="bottom"||Er&&Gn==="top",rn=fn?1:-1,Er&&(rn*=-1),pn=Lr*rn,tn=rt+zr*rn,ai=fn?1:-.2,Math.abs(Di)===90&&(Er?ai+=ne:Di===-90&&Gn==="bottom"?ai=se:Di===90&&Gn==="top"?ai=ne:ai=.5,Ri=ne/2*(Di/90)),wa.xFn=function(Xn){return Xn.dx+pn+Ri*Xn.fontSize},wa.yFn=function(Xn){return Xn.dy+tn+Xn.fontSize*ai},wa.anchorFn=function(Xn,eo){if(ar){if(ot)return"end";if(kt)return"start"}return!b(eo)||eo===0||eo===180?"middle":eo*rn<0!==Er?"end":"start"},wa.heightFn=function(Xn,eo,gi){return eo<-60||eo>60?-.5*gi:lt.side==="top"!==Er?-gi:0};else if(no==="y"){if(fn=!Er&&Gn==="left"||Er&&Gn==="right",rn=fn?1:-1,Er&&(rn*=-1),pn=zr,tn=Lr*rn,ai=0,!Er&&Math.abs(Di)===90&&(Di===-90&&Gn==="left"||Di===90&&Gn==="right"?ai=se:ai=.5),Er){var Ai=b(Di)?+Di:0;if(Ai!==0){var jn=l.deg2rad(Ai);Ri=Math.abs(Math.sin(jn))*se*rn,ai=0}}wa.xFn=function(Xn){return Xn.dx+rt-(pn+Xn.fontSize*ai)*rn+Ri*Xn.fontSize},wa.yFn=function(Xn){return Xn.dy+tn+Xn.fontSize*ne},wa.anchorFn=function(Xn,eo){return b(eo)&&Math.abs(eo)===90?"middle":fn?"end":"start"},wa.heightFn=function(Xn,eo,gi){return lt.side==="right"&&(eo*=-1),eo<-30?-gi:eo<30?-.5*gi:0}}return wa};function ur(lt){return[lt.text,lt.x,lt.axInfo,lt.font,lt.fontSize,lt.fontColor].join("_")}H.drawTicks=function(lt,rt,fr){fr=fr||{};var lr=rt._id+"tick",Tr=[].concat(rt.minor&&rt.minor.ticks?fr.vals.filter(function(Dr){return Dr.minor&&!Dr.noTick}):[]).concat(rt.ticks?fr.vals.filter(function(Dr){return!Dr.minor&&!Dr.noTick}):[]),Ir=fr.layer.selectAll("path."+lr).data(Tr,ur);Ir.exit().remove(),Ir.enter().append("path").classed(lr,1).classed("ticks",1).classed("crisp",fr.crisp!==!1).each(function(Dr){return r.stroke(p.select(this),Dr.minor?rt.minor.tickcolor:rt.tickcolor)}).style("stroke-width",function(Dr){return a.crispRound(lt,Dr.minor?rt.minor.tickwidth:rt.tickwidth,1)+"px"}).attr("d",fr.path).style("display",null),vi(rt,[U]),Ir.attr("transform",fr.transFn)},H.drawGrid=function(lt,rt,fr){if(fr=fr||{},rt.tickmode!=="sync"){var lr=rt._id+"grid",Tr=rt.minor&&rt.minor.showgrid,Ir=Tr?fr.vals.filter(function(wa){return wa.minor}):[],Dr=rt.showgrid?fr.vals.filter(function(wa){return!wa.minor}):[],ot=fr.counterAxis;if(ot&&H.shouldShowZeroLine(lt,rt,ot))for(var kt=rt.tickmode==="array",jt=0;jt=0;Lr--){var aa=Lr?xr:zr;if(aa){var Sa=aa.selectAll("path."+lr).data(Lr?Dr:Ir,ur);Sa.exit().remove(),Sa.enter().append("path").classed(lr,1).classed("crisp",fr.crisp!==!1),Sa.attr("transform",fr.transFn).attr("d",fr.path).each(function(wa){return r.stroke(p.select(this),wa.minor?rt.minor.gridcolor:rt.gridcolor||"#ddd")}).style("stroke-dasharray",function(wa){return a.dashStyle(wa.minor?rt.minor.griddash:rt.griddash,wa.minor?rt.minor.gridwidth:rt.gridwidth)}).style("stroke-width",function(wa){return(wa.minor?Er:rt._gw)+"px"}).style("display",null),typeof fr.path=="function"&&Sa.attr("d",fr.path)}}vi(rt,[P,j])}},H.drawZeroLine=function(lt,rt,fr){fr=fr||fr;var lr=rt._id+"zl",Tr=H.shouldShowZeroLine(lt,rt,fr.counterAxis),Ir=fr.layer.selectAll("path."+lr).data(Tr?[{x:0,id:rt._id}]:[]);Ir.exit().remove(),Ir.enter().append("path").classed(lr,1).classed("zl",1).classed("crisp",fr.crisp!==!1).each(function(){fr.layer.selectAll("path").sort(function(Dr,ot){return Z(Dr.id,ot.id)})}),Ir.attr("transform",fr.transFn).attr("d",fr.path).call(r.stroke,rt.zerolinecolor||r.defaultLine).style("stroke-width",a.crispRound(lt,rt.zerolinewidth,rt._gw||1)+"px").style("display",null),vi(rt,[F])},H.drawLabels=function(lt,rt,fr){fr=fr||{};var lr=lt._fullLayout,Tr=rt._id,Ir=rt.zerolinelayer==="above traces",Dr=fr.cls||Tr+"tick",ot=fr.vals.filter(function(Vn){return Vn.text}),kt=fr.labelFns,jt=fr.secondary?0:rt.tickangle,ar=(rt._prevTickAngles||{})[Dr],Er=fr.layer.selectAll("g."+Dr).data(rt.showticklabels?ot:[],ur),xr=[];Er.enter().append("g").classed(Dr,1).append("text").attr("text-anchor","middle").each(function(Vn){var qn=p.select(this),Hi=lt._promises.length;qn.call(t.positionText,kt.xFn(Vn),kt.yFn(Vn)).call(a.font,{family:Vn.font,size:Vn.fontSize,color:Vn.fontColor,weight:Vn.fontWeight,style:Vn.fontStyle,variant:Vn.fontVariant,textcase:Vn.fontTextcase,lineposition:Vn.fontLineposition,shadow:Vn.fontShadow}).text(Vn.text).call(t.convertToTspans,lt),lt._promises[Hi]?xr.push(lt._promises.pop().then(function(){zr(qn,jt)})):zr(qn,jt)}),vi(rt,[$]),Er.exit().remove(),fr.repositionOnUpdate&&Er.each(function(Vn){p.select(this).select("text").call(t.positionText,kt.xFn(Vn),kt.yFn(Vn))});function zr(Vn,qn){Vn.each(function(Hi){var Mi=p.select(this),Ro=Mi.select(".text-math-group"),go=kt.anchorFn(Hi,qn),Eo=fr.transFn.call(Mi.node(),Hi)+(b(qn)&&+qn!=0?" rotate("+qn+","+kt.xFn(Hi)+","+(kt.yFn(Hi)-Hi.fontSize/2)+")":""),Ao=t.lineCount(Mi),ds=G*Hi.fontSize,jo=kt.heightFn(Hi,b(qn)?+qn:0,(Ao-1)*ds);if(jo&&(Eo+=e(0,jo)),Ro.empty()){var Wo=Mi.select("text");Wo.attr({transform:Eo,"text-anchor":go}),Wo.style("display",null),rt._adjustTickLabelsOverflow&&rt._adjustTickLabelsOverflow()}else{var to=a.bBox(Ro.node()).width,wo=to*{end:-.5,start:.5}[go];Ro.attr("transform",Eo+e(wo,0))}})}rt._adjustTickLabelsOverflow=function(){var Vn=rt.ticklabeloverflow;if(!(!Vn||Vn==="allow")){var qn=Vn.indexOf("hide")!==-1,Hi=rt._id.charAt(0)==="x",Mi=0,Ro=Hi?lt._fullLayout.width:lt._fullLayout.height;if(Vn.indexOf("domain")!==-1){var go=l.simpleMap(rt.range,rt.r2l);Mi=rt.l2p(go[0])+rt._offset,Ro=rt.l2p(go[1])+rt._offset}var Eo=Math.min(Mi,Ro),Ao=Math.max(Mi,Ro),ds=rt.side,jo=1/0,Wo=-1/0;Er.each(function(Vi){var Io=p.select(this),Xi=Io.select(".text-math-group");if(Xi.empty()){var Ko=a.bBox(Io.node()),Uo=0;Hi?(Ko.right>Ao||Ko.leftAo||Ko.top+(rt.tickangle?0:Vi.fontSize/4)rt["_visibleLabelMin_"+go._id]?Io.style("display","none"):Ao.K==="tick"&&!Eo&&Io.node().style.display!=="none"&&Io.style("display",null)})})})})},zr(Er,ar+1?ar:jt);function Lr(){return xr.length&&Promise.all(xr)}var aa=null;function Sa(){if(zr(Er,jt),ot.length&&rt.autotickangles&&(rt.type!=="log"||String(rt.dtick).charAt(0)!=="D")){aa=rt.autotickangles[0];var Vn=0,qn=[],Hi,Mi=1;Er.each(function(Pi){Vn=Math.max(Vn,Pi.fontSize);var yo=rt.l2p(Pi.x),bs=La(this),Dl=a.bBox(bs.node());Mi=Math.max(Mi,t.lineCount(bs)),qn.push({top:0,bottom:10,height:10,left:yo-Dl.width/2,right:yo+Dl.width/2+2,width:Dl.width+2})});var Ro=(rt.tickson==="boundaries"||rt.showdividers)&&!fr.secondary,go=ot.length,Eo=Math.abs((ot[go-1].x-ot[0].x)*rt._m)/(go-1),Ao=Ro?Eo/2:Eo,ds=Ro?rt.ticklen:Vn*1.25*Mi,jo=Math.sqrt(Math.pow(Ao,2)+Math.pow(ds,2)),Wo=Ao/jo,to=rt.autotickangles.map(function(Pi){return Pi*Math.PI/180}),wo=to.find(function(Pi){return Math.abs(Math.cos(Pi))<=Wo});wo===void 0&&(wo=to.reduce(function(Pi,yo){return Math.abs(Math.cos(Pi))qi*gi&&(jn=gi,Di[no]=fn[no]=Xn[no])}var io=Math.abs(jn-Ai);io-rn>0?(io-=rn,rn*=1+rn/io):rn=0,rt._id.charAt(0)!=="y"&&(rn=-rn),Di[Gn]=tn.p2r(tn.r2p(fn[Gn])+Ri*rn),tn.autorange==="min"||tn.autorange==="max reversed"?(Di[0]=null,tn._rangeInitial0=void 0,tn._rangeInitial1=void 0):(tn.autorange==="max"||tn.autorange==="min reversed")&&(Di[1]=null,tn._rangeInitial0=void 0,tn._rangeInitial1=void 0),lr._insideTickLabelsUpdaterange[tn._name+".range"]=Di}var oo=l.syncOrAsync(wa);return oo&&oo.then&<._promises.push(oo),oo};function cr(lt,rt,fr){var lr=rt._id+"divider",Tr=fr.vals,Ir=fr.layer.selectAll("path."+lr).data(Tr,ur);Ir.exit().remove(),Ir.enter().insert("path",":first-child").classed(lr,1).classed("crisp",1).call(r.stroke,rt.dividercolor).style("stroke-width",a.crispRound(lt,rt.dividerwidth,1)+"px"),Ir.attr("transform",fr.transFn).attr("d",fr.path)}H.getPxPosition=function(lt,rt){var fr=lt._fullLayout._size,lr=rt._id.charAt(0),Tr=rt.side,Ir;if(rt.anchor!=="free"?Ir=rt._anchorAxis:lr==="x"?Ir={_offset:fr.t+(1-(rt.position||0))*fr.h,_length:0}:lr==="y"&&(Ir={_offset:fr.l+(rt.position||0)*fr.w+rt._shift,_length:0}),Tr==="top"||Tr==="left")return Ir._offset;if(Tr==="bottom"||Tr==="right")return Ir._offset+Ir._length};function Rr(lt){var rt=lt.title.font.size,fr=(lt.title.text.match(t.BR_TAG_ALL)||[]).length;return lt.title.hasOwnProperty("standoff")?rt*(se+fr*G):fr?rt*(fr+1)*G:rt}function Qr(lt,rt){var fr=lt._fullLayout,lr=rt._id,Tr=lr.charAt(0),Ir=rt.title.font.size,Dr,ot=(rt.title.text.match(t.BR_TAG_ALL)||[]).length;if(rt.title.hasOwnProperty("standoff"))rt.side==="bottom"||rt.side==="right"?Dr=rt._depth+rt.title.standoff+Ir*se:(rt.side==="top"||rt.side==="left")&&(Dr=rt._depth+rt.title.standoff+Ir*(ne+ot*G));else{var kt=en(rt);if(rt.type==="multicategory")Dr=rt._depth;else{var jt=1.5*Ir;kt&&(jt=.5*Ir,rt.ticks==="outside"&&(jt+=rt.ticklen)),Dr=10+jt+(rt.linewidth?rt.linewidth-1:0)}kt||(Tr==="x"?Dr+=rt.side==="top"?Ir*(rt.showticklabels?1:0):Ir*(rt.showticklabels?1.5:.5):Dr+=rt.side==="right"?Ir*(rt.showticklabels?1:.5):Ir*(rt.showticklabels?.5:0))}var ar=H.getPxPosition(lt,rt),Er,xr,zr;Tr==="x"?(xr=rt._offset+rt._length/2,zr=rt.side==="top"?ar-Dr:ar+Dr):(zr=rt._offset+rt._length/2,xr=rt.side==="right"?ar+Dr:ar-Dr,Er={rotate:"-90",offset:0});var Lr;if(rt.type!=="multicategory"){var aa=rt._selections[rt._id+"tick"];if(Lr={selection:aa,side:rt.side},aa&&aa.node()&&aa.node().parentNode){var Sa=a.getTranslate(aa.node().parentNode);Lr.offsetLeft=Sa.x,Lr.offsetTop=Sa.y}rt.title.hasOwnProperty("standoff")&&(Lr.pad=0)}return rt._titleStandoff=Dr,n.draw(lt,lr+"title",{propContainer:rt,propName:rt._name+".title.text",placeholder:fr._dfltTitle[Tr],avoid:Lr,transform:Er,attributes:{x:xr,y:zr,"text-anchor":"middle"}})}H.shouldShowZeroLine=function(lt,rt,fr){var lr=l.simpleMap(rt.range,rt.r2l);return lr[0]*lr[1]<=0&&rt.zeroline&&(rt.type==="linear"||rt.type==="-")&&!(rt.rangebreaks&&rt.maskBreaks(0)===B)&&(Zr(rt,0)||!ha(lt,rt,fr,lr)||Pa(lt,rt))},H.clipEnds=function(lt,rt){return rt.filter(function(fr){return Zr(lt,fr.x)})};function Zr(lt,rt){var fr=lt.l2p(rt);return fr>1&&fr1)for(Tr=1;Tr=Tr.min&<=O:/%L/.test(rt)?lt>=I:/%[SX]/.test(rt)?lt>=z:/%M/.test(rt)?lt>=x:/%[HI]/.test(rt)?lt>=A:/%p/.test(rt)?lt>=u:/%[Aadejuwx]/.test(rt)?lt>=f:/%[UVW]/.test(rt)?lt>=T:/%[Bbm]/.test(rt)?lt>=_:/%[q]/.test(rt)?lt>=S:/%[Yy]/.test(rt)?lt>=g:!0}}}),Jw=ze({"src/plots/cartesian/autorange_options_defaults.js"(J,V){"use strict";V.exports=function(b,E,k){var l,e;if(k){var t=E==="reversed"||E==="min reversed"||E==="max reversed";l=k[t?1:0],e=k[t?0:1]}var n=b("autorangeoptions.minallowed",e===null?l:void 0),r=b("autorangeoptions.maxallowed",l===null?e:void 0);n===void 0&&b("autorangeoptions.clipmin"),r===void 0&&b("autorangeoptions.clipmax"),b("autorangeoptions.include")}}}),Qw=ze({"src/plots/cartesian/range_defaults.js"(J,V){"use strict";var p=Jw();V.exports=function(E,k,l,e){var t=k._template||{},n=k.type||t.type||"-";l("minallowed"),l("maxallowed");var r=l("range");if(!r){var a;!e.noInsiderange&&n!=="log"&&(a=l("insiderange"),a&&(a[0]===null||a[1]===null)&&(k.insiderange=!1,a=void 0),a&&(r=l("range",a)))}var o=k.getAutorangeDflt(r,e),s=l("autorange",o),c;r&&(r[0]===null&&r[1]===null||(r[0]===null||r[1]===null)&&(s==="reversed"||s===!0)||r[0]!==null&&(s==="min"||s==="max reversed")||r[1]!==null&&(s==="max"||s==="min reversed"))&&(r=void 0,delete k.range,k.autorange=!0,c=!0),c||(o=k.getAutorangeDflt(r,e),s=l("autorange",o)),s&&(p(l,s,r),(n==="linear"||n==="-")&&l("rangemode")),k.cleanRange()}}}),VI=ze({"node_modules/mouse-event-offset/index.js"(J,V){var p={left:0,top:0};V.exports=b;function b(k,l,e){l=l||k.currentTarget||k.srcElement,Array.isArray(e)||(e=[0,0]);var t=k.clientX||0,n=k.clientY||0,r=E(l);return e[0]=t-r.left,e[1]=n-r.top,e}function E(k){return k===window||k===document||k===document.body?p:k.getBoundingClientRect()}}}),Rx=ze({"node_modules/has-passive-events/index.js"(J,V){"use strict";var p=Vw();function b(){var E=!1;try{var k=Object.defineProperty({},"passive",{get:function(){E=!0}});window.addEventListener("test",null,k),window.removeEventListener("test",null,k)}catch{E=!1}return E}V.exports=p&&b()}}),GI=ze({"src/components/dragelement/align.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){var t=(b-k)/(l-k),n=t+E/(l-k),r=(t+n)/2;return e==="left"||e==="bottom"?t:e==="center"||e==="middle"?r:e==="right"||e==="top"?n:t<2/3-r?t:n>4/3-r?n:r}}}),HI=ze({"src/components/dragelement/cursor.js"(J,V){"use strict";var p=Nr(),b=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];V.exports=function(k,l,e,t){return e==="left"?k=0:e==="center"?k=1:e==="right"?k=2:k=p.constrain(Math.floor(k*3),0,2),t==="bottom"?l=0:t==="middle"?l=1:t==="top"?l=2:l=p.constrain(Math.floor(l*3),0,2),b[l][k]}}}),WI=ze({"src/components/dragelement/unhover.js"(J,V){"use strict";var p=Hm(),b=Cx(),E=i1().getGraphDiv,k=a1(),l=V.exports={};l.wrapped=function(e,t,n){var r;e=E(e),e._fullLayout&&b.clear(e._fullLayout._uid+k.HOVERID);let a=e._hoverdata;l.raw(e,t,n)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,(r=e._fullLayout)!=null&&r.hoveranywhere&&t?.target&&!a&&e.emit("plotly_unhover",{event:t,points:[]}))},l.raw=function(t,n){var r=t._fullLayout,a=t._hoverdata;return n||(n={}),n.target&&!t._dragged&&p.triggerHandler(t,"plotly_beforehover",n)===!1?!1:(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,n.target&&a&&t.emit("plotly_unhover",{event:n,points:a}),!0)}}}),_h=ze({"src/components/dragelement/index.js"(J,V){"use strict";var p=VI(),b=Gw(),E=Rx(),k=Nr().removeElement,l=hc(),e=V.exports={};e.align=GI(),e.getCursor=HI();var t=WI();e.unhover=t.wrapped,e.unhoverRaw=t.raw,e.init=function(o){var s=o.gd,c=1,m=s._context.doubleClickDelay,h=o.element,v,g,i,w,S,M,C,_;s._mouseDownTime||(s._mouseDownTime=0),h.style.pointerEvents="all",h.onmousedown=u,E?(h._ontouchstart&&h.removeEventListener("touchstart",h._ontouchstart),h._ontouchstart=u,h.addEventListener("touchstart",u,{passive:!1})):h.ontouchstart=u;function T(z,I,O){return Math.abs(z)"u"&&typeof z.clientY>"u"&&(z.clientX=v,z.clientY=g),i=new Date().getTime(),i-s._mouseDownTimem&&(c=Math.max(c-1,1)),s._dragged)o.doneFn&&o.doneFn();else{var I;M.target===C?I=M:(I={target:C,srcElement:C,toElement:C},Object.keys(M).concat(Object.keys(M.__proto__)).forEach(O=>{var D=M[O];!I[O]&&typeof D!="function"&&(I[O]=D)})),o.clickFn&&o.clickFn(c,I),_||C.dispatchEvent(new MouseEvent("click",z))}s._dragging=!1,s._dragged=!1}};function n(){var a=document.createElement("div");a.className="dragcover";var o=a.style;return o.position="fixed",o.left=0,o.right=0,o.top=0,o.bottom=0,o.zIndex=999999999,o.background="none",document.body.appendChild(a),a}e.coverSlip=n;function r(a){return p(a.changedTouches?a.changedTouches[0]:a,document.body)}}}),gd=ze({"src/lib/setcursor.js"(J,V){"use strict";V.exports=function(b,E){(b.attr("class")||"").split(" ").forEach(function(k){k.indexOf("cursor-")===0&&b.classed(k,!1)}),E&&b.classed("cursor-"+E,!0)}}}),YI=ze({"src/lib/override_cursor.js"(J,V){"use strict";var p=gd(),b="data-savedcursor",E="!!";V.exports=function(l,e){var t=l.attr(b);if(e){if(!t){for(var n=(l.attr("class")||"").split(" "),r=0;rX.legend.length)for(var Y=X.legend.length;Y(r==="legend"?1:0));if(O===!1&&(o[r]=void 0),!(O===!1&&!m.uirevision)&&(v("uirevision",o.uirevision),O!==!1)){v("borderwidth");var D=v("orientation"),B=v("yref"),F=v("xref"),P=D==="h",j=B==="paper",U=F==="paper",$,Q,re,ne="left";P?($=0,p.getComponentMethod("rangeslider","isVisible")(a.xaxis)?j?(Q=1.1,re="bottom"):(Q=1,re="top"):j?(Q=-.1,re="top"):(Q=0,re="bottom")):(Q=1,re="auto",U?$=1.02:($=1,ne="right")),b.coerce(m,h,{x:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:$}},"x"),b.coerce(m,h,{y:{valType:"number",editType:"legend",min:j?-2:0,max:j?3:1,dflt:Q}},"y"),v("traceorder",f),t.isGrouped(o[r])&&v("tracegroupgap"),v("entrywidth"),v("entrywidthmode"),v("indentation"),v("itemsizing"),v("itemwidth"),v("itemclick"),v("itemdoubleclick"),v("groupclick"),v("xanchor",ne),v("yanchor",re),v("maxheight"),v("valign"),b.noneOrAll(m,h,["x","y"]);var se=v("title.text");if(se){v("title.side",P?"left":"top");var G=b.extendFlat({},g,{size:b.bigFont(g.size)});b.coerceFont(v,"title.font",G);let X=c>1;v("titleclick",X?"toggle":!1),v("titledoubleclick",X?"toggleothers":!1)}}}V.exports=function(a,o,s){var c,m=s.slice(),h=o.shapes;if(h)for(c=0;cVe.showlegend||Ve.legendgroup);var g=h.concat(v),i=o.trace;i._isShape&&(i=a.shapes[i.index]);var w=i.legendgroup,S,M,C,_,T,f,u={},A=[],x=[],z=[];function I(Ve,Ge){var ke=A.indexOf(Ve),_e=u.visible;return _e||(_e=u.visible=[]),A.indexOf(Ve)===-1&&(A.push(Ve),ke=A.length-1),_e[ke]=Ge,ke}var O=(a.shapes||[]).map(function(Ve){return Ve._input}),D=!1;function B(Ve,Ge){O[Ve].visible=Ge,D=!0}function F(Ve,Ge){if(!(o.groupTitle&&!c)){var ke=Ve._isShape,_e=Ve.index;_e===void 0&&(_e=Ve._index);var ce=Ve.visible===!1?!1:Ge;ke?B(_e,ce):I(_e,ce)}}var P=i.legend;if(!i._isShape&&V.traceIs(i,"pie-like")){var j=o.label,U=m.indexOf(j);if(r==="toggle")U===-1?m.push(j):m.splice(U,1);else if(r==="toggleothers"){var $=U!==-1,Q=[];for(S=0;SC.showlegend||C.legendgroup),c=a.concat(s);function m(C){return(C.legend||"legend")===o}var h,v;if(n==="toggle")h=!c.some(function(_){return m(_)&&_.visible===!0}),v=!1;else{let C=c.some(function(_){return!m(_)&&_.visible===!0&&_.showlegend!==!1});h=!0,v=!C}let g={visible:[]},i=[],w=(r.shapes||[]).map(function(C){return C._input});for(var S=!1,M=0;MB&&(O=B)}z[g][0]._groupMinRank=O,z[g][0]._preGroupSort=g}var F=function(re,ne){return re[0]._groupMinRank-ne[0]._groupMinRank||re[0]._preGroupSort-ne[0]._preGroupSort},P=function(re,ne){var se=p(re.trace.legendrank)?re.trace.legendrank[re.i]:re.trace.legendrank,G=p(ne.trace.legendrank)?ne.trace.legendrank[ne.i]:ne.trace.legendrank;return se-G||re._preSort-ne._preSort};for(z.forEach(function(re,ne){re[0]._preGroupSort=ne}),z.sort(F),g=0;g0)Y=X.width;else return 0;return f?H:Math.min(Y,K)};M.each(function(G){var X=p.select(this),K=E.ensureSingle(X,"g","layers");K.style("opacity",G[0].trace.opacity);var H=_.indentation,Y=_.valign,q=G[0].lineHeight,Z=G[0].height;if(Y==="middle"&&H===0||!q||!Z)K.attr("transform",null);else{var ee={top:1,bottom:-1}[Y],ae=ee*(.5*(q-Z+3))||0,he=_.indentation;K.attr("transform",k(he,ae))}var xe=K.selectAll("g.legendfill").data([G]);xe.enter().append("g").classed("legendfill",!0);var we=K.selectAll("g.legendlines").data([G]);we.enter().append("g").classed("legendlines",!0);var Me=K.selectAll("g.legendsymbols").data([G]);Me.enter().append("g").classed("legendsymbols",!0),Me.selectAll("g.legendpoints").data([G]).enter().append("g").classed("legendpoints",!0)}).each(se).each(D).each(F).each(B).each(j).each(re).each(Q).each(I).each(O).each(U).each($);function I(G){var X=i(G),K=X.showFill,H=X.showLine,Y=X.showGradientLine,q=X.showGradientFill,Z=X.anyFill,ee=X.anyLine,ae=G[0],he=ae.trace,xe,we,Me=t(he),Se=Me.colorscale,Ie=Me.reversescale,Ve=function(Ae){if(Ae.size())if(K)l.fillGroupStyle(Ae,C,!0);else{var Be="legendfill-"+he.uid;l.gradient(Ae,C,Be,g(Ie),Se,"fill")}},Ge=function(Ae){if(Ae.size()){var Be="legendline-"+he.uid;l.lineGroupStyle(Ae),l.gradient(Ae,C,Be,g(Ie),Se,"stroke")}},ke=n.hasMarkers(he)||!Z?"M5,0":ee?"M5,-2":"M5,-3",_e=p.select(this),ce=_e.select(".legendfill").selectAll("path").data(K||q?[G]:[]);if(ce.enter().append("path").classed("js-fill",!0),ce.exit().remove(),ce.attr("d",ke+"h"+u+"v6h-"+u+"z").call(Ve),H||Y){var ve=z(void 0,he.line,h,c);we=E.minExtend(he,{line:{width:ve}}),xe=[E.minExtend(ae,{trace:we})]}var le=_e.select(".legendlines").selectAll("path").data(H||Y?[xe]:[]);le.enter().append("path").classed("js-line",!0),le.exit().remove(),le.attr("d",ke+(Y?"l"+u+",0.0001":"h"+u)).call(H?l.lineGroupStyle:Ge)}function O(G){var X=i(G),K=X.anyFill,H=X.anyLine,Y=X.showLine,q=X.showMarker,Z=G[0],ee=Z.trace,ae=!q&&!H&&!K&&n.hasText(ee),he,xe;function we(ve,le,Ae,Be){var Xe=E.nestedProperty(ee,ve).get(),Ye=E.isArrayOrTypedArray(Xe)&&le?le(Xe):Xe;if(f&&Ye&&Be!==void 0&&(Ye=Be),Ae){if(YeAe[1])return Ae[1]}return Ye}function Me(ve){return Z._distinct&&Z.index&&ve[Z.index]?ve[Z.index]:ve[0]}if(q||ae||Y){var Se={},Ie={};if(q){Se.mc=we("marker.color",Me);var Ve=ee.type==="scattermap";Se.mx=Ve?"circle":we("marker.symbol",Me),Se.mo=we("marker.opacity",E.mean,[.2,1]),Se.mlc=we("marker.line.color",Me),Se.mlw=we("marker.line.width",E.mean,[0,5],m),Se.mld=we("marker.line.dash",Me),Ie.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Ge=we("marker.size",E.mean,[2,16],s);Se.ms=Ge,Ie.marker.size=Ge}Y&&(Ie.line={width:we("line.width",Me,[0,10],c)}),ae&&(Se.tx="Aa",Se.tp=we("textposition",Me),Se.ts=10,Se.tc=we("textfont.color",Me),Se.tf=we("textfont.family",Me),Se.tw=we("textfont.weight",Me),Se.ty=we("textfont.style",Me),Se.tv=we("textfont.variant",Me),Se.tC=we("textfont.textcase",Me),Se.tE=we("textfont.lineposition",Me),Se.tS=we("textfont.shadow",Me)),he=[E.minExtend(Z,Se)],xe=E.minExtend(ee,Ie),xe.selectedpoints=null,xe.texttemplate=null}var ke=p.select(this).select("g.legendpoints"),_e=ke.selectAll("path.scatterpts").data(q?he:[]);_e.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",x),_e.exit().remove(),_e.call(l.pointStyle,xe,C),q&&(he[0].mrc=3);var ce=ke.selectAll("g.pointtext").data(ae?he:[]);ce.enter().append("g").classed("pointtext",!0).append("text").attr("transform",x),ce.exit().remove(),ce.selectAll("text").call(l.textPointStyle,xe,C)}function D(G){var X=G[0].trace,K=X.type==="waterfall";if(G[0]._distinct&&K){var H=G[0].trace[G[0].dir].marker;return G[0].mc=H.color,G[0].mlw=H.line.width,G[0].mlc=H.line.color,P(G,this,"waterfall")}var Y=[];X.visible&&K&&(Y=G[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var q=p.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(Y);q.enter().append("path").classed("legendwaterfall",!0).attr("transform",x).style("stroke-miterlimit",1),q.exit().remove(),q.each(function(Z){var ee=p.select(this),ae=X[Z[0]].marker,he=z(void 0,ae.line,v,m);ee.attr("d",Z[1]).style("stroke-width",he+"px").call(e.fill,ae.color),he&&ee.call(e.stroke,ae.line.color)})}function B(G){P(G,this)}function F(G){P(G,this,"funnel")}function P(G,X,K){var H=G[0].trace,Y=H.marker||{},q=Y.line||{},Z=Y.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",ee=K?H.visible&&H.type===K:b.traceIs(H,"bar"),ae=p.select(X).select("g.legendpoints").selectAll("path.legend"+K).data(ee?[G]:[]);ae.enter().append("path").classed("legend"+K,!0).attr("d",Z).attr("transform",x),ae.exit().remove(),ae.each(function(he){var xe=p.select(this),we=he[0],Me=z(we.mlw,Y.line,v,m);xe.style("stroke-width",Me+"px");var Se=we.mcc;if(!_._inHover&&"mc"in we){var Ie=t(Y),Ve=Ie.mid;Ve===void 0&&(Ve=(Ie.max+Ie.min)/2),Se=l.tryColorscale(Y,"")(Ve)}var Ge=Se||we.mc||Y.color,ke=Y.pattern,_e=l.getPatternAttr,ce=ke&&(_e(ke.shape,0,"")||_e(ke.path,0,""));if(ce){var ve=_e(ke.bgcolor,0,null),le=_e(ke.fgcolor,0,null),Ae=ke.fgopacity,Be=w(ke.size,8,10),Xe=w(ke.solidity,.5,1),Ye="legend-"+H.uid;xe.call(l.pattern,"legend",C,Ye,ce,Be,Xe,Se,ke.fillmode,ve,le,Ae)}else xe.call(e.fill,Ge);Me&&e.stroke(xe,we.mlc||q.color)})}function j(G){var X=G[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendbox").data(X.visible&&b.traceIs(X,"box-violin")?[G]:[]);K.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),K.exit().remove(),K.each(function(){var H=p.select(this);if((X.boxpoints==="all"||X.points==="all")&&e.opacity(X.fillcolor)===0&&e.opacity((X.line||{}).color)===0){var Y=E.minExtend(X,{marker:{size:f?s:E.constrain(X.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});K.call(l.pointStyle,Y,C)}else{var q=z(void 0,X.line,v,m);H.style("stroke-width",q+"px").call(e.fill,X.fillcolor),q&&e.stroke(H,X.line.color)}})}function U(G){var X=G[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(X.visible&&X.type==="candlestick"?[G,G]:[]);K.enter().append("path").classed("legendcandle",!0).attr("d",function(H,Y){return Y?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",x).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(H,Y){var q=p.select(this),Z=X[Y?"increasing":"decreasing"],ee=z(void 0,Z.line,v,m);q.style("stroke-width",ee+"px").call(e.fill,Z.fillcolor),ee&&e.stroke(q,Z.line.color)})}function $(G){var X=G[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(X.visible&&X.type==="ohlc"?[G,G]:[]);K.enter().append("path").classed("legendohlc",!0).attr("d",function(H,Y){return Y?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",x).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(H,Y){var q=p.select(this),Z=X[Y?"increasing":"decreasing"],ee=z(void 0,Z.line,v,m);q.style("fill","none").call(l.dashLine,Z.line.dash,ee),ee&&e.stroke(q,Z.line.color)})}function Q(G){ne(G,this,"pie")}function re(G){ne(G,this,"funnelarea")}function ne(G,X,K){var H=G[0],Y=H.trace,q=K?Y.visible&&Y.type===K:b.traceIs(Y,K),Z=p.select(X).select("g.legendpoints").selectAll("path.legend"+K).data(q?[G]:[]);if(Z.enter().append("path").classed("legend"+K,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),Z.exit().remove(),Z.size()){var ee=Y.marker||{},ae=z(a(ee.line.width,H.pts),ee.line,v,m),he="pieLike",xe=E.minExtend(Y,{marker:{line:{width:ae}}},he),we=E.minExtend(H,{trace:xe},he);r(Z,we,xe,C)}}function se(G){var X=G[0].trace,K,H=[];if(X.visible)switch(X.type){case"histogram2d":case"heatmap":H=[["M-15,-2V4H15V-2Z"]],K=!0;break;case"choropleth":case"choroplethmap":H=[["M-6,-6V6H6V-6Z"]],K=!0;break;case"densitymap":H=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],K="radial";break;case"cone":H=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],K=!1;break;case"streamtube":H=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],K=!1;break;case"surface":H=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],K=!0;break;case"mesh3d":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!1;break;case"volume":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!0;break;case"isosurface":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],K=!1;break}var Y=p.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(H);Y.enter().append("path").classed("legend3dandfriends",!0).attr("transform",x).style("stroke-miterlimit",1),Y.exit().remove(),Y.each(function(q,Z){var ee=p.select(this),ae=t(X),he=ae.colorscale,xe=ae.reversescale,we=function(Ve){if(Ve.size()){var Ge="legendfill-"+X.uid;l.gradient(Ve,C,Ge,g(xe,K==="radial"),he,"fill")}},Me;if(he){if(!K){var Ie=he.length;Me=Z===0?he[xe?Ie-1:0][1]:Z===1?he[xe?0:Ie-1][1]:he[Math.floor((Ie-1)/2)][1]}}else{var Se=X.vertexcolor||X.facecolor||X.color;Me=E.isArrayOrTypedArray(Se)?Se[Z]||Se[0]:Se}ee.attr("d",q[0]),Me?ee.call(e.fill,Me):ee.call(we)})}};function g(S,M){var C=M?"radial":"horizontal";return C+(S?"":"reversed")}function i(S){var M=S[0].trace,C=M.contours,_=n.hasLines(M)||M.visible&&M.type==="quiver",T=n.hasMarkers(M),f=M.visible&&M.fill&&M.fill!=="none",u=!1,A=!1;if(C){var x=C.coloring;x==="lines"?u=!0:_=x==="none"||x==="heatmap"||C.showlines,C.type==="constraint"?f=C._operation!=="=":(x==="fill"||x==="heatmap")&&(A=!0)}return{showMarker:T,showLine:_,showFill:f,showGradientLine:u,showGradientFill:A,anyLine:_||u,anyFill:f||A}}function w(S,M,C){return S&&E.isArrayOrTypedArray(S)?M:S>C?C:S}}}),i5=ze({"src/components/legend/draw.js"(J,V){"use strict";var p=ci(),b=Nr(),E=cl(),k=mi(),l=Hm(),e=_h(),t=$i(),n=Qn(),r=Cs(),a=r5().handleItemClick,o=r5().handleTitleClick,s=a5(),c=dc(),m=c.LINE_SPACING,h=c.FROM_TL,v=c.FROM_BR,g=XI(),i=n5(),w=u1(),S=1,M=/^legend[0-9]*$/;V.exports=function($,Q){if(Q)_($,Q);else{var re=$._fullLayout,ne=re._legends,se=re._infolayer.selectAll('[class^="legend"]');se.each(function(){var H=p.select(this),Y=H.attr("class"),q=Y.split(" ")[0];q.match(M)&&ne.indexOf(q)===-1&&H.remove()});for(var G=0;G1)}var ae=re.hiddenlabels||[];if(!X&&(!re.showlegend||!K.length))return G.selectAll("."+ne).remove(),re._topdefs.select("#"+se).remove(),E.autoMargin(U,ne);var he=b.ensureSingle(G,"g",ne,function(_e){X||_e.attr("pointer-events","all")}),xe=b.ensureSingleById(re._topdefs,"clipPath",se,function(_e){_e.append("rect")}),we=b.ensureSingle(he,"rect","bg",function(_e){_e.attr("shape-rendering","crispEdges")});we.call(n.stroke,Q.bordercolor).call(n.fill,Q.bgcolor).style("stroke-width",Q.borderwidth+"px");var Me=b.ensureSingle(he,"g","scrollbox"),Se=Q.title;Q._titleWidth=0,Q._titleHeight=0;var Ie;Se.text?(Ie=b.ensureSingle(Me,"text",ne+"titletext"),Ie.attr("text-anchor","start").call(t.font,Se.font).text(Se.text),I(Ie,Me,U,Q,S),!X&&(Q.titleclick||Q.titledoubleclick)&&z(Me,U,Q,ne)):(Me.selectAll("."+ne+"titletext").remove(),Me.selectAll("."+ne+"titletoggle").remove());var Ve=b.ensureSingle(he,"rect","scrollbar",function(_e){_e.attr(s.scrollBarEnterAttrs).call(n.fill,s.scrollBarColor)}),Ge=Me.selectAll("g.groups").data(K);Ge.enter().append("g").attr("class","groups"),Ge.exit().remove();var ke=Ge.selectAll("g.traces").data(b.identity);ke.enter().append("g").attr("class","traces"),ke.exit().remove(),ke.style("opacity",function(_e){let ce=_e[0],ve=ce.trace;if(ce.groupTitle){let le=ve.legendgroup,Ae=(re.shapes||[]).filter(function(Xe){return Xe.showlegend});return U._fullData.concat(Ae).some(function(Xe){return Xe.legendgroup===le&&(Xe.legend||"legend")===ne&&Xe.visible===!0})?1:.5}return k.traceIs(ve,"pie-like")?ae.indexOf(_e[0].label)!==-1?.5:1:ve.visible==="legendonly"?.5:1}).each(function(){p.select(this).call(u,U,Q)}).call(i,U,Q).each(function(_e){X||_e[0].groupTitle&&Q.groupclick==="toggleitem"||p.select(this).call(x,U,ne)}),b.syncOrAsync([E.previousPromises,function(){return B(U,Ge,ke,Q,Me)},function(){var _e=re._size,ce=Q.borderwidth,ve=Q.xref==="paper",le=Q.yref==="paper";if(Se.text){let pt=(re.shapes||[]).filter(function(Ct){return Ct.showlegend}),Pt=U._fullData.concat(pt).some(function(Ct){let qt=Ct.legend||"legend";var Vt=Array.isArray(qt)?qt.includes(ne):qt===ne;return Vt&&Ct.visible===!0});Ie.style("opacity",Pt?1:.5)}if(!X){var Ae,Be;ve?Ae=_e.l+_e.w*Q.x-h[P(Q)]*Q._width:Ae=re.width*Q.x-h[P(Q)]*Q._width,le?Be=_e.t+_e.h*(1-Q.y)-h[j(Q)]*Q._effHeight:Be=re.height*(1-Q.y)-h[j(Q)]*Q._effHeight;var Xe=F(U,ne,Ae,Be);if(Xe)return;if(re.margin.autoexpand){var Ye=Ae,yt=Be;Ae=ve?b.constrain(Ae,0,re.width-Q._width):Ye,Be=le?b.constrain(Be,0,re.height-Q._effHeight):yt,Ae!==Ye&&b.log("Constrain "+ne+".x to make legend fit inside graph"),Be!==yt&&b.log("Constrain "+ne+".y to make legend fit inside graph")}t.setTranslate(he,Ae,Be)}if(Ve.on(".drag",null),he.on("wheel",null),X||Q._height<=Q._maxHeight||U._context.staticPlot){var gt=Q._effHeight;X&&(gt=Q._height),we.attr({width:Q._width-ce,height:gt-ce,x:ce/2,y:ce/2}),t.setTranslate(Me,0,0),xe.select("rect").attr({width:Q._width-2*ce,height:gt-2*ce,x:ce,y:ce}),t.setClipUrl(Me,se,U),t.setRect(Ve,0,0,0,0),delete Q._scrollY}else{var Tt=Math.max(s.scrollBarMinHeight,Q._effHeight*Q._effHeight/Q._height),At=Q._effHeight-Tt-2*s.scrollBarMargin,$t=Q._height-Q._effHeight,rr=At/$t,_r=Math.min(Q._scrollY||0,$t);we.attr({width:Q._width-2*ce+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-ce,x:ce/2,y:ce/2}),xe.select("rect").attr({width:Q._width-2*ce+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-2*ce,x:ce,y:ce+_r}),t.setClipUrl(Me,se,U),We(_r,Tt,rr),he.on("wheel",function(){_r=b.constrain(Q._scrollY+p.event.deltaY/$t*At,0,$t),We(_r,Tt,rr),_r!==0&&_r!==$t&&p.event.preventDefault()});var Xt,or,Ot,vt=function(pt,Pt,Ct){var qt=(Ct-Pt)/rr+pt;return b.constrain(qt,0,$t)},ht=function(pt,Pt,Ct){var qt=(Pt-Ct)/rr+pt;return b.constrain(qt,0,$t)},De=p.behavior.drag().on("dragstart",function(){var pt=p.event.sourceEvent;pt.type==="touchstart"?Xt=pt.changedTouches[0].clientY:Xt=pt.clientY,Ot=_r}).on("drag",function(){var pt=p.event.sourceEvent;pt.buttons===2||pt.ctrlKey||(pt.type==="touchmove"?or=pt.changedTouches[0].clientY:or=pt.clientY,_r=vt(Ot,Xt,or),We(_r,Tt,rr))});Ve.call(De);var Ne=p.behavior.drag().on("dragstart",function(){var pt=p.event.sourceEvent;pt.type==="touchstart"&&(Xt=pt.changedTouches[0].clientY,Ot=_r)}).on("drag",function(){var pt=p.event.sourceEvent;pt.type==="touchmove"&&(or=pt.changedTouches[0].clientY,_r=ht(Ot,Xt,or),We(_r,Tt,rr))});Me.call(Ne)}function We(pt,Pt,Ct){Q._scrollY=U._fullLayout[ne]._scrollY=pt,t.setTranslate(Me,0,-pt),t.setRect(Ve,Q._width,s.scrollBarMargin+pt*Ct,s.scrollBarWidth,Pt),xe.select("rect").attr("y",ce+pt)}if(U._context.edits.legendPosition){var Ke,Je,et,Mt;he.classed("cursor-move",!0),e.init({element:he.node(),gd:U,prepFn:function(pt){if(pt.target!==Ve.node()){var Pt=t.getTranslate(he);et=Pt.x,Mt=Pt.y}},moveFn:function(pt,Pt){if(et!==void 0&&Mt!==void 0){var Ct=et+pt,qt=Mt+Pt;t.setTranslate(he,Ct,qt),Ke=e.align(Ct,Q._width,_e.l,_e.l+_e.w,Q.xanchor),Je=e.align(qt+Q._height,-Q._height,_e.t+_e.h,_e.t,Q.yanchor)}},doneFn:function(){if(Ke!==void 0&&Je!==void 0){var pt={};pt[ne+".x"]=Ke,pt[ne+".y"]=Je,k.call("_guiRelayout",U,pt)}},clickFn:function(pt,Pt){var Ct=G.selectAll("g.traces").filter(function(){var qt=this.getBoundingClientRect();return Pt.clientX>=qt.left&&Pt.clientX<=qt.right&&Pt.clientY>=qt.top&&Pt.clientY<=qt.bottom});Ct.size()>0&&f(U,Q,Ct,pt,Pt)}})}}],U)}}function T(U,$,Q){var re=U[0],ne=re.width,se=$.entrywidthmode,G=re.trace.legendwidth||$.entrywidth;return se==="fraction"?$._maxWidth*G:Q+(G||ne)}function f(U,$,Q,re,ne){var se=U._fullLayout,G=Q.data()[0][0].trace,X=$.itemclick,K=$.itemdoubleclick,H={event:ne,node:Q.node(),curveNumber:G.index,expandedIndex:G.index,data:U.data,layout:U.layout,frames:U._transitionData._frames,config:U._context,fullData:U._fullData,fullLayout:se};G._group&&(H.group=G._group),k.traceIs(G,"pie-like")&&(H.label=Q.datum()[0].label);var Y=l.triggerHandler(U,"plotly_legendclick",H);if(re===1){if(Y===!1)return;$._clickTimeout=setTimeout(function(){U._fullLayout&&X&&a(Q,U,$,X)},U._context.doubleClickDelay)}else if(re===2){$._clickTimeout&&clearTimeout($._clickTimeout),U._legendMouseDownTime=0;var q=l.triggerHandler(U,"plotly_legenddoubleclick",H);q!==!1&&Y!==!1&&K&&a(Q,U,$,K)}}function u(U,$,Q){var re=w.getId(Q),ne=U.data()[0][0],se=ne.trace,G=k.traceIs(se,"pie-like"),X=!Q._inHover&&$._context.edits.legendText&&!G,K=Q._maxNameLength,H,Y;ne.groupTitle?(H=ne.groupTitle.text,Y=ne.groupTitle.font):(Y=Q.font,Q.entries?H=ne.text:(H=G?ne.label:se.name,se._meta&&(H=b.templateString(H,se._meta))));var q=b.ensureSingle(U,"text",re+"text");q.attr("text-anchor","start").call(t.font,Y).text(X?A(H,K):H);var Z=Q.indentation+Q.itemwidth+s.itemGap*2;r.positionText(q,Z,0),X?q.call(r.makeEditable,{gd:$,text:H}).call(I,U,$,Q).on("edit",function(ee){this.text(A(ee,K)).call(I,U,$,Q);var ae={};return ae.name=ee,ne.trace._isShape?k.call("_guiRelayout",$,"shapes["+se.index+"].name",ae.name):k.call("_guiRestyle",$,ae,se.index)}):I(q,U,$,Q)}function A(U,$){var Q=Math.max(4,$);if(U&&U.trim().length>=Q/2)return U;U=U||"";for(var re=Q-U.length;re>0;re--)U+=" ";return U}function x(U,$,Q){var re=$._context.doubleClickDelay,ne,se=1,G=b.ensureSingle(U,"rect",Q+"toggle",function(X){$._context.staticPlot||X.style("cursor","pointer").attr("pointer-events","all"),X.call(n.fill,"rgba(0,0,0,0)")});$._context.staticPlot||(G.on("mousedown",function(){ne=new Date().getTime(),ne-$._legendMouseDownTimere&&(se=Math.max(se-1,1)),f($,X,U,se,p.event)}}))}function z(U,$,Q,re){if($._fullData.some(function(H){let Y=H.legend||"legend";return(Array.isArray(Y)?Y.includes(re):Y===re)&&k.traceIs(H,"pie-like")}))return;let se=$._context.doubleClickDelay;var G,X=1;let K=b.ensureSingle(U,"rect",re+"titletoggle",function(H){$._context.staticPlot||H.style("cursor","pointer").attr("pointer-events","all"),H.call(n.fill,"rgba(0,0,0,0)")});$._context.staticPlot||(K.on("mousedown",function(){G=new Date().getTime(),G-$._legendMouseDownTimese&&(X=Math.max(X-1,1));let H={event:p.event,legendId:re,data:$.data,layout:$.layout,fullData:$._fullData,fullLayout:$._fullLayout};if(X===1&&Q.titleclick){if(l.triggerHandler($,"plotly_legendtitleclick",H)===!1)return;Q._titleClickTimeout=setTimeout(function(){$._fullLayout&&o($,Q,Q.titleclick)},se)}else X===2&&(Q._titleClickTimeout&&clearTimeout(Q._titleClickTimeout),$._legendMouseDownTime=0,l.triggerHandler($,"plotly_legendtitledoubleclick",H)!==!1&&Q.titledoubleclick&&o($,Q,Q.titledoubleclick))}))}function I(U,$,Q,re,ne){re._inHover&&U.attr("data-notex",!0),r.convertToTspans(U,Q,function(){O($,Q,re,ne)})}function O(U,$,Q,re){var ne=U.data()[0][0],se=ne&&ne.trace.showlegend;if(Array.isArray(se)&&(se=se[ne.i]!==!1),!Q._inHover&&ne&&!se){U.remove();return}var G=U.select("g[class*=math-group]"),X=G.node(),K=w.getId(Q);Q||(Q=$._fullLayout[K]);var H=Q.borderwidth,Y;re===S?Y=Q.title.font:ne.groupTitle?Y=ne.groupTitle.font:Y=Q.font;var q=Y.size*m,Z,ee;if(X){var ae=t.bBox(X);Z=ae.height,ee=ae.width,re===S?t.setTranslate(G,H,H+Z*.75):t.setTranslate(G,0,Z*.25)}else{var he="."+K+(re===S?"title":"")+"text",xe=U.select(he),we=r.lineCount(xe),Me=xe.node();if(Z=q*we,ee=Me?t.bBox(Me).width:0,re===S)Q.title.side==="left"&&(ee+=s.itemGap*2),r.positionText(xe,H+s.titlePad,H+q);else{var Se=s.itemGap*2+Q.indentation+Q.itemwidth;ne.groupTitle&&(Se=s.itemGap,ee-=Q.indentation+Q.itemwidth),r.positionText(xe,Se,-q*((we-1)/2-.3))}}re===S?(Q._titleWidth=ee,Q._titleHeight=Z):(ne.lineHeight=q,ne.height=Math.max(Z,16)+3,ne.width=ee)}function D(U){var $=0,Q=0,re=U.title.side;return re&&(re.indexOf("left")!==-1&&($=U._titleWidth),re.indexOf("top")!==-1&&(Q=U._titleHeight)),[$,Q]}function B(U,$,Q,re,ne){var se=U._fullLayout,G=w.getId(re);re||(re=se[G]);var X=se._size,K=w.isVertical(re),H=w.isGrouped(re),Y=re.entrywidthmode==="fraction",q=re.borderwidth,Z=2*q,ee=s.itemGap,ae=re.indentation+re.itemwidth+ee*2,he=2*(q+ee),xe=j(re),we=re.y<0||re.y===0&&xe==="top",Me=re.y>1||re.y===1&&xe==="bottom",Se=re.tracegroupgap,Ie={};let{orientation:Ve,yref:Ge}=re,{maxheight:ke}=re,_e=we||Me||Ve!=="v"||Ge!=="paper";ke||(ke=_e?.5:1);let ce=_e?se.height:X.h;re._maxHeight=Math.max(ke>1?ke:ke*ce,30);var ve=0;re._width=0,re._height=0;var le=D(re);if(K)Q.each(function(pt){var Pt=pt[0].height;t.setTranslate(this,q+le[0],q+le[1]+re._height+Pt/2+ee),re._height+=Pt,re._width=Math.max(re._width,pt[0].width)}),ve=ae+re._width,re._width+=ee+ae+Z,re._height+=he,H&&($.each(function(pt,Pt){t.setTranslate(this,0,Pt*re.tracegroupgap)}),re._height+=(re._lgroupsLength-1)*re.tracegroupgap);else{var Ae=P(re),Be=re.x<0||re.x===0&&Ae==="right",Xe=re.x>1||re.x===1&&Ae==="left",Ye=Me||we,yt=se.width/2;re._maxWidth=Math.max(Be?Ye&&Ae==="left"?X.l+X.w:yt:Xe?Ye&&Ae==="right"?X.r+X.w:yt:X.w,2*ae);var gt=0,Tt=0;Q.each(function(pt){var Pt=T(pt,re,ae);gt=Math.max(gt,Pt),Tt+=Pt}),ve=null;var At=0;if(H){var $t=0,rr=0,_r=0;$.each(function(){var pt=0,Pt=0;p.select(this).selectAll("g.traces").each(function(qt){var Vt=T(qt,re,ae),Ht=qt[0].height;t.setTranslate(this,le[0],le[1]+q+ee+Ht/2+Pt),Pt+=Ht,pt=Math.max(pt,Vt),Ie[qt[0].trace.legendgroup]=pt});var Ct=pt+ee;rr>0&&Ct+q+rr>re._maxWidth?(At=Math.max(At,rr),rr=0,_r+=$t+Se,$t=Pt):$t=Math.max($t,Pt),t.setTranslate(this,rr,_r),rr+=Ct}),re._width=Math.max(At,rr)+q,re._height=_r+$t+he}else{var Xt=Q.size(),or=Tt+Z+(Xt-1)*ee=re._maxWidth&&(At=Math.max(At,De),vt=0,ht+=Ot,re._height+=Ot,Ot=0),t.setTranslate(this,le[0]+q+vt,le[1]+q+ht+Pt/2+ee),De=vt+Ct+ee,vt+=qt,Ot=Math.max(Ot,Pt)}),or?(re._width=vt+Z,re._height=Ot+he):(re._width=Math.max(At,De)+Z,re._height+=Ot+he)}}re._width=Math.ceil(Math.max(re._width+le[0],re._titleWidth+2*(q+s.titlePad))),re._height=Math.ceil(Math.max(re._height+le[1],re._titleHeight+2*(q+s.itemGap))),re._effHeight=Math.min(re._height,re._maxHeight);var Ne=U._context.edits,We=Ne.legendText||Ne.legendPosition;Q.each(function(pt){var Pt=p.select(this).select("."+G+"toggle"),Ct=pt[0].height,qt=pt[0].trace.legendgroup,Vt=T(pt,re,ae);H&&qt!==""&&(Vt=Ie[qt]);var Ht=We?ae:ve||Vt;!K&&!Y&&(Ht+=ee/2),t.setRect(Pt,0,-Ct/2,Ht,Ct)});var Ke=ne.select("."+G+"titletext");Ke.node()&&C(Ke,re,q);var Je=ne.select("."+G+"titletoggle");if(Je.size()&&Ke.node()){var et=Ke.attr("x")||0,Mt=s.titlePad;t.setRect(Je,et-Mt,q,re._titleWidth+2*Mt,re._titleHeight+2*Mt)}}function F(U,$,Q,re){var ne=U._fullLayout,se=ne[$],G=P(se),X=j(se),K=se.xref==="paper",H=se.yref==="paper";U._fullLayout._reservedMargin[$]={};var Y=se.y<.5?"b":"t",q=se.x<.5?"l":"r",Z={r:ne.width-Q,l:Q+se._width,b:ne.height-re,t:re+se._effHeight};if(K&&H)return E.autoMargin(U,$,{x:se.x,y:se.y,l:se._width*h[G],r:se._width*v[G],b:se._effHeight*v[X],t:se._effHeight*h[X]});K?U._fullLayout._reservedMargin[$][Y]=Z[Y]:H||se.orientation==="v"?U._fullLayout._reservedMargin[$][q]=Z[q]:U._fullLayout._reservedMargin[$][Y]=Z[Y]}function P(U){return b.isRightAnchor(U)?"right":b.isCenterAnchor(U)?"center":"left"}function j(U){return b.isBottomAnchor(U)?"bottom":b.isMiddleAnchor(U)?"middle":"top"}}}),o5=ze({"src/components/fx/hover.js"(J){"use strict";var V=ci(),p=ao(),b=Nr(),E=b.pushUnique,k=b.strTranslate,l=b.strRotate,e=Hm(),t=Cs(),n=YI(),r=$i(),a=Qn(),o=_h(),s=Gi(),c=hc().zindexSeparator,m=mi(),h=kh(),v=a1(),g=t5(),i=i5(),w=v.YANGLE,S=Math.PI*w/180,M=1/Math.sin(S),C=Math.cos(S),_=Math.sin(S),T=v.HOVERARROWSIZE,f=v.HOVERTEXTPAD,u={box:!0,ohlc:!0,violin:!0,candlestick:!0},A={scatter:!0,scattergl:!0,splom:!0};function x(q,Z){return q.distance-Z.distance}J.hover=function(Z,ee,ae,he){Z=b.getGraphDiv(Z);var xe=ee.target;b.throttle(Z._fullLayout._uid+v.HOVERID,v.HOVERMINTIME,function(){z(Z,ee,ae,he,xe)})},J.loneHover=function(Z,ee){var ae=!0;Array.isArray(Z)||(ae=!1,Z=[Z]);var he=ee.gd,xe=K(he),we=H(he),Me=Z.map(function(le){var Ae=le._x0||le.x0||le.x||0,Be=le._x1||le.x1||le.x||0,Xe=le._y0||le.y0||le.y||0,Ye=le._y1||le.y1||le.y||0,yt=le.eventData;if(yt){var gt=Math.min(Ae,Be),Tt=Math.max(Ae,Be),At=Math.min(Xe,Ye),$t=Math.max(Xe,Ye),rr=le.trace;if(m.traceIs(rr,"gl3d")){var _r=he._fullLayout[rr.scene]._scene.container,Xt=_r.offsetLeft,or=_r.offsetTop;gt+=Xt,Tt+=Xt,At+=or,$t+=or}yt.bbox={x0:gt+we,x1:Tt+we,y0:At+xe,y1:$t+xe},yt.xPixel=(Ae+Be)/2,yt.yPixel=(Xe+Ye)/2,ee.inOut_bbox&&ee.inOut_bbox.push(yt.bbox)}else yt=!1;return{color:le.color||a.defaultLine,x0:le.x0||le.x||0,x1:le.x1||le.x||0,y0:le.y0||le.y||0,y1:le.y1||le.y||0,xLabel:le.xLabel,yLabel:le.yLabel,zLabel:le.zLabel,text:le.text,name:le.name,idealAlign:le.idealAlign,borderColor:le.borderColor,fontFamily:le.fontFamily,fontSize:le.fontSize,fontColor:le.fontColor,fontWeight:le.fontWeight,fontStyle:le.fontStyle,fontVariant:le.fontVariant,nameLength:le.nameLength,textAlign:le.textAlign,trace:le.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:le.hovertemplate||!1,hovertemplateLabels:le.hovertemplateLabels||!1,eventData:yt}}),Se=!1,Ie=D(Me,{gd:he,hovermode:"closest",rotateLabels:Se,bgColor:ee.bgColor||a.background,container:V.select(ee.container),outerContainer:ee.outerContainer||ee.container}),Ve=Ie.hoverLabels,Ge=5,ke=0,_e=0;Ve.sort(function(le,Ae){return le.y0-Ae.y0}).each(function(le,Ae){var Be=le.y0-le.by/2;Be-GeTt[0]._length||nr<0||nr>At[0]._length)return o.unhoverRaw(q,Z)}if(Z.pointerX=Rt+Tt[0]._offset,Z.pointerY=nr+At[0]._offset,"xval"in Z?ht=h.flat(xe,Z.xval):ht=h.p2c(Tt,Rt),"yval"in Z?De=h.flat(xe,Z.yval):De=h.p2c(At,nr),q._hoverPointerX=Z.pointerX,q._hoverPointerY=Z.pointerY,!p(ht[0])||!p(De[0]))return b.warn("Fx.hover failed",Z,q),o.unhoverRaw(q,Z)}Me.clickanywhere&&(q._hoverXVals=ht,q._hoverYVals=De,q._hoverXAxes=Tt,q._hoverYAxes=At);var Rr=1/0;function Qr(fn,Ai){for(We=0;WeVt&&(Ot.splice(0,Vt),Rr=Ot[0].distance),Ge&&or!==0&&Ot.length===0){qt.distance=or,qt.index=!1;var qi=Je._module.hoverPoints(qt,Pt,Ct,"closest",{hoverLayer:Me._hoverlayer});if(qi&&(qi=qi.filter(function(Mi){return Mi.spikeDistance<=or})),qi&&qi.length){var io,oo=qi.filter(function(Mi){return Mi.xa.showspikes&&Mi.xa.spikesnap!=="hovered data"});if(oo.length){var Vn=oo[0];p(Vn.x0)&&p(Vn.y0)&&(io=ha(Vn),(!Ht.vLinePoint||Ht.vLinePoint.spikeDistance>io.spikeDistance)&&(Ht.vLinePoint=io))}var qn=qi.filter(function(Mi){return Mi.ya.showspikes&&Mi.ya.spikesnap!=="hovered data"});if(qn.length){var Hi=qn[0];p(Hi.x0)&&p(Hi.y0)&&(io=ha(Hi),(!Ht.hLinePoint||Ht.hLinePoint.spikeDistance>io.spikeDistance)&&(Ht.hLinePoint=io))}}}}}Qr();function Zr(fn,Ai,jn){for(var Xn=null,eo=1/0,gi,qi=0;qifn.trace.index===vi.trace.index):Ot=[vi];var Yi=Ot.length,Ja=X("x",vi,Me),Oa=X("y",vi,Me);Qr(Ja,Oa);var lt=[],rt={},fr=0,lr=function(fn){var Ai=u[fn.trace.type]?I(fn):fn.trace.index;if(!rt[Ai])fr++,rt[Ai]=fr,lt.push(fn);else{var jn=rt[Ai]-1,Xn=lt[jn];jn>0&&Math.abs(fn.distance)Yi-1;Tr--)lr(Ot[Tr]);Ot=lt,Xa()}var Ir=q._hoverdata,Dr=[],ot=K(q),kt=H(q);for(let fn of Ot){var jt=h.makeEventData(fn,fn.trace,fn.cd);if(fn.hovertemplate!==!1){var ar=!1;fn.cd[fn.index]&&fn.cd[fn.index].ht&&(ar=fn.cd[fn.index].ht),fn.hovertemplate=ar||fn.trace.hovertemplate||!1}if(fn.xa&&fn.ya){var Er=fn.x0+fn.xa._offset,xr=fn.x1+fn.xa._offset,zr=fn.y0+fn.ya._offset,Lr=fn.y1+fn.ya._offset,aa=Math.min(Er,xr),Sa=Math.max(Er,xr),wa=Math.min(zr,Lr),pn=Math.max(zr,Lr);jt.bbox={x0:aa+kt,x1:Sa+kt,y0:wa+ot,y1:pn+ot},jt.xPixel=(Er+xr)/2,jt.yPixel=(zr+Lr)/2}fn.eventData=[jt],Dr.push(jt)}q._hoverdata=Dr;var tn=ke==="y"&&(vt.length>1||Ot.length>1)||ke==="closest"&&Sr&&Ot.length>1,ai=a.combine(Me.plot_bgcolor||a.background,Me.paper_bgcolor),rn=D(Ot,{gd:q,hovermode:ke,rotateLabels:tn,bgColor:ai,container:Me._hoverlayer,outerContainer:Me._paper.node(),commonLabelOpts:Me.hoverlabel,hoverdistance:Me.hoverdistance}),Ri=rn.hoverLabels;if(h.isUnifiedHover(ke)||(F(Ri,tn,Me,rn.commonLabelBoundingBox),U(Ri,tn,Me._invScaleX,Me._invScaleY)),he&&he.tagName){var Gn=m.getComponentMethod("annotations","hasClickToShow")(q,Dr);n(V.select(he),Gn?"pointer":"")}var no=re(q,Z,Ir);if(!he||ae||!no&&!Me.hoveranywhere)return;Ir&&no&&q.emit("plotly_unhover",{event:Z,points:Ir}),Di(q._hoverdata);function Di(fn){q.emit("plotly_hover",{event:Z,points:fn,xaxes:Tt,yaxes:At,xvals:h.c2dApply(Tt,ht),yvals:h.c2dApply(At,De),xPixel:Z.pointerX,yPixel:Z.pointerY})}}function I(q){return[q.trace.index,q.index,q.x0,q.y0,q.name,q.attr,q.xa?q.xa._id:"",q.ya?q.ya._id:""].join(",")}var O=/([\s\S]*)<\/extra>/;function D(q,Z){var ee=Z.gd,ae=ee._fullLayout,he=Z.hovermode,xe=Z.rotateLabels,we=Z.bgColor,Me=Z.container,Se=Z.outerContainer,Ie=Z.commonLabelOpts||{};if(q.length===0)return[[]];var Ve=Z.fontFamily||v.HOVERFONT,Ge=Z.fontSize||v.HOVERFONTSIZE,ke=Z.fontWeight||ae.font.weight,_e=Z.fontStyle||ae.font.style,ce=Z.fontVariant||ae.font.variant,ve=Z.fontTextcase||ae.font.textcase,le=Z.fontLineposition||ae.font.lineposition,Ae=Z.fontShadow||ae.font.shadow,Be=q[0],Xe=Be.xa,Ye=Be.ya,yt=he.charAt(0),gt=yt+"Label",Tt=Be[gt];if(Tt===void 0&&Xe.type==="multicategory")for(var At=0;Atae.width-Dr&&(ot=ae.width-Dr),en.attr("d","M"+(lr-ot)+",0L"+(lr-ot+T)+","+Ir+T+"H"+Dr+"v"+Ir+(f*2+fr.height)+"H"+-Dr+"V"+Ir+T+"H"+(lr-ot-T)+"Z"),lr=ot,We.minX=lr-Dr,We.maxX=lr+Dr,Xe.side==="top"?(We.minY=Tr-(f*2+fr.height),We.maxY=Tr-f):(We.minY=Tr+f,We.maxY=Tr+(f*2+fr.height))}else{var kt,jt,ar;Ye.side==="right"?(kt="start",jt=1,ar="",lr=Xe._offset+Xe._length):(kt="end",jt=-1,ar="-",lr=Xe._offset),Tr=Ye._offset+(Be.y0+Be.y1)/2,vi.attr("text-anchor",kt),en.attr("d","M0,0L"+ar+T+","+T+"V"+(f+fr.height/2)+"h"+ar+(f*2+fr.width)+"V-"+(f+fr.height/2)+"H"+ar+T+"V-"+T+"Z"),We.minY=Tr-(f+fr.height/2),We.maxY=Tr+(f+fr.height/2),Ye.side==="right"?(We.minX=lr+T,We.maxX=lr+T+(f*2+fr.width)):(We.minX=lr-T-(f*2+fr.width),We.maxX=lr-T);var Er=fr.height/2,xr=rr-fr.top-Er,zr="clip"+ae._uid+"commonlabel"+Ye._id,Lr;if(lren.hoverinfo!=="none");if(on.length===0)return[];var Ke=ae.hoverlabel,Je=Ke.font,et=on[0],Mt=((he==="x unified"?et.xa:et.ya).unifiedhovertitle||{}).text,pt=Mt?b.hovertemplateString({data:he==="x unified"?[{xa:et.xa,x:et.xVal}]:[{ya:et.ya,y:et.yVal}],fallback:et.trace.hovertemplatefallback,locale:ae._d3locale,template:Mt}):Tt,Pt={showlegend:!0,legend:{title:{text:pt,font:Je},font:Je,bgcolor:Ke.bgcolor,bordercolor:Ke.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:ae.legend?ae.legend.traceorder:void 0,orientation:"v"}},Ct={font:Je};g(Pt,Ct,ee._fullData);var qt=Ct.legend;qt.entries=[];for(var Vt=0;Vt=0?Un=Xa:ja+cr<_r&&ja>=0?Un=ja:Nn+cr<_r?Un=Nn:Xa-Zr=0?li=La:un+Rr=0?li=un:yn+Rr=0,(on.idealAlign==="top"||!wa)&&pn?(ar-=xr/2,on.anchor="end"):wa?(ar+=xr/2,on.anchor="start"):on.anchor="middle",on.crossPos=ar;else{if(on.pos=ar,wa=jt+Er/2+Sa<=_r,pn=jt-Er/2-Sa>=0,(on.idealAlign==="left"||!wa)&&pn)jt-=Er/2,on.anchor="end";else if(wa)jt+=Er/2,on.anchor="start";else{on.anchor="middle";var tn=Sa/2,ai=jt+tn-_r,rn=jt-tn;ai>0&&(jt-=ai),rn<0&&(jt+=-rn)}on.crossPos=jt}Tr.attr("text-anchor",on.anchor),Dr&&Ir.attr("text-anchor",on.anchor),en.attr("transform",k(jt,ar)+(xe?l(w):""))}),{hoverLabels:Yn,commonLabelBoundingBox:We}}function B(q,Z,ee,ae,he,xe){var we,Me,Se="",Ie="";q.nameOverride!==void 0&&(q.name=q.nameOverride),q.name&&(q.trace._meta&&(q.name=b.templateString(q.name,q.trace._meta)),Se=se(q.name,q.nameLength));var Ve=ee.charAt(0),Ge=Ve==="x"?"y":"x";q.zLabel!==void 0?(q.xLabel!==void 0&&(Ie+="x: "+q.xLabel+"
"),q.yLabel!==void 0&&(Ie+="y: "+q.yLabel+"
"),q.trace.type!=="choropleth"&&q.trace.type!=="choroplethmap"&&(Ie+=(Ie?"z: ":"")+q.zLabel)):Z&&q[Ve+"Label"]===he?Ie=q[Ge+"Label"]||"":q.xLabel===void 0?q.yLabel!==void 0&&q.trace.type!=="scattercarpet"&&(Ie=q.yLabel):q.yLabel===void 0?Ie=q.xLabel:Ie="("+q.xLabel+", "+q.yLabel+")",(q.text||q.text===0)&&!Array.isArray(q.text)&&(Ie+=(Ie?"
":"")+q.text),q.extraText!==void 0&&(Ie+=(Ie?"
":"")+q.extraText),xe&&Ie===""&&!q.hovertemplate&&(Se===""&&xe.remove(),Ie=Se),(Me=(we=q.trace)==null?void 0:we.hoverlabel)!=null&&Me.split&&(q.hovertemplate="");let{hovertemplate:ke=!1}=q;if(ke){let _e=q.hovertemplateLabels||q;q[Ve+"Label"]!==he&&(_e[Ve+"other"]=_e[Ve+"Val"],_e[Ve+"otherLabel"]=_e[Ve+"Label"]),Ie=b.hovertemplateString({data:[q.eventData[0]||{},q.trace._meta],fallback:q.trace.hovertemplatefallback,labels:_e,locale:ae._d3locale,template:ke}),Ie=Ie.replace(O,(ce,ve)=>(Se=se(ve,q.nameLength),""))}return[Ie,Se]}function F(q,Z,ee,ae){var he=Z?"xa":"ya",xe=Z?"ya":"xa",we=0,Me=1,Se=q.size(),Ie=new Array(Se),Ve=0,Ge=ae.minX,ke=ae.maxX,_e=ae.minY,ce=ae.maxY,ve=function(ht){return ht*ee._invScaleX},le=function(ht){return ht*ee._invScaleY};q.each(function(ht){var De=ht[he],Ne=ht[xe],We=De._id.charAt(0)==="x",Ke=De.range;Ve===0&&Ke&&Ke[0]>Ke[1]!==We&&(Me=-1);var Je=0,et=We?ee.width:ee.height;if(ee.hovermode==="x"||ee.hovermode==="y"){var Mt=P(ht,Z),pt=ht.anchor,Pt=pt==="end"?-1:1,Ct,qt;if(pt==="middle")Ct=ht.crossPos+(We?le(Mt.y-ht.by/2):ve(ht.bx/2+ht.tx2width/2)),qt=Ct+(We?le(ht.by):ve(ht.bx));else if(We)Ct=ht.crossPos+le(T+Mt.y)-le(ht.by/2-T),qt=Ct+le(ht.by);else{var Vt=ve(Pt*T+Mt.x),Ht=Vt+ve(Pt*ht.bx);Ct=ht.crossPos+Math.min(Vt,Ht),qt=ht.crossPos+Math.max(Vt,Ht)}We?_e!==void 0&&ce!==void 0&&Math.min(qt,ce)-Math.max(Ct,_e)>1&&(Ne.side==="left"?(Je=Ne._mainLinePosition,et=ee.width):et=Ne._mainLinePosition):Ge!==void 0&&ke!==void 0&&Math.min(qt,ke)-Math.max(Ct,Ge)>1&&(Ne.side==="top"?(Je=Ne._mainLinePosition,et=ee.height):et=Ne._mainLinePosition)}Ie[Ve++]=[{datum:ht,traceIndex:ht.trace.index,dp:0,pos:ht.pos,posref:ht.posref,size:ht.by*(We?M:1)/2,pmin:Je,pmax:et}]}),Ie.sort(function(ht,De){return ht[0].posref-De[0].posref||Me*(De[0].traceIndex-ht[0].traceIndex)});var Ae,Be,Xe,Ye,yt,gt,Tt;function At(ht){var De=ht[0],Ne=ht[ht.length-1];if(Be=De.pmin-De.pos-De.dp+De.size,Xe=Ne.pos+Ne.dp+Ne.size-De.pmax,Be>.01){for(yt=ht.length-1;yt>=0;yt--)ht[yt].dp+=Be;Ae=!1}if(!(Xe<.01)){if(Be<-.01){for(yt=ht.length-1;yt>=0;yt--)ht[yt].dp-=Xe;Ae=!1}if(Ae){var We=0;for(Ye=0;YeDe.pmax&&We++;for(Ye=ht.length-1;Ye>=0&&!(We<=0);Ye--)gt=ht[Ye],gt.pos>De.pmax-1&&(gt.del=!0,We--);for(Ye=0;Ye=0;yt--)ht[yt].dp-=Xe;for(Ye=ht.length-1;Ye>=0&&!(We<=0);Ye--)gt=ht[Ye],gt.pos+gt.dp+gt.size>De.pmax&&(gt.del=!0,We--)}}}for(;!Ae&&we<=Se;){for(we++,Ae=!0,Ye=0;Ye.01){for(yt=rr.length-1;yt>=0;yt--)rr[yt].dp+=Be;for($t.push.apply($t,rr),Ie.splice(Ye+1,1),Tt=0,yt=$t.length-1;yt>=0;yt--)Tt+=$t[yt].dp;for(Xe=Tt/$t.length,yt=$t.length-1;yt>=0;yt--)$t[yt].dp-=Xe;Ae=!1}else Ye++}Ie.forEach(At)}for(Ye=Ie.length-1;Ye>=0;Ye--){var or=Ie[Ye];for(yt=or.length-1;yt>=0;yt--){var Ot=or[yt],vt=Ot.datum;vt.offset=Ot.dp,vt.del=Ot.del}}}function P(q,Z){var ee=0,ae=q.offset;return Z&&(ae*=-_,ee=q.offset*C),{x:ee,y:ae}}function j(q){var Z={start:1,end:-1,middle:0}[q.anchor],ee=Z*(T+f),ae=ee+Z*(q.txwidth+f),he=q.anchor==="middle";return he&&(ee-=q.tx2width/2,ae+=q.txwidth/2+f),{alignShift:Z,textShiftX:ee,text2ShiftX:ae}}function U(q,Z,ee,ae){var he=function(we){return we*ee},xe=function(we){return we*ae};q.each(function(we){var Me=V.select(this);if(we.del)return Me.remove();var Se=Me.select("text.nums"),Ie=we.anchor,Ve=Ie==="end"?-1:1,Ge=j(we),ke=P(we,Z),_e=ke.x,ce=ke.y,ve=Ie==="middle",le="hoverlabel"in we.trace?we.trace.hoverlabel.showarrow:!0,Ae;ve?Ae="M-"+he(we.bx/2+we.tx2width/2)+","+xe(ce-we.by/2)+"h"+he(we.bx)+"v"+xe(we.by)+"h-"+he(we.bx)+"Z":le?Ae="M0,0L"+he(Ve*T+_e)+","+xe(T+ce)+"v"+xe(we.by/2-T)+"h"+he(Ve*we.bx)+"v-"+xe(we.by)+"H"+he(Ve*T+_e)+"V"+xe(ce-T)+"Z":Ae="M"+he(Ve*T+_e)+","+xe(ce-we.by/2)+"h"+he(Ve*we.bx)+"v"+xe(we.by)+"h"+he(-Ve*we.bx)+"Z",Me.select("path").attr("d",Ae);var Be=_e+Ge.textShiftX,Xe=ce+we.ty0-we.by/2+f,Ye=we.textAlign||"auto";Ye!=="auto"&&(Ye==="left"&&Ie!=="start"?(Se.attr("text-anchor","start"),Be=ve?-we.bx/2-we.tx2width/2+f:-we.bx-f):Ye==="right"&&Ie!=="end"&&(Se.attr("text-anchor","end"),Be=ve?we.bx/2-we.tx2width/2-f:we.bx+f)),Se.call(t.positionText,he(Be),xe(Xe)),we.tx2width&&(Me.select("text.name").call(t.positionText,he(Ge.text2ShiftX+Ge.alignShift*f+_e),xe(ce+we.ty0-we.by/2+f)),Me.select("rect").call(r.setRect,he(Ge.text2ShiftX+(Ge.alignShift-1)*we.tx2width/2+_e),xe(ce-we.by/2-1),he(we.tx2width),xe(we.by+2)))})}function $(q,Z){var ee=q.index,ae=q.trace||{},he=q.cd[0],xe=q.cd[ee]||{};function we(ke){return ke||p(ke)&&ke===0}var Me=Array.isArray(ee)?function(ke,_e){var ce=b.castOption(he,ee,ke);return we(ce)?ce:b.extractOption({},ae,"",_e)}:function(ke,_e){return b.extractOption(xe,ae,ke,_e)};function Se(ke,_e,ce){var ve=Me(_e,ce);we(ve)&&(q[ke]=ve)}if(Se("hoverinfo","hi","hoverinfo"),Se("bgcolor","hbg","hoverlabel.bgcolor"),Se("borderColor","hbc","hoverlabel.bordercolor"),Se("fontFamily","htf","hoverlabel.font.family"),Se("fontSize","hts","hoverlabel.font.size"),Se("fontColor","htc","hoverlabel.font.color"),Se("fontWeight","htw","hoverlabel.font.weight"),Se("fontStyle","hty","hoverlabel.font.style"),Se("fontVariant","htv","hoverlabel.font.variant"),Se("nameLength","hnl","hoverlabel.namelength"),Se("textAlign","hta","hoverlabel.align"),q.posref=Z==="y"||Z==="closest"&&ae.orientation==="h"?q.xa._offset+(q.x0+q.x1)/2:q.ya._offset+(q.y0+q.y1)/2,q.x0=b.constrain(q.x0,0,q.xa._length),q.x1=b.constrain(q.x1,0,q.xa._length),q.y0=b.constrain(q.y0,0,q.ya._length),q.y1=b.constrain(q.y1,0,q.ya._length),q.xLabelVal!==void 0&&(q.xLabel="xLabel"in q?q.xLabel:s.hoverLabelText(q.xa,q.xLabelVal,ae.xhoverformat),q.xVal=q.xa.c2d(q.xLabelVal)),q.yLabelVal!==void 0&&(q.yLabel="yLabel"in q?q.yLabel:s.hoverLabelText(q.ya,q.yLabelVal,ae.yhoverformat),q.yVal=q.ya.c2d(q.yLabelVal)),q.zLabelVal!==void 0&&q.zLabel===void 0&&(q.zLabel=String(q.zLabelVal)),!isNaN(q.xerr)&&!(q.xa.type==="log"&&q.xerr<=0)){var Ie=s.tickText(q.xa,q.xa.c2l(q.xerr),"hover").text;q.xerrneg!==void 0?q.xLabel+=" +"+Ie+" / -"+s.tickText(q.xa,q.xa.c2l(q.xerrneg),"hover").text:q.xLabel+=" \xB1 "+Ie,Z==="x"&&(q.distance+=1)}if(!isNaN(q.yerr)&&!(q.ya.type==="log"&&q.yerr<=0)){var Ve=s.tickText(q.ya,q.ya.c2l(q.yerr),"hover").text;q.yerrneg!==void 0?q.yLabel+=" +"+Ve+" / -"+s.tickText(q.ya,q.ya.c2l(q.yerrneg),"hover").text:q.yLabel+=" \xB1 "+Ve,Z==="y"&&(q.distance+=1)}var Ge=q.hoverinfo||q.trace.hoverinfo;return Ge&&Ge!=="all"&&(Ge=Array.isArray(Ge)?Ge:Ge.split("+"),Ge.indexOf("x")===-1&&(q.xLabel=void 0),Ge.indexOf("y")===-1&&(q.yLabel=void 0),Ge.indexOf("z")===-1&&(q.zLabel=void 0),Ge.indexOf("text")===-1&&(q.text=void 0),Ge.indexOf("name")===-1&&(q.name=void 0)),q}function Q(q,Z,ee){var ae=ee.container,he=ee.fullLayout,xe=he._size,we=ee.event,Me=!!Z.hLinePoint,Se=!!Z.vLinePoint,Ie,Ve;if(ae.selectAll(".spikeline").remove(),!!(Se||Me)){var Ge=a.combine(he.plot_bgcolor,he.paper_bgcolor);if(Me){var ke=Z.hLinePoint,_e,ce;Ie=ke&&ke.xa,Ve=ke&&ke.ya;var ve=Ve.spikesnap;ve==="cursor"?(_e=we.pointerX,ce=we.pointerY):(_e=Ie._offset+ke.x,ce=Ve._offset+ke.y);var le=a.wcagContrast(ke.color,Ge)<1.5?a.contrast(Ge):ke.color,Ae=Ve.spikemode,Be=Ve.spikethickness,Xe=Ve.spikecolor||le,Ye=s.getPxPosition(q,Ve),yt,gt;if(Ae.indexOf("toaxis")!==-1||Ae.indexOf("across")!==-1){if(Ae.indexOf("toaxis")!==-1&&(yt=Ye,gt=_e),Ae.indexOf("across")!==-1){var Tt=Ve._counterDomainMin,At=Ve._counterDomainMax;Ve.anchor==="free"&&(Tt=Math.min(Tt,Ve.position),At=Math.max(At,Ve.position)),yt=xe.l+Tt*xe.w,gt=xe.l+At*xe.w}ae.insert("line",":first-child").attr({x1:yt,x2:gt,y1:ce,y2:ce,"stroke-width":Be,stroke:Xe,"stroke-dasharray":r.dashStyle(Ve.spikedash,Be)}).classed("spikeline",!0).classed("crisp",!0),ae.insert("line",":first-child").attr({x1:yt,x2:gt,y1:ce,y2:ce,"stroke-width":Be+2,stroke:Ge}).classed("spikeline",!0).classed("crisp",!0)}Ae.indexOf("marker")!==-1&&ae.insert("circle",":first-child").attr({cx:Ye+(Ve.side!=="right"?Be:-Be),cy:ce,r:Be,fill:Xe}).classed("spikeline",!0)}if(Se){var $t=Z.vLinePoint,rr,_r;Ie=$t&&$t.xa,Ve=$t&&$t.ya;var Xt=Ie.spikesnap;Xt==="cursor"?(rr=we.pointerX,_r=we.pointerY):(rr=Ie._offset+$t.x,_r=Ve._offset+$t.y);var or=a.wcagContrast($t.color,Ge)<1.5?a.contrast(Ge):$t.color,Ot=Ie.spikemode,vt=Ie.spikethickness,ht=Ie.spikecolor||or,De=s.getPxPosition(q,Ie),Ne,We;if(Ot.indexOf("toaxis")!==-1||Ot.indexOf("across")!==-1){if(Ot.indexOf("toaxis")!==-1&&(Ne=De,We=_r),Ot.indexOf("across")!==-1){var Ke=Ie._counterDomainMin,Je=Ie._counterDomainMax;Ie.anchor==="free"&&(Ke=Math.min(Ke,Ie.position),Je=Math.max(Je,Ie.position)),Ne=xe.t+(1-Je)*xe.h,We=xe.t+(1-Ke)*xe.h}ae.insert("line",":first-child").attr({x1:rr,x2:rr,y1:Ne,y2:We,"stroke-width":vt,stroke:ht,"stroke-dasharray":r.dashStyle(Ie.spikedash,vt)}).classed("spikeline",!0).classed("crisp",!0),ae.insert("line",":first-child").attr({x1:rr,x2:rr,y1:Ne,y2:We,"stroke-width":vt+2,stroke:Ge}).classed("spikeline",!0).classed("crisp",!0)}Ot.indexOf("marker")!==-1&&ae.insert("circle",":first-child").attr({cx:rr,cy:De-(Ie.side!=="top"?vt:-vt),r:vt,fill:ht}).classed("spikeline",!0)}}}function re(q,Z,ee){if(!ee||ee.length!==q._hoverdata.length)return!0;for(var ae=ee.length-1;ae>=0;ae--){var he=ee[ae],xe=q._hoverdata[ae];if(he.curveNumber!==xe.curveNumber||String(he.pointNumber)!==String(xe.pointNumber)||String(he.pointNumbers)!==String(xe.pointNumbers)||he.binNumber!==xe.binNumber)return!0}return!1}function ne(q,Z){return!Z||Z.vLinePoint!==q._spikepoints.vLinePoint||Z.hLinePoint!==q._spikepoints.hLinePoint}function se(q,Z){return t.plainText(q||"",{len:Z,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function G(q,Z){for(var ee=Z.charAt(0),ae=[],he=[],xe=[],we=0;weq.offsetTop+q.clientTop,H=q=>q.offsetLeft+q.clientLeft;function Y(q,Z){var ee=q._fullLayout,ae=Z.getBoundingClientRect(),he=ae.left,xe=ae.top,we=he+ae.width,Me=xe+ae.height,Se=b.apply3DTransform(ee._invTransform)(he,xe),Ie=b.apply3DTransform(ee._invTransform)(we,Me),Ve=Se[0],Ge=Se[1],ke=Ie[0],_e=Ie[1];return{x:Ve,y:Ge,width:ke-Ve,height:_e-Ge,top:Math.min(Ge,_e),left:Math.min(Ve,ke),right:Math.max(Ve,ke),bottom:Math.max(Ge,_e)}}}}),c1=ze({"src/components/fx/hoverlabel_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=kh().isUnifiedHover;V.exports=function(l,e,t,n){n=n||{};var r=e.legend;function a(o){n.font[o]||(n.font[o]=r?e.legend.font[o]:e.font[o])}e&&E(e.hovermode)&&(n.font||(n.font={}),a("size"),a("family"),a("color"),a("weight"),a("style"),a("variant"),r?(n.bgcolor||(n.bgcolor=b.combine(e.legend.bgcolor,e.paper_bgcolor)),n.bordercolor||(n.bordercolor=e.legend.bordercolor)):n.bgcolor||(n.bgcolor=e.paper_bgcolor)),t("hoverlabel.bgcolor",n.bgcolor),t("hoverlabel.bordercolor",n.bordercolor),t("hoverlabel.namelength",n.namelength),t("hoverlabel.showarrow",n.showarrow),p.coerceFont(t,"hoverlabel.font",n.font),t("hoverlabel.align",n.align)}}}),$I=ze({"src/components/fx/layout_global_defaults.js"(J,V){"use strict";var p=Nr(),b=c1(),E=rv();V.exports=function(l,e){function t(n,r){return p.coerce(l,e,E,n,r)}b(l,e,t)}}}),KI=ze({"src/components/fx/defaults.js"(J,V){"use strict";var p=Nr(),b=qm(),E=c1();V.exports=function(l,e,t,n){function r(o,s){return p.coerce(l,e,b,o,s)}var a=p.extendFlat({},n.hoverlabel);e.hovertemplate&&(a.namelength=-1),E(l,e,r,a)}}}),s5=ze({"src/components/fx/hovermode_defaults.js"(J,V){"use strict";var p=Nr(),b=rv();V.exports=function(k,l){function e(t,n){return l[t]!==void 0?l[t]:p.coerce(k,l,b,t,n)}return e("clickmode"),e("hoversubplots"),e("hoveranywhere"),e("clickanywhere"),e("hovermode")}}}),JI=ze({"src/components/fx/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=rv(),E=s5(),k=c1();V.exports=function(e,t){function n(m,h){return p.coerce(e,t,b,m,h)}var r=E(e,t);r&&(n("hoverdistance"),n("spikedistance"),r.indexOf("unified")!==-1&&n("hoversort"));var a=n("dragmode");a==="select"&&n("selectdirection");var o=t._has("map"),s=t._has("geo"),c=t._basePlotModules.length;t.dragmode==="zoom"&&((o||s)&&c===1||o&&s&&c===2)&&(t.dragmode="pan"),k(e,t,n),p.coerceFont(n,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),QI=ze({"src/components/fx/calc.js"(J,V){"use strict";var p=Nr(),b=mi();V.exports=function(l){var e=l.calcdata,t=l._fullLayout;function n(c){return function(m){return p.coerceHoverinfo({hoverinfo:m},{_module:c._module},t)}}for(var r=0;r"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),Dx=ze({"src/components/shapes/draw_newshape/constants.js"(J,V){"use strict";var p=32;V.exports={CIRCLE_SIDES:p,i000:0,i090:p/4,i180:p/2,i270:p/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),Fx=ze({"src/components/selections/helpers.js"(J,V){"use strict";var p=Nr().strTranslate;function b(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function E(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function k(e){var t=e._id.charAt(0)==="y"?1:0;return function(n){return b(e,n[t])}}function l(e){return p(e.xaxis._offset,e.yaxis._offset)}V.exports={p2r:b,r2p:E,axValue:k,getTransform:l}}}),uv=ze({"src/components/shapes/draw_newshape/helpers.js"(J){"use strict";var V=Kw(),p=Dx(),b=p.CIRCLE_SIDES,E=p.SQRT2,k=Fx(),l=k.p2r,e=k.r2p,t=[0,3,4,5,6,1,2],n=[0,3,4,1,2];J.writePaths=function(o){var s=o.length;if(!s)return"M0,0Z";for(var c="",m=0;m0&&w{let s=o.charAt(0),c=r[s].drawn!==void 0;return a+(c?1:0)},0)},J.getDataToPixel=function(l,e,t,n,r){var a=l._fullLayout._size,o;if(e)if(r==="domain")o=function(c){return e._length*(n?1-c:c)+e._offset};else{var s=J.shapePositionToRange(e);o=function(c){var m=k(e,t);return e._offset+e.r2p(s(c,!0))+m},e.type==="date"&&(o=J.decodeDate(o))}else n?o=function(c){return a.t+a.h*(1-c)}:o=function(c){return a.l+a.w*c};return o},J.getPixelToData=function(l,e,t,n){var r=l._fullLayout._size,a;if(e)if(n==="domain")a=function(s){var c=(s-e._offset)/e._length;return t?1-c:c};else{var o=J.rangeToShapePosition(e);a=function(s){return o(e.p2r(s-e._offset))}}else t?a=function(s){return 1-(s-r.t)/r.h}:a=function(s){return(s-r.l)/r.w};return a},J.roundPositionForSharpStrokeRendering=function(l,e){var t=Math.round(e%2)===1,n=Math.round(l);return t?n+.5:n},J.makeShapesOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.shapes[e]||{},n=l._fullLayout._plots[t.xref+t.yref],r=!!n;return r?n._hadPlotinfo=!0:(n={},t.xref&&t.xref!=="paper"&&(n.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&t.yref!=="paper"&&(n.yaxis=l._fullLayout[t.yref+"axis"])),n.xsizemode=t.xsizemode,n.ysizemode=t.ysizemode,n.xanchor=t.xanchor,n.yanchor=t.yanchor,{options:t,plotinfo:n}},J.makeSelectionsOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.selections[e]||{},n=l._fullLayout._plots[t.xref+t.yref],r=!!n;return r?n._hadPlotinfo=!0:(n={},t.xref&&(n.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&(n.yaxis=l._fullLayout[t.yref+"axis"])),{options:t,plotinfo:n}},J.getPathString=function(l,e){let t=e.type,n=b.getRefType(e.xref),r=b.getRefType(e.yref),a=l._fullLayout._size;var o,s,c,m,h,v,g,i,w,S,M,C;function _(O,D,B,F){var P;if(O)if(D==="domain")F?P=function(j){return O._offset+O._length*(1-j)}:P=function(j){return O._offset+O._length*j};else{let j=J.shapePositionToRange(O);P=function(U){return O._offset+O.r2p(j(U,!0))},B==="path"&&O.type==="date"&&(P=J.decodeDate(P))}else F?P=function(j){return a.t+a.h*(1-j)}:P=function(j){return a.l+a.w*j};return P}if(n==="array"?(g=[],o=e.xref.map(function(O){return b.getFromId(l,O)}),g=e.xref.map(function(O,D){return _(o[D],b.getRefType(O),t,!1)})):(o=b.getFromId(l,e.xref),g=_(o,n,t,!1)),r==="array"?(i=[],s=e.yref.map(function(O){return b.getFromId(l,O)}),i=e.yref.map(function(O,D){return _(s[D],b.getRefType(O),t,!0)})):(s=b.getFromId(l,e.yref),i=_(s,r,t,!0)),t==="path")return E(e,g,i);if(n==="array")c=k(o[0],e.x0shift),m=k(o[1],e.x1shift),w=g[0](e.x0)+c,S=g[1](e.x1)+m;else if(c=k(o,e.x0shift),m=k(o,e.x1shift),e.xsizemode==="pixel"){let O=g(e.xanchor);w=O+e.x0+c,S=O+e.x1+m}else w=g(e.x0)+c,S=g(e.x1)+m;if(r==="array")h=k(s[0],e.y0shift),v=k(s[1],e.y1shift),M=i[0](e.y0)+h,C=i[1](e.y1)+v;else if(h=k(s,e.y0shift),v=k(s,e.y1shift),e.ysizemode==="pixel"){let O=i(e.yanchor);M=O-e.y0+h,C=O-e.y1+v}else M=i(e.y0)+h,C=i(e.y1)+v;if(t==="line")return"M"+w+","+M+"L"+S+","+C;if(t==="rect")return"M"+w+","+M+"H"+S+"V"+C+"H"+w+"Z";var T=(w+S)/2,f=(M+C)/2,u=Math.abs(T-w),A=Math.abs(f-M),x="A"+u+","+A,z=T+u+","+f,I=T+","+(f-A);return"M"+z+x+" 0 1,1 "+I+x+" 0 0,1 "+z+"Z"};function E(l,e,t){let n=l.path,r=l.xsizemode,a=l.ysizemode,o=l.xanchor,s=l.yanchor,c=Array.isArray(l.xref),m=Array.isArray(l.yref);var h=0,v=0;return n.replace(V.segmentRE,function(g){var i=0,w=g.charAt(0),S=V.paramIsX[w],M=V.paramIsY[w],C=V.numParams[w];let _=S.drawn!==void 0,T=M.drawn!==void 0,f=c?e[h]:e,u=m?t[v]:t;var A=g.slice(1).replace(V.paramRE,function(x){return S[i]?r==="pixel"?x=f(o)+Number(x):x=f(x):M[i]&&(a==="pixel"?x=u(s)-Number(x):x=u(x)),i++,i>C&&(x="X"),x});return i>C&&(A=A.replace(/[\s,]*X.*/,""),p.log("Ignoring extra params in segment "+g)),_&&h++,T&&v++,w+A})}J.getPixelShift=k;function k(l,e){e=e||0;var t=0;return e&&l&&(l.type==="category"||l.type==="multicategory")&&(t=(l.r2p(1)-l.r2p(0))*e),t}}}),u5=ze({"src/components/shapes/display_labels.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=Cs(),k=$i(),l=uv().readPaths,e=cv(),t=e.getPathString,n=Sx(),r=dc().FROM_TL;V.exports=function(c,m,h,v){if(v.selectAll(".shape-label").remove(),!!(h.label.text||h.label.texttemplate)){var g;if(h.label.texttemplate){var i={};if(h.type!=="path"){var w=b.getFromId(c,h.xref),S=b.getFromId(c,h.yref);let Z=Array.isArray(h.xref),ee=Array.isArray(h.yref);for(var M in n){var C=typeof n[M]=="function",_=!Z||n.simpleXVariables.includes(M),T=!ee||n.simpleYVariables.includes(M);if(C&&_&&T){var f=n[M](h,w,S);f!==void 0&&(i[M]=f)}}}g=p.texttemplateStringForShapes({data:[i],fallback:h.label.texttemplatefallback,locale:c._fullLayout._d3locale,template:h.label.texttemplate})}else g=h.label.text;var u={"data-index":m},A=h.label.font,x={"data-notex":1},z=v.append("g").attr(u).classed("shape-label",!0),I=z.append("text").attr(x).classed("shape-label-text",!0).text(g),O,D,B,F;if(h.path){var P=t(c,h),j=l(P,c);O=1/0,B=1/0,D=-1/0,F=-1/0;for(var U=0;Ue.getDataToPixel(c,ve,ce,!1,le)(_e),ke=(_e,ce,ve,le)=>e.getDataToPixel(c,ve,ce,!0,le)(_e);if(h.xsizemode==="pixel"){let _e=Ge(h.xanchor,void 0,ae,Me),ce=e.getPixelShift(ae,h.x0shift),ve=e.getPixelShift(ae,h.x1shift);O=_e+h.x0+ce,D=_e+h.x1+ve}else O=Ge(h.x0,h.x0shift,ae,Me),D=Ge(h.x1,h.x1shift,he,Se);if(h.ysizemode==="pixel"){let _e=ke(h.yanchor,void 0,xe,Ie),ce=e.getPixelShift(xe,h.y0shift),ve=e.getPixelShift(xe,h.y1shift);B=_e-h.y0+ce,F=_e-h.y1+ve}else B=ke(h.y0,h.y0shift,xe,Ie),F=ke(h.y1,h.y1shift,we,Ve)}var G=h.label.textangle;G==="auto"&&(h.type==="line"?G=a(O,B,D,F):G=0),I.call(function(Z){return Z.call(k.font,A).attr({}),E.convertToTspans(Z,c),Z});var X=k.bBox(I.node()),K=o(O,B,D,F,h,G,X),H=K.textx,Y=K.texty,q=K.xanchor;I.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[q],y:Y,x:H,transform:"rotate("+G+","+H+","+Y+")"}).call(E.positionText,H,Y)}};function a(s,c,m,h){var v,g;return g=Math.abs(m-s),m>=s?v=c-h:v=h-c,-180/Math.PI*Math.atan2(v,g)}function o(s,c,m,h,v,g,i){var w=v.label.textposition,S=v.label.textangle,M=v.label.padding,C=v.type,_=Math.PI/180*g,T=Math.sin(_),f=Math.cos(_),u=v.label.xanchor,A=v.label.yanchor,x,z,I,O;if(C==="line"){w==="start"?(x=s,z=c):w==="end"?(x=m,z=h):(x=(s+m)/2,z=(c+h)/2),u==="auto"&&(w==="start"?S==="auto"?m>s?u="left":ms?u="right":ms?u="right":ms?u="left":m1&&!(ke.length===2&&ke[1][0]==="Z")&&(G===0&&(ke[0][0]="M"),x[se]=ke,B(),F())}}function he(ke,_e){if(ke===2){se=+_e.srcElement.getAttribute("data-i"),G=+_e.srcElement.getAttribute("data-j");var ce=x[se];!g(ce)&&!i(ce)&&ae()}}function xe(ke){re=[];for(var _e=0;_e{if(!I._dragging&&I._fullLayout.hoveranywhere){let j=F(P);j&&c.hover(I,j,D.id)}}),B.addEventListener("click",P=>{if(!I._dragged&&I._fullLayout.clickanywhere){let j=F(P);j&&c.click(I,j,D.id)}})}function _(I,O,D){let B=D.xref,F=D.yref;if(Array.isArray(B)||Array.isArray(F)){let P="clip"+O._fullLayout._uid+"shape"+D._index,j=T(O,B,F);E.ensureSingleById(O._fullLayout._clips,"clipPath",P,function(U){U.append("rect")}).select("rect").attr(j),a.setClipUrl(I,P,O)}else{let P=(B+F).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");a.setClipUrl(I,P?"clip"+O._fullLayout._uid+P:null,O)}}function T(I,O,D){let B=I._fullLayout._size;function F(U,$){let Q=(Array.isArray(U)?U:[U]).map(se=>k.getFromId(I,se)).filter(Boolean);if(!Q.length)return $?[B.t,B.t+B.h]:[B.l,B.l+B.w];let re=Q.map(function(se){return se._offset}),ne=Q.map(function(se){return se._offset+se._length});return[Math.min(...re),Math.max(...ne)]}let P=F(O,!1),j=F(D,!0);return{x:P[0],y:j[0],width:P[1]-P[0],height:j[1]-j[0]}}function f(I,O,D,B,F,P){var j=10,U=10,$=D.xsizemode==="pixel",Q=D.ysizemode==="pixel",re=D.type==="line",ne=D.type==="path",se=P.modifyItem,G,X,K,H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve=p.select(O.node().parentNode),Ge=k.getFromId(I,D.xref),ke=k.getRefType(D.xref),_e=k.getFromId(I,D.yref),ce=k.getRefType(D.yref),ve=D.x0shift,le=D.x1shift,Ae=D.y0shift,Be=D.y1shift,Xe=function(Je,et){var Mt=v.getDataToPixel(I,Ge,et,!1,ke);return Mt(Je)},Ye=function(Je,et){var Mt=v.getDataToPixel(I,_e,et,!0,ce);return Mt(Je)},yt=v.getPixelToData(I,Ge,!1,ke),gt=v.getPixelToData(I,_e,!0,ce),Tt=rr(),At={element:Tt.node(),gd:I,prepFn:or,doneFn:Ot,clickFn:vt},$t;s.init(At),Tt.node().onmousemove=Xt;function rr(){return re?_r():O}function _r(){var Je=10,et=Math.max(D.line.width,Je),Mt=F.append("g").attr("data-index",B).attr("drag-helper",!0);Mt.append("path").attr("d",O.attr("d")).style({cursor:"move","stroke-width":et,"stroke-opacity":"0"});var pt={"fill-opacity":"0"},Pt=Math.max(et/2,Je);return Mt.append("circle").attr({"data-line-point":"start-point",cx:$?Xe(D.xanchor)+D.x0:Xe(D.x0,ve),cy:Q?Ye(D.yanchor)-D.y0:Ye(D.y0,Ae),r:Pt}).style(pt).classed("cursor-grab",!0),Mt.append("circle").attr({"data-line-point":"end-point",cx:$?Xe(D.xanchor)+D.x1:Xe(D.x1,le),cy:Q?Ye(D.yanchor)-D.y1:Ye(D.y1,Be),r:Pt}).style(pt).classed("cursor-grab",!0),Mt}function Xt(Je){if(w(I)){$t=null;return}if(re)Je.target.tagName==="path"?$t="move":$t=Je.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var et=At.element.getBoundingClientRect(),Mt=et.right-et.left,pt=et.bottom-et.top,Pt=Je.clientX-et.left,Ct=Je.clientY-et.top,qt=!ne&&Mt>j&&pt>U&&!Je.shiftKey?s.getCursor(Pt/Mt,1-Ct/pt):"move";m(O,qt),$t=qt.split("-")[0]}}function or(Je){w(I)||($&&(Y=Xe(D.xanchor)),Q&&(q=Ye(D.yanchor)),D.type==="path"?Ie=D.path:(G=$?D.x0:Xe(D.x0),X=Q?D.y0:Ye(D.y0),K=$?D.x1:Xe(D.x1),H=Q?D.y1:Ye(D.y1)),GH?(Z=X,xe="y0",ee=H,we="y1"):(Z=H,xe="y1",ee=X,we="y0"),Xt(Je),Ne(F,D),Ke(O,D,I),At.moveFn=$t==="move"?ht:De,At.altKey=Je.altKey)}function Ot(){w(I)||(m(O),We(F),_(O,I,D),b.call("_guiRelayout",I,P.getUpdateObj()))}function vt(){w(I)||We(F)}function ht(Je,et){if(D.type==="path"){var Mt=function(Ct){return Ct},pt=Mt,Pt=Mt;$?se("xanchor",D.xanchor=yt(Y+Je)):(pt=function(qt){return yt(Xe(qt)+Je)},Ge&&Ge.type==="date"&&(pt=v.encodeDate(pt))),Q?se("yanchor",D.yanchor=gt(q+et)):(Pt=function(qt){return gt(Ye(qt)+et)},_e&&_e.type==="date"&&(Pt=v.encodeDate(Pt))),se("path",D.path=u(Ie,pt,Pt))}else $?se("xanchor",D.xanchor=yt(Y+Je)):(se("x0",D.x0=yt(G+Je)),se("x1",D.x1=yt(K+Je))),Q?se("yanchor",D.yanchor=gt(q+et)):(se("y0",D.y0=gt(X+et)),se("y1",D.y1=gt(H+et)));O.attr("d",g(I,D)),Ne(F,D),t(I,B,D,Ve)}function De(Je,et){if(ne){var Mt=function(Zr){return Zr},pt=Mt,Pt=Mt;$?se("xanchor",D.xanchor=yt(Y+Je)):(pt=function(ha){return yt(Xe(ha)+Je)},Ge&&Ge.type==="date"&&(pt=v.encodeDate(pt))),Q?se("yanchor",D.yanchor=gt(q+et)):(Pt=function(ha){return gt(Ye(ha)+et)},_e&&_e.type==="date"&&(Pt=v.encodeDate(Pt))),se("path",D.path=u(Ie,pt,Pt))}else if(re){if($t==="resize-over-start-point"){var Ct=G+Je,qt=Q?X-et:X+et;se("x0",D.x0=$?Ct:yt(Ct)),se("y0",D.y0=Q?qt:gt(qt))}else if($t==="resize-over-end-point"){var Vt=K+Je,Ht=Q?H-et:H+et;se("x1",D.x1=$?Vt:yt(Vt)),se("y1",D.y1=Q?Ht:gt(Ht))}}else{var Sr=function(Zr){return $t.indexOf(Zr)!==-1},Kr=Sr("n"),Yt=Sr("s"),Rt=Sr("w"),nr=Sr("e"),ur=Kr?Z+et:Z,cr=Yt?ee+et:ee,Rr=Rt?ae+Je:ae,Qr=nr?he+Je:he;Q&&(Kr&&(ur=Z-et),Yt&&(cr=ee-et)),(!Q&&cr-ur>U||Q&&ur-cr>U)&&(se(xe,D[xe]=Q?ur:gt(ur)),se(we,D[we]=Q?cr:gt(cr))),Qr-Rr>j&&(se(Me,D[Me]=$?Rr:yt(Rr)),se(Se,D[Se]=$?Qr:yt(Qr)))}O.attr("d",g(I,D)),Ne(F,D),t(I,B,D,Ve)}function Ne(Je,et){($||Q)&&Mt();function Mt(){var pt=et.type!=="path",Pt=Je.selectAll(".visual-cue").data([0]),Ct=1;Pt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ct}).classed("visual-cue",!0);var qt=Xe($?et.xanchor:E.midRange(pt?[et.x0,et.x1]:v.extractPathCoords(et.path,h.paramIsX))),Vt=Ye(Q?et.yanchor:E.midRange(pt?[et.y0,et.y1]:v.extractPathCoords(et.path,h.paramIsY)));if(qt=v.roundPositionForSharpStrokeRendering(qt,Ct),Vt=v.roundPositionForSharpStrokeRendering(Vt,Ct),$&&Q){var Ht="M"+(qt-1-Ct)+","+(Vt-1-Ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Pt.attr("d",Ht)}else if($){var Sr="M"+(qt-1-Ct)+","+(Vt-9-Ct)+"v18 h2 v-18 Z";Pt.attr("d",Sr)}else{var Kr="M"+(qt-9-Ct)+","+(Vt-1-Ct)+"h18 v2 h-18 Z";Pt.attr("d",Kr)}}}function We(Je){Je.selectAll(".visual-cue").remove()}function Ke(Je,et,Mt){var pt=et.xref,Pt=et.yref,Ct=k.getFromId(Mt,pt),qt=k.getFromId(Mt,Pt),Vt="";pt!=="paper"&&!Ct.autorange&&(Vt+=pt),Pt!=="paper"&&!qt.autorange&&(Vt+=Pt),a.setClipUrl(Je,Vt?"clip"+Mt._fullLayout._uid+Vt:null,Mt)}}function u(I,O,D){return I.replace(h.segmentRE,function(B){var F=0,P=B.charAt(0),j=h.paramIsX[P],U=h.paramIsY[P],$=h.numParams[P],Q=B.slice(1).replace(h.paramRE,function(re){return F>=$||(j[F]?re=O(re):U[F]&&(re=D(re)),F++),re});return P+Q})}function A(I,O){if(S(I)){var D=O.node(),B=+D.getAttribute("data-index");if(B>=0){if(B===I._fullLayout._activeShapeIndex){x(I);return}I._fullLayout._activeShapeIndex=B,I._fullLayout._deactivateShape=x,i(I)}}}function x(I){if(S(I)){var O=I._fullLayout._activeShapeIndex;O>=0&&(n(I),delete I._fullLayout._activeShapeIndex,i(I))}}function z(I){if(S(I)){n(I);var O=I._fullLayout._activeShapeIndex,D=(I.layout||{}).shapes||[];if(O{let o=E(e),s=t.append("div").classed("plotly-cloud-dialog-box",!0);if(s.append("div").classed("plotly-cloud-dialog-title",!0).text(o.DIALOG_TITLE),n===b.plotlyServerURL){let m=s.append("div").classed("plotly-cloud-dialog-message",!0),h=new URL(n).origin,v=o.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),g=v[0],i=v[2],w=v[4];m.append("span").text(g),m.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",h).attr("target","_blank").text(i),m.append("span").text(w),m.append("div").classed("plotly-cloud-dialog-message--account",!0).text(o.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let m=new URL(n),h=m.hostname,v=m.origin,g=o.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),i=g[0],w=g[4],S=s.append("div").classed("plotly-cloud-dialog-message",!0);S.append("span").text(i),S.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",v).attr("target","_blank").text(h),S.append("span").text(w)}let c=s.append("div").classed("plotly-cloud-dialog-buttons",!0);c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(o.DIALOG_CANCEL).on("click",a),c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(o.DIALOG_CONFIRM).on("click",r)},l=(e,t,n)=>{let r=p.select(e._fullLayout._paperdiv.node());r.selectAll(".plotly-cloud-dialog").remove();let a=r.append("div").classed("plotly-cloud-dialog",!0),o=()=>{a.remove(),document.removeEventListener("keydown",s)},s=c=>{(c.key==="Escape"||c.keyCode===27)&&o()};document.addEventListener("keydown",s),a.on("click",()=>{p.event.target===a.node()&&o()}),k(e,a,t,()=>{o(),n()},o)};V.exports=l}}),c5=ze({"src/components/modebar/buttons.js"(J,V){"use strict";var p=mi(),b=cl(),E=Xl(),k=Ix(),l=Ox().eraseActiveShape,e=rD(),t=Nr(),n=t._,r=V.exports={};r.toImage={name:"toImage",title:function(_){var T=_._context.toImageButtonOptions||{},f=T.format||"png";return f==="png"?n(_,"Download plot as a PNG"):n(_,"Download plot")},icon:k.camera,click:function(_){var T=_._context.toImageButtonOptions,f={format:T.format||"png"};t.notifier(n(_,"Preparing image - this may take a few seconds"),"long",_),["filename","width","height","scale"].forEach(function(u){u in T&&(f[u]=T[u])}),p.call("downloadImage",_,f).then(function(u){t.notifier(n(_,"Image download succeeded")+" - "+u,"long",_)}).catch(function(){t.notifier(n(_,"Sorry, there was a problem downloading your image!"),"long",_)})}},r.sendChartToCloud={name:"sendChartToCloud",title:function(_){return n(_,"Share chart...")},icon:k.cloudupload,click:function(_){var T=(window.PLOTLYENV||{}).BASE_URL||_._context.plotlyServerURL;if(!T){console.error("No destination URL provided (plotlyServerURL is empty)");return}var f;try{f=new URL(T)}catch{console.error("Invalid plotlyServerURL: "+T);return}let u=["http:","https:"];if(!u.includes(f.protocol)){console.error(`Invalid protocol '${f.protocol}' in plotlyServerURL '${T}'. Must be one of: ${u.join(", ")}`);return}e(_,T,function(){b.sendDataToCloud(_,T)})}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(_){return n(_,"Zoom")},attr:"dragmode",val:"zoom",icon:k.zoombox,click:a},r.pan2d={name:"pan2d",_cat:"pan",title:function(_){return n(_,"Pan")},attr:"dragmode",val:"pan",icon:k.pan,click:a},r.select2d={name:"select2d",_cat:"select",title:function(_){return n(_,"Box Select")},attr:"dragmode",val:"select",icon:k.selectbox,click:a},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(_){return n(_,"Lasso Select")},attr:"dragmode",val:"lasso",icon:k.lasso,click:a},r.drawclosedpath={name:"drawclosedpath",title:function(_){return n(_,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:k.drawclosedpath,click:a},r.drawopenpath={name:"drawopenpath",title:function(_){return n(_,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:k.drawopenpath,click:a},r.drawline={name:"drawline",title:function(_){return n(_,"Draw line")},attr:"dragmode",val:"drawline",icon:k.drawline,click:a},r.drawrect={name:"drawrect",title:function(_){return n(_,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:k.drawrect,click:a},r.drawcircle={name:"drawcircle",title:function(_){return n(_,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:k.drawcircle,click:a},r.eraseshape={name:"eraseshape",title:function(_){return n(_,"Erase active shape")},icon:k.eraseshape,click:l},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(_){return n(_,"Zoom in")},attr:"zoom",val:"in",icon:k.zoom_plus,click:a},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(_){return n(_,"Zoom out")},attr:"zoom",val:"out",icon:k.zoom_minus,click:a},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(_){return n(_,"Autoscale")},attr:"zoom",val:"auto",icon:k.autoscale,click:a},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(_){return n(_,"Reset axes")},attr:"zoom",val:"reset",icon:k.home,click:a},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(_){return n(_,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:k.tooltip_basic,gravity:"ne",click:a},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(_){return n(_,"Compare data on hover")},attr:"hovermode",val:function(_){return _._fullLayout._isHoriz?"y":"x"},icon:k.tooltip_compare,gravity:"ne",click:a};function a(_,T){var f=T.currentTarget,u=f.getAttribute("data-attr"),A=f.getAttribute("data-val")||!0,x=_._fullLayout,z={},I=E.list(_,null,!0),O=x._cartesianSpikesEnabled,D,B;if(u==="zoom"){var F=A==="in"?.5:2,P=(1+F)/2,j=(1-F)/2,U,$;for(B=0;B-K),[$,Q]=F.invert(B.midPt),{minscale:re}=D.projection,ne=(f=D.projection.maxscale)!=null?f:1/0,se=Math.min(re,ne),G=Math.max(re,ne),X=x==="in"?h*P:1/h*P;X>G?X=G:Xd5});var jx,h5,d5,p5=zi({"src/components/modebar/attributes.ts"(){"use strict";jx=Yl(f5()),h5={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.",`This may include *${jx.default.backButtons.join("*, *")}*.`].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.",`This may include *${jx.default.foreButtons.join("*, *")}*.`].join(" ")}},d5=h5}}),aD=ze({"src/components/modebar/defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=(p5(),Po(Nx)).default;V.exports=function(e,t){var n=e.modebar||{},r=E.newContainer(t,"modebar");function a(s,c){return p.coerce(n,r,k,s,c)}a("orientation"),a("bgcolor",b.addOpacity(t.paper_bgcolor,.5));var o=b.contrast(b.rgb(t.modebar.bgcolor));a("color",b.addOpacity(o,.3)),a("activecolor",b.addOpacity(o,.7)),a("uirevision",t.uirevision),a("add"),a("remove")}}}),nD=ze({"src/components/modebar/modebar.js"(J,V){"use strict";var p=ci(),b=ao(),E=Nr(),k=Ix(),l=ev().version,e=new DOMParser;function t(o){this.container=o.container,this.element=document.createElement("div"),this.update(o.graphInfo,o.buttons),this.container.appendChild(this.element)}var n=t.prototype;n.update=function(o,s){this.graphInfo=o;var c=this.graphInfo._context,m=this.graphInfo._fullLayout,h="modebar-"+m._uid;this.element.setAttribute("id",h),this.element.setAttribute("role","toolbar"),this._uid=h,this.element.className="modebar modebar--custom",c.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),m.modebar.orientation==="v"&&(this.element.className+=" vertical",s=s.reverse());var v=m.modebar,g="#"+h+" .modebar-group";document.querySelectorAll(g).forEach(function(C){C.style.backgroundColor=v.bgcolor});var i=!this.hasButtons(s),w=this.hasLogo!==c.displaylogo,S=this.locale!==c.locale;if(this.locale=c.locale,(i||w||S)&&(this.removeAllButtons(),this.updateButtons(s),c.watermark||c.displaylogo)){var M=this.getLogo();c.watermark&&(M.className=M.className+" watermark"),m.modebar.orientation==="v"?this.element.insertBefore(M,this.element.childNodes[0]):this.element.appendChild(M),this.hasLogo=!0}this.updateActiveButton(),E.setStyleOnHover("#"+h+" .modebar-btn",".active",".icon path","fill: "+v.activecolor,"fill: "+v.color,this.element)},n.updateButtons=function(o){var s=this;this.buttons=o,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(c){var m=s.createGroup();c.forEach(function(h){var v=h.name;if(!v)throw new Error("must provide button 'name' in button config");if(s.buttonsNames.indexOf(v)!==-1)throw new Error("button name '"+v+"' is taken");s.buttonsNames.push(v);var g=s.createButton(h);s.buttonElements.push(g),m.appendChild(g)}),s.element.appendChild(m)})},n.createGroup=function(){var o=document.createElement("div");o.className="modebar-group";var s=this.graphInfo._fullLayout.modebar;return o.style.backgroundColor=s.bgcolor,o},n.createButton=function(o){var s=this,c=document.createElement("button");c.setAttribute("type","button"),c.setAttribute("rel","tooltip"),c.className="modebar-btn";var m=o.title;m===void 0?m=o.name:typeof m=="function"&&(m=m(this.graphInfo)),(m||m===0)&&(c.setAttribute("data-title",m),c.setAttribute("aria-label",m)),o.attr!==void 0&&c.setAttribute("data-attr",o.attr);var h=o.val;h!==void 0&&(typeof h=="function"&&(h=h(this.graphInfo)),c.setAttribute("data-val",h));var v=o.click;if(typeof v!="function")throw new Error("must provide button 'click' function in button config");c.addEventListener("click",function(i){o.click(s.graphInfo,i),s.updateActiveButton(i.currentTarget)}),c.setAttribute("data-toggle",o.toggle||!1),o.toggle&&p.select(c).classed("active",!0);var g=o.icon;return typeof g=="function"?c.appendChild(g()):c.appendChild(this.createIcon(g||k.question)),c.setAttribute("data-gravity",o.gravity||"n"),c},n.createIcon=function(o){var s=b(o.height)?Number(o.height):o.ascent-o.descent,c="http://www.w3.org/2000/svg",m;if(o.path){m=document.createElementNS(c,"svg"),m.setAttribute("viewBox",[0,0,o.width,s].join(" ")),m.setAttribute("class","icon");var h=document.createElementNS(c,"path");h.setAttribute("d",o.path),o.transform?h.setAttribute("transform",o.transform):o.ascent!==void 0&&h.setAttribute("transform","matrix(1 0 0 -1 0 "+o.ascent+")"),m.appendChild(h)}if(o.svg){var v=e.parseFromString(o.svg,"application/xml");m=v.childNodes[0]}return m.setAttribute("height","1em"),m.setAttribute("width","1em"),m},n.updateActiveButton=function(o){var s=this.graphInfo._fullLayout,c=o!==void 0?o.getAttribute("data-attr"):null;this.buttonElements.forEach(function(m){var h=m.getAttribute("data-val")||!0,v=m.getAttribute("data-attr"),g=m.getAttribute("data-toggle")==="true",i=p.select(m),w=function(C,_){var T=s.modebar,f=C.querySelector(".icon path");f&&(_||C.matches(":hover")?f.style.fill=T.activecolor:f.style.fill=T.color)};if(g){if(v===c){var S=!i.classed("active");i.classed("active",S),w(m,S)}}else{var M=v===null?v:E.nestedProperty(s,v).get();i.classed("active",M===h),w(m,M===h)}})},n.hasButtons=function(o){var s=this.buttons;if(!s||o.length!==s.length)return!1;for(var c=0;c1?(re=["toggleHover"],ne=["resetViews"]):u?(Q=["zoomInGeo","zoomOutGeo"],re=["hoverClosestGeo"],ne=["resetGeo"]):f?(re=["hoverClosest3d"],ne=["resetCameraDefault3d","resetCameraLastSave3d"]):I?(Q=["zoomInMap","zoomOutMap"],re=["toggleHover"],ne=["resetViewMap"]):A?re=["hoverClosestPie"]:B?(re=["hoverClosestCartesian","hoverCompareCartesian"],ne=["resetViewSankey"]):re=["toggleHover"],T&&re.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(g)||P)&&(re=[]),T&&!F&&(Q=["zoomIn2d","zoomOut2d","autoScale2d"],ne[0]!=="resetViews"&&(ne=["resetScale2d"])),f?se=["zoom3d","pan3d","orbitRotation","tableRotation"]:T&&!F||z?se=["zoom2d","pan2d"]:I||u?se=["pan2d"]:O&&(se=["zoom2d"]),o(g)&&se.push("select2d","lasso2d");var G=[],X=function(q){G.indexOf(q)===-1&&re.indexOf(q)!==-1&&G.push(q)};if(Array.isArray(C)){for(var K=[],H=0;HS?g.slice(S):i.slice(w))+M}function c(h,v){for(var g=v._size,i=g.h/g.w,w={},S=Object.keys(h),M=0;Me*z&&!B)){for(S=0;SG&&aene&&(ne=ae);var xe=(ne-re)/(2*se);u/=xe,re=_.l2r(re),ne=_.l2r(ne),_.range=_._input.range=U<$?[re,ne]:[ne,re]}m(_,u)}}}},J.getAxisGroup=function(v,g){for(var i=v._axisMatchGroups,w=0;w=F[1]||$[1]<=F[0])&&Q[0]P[0])return!0}return!1}function M(F){var P=F._fullLayout,j=P._size,U=j.p,$=a.list(F,"",!0),Q,re,ne,se,G,X;if(P._paperdiv.style({width:F._context.responsive&&P.autosize&&!F._context._hasZeroWidth&&!F.layout.width?"100%":P.width+"px",height:F._context.responsive&&P.autosize&&!F._context._hasZeroHeight&&!F.layout.height?"100%":P.height+"px"}).selectAll(".main-svg").call(t.setSize,P.width,P.height),F._context.setBackground(F,P.paper_bgcolor),J.drawMainTitle(F),r.manage(F),!P._has("cartesian"))return b.previousPromises(F);function K(De,Ne,We){var Ke=De._lw/2;if(De._id.charAt(0)==="x"){if(Ne){if(We==="top")return Ne._offset-U-Ke}else return j.t+j.h*(1-(De.position||0))+Ke%1;return Ne._offset+Ne._length+U+Ke}if(Ne){if(We==="right")return Ne._offset+Ne._length+U+Ke}else return j.l+j.w*(De.position||0)+Ke%1;return Ne._offset-U-Ke}for(Q=0;Q<$.length;Q++){se=$[Q];var H=se._anchorAxis;se._linepositions={},se._lw=t.crispRound(F,se.linewidth,1),se._mainLinePosition=K(se,H,se.side),se._mainMirrorPosition=se.mirror&&H?K(se,H,o.OPPOSITE_SIDE[se.side]):null}var Y=[],q=[],Z=[],ee=e.opacity(P.paper_bgcolor)===1&&e.opacity(P.plot_bgcolor)===1&&P.paper_bgcolor===P.plot_bgcolor;for(re in P._plots)if(ne=P._plots[re],ne.mainplot)ne.bg&&ne.bg.remove(),ne.bg=void 0;else{var ae=ne.xaxis.domain,he=ne.yaxis.domain,xe=ne.plotgroup;if(S(ae,he,Z)&&re.indexOf(w)===-1){var we=xe.node(),Me=ne.bg=E.ensureSingle(xe,"rect","bg");we.insertBefore(Me.node(),we.childNodes[0]),q.push(re)}else xe.select("rect.bg").remove(),Z.push([ae,he]),ee||(Y.push(re),q.push(re))}var Se=P._bgLayer.selectAll(".bg").data(Y);for(Se.enter().append("rect").classed("bg",!0),Se.exit().remove(),Se.each(function(De){P._plots[De].bg=V.select(this)}),Q=0;Q0){x(F,Q,G,se),ne.attr({x:re,y:Q,"text-anchor":U,dy:O(P.yanchor)}).call(k.positionText,re,Q);var X=(P.text.match(k.BR_TAG_ALL)||[]).length;if(X){var K=o.LINE_SPACING*X+o.MID_SHIFT;P.y===0&&(K=-K),ne.selectAll(".line").each(function(){var ee=+this.getAttribute("dy").slice(0,-2)-K+"em";this.setAttribute("dy",ee)})}var H=V.select(F).selectAll(".gtitle-subtitle");if(H.node()){var Y=ne.node().getBBox(),q=Y.y+Y.height,Z=q+n.SUBTITLE_PADDING_EM*P.subtitle.font.size;H.attr({x:re,y:Z,"text-anchor":U,dy:O(P.yanchor)}).call(k.positionText,re,Z)}}}};function f(F,P,j,U,$){var Q=P.yref==="paper"?F._fullLayout._size.h:F._fullLayout.height,re=E.isTopAnchor(P)?U:U-$,ne=j==="b"?Q-re:re;return E.isTopAnchor(P)&&j==="t"||E.isBottomAnchor(P)&&j==="b"?!1:ne<$}function u(F,P,j,U,$){var Q=0;return j==="middle"&&(Q+=$/2),F==="t"?(j==="top"&&(Q+=$),Q+=U-P*U):(j==="bottom"&&(Q+=$),Q+=P*U),Q}function A(F,P,j){var U=P.y,$=P.yanchor,Q=U>.5?"t":"b",re=F._fullLayout.margin[Q],ne=0;return P.yref==="paper"?ne=j+P.pad.t+P.pad.b:P.yref==="container"&&(ne=u(Q,U,$,F._fullLayout.height,j)+P.pad.t+P.pad.b),ne>re?ne:0}function x(F,P,j,U){var $="title.automargin",Q=F._fullLayout.title,re=Q.y>.5?"t":"b",ne={x:Q.x,y:Q.y,t:0,b:0},se={};Q.yref==="paper"&&f(F,Q,re,P,U)?ne[re]=j:Q.yref==="container"&&(se[re]=j,F._fullLayout._reservedMargin[$]=se),b.allowAutoMargin(F,$),b.autoMargin(F,$,ne)}function z(F,P){var j=F.title,U=F._size,$=0;switch(P===v?$=j.pad.l:P===i&&($=-j.pad.r),j.xref){case"paper":return U.l+U.w*j.x+$;case"container":default:return F.width*j.x+$}}function I(F,P){var j=F.title,U=F._size,$=0;if(P==="0em"||!P?$=-j.pad.b:P===o.CAP_SHIFT+"em"&&($=j.pad.t),j.y==="auto")return U.t/2;switch(j.yref){case"paper":return U.t+U.h-U.h*j.y+$;case"container":default:return F.height-F.height*j.y+$}}function O(F){return F==="top"?o.CAP_SHIFT+.3+"em":F==="bottom"?"-0.3em":o.MID_SHIFT+"em"}function D(F){var P=F.title,j=g;return E.isRightAnchor(P)?j=i:E.isLeftAnchor(P)&&(j=v),j}function B(F){var P=F.title,j="0em";return E.isTopAnchor(P)?j=o.CAP_SHIFT+"em":E.isMiddleAnchor(P)&&(j=o.MID_SHIFT+"em"),j}J.doTraceStyle=function(F){var P=F.calcdata,j=[],U;for(U=0;U=0;D--){var B=C.append("path").attr(T).style("opacity",D?.1:f).call(k.stroke,A).call(k.fill,u).call(l.dashLine,D?"solid":z,D?4+x:x);if(s(B,v,w),I){var F=e(v.layout,"selections",w);B.style({cursor:"move"});var P={element:B.node(),plotinfo:S,gd:v,editHelpers:F,isActiveSelection:!0},j=p(_,v);b(j,B,P)}else B.style("pointer-events",D?"all":"none");O[D]=B}var U=O[0],$=O[1];$.node().addEventListener("click",function(){return c(v,U)})}}function s(v,g,i){var w=i.xref+i.yref;l.setClipUrl(v,"clip"+g._fullLayout._uid+w,g)}function c(v,g){if(a(v)){var i=g.node(),w=+i.getAttribute("data-index");if(w>=0){if(w===v._fullLayout._activeSelectionIndex){h(v);return}v._fullLayout._activeSelectionIndex=w,v._fullLayout._deactivateSelection=h,r(v)}}}function m(v){if(a(v)){var g=v._fullLayout.selections.length-1;v._fullLayout._activeSelectionIndex=g,v._fullLayout._deactivateSelection=h,r(v)}}function h(v){if(a(v)){var g=v._fullLayout._activeSelectionIndex;g>=0&&(E(v),delete v._fullLayout._activeSelectionIndex,r(v))}}}}),oD=ze({"node_modules/polybooljs/lib/build-log.js"(J,V){function p(){var b,E=0,k=!1;function l(e,t){return b.list.push({type:e,data:t?JSON.parse(JSON.stringify(t)):void 0}),b}return b={list:[],segmentId:function(){return E++},checkIntersection:function(e,t){return l("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return l("div_seg",{seg:e,pt:t}),l("chop",{seg:e,pt:t})},statusRemove:function(e){return l("pop_seg",{seg:e})},segmentUpdate:function(e){return l("seg_update",{seg:e})},segmentNew:function(e,t){return l("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return l("rem_seg",{seg:e})},tempStatus:function(e,t,n){return l("temp_status",{seg:e,above:t,below:n})},rewind:function(e){return l("rewind",{seg:e})},status:function(e,t,n){return l("status",{seg:e,above:t,below:n})},vert:function(e){return e===k?b:(k=e,l("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),l("log",{txt:e})},reset:function(){return l("reset")},selected:function(e){return l("selected",{segs:e})},chainStart:function(e){return l("chain_start",{seg:e})},chainRemoveHead:function(e,t){return l("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return l("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return l("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return l("chain_match",{index:e})},chainClose:function(e){return l("chain_close",{index:e})},chainAddHead:function(e,t){return l("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return l("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return l("chain_con",{index1:e,index2:t})},chainReverse:function(e){return l("chain_rev",{index:e})},chainJoin:function(e,t){return l("chain_join",{index1:e,index2:t})},done:function(){return l("done")}},b}V.exports=p}}),sD=ze({"node_modules/polybooljs/lib/epsilon.js"(J,V){function p(b){typeof b!="number"&&(b=1e-10);var E={epsilon:function(k){return typeof k=="number"&&(b=k),b},pointAboveOrOnLine:function(k,l,e){var t=l[0],n=l[1],r=e[0],a=e[1],o=k[0],s=k[1];return(r-t)*(s-n)-(a-n)*(o-t)>=-b},pointBetween:function(k,l,e){var t=k[1]-l[1],n=e[0]-l[0],r=k[0]-l[0],a=e[1]-l[1],o=r*n+t*a;if(o-b)},pointsSameX:function(k,l){return Math.abs(k[0]-l[0])b!=r-t>b&&(n-s)*(t-c)/(r-c)+s-e>b&&(a=!a),n=s,r=c}return a}};return E}V.exports=p}}),lD=ze({"node_modules/polybooljs/lib/linked-list.js"(J,V){var p={create:function(){var b={root:{root:!0,next:null},exists:function(E){return!(E===null||E===b.root)},isEmpty:function(){return b.root.next===null},getHead:function(){return b.root.next},insertBefore:function(E,k){for(var l=b.root,e=b.root.next;e!==null;){if(k(e)){E.prev=e.prev,E.next=e,e.prev.next=E,e.prev=E;return}l=e,e=e.next}l.next=E,E.prev=l,E.next=null},findTransition:function(E){for(var k=b.root,l=b.root.next;l!==null&&!E(l);)k=l,l=l.next;return{before:k===b.root?null:k,after:l,insert:function(e){return e.prev=k,e.next=l,k.next=e,l!==null&&(l.prev=e),e}}}};return b},node:function(b){return b.prev=null,b.next=null,b.remove=function(){b.prev.next=b.next,b.next&&(b.next.prev=b.prev),b.prev=null,b.next=null},b}};V.exports=p}}),uD=ze({"node_modules/polybooljs/lib/intersecter.js"(J,V){var p=lD();function b(E,k,l){function e(g,i){return{id:l?l.segmentId():-1,start:g,end:i,myFill:{above:null,below:null},otherFill:null}}function t(g,i,w){return{id:l?l.segmentId():-1,start:g,end:i,myFill:{above:w.myFill.above,below:w.myFill.below},otherFill:null}}var n=p.create();function r(g,i,w,S,M,C){var _=k.pointsCompare(i,M);return _!==0?_:k.pointsSame(w,C)?0:g!==S?g?1:-1:k.pointAboveOrOnLine(w,S?M:C,S?C:M)?1:-1}function a(g,i){n.insertBefore(g,function(w){var S=r(g.isStart,g.pt,i,w.isStart,w.pt,w.other.pt);return S<0})}function o(g,i){var w=p.node({isStart:!0,pt:g.start,seg:g,primary:i,other:null,status:null});return a(w,g.end),w}function s(g,i,w){var S=p.node({isStart:!1,pt:i.end,seg:i,primary:w,other:g,status:null});g.other=S,a(S,g.pt)}function c(g,i){var w=o(g,i);return s(w,g,i),w}function m(g,i){l&&l.segmentChop(g.seg,i),g.other.remove(),g.seg.end=i,g.other.pt=i,a(g.other,g.pt)}function h(g,i){var w=t(i,g.seg.end,g.seg);return m(g,i),c(w,g.primary)}function v(g,i){var w=p.create();function S(F,P){var j=F.seg.start,U=F.seg.end,$=P.seg.start,Q=P.seg.end;return k.pointsCollinear(j,$,Q)?k.pointsCollinear(U,$,Q)||k.pointAboveOrOnLine(U,$,Q)?1:-1:k.pointAboveOrOnLine(j,$,Q)?1:-1}function M(F){return w.findTransition(function(P){var j=S(F,P.ev);return j>0})}function C(F,P){var j=F.seg,U=P.seg,$=j.start,Q=j.end,re=U.start,ne=U.end;l&&l.checkIntersection(j,U);var se=k.linesIntersect($,Q,re,ne);if(se===!1){if(!k.pointsCollinear($,Q,re)||k.pointsSame($,ne)||k.pointsSame(Q,re))return!1;var G=k.pointsSame($,re),X=k.pointsSame(Q,ne);if(G&&X)return P;var K=!G&&k.pointBetween($,re,ne),H=!X&&k.pointBetween(Q,re,ne);if(G)return H?h(P,Q):h(F,ne),P;K&&(X||(H?h(P,Q):h(F,ne)),h(P,$))}else se.alongA===0&&(se.alongB===-1?h(F,re):se.alongB===0?h(F,se.pt):se.alongB===1&&h(F,ne)),se.alongB===0&&(se.alongA===-1?h(P,$):se.alongA===0?h(P,se.pt):se.alongA===1&&h(P,Q));return!1}for(var _=[];!n.isEmpty();){var T=n.getHead();if(l&&l.vert(T.pt[0]),T.isStart){let F=function(){if(A){var P=C(T,A);if(P)return P}return x?C(T,x):!1};var f=F;l&&l.segmentNew(T.seg,T.primary);var u=M(T),A=u.before?u.before.ev:null,x=u.after?u.after.ev:null;l&&l.tempStatus(T.seg,A?A.seg:!1,x?x.seg:!1);var z=F();if(z){if(E){var I;T.seg.myFill.below===null?I=!0:I=T.seg.myFill.above!==T.seg.myFill.below,I&&(z.seg.myFill.above=!z.seg.myFill.above)}else z.seg.otherFill=T.seg.myFill;l&&l.segmentUpdate(z.seg),T.other.remove(),T.remove()}if(n.getHead()!==T){l&&l.rewind(T.seg);continue}if(E){var I;T.seg.myFill.below===null?I=!0:I=T.seg.myFill.above!==T.seg.myFill.below,x?T.seg.myFill.below=x.seg.myFill.above:T.seg.myFill.below=g,I?T.seg.myFill.above=!T.seg.myFill.below:T.seg.myFill.above=T.seg.myFill.below}else if(T.seg.otherFill===null){var O;x?T.primary===x.primary?O=x.seg.otherFill.above:O=x.seg.myFill.above:O=T.primary?i:g,T.seg.otherFill={above:O,below:O}}l&&l.status(T.seg,A?A.seg:!1,x?x.seg:!1),T.other.status=u.insert(p.node({ev:T}))}else{var D=T.status;if(D===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(w.exists(D.prev)&&w.exists(D.next)&&C(D.prev.ev,D.next.ev),l&&l.statusRemove(D.ev.seg),D.remove(),!T.primary){var B=T.seg.myFill;T.seg.myFill=T.seg.otherFill,T.seg.otherFill=B}_.push(T.seg)}n.getHead().remove()}return l&&l.done(),_}return E?{addRegion:function(g){for(var i,w=g[g.length-1],S=0;St!=h>t&&e<(m-s)*(t-c)/(h-c)+s;v&&(n=!n)}return n}}}),p1=ze({"src/lib/polygon.js"(J,V){"use strict";var p=Mx().dot,b=No().BADNUM,E=V.exports={};E.tester=function(l){var e=l.slice(),t=e[0][0],n=t,r=e[0][1],a=r,o;for((e[e.length-1][0]!==e[0][0]||e[e.length-1][1]!==e[0][1])&&e.push(e[0]),o=1;on||M===b||Ma||w&&c(i))}function h(i,w){var S=i[0],M=i[1];if(S===b||Sn||M===b||Ma)return!1;var C=e.length,_=e[0][0],T=e[0][1],f=0,u,A,x,z,I;for(u=1;uMath.max(A,_)||M>Math.max(x,T)))if(Mo||Math.abs(p(h,c))>n)return!0;return!1},E.filter=function(l,e){var t=[l[0]],n=0,r=0;function a(s){l.push(s);var c=t.length,m=n;t.splice(r+1);for(var h=m+1;h1){var o=l.pop();a(o)}return{addPt:a,raw:l,filtered:t}}}}),vD=ze({"src/components/selections/constants.js"(J,V){"use strict";V.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),mD=ze({"src/components/selections/select.js"(J,V){"use strict";var p=dD(),b=pD(),E=mi(),k=$i().dashStyle,l=Qn(),e=Zl(),t=kh().makeEventData,n=Fd(),r=n.freeMode,a=n.rectMode,o=n.drawMode,s=n.openMode,c=n.selectMode,m=cv(),h=h1(),v=Bx(),g=iv().clearOutline,i=uv(),w=i.handleEllipse,S=i.readPaths,M=zx().newShapes,C=l5(),_=g5().activateLastSelection,T=Nr(),f=T.sorterAsc,u=p1(),A=Cx(),x=Xl().getFromId,z=f1(),I=d1().redrawReglTraces,O=vD(),D=O.MINSELECT,B=u.filter,F=u.tester,P=Fx(),j=P.p2r,U=P.axValue,$=P.getTransform;function Q(vt){return vt.subplot!==void 0}function re(vt,ht,De,Ne,We){var Ke=!Q(Ne),Je=r(We),et=a(We),Mt=s(We),pt=o(We),Pt=c(We),Ct=We==="drawline",qt=We==="drawcircle",Vt=Ct||qt,Ht=Ne.gd,Sr=Ht._fullLayout,Kr=Pt&&Sr.newselection.mode==="immediate"&&Ke,Yt=Sr._zoomlayer,Rt=Ne.element.getBoundingClientRect(),nr=Ne.plotinfo,ur=$(nr),cr=ht-Rt.left,Rr=De-Rt.top;Sr._calcInverseTransform(Ht);var Qr=T.apply3DTransform(Sr._invTransform)(cr,Rr);cr=Qr[0],Rr=Qr[1];var Zr=Sr._invScaleX,ha=Sr._invScaleY,Pa=cr,La=Rr,un="M"+cr+","+Rr,Xa=Ne.xaxes[0],ja=Ne.yaxes[0],Nn=Xa._length,yn=ja._length,Un=vt.altKey&&!(o(We)&&Mt),li,Yn,on,en,vi,Yi,Ja;H(vt,Ht,Ne),Je&&(li=B([[cr,Rr]],O.BENDPX));var Oa=Yt.selectAll("path.select-outline-"+nr.id).data([1]),lt=pt?Sr.newshape:Sr.newselection;pt&&(Ne.hasText=lt.label.text||lt.label.texttemplate);var rt=pt&&!Mt?lt.fillcolor:"rgba(0,0,0,0)",fr=lt.line.color||(Ke?l.contrast(Ht._fullLayout.plot_bgcolor):"#7f7f7f");Oa.enter().append("path").attr("class","select-outline select-outline-"+nr.id).style({opacity:pt?lt.opacity/2:1,"stroke-dasharray":k(lt.line.dash,lt.line.width),"stroke-width":lt.line.width+"px","shape-rendering":"crispEdges"}).call(l.stroke,fr).call(l.fill,rt).attr("fill-rule","evenodd").classed("cursor-move",!!pt).attr("transform",ur).attr("d",un+"Z");var lr=Yt.append("path").attr("class","zoombox-corners").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1}).attr("transform",ur).attr("d","M0,0Z");if(pt&&Ne.hasText){var Tr=Yt.select(".label-temp");Tr.empty()&&(Tr=Yt.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ir=Sr._uid+O.SELECTID,Dr=[],ot=ae(Ht,Ne.xaxes,Ne.yaxes,Ne.subplot);Kr&&!vt.shiftKey&&(Ne._clearSubplotSelections=function(){if(Ke){var jt=Xa._id,ar=ja._id;Xe(Ht,jt,ar,ot);for(var Er=(Ht.layout||{}).selections||[],xr=[],zr=!1,Lr=0;Lr=0){Ht._fullLayout._deactivateShape(Ht);return}if(!pt){var Er=Sr.clickmode;A.done(Ir).then(function(){if(A.clear(Ir),jt===2){for(Oa.remove(),vi=0;vi-1&&ne(ar,Ht,Ne.xaxes,Ne.yaxes,Ne.subplot,Ne,Oa),Er==="event"&&or(Ht,void 0);e.click(Ht,ar,nr.id)}).catch(T.error)}},Ne.doneFn=function(){lr.remove(),A.done(Ir).then(function(){A.clear(Ir),!Kr&&en&&Ne.selectionDefs&&(en.subtract=Un,Ne.selectionDefs.push(en),Ne.mergedPolygons.length=0,[].push.apply(Ne.mergedPolygons,on)),(Kr||pt)&&Z(Ne,Kr),Ne.doneFnCompleted&&Ne.doneFnCompleted(Dr),Pt&&or(Ht,Ja)}).catch(T.error)}}function ne(vt,ht,De,Ne,We,Ke,Je){var et=ht._hoverdata,Mt=ht._fullLayout,pt=Mt.clickmode,Pt=pt.indexOf("event")>-1,Ct=[],qt,Vt,Ht,Sr,Kr,Yt,Rt,nr,ur,cr;if(xe(et)){H(vt,ht,Ke),qt=ae(ht,De,Ne,We);var Rr=we(et,qt),Qr=Rr.pointNumbers.length>0;if(Qr?Se(qt,Rr):Ie(qt)&&(Rt=Me(Rr))){for(Je&&Je.remove(),cr=0;cr=0}function q(vt){return vt._fullLayout._activeSelectionIndex>=0}function Z(vt,ht){var De=vt.dragmode,Ne=vt.plotinfo,We=vt.gd;Y(We)&&We._fullLayout._deactivateShape(We),q(We)&&We._fullLayout._deactivateSelection(We);var Ke=We._fullLayout,Je=Ke._zoomlayer,et=o(De),Mt=c(De);if(et||Mt){var pt=Je.selectAll(".select-outline-"+Ne.id);if(pt&&We._fullLayout._outlining){var Pt;et&&(Pt=M(pt,vt)),Pt&&E.call("_guiRelayout",We,{shapes:Pt});var Ct;Mt&&!Q(vt)&&(Ct=C(pt,vt)),Ct&&(We._fullLayout._noEmitSelectedAtStart=!0,E.call("_guiRelayout",We,{selections:Ct}).then(function(){ht&&_(We)})),We._fullLayout._outlining=!1}}Ne.selection={},Ne.selection.selectionDefs=vt.selectionDefs=[],Ne.selection.mergedPolygons=vt.mergedPolygons=[]}function ee(vt){return vt._id}function ae(vt,ht,De,Ne){if(!vt.calcdata)return[];var We=[],Ke=ht.map(ee),Je=De.map(ee),et,Mt,pt;for(pt=0;pt0,Ke=We?Ne[0]:De;return ht.selectedpoints?ht.selectedpoints.indexOf(Ke)>-1:!1}function Se(vt,ht){var De=[],Ne,We,Ke,Je;for(Je=0;Je0&&De.push(Ne);if(De.length===1&&(Ke=De[0]===ht.searchInfo,Ke&&(We=ht.searchInfo.cd[0].trace,We.selectedpoints.length===ht.pointNumbers.length))){for(Je=0;Je1||(ht+=Ne.selectedpoints.length,ht>1)))return!1;return ht===1}function Ve(vt,ht,De){var Ne,We;for(Ne=0;Ne-1&&ht;if(!Je&&ht){var jt=yt(vt,!0);if(jt.length){var ar=jt[0].xref,Er=jt[0].yref;if(ar&&Er){var xr=At(jt),zr=rr([x(vt,ar,"x"),x(vt,Er,"y")]);zr(Dr,xr)}}vt._fullLayout._noEmitSelectedAtStart?vt._fullLayout._noEmitSelectedAtStart=!1:kt&&or(vt,Dr),qt._reselect=!1}if(!Je&&qt._deselect){var Lr=qt._deselect;et=Lr.xref,Mt=Lr.yref,Be(et,Mt,Pt)||Xe(vt,et,Mt,Ne),kt&&(Dr.points.length?or(vt,Dr):Ot(vt)),qt._deselect=!1}return{eventData:Dr,selectionTesters:De}}function Ae(vt){var ht=vt.calcdata;if(ht)for(var De=0;De=0){lt._fullLayout._deactivateShape(lt);return}var rt=lt._fullLayout.clickmode;if(G(lt),Ja===2&&!_e&&li(),ke)rt.indexOf("select")>-1&&T(Oa,lt,Be,Xe,he.id,pt),rt.indexOf("event")>-1&&a.click(lt,Oa,he.id);else if(Ja===1&&_e){var fr=Ie?ve:ce,lr=Ie==="s"||Ve==="w"?0:1,Tr=fr._name+".range["+lr+"]",Ir=F(fr,lr),Dr="left",ot="middle";if(fr.fixedrange)return;Ie?(ot=Ie==="n"?"top":"bottom",fr.side==="right"&&(Dr="right")):Ve==="e"&&(Dr="right"),lt._context.showAxisRangeEntryBoxes&&p.select(Mt).call(t.makeEditable,{gd:lt,immediate:!0,background:lt._fullLayout.paper_bgcolor,text:String(Ir),fill:fr.tickfont?fr.tickfont.color:"#444",horizontalAlign:Dr,verticalAlign:ot}).on("edit",function(kt){var jt=fr.d2r(kt);jt!==void 0&&l.call("_guiRelayout",lt,Tr,jt)})}}c.init(pt);var qt,Vt,Ht,Sr,Kr,Yt,Rt,nr,ur,cr;function Rr(Ja,Oa,lt){var rt=Mt.getBoundingClientRect();qt=Oa-rt.left,Vt=lt-rt.top,ae._fullLayout._calcInverseTransform(ae);var fr=b.apply3DTransform(ae._fullLayout._invTransform)(qt,Vt);qt=fr[0],Vt=fr[1],Ht={l:qt,r:qt,w:0,t:Vt,b:Vt,h:0},Sr=ae._hmpixcount?ae._hmlumcount/ae._hmpixcount:n.luminosity(ae._fullLayout.plot_bgcolor),Kr="M0,0H"+gt+"V"+Tt+"H0V0",Yt=!1,Rt="xy",cr=!1,nr=Q(Ge,Sr,Ye,yt,Kr),ur=re(Ge,Ye,yt)}function Qr(Ja,Oa){if(ae._transitioningWithDuration)return!1;var lt=Math.max(0,Math.min(gt,We*Ja+qt)),rt=Math.max(0,Math.min(Tt,Ke*Oa+Vt)),fr=Math.abs(lt-qt),lr=Math.abs(rt-Vt);Ht.l=Math.min(qt,lt),Ht.r=Math.max(qt,lt),Ht.t=Math.min(Vt,rt),Ht.b=Math.max(Vt,rt);function Tr(){Rt="",Ht.r=Ht.l,Ht.t=Ht.b,ur.attr("d","M0,0Z")}if(At.isSubplotConstrained)fr>x||lr>x?(Rt="xy",fr/gt>lr/Tt?(lr=fr*Tt/gt,Vt>rt?Ht.t=Vt-lr:Ht.b=Vt+lr):(fr=lr*gt/Tt,qt>lt?Ht.l=qt-fr:Ht.r=qt+fr),ur.attr("d",Y(Ht))):Tr();else if($t.isSubplotConstrained)if(fr>x||lr>x){Rt="xy";var Ir=Math.min(Ht.l/gt,(Tt-Ht.b)/Tt),Dr=Math.max(Ht.r/gt,(Tt-Ht.t)/Tt);Ht.l=Ir*gt,Ht.r=Dr*gt,Ht.b=(1-Ir)*Tt,Ht.t=(1-Dr)*Tt,ur.attr("d",Y(Ht))}else Tr();else!_r||lr0){var kt;if($t.isSubplotConstrained||!rr&&_r.length===1){for(kt=0;kt1&&(Tr.maxallowed!==void 0&&or===(Tr.range[0]1&&(Ir.maxallowed!==void 0&&Ot===(Ir.range[0]=0?Math.min(ae,.9):1/(1/Math.max(ae,-.3)+3.222))}function $(ae,he,xe){return ae?ae==="nsew"?xe?"":he==="pan"?"move":"crosshair":ae.toLowerCase()+"-resize":"pointer"}function Q(ae,he,xe,we,Me){return ae.append("path").attr("class","zoombox").style({fill:he>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",e(xe,we)).attr("d",Me+"Z")}function re(ae,he,xe){return ae.append("path").attr("class","zoombox-corners").style({fill:n.background,stroke:n.defaultLine,"stroke-width":1,opacity:0}).attr("transform",e(he,xe)).attr("d","M0,0Z")}function ne(ae,he,xe,we,Me,Se){ae.attr("d",we+"M"+xe.l+","+xe.t+"v"+xe.h+"h"+xe.w+"v-"+xe.h+"h-"+xe.w+"Z"),se(ae,he,Me,Se)}function se(ae,he,xe,we){xe||(ae.transition().style("fill",we>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),he.transition().style("opacity",1).duration(200))}function G(ae){p.select(ae).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function X(ae){z&&ae.data&&ae._context.showTips&&(b.notifier(b._(ae,"Double-click to zoom back out"),"long",ae),z=!1)}function K(ae,he){return"M"+(ae.l-.5)+","+(he-x-.5)+"h-3v"+(2*x+1)+"h3ZM"+(ae.r+.5)+","+(he-x-.5)+"h3v"+(2*x+1)+"h-3Z"}function H(ae,he){return"M"+(he-x-.5)+","+(ae.t-.5)+"v-3h"+(2*x+1)+"v3ZM"+(he-x-.5)+","+(ae.b+.5)+"v3h"+(2*x+1)+"v-3Z"}function Y(ae){var he=Math.floor(Math.min(ae.b-ae.t,ae.r-ae.l,x)/2);return"M"+(ae.l-3.5)+","+(ae.t-.5+he)+"h3v"+-he+"h"+he+"v-3h-"+(he+3)+"ZM"+(ae.r+3.5)+","+(ae.t-.5+he)+"h-3v"+-he+"h"+-he+"v-3h"+(he+3)+"ZM"+(ae.r+3.5)+","+(ae.b+.5-he)+"h-3v"+he+"h"+-he+"v3h"+(he+3)+"ZM"+(ae.l-3.5)+","+(ae.b+.5-he)+"h3v"+he+"h"+he+"v3h-"+(he+3)+"Z"}function q(ae,he,xe,we,Me){for(var Se=!1,Ie={},Ve={},Ge,ke,_e,ce,ve=(Me||{}).xaHash,le=(Me||{}).yaHash,Ae=0;Ae1&&b.warn("Full array edits are incompatible with other edits",c);var S=a[""][""];if(e(S))r.set(null);else if(Array.isArray(S))r.set(S);else return b.warn("Unrecognized full array edit value",c,S),!0;return g?!1:(m(i,w),h(n),!0)}var M=Object.keys(a).map(Number).sort(E),C=r.get(),_=C||[],T=s(w,c).get(),f=[],u=-1,A=_.length,x,z,I,O,D,B,F,P;for(x=0;x_.length-(F?0:1)){b.warn("index out of range",c,I);continue}if(B!==void 0)D.length>1&&b.warn("Insertion & removal are incompatible with edits to the same index.",c,I),e(B)?f.push(I):F?(B==="add"&&(B={}),_.splice(I,0,B),T&&T.splice(I,0,{})):b.warn("Unrecognized full object edit value",c,I,B),u===-1&&(u=I);else for(z=0;z=0;x--)_.splice(f[x],1),T&&T.splice(f[x],1);if(_.length?C||r.set(_):r.set(null),g)return!1;if(m(i,w),v!==p){var j;if(u===-1)j=M;else{for(A=Math.max(_.length,A),j=[],x=0;x=u));x++)j.push(I);for(x=u;x0&&b.log("Clearing previous rejected promises from queue."),g._promises=[]},J.cleanLayout=function(g){var i,w;g||(g={}),g.xaxis1&&(g.xaxis||(g.xaxis=g.xaxis1),delete g.xaxis1),g.yaxis1&&(g.yaxis||(g.yaxis=g.yaxis1),delete g.yaxis1),g.scene1&&(g.scene||(g.scene=g.scene1),delete g.scene1);var S=(E.subplotsRegistry.cartesian||{}).attrRegex,M=(E.subplotsRegistry.polar||{}).attrRegex,C=(E.subplotsRegistry.ternary||{}).attrRegex,_=(E.subplotsRegistry.gl3d||{}).attrRegex,T=Object.keys(g);for(i=0;i3?(B.x=1.02,B.xanchor="left"):B.x<-2&&(B.x=-.02,B.xanchor="right"),B.y>3?(B.y=1.02,B.yanchor="bottom"):B.y<-2&&(B.y=-.02,B.yanchor="top")),g.dragmode==="rotate"&&(g.dragmode="orbit"),g.template&&g.template.layout&&J.cleanLayout(g.template.layout),g};function r(g,i,w=!1){var S=g[i],M=i.charAt(0);w&&Array.isArray(S)||S&&S!=="paper"&&(g[i]=l(S,M,!0))}J.cleanData=function(g){for(var i=0;i0)return g.slice(0,i)}J.hasParent=function(g,i){for(var w=h(i);w;){if(w in g)return!0;w=h(w)}return!1},J.clearAxisTypes=function(g,i,w){for(var S=0;S{let w=(...S)=>S.every(M=>b.isPlainObject(M))||S.every(M=>Array.isArray(M));if([g,i].every(S=>Array.isArray(S))){if(g.length!==i.length)return!1;for(let S=0;Sb.isPlainObject(S))){if(Object.keys(g).length!==Object.keys(i).length)return!1;for(let S in g){if(S.startsWith("_"))continue;let M=g[S],C=i[S];if(M!==C&&!(w(M,C)?v(M,C):!1))return!1}return!0}return!1};J.collectionsAreEqual=v}}),Ux=ze({"src/plot_api/plot_api.js"(J){"use strict";var V=ci(),p=ao(),b=Gw(),E=Nr(),k=E.nestedProperty,l=Hm(),e=OI(),t=mi(),n=Wm(),r=cl(),a=Gi(),o=Qw(),s=cf(),c=$i(),m=Qn(),h=b5().initInteractions,v=nd(),g=_c().clearOutline,i=av().dfltConfig,w=xD(),S=bD(),M=d1(),C=Al(),_=hc().AX_NAME_PATTERN,T=0,f=5;function u(De,Ne,We,Ke){var Je;if(De=E.getGraphDiv(De),l.init(De),E.isPlainObject(Ne)){var et=Ne;Ne=et.data,We=et.layout,Ke=et.config,Je=et.frames}var Mt=l.triggerHandler(De,"plotly_beforeplot",[Ne,We,Ke]);if(Mt===!1)return Promise.reject();!Ne&&!We&&!E.isPlotDiv(De)&&E.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",De);function pt(){if(Je)return J.addFrames(De,Je)}O(De,Ke),We||(We={}),V.select(De).classed("js-plotly-plot",!0),c.makeTester(),Array.isArray(De._promises)||(De._promises=[]);var Pt=(De.data||[]).length===0&&Array.isArray(Ne);Array.isArray(Ne)&&(S.cleanData(Ne),Pt?De.data=Ne:De.data.push.apply(De.data,Ne),De.empty=!1),(!De.layout||Pt)&&(De.layout=S.cleanLayout(We)),r.supplyDefaults(De);var Ct=De._fullLayout,qt=Ct._has("cartesian");Ct._replotting=!0,(Pt||Ct._shouldCreateBgLayer)&&(ht(De),Ct._shouldCreateBgLayer&&delete Ct._shouldCreateBgLayer),c.initGradients(De),c.initPatterns(De),Pt&&a.saveShowSpikeInitial(De);var Vt=!De.calcdata||De.calcdata.length!==(De._fullData||[]).length;Vt&&r.doCalcdata(De);for(var Ht=0;Ht=De.data.length||Je<-De.data.length)throw new Error(We+" must be valid indices for gd.data.");if(Ne.indexOf(Je,Ke+1)>-1||Je>=0&&Ne.indexOf(-De.data.length+Je)>-1||Je<0&&Ne.indexOf(De.data.length+Je)>-1)throw new Error("each index in "+We+" must be unique.")}}function j(De,Ne,We){if(!Array.isArray(De.data))throw new Error("gd.data must be an array.");if(typeof Ne>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Ne)||(Ne=[Ne]),P(De,Ne,"currentIndices"),typeof We<"u"&&!Array.isArray(We)&&(We=[We]),typeof We<"u"&&P(De,We,"newIndices"),typeof We<"u"&&Ne.length!==We.length)throw new Error("current and new indices must be of equal length.")}function U(De,Ne,We){var Ke,Je;if(!Array.isArray(De.data))throw new Error("gd.data must be an array.");if(typeof Ne>"u")throw new Error("traces must be defined.");for(Array.isArray(Ne)||(Ne=[Ne]),Ke=0;Ke"u")throw new Error("indices must be an integer or array of integers");P(De,We,"indices");for(var et in Ne){if(!Array.isArray(Ne[et])||Ne[et].length!==We.length)throw new Error("attribute "+et+" must be an array of length equal to indices array length");if(Je&&(!(et in Ke)||!Array.isArray(Ke[et])||Ke[et].length!==Ne[et].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}function Q(De,Ne,We,Ke){var Je=E.isPlainObject(Ke),et=[],Mt,pt,Pt,Ct,qt;Array.isArray(We)||(We=[We]),We=F(We,De.data.length-1);for(var Vt in Ne)for(var Ht=0;Ht=0&&qt=0&&qt"u")return Ct=J.redraw(De),e.add(De,Je,Mt,et,pt),Ct;Array.isArray(We)||(We=[We]);try{j(De,Ke,We)}catch(qt){throw De.data.splice(De.data.length-Ne.length,Ne.length),qt}return e.startSequence(De),e.add(De,Je,Mt,et,pt),Ct=J.moveTraces(De,Ke,We),e.stopSequence(De),Ct}function K(De,Ne){De=E.getGraphDiv(De);var We=[],Ke=J.addTraces,Je=K,et=[De,We,Ne],Mt=[De,Ne],pt,Pt;if(typeof Ne>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Ne)||(Ne=[Ne]),P(De,Ne,"indices"),Ne=F(Ne,De.data.length-1),Ne.sort(E.sorterDes),pt=0;pt"u")for(We=[],Ct=0;Ct0&&typeof Pa.parts[Xa]!="string";)Xa--;var ja=Pa.parts[Xa],Nn=Pa.parts[Xa-1]+"."+ja,yn=Pa.parts.slice(0,Xa).join("."),Un=k(De.layout,yn).get(),li=k(Ke,yn).get(),Yn=Pa.get();if(La!==void 0){nr[ha]=La,ur[ha]=ja==="reverse"?La:q(Yn);var on=n.getLayoutValObject(Ke,Pa.parts);if(on&&on.impliedEdits&&La!==null)for(var en in on.impliedEdits)cr(E.relativeAttr(ha,en),on.impliedEdits[en]);if(["width","height"].indexOf(ha)!==-1)if(La){cr("autosize",null);var vi=ha==="height"?"width":"height";cr(vi,Ke[vi])}else Ke[ha]=De._initialAutoSize[ha];else if(ha==="autosize")cr("width",La?null:Ke.width),cr("height",La?null:Ke.height);else if(Nn.match(Se))Zr(Nn),k(Ke,yn+"._inputRange").set(null);else if(Nn.match(Ie)){Zr(Nn),k(Ke,yn+"._inputRange").set(null);var Yi=k(Ke,yn).get();Yi._inputDomain&&(Yi._input.domain=Yi._inputDomain.slice())}else Nn.match(Ve)&&k(Ke,yn+"._inputDomain").set(null);if(ja==="type"){Qr=Un;var Ja=li.type==="linear"&&La==="log",Oa=li.type==="log"&&La==="linear";if(Ja||Oa){if(!Qr||!Qr.range)cr(yn+".autorange",!0);else if(li.autorange)Ja&&(Qr.range=Qr.range[1]>Qr.range[0]?[1,2]:[2,1]);else{var lt=Qr.range[0],rt=Qr.range[1];Ja?(lt<=0&&rt<=0&&cr(yn+".autorange",!0),lt<=0?lt=rt/1e6:rt<=0&&(rt=lt/1e6),cr(yn+".range[0]",Math.log(lt)/Math.LN10),cr(yn+".range[1]",Math.log(rt)/Math.LN10)):(cr(yn+".range[0]",Math.pow(10,lt)),cr(yn+".range[1]",Math.pow(10,rt)))}Array.isArray(Ke._subplots.polar)&&Ke._subplots.polar.length&&Ke[Pa.parts[0]]&&Pa.parts[1]==="radialaxis"&&delete Ke[Pa.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(De,li,La,cr),t.getComponentMethod("images","convertCoords")(De,li,La,cr)}else cr(yn+".autorange",!0),cr(yn+".range",null);k(Ke,yn+"._inputRange").set(null)}else if(ja.match(_)){var fr=k(Ke,ha).get(),lr=(La||{}).type;(!lr||lr==="-")&&(lr="linear"),t.getComponentMethod("annotations","convertCoords")(De,fr,lr,cr),t.getComponentMethod("images","convertCoords")(De,fr,lr,cr)}var Tr=w.containerArrayMatch(ha);if(Tr){qt=Tr.array,Vt=Tr.index;var Ir=Tr.property,Dr=on||{editType:"calc"};Vt!==""&&Ir===""&&(w.isAddVal(La)?ur[ha]=null:w.isRemoveVal(La)?ur[ha]=(k(We,qt).get()||[])[Vt]:E.warn("unrecognized full object value",Ne)),C.update(Rt,Dr),Ct[qt]||(Ct[qt]={});var ot=Ct[qt][Vt];ot||(ot=Ct[qt][Vt]={}),ot[Ir]=La,delete Ne[ha]}else ja==="reverse"?(Un.range?Un.range.reverse():(cr(yn+".autorange",!0),Un.range=[1,0]),li.autorange?Rt.calc=!0:Rt.plot=!0):(ha==="dragmode"&&(La===!1&&Yn!==!1||La!==!1&&Yn===!1)||Ke._has("scatter-like")&&Ke._has("regl")&&ha==="dragmode"&&(La==="lasso"||La==="select")&&!(Yn==="lasso"||Yn==="select")?Rt.plot=!0:on?C.update(Rt,on):Rt.calc=!0,Pa.set(La))}}for(qt in Ct){var kt=w.applyContainerArrayChanges(De,et(We,qt),Ct[qt],Rt,et);kt||(Rt.plot=!0)}for(var jt in Rr){Qr=a.getFromId(De,jt);var ar=Qr&&Qr._constraintGroup;if(ar){Rt.calc=!0;for(var Er in ar)Rr[Er]||(a.getFromId(De,Er)._constraintShrinkable=!0)}}(ke(De)||Ne.height||Ne.width)&&(Rt.plot=!0);var xr=Ke.shapes;for(Vt=0;Vt1;)if(Ke.pop(),We=k(Ne,Ke.join(".")+".uirevision").get(),We!==void 0)return We;return Ne.uirevision}function Xe(De,Ne){for(var We=0;We[yn,De._ev.listeners(yn)]);et=J.newPlot(De,Ne,We,Ke).then(()=>{for(let[yn,Un]of Nn)Un.forEach(li=>De.on(yn,li));return J.react(De,Ne,We,Ke)})}else{De.data=Ne||[],S.cleanData(De.data),De.layout=We||{},S.cleanLayout(De.layout),gt(De.data,De.layout,pt,Pt),r.supplyDefaults(De,{skipUpdateCalc:!0});var Vt=De._fullData,Ht=De._fullLayout,Sr=Ht.datarevision===void 0,Kr=Ht.transition,Yt=$t(De,Pt,Ht,Sr,Kr),Rt=Yt.newDataRevision,nr=At(De,pt,Vt,Sr,Kr,Rt);if(ke(De)&&(Yt.layoutReplot=!0),nr.calc||Yt.calc){De.calcdata=void 0;for(var ur=Object.getOwnPropertyNames(Ht),cr=0;cr(qt||De.emit("plotly_react",{config:Ke,data:Ne,layout:We}),De))}function At(De,Ne,We,Ke,Je,et){var Mt=Ne.length===We.length;if(!Je&&!Mt)return{fullReplot:!0,calc:!0};var pt=C.traceFlags();pt.arrays={},pt.nChanges=0,pt.nChangesAnim=0;var Pt,Ct;function qt(Sr){var Kr=n.getTraceValObject(Ct,Sr);return!Ct._module.animatable&&Kr.anim&&(Kr.anim=!1),Kr}var Vt={getValObject:qt,flags:pt,immutable:Ke,transition:Je,newDataRevision:et,gd:De},Ht={};for(Pt=0;Pt=Je.length?Je[0]:Je[Ct]:Je}function pt(Ct){return Array.isArray(et)?Ct>=et.length?et[0]:et[Ct]:et}function Pt(Ct,qt){var Vt=0;return function(){if(Ct&&++Vt===qt)return Ct()}}return new Promise(function(Ct,qt){function Vt(){if(Ke._frameQueue.length!==0){for(;Ke._frameQueue.length;){var ja=Ke._frameQueue.pop();ja.onInterrupt&&ja.onInterrupt()}De.emit("plotly_animationinterrupted",[])}}function Ht(ja){if(ja.length!==0){for(var Nn=0;NnKe._timeToNext&&Kr()};ja()}var Rt=0;function nr(ja){return Array.isArray(Je)?Rt>=Je.length?ja.transitionOpts=Je[Rt]:ja.transitionOpts=Je[0]:ja.transitionOpts=Je,Rt++,ja}var ur,cr,Rr=[],Qr=Ne==null,Zr=Array.isArray(Ne),ha=!Qr&&!Zr&&E.isPlainObject(Ne);if(ha)Rr.push({type:"object",data:nr(E.extendFlat({},Ne))});else if(Qr||["string","number"].indexOf(typeof Ne)!==-1)for(ur=0;ur0&&unun)&&Xa.push(cr);Rr=Xa}}Rr.length>0?Ht(Rr):(De.emit("plotly_animated"),Ct())})}function Xt(De,Ne,We){if(De=E.getGraphDiv(De),Ne==null)return Promise.resolve();if(!E.isPlotDiv(De))throw new Error("This element is not a Plotly plot: "+De+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Ke,Je,et,Mt,pt=De._transitionData._frames,Pt=De._transitionData._frameHash;if(!Array.isArray(Ne))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Ne);var Ct=pt.length+Ne.length*2,qt=[],Vt={};for(Ke=Ne.length-1;Ke>=0;Ke--)if(E.isPlainObject(Ne[Ke])){var Ht=Ne[Ke].name,Sr=(Pt[Ht]||Vt[Ht]||{}).name,Kr=Ne[Ke].name,Yt=Pt[Sr]||Vt[Sr];Sr&&Kr&&typeof Kr=="number"&&Yt&&TPa.index?-1:ha.index=0;Ke--){if(Je=qt[Ke].frame,typeof Je.name=="number"&&E.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Je.name)for(;Pt[Je.name="frame "+De._transitionData._counter++];);if(Pt[Je.name]){for(et=0;et=0;We--)Ke=Ne[We],et.push({type:"delete",index:Ke}),Mt.unshift({type:"insert",index:Ke,value:Je[Ke]});var pt=r.modifyFrames,Pt=r.modifyFrames,Ct=[De,Mt],qt=[De,et];return e&&e.add(De,pt,Ct,Pt,qt),r.modifyFrames(De,et)}function Ot(De){De=E.getGraphDiv(De);var Ne=De._fullLayout||{},We=De._fullData||[];return r.cleanPlot([],{},We,Ne),r.purge(De),l.purge(De),Ne._container&&Ne._container.remove(),delete De._context,De}function vt(De){var Ne=De._fullLayout,We=De.getBoundingClientRect();if(!E.equalDomRects(We,Ne._lastBBox)){var Ke=Ne._invTransform=E.inverseTransformMatrix(E.getFullTransformMatrix(De));Ne._invScaleX=Math.sqrt(Ke[0][0]*Ke[0][0]+Ke[0][1]*Ke[0][1]+Ke[0][2]*Ke[0][2]),Ne._invScaleY=Math.sqrt(Ke[1][0]*Ke[1][0]+Ke[1][1]*Ke[1][1]+Ke[1][2]*Ke[1][2]),Ne._lastBBox=We}}function ht(De){var Ne=V.select(De),We=De._fullLayout;if(We._calcInverseTransform=vt,We._calcInverseTransform(De),We._container=Ne.selectAll(".plot-container").data([0]),We._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),We._paperdiv=We._container.selectAll(".svg-container").data([0]),We._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),We._glcontainer=We._paperdiv.selectAll(".gl-container").data([{}]),We._glcontainer.enter().append("div").classed("gl-container",!0),We._paperdiv.selectAll(".main-svg").remove(),We._paperdiv.select(".modebar-container").remove(),We._paper=We._paperdiv.insert("svg",":first-child").classed("main-svg",!0),We._toppaper=We._paperdiv.append("svg").classed("main-svg",!0),We._modebardiv=We._paperdiv.append("div"),delete We._modeBar,We._hoverpaper=We._paperdiv.append("svg").classed("main-svg",!0),!We._uid){var Ke={};V.selectAll("defs").each(function(){this.id&&(Ke[this.id.split("-")[1]]=1)}),We._uid=E.randstr(Ke)}We._paperdiv.selectAll(".main-svg").attr(v.svgAttrs),We._defs=We._paper.append("defs").attr("id","defs-"+We._uid),We._clips=We._defs.append("g").classed("clips",!0),We._topdefs=We._toppaper.append("defs").attr("id","topdefs-"+We._uid),We._topclips=We._topdefs.append("g").classed("clips",!0),We._bgLayer=We._paper.append("g").classed("bglayer",!0),We._draggers=We._paper.append("g").classed("draglayer",!0);var Je=We._paper.append("g").classed("layer-below",!0);We._imageLowerLayer=Je.append("g").classed("imagelayer",!0),We._shapeLowerLayer=Je.append("g").classed("shapelayer",!0),We._cartesianlayer=We._paper.append("g").classed("cartesianlayer",!0),We._polarlayer=We._paper.append("g").classed("polarlayer",!0),We._smithlayer=We._paper.append("g").classed("smithlayer",!0),We._ternarylayer=We._paper.append("g").classed("ternarylayer",!0),We._geolayer=We._paper.append("g").classed("geolayer",!0),We._funnelarealayer=We._paper.append("g").classed("funnelarealayer",!0),We._pielayer=We._paper.append("g").classed("pielayer",!0),We._iciclelayer=We._paper.append("g").classed("iciclelayer",!0),We._treemaplayer=We._paper.append("g").classed("treemaplayer",!0),We._sunburstlayer=We._paper.append("g").classed("sunburstlayer",!0),We._indicatorlayer=We._toppaper.append("g").classed("indicatorlayer",!0),We._glimages=We._paper.append("g").classed("glimages",!0);var et=We._toppaper.append("g").classed("layer-above",!0);We._imageUpperLayer=et.append("g").classed("imagelayer",!0),We._shapeUpperLayer=et.append("g").classed("shapelayer",!0),We._selectionLayer=We._toppaper.append("g").classed("selectionlayer",!0),We._infolayer=We._toppaper.append("g").classed("infolayer",!0),We._menulayer=We._toppaper.append("g").classed("menulayer",!0),We._zoomlayer=We._toppaper.append("g").classed("zoomlayer",!0),We._hoverlayer=We._hoverpaper.append("g").classed("hoverlayer",!0),We._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),De.emit("plotly_framework")}J.animate=_r,J.addFrames=Xt,J.deleteFrames=or,J.addTraces=X,J.deleteTraces=K,J.extendTraces=se,J.moveTraces=H,J.prependTraces=G,J.newPlot=B,J._doPlot=u,J.purge=Ot,J.react=Tt,J.redraw=D,J.relayout=xe,J.restyle=Y,J.setPlotConfig=x,J.update=_e,J._guiRelayout=ce(xe),J._guiRestyle=ce(Y),J._guiUpdate=ce(_e),J._storeDirectGUIEdit=ae}}),ip=ze({"src/snapshot/helpers.js"(J){"use strict";var V=mi();J.getDelay=function(E){return E._has&&(E._has("gl3d")||E._has("map"))?500:0},J.getRedrawFunc=function(E){return function(){V.getComponentMethod("colorbar","draw")(E)}},J.encodeSVG=function(E){return"data:image/svg+xml,"+encodeURIComponent(E)},J.encodeJSON=function(E){return"data:application/json,"+encodeURIComponent(E)};var p=window.URL||window.webkitURL;J.createObjectURL=function(E){return p.createObjectURL(E)},J.revokeObjectURL=function(E){return p.revokeObjectURL(E)},J.createBlob=function(E,k){if(k==="svg")return new window.Blob([E],{type:"image/svg+xml;charset=utf-8"});if(k==="full-json")return new window.Blob([E],{type:"application/json;charset=utf-8"});var l=b(window.atob(E));return new window.Blob([l],{type:"image/"+k})},J.octetStream=function(E){document.location.href="data:application/octet-stream"+E},J.getPlotTitle=function(E){var k,l,e,t,n=E._fullLayout;if(n){var r=(k=n.title)==null?void 0:k.text;return r===((l=n._dfltTitle)==null?void 0:l.plot)?void 0:r}return(t=(e=E.layout)==null?void 0:e.title)==null?void 0:t.text},J.getPlotSubtitle=function(E){var k,l,e,t,n,r,a=E._fullLayout;if(a){var o=(l=(k=a.title)==null?void 0:k.subtitle)==null?void 0:l.text;return o===((e=a._dfltTitle)==null?void 0:e.subtitle)?void 0:o}return(r=(n=(t=E.layout)==null?void 0:t.title)==null?void 0:n.subtitle)==null?void 0:r.text};function b(E){for(var k=E.length,l=new ArrayBuffer(k),e=new Uint8Array(l),t=0;t{let i=g.toLowerCase();return r.includes(i)?g:a.includes(i)?"<":o.includes(i)?">":g.includes("<")||g.includes(">")?"":h.html(g).text()});return h.remove(),v}function c(m){return m.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}V.exports=function(h,v,g){var i=h._fullLayout,w=i._paper,S=i._toppaper,M=i.width,C=i.height,_;w.insert("rect",":first-child").call(E.setRect,0,0,M,C).call(k.fill,i.paper_bgcolor);var T=i._basePlotModules||[];for(_=0;_1&&C.push(s("object","layout"))),b.supplyDefaults(_);for(var u=_._fullData,A=T.length,x=0;xz.length&&M.push(s("unused",C,A.concat(z.length)));var P=z.length,j=Array.isArray(F);j&&(P=Math.min(P,F.length));var U,$,Q,re,ne;if(I.dimensions===2)for($=0;$z[$].length&&M.push(s("unused",C,A.concat($,z[$].length)));var se=z[$].length;for(U=0;U<(j?Math.min(se,F[$].length):se);U++)Q=j?F[$][U]:F,re=x[$][U],ne=z[$][U],p.validate(re,Q)?ne!==re&&ne!==+re&&M.push(s("dynamic",C,A.concat($,U),re,ne)):M.push(s("value",C,A.concat($,U),re))}else M.push(s("array",C,A.concat($),x[$]));else for($=0;$D?M.push({code:"unused",traceType:x,templateCount:O,dataCount:D}):D>O&&M.push({code:"reused",traceType:x,templateCount:O,dataCount:D})}}function B(F,P){for(var j in F)if(j.charAt(0)!=="_"){var U=F[j],$=s(F,j,P);p(U)?(Array.isArray(F)&&U._template===!1&&U.templateitemname&&M.push({code:"missing",path:$,templateitemname:U.templateitemname}),B(U,$)):Array.isArray(U)&&c(U)&&B(U,$)}}if(B({data:_,layout:C},""),M.length)return M.map(m)};function c(h){for(var v=0;v=0;m--){var h=l[m];if(h.type==="scatter"&&h.xaxis===s.xaxis&&h.yaxis===s.yaxis){h.opacity=void 0;break}}}}}}}),kD=ze({"src/traces/scatter/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Lx();V.exports=function(E,k){function l(t,n){return p.coerce(E,k,b,t,n)}var e=k.barmode==="group";k.scattermode==="group"&&l("scattergap",e?k.bargap:.2)}}}),bd=ze({"src/plots/cartesian/align_period.js"(J,V){"use strict";var p=ao(),b=Nr(),E=b.dateTime2ms,k=b.incrementMonth,l=No(),e=l.ONEAVGMONTH;V.exports=function(n,r,a,o){if(r.type!=="date")return{vals:o};var s=n[a+"periodalignment"];if(!s)return{vals:o};var c=n[a+"period"],m;if(p(c)){if(c=+c,c<=0)return{vals:o}}else if(typeof c=="string"&&c.charAt(0)==="M"){var h=+c.substring(1);if(h>0&&Math.round(h)===h)m=h;else return{vals:o}}for(var v=r.calendar,g=s==="start",i=s==="end",w=n[a+"period0"],S=E(w,v)||0,M=[],C=[],_=[],T=o.length,f=0;fu;)z=k(z,-m,v);for(;z<=u;)z=k(z,m,v);x=k(z,-m,v)}else{for(A=Math.round((u-S)/c),z=S+A*c;z>u;)z-=c;for(;z<=u;)z+=c;x=z-c}M[f]=g?x:i?z:(x+z)/2,C[f]=x,_[f]=z}return{vals:M,starts:C,ends:_}}}}),od=ze({"src/traces/scatter/colorscale_calc.js"(J,V){"use strict";var p=Bf().hasColorscale,b=Qf(),E=el();V.exports=function(l,e){E.hasLines(e)&&p(e,"line")&&b(l,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),E.hasMarkers(e)&&(p(e,"marker")&&b(l,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),p(e,"marker.line")&&b(l,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Nd=ze({"src/traces/scatter/arrays_to_calcdata.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){for(var l=0;lB&&x[P].gap;)P--;for(U=x[P].s,F=x.length-1;F>P;F--)x[F].s=U;for(;Bre+$||!p(Q))}for(var se=0;seP(U))):P(D.text);let j=D.outsidetextfont.size*r*F+n;return{ppadplus:B.some(U=>U.s<0)?j:0,ppadminus:B.some(U=>U.s>=0)?j:0}}return{ppadplus:void 0,ppadminus:void 0}}function z(D,B,F,P){for(var j=O(P),U=0;UO[v]&&v0?l:e)/(v._m*w*(v._m>0?l:e)))),Ct*=1e3}if(qt===E){if(i&&(qt=v.c2p(Pt.y,!0)),qt===E)return!1;qt*=1e3}return[Ct,qt]}function ee(pt,Pt,Ct,qt){var Vt=Ct-pt,Ht=qt-Pt,Sr=.5-pt,Kr=.5-Pt,Yt=Vt*Vt+Ht*Ht,Rt=Vt*Sr+Ht*Kr;if(Rt>0&&Rt1||Math.abs(Sr.y-Ct[0][1])>1)&&(Sr=[Sr.x,Sr.y],qt&&we(Sr,pt)Ie||pt[1]Ge)return[r(pt[0],Se,Ie),r(pt[1],Ve,Ge)]}function yt(pt,Pt){if(pt[0]===Pt[0]&&(pt[0]===Se||pt[0]===Ie)||pt[1]===Pt[1]&&(pt[1]===Ve||pt[1]===Ge))return!0}function gt(pt,Pt){var Ct=[],qt=Ye(pt),Vt=Ye(Pt);return qt&&Vt&&yt(qt,Vt)||(qt&&Ct.push(qt),Vt&&Ct.push(Vt)),Ct}function Tt(pt,Pt,Ct){return function(qt,Vt){var Ht=Ye(qt),Sr=Ye(Vt),Kr=[];if(Ht&&Sr&&yt(Ht,Sr))return Kr;Ht&&Kr.push(Ht),Sr&&Kr.push(Sr);var Yt=2*t.constrain((qt[pt]+Vt[pt])/2,Pt,Ct)-((Ht||qt)[pt]+(Sr||Vt)[pt]);if(Yt){var Rt;Ht&&Sr?Rt=Yt>0==Ht[pt]>Sr[pt]?Ht:Sr:Rt=Ht||Sr,Rt[pt]+=Yt}return Kr}}var At;f==="linear"||f==="spline"?At=Xe:f==="hv"||f==="vh"?At=gt:f==="hvh"?At=Tt(0,Se,Ie):f==="vhv"&&(At=Tt(1,Ve,Ge));function $t(pt,Pt){var Ct=Pt[0]-pt[0],qt=(Pt[1]-pt[1])/Ct,Vt=(pt[1]*Pt[0]-Pt[1]*pt[0])/Ct;return Vt>0?[qt>0?Se:Ie,Ge]:[qt>0?Ie:Se,Ve]}function rr(pt){var Pt=pt[0],Ct=pt[1],qt=Pt===O[D-1][0],Vt=Ct===O[D-1][1];if(!(qt&&Vt))if(D>1){var Ht=Pt===O[D-2][0],Sr=Ct===O[D-2][1];qt&&(Pt===Se||Pt===Ie)&&Ht?Sr?D--:O[D-1]=pt:Vt&&(Ct===Ve||Ct===Ge)&&Sr?Ht?D--:O[D-1]=pt:O[D++]=pt}else O[D++]=pt}function _r(pt){O[D-1][0]!==pt[0]&&O[D-1][1]!==pt[1]&&rr([ve,le]),rr(pt),Ae=null,ve=le=0}var Xt=t.isArrayOrTypedArray(C);function or(pt){if(pt&&M&&(pt.i=B,pt.d=s,pt.trace=m,pt.marker=Xt?C[pt.i]:C,pt.backoff=M),ae=pt[0]/w,he=pt[1]/S,_e=pt[0]Ie?Ie:0,ce=pt[1]Ge?Ge:0,_e||ce){if(!D)O[D++]=[_e||pt[0],ce||pt[1]];else if(Ae){var Pt=At(Ae,pt);Pt.length>1&&(_r(Pt[0]),O[D++]=Pt[1])}else Be=At(O[D-1],pt)[0],O[D++]=Be;var Ct=O[D-1];_e&&ce&&(Ct[0]!==_e||Ct[1]!==ce)?(Ae&&(ve!==_e&&le!==ce?rr(ve&&le?$t(Ae,pt):[ve||_e,le||ce]):ve&&le&&rr([ve,le])),rr([_e,ce])):ve-_e&&le-ce&&rr([_e||ve,ce||le]),Ae=pt,ve=_e,le=ce}else Ae&&_r(At(Ae,pt)[0]),O[D++]=pt}for(B=0;Bxe($,Ot))break;P=$,K=ne[0]*re[0]+ne[1]*re[1],K>G?(G=K,j=$,Q=!1):K=s.length||!$)break;or($),F=$}}Ae&&rr([ve||Ae[0],le||Ae[1]]),x.push(O.slice(0,D))}var vt=f.slice(f.length-1);if(M&&vt!=="h"&&vt!=="v"){for(var ht=!1,De=-1,Ne=[],We=0;We=0?a=h:(a=h=m,m++),a0,f=r(h,v,g);if(M=i.selectAll("g.trace").data(f,function(A){return A[0].trace.uid}),M.enter().append("g").attr("class",function(A){return"trace scatter trace"+A[0].trace.uid}).style("stroke-miterlimit",2),M.order(),o(h,M,v),T){S&&(C=S());var u=p.transition().duration(w.duration).ease(w.easing).each("end",function(){C&&C()}).each("interrupt",function(){C&&C()});u.each(function(){i.selectAll("g.trace").each(function(A,x){s(h,x,v,A,f,this,w)})})}else M.each(function(A,x){s(h,x,v,A,f,this,w)});_&&M.exit().remove(),i.selectAll("path:not([d])").remove()};function o(m,h,v){h.each(function(g){var i=k(p.select(this),"g","fills");e.setClipUrl(i,v.layerClipId,m);var w=g[0].trace;w._ownFill=null,w._nextFill=null;var S=[];w._ownfill&&S.push("_ownFill"),w._nexttrace&&S.push("_nextFill");var M=i.selectAll("g").data(S,l);M.enter().append("g"),M.exit().remove(),M.order().each(function(C){w[C]=k(p.select(this),"path","js-fill")})})}function s(m,h,v,g,i,w,S){var M=m._context.staticPlot,C;c(m,h,v,g,i);var _=!!S&&S.duration>0;function T(rr){return _?rr.transition():rr}var f=v.xaxis,u=v.yaxis,A=g[0].trace,x=A.line,z=p.select(w),I=k(z,"g","errorbars"),O=k(z,"g","lines"),D=k(z,"g","points"),B=k(z,"g","text");if(b.getComponentMethod("errorbars","plot")(m,I,v,S),A.visible!==!0)return;T(z).style("opacity",A.opacity);var F,P,j=A.fill.charAt(A.fill.length-1);j!=="x"&&j!=="y"&&(j="");var U,$;j==="y"?(U=1,$=u.c2p(0,!0)):j==="x"&&(U=0,$=f.c2p(0,!0)),g[0][v.isRangePlot?"nodeRangePlot3":"node3"]=z;var Q="",re=[],ne=A._prevtrace,se=null,G=null;ne&&(Q=ne._prevRevpath||"",P=ne._nextFill,re=ne._ownPolygons,se=ne._fillsegments,G=ne._fillElement);var X,K,H="",Y="",q,Z,ee,ae,he,xe,we=[];A._polygons=[];var Me=[],Se=[],Ie=E.noop;if(F=A._ownFill,t.hasLines(A)||A.fill!=="none"){P&&P.datum(g),["hv","vh","hvh","vhv"].indexOf(x.shape)!==-1?(q=e.steps(x.shape),Z=e.steps(x.shape.split("").reverse().join(""))):x.shape==="spline"?q=Z=function(rr){var _r=rr[rr.length-1];return rr.length>1&&rr[0][0]===_r[0]&&rr[0][1]===_r[1]?e.smoothclosed(rr.slice(1),x.smoothing):e.smoothopen(rr,x.smoothing)}:q=Z=function(rr){return"M"+rr.join("L")},ee=function(rr){return Z(rr.reverse())},Se=n(g,{xaxis:f,yaxis:u,trace:A,connectGaps:A.connectgaps,baseTolerance:Math.max(x.width||1,3)/4,shape:x.shape,backoff:x.backoff,simplify:x.simplify,fill:A.fill}),Me=new Array(Se.length);var Ve=0;for(C=0;C=M[0]&&z.x<=M[1]&&z.y>=C[0]&&z.y<=C[1]}),u=Math.ceil(f.length/T),A=0;i.forEach(function(z,I){var O=z[0].trace;t.hasMarkers(O)&&O.marker.maxdisplayed>0&&I=Math.min(ne,se)&&v<=Math.max(ne,se)?0:1/0}var G=Math.max(3,re.mrc||0),X=1-1/G,K=Math.abs(m.c2p(re.x)-v);return K=Math.min(ne,se)&&g<=Math.max(ne,se)?0:1/0}var G=Math.max(3,re.mrc||0),X=1-1/G,K=Math.abs(h.c2p(re.y)-g);return KY!=Me>=Y&&(he=ee[Z-1][0],xe=ee[Z][0],Me-we&&(ae=he+(xe-he)*(Y-we)/(Me-we),G=Math.min(G,ae),X=Math.max(X,ae)));return G=Math.max(G,0),X=Math.min(X,m._length),{x0:G,x1:X,y0:Y,y1:Y}}if(w.indexOf("fills")!==-1&&c._fillElement){var U=P(c._fillElement)&&!P(c._fillExclusionElement);if(U){var $=j(c._polygons);$===null&&($={x0:i[0],x1:i[0],y0:i[1],y1:i[1]});var Q=l.defaultLine;return l.opacity(c.fillcolor)?Q=c.fillcolor:l.opacity((c.line||{}).color)&&(Q=c.line.color),p.extendFlat(n,{distance:n.maxHoverDistance,x0:$.x0,x1:$.x1,y0:$.y0,y1:$.y1,color:Q,hovertemplate:!1}),delete n.index,c.text&&!p.isArrayOrTypedArray(c.text)?n.text=String(c.text):n.text=c.name,[n]}}}}}),Yv=ze({"src/traces/scatter/select.js"(J,V){"use strict";var p=el();V.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,n=[],r=l[0].trace,a,o,s,c,m=r.mode&&!p.hasMarkers(r)&&!p.hasText(r);if(m)return[];if(k===!1)for(a=0;a0&&(o["_"+r+"axes"]||{})[n])return o;if((o[r+"axis"]||r)===n){if(e(o,r))return o;if((o[r]||[]).length||o[r+"0"])return o}}}function l(t){return{v:"x",h:"y"}[t.orientation||"v"]}function e(t,n){var r=l(t),a=p(t,"box-violin");return a&&n===r&&t[r]===void 0&&t[r+"0"]===void 0}}}),Hx=ze({"src/plots/cartesian/category_order_defaults.js"(J,V){"use strict";var p=Ff().isTypedArraySpec;function b(E,k){var l=k.dataAttr||E._id.charAt(0),e={},t,n,r;if(k.axData)t=k.axData;else for(t=[],n=0;n0||p(n),a;r&&(a="array");var o=e("categoryorder",a),s;o==="array"&&(s=e("categoryarray")),!r&&o==="array"&&(o=l.categoryorder="trace"),o==="trace"?l._initialCategories=[]:o==="array"?l._initialCategories=s.slice():(s=b(l,t).sort(),o==="category ascending"?l._initialCategories=s:o==="category descending"&&(l._initialCategories=s.reverse()))}}}}),g1=ze({"src/plots/cartesian/line_grid_defaults.js"(J,V){"use strict";var p=Qn(),b=fc(),E=Nr();V.exports=function(l,e,t,n){n=n||{};var r=n.dfltColor;function a(x,z){return E.coerce2(l,e,n.attributes,x,z)}var o=a("linecolor",r),s=a("linewidth"),c=t("showline",n.showLine||!!o||!!s);c||(delete e.linecolor,delete e.linewidth);var m=p.mix(r,n.bgColor,n.blend||b.lightFraction),h=a("gridcolor",m),v=a("gridwidth"),g=a("griddash"),i=t("showgrid",n.showGrid||!!h||!!v||!!g);if(i||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),n.hasMinor){var w=p.mix(e.gridcolor,n.bgColor,67),S=a("minor.gridcolor",w),M=a("minor.gridwidth",e.gridwidth||1),C=a("minor.griddash",e.griddash||"solid"),_=t("minor.showgrid",!!S||!!M||!!C);_||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!n.noZeroLine){var T=a("zerolinelayer"),f=a("zerolinecolor",r),u=a("zerolinewidth"),A=t("zeroline",n.showGrid||!!f||!!u);A||(delete e.zerolinelayer,delete e.zerolinecolor,delete e.zerolinewidth)}}}}),y1=ze({"src/plots/cartesian/axis_defaults.js"(J,V){"use strict";var p=ao(),b=mi(),E=Nr(),k=hs(),l=Jf(),e=cf(),t=Uv(),n=Ym(),r=ov(),a=sv(),o=Hx(),s=g1(),c=Qw(),m=Dd(),h=hc().WEEKDAY_PATTERN,v=hc().HOUR_PATTERN;V.exports=function(M,C,_,T,f){var u=T.letter,A=T.font||{},x=T.splomStash||{},z=_("visible",!T.visibleDflt),I=C._template||{},O=C.type||I.type||"-",D;if(O==="date"){var B=b.getComponentMethod("calendars","handleDefaults");B(M,C,"calendar",T.calendar),T.noTicklabelmode||(D=_("ticklabelmode"))}!T.noTicklabelindex&&(O==="date"||O==="linear")&&_("ticklabelindex");var F="";(!T.noTicklabelposition||O==="multicategory")&&(F=E.coerce(M,C,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:D==="period"?["outside","inside"]:u==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),T.noTicklabeloverflow||_("ticklabeloverflow",F.indexOf("inside")!==-1?"hide past domain":O==="category"||O==="multicategory"?"allow":"hide past div"),m(C,f),c(M,C,_,T),o(M,C,_,T),T.noHover||(O!=="category"&&_("hoverformat"),T.noUnifiedhovertitle||_("unifiedhovertitle.text"));var P=_("color"),j=P!==e.color.dflt?P:A.color,U=x.label||f._dfltTitle[u];if(a(M,C,_,O,T),!z)return C;_("title.text",U),E.coerceFont(_,"title.font",A,{overrideDflt:{size:E.bigFont(A.size),color:j}}),t(M,C,_,O);var $=T.hasMinor;if($&&(k.newContainer(C,"minor"),t(M,C,_,O,{isMinor:!0})),r(M,C,_,O,T),n(M,C,_,T),$){var Q=T.isMinor;T.isMinor=!0,n(M,C,_,T),T.isMinor=Q}s(M,C,_,{dfltColor:P,bgColor:T.bgColor,showGrid:T.showGrid,hasMinor:$,attributes:e}),$&&C.ticklabelindex==null&&!C.minor.ticks&&!C.minor.showgrid&&delete C.minor,(C.showline||C.ticks)&&_("mirror");var re=O==="multicategory";if(!T.noTickson&&(O==="category"||re)&&(C.ticks||C.showgrid)&&(re?(_("tickson","boundaries"),delete C.ticklabelposition):_("tickson")),re){var ne=_("showdividers");ne&&(_("dividercolor"),_("dividerwidth"))}if(O==="date")if(l(M,C,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:g}),!C.rangebreaks.length)delete C.rangebreaks;else{for(var se=0;se=2){var u="",A,x;if(f.length===2){for(A=0;A<2;A++)if(x=w(f[A]),x){u=h;break}}var z=_("pattern",u);if(z===h)for(A=0;A<2;A++)x=w(f[A]),x&&(M.bounds[A]=f[A]=x-1);if(z)for(A=0;A<2;A++)switch(x=f[A],z){case h:if(!p(x)){M.enabled=!1;return}if(x=+x,x!==Math.floor(x)||x<0||x>=7){M.enabled=!1;return}M.bounds[A]=f[A]=x;break;case v:if(!p(x)){M.enabled=!1;return}if(x=+x,x<0||x>24){M.enabled=!1;return}M.bounds[A]=f[A]=x;break}if(C.autorange===!1){var I=C.range;if(I[0]I[1]){M.enabled=!1;return}}else if(f[0]>I[0]&&f[1]_[1]-1/4096&&(l.domain=m),b.noneOrAll(k.domain,l.domain,m),l.tickmode==="sync"&&(l.tickmode="auto")}return e("layer"),l}}}),RD=ze({"src/plots/cartesian/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=kh().isUnifiedHover,k=s5(),l=hs(),e=Gm(),t=cf(),n=E5(),r=y1(),a=Vv(),o=Wx(),s=Xl(),c=s.id2name,m=s.name2id,h=hc().AX_ID_PATTERN,v=mi(),g=v.traceIs,i=v.getComponentMethod;function w(S,M,C){Array.isArray(S[M])?S[M].push(C):S[M]=[C]}V.exports=function(M,C,_){var T=C.autotypenumbers,f={},u={},A={},x={},z={},I={},O={},D={},B={},F={},P,j;for(P=0;P<_.length;P++){var U=_[P];if(g(U,"cartesian")){var $;if(U.xaxis)$=c(U.xaxis),w(f,$,U);else if(U.xaxes)for(j=0;j rect").call(k.setTranslate,0,0).call(k.setScale,1,1),C.plot.call(k.setTranslate,_._offset,T._offset).call(k.setScale,1,1);var f=C.plot.selectAll(".scatterlayer .trace");f.selectAll(".point").call(k.setPointGroupScale,1,1),f.selectAll(".textpoint").call(k.setTextPointsScale,1,1),f.call(k.hideOutsideRangePoints,C)}function c(C,_){var T=C.plotinfo,f=T.xaxis,u=T.yaxis,A=f._length,x=u._length,z=!!C.xr1,I=!!C.yr1,O=[];if(z){var D=E.simpleMap(C.xr0,f.r2l),B=E.simpleMap(C.xr1,f.r2l),F=D[1]-D[0],P=B[1]-B[0];O[0]=(D[0]*(1-_)+_*B[0]-D[0])/(D[1]-D[0])*A,O[2]=A*(1-_+_*P/F),f.range[0]=f.l2r(D[0]*(1-_)+_*B[0]),f.range[1]=f.l2r(D[1]*(1-_)+_*B[1])}else O[0]=0,O[2]=A;if(I){var j=E.simpleMap(C.yr0,u.r2l),U=E.simpleMap(C.yr1,u.r2l),$=j[1]-j[0],Q=U[1]-U[0];O[1]=(j[1]*(1-_)+_*U[1]-j[1])/(j[0]-j[1])*x,O[3]=x*(1-_+_*Q/$),u.range[0]=f.l2r(j[0]*(1-_)+_*U[0]),u.range[1]=u.l2r(j[1]*(1-_)+_*U[1])}else O[1]=0,O[3]=x;l.drawOne(t,f,{skipTitle:!0}),l.drawOne(t,u,{skipTitle:!0}),l.redrawComponents(t,[f._id,u._id]);var re=z?A/O[2]:1,ne=I?x/O[3]:1,se=z?O[0]:0,G=I?O[1]:0,X=z?O[0]/O[2]*A:0,K=I?O[1]/O[3]*x:0,H=f._offset-X,Y=u._offset-K;T.clipRect.call(k.setTranslate,se,G).call(k.setScale,1/re,1/ne),T.plot.call(k.setTranslate,H,Y).call(k.setScale,re,ne),k.setPointGroupScale(T.zoomScalePts,1/re,1/ne),k.setTextPointsScale(T.zoomScaleTxt,1/re,1/ne)}var m;a&&(m=a());function h(){for(var C={},_=0;_r.duration?(h(),w=window.cancelAnimationFrame(M)):w=window.requestAnimationFrame(M)}return g=Date.now(),w=window.requestAnimationFrame(M),Promise.resolve()}}}),Du=ze({"src/plots/cartesian/index.js"(J){"use strict";var V=ci(),p=mi(),b=Nr(),E=cl(),k=$i(),l=zf().getModuleCalcData,e=Xl(),t=hc(),n=nd(),r=b.ensureSingle;function a(g,i,w){return b.ensureSingle(g,i,w,function(S){S.datum(w)})}var o=t.zindexSeparator;J.name="cartesian",J.attr=["xaxis","yaxis"],J.idRoot=["x","y"],J.idRegex=t.idRegex,J.attrRegex=t.attrRegex,J.attributes=PD(),J.layoutAttributes=cf(),J.supplyLayoutDefaults=RD(),J.transitionAxes=ID(),J.finalizeSubplots=function(g,i){var w=i._subplots,S=w.xaxis,M=w.yaxis,C=w.cartesian,_=C,T={},f={},u,A,x;for(u=0;u<_.length;u++){var z=_[u].split("y");T[z[0]]=1,f["y"+z[1]]=1}for(u=0;u0){var I=z.id;if(I.indexOf(o)!==-1)continue;I+=o+(u+1),z=b.extendFlat({},z,{id:I,plot:M._cartesianlayer.selectAll(".subplot").select("."+I)})}for(var O=[],D,B=0;B<_.length;B++){var F=_[B],P=F[0].trace;A===(P.zorder||0)&&P.xaxis+P.yaxis===x&&((i.indexOf(P.index)!==-1||P.carpet)&&(D&&D[0].trace.xaxis+D[0].trace.yaxis===x&&["tonextx","tonexty","tonext"].indexOf(P.fill)!==-1&&O.indexOf(D)===-1&&O.push(D),O.push(F)),D=F)}s(g,z,O,w,S)}}};function s(g,i,w,S,M){for(var C=t.traceLayerClasses,_=g._fullLayout,T=_._zindices,f=_._modules,u,A,x,z=[],I=[],O=0;O1&&($+=o+U),j.push(T+$),_=0;_1,x=i.mainplotinfo;if(!i.mainplot||A)if(u)i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.xaxislayer=r(S,"g","xaxislayer-above"),i.yaxislayer=r(S,"g","yaxislayer-above");else{if(!_){var z=r(S,"g","layer-subplot");i.shapelayer=r(z,"g","shapelayer"),i.imagelayer=r(z,"g","imagelayer"),x&&A?(i.minorGridlayer=x.minorGridlayer,i.gridlayer=x.gridlayer,i.zerolinelayer=x.zerolinelayer):(i.minorGridlayer=r(S,"g","minor-gridlayer"),i.gridlayer=r(S,"g","gridlayer"),i.zerolinelayer=r(S,"g","zerolinelayer"));var I=r(S,"g","layer-between");i.shapelayerBetween=r(I,"g","shapelayer"),i.imagelayerBetween=r(I,"g","imagelayer"),r(S,"path","xlines-below"),r(S,"path","ylines-below"),i.overlinesBelow=r(S,"g","overlines-below"),r(S,"g","xaxislayer-below"),r(S,"g","yaxislayer-below"),i.overaxesBelow=r(S,"g","overaxes-below")}i.overplot=r(S,"g","overplot"),i.plot=r(i.overplot,"g",M),x&&A?i.zerolinelayerAbove=x.zerolinelayerAbove:i.zerolinelayerAbove=r(S,"g","zerolinelayer-above"),_||(i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.overlinesAbove=r(S,"g","overlines-above"),r(S,"g","xaxislayer-above"),r(S,"g","yaxislayer-above"),i.overaxesAbove=r(S,"g","overaxes-above"),i.xlines=S.select(".xlines-"+T),i.ylines=S.select(".ylines-"+f),i.xaxislayer=S.select(".xaxislayer-"+T),i.yaxislayer=S.select(".yaxislayer-"+f))}else{var O=x.plotgroup,D=M+"-x",B=M+"-y";i.minorGridlayer=x.minorGridlayer,i.gridlayer=x.gridlayer,i.zerolinelayer=x.zerolinelayer,i.zerolinelayerAbove=x.zerolinelayerAbove,r(x.overlinesBelow,"path",D),r(x.overlinesBelow,"path",B),r(x.overaxesBelow,"g",D),r(x.overaxesBelow,"g",B),i.plot=r(x.overplot,"g",M),r(x.overlinesAbove,"path",D),r(x.overlinesAbove,"path",B),r(x.overaxesAbove,"g",D),r(x.overaxesAbove,"g",B),i.xlines=O.select(".overlines-"+T).select("."+D),i.ylines=O.select(".overlines-"+f).select("."+B),i.xaxislayer=O.select(".overaxes-"+T).select("."+D),i.yaxislayer=O.select(".overaxes-"+f).select("."+B)}_||(u||(a(i.minorGridlayer,"g",i.xaxis._id),a(i.minorGridlayer,"g",i.yaxis._id),i.minorGridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort),a(i.gridlayer,"g",i.xaxis._id),a(i.gridlayer,"g",i.yaxis._id),i.gridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort)),i.xlines.style("fill","none").classed("crisp",!0),i.ylines.style("fill","none").classed("crisp",!0))}function h(g,i){if(g){var w={};g.each(function(f){var u=f[0],A=V.select(this);A.remove(),v(u,i),w[u]=!0});for(var S in i._plots)for(var M=i._plots[S],C=M.overlays||[],_=0;_=0,i=a.indexOf("end")>=0,w=c.backoff*h+o.standoff,S=m.backoff*v+o.startstandoff,M,C,_,T;if(s.nodeName==="line"){M={x:+r.attr("x1"),y:+r.attr("y1")},C={x:+r.attr("x2"),y:+r.attr("y2")};var f=M.x-C.x,u=M.y-C.y;if(_=Math.atan2(u,f),T=_+Math.PI,w&&S&&w+S>Math.sqrt(f*f+u*u)){$();return}if(w){if(w*w>f*f+u*u){$();return}var A=w*Math.cos(_),x=w*Math.sin(_);C.x+=A,C.y+=x,r.attr({x2:C.x,y2:C.y})}if(S){if(S*S>f*f+u*u){$();return}var z=S*Math.cos(_),I=S*Math.sin(_);M.x-=z,M.y-=I,r.attr({x1:M.x,y1:M.y})}}else if(s.nodeName==="path"){var O=s.getTotalLength(),D="";if(O2/3?cr="right":cr="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[cr]}for(var Be=!1,Xe=["x","y"],Ye=0;Ye1)&&(Tt===gt?(et=At.r2fraction(S["a"+yt]),(et<0||et>1)&&(Be=!0)):Be=!0),ht=At._offset+At.r2p(S[yt]),We=.5}else{var Mt=Je==="domain";yt==="x"?(Ne=S[yt],ht=Mt?At._offset+At._length*Ne:ht=u.l+u.w*Ne):(Ne=1-S[yt],ht=Mt?At._offset+At._length*Ne:ht=u.t+u.h*Ne),We=S.showarrow?.5:Ne}if(S.showarrow){vt.head=ht;var pt=S["a"+yt];if(Ke=rr*Ae(.5,S.xanchor)-_r*Ae(.5,S.yanchor),Tt===gt){var Pt=e.getRefType(Tt);Pt==="domain"?(yt==="y"&&(pt=1-pt),vt.tail=At._offset+At._length*pt):Pt==="paper"?yt==="y"?(pt=1-pt,vt.tail=u.t+u.h*pt):vt.tail=u.l+u.w*pt:vt.tail=At._offset+At.r2p(pt),De=Ke}else vt.tail=ht+pt,De=Ke+pt;vt.text=vt.tail+Ke;var Ct=f[yt==="x"?"width":"height"];if(gt==="paper"&&(vt.head=k.constrain(vt.head,1,Ct-1)),Tt==="pixel"){var qt=-Math.max(vt.tail-3,vt.text),Vt=Math.min(vt.tail+3,vt.text)-Ct;qt>0?(vt.tail+=qt,vt.text+=qt):Vt>0&&(vt.tail-=Vt,vt.text-=Vt)}vt.tail+=Ot,vt.head+=Ot}else Ke=Xt*Ae(We,or),De=Ke,vt.text=ht+Ke;vt.text+=Ot,Ke+=Ot,De+=Ot,S["_"+yt+"padplus"]=Xt/2+De,S["_"+yt+"padminus"]=Xt/2-De,S["_"+yt+"size"]=Xt,S["_"+yt+"shift"]=Ke}if(Be){se.remove();return}var Ht=0,Sr=0;if(S.align!=="left"&&(Ht=(_e-Ge)*(S.align==="center"?.5:1)),S.valign!=="top"&&(Sr=(ce-ke)*(S.valign==="middle"?.5:1)),Ie)Se.select("svg").attr({x:K+Ht-1,y:K+Sr}).call(n.setClipUrl,Y?F:null,w);else{var Kr=K+Sr-Ve.top,Yt=K+Ht-Ve.left;ae.call(a.positionText,Yt,Kr).call(n.setClipUrl,Y?F:null,w)}q.select("rect").call(n.setRect,K,K,_e,ce),H.call(n.setRect,G/2,G/2,ve-G,le-G),se.call(n.setTranslate,Math.round(P.x.text-ve/2),Math.round(P.y.text-le/2)),$.attr({transform:"rotate("+j+","+P.x.text+","+P.y.text+")"});var Rt=function(ur,cr){U.selectAll(".annotation-arrow-g").remove();var Rr=P.x.head,Qr=P.y.head,Zr=P.x.tail+ur,ha=P.y.tail+cr,Pa=P.x.text+ur,La=P.y.text+cr,un=k.rotationXYMatrix(j,Pa,La),Xa=k.apply2DTransform(un),ja=k.apply2DTransform2(un),Nn=+H.attr("width"),yn=+H.attr("height"),Un=Pa-.5*Nn,li=Un+Nn,Yn=La-.5*yn,on=Yn+yn,en=[[Un,Yn,Un,on],[Un,on,li,on],[li,on,li,Yn],[li,Yn,Un,Yn]].map(ja);if(!en.reduce(function(ot,kt){return ot^!!k.segmentsIntersect(Rr,Qr,Rr+1e6,Qr+1e6,kt[0],kt[1],kt[2],kt[3])},!1)){en.forEach(function(ot){var kt=k.segmentsIntersect(Zr,ha,Rr,Qr,ot[0],ot[1],ot[2],ot[3]);kt&&(Zr=kt.x,ha=kt.y)});var vi=S.arrowwidth,Yi=S.arrowcolor,Ja=S.arrowside,Oa=U.append("g").style({opacity:t.opacity(Yi)}).classed("annotation-arrow-g",!0),lt=Oa.append("path").attr("d","M"+Zr+","+ha+"L"+Rr+","+Qr).style("stroke-width",vi+"px").call(t.stroke,t.rgb(Yi));if(m(lt,Ja,S),A.annotationPosition&<.node().parentNode&&!C){var rt=Rr,fr=Qr;if(S.standoff){var lr=Math.sqrt(Math.pow(Rr-Zr,2)+Math.pow(Qr-ha,2));rt+=S.standoff*(Zr-Rr)/lr,fr+=S.standoff*(ha-Qr)/lr}var Tr=Oa.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Zr-rt)+","+(ha-fr),transform:l(rt,fr)}).style("stroke-width",vi+6+"px").call(t.stroke,"rgba(0,0,0,0)").call(t.fill,"rgba(0,0,0,0)"),Ir,Dr;s.init({element:Tr.node(),gd:w,prepFn:function(){var ot=n.getTranslate(se);Ir=ot.x,Dr=ot.y,_&&_.autorange&&O(_._name+".autorange",!0),T&&T.autorange&&O(T._name+".autorange",!0)},moveFn:function(ot,kt){var jt=Xa(Ir,Dr),ar=jt[0]+ot,Er=jt[1]+kt;se.call(n.setTranslate,ar,Er),D("x",g(_,ot,"x",u,S)),D("y",g(T,kt,"y",u,S)),S.axref===S.xref&&D("ax",g(_,ot,"ax",u,S)),S.ayref===S.yref&&D("ay",g(T,kt,"ay",u,S)),Oa.attr("transform",l(ot,kt)),$.attr({transform:"rotate("+j+","+ar+","+Er+")"})},doneFn:function(){b.call("_guiRelayout",w,B());var ot=document.querySelector(".js-notes-box-panel");ot&&ot.redraw(ot.selectedObj)}})}}};if(S.showarrow&&Rt(0,0),Q){var nr;s.init({element:se.node(),gd:w,prepFn:function(){nr=$.attr("transform")},moveFn:function(ur,cr){var Rr="pointer";if(S.showarrow)S.axref===S.xref?D("ax",g(_,ur,"ax",u,S)):D("ax",S.ax+ur),S.ayref===S.yref?D("ay",g(T,cr,"ay",u.w,S)):D("ay",S.ay+cr),Rt(ur,cr);else{if(C)return;var Qr,Zr;if(_)Qr=g(_,ur,"x",u,S);else{var ha=S._xsize/u.w,Pa=S.x+(S._xshift-S.xshift)/u.w-ha/2;Qr=s.align(Pa+ur/u.w,ha,0,1,S.xanchor)}if(T)Zr=g(T,cr,"y",u,S);else{var La=S._ysize/u.h,un=S.y-(S._yshift+S.yshift)/u.h-La/2;Zr=s.align(un-cr/u.h,La,0,1,S.yanchor)}D("x",Qr),D("y",Zr),(!_||!T)&&(Rr=s.getCursor(_?.5:Qr,T?.5:Zr,S.xanchor,S.yanchor))}$.attr({transform:l(ur,cr)+nr}),o(se,Rr)},clickFn:function(ur,cr){S.captureevents&&w.emit("plotly_clickannotation",ne(cr))},doneFn:function(){o(se),b.call("_guiRelayout",w,B());var ur=document.querySelector(".js-notes-box-panel");ur&&ur.redraw(ur.selectedObj)}})}}A.annotationText?ae.call(a.makeEditable,{delegate:se,gd:w}).call(he).on("edit",function(we){S.text=we,this.call(he),D("text",we),_&&_.autorange&&O(_._name+".autorange",!0),T&&T.autorange&&O(T._name+".autorange",!0),b.call("_guiRelayout",w,B())}):ae.call(he)}}}),zD=ze({"src/components/annotations/click.js"(J,V){"use strict";var p=Nr(),b=mi(),E=hs().arrayEditor;V.exports={hasClickToShow:k,onClick:l};function k(n,r){var a=e(n,r);return a.on.length>0||a.explicitOff.length>0}function l(n,r){var a=e(n,r),o=a.on,s=a.off.concat(a.explicitOff),c={},m=n._fullLayout.annotations,h,v;if(o.length||s.length){for(h=0;h1){o=!0;break}}o?l.fullLayout._infolayer.select(".annotation-"+l.id+'[data-index="'+r+'"]').remove():(a._pdata=b(l.glplot.cameraParams,[e.xaxis.r2l(a.x)*t[0],e.yaxis.r2l(a.y)*t[1],e.zaxis.r2l(a.z)*t[2]]),p(l.graphDiv,a,r,l.id,a._xa,a._ya))}}}}),GD=ze({"src/components/annotations3d/index.js"(J,V){"use strict";var p=mi(),b=Nr();V.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:Xx()}}},layoutAttributes:Xx(),handleDefaults:UD(),includeBasePlot:E,convert:qD(),draw:VD()};function E(k,l){var e=p.subplotsRegistry.gl3d;if(e)for(var t=e.attrRegex,n=Object.keys(k),r=0;r{var x=A+"anchor",z=A==="x"?w:S,I={_fullLayout:a},O,D,B,F;let P=A+"ref",j=n[P];if(Array.isArray(j)&&j.length>0){let U=l.countDefiningCoords(v,m,A);F=b.coerceRefArray(n,r,I,A,void 0,"paper",U),r["_"+A+"refArray"]=!0}else F=b.coerceRef(n,r,I,A,void 0,"paper");if(Array.isArray(F))F.forEach(function(U){b.getRefType(U)==="range"&&(O=b.getFromId(I,U),O&&O._shapeIndices.indexOf(r._index)===-1&&O._shapeIndices.push(r._index))}),g&&[0,1].forEach(function(U){let $=F[U];b.getRefType($)==="range"?(O=b.getFromId(I,$),D=l.shapePositionToRange(O),B=l.rangeToShapePosition(O),(O.type==="category"||O.type==="multicategory")&&o(A+U+"shift")):D=B=p.identity;let re=A+U,ne=n[re];if(n[re]=D(n[re],!0),z==="pixel"?o(re,C[U]):b.coercePosition(r,I,o,$,re,M[U]),r[re]=B(r[re]),n[re]=ne,U===0&&z==="pixel"){let se=n[x];n[x]=D(n[x],!0),b.coercePosition(r,I,o,$,x,.25),r[x]=B(r[x]),n[x]=se}});else{if(b.getRefType(F)==="range"?(O=b.getFromId(I,F),O._shapeIndices.push(r._index),B=l.rangeToShapePosition(O),D=l.shapePositionToRange(O),g&&(O.type==="category"||O.type==="multicategory")&&(o(A+"0shift"),o(A+"1shift"))):D=B=p.identity,g){let $=A+"0",Q=A+"1",re=n[$],ne=n[Q];n[$]=D(n[$],!0),n[Q]=D(n[Q],!0),z==="pixel"?(o($,C[0]),o(Q,C[1])):(b.coercePosition(r,I,o,F,$,M[0]),b.coercePosition(r,I,o,F,Q,M[1])),r[$]=B(r[$]),r[Q]=B(r[Q]),n[$]=re,n[Q]=ne}if(z==="pixel"){let $=n[x];n[x]=D(n[x],!0),b.coercePosition(r,I,o,F,x,.25),r[x]=B(r[x]),n[x]=$}}}),g&&p.noneOrAll(n,r,["x0","x1","y0","y1"]);var _=v==="line",T,f;if(g&&(T=o("label.texttemplate"),o("label.texttemplatefallback")),T||(f=o("label.text")),f||T){o("label.textangle");var u=o("label.textposition",_?"middle":"middle center");o("label.xanchor"),o("label.yanchor",e(_,u)),o("label.padding"),p.coerceFont(o,"label.font",a.font)}}}}),WD=ze({"src/components/shapes/draw_newshape/defaults.js"(J,V){"use strict";var p=Qn(),b=Nr();function E(k,l){return k?"bottom":l.indexOf("top")!==-1?"top":l.indexOf("bottom")!==-1?"bottom":"middle"}V.exports=function(l,e,t){t("newshape.visible"),t("newshape.name"),t("newshape.showlegend"),t("newshape.legend"),t("newshape.legendwidth"),t("newshape.legendgroup"),t("newshape.legendgrouptitle.text"),b.coerceFont(t,"newshape.legendgrouptitle.font"),t("newshape.legendrank"),t("newshape.drawdirection"),t("newshape.layer"),t("newshape.fillcolor"),t("newshape.fillrule"),t("newshape.opacity");var n=t("newshape.line.width");if(n){var r=(l||{}).plot_bgcolor||"#FFF";t("newshape.line.color",p.contrast(r)),t("newshape.line.dash")}var a=l.dragmode==="drawline",o=t("newshape.label.text"),s=t("newshape.label.texttemplate");if(t("newshape.label.texttemplatefallback"),o||s){t("newshape.label.textangle");var c=t("newshape.label.textposition",a?"middle":"middle center");t("newshape.label.xanchor"),t("newshape.label.yanchor",E(a,c)),t("newshape.label.padding"),b.coerceFont(t,"newshape.label.font",e.font)}t("activeshape.fillcolor"),t("activeshape.opacity")}}}),YD=ze({"src/components/shapes/calc_autorange.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=h1(),k=cv();V.exports=function(o){var s=o._fullLayout,c=p.filterVisible(s.shapes);if(!(!c.length||!o._fullData.length))for(var m=0;m{v=b.getFromId(o,M),h._extremes[v._id]=b.findExtremes(v,C,e(h))})}else h.xref!=="paper"&&i!=="domain"&&(v=b.getFromId(o,h.xref),g=r(v,h,E.paramIsX),g&&(h._extremes[v._id]=b.findExtremes(v,g,e(h))));if(w==="array"){let S=l(o,h,"y");Object.entries(S).forEach(([M,C])=>{v=b.getFromId(o,M),h._extremes[v._id]=b.findExtremes(v,C,t(h))})}else h.yref!=="paper"&&w!=="domain"&&(v=b.getFromId(o,h.yref),g=r(v,h,E.paramIsY),g&&(h._extremes[v._id]=b.findExtremes(v,g,t(h))))}};function l(a,o,s){let c=o[s+"ref"],m=s==="x"?E.paramIsX:E.paramIsY;function h(M,C){M==="paper"||b.getRefType(M)==="domain"||(v[M]||(v[M]=[]),v[M].push(C))}let v={};if(o.type==="path"&&o.path){let M=o.path.match(E.segmentRE)||[];for(var g=0,i=0;iT&&(h(c[g],f[T]),g++)}}else h(c[0],o[s+"0"]),h(c[1],o[s+"1"]);let w={};for(let M in v){let C=b.getFromId(a,M);if(C){var S=C.type==="category"||C.type==="multicategory"?C.r2c:C.d2c;C.type==="date"&&(S=k.decodeDate(S)),w[C._id]=v[M].map(S)}}return w}function e(a){return n(a.line.width,a.xsizemode,a.x0,a.x1,a.path,!1)}function t(a){return n(a.line.width,a.ysizemode,a.y0,a.y1,a.path,!0)}function n(a,o,s,c,m,h){var v=a/2,g=h;if(o==="pixel"){var i=m?k.extractPathCoords(m,h?E.paramIsY:E.paramIsX):[s,c],w=p.aggNums(Math.max,null,i),S=p.aggNums(Math.min,null,i),M=S<0?Math.abs(S)+v:v,C=w>0?w+v:v;return{ppad:v,ppadplus:g?M:C,ppadminus:g?C:M}}else return{ppad:v}}function r(a,o,s){var c=a._id.charAt(0)==="x"?"x":"y",m=a.type==="category"||a.type==="multicategory",h,v,g=0,i=0,w=m?a.r2c:a.d2c,S=o[c+"sizemode"]==="scaled";if(S?(h=o[c+"0"],v=o[c+"1"],m&&(g=o[c+"0shift"],i=o[c+"1shift"])):(h=o[c+"anchor"],v=o[c+"anchor"]),h!==void 0)return[w(h)+g,w(v)+i];if(o.path){var M=1/0,C=-1/0,_=o.path.match(E.segmentRE),T,f,u,A,x;for(a.type==="date"&&(w=k.decodeDate(w)),T=0;T<_.length;T++)f=_[T],u=s[f.charAt(0)].drawn,u!==void 0&&(A=_[T].slice(1).match(E.paramRE),!(!A||A.lengthC&&(C=x)));if(C>=M)return[M,C]}}}}),XD=ze({"src/components/shapes/index.js"(J,V){"use strict";var p=Ox();V.exports={moduleType:"component",name:"shapes",layoutAttributes:L5(),supplyLayoutDefaults:HD(),supplyDrawNewShapeDefaults:WD(),includeBasePlot:m1()("shapes"),calcAutorange:YD(),draw:p.draw,drawOne:p.drawOne}}}),P5=ze({"src/components/images/attributes.js"(J,V){"use strict";var p=hc(),b=hs().templatedArray,E=v1();V.exports=b("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",p.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",p.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),ZD=ze({"src/components/images/defaults.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=Jf(),k=P5(),l="images";V.exports=function(n,r){var a={name:l,handleItemDefaults:e};E(n,r,a)};function e(t,n,r){function a(w,S){return p.coerce(t,n,k,w,S)}var o=a("source"),s=a("visible",!!o);if(!s)return n;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var c={_fullLayout:r},m=["x","y"],h=0;h<2;h++){var v=m[h],g=b.coerceRef(t,n,c,v,"paper",void 0);if(g!=="paper"){var i=b.getFromId(c,g);i._imgIndices.push(n._index)}b.coercePosition(n,c,a,g,v,0)}return n}}}),$D=ze({"src/components/images/draw.js"(J,V){"use strict";var p=ci(),b=$i(),E=Gi(),k=Xl(),l=nd();V.exports=function(t){var n=t._fullLayout,r=[],a={},o=[],s,c;for(c=0;c0);m&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),p.noneOrAll(r,a,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),p.coerceFont(s,"font",o.font),s("bgcolor",o.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function n(r,a){function o(c,m){return p.coerce(r,a,e,c,m)}var s=o("visible",r.method==="skip"||Array.isArray(r.args));s&&(o("method"),o("args"),o("args2"),o("label"),o("execute"))}}}),eF=ze({"src/components/updatemenus/scrollbox.js"(J,V){"use strict";V.exports=l;var p=ci(),b=Qn(),E=$i(),k=Nr();function l(e,t,n){this.gd=e,this.container=t,this.id=n,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}l.barWidth=2,l.barLength=20,l.barRadius=2,l.barPad=1,l.barColor="#808BA4",l.prototype.enable=function(t,n,r){var a=this.gd._fullLayout,o=a.width,s=a.height;this.position=t;var c=this.position.l,m=this.position.w,h=this.position.t,v=this.position.h,g=this.position.direction,i=g==="down",w=g==="left",S=g==="right",M=g==="up",C=m,_=v,T,f,u,A;!i&&!w&&!S&&!M&&(this.position.direction="down",i=!0);var x=i||M;x?(T=c,f=T+C,i?(u=h,A=Math.min(u+_,s),_=A-u):(A=h+_,u=Math.max(A-_,0),_=A-u)):(u=h,A=u+_,w?(f=c+C,T=Math.max(f-C,0),C=f-T):(T=c,f=Math.min(T+C,o),C=f-T)),this._box={l:T,t:u,w:C,h:_};var z=m>C,I=l.barLength+2*l.barPad,O=l.barWidth+2*l.barPad,D=c,B=h+v;B+O>s&&(B=s-O);var F=this.container.selectAll("rect.scrollbar-horizontal").data(z?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-horizontal",!0).call(b.fill,l.barColor),z?(this.hbar=F.attr({rx:l.barRadius,ry:l.barRadius,x:D,y:B,width:I,height:O}),this._hbarXMin=D+I/2,this._hbarTranslateMax=C-I):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var P=v>_,j=l.barWidth+2*l.barPad,U=l.barLength+2*l.barPad,$=c+m,Q=h;$+j>o&&($=o-j);var re=this.container.selectAll("rect.scrollbar-vertical").data(P?[0]:[]);re.exit().on(".drag",null).remove(),re.enter().append("rect").classed("scrollbar-vertical",!0).call(b.fill,l.barColor),P?(this.vbar=re.attr({rx:l.barRadius,ry:l.barRadius,x:$,y:Q,width:j,height:U}),this._vbarYMin=Q+U/2,this._vbarTranslateMax=_-U):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ne=this.id,se=T-.5,G=P?f+j+.5:f+.5,X=u-.5,K=z?A+O+.5:A+.5,H=a._topdefs.selectAll("#"+ne).data(z||P?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",ne).append("rect"),z||P?(this._clipRect=H.select("rect").attr({x:Math.floor(se),y:Math.floor(X),width:Math.ceil(G)-Math.floor(se),height:Math.ceil(K)-Math.floor(X)}),this.container.call(E.setClipUrl,ne,this.gd),this.bg.attr({x:c,y:h,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.setClipUrl,null),delete this._clipRect),z||P){var Y=p.behavior.drag().on("dragstart",function(){p.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Y);var q=p.behavior.drag().on("dragstart",function(){p.event.sourceEvent.preventDefault(),p.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));z&&this.hbar.on(".drag",null).call(q),P&&this.vbar.on(".drag",null).call(q)}this.setTranslate(n,r)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},l.prototype._onBoxDrag=function(){var t=this.translateX,n=this.translateY;this.hbar&&(t-=p.event.dx),this.vbar&&(n-=p.event.dy),this.setTranslate(t,n)},l.prototype._onBoxWheel=function(){var t=this.translateX,n=this.translateY;this.hbar&&(t+=p.event.deltaY),this.vbar&&(n+=p.event.deltaY),this.setTranslate(t,n)},l.prototype._onBarDrag=function(){var t=this.translateX,n=this.translateY;if(this.hbar){var r=t+this._hbarXMin,a=r+this._hbarTranslateMax,o=k.constrain(p.event.x,r,a),s=(o-r)/(a-r),c=this.position.w-this._box.w;t=s*c}if(this.vbar){var m=n+this._vbarYMin,h=m+this._vbarTranslateMax,v=k.constrain(p.event.y,m,h),g=(v-m)/(h-m),i=this.position.h-this._box.h;n=g*i}this.setTranslate(t,n)},l.prototype.setTranslate=function(t,n){var r=this.position.w-this._box.w,a=this.position.h-this._box.h;if(t=k.constrain(t||0,0,r),n=k.constrain(n||0,0,a),this.translateX=t,this.translateY=n,this.container.call(E.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-n),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+n-.5)}),this.hbar){var o=t/r;this.hbar.call(E.setTranslate,t+o*this._hbarTranslateMax,n)}if(this.vbar){var s=n/a;this.vbar.call(E.setTranslate,t,n+s*this._vbarTranslateMax)}}}}),tF=ze({"src/components/updatemenus/draw.js"(J,V){"use strict";var p=ci(),b=cl(),E=Qn(),k=$i(),l=Nr(),e=Cs(),t=hs().arrayEditor,n=dc().LINE_SPACING,r=Zx(),a=eF();V.exports=function(I){var O=I._fullLayout,D=l.filterVisible(O[r.name]);function B(ne){b.autoMargin(I,u(ne))}var F=O._menulayer.selectAll("g."+r.containerClassName).data(D.length>0?[0]:[]);if(F.enter().append("g").classed(r.containerClassName,!0).style("cursor","pointer"),F.exit().each(function(){p.select(this).selectAll("g."+r.headerGroupClassName).each(B)}).remove(),D.length!==0){var P=F.selectAll("g."+r.headerGroupClassName).data(D,o);P.enter().append("g").classed(r.headerGroupClassName,!0);for(var j=l.ensureSingle(F,"g",r.dropdownButtonGroupClassName,function(ne){ne.style("pointer-events","all")}),U=0;U0?[0]:[]);$.enter().append("g").classed(r.containerClassName,!0).style("cursor",P?null:"ew-resize");function Q(G){G._commandObserver&&(G._commandObserver.remove(),delete G._commandObserver),b.autoMargin(F,m(G))}if($.exit().each(function(){p.select(this).selectAll("g."+r.groupClassName).each(Q)}).remove(),U.length!==0){var re=$.selectAll("g."+r.groupClassName).data(U,v);re.enter().append("g").classed(r.groupClassName,!0),re.exit().each(Q).remove();for(var ne=0;ne0&&(re=re.transition().duration(F.transition.duration).ease(F.transition.easing)),re.attr("transform",e(Q-r.gripWidth*.5,F._dims.currentValueTotalHeight))}}function z(B,F){var P=B._dims;return P.inputAreaStart+r.stepInset+(P.inputAreaLength-2*r.stepInset)*Math.min(1,Math.max(0,F))}function I(B,F){var P=B._dims;return Math.min(1,Math.max(0,(F-r.stepInset-P.inputAreaStart)/(P.inputAreaLength-2*r.stepInset-2*P.inputAreaStart)))}function O(B,F,P){var j=P._dims,U=l.ensureSingle(B,"rect",r.railTouchRectClass,function($){$.call(f,F,B,P).style("pointer-events","all")});U.attr({width:j.inputAreaLength,height:Math.max(j.inputAreaWidth,r.tickOffset+P.ticklen+j.labelHeight)}).call(E.fill,P.bgcolor).attr("opacity",0),k.setTranslate(U,0,j.currentValueTotalHeight)}function D(B,F){var P=F._dims,j=P.inputAreaLength-r.railInset*2,U=l.ensureSingle(B,"rect",r.railRectClass);U.attr({width:j,height:r.railWidth,rx:r.railRadius,ry:r.railRadius,"shape-rendering":"crispEdges"}).call(E.stroke,F.bordercolor).call(E.fill,F.bgcolor).style("stroke-width",F.borderwidth+"px"),k.setTranslate(U,r.railInset,(P.inputAreaWidth-r.railWidth)*.5+P.currentValueTotalHeight)}}}),iF=ze({"src/components/sliders/index.js"(J,V){"use strict";var p=_1();V.exports={moduleType:"component",name:p.name,layoutAttributes:I5(),supplyLayoutDefaults:aF(),draw:nF()}}}),$x=ze({"src/components/rangeslider/attributes.js"(J,V){"use strict";var p=fc();V.exports={bgcolor:{valType:"color",dflt:p.background,editType:"plot"},bordercolor:{valType:"color",dflt:p.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}}}),D5=ze({"src/components/rangeslider/oppaxis_attributes.js"(J,V){"use strict";V.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}}}),Kx=ze({"src/components/rangeslider/constants.js"(J,V){"use strict";V.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}}}),oF=ze({"src/components/rangeslider/helpers.js"(J){"use strict";var V=Xl(),p=Cs(),b=Kx(),E=dc().LINE_SPACING,k=b.name;function l(e){var t=e&&e[k];return t&&t.visible}J.isVisible=l,J.makeData=function(e){for(var t=V.list({_fullLayout:e},"x",!0),n=e.margin,r=[],a=0;a=Ge.max)Ie=he[Ve+1];else if(Se=Ge.pmax)Ie=he[Ve+1];else if(Se0?f.touches[0].clientX:0}function h(f,u,A,x){if(u._context.staticPlot)return;var z=f.select("rect."+c.slideBoxClassName).node(),I=f.select("rect."+c.grabAreaMinClassName).node(),O=f.select("rect."+c.grabAreaMaxClassName).node();function D(){var B=p.event,F=B.target,P=m(B),j=P-f.node().getBoundingClientRect().left,U=x.d2p(A._rl[0]),$=x.d2p(A._rl[1]),Q=o.coverSlip();this.addEventListener("touchmove",re),this.addEventListener("touchend",ne),Q.addEventListener("mousemove",re),Q.addEventListener("mouseup",ne);function re(se){var G=m(se),X=+G-P,K,H,Y;switch(F){case z:if(Y="ew-resize",U+X>A._length||$+X<0)return;K=U+X,H=$+X;break;case I:if(Y="col-resize",U+X>A._length)return;K=U+X,H=$;break;case O:if(Y="col-resize",$+X<0)return;K=U,H=$+X;break;default:Y="ew-resize",K=j,H=j+X;break}if(H0);if(w){var S=n(o,s,c);g("x",S[0]),g("y",S[1]),p.noneOrAll(a,o,["x","y"]),g("xanchor"),g("yanchor"),p.coerceFont(g,"font",s.font);var M=g("bgcolor");g("activecolor",b.contrast(M,e.lightAmount,e.darkAmount)),g("bordercolor"),g("borderwidth")}};function t(r,a,o,s){var c=s.calendar;function m(g,i){return p.coerce(r,a,l.buttons,g,i)}var h=m("visible");if(h){var v=m("step");v!=="all"&&(c&&c!=="gregorian"&&(v==="month"||v==="year")?a.stepmode="backward":m("stepmode"),m("count")),m("label")}}function n(r,a,o){for(var s=o.filter(function(v){return a[v].anchor===r._id}),c=0,m=0;m1)){delete c.grid;return}if(!g&&!i&&!w){var A=T("pattern")==="independent";A&&(g=!0)}_._hasSubplotGrid=g;var x=T("roworder"),z=x==="top to bottom",I=g?.2:.1,O=g?.3:.1,D,B;S&&c._splomGridDflt&&(D=c._splomGridDflt.xside,B=c._splomGridDflt.yside),_._domains={x:r("x",T,I,D,u),y:r("y",T,O,B,f,z)}}function r(s,c,m,h,v,g){var i=c(s+"gap",m),w=c("domain."+s);c(s+"side",h);for(var S=new Array(v),M=w[0],C=(w[1]-M)/(v-i),_=C*(1-i),T=0;T0,h=t._context.staticPlot;n.each(function(v){var g=v[0].trace,i=g.error_x||{},w=g.error_y||{},S;g.ids&&(S=function(T){return T.id});var M=k.hasMarkers(g)&&g.marker.maxdisplayed>0;!w.visible&&!i.visible&&(v=[]);var C=p.select(this).selectAll("g.errorbar").data(v,S);if(C.exit().remove(),!!v.length){i.visible||C.selectAll("path.xerror").remove(),w.visible||C.selectAll("path.yerror").remove(),C.style("opacity",1);var _=C.enter().append("g").classed("errorbar",!0);m&&_.style("opacity",0).transition().duration(a.duration).style("opacity",1),E.setClipUrl(C,r.layerClipId,t),C.each(function(T){var f=p.select(this),u=l(T,s,c);if(!(M&&!T.vis)){var A,x=f.select("path.yerror");if(w.visible&&b(u.x)&&b(u.yh)&&b(u.ys)){var z=w.width;A="M"+(u.x-z)+","+u.yh+"h"+2*z+"m-"+z+",0V"+u.ys,u.noYS||(A+="m-"+z+",0h"+2*z),o=!x.size(),o?x=f.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0):m&&(x=x.transition().duration(a.duration).ease(a.easing)),x.attr("d",A)}else x.remove();var I=f.select("path.xerror");if(i.visible&&b(u.y)&&b(u.xh)&&b(u.xs)){var O=(i.copy_ystyle?w:i).width;A="M"+u.xh+","+(u.y-O)+"v"+2*O+"m0,-"+O+"H"+u.xs,u.noXS||(A+="m0,-"+O+"v"+2*O),o=!I.size(),o?I=f.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0):m&&(I=I.transition().duration(a.duration).ease(a.easing)),I.attr("d",A)}else I.remove()}})}})};function l(e,t,n){var r={x:t.c2p(e.x),y:n.c2p(e.y)};return e.yh!==void 0&&(r.yh=n.c2p(e.yh),r.ys=n.c2p(e.ys),b(r.ys)||(r.noYS=!0,r.ys=n.c2p(e.ys,!0))),e.xh!==void 0&&(r.xh=t.c2p(e.xh),r.xs=t.c2p(e.xs),b(r.xs)||(r.noXS=!0,r.xs=t.c2p(e.xs,!0))),r}}}),yF=ze({"src/components/errorbars/style.js"(J,V){"use strict";var p=ci(),b=Qn();V.exports=function(k){k.each(function(l){var e=l[0].trace,t=e.error_y||{},n=e.error_x||{},r=p.select(this);r.selectAll("path.yerror").style("stroke-width",t.thickness+"px").call(b.stroke,t.color),n.copy_ystyle&&(n=t),r.selectAll("path.xerror").style("stroke-width",n.thickness+"px").call(b.stroke,n.color)})}}}),_F=ze({"src/components/errorbars/index.js"(J,V){"use strict";var p=Nr(),b=Al().overrideAll,E=B5(),k={error_x:p.extendFlat({},E),error_y:p.extendFlat({},E)};delete k.error_x.copy_zstyle,delete k.error_y.copy_zstyle,delete k.error_y.copy_ystyle;var l={error_x:p.extendFlat({},E),error_y:p.extendFlat({},E),error_z:p.extendFlat({},E)};delete l.error_x.copy_ystyle,delete l.error_y.copy_ystyle,delete l.error_z.copy_ystyle,delete l.error_z.copy_zstyle,V.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:k,bar:k,histogram:k,scatter3d:b(l,"calc","nested"),scattergl:b(k,"calc","nested")}},supplyDefaults:vF(),calc:mF(),makeComputeError:O5(),plot:gF(),style:yF(),hoverInfo:e};function e(t,n,r){(n.error_y||{}).visible&&(r.yerr=t.yh-t.y,n.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(n.error_x||{}).visible&&(r.xerr=t.xh-t.x,n.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}}),xF=ze({"src/components/colorbar/constants.js"(J,V){"use strict";V.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}}),bF=ze({"src/components/colorbar/draw.js"(J,V){"use strict";var p=ci(),b=cl(),E=mi(),k=Gi(),l=_h(),e=Nr(),t=e.strTranslate,n=Ki().extendFlat,r=gd(),a=$i(),o=Qn(),s=qv(),c=Cs(),m=Bf().flipScale,h=y1(),v=Wx(),g=cf(),i=dc(),w=i.LINE_SPACING,S=i.FROM_TL,M=i.FROM_BR,C=xF().cn;function _(O){var D=O._fullLayout,B=D._infolayer.selectAll("g."+C.colorbar).data(T(O),function(F){return F._id});B.enter().append("g").attr("class",function(F){return F._id}).classed(C.colorbar,!0),B.each(function(F){var P=p.select(this);e.ensureSingle(P,"rect",C.cbbg),e.ensureSingle(P,"g",C.cbfills),e.ensureSingle(P,"g",C.cblines),e.ensureSingle(P,"g",C.cbaxis,function(U){U.classed(C.crisp,!0)}),e.ensureSingle(P,"g",C.cbtitleunshift,function(U){U.append("g").classed(C.cbtitle,!0)}),e.ensureSingle(P,"rect",C.cboutline);var j=A(P,F,O);j&&j.then&&(O._promises||[]).push(j),O._context.edits.colorbarPosition&&x(P,F,O)}),B.exit().each(function(F){b.autoMargin(O,F._id)}).remove(),B.order()}function T(O){var D=O._fullLayout,B=O.calcdata,F=[],P,j,U,$;function Q(ee){return n(ee,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function re(){typeof $.calc=="function"?$.calc(O,U,P):(P._fillgradient=j.reversescale?m(j.colorscale):j.colorscale,P._zrange=[j[$.min],j[$.max]])}for(var ne=0;ne[Math.min(O[0]+D,O[1]),O[1]],u=(O,D)=>[O[0],Math.max(O[1]-D,O[0])];function A(O,D,B){var F=D.orientation==="v",P=D.len,j=D.lenmode,U=D.thickness,$=D.thicknessmode,Q=D.outlinewidth,re=D.borderwidth,ne=D.bgcolor,se=D.xanchor,G=D.yanchor,X=D.xpad,K=D.ypad,H=D.x,Y=F?D.y:1-D.y,q=D.yref==="paper",Z=D.xref==="paper",ee=B._fullLayout,ae=ee._size,he=D._fillcolor,xe=D._line,we=D.title,Me=we.side,Se=D._zrange||p.extent((typeof he=="function"?he:xe.color).domain()),Ie=typeof xe.color=="function"?xe.color:function(){return xe.color},Ve=typeof he=="function"?he:function(){return he},Ge=D._levels,ke=z(B,D,Se),_e=ke.fill,ce=ke.line,ve=Math.round(U*($==="fraction"?F?ae.w:ae.h:1)),le=ve/(F?ae.w:ae.h),Ae=Math.round(P*(j==="fraction"?F?ae.h:ae.w:1)),Be=Ae/(F?ae.h:ae.w),Xe=Z?ae.w:B._fullLayout.width,Ye=q?ae.h:B._fullLayout.height,yt=Math.round(F?H*Xe+X:Y*Ye+K),gt={center:.5,right:1}[se]||0,Tt={top:1,middle:.5}[G]||0,At=F?H-gt*le:Y-Tt*le,$t=F?Y-Tt*Be:H-gt*Be,rr=Math.round(F?Ye*(1-$t):Xe*$t);D._lenFrac=Be,D._thickFrac=le,D._uFrac=At,D._vFrac=$t;var _r=D._axis=I(B,D,Se);_r.position=le+(F?H+X/ae.w:Y+K/ae.h);var Xt=["top","bottom"].indexOf(Me)!==-1;if(F&&Xt&&(_r.title.side=Me,_r.titlex=H+X/ae.w,_r.titley=$t+(we.side==="top"?Be-K/ae.h:K/ae.h)),!F&&!Xt&&(_r.title.side=Me,_r.titley=Y+K/ae.h,_r.titlex=$t+X/ae.w),xe.color&&D.tickmode==="auto"){_r.tickmode="linear",_r.tick0=Ge.start;var or=Ge.size,Ot=e.constrain(Ae/50,4,15)+1,vt=(Se[1]-Se[0])/((D.nticks||Ot)*or);if(vt>1){var ht=Math.pow(10,Math.floor(Math.log(vt)/Math.LN10));or*=ht*e.roundUp(vt/ht,[2,5,10]),(Math.abs(Ge.start)/Ge.size+1e-6)%1<2e-6&&(_r.tick0=0)}_r.dtick=or}var De=F?K/ae.h:X/ae.w;_r.domain=u(f([$t,$t+Be],De),De),_r.setScale(),O.attr("transform",t(Math.round(ae.l),Math.round(ae.t)));var Ne=O.select("."+C.cbtitleunshift).attr("transform",t(-Math.round(ae.l),-Math.round(ae.t))),We=_r.ticklabelposition,Ke=_r.title.font.size,Je=O.select("."+C.cbaxis),et,Mt=0,pt=0;function Pt(Sr,Kr){var Yt={propContainer:_r,propName:D._propPrefix+"title.text",traceIndex:D._traceIndex,_meta:D._meta,placeholder:ee._dfltTitle.colorbar,containerGroup:O.select("."+C.cbtitle)},Rt=Sr.charAt(0)==="h"?Sr.slice(1):"h"+Sr;O.selectAll("."+Rt+",."+Rt+"-math-group").remove(),s.draw(B,Sr,n(Yt,Kr||{}))}function Ct(){if(F&&Xt||!F&&!Xt){var Sr,Kr;Me==="top"&&(Sr=X+ae.l+Xe*H,Kr=K+ae.t+Ye*(1-$t-Be)+3+Ke*.75),Me==="bottom"&&(Sr=X+ae.l+Xe*H,Kr=K+ae.t+Ye*(1-$t)-3-Ke*.25),Me==="right"&&(Kr=K+ae.t+Ye*Y+3+Ke*.75,Sr=X+ae.l+Xe*$t),Pt(_r._id+"title",{attributes:{x:Sr,y:Kr,"text-anchor":F?"start":"middle"}})}}function qt(){if(F&&!Xt||!F&&Xt){var Sr=_r.position||0,Kr=_r._offset+_r._length/2,Yt,Rt;if(Me==="right")Rt=Kr,Yt=ae.l+Xe*Sr+10+Ke*(_r.showticklabels?1:.5);else if(Yt=Kr,Me==="bottom"&&(Rt=ae.t+Ye*Sr+10+(We.indexOf("inside")===-1?_r.tickfont.size:0)+(_r.ticks!=="inside"&&D.ticklen||0)),Me==="top"){var nr=we.text.split("
").length;Rt=ae.t+Ye*Sr+10-ve-w*Ke*nr}Pt((F?"h":"v")+_r._id+"title",{avoid:{selection:p.select(B).selectAll("g."+_r._id+"tick"),side:Me,offsetTop:F?0:ae.t,offsetLeft:F?ae.l:0,maxShift:F?ee.width:ee.height},attributes:{x:Yt,y:Rt,"text-anchor":"middle"},transform:{rotate:F?-90:0,offset:0}})}}function Vt(){if(!F&&!Xt||F&&Xt){var Sr=O.select("."+C.cbtitle),Kr=Sr.select("text"),Yt=[-Q/2,Q/2],Rt=Sr.select(".h"+_r._id+"title-math-group").node(),nr=15.6;Kr.node()&&(nr=parseInt(Kr.node().style.fontSize,10)*w);var ur;if(Rt?(ur=a.bBox(Rt),pt=ur.width,Mt=ur.height,Mt>nr&&(Yt[1]-=(Mt-nr)/2)):Kr.node()&&!Kr.classed(C.jsPlaceholder)&&(ur=a.bBox(Kr.node()),pt=ur.width,Mt=ur.height),F){if(Mt){if(Mt+=5,Me==="top")_r.domain=u(_r.domain,Mt/ae.h),Yt[1]*=-1;else{_r.domain=f(_r.domain,Mt/ae.h);var cr=c.lineCount(Kr);Yt[1]+=(1-cr)*nr}Sr.attr("transform",t(Yt[0],Yt[1])),_r.setScale()}}else pt&&(Me==="right"&&(_r.domain=f(_r.domain,(pt+Ke/2)/ae.w)),Sr.attr("transform",t(Yt[0],Yt[1])),_r.setScale())}O.selectAll("."+C.cbfills+",."+C.cblines).attr("transform",F?t(0,Math.round(ae.h*(1-_r.domain[1]))):t(Math.round(ae.w*_r.domain[0]),0)),Je.attr("transform",F?t(0,Math.round(-ae.t)):t(Math.round(-ae.l),0));var Rr=O.select("."+C.cbfills).selectAll("rect."+C.cbfill).attr("style","").data(_e);Rr.enter().append("rect").classed(C.cbfill,!0).attr("style",""),Rr.exit().remove();var Qr=Se.map(_r.c2p).map(Math.round).sort(function(un,Xa){return un-Xa});Rr.each(function(un,Xa){var ja=[Xa===0?Se[0]:(_e[Xa]+_e[Xa-1])/2,Xa===_e.length-1?Se[1]:(_e[Xa]+_e[Xa+1])/2].map(_r.c2p).map(Math.round);F&&(ja[1]=e.constrain(ja[1]+(ja[1]>ja[0])?1:-1,Qr[0],Qr[1]));var Nn=p.select(this).attr(F?"x":"y",yt).attr(F?"y":"x",p.min(ja)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(p.max(ja)-p.min(ja),2));if(D._fillgradient)a.gradient(Nn,B,D._id,F?"vertical":"horizontalreversed",D._fillgradient,"fill");else{var yn=Ve(un).replace("e-","");Nn.attr("fill",o.hexString(yn))}});var Zr=O.select("."+C.cblines).selectAll("path."+C.cbline).data(xe.color&&xe.width?ce:[]);Zr.enter().append("path").classed(C.cbline,!0),Zr.exit().remove(),Zr.each(function(un){var Xa=yt,ja=Math.round(_r.c2p(un))+xe.width/2%1;p.select(this).attr("d","M"+(F?Xa+","+ja:ja+","+Xa)+(F?"h":"v")+ve).call(a.lineGroupStyle,xe.width,Ie(un),xe.dash)}),Je.selectAll("g."+_r._id+"tick,path").remove();var ha=yt+ve+(Q||0)/2-(D.ticks==="outside"?1:0),Pa=k.calcTicks(_r),La=k.getTickSigns(_r)[2];return k.drawTicks(B,_r,{vals:_r.ticks==="inside"?k.clipEnds(_r,Pa):Pa,layer:Je,path:k.makeTickPath(_r,ha,La),transFn:k.makeTransTickFn(_r)}),k.drawLabels(B,_r,{vals:Pa,layer:Je,transFn:k.makeTransTickLabelFn(_r),labelFns:k.makeLabelFns(_r,ha)})}function Ht(){var Sr,Kr=ve+Q/2;We.indexOf("inside")===-1&&(Sr=a.bBox(Je.node()),Kr+=F?Sr.width:Sr.height),et=Ne.select("text");var Yt=0,Rt=F&&Me==="top",nr=!F&&Me==="right",ur=0;if(et.node()&&!et.classed(C.jsPlaceholder)){var cr,Rr=Ne.select(".h"+_r._id+"title-math-group").node();Rr&&(F&&Xt||!F&&!Xt)?(Sr=a.bBox(Rr),Yt=Sr.width,cr=Sr.height):(Sr=a.bBox(Ne.node()),Yt=Sr.right-ae.l-(F?yt:rr),cr=Sr.bottom-ae.t-(F?rr:yt),!F&&Me==="top"&&(Kr+=Sr.height,ur=Sr.height)),nr&&(et.attr("transform",t(Yt/2+Ke/2,0)),Yt*=2),Kr=Math.max(Kr,F?Yt:cr)}var Qr=(F?X:K)*2+Kr+re+Q/2,Zr=0;!F&&we.text&&G==="bottom"&&Y<=0&&(Zr=Qr/2,Qr+=Zr,ur+=Zr),ee._hColorbarMoveTitle=Zr,ee._hColorbarMoveCBTitle=ur;var ha=re+Q,Pa=(F?yt:rr)-ha/2-(F?X:0),La=(F?rr:yt)-(F?Ae:K+ur-Zr);O.select("."+C.cbbg).attr("x",Pa).attr("y",La).attr(F?"width":"height",Math.max(Qr-Zr,2)).attr(F?"height":"width",Math.max(Ae+ha,2)).call(o.fill,ne).call(o.stroke,D.bordercolor).style("stroke-width",re);var un=nr?Math.max(Yt-10,0):0;O.selectAll("."+C.cboutline).attr("x",(F?yt:rr+X)+un).attr("y",(F?rr+K-Ae:yt)+(Rt?Mt:0)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(Ae-(F?2*K+Mt:2*X+un),2)).call(o.stroke,D.outlinecolor).style({fill:"none","stroke-width":Q});var Xa=F?gt*Qr:0,ja=F?0:(1-Tt)*Qr-ur;if(Xa=Z?ae.l-Xa:-Xa,ja=q?ae.t-ja:-ja,O.attr("transform",t(Xa,ja)),!F&&(re||o.opacity(ne)&&!o.equals(ee.paper_bgcolor,ne))){var Nn=Je.selectAll("text"),yn=Nn[0].length,Un=O.select("."+C.cbbg).node(),li=a.bBox(Un),Yn=a.getTranslate(O),on=2;Nn.each(function(Tr,Ir){var Dr=0,ot=yn-1;if(Ir===Dr||Ir===ot){var kt=a.bBox(this),jt=a.getTranslate(this),ar;if(Ir===ot){var Er=kt.right+jt.x,xr=li.right+Yn.x+rr-re-on+H;ar=xr-Er,ar>0&&(ar=0)}else if(Ir===Dr){var zr=kt.left+jt.x,Lr=li.left+Yn.x+rr+re+on;ar=Lr-zr,ar<0&&(ar=0)}ar&&(yn<3?this.setAttribute("transform","translate("+ar+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var en={},vi=S[se],Yi=M[se],Ja=S[G],Oa=M[G],lt=Qr-ve;F?(j==="pixels"?(en.y=Y,en.t=Ae*Ja,en.b=Ae*Oa):(en.t=en.b=0,en.yt=Y+P*Ja,en.yb=Y-P*Oa),$==="pixels"?(en.x=H,en.l=Qr*vi,en.r=Qr*Yi):(en.l=lt*vi,en.r=lt*Yi,en.xl=H-U*vi,en.xr=H+U*Yi)):(j==="pixels"?(en.x=H,en.l=Ae*vi,en.r=Ae*Yi):(en.l=en.r=0,en.xl=H+P*vi,en.xr=H-P*Yi),$==="pixels"?(en.y=1-Y,en.t=Qr*Ja,en.b=Qr*Oa):(en.t=lt*Ja,en.b=lt*Oa,en.yt=Y-U*Ja,en.yb=Y+U*Oa));var rt=D.y<.5?"b":"t",fr=D.x<.5?"l":"r";B._fullLayout._reservedMargin[D._id]={};var lr={r:ee.width-Pa-Xa,l:Pa+en.r,b:ee.height-La-ja,t:La+en.b};Z&&q?b.autoMargin(B,D._id,en):Z?B._fullLayout._reservedMargin[D._id][rt]=lr[rt]:q||F?B._fullLayout._reservedMargin[D._id][fr]=lr[fr]:B._fullLayout._reservedMargin[D._id][rt]=lr[rt]}return e.syncOrAsync([b.previousPromises,Ct,Vt,qt,b.previousPromises,Ht],B)}function x(O,D,B){var F=D.orientation==="v",P=B._fullLayout,j=P._size,U,$,Q;l.init({element:O.node(),gd:B,prepFn:function(){U=O.attr("transform"),r(O)},moveFn:function(re,ne){O.attr("transform",U+t(re,ne)),$=l.align((F?D._uFrac:D._vFrac)+re/j.w,F?D._thickFrac:D._lenFrac,0,1,D.xanchor),Q=l.align((F?D._vFrac:1-D._uFrac)-ne/j.h,F?D._lenFrac:D._thickFrac,0,1,D.yanchor);var se=l.getCursor($,Q,D.xanchor,D.yanchor);r(O,se)},doneFn:function(){if(r(O),$!==void 0&&Q!==void 0){var re={};re[D._propPrefix+"x"]=$,re[D._propPrefix+"y"]=Q,D._traceIndex!==void 0?E.call("_guiRestyle",B,re,D._traceIndex):E.call("_guiRelayout",B,re)}}})}function z(O,D,B){var F=D._levels,P=[],j=[],U,$,Q=F.end+F.size/100,re=F.size,ne=1.001*B[0]-.001*B[1],se=1.001*B[1]-.001*B[0];for($=0;$<1e5&&(U=F.start+$*re,!(re>0?U>=Q:U<=Q));$++)U>ne&&U0?U>=Q:U<=Q));$++)U>B[0]&&U-1}V.exports=function(n,r){var a,o=n.data,s=n.layout,c=k([],o),m=k({},s,l(r.tileClass)),h=n._context||{};if(r.width&&(m.width=r.width),r.height&&(m.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){m.annotations=[];var v=Object.keys(m);for(a=0;a=0)return h}else if(typeof h=="string"&&(h=h.trim(),h.slice(-1)==="%"&&p(h.slice(0,-1))&&(h=+h.slice(0,-1),h>=0)))return h+"%"}function m(h,v,g,i,w,S){S=S||{};var M=S.moduleHasSelected!==!1,C=S.moduleHasUnselected!==!1,_=S.moduleHasConstrain!==!1,T=S.moduleHasCliponaxis!==!1,f=S.moduleHasTextangle!==!1,u=S.moduleHasInsideanchor!==!1,A=!!S.hasPathbar,x=Array.isArray(w)||w==="auto",z=x||w==="inside",I=x||w==="outside";if(z||I){var O=a(i,"textfont",g.font),D=b.extendFlat({},O),B=h.textfont&&h.textfont.color,F=!B;if(F&&delete D.color,a(i,"insidetextfont",D),A){var P=b.extendFlat({},O);F&&delete P.color,a(i,"pathbar.textfont",P)}I&&a(i,"outsidetextfont",O),M&&i("selected.textfont.color"),C&&i("unselected.textfont.color"),_&&i("constraintext"),T&&i("cliponaxis"),f&&i("textangle"),i("texttemplate"),i("texttemplatefallback")}z&&u&&i("insidetextanchor")}V.exports={supplyDefaults:o,crossTraceDefaults:s,handleText:m,validateCornerradius:c}}}),j5=ze({"src/traces/bar/layout_defaults.js"(J,V){"use strict";var p=mi(),b=Gi(),E=Nr(),k=Qx(),l=qh().validateCornerradius;V.exports=function(e,t,n){function r(M,C){return E.coerce(e,t,k,M,C)}for(var a=!1,o=!1,s=!1,c={},m=r("barmode"),h=m==="group",v=0;v0&&!c[i]&&(s=!0),c[i]=!0),g.visible&&g.type==="histogram"){var w=b.getFromId({_fullLayout:t},g[g.orientation==="v"?"xaxis":"yaxis"]);w.type!=="category"&&(o=!0)}}if(!a){delete t.barmode;return}m!=="overlay"&&r("barnorm"),r("bargap",o&&!s?0:.2),r("bargroupgap");var S=r("barcornerradius");t.barcornerradius=l(S)}}}),x1=ze({"src/traces/bar/arrays_to_calcdata.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){for(var l=0;lt;if(!n)return k}return l!==void 0?l:E.dflt},J.coerceColor=function(E,k,l){return V.isValid(k)?k:l!==void 0?l:E.dflt},J.coerceEnumerated=function(E,k,l){return E.coerceNumber&&(k=+k),E.values.indexOf(k)!==-1?k:l!==void 0?l:E.dflt},J.getValue=function(E,k){var l;return b(E)?k1||A.bargap===0&&A.bargroupgap===0&&!x[0].trace.marker.line.width)&&p.select(this).attr("shape-rendering","crispEdges")}),f.selectAll("g.points").each(function(x){var z=p.select(this),I=x[0].trace;c(z,I,T)}),l.getComponentMethod("errorbars","style")(f)}function c(T,f,u){E.pointStyle(T.selectAll("path"),f,u),m(T,f,u)}function m(T,f,u){T.selectAll("text").each(function(A){var x=p.select(this),z=k.ensureUniformFontSize(u,i(x,A,f,u));E.font(x,z)})}function h(T,f,u){var A=f[0].trace;A.selectedpoints?v(u,A,T):(c(u,A,T),l.getComponentMethod("errorbars","style")(u))}function v(T,f,u){E.selectedPointStyle(T.selectAll("path"),f),g(T.selectAll("text"),f,u)}function g(T,f,u){T.each(function(A){var x=p.select(this),z;if(A.selected){z=k.ensureUniformFontSize(u,i(x,A,f,u));var I=f.selected.textfont&&f.selected.textfont.color;I&&(z.color=I),E.font(x,z)}else E.selectedTextStyle(x,f)})}function i(T,f,u,A){var x=A._fullLayout.font,z=u.textfont;if(T.classed("bartext-inside")){var I=_(f,u);z=S(u,f.i,x,I)}else T.classed("bartext-outside")&&(z=M(u,f.i,x));return z}function w(T,f,u){return C(n,T.textfont,f,u)}function S(T,f,u,A){var x=w(T,f,u),z=T._input.textfont===void 0||T._input.textfont.color===void 0||Array.isArray(T.textfont.color)&&T.textfont.color[f]===void 0;return z&&(x={color:b.contrast(A),family:x.family,size:x.size,weight:x.weight,style:x.style,variant:x.variant,textcase:x.textcase,lineposition:x.lineposition,shadow:x.shadow}),C(r,T.insidetextfont,f,x)}function M(T,f,u){var A=w(T,f,u);return C(a,T.outsidetextfont,f,A)}function C(T,f,u,A){f=f||{};var x=o.getValue(f.family,u),z=o.getValue(f.size,u),I=o.getValue(f.color,u),O=o.getValue(f.weight,u),D=o.getValue(f.style,u),B=o.getValue(f.variant,u),F=o.getValue(f.textcase,u),P=o.getValue(f.lineposition,u),j=o.getValue(f.shadow,u);return{family:o.coerceString(T.family,x,A.family),size:o.coerceNumber(T.size,z,A.size),color:o.coerceColor(T.color,I,A.color),weight:o.coerceString(T.weight,O,A.weight),style:o.coerceString(T.style,D,A.style),variant:o.coerceString(T.variant,B,A.variant),textcase:o.coerceString(T.variant,F,A.textcase),lineposition:o.coerceString(T.variant,P,A.lineposition),shadow:o.coerceString(T.variant,j,A.shadow)}}function _(T,f){return f.type==="waterfall"?f[T.dir].marker.color:T.mcc||T.mc||f.marker.color}V.exports={style:s,styleTextPoints:m,styleOnSelect:h,getInsideTextFont:S,getOutsideTextFont:M,getBarColor:_,resizeText:e}}}),Xv=ze({"src/traces/bar/plot.js"(J,V){"use strict";var p=ci(),b=ao(),E=Nr(),k=Cs(),l=Qn(),e=$i(),t=mi(),n=Gi().tickText,r=eh(),a=r.recordMinTextSize,o=r.clearMinTextSize,s=ld(),c=tb(),m=hv(),h=jd(),v=h.text,g=h.textposition,i=kh().appendArrayPointValue,w=m.TEXTPAD;function S(re){return re.id}function M(re){if(re.ids)return S}function C(re){return(re>0)-(re<0)}function _(re,ne){return re0}function A(re,ne,se,G,X,K){var H=ne.xaxis,Y=ne.yaxis,q=re._fullLayout,Z=re._context.staticPlot;X||(X={mode:q.barmode,norm:q.barmode,gap:q.bargap,groupgap:q.bargroupgap},o("bar",q));var ee=E.makeTraceGroups(G,se,"trace bars").each(function(ae){var he=p.select(this),xe=ae[0].trace,we=ae[0].t,Me=xe.type==="waterfall",Se=xe.type==="funnel",Ie=xe.type==="histogram",Ve=xe.type==="bar",Ge=Ve||Se,ke=0;Me&&xe.connector.visible&&xe.connector.mode==="between"&&(ke=xe.connector.line.width/2);var _e=xe.orientation==="h",ce=u(X),ve=E.ensureSingle(he,"g","points"),le=M(xe),Ae=ve.selectAll("g.point").data(E.identity,le);Ae.enter().append("g").classed("point",!0),Ae.exit().remove(),Ae.each(function(Xe,Ye){var yt=p.select(this),gt=T(Xe,H,Y,_e),Tt=gt[0][0],At=gt[0][1],$t=gt[1][0],rr=gt[1][1],_r=(_e?At-Tt:rr-$t)===0;_r&&Ge&&c.getLineWidth(xe,Xe)&&(_r=!1),_r||(_r=!b(Tt)||!b(At)||!b($t)||!b(rr)),Xe.isBlank=_r,_r&&(_e?At=Tt:rr=$t),ke&&!_r&&(_e?(Tt-=_(Tt,At)*ke,At+=_(Tt,At)*ke):($t-=_($t,rr)*ke,rr+=_($t,rr)*ke));var Xt,or;if(xe.type==="waterfall"){if(!_r){var Ot=xe[Xe.dir].marker;Xt=Ot.line.width,or=Ot.color}}else Xt=c.getLineWidth(xe,Xe),or=Xe.mc||xe.marker.color;function vt(Zr){var ha=p.round(Xt/2%1,2);return X.gap===0&&X.groupgap===0?p.round(Math.round(Zr)-ha,2):Zr}function ht(Zr,ha,Pa){return Pa&&Zr===ha?Zr:Math.abs(Zr-ha)>=2?vt(Zr):Zr>ha?Math.ceil(Zr):Math.floor(Zr)}var De=l.opacity(or),Ne=De<1||Xt>.01?vt:ht;re._context.staticPlot||(Tt=Ne(Tt,At,_e),At=Ne(At,Tt,_e),$t=Ne($t,rr,!_e),rr=Ne(rr,$t,!_e));var We=_e?H.c2p:Y.c2p,Ke;Xe.s0>0?Ke=Xe._sMax:Xe.s0<0?Ke=Xe._sMin:Ke=Xe.s1>0?Xe._sMax:Xe._sMin;function Je(Zr,ha){if(!Zr)return 0;var Pa=Math.abs(_e?rr-$t:At-Tt),La=Math.abs(_e?At-Tt:rr-$t),un=Ne(Math.abs(We(Ke,!0)-We(0,!0))),Xa=Xe.hasB?Math.min(Pa/2,La/2):Math.min(Pa/2,un),ja;if(ha==="%"){var Nn=Math.min(50,Zr);ja=Pa*(Nn/100)}else ja=Zr;return Ne(Math.max(Math.min(ja,Xa),0))}var et=Ve||Ie?Je(we.cornerradiusvalue,we.cornerradiusform):0,Mt,pt,Pt="M"+Tt+","+$t+"V"+rr+"H"+At+"V"+$t+"Z",Ct=0;if(et&&Xe.s){var qt=C(Xe.s0)===0||C(Xe.s)===C(Xe.s0)?Xe.s1:Xe.s0;if(Ct=Ne(Xe.hasB?0:Math.abs(We(Ke,!0)-We(qt,!0))),Ct0?Math.sqrt(Ct*(2*et-Ct)):0,Rt=Vt>0?Math.max:Math.min;Mt="M"+Tt+","+$t+"V"+(rr-Kr*Ht)+"H"+Rt(At-(et-Ct)*Vt,Tt)+"A "+et+","+et+" 0 0 "+Sr+" "+At+","+(rr-et*Ht-Yt)+"V"+($t+et*Ht+Yt)+"A "+et+","+et+" 0 0 "+Sr+" "+Rt(At-(et-Ct)*Vt,Tt)+","+($t+Kr*Ht)+"Z"}else if(Xe.hasB)Mt="M"+(Tt+et*Vt)+","+$t+"A "+et+","+et+" 0 0 "+Sr+" "+Tt+","+($t+et*Ht)+"V"+(rr-et*Ht)+"A "+et+","+et+" 0 0 "+Sr+" "+(Tt+et*Vt)+","+rr+"H"+(At-et*Vt)+"A "+et+","+et+" 0 0 "+Sr+" "+At+","+(rr-et*Ht)+"V"+($t+et*Ht)+"A "+et+","+et+" 0 0 "+Sr+" "+(At-et*Vt)+","+$t+"Z";else{pt=Math.abs(rr-$t)+Ct;var nr=pt0?Math.sqrt(Ct*(2*et-Ct)):0,cr=Ht>0?Math.max:Math.min;Mt="M"+(Tt+nr*Vt)+","+$t+"V"+cr(rr-(et-Ct)*Ht,$t)+"A "+et+","+et+" 0 0 "+Sr+" "+(Tt+et*Vt-ur)+","+rr+"H"+(At-et*Vt+ur)+"A "+et+","+et+" 0 0 "+Sr+" "+(At-nr*Vt)+","+cr(rr-(et-Ct)*Ht,$t)+"V"+$t+"Z"}}else Mt=Pt}else Mt=Pt;var Rr=f(E.ensureSingle(yt,"path"),q,X,K);if(Rr.style("vector-effect",Z?"none":"non-scaling-stroke").attr("d",isNaN((At-Tt)*(rr-$t))||_r&&re._context.staticPlot?"M0,0Z":Mt).call(e.setClipUrl,ne.layerClipId,re),!q.uniformtext.mode&&ce){var Qr=e.makePointStyleFns(xe);e.singlePointStyle(Xe,Rr,xe,Qr,re)}x(re,ne,yt,ae,Ye,Tt,At,$t,rr,et,Ct,X,K),ne.layerClipId&&e.hideOutsideRangePoint(Xe,yt.select("text"),H,Y,xe.xcalendar,xe.ycalendar)});var Be=xe.cliponaxis===!1;e.setClipUrl(he,Be?null:ne.layerClipId,re)});t.getComponentMethod("errorbars","plot")(re,ee,ne,X)}function x(re,ne,se,G,X,K,H,Y,q,Z,ee,ae,he){var xe=ne.xaxis,we=ne.yaxis,Me=re._fullLayout,Se;function Ie(Pt,Ct,qt){var Vt=E.ensureSingle(Pt,"text").text(Ct).attr({class:"bartext bartext-"+Se,"text-anchor":"middle","data-notex":1}).call(e.font,qt).call(k.convertToTspans,re);return Vt}var Ve=G[0].trace,Ge=Ve.orientation==="h",ke=U(G,Ge,xe,we),_e=P(Me,G,X,xe,we);Se=j(Ve,X);var ce=ae.mode==="stack"||ae.mode==="relative",ve=G[X],le=!ce||ve._outmost,Ae=ve.hasB,Be=Z&&Z-ee>w;if(!_e||Se==="none"||(ve.isBlank||K===H||Y===q)&&(Se==="auto"||Se==="inside")){se.select("text").remove();return}var Xe=Me.font,Ye=s.getBarColor(G[X],Ve),yt=s.getInsideTextFont(Ve,X,Xe,Ye),gt=s.getOutsideTextFont(Ve,X,Xe),Tt=Ve.insidetextanchor||"end",At=se.datum();Ge?xe.type==="log"&&At.s0<=0&&(xe.range[0]0&&ht>0,We;Be?Ae?We=z(_r-2*Z,Xt,vt,ht,Ge)||z(_r,Xt-2*Z,vt,ht,Ge):Ge?We=z(_r-(Z-ee),Xt,vt,ht,Ge)||z(_r,Xt-2*(Z-ee),vt,ht,Ge):We=z(_r,Xt-(Z-ee),vt,ht,Ge)||z(_r-2*(Z-ee),Xt,vt,ht,Ge):We=z(_r,Xt,vt,ht,Ge),Ne&&We?Se="inside":(Se="outside",or.remove(),or=null)}else Se="inside";if(!or){De=E.ensureUniformFontSize(re,Se==="outside"?gt:yt),or=Ie(se,_e,De);var Ke=or.attr("transform");if(or.attr("transform",""),Ot=e.bBox(or.node()),vt=Ot.width,ht=Ot.height,or.attr("transform",Ke),vt<=0||ht<=0){or.remove();return}}var Je=Ve.textangle,et,Mt;Se==="outside"?(Mt=Ve.constraintext==="both"||Ve.constraintext==="outside",et=F(K,H,Y,q,Ot,{isHorizontal:Ge,constrained:Mt,angle:Je,zeroBarDir:ke})):(Mt=Ve.constraintext==="both"||Ve.constraintext==="inside",et=D(K,H,Y,q,Ot,{isHorizontal:Ge,constrained:Mt,angle:Je,anchor:Tt,hasB:Ae,r:Z,overhead:ee})),et.fontSize=De.size,a(Ve.type==="histogram"?"bar":Ve.type,et,Me),ve.transform=et;var pt=f(or,Me,ae,he);E.setTransormAndDisplay(pt,et)}function z(re,ne,se,G,X){if(re<0||ne<0)return!1;var K=se<=re&&G<=ne,H=se<=ne&&G<=re,Y=X?re>=se*(ne/G):ne>=G*(re/se);return K||H||Y}function I(re){return re==="auto"?0:re}function O(re,ne){var se=Math.PI/180*ne,G=Math.abs(Math.sin(se)),X=Math.abs(Math.cos(se));return{x:re.width*X+re.height*G,y:re.width*G+re.height*X}}function D(re,ne,se,G,X,K){var H=!!K.isHorizontal,Y=!!K.constrained,q=K.angle||0,Z=K.anchor,ee=Z==="end",ae=Z==="start",he=K.leftToRight||0,xe=(he+1)/2,we=1-xe,Me=K.hasB,Se=K.r,Ie=K.overhead,Ve=X.width,Ge=X.height,ke=Math.abs(ne-re),_e=Math.abs(G-se),ce=ke>2*w&&_e>2*w?w:0;ke-=2*ce,_e-=2*ce;var ve=I(q);q==="auto"&&!(Ve<=ke&&Ge<=_e)&&(Ve>ke||Ge>_e)&&(!(Ve>_e||Ge>ke)||Vew){var Xe=B(re,ne,se,G,le,Se,Ie,H,Me);Ae=Xe.scale,Be=Xe.pad}else Ae=1,Y&&(Ae=Math.min(1,ke/le.x,_e/le.y)),Be=0;var Ye=X.left*we+X.right*xe,yt=(X.top+X.bottom)/2,gt=(re+w)*we+(ne-w)*xe,Tt=(se+G)/2,At=0,$t=0;if(ae||ee){var rr=(H?le.x:le.y)/2;Se&&(ee||Me)&&(ce+=Be);var _r=H?_(re,ne):_(se,G);H?ae?(gt=re+_r*ce,At=-_r*rr):(gt=ne-_r*ce,At=_r*rr):ae?(Tt=se+_r*ce,$t=-_r*rr):(Tt=G-_r*ce,$t=_r*rr)}return{textX:Ye,textY:yt,targetX:gt,targetY:Tt,anchorX:At,anchorY:$t,scale:Ae,rotate:ve}}function B(re,ne,se,G,X,K,H,Y,q){var Z=Math.max(0,Math.abs(ne-re)-2*w),ee=Math.max(0,Math.abs(G-se)-2*w),ae=K-w,he=H?ae-Math.sqrt(ae*ae-(ae-H)*(ae-H)):ae,xe=q?ae*2:Y?ae-H:2*he,we=q?ae*2:Y?2*he:ae-H,Me,Se,Ie,Ve,Ge;return X.y/X.x>=ee/(Z-xe)?Ve=ee/X.y:X.y/X.x<=(ee-we)/Z?Ve=Z/X.x:!q&&Y?(Me=X.x*X.x+X.y*X.y/4,Se=-2*X.x*(Z-ae)-X.y*(ee/2-ae),Ie=(Z-ae)*(Z-ae)+(ee/2-ae)*(ee/2-ae)-ae*ae,Ve=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)):q?(Me=(X.x*X.x+X.y*X.y)/4,Se=-X.x*(Z/2-ae)-X.y*(ee/2-ae),Ie=(Z/2-ae)*(Z/2-ae)+(ee/2-ae)*(ee/2-ae)-ae*ae,Ve=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)):(Me=X.x*X.x/4+X.y*X.y,Se=-X.x*(Z/2-ae)-2*X.y*(ee-ae),Ie=(Z/2-ae)*(Z/2-ae)+(ee-ae)*(ee-ae)-ae*ae,Ve=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)),Ve=Math.min(1,Ve),Y?Ge=Math.max(0,ae-Math.sqrt(Math.max(0,ae*ae-(ae-(ee-X.y*Ve)/2)*(ae-(ee-X.y*Ve)/2)))-H):Ge=Math.max(0,ae-Math.sqrt(Math.max(0,ae*ae-(ae-(Z-X.x*Ve)/2)*(ae-(Z-X.x*Ve)/2)))-H),{scale:Ve,pad:Ge}}function F(re,ne,se,G,X,K){var H=!!K.isHorizontal,Y=!!K.constrained,q=K.angle||0,Z=X.width,ee=X.height,ae=Math.abs(ne-re),he=Math.abs(G-se),xe;H?xe=he>2*w?w:0:xe=ae>2*w?w:0;var we=1;Y&&(we=H?Math.min(1,he/ee):Math.min(1,ae/Z));var Me=I(q),Se=O(X,Me),Ie=(H?Se.x:Se.y)/2,Ve=(X.left+X.right)/2,Ge=(X.top+X.bottom)/2,ke=(re+ne)/2,_e=(se+G)/2,ce=0,ve=0,le;return(H?re===ne:se===G)&&K.zeroBarDir?le=K.zeroBarDir:le=H?_(ne,re):_(se,G),H?(ke=ne-le*xe,ce=le*Ie):(_e=G+le*xe,ve=-le*Ie),{textX:Ve,textY:Ge,targetX:ke,targetY:_e,anchorX:ce,anchorY:ve,scale:we,rotate:Me}}function P(re,ne,se,G,X){var K=ne[0].trace,H=K.texttemplate,Y;return H?Y=$(re,ne,se,G,X):K.textinfo?Y=Q(ne,se,G,X):Y=c.getValue(K.text,se),c.coerceString(v,Y)}function j(re,ne){var se=c.getValue(re.textposition,ne);return c.coerceEnumerated(g,se)}function U(re,ne,se,G){for(var X=!1,K=!1,H=0;H0?X=!0:Y<0&&(K=!0),X&&K)return 0}var q=ne?se:G,Z=-_(q.range[0],q.range[1]);return K?X?0:-Z:Z}function $(re,ne,se,G,X){var K=ne[0].trace,H=E.castOption(K,se,"texttemplate");if(!H)return"";var Y=K.type==="histogram",q=K.type==="waterfall",Z=K.type==="funnel",ee=K.orientation==="h",ae,he,xe,we;ee?(ae="y",he=X,xe="x",we=G):(ae="x",he=G,xe="y",we=X);function Me(ce){return n(he,he.c2l(ce),!0).text}function Se(ce){return n(we,we.c2l(ce),!0).text}var Ie=ne[se],Ve={};Ve.label=Ie.p,Ve.labelLabel=Ve[ae+"Label"]=Me(Ie.p);var Ge=E.castOption(K,Ie.i,"text");(Ge===0||Ge)&&(Ve.text=Ge),Ve.value=Ie.s,Ve.valueLabel=Ve[xe+"Label"]=Se(Ie.s);var ke={};i(ke,K,Ie.i),(Y||ke.x===void 0)&&(ke.x=ee?Ve.value:Ve.label),(Y||ke.y===void 0)&&(ke.y=ee?Ve.label:Ve.value),(Y||ke.xLabel===void 0)&&(ke.xLabel=ee?Ve.valueLabel:Ve.labelLabel),(Y||ke.yLabel===void 0)&&(ke.yLabel=ee?Ve.labelLabel:Ve.valueLabel),q&&(Ve.delta=+Ie.rawS||Ie.s,Ve.deltaLabel=Se(Ve.delta),Ve.final=Ie.v,Ve.finalLabel=Se(Ve.final),Ve.initial=Ve.final-Ve.delta,Ve.initialLabel=Se(Ve.initial)),Z&&(Ve.value=Ie.s,Ve.valueLabel=Se(Ve.value),Ve.percentInitial=Ie.begR,Ve.percentInitialLabel=E.formatPercent(Ie.begR),Ve.percentPrevious=Ie.difR,Ve.percentPreviousLabel=E.formatPercent(Ie.difR),Ve.percentTotal=Ie.sumR,Ve.percenTotalLabel=E.formatPercent(Ie.sumR));var _e=E.castOption(K,Ie.i,"customdata");return _e&&(Ve.customdata=_e),E.texttemplateString({data:[ke,Ve,K._meta],fallback:K.texttemplatefallback,labels:Ve,locale:re._d3locale,template:H})}function Q(re,ne,se,G){var X=re[0].trace,K=X.orientation==="h",H=X.type==="waterfall",Y=X.type==="funnel";function q(_e){var ce=K?G:se;return n(ce,_e,!0).text}function Z(_e){var ce=K?se:G;return n(ce,+_e,!0).text}var ee=X.textinfo,ae=re[ne],he=ee.split("+"),xe=[],we,Me=function(_e){return he.indexOf(_e)!==-1};if(Me("label")&&xe.push(q(re[ne].p)),Me("text")&&(we=E.castOption(X,ae.i,"text"),(we===0||we)&&xe.push(we)),H){var Se=+ae.rawS||ae.s,Ie=ae.v,Ve=Ie-Se;Me("initial")&&xe.push(Z(Ve)),Me("delta")&&xe.push(Z(Se)),Me("final")&&xe.push(Z(Ie))}if(Y){Me("value")&&xe.push(Z(ae.s));var Ge=0;Me("percent initial")&&Ge++,Me("percent previous")&&Ge++,Me("percent total")&&Ge++;var ke=Ge>1;Me("percent initial")&&(we=E.formatPercent(ae.begR),ke&&(we+=" of initial"),xe.push(we)),Me("percent previous")&&(we=E.formatPercent(ae.difR),ke&&(we+=" of previous"),xe.push(we)),Me("percent total")&&(we=E.formatPercent(ae.sumR),ke&&(we+=" of total"),xe.push(we))}return xe.join("
")}V.exports={plot:A,toMoveInsideBar:D}}}),eg=ze({"src/traces/bar/hover.js"(J,V){"use strict";var p=Zl(),b=mi(),E=Qn(),k=Nr().fillText,l=tb().getLineWidth,e=Gi().hoverLabelText,t=No().BADNUM;function n(o,s,c,m,h){var v=r(o,s,c,m,h);if(v){var g=v.cd,i=g[0].trace,w=g[v.index];return v.color=a(i,w),b.getComponentMethod("errorbars","hoverInfo")(w,i,v),[v]}}function r(o,s,c,m,h){var v=o.cd,g=v[0].trace,i=v[0].t,w=m==="closest",S=g.type==="waterfall",M=o.maxHoverDistance,C=o.maxSpikeDistance,_,T,f,u,A,x,z;g.orientation==="h"?(_=c,T=s,f="y",u="x",A=se,x=Q):(_=s,T=c,f="x",u="y",x=se,A=Q);var I=g[f+"period"],O=w||I;function D(xe){return F(xe,-1)}function B(xe){return F(xe,1)}function F(xe,we){var Me=xe.w;return xe[f]+we*Me/2}function P(xe){return xe[f+"End"]-xe[f+"Start"]}var j=w?D:I?function(xe){return xe.p-P(xe)/2}:function(xe){return Math.min(D(xe),xe.p-i.bardelta/2)},U=w?B:I?function(xe){return xe.p+P(xe)/2}:function(xe){return Math.max(B(xe),xe.p+i.bardelta/2)};function $(xe,we,Me){return h.finiteRange&&(Me=0),p.inbox(xe-_,we-_,Me+Math.min(1,Math.abs(we-xe)/z)-1)}function Q(xe){return $(j(xe),U(xe),M)}function re(xe){return $(D(xe),B(xe),C)}function ne(xe){var we=xe[u];if(S){var Me=Math.abs(xe.rawS)||0;T>0?we+=Me:T<0&&(we-=Me)}return we}function se(xe){var we=T,Me=xe.b,Se=ne(xe);return p.inbox(Me-we,Se-we,M+(Se-we)/(Se-Me)-1)}function G(xe){var we=T,Me=xe.b,Se=ne(xe);return p.inbox(Me-we,Se-we,C+(Se-we)/(Se-Me)-1)}var X=o[f+"a"],K=o[u+"a"];z=Math.abs(X.r2c(X.range[1])-X.r2c(X.range[0]));function H(xe){return(A(xe)+x(xe))/2}var Y=p.getDistanceFunction(m,A,x,H);if(p.getClosest(v,Y,o),o.index!==!1&&v[o.index].p!==t){O||(j=function(xe){return Math.min(D(xe),xe.p-i.bargroupwidth/2)},U=function(xe){return Math.max(B(xe),xe.p+i.bargroupwidth/2)});var q=o.index,Z=v[q],ee=g.base?Z.b+Z.s:Z.s;o[u+"0"]=o[u+"1"]=K.c2p(Z[u],!0),o[u+"LabelVal"]=ee;var ae=i.extents[i.extents.round(Z.p)];o[f+"0"]=X.c2p(w?j(Z):ae[0],!0),o[f+"1"]=X.c2p(w?U(Z):ae[1],!0);var he=Z.orig_p!==void 0;return o[f+"LabelVal"]=he?Z.orig_p:Z.p,o.labelLabel=e(X,o[f+"LabelVal"],g[f+"hoverformat"]),o.valueLabel=e(K,o[u+"LabelVal"],g[u+"hoverformat"]),o.baseLabel=e(K,Z.b,g[u+"hoverformat"]),o.spikeDistance=(G(Z)+re(Z))/2,o[f+"Spike"]=X.c2p(Z.p,!0),k(Z,g,o),o.hovertemplate=g.hovertemplate,o}}function a(o,s){var c=s.mcc||o.marker.color,m=s.mlcc||o.marker.line.color,h=l(o,s);if(E.opacity(c))return c;if(E.opacity(m)&&h)return m}V.exports={hoverPoints:n,hoverOnBars:r,getTraceColor:a}}}),PF=ze({"src/traces/bar/event_data.js"(J,V){"use strict";V.exports=function(b,E,k){return b.x="xVal"in E?E.xVal:E.x,b.y="yVal"in E?E.yVal:E.y,E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),k.orientation==="h"?(b.label=b.y,b.value=b.x):(b.label=b.x,b.value=b.y),b}}}),tg=ze({"src/traces/bar/select.js"(J,V){"use strict";V.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,n=l[0].trace,r=n.type==="funnel",a=n.orientation==="h",o=[],s;if(k===!1)for(s=0;s0?(I="v",f>0?O=Math.min(A,u):O=Math.min(u)):f>0?(I="h",O=Math.min(A)):O=0;if(!O){c.visible=!1;return}c._length=O;var j=m("orientation",I);c._hasPreCompStats?j==="v"&&f===0?(m("x0",0),m("dx",1)):j==="h"&&T===0&&(m("y0",0),m("dy",1)):j==="v"&&f===0?m("x0"):j==="h"&&T===0&&m("y0");var U=b.getComponentMethod("calendars","handleTraceDefaults");U(s,c,["x","y"],h)}function a(s,c,m,h){var v=h.prefix,g=p.coerce2(s,c,t,"marker.outliercolor"),i=m("marker.line.outliercolor"),w="outliers";c._hasPreCompStats?w="all":(g||i)&&(w="suspectedoutliers");var S=m(v+"points",w);S?(m("jitter",S==="all"?.3:0),m("pointpos",S==="all"?-1.5:0),m("marker.symbol"),m("marker.opacity"),m("marker.size"),m("marker.angle"),m("marker.color",c.line.color),m("marker.line.color"),m("marker.line.width"),S==="suspectedoutliers"&&(m("marker.line.outliercolor",c.marker.color),m("marker.line.outlierwidth")),m("selected.marker.color"),m("unselected.marker.color"),m("selected.marker.size"),m("unselected.marker.size"),m("text"),m("hovertext")):delete c.marker;var M=m("hoveron");(M==="all"||M.indexOf("points")!==-1)&&(m("hovertemplate"),m("hovertemplatefallback")),p.coerceSelectionMarkerOpacity(c,m)}function o(s,c){var m,h;function v(S){return p.coerce(h._input,h,t,S)}for(var g=0;gne.uf};if(C._hasPreCompStats){var q=C[O],Z=function(rr){return I.d2c((C[rr]||[])[x])},ee=1/0,ae=-1/0;for(x=0;x=ne.q1&&ne.q3>=ne.med){var xe=Z("lowerfence");ne.lf=xe!==l&&xe<=ne.q1?xe:h(ne,G,X);var we=Z("upperfence");ne.uf=we!==l&&we>=ne.q3?we:v(ne,G,X);var Me=Z("mean");ne.mean=Me!==l?Me:X?k.mean(G,X):(ne.q1+ne.q3)/2;var Se=Z("sd");ne.sd=Me!==l&&Se>=0?Se:X?k.stdev(G,X,ne.mean):ne.q3-ne.q1,ne.lo=g(ne),ne.uo=i(ne);var Ie=Z("notchspan");Ie=Ie!==l&&Ie>0?Ie:w(ne,X),ne.ln=ne.med-Ie,ne.un=ne.med+Ie;var Ve=ne.lf,Ge=ne.uf;C.boxpoints&&G.length&&(Ve=Math.min(Ve,G[0]),Ge=Math.max(Ge,G[X-1])),C.notched&&(Ve=Math.min(Ve,ne.ln),Ge=Math.max(Ge,ne.un)),ne.min=Ve,ne.max=Ge}else{k.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+ne.q1,"median = "+ne.med,"q3 = "+ne.q3].join(` -`));var ke;ne.med!==l?ke=ne.med:ne.q1!==l?ne.q3!==l?ke=(ne.q1+ne.q3)/2:ke=ne.q1:ne.q3!==l?ke=ne.q3:ke=0,ne.med=ke,ne.q1=ne.q3=ke,ne.lf=ne.uf=ke,ne.mean=ne.sd=ke,ne.ln=ne.un=ke,ne.min=ne.max=ke}ee=Math.min(ee,ne.min),ae=Math.max(ae,ne.max),ne.pts2=se.filter(Y),u.push(ne)}}C._extremes[I._id]=b.findExtremes(I,[ee,ae],{padded:!0})}else{var _e=I.makeCalcdata(C,O),ce=n(Q,re),ve=Q.length,le=r(ve);for(x=0;x=0&&Ae0){if(ne={},ne.pos=ne[B]=Q[x],se=ne.pts=le[x].sort(c),G=ne[O]=se.map(m),X=G.length,ne.min=G[0],ne.max=G[X-1],ne.mean=k.mean(G,X),ne.sd=k.stdev(G,X,ne.mean)*C.sdmultiple,ne.med=k.interp(G,.5),X%2&&(yt||gt)){var Tt,At;yt?(Tt=G.slice(0,X/2),At=G.slice(X/2+1)):gt&&(Tt=G.slice(0,X/2+1),At=G.slice(X/2)),ne.q1=k.interp(Tt,.5),ne.q3=k.interp(At,.5)}else ne.q1=k.interp(G,.25),ne.q3=k.interp(G,.75);ne.lf=h(ne,G,X),ne.uf=v(ne,G,X),ne.lo=g(ne),ne.uo=i(ne);var $t=w(ne,X);ne.ln=ne.med-$t,ne.un=ne.med+$t,Be=Math.min(Be,ne.ln),Xe=Math.max(Xe,ne.un),ne.pts2=se.filter(Y),u.push(ne)}C.notched&&k.isTypedArray(_e)&&(_e=Array.from(_e)),C._extremes[I._id]=b.findExtremes(I,C.notched?_e.concat([Be,Xe]):_e,{padded:!0})}return s(u,C),u.length>0?(u[0].t={num:_[A],dPos:re,posLetter:B,valLetter:O,labels:{med:e(M,"median:"),min:e(M,"min:"),q1:e(M,"q1:"),q3:e(M,"q3:"),max:e(M,"max:"),mean:C.boxmean==="sd"||C.sizemode==="sd"?e(M,"mean \xB1 \u03C3:").replace("\u03C3",C.sdmultiple===1?"\u03C3":C.sdmultiple+"\u03C3"):e(M,"mean:"),lf:e(M,"lower fence:"),uf:e(M,"upper fence:")}},_[A]++,u):[{t:{empty:!0}}]};function t(S,M,C,_){var T=M in S,f=M+"0"in S,u="d"+M in S;if(T||f&&u){var A=C.makeCalcdata(S,M),x=E(S,C,M,A).vals;return[x,A]}var z;f?z=S[M+"0"]:"name"in S&&(C.type==="category"||p(S.name)&&["linear","log"].indexOf(C.type)!==-1||k.isDateTime(S.name)&&C.type==="date")?z=S.name:z=_;for(var I=C.type==="multicategory"?C.r2c_just_indices(z):C.d2c(z,0,S[M+"calendar"]),O=S._length,D=new Array(O),B=0;B1,f=1-s[t+"gap"],u=1-s[t+"groupgap"];for(h=0;h0;if(I==="positive"?(ne=O*(z?1:.5),X=G,se=X=B):I==="negative"?(ne=X=B,se=O*(z?1:.5),K=G):(ne=se=O,X=K=G),ae){var he=A.pointpos,xe=A.jitter,we=A.marker.size/2,Me=0;he+xe>=0&&(Me=G*(he+xe),Me>ne?(ee=!0,q=we,H=Me):Me>X&&(q=we,H=ne)),Me<=ne&&(H=ne);var Se=0;he-xe<=0&&(Se=-G*(he-xe),Se>se?(ee=!0,Z=we,Y=Se):Se>K&&(Z=we,Y=se)),Se<=se&&(Y=se)}else H=ne,Y=se;var Ie=new Array(g.length);for(v=0;vC.lo&&(j.so=!0)}return T});M.enter().append("path").classed("point",!0),M.exit().remove(),M.call(E.translatePoints,m,h)}function r(a,o,s,c){var m=o.val,h=o.pos,v=!!h.rangebreaks,g=c.bPos,i=c.bPosPxOffset||0,w=s.boxmean||(s.meanline||{}).visible,S,M;Array.isArray(c.bdPos)?(S=c.bdPos[0],M=c.bdPos[1]):(S=c.bdPos,M=c.bdPos);var C=a.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?b.identity:[]);C.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),C.exit().remove(),C.each(function(_){var T=h.c2l(_.pos+g,!0),f=h.l2p(T-S)+i,u=h.l2p(T+M)+i,A=v?(f+u)/2:h.l2p(T)+i,x=m.c2p(_.mean,!0),z=m.c2p(_.mean-_.sd,!0),I=m.c2p(_.mean+_.sd,!0);s.orientation==="h"?p.select(this).attr("d","M"+x+","+f+"V"+u+(w==="sd"?"m0,0L"+z+","+A+"L"+x+","+f+"L"+I+","+A+"Z":"")):p.select(this).attr("d","M"+f+","+x+"H"+u+(w==="sd"?"m0,0L"+A+","+z+"L"+f+","+x+"L"+A+","+I+"Z":""))})}V.exports={plot:e,plotBoxAndWhiskers:t,plotPoints:n,plotBoxMean:r}}}),ib=ze({"src/traces/box/style.js"(J,V){"use strict";var p=ci(),b=Qn(),E=$i();function k(e,t,n){var r=n||p.select(e).selectAll("g.trace.boxes");r.style("opacity",function(a){return a[0].trace.opacity}),r.each(function(a){var o=p.select(this),s=a[0].trace,c=s.line.width;function m(g,i,w,S){g.style("stroke-width",i+"px").call(b.stroke,w).call(b.fill,S)}var h=o.selectAll("path.box");if(s.type==="candlestick")h.each(function(g){if(!g.empty){var i=p.select(this),w=s[g.dir];m(i,w.line.width,w.line.color,w.fillcolor),i.style("opacity",s.selectedpoints&&!g.selected?.3:1)}});else{m(h,c,s.line.color,s.fillcolor),o.selectAll("path.mean").style({"stroke-width":c,"stroke-dasharray":2*c+"px,"+c+"px"}).call(b.stroke,s.line.color);var v=o.selectAll("path.point");E.pointStyle(v,s,e)}})}function l(e,t,n){var r=t[0].trace,a=n.selectAll("path.point");r.selectedpoints?E.selectedPointStyle(a,r):E.pointStyle(a,r,e)}V.exports={style:k,styleOnSelect:l}}}),q5=ze({"src/traces/box/hover.js"(J,V){"use strict";var p=Gi(),b=Nr(),E=Zl(),k=Qn(),l=b.fillText;function e(r,a,o,s){var c=r.cd,m=c[0].trace,h=m.hoveron,v=[],g;return h.indexOf("boxes")!==-1&&(v=v.concat(t(r,a,o,s))),h.indexOf("points")!==-1&&(g=n(r,a,o)),s==="closest"?g?[g]:v:(g&&v.push(g),v)}function t(r,a,o,s){var c=r.cd,m=r.xa,h=r.ya,v=c[0].trace,g=c[0].t,i=v.type==="violin",w,S,M,C,_,T,f,u,A,x,z,I=g.bdPos,O,D,B=g.wHover,F=function(Se){return M.c2l(Se.pos)+g.bPos-M.c2l(T)};i&&v.side!=="both"?(v.side==="positive"&&(A=function(Se){var Ie=F(Se);return E.inbox(Ie,Ie+B,x)},O=I,D=0),v.side==="negative"&&(A=function(Se){var Ie=F(Se);return E.inbox(Ie-B,Ie,x)},O=0,D=I)):(A=function(Se){var Ie=F(Se);return E.inbox(Ie-B,Ie+B,x)},O=D=I);var P;i?P=function(Se){return E.inbox(Se.span[0]-_,Se.span[1]-_,x)}:P=function(Se){return E.inbox(Se.min-_,Se.max-_,x)},v.orientation==="h"?(_=a,T=o,f=P,u=A,w="y",M=h,S="x",C=m):(_=o,T=a,f=A,u=P,w="x",M=m,S="y",C=h);var j=Math.min(1,I/Math.abs(M.r2c(M.range[1])-M.r2c(M.range[0])));x=r.maxHoverDistance-j,z=r.maxSpikeDistance-j;function U(Se){return(f(Se)+u(Se))/2}var $=E.getDistanceFunction(s,f,u,U);if(E.getClosest(c,$,r),r.index===!1)return[];var Q=c[r.index],re=v.line.color,ne=(v.marker||{}).color;k.opacity(re)&&v.line.width?r.color=re:k.opacity(ne)&&v.boxpoints?r.color=ne:r.color=v.fillcolor,r[w+"0"]=M.c2p(Q.pos+g.bPos-D,!0),r[w+"1"]=M.c2p(Q.pos+g.bPos+O,!0),r[w+"LabelVal"]=Q.orig_p!==void 0?Q.orig_p:Q.pos;var se=w+"Spike";r.spikeDistance=U(Q)*z/x,r[se]=M.c2p(Q.pos,!0);var G=v.boxmean||v.sizemode==="sd"||(v.meanline||{}).visible,X=v.boxpoints||v.points,K=X&&G?["max","uf","q3","med","mean","q1","lf","min"]:X&&!G?["max","uf","q3","med","q1","lf","min"]:!X&&G?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],H=C.range[1]0&&(n=!0);for(var s=0;se){var t=e-k[b];return k[b]=e,t}}else return k[b]=e,e;return 0},max:function(b,E,k,l){var e=l[E];if(p(e))if(e=Number(e),p(k[b])){if(k[b]f&&fk){var x=u===b?1:6,z=u===b?"M12":"M1";return function(I,O){var D=g.c2d(I,b,i),B=D.indexOf("-",x);B>0&&(D=D.slice(0,B));var F=g.d2c(D,0,i);if(Ft?c>k?c>b*1.1?b:c>E*1.1?E:k:c>l?l:c>e?e:t:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function o(c,m,h,v,g,i){if(v&&c>k){var w=s(m,g,i),S=s(h,g,i),M=c===b?0:1;return w[M]!==S[M]}return Math.floor(h/c)-Math.floor(m/c)>.1}function s(c,m,h){var v=m.c2d(c,b,h).split("-");return v[0]===""&&(v.unshift(),v[0]="-"+v[0]),v}}}),Z5=ze({"src/traces/histogram/calc.js"(J,V){"use strict";var p=ao(),b=Nr(),E=mi(),k=Gi(),{hasColorscale:l}=Bf(),e=Qf(),t=x1(),n=H5(),r=W5(),a=Y5(),o=X5();function s(g,i){var w=[],S=[],M=i.orientation==="h",C=k.getFromId(g,M?i.yaxis:i.xaxis),_=M?"y":"x",T={x:"y",y:"x"}[_],f=i[_+"calendar"],u=i.cumulative,A,x=c(g,i,C,_),z=x[0],I=x[1],O=typeof z.size=="string",D=[],B=O?D:z,F=[],P=[],j=[],U=0,$=i.histnorm,Q=i.histfunc,re=$.indexOf("density")!==-1,ne,se,G;u.enabled&&re&&($=$.replace(/ ?density$/,""),re=!1);var X=Q==="max"||Q==="min",K=X?null:0,H=n.count,Y=r[$],q=!1,Z=function(Ae){return C.r2c(Ae,0,f)},ee;for(b.isArrayOrTypedArray(i[T])&&Q!=="count"&&(ee=i[T],q=Q==="avg",H=n[Q]),A=Z(z.start),se=Z(z.end)+(A-k.tickIncrement(A,z.size,!1,f))/1e6;A=0&&G=ce;A--)if(S[A]){ve=A;break}for(A=ce;A<=ve;A++)if(p(w[A])&&p(S[A])){var le={p:w[A],s:S[A],b:0};u.enabled||(le.pts=j[A],we?le.ph0=le.ph1=j[A].length?I[j[A][0]]:w[A]:(i._computePh=!0,le.ph0=Ge(D[A]),le.ph1=Ge(D[A+1],!0))),_e.push(le)}return _e.length===1&&(_e[0].width1=k.tickIncrement(_e[0].p,z.size,!1,f)-_e[0].p),l(i,"marker")&&e(g,i,{vals:i.marker.color,containerStr:"marker",cLetter:"c"}),l(i,"marker.line")&&e(g,i,{vals:i.marker.line.color,containerStr:"marker.line",cLetter:"c"}),t(_e,i),b.isArrayOrTypedArray(i.selectedpoints)&&b.tagSelected(_e,i,Ie),_e}function c(g,i,w,S,M){var C,_=S+"bins",T=g._fullLayout,f=i["_"+S+"bingroup"],u=T._histogramBinOpts[f],A=T.barmode==="overlay",x,z,I,O,D,B,F,P=function(Ge){return w.r2c(Ge,0,O)},j=function(Ge){return w.c2r(Ge,0,O)},U=w.type==="date"?function(Ge){return Ge||Ge===0?b.cleanDate(Ge,null,O):null}:function(Ge){return p(Ge)?Number(Ge):null};function $(Ge,ke,_e){ke[Ge+"Found"]?(ke[Ge]=U(ke[Ge]),ke[Ge]===null&&(ke[Ge]=_e[Ge])):(B[Ge]=ke[Ge]=_e[Ge],b.nestedProperty(z[0],_+"."+Ge).set(_e[Ge]))}if(i["_"+S+"autoBinFinished"])delete i["_"+S+"autoBinFinished"];else{z=u.traces;var Q=[],re=!0,ne=!1,se=!1;for(x=0;xw.r2l(ae)&&(xe=k.tickIncrement(xe,u.size,!0,O)),Y.start=w.l2r(xe),ee||b.nestedProperty(i,_+".start").set(Y.start)}var we=u.end,Me=w.r2l(H.end),Se=Me!==void 0;if((u.endFound||Se)&&Me!==w.r2l(we)){var Ie=Se?Me:b.aggNums(Math.max,null,D);Y.end=w.l2r(Ie),Se||b.nestedProperty(i,_+".start").set(Y.end)}var Ve="autobin"+S;return i._input[Ve]===!1&&(i._input[_]=b.extendFlat({},i[_]||{}),delete i._input[Ve],delete i[Ve]),[Y,D]}function m(g,i,w,S,M){var C=g._fullLayout,_=h(g,i),T=!1,f=1/0,u=[i],A,x,z;for(A=0;A<_.length;A++)if(x=_[A],x===i)T=!0;else if(!T)z=C._histogramBinOpts[x["_"+S+"bingroup"]],f=Math.min(f,z.size||x[M].size);else{var I=c(g,x,w,S,!0),O=I[0],D=I[2];x["_"+S+"autoBinFinished"]=1,x["_"+S+"pos0"]=I[1],D?u.push(x):f=Math.min(f,O.size)}var B=new Array(u.length);for(A=0;A=0;S--)T(S);else if(i==="increasing"){for(S=1;S=0;S--)g[S]+=g[S+1];w==="exclude"&&(g.push(0),g.shift())}}V.exports={calc:s,calcAllAutoBins:c}}}),OF=ze({"src/traces/histogram2d/calc.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=H5(),k=W5(),l=Y5(),e=X5(),t=Z5().calcAllAutoBins;V.exports=function(s,c){var m=b.getFromId(s,c.xaxis),h=b.getFromId(s,c.yaxis),v=c.xcalendar,g=c.ycalendar,i=function(vt){return m.r2c(vt,0,v)},w=function(vt){return h.r2c(vt,0,g)},S=function(vt){return m.c2r(vt,0,v)},M=function(vt){return h.c2r(vt,0,g)},C,_,T,f,u=t(s,c,m,"x"),A=u[0],x=u[1],z=t(s,c,h,"y"),I=z[0],O=z[1],D=c._length;x.length>D&&x.splice(D,x.length-D),O.length>D&&O.splice(D,O.length-D);var B=[],F=[],P=[],j=typeof A.size=="string",U=typeof I.size=="string",$=[],Q=[],re=j?$:A,ne=U?Q:I,se=0,G=[],X=[],K=c.histnorm,H=c.histfunc,Y=K.indexOf("density")!==-1,q=H==="max"||H==="min",Z=q?null:0,ee=E.count,ae=k[K],he=!1,xe=[],we=[],Me="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";Me&&H!=="count"&&(he=H==="avg",ee=E[H]);var Se=A.size,Ie=i(A.start),Ve=i(A.end)+(Ie-b.tickIncrement(Ie,Se,!1,v))/1e6;for(C=Ie;C=0&&T=0&&fb;a++)r=l(t,n,k(r));return r>b&&p.log("interp2d didn't converge quickly",r),t};function l(e,t,n){var r=0,a,o,s,c,m,h,v,g,i,w,S,M,C;for(c=0;cM&&(r=Math.max(r,Math.abs(e[o][s]-S)/(C-M))))}return r}}}),cb=ze({"src/traces/heatmap/find_empties.js"(J,V){"use strict";var p=Nr().maxRowLength;V.exports=function(E){var k=[],l={},e=[],t=E[0],n=[],r=[0,0,0],a=p(E),o,s,c,m,h,v,g,i;for(s=0;s=0;h--)m=e[h],s=m[0],c=m[1],v=((l[[s-1,c]]||r)[2]+(l[[s+1,c]]||r)[2]+(l[[s,c-1]]||r)[2]+(l[[s,c+1]]||r)[2])/20,v&&(g[m]=[s,c,v],e.splice(h,1),i=!0);if(!i)throw"findEmpties iterated with no new neighbors";for(m in g)l[m]=g[m],k.push(g[m])}return k.sort(function(w,S){return S[2]-w[2]})}}}),$5=ze({"src/traces/heatmap/make_bound_array.js"(J,V){"use strict";var p=mi(),b=Nr().isArrayOrTypedArray;V.exports=function(k,l,e,t,n,r){var a=[],o=p.traceIs(k,"contour"),s=p.traceIs(k,"histogram"),c,m,h,v=b(l)&&l.length>1;if(v&&!s&&r.type!=="category"){var g=l.length;if(g<=n){if(o)a=Array.from(l).slice(0,n);else if(n===1)r.type==="log"?a=[.5*l[0],2*l[0]]:a=[l[0]-.5,l[0]+.5];else if(r.type==="log"){for(a=[Math.pow(l[0],1.5)/Math.pow(l[1],.5)],h=1;h1){var K=(X[X.length-1]-X[0])/(X.length-1),H=Math.abs(K/100);for(D=0;DH)return!1}return!0}g._islinear=!1,i.type==="log"||w.type==="log"?C==="fast"&&P("log axis found"):j(_)?j(A)?g._islinear=!0:C==="fast"&&P("y scale is not linear"):C==="fast"&&P("x scale is not linear");var U=b.maxRowLength(O),$=g.xtype==="scaled"?"":_,Q=o(g,$,T,f,U,i),re=g.ytype==="scaled"?"":A,ne=o(g,re,x,z,O.length,w);g._extremes[i._id]=E.findExtremes(i,Q),g._extremes[w._id]=E.findExtremes(w,ne);var se={x:Q,y:ne,z:O,text:g._text||g.text,hovertext:g._hovertext||g.hovertext};if(g.xperiodalignment&&u&&(se.orig_x=u),g.yperiodalignment&&I&&(se.orig_y=I),$&&$.length===Q.length-1&&(se.xCenter=$),re&&re.length===ne.length-1&&(se.yCenter=re),M&&(se.xRanges=B.xRanges,se.yRanges=B.yRanges,se.pts=B.pts),S||e(v,g,{vals:O,cLetter:"z"}),S&&g.contours&&g.contours.coloring==="heatmap"){var G={type:g.type==="contour"?"heatmap":"histogram2d",xcalendar:g.xcalendar,ycalendar:g.ycalendar};se.xfill=o(G,$,T,f,U,i),se.yfill=o(G,re,x,z,O.length,w)}return[se]};function c(h){for(var v=[],g=h.length,i=0;i0;)H=u.c2p(P[ee]),ee--;for(H0;)Z=A.c2p(j[ee]),ee--;Z=u._length||H<=0||q>=A._length||Z<=0;if(Ie){var Ve=z.selectAll("image").data([]);Ve.exit().remove(),i(z);return}var Ge,ke;xe==="fast"?(Ge=se,ke=ne):(Ge=Me,ke=Se);var _e=document.createElement("canvas");_e.width=Ge,_e.height=ke;var ce=_e.getContext("2d",{willReadFrequently:!0}),ve=a(O,{noNumericCheck:!0,returnArray:!0}),le,Ae;xe==="fast"?(le=G?function(zr){return se-1-zr}:l.identity,Ae=X?function(zr){return ne-1-zr}:l.identity):(le=function(zr){return l.constrain(Math.round(u.c2p(P[zr])-K),0,Me)},Ae=function(zr){return l.constrain(Math.round(A.c2p(j[zr])-q),0,Se)});var Be=Ae(0),Xe=[Be,Be],Ye=G?0:1,yt=X?0:1,gt=0,Tt=0,At=0,$t=0,rr,_r,Xt,or,Ot;function vt(zr,Lr=0){if(zr===void 0)return[0,0,0,0];var aa=ve(zr);return aa[0]=Math.round(aa[0]),aa[1]=Math.round(aa[1]),aa[2]=Math.round(aa[2]),gt+=Lr,Tt+=aa[0]*Lr,At+=aa[1]*Lr,$t+=aa[2]*Lr,aa}function ht(zr,Lr,aa,Sa){var wa=zr[aa.bin0];if(wa===void 0)return vt(void 0,1);var pn=zr[aa.bin1],tn=Lr[aa.bin0],ai=Lr[aa.bin1],rn=pn-wa||0,Ri=tn-wa||0,Gn;return pn===void 0?ai===void 0?Gn=0:tn===void 0?Gn=2*(ai-wa):Gn=(2*ai-tn-wa)*2/3:ai===void 0?tn===void 0?Gn=0:Gn=(2*wa-pn-tn)*2/3:tn===void 0?Gn=(2*ai-pn-wa)*2/3:Gn=ai+wa-pn-tn,vt(wa+aa.frac*rn+Sa.frac*(Ri+aa.frac*Gn))}if(xe!=="default"){var De=0,Ne;try{Ne=new Uint8Array(Ge*ke*4)}catch{Ne=new Array(Ge*ke*4)}if(xe==="smooth"){var We=U||P,Ke=$||j,Je=new Array(We.length),et=new Array(Ke.length),Mt=new Array(Me),pt=U?S:w,Pt=$?S:w,Ct,qt,Vt;for(ee=0;eeNn||Nn>A._length))for(ae=La;aeUn||Un>u._length)){var li=t({x:yn,y:ja},O,C._fullLayout);li.x=yn,li.y=ja;var Yn=I.z[ee][ae];Yn===void 0?(li.z="",li.zLabel=""):(li.z=Yn,li.zLabel=k.tickText(Rr,Yn,"hover").text);var on=I.text&&I.text[ee]&&I.text[ee][ae];(on===void 0||on===!1)&&(on=""),li.text=on;var en=l.texttemplateString({data:[li,O._meta],fallback:O.texttemplatefallback,labels:li,locale:C._fullLayout._d3locale,template:ur});if(en){var vi=en.split("
"),Yi=vi.length,Ja=0;for(he=0;he=w[0].length||z<0||z>w.length)return}else{if(p.inbox(n-g[0],n-g[g.length-1],0)>0||p.inbox(r-i[0],r-i[i.length-1],0)>0)return;if(s){var I;for(T=[2*g[0]-g[1]],I=1;I=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),M1=ze({"src/traces/contour/attributes.js"(J,V){"use strict";var p=rg(),b=su(),E=Il(),k=E.axisHoverFormat,l=E.descriptionOnlyNumbers,e=qs(),t=Uc().dash,n=Qs(),r=Ki().extendFlat,a=_b(),o=a.COMPARISON_OPS2,s=a.INTERVAL_OPS,c=b.line;V.exports=r({z:p.z,x:p.x,x0:p.x0,dx:p.dx,y:p.y,y0:p.y0,dy:p.dy,xperiod:p.xperiod,yperiod:p.yperiod,xperiod0:b.xperiod0,yperiod0:b.yperiod0,xperiodalignment:p.xperiodalignment,yperiodalignment:p.yperiodalignment,text:p.text,hovertext:p.hovertext,transpose:p.transpose,xtype:p.xtype,ytype:p.ytype,xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z",1),hovertemplate:p.hovertemplate,hovertemplatefallback:p.hovertemplatefallback,texttemplate:r({},p.texttemplate,{}),texttemplatefallback:p.texttemplatefallback,textfont:r({},p.textfont,{}),hoverongaps:p.hoverongaps,connectgaps:r({},p.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:n({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:l("contour label")},operation:{valType:"enumerated",values:[].concat(o).concat(s),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:r({},c.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:t,smoothing:r({},c.smoothing,{}),editType:"plot"},zorder:b.zorder},e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),tT=ze({"src/traces/histogram2dcontour/attributes.js"(J,V){"use strict";var p=yb(),b=M1(),E=qs(),k=Il().axisHoverFormat,l=Ki().extendFlat;V.exports=l({x:p.x,y:p.y,z:p.z,marker:p.marker,histnorm:p.histnorm,histfunc:p.histfunc,nbinsx:p.nbinsx,xbins:p.xbins,nbinsy:p.nbinsy,ybins:p.ybins,autobinx:p.autobinx,autobiny:p.autobiny,bingroup:p.bingroup,xbingroup:p.xbingroup,ybingroup:p.ybingroup,autocontour:b.autocontour,ncontours:b.ncontours,contours:b.contours,line:{color:b.line.color,width:l({},b.line.width,{dflt:.5}),dash:b.line.dash,smoothing:b.line.smoothing,editType:"plot"},xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z",1),hovertemplate:p.hovertemplate,hovertemplatefallback:p.hovertemplatefallback,texttemplate:b.texttemplate,texttemplatefallback:b.texttemplatefallback,textfont:b.textfont},E("",{cLetter:"z",editTypeOverride:"calc"}))}}),xb=ze({"src/traces/contour/contours_defaults.js"(J,V){"use strict";V.exports=function(b,E,k,l){var e=l("contours.start"),t=l("contours.end"),n=e===!1||t===!1,r=k("contours.size"),a;n?a=E.autocontour=!0:a=k("autocontour",!1),(a||!r)&&k("ncontours")}}}),rT=ze({"src/traces/contour/label_defaults.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k,l,e){e||(e={});var t=E("contours.showlabels");if(t){var n=k.font;p.coerceFont(E,"contours.labelfont",n,{overrideDflt:{color:l}}),E("contours.labelformat")}e.hasHover!==!1&&E("zhoverformat")}}}),bb=ze({"src/traces/contour/style_defaults.js"(J,V){"use strict";var p=qc(),b=rT();V.exports=function(k,l,e,t,n){var r=e("contours.coloring"),a,o="";r==="fill"&&(a=e("contours.showlines")),a!==!1&&(r!=="lines"&&(o=e("line.color","#000")),e("line.width",.5),e("line.dash")),r!=="none"&&(k.showlegend!==!0&&(l.showlegend=!1),l._dfltShowLegend=!1,p(k,l,t,e,{prefix:"",cLetter:"z"})),e("line.smoothing"),b(e,t,o,n)}}}),$F=ze({"src/traces/histogram2dcontour/defaults.js"(J,V){"use strict";var p=Nr(),b=eT(),E=xb(),k=bb(),l=A1(),e=tT();V.exports=function(n,r,a,o){function s(m,h){return p.coerce(n,r,e,m,h)}function c(m){return p.coerce2(n,r,e,m)}b(n,r,s,o),r.visible!==!1&&(E(n,r,s,c),k(n,r,s,o),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&l(s,o))}}}),aT=ze({"src/traces/contour/set_contours.js"(J,V){"use strict";var p=Gi(),b=Nr();V.exports=function(l,e){var t=l.contours;if(l.autocontour){var n=l.zmin,r=l.zmax;(l.zauto||n===void 0)&&(n=b.aggNums(Math.min,null,e)),(l.zauto||r===void 0)&&(r=b.aggNums(Math.max,null,e));var a=E(n,r,l.ncontours);t.size=a.dtick,t.start=p.tickFirst(a),a.range.reverse(),t.end=p.tickFirst(a),t.start===n&&(t.start+=t.size),t.end===r&&(t.end-=t.size),t.start>t.end&&(t.start=t.end=(t.start+t.end)/2),l._input.contours||(l._input.contours={}),b.extendFlat(l._input.contours,{start:t.start,end:t.end,size:t.size}),l._input.autocontour=!0}else if(t.type!=="constraint"){var o=t.start,s=t.end,c=l._input.contours;if(o>s&&(t.start=c.start=s,s=t.end=c.end=o,o=t.start),!(t.size>0)){var m;o===s?m=1:m=E(o,s,l.ncontours).dtick,c.size=t.size=m}}};function E(k,l,e){var t={type:"linear",range:[k,l]};return p.autoTicks(t,(l-k)/(e||15)),t}}}),S1=ze({"src/traces/contour/end_plus.js"(J,V){"use strict";V.exports=function(b){return b.end+b.size/1e6}}}),nT=ze({"src/traces/contour/calc.js"(J,V){"use strict";var p=fl(),b=fb(),E=aT(),k=S1();V.exports=function(e,t){var n=b(e,t),r=n[0].z;E(t,r);var a=t.contours,o=p.extractOpts(t),s;if(a.coloring==="heatmap"&&o.auto&&t.autocontour===!1){var c=a.start,m=k(a),h=a.size||1,v=Math.floor((m-c)/h)+1;isFinite(h)||(h=1,v=1);var g=c-h/2,i=g+v*h;s=[g,i]}else s=r;return p.calc(e,t,{vals:s,cLetter:"z"}),n}}}),E1=ze({"src/traces/contour/constants.js"(J,V){"use strict";V.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}}}),iT=ze({"src/traces/contour/make_crossings.js"(J,V){"use strict";var p=E1();V.exports=function(k){var l=k[0].z,e=l.length,t=l[0].length,n=e===2||t===2,r,a,o,s,c,m,h,v,g;for(a=0;aE?0:1)+(k[0][1]>E?0:2)+(k[1][1]>E?0:4)+(k[1][0]>E?0:8);if(l===5||l===10){var e=(k[0][0]+k[0][1]+k[1][0]+k[1][1])/4;return E>e?l===5?713:1114:l===5?104:208}return l===15?0:l}}}),oT=ze({"src/traces/contour/find_all_paths.js"(J,V){"use strict";var p=Nr(),b=E1();V.exports=function(r,a,o){var s,c,m,h,v;for(a=a||.01,o=o||.01,m=0;m20?(m=b.CHOOSESADDLE[m][(h[0]||h[1])<0?0:1],n.crossings[c]=b.SADDLEREMAINDER[m]):delete n.crossings[c],h=b.NEWDELTA[m],!h){p.log("Found bad marching index:",m,r,n.level);break}v.push(t(n,r,h)),r[0]+=h[0],r[1]+=h[1],c=r.join(","),E(v[v.length-1],v[v.length-2],o,s)&&v.pop();var C=h[0]&&(r[0]<0||r[0]>i-2)||h[1]&&(r[1]<0||r[1]>g-2),_=r[0]===w[0]&&r[1]===w[1]&&h[0]===S[0]&&h[1]===S[1];if(_||a&&C)break;m=n.crossings[c]}M===1e4&&p.log("Infinite loop in contour?");var T=E(v[0],v[v.length-1],o,s),f=0,u=.2*n.smoothing,A=[],x=0,z,I,O,D,B,F,P,j,U,$,Q;for(M=1;M=x;M--)if(z=A[M],z=x&&z+A[I]j&&U--,n.edgepaths[U]=Q.concat(v,$));break}G||(n.edgepaths[j]=v.concat($))}for(j=0;j20&&r?n===208||n===1114?o=a[0]===0?1:-1:s=a[1]===0?1:-1:b.BOTTOMSTART.indexOf(n)!==-1?s=1:b.LEFTSTART.indexOf(n)!==-1?o=1:b.TOPSTART.indexOf(n)!==-1?s=-1:o=-1,[o,s]}function t(n,r,a){var o=r[0]+Math.max(a[0],0),s=r[1]+Math.max(a[1],0),c=n.z[s][o],m=n.xaxis,h=n.yaxis;if(a[1]){var v=(n.level-c)/(n.z[s][o+1]-c),g=(v!==1?(1-v)*m.c2l(n.x[o]):0)+(v!==0?v*m.c2l(n.x[o+1]):0);return[m.c2p(m.l2c(g),!0),h.c2p(n.y[s],!0),o+v,s]}else{var i=(n.level-c)/(n.z[s+1][o]-c),w=(i!==1?(1-i)*h.c2l(n.y[s]):0)+(i!==0?i*h.c2l(n.y[s+1]):0);return[m.c2p(n.x[o],!0),h.c2p(h.l2c(w),!0),o,s+i]}}}}),KF=ze({"src/traces/contour/constraint_mapping.js"(J,V){"use strict";var p=_b(),b=ao();V.exports={"[]":k("[]"),"][":k("]["),">":l(">"),"<":l("<"),"=":l("=")};function E(e,t){var n=Array.isArray(t),r;function a(o){return b(o)?+o:null}return p.COMPARISON_OPS2.indexOf(e)!==-1?r=a(n?t[0]:t):p.INTERVAL_OPS.indexOf(e)!==-1?r=n?[a(t[0]),a(t[1])]:[a(t),a(t)]:p.SET_OPS.indexOf(e)!==-1&&(r=n?t.map(a):[a(t)]),r}function k(e){return function(t){t=E(e,t);var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return{start:n,end:r,size:r-n}}}function l(e){return function(t){return t=E(e,t),{start:t,end:1/0,size:1/0}}}}}),sT=ze({"src/traces/contour/empty_pathinfo.js"(J,V){"use strict";var p=Nr(),b=KF(),E=S1();V.exports=function(l,e,t){for(var n=l.type==="constraint"?b[l._operation](l.value):l,r=n.size,a=[],o=E(n),s=t.trace._carpetTrace,c=s?{xaxis:s.aaxis,yaxis:s.baxis,x:t.a,y:t.b}:{xaxis:e.xaxis,yaxis:e.yaxis,x:t.x,y:t.y},m=n.start;m1e3){p.warn("Too many contours, clipping at 1000",l);break}return a}}}),lT=ze({"src/traces/contour/convert_to_constraints.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){var l,e,t,n=function(o){return o.reverse()},r=function(o){return o};switch(k){case"=":case"<":return E;case">":for(E.length!==1&&p.warn("Contour data invalid for the specified inequality operation."),e=E[0],l=0;lt.level||t.starts.length&&e===t.level)}break;case"constraint":if(E.prefixBoundary=!1,E.edgepaths.length)return;var n=E.x.length,r=E.y.length,a=-1/0,o=1/0;for(l=0;l":s>a&&(E.prefixBoundary=!0);break;case"<":(sa||E.starts.length&&m===o)&&(E.prefixBoundary=!0);break;case"][":c=Math.min(s[0],s[1]),m=Math.max(s[0],s[1]),ca&&(E.prefixBoundary=!0);break}break}}}}),wb=ze({"src/traces/contour/plot.js"(J){"use strict";var V=ci(),p=Nr(),b=$i(),E=fl(),k=Cs(),l=Gi(),e=Dd(),t=db(),n=iT(),r=oT(),a=sT(),o=lT(),s=uT(),c=E1(),m=c.LABELOPTIMIZER;J.plot=function(_,T,f,u){var A=T.xaxis,x=T.yaxis;p.makeTraceGroups(u,f,"contour").each(function(z){var I=V.select(this),O=z[0],D=O.trace,B=O.x,F=O.y,P=D.contours,j=a(P,T,O),U=p.ensureSingle(I,"g","heatmapcoloring"),$=[];P.coloring==="heatmap"&&($=[z]),t(_,T,$,U),n(j),r(j);var Q=A.c2p(B[0],!0),re=A.c2p(B[B.length-1],!0),ne=x.c2p(F[0],!0),se=x.c2p(F[F.length-1],!0),G=[[Q,se],[re,se],[re,ne],[Q,ne]],X=j;P.type==="constraint"&&(X=o(j,P._operation)),h(I,G,P),v(I,X,G,P),i(I,j,_,O,P),S(I,T,_,O,G)})};function h(C,_,T){var f=p.ensureSingle(C,"g","contourbg"),u=f.selectAll("path").data(T.coloring==="fill"?[0]:[]);u.enter().append("path"),u.exit().remove(),u.attr("d","M"+_.join("L")+"Z").style("stroke","none")}function v(C,_,T,f){var u=f.coloring==="fill"||f.type==="constraint"&&f._operation!=="=",A="M"+T.join("L")+"Z";u&&s(_,f);var x=p.ensureSingle(C,"g","contourfill"),z=x.selectAll("path").data(u?_:[]);z.enter().append("path"),z.exit().remove(),z.each(function(I){var O=(I.prefixBoundary?A:"")+g(I,T);O?V.select(this).attr("d",O).style("stroke","none"):V.select(this).remove()})}function g(C,_){var T="",f=0,u=C.edgepaths.map(function(Q,re){return re}),A=!0,x,z,I,O,D,B;function F(Q){return Math.abs(Q[1]-_[0][1])<.01}function P(Q){return Math.abs(Q[1]-_[2][1])<.01}function j(Q){return Math.abs(Q[0]-_[0][0])<.01}function U(Q){return Math.abs(Q[0]-_[2][0])<.01}for(;u.length;){for(B=b.smoothopen(C.edgepaths[f],C.smoothing),T+=A?B:B.replace(/^M/,"L"),u.splice(u.indexOf(f),1),x=C.edgepaths[f][C.edgepaths[f].length-1],O=-1,I=0;I<4;I++){if(!x){p.log("Missing end?",f,C);break}for(F(x)&&!U(x)?z=_[1]:j(x)?z=_[0]:P(x)?z=_[3]:U(x)&&(z=_[2]),D=0;D=0&&(z=$,O=D):Math.abs(x[1]-z[1])<.01?Math.abs(x[1]-$[1])<.01&&($[0]-x[0])*(z[0]-$[0])>=0&&(z=$,O=D):p.log("endpt to newendpt is not vert. or horz.",x,z,$)}if(x=z,O>=0)break;T+="L"+z}if(O===C.edgepaths.length){p.log("unclosed perimeter path");break}f=O,A=u.indexOf(f)===-1,A&&(f=u[0],T+="Z")}for(f=0;fm.MAXCOST*2)break;F&&(z/=2),x=O-z/2,I=x+z*1.5}if(B<=m.MAXCOST)return D};function w(C,_,T,f){var u=_.width/2,A=_.height/2,x=C.x,z=C.y,I=C.theta,O=Math.cos(I)*u,D=Math.sin(I)*u,B=(x>f.center?f.right-x:x-f.left)/(O+Math.abs(Math.sin(I)*A)),F=(z>f.middle?f.bottom-z:z-f.top)/(Math.abs(D)+Math.cos(I)*A);if(B<1||F<1)return 1/0;var P=m.EDGECOST*(1/(B-1)+1/(F-1));P+=m.ANGLECOST*I*I;for(var j=x-O,U=z-D,$=x+O,Q=z+D,re=0;re=S)&&(t<=w&&(t=w),n>=S&&(n=S),a=Math.floor((n-t)/r)+1,o=0),i=0;iw&&(h.unshift(w),v.unshift(v[0])),h[h.length-1]2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(c=parseFloat(s.value[0]),s.value=[c,c+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:p(s.value)&&(c=parseFloat(s.value),s.value=[c,c+1])):(o("contours.value",0),p(s.value)||(t(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),ez=ze({"src/traces/contour/defaults.js"(J,V){"use strict";var p=Nr(),b=ob(),E=yd(),k=hT(),l=xb(),e=bb(),t=A1(),n=M1();V.exports=function(a,o,s,c){function m(i,w){return p.coerce(a,o,n,i,w)}function h(i){return p.coerce2(a,o,n,i)}var v=b(a,o,m,c);if(!v){o.visible=!1;return}E(a,o,c,m),m("xhoverformat"),m("yhoverformat"),m("text"),m("hovertext"),m("hoverongaps"),m("hovertemplate"),m("hovertemplatefallback");var g=m("contours.type")==="constraint";m("connectgaps",p.isArray1D(o.z)),g?k(a,o,m,c,s):(l(a,o,m,h),e(a,o,m,c)),o.contours&&o.contours.coloring==="heatmap"&&t(m,c),m("zorder")}}}),tz=ze({"src/traces/contour/index.js"(J,V){"use strict";V.exports={attributes:M1(),supplyDefaults:ez(),calc:nT(),plot:wb().plot,style:Tb(),colorbar:Ab(),hoverPoints:fT(),moduleType:"trace",name:"contour",basePlotModule:Du(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),rz=ze({"lib/contour.js"(J,V){"use strict";V.exports=tz()}}),dT=ze({"src/traces/scatterternary/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=Bd(),l=su(),e=ws(),t=qs(),n=Uc().dash,r=Ki().extendFlat,a=l.marker,o=l.line,s=a.line;V.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:r({},l.mode,{dflt:"markers"}),text:r({},l.text,{}),texttemplate:b({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:r({},l.hovertext,{}),line:{color:o.color,width:o.width,dash:n,backoff:o.backoff,shape:r({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:l.connectgaps,cliponaxis:l.cliponaxis,fill:r({},l.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:k(),marker:r({symbol:a.symbol,opacity:a.opacity,angle:a.angle,angleref:a.angleref,standoff:a.standoff,maxdisplayed:a.maxdisplayed,size:a.size,sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,line:r({width:s.width,dash:s.dash,editType:"calc"},t("marker.line")),gradient:a.gradient,editType:"calc"},t("marker")),textfont:l.textfont,textposition:l.textposition,selected:l.selected,unselected:l.unselected,hoverinfo:r({},e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:l.hoveron,hovertemplate:p(),hovertemplatefallback:E()}}}),az=ze({"src/traces/scatterternary/defaults.js"(J,V){"use strict";var p=Nr(),b=zd(),E=el(),k=id(),l=_d(),e=$m(),t=xd(),n=Od(),r=dT();V.exports=function(o,s,c,m){function h(C,_){return p.coerce(o,s,r,C,_)}var v=h("a"),g=h("b"),i=h("c"),w;if(v?(w=v.length,g?(w=Math.min(w,g.length),i&&(w=Math.min(w,i.length))):i?w=Math.min(w,i.length):w=0):g&&i&&(w=Math.min(g.length,i.length)),!w){s.visible=!1;return}s._length=w,h("sum"),h("text"),h("hovertext"),s.hoveron!=="fills"&&(h("hovertemplate"),h("hovertemplatefallback"));var S=w"),n.hovertemplate=m.hovertemplate,t}}}),lz=ze({"src/traces/scatterternary/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){if(E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),l[e]){var t=l[e];b.a=t.a,b.b=t.b,b.c=t.c}else b.a=E.a,b.b=E.b,b.c=E.c;return b}}}),uz=ze({"src/plots/ternary/ternary.js"(J,V){"use strict";var p=ci(),b=mi(),E=Nr(),k=E.strTranslate,l=E._,e=Qn(),t=$i(),n=Dd(),r=Ki().extendFlat,a=cl(),o=Gi(),s=_h(),c=Zl(),m=Fd(),h=m.freeMode,v=m.rectMode,g=qv(),i=_c().prepSelect,w=_c().selectOnClick,S=_c().clearOutline,M=_c().clearSelectionsCache,C=hc();function _(F,P){this.id=F.id,this.graphDiv=F.graphDiv,this.init(P),this.makeFramework(P),this.updateFx(P),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}V.exports=_;var T=_.prototype;T.init=function(F){this.container=F._ternarylayer,this.defs=F._defs,this.layoutId=F._uid,this.traceHash={},this.layers={}},T.plot=function(F,P){var j=this,U=P[j.id],$=P._size;j._hasClipOnAxisFalse=!1;for(var Q=0;Qf*G?(ae=G,ee=ae*f):(ee=se,ae=ee/f),he=re*ee/se,xe=ne*ae/G,q=P.l+P.w*$-ee/2,Z=P.t+P.h*(1-Q)-ae/2,j.x0=q,j.y0=Z,j.w=ee,j.h=ae,j.sum=X,j.xaxis={type:"linear",range:[K+2*Y-X,X-K-2*H],domain:[$-he/2,$+he/2],_id:"x"},n(j.xaxis,j.graphDiv._fullLayout),j.xaxis.setScale(),j.xaxis.isPtWithinRange=function(le){return le.a>=j.aaxis.range[0]&&le.a<=j.aaxis.range[1]&&le.b>=j.baxis.range[1]&&le.b<=j.baxis.range[0]&&le.c>=j.caxis.range[1]&&le.c<=j.caxis.range[0]},j.yaxis={type:"linear",range:[K,X-H-Y],domain:[Q-xe/2,Q+xe/2],_id:"y"},n(j.yaxis,j.graphDiv._fullLayout),j.yaxis.setScale(),j.yaxis.isPtWithinRange=function(){return!0};var we=j.yaxis.domain[0],Me=j.aaxis=r({},F.aaxis,{range:[K,X-H-Y],side:"left",tickangle:(+F.aaxis.tickangle||0)-30,domain:[we,we+xe*f],anchor:"free",position:0,_id:"y",_length:ee});n(Me,j.graphDiv._fullLayout),Me.setScale();var Se=j.baxis=r({},F.baxis,{range:[X-K-Y,H],side:"bottom",domain:j.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ee});n(Se,j.graphDiv._fullLayout),Se.setScale();var Ie=j.caxis=r({},F.caxis,{range:[X-K-H,Y],side:"right",tickangle:(+F.caxis.tickangle||0)+30,domain:[we,we+xe*f],anchor:"free",position:0,_id:"y",_length:ee});n(Ie,j.graphDiv._fullLayout),Ie.setScale();var Ve="M"+q+","+(Z+ae)+"h"+ee+"l-"+ee/2+",-"+ae+"Z";j.clipDef.select("path").attr("d",Ve),j.layers.plotbg.select("path").attr("d",Ve);var Ge="M0,"+ae+"h"+ee+"l-"+ee/2+",-"+ae+"Z";j.clipDefRelative.select("path").attr("d",Ge);var ke=k(q,Z);j.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",ke),j.clipDefRelative.select("path").attr("transform",null);var _e=k(q-Se._offset,Z+ae);j.layers.baxis.attr("transform",_e),j.layers.bgrid.attr("transform",_e);var ce=k(q+ee/2,Z)+"rotate(30)"+k(0,-Me._offset);j.layers.aaxis.attr("transform",ce),j.layers.agrid.attr("transform",ce);var ve=k(q+ee/2,Z)+"rotate(-30)"+k(0,-Ie._offset);j.layers.caxis.attr("transform",ve),j.layers.cgrid.attr("transform",ve),j.drawAxes(!0),j.layers.aline.select("path").attr("d",Me.showline?"M"+q+","+(Z+ae)+"l"+ee/2+",-"+ae:"M0,0").call(e.stroke,Me.linecolor||"#000").style("stroke-width",(Me.linewidth||0)+"px"),j.layers.bline.select("path").attr("d",Se.showline?"M"+q+","+(Z+ae)+"h"+ee:"M0,0").call(e.stroke,Se.linecolor||"#000").style("stroke-width",(Se.linewidth||0)+"px"),j.layers.cline.select("path").attr("d",Ie.showline?"M"+(q+ee/2)+","+Z+"l"+ee/2+","+ae:"M0,0").call(e.stroke,Ie.linecolor||"#000").style("stroke-width",(Ie.linewidth||0)+"px"),j.graphDiv._context.staticPlot||j.initInteractions(),t.setClipUrl(j.layers.frontplot,j._hasClipOnAxisFalse?null:j.clipId,j.graphDiv)},T.drawAxes=function(F){var P=this,j=P.graphDiv,U=P.id.slice(7)+"title",$=P.layers,Q=P.aaxis,re=P.baxis,ne=P.caxis;if(P.drawAx(Q),P.drawAx(re),P.drawAx(ne),F){var se=Math.max(Q.showticklabels?Q.tickfont.size/2:0,(ne.showticklabels?ne.tickfont.size*.75:0)+(ne.ticks==="outside"?ne.ticklen*.87:0)),G=(re.showticklabels?re.tickfont.size:0)+(re.ticks==="outside"?re.ticklen:0)+3;$["a-title"]=g.draw(j,"a"+U,{propContainer:Q,propName:P.id+".aaxis.title.text",placeholder:l(j,"Click to enter Component A title"),attributes:{x:P.x0+P.w/2,y:P.y0-Q.title.font.size/3-se,"text-anchor":"middle"}}),$["b-title"]=g.draw(j,"b"+U,{propContainer:re,propName:P.id+".baxis.title.text",placeholder:l(j,"Click to enter Component B title"),attributes:{x:P.x0-G,y:P.y0+P.h+re.title.font.size*.83+G,"text-anchor":"middle"}}),$["c-title"]=g.draw(j,"c"+U,{propContainer:ne,propName:P.id+".caxis.title.text",placeholder:l(j,"Click to enter Component C title"),attributes:{x:P.x0+P.w+G,y:P.y0+P.h+ne.title.font.size*.83+G,"text-anchor":"middle"}})}},T.drawAx=function(F){var P=this,j=P.graphDiv,U=F._name,$=U.charAt(0),Q=F._id,re=P.layers[U],ne=30,se=$+"tickLayout",G=u(F);P[se]!==G&&(re.selectAll("."+Q+"tick").remove(),P[se]=G),F.setScale();var X=o.calcTicks(F),K=o.clipEnds(F,X),H=o.makeTransTickFn(F),Y=o.getTickSigns(F)[2],q=E.deg2rad(ne),Z=Y*(F.linewidth||1)/2,ee=Y*F.ticklen,ae=P.w,he=P.h,xe=$==="b"?"M0,"+Z+"l"+Math.sin(q)*ee+","+Math.cos(q)*ee:"M"+Z+",0l"+Math.cos(q)*ee+","+-Math.sin(q)*ee,we={a:"M0,0l"+he+",-"+ae/2,b:"M0,0l-"+ae/2+",-"+he,c:"M0,0l-"+he+","+ae/2}[$];o.drawTicks(j,F,{vals:F.ticks==="inside"?K:X,layer:re,path:xe,transFn:H,crisp:!1}),o.drawGrid(j,F,{vals:K,layer:P.layers[$+"grid"],path:we,transFn:H,crisp:!1}),o.drawLabels(j,F,{vals:X,layer:re,transFn:H,labelFns:o.makeLabelFns(F,0,ne)})};function u(F){return F.ticks+String(F.ticklen)+String(F.showticklabels)}var A=C.MINZOOM/2+.87,x="m-0.87,.5h"+A+"v3h-"+(A+5.2)+"l"+(A/2+2.6)+",-"+(A*.87+4.5)+"l2.6,1.5l-"+A/2+","+A*.87+"Z",z="m0.87,.5h-"+A+"v3h"+(A+5.2)+"l-"+(A/2+2.6)+",-"+(A*.87+4.5)+"l-2.6,1.5l"+A/2+","+A*.87+"Z",I="m0,1l"+A/2+","+A*.87+"l2.6,-1.5l-"+(A/2+2.6)+",-"+(A*.87+4.5)+"l-"+(A/2+2.6)+","+(A*.87+4.5)+"l2.6,1.5l"+A/2+",-"+A*.87+"Z",O="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",D=!0;T.clearOutline=function(){M(this.dragOptions),S(this.dragOptions.gd)},T.initInteractions=function(){var F=this,P=F.layers.plotbg.select("path").node(),j=F.graphDiv,U=j._fullLayout._zoomlayer,$,Q;this.dragOptions={element:P,gd:j,plotinfo:{id:F.id,domain:j._fullLayout[F.id].domain,xaxis:F.xaxis,yaxis:F.yaxis},subplot:F.id,prepFn:function(_e,ce,ve){F.dragOptions.xaxes=[F.xaxis],F.dragOptions.yaxes=[F.yaxis],$=j._fullLayout._invScaleX,Q=j._fullLayout._invScaleY;var le=F.dragOptions.dragmode=j._fullLayout.dragmode;h(le)?F.dragOptions.minDrag=1:F.dragOptions.minDrag=void 0,le==="zoom"?(F.dragOptions.moveFn=Se,F.dragOptions.clickFn=ae,F.dragOptions.doneFn=Ie,he(_e,ce,ve)):le==="pan"?(F.dragOptions.moveFn=Ge,F.dragOptions.clickFn=ae,F.dragOptions.doneFn=ke,Ve(),F.clearOutline(j)):(v(le)||h(le))&&i(_e,ce,ve,F.dragOptions,le)}};var re,ne,se,G,X,K,H,Y,q,Z;function ee(_e){var ce={};return ce[F.id+".aaxis.min"]=_e.a,ce[F.id+".baxis.min"]=_e.b,ce[F.id+".caxis.min"]=_e.c,ce}function ae(_e,ce){var ve=j._fullLayout.clickmode;B(j),_e===2&&(j.emit("plotly_doubleclick",null),b.call("_guiRelayout",j,ee({a:0,b:0,c:0}))),ve.indexOf("select")>-1&&_e===1&&w(ce,j,[F.xaxis],[F.yaxis],F.id,F.dragOptions),ve.indexOf("event")>-1&&c.click(j,ce,F.id)}function he(_e,ce,ve){var le=P.getBoundingClientRect();re=ce-le.left,ne=ve-le.top,j._fullLayout._calcInverseTransform(j);var Ae=j._fullLayout._invTransform,Be=E.apply3DTransform(Ae)(re,ne);re=Be[0],ne=Be[1],se={a:F.aaxis.range[0],b:F.baxis.range[1],c:F.caxis.range[1]},X=se,G=F.aaxis.range[1]-se.a,K=e.luminosity(F.graphDiv._fullLayout[F.id].bgcolor),H="M0,"+F.h+"L"+F.w/2+", 0L"+F.w+","+F.h+"Z",Y=!1,q=U.append("path").attr("class","zoombox").attr("transform",k(F.x0,F.y0)).style({fill:K>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",H),Z=U.append("path").attr("class","zoombox-corners").attr("transform",k(F.x0,F.y0)).style({fill:e.background,stroke:e.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),F.clearOutline(j)}function xe(_e,ce){return 1-ce/F.h}function we(_e,ce){return 1-(_e+(F.h-ce)/Math.sqrt(3))/F.w}function Me(_e,ce){return(_e-(F.h-ce)/Math.sqrt(3))/F.w}function Se(_e,ce){var ve=re+_e*$,le=ne+ce*Q,Ae=Math.max(0,Math.min(1,xe(re,ne),xe(ve,le))),Be=Math.max(0,Math.min(1,we(re,ne),we(ve,le))),Xe=Math.max(0,Math.min(1,Me(re,ne),Me(ve,le))),Ye=(Ae/2+Xe)*F.w,yt=(1-Ae/2-Be)*F.w,gt=(Ye+yt)/2,Tt=yt-Ye,At=(1-Ae)*F.h,$t=At-Tt/f;Tt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Z.transition().style("opacity",1).duration(200),Y=!0),j.emit("plotly_relayouting",ee(X))}function Ie(){B(j),X!==se&&(b.call("_guiRelayout",j,ee(X)),D&&j.data&&j._context.showTips&&(E.notifier(l(j,"Double-click to zoom back out"),"long",j),D=!1))}function Ve(){se={a:F.aaxis.range[0],b:F.baxis.range[1],c:F.caxis.range[1]},X=se}function Ge(_e,ce){var ve=_e/F.xaxis._m,le=ce/F.yaxis._m;X={a:se.a-le,b:se.b+(ve+le)/2,c:se.c-(ve-le)/2};var Ae=[X.a,X.b,X.c].sort(E.sorterAsc),Be={a:Ae.indexOf(X.a),b:Ae.indexOf(X.b),c:Ae.indexOf(X.c)};Ae[0]<0&&(Ae[1]+Ae[0]/2<0?(Ae[2]+=Ae[0]+Ae[1],Ae[0]=Ae[1]=0):(Ae[2]+=Ae[0]/2,Ae[1]+=Ae[0]/2,Ae[0]=0),X={a:Ae[Be.a],b:Ae[Be.b],c:Ae[Be.c]},ce=(se.a-X.a)*F.yaxis._m,_e=(se.c-X.c-se.b+X.b)*F.xaxis._m);var Xe=k(F.x0+_e,F.y0+ce);F.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Xe);var Ye=k(-_e,-ce);F.clipDefRelative.select("path").attr("transform",Ye),F.aaxis.range=[X.a,F.sum-X.b-X.c],F.baxis.range=[F.sum-X.a-X.c,X.b],F.caxis.range=[F.sum-X.a-X.b,X.c],F.drawAxes(!1),F._hasClipOnAxisFalse&&F.plotContainer.select(".scatterlayer").selectAll(".trace").call(t.hideOutsideRangePoints,F),j.emit("plotly_relayouting",ee(X))}function ke(){b.call("_guiRelayout",j,ee(X))}P.onmousemove=function(_e){c.hover(j,_e,F.id),j._fullLayout._lasthover=P,j._fullLayout._hoversubplot=F.id},P.onmouseout=function(_e){j._dragging||s.unhover(j,_e)},s.init(this.dragOptions)};function B(F){p.select(F).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),pT=ze({"src/plots/ternary/layout_attributes.js"(J,V){"use strict";var p=fc(),b=Ml().attributes,E=cf(),k=Al().overrideAll,l=Ki().extendFlat,e={title:{text:E.title.text,font:E.title.font},color:E.color,tickmode:E.minor.tickmode,nticks:l({},E.nticks,{dflt:6,min:1}),tick0:E.tick0,dtick:E.dtick,tickvals:E.tickvals,ticktext:E.ticktext,ticks:E.ticks,ticklen:E.ticklen,tickwidth:E.tickwidth,tickcolor:E.tickcolor,ticklabelstep:E.ticklabelstep,showticklabels:E.showticklabels,labelalias:E.labelalias,showtickprefix:E.showtickprefix,tickprefix:E.tickprefix,showticksuffix:E.showticksuffix,ticksuffix:E.ticksuffix,showexponent:E.showexponent,exponentformat:E.exponentformat,minexponent:E.minexponent,separatethousands:E.separatethousands,tickfont:E.tickfont,tickangle:E.tickangle,tickformat:E.tickformat,tickformatstops:E.tickformatstops,hoverformat:E.hoverformat,showline:l({},E.showline,{dflt:!0}),linecolor:E.linecolor,linewidth:E.linewidth,showgrid:l({},E.showgrid,{dflt:!0}),gridcolor:E.gridcolor,gridwidth:E.gridwidth,griddash:E.griddash,layer:E.layer,min:{valType:"number",dflt:0,min:0}},t=V.exports=k({domain:b({name:"ternary"}),bgcolor:{valType:"color",dflt:p.background},sum:{valType:"number",dflt:1,min:0},aaxis:e,baxis:e,caxis:e},"plot","from-root");t.uirevision={valType:"any",editType:"none"},t.aaxis.uirevision=t.baxis.uirevision=t.caxis.uirevision={valType:"any",editType:"none"}}}),Zv=ze({"src/plots/subplot_defaults.js"(J,V){"use strict";var p=Nr(),b=hs(),E=Ml().defaults;V.exports=function(l,e,t,n){var r=n.type,a=n.attributes,o=n.handleDefaults,s=n.partition||"x",c=e._subplots[r],m=c.length,h=m&&c[0].replace(/\d+$/,""),v,g;function i(C,_){return p.coerce(v,g,a,C,_)}for(var w=0;w=w&&(T.min=0,f.min=0,u.min=0,m.aaxis&&delete m.aaxis.min,m.baxis&&delete m.baxis.min,m.caxis&&delete m.caxis.min)}function c(m,h,v,g){var i=a[h._name];function w(A,x){return E.coerce(m,h,i,A,x)}w("uirevision",g.uirevision),h.type="linear";var S=w("color"),M=S!==i.color.dflt?S:v.font.color,C=h._name,_=C.charAt(0).toUpperCase(),T="Component "+_,f=w("title.text",T);h._hovertitle=f===T?f:_,E.coerceFont(w,"title.font",v.font,{overrideDflt:{size:E.bigFont(v.font.size),color:M}}),w("min"),n(m,h,w,"linear"),e(m,h,w,"linear"),l(m,h,w,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),t(m,h,w,{outerTicks:!0});var u=w("showticklabels");u&&(E.coerceFont(w,"tickfont",v.font,{overrideDflt:{color:M}}),w("tickangle"),w("tickformat")),r(m,h,w,{dfltColor:S,bgColor:v.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),w("hoverformat"),w("layer")}}}),fz=ze({"src/plots/ternary/index.js"(J){"use strict";var V=uz(),p=zf().getSubplotCalcData,b=Nr().counterRegex,E="ternary";J.name=E;var k=J.attr="subplot";J.idRoot=E,J.idRegex=J.attrRegex=b(E);var l=J.attributes={};l[k]={valType:"subplotid",dflt:"ternary",editType:"calc"},J.layoutAttributes=pT(),J.supplyLayoutDefaults=cz(),J.plot=function(t){for(var n=t._fullLayout,r=t.calcdata,a=n._subplots[E],o=0;o0){var C=t.xa,_=t.ya,T,f,u,A,x;m.orientation==="h"?(x=n,T="y",u=_,f="x",A=C):(x=r,T="x",u=C,f="y",A=_);var z=c[t.index];if(x>=z.span[0]&&x<=z.span[1]){var I=b.extendFlat({},t),O=A.c2p(x,!0),D=l.getKdeValue(z,m,x),B=l.getPositionOnKdePath(z,m,O),F=u._offset,P=u._length;I[T+"0"]=B[0],I[T+"1"]=B[1],I[f+"0"]=I[f+"1"]=O,I[f+"Label"]=f+": "+E.hoverLabelText(A,x,m[f+"hoverformat"])+", "+c[0].t.labels.kde+" "+D.toFixed(3);for(var j=0,U=0;U path").each(function(v){if(!v.isBlank){var g=h.marker;p.select(this).call(E.fill,v.mc||g.color).call(E.stroke,v.mlc||g.line.color).call(b.dashLine,g.line.dash,v.mlw||g.line.width).style("opacity",h.selectedpoints&&!v.selected?k:1)}}),t(m,h,r),m.selectAll(".regions").each(function(){p.select(this).selectAll("path").style("stroke-width",0).call(E.fill,h.connector.fillcolor)}),m.selectAll(".lines").each(function(){var v=h.connector.line;b.lineGroupStyle(p.select(this).selectAll("path"),v.width,v.color,v.dash)})})}V.exports={style:n}}}),Lz=ze({"src/traces/funnel/hover.js"(J,V){"use strict";var p=Qn().opacity,b=eg().hoverOnBars,E=Nr().formatPercent;V.exports=function(e,t,n,r,a){var o=b(e,t,n,r,a);if(o){var s=o.cd,c=s[0].trace,m=c.orientation==="h",h=o.index,v=s[h],g=m?"x":"y";o[g+"LabelVal"]=v.s,o.percentInitial=v.begR,o.percentInitialLabel=E(v.begR,1),o.percentPrevious=v.difR,o.percentPreviousLabel=E(v.difR,1),o.percentTotal=v.sumR,o.percentTotalLabel=E(v.sumR,1);var i=v.hi||c.hoverinfo,w=[];if(i&&i!=="none"&&i!=="skip"){var S=i==="all",M=i.split("+"),C=function(_){return S||M.indexOf(_)!==-1};C("percent initial")&&w.push(o.percentInitialLabel+" of initial"),C("percent previous")&&w.push(o.percentPreviousLabel+" of previous"),C("percent total")&&w.push(o.percentTotalLabel+" of total")}return o.extraText=w.join("
"),o.color=k(c,v),[o]}};function k(l,e){var t=l.marker,n=e.mc||t.color,r=e.mlc||t.line.color,a=e.mlw||t.line.width;if(p(n))return n;if(p(r)&&a)return r}}}),Pz=ze({"src/traces/funnel/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.x="xVal"in E?E.xVal:E.x,b.y="yVal"in E?E.yVal:E.y,"percentInitial"in E&&(b.percentInitial=E.percentInitial),"percentPrevious"in E&&(b.percentPrevious=E.percentPrevious),"percentTotal"in E&&(b.percentTotal=E.percentTotal),E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),b}}}),Rz=ze({"src/traces/funnel/index.js"(J,V){"use strict";V.exports={attributes:gT(),layoutAttributes:yT(),supplyDefaults:_T().supplyDefaults,crossTraceDefaults:_T().crossTraceDefaults,supplyLayoutDefaults:Az(),calc:Sz(),crossTraceCalc:Ez(),plot:kz(),style:Cz().style,hoverPoints:Lz(),eventData:Pz(),selectPoints:tg(),moduleType:"trace",name:"funnel",basePlotModule:Du(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Iz=ze({"lib/funnel.js"(J,V){"use strict";V.exports=Rz()}}),Dz=ze({"src/traces/waterfall/constants.js"(J,V){"use strict";V.exports={eventDataKeys:["initial","delta","final"]}}}),xT=ze({"src/traces/waterfall/attributes.js"(J,V){"use strict";var p=jd(),b=su().line,E=ws(),k=Il().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Dz(),r=Ki().extendFlat,a=Qn();function o(s){return{marker:{color:r({},p.marker.color,{arrayOk:!1,editType:"style"}),line:{color:r({},p.marker.line.color,{arrayOk:!1,editType:"style"}),width:r({},p.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}V.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:p.x,x0:p.x0,dx:p.dx,y:p.y,y0:p.y0,dy:p.dy,xperiod:p.xperiod,yperiod:p.yperiod,xperiod0:p.xperiod0,yperiod0:p.yperiod0,xperiodalignment:p.xperiodalignment,yperiodalignment:p.yperiodalignment,xhoverformat:k("x"),yhoverformat:k("y"),hovertext:p.hovertext,hovertemplate:l({},{keys:n.eventDataKeys}),hovertemplatefallback:t(),hoverinfo:r({},E.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:e({editType:"plot"},{keys:n.eventDataKeys.concat(["label"])}),texttemplatefallback:t({editType:"plot"}),text:p.text,textposition:p.textposition,insidetextanchor:p.insidetextanchor,textangle:p.textangle,textfont:p.textfont,insidetextfont:p.insidetextfont,outsidetextfont:p.outsidetextfont,constraintext:p.constraintext,cliponaxis:p.cliponaxis,orientation:p.orientation,offset:p.offset,width:p.width,increasing:o("increasing"),decreasing:o("decreasing"),totals:o("intermediate sums and total"),connector:{line:{color:r({},b.color,{dflt:a.defaultLine}),width:r({},b.width,{editType:"plot"}),dash:b.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:p.offsetgroup,alignmentgroup:p.alignmentgroup,zorder:p.zorder}}}),bT=ze({"src/traces/waterfall/layout_attributes.js"(J,V){"use strict";V.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}}}),ng=ze({"src/constants/delta.js"(J,V){"use strict";V.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),wT=ze({"src/traces/waterfall/defaults.js"(J,V){"use strict";var p=Nr(),b=Hv(),E=qh().handleText,k=Gv(),l=yd(),e=xT(),t=Qn(),n=ng(),r=n.INCREASING.COLOR,a=n.DECREASING.COLOR,o="#4499FF";function s(h,v,g){h(v+".marker.color",g),h(v+".marker.line.color",t.defaultLine),h(v+".marker.line.width")}function c(h,v,g,i){function w(T,f){return p.coerce(h,v,e,T,f)}var S=k(h,v,i,w);if(!S){v.visible=!1;return}l(h,v,i,w),w("xhoverformat"),w("yhoverformat"),w("measure"),w("orientation",v.x&&!v.y?"h":"v"),w("base"),w("offset"),w("width"),w("text"),w("hovertext"),w("hovertemplate"),w("hovertemplatefallback");var M=w("textposition");E(h,v,i,w,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),v.textposition!=="none"&&(w("texttemplate"),w("texttemplatefallback"),v.texttemplate||w("textinfo")),s(w,"increasing",r),s(w,"decreasing",a),s(w,"totals",o);var C=w("connector.visible");if(C){w("connector.mode");var _=w("connector.line.width");_&&(w("connector.line.color"),w("connector.line.dash"))}w("zorder")}function m(h,v){var g,i;function w(M){return p.coerce(i._input,i,e,M)}if(v.waterfallmode==="group")for(var S=0;S0&&(w?x+="M"+u[0]+","+A[1]+"V"+A[0]:x+="M"+u[1]+","+A[0]+"H"+u[0]),S!=="between"&&(_.isSum||T path").each(function(v){if(!v.isBlank){var g=h[v.dir].marker;p.select(this).call(E.fill,g.color).call(E.stroke,g.line.color).call(b.dashLine,g.line.dash,g.line.width).style("opacity",h.selectedpoints&&!v.selected?k:1)}}),t(m,h,r),m.selectAll(".lines").each(function(){var v=h.connector.line;b.lineGroupStyle(p.select(this).selectAll("path"),v.width,v.color,v.dash)})})}V.exports={style:n}}}),jz=ze({"src/traces/waterfall/hover.js"(J,V){"use strict";var p=Gi().hoverLabelText,b=Qn().opacity,E=eg().hoverOnBars,k=ng(),l={increasing:k.INCREASING.SYMBOL,decreasing:k.DECREASING.SYMBOL};V.exports=function(n,r,a,o,s){var c=E(n,r,a,o,s);if(!c)return;var m=c.cd,h=m[0].trace,v=h.orientation==="h",g=v?"x":"y",i=v?n.xa:n.ya;function w(z){return p(i,z,h[g+"hoverformat"])}var S=c.index,M=m[S],C=M.isSum?M.b+M.s:M.rawS;c.initial=M.b+M.s-C,c.delta=C,c.final=c.initial+c.delta;var _=w(Math.abs(c.delta));c.deltaLabel=C<0?"("+_+")":_,c.finalLabel=w(c.final),c.initialLabel=w(c.initial);var T=M.hi||h.hoverinfo,f=[];if(T&&T!=="none"&&T!=="skip"){var u=T==="all",A=T.split("+"),x=function(z){return u||A.indexOf(z)!==-1};M.isSum||(x("final")&&(v?!x("x"):!x("y"))&&f.push(c.finalLabel),x("delta")&&(C<0?f.push(c.deltaLabel+" "+l.decreasing):f.push(c.deltaLabel+" "+l.increasing)),x("initial")&&f.push("Initial: "+c.initialLabel))}return f.length&&(c.extraText=f.join("
")),c.color=e(h,M),[c]};function e(t,n){var r=t[n.dir].marker,a=r.color,o=r.line.color,s=r.line.width;if(b(a))return a;if(b(o)&&s)return o}}}),Uz=ze({"src/traces/waterfall/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.x="xVal"in E?E.xVal:E.x,b.y="yVal"in E?E.yVal:E.y,"initial"in E&&(b.initial=E.initial),"delta"in E&&(b.delta=E.delta),"final"in E&&(b.final=E.final),E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),b}}}),qz=ze({"src/traces/waterfall/index.js"(J,V){"use strict";V.exports={attributes:xT(),layoutAttributes:bT(),supplyDefaults:wT().supplyDefaults,crossTraceDefaults:wT().crossTraceDefaults,supplyLayoutDefaults:Fz(),calc:zz(),crossTraceCalc:Bz(),plot:Oz(),style:Nz().style,hoverPoints:jz(),eventData:Uz(),selectPoints:tg(),moduleType:"trace",name:"waterfall",basePlotModule:Du(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Vz=ze({"lib/waterfall.js"(J,V){"use strict";V.exports=qz()}}),ig=ze({"src/traces/image/constants.js"(J,V){"use strict";V.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(p){return p.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(p){return p.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(p){return p.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(p){var b=p.slice(0,3);return b[1]=b[1]+"%",b[2]=b[2]+"%",b},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(p){var b=p.slice(0,4);return b[1]=b[1]+"%",b[2]=b[2]+"%",b},suffix:["\xB0","%","%",""]}}}}}),Sb={};bu(Sb,{default:()=>kT});var TT,AT,Eb,MT,ST,kb,Cb,Lb,ET,kT,CT=zi({"src/traces/image/attributes.ts"(){"use strict";TT=Yl(Ki()),AT=Yl(ws()),Eb=Yl(xs()),MT=Yl(su()),ST=Yl(ig()),kb=["rgb","rgba","rgba256","hsl","hsla"],Cb=[],Lb=[];for(let J of kb){let V=ST.colormodel[J];Cb.push(`For the \`${J}\` colormodel, it is [${(V.zminDflt||V.min).join(", ")}].`),Lb.push(`For the \`${J}\` colormodel, it is [${(V.zmaxDflt||V.max).join(", ")}].`)}ET={source:{valType:"string",editType:"calc",description:["Specifies the data URI of the image to be visualized.",'The URI consists of "data:image/[][;base64\\\\],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:kb,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",Cb.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",Lb.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,TT.extendFlat)({},AT.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,Eb.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,Eb.templatefallbackAttrs)(),zorder:MT.zorder},kT=ET}}),Gz=ze({"src/traces/image/defaults.js"(J,V){"use strict";var p=Nr(),b=(CT(),Po(Sb)).default,E=ig(),k=ip().IMAGE_URL_PREFIX;V.exports=function(e,t){function n(o,s){return p.coerce(e,t,b,o,s)}n("source"),t.source&&!t.source.match(k)&&delete t.source,t._hasSource=!!t.source;var r=n("z");if(t._hasZ=!(r===void 0||!r.length||!r[0]||!r[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}n("x0"),n("y0"),n("dx"),n("dy");var a;t._hasZ?(n("colormodel","rgb"),a=E.colormodel[t.colormodel],n("zmin",a.zminDflt||a.min),n("zmax",a.zmaxDflt||a.max)):t._hasSource&&(t.colormodel="rgba256",a=E.colormodel[t.colormodel],t.zmin=a.zminDflt,t.zmax=a.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),t._length=null,n("zorder")}}}),op=ze({"node_modules/inherits/inherits_browser.js"(J,V){typeof Object.create=="function"?V.exports=function(b,E){E&&(b.super_=E,b.prototype=Object.create(E.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}))}:V.exports=function(b,E){if(E){b.super_=E;var k=function(){};k.prototype=E.prototype,b.prototype=new k,b.prototype.constructor=b}}}}),LT=ze({"node_modules/readable-stream/lib/internal/streams/stream-browser.js"(J,V){V.exports=jv().EventEmitter}}),Hz=ze({"node_modules/base64-js/index.js"(J){"use strict";J.byteLength=t,J.toByteArray=r,J.fromByteArray=s;var V=[],p=[],b=typeof Uint8Array<"u"?Uint8Array:Array,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(k=0,l=E.length;k0)throw new Error("Invalid string. Length must be a multiple of 4");var h=c.indexOf("=");h===-1&&(h=m);var v=h===m?0:4-h%4;return[h,v]}function t(c){var m=e(c),h=m[0],v=m[1];return(h+v)*3/4-v}function n(c,m,h){return(m+h)*3/4-h}function r(c){var m,h=e(c),v=h[0],g=h[1],i=new b(n(c,v,g)),w=0,S=g>0?v-4:v,M;for(M=0;M>16&255,i[w++]=m>>8&255,i[w++]=m&255;return g===2&&(m=p[c.charCodeAt(M)]<<2|p[c.charCodeAt(M+1)]>>4,i[w++]=m&255),g===1&&(m=p[c.charCodeAt(M)]<<10|p[c.charCodeAt(M+1)]<<4|p[c.charCodeAt(M+2)]>>2,i[w++]=m>>8&255,i[w++]=m&255),i}function a(c){return V[c>>18&63]+V[c>>12&63]+V[c>>6&63]+V[c&63]}function o(c,m,h){for(var v,g=[],i=m;iS?S:w+i));return v===1?(m=c[h-1],g.push(V[m>>2]+V[m<<4&63]+"==")):v===2&&(m=(c[h-2]<<8)+c[h-1],g.push(V[m>>10]+V[m>>4&63]+V[m<<2&63]+"=")),g.join("")}}}),Wz=ze({"node_modules/ieee754/index.js"(J){J.read=function(V,p,b,E,k){var l,e,t=k*8-E-1,n=(1<>1,a=-7,o=b?k-1:0,s=b?-1:1,c=V[p+o];for(o+=s,l=c&(1<<-a)-1,c>>=-a,a+=t;a>0;l=l*256+V[p+o],o+=s,a-=8);for(e=l&(1<<-a)-1,l>>=-a,a+=E;a>0;e=e*256+V[p+o],o+=s,a-=8);if(l===0)l=1-r;else{if(l===n)return e?NaN:(c?-1:1)*(1/0);e=e+Math.pow(2,E),l=l-r}return(c?-1:1)*e*Math.pow(2,l-E)},J.write=function(V,p,b,E,k,l){var e,t,n,r=l*8-k-1,a=(1<>1,s=k===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=E?0:l-1,m=E?1:-1,h=p<0||p===0&&1/p<0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(t=isNaN(p)?1:0,e=a):(e=Math.floor(Math.log(p)/Math.LN2),p*(n=Math.pow(2,-e))<1&&(e--,n*=2),e+o>=1?p+=s/n:p+=s*Math.pow(2,1-o),p*n>=2&&(e++,n/=2),e+o>=a?(t=0,e=a):e+o>=1?(t=(p*n-1)*Math.pow(2,k),e=e+o):(t=p*Math.pow(2,o-1)*Math.pow(2,k),e=0));k>=8;V[b+c]=t&255,c+=m,t/=256,k-=8);for(e=e<0;V[b+c]=e&255,c+=m,e/=256,r-=8);V[b+c-m]|=h*128}}}),$v=ze({"node_modules/buffer/index.js"(J){"use strict";var V=Hz(),p=Wz(),b=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;J.Buffer=e,J.SlowBuffer=g,J.INSPECT_MAX_BYTES=50;var E=2147483647;J.kMaxLength=E,e.TYPED_ARRAY_SUPPORT=k(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function k(){try{let ce=new Uint8Array(1),ve={foo:function(){return 42}};return Object.setPrototypeOf(ve,Uint8Array.prototype),Object.setPrototypeOf(ce,ve),ce.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function l(ce){if(ce>E)throw new RangeError('The value "'+ce+'" is invalid for option "size"');let ve=new Uint8Array(ce);return Object.setPrototypeOf(ve,e.prototype),ve}function e(ce,ve,le){if(typeof ce=="number"){if(typeof ve=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return a(ce)}return t(ce,ve,le)}e.poolSize=8192;function t(ce,ve,le){if(typeof ce=="string")return o(ce,ve);if(ArrayBuffer.isView(ce))return c(ce);if(ce==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ce);if(Ie(ce,ArrayBuffer)||ce&&Ie(ce.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(ce,SharedArrayBuffer)||ce&&Ie(ce.buffer,SharedArrayBuffer)))return m(ce,ve,le);if(typeof ce=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Ae=ce.valueOf&&ce.valueOf();if(Ae!=null&&Ae!==ce)return e.from(Ae,ve,le);let Be=h(ce);if(Be)return Be;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ce[Symbol.toPrimitive]=="function")return e.from(ce[Symbol.toPrimitive]("string"),ve,le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ce)}e.from=function(ce,ve,le){return t(ce,ve,le)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function n(ce){if(typeof ce!="number")throw new TypeError('"size" argument must be of type number');if(ce<0)throw new RangeError('The value "'+ce+'" is invalid for option "size"')}function r(ce,ve,le){return n(ce),ce<=0?l(ce):ve!==void 0?typeof le=="string"?l(ce).fill(ve,le):l(ce).fill(ve):l(ce)}e.alloc=function(ce,ve,le){return r(ce,ve,le)};function a(ce){return n(ce),l(ce<0?0:v(ce)|0)}e.allocUnsafe=function(ce){return a(ce)},e.allocUnsafeSlow=function(ce){return a(ce)};function o(ce,ve){if((typeof ve!="string"||ve==="")&&(ve="utf8"),!e.isEncoding(ve))throw new TypeError("Unknown encoding: "+ve);let le=i(ce,ve)|0,Ae=l(le),Be=Ae.write(ce,ve);return Be!==le&&(Ae=Ae.slice(0,Be)),Ae}function s(ce){let ve=ce.length<0?0:v(ce.length)|0,le=l(ve);for(let Ae=0;Ae=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return ce|0}function g(ce){return+ce!=ce&&(ce=0),e.alloc(+ce)}e.isBuffer=function(ve){return ve!=null&&ve._isBuffer===!0&&ve!==e.prototype},e.compare=function(ve,le){if(Ie(ve,Uint8Array)&&(ve=e.from(ve,ve.offset,ve.byteLength)),Ie(le,Uint8Array)&&(le=e.from(le,le.offset,le.byteLength)),!e.isBuffer(ve)||!e.isBuffer(le))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ve===le)return 0;let Ae=ve.length,Be=le.length;for(let Xe=0,Ye=Math.min(Ae,Be);XeBe.length?(e.isBuffer(Ye)||(Ye=e.from(Ye)),Ye.copy(Be,Xe)):Uint8Array.prototype.set.call(Be,Ye,Xe);else if(e.isBuffer(Ye))Ye.copy(Be,Xe);else throw new TypeError('"list" argument must be an Array of Buffers');Xe+=Ye.length}return Be};function i(ce,ve){if(e.isBuffer(ce))return ce.length;if(ArrayBuffer.isView(ce)||Ie(ce,ArrayBuffer))return ce.byteLength;if(typeof ce!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ce);let le=ce.length,Ae=arguments.length>2&&arguments[2]===!0;if(!Ae&&le===0)return 0;let Be=!1;for(;;)switch(ve){case"ascii":case"latin1":case"binary":return le;case"utf8":case"utf-8":return he(ce).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le*2;case"hex":return le>>>1;case"base64":return Me(ce).length;default:if(Be)return Ae?-1:he(ce).length;ve=(""+ve).toLowerCase(),Be=!0}}e.byteLength=i;function w(ce,ve,le){let Ae=!1;if((ve===void 0||ve<0)&&(ve=0),ve>this.length||((le===void 0||le>this.length)&&(le=this.length),le<=0)||(le>>>=0,ve>>>=0,le<=ve))return"";for(ce||(ce="utf8");;)switch(ce){case"hex":return F(this,ve,le);case"utf8":case"utf-8":return z(this,ve,le);case"ascii":return D(this,ve,le);case"latin1":case"binary":return B(this,ve,le);case"base64":return x(this,ve,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,ve,le);default:if(Ae)throw new TypeError("Unknown encoding: "+ce);ce=(ce+"").toLowerCase(),Ae=!0}}e.prototype._isBuffer=!0;function S(ce,ve,le){let Ae=ce[ve];ce[ve]=ce[le],ce[le]=Ae}e.prototype.swap16=function(){let ve=this.length;if(ve%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let le=0;lele&&(ve+=" ... "),""},b&&(e.prototype[b]=e.prototype.inspect),e.prototype.compare=function(ve,le,Ae,Be,Xe){if(Ie(ve,Uint8Array)&&(ve=e.from(ve,ve.offset,ve.byteLength)),!e.isBuffer(ve))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ve);if(le===void 0&&(le=0),Ae===void 0&&(Ae=ve?ve.length:0),Be===void 0&&(Be=0),Xe===void 0&&(Xe=this.length),le<0||Ae>ve.length||Be<0||Xe>this.length)throw new RangeError("out of range index");if(Be>=Xe&&le>=Ae)return 0;if(Be>=Xe)return-1;if(le>=Ae)return 1;if(le>>>=0,Ae>>>=0,Be>>>=0,Xe>>>=0,this===ve)return 0;let Ye=Xe-Be,yt=Ae-le,gt=Math.min(Ye,yt),Tt=this.slice(Be,Xe),At=ve.slice(le,Ae);for(let $t=0;$t2147483647?le=2147483647:le<-2147483648&&(le=-2147483648),le=+le,Ve(le)&&(le=Be?0:ce.length-1),le<0&&(le=ce.length+le),le>=ce.length){if(Be)return-1;le=ce.length-1}else if(le<0)if(Be)le=0;else return-1;if(typeof ve=="string"&&(ve=e.from(ve,Ae)),e.isBuffer(ve))return ve.length===0?-1:C(ce,ve,le,Ae,Be);if(typeof ve=="number")return ve=ve&255,typeof Uint8Array.prototype.indexOf=="function"?Be?Uint8Array.prototype.indexOf.call(ce,ve,le):Uint8Array.prototype.lastIndexOf.call(ce,ve,le):C(ce,[ve],le,Ae,Be);throw new TypeError("val must be string, number or Buffer")}function C(ce,ve,le,Ae,Be){let Xe=1,Ye=ce.length,yt=ve.length;if(Ae!==void 0&&(Ae=String(Ae).toLowerCase(),Ae==="ucs2"||Ae==="ucs-2"||Ae==="utf16le"||Ae==="utf-16le")){if(ce.length<2||ve.length<2)return-1;Xe=2,Ye/=2,yt/=2,le/=2}function gt(At,$t){return Xe===1?At[$t]:At.readUInt16BE($t*Xe)}let Tt;if(Be){let At=-1;for(Tt=le;TtYe&&(le=Ye-yt),Tt=le;Tt>=0;Tt--){let At=!0;for(let $t=0;$tBe&&(Ae=Be)):Ae=Be;let Xe=ve.length;Ae>Xe/2&&(Ae=Xe/2);let Ye;for(Ye=0;Ye>>0,isFinite(Ae)?(Ae=Ae>>>0,Be===void 0&&(Be="utf8")):(Be=Ae,Ae=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let Xe=this.length-le;if((Ae===void 0||Ae>Xe)&&(Ae=Xe),ve.length>0&&(Ae<0||le<0)||le>this.length)throw new RangeError("Attempt to write outside buffer bounds");Be||(Be="utf8");let Ye=!1;for(;;)switch(Be){case"hex":return _(this,ve,le,Ae);case"utf8":case"utf-8":return T(this,ve,le,Ae);case"ascii":case"latin1":case"binary":return f(this,ve,le,Ae);case"base64":return u(this,ve,le,Ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,ve,le,Ae);default:if(Ye)throw new TypeError("Unknown encoding: "+Be);Be=(""+Be).toLowerCase(),Ye=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(ce,ve,le){return ve===0&&le===ce.length?V.fromByteArray(ce):V.fromByteArray(ce.slice(ve,le))}function z(ce,ve,le){le=Math.min(ce.length,le);let Ae=[],Be=ve;for(;Be239?4:Xe>223?3:Xe>191?2:1;if(Be+yt<=le){let gt,Tt,At,$t;switch(yt){case 1:Xe<128&&(Ye=Xe);break;case 2:gt=ce[Be+1],(gt&192)===128&&($t=(Xe&31)<<6|gt&63,$t>127&&(Ye=$t));break;case 3:gt=ce[Be+1],Tt=ce[Be+2],(gt&192)===128&&(Tt&192)===128&&($t=(Xe&15)<<12|(gt&63)<<6|Tt&63,$t>2047&&($t<55296||$t>57343)&&(Ye=$t));break;case 4:gt=ce[Be+1],Tt=ce[Be+2],At=ce[Be+3],(gt&192)===128&&(Tt&192)===128&&(At&192)===128&&($t=(Xe&15)<<18|(gt&63)<<12|(Tt&63)<<6|At&63,$t>65535&&$t<1114112&&(Ye=$t))}}Ye===null?(Ye=65533,yt=1):Ye>65535&&(Ye-=65536,Ae.push(Ye>>>10&1023|55296),Ye=56320|Ye&1023),Ae.push(Ye),Be+=yt}return O(Ae)}var I=4096;function O(ce){let ve=ce.length;if(ve<=I)return String.fromCharCode.apply(String,ce);let le="",Ae=0;for(;AeAe)&&(le=Ae);let Be="";for(let Xe=ve;XeAe&&(ve=Ae),le<0?(le+=Ae,le<0&&(le=0)):le>Ae&&(le=Ae),lele)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(ve,le,Ae){ve=ve>>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=this[ve],Xe=1,Ye=0;for(;++Ye>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=this[ve+--le],Xe=1;for(;le>0&&(Xe*=256);)Be+=this[ve+--le]*Xe;return Be},e.prototype.readUint8=e.prototype.readUInt8=function(ve,le){return ve=ve>>>0,le||j(ve,1,this.length),this[ve]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(ve,le){return ve=ve>>>0,le||j(ve,2,this.length),this[ve]|this[ve+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(ve,le){return ve=ve>>>0,le||j(ve,2,this.length),this[ve]<<8|this[ve+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),(this[ve]|this[ve+1]<<8|this[ve+2]<<16)+this[ve+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),this[ve]*16777216+(this[ve+1]<<16|this[ve+2]<<8|this[ve+3])},e.prototype.readBigUInt64LE=ke(function(ve){ve=ve>>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&Z(ve,this.length-8);let Be=le+this[++ve]*2**8+this[++ve]*2**16+this[++ve]*2**24,Xe=this[++ve]+this[++ve]*2**8+this[++ve]*2**16+Ae*2**24;return BigInt(Be)+(BigInt(Xe)<>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&Z(ve,this.length-8);let Be=le*2**24+this[++ve]*2**16+this[++ve]*2**8+this[++ve],Xe=this[++ve]*2**24+this[++ve]*2**16+this[++ve]*2**8+Ae;return(BigInt(Be)<>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=this[ve],Xe=1,Ye=0;for(;++Ye=Xe&&(Be-=Math.pow(2,8*le)),Be},e.prototype.readIntBE=function(ve,le,Ae){ve=ve>>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=le,Xe=1,Ye=this[ve+--Be];for(;Be>0&&(Xe*=256);)Ye+=this[ve+--Be]*Xe;return Xe*=128,Ye>=Xe&&(Ye-=Math.pow(2,8*le)),Ye},e.prototype.readInt8=function(ve,le){return ve=ve>>>0,le||j(ve,1,this.length),this[ve]&128?(255-this[ve]+1)*-1:this[ve]},e.prototype.readInt16LE=function(ve,le){ve=ve>>>0,le||j(ve,2,this.length);let Ae=this[ve]|this[ve+1]<<8;return Ae&32768?Ae|4294901760:Ae},e.prototype.readInt16BE=function(ve,le){ve=ve>>>0,le||j(ve,2,this.length);let Ae=this[ve+1]|this[ve]<<8;return Ae&32768?Ae|4294901760:Ae},e.prototype.readInt32LE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),this[ve]|this[ve+1]<<8|this[ve+2]<<16|this[ve+3]<<24},e.prototype.readInt32BE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),this[ve]<<24|this[ve+1]<<16|this[ve+2]<<8|this[ve+3]},e.prototype.readBigInt64LE=ke(function(ve){ve=ve>>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&Z(ve,this.length-8);let Be=this[ve+4]+this[ve+5]*2**8+this[ve+6]*2**16+(Ae<<24);return(BigInt(Be)<>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&Z(ve,this.length-8);let Be=(le<<24)+this[++ve]*2**16+this[++ve]*2**8+this[++ve];return(BigInt(Be)<>>0,le||j(ve,4,this.length),p.read(this,ve,!0,23,4)},e.prototype.readFloatBE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),p.read(this,ve,!1,23,4)},e.prototype.readDoubleLE=function(ve,le){return ve=ve>>>0,le||j(ve,8,this.length),p.read(this,ve,!0,52,8)},e.prototype.readDoubleBE=function(ve,le){return ve=ve>>>0,le||j(ve,8,this.length),p.read(this,ve,!1,52,8)};function U(ce,ve,le,Ae,Be,Xe){if(!e.isBuffer(ce))throw new TypeError('"buffer" argument must be a Buffer instance');if(ve>Be||vece.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(ve,le,Ae,Be){if(ve=+ve,le=le>>>0,Ae=Ae>>>0,!Be){let yt=Math.pow(2,8*Ae)-1;U(this,ve,le,Ae,yt,0)}let Xe=1,Ye=0;for(this[le]=ve&255;++Ye>>0,Ae=Ae>>>0,!Be){let yt=Math.pow(2,8*Ae)-1;U(this,ve,le,Ae,yt,0)}let Xe=Ae-1,Ye=1;for(this[le+Xe]=ve&255;--Xe>=0&&(Ye*=256);)this[le+Xe]=ve/Ye&255;return le+Ae},e.prototype.writeUint8=e.prototype.writeUInt8=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,1,255,0),this[le]=ve&255,le+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,65535,0),this[le]=ve&255,this[le+1]=ve>>>8,le+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,65535,0),this[le]=ve>>>8,this[le+1]=ve&255,le+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,4294967295,0),this[le+3]=ve>>>24,this[le+2]=ve>>>16,this[le+1]=ve>>>8,this[le]=ve&255,le+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,4294967295,0),this[le]=ve>>>24,this[le+1]=ve>>>16,this[le+2]=ve>>>8,this[le+3]=ve&255,le+4};function $(ce,ve,le,Ae,Be){Y(ve,Ae,Be,ce,le,7);let Xe=Number(ve&BigInt(4294967295));ce[le++]=Xe,Xe=Xe>>8,ce[le++]=Xe,Xe=Xe>>8,ce[le++]=Xe,Xe=Xe>>8,ce[le++]=Xe;let Ye=Number(ve>>BigInt(32)&BigInt(4294967295));return ce[le++]=Ye,Ye=Ye>>8,ce[le++]=Ye,Ye=Ye>>8,ce[le++]=Ye,Ye=Ye>>8,ce[le++]=Ye,le}function Q(ce,ve,le,Ae,Be){Y(ve,Ae,Be,ce,le,7);let Xe=Number(ve&BigInt(4294967295));ce[le+7]=Xe,Xe=Xe>>8,ce[le+6]=Xe,Xe=Xe>>8,ce[le+5]=Xe,Xe=Xe>>8,ce[le+4]=Xe;let Ye=Number(ve>>BigInt(32)&BigInt(4294967295));return ce[le+3]=Ye,Ye=Ye>>8,ce[le+2]=Ye,Ye=Ye>>8,ce[le+1]=Ye,Ye=Ye>>8,ce[le]=Ye,le+8}e.prototype.writeBigUInt64LE=ke(function(ve,le=0){return $(this,ve,le,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=ke(function(ve,le=0){return Q(this,ve,le,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(ve,le,Ae,Be){if(ve=+ve,le=le>>>0,!Be){let gt=Math.pow(2,8*Ae-1);U(this,ve,le,Ae,gt-1,-gt)}let Xe=0,Ye=1,yt=0;for(this[le]=ve&255;++Xe>0)-yt&255;return le+Ae},e.prototype.writeIntBE=function(ve,le,Ae,Be){if(ve=+ve,le=le>>>0,!Be){let gt=Math.pow(2,8*Ae-1);U(this,ve,le,Ae,gt-1,-gt)}let Xe=Ae-1,Ye=1,yt=0;for(this[le+Xe]=ve&255;--Xe>=0&&(Ye*=256);)ve<0&&yt===0&&this[le+Xe+1]!==0&&(yt=1),this[le+Xe]=(ve/Ye>>0)-yt&255;return le+Ae},e.prototype.writeInt8=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,1,127,-128),ve<0&&(ve=255+ve+1),this[le]=ve&255,le+1},e.prototype.writeInt16LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,32767,-32768),this[le]=ve&255,this[le+1]=ve>>>8,le+2},e.prototype.writeInt16BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,32767,-32768),this[le]=ve>>>8,this[le+1]=ve&255,le+2},e.prototype.writeInt32LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,2147483647,-2147483648),this[le]=ve&255,this[le+1]=ve>>>8,this[le+2]=ve>>>16,this[le+3]=ve>>>24,le+4},e.prototype.writeInt32BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,2147483647,-2147483648),ve<0&&(ve=4294967295+ve+1),this[le]=ve>>>24,this[le+1]=ve>>>16,this[le+2]=ve>>>8,this[le+3]=ve&255,le+4},e.prototype.writeBigInt64LE=ke(function(ve,le=0){return $(this,ve,le,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=ke(function(ve,le=0){return Q(this,ve,le,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function re(ce,ve,le,Ae,Be,Xe){if(le+Ae>ce.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("Index out of range")}function ne(ce,ve,le,Ae,Be){return ve=+ve,le=le>>>0,Be||re(ce,ve,le,4,34028234663852886e22,-34028234663852886e22),p.write(ce,ve,le,Ae,23,4),le+4}e.prototype.writeFloatLE=function(ve,le,Ae){return ne(this,ve,le,!0,Ae)},e.prototype.writeFloatBE=function(ve,le,Ae){return ne(this,ve,le,!1,Ae)};function se(ce,ve,le,Ae,Be){return ve=+ve,le=le>>>0,Be||re(ce,ve,le,8,17976931348623157e292,-17976931348623157e292),p.write(ce,ve,le,Ae,52,8),le+8}e.prototype.writeDoubleLE=function(ve,le,Ae){return se(this,ve,le,!0,Ae)},e.prototype.writeDoubleBE=function(ve,le,Ae){return se(this,ve,le,!1,Ae)},e.prototype.copy=function(ve,le,Ae,Be){if(!e.isBuffer(ve))throw new TypeError("argument should be a Buffer");if(Ae||(Ae=0),!Be&&Be!==0&&(Be=this.length),le>=ve.length&&(le=ve.length),le||(le=0),Be>0&&Be=this.length)throw new RangeError("Index out of range");if(Be<0)throw new RangeError("sourceEnd out of bounds");Be>this.length&&(Be=this.length),ve.length-le>>0,Ae=Ae===void 0?this.length:Ae>>>0,ve||(ve=0);let Xe;if(typeof ve=="number")for(Xe=le;Xe2**32?Be=K(String(le)):typeof le=="bigint"&&(Be=String(le),(le>BigInt(2)**BigInt(32)||le<-(BigInt(2)**BigInt(32)))&&(Be=K(Be)),Be+="n"),Ae+=` It must be ${ve}. Received ${Be}`,Ae},RangeError);function K(ce){let ve="",le=ce.length,Ae=ce[0]==="-"?1:0;for(;le>=Ae+4;le-=3)ve=`_${ce.slice(le-3,le)}${ve}`;return`${ce.slice(0,le)}${ve}`}function H(ce,ve,le){q(ve,"offset"),(ce[ve]===void 0||ce[ve+le]===void 0)&&Z(ve,ce.length-(le+1))}function Y(ce,ve,le,Ae,Be,Xe){if(ce>le||ce3?ve===0||ve===BigInt(0)?yt=`>= 0${Ye} and < 2${Ye} ** ${(Xe+1)*8}${Ye}`:yt=`>= -(2${Ye} ** ${(Xe+1)*8-1}${Ye}) and < 2 ** ${(Xe+1)*8-1}${Ye}`:yt=`>= ${ve}${Ye} and <= ${le}${Ye}`,new G.ERR_OUT_OF_RANGE("value",yt,ce)}H(Ae,Be,Xe)}function q(ce,ve){if(typeof ce!="number")throw new G.ERR_INVALID_ARG_TYPE(ve,"number",ce)}function Z(ce,ve,le){throw Math.floor(ce)!==ce?(q(ce,le),new G.ERR_OUT_OF_RANGE(le||"offset","an integer",ce)):ve<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE(le||"offset",`>= ${le?1:0} and <= ${ve}`,ce)}var ee=/[^+/0-9A-Za-z-_]/g;function ae(ce){if(ce=ce.split("=")[0],ce=ce.trim().replace(ee,""),ce.length<2)return"";for(;ce.length%4!==0;)ce=ce+"=";return ce}function he(ce,ve){ve=ve||1/0;let le,Ae=ce.length,Be=null,Xe=[];for(let Ye=0;Ye55295&&le<57344){if(!Be){if(le>56319){(ve-=3)>-1&&Xe.push(239,191,189);continue}else if(Ye+1===Ae){(ve-=3)>-1&&Xe.push(239,191,189);continue}Be=le;continue}if(le<56320){(ve-=3)>-1&&Xe.push(239,191,189),Be=le;continue}le=(Be-55296<<10|le-56320)+65536}else Be&&(ve-=3)>-1&&Xe.push(239,191,189);if(Be=null,le<128){if((ve-=1)<0)break;Xe.push(le)}else if(le<2048){if((ve-=2)<0)break;Xe.push(le>>6|192,le&63|128)}else if(le<65536){if((ve-=3)<0)break;Xe.push(le>>12|224,le>>6&63|128,le&63|128)}else if(le<1114112){if((ve-=4)<0)break;Xe.push(le>>18|240,le>>12&63|128,le>>6&63|128,le&63|128)}else throw new Error("Invalid code point")}return Xe}function xe(ce){let ve=[];for(let le=0;le>8,Be=le%256,Xe.push(Be),Xe.push(Ae);return Xe}function Me(ce){return V.toByteArray(ae(ce))}function Se(ce,ve,le,Ae){let Be;for(Be=0;Be=ve.length||Be>=ce.length);++Be)ve[Be+le]=ce[Be];return Be}function Ie(ce,ve){return ce instanceof ve||ce!=null&&ce.constructor!=null&&ce.constructor.name!=null&&ce.constructor.name===ve.name}function Ve(ce){return ce!==ce}var Ge=function(){let ce="0123456789abcdef",ve=new Array(256);for(let le=0;le<16;++le){let Ae=le*16;for(let Be=0;Be<16;++Be)ve[Ae+Be]=ce[le]+ce[Be]}return ve}();function ke(ce){return typeof BigInt>"u"?_e:ce}function _e(){throw new Error("BigInt not supported")}}}),Pb=ze({"node_modules/has-symbols/shams.js"(J,V){"use strict";V.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var b={},E=Symbol("test"),k=Object(E);if(typeof E=="string"||Object.prototype.toString.call(E)!=="[object Symbol]"||Object.prototype.toString.call(k)!=="[object Symbol]")return!1;var l=42;b[E]=l;for(var e in b)return!1;if(typeof Object.keys=="function"&&Object.keys(b).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(b).length!==0)return!1;var t=Object.getOwnPropertySymbols(b);if(t.length!==1||t[0]!==E||!Object.prototype.propertyIsEnumerable.call(b,E))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var n=Object.getOwnPropertyDescriptor(b,E);if(n.value!==l||n.enumerable!==!0)return!1}return!0}}}),k1=ze({"node_modules/has-tostringtag/shams.js"(J,V){"use strict";var p=Pb();V.exports=function(){return p()&&!!Symbol.toStringTag}}}),Rb=ze({"node_modules/es-object-atoms/index.js"(J,V){"use strict";V.exports=Object}}),Yz=ze({"node_modules/es-errors/index.js"(J,V){"use strict";V.exports=Error}}),Xz=ze({"node_modules/es-errors/eval.js"(J,V){"use strict";V.exports=EvalError}}),Zz=ze({"node_modules/es-errors/range.js"(J,V){"use strict";V.exports=RangeError}}),$z=ze({"node_modules/es-errors/ref.js"(J,V){"use strict";V.exports=ReferenceError}}),PT=ze({"node_modules/es-errors/syntax.js"(J,V){"use strict";V.exports=SyntaxError}}),og=ze({"node_modules/es-errors/type.js"(J,V){"use strict";V.exports=TypeError}}),Kz=ze({"node_modules/es-errors/uri.js"(J,V){"use strict";V.exports=URIError}}),Jz=ze({"node_modules/math-intrinsics/abs.js"(J,V){"use strict";V.exports=Math.abs}}),Qz=ze({"node_modules/math-intrinsics/floor.js"(J,V){"use strict";V.exports=Math.floor}}),eB=ze({"node_modules/math-intrinsics/max.js"(J,V){"use strict";V.exports=Math.max}}),tB=ze({"node_modules/math-intrinsics/min.js"(J,V){"use strict";V.exports=Math.min}}),rB=ze({"node_modules/math-intrinsics/pow.js"(J,V){"use strict";V.exports=Math.pow}}),aB=ze({"node_modules/math-intrinsics/round.js"(J,V){"use strict";V.exports=Math.round}}),nB=ze({"node_modules/math-intrinsics/isNaN.js"(J,V){"use strict";V.exports=Number.isNaN||function(b){return b!==b}}}),iB=ze({"node_modules/math-intrinsics/sign.js"(J,V){"use strict";var p=nB();V.exports=function(E){return p(E)||E===0?E:E<0?-1:1}}}),oB=ze({"node_modules/gopd/gOPD.js"(J,V){"use strict";V.exports=Object.getOwnPropertyDescriptor}}),Kv=ze({"node_modules/gopd/index.js"(J,V){"use strict";var p=oB();if(p)try{p([],"length")}catch{p=null}V.exports=p}}),C1=ze({"node_modules/es-define-property/index.js"(J,V){"use strict";var p=Object.defineProperty||!1;if(p)try{p({},"a",{value:1})}catch{p=!1}V.exports=p}}),sB=ze({"node_modules/has-symbols/index.js"(J,V){"use strict";var p=typeof Symbol<"u"&&Symbol,b=Pb();V.exports=function(){return typeof p!="function"||typeof Symbol!="function"||typeof p("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:b()}}}),RT=ze({"node_modules/get-proto/Reflect.getPrototypeOf.js"(J,V){"use strict";V.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),IT=ze({"node_modules/get-proto/Object.getPrototypeOf.js"(J,V){"use strict";var p=Rb();V.exports=p.getPrototypeOf||null}}),lB=ze({"node_modules/function-bind/implementation.js"(J,V){"use strict";var p="Function.prototype.bind called on incompatible ",b=Object.prototype.toString,E=Math.max,k="[object Function]",l=function(r,a){for(var o=[],s=0;s"u"||!T?p:T(Uint8Array),O={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?p:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?p:ArrayBuffer,"%ArrayIteratorPrototype%":_&&T?T([][Symbol.iterator]()):p,"%AsyncFromSyncIteratorPrototype%":p,"%AsyncFunction%":z,"%AsyncGenerator%":z,"%AsyncGeneratorFunction%":z,"%AsyncIteratorPrototype%":z,"%Atomics%":typeof Atomics>"u"?p:Atomics,"%BigInt%":typeof BigInt>"u"?p:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?p:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?p:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?p:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":E,"%eval%":eval,"%EvalError%":k,"%Float16Array%":typeof Float16Array>"u"?p:Float16Array,"%Float32Array%":typeof Float32Array>"u"?p:Float32Array,"%Float64Array%":typeof Float64Array>"u"?p:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?p:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":z,"%Int8Array%":typeof Int8Array>"u"?p:Int8Array,"%Int16Array%":typeof Int16Array>"u"?p:Int16Array,"%Int32Array%":typeof Int32Array>"u"?p:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&T?T(T([][Symbol.iterator]())):p,"%JSON%":typeof JSON=="object"?JSON:p,"%Map%":typeof Map>"u"?p:Map,"%MapIteratorPrototype%":typeof Map>"u"||!_||!T?p:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":b,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?p:Promise,"%Proxy%":typeof Proxy>"u"?p:Proxy,"%RangeError%":l,"%ReferenceError%":e,"%Reflect%":typeof Reflect>"u"?p:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?p:Set,"%SetIteratorPrototype%":typeof Set>"u"||!_||!T?p:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?p:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&T?T(""[Symbol.iterator]()):p,"%Symbol%":_?Symbol:p,"%SyntaxError%":t,"%ThrowTypeError%":C,"%TypedArray%":I,"%TypeError%":n,"%Uint8Array%":typeof Uint8Array>"u"?p:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?p:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?p:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?p:Uint32Array,"%URIError%":r,"%WeakMap%":typeof WeakMap>"u"?p:WeakMap,"%WeakRef%":typeof WeakRef>"u"?p:WeakRef,"%WeakSet%":typeof WeakSet>"u"?p:WeakSet,"%Function.prototype.call%":x,"%Function.prototype.apply%":A,"%Object.defineProperty%":S,"%Object.getPrototypeOf%":f,"%Math.abs%":a,"%Math.floor%":o,"%Math.max%":s,"%Math.min%":c,"%Math.pow%":m,"%Math.round%":h,"%Math.sign%":v,"%Reflect.getPrototypeOf%":u};if(T)try{null.error}catch(H){D=T(T(H)),O["%Error.prototype%"]=D}var D,B=function H(Y){var q;if(Y==="%AsyncFunction%")q=i("async function () {}");else if(Y==="%GeneratorFunction%")q=i("function* () {}");else if(Y==="%AsyncGeneratorFunction%")q=i("async function* () {}");else if(Y==="%AsyncGenerator%"){var Z=H("%AsyncGeneratorFunction%");Z&&(q=Z.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var ee=H("%AsyncGenerator%");ee&&T&&(q=T(ee.prototype))}return O[Y]=q,q},F={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=sg(),j=FT(),U=P.call(x,Array.prototype.concat),$=P.call(A,Array.prototype.splice),Q=P.call(x,String.prototype.replace),re=P.call(x,String.prototype.slice),ne=P.call(x,RegExp.prototype.exec),se=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,X=function(Y){var q=re(Y,0,1),Z=re(Y,-1);if(q==="%"&&Z!=="%")throw new t("invalid intrinsic syntax, expected closing `%`");if(Z==="%"&&q!=="%")throw new t("invalid intrinsic syntax, expected opening `%`");var ee=[];return Q(Y,se,function(ae,he,xe,we){ee[ee.length]=xe?Q(we,G,"$1"):he||ae}),ee},K=function(Y,q){var Z=Y,ee;if(j(F,Z)&&(ee=F[Z],Z="%"+ee[0]+"%"),j(O,Z)){var ae=O[Z];if(ae===z&&(ae=B(Z)),typeof ae>"u"&&!q)throw new n("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:ee,name:Z,value:ae}}throw new t("intrinsic "+Y+" does not exist!")};V.exports=function(Y,q){if(typeof Y!="string"||Y.length===0)throw new n("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof q!="boolean")throw new n('"allowMissing" argument must be a boolean');if(ne(/^%?[^%]*%?$/,Y)===null)throw new t("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Z=X(Y),ee=Z.length>0?Z[0]:"",ae=K("%"+ee+"%",q),he=ae.name,xe=ae.value,we=!1,Me=ae.alias;Me&&(ee=Me[0],$(Z,U([0,1],Me)));for(var Se=1,Ie=!0;Se=Z.length){var _e=w(xe,Ve);Ie=!!_e,Ie&&"get"in _e&&!("originalValue"in _e.get)?xe=_e.get:xe=xe[Ve]}else Ie=j(xe,Ve),xe=xe[Ve];Ie&&!we&&(O[he]=xe)}}return xe}}}),Jv=ze({"node_modules/call-bound/index.js"(J,V){"use strict";var p=Bb(),b=Fb(),E=b([p("%String.prototype.indexOf%")]);V.exports=function(l,e){var t=p(l,!!e);return typeof t=="function"&&E(l,".prototype.")>-1?b([t]):t}}}),fB=ze({"node_modules/is-arguments/index.js"(J,V){"use strict";var p=k1()(),b=Jv(),E=b("Object.prototype.toString"),k=function(n){return p&&n&&typeof n=="object"&&Symbol.toStringTag in n?!1:E(n)==="[object Arguments]"},l=function(n){return k(n)?!0:n!==null&&typeof n=="object"&&"length"in n&&typeof n.length=="number"&&n.length>=0&&E(n)!=="[object Array]"&&"callee"in n&&E(n.callee)==="[object Function]"},e=function(){return k(arguments)}();k.isLegacyArguments=l,V.exports=e?k:l}}),hB=ze({"node_modules/is-regex/index.js"(J,V){"use strict";var p=Jv(),b=k1()(),E=FT(),k=Kv(),l;b?(e=p("RegExp.prototype.exec"),t={},n=function(){throw t},r={toString:n,valueOf:n},typeof Symbol.toPrimitive=="symbol"&&(r[Symbol.toPrimitive]=n),l=function(c){if(!c||typeof c!="object")return!1;var m=k(c,"lastIndex"),h=m&&E(m,"value");if(!h)return!1;try{e(c,r)}catch(v){return v===t}}):(a=p("Object.prototype.toString"),o="[object RegExp]",l=function(c){return!c||typeof c!="object"&&typeof c!="function"?!1:a(c)===o});var e,t,n,r,a,o;V.exports=l}}),dB=ze({"node_modules/safe-regex-test/index.js"(J,V){"use strict";var p=Jv(),b=hB(),E=p("RegExp.prototype.exec"),k=og();V.exports=function(e){if(!b(e))throw new k("`regex` must be a RegExp");return function(n){return E(e,n)!==null}}}}),pB=ze({"node_modules/generator-function/index.js"(J,V){"use strict";var p=function*(){}.constructor;V.exports=()=>p}}),vB=ze({"node_modules/is-generator-function/index.js"(J,V){"use strict";var p=Jv(),b=dB(),E=b(/^\s*(?:function)?\*/),k=k1()(),l=zb(),e=p("Object.prototype.toString"),t=p("Function.prototype.toString"),n=pB();V.exports=function(a){if(typeof a!="function")return!1;if(E(t(a)))return!0;if(!k){var o=e(a);return o==="[object GeneratorFunction]"}if(!l)return!1;var s=n();return s&&l(a)===s.prototype}}}),mB=ze({"node_modules/is-callable/index.js"(J,V){"use strict";var p=Function.prototype.toString,b=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,E,k;if(typeof b=="function"&&typeof Object.defineProperty=="function")try{E=Object.defineProperty({},"length",{get:function(){throw k}}),k={},b(function(){throw 42},null,E)}catch(w){w!==k&&(b=null)}else b=null;var l=/^\s*class\b/,e=function(S){try{var M=p.call(S);return l.test(M)}catch{return!1}},t=function(S){try{return e(S)?!1:(p.call(S),!0)}catch{return!1}},n=Object.prototype.toString,r="[object Object]",a="[object Function]",o="[object GeneratorFunction]",s="[object HTMLAllCollection]",c="[object HTML document.all class]",m="[object HTMLCollection]",h=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),g=function(){return!1};typeof document=="object"&&(i=document.all,n.call(i)===n.call(document.all)&&(g=function(S){if((v||!S)&&(typeof S>"u"||typeof S=="object"))try{var M=n.call(S);return(M===s||M===c||M===m||M===r)&&S("")==null}catch{}return!1}));var i;V.exports=b?function(S){if(g(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;try{b(S,null,E)}catch(M){if(M!==k)return!1}return!e(S)&&t(S)}:function(S){if(g(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;if(h)return t(S);if(e(S))return!1;var M=n.call(S);return M!==a&&M!==o&&!/^\[object HTML/.test(M)?!1:t(S)}}}),gB=ze({"node_modules/for-each/index.js"(J,V){"use strict";var p=mB(),b=Object.prototype.toString,E=Object.prototype.hasOwnProperty,k=function(r,a,o){for(var s=0,c=r.length;s=3&&(s=o),t(r)?k(r,a,s):typeof r=="string"?l(r,a,s):e(r,a,s)}}}),yB=ze({"node_modules/possible-typed-array-names/index.js"(J,V){"use strict";V.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}}),_B=ze({"node_modules/available-typed-arrays/index.js"(J,V){"use strict";var p=yB(),b=typeof globalThis>"u"?window:globalThis;V.exports=function(){for(var k=[],l=0;l3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new E("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new E("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new E("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new E("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,c=!!k&&k(e,t);if(p)p(e,t,{configurable:o===null&&c?c.configurable:!o,enumerable:r===null&&c?c.enumerable:!r,value:n,writable:a===null&&c?c.writable:!a});else if(s||!r&&!a&&!o)e[t]=n;else throw new b("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),BT=ze({"node_modules/has-property-descriptors/index.js"(J,V){"use strict";var p=C1(),b=function(){return!!p};b.hasArrayLengthDefineBug=function(){if(!p)return null;try{return p([],"length",{value:1}).length!==1}catch{return!0}},V.exports=b}}),xB=ze({"node_modules/set-function-length/index.js"(J,V){"use strict";var p=Bb(),b=zT(),E=BT()(),k=Kv(),l=og(),e=p("%Math.floor%");V.exports=function(n,r){if(typeof n!="function")throw new l("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||e(r)!==r)throw new l("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in n&&k){var c=k(n,"length");c&&!c.configurable&&(o=!1),c&&!c.writable&&(s=!1)}return(o||s||!a)&&(E?b(n,"length",r,!0,!0):b(n,"length",r)),n}}}),bB=ze({"node_modules/call-bind-apply-helpers/applyBind.js"(J,V){"use strict";var p=sg(),b=Db(),E=DT();V.exports=function(){return E(p,b,arguments)}}}),L1=ze({"node_modules/call-bind/index.js"(J,V){"use strict";var p=xB(),b=C1(),E=Fb(),k=bB();V.exports=function(e){var t=E(arguments),n=1+e.length-(arguments.length-1);return p(t,n>0?n:0,!0)},b?b(V.exports,"apply",{value:k}):V.exports.apply=k}}),OT=ze({"node_modules/which-typed-array/index.js"(J,V){"use strict";var p=gB(),b=_B(),E=L1(),k=Jv(),l=Kv(),e=zb(),t=k("Object.prototype.toString"),n=k1()(),r=typeof globalThis>"u"?window:globalThis,a=b(),o=k("String.prototype.slice"),s=k("Array.prototype.indexOf",!0)||function(i,w){for(var S=0;S-1}V.exports=function(i){if(!i||typeof i!="object")return!1;if(!n){var w=o(t(i),8,-1);return v(w)?w:w!=="Object"?!1:h(i)}return l?m(i):null}}}),wB=ze({"node_modules/is-typed-array/index.js"(J,V){"use strict";var p=OT();V.exports=function(E){return!!p(E)}}}),NT=ze({"node_modules/util/support/types.js"(J){"use strict";var V=fB(),p=vB(),b=OT(),E=wB();function k(we){return we.call.bind(we)}var l=typeof BigInt<"u",e=typeof Symbol<"u",t=k(Object.prototype.toString),n=k(Number.prototype.valueOf),r=k(String.prototype.valueOf),a=k(Boolean.prototype.valueOf);l&&(o=k(BigInt.prototype.valueOf));var o;e&&(s=k(Symbol.prototype.valueOf));var s;function c(we,Me){if(typeof we!="object")return!1;try{return Me(we),!0}catch{return!1}}J.isArgumentsObject=V,J.isGeneratorFunction=p,J.isTypedArray=E;function m(we){return typeof Promise<"u"&&we instanceof Promise||we!==null&&typeof we=="object"&&typeof we.then=="function"&&typeof we.catch=="function"}J.isPromise=m;function h(we){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(we):E(we)||$(we)}J.isArrayBufferView=h;function v(we){return b(we)==="Uint8Array"}J.isUint8Array=v;function g(we){return b(we)==="Uint8ClampedArray"}J.isUint8ClampedArray=g;function i(we){return b(we)==="Uint16Array"}J.isUint16Array=i;function w(we){return b(we)==="Uint32Array"}J.isUint32Array=w;function S(we){return b(we)==="Int8Array"}J.isInt8Array=S;function M(we){return b(we)==="Int16Array"}J.isInt16Array=M;function C(we){return b(we)==="Int32Array"}J.isInt32Array=C;function _(we){return b(we)==="Float32Array"}J.isFloat32Array=_;function T(we){return b(we)==="Float64Array"}J.isFloat64Array=T;function f(we){return b(we)==="BigInt64Array"}J.isBigInt64Array=f;function u(we){return b(we)==="BigUint64Array"}J.isBigUint64Array=u;function A(we){return t(we)==="[object Map]"}A.working=typeof Map<"u"&&A(new Map);function x(we){return typeof Map>"u"?!1:A.working?A(we):we instanceof Map}J.isMap=x;function z(we){return t(we)==="[object Set]"}z.working=typeof Set<"u"&&z(new Set);function I(we){return typeof Set>"u"?!1:z.working?z(we):we instanceof Set}J.isSet=I;function O(we){return t(we)==="[object WeakMap]"}O.working=typeof WeakMap<"u"&&O(new WeakMap);function D(we){return typeof WeakMap>"u"?!1:O.working?O(we):we instanceof WeakMap}J.isWeakMap=D;function B(we){return t(we)==="[object WeakSet]"}B.working=typeof WeakSet<"u"&&B(new WeakSet);function F(we){return B(we)}J.isWeakSet=F;function P(we){return t(we)==="[object ArrayBuffer]"}P.working=typeof ArrayBuffer<"u"&&P(new ArrayBuffer);function j(we){return typeof ArrayBuffer>"u"?!1:P.working?P(we):we instanceof ArrayBuffer}J.isArrayBuffer=j;function U(we){return t(we)==="[object DataView]"}U.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&U(new DataView(new ArrayBuffer(1),0,1));function $(we){return typeof DataView>"u"?!1:U.working?U(we):we instanceof DataView}J.isDataView=$;var Q=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function re(we){return t(we)==="[object SharedArrayBuffer]"}function ne(we){return typeof Q>"u"?!1:(typeof re.working>"u"&&(re.working=re(new Q)),re.working?re(we):we instanceof Q)}J.isSharedArrayBuffer=ne;function se(we){return t(we)==="[object AsyncFunction]"}J.isAsyncFunction=se;function G(we){return t(we)==="[object Map Iterator]"}J.isMapIterator=G;function X(we){return t(we)==="[object Set Iterator]"}J.isSetIterator=X;function K(we){return t(we)==="[object Generator]"}J.isGeneratorObject=K;function H(we){return t(we)==="[object WebAssembly.Module]"}J.isWebAssemblyCompiledModule=H;function Y(we){return c(we,n)}J.isNumberObject=Y;function q(we){return c(we,r)}J.isStringObject=q;function Z(we){return c(we,a)}J.isBooleanObject=Z;function ee(we){return l&&c(we,o)}J.isBigIntObject=ee;function ae(we){return e&&c(we,s)}J.isSymbolObject=ae;function he(we){return Y(we)||q(we)||Z(we)||ee(we)||ae(we)}J.isBoxedPrimitive=he;function xe(we){return typeof Uint8Array<"u"&&(j(we)||ne(we))}J.isAnyArrayBuffer=xe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(we){Object.defineProperty(J,we,{enumerable:!1,value:function(){throw new Error(we+" is not supported in userland")}})})}}),jT=ze({"node_modules/util/support/isBufferBrowser.js"(J,V){V.exports=function(b){return b&&typeof b=="object"&&typeof b.copy=="function"&&typeof b.fill=="function"&&typeof b.readUInt8=="function"}}}),UT=ze({"(disabled):node_modules/util/util.js"(J){var V=Object.getOwnPropertyDescriptors||function($){for(var Q=Object.keys($),re={},ne=0;ne=ne)return X;switch(X){case"%s":return String(re[Q++]);case"%d":return Number(re[Q++]);case"%j":try{return JSON.stringify(re[Q++])}catch{return"[Circular]"}default:return X}}),G=re[Q];Q"u")return function(){return J.deprecate(U,$).apply(this,arguments)};var Q=!1;function re(){if(!Q){if(process.throwDeprecation)throw new Error($);process.traceDeprecation?console.trace($):console.error($),Q=!0}return U.apply(this,arguments)}return re};var b={},E=/^$/;k="false",k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i");var k;J.debuglog=function(U){if(U=U.toUpperCase(),!b[U])if(E.test(U)){var $=process.pid;b[U]=function(){var Q=J.format.apply(J,arguments);console.error("%s %d: %s",U,$,Q)}}else b[U]=function(){};return b[U]};function l(U,$){var Q={seen:[],stylize:t};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),v($)?Q.showHidden=$:$&&J._extend(Q,$),C(Q.showHidden)&&(Q.showHidden=!1),C(Q.depth)&&(Q.depth=2),C(Q.colors)&&(Q.colors=!1),C(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=e),r(Q,U,Q.depth)}J.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(U,$){var Q=l.styles[$];return Q?"\x1B["+l.colors[Q][0]+"m"+U+"\x1B["+l.colors[Q][1]+"m":U}function t(U,$){return U}function n(U){var $={};return U.forEach(function(Q,re){$[Q]=!0}),$}function r(U,$,Q){if(U.customInspect&&$&&A($.inspect)&&$.inspect!==J.inspect&&!($.constructor&&$.constructor.prototype===$)){var re=$.inspect(Q,U);return S(re)||(re=r(U,re,Q)),re}var ne=a(U,$);if(ne)return ne;var se=Object.keys($),G=n(se);if(U.showHidden&&(se=Object.getOwnPropertyNames($)),u($)&&(se.indexOf("message")>=0||se.indexOf("description")>=0))return o($);if(se.length===0){if(A($)){var X=$.name?": "+$.name:"";return U.stylize("[Function"+X+"]","special")}if(_($))return U.stylize(RegExp.prototype.toString.call($),"regexp");if(f($))return U.stylize(Date.prototype.toString.call($),"date");if(u($))return o($)}var K="",H=!1,Y=["{","}"];if(h($)&&(H=!0,Y=["[","]"]),A($)){var q=$.name?": "+$.name:"";K=" [Function"+q+"]"}if(_($)&&(K=" "+RegExp.prototype.toString.call($)),f($)&&(K=" "+Date.prototype.toUTCString.call($)),u($)&&(K=" "+o($)),se.length===0&&(!H||$.length==0))return Y[0]+K+Y[1];if(Q<0)return _($)?U.stylize(RegExp.prototype.toString.call($),"regexp"):U.stylize("[Object]","special");U.seen.push($);var Z;return H?Z=s(U,$,Q,G,se):Z=se.map(function(ee){return c(U,$,Q,G,ee,H)}),U.seen.pop(),m(Z,K,Y)}function a(U,$){if(C($))return U.stylize("undefined","undefined");if(S($)){var Q="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(w($))return U.stylize(""+$,"number");if(v($))return U.stylize(""+$,"boolean");if(g($))return U.stylize("null","null")}function o(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,$,Q,re,ne){for(var se=[],G=0,X=$.length;G-1&&(se?X=X.split(` +`+x(U.dayMonthYear,D,P,j);return x(B,D,P,j)};var O=3*e;J.incrementMonth=function(D,B,F){F=v(F)&&F;var P=E(D,e);if(D=Math.round(D-P),F)try{var j=Math.round(D/e)+a,U=o.getComponentMethod("calendars","getCal")(F),$=U.fromJD(j);return B%12?U.add($,B,"m"):U.add($,B/12,"y"),($.toJD()-a)*e+P}catch{b.error("invalid ms "+D+" in calendar "+F)}var Q=new Date(D+O);return Q.setUTCMonth(Q.getUTCMonth()+B)+P-O},J.findExactDates=function(D,B){for(var F=0,P=0,j=0,U=0,$,Q,re=v(B)&&o.getComponentMethod("calendars","getCal")(B),ne=0;ne1?(a[c-1]-a[0])/(c-1):1,v,m;for(f>=0?m=o?l:e:m=o?n:t,r+=f*k*(o?-1:1)*(f>=0?1:-1);s90&&p.log("Long binary search..."),s-1};function l(r,a){return ra}function n(r,a){return r>=a}J.sorterAsc=function(r,a){return r-a},J.sorterDes=function(r,a){return a-r},J.distinctVals=function(r){var a=r.slice();a.sort(J.sorterAsc);var o;for(o=a.length-1;o>-1&&a[o]===E;o--);for(var s=a[o]-a[0]||1,c=s/(o||1)/1e4,g=[],f,v=0;v<=o;v++){var m=a[v],i=m-f;f===void 0?(g.push(m),f=m):i>c&&(s=Math.min(s,i),g.push(m),f=m)}return{vals:g,minDiff:s}},J.roundUp=function(r,a,o){for(var s=0,c=a.length-1,g,f=0,v=o?0:1,m=o?1:0,i=o?Math.ceil:Math.floor;s0&&(s=1),o&&s)return r.sort(a)}return s?r:r.reverse()},J.findIndexOfMin=function(r,a){a=a||b;for(var o=1/0,s,c=0;czw});function wI(J){return Object.keys(J).sort()}var zw,Nv=zi({"src/lib/sort_object_keys.ts"(){"use strict";zw=wI}}),TI=ze({"src/lib/stats.js"(J){"use strict";var G=ao(),p=Ff().isArrayOrTypedArray;J.aggNums=function(b,E,k,l){var e,t;if((!l||l>k.length)&&(l=k.length),G(E)||(E=!1),p(k[0])){for(t=new Array(l),e=0;eb.length-1)return b[b.length-1];var k=E%1;return k*b[Math.ceil(E)]+(1-k)*b[Math.floor(E)]}}}),AI=ze({"src/lib/angles.js"(J,G){"use strict";var p=(Um(),Po(zv)),b=p.mod,E=p.modHalf,k=Math.PI,l=2*k;function e(m){return m/180*k}function t(m){return m/k*180}function n(m){return Math.abs(m[1]-m[0])>l-1e-14}function r(m,i){return E(i-m,l)}function a(m,i){return Math.abs(r(m,i))}function o(m,i){if(n(i))return!0;var T,S;i[0]S&&(S+=l);var M=b(m,l),C=M+l;return M>=T&&M<=S||C>=T&&C<=S}function s(m,i,T,S){if(!o(i,S))return!1;var M,C;return T[0]=M&&m<=C}function c(m,i,T,S,M,C,_){M=M||0,C=C||0;var w=n([T,S]),h,u,A,x,z;w?(h=0,u=k,A=l):T1/3&&p.x<2/3},J.isRightAnchor=function(p){return p.xanchor==="right"||p.xanchor==="auto"&&p.x>=2/3},J.isTopAnchor=function(p){return p.yanchor==="top"||p.yanchor==="auto"&&p.y>=2/3},J.isMiddleAnchor=function(p){return p.yanchor==="middle"||p.yanchor==="auto"&&p.y>1/3&&p.y<2/3},J.isBottomAnchor=function(p){return p.yanchor==="bottom"||p.yanchor==="auto"&&p.y<=1/3}}}),SI=ze({"src/lib/geometry2d.js"(J){"use strict";var G=(Um(),Po(zv)).mod;J.segmentsIntersect=p;function p(e,t,n,r,a,o,s,c){var g=n-e,f=a-e,v=s-a,m=r-t,i=o-t,T=c-o,S=g*T-v*m;if(S===0)return null;var M=(f*T-v*i)/S,C=(f*m-g*i)/S;return C<0||C>1||M<0||M>1?null:{x:e+g*M,y:t+m*M}}J.segmentDistance=function(t,n,r,a,o,s,c,g){if(p(t,n,r,a,o,s,c,g))return 0;var f=r-t,v=a-n,m=c-o,i=g-s,T=f*f+v*v,S=m*m+i*i,M=Math.min(b(f,v,T,o-t,s-n),b(f,v,T,c-t,g-n),b(m,i,S,t-o,n-s),b(m,i,S,r-o,a-s));return Math.sqrt(M)};function b(e,t,n,r,a){var o=r*e+a*t;if(o<0)return r*r+a*a;if(o>n){var s=r-e,c=a-t;return s*s+c*c}else{var g=r*t-a*e;return g*g/n}}var E,k,l;J.getTextLocation=function(t,n,r,a){if((t!==k||a!==l)&&(E={},k=t,l=a),E[r])return E[r];var o=t.getPointAtLength(G(r-a/2,n)),s=t.getPointAtLength(G(r+a/2,n)),c=Math.atan((s.y-o.y)/(s.x-o.x)),g=t.getPointAtLength(G(r,n)),f=(g.x*4+o.x+s.x)/6,v=(g.y*4+o.y+s.y)/6,m={x:f,y:v,theta:c};return E[r]=m,m},J.clearLocationCache=function(){k=null},J.getVisibleSegment=function(t,n,r){var a=n.left,o=n.right,s=n.top,c=n.bottom,g=0,f=t.getTotalLength(),v=f,m,i;function T(M){var C=t.getPointAtLength(M);M===0?m=C:M===f&&(i=C);var _=C.xo?C.x-o:0,w=C.yc?C.y-c:0;return Math.sqrt(_*_+w*w)}for(var S=T(g);S;){if(g+=S+r,g>v)return;S=T(g)}for(S=T(v);S;){if(v-=S+r,g>v)return;S=T(v)}return{min:g,max:v,len:v-g,total:f,isClosed:g===0&&v===f&&Math.abs(m.x-i.x)<.1&&Math.abs(m.y-i.y)<.1}},J.findPointOnPath=function(t,n,r,a){a=a||{};for(var o=a.pathLength||t.getTotalLength(),s=a.tolerance||.001,c=a.iterationLimit||30,g=t.getPointAtLength(0)[r]>t.getPointAtLength(o)[r]?-1:1,f=0,v=0,m=o,i,T,S;f0?m=i:v=i,f++}return T}}}),Cx=ze({"src/lib/throttle.js"(J){"use strict";var G={};J.throttle=function(E,k,l){var e=G[E],t=Date.now();if(!e){for(var n in G)G[n].tse.ts+k){r();return}e.timer=setTimeout(function(){r(),e.timer=null},k)},J.done=function(b){var E=G[b];return!E||!E.timer?Promise.resolve():new Promise(function(k){var l=E.onDone;E.onDone=function(){l&&l(),k(),E.onDone=null}})},J.clear=function(b){if(b)p(G[b]),delete G[b];else for(var E in G)J.clear(E)};function p(b){b&&b.timer!==null&&(clearTimeout(b.timer),b.timer=null)}}}),EI=ze({"src/lib/clear_responsive.js"(J,G){"use strict";G.exports=function(b){b._responsiveChartHandler&&(window.removeEventListener("resize",b._responsiveChartHandler),delete b._responsiveChartHandler)}}}),kI=ze({"node_modules/is-mobile/index.js"(J,G){"use strict";G.exports=k,G.exports.isMobile=k,G.exports.default=k;var p=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,b=/CrOS/,E=/android|ipad|playbook|silk/i;function k(l){l||(l={});let e=l.ua;if(!e&&typeof navigator<"u"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;let t=p.test(e)&&!b.test(e)||!!l.tablet&&E.test(e);return!t&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(t=!0),t}}}),CI=ze({"src/lib/preserve_drawing_buffer.js"(J,G){"use strict";var p=ao(),b=kI();G.exports=function(l){var e;if(l&&l.hasOwnProperty("userAgent")?e=l.userAgent:e=E(),typeof e!="string")return!0;var t=b({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!t)for(var n=e.split(" "),r=1;r-1;o--){var s=n[o];if(s.slice(0,8)==="Version/"){var c=s.slice(8).split(".")[0];if(p(c)&&(c=+c),c>=13)return!0}}}return t};function E(){var k;return typeof navigator<"u"&&(k=navigator.userAgent),k&&k.headers&&typeof k.headers["user-agent"]=="string"&&(k=k.headers["user-agent"]),k}}}),LI=ze({"src/lib/make_trace_groups.js"(J,G){"use strict";var p=ci();G.exports=function(E,k,l){var e=E.selectAll("g."+l.replace(/\s/g,".")).data(k,function(n){return n[0].trace.uid});e.exit().remove(),e.enter().append("g").attr("class",l),e.order();var t=E.classed("rangeplot")?"nodeRangePlot3":"node3";return e.each(function(n){n[0][t]=p.select(this)}),e}}}),PI=ze({"src/lib/localize.js"(J,G){"use strict";var p=mi();G.exports=function(E,k){for(var l=E._context.locale,e=0;e<2;e++){for(var t=E._context.locales,n=0;n<2;n++){var r=(t[l]||{}).dictionary;if(r){var a=r[k];if(a)return a}t=p.localeRegistry}var o=l.split("-")[0];if(o===l)break;l=o}return k}}}),Bw=ze({"src/lib/filter_unique.js"(J,G){"use strict";G.exports=function(b){for(var E={},k=[],l=0,e=0;e1?(k*b+k*E)/k:b+E,e=String(l).length;if(e>16){var t=String(E).length,n=String(b).length;if(e>=n+t){var r=parseFloat(l).toPrecision(12);r.indexOf("e+")===-1&&(l=+r)}}return l}}}),Ow={};bu(Ow,{default:()=>qw});function DI(J){return typeof J=="string"&&(J=J.replace(Uw,"")),(0,Nw.default)(J)?Number(J):jw.BADNUM}var Nw,jw,Uw,qw,FI=zi({"src/lib/clean_number.ts"(){"use strict";Nw=Yl(ao()),jw=Yl(No()),Uw=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,qw=DI}}),zI=ze({"src/lib/slugify.js"(J,G){"use strict";var p=/<[^>]*>/g,b=/[\p{S}\p{P}]/gu,E=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,k=/�/g,l=/\s+/g,e="-",t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(t+"{3,}","g"),r=new RegExp(t+"$","g"),a=60;function o(s){return typeof s.toWellFormed=="function"?s.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(s))}G.exports=function(c,g=a){var f=o(c??"").replace(k,"").replace(p," ").replace(b,v=>v===e?v:"").toLowerCase().trim().replace(l,e).replace(E,"").replace(n,e);return f.length<=g?f:Array.from(f).slice(0,g).join("").replace(r,"")}}}),Nr=ze({"src/lib/index.js"(J,G){"use strict";var p=ci(),b=jm().utcFormat,E=Cw().format,k=ao(),l=No(),e=l.FP_SAFE,t=-e,n=l.BADNUM,r=G.exports={};r.adjustFormat=function(q){if(!q||/^\d[.]\df/.test(q)||/[.]\d%/.test(q))return q;if(q==="0.f")return"~f";if(/^\d%/.test(q))return"~%";if(/^\ds/.test(q))return"~s";var W=(q.match(/^[+\-( ]?/)||[""])[0],ee=q.slice(W.length);return!/^[~,.0$#]/.test(ee)&&/[&fps]/.test(ee)?W+"~"+ee:q};var a={};r.warnBadFormat=function(X){var q=String(X);a[q]||(a[q]=1,r.warn('encountered bad format: "'+q+'"'))},r.noFormat=function(X){return String(X)},r.numberFormat=function(X){var q;try{q=E(r.adjustFormat(X))}catch{return r.warnBadFormat(X),r.noFormat}return q},r.nestedProperty=rg(),r.keyedContainer=zR(),r.relativeAttr=BR(),r.isPlainObject=tv(),r.toLogRange=Tx(),r.relinkPrivateKeys=OR();var o=Ff();r.isArrayBuffer=o.isArrayBuffer,r.isTypedArray=o.isTypedArray,r.isArrayOrTypedArray=o.isArrayOrTypedArray,r.isArray1D=o.isArray1D,r.ensureArray=o.ensureArray,r.concat=o.concat,r.maxRowLength=o.maxRowLength,r.minRowLength=o.minRowLength;var s=(Um(),Po(zv));r.mod=s.mod,r.modHalf=s.modHalf;var c=VR();r.valObjectMeta=c.valObjectMeta,r.coerce=c.coerce,r.coerce2=c.coerce2,r.coerceFont=c.coerceFont,r.coercePattern=c.coercePattern,r.coerceHoverinfo=c.coerceHoverinfo,r.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,r.validate=c.validate;var g=bI();r.dateTime2ms=g.dateTime2ms,r.isDateTime=g.isDateTime,r.ms2DateTime=g.ms2DateTime,r.ms2DateTimeLocal=g.ms2DateTimeLocal,r.cleanDate=g.cleanDate,r.isJSDate=g.isJSDate,r.formatDate=g.formatDate,r.incrementMonth=g.incrementMonth,r.dateTick0=g.dateTick0,r.dfltRange=g.dfltRange,r.findExactDates=g.findExactDates,r.MIN_MS=g.MIN_MS,r.MAX_MS=g.MAX_MS;var f=kx();r.findBin=f.findBin,r.sorterAsc=f.sorterAsc,r.sorterDes=f.sorterDes,r.distinctVals=f.distinctVals,r.roundUp=f.roundUp,r.sort=f.sort,r.findIndexOfMin=f.findIndexOfMin,r.sortObjectKeys=(Nv(),Po(nv)).default;var v=TI();r.aggNums=v.aggNums,r.len=v.len,r.mean=v.mean,r.geometricMean=v.geometricMean,r.median=v.median,r.midRange=v.midRange,r.variance=v.variance,r.stdev=v.stdev,r.interp=v.interp;var m=Mx();r.init2dArray=m.init2dArray,r.transposeRagged=m.transposeRagged,r.dot=m.dot,r.translationMatrix=m.translationMatrix,r.rotationMatrix=m.rotationMatrix,r.rotationXYMatrix=m.rotationXYMatrix,r.apply3DTransform=m.apply3DTransform,r.apply2DTransform=m.apply2DTransform,r.apply2DTransform2=m.apply2DTransform2,r.convertCssMatrix=m.convertCssMatrix,r.inverseTransformMatrix=m.inverseTransformMatrix;var i=AI();r.deg2rad=i.deg2rad,r.rad2deg=i.rad2deg,r.angleDelta=i.angleDelta,r.angleDist=i.angleDist,r.isFullCircle=i.isFullCircle,r.isAngleInsideSector=i.isAngleInsideSector,r.isPtInsideSector=i.isPtInsideSector,r.pathArc=i.pathArc,r.pathSector=i.pathSector,r.pathAnnulus=i.pathAnnulus;var T=MI();r.isLeftAnchor=T.isLeftAnchor,r.isCenterAnchor=T.isCenterAnchor,r.isRightAnchor=T.isRightAnchor,r.isTopAnchor=T.isTopAnchor,r.isMiddleAnchor=T.isMiddleAnchor,r.isBottomAnchor=T.isBottomAnchor;var S=SI();r.segmentsIntersect=S.segmentsIntersect,r.segmentDistance=S.segmentDistance,r.getTextLocation=S.getTextLocation,r.clearLocationCache=S.clearLocationCache,r.getVisibleSegment=S.getVisibleSegment,r.findPointOnPath=S.findPointOnPath;var M=Ki();r.extendFlat=M.extendFlat,r.extendDeep=M.extendDeep,r.extendDeepAll=M.extendDeepAll,r.extendDeepNoArrays=M.extendDeepNoArrays;var C=ap();r.log=C.log,r.warn=C.warn,r.error=C.error;var _=(Vm(),Po(Ov));r.counterRegex=_.counter;var w=Cx();r.throttle=w.throttle,r.throttleDone=w.done,r.clearThrottle=w.clear;var h=ig();r.getGraphDiv=h.getGraphDiv,r.isPlotDiv=h.isPlotDiv,r.removeElement=h.removeElement,r.addStyleRule=h.addStyleRule,r.addRelatedStyleRule=h.addRelatedStyleRule,r.deleteRelatedStyleRule=h.deleteRelatedStyleRule,r.setStyleOnHover=h.setStyleOnHover,r.getFullTransformMatrix=h.getFullTransformMatrix,r.getElementTransformMatrix=h.getElementTransformMatrix,r.getElementAndAncestors=h.getElementAndAncestors,r.equalDomRects=h.equalDomRects,r.clearResponsive=EI(),r.preserveDrawingBuffer=CI(),r.makeTraceGroups=LI(),r._=PI(),r.notifier=Pw(),r.filterUnique=Bw(),r.filterVisible=RI(),r.pushUnique=Rw(),r.increment=II(),r.cleanNumber=(FI(),Po(Ow)).default,r.slugify=zI(),r.ensureNumber=function(q){return k(q)?(q=Number(q),q>e||q=q?!1:k(X)&&X>=0&&X%1===0},r.noop=Ax(),r.identity=sg(),r.repeat=function(X,q){for(var W=new Array(q),ee=0;eeW?Math.max(W,Math.min(q,X)):Math.max(q,Math.min(W,X))},r.bBoxIntersect=function(X,q,W){return W=W||0,X.left<=q.right+W&&q.left<=X.right+W&&X.top<=q.bottom+W&&q.top<=X.bottom+W},r.simpleMap=function(X,q,W,ee,ae){for(var he=X.length,xe=new Array(he),we=0;we=Math.pow(2,W)?ae>10?(r.warn("randstr failed uniqueness"),xe):X(q,W,ee,(ae||0)+1):xe},r.OptionControl=function(X,q){X||(X={}),q||(q="opt");var W={};return W.optionList=[],W._newoption=function(ee){ee[q]=X,W[ee.name]=ee,W.optionList.push(ee)},W["_"+q]=X,W},r.smooth=function(X,q){if(q=Math.round(q)||0,q<2)return X;var W=X.length,ee=2*W,ae=2*q-1,he=new Array(ae),xe=new Array(W),we,Me,Se,Ie;for(we=0;we=ee&&(Se-=ee*Math.floor(Se/ee)),Se<0?Se=-1-Se:Se>=W&&(Se=ee-1-Se),Ie+=X[Se]*he[Me];xe[we]=Ie}return xe},r.syncOrAsync=function(X,q,W){var ee,ae;function he(){return r.syncOrAsync(X,q,W)}for(;X.length;)if(ae=X.splice(0,1)[0],ee=ae(q),ee&&ee.then)return ee.then(he);return W&&W(q)},r.stripTrailingSlash=function(X){return X.slice(-1)==="/"?X.slice(0,-1):X},r.noneOrAll=function(X,q,W){if(X){var ee=!1,ae=!0,he,xe;for(he=0;he0?ae:0})},r.fillArray=function(X,q,W,ee){if(ee=ee||r.identity,r.isArrayOrTypedArray(X))for(var ae=0;aez.test(window.navigator.userAgent);var I=/Firefox\/(\d+)\.\d+/;r.getFirefoxVersion=function(){var X=I.exec(window.navigator.userAgent);if(X&&X.length===2){var q=parseInt(X[1]);if(!isNaN(q))return q}return null},r.isD3Selection=function(X){return X instanceof p.selection},r.ensureSingle=function(X,q,W,ee){var ae=X.select(q+(W?"."+W:""));if(ae.size())return ae;var he=X.append(q);return W&&he.classed(W,!0),ee&&he.call(ee),he},r.ensureSingleById=function(X,q,W,ee){var ae=X.select(q+"#"+W);if(ae.size())return ae;var he=X.append(q).attr("id",W);return ee&&he.call(ee),he},r.objectFromPath=function(X,q){for(var W=X.split("."),ee,ae=ee={},he=0;he1?ae+xe[1]:"";if(he&&(xe.length>1||we.length>4||W))for(;ee.test(we);)we=we.replace(ee,"$1"+he+"$2");return we+Me},r.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var F=/^\w*$/;r.templateString=function(X,q){var W={};return X.replace(r.TEMPLATE_STRING_REGEX,function(ee,ae){var he;return F.test(ae)?he=q[ae]:(W[ae]=W[ae]||r.nestedProperty(q,ae).get,he=W[ae](!0)),he!==void 0?he:""})};var P={max:10,count:0,name:"hovertemplate"};r.hovertemplateString=X=>ne(lo(Li({},X),{opts:P}));var j={max:10,count:0,name:"texttemplate"};r.texttemplateString=X=>ne(lo(Li({},X),{opts:j}));var U=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function $(X){var q=X.match(U);return q?{key:q[1],op:q[2],number:Number(q[3])}:{key:X,op:null,number:null}}var Q={max:10,count:0,name:"texttemplate",parseMultDiv:!0};r.texttemplateStringForShapes=X=>ne(lo(Li({},X),{opts:Q}));var re=/^[:|\|]/;function ne({data:X=[],locale:q,fallback:W,labels:ee={},opts:ae,template:he}){return he.replace(r.TEMPLATE_STRING_REGEX,(xe,we,Me)=>{let Se=["xother","yother"].includes(we),Ie=["_xother","_yother"].includes(we),Ge=["_xother_","_yother_"].includes(we),qe=["xother_","yother_"].includes(we),ke=Se||Ie||qe||Ge;(Ie||Ge)&&(we=we.substring(1)),(qe||Ge)&&(we=we.substring(0,we.length-1));let _e=null,ue=null;if(ae.parseMultDiv){var ve=$(we);we=ve.key,_e=ve.op,ue=ve.number}let le;if(ke){if(ee[we]===void 0)return"";le=ee[we]}else for(let Ye of X)if(Ye){if(Ye.hasOwnProperty(we)){le=Ye[we];break}if(F.test(we)||(le=r.nestedProperty(Ye,we).get(!0)),le!==void 0)break}if(le===void 0){let{count:Ye,max:yt,name:gt}=ae,Tt=W===!1?xe:W;return Ye=se&&xe<=V,Se=we>=se&&we<=V;if(Me&&(ee=10*ee+xe-se),Se&&(ae=10*ae+we-se),!Me||!Se){if(ee!==ae)return ee-ae;if(xe!==we)return xe-we}}return ae-ee};var Z=2e9;r.seedPseudoRandom=function(){Z=2e9},r.pseudoRandom=function(){var X=Z;return Z=(69069*Z+1)%4294967296,Math.abs(Z-X)<429496729?r.pseudoRandom():Z/4294967296},r.fillText=function(X,q,W){var ee=Array.isArray(W)?function(xe){W.push(xe)}:function(xe){W.text=xe},ae=r.extractOption(X,q,"htx","hovertext");if(r.isValidTextValue(ae))return ee(ae);var he=r.extractOption(X,q,"tx","text");if(r.isValidTextValue(he))return ee(he)},r.isValidTextValue=function(X){return X||X===0},r.formatPercent=function(X,q){q=q||0;for(var W=(Math.round(100*X*Math.pow(10,q))*Math.pow(.1,q)).toFixed(q)+"%",ee=0;ee1&&(Se=1):Se=0,r.strTranslate(ae-Se*(W+xe),he-Se*(ee+we))+r.strScale(Se)+(Me?"rotate("+Me+(q?"":" "+W+" "+ee)+")":"")},r.setTransormAndDisplay=function(X,q){X.attr("transform",r.getTextTransform(q)),X.style("display",q.scale?null:"none")},r.ensureUniformFontSize=function(X,q){var W=r.extendFlat({},q);return W.size=Math.max(q.size,X._fullLayout.uniformtext.minsize||0),W},r.join2=function(X,q,W){var ee=X.length;return ee>1?X.slice(0,-1).join(q)+W+X[ee-1]:X.join(q)},r.bigFont=function(X){return Math.round(1.2*X)};var K=r.getFirefoxVersion(),H=K!==null&&K<86;r.getPositionFromD3Event=function(){return H?[p.event.layerX,p.event.layerY]:[p.event.offsetX,p.event.offsetY]}}}),BI=ze({"build/plotcss.js"(){"use strict";var J=Nr(),G={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;text-decoration:underline;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--account":"margin-top:16px;padding:8px;border-radius:3px;font-size:.9em;background-color:#edf1f8;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(b in G)p=b.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),J.addStyleRule(p,G[b]);var p,b}}),Vw=ze({"node_modules/is-browser/client.js"(J,G){G.exports=!0}}),Gw=ze({"node_modules/has-hover/index.js"(J,G){"use strict";var p=Vw(),b;typeof window.matchMedia=="function"?b=!window.matchMedia("(hover: none)").matches:b=p,G.exports=b}}),jv=ze({"node_modules/events/events.js"(J,G){"use strict";var p=typeof Reflect=="object"?Reflect:null,b=p&&typeof p.apply=="function"?p.apply:function(C,_,w){return Function.prototype.apply.call(C,_,w)},E;p&&typeof p.ownKeys=="function"?E=p.ownKeys:Object.getOwnPropertySymbols?E=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:E=function(C){return Object.getOwnPropertyNames(C)};function k(M){console&&console.warn&&console.warn(M)}var l=Number.isNaN||function(C){return C!==C};function e(){e.init.call(this)}G.exports=e,G.exports.once=i,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var t=10;function n(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return t},set:function(M){if(typeof M!="number"||M<0||l(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");t=M}}),e.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},e.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||l(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function r(M){return M._maxListeners===void 0?e.defaultMaxListeners:M._maxListeners}e.prototype.getMaxListeners=function(){return r(this)},e.prototype.emit=function(C){for(var _=[],w=1;w0&&(A=_[0]),A instanceof Error)throw A;var x=new Error("Unhandled error."+(A?" ("+A.message+")":""));throw x.context=A,x}var z=u[C];if(z===void 0)return!1;if(typeof z=="function")b(z,this,_);else for(var I=z.length,O=f(z,I),w=0;w0&&A.length>h&&!A.warned){A.warned=!0;var x=new Error("Possible EventEmitter memory leak detected. "+A.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");x.name="MaxListenersExceededWarning",x.emitter=M,x.type=C,x.count=A.length,k(x)}return M}e.prototype.addListener=function(C,_){return a(this,C,_,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(C,_){return a(this,C,_,!0)};function o(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(M,C,_){var w={fired:!1,wrapFn:void 0,target:M,type:C,listener:_},h=o.bind(w);return h.listener=_,w.wrapFn=h,h}e.prototype.once=function(C,_){return n(_),this.on(C,s(this,C,_)),this},e.prototype.prependOnceListener=function(C,_){return n(_),this.prependListener(C,s(this,C,_)),this},e.prototype.removeListener=function(C,_){var w,h,u,A,x;if(n(_),h=this._events,h===void 0)return this;if(w=h[C],w===void 0)return this;if(w===_||w.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete h[C],h.removeListener&&this.emit("removeListener",C,w.listener||_));else if(typeof w!="function"){for(u=-1,A=w.length-1;A>=0;A--)if(w[A]===_||w[A].listener===_){x=w[A].listener,u=A;break}if(u<0)return this;u===0?w.shift():v(w,u),w.length===1&&(h[C]=w[0]),h.removeListener!==void 0&&this.emit("removeListener",C,x||_)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(C){var _,w,h;if(w=this._events,w===void 0)return this;if(w.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):w[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete w[C]),this;if(arguments.length===0){var u=Object.keys(w),A;for(h=0;h=0;h--)this.removeListener(C,_[h]);return this};function c(M,C,_){var w=M._events;if(w===void 0)return[];var h=w[C];return h===void 0?[]:typeof h=="function"?_?[h.listener||h]:[h]:_?m(h):f(h,h.length)}e.prototype.listeners=function(C){return c(this,C,!0)},e.prototype.rawListeners=function(C){return c(this,C,!1)},e.listenerCount=function(M,C){return typeof M.listenerCount=="function"?M.listenerCount(C):g.call(M,C)},e.prototype.listenerCount=g;function g(M){var C=this._events;if(C!==void 0){var _=C[M];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}e.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]};function f(M,C){for(var _=new Array(C),w=0;w{},{passive:!0}),E},triggerHandler:function(E,k,l){var e,t=E._ev;if(!t)return;var n=t._events[k];if(!n)return;function r(o){if(o.listener){if(t.removeListener(k,o.listener),!o.fired)return o.fired=!0,o.listener.apply(t,[l])}else return o.apply(t,[l])}n=Array.isArray(n)?n:[n];var a;for(a=0;ab.queueLength&&(l.undoQueue.queue.shift(),l.undoQueue.index--)},k.startSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!0,l.undoQueue.beginSequence=!0},k.stopSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!1,l.undoQueue.beginSequence=!1},k.undo=function(e){var t,n;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=P.length)return!1;if(I.dimensions===2){if(D++,O.length===D)return I;var j=O[D];if(!S(j))return!1;I=P[F][j]}else I=P[F]}else I=P}}return I}function S(I){return I===Math.round(I)&&I>=0}function M(I){var O,D;O=G.modules[I]._module,D=O.basePlotModule;var B={};B.type=null;var F=n({},b),P=n({},O.attributes);J.crawl(P,function($,Q,re,ne,se){o(F,se).set(void 0),$===void 0&&o(P,se).set(void 0)}),n(B,F),G.traceIs(I,"noOpacity")&&delete B.opacity,G.traceIs(I,"showLegend")||(delete B.showlegend,delete B.legendgroup),G.traceIs(I,"noHover")&&(delete B.hoverinfo,delete B.hoverlabel),O.selectPoints||delete B.selectedpoints,n(B,P),D.attributes&&n(B,D.attributes),B.type=I;var j={meta:O.meta||{},categories:O.categories||{},animatable:!!O.animatable,type:I,attributes:w(B)};if(O.layoutAttributes){var U={};n(U,O.layoutAttributes),j.layoutAttributes=w(U)}return O.animatable||J.crawl(j,function($){J.isValObject($)&&"anim"in $&&delete $.anim}),j}function C(){var I={},O,D;n(I,E);for(O in G.subplotsRegistry)if(D=G.subplotsRegistry[O],!!D.layoutAttributes)if(Array.isArray(D.attr))for(var B=0;B=r&&(n._input||{})._templateitemname;o&&(a=r);var s=t+"["+a+"]",c;function g(){c={},o&&(c[s]={},c[s][b]=o)}g();function f(T,S){c[T]=S}function v(T,S){o?G.nestedProperty(c[s],T).set(S):c[s+"."+T]=S}function m(){var T=c;return g(),T}function i(T,S){T&&v(T,S);var M=m();for(var C in M)G.nestedProperty(e,C).set(M[C])}return{modifyBase:f,modifyItem:v,getUpdateObj:m,applyUpdate:i}}}}),hc=ze({"src/plots/cartesian/constants.js"(J,G){"use strict";var p=(Vm(),Po(Ov)).counter;G.exports={idRegex:{x:p("x","( domain)?"),y:p("y","( domain)?")},attrRegex:p("[xy]axis"),xAxisMatch:p("xaxis"),yAxisMatch:p("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}}),Xl=ze({"src/plots/cartesian/axis_ids.js"(J){"use strict";var G=mi(),p=hc();J.id2name=function(k){if(!(typeof k!="string"||!k.match(p.AX_ID_PATTERN))){var l=k.split(" ")[0].slice(1);return l==="1"&&(l=""),k.charAt(0)+"axis"+l}},J.name2id=function(k){if(k.match(p.AX_NAME_PATTERN)){var l=k.slice(5);return l==="1"&&(l=""),k.charAt(0)+l}},J.cleanId=function(k,l,e){var t=/( domain)$/.test(k);if(!(typeof k!="string"||!k.match(p.AX_ID_PATTERN))&&!(l&&k.charAt(0)!==l)&&!(t&&!e)){var n=k.split(" ")[0].slice(1).replace(/^0+/,"");return n==="1"&&(n=""),k.charAt(0)+n+(t&&e?" domain":"")}},J.list=function(E,k,l){var e=E._fullLayout;if(!e)return[];var t=J.listIds(E,k),n=new Array(t.length),r;for(r=0;re?1:-1:+(E.slice(1)||1)-+(k.slice(1)||1)},J.ref2id=function(E){return/^[xyz]/.test(E)?E.split(" ")[0]:!1};function b(E,k){if(k&&k.length){for(var l=0;l0?".":"")+o;p.isPlainObject(s)?e(s,n,c,a+1):n(c,o,s)}})}}}),cl=ze({"src/plots/plots.js"(J,G){"use strict";var p=ci(),b=jm().timeFormatLocale,E=Cw().formatLocale,k=ao(),l=Lw(),e=ev().version,t=mi(),n=Wm(),r=hs(),a=Nr(),o=Qn(),s=No().BADNUM,c=Xl(),g=iv().clearOutline,f=Lx(),v=og(),m=Hw(),i=zf().getModuleCalcData,T=a.relinkPrivateKeys,S=a._,M=G.exports={};a.extendFlat(M,t),M.attributes=ws(),M.attributes.type.values=M.allTypes,M.fontAttrs=Qs(),M.layoutAttributes=Gm();var C=NI();M.executeAPICommand=C.executeAPICommand,M.computeAPICommandBindings=C.computeAPICommandBindings,M.manageCommandObserver=C.manageCommandObserver,M.hasSimpleAPICommandBindings=C.hasSimpleAPICommandBindings,M.redrawText=function(V){return V=a.getGraphDiv(V),new Promise(function(Z){setTimeout(function(){V._fullLayout&&(t.getComponentMethod("annotations","draw")(V),t.getComponentMethod("legend","draw")(V),t.getComponentMethod("colorbar","draw")(V),Z(M.previousPromises(V)))},300)})},M.resize=function(V){V=a.getGraphDiv(V);var Z,K=new Promise(function(H,X){(!V||a.isHidden(V))&&X(new Error("Resize must be passed a displayed plot div element.")),V._redrawTimer&&clearTimeout(V._redrawTimer),V._resolveResize&&(Z=V._resolveResize),V._resolveResize=H,V._redrawTimer=setTimeout(function(){if(!V.layout||V.layout.width&&V.layout.height||a.isHidden(V)){H(V);return}delete V.layout.width,delete V.layout.height;var q=V.changed;V.autoplay=!0,t.call("relayout",V,{autosize:!0}).then(function(){V.changed=q,V._resolveResize===H&&(delete V._resolveResize,H(V))})},100)});return Z&&Z(K),K},M.previousPromises=function(V){if((V._promises||[]).length)return Promise.all(V._promises).then(function(){V._promises=[]})},M.sendDataToCloud=function(V,Z){V.emit("plotly_beforeexport");let K=new URL(Z).origin;var H=M.graphJson(V,!1,"object");H.version=e;var X=new URL(Z);X.searchParams.set("origin",window.location.origin);var q=window.open(X.href,"_blank");if(!q){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),V.emit("plotly_exportfail");return}var W=function(ee){ee.origin===K&&ee.data&&ee.data.type==="CHART_AUTH_SUCCESS"&&(q.postMessage({type:"chart",chart:H},K),window.removeEventListener("message",W),V.emit("plotly_afterexport"))};return window.addEventListener("message",W),!1};var _=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],w=["year","month","dayMonth","dayMonthYear"];M.supplyDefaults=function(V,Z){var K=Z&&Z.skipUpdateCalc,H=V._fullLayout||{};if(H._skipDefaults){delete H._skipDefaults;return}var X=V._fullLayout={},q=V.layout||{},W=V._fullData||[],ee=V._fullData=[],ae=V.data||[],he=V.calcdata||[],xe=V._context||{},we;V._transitionData||M.createTransitionData(V),X._dfltTitle={plot:S(V,"Click to enter Plot title"),subtitle:S(V,"Click to enter Plot subtitle"),x:S(V,"Click to enter X axis title"),y:S(V,"Click to enter Y axis title"),colorbar:S(V,"Click to enter Colorscale title"),annotation:S(V,"new text")},X._traceWord=S(V,"trace");var Me=A(V,_);if(H._initialAutoSizeIsDone){var Se=H.width,Ie=H.height;M.supplyLayoutGlobalDefaults(q,X,Me),q.width||(X.width=Se),q.height||(X.height=Ie),M.sanitizeMargins(X)}else{M.supplyLayoutGlobalDefaults(q,X,Me);var Ge=!q.width||!q.height,qe=X.autosize,ke=xe.autosizable,_e=Ge&&(qe||ke);_e?M.plotAutoSize(V,q,X):Ge&&M.sanitizeMargins(X),!qe&&Ge&&(q.width=X.width,q.height=X.height)}X._d3locale=x(Me,X.separators),X._extraFormat=A(V,w),X._initialAutoSizeIsDone=!0,X._dataLength=ae.length,X._modules=[],X._visibleModules=[],X._basePlotModules=[];var ue=X._subplots=u(),ve=X._splomAxes={x:{},y:{}},le=X._splomSubplots={};X._splomGridDflt={},X._scatterStackOpts={},X._firstScatter={},X._alignmentOpts={},X._colorAxes={},X._requestRangeslider={},X._traceUids=h(W,ae),M.supplyDataDefaults(ae,ee,q,X);var Ae=Object.keys(ve.x),Be=Object.keys(ve.y);if(Ae.length>1&&Be.length>1){for(t.getComponentMethod("grid","sizeDefaults")(q,X),we=0;we15&&Be.length>15&&X.shapes.length===0&&X.images.length===0,M.linkSubplots(ee,X,W,H),M.cleanPlot(ee,X,W,H);var Tt=!!(H._has&&H._has("cartesian")),At=!!(X._has&&X._has("cartesian")),$t=Tt,rr=At;$t&&!rr?H._bgLayer.remove():rr&&!$t&&(X._shouldCreateBgLayer=!0),H._zoomlayer&&!V._dragging&&g({_fullLayout:H}),z(ee,X),T(X,H),t.getComponentMethod("colorscale","crossTraceDefaults")(ee,X),X._preGUI||(X._preGUI={}),X._tracePreGUI||(X._tracePreGUI={});var _r=X._tracePreGUI,Xt={},or;for(or in _r)Xt[or]="old";for(we=0;we0){var xe=1-2*q;W=Math.round(xe*W),ee=Math.round(xe*ee)}}var we=M.layoutAttributes.width.min,Me=M.layoutAttributes.height.min;W1,Ie=!K.height&&Math.abs(H.height-ee)>1;(Ie||Se)&&(Se&&(H.width=W),Ie&&(H.height=ee)),Z._initialAutoSize||(Z._initialAutoSize={width:W,height:ee}),M.sanitizeMargins(H)},M.supplyLayoutModuleDefaults=function(V,Z,K,H){var X=t.componentsRegistry,q=Z._basePlotModules,W,ee,ae,he=t.subplotsRegistry.cartesian;for(W in X)ae=X[W],ae.includeBasePlot&&ae.includeBasePlot(V,Z);q.length||q.push(he),Z._has("cartesian")&&(t.getComponentMethod("grid","contentDefaults")(V,Z),he.finalizeSubplots(V,Z));for(var xe in Z._subplots)Z._subplots[xe].sort(a.subplotSort);for(ee=0;ee1&&(K.l/=qe,K.r/=qe)}if(Me){var ke=(K.t+K.b)/Me;ke>1&&(K.t/=ke,K.b/=ke)}var _e=K.xl!==void 0?K.xl:K.x,ue=K.xr!==void 0?K.xr:K.x,ve=K.yt!==void 0?K.yt:K.y,le=K.yb!==void 0?K.yb:K.y;Se[Z]={l:{val:_e,size:K.l+Ge},r:{val:ue,size:K.r+Ge},b:{val:le,size:K.b+Ge},t:{val:ve,size:K.t+Ge}},Ie[Z]=1}if(!H._replotting)return M.doAutoMargin(V)}};function P(V){if("_redrawFromAutoMarginCount"in V._fullLayout)return!1;var Z=c.list(V,"",!0);for(var K in Z)if(Z[K].autoshift||Z[K].shift)return!0;return!1}M.doAutoMargin=function(V){var Z=V._fullLayout,K=Z.width,H=Z.height;Z._size||(Z._size={}),D(Z);var X=Z._size,q=Z.margin,W={t:0,b:0,l:0,r:0},ee=a.extendFlat({},X),ae=q.l,he=q.r,xe=q.t,we=q.b,Me=Z._pushmargin,Se=Z._pushmarginIds,Ie=Z.minreducedwidth,Ge=Z.minreducedheight;if(q.autoexpand!==!1){for(var qe in Me)Se[qe]||delete Me[qe];var ke=V._fullLayout._reservedMargin;for(var _e in ke)for(var ue in ke[_e]){var ve=ke[_e][ue];W[ue]=Math.max(W[ue],ve)}Me.base={l:{val:0,size:ae},r:{val:1,size:he},t:{val:1,size:xe},b:{val:0,size:we}};for(var le in W){var Ae=0;for(var Be in Me)Be!=="base"&&k(Me[Be][le].size)&&(Ae=Me[Be][le].size>Ae?Me[Be][le].size:Ae);var Xe=Math.max(0,q[le]-Ae);W[le]=Math.max(0,W[le]-Xe)}for(var Ye in Me){var yt=Me[Ye].l||{},gt=Me[Ye].b||{},Tt=yt.val,At=yt.size,$t=gt.val,rr=gt.size,_r=K-W.r-W.l,Xt=H-W.t-W.b;for(var or in Me){if(k(At)&&Me[or].r){var Ot=Me[or].r.val,vt=Me[or].r.size;if(Ot>Tt){var ht=(At*Ot+(vt-_r)*Tt)/(Ot-Tt),De=(vt*(1-Tt)+(At-_r)*(1-Ot))/(Ot-Tt);ht+De>ae+he&&(ae=ht,he=De)}}if(k(rr)&&Me[or].t){var Ne=Me[or].t.val,We=Me[or].t.size;if(Ne>$t){var Ke=(rr*Ne+(We-Xt)*$t)/(Ne-$t),Je=(We*(1-$t)+(rr-Xt)*(1-Ne))/(Ne-$t);Ke+Je>we+xe&&(we=Ke,xe=Je)}}}}}var et=a.constrain(K-q.l-q.r,B,Ie),Mt=a.constrain(H-q.t-q.b,F,Ge),pt=Math.max(0,K-et),Pt=Math.max(0,H-Mt);if(pt){var Ct=(ae+he)/pt;Ct>1&&(ae/=Ct,he/=Ct)}if(Pt){var qt=(we+xe)/Pt;qt>1&&(we/=qt,xe/=qt)}if(X.l=Math.round(ae)+W.l,X.r=Math.round(he)+W.r,X.t=Math.round(xe)+W.t,X.b=Math.round(we)+W.b,X.p=Math.round(q.pad),X.w=Math.round(K)-X.l-X.r,X.h=Math.round(H)-X.t-X.b,!Z._replotting&&(M.didMarginChange(ee,X)||P(V))){"_redrawFromAutoMarginCount"in Z?Z._redrawFromAutoMarginCount++:Z._redrawFromAutoMarginCount=1;var Vt=3*(1+Object.keys(Se).length);if(Z._redrawFromAutoMarginCount1)return!0}return!1},M.graphJson=function(V,Z=!1,K="json",H=!1,X=!1){(H&&Z&&!V._fullData||H&&!Z&&!V._fullLayout)&&M.supplyDefaults(V);var q=H?V._fullData:V.data,W=H?V._fullLayout:V.layout,ee=(V._transitionData||{})._frames;function ae(we,Me){if(typeof we=="function")return Me?"_function_":null;if(a.isPlainObject(we)){var Se={};return Object.keys(we).sort().forEach(function(ke){if(["_","["].indexOf(ke.charAt(0))===-1){if(typeof we[ke]=="function"){Me&&(Se[ke]="_function");return}Se[ke]=ae(we[ke],Me)}}),Se}var Ie=Array.isArray(we),Ge=a.isTypedArray(we);if((Ie||Ge)&&we.dtype&&we.shape){var qe=we.bdata;return ae({dtype:we.dtype,shape:we.shape,bdata:a.isArrayBuffer(qe)?l.encode(qe):qe},Me)}return Ie?we.map(function(ke){return ae(ke,Me)}):Ge?a.simpleMap(we,a.identity):a.isJSDate(we)?a.ms2DateTimeLocal(+we):we}var he={data:(q||[]).map(function(we){var Me=ae(we);return Z&&delete Me.fit,Me})};if(!Z&&(he.layout=ae(W),H)){var xe=W._size;he.layout.computed={margin:{b:xe.b,l:xe.l,r:xe.r,t:xe.t}}}return ee&&(he.frames=ae(ee)),X&&(he.config=ae(V._context,!0)),K==="object"?he:JSON.stringify(he)},M.modifyFrames=function(V,Z){var K,H,X,q=V._transitionData._frames,W=V._transitionData._frameHash;for(K=0;K0&&(V._transitioningWithDuration=!0),V._transitionData._interruptCallbacks.push(function(){H=!0}),K.redraw&&V._transitionData._interruptCallbacks.push(function(){return t.call("redraw",V)}),V._transitionData._interruptCallbacks.push(function(){V.emit("plotly_transitioninterrupted",[])});var Me=0,Se=0;function Ie(){return Me++,function(){Se++,!H&&Se===Me&&ee(we)}}K.runFn(Ie),setTimeout(Ie())})}function ee(we){if(V._transitionData)return q(V._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(K.redraw)return t.call("redraw",V)}).then(function(){V._transitioning=!1,V._transitioningWithDuration=!1,V.emit("plotly_transitioned",[])}).then(we)}function ae(){if(V._transitionData)return V._transitioning=!1,X(V._transitionData._interruptCallbacks)}var he=[M.previousPromises,ae,K.prepareFn,M.rehover,M.reselect,W],xe=a.syncOrAsync(he,V);return(!xe||!xe.then)&&(xe=Promise.resolve()),xe.then(function(){return V})}M.doCalcdata=function(V,Z){var K=c.list(V),H=V._fullData,X=V._fullLayout,q,W,ee,ae=new Array(H.length),he=(V.calcdata||[]).slice();for(V.calcdata=ae,X._numBoxes=0,X._numViolins=0,X._violinScaleGroupStats={},V._hmpixcount=0,V._hmlumcount=0,X._piecolormap={},X._sunburstcolormap={},X._treemapcolormap={},X._iciclecolormap={},X._funnelareacolormap={},ee=0;eeQ?Q.match(l):null;J.matchTex=e,J.convertToTspans=function(Q,re,ne){var se=Q.text(),V=!Q.attr("data-notex")&&re&&re._context.typesetMath&&e(se);V&&!g()&&(V=null);var Z=G.select(Q.node().parentNode);if(Z.empty())return;var K=Q.attr("class")?Q.attr("class").split(" ")[0]:"text";K+="-math",Z.selectAll("svg."+K).remove(),Z.selectAll("g."+K+"-group").remove(),Q.style("display",null).attr({"data-unformatted":se,"data-math":"N"});function H(){Z.empty()||(K=Q.attr("class")+"-math",Z.select("svg."+K).remove()),Q.text("").style("white-space","pre");var X=P(Q.node(),se);X&&Q.style("pointer-events","all"),J.positionText(Q),ne&&ne.call(Q)}return V?(re&&re._promises||[]).push(new Promise(function(X){Q.style("display","none");var q=parseInt(Q.node().style.fontSize,10),W={fontSize:q},ee=Q.attr("text-anchor");f(V[2],W,function(ae,he,xe){Z.selectAll("svg."+K).remove(),Z.selectAll("g."+K+"-group").remove();var we=ae&&ae.select("svg");if(!we||!we.node()){H(),X();return}Q.style("display","none");var Me=Z.append("g").classed(K+"-group",!0).attr({"pointer-events":"none","data-unformatted":se,"data-math":"Y"});Me.node().appendChild(we.node()),he&&he.node()&&we.node().insertBefore(he.node().cloneNode(!0),we.node().firstChild);var Se=xe.width,Ie=xe.height;we.attr({class:K,height:Ie,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":W.fontSize+"px"});var Ge=Q.node().style.fill||"black",qe=we.select("g");qe.attr({fill:Ge,stroke:Ge});var ke=qe.node().getBoundingClientRect(),_e=ke.width,ue=ke.height;(_e>Se||ue>Ie)&&(we.style("overflow","hidden"),ke=we.node().getBoundingClientRect(),_e=ke.width,ue=ke.height);var ve=+Q.attr("x"),le=+Q.attr("y"),Ae=q||Q.node().getBoundingClientRect().height,Be=-Ae/4;K[0]==="y"?Me.attr({transform:"rotate("+[-90,ve,le]+")"+b(-_e/2,Be-ue/2)}):K[0]==="l"?le=Be-ue/2:K[0]==="a"&&K.indexOf("atitle")!==0?(ve=0,le=Be):(ve=ve-_e*(ee==="middle"?.5:ee==="end"?1:0),le=le+Be-ue/2),we.attr({x:ve,y:le}),ne&&ne.call(Q,Me),X(Me)})})):H(),Q};var t=/(<|<|<)/g,n=/(>|>|>)/g;function r(Q){return Q.replace(t,"\\lt ").replace(n,"\\gt ")}var a=null,o=()=>typeof MathJax<"u"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,s=!1,c=!1;function g(){let Q=o();return Q===3||Q===4?!0:(Q===null?s||(s=!0,p.warn("MathJax is not loaded. Math equations will not be rendered.")):c||(c=!0,p.warn("Unsupported MathJax version:",MathJax.version)),!1)}function f(Q,re,ne){let se=o();var V;let Z=function(){if(!a){let q=MathJax._.output.svg_ts.SVG,W=p.extendFlat({},MathJax.config.svg,{fontCache:"local"});se===4&&(W.linebreaks=p.extendFlat({},W.linebreaks,{inline:!1})),a=MathJax._.mathjax.mathjax.document(document,p.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new q(W)}))}let H="math-output-"+p.randstr({},64);V=G.select("body").append("div").attr({id:H}).style({visibility:"hidden",position:"absolute","font-size":re.fontSize+"px"});let X=r(Q).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return a.convert(X,{display:!1})}).then(function(q){V.node().appendChild(q)})},K=function(){let H=V.select(".MathJax"),X=!H.empty()&&V.select("svg").node();if(!X)p.log("There was an error in the tex syntax.",Q),ne();else{let q=X.getBoundingClientRect(),W=H.select("defs");ne(H,W,q)}V.remove()};Promise.resolve().then(Z).then(K).catch(H=>{p.log("MathJax typesetting failed.",Q,H),V&&V.remove(),ne()})}var v={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},m={sub:"0.3em",sup:"-0.6em"},i={sub:"-0.21em",sup:"0.42em"},T="\u200B",S=["http:","https:","mailto:","",void 0,":"],M=J.NEWLINES=/(\r\n?|\n)/g,C=/(<[^<>]*>)/,_=/<(\/?)([^ >]*)(\s+(.*))?>/i,w=//i;J.BR_TAG_ALL=//gi;var h=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,u=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,A=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,x=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function z(Q,re){if(!Q)return null;var ne=Q.match(re),se=ne&&(ne[3]||ne[4]);return se&&B(se)}var I=/(^|;)\s*color:/;J.plainText=function(Q,re){re=re||{};for(var ne=re.len!==void 0&&re.len!==-1?re.len:1/0,se=re.allowedTags!==void 0?re.allowedTags:["br"],V="...",Z=V.length,K=Q.split(C),H=[],X="",q=0,W=0;WZ?H.push(ee.slice(0,Math.max(0,we-Z))+V):H.push(ee.slice(0,we));break}X=""}}return H.join("")};var O={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},D=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function B(Q){return Q.replace(D,function(re,ne){var se;return ne.charAt(0)==="#"?se=F(ne.charAt(1)==="x"?parseInt(ne.slice(2),16):parseInt(ne.slice(1),10)):se=O[ne],se||re})}J.convertEntities=B;function F(Q){if(!(Q>1114111)){var re=String.fromCodePoint;if(re)return re(Q);var ne=String.fromCharCode;return Q<=65535?ne(Q):ne((Q>>10)+55232,Q%1024+56320)}}function P(Q,re){re=re.replace(M," ");var ne=!1,se=[],V,Z=-1;function K(){Z++;var _e=document.createElementNS(E.svg,"tspan");G.select(_e).attr({class:"line",dy:Z*k+"em"}),Q.appendChild(_e),V=_e;var ue=se;if(se=[{node:_e}],ue.length>1)for(var ve=1;ve.",re);return}var ue=se.pop();_e!==ue.type&&p.log("Start tag <"+ue.type+"> doesnt match end tag <"+_e+">. Pretending it did match.",re),V=se[se.length-1].node}var W=w.test(re);W?K():(V=Q,se=[{node:Q}]);for(var ee=re.split(C),ae=0;ae=0;m--,i++){var T=g[m];v[i]=[1-T[0],T[1]]}return v}function s(g,f){f=f||{};for(var v=g.domain,m=g.range,i=m.length,T=new Array(i),S=0;Sv-g?g=v-(f-v):f-v=0?T=n.colorscale.sequential:T=n.colorscale.sequentialminus,s._sync("colorscale",T)}}}}),fl=ze({"src/components/colorscale/index.js"(J,G){"use strict";var p=Bv(),b=Bf();G.exports={moduleType:"component",name:"colorscale",attributes:qs(),layoutAttributes:Ww(),supplyLayoutDefaults:jI(),handleDefaults:qc(),crossTraceDefaults:UI(),calc:Qf(),scales:p.scales,defaultScale:p.defaultScale,getScale:p.get,isValidScale:p.isValid,hasColorscale:b.hasColorscale,extractOpts:b.extractOpts,extractScale:b.extractScale,flipScale:b.flipScale,makeColorScaleFunc:b.makeColorScaleFunc,makeColorScaleFuncFromTrace:b.makeColorScaleFuncFromTrace}}}),el=ze({"src/traces/scatter/subtypes.js"(J,G){"use strict";var p=Nr(),b=Ff().isTypedArraySpec;G.exports={hasLines:function(E){return E.visible&&E.mode&&E.mode.indexOf("lines")!==-1},hasMarkers:function(E){return E.visible&&(E.mode&&E.mode.indexOf("markers")!==-1||E.type==="splom")},hasText:function(E){return E.visible&&E.mode&&E.mode.indexOf("text")!==-1},isBubble:function(E){var k=E.marker;return p.isPlainObject(k)&&(p.isArrayOrTypedArray(k.size)||b(k.size))}}}}),lg=ze({"src/traces/scatter/make_bubble_size_func.js"(J,G){"use strict";var p=ao();G.exports=function(E,k){k||(k=2);var l=E.marker,e=l.sizeref||1,t=l.sizemin||0,n=l.sizemode==="area"?function(r){return Math.sqrt(r/e)}:function(r){return r/e};return function(r){var a=n(r/k);return p(a)&&a>0?Math.max(a,t):0}}}}),kh=ze({"src/components/fx/helpers.js"(J){"use strict";var G=Nr();J.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},J.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var n=e.xaxes||[],r=e.yaxes||[],a=0;a=0&&n.index{let o=r.toLowerCase(),s=r,c=l(a);for(o==="m"&&c.length>2&&(t.push([s,...c.splice(0,2)]),o="l",s=s==="m"?"l":"L");;){if(c.length===p[o])return t.push([s,...c]),"";if(c.length0&&(ue=100,_e=_e.replace("-open","")),_e.indexOf("-dot")>0&&(ue+=200,_e=_e.replace("-dot","")),_e=m.symbolNames.indexOf(_e),_e>=0&&(_e+=ue)}return _e%100>=w||_e>=400?0:Math.floor(Math.max(_e,0))};function u(_e,ue,ve,le){var Ae=_e%100;return m.symbolFuncs[Ae](ue,ve,le)+(_e>=200?h:"")}var A=E("~f"),x={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};m.gradient=function(_e,ue,ve,le,Ae,Be){var Xe=x[le];return z(_e,ue,ve,Xe.type,Ae,Be,Xe.start,Xe.stop,!1,Xe.reversed)};function z(_e,ue,ve,le,Ae,Be,Xe,Ye,yt,gt){var Tt=Ae.length,At;le==="linear"?At={node:"linearGradient",attrs:{x1:Xe.x,y1:Xe.y,x2:Ye.x,y2:Ye.y,gradientUnits:yt?"userSpaceOnUse":"objectBoundingBox"},reversed:gt}:le==="radial"&&(At={node:"radialGradient",reversed:gt});for(var $t=new Array(Tt),rr=0;rr=0&&_e.i===void 0&&(_e.i=Be.i),ue.style("opacity",le.selectedOpacityFn?le.selectedOpacityFn(_e):_e.mo===void 0?Xe.opacity:_e.mo),le.ms2mrc){var yt;_e.ms==="various"||Xe.size==="various"?yt=3:yt=le.ms2mrc(_e.ms),_e.mrc=yt,le.selectedSizeFn&&(yt=_e.mrc=le.selectedSizeFn(_e));var gt=m.symbolNumber(_e.mx||Xe.symbol)||0;_e.om=gt%200>=100;var Tt=ke(_e,ve),At=W(_e,ve);ue.attr("d",u(gt,yt,Tt,At))}var $t=!1,rr,_r,Xt;if(_e.so)Xt=Ye.outlierwidth,_r=Ye.outliercolor,rr=Xe.outliercolor;else{var or=(Ye||{}).width;Xt=(_e.mlw+1||or+1||(_e.trace?(_e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in _e?_r=_e.mlcc=le.lineScale(_e.mlc):b.isArrayOrTypedArray(Ye.color)?_r=e.defaultLine:_r=Ye.color,b.isArrayOrTypedArray(Xe.color)&&(rr=e.defaultLine,$t=!0),"mc"in _e?rr=_e.mcc=le.markerScale(_e.mc):rr=Xe.color||Xe.colors||"rgba(0,0,0,0)",le.selectedColorFn&&(rr=le.selectedColorFn(_e))}let Ot=_e.mld||(Ye||{}).dash;if(Ot&&m.dashLine(ue,Ot,Xt),_e.om)ue.call(e.stroke,rr).style({"stroke-width":(Xt||1)+"px",fill:"none"});else{ue.style("stroke-width",(_e.isBlank?0:Xt)+"px");var vt=Xe.gradient,ht=_e.mgt;ht?$t=!0:ht=vt&&vt.type,b.isArrayOrTypedArray(ht)&&(ht=ht[0],x[ht]||(ht=0));var De=Xe.pattern,Ne=m.getPatternAttr,We=De&&(Ne(De.shape,_e.i,"")||Ne(De.path,_e.i,""));if(ht&&ht!=="none"){var Ke=_e.mgc;Ke?$t=!0:Ke=vt.color;var Je=ve.uid;$t&&(Je+="-"+_e.i),m.gradient(ue,Ae,Je,ht,[[0,Ke],[1,rr]],"fill")}else if(We){var et=!1,Mt=De.fgcolor;!Mt&&Be&&Be.color&&(Mt=Be.color,et=!0);var pt=Ne(Mt,_e.i,Be&&Be.color||null),Pt=Ne(De.bgcolor,_e.i,null),Ct=De.fgopacity,qt=Ne(De.size,_e.i,8),Vt=Ne(De.solidity,_e.i,.3);et=et||_e.mcc||b.isArrayOrTypedArray(De.shape)||b.isArrayOrTypedArray(De.path)||b.isArrayOrTypedArray(De.bgcolor)||b.isArrayOrTypedArray(De.fgcolor)||b.isArrayOrTypedArray(De.size)||b.isArrayOrTypedArray(De.solidity);var Ht=ve.uid;et&&(Ht+="-"+_e.i),m.pattern(ue,"point",Ae,Ht,We,qt,Vt,_e.mcc,De.fillmode,Pt,pt,Ct)}else b.isArrayOrTypedArray(rr)?e.fill(ue,rr[_e.i]):e.fill(ue,rr);Xt&&e.stroke(ue,_r)}},m.makePointStyleFns=function(_e){var ue={},ve=_e.marker;return ue.markerScale=m.tryColorscale(ve,""),ue.lineScale=m.tryColorscale(ve,"line"),l.traceIs(_e,"symbols")&&(ue.ms2mrc=g.isBubble(_e)?f(_e):function(){return(ve.size||6)/2}),_e.selectedpoints&&b.extendFlat(ue,m.makeSelectedPointStyleFns(_e)),ue},m.makeSelectedPointStyleFns=function(_e){var ue={},ve=_e.selected||{},le=_e.unselected||{},Ae=_e.marker||{},Be=ve.marker||{},Xe=le.marker||{},Ye=Ae.opacity,yt=Be.opacity,gt=Xe.opacity,Tt=yt!==void 0,At=gt!==void 0;(b.isArrayOrTypedArray(Ye)||Tt||At)&&(ue.selectedOpacityFn=function(De){var Ne=De.mo===void 0?Ae.opacity:De.mo;return De.selected?Tt?yt:Ne:At?gt:c*Ne});var $t=Ae.color,rr=Be.color,_r=Xe.color;(rr||_r)&&(ue.selectedColorFn=function(De){var Ne=De.mcc||$t;return De.selected?rr||Ne:_r||Ne});var Xt=Ae.size,or=Be.size,Ot=Xe.size,vt=or!==void 0,ht=Ot!==void 0;return l.traceIs(_e,"symbols")&&(vt||ht)&&(ue.selectedSizeFn=function(De){var Ne=De.mrc||Xt/2;return De.selected?vt?or/2:Ne:ht?Ot/2:Ne}),ue},m.makeSelectedTextStyleFns=function(_e){var ue={},ve=_e.selected||{},le=_e.unselected||{},Ae=_e.textfont||{},Be=ve.textfont||{},Xe=le.textfont||{},Ye=Ae.color,yt=Be.color,gt=Xe.color;return ue.selectedTextColorFn=function(Tt){var At=Tt.tc||Ye;return Tt.selected?yt||At:gt||(yt?At:e.addOpacity(At,c))},ue},m.selectedPointStyle=function(_e,ue){if(!(!_e.size()||!ue.selectedpoints)){var ve=m.makeSelectedPointStyleFns(ue),le=ue.marker||{},Ae=[];ve.selectedOpacityFn&&Ae.push(function(Be,Xe){Be.style("opacity",ve.selectedOpacityFn(Xe))}),ve.selectedColorFn&&Ae.push(function(Be,Xe){e.fill(Be,ve.selectedColorFn(Xe))}),ve.selectedSizeFn&&Ae.push(function(Be,Xe){var Ye=Xe.mx||le.symbol||0,yt=ve.selectedSizeFn(Xe);Be.attr("d",u(m.symbolNumber(Ye),yt,ke(Xe,ue),W(Xe,ue))),Xe.mrc2=yt}),Ae.length&&_e.each(function(Be){for(var Xe=p.select(this),Ye=0;Ye0?ve:0}m.textPointStyle=function(_e,ue,ve){if(_e.size()){var le;if(ue.selectedpoints){var Ae=m.makeSelectedTextStyleFns(ue);le=Ae.selectedTextColorFn}var Be=ue.texttemplate,Xe=ve._fullLayout;_e.each(function(Ye){var yt=p.select(this),gt=Be?b.extractOption(Ye,ue,"txt","texttemplate"):b.extractOption(Ye,ue,"tx","text");if(!gt&>!==0){yt.remove();return}if(Be){var Tt=ue._module.formatLabels,At=Tt?Tt(Ye,ue,Xe):{},$t={};v($t,ue,Ye.i),gt=b.texttemplateString({data:[$t,Ye,ue._meta],fallback:ue.texttemplatefallback,labels:At,locale:Xe._d3locale,template:gt})}var rr=Ye.tp||ue.textposition,_r=D(Ye,ue),Xt=le?le(Ye):Ye.tc||ue.textfont.color;yt.call(m.font,{family:Ye.tf||ue.textfont.family,weight:Ye.tw||ue.textfont.weight,style:Ye.ty||ue.textfont.style,variant:Ye.tv||ue.textfont.variant,textcase:Ye.tC||ue.textfont.textcase,lineposition:Ye.tE||ue.textfont.lineposition,shadow:Ye.tS||ue.textfont.shadow,size:_r,color:Xt}).text(gt).call(r.convertToTspans,ve).call(O,rr,_r,Ye.mrc)})}},m.selectedTextStyle=function(_e,ue){if(!(!_e.size()||!ue.selectedpoints)){var ve=m.makeSelectedTextStyleFns(ue);_e.each(function(le){var Ae=p.select(this),Be=ve.selectedTextColorFn(le),Xe=le.tp||ue.textposition,Ye=D(le,ue);e.fill(Ae,Be);var yt=l.traceIs(ue,"bar-like");O(Ae,Xe,Ye,le.mrc2||le.mrc,yt)})}};var B=.5;m.smoothopen=function(_e,ue){if(_e.length<3)return"M"+_e.join("L");var ve="M"+_e[0],le=[],Ae;for(Ae=1;Ae<_e.length-1;Ae++)le.push(Q(_e[Ae-1],_e[Ae],_e[Ae+1],ue));for(ve+="Q"+le[0][0]+" "+_e[1],Ae=2;Ae<_e.length-1;Ae++)ve+="C"+le[Ae-2][1]+" "+le[Ae-1][0]+" "+_e[Ae];return ve+="Q"+le[_e.length-3][1]+" "+_e[_e.length-1],ve},m.smoothclosed=function(_e,ue){if(_e.length<3)return"M"+_e.join("L")+"Z";var ve="M"+_e[0],le=_e.length-1,Ae=[Q(_e[le],_e[0],_e[1],ue)],Be;for(Be=1;Be=yt||De>=Tt&&De<=yt)&&(Ne<=At&&Ne>=gt||Ne>=At&&Ne<=gt)&&(_e=[De,Ne])}return _e}m.applyBackoff=se,m.makeTester=function(){var _e=b.ensureSingleById(p.select("body"),"svg","js-plotly-tester",function(ve){ve.attr(a.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),ue=b.ensureSingle(_e,"path","js-reference-point",function(ve){ve.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});m.tester=_e,m.testref=ue},m.savedBBoxes={};var V=0,Z=1e4;m.bBox=function(_e,ue,ve){ve||(ve=K(_e));var le;if(ve){if(le=m.savedBBoxes[ve],le)return b.extendFlat({},le)}else if(_e.childNodes.length===1){var Ae=_e.childNodes[0];if(ve=K(Ae),ve){var Be=+Ae.getAttribute("x")||0,Xe=+Ae.getAttribute("y")||0,Ye=Ae.getAttribute("transform");if(!Ye){var yt=m.bBox(Ae,!1,ve);return Be&&(yt.left+=Be,yt.right+=Be),Xe&&(yt.top+=Xe,yt.bottom+=Xe),yt}if(ve+="~"+Be+"~"+Xe+"~"+Ye,le=m.savedBBoxes[ve],le)return b.extendFlat({},le)}}var gt,Tt;ue?gt=_e:(Tt=m.tester.node(),gt=_e.cloneNode(!0),Tt.appendChild(gt)),p.select(gt).attr("transform",null).call(r.positionText,0,0);var At=gt.getBoundingClientRect(),$t=m.testref.node().getBoundingClientRect();ue||Tt.removeChild(gt);var rr={height:At.height,width:At.width,left:At.left-$t.left,top:At.top-$t.top,right:At.right-$t.left,bottom:At.bottom-$t.top};return V>=Z&&(m.savedBBoxes={},V=0),ve&&(m.savedBBoxes[ve]=rr),V++,b.extendFlat({},rr)};function K(_e){var ue=_e.getAttribute("data-unformatted");if(ue!==null)return ue+_e.getAttribute("data-math")+_e.getAttribute("text-anchor")+_e.getAttribute("style")}m.setClipUrl=function(_e,ue,ve){_e.attr("clip-path",H(ue,ve))};function H(_e,ue){if(!_e)return null;var ve=ue._context,le=ve._exportedPlot?"":ve._baseUrl||"";return le?"url('"+le+"#"+_e+"')":"url(#"+_e+")"}m.getTranslate=function(_e){var ue=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ve=_e.attr?"attr":"getAttribute",le=_e[ve]("transform")||"",Ae=le.replace(ue,function(Be,Xe,Ye){return[Xe,Ye].join(" ")}).split(" ");return{x:+Ae[0]||0,y:+Ae[1]||0}},m.setTranslate=function(_e,ue,ve){var le=/(\btranslate\(.*?\);?)/,Ae=_e.attr?"attr":"getAttribute",Be=_e.attr?"attr":"setAttribute",Xe=_e[Ae]("transform")||"";return ue=ue||0,ve=ve||0,Xe=Xe.replace(le,"").trim(),Xe+=n(ue,ve),Xe=Xe.trim(),_e[Be]("transform",Xe),Xe},m.getScale=function(_e){var ue=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ve=_e.attr?"attr":"getAttribute",le=_e[ve]("transform")||"",Ae=le.replace(ue,function(Be,Xe,Ye){return[Xe,Ye].join(" ")}).split(" ");return{x:+Ae[0]||1,y:+Ae[1]||1}},m.setScale=function(_e,ue,ve){var le=/(\bscale\(.*?\);?)/,Ae=_e.attr?"attr":"getAttribute",Be=_e.attr?"attr":"setAttribute",Xe=_e[Ae]("transform")||"";return ue=ue||1,ve=ve||1,Xe=Xe.replace(le,"").trim(),Xe+="scale("+ue+","+ve+")",Xe=Xe.trim(),_e[Be]("transform",Xe),Xe};var X=/\s*sc.*/;m.setPointGroupScale=function(_e,ue,ve){if(ue=ue||1,ve=ve||1,!!_e){var le=ue===1&&ve===1?"":"scale("+ue+","+ve+")";_e.each(function(){var Ae=(this.getAttribute("transform")||"").replace(X,"");Ae+=le,Ae=Ae.trim(),this.setAttribute("transform",Ae)})}};var q=/translate\([^)]*\)\s*$/;m.setTextPointsScale=function(_e,ue,ve){_e&&_e.each(function(){var le,Ae=p.select(this),Be=Ae.select("text");if(Be.node()){var Xe=parseFloat(Be.attr("x")||0),Ye=parseFloat(Be.attr("y")||0),yt=(Ae.attr("transform")||"").match(q);ue===1&&ve===1?le=[]:le=[n(Xe,Ye),"scale("+ue+","+ve+")",n(-Xe,-Ye)],yt&&le.push(yt),Ae.attr("transform",le.join(""))}})};function W(_e,ue){var ve;return _e&&(ve=_e.mf),ve===void 0&&(ve=ue.marker&&ue.marker.standoff||0),!ue._geo&&!ue._xA?-ve:ve}m.getMarkerStandoff=W;var ee=Math.atan2,ae=Math.cos,he=Math.sin;function xe(_e,ue){var ve=ue[0],le=ue[1];return[ve*ae(_e)-le*he(_e),ve*he(_e)+le*ae(_e)]}var we,Me,Se,Ie,Ge,qe;function ke(_e,ue){var ve=_e.ma;ve===void 0&&(ve=ue.marker.angle,(!k(ve)||b.isArrayOrTypedArray(ve))&&(ve=0));var le,Ae,Be=ue.marker.angleref;if(Be==="previous"||Be==="north"){if(ue._geo){var Xe=ue._geo.project(_e.lonlat);le=Xe[0],Ae=Xe[1]}else{var Ye=ue._xA,yt=ue._yA;if(Ye&&yt)le=Ye.c2p(_e.x),Ae=yt.c2p(_e.y);else return 90}if(ue._geo){var gt=_e.lonlat[0],Tt=_e.lonlat[1],At=ue._geo.project([gt,Tt+1e-5]),$t=ue._geo.project([gt+1e-5,Tt]),rr=ee($t[1]-Ae,$t[0]-le),_r=ee(At[1]-Ae,At[0]-le),Xt;if(Be==="north")Xt=ve/180*Math.PI;else if(Be==="previous"){var or=gt/180*Math.PI,Ot=Tt/180*Math.PI,vt=we/180*Math.PI,ht=Me/180*Math.PI,De=vt-or,Ne=ae(ht)*he(De),We=he(ht)*ae(Ot)-ae(ht)*he(Ot)*ae(De);Xt=-ee(Ne,We)-Math.PI,we=gt,Me=Tt}var Ke=xe(rr,[ae(Xt),0]),Je=xe(_r,[he(Xt),0]);ve=ee(Ke[1]+Je[1],Ke[0]+Je[0])/Math.PI*180,Be==="previous"&&!(qe===ue.uid&&_e.i===Ge+1)&&(ve=null)}if(Be==="previous"&&!ue._geo)if(qe===ue.uid&&_e.i===Ge+1&&k(le)&&k(Ae)){var et=le-Se,Mt=Ae-Ie,pt=ue.line&&ue.line.shape||"",Pt=pt.slice(pt.length-1);Pt==="h"&&(Mt=0),Pt==="v"&&(et=0),ve+=ee(Mt,et)/Math.PI*180+90}else ve=null}return Se=le,Ie=Ae,Ge=_e.i,qe=ue.uid,ve}m.getMarkerAngle=ke}}),qv=ze({"src/components/titles/index.js"(J,G){"use strict";var p=ci(),b=ao(),E=cl(),k=mi(),l=Nr(),e=l.strTranslate,t=Xi(),n=Qn(),r=Cs(),a=np(),o=dc().OPPOSITE_SIDE,s=/ [XY][0-9]* /,c=1.6,g=1.6;function f(v,m,i){var T=v._fullLayout,S=i.propContainer,M=i.propName,C=i.placeholder,_=i.traceIndex,w=i.avoid||{},h=i.attributes,u=i.transform,A=i.containerGroup,x=1,z=S.title,I=(z&&z.text?z.text:"").trim(),O=!1,D=z&&z.font?z.font:{},B=D.family,F=D.size,P=D.color,j=D.weight,U=D.style,$=D.variant,Q=D.textcase,re=D.lineposition,ne=D.shadow,se=i.subtitlePropName,V=!!se,Z=i.subtitlePlaceholder,K=(S.title||{}).subtitle||{text:"",font:{}},H=(K.text||"").trim(),X=!1,q=1,W=K.font,ee=W.family,ae=W.size,he=W.color,xe=W.weight,we=W.style,Me=W.variant,Se=W.textcase,Ie=W.lineposition,Ge=W.shadow,qe;M==="title.text"?qe="titleText":M.indexOf("axis")!==-1?qe="axisTitleText":M.indexOf("colorbar")!==-1&&(qe="colorbarTitleText");var ke=v._context.edits[qe];function _e(rr,_r){return rr===void 0||_r===void 0?!1:rr.replace(s," % ")===_r.replace(s," % ")}I===""?x=0:_e(I,C)&&(ke||(I=""),x=.2,O=!0),V&&(H===""?q=0:_e(H,Z)&&(ke||(H=""),q=.2,X=!0)),i._meta?I=l.templateString(I,i._meta):T._meta&&(I=l.templateString(I,T._meta));var ue=I||H||ke,ve;A||(A=l.ensureSingle(T._infolayer,"g","g-"+m),ve=T._hColorbarMoveTitle);var le=A.selectAll("text."+m).data(ue?[0]:[]);le.enter().append("text"),le.text(I).attr("class",m),le.exit().remove();var Ae=null,Be=m+"-subtitle",Xe=H||ke;if(V&&(Ae=A.selectAll("text."+Be).data(Xe?[0]:[]),Ae.enter().append("text"),Ae.text(H).attr("class",Be),Ae.exit().remove()),!ue)return A;function Ye(rr,_r){l.syncOrAsync([yt,gt],{title:rr,subtitle:_r})}function yt(rr){var _r=rr.title,Xt=rr.subtitle,or;!u&&ve&&(u={}),u?(or="",u.rotate&&(or+="rotate("+[u.rotate,h.x,h.y]+")"),(u.offset||ve)&&(or+=e(0,(u.offset||0)-(ve||0)))):or=null,_r.attr("transform",or);function Ot(Ke){if(Ke){var Je=p.select(Ke.node().parentNode).select("."+Be);if(!Je.empty()){var et=Ke.node().getBBox();if(et.height){var Mt=et.y+et.height+c*ae;Je.attr("y",Mt)}}}}if(_r.style("opacity",x*n.opacity(P)).call(t.font,{color:n.rgb(P),size:p.round(F,2),family:B,weight:j,style:U,variant:$,textcase:Q,shadow:ne,lineposition:re}).attr(h).call(r.convertToTspans,v,Ot),Xt&&!Xt.empty()){var vt=A.select("."+m+"-math-group"),ht=_r.node().getBBox(),De=vt.node()?vt.node().getBBox():void 0,Ne=De?De.y+De.height+c*ae:ht.y+ht.height+g*ae,We=l.extendFlat({},h,{y:Ne});Xt.attr("transform",or),Xt.style("opacity",q*n.opacity(he)).call(t.font,{color:n.rgb(he),size:p.round(ae,2),family:ee,weight:xe,style:we,variant:Me,textcase:Se,shadow:Ge,lineposition:Ie}).attr(We).call(r.convertToTspans,v)}return E.previousPromises(v)}function gt(rr){var _r=rr.title,Xt=p.select(_r.node().parentNode);if(w&&w.selection&&w.side&&I){Xt.attr("transform",null);var or=o[w.side],Ot=w.side==="left"||w.side==="top"?-1:1,vt=b(w.pad)?w.pad:2,ht=t.bBox(Xt.node()),De={t:0,b:0,l:0,r:0},Ne=v._fullLayout._reservedMargin;for(var We in Ne)for(var Ke in Ne[We]){var Je=Ne[We][Ke];De[Ke]=Math.max(De[Ke],Je)}var et={left:De.l,top:De.t,right:T.width-De.r,bottom:T.height-De.b},Mt=w.maxShift||Ot*(et[w.side]-ht[w.side]),pt=0;if(Mt<0)pt=Mt;else{var Pt=w.offsetLeft||0,Ct=w.offsetTop||0;ht.left-=Pt,ht.right-=Pt,ht.top-=Ct,ht.bottom-=Ct,w.selection.each(function(){var Vt=t.bBox(this);l.bBoxIntersect(ht,Vt,vt)&&(pt=Math.max(pt,Ot*(Vt[w.side]-ht[or])+vt))}),pt=Math.min(Mt,pt),S._titleScoot=Math.abs(pt)}if(pt>0||Mt<0){var qt={left:[-pt,0],right:[pt,0],top:[0,-pt],bottom:[0,pt]}[w.side];Xt.attr("transform",e(qt[0],qt[1]))}}}le.call(Ye,Ae);function Tt(rr,_r){rr.text(_r).on("mouseover.opacity",function(){p.select(this).transition().duration(a.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){p.select(this).transition().duration(a.HIDE_PLACEHOLDER).style("opacity",0)})}if(ke&&(I?le.on(".opacity",null):(Tt(le,C),O=!0),le.call(r.makeEditable,{gd:v}).on("edit",function(rr){_!==void 0?k.call("_guiRestyle",v,M,rr,_):k.call("_guiRelayout",v,M,rr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ye)}).on("input",function(rr){this.text(rr||" ").call(r.positionText,h.x,h.y)}),V)){if(V&&!I){var At=le.node().getBBox(),$t=At.y+At.height+g*ae;Ae.attr("y",$t)}H?Ae.on(".opacity",null):(Tt(Ae,Z),X=!0),Ae.call(r.makeEditable,{gd:v}).on("edit",function(rr){k.call("_guiRelayout",v,"title.subtitle.text",rr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ye)}).on("input",function(rr){this.text(rr||" ").call(r.positionText,Ae.attr("x"),Ae.attr("y"))})}return le.classed("js-placeholder",O),Ae&&!Ae.empty()&&Ae.classed("js-placeholder",X),A}G.exports={draw:f,SUBTITLE_PADDING_EM:g,SUBTITLE_PADDING_MATHJAX_EM:c}}}),Dd=ze({"src/plots/cartesian/set_convert.js"(J,G){"use strict";var p=ci(),b=jm().utcFormat,E=Nr(),k=E.numberFormat,l=ao(),e=E.cleanNumber,t=E.ms2DateTime,n=E.dateTime2ms,r=E.ensureNumber,a=E.isArrayOrTypedArray,o=No(),s=o.FP_SAFE,c=o.BADNUM,g=o.LOG_CLIP,f=o.ONEWEEK,v=o.ONEDAY,m=o.ONEHOUR,i=o.ONEMIN,T=o.ONESEC,S=Xl(),M=hc(),C=M.HOUR_PATTERN,_=M.WEEKDAY_PATTERN;function w(u){return Math.pow(10,u)}function h(u){return u!=null}G.exports=function(A,x){x=x||{};var z=A._id||"x",I=z.charAt(0);function O(H,X){if(H>0)return Math.log(H)/Math.LN10;if(H<=0&&X&&A.range&&A.range.length===2){var q=A.range[0],W=A.range[1];return .5*(q+W-2*g*Math.abs(q-W))}else return c}function D(H,X,q,W){if((W||{}).msUTC&&l(H))return+H;var ee=n(H,q||A.calendar);if(ee===c)if(l(H)){H=+H;var ae=Math.floor(E.mod(H+.05,1)*10),he=Math.round(H-ae/10);ee=n(new Date(he))+ae/10}else return c;return ee}function B(H,X,q){return t(H,X,q||A.calendar)}function F(H){return A._categories[Math.round(H)]}function P(H){if(h(H)){if(A._categoriesMap===void 0&&(A._categoriesMap={}),A._categoriesMap[H]!==void 0)return A._categoriesMap[H];A._categories.push(typeof H=="number"?String(H):H);var X=A._categories.length-1;return A._categoriesMap[H]=X,X}return c}function j(H,X){for(var q=new Array(X),W=0;WA.range[1]&&(q=!q);for(var W=q?-1:1,ee=W*H,ae=0,he=0;hewe)ae=he+1;else{ae=ee<(xe+we)/2?he:he+1;break}}var Me=A._B[ae]||0;return isFinite(Me)?re(H,A._m2,Me):0},V=function(H){var X=A._rangebreaks.length;if(!X)return ne(H,A._m,A._b);for(var q=0,W=0;WA._rangebreaks[W].pmax&&(q=W+1);return ne(H,A._m2,A._B[q])}}A.c2l=A.type==="log"?O:r,A.l2c=A.type==="log"?w:r,A.l2p=se,A.p2l=V,A.c2p=A.type==="log"?function(H,X){return se(O(H,X))}:se,A.p2c=A.type==="log"?function(H){return w(V(H))}:V,["linear","-"].indexOf(A.type)!==-1?(A.d2r=A.r2d=A.d2c=A.r2c=A.d2l=A.r2l=e,A.c2d=A.c2r=A.l2d=A.l2r=r,A.d2p=A.r2p=function(H){return A.l2p(e(H))},A.p2d=A.p2r=V,A.cleanPos=r):A.type==="log"?(A.d2r=A.d2l=function(H,X){return O(e(H),X)},A.r2d=A.r2c=function(H){return w(e(H))},A.d2c=A.r2l=e,A.c2d=A.l2r=r,A.c2r=O,A.l2d=w,A.d2p=function(H,X){return A.l2p(A.d2r(H,X))},A.p2d=function(H){return w(V(H))},A.r2p=function(H){return A.l2p(e(H))},A.p2r=V,A.cleanPos=r):A.type==="date"?(A.d2r=A.r2d=E.identity,A.d2c=A.r2c=A.d2l=A.r2l=D,A.c2d=A.c2r=A.l2d=A.l2r=B,A.d2p=A.r2p=function(H,X,q){return A.l2p(D(H,0,q))},A.p2d=A.p2r=function(H,X,q){return B(V(H),X,q)},A.cleanPos=function(H){return E.cleanDate(H,c,A.calendar)}):A.type==="category"?(A.d2c=A.d2l=P,A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=$,A.r2c=function(H){var X=Q(H);return X!==void 0?X:A.fraction2r(.5)},A.l2r=A.c2r=r,A.r2l=Q,A.d2p=function(H){return A.l2p(A.r2c(H))},A.p2d=function(H){return F(V(H))},A.r2p=A.d2p,A.p2r=V,A.cleanPos=function(H){return typeof H=="string"&&H!==""?H:r(H)}):A.type==="multicategory"&&(A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=$,A.r2c=function(H){var X=$(H);return X!==void 0?X:A.fraction2r(.5)},A.r2c_just_indices=U,A.l2r=A.c2r=r,A.r2l=$,A.d2p=function(H){return A.l2p(A.r2c(H))},A.p2d=function(H){return F(V(H))},A.r2p=A.d2p,A.p2r=V,A.cleanPos=function(H){return Array.isArray(H)||typeof H=="string"&&H!==""?H:r(H)},A.setupMultiCategory=function(H){var X=A._traceIndices,q,W,ee=A._matchGroup;if(ee&&A._categories.length===0){for(var ae in ee)if(ae!==z){var he=x[S.id2name(ae)];X=X.concat(he._traceIndices)}}var xe=[[0,{}],[0,{}]],we=[];for(q=0;qhe[1]&&(W[ae?0:1]=q,ee[1]=he[1]),ee[0]>=ee[1])if(X!==void 0){var xe=he[0]+1;q!==void 0&&(xe=Math.min(xe,he[1])),W[ae?0:1]=A.l2r(xe)}else q!==void 0&&(W[ae?1:0]=A.l2r(he[1]-1))}},A.cleanRange=function(H,X){A._cleanRange(H,X),A.limitRange(H)},A._cleanRange=function(H,X){X||(X={}),H||(H="range");var q=E.nestedProperty(A,H).get(),W,ee;if(A.type==="date"?ee=E.dfltRange(A.calendar):I==="y"?ee=M.DFLTRANGEY:A._name==="realaxis"?ee=[0,1]:ee=X.dfltRange||M.DFLTRANGEX,ee=ee.slice(),(A.rangemode==="tozero"||A.rangemode==="nonnegative")&&(ee[0]=0),!q||q.length!==2){E.nestedProperty(A,H).set(ee);return}var ae=q[0]===null,he=q[1]===null;for(A.type==="date"&&!A.autorange&&(q[0]=E.cleanDate(q[0],c,A.calendar),q[1]=E.cleanDate(q[1],c,A.calendar)),W=0;W<2;W++)if(A.type==="date"){if(!E.isDateTime(q[W],A.calendar)){A[H]=ee;break}if(A.r2l(q[0])===A.r2l(q[1])){var xe=E.constrain(A.r2l(q[0]),E.MIN_MS+1e3,E.MAX_MS-1e3);q[0]=A.l2r(xe-1e3),q[1]=A.l2r(xe+1e3);break}}else{if(!l(q[W]))if(!(ae||he)&&l(q[1-W]))q[W]=q[1-W]*(W?10:.1);else{A[H]=ee;break}if(q[W]<-s?q[W]=-s:q[W]>s&&(q[W]=s),q[0]===q[1]){var we=Math.max(1,Math.abs(q[0]*1e-6));q[0]-=we,q[1]+=we}}},A.setScale=function(H){var X=x._size;if(A.overlaying){var q=S.getFromId({_fullLayout:x},A.overlaying);A.domain=q.domain}var W=H&&A._r?"_r":"range",ee=A.calendar;A.cleanRange(W);var ae=A.r2l(A[W][0],ee),he=A.r2l(A[W][1],ee),xe=I==="y";if(xe?(A._offset=X.t+(1-A.domain[1])*X.h,A._length=X.h*(A.domain[1]-A.domain[0]),A._m=A._length/(ae-he),A._b=-A._m*he):(A._offset=X.l+A.domain[0]*X.w,A._length=X.w*(A.domain[1]-A.domain[0]),A._m=A._length/(he-ae),A._b=-A._m*ae),A._rangebreaks=[],A._lBreaks=0,A._m2=0,A._B=[],A.rangebreaks){var we,Me;if(A._rangebreaks=A.locateBreaks(Math.min(ae,he),Math.max(ae,he)),A._rangebreaks.length){for(we=0;wehe&&(Se=!Se),Se&&A._rangebreaks.reverse();var Ie=Se?-1:1;for(A._m2=Ie*A._length/(Math.abs(he-ae)-A._lBreaks),A._B.push(-A._m2*(xe?he:ae)),we=0;weee&&(ee+=7,aeee&&(ee+=24,ae=W&&ae=W&&H=Ye.min&&(leYe.max&&(Ye.max=Ae),Be=!1)}Be&&he.push({min:le,max:Ae})}};for(q=0;qT*2}function o(g){return Math.max(1,(g-1)/1e3)}function s(g,f){for(var v=g.length,m=o(v),i=0,T=0,S={},M=0;Mi*2}function c(g){return k(g[0])&&k(g[1])}}}),md=ze({"src/plots/cartesian/autorange.js"(J,G){"use strict";var p=ci(),b=ao(),E=Nr(),k=No().FP_SAFE,l=mi(),e=Xi(),t=Xl(),n=t.getFromId,r=t.isLinked;G.exports={applyAutorangeOptions:A,getAutoRange:a,makePadFn:s,doAutoRange:v,findExtremes:m,concatExtremes:f};function a(x,z){var I,O,D=[],B=x._fullLayout,F=s(B,z,0),P=s(B,z,1),j=f(x,z),U=j.min,$=j.max;if(U.length===0||$.length===0)return E.simpleMap(z.range,z.r2l);var Q=U[0].val,re=$[0].val;for(I=1;I0&&(we=X-F(ee)-P(ae),we>q?Me/we>W&&(he=ee,xe=ae,W=Me/we):Me/X>W&&(he={val:ee.val,nopad:1},xe={val:ae.val,nopad:1},W=Me/X));function Se(_e,ue){return Math.max(_e,P(ue))}if(Q===re){var Ie=Q-1,Ge=Q+1;if(K)if(Q===0)D=[0,1];else{var qe=(Q>0?$:U).reduce(Se,0),ke=Q/(1-Math.min(.5,qe/X));D=Q>0?[0,ke]:[ke,0]}else H?D=[Math.max(0,Ie),Math.max(1,Ge)]:D=[Ie,Ge]}else K?(he.val>=0&&(he={val:0,nopad:1}),xe.val<=0&&(xe={val:0,nopad:1})):H&&(he.val-W*F(he)<0&&(he={val:0,nopad:1}),xe.val<=0&&(xe={val:1,nopad:1})),W=(xe.val-he.val-o(z,ee.val,ae.val))/(X-F(he)-P(xe)),D=[he.val-W*F(he),xe.val+W*P(xe)];return D=A(D,z),z.limitRange&&z.limitRange(),se&&D.reverse(),E.simpleMap(D,z.l2r||Number)}function o(x,z,I){var O=0;if(x.rangebreaks)for(var D=x.locateBreaks(z,I),B=0;B0?I.ppadplus:I.ppadminus)||I.ppad||0),ee=q((x._m>0?I.ppadminus:I.ppadplus)||I.ppad||0),ae=q(I.vpadplus||I.vpad),he=q(I.vpadminus||I.vpad);if(!U){if(H=1/0,X=-1/0,j)for(Q=0;Q0&&(H=re),re>X&&re-k&&(H=re),re>X&&re=Me;Q--)we(Q);return{min:O,max:D,opts:I}}function i(x,z,I,O){S(x,z,I,O,C)}function T(x,z,I,O){S(x,z,I,O,_)}function S(x,z,I,O,D){for(var B=O.tozero,F=O.extrapad,P=!0,j=0;j=I&&(U.extrapad||!F)){P=!1;break}else D(z,U.val)&&U.pad<=I&&(F||!U.extrapad)&&(x.splice(j,1),j--)}if(P){var $=B&&z===0;x.push({val:z,pad:$?0:I,extrapad:$?!1:F})}}function M(x){return b(x)&&Math.abs(x)=z}function w(x,z){var I=z.autorangeoptions;return I&&I.minallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.minallowed:I&&I.clipmin!==void 0&&u(z,I.clipmin,I.clipmax)?Math.max(x,z.d2l(I.clipmin)):x}function h(x,z){var I=z.autorangeoptions;return I&&I.maxallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.maxallowed:I&&I.clipmax!==void 0&&u(z,I.clipmin,I.clipmax)?Math.min(x,z.d2l(I.clipmax)):x}function u(x,z,I){return z!==void 0&&I!==void 0?(z=x.d2l(z),I=x.d2l(I),z=j&&(B=j,I=j),F<=j&&(F=j,O=j)}}return I=w(I,z),O=h(O,z),[I,O]}}}),Gi=ze({"src/plots/cartesian/axes.js"(J,G){"use strict";var p=ci(),b=ao(),E=cl(),k=mi(),l=Nr(),e=l.strTranslate,t=Cs(),n=qv(),r=Qn(),a=Xi(),o=cf(),s=Xw(),c=hc(),g=No(),f=g.ONEMAXYEAR,v=g.ONEAVGYEAR,m=g.ONEMINYEAR,i=g.ONEMAXQUARTER,T=g.ONEAVGQUARTER,S=g.ONEMINQUARTER,M=g.ONEMAXMONTH,C=g.ONEAVGMONTH,_=g.ONEMINMONTH,w=g.ONEWEEK,h=g.ONEDAY,u=h/2,A=g.ONEHOUR,x=g.ONEMIN,z=g.ONESEC,I=g.ONEMILLI,O=g.ONEMICROSEC,D=g.MINUS_SIGN,B=g.BADNUM,F={K:"zeroline"},P={K:"gridline",L:"path"},j={K:"minor-gridline",L:"path"},U={K:"tick",L:"path"},$={K:"tick",L:"text"},Q={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},re=dc(),ne=re.MID_SHIFT,se=re.CAP_SHIFT,V=re.LINE_SPACING,Z=re.OPPOSITE_SIDE,K=3,H=G.exports={};H.setConvert=Dd();var X=Xm(),q=Xl(),W=q.idSort,ee=q.isLinked;H.id2name=q.id2name,H.name2id=q.name2id,H.cleanId=q.cleanId,H.list=q.list,H.listIds=q.listIds,H.getFromId=q.getFromId,H.getFromTrace=q.getFromTrace;var ae=md();H.getAutoRange=ae.getAutoRange,H.findExtremes=ae.findExtremes;var he=1e-4;function xe(lt){var rt=(lt[1]-lt[0])*he;return[lt[0]-rt,lt[1]+rt]}function we(lt,rt,fr){if(![fr,lt,rt].every(b)||fr===0)return lt;let lr=Math.round((lt-rt)/fr),Tr=rt+lr*fr;return lt!==Tr&&Math.abs(lt-Tr)xr+" domain")),kt=kt.concat(Ir||[]),ar.length>Dr?(l.warn("Array attribute "+jt+" has more entries than expected, truncating to "+Dr),ar=ar.slice(0,Dr)):ar.length2e-6||((fr-lt._forceTick0)/lt._minDtick%1+1.000001)%1>2e-6)&&(lt._minDtick=0))},H.saveRangeInitial=function(lt,rt){for(var fr=H.list(lt,"",!0),lr=!1,Tr=0;TrEr*.3||jt(lr)||jt(Tr))){var xr=fr.dtick/2;lt+=lt+xrDr){var ot=Number(fr.slice(1));Ir.exactYears>Dr&&ot%12===0?lt=H.tickIncrement(lt,"M6","reverse")+h*1.5:Ir.exactMonths>Dr?lt=H.tickIncrement(lt,"M1","reverse")+h*15.5:lt-=u;var kt=H.tickIncrement(lt,fr);if(kt<=lr)return kt}return lt}H.prepMinorTicks=function(lt,rt,fr){var lr,Tr;if(!((lr=rt.minor)!=null&&lr.dtick)){delete lt.dtick;var Ir=rt.dtick&&b(rt._tmin),Dr;if(Ir){var ot=H.tickIncrement(rt._tmin,rt.dtick,!0);Dr=[rt._tmin,ot*.99+rt._tmin*.01]}else{var kt=l.simpleMap(rt.range,rt.r2l);Dr=[kt[0],.8*kt[0]+.2*kt[1]]}if(lt.range=l.simpleMap(Dr,rt.l2r),lt._isMinor=!0,H.prepTicks(lt,fr),Ir){var jt=b(rt.dtick),ar=b(lt.dtick),Er=jt?rt.dtick:+rt.dtick.substring(1),xr=ar?lt.dtick:+lt.dtick.substring(1);jt&&ar?ke(Er,xr)?Er===2*w&&xr===2*h&&(lt.dtick=w):Er===2*w&&xr===3*h?lt.dtick=w:Er===w&&!(rt._input.minor||{}).nticks?lt.dtick=h:_e(Er/xr,2.5)?lt.dtick=Er/2:lt.dtick=Er:String(rt.dtick).charAt(0)==="M"?ar?lt.dtick="M1":ke(Er,xr)?Er>=12&&xr===2&&(lt.dtick="M3"):lt.dtick=rt.dtick:String(lt.dtick).charAt(0)==="L"?String(rt.dtick).charAt(0)==="L"?ke(Er,xr)||(lt.dtick=_e(Er/xr,2.5)?rt.dtick/2:rt.dtick):lt.dtick="D1":lt.dtick==="D2"&&+rt.dtick>1&&(lt.dtick=1)}lt.range=rt.range}((Tr=rt.minor)==null?void 0:Tr._tick0Init)===void 0&&(lt.tick0=rt.tick0)};function ke(lt,rt){return Math.abs((lt/rt+.5)%1-.5)<.001}function _e(lt,rt){return Math.abs(lt/rt-1)<.001}H.prepTicks=function(lt,rt){var fr=l.simpleMap(lt.range,lt.r2l,void 0,void 0,rt);if(lt.tickmode==="auto"||!lt.dtick){var lr=lt.nticks,Tr;lr||(lt.type==="category"||lt.type==="multicategory"?(Tr=lt.tickfont?l.bigFont(lt.tickfont.size||12):15,lr=lt._length/Tr):(Tr=lt._id.charAt(0)==="y"?40:80,lr=l.constrain(lt._length/Tr,4,9)+1),lt._name==="radialaxis"&&(lr*=2)),lt.minor&<.minor.tickmode!=="array"||lt.tickmode==="array"&&(lr*=100),lt._roughDTick=Math.abs(fr[1]-fr[0])/lr,H.autoTicks(lt,lt._roughDTick),lt._minDtick>0&<.dtick0?(Ir=lr-1,Dr=lr):(Ir=lr,Dr=lr);var ot=lt[Ir].value,kt=lt[Dr].value,jt=Math.abs(kt-ot),ar=fr||jt,Er=0;ar>=m?jt>=m&&jt<=f?Er=jt:Er=v:fr===T&&ar>=S?jt>=S&&jt<=i?Er=jt:Er=T:ar>=_?jt>=_&&jt<=M?Er=jt:Er=C:fr===w&&ar>=w?Er=w:ar>=h?Er=h:fr===u&&ar>=u?Er=u:fr===A&&ar>=A&&(Er=A);var xr;Er>=jt&&(Er=jt,xr=!0);var zr=Tr+Er;if(rt.rangebreaks&&Er>0){for(var Lr=84,aa=0,Sa=0;Saw&&(Er=jt)}(Er>0||lr===0)&&(lt[lr].periodX=Tr+Er/2)}}H.calcTicks=function(rt,fr){for(var lr=rt.type,Tr=rt.calendar,Ir=rt.ticklabelstep,Dr=rt.ticklabelmode==="period",ot=rt.range[0]>rt.range[1],kt=!rt.ticklabelindex||l.isArrayOrTypedArray(rt.ticklabelindex)?rt.ticklabelindex:[rt.ticklabelindex],jt=l.simpleMap(rt.range,rt.r2l,void 0,void 0,fr),ar=jt[1]=(ai?0:1);rn--){var Ri=!rn;rn?(rt._dtickInit=rt.dtick,rt._tick0Init=rt.tick0):ai&&(rt.minor._dtickInit=rt.minor.dtick,rt.minor._tick0Init=rt.minor.tick0);var Gn=rn?rt:l.extendFlat({},rt,ai?rt.minor:{minor:{}});if(Ri?H.prepMinorTicks(Gn,rt,fr):H.prepTicks(Gn,fr),Gn.tickmode==="array"){rn?(Sa=[],Lr=Xe(rt,!Ri)):(wa=[],aa=Xe(rt,!Ri));continue}if(Gn.tickmode==="sync"){Sa=[],Lr=Be(rt);continue}var no=xe(jt),Di=no[0],fn=no[1],Ai=b(Gn.dtick),jn=lr==="log"&&!(Ai||Gn.dtick.charAt(0)==="L"),Xn=H.tickFirst(Gn,fr);if(rn){if(rt._tmin=Xn,Xn=fn:gi<=fn;gi=H.tickIncrement(gi,oo,ar,Tr)){if(rn&&qi++,Gn.rangebreaks&&!ar){if(gi=xr)break}if(Sa.length>zr||gi===eo)break;eo=gi;var qn={value:we(gi,Vn,oo)};rn?(gi===Xn&&(qn.first=!0),jn&&gi!==(gi|0)&&(qn.simpleLabel=!0),Ir>1&&qi%Ir&&(qn.skipLabel=!0),Sa.push(qn)):(qn.minor=!0,wa.push(qn))}}if(!wa||wa.length<3)kt=!1;else{var Hi=(wa[2].value-wa[1].value)*(ot?-1:1);Oa(Hi,rt.tickformat)||(kt=!1,wa=wa.slice(1))}if(!kt)pn=Sa;else{var Mi=Sa.concat(wa);Dr&&Sa.length&&(Mi=Mi.slice(1)),Mi=Mi.sort(function(Bo,_o){return Bo.value-_o.value}).filter(function(Bo,_o,Pi){return _o===0||Bo.value!==Pi[_o-1].value});var Ro=Mi.map(function(Bo,_o){return Bo.minor===void 0&&!Bo.skipLabel?_o:null}).filter(function(Bo){return Bo!==null});Ro.forEach(function(Bo){kt.map(function(_o){var Pi=Bo+_o;Pi>=0&&Pi-1;pi--){if(Sa[pi].drop){Sa.splice(pi,1);continue}Sa[pi].value=on(Sa[pi].value,rt);var Ko=rt.c2p(Sa[pi].value);(Vi?Zi>Ko-Io:Zixr||yoxr&&(Pi.periodX=xr),yoTr&&LrTr&&Sav)rt/=v,lr=Tr(10),lt.dtick="M"+12*_r(rt,lr,Ye);else if(Ir>C)rt/=C,lt.dtick="M"+_r(rt,1,yt);else if(Ir>h){if(lt.dtick=_r(rt,h,lt._hasDayOfWeekBreaks?[1,2,7,14]:Tt),!fr){var Dr=H.getTickFormat(lt),ot=lt.ticklabelmode==="period";ot&&(lt._rawTick0=lt.tick0),/%[uVW]/.test(Dr)?lt.tick0=l.dateTick0(lt.calendar,2):lt.tick0=l.dateTick0(lt.calendar,1),ot&&(lt._dowTick0=lt.tick0)}}else Ir>A?lt.dtick=_r(rt,A,yt):Ir>x?lt.dtick=_r(rt,x,gt):Ir>z?lt.dtick=_r(rt,z,gt):(lr=Tr(10),lt.dtick=_r(rt,lr,Ye))}else if(lt.type==="log"){lt.tick0=0;var kt=l.simpleMap(lt.range,lt.r2l);if(lt._isMinor&&(rt*=1.5),rt>.7)lt.dtick=Math.ceil(rt);else if(Math.abs(kt[1]-kt[0])<1){var jt=1.5*Math.abs((kt[1]-kt[0])/rt);rt=Math.abs(Math.pow(10,kt[1])-Math.pow(10,kt[0]))/jt,lr=Tr(10),lt.dtick="L"+_r(rt,lr,Ye)}else lt.dtick=rt>.3?"D2":"D1"}else lt.type==="category"||lt.type==="multicategory"?(lt.tick0=0,lt.dtick=Math.ceil(Math.max(rt,1))):Yn(lt)?(lt.tick0=0,lr=1,lt.dtick=_r(rt,lr,rr)):(lt.tick0=0,lr=Tr(10),lt.dtick=_r(rt,lr,Ye));if(lt.dtick===0&&(lt.dtick=1),!b(lt.dtick)&&typeof lt.dtick!="string"){var ar=lt.dtick;throw lt.dtick=1,"ax.dtick error: "+String(ar)}};function Xt(lt){var rt=lt.dtick;if(lt._tickexponent=0,!b(rt)&&typeof rt!="string"&&(rt=1),(lt.type==="category"||lt.type==="multicategory")&&(lt._tickround=null),lt.type==="date"){var fr=lt.r2l(lt.tick0),lr=lt.l2r(fr).replace(/(^-|i)/g,""),Tr=lr.length;if(String(rt).charAt(0)==="M")Tr>10||lr.slice(5)!=="01-01"?lt._tickround="d":lt._tickround=+rt.slice(1)%12===0?"y":"m";else if(rt>=h&&Tr<=10||rt>=h*15)lt._tickround="d";else if(rt>=x&&Tr<=16||rt>=A)lt._tickround="M";else if(rt>=z&&Tr<=19||rt>=x)lt._tickround="S";else{var Ir=lt.l2r(fr+rt).replace(/^-/,"").length;lt._tickround=Math.max(Tr,Ir)-20,lt._tickround<0&&(lt._tickround=4)}}else if(b(rt)||rt.charAt(0)==="L"){var Dr=lt.range.map(lt.r2d||Number);b(rt)||(rt=Number(rt.slice(1))),lt._tickround=2-Math.floor(Math.log(rt)/Math.LN10+.01);var ot=Math.max(Math.abs(Dr[0]),Math.abs(Dr[1])),kt=Math.floor(Math.log(ot)/Math.LN10+.01),jt=lt.minexponent===void 0?3:lt.minexponent;Math.abs(kt)>jt&&(Mt(lt.exponentformat)&<.exponentformat!=="SI extended"&&!pt(kt)||Mt(lt.exponentformat)&<.exponentformat==="SI extended"&&!Pt(kt)?lt._tickexponent=3*Math.round((kt-1)/3):lt._tickexponent=kt)}else lt._tickround=null}H.tickIncrement=function(lt,rt,fr,lr){var Tr=fr?-1:1;if(b(rt))return l.increment(lt,Tr*rt);var Ir=rt.charAt(0),Dr=Tr*Number(rt.slice(1));if(Ir==="M")return l.incrementMonth(lt,Dr,lr);if(Ir==="L")return Math.log(Math.pow(10,lt)+Dr)/Math.LN10;if(Ir==="D"){var ot=rt==="D2"?$t:At,kt=lt+Tr*.01,jt=l.roundUp(l.mod(kt,1),ot,fr);return Math.floor(kt)+Math.log(p.round(Math.pow(10,jt),1))/Math.LN10}throw"unrecognized dtick "+String(rt)},H.tickFirst=function(lt,rt){var fr=lt.r2l||Number,lr=l.simpleMap(lt.range,fr,void 0,void 0,rt),Tr=lr[1]=0&&ai<=lt._length?tn:null};if(kt&&l.isArrayOrTypedArray(lt.ticktext)){var Lr=l.simpleMap(lt.range,lt.r2l),aa=(Math.abs(Lr[1]-Lr[0])-(lt._lBreaks||0))/1e4;for(xr=0;xr"+ot;else{var jt=en(lt),ar=lt._trueSide||lt.side;(!jt&&ar==="top"||jt&&ar==="bottom")&&(Dr+="
")}rt.text=Dr}function vt(lt,rt,fr,lr,Tr){var Ir=lt.dtick,Dr=rt.x,ot=lt.tickformat,kt=typeof Ir=="string"&&Ir.charAt(0);if(Tr==="never"&&(Tr=""),lr&&kt!=="L"&&(Ir="L3",kt="L"),ot||kt==="L")rt.text=qt(Math.pow(10,Dr),lt,Tr,lr);else if(b(Ir)||kt==="D"&&(lt.minorloglabels==="complete"||l.mod(Dr+.01,1)<.1)){var jt;lt.minorloglabels==="complete"&&!(l.mod(Dr+.01,1)<.1)&&(jt=!0,rt.fontSize*=.75);var ar=Math.pow(10,Dr).toExponential(0),Er=ar.split("e"),xr=+Er[1],zr=Math.abs(xr),Lr=lt.exponentformat;Lr==="power"||Mt(Lr)&&Lr!=="SI extended"&&pt(xr)||Mt(Lr)&&Lr==="SI extended"&&Pt(xr)?(rt.text=Er[0],zr>0&&(rt.text+="x10"),rt.text==="1x10"&&(rt.text="10"),xr!==0&&xr!==1&&(rt.text+=""+(xr>0?"":D)+zr+""),rt.fontSize*=1.25):(Lr==="e"||Lr==="E")&&zr>2?rt.text=Er[0]+Lr+(xr>0?"+":D)+zr:(rt.text=qt(Math.pow(10,Dr),lt,"","fakehover"),Ir==="D1"&<._id.charAt(0)==="y"&&(rt.dy-=rt.fontSize/6))}else if(kt==="D")rt.text=lt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,l.mod(Dr,1)))),rt.fontSize*=.75;else throw"unrecognized dtick "+String(Ir);if(lt.dtick==="D1"){var aa=String(rt.text).charAt(0);(aa==="0"||aa==="1")&&(lt._id.charAt(0)==="y"?rt.dx-=rt.fontSize/4:(rt.dy+=rt.fontSize/2,rt.dx+=(lt.range[1]>lt.range[0]?1:-1)*rt.fontSize*(Dr<0?.5:.25)))}}function ht(lt,rt){var fr=lt._categories[Math.round(rt.x)];fr===void 0&&(fr=""),rt.text=String(fr)}function De(lt,rt,fr){var lr=Math.round(rt.x),Tr=lt._categories[lr]||[],Ir=Tr[1]===void 0?"":String(Tr[1]),Dr=Tr[0]===void 0?"":String(Tr[0]);fr?rt.text=Dr+" - "+Ir:(rt.text=Ir,rt.text2=Dr)}function Ne(lt,rt,fr,lr,Tr){Tr==="never"?Tr="":lt.showexponent==="all"&&Math.abs(rt.x/lt.dtick)<1e-6&&(Tr="hide"),rt.text=qt(rt.x,lt,Tr,lr)}function We(lt,rt,fr,lr,Tr){if(lt.thetaunit==="radians"&&!fr){var Ir=rt.x/180;if(Ir===0)rt.text="0";else{var Dr=Ke(Ir);if(Dr[1]>=100)rt.text=qt(l.deg2rad(rt.x),lt,Tr,lr);else{var ot=rt.x<0;Dr[1]===1?Dr[0]===1?rt.text="\u03C0":rt.text=Dr[0]+"\u03C0":rt.text=["",Dr[0],"","\u2044","",Dr[1],"","\u03C0"].join(""),ot&&(rt.text=D+rt.text)}}}else rt.text=qt(rt.x,lt,Tr,lr)}function Ke(lt){function rt(ot,kt){return Math.abs(ot-kt)<=1e-6}function fr(ot,kt){return rt(kt,0)?ot:fr(kt,ot%kt)}function lr(ot){for(var kt=1;!rt(Math.round(ot*kt)/kt,ot);)kt*=10;return kt}var Tr=lr(lt),Ir=lt*Tr,Dr=Math.abs(fr(Ir,Tr));return[Math.round(Ir/Dr),Math.round(Tr/Dr)]}var Je=["f","p","n","\u03BC","m","","k","M","G","T"],et=["q","r","y","z","a",...Je,"P","E","Z","Y","R","Q"],Mt=lt=>["SI","SI extended","B"].includes(lt);function pt(lt){return lt>14||lt<-15}function Pt(lt){return lt>32||lt<-30}function Ct(lt,rt){return Mt(rt)?!!(rt==="SI extended"&&Pt(lt)||rt!=="SI extended"&&pt(lt)):!1}function qt(lt,rt,fr,lr){var Tr=lt<0,Ir=rt._tickround,Dr=fr||rt.exponentformat||"B",ot=rt._tickexponent,kt=H.getTickFormat(rt),jt=rt.separatethousands;if(lr){var ar={exponentformat:Dr,minexponent:rt.minexponent,dtick:rt.showexponent==="none"?rt.dtick:b(lt)&&Math.abs(lt)||1,range:rt.showexponent==="none"?rt.range.map(rt.r2d):[0,lt||1]};Xt(ar),Ir=(Number(ar._tickround)||0)+4,ot=ar._tickexponent,rt.hoverformat&&(kt=rt.hoverformat)}if(kt)return rt._numFormat(kt)(lt).replace(/-/g,D);Dr==="none"&&(ot=0),lt=Math.abs(lt);let Er=Math.pow(10,-Ir)/2;if(lt"+xr+"":Dr==="B"&&ot===9?lt+="B":Mt(Dr)&&(lt+=Dr==="SI extended"?et[ot/3+10]:Je[ot/3+5])}return Tr?D+lt:lt}H.getTickFormat=function(lt){var rt;function fr(kt){return typeof kt!="string"?kt:Number(kt.replace("M",""))*C}function lr(kt,jt){var ar=["L","D"];if(typeof kt==typeof jt){if(typeof kt=="number")return kt-jt;var Er=ar.indexOf(kt.charAt(0)),xr=ar.indexOf(jt.charAt(0));return Er===xr?Number(kt.replace(/(L|D)/g,""))-Number(jt.replace(/(L|D)/g,"")):Er-xr}else return typeof kt=="number"?1:-1}function Tr(kt,jt,ar){var Er=ar||function(Lr){return Lr},xr=jt[0],zr=jt[1];return(!xr&&typeof xr!="number"||Er(xr)<=Er(kt))&&(!zr&&typeof zr!="number"||Er(zr)>=Er(kt))}function Ir(kt,jt){var ar=jt[0]===null,Er=jt[1]===null,xr=lr(kt,jt[0])>=0,zr=lr(kt,jt[1])<=0;return(ar||xr)&&(Er||zr)}var Dr,ot;if(lt.tickformatstops&<.tickformatstops.length>0)switch(lt.type){case"date":case"linear":{for(rt=0;rt=0&&Tr.unshift(Tr.splice(ar,1).shift())}});var ot={false:{left:0,right:0}};return l.syncOrAsync(Tr.map(function(kt){return function(){if(kt){var jt=H.getFromId(lt,kt);fr||(fr={}),fr.axShifts=ot,fr.overlayingShiftedAx=Dr;var ar=H.drawOne(lt,jt,fr);return jt._shiftPusher&&Yi(jt,jt._fullDepth||0,ot,!0),jt._r=jt.range.slice(),jt._rl=l.simpleMap(jt._r,jt.r2l),ar}}}))},H.drawOne=function(lt,rt,fr){fr=fr||{};var lr=fr.axShifts||{},Tr=fr.overlayingShiftedAx||[],Ir,Dr,ot;rt.setScale();var kt=lt._fullLayout,jt=rt._id,ar=jt.charAt(0),Er=H.counterLetter(jt),xr=kt._plots[rt._mainSubplot],zr=rt.zerolinelayer==="above traces";if(!xr)return;if(rt._shiftPusher=rt.autoshift||Tr.indexOf(rt._id)!==-1||Tr.indexOf(rt.overlaying)!==-1,rt._shiftPusher&rt.anchor==="free"){var Lr=rt.linewidth/2||0;rt.ticks==="inside"&&(Lr+=rt.ticklen),Yi(rt,Lr,lr,!0),Yi(rt,rt.shift||0,lr,!1)}(fr.skipTitle!==!0||rt._shift===void 0)&&(rt._shift=Ja(rt,lr));var aa=xr[ar+"axislayer"],Sa=rt._mainLinePosition,wa=Sa+=rt._shift,pn=rt._mainMirrorPosition,tn=rt._vals=H.calcTicks(rt),ai=[rt.mirror,wa,pn].join("_");for(Ir=0;Ir0?_o.bottom-Ts:0,Bo))));var Dl=0,hl=0;if(rt._shiftPusher&&(Dl=Math.max(Bo,_o.height>0?Vo==="l"?Ts-_o.left:_o.right-Ts:0),rt.title.text!==kt._dfltTitle[ar]&&(hl=(rt._titleStandoff||0)+(rt._titleScoot||0),Vo==="l"&&(hl+=Rr(rt))),rt._fullDepth=Math.max(Dl,hl)),rt.automargin){Pi={x:0,y:0,r:0,l:0,t:0,b:0};var ps=[0,1],dl=typeof rt._shift=="number"?rt._shift:0;if(ar==="x"){if(Vo==="b"?Pi[Vo]=rt._depth:(Pi[Vo]=rt._depth=Math.max(_o.width>0?Ts-_o.top:0,Bo),ps.reverse()),_o.width>0){var wu=_o.right-(rt._offset+rt._length);wu>0&&(Pi.xr=1,Pi.r=wu);var lu=rt._offset-_o.left;lu>0&&(Pi.xl=0,Pi.l=lu)}}else if(Vo==="l"?(rt._depth=Math.max(_o.height>0?Ts-_o.left:0,Bo),Pi[Vo]=rt._depth-dl):(rt._depth=Math.max(_o.height>0?_o.right-Ts:0,Bo),Pi[Vo]=rt._depth+dl,ps.reverse()),_o.height>0){var xc=_o.bottom-(rt._offset+rt._length);xc>0&&(Pi.yb=0,Pi.b=xc);var Fl=rt._offset-_o.top;Fl>0&&(Pi.yt=1,Pi.t=Fl)}Pi[Er]=rt.anchor==="free"?rt.position:rt._anchorAxis.domain[ps[0]],rt.title.text!==kt._dfltTitle[ar]&&(Pi[Vo]+=Rr(rt)+(rt.title.standoff||0)),rt.mirror&&rt.anchor!=="free"&&(yo={x:0,y:0,r:0,l:0,t:0,b:0},yo[Vs]=rt.linewidth,rt.mirror&&rt.mirror!==!0&&(yo[Vs]+=Bo),rt.mirror===!0||rt.mirror==="ticks"?yo[Er]=rt._anchorAxis.domain[ps[1]]:(rt.mirror==="all"||rt.mirror==="allticks")&&(yo[Er]=[rt._counterDomainMin,rt._counterDomainMax][ps[1]]))}Ss&&(bs=k.getComponentMethod("rangeslider","autoMarginOpts")(lt,rt)),typeof rt.automargin=="string"&&(Vt(Pi,rt.automargin),Vt(yo,rt.automargin)),E.autoMargin(lt,un(rt),Pi),E.autoMargin(lt,Xa(rt),yo),E.autoMargin(lt,ja(rt),bs)}),l.syncOrAsync(Uo)}};function Vt(lt,rt){if(lt){var fr=Object.keys(Q).reduce(function(lr,Tr){return rt.indexOf(Tr)!==-1&&Q[Tr].forEach(function(Ir){lr[Ir]=1}),lr},{});Object.keys(lt).forEach(function(lr){fr[lr]||(lr.length===1?lt[lr]=0:delete lt[lr])})}}function Ht(lt,rt){var fr=[],lr,Tr=function(Ir,Dr){var ot=Ir.xbnd[Dr];ot!==null&&fr.push(l.extendFlat({},Ir,{x:ot}))};if(rt.length){for(lr=0;lrlt.range[1],ot=lt.ticklabelposition&<.ticklabelposition.indexOf("inside")!==-1,kt=!ot;if(fr){var jt=Dr?-1:1;fr=fr*jt}if(lr){var ar=lt.side,Er=ot&&(ar==="top"||ar==="left")||kt&&(ar==="bottom"||ar==="right")?1:-1;lr=lr*Er}return lt._id.charAt(0)==="x"?function(xr){return e(Tr+lt._offset+lt.l2p(Rt(xr))+fr,Ir+lr)}:function(xr){return e(Ir+lr,Tr+lt._offset+lt.l2p(Rt(xr))+fr)}};function Rt(lt){return lt.periodX!==void 0?lt.periodX:lt.x}function nr(lt){var rt=lt.ticklabelposition||"",fr=lt.tickson||"",lr=function(Lr){return rt.indexOf(Lr)!==-1},Tr=lr("top"),Ir=lr("left"),Dr=lr("right"),ot=lr("bottom"),kt=lr("inside"),jt=fr!=="boundaries"&&(ot||Ir||Tr||Dr);if(!jt&&!kt)return[0,0];var ar=lt.side,Er=jt?(lt.tickwidth||0)/2:0,xr=K,zr=lt.tickfont?lt.tickfont.size:12;return(ot||Tr)&&(Er+=zr*se,xr+=(lt.linewidth||0)/2),(Ir||Dr)&&(Er+=(lt.linewidth||0)/2,xr+=K),kt&&ar==="top"&&(xr-=zr*(1-se)),(Ir||Tr)&&(Er=-Er),(ar==="bottom"||ar==="right")&&(xr=-xr),[jt?Er:0,kt?xr:0]}H.makeTickPath=function(lt,rt,fr,lr){lr||(lr={});var Tr=lr.minor;if(Tr&&!lt.minor)return"";var Ir=lr.len!==void 0?lr.len:Tr?lt.minor.ticklen:lt.ticklen,Dr=lt._id.charAt(0),ot=(lt.linewidth||1)/2;return Dr==="x"?"M0,"+(rt+ot*fr)+"v"+Ir*fr:"M"+(rt+ot*fr)+",0h"+Ir*fr},H.makeLabelFns=function(lt,rt,fr){var lr=lt.ticklabelposition||"",Tr=lt.tickson||"",Ir=function(Xn){return lr.indexOf(Xn)!==-1},Dr=Ir("top"),ot=Ir("left"),kt=Ir("right"),jt=Ir("bottom"),ar=Tr!=="boundaries"&&(jt||ot||Dr||kt),Er=Ir("inside"),xr=lr==="inside"&<.ticks==="inside"||!Er&<.ticks==="outside"&&Tr!=="boundaries",zr=0,Lr=0,aa=xr?lt.ticklen:0;if(Er?aa*=-1:ar&&(aa=0),xr&&(zr+=aa,fr)){var Sa=l.deg2rad(fr);zr=aa*Math.cos(Sa)+1,Lr=aa*Math.sin(Sa)}lt.showticklabels&&(xr||lt.showline)&&(zr+=.2*lt.tickfont.size),zr+=(lt.linewidth||1)/2*(Er?-1:1);var wa={labelStandoff:zr,labelShift:Lr},pn,tn,ai,rn,Ri=0,Gn=lt.side,no=lt._id.charAt(0),Di=lt.tickangle,fn;if(no==="x")fn=!Er&&Gn==="bottom"||Er&&Gn==="top",rn=fn?1:-1,Er&&(rn*=-1),pn=Lr*rn,tn=rt+zr*rn,ai=fn?1:-.2,Math.abs(Di)===90&&(Er?ai+=ne:Di===-90&&Gn==="bottom"?ai=se:Di===90&&Gn==="top"?ai=ne:ai=.5,Ri=ne/2*(Di/90)),wa.xFn=function(Xn){return Xn.dx+pn+Ri*Xn.fontSize},wa.yFn=function(Xn){return Xn.dy+tn+Xn.fontSize*ai},wa.anchorFn=function(Xn,eo){if(ar){if(ot)return"end";if(kt)return"start"}return!b(eo)||eo===0||eo===180?"middle":eo*rn<0!==Er?"end":"start"},wa.heightFn=function(Xn,eo,gi){return eo<-60||eo>60?-.5*gi:lt.side==="top"!==Er?-gi:0};else if(no==="y"){if(fn=!Er&&Gn==="left"||Er&&Gn==="right",rn=fn?1:-1,Er&&(rn*=-1),pn=zr,tn=Lr*rn,ai=0,!Er&&Math.abs(Di)===90&&(Di===-90&&Gn==="left"||Di===90&&Gn==="right"?ai=se:ai=.5),Er){var Ai=b(Di)?+Di:0;if(Ai!==0){var jn=l.deg2rad(Ai);Ri=Math.abs(Math.sin(jn))*se*rn,ai=0}}wa.xFn=function(Xn){return Xn.dx+rt-(pn+Xn.fontSize*ai)*rn+Ri*Xn.fontSize},wa.yFn=function(Xn){return Xn.dy+tn+Xn.fontSize*ne},wa.anchorFn=function(Xn,eo){return b(eo)&&Math.abs(eo)===90?"middle":fn?"end":"start"},wa.heightFn=function(Xn,eo,gi){return lt.side==="right"&&(eo*=-1),eo<-30?-gi:eo<30?-.5*gi:0}}return wa};function ur(lt){return[lt.text,lt.x,lt.axInfo,lt.font,lt.fontSize,lt.fontColor].join("_")}H.drawTicks=function(lt,rt,fr){fr=fr||{};var lr=rt._id+"tick",Tr=[].concat(rt.minor&&rt.minor.ticks?fr.vals.filter(function(Dr){return Dr.minor&&!Dr.noTick}):[]).concat(rt.ticks?fr.vals.filter(function(Dr){return!Dr.minor&&!Dr.noTick}):[]),Ir=fr.layer.selectAll("path."+lr).data(Tr,ur);Ir.exit().remove(),Ir.enter().append("path").classed(lr,1).classed("ticks",1).classed("crisp",fr.crisp!==!1).each(function(Dr){return r.stroke(p.select(this),Dr.minor?rt.minor.tickcolor:rt.tickcolor)}).style("stroke-width",function(Dr){return a.crispRound(lt,Dr.minor?rt.minor.tickwidth:rt.tickwidth,1)+"px"}).attr("d",fr.path).style("display",null),vi(rt,[U]),Ir.attr("transform",fr.transFn)},H.drawGrid=function(lt,rt,fr){if(fr=fr||{},rt.tickmode!=="sync"){var lr=rt._id+"grid",Tr=rt.minor&&rt.minor.showgrid,Ir=Tr?fr.vals.filter(function(wa){return wa.minor}):[],Dr=rt.showgrid?fr.vals.filter(function(wa){return!wa.minor}):[],ot=fr.counterAxis;if(ot&&H.shouldShowZeroLine(lt,rt,ot))for(var kt=rt.tickmode==="array",jt=0;jt=0;Lr--){var aa=Lr?xr:zr;if(aa){var Sa=aa.selectAll("path."+lr).data(Lr?Dr:Ir,ur);Sa.exit().remove(),Sa.enter().append("path").classed(lr,1).classed("crisp",fr.crisp!==!1),Sa.attr("transform",fr.transFn).attr("d",fr.path).each(function(wa){return r.stroke(p.select(this),wa.minor?rt.minor.gridcolor:rt.gridcolor||"#ddd")}).style("stroke-dasharray",function(wa){return a.dashStyle(wa.minor?rt.minor.griddash:rt.griddash,wa.minor?rt.minor.gridwidth:rt.gridwidth)}).style("stroke-width",function(wa){return(wa.minor?Er:rt._gw)+"px"}).style("display",null),typeof fr.path=="function"&&Sa.attr("d",fr.path)}}vi(rt,[P,j])}},H.drawZeroLine=function(lt,rt,fr){fr=fr||fr;var lr=rt._id+"zl",Tr=H.shouldShowZeroLine(lt,rt,fr.counterAxis),Ir=fr.layer.selectAll("path."+lr).data(Tr?[{x:0,id:rt._id}]:[]);Ir.exit().remove(),Ir.enter().append("path").classed(lr,1).classed("zl",1).classed("crisp",fr.crisp!==!1).each(function(){fr.layer.selectAll("path").sort(function(Dr,ot){return W(Dr.id,ot.id)})}),Ir.attr("transform",fr.transFn).attr("d",fr.path).call(r.stroke,rt.zerolinecolor||r.defaultLine).style("stroke-width",a.crispRound(lt,rt.zerolinewidth,rt._gw||1)+"px").style("display",null),vi(rt,[F])},H.drawLabels=function(lt,rt,fr){fr=fr||{};var lr=lt._fullLayout,Tr=rt._id,Ir=rt.zerolinelayer==="above traces",Dr=fr.cls||Tr+"tick",ot=fr.vals.filter(function(Vn){return Vn.text}),kt=fr.labelFns,jt=fr.secondary?0:rt.tickangle,ar=(rt._prevTickAngles||{})[Dr],Er=fr.layer.selectAll("g."+Dr).data(rt.showticklabels?ot:[],ur),xr=[];Er.enter().append("g").classed(Dr,1).append("text").attr("text-anchor","middle").each(function(Vn){var qn=p.select(this),Hi=lt._promises.length;qn.call(t.positionText,kt.xFn(Vn),kt.yFn(Vn)).call(a.font,{family:Vn.font,size:Vn.fontSize,color:Vn.fontColor,weight:Vn.fontWeight,style:Vn.fontStyle,variant:Vn.fontVariant,textcase:Vn.fontTextcase,lineposition:Vn.fontLineposition,shadow:Vn.fontShadow}).text(Vn.text).call(t.convertToTspans,lt),lt._promises[Hi]?xr.push(lt._promises.pop().then(function(){zr(qn,jt)})):zr(qn,jt)}),vi(rt,[$]),Er.exit().remove(),fr.repositionOnUpdate&&Er.each(function(Vn){p.select(this).select("text").call(t.positionText,kt.xFn(Vn),kt.yFn(Vn))});function zr(Vn,qn){Vn.each(function(Hi){var Mi=p.select(this),Ro=Mi.select(".text-math-group"),go=kt.anchorFn(Hi,qn),Eo=fr.transFn.call(Mi.node(),Hi)+(b(qn)&&+qn!=0?" rotate("+qn+","+kt.xFn(Hi)+","+(kt.yFn(Hi)-Hi.fontSize/2)+")":""),Ao=t.lineCount(Mi),ds=V*Hi.fontSize,jo=kt.heightFn(Hi,b(qn)?+qn:0,(Ao-1)*ds);if(jo&&(Eo+=e(0,jo)),Ro.empty()){var Wo=Mi.select("text");Wo.attr({transform:Eo,"text-anchor":go}),Wo.style("display",null),rt._adjustTickLabelsOverflow&&rt._adjustTickLabelsOverflow()}else{var to=a.bBox(Ro.node()).width,wo=to*{end:-.5,start:.5}[go];Ro.attr("transform",Eo+e(wo,0))}})}rt._adjustTickLabelsOverflow=function(){var Vn=rt.ticklabeloverflow;if(!(!Vn||Vn==="allow")){var qn=Vn.indexOf("hide")!==-1,Hi=rt._id.charAt(0)==="x",Mi=0,Ro=Hi?lt._fullLayout.width:lt._fullLayout.height;if(Vn.indexOf("domain")!==-1){var go=l.simpleMap(rt.range,rt.r2l);Mi=rt.l2p(go[0])+rt._offset,Ro=rt.l2p(go[1])+rt._offset}var Eo=Math.min(Mi,Ro),Ao=Math.max(Mi,Ro),ds=rt.side,jo=1/0,Wo=-1/0;Er.each(function(Vi){var Io=p.select(this),Zi=Io.select(".text-math-group");if(Zi.empty()){var Ko=a.bBox(Io.node()),Uo=0;Hi?(Ko.right>Ao||Ko.leftAo||Ko.top+(rt.tickangle?0:Vi.fontSize/4)rt["_visibleLabelMin_"+go._id]?Io.style("display","none"):Ao.K==="tick"&&!Eo&&Io.node().style.display!=="none"&&Io.style("display",null)})})})})},zr(Er,ar+1?ar:jt);function Lr(){return xr.length&&Promise.all(xr)}var aa=null;function Sa(){if(zr(Er,jt),ot.length&&rt.autotickangles&&(rt.type!=="log"||String(rt.dtick).charAt(0)!=="D")){aa=rt.autotickangles[0];var Vn=0,qn=[],Hi,Mi=1;Er.each(function(Pi){Vn=Math.max(Vn,Pi.fontSize);var yo=rt.l2p(Pi.x),bs=La(this),Dl=a.bBox(bs.node());Mi=Math.max(Mi,t.lineCount(bs)),qn.push({top:0,bottom:10,height:10,left:yo-Dl.width/2,right:yo+Dl.width/2+2,width:Dl.width+2})});var Ro=(rt.tickson==="boundaries"||rt.showdividers)&&!fr.secondary,go=ot.length,Eo=Math.abs((ot[go-1].x-ot[0].x)*rt._m)/(go-1),Ao=Ro?Eo/2:Eo,ds=Ro?rt.ticklen:Vn*1.25*Mi,jo=Math.sqrt(Math.pow(Ao,2)+Math.pow(ds,2)),Wo=Ao/jo,to=rt.autotickangles.map(function(Pi){return Pi*Math.PI/180}),wo=to.find(function(Pi){return Math.abs(Math.cos(Pi))<=Wo});wo===void 0&&(wo=to.reduce(function(Pi,yo){return Math.abs(Math.cos(Pi))qi*gi&&(jn=gi,Di[no]=fn[no]=Xn[no])}var io=Math.abs(jn-Ai);io-rn>0?(io-=rn,rn*=1+rn/io):rn=0,rt._id.charAt(0)!=="y"&&(rn=-rn),Di[Gn]=tn.p2r(tn.r2p(fn[Gn])+Ri*rn),tn.autorange==="min"||tn.autorange==="max reversed"?(Di[0]=null,tn._rangeInitial0=void 0,tn._rangeInitial1=void 0):(tn.autorange==="max"||tn.autorange==="min reversed")&&(Di[1]=null,tn._rangeInitial0=void 0,tn._rangeInitial1=void 0),lr._insideTickLabelsUpdaterange[tn._name+".range"]=Di}var oo=l.syncOrAsync(wa);return oo&&oo.then&<._promises.push(oo),oo};function cr(lt,rt,fr){var lr=rt._id+"divider",Tr=fr.vals,Ir=fr.layer.selectAll("path."+lr).data(Tr,ur);Ir.exit().remove(),Ir.enter().insert("path",":first-child").classed(lr,1).classed("crisp",1).call(r.stroke,rt.dividercolor).style("stroke-width",a.crispRound(lt,rt.dividerwidth,1)+"px"),Ir.attr("transform",fr.transFn).attr("d",fr.path)}H.getPxPosition=function(lt,rt){var fr=lt._fullLayout._size,lr=rt._id.charAt(0),Tr=rt.side,Ir;if(rt.anchor!=="free"?Ir=rt._anchorAxis:lr==="x"?Ir={_offset:fr.t+(1-(rt.position||0))*fr.h,_length:0}:lr==="y"&&(Ir={_offset:fr.l+(rt.position||0)*fr.w+rt._shift,_length:0}),Tr==="top"||Tr==="left")return Ir._offset;if(Tr==="bottom"||Tr==="right")return Ir._offset+Ir._length};function Rr(lt){var rt=lt.title.font.size,fr=(lt.title.text.match(t.BR_TAG_ALL)||[]).length;return lt.title.hasOwnProperty("standoff")?rt*(se+fr*V):fr?rt*(fr+1)*V:rt}function Qr(lt,rt){var fr=lt._fullLayout,lr=rt._id,Tr=lr.charAt(0),Ir=rt.title.font.size,Dr,ot=(rt.title.text.match(t.BR_TAG_ALL)||[]).length;if(rt.title.hasOwnProperty("standoff"))rt.side==="bottom"||rt.side==="right"?Dr=rt._depth+rt.title.standoff+Ir*se:(rt.side==="top"||rt.side==="left")&&(Dr=rt._depth+rt.title.standoff+Ir*(ne+ot*V));else{var kt=en(rt);if(rt.type==="multicategory")Dr=rt._depth;else{var jt=1.5*Ir;kt&&(jt=.5*Ir,rt.ticks==="outside"&&(jt+=rt.ticklen)),Dr=10+jt+(rt.linewidth?rt.linewidth-1:0)}kt||(Tr==="x"?Dr+=rt.side==="top"?Ir*(rt.showticklabels?1:0):Ir*(rt.showticklabels?1.5:.5):Dr+=rt.side==="right"?Ir*(rt.showticklabels?1:.5):Ir*(rt.showticklabels?.5:0))}var ar=H.getPxPosition(lt,rt),Er,xr,zr;Tr==="x"?(xr=rt._offset+rt._length/2,zr=rt.side==="top"?ar-Dr:ar+Dr):(zr=rt._offset+rt._length/2,xr=rt.side==="right"?ar+Dr:ar-Dr,Er={rotate:"-90",offset:0});var Lr;if(rt.type!=="multicategory"){var aa=rt._selections[rt._id+"tick"];if(Lr={selection:aa,side:rt.side},aa&&aa.node()&&aa.node().parentNode){var Sa=a.getTranslate(aa.node().parentNode);Lr.offsetLeft=Sa.x,Lr.offsetTop=Sa.y}rt.title.hasOwnProperty("standoff")&&(Lr.pad=0)}return rt._titleStandoff=Dr,n.draw(lt,lr+"title",{propContainer:rt,propName:rt._name+".title.text",placeholder:fr._dfltTitle[Tr],avoid:Lr,transform:Er,attributes:{x:xr,y:zr,"text-anchor":"middle"}})}H.shouldShowZeroLine=function(lt,rt,fr){var lr=l.simpleMap(rt.range,rt.r2l);return lr[0]*lr[1]<=0&&rt.zeroline&&(rt.type==="linear"||rt.type==="-")&&!(rt.rangebreaks&&rt.maskBreaks(0)===B)&&(Zr(rt,0)||!ha(lt,rt,fr,lr)||Pa(lt,rt))},H.clipEnds=function(lt,rt){return rt.filter(function(fr){return Zr(lt,fr.x)})};function Zr(lt,rt){var fr=lt.l2p(rt);return fr>1&&fr1)for(Tr=1;Tr=Tr.min&<=O:/%L/.test(rt)?lt>=I:/%[SX]/.test(rt)?lt>=z:/%M/.test(rt)?lt>=x:/%[HI]/.test(rt)?lt>=A:/%p/.test(rt)?lt>=u:/%[Aadejuwx]/.test(rt)?lt>=h:/%[UVW]/.test(rt)?lt>=w:/%[Bbm]/.test(rt)?lt>=_:/%[q]/.test(rt)?lt>=S:/%[Yy]/.test(rt)?lt>=m:!0}}}),Jw=ze({"src/plots/cartesian/autorange_options_defaults.js"(J,G){"use strict";G.exports=function(b,E,k){var l,e;if(k){var t=E==="reversed"||E==="min reversed"||E==="max reversed";l=k[t?1:0],e=k[t?0:1]}var n=b("autorangeoptions.minallowed",e===null?l:void 0),r=b("autorangeoptions.maxallowed",l===null?e:void 0);n===void 0&&b("autorangeoptions.clipmin"),r===void 0&&b("autorangeoptions.clipmax"),b("autorangeoptions.include")}}}),Qw=ze({"src/plots/cartesian/range_defaults.js"(J,G){"use strict";var p=Jw();G.exports=function(E,k,l,e){var t=k._template||{},n=k.type||t.type||"-";l("minallowed"),l("maxallowed");var r=l("range");if(!r){var a;!e.noInsiderange&&n!=="log"&&(a=l("insiderange"),a&&(a[0]===null||a[1]===null)&&(k.insiderange=!1,a=void 0),a&&(r=l("range",a)))}var o=k.getAutorangeDflt(r,e),s=l("autorange",o),c;r&&(r[0]===null&&r[1]===null||(r[0]===null||r[1]===null)&&(s==="reversed"||s===!0)||r[0]!==null&&(s==="min"||s==="max reversed")||r[1]!==null&&(s==="max"||s==="min reversed"))&&(r=void 0,delete k.range,k.autorange=!0,c=!0),c||(o=k.getAutorangeDflt(r,e),s=l("autorange",o)),s&&(p(l,s,r),(n==="linear"||n==="-")&&l("rangemode")),k.cleanRange()}}}),VI=ze({"node_modules/mouse-event-offset/index.js"(J,G){var p={left:0,top:0};G.exports=b;function b(k,l,e){l=l||k.currentTarget||k.srcElement,Array.isArray(e)||(e=[0,0]);var t=k.clientX||0,n=k.clientY||0,r=E(l);return e[0]=t-r.left,e[1]=n-r.top,e}function E(k){return k===window||k===document||k===document.body?p:k.getBoundingClientRect()}}}),Rx=ze({"node_modules/has-passive-events/index.js"(J,G){"use strict";var p=Vw();function b(){var E=!1;try{var k=Object.defineProperty({},"passive",{get:function(){E=!0}});window.addEventListener("test",null,k),window.removeEventListener("test",null,k)}catch{E=!1}return E}G.exports=p&&b()}}),GI=ze({"src/components/dragelement/align.js"(J,G){"use strict";G.exports=function(b,E,k,l,e){var t=(b-k)/(l-k),n=t+E/(l-k),r=(t+n)/2;return e==="left"||e==="bottom"?t:e==="center"||e==="middle"?r:e==="right"||e==="top"?n:t<2/3-r?t:n>4/3-r?n:r}}}),HI=ze({"src/components/dragelement/cursor.js"(J,G){"use strict";var p=Nr(),b=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];G.exports=function(k,l,e,t){return e==="left"?k=0:e==="center"?k=1:e==="right"?k=2:k=p.constrain(Math.floor(k*3),0,2),t==="bottom"?l=0:t==="middle"?l=1:t==="top"?l=2:l=p.constrain(Math.floor(l*3),0,2),b[l][k]}}}),WI=ze({"src/components/dragelement/unhover.js"(J,G){"use strict";var p=Hm(),b=Cx(),E=ig().getGraphDiv,k=ag(),l=G.exports={};l.wrapped=function(e,t,n){var r;e=E(e),e._fullLayout&&b.clear(e._fullLayout._uid+k.HOVERID);let a=e._hoverdata;l.raw(e,t,n)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,(r=e._fullLayout)!=null&&r.hoveranywhere&&t?.target&&!a&&e.emit("plotly_unhover",{event:t,points:[]}))},l.raw=function(t,n){var r=t._fullLayout,a=t._hoverdata;return n||(n={}),n.target&&!t._dragged&&p.triggerHandler(t,"plotly_beforehover",n)===!1?!1:(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,n.target&&a&&t.emit("plotly_unhover",{event:n,points:a}),!0)}}}),_h=ze({"src/components/dragelement/index.js"(J,G){"use strict";var p=VI(),b=Gw(),E=Rx(),k=Nr().removeElement,l=hc(),e=G.exports={};e.align=GI(),e.getCursor=HI();var t=WI();e.unhover=t.wrapped,e.unhoverRaw=t.raw,e.init=function(o){var s=o.gd,c=1,g=s._context.doubleClickDelay,f=o.element,v,m,i,T,S,M,C,_;s._mouseDownTime||(s._mouseDownTime=0),f.style.pointerEvents="all",f.onmousedown=u,E?(f._ontouchstart&&f.removeEventListener("touchstart",f._ontouchstart),f._ontouchstart=u,f.addEventListener("touchstart",u,{passive:!1})):f.ontouchstart=u;function w(z,I,O){return Math.abs(z)"u"&&typeof z.clientY>"u"&&(z.clientX=v,z.clientY=m),i=new Date().getTime(),i-s._mouseDownTimeg&&(c=Math.max(c-1,1)),s._dragged)o.doneFn&&o.doneFn();else{var I;M.target===C?I=M:(I={target:C,srcElement:C,toElement:C},Object.keys(M).concat(Object.keys(M.__proto__)).forEach(O=>{var D=M[O];!I[O]&&typeof D!="function"&&(I[O]=D)})),o.clickFn&&o.clickFn(c,I),_||C.dispatchEvent(new MouseEvent("click",z))}s._dragging=!1,s._dragged=!1}};function n(){var a=document.createElement("div");a.className="dragcover";var o=a.style;return o.position="fixed",o.left=0,o.right=0,o.top=0,o.bottom=0,o.zIndex=999999999,o.background="none",document.body.appendChild(a),a}e.coverSlip=n;function r(a){return p(a.changedTouches?a.changedTouches[0]:a,document.body)}}}),gd=ze({"src/lib/setcursor.js"(J,G){"use strict";G.exports=function(b,E){(b.attr("class")||"").split(" ").forEach(function(k){k.indexOf("cursor-")===0&&b.classed(k,!1)}),E&&b.classed("cursor-"+E,!0)}}}),YI=ze({"src/lib/override_cursor.js"(J,G){"use strict";var p=gd(),b="data-savedcursor",E="!!";G.exports=function(l,e){var t=l.attr(b);if(e){if(!t){for(var n=(l.attr("class")||"").split(" "),r=0;rK.legend.length)for(var q=K.legend.length;q(r==="legend"?1:0));if(O===!1&&(o[r]=void 0),O===!1&&!g.uirevision||(v("uirevision",o.uirevision),O===!1))return;v("borderwidth");var D=v("orientation"),B=v("yref"),F=v("xref"),P=D==="h",j=B==="paper",U=F==="paper",$,Q,re,ne="left";P?($=0,p.getComponentMethod("rangeslider","isVisible")(a.xaxis)?j?(Q=1.1,re="bottom"):(Q=1,re="top"):j?(Q=-.1,re="top"):(Q=0,re="bottom")):(Q=1,re="auto",U?$=1.02:($=1,ne="right")),b.coerce(g,f,{x:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:$}},"x"),b.coerce(g,f,{y:{valType:"number",editType:"legend",min:j?-2:0,max:j?3:1,dflt:Q}},"y"),v("traceorder",h),t.isGrouped(o[r])&&v("tracegroupgap"),v("entrywidth"),v("entrywidthmode"),v("indentation"),v("itemsizing"),v("itemwidth"),v("itemclick"),v("itemdoubleclick");let se=v("groupclick");v("groupdoubleclick",se),v("xanchor",ne),v("yanchor",re),v("maxheight"),v("valign"),b.noneOrAll(g,f,["x","y"]);var V=v("title.text");if(V){v("title.side",P?"left":"top");var Z=b.extendFlat({},m,{size:b.bigFont(m.size)});b.coerceFont(v,"title.font",Z);let K=c>1;v("titleclick",K?"toggle":!1),v("titledoubleclick",K?"toggleothers":!1)}}G.exports=function(a,o,s){var c,g=s.slice(),f=o.shapes;if(f)for(c=0;cqe.showlegend||qe.legendgroup);var i=v.concat(m),T=s.trace;T._isShape&&(T=o.shapes[T.index]);var S=T.legendgroup,M,C,_,w,h,u,A={},x=[],z=[],I=[];function O(qe,ke){var _e=x.indexOf(qe),ue=A.visible;return ue||(ue=A.visible=[]),x.indexOf(qe)===-1&&(x.push(qe),_e=x.length-1),ue[_e]=ke,_e}var D=(o.shapes||[]).map(function(qe){return qe._input}),B=!1;function F(qe,ke){D[qe].visible=ke,B=!0}function P(qe,ke){if(!(s.groupTitle&&!g)){var _e=qe._isShape,ue=qe.index;ue===void 0&&(ue=qe._index);var ve=qe.visible===!1?!1:ke;_e?F(ue,ve):O(ue,ve)}}var j=T.legend;if(!T._isShape&&G.traceIs(T,"pie-like")){var U=s.label,$=f.indexOf(U);if(r==="toggle")$===-1?f.push(U):f.splice($,1);else if(r==="toggleothers"){var Q=$!==-1,re=[];for(M=0;MC.showlegend||C.legendgroup),c=a.concat(s);function g(C){return(C.legend||"legend")===o}var f,v;if(n==="toggle")f=!c.some(function(_){return g(_)&&_.visible===!0}),v=!1;else{let C=c.some(function(_){return!g(_)&&_.visible===!0&&_.showlegend!==!1});f=!0,v=!C}let m={visible:[]},i=[],T=(r.shapes||[]).map(function(C){return C._input});for(var S=!1,M=0;MB&&(O=B)}z[m][0]._groupMinRank=O,z[m][0]._preGroupSort=m}var F=function(re,ne){return re[0]._groupMinRank-ne[0]._groupMinRank||re[0]._preGroupSort-ne[0]._preGroupSort},P=function(re,ne){var se=p(re.trace.legendrank)?re.trace.legendrank[re.i]:re.trace.legendrank,V=p(ne.trace.legendrank)?ne.trace.legendrank[ne.i]:ne.trace.legendrank;return se-V||re._preSort-ne._preSort};for(z.forEach(function(re,ne){re[0]._preGroupSort=ne}),z.sort(F),m=0;m0)X=Z.width;else return 0;return h?H:Math.min(X,K)};M.each(function(V){var Z=p.select(this),K=E.ensureSingle(Z,"g","layers");K.style("opacity",V[0].trace.opacity);var H=_.indentation,X=_.valign,q=V[0].lineHeight,W=V[0].height;if(X==="middle"&&H===0||!q||!W)K.attr("transform",null);else{var ee={top:1,bottom:-1}[X],ae=ee*(.5*(q-W+3))||0,he=_.indentation;K.attr("transform",k(he,ae))}var xe=K.selectAll("g.legendfill").data([V]);xe.enter().append("g").classed("legendfill",!0);var we=K.selectAll("g.legendlines").data([V]);we.enter().append("g").classed("legendlines",!0);var Me=K.selectAll("g.legendsymbols").data([V]);Me.enter().append("g").classed("legendsymbols",!0),Me.selectAll("g.legendpoints").data([V]).enter().append("g").classed("legendpoints",!0)}).each(se).each(D).each(F).each(B).each(j).each(re).each(Q).each(I).each(O).each(U).each($);function I(V){var Z=i(V),K=Z.showFill,H=Z.showLine,X=Z.showGradientLine,q=Z.showGradientFill,W=Z.anyFill,ee=Z.anyLine,ae=V[0],he=ae.trace,xe,we,Me=t(he),Se=Me.colorscale,Ie=Me.reversescale,Ge=function(Ae){if(Ae.size())if(K)l.fillGroupStyle(Ae,C,!0);else{var Be="legendfill-"+he.uid;l.gradient(Ae,C,Be,m(Ie),Se,"fill")}},qe=function(Ae){if(Ae.size()){var Be="legendline-"+he.uid;l.lineGroupStyle(Ae),l.gradient(Ae,C,Be,m(Ie),Se,"stroke")}},ke=n.hasMarkers(he)||!W?"M5,0":ee?"M5,-2":"M5,-3",_e=p.select(this),ue=_e.select(".legendfill").selectAll("path").data(K||q?[V]:[]);if(ue.enter().append("path").classed("js-fill",!0),ue.exit().remove(),ue.attr("d",ke+"h"+u+"v6h-"+u+"z").call(Ge),H||X){var ve=z(void 0,he.line,f,c);we=E.minExtend(he,{line:{width:ve}}),xe=[E.minExtend(ae,{trace:we})]}var le=_e.select(".legendlines").selectAll("path").data(H||X?[xe]:[]);le.enter().append("path").classed("js-line",!0),le.exit().remove(),le.attr("d",ke+(X?"l"+u+",0.0001":"h"+u)).call(H?l.lineGroupStyle:qe)}function O(V){var Z=i(V),K=Z.anyFill,H=Z.anyLine,X=Z.showLine,q=Z.showMarker,W=V[0],ee=W.trace,ae=!q&&!H&&!K&&n.hasText(ee),he,xe;function we(ve,le,Ae,Be){var Xe=E.nestedProperty(ee,ve).get(),Ye=E.isArrayOrTypedArray(Xe)&&le?le(Xe):Xe;if(h&&Ye&&Be!==void 0&&(Ye=Be),Ae){if(YeAe[1])return Ae[1]}return Ye}function Me(ve){return W._distinct&&W.index&&ve[W.index]?ve[W.index]:ve[0]}if(q||ae||X){var Se={},Ie={};if(q){Se.mc=we("marker.color",Me);var Ge=ee.type==="scattermap";Se.mx=Ge?"circle":we("marker.symbol",Me),Se.mo=we("marker.opacity",E.mean,[.2,1]),Se.mlc=we("marker.line.color",Me),Se.mlw=we("marker.line.width",E.mean,[0,5],g),Se.mld=we("marker.line.dash",Me),Ie.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var qe=we("marker.size",E.mean,[2,16],s);Se.ms=qe,Ie.marker.size=qe}X&&(Ie.line={width:we("line.width",Me,[0,10],c)}),ae&&(Se.tx="Aa",Se.tp=we("textposition",Me),Se.ts=10,Se.tc=we("textfont.color",Me),Se.tf=we("textfont.family",Me),Se.tw=we("textfont.weight",Me),Se.ty=we("textfont.style",Me),Se.tv=we("textfont.variant",Me),Se.tC=we("textfont.textcase",Me),Se.tE=we("textfont.lineposition",Me),Se.tS=we("textfont.shadow",Me)),he=[E.minExtend(W,Se)],xe=E.minExtend(ee,Ie),xe.selectedpoints=null,xe.texttemplate=null}var ke=p.select(this).select("g.legendpoints"),_e=ke.selectAll("path.scatterpts").data(q?he:[]);_e.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",x),_e.exit().remove(),_e.call(l.pointStyle,xe,C),q&&(he[0].mrc=3);var ue=ke.selectAll("g.pointtext").data(ae?he:[]);ue.enter().append("g").classed("pointtext",!0).append("text").attr("transform",x),ue.exit().remove(),ue.selectAll("text").call(l.textPointStyle,xe,C)}function D(V){var Z=V[0].trace,K=Z.type==="waterfall";if(V[0]._distinct&&K){var H=V[0].trace[V[0].dir].marker;return V[0].mc=H.color,V[0].mlw=H.line.width,V[0].mlc=H.line.color,P(V,this,"waterfall")}var X=[];Z.visible&&K&&(X=V[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var q=p.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(X);q.enter().append("path").classed("legendwaterfall",!0).attr("transform",x).style("stroke-miterlimit",1),q.exit().remove(),q.each(function(W){var ee=p.select(this),ae=Z[W[0]].marker,he=z(void 0,ae.line,v,g);ee.attr("d",W[1]).style("stroke-width",he+"px").call(e.fill,ae.color),he&&ee.call(e.stroke,ae.line.color)})}function B(V){P(V,this)}function F(V){P(V,this,"funnel")}function P(V,Z,K){var H=V[0].trace,X=H.marker||{},q=X.line||{},W=X.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",ee=K?H.visible&&H.type===K:b.traceIs(H,"bar"),ae=p.select(Z).select("g.legendpoints").selectAll("path.legend"+K).data(ee?[V]:[]);ae.enter().append("path").classed("legend"+K,!0).attr("d",W).attr("transform",x),ae.exit().remove(),ae.each(function(he){var xe=p.select(this),we=he[0],Me=z(we.mlw,X.line,v,g);xe.style("stroke-width",Me+"px");var Se=we.mcc;if(!_._inHover&&"mc"in we){var Ie=t(X),Ge=Ie.mid;Ge===void 0&&(Ge=(Ie.max+Ie.min)/2),Se=l.tryColorscale(X,"")(Ge)}var qe=Se||we.mc||X.color,ke=X.pattern,_e=l.getPatternAttr,ue=ke&&(_e(ke.shape,0,"")||_e(ke.path,0,""));if(ue){var ve=_e(ke.bgcolor,0,null),le=_e(ke.fgcolor,0,null),Ae=ke.fgopacity,Be=T(ke.size,8,10),Xe=T(ke.solidity,.5,1),Ye="legend-"+H.uid;xe.call(l.pattern,"legend",C,Ye,ue,Be,Xe,Se,ke.fillmode,ve,le,Ae)}else xe.call(e.fill,qe);Me&&e.stroke(xe,we.mlc||q.color)})}function j(V){var Z=V[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendbox").data(Z.visible&&b.traceIs(Z,"box-violin")?[V]:[]);K.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),K.exit().remove(),K.each(function(){var H=p.select(this);if((Z.boxpoints==="all"||Z.points==="all")&&e.opacity(Z.fillcolor)===0&&e.opacity((Z.line||{}).color)===0){var X=E.minExtend(Z,{marker:{size:h?s:E.constrain(Z.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});K.call(l.pointStyle,X,C)}else{var q=z(void 0,Z.line,v,g);H.style("stroke-width",q+"px").call(e.fill,Z.fillcolor),q&&e.stroke(H,Z.line.color)}})}function U(V){var Z=V[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(Z.visible&&Z.type==="candlestick"?[V,V]:[]);K.enter().append("path").classed("legendcandle",!0).attr("d",function(H,X){return X?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",x).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(H,X){var q=p.select(this),W=Z[X?"increasing":"decreasing"],ee=z(void 0,W.line,v,g);q.style("stroke-width",ee+"px").call(e.fill,W.fillcolor),ee&&e.stroke(q,W.line.color)})}function $(V){var Z=V[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(Z.visible&&Z.type==="ohlc"?[V,V]:[]);K.enter().append("path").classed("legendohlc",!0).attr("d",function(H,X){return X?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",x).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(H,X){var q=p.select(this),W=Z[X?"increasing":"decreasing"],ee=z(void 0,W.line,v,g);q.style("fill","none").call(l.dashLine,W.line.dash,ee),ee&&e.stroke(q,W.line.color)})}function Q(V){ne(V,this,"pie")}function re(V){ne(V,this,"funnelarea")}function ne(V,Z,K){var H=V[0],X=H.trace,q=K?X.visible&&X.type===K:b.traceIs(X,K),W=p.select(Z).select("g.legendpoints").selectAll("path.legend"+K).data(q?[V]:[]);if(W.enter().append("path").classed("legend"+K,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),W.exit().remove(),W.size()){var ee=X.marker||{},ae=z(a(ee.line.width,H.pts),ee.line,v,g),he="pieLike",xe=E.minExtend(X,{marker:{line:{width:ae}}},he),we=E.minExtend(H,{trace:xe},he);r(W,we,xe,C)}}function se(V){var Z=V[0].trace,K,H=[];if(Z.visible)switch(Z.type){case"histogram2d":case"heatmap":H=[["M-15,-2V4H15V-2Z"]],K=!0;break;case"choropleth":case"choroplethmap":H=[["M-6,-6V6H6V-6Z"]],K=!0;break;case"densitymap":H=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],K="radial";break;case"cone":H=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],K=!1;break;case"streamtube":H=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],K=!1;break;case"surface":H=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],K=!0;break;case"mesh3d":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!1;break;case"volume":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!0;break;case"isosurface":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],K=!1;break}var X=p.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(H);X.enter().append("path").classed("legend3dandfriends",!0).attr("transform",x).style("stroke-miterlimit",1),X.exit().remove(),X.each(function(q,W){var ee=p.select(this),ae=t(Z),he=ae.colorscale,xe=ae.reversescale,we=function(Ge){if(Ge.size()){var qe="legendfill-"+Z.uid;l.gradient(Ge,C,qe,m(xe,K==="radial"),he,"fill")}},Me;if(he){if(!K){var Ie=he.length;Me=W===0?he[xe?Ie-1:0][1]:W===1?he[xe?0:Ie-1][1]:he[Math.floor((Ie-1)/2)][1]}}else{var Se=Z.vertexcolor||Z.facecolor||Z.color;Me=E.isArrayOrTypedArray(Se)?Se[W]||Se[0]:Se}ee.attr("d",q[0]),Me?ee.call(e.fill,Me):ee.call(we)})}};function m(S,M){var C=M?"radial":"horizontal";return C+(S?"":"reversed")}function i(S){var M=S[0].trace,C=M.contours,_=n.hasLines(M)||M.visible&&M.type==="quiver",w=n.hasMarkers(M),h=M.visible&&M.fill&&M.fill!=="none",u=!1,A=!1;if(C){var x=C.coloring;x==="lines"?u=!0:_=x==="none"||x==="heatmap"||C.showlines,C.type==="constraint"?h=C._operation!=="=":(x==="fill"||x==="heatmap")&&(A=!0)}return{showMarker:w,showLine:_,showFill:h,showGradientLine:u,showGradientFill:A,anyLine:_||u,anyFill:h||A}}function T(S,M,C){return S&&E.isArrayOrTypedArray(S)?M:S>C?C:S}}}),i5=ze({"src/components/legend/draw.js"(J,G){"use strict";var p=ci(),b=Nr(),E=cl(),k=mi(),l=Hm(),e=_h(),t=Xi(),n=Qn(),r=Cs(),a=r5().handleItemClick,o=r5().handleTitleClick,s=a5(),c=dc(),g=c.LINE_SPACING,f=c.FROM_TL,v=c.FROM_BR,m=XI(),i=n5(),T=ug(),S=1,M=/^legend[0-9]*$/;G.exports=function($,Q){if(Q)_($,Q);else{var re=$._fullLayout,ne=re._legends,se=re._infolayer.selectAll('[class^="legend"]');se.each(function(){var H=p.select(this),X=H.attr("class"),q=X.split(" ")[0];q.match(M)&&ne.indexOf(q)===-1&&H.remove()});for(var V=0;V1)}var ae=re.hiddenlabels||[];if(!Z&&(!re.showlegend||!K.length))return V.selectAll("."+ne).remove(),re._topdefs.select("#"+se).remove(),E.autoMargin(U,ne);var he=b.ensureSingle(V,"g",ne,function(_e){Z||_e.attr("pointer-events","all")}),xe=b.ensureSingleById(re._topdefs,"clipPath",se,function(_e){_e.append("rect")}),we=b.ensureSingle(he,"rect","bg",function(_e){_e.attr("shape-rendering","crispEdges")});we.call(n.stroke,Q.bordercolor).call(n.fill,Q.bgcolor).style("stroke-width",Q.borderwidth+"px");var Me=b.ensureSingle(he,"g","scrollbox"),Se=Q.title;Q._titleWidth=0,Q._titleHeight=0;var Ie;Se.text?(Ie=b.ensureSingle(Me,"text",ne+"titletext"),Ie.attr("text-anchor","start").call(t.font,Se.font).text(Se.text),I(Ie,Me,U,Q,S),!Z&&(Q.titleclick||Q.titledoubleclick)&&z(Me,U,Q,ne)):(Me.selectAll("."+ne+"titletext").remove(),Me.selectAll("."+ne+"titletoggle").remove());var Ge=b.ensureSingle(he,"rect","scrollbar",function(_e){_e.attr(s.scrollBarEnterAttrs).call(n.fill,s.scrollBarColor)}),qe=Me.selectAll("g.groups").data(K);qe.enter().append("g").attr("class","groups"),qe.exit().remove();var ke=qe.selectAll("g.traces").data(b.identity);ke.enter().append("g").attr("class","traces"),ke.exit().remove(),ke.style("opacity",function(_e){let ue=_e[0],ve=ue.trace;if(ue.groupTitle){let le=ve.legendgroup,Ae=(re.shapes||[]).filter(function(Xe){return Xe.showlegend});return U._fullData.concat(Ae).some(function(Xe){return Xe.legendgroup===le&&(Xe.legend||"legend")===ne&&Xe.visible===!0})?1:.5}return k.traceIs(ve,"pie-like")?ae.indexOf(_e[0].label)!==-1?.5:1:ve.visible==="legendonly"?.5:1}).each(function(){p.select(this).call(u,U,Q)}).call(i,U,Q).each(function(_e){Z||_e[0].groupTitle&&Q.groupclick==="toggleitem"||p.select(this).call(x,U,ne)}),b.syncOrAsync([E.previousPromises,function(){return B(U,qe,ke,Q,Me)},function(){var _e=re._size,ue=Q.borderwidth,ve=Q.xref==="paper",le=Q.yref==="paper";if(Se.text){let pt=(re.shapes||[]).filter(function(Ct){return Ct.showlegend}),Pt=U._fullData.concat(pt).some(function(Ct){let qt=Ct.legend||"legend";var Vt=Array.isArray(qt)?qt.includes(ne):qt===ne;return Vt&&Ct.visible===!0});Ie.style("opacity",Pt?1:.5)}if(!Z){var Ae,Be;ve?Ae=_e.l+_e.w*Q.x-f[P(Q)]*Q._width:Ae=re.width*Q.x-f[P(Q)]*Q._width,le?Be=_e.t+_e.h*(1-Q.y)-f[j(Q)]*Q._effHeight:Be=re.height*(1-Q.y)-f[j(Q)]*Q._effHeight;var Xe=F(U,ne,Ae,Be);if(Xe)return;if(re.margin.autoexpand){var Ye=Ae,yt=Be;Ae=ve?b.constrain(Ae,0,re.width-Q._width):Ye,Be=le?b.constrain(Be,0,re.height-Q._effHeight):yt,Ae!==Ye&&b.log("Constrain "+ne+".x to make legend fit inside graph"),Be!==yt&&b.log("Constrain "+ne+".y to make legend fit inside graph")}t.setTranslate(he,Ae,Be)}if(Ge.on(".drag",null),he.on("wheel",null),Z||Q._height<=Q._maxHeight||U._context.staticPlot){var gt=Q._effHeight;Z&&(gt=Q._height),we.attr({width:Q._width-ue,height:gt-ue,x:ue/2,y:ue/2}),t.setTranslate(Me,0,0),xe.select("rect").attr({width:Q._width-2*ue,height:gt-2*ue,x:ue,y:ue}),t.setClipUrl(Me,se,U),t.setRect(Ge,0,0,0,0),delete Q._scrollY}else{var Tt=Math.max(s.scrollBarMinHeight,Q._effHeight*Q._effHeight/Q._height),At=Q._effHeight-Tt-2*s.scrollBarMargin,$t=Q._height-Q._effHeight,rr=At/$t,_r=Math.min(Q._scrollY||0,$t);we.attr({width:Q._width-2*ue+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-ue,x:ue/2,y:ue/2}),xe.select("rect").attr({width:Q._width-2*ue+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-2*ue,x:ue,y:ue+_r}),t.setClipUrl(Me,se,U),We(_r,Tt,rr),he.on("wheel",function(){_r=b.constrain(Q._scrollY+p.event.deltaY/$t*At,0,$t),We(_r,Tt,rr),_r!==0&&_r!==$t&&p.event.preventDefault()});var Xt,or,Ot,vt=function(pt,Pt,Ct){var qt=(Ct-Pt)/rr+pt;return b.constrain(qt,0,$t)},ht=function(pt,Pt,Ct){var qt=(Pt-Ct)/rr+pt;return b.constrain(qt,0,$t)},De=p.behavior.drag().on("dragstart",function(){var pt=p.event.sourceEvent;pt.type==="touchstart"?Xt=pt.changedTouches[0].clientY:Xt=pt.clientY,Ot=_r}).on("drag",function(){var pt=p.event.sourceEvent;pt.buttons===2||pt.ctrlKey||(pt.type==="touchmove"?or=pt.changedTouches[0].clientY:or=pt.clientY,_r=vt(Ot,Xt,or),We(_r,Tt,rr))});Ge.call(De);var Ne=p.behavior.drag().on("dragstart",function(){var pt=p.event.sourceEvent;pt.type==="touchstart"&&(Xt=pt.changedTouches[0].clientY,Ot=_r)}).on("drag",function(){var pt=p.event.sourceEvent;pt.type==="touchmove"&&(or=pt.changedTouches[0].clientY,_r=ht(Ot,Xt,or),We(_r,Tt,rr))});Me.call(Ne)}function We(pt,Pt,Ct){Q._scrollY=U._fullLayout[ne]._scrollY=pt,t.setTranslate(Me,0,-pt),t.setRect(Ge,Q._width,s.scrollBarMargin+pt*Ct,s.scrollBarWidth,Pt),xe.select("rect").attr("y",ue+pt)}if(U._context.edits.legendPosition){var Ke,Je,et,Mt;he.classed("cursor-move",!0),e.init({element:he.node(),gd:U,prepFn:function(pt){if(pt.target!==Ge.node()){var Pt=t.getTranslate(he);et=Pt.x,Mt=Pt.y}},moveFn:function(pt,Pt){if(et!==void 0&&Mt!==void 0){var Ct=et+pt,qt=Mt+Pt;t.setTranslate(he,Ct,qt),Ke=e.align(Ct,Q._width,_e.l,_e.l+_e.w,Q.xanchor),Je=e.align(qt+Q._height,-Q._height,_e.t+_e.h,_e.t,Q.yanchor)}},doneFn:function(){if(Ke!==void 0&&Je!==void 0){var pt={};pt[ne+".x"]=Ke,pt[ne+".y"]=Je,k.call("_guiRelayout",U,pt)}},clickFn:function(pt,Pt){var Ct=V.selectAll("g.traces").filter(function(){var qt=this.getBoundingClientRect();return Pt.clientX>=qt.left&&Pt.clientX<=qt.right&&Pt.clientY>=qt.top&&Pt.clientY<=qt.bottom});Ct.size()>0&&h(U,Q,Ct,pt,Pt)}})}}],U)}}function w(U,$,Q){var re=U[0],ne=re.width,se=$.entrywidthmode,V=re.trace.legendwidth||$.entrywidth;return se==="fraction"?$._maxWidth*V:Q+(V||ne)}function h(U,$,Q,re,ne){var se=U._fullLayout,V=Q.data()[0][0].trace,Z=$.itemclick,K=$.itemdoubleclick,H={event:ne,node:Q.node(),curveNumber:V.index,expandedIndex:V.index,data:U.data,layout:U.layout,frames:U._transitionData._frames,config:U._context,fullData:U._fullData,fullLayout:se};V._group&&(H.group=V._group),k.traceIs(V,"pie-like")&&(H.label=Q.datum()[0].label);var X=l.triggerHandler(U,"plotly_legendclick",H);if(re===1){if(X===!1)return;$._clickTimeout=setTimeout(function(){U._fullLayout&&Z&&a(Q,U,$,Z,re)},U._context.doubleClickDelay)}else if(re===2){$._clickTimeout&&clearTimeout($._clickTimeout),U._legendMouseDownTime=0;var q=l.triggerHandler(U,"plotly_legenddoubleclick",H);q!==!1&&X!==!1&&K&&a(Q,U,$,K,re)}}function u(U,$,Q){var re=T.getId(Q),ne=U.data()[0][0],se=ne.trace,V=k.traceIs(se,"pie-like"),Z=!Q._inHover&&$._context.edits.legendText&&!V,K=Q._maxNameLength,H,X;ne.groupTitle?(H=ne.groupTitle.text,X=ne.groupTitle.font):(X=Q.font,Q.entries?H=ne.text:(H=V?ne.label:se.name,se._meta&&(H=b.templateString(H,se._meta))));var q=b.ensureSingle(U,"text",re+"text");q.attr("text-anchor","start").call(t.font,X).text(Z?A(H,K):H);var W=Q.indentation+Q.itemwidth+s.itemGap*2;r.positionText(q,W,0),Z?q.call(r.makeEditable,{gd:$,text:H}).call(I,U,$,Q).on("edit",function(ee){this.text(A(ee,K)).call(I,U,$,Q);var ae={};return ae.name=ee,ne.trace._isShape?k.call("_guiRelayout",$,"shapes["+se.index+"].name",ae.name):k.call("_guiRestyle",$,ae,se.index)}):I(q,U,$,Q)}function A(U,$){var Q=Math.max(4,$);if(U&&U.trim().length>=Q/2)return U;U=U||"";for(var re=Q-U.length;re>0;re--)U+=" ";return U}function x(U,$,Q){var re=$._context.doubleClickDelay,ne,se=1,V=b.ensureSingle(U,"rect",Q+"toggle",function(Z){$._context.staticPlot||Z.style("cursor","pointer").attr("pointer-events","all"),Z.call(n.fill,"rgba(0,0,0,0)")});$._context.staticPlot||(V.on("mousedown",function(){ne=new Date().getTime(),ne-$._legendMouseDownTimere&&(se=Math.max(se-1,1)),h($,Z,U,se,p.event)}}))}function z(U,$,Q,re){if($._fullData.some(function(H){let X=H.legend||"legend";return(Array.isArray(X)?X.includes(re):X===re)&&k.traceIs(H,"pie-like")}))return;let se=$._context.doubleClickDelay;var V,Z=1;let K=b.ensureSingle(U,"rect",re+"titletoggle",function(H){$._context.staticPlot||H.style("cursor","pointer").attr("pointer-events","all"),H.call(n.fill,"rgba(0,0,0,0)")});$._context.staticPlot||(K.on("mousedown",function(){V=new Date().getTime(),V-$._legendMouseDownTimese&&(Z=Math.max(Z-1,1));let H={event:p.event,legendId:re,data:$.data,layout:$.layout,fullData:$._fullData,fullLayout:$._fullLayout};if(Z===1&&Q.titleclick){if(l.triggerHandler($,"plotly_legendtitleclick",H)===!1)return;Q._titleClickTimeout=setTimeout(function(){$._fullLayout&&o($,Q,Q.titleclick)},se)}else Z===2&&(Q._titleClickTimeout&&clearTimeout(Q._titleClickTimeout),$._legendMouseDownTime=0,l.triggerHandler($,"plotly_legendtitledoubleclick",H)!==!1&&Q.titledoubleclick&&o($,Q,Q.titledoubleclick))}))}function I(U,$,Q,re,ne){re._inHover&&U.attr("data-notex",!0),r.convertToTspans(U,Q,function(){O($,Q,re,ne)})}function O(U,$,Q,re){var ne=U.data()[0][0],se=ne&&ne.trace.showlegend;if(Array.isArray(se)&&(se=se[ne.i]!==!1),!Q._inHover&&ne&&!se){U.remove();return}var V=U.select("g[class*=math-group]"),Z=V.node(),K=T.getId(Q);Q||(Q=$._fullLayout[K]);var H=Q.borderwidth,X;re===S?X=Q.title.font:ne.groupTitle?X=ne.groupTitle.font:X=Q.font;var q=X.size*g,W,ee;if(Z){var ae=t.bBox(Z);W=ae.height,ee=ae.width,re===S?t.setTranslate(V,H,H+W*.75):t.setTranslate(V,0,W*.25)}else{var he="."+K+(re===S?"title":"")+"text",xe=U.select(he),we=r.lineCount(xe),Me=xe.node();if(W=q*we,ee=Me?t.bBox(Me).width:0,re===S)Q.title.side==="left"&&(ee+=s.itemGap*2),r.positionText(xe,H+s.titlePad,H+q);else{var Se=s.itemGap*2+Q.indentation+Q.itemwidth;ne.groupTitle&&(Se=s.itemGap,ee-=Q.indentation+Q.itemwidth),r.positionText(xe,Se,-q*((we-1)/2-.3))}}re===S?(Q._titleWidth=ee,Q._titleHeight=W):(ne.lineHeight=q,ne.height=Math.max(W,16)+3,ne.width=ee)}function D(U){var $=0,Q=0,re=U.title.side;return re&&(re.indexOf("left")!==-1&&($=U._titleWidth),re.indexOf("top")!==-1&&(Q=U._titleHeight)),[$,Q]}function B(U,$,Q,re,ne){var se=U._fullLayout,V=T.getId(re);re||(re=se[V]);var Z=se._size,K=T.isVertical(re),H=T.isGrouped(re),X=re.entrywidthmode==="fraction",q=re.borderwidth,W=2*q,ee=s.itemGap,ae=re.indentation+re.itemwidth+ee*2,he=2*(q+ee),xe=j(re),we=re.y<0||re.y===0&&xe==="top",Me=re.y>1||re.y===1&&xe==="bottom",Se=re.tracegroupgap,Ie={};let{orientation:Ge,yref:qe}=re,{maxheight:ke}=re,_e=we||Me||Ge!=="v"||qe!=="paper";ke||(ke=_e?.5:1);let ue=_e?se.height:Z.h;re._maxHeight=Math.max(ke>1?ke:ke*ue,30);var ve=0;re._width=0,re._height=0;var le=D(re);if(K)Q.each(function(pt){var Pt=pt[0].height;t.setTranslate(this,q+le[0],q+le[1]+re._height+Pt/2+ee),re._height+=Pt,re._width=Math.max(re._width,pt[0].width)}),ve=ae+re._width,re._width+=ee+ae+W,re._height+=he,H&&($.each(function(pt,Pt){t.setTranslate(this,0,Pt*re.tracegroupgap)}),re._height+=(re._lgroupsLength-1)*re.tracegroupgap);else{var Ae=P(re),Be=re.x<0||re.x===0&&Ae==="right",Xe=re.x>1||re.x===1&&Ae==="left",Ye=Me||we,yt=se.width/2;re._maxWidth=Math.max(Be?Ye&&Ae==="left"?Z.l+Z.w:yt:Xe?Ye&&Ae==="right"?Z.r+Z.w:yt:Z.w,2*ae);var gt=0,Tt=0;Q.each(function(pt){var Pt=w(pt,re,ae);gt=Math.max(gt,Pt),Tt+=Pt}),ve=null;var At=0;if(H){var $t=0,rr=0,_r=0;$.each(function(){var pt=0,Pt=0;p.select(this).selectAll("g.traces").each(function(qt){var Vt=w(qt,re,ae),Ht=qt[0].height;t.setTranslate(this,le[0],le[1]+q+ee+Ht/2+Pt),Pt+=Ht,pt=Math.max(pt,Vt),Ie[qt[0].trace.legendgroup]=pt});var Ct=pt+ee;rr>0&&Ct+q+rr>re._maxWidth?(At=Math.max(At,rr),rr=0,_r+=$t+Se,$t=Pt):$t=Math.max($t,Pt),t.setTranslate(this,rr,_r),rr+=Ct}),re._width=Math.max(At,rr)+q,re._height=_r+$t+he}else{var Xt=Q.size(),or=Tt+W+(Xt-1)*ee=re._maxWidth&&(At=Math.max(At,De),vt=0,ht+=Ot,re._height+=Ot,Ot=0),t.setTranslate(this,le[0]+q+vt,le[1]+q+ht+Pt/2+ee),De=vt+Ct+ee,vt+=qt,Ot=Math.max(Ot,Pt)}),or?(re._width=vt+W,re._height=Ot+he):(re._width=Math.max(At,De)+W,re._height+=Ot+he)}}re._width=Math.ceil(Math.max(re._width+le[0],re._titleWidth+2*(q+s.titlePad))),re._height=Math.ceil(Math.max(re._height+le[1],re._titleHeight+2*(q+s.itemGap))),re._effHeight=Math.min(re._height,re._maxHeight);var Ne=U._context.edits,We=Ne.legendText||Ne.legendPosition;Q.each(function(pt){var Pt=p.select(this).select("."+V+"toggle"),Ct=pt[0].height,qt=pt[0].trace.legendgroup,Vt=w(pt,re,ae);H&&qt!==""&&(Vt=Ie[qt]);var Ht=We?ae:ve||Vt;!K&&!X&&(Ht+=ee/2),t.setRect(Pt,0,-Ct/2,Ht,Ct)});var Ke=ne.select("."+V+"titletext");Ke.node()&&C(Ke,re,q);var Je=ne.select("."+V+"titletoggle");if(Je.size()&&Ke.node()){var et=Ke.attr("x")||0,Mt=s.titlePad;t.setRect(Je,et-Mt,q,re._titleWidth+2*Mt,re._titleHeight+2*Mt)}}function F(U,$,Q,re){var ne=U._fullLayout,se=ne[$],V=P(se),Z=j(se),K=se.xref==="paper",H=se.yref==="paper";U._fullLayout._reservedMargin[$]={};var X=se.y<.5?"b":"t",q=se.x<.5?"l":"r",W={r:ne.width-Q,l:Q+se._width,b:ne.height-re,t:re+se._effHeight};if(K&&H)return E.autoMargin(U,$,{x:se.x,y:se.y,l:se._width*f[V],r:se._width*v[V],b:se._effHeight*v[Z],t:se._effHeight*f[Z]});K?U._fullLayout._reservedMargin[$][X]=W[X]:H||se.orientation==="v"?U._fullLayout._reservedMargin[$][q]=W[q]:U._fullLayout._reservedMargin[$][X]=W[X]}function P(U){return b.isRightAnchor(U)?"right":b.isCenterAnchor(U)?"center":"left"}function j(U){return b.isBottomAnchor(U)?"bottom":b.isMiddleAnchor(U)?"middle":"top"}}}),o5=ze({"src/components/fx/hover.js"(J){"use strict";var G=ci(),p=ao(),b=Nr(),E=b.pushUnique,k=b.strTranslate,l=b.strRotate,e=Hm(),t=Cs(),n=YI(),r=Xi(),a=Qn(),o=_h(),s=Gi(),c=hc().zindexSeparator,g=mi(),f=kh(),v=ag(),m=t5(),i=i5(),T=v.YANGLE,S=Math.PI*T/180,M=1/Math.sin(S),C=Math.cos(S),_=Math.sin(S),w=v.HOVERARROWSIZE,h=v.HOVERTEXTPAD,u={box:!0,ohlc:!0,violin:!0,candlestick:!0},A={scatter:!0,scattergl:!0,splom:!0};function x(q,W){return q.distance-W.distance}J.hover=function(W,ee,ae,he){W=b.getGraphDiv(W);var xe=ee.target;b.throttle(W._fullLayout._uid+v.HOVERID,v.HOVERMINTIME,function(){z(W,ee,ae,he,xe)})},J.loneHover=function(W,ee){var ae=!0;Array.isArray(W)||(ae=!1,W=[W]);var he=ee.gd,xe=K(he),we=H(he),Me=W.map(function(le){var Ae=le._x0||le.x0||le.x||0,Be=le._x1||le.x1||le.x||0,Xe=le._y0||le.y0||le.y||0,Ye=le._y1||le.y1||le.y||0,yt=le.eventData;if(yt){var gt=Math.min(Ae,Be),Tt=Math.max(Ae,Be),At=Math.min(Xe,Ye),$t=Math.max(Xe,Ye),rr=le.trace;if(g.traceIs(rr,"gl3d")){var _r=he._fullLayout[rr.scene]._scene.container,Xt=_r.offsetLeft,or=_r.offsetTop;gt+=Xt,Tt+=Xt,At+=or,$t+=or}yt.bbox={x0:gt+we,x1:Tt+we,y0:At+xe,y1:$t+xe},yt.xPixel=(Ae+Be)/2,yt.yPixel=(Xe+Ye)/2,ee.inOut_bbox&&ee.inOut_bbox.push(yt.bbox)}else yt=!1;return{color:le.color||a.defaultLine,x0:le.x0||le.x||0,x1:le.x1||le.x||0,y0:le.y0||le.y||0,y1:le.y1||le.y||0,xLabel:le.xLabel,yLabel:le.yLabel,zLabel:le.zLabel,text:le.text,name:le.name,idealAlign:le.idealAlign,borderColor:le.borderColor,fontFamily:le.fontFamily,fontSize:le.fontSize,fontColor:le.fontColor,fontWeight:le.fontWeight,fontStyle:le.fontStyle,fontVariant:le.fontVariant,nameLength:le.nameLength,textAlign:le.textAlign,trace:le.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:le.hovertemplate||!1,hovertemplateLabels:le.hovertemplateLabels||!1,eventData:yt}}),Se=!1,Ie=D(Me,{gd:he,hovermode:"closest",rotateLabels:Se,bgColor:ee.bgColor||a.background,container:G.select(ee.container),outerContainer:ee.outerContainer||ee.container}),Ge=Ie.hoverLabels,qe=5,ke=0,_e=0;Ge.sort(function(le,Ae){return le.y0-Ae.y0}).each(function(le,Ae){var Be=le.y0-le.by/2;Be-qeTt[0]._length||nr<0||nr>At[0]._length)return o.unhoverRaw(q,W)}if(W.pointerX=Rt+Tt[0]._offset,W.pointerY=nr+At[0]._offset,"xval"in W?ht=f.flat(xe,W.xval):ht=f.p2c(Tt,Rt),"yval"in W?De=f.flat(xe,W.yval):De=f.p2c(At,nr),q._hoverPointerX=W.pointerX,q._hoverPointerY=W.pointerY,!p(ht[0])||!p(De[0]))return b.warn("Fx.hover failed",W,q),o.unhoverRaw(q,W)}Me.clickanywhere&&(q._hoverXVals=ht,q._hoverYVals=De,q._hoverXAxes=Tt,q._hoverYAxes=At);var Rr=1/0;function Qr(fn,Ai){for(We=0;WeVt&&(Ot.splice(0,Vt),Rr=Ot[0].distance),qe&&or!==0&&Ot.length===0){qt.distance=or,qt.index=!1;var qi=Je._module.hoverPoints(qt,Pt,Ct,"closest",{hoverLayer:Me._hoverlayer});if(qi&&(qi=qi.filter(function(Mi){return Mi.spikeDistance<=or})),qi&&qi.length){var io,oo=qi.filter(function(Mi){return Mi.xa.showspikes&&Mi.xa.spikesnap!=="hovered data"});if(oo.length){var Vn=oo[0];p(Vn.x0)&&p(Vn.y0)&&(io=ha(Vn),(!Ht.vLinePoint||Ht.vLinePoint.spikeDistance>io.spikeDistance)&&(Ht.vLinePoint=io))}var qn=qi.filter(function(Mi){return Mi.ya.showspikes&&Mi.ya.spikesnap!=="hovered data"});if(qn.length){var Hi=qn[0];p(Hi.x0)&&p(Hi.y0)&&(io=ha(Hi),(!Ht.hLinePoint||Ht.hLinePoint.spikeDistance>io.spikeDistance)&&(Ht.hLinePoint=io))}}}}}Qr();function Zr(fn,Ai,jn){for(var Xn=null,eo=1/0,gi,qi=0;qifn.trace.index===vi.trace.index):Ot=[vi];var Yi=Ot.length,Ja=Z("x",vi,Me),Oa=Z("y",vi,Me);Qr(Ja,Oa);var lt=[],rt={},fr=0,lr=function(fn){var Ai=u[fn.trace.type]?I(fn):fn.trace.index;if(!rt[Ai])fr++,rt[Ai]=fr,lt.push(fn);else{var jn=rt[Ai]-1,Xn=lt[jn];jn>0&&Math.abs(fn.distance)Yi-1;Tr--)lr(Ot[Tr]);Ot=lt,Xa()}var Ir=q._hoverdata,Dr=[],ot=K(q),kt=H(q);for(let fn of Ot){var jt=f.makeEventData(fn,fn.trace,fn.cd);if(fn.hovertemplate!==!1){var ar=!1;fn.cd[fn.index]&&fn.cd[fn.index].ht&&(ar=fn.cd[fn.index].ht),fn.hovertemplate=ar||fn.trace.hovertemplate||!1}if(fn.xa&&fn.ya){var Er=fn.x0+fn.xa._offset,xr=fn.x1+fn.xa._offset,zr=fn.y0+fn.ya._offset,Lr=fn.y1+fn.ya._offset,aa=Math.min(Er,xr),Sa=Math.max(Er,xr),wa=Math.min(zr,Lr),pn=Math.max(zr,Lr);jt.bbox={x0:aa+kt,x1:Sa+kt,y0:wa+ot,y1:pn+ot},jt.xPixel=(Er+xr)/2,jt.yPixel=(zr+Lr)/2}fn.eventData=[jt],Dr.push(jt)}q._hoverdata=Dr;var tn=ke==="y"&&(vt.length>1||Ot.length>1)||ke==="closest"&&Sr&&Ot.length>1,ai=a.combine(Me.plot_bgcolor||a.background,Me.paper_bgcolor),rn=D(Ot,{gd:q,hovermode:ke,rotateLabels:tn,bgColor:ai,container:Me._hoverlayer,outerContainer:Me._paper.node(),commonLabelOpts:Me.hoverlabel,hoverdistance:Me.hoverdistance}),Ri=rn.hoverLabels;if(f.isUnifiedHover(ke)||(F(Ri,tn,Me,rn.commonLabelBoundingBox),U(Ri,tn,Me._invScaleX,Me._invScaleY)),he&&he.tagName){var Gn=g.getComponentMethod("annotations","hasClickToShow")(q,Dr);n(G.select(he),Gn?"pointer":"")}var no=re(q,W,Ir);if(!he||ae||!no&&!Me.hoveranywhere)return;Ir&&no&&q.emit("plotly_unhover",{event:W,points:Ir}),Di(q._hoverdata);function Di(fn){q.emit("plotly_hover",{event:W,points:fn,xaxes:Tt,yaxes:At,xvals:f.c2dApply(Tt,ht),yvals:f.c2dApply(At,De),xPixel:W.pointerX,yPixel:W.pointerY})}}function I(q){return[q.trace.index,q.index,q.x0,q.y0,q.name,q.attr,q.xa?q.xa._id:"",q.ya?q.ya._id:""].join(",")}var O=/([\s\S]*)<\/extra>/;function D(q,W){var ee=W.gd,ae=ee._fullLayout,he=W.hovermode,xe=W.rotateLabels,we=W.bgColor,Me=W.container,Se=W.outerContainer,Ie=W.commonLabelOpts||{};if(q.length===0)return[[]];var Ge=W.fontFamily||v.HOVERFONT,qe=W.fontSize||v.HOVERFONTSIZE,ke=W.fontWeight||ae.font.weight,_e=W.fontStyle||ae.font.style,ue=W.fontVariant||ae.font.variant,ve=W.fontTextcase||ae.font.textcase,le=W.fontLineposition||ae.font.lineposition,Ae=W.fontShadow||ae.font.shadow,Be=q[0],Xe=Be.xa,Ye=Be.ya,yt=he.charAt(0),gt=yt+"Label",Tt=Be[gt];if(Tt===void 0&&Xe.type==="multicategory")for(var At=0;Atae.width-Dr&&(ot=ae.width-Dr),en.attr("d","M"+(lr-ot)+",0L"+(lr-ot+w)+","+Ir+w+"H"+Dr+"v"+Ir+(h*2+fr.height)+"H"+-Dr+"V"+Ir+w+"H"+(lr-ot-w)+"Z"),lr=ot,We.minX=lr-Dr,We.maxX=lr+Dr,Xe.side==="top"?(We.minY=Tr-(h*2+fr.height),We.maxY=Tr-h):(We.minY=Tr+h,We.maxY=Tr+(h*2+fr.height))}else{var kt,jt,ar;Ye.side==="right"?(kt="start",jt=1,ar="",lr=Xe._offset+Xe._length):(kt="end",jt=-1,ar="-",lr=Xe._offset),Tr=Ye._offset+(Be.y0+Be.y1)/2,vi.attr("text-anchor",kt),en.attr("d","M0,0L"+ar+w+","+w+"V"+(h+fr.height/2)+"h"+ar+(h*2+fr.width)+"V-"+(h+fr.height/2)+"H"+ar+w+"V-"+w+"Z"),We.minY=Tr-(h+fr.height/2),We.maxY=Tr+(h+fr.height/2),Ye.side==="right"?(We.minX=lr+w,We.maxX=lr+w+(h*2+fr.width)):(We.minX=lr-w-(h*2+fr.width),We.maxX=lr-w);var Er=fr.height/2,xr=rr-fr.top-Er,zr="clip"+ae._uid+"commonlabel"+Ye._id,Lr;if(lren.hoverinfo!=="none");if(on.length===0)return[];var Ke=ae.hoverlabel,Je=Ke.font,et=on[0],Mt=((he==="x unified"?et.xa:et.ya).unifiedhovertitle||{}).text,pt=Mt?b.hovertemplateString({data:he==="x unified"?[{xa:et.xa,x:et.xVal}]:[{ya:et.ya,y:et.yVal}],fallback:et.trace.hovertemplatefallback,locale:ae._d3locale,template:Mt}):Tt,Pt={showlegend:!0,legend:{title:{text:pt,font:Je},font:Je,bgcolor:Ke.bgcolor,bordercolor:Ke.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:ae.legend?ae.legend.traceorder:void 0,orientation:"v"}},Ct={font:Je};m(Pt,Ct,ee._fullData);var qt=Ct.legend;qt.entries=[];for(var Vt=0;Vt=0?Un=Xa:ja+cr<_r&&ja>=0?Un=ja:Nn+cr<_r?Un=Nn:Xa-Zr=0?li=La:un+Rr=0?li=un:yn+Rr=0,(on.idealAlign==="top"||!wa)&&pn?(ar-=xr/2,on.anchor="end"):wa?(ar+=xr/2,on.anchor="start"):on.anchor="middle",on.crossPos=ar;else{if(on.pos=ar,wa=jt+Er/2+Sa<=_r,pn=jt-Er/2-Sa>=0,(on.idealAlign==="left"||!wa)&&pn)jt-=Er/2,on.anchor="end";else if(wa)jt+=Er/2,on.anchor="start";else{on.anchor="middle";var tn=Sa/2,ai=jt+tn-_r,rn=jt-tn;ai>0&&(jt-=ai),rn<0&&(jt+=-rn)}on.crossPos=jt}Tr.attr("text-anchor",on.anchor),Dr&&Ir.attr("text-anchor",on.anchor),en.attr("transform",k(jt,ar)+(xe?l(T):""))}),{hoverLabels:Yn,commonLabelBoundingBox:We}}function B(q,W,ee,ae,he,xe){var we,Me,Se="",Ie="";q.nameOverride!==void 0&&(q.name=q.nameOverride),q.name&&(q.trace._meta&&(q.name=b.templateString(q.name,q.trace._meta)),Se=se(q.name,q.nameLength));var Ge=ee.charAt(0),qe=Ge==="x"?"y":"x";q.zLabel!==void 0?(q.xLabel!==void 0&&(Ie+="x: "+q.xLabel+"
"),q.yLabel!==void 0&&(Ie+="y: "+q.yLabel+"
"),q.trace.type!=="choropleth"&&q.trace.type!=="choroplethmap"&&(Ie+=(Ie?"z: ":"")+q.zLabel)):W&&q[Ge+"Label"]===he?Ie=q[qe+"Label"]||"":q.xLabel===void 0?q.yLabel!==void 0&&q.trace.type!=="scattercarpet"&&(Ie=q.yLabel):q.yLabel===void 0?Ie=q.xLabel:Ie="("+q.xLabel+", "+q.yLabel+")",(q.text||q.text===0)&&!Array.isArray(q.text)&&(Ie+=(Ie?"
":"")+q.text),q.extraText!==void 0&&(Ie+=(Ie?"
":"")+q.extraText),xe&&Ie===""&&!q.hovertemplate&&(Se===""&&xe.remove(),Ie=Se),(Me=(we=q.trace)==null?void 0:we.hoverlabel)!=null&&Me.split&&(q.hovertemplate="");let{hovertemplate:ke=!1}=q;if(ke){let _e=q.hovertemplateLabels||q;q[Ge+"Label"]!==he&&(_e[Ge+"other"]=_e[Ge+"Val"],_e[Ge+"otherLabel"]=_e[Ge+"Label"]),Ie=b.hovertemplateString({data:[q.eventData[0]||{},q.trace._meta],fallback:q.trace.hovertemplatefallback,labels:_e,locale:ae._d3locale,template:ke}),Ie=Ie.replace(O,(ue,ve)=>(Se=se(ve,q.nameLength),""))}return[Ie,Se]}function F(q,W,ee,ae){var he=W?"xa":"ya",xe=W?"ya":"xa",we=0,Me=1,Se=q.size(),Ie=new Array(Se),Ge=0,qe=ae.minX,ke=ae.maxX,_e=ae.minY,ue=ae.maxY,ve=function(ht){return ht*ee._invScaleX},le=function(ht){return ht*ee._invScaleY};q.each(function(ht){var De=ht[he],Ne=ht[xe],We=De._id.charAt(0)==="x",Ke=De.range;Ge===0&&Ke&&Ke[0]>Ke[1]!==We&&(Me=-1);var Je=0,et=We?ee.width:ee.height;if(ee.hovermode==="x"||ee.hovermode==="y"){var Mt=P(ht,W),pt=ht.anchor,Pt=pt==="end"?-1:1,Ct,qt;if(pt==="middle")Ct=ht.crossPos+(We?le(Mt.y-ht.by/2):ve(ht.bx/2+ht.tx2width/2)),qt=Ct+(We?le(ht.by):ve(ht.bx));else if(We)Ct=ht.crossPos+le(w+Mt.y)-le(ht.by/2-w),qt=Ct+le(ht.by);else{var Vt=ve(Pt*w+Mt.x),Ht=Vt+ve(Pt*ht.bx);Ct=ht.crossPos+Math.min(Vt,Ht),qt=ht.crossPos+Math.max(Vt,Ht)}We?_e!==void 0&&ue!==void 0&&Math.min(qt,ue)-Math.max(Ct,_e)>1&&(Ne.side==="left"?(Je=Ne._mainLinePosition,et=ee.width):et=Ne._mainLinePosition):qe!==void 0&&ke!==void 0&&Math.min(qt,ke)-Math.max(Ct,qe)>1&&(Ne.side==="top"?(Je=Ne._mainLinePosition,et=ee.height):et=Ne._mainLinePosition)}Ie[Ge++]=[{datum:ht,traceIndex:ht.trace.index,dp:0,pos:ht.pos,posref:ht.posref,size:ht.by*(We?M:1)/2,pmin:Je,pmax:et}]}),Ie.sort(function(ht,De){return ht[0].posref-De[0].posref||Me*(De[0].traceIndex-ht[0].traceIndex)});var Ae,Be,Xe,Ye,yt,gt,Tt;function At(ht){var De=ht[0],Ne=ht[ht.length-1];if(Be=De.pmin-De.pos-De.dp+De.size,Xe=Ne.pos+Ne.dp+Ne.size-De.pmax,Be>.01){for(yt=ht.length-1;yt>=0;yt--)ht[yt].dp+=Be;Ae=!1}if(!(Xe<.01)){if(Be<-.01){for(yt=ht.length-1;yt>=0;yt--)ht[yt].dp-=Xe;Ae=!1}if(Ae){var We=0;for(Ye=0;YeDe.pmax&&We++;for(Ye=ht.length-1;Ye>=0&&!(We<=0);Ye--)gt=ht[Ye],gt.pos>De.pmax-1&&(gt.del=!0,We--);for(Ye=0;Ye=0;yt--)ht[yt].dp-=Xe;for(Ye=ht.length-1;Ye>=0&&!(We<=0);Ye--)gt=ht[Ye],gt.pos+gt.dp+gt.size>De.pmax&&(gt.del=!0,We--)}}}for(;!Ae&&we<=Se;){for(we++,Ae=!0,Ye=0;Ye.01){for(yt=rr.length-1;yt>=0;yt--)rr[yt].dp+=Be;for($t.push.apply($t,rr),Ie.splice(Ye+1,1),Tt=0,yt=$t.length-1;yt>=0;yt--)Tt+=$t[yt].dp;for(Xe=Tt/$t.length,yt=$t.length-1;yt>=0;yt--)$t[yt].dp-=Xe;Ae=!1}else Ye++}Ie.forEach(At)}for(Ye=Ie.length-1;Ye>=0;Ye--){var or=Ie[Ye];for(yt=or.length-1;yt>=0;yt--){var Ot=or[yt],vt=Ot.datum;vt.offset=Ot.dp,vt.del=Ot.del}}}function P(q,W){var ee=0,ae=q.offset;return W&&(ae*=-_,ee=q.offset*C),{x:ee,y:ae}}function j(q){var W={start:1,end:-1,middle:0}[q.anchor],ee=W*(w+h),ae=ee+W*(q.txwidth+h),he=q.anchor==="middle";return he&&(ee-=q.tx2width/2,ae+=q.txwidth/2+h),{alignShift:W,textShiftX:ee,text2ShiftX:ae}}function U(q,W,ee,ae){var he=function(we){return we*ee},xe=function(we){return we*ae};q.each(function(we){var Me=G.select(this);if(we.del)return Me.remove();var Se=Me.select("text.nums"),Ie=we.anchor,Ge=Ie==="end"?-1:1,qe=j(we),ke=P(we,W),_e=ke.x,ue=ke.y,ve=Ie==="middle",le="hoverlabel"in we.trace?we.trace.hoverlabel.showarrow:!0,Ae;ve?Ae="M-"+he(we.bx/2+we.tx2width/2)+","+xe(ue-we.by/2)+"h"+he(we.bx)+"v"+xe(we.by)+"h-"+he(we.bx)+"Z":le?Ae="M0,0L"+he(Ge*w+_e)+","+xe(w+ue)+"v"+xe(we.by/2-w)+"h"+he(Ge*we.bx)+"v-"+xe(we.by)+"H"+he(Ge*w+_e)+"V"+xe(ue-w)+"Z":Ae="M"+he(Ge*w+_e)+","+xe(ue-we.by/2)+"h"+he(Ge*we.bx)+"v"+xe(we.by)+"h"+he(-Ge*we.bx)+"Z",Me.select("path").attr("d",Ae);var Be=_e+qe.textShiftX,Xe=ue+we.ty0-we.by/2+h,Ye=we.textAlign||"auto";Ye!=="auto"&&(Ye==="left"&&Ie!=="start"?(Se.attr("text-anchor","start"),Be=ve?-we.bx/2-we.tx2width/2+h:-we.bx-h):Ye==="right"&&Ie!=="end"&&(Se.attr("text-anchor","end"),Be=ve?we.bx/2-we.tx2width/2-h:we.bx+h)),Se.call(t.positionText,he(Be),xe(Xe)),we.tx2width&&(Me.select("text.name").call(t.positionText,he(qe.text2ShiftX+qe.alignShift*h+_e),xe(ue+we.ty0-we.by/2+h)),Me.select("rect").call(r.setRect,he(qe.text2ShiftX+(qe.alignShift-1)*we.tx2width/2+_e),xe(ue-we.by/2-1),he(we.tx2width),xe(we.by+2)))})}function $(q,W){var ee=q.index,ae=q.trace||{},he=q.cd[0],xe=q.cd[ee]||{};function we(ke){return ke||p(ke)&&ke===0}var Me=Array.isArray(ee)?function(ke,_e){var ue=b.castOption(he,ee,ke);return we(ue)?ue:b.extractOption({},ae,"",_e)}:function(ke,_e){return b.extractOption(xe,ae,ke,_e)};function Se(ke,_e,ue){var ve=Me(_e,ue);we(ve)&&(q[ke]=ve)}if(Se("hoverinfo","hi","hoverinfo"),Se("bgcolor","hbg","hoverlabel.bgcolor"),Se("borderColor","hbc","hoverlabel.bordercolor"),Se("fontFamily","htf","hoverlabel.font.family"),Se("fontSize","hts","hoverlabel.font.size"),Se("fontColor","htc","hoverlabel.font.color"),Se("fontWeight","htw","hoverlabel.font.weight"),Se("fontStyle","hty","hoverlabel.font.style"),Se("fontVariant","htv","hoverlabel.font.variant"),Se("nameLength","hnl","hoverlabel.namelength"),Se("textAlign","hta","hoverlabel.align"),q.posref=W==="y"||W==="closest"&&ae.orientation==="h"?q.xa._offset+(q.x0+q.x1)/2:q.ya._offset+(q.y0+q.y1)/2,q.x0=b.constrain(q.x0,0,q.xa._length),q.x1=b.constrain(q.x1,0,q.xa._length),q.y0=b.constrain(q.y0,0,q.ya._length),q.y1=b.constrain(q.y1,0,q.ya._length),q.xLabelVal!==void 0&&(q.xLabel="xLabel"in q?q.xLabel:s.hoverLabelText(q.xa,q.xLabelVal,ae.xhoverformat),q.xVal=q.xa.c2d(q.xLabelVal)),q.yLabelVal!==void 0&&(q.yLabel="yLabel"in q?q.yLabel:s.hoverLabelText(q.ya,q.yLabelVal,ae.yhoverformat),q.yVal=q.ya.c2d(q.yLabelVal)),q.zLabelVal!==void 0&&q.zLabel===void 0&&(q.zLabel=String(q.zLabelVal)),!isNaN(q.xerr)&&!(q.xa.type==="log"&&q.xerr<=0)){var Ie=s.tickText(q.xa,q.xa.c2l(q.xerr),"hover").text;q.xerrneg!==void 0?q.xLabel+=" +"+Ie+" / -"+s.tickText(q.xa,q.xa.c2l(q.xerrneg),"hover").text:q.xLabel+=" \xB1 "+Ie,W==="x"&&(q.distance+=1)}if(!isNaN(q.yerr)&&!(q.ya.type==="log"&&q.yerr<=0)){var Ge=s.tickText(q.ya,q.ya.c2l(q.yerr),"hover").text;q.yerrneg!==void 0?q.yLabel+=" +"+Ge+" / -"+s.tickText(q.ya,q.ya.c2l(q.yerrneg),"hover").text:q.yLabel+=" \xB1 "+Ge,W==="y"&&(q.distance+=1)}var qe=q.hoverinfo||q.trace.hoverinfo;return qe&&qe!=="all"&&(qe=Array.isArray(qe)?qe:qe.split("+"),qe.indexOf("x")===-1&&(q.xLabel=void 0),qe.indexOf("y")===-1&&(q.yLabel=void 0),qe.indexOf("z")===-1&&(q.zLabel=void 0),qe.indexOf("text")===-1&&(q.text=void 0),qe.indexOf("name")===-1&&(q.name=void 0)),q}function Q(q,W,ee){var ae=ee.container,he=ee.fullLayout,xe=he._size,we=ee.event,Me=!!W.hLinePoint,Se=!!W.vLinePoint,Ie,Ge;if(ae.selectAll(".spikeline").remove(),!!(Se||Me)){var qe=a.combine(he.plot_bgcolor,he.paper_bgcolor);if(Me){var ke=W.hLinePoint,_e,ue;Ie=ke&&ke.xa,Ge=ke&&ke.ya;var ve=Ge.spikesnap;ve==="cursor"?(_e=we.pointerX,ue=we.pointerY):(_e=Ie._offset+ke.x,ue=Ge._offset+ke.y);var le=a.wcagContrast(ke.color,qe)<1.5?a.contrast(qe):ke.color,Ae=Ge.spikemode,Be=Ge.spikethickness,Xe=Ge.spikecolor||le,Ye=s.getPxPosition(q,Ge),yt,gt;if(Ae.indexOf("toaxis")!==-1||Ae.indexOf("across")!==-1){if(Ae.indexOf("toaxis")!==-1&&(yt=Ye,gt=_e),Ae.indexOf("across")!==-1){var Tt=Ge._counterDomainMin,At=Ge._counterDomainMax;Ge.anchor==="free"&&(Tt=Math.min(Tt,Ge.position),At=Math.max(At,Ge.position)),yt=xe.l+Tt*xe.w,gt=xe.l+At*xe.w}ae.insert("line",":first-child").attr({x1:yt,x2:gt,y1:ue,y2:ue,"stroke-width":Be,stroke:Xe,"stroke-dasharray":r.dashStyle(Ge.spikedash,Be)}).classed("spikeline",!0).classed("crisp",!0),ae.insert("line",":first-child").attr({x1:yt,x2:gt,y1:ue,y2:ue,"stroke-width":Be+2,stroke:qe}).classed("spikeline",!0).classed("crisp",!0)}Ae.indexOf("marker")!==-1&&ae.insert("circle",":first-child").attr({cx:Ye+(Ge.side!=="right"?Be:-Be),cy:ue,r:Be,fill:Xe}).classed("spikeline",!0)}if(Se){var $t=W.vLinePoint,rr,_r;Ie=$t&&$t.xa,Ge=$t&&$t.ya;var Xt=Ie.spikesnap;Xt==="cursor"?(rr=we.pointerX,_r=we.pointerY):(rr=Ie._offset+$t.x,_r=Ge._offset+$t.y);var or=a.wcagContrast($t.color,qe)<1.5?a.contrast(qe):$t.color,Ot=Ie.spikemode,vt=Ie.spikethickness,ht=Ie.spikecolor||or,De=s.getPxPosition(q,Ie),Ne,We;if(Ot.indexOf("toaxis")!==-1||Ot.indexOf("across")!==-1){if(Ot.indexOf("toaxis")!==-1&&(Ne=De,We=_r),Ot.indexOf("across")!==-1){var Ke=Ie._counterDomainMin,Je=Ie._counterDomainMax;Ie.anchor==="free"&&(Ke=Math.min(Ke,Ie.position),Je=Math.max(Je,Ie.position)),Ne=xe.t+(1-Je)*xe.h,We=xe.t+(1-Ke)*xe.h}ae.insert("line",":first-child").attr({x1:rr,x2:rr,y1:Ne,y2:We,"stroke-width":vt,stroke:ht,"stroke-dasharray":r.dashStyle(Ie.spikedash,vt)}).classed("spikeline",!0).classed("crisp",!0),ae.insert("line",":first-child").attr({x1:rr,x2:rr,y1:Ne,y2:We,"stroke-width":vt+2,stroke:qe}).classed("spikeline",!0).classed("crisp",!0)}Ot.indexOf("marker")!==-1&&ae.insert("circle",":first-child").attr({cx:rr,cy:De-(Ie.side!=="top"?vt:-vt),r:vt,fill:ht}).classed("spikeline",!0)}}}function re(q,W,ee){if(!ee||ee.length!==q._hoverdata.length)return!0;for(var ae=ee.length-1;ae>=0;ae--){var he=ee[ae],xe=q._hoverdata[ae];if(he.curveNumber!==xe.curveNumber||String(he.pointNumber)!==String(xe.pointNumber)||String(he.pointNumbers)!==String(xe.pointNumbers)||he.binNumber!==xe.binNumber)return!0}return!1}function ne(q,W){return!W||W.vLinePoint!==q._spikepoints.vLinePoint||W.hLinePoint!==q._spikepoints.hLinePoint}function se(q,W){return t.plainText(q||"",{len:W,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function V(q,W){for(var ee=W.charAt(0),ae=[],he=[],xe=[],we=0;weq.offsetTop+q.clientTop,H=q=>q.offsetLeft+q.clientLeft;function X(q,W){var ee=q._fullLayout,ae=W.getBoundingClientRect(),he=ae.left,xe=ae.top,we=he+ae.width,Me=xe+ae.height,Se=b.apply3DTransform(ee._invTransform)(he,xe),Ie=b.apply3DTransform(ee._invTransform)(we,Me),Ge=Se[0],qe=Se[1],ke=Ie[0],_e=Ie[1];return{x:Ge,y:qe,width:ke-Ge,height:_e-qe,top:Math.min(qe,_e),left:Math.min(Ge,ke),right:Math.max(Ge,ke),bottom:Math.max(qe,_e)}}}}),cg=ze({"src/components/fx/hoverlabel_defaults.js"(J,G){"use strict";var p=Nr(),b=Qn(),E=kh().isUnifiedHover;G.exports=function(l,e,t,n){n=n||{};var r=e.legend;function a(o){n.font[o]||(n.font[o]=r?e.legend.font[o]:e.font[o])}e&&E(e.hovermode)&&(n.font||(n.font={}),a("size"),a("family"),a("color"),a("weight"),a("style"),a("variant"),r?(n.bgcolor||(n.bgcolor=b.combine(e.legend.bgcolor,e.paper_bgcolor)),n.bordercolor||(n.bordercolor=e.legend.bordercolor)):n.bgcolor||(n.bgcolor=e.paper_bgcolor)),t("hoverlabel.bgcolor",n.bgcolor),t("hoverlabel.bordercolor",n.bordercolor),t("hoverlabel.namelength",n.namelength),t("hoverlabel.showarrow",n.showarrow),p.coerceFont(t,"hoverlabel.font",n.font),t("hoverlabel.align",n.align)}}}),$I=ze({"src/components/fx/layout_global_defaults.js"(J,G){"use strict";var p=Nr(),b=cg(),E=rv();G.exports=function(l,e){function t(n,r){return p.coerce(l,e,E,n,r)}b(l,e,t)}}}),KI=ze({"src/components/fx/defaults.js"(J,G){"use strict";var p=Nr(),b=qm(),E=cg();G.exports=function(l,e,t,n){function r(o,s){return p.coerce(l,e,b,o,s)}var a=p.extendFlat({},n.hoverlabel);e.hovertemplate&&(a.namelength=-1),E(l,e,r,a)}}}),s5=ze({"src/components/fx/hovermode_defaults.js"(J,G){"use strict";var p=Nr(),b=rv();G.exports=function(k,l){function e(t,n){return l[t]!==void 0?l[t]:p.coerce(k,l,b,t,n)}return e("clickmode"),e("hoversubplots"),e("hoveranywhere"),e("clickanywhere"),e("hovermode")}}}),JI=ze({"src/components/fx/layout_defaults.js"(J,G){"use strict";var p=Nr(),b=rv(),E=s5(),k=cg();G.exports=function(e,t){function n(g,f){return p.coerce(e,t,b,g,f)}var r=E(e,t);r&&(n("hoverdistance"),n("spikedistance"),r.indexOf("unified")!==-1&&n("hoversort"));var a=n("dragmode");a==="select"&&n("selectdirection");var o=t._has("map"),s=t._has("geo"),c=t._basePlotModules.length;t.dragmode==="zoom"&&((o||s)&&c===1||o&&s&&c===2)&&(t.dragmode="pan"),k(e,t,n),p.coerceFont(n,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),QI=ze({"src/components/fx/calc.js"(J,G){"use strict";var p=Nr(),b=mi();G.exports=function(l){var e=l.calcdata,t=l._fullLayout;function n(c){return function(g){return p.coerceHoverinfo({hoverinfo:g},{_module:c._module},t)}}for(var r=0;r"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),Dx=ze({"src/components/shapes/draw_newshape/constants.js"(J,G){"use strict";var p=32;G.exports={CIRCLE_SIDES:p,i000:0,i090:p/4,i180:p/2,i270:p/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),Fx=ze({"src/components/selections/helpers.js"(J,G){"use strict";var p=Nr().strTranslate;function b(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function E(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function k(e){var t=e._id.charAt(0)==="y"?1:0;return function(n){return b(e,n[t])}}function l(e){return p(e.xaxis._offset,e.yaxis._offset)}G.exports={p2r:b,r2p:E,axValue:k,getTransform:l}}}),uv=ze({"src/components/shapes/draw_newshape/helpers.js"(J){"use strict";var G=Kw(),p=Dx(),b=p.CIRCLE_SIDES,E=p.SQRT2,k=Fx(),l=k.p2r,e=k.r2p,t=[0,3,4,5,6,1,2],n=[0,3,4,1,2];J.writePaths=function(o){var s=o.length;if(!s)return"M0,0Z";for(var c="",g=0;g0&&T{let s=o.charAt(0),c=r[s].drawn!==void 0;return a+(c?1:0)},0)},J.getDataToPixel=function(l,e,t,n,r){var a=l._fullLayout._size,o;if(e)if(r==="domain")o=function(c){return e._length*(n?1-c:c)+e._offset};else{var s=J.shapePositionToRange(e);o=function(c){var g=k(e,t);return e._offset+e.r2p(s(c,!0))+g},e.type==="date"&&(o=J.decodeDate(o))}else n?o=function(c){return a.t+a.h*(1-c)}:o=function(c){return a.l+a.w*c};return o},J.getPixelToData=function(l,e,t,n){var r=l._fullLayout._size,a;if(e)if(n==="domain")a=function(s){var c=(s-e._offset)/e._length;return t?1-c:c};else{var o=J.rangeToShapePosition(e);a=function(s){return o(e.p2r(s-e._offset))}}else t?a=function(s){return 1-(s-r.t)/r.h}:a=function(s){return(s-r.l)/r.w};return a},J.roundPositionForSharpStrokeRendering=function(l,e){var t=Math.round(e%2)===1,n=Math.round(l);return t?n+.5:n},J.makeShapesOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.shapes[e]||{},n=l._fullLayout._plots[t.xref+t.yref],r=!!n;return r?n._hadPlotinfo=!0:(n={},t.xref&&t.xref!=="paper"&&(n.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&t.yref!=="paper"&&(n.yaxis=l._fullLayout[t.yref+"axis"])),n.xsizemode=t.xsizemode,n.ysizemode=t.ysizemode,n.xanchor=t.xanchor,n.yanchor=t.yanchor,{options:t,plotinfo:n}},J.makeSelectionsOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.selections[e]||{},n=l._fullLayout._plots[t.xref+t.yref],r=!!n;return r?n._hadPlotinfo=!0:(n={},t.xref&&(n.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&(n.yaxis=l._fullLayout[t.yref+"axis"])),{options:t,plotinfo:n}},J.getPathString=function(l,e){let t=e.type,n=b.getRefType(e.xref),r=b.getRefType(e.yref),a=l._fullLayout._size;var o,s,c,g,f,v,m,i,T,S,M,C;function _(O,D,B,F){var P;if(O)if(D==="domain")F?P=function(j){return O._offset+O._length*(1-j)}:P=function(j){return O._offset+O._length*j};else{let j=J.shapePositionToRange(O);P=function(U){return O._offset+O.r2p(j(U,!0))},B==="path"&&O.type==="date"&&(P=J.decodeDate(P))}else F?P=function(j){return a.t+a.h*(1-j)}:P=function(j){return a.l+a.w*j};return P}if(n==="array"?(m=[],o=e.xref.map(function(O){return b.getFromId(l,O)}),m=e.xref.map(function(O,D){return _(o[D],b.getRefType(O),t,!1)})):(o=b.getFromId(l,e.xref),m=_(o,n,t,!1)),r==="array"?(i=[],s=e.yref.map(function(O){return b.getFromId(l,O)}),i=e.yref.map(function(O,D){return _(s[D],b.getRefType(O),t,!0)})):(s=b.getFromId(l,e.yref),i=_(s,r,t,!0)),t==="path")return E(e,m,i);if(n==="array")c=k(o[0],e.x0shift),g=k(o[1],e.x1shift),T=m[0](e.x0)+c,S=m[1](e.x1)+g;else if(c=k(o,e.x0shift),g=k(o,e.x1shift),e.xsizemode==="pixel"){let O=m(e.xanchor);T=O+e.x0+c,S=O+e.x1+g}else T=m(e.x0)+c,S=m(e.x1)+g;if(r==="array")f=k(s[0],e.y0shift),v=k(s[1],e.y1shift),M=i[0](e.y0)+f,C=i[1](e.y1)+v;else if(f=k(s,e.y0shift),v=k(s,e.y1shift),e.ysizemode==="pixel"){let O=i(e.yanchor);M=O-e.y0+f,C=O-e.y1+v}else M=i(e.y0)+f,C=i(e.y1)+v;if(t==="line")return"M"+T+","+M+"L"+S+","+C;if(t==="rect")return"M"+T+","+M+"H"+S+"V"+C+"H"+T+"Z";var w=(T+S)/2,h=(M+C)/2,u=Math.abs(w-T),A=Math.abs(h-M),x="A"+u+","+A,z=w+u+","+h,I=w+","+(h-A);return"M"+z+x+" 0 1,1 "+I+x+" 0 0,1 "+z+"Z"};function E(l,e,t){let n=l.path,r=l.xsizemode,a=l.ysizemode,o=l.xanchor,s=l.yanchor,c=Array.isArray(l.xref),g=Array.isArray(l.yref);var f=0,v=0;return n.replace(G.segmentRE,function(m){var i=0,T=m.charAt(0),S=G.paramIsX[T],M=G.paramIsY[T],C=G.numParams[T];let _=S.drawn!==void 0,w=M.drawn!==void 0,h=c?e[f]:e,u=g?t[v]:t;var A=m.slice(1).replace(G.paramRE,function(x){return S[i]?r==="pixel"?x=h(o)+Number(x):x=h(x):M[i]&&(a==="pixel"?x=u(s)-Number(x):x=u(x)),i++,i>C&&(x="X"),x});return i>C&&(A=A.replace(/[\s,]*X.*/,""),p.log("Ignoring extra params in segment "+m)),_&&f++,w&&v++,T+A})}J.getPixelShift=k;function k(l,e){e=e||0;var t=0;return e&&l&&(l.type==="category"||l.type==="multicategory")&&(t=(l.r2p(1)-l.r2p(0))*e),t}}}),u5=ze({"src/components/shapes/display_labels.js"(J,G){"use strict";var p=Nr(),b=Gi(),E=Cs(),k=Xi(),l=uv().readPaths,e=cv(),t=e.getPathString,n=Sx(),r=dc().FROM_TL;G.exports=function(c,g,f,v){if(v.selectAll(".shape-label").remove(),!!(f.label.text||f.label.texttemplate)){var m;if(f.label.texttemplate){var i={};if(f.type!=="path"){var T=b.getFromId(c,f.xref),S=b.getFromId(c,f.yref);let W=Array.isArray(f.xref),ee=Array.isArray(f.yref);for(var M in n){var C=typeof n[M]=="function",_=!W||n.simpleXVariables.includes(M),w=!ee||n.simpleYVariables.includes(M);if(C&&_&&w){var h=n[M](f,T,S);h!==void 0&&(i[M]=h)}}}m=p.texttemplateStringForShapes({data:[i],fallback:f.label.texttemplatefallback,locale:c._fullLayout._d3locale,template:f.label.texttemplate})}else m=f.label.text;var u={"data-index":g},A=f.label.font,x={"data-notex":1},z=v.append("g").attr(u).classed("shape-label",!0),I=z.append("text").attr(x).classed("shape-label-text",!0).text(m),O,D,B,F;if(f.path){var P=t(c,f),j=l(P,c);O=1/0,B=1/0,D=-1/0,F=-1/0;for(var U=0;Ue.getDataToPixel(c,ve,ue,!1,le)(_e),ke=(_e,ue,ve,le)=>e.getDataToPixel(c,ve,ue,!0,le)(_e);if(f.xsizemode==="pixel"){let _e=qe(f.xanchor,void 0,ae,Me),ue=e.getPixelShift(ae,f.x0shift),ve=e.getPixelShift(ae,f.x1shift);O=_e+f.x0+ue,D=_e+f.x1+ve}else O=qe(f.x0,f.x0shift,ae,Me),D=qe(f.x1,f.x1shift,he,Se);if(f.ysizemode==="pixel"){let _e=ke(f.yanchor,void 0,xe,Ie),ue=e.getPixelShift(xe,f.y0shift),ve=e.getPixelShift(xe,f.y1shift);B=_e-f.y0+ue,F=_e-f.y1+ve}else B=ke(f.y0,f.y0shift,xe,Ie),F=ke(f.y1,f.y1shift,we,Ge)}var V=f.label.textangle;V==="auto"&&(f.type==="line"?V=a(O,B,D,F):V=0),I.call(function(W){return W.call(k.font,A).attr({}),E.convertToTspans(W,c),W});var Z=k.bBox(I.node()),K=o(O,B,D,F,f,V,Z),H=K.textx,X=K.texty,q=K.xanchor;I.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[q],y:X,x:H,transform:"rotate("+V+","+H+","+X+")"}).call(E.positionText,H,X)}};function a(s,c,g,f){var v,m;return m=Math.abs(g-s),g>=s?v=c-f:v=f-c,-180/Math.PI*Math.atan2(v,m)}function o(s,c,g,f,v,m,i){var T=v.label.textposition,S=v.label.textangle,M=v.label.padding,C=v.type,_=Math.PI/180*m,w=Math.sin(_),h=Math.cos(_),u=v.label.xanchor,A=v.label.yanchor,x,z,I,O;if(C==="line"){T==="start"?(x=s,z=c):T==="end"?(x=g,z=f):(x=(s+g)/2,z=(c+f)/2),u==="auto"&&(T==="start"?S==="auto"?g>s?u="left":gs?u="right":gs?u="right":gs?u="left":g1&&!(ke.length===2&&ke[1][0]==="Z")&&(V===0&&(ke[0][0]="M"),x[se]=ke,B(),F())}}function he(ke,_e){if(ke===2){se=+_e.srcElement.getAttribute("data-i"),V=+_e.srcElement.getAttribute("data-j");var ue=x[se];!m(ue)&&!i(ue)&&ae()}}function xe(ke){re=[];for(var _e=0;_e{if(!I._dragging&&I._fullLayout.hoveranywhere){let j=F(P);j&&c.hover(I,j,D.id)}}),B.addEventListener("click",P=>{if(!I._dragged&&I._fullLayout.clickanywhere){let j=F(P);j&&c.click(I,j,D.id)}})}function _(I,O,D){let B=D.xref,F=D.yref;if(Array.isArray(B)||Array.isArray(F)){let P="clip"+O._fullLayout._uid+"shape"+D._index,j=w(O,B,F);E.ensureSingleById(O._fullLayout._clips,"clipPath",P,function(U){U.append("rect")}).select("rect").attr(j),a.setClipUrl(I,P,O)}else{let P=(B+F).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");a.setClipUrl(I,P?"clip"+O._fullLayout._uid+P:null,O)}}function w(I,O,D){let B=I._fullLayout._size;function F(U,$){let Q=(Array.isArray(U)?U:[U]).map(se=>k.getFromId(I,se)).filter(Boolean);if(!Q.length)return $?[B.t,B.t+B.h]:[B.l,B.l+B.w];let re=Q.map(function(se){return se._offset}),ne=Q.map(function(se){return se._offset+se._length});return[Math.min(...re),Math.max(...ne)]}let P=F(O,!1),j=F(D,!0);return{x:P[0],y:j[0],width:P[1]-P[0],height:j[1]-j[0]}}function h(I,O,D,B,F,P){var j=10,U=10,$=D.xsizemode==="pixel",Q=D.ysizemode==="pixel",re=D.type==="line",ne=D.type==="path",se=P.modifyItem,V,Z,K,H,X,q,W,ee,ae,he,xe,we,Me,Se,Ie,Ge=p.select(O.node().parentNode),qe=k.getFromId(I,D.xref),ke=k.getRefType(D.xref),_e=k.getFromId(I,D.yref),ue=k.getRefType(D.yref),ve=D.x0shift,le=D.x1shift,Ae=D.y0shift,Be=D.y1shift,Xe=function(Je,et){var Mt=v.getDataToPixel(I,qe,et,!1,ke);return Mt(Je)},Ye=function(Je,et){var Mt=v.getDataToPixel(I,_e,et,!0,ue);return Mt(Je)},yt=v.getPixelToData(I,qe,!1,ke),gt=v.getPixelToData(I,_e,!0,ue),Tt=rr(),At={element:Tt.node(),gd:I,prepFn:or,doneFn:Ot,clickFn:vt},$t;s.init(At),Tt.node().onmousemove=Xt;function rr(){return re?_r():O}function _r(){var Je=10,et=Math.max(D.line.width,Je),Mt=F.append("g").attr("data-index",B).attr("drag-helper",!0);Mt.append("path").attr("d",O.attr("d")).style({cursor:"move","stroke-width":et,"stroke-opacity":"0"});var pt={"fill-opacity":"0"},Pt=Math.max(et/2,Je);return Mt.append("circle").attr({"data-line-point":"start-point",cx:$?Xe(D.xanchor)+D.x0:Xe(D.x0,ve),cy:Q?Ye(D.yanchor)-D.y0:Ye(D.y0,Ae),r:Pt}).style(pt).classed("cursor-grab",!0),Mt.append("circle").attr({"data-line-point":"end-point",cx:$?Xe(D.xanchor)+D.x1:Xe(D.x1,le),cy:Q?Ye(D.yanchor)-D.y1:Ye(D.y1,Be),r:Pt}).style(pt).classed("cursor-grab",!0),Mt}function Xt(Je){if(T(I)){$t=null;return}if(re)Je.target.tagName==="path"?$t="move":$t=Je.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var et=At.element.getBoundingClientRect(),Mt=et.right-et.left,pt=et.bottom-et.top,Pt=Je.clientX-et.left,Ct=Je.clientY-et.top,qt=!ne&&Mt>j&&pt>U&&!Je.shiftKey?s.getCursor(Pt/Mt,1-Ct/pt):"move";g(O,qt),$t=qt.split("-")[0]}}function or(Je){T(I)||($&&(X=Xe(D.xanchor)),Q&&(q=Ye(D.yanchor)),D.type==="path"?Ie=D.path:(V=$?D.x0:Xe(D.x0),Z=Q?D.y0:Ye(D.y0),K=$?D.x1:Xe(D.x1),H=Q?D.y1:Ye(D.y1)),VH?(W=Z,xe="y0",ee=H,we="y1"):(W=H,xe="y1",ee=Z,we="y0"),Xt(Je),Ne(F,D),Ke(O,D,I),At.moveFn=$t==="move"?ht:De,At.altKey=Je.altKey)}function Ot(){T(I)||(g(O),We(F),_(O,I,D),b.call("_guiRelayout",I,P.getUpdateObj()))}function vt(){T(I)||We(F)}function ht(Je,et){if(D.type==="path"){var Mt=function(Ct){return Ct},pt=Mt,Pt=Mt;$?se("xanchor",D.xanchor=yt(X+Je)):(pt=function(qt){return yt(Xe(qt)+Je)},qe&&qe.type==="date"&&(pt=v.encodeDate(pt))),Q?se("yanchor",D.yanchor=gt(q+et)):(Pt=function(qt){return gt(Ye(qt)+et)},_e&&_e.type==="date"&&(Pt=v.encodeDate(Pt))),se("path",D.path=u(Ie,pt,Pt))}else $?se("xanchor",D.xanchor=yt(X+Je)):(se("x0",D.x0=yt(V+Je)),se("x1",D.x1=yt(K+Je))),Q?se("yanchor",D.yanchor=gt(q+et)):(se("y0",D.y0=gt(Z+et)),se("y1",D.y1=gt(H+et)));O.attr("d",m(I,D)),Ne(F,D),t(I,B,D,Ge)}function De(Je,et){if(ne){var Mt=function(Zr){return Zr},pt=Mt,Pt=Mt;$?se("xanchor",D.xanchor=yt(X+Je)):(pt=function(ha){return yt(Xe(ha)+Je)},qe&&qe.type==="date"&&(pt=v.encodeDate(pt))),Q?se("yanchor",D.yanchor=gt(q+et)):(Pt=function(ha){return gt(Ye(ha)+et)},_e&&_e.type==="date"&&(Pt=v.encodeDate(Pt))),se("path",D.path=u(Ie,pt,Pt))}else if(re){if($t==="resize-over-start-point"){var Ct=V+Je,qt=Q?Z-et:Z+et;se("x0",D.x0=$?Ct:yt(Ct)),se("y0",D.y0=Q?qt:gt(qt))}else if($t==="resize-over-end-point"){var Vt=K+Je,Ht=Q?H-et:H+et;se("x1",D.x1=$?Vt:yt(Vt)),se("y1",D.y1=Q?Ht:gt(Ht))}}else{var Sr=function(Zr){return $t.indexOf(Zr)!==-1},Kr=Sr("n"),Yt=Sr("s"),Rt=Sr("w"),nr=Sr("e"),ur=Kr?W+et:W,cr=Yt?ee+et:ee,Rr=Rt?ae+Je:ae,Qr=nr?he+Je:he;Q&&(Kr&&(ur=W-et),Yt&&(cr=ee-et)),(!Q&&cr-ur>U||Q&&ur-cr>U)&&(se(xe,D[xe]=Q?ur:gt(ur)),se(we,D[we]=Q?cr:gt(cr))),Qr-Rr>j&&(se(Me,D[Me]=$?Rr:yt(Rr)),se(Se,D[Se]=$?Qr:yt(Qr)))}O.attr("d",m(I,D)),Ne(F,D),t(I,B,D,Ge)}function Ne(Je,et){($||Q)&&Mt();function Mt(){var pt=et.type!=="path",Pt=Je.selectAll(".visual-cue").data([0]),Ct=1;Pt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ct}).classed("visual-cue",!0);var qt=Xe($?et.xanchor:E.midRange(pt?[et.x0,et.x1]:v.extractPathCoords(et.path,f.paramIsX))),Vt=Ye(Q?et.yanchor:E.midRange(pt?[et.y0,et.y1]:v.extractPathCoords(et.path,f.paramIsY)));if(qt=v.roundPositionForSharpStrokeRendering(qt,Ct),Vt=v.roundPositionForSharpStrokeRendering(Vt,Ct),$&&Q){var Ht="M"+(qt-1-Ct)+","+(Vt-1-Ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Pt.attr("d",Ht)}else if($){var Sr="M"+(qt-1-Ct)+","+(Vt-9-Ct)+"v18 h2 v-18 Z";Pt.attr("d",Sr)}else{var Kr="M"+(qt-9-Ct)+","+(Vt-1-Ct)+"h18 v2 h-18 Z";Pt.attr("d",Kr)}}}function We(Je){Je.selectAll(".visual-cue").remove()}function Ke(Je,et,Mt){var pt=et.xref,Pt=et.yref,Ct=k.getFromId(Mt,pt),qt=k.getFromId(Mt,Pt),Vt="";pt!=="paper"&&!Ct.autorange&&(Vt+=pt),Pt!=="paper"&&!qt.autorange&&(Vt+=Pt),a.setClipUrl(Je,Vt?"clip"+Mt._fullLayout._uid+Vt:null,Mt)}}function u(I,O,D){return I.replace(f.segmentRE,function(B){var F=0,P=B.charAt(0),j=f.paramIsX[P],U=f.paramIsY[P],$=f.numParams[P],Q=B.slice(1).replace(f.paramRE,function(re){return F>=$||(j[F]?re=O(re):U[F]&&(re=D(re)),F++),re});return P+Q})}function A(I,O){if(S(I)){var D=O.node(),B=+D.getAttribute("data-index");if(B>=0){if(B===I._fullLayout._activeShapeIndex){x(I);return}I._fullLayout._activeShapeIndex=B,I._fullLayout._deactivateShape=x,i(I)}}}function x(I){if(S(I)){var O=I._fullLayout._activeShapeIndex;O>=0&&(n(I),delete I._fullLayout._activeShapeIndex,i(I))}}function z(I){if(S(I)){n(I);var O=I._fullLayout._activeShapeIndex,D=(I.layout||{}).shapes||[];if(O{let o=E(e),s=t.append("div").classed("plotly-cloud-dialog-box",!0);if(s.append("div").classed("plotly-cloud-dialog-title",!0).text(o.DIALOG_TITLE),n===b.plotlyServerURL){let g=s.append("div").classed("plotly-cloud-dialog-message",!0),f=new URL(n).origin,v=o.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),m=v[0],i=v[2],T=v[4];g.append("span").text(m),g.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",f).attr("target","_blank").text(i),g.append("span").text(T),g.append("div").classed("plotly-cloud-dialog-message--account",!0).text(o.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let g=new URL(n),f=g.hostname,v=g.origin,m=o.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),i=m[0],T=m[4],S=s.append("div").classed("plotly-cloud-dialog-message",!0);S.append("span").text(i),S.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",v).attr("target","_blank").text(f),S.append("span").text(T)}let c=s.append("div").classed("plotly-cloud-dialog-buttons",!0);c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(o.DIALOG_CANCEL).on("click",a),c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(o.DIALOG_CONFIRM).on("click",r)},l=(e,t,n)=>{let r=p.select(e._fullLayout._paperdiv.node());r.selectAll(".plotly-cloud-dialog").remove();let a=r.append("div").classed("plotly-cloud-dialog",!0),o=()=>{a.remove(),document.removeEventListener("keydown",s)},s=c=>{(c.key==="Escape"||c.keyCode===27)&&o()};document.addEventListener("keydown",s),a.on("click",()=>{p.event.target===a.node()&&o()}),k(e,a,t,()=>{o(),n()},o)};G.exports=l}}),c5=ze({"src/components/modebar/buttons.js"(J,G){"use strict";var p=mi(),b=cl(),E=Xl(),k=Ix(),l=Ox().eraseActiveShape,e=rD(),t=Nr(),n=t._,r=G.exports={};r.toImage={name:"toImage",title:function(_){var w=_._context.toImageButtonOptions||{},h=w.format||"png";return h==="png"?n(_,"Download plot as a PNG"):n(_,"Download plot")},icon:k.camera,click:function(_){var w=_._context.toImageButtonOptions,h={format:w.format||"png"};t.notifier(n(_,"Preparing image - this may take a few seconds"),"long",_),["filename","width","height","scale"].forEach(function(u){u in w&&(h[u]=w[u])}),p.call("downloadImage",_,h).then(function(u){t.notifier(n(_,"Image download succeeded")+" - "+u,"long",_)}).catch(function(){t.notifier(n(_,"Sorry, there was a problem downloading your image!"),"long",_)})}},r.downloadJson={name:"downloadJson",title:function(_){return n(_,"Download plot as JSON")},icon:k.curlybraces,click:function(_){p.call("downloadImage",_,{format:"full-json"}).then(function(w){t.notifier(n(_,"JSON download succeeded")+" - "+w,"long",_)}).catch(function(){t.notifier(n(_,"Sorry, there was a problem downloading your JSON file!"),"long",_)})}},r.sendChartToCloud={name:"sendChartToCloud",title:function(_){return n(_,"Share chart...")},icon:k.cloudupload,click:function(_){var w=(window.PLOTLYENV||{}).BASE_URL||_._context.plotlyServerURL;if(!w){console.error("No destination URL provided (plotlyServerURL is empty)");return}var h;try{h=new URL(w)}catch{console.error("Invalid plotlyServerURL: "+w);return}let u=["http:","https:"];if(!u.includes(h.protocol)){console.error(`Invalid protocol '${h.protocol}' in plotlyServerURL '${w}'. Must be one of: ${u.join(", ")}`);return}e(_,w,function(){b.sendDataToCloud(_,w)})}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(_){return n(_,"Zoom")},attr:"dragmode",val:"zoom",icon:k.zoombox,click:a},r.pan2d={name:"pan2d",_cat:"pan",title:function(_){return n(_,"Pan")},attr:"dragmode",val:"pan",icon:k.pan,click:a},r.select2d={name:"select2d",_cat:"select",title:function(_){return n(_,"Box Select")},attr:"dragmode",val:"select",icon:k.selectbox,click:a},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(_){return n(_,"Lasso Select")},attr:"dragmode",val:"lasso",icon:k.lasso,click:a},r.drawclosedpath={name:"drawclosedpath",title:function(_){return n(_,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:k.drawclosedpath,click:a},r.drawopenpath={name:"drawopenpath",title:function(_){return n(_,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:k.drawopenpath,click:a},r.drawline={name:"drawline",title:function(_){return n(_,"Draw line")},attr:"dragmode",val:"drawline",icon:k.drawline,click:a},r.drawrect={name:"drawrect",title:function(_){return n(_,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:k.drawrect,click:a},r.drawcircle={name:"drawcircle",title:function(_){return n(_,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:k.drawcircle,click:a},r.eraseshape={name:"eraseshape",title:function(_){return n(_,"Erase active shape")},icon:k.eraseshape,click:l},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(_){return n(_,"Zoom in")},attr:"zoom",val:"in",icon:k.zoom_plus,click:a},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(_){return n(_,"Zoom out")},attr:"zoom",val:"out",icon:k.zoom_minus,click:a},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(_){return n(_,"Autoscale")},attr:"zoom",val:"auto",icon:k.autoscale,click:a},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(_){return n(_,"Reset axes")},attr:"zoom",val:"reset",icon:k.home,click:a},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(_){return n(_,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:k.tooltip_basic,gravity:"ne",click:a},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(_){return n(_,"Compare data on hover")},attr:"hovermode",val:function(_){return _._fullLayout._isHoriz?"y":"x"},icon:k.tooltip_compare,gravity:"ne",click:a};function a(_,w){var h=w.currentTarget,u=h.getAttribute("data-attr"),A=h.getAttribute("data-val")||!0,x=_._fullLayout,z={},I=E.list(_,null,!0),O=x._cartesianSpikesEnabled,D,B;if(u==="zoom"){var F=A==="in"?.5:2,P=(1+F)/2,j=(1-F)/2,U,$;for(B=0;B-K),[$,Q]=F.invert(B.midPt),{minscale:re}=D.projection,ne=(h=D.projection.maxscale)!=null?h:1/0,se=Math.min(re,ne),V=Math.max(re,ne),Z=x==="in"?f*P:1/f*P;Z>V?Z=V:Zd5});var jx,h5,d5,p5=zi({"src/components/modebar/attributes.ts"(){"use strict";jx=Yl(f5()),h5={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.",`This may include *${jx.default.backButtons.join("*, *")}*.`].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.",`This may include *${jx.default.foreButtons.join("*, *")}*.`].join(" ")}},d5=h5}}),aD=ze({"src/components/modebar/defaults.js"(J,G){"use strict";var p=Nr(),b=Qn(),E=hs(),k=(p5(),Po(Nx)).default;G.exports=function(e,t){var n=e.modebar||{},r=E.newContainer(t,"modebar");function a(s,c){return p.coerce(n,r,k,s,c)}a("orientation"),a("bgcolor",b.addOpacity(t.paper_bgcolor,.5));var o=b.contrast(b.rgb(t.modebar.bgcolor));a("color",b.addOpacity(o,.3)),a("activecolor",b.addOpacity(o,.7)),a("uirevision",t.uirevision),a("add"),a("remove")}}}),nD=ze({"src/components/modebar/modebar.js"(J,G){"use strict";var p=ci(),b=ao(),E=Nr(),k=Ix(),l=ev().version,e=new DOMParser;function t(o){this.container=o.container,this.element=document.createElement("div"),this.update(o.graphInfo,o.buttons),this.container.appendChild(this.element)}var n=t.prototype;n.update=function(o,s){this.graphInfo=o;var c=this.graphInfo._context,g=this.graphInfo._fullLayout,f="modebar-"+g._uid;this.element.setAttribute("id",f),this.element.setAttribute("role","toolbar"),this._uid=f,this.element.className="modebar modebar--custom",c.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),g.modebar.orientation==="v"&&(this.element.className+=" vertical",s=s.reverse());var v=g.modebar,m="#"+f+" .modebar-group";document.querySelectorAll(m).forEach(function(C){C.style.backgroundColor=v.bgcolor});var i=!this.hasButtons(s),T=this.hasLogo!==c.displaylogo,S=this.locale!==c.locale;if(this.locale=c.locale,(i||T||S)&&(this.removeAllButtons(),this.updateButtons(s),c.watermark||c.displaylogo)){var M=this.getLogo();c.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(),E.setStyleOnHover("#"+f+" .modebar-btn",".active",".icon path","fill: "+v.activecolor,"fill: "+v.color,this.element)},n.updateButtons=function(o){var s=this;this.buttons=o,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(c){var g=s.createGroup();c.forEach(function(f){var v=f.name;if(!v)throw new Error("must provide button 'name' in button config");if(s.buttonsNames.indexOf(v)!==-1)throw new Error("button name '"+v+"' is taken");s.buttonsNames.push(v);var m=s.createButton(f);s.buttonElements.push(m),g.appendChild(m)}),s.element.appendChild(g)})},n.createGroup=function(){var o=document.createElement("div");o.className="modebar-group";var s=this.graphInfo._fullLayout.modebar;return o.style.backgroundColor=s.bgcolor,o},n.createButton=function(o){var s=this,c=document.createElement("button");c.setAttribute("type","button"),c.setAttribute("rel","tooltip"),c.className="modebar-btn";var g=o.title;g===void 0?g=o.name:typeof g=="function"&&(g=g(this.graphInfo)),(g||g===0)&&(c.setAttribute("data-title",g),c.setAttribute("aria-label",g)),o.attr!==void 0&&c.setAttribute("data-attr",o.attr);var f=o.val;f!==void 0&&(typeof f=="function"&&(f=f(this.graphInfo)),c.setAttribute("data-val",f));var v=o.click;if(typeof v!="function")throw new Error("must provide button 'click' function in button config");c.addEventListener("click",function(i){o.click(s.graphInfo,i),s.updateActiveButton(i.currentTarget)}),c.setAttribute("data-toggle",o.toggle||!1),o.toggle&&p.select(c).classed("active",!0);var m=o.icon;return typeof m=="function"?c.appendChild(m()):c.appendChild(this.createIcon(m||k.question)),c.setAttribute("data-gravity",o.gravity||"n"),c},n.createIcon=function(o){var s=b(o.height)?Number(o.height):o.ascent-o.descent,c="http://www.w3.org/2000/svg",g;if(o.path){g=document.createElementNS(c,"svg"),g.setAttribute("viewBox",[0,0,o.width,s].join(" ")),g.setAttribute("class","icon");var f=document.createElementNS(c,"path");f.setAttribute("d",o.path),o.transform?f.setAttribute("transform",o.transform):o.ascent!==void 0&&f.setAttribute("transform","matrix(1 0 0 -1 0 "+o.ascent+")"),g.appendChild(f)}if(o.svg){var v=e.parseFromString(o.svg,"application/xml");g=v.childNodes[0]}return g.setAttribute("height","1em"),g.setAttribute("width","1em"),g},n.updateActiveButton=function(o){var s=this.graphInfo._fullLayout,c=o!==void 0?o.getAttribute("data-attr"):null;this.buttonElements.forEach(function(g){var f=g.getAttribute("data-val")||!0,v=g.getAttribute("data-attr"),m=g.getAttribute("data-toggle")==="true",i=p.select(g),T=function(C,_){var w=s.modebar,h=C.querySelector(".icon path");h&&(_||C.matches(":hover")?h.style.fill=w.activecolor:h.style.fill=w.color)};if(m){if(v===c){var S=!i.classed("active");i.classed("active",S),T(g,S)}}else{var M=v===null?v:E.nestedProperty(s,v).get();i.classed("active",M===f),T(g,M===f)}})},n.hasButtons=function(o){var s=this.buttons;if(!s||o.length!==s.length)return!1;for(var c=0;c1?(re=["toggleHover"],ne=["resetViews"]):u?(Q=["zoomInGeo","zoomOutGeo"],re=["hoverClosestGeo"],ne=["resetGeo"]):h?(re=["hoverClosest3d"],ne=["resetCameraDefault3d","resetCameraLastSave3d"]):I?(Q=["zoomInMap","zoomOutMap"],re=["toggleHover"],ne=["resetViewMap"]):A?re=["hoverClosestPie"]:B?(re=["hoverClosestCartesian","hoverCompareCartesian"],ne=["resetViewSankey"]):re=["toggleHover"],w&&re.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(m)||P)&&(re=[]),w&&!F&&(Q=["zoomIn2d","zoomOut2d","autoScale2d"],ne[0]!=="resetViews"&&(ne=["resetScale2d"])),h?se=["zoom3d","pan3d","orbitRotation","tableRotation"]:w&&!F||z?se=["zoom2d","pan2d"]:I||u?se=["pan2d"]:O&&(se=["zoom2d"]),o(m)&&se.push("select2d","lasso2d");var V=[],Z=function(W){V.indexOf(W)===-1&&re.indexOf(W)!==-1&&V.push(W)};if(Array.isArray(C)){for(var K=[],H=0;HS?m.slice(S):i.slice(T))+M}function c(f,v){for(var m=v._size,i=m.h/m.w,T={},S=Object.keys(f),M=0;Me*z&&!B)){for(S=0;SV&&aene&&(ne=ae);var xe=(ne-re)/(2*se);u/=xe,re=_.l2r(re),ne=_.l2r(ne),_.range=_._input.range=U<$?[re,ne]:[ne,re]}g(_,u)}}}},J.getAxisGroup=function(v,m){for(var i=v._axisMatchGroups,T=0;T=F[1]||$[1]<=F[0])&&Q[0]P[0])return!0}return!1}function M(F){var P=F._fullLayout,j=P._size,U=j.p,$=a.list(F,"",!0),Q,re,ne,se,V,Z;if(P._paperdiv.style({width:F._context.responsive&&P.autosize&&!F._context._hasZeroWidth&&!F.layout.width?"100%":P.width+"px",height:F._context.responsive&&P.autosize&&!F._context._hasZeroHeight&&!F.layout.height?"100%":P.height+"px"}).selectAll(".main-svg").call(t.setSize,P.width,P.height),F._context.setBackground(F,P.paper_bgcolor),J.drawMainTitle(F),r.manage(F),!P._has("cartesian"))return b.previousPromises(F);function K(De,Ne,We){var Ke=De._lw/2;if(De._id.charAt(0)==="x"){if(Ne){if(We==="top")return Ne._offset-U-Ke}else return j.t+j.h*(1-(De.position||0))+Ke%1;return Ne._offset+Ne._length+U+Ke}if(Ne){if(We==="right")return Ne._offset+Ne._length+U+Ke}else return j.l+j.w*(De.position||0)+Ke%1;return Ne._offset-U-Ke}for(Q=0;Q<$.length;Q++){se=$[Q];var H=se._anchorAxis;se._linepositions={},se._lw=t.crispRound(F,se.linewidth,1),se._mainLinePosition=K(se,H,se.side),se._mainMirrorPosition=se.mirror&&H?K(se,H,o.OPPOSITE_SIDE[se.side]):null}var X=[],q=[],W=[],ee=e.opacity(P.paper_bgcolor)===1&&e.opacity(P.plot_bgcolor)===1&&P.paper_bgcolor===P.plot_bgcolor;for(re in P._plots)if(ne=P._plots[re],ne.mainplot)ne.bg&&ne.bg.remove(),ne.bg=void 0;else{var ae=ne.xaxis.domain,he=ne.yaxis.domain,xe=ne.plotgroup;if(S(ae,he,W)&&re.indexOf(T)===-1){var we=xe.node(),Me=ne.bg=E.ensureSingle(xe,"rect","bg");we.insertBefore(Me.node(),we.childNodes[0]),q.push(re)}else xe.select("rect.bg").remove(),W.push([ae,he]),ee||(X.push(re),q.push(re))}var Se=P._bgLayer.selectAll(".bg").data(X);for(Se.enter().append("rect").classed("bg",!0),Se.exit().remove(),Se.each(function(De){P._plots[De].bg=G.select(this)}),Q=0;Q0){x(F,Q,V,se),ne.attr({x:re,y:Q,"text-anchor":U,dy:O(P.yanchor)}).call(k.positionText,re,Q);var Z=(P.text.match(k.BR_TAG_ALL)||[]).length;if(Z){var K=o.LINE_SPACING*Z+o.MID_SHIFT;P.y===0&&(K=-K),ne.selectAll(".line").each(function(){var ee=+this.getAttribute("dy").slice(0,-2)-K+"em";this.setAttribute("dy",ee)})}var H=G.select(F).selectAll(".gtitle-subtitle");if(H.node()){var X=ne.node().getBBox(),q=X.y+X.height,W=q+n.SUBTITLE_PADDING_EM*P.subtitle.font.size;H.attr({x:re,y:W,"text-anchor":U,dy:O(P.yanchor)}).call(k.positionText,re,W)}}}};function h(F,P,j,U,$){var Q=P.yref==="paper"?F._fullLayout._size.h:F._fullLayout.height,re=E.isTopAnchor(P)?U:U-$,ne=j==="b"?Q-re:re;return E.isTopAnchor(P)&&j==="t"||E.isBottomAnchor(P)&&j==="b"?!1:ne<$}function u(F,P,j,U,$){var Q=0;return j==="middle"&&(Q+=$/2),F==="t"?(j==="top"&&(Q+=$),Q+=U-P*U):(j==="bottom"&&(Q+=$),Q+=P*U),Q}function A(F,P,j){var U=P.y,$=P.yanchor,Q=U>.5?"t":"b",re=F._fullLayout.margin[Q],ne=0;return P.yref==="paper"?ne=j+P.pad.t+P.pad.b:P.yref==="container"&&(ne=u(Q,U,$,F._fullLayout.height,j)+P.pad.t+P.pad.b),ne>re?ne:0}function x(F,P,j,U){var $="title.automargin",Q=F._fullLayout.title,re=Q.y>.5?"t":"b",ne={x:Q.x,y:Q.y,t:0,b:0},se={};Q.yref==="paper"&&h(F,Q,re,P,U)?ne[re]=j:Q.yref==="container"&&(se[re]=j,F._fullLayout._reservedMargin[$]=se),b.allowAutoMargin(F,$),b.autoMargin(F,$,ne)}function z(F,P){var j=F.title,U=F._size,$=0;switch(P===v?$=j.pad.l:P===i&&($=-j.pad.r),j.xref){case"paper":return U.l+U.w*j.x+$;case"container":default:return F.width*j.x+$}}function I(F,P){var j=F.title,U=F._size,$=0;if(P==="0em"||!P?$=-j.pad.b:P===o.CAP_SHIFT+"em"&&($=j.pad.t),j.y==="auto")return U.t/2;switch(j.yref){case"paper":return U.t+U.h-U.h*j.y+$;case"container":default:return F.height-F.height*j.y+$}}function O(F){return F==="top"?o.CAP_SHIFT+.3+"em":F==="bottom"?"-0.3em":o.MID_SHIFT+"em"}function D(F){var P=F.title,j=m;return E.isRightAnchor(P)?j=i:E.isLeftAnchor(P)&&(j=v),j}function B(F){var P=F.title,j="0em";return E.isTopAnchor(P)?j=o.CAP_SHIFT+"em":E.isMiddleAnchor(P)&&(j=o.MID_SHIFT+"em"),j}J.doTraceStyle=function(F){var P=F.calcdata,j=[],U;for(U=0;U=0;D--){var B=C.append("path").attr(w).style("opacity",D?.1:h).call(k.stroke,A).call(k.fill,u).call(l.dashLine,D?"solid":z,D?4+x:x);if(s(B,v,T),I){var F=e(v.layout,"selections",T);B.style({cursor:"move"});var P={element:B.node(),plotinfo:S,gd:v,editHelpers:F,isActiveSelection:!0},j=p(_,v);b(j,B,P)}else B.style("pointer-events",D?"all":"none");O[D]=B}var U=O[0],$=O[1];$.node().addEventListener("click",function(){return c(v,U)})}}function s(v,m,i){var T=i.xref+i.yref;l.setClipUrl(v,"clip"+m._fullLayout._uid+T,m)}function c(v,m){if(a(v)){var i=m.node(),T=+i.getAttribute("data-index");if(T>=0){if(T===v._fullLayout._activeSelectionIndex){f(v);return}v._fullLayout._activeSelectionIndex=T,v._fullLayout._deactivateSelection=f,r(v)}}}function g(v){if(a(v)){var m=v._fullLayout.selections.length-1;v._fullLayout._activeSelectionIndex=m,v._fullLayout._deactivateSelection=f,r(v)}}function f(v){if(a(v)){var m=v._fullLayout._activeSelectionIndex;m>=0&&(E(v),delete v._fullLayout._activeSelectionIndex,r(v))}}}}),oD=ze({"node_modules/polybooljs/lib/build-log.js"(J,G){function p(){var b,E=0,k=!1;function l(e,t){return b.list.push({type:e,data:t?JSON.parse(JSON.stringify(t)):void 0}),b}return b={list:[],segmentId:function(){return E++},checkIntersection:function(e,t){return l("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return l("div_seg",{seg:e,pt:t}),l("chop",{seg:e,pt:t})},statusRemove:function(e){return l("pop_seg",{seg:e})},segmentUpdate:function(e){return l("seg_update",{seg:e})},segmentNew:function(e,t){return l("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return l("rem_seg",{seg:e})},tempStatus:function(e,t,n){return l("temp_status",{seg:e,above:t,below:n})},rewind:function(e){return l("rewind",{seg:e})},status:function(e,t,n){return l("status",{seg:e,above:t,below:n})},vert:function(e){return e===k?b:(k=e,l("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),l("log",{txt:e})},reset:function(){return l("reset")},selected:function(e){return l("selected",{segs:e})},chainStart:function(e){return l("chain_start",{seg:e})},chainRemoveHead:function(e,t){return l("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return l("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return l("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return l("chain_match",{index:e})},chainClose:function(e){return l("chain_close",{index:e})},chainAddHead:function(e,t){return l("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return l("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return l("chain_con",{index1:e,index2:t})},chainReverse:function(e){return l("chain_rev",{index:e})},chainJoin:function(e,t){return l("chain_join",{index1:e,index2:t})},done:function(){return l("done")}},b}G.exports=p}}),sD=ze({"node_modules/polybooljs/lib/epsilon.js"(J,G){function p(b){typeof b!="number"&&(b=1e-10);var E={epsilon:function(k){return typeof k=="number"&&(b=k),b},pointAboveOrOnLine:function(k,l,e){var t=l[0],n=l[1],r=e[0],a=e[1],o=k[0],s=k[1];return(r-t)*(s-n)-(a-n)*(o-t)>=-b},pointBetween:function(k,l,e){var t=k[1]-l[1],n=e[0]-l[0],r=k[0]-l[0],a=e[1]-l[1],o=r*n+t*a;if(o-b)},pointsSameX:function(k,l){return Math.abs(k[0]-l[0])b!=r-t>b&&(n-s)*(t-c)/(r-c)+s-e>b&&(a=!a),n=s,r=c}return a}};return E}G.exports=p}}),lD=ze({"node_modules/polybooljs/lib/linked-list.js"(J,G){var p={create:function(){var b={root:{root:!0,next:null},exists:function(E){return!(E===null||E===b.root)},isEmpty:function(){return b.root.next===null},getHead:function(){return b.root.next},insertBefore:function(E,k){for(var l=b.root,e=b.root.next;e!==null;){if(k(e)){E.prev=e.prev,E.next=e,e.prev.next=E,e.prev=E;return}l=e,e=e.next}l.next=E,E.prev=l,E.next=null},findTransition:function(E){for(var k=b.root,l=b.root.next;l!==null&&!E(l);)k=l,l=l.next;return{before:k===b.root?null:k,after:l,insert:function(e){return e.prev=k,e.next=l,k.next=e,l!==null&&(l.prev=e),e}}}};return b},node:function(b){return b.prev=null,b.next=null,b.remove=function(){b.prev.next=b.next,b.next&&(b.next.prev=b.prev),b.prev=null,b.next=null},b}};G.exports=p}}),uD=ze({"node_modules/polybooljs/lib/intersecter.js"(J,G){var p=lD();function b(E,k,l){function e(m,i){return{id:l?l.segmentId():-1,start:m,end:i,myFill:{above:null,below:null},otherFill:null}}function t(m,i,T){return{id:l?l.segmentId():-1,start:m,end:i,myFill:{above:T.myFill.above,below:T.myFill.below},otherFill:null}}var n=p.create();function r(m,i,T,S,M,C){var _=k.pointsCompare(i,M);return _!==0?_:k.pointsSame(T,C)?0:m!==S?m?1:-1:k.pointAboveOrOnLine(T,S?M:C,S?C:M)?1:-1}function a(m,i){n.insertBefore(m,function(T){var S=r(m.isStart,m.pt,i,T.isStart,T.pt,T.other.pt);return S<0})}function o(m,i){var T=p.node({isStart:!0,pt:m.start,seg:m,primary:i,other:null,status:null});return a(T,m.end),T}function s(m,i,T){var S=p.node({isStart:!1,pt:i.end,seg:i,primary:T,other:m,status:null});m.other=S,a(S,m.pt)}function c(m,i){var T=o(m,i);return s(T,m,i),T}function g(m,i){l&&l.segmentChop(m.seg,i),m.other.remove(),m.seg.end=i,m.other.pt=i,a(m.other,m.pt)}function f(m,i){var T=t(i,m.seg.end,m.seg);return g(m,i),c(T,m.primary)}function v(m,i){var T=p.create();function S(F,P){var j=F.seg.start,U=F.seg.end,$=P.seg.start,Q=P.seg.end;return k.pointsCollinear(j,$,Q)?k.pointsCollinear(U,$,Q)||k.pointAboveOrOnLine(U,$,Q)?1:-1:k.pointAboveOrOnLine(j,$,Q)?1:-1}function M(F){return T.findTransition(function(P){var j=S(F,P.ev);return j>0})}function C(F,P){var j=F.seg,U=P.seg,$=j.start,Q=j.end,re=U.start,ne=U.end;l&&l.checkIntersection(j,U);var se=k.linesIntersect($,Q,re,ne);if(se===!1){if(!k.pointsCollinear($,Q,re)||k.pointsSame($,ne)||k.pointsSame(Q,re))return!1;var V=k.pointsSame($,re),Z=k.pointsSame(Q,ne);if(V&&Z)return P;var K=!V&&k.pointBetween($,re,ne),H=!Z&&k.pointBetween(Q,re,ne);if(V)return H?f(P,Q):f(F,ne),P;K&&(Z||(H?f(P,Q):f(F,ne)),f(P,$))}else se.alongA===0&&(se.alongB===-1?f(F,re):se.alongB===0?f(F,se.pt):se.alongB===1&&f(F,ne)),se.alongB===0&&(se.alongA===-1?f(P,$):se.alongA===0?f(P,se.pt):se.alongA===1&&f(P,Q));return!1}for(var _=[];!n.isEmpty();){var w=n.getHead();if(l&&l.vert(w.pt[0]),w.isStart){let F=function(){if(A){var P=C(w,A);if(P)return P}return x?C(w,x):!1};var h=F;l&&l.segmentNew(w.seg,w.primary);var u=M(w),A=u.before?u.before.ev:null,x=u.after?u.after.ev:null;l&&l.tempStatus(w.seg,A?A.seg:!1,x?x.seg:!1);var z=F();if(z){if(E){var I;w.seg.myFill.below===null?I=!0:I=w.seg.myFill.above!==w.seg.myFill.below,I&&(z.seg.myFill.above=!z.seg.myFill.above)}else z.seg.otherFill=w.seg.myFill;l&&l.segmentUpdate(z.seg),w.other.remove(),w.remove()}if(n.getHead()!==w){l&&l.rewind(w.seg);continue}if(E){var I;w.seg.myFill.below===null?I=!0:I=w.seg.myFill.above!==w.seg.myFill.below,x?w.seg.myFill.below=x.seg.myFill.above:w.seg.myFill.below=m,I?w.seg.myFill.above=!w.seg.myFill.below:w.seg.myFill.above=w.seg.myFill.below}else if(w.seg.otherFill===null){var O;x?w.primary===x.primary?O=x.seg.otherFill.above:O=x.seg.myFill.above:O=w.primary?i:m,w.seg.otherFill={above:O,below:O}}l&&l.status(w.seg,A?A.seg:!1,x?x.seg:!1),w.other.status=u.insert(p.node({ev:w}))}else{var D=w.status;if(D===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(T.exists(D.prev)&&T.exists(D.next)&&C(D.prev.ev,D.next.ev),l&&l.statusRemove(D.ev.seg),D.remove(),!w.primary){var B=w.seg.myFill;w.seg.myFill=w.seg.otherFill,w.seg.otherFill=B}_.push(w.seg)}n.getHead().remove()}return l&&l.done(),_}return E?{addRegion:function(m){for(var i,T=m[m.length-1],S=0;St!=f>t&&e<(g-s)*(t-c)/(f-c)+s;v&&(n=!n)}return n}}}),pg=ze({"src/lib/polygon.js"(J,G){"use strict";var p=Mx().dot,b=No().BADNUM,E=G.exports={};E.tester=function(l){var e=l.slice(),t=e[0][0],n=t,r=e[0][1],a=r,o;for((e[e.length-1][0]!==e[0][0]||e[e.length-1][1]!==e[0][1])&&e.push(e[0]),o=1;on||M===b||Ma||T&&c(i))}function f(i,T){var S=i[0],M=i[1];if(S===b||Sn||M===b||Ma)return!1;var C=e.length,_=e[0][0],w=e[0][1],h=0,u,A,x,z,I;for(u=1;uMath.max(A,_)||M>Math.max(x,w)))if(Mo||Math.abs(p(f,c))>n)return!0;return!1},E.filter=function(l,e){var t=[l[0]],n=0,r=0;function a(s){l.push(s);var c=t.length,g=n;t.splice(r+1);for(var f=g+1;f1){var o=l.pop();a(o)}return{addPt:a,raw:l,filtered:t}}}}),vD=ze({"src/components/selections/constants.js"(J,G){"use strict";G.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),mD=ze({"src/components/selections/select.js"(J,G){"use strict";var p=dD(),b=pD(),E=mi(),k=Xi().dashStyle,l=Qn(),e=Zl(),t=kh().makeEventData,n=Fd(),r=n.freeMode,a=n.rectMode,o=n.drawMode,s=n.openMode,c=n.selectMode,g=cv(),f=hg(),v=Bx(),m=iv().clearOutline,i=uv(),T=i.handleEllipse,S=i.readPaths,M=zx().newShapes,C=l5(),_=g5().activateLastSelection,w=Nr(),h=w.sorterAsc,u=pg(),A=Cx(),x=Xl().getFromId,z=fg(),I=dg().redrawReglTraces,O=vD(),D=O.MINSELECT,B=u.filter,F=u.tester,P=Fx(),j=P.p2r,U=P.axValue,$=P.getTransform;function Q(vt){return vt.subplot!==void 0}function re(vt,ht,De,Ne,We){var Ke=!Q(Ne),Je=r(We),et=a(We),Mt=s(We),pt=o(We),Pt=c(We),Ct=We==="drawline",qt=We==="drawcircle",Vt=Ct||qt,Ht=Ne.gd,Sr=Ht._fullLayout,Kr=Pt&&Sr.newselection.mode==="immediate"&&Ke,Yt=Sr._zoomlayer,Rt=Ne.element.getBoundingClientRect(),nr=Ne.plotinfo,ur=$(nr),cr=ht-Rt.left,Rr=De-Rt.top;Sr._calcInverseTransform(Ht);var Qr=w.apply3DTransform(Sr._invTransform)(cr,Rr);cr=Qr[0],Rr=Qr[1];var Zr=Sr._invScaleX,ha=Sr._invScaleY,Pa=cr,La=Rr,un="M"+cr+","+Rr,Xa=Ne.xaxes[0],ja=Ne.yaxes[0],Nn=Xa._length,yn=ja._length,Un=vt.altKey&&!(o(We)&&Mt),li,Yn,on,en,vi,Yi,Ja;H(vt,Ht,Ne),Je&&(li=B([[cr,Rr]],O.BENDPX));var Oa=Yt.selectAll("path.select-outline-"+nr.id).data([1]),lt=pt?Sr.newshape:Sr.newselection;pt&&(Ne.hasText=lt.label.text||lt.label.texttemplate);var rt=pt&&!Mt?lt.fillcolor:"rgba(0,0,0,0)",fr=lt.line.color||(Ke?l.contrast(Ht._fullLayout.plot_bgcolor):"#7f7f7f");Oa.enter().append("path").attr("class","select-outline select-outline-"+nr.id).style({opacity:pt?lt.opacity/2:1,"stroke-dasharray":k(lt.line.dash,lt.line.width),"stroke-width":lt.line.width+"px","shape-rendering":"crispEdges"}).call(l.stroke,fr).call(l.fill,rt).attr("fill-rule","evenodd").classed("cursor-move",!!pt).attr("transform",ur).attr("d",un+"Z");var lr=Yt.append("path").attr("class","zoombox-corners").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1}).attr("transform",ur).attr("d","M0,0Z");if(pt&&Ne.hasText){var Tr=Yt.select(".label-temp");Tr.empty()&&(Tr=Yt.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ir=Sr._uid+O.SELECTID,Dr=[],ot=ae(Ht,Ne.xaxes,Ne.yaxes,Ne.subplot);Kr&&!vt.shiftKey&&(Ne._clearSubplotSelections=function(){if(Ke){var jt=Xa._id,ar=ja._id;Xe(Ht,jt,ar,ot);for(var Er=(Ht.layout||{}).selections||[],xr=[],zr=!1,Lr=0;Lr=0){Ht._fullLayout._deactivateShape(Ht);return}if(!pt){var Er=Sr.clickmode;A.done(Ir).then(function(){if(A.clear(Ir),jt===2){for(Oa.remove(),vi=0;vi-1&&ne(ar,Ht,Ne.xaxes,Ne.yaxes,Ne.subplot,Ne,Oa),Er==="event"&&or(Ht,void 0);e.click(Ht,ar,nr.id)}).catch(w.error)}},Ne.doneFn=function(){lr.remove(),A.done(Ir).then(function(){A.clear(Ir),!Kr&&en&&Ne.selectionDefs&&(en.subtract=Un,Ne.selectionDefs.push(en),Ne.mergedPolygons.length=0,[].push.apply(Ne.mergedPolygons,on)),(Kr||pt)&&W(Ne,Kr),Ne.doneFnCompleted&&Ne.doneFnCompleted(Dr),Pt&&or(Ht,Ja)}).catch(w.error)}}function ne(vt,ht,De,Ne,We,Ke,Je){var et=ht._hoverdata,Mt=ht._fullLayout,pt=Mt.clickmode,Pt=pt.indexOf("event")>-1,Ct=[],qt,Vt,Ht,Sr,Kr,Yt,Rt,nr,ur,cr;if(xe(et)){H(vt,ht,Ke),qt=ae(ht,De,Ne,We);var Rr=we(et,qt),Qr=Rr.pointNumbers.length>0;if(Qr?Se(qt,Rr):Ie(qt)&&(Rt=Me(Rr))){for(Je&&Je.remove(),cr=0;cr=0}function q(vt){return vt._fullLayout._activeSelectionIndex>=0}function W(vt,ht){var De=vt.dragmode,Ne=vt.plotinfo,We=vt.gd;X(We)&&We._fullLayout._deactivateShape(We),q(We)&&We._fullLayout._deactivateSelection(We);var Ke=We._fullLayout,Je=Ke._zoomlayer,et=o(De),Mt=c(De);if(et||Mt){var pt=Je.selectAll(".select-outline-"+Ne.id);if(pt&&We._fullLayout._outlining){var Pt;et&&(Pt=M(pt,vt)),Pt&&E.call("_guiRelayout",We,{shapes:Pt});var Ct;Mt&&!Q(vt)&&(Ct=C(pt,vt)),Ct&&(We._fullLayout._noEmitSelectedAtStart=!0,E.call("_guiRelayout",We,{selections:Ct}).then(function(){ht&&_(We)})),We._fullLayout._outlining=!1}}Ne.selection={},Ne.selection.selectionDefs=vt.selectionDefs=[],Ne.selection.mergedPolygons=vt.mergedPolygons=[]}function ee(vt){return vt._id}function ae(vt,ht,De,Ne){if(!vt.calcdata)return[];var We=[],Ke=ht.map(ee),Je=De.map(ee),et,Mt,pt;for(pt=0;pt0,Ke=We?Ne[0]:De;return ht.selectedpoints?ht.selectedpoints.indexOf(Ke)>-1:!1}function Se(vt,ht){var De=[],Ne,We,Ke,Je;for(Je=0;Je0&&De.push(Ne);if(De.length===1&&(Ke=De[0]===ht.searchInfo,Ke&&(We=ht.searchInfo.cd[0].trace,We.selectedpoints.length===ht.pointNumbers.length))){for(Je=0;Je1||(ht+=Ne.selectedpoints.length,ht>1)))return!1;return ht===1}function Ge(vt,ht,De){var Ne,We;for(Ne=0;Ne-1&&ht;if(!Je&&ht){var jt=yt(vt,!0);if(jt.length){var ar=jt[0].xref,Er=jt[0].yref;if(ar&&Er){var xr=At(jt),zr=rr([x(vt,ar,"x"),x(vt,Er,"y")]);zr(Dr,xr)}}vt._fullLayout._noEmitSelectedAtStart?vt._fullLayout._noEmitSelectedAtStart=!1:kt&&or(vt,Dr),qt._reselect=!1}if(!Je&&qt._deselect){var Lr=qt._deselect;et=Lr.xref,Mt=Lr.yref,Be(et,Mt,Pt)||Xe(vt,et,Mt,Ne),kt&&(Dr.points.length?or(vt,Dr):Ot(vt)),qt._deselect=!1}return{eventData:Dr,selectionTesters:De}}function Ae(vt){var ht=vt.calcdata;if(ht)for(var De=0;De=0){lt._fullLayout._deactivateShape(lt);return}var rt=lt._fullLayout.clickmode;if(V(lt),Ja===2&&!_e&&li(),ke)rt.indexOf("select")>-1&&w(Oa,lt,Be,Xe,he.id,pt),rt.indexOf("event")>-1&&a.click(lt,Oa,he.id);else if(Ja===1&&_e){var fr=Ie?ve:ue,lr=Ie==="s"||Ge==="w"?0:1,Tr=fr._name+".range["+lr+"]",Ir=F(fr,lr),Dr="left",ot="middle";if(fr.fixedrange)return;Ie?(ot=Ie==="n"?"top":"bottom",fr.side==="right"&&(Dr="right")):Ge==="e"&&(Dr="right"),lt._context.showAxisRangeEntryBoxes&&p.select(Mt).call(t.makeEditable,{gd:lt,immediate:!0,background:lt._fullLayout.paper_bgcolor,text:String(Ir),fill:fr.tickfont?fr.tickfont.color:"#444",horizontalAlign:Dr,verticalAlign:ot}).on("edit",function(kt){var jt=fr.d2r(kt);jt!==void 0&&l.call("_guiRelayout",lt,Tr,jt)})}}c.init(pt);var qt,Vt,Ht,Sr,Kr,Yt,Rt,nr,ur,cr;function Rr(Ja,Oa,lt){var rt=Mt.getBoundingClientRect();qt=Oa-rt.left,Vt=lt-rt.top,ae._fullLayout._calcInverseTransform(ae);var fr=b.apply3DTransform(ae._fullLayout._invTransform)(qt,Vt);qt=fr[0],Vt=fr[1],Ht={l:qt,r:qt,w:0,t:Vt,b:Vt,h:0},Sr=ae._hmpixcount?ae._hmlumcount/ae._hmpixcount:n.luminosity(ae._fullLayout.plot_bgcolor),Kr="M0,0H"+gt+"V"+Tt+"H0V0",Yt=!1,Rt="xy",cr=!1,nr=Q(qe,Sr,Ye,yt,Kr),ur=re(qe,Ye,yt)}function Qr(Ja,Oa){if(ae._transitioningWithDuration)return!1;var lt=Math.max(0,Math.min(gt,We*Ja+qt)),rt=Math.max(0,Math.min(Tt,Ke*Oa+Vt)),fr=Math.abs(lt-qt),lr=Math.abs(rt-Vt);Ht.l=Math.min(qt,lt),Ht.r=Math.max(qt,lt),Ht.t=Math.min(Vt,rt),Ht.b=Math.max(Vt,rt);function Tr(){Rt="",Ht.r=Ht.l,Ht.t=Ht.b,ur.attr("d","M0,0Z")}if(At.isSubplotConstrained)fr>x||lr>x?(Rt="xy",fr/gt>lr/Tt?(lr=fr*Tt/gt,Vt>rt?Ht.t=Vt-lr:Ht.b=Vt+lr):(fr=lr*gt/Tt,qt>lt?Ht.l=qt-fr:Ht.r=qt+fr),ur.attr("d",X(Ht))):Tr();else if($t.isSubplotConstrained)if(fr>x||lr>x){Rt="xy";var Ir=Math.min(Ht.l/gt,(Tt-Ht.b)/Tt),Dr=Math.max(Ht.r/gt,(Tt-Ht.t)/Tt);Ht.l=Ir*gt,Ht.r=Dr*gt,Ht.b=(1-Ir)*Tt,Ht.t=(1-Dr)*Tt,ur.attr("d",X(Ht))}else Tr();else!_r||lr0){var kt;if($t.isSubplotConstrained||!rr&&_r.length===1){for(kt=0;kt1&&(Tr.maxallowed!==void 0&&or===(Tr.range[0]1&&(Ir.maxallowed!==void 0&&Ot===(Ir.range[0]=0?Math.min(ae,.9):1/(1/Math.max(ae,-.3)+3.222))}function $(ae,he,xe){return ae?ae==="nsew"?xe?"":he==="pan"?"move":"crosshair":ae.toLowerCase()+"-resize":"pointer"}function Q(ae,he,xe,we,Me){return ae.append("path").attr("class","zoombox").style({fill:he>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",e(xe,we)).attr("d",Me+"Z")}function re(ae,he,xe){return ae.append("path").attr("class","zoombox-corners").style({fill:n.background,stroke:n.defaultLine,"stroke-width":1,opacity:0}).attr("transform",e(he,xe)).attr("d","M0,0Z")}function ne(ae,he,xe,we,Me,Se){ae.attr("d",we+"M"+xe.l+","+xe.t+"v"+xe.h+"h"+xe.w+"v-"+xe.h+"h-"+xe.w+"Z"),se(ae,he,Me,Se)}function se(ae,he,xe,we){xe||(ae.transition().style("fill",we>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),he.transition().style("opacity",1).duration(200))}function V(ae){p.select(ae).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Z(ae){z&&ae.data&&ae._context.showTips&&(b.notifier(b._(ae,"Double-click to zoom back out"),"long",ae),z=!1)}function K(ae,he){return"M"+(ae.l-.5)+","+(he-x-.5)+"h-3v"+(2*x+1)+"h3ZM"+(ae.r+.5)+","+(he-x-.5)+"h3v"+(2*x+1)+"h-3Z"}function H(ae,he){return"M"+(he-x-.5)+","+(ae.t-.5)+"v-3h"+(2*x+1)+"v3ZM"+(he-x-.5)+","+(ae.b+.5)+"v3h"+(2*x+1)+"v-3Z"}function X(ae){var he=Math.floor(Math.min(ae.b-ae.t,ae.r-ae.l,x)/2);return"M"+(ae.l-3.5)+","+(ae.t-.5+he)+"h3v"+-he+"h"+he+"v-3h-"+(he+3)+"ZM"+(ae.r+3.5)+","+(ae.t-.5+he)+"h-3v"+-he+"h"+-he+"v-3h"+(he+3)+"ZM"+(ae.r+3.5)+","+(ae.b+.5-he)+"h-3v"+he+"h"+-he+"v3h"+(he+3)+"ZM"+(ae.l-3.5)+","+(ae.b+.5-he)+"h3v"+he+"h"+he+"v3h-"+(he+3)+"Z"}function q(ae,he,xe,we,Me){for(var Se=!1,Ie={},Ge={},qe,ke,_e,ue,ve=(Me||{}).xaHash,le=(Me||{}).yaHash,Ae=0;Ae1&&b.warn("Full array edits are incompatible with other edits",c);var S=a[""][""];if(e(S))r.set(null);else if(Array.isArray(S))r.set(S);else return b.warn("Unrecognized full array edit value",c,S),!0;return m?!1:(g(i,T),f(n),!0)}var M=Object.keys(a).map(Number).sort(E),C=r.get(),_=C||[],w=s(T,c).get(),h=[],u=-1,A=_.length,x,z,I,O,D,B,F,P;for(x=0;x_.length-(F?0:1)){b.warn("index out of range",c,I);continue}if(B!==void 0)D.length>1&&b.warn("Insertion & removal are incompatible with edits to the same index.",c,I),e(B)?h.push(I):F?(B==="add"&&(B={}),_.splice(I,0,B),w&&w.splice(I,0,{})):b.warn("Unrecognized full object edit value",c,I,B),u===-1&&(u=I);else for(z=0;z=0;x--)_.splice(h[x],1),w&&w.splice(h[x],1);if(_.length?C||r.set(_):r.set(null),m)return!1;if(g(i,T),v!==p){var j;if(u===-1)j=M;else{for(A=Math.max(_.length,A),j=[],x=0;x=u));x++)j.push(I);for(x=u;x0&&b.log("Clearing previous rejected promises from queue."),m._promises=[]},J.cleanLayout=function(m){var i,T;m||(m={}),m.xaxis1&&(m.xaxis||(m.xaxis=m.xaxis1),delete m.xaxis1),m.yaxis1&&(m.yaxis||(m.yaxis=m.yaxis1),delete m.yaxis1),m.scene1&&(m.scene||(m.scene=m.scene1),delete m.scene1);var S=(E.subplotsRegistry.cartesian||{}).attrRegex,M=(E.subplotsRegistry.polar||{}).attrRegex,C=(E.subplotsRegistry.ternary||{}).attrRegex,_=(E.subplotsRegistry.gl3d||{}).attrRegex,w=Object.keys(m);for(i=0;i3?(B.x=1.02,B.xanchor="left"):B.x<-2&&(B.x=-.02,B.xanchor="right"),B.y>3?(B.y=1.02,B.yanchor="bottom"):B.y<-2&&(B.y=-.02,B.yanchor="top")),m.dragmode==="rotate"&&(m.dragmode="orbit"),m.template&&m.template.layout&&J.cleanLayout(m.template.layout),m};function r(m,i,T=!1){var S=m[i],M=i.charAt(0);T&&Array.isArray(S)||S&&S!=="paper"&&(m[i]=l(S,M,!0))}J.cleanData=function(m){for(var i=0;i0)return m.slice(0,i)}J.hasParent=function(m,i){for(var T=f(i);T;){if(T in m)return!0;T=f(T)}return!1},J.clearAxisTypes=function(m,i,T){for(var S=0;S{let T=(...S)=>S.every(M=>b.isPlainObject(M))||S.every(M=>Array.isArray(M));if([m,i].every(S=>Array.isArray(S))){if(m.length!==i.length)return!1;for(let S=0;Sb.isPlainObject(S))){if(Object.keys(m).length!==Object.keys(i).length)return!1;for(let S in m){if(S.startsWith("_"))continue;let M=m[S],C=i[S];if(M!==C&&!(T(M,C)?v(M,C):!1))return!1}return!0}return!1};J.collectionsAreEqual=v}}),Ux=ze({"src/plot_api/plot_api.js"(J){"use strict";var G=ci(),p=ao(),b=Gw(),E=Nr(),k=E.nestedProperty,l=Hm(),e=OI(),t=mi(),n=Wm(),r=cl(),a=Gi(),o=Qw(),s=cf(),c=Xi(),g=Qn(),f=b5().initInteractions,v=nd(),m=_c().clearOutline,i=av().dfltConfig,T=xD(),S=bD(),M=dg(),C=Al(),_=hc().AX_NAME_PATTERN,w=0,h=5;function u(De,Ne,We,Ke){var Je;if(De=E.getGraphDiv(De),l.init(De),E.isPlainObject(Ne)){var et=Ne;Ne=et.data,We=et.layout,Ke=et.config,Je=et.frames}var Mt=l.triggerHandler(De,"plotly_beforeplot",[Ne,We,Ke]);if(Mt===!1)return Promise.reject();!Ne&&!We&&!E.isPlotDiv(De)&&E.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",De);function pt(){if(Je)return J.addFrames(De,Je)}O(De,Ke),We||(We={}),G.select(De).classed("js-plotly-plot",!0),c.makeTester(),Array.isArray(De._promises)||(De._promises=[]);var Pt=(De.data||[]).length===0&&Array.isArray(Ne);Array.isArray(Ne)&&(S.cleanData(Ne),Pt?De.data=Ne:De.data.push.apply(De.data,Ne),De.empty=!1),(!De.layout||Pt)&&(De.layout=S.cleanLayout(We)),r.supplyDefaults(De);var Ct=De._fullLayout,qt=Ct._has("cartesian");Ct._replotting=!0,(Pt||Ct._shouldCreateBgLayer)&&(ht(De),Ct._shouldCreateBgLayer&&delete Ct._shouldCreateBgLayer),c.initGradients(De),c.initPatterns(De),Pt&&a.saveShowSpikeInitial(De);var Vt=!De.calcdata||De.calcdata.length!==(De._fullData||[]).length;Vt&&r.doCalcdata(De);for(var Ht=0;Ht=De.data.length||Je<-De.data.length)throw new Error(We+" must be valid indices for gd.data.");if(Ne.indexOf(Je,Ke+1)>-1||Je>=0&&Ne.indexOf(-De.data.length+Je)>-1||Je<0&&Ne.indexOf(De.data.length+Je)>-1)throw new Error("each index in "+We+" must be unique.")}}function j(De,Ne,We){if(!Array.isArray(De.data))throw new Error("gd.data must be an array.");if(typeof Ne>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Ne)||(Ne=[Ne]),P(De,Ne,"currentIndices"),typeof We<"u"&&!Array.isArray(We)&&(We=[We]),typeof We<"u"&&P(De,We,"newIndices"),typeof We<"u"&&Ne.length!==We.length)throw new Error("current and new indices must be of equal length.")}function U(De,Ne,We){var Ke,Je;if(!Array.isArray(De.data))throw new Error("gd.data must be an array.");if(typeof Ne>"u")throw new Error("traces must be defined.");for(Array.isArray(Ne)||(Ne=[Ne]),Ke=0;Ke"u")throw new Error("indices must be an integer or array of integers");P(De,We,"indices");for(var et in Ne){if(!Array.isArray(Ne[et])||Ne[et].length!==We.length)throw new Error("attribute "+et+" must be an array of length equal to indices array length");if(Je&&(!(et in Ke)||!Array.isArray(Ke[et])||Ke[et].length!==Ne[et].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}function Q(De,Ne,We,Ke){var Je=E.isPlainObject(Ke),et=[],Mt,pt,Pt,Ct,qt;Array.isArray(We)||(We=[We]),We=F(We,De.data.length-1);for(var Vt in Ne)for(var Ht=0;Ht=0&&qt=0&&qt"u")return Ct=J.redraw(De),e.add(De,Je,Mt,et,pt),Ct;Array.isArray(We)||(We=[We]);try{j(De,Ke,We)}catch(qt){throw De.data.splice(De.data.length-Ne.length,Ne.length),qt}return e.startSequence(De),e.add(De,Je,Mt,et,pt),Ct=J.moveTraces(De,Ke,We),e.stopSequence(De),Ct}function K(De,Ne){De=E.getGraphDiv(De);var We=[],Ke=J.addTraces,Je=K,et=[De,We,Ne],Mt=[De,Ne],pt,Pt;if(typeof Ne>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Ne)||(Ne=[Ne]),P(De,Ne,"indices"),Ne=F(Ne,De.data.length-1),Ne.sort(E.sorterDes),pt=0;pt"u")for(We=[],Ct=0;Ct0&&typeof Pa.parts[Xa]!="string";)Xa--;var ja=Pa.parts[Xa],Nn=Pa.parts[Xa-1]+"."+ja,yn=Pa.parts.slice(0,Xa).join("."),Un=k(De.layout,yn).get(),li=k(Ke,yn).get(),Yn=Pa.get();if(La!==void 0){nr[ha]=La,ur[ha]=ja==="reverse"?La:q(Yn);var on=n.getLayoutValObject(Ke,Pa.parts);if(on&&on.impliedEdits&&La!==null)for(var en in on.impliedEdits)cr(E.relativeAttr(ha,en),on.impliedEdits[en]);if(["width","height"].indexOf(ha)!==-1)if(La){cr("autosize",null);var vi=ha==="height"?"width":"height";cr(vi,Ke[vi])}else Ke[ha]=De._initialAutoSize[ha];else if(ha==="autosize")cr("width",La?null:Ke.width),cr("height",La?null:Ke.height);else if(Nn.match(Se))Zr(Nn),k(Ke,yn+"._inputRange").set(null);else if(Nn.match(Ie)){Zr(Nn),k(Ke,yn+"._inputRange").set(null);var Yi=k(Ke,yn).get();Yi._inputDomain&&(Yi._input.domain=Yi._inputDomain.slice())}else Nn.match(Ge)&&k(Ke,yn+"._inputDomain").set(null);if(ja==="type"){Qr=Un;var Ja=li.type==="linear"&&La==="log",Oa=li.type==="log"&&La==="linear";if(Ja||Oa){if(!Qr||!Qr.range)cr(yn+".autorange",!0);else if(li.autorange)Ja&&(Qr.range=Qr.range[1]>Qr.range[0]?[1,2]:[2,1]);else{var lt=Qr.range[0],rt=Qr.range[1];Ja?(lt<=0&&rt<=0&&cr(yn+".autorange",!0),lt<=0?lt=rt/1e6:rt<=0&&(rt=lt/1e6),cr(yn+".range[0]",Math.log(lt)/Math.LN10),cr(yn+".range[1]",Math.log(rt)/Math.LN10)):(cr(yn+".range[0]",Math.pow(10,lt)),cr(yn+".range[1]",Math.pow(10,rt)))}Array.isArray(Ke._subplots.polar)&&Ke._subplots.polar.length&&Ke[Pa.parts[0]]&&Pa.parts[1]==="radialaxis"&&delete Ke[Pa.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(De,li,La,cr),t.getComponentMethod("images","convertCoords")(De,li,La,cr)}else cr(yn+".autorange",!0),cr(yn+".range",null);k(Ke,yn+"._inputRange").set(null)}else if(ja.match(_)){var fr=k(Ke,ha).get(),lr=(La||{}).type;(!lr||lr==="-")&&(lr="linear"),t.getComponentMethod("annotations","convertCoords")(De,fr,lr,cr),t.getComponentMethod("images","convertCoords")(De,fr,lr,cr)}var Tr=T.containerArrayMatch(ha);if(Tr){qt=Tr.array,Vt=Tr.index;var Ir=Tr.property,Dr=on||{editType:"calc"};Vt!==""&&Ir===""&&(T.isAddVal(La)?ur[ha]=null:T.isRemoveVal(La)?ur[ha]=(k(We,qt).get()||[])[Vt]:E.warn("unrecognized full object value",Ne)),C.update(Rt,Dr),Ct[qt]||(Ct[qt]={});var ot=Ct[qt][Vt];ot||(ot=Ct[qt][Vt]={}),ot[Ir]=La,delete Ne[ha]}else ja==="reverse"?(Un.range?Un.range.reverse():(cr(yn+".autorange",!0),Un.range=[1,0]),li.autorange?Rt.calc=!0:Rt.plot=!0):(ha==="dragmode"&&(La===!1&&Yn!==!1||La!==!1&&Yn===!1)||Ke._has("scatter-like")&&Ke._has("regl")&&ha==="dragmode"&&(La==="lasso"||La==="select")&&!(Yn==="lasso"||Yn==="select")?Rt.plot=!0:on?C.update(Rt,on):Rt.calc=!0,Pa.set(La))}}for(qt in Ct){var kt=T.applyContainerArrayChanges(De,et(We,qt),Ct[qt],Rt,et);kt||(Rt.plot=!0)}for(var jt in Rr){Qr=a.getFromId(De,jt);var ar=Qr&&Qr._constraintGroup;if(ar){Rt.calc=!0;for(var Er in ar)Rr[Er]||(a.getFromId(De,Er)._constraintShrinkable=!0)}}(ke(De)||Ne.height||Ne.width)&&(Rt.plot=!0);var xr=Ke.shapes;for(Vt=0;Vt1;)if(Ke.pop(),We=k(Ne,Ke.join(".")+".uirevision").get(),We!==void 0)return We;return Ne.uirevision}function Xe(De,Ne){for(var We=0;We[yn,De._ev.listeners(yn)]);et=J.newPlot(De,Ne,We,Ke).then(()=>{for(let[yn,Un]of Nn)Un.forEach(li=>De.on(yn,li));return J.react(De,Ne,We,Ke)})}else{De.data=Ne||[],S.cleanData(De.data),De.layout=We||{},S.cleanLayout(De.layout),gt(De.data,De.layout,pt,Pt),r.supplyDefaults(De,{skipUpdateCalc:!0});var Vt=De._fullData,Ht=De._fullLayout,Sr=Ht.datarevision===void 0,Kr=Ht.transition,Yt=$t(De,Pt,Ht,Sr,Kr),Rt=Yt.newDataRevision,nr=At(De,pt,Vt,Sr,Kr,Rt);if(ke(De)&&(Yt.layoutReplot=!0),nr.calc||Yt.calc){De.calcdata=void 0;for(var ur=Object.getOwnPropertyNames(Ht),cr=0;cr(qt||De.emit("plotly_react",{config:Ke,data:Ne,layout:We}),De))}function At(De,Ne,We,Ke,Je,et){var Mt=Ne.length===We.length;if(!Je&&!Mt)return{fullReplot:!0,calc:!0};var pt=C.traceFlags();pt.arrays={},pt.nChanges=0,pt.nChangesAnim=0;var Pt,Ct;function qt(Sr){var Kr=n.getTraceValObject(Ct,Sr);return!Ct._module.animatable&&Kr.anim&&(Kr.anim=!1),Kr}var Vt={getValObject:qt,flags:pt,immutable:Ke,transition:Je,newDataRevision:et,gd:De},Ht={};for(Pt=0;Pt=Je.length?Je[0]:Je[Ct]:Je}function pt(Ct){return Array.isArray(et)?Ct>=et.length?et[0]:et[Ct]:et}function Pt(Ct,qt){var Vt=0;return function(){if(Ct&&++Vt===qt)return Ct()}}return new Promise(function(Ct,qt){function Vt(){if(Ke._frameQueue.length!==0){for(;Ke._frameQueue.length;){var ja=Ke._frameQueue.pop();ja.onInterrupt&&ja.onInterrupt()}De.emit("plotly_animationinterrupted",[])}}function Ht(ja){if(ja.length!==0){for(var Nn=0;NnKe._timeToNext&&Kr()};ja()}var Rt=0;function nr(ja){return Array.isArray(Je)?Rt>=Je.length?ja.transitionOpts=Je[Rt]:ja.transitionOpts=Je[0]:ja.transitionOpts=Je,Rt++,ja}var ur,cr,Rr=[],Qr=Ne==null,Zr=Array.isArray(Ne),ha=!Qr&&!Zr&&E.isPlainObject(Ne);if(ha)Rr.push({type:"object",data:nr(E.extendFlat({},Ne))});else if(Qr||["string","number"].indexOf(typeof Ne)!==-1)for(ur=0;ur0&&unun)&&Xa.push(cr);Rr=Xa}}Rr.length>0?Ht(Rr):(De.emit("plotly_animated"),Ct())})}function Xt(De,Ne,We){if(De=E.getGraphDiv(De),Ne==null)return Promise.resolve();if(!E.isPlotDiv(De))throw new Error("This element is not a Plotly plot: "+De+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Ke,Je,et,Mt,pt=De._transitionData._frames,Pt=De._transitionData._frameHash;if(!Array.isArray(Ne))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Ne);var Ct=pt.length+Ne.length*2,qt=[],Vt={};for(Ke=Ne.length-1;Ke>=0;Ke--)if(E.isPlainObject(Ne[Ke])){var Ht=Ne[Ke].name,Sr=(Pt[Ht]||Vt[Ht]||{}).name,Kr=Ne[Ke].name,Yt=Pt[Sr]||Vt[Sr];Sr&&Kr&&typeof Kr=="number"&&Yt&&wPa.index?-1:ha.index=0;Ke--){if(Je=qt[Ke].frame,typeof Je.name=="number"&&E.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Je.name)for(;Pt[Je.name="frame "+De._transitionData._counter++];);if(Pt[Je.name]){for(et=0;et=0;We--)Ke=Ne[We],et.push({type:"delete",index:Ke}),Mt.unshift({type:"insert",index:Ke,value:Je[Ke]});var pt=r.modifyFrames,Pt=r.modifyFrames,Ct=[De,Mt],qt=[De,et];return e&&e.add(De,pt,Ct,Pt,qt),r.modifyFrames(De,et)}function Ot(De){De=E.getGraphDiv(De);var Ne=De._fullLayout||{},We=De._fullData||[];return r.cleanPlot([],{},We,Ne),r.purge(De),l.purge(De),Ne._container&&Ne._container.remove(),delete De._context,De}function vt(De){var Ne=De._fullLayout,We=De.getBoundingClientRect();if(!E.equalDomRects(We,Ne._lastBBox)){var Ke=Ne._invTransform=E.inverseTransformMatrix(E.getFullTransformMatrix(De));Ne._invScaleX=Math.sqrt(Ke[0][0]*Ke[0][0]+Ke[0][1]*Ke[0][1]+Ke[0][2]*Ke[0][2]),Ne._invScaleY=Math.sqrt(Ke[1][0]*Ke[1][0]+Ke[1][1]*Ke[1][1]+Ke[1][2]*Ke[1][2]),Ne._lastBBox=We}}function ht(De){var Ne=G.select(De),We=De._fullLayout;if(We._calcInverseTransform=vt,We._calcInverseTransform(De),We._container=Ne.selectAll(".plot-container").data([0]),We._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),We._paperdiv=We._container.selectAll(".svg-container").data([0]),We._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),We._glcontainer=We._paperdiv.selectAll(".gl-container").data([{}]),We._glcontainer.enter().append("div").classed("gl-container",!0),We._paperdiv.selectAll(".main-svg").remove(),We._paperdiv.select(".modebar-container").remove(),We._paper=We._paperdiv.insert("svg",":first-child").classed("main-svg",!0),We._toppaper=We._paperdiv.append("svg").classed("main-svg",!0),We._modebardiv=We._paperdiv.append("div"),delete We._modeBar,We._hoverpaper=We._paperdiv.append("svg").classed("main-svg",!0),!We._uid){var Ke={};G.selectAll("defs").each(function(){this.id&&(Ke[this.id.split("-")[1]]=1)}),We._uid=E.randstr(Ke)}We._paperdiv.selectAll(".main-svg").attr(v.svgAttrs),We._defs=We._paper.append("defs").attr("id","defs-"+We._uid),We._clips=We._defs.append("g").classed("clips",!0),We._topdefs=We._toppaper.append("defs").attr("id","topdefs-"+We._uid),We._topclips=We._topdefs.append("g").classed("clips",!0),We._bgLayer=We._paper.append("g").classed("bglayer",!0),We._draggers=We._paper.append("g").classed("draglayer",!0);var Je=We._paper.append("g").classed("layer-below",!0);We._imageLowerLayer=Je.append("g").classed("imagelayer",!0),We._shapeLowerLayer=Je.append("g").classed("shapelayer",!0),We._cartesianlayer=We._paper.append("g").classed("cartesianlayer",!0),We._polarlayer=We._paper.append("g").classed("polarlayer",!0),We._smithlayer=We._paper.append("g").classed("smithlayer",!0),We._ternarylayer=We._paper.append("g").classed("ternarylayer",!0),We._geolayer=We._paper.append("g").classed("geolayer",!0),We._funnelarealayer=We._paper.append("g").classed("funnelarealayer",!0),We._pielayer=We._paper.append("g").classed("pielayer",!0),We._iciclelayer=We._paper.append("g").classed("iciclelayer",!0),We._treemaplayer=We._paper.append("g").classed("treemaplayer",!0),We._sunburstlayer=We._paper.append("g").classed("sunburstlayer",!0),We._indicatorlayer=We._toppaper.append("g").classed("indicatorlayer",!0),We._glimages=We._paper.append("g").classed("glimages",!0);var et=We._toppaper.append("g").classed("layer-above",!0);We._imageUpperLayer=et.append("g").classed("imagelayer",!0),We._shapeUpperLayer=et.append("g").classed("shapelayer",!0),We._selectionLayer=We._toppaper.append("g").classed("selectionlayer",!0),We._infolayer=We._toppaper.append("g").classed("infolayer",!0),We._menulayer=We._toppaper.append("g").classed("menulayer",!0),We._zoomlayer=We._toppaper.append("g").classed("zoomlayer",!0),We._hoverlayer=We._hoverpaper.append("g").classed("hoverlayer",!0),We._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),De.emit("plotly_framework")}J.animate=_r,J.addFrames=Xt,J.deleteFrames=or,J.addTraces=Z,J.deleteTraces=K,J.extendTraces=se,J.moveTraces=H,J.prependTraces=V,J.newPlot=B,J._doPlot=u,J.purge=Ot,J.react=Tt,J.redraw=D,J.relayout=xe,J.restyle=X,J.setPlotConfig=x,J.update=_e,J._guiRelayout=ue(xe),J._guiRestyle=ue(X),J._guiUpdate=ue(_e),J._storeDirectGUIEdit=ae}}),ip=ze({"src/snapshot/helpers.js"(J){"use strict";var G=mi();J.getDelay=function(E){return E._has&&(E._has("gl3d")||E._has("map"))?500:0},J.getRedrawFunc=function(E){return function(){G.getComponentMethod("colorbar","draw")(E)}},J.encodeSVG=function(E){return"data:image/svg+xml,"+encodeURIComponent(E)},J.encodeJSON=function(E){return"data:application/json,"+encodeURIComponent(E)};var p=window.URL||window.webkitURL;J.createObjectURL=function(E){return p.createObjectURL(E)},J.revokeObjectURL=function(E){return p.revokeObjectURL(E)},J.createBlob=function(E,k){if(k==="svg")return new window.Blob([E],{type:"image/svg+xml;charset=utf-8"});if(k==="full-json")return new window.Blob([E],{type:"application/json;charset=utf-8"});var l=b(window.atob(E));return new window.Blob([l],{type:"image/"+k})},J.octetStream=function(E){document.location.href="data:application/octet-stream"+E},J.getPlotTitle=function(E){var k,l,e,t,n=E._fullLayout;if(n){var r=(k=n.title)==null?void 0:k.text;return r===((l=n._dfltTitle)==null?void 0:l.plot)?void 0:r}return(t=(e=E.layout)==null?void 0:e.title)==null?void 0:t.text},J.getPlotSubtitle=function(E){var k,l,e,t,n,r,a=E._fullLayout;if(a){var o=(l=(k=a.title)==null?void 0:k.subtitle)==null?void 0:l.text;return o===((e=a._dfltTitle)==null?void 0:e.subtitle)?void 0:o}return(r=(n=(t=E.layout)==null?void 0:t.title)==null?void 0:n.subtitle)==null?void 0:r.text};function b(E){for(var k=E.length,l=new ArrayBuffer(k),e=new Uint8Array(l),t=0;t{let i=m.toLowerCase();return r.includes(i)?m:a.includes(i)?"<":o.includes(i)?">":m.includes("<")||m.includes(">")?"":f.html(m).text()});return f.remove(),v}function c(g){return g.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}G.exports=function(f,v,m){var i=f._fullLayout,T=i._paper,S=i._toppaper,M=i.width,C=i.height,_;T.insert("rect",":first-child").call(E.setRect,0,0,M,C).call(k.fill,i.paper_bgcolor);var w=i._basePlotModules||[];for(_=0;_1&&C.push(s("object","layout"))),b.supplyDefaults(_);for(var u=_._fullData,A=w.length,x=0;xz.length&&M.push(s("unused",C,A.concat(z.length)));var P=z.length,j=Array.isArray(F);j&&(P=Math.min(P,F.length));var U,$,Q,re,ne;if(I.dimensions===2)for($=0;$z[$].length&&M.push(s("unused",C,A.concat($,z[$].length)));var se=z[$].length;for(U=0;U<(j?Math.min(se,F[$].length):se);U++)Q=j?F[$][U]:F,re=x[$][U],ne=z[$][U],p.validate(re,Q)?ne!==re&&ne!==+re&&M.push(s("dynamic",C,A.concat($,U),re,ne)):M.push(s("value",C,A.concat($,U),re))}else M.push(s("array",C,A.concat($),x[$]));else for($=0;$D?M.push({code:"unused",traceType:x,templateCount:O,dataCount:D}):D>O&&M.push({code:"reused",traceType:x,templateCount:O,dataCount:D})}}function B(F,P){for(var j in F)if(j.charAt(0)!=="_"){var U=F[j],$=s(F,j,P);p(U)?(Array.isArray(F)&&U._template===!1&&U.templateitemname&&M.push({code:"missing",path:$,templateitemname:U.templateitemname}),B(U,$)):Array.isArray(U)&&c(U)&&B(U,$)}}if(B({data:_,layout:C},""),M.length)return M.map(g)};function c(f){for(var v=0;v=0;g--){var f=l[g];if(f.type==="scatter"&&f.xaxis===s.xaxis&&f.yaxis===s.yaxis){f.opacity=void 0;break}}}}}}}),kD=ze({"src/traces/scatter/layout_defaults.js"(J,G){"use strict";var p=Nr(),b=Lx();G.exports=function(E,k){function l(t,n){return p.coerce(E,k,b,t,n)}var e=k.barmode==="group";k.scattermode==="group"&&l("scattergap",e?k.bargap:.2)}}}),bd=ze({"src/plots/cartesian/align_period.js"(J,G){"use strict";var p=ao(),b=Nr(),E=b.dateTime2ms,k=b.incrementMonth,l=No(),e=l.ONEAVGMONTH;G.exports=function(n,r,a,o){if(r.type!=="date")return{vals:o};var s=n[a+"periodalignment"];if(!s)return{vals:o};var c=n[a+"period"],g;if(p(c)){if(c=+c,c<=0)return{vals:o}}else if(typeof c=="string"&&c.charAt(0)==="M"){var f=+c.substring(1);if(f>0&&Math.round(f)===f)g=f;else return{vals:o}}for(var v=r.calendar,m=s==="start",i=s==="end",T=n[a+"period0"],S=E(T,v)||0,M=[],C=[],_=[],w=o.length,h=0;hu;)z=k(z,-g,v);for(;z<=u;)z=k(z,g,v);x=k(z,-g,v)}else{for(A=Math.round((u-S)/c),z=S+A*c;z>u;)z-=c;for(;z<=u;)z+=c;x=z-c}M[h]=m?x:i?z:(x+z)/2,C[h]=x,_[h]=z}return{vals:M,starts:C,ends:_}}}}),od=ze({"src/traces/scatter/colorscale_calc.js"(J,G){"use strict";var p=Bf().hasColorscale,b=Qf(),E=el();G.exports=function(l,e){E.hasLines(e)&&p(e,"line")&&b(l,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),E.hasMarkers(e)&&(p(e,"marker")&&b(l,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),p(e,"marker.line")&&b(l,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Nd=ze({"src/traces/scatter/arrays_to_calcdata.js"(J,G){"use strict";var p=Nr();G.exports=function(E,k){for(var l=0;lB&&x[P].gap;)P--;for(U=x[P].s,F=x.length-1;F>P;F--)x[F].s=U;for(;Bre+$||!p(Q))}for(var se=0;seP(U))):P(D.text);let j=D.outsidetextfont.size*r*F+n;return{ppadplus:B.some(U=>U.s<0)?j:0,ppadminus:B.some(U=>U.s>=0)?j:0}}return{ppadplus:void 0,ppadminus:void 0}}function z(D,B,F,P){for(var j=O(P),U=0;UO[v]&&v0?l:e)/(v._m*T*(v._m>0?l:e)))),Ct*=1e3}if(qt===E){if(i&&(qt=v.c2p(Pt.y,!0)),qt===E)return!1;qt*=1e3}return[Ct,qt]}function ee(pt,Pt,Ct,qt){var Vt=Ct-pt,Ht=qt-Pt,Sr=.5-pt,Kr=.5-Pt,Yt=Vt*Vt+Ht*Ht,Rt=Vt*Sr+Ht*Kr;if(Rt>0&&Rt1||Math.abs(Sr.y-Ct[0][1])>1)&&(Sr=[Sr.x,Sr.y],qt&&we(Sr,pt)Ie||pt[1]qe)return[r(pt[0],Se,Ie),r(pt[1],Ge,qe)]}function yt(pt,Pt){if(pt[0]===Pt[0]&&(pt[0]===Se||pt[0]===Ie)||pt[1]===Pt[1]&&(pt[1]===Ge||pt[1]===qe))return!0}function gt(pt,Pt){var Ct=[],qt=Ye(pt),Vt=Ye(Pt);return qt&&Vt&&yt(qt,Vt)||(qt&&Ct.push(qt),Vt&&Ct.push(Vt)),Ct}function Tt(pt,Pt,Ct){return function(qt,Vt){var Ht=Ye(qt),Sr=Ye(Vt),Kr=[];if(Ht&&Sr&&yt(Ht,Sr))return Kr;Ht&&Kr.push(Ht),Sr&&Kr.push(Sr);var Yt=2*t.constrain((qt[pt]+Vt[pt])/2,Pt,Ct)-((Ht||qt)[pt]+(Sr||Vt)[pt]);if(Yt){var Rt;Ht&&Sr?Rt=Yt>0==Ht[pt]>Sr[pt]?Ht:Sr:Rt=Ht||Sr,Rt[pt]+=Yt}return Kr}}var At;h==="linear"||h==="spline"?At=Xe:h==="hv"||h==="vh"?At=gt:h==="hvh"?At=Tt(0,Se,Ie):h==="vhv"&&(At=Tt(1,Ge,qe));function $t(pt,Pt){var Ct=Pt[0]-pt[0],qt=(Pt[1]-pt[1])/Ct,Vt=(pt[1]*Pt[0]-Pt[1]*pt[0])/Ct;return Vt>0?[qt>0?Se:Ie,qe]:[qt>0?Ie:Se,Ge]}function rr(pt){var Pt=pt[0],Ct=pt[1],qt=Pt===O[D-1][0],Vt=Ct===O[D-1][1];if(!(qt&&Vt))if(D>1){var Ht=Pt===O[D-2][0],Sr=Ct===O[D-2][1];qt&&(Pt===Se||Pt===Ie)&&Ht?Sr?D--:O[D-1]=pt:Vt&&(Ct===Ge||Ct===qe)&&Sr?Ht?D--:O[D-1]=pt:O[D++]=pt}else O[D++]=pt}function _r(pt){O[D-1][0]!==pt[0]&&O[D-1][1]!==pt[1]&&rr([ve,le]),rr(pt),Ae=null,ve=le=0}var Xt=t.isArrayOrTypedArray(C);function or(pt){if(pt&&M&&(pt.i=B,pt.d=s,pt.trace=g,pt.marker=Xt?C[pt.i]:C,pt.backoff=M),ae=pt[0]/T,he=pt[1]/S,_e=pt[0]Ie?Ie:0,ue=pt[1]qe?qe:0,_e||ue){if(!D)O[D++]=[_e||pt[0],ue||pt[1]];else if(Ae){var Pt=At(Ae,pt);Pt.length>1&&(_r(Pt[0]),O[D++]=Pt[1])}else Be=At(O[D-1],pt)[0],O[D++]=Be;var Ct=O[D-1];_e&&ue&&(Ct[0]!==_e||Ct[1]!==ue)?(Ae&&(ve!==_e&&le!==ue?rr(ve&&le?$t(Ae,pt):[ve||_e,le||ue]):ve&&le&&rr([ve,le])),rr([_e,ue])):ve-_e&&le-ue&&rr([_e||ve,ue||le]),Ae=pt,ve=_e,le=ue}else Ae&&_r(At(Ae,pt)[0]),O[D++]=pt}for(B=0;Bxe($,Ot))break;P=$,K=ne[0]*re[0]+ne[1]*re[1],K>V?(V=K,j=$,Q=!1):K=s.length||!$)break;or($),F=$}}Ae&&rr([ve||Ae[0],le||Ae[1]]),x.push(O.slice(0,D))}var vt=h.slice(h.length-1);if(M&&vt!=="h"&&vt!=="v"){for(var ht=!1,De=-1,Ne=[],We=0;We=0?a=f:(a=f=g,g++),a0,h=r(f,v,m);if(M=i.selectAll("g.trace").data(h,function(A){return A[0].trace.uid}),M.enter().append("g").attr("class",function(A){return"trace scatter trace"+A[0].trace.uid}).style("stroke-miterlimit",2),M.order(),o(f,M,v),w){S&&(C=S());var u=p.transition().duration(T.duration).ease(T.easing).each("end",function(){C&&C()}).each("interrupt",function(){C&&C()});u.each(function(){i.selectAll("g.trace").each(function(A,x){s(f,x,v,A,h,this,T)})})}else M.each(function(A,x){s(f,x,v,A,h,this,T)});_&&M.exit().remove(),i.selectAll("path:not([d])").remove()};function o(g,f,v){f.each(function(m){var i=k(p.select(this),"g","fills");e.setClipUrl(i,v.layerClipId,g);var T=m[0].trace;T._ownFill=null,T._nextFill=null;var S=[];T._ownfill&&S.push("_ownFill"),T._nexttrace&&S.push("_nextFill");var M=i.selectAll("g").data(S,l);M.enter().append("g"),M.exit().remove(),M.order().each(function(C){T[C]=k(p.select(this),"path","js-fill")})})}function s(g,f,v,m,i,T,S){var M=g._context.staticPlot,C;c(g,f,v,m,i);var _=!!S&&S.duration>0;function w(rr){return _?rr.transition():rr}var h=v.xaxis,u=v.yaxis,A=m[0].trace,x=A.line,z=p.select(T),I=k(z,"g","errorbars"),O=k(z,"g","lines"),D=k(z,"g","points"),B=k(z,"g","text");if(b.getComponentMethod("errorbars","plot")(g,I,v,S),A.visible!==!0)return;w(z).style("opacity",A.opacity);var F,P,j=A.fill.charAt(A.fill.length-1);j!=="x"&&j!=="y"&&(j="");var U,$;j==="y"?(U=1,$=u.c2p(0,!0)):j==="x"&&(U=0,$=h.c2p(0,!0)),m[0][v.isRangePlot?"nodeRangePlot3":"node3"]=z;var Q="",re=[],ne=A._prevtrace,se=null,V=null;ne&&(Q=ne._prevRevpath||"",P=ne._nextFill,re=ne._ownPolygons,se=ne._fillsegments,V=ne._fillElement);var Z,K,H="",X="",q,W,ee,ae,he,xe,we=[];A._polygons=[];var Me=[],Se=[],Ie=E.noop;if(F=A._ownFill,t.hasLines(A)||A.fill!=="none"){P&&P.datum(m),["hv","vh","hvh","vhv"].indexOf(x.shape)!==-1?(q=e.steps(x.shape),W=e.steps(x.shape.split("").reverse().join(""))):x.shape==="spline"?q=W=function(rr){var _r=rr[rr.length-1];return rr.length>1&&rr[0][0]===_r[0]&&rr[0][1]===_r[1]?e.smoothclosed(rr.slice(1),x.smoothing):e.smoothopen(rr,x.smoothing)}:q=W=function(rr){return"M"+rr.join("L")},ee=function(rr){return W(rr.reverse())},Se=n(m,{xaxis:h,yaxis:u,trace:A,connectGaps:A.connectgaps,baseTolerance:Math.max(x.width||1,3)/4,shape:x.shape,backoff:x.backoff,simplify:x.simplify,fill:A.fill}),Me=new Array(Se.length);var Ge=0;for(C=0;C=M[0]&&z.x<=M[1]&&z.y>=C[0]&&z.y<=C[1]}),u=Math.ceil(h.length/w),A=0;i.forEach(function(z,I){var O=z[0].trace;t.hasMarkers(O)&&O.marker.maxdisplayed>0&&I=Math.min(ne,se)&&v<=Math.max(ne,se)?0:1/0}var V=Math.max(3,re.mrc||0),Z=1-1/V,K=Math.abs(g.c2p(re.x)-v);return K=Math.min(ne,se)&&m<=Math.max(ne,se)?0:1/0}var V=Math.max(3,re.mrc||0),Z=1-1/V,K=Math.abs(f.c2p(re.y)-m);return KX!=Me>=X&&(he=ee[W-1][0],xe=ee[W][0],Me-we&&(ae=he+(xe-he)*(X-we)/(Me-we),V=Math.min(V,ae),Z=Math.max(Z,ae)));return V=Math.max(V,0),Z=Math.min(Z,g._length),{x0:V,x1:Z,y0:X,y1:X}}if(T.indexOf("fills")!==-1&&c._fillElement){var U=P(c._fillElement)&&!P(c._fillExclusionElement);if(U){var $=j(c._polygons);$===null&&($={x0:i[0],x1:i[0],y0:i[1],y1:i[1]});var Q=l.defaultLine;return l.opacity(c.fillcolor)?Q=c.fillcolor:l.opacity((c.line||{}).color)&&(Q=c.line.color),p.extendFlat(n,{distance:n.maxHoverDistance,x0:$.x0,x1:$.x1,y0:$.y0,y1:$.y1,color:Q,hovertemplate:!1}),delete n.index,c.text&&!p.isArrayOrTypedArray(c.text)?n.text=String(c.text):n.text=c.name,[n]}}}}}),Yv=ze({"src/traces/scatter/select.js"(J,G){"use strict";var p=el();G.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,n=[],r=l[0].trace,a,o,s,c,g=r.mode&&!p.hasMarkers(r)&&!p.hasText(r);if(g)return[];if(k===!1)for(a=0;a0&&(o["_"+r+"axes"]||{})[n])return o;if((o[r+"axis"]||r)===n){if(e(o,r))return o;if((o[r]||[]).length||o[r+"0"])return o}}}function l(t){return{v:"x",h:"y"}[t.orientation||"v"]}function e(t,n){var r=l(t),a=p(t,"box-violin");return a&&n===r&&t[r]===void 0&&t[r+"0"]===void 0}}}),Hx=ze({"src/plots/cartesian/category_order_defaults.js"(J,G){"use strict";var p=Ff().isTypedArraySpec;function b(E,k){var l=k.dataAttr||E._id.charAt(0),e={},t,n,r;if(k.axData)t=k.axData;else for(t=[],n=0;n0||p(n),a;r&&(a="array");var o=e("categoryorder",a),s;o==="array"&&(s=e("categoryarray")),!r&&o==="array"&&(o=l.categoryorder="trace"),o==="trace"?l._initialCategories=[]:o==="array"?l._initialCategories=s.slice():(s=b(l,t).sort(),o==="category ascending"?l._initialCategories=s:o==="category descending"&&(l._initialCategories=s.reverse()))}}}}),gg=ze({"src/plots/cartesian/line_grid_defaults.js"(J,G){"use strict";var p=Qn(),b=fc(),E=Nr();G.exports=function(l,e,t,n){n=n||{};var r=n.dfltColor;function a(x,z){return E.coerce2(l,e,n.attributes,x,z)}var o=a("linecolor",r),s=a("linewidth"),c=t("showline",n.showLine||!!o||!!s);c||(delete e.linecolor,delete e.linewidth);var g=p.mix(r,n.bgColor,n.blend||b.lightFraction),f=a("gridcolor",g),v=a("gridwidth"),m=a("griddash"),i=t("showgrid",n.showGrid||!!f||!!v||!!m);if(i||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),n.hasMinor){var T=p.mix(e.gridcolor,n.bgColor,67),S=a("minor.gridcolor",T),M=a("minor.gridwidth",e.gridwidth||1),C=a("minor.griddash",e.griddash||"solid"),_=t("minor.showgrid",!!S||!!M||!!C);_||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!n.noZeroLine){var w=a("zerolinelayer"),h=a("zerolinecolor",r),u=a("zerolinewidth"),A=t("zeroline",n.showGrid||!!h||!!u);A||(delete e.zerolinelayer,delete e.zerolinecolor,delete e.zerolinewidth)}}}}),yg=ze({"src/plots/cartesian/axis_defaults.js"(J,G){"use strict";var p=ao(),b=mi(),E=Nr(),k=hs(),l=Jf(),e=cf(),t=Uv(),n=Ym(),r=ov(),a=sv(),o=Hx(),s=gg(),c=Qw(),g=Dd(),f=hc().WEEKDAY_PATTERN,v=hc().HOUR_PATTERN;G.exports=function(M,C,_,w,h){var u=w.letter,A=w.font||{},x=w.splomStash||{},z=_("visible",!w.visibleDflt),I=C._template||{},O=C.type||I.type||"-",D;if(O==="date"){var B=b.getComponentMethod("calendars","handleDefaults");B(M,C,"calendar",w.calendar),w.noTicklabelmode||(D=_("ticklabelmode"))}!w.noTicklabelindex&&(O==="date"||O==="linear")&&_("ticklabelindex");var F="";(!w.noTicklabelposition||O==="multicategory")&&(F=E.coerce(M,C,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:D==="period"?["outside","inside"]:u==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),w.noTicklabeloverflow||_("ticklabeloverflow",F.indexOf("inside")!==-1?"hide past domain":O==="category"||O==="multicategory"?"allow":"hide past div"),g(C,h),c(M,C,_,w),o(M,C,_,w),w.noHover||(O!=="category"&&_("hoverformat"),w.noUnifiedhovertitle||_("unifiedhovertitle.text"));var P=_("color"),j=P!==e.color.dflt?P:A.color,U=x.label||h._dfltTitle[u];if(a(M,C,_,O,w),!z)return C;_("title.text",U),E.coerceFont(_,"title.font",A,{overrideDflt:{size:E.bigFont(A.size),color:j}}),t(M,C,_,O);var $=w.hasMinor;if($&&(k.newContainer(C,"minor"),t(M,C,_,O,{isMinor:!0})),r(M,C,_,O,w),n(M,C,_,w),$){var Q=w.isMinor;w.isMinor=!0,n(M,C,_,w),w.isMinor=Q}s(M,C,_,{dfltColor:P,bgColor:w.bgColor,showGrid:w.showGrid,hasMinor:$,attributes:e}),$&&C.ticklabelindex==null&&!C.minor.ticks&&!C.minor.showgrid&&delete C.minor,(C.showline||C.ticks)&&_("mirror");var re=O==="multicategory";if(!w.noTickson&&(O==="category"||re)&&(C.ticks||C.showgrid)&&(re?(_("tickson","boundaries"),delete C.ticklabelposition):_("tickson")),re){var ne=_("showdividers");ne&&(_("dividercolor"),_("dividerwidth"))}if(O==="date")if(l(M,C,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:m}),!C.rangebreaks.length)delete C.rangebreaks;else{for(var se=0;se=2){var u="",A,x;if(h.length===2){for(A=0;A<2;A++)if(x=T(h[A]),x){u=f;break}}var z=_("pattern",u);if(z===f)for(A=0;A<2;A++)x=T(h[A]),x&&(M.bounds[A]=h[A]=x-1);if(z)for(A=0;A<2;A++)switch(x=h[A],z){case f:if(!p(x)){M.enabled=!1;return}if(x=+x,x!==Math.floor(x)||x<0||x>=7){M.enabled=!1;return}M.bounds[A]=h[A]=x;break;case v:if(!p(x)){M.enabled=!1;return}if(x=+x,x<0||x>24){M.enabled=!1;return}M.bounds[A]=h[A]=x;break}if(C.autorange===!1){var I=C.range;if(I[0]I[1]){M.enabled=!1;return}}else if(h[0]>I[0]&&h[1]_[1]-1/4096&&(l.domain=g),b.noneOrAll(k.domain,l.domain,g),l.tickmode==="sync"&&(l.tickmode="auto")}return e("layer"),l}}}),RD=ze({"src/plots/cartesian/layout_defaults.js"(J,G){"use strict";var p=Nr(),b=Qn(),E=kh().isUnifiedHover,k=s5(),l=hs(),e=Gm(),t=cf(),n=E5(),r=yg(),a=Vv(),o=Wx(),s=Xl(),c=s.id2name,g=s.name2id,f=hc().AX_ID_PATTERN,v=mi(),m=v.traceIs,i=v.getComponentMethod;function T(S,M,C){Array.isArray(S[M])?S[M].push(C):S[M]=[C]}G.exports=function(M,C,_){var w=C.autotypenumbers,h={},u={},A={},x={},z={},I={},O={},D={},B={},F={},P,j;for(P=0;P<_.length;P++){var U=_[P];if(m(U,"cartesian")){var $;if(U.xaxis)$=c(U.xaxis),T(h,$,U);else if(U.xaxes)for(j=0;j rect").call(k.setTranslate,0,0).call(k.setScale,1,1),C.plot.call(k.setTranslate,_._offset,w._offset).call(k.setScale,1,1);var h=C.plot.selectAll(".scatterlayer .trace");h.selectAll(".point").call(k.setPointGroupScale,1,1),h.selectAll(".textpoint").call(k.setTextPointsScale,1,1),h.call(k.hideOutsideRangePoints,C)}function c(C,_){var w=C.plotinfo,h=w.xaxis,u=w.yaxis,A=h._length,x=u._length,z=!!C.xr1,I=!!C.yr1,O=[];if(z){var D=E.simpleMap(C.xr0,h.r2l),B=E.simpleMap(C.xr1,h.r2l),F=D[1]-D[0],P=B[1]-B[0];O[0]=(D[0]*(1-_)+_*B[0]-D[0])/(D[1]-D[0])*A,O[2]=A*(1-_+_*P/F),h.range[0]=h.l2r(D[0]*(1-_)+_*B[0]),h.range[1]=h.l2r(D[1]*(1-_)+_*B[1])}else O[0]=0,O[2]=A;if(I){var j=E.simpleMap(C.yr0,u.r2l),U=E.simpleMap(C.yr1,u.r2l),$=j[1]-j[0],Q=U[1]-U[0];O[1]=(j[1]*(1-_)+_*U[1]-j[1])/(j[0]-j[1])*x,O[3]=x*(1-_+_*Q/$),u.range[0]=h.l2r(j[0]*(1-_)+_*U[0]),u.range[1]=u.l2r(j[1]*(1-_)+_*U[1])}else O[1]=0,O[3]=x;l.drawOne(t,h,{skipTitle:!0}),l.drawOne(t,u,{skipTitle:!0}),l.redrawComponents(t,[h._id,u._id]);var re=z?A/O[2]:1,ne=I?x/O[3]:1,se=z?O[0]:0,V=I?O[1]:0,Z=z?O[0]/O[2]*A:0,K=I?O[1]/O[3]*x:0,H=h._offset-Z,X=u._offset-K;w.clipRect.call(k.setTranslate,se,V).call(k.setScale,1/re,1/ne),w.plot.call(k.setTranslate,H,X).call(k.setScale,re,ne),k.setPointGroupScale(w.zoomScalePts,1/re,1/ne),k.setTextPointsScale(w.zoomScaleTxt,1/re,1/ne)}var g;a&&(g=a());function f(){for(var C={},_=0;_r.duration?(f(),T=window.cancelAnimationFrame(M)):T=window.requestAnimationFrame(M)}return m=Date.now(),T=window.requestAnimationFrame(M),Promise.resolve()}}}),Du=ze({"src/plots/cartesian/index.js"(J){"use strict";var G=ci(),p=mi(),b=Nr(),E=cl(),k=Xi(),l=zf().getModuleCalcData,e=Xl(),t=hc(),n=nd(),r=b.ensureSingle;function a(m,i,T){return b.ensureSingle(m,i,T,function(S){S.datum(T)})}var o=t.zindexSeparator;J.name="cartesian",J.attr=["xaxis","yaxis"],J.idRoot=["x","y"],J.idRegex=t.idRegex,J.attrRegex=t.attrRegex,J.attributes=PD(),J.layoutAttributes=cf(),J.supplyLayoutDefaults=RD(),J.transitionAxes=ID(),J.finalizeSubplots=function(m,i){var T=i._subplots,S=T.xaxis,M=T.yaxis,C=T.cartesian,_=C,w={},h={},u,A,x;for(u=0;u<_.length;u++){var z=_[u].split("y");w[z[0]]=1,h["y"+z[1]]=1}for(u=0;u0){var I=z.id;if(I.indexOf(o)!==-1)continue;I+=o+(u+1),z=b.extendFlat({},z,{id:I,plot:M._cartesianlayer.selectAll(".subplot").select("."+I)})}for(var O=[],D,B=0;B<_.length;B++){var F=_[B],P=F[0].trace;A===(P.zorder||0)&&P.xaxis+P.yaxis===x&&((i.indexOf(P.index)!==-1||P.carpet)&&(D&&D[0].trace.xaxis+D[0].trace.yaxis===x&&["tonextx","tonexty","tonext"].indexOf(P.fill)!==-1&&O.indexOf(D)===-1&&O.push(D),O.push(F)),D=F)}s(m,z,O,T,S)}}};function s(m,i,T,S,M){for(var C=t.traceLayerClasses,_=m._fullLayout,w=_._zindices,h=_._modules,u,A,x,z=[],I=[],O=0;O1&&($+=o+U),j.push(w+$),_=0;_1,x=i.mainplotinfo;if(!i.mainplot||A)if(u)i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.xaxislayer=r(S,"g","xaxislayer-above"),i.yaxislayer=r(S,"g","yaxislayer-above");else{if(!_){var z=r(S,"g","layer-subplot");i.shapelayer=r(z,"g","shapelayer"),i.imagelayer=r(z,"g","imagelayer"),x&&A?(i.minorGridlayer=x.minorGridlayer,i.gridlayer=x.gridlayer,i.zerolinelayer=x.zerolinelayer):(i.minorGridlayer=r(S,"g","minor-gridlayer"),i.gridlayer=r(S,"g","gridlayer"),i.zerolinelayer=r(S,"g","zerolinelayer"));var I=r(S,"g","layer-between");i.shapelayerBetween=r(I,"g","shapelayer"),i.imagelayerBetween=r(I,"g","imagelayer"),r(S,"path","xlines-below"),r(S,"path","ylines-below"),i.overlinesBelow=r(S,"g","overlines-below"),r(S,"g","xaxislayer-below"),r(S,"g","yaxislayer-below"),i.overaxesBelow=r(S,"g","overaxes-below")}i.overplot=r(S,"g","overplot"),i.plot=r(i.overplot,"g",M),x&&A?i.zerolinelayerAbove=x.zerolinelayerAbove:i.zerolinelayerAbove=r(S,"g","zerolinelayer-above"),_||(i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.overlinesAbove=r(S,"g","overlines-above"),r(S,"g","xaxislayer-above"),r(S,"g","yaxislayer-above"),i.overaxesAbove=r(S,"g","overaxes-above"),i.xlines=S.select(".xlines-"+w),i.ylines=S.select(".ylines-"+h),i.xaxislayer=S.select(".xaxislayer-"+w),i.yaxislayer=S.select(".yaxislayer-"+h))}else{var O=x.plotgroup,D=M+"-x",B=M+"-y";i.minorGridlayer=x.minorGridlayer,i.gridlayer=x.gridlayer,i.zerolinelayer=x.zerolinelayer,i.zerolinelayerAbove=x.zerolinelayerAbove,r(x.overlinesBelow,"path",D),r(x.overlinesBelow,"path",B),r(x.overaxesBelow,"g",D),r(x.overaxesBelow,"g",B),i.plot=r(x.overplot,"g",M),r(x.overlinesAbove,"path",D),r(x.overlinesAbove,"path",B),r(x.overaxesAbove,"g",D),r(x.overaxesAbove,"g",B),i.xlines=O.select(".overlines-"+w).select("."+D),i.ylines=O.select(".overlines-"+h).select("."+B),i.xaxislayer=O.select(".overaxes-"+w).select("."+D),i.yaxislayer=O.select(".overaxes-"+h).select("."+B)}_||(u||(a(i.minorGridlayer,"g",i.xaxis._id),a(i.minorGridlayer,"g",i.yaxis._id),i.minorGridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort),a(i.gridlayer,"g",i.xaxis._id),a(i.gridlayer,"g",i.yaxis._id),i.gridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort)),i.xlines.style("fill","none").classed("crisp",!0),i.ylines.style("fill","none").classed("crisp",!0))}function f(m,i){if(m){var T={};m.each(function(h){var u=h[0],A=G.select(this);A.remove(),v(u,i),T[u]=!0});for(var S in i._plots)for(var M=i._plots[S],C=M.overlays||[],_=0;_=0,i=a.indexOf("end")>=0,T=c.backoff*f+o.standoff,S=g.backoff*v+o.startstandoff,M,C,_,w;if(s.nodeName==="line"){M={x:+r.attr("x1"),y:+r.attr("y1")},C={x:+r.attr("x2"),y:+r.attr("y2")};var h=M.x-C.x,u=M.y-C.y;if(_=Math.atan2(u,h),w=_+Math.PI,T&&S&&T+S>Math.sqrt(h*h+u*u)){$();return}if(T){if(T*T>h*h+u*u){$();return}var A=T*Math.cos(_),x=T*Math.sin(_);C.x+=A,C.y+=x,r.attr({x2:C.x,y2:C.y})}if(S){if(S*S>h*h+u*u){$();return}var z=S*Math.cos(_),I=S*Math.sin(_);M.x-=z,M.y-=I,r.attr({x1:M.x,y1:M.y})}}else if(s.nodeName==="path"){var O=s.getTotalLength(),D="";if(O2/3?cr="right":cr="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[cr]}for(var Be=!1,Xe=["x","y"],Ye=0;Ye1)&&(Tt===gt?(et=At.r2fraction(S["a"+yt]),(et<0||et>1)&&(Be=!0)):Be=!0),ht=At._offset+At.r2p(S[yt]),We=.5}else{var Mt=Je==="domain";yt==="x"?(Ne=S[yt],ht=Mt?At._offset+At._length*Ne:ht=u.l+u.w*Ne):(Ne=1-S[yt],ht=Mt?At._offset+At._length*Ne:ht=u.t+u.h*Ne),We=S.showarrow?.5:Ne}if(S.showarrow){vt.head=ht;var pt=S["a"+yt];if(Ke=rr*Ae(.5,S.xanchor)-_r*Ae(.5,S.yanchor),Tt===gt){var Pt=e.getRefType(Tt);Pt==="domain"?(yt==="y"&&(pt=1-pt),vt.tail=At._offset+At._length*pt):Pt==="paper"?yt==="y"?(pt=1-pt,vt.tail=u.t+u.h*pt):vt.tail=u.l+u.w*pt:vt.tail=At._offset+At.r2p(pt),De=Ke}else vt.tail=ht+pt,De=Ke+pt;vt.text=vt.tail+Ke;var Ct=h[yt==="x"?"width":"height"];if(gt==="paper"&&(vt.head=k.constrain(vt.head,1,Ct-1)),Tt==="pixel"){var qt=-Math.max(vt.tail-3,vt.text),Vt=Math.min(vt.tail+3,vt.text)-Ct;qt>0?(vt.tail+=qt,vt.text+=qt):Vt>0&&(vt.tail-=Vt,vt.text-=Vt)}vt.tail+=Ot,vt.head+=Ot}else Ke=Xt*Ae(We,or),De=Ke,vt.text=ht+Ke;vt.text+=Ot,Ke+=Ot,De+=Ot,S["_"+yt+"padplus"]=Xt/2+De,S["_"+yt+"padminus"]=Xt/2-De,S["_"+yt+"size"]=Xt,S["_"+yt+"shift"]=Ke}if(Be){se.remove();return}var Ht=0,Sr=0;if(S.align!=="left"&&(Ht=(_e-qe)*(S.align==="center"?.5:1)),S.valign!=="top"&&(Sr=(ue-ke)*(S.valign==="middle"?.5:1)),Ie)Se.select("svg").attr({x:K+Ht-1,y:K+Sr}).call(n.setClipUrl,X?F:null,T);else{var Kr=K+Sr-Ge.top,Yt=K+Ht-Ge.left;ae.call(a.positionText,Yt,Kr).call(n.setClipUrl,X?F:null,T)}q.select("rect").call(n.setRect,K,K,_e,ue),H.call(n.setRect,V/2,V/2,ve-V,le-V),se.call(n.setTranslate,Math.round(P.x.text-ve/2),Math.round(P.y.text-le/2)),$.attr({transform:"rotate("+j+","+P.x.text+","+P.y.text+")"});var Rt=function(ur,cr){U.selectAll(".annotation-arrow-g").remove();var Rr=P.x.head,Qr=P.y.head,Zr=P.x.tail+ur,ha=P.y.tail+cr,Pa=P.x.text+ur,La=P.y.text+cr,un=k.rotationXYMatrix(j,Pa,La),Xa=k.apply2DTransform(un),ja=k.apply2DTransform2(un),Nn=+H.attr("width"),yn=+H.attr("height"),Un=Pa-.5*Nn,li=Un+Nn,Yn=La-.5*yn,on=Yn+yn,en=[[Un,Yn,Un,on],[Un,on,li,on],[li,on,li,Yn],[li,Yn,Un,Yn]].map(ja);if(!en.reduce(function(ot,kt){return ot^!!k.segmentsIntersect(Rr,Qr,Rr+1e6,Qr+1e6,kt[0],kt[1],kt[2],kt[3])},!1)){en.forEach(function(ot){var kt=k.segmentsIntersect(Zr,ha,Rr,Qr,ot[0],ot[1],ot[2],ot[3]);kt&&(Zr=kt.x,ha=kt.y)});var vi=S.arrowwidth,Yi=S.arrowcolor,Ja=S.arrowside,Oa=U.append("g").style({opacity:t.opacity(Yi)}).classed("annotation-arrow-g",!0),lt=Oa.append("path").attr("d","M"+Zr+","+ha+"L"+Rr+","+Qr).style("stroke-width",vi+"px").call(t.stroke,t.rgb(Yi));if(g(lt,Ja,S),A.annotationPosition&<.node().parentNode&&!C){var rt=Rr,fr=Qr;if(S.standoff){var lr=Math.sqrt(Math.pow(Rr-Zr,2)+Math.pow(Qr-ha,2));rt+=S.standoff*(Zr-Rr)/lr,fr+=S.standoff*(ha-Qr)/lr}var Tr=Oa.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Zr-rt)+","+(ha-fr),transform:l(rt,fr)}).style("stroke-width",vi+6+"px").call(t.stroke,"rgba(0,0,0,0)").call(t.fill,"rgba(0,0,0,0)"),Ir,Dr;s.init({element:Tr.node(),gd:T,prepFn:function(){var ot=n.getTranslate(se);Ir=ot.x,Dr=ot.y,_&&_.autorange&&O(_._name+".autorange",!0),w&&w.autorange&&O(w._name+".autorange",!0)},moveFn:function(ot,kt){var jt=Xa(Ir,Dr),ar=jt[0]+ot,Er=jt[1]+kt;se.call(n.setTranslate,ar,Er),D("x",m(_,ot,"x",u,S)),D("y",m(w,kt,"y",u,S)),S.axref===S.xref&&D("ax",m(_,ot,"ax",u,S)),S.ayref===S.yref&&D("ay",m(w,kt,"ay",u,S)),Oa.attr("transform",l(ot,kt)),$.attr({transform:"rotate("+j+","+ar+","+Er+")"})},doneFn:function(){b.call("_guiRelayout",T,B());var ot=document.querySelector(".js-notes-box-panel");ot&&ot.redraw(ot.selectedObj)}})}}};if(S.showarrow&&Rt(0,0),Q){var nr;s.init({element:se.node(),gd:T,prepFn:function(){nr=$.attr("transform")},moveFn:function(ur,cr){var Rr="pointer";if(S.showarrow)S.axref===S.xref?D("ax",m(_,ur,"ax",u,S)):D("ax",S.ax+ur),S.ayref===S.yref?D("ay",m(w,cr,"ay",u.w,S)):D("ay",S.ay+cr),Rt(ur,cr);else{if(C)return;var Qr,Zr;if(_)Qr=m(_,ur,"x",u,S);else{var ha=S._xsize/u.w,Pa=S.x+(S._xshift-S.xshift)/u.w-ha/2;Qr=s.align(Pa+ur/u.w,ha,0,1,S.xanchor)}if(w)Zr=m(w,cr,"y",u,S);else{var La=S._ysize/u.h,un=S.y-(S._yshift+S.yshift)/u.h-La/2;Zr=s.align(un-cr/u.h,La,0,1,S.yanchor)}D("x",Qr),D("y",Zr),(!_||!w)&&(Rr=s.getCursor(_?.5:Qr,w?.5:Zr,S.xanchor,S.yanchor))}$.attr({transform:l(ur,cr)+nr}),o(se,Rr)},clickFn:function(ur,cr){S.captureevents&&T.emit("plotly_clickannotation",ne(cr))},doneFn:function(){o(se),b.call("_guiRelayout",T,B());var ur=document.querySelector(".js-notes-box-panel");ur&&ur.redraw(ur.selectedObj)}})}}A.annotationText?ae.call(a.makeEditable,{delegate:se,gd:T}).call(he).on("edit",function(we){S.text=we,this.call(he),D("text",we),_&&_.autorange&&O(_._name+".autorange",!0),w&&w.autorange&&O(w._name+".autorange",!0),b.call("_guiRelayout",T,B())}):ae.call(he)}}}),zD=ze({"src/components/annotations/click.js"(J,G){"use strict";var p=Nr(),b=mi(),E=hs().arrayEditor;G.exports={hasClickToShow:k,onClick:l};function k(n,r){var a=e(n,r);return a.on.length>0||a.explicitOff.length>0}function l(n,r){var a=e(n,r),o=a.on,s=a.off.concat(a.explicitOff),c={},g=n._fullLayout.annotations,f,v;if(o.length||s.length){for(f=0;f1){o=!0;break}}o?l.fullLayout._infolayer.select(".annotation-"+l.id+'[data-index="'+r+'"]').remove():(a._pdata=b(l.glplot.cameraParams,[e.xaxis.r2l(a.x)*t[0],e.yaxis.r2l(a.y)*t[1],e.zaxis.r2l(a.z)*t[2]]),p(l.graphDiv,a,r,l.id,a._xa,a._ya))}}}}),GD=ze({"src/components/annotations3d/index.js"(J,G){"use strict";var p=mi(),b=Nr();G.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:Xx()}}},layoutAttributes:Xx(),handleDefaults:UD(),includeBasePlot:E,convert:qD(),draw:VD()};function E(k,l){var e=p.subplotsRegistry.gl3d;if(e)for(var t=e.attrRegex,n=Object.keys(k),r=0;r{var x=A+"anchor",z=A==="x"?T:S,I={_fullLayout:a},O,D,B,F;let P=A+"ref",j=n[P];if(Array.isArray(j)&&j.length>0){let U=l.countDefiningCoords(v,g,A);F=b.coerceRefArray(n,r,I,A,void 0,"paper",U),r["_"+A+"refArray"]=!0}else F=b.coerceRef(n,r,I,A,void 0,"paper");if(Array.isArray(F))F.forEach(function(U){b.getRefType(U)==="range"&&(O=b.getFromId(I,U),O&&O._shapeIndices.indexOf(r._index)===-1&&O._shapeIndices.push(r._index))}),m&&[0,1].forEach(function(U){let $=F[U];b.getRefType($)==="range"?(O=b.getFromId(I,$),D=l.shapePositionToRange(O),B=l.rangeToShapePosition(O),(O.type==="category"||O.type==="multicategory")&&o(A+U+"shift")):D=B=p.identity;let re=A+U,ne=n[re];if(n[re]=D(n[re],!0),z==="pixel"?o(re,C[U]):b.coercePosition(r,I,o,$,re,M[U]),r[re]=B(r[re]),n[re]=ne,U===0&&z==="pixel"){let se=n[x];n[x]=D(n[x],!0),b.coercePosition(r,I,o,$,x,.25),r[x]=B(r[x]),n[x]=se}});else{if(b.getRefType(F)==="range"?(O=b.getFromId(I,F),O._shapeIndices.push(r._index),B=l.rangeToShapePosition(O),D=l.shapePositionToRange(O),m&&(O.type==="category"||O.type==="multicategory")&&(o(A+"0shift"),o(A+"1shift"))):D=B=p.identity,m){let $=A+"0",Q=A+"1",re=n[$],ne=n[Q];n[$]=D(n[$],!0),n[Q]=D(n[Q],!0),z==="pixel"?(o($,C[0]),o(Q,C[1])):(b.coercePosition(r,I,o,F,$,M[0]),b.coercePosition(r,I,o,F,Q,M[1])),r[$]=B(r[$]),r[Q]=B(r[Q]),n[$]=re,n[Q]=ne}if(z==="pixel"){let $=n[x];n[x]=D(n[x],!0),b.coercePosition(r,I,o,F,x,.25),r[x]=B(r[x]),n[x]=$}}}),m&&p.noneOrAll(n,r,["x0","x1","y0","y1"]);var _=v==="line",w,h;if(m&&(w=o("label.texttemplate"),o("label.texttemplatefallback")),w||(h=o("label.text")),h||w){o("label.textangle");var u=o("label.textposition",_?"middle":"middle center");o("label.xanchor"),o("label.yanchor",e(_,u)),o("label.padding"),p.coerceFont(o,"label.font",a.font)}}}}),WD=ze({"src/components/shapes/draw_newshape/defaults.js"(J,G){"use strict";var p=Qn(),b=Nr();function E(k,l){return k?"bottom":l.indexOf("top")!==-1?"top":l.indexOf("bottom")!==-1?"bottom":"middle"}G.exports=function(l,e,t){t("newshape.visible"),t("newshape.name"),t("newshape.showlegend"),t("newshape.legend"),t("newshape.legendwidth"),t("newshape.legendgroup"),t("newshape.legendgrouptitle.text"),b.coerceFont(t,"newshape.legendgrouptitle.font"),t("newshape.legendrank"),t("newshape.drawdirection"),t("newshape.layer"),t("newshape.fillcolor"),t("newshape.fillrule"),t("newshape.opacity");var n=t("newshape.line.width");if(n){var r=(l||{}).plot_bgcolor||"#FFF";t("newshape.line.color",p.contrast(r)),t("newshape.line.dash")}var a=l.dragmode==="drawline",o=t("newshape.label.text"),s=t("newshape.label.texttemplate");if(t("newshape.label.texttemplatefallback"),o||s){t("newshape.label.textangle");var c=t("newshape.label.textposition",a?"middle":"middle center");t("newshape.label.xanchor"),t("newshape.label.yanchor",E(a,c)),t("newshape.label.padding"),b.coerceFont(t,"newshape.label.font",e.font)}t("activeshape.fillcolor"),t("activeshape.opacity")}}}),YD=ze({"src/components/shapes/calc_autorange.js"(J,G){"use strict";var p=Nr(),b=Gi(),E=hg(),k=cv();G.exports=function(o){var s=o._fullLayout,c=p.filterVisible(s.shapes);if(!(!c.length||!o._fullData.length))for(var g=0;g{v=b.getFromId(o,M),f._extremes[v._id]=b.findExtremes(v,C,e(f))})}else f.xref!=="paper"&&i!=="domain"&&(v=b.getFromId(o,f.xref),m=r(v,f,E.paramIsX),m&&(f._extremes[v._id]=b.findExtremes(v,m,e(f))));if(T==="array"){let S=l(o,f,"y");Object.entries(S).forEach(([M,C])=>{v=b.getFromId(o,M),f._extremes[v._id]=b.findExtremes(v,C,t(f))})}else f.yref!=="paper"&&T!=="domain"&&(v=b.getFromId(o,f.yref),m=r(v,f,E.paramIsY),m&&(f._extremes[v._id]=b.findExtremes(v,m,t(f))))}};function l(a,o,s){let c=o[s+"ref"],g=s==="x"?E.paramIsX:E.paramIsY;function f(M,C){M==="paper"||b.getRefType(M)==="domain"||(v[M]||(v[M]=[]),v[M].push(C))}let v={};if(o.type==="path"&&o.path){let M=o.path.match(E.segmentRE)||[];for(var m=0,i=0;iw&&(f(c[m],h[w]),m++)}}else f(c[0],o[s+"0"]),f(c[1],o[s+"1"]);let T={};for(let M in v){let C=b.getFromId(a,M);if(C){var S=C.type==="category"||C.type==="multicategory"?C.r2c:C.d2c;C.type==="date"&&(S=k.decodeDate(S)),T[C._id]=v[M].map(S)}}return T}function e(a){return n(a.line.width,a.xsizemode,a.x0,a.x1,a.path,!1)}function t(a){return n(a.line.width,a.ysizemode,a.y0,a.y1,a.path,!0)}function n(a,o,s,c,g,f){var v=a/2,m=f;if(o==="pixel"){var i=g?k.extractPathCoords(g,f?E.paramIsY:E.paramIsX):[s,c],T=p.aggNums(Math.max,null,i),S=p.aggNums(Math.min,null,i),M=S<0?Math.abs(S)+v:v,C=T>0?T+v:v;return{ppad:v,ppadplus:m?M:C,ppadminus:m?C:M}}else return{ppad:v}}function r(a,o,s){var c=a._id.charAt(0)==="x"?"x":"y",g=a.type==="category"||a.type==="multicategory",f,v,m=0,i=0,T=g?a.r2c:a.d2c,S=o[c+"sizemode"]==="scaled";if(S?(f=o[c+"0"],v=o[c+"1"],g&&(m=o[c+"0shift"],i=o[c+"1shift"])):(f=o[c+"anchor"],v=o[c+"anchor"]),f!==void 0)return[T(f)+m,T(v)+i];if(o.path){var M=1/0,C=-1/0,_=o.path.match(E.segmentRE),w,h,u,A,x;for(a.type==="date"&&(T=k.decodeDate(T)),w=0;w<_.length;w++)h=_[w],u=s[h.charAt(0)].drawn,u!==void 0&&(A=_[w].slice(1).match(E.paramRE),!(!A||A.lengthC&&(C=x)));if(C>=M)return[M,C]}}}}),XD=ze({"src/components/shapes/index.js"(J,G){"use strict";var p=Ox();G.exports={moduleType:"component",name:"shapes",layoutAttributes:L5(),supplyLayoutDefaults:HD(),supplyDrawNewShapeDefaults:WD(),includeBasePlot:mg()("shapes"),calcAutorange:YD(),draw:p.draw,drawOne:p.drawOne}}}),P5=ze({"src/components/images/attributes.js"(J,G){"use strict";var p=hc(),b=hs().templatedArray,E=vg();G.exports=b("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",p.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",p.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),ZD=ze({"src/components/images/defaults.js"(J,G){"use strict";var p=Nr(),b=Gi(),E=Jf(),k=P5(),l="images";G.exports=function(n,r){var a={name:l,handleItemDefaults:e};E(n,r,a)};function e(t,n,r){function a(T,S){return p.coerce(t,n,k,T,S)}var o=a("source"),s=a("visible",!!o);if(!s)return n;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var c={_fullLayout:r},g=["x","y"],f=0;f<2;f++){var v=g[f],m=b.coerceRef(t,n,c,v,"paper",void 0);if(m!=="paper"){var i=b.getFromId(c,m);i._imgIndices.push(n._index)}b.coercePosition(n,c,a,m,v,0)}return n}}}),$D=ze({"src/components/images/draw.js"(J,G){"use strict";var p=ci(),b=Xi(),E=Gi(),k=Xl(),l=nd();G.exports=function(t){var n=t._fullLayout,r=[],a={},o=[],s,c;for(c=0;c0);g&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),p.noneOrAll(r,a,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),p.coerceFont(s,"font",o.font),s("bgcolor",o.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function n(r,a){function o(c,g){return p.coerce(r,a,e,c,g)}var s=o("visible",r.method==="skip"||Array.isArray(r.args));s&&(o("method"),o("args"),o("args2"),o("label"),o("execute"))}}}),eF=ze({"src/components/updatemenus/scrollbox.js"(J,G){"use strict";G.exports=l;var p=ci(),b=Qn(),E=Xi(),k=Nr();function l(e,t,n){this.gd=e,this.container=t,this.id=n,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}l.barWidth=2,l.barLength=20,l.barRadius=2,l.barPad=1,l.barColor="#808BA4",l.prototype.enable=function(t,n,r){var a=this.gd._fullLayout,o=a.width,s=a.height;this.position=t;var c=this.position.l,g=this.position.w,f=this.position.t,v=this.position.h,m=this.position.direction,i=m==="down",T=m==="left",S=m==="right",M=m==="up",C=g,_=v,w,h,u,A;!i&&!T&&!S&&!M&&(this.position.direction="down",i=!0);var x=i||M;x?(w=c,h=w+C,i?(u=f,A=Math.min(u+_,s),_=A-u):(A=f+_,u=Math.max(A-_,0),_=A-u)):(u=f,A=u+_,T?(h=c+C,w=Math.max(h-C,0),C=h-w):(w=c,h=Math.min(w+C,o),C=h-w)),this._box={l:w,t:u,w:C,h:_};var z=g>C,I=l.barLength+2*l.barPad,O=l.barWidth+2*l.barPad,D=c,B=f+v;B+O>s&&(B=s-O);var F=this.container.selectAll("rect.scrollbar-horizontal").data(z?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-horizontal",!0).call(b.fill,l.barColor),z?(this.hbar=F.attr({rx:l.barRadius,ry:l.barRadius,x:D,y:B,width:I,height:O}),this._hbarXMin=D+I/2,this._hbarTranslateMax=C-I):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var P=v>_,j=l.barWidth+2*l.barPad,U=l.barLength+2*l.barPad,$=c+g,Q=f;$+j>o&&($=o-j);var re=this.container.selectAll("rect.scrollbar-vertical").data(P?[0]:[]);re.exit().on(".drag",null).remove(),re.enter().append("rect").classed("scrollbar-vertical",!0).call(b.fill,l.barColor),P?(this.vbar=re.attr({rx:l.barRadius,ry:l.barRadius,x:$,y:Q,width:j,height:U}),this._vbarYMin=Q+U/2,this._vbarTranslateMax=_-U):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ne=this.id,se=w-.5,V=P?h+j+.5:h+.5,Z=u-.5,K=z?A+O+.5:A+.5,H=a._topdefs.selectAll("#"+ne).data(z||P?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",ne).append("rect"),z||P?(this._clipRect=H.select("rect").attr({x:Math.floor(se),y:Math.floor(Z),width:Math.ceil(V)-Math.floor(se),height:Math.ceil(K)-Math.floor(Z)}),this.container.call(E.setClipUrl,ne,this.gd),this.bg.attr({x:c,y:f,width:g,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.setClipUrl,null),delete this._clipRect),z||P){var X=p.behavior.drag().on("dragstart",function(){p.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(X);var q=p.behavior.drag().on("dragstart",function(){p.event.sourceEvent.preventDefault(),p.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));z&&this.hbar.on(".drag",null).call(q),P&&this.vbar.on(".drag",null).call(q)}this.setTranslate(n,r)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},l.prototype._onBoxDrag=function(){var t=this.translateX,n=this.translateY;this.hbar&&(t-=p.event.dx),this.vbar&&(n-=p.event.dy),this.setTranslate(t,n)},l.prototype._onBoxWheel=function(){var t=this.translateX,n=this.translateY;this.hbar&&(t+=p.event.deltaY),this.vbar&&(n+=p.event.deltaY),this.setTranslate(t,n)},l.prototype._onBarDrag=function(){var t=this.translateX,n=this.translateY;if(this.hbar){var r=t+this._hbarXMin,a=r+this._hbarTranslateMax,o=k.constrain(p.event.x,r,a),s=(o-r)/(a-r),c=this.position.w-this._box.w;t=s*c}if(this.vbar){var g=n+this._vbarYMin,f=g+this._vbarTranslateMax,v=k.constrain(p.event.y,g,f),m=(v-g)/(f-g),i=this.position.h-this._box.h;n=m*i}this.setTranslate(t,n)},l.prototype.setTranslate=function(t,n){var r=this.position.w-this._box.w,a=this.position.h-this._box.h;if(t=k.constrain(t||0,0,r),n=k.constrain(n||0,0,a),this.translateX=t,this.translateY=n,this.container.call(E.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-n),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+n-.5)}),this.hbar){var o=t/r;this.hbar.call(E.setTranslate,t+o*this._hbarTranslateMax,n)}if(this.vbar){var s=n/a;this.vbar.call(E.setTranslate,t,n+s*this._vbarTranslateMax)}}}}),tF=ze({"src/components/updatemenus/draw.js"(J,G){"use strict";var p=ci(),b=cl(),E=Qn(),k=Xi(),l=Nr(),e=Cs(),t=hs().arrayEditor,n=dc().LINE_SPACING,r=Zx(),a=eF();G.exports=function(I){var O=I._fullLayout,D=l.filterVisible(O[r.name]);function B(ne){b.autoMargin(I,u(ne))}var F=O._menulayer.selectAll("g."+r.containerClassName).data(D.length>0?[0]:[]);if(F.enter().append("g").classed(r.containerClassName,!0).style("cursor","pointer"),F.exit().each(function(){p.select(this).selectAll("g."+r.headerGroupClassName).each(B)}).remove(),D.length!==0){var P=F.selectAll("g."+r.headerGroupClassName).data(D,o);P.enter().append("g").classed(r.headerGroupClassName,!0);for(var j=l.ensureSingle(F,"g",r.dropdownButtonGroupClassName,function(ne){ne.style("pointer-events","all")}),U=0;U0?[0]:[]);$.enter().append("g").classed(r.containerClassName,!0).style("cursor",P?null:"ew-resize");function Q(V){V._commandObserver&&(V._commandObserver.remove(),delete V._commandObserver),b.autoMargin(F,g(V))}if($.exit().each(function(){p.select(this).selectAll("g."+r.groupClassName).each(Q)}).remove(),U.length!==0){var re=$.selectAll("g."+r.groupClassName).data(U,v);re.enter().append("g").classed(r.groupClassName,!0),re.exit().each(Q).remove();for(var ne=0;ne0&&(re=re.transition().duration(F.transition.duration).ease(F.transition.easing)),re.attr("transform",e(Q-r.gripWidth*.5,F._dims.currentValueTotalHeight))}}function z(B,F){var P=B._dims;return P.inputAreaStart+r.stepInset+(P.inputAreaLength-2*r.stepInset)*Math.min(1,Math.max(0,F))}function I(B,F){var P=B._dims;return Math.min(1,Math.max(0,(F-r.stepInset-P.inputAreaStart)/(P.inputAreaLength-2*r.stepInset-2*P.inputAreaStart)))}function O(B,F,P){var j=P._dims,U=l.ensureSingle(B,"rect",r.railTouchRectClass,function($){$.call(h,F,B,P).style("pointer-events","all")});U.attr({width:j.inputAreaLength,height:Math.max(j.inputAreaWidth,r.tickOffset+P.ticklen+j.labelHeight)}).call(E.fill,P.bgcolor).attr("opacity",0),k.setTranslate(U,0,j.currentValueTotalHeight)}function D(B,F){var P=F._dims,j=P.inputAreaLength-r.railInset*2,U=l.ensureSingle(B,"rect",r.railRectClass);U.attr({width:j,height:r.railWidth,rx:r.railRadius,ry:r.railRadius,"shape-rendering":"crispEdges"}).call(E.stroke,F.bordercolor).call(E.fill,F.bgcolor).style("stroke-width",F.borderwidth+"px"),k.setTranslate(U,r.railInset,(P.inputAreaWidth-r.railWidth)*.5+P.currentValueTotalHeight)}}}),iF=ze({"src/components/sliders/index.js"(J,G){"use strict";var p=_g();G.exports={moduleType:"component",name:p.name,layoutAttributes:I5(),supplyLayoutDefaults:aF(),draw:nF()}}}),$x=ze({"src/components/rangeslider/attributes.js"(J,G){"use strict";var p=fc();G.exports={bgcolor:{valType:"color",dflt:p.background,editType:"plot"},bordercolor:{valType:"color",dflt:p.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}}}),D5=ze({"src/components/rangeslider/oppaxis_attributes.js"(J,G){"use strict";G.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}}}),Kx=ze({"src/components/rangeslider/constants.js"(J,G){"use strict";G.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}}}),oF=ze({"src/components/rangeslider/helpers.js"(J){"use strict";var G=Xl(),p=Cs(),b=Kx(),E=dc().LINE_SPACING,k=b.name;function l(e){var t=e&&e[k];return t&&t.visible}J.isVisible=l,J.makeData=function(e){for(var t=G.list({_fullLayout:e},"x",!0),n=e.margin,r=[],a=0;a=qe.max)Ie=he[Ge+1];else if(Se=qe.pmax)Ie=he[Ge+1];else if(Se0?h.touches[0].clientX:0}function f(h,u,A,x){if(u._context.staticPlot)return;var z=h.select("rect."+c.slideBoxClassName).node(),I=h.select("rect."+c.grabAreaMinClassName).node(),O=h.select("rect."+c.grabAreaMaxClassName).node();function D(){var B=p.event,F=B.target,P=g(B),j=P-h.node().getBoundingClientRect().left,U=x.d2p(A._rl[0]),$=x.d2p(A._rl[1]),Q=o.coverSlip();this.addEventListener("touchmove",re),this.addEventListener("touchend",ne),Q.addEventListener("mousemove",re),Q.addEventListener("mouseup",ne);function re(se){var V=g(se),Z=+V-P,K,H,X;switch(F){case z:if(X="ew-resize",U+Z>A._length||$+Z<0)return;K=U+Z,H=$+Z;break;case I:if(X="col-resize",U+Z>A._length)return;K=U+Z,H=$;break;case O:if(X="col-resize",$+Z<0)return;K=U,H=$+Z;break;default:X="ew-resize",K=j,H=j+Z;break}if(H0);if(T){var S=n(o,s,c);m("x",S[0]),m("y",S[1]),p.noneOrAll(a,o,["x","y"]),m("xanchor"),m("yanchor"),p.coerceFont(m,"font",s.font);var M=m("bgcolor");m("activecolor",b.contrast(M,e.lightAmount,e.darkAmount)),m("bordercolor"),m("borderwidth")}};function t(r,a,o,s){var c=s.calendar;function g(m,i){return p.coerce(r,a,l.buttons,m,i)}var f=g("visible");if(f){var v=g("step");v!=="all"&&(c&&c!=="gregorian"&&(v==="month"||v==="year")?a.stepmode="backward":g("stepmode"),g("count")),g("label")}}function n(r,a,o){for(var s=o.filter(function(v){return a[v].anchor===r._id}),c=0,g=0;g1)){delete c.grid;return}if(!m&&!i&&!T){var A=w("pattern")==="independent";A&&(m=!0)}_._hasSubplotGrid=m;var x=w("roworder"),z=x==="top to bottom",I=m?.2:.1,O=m?.3:.1,D,B;S&&c._splomGridDflt&&(D=c._splomGridDflt.xside,B=c._splomGridDflt.yside),_._domains={x:r("x",w,I,D,u),y:r("y",w,O,B,h,z)}}function r(s,c,g,f,v,m){var i=c(s+"gap",g),T=c("domain."+s);c(s+"side",f);for(var S=new Array(v),M=T[0],C=(T[1]-M)/(v-i),_=C*(1-i),w=0;w0,f=t._context.staticPlot;n.each(function(v){var m=v[0].trace,i=m.error_x||{},T=m.error_y||{},S;m.ids&&(S=function(w){return w.id});var M=k.hasMarkers(m)&&m.marker.maxdisplayed>0;!T.visible&&!i.visible&&(v=[]);var C=p.select(this).selectAll("g.errorbar").data(v,S);if(C.exit().remove(),!!v.length){i.visible||C.selectAll("path.xerror").remove(),T.visible||C.selectAll("path.yerror").remove(),C.style("opacity",1);var _=C.enter().append("g").classed("errorbar",!0);g&&_.style("opacity",0).transition().duration(a.duration).style("opacity",1),E.setClipUrl(C,r.layerClipId,t),C.each(function(w){var h=p.select(this),u=l(w,s,c);if(!(M&&!w.vis)){var A,x=h.select("path.yerror");if(T.visible&&b(u.x)&&b(u.yh)&&b(u.ys)){var z=T.width;A="M"+(u.x-z)+","+u.yh+"h"+2*z+"m-"+z+",0V"+u.ys,u.noYS||(A+="m-"+z+",0h"+2*z),o=!x.size(),o?x=h.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("yerror",!0):g&&(x=x.transition().duration(a.duration).ease(a.easing)),x.attr("d",A)}else x.remove();var I=h.select("path.xerror");if(i.visible&&b(u.y)&&b(u.xh)&&b(u.xs)){var O=(i.copy_ystyle?T:i).width;A="M"+u.xh+","+(u.y-O)+"v"+2*O+"m0,-"+O+"H"+u.xs,u.noXS||(A+="m0,-"+O+"v"+2*O),o=!I.size(),o?I=h.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("xerror",!0):g&&(I=I.transition().duration(a.duration).ease(a.easing)),I.attr("d",A)}else I.remove()}})}})};function l(e,t,n){var r={x:t.c2p(e.x),y:n.c2p(e.y)};return e.yh!==void 0&&(r.yh=n.c2p(e.yh),r.ys=n.c2p(e.ys),b(r.ys)||(r.noYS=!0,r.ys=n.c2p(e.ys,!0))),e.xh!==void 0&&(r.xh=t.c2p(e.xh),r.xs=t.c2p(e.xs),b(r.xs)||(r.noXS=!0,r.xs=t.c2p(e.xs,!0))),r}}}),yF=ze({"src/components/errorbars/style.js"(J,G){"use strict";var p=ci(),b=Qn();G.exports=function(k){k.each(function(l){var e=l[0].trace,t=e.error_y||{},n=e.error_x||{},r=p.select(this);r.selectAll("path.yerror").style("stroke-width",t.thickness+"px").call(b.stroke,t.color),n.copy_ystyle&&(n=t),r.selectAll("path.xerror").style("stroke-width",n.thickness+"px").call(b.stroke,n.color)})}}}),_F=ze({"src/components/errorbars/index.js"(J,G){"use strict";var p=Nr(),b=Al().overrideAll,E=B5(),k={error_x:p.extendFlat({},E),error_y:p.extendFlat({},E)};delete k.error_x.copy_zstyle,delete k.error_y.copy_zstyle,delete k.error_y.copy_ystyle;var l={error_x:p.extendFlat({},E),error_y:p.extendFlat({},E),error_z:p.extendFlat({},E)};delete l.error_x.copy_ystyle,delete l.error_y.copy_ystyle,delete l.error_z.copy_ystyle,delete l.error_z.copy_zstyle,G.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:k,bar:k,histogram:k,scatter3d:b(l,"calc","nested"),scattergl:b(k,"calc","nested")}},supplyDefaults:vF(),calc:mF(),makeComputeError:O5(),plot:gF(),style:yF(),hoverInfo:e};function e(t,n,r){(n.error_y||{}).visible&&(r.yerr=t.yh-t.y,n.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(n.error_x||{}).visible&&(r.xerr=t.xh-t.x,n.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}}),xF=ze({"src/components/colorbar/constants.js"(J,G){"use strict";G.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}}),bF=ze({"src/components/colorbar/draw.js"(J,G){"use strict";var p=ci(),b=cl(),E=mi(),k=Gi(),l=_h(),e=Nr(),t=e.strTranslate,n=Ki().extendFlat,r=gd(),a=Xi(),o=Qn(),s=qv(),c=Cs(),g=Bf().flipScale,f=yg(),v=Wx(),m=cf(),i=dc(),T=i.LINE_SPACING,S=i.FROM_TL,M=i.FROM_BR,C=xF().cn;function _(O){var D=O._fullLayout,B=D._infolayer.selectAll("g."+C.colorbar).data(w(O),function(F){return F._id});B.enter().append("g").attr("class",function(F){return F._id}).classed(C.colorbar,!0),B.each(function(F){var P=p.select(this);e.ensureSingle(P,"rect",C.cbbg),e.ensureSingle(P,"g",C.cbfills),e.ensureSingle(P,"g",C.cblines),e.ensureSingle(P,"g",C.cbaxis,function(U){U.classed(C.crisp,!0)}),e.ensureSingle(P,"g",C.cbtitleunshift,function(U){U.append("g").classed(C.cbtitle,!0)}),e.ensureSingle(P,"rect",C.cboutline);var j=A(P,F,O);j&&j.then&&(O._promises||[]).push(j),O._context.edits.colorbarPosition&&x(P,F,O)}),B.exit().each(function(F){b.autoMargin(O,F._id)}).remove(),B.order()}function w(O){var D=O._fullLayout,B=O.calcdata,F=[],P,j,U,$;function Q(ee){return n(ee,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function re(){typeof $.calc=="function"?$.calc(O,U,P):(P._fillgradient=j.reversescale?g(j.colorscale):j.colorscale,P._zrange=[j[$.min],j[$.max]])}for(var ne=0;ne[Math.min(O[0]+D,O[1]),O[1]],u=(O,D)=>[O[0],Math.max(O[1]-D,O[0])];function A(O,D,B){var F=D.orientation==="v",P=D.len,j=D.lenmode,U=D.thickness,$=D.thicknessmode,Q=D.outlinewidth,re=D.borderwidth,ne=D.bgcolor,se=D.xanchor,V=D.yanchor,Z=D.xpad,K=D.ypad,H=D.x,X=F?D.y:1-D.y,q=D.yref==="paper",W=D.xref==="paper",ee=B._fullLayout,ae=ee._size,he=D._fillcolor,xe=D._line,we=D.title,Me=we.side,Se=D._zrange||p.extent((typeof he=="function"?he:xe.color).domain()),Ie=typeof xe.color=="function"?xe.color:function(){return xe.color},Ge=typeof he=="function"?he:function(){return he},qe=D._levels,ke=z(B,D,Se),_e=ke.fill,ue=ke.line,ve=Math.round(U*($==="fraction"?F?ae.w:ae.h:1)),le=ve/(F?ae.w:ae.h),Ae=Math.round(P*(j==="fraction"?F?ae.h:ae.w:1)),Be=Ae/(F?ae.h:ae.w),Xe=W?ae.w:B._fullLayout.width,Ye=q?ae.h:B._fullLayout.height,yt=Math.round(F?H*Xe+Z:X*Ye+K),gt={center:.5,right:1}[se]||0,Tt={top:1,middle:.5}[V]||0,At=F?H-gt*le:X-Tt*le,$t=F?X-Tt*Be:H-gt*Be,rr=Math.round(F?Ye*(1-$t):Xe*$t);D._lenFrac=Be,D._thickFrac=le,D._uFrac=At,D._vFrac=$t;var _r=D._axis=I(B,D,Se);_r.position=le+(F?H+Z/ae.w:X+K/ae.h);var Xt=["top","bottom"].indexOf(Me)!==-1;if(F&&Xt&&(_r.title.side=Me,_r.titlex=H+Z/ae.w,_r.titley=$t+(we.side==="top"?Be-K/ae.h:K/ae.h)),!F&&!Xt&&(_r.title.side=Me,_r.titley=X+K/ae.h,_r.titlex=$t+Z/ae.w),xe.color&&D.tickmode==="auto"){_r.tickmode="linear",_r.tick0=qe.start;var or=qe.size,Ot=e.constrain(Ae/50,4,15)+1,vt=(Se[1]-Se[0])/((D.nticks||Ot)*or);if(vt>1){var ht=Math.pow(10,Math.floor(Math.log(vt)/Math.LN10));or*=ht*e.roundUp(vt/ht,[2,5,10]),(Math.abs(qe.start)/qe.size+1e-6)%1<2e-6&&(_r.tick0=0)}_r.dtick=or}var De=F?K/ae.h:Z/ae.w;_r.domain=u(h([$t,$t+Be],De),De),_r.setScale(),O.attr("transform",t(Math.round(ae.l),Math.round(ae.t)));var Ne=O.select("."+C.cbtitleunshift).attr("transform",t(-Math.round(ae.l),-Math.round(ae.t))),We=_r.ticklabelposition,Ke=_r.title.font.size,Je=O.select("."+C.cbaxis),et,Mt=0,pt=0;function Pt(Sr,Kr){var Yt={propContainer:_r,propName:D._propPrefix+"title.text",traceIndex:D._traceIndex,_meta:D._meta,placeholder:ee._dfltTitle.colorbar,containerGroup:O.select("."+C.cbtitle)},Rt=Sr.charAt(0)==="h"?Sr.slice(1):"h"+Sr;O.selectAll("."+Rt+",."+Rt+"-math-group").remove(),s.draw(B,Sr,n(Yt,Kr||{}))}function Ct(){if(F&&Xt||!F&&!Xt){var Sr,Kr;Me==="top"&&(Sr=Z+ae.l+Xe*H,Kr=K+ae.t+Ye*(1-$t-Be)+3+Ke*.75),Me==="bottom"&&(Sr=Z+ae.l+Xe*H,Kr=K+ae.t+Ye*(1-$t)-3-Ke*.25),Me==="right"&&(Kr=K+ae.t+Ye*X+3+Ke*.75,Sr=Z+ae.l+Xe*$t),Pt(_r._id+"title",{attributes:{x:Sr,y:Kr,"text-anchor":F?"start":"middle"}})}}function qt(){if(F&&!Xt||!F&&Xt){var Sr=_r.position||0,Kr=_r._offset+_r._length/2,Yt,Rt;if(Me==="right")Rt=Kr,Yt=ae.l+Xe*Sr+10+Ke*(_r.showticklabels?1:.5);else if(Yt=Kr,Me==="bottom"&&(Rt=ae.t+Ye*Sr+10+(We.indexOf("inside")===-1?_r.tickfont.size:0)+(_r.ticks!=="inside"&&D.ticklen||0)),Me==="top"){var nr=we.text.split("
").length;Rt=ae.t+Ye*Sr+10-ve-T*Ke*nr}Pt((F?"h":"v")+_r._id+"title",{avoid:{selection:p.select(B).selectAll("g."+_r._id+"tick"),side:Me,offsetTop:F?0:ae.t,offsetLeft:F?ae.l:0,maxShift:F?ee.width:ee.height},attributes:{x:Yt,y:Rt,"text-anchor":"middle"},transform:{rotate:F?-90:0,offset:0}})}}function Vt(){if(!F&&!Xt||F&&Xt){var Sr=O.select("."+C.cbtitle),Kr=Sr.select("text"),Yt=[-Q/2,Q/2],Rt=Sr.select(".h"+_r._id+"title-math-group").node(),nr=15.6;Kr.node()&&(nr=parseInt(Kr.node().style.fontSize,10)*T);var ur;if(Rt?(ur=a.bBox(Rt),pt=ur.width,Mt=ur.height,Mt>nr&&(Yt[1]-=(Mt-nr)/2)):Kr.node()&&!Kr.classed(C.jsPlaceholder)&&(ur=a.bBox(Kr.node()),pt=ur.width,Mt=ur.height),F){if(Mt){if(Mt+=5,Me==="top")_r.domain=u(_r.domain,Mt/ae.h),Yt[1]*=-1;else{_r.domain=h(_r.domain,Mt/ae.h);var cr=c.lineCount(Kr);Yt[1]+=(1-cr)*nr}Sr.attr("transform",t(Yt[0],Yt[1])),_r.setScale()}}else pt&&(Me==="right"&&(_r.domain=h(_r.domain,(pt+Ke/2)/ae.w)),Sr.attr("transform",t(Yt[0],Yt[1])),_r.setScale())}O.selectAll("."+C.cbfills+",."+C.cblines).attr("transform",F?t(0,Math.round(ae.h*(1-_r.domain[1]))):t(Math.round(ae.w*_r.domain[0]),0)),Je.attr("transform",F?t(0,Math.round(-ae.t)):t(Math.round(-ae.l),0));var Rr=O.select("."+C.cbfills).selectAll("rect."+C.cbfill).attr("style","").data(_e);Rr.enter().append("rect").classed(C.cbfill,!0).attr("style",""),Rr.exit().remove();var Qr=Se.map(_r.c2p).map(Math.round).sort(function(un,Xa){return un-Xa});Rr.each(function(un,Xa){var ja=[Xa===0?Se[0]:(_e[Xa]+_e[Xa-1])/2,Xa===_e.length-1?Se[1]:(_e[Xa]+_e[Xa+1])/2].map(_r.c2p).map(Math.round);F&&(ja[1]=e.constrain(ja[1]+(ja[1]>ja[0])?1:-1,Qr[0],Qr[1]));var Nn=p.select(this).attr(F?"x":"y",yt).attr(F?"y":"x",p.min(ja)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(p.max(ja)-p.min(ja),2));if(D._fillgradient)a.gradient(Nn,B,D._id,F?"vertical":"horizontalreversed",D._fillgradient,"fill");else{var yn=Ge(un).replace("e-","");Nn.attr("fill",o.hexString(yn))}});var Zr=O.select("."+C.cblines).selectAll("path."+C.cbline).data(xe.color&&xe.width?ue:[]);Zr.enter().append("path").classed(C.cbline,!0),Zr.exit().remove(),Zr.each(function(un){var Xa=yt,ja=Math.round(_r.c2p(un))+xe.width/2%1;p.select(this).attr("d","M"+(F?Xa+","+ja:ja+","+Xa)+(F?"h":"v")+ve).call(a.lineGroupStyle,xe.width,Ie(un),xe.dash)}),Je.selectAll("g."+_r._id+"tick,path").remove();var ha=yt+ve+(Q||0)/2-(D.ticks==="outside"?1:0),Pa=k.calcTicks(_r),La=k.getTickSigns(_r)[2];return k.drawTicks(B,_r,{vals:_r.ticks==="inside"?k.clipEnds(_r,Pa):Pa,layer:Je,path:k.makeTickPath(_r,ha,La),transFn:k.makeTransTickFn(_r)}),k.drawLabels(B,_r,{vals:Pa,layer:Je,transFn:k.makeTransTickLabelFn(_r),labelFns:k.makeLabelFns(_r,ha)})}function Ht(){var Sr,Kr=ve+Q/2;We.indexOf("inside")===-1&&(Sr=a.bBox(Je.node()),Kr+=F?Sr.width:Sr.height),et=Ne.select("text");var Yt=0,Rt=F&&Me==="top",nr=!F&&Me==="right",ur=0;if(et.node()&&!et.classed(C.jsPlaceholder)){var cr,Rr=Ne.select(".h"+_r._id+"title-math-group").node();Rr&&(F&&Xt||!F&&!Xt)?(Sr=a.bBox(Rr),Yt=Sr.width,cr=Sr.height):(Sr=a.bBox(Ne.node()),Yt=Sr.right-ae.l-(F?yt:rr),cr=Sr.bottom-ae.t-(F?rr:yt),!F&&Me==="top"&&(Kr+=Sr.height,ur=Sr.height)),nr&&(et.attr("transform",t(Yt/2+Ke/2,0)),Yt*=2),Kr=Math.max(Kr,F?Yt:cr)}var Qr=(F?Z:K)*2+Kr+re+Q/2,Zr=0;!F&&we.text&&V==="bottom"&&X<=0&&(Zr=Qr/2,Qr+=Zr,ur+=Zr),ee._hColorbarMoveTitle=Zr,ee._hColorbarMoveCBTitle=ur;var ha=re+Q,Pa=(F?yt:rr)-ha/2-(F?Z:0),La=(F?rr:yt)-(F?Ae:K+ur-Zr);O.select("."+C.cbbg).attr("x",Pa).attr("y",La).attr(F?"width":"height",Math.max(Qr-Zr,2)).attr(F?"height":"width",Math.max(Ae+ha,2)).call(o.fill,ne).call(o.stroke,D.bordercolor).style("stroke-width",re);var un=nr?Math.max(Yt-10,0):0;O.selectAll("."+C.cboutline).attr("x",(F?yt:rr+Z)+un).attr("y",(F?rr+K-Ae:yt)+(Rt?Mt:0)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(Ae-(F?2*K+Mt:2*Z+un),2)).call(o.stroke,D.outlinecolor).style({fill:"none","stroke-width":Q});var Xa=F?gt*Qr:0,ja=F?0:(1-Tt)*Qr-ur;if(Xa=W?ae.l-Xa:-Xa,ja=q?ae.t-ja:-ja,O.attr("transform",t(Xa,ja)),!F&&(re||o.opacity(ne)&&!o.equals(ee.paper_bgcolor,ne))){var Nn=Je.selectAll("text"),yn=Nn[0].length,Un=O.select("."+C.cbbg).node(),li=a.bBox(Un),Yn=a.getTranslate(O),on=2;Nn.each(function(Tr,Ir){var Dr=0,ot=yn-1;if(Ir===Dr||Ir===ot){var kt=a.bBox(this),jt=a.getTranslate(this),ar;if(Ir===ot){var Er=kt.right+jt.x,xr=li.right+Yn.x+rr-re-on+H;ar=xr-Er,ar>0&&(ar=0)}else if(Ir===Dr){var zr=kt.left+jt.x,Lr=li.left+Yn.x+rr+re+on;ar=Lr-zr,ar<0&&(ar=0)}ar&&(yn<3?this.setAttribute("transform","translate("+ar+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var en={},vi=S[se],Yi=M[se],Ja=S[V],Oa=M[V],lt=Qr-ve;F?(j==="pixels"?(en.y=X,en.t=Ae*Ja,en.b=Ae*Oa):(en.t=en.b=0,en.yt=X+P*Ja,en.yb=X-P*Oa),$==="pixels"?(en.x=H,en.l=Qr*vi,en.r=Qr*Yi):(en.l=lt*vi,en.r=lt*Yi,en.xl=H-U*vi,en.xr=H+U*Yi)):(j==="pixels"?(en.x=H,en.l=Ae*vi,en.r=Ae*Yi):(en.l=en.r=0,en.xl=H+P*vi,en.xr=H-P*Yi),$==="pixels"?(en.y=1-X,en.t=Qr*Ja,en.b=Qr*Oa):(en.t=lt*Ja,en.b=lt*Oa,en.yt=X-U*Ja,en.yb=X+U*Oa));var rt=D.y<.5?"b":"t",fr=D.x<.5?"l":"r";B._fullLayout._reservedMargin[D._id]={};var lr={r:ee.width-Pa-Xa,l:Pa+en.r,b:ee.height-La-ja,t:La+en.b};W&&q?b.autoMargin(B,D._id,en):W?B._fullLayout._reservedMargin[D._id][rt]=lr[rt]:q||F?B._fullLayout._reservedMargin[D._id][fr]=lr[fr]:B._fullLayout._reservedMargin[D._id][rt]=lr[rt]}return e.syncOrAsync([b.previousPromises,Ct,Vt,qt,b.previousPromises,Ht],B)}function x(O,D,B){var F=D.orientation==="v",P=B._fullLayout,j=P._size,U,$,Q;l.init({element:O.node(),gd:B,prepFn:function(){U=O.attr("transform"),r(O)},moveFn:function(re,ne){O.attr("transform",U+t(re,ne)),$=l.align((F?D._uFrac:D._vFrac)+re/j.w,F?D._thickFrac:D._lenFrac,0,1,D.xanchor),Q=l.align((F?D._vFrac:1-D._uFrac)-ne/j.h,F?D._lenFrac:D._thickFrac,0,1,D.yanchor);var se=l.getCursor($,Q,D.xanchor,D.yanchor);r(O,se)},doneFn:function(){if(r(O),$!==void 0&&Q!==void 0){var re={};re[D._propPrefix+"x"]=$,re[D._propPrefix+"y"]=Q,D._traceIndex!==void 0?E.call("_guiRestyle",B,re,D._traceIndex):E.call("_guiRelayout",B,re)}}})}function z(O,D,B){var F=D._levels,P=[],j=[],U,$,Q=F.end+F.size/100,re=F.size,ne=1.001*B[0]-.001*B[1],se=1.001*B[1]-.001*B[0];for($=0;$<1e5&&(U=F.start+$*re,!(re>0?U>=Q:U<=Q));$++)U>ne&&U0?U>=Q:U<=Q));$++)U>B[0]&&U-1}G.exports=function(n,r){var a,o=n.data,s=n.layout,c=k([],o),g=k({},s,l(r.tileClass)),f=n._context||{};if(r.width&&(g.width=r.width),r.height&&(g.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){g.annotations=[];var v=Object.keys(g);for(a=0;a=0)return f}else if(typeof f=="string"&&(f=f.trim(),f.slice(-1)==="%"&&p(f.slice(0,-1))&&(f=+f.slice(0,-1),f>=0)))return f+"%"}function g(f,v,m,i,T,S){S=S||{};var M=S.moduleHasSelected!==!1,C=S.moduleHasUnselected!==!1,_=S.moduleHasConstrain!==!1,w=S.moduleHasCliponaxis!==!1,h=S.moduleHasTextangle!==!1,u=S.moduleHasInsideanchor!==!1,A=!!S.hasPathbar,x=Array.isArray(T)||T==="auto",z=x||T==="inside",I=x||T==="outside";if(z||I){var O=a(i,"textfont",m.font),D=b.extendFlat({},O),B=f.textfont&&f.textfont.color,F=!B;if(F&&delete D.color,a(i,"insidetextfont",D),A){var P=b.extendFlat({},O);F&&delete P.color,a(i,"pathbar.textfont",P)}I&&a(i,"outsidetextfont",O),M&&i("selected.textfont.color"),C&&i("unselected.textfont.color"),_&&i("constraintext"),w&&i("cliponaxis"),h&&i("textangle"),i("texttemplate"),i("texttemplatefallback")}z&&u&&i("insidetextanchor")}G.exports={supplyDefaults:o,crossTraceDefaults:s,handleText:g,validateCornerradius:c}}}),j5=ze({"src/traces/bar/layout_defaults.js"(J,G){"use strict";var p=mi(),b=Gi(),E=Nr(),k=Qx(),l=qh().validateCornerradius;G.exports=function(e,t,n){function r(M,C){return E.coerce(e,t,k,M,C)}for(var a=!1,o=!1,s=!1,c={},g=r("barmode"),f=g==="group",v=0;v0&&!c[i]&&(s=!0),c[i]=!0),m.visible&&m.type==="histogram"){var T=b.getFromId({_fullLayout:t},m[m.orientation==="v"?"xaxis":"yaxis"]);T.type!=="category"&&(o=!0)}}if(!a){delete t.barmode;return}g!=="overlay"&&r("barnorm"),r("bargap",o&&!s?0:.2),r("bargroupgap");var S=r("barcornerradius");t.barcornerradius=l(S)}}}),xg=ze({"src/traces/bar/arrays_to_calcdata.js"(J,G){"use strict";var p=Nr();G.exports=function(E,k){for(var l=0;lt;if(!n)return k}return l!==void 0?l:E.dflt},J.coerceColor=function(E,k,l){return G.isValid(k)?k:l!==void 0?l:E.dflt},J.coerceEnumerated=function(E,k,l){return E.coerceNumber&&(k=+k),E.values.indexOf(k)!==-1?k:l!==void 0?l:E.dflt},J.getValue=function(E,k){var l;return b(E)?k1||A.bargap===0&&A.bargroupgap===0&&!x[0].trace.marker.line.width)&&p.select(this).attr("shape-rendering","crispEdges")}),h.selectAll("g.points").each(function(x){var z=p.select(this),I=x[0].trace;c(z,I,w)}),l.getComponentMethod("errorbars","style")(h)}function c(w,h,u){E.pointStyle(w.selectAll("path"),h,u),g(w,h,u)}function g(w,h,u){w.selectAll("text").each(function(A){var x=p.select(this),z=k.ensureUniformFontSize(u,i(x,A,h,u));E.font(x,z)})}function f(w,h,u){var A=h[0].trace;A.selectedpoints?v(u,A,w):(c(u,A,w),l.getComponentMethod("errorbars","style")(u))}function v(w,h,u){E.selectedPointStyle(w.selectAll("path"),h),m(w.selectAll("text"),h,u)}function m(w,h,u){w.each(function(A){var x=p.select(this),z;if(A.selected){z=k.ensureUniformFontSize(u,i(x,A,h,u));var I=h.selected.textfont&&h.selected.textfont.color;I&&(z.color=I),E.font(x,z)}else E.selectedTextStyle(x,h)})}function i(w,h,u,A){var x=A._fullLayout.font,z=u.textfont;if(w.classed("bartext-inside")){var I=_(h,u);z=S(u,h.i,x,I)}else w.classed("bartext-outside")&&(z=M(u,h.i,x));return z}function T(w,h,u){return C(n,w.textfont,h,u)}function S(w,h,u,A){var x=T(w,h,u),z=w._input.textfont===void 0||w._input.textfont.color===void 0||Array.isArray(w.textfont.color)&&w.textfont.color[h]===void 0;return z&&(x={color:b.contrast(A),family:x.family,size:x.size,weight:x.weight,style:x.style,variant:x.variant,textcase:x.textcase,lineposition:x.lineposition,shadow:x.shadow}),C(r,w.insidetextfont,h,x)}function M(w,h,u){var A=T(w,h,u);return C(a,w.outsidetextfont,h,A)}function C(w,h,u,A){h=h||{};var x=o.getValue(h.family,u),z=o.getValue(h.size,u),I=o.getValue(h.color,u),O=o.getValue(h.weight,u),D=o.getValue(h.style,u),B=o.getValue(h.variant,u),F=o.getValue(h.textcase,u),P=o.getValue(h.lineposition,u),j=o.getValue(h.shadow,u);return{family:o.coerceString(w.family,x,A.family),size:o.coerceNumber(w.size,z,A.size),color:o.coerceColor(w.color,I,A.color),weight:o.coerceString(w.weight,O,A.weight),style:o.coerceString(w.style,D,A.style),variant:o.coerceString(w.variant,B,A.variant),textcase:o.coerceString(w.variant,F,A.textcase),lineposition:o.coerceString(w.variant,P,A.lineposition),shadow:o.coerceString(w.variant,j,A.shadow)}}function _(w,h){return h.type==="waterfall"?h[w.dir].marker.color:w.mcc||w.mc||h.marker.color}G.exports={style:s,styleTextPoints:g,styleOnSelect:f,getInsideTextFont:S,getOutsideTextFont:M,getBarColor:_,resizeText:e}}}),Xv=ze({"src/traces/bar/plot.js"(J,G){"use strict";var p=ci(),b=ao(),E=Nr(),k=Cs(),l=Qn(),e=Xi(),t=mi(),n=Gi().tickText,r=eh(),a=r.recordMinTextSize,o=r.clearMinTextSize,s=ld(),c=tb(),g=hv(),f=jd(),v=f.text,m=f.textposition,i=kh().appendArrayPointValue,T=g.TEXTPAD;function S(re){return re.id}function M(re){if(re.ids)return S}function C(re){return(re>0)-(re<0)}function _(re,ne){return re0}function A(re,ne,se,V,Z,K){var H=ne.xaxis,X=ne.yaxis,q=re._fullLayout,W=re._context.staticPlot;Z||(Z={mode:q.barmode,norm:q.barmode,gap:q.bargap,groupgap:q.bargroupgap},o("bar",q));var ee=E.makeTraceGroups(V,se,"trace bars").each(function(ae){var he=p.select(this),xe=ae[0].trace,we=ae[0].t,Me=xe.type==="waterfall",Se=xe.type==="funnel",Ie=xe.type==="histogram",Ge=xe.type==="bar",qe=Ge||Se,ke=0;Me&&xe.connector.visible&&xe.connector.mode==="between"&&(ke=xe.connector.line.width/2);var _e=xe.orientation==="h",ue=u(Z),ve=E.ensureSingle(he,"g","points"),le=M(xe),Ae=ve.selectAll("g.point").data(E.identity,le);Ae.enter().append("g").classed("point",!0),Ae.exit().remove(),Ae.each(function(Xe,Ye){var yt=p.select(this),gt=w(Xe,H,X,_e),Tt=gt[0][0],At=gt[0][1],$t=gt[1][0],rr=gt[1][1],_r=(_e?At-Tt:rr-$t)===0;_r&&qe&&c.getLineWidth(xe,Xe)&&(_r=!1),_r||(_r=!b(Tt)||!b(At)||!b($t)||!b(rr)),Xe.isBlank=_r,_r&&(_e?At=Tt:rr=$t),ke&&!_r&&(_e?(Tt-=_(Tt,At)*ke,At+=_(Tt,At)*ke):($t-=_($t,rr)*ke,rr+=_($t,rr)*ke));var Xt,or;if(xe.type==="waterfall"){if(!_r){var Ot=xe[Xe.dir].marker;Xt=Ot.line.width,or=Ot.color}}else Xt=c.getLineWidth(xe,Xe),or=Xe.mc||xe.marker.color;function vt(Zr){var ha=p.round(Xt/2%1,2);return Z.gap===0&&Z.groupgap===0?p.round(Math.round(Zr)-ha,2):Zr}function ht(Zr,ha,Pa){return Pa&&Zr===ha?Zr:Math.abs(Zr-ha)>=2?vt(Zr):Zr>ha?Math.ceil(Zr):Math.floor(Zr)}var De=l.opacity(or),Ne=De<1||Xt>.01?vt:ht;re._context.staticPlot||(Tt=Ne(Tt,At,_e),At=Ne(At,Tt,_e),$t=Ne($t,rr,!_e),rr=Ne(rr,$t,!_e));var We=_e?H.c2p:X.c2p,Ke;Xe.s0>0?Ke=Xe._sMax:Xe.s0<0?Ke=Xe._sMin:Ke=Xe.s1>0?Xe._sMax:Xe._sMin;function Je(Zr,ha){if(!Zr)return 0;var Pa=Math.abs(_e?rr-$t:At-Tt),La=Math.abs(_e?At-Tt:rr-$t),un=Ne(Math.abs(We(Ke,!0)-We(0,!0))),Xa=Xe.hasB?Math.min(Pa/2,La/2):Math.min(Pa/2,un),ja;if(ha==="%"){var Nn=Math.min(50,Zr);ja=Pa*(Nn/100)}else ja=Zr;return Ne(Math.max(Math.min(ja,Xa),0))}var et=Ge||Ie?Je(we.cornerradiusvalue,we.cornerradiusform):0,Mt,pt,Pt="M"+Tt+","+$t+"V"+rr+"H"+At+"V"+$t+"Z",Ct=0;if(et&&Xe.s){var qt=C(Xe.s0)===0||C(Xe.s)===C(Xe.s0)?Xe.s1:Xe.s0;if(Ct=Ne(Xe.hasB?0:Math.abs(We(Ke,!0)-We(qt,!0))),Ct0?Math.sqrt(Ct*(2*et-Ct)):0,Rt=Vt>0?Math.max:Math.min;Mt="M"+Tt+","+$t+"V"+(rr-Kr*Ht)+"H"+Rt(At-(et-Ct)*Vt,Tt)+"A "+et+","+et+" 0 0 "+Sr+" "+At+","+(rr-et*Ht-Yt)+"V"+($t+et*Ht+Yt)+"A "+et+","+et+" 0 0 "+Sr+" "+Rt(At-(et-Ct)*Vt,Tt)+","+($t+Kr*Ht)+"Z"}else if(Xe.hasB)Mt="M"+(Tt+et*Vt)+","+$t+"A "+et+","+et+" 0 0 "+Sr+" "+Tt+","+($t+et*Ht)+"V"+(rr-et*Ht)+"A "+et+","+et+" 0 0 "+Sr+" "+(Tt+et*Vt)+","+rr+"H"+(At-et*Vt)+"A "+et+","+et+" 0 0 "+Sr+" "+At+","+(rr-et*Ht)+"V"+($t+et*Ht)+"A "+et+","+et+" 0 0 "+Sr+" "+(At-et*Vt)+","+$t+"Z";else{pt=Math.abs(rr-$t)+Ct;var nr=pt0?Math.sqrt(Ct*(2*et-Ct)):0,cr=Ht>0?Math.max:Math.min;Mt="M"+(Tt+nr*Vt)+","+$t+"V"+cr(rr-(et-Ct)*Ht,$t)+"A "+et+","+et+" 0 0 "+Sr+" "+(Tt+et*Vt-ur)+","+rr+"H"+(At-et*Vt+ur)+"A "+et+","+et+" 0 0 "+Sr+" "+(At-nr*Vt)+","+cr(rr-(et-Ct)*Ht,$t)+"V"+$t+"Z"}}else Mt=Pt}else Mt=Pt;var Rr=h(E.ensureSingle(yt,"path"),q,Z,K);if(Rr.style("vector-effect",W?"none":"non-scaling-stroke").attr("d",isNaN((At-Tt)*(rr-$t))||_r&&re._context.staticPlot?"M0,0Z":Mt).call(e.setClipUrl,ne.layerClipId,re),!q.uniformtext.mode&&ue){var Qr=e.makePointStyleFns(xe);e.singlePointStyle(Xe,Rr,xe,Qr,re)}x(re,ne,yt,ae,Ye,Tt,At,$t,rr,et,Ct,Z,K),ne.layerClipId&&e.hideOutsideRangePoint(Xe,yt.select("text"),H,X,xe.xcalendar,xe.ycalendar)});var Be=xe.cliponaxis===!1;e.setClipUrl(he,Be?null:ne.layerClipId,re)});t.getComponentMethod("errorbars","plot")(re,ee,ne,Z)}function x(re,ne,se,V,Z,K,H,X,q,W,ee,ae,he){var xe=ne.xaxis,we=ne.yaxis,Me=re._fullLayout,Se;function Ie(Pt,Ct,qt){var Vt=E.ensureSingle(Pt,"text").text(Ct).attr({class:"bartext bartext-"+Se,"text-anchor":"middle","data-notex":1}).call(e.font,qt).call(k.convertToTspans,re);return Vt}var Ge=V[0].trace,qe=Ge.orientation==="h",ke=U(V,qe,xe,we),_e=P(Me,V,Z,xe,we);Se=j(Ge,Z);var ue=ae.mode==="stack"||ae.mode==="relative",ve=V[Z],le=!ue||ve._outmost,Ae=ve.hasB,Be=W&&W-ee>T;if(!_e||Se==="none"||(ve.isBlank||K===H||X===q)&&(Se==="auto"||Se==="inside")){se.select("text").remove();return}var Xe=Me.font,Ye=s.getBarColor(V[Z],Ge),yt=s.getInsideTextFont(Ge,Z,Xe,Ye),gt=s.getOutsideTextFont(Ge,Z,Xe),Tt=Ge.insidetextanchor||"end",At=se.datum();qe?xe.type==="log"&&At.s0<=0&&(xe.range[0]0&&ht>0,We;Be?Ae?We=z(_r-2*W,Xt,vt,ht,qe)||z(_r,Xt-2*W,vt,ht,qe):qe?We=z(_r-(W-ee),Xt,vt,ht,qe)||z(_r,Xt-2*(W-ee),vt,ht,qe):We=z(_r,Xt-(W-ee),vt,ht,qe)||z(_r-2*(W-ee),Xt,vt,ht,qe):We=z(_r,Xt,vt,ht,qe),Ne&&We?Se="inside":(Se="outside",or.remove(),or=null)}else Se="inside";if(!or){De=E.ensureUniformFontSize(re,Se==="outside"?gt:yt),or=Ie(se,_e,De);var Ke=or.attr("transform");if(or.attr("transform",""),Ot=e.bBox(or.node()),vt=Ot.width,ht=Ot.height,or.attr("transform",Ke),vt<=0||ht<=0){or.remove();return}}var Je=Ge.textangle,et,Mt;Se==="outside"?(Mt=Ge.constraintext==="both"||Ge.constraintext==="outside",et=F(K,H,X,q,Ot,{isHorizontal:qe,constrained:Mt,angle:Je,zeroBarDir:ke})):(Mt=Ge.constraintext==="both"||Ge.constraintext==="inside",et=D(K,H,X,q,Ot,{isHorizontal:qe,constrained:Mt,angle:Je,anchor:Tt,hasB:Ae,r:W,overhead:ee})),et.fontSize=De.size,a(Ge.type==="histogram"?"bar":Ge.type,et,Me),ve.transform=et;var pt=h(or,Me,ae,he);E.setTransormAndDisplay(pt,et)}function z(re,ne,se,V,Z){if(re<0||ne<0)return!1;var K=se<=re&&V<=ne,H=se<=ne&&V<=re,X=Z?re>=se*(ne/V):ne>=V*(re/se);return K||H||X}function I(re){return re==="auto"?0:re}function O(re,ne){var se=Math.PI/180*ne,V=Math.abs(Math.sin(se)),Z=Math.abs(Math.cos(se));return{x:re.width*Z+re.height*V,y:re.width*V+re.height*Z}}function D(re,ne,se,V,Z,K){var H=!!K.isHorizontal,X=!!K.constrained,q=K.angle||0,W=K.anchor,ee=W==="end",ae=W==="start",he=K.leftToRight||0,xe=(he+1)/2,we=1-xe,Me=K.hasB,Se=K.r,Ie=K.overhead,Ge=Z.width,qe=Z.height,ke=Math.abs(ne-re),_e=Math.abs(V-se),ue=ke>2*T&&_e>2*T?T:0;ke-=2*ue,_e-=2*ue;var ve=I(q);q==="auto"&&!(Ge<=ke&&qe<=_e)&&(Ge>ke||qe>_e)&&(!(Ge>_e||qe>ke)||GeT){var Xe=B(re,ne,se,V,le,Se,Ie,H,Me);Ae=Xe.scale,Be=Xe.pad}else Ae=1,X&&(Ae=Math.min(1,ke/le.x,_e/le.y)),Be=0;var Ye=Z.left*we+Z.right*xe,yt=(Z.top+Z.bottom)/2,gt=(re+T)*we+(ne-T)*xe,Tt=(se+V)/2,At=0,$t=0;if(ae||ee){var rr=(H?le.x:le.y)/2;Se&&(ee||Me)&&(ue+=Be);var _r=H?_(re,ne):_(se,V);H?ae?(gt=re+_r*ue,At=-_r*rr):(gt=ne-_r*ue,At=_r*rr):ae?(Tt=se+_r*ue,$t=-_r*rr):(Tt=V-_r*ue,$t=_r*rr)}return{textX:Ye,textY:yt,targetX:gt,targetY:Tt,anchorX:At,anchorY:$t,scale:Ae,rotate:ve}}function B(re,ne,se,V,Z,K,H,X,q){var W=Math.max(0,Math.abs(ne-re)-2*T),ee=Math.max(0,Math.abs(V-se)-2*T),ae=K-T,he=H?ae-Math.sqrt(ae*ae-(ae-H)*(ae-H)):ae,xe=q?ae*2:X?ae-H:2*he,we=q?ae*2:X?2*he:ae-H,Me,Se,Ie,Ge,qe;return Z.y/Z.x>=ee/(W-xe)?Ge=ee/Z.y:Z.y/Z.x<=(ee-we)/W?Ge=W/Z.x:!q&&X?(Me=Z.x*Z.x+Z.y*Z.y/4,Se=-2*Z.x*(W-ae)-Z.y*(ee/2-ae),Ie=(W-ae)*(W-ae)+(ee/2-ae)*(ee/2-ae)-ae*ae,Ge=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)):q?(Me=(Z.x*Z.x+Z.y*Z.y)/4,Se=-Z.x*(W/2-ae)-Z.y*(ee/2-ae),Ie=(W/2-ae)*(W/2-ae)+(ee/2-ae)*(ee/2-ae)-ae*ae,Ge=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)):(Me=Z.x*Z.x/4+Z.y*Z.y,Se=-Z.x*(W/2-ae)-2*Z.y*(ee-ae),Ie=(W/2-ae)*(W/2-ae)+(ee-ae)*(ee-ae)-ae*ae,Ge=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)),Ge=Math.min(1,Ge),X?qe=Math.max(0,ae-Math.sqrt(Math.max(0,ae*ae-(ae-(ee-Z.y*Ge)/2)*(ae-(ee-Z.y*Ge)/2)))-H):qe=Math.max(0,ae-Math.sqrt(Math.max(0,ae*ae-(ae-(W-Z.x*Ge)/2)*(ae-(W-Z.x*Ge)/2)))-H),{scale:Ge,pad:qe}}function F(re,ne,se,V,Z,K){var H=!!K.isHorizontal,X=!!K.constrained,q=K.angle||0,W=Z.width,ee=Z.height,ae=Math.abs(ne-re),he=Math.abs(V-se),xe;H?xe=he>2*T?T:0:xe=ae>2*T?T:0;var we=1;X&&(we=H?Math.min(1,he/ee):Math.min(1,ae/W));var Me=I(q),Se=O(Z,Me),Ie=(H?Se.x:Se.y)/2,Ge=(Z.left+Z.right)/2,qe=(Z.top+Z.bottom)/2,ke=(re+ne)/2,_e=(se+V)/2,ue=0,ve=0,le;return(H?re===ne:se===V)&&K.zeroBarDir?le=K.zeroBarDir:le=H?_(ne,re):_(se,V),H?(ke=ne-le*xe,ue=le*Ie):(_e=V+le*xe,ve=-le*Ie),{textX:Ge,textY:qe,targetX:ke,targetY:_e,anchorX:ue,anchorY:ve,scale:we,rotate:Me}}function P(re,ne,se,V,Z){var K=ne[0].trace,H=K.texttemplate,X;return H?X=$(re,ne,se,V,Z):K.textinfo?X=Q(ne,se,V,Z):X=c.getValue(K.text,se),c.coerceString(v,X)}function j(re,ne){var se=c.getValue(re.textposition,ne);return c.coerceEnumerated(m,se)}function U(re,ne,se,V){for(var Z=!1,K=!1,H=0;H0?Z=!0:X<0&&(K=!0),Z&&K)return 0}var q=ne?se:V,W=-_(q.range[0],q.range[1]);return K?Z?0:-W:W}function $(re,ne,se,V,Z){var K=ne[0].trace,H=E.castOption(K,se,"texttemplate");if(!H)return"";var X=K.type==="histogram",q=K.type==="waterfall",W=K.type==="funnel",ee=K.orientation==="h",ae,he,xe,we;ee?(ae="y",he=Z,xe="x",we=V):(ae="x",he=V,xe="y",we=Z);function Me(ue){return n(he,he.c2l(ue),!0).text}function Se(ue){return n(we,we.c2l(ue),!0).text}var Ie=ne[se],Ge={};Ge.label=Ie.p,Ge.labelLabel=Ge[ae+"Label"]=Me(Ie.p);var qe=E.castOption(K,Ie.i,"text");(qe===0||qe)&&(Ge.text=qe),Ge.value=Ie.s,Ge.valueLabel=Ge[xe+"Label"]=Se(Ie.s);var ke={};i(ke,K,Ie.i),(X||ke.x===void 0)&&(ke.x=ee?Ge.value:Ge.label),(X||ke.y===void 0)&&(ke.y=ee?Ge.label:Ge.value),(X||ke.xLabel===void 0)&&(ke.xLabel=ee?Ge.valueLabel:Ge.labelLabel),(X||ke.yLabel===void 0)&&(ke.yLabel=ee?Ge.labelLabel:Ge.valueLabel),q&&(Ge.delta=+Ie.rawS||Ie.s,Ge.deltaLabel=Se(Ge.delta),Ge.final=Ie.v,Ge.finalLabel=Se(Ge.final),Ge.initial=Ge.final-Ge.delta,Ge.initialLabel=Se(Ge.initial)),W&&(Ge.value=Ie.s,Ge.valueLabel=Se(Ge.value),Ge.percentInitial=Ie.begR,Ge.percentInitialLabel=E.formatPercent(Ie.begR),Ge.percentPrevious=Ie.difR,Ge.percentPreviousLabel=E.formatPercent(Ie.difR),Ge.percentTotal=Ie.sumR,Ge.percenTotalLabel=E.formatPercent(Ie.sumR));var _e=E.castOption(K,Ie.i,"customdata");return _e&&(Ge.customdata=_e),E.texttemplateString({data:[ke,Ge,K._meta],fallback:K.texttemplatefallback,labels:Ge,locale:re._d3locale,template:H})}function Q(re,ne,se,V){var Z=re[0].trace,K=Z.orientation==="h",H=Z.type==="waterfall",X=Z.type==="funnel";function q(_e){var ue=K?V:se;return n(ue,_e,!0).text}function W(_e){var ue=K?se:V;return n(ue,+_e,!0).text}var ee=Z.textinfo,ae=re[ne],he=ee.split("+"),xe=[],we,Me=function(_e){return he.indexOf(_e)!==-1};if(Me("label")&&xe.push(q(re[ne].p)),Me("text")&&(we=E.castOption(Z,ae.i,"text"),(we===0||we)&&xe.push(we)),H){var Se=+ae.rawS||ae.s,Ie=ae.v,Ge=Ie-Se;Me("initial")&&xe.push(W(Ge)),Me("delta")&&xe.push(W(Se)),Me("final")&&xe.push(W(Ie))}if(X){Me("value")&&xe.push(W(ae.s));var qe=0;Me("percent initial")&&qe++,Me("percent previous")&&qe++,Me("percent total")&&qe++;var ke=qe>1;Me("percent initial")&&(we=E.formatPercent(ae.begR),ke&&(we+=" of initial"),xe.push(we)),Me("percent previous")&&(we=E.formatPercent(ae.difR),ke&&(we+=" of previous"),xe.push(we)),Me("percent total")&&(we=E.formatPercent(ae.sumR),ke&&(we+=" of total"),xe.push(we))}return xe.join("
")}G.exports={plot:A,toMoveInsideBar:D}}}),e1=ze({"src/traces/bar/hover.js"(J,G){"use strict";var p=Zl(),b=mi(),E=Qn(),k=Nr().fillText,l=tb().getLineWidth,e=Gi().hoverLabelText,t=No().BADNUM;function n(o,s,c,g,f){var v=r(o,s,c,g,f);if(v){var m=v.cd,i=m[0].trace,T=m[v.index];return v.color=a(i,T),b.getComponentMethod("errorbars","hoverInfo")(T,i,v),[v]}}function r(o,s,c,g,f){var v=o.cd,m=v[0].trace,i=v[0].t,T=g==="closest",S=m.type==="waterfall",M=o.maxHoverDistance,C=o.maxSpikeDistance,_,w,h,u,A,x,z;m.orientation==="h"?(_=c,w=s,h="y",u="x",A=se,x=Q):(_=s,w=c,h="x",u="y",x=se,A=Q);var I=m[h+"period"],O=T||I;function D(xe){return F(xe,-1)}function B(xe){return F(xe,1)}function F(xe,we){var Me=xe.w;return xe[h]+we*Me/2}function P(xe){return xe[h+"End"]-xe[h+"Start"]}var j=T?D:I?function(xe){return xe.p-P(xe)/2}:function(xe){return Math.min(D(xe),xe.p-i.bardelta/2)},U=T?B:I?function(xe){return xe.p+P(xe)/2}:function(xe){return Math.max(B(xe),xe.p+i.bardelta/2)};function $(xe,we,Me){return f.finiteRange&&(Me=0),p.inbox(xe-_,we-_,Me+Math.min(1,Math.abs(we-xe)/z)-1)}function Q(xe){return $(j(xe),U(xe),M)}function re(xe){return $(D(xe),B(xe),C)}function ne(xe){var we=xe[u];if(S){var Me=Math.abs(xe.rawS)||0;w>0?we+=Me:w<0&&(we-=Me)}return we}function se(xe){var we=w,Me=xe.b,Se=ne(xe);return p.inbox(Me-we,Se-we,M+(Se-we)/(Se-Me)-1)}function V(xe){var we=w,Me=xe.b,Se=ne(xe);return p.inbox(Me-we,Se-we,C+(Se-we)/(Se-Me)-1)}var Z=o[h+"a"],K=o[u+"a"];z=Math.abs(Z.r2c(Z.range[1])-Z.r2c(Z.range[0]));function H(xe){return(A(xe)+x(xe))/2}var X=p.getDistanceFunction(g,A,x,H);if(p.getClosest(v,X,o),o.index!==!1&&v[o.index].p!==t){O||(j=function(xe){return Math.min(D(xe),xe.p-i.bargroupwidth/2)},U=function(xe){return Math.max(B(xe),xe.p+i.bargroupwidth/2)});var q=o.index,W=v[q],ee=m.base?W.b+W.s:W.s;o[u+"0"]=o[u+"1"]=K.c2p(W[u],!0),o[u+"LabelVal"]=ee;var ae=i.extents[i.extents.round(W.p)];o[h+"0"]=Z.c2p(T?j(W):ae[0],!0),o[h+"1"]=Z.c2p(T?U(W):ae[1],!0);var he=W.orig_p!==void 0;return o[h+"LabelVal"]=he?W.orig_p:W.p,o.labelLabel=e(Z,o[h+"LabelVal"],m[h+"hoverformat"]),o.valueLabel=e(K,o[u+"LabelVal"],m[u+"hoverformat"]),o.baseLabel=e(K,W.b,m[u+"hoverformat"]),o.spikeDistance=(V(W)+re(W))/2,o[h+"Spike"]=Z.c2p(W.p,!0),k(W,m,o),o.hovertemplate=m.hovertemplate,o}}function a(o,s){var c=s.mcc||o.marker.color,g=s.mlcc||o.marker.line.color,f=l(o,s);if(E.opacity(c))return c;if(E.opacity(g)&&f)return g}G.exports={hoverPoints:n,hoverOnBars:r,getTraceColor:a}}}),PF=ze({"src/traces/bar/event_data.js"(J,G){"use strict";G.exports=function(b,E,k){return b.x="xVal"in E?E.xVal:E.x,b.y="yVal"in E?E.yVal:E.y,E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),k.orientation==="h"?(b.label=b.y,b.value=b.x):(b.label=b.x,b.value=b.y),b}}}),t1=ze({"src/traces/bar/select.js"(J,G){"use strict";G.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,n=l[0].trace,r=n.type==="funnel",a=n.orientation==="h",o=[],s;if(k===!1)for(s=0;s0?(I="v",h>0?O=Math.min(A,u):O=Math.min(u)):h>0?(I="h",O=Math.min(A)):O=0;if(!O){c.visible=!1;return}c._length=O;var j=g("orientation",I);c._hasPreCompStats?j==="v"&&h===0?(g("x0",0),g("dx",1)):j==="h"&&w===0&&(g("y0",0),g("dy",1)):j==="v"&&h===0?g("x0"):j==="h"&&w===0&&g("y0");var U=b.getComponentMethod("calendars","handleTraceDefaults");U(s,c,["x","y"],f)}function a(s,c,g,f){var v=f.prefix,m=p.coerce2(s,c,t,"marker.outliercolor"),i=g("marker.line.outliercolor"),T="outliers";c._hasPreCompStats?T="all":(m||i)&&(T="suspectedoutliers");var S=g(v+"points",T);S?(g("jitter",S==="all"?.3:0),g("pointpos",S==="all"?-1.5:0),g("marker.symbol"),g("marker.opacity"),g("marker.size"),g("marker.angle"),g("marker.color",c.line.color),g("marker.line.color"),g("marker.line.width"),S==="suspectedoutliers"&&(g("marker.line.outliercolor",c.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 c.marker;var M=g("hoveron");(M==="all"||M.indexOf("points")!==-1)&&(g("hovertemplate"),g("hovertemplatefallback")),p.coerceSelectionMarkerOpacity(c,g)}function o(s,c){var g,f;function v(S){return p.coerce(f._input,f,t,S)}for(var m=0;mne.uf};if(C._hasPreCompStats){var q=C[O],W=function(rr){return I.d2c((C[rr]||[])[x])},ee=1/0,ae=-1/0;for(x=0;x=ne.q1&&ne.q3>=ne.med){var xe=W("lowerfence");ne.lf=xe!==l&&xe<=ne.q1?xe:f(ne,V,Z);var we=W("upperfence");ne.uf=we!==l&&we>=ne.q3?we:v(ne,V,Z);var Me=W("mean");ne.mean=Me!==l?Me:Z?k.mean(V,Z):(ne.q1+ne.q3)/2;var Se=W("sd");ne.sd=Me!==l&&Se>=0?Se:Z?k.stdev(V,Z,ne.mean):ne.q3-ne.q1,ne.lo=m(ne),ne.uo=i(ne);var Ie=W("notchspan");Ie=Ie!==l&&Ie>0?Ie:T(ne,Z),ne.ln=ne.med-Ie,ne.un=ne.med+Ie;var Ge=ne.lf,qe=ne.uf;C.boxpoints&&V.length&&(Ge=Math.min(Ge,V[0]),qe=Math.max(qe,V[Z-1])),C.notched&&(Ge=Math.min(Ge,ne.ln),qe=Math.max(qe,ne.un)),ne.min=Ge,ne.max=qe}else{k.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+ne.q1,"median = "+ne.med,"q3 = "+ne.q3].join(` +`));var ke;ne.med!==l?ke=ne.med:ne.q1!==l?ne.q3!==l?ke=(ne.q1+ne.q3)/2:ke=ne.q1:ne.q3!==l?ke=ne.q3:ke=0,ne.med=ke,ne.q1=ne.q3=ke,ne.lf=ne.uf=ke,ne.mean=ne.sd=ke,ne.ln=ne.un=ke,ne.min=ne.max=ke}ee=Math.min(ee,ne.min),ae=Math.max(ae,ne.max),ne.pts2=se.filter(X),u.push(ne)}}C._extremes[I._id]=b.findExtremes(I,[ee,ae],{padded:!0})}else{var _e=I.makeCalcdata(C,O),ue=n(Q,re),ve=Q.length,le=r(ve);for(x=0;x=0&&Ae0){if(ne={},ne.pos=ne[B]=Q[x],se=ne.pts=le[x].sort(c),V=ne[O]=se.map(g),Z=V.length,ne.min=V[0],ne.max=V[Z-1],ne.mean=k.mean(V,Z),ne.sd=k.stdev(V,Z,ne.mean)*C.sdmultiple,ne.med=k.interp(V,.5),Z%2&&(yt||gt)){var Tt,At;yt?(Tt=V.slice(0,Z/2),At=V.slice(Z/2+1)):gt&&(Tt=V.slice(0,Z/2+1),At=V.slice(Z/2)),ne.q1=k.interp(Tt,.5),ne.q3=k.interp(At,.5)}else ne.q1=k.interp(V,.25),ne.q3=k.interp(V,.75);ne.lf=f(ne,V,Z),ne.uf=v(ne,V,Z),ne.lo=m(ne),ne.uo=i(ne);var $t=T(ne,Z);ne.ln=ne.med-$t,ne.un=ne.med+$t,Be=Math.min(Be,ne.ln),Xe=Math.max(Xe,ne.un),ne.pts2=se.filter(X),u.push(ne)}C.notched&&k.isTypedArray(_e)&&(_e=Array.from(_e)),C._extremes[I._id]=b.findExtremes(I,C.notched?_e.concat([Be,Xe]):_e,{padded:!0})}return s(u,C),u.length>0?(u[0].t={num:_[A],dPos:re,posLetter:B,valLetter:O,labels:{med:e(M,"median:"),min:e(M,"min:"),q1:e(M,"q1:"),q3:e(M,"q3:"),max:e(M,"max:"),mean:C.boxmean==="sd"||C.sizemode==="sd"?e(M,"mean \xB1 \u03C3:").replace("\u03C3",C.sdmultiple===1?"\u03C3":C.sdmultiple+"\u03C3"):e(M,"mean:"),lf:e(M,"lower fence:"),uf:e(M,"upper fence:")}},_[A]++,u):[{t:{empty:!0}}]};function t(S,M,C,_){var w=M in S,h=M+"0"in S,u="d"+M in S;if(w||h&&u){var A=C.makeCalcdata(S,M),x=E(S,C,M,A).vals;return[x,A]}var z;h?z=S[M+"0"]:"name"in S&&(C.type==="category"||p(S.name)&&["linear","log"].indexOf(C.type)!==-1||k.isDateTime(S.name)&&C.type==="date")?z=S.name:z=_;for(var I=C.type==="multicategory"?C.r2c_just_indices(z):C.d2c(z,0,S[M+"calendar"]),O=S._length,D=new Array(O),B=0;B1,h=1-s[t+"gap"],u=1-s[t+"groupgap"];for(f=0;f0;if(I==="positive"?(ne=O*(z?1:.5),Z=V,se=Z=B):I==="negative"?(ne=Z=B,se=O*(z?1:.5),K=V):(ne=se=O,Z=K=V),ae){var he=A.pointpos,xe=A.jitter,we=A.marker.size/2,Me=0;he+xe>=0&&(Me=V*(he+xe),Me>ne?(ee=!0,q=we,H=Me):Me>Z&&(q=we,H=ne)),Me<=ne&&(H=ne);var Se=0;he-xe<=0&&(Se=-V*(he-xe),Se>se?(ee=!0,W=we,X=Se):Se>K&&(W=we,X=se)),Se<=se&&(X=se)}else H=ne,X=se;var Ie=new Array(m.length);for(v=0;vC.lo&&(j.so=!0)}return w});M.enter().append("path").classed("point",!0),M.exit().remove(),M.call(E.translatePoints,g,f)}function r(a,o,s,c){var g=o.val,f=o.pos,v=!!f.rangebreaks,m=c.bPos,i=c.bPosPxOffset||0,T=s.boxmean||(s.meanline||{}).visible,S,M;Array.isArray(c.bdPos)?(S=c.bdPos[0],M=c.bdPos[1]):(S=c.bdPos,M=c.bdPos);var C=a.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?b.identity:[]);C.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),C.exit().remove(),C.each(function(_){var w=f.c2l(_.pos+m,!0),h=f.l2p(w-S)+i,u=f.l2p(w+M)+i,A=v?(h+u)/2:f.l2p(w)+i,x=g.c2p(_.mean,!0),z=g.c2p(_.mean-_.sd,!0),I=g.c2p(_.mean+_.sd,!0);s.orientation==="h"?p.select(this).attr("d","M"+x+","+h+"V"+u+(T==="sd"?"m0,0L"+z+","+A+"L"+x+","+h+"L"+I+","+A+"Z":"")):p.select(this).attr("d","M"+h+","+x+"H"+u+(T==="sd"?"m0,0L"+A+","+z+"L"+h+","+x+"L"+A+","+I+"Z":""))})}G.exports={plot:e,plotBoxAndWhiskers:t,plotPoints:n,plotBoxMean:r}}}),ib=ze({"src/traces/box/style.js"(J,G){"use strict";var p=ci(),b=Qn(),E=Xi();function k(e,t,n){var r=n||p.select(e).selectAll("g.trace.boxes");r.style("opacity",function(a){return a[0].trace.opacity}),r.each(function(a){var o=p.select(this),s=a[0].trace,c=s.line.width;function g(m,i,T,S){m.style("stroke-width",i+"px").call(b.stroke,T).call(b.fill,S)}var f=o.selectAll("path.box");if(s.type==="candlestick")f.each(function(m){if(!m.empty){var i=p.select(this),T=s[m.dir];g(i,T.line.width,T.line.color,T.fillcolor),i.style("opacity",s.selectedpoints&&!m.selected?.3:1)}});else{g(f,c,s.line.color,s.fillcolor),o.selectAll("path.mean").style({"stroke-width":c,"stroke-dasharray":2*c+"px,"+c+"px"}).call(b.stroke,s.line.color);var v=o.selectAll("path.point");E.pointStyle(v,s,e)}})}function l(e,t,n){var r=t[0].trace,a=n.selectAll("path.point");r.selectedpoints?E.selectedPointStyle(a,r):E.pointStyle(a,r,e)}G.exports={style:k,styleOnSelect:l}}}),q5=ze({"src/traces/box/hover.js"(J,G){"use strict";var p=Gi(),b=Nr(),E=Zl(),k=Qn(),l=b.fillText;function e(r,a,o,s){var c=r.cd,g=c[0].trace,f=g.hoveron,v=[],m;return f.indexOf("boxes")!==-1&&(v=v.concat(t(r,a,o,s))),f.indexOf("points")!==-1&&(m=n(r,a,o)),s==="closest"?m?[m]:v:(m&&v.push(m),v)}function t(r,a,o,s){var c=r.cd,g=r.xa,f=r.ya,v=c[0].trace,m=c[0].t,i=v.type==="violin",T,S,M,C,_,w,h,u,A,x,z,I=m.bdPos,O,D,B=m.wHover,F=function(Se){return M.c2l(Se.pos)+m.bPos-M.c2l(w)};i&&v.side!=="both"?(v.side==="positive"&&(A=function(Se){var Ie=F(Se);return E.inbox(Ie,Ie+B,x)},O=I,D=0),v.side==="negative"&&(A=function(Se){var Ie=F(Se);return E.inbox(Ie-B,Ie,x)},O=0,D=I)):(A=function(Se){var Ie=F(Se);return E.inbox(Ie-B,Ie+B,x)},O=D=I);var P;i?P=function(Se){return E.inbox(Se.span[0]-_,Se.span[1]-_,x)}:P=function(Se){return E.inbox(Se.min-_,Se.max-_,x)},v.orientation==="h"?(_=a,w=o,h=P,u=A,T="y",M=f,S="x",C=g):(_=o,w=a,h=A,u=P,T="x",M=g,S="y",C=f);var j=Math.min(1,I/Math.abs(M.r2c(M.range[1])-M.r2c(M.range[0])));x=r.maxHoverDistance-j,z=r.maxSpikeDistance-j;function U(Se){return(h(Se)+u(Se))/2}var $=E.getDistanceFunction(s,h,u,U);if(E.getClosest(c,$,r),r.index===!1)return[];var Q=c[r.index],re=v.line.color,ne=(v.marker||{}).color;k.opacity(re)&&v.line.width?r.color=re:k.opacity(ne)&&v.boxpoints?r.color=ne:r.color=v.fillcolor,r[T+"0"]=M.c2p(Q.pos+m.bPos-D,!0),r[T+"1"]=M.c2p(Q.pos+m.bPos+O,!0),r[T+"LabelVal"]=Q.orig_p!==void 0?Q.orig_p:Q.pos;var se=T+"Spike";r.spikeDistance=U(Q)*z/x,r[se]=M.c2p(Q.pos,!0);var V=v.boxmean||v.sizemode==="sd"||(v.meanline||{}).visible,Z=v.boxpoints||v.points,K=Z&&V?["max","uf","q3","med","mean","q1","lf","min"]:Z&&!V?["max","uf","q3","med","q1","lf","min"]:!Z&&V?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],H=C.range[1]0&&(n=!0);for(var s=0;se){var t=e-k[b];return k[b]=e,t}}else return k[b]=e,e;return 0},max:function(b,E,k,l){var e=l[E];if(p(e))if(e=Number(e),p(k[b])){if(k[b]h&&hk){var x=u===b?1:6,z=u===b?"M12":"M1";return function(I,O){var D=m.c2d(I,b,i),B=D.indexOf("-",x);B>0&&(D=D.slice(0,B));var F=m.d2c(D,0,i);if(Ft?c>k?c>b*1.1?b:c>E*1.1?E:k:c>l?l:c>e?e:t:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function o(c,g,f,v,m,i){if(v&&c>k){var T=s(g,m,i),S=s(f,m,i),M=c===b?0:1;return T[M]!==S[M]}return Math.floor(f/c)-Math.floor(g/c)>.1}function s(c,g,f){var v=g.c2d(c,b,f).split("-");return v[0]===""&&(v.unshift(),v[0]="-"+v[0]),v}}}),Z5=ze({"src/traces/histogram/calc.js"(J,G){"use strict";var p=ao(),b=Nr(),E=mi(),k=Gi(),{hasColorscale:l}=Bf(),e=Qf(),t=xg(),n=H5(),r=W5(),a=Y5(),o=X5();function s(m,i){var T=[],S=[],M=i.orientation==="h",C=k.getFromId(m,M?i.yaxis:i.xaxis),_=M?"y":"x",w={x:"y",y:"x"}[_],h=i[_+"calendar"],u=i.cumulative,A,x=c(m,i,C,_),z=x[0],I=x[1],O=typeof z.size=="string",D=[],B=O?D:z,F=[],P=[],j=[],U=0,$=i.histnorm,Q=i.histfunc,re=$.indexOf("density")!==-1,ne,se,V;u.enabled&&re&&($=$.replace(/ ?density$/,""),re=!1);var Z=Q==="max"||Q==="min",K=Z?null:0,H=n.count,X=r[$],q=!1,W=function(Ae){return C.r2c(Ae,0,h)},ee;for(b.isArrayOrTypedArray(i[w])&&Q!=="count"&&(ee=i[w],q=Q==="avg",H=n[Q]),A=W(z.start),se=W(z.end)+(A-k.tickIncrement(A,z.size,!1,h))/1e6;A=0&&V=ue;A--)if(S[A]){ve=A;break}for(A=ue;A<=ve;A++)if(p(T[A])&&p(S[A])){var le={p:T[A],s:S[A],b:0};u.enabled||(le.pts=j[A],we?le.ph0=le.ph1=j[A].length?I[j[A][0]]:T[A]:(i._computePh=!0,le.ph0=qe(D[A]),le.ph1=qe(D[A+1],!0))),_e.push(le)}return _e.length===1&&(_e[0].width1=k.tickIncrement(_e[0].p,z.size,!1,h)-_e[0].p),l(i,"marker")&&e(m,i,{vals:i.marker.color,containerStr:"marker",cLetter:"c"}),l(i,"marker.line")&&e(m,i,{vals:i.marker.line.color,containerStr:"marker.line",cLetter:"c"}),t(_e,i),b.isArrayOrTypedArray(i.selectedpoints)&&b.tagSelected(_e,i,Ie),_e}function c(m,i,T,S,M){var C,_=S+"bins",w=m._fullLayout,h=i["_"+S+"bingroup"],u=w._histogramBinOpts[h],A=w.barmode==="overlay",x,z,I,O,D,B,F,P=function(qe){return T.r2c(qe,0,O)},j=function(qe){return T.c2r(qe,0,O)},U=T.type==="date"?function(qe){return qe||qe===0?b.cleanDate(qe,null,O):null}:function(qe){return p(qe)?Number(qe):null};function $(qe,ke,_e){ke[qe+"Found"]?(ke[qe]=U(ke[qe]),ke[qe]===null&&(ke[qe]=_e[qe])):(B[qe]=ke[qe]=_e[qe],b.nestedProperty(z[0],_+"."+qe).set(_e[qe]))}if(i["_"+S+"autoBinFinished"])delete i["_"+S+"autoBinFinished"];else{z=u.traces;var Q=[],re=!0,ne=!1,se=!1;for(x=0;xT.r2l(ae)&&(xe=k.tickIncrement(xe,u.size,!0,O)),X.start=T.l2r(xe),ee||b.nestedProperty(i,_+".start").set(X.start)}var we=u.end,Me=T.r2l(H.end),Se=Me!==void 0;if((u.endFound||Se)&&Me!==T.r2l(we)){var Ie=Se?Me:b.aggNums(Math.max,null,D);X.end=T.l2r(Ie),Se||b.nestedProperty(i,_+".start").set(X.end)}var Ge="autobin"+S;return i._input[Ge]===!1&&(i._input[_]=b.extendFlat({},i[_]||{}),delete i._input[Ge],delete i[Ge]),[X,D]}function g(m,i,T,S,M){var C=m._fullLayout,_=f(m,i),w=!1,h=1/0,u=[i],A,x,z;for(A=0;A<_.length;A++)if(x=_[A],x===i)w=!0;else if(!w)z=C._histogramBinOpts[x["_"+S+"bingroup"]],h=Math.min(h,z.size||x[M].size);else{var I=c(m,x,T,S,!0),O=I[0],D=I[2];x["_"+S+"autoBinFinished"]=1,x["_"+S+"pos0"]=I[1],D?u.push(x):h=Math.min(h,O.size)}var B=new Array(u.length);for(A=0;A=0;S--)w(S);else if(i==="increasing"){for(S=1;S=0;S--)m[S]+=m[S+1];T==="exclude"&&(m.push(0),m.shift())}}G.exports={calc:s,calcAllAutoBins:c}}}),OF=ze({"src/traces/histogram2d/calc.js"(J,G){"use strict";var p=Nr(),b=Gi(),E=H5(),k=W5(),l=Y5(),e=X5(),t=Z5().calcAllAutoBins;G.exports=function(s,c){var g=b.getFromId(s,c.xaxis),f=b.getFromId(s,c.yaxis),v=c.xcalendar,m=c.ycalendar,i=function(vt){return g.r2c(vt,0,v)},T=function(vt){return f.r2c(vt,0,m)},S=function(vt){return g.c2r(vt,0,v)},M=function(vt){return f.c2r(vt,0,m)},C,_,w,h,u=t(s,c,g,"x"),A=u[0],x=u[1],z=t(s,c,f,"y"),I=z[0],O=z[1],D=c._length;x.length>D&&x.splice(D,x.length-D),O.length>D&&O.splice(D,O.length-D);var B=[],F=[],P=[],j=typeof A.size=="string",U=typeof I.size=="string",$=[],Q=[],re=j?$:A,ne=U?Q:I,se=0,V=[],Z=[],K=c.histnorm,H=c.histfunc,X=K.indexOf("density")!==-1,q=H==="max"||H==="min",W=q?null:0,ee=E.count,ae=k[K],he=!1,xe=[],we=[],Me="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";Me&&H!=="count"&&(he=H==="avg",ee=E[H]);var Se=A.size,Ie=i(A.start),Ge=i(A.end)+(Ie-b.tickIncrement(Ie,Se,!1,v))/1e6;for(C=Ie;C=0&&w=0&&hb;a++)r=l(t,n,k(r));return r>b&&p.log("interp2d didn't converge quickly",r),t};function l(e,t,n){var r=0,a,o,s,c,g,f,v,m,i,T,S,M,C;for(c=0;cM&&(r=Math.max(r,Math.abs(e[o][s]-S)/(C-M))))}return r}}}),cb=ze({"src/traces/heatmap/find_empties.js"(J,G){"use strict";var p=Nr().maxRowLength;G.exports=function(E){var k=[],l={},e=[],t=E[0],n=[],r=[0,0,0],a=p(E),o,s,c,g,f,v,m,i;for(s=0;s=0;f--)g=e[f],s=g[0],c=g[1],v=((l[[s-1,c]]||r)[2]+(l[[s+1,c]]||r)[2]+(l[[s,c-1]]||r)[2]+(l[[s,c+1]]||r)[2])/20,v&&(m[g]=[s,c,v],e.splice(f,1),i=!0);if(!i)throw"findEmpties iterated with no new neighbors";for(g in m)l[g]=m[g],k.push(m[g])}return k.sort(function(T,S){return S[2]-T[2]})}}}),$5=ze({"src/traces/heatmap/make_bound_array.js"(J,G){"use strict";var p=mi(),b=Nr().isArrayOrTypedArray;G.exports=function(k,l,e,t,n,r){var a=[],o=p.traceIs(k,"contour"),s=p.traceIs(k,"histogram"),c,g,f,v=b(l)&&l.length>1;if(v&&!s&&r.type!=="category"){var m=l.length;if(m<=n){if(o)a=Array.from(l).slice(0,n);else if(n===1)r.type==="log"?a=[.5*l[0],2*l[0]]:a=[l[0]-.5,l[0]+.5];else if(r.type==="log"){for(a=[Math.pow(l[0],1.5)/Math.pow(l[1],.5)],f=1;f1){var K=(Z[Z.length-1]-Z[0])/(Z.length-1),H=Math.abs(K/100);for(D=0;DH)return!1}return!0}m._islinear=!1,i.type==="log"||T.type==="log"?C==="fast"&&P("log axis found"):j(_)?j(A)?m._islinear=!0:C==="fast"&&P("y scale is not linear"):C==="fast"&&P("x scale is not linear");var U=b.maxRowLength(O),$=m.xtype==="scaled"?"":_,Q=o(m,$,w,h,U,i),re=m.ytype==="scaled"?"":A,ne=o(m,re,x,z,O.length,T);m._extremes[i._id]=E.findExtremes(i,Q),m._extremes[T._id]=E.findExtremes(T,ne);var se={x:Q,y:ne,z:O,text:m._text||m.text,hovertext:m._hovertext||m.hovertext};if(m.xperiodalignment&&u&&(se.orig_x=u),m.yperiodalignment&&I&&(se.orig_y=I),$&&$.length===Q.length-1&&(se.xCenter=$),re&&re.length===ne.length-1&&(se.yCenter=re),M&&(se.xRanges=B.xRanges,se.yRanges=B.yRanges,se.pts=B.pts),S||e(v,m,{vals:O,cLetter:"z"}),S&&m.contours&&m.contours.coloring==="heatmap"){var V={type:m.type==="contour"?"heatmap":"histogram2d",xcalendar:m.xcalendar,ycalendar:m.ycalendar};se.xfill=o(V,$,w,h,U,i),se.yfill=o(V,re,x,z,O.length,T)}return[se]};function c(f){for(var v=[],m=f.length,i=0;i0;)H=u.c2p(P[ee]),ee--;for(H0;)W=A.c2p(j[ee]),ee--;W=u._length||H<=0||q>=A._length||W<=0;if(Ie){var Ge=z.selectAll("image").data([]);Ge.exit().remove(),i(z);return}var qe,ke;xe==="fast"?(qe=se,ke=ne):(qe=Me,ke=Se);var _e=document.createElement("canvas");_e.width=qe,_e.height=ke;var ue=_e.getContext("2d",{willReadFrequently:!0}),ve=a(O,{noNumericCheck:!0,returnArray:!0}),le,Ae;xe==="fast"?(le=V?function(zr){return se-1-zr}:l.identity,Ae=Z?function(zr){return ne-1-zr}:l.identity):(le=function(zr){return l.constrain(Math.round(u.c2p(P[zr])-K),0,Me)},Ae=function(zr){return l.constrain(Math.round(A.c2p(j[zr])-q),0,Se)});var Be=Ae(0),Xe=[Be,Be],Ye=V?0:1,yt=Z?0:1,gt=0,Tt=0,At=0,$t=0,rr,_r,Xt,or,Ot;function vt(zr,Lr=0){if(zr===void 0)return[0,0,0,0];var aa=ve(zr);return aa[0]=Math.round(aa[0]),aa[1]=Math.round(aa[1]),aa[2]=Math.round(aa[2]),gt+=Lr,Tt+=aa[0]*Lr,At+=aa[1]*Lr,$t+=aa[2]*Lr,aa}function ht(zr,Lr,aa,Sa){var wa=zr[aa.bin0];if(wa===void 0)return vt(void 0,1);var pn=zr[aa.bin1],tn=Lr[aa.bin0],ai=Lr[aa.bin1],rn=pn-wa||0,Ri=tn-wa||0,Gn;return pn===void 0?ai===void 0?Gn=0:tn===void 0?Gn=2*(ai-wa):Gn=(2*ai-tn-wa)*2/3:ai===void 0?tn===void 0?Gn=0:Gn=(2*wa-pn-tn)*2/3:tn===void 0?Gn=(2*ai-pn-wa)*2/3:Gn=ai+wa-pn-tn,vt(wa+aa.frac*rn+Sa.frac*(Ri+aa.frac*Gn))}if(xe!=="default"){var De=0,Ne;try{Ne=new Uint8Array(qe*ke*4)}catch{Ne=new Array(qe*ke*4)}if(xe==="smooth"){var We=U||P,Ke=$||j,Je=new Array(We.length),et=new Array(Ke.length),Mt=new Array(Me),pt=U?S:T,Pt=$?S:T,Ct,qt,Vt;for(ee=0;eeNn||Nn>A._length))for(ae=La;aeUn||Un>u._length)){var li=t({x:yn,y:ja},O,C._fullLayout);li.x=yn,li.y=ja;var Yn=I.z[ee][ae];Yn===void 0?(li.z="",li.zLabel=""):(li.z=Yn,li.zLabel=k.tickText(Rr,Yn,"hover").text);var on=I.text&&I.text[ee]&&I.text[ee][ae];(on===void 0||on===!1)&&(on=""),li.text=on;var en=l.texttemplateString({data:[li,O._meta],fallback:O.texttemplatefallback,labels:li,locale:C._fullLayout._d3locale,template:ur});if(en){var vi=en.split("
"),Yi=vi.length,Ja=0;for(he=0;he=T[0].length||z<0||z>T.length)return}else{if(p.inbox(n-m[0],n-m[m.length-1],0)>0||p.inbox(r-i[0],r-i[i.length-1],0)>0)return;if(s){var I;for(w=[2*m[0]-m[1]],I=1;I=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),Mg=ze({"src/traces/contour/attributes.js"(J,G){"use strict";var p=r1(),b=su(),E=Il(),k=E.axisHoverFormat,l=E.descriptionOnlyNumbers,e=qs(),t=Uc().dash,n=Qs(),r=Ki().extendFlat,a=_b(),o=a.COMPARISON_OPS2,s=a.INTERVAL_OPS,c=b.line;G.exports=r({z:p.z,x:p.x,x0:p.x0,dx:p.dx,y:p.y,y0:p.y0,dy:p.dy,xperiod:p.xperiod,yperiod:p.yperiod,xperiod0:b.xperiod0,yperiod0:b.yperiod0,xperiodalignment:p.xperiodalignment,yperiodalignment:p.yperiodalignment,text:p.text,hovertext:p.hovertext,transpose:p.transpose,xtype:p.xtype,ytype:p.ytype,xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z",1),hovertemplate:p.hovertemplate,hovertemplatefallback:p.hovertemplatefallback,texttemplate:r({},p.texttemplate,{}),texttemplatefallback:p.texttemplatefallback,textfont:r({},p.textfont,{}),hoverongaps:p.hoverongaps,connectgaps:r({},p.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:n({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:l("contour label")},operation:{valType:"enumerated",values:[].concat(o).concat(s),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:r({},c.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:t,smoothing:r({},c.smoothing,{}),editType:"plot"},zorder:b.zorder},e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),tT=ze({"src/traces/histogram2dcontour/attributes.js"(J,G){"use strict";var p=yb(),b=Mg(),E=qs(),k=Il().axisHoverFormat,l=Ki().extendFlat;G.exports=l({x:p.x,y:p.y,z:p.z,marker:p.marker,histnorm:p.histnorm,histfunc:p.histfunc,nbinsx:p.nbinsx,xbins:p.xbins,nbinsy:p.nbinsy,ybins:p.ybins,autobinx:p.autobinx,autobiny:p.autobiny,bingroup:p.bingroup,xbingroup:p.xbingroup,ybingroup:p.ybingroup,autocontour:b.autocontour,ncontours:b.ncontours,contours:b.contours,line:{color:b.line.color,width:l({},b.line.width,{dflt:.5}),dash:b.line.dash,smoothing:b.line.smoothing,editType:"plot"},xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z",1),hovertemplate:p.hovertemplate,hovertemplatefallback:p.hovertemplatefallback,texttemplate:b.texttemplate,texttemplatefallback:b.texttemplatefallback,textfont:b.textfont},E("",{cLetter:"z",editTypeOverride:"calc"}))}}),xb=ze({"src/traces/contour/contours_defaults.js"(J,G){"use strict";G.exports=function(b,E,k,l){var e=l("contours.start"),t=l("contours.end"),n=e===!1||t===!1,r=k("contours.size"),a;n?a=E.autocontour=!0:a=k("autocontour",!1),(a||!r)&&k("ncontours")}}}),rT=ze({"src/traces/contour/label_defaults.js"(J,G){"use strict";var p=Nr();G.exports=function(E,k,l,e){e||(e={});var t=E("contours.showlabels");if(t){var n=k.font;p.coerceFont(E,"contours.labelfont",n,{overrideDflt:{color:l}}),E("contours.labelformat")}e.hasHover!==!1&&E("zhoverformat")}}}),bb=ze({"src/traces/contour/style_defaults.js"(J,G){"use strict";var p=qc(),b=rT();G.exports=function(k,l,e,t,n){var r=e("contours.coloring"),a,o="";r==="fill"&&(a=e("contours.showlines")),a!==!1&&(r!=="lines"&&(o=e("line.color","#000")),e("line.width",.5),e("line.dash")),r!=="none"&&(k.showlegend!==!0&&(l.showlegend=!1),l._dfltShowLegend=!1,p(k,l,t,e,{prefix:"",cLetter:"z"})),e("line.smoothing"),b(e,t,o,n)}}}),$F=ze({"src/traces/histogram2dcontour/defaults.js"(J,G){"use strict";var p=Nr(),b=eT(),E=xb(),k=bb(),l=Ag(),e=tT();G.exports=function(n,r,a,o){function s(g,f){return p.coerce(n,r,e,g,f)}function c(g){return p.coerce2(n,r,e,g)}b(n,r,s,o),r.visible!==!1&&(E(n,r,s,c),k(n,r,s,o),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&l(s,o))}}}),aT=ze({"src/traces/contour/set_contours.js"(J,G){"use strict";var p=Gi(),b=Nr();G.exports=function(l,e){var t=l.contours;if(l.autocontour){var n=l.zmin,r=l.zmax;(l.zauto||n===void 0)&&(n=b.aggNums(Math.min,null,e)),(l.zauto||r===void 0)&&(r=b.aggNums(Math.max,null,e));var a=E(n,r,l.ncontours);t.size=a.dtick,t.start=p.tickFirst(a),a.range.reverse(),t.end=p.tickFirst(a),t.start===n&&(t.start+=t.size),t.end===r&&(t.end-=t.size),t.start>t.end&&(t.start=t.end=(t.start+t.end)/2),l._input.contours||(l._input.contours={}),b.extendFlat(l._input.contours,{start:t.start,end:t.end,size:t.size}),l._input.autocontour=!0}else if(t.type!=="constraint"){var o=t.start,s=t.end,c=l._input.contours;if(o>s&&(t.start=c.start=s,s=t.end=c.end=o,o=t.start),!(t.size>0)){var g;o===s?g=1:g=E(o,s,l.ncontours).dtick,c.size=t.size=g}}};function E(k,l,e){var t={type:"linear",range:[k,l]};return p.autoTicks(t,(l-k)/(e||15)),t}}}),Sg=ze({"src/traces/contour/end_plus.js"(J,G){"use strict";G.exports=function(b){return b.end+b.size/1e6}}}),nT=ze({"src/traces/contour/calc.js"(J,G){"use strict";var p=fl(),b=fb(),E=aT(),k=Sg();G.exports=function(e,t){var n=b(e,t),r=n[0].z;E(t,r);var a=t.contours,o=p.extractOpts(t),s;if(a.coloring==="heatmap"&&o.auto&&t.autocontour===!1){var c=a.start,g=k(a),f=a.size||1,v=Math.floor((g-c)/f)+1;isFinite(f)||(f=1,v=1);var m=c-f/2,i=m+v*f;s=[m,i]}else s=r;return p.calc(e,t,{vals:s,cLetter:"z"}),n}}}),Eg=ze({"src/traces/contour/constants.js"(J,G){"use strict";G.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}}}),iT=ze({"src/traces/contour/make_crossings.js"(J,G){"use strict";var p=Eg();G.exports=function(k){var l=k[0].z,e=l.length,t=l[0].length,n=e===2||t===2,r,a,o,s,c,g,f,v,m;for(a=0;aE?0:1)+(k[0][1]>E?0:2)+(k[1][1]>E?0:4)+(k[1][0]>E?0:8);if(l===5||l===10){var e=(k[0][0]+k[0][1]+k[1][0]+k[1][1])/4;return E>e?l===5?713:1114:l===5?104:208}return l===15?0:l}}}),oT=ze({"src/traces/contour/find_all_paths.js"(J,G){"use strict";var p=Nr(),b=Eg();G.exports=function(r,a,o){var s,c,g,f,v;for(a=a||.01,o=o||.01,g=0;g20?(g=b.CHOOSESADDLE[g][(f[0]||f[1])<0?0:1],n.crossings[c]=b.SADDLEREMAINDER[g]):delete n.crossings[c],f=b.NEWDELTA[g],!f){p.log("Found bad marching index:",g,r,n.level);break}v.push(t(n,r,f)),r[0]+=f[0],r[1]+=f[1],c=r.join(","),E(v[v.length-1],v[v.length-2],o,s)&&v.pop();var C=f[0]&&(r[0]<0||r[0]>i-2)||f[1]&&(r[1]<0||r[1]>m-2),_=r[0]===T[0]&&r[1]===T[1]&&f[0]===S[0]&&f[1]===S[1];if(_||a&&C)break;g=n.crossings[c]}M===1e4&&p.log("Infinite loop in contour?");var w=E(v[0],v[v.length-1],o,s),h=0,u=.2*n.smoothing,A=[],x=0,z,I,O,D,B,F,P,j,U,$,Q;for(M=1;M=x;M--)if(z=A[M],z=x&&z+A[I]j&&U--,n.edgepaths[U]=Q.concat(v,$));break}V||(n.edgepaths[j]=v.concat($))}for(j=0;j20&&r?n===208||n===1114?o=a[0]===0?1:-1:s=a[1]===0?1:-1:b.BOTTOMSTART.indexOf(n)!==-1?s=1:b.LEFTSTART.indexOf(n)!==-1?o=1:b.TOPSTART.indexOf(n)!==-1?s=-1:o=-1,[o,s]}function t(n,r,a){var o=r[0]+Math.max(a[0],0),s=r[1]+Math.max(a[1],0),c=n.z[s][o],g=n.xaxis,f=n.yaxis;if(a[1]){var v=(n.level-c)/(n.z[s][o+1]-c),m=(v!==1?(1-v)*g.c2l(n.x[o]):0)+(v!==0?v*g.c2l(n.x[o+1]):0);return[g.c2p(g.l2c(m),!0),f.c2p(n.y[s],!0),o+v,s]}else{var i=(n.level-c)/(n.z[s+1][o]-c),T=(i!==1?(1-i)*f.c2l(n.y[s]):0)+(i!==0?i*f.c2l(n.y[s+1]):0);return[g.c2p(n.x[o],!0),f.c2p(f.l2c(T),!0),o,s+i]}}}}),KF=ze({"src/traces/contour/constraint_mapping.js"(J,G){"use strict";var p=_b(),b=ao();G.exports={"[]":k("[]"),"][":k("]["),">":l(">"),"<":l("<"),"=":l("=")};function E(e,t){var n=Array.isArray(t),r;function a(o){return b(o)?+o:null}return p.COMPARISON_OPS2.indexOf(e)!==-1?r=a(n?t[0]:t):p.INTERVAL_OPS.indexOf(e)!==-1?r=n?[a(t[0]),a(t[1])]:[a(t),a(t)]:p.SET_OPS.indexOf(e)!==-1&&(r=n?t.map(a):[a(t)]),r}function k(e){return function(t){t=E(e,t);var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return{start:n,end:r,size:r-n}}}function l(e){return function(t){return t=E(e,t),{start:t,end:1/0,size:1/0}}}}}),sT=ze({"src/traces/contour/empty_pathinfo.js"(J,G){"use strict";var p=Nr(),b=KF(),E=Sg();G.exports=function(l,e,t){for(var n=l.type==="constraint"?b[l._operation](l.value):l,r=n.size,a=[],o=E(n),s=t.trace._carpetTrace,c=s?{xaxis:s.aaxis,yaxis:s.baxis,x:t.a,y:t.b}:{xaxis:e.xaxis,yaxis:e.yaxis,x:t.x,y:t.y},g=n.start;g1e3){p.warn("Too many contours, clipping at 1000",l);break}return a}}}),lT=ze({"src/traces/contour/convert_to_constraints.js"(J,G){"use strict";var p=Nr();G.exports=function(E,k){var l,e,t,n=function(o){return o.reverse()},r=function(o){return o};switch(k){case"=":case"<":return E;case">":for(E.length!==1&&p.warn("Contour data invalid for the specified inequality operation."),e=E[0],l=0;lt.level||t.starts.length&&e===t.level)}break;case"constraint":if(E.prefixBoundary=!1,E.edgepaths.length)return;var n=E.x.length,r=E.y.length,a=-1/0,o=1/0;for(l=0;l":s>a&&(E.prefixBoundary=!0);break;case"<":(sa||E.starts.length&&g===o)&&(E.prefixBoundary=!0);break;case"][":c=Math.min(s[0],s[1]),g=Math.max(s[0],s[1]),ca&&(E.prefixBoundary=!0);break}break}}}}),wb=ze({"src/traces/contour/plot.js"(J){"use strict";var G=ci(),p=Nr(),b=Xi(),E=fl(),k=Cs(),l=Gi(),e=Dd(),t=db(),n=iT(),r=oT(),a=sT(),o=lT(),s=uT(),c=Eg(),g=c.LABELOPTIMIZER;J.plot=function(_,w,h,u){var A=w.xaxis,x=w.yaxis;p.makeTraceGroups(u,h,"contour").each(function(z){var I=G.select(this),O=z[0],D=O.trace,B=O.x,F=O.y,P=D.contours,j=a(P,w,O),U=p.ensureSingle(I,"g","heatmapcoloring"),$=[];P.coloring==="heatmap"&&($=[z]),t(_,w,$,U),n(j),r(j);var Q=A.c2p(B[0],!0),re=A.c2p(B[B.length-1],!0),ne=x.c2p(F[0],!0),se=x.c2p(F[F.length-1],!0),V=[[Q,se],[re,se],[re,ne],[Q,ne]],Z=j;P.type==="constraint"&&(Z=o(j,P._operation)),f(I,V,P),v(I,Z,V,P),i(I,j,_,O,P),S(I,w,_,O,V)})};function f(C,_,w){var h=p.ensureSingle(C,"g","contourbg"),u=h.selectAll("path").data(w.coloring==="fill"?[0]:[]);u.enter().append("path"),u.exit().remove(),u.attr("d","M"+_.join("L")+"Z").style("stroke","none")}function v(C,_,w,h){var u=h.coloring==="fill"||h.type==="constraint"&&h._operation!=="=",A="M"+w.join("L")+"Z";u&&s(_,h);var x=p.ensureSingle(C,"g","contourfill"),z=x.selectAll("path").data(u?_:[]);z.enter().append("path"),z.exit().remove(),z.each(function(I){var O=(I.prefixBoundary?A:"")+m(I,w);O?G.select(this).attr("d",O).style("stroke","none"):G.select(this).remove()})}function m(C,_){var w="",h=0,u=C.edgepaths.map(function(Q,re){return re}),A=!0,x,z,I,O,D,B;function F(Q){return Math.abs(Q[1]-_[0][1])<.01}function P(Q){return Math.abs(Q[1]-_[2][1])<.01}function j(Q){return Math.abs(Q[0]-_[0][0])<.01}function U(Q){return Math.abs(Q[0]-_[2][0])<.01}for(;u.length;){for(B=b.smoothopen(C.edgepaths[h],C.smoothing),w+=A?B:B.replace(/^M/,"L"),u.splice(u.indexOf(h),1),x=C.edgepaths[h][C.edgepaths[h].length-1],O=-1,I=0;I<4;I++){if(!x){p.log("Missing end?",h,C);break}for(F(x)&&!U(x)?z=_[1]:j(x)?z=_[0]:P(x)?z=_[3]:U(x)&&(z=_[2]),D=0;D=0&&(z=$,O=D):Math.abs(x[1]-z[1])<.01?Math.abs(x[1]-$[1])<.01&&($[0]-x[0])*(z[0]-$[0])>=0&&(z=$,O=D):p.log("endpt to newendpt is not vert. or horz.",x,z,$)}if(x=z,O>=0)break;w+="L"+z}if(O===C.edgepaths.length){p.log("unclosed perimeter path");break}h=O,A=u.indexOf(h)===-1,A&&(h=u[0],w+="Z")}for(h=0;hg.MAXCOST*2)break;F&&(z/=2),x=O-z/2,I=x+z*1.5}if(B<=g.MAXCOST)return D};function T(C,_,w,h){var u=_.width/2,A=_.height/2,x=C.x,z=C.y,I=C.theta,O=Math.cos(I)*u,D=Math.sin(I)*u,B=(x>h.center?h.right-x:x-h.left)/(O+Math.abs(Math.sin(I)*A)),F=(z>h.middle?h.bottom-z:z-h.top)/(Math.abs(D)+Math.cos(I)*A);if(B<1||F<1)return 1/0;var P=g.EDGECOST*(1/(B-1)+1/(F-1));P+=g.ANGLECOST*I*I;for(var j=x-O,U=z-D,$=x+O,Q=z+D,re=0;re=S)&&(t<=T&&(t=T),n>=S&&(n=S),a=Math.floor((n-t)/r)+1,o=0),i=0;iT&&(f.unshift(T),v.unshift(v[0])),f[f.length-1]2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(c=parseFloat(s.value[0]),s.value=[c,c+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:p(s.value)&&(c=parseFloat(s.value),s.value=[c,c+1])):(o("contours.value",0),p(s.value)||(t(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),ez=ze({"src/traces/contour/defaults.js"(J,G){"use strict";var p=Nr(),b=ob(),E=yd(),k=hT(),l=xb(),e=bb(),t=Ag(),n=Mg();G.exports=function(a,o,s,c){function g(i,T){return p.coerce(a,o,n,i,T)}function f(i){return p.coerce2(a,o,n,i)}var v=b(a,o,g,c);if(!v){o.visible=!1;return}E(a,o,c,g),g("xhoverformat"),g("yhoverformat"),g("text"),g("hovertext"),g("hoverongaps"),g("hovertemplate"),g("hovertemplatefallback");var m=g("contours.type")==="constraint";g("connectgaps",p.isArray1D(o.z)),m?k(a,o,g,c,s):(l(a,o,g,f),e(a,o,g,c)),o.contours&&o.contours.coloring==="heatmap"&&t(g,c),g("zorder")}}}),tz=ze({"src/traces/contour/index.js"(J,G){"use strict";G.exports={attributes:Mg(),supplyDefaults:ez(),calc:nT(),plot:wb().plot,style:Tb(),colorbar:Ab(),hoverPoints:fT(),moduleType:"trace",name:"contour",basePlotModule:Du(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),rz=ze({"lib/contour.js"(J,G){"use strict";G.exports=tz()}}),dT=ze({"src/traces/scatterternary/attributes.js"(J,G){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=Bd(),l=su(),e=ws(),t=qs(),n=Uc().dash,r=Ki().extendFlat,a=l.marker,o=l.line,s=a.line;G.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:r({},l.mode,{dflt:"markers"}),text:r({},l.text,{}),texttemplate:b({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:r({},l.hovertext,{}),line:{color:o.color,width:o.width,dash:n,backoff:o.backoff,shape:r({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:l.connectgaps,cliponaxis:l.cliponaxis,fill:r({},l.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:k(),marker:r({symbol:a.symbol,opacity:a.opacity,angle:a.angle,angleref:a.angleref,standoff:a.standoff,maxdisplayed:a.maxdisplayed,size:a.size,sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,line:r({width:s.width,dash:s.dash,editType:"calc"},t("marker.line")),gradient:a.gradient,editType:"calc"},t("marker")),textfont:l.textfont,textposition:l.textposition,selected:l.selected,unselected:l.unselected,hoverinfo:r({},e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:l.hoveron,hovertemplate:p(),hovertemplatefallback:E()}}}),az=ze({"src/traces/scatterternary/defaults.js"(J,G){"use strict";var p=Nr(),b=zd(),E=el(),k=id(),l=_d(),e=$m(),t=xd(),n=Od(),r=dT();G.exports=function(o,s,c,g){function f(C,_){return p.coerce(o,s,r,C,_)}var v=f("a"),m=f("b"),i=f("c"),T;if(v?(T=v.length,m?(T=Math.min(T,m.length),i&&(T=Math.min(T,i.length))):i?T=Math.min(T,i.length):T=0):m&&i&&(T=Math.min(m.length,i.length)),!T){s.visible=!1;return}s._length=T,f("sum"),f("text"),f("hovertext"),s.hoveron!=="fills"&&(f("hovertemplate"),f("hovertemplatefallback"));var S=T"),n.hovertemplate=g.hovertemplate,t}}}),lz=ze({"src/traces/scatterternary/event_data.js"(J,G){"use strict";G.exports=function(b,E,k,l,e){if(E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),l[e]){var t=l[e];b.a=t.a,b.b=t.b,b.c=t.c}else b.a=E.a,b.b=E.b,b.c=E.c;return b}}}),uz=ze({"src/plots/ternary/ternary.js"(J,G){"use strict";var p=ci(),b=mi(),E=Nr(),k=E.strTranslate,l=E._,e=Qn(),t=Xi(),n=Dd(),r=Ki().extendFlat,a=cl(),o=Gi(),s=_h(),c=Zl(),g=Fd(),f=g.freeMode,v=g.rectMode,m=qv(),i=_c().prepSelect,T=_c().selectOnClick,S=_c().clearOutline,M=_c().clearSelectionsCache,C=hc();function _(F,P){this.id=F.id,this.graphDiv=F.graphDiv,this.init(P),this.makeFramework(P),this.updateFx(P),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}G.exports=_;var w=_.prototype;w.init=function(F){this.container=F._ternarylayer,this.defs=F._defs,this.layoutId=F._uid,this.traceHash={},this.layers={}},w.plot=function(F,P){var j=this,U=P[j.id],$=P._size;j._hasClipOnAxisFalse=!1;for(var Q=0;Qh*V?(ae=V,ee=ae*h):(ee=se,ae=ee/h),he=re*ee/se,xe=ne*ae/V,q=P.l+P.w*$-ee/2,W=P.t+P.h*(1-Q)-ae/2,j.x0=q,j.y0=W,j.w=ee,j.h=ae,j.sum=Z,j.xaxis={type:"linear",range:[K+2*X-Z,Z-K-2*H],domain:[$-he/2,$+he/2],_id:"x"},n(j.xaxis,j.graphDiv._fullLayout),j.xaxis.setScale(),j.xaxis.isPtWithinRange=function(le){return le.a>=j.aaxis.range[0]&&le.a<=j.aaxis.range[1]&&le.b>=j.baxis.range[1]&&le.b<=j.baxis.range[0]&&le.c>=j.caxis.range[1]&&le.c<=j.caxis.range[0]},j.yaxis={type:"linear",range:[K,Z-H-X],domain:[Q-xe/2,Q+xe/2],_id:"y"},n(j.yaxis,j.graphDiv._fullLayout),j.yaxis.setScale(),j.yaxis.isPtWithinRange=function(){return!0};var we=j.yaxis.domain[0],Me=j.aaxis=r({},F.aaxis,{range:[K,Z-H-X],side:"left",tickangle:(+F.aaxis.tickangle||0)-30,domain:[we,we+xe*h],anchor:"free",position:0,_id:"y",_length:ee});n(Me,j.graphDiv._fullLayout),Me.setScale();var Se=j.baxis=r({},F.baxis,{range:[Z-K-X,H],side:"bottom",domain:j.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ee});n(Se,j.graphDiv._fullLayout),Se.setScale();var Ie=j.caxis=r({},F.caxis,{range:[Z-K-H,X],side:"right",tickangle:(+F.caxis.tickangle||0)+30,domain:[we,we+xe*h],anchor:"free",position:0,_id:"y",_length:ee});n(Ie,j.graphDiv._fullLayout),Ie.setScale();var Ge="M"+q+","+(W+ae)+"h"+ee+"l-"+ee/2+",-"+ae+"Z";j.clipDef.select("path").attr("d",Ge),j.layers.plotbg.select("path").attr("d",Ge);var qe="M0,"+ae+"h"+ee+"l-"+ee/2+",-"+ae+"Z";j.clipDefRelative.select("path").attr("d",qe);var ke=k(q,W);j.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",ke),j.clipDefRelative.select("path").attr("transform",null);var _e=k(q-Se._offset,W+ae);j.layers.baxis.attr("transform",_e),j.layers.bgrid.attr("transform",_e);var ue=k(q+ee/2,W)+"rotate(30)"+k(0,-Me._offset);j.layers.aaxis.attr("transform",ue),j.layers.agrid.attr("transform",ue);var ve=k(q+ee/2,W)+"rotate(-30)"+k(0,-Ie._offset);j.layers.caxis.attr("transform",ve),j.layers.cgrid.attr("transform",ve),j.drawAxes(!0),j.layers.aline.select("path").attr("d",Me.showline?"M"+q+","+(W+ae)+"l"+ee/2+",-"+ae:"M0,0").call(e.stroke,Me.linecolor||"#000").style("stroke-width",(Me.linewidth||0)+"px"),j.layers.bline.select("path").attr("d",Se.showline?"M"+q+","+(W+ae)+"h"+ee:"M0,0").call(e.stroke,Se.linecolor||"#000").style("stroke-width",(Se.linewidth||0)+"px"),j.layers.cline.select("path").attr("d",Ie.showline?"M"+(q+ee/2)+","+W+"l"+ee/2+","+ae:"M0,0").call(e.stroke,Ie.linecolor||"#000").style("stroke-width",(Ie.linewidth||0)+"px"),j.graphDiv._context.staticPlot||j.initInteractions(),t.setClipUrl(j.layers.frontplot,j._hasClipOnAxisFalse?null:j.clipId,j.graphDiv)},w.drawAxes=function(F){var P=this,j=P.graphDiv,U=P.id.slice(7)+"title",$=P.layers,Q=P.aaxis,re=P.baxis,ne=P.caxis;if(P.drawAx(Q),P.drawAx(re),P.drawAx(ne),F){var se=Math.max(Q.showticklabels?Q.tickfont.size/2:0,(ne.showticklabels?ne.tickfont.size*.75:0)+(ne.ticks==="outside"?ne.ticklen*.87:0)),V=(re.showticklabels?re.tickfont.size:0)+(re.ticks==="outside"?re.ticklen:0)+3;$["a-title"]=m.draw(j,"a"+U,{propContainer:Q,propName:P.id+".aaxis.title.text",placeholder:l(j,"Click to enter Component A title"),attributes:{x:P.x0+P.w/2,y:P.y0-Q.title.font.size/3-se,"text-anchor":"middle"}}),$["b-title"]=m.draw(j,"b"+U,{propContainer:re,propName:P.id+".baxis.title.text",placeholder:l(j,"Click to enter Component B title"),attributes:{x:P.x0-V,y:P.y0+P.h+re.title.font.size*.83+V,"text-anchor":"middle"}}),$["c-title"]=m.draw(j,"c"+U,{propContainer:ne,propName:P.id+".caxis.title.text",placeholder:l(j,"Click to enter Component C title"),attributes:{x:P.x0+P.w+V,y:P.y0+P.h+ne.title.font.size*.83+V,"text-anchor":"middle"}})}},w.drawAx=function(F){var P=this,j=P.graphDiv,U=F._name,$=U.charAt(0),Q=F._id,re=P.layers[U],ne=30,se=$+"tickLayout",V=u(F);P[se]!==V&&(re.selectAll("."+Q+"tick").remove(),P[se]=V),F.setScale();var Z=o.calcTicks(F),K=o.clipEnds(F,Z),H=o.makeTransTickFn(F),X=o.getTickSigns(F)[2],q=E.deg2rad(ne),W=X*(F.linewidth||1)/2,ee=X*F.ticklen,ae=P.w,he=P.h,xe=$==="b"?"M0,"+W+"l"+Math.sin(q)*ee+","+Math.cos(q)*ee:"M"+W+",0l"+Math.cos(q)*ee+","+-Math.sin(q)*ee,we={a:"M0,0l"+he+",-"+ae/2,b:"M0,0l-"+ae/2+",-"+he,c:"M0,0l-"+he+","+ae/2}[$];o.drawTicks(j,F,{vals:F.ticks==="inside"?K:Z,layer:re,path:xe,transFn:H,crisp:!1}),o.drawGrid(j,F,{vals:K,layer:P.layers[$+"grid"],path:we,transFn:H,crisp:!1}),o.drawLabels(j,F,{vals:Z,layer:re,transFn:H,labelFns:o.makeLabelFns(F,0,ne)})};function u(F){return F.ticks+String(F.ticklen)+String(F.showticklabels)}var A=C.MINZOOM/2+.87,x="m-0.87,.5h"+A+"v3h-"+(A+5.2)+"l"+(A/2+2.6)+",-"+(A*.87+4.5)+"l2.6,1.5l-"+A/2+","+A*.87+"Z",z="m0.87,.5h-"+A+"v3h"+(A+5.2)+"l-"+(A/2+2.6)+",-"+(A*.87+4.5)+"l-2.6,1.5l"+A/2+","+A*.87+"Z",I="m0,1l"+A/2+","+A*.87+"l2.6,-1.5l-"+(A/2+2.6)+",-"+(A*.87+4.5)+"l-"+(A/2+2.6)+","+(A*.87+4.5)+"l2.6,1.5l"+A/2+",-"+A*.87+"Z",O="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",D=!0;w.clearOutline=function(){M(this.dragOptions),S(this.dragOptions.gd)},w.initInteractions=function(){var F=this,P=F.layers.plotbg.select("path").node(),j=F.graphDiv,U=j._fullLayout._zoomlayer,$,Q;this.dragOptions={element:P,gd:j,plotinfo:{id:F.id,domain:j._fullLayout[F.id].domain,xaxis:F.xaxis,yaxis:F.yaxis},subplot:F.id,prepFn:function(_e,ue,ve){F.dragOptions.xaxes=[F.xaxis],F.dragOptions.yaxes=[F.yaxis],$=j._fullLayout._invScaleX,Q=j._fullLayout._invScaleY;var le=F.dragOptions.dragmode=j._fullLayout.dragmode;f(le)?F.dragOptions.minDrag=1:F.dragOptions.minDrag=void 0,le==="zoom"?(F.dragOptions.moveFn=Se,F.dragOptions.clickFn=ae,F.dragOptions.doneFn=Ie,he(_e,ue,ve)):le==="pan"?(F.dragOptions.moveFn=qe,F.dragOptions.clickFn=ae,F.dragOptions.doneFn=ke,Ge(),F.clearOutline(j)):(v(le)||f(le))&&i(_e,ue,ve,F.dragOptions,le)}};var re,ne,se,V,Z,K,H,X,q,W;function ee(_e){var ue={};return ue[F.id+".aaxis.min"]=_e.a,ue[F.id+".baxis.min"]=_e.b,ue[F.id+".caxis.min"]=_e.c,ue}function ae(_e,ue){var ve=j._fullLayout.clickmode;B(j),_e===2&&(j.emit("plotly_doubleclick",null),b.call("_guiRelayout",j,ee({a:0,b:0,c:0}))),ve.indexOf("select")>-1&&_e===1&&T(ue,j,[F.xaxis],[F.yaxis],F.id,F.dragOptions),ve.indexOf("event")>-1&&c.click(j,ue,F.id)}function he(_e,ue,ve){var le=P.getBoundingClientRect();re=ue-le.left,ne=ve-le.top,j._fullLayout._calcInverseTransform(j);var Ae=j._fullLayout._invTransform,Be=E.apply3DTransform(Ae)(re,ne);re=Be[0],ne=Be[1],se={a:F.aaxis.range[0],b:F.baxis.range[1],c:F.caxis.range[1]},Z=se,V=F.aaxis.range[1]-se.a,K=e.luminosity(F.graphDiv._fullLayout[F.id].bgcolor),H="M0,"+F.h+"L"+F.w/2+", 0L"+F.w+","+F.h+"Z",X=!1,q=U.append("path").attr("class","zoombox").attr("transform",k(F.x0,F.y0)).style({fill:K>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",H),W=U.append("path").attr("class","zoombox-corners").attr("transform",k(F.x0,F.y0)).style({fill:e.background,stroke:e.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),F.clearOutline(j)}function xe(_e,ue){return 1-ue/F.h}function we(_e,ue){return 1-(_e+(F.h-ue)/Math.sqrt(3))/F.w}function Me(_e,ue){return(_e-(F.h-ue)/Math.sqrt(3))/F.w}function Se(_e,ue){var ve=re+_e*$,le=ne+ue*Q,Ae=Math.max(0,Math.min(1,xe(re,ne),xe(ve,le))),Be=Math.max(0,Math.min(1,we(re,ne),we(ve,le))),Xe=Math.max(0,Math.min(1,Me(re,ne),Me(ve,le))),Ye=(Ae/2+Xe)*F.w,yt=(1-Ae/2-Be)*F.w,gt=(Ye+yt)/2,Tt=yt-Ye,At=(1-Ae)*F.h,$t=At-Tt/h;Tt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),W.transition().style("opacity",1).duration(200),X=!0),j.emit("plotly_relayouting",ee(Z))}function Ie(){B(j),Z!==se&&(b.call("_guiRelayout",j,ee(Z)),D&&j.data&&j._context.showTips&&(E.notifier(l(j,"Double-click to zoom back out"),"long",j),D=!1))}function Ge(){se={a:F.aaxis.range[0],b:F.baxis.range[1],c:F.caxis.range[1]},Z=se}function qe(_e,ue){var ve=_e/F.xaxis._m,le=ue/F.yaxis._m;Z={a:se.a-le,b:se.b+(ve+le)/2,c:se.c-(ve-le)/2};var Ae=[Z.a,Z.b,Z.c].sort(E.sorterAsc),Be={a:Ae.indexOf(Z.a),b:Ae.indexOf(Z.b),c:Ae.indexOf(Z.c)};Ae[0]<0&&(Ae[1]+Ae[0]/2<0?(Ae[2]+=Ae[0]+Ae[1],Ae[0]=Ae[1]=0):(Ae[2]+=Ae[0]/2,Ae[1]+=Ae[0]/2,Ae[0]=0),Z={a:Ae[Be.a],b:Ae[Be.b],c:Ae[Be.c]},ue=(se.a-Z.a)*F.yaxis._m,_e=(se.c-Z.c-se.b+Z.b)*F.xaxis._m);var Xe=k(F.x0+_e,F.y0+ue);F.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Xe);var Ye=k(-_e,-ue);F.clipDefRelative.select("path").attr("transform",Ye),F.aaxis.range=[Z.a,F.sum-Z.b-Z.c],F.baxis.range=[F.sum-Z.a-Z.c,Z.b],F.caxis.range=[F.sum-Z.a-Z.b,Z.c],F.drawAxes(!1),F._hasClipOnAxisFalse&&F.plotContainer.select(".scatterlayer").selectAll(".trace").call(t.hideOutsideRangePoints,F),j.emit("plotly_relayouting",ee(Z))}function ke(){b.call("_guiRelayout",j,ee(Z))}P.onmousemove=function(_e){c.hover(j,_e,F.id),j._fullLayout._lasthover=P,j._fullLayout._hoversubplot=F.id},P.onmouseout=function(_e){j._dragging||s.unhover(j,_e)},s.init(this.dragOptions)};function B(F){p.select(F).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),pT=ze({"src/plots/ternary/layout_attributes.js"(J,G){"use strict";var p=fc(),b=Ml().attributes,E=cf(),k=Al().overrideAll,l=Ki().extendFlat,e={title:{text:E.title.text,font:E.title.font},color:E.color,tickmode:E.minor.tickmode,nticks:l({},E.nticks,{dflt:6,min:1}),tick0:E.tick0,dtick:E.dtick,tickvals:E.tickvals,ticktext:E.ticktext,ticks:E.ticks,ticklen:E.ticklen,tickwidth:E.tickwidth,tickcolor:E.tickcolor,ticklabelstep:E.ticklabelstep,showticklabels:E.showticklabels,labelalias:E.labelalias,showtickprefix:E.showtickprefix,tickprefix:E.tickprefix,showticksuffix:E.showticksuffix,ticksuffix:E.ticksuffix,showexponent:E.showexponent,exponentformat:E.exponentformat,minexponent:E.minexponent,separatethousands:E.separatethousands,tickfont:E.tickfont,tickangle:E.tickangle,tickformat:E.tickformat,tickformatstops:E.tickformatstops,hoverformat:E.hoverformat,showline:l({},E.showline,{dflt:!0}),linecolor:E.linecolor,linewidth:E.linewidth,showgrid:l({},E.showgrid,{dflt:!0}),gridcolor:E.gridcolor,gridwidth:E.gridwidth,griddash:E.griddash,layer:E.layer,min:{valType:"number",dflt:0,min:0}},t=G.exports=k({domain:b({name:"ternary"}),bgcolor:{valType:"color",dflt:p.background},sum:{valType:"number",dflt:1,min:0},aaxis:e,baxis:e,caxis:e},"plot","from-root");t.uirevision={valType:"any",editType:"none"},t.aaxis.uirevision=t.baxis.uirevision=t.caxis.uirevision={valType:"any",editType:"none"}}}),Zv=ze({"src/plots/subplot_defaults.js"(J,G){"use strict";var p=Nr(),b=hs(),E=Ml().defaults;G.exports=function(l,e,t,n){var r=n.type,a=n.attributes,o=n.handleDefaults,s=n.partition||"x",c=e._subplots[r],g=c.length,f=g&&c[0].replace(/\d+$/,""),v,m;function i(C,_){return p.coerce(v,m,a,C,_)}for(var T=0;T=T&&(w.min=0,h.min=0,u.min=0,g.aaxis&&delete g.aaxis.min,g.baxis&&delete g.baxis.min,g.caxis&&delete g.caxis.min)}function c(g,f,v,m){var i=a[f._name];function T(A,x){return E.coerce(g,f,i,A,x)}T("uirevision",m.uirevision),f.type="linear";var S=T("color"),M=S!==i.color.dflt?S:v.font.color,C=f._name,_=C.charAt(0).toUpperCase(),w="Component "+_,h=T("title.text",w);f._hovertitle=h===w?h:_,E.coerceFont(T,"title.font",v.font,{overrideDflt:{size:E.bigFont(v.font.size),color:M}}),T("min"),n(g,f,T,"linear"),e(g,f,T,"linear"),l(g,f,T,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),t(g,f,T,{outerTicks:!0});var u=T("showticklabels");u&&(E.coerceFont(T,"tickfont",v.font,{overrideDflt:{color:M}}),T("tickangle"),T("tickformat")),r(g,f,T,{dfltColor:S,bgColor:v.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),T("hoverformat"),T("layer")}}}),fz=ze({"src/plots/ternary/index.js"(J){"use strict";var G=uz(),p=zf().getSubplotCalcData,b=Nr().counterRegex,E="ternary";J.name=E;var k=J.attr="subplot";J.idRoot=E,J.idRegex=J.attrRegex=b(E);var l=J.attributes={};l[k]={valType:"subplotid",dflt:"ternary",editType:"calc"},J.layoutAttributes=pT(),J.supplyLayoutDefaults=cz(),J.plot=function(t){for(var n=t._fullLayout,r=t.calcdata,a=n._subplots[E],o=0;o0){var C=t.xa,_=t.ya,w,h,u,A,x;g.orientation==="h"?(x=n,w="y",u=_,h="x",A=C):(x=r,w="x",u=C,h="y",A=_);var z=c[t.index];if(x>=z.span[0]&&x<=z.span[1]){var I=b.extendFlat({},t),O=A.c2p(x,!0),D=l.getKdeValue(z,g,x),B=l.getPositionOnKdePath(z,g,O),F=u._offset,P=u._length;I[w+"0"]=B[0],I[w+"1"]=B[1],I[h+"0"]=I[h+"1"]=O,I[h+"Label"]=h+": "+E.hoverLabelText(A,x,g[h+"hoverformat"])+", "+c[0].t.labels.kde+" "+D.toFixed(3);for(var j=0,U=0;U path").each(function(v){if(!v.isBlank){var m=f.marker;p.select(this).call(E.fill,v.mc||m.color).call(E.stroke,v.mlc||m.line.color).call(b.dashLine,m.line.dash,v.mlw||m.line.width).style("opacity",f.selectedpoints&&!v.selected?k:1)}}),t(g,f,r),g.selectAll(".regions").each(function(){p.select(this).selectAll("path").style("stroke-width",0).call(E.fill,f.connector.fillcolor)}),g.selectAll(".lines").each(function(){var v=f.connector.line;b.lineGroupStyle(p.select(this).selectAll("path"),v.width,v.color,v.dash)})})}G.exports={style:n}}}),Lz=ze({"src/traces/funnel/hover.js"(J,G){"use strict";var p=Qn().opacity,b=e1().hoverOnBars,E=Nr().formatPercent;G.exports=function(e,t,n,r,a){var o=b(e,t,n,r,a);if(o){var s=o.cd,c=s[0].trace,g=c.orientation==="h",f=o.index,v=s[f],m=g?"x":"y";o[m+"LabelVal"]=v.s,o.percentInitial=v.begR,o.percentInitialLabel=E(v.begR,1),o.percentPrevious=v.difR,o.percentPreviousLabel=E(v.difR,1),o.percentTotal=v.sumR,o.percentTotalLabel=E(v.sumR,1);var i=v.hi||c.hoverinfo,T=[];if(i&&i!=="none"&&i!=="skip"){var S=i==="all",M=i.split("+"),C=function(_){return S||M.indexOf(_)!==-1};C("percent initial")&&T.push(o.percentInitialLabel+" of initial"),C("percent previous")&&T.push(o.percentPreviousLabel+" of previous"),C("percent total")&&T.push(o.percentTotalLabel+" of total")}return o.extraText=T.join("
"),o.color=k(c,v),[o]}};function k(l,e){var t=l.marker,n=e.mc||t.color,r=e.mlc||t.line.color,a=e.mlw||t.line.width;if(p(n))return n;if(p(r)&&a)return r}}}),Pz=ze({"src/traces/funnel/event_data.js"(J,G){"use strict";G.exports=function(b,E){return b.x="xVal"in E?E.xVal:E.x,b.y="yVal"in E?E.yVal:E.y,"percentInitial"in E&&(b.percentInitial=E.percentInitial),"percentPrevious"in E&&(b.percentPrevious=E.percentPrevious),"percentTotal"in E&&(b.percentTotal=E.percentTotal),E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),b}}}),Rz=ze({"src/traces/funnel/index.js"(J,G){"use strict";G.exports={attributes:gT(),layoutAttributes:yT(),supplyDefaults:_T().supplyDefaults,crossTraceDefaults:_T().crossTraceDefaults,supplyLayoutDefaults:Az(),calc:Sz(),crossTraceCalc:Ez(),plot:kz(),style:Cz().style,hoverPoints:Lz(),eventData:Pz(),selectPoints:t1(),moduleType:"trace",name:"funnel",basePlotModule:Du(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Iz=ze({"lib/funnel.js"(J,G){"use strict";G.exports=Rz()}}),Dz=ze({"src/traces/waterfall/constants.js"(J,G){"use strict";G.exports={eventDataKeys:["initial","delta","final"]}}}),xT=ze({"src/traces/waterfall/attributes.js"(J,G){"use strict";var p=jd(),b=su().line,E=ws(),k=Il().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Dz(),r=Ki().extendFlat,a=Qn();function o(s){return{marker:{color:r({},p.marker.color,{arrayOk:!1,editType:"style"}),line:{color:r({},p.marker.line.color,{arrayOk:!1,editType:"style"}),width:r({},p.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}G.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:p.x,x0:p.x0,dx:p.dx,y:p.y,y0:p.y0,dy:p.dy,xperiod:p.xperiod,yperiod:p.yperiod,xperiod0:p.xperiod0,yperiod0:p.yperiod0,xperiodalignment:p.xperiodalignment,yperiodalignment:p.yperiodalignment,xhoverformat:k("x"),yhoverformat:k("y"),hovertext:p.hovertext,hovertemplate:l({},{keys:n.eventDataKeys}),hovertemplatefallback:t(),hoverinfo:r({},E.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:e({editType:"plot"},{keys:n.eventDataKeys.concat(["label"])}),texttemplatefallback:t({editType:"plot"}),text:p.text,textposition:p.textposition,insidetextanchor:p.insidetextanchor,textangle:p.textangle,textfont:p.textfont,insidetextfont:p.insidetextfont,outsidetextfont:p.outsidetextfont,constraintext:p.constraintext,cliponaxis:p.cliponaxis,orientation:p.orientation,offset:p.offset,width:p.width,increasing:o("increasing"),decreasing:o("decreasing"),totals:o("intermediate sums and total"),connector:{line:{color:r({},b.color,{dflt:a.defaultLine}),width:r({},b.width,{editType:"plot"}),dash:b.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:p.offsetgroup,alignmentgroup:p.alignmentgroup,zorder:p.zorder}}}),bT=ze({"src/traces/waterfall/layout_attributes.js"(J,G){"use strict";G.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}}}),n1=ze({"src/constants/delta.js"(J,G){"use strict";G.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),wT=ze({"src/traces/waterfall/defaults.js"(J,G){"use strict";var p=Nr(),b=Hv(),E=qh().handleText,k=Gv(),l=yd(),e=xT(),t=Qn(),n=n1(),r=n.INCREASING.COLOR,a=n.DECREASING.COLOR,o="#4499FF";function s(f,v,m){f(v+".marker.color",m),f(v+".marker.line.color",t.defaultLine),f(v+".marker.line.width")}function c(f,v,m,i){function T(w,h){return p.coerce(f,v,e,w,h)}var S=k(f,v,i,T);if(!S){v.visible=!1;return}l(f,v,i,T),T("xhoverformat"),T("yhoverformat"),T("measure"),T("orientation",v.x&&!v.y?"h":"v"),T("base"),T("offset"),T("width"),T("text"),T("hovertext"),T("hovertemplate"),T("hovertemplatefallback");var M=T("textposition");E(f,v,i,T,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),v.textposition!=="none"&&(T("texttemplate"),T("texttemplatefallback"),v.texttemplate||T("textinfo")),s(T,"increasing",r),s(T,"decreasing",a),s(T,"totals",o);var C=T("connector.visible");if(C){T("connector.mode");var _=T("connector.line.width");_&&(T("connector.line.color"),T("connector.line.dash"))}T("zorder")}function g(f,v){var m,i;function T(M){return p.coerce(i._input,i,e,M)}if(v.waterfallmode==="group")for(var S=0;S0&&(T?x+="M"+u[0]+","+A[1]+"V"+A[0]:x+="M"+u[1]+","+A[0]+"H"+u[0]),S!=="between"&&(_.isSum||w path").each(function(v){if(!v.isBlank){var m=f[v.dir].marker;p.select(this).call(E.fill,m.color).call(E.stroke,m.line.color).call(b.dashLine,m.line.dash,m.line.width).style("opacity",f.selectedpoints&&!v.selected?k:1)}}),t(g,f,r),g.selectAll(".lines").each(function(){var v=f.connector.line;b.lineGroupStyle(p.select(this).selectAll("path"),v.width,v.color,v.dash)})})}G.exports={style:n}}}),jz=ze({"src/traces/waterfall/hover.js"(J,G){"use strict";var p=Gi().hoverLabelText,b=Qn().opacity,E=e1().hoverOnBars,k=n1(),l={increasing:k.INCREASING.SYMBOL,decreasing:k.DECREASING.SYMBOL};G.exports=function(n,r,a,o,s){var c=E(n,r,a,o,s);if(!c)return;var g=c.cd,f=g[0].trace,v=f.orientation==="h",m=v?"x":"y",i=v?n.xa:n.ya;function T(z){return p(i,z,f[m+"hoverformat"])}var S=c.index,M=g[S],C=M.isSum?M.b+M.s:M.rawS;c.initial=M.b+M.s-C,c.delta=C,c.final=c.initial+c.delta;var _=T(Math.abs(c.delta));c.deltaLabel=C<0?"("+_+")":_,c.finalLabel=T(c.final),c.initialLabel=T(c.initial);var w=M.hi||f.hoverinfo,h=[];if(w&&w!=="none"&&w!=="skip"){var u=w==="all",A=w.split("+"),x=function(z){return u||A.indexOf(z)!==-1};M.isSum||(x("final")&&(v?!x("x"):!x("y"))&&h.push(c.finalLabel),x("delta")&&(C<0?h.push(c.deltaLabel+" "+l.decreasing):h.push(c.deltaLabel+" "+l.increasing)),x("initial")&&h.push("Initial: "+c.initialLabel))}return h.length&&(c.extraText=h.join("
")),c.color=e(f,M),[c]};function e(t,n){var r=t[n.dir].marker,a=r.color,o=r.line.color,s=r.line.width;if(b(a))return a;if(b(o)&&s)return o}}}),Uz=ze({"src/traces/waterfall/event_data.js"(J,G){"use strict";G.exports=function(b,E){return b.x="xVal"in E?E.xVal:E.x,b.y="yVal"in E?E.yVal:E.y,"initial"in E&&(b.initial=E.initial),"delta"in E&&(b.delta=E.delta),"final"in E&&(b.final=E.final),E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),b}}}),qz=ze({"src/traces/waterfall/index.js"(J,G){"use strict";G.exports={attributes:xT(),layoutAttributes:bT(),supplyDefaults:wT().supplyDefaults,crossTraceDefaults:wT().crossTraceDefaults,supplyLayoutDefaults:Fz(),calc:zz(),crossTraceCalc:Bz(),plot:Oz(),style:Nz().style,hoverPoints:jz(),eventData:Uz(),selectPoints:t1(),moduleType:"trace",name:"waterfall",basePlotModule:Du(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Vz=ze({"lib/waterfall.js"(J,G){"use strict";G.exports=qz()}}),i1=ze({"src/traces/image/constants.js"(J,G){"use strict";G.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(p){return p.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(p){return p.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(p){return p.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(p){var b=p.slice(0,3);return b[1]=b[1]+"%",b[2]=b[2]+"%",b},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(p){var b=p.slice(0,4);return b[1]=b[1]+"%",b[2]=b[2]+"%",b},suffix:["\xB0","%","%",""]}}}}}),Sb={};bu(Sb,{default:()=>kT});var TT,AT,Eb,MT,ST,kb,Cb,Lb,ET,kT,CT=zi({"src/traces/image/attributes.ts"(){"use strict";TT=Yl(Ki()),AT=Yl(ws()),Eb=Yl(xs()),MT=Yl(su()),ST=Yl(i1()),kb=["rgb","rgba","rgba256","hsl","hsla"],Cb=[],Lb=[];for(let J of kb){let G=ST.colormodel[J];Cb.push(`For the \`${J}\` colormodel, it is [${(G.zminDflt||G.min).join(", ")}].`),Lb.push(`For the \`${J}\` colormodel, it is [${(G.zmaxDflt||G.max).join(", ")}].`)}ET={source:{valType:"string",editType:"calc",description:["Specifies the data URI of the image to be visualized.",'The URI consists of "data:image/[][;base64\\\\],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:kb,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",Cb.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",Lb.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,TT.extendFlat)({},AT.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,Eb.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,Eb.templatefallbackAttrs)(),zorder:MT.zorder},kT=ET}}),Gz=ze({"src/traces/image/defaults.js"(J,G){"use strict";var p=Nr(),b=(CT(),Po(Sb)).default,E=i1(),k=ip().IMAGE_URL_PREFIX;G.exports=function(e,t){function n(o,s){return p.coerce(e,t,b,o,s)}n("source"),t.source&&!t.source.match(k)&&delete t.source,t._hasSource=!!t.source;var r=n("z");if(t._hasZ=!(r===void 0||!r.length||!r[0]||!r[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}n("x0"),n("y0"),n("dx"),n("dy");var a;t._hasZ?(n("colormodel","rgb"),a=E.colormodel[t.colormodel],n("zmin",a.zminDflt||a.min),n("zmax",a.zmaxDflt||a.max)):t._hasSource&&(t.colormodel="rgba256",a=E.colormodel[t.colormodel],t.zmin=a.zminDflt,t.zmax=a.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),t._length=null,n("zorder")}}}),op=ze({"node_modules/inherits/inherits_browser.js"(J,G){typeof Object.create=="function"?G.exports=function(b,E){E&&(b.super_=E,b.prototype=Object.create(E.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}))}:G.exports=function(b,E){if(E){b.super_=E;var k=function(){};k.prototype=E.prototype,b.prototype=new k,b.prototype.constructor=b}}}}),LT=ze({"node_modules/readable-stream/lib/internal/streams/stream-browser.js"(J,G){G.exports=jv().EventEmitter}}),Hz=ze({"node_modules/base64-js/index.js"(J){"use strict";J.byteLength=t,J.toByteArray=r,J.fromByteArray=s;var G=[],p=[],b=typeof Uint8Array<"u"?Uint8Array:Array,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(k=0,l=E.length;k0)throw new Error("Invalid string. Length must be a multiple of 4");var f=c.indexOf("=");f===-1&&(f=g);var v=f===g?0:4-f%4;return[f,v]}function t(c){var g=e(c),f=g[0],v=g[1];return(f+v)*3/4-v}function n(c,g,f){return(g+f)*3/4-f}function r(c){var g,f=e(c),v=f[0],m=f[1],i=new b(n(c,v,m)),T=0,S=m>0?v-4:v,M;for(M=0;M>16&255,i[T++]=g>>8&255,i[T++]=g&255;return m===2&&(g=p[c.charCodeAt(M)]<<2|p[c.charCodeAt(M+1)]>>4,i[T++]=g&255),m===1&&(g=p[c.charCodeAt(M)]<<10|p[c.charCodeAt(M+1)]<<4|p[c.charCodeAt(M+2)]>>2,i[T++]=g>>8&255,i[T++]=g&255),i}function a(c){return G[c>>18&63]+G[c>>12&63]+G[c>>6&63]+G[c&63]}function o(c,g,f){for(var v,m=[],i=g;iS?S:T+i));return v===1?(g=c[f-1],m.push(G[g>>2]+G[g<<4&63]+"==")):v===2&&(g=(c[f-2]<<8)+c[f-1],m.push(G[g>>10]+G[g>>4&63]+G[g<<2&63]+"=")),m.join("")}}}),Wz=ze({"node_modules/ieee754/index.js"(J){J.read=function(G,p,b,E,k){var l,e,t=k*8-E-1,n=(1<>1,a=-7,o=b?k-1:0,s=b?-1:1,c=G[p+o];for(o+=s,l=c&(1<<-a)-1,c>>=-a,a+=t;a>0;l=l*256+G[p+o],o+=s,a-=8);for(e=l&(1<<-a)-1,l>>=-a,a+=E;a>0;e=e*256+G[p+o],o+=s,a-=8);if(l===0)l=1-r;else{if(l===n)return e?NaN:(c?-1:1)*(1/0);e=e+Math.pow(2,E),l=l-r}return(c?-1:1)*e*Math.pow(2,l-E)},J.write=function(G,p,b,E,k,l){var e,t,n,r=l*8-k-1,a=(1<>1,s=k===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=E?0:l-1,g=E?1:-1,f=p<0||p===0&&1/p<0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(t=isNaN(p)?1:0,e=a):(e=Math.floor(Math.log(p)/Math.LN2),p*(n=Math.pow(2,-e))<1&&(e--,n*=2),e+o>=1?p+=s/n:p+=s*Math.pow(2,1-o),p*n>=2&&(e++,n/=2),e+o>=a?(t=0,e=a):e+o>=1?(t=(p*n-1)*Math.pow(2,k),e=e+o):(t=p*Math.pow(2,o-1)*Math.pow(2,k),e=0));k>=8;G[b+c]=t&255,c+=g,t/=256,k-=8);for(e=e<0;G[b+c]=e&255,c+=g,e/=256,r-=8);G[b+c-g]|=f*128}}}),$v=ze({"node_modules/buffer/index.js"(J){"use strict";var G=Hz(),p=Wz(),b=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;J.Buffer=e,J.SlowBuffer=m,J.INSPECT_MAX_BYTES=50;var E=2147483647;J.kMaxLength=E,e.TYPED_ARRAY_SUPPORT=k(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function k(){try{let ue=new Uint8Array(1),ve={foo:function(){return 42}};return Object.setPrototypeOf(ve,Uint8Array.prototype),Object.setPrototypeOf(ue,ve),ue.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function l(ue){if(ue>E)throw new RangeError('The value "'+ue+'" is invalid for option "size"');let ve=new Uint8Array(ue);return Object.setPrototypeOf(ve,e.prototype),ve}function e(ue,ve,le){if(typeof ue=="number"){if(typeof ve=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return a(ue)}return t(ue,ve,le)}e.poolSize=8192;function t(ue,ve,le){if(typeof ue=="string")return o(ue,ve);if(ArrayBuffer.isView(ue))return c(ue);if(ue==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ue);if(Ie(ue,ArrayBuffer)||ue&&Ie(ue.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(ue,SharedArrayBuffer)||ue&&Ie(ue.buffer,SharedArrayBuffer)))return g(ue,ve,le);if(typeof ue=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Ae=ue.valueOf&&ue.valueOf();if(Ae!=null&&Ae!==ue)return e.from(Ae,ve,le);let Be=f(ue);if(Be)return Be;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ue[Symbol.toPrimitive]=="function")return e.from(ue[Symbol.toPrimitive]("string"),ve,le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ue)}e.from=function(ue,ve,le){return t(ue,ve,le)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function n(ue){if(typeof ue!="number")throw new TypeError('"size" argument must be of type number');if(ue<0)throw new RangeError('The value "'+ue+'" is invalid for option "size"')}function r(ue,ve,le){return n(ue),ue<=0?l(ue):ve!==void 0?typeof le=="string"?l(ue).fill(ve,le):l(ue).fill(ve):l(ue)}e.alloc=function(ue,ve,le){return r(ue,ve,le)};function a(ue){return n(ue),l(ue<0?0:v(ue)|0)}e.allocUnsafe=function(ue){return a(ue)},e.allocUnsafeSlow=function(ue){return a(ue)};function o(ue,ve){if((typeof ve!="string"||ve==="")&&(ve="utf8"),!e.isEncoding(ve))throw new TypeError("Unknown encoding: "+ve);let le=i(ue,ve)|0,Ae=l(le),Be=Ae.write(ue,ve);return Be!==le&&(Ae=Ae.slice(0,Be)),Ae}function s(ue){let ve=ue.length<0?0:v(ue.length)|0,le=l(ve);for(let Ae=0;Ae=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return ue|0}function m(ue){return+ue!=ue&&(ue=0),e.alloc(+ue)}e.isBuffer=function(ve){return ve!=null&&ve._isBuffer===!0&&ve!==e.prototype},e.compare=function(ve,le){if(Ie(ve,Uint8Array)&&(ve=e.from(ve,ve.offset,ve.byteLength)),Ie(le,Uint8Array)&&(le=e.from(le,le.offset,le.byteLength)),!e.isBuffer(ve)||!e.isBuffer(le))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ve===le)return 0;let Ae=ve.length,Be=le.length;for(let Xe=0,Ye=Math.min(Ae,Be);XeBe.length?(e.isBuffer(Ye)||(Ye=e.from(Ye)),Ye.copy(Be,Xe)):Uint8Array.prototype.set.call(Be,Ye,Xe);else if(e.isBuffer(Ye))Ye.copy(Be,Xe);else throw new TypeError('"list" argument must be an Array of Buffers');Xe+=Ye.length}return Be};function i(ue,ve){if(e.isBuffer(ue))return ue.length;if(ArrayBuffer.isView(ue)||Ie(ue,ArrayBuffer))return ue.byteLength;if(typeof ue!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ue);let le=ue.length,Ae=arguments.length>2&&arguments[2]===!0;if(!Ae&&le===0)return 0;let Be=!1;for(;;)switch(ve){case"ascii":case"latin1":case"binary":return le;case"utf8":case"utf-8":return he(ue).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le*2;case"hex":return le>>>1;case"base64":return Me(ue).length;default:if(Be)return Ae?-1:he(ue).length;ve=(""+ve).toLowerCase(),Be=!0}}e.byteLength=i;function T(ue,ve,le){let Ae=!1;if((ve===void 0||ve<0)&&(ve=0),ve>this.length||((le===void 0||le>this.length)&&(le=this.length),le<=0)||(le>>>=0,ve>>>=0,le<=ve))return"";for(ue||(ue="utf8");;)switch(ue){case"hex":return F(this,ve,le);case"utf8":case"utf-8":return z(this,ve,le);case"ascii":return D(this,ve,le);case"latin1":case"binary":return B(this,ve,le);case"base64":return x(this,ve,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,ve,le);default:if(Ae)throw new TypeError("Unknown encoding: "+ue);ue=(ue+"").toLowerCase(),Ae=!0}}e.prototype._isBuffer=!0;function S(ue,ve,le){let Ae=ue[ve];ue[ve]=ue[le],ue[le]=Ae}e.prototype.swap16=function(){let ve=this.length;if(ve%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let le=0;lele&&(ve+=" ... "),""},b&&(e.prototype[b]=e.prototype.inspect),e.prototype.compare=function(ve,le,Ae,Be,Xe){if(Ie(ve,Uint8Array)&&(ve=e.from(ve,ve.offset,ve.byteLength)),!e.isBuffer(ve))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ve);if(le===void 0&&(le=0),Ae===void 0&&(Ae=ve?ve.length:0),Be===void 0&&(Be=0),Xe===void 0&&(Xe=this.length),le<0||Ae>ve.length||Be<0||Xe>this.length)throw new RangeError("out of range index");if(Be>=Xe&&le>=Ae)return 0;if(Be>=Xe)return-1;if(le>=Ae)return 1;if(le>>>=0,Ae>>>=0,Be>>>=0,Xe>>>=0,this===ve)return 0;let Ye=Xe-Be,yt=Ae-le,gt=Math.min(Ye,yt),Tt=this.slice(Be,Xe),At=ve.slice(le,Ae);for(let $t=0;$t2147483647?le=2147483647:le<-2147483648&&(le=-2147483648),le=+le,Ge(le)&&(le=Be?0:ue.length-1),le<0&&(le=ue.length+le),le>=ue.length){if(Be)return-1;le=ue.length-1}else if(le<0)if(Be)le=0;else return-1;if(typeof ve=="string"&&(ve=e.from(ve,Ae)),e.isBuffer(ve))return ve.length===0?-1:C(ue,ve,le,Ae,Be);if(typeof ve=="number")return ve=ve&255,typeof Uint8Array.prototype.indexOf=="function"?Be?Uint8Array.prototype.indexOf.call(ue,ve,le):Uint8Array.prototype.lastIndexOf.call(ue,ve,le):C(ue,[ve],le,Ae,Be);throw new TypeError("val must be string, number or Buffer")}function C(ue,ve,le,Ae,Be){let Xe=1,Ye=ue.length,yt=ve.length;if(Ae!==void 0&&(Ae=String(Ae).toLowerCase(),Ae==="ucs2"||Ae==="ucs-2"||Ae==="utf16le"||Ae==="utf-16le")){if(ue.length<2||ve.length<2)return-1;Xe=2,Ye/=2,yt/=2,le/=2}function gt(At,$t){return Xe===1?At[$t]:At.readUInt16BE($t*Xe)}let Tt;if(Be){let At=-1;for(Tt=le;TtYe&&(le=Ye-yt),Tt=le;Tt>=0;Tt--){let At=!0;for(let $t=0;$tBe&&(Ae=Be)):Ae=Be;let Xe=ve.length;Ae>Xe/2&&(Ae=Xe/2);let Ye;for(Ye=0;Ye>>0,isFinite(Ae)?(Ae=Ae>>>0,Be===void 0&&(Be="utf8")):(Be=Ae,Ae=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let Xe=this.length-le;if((Ae===void 0||Ae>Xe)&&(Ae=Xe),ve.length>0&&(Ae<0||le<0)||le>this.length)throw new RangeError("Attempt to write outside buffer bounds");Be||(Be="utf8");let Ye=!1;for(;;)switch(Be){case"hex":return _(this,ve,le,Ae);case"utf8":case"utf-8":return w(this,ve,le,Ae);case"ascii":case"latin1":case"binary":return h(this,ve,le,Ae);case"base64":return u(this,ve,le,Ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,ve,le,Ae);default:if(Ye)throw new TypeError("Unknown encoding: "+Be);Be=(""+Be).toLowerCase(),Ye=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(ue,ve,le){return ve===0&&le===ue.length?G.fromByteArray(ue):G.fromByteArray(ue.slice(ve,le))}function z(ue,ve,le){le=Math.min(ue.length,le);let Ae=[],Be=ve;for(;Be239?4:Xe>223?3:Xe>191?2:1;if(Be+yt<=le){let gt,Tt,At,$t;switch(yt){case 1:Xe<128&&(Ye=Xe);break;case 2:gt=ue[Be+1],(gt&192)===128&&($t=(Xe&31)<<6|gt&63,$t>127&&(Ye=$t));break;case 3:gt=ue[Be+1],Tt=ue[Be+2],(gt&192)===128&&(Tt&192)===128&&($t=(Xe&15)<<12|(gt&63)<<6|Tt&63,$t>2047&&($t<55296||$t>57343)&&(Ye=$t));break;case 4:gt=ue[Be+1],Tt=ue[Be+2],At=ue[Be+3],(gt&192)===128&&(Tt&192)===128&&(At&192)===128&&($t=(Xe&15)<<18|(gt&63)<<12|(Tt&63)<<6|At&63,$t>65535&&$t<1114112&&(Ye=$t))}}Ye===null?(Ye=65533,yt=1):Ye>65535&&(Ye-=65536,Ae.push(Ye>>>10&1023|55296),Ye=56320|Ye&1023),Ae.push(Ye),Be+=yt}return O(Ae)}var I=4096;function O(ue){let ve=ue.length;if(ve<=I)return String.fromCharCode.apply(String,ue);let le="",Ae=0;for(;AeAe)&&(le=Ae);let Be="";for(let Xe=ve;XeAe&&(ve=Ae),le<0?(le+=Ae,le<0&&(le=0)):le>Ae&&(le=Ae),lele)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(ve,le,Ae){ve=ve>>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=this[ve],Xe=1,Ye=0;for(;++Ye>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=this[ve+--le],Xe=1;for(;le>0&&(Xe*=256);)Be+=this[ve+--le]*Xe;return Be},e.prototype.readUint8=e.prototype.readUInt8=function(ve,le){return ve=ve>>>0,le||j(ve,1,this.length),this[ve]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(ve,le){return ve=ve>>>0,le||j(ve,2,this.length),this[ve]|this[ve+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(ve,le){return ve=ve>>>0,le||j(ve,2,this.length),this[ve]<<8|this[ve+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),(this[ve]|this[ve+1]<<8|this[ve+2]<<16)+this[ve+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),this[ve]*16777216+(this[ve+1]<<16|this[ve+2]<<8|this[ve+3])},e.prototype.readBigUInt64LE=ke(function(ve){ve=ve>>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&W(ve,this.length-8);let Be=le+this[++ve]*2**8+this[++ve]*2**16+this[++ve]*2**24,Xe=this[++ve]+this[++ve]*2**8+this[++ve]*2**16+Ae*2**24;return BigInt(Be)+(BigInt(Xe)<>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&W(ve,this.length-8);let Be=le*2**24+this[++ve]*2**16+this[++ve]*2**8+this[++ve],Xe=this[++ve]*2**24+this[++ve]*2**16+this[++ve]*2**8+Ae;return(BigInt(Be)<>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=this[ve],Xe=1,Ye=0;for(;++Ye=Xe&&(Be-=Math.pow(2,8*le)),Be},e.prototype.readIntBE=function(ve,le,Ae){ve=ve>>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=le,Xe=1,Ye=this[ve+--Be];for(;Be>0&&(Xe*=256);)Ye+=this[ve+--Be]*Xe;return Xe*=128,Ye>=Xe&&(Ye-=Math.pow(2,8*le)),Ye},e.prototype.readInt8=function(ve,le){return ve=ve>>>0,le||j(ve,1,this.length),this[ve]&128?(255-this[ve]+1)*-1:this[ve]},e.prototype.readInt16LE=function(ve,le){ve=ve>>>0,le||j(ve,2,this.length);let Ae=this[ve]|this[ve+1]<<8;return Ae&32768?Ae|4294901760:Ae},e.prototype.readInt16BE=function(ve,le){ve=ve>>>0,le||j(ve,2,this.length);let Ae=this[ve+1]|this[ve]<<8;return Ae&32768?Ae|4294901760:Ae},e.prototype.readInt32LE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),this[ve]|this[ve+1]<<8|this[ve+2]<<16|this[ve+3]<<24},e.prototype.readInt32BE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),this[ve]<<24|this[ve+1]<<16|this[ve+2]<<8|this[ve+3]},e.prototype.readBigInt64LE=ke(function(ve){ve=ve>>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&W(ve,this.length-8);let Be=this[ve+4]+this[ve+5]*2**8+this[ve+6]*2**16+(Ae<<24);return(BigInt(Be)<>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&W(ve,this.length-8);let Be=(le<<24)+this[++ve]*2**16+this[++ve]*2**8+this[++ve];return(BigInt(Be)<>>0,le||j(ve,4,this.length),p.read(this,ve,!0,23,4)},e.prototype.readFloatBE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),p.read(this,ve,!1,23,4)},e.prototype.readDoubleLE=function(ve,le){return ve=ve>>>0,le||j(ve,8,this.length),p.read(this,ve,!0,52,8)},e.prototype.readDoubleBE=function(ve,le){return ve=ve>>>0,le||j(ve,8,this.length),p.read(this,ve,!1,52,8)};function U(ue,ve,le,Ae,Be,Xe){if(!e.isBuffer(ue))throw new TypeError('"buffer" argument must be a Buffer instance');if(ve>Be||veue.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(ve,le,Ae,Be){if(ve=+ve,le=le>>>0,Ae=Ae>>>0,!Be){let yt=Math.pow(2,8*Ae)-1;U(this,ve,le,Ae,yt,0)}let Xe=1,Ye=0;for(this[le]=ve&255;++Ye>>0,Ae=Ae>>>0,!Be){let yt=Math.pow(2,8*Ae)-1;U(this,ve,le,Ae,yt,0)}let Xe=Ae-1,Ye=1;for(this[le+Xe]=ve&255;--Xe>=0&&(Ye*=256);)this[le+Xe]=ve/Ye&255;return le+Ae},e.prototype.writeUint8=e.prototype.writeUInt8=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,1,255,0),this[le]=ve&255,le+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,65535,0),this[le]=ve&255,this[le+1]=ve>>>8,le+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,65535,0),this[le]=ve>>>8,this[le+1]=ve&255,le+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,4294967295,0),this[le+3]=ve>>>24,this[le+2]=ve>>>16,this[le+1]=ve>>>8,this[le]=ve&255,le+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,4294967295,0),this[le]=ve>>>24,this[le+1]=ve>>>16,this[le+2]=ve>>>8,this[le+3]=ve&255,le+4};function $(ue,ve,le,Ae,Be){X(ve,Ae,Be,ue,le,7);let Xe=Number(ve&BigInt(4294967295));ue[le++]=Xe,Xe=Xe>>8,ue[le++]=Xe,Xe=Xe>>8,ue[le++]=Xe,Xe=Xe>>8,ue[le++]=Xe;let Ye=Number(ve>>BigInt(32)&BigInt(4294967295));return ue[le++]=Ye,Ye=Ye>>8,ue[le++]=Ye,Ye=Ye>>8,ue[le++]=Ye,Ye=Ye>>8,ue[le++]=Ye,le}function Q(ue,ve,le,Ae,Be){X(ve,Ae,Be,ue,le,7);let Xe=Number(ve&BigInt(4294967295));ue[le+7]=Xe,Xe=Xe>>8,ue[le+6]=Xe,Xe=Xe>>8,ue[le+5]=Xe,Xe=Xe>>8,ue[le+4]=Xe;let Ye=Number(ve>>BigInt(32)&BigInt(4294967295));return ue[le+3]=Ye,Ye=Ye>>8,ue[le+2]=Ye,Ye=Ye>>8,ue[le+1]=Ye,Ye=Ye>>8,ue[le]=Ye,le+8}e.prototype.writeBigUInt64LE=ke(function(ve,le=0){return $(this,ve,le,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=ke(function(ve,le=0){return Q(this,ve,le,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(ve,le,Ae,Be){if(ve=+ve,le=le>>>0,!Be){let gt=Math.pow(2,8*Ae-1);U(this,ve,le,Ae,gt-1,-gt)}let Xe=0,Ye=1,yt=0;for(this[le]=ve&255;++Xe>0)-yt&255;return le+Ae},e.prototype.writeIntBE=function(ve,le,Ae,Be){if(ve=+ve,le=le>>>0,!Be){let gt=Math.pow(2,8*Ae-1);U(this,ve,le,Ae,gt-1,-gt)}let Xe=Ae-1,Ye=1,yt=0;for(this[le+Xe]=ve&255;--Xe>=0&&(Ye*=256);)ve<0&&yt===0&&this[le+Xe+1]!==0&&(yt=1),this[le+Xe]=(ve/Ye>>0)-yt&255;return le+Ae},e.prototype.writeInt8=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,1,127,-128),ve<0&&(ve=255+ve+1),this[le]=ve&255,le+1},e.prototype.writeInt16LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,32767,-32768),this[le]=ve&255,this[le+1]=ve>>>8,le+2},e.prototype.writeInt16BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,32767,-32768),this[le]=ve>>>8,this[le+1]=ve&255,le+2},e.prototype.writeInt32LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,2147483647,-2147483648),this[le]=ve&255,this[le+1]=ve>>>8,this[le+2]=ve>>>16,this[le+3]=ve>>>24,le+4},e.prototype.writeInt32BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,2147483647,-2147483648),ve<0&&(ve=4294967295+ve+1),this[le]=ve>>>24,this[le+1]=ve>>>16,this[le+2]=ve>>>8,this[le+3]=ve&255,le+4},e.prototype.writeBigInt64LE=ke(function(ve,le=0){return $(this,ve,le,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=ke(function(ve,le=0){return Q(this,ve,le,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function re(ue,ve,le,Ae,Be,Xe){if(le+Ae>ue.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("Index out of range")}function ne(ue,ve,le,Ae,Be){return ve=+ve,le=le>>>0,Be||re(ue,ve,le,4,34028234663852886e22,-34028234663852886e22),p.write(ue,ve,le,Ae,23,4),le+4}e.prototype.writeFloatLE=function(ve,le,Ae){return ne(this,ve,le,!0,Ae)},e.prototype.writeFloatBE=function(ve,le,Ae){return ne(this,ve,le,!1,Ae)};function se(ue,ve,le,Ae,Be){return ve=+ve,le=le>>>0,Be||re(ue,ve,le,8,17976931348623157e292,-17976931348623157e292),p.write(ue,ve,le,Ae,52,8),le+8}e.prototype.writeDoubleLE=function(ve,le,Ae){return se(this,ve,le,!0,Ae)},e.prototype.writeDoubleBE=function(ve,le,Ae){return se(this,ve,le,!1,Ae)},e.prototype.copy=function(ve,le,Ae,Be){if(!e.isBuffer(ve))throw new TypeError("argument should be a Buffer");if(Ae||(Ae=0),!Be&&Be!==0&&(Be=this.length),le>=ve.length&&(le=ve.length),le||(le=0),Be>0&&Be=this.length)throw new RangeError("Index out of range");if(Be<0)throw new RangeError("sourceEnd out of bounds");Be>this.length&&(Be=this.length),ve.length-le>>0,Ae=Ae===void 0?this.length:Ae>>>0,ve||(ve=0);let Xe;if(typeof ve=="number")for(Xe=le;Xe2**32?Be=K(String(le)):typeof le=="bigint"&&(Be=String(le),(le>BigInt(2)**BigInt(32)||le<-(BigInt(2)**BigInt(32)))&&(Be=K(Be)),Be+="n"),Ae+=` It must be ${ve}. Received ${Be}`,Ae},RangeError);function K(ue){let ve="",le=ue.length,Ae=ue[0]==="-"?1:0;for(;le>=Ae+4;le-=3)ve=`_${ue.slice(le-3,le)}${ve}`;return`${ue.slice(0,le)}${ve}`}function H(ue,ve,le){q(ve,"offset"),(ue[ve]===void 0||ue[ve+le]===void 0)&&W(ve,ue.length-(le+1))}function X(ue,ve,le,Ae,Be,Xe){if(ue>le||ue3?ve===0||ve===BigInt(0)?yt=`>= 0${Ye} and < 2${Ye} ** ${(Xe+1)*8}${Ye}`:yt=`>= -(2${Ye} ** ${(Xe+1)*8-1}${Ye}) and < 2 ** ${(Xe+1)*8-1}${Ye}`:yt=`>= ${ve}${Ye} and <= ${le}${Ye}`,new V.ERR_OUT_OF_RANGE("value",yt,ue)}H(Ae,Be,Xe)}function q(ue,ve){if(typeof ue!="number")throw new V.ERR_INVALID_ARG_TYPE(ve,"number",ue)}function W(ue,ve,le){throw Math.floor(ue)!==ue?(q(ue,le),new V.ERR_OUT_OF_RANGE(le||"offset","an integer",ue)):ve<0?new V.ERR_BUFFER_OUT_OF_BOUNDS:new V.ERR_OUT_OF_RANGE(le||"offset",`>= ${le?1:0} and <= ${ve}`,ue)}var ee=/[^+/0-9A-Za-z-_]/g;function ae(ue){if(ue=ue.split("=")[0],ue=ue.trim().replace(ee,""),ue.length<2)return"";for(;ue.length%4!==0;)ue=ue+"=";return ue}function he(ue,ve){ve=ve||1/0;let le,Ae=ue.length,Be=null,Xe=[];for(let Ye=0;Ye55295&&le<57344){if(!Be){if(le>56319){(ve-=3)>-1&&Xe.push(239,191,189);continue}else if(Ye+1===Ae){(ve-=3)>-1&&Xe.push(239,191,189);continue}Be=le;continue}if(le<56320){(ve-=3)>-1&&Xe.push(239,191,189),Be=le;continue}le=(Be-55296<<10|le-56320)+65536}else Be&&(ve-=3)>-1&&Xe.push(239,191,189);if(Be=null,le<128){if((ve-=1)<0)break;Xe.push(le)}else if(le<2048){if((ve-=2)<0)break;Xe.push(le>>6|192,le&63|128)}else if(le<65536){if((ve-=3)<0)break;Xe.push(le>>12|224,le>>6&63|128,le&63|128)}else if(le<1114112){if((ve-=4)<0)break;Xe.push(le>>18|240,le>>12&63|128,le>>6&63|128,le&63|128)}else throw new Error("Invalid code point")}return Xe}function xe(ue){let ve=[];for(let le=0;le>8,Be=le%256,Xe.push(Be),Xe.push(Ae);return Xe}function Me(ue){return G.toByteArray(ae(ue))}function Se(ue,ve,le,Ae){let Be;for(Be=0;Be=ve.length||Be>=ue.length);++Be)ve[Be+le]=ue[Be];return Be}function Ie(ue,ve){return ue instanceof ve||ue!=null&&ue.constructor!=null&&ue.constructor.name!=null&&ue.constructor.name===ve.name}function Ge(ue){return ue!==ue}var qe=function(){let ue="0123456789abcdef",ve=new Array(256);for(let le=0;le<16;++le){let Ae=le*16;for(let Be=0;Be<16;++Be)ve[Ae+Be]=ue[le]+ue[Be]}return ve}();function ke(ue){return typeof BigInt>"u"?_e:ue}function _e(){throw new Error("BigInt not supported")}}}),Pb=ze({"node_modules/has-symbols/shams.js"(J,G){"use strict";G.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var b={},E=Symbol("test"),k=Object(E);if(typeof E=="string"||Object.prototype.toString.call(E)!=="[object Symbol]"||Object.prototype.toString.call(k)!=="[object Symbol]")return!1;var l=42;b[E]=l;for(var e in b)return!1;if(typeof Object.keys=="function"&&Object.keys(b).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(b).length!==0)return!1;var t=Object.getOwnPropertySymbols(b);if(t.length!==1||t[0]!==E||!Object.prototype.propertyIsEnumerable.call(b,E))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var n=Object.getOwnPropertyDescriptor(b,E);if(n.value!==l||n.enumerable!==!0)return!1}return!0}}}),kg=ze({"node_modules/has-tostringtag/shams.js"(J,G){"use strict";var p=Pb();G.exports=function(){return p()&&!!Symbol.toStringTag}}}),Rb=ze({"node_modules/es-object-atoms/index.js"(J,G){"use strict";G.exports=Object}}),Yz=ze({"node_modules/es-errors/index.js"(J,G){"use strict";G.exports=Error}}),Xz=ze({"node_modules/es-errors/eval.js"(J,G){"use strict";G.exports=EvalError}}),Zz=ze({"node_modules/es-errors/range.js"(J,G){"use strict";G.exports=RangeError}}),$z=ze({"node_modules/es-errors/ref.js"(J,G){"use strict";G.exports=ReferenceError}}),PT=ze({"node_modules/es-errors/syntax.js"(J,G){"use strict";G.exports=SyntaxError}}),o1=ze({"node_modules/es-errors/type.js"(J,G){"use strict";G.exports=TypeError}}),Kz=ze({"node_modules/es-errors/uri.js"(J,G){"use strict";G.exports=URIError}}),Jz=ze({"node_modules/math-intrinsics/abs.js"(J,G){"use strict";G.exports=Math.abs}}),Qz=ze({"node_modules/math-intrinsics/floor.js"(J,G){"use strict";G.exports=Math.floor}}),eB=ze({"node_modules/math-intrinsics/max.js"(J,G){"use strict";G.exports=Math.max}}),tB=ze({"node_modules/math-intrinsics/min.js"(J,G){"use strict";G.exports=Math.min}}),rB=ze({"node_modules/math-intrinsics/pow.js"(J,G){"use strict";G.exports=Math.pow}}),aB=ze({"node_modules/math-intrinsics/round.js"(J,G){"use strict";G.exports=Math.round}}),nB=ze({"node_modules/math-intrinsics/isNaN.js"(J,G){"use strict";G.exports=Number.isNaN||function(b){return b!==b}}}),iB=ze({"node_modules/math-intrinsics/sign.js"(J,G){"use strict";var p=nB();G.exports=function(E){return p(E)||E===0?E:E<0?-1:1}}}),oB=ze({"node_modules/gopd/gOPD.js"(J,G){"use strict";G.exports=Object.getOwnPropertyDescriptor}}),Kv=ze({"node_modules/gopd/index.js"(J,G){"use strict";var p=oB();if(p)try{p([],"length")}catch{p=null}G.exports=p}}),Cg=ze({"node_modules/es-define-property/index.js"(J,G){"use strict";var p=Object.defineProperty||!1;if(p)try{p({},"a",{value:1})}catch{p=!1}G.exports=p}}),sB=ze({"node_modules/has-symbols/index.js"(J,G){"use strict";var p=typeof Symbol<"u"&&Symbol,b=Pb();G.exports=function(){return typeof p!="function"||typeof Symbol!="function"||typeof p("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:b()}}}),RT=ze({"node_modules/get-proto/Reflect.getPrototypeOf.js"(J,G){"use strict";G.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),IT=ze({"node_modules/get-proto/Object.getPrototypeOf.js"(J,G){"use strict";var p=Rb();G.exports=p.getPrototypeOf||null}}),lB=ze({"node_modules/function-bind/implementation.js"(J,G){"use strict";var p="Function.prototype.bind called on incompatible ",b=Object.prototype.toString,E=Math.max,k="[object Function]",l=function(r,a){for(var o=[],s=0;s"u"||!w?p:w(Uint8Array),O={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?p:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?p:ArrayBuffer,"%ArrayIteratorPrototype%":_&&w?w([][Symbol.iterator]()):p,"%AsyncFromSyncIteratorPrototype%":p,"%AsyncFunction%":z,"%AsyncGenerator%":z,"%AsyncGeneratorFunction%":z,"%AsyncIteratorPrototype%":z,"%Atomics%":typeof Atomics>"u"?p:Atomics,"%BigInt%":typeof BigInt>"u"?p:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?p:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?p:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?p:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":E,"%eval%":eval,"%EvalError%":k,"%Float16Array%":typeof Float16Array>"u"?p:Float16Array,"%Float32Array%":typeof Float32Array>"u"?p:Float32Array,"%Float64Array%":typeof Float64Array>"u"?p:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?p:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":z,"%Int8Array%":typeof Int8Array>"u"?p:Int8Array,"%Int16Array%":typeof Int16Array>"u"?p:Int16Array,"%Int32Array%":typeof Int32Array>"u"?p:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&w?w(w([][Symbol.iterator]())):p,"%JSON%":typeof JSON=="object"?JSON:p,"%Map%":typeof Map>"u"?p:Map,"%MapIteratorPrototype%":typeof Map>"u"||!_||!w?p:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":b,"%Object.getOwnPropertyDescriptor%":T,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?p:Promise,"%Proxy%":typeof Proxy>"u"?p:Proxy,"%RangeError%":l,"%ReferenceError%":e,"%Reflect%":typeof Reflect>"u"?p:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?p:Set,"%SetIteratorPrototype%":typeof Set>"u"||!_||!w?p:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?p:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&w?w(""[Symbol.iterator]()):p,"%Symbol%":_?Symbol:p,"%SyntaxError%":t,"%ThrowTypeError%":C,"%TypedArray%":I,"%TypeError%":n,"%Uint8Array%":typeof Uint8Array>"u"?p:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?p:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?p:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?p:Uint32Array,"%URIError%":r,"%WeakMap%":typeof WeakMap>"u"?p:WeakMap,"%WeakRef%":typeof WeakRef>"u"?p:WeakRef,"%WeakSet%":typeof WeakSet>"u"?p:WeakSet,"%Function.prototype.call%":x,"%Function.prototype.apply%":A,"%Object.defineProperty%":S,"%Object.getPrototypeOf%":h,"%Math.abs%":a,"%Math.floor%":o,"%Math.max%":s,"%Math.min%":c,"%Math.pow%":g,"%Math.round%":f,"%Math.sign%":v,"%Reflect.getPrototypeOf%":u};if(w)try{null.error}catch(H){D=w(w(H)),O["%Error.prototype%"]=D}var D,B=function H(X){var q;if(X==="%AsyncFunction%")q=i("async function () {}");else if(X==="%GeneratorFunction%")q=i("function* () {}");else if(X==="%AsyncGeneratorFunction%")q=i("async function* () {}");else if(X==="%AsyncGenerator%"){var W=H("%AsyncGeneratorFunction%");W&&(q=W.prototype)}else if(X==="%AsyncIteratorPrototype%"){var ee=H("%AsyncGenerator%");ee&&w&&(q=w(ee.prototype))}return O[X]=q,q},F={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=s1(),j=FT(),U=P.call(x,Array.prototype.concat),$=P.call(A,Array.prototype.splice),Q=P.call(x,String.prototype.replace),re=P.call(x,String.prototype.slice),ne=P.call(x,RegExp.prototype.exec),se=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V=/\\(\\)?/g,Z=function(X){var q=re(X,0,1),W=re(X,-1);if(q==="%"&&W!=="%")throw new t("invalid intrinsic syntax, expected closing `%`");if(W==="%"&&q!=="%")throw new t("invalid intrinsic syntax, expected opening `%`");var ee=[];return Q(X,se,function(ae,he,xe,we){ee[ee.length]=xe?Q(we,V,"$1"):he||ae}),ee},K=function(X,q){var W=X,ee;if(j(F,W)&&(ee=F[W],W="%"+ee[0]+"%"),j(O,W)){var ae=O[W];if(ae===z&&(ae=B(W)),typeof ae>"u"&&!q)throw new n("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:ee,name:W,value:ae}}throw new t("intrinsic "+X+" does not exist!")};G.exports=function(X,q){if(typeof X!="string"||X.length===0)throw new n("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof q!="boolean")throw new n('"allowMissing" argument must be a boolean');if(ne(/^%?[^%]*%?$/,X)===null)throw new t("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var W=Z(X),ee=W.length>0?W[0]:"",ae=K("%"+ee+"%",q),he=ae.name,xe=ae.value,we=!1,Me=ae.alias;Me&&(ee=Me[0],$(W,U([0,1],Me)));for(var Se=1,Ie=!0;Se=W.length){var _e=T(xe,Ge);Ie=!!_e,Ie&&"get"in _e&&!("originalValue"in _e.get)?xe=_e.get:xe=xe[Ge]}else Ie=j(xe,Ge),xe=xe[Ge];Ie&&!we&&(O[he]=xe)}}return xe}}}),Jv=ze({"node_modules/call-bound/index.js"(J,G){"use strict";var p=Bb(),b=Fb(),E=b([p("%String.prototype.indexOf%")]);G.exports=function(l,e){var t=p(l,!!e);return typeof t=="function"&&E(l,".prototype.")>-1?b([t]):t}}}),fB=ze({"node_modules/is-arguments/index.js"(J,G){"use strict";var p=kg()(),b=Jv(),E=b("Object.prototype.toString"),k=function(n){return p&&n&&typeof n=="object"&&Symbol.toStringTag in n?!1:E(n)==="[object Arguments]"},l=function(n){return k(n)?!0:n!==null&&typeof n=="object"&&"length"in n&&typeof n.length=="number"&&n.length>=0&&E(n)!=="[object Array]"&&"callee"in n&&E(n.callee)==="[object Function]"},e=function(){return k(arguments)}();k.isLegacyArguments=l,G.exports=e?k:l}}),hB=ze({"node_modules/is-regex/index.js"(J,G){"use strict";var p=Jv(),b=kg()(),E=FT(),k=Kv(),l;b?(e=p("RegExp.prototype.exec"),t={},n=function(){throw t},r={toString:n,valueOf:n},typeof Symbol.toPrimitive=="symbol"&&(r[Symbol.toPrimitive]=n),l=function(c){if(!c||typeof c!="object")return!1;var g=k(c,"lastIndex"),f=g&&E(g,"value");if(!f)return!1;try{e(c,r)}catch(v){return v===t}}):(a=p("Object.prototype.toString"),o="[object RegExp]",l=function(c){return!c||typeof c!="object"&&typeof c!="function"?!1:a(c)===o});var e,t,n,r,a,o;G.exports=l}}),dB=ze({"node_modules/safe-regex-test/index.js"(J,G){"use strict";var p=Jv(),b=hB(),E=p("RegExp.prototype.exec"),k=o1();G.exports=function(e){if(!b(e))throw new k("`regex` must be a RegExp");return function(n){return E(e,n)!==null}}}}),pB=ze({"node_modules/generator-function/index.js"(J,G){"use strict";var p=function*(){}.constructor;G.exports=()=>p}}),vB=ze({"node_modules/is-generator-function/index.js"(J,G){"use strict";var p=Jv(),b=dB(),E=b(/^\s*(?:function)?\*/),k=kg()(),l=zb(),e=p("Object.prototype.toString"),t=p("Function.prototype.toString"),n=pB();G.exports=function(a){if(typeof a!="function")return!1;if(E(t(a)))return!0;if(!k){var o=e(a);return o==="[object GeneratorFunction]"}if(!l)return!1;var s=n();return s&&l(a)===s.prototype}}}),mB=ze({"node_modules/is-callable/index.js"(J,G){"use strict";var p=Function.prototype.toString,b=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,E,k;if(typeof b=="function"&&typeof Object.defineProperty=="function")try{E=Object.defineProperty({},"length",{get:function(){throw k}}),k={},b(function(){throw 42},null,E)}catch(T){T!==k&&(b=null)}else b=null;var l=/^\s*class\b/,e=function(S){try{var M=p.call(S);return l.test(M)}catch{return!1}},t=function(S){try{return e(S)?!1:(p.call(S),!0)}catch{return!1}},n=Object.prototype.toString,r="[object Object]",a="[object Function]",o="[object GeneratorFunction]",s="[object HTMLAllCollection]",c="[object HTML document.all class]",g="[object HTMLCollection]",f=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),m=function(){return!1};typeof document=="object"&&(i=document.all,n.call(i)===n.call(document.all)&&(m=function(S){if((v||!S)&&(typeof S>"u"||typeof S=="object"))try{var M=n.call(S);return(M===s||M===c||M===g||M===r)&&S("")==null}catch{}return!1}));var i;G.exports=b?function(S){if(m(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;try{b(S,null,E)}catch(M){if(M!==k)return!1}return!e(S)&&t(S)}:function(S){if(m(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;if(f)return t(S);if(e(S))return!1;var M=n.call(S);return M!==a&&M!==o&&!/^\[object HTML/.test(M)?!1:t(S)}}}),gB=ze({"node_modules/for-each/index.js"(J,G){"use strict";var p=mB(),b=Object.prototype.toString,E=Object.prototype.hasOwnProperty,k=function(r,a,o){for(var s=0,c=r.length;s=3&&(s=o),t(r)?k(r,a,s):typeof r=="string"?l(r,a,s):e(r,a,s)}}}),yB=ze({"node_modules/possible-typed-array-names/index.js"(J,G){"use strict";G.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}}),_B=ze({"node_modules/available-typed-arrays/index.js"(J,G){"use strict";var p=yB(),b=typeof globalThis>"u"?window:globalThis;G.exports=function(){for(var k=[],l=0;l3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new E("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new E("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new E("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new E("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,c=!!k&&k(e,t);if(p)p(e,t,{configurable:o===null&&c?c.configurable:!o,enumerable:r===null&&c?c.enumerable:!r,value:n,writable:a===null&&c?c.writable:!a});else if(s||!r&&!a&&!o)e[t]=n;else throw new b("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),BT=ze({"node_modules/has-property-descriptors/index.js"(J,G){"use strict";var p=Cg(),b=function(){return!!p};b.hasArrayLengthDefineBug=function(){if(!p)return null;try{return p([],"length",{value:1}).length!==1}catch{return!0}},G.exports=b}}),xB=ze({"node_modules/set-function-length/index.js"(J,G){"use strict";var p=Bb(),b=zT(),E=BT()(),k=Kv(),l=o1(),e=p("%Math.floor%");G.exports=function(n,r){if(typeof n!="function")throw new l("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||e(r)!==r)throw new l("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in n&&k){var c=k(n,"length");c&&!c.configurable&&(o=!1),c&&!c.writable&&(s=!1)}return(o||s||!a)&&(E?b(n,"length",r,!0,!0):b(n,"length",r)),n}}}),bB=ze({"node_modules/call-bind-apply-helpers/applyBind.js"(J,G){"use strict";var p=s1(),b=Db(),E=DT();G.exports=function(){return E(p,b,arguments)}}}),Lg=ze({"node_modules/call-bind/index.js"(J,G){"use strict";var p=xB(),b=Cg(),E=Fb(),k=bB();G.exports=function(e){var t=E(arguments),n=1+e.length-(arguments.length-1);return p(t,n>0?n:0,!0)},b?b(G.exports,"apply",{value:k}):G.exports.apply=k}}),OT=ze({"node_modules/which-typed-array/index.js"(J,G){"use strict";var p=gB(),b=_B(),E=Lg(),k=Jv(),l=Kv(),e=zb(),t=k("Object.prototype.toString"),n=kg()(),r=typeof globalThis>"u"?window:globalThis,a=b(),o=k("String.prototype.slice"),s=k("Array.prototype.indexOf",!0)||function(i,T){for(var S=0;S-1}G.exports=function(i){if(!i||typeof i!="object")return!1;if(!n){var T=o(t(i),8,-1);return v(T)?T:T!=="Object"?!1:f(i)}return l?g(i):null}}}),wB=ze({"node_modules/is-typed-array/index.js"(J,G){"use strict";var p=OT();G.exports=function(E){return!!p(E)}}}),NT=ze({"node_modules/util/support/types.js"(J){"use strict";var G=fB(),p=vB(),b=OT(),E=wB();function k(we){return we.call.bind(we)}var l=typeof BigInt<"u",e=typeof Symbol<"u",t=k(Object.prototype.toString),n=k(Number.prototype.valueOf),r=k(String.prototype.valueOf),a=k(Boolean.prototype.valueOf);l&&(o=k(BigInt.prototype.valueOf));var o;e&&(s=k(Symbol.prototype.valueOf));var s;function c(we,Me){if(typeof we!="object")return!1;try{return Me(we),!0}catch{return!1}}J.isArgumentsObject=G,J.isGeneratorFunction=p,J.isTypedArray=E;function g(we){return typeof Promise<"u"&&we instanceof Promise||we!==null&&typeof we=="object"&&typeof we.then=="function"&&typeof we.catch=="function"}J.isPromise=g;function f(we){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(we):E(we)||$(we)}J.isArrayBufferView=f;function v(we){return b(we)==="Uint8Array"}J.isUint8Array=v;function m(we){return b(we)==="Uint8ClampedArray"}J.isUint8ClampedArray=m;function i(we){return b(we)==="Uint16Array"}J.isUint16Array=i;function T(we){return b(we)==="Uint32Array"}J.isUint32Array=T;function S(we){return b(we)==="Int8Array"}J.isInt8Array=S;function M(we){return b(we)==="Int16Array"}J.isInt16Array=M;function C(we){return b(we)==="Int32Array"}J.isInt32Array=C;function _(we){return b(we)==="Float32Array"}J.isFloat32Array=_;function w(we){return b(we)==="Float64Array"}J.isFloat64Array=w;function h(we){return b(we)==="BigInt64Array"}J.isBigInt64Array=h;function u(we){return b(we)==="BigUint64Array"}J.isBigUint64Array=u;function A(we){return t(we)==="[object Map]"}A.working=typeof Map<"u"&&A(new Map);function x(we){return typeof Map>"u"?!1:A.working?A(we):we instanceof Map}J.isMap=x;function z(we){return t(we)==="[object Set]"}z.working=typeof Set<"u"&&z(new Set);function I(we){return typeof Set>"u"?!1:z.working?z(we):we instanceof Set}J.isSet=I;function O(we){return t(we)==="[object WeakMap]"}O.working=typeof WeakMap<"u"&&O(new WeakMap);function D(we){return typeof WeakMap>"u"?!1:O.working?O(we):we instanceof WeakMap}J.isWeakMap=D;function B(we){return t(we)==="[object WeakSet]"}B.working=typeof WeakSet<"u"&&B(new WeakSet);function F(we){return B(we)}J.isWeakSet=F;function P(we){return t(we)==="[object ArrayBuffer]"}P.working=typeof ArrayBuffer<"u"&&P(new ArrayBuffer);function j(we){return typeof ArrayBuffer>"u"?!1:P.working?P(we):we instanceof ArrayBuffer}J.isArrayBuffer=j;function U(we){return t(we)==="[object DataView]"}U.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&U(new DataView(new ArrayBuffer(1),0,1));function $(we){return typeof DataView>"u"?!1:U.working?U(we):we instanceof DataView}J.isDataView=$;var Q=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function re(we){return t(we)==="[object SharedArrayBuffer]"}function ne(we){return typeof Q>"u"?!1:(typeof re.working>"u"&&(re.working=re(new Q)),re.working?re(we):we instanceof Q)}J.isSharedArrayBuffer=ne;function se(we){return t(we)==="[object AsyncFunction]"}J.isAsyncFunction=se;function V(we){return t(we)==="[object Map Iterator]"}J.isMapIterator=V;function Z(we){return t(we)==="[object Set Iterator]"}J.isSetIterator=Z;function K(we){return t(we)==="[object Generator]"}J.isGeneratorObject=K;function H(we){return t(we)==="[object WebAssembly.Module]"}J.isWebAssemblyCompiledModule=H;function X(we){return c(we,n)}J.isNumberObject=X;function q(we){return c(we,r)}J.isStringObject=q;function W(we){return c(we,a)}J.isBooleanObject=W;function ee(we){return l&&c(we,o)}J.isBigIntObject=ee;function ae(we){return e&&c(we,s)}J.isSymbolObject=ae;function he(we){return X(we)||q(we)||W(we)||ee(we)||ae(we)}J.isBoxedPrimitive=he;function xe(we){return typeof Uint8Array<"u"&&(j(we)||ne(we))}J.isAnyArrayBuffer=xe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(we){Object.defineProperty(J,we,{enumerable:!1,value:function(){throw new Error(we+" is not supported in userland")}})})}}),jT=ze({"node_modules/util/support/isBufferBrowser.js"(J,G){G.exports=function(b){return b&&typeof b=="object"&&typeof b.copy=="function"&&typeof b.fill=="function"&&typeof b.readUInt8=="function"}}}),UT=ze({"(disabled):node_modules/util/util.js"(J){var G=Object.getOwnPropertyDescriptors||function($){for(var Q=Object.keys($),re={},ne=0;ne=ne)return Z;switch(Z){case"%s":return String(re[Q++]);case"%d":return Number(re[Q++]);case"%j":try{return JSON.stringify(re[Q++])}catch{return"[Circular]"}default:return Z}}),V=re[Q];Q"u")return function(){return J.deprecate(U,$).apply(this,arguments)};var Q=!1;function re(){if(!Q){if(process.throwDeprecation)throw new Error($);process.traceDeprecation?console.trace($):console.error($),Q=!0}return U.apply(this,arguments)}return re};var b={},E=/^$/;k="false",k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i");var k;J.debuglog=function(U){if(U=U.toUpperCase(),!b[U])if(E.test(U)){var $=process.pid;b[U]=function(){var Q=J.format.apply(J,arguments);console.error("%s %d: %s",U,$,Q)}}else b[U]=function(){};return b[U]};function l(U,$){var Q={seen:[],stylize:t};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),v($)?Q.showHidden=$:$&&J._extend(Q,$),C(Q.showHidden)&&(Q.showHidden=!1),C(Q.depth)&&(Q.depth=2),C(Q.colors)&&(Q.colors=!1),C(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=e),r(Q,U,Q.depth)}J.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(U,$){var Q=l.styles[$];return Q?"\x1B["+l.colors[Q][0]+"m"+U+"\x1B["+l.colors[Q][1]+"m":U}function t(U,$){return U}function n(U){var $={};return U.forEach(function(Q,re){$[Q]=!0}),$}function r(U,$,Q){if(U.customInspect&&$&&A($.inspect)&&$.inspect!==J.inspect&&!($.constructor&&$.constructor.prototype===$)){var re=$.inspect(Q,U);return S(re)||(re=r(U,re,Q)),re}var ne=a(U,$);if(ne)return ne;var se=Object.keys($),V=n(se);if(U.showHidden&&(se=Object.getOwnPropertyNames($)),u($)&&(se.indexOf("message")>=0||se.indexOf("description")>=0))return o($);if(se.length===0){if(A($)){var Z=$.name?": "+$.name:"";return U.stylize("[Function"+Z+"]","special")}if(_($))return U.stylize(RegExp.prototype.toString.call($),"regexp");if(h($))return U.stylize(Date.prototype.toString.call($),"date");if(u($))return o($)}var K="",H=!1,X=["{","}"];if(f($)&&(H=!0,X=["[","]"]),A($)){var q=$.name?": "+$.name:"";K=" [Function"+q+"]"}if(_($)&&(K=" "+RegExp.prototype.toString.call($)),h($)&&(K=" "+Date.prototype.toUTCString.call($)),u($)&&(K=" "+o($)),se.length===0&&(!H||$.length==0))return X[0]+K+X[1];if(Q<0)return _($)?U.stylize(RegExp.prototype.toString.call($),"regexp"):U.stylize("[Object]","special");U.seen.push($);var W;return H?W=s(U,$,Q,V,se):W=se.map(function(ee){return c(U,$,Q,V,ee,H)}),U.seen.pop(),g(W,K,X)}function a(U,$){if(C($))return U.stylize("undefined","undefined");if(S($)){var Q="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(T($))return U.stylize(""+$,"number");if(v($))return U.stylize(""+$,"boolean");if(m($))return U.stylize("null","null")}function o(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,$,Q,re,ne){for(var se=[],V=0,Z=$.length;V-1&&(se?Z=Z.split(` `).map(function(H){return" "+H}).join(` -`).slice(2):X=` -`+X.split(` +`).slice(2):Z=` +`+Z.split(` `).map(function(H){return" "+H}).join(` -`))):X=U.stylize("[Circular]","special")),C(G)){if(se&&ne.match(/^\d+$/))return X;G=JSON.stringify(""+ne),G.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(G=G.slice(1,-1),G=U.stylize(G,"name")):(G=G.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),G=U.stylize(G,"string"))}return G+": "+X}function m(U,$,Q){var re=0,ne=U.reduce(function(se,G){return re++,G.indexOf(` -`)>=0&&re++,se+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ne>60?Q[0]+($===""?"":$+` +`))):Z=U.stylize("[Circular]","special")),C(V)){if(se&&ne.match(/^\d+$/))return Z;V=JSON.stringify(""+ne),V.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.slice(1,-1),V=U.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=U.stylize(V,"string"))}return V+": "+Z}function g(U,$,Q){var re=0,ne=U.reduce(function(se,V){return re++,V.indexOf(` +`)>=0&&re++,se+V.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ne>60?Q[0]+($===""?"":$+` `)+" "+U.join(`, - `)+" "+Q[1]:Q[0]+$+" "+U.join(", ")+" "+Q[1]}J.types=NT();function h(U){return Array.isArray(U)}J.isArray=h;function v(U){return typeof U=="boolean"}J.isBoolean=v;function g(U){return U===null}J.isNull=g;function i(U){return U==null}J.isNullOrUndefined=i;function w(U){return typeof U=="number"}J.isNumber=w;function S(U){return typeof U=="string"}J.isString=S;function M(U){return typeof U=="symbol"}J.isSymbol=M;function C(U){return U===void 0}J.isUndefined=C;function _(U){return T(U)&&z(U)==="[object RegExp]"}J.isRegExp=_,J.types.isRegExp=_;function T(U){return typeof U=="object"&&U!==null}J.isObject=T;function f(U){return T(U)&&z(U)==="[object Date]"}J.isDate=f,J.types.isDate=f;function u(U){return T(U)&&(z(U)==="[object Error]"||U instanceof Error)}J.isError=u,J.types.isNativeError=u;function A(U){return typeof U=="function"}J.isFunction=A;function x(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}J.isPrimitive=x,J.isBuffer=jT();function z(U){return Object.prototype.toString.call(U)}function I(U){return U<10?"0"+U.toString(10):U.toString(10)}var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function D(){var U=new Date,$=[I(U.getHours()),I(U.getMinutes()),I(U.getSeconds())].join(":");return[U.getDate(),O[U.getMonth()],$].join(" ")}J.log=function(){console.log("%s - %s",D(),J.format.apply(J,arguments))},J.inherits=op(),J._extend=function(U,$){if(!$||!T($))return U;for(var Q=Object.keys($),re=Q.length;re--;)U[Q[re]]=$[Q[re]];return U};function B(U,$){return Object.prototype.hasOwnProperty.call(U,$)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function($){if(typeof $!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&$[F]){var Q=$[F];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,F,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var re,ne,se=new Promise(function(K,H){re=K,ne=H}),G=[],X=0;X0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(g){var i={data:g,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(this.length===0)return"";for(var i=this.head,w=""+i.data;i=i.next;)w+=g+i.data;return w}},{key:"concat",value:function(g){if(this.length===0)return a.alloc(0);for(var i=a.allocUnsafe(g>>>0),w=this.head,S=0;w;)m(w.data,i,S),S+=w.data.length,w=w.next;return i}},{key:"consume",value:function(g,i){var w;return gM.length?M.length:g;if(C===M.length?S+=M:S+=M.slice(0,g),g-=C,g===0){C===M.length?(++w,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=M.slice(C));break}++w}return this.length-=w,S}},{key:"_getBuffer",value:function(g){var i=a.allocUnsafe(g),w=this.head,S=1;for(w.data.copy(i),g-=w.data.length;w=w.next;){var M=w.data,C=g>M.length?M.length:g;if(M.copy(i,i.length-g,0,C),g-=C,g===0){C===M.length?(++S,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=M.slice(C));break}++S}return this.length-=S,i}},{key:c,value:function(g,i){return s(this,b(b({},i),{},{depth:0,customInspect:!1}))}}]),h}()}}),qT=ze({"node_modules/readable-stream/lib/internal/streams/destroy.js"(J,V){"use strict";function p(t,n){var r=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(n?n(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(l,this,t)):process.nextTick(l,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!n&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(E,r):(r._writableState.errorEmitted=!0,process.nextTick(b,r,s)):process.nextTick(b,r,s):n?(process.nextTick(E,r),n(s)):process.nextTick(E,r)}),this)}function b(t,n){l(t,n),E(t)}function E(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function k(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(t,n){t.emit("error",n)}function e(t,n){var r=t._readableState,a=t._writableState;r&&r.autoDestroy||a&&a.autoDestroy?t.destroy(n):t.emit("error",n)}V.exports={destroy:p,undestroy:k,errorOrDestroy:e}}}),Qv=ze({"node_modules/readable-stream/errors-browser.js"(J,V){"use strict";function p(n,r){n.prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r}var b={};function E(n,r,a){a||(a=Error);function o(c,m,h){return typeof r=="string"?r:r(c,m,h)}var s=function(c){p(m,c);function m(h,v,g){return c.call(this,o(h,v,g))||this}return m}(a);s.prototype.name=a.name,s.prototype.code=n,b[n]=s}function k(n,r){if(Array.isArray(n)){var a=n.length;return n=n.map(function(o){return String(o)}),a>2?"one of ".concat(r," ").concat(n.slice(0,a-1).join(", "),", or ")+n[a-1]:a===2?"one of ".concat(r," ").concat(n[0]," or ").concat(n[1]):"of ".concat(r," ").concat(n[0])}else return"of ".concat(r," ").concat(String(n))}function l(n,r,a){return n.substr(!a||a<0?0:+a,r.length)===r}function e(n,r,a){return(a===void 0||a>n.length)&&(a=n.length),n.substring(a-r.length,a)===r}function t(n,r,a){return typeof a!="number"&&(a=0),a+r.length>n.length?!1:n.indexOf(r,a)!==-1}E("ERR_INVALID_OPT_VALUE",function(n,r){return'The value "'+r+'" is invalid for option "'+n+'"'},TypeError),E("ERR_INVALID_ARG_TYPE",function(n,r,a){var o;typeof r=="string"&&l(r,"not ")?(o="must not be",r=r.replace(/^not /,"")):o="must be";var s;if(e(n," argument"))s="The ".concat(n," ").concat(o," ").concat(k(r,"type"));else{var c=t(n,".")?"property":"argument";s='The "'.concat(n,'" ').concat(c," ").concat(o," ").concat(k(r,"type"))}return s+=". Received type ".concat(typeof a),s},TypeError),E("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),E("ERR_METHOD_NOT_IMPLEMENTED",function(n){return"The "+n+" method is not implemented"}),E("ERR_STREAM_PREMATURE_CLOSE","Premature close"),E("ERR_STREAM_DESTROYED",function(n){return"Cannot call "+n+" after a stream was destroyed"}),E("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),E("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),E("ERR_STREAM_WRITE_AFTER_END","write after end"),E("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),E("ERR_UNKNOWN_ENCODING",function(n){return"Unknown encoding: "+n},TypeError),E("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),V.exports.codes=b}}),VT=ze({"node_modules/readable-stream/lib/internal/streams/state.js"(J,V){"use strict";var p=Qv().codes.ERR_INVALID_OPT_VALUE;function b(k,l,e){return k.highWaterMark!=null?k.highWaterMark:l?k[e]:null}function E(k,l,e,t){var n=b(l,t,e);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var r=t?e:"highWaterMark";throw new p(r,n)}return Math.floor(n)}return k.objectMode?16:16*1024}V.exports={getHighWaterMark:E}}}),AB=ze({"node_modules/util-deprecate/browser.js"(J,V){V.exports=p;function p(E,k){if(b("noDeprecation"))return E;var l=!1;function e(){if(!l){if(b("throwDeprecation"))throw new Error(k);b("traceDeprecation")?console.trace(k):console.warn(k),l=!0}return E.apply(this,arguments)}return e}function b(E){try{if(!window.localStorage)return!1}catch{return!1}var k=window.localStorage[E];return k==null?!1:String(k).toLowerCase()==="true"}}}),GT=ze({"node_modules/readable-stream/lib/_stream_writable.js"(J,V){"use strict";V.exports=f;function p(G){var X=this;this.next=null,this.entry=null,this.finish=function(){se(X,G)}}var b;f.WritableState=_;var E={deprecate:AB()},k=LT(),l=$v().Buffer,e=(typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function t(G){return l.from(G)}function n(G){return l.isBuffer(G)||G instanceof e}var r=qT(),a=VT(),o=a.getHighWaterMark,s=Qv().codes,c=s.ERR_INVALID_ARG_TYPE,m=s.ERR_METHOD_NOT_IMPLEMENTED,h=s.ERR_MULTIPLE_CALLBACK,v=s.ERR_STREAM_CANNOT_PIPE,g=s.ERR_STREAM_DESTROYED,i=s.ERR_STREAM_NULL_VALUES,w=s.ERR_STREAM_WRITE_AFTER_END,S=s.ERR_UNKNOWN_ENCODING,M=r.errorOrDestroy;op()(f,k);function C(){}function _(G,X,K){b=b||e0(),G=G||{},typeof K!="boolean"&&(K=X instanceof b),this.objectMode=!!G.objectMode,K&&(this.objectMode=this.objectMode||!!G.writableObjectMode),this.highWaterMark=o(this,G,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var H=G.decodeStrings===!1;this.decodeStrings=!H,this.defaultEncoding=G.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){B(X,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=G.emitClose!==!1,this.autoDestroy=!!G.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new p(this)}_.prototype.getBuffer=function(){for(var X=this.bufferedRequest,K=[];X;)K.push(X),X=X.next;return K},function(){try{Object.defineProperty(_.prototype,"buffer",{get:E.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var T;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(f,Symbol.hasInstance,{value:function(X){return T.call(this,X)?!0:this!==f?!1:X&&X._writableState instanceof _}})):T=function(X){return X instanceof this};function f(G){b=b||e0();var X=this instanceof b;if(!X&&!T.call(f,this))return new f(G);this._writableState=new _(G,this,X),this.writable=!0,G&&(typeof G.write=="function"&&(this._write=G.write),typeof G.writev=="function"&&(this._writev=G.writev),typeof G.destroy=="function"&&(this._destroy=G.destroy),typeof G.final=="function"&&(this._final=G.final)),k.call(this)}f.prototype.pipe=function(){M(this,new v)};function u(G,X){var K=new w;M(G,K),process.nextTick(X,K)}function A(G,X,K,H){var Y;return K===null?Y=new i:typeof K!="string"&&!X.objectMode&&(Y=new c("chunk",["string","Buffer"],K)),Y?(M(G,Y),process.nextTick(H,Y),!1):!0}f.prototype.write=function(G,X,K){var H=this._writableState,Y=!1,q=!H.objectMode&&n(G);return q&&!l.isBuffer(G)&&(G=t(G)),typeof X=="function"&&(K=X,X=null),q?X="buffer":X||(X=H.defaultEncoding),typeof K!="function"&&(K=C),H.ending?u(this,K):(q||A(this,H,G,K))&&(H.pendingcb++,Y=z(this,H,q,G,X,K)),Y},f.prototype.cork=function(){this._writableState.corked++},f.prototype.uncork=function(){var G=this._writableState;G.corked&&(G.corked--,!G.writing&&!G.corked&&!G.bufferProcessing&&G.bufferedRequest&&j(this,G))},f.prototype.setDefaultEncoding=function(X){if(typeof X=="string"&&(X=X.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((X+"").toLowerCase())>-1))throw new S(X);return this._writableState.defaultEncoding=X,this},Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function x(G,X,K){return!G.objectMode&&G.decodeStrings!==!1&&typeof X=="string"&&(X=l.from(X,K)),X}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(G,X,K,H,Y,q){if(!K){var Z=x(X,H,Y);H!==Z&&(K=!0,Y="buffer",H=Z)}var ee=X.objectMode?1:H.length;X.length+=ee;var ae=X.length>5===6?2:g>>4===14?3:g>>3===30?4:g>>6===2?-1:-2}function e(g,i,w){var S=i.length-1;if(S=0?(M>0&&(g.lastNeed=M-1),M):--S=0?(M>0&&(g.lastNeed=M-2),M):--S=0?(M>0&&(M===2?M=0:g.lastNeed=M-3),M):0))}function t(g,i,w){if((i[0]&192)!==128)return g.lastNeed=0,"\uFFFD";if(g.lastNeed>1&&i.length>1){if((i[1]&192)!==128)return g.lastNeed=1,"\uFFFD";if(g.lastNeed>2&&i.length>2&&(i[2]&192)!==128)return g.lastNeed=2,"\uFFFD"}}function n(g){var i=this.lastTotal-this.lastNeed,w=t(this,g,i);if(w!==void 0)return w;if(this.lastNeed<=g.length)return g.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,i,0,g.length),this.lastNeed-=g.length}function r(g,i){var w=e(this,g,i);if(!this.lastNeed)return g.toString("utf8",i);this.lastTotal=w;var S=g.length-(w-this.lastNeed);return g.copy(this.lastChar,0,S),g.toString("utf8",i,S)}function a(g){var i=g&&g.length?this.write(g):"";return this.lastNeed?i+"\uFFFD":i}function o(g,i){if((g.length-i)%2===0){var w=g.toString("utf16le",i);if(w){var S=w.charCodeAt(w.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",i,g.length-1)}function s(g){var i=g&&g.length?this.write(g):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return i+this.lastChar.toString("utf16le",0,w)}return i}function c(g,i){var w=(g.length-i)%3;return w===0?g.toString("base64",i):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",i,g.length-w))}function m(g){var i=g&&g.length?this.write(g):"";return this.lastNeed?i+this.lastChar.toString("base64",0,3-this.lastNeed):i}function h(g){return g.toString(this.encoding)}function v(g){return g&&g.length?this.write(g):""}}}),Ob=ze({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(J,V){"use strict";var p=Qv().codes.ERR_STREAM_PREMATURE_CLOSE;function b(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),a=0;a0)if(typeof ee!="string"&&!we.objectMode&&Object.getPrototypeOf(ee)!==l.prototype&&(ee=t(ee)),he)we.endEmitted?_(Z,new w):z(Z,we,ee,!0);else if(we.ended)_(Z,new g);else{if(we.destroyed)return!1;we.reading=!1,we.decoder&&!ae?(ee=we.decoder.write(ee),we.objectMode||ee.length!==0?z(Z,we,ee,!1):U(Z,we)):z(Z,we,ee,!1)}else he||(we.reading=!1,U(Z,we))}return!we.ended&&(we.length=O?Z=O:(Z--,Z|=Z>>>1,Z|=Z>>>2,Z|=Z>>>4,Z|=Z>>>8,Z|=Z>>>16,Z++),Z}function B(Z,ee){return Z<=0||ee.length===0&&ee.ended?0:ee.objectMode?1:Z!==Z?ee.flowing&&ee.length?ee.buffer.head.data.length:ee.length:(Z>ee.highWaterMark&&(ee.highWaterMark=D(Z)),Z<=ee.length?Z:ee.ended?ee.length:(ee.needReadable=!0,0))}A.prototype.read=function(Z){a("read",Z),Z=parseInt(Z,10);var ee=this._readableState,ae=Z;if(Z!==0&&(ee.emittedReadable=!1),Z===0&&ee.needReadable&&((ee.highWaterMark!==0?ee.length>=ee.highWaterMark:ee.length>0)||ee.ended))return a("read: emitReadable",ee.length,ee.ended),ee.length===0&&ee.ended?H(this):P(this),null;if(Z=B(Z,ee),Z===0&&ee.ended)return ee.length===0&&H(this),null;var he=ee.needReadable;a("need readable",he),(ee.length===0||ee.length-Z0?xe=K(Z,ee):xe=null,xe===null?(ee.needReadable=ee.length<=ee.highWaterMark,Z=0):(ee.length-=Z,ee.awaitDrain=0),ee.length===0&&(ee.ended||(ee.needReadable=!0),ae!==Z&&ee.ended&&H(this)),xe!==null&&this.emit("data",xe),xe};function F(Z,ee){if(a("onEofChunk"),!ee.ended){if(ee.decoder){var ae=ee.decoder.end();ae&&ae.length&&(ee.buffer.push(ae),ee.length+=ee.objectMode?1:ae.length)}ee.ended=!0,ee.sync?P(Z):(ee.needReadable=!1,ee.emittedReadable||(ee.emittedReadable=!0,j(Z)))}}function P(Z){var ee=Z._readableState;a("emitReadable",ee.needReadable,ee.emittedReadable),ee.needReadable=!1,ee.emittedReadable||(a("emitReadable",ee.flowing),ee.emittedReadable=!0,process.nextTick(j,Z))}function j(Z){var ee=Z._readableState;a("emitReadable_",ee.destroyed,ee.length,ee.ended),!ee.destroyed&&(ee.length||ee.ended)&&(Z.emit("readable"),ee.emittedReadable=!1),ee.needReadable=!ee.flowing&&!ee.ended&&ee.length<=ee.highWaterMark,X(Z)}function U(Z,ee){ee.readingMore||(ee.readingMore=!0,process.nextTick($,Z,ee))}function $(Z,ee){for(;!ee.reading&&!ee.ended&&(ee.length1&&q(he.pipes,Z)!==-1)&&!Ve&&(a("false write response, pause",he.awaitDrain),he.awaitDrain++),ae.pause())}function _e(Ae){a("onerror",Ae),le(),Z.removeListener("error",_e),E(Z,"error")===0&&_(Z,Ae)}f(Z,"error",_e);function ce(){Z.removeListener("finish",ve),le()}Z.once("close",ce);function ve(){a("onfinish"),Z.removeListener("close",ce),le()}Z.once("finish",ve);function le(){a("unpipe"),ae.unpipe(Z)}return Z.emit("pipe",ae),he.flowing||(a("pipe resume"),ae.resume()),Z};function Q(Z){return function(){var ae=Z._readableState;a("pipeOnDrain",ae.awaitDrain),ae.awaitDrain&&ae.awaitDrain--,ae.awaitDrain===0&&E(Z,"data")&&(ae.flowing=!0,X(Z))}}A.prototype.unpipe=function(Z){var ee=this._readableState,ae={hasUnpiped:!1};if(ee.pipesCount===0)return this;if(ee.pipesCount===1)return Z&&Z!==ee.pipes?this:(Z||(Z=ee.pipes),ee.pipes=null,ee.pipesCount=0,ee.flowing=!1,Z&&Z.emit("unpipe",this,ae),this);if(!Z){var he=ee.pipes,xe=ee.pipesCount;ee.pipes=null,ee.pipesCount=0,ee.flowing=!1;for(var we=0;we0,he.flowing!==!1&&this.resume()):Z==="readable"&&!he.endEmitted&&!he.readableListening&&(he.readableListening=he.needReadable=!0,he.flowing=!1,he.emittedReadable=!1,a("on readable",he.length,he.reading),he.length?P(this):he.reading||process.nextTick(ne,this)),ae},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(Z,ee){var ae=k.prototype.removeListener.call(this,Z,ee);return Z==="readable"&&process.nextTick(re,this),ae},A.prototype.removeAllListeners=function(Z){var ee=k.prototype.removeAllListeners.apply(this,arguments);return(Z==="readable"||Z===void 0)&&process.nextTick(re,this),ee};function re(Z){var ee=Z._readableState;ee.readableListening=Z.listenerCount("readable")>0,ee.resumeScheduled&&!ee.paused?ee.flowing=!0:Z.listenerCount("data")>0&&Z.resume()}function ne(Z){a("readable nexttick read 0"),Z.read(0)}A.prototype.resume=function(){var Z=this._readableState;return Z.flowing||(a("resume"),Z.flowing=!Z.readableListening,se(this,Z)),Z.paused=!1,this};function se(Z,ee){ee.resumeScheduled||(ee.resumeScheduled=!0,process.nextTick(G,Z,ee))}function G(Z,ee){a("resume",ee.reading),ee.reading||Z.read(0),ee.resumeScheduled=!1,Z.emit("resume"),X(Z),ee.flowing&&!ee.reading&&Z.read(0)}A.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function X(Z){var ee=Z._readableState;for(a("flow",ee.flowing);ee.flowing&&Z.read()!==null;);}A.prototype.wrap=function(Z){var ee=this,ae=this._readableState,he=!1;Z.on("end",function(){if(a("wrapped end"),ae.decoder&&!ae.ended){var Me=ae.decoder.end();Me&&Me.length&&ee.push(Me)}ee.push(null)}),Z.on("data",function(Me){if(a("wrapped data"),ae.decoder&&(Me=ae.decoder.write(Me)),!(ae.objectMode&&Me==null)&&!(!ae.objectMode&&(!Me||!Me.length))){var Se=ee.push(Me);Se||(he=!0,Z.pause())}});for(var xe in Z)this[xe]===void 0&&typeof Z[xe]=="function"&&(this[xe]=function(Se){return function(){return Z[Se].apply(Z,arguments)}}(xe));for(var we=0;we=ee.length?(ee.decoder?ae=ee.buffer.join(""):ee.buffer.length===1?ae=ee.buffer.first():ae=ee.buffer.concat(ee.length),ee.buffer.clear()):ae=ee.buffer.consume(Z,ee.decoder),ae}function H(Z){var ee=Z._readableState;a("endReadable",ee.endEmitted),ee.endEmitted||(ee.ended=!0,process.nextTick(Y,ee,Z))}function Y(Z,ee){if(a("endReadableNT",Z.endEmitted,Z.length),!Z.endEmitted&&Z.length===0&&(Z.endEmitted=!0,ee.readable=!1,ee.emit("end"),Z.autoDestroy)){var ae=ee._writableState;(!ae||ae.autoDestroy&&ae.finished)&&ee.destroy()}}typeof Symbol=="function"&&(A.from=function(Z,ee){return C===void 0&&(C=EB()),C(A,Z,ee)});function q(Z,ee){for(var ae=0,he=Z.length;ae0;return n(w,M,C,function(_){g||(g=_),_&&i.forEach(r),!M&&(i.forEach(r),v(g))})});return m.reduce(a)}V.exports=s}}),LB=ze({"node_modules/stream-browserify/index.js"(J,V){V.exports=E;var p=jv().EventEmitter,b=op();b(E,p),E.Readable=WT(),E.Writable=GT(),E.Duplex=e0(),E.Transform=YT(),E.PassThrough=kB(),E.finished=Ob(),E.pipeline=CB(),E.Stream=E;function E(){p.call(this)}E.prototype.pipe=function(k,l){var e=this;function t(m){k.writable&&k.write(m)===!1&&e.pause&&e.pause()}e.on("data",t);function n(){e.readable&&e.resume&&e.resume()}k.on("drain",n),!k._isStdio&&(!l||l.end!==!1)&&(e.on("end",a),e.on("close",o));var r=!1;function a(){r||(r=!0,k.end())}function o(){r||(r=!0,typeof k.destroy=="function"&&k.destroy())}function s(m){if(c(),p.listenerCount(this,"error")===0)throw m}e.on("error",s),k.on("error",s);function c(){e.removeListener("data",t),k.removeListener("drain",n),e.removeListener("end",a),e.removeListener("close",o),e.removeListener("error",s),k.removeListener("error",s),e.removeListener("end",c),e.removeListener("close",c),k.removeListener("close",c)}return e.on("end",c),e.on("close",c),k.on("close",c),k.emit("pipe",e),k}}}),lg=ze({"node_modules/util/util.js"(J){var V=Object.getOwnPropertyDescriptors||function($){for(var Q=Object.keys($),re={},ne=0;ne=ne)return X;switch(X){case"%s":return String(re[Q++]);case"%d":return Number(re[Q++]);case"%j":try{return JSON.stringify(re[Q++])}catch{return"[Circular]"}default:return X}}),G=re[Q];Q"u")return function(){return J.deprecate(U,$).apply(this,arguments)};var Q=!1;function re(){if(!Q){if(process.throwDeprecation)throw new Error($);process.traceDeprecation?console.trace($):console.error($),Q=!0}return U.apply(this,arguments)}return re};var b={},E=/^$/;k="false",k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i");var k;J.debuglog=function(U){if(U=U.toUpperCase(),!b[U])if(E.test(U)){var $=process.pid;b[U]=function(){var Q=J.format.apply(J,arguments);console.error("%s %d: %s",U,$,Q)}}else b[U]=function(){};return b[U]};function l(U,$){var Q={seen:[],stylize:t};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),v($)?Q.showHidden=$:$&&J._extend(Q,$),C(Q.showHidden)&&(Q.showHidden=!1),C(Q.depth)&&(Q.depth=2),C(Q.colors)&&(Q.colors=!1),C(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=e),r(Q,U,Q.depth)}J.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(U,$){var Q=l.styles[$];return Q?"\x1B["+l.colors[Q][0]+"m"+U+"\x1B["+l.colors[Q][1]+"m":U}function t(U,$){return U}function n(U){var $={};return U.forEach(function(Q,re){$[Q]=!0}),$}function r(U,$,Q){if(U.customInspect&&$&&A($.inspect)&&$.inspect!==J.inspect&&!($.constructor&&$.constructor.prototype===$)){var re=$.inspect(Q,U);return S(re)||(re=r(U,re,Q)),re}var ne=a(U,$);if(ne)return ne;var se=Object.keys($),G=n(se);if(U.showHidden&&(se=Object.getOwnPropertyNames($)),u($)&&(se.indexOf("message")>=0||se.indexOf("description")>=0))return o($);if(se.length===0){if(A($)){var X=$.name?": "+$.name:"";return U.stylize("[Function"+X+"]","special")}if(_($))return U.stylize(RegExp.prototype.toString.call($),"regexp");if(f($))return U.stylize(Date.prototype.toString.call($),"date");if(u($))return o($)}var K="",H=!1,Y=["{","}"];if(h($)&&(H=!0,Y=["[","]"]),A($)){var q=$.name?": "+$.name:"";K=" [Function"+q+"]"}if(_($)&&(K=" "+RegExp.prototype.toString.call($)),f($)&&(K=" "+Date.prototype.toUTCString.call($)),u($)&&(K=" "+o($)),se.length===0&&(!H||$.length==0))return Y[0]+K+Y[1];if(Q<0)return _($)?U.stylize(RegExp.prototype.toString.call($),"regexp"):U.stylize("[Object]","special");U.seen.push($);var Z;return H?Z=s(U,$,Q,G,se):Z=se.map(function(ee){return c(U,$,Q,G,ee,H)}),U.seen.pop(),m(Z,K,Y)}function a(U,$){if(C($))return U.stylize("undefined","undefined");if(S($)){var Q="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(w($))return U.stylize(""+$,"number");if(v($))return U.stylize(""+$,"boolean");if(g($))return U.stylize("null","null")}function o(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,$,Q,re,ne){for(var se=[],G=0,X=$.length;G-1&&(se?X=X.split(` + `)+" "+Q[1]:Q[0]+$+" "+U.join(", ")+" "+Q[1]}J.types=NT();function f(U){return Array.isArray(U)}J.isArray=f;function v(U){return typeof U=="boolean"}J.isBoolean=v;function m(U){return U===null}J.isNull=m;function i(U){return U==null}J.isNullOrUndefined=i;function T(U){return typeof U=="number"}J.isNumber=T;function S(U){return typeof U=="string"}J.isString=S;function M(U){return typeof U=="symbol"}J.isSymbol=M;function C(U){return U===void 0}J.isUndefined=C;function _(U){return w(U)&&z(U)==="[object RegExp]"}J.isRegExp=_,J.types.isRegExp=_;function w(U){return typeof U=="object"&&U!==null}J.isObject=w;function h(U){return w(U)&&z(U)==="[object Date]"}J.isDate=h,J.types.isDate=h;function u(U){return w(U)&&(z(U)==="[object Error]"||U instanceof Error)}J.isError=u,J.types.isNativeError=u;function A(U){return typeof U=="function"}J.isFunction=A;function x(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}J.isPrimitive=x,J.isBuffer=jT();function z(U){return Object.prototype.toString.call(U)}function I(U){return U<10?"0"+U.toString(10):U.toString(10)}var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function D(){var U=new Date,$=[I(U.getHours()),I(U.getMinutes()),I(U.getSeconds())].join(":");return[U.getDate(),O[U.getMonth()],$].join(" ")}J.log=function(){console.log("%s - %s",D(),J.format.apply(J,arguments))},J.inherits=op(),J._extend=function(U,$){if(!$||!w($))return U;for(var Q=Object.keys($),re=Q.length;re--;)U[Q[re]]=$[Q[re]];return U};function B(U,$){return Object.prototype.hasOwnProperty.call(U,$)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function($){if(typeof $!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&$[F]){var Q=$[F];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,F,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var re,ne,se=new Promise(function(K,H){re=K,ne=H}),V=[],Z=0;Z0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(m){var i={data:m,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(this.length===0)return"";for(var i=this.head,T=""+i.data;i=i.next;)T+=m+i.data;return T}},{key:"concat",value:function(m){if(this.length===0)return a.alloc(0);for(var i=a.allocUnsafe(m>>>0),T=this.head,S=0;T;)g(T.data,i,S),S+=T.data.length,T=T.next;return i}},{key:"consume",value:function(m,i){var T;return mM.length?M.length:m;if(C===M.length?S+=M:S+=M.slice(0,m),m-=C,m===0){C===M.length?(++T,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=M.slice(C));break}++T}return this.length-=T,S}},{key:"_getBuffer",value:function(m){var i=a.allocUnsafe(m),T=this.head,S=1;for(T.data.copy(i),m-=T.data.length;T=T.next;){var M=T.data,C=m>M.length?M.length:m;if(M.copy(i,i.length-m,0,C),m-=C,m===0){C===M.length?(++S,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=M.slice(C));break}++S}return this.length-=S,i}},{key:c,value:function(m,i){return s(this,b(b({},i),{},{depth:0,customInspect:!1}))}}]),f}()}}),qT=ze({"node_modules/readable-stream/lib/internal/streams/destroy.js"(J,G){"use strict";function p(t,n){var r=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(n?n(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(l,this,t)):process.nextTick(l,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!n&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(E,r):(r._writableState.errorEmitted=!0,process.nextTick(b,r,s)):process.nextTick(b,r,s):n?(process.nextTick(E,r),n(s)):process.nextTick(E,r)}),this)}function b(t,n){l(t,n),E(t)}function E(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function k(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(t,n){t.emit("error",n)}function e(t,n){var r=t._readableState,a=t._writableState;r&&r.autoDestroy||a&&a.autoDestroy?t.destroy(n):t.emit("error",n)}G.exports={destroy:p,undestroy:k,errorOrDestroy:e}}}),Qv=ze({"node_modules/readable-stream/errors-browser.js"(J,G){"use strict";function p(n,r){n.prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r}var b={};function E(n,r,a){a||(a=Error);function o(c,g,f){return typeof r=="string"?r:r(c,g,f)}var s=function(c){p(g,c);function g(f,v,m){return c.call(this,o(f,v,m))||this}return g}(a);s.prototype.name=a.name,s.prototype.code=n,b[n]=s}function k(n,r){if(Array.isArray(n)){var a=n.length;return n=n.map(function(o){return String(o)}),a>2?"one of ".concat(r," ").concat(n.slice(0,a-1).join(", "),", or ")+n[a-1]:a===2?"one of ".concat(r," ").concat(n[0]," or ").concat(n[1]):"of ".concat(r," ").concat(n[0])}else return"of ".concat(r," ").concat(String(n))}function l(n,r,a){return n.substr(!a||a<0?0:+a,r.length)===r}function e(n,r,a){return(a===void 0||a>n.length)&&(a=n.length),n.substring(a-r.length,a)===r}function t(n,r,a){return typeof a!="number"&&(a=0),a+r.length>n.length?!1:n.indexOf(r,a)!==-1}E("ERR_INVALID_OPT_VALUE",function(n,r){return'The value "'+r+'" is invalid for option "'+n+'"'},TypeError),E("ERR_INVALID_ARG_TYPE",function(n,r,a){var o;typeof r=="string"&&l(r,"not ")?(o="must not be",r=r.replace(/^not /,"")):o="must be";var s;if(e(n," argument"))s="The ".concat(n," ").concat(o," ").concat(k(r,"type"));else{var c=t(n,".")?"property":"argument";s='The "'.concat(n,'" ').concat(c," ").concat(o," ").concat(k(r,"type"))}return s+=". Received type ".concat(typeof a),s},TypeError),E("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),E("ERR_METHOD_NOT_IMPLEMENTED",function(n){return"The "+n+" method is not implemented"}),E("ERR_STREAM_PREMATURE_CLOSE","Premature close"),E("ERR_STREAM_DESTROYED",function(n){return"Cannot call "+n+" after a stream was destroyed"}),E("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),E("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),E("ERR_STREAM_WRITE_AFTER_END","write after end"),E("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),E("ERR_UNKNOWN_ENCODING",function(n){return"Unknown encoding: "+n},TypeError),E("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),G.exports.codes=b}}),VT=ze({"node_modules/readable-stream/lib/internal/streams/state.js"(J,G){"use strict";var p=Qv().codes.ERR_INVALID_OPT_VALUE;function b(k,l,e){return k.highWaterMark!=null?k.highWaterMark:l?k[e]:null}function E(k,l,e,t){var n=b(l,t,e);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var r=t?e:"highWaterMark";throw new p(r,n)}return Math.floor(n)}return k.objectMode?16:16*1024}G.exports={getHighWaterMark:E}}}),AB=ze({"node_modules/util-deprecate/browser.js"(J,G){G.exports=p;function p(E,k){if(b("noDeprecation"))return E;var l=!1;function e(){if(!l){if(b("throwDeprecation"))throw new Error(k);b("traceDeprecation")?console.trace(k):console.warn(k),l=!0}return E.apply(this,arguments)}return e}function b(E){try{if(!window.localStorage)return!1}catch{return!1}var k=window.localStorage[E];return k==null?!1:String(k).toLowerCase()==="true"}}}),GT=ze({"node_modules/readable-stream/lib/_stream_writable.js"(J,G){"use strict";G.exports=h;function p(V){var Z=this;this.next=null,this.entry=null,this.finish=function(){se(Z,V)}}var b;h.WritableState=_;var E={deprecate:AB()},k=LT(),l=$v().Buffer,e=(typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function t(V){return l.from(V)}function n(V){return l.isBuffer(V)||V instanceof e}var r=qT(),a=VT(),o=a.getHighWaterMark,s=Qv().codes,c=s.ERR_INVALID_ARG_TYPE,g=s.ERR_METHOD_NOT_IMPLEMENTED,f=s.ERR_MULTIPLE_CALLBACK,v=s.ERR_STREAM_CANNOT_PIPE,m=s.ERR_STREAM_DESTROYED,i=s.ERR_STREAM_NULL_VALUES,T=s.ERR_STREAM_WRITE_AFTER_END,S=s.ERR_UNKNOWN_ENCODING,M=r.errorOrDestroy;op()(h,k);function C(){}function _(V,Z,K){b=b||e0(),V=V||{},typeof K!="boolean"&&(K=Z instanceof b),this.objectMode=!!V.objectMode,K&&(this.objectMode=this.objectMode||!!V.writableObjectMode),this.highWaterMark=o(this,V,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var H=V.decodeStrings===!1;this.decodeStrings=!H,this.defaultEncoding=V.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X){B(Z,X)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=V.emitClose!==!1,this.autoDestroy=!!V.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new p(this)}_.prototype.getBuffer=function(){for(var Z=this.bufferedRequest,K=[];Z;)K.push(Z),Z=Z.next;return K},function(){try{Object.defineProperty(_.prototype,"buffer",{get:E.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var w;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(w=Function.prototype[Symbol.hasInstance],Object.defineProperty(h,Symbol.hasInstance,{value:function(Z){return w.call(this,Z)?!0:this!==h?!1:Z&&Z._writableState instanceof _}})):w=function(Z){return Z instanceof this};function h(V){b=b||e0();var Z=this instanceof b;if(!Z&&!w.call(h,this))return new h(V);this._writableState=new _(V,this,Z),this.writable=!0,V&&(typeof V.write=="function"&&(this._write=V.write),typeof V.writev=="function"&&(this._writev=V.writev),typeof V.destroy=="function"&&(this._destroy=V.destroy),typeof V.final=="function"&&(this._final=V.final)),k.call(this)}h.prototype.pipe=function(){M(this,new v)};function u(V,Z){var K=new T;M(V,K),process.nextTick(Z,K)}function A(V,Z,K,H){var X;return K===null?X=new i:typeof K!="string"&&!Z.objectMode&&(X=new c("chunk",["string","Buffer"],K)),X?(M(V,X),process.nextTick(H,X),!1):!0}h.prototype.write=function(V,Z,K){var H=this._writableState,X=!1,q=!H.objectMode&&n(V);return q&&!l.isBuffer(V)&&(V=t(V)),typeof Z=="function"&&(K=Z,Z=null),q?Z="buffer":Z||(Z=H.defaultEncoding),typeof K!="function"&&(K=C),H.ending?u(this,K):(q||A(this,H,V,K))&&(H.pendingcb++,X=z(this,H,q,V,Z,K)),X},h.prototype.cork=function(){this._writableState.corked++},h.prototype.uncork=function(){var V=this._writableState;V.corked&&(V.corked--,!V.writing&&!V.corked&&!V.bufferProcessing&&V.bufferedRequest&&j(this,V))},h.prototype.setDefaultEncoding=function(Z){if(typeof Z=="string"&&(Z=Z.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Z+"").toLowerCase())>-1))throw new S(Z);return this._writableState.defaultEncoding=Z,this},Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function x(V,Z,K){return!V.objectMode&&V.decodeStrings!==!1&&typeof Z=="string"&&(Z=l.from(Z,K)),Z}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(V,Z,K,H,X,q){if(!K){var W=x(Z,H,X);H!==W&&(K=!0,X="buffer",H=W)}var ee=Z.objectMode?1:H.length;Z.length+=ee;var ae=Z.length>5===6?2:m>>4===14?3:m>>3===30?4:m>>6===2?-1:-2}function e(m,i,T){var S=i.length-1;if(S=0?(M>0&&(m.lastNeed=M-1),M):--S=0?(M>0&&(m.lastNeed=M-2),M):--S=0?(M>0&&(M===2?M=0:m.lastNeed=M-3),M):0))}function t(m,i,T){if((i[0]&192)!==128)return m.lastNeed=0,"\uFFFD";if(m.lastNeed>1&&i.length>1){if((i[1]&192)!==128)return m.lastNeed=1,"\uFFFD";if(m.lastNeed>2&&i.length>2&&(i[2]&192)!==128)return m.lastNeed=2,"\uFFFD"}}function n(m){var i=this.lastTotal-this.lastNeed,T=t(this,m,i);if(T!==void 0)return T;if(this.lastNeed<=m.length)return m.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,i,0,m.length),this.lastNeed-=m.length}function r(m,i){var T=e(this,m,i);if(!this.lastNeed)return m.toString("utf8",i);this.lastTotal=T;var S=m.length-(T-this.lastNeed);return m.copy(this.lastChar,0,S),m.toString("utf8",i,S)}function a(m){var i=m&&m.length?this.write(m):"";return this.lastNeed?i+"\uFFFD":i}function o(m,i){if((m.length-i)%2===0){var T=m.toString("utf16le",i);if(T){var S=T.charCodeAt(T.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1],T.slice(0,-1)}return T}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=m[m.length-1],m.toString("utf16le",i,m.length-1)}function s(m){var i=m&&m.length?this.write(m):"";if(this.lastNeed){var T=this.lastTotal-this.lastNeed;return i+this.lastChar.toString("utf16le",0,T)}return i}function c(m,i){var T=(m.length-i)%3;return T===0?m.toString("base64",i):(this.lastNeed=3-T,this.lastTotal=3,T===1?this.lastChar[0]=m[m.length-1]:(this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1]),m.toString("base64",i,m.length-T))}function g(m){var i=m&&m.length?this.write(m):"";return this.lastNeed?i+this.lastChar.toString("base64",0,3-this.lastNeed):i}function f(m){return m.toString(this.encoding)}function v(m){return m&&m.length?this.write(m):""}}}),Ob=ze({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(J,G){"use strict";var p=Qv().codes.ERR_STREAM_PREMATURE_CLOSE;function b(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),a=0;a0)if(typeof ee!="string"&&!we.objectMode&&Object.getPrototypeOf(ee)!==l.prototype&&(ee=t(ee)),he)we.endEmitted?_(W,new T):z(W,we,ee,!0);else if(we.ended)_(W,new m);else{if(we.destroyed)return!1;we.reading=!1,we.decoder&&!ae?(ee=we.decoder.write(ee),we.objectMode||ee.length!==0?z(W,we,ee,!1):U(W,we)):z(W,we,ee,!1)}else he||(we.reading=!1,U(W,we))}return!we.ended&&(we.length=O?W=O:(W--,W|=W>>>1,W|=W>>>2,W|=W>>>4,W|=W>>>8,W|=W>>>16,W++),W}function B(W,ee){return W<=0||ee.length===0&&ee.ended?0:ee.objectMode?1:W!==W?ee.flowing&&ee.length?ee.buffer.head.data.length:ee.length:(W>ee.highWaterMark&&(ee.highWaterMark=D(W)),W<=ee.length?W:ee.ended?ee.length:(ee.needReadable=!0,0))}A.prototype.read=function(W){a("read",W),W=parseInt(W,10);var ee=this._readableState,ae=W;if(W!==0&&(ee.emittedReadable=!1),W===0&&ee.needReadable&&((ee.highWaterMark!==0?ee.length>=ee.highWaterMark:ee.length>0)||ee.ended))return a("read: emitReadable",ee.length,ee.ended),ee.length===0&&ee.ended?H(this):P(this),null;if(W=B(W,ee),W===0&&ee.ended)return ee.length===0&&H(this),null;var he=ee.needReadable;a("need readable",he),(ee.length===0||ee.length-W0?xe=K(W,ee):xe=null,xe===null?(ee.needReadable=ee.length<=ee.highWaterMark,W=0):(ee.length-=W,ee.awaitDrain=0),ee.length===0&&(ee.ended||(ee.needReadable=!0),ae!==W&&ee.ended&&H(this)),xe!==null&&this.emit("data",xe),xe};function F(W,ee){if(a("onEofChunk"),!ee.ended){if(ee.decoder){var ae=ee.decoder.end();ae&&ae.length&&(ee.buffer.push(ae),ee.length+=ee.objectMode?1:ae.length)}ee.ended=!0,ee.sync?P(W):(ee.needReadable=!1,ee.emittedReadable||(ee.emittedReadable=!0,j(W)))}}function P(W){var ee=W._readableState;a("emitReadable",ee.needReadable,ee.emittedReadable),ee.needReadable=!1,ee.emittedReadable||(a("emitReadable",ee.flowing),ee.emittedReadable=!0,process.nextTick(j,W))}function j(W){var ee=W._readableState;a("emitReadable_",ee.destroyed,ee.length,ee.ended),!ee.destroyed&&(ee.length||ee.ended)&&(W.emit("readable"),ee.emittedReadable=!1),ee.needReadable=!ee.flowing&&!ee.ended&&ee.length<=ee.highWaterMark,Z(W)}function U(W,ee){ee.readingMore||(ee.readingMore=!0,process.nextTick($,W,ee))}function $(W,ee){for(;!ee.reading&&!ee.ended&&(ee.length1&&q(he.pipes,W)!==-1)&&!Ge&&(a("false write response, pause",he.awaitDrain),he.awaitDrain++),ae.pause())}function _e(Ae){a("onerror",Ae),le(),W.removeListener("error",_e),E(W,"error")===0&&_(W,Ae)}h(W,"error",_e);function ue(){W.removeListener("finish",ve),le()}W.once("close",ue);function ve(){a("onfinish"),W.removeListener("close",ue),le()}W.once("finish",ve);function le(){a("unpipe"),ae.unpipe(W)}return W.emit("pipe",ae),he.flowing||(a("pipe resume"),ae.resume()),W};function Q(W){return function(){var ae=W._readableState;a("pipeOnDrain",ae.awaitDrain),ae.awaitDrain&&ae.awaitDrain--,ae.awaitDrain===0&&E(W,"data")&&(ae.flowing=!0,Z(W))}}A.prototype.unpipe=function(W){var ee=this._readableState,ae={hasUnpiped:!1};if(ee.pipesCount===0)return this;if(ee.pipesCount===1)return W&&W!==ee.pipes?this:(W||(W=ee.pipes),ee.pipes=null,ee.pipesCount=0,ee.flowing=!1,W&&W.emit("unpipe",this,ae),this);if(!W){var he=ee.pipes,xe=ee.pipesCount;ee.pipes=null,ee.pipesCount=0,ee.flowing=!1;for(var we=0;we0,he.flowing!==!1&&this.resume()):W==="readable"&&!he.endEmitted&&!he.readableListening&&(he.readableListening=he.needReadable=!0,he.flowing=!1,he.emittedReadable=!1,a("on readable",he.length,he.reading),he.length?P(this):he.reading||process.nextTick(ne,this)),ae},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(W,ee){var ae=k.prototype.removeListener.call(this,W,ee);return W==="readable"&&process.nextTick(re,this),ae},A.prototype.removeAllListeners=function(W){var ee=k.prototype.removeAllListeners.apply(this,arguments);return(W==="readable"||W===void 0)&&process.nextTick(re,this),ee};function re(W){var ee=W._readableState;ee.readableListening=W.listenerCount("readable")>0,ee.resumeScheduled&&!ee.paused?ee.flowing=!0:W.listenerCount("data")>0&&W.resume()}function ne(W){a("readable nexttick read 0"),W.read(0)}A.prototype.resume=function(){var W=this._readableState;return W.flowing||(a("resume"),W.flowing=!W.readableListening,se(this,W)),W.paused=!1,this};function se(W,ee){ee.resumeScheduled||(ee.resumeScheduled=!0,process.nextTick(V,W,ee))}function V(W,ee){a("resume",ee.reading),ee.reading||W.read(0),ee.resumeScheduled=!1,W.emit("resume"),Z(W),ee.flowing&&!ee.reading&&W.read(0)}A.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Z(W){var ee=W._readableState;for(a("flow",ee.flowing);ee.flowing&&W.read()!==null;);}A.prototype.wrap=function(W){var ee=this,ae=this._readableState,he=!1;W.on("end",function(){if(a("wrapped end"),ae.decoder&&!ae.ended){var Me=ae.decoder.end();Me&&Me.length&&ee.push(Me)}ee.push(null)}),W.on("data",function(Me){if(a("wrapped data"),ae.decoder&&(Me=ae.decoder.write(Me)),!(ae.objectMode&&Me==null)&&!(!ae.objectMode&&(!Me||!Me.length))){var Se=ee.push(Me);Se||(he=!0,W.pause())}});for(var xe in W)this[xe]===void 0&&typeof W[xe]=="function"&&(this[xe]=function(Se){return function(){return W[Se].apply(W,arguments)}}(xe));for(var we=0;we=ee.length?(ee.decoder?ae=ee.buffer.join(""):ee.buffer.length===1?ae=ee.buffer.first():ae=ee.buffer.concat(ee.length),ee.buffer.clear()):ae=ee.buffer.consume(W,ee.decoder),ae}function H(W){var ee=W._readableState;a("endReadable",ee.endEmitted),ee.endEmitted||(ee.ended=!0,process.nextTick(X,ee,W))}function X(W,ee){if(a("endReadableNT",W.endEmitted,W.length),!W.endEmitted&&W.length===0&&(W.endEmitted=!0,ee.readable=!1,ee.emit("end"),W.autoDestroy)){var ae=ee._writableState;(!ae||ae.autoDestroy&&ae.finished)&&ee.destroy()}}typeof Symbol=="function"&&(A.from=function(W,ee){return C===void 0&&(C=EB()),C(A,W,ee)});function q(W,ee){for(var ae=0,he=W.length;ae0;return n(T,M,C,function(_){m||(m=_),_&&i.forEach(r),!M&&(i.forEach(r),v(m))})});return g.reduce(a)}G.exports=s}}),LB=ze({"node_modules/stream-browserify/index.js"(J,G){G.exports=E;var p=jv().EventEmitter,b=op();b(E,p),E.Readable=WT(),E.Writable=GT(),E.Duplex=e0(),E.Transform=YT(),E.PassThrough=kB(),E.finished=Ob(),E.pipeline=CB(),E.Stream=E;function E(){p.call(this)}E.prototype.pipe=function(k,l){var e=this;function t(g){k.writable&&k.write(g)===!1&&e.pause&&e.pause()}e.on("data",t);function n(){e.readable&&e.resume&&e.resume()}k.on("drain",n),!k._isStdio&&(!l||l.end!==!1)&&(e.on("end",a),e.on("close",o));var r=!1;function a(){r||(r=!0,k.end())}function o(){r||(r=!0,typeof k.destroy=="function"&&k.destroy())}function s(g){if(c(),p.listenerCount(this,"error")===0)throw g}e.on("error",s),k.on("error",s);function c(){e.removeListener("data",t),k.removeListener("drain",n),e.removeListener("end",a),e.removeListener("close",o),e.removeListener("error",s),k.removeListener("error",s),e.removeListener("end",c),e.removeListener("close",c),k.removeListener("close",c)}return e.on("end",c),e.on("close",c),k.on("close",c),k.emit("pipe",e),k}}}),l1=ze({"node_modules/util/util.js"(J){var G=Object.getOwnPropertyDescriptors||function($){for(var Q=Object.keys($),re={},ne=0;ne=ne)return Z;switch(Z){case"%s":return String(re[Q++]);case"%d":return Number(re[Q++]);case"%j":try{return JSON.stringify(re[Q++])}catch{return"[Circular]"}default:return Z}}),V=re[Q];Q"u")return function(){return J.deprecate(U,$).apply(this,arguments)};var Q=!1;function re(){if(!Q){if(process.throwDeprecation)throw new Error($);process.traceDeprecation?console.trace($):console.error($),Q=!0}return U.apply(this,arguments)}return re};var b={},E=/^$/;k="false",k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i");var k;J.debuglog=function(U){if(U=U.toUpperCase(),!b[U])if(E.test(U)){var $=process.pid;b[U]=function(){var Q=J.format.apply(J,arguments);console.error("%s %d: %s",U,$,Q)}}else b[U]=function(){};return b[U]};function l(U,$){var Q={seen:[],stylize:t};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),v($)?Q.showHidden=$:$&&J._extend(Q,$),C(Q.showHidden)&&(Q.showHidden=!1),C(Q.depth)&&(Q.depth=2),C(Q.colors)&&(Q.colors=!1),C(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=e),r(Q,U,Q.depth)}J.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(U,$){var Q=l.styles[$];return Q?"\x1B["+l.colors[Q][0]+"m"+U+"\x1B["+l.colors[Q][1]+"m":U}function t(U,$){return U}function n(U){var $={};return U.forEach(function(Q,re){$[Q]=!0}),$}function r(U,$,Q){if(U.customInspect&&$&&A($.inspect)&&$.inspect!==J.inspect&&!($.constructor&&$.constructor.prototype===$)){var re=$.inspect(Q,U);return S(re)||(re=r(U,re,Q)),re}var ne=a(U,$);if(ne)return ne;var se=Object.keys($),V=n(se);if(U.showHidden&&(se=Object.getOwnPropertyNames($)),u($)&&(se.indexOf("message")>=0||se.indexOf("description")>=0))return o($);if(se.length===0){if(A($)){var Z=$.name?": "+$.name:"";return U.stylize("[Function"+Z+"]","special")}if(_($))return U.stylize(RegExp.prototype.toString.call($),"regexp");if(h($))return U.stylize(Date.prototype.toString.call($),"date");if(u($))return o($)}var K="",H=!1,X=["{","}"];if(f($)&&(H=!0,X=["[","]"]),A($)){var q=$.name?": "+$.name:"";K=" [Function"+q+"]"}if(_($)&&(K=" "+RegExp.prototype.toString.call($)),h($)&&(K=" "+Date.prototype.toUTCString.call($)),u($)&&(K=" "+o($)),se.length===0&&(!H||$.length==0))return X[0]+K+X[1];if(Q<0)return _($)?U.stylize(RegExp.prototype.toString.call($),"regexp"):U.stylize("[Object]","special");U.seen.push($);var W;return H?W=s(U,$,Q,V,se):W=se.map(function(ee){return c(U,$,Q,V,ee,H)}),U.seen.pop(),g(W,K,X)}function a(U,$){if(C($))return U.stylize("undefined","undefined");if(S($)){var Q="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(T($))return U.stylize(""+$,"number");if(v($))return U.stylize(""+$,"boolean");if(m($))return U.stylize("null","null")}function o(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,$,Q,re,ne){for(var se=[],V=0,Z=$.length;V-1&&(se?Z=Z.split(` `).map(function(H){return" "+H}).join(` -`).slice(2):X=` -`+X.split(` +`).slice(2):Z=` +`+Z.split(` `).map(function(H){return" "+H}).join(` -`))):X=U.stylize("[Circular]","special")),C(G)){if(se&&ne.match(/^\d+$/))return X;G=JSON.stringify(""+ne),G.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(G=G.slice(1,-1),G=U.stylize(G,"name")):(G=G.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),G=U.stylize(G,"string"))}return G+": "+X}function m(U,$,Q){var re=0,ne=U.reduce(function(se,G){return re++,G.indexOf(` -`)>=0&&re++,se+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ne>60?Q[0]+($===""?"":$+` +`))):Z=U.stylize("[Circular]","special")),C(V)){if(se&&ne.match(/^\d+$/))return Z;V=JSON.stringify(""+ne),V.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.slice(1,-1),V=U.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=U.stylize(V,"string"))}return V+": "+Z}function g(U,$,Q){var re=0,ne=U.reduce(function(se,V){return re++,V.indexOf(` +`)>=0&&re++,se+V.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ne>60?Q[0]+($===""?"":$+` `)+" "+U.join(`, - `)+" "+Q[1]:Q[0]+$+" "+U.join(", ")+" "+Q[1]}J.types=NT();function h(U){return Array.isArray(U)}J.isArray=h;function v(U){return typeof U=="boolean"}J.isBoolean=v;function g(U){return U===null}J.isNull=g;function i(U){return U==null}J.isNullOrUndefined=i;function w(U){return typeof U=="number"}J.isNumber=w;function S(U){return typeof U=="string"}J.isString=S;function M(U){return typeof U=="symbol"}J.isSymbol=M;function C(U){return U===void 0}J.isUndefined=C;function _(U){return T(U)&&z(U)==="[object RegExp]"}J.isRegExp=_,J.types.isRegExp=_;function T(U){return typeof U=="object"&&U!==null}J.isObject=T;function f(U){return T(U)&&z(U)==="[object Date]"}J.isDate=f,J.types.isDate=f;function u(U){return T(U)&&(z(U)==="[object Error]"||U instanceof Error)}J.isError=u,J.types.isNativeError=u;function A(U){return typeof U=="function"}J.isFunction=A;function x(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}J.isPrimitive=x,J.isBuffer=jT();function z(U){return Object.prototype.toString.call(U)}function I(U){return U<10?"0"+U.toString(10):U.toString(10)}var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function D(){var U=new Date,$=[I(U.getHours()),I(U.getMinutes()),I(U.getSeconds())].join(":");return[U.getDate(),O[U.getMonth()],$].join(" ")}J.log=function(){console.log("%s - %s",D(),J.format.apply(J,arguments))},J.inherits=op(),J._extend=function(U,$){if(!$||!T($))return U;for(var Q=Object.keys($),re=Q.length;re--;)U[Q[re]]=$[Q[re]];return U};function B(U,$){return Object.prototype.hasOwnProperty.call(U,$)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function($){if(typeof $!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&$[F]){var Q=$[F];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,F,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var re,ne,se=new Promise(function(K,H){re=K,ne=H}),G=[],X=0;X"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c(C){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(T){return T.__proto__||Object.getPrototypeOf(T)},c(C)}var m={},h,v;function g(C,_,T){T||(T=Error);function f(A,x,z){return typeof _=="string"?_:_(A,x,z)}var u=function(A){t(z,A);var x=r(z);function z(I,O,D){var B;return e(this,z),B=x.call(this,f(I,O,D)),B.code=C,B}return E(z)}(T);m[C]=u}function i(C,_){if(Array.isArray(C)){var T=C.length;return C=C.map(function(f){return String(f)}),T>2?"one of ".concat(_," ").concat(C.slice(0,T-1).join(", "),", or ")+C[T-1]:T===2?"one of ".concat(_," ").concat(C[0]," or ").concat(C[1]):"of ".concat(_," ").concat(C[0])}else return"of ".concat(_," ").concat(String(C))}function w(C,_,T){return C.substr(!T||T<0?0:+T,_.length)===_}function S(C,_,T){return(T===void 0||T>C.length)&&(T=C.length),C.substring(T-_.length,T)===_}function M(C,_,T){return typeof T!="number"&&(T=0),T+_.length>C.length?!1:C.indexOf(_,T)!==-1}g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",function(C,_,T){h===void 0&&(h=jb()),h(typeof C=="string","'name' must be a string");var f;typeof _=="string"&&w(_,"not ")?(f="must not be",_=_.replace(/^not /,"")):f="must be";var u;if(S(C," argument"))u="The ".concat(C," ").concat(f," ").concat(i(_,"type"));else{var A=M(C,".")?"property":"argument";u='The "'.concat(C,'" ').concat(A," ").concat(f," ").concat(i(_,"type"))}return u+=". Received type ".concat(p(T)),u},TypeError),g("ERR_INVALID_ARG_VALUE",function(C,_){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";v===void 0&&(v=lg());var f=v.inspect(_);return f.length>128&&(f="".concat(f.slice(0,128),"...")),"The argument '".concat(C,"' ").concat(T,". Received ").concat(f)},TypeError,RangeError),g("ERR_INVALID_RETURN_VALUE",function(C,_,T){var f;return T&&T.constructor&&T.constructor.name?f="instance of ".concat(T.constructor.name):f="type ".concat(p(T)),"Expected ".concat(C,' to be returned from the "').concat(_,'"')+" function but got ".concat(f,".")},TypeError),g("ERR_MISSING_ARGS",function(){for(var C=arguments.length,_=new Array(C),T=0;T0,"At least one arg needs to be specified");var f="The ",u=_.length;switch(_=_.map(function(A){return'"'.concat(A,'"')}),u){case 1:f+="".concat(_[0]," argument");break;case 2:f+="".concat(_[0]," and ").concat(_[1]," arguments");break;default:f+=_.slice(0,u-1).join(", "),f+=", and ".concat(_[u-1]," arguments");break}return"".concat(f," must be specified")},TypeError),V.exports.codes=m}}),PB=ze({"node_modules/assert/build/internal/assert/assertion_error.js"(J,V){"use strict";function p(j,U){var $=Object.keys(j);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(j);U&&(Q=Q.filter(function(re){return Object.getOwnPropertyDescriptor(j,re).enumerable})),$.push.apply($,Q)}return $}function b(j){for(var U=1;U"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function v(j){return Function.toString.call(j).indexOf("[native code]")!==-1}function g(j,U){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Q,re){return Q.__proto__=re,Q},g(j,U)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function($){return $.__proto__||Object.getPrototypeOf($)},i(j)}function w(j){"@babel/helpers - typeof";return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},w(j)}var S=lg(),M=S.inspect,C=XT(),_=C.codes.ERR_INVALID_ARG_TYPE;function T(j,U,$){return($===void 0||$>j.length)&&($=j.length),j.substring($-U.length,$)===U}function f(j,U){if(U=Math.floor(U),j.length==0||U==0)return"";var $=j.length*U;for(U=Math.floor(Math.log(U)/Math.log(2));U;)j+=j,U--;return j+=j.substring(0,$-j.length),j}var u="",A="",x="",z="",I={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},O=10;function D(j){var U=Object.keys(j),$=Object.create(Object.getPrototypeOf(j));return U.forEach(function(Q){$[Q]=j[Q]}),Object.defineProperty($,"message",{value:j.message}),$}function B(j){return M(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function F(j,U,$){var Q="",re="",ne=0,se="",G=!1,X=B(j),K=X.split(` + `)+" "+Q[1]:Q[0]+$+" "+U.join(", ")+" "+Q[1]}J.types=NT();function f(U){return Array.isArray(U)}J.isArray=f;function v(U){return typeof U=="boolean"}J.isBoolean=v;function m(U){return U===null}J.isNull=m;function i(U){return U==null}J.isNullOrUndefined=i;function T(U){return typeof U=="number"}J.isNumber=T;function S(U){return typeof U=="string"}J.isString=S;function M(U){return typeof U=="symbol"}J.isSymbol=M;function C(U){return U===void 0}J.isUndefined=C;function _(U){return w(U)&&z(U)==="[object RegExp]"}J.isRegExp=_,J.types.isRegExp=_;function w(U){return typeof U=="object"&&U!==null}J.isObject=w;function h(U){return w(U)&&z(U)==="[object Date]"}J.isDate=h,J.types.isDate=h;function u(U){return w(U)&&(z(U)==="[object Error]"||U instanceof Error)}J.isError=u,J.types.isNativeError=u;function A(U){return typeof U=="function"}J.isFunction=A;function x(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}J.isPrimitive=x,J.isBuffer=jT();function z(U){return Object.prototype.toString.call(U)}function I(U){return U<10?"0"+U.toString(10):U.toString(10)}var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function D(){var U=new Date,$=[I(U.getHours()),I(U.getMinutes()),I(U.getSeconds())].join(":");return[U.getDate(),O[U.getMonth()],$].join(" ")}J.log=function(){console.log("%s - %s",D(),J.format.apply(J,arguments))},J.inherits=op(),J._extend=function(U,$){if(!$||!w($))return U;for(var Q=Object.keys($),re=Q.length;re--;)U[Q[re]]=$[Q[re]];return U};function B(U,$){return Object.prototype.hasOwnProperty.call(U,$)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function($){if(typeof $!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&$[F]){var Q=$[F];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,F,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var re,ne,se=new Promise(function(K,H){re=K,ne=H}),V=[],Z=0;Z"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c(C){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(w){return w.__proto__||Object.getPrototypeOf(w)},c(C)}var g={},f,v;function m(C,_,w){w||(w=Error);function h(A,x,z){return typeof _=="string"?_:_(A,x,z)}var u=function(A){t(z,A);var x=r(z);function z(I,O,D){var B;return e(this,z),B=x.call(this,h(I,O,D)),B.code=C,B}return E(z)}(w);g[C]=u}function i(C,_){if(Array.isArray(C)){var w=C.length;return C=C.map(function(h){return String(h)}),w>2?"one of ".concat(_," ").concat(C.slice(0,w-1).join(", "),", or ")+C[w-1]:w===2?"one of ".concat(_," ").concat(C[0]," or ").concat(C[1]):"of ".concat(_," ").concat(C[0])}else return"of ".concat(_," ").concat(String(C))}function T(C,_,w){return C.substr(!w||w<0?0:+w,_.length)===_}function S(C,_,w){return(w===void 0||w>C.length)&&(w=C.length),C.substring(w-_.length,w)===_}function M(C,_,w){return typeof w!="number"&&(w=0),w+_.length>C.length?!1:C.indexOf(_,w)!==-1}m("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),m("ERR_INVALID_ARG_TYPE",function(C,_,w){f===void 0&&(f=jb()),f(typeof C=="string","'name' must be a string");var h;typeof _=="string"&&T(_,"not ")?(h="must not be",_=_.replace(/^not /,"")):h="must be";var u;if(S(C," argument"))u="The ".concat(C," ").concat(h," ").concat(i(_,"type"));else{var A=M(C,".")?"property":"argument";u='The "'.concat(C,'" ').concat(A," ").concat(h," ").concat(i(_,"type"))}return u+=". Received type ".concat(p(w)),u},TypeError),m("ERR_INVALID_ARG_VALUE",function(C,_){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";v===void 0&&(v=l1());var h=v.inspect(_);return h.length>128&&(h="".concat(h.slice(0,128),"...")),"The argument '".concat(C,"' ").concat(w,". Received ").concat(h)},TypeError,RangeError),m("ERR_INVALID_RETURN_VALUE",function(C,_,w){var h;return w&&w.constructor&&w.constructor.name?h="instance of ".concat(w.constructor.name):h="type ".concat(p(w)),"Expected ".concat(C,' to be returned from the "').concat(_,'"')+" function but got ".concat(h,".")},TypeError),m("ERR_MISSING_ARGS",function(){for(var C=arguments.length,_=new Array(C),w=0;w0,"At least one arg needs to be specified");var h="The ",u=_.length;switch(_=_.map(function(A){return'"'.concat(A,'"')}),u){case 1:h+="".concat(_[0]," argument");break;case 2:h+="".concat(_[0]," and ").concat(_[1]," arguments");break;default:h+=_.slice(0,u-1).join(", "),h+=", and ".concat(_[u-1]," arguments");break}return"".concat(h," must be specified")},TypeError),G.exports.codes=g}}),PB=ze({"node_modules/assert/build/internal/assert/assertion_error.js"(J,G){"use strict";function p(j,U){var $=Object.keys(j);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(j);U&&(Q=Q.filter(function(re){return Object.getOwnPropertyDescriptor(j,re).enumerable})),$.push.apply($,Q)}return $}function b(j){for(var U=1;U"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function v(j){return Function.toString.call(j).indexOf("[native code]")!==-1}function m(j,U){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Q,re){return Q.__proto__=re,Q},m(j,U)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function($){return $.__proto__||Object.getPrototypeOf($)},i(j)}function T(j){"@babel/helpers - typeof";return T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},T(j)}var S=l1(),M=S.inspect,C=XT(),_=C.codes.ERR_INVALID_ARG_TYPE;function w(j,U,$){return($===void 0||$>j.length)&&($=j.length),j.substring($-U.length,$)===U}function h(j,U){if(U=Math.floor(U),j.length==0||U==0)return"";var $=j.length*U;for(U=Math.floor(Math.log(U)/Math.log(2));U;)j+=j,U--;return j+=j.substring(0,$-j.length),j}var u="",A="",x="",z="",I={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},O=10;function D(j){var U=Object.keys(j),$=Object.create(Object.getPrototypeOf(j));return U.forEach(function(Q){$[Q]=j[Q]}),Object.defineProperty($,"message",{value:j.message}),$}function B(j){return M(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function F(j,U,$){var Q="",re="",ne=0,se="",V=!1,Z=B(j),K=Z.split(` `),H=B(U).split(` -`),Y=0,q="";if($==="strictEqual"&&w(j)==="object"&&w(U)==="object"&&j!==null&&U!==null&&($="strictEqualObject"),K.length===1&&H.length===1&&K[0]!==H[0]){var Z=K[0].length+H[0].length;if(Z<=O){if((w(j)!=="object"||j===null)&&(w(U)!=="object"||U===null)&&(j!==0||U!==0))return"".concat(I[$],` +`),X=0,q="";if($==="strictEqual"&&T(j)==="object"&&T(U)==="object"&&j!==null&&U!==null&&($="strictEqualObject"),K.length===1&&H.length===1&&K[0]!==H[0]){var W=K[0].length+H[0].length;if(W<=O){if((T(j)!=="object"||j===null)&&(T(U)!=="object"||U===null)&&(j!==0||U!==0))return"".concat(I[$],` `)+"".concat(K[0]," !== ").concat(H[0],` -`)}else if($!=="strictEqualObject"){var ee=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(Z2&&(q=` - `.concat(f(" ",Y),"^"),Y=0)}}}for(var ae=K[K.length-1],he=H[H.length-1];ae===he&&(Y++<2?se=` - `.concat(ae).concat(se):Q=ae,K.pop(),H.pop(),!(K.length===0||H.length===0));)ae=K[K.length-1],he=H[H.length-1];var xe=Math.max(K.length,H.length);if(xe===0){var we=X.split(` +`)}else if($!=="strictEqualObject"){var ee=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(W2&&(q=` + `.concat(h(" ",X),"^"),X=0)}}}for(var ae=K[K.length-1],he=H[H.length-1];ae===he&&(X++<2?se=` + `.concat(ae).concat(se):Q=ae,K.pop(),H.pop(),!(K.length===0||H.length===0));)ae=K[K.length-1],he=H[H.length-1];var xe=Math.max(K.length,H.length);if(xe===0){var we=Z.split(` `);if(we.length>30)for(we[26]="".concat(u,"...").concat(z);we.length>27;)we.pop();return"".concat(I.notIdentical,` `).concat(we.join(` `),` -`)}Y>3&&(se=` -`.concat(u,"...").concat(z).concat(se),G=!0),Q!==""&&(se=` +`)}X>3&&(se=` +`.concat(u,"...").concat(z).concat(se),V=!0),Q!==""&&(se=` `.concat(Q).concat(se),Q="");var Me=0,Se=I[$]+` -`.concat(A,"+ actual").concat(z," ").concat(x,"- expected").concat(z),Ie=" ".concat(u,"...").concat(z," Lines skipped");for(Y=0;Y1&&Y>2&&(Ve>4?(re+=` -`.concat(u,"...").concat(z),G=!0):Ve>3&&(re+=` - `.concat(H[Y-2]),Me++),re+=` - `.concat(H[Y-1]),Me++),ne=Y,Q+=` -`.concat(x,"-").concat(z," ").concat(H[Y]),Me++;else if(H.length1&&Y>2&&(Ve>4?(re+=` -`.concat(u,"...").concat(z),G=!0):Ve>3&&(re+=` - `.concat(K[Y-2]),Me++),re+=` - `.concat(K[Y-1]),Me++),ne=Y,re+=` -`.concat(A,"+").concat(z," ").concat(K[Y]),Me++;else{var Ge=H[Y],ke=K[Y],_e=ke!==Ge&&(!T(ke,",")||ke.slice(0,-1)!==Ge);_e&&T(Ge,",")&&Ge.slice(0,-1)===ke&&(_e=!1,ke+=","),_e?(Ve>1&&Y>2&&(Ve>4?(re+=` -`.concat(u,"...").concat(z),G=!0):Ve>3&&(re+=` - `.concat(K[Y-2]),Me++),re+=` - `.concat(K[Y-1]),Me++),ne=Y,re+=` +`.concat(A,"+ actual").concat(z," ").concat(x,"- expected").concat(z),Ie=" ".concat(u,"...").concat(z," Lines skipped");for(X=0;X1&&X>2&&(Ge>4?(re+=` +`.concat(u,"...").concat(z),V=!0):Ge>3&&(re+=` + `.concat(H[X-2]),Me++),re+=` + `.concat(H[X-1]),Me++),ne=X,Q+=` +`.concat(x,"-").concat(z," ").concat(H[X]),Me++;else if(H.length1&&X>2&&(Ge>4?(re+=` +`.concat(u,"...").concat(z),V=!0):Ge>3&&(re+=` + `.concat(K[X-2]),Me++),re+=` + `.concat(K[X-1]),Me++),ne=X,re+=` +`.concat(A,"+").concat(z," ").concat(K[X]),Me++;else{var qe=H[X],ke=K[X],_e=ke!==qe&&(!w(ke,",")||ke.slice(0,-1)!==qe);_e&&w(qe,",")&&qe.slice(0,-1)===ke&&(_e=!1,ke+=","),_e?(Ge>1&&X>2&&(Ge>4?(re+=` +`.concat(u,"...").concat(z),V=!0):Ge>3&&(re+=` + `.concat(K[X-2]),Me++),re+=` + `.concat(K[X-1]),Me++),ne=X,re+=` `.concat(A,"+").concat(z," ").concat(ke),Q+=` -`.concat(x,"-").concat(z," ").concat(Ge),Me+=2):(re+=Q,Q="",(Ve===1||Y===0)&&(re+=` - `.concat(ke),Me++))}if(Me>20&&Y20&&X30)for(Z[26]="".concat(u,"...").concat(z);Z.length>27;)Z.pop();Z.length===1?ne=$.call(this,"".concat(q," ").concat(Z[0])):ne=$.call(this,"".concat(q,` +`)+"".concat(u,"...").concat(z)}return"".concat(Se).concat(V?Ie:"",` +`).concat(re).concat(Q).concat(se).concat(q)}var P=function(j,U){r(Q,j);var $=a(Q);function Q(re){var ne;if(k(this,Q),T(re)!=="object"||re===null)throw new _("options","Object",re);var se=re.message,V=re.operator,Z=re.stackStartFn,K=re.actual,H=re.expected,X=Error.stackTraceLimit;if(Error.stackTraceLimit=0,se!=null)ne=$.call(this,String(se));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(u="\x1B[34m",A="\x1B[32m",z="\x1B[39m",x="\x1B[31m"):(u="",A="",z="",x="")),T(K)==="object"&&K!==null&&T(H)==="object"&&H!==null&&"stack"in K&&K instanceof Error&&"stack"in H&&H instanceof Error&&(K=D(K),H=D(H)),V==="deepStrictEqual"||V==="strictEqual")ne=$.call(this,F(K,H,V));else if(V==="notDeepStrictEqual"||V==="notStrictEqual"){var q=I[V],W=B(K).split(` +`);if(V==="notStrictEqual"&&T(K)==="object"&&K!==null&&(q=I.notStrictEqualObject),W.length>30)for(W[26]="".concat(u,"...").concat(z);W.length>27;)W.pop();W.length===1?ne=$.call(this,"".concat(q," ").concat(W[0])):ne=$.call(this,"".concat(q,` -`).concat(Z.join(` +`).concat(W.join(` `),` -`))}else{var ee=B(K),ae="",he=I[G];G==="notDeepEqual"||G==="notEqual"?(ee="".concat(I[G],` +`))}else{var ee=B(K),ae="",he=I[V];V==="notDeepEqual"||V==="notEqual"?(ee="".concat(I[V],` -`).concat(ee),ee.length>1024&&(ee="".concat(ee.slice(0,1021),"..."))):(ae="".concat(B(H)),ee.length>512&&(ee="".concat(ee.slice(0,509),"...")),ae.length>512&&(ae="".concat(ae.slice(0,509),"...")),G==="deepEqual"||G==="equal"?ee="".concat(he,` +`).concat(ee),ee.length>1024&&(ee="".concat(ee.slice(0,1021),"..."))):(ae="".concat(B(H)),ee.length>512&&(ee="".concat(ee.slice(0,509),"...")),ae.length>512&&(ae="".concat(ae.slice(0,509),"...")),V==="deepEqual"||V==="equal"?ee="".concat(he,` `).concat(ee,` should equal -`):ae=" ".concat(G," ").concat(ae)),ne=$.call(this,"".concat(ee).concat(ae))}return Error.stackTraceLimit=Y,ne.generatedMessage=!se,Object.defineProperty(s(ne),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),ne.code="ERR_ASSERTION",ne.actual=K,ne.expected=H,ne.operator=G,Error.captureStackTrace&&Error.captureStackTrace(s(ne),X),ne.stack,ne.name="AssertionError",o(ne)}return e(Q,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:U,value:function(ne,se){return M(this,b(b({},se),{},{customInspect:!1,depth:0}))}}]),Q}(c(Error),M.custom);V.exports=P}}),ZT=ze({"node_modules/object-keys/isArguments.js"(J,V){"use strict";var p=Object.prototype.toString;V.exports=function(E){var k=p.call(E),l=k==="[object Arguments]";return l||(l=k!=="[object Array]"&&E!==null&&typeof E=="object"&&typeof E.length=="number"&&E.length>=0&&p.call(E.callee)==="[object Function]"),l}}}),RB=ze({"node_modules/object-keys/implementation.js"(J,V){"use strict";var p;Object.keys||(b=Object.prototype.hasOwnProperty,E=Object.prototype.toString,k=ZT(),l=Object.prototype.propertyIsEnumerable,e=!l.call({toString:null},"toString"),t=l.call(function(){},"prototype"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=function(c){var m=c.constructor;return m&&m.prototype===c},a={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},o=function(){if(typeof window>"u")return!1;for(var c in window)try{if(!a["$"+c]&&b.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{r(window[c])}catch{return!0}}catch{return!0}return!1}(),s=function(c){if(typeof window>"u"||!o)return r(c);try{return r(c)}catch{return!1}},p=function(m){var h=m!==null&&typeof m=="object",v=E.call(m)==="[object Function]",g=k(m),i=h&&E.call(m)==="[object String]",w=[];if(!h&&!v&&!g)throw new TypeError("Object.keys called on a non-object");var S=t&&v;if(i&&m.length>0&&!b.call(m,0))for(var M=0;M0)for(var C=0;C-1?b(t):t}}}),P1=ze({"node_modules/define-properties/index.js"(J,V){"use strict";var p=$T(),b=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",E=Object.prototype.toString,k=Array.prototype.concat,l=zT(),e=function(a){return typeof a=="function"&&E.call(a)==="[object Function]"},t=BT()(),n=function(a,o,s,c){if(o in a){if(c===!0){if(a[o]===s)return}else if(!e(c)||!c())return}t?l(a,o,s,!0):l(a,o,s)},r=function(a,o){var s=arguments.length>2?arguments[2]:{},c=p(o);b&&(c=k.call(c,Object.getOwnPropertySymbols(o)));for(var m=0;mce.length)&&(ve=ce.length);for(var le=0,Ae=new Array(ve);le10)return!0;for(var ve=0;ve57)return!0}return ce.length===10&&ce>=Math.pow(2,32)}function P(ce){return Object.keys(ce).filter(F).concat(s(ce).filter(Object.prototype.propertyIsEnumerable.bind(ce)))}function j(ce,ve){if(ce===ve)return 0;for(var le=ce.length,Ae=ve.length,Be=0,Xe=Math.min(le,Ae);Be1?H-1:0),q=1;q1?H-1:0),q=1;q1?H-1:0),q=1;q1?H-1:0),q=1;q=0&&p.call(E.callee)==="[object Function]"),l}}}),RB=ze({"node_modules/object-keys/implementation.js"(J,G){"use strict";var p;Object.keys||(b=Object.prototype.hasOwnProperty,E=Object.prototype.toString,k=ZT(),l=Object.prototype.propertyIsEnumerable,e=!l.call({toString:null},"toString"),t=l.call(function(){},"prototype"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=function(c){var g=c.constructor;return g&&g.prototype===c},a={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},o=function(){if(typeof window>"u")return!1;for(var c in window)try{if(!a["$"+c]&&b.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{r(window[c])}catch{return!0}}catch{return!0}return!1}(),s=function(c){if(typeof window>"u"||!o)return r(c);try{return r(c)}catch{return!1}},p=function(g){var f=g!==null&&typeof g=="object",v=E.call(g)==="[object Function]",m=k(g),i=f&&E.call(g)==="[object String]",T=[];if(!f&&!v&&!m)throw new TypeError("Object.keys called on a non-object");var S=t&&v;if(i&&g.length>0&&!b.call(g,0))for(var M=0;M0)for(var C=0;C-1?b(t):t}}}),Pg=ze({"node_modules/define-properties/index.js"(J,G){"use strict";var p=$T(),b=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",E=Object.prototype.toString,k=Array.prototype.concat,l=zT(),e=function(a){return typeof a=="function"&&E.call(a)==="[object Function]"},t=BT()(),n=function(a,o,s,c){if(o in a){if(c===!0){if(a[o]===s)return}else if(!e(c)||!c())return}t?l(a,o,s,!0):l(a,o,s)},r=function(a,o){var s=arguments.length>2?arguments[2]:{},c=p(o);b&&(c=k.call(c,Object.getOwnPropertySymbols(o)));for(var g=0;gue.length)&&(ve=ue.length);for(var le=0,Ae=new Array(ve);le10)return!0;for(var ve=0;ve57)return!0}return ue.length===10&&ue>=Math.pow(2,32)}function P(ue){return Object.keys(ue).filter(F).concat(s(ue).filter(Object.prototype.propertyIsEnumerable.bind(ue)))}function j(ue,ve){if(ue===ve)return 0;for(var le=ue.length,Ae=ve.length,Be=0,Xe=Math.min(le,Ae);Be1?H-1:0),q=1;q1?H-1:0),q=1;q1?H-1:0),q=1;q1?H-1:0),q=1;q0)return e(a);if(s==="number"&&isNaN(a)===!1)return o.long?n(a):t(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))};function e(a){if(a=String(a),!(a.length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);if(o){var s=parseFloat(o[1]),c=(o[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return s*l;case"days":case"day":case"d":return s*k;case"hours":case"hour":case"hrs":case"hr":case"h":return s*E;case"minutes":case"minute":case"mins":case"min":case"m":return s*b;case"seconds":case"second":case"secs":case"sec":case"s":return s*p;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function t(a){return a>=k?Math.round(a/k)+"d":a>=E?Math.round(a/E)+"h":a>=b?Math.round(a/b)+"m":a>=p?Math.round(a/p)+"s":a+"ms"}function n(a){return r(a,k,"day")||r(a,E,"hour")||r(a,b,"minute")||r(a,p,"second")||a+" ms"}function r(a,o,s){if(!(a=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}J.formatters.j=function(t){try{return JSON.stringify(t)}catch(n){return"[UnexpectedJSONParseError]: "+n.message}};function b(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+J.humanize(this.diff),!!n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var a=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(a++,s==="%c"&&(o=a))}),t.splice(o,0,r)}}function E(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function k(t){try{t==null?J.storage.removeItem("debug"):J.storage.debug=t}catch{}}function l(){var t;try{t=J.storage.debug}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}J.enable(l());function e(){try{return window.localStorage}catch{}}}}),GB=ze({"node_modules/stream-parser/index.js"(J,V){var p=jb(),b=VB()("stream-parser");V.exports=t;var E=-1,k=0,l=1,e=2;function t(i){var w=i&&typeof i._transform=="function",S=i&&typeof i._write=="function";if(!w&&!S)throw new Error("must pass a Writable or Transform stream in");b("extending Parser into stream"),i._bytes=r,i._skipBytes=a,w&&(i._passthrough=o),w?i._transform=c:i._write=s}function n(i){b("initializing parser stream"),i._parserBytesLeft=0,i._parserBuffers=[],i._parserBuffered=0,i._parserState=E,i._parserCallback=null,typeof i.push=="function"&&(i._parserOutput=i.push.bind(i)),i._parserInit=!0}function r(i,w){p(!this._parserCallback,'there is already a "callback" set!'),p(isFinite(i)&&i>0,'can only buffer a finite number of bytes > 0, got "'+i+'"'),this._parserInit||n(this),b("buffering %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=k}function a(i,w){p(!this._parserCallback,'there is already a "callback" set!'),p(i>0,'can only skip > 0 bytes, got "'+i+'"'),this._parserInit||n(this),b("skipping %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=l}function o(i,w){p(!this._parserCallback,'There is already a "callback" set!'),p(i>0,'can only pass through > 0 bytes, got "'+i+'"'),this._parserInit||n(this),b("passing through %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=e}function s(i,w,S){this._parserInit||n(this),b("write(%o bytes)",i.length),typeof w=="function"&&(S=w),v(this,i,null,S)}function c(i,w,S){this._parserInit||n(this),b("transform(%o bytes)",i.length),typeof w!="function"&&(w=this._parserOutput),v(this,i,w,S)}function m(i,w,S,M){return i._parserBytesLeft<=0?M(new Error("got data but not currently parsing anything")):w.length<=i._parserBytesLeft?function(){return h(i,w,S,M)}:function(){var C=w.slice(0,i._parserBytesLeft);return h(i,C,S,function(_){if(_)return M(_);if(w.length>C.length)return function(){return m(i,w.slice(C.length),S,M)}})}}function h(i,w,S,M){if(i._parserBytesLeft-=w.length,b("%o bytes left for stream piece",i._parserBytesLeft),i._parserState===k?(i._parserBuffers.push(w),i._parserBuffered+=w.length):i._parserState===e&&S(w),i._parserBytesLeft===0){var C=i._parserCallback;if(C&&i._parserState===k&&i._parserBuffers.length>1&&(w=Buffer.concat(i._parserBuffers,i._parserBuffered)),i._parserState!==k&&(w=null),i._parserCallback=null,i._parserBuffered=0,i._parserState=E,i._parserBuffers.splice(0),C){var _=[];w&&_.push(w),S&&_.push(S);var T=C.length>_.length;T&&_.push(g(M));var f=C.apply(i,_);if(!T||M===f)return M}}else return M}var v=g(m);function g(i){return function(){for(var w=i.apply(this,arguments);typeof w=="function";)w=w();return w}}}}),Ns=ze({"node_modules/probe-image-size/lib/common.js"(J){"use strict";var V=LB().Transform,p=GB();function b(){V.call(this,{readableObjectMode:!0})}b.prototype=Object.create(V.prototype),b.prototype.constructor=b,p(b.prototype),J.ParserStream=b,J.sliceEq=function(k,l,e){for(var t=l,n=0;n>16},J.readInt16BE=function(k,l){return J.readUInt16BE(k,l)<<16>>16},J.readUInt32LE=function(k,l){return(k[l]|k[l+1]<<8|k[l+2]<<16)+k[l+3]*16777216},J.readUInt32BE=function(k,l){return k[l]*16777216+(k[l+1]<<16|k[l+2]<<8|k[l+3])},J.readInt32LE=function(k,l){return J.readUInt32LE(k,l)|0},J.readInt32BE=function(k,l){return J.readUInt32BE(k,l)|0};function E(k,l,e){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=k,l&&(this.code=l),e&&(this.statusCode=e)}E.prototype=Object.create(Error.prototype),E.prototype.constructor=E,J.ProbeError=E}}),HB=ze({"node_modules/probe-image-size/lib/miaf_utils.js"(J,V){"use strict";var p=Ns().readUInt16BE,b=Ns().readUInt32BE;function E(o,s){if(o.length<4+s)return null;var c=b(o,s);return o.length>4&15,m=o[4]&15,h=o[5]>>4&15,v=p(o,6),g=8,i=0;iv.width||h.width===v.width&&h.height>v.height?h:v}),c=o.reduce(function(h,v){return h.height>v.height||h.height===v.height&&h.width>v.width?h:v}),m;return s.width>c.height||s.width===c.height&&s.height>c.width?m=s:m=c,m}V.exports.readSizeFromMeta=function(o){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(r(o,s),!!s.sizes.length){var c=a(s.sizes),m=1;s.transforms.forEach(function(v){var g={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},i={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(v.type==="imir"&&(v.value===0?m=i[m]:(m=i[m],m=g[m],m=g[m])),v.type==="irot")for(var w=0;w0&&!this.aborted;){var e=this.ifds_to_read.shift();e.offset&&this.scan_ifd(e.id,e.offset,k)}},E.prototype.read_uint16=function(k){var l=this.input;if(k+2>l.length)throw p("unexpected EOF","EBADDATA");return this.big_endian?l[k]*256+l[k+1]:l[k]+l[k+1]*256},E.prototype.read_uint32=function(k){var l=this.input;if(k+4>l.length)throw p("unexpected EOF","EBADDATA");return this.big_endian?l[k]*16777216+l[k+1]*65536+l[k+2]*256+l[k+3]:l[k]+l[k+1]*256+l[k+2]*65536+l[k+3]*16777216},E.prototype.is_subifd_link=function(k,l){return k===0&&l===34665||k===0&&l===34853||k===34665&&l===40965},E.prototype.exif_format_length=function(k){switch(k){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},E.prototype.exif_format_read=function(k,l){var e;switch(k){case 1:case 2:return e=this.input[l],e;case 6:return e=this.input[l],e|(e&128)*33554430;case 3:return e=this.read_uint16(l),e;case 8:return e=this.read_uint16(l),e|(e&32768)*131070;case 4:return e=this.read_uint32(l),e;case 9:return e=this.read_uint32(l),e|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},E.prototype.scan_ifd=function(k,l,e){var t=this.read_uint16(l);l+=2;for(var n=0;nthis.input.length)throw p("unexpected EOF","EBADDATA");for(var v=[],g=m,i=0;i0&&(this.ifds_to_read.push({id:r,offset:v[0]}),h=!0);var S={is_big_endian:this.big_endian,ifd:k,tag:r,format:a,count:o,entry_offset:l+this.start,data_length:c,data_offset:m+this.start,value:v,is_subifd_link:h};if(e(S)===!1){this.aborted=!0;return}l+=12}k===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(l)})},V.exports.ExifParser=E,V.exports.get_orientation=function(k){var l=0;try{return new E(k,0,k.length).each(function(e){if(e.ifd===0&&e.tag===274&&Array.isArray(e.value))return l=e.value[0],!1}),l}catch{return-1}}}}),WB=ze({"node_modules/probe-image-size/lib/parse_sync/avif.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt32BE,k=HB(),l=Ub(),e=p("ftyp");V.exports=function(t){if(b(t,4,e)){var n=k.unbox(t,0);if(n){var r=k.getMimeType(n.data);if(r){for(var a,o=n.end;;){var s=k.unbox(t,o);if(!s)break;if(o=s.end,s.boxtype==="mdat")return;if(s.boxtype==="meta"){a=s.data;break}}if(a){var c=k.readSizeFromMeta(a);if(c){var m={width:c.width,height:c.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(c.variants.length>1&&(m.variants=c.variants),c.orientation&&(m.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=t.length){var h=E(t,c.exif_location.offset),v=t.slice(c.exif_location.offset+h+4,c.exif_location.offset+c.exif_location.length),g=l.get_orientation(v);g>0&&(m.orientation=g)}return m}}}}}}}}),YB=ze({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readInt16LE,k=Ns().readInt32LE,l=Ns().readUInt32LE,e=p("BM");V.exports=function(t){if(!(t.length<26)&&b(t,0,e)){var n,r,a=l(t,14);if(a===12)r=E(t,18),n=E(t,20);else if(a>12)r=k(t,18),n=k(t,22);else return;return{width:r,height:Math.abs(n),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}}),XB=ze({"node_modules/probe-image-size/lib/parse_sync/gif.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt16LE,k=p("GIF87a"),l=p("GIF89a");V.exports=function(e){if(!(e.length<10)&&!(!b(e,0,k)&&!b(e,0,l)))return{width:E(e,6),height:E(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),ZB=ze({"node_modules/probe-image-size/lib/parse_sync/ico.js"(J,V){"use strict";var p=Ns().readUInt16LE,b=0,E=1,k=16;V.exports=function(l){var e=p(l,0),t=p(l,2),n=p(l,4);if(!(e!==b||t!==E||!n)&&!(l.length<6+n*k)){for(var r=[],a={width:0,height:0},o=0;oa.width||c>a.height)&&(a=m)}return{width:a.width,height:a.height,variants:r,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),$B=ze({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(J,V){"use strict";var p=Ns().readUInt16BE,b=Ns().str2arr,E=Ns().sliceEq,k=Ub(),l=b("Exif\0\0");V.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var n=e[t++],r;n===255;)n=e[t++];if(n>=208&&n<=217||n===1)r=0;else if(n>=192&&n<=254){if(e.length-t<2)return;r=p(e,t)-2,t+=2}else return;if(n===217||n===218)return;var a;if(n===225&&r>=10&&E(e,t,l)&&(a=k.get_orientation(e.slice(t+6,t+r))),r>=5&&n>=192&&n<=207&&n!==196&&n!==200&&n!==204){if(e.length-t0&&(o.orientation=a),o}t+=r}}}}),KB=ze({"node_modules/probe-image-size/lib/parse_sync/png.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt32BE,k=p(`\x89PNG\r +`).concat(v(Z),` +`));var ae=new g({actual:Z,expected:K,message:H,operator:q,stackStartFn:X});throw ae.generatedMessage=ee,ae}}A.match=function Z(K,H,X){se(K,H,X,Z,"match")},A.doesNotMatch=function Z(K,H,X){se(K,H,X,Z,"doesNotMatch")};function V(){for(var Z=arguments.length,K=new Array(Z),H=0;H0)return e(a);if(s==="number"&&isNaN(a)===!1)return o.long?n(a):t(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))};function e(a){if(a=String(a),!(a.length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);if(o){var s=parseFloat(o[1]),c=(o[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return s*l;case"days":case"day":case"d":return s*k;case"hours":case"hour":case"hrs":case"hr":case"h":return s*E;case"minutes":case"minute":case"mins":case"min":case"m":return s*b;case"seconds":case"second":case"secs":case"sec":case"s":return s*p;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function t(a){return a>=k?Math.round(a/k)+"d":a>=E?Math.round(a/E)+"h":a>=b?Math.round(a/b)+"m":a>=p?Math.round(a/p)+"s":a+"ms"}function n(a){return r(a,k,"day")||r(a,E,"hour")||r(a,b,"minute")||r(a,p,"second")||a+" ms"}function r(a,o,s){if(!(a=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}J.formatters.j=function(t){try{return JSON.stringify(t)}catch(n){return"[UnexpectedJSONParseError]: "+n.message}};function b(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+J.humanize(this.diff),!!n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var a=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(a++,s==="%c"&&(o=a))}),t.splice(o,0,r)}}function E(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function k(t){try{t==null?J.storage.removeItem("debug"):J.storage.debug=t}catch{}}function l(){var t;try{t=J.storage.debug}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}J.enable(l());function e(){try{return window.localStorage}catch{}}}}),GB=ze({"node_modules/stream-parser/index.js"(J,G){var p=jb(),b=VB()("stream-parser");G.exports=t;var E=-1,k=0,l=1,e=2;function t(i){var T=i&&typeof i._transform=="function",S=i&&typeof i._write=="function";if(!T&&!S)throw new Error("must pass a Writable or Transform stream in");b("extending Parser into stream"),i._bytes=r,i._skipBytes=a,T&&(i._passthrough=o),T?i._transform=c:i._write=s}function n(i){b("initializing parser stream"),i._parserBytesLeft=0,i._parserBuffers=[],i._parserBuffered=0,i._parserState=E,i._parserCallback=null,typeof i.push=="function"&&(i._parserOutput=i.push.bind(i)),i._parserInit=!0}function r(i,T){p(!this._parserCallback,'there is already a "callback" set!'),p(isFinite(i)&&i>0,'can only buffer a finite number of bytes > 0, got "'+i+'"'),this._parserInit||n(this),b("buffering %o bytes",i),this._parserBytesLeft=i,this._parserCallback=T,this._parserState=k}function a(i,T){p(!this._parserCallback,'there is already a "callback" set!'),p(i>0,'can only skip > 0 bytes, got "'+i+'"'),this._parserInit||n(this),b("skipping %o bytes",i),this._parserBytesLeft=i,this._parserCallback=T,this._parserState=l}function o(i,T){p(!this._parserCallback,'There is already a "callback" set!'),p(i>0,'can only pass through > 0 bytes, got "'+i+'"'),this._parserInit||n(this),b("passing through %o bytes",i),this._parserBytesLeft=i,this._parserCallback=T,this._parserState=e}function s(i,T,S){this._parserInit||n(this),b("write(%o bytes)",i.length),typeof T=="function"&&(S=T),v(this,i,null,S)}function c(i,T,S){this._parserInit||n(this),b("transform(%o bytes)",i.length),typeof T!="function"&&(T=this._parserOutput),v(this,i,T,S)}function g(i,T,S,M){return i._parserBytesLeft<=0?M(new Error("got data but not currently parsing anything")):T.length<=i._parserBytesLeft?function(){return f(i,T,S,M)}:function(){var C=T.slice(0,i._parserBytesLeft);return f(i,C,S,function(_){if(_)return M(_);if(T.length>C.length)return function(){return g(i,T.slice(C.length),S,M)}})}}function f(i,T,S,M){if(i._parserBytesLeft-=T.length,b("%o bytes left for stream piece",i._parserBytesLeft),i._parserState===k?(i._parserBuffers.push(T),i._parserBuffered+=T.length):i._parserState===e&&S(T),i._parserBytesLeft===0){var C=i._parserCallback;if(C&&i._parserState===k&&i._parserBuffers.length>1&&(T=Buffer.concat(i._parserBuffers,i._parserBuffered)),i._parserState!==k&&(T=null),i._parserCallback=null,i._parserBuffered=0,i._parserState=E,i._parserBuffers.splice(0),C){var _=[];T&&_.push(T),S&&_.push(S);var w=C.length>_.length;w&&_.push(m(M));var h=C.apply(i,_);if(!w||M===h)return M}}else return M}var v=m(g);function m(i){return function(){for(var T=i.apply(this,arguments);typeof T=="function";)T=T();return T}}}}),Ns=ze({"node_modules/probe-image-size/lib/common.js"(J){"use strict";var G=LB().Transform,p=GB();function b(){G.call(this,{readableObjectMode:!0})}b.prototype=Object.create(G.prototype),b.prototype.constructor=b,p(b.prototype),J.ParserStream=b,J.sliceEq=function(k,l,e){for(var t=l,n=0;n>16},J.readInt16BE=function(k,l){return J.readUInt16BE(k,l)<<16>>16},J.readUInt32LE=function(k,l){return(k[l]|k[l+1]<<8|k[l+2]<<16)+k[l+3]*16777216},J.readUInt32BE=function(k,l){return k[l]*16777216+(k[l+1]<<16|k[l+2]<<8|k[l+3])},J.readInt32LE=function(k,l){return J.readUInt32LE(k,l)|0},J.readInt32BE=function(k,l){return J.readUInt32BE(k,l)|0};function E(k,l,e){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=k,l&&(this.code=l),e&&(this.statusCode=e)}E.prototype=Object.create(Error.prototype),E.prototype.constructor=E,J.ProbeError=E}}),HB=ze({"node_modules/probe-image-size/lib/miaf_utils.js"(J,G){"use strict";var p=Ns().readUInt16BE,b=Ns().readUInt32BE;function E(o,s){if(o.length<4+s)return null;var c=b(o,s);return o.length>4&15,g=o[4]&15,f=o[5]>>4&15,v=p(o,6),m=8,i=0;iv.width||f.width===v.width&&f.height>v.height?f:v}),c=o.reduce(function(f,v){return f.height>v.height||f.height===v.height&&f.width>v.width?f:v}),g;return s.width>c.height||s.width===c.height&&s.height>c.width?g=s:g=c,g}G.exports.readSizeFromMeta=function(o){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(r(o,s),!!s.sizes.length){var c=a(s.sizes),g=1;s.transforms.forEach(function(v){var m={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},i={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(v.type==="imir"&&(v.value===0?g=i[g]:(g=i[g],g=m[g],g=m[g])),v.type==="irot")for(var T=0;T0&&!this.aborted;){var e=this.ifds_to_read.shift();e.offset&&this.scan_ifd(e.id,e.offset,k)}},E.prototype.read_uint16=function(k){var l=this.input;if(k+2>l.length)throw p("unexpected EOF","EBADDATA");return this.big_endian?l[k]*256+l[k+1]:l[k]+l[k+1]*256},E.prototype.read_uint32=function(k){var l=this.input;if(k+4>l.length)throw p("unexpected EOF","EBADDATA");return this.big_endian?l[k]*16777216+l[k+1]*65536+l[k+2]*256+l[k+3]:l[k]+l[k+1]*256+l[k+2]*65536+l[k+3]*16777216},E.prototype.is_subifd_link=function(k,l){return k===0&&l===34665||k===0&&l===34853||k===34665&&l===40965},E.prototype.exif_format_length=function(k){switch(k){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},E.prototype.exif_format_read=function(k,l){var e;switch(k){case 1:case 2:return e=this.input[l],e;case 6:return e=this.input[l],e|(e&128)*33554430;case 3:return e=this.read_uint16(l),e;case 8:return e=this.read_uint16(l),e|(e&32768)*131070;case 4:return e=this.read_uint32(l),e;case 9:return e=this.read_uint32(l),e|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},E.prototype.scan_ifd=function(k,l,e){var t=this.read_uint16(l);l+=2;for(var n=0;nthis.input.length)throw p("unexpected EOF","EBADDATA");for(var v=[],m=g,i=0;i0&&(this.ifds_to_read.push({id:r,offset:v[0]}),f=!0);var S={is_big_endian:this.big_endian,ifd:k,tag:r,format:a,count:o,entry_offset:l+this.start,data_length:c,data_offset:g+this.start,value:v,is_subifd_link:f};if(e(S)===!1){this.aborted=!0;return}l+=12}k===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(l)})},G.exports.ExifParser=E,G.exports.get_orientation=function(k){var l=0;try{return new E(k,0,k.length).each(function(e){if(e.ifd===0&&e.tag===274&&Array.isArray(e.value))return l=e.value[0],!1}),l}catch{return-1}}}}),WB=ze({"node_modules/probe-image-size/lib/parse_sync/avif.js"(J,G){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt32BE,k=HB(),l=Ub(),e=p("ftyp");G.exports=function(t){if(b(t,4,e)){var n=k.unbox(t,0);if(n){var r=k.getMimeType(n.data);if(r){for(var a,o=n.end;;){var s=k.unbox(t,o);if(!s)break;if(o=s.end,s.boxtype==="mdat")return;if(s.boxtype==="meta"){a=s.data;break}}if(a){var c=k.readSizeFromMeta(a);if(c){var g={width:c.width,height:c.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(c.variants.length>1&&(g.variants=c.variants),c.orientation&&(g.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=t.length){var f=E(t,c.exif_location.offset),v=t.slice(c.exif_location.offset+f+4,c.exif_location.offset+c.exif_location.length),m=l.get_orientation(v);m>0&&(g.orientation=m)}return g}}}}}}}}),YB=ze({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(J,G){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readInt16LE,k=Ns().readInt32LE,l=Ns().readUInt32LE,e=p("BM");G.exports=function(t){if(!(t.length<26)&&b(t,0,e)){var n,r,a=l(t,14);if(a===12)r=E(t,18),n=E(t,20);else if(a>12)r=k(t,18),n=k(t,22);else return;return{width:r,height:Math.abs(n),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}}),XB=ze({"node_modules/probe-image-size/lib/parse_sync/gif.js"(J,G){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt16LE,k=p("GIF87a"),l=p("GIF89a");G.exports=function(e){if(!(e.length<10)&&!(!b(e,0,k)&&!b(e,0,l)))return{width:E(e,6),height:E(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),ZB=ze({"node_modules/probe-image-size/lib/parse_sync/ico.js"(J,G){"use strict";var p=Ns().readUInt16LE,b=0,E=1,k=16;G.exports=function(l){var e=p(l,0),t=p(l,2),n=p(l,4);if(!(e!==b||t!==E||!n)&&!(l.length<6+n*k)){for(var r=[],a={width:0,height:0},o=0;oa.width||c>a.height)&&(a=g)}return{width:a.width,height:a.height,variants:r,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),$B=ze({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(J,G){"use strict";var p=Ns().readUInt16BE,b=Ns().str2arr,E=Ns().sliceEq,k=Ub(),l=b("Exif\0\0");G.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var n=e[t++],r;n===255;)n=e[t++];if(n>=208&&n<=217||n===1)r=0;else if(n>=192&&n<=254){if(e.length-t<2)return;r=p(e,t)-2,t+=2}else return;if(n===217||n===218)return;var a;if(n===225&&r>=10&&E(e,t,l)&&(a=k.get_orientation(e.slice(t+6,t+r))),r>=5&&n>=192&&n<=207&&n!==196&&n!==200&&n!==204){if(e.length-t0&&(o.orientation=a),o}t+=r}}}}),KB=ze({"node_modules/probe-image-size/lib/parse_sync/png.js"(J,G){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt32BE,k=p(`\x89PNG\r  -`),l=p("IHDR");V.exports=function(e){if(!(e.length<24)&&b(e,0,k)&&b(e,12,l))return{width:E(e,16),height:E(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),JB=ze({"node_modules/probe-image-size/lib/parse_sync/psd.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt32BE,k=p("8BPS\0");V.exports=function(l){if(!(l.length<22)&&b(l,0,k))return{width:E(l,18),height:E(l,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),QB=ze({"node_modules/probe-image-size/lib/parse_sync/svg.js"(J,V){"use strict";function p(s){return s===32||s===9||s===13||s===10}function b(s){return typeof s=="number"&&isFinite(s)&&s>0}function E(s){var c=0,m=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(c=3);c]*>/,l=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,e=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,n=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,r=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function a(s){var c=s.match(e),m=s.match(t),h=s.match(n);return{width:c&&(c[1]||c[2]),height:m&&(m[1]||m[2]),viewbox:h&&(h[1]||h[2])}}function o(s){return r.test(s)?s.match(r)[0]:"px"}V.exports=function(s){if(E(s)){for(var c="",m=0;m>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function a(o,s){return{width:(o[s+6]<<16|o[s+5]<<8|o[s+4])+1,height:(o[s+9]<<16|o[s+8]<<8|o[s+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}V.exports=function(o){if(!(o.length<16)&&!(!b(o,0,e)||!b(o,8,t))){var s=12,c=null,m=0,h=k(o,4)+8;if(!(h>o.length)){for(;s+8=10?c=c||n(o,s+8):v==="VP8L"&&g>=5?c=c||r(o,s+8):v==="VP8X"&&g>=10?c=c||a(o,s+8):v==="EXIF"&&(m=l.get_orientation(o.slice(s+8,s+8+g)),s=1/0),s+=8+g}if(c)return m>0&&(c.orientation=m),c}}}}}),rO=ze({"node_modules/probe-image-size/lib/parsers_sync.js"(J,V){"use strict";V.exports={avif:WB(),bmp:YB(),gif:XB(),ico:ZB(),jpeg:$B(),png:KB(),psd:JB(),svg:QB(),tiff:eO(),webp:tO()}}}),aO=ze({"node_modules/probe-image-size/sync.js"(J,V){"use strict";var p=rO();function b(E){for(var k=Object.keys(p),l=0;l0&&e.height>0?e:null}return null}V.exports=function(k){return b(k)},V.exports.parsers=p}}),nO=ze({"src/traces/image/helpers.js"(J){"use strict";var V=aO(),p=ip().IMAGE_URL_PREFIX,b=$v().Buffer;J.getImageSize=function(E){var k=E.replace(p,""),l=new b(k,"base64");return V(l)}}}),iO=ze({"src/traces/image/calc.js"(J,V){"use strict";var p=Nr(),b=ig(),E=ao(),k=Gi(),l=Nr().maxRowLength,e=nO().getImageSize;V.exports=function(o,s){var c,m;if(s._hasZ)c=s.z.length,m=l(s.z);else if(s._hasSource){var h=e(s.source);c=h.height,m=h.width}var v=k.getFromId(o,s.xaxis||"x"),g=k.getFromId(o,s.yaxis||"y"),i=v.d2c(s.x0)-s.dx/2,w=g.d2c(s.y0)-s.dy/2,S,M=[i,i+m*s.dx],C=[w,w+c*s.dy];if(v&&v.type==="log")for(S=0;S0;)z=c.c2p(C+B*u),B--;for(B=0;O===void 0&&B0;)D=m.c2p(_+B*A),B--;if(zG[0];if(X||K){var H=x+P/2,Y=O+j/2;ne+="transform:"+E(H+"px",Y+"px")+"scale("+(X?-1:1)+","+(K?-1:1)+")"+E(-H+"px",-Y+"px")+";"}}re.attr("style",ne);var q=new Promise(function(Z){if(w._hasZ)Z();else if(w._hasSource)if(w._canvas&&w._canvas.el.width===T&&w._canvas.el.height===f&&w._canvas.source===w.source)Z();else{var ee=document.createElement("canvas");ee.width=T,ee.height=f;var ae=ee.getContext("2d",{willReadFrequently:!0});w._image=w._image||new Image;var he=w._image;he.onload=function(){ae.drawImage(he,0,0),w._canvas={el:ee,source:w.source},Z()},he.setAttribute("src",w.source)}}).then(function(){var Z,ee;if(w._hasZ)ee=Q(function(xe,we){var Me=M[we][xe];return b.isTypedArray(Me)&&(Me=Array.from(Me)),Me}),Z=ee.toDataURL("image/png");else if(w._hasSource)if(S)Z=w.source;else{var ae=w._canvas.el.getContext("2d",{willReadFrequently:!0}),he=ae.getImageData(0,0,T,f).data;ee=Q(function(xe,we){var Me=4*(we*T+xe);return[he[Me],he[Me+1],he[Me+2],he[Me+3]]}),Z=ee.toDataURL("image/png")}re.attr({"xlink:href":Z,height:j,width:P,x,y:O})});r._promises.push(q)})}}}),sO=ze({"src/traces/image/style.js"(J,V){"use strict";var p=ci();V.exports=function(E){p.select(E).selectAll(".im image").style("opacity",function(k){return k[0].trace.opacity})}}}),lO=ze({"src/traces/image/hover.js"(J,V){"use strict";var p=Zl(),b=Nr(),E=b.isArrayOrTypedArray,k=ig();V.exports=function(e,t,n){var r=e.cd[0],a=r.trace,o=e.xa,s=e.ya;if(!(p.inbox(t-r.x0,t-(r.x0+r.w*a.dx),0)>0||p.inbox(n-r.y0,n-(r.y0+r.h*a.dy),0)>0)){var c=Math.floor((t-r.x0)/a.dx),m=Math.floor(Math.abs(n-r.y0)/a.dy),h;if(a._hasZ?h=r.z[m][c]:a._hasSource&&(h=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(c,m,1,1).data),!!h){var v=r.hi||a.hoverinfo,g;if(v){var i=v.split("+");i.indexOf("all")!==-1&&(i=["color"]),i.indexOf("color")!==-1&&(g=!0)}var w=k.colormodel[a.colormodel],S=w.colormodel||a.colormodel,M=S.length,C=a._scaler(h),_=w.suffix,T=[];(a.hovertemplate||g)&&(T.push("["+[C[0]+_[0],C[1]+_[1],C[2]+_[2]].join(", ")),M===4&&T.push(", "+C[3]+_[3]),T.push("]"),T=T.join(""),e.extraText=S.toUpperCase()+": "+T);var f;E(a.hovertext)&&E(a.hovertext[m])?f=a.hovertext[m][c]:E(a.text)&&E(a.text[m])&&(f=a.text[m][c]);var u=s.c2p(r.y0+(m+.5)*a.dy),A=r.x0+(c+.5)*a.dx,x=r.y0+(m+.5)*a.dy,z="["+h.slice(0,a.colormodel.length).join(", ")+"]";return[b.extendFlat(e,{index:[m,c],x0:o.c2p(r.x0+c*a.dx),x1:o.c2p(r.x0+(c+1)*a.dx),y0:u,y1:u,color:C,xVal:A,xLabelVal:A,yVal:x,yLabelVal:x,zLabelVal:z,text:f,hovertemplateLabels:{zLabel:z,colorLabel:T,"color[0]Label":C[0]+_[0],"color[1]Label":C[1]+_[1],"color[2]Label":C[2]+_[2],"color[3]Label":C[3]+_[3]}})]}}}}}),uO=ze({"src/traces/image/event_data.js"(J,V){"use strict";V.exports=function(b,E){return"xVal"in E&&(b.x=E.xVal),"yVal"in E&&(b.y=E.yVal),E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),b.color=E.color,b.colormodel=E.trace.colormodel,b.z||(b.z=E.color),b}}}),cO=ze({"src/traces/image/index.js"(J,V){"use strict";V.exports={attributes:(CT(),Po(Sb)).default,supplyDefaults:Gz(),calc:iO(),plot:oO(),style:sO(),hoverPoints:lO(),eventData:uO(),moduleType:"trace",name:"image",basePlotModule:Du(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),fO=ze({"lib/image.js"(J,V){"use strict";V.exports=cO()}}),t0=ze({"src/traces/pie/attributes.js"(J,V){"use strict";var p=ws(),b=Ml().attributes,E=Qs(),k=fc(),{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Ki().extendFlat,r=Uc().pattern,a=E({editType:"plot",arrayOk:!0,colorEditType:"plot"});V.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:k.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:r,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:n({},p.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:l({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:t(),texttemplate:e({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:t({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:n({},a,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:n({},a,{}),outsidetextfont:n({},a,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:n({},p.showlegend,{arrayOk:!0}),legend:n({},p.legend,{arrayOk:!0}),legendrank:n({},p.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:n({},a,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:b({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}}),r0=ze({"src/traces/pie/defaults.js"(J,V){"use strict";var p=ao(),b=Nr(),E=t0(),k=Ml().defaults,l=qh().handleText,e=Nr().coercePattern;function t(a,o){var s=b.isArrayOrTypedArray(a),c=b.isArrayOrTypedArray(o),m=Math.min(s?a.length:1/0,c?o.length:1/0);if(isFinite(m)||(m=0),m&&c){for(var h,v=0;v0){h=!0;break}}h||(m=0)}return{hasLabels:s,hasValues:c,len:m}}function n(a,o,s,c,m){var h=c("marker.line.width");h&&c("marker.line.color",m?void 0:s.paper_bgcolor);var v=c("marker.colors");e(c,"marker.pattern",v),a.marker&&!o.marker.pattern.fgcolor&&(o.marker.pattern.fgcolor=a.marker.colors),o.marker.pattern.bgcolor||(o.marker.pattern.bgcolor=s.paper_bgcolor)}function r(a,o,s,c){function m(x,z){return b.coerce(a,o,E,x,z)}var h=m("labels"),v=m("values"),g=t(h,v),i=g.len;if(o._hasLabels=g.hasLabels,o._hasValues=g.hasValues,!o._hasLabels&&o._hasValues&&(m("label0"),m("dlabel")),!i){o.visible=!1;return}o._length=i,n(a,o,c,m,!0),m("scalegroup");var w=m("text"),S=m("texttemplate");m("texttemplatefallback");var M;if(S||(M=m("textinfo",b.isArrayOrTypedArray(w)?"text+percent":"percent")),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),S||M&&M!=="none"){var C=m("textposition");l(a,o,c,m,C,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var _=Array.isArray(C)||C==="auto",T=_||C==="outside";T&&m("automargin"),(C==="inside"||C==="auto"||Array.isArray(C))&&m("insidetextorientation")}else M==="none"&&m("textposition","none");k(o,c,m);var f=m("hole"),u=m("title.text");if(u){var A=m("title.position",f?"middle center":"top center");!f&&A==="middle center"&&(o.title.position="top center"),b.coerceFont(m,"title.font",c.font)}m("sort"),m("direction"),m("rotation"),m("pull")}V.exports={handleLabelsAndValues:t,handleMarkerDefaults:n,supplyDefaults:r}}}),qb=ze({"src/traces/pie/layout_attributes.js"(J,V){"use strict";V.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),hO=ze({"src/traces/pie/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=qb();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("hiddenlabels"),e("piecolorway",l.colorway),e("extendpiecolors")}}}),ug=ze({"src/traces/pie/calc.js"(J,V){"use strict";var p=ao(),b=Qn(),E={};function k(n,r){var a=[],o=n._fullLayout,s=o.hiddenlabels||[],c=r.labels,m=r.marker.colors||[],h=r.values,v=r._length,g=r._hasValues&&v,i,w;if(r.dlabel)for(c=new Array(v),i=0;i=0});var x=r.type==="funnelarea"?_:r.sort;return x&&a.sort(function(z,I){return I.v-z.v}),a[0]&&(a[0].vTotal=C),a}function l(n){return function(a,o){if(!a||!b.isValid(a))return!1;let s=b.rgbaString(a);return n[o]||(n[o]=s),s}}function e(n,r){var a=(r||{}).type;a||(a="pie");var o=n._fullLayout,s=n.calcdata,c=o[a+"colorway"],m=o["_"+a+"colormap"];o["extend"+a+"colors"]&&(c=t(c,E));for(var h=0,v=0;v0&&(Be+=gt*le.pxmid[0],Xe+=gt*le.pxmid[1])}le.cxFinal=Be,le.cyFinal=Xe;function Tt(Ot,vt,ht,De){var Ne=De*(vt[0]-Ot[0]),We=De*(vt[1]-Ot[1]);return"a"+De*he.r+","+De*he.r+" 0 "+le.largeArc+(ht?" 1 ":" 0 ")+Ne+","+We}var At=xe.hole;if(le.v===he.vTotal){var $t="M"+(Be+le.px0[0])+","+(Xe+le.px0[1])+Tt(le.px0,le.pxmid,!0,1)+Tt(le.pxmid,le.px0,!0,1)+"Z";At?yt.attr("d","M"+(Be+At*le.px0[0])+","+(Xe+At*le.px0[1])+Tt(le.px0,le.pxmid,!1,At)+Tt(le.pxmid,le.px0,!1,At)+"Z"+$t):yt.attr("d",$t)}else{var rr=Tt(le.px0,le.px1,!0,1);if(At){var _r=1-At;yt.attr("d","M"+(Be+At*le.px1[0])+","+(Xe+At*le.px1[1])+Tt(le.px1,le.px0,!1,At)+"l"+_r*le.px0[0]+","+_r*le.px0[1]+rr+"Z")}else yt.attr("d","M"+Be+","+Xe+"l"+le.px0[0]+","+le.px0[1]+rr+"Z")}se(X,le,he);var Xt=m.castOption(xe.textposition,le.pts),or=Ye.selectAll("g.slicetext").data(le.text&&Xt!=="none"?[0]:[]);or.enter().append("g").classed("slicetext",!0),or.exit().remove(),or.each(function(){var Ot=e.ensureSingle(p.select(this),"text","",function(et){et.attr("data-notex",1)}),vt=e.ensureUniformFontSize(X,Xt==="outside"?S(xe,le,Y.font):M(xe,le,Y.font));Ot.text(le.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,vt).call(r.convertToTspans,X);var ht=l.bBox(Ot.node()),De;if(Xt==="outside")De=O(ht,le);else if(De=_(ht,le,he),Xt==="auto"&&De.scale<1){var Ne=e.ensureUniformFontSize(X,xe.outsidetextfont);Ot.call(l.font,Ne),ht=l.bBox(Ot.node()),De=O(ht,le)}var We=De.textPosAngle,Ke=We===void 0?le.pxmid:ne(he.r,We);if(De.targetX=Be+Ke[0]*De.rCenter+(De.x||0),De.targetY=Xe+Ke[1]*De.rCenter+(De.y||0),G(De,ht),De.outside){var Je=De.targetY;le.yLabelMin=Je-ht.height/2,le.yLabelMid=Je,le.yLabelMax=Je+ht.height/2,le.labelExtraX=0,le.labelExtraY=0,Se=!0}De.fontSize=vt.size,o(xe.type,De,Y),ee[Ae].transform=De,e.setTransormAndDisplay(Ot,De)})});var Ie=p.select(this).selectAll("g.titletext").data(xe.title.text?[0]:[]);if(Ie.enter().append("g").classed("titletext",!0),Ie.exit().remove(),Ie.each(function(){var le=e.ensureSingle(p.select(this),"text","",function(Xe){Xe.attr("data-notex",1)}),Ae=xe.title.text;xe._meta&&(Ae=e.templateString(Ae,xe._meta)),le.text(Ae).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,xe.title.font).call(r.convertToTspans,X);var Be;xe.title.position==="middle center"?Be=D(he):Be=B(he,q),le.attr("transform",n(Be.x,Be.y)+t(Math.min(1,Be.scale))+n(Be.tx,Be.ty))}),Se&&U(Me,xe),i(we,xe),Se&&xe.automargin){var Ve=l.bBox(ae.node()),Ge=xe.domain,ke=q.w*(Ge.x[1]-Ge.x[0]),_e=q.h*(Ge.y[1]-Ge.y[0]),ce=(.5*ke-he.r)/q.w,ve=(.5*_e-he.r)/q.h;b.autoMargin(X,"pie."+xe.uid+".automargin",{xl:Ge.x[0]-ce,xr:Ge.x[1]+ce,yb:Ge.y[0]-ve,yt:Ge.y[1]+ve,l:Math.max(he.cx-he.r-Ve.left,0),r:Math.max(Ve.right-(he.cx+he.r),0),b:Math.max(Ve.bottom-(he.cy+he.r),0),t:Math.max(he.cy-he.r-Ve.top,0),pad:5})}})});setTimeout(function(){Z.selectAll("tspan").each(function(){var ee=p.select(this);ee.attr("dy")&&ee.attr("dy",ee.attr("dy"))})},0)}function i(X,K){X.each(function(H){var Y=p.select(this);if(!H.labelExtraX&&!H.labelExtraY){Y.select("path.textline").remove();return}var q=Y.select("g.slicetext text");H.transform.targetX+=H.labelExtraX,H.transform.targetY+=H.labelExtraY,e.setTransormAndDisplay(q,H.transform);var Z=H.cxFinal+H.pxmid[0],ee=H.cyFinal+H.pxmid[1],ae="M"+Z+","+ee,he=(H.yLabelMax-H.yLabelMin)*(H.pxmid[0]<0?-1:1)/4;if(H.labelExtraX){var xe=H.labelExtraX*H.pxmid[1]/H.pxmid[0],we=H.yLabelMid+H.labelExtraY-(H.cyFinal+H.pxmid[1]);Math.abs(xe)>Math.abs(we)?ae+="l"+we*H.pxmid[0]/H.pxmid[1]+","+we+"H"+(Z+H.labelExtraX+he):ae+="l"+H.labelExtraX+","+xe+"v"+(we-xe)+"h"+he}else ae+="V"+(H.yLabelMid+H.labelExtraY)+"h"+he;e.ensureSingle(Y,"path","textline").call(k.stroke,K.outsidetextfont.color).attr({"stroke-width":Math.min(2,K.outsidetextfont.size/8),d:ae,fill:"none"})})}function w(X,K,H){var Y=H[0],q=Y.cx,Z=Y.cy,ee=Y.trace,ae=ee.type==="funnelarea";"_hasHoverLabel"in ee||(ee._hasHoverLabel=!1),"_hasHoverEvent"in ee||(ee._hasHoverEvent=!1),X.on("mouseover",function(he){var xe=K._fullLayout,we=K._fullData[ee.index];if(!(K._dragging||xe.hovermode===!1)){var Me=we.hoverinfo;if(Array.isArray(Me)&&(Me=E.castHoverinfo({hoverinfo:[m.castOption(Me,he.pts)],_module:ee._module},xe,0)),Me==="all"&&(Me="label+text+value+percent+name"),we.hovertemplate||Me!=="none"&&Me!=="skip"&&Me){var Se=he.rInscribed||0,Ie=q+he.pxmid[0]*(1-Se),Ve=Z+he.pxmid[1]*(1-Se),Ge=xe.separators,ke=[];if(Me&&Me.indexOf("label")!==-1&&ke.push(he.label),he.text=m.castOption(we.hovertext||we.text,he.pts),Me&&Me.indexOf("text")!==-1){var _e=he.text;e.isValidTextValue(_e)&&ke.push(_e)}he.value=he.v,he.valueLabel=m.formatPieValue(he.v,Ge),Me&&Me.indexOf("value")!==-1&&ke.push(he.valueLabel),he.percent=he.v/Y.vTotal,he.percentLabel=m.formatPiePercent(he.percent,Ge),Me&&Me.indexOf("percent")!==-1&&ke.push(he.percentLabel);var ce=we.hoverlabel,ve=ce.font,le=[];E.loneHover({trace:ee,x0:Ie-Se*Y.r,x1:Ie+Se*Y.r,y:Ve,_x0:ae?q+he.TL[0]:Ie-Se*Y.r,_x1:ae?q+he.TR[0]:Ie+Se*Y.r,_y0:ae?Z+he.TL[1]:Ve-Se*Y.r,_y1:ae?Z+he.BL[1]:Ve+Se*Y.r,text:ke.join("
"),name:we.hovertemplate||Me.indexOf("name")!==-1?we.name:void 0,idealAlign:he.pxmid[0]<0?"left":"right",color:m.castOption(ce.bgcolor,he.pts)||he.color,borderColor:m.castOption(ce.bordercolor,he.pts),fontFamily:m.castOption(ve.family,he.pts),fontSize:m.castOption(ve.size,he.pts),fontColor:m.castOption(ve.color,he.pts),nameLength:m.castOption(ce.namelength,he.pts),textAlign:m.castOption(ce.align,he.pts),hovertemplate:m.castOption(we.hovertemplate,he.pts),hovertemplateLabels:he,eventData:[h(he,we)]},{container:xe._hoverlayer.node(),outerContainer:xe._paper.node(),gd:K,inOut_bbox:le}),he.bbox=le[0],ee._hasHoverLabel=!0}ee._hasHoverEvent=!0,K.emit("plotly_hover",{points:[h(he,we)],event:p.event})}}),X.on("mouseout",function(he){var xe=K._fullLayout,we=K._fullData[ee.index],Me=p.select(this).datum();ee._hasHoverEvent&&(he.originalEvent=p.event,K.emit("plotly_unhover",{points:[h(Me,we)],event:p.event}),ee._hasHoverEvent=!1),ee._hasHoverLabel&&(E.loneUnhover(xe._hoverlayer.node()),ee._hasHoverLabel=!1)}),X.on("click",function(he){var xe=K._fullLayout,we=K._fullData[ee.index];K._dragging||xe.hovermode===!1||(K._hoverdata=[h(he,we)],E.click(K,p.event))})}function S(X,K,H){var Y=m.castOption(X.outsidetextfont.color,K.pts)||m.castOption(X.textfont.color,K.pts)||H.color,q=m.castOption(X.outsidetextfont.family,K.pts)||m.castOption(X.textfont.family,K.pts)||H.family,Z=m.castOption(X.outsidetextfont.size,K.pts)||m.castOption(X.textfont.size,K.pts)||H.size,ee=m.castOption(X.outsidetextfont.weight,K.pts)||m.castOption(X.textfont.weight,K.pts)||H.weight,ae=m.castOption(X.outsidetextfont.style,K.pts)||m.castOption(X.textfont.style,K.pts)||H.style,he=m.castOption(X.outsidetextfont.variant,K.pts)||m.castOption(X.textfont.variant,K.pts)||H.variant,xe=m.castOption(X.outsidetextfont.textcase,K.pts)||m.castOption(X.textfont.textcase,K.pts)||H.textcase,we=m.castOption(X.outsidetextfont.lineposition,K.pts)||m.castOption(X.textfont.lineposition,K.pts)||H.lineposition,Me=m.castOption(X.outsidetextfont.shadow,K.pts)||m.castOption(X.textfont.shadow,K.pts)||H.shadow;return{color:Y,family:q,size:Z,weight:ee,style:ae,variant:he,textcase:xe,lineposition:we,shadow:Me}}function M(X,K,H){var Y=m.castOption(X.insidetextfont.color,K.pts);!Y&&X._input.textfont&&(Y=m.castOption(X._input.textfont.color,K.pts));var q=m.castOption(X.insidetextfont.family,K.pts)||m.castOption(X.textfont.family,K.pts)||H.family,Z=m.castOption(X.insidetextfont.size,K.pts)||m.castOption(X.textfont.size,K.pts)||H.size,ee=m.castOption(X.insidetextfont.weight,K.pts)||m.castOption(X.textfont.weight,K.pts)||H.weight,ae=m.castOption(X.insidetextfont.style,K.pts)||m.castOption(X.textfont.style,K.pts)||H.style,he=m.castOption(X.insidetextfont.variant,K.pts)||m.castOption(X.textfont.variant,K.pts)||H.variant,xe=m.castOption(X.insidetextfont.textcase,K.pts)||m.castOption(X.textfont.textcase,K.pts)||H.textcase,we=m.castOption(X.insidetextfont.lineposition,K.pts)||m.castOption(X.textfont.lineposition,K.pts)||H.lineposition,Me=m.castOption(X.insidetextfont.shadow,K.pts)||m.castOption(X.textfont.shadow,K.pts)||H.shadow;return{color:Y||k.contrast(K.color),family:q,size:Z,weight:ee,style:ae,variant:he,textcase:xe,lineposition:we,shadow:Me}}function C(X,K){for(var H,Y,q=0;q=-4;ce-=2)_e(Math.PI*ce,"tan");for(ce=4;ce>=-4;ce-=2)_e(Math.PI*(ce+1),"tan")}if(Me||Ie){for(ce=4;ce>=-4;ce-=2)_e(Math.PI*(ce+1.5),"rad");for(ce=4;ce>=-4;ce-=2)_e(Math.PI*(ce+.5),"rad")}}if(ae||Ve||Me){var ve=Math.sqrt(X.width*X.width+X.height*X.height);if(ke={scale:q*Y*2/ve,rCenter:1-q,rotate:0},ke.textPosAngle=(K.startangle+K.stopangle)/2,ke.scale>=1)return ke;Ge.push(ke)}(Ve||Ie)&&(ke=f(X,Y,ee,he,xe),ke.textPosAngle=(K.startangle+K.stopangle)/2,Ge.push(ke)),(Ve||Se)&&(ke=u(X,Y,ee,he,xe),ke.textPosAngle=(K.startangle+K.stopangle)/2,Ge.push(ke));for(var le=0,Ae=0,Be=0;Be=1)break}return Ge[le]}function T(X,K){var H=X.startangle,Y=X.stopangle;return H>K&&K>Y||H0?1:-1)/2,y:Z/(1+H*H/(Y*Y)),outside:!0}}function D(X){var K=Math.sqrt(X.titleBox.width*X.titleBox.width+X.titleBox.height*X.titleBox.height);return{x:X.cx,y:X.cy,scale:X.trace.hole*X.r*2/K,tx:0,ty:-X.titleBox.height/2+X.trace.title.font.size}}function B(X,K){var H=1,Y=1,q,Z=X.trace,ee={x:X.cx,y:X.cy},ae={tx:0,ty:0};ae.ty+=Z.title.font.size,q=j(Z),Z.title.position.indexOf("top")!==-1?(ee.y-=(1+q)*X.r,ae.ty-=X.titleBox.height):Z.title.position.indexOf("bottom")!==-1&&(ee.y+=(1+q)*X.r);var he=F(X.r,X.trace.aspectratio),xe=K.w*(Z.domain.x[1]-Z.domain.x[0])/2;return Z.title.position.indexOf("left")!==-1?(xe=xe+he,ee.x-=(1+q)*he,ae.tx+=X.titleBox.width/2):Z.title.position.indexOf("center")!==-1?xe*=2:Z.title.position.indexOf("right")!==-1&&(xe=xe+he,ee.x+=(1+q)*he,ae.tx-=X.titleBox.width/2),H=xe/X.titleBox.width,Y=P(X,K)/X.titleBox.height,{x:ee.x,y:ee.y,scale:Math.min(H,Y),tx:ae.tx,ty:ae.ty}}function F(X,K){return X/(K===void 0?1:K)}function P(X,K){var H=X.trace,Y=K.h*(H.domain.y[1]-H.domain.y[0]);return Math.min(X.titleBox.height,Y/2)}function j(X){var K=X.pull;if(!K)return 0;var H;if(e.isArrayOrTypedArray(K))for(K=0,H=0;HK&&(K=X.pull[H]);return K}function U(X,K){var H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve;function Ge(ve,le){return ve.pxmid[1]-le.pxmid[1]}function ke(ve,le){return le.pxmid[1]-ve.pxmid[1]}function _e(ve,le){le||(le={});var Ae=le.labelExtraY+(Y?le.yLabelMax:le.yLabelMin),Be=Y?ve.yLabelMin:ve.yLabelMax,Xe=Y?ve.yLabelMax:ve.yLabelMin,Ye=ve.cyFinal+ee(ve.px0[1],ve.px1[1]),yt=Ae-Be,gt,Tt,At,$t,rr,_r;if(yt*he>0&&(ve.labelExtraY=yt),!!e.isArrayOrTypedArray(K.pull))for(Tt=0;Tt=(m.castOption(K.pull,At.pts)||0))&&((ve.pxmid[1]-At.pxmid[1])*he>0?($t=At.cyFinal+ee(At.px0[1],At.px1[1]),yt=$t-Be-ve.labelExtraY,yt*he>0&&(ve.labelExtraY+=yt)):(Xe+ve.labelExtraY-Ye)*he>0&&(gt=3*ae*Math.abs(Tt-Me.indexOf(ve)),rr=At.cxFinal+Z(At.px0[0],At.px1[0]),_r=rr+gt-(ve.cxFinal+ve.pxmid[0])-ve.labelExtraX,_r*ae>0&&(ve.labelExtraX+=_r)))}for(Y=0;Y<2;Y++)for(q=Y?Ge:ke,ee=Y?Math.max:Math.min,he=Y?1:-1,H=0;H<2;H++){for(Z=H?Math.max:Math.min,ae=H?1:-1,xe=X[Y][H],xe.sort(q),we=X[1-Y][H],Me=we.concat(xe),Ie=[],Se=0;Se1?(xe=H.r,we=xe/q.aspectratio):(we=H.r,xe=we*q.aspectratio),xe*=(1+q.baseratio)/2,he=xe*we}ee=Math.min(ee,he/H.vTotal)}for(Y=0;YK.vTotal/2?1:0,xe.halfangle=Math.PI*Math.min(xe.v/K.vTotal,.5),xe.ring=1-Y.hole,xe.rInscribed=I(xe,K))}function ne(X,K){return[X*Math.sin(K),-X*Math.cos(K)]}function se(X,K,H){var Y=X._fullLayout,q=H.trace,Z=q.texttemplate,ee=q.textinfo;if(!Z&&ee&&ee!=="none"){var ae=ee.split("+"),he=function(le){return ae.indexOf(le)!==-1},xe=he("label"),we=he("text"),Me=he("value"),Se=he("percent"),Ie=Y.separators,Ve;if(Ve=xe?[K.label]:[],we){var Ge=m.getFirstFilled(q.text,K.pts);v(Ge)&&Ve.push(Ge)}Me&&Ve.push(m.formatPieValue(K.v,Ie)),Se&&Ve.push(m.formatPiePercent(K.v/H.vTotal,Ie)),K.text=Ve.join("
")}function ke(le){return{label:le.label,value:le.v,valueLabel:m.formatPieValue(le.v,Y.separators),percent:le.v/H.vTotal,percentLabel:m.formatPiePercent(le.v/H.vTotal,Y.separators),color:le.color,text:le.text,customdata:e.castOption(q,le.i,"customdata")}}if(Z){var _e=e.castOption(q,K.i,"texttemplate");if(!_e)K.text="";else{var ce=ke(K),ve=m.getFirstFilled(q.text,K.pts);(v(ve)||ve==="")&&(ce.text=ve),K.text=e.texttemplateString({data:[ce,q._meta],fallback:q.texttemplatefallback,labels:ce,locale:X._fullLayout._d3locale,template:_e})}}}function G(X,K){var H=X.rotate*Math.PI/180,Y=Math.cos(H),q=Math.sin(H),Z=(K.left+K.right)/2,ee=(K.top+K.bottom)/2;X.textX=Z*Y-ee*q,X.textY=Z*q+ee*Y,X.noCenter=!0}V.exports={plot:g,formatSliceLabel:se,transformInsideText:_,determineInsideTextFont:M,positionTitleOutside:B,prerenderTitles:C,layoutAreas:$,attachFxHandlers:w,computeTransform:G}}}),pO=ze({"src/traces/pie/style.js"(J,V){"use strict";var p=ci(),b=Zm(),E=eh().resizeText;V.exports=function(l){var e=l._fullLayout._pielayer.selectAll(".trace");E(l,e,"pie"),e.each(function(t){var n=t[0],r=n.trace,a=p.select(this);a.style({opacity:r.opacity}),a.selectAll("path.surface").each(function(o){p.select(this).call(b,o,r,l)})})}}}),vO=ze({"src/traces/pie/base_plot.js"(J){"use strict";var V=cl();J.name="pie",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),mO=ze({"src/traces/pie/index.js"(J,V){"use strict";V.exports={attributes:t0(),supplyDefaults:r0().supplyDefaults,supplyLayoutDefaults:hO(),layoutAttributes:qb(),calc:ug().calc,crossTraceCalc:ug().crossTraceCalc,plot:Vb().plot,style:pO(),styleOne:Zm(),moduleType:"trace",name:"pie",basePlotModule:vO(),categories:["pie-like","pie","showLegend"],meta:{}}}}),gO=ze({"lib/pie.js"(J,V){"use strict";V.exports=mO()}}),yO=ze({"src/traces/sunburst/base_plot.js"(J){"use strict";var V=cl();J.name="sunburst",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),e6=ze({"src/traces/sunburst/constants.js"(J,V){"use strict";V.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),R1=ze({"src/traces/sunburst/attributes.js"(J,V){"use strict";var p=ws(),{hovertemplateAttrs:b,texttemplateAttrs:E,templatefallbackAttrs:k}=xs(),l=qs(),e=Ml().attributes,t=t0(),n=e6(),r=Ki().extendFlat,a=Uc().pattern;V.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:r({colors:{valType:"data_array",editType:"calc"},line:{color:r({},t.marker.line.color,{dflt:null}),width:r({},t.marker.line.width,{dflt:1}),editType:"calc"},pattern:a,editType:"calc"},l("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:t.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:E({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:k({editType:"plot"}),hovertext:t.hovertext,hoverinfo:r({},p.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:b({},{keys:n.eventDataKeys}),hovertemplatefallback:k(),textfont:t.textfont,insidetextorientation:t.insidetextorientation,insidetextfont:t.insidetextfont,outsidetextfont:r({},t.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:t.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}}}),t6=ze({"src/traces/sunburst/layout_attributes.js"(J,V){"use strict";V.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),_O=ze({"src/traces/sunburst/defaults.js"(J,V){"use strict";var p=Nr(),b=R1(),E=Ml().defaults,k=qh().handleText,l=r0().handleMarkerDefaults,e=fl(),t=e.hasColorscale,n=e.handleDefaults;V.exports=function(a,o,s,c){function m(M,C){return p.coerce(a,o,b,M,C)}var h=m("labels"),v=m("parents");if(!h||!h.length||!v||!v.length){o.visible=!1;return}var g=m("values");g&&g.length?m("branchvalues"):m("count"),m("level"),m("maxdepth"),l(a,o,c,m);var i=o._hasColorscale=t(a,"marker","colors")||(a.marker||{}).coloraxis;i&&n(a,o,c,m,{prefix:"marker.",cLetter:"c"}),m("leaf.opacity",i?1:.7);var w=m("text");m("texttemplate"),m("texttemplatefallback"),o.texttemplate||m("textinfo",p.isArrayOrTypedArray(w)?"text+label":"label"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback");var S="auto";k(a,o,c,m,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),m("insidetextorientation"),m("sort"),m("rotation"),m("root.color"),E(o,c,m),o._length=null}}}),xO=ze({"src/traces/sunburst/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=t6();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("sunburstcolorway",l.colorway),e("extendsunburstcolors")}}}),I1=ze({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(De,Ne){return De.parent===Ne.parent?1:2}function E(De){return De.reduce(k,0)/De.length}function k(De,Ne){return De+Ne.x}function l(De){return 1+De.reduce(e,0)}function e(De,Ne){return Math.max(De,Ne.y)}function t(De){for(var Ne;Ne=De.children;)De=Ne[0];return De}function n(De){for(var Ne;Ne=De.children;)De=Ne[Ne.length-1];return De}function r(){var De=b,Ne=1,We=1,Ke=!1;function Je(et){var Mt,pt=0;et.eachAfter(function(Ht){var Sr=Ht.children;Sr?(Ht.x=E(Sr),Ht.y=l(Sr)):(Ht.x=Mt?pt+=De(Ht,Mt):0,Ht.y=0,Mt=Ht)});var Pt=t(et),Ct=n(et),qt=Pt.x-De(Pt,Ct)/2,Vt=Ct.x+De(Ct,Pt)/2;return et.eachAfter(Ke?function(Ht){Ht.x=(Ht.x-et.x)*Ne,Ht.y=(et.y-Ht.y)*We}:function(Ht){Ht.x=(Ht.x-qt)/(Vt-qt)*Ne,Ht.y=(1-(et.y?Ht.y/et.y:1))*We})}return Je.separation=function(et){return arguments.length?(De=et,Je):De},Je.size=function(et){return arguments.length?(Ke=!1,Ne=+et[0],We=+et[1],Je):Ke?null:[Ne,We]},Je.nodeSize=function(et){return arguments.length?(Ke=!0,Ne=+et[0],We=+et[1],Je):Ke?[Ne,We]:null},Je}function a(De){var Ne=0,We=De.children,Ke=We&&We.length;if(!Ke)Ne=1;else for(;--Ke>=0;)Ne+=We[Ke].value;De.value=Ne}function o(){return this.eachAfter(a)}function s(De){var Ne=this,We,Ke=[Ne],Je,et,Mt;do for(We=Ke.reverse(),Ke=[];Ne=We.pop();)if(De(Ne),Je=Ne.children,Je)for(et=0,Mt=Je.length;et=0;--Je)We.push(Ke[Je]);return this}function m(De){for(var Ne=this,We=[Ne],Ke=[],Je,et,Mt;Ne=We.pop();)if(Ke.push(Ne),Je=Ne.children,Je)for(et=0,Mt=Je.length;et=0;)We+=Ke[Je].value;Ne.value=We})}function v(De){return this.eachBefore(function(Ne){Ne.children&&Ne.children.sort(De)})}function g(De){for(var Ne=this,We=i(Ne,De),Ke=[Ne];Ne!==We;)Ne=Ne.parent,Ke.push(Ne);for(var Je=Ke.length;De!==We;)Ke.splice(Je,0,De),De=De.parent;return Ke}function i(De,Ne){if(De===Ne)return De;var We=De.ancestors(),Ke=Ne.ancestors(),Je=null;for(De=We.pop(),Ne=Ke.pop();De===Ne;)Je=De,De=We.pop(),Ne=Ke.pop();return Je}function w(){for(var De=this,Ne=[De];De=De.parent;)Ne.push(De);return Ne}function S(){var De=[];return this.each(function(Ne){De.push(Ne)}),De}function M(){var De=[];return this.eachBefore(function(Ne){Ne.children||De.push(Ne)}),De}function C(){var De=this,Ne=[];return De.each(function(We){We!==De&&Ne.push({source:We.parent,target:We})}),Ne}function _(De,Ne){var We=new x(De),Ke=+De.value&&(We.value=De.value),Je,et=[We],Mt,pt,Pt,Ct;for(Ne==null&&(Ne=f);Je=et.pop();)if(Ke&&(Je.value=+Je.data.value),(pt=Ne(Je.data))&&(Ct=pt.length))for(Je.children=new Array(Ct),Pt=Ct-1;Pt>=0;--Pt)et.push(Mt=Je.children[Pt]=new x(pt[Pt])),Mt.parent=Je,Mt.depth=Je.depth+1;return We.eachBefore(A)}function T(){return _(this).eachBefore(u)}function f(De){return De.children}function u(De){De.data=De.data.data}function A(De){var Ne=0;do De.height=Ne;while((De=De.parent)&&De.height<++Ne)}function x(De){this.data=De,this.depth=this.height=0,this.parent=null}x.prototype=_.prototype={constructor:x,count:o,each:s,eachAfter:m,eachBefore:c,sum:h,sort:v,path:g,ancestors:w,descendants:S,leaves:M,links:C,copy:T};var z=Array.prototype.slice;function I(De){for(var Ne=De.length,We,Ke;Ne;)Ke=Math.random()*Ne--|0,We=De[Ne],De[Ne]=De[Ke],De[Ke]=We;return De}function O(De){for(var Ne=0,We=(De=I(z.call(De))).length,Ke=[],Je,et;Ne0&&We*We>Ke*Ke+Je*Je}function P(De,Ne){for(var We=0;WePt?(Je=(Ct+Pt-et)/(2*Ct),pt=Math.sqrt(Math.max(0,Pt/Ct-Je*Je)),We.x=De.x-Je*Ke-pt*Mt,We.y=De.y-Je*Mt+pt*Ke):(Je=(Ct+et-Pt)/(2*Ct),pt=Math.sqrt(Math.max(0,et/Ct-Je*Je)),We.x=Ne.x+Je*Ke-pt*Mt,We.y=Ne.y+Je*Mt+pt*Ke)):(We.x=Ne.x+We.r,We.y=Ne.y)}function ne(De,Ne){var We=De.r+Ne.r-1e-6,Ke=Ne.x-De.x,Je=Ne.y-De.y;return We>0&&We*We>Ke*Ke+Je*Je}function se(De){var Ne=De._,We=De.next._,Ke=Ne.r+We.r,Je=(Ne.x*We.r+We.x*Ne.r)/Ke,et=(Ne.y*We.r+We.y*Ne.r)/Ke;return Je*Je+et*et}function G(De){this._=De,this.next=null,this.previous=null}function X(De){if(!(Je=De.length))return 0;var Ne,We,Ke,Je,et,Mt,pt,Pt,Ct,qt,Vt;if(Ne=De[0],Ne.x=0,Ne.y=0,!(Je>1))return Ne.r;if(We=De[1],Ne.x=-We.r,We.x=Ne.r,We.y=0,!(Je>2))return Ne.r+We.r;re(We,Ne,Ke=De[2]),Ne=new G(Ne),We=new G(We),Ke=new G(Ke),Ne.next=Ke.previous=We,We.next=Ne.previous=Ke,Ke.next=We.previous=Ne;e:for(pt=3;pt0)throw new Error("cycle");return pt}return We.id=function(Ke){return arguments.length?(De=Y(Ke),We):De},We.parentId=function(Ke){return arguments.length?(Ne=Y(Ke),We):Ne},We}function le(De,Ne){return De.parent===Ne.parent?1:2}function Ae(De){var Ne=De.children;return Ne?Ne[0]:De.t}function Be(De){var Ne=De.children;return Ne?Ne[Ne.length-1]:De.t}function Xe(De,Ne,We){var Ke=We/(Ne.i-De.i);Ne.c-=Ke,Ne.s+=We,De.c+=Ke,Ne.z+=We,Ne.m+=We}function Ye(De){for(var Ne=0,We=0,Ke=De.children,Je=Ke.length,et;--Je>=0;)et=Ke[Je],et.z+=Ne,et.m+=Ne,Ne+=et.s+(We+=et.c)}function yt(De,Ne,We){return De.a.parent===Ne.parent?De.a:We}function gt(De,Ne){this._=De,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=Ne}gt.prototype=Object.create(x.prototype);function Tt(De){for(var Ne=new gt(De,0),We,Ke=[Ne],Je,et,Mt,pt;We=Ke.pop();)if(et=We._.children)for(We.children=new Array(pt=et.length),Mt=pt-1;Mt>=0;--Mt)Ke.push(Je=We.children[Mt]=new gt(et[Mt],Mt)),Je.parent=We;return(Ne.parent=new gt(null,0)).children=[Ne],Ne}function At(){var De=le,Ne=1,We=1,Ke=null;function Je(Ct){var qt=Tt(Ct);if(qt.eachAfter(et),qt.parent.m=-qt.z,qt.eachBefore(Mt),Ke)Ct.eachBefore(Pt);else{var Vt=Ct,Ht=Ct,Sr=Ct;Ct.eachBefore(function(ur){ur.xHt.x&&(Ht=ur),ur.depth>Sr.depth&&(Sr=ur)});var Kr=Vt===Ht?1:De(Vt,Ht)/2,Yt=Kr-Vt.x,Rt=Ne/(Ht.x+Kr+Yt),nr=We/(Sr.depth||1);Ct.eachBefore(function(ur){ur.x=(ur.x+Yt)*Rt,ur.y=ur.depth*nr})}return Ct}function et(Ct){var qt=Ct.children,Vt=Ct.parent.children,Ht=Ct.i?Vt[Ct.i-1]:null;if(qt){Ye(Ct);var Sr=(qt[0].z+qt[qt.length-1].z)/2;Ht?(Ct.z=Ht.z+De(Ct._,Ht._),Ct.m=Ct.z-Sr):Ct.z=Sr}else Ht&&(Ct.z=Ht.z+De(Ct._,Ht._));Ct.parent.A=pt(Ct,Ht,Ct.parent.A||Vt[0])}function Mt(Ct){Ct._.x=Ct.z+Ct.parent.m,Ct.m+=Ct.parent.m}function pt(Ct,qt,Vt){if(qt){for(var Ht=Ct,Sr=Ct,Kr=qt,Yt=Ht.parent.children[0],Rt=Ht.m,nr=Sr.m,ur=Kr.m,cr=Yt.m,Rr;Kr=Be(Kr),Ht=Ae(Ht),Kr&&Ht;)Yt=Ae(Yt),Sr=Be(Sr),Sr.a=Ct,Rr=Kr.z+ur-Ht.z-Rt+De(Kr._,Ht._),Rr>0&&(Xe(yt(Kr,Ct,Vt),Ct,Rr),Rt+=Rr,nr+=Rr),ur+=Kr.m,Rt+=Ht.m,cr+=Yt.m,nr+=Sr.m;Kr&&!Be(Sr)&&(Sr.t=Kr,Sr.m+=ur-nr),Ht&&!Ae(Yt)&&(Yt.t=Ht,Yt.m+=Rt-cr,Vt=Ct)}return Vt}function Pt(Ct){Ct.x*=Ne,Ct.y=Ct.depth*We}return Je.separation=function(Ct){return arguments.length?(De=Ct,Je):De},Je.size=function(Ct){return arguments.length?(Ke=!1,Ne=+Ct[0],We=+Ct[1],Je):Ke?null:[Ne,We]},Je.nodeSize=function(Ct){return arguments.length?(Ke=!0,Ne=+Ct[0],We=+Ct[1],Je):Ke?[Ne,We]:null},Je}function $t(De,Ne,We,Ke,Je){for(var et=De.children,Mt,pt=-1,Pt=et.length,Ct=De.value&&(Je-We)/De.value;++ptur&&(ur=Ct),Zr=Rt*Rt*Qr,cr=Math.max(ur/Zr,Zr/nr),cr>Rr){Rt-=Ct;break}Rr=cr}Mt.push(Pt={value:Rt,dice:Sr1?Ke:1)},We}(rr);function or(){var De=Xt,Ne=!1,We=1,Ke=1,Je=[0],et=q,Mt=q,pt=q,Pt=q,Ct=q;function qt(Ht){return Ht.x0=Ht.y0=0,Ht.x1=We,Ht.y1=Ke,Ht.eachBefore(Vt),Je=[0],Ne&&Ht.eachBefore(Me),Ht}function Vt(Ht){var Sr=Je[Ht.depth],Kr=Ht.x0+Sr,Yt=Ht.y0+Sr,Rt=Ht.x1-Sr,nr=Ht.y1-Sr;Rt=Ht-1){var ur=et[Vt];ur.x0=Kr,ur.y0=Yt,ur.x1=Rt,ur.y1=nr;return}for(var cr=Ct[Vt],Rr=Sr/2+cr,Qr=Vt+1,Zr=Ht-1;Qr>>1;Ct[ha]nr-Yt){var un=(Kr*La+Rt*Pa)/Sr;qt(Vt,Qr,Pa,Kr,Yt,un,nr),qt(Qr,Ht,La,un,Yt,Rt,nr)}else{var Xa=(Yt*La+nr*Pa)/Sr;qt(Vt,Qr,Pa,Kr,Yt,Rt,Xa),qt(Qr,Ht,La,Kr,Xa,Rt,nr)}}}function vt(De,Ne,We,Ke,Je){(De.depth&1?$t:Se)(De,Ne,We,Ke,Je)}var ht=function De(Ne){function We(Ke,Je,et,Mt,pt){if((Pt=Ke._squarify)&&Pt.ratio===Ne)for(var Pt,Ct,qt,Vt,Ht=-1,Sr,Kr=Pt.length,Yt=Ke.value;++Ht1?Ke:1)},We}(rr);p.cluster=r,p.hierarchy=_,p.pack=ae,p.packEnclose=O,p.packSiblings=K,p.partition=Ie,p.stratify=ve,p.tree=At,p.treemap=or,p.treemapBinary=Ot,p.treemapDice=Se,p.treemapResquarify=ht,p.treemapSlice=$t,p.treemapSliceDice=vt,p.treemapSquarify=Xt,Object.defineProperty(p,"__esModule",{value:!0})})}}),D1=ze({"src/traces/sunburst/calc.js"(J){"use strict";var V=I1(),p=ao(),b=Nr(),E=fl().makeColorScaleFuncFromTrace,k=ug().makePullColorFn,l=ug().generateExtendedColors,e=fl().calc,t=No().ALMOST_EQUAL,n={},r={},a={};J.calc=function(s,c){var m=s._fullLayout,h=c.ids,v=b.isArrayOrTypedArray(h),g=c.labels,i=c.parents,w=c.values,S=b.isArrayOrTypedArray(w),M=[],C={},_={},T=function(K,H){C[K]?C[K].push(H):C[K]=[H],_[H]=1},f=function(K){return K||typeof K=="number"},u=function(K){return!S||p(w[K])&&w[K]>=0},A,x,z;v?(A=Math.min(h.length,i.length),x=function(K){return f(h[K])&&u(K)},z=function(K){return String(h[K])}):(A=Math.min(g.length,i.length),x=function(K){return f(g[K])&&u(K)},z=function(K){return String(g[K])}),S&&(A=Math.min(A,w.length));for(var I=0;I1){for(var j=b.randstr(),U=0;U>8&15|V>>4&240,V>>4&15|V&240,(V&15)<<4|V&15,1):p===8?F1(V>>24&255,V>>16&255,V>>8&255,(V&255)/255):p===4?F1(V>>12&15|V>>8&240,V>>8&15|V>>4&240,V>>4&15|V&240,((V&15)<<4|V&15)/255):null):(V=f6.exec(J))?new ff(V[1],V[2],V[3],1):(V=h6.exec(J))?new ff(V[1]*255/100,V[2]*255/100,V[3]*255/100,1):(V=d6.exec(J))?F1(V[1],V[2],V[3],V[4]):(V=p6.exec(J))?F1(V[1]*255/100,V[2]*255/100,V[3]*255/100,V[4]):(V=v6.exec(J))?s6(V[1],V[2]/100,V[3]/100,1):(V=m6.exec(J))?s6(V[1],V[2]/100,V[3]/100,V[4]):Xb.hasOwnProperty(J)?n6(Xb[J]):J==="transparent"?new ff(NaN,NaN,NaN,0):null}function n6(J){return new ff(J>>16&255,J>>8&255,J&255,1)}function F1(J,V,p,b){return b<=0&&(J=V=p=NaN),new ff(J,V,p,b)}function Hb(J){return J instanceof sp||(J=fg(J)),J?(J=J.rgb(),new ff(J.r,J.g,J.b,J.opacity)):new ff}function z1(J,V,p,b){return arguments.length===1?Hb(J):new ff(J,V,p,b??1)}function ff(J,V,p,b){this.r=+J,this.g=+V,this.b=+p,this.opacity=+b}function i6(){return`#${pv(this.r)}${pv(this.g)}${pv(this.b)}`}function TO(){return`#${pv(this.r)}${pv(this.g)}${pv(this.b)}${pv((isNaN(this.opacity)?1:this.opacity)*255)}`}function o6(){let J=B1(this.opacity);return`${J===1?"rgb(":"rgba("}${dv(this.r)}, ${dv(this.g)}, ${dv(this.b)}${J===1?")":`, ${J})`}`}function B1(J){return isNaN(J)?1:Math.max(0,Math.min(1,J))}function dv(J){return Math.max(0,Math.min(255,Math.round(J)||0))}function pv(J){return J=dv(J),(J<16?"0":"")+J.toString(16)}function s6(J,V,p,b){return b<=0?J=V=p=NaN:p<=0||p>=1?J=V=NaN:V<=0&&(J=NaN),new ud(J,V,p,b)}function l6(J){if(J instanceof ud)return new ud(J.h,J.s,J.l,J.opacity);if(J instanceof sp||(J=fg(J)),!J)return new ud;if(J instanceof ud)return J;J=J.rgb();var V=J.r/255,p=J.g/255,b=J.b/255,E=Math.min(V,p,b),k=Math.max(V,p,b),l=NaN,e=k-E,t=(k+E)/2;return e?(V===k?l=(p-b)/e+(p0&&t<1?0:l,new ud(l,e,t,J.opacity)}function Wb(J,V,p,b){return arguments.length===1?l6(J):new ud(J,V,p,b??1)}function ud(J,V,p,b){this.h=+J,this.s=+V,this.l=+p,this.opacity=+b}function u6(J){return J=(J||0)%360,J<0?J+360:J}function O1(J){return Math.max(0,Math.min(1,J||0))}function Yb(J,V,p){return(J<60?V+(p-V)*J/60:J<180?p:J<240?V+(p-V)*(240-J)/60:V)*255}var lp,vv,mv,n0,cd,c6,f6,h6,d6,p6,v6,m6,Xb,Zb=zi({"node_modules/d3-color/src/color.js"(){Gb(),lp=.7,vv=1/lp,mv="\\s*([+-]?\\d+)\\s*",n0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",cd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",c6=/^#([0-9a-f]{3,8})$/,f6=new RegExp(`^rgb\\(${mv},${mv},${mv}\\)$`),h6=new RegExp(`^rgb\\(${cd},${cd},${cd}\\)$`),d6=new RegExp(`^rgba\\(${mv},${mv},${mv},${n0}\\)$`),p6=new RegExp(`^rgba\\(${cd},${cd},${cd},${n0}\\)$`),v6=new RegExp(`^hsl\\(${n0},${cd},${cd}\\)$`),m6=new RegExp(`^hsla\\(${n0},${cd},${cd},${n0}\\)$`),Xb={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},a0(sp,fg,{copy(J){return Object.assign(new this.constructor,this,J)},displayable(){return this.rgb().displayable()},hex:r6,formatHex:r6,formatHex8:bO,formatHsl:wO,formatRgb:a6,toString:a6}),a0(ff,z1,cg(sp,{brighter(J){return J=J==null?vv:Math.pow(vv,J),new ff(this.r*J,this.g*J,this.b*J,this.opacity)},darker(J){return J=J==null?lp:Math.pow(lp,J),new ff(this.r*J,this.g*J,this.b*J,this.opacity)},rgb(){return this},clamp(){return new ff(dv(this.r),dv(this.g),dv(this.b),B1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:i6,formatHex:i6,formatHex8:TO,formatRgb:o6,toString:o6})),a0(ud,Wb,cg(sp,{brighter(J){return J=J==null?vv:Math.pow(vv,J),new ud(this.h,this.s,this.l*J,this.opacity)},darker(J){return J=J==null?lp:Math.pow(lp,J),new ud(this.h,this.s,this.l*J,this.opacity)},rgb(){var J=this.h%360+(this.h<0)*360,V=isNaN(J)||isNaN(this.s)?0:this.s,p=this.l,b=p+(p<.5?p:1-p)*V,E=2*p-b;return new ff(Yb(J>=240?J-240:J+120,E,b),Yb(J,E,b),Yb(J<120?J+240:J-120,E,b),this.opacity)},clamp(){return new ud(u6(this.h),O1(this.s),O1(this.l),B1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let J=B1(this.opacity);return`${J===1?"hsl(":"hsla("}${u6(this.h)}, ${O1(this.s)*100}%, ${O1(this.l)*100}%${J===1?")":`, ${J})`}`}}))}}),$b,Kb,g6=zi({"node_modules/d3-color/src/math.js"(){$b=Math.PI/180,Kb=180/Math.PI}});function y6(J){if(J instanceof wd)return new wd(J.l,J.a,J.b,J.opacity);if(J instanceof Ud)return _6(J);J instanceof ff||(J=Hb(J));var V=r2(J.r),p=r2(J.g),b=r2(J.b),E=Qb((.2225045*V+.7168786*p+.0606169*b)/i2),k,l;return V===p&&p===b?k=l=E:(k=Qb((.4360747*V+.3850649*p+.1430804*b)/n2),l=Qb((.0139322*V+.0971045*p+.7141733*b)/o2)),new wd(116*E-16,500*(k-E),200*(E-l),J.opacity)}function Jb(J,V,p,b){return arguments.length===1?y6(J):new wd(J,V,p,b??1)}function wd(J,V,p,b){this.l=+J,this.a=+V,this.b=+p,this.opacity=+b}function Qb(J){return J>x6?Math.pow(J,.3333333333333333):J/l2+s2}function e2(J){return J>gv?J*J*J:l2*(J-s2)}function t2(J){return 255*(J<=.0031308?12.92*J:1.055*Math.pow(J,.4166666666666667)-.055)}function r2(J){return(J/=255)<=.04045?J/12.92:Math.pow((J+.055)/1.055,2.4)}function AO(J){if(J instanceof Ud)return new Ud(J.h,J.c,J.l,J.opacity);if(J instanceof wd||(J=y6(J)),J.a===0&&J.b===0)return new Ud(NaN,0=1?(p=1,V-1):Math.floor(p*V),E=J[b],k=J[b+1],l=b>0?J[b-1]:2*E-k,e=b()=>J}});function S6(J,V){return function(p){return J+p*V}}function kO(J,V,p){return J=Math.pow(J,p),V=Math.pow(V,p)-J,p=1/p,function(b){return Math.pow(J+b*V,p)}}function U1(J,V){var p=V-J;return p?S6(J,p>180||p<-180?p-360*Math.round(p/360):p):pg(isNaN(J)?V:J)}function CO(J){return(J=+J)==1?hf:function(V,p){return p-V?kO(V,p,J):pg(isNaN(V)?p:V)}}function hf(J,V){var p=V-J;return p?S6(J,p):pg(isNaN(J)?V:J)}var s0=zi({"node_modules/d3-interpolate/src/color.js"(){M6()}});function E6(J){return function(V){var p=V.length,b=new Array(p),E=new Array(p),k=new Array(p),l,e;for(l=0;lp&&(k=V.slice(p,k),e[l]?e[l]+=k:e[++l]=k),(b=b[0])===(E=E[0])?e[l]?e[l]+=E:e[++l]=E:(e[++l]=null,t.push({i:l,x:Td(b,E)})),p=H1.lastIndex;return p180?r+=360:r-n>180&&(n+=360),o.push({i:a.push(E(a)+"rotate(",null,b)-2,x:Td(n,r)})):r&&a.push(E(a)+"rotate("+r+b)}function e(n,r,a,o){n!==r?o.push({i:a.push(E(a)+"skewX(",null,b)-2,x:Td(n,r)}):r&&a.push(E(a)+"skewX("+r+b)}function t(n,r,a,o,s,c){if(n!==a||r!==o){var m=s.push(E(s)+"scale(",null,",",null,")");c.push({i:m-4,x:Td(n,a)},{i:m-2,x:Td(r,o)})}else(a!==1||o!==1)&&s.push(E(s)+"scale("+a+","+o+")")}return function(n,r){var a=[],o=[];return n=J(n),r=J(r),k(n.translateX,n.translateY,r.translateX,r.translateY,a,o),l(n.rotate,r.rotate,a,o),e(n.skewX,r.skewX,a,o),t(n.scaleX,n.scaleY,r.scaleX,r.scaleY,a,o),n=r=null,function(s){for(var c=-1,m=o.length,h;++cW1,interpolateArray:()=>LO,interpolateBasis:()=>w6,interpolateBasisClosed:()=>T6,interpolateCubehelix:()=>eA,interpolateCubehelixLong:()=>tA,interpolateDate:()=>D6,interpolateDiscrete:()=>IO,interpolateHcl:()=>K6,interpolateHclLong:()=>J6,interpolateHsl:()=>X6,interpolateHslLong:()=>Z6,interpolateHue:()=>FO,interpolateLab:()=>XO,interpolateNumber:()=>Td,interpolateNumberArray:()=>v2,interpolateObject:()=>z6,interpolateRgb:()=>q1,interpolateRgbBasis:()=>k6,interpolateRgbBasisClosed:()=>C6,interpolateRound:()=>BO,interpolateString:()=>O6,interpolateTransformCss:()=>q6,interpolateTransformSvg:()=>V6,interpolateZoom:()=>W6,piecewise:()=>JO,quantize:()=>eN});var l0=zi({"node_modules/d3-interpolate/src/index.js"(){Y1(),I6(),p2(),A6(),F6(),DO(),zO(),V1(),m2(),B6(),OO(),N6(),VO(),WO(),L6(),YO(),ZO(),$O(),KO(),QO(),tN()}}),y2=ze({"src/traces/sunburst/fill_one.js"(J,V){"use strict";var p=$i(),b=Qn();V.exports=function(k,l,e,t,n){var r=l.data.data,a=r.i,o=n||r.color;if(a>=0){l.i=r.i;var s=e.marker;s.pattern?(!s.colors||!s.pattern.shape)&&(s.color=o,l.color=o):(s.color=o,l.color=o),p.pointStyle(k,e,t,l)}else b.fill(k,o)}}}),rA=ze({"src/traces/sunburst/style.js"(J,V){"use strict";var p=ci(),b=Qn(),E=Nr(),k=eh().resizeText,l=y2();function e(n){var r=n._fullLayout._sunburstlayer.selectAll(".trace");k(n,r,"sunburst"),r.each(function(a){var o=p.select(this),s=a[0],c=s.trace;o.style("opacity",c.opacity),o.selectAll("path.surface").each(function(m){p.select(this).call(t,m,c,n)})})}function t(n,r,a,o){var s=r.data.data,c=!r.children,m=s.i,h=E.castOption(a,m,"marker.line.color")||b.defaultLine,v=E.castOption(a,m,"marker.line.width")||0;n.call(l,r,a,o).style("stroke-width",v).call(b.stroke,h).style("opacity",c?a.leaf.opacity:null)}V.exports={style:e,styleOne:t}}}),up=ze({"src/traces/sunburst/helpers.js"(J){"use strict";var V=Nr(),p=Qn(),b=gd(),E=lv();J.findEntryWithLevel=function(t,n){var r;return n&&t.eachAfter(function(a){if(J.getPtId(a)===n)return r=a.copy()}),r||t},J.findEntryWithChild=function(t,n){var r;return t.eachAfter(function(a){for(var o=a.children||[],s=0;s0)},J.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},J.isHeader=function(t,n){return!(J.isLeaf(t)||t.depth===n._maxDepth-1)};function e(t){return t.data.data.pid}J.getParent=function(t,n){return J.findEntryWithLevel(t,e(n))},J.listPath=function(t,n){var r=t.parent;if(!r)return[];var a=n?[r.data[n]]:[r];return J.listPath(r,n).concat(a)},J.getPath=function(t){return J.listPath(t,"label").join("/")+"/"},J.formatValue=E.formatPieValue,J.formatPercent=function(t,n){var r=V.formatPercent(t,0);return r==="0%"&&(r=E.formatPiePercent(t,n)),r}}}),$1=ze({"src/traces/sunburst/fx.js"(J,V){"use strict";var p=ci(),b=mi(),E=kh().appendArrayPointValue,k=Zl(),l=Nr(),e=Hm(),t=up(),n=lv(),r=n.formatPieValue;V.exports=function(s,c,m,h,v){var g=h[0],i=g.trace,w=g.hierarchy,S=i.type==="sunburst",M=i.type==="treemap"||i.type==="icicle";"_hasHoverLabel"in i||(i._hasHoverLabel=!1),"_hasHoverEvent"in i||(i._hasHoverEvent=!1);var C=function(f){var u=m._fullLayout;if(!(m._dragging||u.hovermode===!1)){var A=m._fullData[i.index],x=f.data.data,z=x.i,I=t.isHierarchyRoot(f),O=t.getParent(w,f),D=t.getValue(f),B=function(ee){return l.castOption(A,z,ee)},F=B("hovertemplate"),P=k.castHoverinfo(A,u,z),j=u.separators,U;if(F||P&&P!=="none"&&P!=="skip"){var $,Q;S&&($=g.cx+f.pxmid[0]*(1-f.rInscribed),Q=g.cy+f.pxmid[1]*(1-f.rInscribed)),M&&($=f._hoverX,Q=f._hoverY);var re={},ne=[],se=[],G=function(ee){return ne.indexOf(ee)!==-1};P&&(ne=P==="all"?A._module.attributes.hoverinfo.flags:P.split("+")),re.label=x.label,G("label")&&re.label&&se.push(re.label),x.hasOwnProperty("v")&&(re.value=x.v,re.valueLabel=r(re.value,j),G("value")&&se.push(re.valueLabel)),re.currentPath=f.currentPath=t.getPath(f.data),G("current path")&&!I&&se.push(re.currentPath);var X,K=[],H=function(){K.indexOf(X)===-1&&(se.push(X),K.push(X))};re.percentParent=f.percentParent=D/t.getValue(O),re.parent=f.parentString=t.getPtLabel(O),G("percent parent")&&(X=t.formatPercent(re.percentParent,j)+" of "+re.parent,H()),re.percentEntry=f.percentEntry=D/t.getValue(c),re.entry=f.entry=t.getPtLabel(c),G("percent entry")&&!I&&!f.onPathbar&&(X=t.formatPercent(re.percentEntry,j)+" of "+re.entry,H()),re.percentRoot=f.percentRoot=D/t.getValue(w),re.root=f.root=t.getPtLabel(w),G("percent root")&&!I&&(X=t.formatPercent(re.percentRoot,j)+" of "+re.root,H()),re.text=B("hovertext")||B("text"),G("text")&&(X=re.text,l.isValidTextValue(X)&&se.push(X)),U=[a(f,A,v.eventDataKeys)];var Y={trace:A,y:Q,_x0:f._x0,_x1:f._x1,_y0:f._y0,_y1:f._y1,text:se.join("
"),name:F||G("name")?A.name:void 0,color:B("hoverlabel.bgcolor")||x.color,borderColor:B("hoverlabel.bordercolor"),fontFamily:B("hoverlabel.font.family"),fontSize:B("hoverlabel.font.size"),fontColor:B("hoverlabel.font.color"),fontWeight:B("hoverlabel.font.weight"),fontStyle:B("hoverlabel.font.style"),fontVariant:B("hoverlabel.font.variant"),nameLength:B("hoverlabel.namelength"),textAlign:B("hoverlabel.align"),hovertemplate:F,hovertemplateLabels:re,eventData:U};S&&(Y.x0=$-f.rInscribed*f.rpx1,Y.x1=$+f.rInscribed*f.rpx1,Y.idealAlign=f.pxmid[0]<0?"left":"right"),M&&(Y.x=$,Y.idealAlign=$<0?"left":"right");var q=[];k.loneHover(Y,{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:m,inOut_bbox:q}),U[0].bbox=q[0],i._hasHoverLabel=!0}if(M){var Z=s.select("path.surface");v.styleOne(Z,f,A,m,{hovered:!0})}i._hasHoverEvent=!0,m.emit("plotly_hover",{points:U||[a(f,A,v.eventDataKeys)],event:p.event})}},_=function(f){var u=m._fullLayout,A=m._fullData[i.index],x=p.select(this).datum();if(i._hasHoverEvent&&(f.originalEvent=p.event,m.emit("plotly_unhover",{points:[a(x,A,v.eventDataKeys)],event:p.event}),i._hasHoverEvent=!1),i._hasHoverLabel&&(k.loneUnhover(u._hoverlayer.node()),i._hasHoverLabel=!1),M){var z=s.select("path.surface");v.styleOne(z,x,A,m,{hovered:!1})}},T=function(f){var u=m._fullLayout,A=m._fullData[i.index],x=S&&(t.isHierarchyRoot(f)||t.isLeaf(f)),z=t.getPtId(f),I=t.isEntry(f)?t.findEntryWithChild(w,z):t.findEntryWithLevel(w,z),O=t.getPtId(I),D={points:[a(f,A,v.eventDataKeys)],event:p.event};x||(D.nextLevel=O);var B=e.triggerHandler(m,"plotly_"+i.type+"click",D);if(B!==!1&&u.hovermode&&(m._hoverdata=[a(f,A,v.eventDataKeys)],k.click(m,p.event)),!x&&B!==!1&&!m._dragging&&!m._transitioning){b.call("_storeDirectGUIEdit",A,u._tracePreGUI[A.uid],{level:A.level});var F={data:[{level:O}],traces:[i.index]},P={frame:{redraw:!1,duration:v.transitionTime},transition:{duration:v.transitionTime,easing:v.transitionEasing},mode:"immediate",fromcurrent:!0};k.loneUnhover(u._hoverlayer.node()),b.call("animate",m,F,P)}};s.on("mouseover",C),s.on("mouseout",_),s.on("click",T)};function a(o,s,c){for(var m=o.data.data,h={curveNumber:s.index,pointNumber:m.i,data:s._input,fullData:s},v=0;vXe.x1?2*Math.PI:0)+ee;Ye=le.rpx1Ie?2*Math.PI:0)+ee;Be={x0:Ye,x1:Ye}}else Be={rpx0:ne,rpx1:ne},k.extendFlat(Be,ve(le));else Be={rpx0:0,rpx1:0};else Be={x0:ee,x1:ee};return b(Be,Xe)}function ce(le){var Ae=K[g.getPtId(le)],Be,Xe=le.transform;if(Ae)Be=Ae;else if(Be={rpx1:le.rpx1,transform:{textPosAngle:Xe.textPosAngle,scale:0,rotate:Xe.rotate,rCenter:Xe.rCenter,x:Xe.x,y:Xe.y}},X)if(le.parent)if(Ie){var Ye=le.x1>Ie?2*Math.PI:0;Be.x0=Be.x1=Ye}else k.extendFlat(Be,ve(le));else Be.x0=Be.x1=ee;else Be.x0=Be.x1=ee;var yt=b(Be.transform.textPosAngle,le.transform.textPosAngle),gt=b(Be.rpx1,le.rpx1),Tt=b(Be.x0,le.x0),At=b(Be.x1,le.x1),$t=b(Be.transform.scale,Xe.scale),rr=b(Be.transform.rotate,Xe.rotate),_r=Xe.rCenter===0?3:Be.transform.rCenter===0?1/3:1,Xt=b(Be.transform.rCenter,Xe.rCenter),or=function(Ot){return Xt(Math.pow(Ot,_r))};return function(Ot){var vt=gt(Ot),ht=Tt(Ot),De=At(Ot),Ne=or(Ot),We=xe(vt,(ht+De)/2),Ke=yt(Ot),Je={pxmid:We,rpx1:vt,transform:{textPosAngle:Ke,rCenter:Ne,x:Xe.x,y:Xe.y}};return t(B.type,Xe,x),{transform:{targetX:Me(Je),targetY:Se(Je),scale:$t(Ot),rotate:rr(Ot),rCenter:Ne}}}}function ve(le){var Ae=le.parent,Be=K[g.getPtId(Ae)],Xe={};if(Be){var Ye=Ae.children,yt=Ye.indexOf(le),gt=Ye.length,Tt=b(Be.x0,Be.x1);Xe.x0=Tt(yt/gt),Xe.x1=Tt(yt/gt)}else Xe.x0=Xe.x1=0;return Xe}}function w(_){return p.partition().size([2*Math.PI,_.height+1])(_)}J.formatSliceLabel=function(_,T,f,u,A){var x=f.texttemplate,z=f.textinfo;if(!x&&(!z||z==="none"))return"";var I=A.separators,O=u[0],D=_.data.data,B=O.hierarchy,F=g.isHierarchyRoot(_),P=g.getParent(B,_),j=g.getValue(_);if(!x){var U=z.split("+"),$=function(q){return U.indexOf(q)!==-1},Q=[],re;if($("label")&&D.label&&Q.push(D.label),D.hasOwnProperty("v")&&$("value")&&Q.push(g.formatValue(D.v,I)),!F){$("current path")&&Q.push(g.getPath(_.data));var ne=0;$("percent parent")&&ne++,$("percent entry")&&ne++,$("percent root")&&ne++;var se=ne>1;if(ne){var G,X=function(q){re=g.formatPercent(G,I),se&&(re+=" of "+q),Q.push(re)};$("percent parent")&&!F&&(G=j/g.getValue(P),X("parent")),$("percent entry")&&(G=j/g.getValue(T),X("entry")),$("percent root")&&(G=j/g.getValue(B),X("root"))}}return $("text")&&(re=k.castOption(f,D.i,"text"),k.isValidTextValue(re)&&Q.push(re)),Q.join("
")}var K=k.castOption(f,D.i,"texttemplate");if(!K)return"";var H={};D.label&&(H.label=D.label),D.hasOwnProperty("v")&&(H.value=D.v,H.valueLabel=g.formatValue(D.v,I)),H.currentPath=g.getPath(_.data),F||(H.percentParent=j/g.getValue(P),H.percentParentLabel=g.formatPercent(H.percentParent,I),H.parent=g.getPtLabel(P)),H.percentEntry=j/g.getValue(T),H.percentEntryLabel=g.formatPercent(H.percentEntry,I),H.entry=g.getPtLabel(T),H.percentRoot=j/g.getValue(B),H.percentRootLabel=g.formatPercent(H.percentRoot,I),H.root=g.getPtLabel(B),D.hasOwnProperty("color")&&(H.color=D.color);var Y=k.castOption(f,D.i,"text");return(k.isValidTextValue(Y)||Y==="")&&(H.text=Y),H.customdata=k.castOption(f,D.i,"customdata"),k.texttemplateString({data:[H,f._meta],fallback:f.texttemplatefallback,labels:H,locale:A._d3locale,template:K})};function S(_){return _.rpx0===0&&k.isFullCircle([_.x0,_.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(_.halfangle)),_.ring/2))}function M(_){return C(_.rpx1,_.transform.textPosAngle)}function C(_,T){return[_*Math.sin(T),-_*Math.cos(T)]}}}),rN=ze({"src/traces/sunburst/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"sunburst",basePlotModule:yO(),categories:[],animatable:!0,attributes:R1(),layoutAttributes:t6(),supplyDefaults:_O(),supplyLayoutDefaults:xO(),calc:D1().calc,crossTraceCalc:D1().crossTraceCalc,plot:_2().plot,style:rA().style,colorbar:Of(),meta:{}}}}),aN=ze({"lib/sunburst.js"(J,V){"use strict";V.exports=rN()}}),nN=ze({"src/traces/treemap/base_plot.js"(J){"use strict";var V=cl();J.name="treemap",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),u0=ze({"src/traces/treemap/constants.js"(J,V){"use strict";V.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),x2=ze({"src/traces/treemap/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=qs(),l=Ml().attributes,e=t0(),t=R1(),n=u0(),r=Ki().extendFlat,a=Uc().pattern;V.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:r({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:t.marker.colors,pattern:a,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:t.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},k("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:r({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:t.textinfo,texttemplate:b({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:p({},{keys:n.eventDataKeys}),hovertemplatefallback:E(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:r({},e.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:e.sort,root:t.root,domain:l({name:"treemap",trace:!0,editType:"calc"})}}}),aA=ze({"src/traces/treemap/layout_attributes.js"(J,V){"use strict";V.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),iN=ze({"src/traces/treemap/defaults.js"(J,V){"use strict";var p=Nr(),b=x2(),E=Qn(),k=Ml().defaults,l=qh().handleText,e=hv().TEXTPAD,t=r0().handleMarkerDefaults,n=fl(),r=n.hasColorscale,a=n.handleDefaults;V.exports=function(s,c,m,h){function v(A,x){return p.coerce(s,c,b,A,x)}var g=v("labels"),i=v("parents");if(!g||!g.length||!i||!i.length){c.visible=!1;return}var w=v("values");w&&w.length?v("branchvalues"):v("count"),v("level"),v("maxdepth");var S=v("tiling.packing");S==="squarify"&&v("tiling.squarifyratio"),v("tiling.flip"),v("tiling.pad");var M=v("text");v("texttemplate"),v("texttemplatefallback"),c.texttemplate||v("textinfo",p.isArrayOrTypedArray(M)?"text+label":"label"),v("hovertext"),v("hovertemplate"),v("hovertemplatefallback");var C=v("pathbar.visible"),_="auto";l(s,c,h,v,_,{hasPathbar:C,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),v("textposition");var T=c.textposition.indexOf("bottom")!==-1;t(s,c,h,v);var f=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;f?a(s,c,h,v,{prefix:"marker.",cLetter:"c"}):v("marker.depthfade",!(c.marker.colors||[]).length);var u=c.textfont.size*2;v("marker.pad.t",T?u/4:u),v("marker.pad.l",u/4),v("marker.pad.r",u/4),v("marker.pad.b",T?u:u/4),v("marker.cornerradius"),c._hovered={marker:{line:{width:2,color:E.contrast(h.paper_bgcolor)}}},C&&(v("pathbar.thickness",c.pathbar.textfont.size+2*e),v("pathbar.side"),v("pathbar.edgeshape")),v("sort"),v("root.color"),k(c,h,v),c._length=null}}}),oN=ze({"src/traces/treemap/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=aA();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("treemapcolorway",l.colorway),e("extendtreemapcolors")}}}),nA=ze({"src/traces/treemap/calc.js"(J){"use strict";var V=D1();J.calc=function(p,b){return V.calc(p,b)},J.crossTraceCalc=function(p){return V._runCrossTraceCalc("treemap",p)}}}),iA=ze({"src/traces/treemap/flip_tree.js"(J,V){"use strict";V.exports=function p(b,E,k){var l;k.swapXY&&(l=b.x0,b.x0=b.y0,b.y0=l,l=b.x1,b.x1=b.y1,b.y1=l),k.flipX&&(l=b.x0,b.x0=E[0]-b.x1,b.x1=E[0]-l),k.flipY&&(l=b.y0,b.y0=E[1]-b.y1,b.y1=E[1]-l);var e=b.children;if(e)for(var t=0;t0)for(var u=0;u").join(" ")||"";var se=b.ensureSingle(re,"g","slicetext"),G=b.ensureSingle(se,"text","",function(K){K.attr("data-notex",1)}),X=b.ensureUniformFontSize(s,n.determineTextFont(B,Q,O.font,{onPathbar:!0}));G.text(Q._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(E.font,X).call(k.convertToTspans,s),Q.textBB=E.bBox(G.node()),Q.transform=_(Q,{fontSize:X.size,onPathbar:!0}),Q.transform.fontSize=X.size,f?G.transition().attrTween("transform",function(K){var H=x(K,a,z,[i,w]);return function(Y){return T(H(Y))}}):G.attr("transform",T(Q))})}}}),lN=ze({"src/traces/treemap/plot_one.js"(J,V){"use strict";var p=ci(),b=(l0(),Po(_v)).interpolate,E=up(),k=Nr(),l=hv().TEXTPAD,e=Xv(),t=e.toMoveInsideBar,n=eh(),r=n.recordMinTextSize,a=u0(),o=sN();function s(c){return E.isHierarchyRoot(c)?"":E.getPtId(c)}V.exports=function(m,h,v,g,i){var w=m._fullLayout,S=h[0],M=S.trace,C=M.type,_=C==="icicle",T=S.hierarchy,f=E.findEntryWithLevel(T,M.level),u=p.select(v),A=u.selectAll("g.pathbar"),x=u.selectAll("g.slice");if(!f){A.remove(),x.remove();return}var z=E.isHierarchyRoot(f),I=!w.uniformtext.mode&&E.hasTransition(g),O=E.getMaxDepth(M),D=function(Xt){return Xt.data.depth-f.data.depth-1?j+Q:-($+Q):0,ne={x0:U,x1:U,y0:re,y1:re+$},se=function(Xt,or,Ot){var vt=M.tiling.pad,ht=function(Ke){return Ke-vt<=or.x0},De=function(Ke){return Ke+vt>=or.x1},Ne=function(Ke){return Ke-vt<=or.y0},We=function(Ke){return Ke+vt>=or.y1};return Xt.x0===or.x0&&Xt.x1===or.x1&&Xt.y0===or.y0&&Xt.y1===or.y1?{x0:Xt.x0,x1:Xt.x1,y0:Xt.y0,y1:Xt.y1}:{x0:ht(Xt.x0-vt)?0:De(Xt.x0-vt)?Ot[0]:Xt.x0,x1:ht(Xt.x1+vt)?0:De(Xt.x1+vt)?Ot[0]:Xt.x1,y0:Ne(Xt.y0-vt)?0:We(Xt.y0-vt)?Ot[1]:Xt.y0,y1:Ne(Xt.y1+vt)?0:We(Xt.y1+vt)?Ot[1]:Xt.y1}},G=null,X={},K={},H=null,Y=function(Xt,or){return or?X[s(Xt)]:K[s(Xt)]},q=function(Xt,or,Ot,vt){if(or)return X[s(T)]||ne;var ht=K[M.level]||Ot;return D(Xt)?se(Xt,ht,vt):{}};S.hasMultipleRoots&&z&&O++,M._maxDepth=O,M._backgroundColor=w.paper_bgcolor,M._entryDepth=f.data.depth,M._atRootLevel=z;var Z=-P/2+B.l+B.w*(F.x[1]+F.x[0])/2,ee=-j/2+B.t+B.h*(1-(F.y[1]+F.y[0])/2),ae=function(Xt){return Z+Xt},he=function(Xt){return ee+Xt},xe=he(0),we=ae(0),Me=function(Xt){return we+Xt},Se=function(Xt){return xe+Xt};function Ie(Xt,or){return Xt+","+or}var Ve=Me(0),Ge=function(Xt){Xt.x=Math.max(Ve,Xt.x)},ke=M.pathbar.edgeshape,_e=function(Xt){var or=Me(Math.max(Math.min(Xt.x0,Xt.x0),0)),Ot=Me(Math.min(Math.max(Xt.x1,Xt.x1),U)),vt=Se(Xt.y0),ht=Se(Xt.y1),De=$/2,Ne={},We={};Ne.x=or,We.x=Ot,Ne.y=We.y=(vt+ht)/2;var Ke={x:or,y:vt},Je={x:Ot,y:vt},et={x:Ot,y:ht},Mt={x:or,y:ht};return ke===">"?(Ke.x-=De,Je.x-=De,et.x-=De,Mt.x-=De):ke==="/"?(et.x-=De,Mt.x-=De,Ne.x-=De/2,We.x-=De/2):ke==="\\"?(Ke.x-=De,Je.x-=De,Ne.x-=De/2,We.x-=De/2):ke==="<"&&(Ne.x-=De,We.x-=De),Ge(Ke),Ge(Mt),Ge(Ne),Ge(Je),Ge(et),Ge(We),"M"+Ie(Ke.x,Ke.y)+"L"+Ie(Je.x,Je.y)+"L"+Ie(We.x,We.y)+"L"+Ie(et.x,et.y)+"L"+Ie(Mt.x,Mt.y)+"L"+Ie(Ne.x,Ne.y)+"Z"},ce=M[_?"tiling":"marker"].pad,ve=function(Xt){return M.textposition.indexOf(Xt)!==-1},le=ve("top"),Ae=ve("left"),Be=ve("right"),Xe=ve("bottom"),Ye=function(Xt){var or=ae(Xt.x0),Ot=ae(Xt.x1),vt=he(Xt.y0),ht=he(Xt.y1),De=Ot-or,Ne=ht-vt;if(!De||!Ne)return"";var We=M.marker.cornerradius||0,Ke=Math.min(We,De/2,Ne/2);Ke&&Xt.data&&Xt.data.data&&Xt.data.data.label&&(le&&(Ke=Math.min(Ke,ce.t)),Ae&&(Ke=Math.min(Ke,ce.l)),Be&&(Ke=Math.min(Ke,ce.r)),Xe&&(Ke=Math.min(Ke,ce.b)));var Je=function(et,Mt){return Ke?"a"+Ie(Ke,Ke)+" 0 0 1 "+Ie(et,Mt):""};return"M"+Ie(or,vt+Ke)+Je(Ke,-Ke)+"L"+Ie(Ot-Ke,vt)+Je(Ke,Ke)+"L"+Ie(Ot,ht-Ke)+Je(-Ke,Ke)+"L"+Ie(or+Ke,ht)+Je(-Ke,-Ke)+"Z"},yt=function(Xt,or){var Ot=Xt.x0,vt=Xt.x1,ht=Xt.y0,De=Xt.y1,Ne=Xt.textBB,We=le||or.isHeader&&!Xe,Ke=We?"start":Xe?"end":"middle",Je=ve("right"),et=ve("left")||or.onPathbar,Mt=et?-1:Je?1:0;if(or.isHeader){if(Ot+=(_?ce:ce.l)-l,vt-=(_?ce:ce.r)-l,Ot>=vt){var pt=(Ot+vt)/2;Ot=pt,vt=pt}var Pt;Xe?(Pt=De-(_?ce:ce.b),ht-1,flipY:F.tiling.flip.indexOf("y")>-1,pad:{inner:F.tiling.pad,top:F.marker.pad.t,left:F.marker.pad.l,right:F.marker.pad.r,bottom:F.marker.pad.b}}),re=Q.descendants(),ne=1/0,se=-1/0;re.forEach(function(Y){var q=Y.depth;q>=F._maxDepth?(Y.x0=Y.x1=(Y.x0+Y.x1)/2,Y.y0=Y.y1=(Y.y0+Y.y1)/2):(ne=Math.min(ne,q),se=Math.max(se,q))}),v=v.data(re,n.getPtId),F._maxVisibleLayers=isFinite(se)?se-ne+1:0,v.enter().append("g").classed("slice",!0),u(v,o,I,[i,w],C),v.order();var G=null;if(f&&z){var X=n.getPtId(z);v.each(function(Y){G===null&&n.getPtId(Y)===X&&(G={x0:Y.x0,x1:Y.x1,y0:Y.y0,y1:Y.y1})})}var K=function(){return G||{x0:0,x1:i,y0:0,y1:w}},H=v;return f&&(H=H.transition().each("end",function(){var Y=p.select(this);n.setSliceCursor(Y,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),H.each(function(Y){var q=n.isHeader(Y,F);Y._x0=S(Y.x0),Y._x1=S(Y.x1),Y._y0=M(Y.y0),Y._y1=M(Y.y1),Y._hoverX=S(Y.x1-F.marker.pad.r),Y._hoverY=M(U?Y.y1-F.marker.pad.b/2:Y.y0+F.marker.pad.t/2);var Z=p.select(this),ee=b.ensureSingle(Z,"path","surface",function(Se){Se.style("pointer-events",O?"none":"all")});f?ee.transition().attrTween("d",function(Se){var Ie=A(Se,o,K(),[i,w]);return function(Ve){return C(Ie(Ve))}}):ee.attr("d",C),Z.call(r,h,c,m,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(n.setSliceCursor,c,{isTransitioning:c._transitioning}),ee.call(e,Y,F,c,{hovered:!1}),Y.x0===Y.x1||Y.y0===Y.y1?Y._text="":q?Y._text=$?"":n.getPtLabel(Y)||"":Y._text=a(Y,h,F,m,D)||"";var ae=b.ensureSingle(Z,"g","slicetext"),he=b.ensureSingle(ae,"text","",function(Se){Se.attr("data-notex",1)}),xe=b.ensureUniformFontSize(c,n.determineTextFont(F,Y,D.font)),we=Y._text||" ",Me=q&&we.indexOf("
")===-1;he.text(we).classed("slicetext",!0).attr("text-anchor",j?"end":P||Me?"start":"middle").call(E.font,xe).call(k.convertToTspans,c),Y.textBB=E.bBox(he.node()),Y.transform=_(Y,{fontSize:xe.size,isHeader:q}),Y.transform.fontSize=xe.size,f?he.transition().attrTween("transform",function(Se){var Ie=x(Se,o,K(),[i,w]);return function(Ve){return T(Ie(Ve))}}):he.attr("transform",T(Y))}),G}}}),cN=ze({"src/traces/treemap/plot.js"(J,V){"use strict";var p=sA(),b=uN();V.exports=function(k,l,e,t){return p(k,l,e,t,{type:"treemap",drawDescendants:b})}}}),fN=ze({"src/traces/treemap/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"treemap",basePlotModule:nN(),categories:[],animatable:!0,attributes:x2(),layoutAttributes:aA(),supplyDefaults:iN(),supplyLayoutDefaults:oN(),calc:nA().calc,crossTraceCalc:nA().crossTraceCalc,plot:cN(),style:b2().style,colorbar:Of(),meta:{}}}}),hN=ze({"lib/treemap.js"(J,V){"use strict";V.exports=fN()}}),dN=ze({"src/traces/icicle/base_plot.js"(J){"use strict";var V=cl();J.name="icicle",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),lA=ze({"src/traces/icicle/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=qs(),l=Ml().attributes,e=t0(),t=R1(),n=x2(),r=u0(),a=Ki().extendFlat,o=Uc().pattern;V.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:n.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:a({colors:t.marker.colors,line:t.marker.line,pattern:o,editType:"calc"},k("marker",{colorAttr:"colors",anim:!1})),leaf:t.leaf,pathbar:n.pathbar,text:e.text,textinfo:t.textinfo,texttemplate:b({editType:"plot"},{keys:r.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:p({},{keys:r.eventDataKeys}),hovertemplatefallback:E(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:n.outsidetextfont,textposition:n.textposition,sort:e.sort,root:t.root,domain:l({name:"icicle",trace:!0,editType:"calc"})}}}),uA=ze({"src/traces/icicle/layout_attributes.js"(J,V){"use strict";V.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),pN=ze({"src/traces/icicle/defaults.js"(J,V){"use strict";var p=Nr(),b=lA(),E=Qn(),k=Ml().defaults,l=qh().handleText,e=hv().TEXTPAD,t=r0().handleMarkerDefaults,n=fl(),r=n.hasColorscale,a=n.handleDefaults;V.exports=function(s,c,m,h){function v(T,f){return p.coerce(s,c,b,T,f)}var g=v("labels"),i=v("parents");if(!g||!g.length||!i||!i.length){c.visible=!1;return}var w=v("values");w&&w.length?v("branchvalues"):v("count"),v("level"),v("maxdepth"),v("tiling.orientation"),v("tiling.flip"),v("tiling.pad");var S=v("text");v("texttemplate"),v("texttemplatefallback"),c.texttemplate||v("textinfo",p.isArrayOrTypedArray(S)?"text+label":"label"),v("hovertext"),v("hovertemplate"),v("hovertemplatefallback");var M=v("pathbar.visible"),C="auto";l(s,c,h,v,C,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),v("textposition"),t(s,c,h,v);var _=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;_&&a(s,c,h,v,{prefix:"marker.",cLetter:"c"}),v("leaf.opacity",_?1:.7),c._hovered={marker:{line:{width:2,color:E.contrast(h.paper_bgcolor)}}},M&&(v("pathbar.thickness",c.pathbar.textfont.size+2*e),v("pathbar.side"),v("pathbar.edgeshape")),v("sort"),v("root.color"),k(c,h,v),c._length=null}}}),vN=ze({"src/traces/icicle/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=uA();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("iciclecolorway",l.colorway),e("extendiciclecolors")}}}),cA=ze({"src/traces/icicle/calc.js"(J){"use strict";var V=D1();J.calc=function(p,b){return V.calc(p,b)},J.crossTraceCalc=function(p){return V._runCrossTraceCalc("icicle",p)}}}),mN=ze({"src/traces/icicle/partition.js"(J,V){"use strict";var p=I1(),b=iA();V.exports=function(k,l,e){var t=e.flipX,n=e.flipY,r=e.orientation==="h",a=e.maxDepth,o=l[0],s=l[1];a&&(o=(k.height+1)*l[0]/Math.min(k.height+1,a),s=(k.height+1)*l[1]/Math.min(k.height+1,a));var c=p.partition().padding(e.pad.inner).size(r?[l[1],o]:[l[0],s])(k);return(r||t||n)&&b(c,l,{swapXY:r,flipX:t,flipY:n}),c}}}),fA=ze({"src/traces/icicle/style.js"(J,V){"use strict";var p=ci(),b=Qn(),E=Nr(),k=eh().resizeText,l=y2();function e(n){var r=n._fullLayout._iciclelayer.selectAll(".trace");k(n,r,"icicle"),r.each(function(a){var o=p.select(this),s=a[0],c=s.trace;o.style("opacity",c.opacity),o.selectAll("path.surface").each(function(m){p.select(this).call(t,m,c,n)})})}function t(n,r,a,o){var s=r.data.data,c=!r.children,m=s.i,h=E.castOption(a,m,"marker.line.color")||b.defaultLine,v=E.castOption(a,m,"marker.line.width")||0;n.call(l,r,a,o).style("stroke-width",v).call(b.stroke,h).style("opacity",c?a.leaf.opacity:null)}V.exports={style:e,styleOne:t}}}),gN=ze({"src/traces/icicle/draw_descendants.js"(J,V){"use strict";var p=ci(),b=Nr(),E=$i(),k=Cs(),l=mN(),e=fA().styleOne,t=u0(),n=up(),r=$1(),a=_2().formatSliceLabel,o=!1;V.exports=function(c,m,h,v,g){var i=g.width,w=g.height,S=g.viewX,M=g.viewY,C=g.pathSlice,_=g.toMoveInsideSlice,T=g.strTransform,f=g.hasTransition,u=g.handleSlicesExit,A=g.makeUpdateSliceInterpolator,x=g.makeUpdateTextInterpolator,z=g.prevEntry,I={},O=c._context.staticPlot,D=c._fullLayout,B=m[0],F=B.trace,P=F.textposition.indexOf("left")!==-1,j=F.textposition.indexOf("right")!==-1,U=F.textposition.indexOf("bottom")!==-1,$=l(h,[i,w],{flipX:F.tiling.flip.indexOf("x")>-1,flipY:F.tiling.flip.indexOf("y")>-1,orientation:F.tiling.orientation,pad:{inner:F.tiling.pad},maxDepth:F._maxDepth}),Q=$.descendants(),re=1/0,ne=-1/0;Q.forEach(function(H){var Y=H.depth;Y>=F._maxDepth?(H.x0=H.x1=(H.x0+H.x1)/2,H.y0=H.y1=(H.y0+H.y1)/2):(re=Math.min(re,Y),ne=Math.max(ne,Y))}),v=v.data(Q,n.getPtId),F._maxVisibleLayers=isFinite(ne)?ne-re+1:0,v.enter().append("g").classed("slice",!0),u(v,o,I,[i,w],C),v.order();var se=null;if(f&&z){var G=n.getPtId(z);v.each(function(H){se===null&&n.getPtId(H)===G&&(se={x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1})})}var X=function(){return se||{x0:0,x1:i,y0:0,y1:w}},K=v;return f&&(K=K.transition().each("end",function(){var H=p.select(this);n.setSliceCursor(H,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),K.each(function(H){H._x0=S(H.x0),H._x1=S(H.x1),H._y0=M(H.y0),H._y1=M(H.y1),H._hoverX=S(H.x1-F.tiling.pad),H._hoverY=M(U?H.y1-F.tiling.pad/2:H.y0+F.tiling.pad/2);var Y=p.select(this),q=b.ensureSingle(Y,"path","surface",function(he){he.style("pointer-events",O?"none":"all")});f?q.transition().attrTween("d",function(he){var xe=A(he,o,X(),[i,w],{orientation:F.tiling.orientation,flipX:F.tiling.flip.indexOf("x")>-1,flipY:F.tiling.flip.indexOf("y")>-1});return function(we){return C(xe(we))}}):q.attr("d",C),Y.call(r,h,c,m,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(n.setSliceCursor,c,{isTransitioning:c._transitioning}),q.call(e,H,F,c,{hovered:!1}),H.x0===H.x1||H.y0===H.y1?H._text="":H._text=a(H,h,F,m,D)||"";var Z=b.ensureSingle(Y,"g","slicetext"),ee=b.ensureSingle(Z,"text","",function(he){he.attr("data-notex",1)}),ae=b.ensureUniformFontSize(c,n.determineTextFont(F,H,D.font));ee.text(H._text||" ").classed("slicetext",!0).attr("text-anchor",j?"end":P?"start":"middle").call(E.font,ae).call(k.convertToTspans,c),H.textBB=E.bBox(ee.node()),H.transform=_(H,{fontSize:ae.size}),H.transform.fontSize=ae.size,f?ee.transition().attrTween("transform",function(he){var xe=x(he,o,X(),[i,w]);return function(we){return T(xe(we))}}):ee.attr("transform",T(H))}),se}}}),yN=ze({"src/traces/icicle/plot.js"(J,V){"use strict";var p=sA(),b=gN();V.exports=function(k,l,e,t){return p(k,l,e,t,{type:"icicle",drawDescendants:b})}}}),_N=ze({"src/traces/icicle/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"icicle",basePlotModule:dN(),categories:[],animatable:!0,attributes:lA(),layoutAttributes:uA(),supplyDefaults:pN(),supplyLayoutDefaults:vN(),calc:cA().calc,crossTraceCalc:cA().crossTraceCalc,plot:yN(),style:fA().style,colorbar:Of(),meta:{}}}}),xN=ze({"lib/icicle.js"(J,V){"use strict";V.exports=_N()}}),bN=ze({"src/traces/funnelarea/base_plot.js"(J){"use strict";var V=cl();J.name="funnelarea",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),hA=ze({"src/traces/funnelarea/attributes.js"(J,V){"use strict";var p=t0(),b=ws(),E=Ml().attributes,{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=Ki().extendFlat;V.exports={labels:p.labels,label0:p.label0,dlabel:p.dlabel,values:p.values,marker:{colors:p.marker.colors,line:{color:t({},p.marker.line.color,{dflt:null}),width:t({},p.marker.line.width,{dflt:1}),editType:"calc"},pattern:p.marker.pattern,editType:"calc"},text:p.text,hovertext:p.hovertext,scalegroup:t({},p.scalegroup,{}),textinfo:t({},p.textinfo,{flags:["label","text","value","percent"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:e({editType:"plot"}),hoverinfo:t({},b.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:k({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:e(),textposition:t({},p.textposition,{values:["inside","none"],dflt:"inside"}),textfont:p.textfont,insidetextfont:p.insidetextfont,title:{text:p.title.text,font:p.title.font,position:t({},p.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:E({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}}}),dA=ze({"src/traces/funnelarea/layout_attributes.js"(J,V){"use strict";var p=qb().hiddenlabels;V.exports={hiddenlabels:p,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),wN=ze({"src/traces/funnelarea/defaults.js"(J,V){"use strict";var p=Nr(),b=hA(),E=Ml().defaults,k=qh().handleText,l=r0().handleLabelsAndValues,e=r0().handleMarkerDefaults;V.exports=function(n,r,a,o){function s(C,_){return p.coerce(n,r,b,C,_)}var c=s("labels"),m=s("values"),h=l(c,m),v=h.len;if(r._hasLabels=h.hasLabels,r._hasValues=h.hasValues,!r._hasLabels&&r._hasValues&&(s("label0"),s("dlabel")),!v){r.visible=!1;return}r._length=v,e(n,r,o,s),s("scalegroup");var g=s("text"),i=s("texttemplate");s("texttemplatefallback");var w;if(i||(w=s("textinfo",Array.isArray(g)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),i||w&&w!=="none"){var S=s("textposition");k(n,r,o,s,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else w==="none"&&s("textposition","none");E(r,o,s);var M=s("title.text");M&&(s("title.position"),p.coerceFont(s,"title.font",o.font)),s("aspectratio"),s("baseratio")}}}),TN=ze({"src/traces/funnelarea/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=dA();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("hiddenlabels"),e("funnelareacolorway",l.colorway),e("extendfunnelareacolors")}}}),pA=ze({"src/traces/funnelarea/calc.js"(J,V){"use strict";var p=ug();function b(k,l){return p.calc(k,l)}function E(k){p.crossTraceCalc(k,{type:"funnelarea"})}V.exports={calc:b,crossTraceCalc:E}}}),AN=ze({"src/traces/funnelarea/plot.js"(J,V){"use strict";var p=ci(),b=$i(),E=Nr(),k=E.strScale,l=E.strTranslate,e=Cs(),t=Xv(),n=t.toMoveInsideBar,r=eh(),a=r.recordMinTextSize,o=r.clearMinTextSize,s=lv(),c=Vb(),m=c.attachFxHandlers,h=c.determineInsideTextFont,v=c.layoutAreas,g=c.prerenderTitles,i=c.positionTitleOutside,w=c.formatSliceLabel;V.exports=function(T,f){var u=T._context.staticPlot,A=T._fullLayout;o("funnelarea",A),g(f,T),v(f,A._size),E.makeTraceGroups(A._funnelarealayer,f,"trace").each(function(x){var z=p.select(this),I=x[0],O=I.trace;C(x),z.each(function(){var D=p.select(this).selectAll("g.slice").data(x);D.enter().append("g").classed("slice",!0),D.exit().remove(),D.each(function(F,P){if(F.hidden){p.select(this).selectAll("path,g").remove();return}F.pointNumber=F.i,F.curveNumber=O.index;var j=I.cx,U=I.cy,$=p.select(this),Q=$.selectAll("path.surface").data([F]);Q.enter().append("path").classed("surface",!0).style({"pointer-events":u?"none":"all"}),$.call(m,T,x);var re="M"+(j+F.TR[0])+","+(U+F.TR[1])+S(F.TR,F.BR)+S(F.BR,F.BL)+S(F.BL,F.TL)+"Z";Q.attr("d",re),w(T,F,I);var ne=s.castOption(O.textposition,F.pts),se=$.selectAll("g.slicetext").data(F.text&&ne!=="none"?[0]:[]);se.enter().append("g").classed("slicetext",!0),se.exit().remove(),se.each(function(){var G=E.ensureSingle(p.select(this),"text","",function(ae){ae.attr("data-notex",1)}),X=E.ensureUniformFontSize(T,h(O,F,A.font));G.text(F.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(b.font,X).call(e.convertToTspans,T);var K=b.bBox(G.node()),H,Y,q,Z=Math.min(F.BL[1],F.BR[1])+U,ee=Math.max(F.TL[1],F.TR[1])+U;Y=Math.max(F.TL[0],F.BL[0])+j,q=Math.min(F.TR[0],F.BR[0])+j,H=n(Y,q,Z,ee,K,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),H.fontSize=X.size,a(O.type,H,A),x[P].transform=H,E.setTransormAndDisplay(G,H)})});var B=p.select(this).selectAll("g.titletext").data(O.title.text?[0]:[]);B.enter().append("g").classed("titletext",!0),B.exit().remove(),B.each(function(){var F=E.ensureSingle(p.select(this),"text","",function(U){U.attr("data-notex",1)}),P=O.title.text;O._meta&&(P=E.templateString(P,O._meta)),F.text(P).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(b.font,O.title.font).call(e.convertToTspans,T);var j=i(I,A._size);F.attr("transform",l(j.x,j.y)+k(Math.min(1,j.scale))+l(j.tx,j.ty))})})})};function S(_,T){var f=T[0]-_[0],u=T[1]-_[1];return"l"+f+","+u}function M(_,T){return[.5*(_[0]+T[0]),.5*(_[1]+T[1])]}function C(_){if(!_.length)return;var T=_[0],f=T.trace,u=f.aspectratio,A=f.baseratio;A>.999&&(A=.999);var x=Math.pow(A,2),z=T.vTotal,I=z*x/(1-x),O=z,D=I/z;function B(){var he=Math.sqrt(D);return{x:he,y:-he}}function F(){var he=B();return[he.x,he.y]}var P,j=[];j.push(F());var U,$;for(U=_.length-1;U>-1;U--)if($=_[U],!$.hidden){var Q=$.v/O;D+=Q,j.push(F())}var re=1/0,ne=-1/0;for(U=0;U-1;U--)if($=_[U],!$.hidden){Z+=1;var ee=j[Z][0],ae=j[Z][1];$.TL=[-ee,ae],$.TR=[ee,ae],$.BL=Y,$.BR=q,$.pxmid=M($.TR,$.BR),Y=$.TL,q=$.TR}}}}),MN=ze({"src/traces/funnelarea/style.js"(J,V){"use strict";var p=ci(),b=Zm(),E=eh().resizeText;V.exports=function(l){var e=l._fullLayout._funnelarealayer.selectAll(".trace");E(l,e,"funnelarea"),e.each(function(t){var n=t[0],r=n.trace,a=p.select(this);a.style({opacity:r.opacity}),a.selectAll("path.surface").each(function(o){p.select(this).call(b,o,r,l)})})}}}),SN=ze({"src/traces/funnelarea/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"funnelarea",basePlotModule:bN(),categories:["pie-like","funnelarea","showLegend"],attributes:hA(),layoutAttributes:dA(),supplyDefaults:wN(),supplyLayoutDefaults:TN(),calc:pA().calc,crossTraceCalc:pA().crossTraceCalc,plot:AN(),style:MN(),styleOne:Zm(),meta:{}}}}),EN=ze({"lib/funnelarea.js"(J,V){"use strict";V.exports=SN()}}),df=ze({"stackgl_modules/index.js"(J,V){"use strict";(function(){var p={1964:function(l,e,t){l.exports={alpha_shape:t(3502),convex_hull:t(7352),delaunay_triangulate:t(7642),gl_cone3d:t(6405),gl_error3d:t(9165),gl_line3d:t(5714),gl_mesh3d:t(7201),gl_plot3d:t(4100),gl_scatter3d:t(8418),gl_streamtube3d:t(7815),gl_surface3d:t(9499),ndarray:t(9618),ndarray_linear_interpolate:t(4317)}},4793:function(l,e,t){"use strict";var n,r=t(7507),a=t(3778),o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=h,n=u,e.IS=50;var s=2147483647;n=s,h.TYPED_ARRAY_SUPPORT=c(),!h.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{var ke=new Uint8Array(1),_e={foo:function(){return 42}};return Object.setPrototypeOf(_e,Uint8Array.prototype),Object.setPrototypeOf(ke,_e),ke.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function m(ke){if(ke>s)throw new RangeError('The value "'+ke+'" is invalid for option "size"');var _e=new Uint8Array(ke);return Object.setPrototypeOf(_e,h.prototype),_e}function h(ke,_e,ce){if(typeof ke=="number"){if(typeof _e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(ke)}return v(ke,_e,ce)}h.poolSize=8192;function v(ke,_e,ce){if(typeof ke=="string")return S(ke,_e);if(ArrayBuffer.isView(ke))return C(ke);if(ke==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke);if(Ie(ke,ArrayBuffer)||ke&&Ie(ke.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(ke,SharedArrayBuffer)||ke&&Ie(ke.buffer,SharedArrayBuffer)))return _(ke,_e,ce);if(typeof ke=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ve=ke.valueOf&&ke.valueOf();if(ve!=null&&ve!==ke)return h.from(ve,_e,ce);var le=T(ke);if(le)return le;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ke[Symbol.toPrimitive]=="function")return h.from(ke[Symbol.toPrimitive]("string"),_e,ce);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke)}h.from=function(ke,_e,ce){return v(ke,_e,ce)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array);function g(ke){if(typeof ke!="number")throw new TypeError('"size" argument must be of type number');if(ke<0)throw new RangeError('The value "'+ke+'" is invalid for option "size"')}function i(ke,_e,ce){return g(ke),ke<=0?m(ke):_e!==void 0?typeof ce=="string"?m(ke).fill(_e,ce):m(ke).fill(_e):m(ke)}h.alloc=function(ke,_e,ce){return i(ke,_e,ce)};function w(ke){return g(ke),m(ke<0?0:f(ke)|0)}h.allocUnsafe=function(ke){return w(ke)},h.allocUnsafeSlow=function(ke){return w(ke)};function S(ke,_e){if((typeof _e!="string"||_e==="")&&(_e="utf8"),!h.isEncoding(_e))throw new TypeError("Unknown encoding: "+_e);var ce=A(ke,_e)|0,ve=m(ce),le=ve.write(ke,_e);return le!==ce&&(ve=ve.slice(0,le)),ve}function M(ke){for(var _e=ke.length<0?0:f(ke.length)|0,ce=m(_e),ve=0;ve<_e;ve+=1)ce[ve]=ke[ve]&255;return ce}function C(ke){if(Ie(ke,Uint8Array)){var _e=new Uint8Array(ke);return _(_e.buffer,_e.byteOffset,_e.byteLength)}return M(ke)}function _(ke,_e,ce){if(_e<0||ke.byteLength<_e)throw new RangeError('"offset" is outside of buffer bounds');if(ke.byteLength<_e+(ce||0))throw new RangeError('"length" is outside of buffer bounds');var ve;return _e===void 0&&ce===void 0?ve=new Uint8Array(ke):ce===void 0?ve=new Uint8Array(ke,_e):ve=new Uint8Array(ke,_e,ce),Object.setPrototypeOf(ve,h.prototype),ve}function T(ke){if(h.isBuffer(ke)){var _e=f(ke.length)|0,ce=m(_e);return ce.length===0||ke.copy(ce,0,0,_e),ce}if(ke.length!==void 0)return typeof ke.length!="number"||Ve(ke.length)?m(0):M(ke);if(ke.type==="Buffer"&&Array.isArray(ke.data))return M(ke.data)}function f(ke){if(ke>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return ke|0}function u(ke){return+ke!=ke&&(ke=0),h.alloc(+ke)}h.isBuffer=function(_e){return _e!=null&&_e._isBuffer===!0&&_e!==h.prototype},h.compare=function(_e,ce){if(Ie(_e,Uint8Array)&&(_e=h.from(_e,_e.offset,_e.byteLength)),Ie(ce,Uint8Array)&&(ce=h.from(ce,ce.offset,ce.byteLength)),!h.isBuffer(_e)||!h.isBuffer(ce))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(_e===ce)return 0;for(var ve=_e.length,le=ce.length,Ae=0,Be=Math.min(ve,le);Aele.length?h.from(Be).copy(le,Ae):Uint8Array.prototype.set.call(le,Be,Ae);else if(h.isBuffer(Be))Be.copy(le,Ae);else throw new TypeError('"list" argument must be an Array of Buffers');Ae+=Be.length}return le};function A(ke,_e){if(h.isBuffer(ke))return ke.length;if(ArrayBuffer.isView(ke)||Ie(ke,ArrayBuffer))return ke.byteLength;if(typeof ke!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ke);var ce=ke.length,ve=arguments.length>2&&arguments[2]===!0;if(!ve&&ce===0)return 0;for(var le=!1;;)switch(_e){case"ascii":case"latin1":case"binary":return ce;case"utf8":case"utf-8":return he(ke).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce*2;case"hex":return ce>>>1;case"base64":return Me(ke).length;default:if(le)return ve?-1:he(ke).length;_e=(""+_e).toLowerCase(),le=!0}}h.byteLength=A;function x(ke,_e,ce){var ve=!1;if((_e===void 0||_e<0)&&(_e=0),_e>this.length||((ce===void 0||ce>this.length)&&(ce=this.length),ce<=0)||(ce>>>=0,_e>>>=0,ce<=_e))return"";for(ke||(ke="utf8");;)switch(ke){case"hex":return G(this,_e,ce);case"utf8":case"utf-8":return $(this,_e,ce);case"ascii":return ne(this,_e,ce);case"latin1":case"binary":return se(this,_e,ce);case"base64":return U(this,_e,ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,_e,ce);default:if(ve)throw new TypeError("Unknown encoding: "+ke);ke=(ke+"").toLowerCase(),ve=!0}}h.prototype._isBuffer=!0;function z(ke,_e,ce){var ve=ke[_e];ke[_e]=ke[ce],ke[ce]=ve}h.prototype.swap16=function(){var _e=this.length;if(_e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ce=0;ce<_e;ce+=2)z(this,ce,ce+1);return this},h.prototype.swap32=function(){var _e=this.length;if(_e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var ce=0;ce<_e;ce+=4)z(this,ce,ce+3),z(this,ce+1,ce+2);return this},h.prototype.swap64=function(){var _e=this.length;if(_e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var ce=0;ce<_e;ce+=8)z(this,ce,ce+7),z(this,ce+1,ce+6),z(this,ce+2,ce+5),z(this,ce+3,ce+4);return this},h.prototype.toString=function(){var _e=this.length;return _e===0?"":arguments.length===0?$(this,0,_e):x.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(_e){if(!h.isBuffer(_e))throw new TypeError("Argument must be a Buffer");return this===_e?!0:h.compare(this,_e)===0},h.prototype.inspect=function(){var _e="",ce=e.IS;return _e=this.toString("hex",0,ce).replace(/(.{2})/g,"$1 ").trim(),this.length>ce&&(_e+=" ... "),""},o&&(h.prototype[o]=h.prototype.inspect),h.prototype.compare=function(_e,ce,ve,le,Ae){if(Ie(_e,Uint8Array)&&(_e=h.from(_e,_e.offset,_e.byteLength)),!h.isBuffer(_e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof _e);if(ce===void 0&&(ce=0),ve===void 0&&(ve=_e?_e.length:0),le===void 0&&(le=0),Ae===void 0&&(Ae=this.length),ce<0||ve>_e.length||le<0||Ae>this.length)throw new RangeError("out of range index");if(le>=Ae&&ce>=ve)return 0;if(le>=Ae)return-1;if(ce>=ve)return 1;if(ce>>>=0,ve>>>=0,le>>>=0,Ae>>>=0,this===_e)return 0;for(var Be=Ae-le,Xe=ve-ce,Ye=Math.min(Be,Xe),yt=this.slice(le,Ae),gt=_e.slice(ce,ve),Tt=0;Tt2147483647?ce=2147483647:ce<-2147483648&&(ce=-2147483648),ce=+ce,Ve(ce)&&(ce=le?0:ke.length-1),ce<0&&(ce=ke.length+ce),ce>=ke.length){if(le)return-1;ce=ke.length-1}else if(ce<0)if(le)ce=0;else return-1;if(typeof _e=="string"&&(_e=h.from(_e,ve)),h.isBuffer(_e))return _e.length===0?-1:O(ke,_e,ce,ve,le);if(typeof _e=="number")return _e=_e&255,typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(ke,_e,ce):Uint8Array.prototype.lastIndexOf.call(ke,_e,ce):O(ke,[_e],ce,ve,le);throw new TypeError("val must be string, number or Buffer")}function O(ke,_e,ce,ve,le){var Ae=1,Be=ke.length,Xe=_e.length;if(ve!==void 0&&(ve=String(ve).toLowerCase(),ve==="ucs2"||ve==="ucs-2"||ve==="utf16le"||ve==="utf-16le")){if(ke.length<2||_e.length<2)return-1;Ae=2,Be/=2,Xe/=2,ce/=2}function Ye($t,rr){return Ae===1?$t[rr]:$t.readUInt16BE(rr*Ae)}var yt;if(le){var gt=-1;for(yt=ce;ytBe&&(ce=Be-Xe),yt=ce;yt>=0;yt--){for(var Tt=!0,At=0;Atle&&(ve=le)):ve=le;var Ae=_e.length;ve>Ae/2&&(ve=Ae/2);for(var Be=0;Be>>0,isFinite(ve)?(ve=ve>>>0,le===void 0&&(le="utf8")):(le=ve,ve=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ae=this.length-ce;if((ve===void 0||ve>Ae)&&(ve=Ae),_e.length>0&&(ve<0||ce<0)||ce>this.length)throw new RangeError("Attempt to write outside buffer bounds");le||(le="utf8");for(var Be=!1;;)switch(le){case"hex":return D(this,_e,ce,ve);case"utf8":case"utf-8":return B(this,_e,ce,ve);case"ascii":case"latin1":case"binary":return F(this,_e,ce,ve);case"base64":return P(this,_e,ce,ve);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,_e,ce,ve);default:if(Be)throw new TypeError("Unknown encoding: "+le);le=(""+le).toLowerCase(),Be=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(ke,_e,ce){return _e===0&&ce===ke.length?r.fromByteArray(ke):r.fromByteArray(ke.slice(_e,ce))}function $(ke,_e,ce){ce=Math.min(ke.length,ce);for(var ve=[],le=_e;le239?4:Ae>223?3:Ae>191?2:1;if(le+Xe<=ce){var Ye,yt,gt,Tt;switch(Xe){case 1:Ae<128&&(Be=Ae);break;case 2:Ye=ke[le+1],(Ye&192)===128&&(Tt=(Ae&31)<<6|Ye&63,Tt>127&&(Be=Tt));break;case 3:Ye=ke[le+1],yt=ke[le+2],(Ye&192)===128&&(yt&192)===128&&(Tt=(Ae&15)<<12|(Ye&63)<<6|yt&63,Tt>2047&&(Tt<55296||Tt>57343)&&(Be=Tt));break;case 4:Ye=ke[le+1],yt=ke[le+2],gt=ke[le+3],(Ye&192)===128&&(yt&192)===128&&(gt&192)===128&&(Tt=(Ae&15)<<18|(Ye&63)<<12|(yt&63)<<6|gt&63,Tt>65535&&Tt<1114112&&(Be=Tt))}}Be===null?(Be=65533,Xe=1):Be>65535&&(Be-=65536,ve.push(Be>>>10&1023|55296),Be=56320|Be&1023),ve.push(Be),le+=Xe}return re(ve)}var Q=4096;function re(ke){var _e=ke.length;if(_e<=Q)return String.fromCharCode.apply(String,ke);for(var ce="",ve=0;ve<_e;)ce+=String.fromCharCode.apply(String,ke.slice(ve,ve+=Q));return ce}function ne(ke,_e,ce){var ve="";ce=Math.min(ke.length,ce);for(var le=_e;leve)&&(ce=ve);for(var le="",Ae=_e;Aeve&&(_e=ve),ce<0?(ce+=ve,ce<0&&(ce=0)):ce>ve&&(ce=ve),ce<_e&&(ce=_e);var le=this.subarray(_e,ce);return Object.setPrototypeOf(le,h.prototype),le};function K(ke,_e,ce){if(ke%1!==0||ke<0)throw new RangeError("offset is not uint");if(ke+_e>ce)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(_e,ce,ve){_e=_e>>>0,ce=ce>>>0,ve||K(_e,ce,this.length);for(var le=this[_e],Ae=1,Be=0;++Be>>0,ce=ce>>>0,ve||K(_e,ce,this.length);for(var le=this[_e+--ce],Ae=1;ce>0&&(Ae*=256);)le+=this[_e+--ce]*Ae;return le},h.prototype.readUint8=h.prototype.readUInt8=function(_e,ce){return _e=_e>>>0,ce||K(_e,1,this.length),this[_e]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(_e,ce){return _e=_e>>>0,ce||K(_e,2,this.length),this[_e]|this[_e+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(_e,ce){return _e=_e>>>0,ce||K(_e,2,this.length),this[_e]<<8|this[_e+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),(this[_e]|this[_e+1]<<8|this[_e+2]<<16)+this[_e+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),this[_e]*16777216+(this[_e+1]<<16|this[_e+2]<<8|this[_e+3])},h.prototype.readIntLE=function(_e,ce,ve){_e=_e>>>0,ce=ce>>>0,ve||K(_e,ce,this.length);for(var le=this[_e],Ae=1,Be=0;++Be=Ae&&(le-=Math.pow(2,8*ce)),le},h.prototype.readIntBE=function(_e,ce,ve){_e=_e>>>0,ce=ce>>>0,ve||K(_e,ce,this.length);for(var le=ce,Ae=1,Be=this[_e+--le];le>0&&(Ae*=256);)Be+=this[_e+--le]*Ae;return Ae*=128,Be>=Ae&&(Be-=Math.pow(2,8*ce)),Be},h.prototype.readInt8=function(_e,ce){return _e=_e>>>0,ce||K(_e,1,this.length),this[_e]&128?(255-this[_e]+1)*-1:this[_e]},h.prototype.readInt16LE=function(_e,ce){_e=_e>>>0,ce||K(_e,2,this.length);var ve=this[_e]|this[_e+1]<<8;return ve&32768?ve|4294901760:ve},h.prototype.readInt16BE=function(_e,ce){_e=_e>>>0,ce||K(_e,2,this.length);var ve=this[_e+1]|this[_e]<<8;return ve&32768?ve|4294901760:ve},h.prototype.readInt32LE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),this[_e]|this[_e+1]<<8|this[_e+2]<<16|this[_e+3]<<24},h.prototype.readInt32BE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),this[_e]<<24|this[_e+1]<<16|this[_e+2]<<8|this[_e+3]},h.prototype.readFloatLE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),a.read(this,_e,!0,23,4)},h.prototype.readFloatBE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),a.read(this,_e,!1,23,4)},h.prototype.readDoubleLE=function(_e,ce){return _e=_e>>>0,ce||K(_e,8,this.length),a.read(this,_e,!0,52,8)},h.prototype.readDoubleBE=function(_e,ce){return _e=_e>>>0,ce||K(_e,8,this.length),a.read(this,_e,!1,52,8)};function H(ke,_e,ce,ve,le,Ae){if(!h.isBuffer(ke))throw new TypeError('"buffer" argument must be a Buffer instance');if(_e>le||_eke.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(_e,ce,ve,le){if(_e=+_e,ce=ce>>>0,ve=ve>>>0,!le){var Ae=Math.pow(2,8*ve)-1;H(this,_e,ce,ve,Ae,0)}var Be=1,Xe=0;for(this[ce]=_e&255;++Xe>>0,ve=ve>>>0,!le){var Ae=Math.pow(2,8*ve)-1;H(this,_e,ce,ve,Ae,0)}var Be=ve-1,Xe=1;for(this[ce+Be]=_e&255;--Be>=0&&(Xe*=256);)this[ce+Be]=_e/Xe&255;return ce+ve},h.prototype.writeUint8=h.prototype.writeUInt8=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,1,255,0),this[ce]=_e&255,ce+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,2,65535,0),this[ce]=_e&255,this[ce+1]=_e>>>8,ce+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,2,65535,0),this[ce]=_e>>>8,this[ce+1]=_e&255,ce+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,4,4294967295,0),this[ce+3]=_e>>>24,this[ce+2]=_e>>>16,this[ce+1]=_e>>>8,this[ce]=_e&255,ce+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,4,4294967295,0),this[ce]=_e>>>24,this[ce+1]=_e>>>16,this[ce+2]=_e>>>8,this[ce+3]=_e&255,ce+4},h.prototype.writeIntLE=function(_e,ce,ve,le){if(_e=+_e,ce=ce>>>0,!le){var Ae=Math.pow(2,8*ve-1);H(this,_e,ce,ve,Ae-1,-Ae)}var Be=0,Xe=1,Ye=0;for(this[ce]=_e&255;++Be>0)-Ye&255;return ce+ve},h.prototype.writeIntBE=function(_e,ce,ve,le){if(_e=+_e,ce=ce>>>0,!le){var Ae=Math.pow(2,8*ve-1);H(this,_e,ce,ve,Ae-1,-Ae)}var Be=ve-1,Xe=1,Ye=0;for(this[ce+Be]=_e&255;--Be>=0&&(Xe*=256);)_e<0&&Ye===0&&this[ce+Be+1]!==0&&(Ye=1),this[ce+Be]=(_e/Xe>>0)-Ye&255;return ce+ve},h.prototype.writeInt8=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,1,127,-128),_e<0&&(_e=255+_e+1),this[ce]=_e&255,ce+1},h.prototype.writeInt16LE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,2,32767,-32768),this[ce]=_e&255,this[ce+1]=_e>>>8,ce+2},h.prototype.writeInt16BE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,2,32767,-32768),this[ce]=_e>>>8,this[ce+1]=_e&255,ce+2},h.prototype.writeInt32LE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,4,2147483647,-2147483648),this[ce]=_e&255,this[ce+1]=_e>>>8,this[ce+2]=_e>>>16,this[ce+3]=_e>>>24,ce+4},h.prototype.writeInt32BE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,4,2147483647,-2147483648),_e<0&&(_e=4294967295+_e+1),this[ce]=_e>>>24,this[ce+1]=_e>>>16,this[ce+2]=_e>>>8,this[ce+3]=_e&255,ce+4};function Y(ke,_e,ce,ve,le,Ae){if(ce+ve>ke.length)throw new RangeError("Index out of range");if(ce<0)throw new RangeError("Index out of range")}function q(ke,_e,ce,ve,le){return _e=+_e,ce=ce>>>0,le||Y(ke,_e,ce,4,34028234663852886e22,-34028234663852886e22),a.write(ke,_e,ce,ve,23,4),ce+4}h.prototype.writeFloatLE=function(_e,ce,ve){return q(this,_e,ce,!0,ve)},h.prototype.writeFloatBE=function(_e,ce,ve){return q(this,_e,ce,!1,ve)};function Z(ke,_e,ce,ve,le){return _e=+_e,ce=ce>>>0,le||Y(ke,_e,ce,8,17976931348623157e292,-17976931348623157e292),a.write(ke,_e,ce,ve,52,8),ce+8}h.prototype.writeDoubleLE=function(_e,ce,ve){return Z(this,_e,ce,!0,ve)},h.prototype.writeDoubleBE=function(_e,ce,ve){return Z(this,_e,ce,!1,ve)},h.prototype.copy=function(_e,ce,ve,le){if(!h.isBuffer(_e))throw new TypeError("argument should be a Buffer");if(ve||(ve=0),!le&&le!==0&&(le=this.length),ce>=_e.length&&(ce=_e.length),ce||(ce=0),le>0&&le=this.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("sourceEnd out of bounds");le>this.length&&(le=this.length),_e.length-ce>>0,ve=ve===void 0?this.length:ve>>>0,_e||(_e=0);var Be;if(typeof _e=="number")for(Be=ce;Be55295&&ce<57344){if(!le){if(ce>56319){(_e-=3)>-1&&Ae.push(239,191,189);continue}else if(Be+1===ve){(_e-=3)>-1&&Ae.push(239,191,189);continue}le=ce;continue}if(ce<56320){(_e-=3)>-1&&Ae.push(239,191,189),le=ce;continue}ce=(le-55296<<10|ce-56320)+65536}else le&&(_e-=3)>-1&&Ae.push(239,191,189);if(le=null,ce<128){if((_e-=1)<0)break;Ae.push(ce)}else if(ce<2048){if((_e-=2)<0)break;Ae.push(ce>>6|192,ce&63|128)}else if(ce<65536){if((_e-=3)<0)break;Ae.push(ce>>12|224,ce>>6&63|128,ce&63|128)}else if(ce<1114112){if((_e-=4)<0)break;Ae.push(ce>>18|240,ce>>12&63|128,ce>>6&63|128,ce&63|128)}else throw new Error("Invalid code point")}return Ae}function xe(ke){for(var _e=[],ce=0;ce>8,le=ce%256,Ae.push(le),Ae.push(ve);return Ae}function Me(ke){return r.toByteArray(ae(ke))}function Se(ke,_e,ce,ve){for(var le=0;le=_e.length||le>=ke.length);++le)_e[le+ce]=ke[le];return le}function Ie(ke,_e){return ke instanceof _e||ke!=null&&ke.constructor!=null&&ke.constructor.name!=null&&ke.constructor.name===_e.name}function Ve(ke){return ke!==ke}var Ge=function(){for(var ke="0123456789abcdef",_e=new Array(256),ce=0;ce<16;++ce)for(var ve=ce*16,le=0;le<16;++le)_e[ve+le]=ke[ce]+ke[le];return _e}()},9216:function(l){"use strict";l.exports=r,l.exports.isMobile=r,l.exports.default=r;let e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,n=/android|ipad|playbook|silk/i;function r(a){a||(a={});let o=a.ua;if(!o&&typeof navigator<"u"&&(o=navigator.userAgent),o&&o.headers&&typeof o.headers["user-agent"]=="string"&&(o=o.headers["user-agent"]),typeof o!="string")return!1;let s=e.test(o)&&!t.test(o)||!!a.tablet&&n.test(o);return!s&&a.tablet&&a.featureDetect&&navigator&&navigator.maxTouchPoints>1&&o.indexOf("Macintosh")!==-1&&o.indexOf("Safari")!==-1&&(s=!0),s}},6296:function(l,e,t){"use strict";l.exports=c;var n=t(7261),r=t(9977),a=t(1811);function o(m,h){this._controllerNames=Object.keys(m),this._controllerList=this._controllerNames.map(function(v){return m[v]}),this._mode=h,this._active=m[h],this._active||(this._mode="turntable",this._active=m.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;s.flush=function(m){for(var h=this._controllerList,v=0;v"u"?t(1538):WeakMap,r=t(2762),a=t(8116),o=new n;function s(c){var m=o.get(c),h=m&&(m._triangleBuffer.handle||m._triangleBuffer.buffer);if(!h||!c.isBuffer(h)){var v=r(c,new Float32Array([-1,-1,-1,4,4,-1]));m=a(c,[{buffer:v,type:c.FLOAT,size:2}]),m._triangleBuffer=v,o.set(c,m)}m.bind(),c.drawArrays(c.TRIANGLES,0,3),m.unbind()}l.exports=s},1085:function(l,e,t){var n=t(1371);l.exports=r;function r(a,o,s){o=typeof o=="number"?o:1,s=s||": ";var c=a.split(/\r?\n/),m=String(c.length+o-1).length;return c.map(function(h,v){var g=v+o,i=String(g).length,w=n(g,m-i);return w+s+h}).join(` -`)}},3952:function(l,e,t){"use strict";l.exports=a;var n=t(3250);function r(o,s){for(var c=new Array(s+1),m=0;m0)throw new Error("Invalid string. Length must be a multiple of 4");var C=S.indexOf("=");C===-1&&(C=M);var _=C===M?0:4-C%4;return[C,_]}function m(S){var M=c(S),C=M[0],_=M[1];return(C+_)*3/4-_}function h(S,M,C){return(M+C)*3/4-C}function v(S){var M,C=c(S),_=C[0],T=C[1],f=new r(h(S,_,T)),u=0,A=T>0?_-4:_,x;for(x=0;x>16&255,f[u++]=M>>8&255,f[u++]=M&255;return T===2&&(M=n[S.charCodeAt(x)]<<2|n[S.charCodeAt(x+1)]>>4,f[u++]=M&255),T===1&&(M=n[S.charCodeAt(x)]<<10|n[S.charCodeAt(x+1)]<<4|n[S.charCodeAt(x+2)]>>2,f[u++]=M>>8&255,f[u++]=M&255),f}function g(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function i(S,M,C){for(var _,T=[],f=M;fA?A:u+f));return _===1?(M=S[C-1],T.push(t[M>>2]+t[M<<4&63]+"==")):_===2&&(M=(S[C-2]<<8)+S[C-1],T.push(t[M>>10]+t[M>>4&63]+t[M<<2&63]+"=")),T.join("")}},3865:function(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]).add(o[0].mul(a[1])),a[1].mul(o[1]))}},1318:function(l){"use strict";l.exports=e;function e(t,n){return t[0].mul(n[1]).cmp(n[0].mul(t[1]))}},8697:function(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]),a[1].mul(o[0]))}},7842:function(l,e,t){"use strict";var n=t(6330),r=t(1533),a=t(2651),o=t(6768),s=t(869),c=t(8697);l.exports=m;function m(h,v){if(n(h))return v?c(h,m(v)):[h[0].clone(),h[1].clone()];var g=0,i,w;if(r(h))i=h.clone();else if(typeof h=="string")i=o(h);else{if(h===0)return[a(0),a(1)];if(h===Math.floor(h))i=a(h);else{for(;h!==Math.floor(h);)h=h*Math.pow(2,256),g-=256;i=a(h)}}if(n(v))i.mul(v[1]),w=v[0].clone();else if(r(v))w=v.clone();else if(typeof v=="string")w=o(v);else if(!v)w=a(1);else if(v===Math.floor(v))w=a(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),g+=256;w=a(v)}return g>0?i=i.ushln(g):g<0&&(w=w.ushln(-g)),s(i,w)}},6330:function(l,e,t){"use strict";var n=t(1533);l.exports=r;function r(a){return Array.isArray(a)&&a.length===2&&n(a[0])&&n(a[1])}},5716:function(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return a.cmp(new n(0))}},1369:function(l,e,t){"use strict";var n=t(5716);l.exports=r;function r(a){var o=a.length,s=a.words,c=0;if(o===1)c=s[0];else if(o===2)c=s[0]+s[1]*67108864;else for(var m=0;m20?52:c+32}},1533:function(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return a&&typeof a=="object"&&!!a.words}},2651:function(l,e,t){"use strict";var n=t(6859),r=t(2361);l.exports=a;function a(o){var s=r.exponent(o);return s<52?new n(o):new n(o*Math.pow(2,52-s)).ushln(s-52)}},869:function(l,e,t){"use strict";var n=t(2651),r=t(5716);l.exports=a;function a(o,s){var c=r(o),m=r(s);if(c===0)return[n(0),n(1)];if(m===0)return[n(0),n(0)];m<0&&(o=o.neg(),s=s.neg());var h=o.gcd(s);return h.cmpn(1)?[o.div(h),s.div(h)]:[o,s]}},6768:function(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return new n(a)}},6504:function(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[0]),a[1].mul(o[1]))}},7721:function(l,e,t){"use strict";var n=t(5716);l.exports=r;function r(a){return n(a[0])*n(a[1])}},5572:function(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]).sub(a[1].mul(o[0])),a[1].mul(o[1]))}},946:function(l,e,t){"use strict";var n=t(1369),r=t(4025);l.exports=a;function a(o){var s=o[0],c=o[1];if(s.cmpn(0)===0)return 0;var m=s.abs().divmod(c.abs()),h=m.div,v=n(h),g=m.mod,i=s.negative!==c.negative?-1:1;if(g.cmpn(0)===0)return i*v;if(v){var w=r(v)+4,S=n(g.ushln(w).divRound(c));return i*(v+S*Math.pow(2,-w))}else{var M=c.bitLength()-g.bitLength()+53,S=n(g.ushln(M).divRound(c));return M<1023?i*S*Math.pow(2,-M):(S*=Math.pow(2,-1023),i*S*Math.pow(2,1023-M))}}},2478:function(l){"use strict";function e(s,c,m,h,v){for(var g=v+1;h<=v;){var i=h+v>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S>=0?(g=i,v=i-1):h=i+1}return g}function t(s,c,m,h,v){for(var g=v+1;h<=v;){var i=h+v>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S>0?(g=i,v=i-1):h=i+1}return g}function n(s,c,m,h,v){for(var g=h-1;h<=v;){var i=h+v>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S<0?(g=i,h=i+1):v=i-1}return g}function r(s,c,m,h,v){for(var g=h-1;h<=v;){var i=h+v>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S<=0?(g=i,h=i+1):v=i-1}return g}function a(s,c,m,h,v){for(;h<=v;){var g=h+v>>>1,i=s[g],w=m!==void 0?m(i,c):i-c;if(w===0)return g;w<=0?h=g+1:v=g-1}return-1}function o(s,c,m,h,v,g){return typeof m=="function"?g(s,c,m,h===void 0?0:h|0,v===void 0?s.length-1:v|0):g(s,c,void 0,m===void 0?0:m|0,h===void 0?s.length-1:h|0)}l.exports={ge:function(s,c,m,h,v){return o(s,c,m,h,v,e)},gt:function(s,c,m,h,v){return o(s,c,m,h,v,t)},lt:function(s,c,m,h,v){return o(s,c,m,h,v,n)},le:function(s,c,m,h,v){return o(s,c,m,h,v,r)},eq:function(s,c,m,h,v){return o(s,c,m,h,v,a)}}},8828:function(l,e){"use strict";"use restrict";var t=32;e.INT_BITS=t,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(a<0)},e.abs=function(a){var o=a>>t-1;return(a^o)-o},e.min=function(a,o){return o^(a^o)&-(a65535)<<4,a>>>=o,s=(a>255)<<3,a>>>=s,o|=s,s=(a>15)<<2,a>>>=s,o|=s,s=(a>3)<<1,a>>>=s,o|=s,o|a>>1},e.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},e.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function n(a){var o=32;return a&=-a,a&&o--,a&65535&&(o-=16),a&16711935&&(o-=8),a&252645135&&(o-=4),a&858993459&&(o-=2),a&1431655765&&(o-=1),o}e.countTrailingZeros=n,e.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},e.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},e.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var r=new Array(256);(function(a){for(var o=0;o<256;++o){var s=o,c=o,m=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--m;a[o]=c<>>8&255]<<16|r[a>>>16&255]<<8|r[a>>>24&255]},e.interleave2=function(a,o){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,a|o<<1},e.deinterleave2=function(a,o){return a=a>>>o&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},e.interleave3=function(a,o,s){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,a|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,a|s<<2},e.deinterleave3=function(a,o){return a=a>>>o&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},e.nextCombination=function(a){var o=a|a-1;return o+1|(~o&-~o)-1>>>n(a)+1}},6859:function(l,e,t){l=t.nmd(l),function(n,r){"use strict";function a(F,P){if(!F)throw new Error(P||"Assertion failed")}function o(F,P){F.super_=P;var j=function(){};j.prototype=P.prototype,F.prototype=new j,F.prototype.constructor=F}function s(F,P,j){if(s.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((P==="le"||P==="be")&&(j=P,P=10),this._init(F||0,P||10,j||"be"))}typeof n=="object"?n.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var c;try{typeof window<"u"&&typeof window.Buffer<"u"?c=window.Buffer:c=t(7790).Buffer}catch{}s.isBN=function(P){return P instanceof s?!0:P!==null&&typeof P=="object"&&P.constructor.wordSize===s.wordSize&&Array.isArray(P.words)},s.max=function(P,j){return P.cmp(j)>0?P:j},s.min=function(P,j){return P.cmp(j)<0?P:j},s.prototype._init=function(P,j,U){if(typeof P=="number")return this._initNumber(P,j,U);if(typeof P=="object")return this._initArray(P,j,U);j==="hex"&&(j=16),a(j===(j|0)&&j>=2&&j<=36),P=P.toString().replace(/\s+/g,"");var $=0;P[0]==="-"&&($++,this.negative=1),$=0;$-=3)re=P[$]|P[$-1]<<8|P[$-2]<<16,this.words[Q]|=re<>>26-ne&67108863,ne+=24,ne>=26&&(ne-=26,Q++);else if(U==="le")for($=0,Q=0;$>>26-ne&67108863,ne+=24,ne>=26&&(ne-=26,Q++);return this.strip()};function m(F,P){var j=F.charCodeAt(P);return j>=65&&j<=70?j-55:j>=97&&j<=102?j-87:j-48&15}function h(F,P,j){var U=m(F,j);return j-1>=P&&(U|=m(F,j-1)<<4),U}s.prototype._parseHex=function(P,j,U){this.length=Math.ceil((P.length-j)/6),this.words=new Array(this.length);for(var $=0;$=j;$-=2)ne=h(P,j,$)<=18?(Q-=18,re+=1,this.words[re]|=ne>>>26):Q+=8;else{var se=P.length-j;for($=se%2===0?j+1:j;$=18?(Q-=18,re+=1,this.words[re]|=ne>>>26):Q+=8}this.strip()};function v(F,P,j,U){for(var $=0,Q=Math.min(F.length,j),re=P;re=49?$+=ne-49+10:ne>=17?$+=ne-17+10:$+=ne}return $}s.prototype._parseBase=function(P,j,U){this.words=[0],this.length=1;for(var $=0,Q=1;Q<=67108863;Q*=j)$++;$--,Q=Q/j|0;for(var re=P.length-U,ne=re%$,se=Math.min(re,re-ne)+U,G=0,X=U;X1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var g=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],i=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],w=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(P,j){P=P||10,j=j|0||1;var U;if(P===16||P==="hex"){U="";for(var $=0,Q=0,re=0;re>>24-$&16777215,$+=2,$>=26&&($-=26,re--),Q!==0||re!==this.length-1?U=g[6-se.length]+se+U:U=se+U}for(Q!==0&&(U=Q.toString(16)+U);U.length%j!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}if(P===(P|0)&&P>=2&&P<=36){var G=i[P],X=w[P];U="";var K=this.clone();for(K.negative=0;!K.isZero();){var H=K.modn(X).toString(P);K=K.idivn(X),K.isZero()?U=H+U:U=g[G-H.length]+H+U}for(this.isZero()&&(U="0"+U);U.length%j!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}a(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var P=this.words[0];return this.length===2?P+=this.words[1]*67108864:this.length===3&&this.words[2]===1?P+=4503599627370496+this.words[1]*67108864:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-P:P},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(P,j){return a(typeof c<"u"),this.toArrayLike(c,P,j)},s.prototype.toArray=function(P,j){return this.toArrayLike(Array,P,j)},s.prototype.toArrayLike=function(P,j,U){var $=this.byteLength(),Q=U||Math.max(1,$);a($<=Q,"byte array longer than desired length"),a(Q>0,"Requested array length <= 0"),this.strip();var re=j==="le",ne=new P(Q),se,G,X=this.clone();if(re){for(G=0;!X.isZero();G++)se=X.andln(255),X.iushrn(8),ne[G]=se;for(;G=4096&&(U+=13,j>>>=13),j>=64&&(U+=7,j>>>=7),j>=8&&(U+=4,j>>>=4),j>=2&&(U+=2,j>>>=2),U+j},s.prototype._zeroBits=function(P){if(P===0)return 26;var j=P,U=0;return j&8191||(U+=13,j>>>=13),j&127||(U+=7,j>>>=7),j&15||(U+=4,j>>>=4),j&3||(U+=2,j>>>=2),j&1||U++,U},s.prototype.bitLength=function(){var P=this.words[this.length-1],j=this._countBits(P);return(this.length-1)*26+j};function S(F){for(var P=new Array(F.bitLength()),j=0;j>>$}return P}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var P=0,j=0;jP.length?this.clone().ior(P):P.clone().ior(this)},s.prototype.uor=function(P){return this.length>P.length?this.clone().iuor(P):P.clone().iuor(this)},s.prototype.iuand=function(P){var j;this.length>P.length?j=P:j=this;for(var U=0;UP.length?this.clone().iand(P):P.clone().iand(this)},s.prototype.uand=function(P){return this.length>P.length?this.clone().iuand(P):P.clone().iuand(this)},s.prototype.iuxor=function(P){var j,U;this.length>P.length?(j=this,U=P):(j=P,U=this);for(var $=0;$P.length?this.clone().ixor(P):P.clone().ixor(this)},s.prototype.uxor=function(P){return this.length>P.length?this.clone().iuxor(P):P.clone().iuxor(this)},s.prototype.inotn=function(P){a(typeof P=="number"&&P>=0);var j=Math.ceil(P/26)|0,U=P%26;this._expand(j),U>0&&j--;for(var $=0;$0&&(this.words[$]=~this.words[$]&67108863>>26-U),this.strip()},s.prototype.notn=function(P){return this.clone().inotn(P)},s.prototype.setn=function(P,j){a(typeof P=="number"&&P>=0);var U=P/26|0,$=P%26;return this._expand(U+1),j?this.words[U]=this.words[U]|1<<$:this.words[U]=this.words[U]&~(1<<$),this.strip()},s.prototype.iadd=function(P){var j;if(this.negative!==0&&P.negative===0)return this.negative=0,j=this.isub(P),this.negative^=1,this._normSign();if(this.negative===0&&P.negative!==0)return P.negative=0,j=this.isub(P),P.negative=1,j._normSign();var U,$;this.length>P.length?(U=this,$=P):(U=P,$=this);for(var Q=0,re=0;re<$.length;re++)j=(U.words[re]|0)+($.words[re]|0)+Q,this.words[re]=j&67108863,Q=j>>>26;for(;Q!==0&&re>>26;if(this.length=U.length,Q!==0)this.words[this.length]=Q,this.length++;else if(U!==this)for(;reP.length?this.clone().iadd(P):P.clone().iadd(this)},s.prototype.isub=function(P){if(P.negative!==0){P.negative=0;var j=this.iadd(P);return P.negative=1,j._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(P),this.negative=1,this._normSign();var U=this.cmp(P);if(U===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Q;U>0?($=this,Q=P):($=P,Q=this);for(var re=0,ne=0;ne>26,this.words[ne]=j&67108863;for(;re!==0&&ne<$.length;ne++)j=($.words[ne]|0)+re,re=j>>26,this.words[ne]=j&67108863;if(re===0&&ne<$.length&&$!==this)for(;ne<$.length;ne++)this.words[ne]=$.words[ne];return this.length=Math.max(this.length,ne),$!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(P){return this.clone().isub(P)};function M(F,P,j){j.negative=P.negative^F.negative;var U=F.length+P.length|0;j.length=U,U=U-1|0;var $=F.words[0]|0,Q=P.words[0]|0,re=$*Q,ne=re&67108863,se=re/67108864|0;j.words[0]=ne;for(var G=1;G>>26,K=se&67108863,H=Math.min(G,P.length-1),Y=Math.max(0,G-F.length+1);Y<=H;Y++){var q=G-Y|0;$=F.words[q]|0,Q=P.words[Y]|0,re=$*Q+K,X+=re/67108864|0,K=re&67108863}j.words[G]=K|0,se=X|0}return se!==0?j.words[G]=se|0:j.length--,j.strip()}var C=function(P,j,U){var $=P.words,Q=j.words,re=U.words,ne=0,se,G,X,K=$[0]|0,H=K&8191,Y=K>>>13,q=$[1]|0,Z=q&8191,ee=q>>>13,ae=$[2]|0,he=ae&8191,xe=ae>>>13,we=$[3]|0,Me=we&8191,Se=we>>>13,Ie=$[4]|0,Ve=Ie&8191,Ge=Ie>>>13,ke=$[5]|0,_e=ke&8191,ce=ke>>>13,ve=$[6]|0,le=ve&8191,Ae=ve>>>13,Be=$[7]|0,Xe=Be&8191,Ye=Be>>>13,yt=$[8]|0,gt=yt&8191,Tt=yt>>>13,At=$[9]|0,$t=At&8191,rr=At>>>13,_r=Q[0]|0,Xt=_r&8191,or=_r>>>13,Ot=Q[1]|0,vt=Ot&8191,ht=Ot>>>13,De=Q[2]|0,Ne=De&8191,We=De>>>13,Ke=Q[3]|0,Je=Ke&8191,et=Ke>>>13,Mt=Q[4]|0,pt=Mt&8191,Pt=Mt>>>13,Ct=Q[5]|0,qt=Ct&8191,Vt=Ct>>>13,Ht=Q[6]|0,Sr=Ht&8191,Kr=Ht>>>13,Yt=Q[7]|0,Rt=Yt&8191,nr=Yt>>>13,ur=Q[8]|0,cr=ur&8191,Rr=ur>>>13,Qr=Q[9]|0,Zr=Qr&8191,ha=Qr>>>13;U.negative=P.negative^j.negative,U.length=19,se=Math.imul(H,Xt),G=Math.imul(H,or),G=G+Math.imul(Y,Xt)|0,X=Math.imul(Y,or);var Pa=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Pa>>>26)|0,Pa&=67108863,se=Math.imul(Z,Xt),G=Math.imul(Z,or),G=G+Math.imul(ee,Xt)|0,X=Math.imul(ee,or),se=se+Math.imul(H,vt)|0,G=G+Math.imul(H,ht)|0,G=G+Math.imul(Y,vt)|0,X=X+Math.imul(Y,ht)|0;var La=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(La>>>26)|0,La&=67108863,se=Math.imul(he,Xt),G=Math.imul(he,or),G=G+Math.imul(xe,Xt)|0,X=Math.imul(xe,or),se=se+Math.imul(Z,vt)|0,G=G+Math.imul(Z,ht)|0,G=G+Math.imul(ee,vt)|0,X=X+Math.imul(ee,ht)|0,se=se+Math.imul(H,Ne)|0,G=G+Math.imul(H,We)|0,G=G+Math.imul(Y,Ne)|0,X=X+Math.imul(Y,We)|0;var un=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(un>>>26)|0,un&=67108863,se=Math.imul(Me,Xt),G=Math.imul(Me,or),G=G+Math.imul(Se,Xt)|0,X=Math.imul(Se,or),se=se+Math.imul(he,vt)|0,G=G+Math.imul(he,ht)|0,G=G+Math.imul(xe,vt)|0,X=X+Math.imul(xe,ht)|0,se=se+Math.imul(Z,Ne)|0,G=G+Math.imul(Z,We)|0,G=G+Math.imul(ee,Ne)|0,X=X+Math.imul(ee,We)|0,se=se+Math.imul(H,Je)|0,G=G+Math.imul(H,et)|0,G=G+Math.imul(Y,Je)|0,X=X+Math.imul(Y,et)|0;var Xa=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Xa>>>26)|0,Xa&=67108863,se=Math.imul(Ve,Xt),G=Math.imul(Ve,or),G=G+Math.imul(Ge,Xt)|0,X=Math.imul(Ge,or),se=se+Math.imul(Me,vt)|0,G=G+Math.imul(Me,ht)|0,G=G+Math.imul(Se,vt)|0,X=X+Math.imul(Se,ht)|0,se=se+Math.imul(he,Ne)|0,G=G+Math.imul(he,We)|0,G=G+Math.imul(xe,Ne)|0,X=X+Math.imul(xe,We)|0,se=se+Math.imul(Z,Je)|0,G=G+Math.imul(Z,et)|0,G=G+Math.imul(ee,Je)|0,X=X+Math.imul(ee,et)|0,se=se+Math.imul(H,pt)|0,G=G+Math.imul(H,Pt)|0,G=G+Math.imul(Y,pt)|0,X=X+Math.imul(Y,Pt)|0;var ja=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(ja>>>26)|0,ja&=67108863,se=Math.imul(_e,Xt),G=Math.imul(_e,or),G=G+Math.imul(ce,Xt)|0,X=Math.imul(ce,or),se=se+Math.imul(Ve,vt)|0,G=G+Math.imul(Ve,ht)|0,G=G+Math.imul(Ge,vt)|0,X=X+Math.imul(Ge,ht)|0,se=se+Math.imul(Me,Ne)|0,G=G+Math.imul(Me,We)|0,G=G+Math.imul(Se,Ne)|0,X=X+Math.imul(Se,We)|0,se=se+Math.imul(he,Je)|0,G=G+Math.imul(he,et)|0,G=G+Math.imul(xe,Je)|0,X=X+Math.imul(xe,et)|0,se=se+Math.imul(Z,pt)|0,G=G+Math.imul(Z,Pt)|0,G=G+Math.imul(ee,pt)|0,X=X+Math.imul(ee,Pt)|0,se=se+Math.imul(H,qt)|0,G=G+Math.imul(H,Vt)|0,G=G+Math.imul(Y,qt)|0,X=X+Math.imul(Y,Vt)|0;var Nn=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,se=Math.imul(le,Xt),G=Math.imul(le,or),G=G+Math.imul(Ae,Xt)|0,X=Math.imul(Ae,or),se=se+Math.imul(_e,vt)|0,G=G+Math.imul(_e,ht)|0,G=G+Math.imul(ce,vt)|0,X=X+Math.imul(ce,ht)|0,se=se+Math.imul(Ve,Ne)|0,G=G+Math.imul(Ve,We)|0,G=G+Math.imul(Ge,Ne)|0,X=X+Math.imul(Ge,We)|0,se=se+Math.imul(Me,Je)|0,G=G+Math.imul(Me,et)|0,G=G+Math.imul(Se,Je)|0,X=X+Math.imul(Se,et)|0,se=se+Math.imul(he,pt)|0,G=G+Math.imul(he,Pt)|0,G=G+Math.imul(xe,pt)|0,X=X+Math.imul(xe,Pt)|0,se=se+Math.imul(Z,qt)|0,G=G+Math.imul(Z,Vt)|0,G=G+Math.imul(ee,qt)|0,X=X+Math.imul(ee,Vt)|0,se=se+Math.imul(H,Sr)|0,G=G+Math.imul(H,Kr)|0,G=G+Math.imul(Y,Sr)|0,X=X+Math.imul(Y,Kr)|0;var yn=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(yn>>>26)|0,yn&=67108863,se=Math.imul(Xe,Xt),G=Math.imul(Xe,or),G=G+Math.imul(Ye,Xt)|0,X=Math.imul(Ye,or),se=se+Math.imul(le,vt)|0,G=G+Math.imul(le,ht)|0,G=G+Math.imul(Ae,vt)|0,X=X+Math.imul(Ae,ht)|0,se=se+Math.imul(_e,Ne)|0,G=G+Math.imul(_e,We)|0,G=G+Math.imul(ce,Ne)|0,X=X+Math.imul(ce,We)|0,se=se+Math.imul(Ve,Je)|0,G=G+Math.imul(Ve,et)|0,G=G+Math.imul(Ge,Je)|0,X=X+Math.imul(Ge,et)|0,se=se+Math.imul(Me,pt)|0,G=G+Math.imul(Me,Pt)|0,G=G+Math.imul(Se,pt)|0,X=X+Math.imul(Se,Pt)|0,se=se+Math.imul(he,qt)|0,G=G+Math.imul(he,Vt)|0,G=G+Math.imul(xe,qt)|0,X=X+Math.imul(xe,Vt)|0,se=se+Math.imul(Z,Sr)|0,G=G+Math.imul(Z,Kr)|0,G=G+Math.imul(ee,Sr)|0,X=X+Math.imul(ee,Kr)|0,se=se+Math.imul(H,Rt)|0,G=G+Math.imul(H,nr)|0,G=G+Math.imul(Y,Rt)|0,X=X+Math.imul(Y,nr)|0;var Un=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Un>>>26)|0,Un&=67108863,se=Math.imul(gt,Xt),G=Math.imul(gt,or),G=G+Math.imul(Tt,Xt)|0,X=Math.imul(Tt,or),se=se+Math.imul(Xe,vt)|0,G=G+Math.imul(Xe,ht)|0,G=G+Math.imul(Ye,vt)|0,X=X+Math.imul(Ye,ht)|0,se=se+Math.imul(le,Ne)|0,G=G+Math.imul(le,We)|0,G=G+Math.imul(Ae,Ne)|0,X=X+Math.imul(Ae,We)|0,se=se+Math.imul(_e,Je)|0,G=G+Math.imul(_e,et)|0,G=G+Math.imul(ce,Je)|0,X=X+Math.imul(ce,et)|0,se=se+Math.imul(Ve,pt)|0,G=G+Math.imul(Ve,Pt)|0,G=G+Math.imul(Ge,pt)|0,X=X+Math.imul(Ge,Pt)|0,se=se+Math.imul(Me,qt)|0,G=G+Math.imul(Me,Vt)|0,G=G+Math.imul(Se,qt)|0,X=X+Math.imul(Se,Vt)|0,se=se+Math.imul(he,Sr)|0,G=G+Math.imul(he,Kr)|0,G=G+Math.imul(xe,Sr)|0,X=X+Math.imul(xe,Kr)|0,se=se+Math.imul(Z,Rt)|0,G=G+Math.imul(Z,nr)|0,G=G+Math.imul(ee,Rt)|0,X=X+Math.imul(ee,nr)|0,se=se+Math.imul(H,cr)|0,G=G+Math.imul(H,Rr)|0,G=G+Math.imul(Y,cr)|0,X=X+Math.imul(Y,Rr)|0;var li=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(li>>>26)|0,li&=67108863,se=Math.imul($t,Xt),G=Math.imul($t,or),G=G+Math.imul(rr,Xt)|0,X=Math.imul(rr,or),se=se+Math.imul(gt,vt)|0,G=G+Math.imul(gt,ht)|0,G=G+Math.imul(Tt,vt)|0,X=X+Math.imul(Tt,ht)|0,se=se+Math.imul(Xe,Ne)|0,G=G+Math.imul(Xe,We)|0,G=G+Math.imul(Ye,Ne)|0,X=X+Math.imul(Ye,We)|0,se=se+Math.imul(le,Je)|0,G=G+Math.imul(le,et)|0,G=G+Math.imul(Ae,Je)|0,X=X+Math.imul(Ae,et)|0,se=se+Math.imul(_e,pt)|0,G=G+Math.imul(_e,Pt)|0,G=G+Math.imul(ce,pt)|0,X=X+Math.imul(ce,Pt)|0,se=se+Math.imul(Ve,qt)|0,G=G+Math.imul(Ve,Vt)|0,G=G+Math.imul(Ge,qt)|0,X=X+Math.imul(Ge,Vt)|0,se=se+Math.imul(Me,Sr)|0,G=G+Math.imul(Me,Kr)|0,G=G+Math.imul(Se,Sr)|0,X=X+Math.imul(Se,Kr)|0,se=se+Math.imul(he,Rt)|0,G=G+Math.imul(he,nr)|0,G=G+Math.imul(xe,Rt)|0,X=X+Math.imul(xe,nr)|0,se=se+Math.imul(Z,cr)|0,G=G+Math.imul(Z,Rr)|0,G=G+Math.imul(ee,cr)|0,X=X+Math.imul(ee,Rr)|0,se=se+Math.imul(H,Zr)|0,G=G+Math.imul(H,ha)|0,G=G+Math.imul(Y,Zr)|0,X=X+Math.imul(Y,ha)|0;var Yn=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Yn>>>26)|0,Yn&=67108863,se=Math.imul($t,vt),G=Math.imul($t,ht),G=G+Math.imul(rr,vt)|0,X=Math.imul(rr,ht),se=se+Math.imul(gt,Ne)|0,G=G+Math.imul(gt,We)|0,G=G+Math.imul(Tt,Ne)|0,X=X+Math.imul(Tt,We)|0,se=se+Math.imul(Xe,Je)|0,G=G+Math.imul(Xe,et)|0,G=G+Math.imul(Ye,Je)|0,X=X+Math.imul(Ye,et)|0,se=se+Math.imul(le,pt)|0,G=G+Math.imul(le,Pt)|0,G=G+Math.imul(Ae,pt)|0,X=X+Math.imul(Ae,Pt)|0,se=se+Math.imul(_e,qt)|0,G=G+Math.imul(_e,Vt)|0,G=G+Math.imul(ce,qt)|0,X=X+Math.imul(ce,Vt)|0,se=se+Math.imul(Ve,Sr)|0,G=G+Math.imul(Ve,Kr)|0,G=G+Math.imul(Ge,Sr)|0,X=X+Math.imul(Ge,Kr)|0,se=se+Math.imul(Me,Rt)|0,G=G+Math.imul(Me,nr)|0,G=G+Math.imul(Se,Rt)|0,X=X+Math.imul(Se,nr)|0,se=se+Math.imul(he,cr)|0,G=G+Math.imul(he,Rr)|0,G=G+Math.imul(xe,cr)|0,X=X+Math.imul(xe,Rr)|0,se=se+Math.imul(Z,Zr)|0,G=G+Math.imul(Z,ha)|0,G=G+Math.imul(ee,Zr)|0,X=X+Math.imul(ee,ha)|0;var on=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(on>>>26)|0,on&=67108863,se=Math.imul($t,Ne),G=Math.imul($t,We),G=G+Math.imul(rr,Ne)|0,X=Math.imul(rr,We),se=se+Math.imul(gt,Je)|0,G=G+Math.imul(gt,et)|0,G=G+Math.imul(Tt,Je)|0,X=X+Math.imul(Tt,et)|0,se=se+Math.imul(Xe,pt)|0,G=G+Math.imul(Xe,Pt)|0,G=G+Math.imul(Ye,pt)|0,X=X+Math.imul(Ye,Pt)|0,se=se+Math.imul(le,qt)|0,G=G+Math.imul(le,Vt)|0,G=G+Math.imul(Ae,qt)|0,X=X+Math.imul(Ae,Vt)|0,se=se+Math.imul(_e,Sr)|0,G=G+Math.imul(_e,Kr)|0,G=G+Math.imul(ce,Sr)|0,X=X+Math.imul(ce,Kr)|0,se=se+Math.imul(Ve,Rt)|0,G=G+Math.imul(Ve,nr)|0,G=G+Math.imul(Ge,Rt)|0,X=X+Math.imul(Ge,nr)|0,se=se+Math.imul(Me,cr)|0,G=G+Math.imul(Me,Rr)|0,G=G+Math.imul(Se,cr)|0,X=X+Math.imul(Se,Rr)|0,se=se+Math.imul(he,Zr)|0,G=G+Math.imul(he,ha)|0,G=G+Math.imul(xe,Zr)|0,X=X+Math.imul(xe,ha)|0;var en=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(en>>>26)|0,en&=67108863,se=Math.imul($t,Je),G=Math.imul($t,et),G=G+Math.imul(rr,Je)|0,X=Math.imul(rr,et),se=se+Math.imul(gt,pt)|0,G=G+Math.imul(gt,Pt)|0,G=G+Math.imul(Tt,pt)|0,X=X+Math.imul(Tt,Pt)|0,se=se+Math.imul(Xe,qt)|0,G=G+Math.imul(Xe,Vt)|0,G=G+Math.imul(Ye,qt)|0,X=X+Math.imul(Ye,Vt)|0,se=se+Math.imul(le,Sr)|0,G=G+Math.imul(le,Kr)|0,G=G+Math.imul(Ae,Sr)|0,X=X+Math.imul(Ae,Kr)|0,se=se+Math.imul(_e,Rt)|0,G=G+Math.imul(_e,nr)|0,G=G+Math.imul(ce,Rt)|0,X=X+Math.imul(ce,nr)|0,se=se+Math.imul(Ve,cr)|0,G=G+Math.imul(Ve,Rr)|0,G=G+Math.imul(Ge,cr)|0,X=X+Math.imul(Ge,Rr)|0,se=se+Math.imul(Me,Zr)|0,G=G+Math.imul(Me,ha)|0,G=G+Math.imul(Se,Zr)|0,X=X+Math.imul(Se,ha)|0;var vi=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(vi>>>26)|0,vi&=67108863,se=Math.imul($t,pt),G=Math.imul($t,Pt),G=G+Math.imul(rr,pt)|0,X=Math.imul(rr,Pt),se=se+Math.imul(gt,qt)|0,G=G+Math.imul(gt,Vt)|0,G=G+Math.imul(Tt,qt)|0,X=X+Math.imul(Tt,Vt)|0,se=se+Math.imul(Xe,Sr)|0,G=G+Math.imul(Xe,Kr)|0,G=G+Math.imul(Ye,Sr)|0,X=X+Math.imul(Ye,Kr)|0,se=se+Math.imul(le,Rt)|0,G=G+Math.imul(le,nr)|0,G=G+Math.imul(Ae,Rt)|0,X=X+Math.imul(Ae,nr)|0,se=se+Math.imul(_e,cr)|0,G=G+Math.imul(_e,Rr)|0,G=G+Math.imul(ce,cr)|0,X=X+Math.imul(ce,Rr)|0,se=se+Math.imul(Ve,Zr)|0,G=G+Math.imul(Ve,ha)|0,G=G+Math.imul(Ge,Zr)|0,X=X+Math.imul(Ge,ha)|0;var Yi=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Yi>>>26)|0,Yi&=67108863,se=Math.imul($t,qt),G=Math.imul($t,Vt),G=G+Math.imul(rr,qt)|0,X=Math.imul(rr,Vt),se=se+Math.imul(gt,Sr)|0,G=G+Math.imul(gt,Kr)|0,G=G+Math.imul(Tt,Sr)|0,X=X+Math.imul(Tt,Kr)|0,se=se+Math.imul(Xe,Rt)|0,G=G+Math.imul(Xe,nr)|0,G=G+Math.imul(Ye,Rt)|0,X=X+Math.imul(Ye,nr)|0,se=se+Math.imul(le,cr)|0,G=G+Math.imul(le,Rr)|0,G=G+Math.imul(Ae,cr)|0,X=X+Math.imul(Ae,Rr)|0,se=se+Math.imul(_e,Zr)|0,G=G+Math.imul(_e,ha)|0,G=G+Math.imul(ce,Zr)|0,X=X+Math.imul(ce,ha)|0;var Ja=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Ja>>>26)|0,Ja&=67108863,se=Math.imul($t,Sr),G=Math.imul($t,Kr),G=G+Math.imul(rr,Sr)|0,X=Math.imul(rr,Kr),se=se+Math.imul(gt,Rt)|0,G=G+Math.imul(gt,nr)|0,G=G+Math.imul(Tt,Rt)|0,X=X+Math.imul(Tt,nr)|0,se=se+Math.imul(Xe,cr)|0,G=G+Math.imul(Xe,Rr)|0,G=G+Math.imul(Ye,cr)|0,X=X+Math.imul(Ye,Rr)|0,se=se+Math.imul(le,Zr)|0,G=G+Math.imul(le,ha)|0,G=G+Math.imul(Ae,Zr)|0,X=X+Math.imul(Ae,ha)|0;var Oa=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Oa>>>26)|0,Oa&=67108863,se=Math.imul($t,Rt),G=Math.imul($t,nr),G=G+Math.imul(rr,Rt)|0,X=Math.imul(rr,nr),se=se+Math.imul(gt,cr)|0,G=G+Math.imul(gt,Rr)|0,G=G+Math.imul(Tt,cr)|0,X=X+Math.imul(Tt,Rr)|0,se=se+Math.imul(Xe,Zr)|0,G=G+Math.imul(Xe,ha)|0,G=G+Math.imul(Ye,Zr)|0,X=X+Math.imul(Ye,ha)|0;var lt=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(lt>>>26)|0,lt&=67108863,se=Math.imul($t,cr),G=Math.imul($t,Rr),G=G+Math.imul(rr,cr)|0,X=Math.imul(rr,Rr),se=se+Math.imul(gt,Zr)|0,G=G+Math.imul(gt,ha)|0,G=G+Math.imul(Tt,Zr)|0,X=X+Math.imul(Tt,ha)|0;var rt=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(rt>>>26)|0,rt&=67108863,se=Math.imul($t,Zr),G=Math.imul($t,ha),G=G+Math.imul(rr,Zr)|0,X=Math.imul(rr,ha);var fr=(ne+se|0)+((G&8191)<<13)|0;return ne=(X+(G>>>13)|0)+(fr>>>26)|0,fr&=67108863,re[0]=Pa,re[1]=La,re[2]=un,re[3]=Xa,re[4]=ja,re[5]=Nn,re[6]=yn,re[7]=Un,re[8]=li,re[9]=Yn,re[10]=on,re[11]=en,re[12]=vi,re[13]=Yi,re[14]=Ja,re[15]=Oa,re[16]=lt,re[17]=rt,re[18]=fr,ne!==0&&(re[19]=ne,U.length++),U};Math.imul||(C=M);function _(F,P,j){j.negative=P.negative^F.negative,j.length=F.length+P.length;for(var U=0,$=0,Q=0;Q>>26)|0,$+=re>>>26,re&=67108863}j.words[Q]=ne,U=re,re=$}return U!==0?j.words[Q]=U:j.length--,j.strip()}function T(F,P,j){var U=new f;return U.mulp(F,P,j)}s.prototype.mulTo=function(P,j){var U,$=this.length+P.length;return this.length===10&&P.length===10?U=C(this,P,j):$<63?U=M(this,P,j):$<1024?U=_(this,P,j):U=T(this,P,j),U};function f(F,P){this.x=F,this.y=P}f.prototype.makeRBT=function(P){for(var j=new Array(P),U=s.prototype._countBits(P)-1,$=0;$>=1;return $},f.prototype.permute=function(P,j,U,$,Q,re){for(var ne=0;ne>>1)Q++;return 1<>>13,U[2*re+1]=Q&8191,Q=Q>>>13;for(re=2*j;re<$;++re)U[re]=0;a(Q===0),a((Q&-8192)===0)},f.prototype.stub=function(P){for(var j=new Array(P),U=0;U>=26,j+=$/67108864|0,j+=Q>>>26,this.words[U]=Q&67108863}return j!==0&&(this.words[U]=j,this.length++),this.length=P===0?1:this.length,this},s.prototype.muln=function(P){return this.clone().imuln(P)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(P){var j=S(P);if(j.length===0)return new s(1);for(var U=this,$=0;$=0);var j=P%26,U=(P-j)/26,$=67108863>>>26-j<<26-j,Q;if(j!==0){var re=0;for(Q=0;Q>>26-j}re&&(this.words[Q]=re,this.length++)}if(U!==0){for(Q=this.length-1;Q>=0;Q--)this.words[Q+U]=this.words[Q];for(Q=0;Q=0);var $;j?$=(j-j%26)/26:$=0;var Q=P%26,re=Math.min((P-Q)/26,this.length),ne=67108863^67108863>>>Q<re)for(this.length-=re,G=0;G=0&&(X!==0||G>=$);G--){var K=this.words[G]|0;this.words[G]=X<<26-Q|K>>>Q,X=K&ne}return se&&X!==0&&(se.words[se.length++]=X),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(P,j,U){return a(this.negative===0),this.iushrn(P,j,U)},s.prototype.shln=function(P){return this.clone().ishln(P)},s.prototype.ushln=function(P){return this.clone().iushln(P)},s.prototype.shrn=function(P){return this.clone().ishrn(P)},s.prototype.ushrn=function(P){return this.clone().iushrn(P)},s.prototype.testn=function(P){a(typeof P=="number"&&P>=0);var j=P%26,U=(P-j)/26,$=1<=0);var j=P%26,U=(P-j)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=U)return this;if(j!==0&&U++,this.length=Math.min(U,this.length),j!==0){var $=67108863^67108863>>>j<=67108864;j++)this.words[j]-=67108864,j===this.length-1?this.words[j+1]=1:this.words[j+1]++;return this.length=Math.max(this.length,j+1),this},s.prototype.isubn=function(P){if(a(typeof P=="number"),a(P<67108864),P<0)return this.iaddn(-P);if(this.negative!==0)return this.negative=0,this.iaddn(P),this.negative=1,this;if(this.words[0]-=P,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var j=0;j>26)-(se/67108864|0),this.words[Q+U]=re&67108863}for(;Q>26,this.words[Q+U]=re&67108863;if(ne===0)return this.strip();for(a(ne===-1),ne=0,Q=0;Q>26,this.words[Q]=re&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(P,j){var U=this.length-P.length,$=this.clone(),Q=P,re=Q.words[Q.length-1]|0,ne=this._countBits(re);U=26-ne,U!==0&&(Q=Q.ushln(U),$.iushln(U),re=Q.words[Q.length-1]|0);var se=$.length-Q.length,G;if(j!=="mod"){G=new s(null),G.length=se+1,G.words=new Array(G.length);for(var X=0;X=0;H--){var Y=($.words[Q.length+H]|0)*67108864+($.words[Q.length+H-1]|0);for(Y=Math.min(Y/re|0,67108863),$._ishlnsubmul(Q,Y,H);$.negative!==0;)Y--,$.negative=0,$._ishlnsubmul(Q,1,H),$.isZero()||($.negative^=1);G&&(G.words[H]=Y)}return G&&G.strip(),$.strip(),j!=="div"&&U!==0&&$.iushrn(U),{div:G||null,mod:$}},s.prototype.divmod=function(P,j,U){if(a(!P.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var $,Q,re;return this.negative!==0&&P.negative===0?(re=this.neg().divmod(P,j),j!=="mod"&&($=re.div.neg()),j!=="div"&&(Q=re.mod.neg(),U&&Q.negative!==0&&Q.iadd(P)),{div:$,mod:Q}):this.negative===0&&P.negative!==0?(re=this.divmod(P.neg(),j),j!=="mod"&&($=re.div.neg()),{div:$,mod:re.mod}):this.negative&P.negative?(re=this.neg().divmod(P.neg(),j),j!=="div"&&(Q=re.mod.neg(),U&&Q.negative!==0&&Q.isub(P)),{div:re.div,mod:Q}):P.length>this.length||this.cmp(P)<0?{div:new s(0),mod:this}:P.length===1?j==="div"?{div:this.divn(P.words[0]),mod:null}:j==="mod"?{div:null,mod:new s(this.modn(P.words[0]))}:{div:this.divn(P.words[0]),mod:new s(this.modn(P.words[0]))}:this._wordDiv(P,j)},s.prototype.div=function(P){return this.divmod(P,"div",!1).div},s.prototype.mod=function(P){return this.divmod(P,"mod",!1).mod},s.prototype.umod=function(P){return this.divmod(P,"mod",!0).mod},s.prototype.divRound=function(P){var j=this.divmod(P);if(j.mod.isZero())return j.div;var U=j.div.negative!==0?j.mod.isub(P):j.mod,$=P.ushrn(1),Q=P.andln(1),re=U.cmp($);return re<0||Q===1&&re===0?j.div:j.div.negative!==0?j.div.isubn(1):j.div.iaddn(1)},s.prototype.modn=function(P){a(P<=67108863);for(var j=(1<<26)%P,U=0,$=this.length-1;$>=0;$--)U=(j*U+(this.words[$]|0))%P;return U},s.prototype.idivn=function(P){a(P<=67108863);for(var j=0,U=this.length-1;U>=0;U--){var $=(this.words[U]|0)+j*67108864;this.words[U]=$/P|0,j=$%P}return this.strip()},s.prototype.divn=function(P){return this.clone().idivn(P)},s.prototype.egcd=function(P){a(P.negative===0),a(!P.isZero());var j=this,U=P.clone();j.negative!==0?j=j.umod(P):j=j.clone();for(var $=new s(1),Q=new s(0),re=new s(0),ne=new s(1),se=0;j.isEven()&&U.isEven();)j.iushrn(1),U.iushrn(1),++se;for(var G=U.clone(),X=j.clone();!j.isZero();){for(var K=0,H=1;!(j.words[0]&H)&&K<26;++K,H<<=1);if(K>0)for(j.iushrn(K);K-- >0;)($.isOdd()||Q.isOdd())&&($.iadd(G),Q.isub(X)),$.iushrn(1),Q.iushrn(1);for(var Y=0,q=1;!(U.words[0]&q)&&Y<26;++Y,q<<=1);if(Y>0)for(U.iushrn(Y);Y-- >0;)(re.isOdd()||ne.isOdd())&&(re.iadd(G),ne.isub(X)),re.iushrn(1),ne.iushrn(1);j.cmp(U)>=0?(j.isub(U),$.isub(re),Q.isub(ne)):(U.isub(j),re.isub($),ne.isub(Q))}return{a:re,b:ne,gcd:U.iushln(se)}},s.prototype._invmp=function(P){a(P.negative===0),a(!P.isZero());var j=this,U=P.clone();j.negative!==0?j=j.umod(P):j=j.clone();for(var $=new s(1),Q=new s(0),re=U.clone();j.cmpn(1)>0&&U.cmpn(1)>0;){for(var ne=0,se=1;!(j.words[0]&se)&&ne<26;++ne,se<<=1);if(ne>0)for(j.iushrn(ne);ne-- >0;)$.isOdd()&&$.iadd(re),$.iushrn(1);for(var G=0,X=1;!(U.words[0]&X)&&G<26;++G,X<<=1);if(G>0)for(U.iushrn(G);G-- >0;)Q.isOdd()&&Q.iadd(re),Q.iushrn(1);j.cmp(U)>=0?(j.isub(U),$.isub(Q)):(U.isub(j),Q.isub($))}var K;return j.cmpn(1)===0?K=$:K=Q,K.cmpn(0)<0&&K.iadd(P),K},s.prototype.gcd=function(P){if(this.isZero())return P.abs();if(P.isZero())return this.abs();var j=this.clone(),U=P.clone();j.negative=0,U.negative=0;for(var $=0;j.isEven()&&U.isEven();$++)j.iushrn(1),U.iushrn(1);do{for(;j.isEven();)j.iushrn(1);for(;U.isEven();)U.iushrn(1);var Q=j.cmp(U);if(Q<0){var re=j;j=U,U=re}else if(Q===0||U.cmpn(1)===0)break;j.isub(U)}while(!0);return U.iushln($)},s.prototype.invm=function(P){return this.egcd(P).a.umod(P)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(P){return this.words[0]&P},s.prototype.bincn=function(P){a(typeof P=="number");var j=P%26,U=(P-j)/26,$=1<>>26,ne&=67108863,this.words[re]=ne}return Q!==0&&(this.words[re]=Q,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(P){var j=P<0;if(this.negative!==0&&!j)return-1;if(this.negative===0&&j)return 1;this.strip();var U;if(this.length>1)U=1;else{j&&(P=-P),a(P<=67108863,"Number is too big");var $=this.words[0]|0;U=$===P?0:$P.length)return 1;if(this.length=0;U--){var $=this.words[U]|0,Q=P.words[U]|0;if($!==Q){$Q&&(j=1);break}}return j},s.prototype.gtn=function(P){return this.cmpn(P)===1},s.prototype.gt=function(P){return this.cmp(P)===1},s.prototype.gten=function(P){return this.cmpn(P)>=0},s.prototype.gte=function(P){return this.cmp(P)>=0},s.prototype.ltn=function(P){return this.cmpn(P)===-1},s.prototype.lt=function(P){return this.cmp(P)===-1},s.prototype.lten=function(P){return this.cmpn(P)<=0},s.prototype.lte=function(P){return this.cmp(P)<=0},s.prototype.eqn=function(P){return this.cmpn(P)===0},s.prototype.eq=function(P){return this.cmp(P)===0},s.red=function(P){return new D(P)},s.prototype.toRed=function(P){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),P.convertTo(this)._forceRed(P)},s.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(P){return this.red=P,this},s.prototype.forceRed=function(P){return a(!this.red,"Already a number in reduction context"),this._forceRed(P)},s.prototype.redAdd=function(P){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,P)},s.prototype.redIAdd=function(P){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,P)},s.prototype.redSub=function(P){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,P)},s.prototype.redISub=function(P){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,P)},s.prototype.redShl=function(P){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,P)},s.prototype.redMul=function(P){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.mul(this,P)},s.prototype.redIMul=function(P){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.imul(this,P)},s.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(P){return a(this.red&&!P.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,P)};var u={k256:null,p224:null,p192:null,p25519:null};function A(F,P){this.name=F,this.p=new s(P,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}A.prototype._tmp=function(){var P=new s(null);return P.words=new Array(Math.ceil(this.n/13)),P},A.prototype.ireduce=function(P){var j=P,U;do this.split(j,this.tmp),j=this.imulK(j),j=j.iadd(this.tmp),U=j.bitLength();while(U>this.n);var $=U0?j.isub(this.p):j.strip!==void 0?j.strip():j._strip(),j},A.prototype.split=function(P,j){P.iushrn(this.n,0,j)},A.prototype.imulK=function(P){return P.imul(this.k)};function x(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(x,A),x.prototype.split=function(P,j){for(var U=4194303,$=Math.min(P.length,9),Q=0;Q<$;Q++)j.words[Q]=P.words[Q];if(j.length=$,P.length<=9){P.words[0]=0,P.length=1;return}var re=P.words[9];for(j.words[j.length++]=re&U,Q=10;Q>>22,re=ne}re>>>=22,P.words[Q-10]=re,re===0&&P.length>10?P.length-=10:P.length-=9},x.prototype.imulK=function(P){P.words[P.length]=0,P.words[P.length+1]=0,P.length+=2;for(var j=0,U=0;U>>=26,P.words[U]=Q,j=$}return j!==0&&(P.words[P.length++]=j),P},s._prime=function(P){if(u[P])return u[P];var j;if(P==="k256")j=new x;else if(P==="p224")j=new z;else if(P==="p192")j=new I;else if(P==="p25519")j=new O;else throw new Error("Unknown prime "+P);return u[P]=j,j};function D(F){if(typeof F=="string"){var P=s._prime(F);this.m=P.p,this.prime=P}else a(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}D.prototype._verify1=function(P){a(P.negative===0,"red works only with positives"),a(P.red,"red works only with red numbers")},D.prototype._verify2=function(P,j){a((P.negative|j.negative)===0,"red works only with positives"),a(P.red&&P.red===j.red,"red works only with red numbers")},D.prototype.imod=function(P){return this.prime?this.prime.ireduce(P)._forceRed(this):P.umod(this.m)._forceRed(this)},D.prototype.neg=function(P){return P.isZero()?P.clone():this.m.sub(P)._forceRed(this)},D.prototype.add=function(P,j){this._verify2(P,j);var U=P.add(j);return U.cmp(this.m)>=0&&U.isub(this.m),U._forceRed(this)},D.prototype.iadd=function(P,j){this._verify2(P,j);var U=P.iadd(j);return U.cmp(this.m)>=0&&U.isub(this.m),U},D.prototype.sub=function(P,j){this._verify2(P,j);var U=P.sub(j);return U.cmpn(0)<0&&U.iadd(this.m),U._forceRed(this)},D.prototype.isub=function(P,j){this._verify2(P,j);var U=P.isub(j);return U.cmpn(0)<0&&U.iadd(this.m),U},D.prototype.shl=function(P,j){return this._verify1(P),this.imod(P.ushln(j))},D.prototype.imul=function(P,j){return this._verify2(P,j),this.imod(P.imul(j))},D.prototype.mul=function(P,j){return this._verify2(P,j),this.imod(P.mul(j))},D.prototype.isqr=function(P){return this.imul(P,P.clone())},D.prototype.sqr=function(P){return this.mul(P,P)},D.prototype.sqrt=function(P){if(P.isZero())return P.clone();var j=this.m.andln(3);if(a(j%2===1),j===3){var U=this.m.add(new s(1)).iushrn(2);return this.pow(P,U)}for(var $=this.m.subn(1),Q=0;!$.isZero()&&$.andln(1)===0;)Q++,$.iushrn(1);a(!$.isZero());var re=new s(1).toRed(this),ne=re.redNeg(),se=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new s(2*G*G).toRed(this);this.pow(G,se).cmp(ne)!==0;)G.redIAdd(ne);for(var X=this.pow(G,$),K=this.pow(P,$.addn(1).iushrn(1)),H=this.pow(P,$),Y=Q;H.cmp(re)!==0;){for(var q=H,Z=0;q.cmp(re)!==0;Z++)q=q.redSqr();a(Z=0;Q--){for(var X=j.words[Q],K=G-1;K>=0;K--){var H=X>>K&1;if(re!==$[0]&&(re=this.sqr(re)),H===0&&ne===0){se=0;continue}ne<<=1,ne|=H,se++,!(se!==U&&(Q!==0||K!==0))&&(re=this.mul(re,$[ne]),se=0,ne=0)}G=26}return re},D.prototype.convertTo=function(P){var j=P.umod(this.m);return j===P?j.clone():j},D.prototype.convertFrom=function(P){var j=P.clone();return j.red=null,j},s.mont=function(P){return new B(P)};function B(F){D.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}o(B,D),B.prototype.convertTo=function(P){return this.imod(P.ushln(this.shift))},B.prototype.convertFrom=function(P){var j=this.imod(P.mul(this.rinv));return j.red=null,j},B.prototype.imul=function(P,j){if(P.isZero()||j.isZero())return P.words[0]=0,P.length=1,P;var U=P.imul(j),$=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub($).iushrn(this.shift),re=Q;return Q.cmp(this.m)>=0?re=Q.isub(this.m):Q.cmpn(0)<0&&(re=Q.iadd(this.m)),re._forceRed(this)},B.prototype.mul=function(P,j){if(P.isZero()||j.isZero())return new s(0)._forceRed(this);var U=P.mul(j),$=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub($).iushrn(this.shift),re=Q;return Q.cmp(this.m)>=0?re=Q.isub(this.m):Q.cmpn(0)<0&&(re=Q.iadd(this.m)),re._forceRed(this)},B.prototype.invm=function(P){var j=this.imod(P._invmp(this.m).mul(this.r2));return j._forceRed(this)}}(l,this)},6204:function(l){"use strict";l.exports=e;function e(t){var n,r,a,o=t.length,s=0;for(n=0;n>>1;if(!(f<=0)){var u,A=n.mallocDouble(2*f*_),x=n.mallocInt32(_);if(_=s(w,f,A,x),_>0){if(f===1&&C)r.init(_),u=r.sweepComplete(f,M,0,_,A,x,0,_,A,x);else{var z=n.mallocDouble(2*f*T),I=n.mallocInt32(T);T=s(S,f,z,I),T>0&&(r.init(_+T),f===1?u=r.sweepBipartite(f,M,0,_,A,x,0,T,z,I):u=a(f,M,C,_,A,x,T,z,I),n.free(z),n.free(I))}n.free(A),n.free(x)}return u}}}var m;function h(w,S){m.push([w,S])}function v(w){return m=[],c(w,w,h,!0),m}function g(w,S){return m=[],c(w,S,h,!1),m}function i(w,S,M){switch(arguments.length){case 1:return v(w);case 2:return typeof S=="function"?c(w,w,S,!0):g(w,S);case 3:return c(w,S,M,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(l,e){"use strict";function t(){function a(c,m,h,v,g,i,w,S,M,C,_){for(var T=2*c,f=v,u=T*v;fM-S?a(c,m,h,v,g,i,w,S,M,C,_):o(c,m,h,v,g,i,w,S,M,C,_)}return s}function n(){function a(h,v,g,i,w,S,M,C,_,T,f){for(var u=2*h,A=i,x=u*i;AT-_?i?a(h,v,g,w,S,M,C,_,T,f,u):o(h,v,g,w,S,M,C,_,T,f,u):i?s(h,v,g,w,S,M,C,_,T,f,u):c(h,v,g,w,S,M,C,_,T,f,u)}return m}function r(a){return a?t():n()}e.partial=r(!1),e.full=r(!0)},7150:function(l,e,t){"use strict";l.exports=F;var n=t(1888),r=t(8828),a=t(2455),o=a.partial,s=a.full,c=t(855),m=t(3545),h=t(8105),v=128,g=1<<22,i=1<<22,w=h("!(lo>=p0)&&!(p1>=hi)"),S=h("lo===p0"),M=h("lo0;){X-=1;var Y=X*f,q=x[Y],Z=x[Y+1],ee=x[Y+2],ae=x[Y+3],he=x[Y+4],xe=x[Y+5],we=X*u,Me=z[we],Se=z[we+1],Ie=xe&1,Ve=!!(xe&16),Ge=Q,ke=re,_e=se,ce=G;if(Ie&&(Ge=se,ke=G,_e=Q,ce=re),!(xe&2&&(ee=M(P,q,Z,ee,Ge,ke,Se),Z>=ee))&&!(xe&4&&(Z=C(P,q,Z,ee,Ge,ke,Me),Z>=ee))){var ve=ee-Z,le=he-ae;if(Ve){if(P*ve*(ve+le)h&&g[T+m]>C;--_,T-=w){for(var f=T,u=T+w,A=0;A>>1,C=2*c,_=M,T=g[C*M+m];w=z?(_=x,T=z):A>=O?(_=u,T=A):(_=I,T=O):z>=O?(_=x,T=z):O>=A?(_=u,T=A):(_=I,T=O);for(var F=C*(S-1),P=C*_,D=0;D=p0)&&!(p1>=hi)":m};function t(h){return e[h]}function n(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+u];if(z===M)if(f===x)f+=1,T+=C;else{for(var I=0;C>I;++I){var O=w[_+I];w[_+I]=w[T],w[T++]=O}var D=S[x];S[x]=S[f],S[f++]=D}}return f}function r(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+u];if(zI;++I){var O=w[_+I];w[_+I]=w[T],w[T++]=O}var D=S[x];S[x]=S[f],S[f++]=D}}return f}function a(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+A];if(z<=M)if(f===x)f+=1,T+=C;else{for(var I=0;C>I;++I){var O=w[_+I];w[_+I]=w[T],w[T++]=O}var D=S[x];S[x]=S[f],S[f++]=D}}return f}function o(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+A];if(z<=M)if(f===x)f+=1,T+=C;else{for(var I=0;C>I;++I){var O=w[_+I];w[_+I]=w[T],w[T++]=O}var D=S[x];S[x]=S[f],S[f++]=D}}return f}function s(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+u],I=w[_+A];if(z<=M&&M<=I)if(f===x)f+=1,T+=C;else{for(var O=0;C>O;++O){var D=w[_+O];w[_+O]=w[T],w[T++]=D}var B=S[x];S[x]=S[f],S[f++]=B}}return f}function c(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+u],I=w[_+A];if(zO;++O){var D=w[_+O];w[_+O]=w[T],w[T++]=D}var B=S[x];S[x]=S[f],S[f++]=B}}return f}function m(h,v,g,i,w,S,M,C){for(var _=2*h,T=_*g,f=T,u=g,A=v,x=h+v,z=g;i>z;++z,T+=_){var I=w[T+A],O=w[T+x];if(!(I>=M)&&!(C>=O))if(u===z)u+=1,f+=_;else{for(var D=0;_>D;++D){var B=w[T+D];w[T+D]=w[f],w[f++]=B}var F=S[z];S[z]=S[u],S[u++]=F}}return u}},4192:function(l){"use strict";l.exports=t;var e=32;function t(v,g){g<=4*e?n(0,g-1,v):h(0,g-1,v)}function n(v,g,i){for(var w=2*(v+1),S=v+1;S<=g;++S){for(var M=i[w++],C=i[w++],_=S,T=w-2;_-- >v;){var f=i[T-2],u=i[T-1];if(fi[g+1]:!0}function m(v,g,i,w){v*=2;var S=w[v];return S>1,_=C-w,T=C+w,f=S,u=_,A=C,x=T,z=M,I=v+1,O=g-1,D=0;c(f,u,i)&&(D=f,f=u,u=D),c(x,z,i)&&(D=x,x=z,z=D),c(f,A,i)&&(D=f,f=A,A=D),c(u,A,i)&&(D=u,u=A,A=D),c(f,x,i)&&(D=f,f=x,x=D),c(A,x,i)&&(D=A,A=x,x=D),c(u,z,i)&&(D=u,u=z,z=D),c(u,A,i)&&(D=u,u=A,A=D),c(x,z,i)&&(D=x,x=z,z=D);for(var B=i[2*u],F=i[2*u+1],P=i[2*x],j=i[2*x+1],U=2*f,$=2*A,Q=2*z,re=2*S,ne=2*C,se=2*M,G=0;G<2;++G){var X=i[U+G],K=i[$+G],H=i[Q+G];i[re+G]=X,i[ne+G]=K,i[se+G]=H}a(_,v,i),a(T,g,i);for(var Y=I;Y<=O;++Y)if(m(Y,B,F,i))Y!==I&&r(Y,I,i),++I;else if(!m(Y,P,j,i))for(;;)if(m(O,P,j,i)){m(O,B,F,i)?(o(Y,I,O,i),++I,--O):(r(Y,O,i),--O);break}else{if(--O>>1;a(w,K);for(var H=0,Y=0,ne=0;ne=o)q=q-o|0,M(h,v,Y--,q);else if(q>=0)M(c,m,H--,q);else if(q<=-o){q=-q-o|0;for(var Z=0;Z>>1;a(w,K);for(var H=0,Y=0,q=0,ne=0;ne>1===w[2*ne+3]>>1&&(ee=2,ne+=1),Z<0){for(var ae=-(Z>>1)-1,he=0;he>1)-1;ee===0?M(c,m,H--,ae):ee===1?M(h,v,Y--,ae):ee===2&&M(g,i,q--,ae)}}}function f(A,x,z,I,O,D,B,F,P,j,U,$){var Q=0,re=2*A,ne=x,se=x+A,G=1,X=1;I?X=o:G=o;for(var K=O;K>>1;a(w,Z);for(var ee=0,K=0;K=o?(he=!I,H-=o):(he=!!I,H-=1),he)C(c,m,ee++,H);else{var xe=$[H],we=re*H,Me=U[we+x+1],Se=U[we+x+1+A];e:for(var Ie=0;Ie>>1;a(w,H);for(var Y=0,se=0;se=o)c[Y++]=G-o;else{G-=1;var Z=U[G],ee=Q*G,ae=j[ee+x+1],he=j[ee+x+1+A];e:for(var xe=0;xe=0;--xe)if(c[xe]===G){for(var Ie=xe+1;Ie0;){for(var S=m.pop(),g=m.pop(),M=-1,C=-1,i=v[g],T=1;T=0||(c.flip(g,S),a(s,c,m,M,g,C),a(s,c,m,g,C,M),a(s,c,m,C,S,M),a(s,c,m,S,M,C))}}},5023:function(l,e,t){"use strict";var n=t(2478);l.exports=m;function r(h,v,g,i,w,S,M){this.cells=h,this.neighbor=v,this.flags=i,this.constraint=g,this.active=w,this.next=S,this.boundary=M}var a=r.prototype;function o(h,v){return h[0]-v[0]||h[1]-v[1]||h[2]-v[2]}a.locate=function(){var h=[0,0,0];return function(v,g,i){var w=v,S=g,M=i;return g0||M.length>0;){for(;S.length>0;){var u=S.pop();if(C[u]!==-w){C[u]=w;for(var A=_[u],x=0;x<3;++x){var z=f[3*u+x];z>=0&&C[z]===0&&(T[3*u+x]?M.push(z):(S.push(z),C[z]=w))}}}var I=M;M=S,S=I,M.length=0,w=-w}var O=c(_,C,v);return g?O.concat(i.boundary):O}},8902:function(l,e,t){"use strict";var n=t(2478),r=t(3250)[3],a=0,o=1,s=2;l.exports=M;function c(C,_,T,f,u){this.a=C,this.b=_,this.idx=T,this.lowerIds=f,this.upperIds=u}function m(C,_,T,f){this.a=C,this.b=_,this.type=T,this.idx=f}function h(C,_){var T=C.a[0]-_.a[0]||C.a[1]-_.a[1]||C.type-_.type;return T||C.type!==a&&(T=r(C.a,C.b,_.b),T)?T:C.idx-_.idx}function v(C,_){return r(C.a,C.b,_)}function g(C,_,T,f,u){for(var A=n.lt(_,f,v),x=n.gt(_,f,v),z=A;z1&&r(T[O[B-2]],T[O[B-1]],f)>0;)C.push([O[B-1],O[B-2],u]),B-=1;O.length=B,O.push(u);for(var D=I.upperIds,B=D.length;B>1&&r(T[D[B-2]],T[D[B-1]],f)<0;)C.push([D[B-2],D[B-1],u]),B-=1;D.length=B,D.push(u)}}function i(C,_){var T;return C.a[0]<_.a[0]?T=r(C.a,C.b,_.a):T=r(_.b,_.a,C.a),T||(_.b[0]I[0]&&u.push(new m(I,z,s,A),new m(z,I,o,A))}u.sort(h);for(var O=u[0].a[0]-(1+Math.abs(u[0].a[0]))*Math.pow(2,-52),D=[new c([O,1],[O,0],-1,[],[],[],[])],B=[],A=0,F=u.length;A=0}}(),a.removeTriangle=function(c,m,h){var v=this.stars;o(v[c],m,h),o(v[m],h,c),o(v[h],c,m)},a.addTriangle=function(c,m,h){var v=this.stars;v[c].push(m,h),v[m].push(h,c),v[h].push(c,m)},a.opposite=function(c,m){for(var h=this.stars[m],v=1,g=h.length;v=0;--P){var X=B[P];j=X[0];var K=O[j],H=K[0],Y=K[1],q=I[H],Z=I[Y];if((q[0]-Z[0]||q[1]-Z[1])<0){var ee=H;H=Y,Y=ee}K[0]=H;var ae=K[1]=X[1],he;for(F&&(he=K[2]);P>0&&B[P-1][0]===j;){var X=B[--P],xe=X[1];F?O.push([ae,xe,he]):O.push([ae,xe]),ae=xe}F?O.push([ae,Y,he]):O.push([ae,Y])}return U}function _(I,O,D){for(var B=O.length,F=new n(B),P=[],j=0;jO[2]?1:0)}function u(I,O,D){if(I.length!==0){if(O)for(var B=0;B0||j.length>0}function z(I,O,D){var B;if(D){B=O;for(var F=new Array(O.length),P=0;PC+1)throw new Error(S+" map requires nshades to be at least size "+w.length);Array.isArray(m.alpha)?m.alpha.length!==2?_=[1,1]:_=m.alpha.slice():typeof m.alpha=="number"?_=[m.alpha,m.alpha]:_=[1,1],h=w.map(function(z){return Math.round(z.index*C)}),_[0]=Math.min(Math.max(_[0],0),1),_[1]=Math.min(Math.max(_[1],0),1);var f=w.map(function(z,I){var O=w[I].index,D=w[I].rgb.slice();return D.length===4&&D[3]>=0&&D[3]<=1||(D[3]=_[0]+(_[1]-_[0])*O),D}),u=[];for(T=0;T=0}function m(h,v,g,i){var w=n(v,g,i);if(w===0){var S=r(n(h,v,g)),M=r(n(h,v,i));if(S===M){if(S===0){var C=c(h,v,g),_=c(h,v,i);return C===_?0:C?1:-1}return 0}else{if(M===0)return S>0||c(h,v,i)?-1:1;if(S===0)return M>0||c(h,v,g)?1:-1}return r(M-S)}var T=n(h,v,g);if(T>0)return w>0&&n(h,v,i)>0?1:-1;if(T<0)return w>0||n(h,v,i)>0?1:-1;var f=n(h,v,i);return f>0||c(h,v,g)?1:-1}},8572:function(l){"use strict";l.exports=function(t){return t<0?-1:t>0?1:0}},8507:function(l){l.exports=n;var e=Math.min;function t(r,a){return r-a}function n(r,a){var o=r.length,s=r.length-a.length;if(s)return s;switch(o){case 0:return 0;case 1:return r[0]-a[0];case 2:return r[0]+r[1]-a[0]-a[1]||e(r[0],r[1])-e(a[0],a[1]);case 3:var c=r[0]+r[1],m=a[0]+a[1];if(s=c+r[2]-(m+a[2]),s)return s;var h=e(r[0],r[1]),v=e(a[0],a[1]);return e(h,r[2])-e(v,a[2])||e(h+r[2],c)-e(v+a[2],m);case 4:var g=r[0],i=r[1],w=r[2],S=r[3],M=a[0],C=a[1],_=a[2],T=a[3];return g+i+w+S-(M+C+_+T)||e(g,i,w,S)-e(M,C,_,T,M)||e(g+i,g+w,g+S,i+w,i+S,w+S)-e(M+C,M+_,M+T,C+_,C+T,_+T)||e(g+i+w,g+i+S,g+w+S,i+w+S)-e(M+C+_,M+C+T,M+_+T,C+_+T);default:for(var f=r.slice().sort(t),u=a.slice().sort(t),A=0;At[r][0]&&(r=a);return nr?[[r],[n]]:[[n]]}},4750:function(l,e,t){"use strict";l.exports=r;var n=t(3090);function r(a){var o=n(a),s=o.length;if(s<=2)return[];for(var c=new Array(s),m=o[s-1],h=0;h=m[M]&&(S+=1);i[w]=S}}return c}function s(c,m){try{return n(c,!0)}catch{var h=r(c);if(h.length<=m)return[];var v=a(c,h),g=n(v,!0);return o(g,h)}}},4769:function(l){"use strict";function e(n,r,a,o,s,c){var m=6*s*s-6*s,h=3*s*s-4*s+1,v=-6*s*s+6*s,g=3*s*s-2*s;if(n.length){c||(c=new Array(n.length));for(var i=n.length-1;i>=0;--i)c[i]=m*n[i]+h*r[i]+v*a[i]+g*o[i];return c}return m*n+h*r+v*a[i]+g*o}function t(n,r,a,o,s,c){var m=s-1,h=s*s,v=m*m,g=(1+2*s)*v,i=s*v,w=h*(3-2*s),S=h*m;if(n.length){c||(c=new Array(n.length));for(var M=n.length-1;M>=0;--M)c[M]=g*n[M]+i*r[M]+w*a[M]+S*o[M];return c}return g*n+i*r+w*a+S*o}l.exports=t,l.exports.derivative=e},7642:function(l,e,t){"use strict";var n=t(8954),r=t(1682);l.exports=c;function a(m,h){this.point=m,this.index=h}function o(m,h){for(var v=m.point,g=h.point,i=v.length,w=0;w=2)return!1;D[F]=P}return!0}):O=O.filter(function(D){for(var B=0;B<=g;++B){var F=A[D[B]];if(F<0)return!1;D[B]=F}return!0}),g&1)for(var S=0;S>>31},l.exports.exponent=function(w){var S=l.exports.hi(w);return(S<<1>>>21)-1023},l.exports.fraction=function(w){var S=l.exports.lo(w),M=l.exports.hi(w),C=M&(1<<20)-1;return M&2146435072&&(C+=1048576),[S,C]},l.exports.denormalized=function(w){var S=l.exports.hi(w);return!(S&2146435072)}},1338:function(l){"use strict";function e(r,a,o){var s=r[o]|0;if(s<=0)return[];var c=new Array(s),m;if(o===r.length-1)for(m=0;m"u"&&(a=0),typeof r){case"number":if(r>0)return t(r|0,a);break;case"object":if(typeof r.length=="number")return e(r,a,0);break}return[]}l.exports=n},3134:function(l,e,t){"use strict";l.exports=r;var n=t(1682);function r(a,o){var s=a.length;if(typeof o!="number"){o=0;for(var c=0;c=g-1)for(var T=S.length-1,u=h-v[g-1],f=0;f=g-1)for(var _=S.length-1,T=h-v[g-1],f=0;f=0;--g)if(h[--v])return!1;return!0},s.jump=function(h){var v=this.lastT(),g=this.dimension;if(!(h0;--f)i.push(a(C[f-1],_[f-1],arguments[f])),w.push(0)}},s.push=function(h){var v=this.lastT(),g=this.dimension;if(!(h1e-6?1/M:0;this._time.push(h);for(var u=g;u>0;--u){var A=a(_[u-1],T[u-1],arguments[u]);i.push(A),w.push((A-i[S++])*f)}}},s.set=function(h){var v=this.dimension;if(!(h0;--C)g.push(a(S[C-1],M[C-1],arguments[C])),i.push(0)}},s.move=function(h){var v=this.lastT(),g=this.dimension;if(!(h<=v||arguments.length!==g+1)){var i=this._state,w=this._velocity,S=i.length-this.dimension,M=this.bounds,C=M[0],_=M[1],T=h-v,f=T>1e-6?1/T:0;this._time.push(h);for(var u=g;u>0;--u){var A=arguments[u];i.push(a(C[u-1],_[u-1],i[S++]+A)),w.push(A*f)}}},s.idle=function(h){var v=this.lastT();if(!(h=0;--f)i.push(a(C[f],_[f],i[S]+T*w[S])),w.push(0),S+=1}};function c(h){for(var v=new Array(h),g=0;g=0;--I){var u=A[I];x[I]<=0?A[I]=new n(u._color,u.key,u.value,A[I+1],u.right,u._count+1):A[I]=new n(u._color,u.key,u.value,u.left,A[I+1],u._count+1)}for(var I=A.length-1;I>1;--I){var O=A[I-1],u=A[I];if(O._color===t||u._color===t)break;var D=A[I-2];if(D.left===O)if(O.left===u){var B=D.right;if(B&&B._color===e)O._color=t,D.right=a(t,B),D._color=e,I-=1;else{if(D._color=e,D.left=O.right,O._color=t,O.right=D,A[I-2]=O,A[I-1]=u,o(D),o(O),I>=3){var F=A[I-3];F.left===D?F.left=O:F.right=O}break}}else{var B=D.right;if(B&&B._color===e)O._color=t,D.right=a(t,B),D._color=e,I-=1;else{if(O.right=u.left,D._color=e,D.left=u.right,u._color=t,u.left=O,u.right=D,A[I-2]=u,A[I-1]=O,o(D),o(O),o(u),I>=3){var F=A[I-3];F.left===D?F.left=u:F.right=u}break}}else if(O.right===u){var B=D.left;if(B&&B._color===e)O._color=t,D.left=a(t,B),D._color=e,I-=1;else{if(D._color=e,D.right=O.left,O._color=t,O.left=D,A[I-2]=O,A[I-1]=u,o(D),o(O),I>=3){var F=A[I-3];F.right===D?F.right=O:F.left=O}break}}else{var B=D.left;if(B&&B._color===e)O._color=t,D.left=a(t,B),D._color=e,I-=1;else{if(O.left=u.right,D._color=e,D.right=u.left,u._color=t,u.right=O,u.left=D,A[I-2]=u,A[I-1]=O,o(D),o(O),o(u),I>=3){var F=A[I-3];F.right===D?F.right=u:F.left=u}break}}}return A[0]._color=t,new s(f,A[0])};function m(_,T){if(T.left){var f=m(_,T.left);if(f)return f}var f=_(T.key,T.value);if(f)return f;if(T.right)return m(_,T.right)}function h(_,T,f,u){var A=T(_,u.key);if(A<=0){if(u.left){var x=h(_,T,f,u.left);if(x)return x}var x=f(u.key,u.value);if(x)return x}if(u.right)return h(_,T,f,u.right)}function v(_,T,f,u,A){var x=f(_,A.key),z=f(T,A.key),I;if(x<=0&&(A.left&&(I=v(_,T,f,u,A.left),I)||z>0&&(I=u(A.key,A.value),I)))return I;if(z>0&&A.right)return v(_,T,f,u,A.right)}c.forEach=function(T,f,u){if(this.root)switch(arguments.length){case 1:return m(T,this.root);case 2:return h(f,this._compare,T,this.root);case 3:return this._compare(f,u)>=0?void 0:v(f,u,this._compare,T,this.root)}},Object.defineProperty(c,"begin",{get:function(){for(var _=[],T=this.root;T;)_.push(T),T=T.left;return new g(this,_)}}),Object.defineProperty(c,"end",{get:function(){for(var _=[],T=this.root;T;)_.push(T),T=T.right;return new g(this,_)}}),c.at=function(_){if(_<0)return new g(this,[]);for(var T=this.root,f=[];;){if(f.push(T),T.left){if(_=T.right._count)break;T=T.right}else break}return new g(this,[])},c.ge=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var x=T(_,f.key);u.push(f),x<=0&&(A=u.length),x<=0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.gt=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var x=T(_,f.key);u.push(f),x<0&&(A=u.length),x<0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.lt=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var x=T(_,f.key);u.push(f),x>0&&(A=u.length),x<=0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.le=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var x=T(_,f.key);u.push(f),x>=0&&(A=u.length),x<0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.find=function(_){for(var T=this._compare,f=this.root,u=[];f;){var A=T(_,f.key);if(u.push(f),A===0)return new g(this,u);A<=0?f=f.left:f=f.right}return new g(this,[])},c.remove=function(_){var T=this.find(_);return T?T.remove():this},c.get=function(_){for(var T=this._compare,f=this.root;f;){var u=T(_,f.key);if(u===0)return f.value;u<=0?f=f.left:f=f.right}};function g(_,T){this.tree=_,this._stack=T}var i=g.prototype;Object.defineProperty(i,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(i,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),i.clone=function(){return new g(this.tree,this._stack.slice())};function w(_,T){_.key=T.key,_.value=T.value,_.left=T.left,_.right=T.right,_._color=T._color,_._count=T._count}function S(_){for(var T,f,u,A,x=_.length-1;x>=0;--x){if(T=_[x],x===0){T._color=t;return}if(f=_[x-1],f.left===T){if(u=f.right,u.right&&u.right._color===e){if(u=f.right=r(u),A=u.right=r(u.right),f.right=u.left,u.left=f,u.right=A,u._color=f._color,T._color=t,f._color=t,A._color=t,o(f),o(u),x>1){var z=_[x-2];z.left===f?z.left=u:z.right=u}_[x-1]=u;return}else if(u.left&&u.left._color===e){if(u=f.right=r(u),A=u.left=r(u.left),f.right=A.left,u.left=A.right,A.left=f,A.right=u,A._color=f._color,f._color=t,u._color=t,T._color=t,o(f),o(u),o(A),x>1){var z=_[x-2];z.left===f?z.left=A:z.right=A}_[x-1]=A;return}if(u._color===t)if(f._color===e){f._color=t,f.right=a(e,u);return}else{f.right=a(e,u);continue}else{if(u=r(u),f.right=u.left,u.left=f,u._color=f._color,f._color=e,o(f),o(u),x>1){var z=_[x-2];z.left===f?z.left=u:z.right=u}_[x-1]=u,_[x]=f,x+1<_.length?_[x+1]=T:_.push(T),x=x+2}}else{if(u=f.left,u.left&&u.left._color===e){if(u=f.left=r(u),A=u.left=r(u.left),f.left=u.right,u.right=f,u.left=A,u._color=f._color,T._color=t,f._color=t,A._color=t,o(f),o(u),x>1){var z=_[x-2];z.right===f?z.right=u:z.left=u}_[x-1]=u;return}else if(u.right&&u.right._color===e){if(u=f.left=r(u),A=u.right=r(u.right),f.left=A.right,u.right=A.left,A.right=f,A.left=u,A._color=f._color,f._color=t,u._color=t,T._color=t,o(f),o(u),o(A),x>1){var z=_[x-2];z.right===f?z.right=A:z.left=A}_[x-1]=A;return}if(u._color===t)if(f._color===e){f._color=t,f.left=a(e,u);return}else{f.left=a(e,u);continue}else{if(u=r(u),f.left=u.right,u.right=f,u._color=f._color,f._color=e,o(f),o(u),x>1){var z=_[x-2];z.right===f?z.right=u:z.left=u}_[x-1]=u,_[x]=f,x+1<_.length?_[x+1]=T:_.push(T),x=x+2}}}}i.remove=function(){var _=this._stack;if(_.length===0)return this.tree;var T=new Array(_.length),f=_[_.length-1];T[T.length-1]=new n(f._color,f.key,f.value,f.left,f.right,f._count);for(var u=_.length-2;u>=0;--u){var f=_[u];f.left===_[u+1]?T[u]=new n(f._color,f.key,f.value,T[u+1],f.right,f._count):T[u]=new n(f._color,f.key,f.value,f.left,T[u+1],f._count)}if(f=T[T.length-1],f.left&&f.right){var A=T.length;for(f=f.left;f.right;)T.push(f),f=f.right;var x=T[A-1];T.push(new n(f._color,x.key,x.value,f.left,f.right,f._count)),T[A-1].key=f.key,T[A-1].value=f.value;for(var u=T.length-2;u>=A;--u)f=T[u],T[u]=new n(f._color,f.key,f.value,f.left,T[u+1],f._count);T[A-1].left=T[A]}if(f=T[T.length-1],f._color===e){var z=T[T.length-2];z.left===f?z.left=null:z.right===f&&(z.right=null),T.pop();for(var u=0;u0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(i,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(i,"index",{get:function(){var _=0,T=this._stack;if(T.length===0){var f=this.tree.root;return f?f._count:0}else T[T.length-1].left&&(_=T[T.length-1].left._count);for(var u=T.length-2;u>=0;--u)T[u+1]===T[u].right&&(++_,T[u].left&&(_+=T[u].left._count));return _},enumerable:!0}),i.next=function(){var _=this._stack;if(_.length!==0){var T=_[_.length-1];if(T.right)for(T=T.right;T;)_.push(T),T=T.left;else for(_.pop();_.length>0&&_[_.length-1].right===T;)T=_[_.length-1],_.pop()}},Object.defineProperty(i,"hasNext",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].right)return!0;for(var T=_.length-1;T>0;--T)if(_[T-1].left===_[T])return!0;return!1}}),i.update=function(_){var T=this._stack;if(T.length===0)throw new Error("Can't update empty node!");var f=new Array(T.length),u=T[T.length-1];f[f.length-1]=new n(u._color,u.key,_,u.left,u.right,u._count);for(var A=T.length-2;A>=0;--A)u=T[A],u.left===T[A+1]?f[A]=new n(u._color,u.key,u.value,f[A+1],u.right,u._count):f[A]=new n(u._color,u.key,u.value,u.left,f[A+1],u._count);return new s(this.tree._compare,f[0])},i.prev=function(){var _=this._stack;if(_.length!==0){var T=_[_.length-1];if(T.left)for(T=T.left;T;)_.push(T),T=T.right;else for(_.pop();_.length>0&&_[_.length-1].left===T;)T=_[_.length-1],_.pop()}},Object.defineProperty(i,"hasPrev",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].left)return!0;for(var T=_.length-1;T>0;--T)if(_[T-1].right===_[T])return!0;return!1}});function M(_,T){return _T?1:0}function C(_){return new s(_||M,null)}},3837:function(l,e,t){"use strict";l.exports=I;var n=t(4935),r=t(501),a=t(5304),o=t(6429),s=t(6444),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),m=ArrayBuffer,h=DataView;function v(O){return m.isView(O)&&!(O instanceof h)}function g(O){return Array.isArray(O)||v(O)}function i(O,D){return O[0]=D[0],O[1]=D[1],O[2]=D[2],O}function w(O){this.gl=O,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(O)}var S=w.prototype;S.update=function(O){O=O||{};function D(H,Y,q){if(q in O){var Z=O[q],ee=this[q],ae;(H?g(Z)&&g(Z[0]):g(Z))?this[q]=ae=[Y(Z[0]),Y(Z[1]),Y(Z[2])]:this[q]=ae=[Y(Z),Y(Z),Y(Z)];for(var he=0;he<3;++he)if(ae[he]!==ee[he])return!0}return!1}var B=D.bind(this,!1,Number),F=D.bind(this,!1,Boolean),P=D.bind(this,!1,String),j=D.bind(this,!0,function(H){if(g(H)){if(H.length===3)return[+H[0],+H[1],+H[2],1];if(H.length===4)return[+H[0],+H[1],+H[2],+H[3]]}return[0,0,0,1]}),U,$=!1,Q=!1;if("bounds"in O)for(var re=O.bounds,ne=0;ne<2;++ne)for(var se=0;se<3;++se)re[ne][se]!==this.bounds[ne][se]&&(Q=!0),this.bounds[ne][se]=re[ne][se];if("ticks"in O){U=O.ticks,$=!0,this.autoTicks=!1;for(var ne=0;ne<3;++ne)this.tickSpacing[ne]=0}else B("tickSpacing")&&(this.autoTicks=!0,Q=!0);if(this._firstInit&&("ticks"in O||"tickSpacing"in O||(this.autoTicks=!0),Q=!0,$=!0,this._firstInit=!1),Q&&this.autoTicks&&(U=s.create(this.bounds,this.tickSpacing),$=!0),$){for(var ne=0;ne<3;++ne)U[ne].sort(function(Y,q){return Y.x-q.x});s.equal(U,this.ticks)?$=!1:this.ticks=U}F("tickEnable"),P("tickFont")&&($=!0),P("tickFontStyle")&&($=!0),P("tickFontWeight")&&($=!0),P("tickFontVariant")&&($=!0),B("tickSize"),B("tickAngle"),B("tickPad"),j("tickColor");var G=P("labels");P("labelFont")&&(G=!0),P("labelFontStyle")&&(G=!0),P("labelFontWeight")&&(G=!0),P("labelFontVariant")&&(G=!0),F("labelEnable"),B("labelSize"),B("labelPad"),j("labelColor"),F("lineEnable"),F("lineMirror"),B("lineWidth"),j("lineColor"),F("lineTickEnable"),F("lineTickMirror"),B("lineTickLength"),B("lineTickWidth"),j("lineTickColor"),F("gridEnable"),B("gridWidth"),j("gridColor"),F("zeroEnable"),j("zeroLineColor"),B("zeroLineWidth"),F("backgroundEnable"),j("backgroundColor");var X=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],K=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(G||$)&&this._text.update(this.bounds,this.labels,X,this.ticks,K):this._text=n(this.gl,this.bounds,this.labels,X,this.ticks,K),this._lines&&$&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=r(this.gl,this.bounds,this.ticks))};function M(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var C=[new M,new M,new M];function _(O,D,B,F,P){for(var j=O.primalOffset,U=O.primalMinor,$=O.mirrorOffset,Q=O.mirrorMinor,re=F[D],ne=0;ne<3;++ne)if(D!==ne){var se=j,G=$,X=U,K=Q;re&1<0?(X[ne]=-1,K[ne]=0):(X[ne]=0,K[ne]=1)}}var T=[0,0,0],f={model:c,view:c,projection:c,_ortho:!1};S.isOpaque=function(){return!0},S.isTransparent=function(){return!1},S.drawTransparent=function(O){};var u=0,A=[0,0,0],x=[0,0,0],z=[0,0,0];S.draw=function(O){O=O||f;for(var q=this.gl,D=O.model||c,B=O.view||c,F=O.projection||c,P=this.bounds,j=O._ortho||!1,U=o(D,B,F,P,j),$=U.cubeEdges,Q=U.axis,re=B[12],ne=B[13],se=B[14],G=B[15],X=j?2:1,K=X*this.pixelRatio*(F[3]*re+F[7]*ne+F[11]*se+F[15]*G)/q.drawingBufferHeight,H=0;H<3;++H)this.lastCubeProps.cubeEdges[H]=$[H],this.lastCubeProps.axis[H]=Q[H];for(var Y=C,H=0;H<3;++H)_(C[H],H,this.bounds,$,Q);for(var q=this.gl,Z=T,H=0;H<3;++H)this.backgroundEnable[H]?Z[H]=Q[H]:Z[H]=0;this._background.draw(D,B,F,P,Z,this.backgroundColor),this._lines.bind(D,B,F,this);for(var H=0;H<3;++H){var ee=[0,0,0];Q[H]>0?ee[H]=P[1][H]:ee[H]=P[0][H];for(var ae=0;ae<2;++ae){var he=(H+1+ae)%3,xe=(H+1+(ae^1))%3;this.gridEnable[he]&&this._lines.drawGrid(he,xe,this.bounds,ee,this.gridColor[he],this.gridWidth[he]*this.pixelRatio)}for(var ae=0;ae<2;++ae){var he=(H+1+ae)%3,xe=(H+1+(ae^1))%3;this.zeroEnable[xe]&&Math.min(P[0][xe],P[1][xe])<=0&&Math.max(P[0][xe],P[1][xe])>=0&&this._lines.drawZero(he,xe,this.bounds,ee,this.zeroLineColor[xe],this.zeroLineWidth[xe]*this.pixelRatio)}}for(var H=0;H<3;++H){this.lineEnable[H]&&this._lines.drawAxisLine(H,this.bounds,Y[H].primalOffset,this.lineColor[H],this.lineWidth[H]*this.pixelRatio),this.lineMirror[H]&&this._lines.drawAxisLine(H,this.bounds,Y[H].mirrorOffset,this.lineColor[H],this.lineWidth[H]*this.pixelRatio);for(var we=i(A,Y[H].primalMinor),Me=i(x,Y[H].mirrorMinor),Se=this.lineTickLength,ae=0;ae<3;++ae){var Ie=K/D[5*ae];we[ae]*=Se[ae]*Ie,Me[ae]*=Se[ae]*Ie}this.lineTickEnable[H]&&this._lines.drawAxisTicks(H,Y[H].primalOffset,we,this.lineTickColor[H],this.lineTickWidth[H]*this.pixelRatio),this.lineTickMirror[H]&&this._lines.drawAxisTicks(H,Y[H].mirrorOffset,Me,this.lineTickColor[H],this.lineTickWidth[H]*this.pixelRatio)}this._lines.unbind(),this._text.bind(D,B,F,this.pixelRatio);var Ve,Ge=.5,ke,_e;function ce(Ye){_e=[0,0,0],_e[Ye]=1}function ve(Ye,yt,gt){var Tt=(Ye+1)%3,At=(Ye+2)%3,$t=yt[Tt],rr=yt[At],_r=gt[Tt],Xt=gt[At];if($t>0&&Xt>0){ce(Tt);return}else if($t>0&&Xt<0){ce(Tt);return}else if($t<0&&Xt>0){ce(Tt);return}else if($t<0&&Xt<0){ce(Tt);return}else if(rr>0&&_r>0){ce(At);return}else if(rr>0&&_r<0){ce(At);return}else if(rr<0&&_r>0){ce(At);return}else if(rr<0&&_r<0){ce(At);return}}for(var H=0;H<3;++H){for(var le=Y[H].primalMinor,Ae=Y[H].mirrorMinor,Be=i(z,Y[H].primalOffset),ae=0;ae<3;++ae)this.lineTickEnable[H]&&(Be[ae]+=K*le[ae]*Math.max(this.lineTickLength[ae],0)/D[5*ae]);var Xe=[0,0,0];if(Xe[H]=1,this.tickEnable[H]){this.tickAngle[H]===-3600?(this.tickAngle[H]=0,this.tickAlign[H]="auto"):this.tickAlign[H]=-1,ke=1,Ve=[this.tickAlign[H],Ge,ke],Ve[0]==="auto"?Ve[0]=u:Ve[0]=parseInt(""+Ve[0]),_e=[0,0,0],ve(H,le,Ae);for(var ae=0;ae<3;++ae)Be[ae]+=K*le[ae]*this.tickPad[ae]/D[5*ae];this._text.drawTicks(H,this.tickSize[H],this.tickAngle[H],Be,this.tickColor[H],Xe,_e,Ve)}if(this.labelEnable[H]){ke=0,_e=[0,0,0],this.labels[H].length>4&&(ce(H),ke=1),Ve=[this.labelAlign[H],Ge,ke],Ve[0]==="auto"?Ve[0]=u:Ve[0]=parseInt(""+Ve[0]);for(var ae=0;ae<3;++ae)Be[ae]+=K*le[ae]*this.labelPad[ae]/D[5*ae];Be[H]+=.5*(P[0][H]+P[1][H]),this._text.drawLabel(H,this.labelSize[H],this.labelAngle[H],Be,this.labelColor[H],[0,0,0],_e,Ve)}}this._text.unbind()},S.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function I(O,D){var B=new w(O);return B.update(D),B}},5304:function(l,e,t){"use strict";l.exports=c;var n=t(2762),r=t(8116),a=t(1879).bg;function o(m,h,v,g){this.gl=m,this.buffer=h,this.vao=v,this.shader=g}var s=o.prototype;s.draw=function(m,h,v,g,i,w){for(var S=!1,M=0;M<3;++M)S=S||i[M];if(S){var C=this.gl;C.enable(C.POLYGON_OFFSET_FILL),C.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:m,view:h,projection:v,bounds:g,enable:i,colors:w},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),C.disable(C.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function c(m){for(var h=[],v=[],g=0,i=0;i<3;++i)for(var w=(i+1)%3,S=(i+2)%3,M=[0,0,0],C=[0,0,0],_=-1;_<=1;_+=2){v.push(g,g+2,g+1,g+1,g+2,g+3),M[i]=_,C[i]=_;for(var T=-1;T<=1;T+=2){M[w]=T;for(var f=-1;f<=1;f+=2)M[S]=f,h.push(M[0],M[1],M[2],C[0],C[1],C[2]),g+=1}var u=w;w=S,S=u}var A=n(m,new Float32Array(h)),x=n(m,new Uint16Array(v),m.ELEMENT_ARRAY_BUFFER),z=r(m,[{buffer:A,type:m.FLOAT,size:3,offset:0,stride:24},{buffer:A,type:m.FLOAT,size:3,offset:12,stride:24}],x),I=a(m);return I.attributes.position.location=0,I.attributes.normal.location=1,new o(m,A,z,I)}},6429:function(l,e,t){"use strict";l.exports=_;var n=t(8828),r=t(6760),a=t(5202),o=t(3250),s=new Array(16),c=new Array(8),m=new Array(8),h=new Array(3),v=[0,0,0];(function(){for(var T=0;T<8;++T)c[T]=[1,1,1,1],m[T]=[1,1,1]})();function g(T,f,u){for(var A=0;A<4;++A){T[A]=u[12+A];for(var x=0;x<3;++x)T[A]+=f[x]*u[4*x+A]}}var i=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function w(T){for(var f=0;fQ&&(B|=1<Q){B|=1<m[I][1])&&(Y=I);for(var q=-1,I=0;I<3;++I){var Z=Y^1<m[ee][0]&&(ee=Z)}}var ae=S;ae[0]=ae[1]=ae[2]=0,ae[n.log2(q^Y)]=Y&q,ae[n.log2(Y^ee)]=Yⅇvar he=ee^7;he===B||he===H?(he=q^7,ae[n.log2(ee^he)]=he&ee):ae[n.log2(q^he)]=he&q;for(var xe=M,we=B,j=0;j<3;++j)we&1<0}function E(s){var c=0,g=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(c=3);c]*>/,l=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,e=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,n=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,r=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function a(s){var c=s.match(e),g=s.match(t),f=s.match(n);return{width:c&&(c[1]||c[2]),height:g&&(g[1]||g[2]),viewbox:f&&(f[1]||f[2])}}function o(s){return r.test(s)?s.match(r)[0]:"px"}G.exports=function(s){if(E(s)){for(var c="",g=0;g>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function a(o,s){return{width:(o[s+6]<<16|o[s+5]<<8|o[s+4])+1,height:(o[s+9]<<16|o[s+8]<<8|o[s+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}G.exports=function(o){if(!(o.length<16)&&!(!b(o,0,e)||!b(o,8,t))){var s=12,c=null,g=0,f=k(o,4)+8;if(!(f>o.length)){for(;s+8=10?c=c||n(o,s+8):v==="VP8L"&&m>=5?c=c||r(o,s+8):v==="VP8X"&&m>=10?c=c||a(o,s+8):v==="EXIF"&&(g=l.get_orientation(o.slice(s+8,s+8+m)),s=1/0),s+=8+m}if(c)return g>0&&(c.orientation=g),c}}}}}),rO=ze({"node_modules/probe-image-size/lib/parsers_sync.js"(J,G){"use strict";G.exports={avif:WB(),bmp:YB(),gif:XB(),ico:ZB(),jpeg:$B(),png:KB(),psd:JB(),svg:QB(),tiff:eO(),webp:tO()}}}),aO=ze({"node_modules/probe-image-size/sync.js"(J,G){"use strict";var p=rO();function b(E){for(var k=Object.keys(p),l=0;l0&&e.height>0?e:null}return null}G.exports=function(k){return b(k)},G.exports.parsers=p}}),nO=ze({"src/traces/image/helpers.js"(J){"use strict";var G=aO(),p=ip().IMAGE_URL_PREFIX,b=$v().Buffer;J.getImageSize=function(E){var k=E.replace(p,""),l=new b(k,"base64");return G(l)}}}),iO=ze({"src/traces/image/calc.js"(J,G){"use strict";var p=Nr(),b=i1(),E=ao(),k=Gi(),l=Nr().maxRowLength,e=nO().getImageSize;G.exports=function(o,s){var c,g;if(s._hasZ)c=s.z.length,g=l(s.z);else if(s._hasSource){var f=e(s.source);c=f.height,g=f.width}var v=k.getFromId(o,s.xaxis||"x"),m=k.getFromId(o,s.yaxis||"y"),i=v.d2c(s.x0)-s.dx/2,T=m.d2c(s.y0)-s.dy/2,S,M=[i,i+g*s.dx],C=[T,T+c*s.dy];if(v&&v.type==="log")for(S=0;S0;)z=c.c2p(C+B*u),B--;for(B=0;O===void 0&&B0;)D=g.c2p(_+B*A),B--;if(zV[0];if(Z||K){var H=x+P/2,X=O+j/2;ne+="transform:"+E(H+"px",X+"px")+"scale("+(Z?-1:1)+","+(K?-1:1)+")"+E(-H+"px",-X+"px")+";"}}re.attr("style",ne);var q=new Promise(function(W){if(T._hasZ)W();else if(T._hasSource)if(T._canvas&&T._canvas.el.width===w&&T._canvas.el.height===h&&T._canvas.source===T.source)W();else{var ee=document.createElement("canvas");ee.width=w,ee.height=h;var ae=ee.getContext("2d",{willReadFrequently:!0});T._image=T._image||new Image;var he=T._image;he.onload=function(){ae.drawImage(he,0,0),T._canvas={el:ee,source:T.source},W()},he.setAttribute("src",T.source)}}).then(function(){var W,ee;if(T._hasZ)ee=Q(function(xe,we){var Me=M[we][xe];return b.isTypedArray(Me)&&(Me=Array.from(Me)),Me}),W=ee.toDataURL("image/png");else if(T._hasSource)if(S)W=T.source;else{var ae=T._canvas.el.getContext("2d",{willReadFrequently:!0}),he=ae.getImageData(0,0,w,h).data;ee=Q(function(xe,we){var Me=4*(we*w+xe);return[he[Me],he[Me+1],he[Me+2],he[Me+3]]}),W=ee.toDataURL("image/png")}re.attr({"xlink:href":W,height:j,width:P,x,y:O})});r._promises.push(q)})}}}),sO=ze({"src/traces/image/style.js"(J,G){"use strict";var p=ci();G.exports=function(E){p.select(E).selectAll(".im image").style("opacity",function(k){return k[0].trace.opacity})}}}),lO=ze({"src/traces/image/hover.js"(J,G){"use strict";var p=Zl(),b=Nr(),E=b.isArrayOrTypedArray,k=i1();G.exports=function(e,t,n){var r=e.cd[0],a=r.trace,o=e.xa,s=e.ya;if(!(p.inbox(t-r.x0,t-(r.x0+r.w*a.dx),0)>0||p.inbox(n-r.y0,n-(r.y0+r.h*a.dy),0)>0)){var c=Math.floor((t-r.x0)/a.dx),g=Math.floor(Math.abs(n-r.y0)/a.dy),f;if(a._hasZ?f=r.z[g][c]:a._hasSource&&(f=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(c,g,1,1).data),!!f){var v=r.hi||a.hoverinfo,m;if(v){var i=v.split("+");i.indexOf("all")!==-1&&(i=["color"]),i.indexOf("color")!==-1&&(m=!0)}var T=k.colormodel[a.colormodel],S=T.colormodel||a.colormodel,M=S.length,C=a._scaler(f),_=T.suffix,w=[];(a.hovertemplate||m)&&(w.push("["+[C[0]+_[0],C[1]+_[1],C[2]+_[2]].join(", ")),M===4&&w.push(", "+C[3]+_[3]),w.push("]"),w=w.join(""),e.extraText=S.toUpperCase()+": "+w);var h;E(a.hovertext)&&E(a.hovertext[g])?h=a.hovertext[g][c]:E(a.text)&&E(a.text[g])&&(h=a.text[g][c]);var u=s.c2p(r.y0+(g+.5)*a.dy),A=r.x0+(c+.5)*a.dx,x=r.y0+(g+.5)*a.dy,z="["+f.slice(0,a.colormodel.length).join(", ")+"]";return[b.extendFlat(e,{index:[g,c],x0:o.c2p(r.x0+c*a.dx),x1:o.c2p(r.x0+(c+1)*a.dx),y0:u,y1:u,color:C,xVal:A,xLabelVal:A,yVal:x,yLabelVal:x,zLabelVal:z,text:h,hovertemplateLabels:{zLabel:z,colorLabel:w,"color[0]Label":C[0]+_[0],"color[1]Label":C[1]+_[1],"color[2]Label":C[2]+_[2],"color[3]Label":C[3]+_[3]}})]}}}}}),uO=ze({"src/traces/image/event_data.js"(J,G){"use strict";G.exports=function(b,E){return"xVal"in E&&(b.x=E.xVal),"yVal"in E&&(b.y=E.yVal),E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),b.color=E.color,b.colormodel=E.trace.colormodel,b.z||(b.z=E.color),b}}}),cO=ze({"src/traces/image/index.js"(J,G){"use strict";G.exports={attributes:(CT(),Po(Sb)).default,supplyDefaults:Gz(),calc:iO(),plot:oO(),style:sO(),hoverPoints:lO(),eventData:uO(),moduleType:"trace",name:"image",basePlotModule:Du(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),fO=ze({"lib/image.js"(J,G){"use strict";G.exports=cO()}}),t0=ze({"src/traces/pie/attributes.js"(J,G){"use strict";var p=ws(),b=Ml().attributes,E=Qs(),k=fc(),{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Ki().extendFlat,r=Uc().pattern,a=E({editType:"plot",arrayOk:!0,colorEditType:"plot"});G.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:k.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:r,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:n({},p.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:l({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:t(),texttemplate:e({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:t({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:n({},a,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:n({},a,{}),outsidetextfont:n({},a,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:n({},p.showlegend,{arrayOk:!0}),legend:n({},p.legend,{arrayOk:!0}),legendrank:n({},p.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:n({},a,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:b({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}}),r0=ze({"src/traces/pie/defaults.js"(J,G){"use strict";var p=ao(),b=Nr(),E=t0(),k=Ml().defaults,l=qh().handleText,e=Nr().coercePattern;function t(a,o){var s=b.isArrayOrTypedArray(a),c=b.isArrayOrTypedArray(o),g=Math.min(s?a.length:1/0,c?o.length:1/0);if(isFinite(g)||(g=0),g&&c){for(var f,v=0;v0){f=!0;break}}f||(g=0)}return{hasLabels:s,hasValues:c,len:g}}function n(a,o,s,c,g){var f=c("marker.line.width");f&&c("marker.line.color",g?void 0:s.paper_bgcolor);var v=c("marker.colors");e(c,"marker.pattern",v),a.marker&&!o.marker.pattern.fgcolor&&(o.marker.pattern.fgcolor=a.marker.colors),o.marker.pattern.bgcolor||(o.marker.pattern.bgcolor=s.paper_bgcolor)}function r(a,o,s,c){function g(x,z){return b.coerce(a,o,E,x,z)}var f=g("labels"),v=g("values"),m=t(f,v),i=m.len;if(o._hasLabels=m.hasLabels,o._hasValues=m.hasValues,!o._hasLabels&&o._hasValues&&(g("label0"),g("dlabel")),!i){o.visible=!1;return}o._length=i,n(a,o,c,g,!0),g("scalegroup");var T=g("text"),S=g("texttemplate");g("texttemplatefallback");var M;if(S||(M=g("textinfo",b.isArrayOrTypedArray(T)?"text+percent":"percent")),g("hovertext"),g("hovertemplate"),g("hovertemplatefallback"),S||M&&M!=="none"){var C=g("textposition");l(a,o,c,g,C,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var _=Array.isArray(C)||C==="auto",w=_||C==="outside";w&&g("automargin"),(C==="inside"||C==="auto"||Array.isArray(C))&&g("insidetextorientation")}else M==="none"&&g("textposition","none");k(o,c,g);var h=g("hole"),u=g("title.text");if(u){var A=g("title.position",h?"middle center":"top center");!h&&A==="middle center"&&(o.title.position="top center"),b.coerceFont(g,"title.font",c.font)}g("sort"),g("direction"),g("rotation"),g("pull")}G.exports={handleLabelsAndValues:t,handleMarkerDefaults:n,supplyDefaults:r}}}),qb=ze({"src/traces/pie/layout_attributes.js"(J,G){"use strict";G.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),hO=ze({"src/traces/pie/layout_defaults.js"(J,G){"use strict";var p=Nr(),b=qb();G.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("hiddenlabels"),e("piecolorway",l.colorway),e("extendpiecolors")}}}),u1=ze({"src/traces/pie/calc.js"(J,G){"use strict";var p=ao(),b=Qn(),E={};function k(n,r){var a=[],o=n._fullLayout,s=o.hiddenlabels||[],c=r.labels,g=r.marker.colors||[],f=r.values,v=r._length,m=r._hasValues&&v,i,T;if(r.dlabel)for(c=new Array(v),i=0;i=0});var x=r.type==="funnelarea"?_:r.sort;return x&&a.sort(function(z,I){return I.v-z.v}),a[0]&&(a[0].vTotal=C),a}function l(n){return function(a,o){if(!a||!b.isValid(a))return!1;let s=b.rgbaString(a);return n[o]||(n[o]=s),s}}function e(n,r){var a=(r||{}).type;a||(a="pie");var o=n._fullLayout,s=n.calcdata,c=o[a+"colorway"],g=o["_"+a+"colormap"];o["extend"+a+"colors"]&&(c=t(c,E));for(var f=0,v=0;v0&&(Be+=gt*le.pxmid[0],Xe+=gt*le.pxmid[1])}le.cxFinal=Be,le.cyFinal=Xe;function Tt(Ot,vt,ht,De){var Ne=De*(vt[0]-Ot[0]),We=De*(vt[1]-Ot[1]);return"a"+De*he.r+","+De*he.r+" 0 "+le.largeArc+(ht?" 1 ":" 0 ")+Ne+","+We}var At=xe.hole;if(le.v===he.vTotal){var $t="M"+(Be+le.px0[0])+","+(Xe+le.px0[1])+Tt(le.px0,le.pxmid,!0,1)+Tt(le.pxmid,le.px0,!0,1)+"Z";At?yt.attr("d","M"+(Be+At*le.px0[0])+","+(Xe+At*le.px0[1])+Tt(le.px0,le.pxmid,!1,At)+Tt(le.pxmid,le.px0,!1,At)+"Z"+$t):yt.attr("d",$t)}else{var rr=Tt(le.px0,le.px1,!0,1);if(At){var _r=1-At;yt.attr("d","M"+(Be+At*le.px1[0])+","+(Xe+At*le.px1[1])+Tt(le.px1,le.px0,!1,At)+"l"+_r*le.px0[0]+","+_r*le.px0[1]+rr+"Z")}else yt.attr("d","M"+Be+","+Xe+"l"+le.px0[0]+","+le.px0[1]+rr+"Z")}se(Z,le,he);var Xt=g.castOption(xe.textposition,le.pts),or=Ye.selectAll("g.slicetext").data(le.text&&Xt!=="none"?[0]:[]);or.enter().append("g").classed("slicetext",!0),or.exit().remove(),or.each(function(){var Ot=e.ensureSingle(p.select(this),"text","",function(et){et.attr("data-notex",1)}),vt=e.ensureUniformFontSize(Z,Xt==="outside"?S(xe,le,X.font):M(xe,le,X.font));Ot.text(le.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,vt).call(r.convertToTspans,Z);var ht=l.bBox(Ot.node()),De;if(Xt==="outside")De=O(ht,le);else if(De=_(ht,le,he),Xt==="auto"&&De.scale<1){var Ne=e.ensureUniformFontSize(Z,xe.outsidetextfont);Ot.call(l.font,Ne),ht=l.bBox(Ot.node()),De=O(ht,le)}var We=De.textPosAngle,Ke=We===void 0?le.pxmid:ne(he.r,We);if(De.targetX=Be+Ke[0]*De.rCenter+(De.x||0),De.targetY=Xe+Ke[1]*De.rCenter+(De.y||0),V(De,ht),De.outside){var Je=De.targetY;le.yLabelMin=Je-ht.height/2,le.yLabelMid=Je,le.yLabelMax=Je+ht.height/2,le.labelExtraX=0,le.labelExtraY=0,Se=!0}De.fontSize=vt.size,o(xe.type,De,X),ee[Ae].transform=De,e.setTransormAndDisplay(Ot,De)})});var Ie=p.select(this).selectAll("g.titletext").data(xe.title.text?[0]:[]);if(Ie.enter().append("g").classed("titletext",!0),Ie.exit().remove(),Ie.each(function(){var le=e.ensureSingle(p.select(this),"text","",function(Xe){Xe.attr("data-notex",1)}),Ae=xe.title.text;xe._meta&&(Ae=e.templateString(Ae,xe._meta)),le.text(Ae).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,xe.title.font).call(r.convertToTspans,Z);var Be;xe.title.position==="middle center"?Be=D(he):Be=B(he,q),le.attr("transform",n(Be.x,Be.y)+t(Math.min(1,Be.scale))+n(Be.tx,Be.ty))}),Se&&U(Me,xe),i(we,xe),Se&&xe.automargin){var Ge=l.bBox(ae.node()),qe=xe.domain,ke=q.w*(qe.x[1]-qe.x[0]),_e=q.h*(qe.y[1]-qe.y[0]),ue=(.5*ke-he.r)/q.w,ve=(.5*_e-he.r)/q.h;b.autoMargin(Z,"pie."+xe.uid+".automargin",{xl:qe.x[0]-ue,xr:qe.x[1]+ue,yb:qe.y[0]-ve,yt:qe.y[1]+ve,l:Math.max(he.cx-he.r-Ge.left,0),r:Math.max(Ge.right-(he.cx+he.r),0),b:Math.max(Ge.bottom-(he.cy+he.r),0),t:Math.max(he.cy-he.r-Ge.top,0),pad:5})}})});setTimeout(function(){W.selectAll("tspan").each(function(){var ee=p.select(this);ee.attr("dy")&&ee.attr("dy",ee.attr("dy"))})},0)}function i(Z,K){Z.each(function(H){var X=p.select(this);if(!H.labelExtraX&&!H.labelExtraY){X.select("path.textline").remove();return}var q=X.select("g.slicetext text");H.transform.targetX+=H.labelExtraX,H.transform.targetY+=H.labelExtraY,e.setTransormAndDisplay(q,H.transform);var W=H.cxFinal+H.pxmid[0],ee=H.cyFinal+H.pxmid[1],ae="M"+W+","+ee,he=(H.yLabelMax-H.yLabelMin)*(H.pxmid[0]<0?-1:1)/4;if(H.labelExtraX){var xe=H.labelExtraX*H.pxmid[1]/H.pxmid[0],we=H.yLabelMid+H.labelExtraY-(H.cyFinal+H.pxmid[1]);Math.abs(xe)>Math.abs(we)?ae+="l"+we*H.pxmid[0]/H.pxmid[1]+","+we+"H"+(W+H.labelExtraX+he):ae+="l"+H.labelExtraX+","+xe+"v"+(we-xe)+"h"+he}else ae+="V"+(H.yLabelMid+H.labelExtraY)+"h"+he;e.ensureSingle(X,"path","textline").call(k.stroke,K.outsidetextfont.color).attr({"stroke-width":Math.min(2,K.outsidetextfont.size/8),d:ae,fill:"none"})})}function T(Z,K,H){var X=H[0],q=X.cx,W=X.cy,ee=X.trace,ae=ee.type==="funnelarea";"_hasHoverLabel"in ee||(ee._hasHoverLabel=!1),"_hasHoverEvent"in ee||(ee._hasHoverEvent=!1),Z.on("mouseover",function(he){var xe=K._fullLayout,we=K._fullData[ee.index];if(!(K._dragging||xe.hovermode===!1)){var Me=we.hoverinfo;if(Array.isArray(Me)&&(Me=E.castHoverinfo({hoverinfo:[g.castOption(Me,he.pts)],_module:ee._module},xe,0)),Me==="all"&&(Me="label+text+value+percent+name"),we.hovertemplate||Me!=="none"&&Me!=="skip"&&Me){var Se=he.rInscribed||0,Ie=q+he.pxmid[0]*(1-Se),Ge=W+he.pxmid[1]*(1-Se),qe=xe.separators,ke=[];if(Me&&Me.indexOf("label")!==-1&&ke.push(he.label),he.text=g.castOption(we.hovertext||we.text,he.pts),Me&&Me.indexOf("text")!==-1){var _e=he.text;e.isValidTextValue(_e)&&ke.push(_e)}he.value=he.v,he.valueLabel=g.formatPieValue(he.v,qe),Me&&Me.indexOf("value")!==-1&&ke.push(he.valueLabel),he.percent=he.v/X.vTotal,he.percentLabel=g.formatPiePercent(he.percent,qe),Me&&Me.indexOf("percent")!==-1&&ke.push(he.percentLabel);var ue=we.hoverlabel,ve=ue.font,le=[];E.loneHover({trace:ee,x0:Ie-Se*X.r,x1:Ie+Se*X.r,y:Ge,_x0:ae?q+he.TL[0]:Ie-Se*X.r,_x1:ae?q+he.TR[0]:Ie+Se*X.r,_y0:ae?W+he.TL[1]:Ge-Se*X.r,_y1:ae?W+he.BL[1]:Ge+Se*X.r,text:ke.join("
"),name:we.hovertemplate||Me.indexOf("name")!==-1?we.name:void 0,idealAlign:he.pxmid[0]<0?"left":"right",color:g.castOption(ue.bgcolor,he.pts)||he.color,borderColor:g.castOption(ue.bordercolor,he.pts),fontFamily:g.castOption(ve.family,he.pts),fontSize:g.castOption(ve.size,he.pts),fontColor:g.castOption(ve.color,he.pts),nameLength:g.castOption(ue.namelength,he.pts),textAlign:g.castOption(ue.align,he.pts),hovertemplate:g.castOption(we.hovertemplate,he.pts),hovertemplateLabels:he,eventData:[f(he,we)]},{container:xe._hoverlayer.node(),outerContainer:xe._paper.node(),gd:K,inOut_bbox:le}),he.bbox=le[0],ee._hasHoverLabel=!0}ee._hasHoverEvent=!0,K.emit("plotly_hover",{points:[f(he,we)],event:p.event})}}),Z.on("mouseout",function(he){var xe=K._fullLayout,we=K._fullData[ee.index],Me=p.select(this).datum();ee._hasHoverEvent&&(he.originalEvent=p.event,K.emit("plotly_unhover",{points:[f(Me,we)],event:p.event}),ee._hasHoverEvent=!1),ee._hasHoverLabel&&(E.loneUnhover(xe._hoverlayer.node()),ee._hasHoverLabel=!1)}),Z.on("click",function(he){var xe=K._fullLayout,we=K._fullData[ee.index];K._dragging||xe.hovermode===!1||(K._hoverdata=[f(he,we)],E.click(K,p.event))})}function S(Z,K,H){var X=g.castOption(Z.outsidetextfont.color,K.pts)||g.castOption(Z.textfont.color,K.pts)||H.color,q=g.castOption(Z.outsidetextfont.family,K.pts)||g.castOption(Z.textfont.family,K.pts)||H.family,W=g.castOption(Z.outsidetextfont.size,K.pts)||g.castOption(Z.textfont.size,K.pts)||H.size,ee=g.castOption(Z.outsidetextfont.weight,K.pts)||g.castOption(Z.textfont.weight,K.pts)||H.weight,ae=g.castOption(Z.outsidetextfont.style,K.pts)||g.castOption(Z.textfont.style,K.pts)||H.style,he=g.castOption(Z.outsidetextfont.variant,K.pts)||g.castOption(Z.textfont.variant,K.pts)||H.variant,xe=g.castOption(Z.outsidetextfont.textcase,K.pts)||g.castOption(Z.textfont.textcase,K.pts)||H.textcase,we=g.castOption(Z.outsidetextfont.lineposition,K.pts)||g.castOption(Z.textfont.lineposition,K.pts)||H.lineposition,Me=g.castOption(Z.outsidetextfont.shadow,K.pts)||g.castOption(Z.textfont.shadow,K.pts)||H.shadow;return{color:X,family:q,size:W,weight:ee,style:ae,variant:he,textcase:xe,lineposition:we,shadow:Me}}function M(Z,K,H){var X=g.castOption(Z.insidetextfont.color,K.pts);!X&&Z._input.textfont&&(X=g.castOption(Z._input.textfont.color,K.pts));var q=g.castOption(Z.insidetextfont.family,K.pts)||g.castOption(Z.textfont.family,K.pts)||H.family,W=g.castOption(Z.insidetextfont.size,K.pts)||g.castOption(Z.textfont.size,K.pts)||H.size,ee=g.castOption(Z.insidetextfont.weight,K.pts)||g.castOption(Z.textfont.weight,K.pts)||H.weight,ae=g.castOption(Z.insidetextfont.style,K.pts)||g.castOption(Z.textfont.style,K.pts)||H.style,he=g.castOption(Z.insidetextfont.variant,K.pts)||g.castOption(Z.textfont.variant,K.pts)||H.variant,xe=g.castOption(Z.insidetextfont.textcase,K.pts)||g.castOption(Z.textfont.textcase,K.pts)||H.textcase,we=g.castOption(Z.insidetextfont.lineposition,K.pts)||g.castOption(Z.textfont.lineposition,K.pts)||H.lineposition,Me=g.castOption(Z.insidetextfont.shadow,K.pts)||g.castOption(Z.textfont.shadow,K.pts)||H.shadow;return{color:X||k.contrast(K.color),family:q,size:W,weight:ee,style:ae,variant:he,textcase:xe,lineposition:we,shadow:Me}}function C(Z,K){for(var H,X,q=0;q=-4;ue-=2)_e(Math.PI*ue,"tan");for(ue=4;ue>=-4;ue-=2)_e(Math.PI*(ue+1),"tan")}if(Me||Ie){for(ue=4;ue>=-4;ue-=2)_e(Math.PI*(ue+1.5),"rad");for(ue=4;ue>=-4;ue-=2)_e(Math.PI*(ue+.5),"rad")}}if(ae||Ge||Me){var ve=Math.sqrt(Z.width*Z.width+Z.height*Z.height);if(ke={scale:q*X*2/ve,rCenter:1-q,rotate:0},ke.textPosAngle=(K.startangle+K.stopangle)/2,ke.scale>=1)return ke;qe.push(ke)}(Ge||Ie)&&(ke=h(Z,X,ee,he,xe),ke.textPosAngle=(K.startangle+K.stopangle)/2,qe.push(ke)),(Ge||Se)&&(ke=u(Z,X,ee,he,xe),ke.textPosAngle=(K.startangle+K.stopangle)/2,qe.push(ke));for(var le=0,Ae=0,Be=0;Be=1)break}return qe[le]}function w(Z,K){var H=Z.startangle,X=Z.stopangle;return H>K&&K>X||H0?1:-1)/2,y:W/(1+H*H/(X*X)),outside:!0}}function D(Z){var K=Math.sqrt(Z.titleBox.width*Z.titleBox.width+Z.titleBox.height*Z.titleBox.height);return{x:Z.cx,y:Z.cy,scale:Z.trace.hole*Z.r*2/K,tx:0,ty:-Z.titleBox.height/2+Z.trace.title.font.size}}function B(Z,K){var H=1,X=1,q,W=Z.trace,ee={x:Z.cx,y:Z.cy},ae={tx:0,ty:0};ae.ty+=W.title.font.size,q=j(W),W.title.position.indexOf("top")!==-1?(ee.y-=(1+q)*Z.r,ae.ty-=Z.titleBox.height):W.title.position.indexOf("bottom")!==-1&&(ee.y+=(1+q)*Z.r);var he=F(Z.r,Z.trace.aspectratio),xe=K.w*(W.domain.x[1]-W.domain.x[0])/2;return W.title.position.indexOf("left")!==-1?(xe=xe+he,ee.x-=(1+q)*he,ae.tx+=Z.titleBox.width/2):W.title.position.indexOf("center")!==-1?xe*=2:W.title.position.indexOf("right")!==-1&&(xe=xe+he,ee.x+=(1+q)*he,ae.tx-=Z.titleBox.width/2),H=xe/Z.titleBox.width,X=P(Z,K)/Z.titleBox.height,{x:ee.x,y:ee.y,scale:Math.min(H,X),tx:ae.tx,ty:ae.ty}}function F(Z,K){return Z/(K===void 0?1:K)}function P(Z,K){var H=Z.trace,X=K.h*(H.domain.y[1]-H.domain.y[0]);return Math.min(Z.titleBox.height,X/2)}function j(Z){var K=Z.pull;if(!K)return 0;var H;if(e.isArrayOrTypedArray(K))for(K=0,H=0;HK&&(K=Z.pull[H]);return K}function U(Z,K){var H,X,q,W,ee,ae,he,xe,we,Me,Se,Ie,Ge;function qe(ve,le){return ve.pxmid[1]-le.pxmid[1]}function ke(ve,le){return le.pxmid[1]-ve.pxmid[1]}function _e(ve,le){le||(le={});var Ae=le.labelExtraY+(X?le.yLabelMax:le.yLabelMin),Be=X?ve.yLabelMin:ve.yLabelMax,Xe=X?ve.yLabelMax:ve.yLabelMin,Ye=ve.cyFinal+ee(ve.px0[1],ve.px1[1]),yt=Ae-Be,gt,Tt,At,$t,rr,_r;if(yt*he>0&&(ve.labelExtraY=yt),!!e.isArrayOrTypedArray(K.pull))for(Tt=0;Tt=(g.castOption(K.pull,At.pts)||0))&&((ve.pxmid[1]-At.pxmid[1])*he>0?($t=At.cyFinal+ee(At.px0[1],At.px1[1]),yt=$t-Be-ve.labelExtraY,yt*he>0&&(ve.labelExtraY+=yt)):(Xe+ve.labelExtraY-Ye)*he>0&&(gt=3*ae*Math.abs(Tt-Me.indexOf(ve)),rr=At.cxFinal+W(At.px0[0],At.px1[0]),_r=rr+gt-(ve.cxFinal+ve.pxmid[0])-ve.labelExtraX,_r*ae>0&&(ve.labelExtraX+=_r)))}for(X=0;X<2;X++)for(q=X?qe:ke,ee=X?Math.max:Math.min,he=X?1:-1,H=0;H<2;H++){for(W=H?Math.max:Math.min,ae=H?1:-1,xe=Z[X][H],xe.sort(q),we=Z[1-X][H],Me=we.concat(xe),Ie=[],Se=0;Se1?(xe=H.r,we=xe/q.aspectratio):(we=H.r,xe=we*q.aspectratio),xe*=(1+q.baseratio)/2,he=xe*we}ee=Math.min(ee,he/H.vTotal)}for(X=0;XK.vTotal/2?1:0,xe.halfangle=Math.PI*Math.min(xe.v/K.vTotal,.5),xe.ring=1-X.hole,xe.rInscribed=I(xe,K))}function ne(Z,K){return[Z*Math.sin(K),-Z*Math.cos(K)]}function se(Z,K,H){var X=Z._fullLayout,q=H.trace,W=q.texttemplate,ee=q.textinfo;if(!W&&ee&&ee!=="none"){var ae=ee.split("+"),he=function(le){return ae.indexOf(le)!==-1},xe=he("label"),we=he("text"),Me=he("value"),Se=he("percent"),Ie=X.separators,Ge;if(Ge=xe?[K.label]:[],we){var qe=g.getFirstFilled(q.text,K.pts);v(qe)&&Ge.push(qe)}Me&&Ge.push(g.formatPieValue(K.v,Ie)),Se&&Ge.push(g.formatPiePercent(K.v/H.vTotal,Ie)),K.text=Ge.join("
")}function ke(le){return{label:le.label,value:le.v,valueLabel:g.formatPieValue(le.v,X.separators),percent:le.v/H.vTotal,percentLabel:g.formatPiePercent(le.v/H.vTotal,X.separators),color:le.color,text:le.text,customdata:e.castOption(q,le.i,"customdata")}}if(W){var _e=e.castOption(q,K.i,"texttemplate");if(!_e)K.text="";else{var ue=ke(K),ve=g.getFirstFilled(q.text,K.pts);(v(ve)||ve==="")&&(ue.text=ve),K.text=e.texttemplateString({data:[ue,q._meta],fallback:q.texttemplatefallback,labels:ue,locale:Z._fullLayout._d3locale,template:_e})}}}function V(Z,K){var H=Z.rotate*Math.PI/180,X=Math.cos(H),q=Math.sin(H),W=(K.left+K.right)/2,ee=(K.top+K.bottom)/2;Z.textX=W*X-ee*q,Z.textY=W*q+ee*X,Z.noCenter=!0}G.exports={plot:m,formatSliceLabel:se,transformInsideText:_,determineInsideTextFont:M,positionTitleOutside:B,prerenderTitles:C,layoutAreas:$,attachFxHandlers:T,computeTransform:V}}}),pO=ze({"src/traces/pie/style.js"(J,G){"use strict";var p=ci(),b=Zm(),E=eh().resizeText;G.exports=function(l){var e=l._fullLayout._pielayer.selectAll(".trace");E(l,e,"pie"),e.each(function(t){var n=t[0],r=n.trace,a=p.select(this);a.style({opacity:r.opacity}),a.selectAll("path.surface").each(function(o){p.select(this).call(b,o,r,l)})})}}}),vO=ze({"src/traces/pie/base_plot.js"(J){"use strict";var G=cl();J.name="pie",J.plot=function(p,b,E,k){G.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){G.cleanBasePlot(J.name,p,b,E,k)}}}),mO=ze({"src/traces/pie/index.js"(J,G){"use strict";G.exports={attributes:t0(),supplyDefaults:r0().supplyDefaults,supplyLayoutDefaults:hO(),layoutAttributes:qb(),calc:u1().calc,crossTraceCalc:u1().crossTraceCalc,plot:Vb().plot,style:pO(),styleOne:Zm(),moduleType:"trace",name:"pie",basePlotModule:vO(),categories:["pie-like","pie","showLegend"],meta:{}}}}),gO=ze({"lib/pie.js"(J,G){"use strict";G.exports=mO()}}),yO=ze({"src/traces/sunburst/base_plot.js"(J){"use strict";var G=cl();J.name="sunburst",J.plot=function(p,b,E,k){G.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){G.cleanBasePlot(J.name,p,b,E,k)}}}),e6=ze({"src/traces/sunburst/constants.js"(J,G){"use strict";G.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),Rg=ze({"src/traces/sunburst/attributes.js"(J,G){"use strict";var p=ws(),{hovertemplateAttrs:b,texttemplateAttrs:E,templatefallbackAttrs:k}=xs(),l=qs(),e=Ml().attributes,t=t0(),n=e6(),r=Ki().extendFlat,a=Uc().pattern;G.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:r({colors:{valType:"data_array",editType:"calc"},line:{color:r({},t.marker.line.color,{dflt:null}),width:r({},t.marker.line.width,{dflt:1}),editType:"calc"},pattern:a,editType:"calc"},l("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:t.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:E({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:k({editType:"plot"}),hovertext:t.hovertext,hoverinfo:r({},p.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:b({},{keys:n.eventDataKeys}),hovertemplatefallback:k(),textfont:t.textfont,insidetextorientation:t.insidetextorientation,insidetextfont:t.insidetextfont,outsidetextfont:r({},t.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:t.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}}}),t6=ze({"src/traces/sunburst/layout_attributes.js"(J,G){"use strict";G.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),_O=ze({"src/traces/sunburst/defaults.js"(J,G){"use strict";var p=Nr(),b=Rg(),E=Ml().defaults,k=qh().handleText,l=r0().handleMarkerDefaults,e=fl(),t=e.hasColorscale,n=e.handleDefaults;G.exports=function(a,o,s,c){function g(M,C){return p.coerce(a,o,b,M,C)}var f=g("labels"),v=g("parents");if(!f||!f.length||!v||!v.length){o.visible=!1;return}var m=g("values");m&&m.length?g("branchvalues"):g("count"),g("level"),g("maxdepth"),l(a,o,c,g);var i=o._hasColorscale=t(a,"marker","colors")||(a.marker||{}).coloraxis;i&&n(a,o,c,g,{prefix:"marker.",cLetter:"c"}),g("leaf.opacity",i?1:.7);var T=g("text");g("texttemplate"),g("texttemplatefallback"),o.texttemplate||g("textinfo",p.isArrayOrTypedArray(T)?"text+label":"label"),g("hovertext"),g("hovertemplate"),g("hovertemplatefallback");var S="auto";k(a,o,c,g,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),g("insidetextorientation"),g("sort"),g("rotation"),g("root.color"),E(o,c,g),o._length=null}}}),xO=ze({"src/traces/sunburst/layout_defaults.js"(J,G){"use strict";var p=Nr(),b=t6();G.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("sunburstcolorway",l.colorway),e("extendsunburstcolors")}}}),Ig=ze({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(J,G){(function(p,b){typeof J=="object"&&typeof G<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(De,Ne){return De.parent===Ne.parent?1:2}function E(De){return De.reduce(k,0)/De.length}function k(De,Ne){return De+Ne.x}function l(De){return 1+De.reduce(e,0)}function e(De,Ne){return Math.max(De,Ne.y)}function t(De){for(var Ne;Ne=De.children;)De=Ne[0];return De}function n(De){for(var Ne;Ne=De.children;)De=Ne[Ne.length-1];return De}function r(){var De=b,Ne=1,We=1,Ke=!1;function Je(et){var Mt,pt=0;et.eachAfter(function(Ht){var Sr=Ht.children;Sr?(Ht.x=E(Sr),Ht.y=l(Sr)):(Ht.x=Mt?pt+=De(Ht,Mt):0,Ht.y=0,Mt=Ht)});var Pt=t(et),Ct=n(et),qt=Pt.x-De(Pt,Ct)/2,Vt=Ct.x+De(Ct,Pt)/2;return et.eachAfter(Ke?function(Ht){Ht.x=(Ht.x-et.x)*Ne,Ht.y=(et.y-Ht.y)*We}:function(Ht){Ht.x=(Ht.x-qt)/(Vt-qt)*Ne,Ht.y=(1-(et.y?Ht.y/et.y:1))*We})}return Je.separation=function(et){return arguments.length?(De=et,Je):De},Je.size=function(et){return arguments.length?(Ke=!1,Ne=+et[0],We=+et[1],Je):Ke?null:[Ne,We]},Je.nodeSize=function(et){return arguments.length?(Ke=!0,Ne=+et[0],We=+et[1],Je):Ke?[Ne,We]:null},Je}function a(De){var Ne=0,We=De.children,Ke=We&&We.length;if(!Ke)Ne=1;else for(;--Ke>=0;)Ne+=We[Ke].value;De.value=Ne}function o(){return this.eachAfter(a)}function s(De){var Ne=this,We,Ke=[Ne],Je,et,Mt;do for(We=Ke.reverse(),Ke=[];Ne=We.pop();)if(De(Ne),Je=Ne.children,Je)for(et=0,Mt=Je.length;et=0;--Je)We.push(Ke[Je]);return this}function g(De){for(var Ne=this,We=[Ne],Ke=[],Je,et,Mt;Ne=We.pop();)if(Ke.push(Ne),Je=Ne.children,Je)for(et=0,Mt=Je.length;et=0;)We+=Ke[Je].value;Ne.value=We})}function v(De){return this.eachBefore(function(Ne){Ne.children&&Ne.children.sort(De)})}function m(De){for(var Ne=this,We=i(Ne,De),Ke=[Ne];Ne!==We;)Ne=Ne.parent,Ke.push(Ne);for(var Je=Ke.length;De!==We;)Ke.splice(Je,0,De),De=De.parent;return Ke}function i(De,Ne){if(De===Ne)return De;var We=De.ancestors(),Ke=Ne.ancestors(),Je=null;for(De=We.pop(),Ne=Ke.pop();De===Ne;)Je=De,De=We.pop(),Ne=Ke.pop();return Je}function T(){for(var De=this,Ne=[De];De=De.parent;)Ne.push(De);return Ne}function S(){var De=[];return this.each(function(Ne){De.push(Ne)}),De}function M(){var De=[];return this.eachBefore(function(Ne){Ne.children||De.push(Ne)}),De}function C(){var De=this,Ne=[];return De.each(function(We){We!==De&&Ne.push({source:We.parent,target:We})}),Ne}function _(De,Ne){var We=new x(De),Ke=+De.value&&(We.value=De.value),Je,et=[We],Mt,pt,Pt,Ct;for(Ne==null&&(Ne=h);Je=et.pop();)if(Ke&&(Je.value=+Je.data.value),(pt=Ne(Je.data))&&(Ct=pt.length))for(Je.children=new Array(Ct),Pt=Ct-1;Pt>=0;--Pt)et.push(Mt=Je.children[Pt]=new x(pt[Pt])),Mt.parent=Je,Mt.depth=Je.depth+1;return We.eachBefore(A)}function w(){return _(this).eachBefore(u)}function h(De){return De.children}function u(De){De.data=De.data.data}function A(De){var Ne=0;do De.height=Ne;while((De=De.parent)&&De.height<++Ne)}function x(De){this.data=De,this.depth=this.height=0,this.parent=null}x.prototype=_.prototype={constructor:x,count:o,each:s,eachAfter:g,eachBefore:c,sum:f,sort:v,path:m,ancestors:T,descendants:S,leaves:M,links:C,copy:w};var z=Array.prototype.slice;function I(De){for(var Ne=De.length,We,Ke;Ne;)Ke=Math.random()*Ne--|0,We=De[Ne],De[Ne]=De[Ke],De[Ke]=We;return De}function O(De){for(var Ne=0,We=(De=I(z.call(De))).length,Ke=[],Je,et;Ne0&&We*We>Ke*Ke+Je*Je}function P(De,Ne){for(var We=0;WePt?(Je=(Ct+Pt-et)/(2*Ct),pt=Math.sqrt(Math.max(0,Pt/Ct-Je*Je)),We.x=De.x-Je*Ke-pt*Mt,We.y=De.y-Je*Mt+pt*Ke):(Je=(Ct+et-Pt)/(2*Ct),pt=Math.sqrt(Math.max(0,et/Ct-Je*Je)),We.x=Ne.x+Je*Ke-pt*Mt,We.y=Ne.y+Je*Mt+pt*Ke)):(We.x=Ne.x+We.r,We.y=Ne.y)}function ne(De,Ne){var We=De.r+Ne.r-1e-6,Ke=Ne.x-De.x,Je=Ne.y-De.y;return We>0&&We*We>Ke*Ke+Je*Je}function se(De){var Ne=De._,We=De.next._,Ke=Ne.r+We.r,Je=(Ne.x*We.r+We.x*Ne.r)/Ke,et=(Ne.y*We.r+We.y*Ne.r)/Ke;return Je*Je+et*et}function V(De){this._=De,this.next=null,this.previous=null}function Z(De){if(!(Je=De.length))return 0;var Ne,We,Ke,Je,et,Mt,pt,Pt,Ct,qt,Vt;if(Ne=De[0],Ne.x=0,Ne.y=0,!(Je>1))return Ne.r;if(We=De[1],Ne.x=-We.r,We.x=Ne.r,We.y=0,!(Je>2))return Ne.r+We.r;re(We,Ne,Ke=De[2]),Ne=new V(Ne),We=new V(We),Ke=new V(Ke),Ne.next=Ke.previous=We,We.next=Ne.previous=Ke,Ke.next=We.previous=Ne;e:for(pt=3;pt0)throw new Error("cycle");return pt}return We.id=function(Ke){return arguments.length?(De=X(Ke),We):De},We.parentId=function(Ke){return arguments.length?(Ne=X(Ke),We):Ne},We}function le(De,Ne){return De.parent===Ne.parent?1:2}function Ae(De){var Ne=De.children;return Ne?Ne[0]:De.t}function Be(De){var Ne=De.children;return Ne?Ne[Ne.length-1]:De.t}function Xe(De,Ne,We){var Ke=We/(Ne.i-De.i);Ne.c-=Ke,Ne.s+=We,De.c+=Ke,Ne.z+=We,Ne.m+=We}function Ye(De){for(var Ne=0,We=0,Ke=De.children,Je=Ke.length,et;--Je>=0;)et=Ke[Je],et.z+=Ne,et.m+=Ne,Ne+=et.s+(We+=et.c)}function yt(De,Ne,We){return De.a.parent===Ne.parent?De.a:We}function gt(De,Ne){this._=De,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=Ne}gt.prototype=Object.create(x.prototype);function Tt(De){for(var Ne=new gt(De,0),We,Ke=[Ne],Je,et,Mt,pt;We=Ke.pop();)if(et=We._.children)for(We.children=new Array(pt=et.length),Mt=pt-1;Mt>=0;--Mt)Ke.push(Je=We.children[Mt]=new gt(et[Mt],Mt)),Je.parent=We;return(Ne.parent=new gt(null,0)).children=[Ne],Ne}function At(){var De=le,Ne=1,We=1,Ke=null;function Je(Ct){var qt=Tt(Ct);if(qt.eachAfter(et),qt.parent.m=-qt.z,qt.eachBefore(Mt),Ke)Ct.eachBefore(Pt);else{var Vt=Ct,Ht=Ct,Sr=Ct;Ct.eachBefore(function(ur){ur.xHt.x&&(Ht=ur),ur.depth>Sr.depth&&(Sr=ur)});var Kr=Vt===Ht?1:De(Vt,Ht)/2,Yt=Kr-Vt.x,Rt=Ne/(Ht.x+Kr+Yt),nr=We/(Sr.depth||1);Ct.eachBefore(function(ur){ur.x=(ur.x+Yt)*Rt,ur.y=ur.depth*nr})}return Ct}function et(Ct){var qt=Ct.children,Vt=Ct.parent.children,Ht=Ct.i?Vt[Ct.i-1]:null;if(qt){Ye(Ct);var Sr=(qt[0].z+qt[qt.length-1].z)/2;Ht?(Ct.z=Ht.z+De(Ct._,Ht._),Ct.m=Ct.z-Sr):Ct.z=Sr}else Ht&&(Ct.z=Ht.z+De(Ct._,Ht._));Ct.parent.A=pt(Ct,Ht,Ct.parent.A||Vt[0])}function Mt(Ct){Ct._.x=Ct.z+Ct.parent.m,Ct.m+=Ct.parent.m}function pt(Ct,qt,Vt){if(qt){for(var Ht=Ct,Sr=Ct,Kr=qt,Yt=Ht.parent.children[0],Rt=Ht.m,nr=Sr.m,ur=Kr.m,cr=Yt.m,Rr;Kr=Be(Kr),Ht=Ae(Ht),Kr&&Ht;)Yt=Ae(Yt),Sr=Be(Sr),Sr.a=Ct,Rr=Kr.z+ur-Ht.z-Rt+De(Kr._,Ht._),Rr>0&&(Xe(yt(Kr,Ct,Vt),Ct,Rr),Rt+=Rr,nr+=Rr),ur+=Kr.m,Rt+=Ht.m,cr+=Yt.m,nr+=Sr.m;Kr&&!Be(Sr)&&(Sr.t=Kr,Sr.m+=ur-nr),Ht&&!Ae(Yt)&&(Yt.t=Ht,Yt.m+=Rt-cr,Vt=Ct)}return Vt}function Pt(Ct){Ct.x*=Ne,Ct.y=Ct.depth*We}return Je.separation=function(Ct){return arguments.length?(De=Ct,Je):De},Je.size=function(Ct){return arguments.length?(Ke=!1,Ne=+Ct[0],We=+Ct[1],Je):Ke?null:[Ne,We]},Je.nodeSize=function(Ct){return arguments.length?(Ke=!0,Ne=+Ct[0],We=+Ct[1],Je):Ke?[Ne,We]:null},Je}function $t(De,Ne,We,Ke,Je){for(var et=De.children,Mt,pt=-1,Pt=et.length,Ct=De.value&&(Je-We)/De.value;++ptur&&(ur=Ct),Zr=Rt*Rt*Qr,cr=Math.max(ur/Zr,Zr/nr),cr>Rr){Rt-=Ct;break}Rr=cr}Mt.push(Pt={value:Rt,dice:Sr1?Ke:1)},We}(rr);function or(){var De=Xt,Ne=!1,We=1,Ke=1,Je=[0],et=q,Mt=q,pt=q,Pt=q,Ct=q;function qt(Ht){return Ht.x0=Ht.y0=0,Ht.x1=We,Ht.y1=Ke,Ht.eachBefore(Vt),Je=[0],Ne&&Ht.eachBefore(Me),Ht}function Vt(Ht){var Sr=Je[Ht.depth],Kr=Ht.x0+Sr,Yt=Ht.y0+Sr,Rt=Ht.x1-Sr,nr=Ht.y1-Sr;Rt=Ht-1){var ur=et[Vt];ur.x0=Kr,ur.y0=Yt,ur.x1=Rt,ur.y1=nr;return}for(var cr=Ct[Vt],Rr=Sr/2+cr,Qr=Vt+1,Zr=Ht-1;Qr>>1;Ct[ha]nr-Yt){var un=(Kr*La+Rt*Pa)/Sr;qt(Vt,Qr,Pa,Kr,Yt,un,nr),qt(Qr,Ht,La,un,Yt,Rt,nr)}else{var Xa=(Yt*La+nr*Pa)/Sr;qt(Vt,Qr,Pa,Kr,Yt,Rt,Xa),qt(Qr,Ht,La,Kr,Xa,Rt,nr)}}}function vt(De,Ne,We,Ke,Je){(De.depth&1?$t:Se)(De,Ne,We,Ke,Je)}var ht=function De(Ne){function We(Ke,Je,et,Mt,pt){if((Pt=Ke._squarify)&&Pt.ratio===Ne)for(var Pt,Ct,qt,Vt,Ht=-1,Sr,Kr=Pt.length,Yt=Ke.value;++Ht1?Ke:1)},We}(rr);p.cluster=r,p.hierarchy=_,p.pack=ae,p.packEnclose=O,p.packSiblings=K,p.partition=Ie,p.stratify=ve,p.tree=At,p.treemap=or,p.treemapBinary=Ot,p.treemapDice=Se,p.treemapResquarify=ht,p.treemapSlice=$t,p.treemapSliceDice=vt,p.treemapSquarify=Xt,Object.defineProperty(p,"__esModule",{value:!0})})}}),Dg=ze({"src/traces/sunburst/calc.js"(J){"use strict";var G=Ig(),p=ao(),b=Nr(),E=fl().makeColorScaleFuncFromTrace,k=u1().makePullColorFn,l=u1().generateExtendedColors,e=fl().calc,t=No().ALMOST_EQUAL,n={},r={},a={};J.calc=function(s,c){var g=s._fullLayout,f=c.ids,v=b.isArrayOrTypedArray(f),m=c.labels,i=c.parents,T=c.values,S=b.isArrayOrTypedArray(T),M=[],C={},_={},w=function(K,H){C[K]?C[K].push(H):C[K]=[H],_[H]=1},h=function(K){return K||typeof K=="number"},u=function(K){return!S||p(T[K])&&T[K]>=0},A,x,z;v?(A=Math.min(f.length,i.length),x=function(K){return h(f[K])&&u(K)},z=function(K){return String(f[K])}):(A=Math.min(m.length,i.length),x=function(K){return h(m[K])&&u(K)},z=function(K){return String(m[K])}),S&&(A=Math.min(A,T.length));for(var I=0;I1){for(var j=b.randstr(),U=0;U>8&15|G>>4&240,G>>4&15|G&240,(G&15)<<4|G&15,1):p===8?Fg(G>>24&255,G>>16&255,G>>8&255,(G&255)/255):p===4?Fg(G>>12&15|G>>8&240,G>>8&15|G>>4&240,G>>4&15|G&240,((G&15)<<4|G&15)/255):null):(G=f6.exec(J))?new ff(G[1],G[2],G[3],1):(G=h6.exec(J))?new ff(G[1]*255/100,G[2]*255/100,G[3]*255/100,1):(G=d6.exec(J))?Fg(G[1],G[2],G[3],G[4]):(G=p6.exec(J))?Fg(G[1]*255/100,G[2]*255/100,G[3]*255/100,G[4]):(G=v6.exec(J))?s6(G[1],G[2]/100,G[3]/100,1):(G=m6.exec(J))?s6(G[1],G[2]/100,G[3]/100,G[4]):Xb.hasOwnProperty(J)?n6(Xb[J]):J==="transparent"?new ff(NaN,NaN,NaN,0):null}function n6(J){return new ff(J>>16&255,J>>8&255,J&255,1)}function Fg(J,G,p,b){return b<=0&&(J=G=p=NaN),new ff(J,G,p,b)}function Hb(J){return J instanceof sp||(J=f1(J)),J?(J=J.rgb(),new ff(J.r,J.g,J.b,J.opacity)):new ff}function zg(J,G,p,b){return arguments.length===1?Hb(J):new ff(J,G,p,b??1)}function ff(J,G,p,b){this.r=+J,this.g=+G,this.b=+p,this.opacity=+b}function i6(){return`#${pv(this.r)}${pv(this.g)}${pv(this.b)}`}function TO(){return`#${pv(this.r)}${pv(this.g)}${pv(this.b)}${pv((isNaN(this.opacity)?1:this.opacity)*255)}`}function o6(){let J=Bg(this.opacity);return`${J===1?"rgb(":"rgba("}${dv(this.r)}, ${dv(this.g)}, ${dv(this.b)}${J===1?")":`, ${J})`}`}function Bg(J){return isNaN(J)?1:Math.max(0,Math.min(1,J))}function dv(J){return Math.max(0,Math.min(255,Math.round(J)||0))}function pv(J){return J=dv(J),(J<16?"0":"")+J.toString(16)}function s6(J,G,p,b){return b<=0?J=G=p=NaN:p<=0||p>=1?J=G=NaN:G<=0&&(J=NaN),new ud(J,G,p,b)}function l6(J){if(J instanceof ud)return new ud(J.h,J.s,J.l,J.opacity);if(J instanceof sp||(J=f1(J)),!J)return new ud;if(J instanceof ud)return J;J=J.rgb();var G=J.r/255,p=J.g/255,b=J.b/255,E=Math.min(G,p,b),k=Math.max(G,p,b),l=NaN,e=k-E,t=(k+E)/2;return e?(G===k?l=(p-b)/e+(p0&&t<1?0:l,new ud(l,e,t,J.opacity)}function Wb(J,G,p,b){return arguments.length===1?l6(J):new ud(J,G,p,b??1)}function ud(J,G,p,b){this.h=+J,this.s=+G,this.l=+p,this.opacity=+b}function u6(J){return J=(J||0)%360,J<0?J+360:J}function Og(J){return Math.max(0,Math.min(1,J||0))}function Yb(J,G,p){return(J<60?G+(p-G)*J/60:J<180?p:J<240?G+(p-G)*(240-J)/60:G)*255}var lp,vv,mv,n0,cd,c6,f6,h6,d6,p6,v6,m6,Xb,Zb=zi({"node_modules/d3-color/src/color.js"(){Gb(),lp=.7,vv=1/lp,mv="\\s*([+-]?\\d+)\\s*",n0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",cd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",c6=/^#([0-9a-f]{3,8})$/,f6=new RegExp(`^rgb\\(${mv},${mv},${mv}\\)$`),h6=new RegExp(`^rgb\\(${cd},${cd},${cd}\\)$`),d6=new RegExp(`^rgba\\(${mv},${mv},${mv},${n0}\\)$`),p6=new RegExp(`^rgba\\(${cd},${cd},${cd},${n0}\\)$`),v6=new RegExp(`^hsl\\(${n0},${cd},${cd}\\)$`),m6=new RegExp(`^hsla\\(${n0},${cd},${cd},${n0}\\)$`),Xb={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},a0(sp,f1,{copy(J){return Object.assign(new this.constructor,this,J)},displayable(){return this.rgb().displayable()},hex:r6,formatHex:r6,formatHex8:bO,formatHsl:wO,formatRgb:a6,toString:a6}),a0(ff,zg,c1(sp,{brighter(J){return J=J==null?vv:Math.pow(vv,J),new ff(this.r*J,this.g*J,this.b*J,this.opacity)},darker(J){return J=J==null?lp:Math.pow(lp,J),new ff(this.r*J,this.g*J,this.b*J,this.opacity)},rgb(){return this},clamp(){return new ff(dv(this.r),dv(this.g),dv(this.b),Bg(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:i6,formatHex:i6,formatHex8:TO,formatRgb:o6,toString:o6})),a0(ud,Wb,c1(sp,{brighter(J){return J=J==null?vv:Math.pow(vv,J),new ud(this.h,this.s,this.l*J,this.opacity)},darker(J){return J=J==null?lp:Math.pow(lp,J),new ud(this.h,this.s,this.l*J,this.opacity)},rgb(){var J=this.h%360+(this.h<0)*360,G=isNaN(J)||isNaN(this.s)?0:this.s,p=this.l,b=p+(p<.5?p:1-p)*G,E=2*p-b;return new ff(Yb(J>=240?J-240:J+120,E,b),Yb(J,E,b),Yb(J<120?J+240:J-120,E,b),this.opacity)},clamp(){return new ud(u6(this.h),Og(this.s),Og(this.l),Bg(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let J=Bg(this.opacity);return`${J===1?"hsl(":"hsla("}${u6(this.h)}, ${Og(this.s)*100}%, ${Og(this.l)*100}%${J===1?")":`, ${J})`}`}}))}}),$b,Kb,g6=zi({"node_modules/d3-color/src/math.js"(){$b=Math.PI/180,Kb=180/Math.PI}});function y6(J){if(J instanceof wd)return new wd(J.l,J.a,J.b,J.opacity);if(J instanceof Ud)return _6(J);J instanceof ff||(J=Hb(J));var G=r2(J.r),p=r2(J.g),b=r2(J.b),E=Qb((.2225045*G+.7168786*p+.0606169*b)/i2),k,l;return G===p&&p===b?k=l=E:(k=Qb((.4360747*G+.3850649*p+.1430804*b)/n2),l=Qb((.0139322*G+.0971045*p+.7141733*b)/o2)),new wd(116*E-16,500*(k-E),200*(E-l),J.opacity)}function Jb(J,G,p,b){return arguments.length===1?y6(J):new wd(J,G,p,b??1)}function wd(J,G,p,b){this.l=+J,this.a=+G,this.b=+p,this.opacity=+b}function Qb(J){return J>x6?Math.pow(J,.3333333333333333):J/l2+s2}function e2(J){return J>gv?J*J*J:l2*(J-s2)}function t2(J){return 255*(J<=.0031308?12.92*J:1.055*Math.pow(J,.4166666666666667)-.055)}function r2(J){return(J/=255)<=.04045?J/12.92:Math.pow((J+.055)/1.055,2.4)}function AO(J){if(J instanceof Ud)return new Ud(J.h,J.c,J.l,J.opacity);if(J instanceof wd||(J=y6(J)),J.a===0&&J.b===0)return new Ud(NaN,0=1?(p=1,G-1):Math.floor(p*G),E=J[b],k=J[b+1],l=b>0?J[b-1]:2*E-k,e=b()=>J}});function S6(J,G){return function(p){return J+p*G}}function kO(J,G,p){return J=Math.pow(J,p),G=Math.pow(G,p)-J,p=1/p,function(b){return Math.pow(J+b*G,p)}}function Ug(J,G){var p=G-J;return p?S6(J,p>180||p<-180?p-360*Math.round(p/360):p):p1(isNaN(J)?G:J)}function CO(J){return(J=+J)==1?hf:function(G,p){return p-G?kO(G,p,J):p1(isNaN(G)?p:G)}}function hf(J,G){var p=G-J;return p?S6(J,p):p1(isNaN(J)?G:J)}var s0=zi({"node_modules/d3-interpolate/src/color.js"(){M6()}});function E6(J){return function(G){var p=G.length,b=new Array(p),E=new Array(p),k=new Array(p),l,e;for(l=0;lp&&(k=G.slice(p,k),e[l]?e[l]+=k:e[++l]=k),(b=b[0])===(E=E[0])?e[l]?e[l]+=E:e[++l]=E:(e[++l]=null,t.push({i:l,x:Td(b,E)})),p=Hg.lastIndex;return p180?r+=360:r-n>180&&(n+=360),o.push({i:a.push(E(a)+"rotate(",null,b)-2,x:Td(n,r)})):r&&a.push(E(a)+"rotate("+r+b)}function e(n,r,a,o){n!==r?o.push({i:a.push(E(a)+"skewX(",null,b)-2,x:Td(n,r)}):r&&a.push(E(a)+"skewX("+r+b)}function t(n,r,a,o,s,c){if(n!==a||r!==o){var g=s.push(E(s)+"scale(",null,",",null,")");c.push({i:g-4,x:Td(n,a)},{i:g-2,x:Td(r,o)})}else(a!==1||o!==1)&&s.push(E(s)+"scale("+a+","+o+")")}return function(n,r){var a=[],o=[];return n=J(n),r=J(r),k(n.translateX,n.translateY,r.translateX,r.translateY,a,o),l(n.rotate,r.rotate,a,o),e(n.skewX,r.skewX,a,o),t(n.scaleX,n.scaleY,r.scaleX,r.scaleY,a,o),n=r=null,function(s){for(var c=-1,g=o.length,f;++cWg,interpolateArray:()=>LO,interpolateBasis:()=>w6,interpolateBasisClosed:()=>T6,interpolateCubehelix:()=>eA,interpolateCubehelixLong:()=>tA,interpolateDate:()=>D6,interpolateDiscrete:()=>IO,interpolateHcl:()=>K6,interpolateHclLong:()=>J6,interpolateHsl:()=>X6,interpolateHslLong:()=>Z6,interpolateHue:()=>FO,interpolateLab:()=>XO,interpolateNumber:()=>Td,interpolateNumberArray:()=>v2,interpolateObject:()=>z6,interpolateRgb:()=>qg,interpolateRgbBasis:()=>k6,interpolateRgbBasisClosed:()=>C6,interpolateRound:()=>BO,interpolateString:()=>O6,interpolateTransformCss:()=>q6,interpolateTransformSvg:()=>V6,interpolateZoom:()=>W6,piecewise:()=>JO,quantize:()=>eN});var l0=zi({"node_modules/d3-interpolate/src/index.js"(){Yg(),I6(),p2(),A6(),F6(),DO(),zO(),Vg(),m2(),B6(),OO(),N6(),VO(),WO(),L6(),YO(),ZO(),$O(),KO(),QO(),tN()}}),y2=ze({"src/traces/sunburst/fill_one.js"(J,G){"use strict";var p=Xi(),b=Qn();G.exports=function(k,l,e,t,n){var r=l.data.data,a=r.i,o=n||r.color;if(a>=0){l.i=r.i;var s=e.marker;s.pattern?(!s.colors||!s.pattern.shape)&&(s.color=o,l.color=o):(s.color=o,l.color=o),p.pointStyle(k,e,t,l)}else b.fill(k,o)}}}),rA=ze({"src/traces/sunburst/style.js"(J,G){"use strict";var p=ci(),b=Qn(),E=Nr(),k=eh().resizeText,l=y2();function e(n){var r=n._fullLayout._sunburstlayer.selectAll(".trace");k(n,r,"sunburst"),r.each(function(a){var o=p.select(this),s=a[0],c=s.trace;o.style("opacity",c.opacity),o.selectAll("path.surface").each(function(g){p.select(this).call(t,g,c,n)})})}function t(n,r,a,o){var s=r.data.data,c=!r.children,g=s.i,f=E.castOption(a,g,"marker.line.color")||b.defaultLine,v=E.castOption(a,g,"marker.line.width")||0;n.call(l,r,a,o).style("stroke-width",v).call(b.stroke,f).style("opacity",c?a.leaf.opacity:null)}G.exports={style:e,styleOne:t}}}),up=ze({"src/traces/sunburst/helpers.js"(J){"use strict";var G=Nr(),p=Qn(),b=gd(),E=lv();J.findEntryWithLevel=function(t,n){var r;return n&&t.eachAfter(function(a){if(J.getPtId(a)===n)return r=a.copy()}),r||t},J.findEntryWithChild=function(t,n){var r;return t.eachAfter(function(a){for(var o=a.children||[],s=0;s0)},J.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},J.isHeader=function(t,n){return!(J.isLeaf(t)||t.depth===n._maxDepth-1)};function e(t){return t.data.data.pid}J.getParent=function(t,n){return J.findEntryWithLevel(t,e(n))},J.listPath=function(t,n){var r=t.parent;if(!r)return[];var a=n?[r.data[n]]:[r];return J.listPath(r,n).concat(a)},J.getPath=function(t){return J.listPath(t,"label").join("/")+"/"},J.formatValue=E.formatPieValue,J.formatPercent=function(t,n){var r=G.formatPercent(t,0);return r==="0%"&&(r=E.formatPiePercent(t,n)),r}}}),$g=ze({"src/traces/sunburst/fx.js"(J,G){"use strict";var p=ci(),b=mi(),E=kh().appendArrayPointValue,k=Zl(),l=Nr(),e=Hm(),t=up(),n=lv(),r=n.formatPieValue;G.exports=function(s,c,g,f,v){var m=f[0],i=m.trace,T=m.hierarchy,S=i.type==="sunburst",M=i.type==="treemap"||i.type==="icicle";"_hasHoverLabel"in i||(i._hasHoverLabel=!1),"_hasHoverEvent"in i||(i._hasHoverEvent=!1);var C=function(h){var u=g._fullLayout;if(!(g._dragging||u.hovermode===!1)){var A=g._fullData[i.index],x=h.data.data,z=x.i,I=t.isHierarchyRoot(h),O=t.getParent(T,h),D=t.getValue(h),B=function(ee){return l.castOption(A,z,ee)},F=B("hovertemplate"),P=k.castHoverinfo(A,u,z),j=u.separators,U;if(F||P&&P!=="none"&&P!=="skip"){var $,Q;S&&($=m.cx+h.pxmid[0]*(1-h.rInscribed),Q=m.cy+h.pxmid[1]*(1-h.rInscribed)),M&&($=h._hoverX,Q=h._hoverY);var re={},ne=[],se=[],V=function(ee){return ne.indexOf(ee)!==-1};P&&(ne=P==="all"?A._module.attributes.hoverinfo.flags:P.split("+")),re.label=x.label,V("label")&&re.label&&se.push(re.label),x.hasOwnProperty("v")&&(re.value=x.v,re.valueLabel=r(re.value,j),V("value")&&se.push(re.valueLabel)),re.currentPath=h.currentPath=t.getPath(h.data),V("current path")&&!I&&se.push(re.currentPath);var Z,K=[],H=function(){K.indexOf(Z)===-1&&(se.push(Z),K.push(Z))};re.percentParent=h.percentParent=D/t.getValue(O),re.parent=h.parentString=t.getPtLabel(O),V("percent parent")&&(Z=t.formatPercent(re.percentParent,j)+" of "+re.parent,H()),re.percentEntry=h.percentEntry=D/t.getValue(c),re.entry=h.entry=t.getPtLabel(c),V("percent entry")&&!I&&!h.onPathbar&&(Z=t.formatPercent(re.percentEntry,j)+" of "+re.entry,H()),re.percentRoot=h.percentRoot=D/t.getValue(T),re.root=h.root=t.getPtLabel(T),V("percent root")&&!I&&(Z=t.formatPercent(re.percentRoot,j)+" of "+re.root,H()),re.text=B("hovertext")||B("text"),V("text")&&(Z=re.text,l.isValidTextValue(Z)&&se.push(Z)),U=[a(h,A,v.eventDataKeys)];var X={trace:A,y:Q,_x0:h._x0,_x1:h._x1,_y0:h._y0,_y1:h._y1,text:se.join("
"),name:F||V("name")?A.name:void 0,color:B("hoverlabel.bgcolor")||x.color,borderColor:B("hoverlabel.bordercolor"),fontFamily:B("hoverlabel.font.family"),fontSize:B("hoverlabel.font.size"),fontColor:B("hoverlabel.font.color"),fontWeight:B("hoverlabel.font.weight"),fontStyle:B("hoverlabel.font.style"),fontVariant:B("hoverlabel.font.variant"),nameLength:B("hoverlabel.namelength"),textAlign:B("hoverlabel.align"),hovertemplate:F,hovertemplateLabels:re,eventData:U};S&&(X.x0=$-h.rInscribed*h.rpx1,X.x1=$+h.rInscribed*h.rpx1,X.idealAlign=h.pxmid[0]<0?"left":"right"),M&&(X.x=$,X.idealAlign=$<0?"left":"right");var q=[];k.loneHover(X,{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:g,inOut_bbox:q}),U[0].bbox=q[0],i._hasHoverLabel=!0}if(M){var W=s.select("path.surface");v.styleOne(W,h,A,g,{hovered:!0})}i._hasHoverEvent=!0,g.emit("plotly_hover",{points:U||[a(h,A,v.eventDataKeys)],event:p.event})}},_=function(h){var u=g._fullLayout,A=g._fullData[i.index],x=p.select(this).datum();if(i._hasHoverEvent&&(h.originalEvent=p.event,g.emit("plotly_unhover",{points:[a(x,A,v.eventDataKeys)],event:p.event}),i._hasHoverEvent=!1),i._hasHoverLabel&&(k.loneUnhover(u._hoverlayer.node()),i._hasHoverLabel=!1),M){var z=s.select("path.surface");v.styleOne(z,x,A,g,{hovered:!1})}},w=function(h){var u=g._fullLayout,A=g._fullData[i.index],x=S&&(t.isHierarchyRoot(h)||t.isLeaf(h)),z=t.getPtId(h),I=t.isEntry(h)?t.findEntryWithChild(T,z):t.findEntryWithLevel(T,z),O=t.getPtId(I),D={points:[a(h,A,v.eventDataKeys)],event:p.event};x||(D.nextLevel=O);var B=e.triggerHandler(g,"plotly_"+i.type+"click",D);if(B!==!1&&u.hovermode&&(g._hoverdata=[a(h,A,v.eventDataKeys)],k.click(g,p.event)),!x&&B!==!1&&!g._dragging&&!g._transitioning){b.call("_storeDirectGUIEdit",A,u._tracePreGUI[A.uid],{level:A.level});var F={data:[{level:O}],traces:[i.index]},P={frame:{redraw:!1,duration:v.transitionTime},transition:{duration:v.transitionTime,easing:v.transitionEasing},mode:"immediate",fromcurrent:!0};k.loneUnhover(u._hoverlayer.node()),b.call("animate",g,F,P)}};s.on("mouseover",C),s.on("mouseout",_),s.on("click",w)};function a(o,s,c){for(var g=o.data.data,f={curveNumber:s.index,pointNumber:g.i,data:s._input,fullData:s},v=0;vXe.x1?2*Math.PI:0)+ee;Ye=le.rpx1Ie?2*Math.PI:0)+ee;Be={x0:Ye,x1:Ye}}else Be={rpx0:ne,rpx1:ne},k.extendFlat(Be,ve(le));else Be={rpx0:0,rpx1:0};else Be={x0:ee,x1:ee};return b(Be,Xe)}function ue(le){var Ae=K[m.getPtId(le)],Be,Xe=le.transform;if(Ae)Be=Ae;else if(Be={rpx1:le.rpx1,transform:{textPosAngle:Xe.textPosAngle,scale:0,rotate:Xe.rotate,rCenter:Xe.rCenter,x:Xe.x,y:Xe.y}},Z)if(le.parent)if(Ie){var Ye=le.x1>Ie?2*Math.PI:0;Be.x0=Be.x1=Ye}else k.extendFlat(Be,ve(le));else Be.x0=Be.x1=ee;else Be.x0=Be.x1=ee;var yt=b(Be.transform.textPosAngle,le.transform.textPosAngle),gt=b(Be.rpx1,le.rpx1),Tt=b(Be.x0,le.x0),At=b(Be.x1,le.x1),$t=b(Be.transform.scale,Xe.scale),rr=b(Be.transform.rotate,Xe.rotate),_r=Xe.rCenter===0?3:Be.transform.rCenter===0?1/3:1,Xt=b(Be.transform.rCenter,Xe.rCenter),or=function(Ot){return Xt(Math.pow(Ot,_r))};return function(Ot){var vt=gt(Ot),ht=Tt(Ot),De=At(Ot),Ne=or(Ot),We=xe(vt,(ht+De)/2),Ke=yt(Ot),Je={pxmid:We,rpx1:vt,transform:{textPosAngle:Ke,rCenter:Ne,x:Xe.x,y:Xe.y}};return t(B.type,Xe,x),{transform:{targetX:Me(Je),targetY:Se(Je),scale:$t(Ot),rotate:rr(Ot),rCenter:Ne}}}}function ve(le){var Ae=le.parent,Be=K[m.getPtId(Ae)],Xe={};if(Be){var Ye=Ae.children,yt=Ye.indexOf(le),gt=Ye.length,Tt=b(Be.x0,Be.x1);Xe.x0=Tt(yt/gt),Xe.x1=Tt(yt/gt)}else Xe.x0=Xe.x1=0;return Xe}}function T(_){return p.partition().size([2*Math.PI,_.height+1])(_)}J.formatSliceLabel=function(_,w,h,u,A){var x=h.texttemplate,z=h.textinfo;if(!x&&(!z||z==="none"))return"";var I=A.separators,O=u[0],D=_.data.data,B=O.hierarchy,F=m.isHierarchyRoot(_),P=m.getParent(B,_),j=m.getValue(_);if(!x){var U=z.split("+"),$=function(q){return U.indexOf(q)!==-1},Q=[],re;if($("label")&&D.label&&Q.push(D.label),D.hasOwnProperty("v")&&$("value")&&Q.push(m.formatValue(D.v,I)),!F){$("current path")&&Q.push(m.getPath(_.data));var ne=0;$("percent parent")&&ne++,$("percent entry")&&ne++,$("percent root")&&ne++;var se=ne>1;if(ne){var V,Z=function(q){re=m.formatPercent(V,I),se&&(re+=" of "+q),Q.push(re)};$("percent parent")&&!F&&(V=j/m.getValue(P),Z("parent")),$("percent entry")&&(V=j/m.getValue(w),Z("entry")),$("percent root")&&(V=j/m.getValue(B),Z("root"))}}return $("text")&&(re=k.castOption(h,D.i,"text"),k.isValidTextValue(re)&&Q.push(re)),Q.join("
")}var K=k.castOption(h,D.i,"texttemplate");if(!K)return"";var H={};D.label&&(H.label=D.label),D.hasOwnProperty("v")&&(H.value=D.v,H.valueLabel=m.formatValue(D.v,I)),H.currentPath=m.getPath(_.data),F||(H.percentParent=j/m.getValue(P),H.percentParentLabel=m.formatPercent(H.percentParent,I),H.parent=m.getPtLabel(P)),H.percentEntry=j/m.getValue(w),H.percentEntryLabel=m.formatPercent(H.percentEntry,I),H.entry=m.getPtLabel(w),H.percentRoot=j/m.getValue(B),H.percentRootLabel=m.formatPercent(H.percentRoot,I),H.root=m.getPtLabel(B),D.hasOwnProperty("color")&&(H.color=D.color);var X=k.castOption(h,D.i,"text");return(k.isValidTextValue(X)||X==="")&&(H.text=X),H.customdata=k.castOption(h,D.i,"customdata"),k.texttemplateString({data:[H,h._meta],fallback:h.texttemplatefallback,labels:H,locale:A._d3locale,template:K})};function S(_){return _.rpx0===0&&k.isFullCircle([_.x0,_.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(_.halfangle)),_.ring/2))}function M(_){return C(_.rpx1,_.transform.textPosAngle)}function C(_,w){return[_*Math.sin(w),-_*Math.cos(w)]}}}),rN=ze({"src/traces/sunburst/index.js"(J,G){"use strict";G.exports={moduleType:"trace",name:"sunburst",basePlotModule:yO(),categories:[],animatable:!0,attributes:Rg(),layoutAttributes:t6(),supplyDefaults:_O(),supplyLayoutDefaults:xO(),calc:Dg().calc,crossTraceCalc:Dg().crossTraceCalc,plot:_2().plot,style:rA().style,colorbar:Of(),meta:{}}}}),aN=ze({"lib/sunburst.js"(J,G){"use strict";G.exports=rN()}}),nN=ze({"src/traces/treemap/base_plot.js"(J){"use strict";var G=cl();J.name="treemap",J.plot=function(p,b,E,k){G.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){G.cleanBasePlot(J.name,p,b,E,k)}}}),u0=ze({"src/traces/treemap/constants.js"(J,G){"use strict";G.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),x2=ze({"src/traces/treemap/attributes.js"(J,G){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=qs(),l=Ml().attributes,e=t0(),t=Rg(),n=u0(),r=Ki().extendFlat,a=Uc().pattern;G.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:r({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:t.marker.colors,pattern:a,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:t.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},k("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:r({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:t.textinfo,texttemplate:b({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:p({},{keys:n.eventDataKeys}),hovertemplatefallback:E(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:r({},e.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:e.sort,root:t.root,domain:l({name:"treemap",trace:!0,editType:"calc"})}}}),aA=ze({"src/traces/treemap/layout_attributes.js"(J,G){"use strict";G.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),iN=ze({"src/traces/treemap/defaults.js"(J,G){"use strict";var p=Nr(),b=x2(),E=Qn(),k=Ml().defaults,l=qh().handleText,e=hv().TEXTPAD,t=r0().handleMarkerDefaults,n=fl(),r=n.hasColorscale,a=n.handleDefaults;G.exports=function(s,c,g,f){function v(A,x){return p.coerce(s,c,b,A,x)}var m=v("labels"),i=v("parents");if(!m||!m.length||!i||!i.length){c.visible=!1;return}var T=v("values");T&&T.length?v("branchvalues"):v("count"),v("level"),v("maxdepth");var S=v("tiling.packing");S==="squarify"&&v("tiling.squarifyratio"),v("tiling.flip"),v("tiling.pad");var M=v("text");v("texttemplate"),v("texttemplatefallback"),c.texttemplate||v("textinfo",p.isArrayOrTypedArray(M)?"text+label":"label"),v("hovertext"),v("hovertemplate"),v("hovertemplatefallback");var C=v("pathbar.visible"),_="auto";l(s,c,f,v,_,{hasPathbar:C,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),v("textposition");var w=c.textposition.indexOf("bottom")!==-1;t(s,c,f,v);var h=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;h?a(s,c,f,v,{prefix:"marker.",cLetter:"c"}):v("marker.depthfade",!(c.marker.colors||[]).length);var u=c.textfont.size*2;v("marker.pad.t",w?u/4:u),v("marker.pad.l",u/4),v("marker.pad.r",u/4),v("marker.pad.b",w?u:u/4),v("marker.cornerradius"),c._hovered={marker:{line:{width:2,color:E.contrast(f.paper_bgcolor)}}},C&&(v("pathbar.thickness",c.pathbar.textfont.size+2*e),v("pathbar.side"),v("pathbar.edgeshape")),v("sort"),v("root.color"),k(c,f,v),c._length=null}}}),oN=ze({"src/traces/treemap/layout_defaults.js"(J,G){"use strict";var p=Nr(),b=aA();G.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("treemapcolorway",l.colorway),e("extendtreemapcolors")}}}),nA=ze({"src/traces/treemap/calc.js"(J){"use strict";var G=Dg();J.calc=function(p,b){return G.calc(p,b)},J.crossTraceCalc=function(p){return G._runCrossTraceCalc("treemap",p)}}}),iA=ze({"src/traces/treemap/flip_tree.js"(J,G){"use strict";G.exports=function p(b,E,k){var l;k.swapXY&&(l=b.x0,b.x0=b.y0,b.y0=l,l=b.x1,b.x1=b.y1,b.y1=l),k.flipX&&(l=b.x0,b.x0=E[0]-b.x1,b.x1=E[0]-l),k.flipY&&(l=b.y0,b.y0=E[1]-b.y1,b.y1=E[1]-l);var e=b.children;if(e)for(var t=0;t0)for(var u=0;u").join(" ")||"";var se=b.ensureSingle(re,"g","slicetext"),V=b.ensureSingle(se,"text","",function(K){K.attr("data-notex",1)}),Z=b.ensureUniformFontSize(s,n.determineTextFont(B,Q,O.font,{onPathbar:!0}));V.text(Q._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(E.font,Z).call(k.convertToTspans,s),Q.textBB=E.bBox(V.node()),Q.transform=_(Q,{fontSize:Z.size,onPathbar:!0}),Q.transform.fontSize=Z.size,h?V.transition().attrTween("transform",function(K){var H=x(K,a,z,[i,T]);return function(X){return w(H(X))}}):V.attr("transform",w(Q))})}}}),lN=ze({"src/traces/treemap/plot_one.js"(J,G){"use strict";var p=ci(),b=(l0(),Po(_v)).interpolate,E=up(),k=Nr(),l=hv().TEXTPAD,e=Xv(),t=e.toMoveInsideBar,n=eh(),r=n.recordMinTextSize,a=u0(),o=sN();function s(c){return E.isHierarchyRoot(c)?"":E.getPtId(c)}G.exports=function(g,f,v,m,i){var T=g._fullLayout,S=f[0],M=S.trace,C=M.type,_=C==="icicle",w=S.hierarchy,h=E.findEntryWithLevel(w,M.level),u=p.select(v),A=u.selectAll("g.pathbar"),x=u.selectAll("g.slice");if(!h){A.remove(),x.remove();return}var z=E.isHierarchyRoot(h),I=!T.uniformtext.mode&&E.hasTransition(m),O=E.getMaxDepth(M),D=function(Xt){return Xt.data.depth-h.data.depth-1?j+Q:-($+Q):0,ne={x0:U,x1:U,y0:re,y1:re+$},se=function(Xt,or,Ot){var vt=M.tiling.pad,ht=function(Ke){return Ke-vt<=or.x0},De=function(Ke){return Ke+vt>=or.x1},Ne=function(Ke){return Ke-vt<=or.y0},We=function(Ke){return Ke+vt>=or.y1};return Xt.x0===or.x0&&Xt.x1===or.x1&&Xt.y0===or.y0&&Xt.y1===or.y1?{x0:Xt.x0,x1:Xt.x1,y0:Xt.y0,y1:Xt.y1}:{x0:ht(Xt.x0-vt)?0:De(Xt.x0-vt)?Ot[0]:Xt.x0,x1:ht(Xt.x1+vt)?0:De(Xt.x1+vt)?Ot[0]:Xt.x1,y0:Ne(Xt.y0-vt)?0:We(Xt.y0-vt)?Ot[1]:Xt.y0,y1:Ne(Xt.y1+vt)?0:We(Xt.y1+vt)?Ot[1]:Xt.y1}},V=null,Z={},K={},H=null,X=function(Xt,or){return or?Z[s(Xt)]:K[s(Xt)]},q=function(Xt,or,Ot,vt){if(or)return Z[s(w)]||ne;var ht=K[M.level]||Ot;return D(Xt)?se(Xt,ht,vt):{}};S.hasMultipleRoots&&z&&O++,M._maxDepth=O,M._backgroundColor=T.paper_bgcolor,M._entryDepth=h.data.depth,M._atRootLevel=z;var W=-P/2+B.l+B.w*(F.x[1]+F.x[0])/2,ee=-j/2+B.t+B.h*(1-(F.y[1]+F.y[0])/2),ae=function(Xt){return W+Xt},he=function(Xt){return ee+Xt},xe=he(0),we=ae(0),Me=function(Xt){return we+Xt},Se=function(Xt){return xe+Xt};function Ie(Xt,or){return Xt+","+or}var Ge=Me(0),qe=function(Xt){Xt.x=Math.max(Ge,Xt.x)},ke=M.pathbar.edgeshape,_e=function(Xt){var or=Me(Math.max(Math.min(Xt.x0,Xt.x0),0)),Ot=Me(Math.min(Math.max(Xt.x1,Xt.x1),U)),vt=Se(Xt.y0),ht=Se(Xt.y1),De=$/2,Ne={},We={};Ne.x=or,We.x=Ot,Ne.y=We.y=(vt+ht)/2;var Ke={x:or,y:vt},Je={x:Ot,y:vt},et={x:Ot,y:ht},Mt={x:or,y:ht};return ke===">"?(Ke.x-=De,Je.x-=De,et.x-=De,Mt.x-=De):ke==="/"?(et.x-=De,Mt.x-=De,Ne.x-=De/2,We.x-=De/2):ke==="\\"?(Ke.x-=De,Je.x-=De,Ne.x-=De/2,We.x-=De/2):ke==="<"&&(Ne.x-=De,We.x-=De),qe(Ke),qe(Mt),qe(Ne),qe(Je),qe(et),qe(We),"M"+Ie(Ke.x,Ke.y)+"L"+Ie(Je.x,Je.y)+"L"+Ie(We.x,We.y)+"L"+Ie(et.x,et.y)+"L"+Ie(Mt.x,Mt.y)+"L"+Ie(Ne.x,Ne.y)+"Z"},ue=M[_?"tiling":"marker"].pad,ve=function(Xt){return M.textposition.indexOf(Xt)!==-1},le=ve("top"),Ae=ve("left"),Be=ve("right"),Xe=ve("bottom"),Ye=function(Xt){var or=ae(Xt.x0),Ot=ae(Xt.x1),vt=he(Xt.y0),ht=he(Xt.y1),De=Ot-or,Ne=ht-vt;if(!De||!Ne)return"";var We=M.marker.cornerradius||0,Ke=Math.min(We,De/2,Ne/2);Ke&&Xt.data&&Xt.data.data&&Xt.data.data.label&&(le&&(Ke=Math.min(Ke,ue.t)),Ae&&(Ke=Math.min(Ke,ue.l)),Be&&(Ke=Math.min(Ke,ue.r)),Xe&&(Ke=Math.min(Ke,ue.b)));var Je=function(et,Mt){return Ke?"a"+Ie(Ke,Ke)+" 0 0 1 "+Ie(et,Mt):""};return"M"+Ie(or,vt+Ke)+Je(Ke,-Ke)+"L"+Ie(Ot-Ke,vt)+Je(Ke,Ke)+"L"+Ie(Ot,ht-Ke)+Je(-Ke,Ke)+"L"+Ie(or+Ke,ht)+Je(-Ke,-Ke)+"Z"},yt=function(Xt,or){var Ot=Xt.x0,vt=Xt.x1,ht=Xt.y0,De=Xt.y1,Ne=Xt.textBB,We=le||or.isHeader&&!Xe,Ke=We?"start":Xe?"end":"middle",Je=ve("right"),et=ve("left")||or.onPathbar,Mt=et?-1:Je?1:0;if(or.isHeader){if(Ot+=(_?ue:ue.l)-l,vt-=(_?ue:ue.r)-l,Ot>=vt){var pt=(Ot+vt)/2;Ot=pt,vt=pt}var Pt;Xe?(Pt=De-(_?ue:ue.b),ht-1,flipY:F.tiling.flip.indexOf("y")>-1,pad:{inner:F.tiling.pad,top:F.marker.pad.t,left:F.marker.pad.l,right:F.marker.pad.r,bottom:F.marker.pad.b}}),re=Q.descendants(),ne=1/0,se=-1/0;re.forEach(function(X){var q=X.depth;q>=F._maxDepth?(X.x0=X.x1=(X.x0+X.x1)/2,X.y0=X.y1=(X.y0+X.y1)/2):(ne=Math.min(ne,q),se=Math.max(se,q))}),v=v.data(re,n.getPtId),F._maxVisibleLayers=isFinite(se)?se-ne+1:0,v.enter().append("g").classed("slice",!0),u(v,o,I,[i,T],C),v.order();var V=null;if(h&&z){var Z=n.getPtId(z);v.each(function(X){V===null&&n.getPtId(X)===Z&&(V={x0:X.x0,x1:X.x1,y0:X.y0,y1:X.y1})})}var K=function(){return V||{x0:0,x1:i,y0:0,y1:T}},H=v;return h&&(H=H.transition().each("end",function(){var X=p.select(this);n.setSliceCursor(X,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),H.each(function(X){var q=n.isHeader(X,F);X._x0=S(X.x0),X._x1=S(X.x1),X._y0=M(X.y0),X._y1=M(X.y1),X._hoverX=S(X.x1-F.marker.pad.r),X._hoverY=M(U?X.y1-F.marker.pad.b/2:X.y0+F.marker.pad.t/2);var W=p.select(this),ee=b.ensureSingle(W,"path","surface",function(Se){Se.style("pointer-events",O?"none":"all")});h?ee.transition().attrTween("d",function(Se){var Ie=A(Se,o,K(),[i,T]);return function(Ge){return C(Ie(Ge))}}):ee.attr("d",C),W.call(r,f,c,g,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(n.setSliceCursor,c,{isTransitioning:c._transitioning}),ee.call(e,X,F,c,{hovered:!1}),X.x0===X.x1||X.y0===X.y1?X._text="":q?X._text=$?"":n.getPtLabel(X)||"":X._text=a(X,f,F,g,D)||"";var ae=b.ensureSingle(W,"g","slicetext"),he=b.ensureSingle(ae,"text","",function(Se){Se.attr("data-notex",1)}),xe=b.ensureUniformFontSize(c,n.determineTextFont(F,X,D.font)),we=X._text||" ",Me=q&&we.indexOf("
")===-1;he.text(we).classed("slicetext",!0).attr("text-anchor",j?"end":P||Me?"start":"middle").call(E.font,xe).call(k.convertToTspans,c),X.textBB=E.bBox(he.node()),X.transform=_(X,{fontSize:xe.size,isHeader:q}),X.transform.fontSize=xe.size,h?he.transition().attrTween("transform",function(Se){var Ie=x(Se,o,K(),[i,T]);return function(Ge){return w(Ie(Ge))}}):he.attr("transform",w(X))}),V}}}),cN=ze({"src/traces/treemap/plot.js"(J,G){"use strict";var p=sA(),b=uN();G.exports=function(k,l,e,t){return p(k,l,e,t,{type:"treemap",drawDescendants:b})}}}),fN=ze({"src/traces/treemap/index.js"(J,G){"use strict";G.exports={moduleType:"trace",name:"treemap",basePlotModule:nN(),categories:[],animatable:!0,attributes:x2(),layoutAttributes:aA(),supplyDefaults:iN(),supplyLayoutDefaults:oN(),calc:nA().calc,crossTraceCalc:nA().crossTraceCalc,plot:cN(),style:b2().style,colorbar:Of(),meta:{}}}}),hN=ze({"lib/treemap.js"(J,G){"use strict";G.exports=fN()}}),dN=ze({"src/traces/icicle/base_plot.js"(J){"use strict";var G=cl();J.name="icicle",J.plot=function(p,b,E,k){G.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){G.cleanBasePlot(J.name,p,b,E,k)}}}),lA=ze({"src/traces/icicle/attributes.js"(J,G){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=qs(),l=Ml().attributes,e=t0(),t=Rg(),n=x2(),r=u0(),a=Ki().extendFlat,o=Uc().pattern;G.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:n.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:a({colors:t.marker.colors,line:t.marker.line,pattern:o,editType:"calc"},k("marker",{colorAttr:"colors",anim:!1})),leaf:t.leaf,pathbar:n.pathbar,text:e.text,textinfo:t.textinfo,texttemplate:b({editType:"plot"},{keys:r.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:p({},{keys:r.eventDataKeys}),hovertemplatefallback:E(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:n.outsidetextfont,textposition:n.textposition,sort:e.sort,root:t.root,domain:l({name:"icicle",trace:!0,editType:"calc"})}}}),uA=ze({"src/traces/icicle/layout_attributes.js"(J,G){"use strict";G.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),pN=ze({"src/traces/icicle/defaults.js"(J,G){"use strict";var p=Nr(),b=lA(),E=Qn(),k=Ml().defaults,l=qh().handleText,e=hv().TEXTPAD,t=r0().handleMarkerDefaults,n=fl(),r=n.hasColorscale,a=n.handleDefaults;G.exports=function(s,c,g,f){function v(w,h){return p.coerce(s,c,b,w,h)}var m=v("labels"),i=v("parents");if(!m||!m.length||!i||!i.length){c.visible=!1;return}var T=v("values");T&&T.length?v("branchvalues"):v("count"),v("level"),v("maxdepth"),v("tiling.orientation"),v("tiling.flip"),v("tiling.pad");var S=v("text");v("texttemplate"),v("texttemplatefallback"),c.texttemplate||v("textinfo",p.isArrayOrTypedArray(S)?"text+label":"label"),v("hovertext"),v("hovertemplate"),v("hovertemplatefallback");var M=v("pathbar.visible"),C="auto";l(s,c,f,v,C,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),v("textposition"),t(s,c,f,v);var _=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;_&&a(s,c,f,v,{prefix:"marker.",cLetter:"c"}),v("leaf.opacity",_?1:.7),c._hovered={marker:{line:{width:2,color:E.contrast(f.paper_bgcolor)}}},M&&(v("pathbar.thickness",c.pathbar.textfont.size+2*e),v("pathbar.side"),v("pathbar.edgeshape")),v("sort"),v("root.color"),k(c,f,v),c._length=null}}}),vN=ze({"src/traces/icicle/layout_defaults.js"(J,G){"use strict";var p=Nr(),b=uA();G.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("iciclecolorway",l.colorway),e("extendiciclecolors")}}}),cA=ze({"src/traces/icicle/calc.js"(J){"use strict";var G=Dg();J.calc=function(p,b){return G.calc(p,b)},J.crossTraceCalc=function(p){return G._runCrossTraceCalc("icicle",p)}}}),mN=ze({"src/traces/icicle/partition.js"(J,G){"use strict";var p=Ig(),b=iA();G.exports=function(k,l,e){var t=e.flipX,n=e.flipY,r=e.orientation==="h",a=e.maxDepth,o=l[0],s=l[1];a&&(o=(k.height+1)*l[0]/Math.min(k.height+1,a),s=(k.height+1)*l[1]/Math.min(k.height+1,a));var c=p.partition().padding(e.pad.inner).size(r?[l[1],o]:[l[0],s])(k);return(r||t||n)&&b(c,l,{swapXY:r,flipX:t,flipY:n}),c}}}),fA=ze({"src/traces/icicle/style.js"(J,G){"use strict";var p=ci(),b=Qn(),E=Nr(),k=eh().resizeText,l=y2();function e(n){var r=n._fullLayout._iciclelayer.selectAll(".trace");k(n,r,"icicle"),r.each(function(a){var o=p.select(this),s=a[0],c=s.trace;o.style("opacity",c.opacity),o.selectAll("path.surface").each(function(g){p.select(this).call(t,g,c,n)})})}function t(n,r,a,o){var s=r.data.data,c=!r.children,g=s.i,f=E.castOption(a,g,"marker.line.color")||b.defaultLine,v=E.castOption(a,g,"marker.line.width")||0;n.call(l,r,a,o).style("stroke-width",v).call(b.stroke,f).style("opacity",c?a.leaf.opacity:null)}G.exports={style:e,styleOne:t}}}),gN=ze({"src/traces/icicle/draw_descendants.js"(J,G){"use strict";var p=ci(),b=Nr(),E=Xi(),k=Cs(),l=mN(),e=fA().styleOne,t=u0(),n=up(),r=$g(),a=_2().formatSliceLabel,o=!1;G.exports=function(c,g,f,v,m){var i=m.width,T=m.height,S=m.viewX,M=m.viewY,C=m.pathSlice,_=m.toMoveInsideSlice,w=m.strTransform,h=m.hasTransition,u=m.handleSlicesExit,A=m.makeUpdateSliceInterpolator,x=m.makeUpdateTextInterpolator,z=m.prevEntry,I={},O=c._context.staticPlot,D=c._fullLayout,B=g[0],F=B.trace,P=F.textposition.indexOf("left")!==-1,j=F.textposition.indexOf("right")!==-1,U=F.textposition.indexOf("bottom")!==-1,$=l(f,[i,T],{flipX:F.tiling.flip.indexOf("x")>-1,flipY:F.tiling.flip.indexOf("y")>-1,orientation:F.tiling.orientation,pad:{inner:F.tiling.pad},maxDepth:F._maxDepth}),Q=$.descendants(),re=1/0,ne=-1/0;Q.forEach(function(H){var X=H.depth;X>=F._maxDepth?(H.x0=H.x1=(H.x0+H.x1)/2,H.y0=H.y1=(H.y0+H.y1)/2):(re=Math.min(re,X),ne=Math.max(ne,X))}),v=v.data(Q,n.getPtId),F._maxVisibleLayers=isFinite(ne)?ne-re+1:0,v.enter().append("g").classed("slice",!0),u(v,o,I,[i,T],C),v.order();var se=null;if(h&&z){var V=n.getPtId(z);v.each(function(H){se===null&&n.getPtId(H)===V&&(se={x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1})})}var Z=function(){return se||{x0:0,x1:i,y0:0,y1:T}},K=v;return h&&(K=K.transition().each("end",function(){var H=p.select(this);n.setSliceCursor(H,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),K.each(function(H){H._x0=S(H.x0),H._x1=S(H.x1),H._y0=M(H.y0),H._y1=M(H.y1),H._hoverX=S(H.x1-F.tiling.pad),H._hoverY=M(U?H.y1-F.tiling.pad/2:H.y0+F.tiling.pad/2);var X=p.select(this),q=b.ensureSingle(X,"path","surface",function(he){he.style("pointer-events",O?"none":"all")});h?q.transition().attrTween("d",function(he){var xe=A(he,o,Z(),[i,T],{orientation:F.tiling.orientation,flipX:F.tiling.flip.indexOf("x")>-1,flipY:F.tiling.flip.indexOf("y")>-1});return function(we){return C(xe(we))}}):q.attr("d",C),X.call(r,f,c,g,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(n.setSliceCursor,c,{isTransitioning:c._transitioning}),q.call(e,H,F,c,{hovered:!1}),H.x0===H.x1||H.y0===H.y1?H._text="":H._text=a(H,f,F,g,D)||"";var W=b.ensureSingle(X,"g","slicetext"),ee=b.ensureSingle(W,"text","",function(he){he.attr("data-notex",1)}),ae=b.ensureUniformFontSize(c,n.determineTextFont(F,H,D.font));ee.text(H._text||" ").classed("slicetext",!0).attr("text-anchor",j?"end":P?"start":"middle").call(E.font,ae).call(k.convertToTspans,c),H.textBB=E.bBox(ee.node()),H.transform=_(H,{fontSize:ae.size}),H.transform.fontSize=ae.size,h?ee.transition().attrTween("transform",function(he){var xe=x(he,o,Z(),[i,T]);return function(we){return w(xe(we))}}):ee.attr("transform",w(H))}),se}}}),yN=ze({"src/traces/icicle/plot.js"(J,G){"use strict";var p=sA(),b=gN();G.exports=function(k,l,e,t){return p(k,l,e,t,{type:"icicle",drawDescendants:b})}}}),_N=ze({"src/traces/icicle/index.js"(J,G){"use strict";G.exports={moduleType:"trace",name:"icicle",basePlotModule:dN(),categories:[],animatable:!0,attributes:lA(),layoutAttributes:uA(),supplyDefaults:pN(),supplyLayoutDefaults:vN(),calc:cA().calc,crossTraceCalc:cA().crossTraceCalc,plot:yN(),style:fA().style,colorbar:Of(),meta:{}}}}),xN=ze({"lib/icicle.js"(J,G){"use strict";G.exports=_N()}}),bN=ze({"src/traces/funnelarea/base_plot.js"(J){"use strict";var G=cl();J.name="funnelarea",J.plot=function(p,b,E,k){G.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){G.cleanBasePlot(J.name,p,b,E,k)}}}),hA=ze({"src/traces/funnelarea/attributes.js"(J,G){"use strict";var p=t0(),b=ws(),E=Ml().attributes,{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=Ki().extendFlat;G.exports={labels:p.labels,label0:p.label0,dlabel:p.dlabel,values:p.values,marker:{colors:p.marker.colors,line:{color:t({},p.marker.line.color,{dflt:null}),width:t({},p.marker.line.width,{dflt:1}),editType:"calc"},pattern:p.marker.pattern,editType:"calc"},text:p.text,hovertext:p.hovertext,scalegroup:t({},p.scalegroup,{}),textinfo:t({},p.textinfo,{flags:["label","text","value","percent"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:e({editType:"plot"}),hoverinfo:t({},b.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:k({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:e(),textposition:t({},p.textposition,{values:["inside","none"],dflt:"inside"}),textfont:p.textfont,insidetextfont:p.insidetextfont,title:{text:p.title.text,font:p.title.font,position:t({},p.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:E({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}}}),dA=ze({"src/traces/funnelarea/layout_attributes.js"(J,G){"use strict";var p=qb().hiddenlabels;G.exports={hiddenlabels:p,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),wN=ze({"src/traces/funnelarea/defaults.js"(J,G){"use strict";var p=Nr(),b=hA(),E=Ml().defaults,k=qh().handleText,l=r0().handleLabelsAndValues,e=r0().handleMarkerDefaults;G.exports=function(n,r,a,o){function s(C,_){return p.coerce(n,r,b,C,_)}var c=s("labels"),g=s("values"),f=l(c,g),v=f.len;if(r._hasLabels=f.hasLabels,r._hasValues=f.hasValues,!r._hasLabels&&r._hasValues&&(s("label0"),s("dlabel")),!v){r.visible=!1;return}r._length=v,e(n,r,o,s),s("scalegroup");var m=s("text"),i=s("texttemplate");s("texttemplatefallback");var T;if(i||(T=s("textinfo",Array.isArray(m)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),i||T&&T!=="none"){var S=s("textposition");k(n,r,o,s,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else T==="none"&&s("textposition","none");E(r,o,s);var M=s("title.text");M&&(s("title.position"),p.coerceFont(s,"title.font",o.font)),s("aspectratio"),s("baseratio")}}}),TN=ze({"src/traces/funnelarea/layout_defaults.js"(J,G){"use strict";var p=Nr(),b=dA();G.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("hiddenlabels"),e("funnelareacolorway",l.colorway),e("extendfunnelareacolors")}}}),pA=ze({"src/traces/funnelarea/calc.js"(J,G){"use strict";var p=u1();function b(k,l){return p.calc(k,l)}function E(k){p.crossTraceCalc(k,{type:"funnelarea"})}G.exports={calc:b,crossTraceCalc:E}}}),AN=ze({"src/traces/funnelarea/plot.js"(J,G){"use strict";var p=ci(),b=Xi(),E=Nr(),k=E.strScale,l=E.strTranslate,e=Cs(),t=Xv(),n=t.toMoveInsideBar,r=eh(),a=r.recordMinTextSize,o=r.clearMinTextSize,s=lv(),c=Vb(),g=c.attachFxHandlers,f=c.determineInsideTextFont,v=c.layoutAreas,m=c.prerenderTitles,i=c.positionTitleOutside,T=c.formatSliceLabel;G.exports=function(w,h){var u=w._context.staticPlot,A=w._fullLayout;o("funnelarea",A),m(h,w),v(h,A._size),E.makeTraceGroups(A._funnelarealayer,h,"trace").each(function(x){var z=p.select(this),I=x[0],O=I.trace;C(x),z.each(function(){var D=p.select(this).selectAll("g.slice").data(x);D.enter().append("g").classed("slice",!0),D.exit().remove(),D.each(function(F,P){if(F.hidden){p.select(this).selectAll("path,g").remove();return}F.pointNumber=F.i,F.curveNumber=O.index;var j=I.cx,U=I.cy,$=p.select(this),Q=$.selectAll("path.surface").data([F]);Q.enter().append("path").classed("surface",!0).style({"pointer-events":u?"none":"all"}),$.call(g,w,x);var re="M"+(j+F.TR[0])+","+(U+F.TR[1])+S(F.TR,F.BR)+S(F.BR,F.BL)+S(F.BL,F.TL)+"Z";Q.attr("d",re),T(w,F,I);var ne=s.castOption(O.textposition,F.pts),se=$.selectAll("g.slicetext").data(F.text&&ne!=="none"?[0]:[]);se.enter().append("g").classed("slicetext",!0),se.exit().remove(),se.each(function(){var V=E.ensureSingle(p.select(this),"text","",function(ae){ae.attr("data-notex",1)}),Z=E.ensureUniformFontSize(w,f(O,F,A.font));V.text(F.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(b.font,Z).call(e.convertToTspans,w);var K=b.bBox(V.node()),H,X,q,W=Math.min(F.BL[1],F.BR[1])+U,ee=Math.max(F.TL[1],F.TR[1])+U;X=Math.max(F.TL[0],F.BL[0])+j,q=Math.min(F.TR[0],F.BR[0])+j,H=n(X,q,W,ee,K,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),H.fontSize=Z.size,a(O.type,H,A),x[P].transform=H,E.setTransormAndDisplay(V,H)})});var B=p.select(this).selectAll("g.titletext").data(O.title.text?[0]:[]);B.enter().append("g").classed("titletext",!0),B.exit().remove(),B.each(function(){var F=E.ensureSingle(p.select(this),"text","",function(U){U.attr("data-notex",1)}),P=O.title.text;O._meta&&(P=E.templateString(P,O._meta)),F.text(P).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(b.font,O.title.font).call(e.convertToTspans,w);var j=i(I,A._size);F.attr("transform",l(j.x,j.y)+k(Math.min(1,j.scale))+l(j.tx,j.ty))})})})};function S(_,w){var h=w[0]-_[0],u=w[1]-_[1];return"l"+h+","+u}function M(_,w){return[.5*(_[0]+w[0]),.5*(_[1]+w[1])]}function C(_){if(!_.length)return;var w=_[0],h=w.trace,u=h.aspectratio,A=h.baseratio;A>.999&&(A=.999);var x=Math.pow(A,2),z=w.vTotal,I=z*x/(1-x),O=z,D=I/z;function B(){var he=Math.sqrt(D);return{x:he,y:-he}}function F(){var he=B();return[he.x,he.y]}var P,j=[];j.push(F());var U,$;for(U=_.length-1;U>-1;U--)if($=_[U],!$.hidden){var Q=$.v/O;D+=Q,j.push(F())}var re=1/0,ne=-1/0;for(U=0;U-1;U--)if($=_[U],!$.hidden){W+=1;var ee=j[W][0],ae=j[W][1];$.TL=[-ee,ae],$.TR=[ee,ae],$.BL=X,$.BR=q,$.pxmid=M($.TR,$.BR),X=$.TL,q=$.TR}}}}),MN=ze({"src/traces/funnelarea/style.js"(J,G){"use strict";var p=ci(),b=Zm(),E=eh().resizeText;G.exports=function(l){var e=l._fullLayout._funnelarealayer.selectAll(".trace");E(l,e,"funnelarea"),e.each(function(t){var n=t[0],r=n.trace,a=p.select(this);a.style({opacity:r.opacity}),a.selectAll("path.surface").each(function(o){p.select(this).call(b,o,r,l)})})}}}),SN=ze({"src/traces/funnelarea/index.js"(J,G){"use strict";G.exports={moduleType:"trace",name:"funnelarea",basePlotModule:bN(),categories:["pie-like","funnelarea","showLegend"],attributes:hA(),layoutAttributes:dA(),supplyDefaults:wN(),supplyLayoutDefaults:TN(),calc:pA().calc,crossTraceCalc:pA().crossTraceCalc,plot:AN(),style:MN(),styleOne:Zm(),meta:{}}}}),EN=ze({"lib/funnelarea.js"(J,G){"use strict";G.exports=SN()}}),df=ze({"stackgl_modules/index.js"(J,G){"use strict";(()=>{var p={3065(l,e,t){l.exports={alpha_shape:t(3502),convex_hull:t(7352),delaunay_triangulate:t(7642),gl_cone3d:t(6405),gl_error3d:t(9165),gl_line3d:t(5714),gl_mesh3d:t(7201),gl_plot3d:t(4100),gl_scatter3d:t(8418),gl_streamtube3d:t(7815),gl_surface3d:t(9499),ndarray:t(9618),ndarray_linear_interpolate:t(4317)}},6296(l,e,t){"use strict";l.exports=c;var n=t(7261),r=t(9977),a=t(1811);function o(g,f){this._controllerNames=Object.keys(g),this._controllerList=this._controllerNames.map(function(v){return g[v]}),this._mode=f,this._active=g[f],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 s=o.prototype;s.flush=function(g){for(var f=this._controllerList,v=0;v"u"?t(1538):WeakMap,r=t(2762),a=t(8116),o=new n;function s(c){var g=o.get(c),f=g&&(g._triangleBuffer.handle||g._triangleBuffer.buffer);if(!f||!c.isBuffer(f)){var v=r(c,new Float32Array([-1,-1,-1,4,4,-1]));g=a(c,[{buffer:v,type:c.FLOAT,size:2}]),g._triangleBuffer=v,o.set(c,g)}g.bind(),c.drawArrays(c.TRIANGLES,0,3),g.unbind()}l.exports=s},1085(l,e,t){var n=t(1371);l.exports=r;function r(a,o,s){o=typeof o=="number"?o:1,s=s||": ";var c=a.split(/\r?\n/),g=String(c.length+o-1).length;return c.map(function(f,v){var m=v+o,i=String(m).length,T=n(m,g-i);return T+s+f}).join(` +`)}},3952(l,e,t){"use strict";l.exports=a;var n=t(3250);function r(o,s){for(var c=new Array(s+1),g=0;g0)throw new Error("Invalid string. Length must be a multiple of 4");var C=S.indexOf("=");C===-1&&(C=M);var _=C===M?0:4-C%4;return[C,_]}function g(S){var M=c(S),C=M[0],_=M[1];return(C+_)*3/4-_}function f(S,M,C){return(M+C)*3/4-C}function v(S){var M,C=c(S),_=C[0],w=C[1],h=new r(f(S,_,w)),u=0,A=w>0?_-4:_,x;for(x=0;x>16&255,h[u++]=M>>8&255,h[u++]=M&255;return w===2&&(M=n[S.charCodeAt(x)]<<2|n[S.charCodeAt(x+1)]>>4,h[u++]=M&255),w===1&&(M=n[S.charCodeAt(x)]<<10|n[S.charCodeAt(x+1)]<<4|n[S.charCodeAt(x+2)]>>2,h[u++]=M>>8&255,h[u++]=M&255),h}function m(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function i(S,M,C){for(var _,w=[],h=M;hA?A:u+h));return _===1?(M=S[C-1],w.push(t[M>>2]+t[M<<4&63]+"==")):_===2&&(M=(S[C-2]<<8)+S[C-1],w.push(t[M>>10]+t[M>>4&63]+t[M<<2&63]+"=")),w.join("")}},3865(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]).add(o[0].mul(a[1])),a[1].mul(o[1]))}},1318(l){"use strict";l.exports=e;function e(t,n){return t[0].mul(n[1]).cmp(n[0].mul(t[1]))}},8697(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]),a[1].mul(o[0]))}},7842(l,e,t){"use strict";var n=t(6330),r=t(1533),a=t(2651),o=t(6768),s=t(869),c=t(8697);l.exports=g;function g(f,v){if(n(f))return v?c(f,g(v)):[f[0].clone(),f[1].clone()];var m=0,i,T;if(r(f))i=f.clone();else if(typeof f=="string")i=o(f);else{if(f===0)return[a(0),a(1)];if(f===Math.floor(f))i=a(f);else{for(;f!==Math.floor(f);)f=f*Math.pow(2,256),m-=256;i=a(f)}}if(n(v))i.mul(v[1]),T=v[0].clone();else if(r(v))T=v.clone();else if(typeof v=="string")T=o(v);else if(!v)T=a(1);else if(v===Math.floor(v))T=a(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),m+=256;T=a(v)}return m>0?i=i.ushln(m):m<0&&(T=T.ushln(-m)),s(i,T)}},6330(l,e,t){"use strict";var n=t(1533);l.exports=r;function r(a){return Array.isArray(a)&&a.length===2&&n(a[0])&&n(a[1])}},5716(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return a.cmp(new n(0))}},1369(l,e,t){"use strict";var n=t(5716);l.exports=r;function r(a){var o=a.length,s=a.words,c=0;if(o===1)c=s[0];else if(o===2)c=s[0]+s[1]*67108864;else for(var g=0;g20?52:c+32}},1533(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return a&&typeof a=="object"&&!!a.words}},2651(l,e,t){"use strict";var n=t(6859),r=t(2361);l.exports=a;function a(o){var s=r.exponent(o);return s<52?new n(o):new n(o*Math.pow(2,52-s)).ushln(s-52)}},869(l,e,t){"use strict";var n=t(2651),r=t(5716);l.exports=a;function a(o,s){var c=r(o),g=r(s);if(c===0)return[n(0),n(1)];if(g===0)return[n(0),n(0)];g<0&&(o=o.neg(),s=s.neg());var f=o.gcd(s);return f.cmpn(1)?[o.div(f),s.div(f)]:[o,s]}},6768(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return new n(a)}},6504(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[0]),a[1].mul(o[1]))}},7721(l,e,t){"use strict";var n=t(5716);l.exports=r;function r(a){return n(a[0])*n(a[1])}},5572(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]).sub(a[1].mul(o[0])),a[1].mul(o[1]))}},946(l,e,t){"use strict";var n=t(1369),r=t(4025);l.exports=a;function a(o){var s=o[0],c=o[1];if(s.cmpn(0)===0)return 0;var g=s.abs().divmod(c.abs()),f=g.div,v=n(f),m=g.mod,i=s.negative!==c.negative?-1:1;if(m.cmpn(0)===0)return i*v;if(v){var T=r(v)+4,S=n(m.ushln(T).divRound(c));return i*(v+S*Math.pow(2,-T))}else{var M=c.bitLength()-m.bitLength()+53,S=n(m.ushln(M).divRound(c));return M<1023?i*S*Math.pow(2,-M):(S*=Math.pow(2,-1023),i*S*Math.pow(2,1023-M))}}},2478(l){"use strict";function e(s,c,g,f,v){for(var m=v+1;f<=v;){var i=f+v>>>1,T=s[i],S=g!==void 0?g(T,c):T-c;S>=0?(m=i,v=i-1):f=i+1}return m}function t(s,c,g,f,v){for(var m=v+1;f<=v;){var i=f+v>>>1,T=s[i],S=g!==void 0?g(T,c):T-c;S>0?(m=i,v=i-1):f=i+1}return m}function n(s,c,g,f,v){for(var m=f-1;f<=v;){var i=f+v>>>1,T=s[i],S=g!==void 0?g(T,c):T-c;S<0?(m=i,f=i+1):v=i-1}return m}function r(s,c,g,f,v){for(var m=f-1;f<=v;){var i=f+v>>>1,T=s[i],S=g!==void 0?g(T,c):T-c;S<=0?(m=i,f=i+1):v=i-1}return m}function a(s,c,g,f,v){for(;f<=v;){var m=f+v>>>1,i=s[m],T=g!==void 0?g(i,c):i-c;if(T===0)return m;T<=0?f=m+1:v=m-1}return-1}function o(s,c,g,f,v,m){return typeof g=="function"?m(s,c,g,f===void 0?0:f|0,v===void 0?s.length-1:v|0):m(s,c,void 0,g===void 0?0:g|0,f===void 0?s.length-1:f|0)}l.exports={ge:function(s,c,g,f,v){return o(s,c,g,f,v,e)},gt:function(s,c,g,f,v){return o(s,c,g,f,v,t)},lt:function(s,c,g,f,v){return o(s,c,g,f,v,n)},le:function(s,c,g,f,v){return o(s,c,g,f,v,r)},eq:function(s,c,g,f,v){return o(s,c,g,f,v,a)}}},8828(l,e){"use strict";"use restrict";var t=32;e.INT_BITS=t,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(a<0)},e.abs=function(a){var o=a>>t-1;return(a^o)-o},e.min=function(a,o){return o^(a^o)&-(a65535)<<4,a>>>=o,s=(a>255)<<3,a>>>=s,o|=s,s=(a>15)<<2,a>>>=s,o|=s,s=(a>3)<<1,a>>>=s,o|=s,o|a>>1},e.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},e.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function n(a){var o=32;return a&=-a,a&&o--,a&65535&&(o-=16),a&16711935&&(o-=8),a&252645135&&(o-=4),a&858993459&&(o-=2),a&1431655765&&(o-=1),o}e.countTrailingZeros=n,e.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},e.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},e.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var r=new Array(256);(function(a){for(var o=0;o<256;++o){var s=o,c=o,g=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--g;a[o]=c<>>8&255]<<16|r[a>>>16&255]<<8|r[a>>>24&255]},e.interleave2=function(a,o){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,a|o<<1},e.deinterleave2=function(a,o){return a=a>>>o&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},e.interleave3=function(a,o,s){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,a|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,a|s<<2},e.deinterleave3=function(a,o){return a=a>>>o&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},e.nextCombination=function(a){var o=a|a-1;return o+1|(~o&-~o)-1>>>n(a)+1}},6859(l,e,t){l=t.nmd(l),function(n,r){"use strict";function a(F,P){if(!F)throw new Error(P||"Assertion failed")}function o(F,P){F.super_=P;var j=function(){};j.prototype=P.prototype,F.prototype=new j,F.prototype.constructor=F}function s(F,P,j){if(s.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((P==="le"||P==="be")&&(j=P,P=10),this._init(F||0,P||10,j||"be"))}typeof n=="object"?n.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var c;try{typeof window<"u"&&typeof window.Buffer<"u"?c=window.Buffer:c=t(7790).Buffer}catch{}s.isBN=function(P){return P instanceof s?!0:P!==null&&typeof P=="object"&&P.constructor.wordSize===s.wordSize&&Array.isArray(P.words)},s.max=function(P,j){return P.cmp(j)>0?P:j},s.min=function(P,j){return P.cmp(j)<0?P:j},s.prototype._init=function(P,j,U){if(typeof P=="number")return this._initNumber(P,j,U);if(typeof P=="object")return this._initArray(P,j,U);j==="hex"&&(j=16),a(j===(j|0)&&j>=2&&j<=36),P=P.toString().replace(/\s+/g,"");var $=0;P[0]==="-"&&($++,this.negative=1),$=0;$-=3)re=P[$]|P[$-1]<<8|P[$-2]<<16,this.words[Q]|=re<>>26-ne&67108863,ne+=24,ne>=26&&(ne-=26,Q++);else if(U==="le")for($=0,Q=0;$>>26-ne&67108863,ne+=24,ne>=26&&(ne-=26,Q++);return this.strip()};function g(F,P){var j=F.charCodeAt(P);return j>=65&&j<=70?j-55:j>=97&&j<=102?j-87:j-48&15}function f(F,P,j){var U=g(F,j);return j-1>=P&&(U|=g(F,j-1)<<4),U}s.prototype._parseHex=function(P,j,U){this.length=Math.ceil((P.length-j)/6),this.words=new Array(this.length);for(var $=0;$=j;$-=2)ne=f(P,j,$)<=18?(Q-=18,re+=1,this.words[re]|=ne>>>26):Q+=8;else{var se=P.length-j;for($=se%2===0?j+1:j;$=18?(Q-=18,re+=1,this.words[re]|=ne>>>26):Q+=8}this.strip()};function v(F,P,j,U){for(var $=0,Q=Math.min(F.length,j),re=P;re=49?$+=ne-49+10:ne>=17?$+=ne-17+10:$+=ne}return $}s.prototype._parseBase=function(P,j,U){this.words=[0],this.length=1;for(var $=0,Q=1;Q<=67108863;Q*=j)$++;$--,Q=Q/j|0;for(var re=P.length-U,ne=re%$,se=Math.min(re,re-ne)+U,V=0,Z=U;Z1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var m=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],i=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(P,j){P=P||10,j=j|0||1;var U;if(P===16||P==="hex"){U="";for(var $=0,Q=0,re=0;re>>24-$&16777215,$+=2,$>=26&&($-=26,re--),Q!==0||re!==this.length-1?U=m[6-se.length]+se+U:U=se+U}for(Q!==0&&(U=Q.toString(16)+U);U.length%j!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}if(P===(P|0)&&P>=2&&P<=36){var V=i[P],Z=T[P];U="";var K=this.clone();for(K.negative=0;!K.isZero();){var H=K.modn(Z).toString(P);K=K.idivn(Z),K.isZero()?U=H+U:U=m[V-H.length]+H+U}for(this.isZero()&&(U="0"+U);U.length%j!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}a(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var P=this.words[0];return this.length===2?P+=this.words[1]*67108864:this.length===3&&this.words[2]===1?P+=4503599627370496+this.words[1]*67108864:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-P:P},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(P,j){return a(typeof c<"u"),this.toArrayLike(c,P,j)},s.prototype.toArray=function(P,j){return this.toArrayLike(Array,P,j)},s.prototype.toArrayLike=function(P,j,U){var $=this.byteLength(),Q=U||Math.max(1,$);a($<=Q,"byte array longer than desired length"),a(Q>0,"Requested array length <= 0"),this.strip();var re=j==="le",ne=new P(Q),se,V,Z=this.clone();if(re){for(V=0;!Z.isZero();V++)se=Z.andln(255),Z.iushrn(8),ne[V]=se;for(;V=4096&&(U+=13,j>>>=13),j>=64&&(U+=7,j>>>=7),j>=8&&(U+=4,j>>>=4),j>=2&&(U+=2,j>>>=2),U+j},s.prototype._zeroBits=function(P){if(P===0)return 26;var j=P,U=0;return j&8191||(U+=13,j>>>=13),j&127||(U+=7,j>>>=7),j&15||(U+=4,j>>>=4),j&3||(U+=2,j>>>=2),j&1||U++,U},s.prototype.bitLength=function(){var P=this.words[this.length-1],j=this._countBits(P);return(this.length-1)*26+j};function S(F){for(var P=new Array(F.bitLength()),j=0;j>>$}return P}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var P=0,j=0;jP.length?this.clone().ior(P):P.clone().ior(this)},s.prototype.uor=function(P){return this.length>P.length?this.clone().iuor(P):P.clone().iuor(this)},s.prototype.iuand=function(P){var j;this.length>P.length?j=P:j=this;for(var U=0;UP.length?this.clone().iand(P):P.clone().iand(this)},s.prototype.uand=function(P){return this.length>P.length?this.clone().iuand(P):P.clone().iuand(this)},s.prototype.iuxor=function(P){var j,U;this.length>P.length?(j=this,U=P):(j=P,U=this);for(var $=0;$P.length?this.clone().ixor(P):P.clone().ixor(this)},s.prototype.uxor=function(P){return this.length>P.length?this.clone().iuxor(P):P.clone().iuxor(this)},s.prototype.inotn=function(P){a(typeof P=="number"&&P>=0);var j=Math.ceil(P/26)|0,U=P%26;this._expand(j),U>0&&j--;for(var $=0;$0&&(this.words[$]=~this.words[$]&67108863>>26-U,$++);$=0);var U=P/26|0,$=P%26;return this._expand(U+1),j?this.words[U]=this.words[U]|1<<$:this.words[U]=this.words[U]&~(1<<$),this.strip()},s.prototype.iadd=function(P){var j;if(this.negative!==0&&P.negative===0)return this.negative=0,j=this.isub(P),this.negative^=1,this._normSign();if(this.negative===0&&P.negative!==0)return P.negative=0,j=this.isub(P),P.negative=1,j._normSign();var U,$;this.length>P.length?(U=this,$=P):(U=P,$=this);for(var Q=0,re=0;re<$.length;re++)j=(U.words[re]|0)+($.words[re]|0)+Q,this.words[re]=j&67108863,Q=j>>>26;for(;Q!==0&&re>>26;if(this.length=U.length,Q!==0)this.words[this.length]=Q,this.length++;else if(U!==this)for(;reP.length?this.clone().iadd(P):P.clone().iadd(this)},s.prototype.isub=function(P){if(P.negative!==0){P.negative=0;var j=this.iadd(P);return P.negative=1,j._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(P),this.negative=1,this._normSign();var U=this.cmp(P);if(U===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Q;U>0?($=this,Q=P):($=P,Q=this);for(var re=0,ne=0;ne>26,this.words[ne]=j&67108863;for(;re!==0&&ne<$.length;ne++)j=($.words[ne]|0)+re,re=j>>26,this.words[ne]=j&67108863;if(re===0&&ne<$.length&&$!==this)for(;ne<$.length;ne++)this.words[ne]=$.words[ne];return this.length=Math.max(this.length,ne),$!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(P){return this.clone().isub(P)};function M(F,P,j){j.negative=P.negative^F.negative;var U=F.length+P.length|0;j.length=U,U=U-1|0;var $=F.words[0]|0,Q=P.words[0]|0,re=$*Q,ne=re&67108863,se=re/67108864|0;j.words[0]=ne;for(var V=1;V>>26,K=se&67108863,H=Math.min(V,P.length-1),X=Math.max(0,V-F.length+1);X<=H;X++){var q=V-X|0;$=F.words[q]|0,Q=P.words[X]|0,re=$*Q+K,Z+=re/67108864|0,K=re&67108863}j.words[V]=K|0,se=Z|0}return se!==0?j.words[V]=se|0:j.length--,j.strip()}var C=function(P,j,U){var $=P.words,Q=j.words,re=U.words,ne=0,se,V,Z,K=$[0]|0,H=K&8191,X=K>>>13,q=$[1]|0,W=q&8191,ee=q>>>13,ae=$[2]|0,he=ae&8191,xe=ae>>>13,we=$[3]|0,Me=we&8191,Se=we>>>13,Ie=$[4]|0,Ge=Ie&8191,qe=Ie>>>13,ke=$[5]|0,_e=ke&8191,ue=ke>>>13,ve=$[6]|0,le=ve&8191,Ae=ve>>>13,Be=$[7]|0,Xe=Be&8191,Ye=Be>>>13,yt=$[8]|0,gt=yt&8191,Tt=yt>>>13,At=$[9]|0,$t=At&8191,rr=At>>>13,_r=Q[0]|0,Xt=_r&8191,or=_r>>>13,Ot=Q[1]|0,vt=Ot&8191,ht=Ot>>>13,De=Q[2]|0,Ne=De&8191,We=De>>>13,Ke=Q[3]|0,Je=Ke&8191,et=Ke>>>13,Mt=Q[4]|0,pt=Mt&8191,Pt=Mt>>>13,Ct=Q[5]|0,qt=Ct&8191,Vt=Ct>>>13,Ht=Q[6]|0,Sr=Ht&8191,Kr=Ht>>>13,Yt=Q[7]|0,Rt=Yt&8191,nr=Yt>>>13,ur=Q[8]|0,cr=ur&8191,Rr=ur>>>13,Qr=Q[9]|0,Zr=Qr&8191,ha=Qr>>>13;U.negative=P.negative^j.negative,U.length=19,se=Math.imul(H,Xt),V=Math.imul(H,or),V=V+Math.imul(X,Xt)|0,Z=Math.imul(X,or);var Pa=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(Pa>>>26)|0,Pa&=67108863,se=Math.imul(W,Xt),V=Math.imul(W,or),V=V+Math.imul(ee,Xt)|0,Z=Math.imul(ee,or),se=se+Math.imul(H,vt)|0,V=V+Math.imul(H,ht)|0,V=V+Math.imul(X,vt)|0,Z=Z+Math.imul(X,ht)|0;var La=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(La>>>26)|0,La&=67108863,se=Math.imul(he,Xt),V=Math.imul(he,or),V=V+Math.imul(xe,Xt)|0,Z=Math.imul(xe,or),se=se+Math.imul(W,vt)|0,V=V+Math.imul(W,ht)|0,V=V+Math.imul(ee,vt)|0,Z=Z+Math.imul(ee,ht)|0,se=se+Math.imul(H,Ne)|0,V=V+Math.imul(H,We)|0,V=V+Math.imul(X,Ne)|0,Z=Z+Math.imul(X,We)|0;var un=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(un>>>26)|0,un&=67108863,se=Math.imul(Me,Xt),V=Math.imul(Me,or),V=V+Math.imul(Se,Xt)|0,Z=Math.imul(Se,or),se=se+Math.imul(he,vt)|0,V=V+Math.imul(he,ht)|0,V=V+Math.imul(xe,vt)|0,Z=Z+Math.imul(xe,ht)|0,se=se+Math.imul(W,Ne)|0,V=V+Math.imul(W,We)|0,V=V+Math.imul(ee,Ne)|0,Z=Z+Math.imul(ee,We)|0,se=se+Math.imul(H,Je)|0,V=V+Math.imul(H,et)|0,V=V+Math.imul(X,Je)|0,Z=Z+Math.imul(X,et)|0;var Xa=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(Xa>>>26)|0,Xa&=67108863,se=Math.imul(Ge,Xt),V=Math.imul(Ge,or),V=V+Math.imul(qe,Xt)|0,Z=Math.imul(qe,or),se=se+Math.imul(Me,vt)|0,V=V+Math.imul(Me,ht)|0,V=V+Math.imul(Se,vt)|0,Z=Z+Math.imul(Se,ht)|0,se=se+Math.imul(he,Ne)|0,V=V+Math.imul(he,We)|0,V=V+Math.imul(xe,Ne)|0,Z=Z+Math.imul(xe,We)|0,se=se+Math.imul(W,Je)|0,V=V+Math.imul(W,et)|0,V=V+Math.imul(ee,Je)|0,Z=Z+Math.imul(ee,et)|0,se=se+Math.imul(H,pt)|0,V=V+Math.imul(H,Pt)|0,V=V+Math.imul(X,pt)|0,Z=Z+Math.imul(X,Pt)|0;var ja=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(ja>>>26)|0,ja&=67108863,se=Math.imul(_e,Xt),V=Math.imul(_e,or),V=V+Math.imul(ue,Xt)|0,Z=Math.imul(ue,or),se=se+Math.imul(Ge,vt)|0,V=V+Math.imul(Ge,ht)|0,V=V+Math.imul(qe,vt)|0,Z=Z+Math.imul(qe,ht)|0,se=se+Math.imul(Me,Ne)|0,V=V+Math.imul(Me,We)|0,V=V+Math.imul(Se,Ne)|0,Z=Z+Math.imul(Se,We)|0,se=se+Math.imul(he,Je)|0,V=V+Math.imul(he,et)|0,V=V+Math.imul(xe,Je)|0,Z=Z+Math.imul(xe,et)|0,se=se+Math.imul(W,pt)|0,V=V+Math.imul(W,Pt)|0,V=V+Math.imul(ee,pt)|0,Z=Z+Math.imul(ee,Pt)|0,se=se+Math.imul(H,qt)|0,V=V+Math.imul(H,Vt)|0,V=V+Math.imul(X,qt)|0,Z=Z+Math.imul(X,Vt)|0;var Nn=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,se=Math.imul(le,Xt),V=Math.imul(le,or),V=V+Math.imul(Ae,Xt)|0,Z=Math.imul(Ae,or),se=se+Math.imul(_e,vt)|0,V=V+Math.imul(_e,ht)|0,V=V+Math.imul(ue,vt)|0,Z=Z+Math.imul(ue,ht)|0,se=se+Math.imul(Ge,Ne)|0,V=V+Math.imul(Ge,We)|0,V=V+Math.imul(qe,Ne)|0,Z=Z+Math.imul(qe,We)|0,se=se+Math.imul(Me,Je)|0,V=V+Math.imul(Me,et)|0,V=V+Math.imul(Se,Je)|0,Z=Z+Math.imul(Se,et)|0,se=se+Math.imul(he,pt)|0,V=V+Math.imul(he,Pt)|0,V=V+Math.imul(xe,pt)|0,Z=Z+Math.imul(xe,Pt)|0,se=se+Math.imul(W,qt)|0,V=V+Math.imul(W,Vt)|0,V=V+Math.imul(ee,qt)|0,Z=Z+Math.imul(ee,Vt)|0,se=se+Math.imul(H,Sr)|0,V=V+Math.imul(H,Kr)|0,V=V+Math.imul(X,Sr)|0,Z=Z+Math.imul(X,Kr)|0;var yn=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(yn>>>26)|0,yn&=67108863,se=Math.imul(Xe,Xt),V=Math.imul(Xe,or),V=V+Math.imul(Ye,Xt)|0,Z=Math.imul(Ye,or),se=se+Math.imul(le,vt)|0,V=V+Math.imul(le,ht)|0,V=V+Math.imul(Ae,vt)|0,Z=Z+Math.imul(Ae,ht)|0,se=se+Math.imul(_e,Ne)|0,V=V+Math.imul(_e,We)|0,V=V+Math.imul(ue,Ne)|0,Z=Z+Math.imul(ue,We)|0,se=se+Math.imul(Ge,Je)|0,V=V+Math.imul(Ge,et)|0,V=V+Math.imul(qe,Je)|0,Z=Z+Math.imul(qe,et)|0,se=se+Math.imul(Me,pt)|0,V=V+Math.imul(Me,Pt)|0,V=V+Math.imul(Se,pt)|0,Z=Z+Math.imul(Se,Pt)|0,se=se+Math.imul(he,qt)|0,V=V+Math.imul(he,Vt)|0,V=V+Math.imul(xe,qt)|0,Z=Z+Math.imul(xe,Vt)|0,se=se+Math.imul(W,Sr)|0,V=V+Math.imul(W,Kr)|0,V=V+Math.imul(ee,Sr)|0,Z=Z+Math.imul(ee,Kr)|0,se=se+Math.imul(H,Rt)|0,V=V+Math.imul(H,nr)|0,V=V+Math.imul(X,Rt)|0,Z=Z+Math.imul(X,nr)|0;var Un=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(Un>>>26)|0,Un&=67108863,se=Math.imul(gt,Xt),V=Math.imul(gt,or),V=V+Math.imul(Tt,Xt)|0,Z=Math.imul(Tt,or),se=se+Math.imul(Xe,vt)|0,V=V+Math.imul(Xe,ht)|0,V=V+Math.imul(Ye,vt)|0,Z=Z+Math.imul(Ye,ht)|0,se=se+Math.imul(le,Ne)|0,V=V+Math.imul(le,We)|0,V=V+Math.imul(Ae,Ne)|0,Z=Z+Math.imul(Ae,We)|0,se=se+Math.imul(_e,Je)|0,V=V+Math.imul(_e,et)|0,V=V+Math.imul(ue,Je)|0,Z=Z+Math.imul(ue,et)|0,se=se+Math.imul(Ge,pt)|0,V=V+Math.imul(Ge,Pt)|0,V=V+Math.imul(qe,pt)|0,Z=Z+Math.imul(qe,Pt)|0,se=se+Math.imul(Me,qt)|0,V=V+Math.imul(Me,Vt)|0,V=V+Math.imul(Se,qt)|0,Z=Z+Math.imul(Se,Vt)|0,se=se+Math.imul(he,Sr)|0,V=V+Math.imul(he,Kr)|0,V=V+Math.imul(xe,Sr)|0,Z=Z+Math.imul(xe,Kr)|0,se=se+Math.imul(W,Rt)|0,V=V+Math.imul(W,nr)|0,V=V+Math.imul(ee,Rt)|0,Z=Z+Math.imul(ee,nr)|0,se=se+Math.imul(H,cr)|0,V=V+Math.imul(H,Rr)|0,V=V+Math.imul(X,cr)|0,Z=Z+Math.imul(X,Rr)|0;var li=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(li>>>26)|0,li&=67108863,se=Math.imul($t,Xt),V=Math.imul($t,or),V=V+Math.imul(rr,Xt)|0,Z=Math.imul(rr,or),se=se+Math.imul(gt,vt)|0,V=V+Math.imul(gt,ht)|0,V=V+Math.imul(Tt,vt)|0,Z=Z+Math.imul(Tt,ht)|0,se=se+Math.imul(Xe,Ne)|0,V=V+Math.imul(Xe,We)|0,V=V+Math.imul(Ye,Ne)|0,Z=Z+Math.imul(Ye,We)|0,se=se+Math.imul(le,Je)|0,V=V+Math.imul(le,et)|0,V=V+Math.imul(Ae,Je)|0,Z=Z+Math.imul(Ae,et)|0,se=se+Math.imul(_e,pt)|0,V=V+Math.imul(_e,Pt)|0,V=V+Math.imul(ue,pt)|0,Z=Z+Math.imul(ue,Pt)|0,se=se+Math.imul(Ge,qt)|0,V=V+Math.imul(Ge,Vt)|0,V=V+Math.imul(qe,qt)|0,Z=Z+Math.imul(qe,Vt)|0,se=se+Math.imul(Me,Sr)|0,V=V+Math.imul(Me,Kr)|0,V=V+Math.imul(Se,Sr)|0,Z=Z+Math.imul(Se,Kr)|0,se=se+Math.imul(he,Rt)|0,V=V+Math.imul(he,nr)|0,V=V+Math.imul(xe,Rt)|0,Z=Z+Math.imul(xe,nr)|0,se=se+Math.imul(W,cr)|0,V=V+Math.imul(W,Rr)|0,V=V+Math.imul(ee,cr)|0,Z=Z+Math.imul(ee,Rr)|0,se=se+Math.imul(H,Zr)|0,V=V+Math.imul(H,ha)|0,V=V+Math.imul(X,Zr)|0,Z=Z+Math.imul(X,ha)|0;var Yn=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(Yn>>>26)|0,Yn&=67108863,se=Math.imul($t,vt),V=Math.imul($t,ht),V=V+Math.imul(rr,vt)|0,Z=Math.imul(rr,ht),se=se+Math.imul(gt,Ne)|0,V=V+Math.imul(gt,We)|0,V=V+Math.imul(Tt,Ne)|0,Z=Z+Math.imul(Tt,We)|0,se=se+Math.imul(Xe,Je)|0,V=V+Math.imul(Xe,et)|0,V=V+Math.imul(Ye,Je)|0,Z=Z+Math.imul(Ye,et)|0,se=se+Math.imul(le,pt)|0,V=V+Math.imul(le,Pt)|0,V=V+Math.imul(Ae,pt)|0,Z=Z+Math.imul(Ae,Pt)|0,se=se+Math.imul(_e,qt)|0,V=V+Math.imul(_e,Vt)|0,V=V+Math.imul(ue,qt)|0,Z=Z+Math.imul(ue,Vt)|0,se=se+Math.imul(Ge,Sr)|0,V=V+Math.imul(Ge,Kr)|0,V=V+Math.imul(qe,Sr)|0,Z=Z+Math.imul(qe,Kr)|0,se=se+Math.imul(Me,Rt)|0,V=V+Math.imul(Me,nr)|0,V=V+Math.imul(Se,Rt)|0,Z=Z+Math.imul(Se,nr)|0,se=se+Math.imul(he,cr)|0,V=V+Math.imul(he,Rr)|0,V=V+Math.imul(xe,cr)|0,Z=Z+Math.imul(xe,Rr)|0,se=se+Math.imul(W,Zr)|0,V=V+Math.imul(W,ha)|0,V=V+Math.imul(ee,Zr)|0,Z=Z+Math.imul(ee,ha)|0;var on=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(on>>>26)|0,on&=67108863,se=Math.imul($t,Ne),V=Math.imul($t,We),V=V+Math.imul(rr,Ne)|0,Z=Math.imul(rr,We),se=se+Math.imul(gt,Je)|0,V=V+Math.imul(gt,et)|0,V=V+Math.imul(Tt,Je)|0,Z=Z+Math.imul(Tt,et)|0,se=se+Math.imul(Xe,pt)|0,V=V+Math.imul(Xe,Pt)|0,V=V+Math.imul(Ye,pt)|0,Z=Z+Math.imul(Ye,Pt)|0,se=se+Math.imul(le,qt)|0,V=V+Math.imul(le,Vt)|0,V=V+Math.imul(Ae,qt)|0,Z=Z+Math.imul(Ae,Vt)|0,se=se+Math.imul(_e,Sr)|0,V=V+Math.imul(_e,Kr)|0,V=V+Math.imul(ue,Sr)|0,Z=Z+Math.imul(ue,Kr)|0,se=se+Math.imul(Ge,Rt)|0,V=V+Math.imul(Ge,nr)|0,V=V+Math.imul(qe,Rt)|0,Z=Z+Math.imul(qe,nr)|0,se=se+Math.imul(Me,cr)|0,V=V+Math.imul(Me,Rr)|0,V=V+Math.imul(Se,cr)|0,Z=Z+Math.imul(Se,Rr)|0,se=se+Math.imul(he,Zr)|0,V=V+Math.imul(he,ha)|0,V=V+Math.imul(xe,Zr)|0,Z=Z+Math.imul(xe,ha)|0;var en=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(en>>>26)|0,en&=67108863,se=Math.imul($t,Je),V=Math.imul($t,et),V=V+Math.imul(rr,Je)|0,Z=Math.imul(rr,et),se=se+Math.imul(gt,pt)|0,V=V+Math.imul(gt,Pt)|0,V=V+Math.imul(Tt,pt)|0,Z=Z+Math.imul(Tt,Pt)|0,se=se+Math.imul(Xe,qt)|0,V=V+Math.imul(Xe,Vt)|0,V=V+Math.imul(Ye,qt)|0,Z=Z+Math.imul(Ye,Vt)|0,se=se+Math.imul(le,Sr)|0,V=V+Math.imul(le,Kr)|0,V=V+Math.imul(Ae,Sr)|0,Z=Z+Math.imul(Ae,Kr)|0,se=se+Math.imul(_e,Rt)|0,V=V+Math.imul(_e,nr)|0,V=V+Math.imul(ue,Rt)|0,Z=Z+Math.imul(ue,nr)|0,se=se+Math.imul(Ge,cr)|0,V=V+Math.imul(Ge,Rr)|0,V=V+Math.imul(qe,cr)|0,Z=Z+Math.imul(qe,Rr)|0,se=se+Math.imul(Me,Zr)|0,V=V+Math.imul(Me,ha)|0,V=V+Math.imul(Se,Zr)|0,Z=Z+Math.imul(Se,ha)|0;var vi=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(vi>>>26)|0,vi&=67108863,se=Math.imul($t,pt),V=Math.imul($t,Pt),V=V+Math.imul(rr,pt)|0,Z=Math.imul(rr,Pt),se=se+Math.imul(gt,qt)|0,V=V+Math.imul(gt,Vt)|0,V=V+Math.imul(Tt,qt)|0,Z=Z+Math.imul(Tt,Vt)|0,se=se+Math.imul(Xe,Sr)|0,V=V+Math.imul(Xe,Kr)|0,V=V+Math.imul(Ye,Sr)|0,Z=Z+Math.imul(Ye,Kr)|0,se=se+Math.imul(le,Rt)|0,V=V+Math.imul(le,nr)|0,V=V+Math.imul(Ae,Rt)|0,Z=Z+Math.imul(Ae,nr)|0,se=se+Math.imul(_e,cr)|0,V=V+Math.imul(_e,Rr)|0,V=V+Math.imul(ue,cr)|0,Z=Z+Math.imul(ue,Rr)|0,se=se+Math.imul(Ge,Zr)|0,V=V+Math.imul(Ge,ha)|0,V=V+Math.imul(qe,Zr)|0,Z=Z+Math.imul(qe,ha)|0;var Yi=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(Yi>>>26)|0,Yi&=67108863,se=Math.imul($t,qt),V=Math.imul($t,Vt),V=V+Math.imul(rr,qt)|0,Z=Math.imul(rr,Vt),se=se+Math.imul(gt,Sr)|0,V=V+Math.imul(gt,Kr)|0,V=V+Math.imul(Tt,Sr)|0,Z=Z+Math.imul(Tt,Kr)|0,se=se+Math.imul(Xe,Rt)|0,V=V+Math.imul(Xe,nr)|0,V=V+Math.imul(Ye,Rt)|0,Z=Z+Math.imul(Ye,nr)|0,se=se+Math.imul(le,cr)|0,V=V+Math.imul(le,Rr)|0,V=V+Math.imul(Ae,cr)|0,Z=Z+Math.imul(Ae,Rr)|0,se=se+Math.imul(_e,Zr)|0,V=V+Math.imul(_e,ha)|0,V=V+Math.imul(ue,Zr)|0,Z=Z+Math.imul(ue,ha)|0;var Ja=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(Ja>>>26)|0,Ja&=67108863,se=Math.imul($t,Sr),V=Math.imul($t,Kr),V=V+Math.imul(rr,Sr)|0,Z=Math.imul(rr,Kr),se=se+Math.imul(gt,Rt)|0,V=V+Math.imul(gt,nr)|0,V=V+Math.imul(Tt,Rt)|0,Z=Z+Math.imul(Tt,nr)|0,se=se+Math.imul(Xe,cr)|0,V=V+Math.imul(Xe,Rr)|0,V=V+Math.imul(Ye,cr)|0,Z=Z+Math.imul(Ye,Rr)|0,se=se+Math.imul(le,Zr)|0,V=V+Math.imul(le,ha)|0,V=V+Math.imul(Ae,Zr)|0,Z=Z+Math.imul(Ae,ha)|0;var Oa=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(Oa>>>26)|0,Oa&=67108863,se=Math.imul($t,Rt),V=Math.imul($t,nr),V=V+Math.imul(rr,Rt)|0,Z=Math.imul(rr,nr),se=se+Math.imul(gt,cr)|0,V=V+Math.imul(gt,Rr)|0,V=V+Math.imul(Tt,cr)|0,Z=Z+Math.imul(Tt,Rr)|0,se=se+Math.imul(Xe,Zr)|0,V=V+Math.imul(Xe,ha)|0,V=V+Math.imul(Ye,Zr)|0,Z=Z+Math.imul(Ye,ha)|0;var lt=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(lt>>>26)|0,lt&=67108863,se=Math.imul($t,cr),V=Math.imul($t,Rr),V=V+Math.imul(rr,cr)|0,Z=Math.imul(rr,Rr),se=se+Math.imul(gt,Zr)|0,V=V+Math.imul(gt,ha)|0,V=V+Math.imul(Tt,Zr)|0,Z=Z+Math.imul(Tt,ha)|0;var rt=(ne+se|0)+((V&8191)<<13)|0;ne=(Z+(V>>>13)|0)+(rt>>>26)|0,rt&=67108863,se=Math.imul($t,Zr),V=Math.imul($t,ha),V=V+Math.imul(rr,Zr)|0,Z=Math.imul(rr,ha);var fr=(ne+se|0)+((V&8191)<<13)|0;return ne=(Z+(V>>>13)|0)+(fr>>>26)|0,fr&=67108863,re[0]=Pa,re[1]=La,re[2]=un,re[3]=Xa,re[4]=ja,re[5]=Nn,re[6]=yn,re[7]=Un,re[8]=li,re[9]=Yn,re[10]=on,re[11]=en,re[12]=vi,re[13]=Yi,re[14]=Ja,re[15]=Oa,re[16]=lt,re[17]=rt,re[18]=fr,ne!==0&&(re[19]=ne,U.length++),U};Math.imul||(C=M);function _(F,P,j){j.negative=P.negative^F.negative,j.length=F.length+P.length;for(var U=0,$=0,Q=0;Q>>26)|0,$+=re>>>26,re&=67108863}j.words[Q]=ne,U=re,re=$}return U!==0?j.words[Q]=U:j.length--,j.strip()}function w(F,P,j){var U=new h;return U.mulp(F,P,j)}s.prototype.mulTo=function(P,j){var U,$=this.length+P.length;return this.length===10&&P.length===10?U=C(this,P,j):$<63?U=M(this,P,j):$<1024?U=_(this,P,j):U=w(this,P,j),U};function h(F,P){this.x=F,this.y=P}h.prototype.makeRBT=function(P){for(var j=new Array(P),U=s.prototype._countBits(P)-1,$=0;$>=1;return $},h.prototype.permute=function(P,j,U,$,Q,re){for(var ne=0;ne>>1)Q++;return 1<>>13,U[2*re+1]=Q&8191,Q=Q>>>13;for(re=2*j;re<$;++re)U[re]=0;a(Q===0),a((Q&-8192)===0)},h.prototype.stub=function(P){for(var j=new Array(P),U=0;U>=26,j+=$/67108864|0,j+=Q>>>26,this.words[U]=Q&67108863}return j!==0&&(this.words[U]=j,this.length++),P===0&&(this.length=1,this._normSign()),this},s.prototype.muln=function(P){return this.clone().imuln(P)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(P){var j=S(P);if(j.length===0)return new s(1);for(var U=this,$=0;$=0);var j=P%26,U=(P-j)/26,$=67108863>>>26-j<<26-j,Q;if(j!==0){var re=0;for(Q=0;Q>>26-j}re&&(this.words[Q]=re,this.length++)}if(U!==0){for(Q=this.length-1;Q>=0;Q--)this.words[Q+U]=this.words[Q];for(Q=0;Q=0);var $;j?$=(j-j%26)/26:$=0;var Q=P%26,re=Math.min((P-Q)/26,this.length),ne=67108863^67108863>>>Q<re)for(this.length-=re,V=0;V=0&&(Z!==0||V>=$);V--){var K=this.words[V]|0;this.words[V]=Z<<26-Q|K>>>Q,Z=K&ne}return se&&Z!==0&&(se.words[se.length++]=Z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(P,j,U){return a(this.negative===0),this.iushrn(P,j,U)},s.prototype.shln=function(P){return this.clone().ishln(P)},s.prototype.ushln=function(P){return this.clone().iushln(P)},s.prototype.shrn=function(P){return this.clone().ishrn(P)},s.prototype.ushrn=function(P){return this.clone().iushrn(P)},s.prototype.testn=function(P){a(typeof P=="number"&&P>=0);var j=P%26,U=(P-j)/26,$=1<=0);var j=P%26,U=(P-j)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=U)return this;if(j!==0&&U++,this.length=Math.min(U,this.length),j!==0){var $=67108863^67108863>>>j<=67108864;j++)this.words[j]-=67108864,j===this.length-1?this.words[j+1]=1:this.words[j+1]++;return this.length=Math.max(this.length,j+1),this},s.prototype.isubn=function(P){if(a(typeof P=="number"),a(P<67108864),P<0)return this.iaddn(-P);if(this.negative!==0)return this.negative=0,this.iaddn(P),this.negative=1,this;if(this.words[0]-=P,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var j=0;j>26)-(se/67108864|0),this.words[Q+U]=re&67108863}for(;Q>26,this.words[Q+U]=re&67108863;if(ne===0)return this.strip();for(a(ne===-1),ne=0,Q=0;Q>26,this.words[Q]=re&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(P,j){var U=this.length-P.length,$=this.clone(),Q=P,re=Q.words[Q.length-1]|0,ne=this._countBits(re);U=26-ne,U!==0&&(Q=Q.ushln(U),$.iushln(U),re=Q.words[Q.length-1]|0);var se=$.length-Q.length,V;if(j!=="mod"){V=new s(null),V.length=se+1,V.words=new Array(V.length);for(var Z=0;Z=0;H--){var X=($.words[Q.length+H]|0)*67108864+($.words[Q.length+H-1]|0);for(X=Math.min(X/re|0,67108863),$._ishlnsubmul(Q,X,H);$.negative!==0;)X--,$.negative=0,$._ishlnsubmul(Q,1,H),$.isZero()||($.negative^=1);V&&(V.words[H]=X)}return V&&V.strip(),$.strip(),j!=="div"&&U!==0&&$.iushrn(U),{div:V||null,mod:$}},s.prototype.divmod=function(P,j,U){if(a(!P.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var $,Q,re;return this.negative!==0&&P.negative===0?(re=this.neg().divmod(P,j),j!=="mod"&&($=re.div.neg()),j!=="div"&&(Q=re.mod.neg(),U&&Q.negative!==0&&Q.iadd(P)),{div:$,mod:Q}):this.negative===0&&P.negative!==0?(re=this.divmod(P.neg(),j),j!=="mod"&&($=re.div.neg()),{div:$,mod:re.mod}):this.negative&P.negative?(re=this.neg().divmod(P.neg(),j),j!=="div"&&(Q=re.mod.neg(),U&&Q.negative!==0&&Q.isub(P)),{div:re.div,mod:Q}):P.length>this.length||this.cmp(P)<0?{div:new s(0),mod:this}:P.length===1?j==="div"?{div:this.divn(P.words[0]),mod:null}:j==="mod"?{div:null,mod:new s(this.modn(P.words[0]))}:{div:this.divn(P.words[0]),mod:new s(this.modn(P.words[0]))}:this._wordDiv(P,j)},s.prototype.div=function(P){return this.divmod(P,"div",!1).div},s.prototype.mod=function(P){return this.divmod(P,"mod",!1).mod},s.prototype.umod=function(P){return this.divmod(P,"mod",!0).mod},s.prototype.divRound=function(P){var j=this.divmod(P);if(j.mod.isZero())return j.div;var U=j.mod.abs(),$=P.abs().iushrn(1),Q=P.words[0]&1,re=U.cmp($);if(re<0||Q===1&&re===0)return j.div;var ne=new s(1);return ne.negative=this.negative^P.negative,j.div.iadd(ne)},s.prototype.modn=function(P){a(P<=67108863);for(var j=(1<<26)%P,U=0,$=this.length-1;$>=0;$--)U=(j*U+(this.words[$]|0))%P;return U},s.prototype.idivn=function(P){a(P<=67108863);for(var j=0,U=this.length-1;U>=0;U--){var $=(this.words[U]|0)+j*67108864;this.words[U]=$/P|0,j=$%P}return this.strip()},s.prototype.divn=function(P){return this.clone().idivn(P)},s.prototype.egcd=function(P){a(P.negative===0),a(!P.isZero());var j=this,U=P.clone();j.negative!==0?j=j.umod(P):j=j.clone();for(var $=new s(1),Q=new s(0),re=new s(0),ne=new s(1),se=0;j.isEven()&&U.isEven();)j.iushrn(1),U.iushrn(1),++se;for(var V=U.clone(),Z=j.clone();!j.isZero();){for(var K=0,H=1;!(j.words[0]&H)&&K<26;++K,H<<=1);if(K>0)for(j.iushrn(K);K-- >0;)($.isOdd()||Q.isOdd())&&($.iadd(V),Q.isub(Z)),$.iushrn(1),Q.iushrn(1);for(var X=0,q=1;!(U.words[0]&q)&&X<26;++X,q<<=1);if(X>0)for(U.iushrn(X);X-- >0;)(re.isOdd()||ne.isOdd())&&(re.iadd(V),ne.isub(Z)),re.iushrn(1),ne.iushrn(1);j.cmp(U)>=0?(j.isub(U),$.isub(re),Q.isub(ne)):(U.isub(j),re.isub($),ne.isub(Q))}return{a:re,b:ne,gcd:U.iushln(se)}},s.prototype._invmp=function(P){a(P.negative===0),a(!P.isZero());var j=this,U=P.clone();j.negative!==0?j=j.umod(P):j=j.clone();for(var $=new s(1),Q=new s(0),re=U.clone();j.cmpn(1)>0&&U.cmpn(1)>0;){for(var ne=0,se=1;!(j.words[0]&se)&&ne<26;++ne,se<<=1);if(ne>0)for(j.iushrn(ne);ne-- >0;)$.isOdd()&&$.iadd(re),$.iushrn(1);for(var V=0,Z=1;!(U.words[0]&Z)&&V<26;++V,Z<<=1);if(V>0)for(U.iushrn(V);V-- >0;)Q.isOdd()&&Q.iadd(re),Q.iushrn(1);j.cmp(U)>=0?(j.isub(U),$.isub(Q)):(U.isub(j),Q.isub($))}var K;return j.cmpn(1)===0?K=$:K=Q,K.cmpn(0)<0&&K.iadd(P),K},s.prototype.gcd=function(P){if(this.isZero())return P.abs();if(P.isZero())return this.abs();var j=this.clone(),U=P.clone();j.negative=0,U.negative=0;for(var $=0;j.isEven()&&U.isEven();$++)j.iushrn(1),U.iushrn(1);do{for(;j.isEven();)j.iushrn(1);for(;U.isEven();)U.iushrn(1);var Q=j.cmp(U);if(Q<0){var re=j;j=U,U=re}else if(Q===0||U.cmpn(1)===0)break;j.isub(U)}while(!0);return U.iushln($)},s.prototype.invm=function(P){return this.egcd(P).a.umod(P)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(P){return this.words[0]&P},s.prototype.bincn=function(P){a(typeof P=="number");var j=P%26,U=(P-j)/26,$=1<>>26,ne&=67108863,this.words[re]=ne}return Q!==0&&(this.words[re]=Q,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(P){var j=P<0;if(this.negative!==0&&!j)return-1;if(this.negative===0&&j)return 1;this.strip();var U;if(this.length>1)U=1;else{j&&(P=-P),a(P<=67108863,"Number is too big");var $=this.words[0]|0;U=$===P?0:$P.length)return 1;if(this.length=0;U--){var $=this.words[U]|0,Q=P.words[U]|0;if($!==Q){$Q&&(j=1);break}}return j},s.prototype.gtn=function(P){return this.cmpn(P)===1},s.prototype.gt=function(P){return this.cmp(P)===1},s.prototype.gten=function(P){return this.cmpn(P)>=0},s.prototype.gte=function(P){return this.cmp(P)>=0},s.prototype.ltn=function(P){return this.cmpn(P)===-1},s.prototype.lt=function(P){return this.cmp(P)===-1},s.prototype.lten=function(P){return this.cmpn(P)<=0},s.prototype.lte=function(P){return this.cmp(P)<=0},s.prototype.eqn=function(P){return this.cmpn(P)===0},s.prototype.eq=function(P){return this.cmp(P)===0},s.red=function(P){return new D(P)},s.prototype.toRed=function(P){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),P.convertTo(this)._forceRed(P)},s.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(P){return this.red=P,this},s.prototype.forceRed=function(P){return a(!this.red,"Already a number in reduction context"),this._forceRed(P)},s.prototype.redAdd=function(P){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,P)},s.prototype.redIAdd=function(P){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,P)},s.prototype.redSub=function(P){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,P)},s.prototype.redISub=function(P){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,P)},s.prototype.redShl=function(P){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,P)},s.prototype.redMul=function(P){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.mul(this,P)},s.prototype.redIMul=function(P){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.imul(this,P)},s.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(P){return a(this.red&&!P.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,P)};var u={k256:null,p224:null,p192:null,p25519:null};function A(F,P){this.name=F,this.p=new s(P,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}A.prototype._tmp=function(){var P=new s(null);return P.words=new Array(Math.ceil(this.n/13)),P},A.prototype.ireduce=function(P){var j=P,U;do this.split(j,this.tmp),j=this.imulK(j),j=j.iadd(this.tmp),U=j.bitLength();while(U>this.n);var $=U0?j.isub(this.p):j.strip!==void 0?j.strip():j._strip(),j},A.prototype.split=function(P,j){P.iushrn(this.n,0,j)},A.prototype.imulK=function(P){return P.imul(this.k)};function x(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(x,A),x.prototype.split=function(P,j){for(var U=4194303,$=Math.min(P.length,9),Q=0;Q<$;Q++)j.words[Q]=P.words[Q];if(j.length=$,P.length<=9){P.words[0]=0,P.length=1;return}var re=P.words[9];for(j.words[j.length++]=re&U,Q=10;Q>>22,re=ne}re>>>=22,P.words[Q-10]=re,re===0&&P.length>10?P.length-=10:P.length-=9},x.prototype.imulK=function(P){P.words[P.length]=0,P.words[P.length+1]=0,P.length+=2;for(var j=0,U=0;U>>=26,P.words[U]=Q,j=$}return j!==0&&(P.words[P.length++]=j),P},s._prime=function(P){if(u[P])return u[P];var j;if(P==="k256")j=new x;else if(P==="p224")j=new z;else if(P==="p192")j=new I;else if(P==="p25519")j=new O;else throw new Error("Unknown prime "+P);return u[P]=j,j};function D(F){if(typeof F=="string"){var P=s._prime(F);this.m=P.p,this.prime=P}else a(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}D.prototype._verify1=function(P){a(P.negative===0,"red works only with positives"),a(P.red,"red works only with red numbers")},D.prototype._verify2=function(P,j){a((P.negative|j.negative)===0,"red works only with positives"),a(P.red&&P.red===j.red,"red works only with red numbers")},D.prototype.imod=function(P){return this.prime?this.prime.ireduce(P)._forceRed(this):P.umod(this.m)._forceRed(this)},D.prototype.neg=function(P){return P.isZero()?P.clone():this.m.sub(P)._forceRed(this)},D.prototype.add=function(P,j){this._verify2(P,j);var U=P.add(j);return U.cmp(this.m)>=0&&U.isub(this.m),U._forceRed(this)},D.prototype.iadd=function(P,j){this._verify2(P,j);var U=P.iadd(j);return U.cmp(this.m)>=0&&U.isub(this.m),U},D.prototype.sub=function(P,j){this._verify2(P,j);var U=P.sub(j);return U.cmpn(0)<0&&U.iadd(this.m),U._forceRed(this)},D.prototype.isub=function(P,j){this._verify2(P,j);var U=P.isub(j);return U.cmpn(0)<0&&U.iadd(this.m),U},D.prototype.shl=function(P,j){return this._verify1(P),this.imod(P.ushln(j))},D.prototype.imul=function(P,j){return this._verify2(P,j),this.imod(P.imul(j))},D.prototype.mul=function(P,j){return this._verify2(P,j),this.imod(P.mul(j))},D.prototype.isqr=function(P){return this.imul(P,P.clone())},D.prototype.sqr=function(P){return this.mul(P,P)},D.prototype.sqrt=function(P){if(P.isZero())return P.clone();var j=this.m.andln(3);if(a(j%2===1),j===3){var U=this.m.add(new s(1)).iushrn(2);return this.pow(P,U)}for(var $=this.m.subn(1),Q=0;!$.isZero()&&$.andln(1)===0;)Q++,$.iushrn(1);a(!$.isZero());var re=new s(1).toRed(this),ne=re.redNeg(),se=this.m.subn(1).iushrn(1),V=this.m.bitLength();for(V=new s(2*V*V).toRed(this);this.pow(V,se).cmp(ne)!==0;)V.redIAdd(ne);for(var Z=this.pow(V,$),K=this.pow(P,$.addn(1).iushrn(1)),H=this.pow(P,$),X=Q;H.cmp(re)!==0;){for(var q=H,W=0;q.cmp(re)!==0;W++)q=q.redSqr();a(W=0;Q--){for(var Z=j.words[Q],K=V-1;K>=0;K--){var H=Z>>K&1;if(re!==$[0]&&(re=this.sqr(re)),H===0&&ne===0){se=0;continue}ne<<=1,ne|=H,se++,!(se!==U&&(Q!==0||K!==0))&&(re=this.mul(re,$[ne]),se=0,ne=0)}V=26}return re},D.prototype.convertTo=function(P){var j=P.umod(this.m);return j===P?j.clone():j},D.prototype.convertFrom=function(P){var j=P.clone();return j.red=null,j},s.mont=function(P){return new B(P)};function B(F){D.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}o(B,D),B.prototype.convertTo=function(P){return this.imod(P.ushln(this.shift))},B.prototype.convertFrom=function(P){var j=this.imod(P.mul(this.rinv));return j.red=null,j},B.prototype.imul=function(P,j){if(P.isZero()||j.isZero())return P.words[0]=0,P.length=1,P;var U=P.imul(j),$=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub($).iushrn(this.shift),re=Q;return Q.cmp(this.m)>=0?re=Q.isub(this.m):Q.cmpn(0)<0&&(re=Q.iadd(this.m)),re._forceRed(this)},B.prototype.mul=function(P,j){if(P.isZero()||j.isZero())return new s(0)._forceRed(this);var U=P.mul(j),$=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub($).iushrn(this.shift),re=Q;return Q.cmp(this.m)>=0?re=Q.isub(this.m):Q.cmpn(0)<0&&(re=Q.iadd(this.m)),re._forceRed(this)},B.prototype.invm=function(P){var j=this.imod(P._invmp(this.m).mul(this.r2));return j._forceRed(this)}}(l,this)},6204(l){"use strict";l.exports=e;function e(t){var n,r,a,o=t.length,s=0;for(n=0;n>>1;if(!(h<=0)){var u,A=n.mallocDouble(2*h*_),x=n.mallocInt32(_);if(_=s(T,h,A,x),_>0){if(h===1&&C)r.init(_),u=r.sweepComplete(h,M,0,_,A,x,0,_,A,x);else{var z=n.mallocDouble(2*h*w),I=n.mallocInt32(w);w=s(S,h,z,I),w>0&&(r.init(_+w),h===1?u=r.sweepBipartite(h,M,0,_,A,x,0,w,z,I):u=a(h,M,C,_,A,x,w,z,I),n.free(z),n.free(I))}n.free(A),n.free(x)}return u}}}var g;function f(T,S){g.push([T,S])}function v(T){return g=[],c(T,T,f,!0),g}function m(T,S){return g=[],c(T,S,f,!1),g}function i(T,S,M){switch(arguments.length){case 1:return v(T);case 2:return typeof S=="function"?c(T,T,S,!0):m(T,S);case 3:return c(T,S,M,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455(l,e){"use strict";function t(){function a(c,g,f,v,m,i,T,S,M,C,_){for(var w=2*c,h=v,u=w*v;hM-S?a(c,g,f,v,m,i,T,S,M,C,_):o(c,g,f,v,m,i,T,S,M,C,_)}return s}function n(){function a(f,v,m,i,T,S,M,C,_,w,h){for(var u=2*f,A=i,x=u*i;Aw-_?i?a(f,v,m,T,S,M,C,_,w,h,u):o(f,v,m,T,S,M,C,_,w,h,u):i?s(f,v,m,T,S,M,C,_,w,h,u):c(f,v,m,T,S,M,C,_,w,h,u)}return g}function r(a){return a?t():n()}e.partial=r(!1),e.full=r(!0)},7150(l,e,t){"use strict";l.exports=F;var n=t(1888),r=t(8828),a=t(2455),o=a.partial,s=a.full,c=t(855),g=t(3545),f=t(8105),v=128,m=1<<22,i=1<<22,T=f("!(lo>=p0)&&!(p1>=hi)"),S=f("lo===p0"),M=f("lo0;){Z-=1;var X=Z*h,q=x[X],W=x[X+1],ee=x[X+2],ae=x[X+3],he=x[X+4],xe=x[X+5],we=Z*u,Me=z[we],Se=z[we+1],Ie=xe&1,Ge=!!(xe&16),qe=Q,ke=re,_e=se,ue=V;if(Ie&&(qe=se,ke=V,_e=Q,ue=re),!(xe&2&&(ee=M(P,q,W,ee,qe,ke,Se),W>=ee))&&!(xe&4&&(W=C(P,q,W,ee,qe,ke,Me),W>=ee))){var ve=ee-W,le=he-ae;if(Ge){if(P*ve*(ve+le)f&&m[w+g]>C;--_,w-=T){for(var h=w,u=w+T,A=0;A>>1,C=2*c,_=M,w=m[C*M+g];T=z?(_=x,w=z):A>=O?(_=u,w=A):(_=I,w=O):z>=O?(_=x,w=z):O>=A?(_=u,w=A):(_=I,w=O);for(var F=C*(S-1),P=C*_,D=0;D=p0)&&!(p1>=hi)":g};function t(f){return e[f]}function n(f,v,m,i,T,S,M){for(var C=2*f,_=C*m,w=_,h=m,u=v,A=f+v,x=m;i>x;++x,_+=C){var z=T[_+u];if(z===M)if(h===x)h+=1,w+=C;else{for(var I=0;C>I;++I){var O=T[_+I];T[_+I]=T[w],T[w++]=O}var D=S[x];S[x]=S[h],S[h++]=D}}return h}function r(f,v,m,i,T,S,M){for(var C=2*f,_=C*m,w=_,h=m,u=v,A=f+v,x=m;i>x;++x,_+=C){var z=T[_+u];if(zI;++I){var O=T[_+I];T[_+I]=T[w],T[w++]=O}var D=S[x];S[x]=S[h],S[h++]=D}}return h}function a(f,v,m,i,T,S,M){for(var C=2*f,_=C*m,w=_,h=m,u=v,A=f+v,x=m;i>x;++x,_+=C){var z=T[_+A];if(z<=M)if(h===x)h+=1,w+=C;else{for(var I=0;C>I;++I){var O=T[_+I];T[_+I]=T[w],T[w++]=O}var D=S[x];S[x]=S[h],S[h++]=D}}return h}function o(f,v,m,i,T,S,M){for(var C=2*f,_=C*m,w=_,h=m,u=v,A=f+v,x=m;i>x;++x,_+=C){var z=T[_+A];if(z<=M)if(h===x)h+=1,w+=C;else{for(var I=0;C>I;++I){var O=T[_+I];T[_+I]=T[w],T[w++]=O}var D=S[x];S[x]=S[h],S[h++]=D}}return h}function s(f,v,m,i,T,S,M){for(var C=2*f,_=C*m,w=_,h=m,u=v,A=f+v,x=m;i>x;++x,_+=C){var z=T[_+u],I=T[_+A];if(z<=M&&M<=I)if(h===x)h+=1,w+=C;else{for(var O=0;C>O;++O){var D=T[_+O];T[_+O]=T[w],T[w++]=D}var B=S[x];S[x]=S[h],S[h++]=B}}return h}function c(f,v,m,i,T,S,M){for(var C=2*f,_=C*m,w=_,h=m,u=v,A=f+v,x=m;i>x;++x,_+=C){var z=T[_+u],I=T[_+A];if(zO;++O){var D=T[_+O];T[_+O]=T[w],T[w++]=D}var B=S[x];S[x]=S[h],S[h++]=B}}return h}function g(f,v,m,i,T,S,M,C){for(var _=2*f,w=_*m,h=w,u=m,A=v,x=f+v,z=m;i>z;++z,w+=_){var I=T[w+A],O=T[w+x];if(!(I>=M)&&!(C>=O))if(u===z)u+=1,h+=_;else{for(var D=0;_>D;++D){var B=T[w+D];T[w+D]=T[h],T[h++]=B}var F=S[z];S[z]=S[u],S[u++]=F}}return u}},4192(l){"use strict";l.exports=t;var e=32;function t(v,m){m<=4*e?n(0,m-1,v):f(0,m-1,v)}function n(v,m,i){for(var T=2*(v+1),S=v+1;S<=m;++S){for(var M=i[T++],C=i[T++],_=S,w=T-2;_-- >v;){var h=i[w-2],u=i[w-1];if(hi[m+1]:!0}function g(v,m,i,T){v*=2;var S=T[v];return S>1,_=C-T,w=C+T,h=S,u=_,A=C,x=w,z=M,I=v+1,O=m-1,D=0;c(h,u,i)&&(D=h,h=u,u=D),c(x,z,i)&&(D=x,x=z,z=D),c(h,A,i)&&(D=h,h=A,A=D),c(u,A,i)&&(D=u,u=A,A=D),c(h,x,i)&&(D=h,h=x,x=D),c(A,x,i)&&(D=A,A=x,x=D),c(u,z,i)&&(D=u,u=z,z=D),c(u,A,i)&&(D=u,u=A,A=D),c(x,z,i)&&(D=x,x=z,z=D);for(var B=i[2*u],F=i[2*u+1],P=i[2*x],j=i[2*x+1],U=2*h,$=2*A,Q=2*z,re=2*S,ne=2*C,se=2*M,V=0;V<2;++V){var Z=i[U+V],K=i[$+V],H=i[Q+V];i[re+V]=Z,i[ne+V]=K,i[se+V]=H}a(_,v,i),a(w,m,i);for(var X=I;X<=O;++X)if(g(X,B,F,i))X!==I&&r(X,I,i),++I;else if(!g(X,P,j,i))for(;;)if(g(O,P,j,i)){g(O,B,F,i)?(o(X,I,O,i),++I,--O):(r(X,O,i),--O);break}else{if(--O>>1;a(T,K);for(var H=0,X=0,ne=0;ne=o)q=q-o|0,M(f,v,X--,q);else if(q>=0)M(c,g,H--,q);else if(q<=-o){q=-q-o|0;for(var W=0;W>>1;a(T,K);for(var H=0,X=0,q=0,ne=0;ne>1===T[2*ne+3]>>1&&(ee=2,ne+=1),W<0){for(var ae=-(W>>1)-1,he=0;he>1)-1;ee===0?M(c,g,H--,ae):ee===1?M(f,v,X--,ae):ee===2&&M(m,i,q--,ae)}}}function h(A,x,z,I,O,D,B,F,P,j,U,$){var Q=0,re=2*A,ne=x,se=x+A,V=1,Z=1;I?Z=o:V=o;for(var K=O;K>>1;a(T,W);for(var ee=0,K=0;K=o?(he=!I,H-=o):(he=!!I,H-=1),he)C(c,g,ee++,H);else{var xe=$[H],we=re*H,Me=U[we+x+1],Se=U[we+x+1+A];e:for(var Ie=0;Ie>>1;a(T,H);for(var X=0,se=0;se=o)c[X++]=V-o;else{V-=1;var W=U[V],ee=Q*V,ae=j[ee+x+1],he=j[ee+x+1+A];e:for(var xe=0;xe=0;--xe)if(c[xe]===V){for(var Ie=xe+1;Ies)throw new RangeError('The value "'+ke+'" is invalid for option "size"');var _e=new Uint8Array(ke);return Object.setPrototypeOf(_e,f.prototype),_e}function f(ke,_e,ue){if(typeof ke=="number"){if(typeof _e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return T(ke)}return v(ke,_e,ue)}f.poolSize=8192;function v(ke,_e,ue){if(typeof ke=="string")return S(ke,_e);if(ArrayBuffer.isView(ke))return C(ke);if(ke==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke);if(Ie(ke,ArrayBuffer)||ke&&Ie(ke.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(ke,SharedArrayBuffer)||ke&&Ie(ke.buffer,SharedArrayBuffer)))return _(ke,_e,ue);if(typeof ke=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ve=ke.valueOf&&ke.valueOf();if(ve!=null&&ve!==ke)return f.from(ve,_e,ue);var le=w(ke);if(le)return le;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ke[Symbol.toPrimitive]=="function")return f.from(ke[Symbol.toPrimitive]("string"),_e,ue);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke)}f.from=function(ke,_e,ue){return v(ke,_e,ue)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array);function m(ke){if(typeof ke!="number")throw new TypeError('"size" argument must be of type number');if(ke<0)throw new RangeError('The value "'+ke+'" is invalid for option "size"')}function i(ke,_e,ue){return m(ke),ke<=0?g(ke):_e!==void 0?typeof ue=="string"?g(ke).fill(_e,ue):g(ke).fill(_e):g(ke)}f.alloc=function(ke,_e,ue){return i(ke,_e,ue)};function T(ke){return m(ke),g(ke<0?0:h(ke)|0)}f.allocUnsafe=function(ke){return T(ke)},f.allocUnsafeSlow=function(ke){return T(ke)};function S(ke,_e){if((typeof _e!="string"||_e==="")&&(_e="utf8"),!f.isEncoding(_e))throw new TypeError("Unknown encoding: "+_e);var ue=A(ke,_e)|0,ve=g(ue),le=ve.write(ke,_e);return le!==ue&&(ve=ve.slice(0,le)),ve}function M(ke){for(var _e=ke.length<0?0:h(ke.length)|0,ue=g(_e),ve=0;ve<_e;ve+=1)ue[ve]=ke[ve]&255;return ue}function C(ke){if(Ie(ke,Uint8Array)){var _e=new Uint8Array(ke);return _(_e.buffer,_e.byteOffset,_e.byteLength)}return M(ke)}function _(ke,_e,ue){if(_e<0||ke.byteLength<_e)throw new RangeError('"offset" is outside of buffer bounds');if(ke.byteLength<_e+(ue||0))throw new RangeError('"length" is outside of buffer bounds');var ve;return _e===void 0&&ue===void 0?ve=new Uint8Array(ke):ue===void 0?ve=new Uint8Array(ke,_e):ve=new Uint8Array(ke,_e,ue),Object.setPrototypeOf(ve,f.prototype),ve}function w(ke){if(f.isBuffer(ke)){var _e=h(ke.length)|0,ue=g(_e);return ue.length===0||ke.copy(ue,0,0,_e),ue}if(ke.length!==void 0)return typeof ke.length!="number"||Ge(ke.length)?g(0):M(ke);if(ke.type==="Buffer"&&Array.isArray(ke.data))return M(ke.data)}function h(ke){if(ke>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return ke|0}function u(ke){return+ke!=ke&&(ke=0),f.alloc(+ke)}f.isBuffer=function(_e){return _e!=null&&_e._isBuffer===!0&&_e!==f.prototype},f.compare=function(_e,ue){if(Ie(_e,Uint8Array)&&(_e=f.from(_e,_e.offset,_e.byteLength)),Ie(ue,Uint8Array)&&(ue=f.from(ue,ue.offset,ue.byteLength)),!f.isBuffer(_e)||!f.isBuffer(ue))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(_e===ue)return 0;for(var ve=_e.length,le=ue.length,Ae=0,Be=Math.min(ve,le);Aele.length?f.from(Be).copy(le,Ae):Uint8Array.prototype.set.call(le,Be,Ae);else if(f.isBuffer(Be))Be.copy(le,Ae);else throw new TypeError('"list" argument must be an Array of Buffers');Ae+=Be.length}return le};function A(ke,_e){if(f.isBuffer(ke))return ke.length;if(ArrayBuffer.isView(ke)||Ie(ke,ArrayBuffer))return ke.byteLength;if(typeof ke!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ke);var ue=ke.length,ve=arguments.length>2&&arguments[2]===!0;if(!ve&&ue===0)return 0;for(var le=!1;;)switch(_e){case"ascii":case"latin1":case"binary":return ue;case"utf8":case"utf-8":return he(ke).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue*2;case"hex":return ue>>>1;case"base64":return Me(ke).length;default:if(le)return ve?-1:he(ke).length;_e=(""+_e).toLowerCase(),le=!0}}f.byteLength=A;function x(ke,_e,ue){var ve=!1;if((_e===void 0||_e<0)&&(_e=0),_e>this.length||((ue===void 0||ue>this.length)&&(ue=this.length),ue<=0)||(ue>>>=0,_e>>>=0,ue<=_e))return"";for(ke||(ke="utf8");;)switch(ke){case"hex":return V(this,_e,ue);case"utf8":case"utf-8":return $(this,_e,ue);case"ascii":return ne(this,_e,ue);case"latin1":case"binary":return se(this,_e,ue);case"base64":return U(this,_e,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,_e,ue);default:if(ve)throw new TypeError("Unknown encoding: "+ke);ke=(ke+"").toLowerCase(),ve=!0}}f.prototype._isBuffer=!0;function z(ke,_e,ue){var ve=ke[_e];ke[_e]=ke[ue],ke[ue]=ve}f.prototype.swap16=function(){var _e=this.length;if(_e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ue=0;ue<_e;ue+=2)z(this,ue,ue+1);return this},f.prototype.swap32=function(){var _e=this.length;if(_e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var ue=0;ue<_e;ue+=4)z(this,ue,ue+3),z(this,ue+1,ue+2);return this},f.prototype.swap64=function(){var _e=this.length;if(_e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var ue=0;ue<_e;ue+=8)z(this,ue,ue+7),z(this,ue+1,ue+6),z(this,ue+2,ue+5),z(this,ue+3,ue+4);return this},f.prototype.toString=function(){var _e=this.length;return _e===0?"":arguments.length===0?$(this,0,_e):x.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(_e){if(!f.isBuffer(_e))throw new TypeError("Argument must be a Buffer");return this===_e?!0:f.compare(this,_e)===0},f.prototype.inspect=function(){var _e="",ue=e.IS;return _e=this.toString("hex",0,ue).replace(/(.{2})/g,"$1 ").trim(),this.length>ue&&(_e+=" ... "),""},o&&(f.prototype[o]=f.prototype.inspect),f.prototype.compare=function(_e,ue,ve,le,Ae){if(Ie(_e,Uint8Array)&&(_e=f.from(_e,_e.offset,_e.byteLength)),!f.isBuffer(_e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof _e);if(ue===void 0&&(ue=0),ve===void 0&&(ve=_e?_e.length:0),le===void 0&&(le=0),Ae===void 0&&(Ae=this.length),ue<0||ve>_e.length||le<0||Ae>this.length)throw new RangeError("out of range index");if(le>=Ae&&ue>=ve)return 0;if(le>=Ae)return-1;if(ue>=ve)return 1;if(ue>>>=0,ve>>>=0,le>>>=0,Ae>>>=0,this===_e)return 0;for(var Be=Ae-le,Xe=ve-ue,Ye=Math.min(Be,Xe),yt=this.slice(le,Ae),gt=_e.slice(ue,ve),Tt=0;Tt2147483647?ue=2147483647:ue<-2147483648&&(ue=-2147483648),ue=+ue,Ge(ue)&&(ue=le?0:ke.length-1),ue<0&&(ue=ke.length+ue),ue>=ke.length){if(le)return-1;ue=ke.length-1}else if(ue<0)if(le)ue=0;else return-1;if(typeof _e=="string"&&(_e=f.from(_e,ve)),f.isBuffer(_e))return _e.length===0?-1:O(ke,_e,ue,ve,le);if(typeof _e=="number")return _e=_e&255,typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(ke,_e,ue):Uint8Array.prototype.lastIndexOf.call(ke,_e,ue):O(ke,[_e],ue,ve,le);throw new TypeError("val must be string, number or Buffer")}function O(ke,_e,ue,ve,le){var Ae=1,Be=ke.length,Xe=_e.length;if(ve!==void 0&&(ve=String(ve).toLowerCase(),ve==="ucs2"||ve==="ucs-2"||ve==="utf16le"||ve==="utf-16le")){if(ke.length<2||_e.length<2)return-1;Ae=2,Be/=2,Xe/=2,ue/=2}function Ye($t,rr){return Ae===1?$t[rr]:$t.readUInt16BE(rr*Ae)}var yt;if(le){var gt=-1;for(yt=ue;ytBe&&(ue=Be-Xe),yt=ue;yt>=0;yt--){for(var Tt=!0,At=0;Atle&&(ve=le)):ve=le;var Ae=_e.length;ve>Ae/2&&(ve=Ae/2);for(var Be=0;Be>>0,isFinite(ve)?(ve=ve>>>0,le===void 0&&(le="utf8")):(le=ve,ve=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ae=this.length-ue;if((ve===void 0||ve>Ae)&&(ve=Ae),_e.length>0&&(ve<0||ue<0)||ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");le||(le="utf8");for(var Be=!1;;)switch(le){case"hex":return D(this,_e,ue,ve);case"utf8":case"utf-8":return B(this,_e,ue,ve);case"ascii":case"latin1":case"binary":return F(this,_e,ue,ve);case"base64":return P(this,_e,ue,ve);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,_e,ue,ve);default:if(Be)throw new TypeError("Unknown encoding: "+le);le=(""+le).toLowerCase(),Be=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(ke,_e,ue){return _e===0&&ue===ke.length?r.fromByteArray(ke):r.fromByteArray(ke.slice(_e,ue))}function $(ke,_e,ue){ue=Math.min(ke.length,ue);for(var ve=[],le=_e;le239?4:Ae>223?3:Ae>191?2:1;if(le+Xe<=ue){var Ye,yt,gt,Tt;switch(Xe){case 1:Ae<128&&(Be=Ae);break;case 2:Ye=ke[le+1],(Ye&192)===128&&(Tt=(Ae&31)<<6|Ye&63,Tt>127&&(Be=Tt));break;case 3:Ye=ke[le+1],yt=ke[le+2],(Ye&192)===128&&(yt&192)===128&&(Tt=(Ae&15)<<12|(Ye&63)<<6|yt&63,Tt>2047&&(Tt<55296||Tt>57343)&&(Be=Tt));break;case 4:Ye=ke[le+1],yt=ke[le+2],gt=ke[le+3],(Ye&192)===128&&(yt&192)===128&&(gt&192)===128&&(Tt=(Ae&15)<<18|(Ye&63)<<12|(yt&63)<<6|gt&63,Tt>65535&&Tt<1114112&&(Be=Tt))}}Be===null?(Be=65533,Xe=1):Be>65535&&(Be-=65536,ve.push(Be>>>10&1023|55296),Be=56320|Be&1023),ve.push(Be),le+=Xe}return re(ve)}var Q=4096;function re(ke){var _e=ke.length;if(_e<=Q)return String.fromCharCode.apply(String,ke);for(var ue="",ve=0;ve<_e;)ue+=String.fromCharCode.apply(String,ke.slice(ve,ve+=Q));return ue}function ne(ke,_e,ue){var ve="";ue=Math.min(ke.length,ue);for(var le=_e;leve)&&(ue=ve);for(var le="",Ae=_e;Aeve&&(_e=ve),ue<0?(ue+=ve,ue<0&&(ue=0)):ue>ve&&(ue=ve),ue<_e&&(ue=_e);var le=this.subarray(_e,ue);return Object.setPrototypeOf(le,f.prototype),le};function K(ke,_e,ue){if(ke%1!==0||ke<0)throw new RangeError("offset is not uint");if(ke+_e>ue)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(_e,ue,ve){_e=_e>>>0,ue=ue>>>0,ve||K(_e,ue,this.length);for(var le=this[_e],Ae=1,Be=0;++Be>>0,ue=ue>>>0,ve||K(_e,ue,this.length);for(var le=this[_e+--ue],Ae=1;ue>0&&(Ae*=256);)le+=this[_e+--ue]*Ae;return le},f.prototype.readUint8=f.prototype.readUInt8=function(_e,ue){return _e=_e>>>0,ue||K(_e,1,this.length),this[_e]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(_e,ue){return _e=_e>>>0,ue||K(_e,2,this.length),this[_e]|this[_e+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(_e,ue){return _e=_e>>>0,ue||K(_e,2,this.length),this[_e]<<8|this[_e+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(_e,ue){return _e=_e>>>0,ue||K(_e,4,this.length),(this[_e]|this[_e+1]<<8|this[_e+2]<<16)+this[_e+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(_e,ue){return _e=_e>>>0,ue||K(_e,4,this.length),this[_e]*16777216+(this[_e+1]<<16|this[_e+2]<<8|this[_e+3])},f.prototype.readIntLE=function(_e,ue,ve){_e=_e>>>0,ue=ue>>>0,ve||K(_e,ue,this.length);for(var le=this[_e],Ae=1,Be=0;++Be=Ae&&(le-=Math.pow(2,8*ue)),le},f.prototype.readIntBE=function(_e,ue,ve){_e=_e>>>0,ue=ue>>>0,ve||K(_e,ue,this.length);for(var le=ue,Ae=1,Be=this[_e+--le];le>0&&(Ae*=256);)Be+=this[_e+--le]*Ae;return Ae*=128,Be>=Ae&&(Be-=Math.pow(2,8*ue)),Be},f.prototype.readInt8=function(_e,ue){return _e=_e>>>0,ue||K(_e,1,this.length),this[_e]&128?(255-this[_e]+1)*-1:this[_e]},f.prototype.readInt16LE=function(_e,ue){_e=_e>>>0,ue||K(_e,2,this.length);var ve=this[_e]|this[_e+1]<<8;return ve&32768?ve|4294901760:ve},f.prototype.readInt16BE=function(_e,ue){_e=_e>>>0,ue||K(_e,2,this.length);var ve=this[_e+1]|this[_e]<<8;return ve&32768?ve|4294901760:ve},f.prototype.readInt32LE=function(_e,ue){return _e=_e>>>0,ue||K(_e,4,this.length),this[_e]|this[_e+1]<<8|this[_e+2]<<16|this[_e+3]<<24},f.prototype.readInt32BE=function(_e,ue){return _e=_e>>>0,ue||K(_e,4,this.length),this[_e]<<24|this[_e+1]<<16|this[_e+2]<<8|this[_e+3]},f.prototype.readFloatLE=function(_e,ue){return _e=_e>>>0,ue||K(_e,4,this.length),a.read(this,_e,!0,23,4)},f.prototype.readFloatBE=function(_e,ue){return _e=_e>>>0,ue||K(_e,4,this.length),a.read(this,_e,!1,23,4)},f.prototype.readDoubleLE=function(_e,ue){return _e=_e>>>0,ue||K(_e,8,this.length),a.read(this,_e,!0,52,8)},f.prototype.readDoubleBE=function(_e,ue){return _e=_e>>>0,ue||K(_e,8,this.length),a.read(this,_e,!1,52,8)};function H(ke,_e,ue,ve,le,Ae){if(!f.isBuffer(ke))throw new TypeError('"buffer" argument must be a Buffer instance');if(_e>le||_eke.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(_e,ue,ve,le){if(_e=+_e,ue=ue>>>0,ve=ve>>>0,!le){var Ae=Math.pow(2,8*ve)-1;H(this,_e,ue,ve,Ae,0)}var Be=1,Xe=0;for(this[ue]=_e&255;++Xe>>0,ve=ve>>>0,!le){var Ae=Math.pow(2,8*ve)-1;H(this,_e,ue,ve,Ae,0)}var Be=ve-1,Xe=1;for(this[ue+Be]=_e&255;--Be>=0&&(Xe*=256);)this[ue+Be]=_e/Xe&255;return ue+ve},f.prototype.writeUint8=f.prototype.writeUInt8=function(_e,ue,ve){return _e=+_e,ue=ue>>>0,ve||H(this,_e,ue,1,255,0),this[ue]=_e&255,ue+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(_e,ue,ve){return _e=+_e,ue=ue>>>0,ve||H(this,_e,ue,2,65535,0),this[ue]=_e&255,this[ue+1]=_e>>>8,ue+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(_e,ue,ve){return _e=+_e,ue=ue>>>0,ve||H(this,_e,ue,2,65535,0),this[ue]=_e>>>8,this[ue+1]=_e&255,ue+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(_e,ue,ve){return _e=+_e,ue=ue>>>0,ve||H(this,_e,ue,4,4294967295,0),this[ue+3]=_e>>>24,this[ue+2]=_e>>>16,this[ue+1]=_e>>>8,this[ue]=_e&255,ue+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(_e,ue,ve){return _e=+_e,ue=ue>>>0,ve||H(this,_e,ue,4,4294967295,0),this[ue]=_e>>>24,this[ue+1]=_e>>>16,this[ue+2]=_e>>>8,this[ue+3]=_e&255,ue+4},f.prototype.writeIntLE=function(_e,ue,ve,le){if(_e=+_e,ue=ue>>>0,!le){var Ae=Math.pow(2,8*ve-1);H(this,_e,ue,ve,Ae-1,-Ae)}var Be=0,Xe=1,Ye=0;for(this[ue]=_e&255;++Be>0)-Ye&255;return ue+ve},f.prototype.writeIntBE=function(_e,ue,ve,le){if(_e=+_e,ue=ue>>>0,!le){var Ae=Math.pow(2,8*ve-1);H(this,_e,ue,ve,Ae-1,-Ae)}var Be=ve-1,Xe=1,Ye=0;for(this[ue+Be]=_e&255;--Be>=0&&(Xe*=256);)_e<0&&Ye===0&&this[ue+Be+1]!==0&&(Ye=1),this[ue+Be]=(_e/Xe>>0)-Ye&255;return ue+ve},f.prototype.writeInt8=function(_e,ue,ve){return _e=+_e,ue=ue>>>0,ve||H(this,_e,ue,1,127,-128),_e<0&&(_e=255+_e+1),this[ue]=_e&255,ue+1},f.prototype.writeInt16LE=function(_e,ue,ve){return _e=+_e,ue=ue>>>0,ve||H(this,_e,ue,2,32767,-32768),this[ue]=_e&255,this[ue+1]=_e>>>8,ue+2},f.prototype.writeInt16BE=function(_e,ue,ve){return _e=+_e,ue=ue>>>0,ve||H(this,_e,ue,2,32767,-32768),this[ue]=_e>>>8,this[ue+1]=_e&255,ue+2},f.prototype.writeInt32LE=function(_e,ue,ve){return _e=+_e,ue=ue>>>0,ve||H(this,_e,ue,4,2147483647,-2147483648),this[ue]=_e&255,this[ue+1]=_e>>>8,this[ue+2]=_e>>>16,this[ue+3]=_e>>>24,ue+4},f.prototype.writeInt32BE=function(_e,ue,ve){return _e=+_e,ue=ue>>>0,ve||H(this,_e,ue,4,2147483647,-2147483648),_e<0&&(_e=4294967295+_e+1),this[ue]=_e>>>24,this[ue+1]=_e>>>16,this[ue+2]=_e>>>8,this[ue+3]=_e&255,ue+4};function X(ke,_e,ue,ve,le,Ae){if(ue+ve>ke.length)throw new RangeError("Index out of range");if(ue<0)throw new RangeError("Index out of range")}function q(ke,_e,ue,ve,le){return _e=+_e,ue=ue>>>0,le||X(ke,_e,ue,4,34028234663852886e22,-34028234663852886e22),a.write(ke,_e,ue,ve,23,4),ue+4}f.prototype.writeFloatLE=function(_e,ue,ve){return q(this,_e,ue,!0,ve)},f.prototype.writeFloatBE=function(_e,ue,ve){return q(this,_e,ue,!1,ve)};function W(ke,_e,ue,ve,le){return _e=+_e,ue=ue>>>0,le||X(ke,_e,ue,8,17976931348623157e292,-17976931348623157e292),a.write(ke,_e,ue,ve,52,8),ue+8}f.prototype.writeDoubleLE=function(_e,ue,ve){return W(this,_e,ue,!0,ve)},f.prototype.writeDoubleBE=function(_e,ue,ve){return W(this,_e,ue,!1,ve)},f.prototype.copy=function(_e,ue,ve,le){if(!f.isBuffer(_e))throw new TypeError("argument should be a Buffer");if(ve||(ve=0),!le&&le!==0&&(le=this.length),ue>=_e.length&&(ue=_e.length),ue||(ue=0),le>0&&le=this.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("sourceEnd out of bounds");le>this.length&&(le=this.length),_e.length-ue>>0,ve=ve===void 0?this.length:ve>>>0,_e||(_e=0);var Be;if(typeof _e=="number")for(Be=ue;Be55295&&ue<57344){if(!le){if(ue>56319){(_e-=3)>-1&&Ae.push(239,191,189);continue}else if(Be+1===ve){(_e-=3)>-1&&Ae.push(239,191,189);continue}le=ue;continue}if(ue<56320){(_e-=3)>-1&&Ae.push(239,191,189),le=ue;continue}ue=(le-55296<<10|ue-56320)+65536}else le&&(_e-=3)>-1&&Ae.push(239,191,189);if(le=null,ue<128){if((_e-=1)<0)break;Ae.push(ue)}else if(ue<2048){if((_e-=2)<0)break;Ae.push(ue>>6|192,ue&63|128)}else if(ue<65536){if((_e-=3)<0)break;Ae.push(ue>>12|224,ue>>6&63|128,ue&63|128)}else if(ue<1114112){if((_e-=4)<0)break;Ae.push(ue>>18|240,ue>>12&63|128,ue>>6&63|128,ue&63|128)}else throw new Error("Invalid code point")}return Ae}function xe(ke){for(var _e=[],ue=0;ue>8,le=ue%256,Ae.push(le),Ae.push(ve);return Ae}function Me(ke){return r.toByteArray(ae(ke))}function Se(ke,_e,ue,ve){for(var le=0;le=_e.length||le>=ke.length);++le)_e[le+ue]=ke[le];return le}function Ie(ke,_e){return ke instanceof _e||ke!=null&&ke.constructor!=null&&ke.constructor.name!=null&&ke.constructor.name===_e.name}function Ge(ke){return ke!==ke}var qe=function(){for(var ke="0123456789abcdef",_e=new Array(256),ue=0;ue<16;++ue)for(var ve=ue*16,le=0;le<16;++le)_e[ve+le]=ke[ue]+ke[le];return _e}()},2538(l,e,t){"use strict";var n=t(8902),r=t(5542),a=t(2272),o=t(5023);l.exports=v;function s(m){return[Math.min(m[0],m[1]),Math.max(m[0],m[1])]}function c(m,i){return m[0]-i[0]||m[1]-i[1]}function g(m){return m.map(s).sort(c)}function f(m,i,T){return i in m?m[i]:T}function v(m,i,T){Array.isArray(i)?(T=T||{},i=i||[]):(T=i||{},i=[]);var S=!!f(T,"delaunay",!0),M=!!f(T,"interior",!0),C=!!f(T,"exterior",!0),_=!!f(T,"infinity",!1);if(!M&&!C||m.length===0)return[];var w=n(m,i);if(S||M!==C||_){for(var h=r(m.length,g(i)),u=0;u0;){for(var S=g.pop(),m=g.pop(),M=-1,C=-1,i=v[m],w=1;w=0||(c.flip(m,S),a(s,c,g,M,m,C),a(s,c,g,m,C,M),a(s,c,g,C,S,M),a(s,c,g,S,M,C))}}},5023(l,e,t){"use strict";var n=t(2478);l.exports=g;function r(f,v,m,i,T,S,M){this.cells=f,this.neighbor=v,this.flags=i,this.constraint=m,this.active=T,this.next=S,this.boundary=M}var a=r.prototype;function o(f,v){return f[0]-v[0]||f[1]-v[1]||f[2]-v[2]}a.locate=function(){var f=[0,0,0];return function(v,m,i){var T=v,S=m,M=i;return m0||M.length>0;){for(;S.length>0;){var u=S.pop();if(C[u]!==-T){C[u]=T;for(var A=_[u],x=0;x<3;++x){var z=h[3*u+x];z>=0&&C[z]===0&&(w[3*u+x]?M.push(z):(S.push(z),C[z]=T))}}}var I=M;M=S,S=I,M.length=0,T=-T}var O=c(_,C,v);return m?O.concat(i.boundary):O}},8902(l,e,t){"use strict";var n=t(2478),r=t(3250)[3],a=0,o=1,s=2;l.exports=M;function c(C,_,w,h,u){this.a=C,this.b=_,this.idx=w,this.lowerIds=h,this.upperIds=u}function g(C,_,w,h){this.a=C,this.b=_,this.type=w,this.idx=h}function f(C,_){var w=C.a[0]-_.a[0]||C.a[1]-_.a[1]||C.type-_.type;return w||C.type!==a&&(w=r(C.a,C.b,_.b),w)?w:C.idx-_.idx}function v(C,_){return r(C.a,C.b,_)}function m(C,_,w,h,u){for(var A=n.lt(_,h,v),x=n.gt(_,h,v),z=A;z1&&r(w[O[B-2]],w[O[B-1]],h)>0;)C.push([O[B-1],O[B-2],u]),B-=1;O.length=B,O.push(u);for(var D=I.upperIds,B=D.length;B>1&&r(w[D[B-2]],w[D[B-1]],h)<0;)C.push([D[B-2],D[B-1],u]),B-=1;D.length=B,D.push(u)}}function i(C,_){var w;return C.a[0]<_.a[0]?w=r(C.a,C.b,_.a):w=r(_.b,_.a,C.a),w||(_.b[0]I[0]&&u.push(new g(I,z,s,A),new g(z,I,o,A))}u.sort(f);for(var O=u[0].a[0]-(1+Math.abs(u[0].a[0]))*Math.pow(2,-52),D=[new c([O,1],[O,0],-1,[],[],[],[])],B=[],A=0,F=u.length;A=0}}(),a.removeTriangle=function(c,g,f){var v=this.stars;o(v[c],g,f),o(v[g],f,c),o(v[f],c,g)},a.addTriangle=function(c,g,f){var v=this.stars;v[c].push(g,f),v[g].push(f,c),v[f].push(c,g)},a.opposite=function(c,g){for(var f=this.stars[g],v=1,m=f.length;v=0;--P){var Z=B[P];j=Z[0];var K=O[j],H=K[0],X=K[1],q=I[H],W=I[X];if((q[0]-W[0]||q[1]-W[1])<0){var ee=H;H=X,X=ee}K[0]=H;var ae=K[1]=Z[1],he;for(F&&(he=K[2]);P>0&&B[P-1][0]===j;){var Z=B[--P],xe=Z[1];F?O.push([ae,xe,he]):O.push([ae,xe]),ae=xe}F?O.push([ae,X,he]):O.push([ae,X])}return U}function _(I,O,D){for(var B=O.length,F=new n(B),P=[],j=0;jO[2]?1:0)}function u(I,O,D){if(I.length!==0){if(O)for(var B=0;B0||j.length>0}function z(I,O,D){var B;if(D){B=O;for(var F=new Array(O.length),P=0;PC+1)throw new Error(S+" map requires nshades to be at least size "+T.length);Array.isArray(g.alpha)?g.alpha.length!==2?_=[1,1]:_=g.alpha.slice():typeof g.alpha=="number"?_=[g.alpha,g.alpha]:_=[1,1],f=T.map(function(z){return Math.round(z.index*C)}),_[0]=Math.min(Math.max(_[0],0),1),_[1]=Math.min(Math.max(_[1],0),1);var h=T.map(function(z,I){var O=T[I].index,D=T[I].rgb.slice();return D.length===4&&D[3]>=0&&D[3]<=1||(D[3]=_[0]+(_[1]-_[0])*O),D}),u=[];for(w=0;w=0}function g(f,v,m,i){var T=n(v,m,i);if(T===0){var S=r(n(f,v,m)),M=r(n(f,v,i));if(S===M){if(S===0){var C=c(f,v,m),_=c(f,v,i);return C===_?0:C?1:-1}return 0}else{if(M===0)return S>0||c(f,v,i)?-1:1;if(S===0)return M>0||c(f,v,m)?1:-1}return r(M-S)}var w=n(f,v,m);if(w>0)return T>0&&n(f,v,i)>0?1:-1;if(w<0)return T>0||n(f,v,i)>0?1:-1;var h=n(f,v,i);return h>0||c(f,v,m)?1:-1}},8572(l){"use strict";l.exports=function(t){return t<0?-1:t>0?1:0}},8507(l){l.exports=n;var e=Math.min;function t(r,a){return r-a}function n(r,a){var o=r.length,s=r.length-a.length;if(s)return s;switch(o){case 0:return 0;case 1:return r[0]-a[0];case 2:return r[0]+r[1]-a[0]-a[1]||e(r[0],r[1])-e(a[0],a[1]);case 3:var c=r[0]+r[1],g=a[0]+a[1];if(s=c+r[2]-(g+a[2]),s)return s;var f=e(r[0],r[1]),v=e(a[0],a[1]);return e(f,r[2])-e(v,a[2])||e(f+r[2],c)-e(v+a[2],g);case 4:var m=r[0],i=r[1],T=r[2],S=r[3],M=a[0],C=a[1],_=a[2],w=a[3];return m+i+T+S-(M+C+_+w)||e(m,i,T,S)-e(M,C,_,w,M)||e(m+i,m+T,m+S,i+T,i+S,T+S)-e(M+C,M+_,M+w,C+_,C+w,_+w)||e(m+i+T,m+i+S,m+T+S,i+T+S)-e(M+C+_,M+C+w,M+_+w,C+_+w);default:for(var h=r.slice().sort(t),u=a.slice().sort(t),A=0;At[r][0]&&(r=a);return nr?[[r],[n]]:[[n]]}},4750(l,e,t){"use strict";l.exports=r;var n=t(3090);function r(a){var o=n(a),s=o.length;if(s<=2)return[];for(var c=new Array(s),g=o[s-1],f=0;f=g[M]&&(S+=1);i[T]=S}}return c}function s(c,g){try{return n(c,!0)}catch{var f=r(c);if(f.length<=g)return[];var v=a(c,f),m=n(v,!0);return o(m,f)}}},4769(l){"use strict";function e(n,r,a,o,s,c){var g=6*s*s-6*s,f=3*s*s-4*s+1,v=-6*s*s+6*s,m=3*s*s-2*s;if(n.length){c||(c=new Array(n.length));for(var i=n.length-1;i>=0;--i)c[i]=g*n[i]+f*r[i]+v*a[i]+m*o[i];return c}return g*n+f*r+v*a[i]+m*o}function t(n,r,a,o,s,c){var g=s-1,f=s*s,v=g*g,m=(1+2*s)*v,i=s*v,T=f*(3-2*s),S=f*g;if(n.length){c||(c=new Array(n.length));for(var M=n.length-1;M>=0;--M)c[M]=m*n[M]+i*r[M]+T*a[M]+S*o[M];return c}return m*n+i*r+T*a+S*o}l.exports=t,l.exports.derivative=e},7642(l,e,t){"use strict";var n=t(8954),r=t(1682);l.exports=c;function a(g,f){this.point=g,this.index=f}function o(g,f){for(var v=g.point,m=f.point,i=v.length,T=0;T=2)return!1;D[F]=P}return!0}):O=O.filter(function(D){for(var B=0;B<=m;++B){var F=A[D[B]];if(F<0)return!1;D[B]=F}return!0}),m&1)for(var S=0;S>>31},l.exports.exponent=function(T){var S=l.exports.hi(T);return(S<<1>>>21)-1023},l.exports.fraction=function(T){var S=l.exports.lo(T),M=l.exports.hi(T),C=M&(1<<20)-1;return M&2146435072&&(C+=1048576),[S,C]},l.exports.denormalized=function(T){var S=l.exports.hi(T);return!(S&2146435072)}},1338(l){"use strict";function e(r,a,o){var s=r[o]|0;if(s<=0)return[];var c=new Array(s),g;if(o===r.length-1)for(g=0;g"u"&&(a=0),typeof r){case"number":if(r>0)return t(r|0,a);break;case"object":if(typeof r.length=="number")return e(r,a,0);break}return[]}l.exports=n},3134(l,e,t){"use strict";l.exports=r;var n=t(1682);function r(a,o){var s=a.length;if(typeof o!="number"){o=0;for(var c=0;c=m-1)for(var w=S.length-1,u=f-v[m-1],h=0;h=m-1)for(var _=S.length-1,w=f-v[m-1],h=0;h=0;--m)if(f[--v])return!1;return!0},s.jump=function(f){var v=this.lastT(),m=this.dimension;if(!(f0;--h)i.push(a(C[h-1],_[h-1],arguments[h])),T.push(0)}},s.push=function(f){var v=this.lastT(),m=this.dimension;if(!(f1e-6?1/M:0;this._time.push(f);for(var u=m;u>0;--u){var A=a(_[u-1],w[u-1],arguments[u]);i.push(A),T.push((A-i[S++])*h)}}},s.set=function(f){var v=this.dimension;if(!(f0;--C)m.push(a(S[C-1],M[C-1],arguments[C])),i.push(0)}},s.move=function(f){var v=this.lastT(),m=this.dimension;if(!(f<=v||arguments.length!==m+1)){var i=this._state,T=this._velocity,S=i.length-this.dimension,M=this.bounds,C=M[0],_=M[1],w=f-v,h=w>1e-6?1/w:0;this._time.push(f);for(var u=m;u>0;--u){var A=arguments[u];i.push(a(C[u-1],_[u-1],i[S++]+A)),T.push(A*h)}}},s.idle=function(f){var v=this.lastT();if(!(f=0;--h)i.push(a(C[h],_[h],i[S]+w*T[S])),T.push(0),S+=1}};function c(f){for(var v=new Array(f),m=0;m=0;--I){var u=A[I];x[I]<=0?A[I]=new n(u._color,u.key,u.value,A[I+1],u.right,u._count+1):A[I]=new n(u._color,u.key,u.value,u.left,A[I+1],u._count+1)}for(var I=A.length-1;I>1;--I){var O=A[I-1],u=A[I];if(O._color===t||u._color===t)break;var D=A[I-2];if(D.left===O)if(O.left===u){var B=D.right;if(B&&B._color===e)O._color=t,D.right=a(t,B),D._color=e,I-=1;else{if(D._color=e,D.left=O.right,O._color=t,O.right=D,A[I-2]=O,A[I-1]=u,o(D),o(O),I>=3){var F=A[I-3];F.left===D?F.left=O:F.right=O}break}}else{var B=D.right;if(B&&B._color===e)O._color=t,D.right=a(t,B),D._color=e,I-=1;else{if(O.right=u.left,D._color=e,D.left=u.right,u._color=t,u.left=O,u.right=D,A[I-2]=u,A[I-1]=O,o(D),o(O),o(u),I>=3){var F=A[I-3];F.left===D?F.left=u:F.right=u}break}}else if(O.right===u){var B=D.left;if(B&&B._color===e)O._color=t,D.left=a(t,B),D._color=e,I-=1;else{if(D._color=e,D.right=O.left,O._color=t,O.left=D,A[I-2]=O,A[I-1]=u,o(D),o(O),I>=3){var F=A[I-3];F.right===D?F.right=O:F.left=O}break}}else{var B=D.left;if(B&&B._color===e)O._color=t,D.left=a(t,B),D._color=e,I-=1;else{if(O.left=u.right,D._color=e,D.right=u.left,u._color=t,u.right=O,u.left=D,A[I-2]=u,A[I-1]=O,o(D),o(O),o(u),I>=3){var F=A[I-3];F.right===D?F.right=u:F.left=u}break}}}return A[0]._color=t,new s(h,A[0])};function g(_,w){if(w.left){var h=g(_,w.left);if(h)return h}var h=_(w.key,w.value);if(h)return h;if(w.right)return g(_,w.right)}function f(_,w,h,u){var A=w(_,u.key);if(A<=0){if(u.left){var x=f(_,w,h,u.left);if(x)return x}var x=h(u.key,u.value);if(x)return x}if(u.right)return f(_,w,h,u.right)}function v(_,w,h,u,A){var x=h(_,A.key),z=h(w,A.key),I;if(x<=0&&(A.left&&(I=v(_,w,h,u,A.left),I)||z>0&&(I=u(A.key,A.value),I)))return I;if(z>0&&A.right)return v(_,w,h,u,A.right)}c.forEach=function(w,h,u){if(this.root)switch(arguments.length){case 1:return g(w,this.root);case 2:return f(h,this._compare,w,this.root);case 3:return this._compare(h,u)>=0?void 0:v(h,u,this._compare,w,this.root)}},Object.defineProperty(c,"begin",{get:function(){for(var _=[],w=this.root;w;)_.push(w),w=w.left;return new m(this,_)}}),Object.defineProperty(c,"end",{get:function(){for(var _=[],w=this.root;w;)_.push(w),w=w.right;return new m(this,_)}}),c.at=function(_){if(_<0)return new m(this,[]);for(var w=this.root,h=[];;){if(h.push(w),w.left){if(_=w.right._count)break;w=w.right}else break}return new m(this,[])},c.ge=function(_){for(var w=this._compare,h=this.root,u=[],A=0;h;){var x=w(_,h.key);u.push(h),x<=0&&(A=u.length),x<=0?h=h.left:h=h.right}return u.length=A,new m(this,u)},c.gt=function(_){for(var w=this._compare,h=this.root,u=[],A=0;h;){var x=w(_,h.key);u.push(h),x<0&&(A=u.length),x<0?h=h.left:h=h.right}return u.length=A,new m(this,u)},c.lt=function(_){for(var w=this._compare,h=this.root,u=[],A=0;h;){var x=w(_,h.key);u.push(h),x>0&&(A=u.length),x<=0?h=h.left:h=h.right}return u.length=A,new m(this,u)},c.le=function(_){for(var w=this._compare,h=this.root,u=[],A=0;h;){var x=w(_,h.key);u.push(h),x>=0&&(A=u.length),x<0?h=h.left:h=h.right}return u.length=A,new m(this,u)},c.find=function(_){for(var w=this._compare,h=this.root,u=[];h;){var A=w(_,h.key);if(u.push(h),A===0)return new m(this,u);A<=0?h=h.left:h=h.right}return new m(this,[])},c.remove=function(_){var w=this.find(_);return w?w.remove():this},c.get=function(_){for(var w=this._compare,h=this.root;h;){var u=w(_,h.key);if(u===0)return h.value;u<=0?h=h.left:h=h.right}};function m(_,w){this.tree=_,this._stack=w}var i=m.prototype;Object.defineProperty(i,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(i,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),i.clone=function(){return new m(this.tree,this._stack.slice())};function T(_,w){_.key=w.key,_.value=w.value,_.left=w.left,_.right=w.right,_._color=w._color,_._count=w._count}function S(_){for(var w,h,u,A,x=_.length-1;x>=0;--x){if(w=_[x],x===0){w._color=t;return}if(h=_[x-1],h.left===w){if(u=h.right,u.right&&u.right._color===e){if(u=h.right=r(u),A=u.right=r(u.right),h.right=u.left,u.left=h,u.right=A,u._color=h._color,w._color=t,h._color=t,A._color=t,o(h),o(u),x>1){var z=_[x-2];z.left===h?z.left=u:z.right=u}_[x-1]=u;return}else if(u.left&&u.left._color===e){if(u=h.right=r(u),A=u.left=r(u.left),h.right=A.left,u.left=A.right,A.left=h,A.right=u,A._color=h._color,h._color=t,u._color=t,w._color=t,o(h),o(u),o(A),x>1){var z=_[x-2];z.left===h?z.left=A:z.right=A}_[x-1]=A;return}if(u._color===t)if(h._color===e){h._color=t,h.right=a(e,u);return}else{h.right=a(e,u);continue}else{if(u=r(u),h.right=u.left,u.left=h,u._color=h._color,h._color=e,o(h),o(u),x>1){var z=_[x-2];z.left===h?z.left=u:z.right=u}_[x-1]=u,_[x]=h,x+1<_.length?_[x+1]=w:_.push(w),x=x+2}}else{if(u=h.left,u.left&&u.left._color===e){if(u=h.left=r(u),A=u.left=r(u.left),h.left=u.right,u.right=h,u.left=A,u._color=h._color,w._color=t,h._color=t,A._color=t,o(h),o(u),x>1){var z=_[x-2];z.right===h?z.right=u:z.left=u}_[x-1]=u;return}else if(u.right&&u.right._color===e){if(u=h.left=r(u),A=u.right=r(u.right),h.left=A.right,u.right=A.left,A.right=h,A.left=u,A._color=h._color,h._color=t,u._color=t,w._color=t,o(h),o(u),o(A),x>1){var z=_[x-2];z.right===h?z.right=A:z.left=A}_[x-1]=A;return}if(u._color===t)if(h._color===e){h._color=t,h.left=a(e,u);return}else{h.left=a(e,u);continue}else{if(u=r(u),h.left=u.right,u.right=h,u._color=h._color,h._color=e,o(h),o(u),x>1){var z=_[x-2];z.right===h?z.right=u:z.left=u}_[x-1]=u,_[x]=h,x+1<_.length?_[x+1]=w:_.push(w),x=x+2}}}}i.remove=function(){var _=this._stack;if(_.length===0)return this.tree;var w=new Array(_.length),h=_[_.length-1];w[w.length-1]=new n(h._color,h.key,h.value,h.left,h.right,h._count);for(var u=_.length-2;u>=0;--u){var h=_[u];h.left===_[u+1]?w[u]=new n(h._color,h.key,h.value,w[u+1],h.right,h._count):w[u]=new n(h._color,h.key,h.value,h.left,w[u+1],h._count)}if(h=w[w.length-1],h.left&&h.right){var A=w.length;for(h=h.left;h.right;)w.push(h),h=h.right;var x=w[A-1];w.push(new n(h._color,x.key,x.value,h.left,h.right,h._count)),w[A-1].key=h.key,w[A-1].value=h.value;for(var u=w.length-2;u>=A;--u)h=w[u],w[u]=new n(h._color,h.key,h.value,h.left,w[u+1],h._count);w[A-1].left=w[A]}if(h=w[w.length-1],h._color===e){var z=w[w.length-2];z.left===h?z.left=null:z.right===h&&(z.right=null),w.pop();for(var u=0;u0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(i,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(i,"index",{get:function(){var _=0,w=this._stack;if(w.length===0){var h=this.tree.root;return h?h._count:0}else w[w.length-1].left&&(_=w[w.length-1].left._count);for(var u=w.length-2;u>=0;--u)w[u+1]===w[u].right&&(++_,w[u].left&&(_+=w[u].left._count));return _},enumerable:!0}),i.next=function(){var _=this._stack;if(_.length!==0){var w=_[_.length-1];if(w.right)for(w=w.right;w;)_.push(w),w=w.left;else for(_.pop();_.length>0&&_[_.length-1].right===w;)w=_[_.length-1],_.pop()}},Object.defineProperty(i,"hasNext",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].right)return!0;for(var w=_.length-1;w>0;--w)if(_[w-1].left===_[w])return!0;return!1}}),i.update=function(_){var w=this._stack;if(w.length===0)throw new Error("Can't update empty node!");var h=new Array(w.length),u=w[w.length-1];h[h.length-1]=new n(u._color,u.key,_,u.left,u.right,u._count);for(var A=w.length-2;A>=0;--A)u=w[A],u.left===w[A+1]?h[A]=new n(u._color,u.key,u.value,h[A+1],u.right,u._count):h[A]=new n(u._color,u.key,u.value,u.left,h[A+1],u._count);return new s(this.tree._compare,h[0])},i.prev=function(){var _=this._stack;if(_.length!==0){var w=_[_.length-1];if(w.left)for(w=w.left;w;)_.push(w),w=w.right;else for(_.pop();_.length>0&&_[_.length-1].left===w;)w=_[_.length-1],_.pop()}},Object.defineProperty(i,"hasPrev",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].left)return!0;for(var w=_.length-1;w>0;--w)if(_[w-1].right===_[w])return!0;return!1}});function M(_,w){return _w?1:0}function C(_){return new s(_||M,null)}},3837(l,e,t){"use strict";l.exports=I;var n=t(4935),r=t(501),a=t(5304),o=t(6429),s=t(6444),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),g=ArrayBuffer,f=DataView;function v(O){return g.isView(O)&&!(O instanceof f)}function m(O){return Array.isArray(O)||v(O)}function i(O,D){return O[0]=D[0],O[1]=D[1],O[2]=D[2],O}function T(O){this.gl=O,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(O)}var S=T.prototype;S.update=function(O){O=O||{};function D(H,X,q){if(q in O){var W=O[q],ee=this[q],ae;(H?m(W)&&m(W[0]):m(W))?this[q]=ae=[X(W[0]),X(W[1]),X(W[2])]:this[q]=ae=[X(W),X(W),X(W)];for(var he=0;he<3;++he)if(ae[he]!==ee[he])return!0}return!1}var B=D.bind(this,!1,Number),F=D.bind(this,!1,Boolean),P=D.bind(this,!1,String),j=D.bind(this,!0,function(H){if(m(H)){if(H.length===3)return[+H[0],+H[1],+H[2],1];if(H.length===4)return[+H[0],+H[1],+H[2],+H[3]]}return[0,0,0,1]}),U,$=!1,Q=!1;if("bounds"in O)for(var re=O.bounds,ne=0;ne<2;++ne)for(var se=0;se<3;++se)re[ne][se]!==this.bounds[ne][se]&&(Q=!0),this.bounds[ne][se]=re[ne][se];if("ticks"in O){U=O.ticks,$=!0,this.autoTicks=!1;for(var ne=0;ne<3;++ne)this.tickSpacing[ne]=0}else B("tickSpacing")&&(this.autoTicks=!0,Q=!0);if(this._firstInit&&("ticks"in O||"tickSpacing"in O||(this.autoTicks=!0),Q=!0,$=!0,this._firstInit=!1),Q&&this.autoTicks&&(U=s.create(this.bounds,this.tickSpacing),$=!0),$){for(var ne=0;ne<3;++ne)U[ne].sort(function(X,q){return X.x-q.x});s.equal(U,this.ticks)?$=!1:this.ticks=U}F("tickEnable"),P("tickFont")&&($=!0),P("tickFontStyle")&&($=!0),P("tickFontWeight")&&($=!0),P("tickFontVariant")&&($=!0),B("tickSize"),B("tickAngle"),B("tickPad"),j("tickColor");var V=P("labels");P("labelFont")&&(V=!0),P("labelFontStyle")&&(V=!0),P("labelFontWeight")&&(V=!0),P("labelFontVariant")&&(V=!0),F("labelEnable"),B("labelSize"),B("labelPad"),j("labelColor"),F("lineEnable"),F("lineMirror"),B("lineWidth"),j("lineColor"),F("lineTickEnable"),F("lineTickMirror"),B("lineTickLength"),B("lineTickWidth"),j("lineTickColor"),F("gridEnable"),B("gridWidth"),j("gridColor"),F("zeroEnable"),j("zeroLineColor"),B("zeroLineWidth"),F("backgroundEnable"),j("backgroundColor");var Z=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],K=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(V||$)&&this._text.update(this.bounds,this.labels,Z,this.ticks,K):this._text=n(this.gl,this.bounds,this.labels,Z,this.ticks,K),this._lines&&$&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=r(this.gl,this.bounds,this.ticks))};function M(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var C=[new M,new M,new M];function _(O,D,B,F,P){for(var j=O.primalOffset,U=O.primalMinor,$=O.mirrorOffset,Q=O.mirrorMinor,re=F[D],ne=0;ne<3;++ne)if(D!==ne){var se=j,V=$,Z=U,K=Q;re&1<0?(Z[ne]=-1,K[ne]=0):(Z[ne]=0,K[ne]=1)}}var w=[0,0,0],h={model:c,view:c,projection:c,_ortho:!1};S.isOpaque=function(){return!0},S.isTransparent=function(){return!1},S.drawTransparent=function(O){};var u=0,A=[0,0,0],x=[0,0,0],z=[0,0,0];S.draw=function(O){O=O||h;for(var q=this.gl,D=O.model||c,B=O.view||c,F=O.projection||c,P=this.bounds,j=O._ortho||!1,U=o(D,B,F,P,j),$=U.cubeEdges,Q=U.axis,re=B[12],ne=B[13],se=B[14],V=B[15],Z=j?2:1,K=Z*this.pixelRatio*(F[3]*re+F[7]*ne+F[11]*se+F[15]*V)/q.drawingBufferHeight,H=0;H<3;++H)this.lastCubeProps.cubeEdges[H]=$[H],this.lastCubeProps.axis[H]=Q[H];for(var X=C,H=0;H<3;++H)_(C[H],H,this.bounds,$,Q);for(var q=this.gl,W=w,H=0;H<3;++H)this.backgroundEnable[H]?W[H]=Q[H]:W[H]=0;this._background.draw(D,B,F,P,W,this.backgroundColor),this._lines.bind(D,B,F,this);for(var H=0;H<3;++H){var ee=[0,0,0];Q[H]>0?ee[H]=P[1][H]:ee[H]=P[0][H];for(var ae=0;ae<2;++ae){var he=(H+1+ae)%3,xe=(H+1+(ae^1))%3;this.gridEnable[he]&&this._lines.drawGrid(he,xe,this.bounds,ee,this.gridColor[he],this.gridWidth[he]*this.pixelRatio)}for(var ae=0;ae<2;++ae){var he=(H+1+ae)%3,xe=(H+1+(ae^1))%3;this.zeroEnable[xe]&&Math.min(P[0][xe],P[1][xe])<=0&&Math.max(P[0][xe],P[1][xe])>=0&&this._lines.drawZero(he,xe,this.bounds,ee,this.zeroLineColor[xe],this.zeroLineWidth[xe]*this.pixelRatio)}}for(var H=0;H<3;++H){this.lineEnable[H]&&this._lines.drawAxisLine(H,this.bounds,X[H].primalOffset,this.lineColor[H],this.lineWidth[H]*this.pixelRatio),this.lineMirror[H]&&this._lines.drawAxisLine(H,this.bounds,X[H].mirrorOffset,this.lineColor[H],this.lineWidth[H]*this.pixelRatio);for(var we=i(A,X[H].primalMinor),Me=i(x,X[H].mirrorMinor),Se=this.lineTickLength,ae=0;ae<3;++ae){var Ie=K/D[5*ae];we[ae]*=Se[ae]*Ie,Me[ae]*=Se[ae]*Ie}this.lineTickEnable[H]&&this._lines.drawAxisTicks(H,X[H].primalOffset,we,this.lineTickColor[H],this.lineTickWidth[H]*this.pixelRatio),this.lineTickMirror[H]&&this._lines.drawAxisTicks(H,X[H].mirrorOffset,Me,this.lineTickColor[H],this.lineTickWidth[H]*this.pixelRatio)}this._lines.unbind(),this._text.bind(D,B,F,this.pixelRatio);var Ge,qe=.5,ke,_e;function ue(Ye){_e=[0,0,0],_e[Ye]=1}function ve(Ye,yt,gt){var Tt=(Ye+1)%3,At=(Ye+2)%3,$t=yt[Tt],rr=yt[At],_r=gt[Tt],Xt=gt[At];if($t>0&&Xt>0){ue(Tt);return}else if($t>0&&Xt<0){ue(Tt);return}else if($t<0&&Xt>0){ue(Tt);return}else if($t<0&&Xt<0){ue(Tt);return}else if(rr>0&&_r>0){ue(At);return}else if(rr>0&&_r<0){ue(At);return}else if(rr<0&&_r>0){ue(At);return}else if(rr<0&&_r<0){ue(At);return}}for(var H=0;H<3;++H){for(var le=X[H].primalMinor,Ae=X[H].mirrorMinor,Be=i(z,X[H].primalOffset),ae=0;ae<3;++ae)this.lineTickEnable[H]&&(Be[ae]+=K*le[ae]*Math.max(this.lineTickLength[ae],0)/D[5*ae]);var Xe=[0,0,0];if(Xe[H]=1,this.tickEnable[H]){this.tickAngle[H]===-3600?(this.tickAngle[H]=0,this.tickAlign[H]="auto"):this.tickAlign[H]=-1,ke=1,Ge=[this.tickAlign[H],qe,ke],Ge[0]==="auto"?Ge[0]=u:Ge[0]=parseInt(""+Ge[0]),_e=[0,0,0],ve(H,le,Ae);for(var ae=0;ae<3;++ae)Be[ae]+=K*le[ae]*this.tickPad[ae]/D[5*ae];this._text.drawTicks(H,this.tickSize[H],this.tickAngle[H],Be,this.tickColor[H],Xe,_e,Ge)}if(this.labelEnable[H]){ke=0,_e=[0,0,0],this.labels[H].length>4&&(ue(H),ke=1),Ge=[this.labelAlign[H],qe,ke],Ge[0]==="auto"?Ge[0]=u:Ge[0]=parseInt(""+Ge[0]);for(var ae=0;ae<3;++ae)Be[ae]+=K*le[ae]*this.labelPad[ae]/D[5*ae];Be[H]+=.5*(P[0][H]+P[1][H]),this._text.drawLabel(H,this.labelSize[H],this.labelAngle[H],Be,this.labelColor[H],[0,0,0],_e,Ge)}}this._text.unbind()},S.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function I(O,D){var B=new T(O);return B.update(D),B}},5304(l,e,t){"use strict";l.exports=c;var n=t(2762),r=t(8116),a=t(1879).bg;function o(g,f,v,m){this.gl=g,this.buffer=f,this.vao=v,this.shader=m}var s=o.prototype;s.draw=function(g,f,v,m,i,T){for(var S=!1,M=0;M<3;++M)S=S||i[M];if(S){var C=this.gl;C.enable(C.POLYGON_OFFSET_FILL),C.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:g,view:f,projection:v,bounds:m,enable:i,colors:T},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),C.disable(C.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function c(g){for(var f=[],v=[],m=0,i=0;i<3;++i)for(var T=(i+1)%3,S=(i+2)%3,M=[0,0,0],C=[0,0,0],_=-1;_<=1;_+=2){v.push(m,m+2,m+1,m+1,m+2,m+3),M[i]=_,C[i]=_;for(var w=-1;w<=1;w+=2){M[T]=w;for(var h=-1;h<=1;h+=2)M[S]=h,f.push(M[0],M[1],M[2],C[0],C[1],C[2]),m+=1}var u=T;T=S,S=u}var A=n(g,new Float32Array(f)),x=n(g,new Uint16Array(v),g.ELEMENT_ARRAY_BUFFER),z=r(g,[{buffer:A,type:g.FLOAT,size:3,offset:0,stride:24},{buffer:A,type:g.FLOAT,size:3,offset:12,stride:24}],x),I=a(g);return I.attributes.position.location=0,I.attributes.normal.location=1,new o(g,A,z,I)}},6429(l,e,t){"use strict";l.exports=_;var n=t(8828),r=t(6760),a=t(5202),o=t(3250),s=new Array(16),c=new Array(8),g=new Array(8),f=new Array(3),v=[0,0,0];(function(){for(var w=0;w<8;++w)c[w]=[1,1,1,1],g[w]=[1,1,1]})();function m(w,h,u){for(var A=0;A<4;++A){w[A]=u[12+A];for(var x=0;x<3;++x)w[A]+=h[x]*u[4*x+A]}}var i=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function T(w){for(var h=0;hQ&&(B|=1<Q){B|=1<g[I][1])&&(X=I);for(var q=-1,I=0;I<3;++I){var W=X^1<g[ee][0]&&(ee=W)}}var ae=S;ae[0]=ae[1]=ae[2]=0,ae[n.log2(q^X)]=X&q,ae[n.log2(X^ee)]=Xⅇvar he=ee^7;he===B||he===H?(he=q^7,ae[n.log2(ee^he)]=he&ee):ae[n.log2(q^he)]=he&q;for(var xe=M,we=B,j=0;j<3;++j)we&1<=0;--ae){var he=H[ee[ae]];f.push(K*he[0],-K*he[1],j)}}for(var A=[0,0,0],x=[0,0,0],z=[0,0,0],I=[0,0,0],O=1.25,D={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},B=0;B<3;++B){z[B]=f.length/m|0,u(.5*(S[0][B]+S[1][B]),M[B],C[B],12,O,D),I[B]=(f.length/m|0)-z[B],A[B]=f.length/m|0;for(var F=0;F<_[B].length;++F)if(_[B][F].text){var P={family:_[B][F].font||T[B].family,style:T[B].fontStyle||T[B].style,weight:T[B].fontWeight||T[B].weight,variant:T[B].fontVariant||T[B].variant};u(_[B][F].x,_[B][F].text,P,_[B][F].fontSize||12,O,D)}x[B]=(f.length/m|0)-A[B]}this.buffer.update(f),this.tickOffset=A,this.tickCount=x,this.labelOffset=z,this.labelCount=I},v.drawTicks=function(S,M,C,_,T,f,u,A){this.tickCount[S]&&(this.shader.uniforms.axis=f,this.shader.uniforms.color=T,this.shader.uniforms.angle=C,this.shader.uniforms.scale=M,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=A,this.vao.draw(this.gl.TRIANGLES,this.tickCount[S],this.tickOffset[S]))},v.drawLabel=function(S,M,C,_,T,f,u,A){this.labelCount[S]&&(this.shader.uniforms.axis=f,this.shader.uniforms.color=T,this.shader.uniforms.angle=C,this.shader.uniforms.scale=M,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=A,this.vao.draw(this.gl.TRIANGLES,this.labelCount[S],this.labelOffset[S]))},v.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function i(S,M){try{return a(S,M)}catch(C){return console.warn('error vectorizing text:"'+S+'" error:',C),{cells:[],positions:[]}}}function w(S,M,C,_,T,f){var u=n(S),A=r(S,[{buffer:u,size:3}]),x=o(S);x.attributes.position.location=0;var z=new h(S,x,u,A);return z.update(M,C,_,T,f),z}},6444:function(l,e){"use strict";e.create=n,e.equal=r;function t(a,o){var s=a+"",c=s.indexOf("."),m=0;c>=0&&(m=s.length-c-1);var h=Math.pow(10,m),v=Math.round(a*o*h),g=v+"";if(g.indexOf("e")>=0)return g;var i=v/h,w=v%h;v<0?(i=-Math.ceil(i)|0,w=-w|0):(i=Math.floor(i)|0,w=w|0);var S=""+i;if(v<0&&(S="-"+S),m){for(var M=""+w;M.length=a[0][c];--v)m.push({x:v*o[c],text:t(o[c],v)});s.push(m)}return s}function r(a,o){for(var s=0;s<3;++s){if(a[s].length!==o[s].length)return!1;for(var c=0;cS)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return i.bufferSubData(w,_,C),S}function h(i,w){for(var S=n.malloc(i.length,w),M=i.length,C=0;C=0;--M){if(w[M]!==S)return!1;S*=i[M]}return!0}c.update=function(i,w){if(typeof w!="number"&&(w=-1),this.bind(),typeof i=="object"&&typeof i.shape<"u"){var S=i.dtype;if(o.indexOf(S)<0&&(S="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var M=gl.getExtension("OES_element_index_uint");M&&S!=="uint16"?S="uint32":S="uint16"}if(S===i.dtype&&v(i.shape,i.stride))i.offset===0&&i.data.length===i.shape[0]?this.length=m(this.gl,this.type,this.length,this.usage,i.data,w):this.length=m(this.gl,this.type,this.length,this.usage,i.data.subarray(i.offset,i.shape[0]),w);else{var C=n.malloc(i.size,S),_=a(C,i.shape);r.assign(_,i),w<0?this.length=m(this.gl,this.type,this.length,this.usage,C,w):this.length=m(this.gl,this.type,this.length,this.usage,C.subarray(0,i.size),w),n.free(C)}}else if(Array.isArray(i)){var T;this.type===this.gl.ELEMENT_ARRAY_BUFFER?T=h(i,"uint16"):T=h(i,"float32"),w<0?this.length=m(this.gl,this.type,this.length,this.usage,T,w):this.length=m(this.gl,this.type,this.length,this.usage,T.subarray(0,i.length),w),n.free(T)}else if(typeof i=="object"&&typeof i.length=="number")this.length=m(this.gl,this.type,this.length,this.usage,i,w);else if(typeof i=="number"||i===void 0){if(w>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");i=i|0,i<=0&&(i=1),this.gl.bufferData(this.type,i|0,this.usage),this.length=i}else throw new Error("gl-buffer: Invalid data type")};function g(i,w,S,M){if(S=S||i.ARRAY_BUFFER,M=M||i.DYNAMIC_DRAW,S!==i.ARRAY_BUFFER&&S!==i.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(M!==i.DYNAMIC_DRAW&&M!==i.STATIC_DRAW&&M!==i.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var C=i.createBuffer(),_=new s(i,S,C,0,M);return _.update(w),_}l.exports=g},6405:function(l,e,t){"use strict";var n=t(2931);l.exports=function(a,o){var s=a.positions,c=a.vectors,m={positions:[],vertexIntensity:[],vertexIntensityBounds:a.vertexIntensityBounds,vectors:[],cells:[],coneOffset:a.coneOffset,colormap:a.colormap};if(a.positions.length===0)return o&&(o[0]=[0,0,0],o[1]=[0,0,0]),m;for(var h=0,v=1/0,g=-1/0,i=1/0,w=-1/0,S=1/0,M=-1/0,C=null,_=null,T=[],f=1/0,u=!1,A=a.coneSizemode==="raw",x=0;xh&&(h=n.length(I)),x&&!A){var O=2*n.distance(C,z)/(n.length(_)+n.length(I));O?(f=Math.min(f,O),u=!1):u=!0}u||(C=z,_=I),T.push(I)}var D=[v,i,S],B=[g,w,M];o&&(o[0]=D,o[1]=B),h===0&&(h=1);var F=1/h;isFinite(f)||(f=1),m.vectorScale=f;var P=a.coneSize||(A?1:.5);a.absoluteConeSize&&(P=a.absoluteConeSize*F),m.coneScale=P;for(var x=0,j=0;x=1},i.isTransparent=function(){return this.opacity<1},i.pickSlots=1,i.setPickBase=function(T){this.pickId=T};function w(T){for(var f=h({colormap:T,nshades:256,format:"rgba"}),u=new Uint8Array(256*4),A=0;A<256;++A){for(var x=f[A],z=0;z<3;++z)u[4*A+z]=x[z];u[4*A+3]=x[3]*255}return m(u,[256,256,4],[4,0,1])}function S(T){for(var f=T.length,u=new Array(f),A=0;A0){var j=this.triShader;j.bind(),j.uniforms=O,this.triangleVAO.bind(),f.drawArrays(f.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},i.drawPick=function(T){T=T||{};for(var f=this.gl,u=T.model||v,A=T.view||v,x=T.projection||v,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],I=0;I<3;++I)z[0][I]=Math.max(z[0][I],this.clipBounds[0][I]),z[1][I]=Math.min(z[1][I],this.clipBounds[1][I]);this._model=[].slice.call(u),this._view=[].slice.call(A),this._projection=[].slice.call(x),this._resolution=[f.drawingBufferWidth,f.drawingBufferHeight];var O={model:u,view:A,projection:x,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},D=this.pickShader;D.bind(),D.uniforms=O,this.triangleCount>0&&(this.triangleVAO.bind(),f.drawArrays(f.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},i.pick=function(T){if(!T||T.id!==this.pickId)return null;var f=T.value[0]+256*T.value[1]+65536*T.value[2],u=this.cells[f],A=this.positions[u[1]].slice(0,3),x={position:A,dataCoordinate:A,index:Math.floor(u[1]/48)};return this.traceType==="cone"?x.index=Math.floor(u[1]/48):this.traceType==="streamtube"&&(x.intensity=this.intensity[u[1]],x.velocity=this.vectors[u[1]].slice(0,3),x.divergence=this.vectors[u[1]][3],x.index=f),x},i.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function M(T,f){var u=n(T,f.meshShader.vertex,f.meshShader.fragment,null,f.meshShader.attributes);return u.attributes.position.location=0,u.attributes.color.location=2,u.attributes.uv.location=3,u.attributes.vector.location=4,u}function C(T,f){var u=n(T,f.pickShader.vertex,f.pickShader.fragment,null,f.pickShader.attributes);return u.attributes.position.location=0,u.attributes.id.location=1,u.attributes.vector.location=4,u}function _(T,f,u){var A=u.shaders;arguments.length===1&&(f=T,T=f.gl);var x=M(T,A),z=C(T,A),I=o(T,m(new Uint8Array([255,255,255,255]),[1,1,4]));I.generateMipmap(),I.minFilter=T.LINEAR_MIPMAP_LINEAR,I.magFilter=T.LINEAR;var O=r(T),D=r(T),B=r(T),F=r(T),P=r(T),j=a(T,[{buffer:O,type:T.FLOAT,size:4},{buffer:P,type:T.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:B,type:T.FLOAT,size:4},{buffer:F,type:T.FLOAT,size:2},{buffer:D,type:T.FLOAT,size:4}]),U=new g(T,I,x,z,O,D,P,B,F,j,u.traceType||"cone");return U.update(f),U}l.exports=_},614:function(l,e,t){var n=t(3236),r=n([`precision highp float; +}`]);e.bg=function(v){return r(v,g,f,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935(l,e,t){"use strict";l.exports=T;var n=t(2762),r=t(8116),a=t(4359),o=t(1879).Q,s=window||process.global||{},c=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};var g=3;function f(S,M,C,_){this.gl=S,this.shader=M,this.buffer=C,this.vao=_,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var v=f.prototype,m=[0,0];v.bind=function(S,M,C,_){this.vao.bind(),this.shader.bind();var w=this.shader.uniforms;w.model=S,w.view=M,w.projection=C,w.pixelScale=_,m[0]=this.gl.drawingBufferWidth,m[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=m},v.unbind=function(){this.vao.unbind()},v.update=function(S,M,C,_,w){var h=[];function u(j,U,$,Q,re,ne){var se=[$.style,$.weight,$.variant,$.family].join("_"),V=c[se];V||(V=c[se]={});var Z=V[U];Z||(Z=V[U]=i(U,{triangles:!0,font:$.family,fontStyle:$.style,fontWeight:$.weight,fontVariant:$.variant,textAlign:"center",textBaseline:"middle",lineSpacing:re,styletags:ne}));for(var K=(Q||12)/12,H=Z.positions,X=Z.cells,q=0,W=X.length;q=0;--ae){var he=H[ee[ae]];h.push(K*he[0],-K*he[1],j)}}for(var A=[0,0,0],x=[0,0,0],z=[0,0,0],I=[0,0,0],O=1.25,D={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},B=0;B<3;++B){z[B]=h.length/g|0,u(.5*(S[0][B]+S[1][B]),M[B],C[B],12,O,D),I[B]=(h.length/g|0)-z[B],A[B]=h.length/g|0;for(var F=0;F<_[B].length;++F)if(_[B][F].text){var P={family:_[B][F].font||w[B].family,style:w[B].fontStyle||w[B].style,weight:w[B].fontWeight||w[B].weight,variant:w[B].fontVariant||w[B].variant};u(_[B][F].x,_[B][F].text,P,_[B][F].fontSize||12,O,D)}x[B]=(h.length/g|0)-A[B]}this.buffer.update(h),this.tickOffset=A,this.tickCount=x,this.labelOffset=z,this.labelCount=I},v.drawTicks=function(S,M,C,_,w,h,u,A){this.tickCount[S]&&(this.shader.uniforms.axis=h,this.shader.uniforms.color=w,this.shader.uniforms.angle=C,this.shader.uniforms.scale=M,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=A,this.vao.draw(this.gl.TRIANGLES,this.tickCount[S],this.tickOffset[S]))},v.drawLabel=function(S,M,C,_,w,h,u,A){this.labelCount[S]&&(this.shader.uniforms.axis=h,this.shader.uniforms.color=w,this.shader.uniforms.angle=C,this.shader.uniforms.scale=M,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=A,this.vao.draw(this.gl.TRIANGLES,this.labelCount[S],this.labelOffset[S]))},v.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function i(S,M){try{return a(S,M)}catch(C){return console.warn('error vectorizing text:"'+S+'" error:',C),{cells:[],positions:[]}}}function T(S,M,C,_,w,h){var u=n(S),A=r(S,[{buffer:u,size:3}]),x=o(S);x.attributes.position.location=0;var z=new f(S,x,u,A);return z.update(M,C,_,w,h),z}},6444(l,e){"use strict";e.create=n,e.equal=r;function t(a,o){var s=a+"",c=s.indexOf("."),g=0;c>=0&&(g=s.length-c-1);var f=Math.pow(10,g),v=Math.round(a*o*f),m=v+"";if(m.indexOf("e")>=0)return m;var i=v/f,T=v%f;v<0?(i=-Math.ceil(i)|0,T=-T|0):(i=Math.floor(i)|0,T=T|0);var S=""+i;if(v<0&&(S="-"+S),g){for(var M=""+T;M.length=a[0][c];--v)g.push({x:v*o[c],text:t(o[c],v)});s.push(g)}return s}function r(a,o){for(var s=0;s<3;++s){if(a[s].length!==o[s].length)return!1;for(var c=0;cS)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return i.bufferSubData(T,_,C),S}function f(i,T){for(var S=n.malloc(i.length,T),M=i.length,C=0;C=0;--M){if(T[M]!==S)return!1;S*=i[M]}return!0}c.update=function(i,T){if(typeof T!="number"&&(T=-1),this.bind(),typeof i=="object"&&typeof i.shape<"u"){var S=i.dtype;if(o.indexOf(S)<0&&(S="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var M=gl.getExtension("OES_element_index_uint");M&&S!=="uint16"?S="uint32":S="uint16"}if(S===i.dtype&&v(i.shape,i.stride))i.offset===0&&i.data.length===i.shape[0]?this.length=g(this.gl,this.type,this.length,this.usage,i.data,T):this.length=g(this.gl,this.type,this.length,this.usage,i.data.subarray(i.offset,i.shape[0]),T);else{var C=n.malloc(i.size,S),_=a(C,i.shape);r.assign(_,i),T<0?this.length=g(this.gl,this.type,this.length,this.usage,C,T):this.length=g(this.gl,this.type,this.length,this.usage,C.subarray(0,i.size),T),n.free(C)}}else if(Array.isArray(i)){var w;this.type===this.gl.ELEMENT_ARRAY_BUFFER?w=f(i,"uint16"):w=f(i,"float32"),T<0?this.length=g(this.gl,this.type,this.length,this.usage,w,T):this.length=g(this.gl,this.type,this.length,this.usage,w.subarray(0,i.length),T),n.free(w)}else if(typeof i=="object"&&typeof i.length=="number")this.length=g(this.gl,this.type,this.length,this.usage,i,T);else if(typeof i=="number"||i===void 0){if(T>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");i=i|0,i<=0&&(i=1),this.gl.bufferData(this.type,i|0,this.usage),this.length=i}else throw new Error("gl-buffer: Invalid data type")};function m(i,T,S,M){if(S=S||i.ARRAY_BUFFER,M=M||i.DYNAMIC_DRAW,S!==i.ARRAY_BUFFER&&S!==i.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(M!==i.DYNAMIC_DRAW&&M!==i.STATIC_DRAW&&M!==i.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var C=i.createBuffer(),_=new s(i,S,C,0,M);return _.update(T),_}l.exports=m},6405(l,e,t){"use strict";var n=t(2931);l.exports=function(a,o){var s=a.positions,c=a.vectors,g={positions:[],vertexIntensity:[],vertexIntensityBounds:a.vertexIntensityBounds,vectors:[],cells:[],coneOffset:a.coneOffset,colormap:a.colormap};if(a.positions.length===0)return o&&(o[0]=[0,0,0],o[1]=[0,0,0]),g;for(var f=0,v=1/0,m=-1/0,i=1/0,T=-1/0,S=1/0,M=-1/0,C=null,_=null,w=[],h=1/0,u=!1,A=a.coneSizemode==="raw",x=0;xf&&(f=n.length(I)),x&&!A){var O=2*n.distance(C,z)/(n.length(_)+n.length(I));O?(h=Math.min(h,O),u=!1):u=!0}u||(C=z,_=I),w.push(I)}var D=[v,i,S],B=[m,T,M];o&&(o[0]=D,o[1]=B),f===0&&(f=1);var F=1/f;isFinite(h)||(h=1),g.vectorScale=h;var P=a.coneSize||(A?1:.5);a.absoluteConeSize&&(P=a.absoluteConeSize*F),g.coneScale=P;for(var x=0,j=0;x=1},i.isTransparent=function(){return this.opacity<1},i.pickSlots=1,i.setPickBase=function(w){this.pickId=w};function T(w){for(var h=f({colormap:w,nshades:256,format:"rgba"}),u=new Uint8Array(256*4),A=0;A<256;++A){for(var x=h[A],z=0;z<3;++z)u[4*A+z]=x[z];u[4*A+3]=x[3]*255}return g(u,[256,256,4],[4,0,1])}function S(w){for(var h=w.length,u=new Array(h),A=0;A0){var j=this.triShader;j.bind(),j.uniforms=O,this.triangleVAO.bind(),h.drawArrays(h.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},i.drawPick=function(w){w=w||{};for(var h=this.gl,u=w.model||v,A=w.view||v,x=w.projection||v,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],I=0;I<3;++I)z[0][I]=Math.max(z[0][I],this.clipBounds[0][I]),z[1][I]=Math.min(z[1][I],this.clipBounds[1][I]);this._model=[].slice.call(u),this._view=[].slice.call(A),this._projection=[].slice.call(x),this._resolution=[h.drawingBufferWidth,h.drawingBufferHeight];var O={model:u,view:A,projection:x,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},D=this.pickShader;D.bind(),D.uniforms=O,this.triangleCount>0&&(this.triangleVAO.bind(),h.drawArrays(h.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},i.pick=function(w){if(!w||w.id!==this.pickId)return null;var h=w.value[0]+256*w.value[1]+65536*w.value[2],u=this.cells[h],A=this.positions[u[1]].slice(0,3),x={position:A,dataCoordinate:A,index:Math.floor(u[1]/48)};return this.traceType==="cone"?x.index=Math.floor(u[1]/48):this.traceType==="streamtube"&&(x.intensity=this.intensity[u[1]],x.velocity=this.vectors[u[1]].slice(0,3),x.divergence=this.vectors[u[1]][3],x.index=h),x},i.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function M(w,h){var u=n(w,h.meshShader.vertex,h.meshShader.fragment,null,h.meshShader.attributes);return u.attributes.position.location=0,u.attributes.color.location=2,u.attributes.uv.location=3,u.attributes.vector.location=4,u}function C(w,h){var u=n(w,h.pickShader.vertex,h.pickShader.fragment,null,h.pickShader.attributes);return u.attributes.position.location=0,u.attributes.id.location=1,u.attributes.vector.location=4,u}function _(w,h,u){var A=u.shaders;arguments.length===1&&(h=w,w=h.gl);var x=M(w,A),z=C(w,A),I=o(w,g(new Uint8Array([255,255,255,255]),[1,1,4]));I.generateMipmap(),I.minFilter=w.LINEAR_MIPMAP_LINEAR,I.magFilter=w.LINEAR;var O=r(w),D=r(w),B=r(w),F=r(w),P=r(w),j=a(w,[{buffer:O,type:w.FLOAT,size:4},{buffer:P,type:w.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:B,type:w.FLOAT,size:4},{buffer:F,type:w.FLOAT,size:2},{buffer:D,type:w.FLOAT,size:4}]),U=new m(w,I,x,z,O,D,P,B,F,j,u.traceType||"cone");return U.update(h),U}l.exports=_},614(l,e,t){var n=t(3236),r=n([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -642,7 +642,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]);e.meshShader={vertex:r,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(l){l.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(l,e,t){var n=t(737);l.exports=function(a){return n[a]}},9165:function(l,e,t){"use strict";l.exports=g;var n=t(2762),r=t(8116),a=t(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(i,w,S,M){this.gl=i,this.shader=M,this.buffer=w,this.vao=S,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var c=s.prototype;c.isOpaque=function(){return!this.hasAlpha},c.isTransparent=function(){return this.hasAlpha},c.drawTransparent=c.draw=function(i){var w=this.gl,S=this.shader.uniforms;this.shader.bind();var M=S.view=i.view||o,C=S.projection=i.projection||o;S.model=i.model||o,S.clipBounds=this.clipBounds,S.opacity=this.opacity;var _=M[12],T=M[13],f=M[14],u=M[15],A=i._ortho||!1,x=A?2:1,z=x*this.pixelRatio*(C[3]*_+C[7]*T+C[11]*f+C[15]*u)/w.drawingBufferHeight;this.vao.bind();for(var I=0;I<3;++I)w.lineWidth(this.lineWidth[I]*this.pixelRatio),S.capSize=this.capSize[I]*z,this.lineCount[I]&&w.drawArrays(w.LINES,this.lineOffset[I],this.lineCount[I]);this.vao.unbind()};function m(i,w){for(var S=0;S<3;++S)i[0][S]=Math.min(i[0][S],w[S]),i[1][S]=Math.max(i[1][S],w[S])}var h=function(){for(var i=new Array(3),w=0;w<3;++w){for(var S=[],M=1;M<=2;++M)for(var C=-1;C<=1;C+=2){var _=(M+w)%3,T=[0,0,0];T[_]=C,S.push(T)}i[w]=S}return i}();function v(i,w,S,M){for(var C=h[M],_=0;_0){var O=A.slice();O[f]+=z[1][f],C.push(A[0],A[1],A[2],I[0],I[1],I[2],I[3],0,0,0,O[0],O[1],O[2],I[0],I[1],I[2],I[3],0,0,0),m(this.bounds,O),T+=2+v(C,O,I,f)}}}this.lineCount[f]=T-this.lineOffset[f]}this.buffer.update(C)}},c.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function g(i){var w=i.gl,S=n(w),M=r(w,[{buffer:S,type:w.FLOAT,size:3,offset:0,stride:40},{buffer:S,type:w.FLOAT,size:4,offset:12,stride:40},{buffer:S,type:w.FLOAT,size:3,offset:28,stride:40}]),C=a(w);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.offset.location=2;var _=new s(w,S,M,C);return _.update(i),_}},3436:function(l,e,t){"use strict";var n=t(3236),r=t(9405),a=n([`precision highp float; +}`]);e.meshShader={vertex:r,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737(l){l.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171(l,e,t){var n=t(737);l.exports=function(a){return n[a]}},9165(l,e,t){"use strict";l.exports=m;var n=t(2762),r=t(8116),a=t(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(i,T,S,M){this.gl=i,this.shader=M,this.buffer=T,this.vao=S,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var c=s.prototype;c.isOpaque=function(){return!this.hasAlpha},c.isTransparent=function(){return this.hasAlpha},c.drawTransparent=c.draw=function(i){var T=this.gl,S=this.shader.uniforms;this.shader.bind();var M=S.view=i.view||o,C=S.projection=i.projection||o;S.model=i.model||o,S.clipBounds=this.clipBounds,S.opacity=this.opacity;var _=M[12],w=M[13],h=M[14],u=M[15],A=i._ortho||!1,x=A?2:1,z=x*this.pixelRatio*(C[3]*_+C[7]*w+C[11]*h+C[15]*u)/T.drawingBufferHeight;this.vao.bind();for(var I=0;I<3;++I)T.lineWidth(this.lineWidth[I]*this.pixelRatio),S.capSize=this.capSize[I]*z,this.lineCount[I]&&T.drawArrays(T.LINES,this.lineOffset[I],this.lineCount[I]);this.vao.unbind()};function g(i,T){for(var S=0;S<3;++S)i[0][S]=Math.min(i[0][S],T[S]),i[1][S]=Math.max(i[1][S],T[S])}var f=function(){for(var i=new Array(3),T=0;T<3;++T){for(var S=[],M=1;M<=2;++M)for(var C=-1;C<=1;C+=2){var _=(M+T)%3,w=[0,0,0];w[_]=C,S.push(w)}i[T]=S}return i}();function v(i,T,S,M){for(var C=f[M],_=0;_0){var O=A.slice();O[h]+=z[1][h],C.push(A[0],A[1],A[2],I[0],I[1],I[2],I[3],0,0,0,O[0],O[1],O[2],I[0],I[1],I[2],I[3],0,0,0),g(this.bounds,O),w+=2+v(C,O,I,h)}}}this.lineCount[h]=w-this.lineOffset[h]}this.buffer.update(C)}},c.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function m(i){var T=i.gl,S=n(T),M=r(T,[{buffer:S,type:T.FLOAT,size:3,offset:0,stride:40},{buffer:S,type:T.FLOAT,size:4,offset:12,stride:40},{buffer:S,type:T.FLOAT,size:3,offset:28,stride:40}]),C=a(T);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.offset.location=2;var _=new s(T,S,M,C);return _.update(i),_}},3436(l,e,t){"use strict";var n=t(3236),r=t(9405),a=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; @@ -693,13 +693,13 @@ void main() { ) discard; gl_FragColor = opacity * fragColor; -}`]);l.exports=function(s){return r(s,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(l,e,t){"use strict";var n=t(7766);l.exports=T;var r=null,a,o,s,c;function m(f){var u=f.getParameter(f.FRAMEBUFFER_BINDING),A=f.getParameter(f.RENDERBUFFER_BINDING),x=f.getParameter(f.TEXTURE_BINDING_2D);return[u,A,x]}function h(f,u){f.bindFramebuffer(f.FRAMEBUFFER,u[0]),f.bindRenderbuffer(f.RENDERBUFFER,u[1]),f.bindTexture(f.TEXTURE_2D,u[2])}function v(f,u){var A=f.getParameter(u.MAX_COLOR_ATTACHMENTS_WEBGL);r=new Array(A+1);for(var x=0;x<=A;++x){for(var z=new Array(A),I=0;I1&&D.drawBuffersWEBGL(r[O]);var U=A.getExtension("WEBGL_depth_texture");U?B?f.depth=i(A,z,I,U.UNSIGNED_INT_24_8_WEBGL,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F&&(f.depth=i(A,z,I,A.UNSIGNED_SHORT,A.DEPTH_COMPONENT,A.DEPTH_ATTACHMENT)):F&&B?f._depth_rb=w(A,z,I,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F?f._depth_rb=w(A,z,I,A.DEPTH_COMPONENT16,A.DEPTH_ATTACHMENT):B&&(f._depth_rb=w(A,z,I,A.STENCIL_INDEX,A.STENCIL_ATTACHMENT));var $=A.checkFramebufferStatus(A.FRAMEBUFFER);if($!==A.FRAMEBUFFER_COMPLETE){f._destroyed=!0,A.bindFramebuffer(A.FRAMEBUFFER,null),A.deleteFramebuffer(f.handle),f.handle=null,f.depth&&(f.depth.dispose(),f.depth=null),f._depth_rb&&(A.deleteRenderbuffer(f._depth_rb),f._depth_rb=null);for(var j=0;jz||A<0||A>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");f._shape[0]=u,f._shape[1]=A;for(var I=m(x),O=0;OI||A<0||A>I)throw new Error("gl-fbo: Parameters are too large for FBO");x=x||{};var O=1;if("color"in x){if(O=Math.max(x.color|0,0),O<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(O>1)if(z){if(O>f.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+O+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var D=f.UNSIGNED_BYTE,B=f.getExtension("OES_texture_float");if(x.float&&O>0){if(!B)throw new Error("gl-fbo: Context does not support floating point textures");D=f.FLOAT}else x.preferFloat&&O>0&&B&&(D=f.FLOAT);var F=!0;"depth"in x&&(F=!!x.depth);var P=!1;return"stencil"in x&&(P=!!x.stencil),new M(f,u,A,D,O,F,P,z)}},2992:function(l,e,t){var n=t(3387).sprintf,r=t(5171),a=t(1848),o=t(1085);l.exports=s;function s(c,m,h){"use strict";var v=a(m)||"of unknown name (see npm glsl-shader-name)",g="unknown type";h!==void 0&&(g=h===r.FRAGMENT_SHADER?"fragment":"vertex");for(var i=n(`Error compiling %s shader %s: -`,g,v),w=n("%s%s",i,c),S=c.split(` -`),M={},C=0;C1&&D.drawBuffersWEBGL(r[O]);var U=A.getExtension("WEBGL_depth_texture");U?B?h.depth=i(A,z,I,U.UNSIGNED_INT_24_8_WEBGL,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F&&(h.depth=i(A,z,I,A.UNSIGNED_SHORT,A.DEPTH_COMPONENT,A.DEPTH_ATTACHMENT)):F&&B?h._depth_rb=T(A,z,I,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F?h._depth_rb=T(A,z,I,A.DEPTH_COMPONENT16,A.DEPTH_ATTACHMENT):B&&(h._depth_rb=T(A,z,I,A.STENCIL_INDEX,A.STENCIL_ATTACHMENT));var $=A.checkFramebufferStatus(A.FRAMEBUFFER);if($!==A.FRAMEBUFFER_COMPLETE){h._destroyed=!0,A.bindFramebuffer(A.FRAMEBUFFER,null),A.deleteFramebuffer(h.handle),h.handle=null,h.depth&&(h.depth.dispose(),h.depth=null),h._depth_rb&&(A.deleteRenderbuffer(h._depth_rb),h._depth_rb=null);for(var j=0;jz||A<0||A>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");h._shape[0]=u,h._shape[1]=A;for(var I=g(x),O=0;OI||A<0||A>I)throw new Error("gl-fbo: Parameters are too large for FBO");x=x||{};var O=1;if("color"in x){if(O=Math.max(x.color|0,0),O<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(O>1)if(z){if(O>h.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+O+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var D=h.UNSIGNED_BYTE,B=h.getExtension("OES_texture_float");if(x.float&&O>0){if(!B)throw new Error("gl-fbo: Context does not support floating point textures");D=h.FLOAT}else x.preferFloat&&O>0&&B&&(D=h.FLOAT);var F=!0;"depth"in x&&(F=!!x.depth);var P=!1;return"stencil"in x&&(P=!!x.stencil),new M(h,u,A,D,O,F,P,z)}},2992(l,e,t){var n=t(3387).sprintf,r=t(5171),a=t(1848),o=t(1085);l.exports=s;function s(c,g,f){"use strict";var v=a(g)||"of unknown name (see npm glsl-shader-name)",m="unknown type";f!==void 0&&(m=f===r.FRAGMENT_SHADER?"fragment":"vertex");for(var i=n(`Error compiling %s shader %s: +`,m,v),T=n("%s%s",i,c),S=c.split(` +`),M={},C=0;C0){for(var se=0;se<24;++se)I.push(I[I.length-12]);F+=2,Q=!0}continue e}P[0][x]=Math.min(P[0][x],re[x],ne[x]),P[1][x]=Math.max(P[1][x],re[x],ne[x])}var G,X;Array.isArray(U[0])?(G=U.length>A-1?U[A-1]:U.length>0?U[U.length-1]:[0,0,0,1],X=U.length>A?U[A]:U.length>0?U[U.length-1]:[0,0,0,1]):G=X=U,G.length===3&&(G=[G[0],G[1],G[2],1]),X.length===3&&(X=[X[0],X[1],X[2],1]),!this.hasAlpha&&G[3]<1&&(this.hasAlpha=!0);var K;Array.isArray($)?K=$.length>A-1?$[A-1]:$.length>0?$[$.length-1]:[0,0,0,1]:K=$;var H=B;if(B+=S(re,ne),Q){for(x=0;x<2;++x)I.push(re[0],re[1],re[2],ne[0],ne[1],ne[2],H,K,G[0],G[1],G[2],G[3]);F+=2,Q=!1}I.push(re[0],re[1],re[2],ne[0],ne[1],ne[2],H,K,G[0],G[1],G[2],G[3],re[0],re[1],re[2],ne[0],ne[1],ne[2],H,-K,G[0],G[1],G[2],G[3],ne[0],ne[1],ne[2],re[0],re[1],re[2],B,-K,X[0],X[1],X[2],X[3],ne[0],ne[1],ne[2],re[0],re[1],re[2],B,K,X[0],X[1],X[2],X[3]),F+=4}}if(this.buffer.update(I),O.push(B),D.push(j[j.length-1].slice()),this.bounds=P,this.vertexCount=F,this.points=D,this.arcLength=O,"dashes"in u){var Y=u.dashes,q=Y.slice();for(q.unshift(0),A=1;A1.0001)return null;x+=A[C]}return Math.abs(x-1)>.001?null:[_,c(h,A),A]}},840:function(l,e,t){var n=t(3236),r=n([`precision highp float; +}`]),c=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];e.createShader=function(g){return r(g,a,o,null,c)},e.createPickShader=function(g){return r(g,a,s,null,c)}},5714(l,e,t){"use strict";l.exports=h;var n=t(2762),r=t(8116),a=t(7766),o=new Uint8Array(4),s=new Float32Array(o.buffer);function c(u,A,x,z){return o[0]=z,o[1]=x,o[2]=A,o[3]=u,s[0]}var g=t(2478),f=t(9618),v=t(7319),m=v.createShader,i=v.createPickShader,T=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function S(u,A){for(var x=0,z=0;z<3;++z){var I=u[z]-A[z];x+=I*I}return Math.sqrt(x)}function M(u){for(var A=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],x=0;x<3;++x)A[0][x]=Math.max(u[0][x],A[0][x]),A[1][x]=Math.min(u[1][x],A[1][x]);return A}function C(u,A,x,z){this.arcLength=u,this.position=A,this.index=x,this.dataCoordinate=z}function _(u,A,x,z,I,O){this.gl=u,this.shader=A,this.pickShader=x,this.buffer=z,this.vao=I,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=O,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var w=_.prototype;w.isTransparent=function(){return this.hasAlpha},w.isOpaque=function(){return!this.hasAlpha},w.pickSlots=1,w.setPickBase=function(u){this.pickId=u},w.drawTransparent=w.draw=function(u){if(this.vertexCount){var A=this.gl,x=this.shader,z=this.vao;x.bind(),x.uniforms={model:u.model||T,view:u.view||T,projection:u.projection||T,clipBounds:M(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(A.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},w.drawPick=function(u){if(this.vertexCount){var A=this.gl,x=this.pickShader,z=this.vao;x.bind(),x.uniforms={model:u.model||T,view:u.view||T,projection:u.projection||T,pickId:this.pickId,clipBounds:M(this.clipBounds),screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(A.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},w.update=function(u){var A,x;this.dirty=!0;var z=!!u.connectGaps;"dashScale"in u&&(this.dashScale=u.dashScale),this.hasAlpha=!1,"opacity"in u&&(this.opacity=+u.opacity,this.opacity<1&&(this.hasAlpha=!0));var I=[],O=[],D=[],B=0,F=0,P=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],j=u.position||u.positions;if(j){var U=u.color||u.colors||[0,0,0,1],$=u.lineWidth||1,Q=!1;e:for(A=1;A0){for(var se=0;se<24;++se)I.push(I[I.length-12]);F+=2,Q=!0}continue e}P[0][x]=Math.min(P[0][x],re[x],ne[x]),P[1][x]=Math.max(P[1][x],re[x],ne[x])}var V,Z;Array.isArray(U[0])?(V=U.length>A-1?U[A-1]:U.length>0?U[U.length-1]:[0,0,0,1],Z=U.length>A?U[A]:U.length>0?U[U.length-1]:[0,0,0,1]):V=Z=U,V.length===3&&(V=[V[0],V[1],V[2],1]),Z.length===3&&(Z=[Z[0],Z[1],Z[2],1]),!this.hasAlpha&&V[3]<1&&(this.hasAlpha=!0);var K;Array.isArray($)?K=$.length>A-1?$[A-1]:$.length>0?$[$.length-1]:[0,0,0,1]:K=$;var H=B;if(B+=S(re,ne),Q){for(x=0;x<2;++x)I.push(re[0],re[1],re[2],ne[0],ne[1],ne[2],H,K,V[0],V[1],V[2],V[3]);F+=2,Q=!1}I.push(re[0],re[1],re[2],ne[0],ne[1],ne[2],H,K,V[0],V[1],V[2],V[3],re[0],re[1],re[2],ne[0],ne[1],ne[2],H,-K,V[0],V[1],V[2],V[3],ne[0],ne[1],ne[2],re[0],re[1],re[2],B,-K,Z[0],Z[1],Z[2],Z[3],ne[0],ne[1],ne[2],re[0],re[1],re[2],B,K,Z[0],Z[1],Z[2],Z[3]),F+=4}}if(this.buffer.update(I),O.push(B),D.push(j[j.length-1].slice()),this.bounds=P,this.vertexCount=F,this.points=D,this.arcLength=O,"dashes"in u){var X=u.dashes,q=X.slice();for(q.unshift(0),A=1;A1.0001)return null;x+=A[C]}return Math.abs(x-1)>.001?null:[_,c(f,A),A]}},840(l,e,t){var n=t(3236),r=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; @@ -1102,7 +1102,7 @@ void main() { gl_PointSize = pointSize; f_color = color; f_uv = uv; -}`]),m=n([`precision highp float; +}`]),g=n([`precision highp float; #define GLSLIFY 1 uniform sampler2D texture; @@ -1117,7 +1117,7 @@ void main() { discard; } gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),h=n([`precision highp float; +}`]),f=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1165,7 +1165,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]),g=n([`precision highp float; +}`]),m=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1217,7 +1217,7 @@ uniform mat4 model, view, projection; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); -}`]),w=n([`precision highp float; +}`]),T=n([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; @@ -1225,7 +1225,7 @@ uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } -`]);e.meshShader={vertex:r,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:c,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:h,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:g,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:i,fragment:w,attributes:[{name:"position",type:"vec3"}]}},7201:function(l,e,t){"use strict";var n=1e-6,r=1e-6,a=t(9405),o=t(2762),s=t(8116),c=t(7766),m=t(8406),h=t(6760),v=t(7608),g=t(9618),i=t(6729),w=t(7765),S=t(1888),M=t(840),C=t(7626),_=M.meshShader,T=M.wireShader,f=M.pointShader,u=M.pickShader,A=M.pointPickShader,x=M.contourShader,z=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function I(se,G,X,K,H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve,Ge,ke,_e,ce,ve,le,Ae,Be,Xe,Ye){this.gl=se,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=G,this.dirty=!0,this.triShader=X,this.lineShader=K,this.pointShader=H,this.pickShader=Y,this.pointPickShader=q,this.contourShader=Z,this.trianglePositions=ee,this.triangleColors=he,this.triangleNormals=we,this.triangleUVs=xe,this.triangleIds=ae,this.triangleVAO=Me,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Se,this.edgeColors=Ve,this.edgeUVs=Ge,this.edgeIds=Ie,this.edgeVAO=ke,this.edgeCount=0,this.pointPositions=_e,this.pointColors=ve,this.pointUVs=le,this.pointSizes=Ae,this.pointIds=ce,this.pointVAO=Be,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Xe,this.contourVAO=Ye,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=z,this._view=z,this._projection=z,this._resolution=[1,1]}var O=I.prototype;O.isOpaque=function(){return!this.hasAlpha},O.isTransparent=function(){return this.hasAlpha},O.pickSlots=1,O.setPickBase=function(se){this.pickId=se};function D(se,G){if(!G||!G.length)return 1;for(var X=0;Xse&&X>0){var K=(G[X][0]-se)/(G[X][0]-G[X-1][0]);return G[X][1]*(1-K)+K*G[X-1][1]}}return 1}function B(se,G){for(var X=i({colormap:se,nshades:256,format:"rgba"}),K=new Uint8Array(256*4),H=0;H<256;++H){for(var Y=X[H],q=0;q<3;++q)K[4*H+q]=Y[q];G?K[4*H+3]=255*D(H/255,G):K[4*H+3]=255*Y[3]}return g(K,[256,256,4],[4,0,1])}function F(se){for(var G=se.length,X=new Array(G),K=0;K0){var we=this.triShader;we.bind(),we.uniforms=Z,this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var we=this.lineShader;we.bind(),we.uniforms=Z,this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var we=this.pointShader;we.bind(),we.uniforms=Z,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var we=this.contourShader;we.bind(),we.uniforms=Z,this.contourVAO.bind(),G.drawArrays(G.LINES,0,this.contourCount),this.contourVAO.unbind()}},O.drawPick=function(se){se=se||{};for(var G=this.gl,X=se.model||z,K=se.view||z,H=se.projection||z,Y=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)Y[0][q]=Math.max(Y[0][q],this.clipBounds[0][q]),Y[1][q]=Math.min(Y[1][q],this.clipBounds[1][q]);this._model=[].slice.call(X),this._view=[].slice.call(K),this._projection=[].slice.call(H),this._resolution=[G.drawingBufferWidth,G.drawingBufferHeight];var Z={model:X,view:K,projection:H,clipBounds:Y,pickId:this.pickId/255},ee=this.pickShader;if(ee.bind(),ee.uniforms=Z,this.triangleCount>0&&(this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ee=this.pointPickShader;ee.bind(),ee.uniforms=Z,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}},O.pick=function(se){if(!se||se.id!==this.pickId)return null;for(var G=se.value[0]+256*se.value[1]+65536*se.value[2],X=this.cells[G],K=this.positions,H=new Array(X.length),Y=0;YMath.abs(u))i.rotate(z,0,0,-f*A*Math.PI*_.rotateSpeed/window.innerWidth);else if(!_._ortho){var I=-_.zoomSpeed*x*u/window.innerHeight*(z-i.lastT())/20;i.pan(z,0,0,S*(Math.exp(I)-1))}}},!0)},_.enableMouseListeners(),_}},799:function(l,e,t){var n=t(3236),r=t(9405),a=n([`precision mediump float; +`]);e.meshShader={vertex:r,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:c,fragment:g,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:f,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:m,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:i,fragment:T,attributes:[{name:"position",type:"vec3"}]}},7201(l,e,t){"use strict";var n=1e-6,r=1e-6,a=t(9405),o=t(2762),s=t(8116),c=t(7766),g=t(8406),f=t(6760),v=t(7608),m=t(9618),i=t(6729),T=t(7765),S=t(1888),M=t(840),C=t(7626),_=M.meshShader,w=M.wireShader,h=M.pointShader,u=M.pickShader,A=M.pointPickShader,x=M.contourShader,z=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function I(se,V,Z,K,H,X,q,W,ee,ae,he,xe,we,Me,Se,Ie,Ge,qe,ke,_e,ue,ve,le,Ae,Be,Xe,Ye){this.gl=se,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=V,this.dirty=!0,this.triShader=Z,this.lineShader=K,this.pointShader=H,this.pickShader=X,this.pointPickShader=q,this.contourShader=W,this.trianglePositions=ee,this.triangleColors=he,this.triangleNormals=we,this.triangleUVs=xe,this.triangleIds=ae,this.triangleVAO=Me,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Se,this.edgeColors=Ge,this.edgeUVs=qe,this.edgeIds=Ie,this.edgeVAO=ke,this.edgeCount=0,this.pointPositions=_e,this.pointColors=ve,this.pointUVs=le,this.pointSizes=Ae,this.pointIds=ue,this.pointVAO=Be,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Xe,this.contourVAO=Ye,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=z,this._view=z,this._projection=z,this._resolution=[1,1]}var O=I.prototype;O.isOpaque=function(){return!this.hasAlpha},O.isTransparent=function(){return this.hasAlpha},O.pickSlots=1,O.setPickBase=function(se){this.pickId=se};function D(se,V){if(!V||!V.length)return 1;for(var Z=0;Zse&&Z>0){var K=(V[Z][0]-se)/(V[Z][0]-V[Z-1][0]);return V[Z][1]*(1-K)+K*V[Z-1][1]}}return 1}function B(se,V){for(var Z=i({colormap:se,nshades:256,format:"rgba"}),K=new Uint8Array(256*4),H=0;H<256;++H){for(var X=Z[H],q=0;q<3;++q)K[4*H+q]=X[q];V?K[4*H+3]=255*D(H/255,V):K[4*H+3]=255*X[3]}return m(K,[256,256,4],[4,0,1])}function F(se){for(var V=se.length,Z=new Array(V),K=0;K0){var we=this.triShader;we.bind(),we.uniforms=W,this.triangleVAO.bind(),V.drawArrays(V.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var we=this.lineShader;we.bind(),we.uniforms=W,this.edgeVAO.bind(),V.lineWidth(this.lineWidth*this.pixelRatio),V.drawArrays(V.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var we=this.pointShader;we.bind(),we.uniforms=W,this.pointVAO.bind(),V.drawArrays(V.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var we=this.contourShader;we.bind(),we.uniforms=W,this.contourVAO.bind(),V.drawArrays(V.LINES,0,this.contourCount),this.contourVAO.unbind()}},O.drawPick=function(se){se=se||{};for(var V=this.gl,Z=se.model||z,K=se.view||z,H=se.projection||z,X=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)X[0][q]=Math.max(X[0][q],this.clipBounds[0][q]),X[1][q]=Math.min(X[1][q],this.clipBounds[1][q]);this._model=[].slice.call(Z),this._view=[].slice.call(K),this._projection=[].slice.call(H),this._resolution=[V.drawingBufferWidth,V.drawingBufferHeight];var W={model:Z,view:K,projection:H,clipBounds:X,pickId:this.pickId/255},ee=this.pickShader;if(ee.bind(),ee.uniforms=W,this.triangleCount>0&&(this.triangleVAO.bind(),V.drawArrays(V.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),V.lineWidth(this.lineWidth*this.pixelRatio),V.drawArrays(V.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ee=this.pointPickShader;ee.bind(),ee.uniforms=W,this.pointVAO.bind(),V.drawArrays(V.POINTS,0,this.pointCount),this.pointVAO.unbind()}},O.pick=function(se){if(!se||se.id!==this.pickId)return null;for(var V=se.value[0]+256*se.value[1]+65536*se.value[2],Z=this.cells[V],K=this.positions,H=new Array(Z.length),X=0;XMath.abs(u))i.rotate(z,0,0,-h*A*Math.PI*_.rotateSpeed/window.innerWidth);else if(!_._ortho){var I=-_.zoomSpeed*x*u/window.innerHeight*(z-i.lastT())/20;i.pan(z,0,0,S*(Math.exp(I)-1))}}},!0)},_.enableMouseListeners(),_}},799(l,e,t){var n=t(3236),r=t(9405),a=n([`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); -}`]);l.exports=function(s){return r(s,a,o,null,[{name:"position",type:"vec2"}])}},4100:function(l,e,t){"use strict";var n=t(4437),r=t(3837),a=t(5445),o=t(4449),s=t(3589),c=t(2260),m=t(7169),h=t(351),v=t(4772),g=t(4040),i=t(799),w=t(9216)({tablet:!0,featureDetect:!0});l.exports={createScene:T,createCamera:n};function S(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function M(u,A){var x=null;try{x=u.getContext("webgl",A),x||(x=u.getContext("experimental-webgl",A))}catch{return null}return x}function C(u){var A=Math.round(Math.log(Math.abs(u))/Math.log(10));if(A<0){var x=Math.round(Math.pow(10,-A));return Math.ceil(u*x)/x}else if(A>0){var x=Math.round(Math.pow(10,A));return Math.ceil(u/x)*x}return Math.ceil(u)}function _(u){return typeof u=="boolean"?u:!0}function T(u){u=u||{},u.camera=u.camera||{};var A=u.canvas;if(!A)if(A=document.createElement("canvas"),u.container){var x=u.container;x.appendChild(A)}else document.body.appendChild(A);var z=u.gl;if(z||(u.glOptions&&(w=!!u.glOptions.preserveDrawingBuffer),z=M(A,u.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:w})),!z)throw new Error("webgl not supported");var I=u.bounds||[[-10,-10,-10],[10,10,10]],O=new S,D=c(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!w}),B=i(z),F=u.cameraObject&&u.cameraObject._ortho===!0||u.camera.projection&&u.camera.projection.type==="orthographic"||!1,P={eye:u.camera.eye||[2,0,0],center:u.camera.center||[0,0,0],up:u.camera.up||[0,1,0],zoomMin:u.camera.zoomMax||.1,zoomMax:u.camera.zoomMin||100,mode:u.camera.mode||"turntable",_ortho:F},j=u.axes||{},U=r(z,j);U.enable=!j.disable;var $=u.spikes||{},Q=o(z,$),re=[],ne=[],se=[],G=[],X=!0,q=!0,K=new Array(16),H=new Array(16),Y={view:null,projection:K,model:H,_ortho:!1},q=!0,Z=[z.drawingBufferWidth,z.drawingBufferHeight],ee=u.cameraObject||n(A,P),ae={gl:z,contextLost:!1,pixelRatio:u.pixelRatio||1,canvas:A,selection:O,camera:ee,axes:U,axesPixels:null,spikes:Q,bounds:I,objects:re,shape:Z,aspect:u.aspectRatio||[1,1,1],pickRadius:u.pickRadius||10,zNear:u.zNear||.01,zFar:u.zFar||1e3,fovy:u.fovy||Math.PI/4,clearColor:u.clearColor||[0,0,0,0],autoResize:_(u.autoResize),autoBounds:_(u.autoBounds),autoScale:!!u.autoScale,autoCenter:_(u.autoCenter),clipToBounds:_(u.clipToBounds),snapToData:!!u.snapToData,onselect:u.onselect||null,onrender:u.onrender||null,onclick:u.onclick||null,cameraParams:Y,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(_e){this.aspect[0]=_e.x,this.aspect[1]=_e.y,this.aspect[2]=_e.z,q=!0},setBounds:function(_e,ce){this.bounds[0][_e]=ce.min,this.bounds[1][_e]=ce.max},setClearColor:function(_e){this.clearColor=_e},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},he=[z.drawingBufferWidth/ae.pixelRatio|0,z.drawingBufferHeight/ae.pixelRatio|0];function xe(){if(!ae._stopped&&ae.autoResize){var _e=A.parentNode,ce=1,ve=1;_e&&_e!==document.body?(ce=_e.clientWidth,ve=_e.clientHeight):(ce=window.innerWidth,ve=window.innerHeight);var le=Math.ceil(ce*ae.pixelRatio)|0,Ae=Math.ceil(ve*ae.pixelRatio)|0;if(le!==A.width||Ae!==A.height){A.width=le,A.height=Ae;var Be=A.style;Be.position=Be.position||"absolute",Be.left="0px",Be.top="0px",Be.width=ce+"px",Be.height=ve+"px",X=!0}}}ae.autoResize&&xe(),window.addEventListener("resize",xe);function we(){for(var _e=re.length,ce=G.length,ve=0;ve0&&se[ce-1]===0;)se.pop(),G.pop().dispose()}ae.update=function(_e){ae._stopped||(_e=_e||{},X=!0,q=!0)},ae.add=function(_e){ae._stopped||(_e.axes=U,re.push(_e),ne.push(-1),X=!0,q=!0,we())},ae.remove=function(_e){if(!ae._stopped){var ce=re.indexOf(_e);ce<0||(re.splice(ce,1),ne.pop(),X=!0,q=!0,we())}},ae.dispose=function(){if(!ae._stopped&&(ae._stopped=!0,window.removeEventListener("resize",xe),A.removeEventListener("webglcontextlost",Me),ae.mouseListener.enabled=!1,!ae.contextLost)){U.dispose(),Q.dispose();for(var _e=0;_eO.distance)continue;for(var gt=0;gt1e-6?(w=Math.acos(S),M=Math.sin(w),C=Math.sin((1-a)*w)/M,_=Math.sin(a*w)/M):(C=1-a,_=a),t[0]=C*o+_*h,t[1]=C*s+_*v,t[2]=C*c+_*g,t[3]=C*m+_*i,t}},5964:function(l){"use strict";l.exports=function(e){return!e&&e!==0?"":e.toString()}},9366:function(l,e,t){"use strict";var n=t(4359);l.exports=a;var r={};function a(o,s,c){var m=[s.style,s.weight,s.variant,s.family].join("_"),h=r[m];if(h||(h=r[m]={}),o in h)return h[o];var v={textAlign:"center",textBaseline:"middle",lineHeight:1,font:s.family,fontStyle:s.style,fontWeight:s.weight,fontVariant:s.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};v.triangles=!0;var g=n(o,v);v.triangles=!1;var i=n(o,v),w,S;if(c&&c!==1){for(w=0;w0){var x=Math.round(Math.pow(10,A));return Math.ceil(u/x)*x}return Math.ceil(u)}function _(u){return typeof u=="boolean"?u:!0}function w(u){u=u||{},u.camera=u.camera||{};var A=u.canvas;if(!A)if(A=document.createElement("canvas"),u.container){var x=u.container;x.appendChild(A)}else document.body.appendChild(A);var z=u.gl;if(z||(u.glOptions&&(T=!!u.glOptions.preserveDrawingBuffer),z=M(A,u.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:T})),!z)throw new Error("webgl not supported");var I=u.bounds||[[-10,-10,-10],[10,10,10]],O=new S,D=c(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!T}),B=i(z),F=u.cameraObject&&u.cameraObject._ortho===!0||u.camera.projection&&u.camera.projection.type==="orthographic"||!1,P={eye:u.camera.eye||[2,0,0],center:u.camera.center||[0,0,0],up:u.camera.up||[0,1,0],zoomMin:u.camera.zoomMax||.1,zoomMax:u.camera.zoomMin||100,mode:u.camera.mode||"turntable",_ortho:F},j=u.axes||{},U=r(z,j);U.enable=!j.disable;var $=u.spikes||{},Q=o(z,$),re=[],ne=[],se=[],V=[],Z=!0,q=!0,K=new Array(16),H=new Array(16),X={view:null,projection:K,model:H,_ortho:!1},q=!0,W=[z.drawingBufferWidth,z.drawingBufferHeight],ee=u.cameraObject||n(A,P),ae={gl:z,contextLost:!1,pixelRatio:u.pixelRatio||1,canvas:A,selection:O,camera:ee,axes:U,axesPixels:null,spikes:Q,bounds:I,objects:re,shape:W,aspect:u.aspectRatio||[1,1,1],pickRadius:u.pickRadius||10,zNear:u.zNear||.01,zFar:u.zFar||1e3,fovy:u.fovy||Math.PI/4,clearColor:u.clearColor||[0,0,0,0],autoResize:_(u.autoResize),autoBounds:_(u.autoBounds),autoScale:!!u.autoScale,autoCenter:_(u.autoCenter),clipToBounds:_(u.clipToBounds),snapToData:!!u.snapToData,onselect:u.onselect||null,onrender:u.onrender||null,onclick:u.onclick||null,cameraParams:X,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(_e){this.aspect[0]=_e.x,this.aspect[1]=_e.y,this.aspect[2]=_e.z,q=!0},setBounds:function(_e,ue){this.bounds[0][_e]=ue.min,this.bounds[1][_e]=ue.max},setClearColor:function(_e){this.clearColor=_e},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},he=[z.drawingBufferWidth/ae.pixelRatio|0,z.drawingBufferHeight/ae.pixelRatio|0];function xe(){if(!ae._stopped&&ae.autoResize){var _e=A.parentNode,ue=1,ve=1;_e&&_e!==document.body?(ue=_e.clientWidth,ve=_e.clientHeight):(ue=window.innerWidth,ve=window.innerHeight);var le=Math.ceil(ue*ae.pixelRatio)|0,Ae=Math.ceil(ve*ae.pixelRatio)|0;if(le!==A.width||Ae!==A.height){A.width=le,A.height=Ae;var Be=A.style;Be.position=Be.position||"absolute",Be.left="0px",Be.top="0px",Be.width=ue+"px",Be.height=ve+"px",Z=!0}}}ae.autoResize&&xe(),window.addEventListener("resize",xe);function we(){for(var _e=re.length,ue=V.length,ve=0;ve0&&se[ue-1]===0;)se.pop(),V.pop().dispose()}ae.update=function(_e){ae._stopped||(_e=_e||{},Z=!0,q=!0)},ae.add=function(_e){ae._stopped||(_e.axes=U,re.push(_e),ne.push(-1),Z=!0,q=!0,we())},ae.remove=function(_e){if(!ae._stopped){var ue=re.indexOf(_e);ue<0||(re.splice(ue,1),ne.pop(),Z=!0,q=!0,we())}},ae.dispose=function(){if(!ae._stopped&&(ae._stopped=!0,window.removeEventListener("resize",xe),A.removeEventListener("webglcontextlost",Me),ae.mouseListener.enabled=!1,!ae.contextLost)){U.dispose(),Q.dispose();for(var _e=0;_eO.distance)continue;for(var gt=0;gt1e-6?(T=Math.acos(S),M=Math.sin(T),C=Math.sin((1-a)*T)/M,_=Math.sin(a*T)/M):(C=1-a,_=a),t[0]=C*o+_*f,t[1]=C*s+_*v,t[2]=C*c+_*m,t[3]=C*g+_*i,t}},5964(l){"use strict";l.exports=function(e){return!e&&e!==0?"":e.toString()}},9366(l,e,t){"use strict";var n=t(4359);l.exports=a;var r={};function a(o,s,c){var g=[s.style,s.weight,s.variant,s.family].join("_"),f=r[g];if(f||(f=r[g]={}),o in f)return f[o];var v={textAlign:"center",textBaseline:"middle",lineHeight:1,font:s.family,fontStyle:s.style,fontWeight:s.weight,fontVariant:s.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};v.triangles=!0;var m=n(o,v);v.triangles=!1;var i=n(o,v),T,S;if(c&&c!==1){for(T=0;T1?1:H}function f(H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie){this.gl=H,this.pixelRatio=1,this.shader=Y,this.orthoShader=q,this.projectShader=Z,this.pointBuffer=ee,this.colorBuffer=ae,this.glyphBuffer=he,this.idBuffer=xe,this.vao=we,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=Me,this.pickOrthoShader=Se,this.pickProjectShader=Ie,this.points=[],this._selectResult=new _(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var u=f.prototype;u.pickSlots=1,u.setPickBase=function(H){this.pickId=H},u.isTransparent=function(){if(this.hasAlpha)return!0;for(var H=0;H<3;++H)if(this.axesProject[H]&&this.projectHasAlpha)return!0;return!1},u.isOpaque=function(){if(!this.hasAlpha)return!0;for(var H=0;H<3;++H)if(this.axesProject[H]&&!this.projectHasAlpha)return!0;return!1};var A=[0,0],x=[0,0,0],z=[0,0,0],I=[0,0,0,1],O=[0,0,0,1],D=v.slice(),B=[0,0,0],F=[[0,0,0],[0,0,0]];function P(H){return H[0]=H[1]=H[2]=0,H}function j(H,Y){return H[0]=Y[0],H[1]=Y[1],H[2]=Y[2],H[3]=1,H}function U(H,Y,q,Z){return H[0]=Y[0],H[1]=Y[1],H[2]=Y[2],H[q]=Z,H}function $(H){for(var Y=F,q=0;q<2;++q)for(var Z=0;Z<3;++Z)Y[q][Z]=Math.max(Math.min(H[q][Z],1e8),-1e8);return Y}function Q(H,Y,q,Z){var ee=Y.axesProject,ae=Y.gl,he=H.uniforms,xe=q.model||v,we=q.view||v,Me=q.projection||v,Se=Y.axesBounds,Ie=$(Y.clipBounds),Ve;Y.axes&&Y.axes.lastCubeProps?Ve=Y.axes.lastCubeProps.axis:Ve=[1,1,1],A[0]=2/ae.drawingBufferWidth,A[1]=2/ae.drawingBufferHeight,H.bind(),he.view=we,he.projection=Me,he.screenSize=A,he.highlightId=Y.highlightId,he.highlightScale=Y.highlightScale,he.clipBounds=Ie,he.pickGroup=Y.pickId/255,he.pixelRatio=Z;for(var Ge=0;Ge<3;++Ge)if(ee[Ge]){he.scale=Y.projectScale[Ge],he.opacity=Y.projectOpacity[Ge];for(var ke=D,_e=0;_e<16;++_e)ke[_e]=0;for(var _e=0;_e<4;++_e)ke[5*_e]=1;ke[5*Ge]=0,Ve[Ge]<0?ke[12+Ge]=Se[0][Ge]:ke[12+Ge]=Se[1][Ge],s(ke,xe,ke),he.model=ke;var ce=(Ge+1)%3,ve=(Ge+2)%3,le=P(x),Ae=P(z);le[ce]=1,Ae[ve]=1;var Be=C(Me,we,xe,j(I,le)),Xe=C(Me,we,xe,j(O,Ae));if(Math.abs(Be[1])>Math.abs(Xe[1])){var Ye=Be;Be=Xe,Xe=Ye,Ye=le,le=Ae,Ae=Ye;var yt=ce;ce=ve,ve=yt}Be[0]<0&&(le[ce]=-1),Xe[1]>0&&(Ae[ve]=-1);for(var gt=0,Tt=0,_e=0;_e<4;++_e)gt+=Math.pow(xe[4*ce+_e],2),Tt+=Math.pow(xe[4*ve+_e],2);le[ce]/=Math.sqrt(gt),Ae[ve]/=Math.sqrt(Tt),he.axes[0]=le,he.axes[1]=Ae,he.fragClipBounds[0]=U(B,Ie[0],Ge,-1e8),he.fragClipBounds[1]=U(B,Ie[1],Ge,1e8),Y.vao.bind(),Y.vao.draw(ae.TRIANGLES,Y.vertexCount),Y.lineWidth>0&&(ae.lineWidth(Y.lineWidth*Z),Y.vao.draw(ae.LINES,Y.lineVertexCount,Y.vertexCount)),Y.vao.unbind()}}var re=[-1e8,-1e8,-1e8],ne=[1e8,1e8,1e8],se=[re,ne];function G(H,Y,q,Z,ee,ae,he){var xe=q.gl;if((ae===q.projectHasAlpha||he)&&Q(Y,q,Z,ee),ae===q.hasAlpha||he){H.bind();var we=H.uniforms;we.model=Z.model||v,we.view=Z.view||v,we.projection=Z.projection||v,A[0]=2/xe.drawingBufferWidth,A[1]=2/xe.drawingBufferHeight,we.screenSize=A,we.highlightId=q.highlightId,we.highlightScale=q.highlightScale,we.fragClipBounds=se,we.clipBounds=q.axes.bounds,we.opacity=q.opacity,we.pickGroup=q.pickId/255,we.pixelRatio=ee,q.vao.bind(),q.vao.draw(xe.TRIANGLES,q.vertexCount),q.lineWidth>0&&(xe.lineWidth(q.lineWidth*ee),q.vao.draw(xe.LINES,q.lineVertexCount,q.vertexCount)),q.vao.unbind()}}u.draw=function(H){var Y=this.useOrtho?this.orthoShader:this.shader;G(Y,this.projectShader,this,H,this.pixelRatio,!1,!1)},u.drawTransparent=function(H){var Y=this.useOrtho?this.orthoShader:this.shader;G(Y,this.projectShader,this,H,this.pixelRatio,!0,!1)},u.drawPick=function(H){var Y=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;G(Y,this.pickProjectShader,this,H,1,!0,!0)},u.pick=function(H){if(!H||H.id!==this.pickId)return null;var Y=H.value[2]+(H.value[1]<<8)+(H.value[0]<<16);if(Y>=this.pointCount||Y<0)return null;var q=this.points[Y],Z=this._selectResult;Z.index=Y;for(var ee=0;ee<3;++ee)Z.position[ee]=Z.dataCoordinate[ee]=q[ee];return Z},u.highlight=function(H){if(!H)this.highlightId=[1,1,1,1];else{var Y=H.index,q=Y&255,Z=Y>>8&255,ee=Y>>16&255;this.highlightId=[q/255,Z/255,ee/255,0]}};function X(H,Y,q,Z){var ee;S(H)?Y0){var or=0,Ot=ve,vt=[0,0,0,1],ht=[0,0,0,1],De=S(Ve)&&S(Ve[0]),Ne=S(_e)&&S(_e[0]);e:for(var Z=0;Z0?1-Tt[0][0]:Pt<0?1+Tt[1][0]:1,Ct*=Ct>0?1-Tt[0][1]:Ct<0?1+Tt[1][1]:1;for(var qt=[Pt,Ct],Yt=yt.cells||[],Rt=yt.positions||[],Xe=0;Xethis.buffer.length){r.free(this.buffer);for(var S=this.buffer=r.mallocUint8(o(w*i*4)),M=0;MS)for(i=S;iw)for(i=w;i=0){for(var F=B.type.charAt(B.type.length-1)|0,P=new Array(F),j=0;j=0;)U+=1;O[D]=U}var $=new Array(S.length);function Q(){_.program=o.program(T,_._vref,_._fref,I,O);for(var re=0;re=0){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new n("","Invalid data type for attribute "+_+": "+T);s(h,v,f[0],i,u,w,_)}else if(T.indexOf("mat")>=0){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new n("","Invalid data type for attribute "+_+": "+T);c(h,v,f,i,u,w,_)}else throw new n("","Unknown data type for attribute "+_+": "+T);break}}return w}},3327:function(l,e,t){"use strict";var n=t(216),r=t(8866);l.exports=s;function a(c){return function(){return c}}function o(c,m){for(var h=new Array(c),v=0;v4)throw new r("","Invalid data type");switch(U.charAt(0)){case"b":case"i":c["uniform"+$+"iv"](v[O],D);break;case"v":c["uniform"+$+"fv"](v[O],D);break;default:throw new r("","Unrecognized data type for vector "+name+": "+U)}}else if(U.indexOf("mat")===0&&U.length===4){if($=U.charCodeAt(U.length-1)-48,$<2||$>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+U);c["uniformMatrix"+$+"fv"](v[O],!1,D);break}else throw new r("","Unknown uniform data type for "+name+": "+U)}}}}}function w(T,f){if(typeof f!="object")return[[T,f]];var u=[];for(var A in f){var x=f[A],z=T;parseInt(A)+""===A?z+="["+A+"]":z+="."+A,typeof x=="object"?u.push.apply(u,w(z,x)):u.push([z,x])}return u}function S(T){switch(T){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var f=T.indexOf("vec");if(0<=f&&f<=1&&T.length===4+f){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new r("","Invalid data type");return T.charAt(0)==="b"?o(u,!1):o(u,0)}else if(T.indexOf("mat")===0&&T.length===4){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+T);return o(u*u,0)}else throw new r("","Unknown uniform data type for "+name+": "+T)}}function M(T,f,u){if(typeof u=="object"){var A=C(u);Object.defineProperty(T,f,{get:a(A),set:i(u),enumerable:!0,configurable:!1})}else v[u]?Object.defineProperty(T,f,{get:g(u),set:i(u),enumerable:!0,configurable:!1}):T[f]=S(h[u].type)}function C(T){var f;if(Array.isArray(T)){f=new Array(T.length);for(var u=0;u1){h[0]in c||(c[h[0]]=[]),c=c[h[0]];for(var v=1;v1)for(var w=0;w"u"?t(606):WeakMap,o=new a,s=0;function c(M,C,_,T,f,u,A){this.id=M,this.src=C,this.type=_,this.shader=T,this.count=u,this.programs=[],this.cache=A}c.prototype.dispose=function(){if(--this.count===0){for(var M=this.cache,C=M.gl,_=this.programs,T=0,f=_.length;T1?1:H}function h(H,X,q,W,ee,ae,he,xe,we,Me,Se,Ie){this.gl=H,this.pixelRatio=1,this.shader=X,this.orthoShader=q,this.projectShader=W,this.pointBuffer=ee,this.colorBuffer=ae,this.glyphBuffer=he,this.idBuffer=xe,this.vao=we,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=Me,this.pickOrthoShader=Se,this.pickProjectShader=Ie,this.points=[],this._selectResult=new _(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var u=h.prototype;u.pickSlots=1,u.setPickBase=function(H){this.pickId=H},u.isTransparent=function(){if(this.hasAlpha)return!0;for(var H=0;H<3;++H)if(this.axesProject[H]&&this.projectHasAlpha)return!0;return!1},u.isOpaque=function(){if(!this.hasAlpha)return!0;for(var H=0;H<3;++H)if(this.axesProject[H]&&!this.projectHasAlpha)return!0;return!1};var A=[0,0],x=[0,0,0],z=[0,0,0],I=[0,0,0,1],O=[0,0,0,1],D=v.slice(),B=[0,0,0],F=[[0,0,0],[0,0,0]];function P(H){return H[0]=H[1]=H[2]=0,H}function j(H,X){return H[0]=X[0],H[1]=X[1],H[2]=X[2],H[3]=1,H}function U(H,X,q,W){return H[0]=X[0],H[1]=X[1],H[2]=X[2],H[q]=W,H}function $(H){for(var X=F,q=0;q<2;++q)for(var W=0;W<3;++W)X[q][W]=Math.max(Math.min(H[q][W],1e8),-1e8);return X}function Q(H,X,q,W){var ee=X.axesProject,ae=X.gl,he=H.uniforms,xe=q.model||v,we=q.view||v,Me=q.projection||v,Se=X.axesBounds,Ie=$(X.clipBounds),Ge;X.axes&&X.axes.lastCubeProps?Ge=X.axes.lastCubeProps.axis:Ge=[1,1,1],A[0]=2/ae.drawingBufferWidth,A[1]=2/ae.drawingBufferHeight,H.bind(),he.view=we,he.projection=Me,he.screenSize=A,he.highlightId=X.highlightId,he.highlightScale=X.highlightScale,he.clipBounds=Ie,he.pickGroup=X.pickId/255,he.pixelRatio=W;for(var qe=0;qe<3;++qe)if(ee[qe]){he.scale=X.projectScale[qe],he.opacity=X.projectOpacity[qe];for(var ke=D,_e=0;_e<16;++_e)ke[_e]=0;for(var _e=0;_e<4;++_e)ke[5*_e]=1;ke[5*qe]=0,Ge[qe]<0?ke[12+qe]=Se[0][qe]:ke[12+qe]=Se[1][qe],s(ke,xe,ke),he.model=ke;var ue=(qe+1)%3,ve=(qe+2)%3,le=P(x),Ae=P(z);le[ue]=1,Ae[ve]=1;var Be=C(Me,we,xe,j(I,le)),Xe=C(Me,we,xe,j(O,Ae));if(Math.abs(Be[1])>Math.abs(Xe[1])){var Ye=Be;Be=Xe,Xe=Ye,Ye=le,le=Ae,Ae=Ye;var yt=ue;ue=ve,ve=yt}Be[0]<0&&(le[ue]=-1),Xe[1]>0&&(Ae[ve]=-1);for(var gt=0,Tt=0,_e=0;_e<4;++_e)gt+=Math.pow(xe[4*ue+_e],2),Tt+=Math.pow(xe[4*ve+_e],2);le[ue]/=Math.sqrt(gt),Ae[ve]/=Math.sqrt(Tt),he.axes[0]=le,he.axes[1]=Ae,he.fragClipBounds[0]=U(B,Ie[0],qe,-1e8),he.fragClipBounds[1]=U(B,Ie[1],qe,1e8),X.vao.bind(),X.vao.draw(ae.TRIANGLES,X.vertexCount),X.lineWidth>0&&(ae.lineWidth(X.lineWidth*W),X.vao.draw(ae.LINES,X.lineVertexCount,X.vertexCount)),X.vao.unbind()}}var re=[-1e8,-1e8,-1e8],ne=[1e8,1e8,1e8],se=[re,ne];function V(H,X,q,W,ee,ae,he){var xe=q.gl;if((ae===q.projectHasAlpha||he)&&Q(X,q,W,ee),ae===q.hasAlpha||he){H.bind();var we=H.uniforms;we.model=W.model||v,we.view=W.view||v,we.projection=W.projection||v,A[0]=2/xe.drawingBufferWidth,A[1]=2/xe.drawingBufferHeight,we.screenSize=A,we.highlightId=q.highlightId,we.highlightScale=q.highlightScale,we.fragClipBounds=se,we.clipBounds=q.axes.bounds,we.opacity=q.opacity,we.pickGroup=q.pickId/255,we.pixelRatio=ee,q.vao.bind(),q.vao.draw(xe.TRIANGLES,q.vertexCount),q.lineWidth>0&&(xe.lineWidth(q.lineWidth*ee),q.vao.draw(xe.LINES,q.lineVertexCount,q.vertexCount)),q.vao.unbind()}}u.draw=function(H){var X=this.useOrtho?this.orthoShader:this.shader;V(X,this.projectShader,this,H,this.pixelRatio,!1,!1)},u.drawTransparent=function(H){var X=this.useOrtho?this.orthoShader:this.shader;V(X,this.projectShader,this,H,this.pixelRatio,!0,!1)},u.drawPick=function(H){var X=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;V(X,this.pickProjectShader,this,H,1,!0,!0)},u.pick=function(H){if(!H||H.id!==this.pickId)return null;var X=H.value[2]+(H.value[1]<<8)+(H.value[0]<<16);if(X>=this.pointCount||X<0)return null;var q=this.points[X],W=this._selectResult;W.index=X;for(var ee=0;ee<3;++ee)W.position[ee]=W.dataCoordinate[ee]=q[ee];return W},u.highlight=function(H){if(!H)this.highlightId=[1,1,1,1];else{var X=H.index,q=X&255,W=X>>8&255,ee=X>>16&255;this.highlightId=[q/255,W/255,ee/255,0]}};function Z(H,X,q,W){var ee;S(H)?X0){var or=0,Ot=ve,vt=[0,0,0,1],ht=[0,0,0,1],De=S(Ge)&&S(Ge[0]),Ne=S(_e)&&S(_e[0]);e:for(var W=0;W0?1-Tt[0][0]:Pt<0?1+Tt[1][0]:1,Ct*=Ct>0?1-Tt[0][1]:Ct<0?1+Tt[1][1]:1;for(var qt=[Pt,Ct],Yt=yt.cells||[],Rt=yt.positions||[],Xe=0;Xethis.buffer.length){r.free(this.buffer);for(var S=this.buffer=r.mallocUint8(o(T*i*4)),M=0;MS)for(i=S;iT)for(i=T;i=0){for(var F=B.type.charAt(B.type.length-1)|0,P=new Array(F),j=0;j=0;)U+=1;O[D]=U}var $=new Array(S.length);function Q(){_.program=o.program(w,_._vref,_._fref,I,O);for(var re=0;re=0){var u=w.charCodeAt(w.length-1)-48;if(u<2||u>4)throw new n("","Invalid data type for attribute "+_+": "+w);s(f,v,h[0],i,u,T,_)}else if(w.indexOf("mat")>=0){var u=w.charCodeAt(w.length-1)-48;if(u<2||u>4)throw new n("","Invalid data type for attribute "+_+": "+w);c(f,v,h,i,u,T,_)}else throw new n("","Unknown data type for attribute "+_+": "+w);break}}return T}},3327(l,e,t){"use strict";var n=t(216),r=t(8866);l.exports=s;function a(c){return function(){return c}}function o(c,g){for(var f=new Array(c),v=0;v4)throw new r("","Invalid data type");switch(U.charAt(0)){case"b":case"i":c["uniform"+$+"iv"](v[O],D);break;case"v":c["uniform"+$+"fv"](v[O],D);break;default:throw new r("","Unrecognized data type for vector "+name+": "+U)}}else if(U.indexOf("mat")===0&&U.length===4){if($=U.charCodeAt(U.length-1)-48,$<2||$>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+U);c["uniformMatrix"+$+"fv"](v[O],!1,D);break}else throw new r("","Unknown uniform data type for "+name+": "+U)}}}}}function T(w,h){if(typeof h!="object")return[[w,h]];var u=[];for(var A in h){var x=h[A],z=w;parseInt(A)+""===A?z+="["+A+"]":z+="."+A,typeof x=="object"?u.push.apply(u,T(z,x)):u.push([z,x])}return u}function S(w){switch(w){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var h=w.indexOf("vec");if(0<=h&&h<=1&&w.length===4+h){var u=w.charCodeAt(w.length-1)-48;if(u<2||u>4)throw new r("","Invalid data type");return w.charAt(0)==="b"?o(u,!1):o(u,0)}else if(w.indexOf("mat")===0&&w.length===4){var u=w.charCodeAt(w.length-1)-48;if(u<2||u>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+w);return o(u*u,0)}else throw new r("","Unknown uniform data type for "+name+": "+w)}}function M(w,h,u){if(typeof u=="object"){var A=C(u);Object.defineProperty(w,h,{get:a(A),set:i(u),enumerable:!0,configurable:!1})}else v[u]?Object.defineProperty(w,h,{get:m(u),set:i(u),enumerable:!0,configurable:!1}):w[h]=S(f[u].type)}function C(w){var h;if(Array.isArray(w)){h=new Array(w.length);for(var u=0;u1){f[0]in c||(c[f[0]]=[]),c=c[f[0]];for(var v=1;v1)for(var T=0;T"u"?t(606):WeakMap,o=new a,s=0;function c(M,C,_,w,h,u,A){this.id=M,this.src=C,this.type=_,this.shader=w,this.count=u,this.programs=[],this.cache=A}c.prototype.dispose=function(){if(--this.count===0){for(var M=this.cache,C=M.gl,_=this.programs,w=0,h=_.length;w0)for(var G=0;G<$;G++){var X=(G+1)%$;x.push(O[G],D[G],D[X],D[X],O[X],O[G]),I.push(U,j,j,j,U,U),B.push(F,P,P,P,F,F);var K=x.length;z.push([K-6,K-5,K-4],[K-3,K-2,K-1])}var H=O;O=D,D=H;var Y=U;U=j,j=Y;var q=F;F=P,P=q}return{positions:x,cells:z,vectors:I,vertexIntensity:B}},s=function(M,C,_,T){for(var f=0,u=0;uC)return T-1}return T},m=function(M,C,_){return M_?_:M},h=function(M,C,_){var T=C.vectors,f=C.meshgrid,u=M[0],A=M[1],x=M[2],z=f[0].length,I=f[1].length,O=f[2].length,D=c(f[0],u),B=c(f[1],A),F=c(f[2],x),P=D+1,j=B+1,U=F+1;if(D=m(D,0,z-1),P=m(P,0,z-1),B=m(B,0,I-1),j=m(j,0,I-1),F=m(F,0,O-1),U=m(U,0,O-1),D<0||B<0||F<0||P>z-1||j>I-1||U>O-1)return n.create();var $=f[0][D],Q=f[0][P],re=f[1][B],ne=f[1][j],se=f[2][F],G=f[2][U],X=(u-$)/(Q-$),K=(A-re)/(ne-re),H=(x-se)/(G-se);isFinite(X)||(X=.5),isFinite(K)||(K=.5),isFinite(H)||(H=.5);var Y,q,Z,ee,ae,he;switch(_.reversedX&&(D=z-1-D,P=z-1-P),_.reversedY&&(B=I-1-B,j=I-1-j),_.reversedZ&&(F=O-1-F,U=O-1-U),_.filled){case 5:ae=F,he=U,Z=B*O,ee=j*O,Y=D*O*I,q=P*O*I;break;case 4:ae=F,he=U,Y=D*O,q=P*O,Z=B*O*z,ee=j*O*z;break;case 3:Z=B,ee=j,ae=F*I,he=U*I,Y=D*I*O,q=P*I*O;break;case 2:Z=B,ee=j,Y=D*I,q=P*I,ae=F*I*z,he=U*I*z;break;case 1:Y=D,q=P,ae=F*z,he=U*z,Z=B*z*O,ee=j*z*O;break;default:Y=D,q=P,Z=B*z,ee=j*z,ae=F*z*I,he=U*z*I;break}var xe=T[Y+Z+ae],we=T[Y+Z+he],Me=T[Y+ee+ae],Se=T[Y+ee+he],Ie=T[q+Z+ae],Ve=T[q+Z+he],Ge=T[q+ee+ae],ke=T[q+ee+he],_e=n.create(),ce=n.create(),ve=n.create(),le=n.create();n.lerp(_e,xe,Ie,X),n.lerp(ce,we,Ve,X),n.lerp(ve,Me,Ge,X),n.lerp(le,Se,ke,X);var Ae=n.create(),Be=n.create();n.lerp(Ae,_e,ve,K),n.lerp(Be,ce,le,K);var Xe=n.create();return n.lerp(Xe,Ae,Be,H),Xe},v=function(M,C){var _=C[0],T=C[1],f=C[2];return M[0]=_<0?-_:_,M[1]=T<0?-T:T,M[2]=f<0?-f:f,M},g=function(M){var C=1/0;M.sort(function(u,A){return u-A});for(var _=M.length,T=1;T<_;T++){var f=Math.abs(M[T]-M[T-1]);fP||kej||_eU)},Q=n.distance(C[0],C[1]),re=10*Q/T,ne=re*re,se=1,G=0,X=_.length;X>1&&(se=i(_));for(var K=0;KG&&(G=xe),ae.push(xe),O.push({points:Y,velocities:q,divergences:ae});for(var we=0;wene&&n.scale(Me,Me,re/Math.sqrt(Se)),n.add(Me,Me,H),Z=z(Me),n.squaredDistance(ee,Me)-ne>-1e-4*ne){Y.push(Me),ee=Me,q.push(Z);var he=I(Me,Z),xe=n.length(he);isFinite(xe)&&xe>G&&(G=xe),ae.push(xe)}H=Me}}var Ie=s(O,M.colormap,G,se);return u?Ie.tubeScale=u:(G===0&&(G=1),Ie.tubeScale=f*.5*se/G),Ie};var w=t(6740),S=t(6405).createMesh;l.exports.createTubeMesh=function(M,C){return S(M,C,{shaders:w,traceType:"streamtube"})}},990:function(l,e,t){var n=t(9405),r=t(3236),a=r([`precision highp float; +}`]);e.meshShader={vertex:r,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815(l,e,t){"use strict";var n=t(2931),r=t(9970),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(M,C,_,w){for(var h=M.points,u=M.velocities,A=M.divergences,x=[],z=[],I=[],O=[],D=[],B=[],F=0,P=0,j=r.create(),U=r.create(),$=8,Q=0;Q0)for(var V=0;V<$;V++){var Z=(V+1)%$;x.push(O[V],D[V],D[Z],D[Z],O[Z],O[V]),I.push(U,j,j,j,U,U),B.push(F,P,P,P,F,F);var K=x.length;z.push([K-6,K-5,K-4],[K-3,K-2,K-1])}var H=O;O=D,D=H;var X=U;U=j,j=X;var q=F;F=P,P=q}return{positions:x,cells:z,vectors:I,vertexIntensity:B}},s=function(M,C,_,w){for(var h=0,u=0;uC)return w-1}return w},g=function(M,C,_){return M_?_:M},f=function(M,C,_){var w=C.vectors,h=C.meshgrid,u=M[0],A=M[1],x=M[2],z=h[0].length,I=h[1].length,O=h[2].length,D=c(h[0],u),B=c(h[1],A),F=c(h[2],x),P=D+1,j=B+1,U=F+1;if(D=g(D,0,z-1),P=g(P,0,z-1),B=g(B,0,I-1),j=g(j,0,I-1),F=g(F,0,O-1),U=g(U,0,O-1),D<0||B<0||F<0||P>z-1||j>I-1||U>O-1)return n.create();var $=h[0][D],Q=h[0][P],re=h[1][B],ne=h[1][j],se=h[2][F],V=h[2][U],Z=(u-$)/(Q-$),K=(A-re)/(ne-re),H=(x-se)/(V-se);isFinite(Z)||(Z=.5),isFinite(K)||(K=.5),isFinite(H)||(H=.5);var X,q,W,ee,ae,he;switch(_.reversedX&&(D=z-1-D,P=z-1-P),_.reversedY&&(B=I-1-B,j=I-1-j),_.reversedZ&&(F=O-1-F,U=O-1-U),_.filled){case 5:ae=F,he=U,W=B*O,ee=j*O,X=D*O*I,q=P*O*I;break;case 4:ae=F,he=U,X=D*O,q=P*O,W=B*O*z,ee=j*O*z;break;case 3:W=B,ee=j,ae=F*I,he=U*I,X=D*I*O,q=P*I*O;break;case 2:W=B,ee=j,X=D*I,q=P*I,ae=F*I*z,he=U*I*z;break;case 1:X=D,q=P,ae=F*z,he=U*z,W=B*z*O,ee=j*z*O;break;default:X=D,q=P,W=B*z,ee=j*z,ae=F*z*I,he=U*z*I;break}var xe=w[X+W+ae],we=w[X+W+he],Me=w[X+ee+ae],Se=w[X+ee+he],Ie=w[q+W+ae],Ge=w[q+W+he],qe=w[q+ee+ae],ke=w[q+ee+he],_e=n.create(),ue=n.create(),ve=n.create(),le=n.create();n.lerp(_e,xe,Ie,Z),n.lerp(ue,we,Ge,Z),n.lerp(ve,Me,qe,Z),n.lerp(le,Se,ke,Z);var Ae=n.create(),Be=n.create();n.lerp(Ae,_e,ve,K),n.lerp(Be,ue,le,K);var Xe=n.create();return n.lerp(Xe,Ae,Be,H),Xe},v=function(M,C){var _=C[0],w=C[1],h=C[2];return M[0]=_<0?-_:_,M[1]=w<0?-w:w,M[2]=h<0?-h:h,M},m=function(M){var C=1/0;M.sort(function(u,A){return u-A});for(var _=M.length,w=1;w<_;w++){var h=Math.abs(M[w]-M[w-1]);hP||kej||_eU)},Q=n.distance(C[0],C[1]),re=10*Q/w,ne=re*re,se=1,V=0,Z=_.length;Z>1&&(se=i(_));for(var K=0;KV&&(V=xe),ae.push(xe),O.push({points:X,velocities:q,divergences:ae});for(var we=0;wene&&n.scale(Me,Me,re/Math.sqrt(Se)),n.add(Me,Me,H),W=z(Me),n.squaredDistance(ee,Me)-ne>-1e-4*ne){X.push(Me),ee=Me,q.push(W);var he=I(Me,W),xe=n.length(he);isFinite(xe)&&xe>V&&(V=xe),ae.push(xe)}H=Me}}var Ie=s(O,M.colormap,V,se);return u?Ie.tubeScale=u:(V===0&&(V=1),Ie.tubeScale=h*.5*se/V),Ie};var T=t(6740),S=t(6405).createMesh;l.exports.createTubeMesh=function(M,C){return S(M,C,{shaders:T,traceType:"streamtube"})}},990(l,e,t){var n=t(9405),r=t(3236),a=r([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; @@ -1988,13 +1988,13 @@ void main() { vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } -`]);e.createShader=function(m){var h=n(m,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},e.createPickShader=function(m){var h=n(m,a,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},e.createContourShader=function(m){var h=n(m,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h},e.createPickContourShader=function(m){var h=n(m,s,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h}},9499:function(l,e,t){"use strict";l.exports=Y;var n=t(8828),r=t(2762),a=t(8116),o=t(7766),s=t(1888),c=t(6729),m=t(5298),h=t(9994),v=t(9618),g=t(3711),i=t(6760),w=t(7608),S=t(2478),M=t(6199),C=t(990),_=C.createShader,T=C.createContourShader,f=C.createPickShader,u=C.createPickContourShader,A=4*10,x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],z=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],I=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var q=0;q<3;++q){var Z=I[q],ee=(q+1)%3,ae=(q+2)%3;Z[ee+0]=1,Z[ae+3]=1,Z[q+6]=1}})();function O(q,Z,ee,ae,he){this.position=q,this.index=Z,this.uv=ee,this.level=ae,this.dataCoordinate=he}var D=256;function B(q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve,Ge,ke,_e,ce){this.gl=q,this.shape=Z,this.bounds=ee,this.objectOffset=ce,this.intensityBounds=[],this._shader=ae,this._pickShader=he,this._coordinateBuffer=xe,this._vao=we,this._colorMap=Me,this._contourShader=Se,this._contourPickShader=Ie,this._contourBuffer=Ve,this._contourVAO=Ge,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new O([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=ke,this._dynamicVAO=_e,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[v(s.mallocFloat(1024),[0,0]),v(s.mallocFloat(1024),[0,0]),v(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var F=B.prototype;F.genColormap=function(q,Z){var ee=!1,ae=h([c({colormap:q,nshades:D,format:"rgba"}).map(function(he,xe){var we=Z?P(xe/255,Z):he[3];return we<1&&(ee=!0),[he[0],he[1],he[2],255*we]})]);return m.divseq(ae,255),this.hasAlphaScale=ee,ae},F.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},F.isOpaque=function(){return!this.isTransparent()},F.pickSlots=1,F.setPickBase=function(q){this.pickId=q};function P(q,Z){if(!Z||!Z.length)return 1;for(var ee=0;eeq&&ee>0){var ae=(Z[ee][0]-q)/(Z[ee][0]-Z[ee-1][0]);return Z[ee][1]*(1-ae)+ae*Z[ee-1][1]}}return 1}var j=[0,0,0],U={showSurface:!1,showContour:!1,projections:[x.slice(),x.slice(),x.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function $(q,Z){var ee,ae,he,xe=Z.axes&&Z.axes.lastCubeProps.axis||j,we=Z.showSurface,Me=Z.showContour;for(ee=0;ee<3;++ee)for(we=we||Z.surfaceProject[ee],ae=0;ae<3;++ae)Me=Me||Z.contourProject[ee][ae];for(ee=0;ee<3;++ee){var Se=U.projections[ee];for(ae=0;ae<16;++ae)Se[ae]=0;for(ae=0;ae<4;++ae)Se[5*ae]=1;Se[5*ee]=0,Se[12+ee]=Z.axesBounds[+(xe[ee]>0)][ee],i(Se,q.model,Se);var Ie=U.clipBounds[ee];for(he=0;he<2;++he)for(ae=0;ae<3;++ae)Ie[he][ae]=q.clipBounds[he][ae];Ie[0][ee]=-1e8,Ie[1][ee]=1e8}return U.showSurface=we,U.showContour=Me,U}var Q={model:x,view:x,projection:x,inverseModel:x.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},re=x.slice(),ne=[1,0,0,0,1,0,0,0,1];function se(q,Z){q=q||{};var ee=this.gl;ee.disable(ee.CULL_FACE),this._colorMap.bind(0);var ae=Q;ae.model=q.model||x,ae.view=q.view||x,ae.projection=q.projection||x,ae.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ae.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ae.objectOffset=this.objectOffset,ae.contourColor=this.contourColor[0],ae.inverseModel=w(ae.inverseModel,ae.model);for(var he=0;he<2;++he)for(var xe=ae.clipBounds[he],we=0;we<3;++we)xe[we]=Math.min(Math.max(this.clipBounds[he][we],-1e8),1e8);ae.kambient=this.ambientLight,ae.kdiffuse=this.diffuseLight,ae.kspecular=this.specularLight,ae.roughness=this.roughness,ae.fresnel=this.fresnel,ae.opacity=this.opacity,ae.height=0,ae.permutation=ne,ae.vertexColor=this.vertexColor;var Me=re;for(i(Me,ae.view,ae.model),i(Me,ae.projection,Me),w(Me,Me),he=0;he<3;++he)ae.eyePosition[he]=Me[12+he]/Me[15];var Se=Me[15];for(he=0;he<3;++he)Se+=this.lightPosition[he]*Me[4*he+3];for(he=0;he<3;++he){var Ie=Me[12+he];for(we=0;we<3;++we)Ie+=Me[4*we+he]*this.lightPosition[we];ae.lightPosition[he]=Ie/Se}var Ve=$(ae,this);if(Ve.showSurface){for(this._shader.bind(),this._shader.uniforms=ae,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ee.TRIANGLES,this._vertexCount),he=0;he<3;++he)!this.surfaceProject[he]||!this.vertexCount||(this._shader.uniforms.model=Ve.projections[he],this._shader.uniforms.clipBounds=Ve.clipBounds[he],this._vao.draw(ee.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ve.showContour){var Ge=this._contourShader;ae.kambient=1,ae.kdiffuse=0,ae.kspecular=0,ae.opacity=1,Ge.bind(),Ge.uniforms=ae;var ke=this._contourVAO;for(ke.bind(),he=0;he<3;++he)for(Ge.uniforms.permutation=I[he],ee.lineWidth(this.contourWidth[he]*this.pixelRatio),we=0;we>4)/16)/255,he=Math.floor(ae),xe=ae-he,we=Z[1]*(q.value[1]+(q.value[2]&15)/16)/255,Me=Math.floor(we),Se=we-Me;he+=1,Me+=1;var Ie=ee.position;Ie[0]=Ie[1]=Ie[2]=0;for(var Ve=0;Ve<2;++Ve)for(var Ge=Ve?xe:1-xe,ke=0;ke<2;++ke)for(var _e=ke?Se:1-Se,ce=he+Ve,ve=Me+ke,le=Ge*_e,Ae=0;Ae<3;++Ae)Ie[Ae]+=this._field[Ae].get(ce,ve)*le;for(var Be=this._pickResult.level,Xe=0;Xe<3;++Xe)if(Be[Xe]=S.le(this.contourLevels[Xe],Ie[Xe]),Be[Xe]<0)this.contourLevels[Xe].length>0&&(Be[Xe]=0);else if(Be[Xe]Math.abs(yt-Ie[Xe])&&(Be[Xe]+=1)}for(ee.index[0]=xe<.5?he:he+1,ee.index[1]=Se<.5?Me:Me+1,ee.uv[0]=ae/Z[0],ee.uv[1]=we/Z[1],Ae=0;Ae<3;++Ae)ee.dataCoordinate[Ae]=this._field[Ae].get(ee.index[0],ee.index[1]);return ee},F.padField=function(q,Z){var ee=Z.shape.slice(),ae=q.shape.slice();m.assign(q.lo(1,1).hi(ee[0],ee[1]),Z),m.assign(q.lo(1).hi(ee[0],1),Z.hi(ee[0],1)),m.assign(q.lo(1,ae[1]-1).hi(ee[0],1),Z.lo(0,ee[1]-1).hi(ee[0],1)),m.assign(q.lo(0,1).hi(1,ee[1]),Z.hi(1)),m.assign(q.lo(ae[0]-1,1).hi(1,ee[1]),Z.lo(ee[0]-1)),q.set(0,0,Z.get(0,0)),q.set(0,ae[1]-1,Z.get(0,ee[1]-1)),q.set(ae[0]-1,0,Z.get(ee[0]-1,0)),q.set(ae[0]-1,ae[1]-1,Z.get(ee[0]-1,ee[1]-1))};function X(q,Z){return Array.isArray(q)?[Z(q[0]),Z(q[1]),Z(q[2])]:[Z(q),Z(q),Z(q)]}function K(q){return Array.isArray(q)?q.length===3?[q[0],q[1],q[2],1]:[q[0],q[1],q[2],q[3]]:[0,0,0,1]}function H(q){if(Array.isArray(q)){if(Array.isArray(q))return[K(q[0]),K(q[1]),K(q[2])];var Z=K(q);return[Z.slice(),Z.slice(),Z.slice()]}}F.update=function(q){q=q||{},this.objectOffset=q.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in q&&(this.contourWidth=X(q.contourWidth,Number)),"showContour"in q&&(this.showContour=X(q.showContour,Boolean)),"showSurface"in q&&(this.showSurface=!!q.showSurface),"contourTint"in q&&(this.contourTint=X(q.contourTint,Boolean)),"contourColor"in q&&(this.contourColor=H(q.contourColor)),"contourProject"in q&&(this.contourProject=X(q.contourProject,function(on){return X(on,Boolean)})),"surfaceProject"in q&&(this.surfaceProject=q.surfaceProject),"dynamicColor"in q&&(this.dynamicColor=H(q.dynamicColor)),"dynamicTint"in q&&(this.dynamicTint=X(q.dynamicTint,Number)),"dynamicWidth"in q&&(this.dynamicWidth=X(q.dynamicWidth,Number)),"opacity"in q&&(this.opacity=q.opacity),"opacityscale"in q&&(this.opacityscale=q.opacityscale),"colorBounds"in q&&(this.colorBounds=q.colorBounds),"vertexColor"in q&&(this.vertexColor=q.vertexColor?1:0),"colormap"in q&&this._colorMap.setPixels(this.genColormap(q.colormap,this.opacityscale));var Z=q.field||q.coords&&q.coords[2]||null,ee=!1;if(Z||(this._field[2].shape[0]||this._field[2].shape[2]?Z=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Z=this._field[2].hi(0,0)),"field"in q||"coords"in q){var ae=(Z.shape[0]+2)*(Z.shape[1]+2);ae>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(ae))),this._field[2]=v(this._field[2].data,[Z.shape[0]+2,Z.shape[1]+2]),this.padField(this._field[2],Z),this.shape=Z.shape.slice();for(var he=this.shape,xe=0;xe<2;++xe)this._field[2].size>this._field[xe].data.length&&(s.freeFloat(this._field[xe].data),this._field[xe].data=s.mallocFloat(this._field[2].size)),this._field[xe]=v(this._field[xe].data,[he[0]+2,he[1]+2]);if(q.coords){var we=q.coords;if(!Array.isArray(we)||we.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(xe=0;xe<2;++xe){var Me=we[xe];for(ke=0;ke<2;++ke)if(Me.shape[ke]!==he[ke])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[xe],Me)}}else if(q.ticks){var Se=q.ticks;if(!Array.isArray(Se)||Se.length!==2)throw new Error("gl-surface: invalid ticks");for(xe=0;xe<2;++xe){var Ie=Se[xe];if((Array.isArray(Ie)||Ie.length)&&(Ie=v(Ie)),Ie.shape[0]!==he[xe])throw new Error("gl-surface: invalid tick length");var Ve=v(Ie.data,he);Ve.stride[xe]=Ie.stride[0],Ve.stride[xe^1]=0,this.padField(this._field[xe],Ve)}}else{for(xe=0;xe<2;++xe){var Ge=[0,0];Ge[xe]=1,this._field[xe]=v(this._field[xe].data,[he[0]+2,he[1]+2],Ge,0)}this._field[0].set(0,0,0);for(var ke=0;ke0){for(var li=0;li<5;++li)Vt.pop();De-=1}continue e}}}Yt.push(De)}this._contourOffsets[Ht]=Kr,this._contourCounts[Ht]=Yt}var Yn=s.mallocFloat(Vt.length);for(xe=0;xeO||z<0||z>O)throw new Error("gl-texture2d: Invalid texture size");return A._shape=[x,z],A.bind(),I.texImage2D(I.TEXTURE_2D,0,A.format,x,z,0,A.format,A.type,null),A._mipLevels=[0],A}function i(A,x,z,I,O,D){this.gl=A,this.handle=x,this.format=O,this.type=D,this._shape=[z,I],this._mipLevels=[0],this._magFilter=A.NEAREST,this._minFilter=A.NEAREST,this._wrapS=A.CLAMP_TO_EDGE,this._wrapT=A.CLAMP_TO_EDGE,this._anisoSamples=1;var B=this,F=[this._wrapS,this._wrapT];Object.defineProperties(F,[{get:function(){return B._wrapS},set:function(j){return B.wrapS=j}},{get:function(){return B._wrapT},set:function(j){return B.wrapT=j}}]),this._wrapVector=F;var P=[this._shape[0],this._shape[1]];Object.defineProperties(P,[{get:function(){return B._shape[0]},set:function(j){return B.width=j}},{get:function(){return B._shape[1]},set:function(j){return B.height=j}}]),this._shapeVector=P}var w=i.prototype;Object.defineProperties(w,{minFilter:{get:function(){return this._minFilter},set:function(A){this.bind();var x=this.gl;if(this.type===x.FLOAT&&o.indexOf(A)>=0&&(x.getExtension("OES_texture_float_linear")||(A=x.NEAREST)),s.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MIN_FILTER,A),this._minFilter=A}},magFilter:{get:function(){return this._magFilter},set:function(A){this.bind();var x=this.gl;if(this.type===x.FLOAT&&o.indexOf(A)>=0&&(x.getExtension("OES_texture_float_linear")||(A=x.NEAREST)),s.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MAG_FILTER,A),this._magFilter=A}},mipSamples:{get:function(){return this._anisoSamples},set:function(A){var x=this._anisoSamples;if(this._anisoSamples=Math.max(A,1)|0,x!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(A){if(this.bind(),c.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,A),this._wrapS=A}},wrapT:{get:function(){return this._wrapT},set:function(A){if(this.bind(),c.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,A),this._wrapT=A}},wrap:{get:function(){return this._wrapVector},set:function(A){if(Array.isArray(A)||(A=[A,A]),A.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var x=0;x<2;++x)if(c.indexOf(A[x])<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);this._wrapS=A[0],this._wrapT=A[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),A}},shape:{get:function(){return this._shapeVector},set:function(A){if(!Array.isArray(A))A=[A|0,A|0];else if(A.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return g(this,A[0]|0,A[1]|0),[A[0]|0,A[1]|0]}},width:{get:function(){return this._shape[0]},set:function(A){return A=A|0,g(this,A,this._shape[1]),A}},height:{get:function(){return this._shape[1]},set:function(A){return A=A|0,g(this,this._shape[0],A),A}}}),w.bind=function(A){var x=this.gl;return A!==void 0&&x.activeTexture(x.TEXTURE0+(A|0)),x.bindTexture(x.TEXTURE_2D,this.handle),A!==void 0?A|0:x.getParameter(x.ACTIVE_TEXTURE)-x.TEXTURE0},w.dispose=function(){this.gl.deleteTexture(this.handle)},w.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var A=Math.min(this._shape[0],this._shape[1]),x=0;A>0;++x,A>>>=1)this._mipLevels.indexOf(x)<0&&this._mipLevels.push(x)},w.setPixels=function(A,x,z,I){var O=this.gl;this.bind(),Array.isArray(x)?(I=z,z=x[1]|0,x=x[0]|0):(x=x||0,z=z||0),I=I||0;var D=h(A)?A:A.raw;if(D){var B=this._mipLevels.indexOf(I)<0;B?(O.texImage2D(O.TEXTURE_2D,0,this.format,this.format,this.type,D),this._mipLevels.push(I)):O.texSubImage2D(O.TEXTURE_2D,I,x,z,this.format,this.type,D)}else if(A.shape&&A.stride&&A.data){if(A.shape.length<2||x+A.shape[1]>this._shape[1]>>>I||z+A.shape[0]>this._shape[0]>>>I||x<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");M(O,x,z,I,this.format,this.type,this._mipLevels,A)}else throw new Error("gl-texture2d: Unsupported data type")};function S(A,x){return A.length===3?x[2]===1&&x[1]===A[0]*A[2]&&x[0]===A[2]:x[0]===1&&x[1]===A[0]}function M(A,x,z,I,O,D,B,F){var P=F.dtype,j=F.shape.slice();if(j.length<2||j.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var U=0,$=0,Q=S(j,F.stride.slice());P==="float32"?U=A.FLOAT:P==="float64"?(U=A.FLOAT,Q=!1,P="float32"):P==="uint8"?U=A.UNSIGNED_BYTE:(U=A.UNSIGNED_BYTE,Q=!1,P="uint8");var re=1;if(j.length===2)$=A.LUMINANCE,j=[j[0],j[1],1],F=n(F.data,j,[F.stride[0],F.stride[1],1],F.offset);else if(j.length===3){if(j[2]===1)$=A.ALPHA;else if(j[2]===2)$=A.LUMINANCE_ALPHA;else if(j[2]===3)$=A.RGB;else if(j[2]===4)$=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");re=j[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if(($===A.LUMINANCE||$===A.ALPHA)&&(O===A.LUMINANCE||O===A.ALPHA)&&($=O),$!==O)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ne=F.size,se=B.indexOf(I)<0;if(se&&B.push(I),U===D&&Q)F.offset===0&&F.data.length===ne?se?A.texImage2D(A.TEXTURE_2D,I,O,j[0],j[1],0,O,D,F.data):A.texSubImage2D(A.TEXTURE_2D,I,x,z,j[0],j[1],O,D,F.data):se?A.texImage2D(A.TEXTURE_2D,I,O,j[0],j[1],0,O,D,F.data.subarray(F.offset,F.offset+ne)):A.texSubImage2D(A.TEXTURE_2D,I,x,z,j[0],j[1],O,D,F.data.subarray(F.offset,F.offset+ne));else{var G;D===A.FLOAT?G=a.mallocFloat32(ne):G=a.mallocUint8(ne);var X=n(G,j,[j[2],j[2]*j[0],1]);U===A.FLOAT&&D===A.UNSIGNED_BYTE?v(X,F):r.assign(X,F),se?A.texImage2D(A.TEXTURE_2D,I,O,j[0],j[1],0,O,D,G.subarray(0,ne)):A.texSubImage2D(A.TEXTURE_2D,I,x,z,j[0],j[1],O,D,G.subarray(0,ne)),D===A.FLOAT?a.freeFloat32(G):a.freeUint8(G)}}function C(A){var x=A.createTexture();return A.bindTexture(A.TEXTURE_2D,x),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE),x}function _(A,x,z,I,O){var D=A.getParameter(A.MAX_TEXTURE_SIZE);if(x<0||x>D||z<0||z>D)throw new Error("gl-texture2d: Invalid texture shape");if(O===A.FLOAT&&!A.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var B=C(A);return A.texImage2D(A.TEXTURE_2D,0,I,x,z,0,I,O,null),new i(A,B,x,z,I,O)}function T(A,x,z,I,O,D){var B=C(A);return A.texImage2D(A.TEXTURE_2D,0,O,O,D,x),new i(A,B,z,I,O,D)}function f(A,x){var z=x.dtype,I=x.shape.slice(),O=A.getParameter(A.MAX_TEXTURE_SIZE);if(I[0]<0||I[0]>O||I[1]<0||I[1]>O)throw new Error("gl-texture2d: Invalid texture size");var D=S(I,x.stride.slice()),B=0;z==="float32"?B=A.FLOAT:z==="float64"?(B=A.FLOAT,D=!1,z="float32"):z==="uint8"?B=A.UNSIGNED_BYTE:(B=A.UNSIGNED_BYTE,D=!1,z="uint8");var F=0;if(I.length===2)F=A.LUMINANCE,I=[I[0],I[1],1],x=n(x.data,I,[x.stride[0],x.stride[1],1],x.offset);else if(I.length===3)if(I[2]===1)F=A.ALPHA;else if(I[2]===2)F=A.LUMINANCE_ALPHA;else if(I[2]===3)F=A.RGB;else if(I[2]===4)F=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");B===A.FLOAT&&!A.getExtension("OES_texture_float")&&(B=A.UNSIGNED_BYTE,D=!1);var P,j,U=x.size;if(D)x.offset===0&&x.data.length===U?P=x.data:P=x.data.subarray(x.offset,x.offset+U);else{var $=[I[2],I[2]*I[0],1];j=a.malloc(U,z);var Q=n(j,I,$,0);(z==="float32"||z==="float64")&&B===A.UNSIGNED_BYTE?v(Q,x):r.assign(Q,x),P=j.subarray(0,U)}var re=C(A);return A.texImage2D(A.TEXTURE_2D,0,F,I[0],I[1],0,F,B,P),D||a.free(j),new i(A,re,I[0],I[1],F,B)}function u(A){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(o||m(A),typeof arguments[1]=="number")return _(A,arguments[1],arguments[2],arguments[3]||A.RGBA,arguments[4]||A.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return _(A,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var x=arguments[1],z=h(x)?x:x.raw;if(z)return T(A,z,x.width|0,x.height|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(x.shape&&x.data&&x.stride)return f(A,x)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(l){"use strict";function e(t,n,r){n?n.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var a=t.getParameter(t.MAX_VERTEX_ATTRIBS)|0;if(r){if(r.length>a)throw new Error("gl-vao: Too many vertex attributes");for(var o=0;o1?0:Math.acos(v)}},9226:function(l){l.exports=e;function e(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}},3126:function(l){l.exports=e;function e(t){var n=new Float32Array(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}},3990:function(l){l.exports=e;function e(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}},1091:function(l){l.exports=e;function e(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},5911:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],m=r[1],h=r[2];return t[0]=o*h-s*m,t[1]=s*c-a*h,t[2]=a*m-o*c,t}},5455:function(l,e,t){l.exports=t(7056)},7056:function(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(r*r+a*a+o*o)}},4008:function(l,e,t){l.exports=t(6690)},6690:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t}},244:function(l){l.exports=e;function e(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}},2613:function(l){l.exports=1e-6},9922:function(l,e,t){l.exports=r;var n=t(2613);function r(a,o){var s=a[0],c=a[1],m=a[2],h=o[0],v=o[1],g=o[2];return Math.abs(s-h)<=n*Math.max(1,Math.abs(s),Math.abs(h))&&Math.abs(c-v)<=n*Math.max(1,Math.abs(c),Math.abs(v))&&Math.abs(m-g)<=n*Math.max(1,Math.abs(m),Math.abs(g))}},9265:function(l){l.exports=e;function e(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}},2681:function(l){l.exports=e;function e(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}},5137:function(l,e,t){l.exports=r;var n=t(1091)();function r(a,o,s,c,m,h){var v,g;for(o||(o=3),s||(s=0),c?g=Math.min(c*o+s,a.length):g=a.length,v=s;v0&&(s=1/Math.sqrt(s),t[0]=n[0]*s,t[1]=n[1]*s,t[2]=n[2]*s),t}},7636:function(l){l.exports=e;function e(t,n){n=n||1;var r=Math.random()*2*Math.PI,a=Math.random()*2-1,o=Math.sqrt(1-a*a)*n;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=a*n,t}},6894:function(l){l.exports=e;function e(t,n,r,a){var o=r[1],s=r[2],c=n[1]-o,m=n[2]-s,h=Math.sin(a),v=Math.cos(a);return t[0]=n[0],t[1]=o+c*v-m*h,t[2]=s+c*h+m*v,t}},109:function(l){l.exports=e;function e(t,n,r,a){var o=r[0],s=r[2],c=n[0]-o,m=n[2]-s,h=Math.sin(a),v=Math.cos(a);return t[0]=o+m*h+c*v,t[1]=n[1],t[2]=s+m*v-c*h,t}},8692:function(l){l.exports=e;function e(t,n,r,a){var o=r[0],s=r[1],c=n[0]-o,m=n[1]-s,h=Math.sin(a),v=Math.cos(a);return t[0]=o+c*v-m*h,t[1]=s+c*h+m*v,t[2]=n[2],t}},2447:function(l){l.exports=e;function e(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}},6621:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t}},8489:function(l){l.exports=e;function e(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t}},1463:function(l){l.exports=e;function e(t,n,r,a){return t[0]=n,t[1]=r,t[2]=a,t}},6141:function(l,e,t){l.exports=t(2953)},5486:function(l,e,t){l.exports=t(3066)},2953:function(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return r*r+a*a+o*o}},3066:function(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2];return n*n+r*r+a*a}},2229:function(l,e,t){l.exports=t(6843)},6843:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t}},492:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2];return t[0]=a*r[0]+o*r[3]+s*r[6],t[1]=a*r[1]+o*r[4]+s*r[7],t[2]=a*r[2]+o*r[5]+s*r[8],t}},5673:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[3]*a+r[7]*o+r[11]*s+r[15];return c=c||1,t[0]=(r[0]*a+r[4]*o+r[8]*s+r[12])/c,t[1]=(r[1]*a+r[5]*o+r[9]*s+r[13])/c,t[2]=(r[2]*a+r[6]*o+r[10]*s+r[14])/c,t}},264:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],m=r[1],h=r[2],v=r[3],g=v*a+m*s-h*o,i=v*o+h*a-c*s,w=v*s+c*o-m*a,S=-c*a-m*o-h*s;return t[0]=g*v+S*-c+i*-h-w*-m,t[1]=i*v+S*-m+w*-c-g*-h,t[2]=w*v+S*-h+g*-m-i*-c,t}},4361:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t}},2335:function(l){l.exports=e;function e(t){var n=new Float32Array(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n}},2933:function(l){l.exports=e;function e(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}},7536:function(l){l.exports=e;function e(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},4691:function(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=n[3]-t[3];return Math.sqrt(r*r+a*a+o*o+s*s)}},1373:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t[3]=n[3]/r[3],t}},3750:function(l){l.exports=e;function e(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}},3390:function(l){l.exports=e;function e(t,n,r,a){var o=new Float32Array(4);return o[0]=t,o[1]=n,o[2]=r,o[3]=a,o}},9970:function(l,e,t){l.exports={create:t(7536),clone:t(2335),fromValues:t(3390),copy:t(2933),set:t(4578),add:t(4361),subtract:t(6860),multiply:t(3576),divide:t(1373),min:t(2334),max:t(160),scale:t(9288),scaleAndAdd:t(4844),distance:t(4691),squaredDistance:t(7960),length:t(6808),squaredLength:t(483),negate:t(1498),inverse:t(4494),normalize:t(5177),dot:t(3750),lerp:t(2573),random:t(9131),transformMat4:t(5352),transformQuat:t(4041)}},4494:function(l){l.exports=e;function e(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t}},6808:function(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2],o=t[3];return Math.sqrt(n*n+r*r+a*a+o*o)}},2573:function(l){l.exports=e;function e(t,n,r,a){var o=n[0],s=n[1],c=n[2],m=n[3];return t[0]=o+a*(r[0]-o),t[1]=s+a*(r[1]-s),t[2]=c+a*(r[2]-c),t[3]=m+a*(r[3]-m),t}},160:function(l){l.exports=e;function e(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t[3]=Math.max(n[3],r[3]),t}},2334:function(l){l.exports=e;function e(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t[3]=Math.min(n[3],r[3]),t}},3576:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t[3]=n[3]*r[3],t}},1498:function(l){l.exports=e;function e(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t}},5177:function(l){l.exports=e;function e(t,n){var r=n[0],a=n[1],o=n[2],s=n[3],c=r*r+a*a+o*o+s*s;return c>0&&(c=1/Math.sqrt(c),t[0]=r*c,t[1]=a*c,t[2]=o*c,t[3]=s*c),t}},9131:function(l,e,t){var n=t(5177),r=t(9288);l.exports=a;function a(o,s){return s=s||1,o[0]=Math.random(),o[1]=Math.random(),o[2]=Math.random(),o[3]=Math.random(),n(o,o),r(o,o,s),o}},9288:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t}},4844:function(l){l.exports=e;function e(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t[3]=n[3]+r[3]*a,t}},4578:function(l){l.exports=e;function e(t,n,r,a,o){return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t}},7960:function(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=n[3]-t[3];return r*r+a*a+o*o+s*s}},483:function(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2],o=t[3];return n*n+r*r+a*a+o*o}},6860:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t}},5352:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=n[3];return t[0]=r[0]*a+r[4]*o+r[8]*s+r[12]*c,t[1]=r[1]*a+r[5]*o+r[9]*s+r[13]*c,t[2]=r[2]*a+r[6]*o+r[10]*s+r[14]*c,t[3]=r[3]*a+r[7]*o+r[11]*s+r[15]*c,t}},4041:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],m=r[1],h=r[2],v=r[3],g=v*a+m*s-h*o,i=v*o+h*a-c*s,w=v*s+c*o-m*a,S=-c*a-m*o-h*s;return t[0]=g*v+S*-c+i*-h-w*-m,t[1]=i*v+S*-m+w*-c-g*-h,t[2]=w*v+S*-h+g*-m-i*-c,t[3]=n[3],t}},1848:function(l,e,t){var n=t(4905),r=t(6468);l.exports=a;function a(o){for(var s=Array.isArray(o)?o:n(o),c=0;c0)continue;Xe=le.slice(0,1).join("")}return ee(Xe),ne+=Xe.length,P=P.slice(Xe.length),P.length}while(!0)}function ke(){return/[^a-fA-F0-9]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function _e(){return B==="."||/[eE]/.test(B)?(P.push(B),D=S,F=B,I+1):B==="x"&&P.length===1&&P[0]==="0"?(D=u,P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function ce(){return B==="f"&&(P.push(B),F=B,I+=1),/[eE]/.test(B)||(B==="-"||B==="+")&&/[eE]/.test(F)?(P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function ve(){if(/[^\d\w_]/.test(B)){var le=P.join("");return Z[le]?D=_:q[le]?D=C:D=M,ee(P.join("")),D=c,I}return P.push(B),F=B,I+1}}},3508:function(l,e,t){var n=t(6852);n=n.slice().filter(function(r){return!/^(gl\_|texture)/.test(r)}),l.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(l){l.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(l,e,t){var n=t(620);l.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(l){l.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(l){l.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(l,e,t){var n=t(5874);l.exports=r;function r(a,o){var s=n(o),c=[];return c=c.concat(s(a)),c=c.concat(s(null)),c}},3236:function(l){l.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),n=[],r=0;r>1,g=-7,i=r?o-1:0,w=r?-1:1,S=t[n+i];for(i+=w,s=S&(1<<-g)-1,S>>=-g,g+=m;g>0;s=s*256+t[n+i],i+=w,g-=8);for(c=s&(1<<-g)-1,s>>=-g,g+=a;g>0;c=c*256+t[n+i],i+=w,g-=8);if(s===0)s=1-v;else{if(s===h)return c?NaN:(S?-1:1)*(1/0);c=c+Math.pow(2,a),s=s-v}return(S?-1:1)*c*Math.pow(2,s-a)},e.write=function(t,n,r,a,o,s){var c,m,h,v=s*8-o-1,g=(1<>1,w=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=a?0:s-1,M=a?1:-1,C=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(m=isNaN(n)?1:0,c=g):(c=Math.floor(Math.log(n)/Math.LN2),n*(h=Math.pow(2,-c))<1&&(c--,h*=2),c+i>=1?n+=w/h:n+=w*Math.pow(2,1-i),n*h>=2&&(c++,h/=2),c+i>=g?(m=0,c=g):c+i>=1?(m=(n*h-1)*Math.pow(2,o),c=c+i):(m=n*Math.pow(2,i-1)*Math.pow(2,o),c=0));o>=8;t[r+S]=m&255,S+=M,m/=256,o-=8);for(c=c<0;t[r+S]=c&255,S+=M,c/=256,v-=8);t[r+S-M]|=C*128}},8954:function(l,e,t){"use strict";l.exports=i;var n=t(3250),r=t(6803).Fw;function a(w,S,M){this.vertices=w,this.adjacent=S,this.boundary=M,this.lastVisited=-1}a.prototype.flip=function(){var w=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=w;var S=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=S};function o(w,S,M){this.vertices=w,this.cell=S,this.index=M}function s(w,S){return r(w.vertices,S.vertices)}function c(w){return function(){var S=this.tuple;return w.apply(this,S)}}function m(w){var S=n[w+1];return S||(S=n),c(S)}var h=[];function v(w,S,M){this.dimension=w,this.vertices=S,this.simplices=M,this.interior=M.filter(function(T){return!T.boundary}),this.tuple=new Array(w+1);for(var C=0;C<=w;++C)this.tuple[C]=this.vertices[C];var _=h[w];_||(_=h[w]=m(w)),this.orient=_}var g=v.prototype;g.handleBoundaryDegeneracy=function(w,S){var M=this.dimension,C=this.vertices.length-1,_=this.tuple,T=this.vertices,f=[w];for(w.lastVisited=-C;f.length>0;){w=f.pop();for(var u=w.adjacent,A=0;A<=M;++A){var x=u[A];if(!(!x.boundary||x.lastVisited<=-C)){for(var z=x.vertices,I=0;I<=M;++I){var O=z[I];O<0?_[I]=S:_[I]=T[O]}var D=this.orient();if(D>0)return x;x.lastVisited=-C,D===0&&f.push(x)}}}return null},g.walk=function(w,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,T=this.tuple,f=S?this.interior.length*Math.random()|0:this.interior.length-1,u=this.interior[f];e:for(;!u.boundary;){for(var A=u.vertices,x=u.adjacent,z=0;z<=C;++z)T[z]=_[A[z]];u.lastVisited=M;for(var z=0;z<=C;++z){var I=x[z];if(!(I.lastVisited>=M)){var O=T[z];T[z]=w;var D=this.orient();if(T[z]=O,D<0){u=I;continue e}else I.boundary?I.lastVisited=-M:I.lastVisited=M}}return}return u},g.addPeaks=function(w,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,T=this.tuple,f=this.interior,u=this.simplices,A=[S];S.lastVisited=M,S.vertices[S.vertices.indexOf(-1)]=M,S.boundary=!1,f.push(S);for(var x=[];A.length>0;){var S=A.pop(),z=S.vertices,I=S.adjacent,O=z.indexOf(M);if(!(O<0)){for(var D=0;D<=C;++D)if(D!==O){var B=I[D];if(!(!B.boundary||B.lastVisited>=M)){var F=B.vertices;if(B.lastVisited!==-M){for(var P=0,j=0;j<=C;++j)F[j]<0?(P=j,T[j]=w):T[j]=_[F[j]];var U=this.orient();if(U>0){F[P]=M,B.boundary=!1,f.push(B),A.push(B),B.lastVisited=M;continue}else B.lastVisited=-M}var $=B.adjacent,Q=z.slice(),re=I.slice(),ne=new a(Q,re,!0);u.push(ne);var se=$.indexOf(S);if(!(se<0)){$[se]=ne,re[O]=B,Q[D]=-1,re[D]=S,I[D]=ne,ne.flip();for(var j=0;j<=C;++j){var G=Q[j];if(!(G<0||G===M)){for(var X=new Array(C-1),K=0,H=0;H<=C;++H){var Y=Q[H];Y<0||H===j||(X[K++]=Y)}x.push(new o(X,ne,j))}}}}}}}x.sort(s);for(var D=0;D+1=0?f[A++]=u[z]:x=z&1;if(x===(w&1)){var I=f[0];f[0]=f[1],f[1]=I}S.push(f)}}return S};function i(w,S){var M=w.length;if(M===0)throw new Error("Must have at least d+1 points");var C=w[0].length;if(M<=C)throw new Error("Must input at least d+1 points");var _=w.slice(0,C+1),T=n.apply(void 0,_);if(T===0)throw new Error("Input not in general position");for(var f=new Array(C+1),u=0;u<=C;++u)f[u]=u;T<0&&(f[0]=1,f[1]=0);for(var A=new a(f,new Array(C+1),!1),x=A.adjacent,z=new Array(C+2),u=0;u<=C;++u){for(var I=f.slice(),O=0;O<=C;++O)O===u&&(I[O]=-1);var D=I[0];I[0]=I[1],I[1]=D;var B=new a(I,new Array(C+1),!0);x[u]=B,z[u]=B}z[C+1]=A;for(var u=0;u<=C;++u)for(var I=x[u].vertices,F=x[u].adjacent,O=0;O<=C;++O){var P=I[O];if(P<0){F[O]=A;continue}for(var j=0;j<=C;++j)x[j].vertices.indexOf(P)<0&&(F[O]=x[j])}for(var U=new v(C,_,z),$=!!S,u=C+1;u3*(z+1)?v(this,x):this.left.insert(x):this.left=T([x]);else if(x[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?v(this,x):this.right.insert(x):this.right=T([x]);else{var I=n.ge(this.leftPoints,x,C),O=n.ge(this.rightPoints,x,_);this.leftPoints.splice(I,0,x),this.rightPoints.splice(O,0,x)}},c.remove=function(x){var z=this.count-this.leftPoints;if(x[1]3*(z-1))return g(this,x);var O=this.left.remove(x);return O===o?(this.left=null,this.count-=1,a):(O===a&&(this.count-=1),O)}else if(x[0]>this.mid){if(!this.right)return r;var D=this.left?this.left.count:0;if(4*D>3*(z-1))return g(this,x);var O=this.right.remove(x);return O===o?(this.right=null,this.count-=1,a):(O===a&&(this.count-=1),O)}else{if(this.count===1)return this.leftPoints[0]===x?o:r;if(this.leftPoints.length===1&&this.leftPoints[0]===x){if(this.left&&this.right){for(var B=this,F=this.left;F.right;)B=F,F=F.right;if(B===this)F.right=this.right;else{var P=this.left,O=this.right;B.count-=F.count,B.right=F.left,F.left=P,F.right=O}m(this,F),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?m(this,this.left):m(this,this.right);return a}for(var P=n.ge(this.leftPoints,x,C);P=0&&x[O][1]>=z;--O){var D=I(x[O]);if(D)return D}}function S(x,z){for(var I=0;Ithis.mid){if(this.right){var I=this.right.queryPoint(x,z);if(I)return I}return w(this.rightPoints,x,z)}else return S(this.leftPoints,z)},c.queryInterval=function(x,z,I){if(xthis.mid&&this.right){var O=this.right.queryInterval(x,z,I);if(O)return O}return zthis.mid?w(this.rightPoints,x,I):S(this.leftPoints,I)};function M(x,z){return x-z}function C(x,z){var I=x[0]-z[0];return I||x[1]-z[1]}function _(x,z){var I=x[1]-z[1];return I||x[0]-z[0]}function T(x){if(x.length===0)return null;for(var z=[],I=0;I>1],D=[],B=[],F=[],I=0;I13)&&n!==32&&n!==133&&n!==160&&n!==5760&&n!==6158&&(n<8192||n>8205)&&n!==8232&&n!==8233&&n!==8239&&n!==8287&&n!==8288&&n!==12288&&n!==65279)return!1;return!0}},395:function(l){function e(t,n,r){return t*(1-r)+n*r}l.exports=e},2652:function(l,e,t){var n=t(4335),r=t(6864),a=t(1903),o=t(9921),s=t(7608),c=t(5665),m={length:t(1387),normalize:t(3536),dot:t(244),cross:t(5911)},h=r(),v=r(),g=[0,0,0,0],i=[[0,0,0],[0,0,0],[0,0,0]],w=[0,0,0];l.exports=function(T,f,u,A,x,z){if(f||(f=[0,0,0]),u||(u=[0,0,0]),A||(A=[0,0,0]),x||(x=[0,0,0,1]),z||(z=[0,0,0,1]),!n(h,T)||(a(v,h),v[3]=0,v[7]=0,v[11]=0,v[15]=1,Math.abs(o(v)<1e-8)))return!1;var I=h[3],O=h[7],D=h[11],B=h[12],F=h[13],P=h[14],j=h[15];if(I!==0||O!==0||D!==0){g[0]=I,g[1]=O,g[2]=D,g[3]=j;var U=s(v,v);if(!U)return!1;c(v,v),S(x,g,v)}else x[0]=x[1]=x[2]=0,x[3]=1;if(f[0]=B,f[1]=F,f[2]=P,M(i,h),u[0]=m.length(i[0]),m.normalize(i[0],i[0]),A[0]=m.dot(i[0],i[1]),C(i[1],i[1],i[0],1,-A[0]),u[1]=m.length(i[1]),m.normalize(i[1],i[1]),A[0]/=u[1],A[1]=m.dot(i[0],i[2]),C(i[2],i[2],i[0],1,-A[1]),A[2]=m.dot(i[1],i[2]),C(i[2],i[2],i[1],1,-A[2]),u[2]=m.length(i[2]),m.normalize(i[2],i[2]),A[1]/=u[2],A[2]/=u[2],m.cross(w,i[1],i[2]),m.dot(i[0],w)<0)for(var $=0;$<3;$++)u[$]*=-1,i[$][0]*=-1,i[$][1]*=-1,i[$][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+i[0][0]-i[1][1]-i[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-i[0][0]+i[1][1]-i[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-i[0][0]-i[1][1]+i[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+i[0][0]+i[1][1]+i[2][2],0)),i[2][1]>i[1][2]&&(z[0]=-z[0]),i[0][2]>i[2][0]&&(z[1]=-z[1]),i[1][0]>i[0][1]&&(z[2]=-z[2]),!0};function S(_,T,f){var u=T[0],A=T[1],x=T[2],z=T[3];return _[0]=f[0]*u+f[4]*A+f[8]*x+f[12]*z,_[1]=f[1]*u+f[5]*A+f[9]*x+f[13]*z,_[2]=f[2]*u+f[6]*A+f[10]*x+f[14]*z,_[3]=f[3]*u+f[7]*A+f[11]*x+f[15]*z,_}function M(_,T){_[0][0]=T[0],_[0][1]=T[1],_[0][2]=T[2],_[1][0]=T[4],_[1][1]=T[5],_[1][2]=T[6],_[2][0]=T[8],_[2][1]=T[9],_[2][2]=T[10]}function C(_,T,f,u,A){_[0]=T[0]*u+f[0]*A,_[1]=T[1]*u+f[1]*A,_[2]=T[2]*u+f[2]*A}},4335:function(l){l.exports=function(t,n){var r=n[15];if(r===0)return!1;for(var a=1/r,o=0;o<16;o++)t[o]=n[o]*a;return!0}},7442:function(l,e,t){var n=t(6658),r=t(7182),a=t(2652),o=t(9921),s=t(8648),c=g(),m=g(),h=g();l.exports=v;function v(S,M,C,_){if(o(M)===0||o(C)===0)return!1;var T=a(M,c.translate,c.scale,c.skew,c.perspective,c.quaternion),f=a(C,m.translate,m.scale,m.skew,m.perspective,m.quaternion);return!T||!f?!1:(n(h.translate,c.translate,m.translate,_),n(h.skew,c.skew,m.skew,_),n(h.scale,c.scale,m.scale,_),n(h.perspective,c.perspective,m.perspective,_),s(h.quaternion,c.quaternion,m.quaternion,_),r(S,h.translate,h.scale,h.skew,h.perspective,h.quaternion),!0)}function g(){return{translate:i(),scale:i(1),skew:i(),perspective:w(),quaternion:w()}}function i(S){return[S||0,S||0,S||0]}function w(){return[0,0,0,1]}},7182:function(l,e,t){var n={identity:t(7894),translate:t(7656),multiply:t(6760),create:t(6864),scale:t(2504),fromRotationTranslation:t(6743)},r=n.create(),a=n.create();l.exports=function(s,c,m,h,v,g){return n.identity(s),n.fromRotationTranslation(s,g,c),s[3]=v[0],s[7]=v[1],s[11]=v[2],s[15]=v[3],n.identity(a),h[2]!==0&&(a[9]=h[2],n.multiply(s,s,a)),h[1]!==0&&(a[9]=0,a[8]=h[1],n.multiply(s,s,a)),h[0]!==0&&(a[8]=0,a[4]=h[0],n.multiply(s,s,a)),n.scale(s,s,m),s}},1811:function(l,e,t){"use strict";var n=t(2478),r=t(7442),a=t(7608),o=t(5567),s=t(2408),c=t(7089),m=t(6582),h=t(7656),v=t(2504),g=t(3536),i=[0,0,0];l.exports=C;function w(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var S=w.prototype;S.recalcMatrix=function(_){var T=this._time,f=n.le(T,_),u=this.computedMatrix;if(!(f<0)){var A=this._components;if(f===T.length-1)for(var x=16*f,z=0;z<16;++z)u[z]=A[x++];else{for(var I=T[f+1]-T[f],x=16*f,O=this.prevMatrix,D=!0,z=0;z<16;++z)O[z]=A[x++];for(var B=this.nextMatrix,z=0;z<16;++z)B[z]=A[x++],D=D&&O[z]===B[z];if(I<1e-6||D)for(var z=0;z<16;++z)u[z]=O[z];else r(u,O,B,(_-T[f])/I)}var F=this.computedUp;F[0]=u[1],F[1]=u[5],F[2]=u[9],g(F,F);var P=this.computedInverse;a(P,u);var j=this.computedEye,U=P[15];j[0]=P[12]/U,j[1]=P[13]/U,j[2]=P[14]/U;for(var $=this.computedCenter,Q=Math.exp(this.computedRadius[0]),z=0;z<3;++z)$[z]=j[z]-u[2+4*z]*Q}},S.idle=function(_){if(!(_1&&n(a[m[i-2]],a[m[i-1]],g)<=0;)i-=1,m.pop();for(m.push(v),i=h.length;i>1&&n(a[h[i-2]],a[h[i-1]],g)>=0;)i-=1,h.pop();h.push(v)}for(var w=new Array(h.length+m.length-2),S=0,s=0,M=m.length;s0;--C)w[S++]=h[C];return w}},351:function(l,e,t){"use strict";l.exports=r;var n=t(4687);function r(a,o){o||(o=a,a=window);var s=0,c=0,m=0,h={shift:!1,alt:!1,control:!1,meta:!1},v=!1;function g(x){var z=!1;return"altKey"in x&&(z=z||x.altKey!==h.alt,h.alt=!!x.altKey),"shiftKey"in x&&(z=z||x.shiftKey!==h.shift,h.shift=!!x.shiftKey),"ctrlKey"in x&&(z=z||x.ctrlKey!==h.control,h.control=!!x.ctrlKey),"metaKey"in x&&(z=z||x.metaKey!==h.meta,h.meta=!!x.metaKey),z}function i(x,z){var I=n.x(z),O=n.y(z);"buttons"in z&&(x=z.buttons|0),(x!==s||I!==c||O!==m||g(z))&&(s=x|0,c=I||0,m=O||0,o&&o(s,c,m,h))}function w(x){i(0,x)}function S(){(s||c||m||h.shift||h.alt||h.meta||h.control)&&(c=m=0,s=0,h.shift=h.alt=h.control=h.meta=!1,o&&o(0,0,0,h))}function M(x){g(x)&&o&&o(s,c,m,h)}function C(x){n.buttons(x)===0?i(0,x):i(s,x)}function _(x){i(s|n.buttons(x),x)}function T(x){i(s&~n.buttons(x),x)}function f(){v||(v=!0,a.addEventListener("mousemove",C),a.addEventListener("mousedown",_),a.addEventListener("mouseup",T),a.addEventListener("mouseleave",w),a.addEventListener("mouseenter",w),a.addEventListener("mouseout",w),a.addEventListener("mouseover",w),a.addEventListener("blur",S),a.addEventListener("keyup",M),a.addEventListener("keydown",M),a.addEventListener("keypress",M),a!==window&&(window.addEventListener("blur",S),window.addEventListener("keyup",M),window.addEventListener("keydown",M),window.addEventListener("keypress",M)))}function u(){v&&(v=!1,a.removeEventListener("mousemove",C),a.removeEventListener("mousedown",_),a.removeEventListener("mouseup",T),a.removeEventListener("mouseleave",w),a.removeEventListener("mouseenter",w),a.removeEventListener("mouseout",w),a.removeEventListener("mouseover",w),a.removeEventListener("blur",S),a.removeEventListener("keyup",M),a.removeEventListener("keydown",M),a.removeEventListener("keypress",M),a!==window&&(window.removeEventListener("blur",S),window.removeEventListener("keyup",M),window.removeEventListener("keydown",M),window.removeEventListener("keypress",M)))}f();var A={element:a};return Object.defineProperties(A,{enabled:{get:function(){return v},set:function(x){x?f():u()},enumerable:!0},buttons:{get:function(){return s},enumerable:!0},x:{get:function(){return c},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return h},enumerable:!0}}),A}},24:function(l){var e={left:0,top:0};l.exports=t;function t(r,a,o){a=a||r.currentTarget||r.srcElement,Array.isArray(o)||(o=[0,0]);var s=r.clientX||0,c=r.clientY||0,m=n(a);return o[0]=s-m.left,o[1]=c-m.top,o}function n(r){return r===window||r===document||r===document.body?e:r.getBoundingClientRect()}},4687:function(l,e){"use strict";function t(o){if(typeof o=="object"){if("buttons"in o)return o.buttons;if("which"in o){var s=o.which;if(s===2)return 4;if(s===3)return 2;if(s>0)return 1<=0)return 1<0){if(re=1,G[K++]=h(f[z],S,M,C),z+=U,_>0)for(Q=1,I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++),K+=1,z+=U,Q=2;Q<_;++Q)I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++,Me!==Z&&m(X[K+Y],Se,j,D,Me,Z,S,M,C)),K+=1,z+=U;for(z+=$,K=0,Ie=Y,Y=q,q=Ie,Ie=ee,ee=ae,ae=Ie,Ie=xe,xe=we,we=Ie,re=2;re0)for(Q=1,I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++,Me!==he&&m(X[K+ee],Se,F,j,he,Me,S,M,C)),K+=1,z+=U,Q=2;Q<_;++Q)I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++,Me!==he&&m(X[K+ee],Se,F,j,he,Me,S,M,C),Me!==Z&&m(X[K+Y],Se,j,D,Me,Z,S,M,C)),K+=1,z+=U;re&1&&(K=0),Ie=Y,Y=q,q=Ie,Ie=ee,ee=ae,ae=Ie,Ie=xe,xe=we,we=Ie,z+=$}}g(X),g(G)}},"false,1,0":function(c,m,h,v,g){return function(w,S,M,C){var _=w.shape[0]|0,T=w.shape[1]|0,f=w.data,u=w.offset|0,A=w.stride[0]|0,x=w.stride[1]|0,z=u,I,O=-A|0,D=0,B=-x|0,F=0,P=-A-x|0,j=0,U=x|0,$=A-x*T|0,Q=0,re=0,ne=0,se=2*T|0,G=v(se),X=v(se),K=0,H=0,Y=-1,q=-1,Z=0,ee=-T|0,ae=T|0,he=0,xe=-T-1|0,we=T-1|0,Me=0,Se=0,Ie=0;for(re=0;re0){if(Q=1,G[K++]=h(f[z],S,M,C),z+=U,T>0)for(re=1,I=f[z],H=G[K]=h(I,S,M,C),he=G[K+ee],Z=G[K+Y],Me=G[K+xe],(H!==he||H!==Z||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,he,Z,Me,S,M,C),Se=X[K]=ne++),K+=1,z+=U,re=2;re0)for(re=1,I=f[z],H=G[K]=h(I,S,M,C),he=G[K+ee],Z=G[K+Y],Me=G[K+xe],(H!==he||H!==Z||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,he,Z,Me,S,M,C),Se=X[K]=ne++,Me!==he&&m(X[K+ee],Se,j,D,Me,he,S,M,C)),K+=1,z+=U,re=2;re 0"),typeof s.vertex!="function"&&c("Must specify vertex creation function"),typeof s.cell!="function"&&c("Must specify cell creation function"),typeof s.phase!="function"&&c("Must specify phase function");for(var g=s.getters||[],i=new Array(h),w=0;w=0?i[w]=!0:i[w]=!1;return a(s.vertex,s.cell,s.phase,v,m,i)}},6199:function(l,e,t){"use strict";var n=t(1338),r={zero:function(C,_,T,f){var u=C[0],A=T[0];f|=0;var x=0,z=A;for(x=0;x2&&x[1]>2&&f(A.pick(-1,-1).lo(1,1).hi(x[0]-2,x[1]-2),u.pick(-1,-1,0).lo(1,1).hi(x[0]-2,x[1]-2),u.pick(-1,-1,1).lo(1,1).hi(x[0]-2,x[1]-2)),x[1]>2&&(T(A.pick(0,-1).lo(1).hi(x[1]-2),u.pick(0,-1,1).lo(1).hi(x[1]-2)),_(u.pick(0,-1,0).lo(1).hi(x[1]-2))),x[1]>2&&(T(A.pick(x[0]-1,-1).lo(1).hi(x[1]-2),u.pick(x[0]-1,-1,1).lo(1).hi(x[1]-2)),_(u.pick(x[0]-1,-1,0).lo(1).hi(x[1]-2))),x[0]>2&&(T(A.pick(-1,0).lo(1).hi(x[0]-2),u.pick(-1,0,0).lo(1).hi(x[0]-2)),_(u.pick(-1,0,1).lo(1).hi(x[0]-2))),x[0]>2&&(T(A.pick(-1,x[1]-1).lo(1).hi(x[0]-2),u.pick(-1,x[1]-1,0).lo(1).hi(x[0]-2)),_(u.pick(-1,x[1]-1,1).lo(1).hi(x[0]-2))),u.set(0,0,0,0),u.set(0,0,1,0),u.set(x[0]-1,0,0,0),u.set(x[0]-1,0,1,0),u.set(0,x[1]-1,0,0),u.set(0,x[1]-1,1,0),u.set(x[0]-1,x[1]-1,0,0),u.set(x[0]-1,x[1]-1,1,0),u}}function M(C){var _=C.join(),x=h[_];if(x)return x;for(var T=C.length,f=[g,i],u=1;u<=T;++u)f.push(w(u));var A=S,x=A.apply(void 0,f);return h[_]=x,x}l.exports=function(_,T,f){if(Array.isArray(f)||(typeof f=="string"?f=n(T.dimension,f):f=n(T.dimension,"clamp")),T.size===0)return _;if(T.dimension===0)return _.set(0),_;var u=M(f);return u(_,T)}},4317:function(l){"use strict";function e(o,s){var c=Math.floor(s),m=s-c,h=0<=c&&c0;){F<64?(_=F,F=0):(_=64,F-=64);for(var P=h[1]|0;P>0;){P<64?(T=P,P=0):(T=64,P-=64),i=D+F*u+P*A,M=B+F*z+P*I;var j=0,U=0,$=0,Q=x,re=u-f*x,ne=A-_*u,se=O,G=z-f*O,X=I-_*z;for($=0;$0;){I<64?(_=I,I=0):(_=64,I-=64);for(var O=h[0]|0;O>0;){O<64?(C=O,O=0):(C=64,O-=64),i=x+I*f+O*T,M=z+I*A+O*u;var D=0,B=0,F=f,P=T-_*f,j=A,U=u-_*A;for(B=0;B0;){B<64?(T=B,B=0):(T=64,B-=64);for(var F=h[0]|0;F>0;){F<64?(C=F,F=0):(C=64,F-=64);for(var P=h[1]|0;P>0;){P<64?(_=P,P=0):(_=64,P-=64),i=O+B*A+F*f+P*u,M=D+B*I+F*x+P*z;var j=0,U=0,$=0,Q=A,re=f-T*A,ne=u-C*f,se=I,G=x-T*I,X=z-C*x;for($=0;$<_;++$){for(U=0;Uw;){j=0,U=D-_;t:for(F=0;FQ)break t;U+=x,j+=z}for(j=D,U=D-_,F=0;F>1,P=F-O,j=F+O,U=D,$=P,Q=F,re=j,ne=B,se=S+1,G=M-1,X=!0,K,H,Y,q,Z,ee,ae,he,xe,we=0,Me=0,Se=0,Ie,Ve,Ge,ke,_e,ce,ve,le,Ae,Be,Xe,Ye,yt,gt,Tt,At,$t=A,rr=g($t),_r=g($t);Ve=T*U,Ge=T*$,At=_;e:for(Ie=0;Ie0){H=U,U=$,$=H;break e}if(Se<0)break e;At+=z}Ve=T*re,Ge=T*ne,At=_;e:for(Ie=0;Ie0){H=re,re=ne,ne=H;break e}if(Se<0)break e;At+=z}Ve=T*U,Ge=T*Q,At=_;e:for(Ie=0;Ie0){H=U,U=Q,Q=H;break e}if(Se<0)break e;At+=z}Ve=T*$,Ge=T*Q,At=_;e:for(Ie=0;Ie0){H=$,$=Q,Q=H;break e}if(Se<0)break e;At+=z}Ve=T*U,Ge=T*re,At=_;e:for(Ie=0;Ie0){H=U,U=re,re=H;break e}if(Se<0)break e;At+=z}Ve=T*Q,Ge=T*re,At=_;e:for(Ie=0;Ie0){H=Q,Q=re,re=H;break e}if(Se<0)break e;At+=z}Ve=T*$,Ge=T*ne,At=_;e:for(Ie=0;Ie0){H=$,$=ne,ne=H;break e}if(Se<0)break e;At+=z}Ve=T*$,Ge=T*Q,At=_;e:for(Ie=0;Ie0){H=$,$=Q,Q=H;break e}if(Se<0)break e;At+=z}Ve=T*re,Ge=T*ne,At=_;e:for(Ie=0;Ie0){H=re,re=ne,ne=H;break e}if(Se<0)break e;At+=z}for(Ve=T*U,Ge=T*$,ke=T*Q,_e=T*re,ce=T*ne,ve=T*D,le=T*F,Ae=T*B,Tt=0,At=_,Ie=0;Ie0)G--;else if(Se<0){for(Ve=T*ee,Ge=T*se,ke=T*G,At=_,Ie=0;Ie0)for(;;){ae=_+G*T,Tt=0;e:for(Ie=0;Ie0){if(--GB){e:for(;;){for(ae=_+se*T,Tt=0,At=_,Ie=0;Ie1&&w?M(i,w[0],w[1]):M(i)}var m={"uint32,1,0":function(v,g){return function(i){var w=i.data,S=i.offset|0,M=i.shape,C=i.stride,_=C[0]|0,T=M[0]|0,f=C[1]|0,u=M[1]|0,A=f,x=f,z=1;T<=32?v(0,T-1,w,S,_,f,T,u,A,x,z):g(0,T-1,w,S,_,f,T,u,A,x,z)}}};function h(v,g){var i=[g,v].join(","),w=m[i],S=o(v,g),M=c(v,g,S);return w(S,M)}l.exports=h},446:function(l,e,t){"use strict";var n=t(7640),r={};function a(o){var s=o.order,c=o.dtype,m=[s,c],h=m.join(":"),v=r[h];return v||(r[h]=v=n(s,c)),v(o),o}l.exports=a},9618:function(l,e,t){var n=t(7163),r=typeof Float64Array<"u";function a(g,i){return g[0]-i[0]}function o(){var g=this.stride,i=new Array(g.length),w;for(w=0;w=0&&(f=_|0,T+=A*f,u-=f),new S(this.data,u,A,T)},M.step=function(_){var T=this.shape[0],f=this.stride[0],u=this.offset,A=0,x=Math.ceil;return typeof _=="number"&&(A=_|0,A<0?(u+=f*(T-1),T=x(-T/A)):T=x(T/A),f*=A),new S(this.data,T,f,u)},M.transpose=function(_){_=_===void 0?0:_|0;var T=this.shape,f=this.stride;return new S(this.data,T[_],f[_],this.offset)},M.pick=function(_){var T=[],f=[],u=this.offset;typeof _=="number"&&_>=0?u=u+this.stride[0]*_|0:(T.push(this.shape[0]),f.push(this.stride[0]));var A=i[T.length+1];return A(this.data,T,f,u)},function(_,T,f,u){return new S(_,T[0],f[0],u)}},2:function(g,i,w){function S(C,_,T,f,u,A){this.data=C,this.shape=[_,T],this.stride=[f,u],this.offset=A|0}var M=S.prototype;return M.dtype=g,M.dimension=2,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(M,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),M.set=function(_,T,f){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T,f):this.data[this.offset+this.stride[0]*_+this.stride[1]*T]=f},M.get=function(_,T){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T):this.data[this.offset+this.stride[0]*_+this.stride[1]*T]},M.index=function(_,T){return this.offset+this.stride[0]*_+this.stride[1]*T},M.hi=function(_,T){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,this.stride[0],this.stride[1],this.offset)},M.lo=function(_,T){var f=this.offset,u=0,A=this.shape[0],x=this.shape[1],z=this.stride[0],I=this.stride[1];return typeof _=="number"&&_>=0&&(u=_|0,f+=z*u,A-=u),typeof T=="number"&&T>=0&&(u=T|0,f+=I*u,x-=u),new S(this.data,A,x,z,I,f)},M.step=function(_,T){var f=this.shape[0],u=this.shape[1],A=this.stride[0],x=this.stride[1],z=this.offset,I=0,O=Math.ceil;return typeof _=="number"&&(I=_|0,I<0?(z+=A*(f-1),f=O(-f/I)):f=O(f/I),A*=I),typeof T=="number"&&(I=T|0,I<0?(z+=x*(u-1),u=O(-u/I)):u=O(u/I),x*=I),new S(this.data,f,u,A,x,z)},M.transpose=function(_,T){_=_===void 0?0:_|0,T=T===void 0?1:T|0;var f=this.shape,u=this.stride;return new S(this.data,f[_],f[T],u[_],u[T],this.offset)},M.pick=function(_,T){var f=[],u=[],A=this.offset;typeof _=="number"&&_>=0?A=A+this.stride[0]*_|0:(f.push(this.shape[0]),u.push(this.stride[0])),typeof T=="number"&&T>=0?A=A+this.stride[1]*T|0:(f.push(this.shape[1]),u.push(this.stride[1]));var x=i[f.length+1];return x(this.data,f,u,A)},function(_,T,f,u){return new S(_,T[0],T[1],f[0],f[1],u)}},3:function(g,i,w){function S(C,_,T,f,u,A,x,z){this.data=C,this.shape=[_,T,f],this.stride=[u,A,x],this.offset=z|0}var M=S.prototype;return M.dtype=g,M.dimension=3,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(M,"order",{get:function(){var _=Math.abs(this.stride[0]),T=Math.abs(this.stride[1]),f=Math.abs(this.stride[2]);return _>T?T>f?[2,1,0]:_>f?[1,2,0]:[1,0,2]:_>f?[2,0,1]:f>T?[0,1,2]:[0,2,1]}}),M.set=function(_,T,f,u){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f,u):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f]=u},M.get=function(_,T,f){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f]},M.index=function(_,T,f){return this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f},M.hi=function(_,T,f){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof f!="number"||f<0?this.shape[2]:f|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},M.lo=function(_,T,f){var u=this.offset,A=0,x=this.shape[0],z=this.shape[1],I=this.shape[2],O=this.stride[0],D=this.stride[1],B=this.stride[2];return typeof _=="number"&&_>=0&&(A=_|0,u+=O*A,x-=A),typeof T=="number"&&T>=0&&(A=T|0,u+=D*A,z-=A),typeof f=="number"&&f>=0&&(A=f|0,u+=B*A,I-=A),new S(this.data,x,z,I,O,D,B,u)},M.step=function(_,T,f){var u=this.shape[0],A=this.shape[1],x=this.shape[2],z=this.stride[0],I=this.stride[1],O=this.stride[2],D=this.offset,B=0,F=Math.ceil;return typeof _=="number"&&(B=_|0,B<0?(D+=z*(u-1),u=F(-u/B)):u=F(u/B),z*=B),typeof T=="number"&&(B=T|0,B<0?(D+=I*(A-1),A=F(-A/B)):A=F(A/B),I*=B),typeof f=="number"&&(B=f|0,B<0?(D+=O*(x-1),x=F(-x/B)):x=F(x/B),O*=B),new S(this.data,u,A,x,z,I,O,D)},M.transpose=function(_,T,f){_=_===void 0?0:_|0,T=T===void 0?1:T|0,f=f===void 0?2:f|0;var u=this.shape,A=this.stride;return new S(this.data,u[_],u[T],u[f],A[_],A[T],A[f],this.offset)},M.pick=function(_,T,f){var u=[],A=[],x=this.offset;typeof _=="number"&&_>=0?x=x+this.stride[0]*_|0:(u.push(this.shape[0]),A.push(this.stride[0])),typeof T=="number"&&T>=0?x=x+this.stride[1]*T|0:(u.push(this.shape[1]),A.push(this.stride[1])),typeof f=="number"&&f>=0?x=x+this.stride[2]*f|0:(u.push(this.shape[2]),A.push(this.stride[2]));var z=i[u.length+1];return z(this.data,u,A,x)},function(_,T,f,u){return new S(_,T[0],T[1],T[2],f[0],f[1],f[2],u)}},4:function(g,i,w){function S(C,_,T,f,u,A,x,z,I,O){this.data=C,this.shape=[_,T,f,u],this.stride=[A,x,z,I],this.offset=O|0}var M=S.prototype;return M.dtype=g,M.dimension=4,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(M,"order",{get:w}),M.set=function(_,T,f,u,A){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u,A):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u]=A},M.get=function(_,T,f,u){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u]},M.index=function(_,T,f,u){return this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u},M.hi=function(_,T,f,u){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof f!="number"||f<0?this.shape[2]:f|0,typeof u!="number"||u<0?this.shape[3]:u|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},M.lo=function(_,T,f,u){var A=this.offset,x=0,z=this.shape[0],I=this.shape[1],O=this.shape[2],D=this.shape[3],B=this.stride[0],F=this.stride[1],P=this.stride[2],j=this.stride[3];return typeof _=="number"&&_>=0&&(x=_|0,A+=B*x,z-=x),typeof T=="number"&&T>=0&&(x=T|0,A+=F*x,I-=x),typeof f=="number"&&f>=0&&(x=f|0,A+=P*x,O-=x),typeof u=="number"&&u>=0&&(x=u|0,A+=j*x,D-=x),new S(this.data,z,I,O,D,B,F,P,j,A)},M.step=function(_,T,f,u){var A=this.shape[0],x=this.shape[1],z=this.shape[2],I=this.shape[3],O=this.stride[0],D=this.stride[1],B=this.stride[2],F=this.stride[3],P=this.offset,j=0,U=Math.ceil;return typeof _=="number"&&(j=_|0,j<0?(P+=O*(A-1),A=U(-A/j)):A=U(A/j),O*=j),typeof T=="number"&&(j=T|0,j<0?(P+=D*(x-1),x=U(-x/j)):x=U(x/j),D*=j),typeof f=="number"&&(j=f|0,j<0?(P+=B*(z-1),z=U(-z/j)):z=U(z/j),B*=j),typeof u=="number"&&(j=u|0,j<0?(P+=F*(I-1),I=U(-I/j)):I=U(I/j),F*=j),new S(this.data,A,x,z,I,O,D,B,F,P)},M.transpose=function(_,T,f,u){_=_===void 0?0:_|0,T=T===void 0?1:T|0,f=f===void 0?2:f|0,u=u===void 0?3:u|0;var A=this.shape,x=this.stride;return new S(this.data,A[_],A[T],A[f],A[u],x[_],x[T],x[f],x[u],this.offset)},M.pick=function(_,T,f,u){var A=[],x=[],z=this.offset;typeof _=="number"&&_>=0?z=z+this.stride[0]*_|0:(A.push(this.shape[0]),x.push(this.stride[0])),typeof T=="number"&&T>=0?z=z+this.stride[1]*T|0:(A.push(this.shape[1]),x.push(this.stride[1])),typeof f=="number"&&f>=0?z=z+this.stride[2]*f|0:(A.push(this.shape[2]),x.push(this.stride[2])),typeof u=="number"&&u>=0?z=z+this.stride[3]*u|0:(A.push(this.shape[3]),x.push(this.stride[3]));var I=i[A.length+1];return I(this.data,A,x,z)},function(_,T,f,u){return new S(_,T[0],T[1],T[2],T[3],f[0],f[1],f[2],f[3],u)}},5:function(i,w,S){function M(_,T,f,u,A,x,z,I,O,D,B,F){this.data=_,this.shape=[T,f,u,A,x],this.stride=[z,I,O,D,B],this.offset=F|0}var C=M.prototype;return C.dtype=i,C.dimension=5,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(C,"order",{get:S}),C.set=function(T,f,u,A,x,z){return i==="generic"?this.data.set(this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x,z):this.data[this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x]=z},C.get=function(T,f,u,A,x){return i==="generic"?this.data.get(this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x):this.data[this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x]},C.index=function(T,f,u,A,x){return this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x},C.hi=function(T,f,u,A,x){return new M(this.data,typeof T!="number"||T<0?this.shape[0]:T|0,typeof f!="number"||f<0?this.shape[1]:f|0,typeof u!="number"||u<0?this.shape[2]:u|0,typeof A!="number"||A<0?this.shape[3]:A|0,typeof x!="number"||x<0?this.shape[4]:x|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},C.lo=function(T,f,u,A,x){var z=this.offset,I=0,O=this.shape[0],D=this.shape[1],B=this.shape[2],F=this.shape[3],P=this.shape[4],j=this.stride[0],U=this.stride[1],$=this.stride[2],Q=this.stride[3],re=this.stride[4];return typeof T=="number"&&T>=0&&(I=T|0,z+=j*I,O-=I),typeof f=="number"&&f>=0&&(I=f|0,z+=U*I,D-=I),typeof u=="number"&&u>=0&&(I=u|0,z+=$*I,B-=I),typeof A=="number"&&A>=0&&(I=A|0,z+=Q*I,F-=I),typeof x=="number"&&x>=0&&(I=x|0,z+=re*I,P-=I),new M(this.data,O,D,B,F,P,j,U,$,Q,re,z)},C.step=function(T,f,u,A,x){var z=this.shape[0],I=this.shape[1],O=this.shape[2],D=this.shape[3],B=this.shape[4],F=this.stride[0],P=this.stride[1],j=this.stride[2],U=this.stride[3],$=this.stride[4],Q=this.offset,re=0,ne=Math.ceil;return typeof T=="number"&&(re=T|0,re<0?(Q+=F*(z-1),z=ne(-z/re)):z=ne(z/re),F*=re),typeof f=="number"&&(re=f|0,re<0?(Q+=P*(I-1),I=ne(-I/re)):I=ne(I/re),P*=re),typeof u=="number"&&(re=u|0,re<0?(Q+=j*(O-1),O=ne(-O/re)):O=ne(O/re),j*=re),typeof A=="number"&&(re=A|0,re<0?(Q+=U*(D-1),D=ne(-D/re)):D=ne(D/re),U*=re),typeof x=="number"&&(re=x|0,re<0?(Q+=$*(B-1),B=ne(-B/re)):B=ne(B/re),$*=re),new M(this.data,z,I,O,D,B,F,P,j,U,$,Q)},C.transpose=function(T,f,u,A,x){T=T===void 0?0:T|0,f=f===void 0?1:f|0,u=u===void 0?2:u|0,A=A===void 0?3:A|0,x=x===void 0?4:x|0;var z=this.shape,I=this.stride;return new M(this.data,z[T],z[f],z[u],z[A],z[x],I[T],I[f],I[u],I[A],I[x],this.offset)},C.pick=function(T,f,u,A,x){var z=[],I=[],O=this.offset;typeof T=="number"&&T>=0?O=O+this.stride[0]*T|0:(z.push(this.shape[0]),I.push(this.stride[0])),typeof f=="number"&&f>=0?O=O+this.stride[1]*f|0:(z.push(this.shape[1]),I.push(this.stride[1])),typeof u=="number"&&u>=0?O=O+this.stride[2]*u|0:(z.push(this.shape[2]),I.push(this.stride[2])),typeof A=="number"&&A>=0?O=O+this.stride[3]*A|0:(z.push(this.shape[3]),I.push(this.stride[3])),typeof x=="number"&&x>=0?O=O+this.stride[4]*x|0:(z.push(this.shape[4]),I.push(this.stride[4]));var D=w[z.length+1];return D(this.data,z,I,O)},function(T,f,u,A){return new M(T,f[0],f[1],f[2],f[3],f[4],u[0],u[1],u[2],u[3],u[4],A)}}};function c(g,i){var w=i===-1?"T":String(i),S=s[w];return i===-1?S(g):i===0?S(g,h[g][0]):S(g,h[g],o)}function m(g){if(n(g))return"buffer";if(r)switch(Object.prototype.toString.call(g)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(g)?"array":"generic"}var h={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function v(g,i,w,S){if(g===void 0){var u=h.array[0];return u([])}else typeof g=="number"&&(g=[g]);i===void 0&&(i=[g.length]);var M=i.length;if(w===void 0){w=new Array(M);for(var C=M-1,_=1;C>=0;--C)w[C]=_,_*=i[C]}if(S===void 0){S=0;for(var C=0;C>>0;l.exports=o;function o(s,c){if(isNaN(s)||isNaN(c))return NaN;if(s===c)return s;if(s===0)return c<0?-r:r;var m=n.hi(s),h=n.lo(s);return c>s==s>0?h===a?(m+=1,h=0):h+=1:h===0?(h=a,m-=1):h-=1,n.pack(h,m)}},8406:function(l,e){var t=1e-6,n=1e-6;e.vertexNormals=function(r,a,o){for(var s=a.length,c=new Array(s),m=o===void 0?t:o,h=0;hm)for(var z=c[i],I=1/Math.sqrt(f*A),x=0;x<3;++x){var O=(x+1)%3,D=(x+2)%3;z[x]+=I*(u[O]*T[D]-u[D]*T[O])}}for(var h=0;hm)for(var I=1/Math.sqrt(B),x=0;x<3;++x)z[x]*=I;else for(var x=0;x<3;++x)z[x]=0}return c},e.faceNormals=function(r,a,o){for(var s=r.length,c=new Array(s),m=o===void 0?n:o,h=0;hm?C=1/Math.sqrt(C):C=0;for(var i=0;i<3;++i)M[i]*=C;c[h]=M}return c}},4081:function(l){"use strict";l.exports=e;function e(t,n,r,a,o,s,c,m,h,v){var g=n+s+v;if(i>0){var i=Math.sqrt(g+1);t[0]=.5*(c-h)/i,t[1]=.5*(m-a)/i,t[2]=.5*(r-s)/i,t[3]=.5*i}else{var w=Math.max(n,s,v),i=Math.sqrt(2*w-g+1);n>=w?(t[0]=.5*i,t[1]=.5*(o+r)/i,t[2]=.5*(m+a)/i,t[3]=.5*(c-h)/i):s>=w?(t[0]=.5*(r+o)/i,t[1]=.5*i,t[2]=.5*(h+c)/i,t[3]=.5*(m-a)/i):(t[0]=.5*(a+m)/i,t[1]=.5*(c+h)/i,t[2]=.5*i,t[3]=.5*(r-o)/i)}return t}},9977:function(l,e,t){"use strict";l.exports=i;var n=t(9215),r=t(6582),a=t(7399),o=t(7608),s=t(4081);function c(w,S,M){return Math.sqrt(Math.pow(w,2)+Math.pow(S,2)+Math.pow(M,2))}function m(w,S,M,C){return Math.sqrt(Math.pow(w,2)+Math.pow(S,2)+Math.pow(M,2)+Math.pow(C,2))}function h(w,S){var M=S[0],C=S[1],_=S[2],T=S[3],f=m(M,C,_,T);f>1e-6?(w[0]=M/f,w[1]=C/f,w[2]=_/f,w[3]=T/f):(w[0]=w[1]=w[2]=0,w[3]=1)}function v(w,S,M){this.radius=n([M]),this.center=n(S),this.rotation=n(w),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var g=v.prototype;g.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},g.recalcMatrix=function(w){this.radius.curve(w),this.center.curve(w),this.rotation.curve(w);var S=this.computedRotation;h(S,S);var M=this.computedMatrix;a(M,S);var C=this.computedCenter,_=this.computedEye,T=this.computedUp,f=Math.exp(this.computedRadius[0]);_[0]=C[0]+f*M[2],_[1]=C[1]+f*M[6],_[2]=C[2]+f*M[10],T[0]=M[1],T[1]=M[5],T[2]=M[9];for(var u=0;u<3;++u){for(var A=0,x=0;x<3;++x)A+=M[u+4*x]*_[x];M[12+u]=-A}},g.getMatrix=function(w,S){this.recalcMatrix(w);var M=this.computedMatrix;if(S){for(var C=0;C<16;++C)S[C]=M[C];return S}return M},g.idle=function(w){this.center.idle(w),this.radius.idle(w),this.rotation.idle(w)},g.flush=function(w){this.center.flush(w),this.radius.flush(w),this.rotation.flush(w)},g.pan=function(w,S,M,C){S=S||0,M=M||0,C=C||0,this.recalcMatrix(w);var _=this.computedMatrix,T=_[1],f=_[5],u=_[9],A=c(T,f,u);T/=A,f/=A,u/=A;var x=_[0],z=_[4],I=_[8],O=x*T+z*f+I*u;x-=T*O,z-=f*O,I-=u*O;var D=c(x,z,I);x/=D,z/=D,I/=D;var B=_[2],F=_[6],P=_[10],j=B*T+F*f+P*u,U=B*x+F*z+P*I;B-=j*T+U*x,F-=j*f+U*z,P-=j*u+U*I;var $=c(B,F,P);B/=$,F/=$,P/=$;var Q=x*S+T*M,re=z*S+f*M,ne=I*S+u*M;this.center.move(w,Q,re,ne);var se=Math.exp(this.computedRadius[0]);se=Math.max(1e-4,se+C),this.radius.set(w,Math.log(se))},g.rotate=function(w,S,M,C){this.recalcMatrix(w),S=S||0,M=M||0;var _=this.computedMatrix,T=_[0],f=_[4],u=_[8],A=_[1],x=_[5],z=_[9],I=_[2],O=_[6],D=_[10],B=S*T+M*A,F=S*f+M*x,P=S*u+M*z,j=-(O*P-D*F),U=-(D*B-I*P),$=-(I*F-O*B),Q=Math.sqrt(Math.max(0,1-Math.pow(j,2)-Math.pow(U,2)-Math.pow($,2))),re=m(j,U,$,Q);re>1e-6?(j/=re,U/=re,$/=re,Q/=re):(j=U=$=0,Q=1);var ne=this.computedRotation,se=ne[0],G=ne[1],X=ne[2],K=ne[3],H=se*Q+K*j+G*$-X*U,Y=G*Q+K*U+X*j-se*$,q=X*Q+K*$+se*U-G*j,Z=K*Q-se*j-G*U-X*$;if(C){j=I,U=O,$=D;var ee=Math.sin(C)/c(j,U,$);j*=ee,U*=ee,$*=ee,Q=Math.cos(S),H=H*Q+Z*j+Y*$-q*U,Y=Y*Q+Z*U+q*j-H*$,q=q*Q+Z*$+H*U-Y*j,Z=Z*Q-H*j-Y*U-q*$}var ae=m(H,Y,q,Z);ae>1e-6?(H/=ae,Y/=ae,q/=ae,Z/=ae):(H=Y=q=0,Z=1),this.rotation.set(w,H,Y,q,Z)},g.lookAt=function(w,S,M,C){this.recalcMatrix(w),M=M||this.computedCenter,S=S||this.computedEye,C=C||this.computedUp;var _=this.computedMatrix;r(_,S,M,C);var T=this.computedRotation;s(T,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),h(T,T),this.rotation.set(w,T[0],T[1],T[2],T[3]);for(var f=0,u=0;u<3;++u)f+=Math.pow(M[u]-S[u],2);this.radius.set(w,.5*Math.log(Math.max(f,1e-6))),this.center.set(w,M[0],M[1],M[2])},g.translate=function(w,S,M,C){this.center.move(w,S||0,M||0,C||0)},g.setMatrix=function(w,S){var M=this.computedRotation;s(M,S[0],S[1],S[2],S[4],S[5],S[6],S[8],S[9],S[10]),h(M,M),this.rotation.set(w,M[0],M[1],M[2],M[3]);var C=this.computedMatrix;o(C,S);var _=C[15];if(Math.abs(_)>1e-6){var T=C[12]/_,f=C[13]/_,u=C[14]/_;this.recalcMatrix(w);var A=Math.exp(this.computedRadius[0]);this.center.set(w,T-C[2]*A,f-C[6]*A,u-C[10]*A),this.radius.idle(w)}else this.center.idle(w),this.radius.idle(w)},g.setDistance=function(w,S){S>0&&this.radius.set(w,Math.log(S))},g.setDistanceLimits=function(w,S){w>0?w=Math.log(w):w=-1/0,S>0?S=Math.log(S):S=1/0,S=Math.max(S,w),this.radius.bounds[0][0]=w,this.radius.bounds[1][0]=S},g.getDistanceLimits=function(w){var S=this.radius.bounds;return w?(w[0]=Math.exp(S[0][0]),w[1]=Math.exp(S[1][0]),w):[Math.exp(S[0][0]),Math.exp(S[1][0])]},g.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},g.fromJSON=function(w){var S=this.lastT(),M=w.center;M&&this.center.set(S,M[0],M[1],M[2]);var C=w.rotation;C&&this.rotation.set(S,C[0],C[1],C[2],C[3]);var _=w.distance;_&&_>0&&this.radius.set(S,Math.log(_)),this.setDistanceLimits(w.zoomMin,w.zoomMax)};function i(w){w=w||{};var S=w.center||[0,0,0],M=w.rotation||[0,0,0,1],C=w.radius||1;S=[].slice.call(S,0,3),M=[].slice.call(M,0,4),h(M,M);var _=new v(M,S,Math.log(C));return _.setDistanceLimits(w.zoomMin,w.zoomMax),("eye"in w||"up"in w)&&_.lookAt(0,w.eye,w.center,w.up),_}},1371:function(l,e,t){"use strict";var n=t(3233);l.exports=function(a,o,s){return s=typeof s<"u"?s+"":" ",n(s,o)+a}},3202:function(l){l.exports=function(t,n){n||(n=[0,""]),t=String(t);var r=parseFloat(t,10);return n[0]=r,n[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}},3088:function(l,e,t){"use strict";l.exports=r;var n=t(3140);function r(a,o){for(var s=o.length|0,c=a.length,m=[new Array(s),new Array(s)],h=0;h0){z=m[D][A][0],O=D;break}I=z[O^1];for(var B=0;B<2;++B)for(var F=m[B][A],P=0;P0&&(z=j,I=U,O=B)}return x||z&&i(z,O),I}function S(u,A){var x=m[A][u][0],z=[u];i(x,A);for(var I=x[A^1],O=A;;){for(;I!==u;)z.push(I),I=w(z[z.length-2],I,!1);if(m[0][u].length+m[1][u].length===0)break;var D=z[z.length-1],B=u,F=z[1],P=w(D,B,!0);if(n(o[D],o[B],o[F],o[P])<0)break;z.push(u),I=w(D,B)}return z}function M(u,A){return A[1]===A[A.length-1]}for(var h=0;h0;){var T=m[0][h].length,f=S(h,C);M(_,f)?_.push.apply(_,f):(_.length>0&&g.push(_),_=f)}_.length>0&&g.push(_)}return g}},5609:function(l,e,t){"use strict";l.exports=r;var n=t(3134);function r(a,o){for(var s=n(a,o.length),c=new Array(o.length),m=new Array(o.length),h=[],v=0;v0;){var i=h.pop();c[i]=!1;for(var w=s[i],v=0;v0}T=T.filter(f);for(var u=T.length,A=new Array(u),x=new Array(u),_=0;_0;){var ae=q.pop(),he=re[ae];c(he,function(Ie,Ve){return Ie-Ve});var xe=he.length,we=Z[ae],Me;if(we===0){var F=T[ae];Me=[F]}for(var _=0;_=0)&&(Z[Se]=we^1,q.push(Se),we===0)){var F=T[Se];Y(F)||(F.reverse(),Me.push(F))}}we===0&&ee.push(Me)}return ee}},5085:function(l,e,t){l.exports=w;var n=t(3250)[3],r=t(4209),a=t(3352),o=t(2478);function s(){return!0}function c(S){return function(M,C){var _=S[M];return _?!!_.queryPoint(C,s):!1}}function m(S){for(var M={},C=0;C0&&M[_]===C[0])T=S[_-1];else return 1;for(var f=1;T;){var u=T.key,A=n(C,u[0],u[1]);if(u[0][0]0)f=-1,T=T.right;else return 0;else if(A>0)T=T.left;else if(A<0)f=1,T=T.right;else return 0}return f}}function v(S){return 1}function g(S){return function(C){return S(C[0],C[1])?0:1}}function i(S,M){return function(_){return S(_[0],_[1])?0:M(_)}}function w(S){for(var M=S.length,C=[],_=[],T=0,f=0;f=v?(u=1,x=v+2*w+M):(u=-w/v,x=w*u+M)):(u=0,S>=0?(A=0,x=M):-S>=i?(A=1,x=i+2*S+M):(A=-S/i,x=S*A+M));else if(A<0)A=0,w>=0?(u=0,x=M):-w>=v?(u=1,x=v+2*w+M):(u=-w/v,x=w*u+M);else{var z=1/f;u*=z,A*=z,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M}else{var I,O,D,B;u<0?(I=g+w,O=i+S,O>I?(D=O-I,B=v-2*g+i,D>=B?(u=1,A=0,x=v+2*w+M):(u=D/B,A=1-u,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)):(u=0,O<=0?(A=1,x=i+2*S+M):S>=0?(A=0,x=M):(A=-S/i,x=S*A+M))):A<0?(I=g+S,O=v+w,O>I?(D=O-I,B=v-2*g+i,D>=B?(A=1,u=0,x=i+2*S+M):(A=D/B,u=1-A,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)):(A=0,O<=0?(u=1,x=v+2*w+M):w>=0?(u=0,x=M):(u=-w/v,x=w*u+M))):(D=i+S-g-w,D<=0?(u=0,A=1,x=i+2*S+M):(B=v-2*g+i,D>=B?(u=1,A=0,x=v+2*w+M):(u=D/B,A=1-u,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)))}for(var F=1-u-A,h=0;h0){var i=s[m-1];if(n(v,i)===0&&a(i)!==g){m-=1;continue}}s[m++]=v}}return s.length=m,s}},3233:function(l){"use strict";var e="",t;l.exports=n;function n(r,a){if(typeof r!="string")throw new TypeError("expected a string");if(a===1)return r;if(a===2)return r+r;var o=r.length*a;if(t!==r||typeof t>"u")t=r,e="";else if(e.length>=o)return e.substr(0,o);for(;o>e.length&&a>1;)a&1&&(e+=r),a>>=1,r+=r;return e+=r,e=e.substr(0,o),e}},3025:function(l,e,t){l.exports=t.g.performance&&t.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(l){"use strict";l.exports=e;function e(t){for(var n=t.length,r=t[t.length-1],a=n,o=n-2;o>=0;--o){var s=r,c=t[o];r=s+c;var m=r-s,h=c-m;h&&(t[--a]=r,r=h)}for(var v=0,o=a;o0){if(O<=0)return D;B=I+O}else if(I<0){if(O>=0)return D;B=-(I+O)}else return D;var F=m*B;return D>=F||D<=-F?D:S(A,x,z)},function(A,x,z,I){var O=A[0]-I[0],D=x[0]-I[0],B=z[0]-I[0],F=A[1]-I[1],P=x[1]-I[1],j=z[1]-I[1],U=A[2]-I[2],$=x[2]-I[2],Q=z[2]-I[2],re=D*j,ne=B*P,se=B*F,G=O*j,X=O*P,K=D*F,H=U*(re-ne)+$*(se-G)+Q*(X-K),Y=(Math.abs(re)+Math.abs(ne))*Math.abs(U)+(Math.abs(se)+Math.abs(G))*Math.abs($)+(Math.abs(X)+Math.abs(K))*Math.abs(Q),q=h*Y;return H>q||-H>q?H:M(A,x,z,I)}];function _(u){var A=C[u.length];return A||(A=C[u.length]=w(u.length)),A.apply(void 0,u)}function T(u,A,x,z,I,O,D){return function(F,P,j,U,$){switch(arguments.length){case 0:case 1:return 0;case 2:return z(F,P);case 3:return I(F,P,j);case 4:return O(F,P,j,U);case 5:return D(F,P,j,U,$)}for(var Q=new Array(arguments.length),re=0;re0&&v>0||h<0&&v<0)return!1;var g=n(c,o,s),i=n(m,o,s);return g>0&&i>0||g<0&&i<0?!1:h===0&&v===0&&g===0&&i===0?r(o,s,c,m):!0}},8545:function(l){"use strict";l.exports=t;function e(n,r){var a=n+r,o=a-n,s=a-o,c=r-o,m=n-s,h=m+c;return h?[h,a]:[a]}function t(n,r){var a=n.length|0,o=r.length|0;if(a===1&&o===1)return e(n[0],-r[0]);var s=a+o,c=new Array(s),m=0,h=0,v=0,g=Math.abs,i=n[h],w=g(i),S=-r[v],M=g(S),C,_;w=o?(C=i,h+=1,h=o?(C=i,h+=1,h"u"&&(C=s(w));var _=w.length;if(_===0||C<1)return{cells:[],vertexIds:[],vertexWeights:[]};var T=c(S,+M),f=m(w,C),u=h(f,S,T,+M),A=v(f,S.length|0),x=o(C)(w,f.data,A,T),z=g(f),I=[].slice.call(u.data,0,u.shape[0]);return r.free(T),r.free(f.data),r.free(u.data),r.free(A),{cells:x,vertexIds:z,vertexWeights:I}}},1570:function(l){"use strict";l.exports=t;var e=[function(){function r(o,s,c,m){for(var h=Math.min(c,m)|0,v=Math.max(c,m)|0,g=o[2*h],i=o[2*h+1];g>1,S=s[2*w+1];if(S===v)return w;v>1,S=s[2*w+1];if(S===v)return w;v>1,S=s[2*w+1];if(S===v)return w;v>1,S=s[2*w+1];if(S===v)return w;v>1,B=m(A[D],x);B<=0?(B===0&&(O=D),z=D+1):B>0&&(I=D-1)}return O}n=i;function w(A,x){for(var z=new Array(A.length),I=0,O=z.length;I=A.length||m(A[re],D)!==0););}return z}n=w;function S(A,x){if(!x)return w(g(C(A,0)),A,0);for(var z=new Array(x),I=0;I>>j&1&&P.push(O[j]);x.push(P)}return v(x)}n=M;function C(A,x){if(x<0)return[];for(var z=[],I=(1<0)-(a<0)},e.abs=function(a){var o=a>>t-1;return(a^o)-o},e.min=function(a,o){return o^(a^o)&-(a65535)<<4,a>>>=o,s=(a>255)<<3,a>>>=s,o|=s,s=(a>15)<<2,a>>>=s,o|=s,s=(a>3)<<1,a>>>=s,o|=s,o|a>>1},e.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},e.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function n(a){var o=32;return a&=-a,a&&o--,a&65535&&(o-=16),a&16711935&&(o-=8),a&252645135&&(o-=4),a&858993459&&(o-=2),a&1431655765&&(o-=1),o}e.countTrailingZeros=n,e.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},e.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},e.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var r=new Array(256);(function(a){for(var o=0;o<256;++o){var s=o,c=o,m=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--m;a[o]=c<>>8&255]<<16|r[a>>>16&255]<<8|r[a>>>24&255]},e.interleave2=function(a,o){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,a|o<<1},e.deinterleave2=function(a,o){return a=a>>>o&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},e.interleave3=function(a,o,s){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,a|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,a|s<<2},e.deinterleave3=function(a,o){return a=a>>>o&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},e.nextCombination=function(a){var o=a|a-1;return o+1|(~o&-~o)-1>>>n(a)+1}},2014:function(l,e,t){"use strict";"use restrict";var n=t(3105),r=t(4623);function a(u){for(var A=0,x=Math.max,z=0,I=u.length;z>1,D=c(u[O],A);D<=0?(D===0&&(I=O),x=O+1):D>0&&(z=O-1)}return I}e.findCell=g;function i(u,A){for(var x=new Array(u.length),z=0,I=x.length;z=u.length||c(u[Q],O)!==0););}return x}e.incidence=i;function w(u,A){if(!A)return i(v(M(u,0)),u,0);for(var x=new Array(A),z=0;z>>P&1&&F.push(I[P]);A.push(F)}return h(A)}e.explode=S;function M(u,A){if(A<0)return[];for(var x=[],z=(1<>1:(G>>1)-1}function z(G){for(var X=A(G);;){var K=X,H=2*G+1,Y=2*(G+1),q=G;if(H0;){var K=x(G);if(K>=0){var H=A(K);if(X0){var G=F[0];return u(0,U-1),U-=1,z(0),G}return-1}function D(G,X){var K=F[G];return w[K]===X?G:(w[K]=-1/0,I(G),O(),w[K]=X,U+=1,I(U-1))}function B(G){if(!S[G]){S[G]=!0;var X=g[G],K=i[G];g[K]>=0&&(g[K]=X),i[X]>=0&&(i[X]=K),P[X]>=0&&D(P[X],f(X)),P[K]>=0&&D(P[K],f(K))}}for(var F=[],P=new Array(h),M=0;M>1;M>=0;--M)z(M);for(;;){var $=O();if($<0||w[$]>m)break;B($)}for(var Q=[],M=0;M=0&&K>=0&&X!==K){var H=P[X],Y=P[K];H!==Y&&se.push([H,Y])}}),r.unique(r.normalize(se)),{positions:Q,edges:se}}},1303:function(l,e,t){"use strict";l.exports=a;var n=t(3250);function r(o,s){var c,m;if(s[0][0]s[1][0])c=s[1],m=s[0];else{var h=Math.min(o[0][1],o[1][1]),v=Math.max(o[0][1],o[1][1]),g=Math.min(s[0][1],s[1][1]),i=Math.max(s[0][1],s[1][1]);return vi?h-i:v-i}var w,S;o[0][1]s[1][0])c=s[1],m=s[0];else return r(s,o);var h,v;if(o[0][0]o[1][0])h=o[1],v=o[0];else return-r(o,s);var g=n(c,m,v),i=n(c,m,h);if(g<0){if(i<=0)return g}else if(g>0){if(i>=0)return g}else if(i)return i;if(g=n(v,h,m),i=n(v,h,c),g<0){if(i<=0)return g}else if(g>0){if(i>=0)return g}else if(i)return i;return m[0]-v[0]}},4209:function(l,e,t){"use strict";l.exports=i;var n=t(2478),r=t(3840),a=t(3250),o=t(1303);function s(w,S,M){this.slabs=w,this.coordinates=S,this.horizontal=M}var c=s.prototype;function m(w,S){return w.y-S}function h(w,S){for(var M=null;w;){var C=w.key,_,T;C[0][0]0)if(S[0]!==C[1][0])M=w,w=w.right;else{var u=h(w.right,S);if(u)return u;w=w.left}else{if(S[0]!==C[1][0])return w;var u=h(w.right,S);if(u)return u;w=w.left}}return M}c.castUp=function(w){var S=n.le(this.coordinates,w[0]);if(S<0)return-1;var M=this.slabs[S],C=h(this.slabs[S],w),_=-1;if(C&&(_=C.value),this.coordinates[S]===w[0]){var T=null;if(C&&(T=C.key),S>0){var f=h(this.slabs[S-1],w);f&&(T?o(f.key,T)>0&&(T=f.key,_=f.value):(_=f.value,T=f.key))}var u=this.horizontal[S];if(u.length>0){var A=n.ge(u,w[1],m);if(A=u.length)return _;x=u[A]}}if(x.start)if(T){var z=a(T[0],T[1],[w[0],x.y]);T[0][0]>T[1][0]&&(z=-z),z>0&&(_=x.index)}else _=x.index;else x.y!==w[1]&&(_=x.index)}}}return _};function v(w,S,M,C){this.y=w,this.index=S,this.start=M,this.closed=C}function g(w,S,M,C){this.x=w,this.segment=S,this.create=M,this.index=C}function i(w){for(var S=w.length,M=2*S,C=new Array(M),_=0;_1&&(S=1);for(var M=1-S,C=h.length,_=new Array(C),T=0;T0||w>0&&_<0){var T=o(S,_,M,w);g.push(T),i.push(T.slice())}_<0?i.push(M.slice()):_>0?g.push(M.slice()):(g.push(M.slice()),i.push(M.slice())),w=_}return{positive:g,negative:i}}function c(h,v){for(var g=[],i=a(h[h.length-1],v),w=h[h.length-1],S=h[0],M=0;M0||i>0&&C<0)&&g.push(o(w,C,S,i)),C>=0&&g.push(S.slice()),i=C}return g}function m(h,v){for(var g=[],i=a(h[h.length-1],v),w=h[h.length-1],S=h[0],M=0;M0||i>0&&C<0)&&g.push(o(w,C,S,i)),C<=0&&g.push(S.slice()),i=C}return g}},3387:function(l,e,t){var n;(function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(h){return s(m(h),arguments)}function o(h,v){return a.apply(null,[h].concat(v||[]))}function s(h,v){var g=1,i=h.length,w,S="",M,C,_,T,f,u,A,x;for(M=0;M=0),_.type){case"b":w=parseInt(w,10).toString(2);break;case"c":w=String.fromCharCode(parseInt(w,10));break;case"d":case"i":w=parseInt(w,10);break;case"j":w=JSON.stringify(w,null,_.width?parseInt(_.width):0);break;case"e":w=_.precision?parseFloat(w).toExponential(_.precision):parseFloat(w).toExponential();break;case"f":w=_.precision?parseFloat(w).toFixed(_.precision):parseFloat(w);break;case"g":w=_.precision?String(Number(w.toPrecision(_.precision))):parseFloat(w);break;case"o":w=(parseInt(w,10)>>>0).toString(8);break;case"s":w=String(w),w=_.precision?w.substring(0,_.precision):w;break;case"t":w=String(!!w),w=_.precision?w.substring(0,_.precision):w;break;case"T":w=Object.prototype.toString.call(w).slice(8,-1).toLowerCase(),w=_.precision?w.substring(0,_.precision):w;break;case"u":w=parseInt(w,10)>>>0;break;case"v":w=w.valueOf(),w=_.precision?w.substring(0,_.precision):w;break;case"x":w=(parseInt(w,10)>>>0).toString(16);break;case"X":w=(parseInt(w,10)>>>0).toString(16).toUpperCase();break}r.json.test(_.type)?S+=w:(r.number.test(_.type)&&(!A||_.sign)?(x=A?"+":"-",w=w.toString().replace(r.sign,"")):x="",f=_.pad_char?_.pad_char==="0"?"0":_.pad_char.charAt(1):" ",u=_.width-(x+w).length,T=_.width&&u>0?f.repeat(u):"",S+=_.align?x+w+T:f==="0"?x+T+w:T+x+w)}return S}var c=Object.create(null);function m(h){if(c[h])return c[h];for(var v=h,g,i=[],w=0;v;){if((g=r.text.exec(v))!==null)i.push(g[0]);else if((g=r.modulo.exec(v))!==null)i.push("%");else if((g=r.placeholder.exec(v))!==null){if(g[2]){w|=1;var S=[],M=g[2],C=[];if((C=r.key.exec(M))!==null)for(S.push(C[1]);(M=M.substring(C[0].length))!=="";)if((C=r.key_access.exec(M))!==null)S.push(C[1]);else if((C=r.index_access.exec(M))!==null)S.push(C[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");g[2]=S}else w|=2;if(w===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:g[0],param_no:g[1],keys:g[2],sign:g[3],pad_char:g[4],align:g[5],width:g[6],precision:g[7],type:g[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");v=v.substring(g[0].length)}return c[h]=i}e.sprintf=a,e.vsprintf=o,typeof window<"u"&&(window.sprintf=a,window.vsprintf=o,n=function(){return{sprintf:a,vsprintf:o}}.call(e,t,e,l),n!==void 0&&(l.exports=n))})()},3711:function(l,e,t){"use strict";l.exports=m;var n=t(2640),r=t(781),a={"2d":function(h,v,g){var i=h({order:v,scalarArguments:3,getters:g==="generic"?[0]:void 0,phase:function(S,M,C,_){return S>_|0},vertex:function(S,M,C,_,T,f,u,A,x,z,I,O,D){var B=(u<<0)+(A<<1)+(x<<2)+(z<<3)|0;if(!(B===0||B===15))switch(B){case 0:I.push([S-.5,M-.5]);break;case 1:I.push([S-.25-.25*(_+C-2*D)/(C-_),M-.25-.25*(T+C-2*D)/(C-T)]);break;case 2:I.push([S-.75-.25*(-_-C+2*D)/(_-C),M-.25-.25*(f+_-2*D)/(_-f)]);break;case 3:I.push([S-.5,M-.5-.5*(T+C+f+_-4*D)/(C-T+_-f)]);break;case 4:I.push([S-.25-.25*(f+T-2*D)/(T-f),M-.75-.25*(-T-C+2*D)/(T-C)]);break;case 5:I.push([S-.5-.5*(_+C+f+T-4*D)/(C-_+T-f),M-.5]);break;case 6:I.push([S-.5-.25*(-_-C+f+T)/(_-C+T-f),M-.5-.25*(-T-C+f+_)/(T-C+_-f)]);break;case 7:I.push([S-.75-.25*(f+T-2*D)/(T-f),M-.75-.25*(f+_-2*D)/(_-f)]);break;case 8:I.push([S-.75-.25*(-f-T+2*D)/(f-T),M-.75-.25*(-f-_+2*D)/(f-_)]);break;case 9:I.push([S-.5-.25*(_+C+-f-T)/(C-_+f-T),M-.5-.25*(T+C+-f-_)/(C-T+f-_)]);break;case 10:I.push([S-.5-.5*(-_-C+-f-T+4*D)/(_-C+f-T),M-.5]);break;case 11:I.push([S-.25-.25*(-f-T+2*D)/(f-T),M-.75-.25*(T+C-2*D)/(C-T)]);break;case 12:I.push([S-.5,M-.5-.5*(-T-C+-f-_+4*D)/(T-C+f-_)]);break;case 13:I.push([S-.75-.25*(_+C-2*D)/(C-_),M-.25-.25*(-f-_+2*D)/(f-_)]);break;case 14:I.push([S-.25-.25*(-_-C+2*D)/(_-C),M-.25-.25*(-T-C+2*D)/(T-C)]);break;case 15:I.push([S-.5,M-.5]);break}},cell:function(S,M,C,_,T,f,u,A,x){T?A.push([S,M]):A.push([M,S])}});return function(w,S){var M=[],C=[];return i(w,M,C,S),{positions:M,cells:C}}}};function o(h,v){var g=h.length+"d",i=a[g];if(i)return i(n,h,v)}function s(h,v){for(var g=r(h,v),i=g.length,w=new Array(i),S=new Array(i),M=0;MMath.max(_,T)?f[2]=1:_>Math.max(C,T)?f[0]=1:f[1]=1;for(var u=0,A=0,x=0;x<3;++x)u+=M[x]*M[x],A+=f[x]*M[x];for(var x=0;x<3;++x)f[x]-=A/u*M[x];return s(f,f),f}function g(M,C,_,T,f,u,A,x){this.center=n(_),this.up=n(T),this.right=n(f),this.radius=n([u]),this.angle=n([A,x]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(M,C),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var i=g.prototype;i.setDistanceLimits=function(M,C){M>0?M=Math.log(M):M=-1/0,C>0?C=Math.log(C):C=1/0,C=Math.max(C,M),this.radius.bounds[0][0]=M,this.radius.bounds[1][0]=C},i.getDistanceLimits=function(M){var C=this.radius.bounds[0];return M?(M[0]=Math.exp(C[0][0]),M[1]=Math.exp(C[1][0]),M):[Math.exp(C[0][0]),Math.exp(C[1][0])]},i.recalcMatrix=function(M){this.center.curve(M),this.up.curve(M),this.right.curve(M),this.radius.curve(M),this.angle.curve(M);for(var C=this.computedUp,_=this.computedRight,T=0,f=0,u=0;u<3;++u)f+=C[u]*_[u],T+=C[u]*C[u];for(var A=Math.sqrt(T),x=0,u=0;u<3;++u)_[u]-=C[u]*f/T,x+=_[u]*_[u],C[u]/=A;for(var z=Math.sqrt(x),u=0;u<3;++u)_[u]/=z;var I=this.computedToward;o(I,C,_),s(I,I);for(var O=Math.exp(this.computedRadius[0]),D=this.computedAngle[0],B=this.computedAngle[1],F=Math.cos(D),P=Math.sin(D),j=Math.cos(B),U=Math.sin(B),$=this.computedCenter,Q=F*j,re=P*j,ne=U,se=-F*U,G=-P*U,X=j,K=this.computedEye,H=this.computedMatrix,u=0;u<3;++u){var Y=Q*_[u]+re*I[u]+ne*C[u];H[4*u+1]=se*_[u]+G*I[u]+X*C[u],H[4*u+2]=Y,H[4*u+3]=0}var q=H[1],Z=H[5],ee=H[9],ae=H[2],he=H[6],xe=H[10],we=Z*xe-ee*he,Me=ee*ae-q*xe,Se=q*he-Z*ae,Ie=m(we,Me,Se);we/=Ie,Me/=Ie,Se/=Ie,H[0]=we,H[4]=Me,H[8]=Se;for(var u=0;u<3;++u)K[u]=$[u]+H[2+4*u]*O;for(var u=0;u<3;++u){for(var x=0,Ve=0;Ve<3;++Ve)x+=H[u+4*Ve]*K[Ve];H[12+u]=-x}H[15]=1},i.getMatrix=function(M,C){this.recalcMatrix(M);var _=this.computedMatrix;if(C){for(var T=0;T<16;++T)C[T]=_[T];return C}return _};var w=[0,0,0];i.rotate=function(M,C,_,T){if(this.angle.move(M,C,_),T){this.recalcMatrix(M);var f=this.computedMatrix;w[0]=f[2],w[1]=f[6],w[2]=f[10];for(var u=this.computedUp,A=this.computedRight,x=this.computedToward,z=0;z<3;++z)f[4*z]=u[z],f[4*z+1]=A[z],f[4*z+2]=x[z];a(f,f,T,w);for(var z=0;z<3;++z)u[z]=f[4*z],A[z]=f[4*z+1];this.up.set(M,u[0],u[1],u[2]),this.right.set(M,A[0],A[1],A[2])}},i.pan=function(M,C,_,T){C=C||0,_=_||0,T=T||0,this.recalcMatrix(M);var f=this.computedMatrix,u=Math.exp(this.computedRadius[0]),A=f[1],x=f[5],z=f[9],I=m(A,x,z);A/=I,x/=I,z/=I;var O=f[0],D=f[4],B=f[8],F=O*A+D*x+B*z;O-=A*F,D-=x*F,B-=z*F;var P=m(O,D,B);O/=P,D/=P,B/=P;var j=O*C+A*_,U=D*C+x*_,$=B*C+z*_;this.center.move(M,j,U,$);var Q=Math.exp(this.computedRadius[0]);Q=Math.max(1e-4,Q+T),this.radius.set(M,Math.log(Q))},i.translate=function(M,C,_,T){this.center.move(M,C||0,_||0,T||0)},i.setMatrix=function(M,C,_,T){var f=1;typeof _=="number"&&(f=_|0),(f<0||f>3)&&(f=1);var u=(f+2)%3,A=(f+1)%3;C||(this.recalcMatrix(M),C=this.computedMatrix);var x=C[f],z=C[f+4],I=C[f+8];if(T){var D=Math.abs(x),B=Math.abs(z),F=Math.abs(I),P=Math.max(D,B,F);D===P?(x=x<0?-1:1,z=I=0):F===P?(I=I<0?-1:1,x=z=0):(z=z<0?-1:1,x=I=0)}else{var O=m(x,z,I);x/=O,z/=O,I/=O}var j=C[u],U=C[u+4],$=C[u+8],Q=j*x+U*z+$*I;j-=x*Q,U-=z*Q,$-=I*Q;var re=m(j,U,$);j/=re,U/=re,$/=re;var ne=z*$-I*U,se=I*j-x*$,G=x*U-z*j,X=m(ne,se,G);ne/=X,se/=X,G/=X,this.center.jump(M,ve,le,Ae),this.radius.idle(M),this.up.jump(M,x,z,I),this.right.jump(M,j,U,$);var K,H;if(f===2){var Y=C[1],q=C[5],Z=C[9],ee=Y*j+q*U+Z*$,ae=Y*ne+q*se+Z*G;Me<0?K=-Math.PI/2:K=Math.PI/2,H=Math.atan2(ae,ee)}else{var he=C[2],xe=C[6],we=C[10],Me=he*x+xe*z+we*I,Se=he*j+xe*U+we*$,Ie=he*ne+xe*se+we*G;K=Math.asin(h(Me)),H=Math.atan2(Ie,Se)}this.angle.jump(M,H,K),this.recalcMatrix(M);var Ve=C[2],Ge=C[6],ke=C[10],_e=this.computedMatrix;r(_e,C);var ce=_e[15],ve=_e[12]/ce,le=_e[13]/ce,Ae=_e[14]/ce,Be=Math.exp(this.computedRadius[0]);this.center.jump(M,ve-Ve*Be,le-Ge*Be,Ae-ke*Be)},i.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},i.idle=function(M){this.center.idle(M),this.up.idle(M),this.right.idle(M),this.radius.idle(M),this.angle.idle(M)},i.flush=function(M){this.center.flush(M),this.up.flush(M),this.right.flush(M),this.radius.flush(M),this.angle.flush(M)},i.setDistance=function(M,C){C>0&&this.radius.set(M,Math.log(C))},i.lookAt=function(M,C,_,T){this.recalcMatrix(M),C=C||this.computedEye,_=_||this.computedCenter,T=T||this.computedUp;var f=T[0],u=T[1],A=T[2],x=m(f,u,A);if(!(x<1e-6)){f/=x,u/=x,A/=x;var z=C[0]-_[0],I=C[1]-_[1],O=C[2]-_[2],D=m(z,I,O);if(!(D<1e-6)){z/=D,I/=D,O/=D;var B=this.computedRight,F=B[0],P=B[1],j=B[2],U=f*F+u*P+A*j;F-=U*f,P-=U*u,j-=U*A;var $=m(F,P,j);if(!($<.01&&(F=u*O-A*I,P=A*z-f*O,j=f*I-u*z,$=m(F,P,j),$<1e-6))){F/=$,P/=$,j/=$,this.up.set(M,f,u,A),this.right.set(M,F,P,j),this.center.set(M,_[0],_[1],_[2]),this.radius.set(M,Math.log(D));var Q=u*j-A*P,re=A*F-f*j,ne=f*P-u*F,se=m(Q,re,ne);Q/=se,re/=se,ne/=se;var G=f*z+u*I+A*O,X=F*z+P*I+j*O,K=Q*z+re*I+ne*O,H=Math.asin(h(G)),Y=Math.atan2(K,X),q=this.angle._state,Z=q[q.length-1],ee=q[q.length-2];Z=Z%(2*Math.PI);var ae=Math.abs(Z+2*Math.PI-Y),he=Math.abs(Z-Y),xe=Math.abs(Z-2*Math.PI-Y);ae0?j.pop():new ArrayBuffer(F)}e.mallocArrayBuffer=w;function S(B){return new Uint8Array(w(B),0,B)}e.mallocUint8=S;function M(B){return new Uint16Array(w(2*B),0,B)}e.mallocUint16=M;function C(B){return new Uint32Array(w(4*B),0,B)}e.mallocUint32=C;function _(B){return new Int8Array(w(B),0,B)}e.mallocInt8=_;function T(B){return new Int16Array(w(2*B),0,B)}e.mallocInt16=T;function f(B){return new Int32Array(w(4*B),0,B)}e.mallocInt32=f;function u(B){return new Float32Array(w(4*B),0,B)}e.mallocFloat32=e.mallocFloat=u;function A(B){return new Float64Array(w(8*B),0,B)}e.mallocFloat64=e.mallocDouble=A;function x(B){return o?new Uint8ClampedArray(w(B),0,B):S(B)}e.mallocUint8Clamped=x;function z(B){return s?new BigUint64Array(w(8*B),0,B):null}e.mallocBigUint64=z;function I(B){return c?new BigInt64Array(w(8*B),0,B):null}e.mallocBigInt64=I;function O(B){return new DataView(w(B),0,B)}e.mallocDataView=O;function D(B){B=n.nextPow2(B);var F=n.log2(B),P=v[F];return P.length>0?P.pop():new a(B)}e.mallocBuffer=D,e.clearCache=function(){for(var F=0;F<32;++F)m.UINT8[F].length=0,m.UINT16[F].length=0,m.UINT32[F].length=0,m.INT8[F].length=0,m.INT16[F].length=0,m.INT32[F].length=0,m.FLOAT[F].length=0,m.DOUBLE[F].length=0,m.BIGUINT64[F].length=0,m.BIGINT64[F].length=0,m.UINT8C[F].length=0,h[F].length=0,v[F].length=0}},1755:function(l){"use strict";"use restrict";l.exports=e;function e(n){this.roots=new Array(n),this.ranks=new Array(n);for(var r=0;r",j="",U=P.length,$=j.length,Q=D[0]===w||D[0]===C,re=0,ne=-$;re>-1&&(re=B.indexOf(P,re),!(re===-1||(ne=B.indexOf(j,re+U),ne===-1)||ne<=re));){for(var se=re;se=ne)F[se]=null,B=B.substr(0,se)+" "+B.substr(se+1);else if(F[se]!==null){var G=F[se].indexOf(D[0]);G===-1?F[se]+=D:Q&&(F[se]=F[se].substr(0,G+1)+(1+parseInt(F[se][G+1]))+F[se].substr(G+2))}var X=re+U,K=B.substr(X,ne-X),H=K.indexOf(P);H!==-1?re=H:re=ne+$}return F}function f(O,D,B){for(var F=D.textAlign||"start",P=D.textBaseline||"alphabetic",j=[1<<30,1<<30],U=[0,0],$=O.length,Q=0;Q<$;++Q)for(var re=O[Q],ne=0;ne<2;++ne)j[ne]=Math.min(j[ne],re[ne])|0,U[ne]=Math.max(U[ne],re[ne])|0;var se=0;switch(F){case"center":se=-.5*(j[0]+U[0]);break;case"right":case"end":se=-U[0];break;case"left":case"start":se=-j[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+F+"'")}var G=0;switch(P){case"hanging":case"top":G=-j[1];break;case"middle":G=-.5*(j[1]+U[1]);break;case"alphabetic":case"ideographic":G=-3*B;break;case"bottom":G=-U[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+P+"'")}var X=1/B;return"lineHeight"in D?X*=+D.lineHeight:"width"in D?X=D.width/(U[0]-j[0]):"height"in D&&(X=D.height/(U[1]-j[1])),O.map(function(K){return[X*(K[0]+se),X*(K[1]+G)]})}function u(O,D,B,F,P,j){B=B.replace(/\n/g,""),j.breaklines===!0?B=B.replace(/\/g,` -`):B=B.replace(/\/g," ");var U="",$=[];for(Z=0;Z-1?parseInt(le[1+Xe]):0,gt=Ye>-1?parseInt(Ae[1+Ye]):0;yt!==gt&&(Be=Be.replace(Se(),"?px "),he*=Math.pow(.75,gt-yt),Be=Be.replace("?px ",Se())),ae+=.25*G*(gt-yt)}if(j.superscripts===!0){var Tt=le.indexOf(w),At=Ae.indexOf(w),$t=Tt>-1?parseInt(le[1+Tt]):0,rr=At>-1?parseInt(Ae[1+At]):0;$t!==rr&&(Be=Be.replace(Se(),"?px "),he*=Math.pow(.75,rr-$t),Be=Be.replace("?px ",Se())),ae-=.25*G*(rr-$t)}if(j.bolds===!0){var _r=le.indexOf(h)>-1,Xt=Ae.indexOf(h)>-1;!_r&&Xt&&(or?Be=Be.replace("italic ","italic bold "):Be="bold "+Be),_r&&!Xt&&(Be=Be.replace("bold ",""))}if(j.italics===!0){var or=le.indexOf(g)>-1,Ot=Ae.indexOf(g)>-1;!or&&Ot&&(Be="italic "+Be),or&&!Ot&&(Be=Be.replace("italic ",""))}D.font=Be}for(q=0;q0&&(P=F.size),F.lineSpacing&&F.lineSpacing>0&&(j=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(U.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(U.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(U.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(U.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(U.superscripts=!!F.styletags.superscripts)),B.font=[F.fontStyle,F.fontVariant,F.fontWeight,P+"px",F.font].filter(function(Q){return Q}).join(" "),B.textAlign="start",B.textBaseline="alphabetic",B.direction="ltr";var $=u(D,B,O,P,j,U);return z($,F,P)}},1538:function(l){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function t(x){x.permitHostObjects___&&x.permitHostObjects___(t)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=t);var n=!1;if(typeof WeakMap=="function"){var r=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var a=new r,o=Object.freeze({});if(a.set(o,1),a.get(o)!==1)n=!0;else{l.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,c=Object.getOwnPropertyNames,m=Object.defineProperty,h=Object.isExtensible,v="weakmap:",g=v+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var i=new ArrayBuffer(25),w=new Uint8Array(i);crypto.getRandomValues(w),g=v+"rand:"+Array.prototype.map.call(w,function(x){return(x%36).toString(36)}).join("")+"___"}function S(x){return!(x.substr(0,v.length)==v&&x.substr(x.length-3)==="___")}if(m(Object,"getOwnPropertyNames",{value:function(z){return c(z).filter(S)}}),"getPropertyNames"in Object){var M=Object.getPropertyNames;m(Object,"getPropertyNames",{value:function(z){return M(z).filter(S)}})}function C(x){if(x!==Object(x))throw new TypeError("Not an object: "+x);var z=x[g];if(z&&z.key===x)return z;if(h(x)){z={key:x};try{return m(x,g,{value:z,writable:!1,enumerable:!1,configurable:!1}),z}catch{return}}}(function(){var x=Object.freeze;m(Object,"freeze",{value:function(D){return C(D),x(D)}});var z=Object.seal;m(Object,"seal",{value:function(D){return C(D),z(D)}});var I=Object.preventExtensions;m(Object,"preventExtensions",{value:function(D){return C(D),I(D)}})})();function _(x){return x.prototype=null,Object.freeze(x)}var T=!1;function f(){!T&&typeof console<"u"&&(T=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var u=0,A=function(){this instanceof A||f();var x=[],z=[],I=u++;function O(P,j){var U,$=C(P);return $?I in $?$[I]:j:(U=x.indexOf(P),U>=0?z[U]:j)}function D(P){var j=C(P);return j?I in j:x.indexOf(P)>=0}function B(P,j){var U,$=C(P);return $?$[I]=j:(U=x.indexOf(P),U>=0?z[U]=j:(U=x.length,z[U]=j,x[U]=P)),this}function F(P){var j=C(P),U,$;return j?I in j&&delete j[I]:(U=x.indexOf(P),U<0?!1:($=x.length-1,x[U]=void 0,z[U]=z[$],x[U]=x[$],x.length=$,z.length=$,!0))}return Object.create(A.prototype,{get___:{value:_(O)},has___:{value:_(D)},set___:{value:_(B)},delete___:{value:_(F)}})};A.prototype=Object.create(Object.prototype,{get:{value:function(z,I){return this.get___(z,I)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,I){return this.set___(z,I)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof r=="function"?function(){n&&typeof Proxy<"u"&&(Proxy=void 0);function x(){this instanceof A||f();var z=new r,I=void 0,O=!1;function D(j,U){return I?z.has(j)?z.get(j):I.get___(j,U):z.get(j,U)}function B(j){return z.has(j)||(I?I.has___(j):!1)}var F;n?F=function(j,U){return z.set(j,U),z.has(j)||(I||(I=new A),I.set(j,U)),this}:F=function(j,U){if(O)try{z.set(j,U)}catch{I||(I=new A),I.set___(j,U)}else z.set(j,U);return this};function P(j){var U=!!z.delete(j);return I&&I.delete___(j)||U}return Object.create(A.prototype,{get___:{value:_(D)},has___:{value:_(B)},set___:{value:_(F)},delete___:{value:_(P)},permitHostObjects___:{value:_(function(j){if(j===t)O=!0;else throw new Error("bogus call to permitHostObjects___")})}})}x.prototype=A.prototype,l.exports=x,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),l.exports=A)})()},236:function(l,e,t){var n=t(8284);l.exports=r;function r(){var a={};return function(o){if((typeof o!="object"||o===null)&&typeof o!="function")throw new Error("Weakmap-shim: Key must be object");var s=o.valueOf(a);return s&&s.identity===a?s:n(o,a)}}},8284:function(l){l.exports=e;function e(t,n){var r={identity:n},a=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(o){return o!==n?a.apply(this,arguments):r},writable:!0}),r}},606:function(l,e,t){var n=t(236);l.exports=r;function r(){var a=n();return{get:function(o,s){var c=a(o);return c.hasOwnProperty("value")?c.value:s},set:function(o,s){return a(o).value=s,this},has:function(o){return"value"in a(o)},delete:function(o){return delete a(o).value}}}},3349:function(l){"use strict";function e(){return function(s,c,m,h,v,g){var i=s[0],w=m[0],S=[0],M=w;h|=0;var C=0,_=w;for(C=0;C=0!=f>=0&&v.push(S[0]+.5+.5*(T+f)/(T-f))}h+=_,++S[0]}}}function t(){return e()}var n=t;function r(s){var c={};return function(h,v,g){var i=h.dtype,w=h.order,S=[i,w.join()].join(),M=c[S];return M||(c[S]=M=s([i,w])),M(h.shape.slice(0),h.data,h.stride,h.offset|0,v,g)}}function a(s){return r(n.bind(void 0,s))}function o(s){return a({funcName:s.funcName})}l.exports=o({funcName:"zeroCrossings"})},781:function(l,e,t){"use strict";l.exports=r;var n=t(3349);function r(a,o){var s=[];return o=+o||0,n(a.hi(a.shape[0]-1),s,o),s}},7790:function(){}},b={};function E(l){var e=b[l];if(e!==void 0)return e.exports;var t=b[l]={id:l,loaded:!1,exports:{}};return p[l].call(t.exports,t,t.exports,E),t.loaded=!0,t.exports}(function(){E.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){E.nmd=function(l){return l.paths=[],l.children||(l.children=[]),l}}();var k=E(1964);V.exports=k})()}}),cp=ze({"src/lib/str2rgbarray.js"(J,V){"use strict";var{normalize:p}=Qn();function b(E){return E?p(E):[0,0,0,1]}V.exports=b}}),fp=ze({"src/lib/gl_format_color.js"(J,V){"use strict";var p=ao(),b=fl(),E=Qn(),k=fc().defaultLine,l=Ff().isArrayOrTypedArray,e=E.normalize(k),t=1;function n(c,m){return[c[0],c[1],c[2],c[3]*m]}function r(c){return p(c)||!E.isChannelArray(c)&&!E.isValid(c)?e:E.normalize(c)}function a(c){return p(c)?c:t}function o(c,m,h){var v=c.color;v&&v._inputArray&&(v=v._inputArray);var g=l(v),i=l(m),w=b.extractOpts(c),S=[],M,C,_,T,f;if(w.colorscale!==void 0?M=b.makeColorScaleFuncFromTrace(c):M=r,g?C=(A,x)=>A[x]===void 0?e:w.colorscale===void 0?M(A[x]):E.normalize(M(A[x])):C=r,i?_=function(A,x){return A[x]===void 0?t:a(A[x])}:_=a,g||i)for(var u=0;u0){var v=n.c2l(m);n._lowerLogErrorBound||(n._lowerLogErrorBound=v),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,v)}}else a[o]=[-s[0]*t,s[1]*t]}return a}function E(l){for(var e=0;e-1?-1:z.indexOf("right")>-1?1:0}function S(z){return z==null?0:z.indexOf("top")>-1?-1:z.indexOf("bottom")>-1?1:0}function M(z){var I=0,O=0,D=[I,O];if(Array.isArray(z))for(var B=0;B=0){var $=g(j.position,j.delaunayColor,j.delaunayAxis);$.opacity=z.opacity,this.delaunayMesh?this.delaunayMesh.update($):($.gl=I,this.delaunayMesh=k($),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},v.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function x(z,I){var O=new h(z,I.uid);return O.update(I),O}V.exports=x}}),mA=ze({"src/traces/scatter3d/attributes.js"(J,V){"use strict";var p=su(),b=Qs(),E=qs(),k=Il().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=ws(),r=vA(),a=w2(),o=Ki().extendFlat,s=Al().overrideAll,c=(Nv(),Po(nv)).default,m=p.line,h=p.marker,v=h.line,g=o({width:m.width,dash:{valType:"enumerated",values:c(r),dflt:"solid"}},E("line"));function i(S){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var w=V.exports=s({x:p.x,y:p.y,z:{valType:"data_array"},text:o({},p.text,{}),texttemplate:e(),texttemplatefallback:t({editType:"calc"}),hovertext:o({},p.hovertext,{}),hovertemplate:l(),hovertemplatefallback:t(),xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z"),mode:o({},p.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:i("x"),y:i("y"),z:i("z")},connectgaps:p.connectgaps,line:g,marker:o({symbol:{valType:"enumerated",values:c(a),dflt:"circle",arrayOk:!0},size:o({},h.size,{dflt:8}),sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,opacity:o({},h.opacity,{arrayOk:!1}),colorbar:h.colorbar,line:o({width:o({},v.width,{arrayOk:!1})},E("marker.line"))},E("marker")),textposition:o({},p.textposition,{dflt:"top center"}),textfont:b({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:n.opacity,hoverinfo:o({},n.hoverinfo)},"calc","nested");w.x.editType=w.y.editType=w.z.editType="calc+clearAxisTypes"}}),LN=ze({"src/traces/scatter3d/defaults.js"(J,V){"use strict";var p=mi(),b=Nr(),E=el(),k=id(),l=_d(),e=xd(),t=mA();V.exports=function(a,o,s,c){function m(C,_){return b.coerce(a,o,t,C,_)}var h=n(a,o,m,c);if(!h){o.visible=!1;return}m("text"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("xhoverformat"),m("yhoverformat"),m("zhoverformat"),m("mode"),E.hasMarkers(o)&&k(a,o,s,c,m,{noAngle:!0,noLineDash:!0,noSelect:!0}),E.hasLines(o)&&(m("connectgaps"),l(a,o,s,c,m)),E.hasText(o)&&(m("texttemplate"),m("texttemplatefallback"),e(a,o,c,m,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var v=(o.line||{}).color,g=(o.marker||{}).color;m("surfaceaxis")>=0&&m("surfacecolor",v||g);for(var i=["x","y","z"],w=0;w<3;++w){var S="projection."+i[w];m(S+".show")&&(m(S+".opacity"),m(S+".scale"))}var M=p.getComponentMethod("errorbars","supplyDefaults");M(a,o,v||g||s,{axis:"z"}),M(a,o,v||g||s,{axis:"y",inherit:"z"}),M(a,o,v||g||s,{axis:"x",inherit:"z"})};function n(r,a,o,s){var c=0,m=o("x"),h=o("y"),v=o("z"),g=p.getComponentMethod("calendars","handleTraceDefaults");return g(r,a,["x","y","z"],s),m&&h&&v&&(c=Math.min(m.length,h.length,v.length),a._length=a._xlength=a._ylength=a._zlength=c),c}}}),PN=ze({"src/traces/scatter3d/calc.js"(J,V){"use strict";var p=Nd(),b=od();V.exports=function(k,l){var e=[{x:!1,y:!1,trace:l,t:{}}];return p(e,l),b(k,l),e}}}),RN=ze({"node_modules/get-canvas-context/index.js"(J,V){V.exports=p;function p(b,E){if(typeof b!="string")throw new TypeError("must specify type string");if(E=E||{},typeof document>"u"&&!E.canvas)return null;var k=E.canvas||document.createElement("canvas");typeof E.width=="number"&&(k.width=E.width),typeof E.height=="number"&&(k.height=E.height);var l=E,e;try{var t=[b];b.indexOf("webgl")===0&&t.push("experimental-"+b);for(var n=0;n/g," "));o[s]=v,c.tickmode=m}}n.ticks=o;for(var s=0;s<3;++s){k[s]=.5*(t.glplot.bounds[0][s]+t.glplot.bounds[1][s]);for(var g=0;g<2;++g)n.bounds[g][s]=t.glplot.bounds[g][s]}t.contourLevels=l(o)}}}),BN=ze({"src/plots/gl3d/scene.js"(J,V){"use strict";var p=df().gl_plot3d,b=p.createCamera,E=p.createScene,k=IN(),l=Rx(),e=mi(),t=Nr(),n=t.preserveDrawingBuffer(),r=Gi(),a=Zl(),o=cp(),s=gA(),c=C5(),m=DN(),h=FN(),v=zN(),g=md().applyAutorangeOptions,i,w,S=!1;function M(O,D){var B=document.createElement("div"),F=O.container;this.graphDiv=O.graphDiv;var P=document.createElementNS("http://www.w3.org/2000/svg","svg");P.style.position="absolute",P.style.top=P.style.left="0px",P.style.width=P.style.height="100%",P.style["z-index"]=20,P.style["pointer-events"]="none",B.appendChild(P),this.svgContainer=P,B.id=O.id,B.style.position="absolute",B.style.top=B.style.left="0px",B.style.width=B.style.height="100%",F.appendChild(B),this.fullLayout=D,this.id=O.id||"scene",this.fullSceneLayout=D[this.id],this.plotArgs=[[],{},{}],this.axesOptions=m(D,D[this.id]),this.spikeOptions=h(D[this.id]),this.container=B,this.staticMode=!!O.staticPlot,this.pixelRatio=this.pixelRatio||O.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var C=M.prototype;C.prepareOptions=function(){var O=this,D={canvas:O.canvas,gl:O.gl,glOptions:{preserveDrawingBuffer:n,premultipliedAlpha:!0,antialias:!0},container:O.container,axes:O.axesOptions,spikes:O.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:O.camera,pixelRatio:O.pixelRatio};if(O.staticMode){if(!w&&(i=document.createElement("canvas"),w=k({canvas:i,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!w))throw new Error("error creating static canvas/context for image server");D.gl=w,D.canvas=i}return D};var _=!0;C.tryCreatePlot=function(){var O=this,D=O.prepareOptions(),B=!0;try{O.glplot=E(D)}catch{if(O.staticMode||!_||n)B=!1;else{t.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{n=D.glOptions.preserveDrawingBuffer=!0,O.glplot=E(D)}catch{n=D.glOptions.preserveDrawingBuffer=!1,B=!1}}}return _=!1,B},C.initializeGLCamera=function(){var O=this,D=O.fullSceneLayout.camera,B=D.projection.type==="orthographic";O.camera=b(O.container,{center:[D.center.x,D.center.y,D.center.z],eye:[D.eye.x,D.eye.y,D.eye.z],up:[D.up.x,D.up.y,D.up.z],_ortho:B,zoomMin:.01,zoomMax:100,mode:"orbit"})},C.initializeGLPlot=function(){var O=this;O.initializeGLCamera();var D=O.tryCreatePlot();if(!D)return s(O);O.traces={},O.make4thDimension();var B=O.graphDiv,F=B.layout,P=function(){var U={};return O.isCameraChanged(F)&&(U[O.id+".camera"]=O.getCamera()),O.isAspectChanged(F)&&(U[O.id+".aspectratio"]=O.glplot.getAspectratio(),F[O.id].aspectmode!=="manual"&&(O.fullSceneLayout.aspectmode=F[O.id].aspectmode=U[O.id+".aspectmode"]="manual")),U},j=function(U){if(U.fullSceneLayout.dragmode!==!1){var $=P();U.saveLayout(F),U.graphDiv.emit("plotly_relayout",$)}};return O.glplot.canvas&&(O.glplot.canvas.addEventListener("mouseup",function(){j(O)}),O.glplot.canvas.addEventListener("touchstart",function(){S=!0}),O.glplot.canvas.addEventListener("wheel",function(U){if(B._context._scrollZoom.gl3d){if(O.camera._ortho){var $=U.deltaX>U.deltaY?1.1:.9090909090909091,Q=O.glplot.getAspectratio();O.glplot.setAspectratio({x:$*Q.x,y:$*Q.y,z:$*Q.z})}j(O)}},l?{passive:!1}:!1),O.glplot.canvas.addEventListener("mousemove",function(){if(O.fullSceneLayout.dragmode!==!1&&O.camera.mouseListener.buttons!==0){var U=P();O.graphDiv.emit("plotly_relayouting",U)}}),O.staticMode||O.glplot.canvas.addEventListener("webglcontextlost",function(U){B&&B.emit&&B.emit("plotly_webglcontextlost",{event:U,layer:O.id})},!1)),O.glplot.oncontextloss=function(){O.recoverContext()},O.glplot.onrender=function(){O.render()},!0},C.render=function(){var O=this,D=O.graphDiv,B,F=O.svgContainer,P=O.container.getBoundingClientRect();D._fullLayout._calcInverseTransform(D);var j=D._fullLayout._invScaleX,U=D._fullLayout._invScaleY,$=P.width*j,Q=P.height*U;F.setAttributeNS(null,"viewBox","0 0 "+$+" "+Q),F.setAttributeNS(null,"width",$),F.setAttributeNS(null,"height",Q),v(O),O.glplot.axes.update(O.axesOptions);for(var re=Object.keys(O.traces),ne=null,se=O.glplot.selection,G=0;G")):B.type==="isosurface"||B.type==="volume"?(q.valueLabel=r.hoverLabelText(O._mockAxis,O._mockAxis.d2l(se.traceCoordinate[3]),B.valuehoverformat),xe.push("value: "+q.valueLabel),se.textLabel&&xe.push(se.textLabel),he=xe.join("
")):he=se.textLabel;var we={x:se.traceCoordinate[0],y:se.traceCoordinate[1],z:se.traceCoordinate[2],data:H._input,fullData:H,curveNumber:H.index,pointNumber:Y};a.appendArrayPointValue(we,H,Y),B._module.eventData&&(we=H._module.eventData(we,se,H,{},Y));var Me={points:[we]};if(O.fullSceneLayout.hovermode){var Se=[];a.loneHover({trace:H,x:(.5+.5*K[0]/K[3])*$,y:(.5-.5*K[1]/K[3])*Q,xLabel:q.xLabel,yLabel:q.yLabel,zLabel:q.zLabel,text:he,name:ne.name,color:a.castHoverOption(H,Y,"bgcolor")||ne.color,borderColor:a.castHoverOption(H,Y,"bordercolor"),fontFamily:a.castHoverOption(H,Y,"font.family"),fontSize:a.castHoverOption(H,Y,"font.size"),fontColor:a.castHoverOption(H,Y,"font.color"),nameLength:a.castHoverOption(H,Y,"namelength"),textAlign:a.castHoverOption(H,Y,"align"),hovertemplate:t.castOption(H,Y,"hovertemplate"),hovertemplateLabels:t.extendFlat({},we,q),eventData:[we]},{container:F,gd:D,inOut_bbox:Se}),we.bbox=Se[0]}se.distance<5&&(se.buttons||S)?D.emit("plotly_click",Me):D.emit("plotly_hover",Me),this.oldEventData=Me}else a.loneUnhover(F),this.oldEventData&&D.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;O.drawAnnotations(O)},C.recoverContext=function(){var O=this;O.glplot.dispose();var D=function(){if(O.glplot.gl.isContextLost()){requestAnimationFrame(D);return}if(!O.initializeGLPlot()){t.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}O.plot.apply(O,O.plotArgs)};requestAnimationFrame(D)};var T=["xaxis","yaxis","zaxis"];function f(O,D,B){for(var F=O.fullSceneLayout,P=0;P<3;P++){var j=T[P],U=j.charAt(0),$=F[j],Q=D[U],re=D[U+"calendar"],ne=D["_"+U+"length"];if(!t.isArrayOrTypedArray(Q))B[0][P]=Math.min(B[0][P],0),B[1][P]=Math.max(B[1][P],ne-1);else for(var se,G=0;G<(ne||Q.length);G++)if(t.isArrayOrTypedArray(Q[G]))for(var X=0;XH[1][U])H[0][U]=-1,H[1][U]=1;else{var Ve=H[1][U]-H[0][U];H[0][U]-=Ve/32,H[1][U]+=Ve/32}if(Z=[H[0][U],H[1][U]],Z=g(Z,Q),H[0][U]=Z[0],H[1][U]=Z[1],Q.isReversed()){var Ge=H[0][U];H[0][U]=H[1][U],H[1][U]=Ge}}else Z=Q.range,H[0][U]=Q.r2l(Z[0]),H[1][U]=Q.r2l(Z[1]);H[0][U]===H[1][U]&&(H[0][U]-=1,H[1][U]+=1),Y[U]=H[1][U]-H[0][U],Q.range=[H[0][U],H[1][U]],Q.limitRange(),F.glplot.setBounds(U,{min:Q.range[0]*X[U],max:Q.range[1]*X[U]})}var ke,_e=ne.aspectmode;if(_e==="cube")ke=[1,1,1];else if(_e==="manual"){var ce=ne.aspectratio;ke=[ce.x,ce.y,ce.z]}else if(_e==="auto"||_e==="data"){var ve=[1,1,1];for(U=0;U<3;++U){Q=ne[T[U]],re=Q.type;var le=q[re];ve[U]=Math.pow(le.acc,1/le.count)/X[U]}_e==="data"||Math.max.apply(null,ve)/Math.min.apply(null,ve)<=4?ke=ve:ke=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ne.aspectratio.x=se.aspectratio.x=ke[0],ne.aspectratio.y=se.aspectratio.y=ke[1],ne.aspectratio.z=se.aspectratio.z=ke[2],F.glplot.setAspectratio(ne.aspectratio),F.viewInitial.aspectratio||(F.viewInitial.aspectratio={x:ne.aspectratio.x,y:ne.aspectratio.y,z:ne.aspectratio.z}),F.viewInitial.aspectmode||(F.viewInitial.aspectmode=ne.aspectmode);var Ae=ne.domain||null,Be=D._size||null;if(Ae&&Be){var Xe=F.container.style;Xe.position="absolute",Xe.left=Be.l+Ae.x[0]*Be.w+"px",Xe.top=Be.t+(1-Ae.y[1])*Be.h+"px",Xe.width=Be.w*(Ae.x[1]-Ae.x[0])+"px",Xe.height=Be.h*(Ae.y[1]-Ae.y[0])+"px"}F.glplot.redraw()}},C.destroy=function(){var O=this;O.glplot&&(O.camera.mouseListener.enabled=!1,O.container.removeEventListener("wheel",O.camera.wheelListener),O.camera=null,O.glplot.dispose(),O.container.parentNode.removeChild(O.container),O.glplot=null)};function A(O){return[[O.eye.x,O.eye.y,O.eye.z],[O.center.x,O.center.y,O.center.z],[O.up.x,O.up.y,O.up.z]]}function x(O){return{up:{x:O.up[0],y:O.up[1],z:O.up[2]},center:{x:O.center[0],y:O.center[1],z:O.center[2]},eye:{x:O.eye[0],y:O.eye[1],z:O.eye[2]},projection:{type:O._ortho===!0?"orthographic":"perspective"}}}C.getCamera=function(){var O=this;return O.camera.view.recalcMatrix(O.camera.view.lastT()),x(O.camera)},C.setViewport=function(O){var D=this,B=O.camera;D.camera.lookAt.apply(this,A(B)),D.glplot.setAspectratio(O.aspectratio);var F=B.projection.type==="orthographic",P=D.camera._ortho;F!==P&&(D.glplot.redraw(),D.glplot.clearRGBA(),D.glplot.dispose(),D.initializeGLPlot())},C.isCameraChanged=function(O){var D=this,B=D.getCamera(),F=t.nestedProperty(O,D.id+".camera"),P=F.get();function j(re,ne,se,G){var X=["up","center","eye"],K=["x","y","z"];return ne[X[se]]&&re[X[se]][K[G]]===ne[X[se]][K[G]]}var U=!1;if(P===void 0)U=!0;else{for(var $=0;$<3;$++)for(var Q=0;Q<3;Q++)if(!j(B,P,$,Q)){U=!0;break}(!P.projection||B.projection&&B.projection.type!==P.projection.type)&&(U=!0)}return U},C.isAspectChanged=function(O){var D=this,B=D.glplot.getAspectratio(),F=t.nestedProperty(O,D.id+".aspectratio"),P=F.get();return P===void 0||P.x!==B.x||P.y!==B.y||P.z!==B.z},C.saveLayout=function(O){var D=this,B=D.fullLayout,F,P,j,U,$,Q,re=D.isCameraChanged(O),ne=D.isAspectChanged(O),se=re||ne;if(se){var G={};if(re&&(F=D.getCamera(),P=t.nestedProperty(O,D.id+".camera"),j=P.get(),G[D.id+".camera"]=j),ne&&(U=D.glplot.getAspectratio(),$=t.nestedProperty(O,D.id+".aspectratio"),Q=$.get(),G[D.id+".aspectratio"]=Q),e.call("_storeDirectGUIEdit",O,B._preGUI,G),re){P.set(F);var X=t.nestedProperty(B,D.id+".camera");X.set(F)}if(ne){$.set(U);var K=t.nestedProperty(B,D.id+".aspectratio");K.set(U),D.glplot.redraw()}}return se},C.updateFx=function(O,D){var B=this,F=B.camera;if(F)if(O==="orbit")F.mode="orbit",F.keyBindingMode="rotate";else if(O==="turntable"){F.up=[0,0,1],F.mode="turntable",F.keyBindingMode="rotate";var P=B.graphDiv,j=P._fullLayout,U=B.fullSceneLayout.camera,$=U.up.x,Q=U.up.y,re=U.up.z;if(re/Math.sqrt($*$+Q*Q+re*re)<.999){var ne=B.id+".camera.up",se={x:0,y:0,z:1},G={};G[ne]=se;var X=P.layout;e.call("_storeDirectGUIEdit",X,j._preGUI,G),U.up=se,t.nestedProperty(X,ne).set(se)}}else F.keyBindingMode=O;B.fullSceneLayout.hovermode=D};function z(O,D,B){for(var F=0,P=B-1;F0)for(var $=255/U,Q=0;Q<3;++Q)O[j+Q]=Math.min($*O[j+Q],255)}}C.toImage=function(O){var D=this;O||(O="png"),D.staticMode&&D.container.appendChild(i),D.glplot.redraw();var B=D.glplot.gl,F=B.drawingBufferWidth,P=B.drawingBufferHeight;B.bindFramebuffer(B.FRAMEBUFFER,null);var j=new Uint8Array(F*P*4);B.readPixels(0,0,F,P,B.RGBA,B.UNSIGNED_BYTE,j),z(j,F,P),I(j,F,P);var U=document.createElement("canvas");U.width=F,U.height=P;var $=U.getContext("2d",{willReadFrequently:!0}),Q=$.createImageData(F,P);Q.data.set(j),$.putImageData(Q,0,0);var re;switch(O){case"jpeg":re=U.toDataURL("image/jpeg");break;case"webp":re=U.toDataURL("image/webp");break;default:re=U.toDataURL("image/png")}return D.staticMode&&D.container.removeChild(i),re},C.setConvert=function(){for(var O=this,D=0;D<3;D++){var B=O.fullSceneLayout[T[D]];r.setConvert(B,O.fullLayout),B.setScale=t.noop}},C.make4thDimension=function(){var O=this,D=O.graphDiv,B=D._fullLayout;O._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},r.setConvert(O._mockAxis,B)},V.exports=M}}),ON=ze({"src/plots/gl3d/layout/attributes.js"(J,V){"use strict";V.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),yA=ze({"src/plots/gl3d/layout/axis_attributes.js"(J,V){"use strict";var p=Qn(),b=cf(),E=Ki().extendFlat,k=Al().overrideAll;V.exports=k({visible:b.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:p.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:b.color,categoryorder:b.categoryorder,categoryarray:b.categoryarray,title:{text:b.title.text,font:b.title.font},type:E({},b.type,{values:["-","linear","log","date","category"]}),autotypenumbers:b.autotypenumbers,autorange:b.autorange,autorangeoptions:{minallowed:b.autorangeoptions.minallowed,maxallowed:b.autorangeoptions.maxallowed,clipmin:b.autorangeoptions.clipmin,clipmax:b.autorangeoptions.clipmax,include:b.autorangeoptions.include,editType:"plot"},rangemode:b.rangemode,minallowed:b.minallowed,maxallowed:b.maxallowed,range:E({},b.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:b.minor.tickmode,nticks:b.nticks,tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,mirror:b.mirror,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,showticklabels:b.showticklabels,labelalias:b.labelalias,tickfont:b.tickfont,tickangle:b.tickangle,tickprefix:b.tickprefix,showtickprefix:b.showtickprefix,ticksuffix:b.ticksuffix,showticksuffix:b.showticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickformat:b.tickformat,tickformatstops:b.tickformatstops,hoverformat:b.hoverformat,showline:b.showline,linecolor:b.linecolor,linewidth:b.linewidth,showgrid:b.showgrid,gridcolor:E({},b.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:b.gridwidth,zeroline:b.zeroline,zerolinecolor:b.zerolinecolor,zerolinewidth:b.zerolinewidth},"plot","from-root")}}),_A=ze({"src/plots/gl3d/layout/layout_attributes.js"(J,V){"use strict";var p=yA(),b=Ml().attributes,E=Ki().extendFlat,k=Nr().counterRegex;function l(e,t,n){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:n,editType:"camera"},editType:"camera"}}V.exports={_arrayAttrRegexps:[k("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:E(l(0,0,1),{}),center:E(l(0,0,0),{}),eye:E(l(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:b({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:p,yaxis:p,zaxis:p,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot"}}}),NN=ze({"src/plots/gl3d/layout/axis_defaults.js"(J,V){"use strict";var p=Qn(),b=Nr(),E=hs(),k=yA(),l=E5(),e=y1(),t=["xaxis","yaxis","zaxis"],n=100*136/187;V.exports=function(a,o,s){var c,m;function h(i,w){return b.coerce(c,m,k,i,w)}for(var v=0;v1;function h(v){if(!m){var g=p.validate(o[v],e[v]);if(g)return o[v]}}k(o,s,c,{type:n,attributes:e,handleDefaults:r,fullLayout:s,font:s.font,fullData:c,getDfltFromLayout:h,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function r(a,o,s,c){for(var m=s("bgcolor"),h=b.combine(m,c.paper_bgcolor),v=["up","center","eye"],g=0;g.999)&&(C="turntable")}else C="turntable";s("dragmode",C),s("hovermode",c.getDfltFromLayout("hovermode"))}}}),xv=ze({"src/plots/gl3d/index.js"(J){"use strict";var V=Al().overrideAll,p=rv(),b=BN(),E=zf().getSubplotData,k=Nr(),l=nd(),e="gl3d",t="scene";J.name=e,J.attr=t,J.idRoot=t,J.idRegex=J.attrRegex=k.counterRegex("scene"),J.attributes=ON(),J.layoutAttributes=_A(),J.baseLayoutAttrOverrides=V({hoverlabel:p.hoverlabel},"plot","nested"),J.supplyLayoutDefaults=jN(),J.plot=function(r){for(var a=r._fullLayout,o=r._fullData,s=a._subplots[e],c=0;c0){z=c[I];break}return z}function g(A,x){if(!(A<1||x<1)){for(var z=h(A),I=h(x),O=1,D=0;DM;)I--,I/=v(I),I++,I1?O:1};function C(A,x,z){var I=z[8]+z[2]*x[0]+z[5]*x[1];return A[0]=(z[6]+z[0]*x[0]+z[3]*x[1])/I,A[1]=(z[7]+z[1]*x[0]+z[4]*x[1])/I,A}function _(A,x,z){return T(A,x,C,z),A}function T(A,x,z,I){for(var O=[0,0],D=A.shape[0],B=A.shape[1],F=0;F0&&this.contourStart[I]!==null&&this.contourEnd[I]!==null&&this.contourEnd[I]>this.contourStart[I]))for(x[I]=!0,O=this.contourStart[I];OQ&&(this.minValues[j]=Q),this.maxValues[j]c&&(n.isomin=null,n.isomax=null);var m=o("x"),h=o("y"),v=o("z"),g=o("value");if(!m||!m.length||!h||!h.length||!v||!v.length||!g||!g.length){n.visible=!1;return}var i=b.getComponentMethod("calendars","handleTraceDefaults");i(t,n,["x","y","z"],a),o("valuehoverformat"),["x","y","z"].forEach(function(C){o(C+"hoverformat");var _="caps."+C,T=o(_+".show");T&&o(_+".fill");var f="slices."+C,u=o(f+".show");u&&(o(f+".fill"),o(f+".locations"))});var w=o("spaceframe.show");w&&o("spaceframe.fill");var S=o("surface.show");S&&(o("surface.count"),o("surface.fill"),o("surface.pattern"));var M=o("contour.show");M&&(o("contour.color"),o("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(C){o(C)}),k(t,n,a,o,{prefix:"",cLetter:"c"}),n._length=null}V.exports={supplyDefaults:l,supplyIsoDefaults:e}}}),A2=ze({"src/traces/streamtube/calc.js"(J,V){"use strict";var p=Nr(),b=Qf();function E(t,n){n._len=Math.min(n.u.length,n.v.length,n.w.length,n.x.length,n.y.length,n.z.length),n._u=e(n.u,n._len),n._v=e(n.v,n._len),n._w=e(n.w,n._len),n._x=e(n.x,n._len),n._y=e(n.y,n._len),n._z=e(n.z,n._len);var r=k(n);n._gridFill=r.fill,n._Xs=r.Xs,n._Ys=r.Ys,n._Zs=r.Zs,n._len=r.len;var a=0,o,s,c;n.starts&&(o=e(n.starts.x||[]),s=e(n.starts.y||[]),c=e(n.starts.z||[]),a=Math.min(o.length,s.length,c.length)),n._startsX=o||[],n._startsY=s||[],n._startsZ=c||[];var m=0,h=1/0,v;for(v=0;v1&&(u=n[o-1],x=r[o-1],I=a[o-1]),s=0;su?"-":"+")+"x"),M=M.replace("y",(A>x?"-":"+")+"y"),M=M.replace("z",(z>I?"-":"+")+"z");var F=function(){o=0,O=[],D=[],B=[]};(!o||o0;h--){var v=Math.min(m[h],m[h-1]),g=Math.max(m[h],m[h-1]);if(g>v&&v-1}function ee(Ot,vt){return Ot===null?vt:Ot}function ae(Ot,vt,ht){re();var De=[vt],Ne=[ht];if(H>=1)De=[vt],Ne=[ht];else if(H>0){var We=q(vt,ht);De=We.xyzv,Ne=We.abc}for(var Ke=0;Ke-1?ht[et]:Q(Mt,pt,Pt);qt>-1?Je[et]=qt:Je[et]=se(Mt,pt,Pt,ee(Ot,Ct))}G(Je[0],Je[1],Je[2])}}function he(Ot,vt,ht){var De=function(Ne,We,Ke){ae(Ot,[vt[Ne],vt[We],vt[Ke]],[ht[Ne],ht[We],ht[Ke]])};De(0,1,2),De(2,3,0)}function xe(Ot,vt,ht){var De=function(Ne,We,Ke){ae(Ot,[vt[Ne],vt[We],vt[Ke]],[ht[Ne],ht[We],ht[Ke]])};De(0,1,2),De(3,0,1),De(2,3,0),De(1,2,3)}function we(Ot,vt,ht,De){var Ne=Ot[3];NeDe&&(Ne=De);for(var We=(Ot[3]-Ne)/(Ot[3]-vt[3]+1e-9),Ke=[],Je=0;Je<4;Je++)Ke[Je]=(1-We)*Ot[Je]+We*vt[Je];return Ke}function Me(Ot,vt,ht){return Ot>=vt&&Ot<=ht}function Se(Ot){var vt=.001*(F-B);return Ot>=B-vt&&Ot<=F+vt}function Ie(Ot){for(var vt=[],ht=0;ht<4;ht++){var De=Ot[ht];vt.push([c._x[De],c._y[De],c._z[De],c._value[De]])}return vt}var Ve=3;function Ge(Ot,vt,ht,De,Ne,We){We||(We=1),ht=[-1,-1,-1];var Ke=!1,Je=[Me(vt[0][3],De,Ne),Me(vt[1][3],De,Ne),Me(vt[2][3],De,Ne)];if(!Je[0]&&!Je[1]&&!Je[2])return!1;var et=function(pt,Pt,Ct){return Se(Pt[0][3])&&Se(Pt[1][3])&&Se(Pt[2][3])?(ae(pt,Pt,Ct),!0):WeJe?[O,We]:[We,D];Tt(vt,et[0],et[1])}}var Mt=[[Math.min(B,D),Math.max(B,D)],[Math.min(O,F),Math.max(O,F)]];["x","y","z"].forEach(function(pt){for(var Pt=[],Ct=0;Ct0&&(Yt.push(ur.id),pt==="x"?Rt.push([ur.distRatio,0,0]):pt==="y"?Rt.push([0,ur.distRatio,0]):Rt.push([0,0,ur.distRatio]))}else pt==="x"?Kr=_r(1,u-1):pt==="y"?Kr=_r(1,A-1):Kr=_r(1,x-1);Yt.length>0&&(pt==="x"?Pt[qt]=At(Ot,Yt,Vt,Ht,Rt,Pt[qt]):pt==="y"?Pt[qt]=$t(Ot,Yt,Vt,Ht,Rt,Pt[qt]):Pt[qt]=rr(Ot,Yt,Vt,Ht,Rt,Pt[qt]),qt++),Kr.length>0&&(pt==="x"?Pt[qt]=Be(Ot,Kr,Vt,Ht,Pt[qt]):pt==="y"?Pt[qt]=Xe(Ot,Kr,Vt,Ht,Pt[qt]):Pt[qt]=Ye(Ot,Kr,Vt,Ht,Pt[qt]),qt++)}var cr=c.caps[pt];cr.show&&cr.fill&&(Y(cr.fill),pt==="x"?Pt[qt]=Be(Ot,[0,u-1],Vt,Ht,Pt[qt]):pt==="y"?Pt[qt]=Xe(Ot,[0,A-1],Vt,Ht,Pt[qt]):Pt[qt]=Ye(Ot,[0,x-1],Vt,Ht,Pt[qt]),qt++)}}),S===0&&ne(),c._meshX=P,c._meshY=j,c._meshZ=U,c._meshIntensity=$,c._Xs=_,c._Ys=T,c._Zs=f}return or(),c}function s(c,m){var h=c.glplot.gl,v=p({gl:h}),g=new n(c,v,m.uid);return v._trace=g,g.update(m),c.glplot.add(v),g}V.exports={findNearestOnAxis:t,generateIsoMeshes:o,createIsosurfaceTrace:s}}}),YN=ze({"src/traces/isosurface/index.js"(J,V){"use strict";V.exports={attributes:T2(),supplyDefaults:bA().supplyDefaults,calc:wA(),colorbar:{min:"cmin",max:"cmax"},plot:M2().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),XN=ze({"lib/isosurface.js"(J,V){"use strict";V.exports=YN()}}),TA=ze({"src/traces/volume/attributes.js"(J,V){"use strict";var p=qs(),b=T2(),E=K1(),k=ws(),l=Ki().extendFlat,e=Al().overrideAll,t=V.exports=e(l({x:b.x,y:b.y,z:b.z,value:b.value,isomin:b.isomin,isomax:b.isomax,surface:b.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:b.slices,caps:b.caps,text:b.text,hovertext:b.hovertext,xhoverformat:b.xhoverformat,yhoverformat:b.yhoverformat,zhoverformat:b.zhoverformat,valuehoverformat:b.valuehoverformat,hovertemplate:b.hovertemplate,hovertemplatefallback:b.hovertemplatefallback},p("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:b.colorbar,opacity:b.opacity,opacityscale:E.opacityscale,lightposition:b.lightposition,lighting:b.lighting,flatshading:b.flatshading,contour:b.contour,hoverinfo:l({},k.hoverinfo),showlegend:l({},k.showlegend,{dflt:!1})}),"calc","nested");t.x.editType=t.y.editType=t.z.editType=t.value.editType="calc+clearAxisTypes"}}),ZN=ze({"src/traces/volume/defaults.js"(J,V){"use strict";var p=Nr(),b=TA(),E=bA().supplyIsoDefaults,k=xA().opacityscaleDefaults;V.exports=function(e,t,n,r){function a(o,s){return p.coerce(e,t,b,o,s)}E(e,t,n,r,a),k(e,t,r,a)}}}),$N=ze({"src/traces/volume/convert.js"(J,V){"use strict";var p=df().gl_mesh3d,b=fp().parseColorScale,E=Nr().isArrayOrTypedArray,k=cp(),l=fl().extractOpts,e=mg(),t=M2().findNearestOnAxis,n=M2().generateIsoMeshes;function r(s,c,m){this.scene=s,this.uid=m,this.mesh=c,this.name="",this.data=null,this.showContour=!1}var a=r.prototype;a.handlePick=function(s){if(s.object===this.mesh){var c=s.data.index,m=this.data._meshX[c],h=this.data._meshY[c],v=this.data._meshZ[c],g=this.data._Ys.length,i=this.data._Zs.length,w=t(m,this.data._Xs).id,S=t(h,this.data._Ys).id,M=t(v,this.data._Zs).id,C=s.index=M+i*S+i*g*w;s.traceCoordinate=[this.data._meshX[C],this.data._meshY[C],this.data._meshZ[C],this.data._value[C]];var _=this.data.hovertext||this.data.text;return E(_)&&_[C]!==void 0?s.textLabel=_[C]:_&&(s.textLabel=_),!0}},a.update=function(s){var c=this.scene,m=c.fullSceneLayout;this.data=n(s);function h(S,M,C,_){return M.map(function(T){return S.d2l(T,0,_)*C})}var v=e(h(m.xaxis,s._meshX,c.dataScale[0],s.xcalendar),h(m.yaxis,s._meshY,c.dataScale[1],s.ycalendar),h(m.zaxis,s._meshZ,c.dataScale[2],s.zcalendar)),g=e(s._meshI,s._meshJ,s._meshK),i={positions:v,cells:g,lightPosition:[s.lightposition.x,s.lightposition.y,s.lightposition.z],ambient:s.lighting.ambient,diffuse:s.lighting.diffuse,specular:s.lighting.specular,roughness:s.lighting.roughness,fresnel:s.lighting.fresnel,vertexNormalsEpsilon:s.lighting.vertexnormalsepsilon,faceNormalsEpsilon:s.lighting.facenormalsepsilon,opacity:s.opacity,opacityscale:s.opacityscale,contourEnable:s.contour.show,contourColor:k(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},w=l(s);i.vertexIntensity=s._meshIntensity,i.vertexIntensityBounds=[w.min,w.max],i.colormap=b(s),this.mesh.update(i)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function o(s,c){var m=s.glplot.gl,h=p({gl:m}),v=new r(s,h,c.uid);return h._trace=v,v.update(c),s.glplot.add(h),v}V.exports=o}}),KN=ze({"src/traces/volume/index.js"(J,V){"use strict";V.exports={attributes:TA(),supplyDefaults:ZN(),calc:wA(),colorbar:{min:"cmin",max:"cmax"},plot:$N(),moduleType:"trace",name:"volume",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),JN=ze({"lib/volume.js"(J,V){"use strict";V.exports=KN()}}),QN=ze({"src/traces/mesh3d/defaults.js"(J,V){"use strict";var p=mi(),b=Nr(),E=qc(),k=vg();V.exports=function(e,t,n,r){function a(h,v){return b.coerce(e,t,k,h,v)}function o(h){var v=h.map(function(g){var i=a(g);return i&&b.isArrayOrTypedArray(i)?i:null});return v.every(function(g){return g&&g.length===v[0].length})&&v}var s=o(["x","y","z"]);if(!s){t.visible=!1;return}if(o(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j)){t.visible=!1;return}var c=p.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],r),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(h){a(h)});var m=a("contour.show");m&&(a("contour.color"),a("contour.width")),"intensity"in e?(a("intensity"),a("intensitymode"),E(e,t,r,a,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?a("facecolor"):"vertexcolor"in e?a("vertexcolor"):a("color",n)),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}}),ej=ze({"src/traces/mesh3d/calc.js"(J,V){"use strict";var p=Qf();V.exports=function(E,k){k.intensity&&p(E,k,{vals:k.intensity,containerStr:"",cLetter:"c"})}}}),tj=ze({"src/traces/mesh3d/convert.js"(J,V){"use strict";var p=df().gl_mesh3d,b=df().delaunay_triangulate,E=df().alpha_shape,k=df().convex_hull,l=fp().parseColorScale,e=Nr().isArrayOrTypedArray,t=cp(),n=fl().extractOpts,r=mg();function a(i,w,S){this.scene=i,this.uid=S,this.mesh=w,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var o=a.prototype;o.handlePick=function(i){if(i.object===this.mesh){var w=i.index=i.data.index;i.data._cellCenter?i.traceCoordinate=i.data.dataCoordinate:i.traceCoordinate=[this.data.x[w],this.data.y[w],this.data.z[w]];var S=this.data.hovertext||this.data.text;return e(S)&&S[w]!==void 0?i.textLabel=S[w]:S&&(i.textLabel=S),!0}};function s(i){for(var w=[],S=i.length,M=0;M=w-.5)return!1;return!0}o.update=function(i){var w=this.scene,S=w.fullSceneLayout;this.data=i;var M=i.x.length,C=r(c(S.xaxis,i.x,w.dataScale[0],i.xcalendar),c(S.yaxis,i.y,w.dataScale[1],i.ycalendar),c(S.zaxis,i.z,w.dataScale[2],i.zcalendar)),_;if(i.i&&i.j&&i.k){if(i.i.length!==i.j.length||i.j.length!==i.k.length||!v(i.i,M)||!v(i.j,M)||!v(i.k,M))return;_=r(m(i.i),m(i.j),m(i.k))}else i.alphahull===0?_=k(C):i.alphahull>0?_=E(i.alphahull,C):_=h(i.delaunayaxis,C);var T={positions:C,cells:_,lightPosition:[i.lightposition.x,i.lightposition.y,i.lightposition.z],ambient:i.lighting.ambient,diffuse:i.lighting.diffuse,specular:i.lighting.specular,roughness:i.lighting.roughness,fresnel:i.lighting.fresnel,vertexNormalsEpsilon:i.lighting.vertexnormalsepsilon,faceNormalsEpsilon:i.lighting.facenormalsepsilon,opacity:i.opacity,contourEnable:i.contour.show,contourColor:t(i.contour.color).slice(0,3),contourWidth:i.contour.width,useFacetNormals:i.flatshading};if(i.intensity){var f=n(i);this.color="#fff";var u=i.intensitymode;T[u+"Intensity"]=i.intensity,T[u+"IntensityBounds"]=[f.min,f.max],T.colormap=l(i)}else i.vertexcolor?(this.color=i.vertexcolor[0],T.vertexColors=s(i.vertexcolor)):i.facecolor?(this.color=i.facecolor[0],T.cellColors=s(i.facecolor)):(this.color=i.color,T.meshColor=t(i.color));this.mesh.update(T)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function g(i,w){var S=i.glplot.gl,M=p({gl:S}),C=new a(i,M,w.uid);return M._trace=C,C.update(w),i.glplot.add(M),C}V.exports=g}}),rj=ze({"src/traces/mesh3d/index.js"(J,V){"use strict";V.exports={attributes:vg(),supplyDefaults:QN(),calc:ej(),colorbar:{min:"cmin",max:"cmax"},plot:tj(),moduleType:"trace",name:"mesh3d",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),aj=ze({"lib/mesh3d.js"(J,V){"use strict";V.exports=rj()}}),AA=ze({"src/traces/cone/attributes.js"(J,V){"use strict";var p=qs(),b=Il().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:k}=xs(),l=vg(),e=ws(),t=Ki().extendFlat,n={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:E({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:k({editType:"calc"}),uhoverformat:b("u",1),vhoverformat:b("v",1),whoverformat:b("w",1),xhoverformat:b("x"),yhoverformat:b("y"),zhoverformat:b("z"),showlegend:t({},e.showlegend,{dflt:!1})};t(n,p("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(a){n[a]=l[a]}),n.hoverinfo=t({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),V.exports=n}}),nj=ze({"src/traces/cone/defaults.js"(J,V){"use strict";var p=Nr(),b=qc(),E=AA();V.exports=function(l,e,t,n){function r(g,i){return p.coerce(l,e,E,g,i)}var a=r("u"),o=r("v"),s=r("w"),c=r("x"),m=r("y"),h=r("z");if(!a||!a.length||!o||!o.length||!s||!s.length||!c||!c.length||!m||!m.length||!h||!h.length){e.visible=!1;return}var v=r("sizemode");r("sizeref",v==="raw"?1:.5),r("anchor"),r("lighting.ambient"),r("lighting.diffuse"),r("lighting.specular"),r("lighting.roughness"),r("lighting.fresnel"),r("lightposition.x"),r("lightposition.y"),r("lightposition.z"),b(l,e,n,r,{prefix:"",cLetter:"c"}),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),r("uhoverformat"),r("vhoverformat"),r("whoverformat"),r("xhoverformat"),r("yhoverformat"),r("zhoverformat"),e._length=null}}}),ij=ze({"src/traces/cone/calc.js"(J,V){"use strict";var p=Qf();V.exports=function(E,k){for(var l=k.u,e=k.v,t=k.w,n=Math.min(k.x.length,k.y.length,k.z.length,l.length,e.length,t.length),r=-1/0,a=1/0,o=0;o2?v=m.slice(1,h-1):h===2?v=[(m[0]+m[1])/2]:v=m,v}function o(m){var h=m.length;return h===1?[.5,.5]:[m[1]-m[0],m[h-1]-m[h-2]]}function s(m,h){var v=m.fullSceneLayout,g=m.dataScale,i=h._len,w={};function S(se,G){var X=v[G],K=g[t[G]];return E.simpleMap(se,function(H){return X.d2l(H)*K})}if(w.vectors=e(S(h._u,"xaxis"),S(h._v,"yaxis"),S(h._w,"zaxis"),i),!i)return{positions:[],cells:[]};var M=S(h._Xs,"xaxis"),C=S(h._Ys,"yaxis"),_=S(h._Zs,"zaxis");w.meshgrid=[M,C,_],w.gridFill=h._gridFill;var T=h._slen;if(T)w.startingPositions=e(S(h._startsX,"xaxis"),S(h._startsY,"yaxis"),S(h._startsZ,"zaxis"));else{for(var f=C[0],u=a(M),A=a(_),x=new Array(u.length*A.length),z=0,I=0;If&&(f=z[0]),z[1]u&&(u=z[1])}function x(z){switch(z.type){case"GeometryCollection":z.geometries.forEach(x);break;case"Point":A(z.coordinates);break;case"MultiPoint":z.coordinates.forEach(A);break}}S.arcs.forEach(function(z){for(var I=-1,O=z.length,D;++If&&(f=D[0]),D[1]u&&(u=D[1])});for(C in S.objects)x(S.objects[C]);return[_,T,f,u]}function l(S,M){for(var C,_=S.length,T=_-M;T<--_;)C=S[T],S[T++]=S[_],S[_]=C}function e(S,M){return typeof M=="string"&&(M=S.objects[M]),M.type==="GeometryCollection"?{type:"FeatureCollection",features:M.geometries.map(function(C){return t(S,C)})}:t(S,M)}function t(S,M){var C=M.id,_=M.bbox,T=M.properties==null?{}:M.properties,f=n(S,M);return C==null&&_==null?{type:"Feature",properties:T,geometry:f}:_==null?{type:"Feature",id:C,properties:T,geometry:f}:{type:"Feature",id:C,bbox:_,properties:T,geometry:f}}function n(S,M){var C=E(S.transform),_=S.arcs;function T(I,O){O.length&&O.pop();for(var D=_[I<0?~I:I],B=0,F=D.length;B1)_=s(S,M,C);else for(T=0,_=new Array(f=S.arcs.length);T1)for(var O=1,D=A(z[0]),B,F;OD&&(F=z[0],z[0]=z[O],z[O]=F,D=B);return z}).filter(function(x){return x.length>0})}}function v(S,M){for(var C=0,_=S.length;C<_;){var T=C+_>>>1;S[T]=2))throw new Error("n must be \u22652");x=S.bbox||k(S);var C=x[0],_=x[1],T=x[2],f=x[3],u;M={scale:[T-C?(T-C)/(u-1):1,f-_?(f-_)/(u-1):1],translate:[C,_]}}else x=S.bbox;var A=i(M),x,z,I=S.objects,O={};function D(P){return A(P)}function B(P){var j;switch(P.type){case"GeometryCollection":j={type:"GeometryCollection",geometries:P.geometries.map(B)};break;case"Point":j={type:"Point",coordinates:D(P.coordinates)};break;case"MultiPoint":j={type:"MultiPoint",coordinates:P.coordinates.map(D)};break;default:return P}return P.id!=null&&(j.id=P.id),P.bbox!=null&&(j.bbox=P.bbox),P.properties!=null&&(j.properties=P.properties),j}function F(P){var j=0,U=1,$=P.length,Q,re=new Array($);for(re[0]=A(P[0],0);++j<$;)((Q=A(P[j],j))[0]||Q[1])&&(re[U++]=Q);return U===1&&(re[U++]=[0,0]),re.length=U,re}for(z in I)O[z]=B(I[z]);return{type:"Topology",bbox:x,transform:M,objects:O,arcs:S.arcs.map(F)}}p.bbox=k,p.feature=e,p.merge=m,p.mergeArcs=h,p.mesh=a,p.meshArcs=o,p.neighbors=g,p.quantize=w,p.transform=E,p.untransform=i,Object.defineProperty(p,"__esModule",{value:!0})})}}),S2=ze({"src/lib/topojson_utils.js"(J,V){"use strict";var p=V.exports={},b=J1().locationmodeToLayer,E=EA().feature;p.getTopojsonName=function(k){return[k.scope.replace(/ /g,"-"),"_",k.resolution.toString(),"m"].join("")},p.getTopojsonPath=function(k,l){return k+=k.endsWith("/")?"":"/",`${k}${l}.json`},p.getTopojsonFeatures=function(k,l){var e=b[k.locationmode],t=l.objects[e];return E(l,t).features}}}),Q1=ze({"src/lib/geojson_utils.js"(J){"use strict";var V=No().BADNUM;J.calcTraceToLineCoords=function(p){for(var b=p[0].trace,E=b.connectgaps,k=[],l=[],e=0;e0&&(k.push(l),l=[])}return l.length>0&&k.push(l),k},J.makeLine=function(p){return p.length===1?{type:"LineString",coordinates:p[0]}:{type:"MultiLineString",coordinates:p}},J.makePolygon=function(p){if(p.length===1)return{type:"Polygon",coordinates:p};for(var b=new Array(p.length),E=0;E{for(var S in w)p(i,S,{get:w[S],enumerable:!0})},e=(i,w,S,M)=>{if(w&&typeof w=="object"||typeof w=="function")for(let C of E(w))!k.call(i,C)&&C!==S&&p(i,C,{get:()=>w[C],enumerable:!(M=b(w,C))||M.enumerable});return i},t=i=>e(p({},"__esModule",{value:!0}),i),n={};l(n,{COUNTRIES:()=>r,byAlpha2:()=>v,byAlpha3:()=>h,byM49:()=>g,createLookup:()=>o,lookup:()=>c,lookupAlpha3:()=>m,sanitize:()=>a}),V.exports=t(n);var r=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\u{1F1F3}\u{1F1F7}","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function a(i){return i.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function o(i){let w=new Map,S=new Map,M=new Map;for(let f of i)w.set(f.iso3,f),f.iso2&&S.set(f.iso2,f),f.m49&&M.set(f.m49,f);let C=new Map;for(let f of i)for(let u of[f.name,...f.aliases]){let A=a(u),x=C.get(A);if(x!==void 0&&x!==f.iso3)throw new Error(`Duplicate name/alias "${A}": ${x} vs ${f.iso3}`);C.set(A,f.iso3)}function _(f){if(f==null)return;let u=String(f).trim();if(!u)return;if(/^\d+$/.test(u)){let x=M.get(String(parseInt(u,10)).padStart(3,"0"));if(x)return x}if(/^[A-Za-z]{2}$/.test(u)){let x=S.get(u.toUpperCase());if(x)return x}if(/^[A-Za-z]{3}$/.test(u)){let x=w.get(u.toUpperCase());if(x)return x}let A=C.get(a(u));return A===void 0?void 0:w.get(A)}function T(f){var u;return(u=_(f))==null?void 0:u.iso3}return{lookup:_,lookupAlpha3:T,byAlpha3:w,byAlpha2:S,byM49:M}}var s=o(r),c=s.lookup,m=s.lookupAlpha3,h=s.byAlpha3,v=s.byAlpha2,g=s.byM49}}),E2=ze({"node_modules/@turf/helpers/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=63710088e-1,p={centimeters:V*100,centimetres:V*100,degrees:360/(2*Math.PI),feet:V*3.28084,inches:V*39.37,kilometers:V/1e3,kilometres:V/1e3,meters:V,metres:V,miles:V/1609.344,millimeters:V*1e3,millimetres:V*1e3,nauticalmiles:V/1852,radians:1,yards:V*1.0936},b={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function E(I,O,D={}){let B={type:"Feature"};return(D.id===0||D.id)&&(B.id=D.id),D.bbox&&(B.bbox=D.bbox),B.properties=O||{},B.geometry=I,B}function k(I,O,D={}){switch(I){case"Point":return l(O).geometry;case"LineString":return r(O).geometry;case"Polygon":return t(O).geometry;case"MultiPoint":return c(O).geometry;case"MultiLineString":return s(O).geometry;case"MultiPolygon":return m(O).geometry;default:throw new Error(I+" is invalid")}}function l(I,O,D={}){if(!I)throw new Error("coordinates is required");if(!Array.isArray(I))throw new Error("coordinates must be an Array");if(I.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!u(I[0])||!u(I[1]))throw new Error("coordinates must contain numbers");return E({type:"Point",coordinates:I},O,D)}function e(I,O,D={}){return o(I.map(B=>l(B,O)),D)}function t(I,O,D={}){for(let F of I){if(F.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(F[F.length-1].length!==F[0].length)throw new Error("First and last Position are not equivalent.");for(let P=0;Pt(B,O)),D)}function r(I,O,D={}){if(I.length<2)throw new Error("coordinates must be an array of two or more positions");return E({type:"LineString",coordinates:I},O,D)}function a(I,O,D={}){return o(I.map(B=>r(B,O)),D)}function o(I,O={}){let D={type:"FeatureCollection"};return O.id&&(D.id=O.id),O.bbox&&(D.bbox=O.bbox),D.features=I,D}function s(I,O,D={}){return E({type:"MultiLineString",coordinates:I},O,D)}function c(I,O,D={}){return E({type:"MultiPoint",coordinates:I},O,D)}function m(I,O,D={}){return E({type:"MultiPolygon",coordinates:I},O,D)}function h(I,O,D={}){return E({type:"GeometryCollection",geometries:I},O,D)}function v(I,O=0){if(O&&!(O>=0))throw new Error("precision must be a positive number");let D=Math.pow(10,O||0);return Math.round(I*D)/D}function g(I,O="kilometers"){let D=p[O];if(!D)throw new Error(O+" units is invalid");return I*D}function i(I,O="kilometers"){let D=p[O];if(!D)throw new Error(O+" units is invalid");return I/D}function w(I,O){return C(i(I,O))}function S(I){let O=I%360;return O<0&&(O+=360),O}function M(I){return I=I%360,I>180?I-360:I<-180?I+360:I}function C(I){return I%(2*Math.PI)*180/Math.PI}function _(I){return I%360*Math.PI/180}function T(I,O="kilometers",D="kilometers"){if(!(I>=0))throw new Error("length must be a positive number");return g(i(I,O),D)}function f(I,O="meters",D="kilometers"){if(!(I>=0))throw new Error("area must be a positive number");let B=b[O];if(!B)throw new Error("invalid original units");let F=b[D];if(!F)throw new Error("invalid final units");return I/B*F}function u(I){return!isNaN(I)&&I!==null&&!Array.isArray(I)}function A(I){return I!==null&&typeof I=="object"&&!Array.isArray(I)}function x(I){if(!I)throw new Error("bbox is required");if(!Array.isArray(I))throw new Error("bbox must be an Array");if(I.length!==4&&I.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");I.forEach(O=>{if(!u(O))throw new Error("bbox must only contain numbers")})}function z(I){if(!I)throw new Error("id is required");if(["string","number"].indexOf(typeof I)===-1)throw new Error("id must be a number or a string")}J.areaFactors=b,J.azimuthToBearing=M,J.bearingToAzimuth=S,J.convertArea=f,J.convertLength=T,J.degreesToRadians=_,J.earthRadius=V,J.factors=p,J.feature=E,J.featureCollection=o,J.geometry=k,J.geometryCollection=h,J.isNumber=u,J.isObject=A,J.lengthToDegrees=w,J.lengthToRadians=i,J.lineString=r,J.lineStrings=a,J.multiLineString=s,J.multiPoint=c,J.multiPolygon=m,J.point=l,J.points=e,J.polygon=t,J.polygons=n,J.radiansToDegrees=C,J.radiansToLength=g,J.round=v,J.validateBBox=x,J.validateId=z}}),k2=ze({"node_modules/@turf/meta/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=E2();function p(i,w,S){if(i!==null)for(var M,C,_,T,f,u,A,x=0,z=0,I,O=i.type,D=O==="FeatureCollection",B=O==="Feature",F=D?i.features.length:1,P=0;Pu||D>A||B>x){f=z,u=M,A=D,x=B,_=0;return}var F=V.lineString.call(void 0,[f,z],S.properties);if(w(F,M,C,B,_)===!1)return!1;_++,f=z})===!1)return!1}}})}function c(i,w,S){var M=S,C=!1;return s(i,function(_,T,f,u,A){C===!1&&S===void 0?M=_:M=w(M,_,T,f,u,A),C=!0}),M}function m(i,w){if(!i)throw new Error("geojson is required");a(i,function(S,M,C){if(S.geometry!==null){var _=S.geometry.type,T=S.geometry.coordinates;switch(_){case"LineString":if(w(S,M,C,0,0)===!1)return!1;break;case"Polygon":for(var f=0;fa+E(o),0)}function E(r){let a=0,o;switch(r.type){case"Polygon":return k(r.coordinates);case"MultiPolygon":for(o=0;o0){a+=Math.abs(t(r[0]));for(let o=1;o=a?(s+2)%a:s+2],v=c[0]*e,g=m[1]*e,i=h[0]*e;o+=(i-v)*Math.sin(g),s++}return o*l}var n=b;J.area=b,J.default=n}}),gj=ze({"node_modules/@turf/centroid/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=E2(),p=k2();function b(k,l={}){let e=0,t=0,n=0;return p.coordEach.call(void 0,k,function(r){e+=r[0],t+=r[1],n++},!0),V.point.call(void 0,[e/n,t/n],l.properties)}var E=b;J.centroid=b,J.default=E}}),yj=ze({"node_modules/d3-geo/node_modules/d3-array/dist/d3-array.js"(J,V){(function(p,b){b(typeof J=="object"&&typeof V<"u"?J:p.d3=p.d3||{})})(J,function(p){"use strict";function b(K,H){return KH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q0?1:Ft<0?-1:0},f=Math.sqrt,u=Math.tan;function A(Ft){return Ft>1?0:Ft<-1?r:Math.acos(Ft)}function x(Ft){return Ft>1?a:Ft<-1?-a:Math.asin(Ft)}function z(Ft){return(Ft=_(Ft/2))*Ft}function I(){}function O(Ft,tr){Ft&&B.hasOwnProperty(Ft.type)&&B[Ft.type](Ft,tr)}var D={Feature:function(Ft,tr){O(Ft.geometry,tr)},FeatureCollection:function(Ft,tr){for(var Fr=Ft.features,wr=-1,ea=Fr.length;++wr=0?1:-1,ea=wr*Fr,ba=i(tr),Ia=_(tr),Na=G*Ia,Za=se*ba+Na*i(ea),mn=Na*wr*_(ea);U.add(g(mn,Za)),ne=Ft,se=ba,G=Ia}function Z(Ft){return $.reset(),j(Ft,X),$*2}function ee(Ft){return[g(Ft[1],Ft[0]),x(Ft[2])]}function ae(Ft){var tr=Ft[0],Fr=Ft[1],wr=i(Fr);return[wr*i(tr),wr*_(tr),_(Fr)]}function he(Ft,tr){return Ft[0]*tr[0]+Ft[1]*tr[1]+Ft[2]*tr[2]}function xe(Ft,tr){return[Ft[1]*tr[2]-Ft[2]*tr[1],Ft[2]*tr[0]-Ft[0]*tr[2],Ft[0]*tr[1]-Ft[1]*tr[0]]}function we(Ft,tr){Ft[0]+=tr[0],Ft[1]+=tr[1],Ft[2]+=tr[2]}function Me(Ft,tr){return[Ft[0]*tr,Ft[1]*tr,Ft[2]*tr]}function Se(Ft){var tr=f(Ft[0]*Ft[0]+Ft[1]*Ft[1]+Ft[2]*Ft[2]);Ft[0]/=tr,Ft[1]/=tr,Ft[2]/=tr}var Ie,Ve,Ge,ke,_e,ce,ve,le,Ae=E(),Be,Xe,Ye={point:yt,lineStart:Tt,lineEnd:At,polygonStart:function(){Ye.point=$t,Ye.lineStart=rr,Ye.lineEnd=_r,Ae.reset(),X.polygonStart()},polygonEnd:function(){X.polygonEnd(),Ye.point=yt,Ye.lineStart=Tt,Ye.lineEnd=At,U<0?(Ie=-(Ge=180),Ve=-(ke=90)):Ae>t?ke=90:Ae<-t&&(Ve=-90),Xe[0]=Ie,Xe[1]=Ge},sphere:function(){Ie=-(Ge=180),Ve=-(ke=90)}};function yt(Ft,tr){Be.push(Xe=[Ie=Ft,Ge=Ft]),trke&&(ke=tr)}function gt(Ft,tr){var Fr=ae([Ft*m,tr*m]);if(le){var wr=xe(le,Fr),ea=[wr[1],-wr[0],0],ba=xe(ea,wr);Se(ba),ba=ee(ba);var Ia=Ft-_e,Na=Ia>0?1:-1,Za=ba[0]*c*Na,mn,Da=h(Ia)>180;Da^(Na*_eke&&(ke=mn)):(Za=(Za+360)%360-180,Da^(Na*_eke&&(ke=tr))),Da?Ft<_e?Xt(Ie,Ft)>Xt(Ie,Ge)&&(Ge=Ft):Xt(Ft,Ge)>Xt(Ie,Ge)&&(Ie=Ft):Ge>=Ie?(FtGe&&(Ge=Ft)):Ft>_e?Xt(Ie,Ft)>Xt(Ie,Ge)&&(Ge=Ft):Xt(Ft,Ge)>Xt(Ie,Ge)&&(Ie=Ft)}else Be.push(Xe=[Ie=Ft,Ge=Ft]);trke&&(ke=tr),le=Fr,_e=Ft}function Tt(){Ye.point=gt}function At(){Xe[0]=Ie,Xe[1]=Ge,Ye.point=yt,le=null}function $t(Ft,tr){if(le){var Fr=Ft-_e;Ae.add(h(Fr)>180?Fr+(Fr>0?360:-360):Fr)}else ce=Ft,ve=tr;X.point(Ft,tr),gt(Ft,tr)}function rr(){X.lineStart()}function _r(){$t(ce,ve),X.lineEnd(),h(Ae)>t&&(Ie=-(Ge=180)),Xe[0]=Ie,Xe[1]=Ge,le=null}function Xt(Ft,tr){return(tr-=Ft)<0?tr+360:tr}function or(Ft,tr){return Ft[0]-tr[0]}function Ot(Ft,tr){return Ft[0]<=Ft[1]?Ft[0]<=tr&&tr<=Ft[1]:trXt(wr[0],wr[1])&&(wr[1]=ea[1]),Xt(ea[0],wr[1])>Xt(wr[0],wr[1])&&(wr[0]=ea[0])):ba.push(wr=ea);for(Ia=-1/0,Fr=ba.length-1,tr=0,wr=ba[Fr];tr<=Fr;wr=ea,++tr)ea=ba[tr],(Na=Xt(wr[1],ea[0]))>Ia&&(Ia=Na,Ie=ea[0],Ge=wr[1])}return Be=Xe=null,Ie===1/0||Ve===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ie,Ve],[Ge,ke]]}var ht,De,Ne,We,Ke,Je,et,Mt,pt,Pt,Ct,qt,Vt,Ht,Sr,Kr,Yt={sphere:I,point:Rt,lineStart:ur,lineEnd:Qr,polygonStart:function(){Yt.lineStart=Zr,Yt.lineEnd=ha},polygonEnd:function(){Yt.lineStart=ur,Yt.lineEnd=Qr}};function Rt(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr);nr(Fr*i(Ft),Fr*_(Ft),_(tr))}function nr(Ft,tr,Fr){++ht,Ne+=(Ft-Ne)/ht,We+=(tr-We)/ht,Ke+=(Fr-Ke)/ht}function ur(){Yt.point=cr}function cr(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr);Ht=Fr*i(Ft),Sr=Fr*_(Ft),Kr=_(tr),Yt.point=Rr,nr(Ht,Sr,Kr)}function Rr(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr),wr=Fr*i(Ft),ea=Fr*_(Ft),ba=_(tr),Ia=g(f((Ia=Sr*ba-Kr*ea)*Ia+(Ia=Kr*wr-Ht*ba)*Ia+(Ia=Ht*ea-Sr*wr)*Ia),Ht*wr+Sr*ea+Kr*ba);De+=Ia,Je+=Ia*(Ht+(Ht=wr)),et+=Ia*(Sr+(Sr=ea)),Mt+=Ia*(Kr+(Kr=ba)),nr(Ht,Sr,Kr)}function Qr(){Yt.point=Rt}function Zr(){Yt.point=Pa}function ha(){La(qt,Vt),Yt.point=Rt}function Pa(Ft,tr){qt=Ft,Vt=tr,Ft*=m,tr*=m,Yt.point=La;var Fr=i(tr);Ht=Fr*i(Ft),Sr=Fr*_(Ft),Kr=_(tr),nr(Ht,Sr,Kr)}function La(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr),wr=Fr*i(Ft),ea=Fr*_(Ft),ba=_(tr),Ia=Sr*ba-Kr*ea,Na=Kr*wr-Ht*ba,Za=Ht*ea-Sr*wr,mn=f(Ia*Ia+Na*Na+Za*Za),Da=x(mn),Ha=mn&&-Da/mn;pt+=Ha*Ia,Pt+=Ha*Na,Ct+=Ha*Za,De+=Da,Je+=Da*(Ht+(Ht=wr)),et+=Da*(Sr+(Sr=ea)),Mt+=Da*(Kr+(Kr=ba)),nr(Ht,Sr,Kr)}function un(Ft){ht=De=Ne=We=Ke=Je=et=Mt=pt=Pt=Ct=0,j(Ft,Yt);var tr=pt,Fr=Pt,wr=Ct,ea=tr*tr+Fr*Fr+wr*wr;return ear?Ft+Math.round(-Ft/s)*s:Ft,tr]}Nn.invert=Nn;function yn(Ft,tr,Fr){return(Ft%=s)?tr||Fr?ja(li(Ft),Yn(tr,Fr)):li(Ft):tr||Fr?Yn(tr,Fr):Nn}function Un(Ft){return function(tr,Fr){return tr+=Ft,[tr>r?tr-s:tr<-r?tr+s:tr,Fr]}}function li(Ft){var tr=Un(Ft);return tr.invert=Un(-Ft),tr}function Yn(Ft,tr){var Fr=i(Ft),wr=_(Ft),ea=i(tr),ba=_(tr);function Ia(Na,Za){var mn=i(Za),Da=i(Na)*mn,Ha=_(Na)*mn,$a=_(Za),vn=$a*Fr+Da*wr;return[g(Ha*ea-vn*ba,Da*Fr-$a*wr),x(vn*ea+Ha*ba)]}return Ia.invert=function(Na,Za){var mn=i(Za),Da=i(Na)*mn,Ha=_(Na)*mn,$a=_(Za),vn=$a*ea-Ha*ba;return[g(Ha*ea+$a*ba,Da*Fr+vn*wr),x(vn*Fr-Da*wr)]},Ia}function on(Ft){Ft=yn(Ft[0]*m,Ft[1]*m,Ft.length>2?Ft[2]*m:0);function tr(Fr){return Fr=Ft(Fr[0]*m,Fr[1]*m),Fr[0]*=c,Fr[1]*=c,Fr}return tr.invert=function(Fr){return Fr=Ft.invert(Fr[0]*m,Fr[1]*m),Fr[0]*=c,Fr[1]*=c,Fr},tr}function en(Ft,tr,Fr,wr,ea,ba){if(Fr){var Ia=i(tr),Na=_(tr),Za=wr*Fr;ea==null?(ea=tr+wr*s,ba=tr-Za/2):(ea=vi(Ia,ea),ba=vi(Ia,ba),(wr>0?eaba)&&(ea+=wr*s));for(var mn,Da=ea;wr>0?Da>ba:Da1&&Ft.push(Ft.pop().concat(Ft.shift()))},result:function(){var Fr=Ft;return Ft=[],tr=null,Fr}}}function Oa(Ft,tr){return h(Ft[0]-tr[0])=0;--Na)ea.point((Ha=Da[Na])[0],Ha[1]);else wr($a.x,$a.p.x,-1,ea);$a=$a.p}$a=$a.o,Da=$a.z,vn=!vn}while(!$a.v);ea.lineEnd()}}}function fr(Ft){if(tr=Ft.length){for(var tr,Fr=0,wr=Ft[0],ea;++Fr=0?1:-1,Fo=Do*Co,Yo=Fo>r,bo=yi*Ni;if(lr.add(g(bo*Do*_(Fo),_i*Zi+bo*i(Fo))),Ia+=Yo?Co+Do*s:Co,Yo^vn>=Fr^En>=Fr){var Gs=xe(ae($a),ae(ri));Se(Gs);var Es=xe(ba,Gs);Se(Es);var ns=(Yo^Co>=0?-1:1)*x(Es[2]);(wr>ns||wr===ns&&(Gs[0]||Gs[1]))&&(Na+=Yo^Co>=0?1:-1)}}return(Ia<-t||Ia0){for(Za||(ea.polygonStart(),Za=!0),ea.lineStart(),Zi=0;Zi1&&Ln&2&&Ni.push(Ni.pop().concat(Ni.shift())),Da.push(Ni.filter(ot))}}return $a}}function ot(Ft){return Ft.length>1}function kt(Ft,tr){return((Ft=Ft.x)[0]<0?Ft[1]-a-t:a-Ft[1])-((tr=tr.x)[0]<0?tr[1]-a-t:a-tr[1])}var jt=Dr(function(){return!0},ar,xr,[-r,-a]);function ar(Ft){var tr=NaN,Fr=NaN,wr=NaN,ea;return{lineStart:function(){Ft.lineStart(),ea=1},point:function(ba,Ia){var Na=ba>0?r:-r,Za=h(ba-tr);h(Za-r)0?a:-a),Ft.point(wr,Fr),Ft.lineEnd(),Ft.lineStart(),Ft.point(Na,Fr),Ft.point(ba,Fr),ea=0):wr!==Na&&Za>=r&&(h(tr-wr)t?v((_(tr)*(ba=i(wr))*_(Fr)-_(wr)*(ea=i(tr))*_(Ft))/(ea*ba*Ia)):(tr+wr)/2}function xr(Ft,tr,Fr,wr){var ea;if(Ft==null)ea=Fr*a,wr.point(-r,ea),wr.point(0,ea),wr.point(r,ea),wr.point(r,0),wr.point(r,-ea),wr.point(0,-ea),wr.point(-r,-ea),wr.point(-r,0),wr.point(-r,ea);else if(h(Ft[0]-tr[0])>t){var ba=Ft[0]0,ea=h(tr)>t;function ba(Da,Ha,$a,vn){en(vn,Ft,Fr,$a,Da,Ha)}function Ia(Da,Ha){return i(Da)*i(Ha)>tr}function Na(Da){var Ha,$a,vn,Sn,yi;return{lineStart:function(){Sn=vn=!1,yi=1},point:function(_i,ki){var ri=[_i,ki],En,Ln=Ia(_i,ki),Ni=wr?Ln?0:mn(_i,ki):Ln?mn(_i+(_i<0?r:-r),ki):0;if(!Ha&&(Sn=vn=Ln)&&Da.lineStart(),Ln!==vn&&(En=Za(Ha,ri),(!En||Oa(Ha,En)||Oa(ri,En))&&(ri[2]=1)),Ln!==vn)yi=0,Ln?(Da.lineStart(),En=Za(ri,Ha),Da.point(En[0],En[1])):(En=Za(Ha,ri),Da.point(En[0],En[1],2),Da.lineEnd()),Ha=En;else if(ea&&Ha&&wr^Ln){var Zi;!(Ni&$a)&&(Zi=Za(ri,Ha,!0))&&(yi=0,wr?(Da.lineStart(),Da.point(Zi[0][0],Zi[0][1]),Da.point(Zi[1][0],Zi[1][1]),Da.lineEnd()):(Da.point(Zi[1][0],Zi[1][1]),Da.lineEnd(),Da.lineStart(),Da.point(Zi[0][0],Zi[0][1],3)))}Ln&&(!Ha||!Oa(Ha,ri))&&Da.point(ri[0],ri[1]),Ha=ri,vn=Ln,$a=Ni},lineEnd:function(){vn&&Da.lineEnd(),Ha=null},clean:function(){return yi|(Sn&&vn)<<1}}}function Za(Da,Ha,$a){var vn=ae(Da),Sn=ae(Ha),yi=[1,0,0],_i=xe(vn,Sn),ki=he(_i,_i),ri=_i[0],En=ki-ri*ri;if(!En)return!$a&&Da;var Ln=tr*ki/En,Ni=-tr*ri/En,Zi=xe(yi,_i),Co=Me(yi,Ln),Do=Me(_i,Ni);we(Co,Do);var Fo=Zi,Yo=he(Co,Fo),bo=he(Fo,Fo),Gs=Yo*Yo-bo*(he(Co,Co)-1);if(!(Gs<0)){var Es=f(Gs),ns=Me(Fo,(-Yo-Es)/bo);if(we(ns,Co),ns=ee(ns),!$a)return ns;var Kn=Da[0],zo=Ha[0],gs=Da[1],js=Ha[1],Cl;zo0^ns[1]<(h(ns[0]-Kn)r^(Kn<=ns[0]&&ns[0]<=zo)){var xl=Me(Fo,(-Yo+Es)/bo);return we(xl,Co),[ns,ee(xl)]}}}function mn(Da,Ha){var $a=wr?Ft:r-Ft,vn=0;return Da<-$a?vn|=1:Da>$a&&(vn|=2),Ha<-$a?vn|=4:Ha>$a&&(vn|=8),vn}return Dr(Ia,Na,ba,wr?[0,-Ft]:[-r,Ft-r])}function Lr(Ft,tr,Fr,wr,ea,ba){var Ia=Ft[0],Na=Ft[1],Za=tr[0],mn=tr[1],Da=0,Ha=1,$a=Za-Ia,vn=mn-Na,Sn;if(Sn=Fr-Ia,!(!$a&&Sn>0)){if(Sn/=$a,$a<0){if(Sn0){if(Sn>Ha)return;Sn>Da&&(Da=Sn)}if(Sn=ea-Ia,!(!$a&&Sn<0)){if(Sn/=$a,$a<0){if(Sn>Ha)return;Sn>Da&&(Da=Sn)}else if($a>0){if(Sn0)){if(Sn/=vn,vn<0){if(Sn0){if(Sn>Ha)return;Sn>Da&&(Da=Sn)}if(Sn=ba-Na,!(!vn&&Sn<0)){if(Sn/=vn,vn<0){if(Sn>Ha)return;Sn>Da&&(Da=Sn)}else if(vn>0){if(Sn0&&(Ft[0]=Ia+Da*$a,Ft[1]=Na+Da*vn),Ha<1&&(tr[0]=Ia+Ha*$a,tr[1]=Na+Ha*vn),!0}}}}}var aa=1e9,Sa=-aa;function wa(Ft,tr,Fr,wr){function ea(mn,Da){return Ft<=mn&&mn<=Fr&&tr<=Da&&Da<=wr}function ba(mn,Da,Ha,$a){var vn=0,Sn=0;if(mn==null||(vn=Ia(mn,Ha))!==(Sn=Ia(Da,Ha))||Za(mn,Da)<0^Ha>0)do $a.point(vn===0||vn===3?Ft:Fr,vn>1?wr:tr);while((vn=(vn+Ha+4)%4)!==Sn);else $a.point(Da[0],Da[1])}function Ia(mn,Da){return h(mn[0]-Ft)0?0:3:h(mn[0]-Fr)0?2:1:h(mn[1]-tr)0?1:0:Da>0?3:2}function Na(mn,Da){return Za(mn.x,Da.x)}function Za(mn,Da){var Ha=Ia(mn,1),$a=Ia(Da,1);return Ha!==$a?Ha-$a:Ha===0?Da[1]-mn[1]:Ha===1?mn[0]-Da[0]:Ha===2?mn[1]-Da[1]:Da[0]-mn[0]}return function(mn){var Da=mn,Ha=Ja(),$a,vn,Sn,yi,_i,ki,ri,En,Ln,Ni,Zi,Co={point:Do,lineStart:Gs,lineEnd:Es,polygonStart:Yo,polygonEnd:bo};function Do(Kn,zo){ea(Kn,zo)&&Da.point(Kn,zo)}function Fo(){for(var Kn=0,zo=0,gs=vn.length;zowr&&(Hu-Gu)*(wr-xl)>(Su-xl)*(Ft-Gu)&&++Kn:Su<=wr&&(Hu-Gu)*(wr-xl)<(Su-xl)*(Ft-Gu)&&--Kn;return Kn}function Yo(){Da=Ha,$a=[],vn=[],Zi=!0}function bo(){var Kn=Fo(),zo=Zi&&Kn,gs=($a=b.merge($a)).length;(zo||gs)&&(mn.polygonStart(),zo&&(mn.lineStart(),ba(null,null,1,mn),mn.lineEnd()),gs&&rt($a,Na,Kn,ba,mn),mn.polygonEnd()),Da=mn,$a=vn=Sn=null}function Gs(){Co.point=ns,vn&&vn.push(Sn=[]),Ni=!0,Ln=!1,ri=En=NaN}function Es(){$a&&(ns(yi,_i),ki&&Ln&&Ha.rejoin(),$a.push(Ha.result())),Co.point=Do,Ln&&Da.lineEnd()}function ns(Kn,zo){var gs=ea(Kn,zo);if(vn&&Sn.push([Kn,zo]),Ni)yi=Kn,_i=zo,ki=gs,Ni=!1,gs&&(Da.lineStart(),Da.point(Kn,zo));else if(gs&&Ln)Da.point(Kn,zo);else{var js=[ri=Math.max(Sa,Math.min(aa,ri)),En=Math.max(Sa,Math.min(aa,En))],Cl=[Kn=Math.max(Sa,Math.min(aa,Kn)),zo=Math.max(Sa,Math.min(aa,zo))];Lr(js,Cl,Ft,tr,Fr,wr)?(Ln||(Da.lineStart(),Da.point(js[0],js[1])),Da.point(Cl[0],Cl[1]),gs||Da.lineEnd(),Zi=!1):gs&&(Da.lineStart(),Da.point(Kn,zo),Zi=!1)}ri=Kn,En=zo,Ln=gs}return Co}}function pn(){var Ft=0,tr=0,Fr=960,wr=500,ea,ba,Ia;return Ia={stream:function(Na){return ea&&ba===Na?ea:ea=wa(Ft,tr,Fr,wr)(ba=Na)},extent:function(Na){return arguments.length?(Ft=+Na[0][0],tr=+Na[0][1],Fr=+Na[1][0],wr=+Na[1][1],ea=ba=null,Ia):[[Ft,tr],[Fr,wr]]}}}var tn=E(),ai,rn,Ri,Gn={sphere:I,point:I,lineStart:no,lineEnd:I,polygonStart:I,polygonEnd:I};function no(){Gn.point=fn,Gn.lineEnd=Di}function Di(){Gn.point=Gn.lineEnd=I}function fn(Ft,tr){Ft*=m,tr*=m,ai=Ft,rn=_(tr),Ri=i(tr),Gn.point=Ai}function Ai(Ft,tr){Ft*=m,tr*=m;var Fr=_(tr),wr=i(tr),ea=h(Ft-ai),ba=i(ea),Ia=_(ea),Na=wr*Ia,Za=Ri*Fr-rn*wr*ba,mn=rn*Fr+Ri*wr*ba;tn.add(g(f(Na*Na+Za*Za),mn)),ai=Ft,rn=Fr,Ri=wr}function jn(Ft){return tn.reset(),j(Ft,Gn),+tn}var Xn=[null,null],eo={type:"LineString",coordinates:Xn};function gi(Ft,tr){return Xn[0]=Ft,Xn[1]=tr,jn(eo)}var qi={Feature:function(Ft,tr){return oo(Ft.geometry,tr)},FeatureCollection:function(Ft,tr){for(var Fr=Ft.features,wr=-1,ea=Fr.length;++wr0&&(ea=gi(Ft[ba],Ft[ba-1]),ea>0&&Fr<=ea&&wr<=ea&&(Fr+wr-ea)*(1-Math.pow((Fr-wr)/ea,2))t}).map($a)).concat(b.range(w(ba/mn)*mn,ea,mn).filter(function(En){return h(En%Ha)>t}).map(vn))}return ki.lines=function(){return ri().map(function(En){return{type:"LineString",coordinates:En}})},ki.outline=function(){return{type:"Polygon",coordinates:[Sn(wr).concat(yi(Ia).slice(1),Sn(Fr).reverse().slice(1),yi(Na).reverse().slice(1))]}},ki.extent=function(En){return arguments.length?ki.extentMajor(En).extentMinor(En):ki.extentMinor()},ki.extentMajor=function(En){return arguments.length?(wr=+En[0][0],Fr=+En[1][0],Na=+En[0][1],Ia=+En[1][1],wr>Fr&&(En=wr,wr=Fr,Fr=En),Na>Ia&&(En=Na,Na=Ia,Ia=En),ki.precision(_i)):[[wr,Na],[Fr,Ia]]},ki.extentMinor=function(En){return arguments.length?(tr=+En[0][0],Ft=+En[1][0],ba=+En[0][1],ea=+En[1][1],tr>Ft&&(En=tr,tr=Ft,Ft=En),ba>ea&&(En=ba,ba=ea,ea=En),ki.precision(_i)):[[tr,ba],[Ft,ea]]},ki.step=function(En){return arguments.length?ki.stepMajor(En).stepMinor(En):ki.stepMinor()},ki.stepMajor=function(En){return arguments.length?(Da=+En[0],Ha=+En[1],ki):[Da,Ha]},ki.stepMinor=function(En){return arguments.length?(Za=+En[0],mn=+En[1],ki):[Za,mn]},ki.precision=function(En){return arguments.length?(_i=+En,$a=Eo(ba,ea,90),vn=Ao(tr,Ft,_i),Sn=Eo(Na,Ia,90),yi=Ao(wr,Fr,_i),ki):_i},ki.extentMajor([[-180,-90+t],[180,90-t]]).extentMinor([[-180,-80-t],[180,80+t]])}function jo(){return ds()()}function Wo(Ft,tr){var Fr=Ft[0]*m,wr=Ft[1]*m,ea=tr[0]*m,ba=tr[1]*m,Ia=i(wr),Na=_(wr),Za=i(ba),mn=_(ba),Da=Ia*i(Fr),Ha=Ia*_(Fr),$a=Za*i(ea),vn=Za*_(ea),Sn=2*x(f(z(ba-wr)+Ia*Za*z(ea-Fr))),yi=_(Sn),_i=Sn?function(ki){var ri=_(ki*=Sn)/yi,En=_(Sn-ki)/yi,Ln=En*Da+ri*$a,Ni=En*Ha+ri*vn,Zi=En*Na+ri*mn;return[g(Ni,Ln)*c,g(Zi,f(Ln*Ln+Ni*Ni))*c]}:function(){return[Fr*c,wr*c]};return _i.distance=Sn,_i}function to(Ft){return Ft}var wo=E(),pi=E(),Vi,Io,Xi,Ko,Uo={point:I,lineStart:I,lineEnd:I,polygonStart:function(){Uo.lineStart=Ls,Uo.lineEnd=Vs},polygonEnd:function(){Uo.lineStart=Uo.lineEnd=Uo.point=I,wo.add(h(pi)),pi.reset()},result:function(){var Ft=wo/2;return wo.reset(),Ft}};function Ls(){Uo.point=Ss}function Ss(Ft,tr){Uo.point=Vo,Vi=Xi=Ft,Io=Ko=tr}function Vo(Ft,tr){pi.add(Ko*Ft-Xi*tr),Xi=Ft,Ko=tr}function Vs(){Vo(Vi,Io)}var Ts=1/0,Bo=Ts,_o=-Ts,Pi=_o,yo={point:bs,lineStart:I,lineEnd:I,polygonStart:I,polygonEnd:I,result:function(){var Ft=[[Ts,Bo],[_o,Pi]];return _o=Pi=-(Bo=Ts=1/0),Ft}};function bs(Ft,tr){Ft_o&&(_o=Ft),trPi&&(Pi=tr)}var Dl=0,hl=0,ps=0,dl=0,wu=0,lu=0,xc=0,Fl=0,pl=0,$u,uu,tl,vs,os={point:ms,lineStart:rl,lineEnd:Ku,polygonStart:function(){os.lineStart=bc,os.lineEnd=Lh},polygonEnd:function(){os.point=ms,os.lineStart=rl,os.lineEnd=Ku},result:function(){var Ft=pl?[xc/pl,Fl/pl]:lu?[dl/lu,wu/lu]:ps?[Dl/ps,hl/ps]:[NaN,NaN];return Dl=hl=ps=dl=wu=lu=xc=Fl=pl=0,Ft}};function ms(Ft,tr){Dl+=Ft,hl+=tr,++ps}function rl(){os.point=Fu}function Fu(Ft,tr){os.point=zu,ms(tl=Ft,vs=tr)}function zu(Ft,tr){var Fr=Ft-tl,wr=tr-vs,ea=f(Fr*Fr+wr*wr);dl+=ea*(tl+Ft)/2,wu+=ea*(vs+tr)/2,lu+=ea,ms(tl=Ft,vs=tr)}function Ku(){os.point=ms}function bc(){os.point=rh}function Lh(){Ju($u,uu)}function rh(Ft,tr){os.point=Ju,ms($u=tl=Ft,uu=vs=tr)}function Ju(Ft,tr){var Fr=Ft-tl,wr=tr-vs,ea=f(Fr*Fr+wr*wr);dl+=ea*(tl+Ft)/2,wu+=ea*(vs+tr)/2,lu+=ea,ea=vs*Ft-tl*tr,xc+=ea*(tl+Ft),Fl+=ea*(vs+tr),pl+=ea*3,ms(tl=Ft,vs=tr)}function ss(Ft){this._context=Ft}ss.prototype={_radius:4.5,pointRadius:function(Ft){return this._radius=Ft,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(Ft,tr){switch(this._point){case 0:{this._context.moveTo(Ft,tr),this._point=1;break}case 1:{this._context.lineTo(Ft,tr);break}default:{this._context.moveTo(Ft+this._radius,tr),this._context.arc(Ft,tr,this._radius,0,s);break}}},result:I};var ah=E(),wc,pc,Nf,Bu,Tc,Ou={point:I,lineStart:function(){Ou.point=Gc},lineEnd:function(){wc&&pf(pc,Nf),Ou.point=I},polygonStart:function(){wc=!0},polygonEnd:function(){wc=null},result:function(){var Ft=+ah;return ah.reset(),Ft}};function Gc(Ft,tr){Ou.point=pf,pc=Bu=Ft,Nf=Tc=tr}function pf(Ft,tr){Bu-=Ft,Tc-=tr,ah.add(f(Bu*Bu+Tc*Tc)),Bu=Ft,Tc=tr}function $l(){this._string=[]}$l.prototype={_radius:4.5,_circle:jf(4.5),pointRadius:function(Ft){return(Ft=+Ft)!==this._radius&&(this._radius=Ft,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(Ft,tr){switch(this._point){case 0:{this._string.push("M",Ft,",",tr),this._point=1;break}case 1:{this._string.push("L",Ft,",",tr);break}default:{this._circle==null&&(this._circle=jf(this._radius)),this._string.push("M",Ft,",",tr,this._circle);break}}},result:function(){if(this._string.length){var Ft=this._string.join("");return this._string=[],Ft}else return null}};function jf(Ft){return"m0,"+Ft+"a"+Ft+","+Ft+" 0 1,1 0,"+-2*Ft+"a"+Ft+","+Ft+" 0 1,1 0,"+2*Ft+"z"}function Hc(Ft,tr){var Fr=4.5,wr,ea;function ba(Ia){return Ia&&(typeof Fr=="function"&&ea.pointRadius(+Fr.apply(this,arguments)),j(Ia,wr(ea))),ea.result()}return ba.area=function(Ia){return j(Ia,wr(Uo)),Uo.result()},ba.measure=function(Ia){return j(Ia,wr(Ou)),Ou.result()},ba.bounds=function(Ia){return j(Ia,wr(yo)),yo.result()},ba.centroid=function(Ia){return j(Ia,wr(os)),os.result()},ba.projection=function(Ia){return arguments.length?(wr=Ia==null?(Ft=null,to):(Ft=Ia).stream,ba):Ft},ba.context=function(Ia){return arguments.length?(ea=Ia==null?(tr=null,new $l):new ss(tr=Ia),typeof Fr!="function"&&ea.pointRadius(Fr),ba):tr},ba.pointRadius=function(Ia){return arguments.length?(Fr=typeof Ia=="function"?Ia:(ea.pointRadius(+Ia),+Ia),ba):Fr},ba.projection(Ft).context(tr)}function Wc(Ft){return{stream:Qu(Ft)}}function Qu(Ft){return function(tr){var Fr=new Yc;for(var wr in Ft)Fr[wr]=Ft[wr];return Fr.stream=tr,Fr}}function Yc(){}Yc.prototype={constructor:Yc,point:function(Ft,tr){this.stream.point(Ft,tr)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Nu(Ft,tr,Fr){var wr=Ft.clipExtent&&Ft.clipExtent();return Ft.scale(150).translate([0,0]),wr!=null&&Ft.clipExtent(null),j(Fr,Ft.stream(yo)),tr(yo.result()),wr!=null&&Ft.clipExtent(wr),Ft}function Uf(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=tr[1][0]-tr[0][0],ba=tr[1][1]-tr[0][1],Ia=Math.min(ea/(wr[1][0]-wr[0][0]),ba/(wr[1][1]-wr[0][1])),Na=+tr[0][0]+(ea-Ia*(wr[1][0]+wr[0][0]))/2,Za=+tr[0][1]+(ba-Ia*(wr[1][1]+wr[0][1]))/2;Ft.scale(150*Ia).translate([Na,Za])},Fr)}function al(Ft,tr,Fr){return Uf(Ft,[[0,0],tr],Fr)}function Xc(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=+tr,ba=ea/(wr[1][0]-wr[0][0]),Ia=(ea-ba*(wr[1][0]+wr[0][0]))/2,Na=-ba*wr[0][1];Ft.scale(150*ba).translate([Ia,Na])},Fr)}function ju(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=+tr,ba=ea/(wr[1][1]-wr[0][1]),Ia=-ba*wr[0][0],Na=(ea-ba*(wr[1][1]+wr[0][1]))/2;Ft.scale(150*ba).translate([Ia,Na])},Fr)}var Ac=16,Zc=i(30*m);function ec(Ft,tr){return+tr?tc(Ft,tr):cu(Ft)}function cu(Ft){return Qu({point:function(tr,Fr){tr=Ft(tr,Fr),this.stream.point(tr[0],tr[1])}})}function tc(Ft,tr){function Fr(wr,ea,ba,Ia,Na,Za,mn,Da,Ha,$a,vn,Sn,yi,_i){var ki=mn-wr,ri=Da-ea,En=ki*ki+ri*ri;if(En>4*tr&&yi--){var Ln=Ia+$a,Ni=Na+vn,Zi=Za+Sn,Co=f(Ln*Ln+Ni*Ni+Zi*Zi),Do=x(Zi/=Co),Fo=h(h(Zi)-1)tr||h((ki*Es+ri*ns)/En-.5)>.3||Ia*$a+Na*vn+Za*Sn2?Kn[2]%360*m:0,Es()):[Na*c,Za*c,mn*c]},bo.angle=function(Kn){return arguments.length?(Ha=Kn%360*m,Es()):Ha*c},bo.reflectX=function(Kn){return arguments.length?($a=Kn?-1:1,Es()):$a<0},bo.reflectY=function(Kn){return arguments.length?(vn=Kn?-1:1,Es()):vn<0},bo.precision=function(Kn){return arguments.length?(Zi=ec(Co,Ni=Kn*Kn),ns()):f(Ni)},bo.fitExtent=function(Kn,zo){return Uf(bo,Kn,zo)},bo.fitSize=function(Kn,zo){return al(bo,Kn,zo)},bo.fitWidth=function(Kn,zo){return Xc(bo,Kn,zo)},bo.fitHeight=function(Kn,zo){return ju(bo,Kn,zo)};function Es(){var Kn=vl(Fr,0,0,$a,vn,Ha).apply(null,tr(ba,Ia)),zo=(Ha?vl:nh)(Fr,wr-Kn[0],ea-Kn[1],$a,vn,Ha);return Da=yn(Na,Za,mn),Co=ja(tr,zo),Do=ja(Da,Co),Zi=ec(Co,Ni),ns()}function ns(){return Fo=Yo=null,bo}return function(){return tr=Ft.apply(this,arguments),bo.invert=tr.invert&&Gs,Es()}}function yl(Ft){var tr=0,Fr=r/3,wr=rc(Ft),ea=wr(tr,Fr);return ea.parallels=function(ba){return arguments.length?wr(tr=ba[0]*m,Fr=ba[1]*m):[tr*c,Fr*c]},ea}function qf(Ft){var tr=i(Ft);function Fr(wr,ea){return[wr*tr,_(ea)/tr]}return Fr.invert=function(wr,ea){return[wr/tr,x(ea*tr)]},Fr}function ac(Ft,tr){var Fr=_(Ft),wr=(Fr+_(tr))/2;if(h(wr)=.12&&_i<.234&&yi>=-.425&&yi<-.214?ea:_i>=.166&&_i<.234&&yi>=-.214&&yi<-.115?Ia:Fr).invert($a)},Da.stream=function($a){return Ft&&tr===$a?Ft:Ft=Jo([Fr.stream(tr=$a),ea.stream($a),Ia.stream($a)])},Da.precision=function($a){return arguments.length?(Fr.precision($a),ea.precision($a),Ia.precision($a),Ha()):Fr.precision()},Da.scale=function($a){return arguments.length?(Fr.scale($a),ea.scale($a*.35),Ia.scale($a),Da.translate(Fr.translate())):Fr.scale()},Da.translate=function($a){if(!arguments.length)return Fr.translate();var vn=Fr.scale(),Sn=+$a[0],yi=+$a[1];return wr=Fr.translate($a).clipExtent([[Sn-.455*vn,yi-.238*vn],[Sn+.455*vn,yi+.238*vn]]).stream(mn),ba=ea.translate([Sn-.307*vn,yi+.201*vn]).clipExtent([[Sn-.425*vn+t,yi+.12*vn+t],[Sn-.214*vn-t,yi+.234*vn-t]]).stream(mn),Na=Ia.translate([Sn-.205*vn,yi+.212*vn]).clipExtent([[Sn-.214*vn+t,yi+.166*vn+t],[Sn-.115*vn-t,yi+.234*vn-t]]).stream(mn),Ha()},Da.fitExtent=function($a,vn){return Uf(Da,$a,vn)},Da.fitSize=function($a,vn){return al(Da,$a,vn)},Da.fitWidth=function($a,vn){return Xc(Da,$a,vn)},Da.fitHeight=function($a,vn){return ju(Da,$a,vn)};function Ha(){return Ft=tr=null,Da}return Da.scale(1070)}function fu(Ft){return function(tr,Fr){var wr=i(tr),ea=i(Fr),ba=Ft(wr*ea);return[ba*ea*_(tr),ba*_(Fr)]}}function Sl(Ft){return function(tr,Fr){var wr=f(tr*tr+Fr*Fr),ea=Ft(wr),ba=_(ea),Ia=i(ea);return[g(tr*ba,wr*Ia),x(wr&&Fr*ba/wr)]}}var El=fu(function(Ft){return f(2/(1+Ft))});El.invert=Sl(function(Ft){return 2*x(Ft/2)});function oh(){return ml(El).scale(124.75).clipAngle(180-.001)}var Au=fu(function(Ft){return(Ft=A(Ft))&&Ft/_(Ft)});Au.invert=Sl(function(Ft){return Ft});function $c(){return ml(Au).scale(79.4188).clipAngle(180-.001)}function _l(Ft,tr){return[Ft,M(u((a+tr)/2))]}_l.invert=function(Ft,tr){return[Ft,2*v(S(tr))-a]};function nl(){return gf(_l).scale(961/s)}function gf(Ft){var tr=ml(Ft),Fr=tr.center,wr=tr.scale,ea=tr.translate,ba=tr.clipExtent,Ia=null,Na,Za,mn;tr.scale=function(Ha){return arguments.length?(wr(Ha),Da()):wr()},tr.translate=function(Ha){return arguments.length?(ea(Ha),Da()):ea()},tr.center=function(Ha){return arguments.length?(Fr(Ha),Da()):Fr()},tr.clipExtent=function(Ha){return arguments.length?(Ha==null?Ia=Na=Za=mn=null:(Ia=+Ha[0][0],Na=+Ha[0][1],Za=+Ha[1][0],mn=+Ha[1][1]),Da()):Ia==null?null:[[Ia,Na],[Za,mn]]};function Da(){var Ha=r*wr(),$a=tr(on(tr.rotate()).invert([0,0]));return ba(Ia==null?[[$a[0]-Ha,$a[1]-Ha],[$a[0]+Ha,$a[1]+Ha]]:Ft===_l?[[Math.max($a[0]-Ha,Ia),Na],[Math.min($a[0]+Ha,Za),mn]]:[[Ia,Math.max($a[1]-Ha,Na)],[Za,Math.min($a[1]+Ha,mn)]])}return Da()}function Kc(Ft){return u((a+Ft)/2)}function sh(Ft,tr){var Fr=i(Ft),wr=Ft===tr?_(Ft):M(Fr/i(tr))/M(Kc(tr)/Kc(Ft)),ea=Fr*C(Kc(Ft),wr)/wr;if(!wr)return _l;function ba(Ia,Na){ea>0?Na<-a+t&&(Na=-a+t):Na>a-t&&(Na=a-t);var Za=ea/C(Kc(Na),wr);return[Za*_(wr*Ia),ea-Za*i(wr*Ia)]}return ba.invert=function(Ia,Na){var Za=ea-Na,mn=T(wr)*f(Ia*Ia+Za*Za),Da=g(Ia,h(Za))*T(Za);return Za*wr<0&&(Da-=r*T(Ia)*T(Za)),[Da/wr,2*v(C(ea/mn,1/wr))-a]},ba}function hu(){return yl(sh).scale(109.5).parallels([30,30])}function Uu(Ft,tr){return[Ft,tr]}Uu.invert=Uu;function qu(){return ml(Uu).scale(152.63)}function nc(Ft,tr){var Fr=i(Ft),wr=Ft===tr?_(Ft):(Fr-i(tr))/(tr-Ft),ea=Fr/wr+Ft;if(h(wr)t&&--wr>0);return[Ft/(.8707+(ba=Fr*Fr)*(-.131979+ba*(-.013791+ba*ba*ba*(.003971-.001529*ba)))),Fr]};function Hf(){return ml(bh).scale(175.295)}function il(Ft,tr){return[i(tr)*_(Ft),_(tr)]}il.invert=Sl(x);function kl(){return ml(il).scale(249.5).clipAngle(90+t)}function kc(Ft,tr){var Fr=i(tr),wr=1+i(Ft)*Fr;return[Fr*_(Ft)/wr,_(tr)/wr]}kc.invert=Sl(function(Ft){return 2*v(Ft)});function Cc(){return ml(kc).scale(250).clipAngle(142)}function Lc(Ft,tr){return[M(u((a+tr)/2)),-Ft]}Lc.invert=function(Ft,tr){return[-tr,2*v(S(Ft))-a]};function vc(){var Ft=gf(Lc),tr=Ft.center,Fr=Ft.rotate;return Ft.center=function(wr){return arguments.length?tr([-wr[1],wr[0]]):(wr=tr(),[wr[1],-wr[0]])},Ft.rotate=function(wr){return arguments.length?Fr([wr[0],wr[1],wr.length>2?wr[2]+90:90]):(wr=Fr(),[wr[0],wr[1],wr[2]-90])},Fr([0,0,90]).scale(159.155)}p.geoAlbers=mf,p.geoAlbersUsa=ih,p.geoArea=Z,p.geoAzimuthalEqualArea=oh,p.geoAzimuthalEqualAreaRaw=El,p.geoAzimuthalEquidistant=$c,p.geoAzimuthalEquidistantRaw=Au,p.geoBounds=vt,p.geoCentroid=un,p.geoCircle=Yi,p.geoClipAntimeridian=jt,p.geoClipCircle=zr,p.geoClipExtent=pn,p.geoClipRectangle=wa,p.geoConicConformal=hu,p.geoConicConformalRaw=sh,p.geoConicEqualArea=Mc,p.geoConicEqualAreaRaw=ac,p.geoConicEquidistant=yf,p.geoConicEquidistantRaw=nc,p.geoContains=go,p.geoDistance=gi,p.geoEqualEarth=xh,p.geoEqualEarthRaw=Ec,p.geoEquirectangular=qu,p.geoEquirectangularRaw=Uu,p.geoGnomonic=xf,p.geoGnomonicRaw=Vf,p.geoGraticule=ds,p.geoGraticule10=jo,p.geoIdentity=Gf,p.geoInterpolate=Wo,p.geoLength=jn,p.geoMercator=nl,p.geoMercatorRaw=_l,p.geoNaturalEarth1=Hf,p.geoNaturalEarth1Raw=bh,p.geoOrthographic=kl,p.geoOrthographicRaw=il,p.geoPath=Hc,p.geoProjection=ml,p.geoProjectionMutator=rc,p.geoRotation=on,p.geoStereographic=Cc,p.geoStereographicRaw=kc,p.geoStream=j,p.geoTransform=Wc,p.geoTransverseMercator=vc,p.geoTransverseMercatorRaw=Lc,Object.defineProperty(p,"__esModule",{value:!0})})}}),_j=ze({"src/lib/usa_location_names.js"(J,V){"use strict";var p={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},b=new Set(Object.values(p));V.exports={usaLocationAbbreviations:b,usaLocationList:p}}}),kA={};bu(kA,{COUNTRIES_X:()=>CA});var CA,xj=zi({"src/lib/custom_country_codes.ts"(){"use strict";CA=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XIT",iso2:"",m49:"",name:"Ilemi Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]}}),hp=ze({"src/lib/geo_location_utils.js"(J,V){"use strict";var p=ci(),{COUNTRIES:b,createLookup:E}=vj(),{area:k}=mj(),{centroid:l}=gj(),{coordAll:e}=k2(),{geoBounds:t}=C2(),n=s1(),r=ap(),a=tv(),o=r1(),s=p1(),{usaLocationAbbreviations:c,usaLocationList:m}=_j(),{COUNTRIES_X:h}=(xj(),Po(kA)),{lookupAlpha3:v}=E([...b,...h]),g={"ISO-3":n,"USA-states":w,"country names":i};function i(P){let j=v(P);return j||(r.log("Unrecognized country name: "+P+"."),!1)}function w(P){P=P.trim();let j=c.has(P.toUpperCase())?P.toUpperCase():m[P.toLowerCase()];return j||(r.log("Unrecognized US location: "+P+"."),!1)}function S(P,j,U){var $;if(!j||typeof j!="string")return!1;let Q=g[P](j);if(Q){let re;if(P==="USA-states"){re=[];for(let ne of U)(($=ne?.properties)==null?void 0:$.gu)==="USA"&&re.push(ne)}else re=U;for(let ne of re)if(ne.id===Q)return ne;r.log(`Location with id ${Q} does not have a matching topojson feature at this resolution.`)}return!1}var M=360;function C(P){for(let j=0;j0&&P[j+1][0]<0)return j;return null}function _(P){var j=P.geometry,U=j.coordinates,$=P.id,Q=[],re,ne,se,G;switch($==="RUS"||$==="FJI"?re=function(X){var K;if(C(X)===null)K=X;else for(K=new Array(X.length),G=0;GK?H[Y++]=[X[G][0]+M,X[G][1]]:G===K?(H[Y++]=X[G],H[Y++]=[X[G][0],-90]):H[Y++]=X[G];var q=s.tester(H);q.pts.pop(),Q.push(q)}:re=function(X){Q.push(s.tester(X))},j.type){case"MultiPolygon":for(ne=0;neQ&&(Q=se,U=ne)}else U=j;return!U||!U.coordinates.some(G=>G.length>0)?[NaN,NaN]:l(U).geometry.coordinates}function A(P){var j=window.PlotlyGeoAssets||{},U=[];function $(G){return new Promise(function(X,K){p.json(G,function(H,Y){if(H){delete j[G];var q=H.status===404?'GeoJSON at URL "'+G+'" does not exist.':"Unexpected error while fetching from "+G;return K(new Error(q))}return j[G]=Y,X(Y)})})}function Q(G){return new Promise(function(X,K){var H=0,Y=setInterval(function(){if(j[G]&&j[G]!=="pending")return clearInterval(Y),X(j[G]);if(H>100)return clearInterval(Y),K("Unexpected error while fetching from "+G);H++},50)})}for(var re=0;reI(z(P));function z(P){try{return e(P)}catch{return[]}}function I(P){if(P.length===0)return null;if(P.length===1){let[re,ne]=P[0];return[re,ne,re,ne]}let[[j,U],[$,Q]]=t({type:"MultiPoint",coordinates:P});return[j,U,F([j,$])[1],Q]}var O=(P,j)=>j.fitbounds==="geojson"&&P.locationmode==="geojson-id",D=(P,j)=>O(P,j)?z(T(P)):[],B=(P,j)=>I(D(P,j));function F([P,j]){return[P,P>j?j+M:j]}V.exports={locationToFeature:S,feature2polygons:_,getTraceGeojson:T,extractTraceFeature:f,fetchTraceGeoData:A,boundsOfCoords:I,computeBbox:x,coordsOf:z,doesCrossAntiMeridian:C,fitGeojsonBbox:B,fitGeojsonCoords:D,unwrapLonRange:F,ANTIMERIDIAN_LON_SHIFT:M}}}),LA=ze({"src/traces/scattergeo/style.js"(J,V){"use strict";var p=ci(),b=$i(),E=Qn(),k=Ch(),l=k.stylePoints,e=k.styleText;V.exports=function(r,a){a&&t(r,a)};function t(n,r){var a=r[0].trace,o=r[0].node3;o.style("opacity",r[0].trace.opacity),l(o,a,n),e(o,a,n),o.selectAll("path.js-line").style("fill","none").each(function(s){var c=p.select(this),m=s.trace,h=m.line||{};c.call(E.stroke,h.color).call(b.dashLine,h.dash||"",h.width||0),m.fill!=="none"&&c.call(E.fill,m.fillcolor)})}}}),L2=ze({"src/traces/scattergeo/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=S2().getTopojsonFeatures,k=Q1(),l=hp(),e=md().findExtremes,t=No().BADNUM,n=sd().calcMarkerSize,r=el(),a=LA();function o(m,h,v){var g=h.layers.frontplot.select(".scatterlayer"),i=b.makeTraceGroups(g,v,"trace scattergeo");function w(S,M){S.lonlat[0]===t&&p.select(M).remove()}i.selectAll("*").remove(),i.each(function(S){var M=p.select(this),C=S[0].trace;if(r.hasLines(C)||C.fill!=="none"){var _=k.calcTraceToLineCoords(S),T=C.fill!=="none"?k.makePolygon(_):k.makeLine(_);M.selectAll("path.js-line").data([{geojson:T,trace:C}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}r.hasMarkers(C)&&M.selectAll("path.point").data(b.identity).enter().append("path").classed("point",!0).each(function(f){w(f,this)}),r.hasText(C)&&M.selectAll("g").data(b.identity).enter().append("g").append("text").each(function(f){w(f,this)}),a(m,S)})}function s(m,h){var v=m[0].trace,g=h[v.geo],i=g._subplot,w=v._length,S,M;if(b.isArrayOrTypedArray(v.locations)){var C=v.locationmode,_=C==="geojson-id"?l.extractTraceFeature(m):E(v,i.topojson);for(S=0;S")}}}),wj=ze({"src/traces/scattergeo/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){b.lon=E.lon,b.lat=E.lat,b.location=E.loc?E.loc:null;var t=l[e];return t.fIn&&t.fIn.properties&&(b.properties=t.fIn.properties),b}}}),Tj=ze({"src/traces/scattergeo/select.js"(J,V){"use strict";var p=el(),b=No().BADNUM;V.exports=function(k,l){var e=k.cd,t=k.xaxis,n=k.yaxis,r=[],a=e[0].trace,o,s,c,m,h,v=!p.hasMarkers(a)&&!p.hasText(a);if(v)return[];if(l===!1)for(h=0;hH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q0?1:$e<0?-1:0},v=Math.sin,g=Math.tan,i=1e-6,w=1e-12,S=Math.PI,M=S/2,C=S/4,_=Math.SQRT1_2,T=D(2),f=D(S),u=S*2,A=180/S,x=S/180;function z($e){return $e?$e/Math.sin($e):1}function I($e){return $e>1?M:$e<-1?-M:Math.asin($e)}function O($e){return $e>1?0:$e<-1?S:Math.acos($e)}function D($e){return $e>0?Math.sqrt($e):0}function B($e){return $e=n(2*$e),($e-1)/($e+1)}function F($e){return(n($e)-n(-$e))/2}function P($e){return(n($e)+n(-$e))/2}function j($e){return a($e+D($e*$e+1))}function U($e){return a($e+D($e*$e-1))}function $($e){var nt=g($e/2),mt=2*a(t($e/2))/(nt*nt);function xt(Bt,zt){var Wt=t(Bt),Pr=t(zt),Br=v(zt),kr=Pr*Wt,jr=-((1-kr?a((1+kr)/2)/(1-kr):-.5)+mt/(1+kr));return[jr*Pr*v(Bt),jr*Br]}return xt.invert=function(Bt,zt){var Wt=D(Bt*Bt+zt*zt),Pr=-$e/2,Br=50,kr;if(!Wt)return[0,0];do{var jr=Pr/2,Jr=t(jr),la=v(jr),xa=la/Jr,Ba=-a(k(Jr));Pr-=kr=(2/xa*Ba-mt*xa-Wt)/(-Ba/(la*la)+1-mt/(2*Jr*Jr))*(Jr<0?.7:1)}while(k(kr)>i&&--Br>0);var an=v(Pr);return[e(Bt*an,Wt*t(Pr)),I(zt*an/Wt)]},xt}function Q(){var $e=M,nt=b.geoProjectionMutator($),mt=nt($e);return mt.radius=function(xt){return arguments.length?nt($e=xt*x):$e*A},mt.scale(179.976).clipAngle(147)}function re($e,nt){var mt=t(nt),xt=z(O(mt*t($e/=2)));return[2*mt*v($e)*xt,v(nt)*xt]}re.invert=function($e,nt){if(!($e*$e+4*nt*nt>S*S+i)){var mt=$e,xt=nt,Bt=25;do{var zt=v(mt),Wt=v(mt/2),Pr=t(mt/2),Br=v(xt),kr=t(xt),jr=v(2*xt),Jr=Br*Br,la=kr*kr,xa=Wt*Wt,Ba=1-la*Pr*Pr,an=Ba?O(kr*Pr)*D(wn=1/Ba):wn=0,wn,ii=2*an*kr*Wt-$e,Si=an*Br-nt,oi=wn*(la*xa+an*kr*Pr*Jr),Ji=wn*(.5*zt*jr-an*2*Br*Wt),Qi=wn*.25*(jr*Wt-an*Br*la*zt),Oo=wn*(Jr*Pr+an*xa*kr),Qo=Ji*Qi-Oo*oi;if(!Qo)break;var vo=(Si*Ji-ii*Oo)/Qo,ys=(ii*Qi-Si*oi)/Qo;mt-=vo,xt-=ys}while((k(vo)>i||k(ys)>i)&&--Bt>0);return[mt,xt]}};function ne(){return b.geoProjection(re).scale(152.63)}function se($e){var nt=v($e),mt=t($e),xt=$e>=0?1:-1,Bt=g(xt*$e),zt=(1+nt-mt)/2;function Wt(Pr,Br){var kr=t(Br),jr=t(Pr/=2);return[(1+kr)*v(Pr),(xt*Br>-e(jr,Bt)-.001?0:-xt*10)+zt+v(Br)*mt-(1+kr)*nt*jr]}return Wt.invert=function(Pr,Br){var kr=0,jr=0,Jr=50;do{var la=t(kr),xa=v(kr),Ba=t(jr),an=v(jr),wn=1+Ba,ii=wn*xa-Pr,Si=zt+an*mt-wn*nt*la-Br,oi=wn*la/2,Ji=-xa*an,Qi=nt*wn*xa/2,Oo=mt*Ba+nt*la*an,Qo=Ji*Qi-Oo*oi,vo=(Si*Ji-ii*Oo)/Qo/2,ys=(ii*Qi-Si*oi)/Qo;k(ys)>2&&(ys/=2),kr-=vo,jr-=ys}while((k(vo)>i||k(ys)>i)&&--Jr>0);return xt*jr>-e(t(kr),Bt)-.001?[kr*2,jr]:null},Wt}function G(){var $e=20*x,nt=$e>=0?1:-1,mt=g(nt*$e),xt=b.geoProjectionMutator(se),Bt=xt($e),zt=Bt.stream;return Bt.parallel=function(Wt){return arguments.length?(mt=g((nt=($e=Wt*x)>=0?1:-1)*$e),xt($e)):$e*A},Bt.stream=function(Wt){var Pr=Bt.rotate(),Br=zt(Wt),kr=(Bt.rotate([0,0]),zt(Wt)),jr=Bt.precision();return Bt.rotate(Pr),Br.sphere=function(){kr.polygonStart(),kr.lineStart();for(var Jr=nt*-180;nt*Jr<180;Jr+=nt*90)kr.point(Jr,nt*90);if($e)for(;nt*(Jr-=3*nt*jr)>=-180;)kr.point(Jr,nt*-e(t(Jr*x/2),mt)*A);kr.lineEnd(),kr.polygonEnd()},Br},Bt.scale(218.695).center([0,28.0974])}function X($e,nt){var mt=g(nt/2),xt=D(1-mt*mt),Bt=1+xt*t($e/=2),zt=v($e)*xt/Bt,Wt=mt/Bt,Pr=zt*zt,Br=Wt*Wt;return[4/3*zt*(3+Pr-3*Br),4/3*Wt*(3+3*Pr-Br)]}X.invert=function($e,nt){if($e*=3/8,nt*=3/8,!$e&&k(nt)>1)return null;var mt=$e*$e,xt=nt*nt,Bt=1+mt+xt,zt=D((Bt-D(Bt*Bt-4*nt*nt))/2),Wt=I(zt)/3,Pr=zt?U(k(nt/zt))/3:j(k($e))/3,Br=t(Wt),kr=P(Pr),jr=kr*kr-Br*Br;return[h($e)*2*e(F(Pr)*Br,.25-jr),h(nt)*2*e(kr*v(Wt),.25+jr)]};function K(){return b.geoProjection(X).scale(66.1603)}var H=D(8),Y=a(1+T);function q($e,nt){var mt=k(nt);return mtw&&--xt>0);return[$e/(t(mt)*(H-1/v(mt))),h(nt)*mt]};function Z(){return b.geoProjection(q).scale(112.314)}function ee($e){var nt=2*S/$e;function mt(xt,Bt){var zt=b.geoAzimuthalEquidistantRaw(xt,Bt);if(k(xt)>M){var Wt=e(zt[1],zt[0]),Pr=D(zt[0]*zt[0]+zt[1]*zt[1]),Br=nt*m((Wt-M)/nt)+M,kr=e(v(Wt-=Br),2-t(Wt));Wt=Br+I(S/Pr*v(kr))-kr,zt[0]=Pr*t(Wt),zt[1]=Pr*v(Wt)}return zt}return mt.invert=function(xt,Bt){var zt=D(xt*xt+Bt*Bt);if(zt>M){var Wt=e(Bt,xt),Pr=nt*m((Wt-M)/nt)+M,Br=Wt>Pr?-1:1,kr=zt*t(Pr-Wt),jr=1/g(Br*O((kr-S)/D(S*(S-2*kr)+zt*zt)));Wt=Pr+2*l((jr+Br*D(jr*jr-3))/3),xt=zt*t(Wt),Bt=zt*v(Wt)}return b.geoAzimuthalEquidistantRaw.invert(xt,Bt)},mt}function ae(){var $e=5,nt=b.geoProjectionMutator(ee),mt=nt($e),xt=mt.stream,Bt=.01,zt=-t(Bt*x),Wt=v(Bt*x);return mt.lobes=function(Pr){return arguments.length?nt($e=+Pr):$e},mt.stream=function(Pr){var Br=mt.rotate(),kr=xt(Pr),jr=(mt.rotate([0,0]),xt(Pr));return mt.rotate(Br),kr.sphere=function(){jr.polygonStart(),jr.lineStart();for(var Jr=0,la=360/$e,xa=2*S/$e,Ba=90-180/$e,an=M;Jr<$e;++Jr,Ba-=la,an-=xa)jr.point(e(Wt*t(an),zt)*A,I(Wt*v(an))*A),Ba<-90?(jr.point(-90,-180-Ba-Bt),jr.point(-90,-180-Ba+Bt)):(jr.point(90,Ba+Bt),jr.point(90,Ba-Bt));jr.lineEnd(),jr.polygonEnd()},kr},mt.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function he($e,nt){if(arguments.length<2&&(nt=$e),nt===1)return b.geoAzimuthalEqualAreaRaw;if(nt===1/0)return xe;function mt(xt,Bt){var zt=b.geoAzimuthalEqualAreaRaw(xt/nt,Bt);return zt[0]*=$e,zt}return mt.invert=function(xt,Bt){var zt=b.geoAzimuthalEqualAreaRaw.invert(xt/$e,Bt);return zt[0]*=nt,zt},mt}function xe($e,nt){return[$e*t(nt)/t(nt/=2),2*v(nt)]}xe.invert=function($e,nt){var mt=2*I(nt/2);return[$e*t(mt/2)/t(mt),mt]};function we(){var $e=2,nt=b.geoProjectionMutator(he),mt=nt($e);return mt.coefficient=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(169.529)}function Me($e,nt,mt){var xt=100,Bt,zt,Wt;mt=mt===void 0?0:+mt,nt=+nt;do zt=$e(mt),Wt=$e(mt+i),zt===Wt&&(Wt=zt+i),mt-=Bt=-1*i*(zt-nt)/(zt-Wt);while(xt-- >0&&k(Bt)>i);return xt<0?NaN:mt}function Se($e,nt,mt){return nt===void 0&&(nt=40),mt===void 0&&(mt=w),function(xt,Bt,zt,Wt){var Pr,Br,kr;zt=zt===void 0?0:+zt,Wt=Wt===void 0?0:+Wt;for(var jr=0;jrPr){zt-=Br/=2,Wt-=kr/=2;continue}Pr=Ba;var an=(zt>0?-1:1)*mt,wn=(Wt>0?-1:1)*mt,ii=$e(zt+an,Wt),Si=$e(zt,Wt+wn),oi=(ii[0]-Jr[0])/an,Ji=(ii[1]-Jr[1])/an,Qi=(Si[0]-Jr[0])/wn,Oo=(Si[1]-Jr[1])/wn,Qo=Oo*oi-Ji*Qi,vo=(k(Qo)<.5?.5:1)/Qo;if(Br=(xa*Qi-la*Oo)*vo,kr=(la*Ji-xa*oi)*vo,zt+=Br,Wt+=kr,k(Br)0&&(Pr[1]*=1+Br/1.5*Pr[0]*Pr[0]),Pr}return xt.invert=Se(xt),xt}function Ve(){return b.geoProjection(Ie()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Ge($e,nt){var mt=$e*v(nt),xt=30,Bt;do nt-=Bt=(nt+v(nt)-mt)/(1+t(nt));while(k(Bt)>i&&--xt>0);return nt/2}function ke($e,nt,mt){function xt(Bt,zt){return[$e*Bt*t(zt=Ge(mt,zt)),nt*v(zt)]}return xt.invert=function(Bt,zt){return zt=I(zt/nt),[Bt/($e*t(zt)),I((2*zt+v(2*zt))/mt)]},xt}var _e=ke(T/M,T,S);function ce(){return b.geoProjection(_e).scale(169.529)}var ve=2.00276,le=1.11072;function Ae($e,nt){var mt=Ge(S,nt);return[ve*$e/(1/t(nt)+le/t(mt)),(nt+T*v(mt))/ve]}Ae.invert=function($e,nt){var mt=ve*nt,xt=nt<0?-C:C,Bt=25,zt,Wt;do Wt=mt-T*v(xt),xt-=zt=(v(2*xt)+2*xt-S*v(Wt))/(2*t(2*xt)+2+S*t(Wt)*T*t(xt));while(k(zt)>i&&--Bt>0);return Wt=mt-T*v(xt),[$e*(1/t(Wt)+le/t(xt))/ve,Wt]};function Be(){return b.geoProjection(Ae).scale(160.857)}function Xe($e){var nt=0,mt=b.geoProjectionMutator($e),xt=mt(nt);return xt.parallel=function(Bt){return arguments.length?mt(nt=Bt*x):nt*A},xt}function Ye($e,nt){return[$e*t(nt),nt]}Ye.invert=function($e,nt){return[$e/t(nt),nt]};function yt(){return b.geoProjection(Ye).scale(152.63)}function gt($e){if(!$e)return Ye;var nt=1/g($e);function mt(xt,Bt){var zt=nt+$e-Bt,Wt=zt&&xt*t(Bt)/zt;return[zt*v(Wt),nt-zt*t(Wt)]}return mt.invert=function(xt,Bt){var zt=D(xt*xt+(Bt=nt-Bt)*Bt),Wt=nt+$e-zt;return[zt/t(Wt)*e(xt,Bt),Wt]},mt}function Tt(){return Xe(gt).scale(123.082).center([0,26.1441]).parallel(45)}function At($e){function nt(mt,xt){var Bt=M-xt,zt=Bt&&mt*$e*v(Bt)/Bt;return[Bt*v(zt)/$e,M-Bt*t(zt)]}return nt.invert=function(mt,xt){var Bt=mt*$e,zt=M-xt,Wt=D(Bt*Bt+zt*zt),Pr=e(Bt,zt);return[(Wt?Wt/v(Wt):1)*Pr/$e,M-Wt]},nt}function $t(){var $e=.5,nt=b.geoProjectionMutator(At),mt=nt($e);return mt.fraction=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(158.837)}var rr=ke(1,4/S,S);function _r(){return b.geoProjection(rr).scale(152.63)}function Xt($e,nt,mt,xt,Bt,zt){var Wt=t(zt),Pr;if(k($e)>1||k(zt)>1)Pr=O(mt*Bt+nt*xt*Wt);else{var Br=v($e/2),kr=v(zt/2);Pr=2*I(D(Br*Br+nt*xt*kr*kr))}return k(Pr)>i?[Pr,e(xt*v(zt),nt*Bt-mt*xt*Wt)]:[0,0]}function or($e,nt,mt){return O(($e*$e+nt*nt-mt*mt)/(2*$e*nt))}function Ot($e){return $e-2*S*r(($e+S)/(2*S))}function vt($e,nt,mt){for(var xt=[[$e[0],$e[1],v($e[1]),t($e[1])],[nt[0],nt[1],v(nt[1]),t(nt[1])],[mt[0],mt[1],v(mt[1]),t(mt[1])]],Bt=xt[2],zt,Wt=0;Wt<3;++Wt,Bt=zt)zt=xt[Wt],Bt.v=Xt(zt[1]-Bt[1],Bt[3],Bt[2],zt[3],zt[2],zt[0]-Bt[0]),Bt.point=[0,0];var Pr=or(xt[0].v[0],xt[2].v[0],xt[1].v[0]),Br=or(xt[0].v[0],xt[1].v[0],xt[2].v[0]),kr=S-Pr;xt[2].point[1]=0,xt[0].point[0]=-(xt[1].point[0]=xt[0].v[0]/2);var jr=[xt[2].point[0]=xt[0].point[0]+xt[2].v[0]*t(Pr),2*(xt[0].point[1]=xt[1].point[1]=xt[2].v[0]*v(Pr))];function Jr(la,xa){var Ba=v(xa),an=t(xa),wn=new Array(3),ii;for(ii=0;ii<3;++ii){var Si=xt[ii];if(wn[ii]=Xt(xa-Si[1],Si[3],Si[2],an,Ba,la-Si[0]),!wn[ii][0])return Si.point;wn[ii][1]=Ot(wn[ii][1]-Si.v[1])}var oi=jr.slice();for(ii=0;ii<3;++ii){var Ji=ii==2?0:ii+1,Qi=or(xt[ii].v[0],wn[ii][0],wn[Ji][0]);wn[ii][1]<0&&(Qi=-Qi),ii?ii==1?(Qi=Br-Qi,oi[0]-=wn[ii][0]*t(Qi),oi[1]-=wn[ii][0]*v(Qi)):(Qi=kr-Qi,oi[0]+=wn[ii][0]*t(Qi),oi[1]+=wn[ii][0]*v(Qi)):(oi[0]+=wn[ii][0]*t(Qi),oi[1]-=wn[ii][0]*v(Qi))}return oi[0]/=3,oi[1]/=3,oi}return Jr}function ht($e){return $e[0]*=x,$e[1]*=x,$e}function De(){return Ne([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ne($e,nt,mt){var xt=b.geoCentroid({type:"MultiPoint",coordinates:[$e,nt,mt]}),Bt=[-xt[0],-xt[1]],zt=b.geoRotation(Bt),Wt=vt(ht(zt($e)),ht(zt(nt)),ht(zt(mt)));Wt.invert=Se(Wt);var Pr=b.geoProjection(Wt).rotate(Bt),Br=Pr.center;return delete Pr.rotate,Pr.center=function(kr){return arguments.length?Br(zt(kr)):zt.invert(Br())},Pr.clipAngle(90)}function We($e,nt){var mt=D(1-v(nt));return[2/f*$e*mt,f*(1-mt)]}We.invert=function($e,nt){var mt=(mt=nt/f-1)*mt;return[mt>0?$e*D(S/mt)/2:0,I(1-mt)]};function Ke(){return b.geoProjection(We).scale(95.6464).center([0,30])}function Je($e){var nt=g($e);function mt(xt,Bt){return[xt,(xt?xt/v(xt):1)*(v(Bt)*t(xt)-nt*t(Bt))]}return mt.invert=nt?function(xt,Bt){xt&&(Bt*=v(xt)/xt);var zt=t(xt);return[xt,2*e(D(zt*zt+nt*nt-Bt*Bt)-zt,nt-Bt)]}:function(xt,Bt){return[xt,I(xt?Bt*g(xt)/xt:Bt)]},mt}function et(){return Xe(Je).scale(249.828).clipAngle(90)}var Mt=D(3);function pt($e,nt){return[Mt*$e*(2*t(2*nt/3)-1)/f,Mt*f*v(nt/3)]}pt.invert=function($e,nt){var mt=3*I(nt/(Mt*f));return[f*$e/(Mt*(2*t(2*mt/3)-1)),mt]};function Pt(){return b.geoProjection(pt).scale(156.19)}function Ct($e){var nt=t($e);function mt(xt,Bt){return[xt*nt,v(Bt)/nt]}return mt.invert=function(xt,Bt){return[xt/nt,I(Bt*nt)]},mt}function qt(){return Xe(Ct).parallel(38.58).scale(195.044)}function Vt($e){var nt=t($e);function mt(xt,Bt){return[xt*nt,(1+nt)*g(Bt/2)]}return mt.invert=function(xt,Bt){return[xt/nt,l(Bt/(1+nt))*2]},mt}function Ht(){return Xe(Vt).scale(124.75)}function Sr($e,nt){var mt=D(8/(3*S));return[mt*$e*(1-k(nt)/S),mt*nt]}Sr.invert=function($e,nt){var mt=D(8/(3*S)),xt=nt/mt;return[$e/(mt*(1-k(xt)/S)),xt]};function Kr(){return b.geoProjection(Sr).scale(165.664)}function Yt($e,nt){var mt=D(4-3*v(k(nt)));return[2/D(6*S)*$e*mt,h(nt)*D(2*S/3)*(2-mt)]}Yt.invert=function($e,nt){var mt=2-k(nt)/D(2*S/3);return[$e*D(6*S)/(2*mt),h(nt)*I((4-mt*mt)/3)]};function Rt(){return b.geoProjection(Yt).scale(165.664)}function nr($e,nt){var mt=D(S*(4+S));return[2/mt*$e*(1+D(1-4*nt*nt/(S*S))),4/mt*nt]}nr.invert=function($e,nt){var mt=D(S*(4+S))/2;return[$e*mt/(1+D(1-nt*nt*(4+S)/(4*S))),nt*mt/2]};function ur(){return b.geoProjection(nr).scale(180.739)}function cr($e,nt){var mt=(2+M)*v(nt);nt/=2;for(var xt=0,Bt=1/0;xt<10&&k(Bt)>i;xt++){var zt=t(nt);nt-=Bt=(nt+v(nt)*(zt+2)-mt)/(2*zt*(1+zt))}return[2/D(S*(4+S))*$e*(1+t(nt)),2*D(S/(4+S))*v(nt)]}cr.invert=function($e,nt){var mt=nt*D((4+S)/S)/2,xt=I(mt),Bt=t(xt);return[$e/(2/D(S*(4+S))*(1+Bt)),I((xt+mt*(Bt+2))/(2+M))]};function Rr(){return b.geoProjection(cr).scale(180.739)}function Qr($e,nt){return[$e*(1+t(nt))/D(2+S),2*nt/D(2+S)]}Qr.invert=function($e,nt){var mt=D(2+S),xt=nt*mt/2;return[mt*$e/(1+t(xt)),xt]};function Zr(){return b.geoProjection(Qr).scale(173.044)}function ha($e,nt){for(var mt=(1+M)*v(nt),xt=0,Bt=1/0;xt<10&&k(Bt)>i;xt++)nt-=Bt=(nt+v(nt)-mt)/(1+t(nt));return mt=D(2+S),[$e*(1+t(nt))/mt,2*nt/mt]}ha.invert=function($e,nt){var mt=1+M,xt=D(mt/2);return[$e*2*xt/(1+t(nt*=xt)),I((nt+v(nt))/mt)]};function Pa(){return b.geoProjection(ha).scale(173.044)}var La=3+2*T;function un($e,nt){var mt=v($e/=2),xt=t($e),Bt=D(t(nt)),zt=t(nt/=2),Wt=v(nt)/(zt+T*xt*Bt),Pr=D(2/(1+Wt*Wt)),Br=D((T*zt+(xt+mt)*Bt)/(T*zt+(xt-mt)*Bt));return[La*(Pr*(Br-1/Br)-2*a(Br)),La*(Pr*Wt*(Br+1/Br)-2*l(Wt))]}un.invert=function($e,nt){if(!(zt=X.invert($e/1.2,nt*1.065)))return null;var mt=zt[0],xt=zt[1],Bt=20,zt;$e/=La,nt/=La;do{var Wt=mt/2,Pr=xt/2,Br=v(Wt),kr=t(Wt),jr=v(Pr),Jr=t(Pr),la=t(xt),xa=D(la),Ba=jr/(Jr+T*kr*xa),an=Ba*Ba,wn=D(2/(1+an)),ii=T*Jr+(kr+Br)*xa,Si=T*Jr+(kr-Br)*xa,oi=ii/Si,Ji=D(oi),Qi=Ji-1/Ji,Oo=Ji+1/Ji,Qo=wn*Qi-2*a(Ji)-$e,vo=wn*Ba*Oo-2*l(Ba)-nt,ys=jr&&_*xa*Br*an/jr,ol=(T*kr*Jr+xa)/(2*(Jr+T*kr*xa)*(Jr+T*kr*xa)*xa),jl=-.5*Ba*wn*wn*wn,Hs=jl*ys,Cu=jl*ol,hi=(hi=2*Jr+T*xa*(kr-Br))*hi*Ji,wi=(T*kr*Jr*xa+la)/hi,sl=-(T*Br*jr)/(xa*hi),sc=Qi*Hs-2*wi/Ji+wn*(wi+wi/oi),tu=Qi*Cu-2*sl/Ji+wn*(sl+sl/oi),Ps=Ba*Oo*Hs-2*ys/(1+an)+wn*Oo*ys+wn*Ba*(wi-wi/oi),gc=Ba*Oo*Cu-2*ol/(1+an)+wn*Oo*ol+wn*Ba*(sl-sl/oi),pu=tu*Ps-gc*sc;if(!pu)break;var ll=(vo*tu-Qo*gc)/pu,ef=(Qo*Ps-vo*sc)/pu;mt-=ll,xt=o(-M,s(M,xt-ef))}while((k(ll)>i||k(ef)>i)&&--Bt>0);return k(k(xt)-M)xt){var Jr=D(jr),la=e(kr,Br),xa=mt*m(la/mt),Ba=la-xa,an=$e*t(Ba),wn=($e*v(Ba)-Ba*v(an))/(M-an),ii=Oa(Ba,wn),Si=(S-$e)/lt(ii,an,S);Br=Jr;var oi=50,Ji;do Br-=Ji=($e+lt(ii,an,Br)*Si-Jr)/(ii(Br)*Si);while(k(Ji)>i&&--oi>0);kr=Ba*v(Br),Brxt){var Br=D(Pr),kr=e(Wt,zt),jr=mt*m(kr/mt),Jr=kr-jr;zt=Br*t(Jr),Wt=Br*v(Jr);for(var la=zt-M,xa=v(zt),Ba=Wt/xa,an=zti||k(Ba)>i)&&--an>0);return[Jr,la]},Br}var lr=fr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Tr(){return b.geoProjection(lr).scale(149.995)}var Ir=fr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Dr(){return b.geoProjection(Ir).scale(153.93)}var ot=fr(5/6*S,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kt(){return b.geoProjection(ot).scale(130.945)}function jt($e,nt){var mt=$e*$e,xt=nt*nt;return[$e*(1-.162388*xt)*(.87-952426e-9*mt*mt),nt*(1+xt/12)]}jt.invert=function($e,nt){var mt=$e,xt=nt,Bt=50,zt;do{var Wt=xt*xt;xt-=zt=(xt*(1+Wt/12)-nt)/(1+Wt/4)}while(k(zt)>i&&--Bt>0);Bt=50,$e/=1-.162388*Wt;do{var Pr=(Pr=mt*mt)*Pr;mt-=zt=(mt*(.87-952426e-9*Pr)-$e)/(.87-.00476213*Pr)}while(k(zt)>i&&--Bt>0);return[mt,xt]};function ar(){return b.geoProjection(jt).scale(131.747)}var Er=fr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function xr(){return b.geoProjection(Er).scale(131.087)}function zr($e){var nt=$e(M,0)[0]-$e(-M,0)[0];function mt(xt,Bt){var zt=xt>0?-.5:.5,Wt=$e(xt+zt*S,Bt);return Wt[0]-=zt*nt,Wt}return $e.invert&&(mt.invert=function(xt,Bt){var zt=xt>0?-.5:.5,Wt=$e.invert(xt+zt*nt,Bt),Pr=Wt[0]-zt*S;return Pr<-S?Pr+=2*S:Pr>S&&(Pr-=2*S),Wt[0]=Pr,Wt}),mt}function Lr($e,nt){var mt=h($e),xt=h(nt),Bt=t(nt),zt=t($e)*Bt,Wt=v($e)*Bt,Pr=v(xt*nt);$e=k(e(Wt,Pr)),nt=I(zt),k($e-M)>i&&($e%=M);var Br=aa($e>S/4?M-$e:$e,nt);return $e>S/4&&(Pr=Br[0],Br[0]=-Br[1],Br[1]=-Pr),Br[0]*=mt,Br[1]*=-xt,Br}Lr.invert=function($e,nt){k($e)>1&&($e=h($e)*2-$e),k(nt)>1&&(nt=h(nt)*2-nt);var mt=h($e),xt=h(nt),Bt=-mt*$e,zt=-xt*nt,Wt=zt/Bt<1,Pr=Sa(Wt?zt:Bt,Wt?Bt:zt),Br=Pr[0],kr=Pr[1],jr=t(kr);return Wt&&(Br=-M-Br),[mt*(e(v(Br)*jr,-v(kr))+S),xt*I(t(Br)*jr)]};function aa($e,nt){if(nt===M)return[0,0];var mt=v(nt),xt=mt*mt,Bt=xt*xt,zt=1+Bt,Wt=1+3*Bt,Pr=1-Bt,Br=I(1/D(zt)),kr=Pr+xt*zt*Br,jr=(1-mt)/kr,Jr=D(jr),la=jr*zt,xa=D(la),Ba=Jr*Pr,an,wn;if($e===0)return[0,-(Ba+xt*xa)];var ii=t(nt),Si=1/ii,oi=2*mt*ii,Ji=(-3*xt+Br*Wt)*oi,Qi=(-kr*ii-(1-mt)*Ji)/(kr*kr),Oo=.5*Qi/Jr,Qo=Pr*Oo-2*xt*Jr*oi,vo=xt*zt*Qi+jr*Wt*oi,ys=-Si*oi,ol=-Si*vo,jl=-2*Si*Qo,Hs=4*$e/S,Cu;if($e>.222*S||nt.175*S){if(an=(Ba+xt*D(la*(1+Bt)-Ba*Ba))/(1+Bt),$e>S/4)return[an,an];var hi=an,wi=.5*an;an=.5*(wi+hi),wn=50;do{var sl=D(la-an*an),sc=an*(jl+ys*sl)+ol*I(an/xa)-Hs;if(!sc)break;sc<0?wi=an:hi=an,an=.5*(wi+hi)}while(k(hi-wi)>i&&--wn>0)}else{an=i,wn=25;do{var tu=an*an,Ps=D(la-tu),gc=jl+ys*Ps,pu=an*gc+ol*I(an/xa)-Hs,ll=gc+(ol-ys*tu)/Ps;an-=Cu=Ps?pu/ll:0}while(k(Cu)>i&&--wn>0)}return[an,-Ba-xt*D(la-an*an)]}function Sa($e,nt){for(var mt=0,xt=1,Bt=.5,zt=50;;){var Wt=Bt*Bt,Pr=D(Bt),Br=I(1/D(1+Wt)),kr=1-Wt+Bt*(1+Wt)*Br,jr=(1-Pr)/kr,Jr=D(jr),la=jr*(1+Wt),xa=Jr*(1-Wt),Ba=la-$e*$e,an=D(Ba),wn=nt+xa+Bt*an;if(k(xt-mt)0?mt=Bt:xt=Bt,Bt=.5*(mt+xt)}if(!zt)return null;var ii=I(Pr),Si=t(ii),oi=1/Si,Ji=2*Pr*Si,Qi=(-3*Bt+Br*(1+3*Wt))*Ji,Oo=(-kr*Si-(1-Pr)*Qi)/(kr*kr),Qo=.5*Oo/Jr,vo=(1-Wt)*Qo-2*Bt*Jr*Ji,ys=-2*oi*vo,ol=-oi*Ji,jl=-oi*(Bt*(1+Wt)*Oo+jr*(1+3*Wt)*Ji);return[S/4*($e*(ys+ol*an)+jl*I($e/D(la))),ii]}function wa(){return b.geoProjection(zr(Lr)).scale(239.75)}function pn($e,nt,mt){var xt,Bt,zt;return $e?(xt=tn($e,mt),nt?(Bt=tn(nt,1-mt),zt=Bt[1]*Bt[1]+mt*xt[0]*xt[0]*Bt[0]*Bt[0],[[xt[0]*Bt[2]/zt,xt[1]*xt[2]*Bt[0]*Bt[1]/zt],[xt[1]*Bt[1]/zt,-xt[0]*xt[2]*Bt[0]*Bt[2]/zt],[xt[2]*Bt[1]*Bt[2]/zt,-mt*xt[0]*xt[1]*Bt[0]/zt]]):[[xt[0],0],[xt[1],0],[xt[2],0]]):(Bt=tn(nt,1-mt),[[0,Bt[0]/Bt[1]],[1/Bt[1],0],[Bt[2]/Bt[1],0]])}function tn($e,nt){var mt,xt,Bt,zt,Wt;if(nt=1-i)return mt=(1-nt)/4,xt=P($e),zt=B($e),Bt=1/xt,Wt=xt*F($e),[zt+mt*(Wt-$e)/(xt*xt),Bt-mt*zt*Bt*(Wt-$e),Bt+mt*zt*Bt*(Wt+$e),2*l(n($e))-M+mt*(Wt-$e)/xt];var Pr=[1,0,0,0,0,0,0,0,0],Br=[D(nt),0,0,0,0,0,0,0,0],kr=0;for(xt=D(1-nt),Wt=1;k(Br[kr]/Pr[kr])>i&&kr<8;)mt=Pr[kr++],Br[kr]=(mt-xt)/2,Pr[kr]=(mt+xt)/2,xt=D(mt*xt),Wt*=2;Bt=Wt*Pr[kr]*$e;do zt=Br[kr]*v(xt=Bt)/Pr[kr],Bt=(I(zt)+Bt)/2;while(--kr);return[v(Bt),zt=t(Bt),zt/t(Bt-xt),Bt]}function ai($e,nt,mt){var xt=k($e),Bt=k(nt),zt=F(Bt);if(xt){var Wt=1/v(xt),Pr=1/(g(xt)*g(xt)),Br=-(Pr+mt*(zt*zt*Wt*Wt)-1+mt),kr=(mt-1)*Pr,jr=(-Br+D(Br*Br-4*kr))/2;return[rn(l(1/D(jr)),mt)*h($e),rn(l(D((jr/Pr-1)/mt)),1-mt)*h(nt)]}return[0,rn(l(zt),1-mt)*h(nt)]}function rn($e,nt){if(!nt)return $e;if(nt===1)return a(g($e/2+C));for(var mt=1,xt=D(1-nt),Bt=D(nt),zt=0;k(Bt)>i;zt++){if($e%S){var Wt=l(xt*g($e)/mt);Wt<0&&(Wt+=S),$e+=Wt+~~($e/S)*S}else $e+=$e;Bt=(mt+xt)/2,xt=D(mt*xt),Bt=((mt=Bt)-xt)/2}return $e/(c(2,zt)*mt)}function Ri($e,nt){var mt=(T-1)/(T+1),xt=D(1-mt*mt),Bt=rn(M,xt*xt),zt=-1,Wt=a(g(S/4+k(nt)/2)),Pr=n(zt*Wt)/D(mt),Br=Gn(Pr*t(zt*$e),Pr*v(zt*$e)),kr=ai(Br[0],Br[1],xt*xt);return[-kr[1],(nt>=0?1:-1)*(.5*Bt-kr[0])]}function Gn($e,nt){var mt=$e*$e,xt=nt+1,Bt=1-mt-nt*nt;return[.5*(($e>=0?M:-M)-e(Bt,2*$e)),-.25*a(Bt*Bt+4*mt)+.5*a(xt*xt+mt)]}function no($e,nt){var mt=nt[0]*nt[0]+nt[1]*nt[1];return[($e[0]*nt[0]+$e[1]*nt[1])/mt,($e[1]*nt[0]-$e[0]*nt[1])/mt]}Ri.invert=function($e,nt){var mt=(T-1)/(T+1),xt=D(1-mt*mt),Bt=rn(M,xt*xt),zt=-1,Wt=pn(.5*Bt-nt,-$e,xt*xt),Pr=no(Wt[0],Wt[1]),Br=e(Pr[1],Pr[0])/zt;return[Br,2*l(n(.5/zt*a(mt*Pr[0]*Pr[0]+mt*Pr[1]*Pr[1])))-M]};function Di(){return b.geoProjection(zr(Ri)).scale(151.496)}function fn($e){var nt=v($e),mt=t($e),xt=Ai($e);xt.invert=Ai(-$e);function Bt(zt,Wt){var Pr=xt(zt,Wt);zt=Pr[0],Wt=Pr[1];var Br=v(Wt),kr=t(Wt),jr=t(zt),Jr=O(nt*Br+mt*kr*jr),la=v(Jr),xa=k(la)>i?Jr/la:1;return[xa*mt*v(zt),(k(zt)>M?xa:-xa)*(nt*kr-mt*Br*jr)]}return Bt.invert=function(zt,Wt){var Pr=D(zt*zt+Wt*Wt),Br=-v(Pr),kr=t(Pr),jr=Pr*kr,Jr=-Wt*Br,la=Pr*nt,xa=D(jr*jr+Jr*Jr-la*la),Ba=e(jr*la+Jr*xa,Jr*la-jr*xa),an=(Pr>M?-1:1)*e(zt*Br,Pr*t(Ba)*kr+Wt*v(Ba)*Br);return xt.invert(an,Ba)},Bt}function Ai($e){var nt=v($e),mt=t($e);return function(xt,Bt){var zt=t(Bt),Wt=t(xt)*zt,Pr=v(xt)*zt,Br=v(Bt);return[e(Pr,Wt*mt-Br*nt),I(Br*mt+Wt*nt)]}}function jn(){var $e=0,nt=b.geoProjectionMutator(fn),mt=nt($e),xt=mt.rotate,Bt=mt.stream,zt=b.geoCircle();return mt.parallel=function(Wt){if(!arguments.length)return $e*A;var Pr=mt.rotate();return nt($e=Wt*x).rotate(Pr)},mt.rotate=function(Wt){return arguments.length?(xt.call(mt,[Wt[0],Wt[1]-$e*A]),zt.center([-Wt[0],-Wt[1]]),mt):(Wt=xt.call(mt),Wt[1]+=$e*A,Wt)},mt.stream=function(Wt){return Wt=Bt(Wt),Wt.sphere=function(){Wt.polygonStart();var Pr=.01,Br=zt.radius(90-Pr)().coordinates[0],kr=Br.length-1,jr=-1,Jr;for(Wt.lineStart();++jr=0;)Wt.point((Jr=Br[jr])[0],Jr[1]);Wt.lineEnd(),Wt.polygonEnd()},Wt},mt.scale(79.4187).parallel(45).clipAngle(180-.001)}var Xn=3,eo=I(1-1/Xn)*A,gi=Ct(0);function qi($e){var nt=eo*x,mt=We(S,nt)[0]-We(-S,nt)[0],xt=gi(0,nt)[1],Bt=We(0,nt)[1],zt=f-Bt,Wt=u/$e,Pr=4/u,Br=xt+zt*zt*4/u;function kr(jr,Jr){var la,xa=k(Jr);if(xa>nt){var Ba=s($e-1,o(0,r((jr+S)/Wt)));jr+=S*($e-1)/$e-Ba*Wt,la=We(jr,xa),la[0]=la[0]*u/mt-u*($e-1)/(2*$e)+Ba*u/$e,la[1]=xt+(la[1]-Bt)*4*zt/u,Jr<0&&(la[1]=-la[1])}else la=gi(jr,Jr);return la[0]*=Pr,la[1]/=Br,la}return kr.invert=function(jr,Jr){jr/=Pr,Jr*=Br;var la=k(Jr);if(la>xt){var xa=s($e-1,o(0,r((jr+S)/Wt)));jr=(jr+S*($e-1)/$e-xa*Wt)*mt/u;var Ba=We.invert(jr,.25*(la-xt)*u/zt+Bt);return Ba[0]-=S*($e-1)/$e-xa*Wt,Jr<0&&(Ba[1]=-Ba[1]),Ba}return gi.invert(jr,Jr)},kr}function io($e,nt){return[$e,nt&1?90-i:eo]}function oo($e,nt){return[$e,nt&1?-90+i:-eo]}function Vn($e){return[$e[0]*(1-i),$e[1]]}function qn($e){var nt=[].concat(E.range(-180,180+$e/2,$e).map(io),E.range(180,-180-$e/2,-$e).map(oo));return{type:"Polygon",coordinates:[$e===180?nt.map(Vn):nt]}}function Hi(){var $e=4,nt=b.geoProjectionMutator(qi),mt=nt($e),xt=mt.stream;return mt.lobes=function(Bt){return arguments.length?nt($e=+Bt):$e},mt.stream=function(Bt){var zt=mt.rotate(),Wt=xt(Bt),Pr=(mt.rotate([0,0]),xt(Bt));return mt.rotate(zt),Wt.sphere=function(){b.geoStream(qn(180/$e),Pr)},Wt},mt.scale(239.75)}function Mi($e){var nt=1+$e,mt=v(1/nt),xt=I(mt),Bt=2*D(S/(zt=S+4*xt*nt)),zt,Wt=.5*Bt*(nt+D($e*(2+$e))),Pr=$e*$e,Br=nt*nt;function kr(jr,Jr){var la=1-v(Jr),xa,Ba;if(la&&la<2){var an=M-Jr,wn=25,ii;do{var Si=v(an),oi=t(an),Ji=xt+e(Si,nt-oi),Qi=1+Br-2*nt*oi;an-=ii=(an-Pr*xt-nt*Si+Qi*Ji-.5*la*zt)/(2*nt*Si*Ji)}while(k(ii)>w&&--wn>0);xa=Bt*D(Qi),Ba=jr*Ji/S}else xa=Bt*($e+la),Ba=jr*xt/S;return[xa*v(Ba),Wt-xa*t(Ba)]}return kr.invert=function(jr,Jr){var la=jr*jr+(Jr-=Wt)*Jr,xa=(1+Br-la/(Bt*Bt))/(2*nt),Ba=O(xa),an=v(Ba),wn=xt+e(an,nt-xa);return[I(jr/D(la))*S/wn,I(1-2*(Ba-Pr*xt-nt*an+(1+Br-2*nt*xa)*wn)/zt)]},kr}function Ro(){var $e=1,nt=b.geoProjectionMutator(Mi),mt=nt($e);return mt.ratio=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(167.774).center([0,18.67])}var go=.7109889596207567,Eo=.0528035274542;function Ao($e,nt){return nt>-go?($e=_e($e,nt),$e[1]+=Eo,$e):Ye($e,nt)}Ao.invert=function($e,nt){return nt>-go?_e.invert($e,nt-Eo):Ye.invert($e,nt)};function ds(){return b.geoProjection(Ao).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function jo($e,nt){return k(nt)>go?($e=_e($e,nt),$e[1]-=nt>0?Eo:-Eo,$e):Ye($e,nt)}jo.invert=function($e,nt){return k(nt)>go?_e.invert($e,nt+(nt>0?Eo:-Eo)):Ye.invert($e,nt)};function Wo(){return b.geoProjection(jo).scale(152.63)}function to($e,nt,mt,xt){var Bt=D(4*S/(2*mt+(1+$e-nt/2)*v(2*mt)+($e+nt)/2*v(4*mt)+nt/2*v(6*mt))),zt=D(xt*v(mt)*D((1+$e*t(2*mt)+nt*t(4*mt))/(1+$e+nt))),Wt=mt*Br(1);function Pr(Jr){return D(1+$e*t(2*Jr)+nt*t(4*Jr))}function Br(Jr){var la=Jr*mt;return(2*la+(1+$e-nt/2)*v(2*la)+($e+nt)/2*v(4*la)+nt/2*v(6*la))/mt}function kr(Jr){return Pr(Jr)*v(Jr)}var jr=function(Jr,la){var xa=mt*Me(Br,Wt*v(la)/mt,la/S);isNaN(xa)&&(xa=mt*h(la));var Ba=Bt*Pr(xa);return[Ba*zt*Jr/S*t(xa),Ba/zt*v(xa)]};return jr.invert=function(Jr,la){var xa=Me(kr,la*zt/Bt);return[Jr*S/(t(xa)*Bt*zt*Pr(xa)),I(mt*Br(xa/mt)/Wt)]},mt===0&&(Bt=D(xt/S),jr=function(Jr,la){return[Jr*Bt,v(la)/Bt]},jr.invert=function(Jr,la){return[Jr/Bt,I(la*Bt)]}),jr}function wo(){var $e=1,nt=0,mt=45*x,xt=2,Bt=b.geoProjectionMutator(to),zt=Bt($e,nt,mt,xt);return zt.a=function(Wt){return arguments.length?Bt($e=+Wt,nt,mt,xt):$e},zt.b=function(Wt){return arguments.length?Bt($e,nt=+Wt,mt,xt):nt},zt.psiMax=function(Wt){return arguments.length?Bt($e,nt,mt=+Wt*x,xt):mt*A},zt.ratio=function(Wt){return arguments.length?Bt($e,nt,mt,xt=+Wt):xt},zt.scale(180.739)}function pi($e,nt,mt,xt,Bt,zt,Wt,Pr,Br,kr,jr){if(jr.nanEncountered)return NaN;var Jr,la,xa,Ba,an,wn,ii,Si,oi,Ji;if(Jr=mt-nt,la=$e(nt+Jr*.25),xa=$e(mt-Jr*.25),isNaN(la)){jr.nanEncountered=!0;return}if(isNaN(xa)){jr.nanEncountered=!0;return}return Ba=Jr*(xt+4*la+Bt)/12,an=Jr*(Bt+4*xa+zt)/12,wn=Ba+an,Ji=(wn-Wt)/15,kr>Br?(jr.maxDepthCount++,wn+Ji):Math.abs(Ji)>1;do Br[wn]>xa?an=wn:Ba=wn,wn=Ba+an>>1;while(wn>Ba);var ii=Br[wn+1]-Br[wn];return ii&&(ii=(xa-Br[wn+1])/ii),(wn+1+ii)/Wt}var Jr=2*jr(1)/S*zt/mt,la=function(xa,Ba){var an=jr(k(v(Ba))),wn=xt(an)*xa;return an/=Jr,[wn,Ba>=0?an:-an]};return la.invert=function(xa,Ba){var an;return Ba*=Jr,k(Ba)<1&&(an=h(Ba)*I(Bt(k(Ba))*zt)),[xa/xt(k(Ba)),an]},la}function Xi(){var $e=0,nt=2.5,mt=1.183136,xt=b.geoProjectionMutator(Io),Bt=xt($e,nt,mt);return Bt.alpha=function(zt){return arguments.length?xt($e=+zt,nt,mt):$e},Bt.k=function(zt){return arguments.length?xt($e,nt=+zt,mt):nt},Bt.gamma=function(zt){return arguments.length?xt($e,nt,mt=+zt):mt},Bt.scale(152.63)}function Ko($e,nt){return k($e[0]-nt[0])=0;--Br)mt=$e[1][Br],xt=mt[0][0],Bt=mt[0][1],zt=mt[1][1],Wt=mt[2][0],Pr=mt[2][1],nt.push(Uo([[Wt-i,Pr-i],[Wt-i,zt+i],[xt+i,zt+i],[xt+i,Bt-i]],30));return{type:"Polygon",coordinates:[E.merge(nt)]}}function Ss($e,nt,mt){var xt,Bt;function zt(Br,kr){for(var jr=kr<0?-1:1,Jr=nt[+(kr<0)],la=0,xa=Jr.length-1;laJr[la][2][0];++la);var Ba=$e(Br-Jr[la][1][0],kr);return Ba[0]+=$e(Jr[la][1][0],jr*kr>jr*Jr[la][0][1]?Jr[la][0][1]:kr)[0],Ba}mt?zt.invert=mt(zt):$e.invert&&(zt.invert=function(Br,kr){for(var jr=Bt[+(kr<0)],Jr=nt[+(kr<0)],la=0,xa=jr.length;laBa&&(an=xa,xa=Ba,Ba=an),[[Jr,xa],[la,Ba]]})}),Wt):nt.map(function(kr){return kr.map(function(jr){return[[jr[0][0]*A,jr[0][1]*A],[jr[1][0]*A,jr[1][1]*A],[jr[2][0]*A,jr[2][1]*A]]})})},nt!=null&&Wt.lobes(nt),Wt}var Vo=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Vs(){return Ss(Ae,Vo).scale(160.857)}var Ts=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Bo(){return Ss(jo,Ts).scale(152.63)}var _o=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Pi(){return Ss(_e,_o).scale(169.529)}var yo=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function bs(){return Ss(_e,yo).scale(169.529).rotate([20,0])}var Dl=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function hl(){return Ss(Ao,Dl,Se).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var ps=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function dl(){return Ss(Ye,ps).scale(152.63).rotate([-20,0])}function wu($e,nt){return[3/u*$e*D(S*S/3-nt*nt),nt]}wu.invert=function($e,nt){return[u/3*$e/D(S*S/3-nt*nt),nt]};function lu(){return b.geoProjection(wu).scale(158.837)}function xc($e){function nt(mt,xt){if(k(k(xt)-M)2)return null;mt/=2,xt/=2;var zt=mt*mt,Wt=xt*xt,Pr=2*xt/(1+zt+Wt);return Pr=c((1+Pr)/(1-Pr),1/$e),[e(2*mt,1-zt-Wt)/$e,I((Pr-1)/(Pr+1))]},nt}function Fl(){var $e=.5,nt=b.geoProjectionMutator(xc),mt=nt($e);return mt.spacing=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(124.75)}var pl=S/T;function $u($e,nt){return[$e*(1+D(t(nt)))/2,nt/(t(nt/2)*t($e/6))]}$u.invert=function($e,nt){var mt=k($e),xt=k(nt),Bt=i,zt=M;xti||k(wn)>i)&&--Bt>0);return Bt&&[mt,xt]};function vs(){return b.geoProjection(tl).scale(139.98)}function os($e,nt){return[v($e)/t(nt),g(nt)*t($e)]}os.invert=function($e,nt){var mt=$e*$e,xt=nt*nt,Bt=xt+1,zt=mt+Bt,Wt=$e?_*D((zt-D(zt*zt-4*mt))/mt):1/D(Bt);return[I($e*Wt),h(nt)*O(Wt)]};function ms(){return b.geoProjection(os).scale(144.049).clipAngle(90-.001)}function rl($e){var nt=t($e),mt=g(C+$e/2);function xt(Bt,zt){var Wt=zt-$e,Pr=k(Wt)=0;)jr=$e[kr],Jr=jr[0]+Pr*(xa=Jr)-Br*la,la=jr[1]+Pr*la+Br*xa;return Jr=Pr*(xa=Jr)-Br*la,la=Pr*la+Br*xa,[Jr,la]}return mt.invert=function(xt,Bt){var zt=20,Wt=xt,Pr=Bt;do{for(var Br=nt,kr=$e[Br],jr=kr[0],Jr=kr[1],la=0,xa=0,Ba;--Br>=0;)kr=$e[Br],la=jr+Wt*(Ba=la)-Pr*xa,xa=Jr+Wt*xa+Pr*Ba,jr=kr[0]+Wt*(Ba=jr)-Pr*Jr,Jr=kr[1]+Wt*Jr+Pr*Ba;la=jr+Wt*(Ba=la)-Pr*xa,xa=Jr+Wt*xa+Pr*Ba,jr=Wt*(Ba=jr)-Pr*Jr-xt,Jr=Wt*Jr+Pr*Ba-Bt;var an=la*la+xa*xa,wn,ii;Wt-=wn=(jr*la+Jr*xa)/an,Pr-=ii=(Jr*la-jr*xa)/an}while(k(wn)+k(ii)>i*i&&--zt>0);if(zt){var Si=D(Wt*Wt+Pr*Pr),oi=2*l(Si*.5),Ji=v(oi);return[e(Wt*Ji,Si*t(oi)),Si?I(Pr*Ji/Si):0]}},mt}var Lh=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],rh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ju=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ss=[[.9245,0],[0,0],[.01943,0]],ah=[[.721316,0],[0,0],[-.00881625,-.00617325]];function wc(){return Ou(Lh,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function pc(){return Ou(rh,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Nf(){return Ou(Ju,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Bu(){return Ou(ss,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Tc(){return Ou(ah,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ou($e,nt){var mt=b.geoProjection(bc($e)).rotate(nt).clipAngle(90),xt=b.geoRotation(nt),Bt=mt.center;return delete mt.rotate,mt.center=function(zt){return arguments.length?Bt(xt(zt)):xt.invert(Bt())},mt}var Gc=D(6),pf=D(7);function $l($e,nt){var mt=I(7*v(nt)/(3*Gc));return[Gc*$e*(2*t(2*mt/3)-1)/pf,9*v(mt/3)/pf]}$l.invert=function($e,nt){var mt=3*I(nt*pf/9);return[$e*pf/(Gc*(2*t(2*mt/3)-1)),I(v(mt)*3*Gc/7)]};function jf(){return b.geoProjection($l).scale(164.859)}function Hc($e,nt){for(var mt=(1+_)*v(nt),xt=nt,Bt=0,zt;Bt<25&&(xt-=zt=(v(xt/2)+v(xt)-mt)/(.5*t(xt/2)+t(xt)),!(k(zt)w&&--xt>0);return zt=mt*mt,Wt=zt*zt,Pr=zt*Wt,[$e/(.84719-.13063*zt+Pr*Pr*(-.04515+.05494*zt-.02326*Wt+.00331*Pr)),mt]};function Uf(){return b.geoProjection(Nu).scale(175.295)}function al($e,nt){return[$e*(1+t(nt))/2,2*(nt-g(nt/2))]}al.invert=function($e,nt){for(var mt=nt/2,xt=0,Bt=1/0;xt<10&&k(Bt)>i;++xt){var zt=t(nt/2);nt-=Bt=(nt-g(nt/2)-mt)/(1-.5/(zt*zt))}return[2*$e/(1+t(nt)),nt]};function Xc(){return b.geoProjection(al).scale(152.63)}var ju=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Ac(){return Ss(he(1/0),ju).rotate([20,0]).scale(152.63)}function Zc($e,nt){var mt=v(nt),xt=t(nt),Bt=h($e);if($e===0||k(nt)===M)return[0,nt];if(nt===0)return[$e,0];if(k($e)===M)return[$e*xt,M*mt];var zt=S/(2*$e)-2*$e/S,Wt=2*nt/S,Pr=(1-Wt*Wt)/(mt-Wt),Br=zt*zt,kr=Pr*Pr,jr=1+Br/kr,Jr=1+kr/Br,la=(zt*mt/Pr-zt/2)/jr,xa=(kr*mt/Br+Pr/2)/Jr,Ba=la*la+xt*xt/jr,an=xa*xa-(kr*mt*mt/Br+Pr*mt-1)/Jr;return[M*(la+D(Ba)*Bt),M*(xa+D(an<0?0:an)*h(-nt*zt)*Bt)]}Zc.invert=function($e,nt){$e/=M,nt/=M;var mt=$e*$e,xt=nt*nt,Bt=mt+xt,zt=S*S;return[$e?(Bt-1+D((1-Bt)*(1-Bt)+4*mt))/(2*$e)*M:0,Me(function(Wt){return Bt*(S*v(Wt)-2*Wt)*S+4*Wt*Wt*(nt-v(Wt))+2*S*Wt-zt*nt},0)]};function ec(){return b.geoProjection(Zc).scale(127.267)}var cu=1.0148,tc=.23185,vf=-.14499,Tu=.02406,nh=cu,vl=5*tc,ml=7*vf,rc=9*Tu,yl=1.790857183;function qf($e,nt){var mt=nt*nt;return[$e,nt*(cu+mt*mt*(tc+mt*(vf+Tu*mt)))]}qf.invert=function($e,nt){nt>yl?nt=yl:nt<-yl&&(nt=-yl);var mt=nt,xt;do{var Bt=mt*mt;mt-=xt=(mt*(cu+Bt*Bt*(tc+Bt*(vf+Tu*Bt)))-nt)/(nh+Bt*Bt*(vl+Bt*(ml+rc*Bt)))}while(k(xt)>i);return[$e,mt]};function ac(){return b.geoProjection(qf).scale(139.319)}function Mc($e,nt){if(k(nt)i&&--Bt>0);return Wt=g(xt),[(k(nt)=0;)if(xt=nt[Pr],mt[0]===xt[0]&&mt[1]===xt[1]){if(zt)return[zt,mt];zt=mt}}}function gf($e){for(var nt=$e.length,mt=[],xt=$e[nt-1],Bt=0;Bt0?[-xt[0],0]:[180-xt[0],180])};var nt=hu.map(function(mt){return{face:mt,project:$e(mt)}});return[-1,0,0,1,0,1,4,5].forEach(function(mt,xt){var Bt=nt[mt];Bt&&(Bt.children||(Bt.children=[])).push(nt[xt])}),Au(nt[0],function(mt,xt){return nt[mt<-S/2?xt<0?6:4:mt<0?xt<0?2:0:mtxt^xa>xt&&mt<(la-kr)*(xt-jr)/(xa-jr)+kr&&(Bt=!Bt)}return Bt}function Vf($e,nt){var mt=nt.stream,xt;if(!mt)throw new Error("invalid projection");switch($e&&$e.type){case"Feature":xt=Gf;break;case"FeatureCollection":xt=xf;break;default:xt=Hf;break}return xt($e,mt)}function xf($e,nt){return{type:"FeatureCollection",features:$e.features.map(function(mt){return Gf(mt,nt)})}}function Gf($e,nt){return{type:"Feature",id:$e.id,properties:$e.properties,geometry:Hf($e.geometry,nt)}}function bh($e,nt){return{type:"GeometryCollection",geometries:$e.geometries.map(function(mt){return Hf(mt,nt)})}}function Hf($e,nt){if(!$e)return null;if($e.type==="GeometryCollection")return bh($e,nt);var mt;switch($e.type){case"Point":mt=kc;break;case"MultiPoint":mt=kc;break;case"LineString":mt=Cc;break;case"MultiLineString":mt=Cc;break;case"Polygon":mt=Lc;break;case"MultiPolygon":mt=Lc;break;case"Sphere":mt=Lc;break;default:return null}return b.geoStream($e,nt(mt)),mt.result()}var il=[],kl=[],kc={point:function($e,nt){il.push([$e,nt])},result:function(){var $e=il.length?il.length<2?{type:"Point",coordinates:il[0]}:{type:"MultiPoint",coordinates:il}:null;return il=[],$e}},Cc={lineStart:xo,point:function($e,nt){il.push([$e,nt])},lineEnd:function(){il.length&&(kl.push(il),il=[])},result:function(){var $e=kl.length?kl.length<2?{type:"LineString",coordinates:kl[0]}:{type:"MultiLineString",coordinates:kl}:null;return kl=[],$e}},Lc={polygonStart:xo,lineStart:xo,point:function($e,nt){il.push([$e,nt])},lineEnd:function(){var $e=il.length;if($e){do il.push(il[0].slice());while(++$e<4);kl.push(il),il=[]}},polygonEnd:xo,result:function(){if(!kl.length)return null;var $e=[],nt=[];return kl.forEach(function(mt){Ec(mt)?$e.push([mt]):nt.push(mt)}),nt.forEach(function(mt){var xt=mt[0];$e.some(function(Bt){if(xh(Bt[0],xt))return Bt.push(mt),!0})||$e.push([mt])}),kl=[],$e.length?$e.length>1?{type:"MultiPolygon",coordinates:$e}:{type:"Polygon",coordinates:$e[0]}:null}};function vc($e){var nt=$e(M,0)[0]-$e(-M,0)[0];function mt(xt,Bt){var zt=k(xt)0?xt-S:xt+S,Bt),Pr=(Wt[0]-Wt[1])*_,Br=(Wt[0]+Wt[1])*_;if(zt)return[Pr,Br];var kr=nt*_,jr=Pr>0^Br>0?-1:1;return[jr*Pr-h(Br)*kr,jr*Br-h(Pr)*kr]}return $e.invert&&(mt.invert=function(xt,Bt){var zt=(xt+Bt)*_,Wt=(Bt-xt)*_,Pr=k(zt)<.5*nt&&k(Wt)<.5*nt;if(!Pr){var Br=nt*_,kr=zt>0^Wt>0?-1:1,jr=-kr*xt+(Wt>0?1:-1)*Br,Jr=-kr*Bt+(zt>0?1:-1)*Br;zt=(-jr-Jr)*_,Wt=(jr-Jr)*_}var la=$e.invert(zt,Wt);return Pr||(la[0]+=zt>0?S:-S),la}),b.geoProjection(mt).rotate([-90,-90,45]).clipAngle(180-.001)}function Ft(){return vc(Lr).scale(176.423)}function tr(){return vc(Ri).scale(111.48)}function Fr($e,nt){if(!(0<=(nt=+nt)&&nt<=20))throw new Error("invalid digits");function mt(kr){var jr=kr.length,Jr=2,la=new Array(jr);for(la[0]=+kr[0].toFixed(nt),la[1]=+kr[1].toFixed(nt);Jr2||xa[0]!=jr[0]||xa[1]!=jr[1])&&(Jr.push(xa),jr=xa)}return Jr.length===1&&kr.length>1&&Jr.push(mt(kr[kr.length-1])),Jr}function zt(kr){return kr.map(Bt)}function Wt(kr){if(kr==null)return kr;var jr;switch(kr.type){case"GeometryCollection":jr={type:"GeometryCollection",geometries:kr.geometries.map(Wt)};break;case"Point":jr={type:"Point",coordinates:mt(kr.coordinates)};break;case"MultiPoint":jr={type:kr.type,coordinates:xt(kr.coordinates)};break;case"LineString":jr={type:kr.type,coordinates:Bt(kr.coordinates)};break;case"MultiLineString":case"Polygon":jr={type:kr.type,coordinates:zt(kr.coordinates)};break;case"MultiPolygon":jr={type:"MultiPolygon",coordinates:kr.coordinates.map(zt)};break;default:return kr}return kr.bbox!=null&&(jr.bbox=kr.bbox),jr}function Pr(kr){var jr={type:"Feature",properties:kr.properties,geometry:Wt(kr.geometry)};return kr.id!=null&&(jr.id=kr.id),kr.bbox!=null&&(jr.bbox=kr.bbox),jr}if($e!=null)switch($e.type){case"Feature":return Pr($e);case"FeatureCollection":{var Br={type:"FeatureCollection",features:$e.features.map(Pr)};return $e.bbox!=null&&(Br.bbox=$e.bbox),Br}default:return Wt($e)}return $e}function wr($e){var nt=v($e);function mt(xt,Bt){var zt=nt?g(xt*nt/2)/nt:xt/2;if(!Bt)return[2*zt,-$e];var Wt=2*l(zt*v(Bt)),Pr=1/g(Bt);return[v(Wt)*Pr,Bt+(1-t(Wt))*Pr-$e]}return mt.invert=function(xt,Bt){if(k(Bt+=$e)i&&--Pr>0);var la=xt*(kr=g(Wt)),xa=g(k(Bt)0?M:-M)*(Br+Bt*(jr-Wt)/2+Bt*Bt*(jr-2*Br+Wt)/2)]}Ia.invert=function($e,nt){var mt=nt/M,xt=mt*90,Bt=s(18,k(xt/5)),zt=o(0,r(Bt));do{var Wt=ba[zt][1],Pr=ba[zt+1][1],Br=ba[s(19,zt+2)][1],kr=Br-Wt,jr=Br-2*Pr+Wt,Jr=2*(k(mt)-Pr)/kr,la=jr/kr,xa=Jr*(1-la*Jr*(1-2*la*Jr));if(xa>=0||zt===1){xt=(nt>=0?5:-5)*(xa+Bt);var Ba=50,an;do Bt=s(18,k(xt)/5),zt=r(Bt),xa=Bt-zt,Wt=ba[zt][1],Pr=ba[zt+1][1],Br=ba[s(19,zt+2)][1],xt-=(an=(nt>=0?M:-M)*(Pr+xa*(Br-Wt)/2+xa*xa*(Br-2*Pr+Wt)/2)-nt)*A;while(k(an)>w&&--Ba>0);break}}while(--zt>=0);var wn=ba[zt][0],ii=ba[zt+1][0],Si=ba[s(19,zt+2)][0];return[$e/(ii+xa*(Si-wn)/2+xa*xa*(Si-2*ii+wn)/2),xt*x]};function Na(){return b.geoProjection(Ia).scale(152.63)}function Za($e){function nt(mt,xt){var Bt=t(xt),zt=($e-1)/($e-Bt*t(mt));return[zt*Bt*v(mt),zt*v(xt)]}return nt.invert=function(mt,xt){var Bt=mt*mt+xt*xt,zt=D(Bt),Wt=($e-D(1-Bt*($e+1)/($e-1)))/(($e-1)/zt+zt/($e-1));return[e(mt*Wt,zt*D(1-Wt*Wt)),zt?I(xt*Wt/zt):0]},nt}function mn($e,nt){var mt=Za($e);if(!nt)return mt;var xt=t(nt),Bt=v(nt);function zt(Wt,Pr){var Br=mt(Wt,Pr),kr=Br[1],jr=kr*Bt/($e-1)+xt;return[Br[0]*xt/jr,kr/jr]}return zt.invert=function(Wt,Pr){var Br=($e-1)/($e-1-Pr*Bt);return mt.invert(Br*Wt,Br*Pr*xt)},zt}function Da(){var $e=2,nt=0,mt=b.geoProjectionMutator(mn),xt=mt($e,nt);return xt.distance=function(Bt){return arguments.length?mt($e=+Bt,nt):$e},xt.tilt=function(Bt){return arguments.length?mt($e,nt=Bt*x):nt*A},xt.scale(432.147).clipAngle(O(1/$e)*A-1e-6)}var Ha=1e-4,$a=1e4,vn=-180,Sn=vn+Ha,yi=180,_i=yi-Ha,ki=-90,ri=ki+Ha,En=90,Ln=En-Ha;function Ni($e){return $e.length>0}function Zi($e){return Math.floor($e*$a)/$a}function Co($e){return $e===ki||$e===En?[0,$e]:[vn,Zi($e)]}function Do($e){var nt=$e[0],mt=$e[1],xt=!1;return nt<=Sn?(nt=vn,xt=!0):nt>=_i&&(nt=yi,xt=!0),mt<=ri?(mt=ki,xt=!0):mt>=Ln&&(mt=En,xt=!0),xt?[nt,mt]:$e}function Fo($e){return $e.map(Do)}function Yo($e,nt,mt){for(var xt=0,Bt=$e.length;xt=_i||jr<=ri||jr>=Ln){zt[Wt]=Do(Br);for(var Jr=Wt+1;JrSn&&xa<_i&&Ba>ri&&Ba=Pr)break;mt.push({index:-1,polygon:nt,ring:zt=zt.slice(Jr-1)}),zt[0]=Co(zt[0][1]),Wt=-1,Pr=zt.length}}}}function bo($e){var nt,mt=$e.length,xt={},Bt={},zt,Wt,Pr,Br,kr;for(nt=0;nt0?S-Pr:Pr)*A],kr=b.geoProjection($e(Wt)).rotate(Br),jr=b.geoRotation(Br),Jr=kr.center;return delete kr.rotate,kr.center=function(la){return arguments.length?Jr(jr(la)):jr.invert(Jr())},kr.clipAngle(90)}function js($e){var nt=t($e);function mt(xt,Bt){var zt=b.geoGnomonicRaw(xt,Bt);return zt[0]*=nt,zt}return mt.invert=function(xt,Bt){return b.geoGnomonicRaw.invert(xt/nt,Bt)},mt}function Cl(){return zl([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function zl($e,nt){return gs(js,$e,nt)}function Kl($e){if(!($e*=2))return b.geoAzimuthalEquidistantRaw;var nt=-$e/2,mt=-nt,xt=$e*$e,Bt=g(mt),zt=.5/v(mt);function Wt(Pr,Br){var kr=O(t(Br)*t(Pr-nt)),jr=O(t(Br)*t(Pr-mt)),Jr=Br<0?-1:1;return kr*=kr,jr*=jr,[(kr-jr)/(2*$e),Jr*D(4*xt*jr-(xt-kr+jr)*(xt-kr+jr))/(2*$e)]}return Wt.invert=function(Pr,Br){var kr=Br*Br,jr=t(D(kr+(la=Pr+nt)*la)),Jr=t(D(kr+(la=Pr+mt)*la)),la,xa;return[e(xa=jr-Jr,la=(jr+Jr)*Bt),(Br<0?-1:1)*O(D(la*la+xa*xa)*zt)]},Wt}function Gu(){return xl([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function xl($e,nt){return gs(Kl,$e,nt)}function Hu($e,nt){if(k(nt)i&&--Pr>0);return[h($e)*(D(Bt*Bt+4)+Bt)*S/4,M*Wt]};function Ql(){return b.geoProjection(Jl).scale(127.16)}function Eu($e,nt,mt,xt,Bt){function zt(Wt,Pr){var Br=mt*v(xt*Pr),kr=D(1-Br*Br),jr=D(2/(1+kr*t(Wt*=Bt)));return[$e*kr*jr*v(Wt),nt*Br*jr]}return zt.invert=function(Wt,Pr){var Br=Wt/$e,kr=Pr/nt,jr=D(Br*Br+kr*kr),Jr=2*I(jr/2);return[e(Wt*g(Jr),$e*jr)/Bt,jr&&I(Pr*v(Jr)/(nt*mt*jr))/xt]},zt}function bf($e,nt,mt,xt){var Bt=S/3;$e=o($e,i),nt=o(nt,i),$e=s($e,M),nt=s(nt,S-i),mt=o(mt,0),mt=s(mt,100-i),xt=o(xt,i);var zt=mt/100+1,Wt=xt/100,Pr=O(zt*t(Bt))/Bt,Br=v($e)/v(Pr*M),kr=nt/S,jr=D(Wt*v($e/2)/v(nt/2)),Jr=jr/D(kr*Br*Pr),la=1/(jr*D(kr*Br*Pr));return Eu(Jr,la,Br,Pr,kr)}function lh(){var $e=65*x,nt=60*x,mt=20,xt=200,Bt=b.geoProjectionMutator(bf),zt=Bt($e,nt,mt,xt);return zt.poleline=function(Wt){return arguments.length?Bt($e=+Wt*x,nt,mt,xt):$e*A},zt.parallels=function(Wt){return arguments.length?Bt($e,nt=+Wt*x,mt,xt):nt*A},zt.inflation=function(Wt){return arguments.length?Bt($e,nt,mt=+Wt,xt):mt},zt.ratio=function(Wt){return arguments.length?Bt($e,nt,mt,xt=+Wt):xt},zt.scale(163.775)}function Pc(){return lh().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Ks=4*S+3*D(3),Bl=2*D(2*S*D(3)/Ks),Wu=ke(Bl*D(3)/S,Bl,Ks/6);function wf(){return b.geoProjection(Wu).scale(176.84)}function Qc($e,nt){return[$e*D(1-3*nt*nt/(S*S)),nt]}Qc.invert=function($e,nt){return[$e/D(1-3*nt*nt/(S*S)),nt]};function ku(){return b.geoProjection(Qc).scale(152.63)}function Ol($e,nt){var mt=t(nt),xt=t($e)*mt,Bt=1-xt,zt=t($e=e(v($e)*mt,-v(nt))),Wt=v($e);return mt=D(1-xt*xt),[Wt*mt-zt*Bt,-zt*mt-Wt*Bt]}Ol.invert=function($e,nt){var mt=($e*$e+nt*nt)/-2,xt=D(-mt*(2+mt)),Bt=nt*mt+$e*xt,zt=$e*mt-nt*xt,Wt=D(zt*zt+Bt*Bt);return[e(xt*Bt,Wt*(1+mt)),Wt?-I(xt*zt/Wt):0]};function Nl(){return b.geoProjection(Ol).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function fi($e,nt){var mt=re($e,nt);return[(mt[0]+$e/M)/2,(mt[1]+nt)/2]}fi.invert=function($e,nt){var mt=$e,xt=nt,Bt=25;do{var zt=t(xt),Wt=v(xt),Pr=v(2*xt),Br=Wt*Wt,kr=zt*zt,jr=v(mt),Jr=t(mt/2),la=v(mt/2),xa=la*la,Ba=1-kr*Jr*Jr,an=Ba?O(zt*Jr)*D(wn=1/Ba):wn=0,wn,ii=.5*(2*an*zt*la+mt/M)-$e,Si=.5*(an*Wt+xt)-nt,oi=.5*wn*(kr*xa+an*zt*Jr*Br)+.5/M,Ji=wn*(jr*Pr/4-an*Wt*la),Qi=.125*wn*(Pr*la-an*Wt*kr*jr),Oo=.5*wn*(Br*Jr+an*xa*zt)+.5,Qo=Ji*Qi-Oo*oi,vo=(Si*Ji-ii*Oo)/Qo,ys=(ii*Qi-Si*oi)/Qo;mt-=vo,xt-=ys}while((k(vo)>i||k(ys)>i)&&--Bt>0);return[mt,xt]};function eu(){return b.geoProjection(fi).scale(158.837)}p.geoNaturalEarth=b.geoNaturalEarth1,p.geoNaturalEarthRaw=b.geoNaturalEarth1Raw,p.geoAiry=Q,p.geoAiryRaw=$,p.geoAitoff=ne,p.geoAitoffRaw=re,p.geoArmadillo=G,p.geoArmadilloRaw=se,p.geoAugust=K,p.geoAugustRaw=X,p.geoBaker=Z,p.geoBakerRaw=q,p.geoBerghaus=ae,p.geoBerghausRaw=ee,p.geoBertin1953=Ve,p.geoBertin1953Raw=Ie,p.geoBoggs=Be,p.geoBoggsRaw=Ae,p.geoBonne=Tt,p.geoBonneRaw=gt,p.geoBottomley=$t,p.geoBottomleyRaw=At,p.geoBromley=_r,p.geoBromleyRaw=rr,p.geoChamberlin=Ne,p.geoChamberlinRaw=vt,p.geoChamberlinAfrica=De,p.geoCollignon=Ke,p.geoCollignonRaw=We,p.geoCraig=et,p.geoCraigRaw=Je,p.geoCraster=Pt,p.geoCrasterRaw=pt,p.geoCylindricalEqualArea=qt,p.geoCylindricalEqualAreaRaw=Ct,p.geoCylindricalStereographic=Ht,p.geoCylindricalStereographicRaw=Vt,p.geoEckert1=Kr,p.geoEckert1Raw=Sr,p.geoEckert2=Rt,p.geoEckert2Raw=Yt,p.geoEckert3=ur,p.geoEckert3Raw=nr,p.geoEckert4=Rr,p.geoEckert4Raw=cr,p.geoEckert5=Zr,p.geoEckert5Raw=Qr,p.geoEckert6=Pa,p.geoEckert6Raw=ha,p.geoEisenlohr=Xa,p.geoEisenlohrRaw=un,p.geoFahey=yn,p.geoFaheyRaw=Nn,p.geoFoucaut=li,p.geoFoucautRaw=Un,p.geoFoucautSinusoidal=on,p.geoFoucautSinusoidalRaw=Yn,p.geoGilbert=Yi,p.geoGingery=rt,p.geoGingeryRaw=Ja,p.geoGinzburg4=Tr,p.geoGinzburg4Raw=lr,p.geoGinzburg5=Dr,p.geoGinzburg5Raw=Ir,p.geoGinzburg6=kt,p.geoGinzburg6Raw=ot,p.geoGinzburg8=ar,p.geoGinzburg8Raw=jt,p.geoGinzburg9=xr,p.geoGinzburg9Raw=Er,p.geoGringorten=wa,p.geoGringortenRaw=Lr,p.geoGuyou=Di,p.geoGuyouRaw=Ri,p.geoHammer=we,p.geoHammerRaw=he,p.geoHammerRetroazimuthal=jn,p.geoHammerRetroazimuthalRaw=fn,p.geoHealpix=Hi,p.geoHealpixRaw=qi,p.geoHill=Ro,p.geoHillRaw=Mi,p.geoHomolosine=Wo,p.geoHomolosineRaw=jo,p.geoHufnagel=wo,p.geoHufnagelRaw=to,p.geoHyperelliptical=Xi,p.geoHyperellipticalRaw=Io,p.geoInterrupt=Ss,p.geoInterruptedBoggs=Vs,p.geoInterruptedHomolosine=Bo,p.geoInterruptedMollweide=Pi,p.geoInterruptedMollweideHemispheres=bs,p.geoInterruptedSinuMollweide=hl,p.geoInterruptedSinusoidal=dl,p.geoKavrayskiy7=lu,p.geoKavrayskiy7Raw=wu,p.geoLagrange=Fl,p.geoLagrangeRaw=xc,p.geoLarrivee=uu,p.geoLarriveeRaw=$u,p.geoLaskowski=vs,p.geoLaskowskiRaw=tl,p.geoLittrow=ms,p.geoLittrowRaw=os,p.geoLoximuthal=Fu,p.geoLoximuthalRaw=rl,p.geoMiller=Ku,p.geoMillerRaw=zu,p.geoModifiedStereographic=Ou,p.geoModifiedStereographicRaw=bc,p.geoModifiedStereographicAlaska=wc,p.geoModifiedStereographicGs48=pc,p.geoModifiedStereographicGs50=Nf,p.geoModifiedStereographicMiller=Bu,p.geoModifiedStereographicLee=Tc,p.geoMollweide=ce,p.geoMollweideRaw=_e,p.geoMtFlatPolarParabolic=jf,p.geoMtFlatPolarParabolicRaw=$l,p.geoMtFlatPolarQuartic=Wc,p.geoMtFlatPolarQuarticRaw=Hc,p.geoMtFlatPolarSinusoidal=Yc,p.geoMtFlatPolarSinusoidalRaw=Qu,p.geoNaturalEarth2=Uf,p.geoNaturalEarth2Raw=Nu,p.geoNellHammer=Xc,p.geoNellHammerRaw=al,p.geoInterruptedQuarticAuthalic=Ac,p.geoNicolosi=ec,p.geoNicolosiRaw=Zc,p.geoPatterson=ac,p.geoPattersonRaw=qf,p.geoPolyconic=mf,p.geoPolyconicRaw=Mc,p.geoPolyhedral=Au,p.geoPolyhedralButterfly=Uu,p.geoPolyhedralCollignon=yf,p.geoPolyhedralWaterman=_f,p.geoProject=Vf,p.geoGringortenQuincuncial=Ft,p.geoPeirceQuincuncial=tr,p.geoPierceQuincuncial=tr,p.geoQuantize=Fr,p.geoQuincuncial=vc,p.geoRectangularPolyconic=ea,p.geoRectangularPolyconicRaw=wr,p.geoRobinson=Na,p.geoRobinsonRaw=Ia,p.geoSatellite=Da,p.geoSatelliteRaw=mn,p.geoSinuMollweide=ds,p.geoSinuMollweideRaw=Ao,p.geoSinusoidal=yt,p.geoSinusoidalRaw=Ye,p.geoStitch=ns,p.geoTimes=zo,p.geoTimesRaw=Kn,p.geoTwoPointAzimuthal=zl,p.geoTwoPointAzimuthalRaw=js,p.geoTwoPointAzimuthalUsa=Cl,p.geoTwoPointEquidistant=xl,p.geoTwoPointEquidistantRaw=Kl,p.geoTwoPointEquidistantUsa=Gu,p.geoVanDerGrinten=Su,p.geoVanDerGrintenRaw=Hu,p.geoVanDerGrinten2=Jc,p.geoVanDerGrinten2Raw=mc,p.geoVanDerGrinten3=du,p.geoVanDerGrinten3Raw=oc,p.geoVanDerGrinten4=Ql,p.geoVanDerGrinten4Raw=Jl,p.geoWagner=lh,p.geoWagner7=Pc,p.geoWagnerRaw=bf,p.geoWagner4=wf,p.geoWagner4Raw=Wu,p.geoWagner6=ku,p.geoWagner6Raw=Qc,p.geoWiechel=Nl,p.geoWiechelRaw=Ol,p.geoWinkel3=eu,p.geoWinkel3Raw=fi,Object.defineProperty(p,"__esModule",{value:!0})})}}),Sj=ze({"src/plots/geo/zoom.js"(J,V){"use strict";var p=ci(),b=Nr(),E=mi(),k=Math.PI/180,l=180/Math.PI,e={cursor:"pointer"},t={cursor:"auto"};function n(A,x){var z=A.projection,I;return x._isScoped?I=o:x._isClipped?I=c:I=s,I(A,z)}V.exports=n;function r(A,x){return p.behavior.zoom().translate(x.translate()).scaleExtent(x.scaleExtent()).scale(x.scale())}function a(A,x,z){var I=A.id,O=A.graphDiv,D=O.layout,B=D[I],F=O._fullLayout,P=F[I],j={},U={};function $(Q,re){j[I+"."+Q]=b.nestedProperty(B,Q).get(),E.call("_storeDirectGUIEdit",D,F._preGUI,j);var ne=b.nestedProperty(P,Q);ne.get()!==re&&(ne.set(re),b.nestedProperty(B,Q).set(re),U[I+"."+Q]=re)}z($),$("projection.scale",x.scale()/A.fitScale),$("fitbounds",!1),O.emit("plotly_relayout",U)}function o(A,x){var z=r(A,x);function I(){p.select(this).style(e)}function O(){x.scale(p.event.scale).translate(p.event.translate),A.render(!0);var F=x.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.center.lon":F[0],"geo.center.lat":F[1]})}function D(F){var P=x.invert(A.midPt);F("center.lon",P[0]),F("center.lat",P[1])}function B(){p.select(this).style(t),a(A,x,D)}return z.on("zoomstart",I).on("zoom",O).on("zoomend",B),z}function s(A,x){var z=r(A,x),I=2,O,D,B,F,P,j,U,$,Q;function re(H){return x.invert(H)}function ne(H){var Y=re(H);if(!Y)return!0;var q=x(Y);return Math.abs(q[0]-H[0])>I||Math.abs(q[1]-H[1])>I}function se(){p.select(this).style(e);let{x:H,y:Y,width:q,height:Z}=this.getBBox();O=p.event.sourceEvent?p.mouse(this):[H+q/2,Y+Z/2],D=x.rotate(),B=x.translate(),F=D,P=re(O)}function G(){let{x:H,y:Y,width:q,height:Z}=this.getBBox();if(j=p.event.sourceEvent?p.mouse(this):[H+q/2,Y+Z/2],ne(O)){z.scale(x.scale()),z.translate(x.translate());return}x.scale(p.event.scale),x.translate([B[0],p.event.translate[1]]),P?re(j)&&($=re(j),U=[F[0]+($[0]-P[0]),D[1],D[2]],x.rotate(U),F=U):(O=j,P=re(O)),Q=!0,A.render(!0);var ee=x.rotate(),ae=x.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.center.lon":ae[0],"geo.center.lat":ae[1],"geo.projection.rotation.lon":-ee[0]})}function X(){p.select(this).style(t),Q&&a(A,x,K)}function K(H){var Y=x.rotate(),q=x.invert(A.midPt);H("projection.rotation.lon",-Y[0]),H("center.lon",q[0]),H("center.lat",q[1])}return z.on("zoomstart",se).on("zoom",G).on("zoomend",X),z}function c(A,x){var z={r:x.rotate(),k:x.scale()},I=r(A,x),O=u(I,"zoomstart","zoom","zoomend"),D=0,B=I.on,F;I.on("zoomstart",function(){p.select(this).style(e);let{x:Q,y:re,width:ne,height:se}=this.getBBox(),G=p.event.sourceEvent?p.mouse(this):[Q+ne/2,re+se/2],X=x.rotate(),K=X,H=x.translate(),Y=h(X);F=m(x,G),B.call(I,"zoom",function(){let{x:q,y:Z,width:ee,height:ae}=this.getBBox(),he=p.event.sourceEvent?p.mouse(this):[q+ee/2,Z+ae/2];if(x.scale(z.k=p.event.scale),!F)G=he,F=m(x,G);else if(m(x,he)){x.rotate(X).translate(H);var xe=m(x,he),we=g(F,xe),Me=C(v(Y,we)),Se=z.r=i(Me,F,K);(!isFinite(Se[0])||!isFinite(Se[1])||!isFinite(Se[2]))&&(Se=K),x.rotate(Se),K=Se}j(O.of(this,arguments))}),P(O.of(this,arguments))}).on("zoomend",function(){p.select(this).style(t),B.call(I,"zoom",null),U(O.of(this,arguments)),a(A,x,$)}).on("zoom.redraw",function(){A.render(!0);var Q=x.rotate();A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.projection.rotation.lon":-Q[0],"geo.projection.rotation.lat":-Q[1]})});function P(Q){D++||Q({type:"zoomstart"})}function j(Q){Q({type:"zoom"})}function U(Q){--D||Q({type:"zoomend"})}function $(Q){var re=x.rotate();Q("projection.rotation.lon",-re[0]),Q("projection.rotation.lat",-re[1])}return p.rebind(I,O,"on")}function m(A,x){var z=A.invert(x);return z&&isFinite(z[0])&&isFinite(z[1])&&_(z)}function h(A){var x=.5*A[0]*k,z=.5*A[1]*k,I=.5*A[2]*k,O=Math.sin(x),D=Math.cos(x),B=Math.sin(z),F=Math.cos(z),P=Math.sin(I),j=Math.cos(I);return[D*F*j+O*B*P,O*F*j-D*B*P,D*B*j+O*F*P,D*F*P-O*B*j]}function v(A,x){var z=A[0],I=A[1],O=A[2],D=A[3],B=x[0],F=x[1],P=x[2],j=x[3];return[z*B-I*F-O*P-D*j,z*F+I*B+O*j-D*P,z*P-I*j+O*B+D*F,z*j+I*P-O*F+D*B]}function g(A,x){if(!(!A||!x)){var z=f(A,x),I=Math.sqrt(T(z,z)),O=.5*Math.acos(Math.max(-1,Math.min(1,T(A,x)))),D=Math.sin(O)/I;return I&&[Math.cos(O),z[2]*D,-z[1]*D,z[0]*D]}}function i(A,x,z){var I=M(x,2,A[0]);I=M(I,1,A[1]),I=M(I,0,A[2]-z[2]);var O=x[0],D=x[1],B=x[2],F=I[0],P=I[1],j=I[2],U=Math.atan2(D,O)*l,$=Math.sqrt(O*O+D*D),Q,re;Math.abs(P)>$?(re=(P>0?90:-90)-U,Q=0):(re=Math.asin(P/$)*l-U,Q=Math.sqrt($*$-P*P));var ne=180-re-2*U,se=(Math.atan2(j,F)-Math.atan2(B,Q))*l,G=(Math.atan2(j,F)-Math.atan2(B,-Q))*l,X=w(z[0],z[1],re,se),K=w(z[0],z[1],ne,G);return X<=K?[re,se,z[2]]:[ne,G,z[2]]}function w(A,x,z,I){var O=S(z-A),D=S(I-x);return Math.sqrt(O*O+D*D)}function S(A){return(A%360+540)%360-180}function M(A,x,z){var I=z*k,O=A.slice(),D=x===0?1:0,B=x===2?1:2,F=Math.cos(I),P=Math.sin(I);return O[D]=A[D]*F-A[B]*P,O[B]=A[B]*F+A[D]*P,O}function C(A){return[Math.atan2(2*(A[0]*A[1]+A[2]*A[3]),1-2*(A[1]*A[1]+A[2]*A[2]))*l,Math.asin(Math.max(-1,Math.min(1,2*(A[0]*A[2]-A[3]*A[1]))))*l,Math.atan2(2*(A[0]*A[3]+A[1]*A[2]),1-2*(A[2]*A[2]+A[3]*A[3]))*l]}function _(A){var x=A[0]*k,z=A[1]*k,I=Math.cos(z);return[I*Math.cos(x),I*Math.sin(x),Math.sin(z)]}function T(A,x){for(var z=0,I=0,O=A.length;I0&&$._module.calcGeoJSON(U,B)}if(!F){var Q=this.updateProjection(D,B);if(Q)return;(!this.viewInitial||this.scope!==P.scope)&&this.saveViewInitial(P)}this.scope=P.scope,this.updateBaseLayers(B,P),this.updateDims(B,P),this.updateFx(B,P),s.generalUpdatePerTraceModule(this.graphDiv,this,D,P);var re=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=re.selectAll(".point"),this.dataPoints.text=re.selectAll("text"),this.dataPaths.line=re.selectAll(".js-line");var ne=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ne.selectAll("path"),this._render()},x.updateProjection=function(D,B){var F=this.graphDiv,P=B[this.id],j=B._size,U=P.domain,$=P.projection,Q=P.lonaxis,re=P.lataxis,ne=Q._ax,se=re._ax,G=this.projection=z(P),X=[[j.l+j.w*U.x[0],j.t+j.h*(1-U.y[1])],[j.l+j.w*U.x[1],j.t+j.h*(1-U.y[0])]],K=P.center||{},H=$.rotation||{},Y=Q.range||[],q=re.range||[];if(P.fitbounds){ne._length=X[1][0]-X[0][0],se._length=X[1][1]-X[0][1],ne.range=h(F,ne),se.range=h(F,se);let ve=[];for(let $t of D){let rr=$t[0].trace;rr.visible===!0&&rr._module.fitCoords&&ve.push(rr._module.fitCoords($t,P))}let le=m(F,ne),Ae=le.min.reduce(($t,{val:rr})=>Math.min($t,rr),1/0),Xe=le.max.reduce(($t,{val:rr})=>Math.max($t,rr),-1/0)-Ae,Ye=_.boundsOfCoords(ve.flat()),[yt,,gt]=Ye||[],Tt=gt-yt;if(!!Ye&&(Xe>360||Xe<360&&TtMath.max(ht,$t(De)),0),Xt=le.max.reduce((ht,De)=>Math.max(ht,rr(De)),0),or=ne._length-_r-Xt,Ot=or>ne._length/10?Tt*ne._length/or:Tt,vt=(yt+gt)/2;ne.range=[vt-Ot/2,vt+Ot/2]}var Z=(ne.range[0]+ne.range[1])/2,ee=(se.range[0]+se.range[1])/2;if(P._isScoped)K={lon:Z,lat:ee};else if(P._isClipped){K={lon:Z,lat:ee},H={lon:Z,lat:ee,roll:H.roll};var ae=$.type,he=C.lonaxisSpan[ae]/2||180,xe=C.lataxisSpan[ae]/2||90;Y=[Z-he,Z+he],q=[ee-xe,ee+xe]}else K={lon:Z,lat:ee},H={lon:Z,lat:H.lat,roll:H.roll}}G.center([K.lon-H.lon,K.lat-H.lat]).rotate([-H.lon,-H.lat,H.roll]).parallels($.parallels);var we=O(Y,q);G.fitExtent(X,we);var Me=this.bounds=G.getBounds(we),Se=this.fitScale=G.scale(),Ie=G.translate();if(G.scaleExtent=()=>{var ve;let{minscale:le}=$,Ae=(ve=$.maxscale)!=null?ve:1/0;return[Se*Math.min(le,Ae),Se*Math.max(le,Ae)]},P.fitbounds){var Ve=G.getBounds(O(ne.range,se.range)),Ge=Math.min((Me[1][0]-Me[0][0])/(Ve[1][0]-Ve[0][0]),(Me[1][1]-Me[0][1])/(Ve[1][1]-Ve[0][1]));isFinite(Ge)?G.scale(Ge*Se):t.warn("Something went wrong during"+this.id+"fitbounds computations.")}else G.scale($.scale*Se);var ke=this.midPt=[(Me[0][0]+Me[1][0])/2,(Me[0][1]+Me[1][1])/2];if(G.translate([Ie[0]+(ke[0]-Ie[0]),Ie[1]+(ke[1]-Ie[1])]).clipExtent(Me),P._isAlbersUsa){var _e=G([K.lon,K.lat]);if(_e){var ce=G.translate();G.translate([ce[0]-(_e[0]-ce[0]),ce[1]-(_e[1]-ce[1])])}}},x.updateBaseLayers=function(D,B){var F=this,P=F.topojson,j=F.layers,U=F.basePaths;function $(X){return X==="lonaxis"||X==="lataxis"}function Q(X){return!!C.lineLayers[X]}function re(X){return!!C.fillLayers[X]}var ne=this.hasChoropleth?C.layersForChoropleth:C.layers,se=ne.filter(function(X){return Q(X)||re(X)?B["show"+X]:$(X)?B[X].showgrid:!0}),G=F.framework.selectAll(".layer").data(se,String);G.exit().each(function(X){delete j[X],delete U[X],p.select(this).remove()}),G.enter().append("g").attr("class",function(X){return"layer "+X}).each(function(X){var K=j[X]=p.select(this);X==="bg"?F.bgRect=K.append("rect").style("pointer-events","all"):$(X)?U[X]=K.append("path").style("fill","none"):X==="backplot"?K.append("g").classed("choroplethlayer",!0):X==="frontplot"?K.append("g").classed("scatterlayer",!0):Q(X)?U[X]=K.append("path").style("fill","none").style("stroke-miterlimit",2):re(X)&&(U[X]=K.append("path").style("stroke","none"))}),G.order(),G.each(function(X){var K=U[X],H=C.layerNameToAdjective[X];X==="frame"?K.datum(C.sphereSVG):Q(X)||re(X)?K.datum(u(P,P.objects[X])):$(X)&&K.datum(I(X,B,D)).call(r.stroke,B[X].gridcolor).call(a.dashLine,B[X].griddash,B[X].gridwidth),Q(X)?K.call(r.stroke,B[H+"color"]).call(a.dashLine,"",B[H+"width"]):re(X)&&K.call(r.fill,B[H+"color"])})},x.updateDims=function(D,B){var F=this.bounds,P=(B.framewidth||0)/2,j=F[0][0]-P,U=F[0][1]-P,$=F[1][0]-j+P,Q=F[1][1]-U+P;a.setRect(this.clipRect,j,U,$,Q),this.bgRect.call(a.setRect,j,U,$,Q).call(r.fill,B.bgcolor),this.xaxis._offset=j,this.xaxis._length=$,this.yaxis._offset=U,this.yaxis._length=Q},x.updateFx=function(D,B){var F=this,P=F.graphDiv,j=F.bgRect,U=D.dragmode,$=D.clickmode;if(F.isStatic)return;function Q(){var G=F.viewInitial,X={};for(var K in G)X[F.id+"."+K]=G[K];e.call("_guiRelayout",P,X),P.emit("plotly_doubleclick",null)}function re(G){return F.projection.invert([G[0]+F.xaxis._offset,G[1]+F.yaxis._offset])}var ne=function(G,X){if(X.isRect){var K=G.range={};K[F.id]=[re([X.xmin,X.ymin]),re([X.xmax,X.ymax])]}else{var H=G.lassoPoints={};H[F.id]=X.map(re)}},se={element:F.bgRect.node(),gd:P,plotinfo:{id:F.id,xaxis:F.xaxis,yaxis:F.yaxis,fillRangeItems:ne},xaxes:[F.xaxis],yaxes:[F.yaxis],subplot:F.id,clickFn:function(G){G===2&&w(P)}};if(U==="pan"){j.node().onmousedown=null;let G=M(F,B);if(j.call(G),!p.event){let X=F.projection.scale(),[K,H]=F.projection.scaleExtent();(XH)&&G.event(j)}j.on("dblclick.zoom",Q),P._context._scrollZoom.geo||j.on("wheel.zoom",null)}else(U==="select"||U==="lasso")&&(j.on(".zoom",null),se.prepFn=function(G,X,K){i(G,X,K,se,U)},g.init(se));j.on("mousemove",function(){var G=F.projection.invert(t.getPositionFromD3Event());if(!G)return g.unhover(P,p.event);F.xaxis.p2c=function(){return G[0]},F.yaxis.p2c=function(){return G[1]},o.hover(P,p.event,F.id)}),j.on("mouseout",function(){P._dragging||g.unhover(P,p.event)}),j.on("click",function(){U!=="select"&&U!=="lasso"&&($.indexOf("select")>-1&&S(p.event,P,[F.xaxis],[F.yaxis],F.id,se),$.indexOf("event")>-1&&o.click(P,p.event))})},x.makeFramework=function(){var D=this,B=D.graphDiv,F=B._fullLayout,P="clip"+F._uid+D.id;D.clipDef=F._clips.append("clipPath").attr("id",P),D.clipRect=D.clipDef.append("rect"),D.framework=p.select(D.container).append("g").attr("class","geo "+D.id).call(a.setClipUrl,P,B),D.project=function(j){var U=D.projection(j);return U?[U[0]-D.xaxis._offset,U[1]-D.yaxis._offset]:[null,null]},D.xaxis={_id:"x",c2p:function(j){return D.project(j)[0]}},D.yaxis={_id:"y",c2p:function(j){return D.project(j)[1]}},D.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(D.mockAxis,F)},x.saveViewInitial=function(D){var B=D.center||{},F=D.projection,P=F.rotation||{};this.viewInitial={fitbounds:D.fitbounds,"projection.scale":F.scale};var j;D._isScoped?j={"center.lon":B.lon,"center.lat":B.lat}:D._isClipped?j={"projection.rotation.lon":P.lon,"projection.rotation.lat":P.lat,"center.lon":B.lon,"center.lat":B.lat}:j={"center.lon":B.lon,"center.lat":B.lat,"projection.rotation.lon":P.lon},t.extendFlat(this.viewInitial,j)},x.render=function(D){this._hasMarkerAngles&&D?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},x._render=function(){var D=this.projection,B=D.getPath(),F;function P(U){var $=D(U.lonlat);return $?n($[0],$[1]):null}function j(U){return D.isLonLatOverEdges(U.lonlat)?"none":null}for(F in this.basePaths)this.basePaths[F].attr("d",B);for(F in this.dataPaths)this.dataPaths[F].attr("d",function(U){return B(U.geojson)});for(F in this.dataPoints)this.dataPoints[F].attr("display",j).attr("transform",P)};function z(D){var B=D.projection,F=B.type,P=C.projNames[F];P="geo"+t.titleCase(P);for(var j=b[P]||l[P],U=j(),$=D._isSatellite?Math.acos(1/B.distance)*180/Math.PI:D._isClipped?C.lonaxisSpan[F]/2:null,Q=["center","rotate","parallels","clipExtent"],re=function(G){return G?U:[]},ne=0;neH}else return!1},U.getPath=function(){return E().projection(U)},U.getBounds=function(G){return U.getPath().bounds(G)},U.precision(C.precision),D._isSatellite&&U.tilt(B.tilt).distance(B.distance),$&&U.clipAngle($-C.clipPad),U}function I(D,B,F){var P=1e-6,j=2.5,U=B[D],$=C.scopeDefaults[B.scope],Q,re,ne;D==="lonaxis"?(Q=$.lonaxisRange,re=$.lataxisRange,ne=function(ee,ae){return[ee,ae]}):D==="lataxis"&&(Q=$.lataxisRange,re=$.lonaxisRange,ne=function(ee,ae){return[ae,ee]});var se={type:"linear",range:[Q[0],Q[1]-P],tick0:U.tick0,dtick:U.dtick};c.setConvert(se,F);var G=c.calcTicks(se);!B.isScoped&&D==="lonaxis"&&G.pop();for(var X=G.length,K=new Array(X),H=0;Hhe[xe]!=null)||l.fitboundsIncompatible.has(i)?a.fitbounds=!1:ee.forEach(({dst:he,key:xe})=>he&&(he[xe]=null))}}}}),RA=ze({"src/plots/geo/index.js"(J,V){"use strict";var p=zf().getSubplotCalcData,b=Nr().counterRegex,E=Ej(),k="geo",l=b(k),e={};e[k]={valType:"subplotid",dflt:k,editType:"calc"};function t(a){for(var o=a._fullLayout,s=a.calcdata,c=o._subplots[k],m=0;m")}}}}),FA=ze({"src/traces/choropleth/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){b.location=E.location,b.z=E.z;var t=l[e];return t.fIn&&t.fIn.properties&&(b.properties=t.fIn.properties),b.ct=t.ct,b}}}),zA=ze({"src/traces/choropleth/select.js"(J,V){"use strict";V.exports=function(b,E){var k=b.cd,l=b.xaxis,e=b.yaxis,t=[],n,r,a,o,s;if(E===!1)for(n=0;n=Math.min(U,$)&&g<=Math.max(U,$)?0:1/0}if(I=Math.min(Q,re)&&i<=Math.max(Q,re)?0:1/0}B=Math.sqrt(I*I+O*O),u=S[z]}}}else for(z=S.length-1;z>-1;z--)f=S[z],A=h[f],x=v[f],I=c.c2p(A)-g,O=m.c2p(x)-i,D=Math.sqrt(I*I+O*O),D100},J.isDotSymbol=function(p){return typeof p=="string"?V.DOT_RE.test(p):p>200}}}),Dj=ze({"src/traces/scattergl/defaults.js"(J,V){"use strict";var p=Nr(),b=mi(),E=D2(),k=ty(),l=zd(),e=el(),t=Gv(),n=yd(),r=id(),a=_d(),o=Od(),s=xd();V.exports=function(m,h,v,g){function i(u,A){return p.coerce(m,h,k,u,A)}var w=m.marker?E.isOpenSymbol(m.marker.symbol):!1,S=e.isBubble(m),M=t(m,h,g,i);if(!M){h.visible=!1;return}n(m,h,g,i),i("xhoverformat"),i("yhoverformat");var C=M>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h>=0?(s=c,o=c-1):a=c+1}return s}function b(t,n,r,a,o){for(var s=o+1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h>0?(s=c,o=c-1):a=c+1}return s}function E(t,n,r,a,o){for(var s=a-1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h<0?(s=c,a=c+1):o=c-1}return s}function k(t,n,r,a,o){for(var s=a-1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h<=0?(s=c,a=c+1):o=c-1}return s}function l(t,n,r,a,o){for(;a<=o;){var s=a+o>>>1,c=t[s],m=r!==void 0?r(c,n):c-n;if(m===0)return s;m<=0?a=s+1:o=s-1}return-1}function e(t,n,r,a,o,s){return typeof r=="function"?s(t,n,r,a===void 0?0:a|0,o===void 0?t.length-1:o|0):s(t,n,void 0,r===void 0?0:r|0,a===void 0?t.length-1:a|0)}V.exports={ge:function(t,n,r,a,o){return e(t,n,r,a,o,p)},gt:function(t,n,r,a,o){return e(t,n,r,a,o,b)},lt:function(t,n,r,a,o){return e(t,n,r,a,o,E)},le:function(t,n,r,a,o){return e(t,n,r,a,o,k)},eq:function(t,n,r,a,o){return e(t,n,r,a,o,l)}}}}),BA=ze({"node_modules/clamp/index.js"(J,V){V.exports=p;function p(b,E,k){return Ek?k:b:bE?E:b}}}),qd=ze({"node_modules/pick-by-alias/index.js"(J,V){"use strict";V.exports=function(k,l,e){var t={},n,r;if(typeof l=="string"&&(l=b(l)),Array.isArray(l)){var a={};for(r=0;r1&&(E=arguments),typeof E=="string"?E=E.split(/\s/).map(parseFloat):typeof E=="number"&&(E=[E]),E.length&&typeof E[0]=="number"?E.length===1?k={width:E[0],height:E[0],x:0,y:0}:E.length===2?k={width:E[0],height:E[1],x:0,y:0}:k={x:E[0],y:E[1],width:E[2]-E[0]||0,height:E[3]-E[1]||0}:E&&(E=p(E,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),k={x:E.left||0,y:E.top||0},E.width==null?E.right?k.width=E.right-k.x:k.width=0:k.width=E.width,E.height==null?E.bottom?k.height=E.bottom-k.y:k.height=0:k.height=E.height),k}}}),c0=ze({"node_modules/array-bounds/index.js"(J,V){"use strict";V.exports=p;function p(b,E){if(!b||b.length==null)throw Error("Argument should be an array");E==null?E=1:E=Math.floor(E);for(var k=Array(E*2),l=0;le&&(e=b[n]),b[n]>>1,S;h.dtype||(h.dtype="array"),typeof h.dtype=="string"?S=new(r(h.dtype))(w):h.dtype&&(S=h.dtype,Array.isArray(S)&&(S.length=w));for(let I=0;Iv||P>o){for(let Y=0;Yae||$>he||Q=ne||Z===ee)return;let xe=M[q];ee===void 0&&(ee=xe.length);for(let ce=Z;ce=B&&le<=P&&Ae>=F&&Ae<=j&&se.push(ve)}let we=C[q],Me=we[Z*4+0],Se=we[Z*4+1],Ie=we[Z*4+2],Ve=we[Z*4+3],Ge=X(we,Z+1),ke=Y*.5,_e=q+1;G(K,H,ke,_e,Me,Se||Ie||Ve||Ge),G(K,H+ke,ke,_e,Se,Ie||Ve||Ge),G(K+ke,H,ke,_e,Ie,Ve||Ge),G(K+ke,H+ke,ke,_e,Ve,Ge)}function X(K,H){let Y=null,q=0;for(;Y===null;)if(Y=K[H*4+q],q++,q>K.length)return null;return Y}return se}function x(I,O,D,B,F){let P=[];for(let j=0;j2&&(t.push([r].concat(a.splice(0,2))),o="l",r=r=="m"?"l":"L");;){if(a.length==p[o])return a.unshift(r),t.push(a);if(a.length1&&(m=1),m<-1&&(m=-1),c*Math.acos(m)},e=function(r,a,o,s,c,m,h,v,g,i,w,S){var M=Math.pow(c,2),C=Math.pow(m,2),_=Math.pow(w,2),T=Math.pow(S,2),f=M*C-M*T-C*_;f<0&&(f=0),f/=M*T+C*_,f=Math.sqrt(f)*(h===v?-1:1);var u=f*c/m*S,A=f*-m/c*w,x=i*u-g*A+(r+o)/2,z=g*u+i*A+(a+s)/2,I=(w-u)/c,O=(S-A)/m,D=(-w-u)/c,B=(-S-A)/m,F=l(1,0,I,O),P=l(I,O,D,B);return v===0&&P>0&&(P-=b),v===1&&P<0&&(P+=b),[x,z,F,P]},t=function(r){var a=r.px,o=r.py,s=r.cx,c=r.cy,m=r.rx,h=r.ry,v=r.xAxisRotation,g=v===void 0?0:v,i=r.largeArcFlag,w=i===void 0?0:i,S=r.sweepFlag,M=S===void 0?0:S,C=[];if(m===0||h===0)return[];var _=Math.sin(g*b/360),T=Math.cos(g*b/360),f=T*(a-s)/2+_*(o-c)/2,u=-_*(a-s)/2+T*(o-c)/2;if(f===0&&u===0)return[];m=Math.abs(m),h=Math.abs(h);var A=Math.pow(f,2)/Math.pow(m,2)+Math.pow(u,2)/Math.pow(h,2);A>1&&(m*=Math.sqrt(A),h*=Math.sqrt(A));var x=e(a,o,s,c,m,h,w,M,_,T,f,u),z=p(x,4),I=z[0],O=z[1],D=z[2],B=z[3],F=Math.abs(B)/(b/4);Math.abs(1-F)<1e-7&&(F=1);var P=Math.max(Math.ceil(F),1);B/=P;for(var j=0;j4?(n=i[i.length-4],r=i[i.length-3]):(n=m,r=h),t.push(i)}return t}function E(l,e,t,n){return["C",l,e,t,n,t,n]}function k(l,e,t,n,r,a){return["C",l/3+2/3*t,e/3+2/3*n,r/3+2/3*t,a/3+2/3*n,r,a]}}}),OA=ze({"node_modules/is-svg-path/index.js"(J,V){"use strict";V.exports=function(b){return typeof b!="string"?!1:(b=b.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(b)&&/[\dz]$/i.test(b)&&b.length>4))}}}),Hj=ze({"node_modules/svg-path-bounds/index.js"(J,V){"use strict";var p=Uj(),b=qj(),E=Gj(),k=OA();V.exports=l;function l(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!k(e))throw Error("String is not an SVG path.");e=p(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=b(e),e=E(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],n=0,r=e.length;nt[2]&&(t[2]=a[o+0]),a[o+1]>t[3]&&(t[3]=a[o+1]);return t}}}),Wj=ze({"node_modules/bitmap-sdf/index.js"(J,V){"use strict";V.exports=b;var p=1e20;function b(l,e){e||(e={});var t=e.cutoff==null?.25:e.cutoff,n=e.radius==null?8:e.radius,r=e.channel||0,a,o,s,c,m,h,v,g,i,w,S;if(ArrayBuffer.isView(l)||Array.isArray(l)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");a=e.width,o=e.height,c=l,e.stride?h=e.stride:h=Math.floor(l.length/a/o)}else window.HTMLCanvasElement&&l instanceof window.HTMLCanvasElement?(g=l,v=g.getContext("2d"),a=g.width,o=g.height,i=v.getImageData(0,0,a,o),c=i.data,h=4):window.CanvasRenderingContext2D&&l instanceof window.CanvasRenderingContext2D?(g=l.canvas,v=l,a=g.width,o=g.height,i=v.getImageData(0,0,a,o),c=i.data,h=4):window.ImageData&&l instanceof window.ImageData&&(i=l,a=l.width,o=l.height,c=i.data,h=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(m=c,c=Array(a*o),w=0,S=Math.floor(m.length/h);wYj});function Yj(J,V={}){if(!(0,UA.default)(J))throw Error("Invalid SVG path");let p,b;V.shape||Array.isArray(V)?[p,b]=V.shape||V:(p=ry.width=V.width||V.w||200,b=ry.height=V.height||V.h||200);let E=Math.min(p,b),k=V.stroke||0,l=V.viewbox||V.viewBox||(0,jA.default)(J),e=[p/(l[2]-l[0]),b/(l[3]-l[1])],t=Math.min(e[0]||0,e[1]||0)/2;Vh.fillStyle="black",Vh.fillRect(0,0,p,b),Vh.fillStyle="white",k&&(typeof k!="number"&&(k=1),Vh.strokeStyle=k>0?"white":"black",Vh.lineWidth=Math.abs(k)),Vh.translate(p*.5,b*.5),Vh.scale(t,t);let n=new Path2D(J);return Vh.fill(n),k&&Vh.stroke(n),Vh.setTransform(1,0,0,1,0,0),(0,qA.default)(Vh,{cutoff:V.cutoff!=null?V.cutoff:.5,radius:V.radius!=null?V.radius:E*.5})}var jA,UA,qA,ry,Vh,Xj=zi({"node_modules/svg-path-sdf/svg-path-sdf.js"(){jA=Yl(Hj()),UA=Yl(OA()),qA=Yl(Wj()),ry=document.createElement("canvas"),Vh=ry.getContext("2d",{willReadFrequently:!0})}}),h0=ze({"src/traces/scattergl/convert.js"(J,V){"use strict";var p=ao(),b=(Xj(),Po(NA)).default,{normalize:E}=Qn(),k=mi(),l=Nr(),e=l.isArrayOrTypedArray,t=$i(),n=Xl(),r=fp().formatColor,a=el(),o=l1(),s=D2(),c=bv(),m=np().DESELECTDIM,h={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=kh().appendArrayPointValue;function g(B,F){var P,j={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},U=B._context.plotGlPixelRatio;if(F.visible!==!0)return j;if(a.hasText(F)&&(j.text=i(B,F),j.textSel=C(B,F,F.selected),j.textUnsel=C(B,F,F.unselected)),a.hasMarkers(F)&&(j.marker=S(B,F),j.markerSel=M(B,F,F.selected),j.markerUnsel=M(B,F,F.unselected),!F.unselected&&e(F.marker.opacity))){var $=F.marker.opacity;for(j.markerUnsel.opacity=new Array($.length),P=0;P<$.length;P++)j.markerUnsel.opacity[P]=m*$[P]}if(a.hasLines(F)){j.line={overlay:!0,thickness:F.line.width*U,color:F.line.color,opacity:F.opacity};var Q=(c.DASHES[F.line.dash]||[1]).slice();for(P=0;P500?"bold":"normal":B}function S(B,F){var P=F._length,j=F.marker,U={},$,Q=e(j.symbol),re=e(j.angle),ne=e(j.color),se=e(j.line.color),G=e(j.opacity),X=e(j.size),K=e(j.line.width),H;if(Q||(H=s.isOpenSymbol(j.symbol)),Q||ne||se||G||re){U.symbols=new Array(P),U.angles=new Array(P),U.colors=new Array(P),U.borderColors=new Array(P);var Y=j.symbol,q=j.angle,Z=r(j,j.opacity,P),ee=r(j.line,j.opacity,P);if(!e(ee[0])){var ae=ee;for(ee=Array(P),$=0;$c.TOO_MANY_POINTS||a.hasMarkers(F)?"rect":"round";if(se&&F.connectgaps){var X=$[0],K=$[1];for(Q=0;Q<$.length;Q+=2)isNaN($[Q])||isNaN($[Q+1])?($[Q]=X,$[Q+1]=K):(X=$[Q],K=$[Q+1])}return{join:G,positions:$}}function O(B,F,P,j,U){var $=k.getComponentMethod("errorbars","makeComputeError"),Q=n.getFromId(B,F.xaxis,"x"),re=n.getFromId(B,F.yaxis,"y"),ne=P.length/2,se={};function G(X,K){var H=K._id.charAt(0),Y=F["error_"+H];if(Y&&Y.visible&&(K.type==="linear"||K.type==="log")){for(var q=$(Y),Z={x:0,y:1}[H],ee={x:[0,1,2,3],y:[2,3,0,1]}[H],ae=new Float64Array(4*ne),he=1/0,xe=-1/0,we=0,Me=0;we1?ne[Q]:ne[0]:ne,H=e(se)?se.length>1?se[Q]:se[0]:se,Y=h[K],q=h[H],Z=G?G/.8+1:0,ee=-q*Z-q*.5;$.offset[Q]=[Y*Z/X,ee/X]}}return $}V.exports={style:g,markerStyle:S,markerSelection:M,linePositions:I,errorBarPositions:O,textPosition:D}}}),VA=ze({"src/traces/scattergl/scene_update.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){var l=k._scene,e={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},t={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return k._scene||(l=k._scene={},l.init=function(){p.extendFlat(l,t,e)},l.init(),l.update=function(r){var a=p.repeat(r,l.count);if(l.fill2d&&l.fill2d.update(a),l.scatter2d&&l.scatter2d.update(a),l.line2d&&l.line2d.update(a),l.error2d&&l.error2d.update(a.concat(a)),l.select2d&&l.select2d.update(a),l.glText)for(var o=0;o=m,u=T*2,A={},x,z=M.makeCalcdata(w,"x"),I=C.makeCalcdata(w,"y"),O=l(w,M,"x",z),D=l(w,C,"y",I),B=O.vals,F=D.vals;w._x=B,w._y=F,w.xperiodalignment&&(w._origX=z,w._xStarts=O.starts,w._xEnds=O.ends),w.yperiodalignment&&(w._origY=I,w._yStarts=D.starts,w._yEnds=D.ends);var P=new Array(u),j=new Array(T);for(x=0;x1&&b.extendFlat(_.line,o.linePositions(g,w,S)),_.errorX||_.errorY){var T=o.errorBarPositions(g,w,S,M,C);_.errorX&&b.extendFlat(_.errorX,T.x),_.errorY&&b.extendFlat(_.errorY,T.y)}return _.text&&(b.extendFlat(_.text,{positions:S},o.textPosition(g,w,_.text,_.marker)),b.extendFlat(_.textSel,{positions:S},o.textPosition(g,w,_.text,_.markerSel)),b.extendFlat(_.textUnsel,{positions:S},o.textPosition(g,w,_.text,_.markerUnsel))),_}}}),GA=ze({"src/traces/scattergl/edit_style.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=np().DESELECTDIM;function k(l){var e=l[0],t=e.trace,n=e.t,r=n._scene,a=n.index,o=r.selectBatch[a],s=r.unselectBatch[a],c=r.textOptions[a],m=r.textSelectedOptions[a]||{},h=r.textUnselectedOptions[a]||{},v=p.extendFlat({},c),g,i;if(o.length||s.length){var w=m.color,S=h.color,M=c.color,C=p.isArrayOrTypedArray(M);for(v.color=new Array(t._length),g=0;g10&&/[0-9](?:\s|\/)/.test(k)&&(e=k.match(/([0-9]+)/g).map(function(m){return parseFloat(m)}),n=k.match(/([a-z])/ig).join("").toLowerCase());else isNaN(k)?Array.isArray(k)||k.length?(e=[k[0],k[1],k[2]],n="rgb",t=k.length===4?k[3]:1):k instanceof Object&&(k.r!=null||k.red!=null||k.R!=null?(n="rgb",e=[k.r||k.red||k.R||0,k.g||k.green||k.G||0,k.b||k.blue||k.B||0]):(n="hsl",e=[k.h||k.hue||k.H||0,k.s||k.saturation||k.S||0,k.l||k.lightness||k.L||k.b||k.brightness]),t=k.a||k.alpha||k.opacity||1,k.opacity!=null&&(t/=100)):(n="rgb",e=[k>>>16,(k&65280)>>>8,k&255]);return{space:n,values:e,alpha:t}}}}),Qj=ze({"node_modules/color-rgba/index.js"(J,V){"use strict";var p=Jj();V.exports=function(k){Array.isArray(k)&&k.raw&&(k=String.raw.apply(null,arguments));var l,e,t,n=p(k);if(!n.space)return[];var r=[0,0,0],a=n.space[0]==="h"?[360,100,100]:[255,255,255];return l=Array(3),l[0]=Math.min(Math.max(n.values[0],r[0]),a[0]),l[1]=Math.min(Math.max(n.values[1],r[1]),a[1]),l[2]=Math.min(Math.max(n.values[2],r[2]),a[2]),n.space[0]==="h"&&(l=b(l)),l.push(Math.min(Math.max(n.alpha,0),1)),l};function b(E){var k=E[0]/360,l=E[1]/100,e=E[2]/100,t,n,r,a,o,s=0;if(l===0)return o=e*255,[o,o,o];for(n=e<.5?e*(1+l):e+l-e*l,t=2*e-n,a=[0,0,0];s<3;)r=k+1/3*-(s-1),r<0?r++:r>1&&r--,o=6*r<1?t+(n-t)*6*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,a[s++]=o*255;return a}}}),ay=ze({"node_modules/color-normalize/index.js"(J,V){"use strict";var p=Qj(),b=F2();V.exports=function(l,e){(e==="float"||!e)&&(e="array"),e==="uint"&&(e="uint8"),e==="uint_clamped"&&(e="uint8_clamped");var t=b(e),n=new t(4),r=e!=="uint8"&&e!=="uint8_clamped";return(!l.length||typeof l=="string")&&(l=p(l),l[0]/=255,l[1]/=255,l[2]/=255),E(l)?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:255,r&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(r?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:1):(n[0]=Math.min(Math.max(Math.floor(l[0]*255),0),255),n[1]=Math.min(Math.max(Math.floor(l[1]*255),0),255),n[2]=Math.min(Math.max(Math.floor(l[2]*255),0),255),n[3]=l[3]==null?255:Math.min(Math.max(Math.floor(l[3]*255),0),255)),n)};function E(k){return!!(k instanceof Uint8Array||k instanceof Uint8ClampedArray||Array.isArray(k)&&(k[0]>1||k[0]===0)&&(k[1]>1||k[1]===0)&&(k[2]>1||k[2]===0)&&(!k[3]||k[3]>1))}}}),eU=ze({"node_modules/color-id/index.js"(J,V){"use strict";var p=BA();V.exports=b,V.exports.to=b,V.exports.from=E;function b(k,l){l==null&&(l=!0);var e=k[0],t=k[1],n=k[2],r=k[3];r==null&&(r=l?1:255),l&&(e*=255,t*=255,n*=255,r*=255),e=p(e,0,255)&255,t=p(t,0,255)&255,n=p(n,0,255)&255,r=p(r,0,255)&255;var a=e*16777216+(t<<16)+(n<<8)+r;return a}function E(k,l){k=+k;var e=k>>>24,t=(k&16711680)>>>16,n=(k&65280)>>>8,r=k&255;return l===!1?[e,t,n,r]:[e/255,t/255,n/255,r/255]}}}),tU=ze({"node_modules/glslify/browser.js"(J,V){V.exports=function(p){typeof p=="string"&&(p=[p]);for(var b=[].slice.call(arguments,1),E=[],k=0;k[this.tooManyColors?0:_,g.height],pixelRatio:m.context("pixelRatio"),scale:m.prop("scale"),scaleFract:m.prop("scaleFract"),translate:m.prop("translate"),translateFract:m.prop("translateFract"),markerTexture:m.prop("markerTexture"),paletteTexture:g},attributes:{x:(x,z)=>z.xAttr||{buffer:z.positionBuffer,stride:8,offset:0},y:(x,z)=>z.yAttr||{buffer:z.positionBuffer,stride:8,offset:4},xFract:(x,z)=>z.xAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:0},yFract:(x,z)=>z.yAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:4},size:(x,z)=>z.size.length?{buffer:z.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(z.size*255/this.maxSize)]},borderSize:(x,z)=>z.borderSize.length?{buffer:z.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(z.borderSize*255/this.maxSize)]},colorId:(x,z)=>z.color.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?i.slice(z.color*4,z.color*4+4):[z.color]},borderColorId:(x,z)=>z.borderColor.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?i.slice(z.borderColor*4,z.borderColor*4+4):[z.borderColor]},isActive:(x,z)=>z.activation===!0?{constant:[1]}:z.activation?z.activation:{constant:[0]}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:m.prop("viewport")},viewport:m.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:m.prop("elements"),count:m.prop("count"),offset:m.prop("offset"),primitive:"points"},u=Object.assign({},f);u.frag=l([`precision highp float; +`]);e.createShader=function(g){var f=n(g,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f.attributes.normal.location=2,f},e.createPickShader=function(g){var f=n(g,a,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f.attributes.normal.location=2,f},e.createContourShader=function(g){var f=n(g,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f},e.createPickContourShader=function(g){var f=n(g,s,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f}},9499(l,e,t){"use strict";l.exports=X;var n=t(8828),r=t(2762),a=t(8116),o=t(7766),s=t(1888),c=t(6729),g=t(5298),f=t(9994),v=t(9618),m=t(3711),i=t(6760),T=t(7608),S=t(2478),M=t(6199),C=t(990),_=C.createShader,w=C.createContourShader,h=C.createPickShader,u=C.createPickContourShader,A=4*10,x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],z=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],I=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var q=0;q<3;++q){var W=I[q],ee=(q+1)%3,ae=(q+2)%3;W[ee+0]=1,W[ae+3]=1,W[q+6]=1}})();function O(q,W,ee,ae,he){this.position=q,this.index=W,this.uv=ee,this.level=ae,this.dataCoordinate=he}var D=256;function B(q,W,ee,ae,he,xe,we,Me,Se,Ie,Ge,qe,ke,_e,ue){this.gl=q,this.shape=W,this.bounds=ee,this.objectOffset=ue,this.intensityBounds=[],this._shader=ae,this._pickShader=he,this._coordinateBuffer=xe,this._vao=we,this._colorMap=Me,this._contourShader=Se,this._contourPickShader=Ie,this._contourBuffer=Ge,this._contourVAO=qe,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new O([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=ke,this._dynamicVAO=_e,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[v(s.mallocFloat(1024),[0,0]),v(s.mallocFloat(1024),[0,0]),v(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var F=B.prototype;F.genColormap=function(q,W){var ee=!1,ae=f([c({colormap:q,nshades:D,format:"rgba"}).map(function(he,xe){var we=W?P(xe/255,W):he[3];return we<1&&(ee=!0),[he[0],he[1],he[2],255*we]})]);return g.divseq(ae,255),this.hasAlphaScale=ee,ae},F.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},F.isOpaque=function(){return!this.isTransparent()},F.pickSlots=1,F.setPickBase=function(q){this.pickId=q};function P(q,W){if(!W||!W.length)return 1;for(var ee=0;eeq&&ee>0){var ae=(W[ee][0]-q)/(W[ee][0]-W[ee-1][0]);return W[ee][1]*(1-ae)+ae*W[ee-1][1]}}return 1}var j=[0,0,0],U={showSurface:!1,showContour:!1,projections:[x.slice(),x.slice(),x.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function $(q,W){var ee,ae,he,xe=W.axes&&W.axes.lastCubeProps.axis||j,we=W.showSurface,Me=W.showContour;for(ee=0;ee<3;++ee)for(we=we||W.surfaceProject[ee],ae=0;ae<3;++ae)Me=Me||W.contourProject[ee][ae];for(ee=0;ee<3;++ee){var Se=U.projections[ee];for(ae=0;ae<16;++ae)Se[ae]=0;for(ae=0;ae<4;++ae)Se[5*ae]=1;Se[5*ee]=0,Se[12+ee]=W.axesBounds[+(xe[ee]>0)][ee],i(Se,q.model,Se);var Ie=U.clipBounds[ee];for(he=0;he<2;++he)for(ae=0;ae<3;++ae)Ie[he][ae]=q.clipBounds[he][ae];Ie[0][ee]=-1e8,Ie[1][ee]=1e8}return U.showSurface=we,U.showContour=Me,U}var Q={model:x,view:x,projection:x,inverseModel:x.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},re=x.slice(),ne=[1,0,0,0,1,0,0,0,1];function se(q,W){q=q||{};var ee=this.gl;ee.disable(ee.CULL_FACE),this._colorMap.bind(0);var ae=Q;ae.model=q.model||x,ae.view=q.view||x,ae.projection=q.projection||x,ae.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ae.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ae.objectOffset=this.objectOffset,ae.contourColor=this.contourColor[0],ae.inverseModel=T(ae.inverseModel,ae.model);for(var he=0;he<2;++he)for(var xe=ae.clipBounds[he],we=0;we<3;++we)xe[we]=Math.min(Math.max(this.clipBounds[he][we],-1e8),1e8);ae.kambient=this.ambientLight,ae.kdiffuse=this.diffuseLight,ae.kspecular=this.specularLight,ae.roughness=this.roughness,ae.fresnel=this.fresnel,ae.opacity=this.opacity,ae.height=0,ae.permutation=ne,ae.vertexColor=this.vertexColor;var Me=re;for(i(Me,ae.view,ae.model),i(Me,ae.projection,Me),T(Me,Me),he=0;he<3;++he)ae.eyePosition[he]=Me[12+he]/Me[15];var Se=Me[15];for(he=0;he<3;++he)Se+=this.lightPosition[he]*Me[4*he+3];for(he=0;he<3;++he){var Ie=Me[12+he];for(we=0;we<3;++we)Ie+=Me[4*we+he]*this.lightPosition[we];ae.lightPosition[he]=Ie/Se}var Ge=$(ae,this);if(Ge.showSurface){for(this._shader.bind(),this._shader.uniforms=ae,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ee.TRIANGLES,this._vertexCount),he=0;he<3;++he)!this.surfaceProject[he]||!this.vertexCount||(this._shader.uniforms.model=Ge.projections[he],this._shader.uniforms.clipBounds=Ge.clipBounds[he],this._vao.draw(ee.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ge.showContour){var qe=this._contourShader;ae.kambient=1,ae.kdiffuse=0,ae.kspecular=0,ae.opacity=1,qe.bind(),qe.uniforms=ae;var ke=this._contourVAO;for(ke.bind(),he=0;he<3;++he)for(qe.uniforms.permutation=I[he],ee.lineWidth(this.contourWidth[he]*this.pixelRatio),we=0;we>4)/16)/255,he=Math.floor(ae),xe=ae-he,we=W[1]*(q.value[1]+(q.value[2]&15)/16)/255,Me=Math.floor(we),Se=we-Me;he+=1,Me+=1;var Ie=ee.position;Ie[0]=Ie[1]=Ie[2]=0;for(var Ge=0;Ge<2;++Ge)for(var qe=Ge?xe:1-xe,ke=0;ke<2;++ke)for(var _e=ke?Se:1-Se,ue=he+Ge,ve=Me+ke,le=qe*_e,Ae=0;Ae<3;++Ae)Ie[Ae]+=this._field[Ae].get(ue,ve)*le;for(var Be=this._pickResult.level,Xe=0;Xe<3;++Xe)if(Be[Xe]=S.le(this.contourLevels[Xe],Ie[Xe]),Be[Xe]<0)this.contourLevels[Xe].length>0&&(Be[Xe]=0);else if(Be[Xe]Math.abs(yt-Ie[Xe])&&(Be[Xe]+=1)}for(ee.index[0]=xe<.5?he:he+1,ee.index[1]=Se<.5?Me:Me+1,ee.uv[0]=ae/W[0],ee.uv[1]=we/W[1],Ae=0;Ae<3;++Ae)ee.dataCoordinate[Ae]=this._field[Ae].get(ee.index[0],ee.index[1]);return ee},F.padField=function(q,W){var ee=W.shape.slice(),ae=q.shape.slice();g.assign(q.lo(1,1).hi(ee[0],ee[1]),W),g.assign(q.lo(1).hi(ee[0],1),W.hi(ee[0],1)),g.assign(q.lo(1,ae[1]-1).hi(ee[0],1),W.lo(0,ee[1]-1).hi(ee[0],1)),g.assign(q.lo(0,1).hi(1,ee[1]),W.hi(1)),g.assign(q.lo(ae[0]-1,1).hi(1,ee[1]),W.lo(ee[0]-1)),q.set(0,0,W.get(0,0)),q.set(0,ae[1]-1,W.get(0,ee[1]-1)),q.set(ae[0]-1,0,W.get(ee[0]-1,0)),q.set(ae[0]-1,ae[1]-1,W.get(ee[0]-1,ee[1]-1))};function Z(q,W){return Array.isArray(q)?[W(q[0]),W(q[1]),W(q[2])]:[W(q),W(q),W(q)]}function K(q){return Array.isArray(q)?q.length===3?[q[0],q[1],q[2],1]:[q[0],q[1],q[2],q[3]]:[0,0,0,1]}function H(q){if(Array.isArray(q)){if(Array.isArray(q))return[K(q[0]),K(q[1]),K(q[2])];var W=K(q);return[W.slice(),W.slice(),W.slice()]}}F.update=function(q){q=q||{},this.objectOffset=q.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in q&&(this.contourWidth=Z(q.contourWidth,Number)),"showContour"in q&&(this.showContour=Z(q.showContour,Boolean)),"showSurface"in q&&(this.showSurface=!!q.showSurface),"contourTint"in q&&(this.contourTint=Z(q.contourTint,Boolean)),"contourColor"in q&&(this.contourColor=H(q.contourColor)),"contourProject"in q&&(this.contourProject=Z(q.contourProject,function(on){return Z(on,Boolean)})),"surfaceProject"in q&&(this.surfaceProject=q.surfaceProject),"dynamicColor"in q&&(this.dynamicColor=H(q.dynamicColor)),"dynamicTint"in q&&(this.dynamicTint=Z(q.dynamicTint,Number)),"dynamicWidth"in q&&(this.dynamicWidth=Z(q.dynamicWidth,Number)),"opacity"in q&&(this.opacity=q.opacity),"opacityscale"in q&&(this.opacityscale=q.opacityscale),"colorBounds"in q&&(this.colorBounds=q.colorBounds),"vertexColor"in q&&(this.vertexColor=q.vertexColor?1:0),"colormap"in q&&this._colorMap.setPixels(this.genColormap(q.colormap,this.opacityscale));var W=q.field||q.coords&&q.coords[2]||null,ee=!1;if(W||(this._field[2].shape[0]||this._field[2].shape[2]?W=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):W=this._field[2].hi(0,0)),"field"in q||"coords"in q){var ae=(W.shape[0]+2)*(W.shape[1]+2);ae>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(ae))),this._field[2]=v(this._field[2].data,[W.shape[0]+2,W.shape[1]+2]),this.padField(this._field[2],W),this.shape=W.shape.slice();for(var he=this.shape,xe=0;xe<2;++xe)this._field[2].size>this._field[xe].data.length&&(s.freeFloat(this._field[xe].data),this._field[xe].data=s.mallocFloat(this._field[2].size)),this._field[xe]=v(this._field[xe].data,[he[0]+2,he[1]+2]);if(q.coords){var we=q.coords;if(!Array.isArray(we)||we.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(xe=0;xe<2;++xe){var Me=we[xe];for(ke=0;ke<2;++ke)if(Me.shape[ke]!==he[ke])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[xe],Me)}}else if(q.ticks){var Se=q.ticks;if(!Array.isArray(Se)||Se.length!==2)throw new Error("gl-surface: invalid ticks");for(xe=0;xe<2;++xe){var Ie=Se[xe];if((Array.isArray(Ie)||Ie.length)&&(Ie=v(Ie)),Ie.shape[0]!==he[xe])throw new Error("gl-surface: invalid tick length");var Ge=v(Ie.data,he);Ge.stride[xe]=Ie.stride[0],Ge.stride[xe^1]=0,this.padField(this._field[xe],Ge)}}else{for(xe=0;xe<2;++xe){var qe=[0,0];qe[xe]=1,this._field[xe]=v(this._field[xe].data,[he[0]+2,he[1]+2],qe,0)}this._field[0].set(0,0,0);for(var ke=0;ke0){for(var li=0;li<5;++li)Vt.pop();De-=1}continue e}}}Yt.push(De)}this._contourOffsets[Ht]=Kr,this._contourCounts[Ht]=Yt}var Yn=s.mallocFloat(Vt.length);for(xe=0;xeO||z<0||z>O)throw new Error("gl-texture2d: Invalid texture size");return A._shape=[x,z],A.bind(),I.texImage2D(I.TEXTURE_2D,0,A.format,x,z,0,A.format,A.type,null),A._mipLevels=[0],A}function i(A,x,z,I,O,D){this.gl=A,this.handle=x,this.format=O,this.type=D,this._shape=[z,I],this._mipLevels=[0],this._magFilter=A.NEAREST,this._minFilter=A.NEAREST,this._wrapS=A.CLAMP_TO_EDGE,this._wrapT=A.CLAMP_TO_EDGE,this._anisoSamples=1;var B=this,F=[this._wrapS,this._wrapT];Object.defineProperties(F,[{get:function(){return B._wrapS},set:function(j){return B.wrapS=j}},{get:function(){return B._wrapT},set:function(j){return B.wrapT=j}}]),this._wrapVector=F;var P=[this._shape[0],this._shape[1]];Object.defineProperties(P,[{get:function(){return B._shape[0]},set:function(j){return B.width=j}},{get:function(){return B._shape[1]},set:function(j){return B.height=j}}]),this._shapeVector=P}var T=i.prototype;Object.defineProperties(T,{minFilter:{get:function(){return this._minFilter},set:function(A){this.bind();var x=this.gl;if(this.type===x.FLOAT&&o.indexOf(A)>=0&&(x.getExtension("OES_texture_float_linear")||(A=x.NEAREST)),s.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MIN_FILTER,A),this._minFilter=A}},magFilter:{get:function(){return this._magFilter},set:function(A){this.bind();var x=this.gl;if(this.type===x.FLOAT&&o.indexOf(A)>=0&&(x.getExtension("OES_texture_float_linear")||(A=x.NEAREST)),s.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MAG_FILTER,A),this._magFilter=A}},mipSamples:{get:function(){return this._anisoSamples},set:function(A){var x=this._anisoSamples;if(this._anisoSamples=Math.max(A,1)|0,x!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(A){if(this.bind(),c.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,A),this._wrapS=A}},wrapT:{get:function(){return this._wrapT},set:function(A){if(this.bind(),c.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,A),this._wrapT=A}},wrap:{get:function(){return this._wrapVector},set:function(A){if(Array.isArray(A)||(A=[A,A]),A.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var x=0;x<2;++x)if(c.indexOf(A[x])<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);this._wrapS=A[0],this._wrapT=A[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),A}},shape:{get:function(){return this._shapeVector},set:function(A){if(!Array.isArray(A))A=[A|0,A|0];else if(A.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return m(this,A[0]|0,A[1]|0),[A[0]|0,A[1]|0]}},width:{get:function(){return this._shape[0]},set:function(A){return A=A|0,m(this,A,this._shape[1]),A}},height:{get:function(){return this._shape[1]},set:function(A){return A=A|0,m(this,this._shape[0],A),A}}}),T.bind=function(A){var x=this.gl;return A!==void 0&&x.activeTexture(x.TEXTURE0+(A|0)),x.bindTexture(x.TEXTURE_2D,this.handle),A!==void 0?A|0:x.getParameter(x.ACTIVE_TEXTURE)-x.TEXTURE0},T.dispose=function(){this.gl.deleteTexture(this.handle)},T.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var A=Math.min(this._shape[0],this._shape[1]),x=0;A>0;++x,A>>>=1)this._mipLevels.indexOf(x)<0&&this._mipLevels.push(x)},T.setPixels=function(A,x,z,I){var O=this.gl;this.bind(),Array.isArray(x)?(I=z,z=x[1]|0,x=x[0]|0):(x=x||0,z=z||0),I=I||0;var D=f(A)?A:A.raw;if(D){var B=this._mipLevels.indexOf(I)<0;B?(O.texImage2D(O.TEXTURE_2D,0,this.format,this.format,this.type,D),this._mipLevels.push(I)):O.texSubImage2D(O.TEXTURE_2D,I,x,z,this.format,this.type,D)}else if(A.shape&&A.stride&&A.data){if(A.shape.length<2||x+A.shape[1]>this._shape[1]>>>I||z+A.shape[0]>this._shape[0]>>>I||x<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");M(O,x,z,I,this.format,this.type,this._mipLevels,A)}else throw new Error("gl-texture2d: Unsupported data type")};function S(A,x){return A.length===3?x[2]===1&&x[1]===A[0]*A[2]&&x[0]===A[2]:x[0]===1&&x[1]===A[0]}function M(A,x,z,I,O,D,B,F){var P=F.dtype,j=F.shape.slice();if(j.length<2||j.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var U=0,$=0,Q=S(j,F.stride.slice());P==="float32"?U=A.FLOAT:P==="float64"?(U=A.FLOAT,Q=!1,P="float32"):P==="uint8"?U=A.UNSIGNED_BYTE:(U=A.UNSIGNED_BYTE,Q=!1,P="uint8");var re=1;if(j.length===2)$=A.LUMINANCE,j=[j[0],j[1],1],F=n(F.data,j,[F.stride[0],F.stride[1],1],F.offset);else if(j.length===3){if(j[2]===1)$=A.ALPHA;else if(j[2]===2)$=A.LUMINANCE_ALPHA;else if(j[2]===3)$=A.RGB;else if(j[2]===4)$=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");re=j[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if(($===A.LUMINANCE||$===A.ALPHA)&&(O===A.LUMINANCE||O===A.ALPHA)&&($=O),$!==O)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ne=F.size,se=B.indexOf(I)<0;if(se&&B.push(I),U===D&&Q)F.offset===0&&F.data.length===ne?se?A.texImage2D(A.TEXTURE_2D,I,O,j[0],j[1],0,O,D,F.data):A.texSubImage2D(A.TEXTURE_2D,I,x,z,j[0],j[1],O,D,F.data):se?A.texImage2D(A.TEXTURE_2D,I,O,j[0],j[1],0,O,D,F.data.subarray(F.offset,F.offset+ne)):A.texSubImage2D(A.TEXTURE_2D,I,x,z,j[0],j[1],O,D,F.data.subarray(F.offset,F.offset+ne));else{var V;D===A.FLOAT?V=a.mallocFloat32(ne):V=a.mallocUint8(ne);var Z=n(V,j,[j[2],j[2]*j[0],1]);U===A.FLOAT&&D===A.UNSIGNED_BYTE?v(Z,F):r.assign(Z,F),se?A.texImage2D(A.TEXTURE_2D,I,O,j[0],j[1],0,O,D,V.subarray(0,ne)):A.texSubImage2D(A.TEXTURE_2D,I,x,z,j[0],j[1],O,D,V.subarray(0,ne)),D===A.FLOAT?a.freeFloat32(V):a.freeUint8(V)}}function C(A){var x=A.createTexture();return A.bindTexture(A.TEXTURE_2D,x),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE),x}function _(A,x,z,I,O){var D=A.getParameter(A.MAX_TEXTURE_SIZE);if(x<0||x>D||z<0||z>D)throw new Error("gl-texture2d: Invalid texture shape");if(O===A.FLOAT&&!A.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var B=C(A);return A.texImage2D(A.TEXTURE_2D,0,I,x,z,0,I,O,null),new i(A,B,x,z,I,O)}function w(A,x,z,I,O,D){var B=C(A);return A.texImage2D(A.TEXTURE_2D,0,O,O,D,x),new i(A,B,z,I,O,D)}function h(A,x){var z=x.dtype,I=x.shape.slice(),O=A.getParameter(A.MAX_TEXTURE_SIZE);if(I[0]<0||I[0]>O||I[1]<0||I[1]>O)throw new Error("gl-texture2d: Invalid texture size");var D=S(I,x.stride.slice()),B=0;z==="float32"?B=A.FLOAT:z==="float64"?(B=A.FLOAT,D=!1,z="float32"):z==="uint8"?B=A.UNSIGNED_BYTE:(B=A.UNSIGNED_BYTE,D=!1,z="uint8");var F=0;if(I.length===2)F=A.LUMINANCE,I=[I[0],I[1],1],x=n(x.data,I,[x.stride[0],x.stride[1],1],x.offset);else if(I.length===3)if(I[2]===1)F=A.ALPHA;else if(I[2]===2)F=A.LUMINANCE_ALPHA;else if(I[2]===3)F=A.RGB;else if(I[2]===4)F=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");B===A.FLOAT&&!A.getExtension("OES_texture_float")&&(B=A.UNSIGNED_BYTE,D=!1);var P,j,U=x.size;if(D)x.offset===0&&x.data.length===U?P=x.data:P=x.data.subarray(x.offset,x.offset+U);else{var $=[I[2],I[2]*I[0],1];j=a.malloc(U,z);var Q=n(j,I,$,0);(z==="float32"||z==="float64")&&B===A.UNSIGNED_BYTE?v(Q,x):r.assign(Q,x),P=j.subarray(0,U)}var re=C(A);return A.texImage2D(A.TEXTURE_2D,0,F,I[0],I[1],0,F,B,P),D||a.free(j),new i(A,re,I[0],I[1],F,B)}function u(A){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(o||g(A),typeof arguments[1]=="number")return _(A,arguments[1],arguments[2],arguments[3]||A.RGBA,arguments[4]||A.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return _(A,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var x=arguments[1],z=f(x)?x:x.raw;if(z)return w(A,z,x.width|0,x.height|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(x.shape&&x.data&&x.stride)return h(A,x)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433(l){"use strict";function e(t,n,r){n?n.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var a=t.getParameter(t.MAX_VERTEX_ATTRIBS)|0;if(r){if(r.length>a)throw new Error("gl-vao: Too many vertex attributes");for(var o=0;o1?0:Math.acos(v)}},9226(l){l.exports=e;function e(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}},3126(l){l.exports=e;function e(t){var n=new Float32Array(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}},3990(l){l.exports=e;function e(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}},1091(l){l.exports=e;function e(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},5911(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],g=r[1],f=r[2];return t[0]=o*f-s*g,t[1]=s*c-a*f,t[2]=a*g-o*c,t}},5455(l,e,t){l.exports=t(7056)},7056(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(r*r+a*a+o*o)}},4008(l,e,t){l.exports=t(6690)},6690(l){l.exports=e;function e(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t}},244(l){l.exports=e;function e(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}},2613(l){l.exports=1e-6},9922(l,e,t){l.exports=r;var n=t(2613);function r(a,o){var s=a[0],c=a[1],g=a[2],f=o[0],v=o[1],m=o[2];return Math.abs(s-f)<=n*Math.max(1,Math.abs(s),Math.abs(f))&&Math.abs(c-v)<=n*Math.max(1,Math.abs(c),Math.abs(v))&&Math.abs(g-m)<=n*Math.max(1,Math.abs(g),Math.abs(m))}},9265(l){l.exports=e;function e(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}},2681(l){l.exports=e;function e(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}},5137(l,e,t){l.exports=r;var n=t(1091)();function r(a,o,s,c,g,f){var v,m;for(o||(o=3),s||(s=0),c?m=Math.min(c*o+s,a.length):m=a.length,v=s;v0&&(s=1/Math.sqrt(s),t[0]=n[0]*s,t[1]=n[1]*s,t[2]=n[2]*s),t}},7636(l){l.exports=e;function e(t,n){n=n||1;var r=Math.random()*2*Math.PI,a=Math.random()*2-1,o=Math.sqrt(1-a*a)*n;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=a*n,t}},6894(l){l.exports=e;function e(t,n,r,a){var o=r[1],s=r[2],c=n[1]-o,g=n[2]-s,f=Math.sin(a),v=Math.cos(a);return t[0]=n[0],t[1]=o+c*v-g*f,t[2]=s+c*f+g*v,t}},109(l){l.exports=e;function e(t,n,r,a){var o=r[0],s=r[2],c=n[0]-o,g=n[2]-s,f=Math.sin(a),v=Math.cos(a);return t[0]=o+g*f+c*v,t[1]=n[1],t[2]=s+g*v-c*f,t}},8692(l){l.exports=e;function e(t,n,r,a){var o=r[0],s=r[1],c=n[0]-o,g=n[1]-s,f=Math.sin(a),v=Math.cos(a);return t[0]=o+c*v-g*f,t[1]=s+c*f+g*v,t[2]=n[2],t}},2447(l){l.exports=e;function e(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}},6621(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t}},8489(l){l.exports=e;function e(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t}},1463(l){l.exports=e;function e(t,n,r,a){return t[0]=n,t[1]=r,t[2]=a,t}},6141(l,e,t){l.exports=t(2953)},5486(l,e,t){l.exports=t(3066)},2953(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return r*r+a*a+o*o}},3066(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2];return n*n+r*r+a*a}},2229(l,e,t){l.exports=t(6843)},6843(l){l.exports=e;function e(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t}},492(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2];return t[0]=a*r[0]+o*r[3]+s*r[6],t[1]=a*r[1]+o*r[4]+s*r[7],t[2]=a*r[2]+o*r[5]+s*r[8],t}},5673(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[3]*a+r[7]*o+r[11]*s+r[15];return c=c||1,t[0]=(r[0]*a+r[4]*o+r[8]*s+r[12])/c,t[1]=(r[1]*a+r[5]*o+r[9]*s+r[13])/c,t[2]=(r[2]*a+r[6]*o+r[10]*s+r[14])/c,t}},264(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],g=r[1],f=r[2],v=r[3],m=g*s-f*o,i=f*a-c*s,T=c*o-g*a;return m*=2,i*=2,T*=2,t[0]=a+v*m+g*T-f*i,t[1]=o+v*i+f*m-c*T,t[2]=s+v*T+c*i-g*m,t}},4361(l){l.exports=e;function e(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t}},2335(l){l.exports=e;function e(t){var n=new Float32Array(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n}},2933(l){l.exports=e;function e(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}},7536(l){l.exports=e;function e(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},4691(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=n[3]-t[3];return Math.sqrt(r*r+a*a+o*o+s*s)}},1373(l){l.exports=e;function e(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t[3]=n[3]/r[3],t}},3750(l){l.exports=e;function e(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}},3390(l){l.exports=e;function e(t,n,r,a){var o=new Float32Array(4);return o[0]=t,o[1]=n,o[2]=r,o[3]=a,o}},9970(l,e,t){l.exports={create:t(7536),clone:t(2335),fromValues:t(3390),copy:t(2933),set:t(4578),add:t(4361),subtract:t(6860),multiply:t(3576),divide:t(1373),min:t(2334),max:t(160),scale:t(9288),scaleAndAdd:t(4844),distance:t(4691),squaredDistance:t(7960),length:t(6808),squaredLength:t(483),negate:t(1498),inverse:t(4494),normalize:t(5177),dot:t(3750),lerp:t(2573),random:t(9131),transformMat4:t(5352),transformQuat:t(4041)}},4494(l){l.exports=e;function e(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t}},6808(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2],o=t[3];return Math.sqrt(n*n+r*r+a*a+o*o)}},2573(l){l.exports=e;function e(t,n,r,a){var o=n[0],s=n[1],c=n[2],g=n[3];return t[0]=o+a*(r[0]-o),t[1]=s+a*(r[1]-s),t[2]=c+a*(r[2]-c),t[3]=g+a*(r[3]-g),t}},160(l){l.exports=e;function e(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t[3]=Math.max(n[3],r[3]),t}},2334(l){l.exports=e;function e(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t[3]=Math.min(n[3],r[3]),t}},3576(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t[3]=n[3]*r[3],t}},1498(l){l.exports=e;function e(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t}},5177(l){l.exports=e;function e(t,n){var r=n[0],a=n[1],o=n[2],s=n[3],c=r*r+a*a+o*o+s*s;return c>0&&(c=1/Math.sqrt(c),t[0]=r*c,t[1]=a*c,t[2]=o*c,t[3]=s*c),t}},9131(l,e,t){var n=t(5177),r=t(9288);l.exports=a;function a(o,s){return s=s||1,o[0]=Math.random(),o[1]=Math.random(),o[2]=Math.random(),o[3]=Math.random(),n(o,o),r(o,o,s),o}},9288(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t}},4844(l){l.exports=e;function e(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t[3]=n[3]+r[3]*a,t}},4578(l){l.exports=e;function e(t,n,r,a,o){return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t}},7960(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=n[3]-t[3];return r*r+a*a+o*o+s*s}},483(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2],o=t[3];return n*n+r*r+a*a+o*o}},6860(l){l.exports=e;function e(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t}},5352(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=n[3];return t[0]=r[0]*a+r[4]*o+r[8]*s+r[12]*c,t[1]=r[1]*a+r[5]*o+r[9]*s+r[13]*c,t[2]=r[2]*a+r[6]*o+r[10]*s+r[14]*c,t[3]=r[3]*a+r[7]*o+r[11]*s+r[15]*c,t}},4041(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],g=r[1],f=r[2],v=r[3],m=v*a+g*s-f*o,i=v*o+f*a-c*s,T=v*s+c*o-g*a,S=-c*a-g*o-f*s;return t[0]=m*v+S*-c+i*-f-T*-g,t[1]=i*v+S*-g+T*-c-m*-f,t[2]=T*v+S*-f+m*-g-i*-c,t[3]=n[3],t}},1848(l,e,t){var n=t(4905),r=t(6468);l.exports=a;function a(o){for(var s=Array.isArray(o)?o:n(o),c=0;c0)continue;Xe=le.slice(0,1).join("")}return ee(Xe),ne+=Xe.length,P=P.slice(Xe.length),P.length}while(!0)}function ke(){return/[^a-fA-F0-9]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function _e(){return B==="."||/[eE]/.test(B)?(P.push(B),D=S,F=B,I+1):B==="x"&&P.length===1&&P[0]==="0"?(D=u,P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function ue(){return B==="f"&&(P.push(B),F=B,I+=1),/[eE]/.test(B)||(B==="-"||B==="+")&&/[eE]/.test(F)?(P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function ve(){if(/[^\d\w_]/.test(B)){var le=P.join("");return W[le]?D=_:q[le]?D=C:D=M,ee(P.join("")),D=c,I}return P.push(B),F=B,I+1}}},3508(l,e,t){var n=t(6852);n=n.slice().filter(function(r){return!/^(gl\_|texture)/.test(r)}),l.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852(l){l.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932(l,e,t){var n=t(620);l.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620(l){l.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827(l){l.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905(l,e,t){var n=t(5874);l.exports=r;function r(a,o){var s=n(o),c=[];return c=c.concat(s(a)),c=c.concat(s(null)),c}},3236(l){l.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),n=[],r=0;r>1,m=-7,i=r?o-1:0,T=r?-1:1,S=t[n+i];for(i+=T,s=S&(1<<-m)-1,S>>=-m,m+=g;m>0;s=s*256+t[n+i],i+=T,m-=8);for(c=s&(1<<-m)-1,s>>=-m,m+=a;m>0;c=c*256+t[n+i],i+=T,m-=8);if(s===0)s=1-v;else{if(s===f)return c?NaN:(S?-1:1)*(1/0);c=c+Math.pow(2,a),s=s-v}return(S?-1:1)*c*Math.pow(2,s-a)},e.write=function(t,n,r,a,o,s){var c,g,f,v=s*8-o-1,m=(1<>1,T=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=a?0:s-1,M=a?1:-1,C=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(g=isNaN(n)?1:0,c=m):(c=Math.floor(Math.log(n)/Math.LN2),n*(f=Math.pow(2,-c))<1&&(c--,f*=2),c+i>=1?n+=T/f:n+=T*Math.pow(2,1-i),n*f>=2&&(c++,f/=2),c+i>=m?(g=0,c=m):c+i>=1?(g=(n*f-1)*Math.pow(2,o),c=c+i):(g=n*Math.pow(2,i-1)*Math.pow(2,o),c=0));o>=8;t[r+S]=g&255,S+=M,g/=256,o-=8);for(c=c<0;t[r+S]=c&255,S+=M,c/=256,v-=8);t[r+S-M]|=C*128}},8954(l,e,t){"use strict";l.exports=i;var n=t(3250),r=t(6803).Fw;function a(T,S,M){this.vertices=T,this.adjacent=S,this.boundary=M,this.lastVisited=-1}a.prototype.flip=function(){var T=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=T;var S=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=S};function o(T,S,M){this.vertices=T,this.cell=S,this.index=M}function s(T,S){return r(T.vertices,S.vertices)}function c(T){return function(){var S=this.tuple;return T.apply(this,S)}}function g(T){var S=n[T+1];return S||(S=n),c(S)}var f=[];function v(T,S,M){this.dimension=T,this.vertices=S,this.simplices=M,this.interior=M.filter(function(w){return!w.boundary}),this.tuple=new Array(T+1);for(var C=0;C<=T;++C)this.tuple[C]=this.vertices[C];var _=f[T];_||(_=f[T]=g(T)),this.orient=_}var m=v.prototype;m.handleBoundaryDegeneracy=function(T,S){var M=this.dimension,C=this.vertices.length-1,_=this.tuple,w=this.vertices,h=[T];for(T.lastVisited=-C;h.length>0;){T=h.pop();for(var u=T.adjacent,A=0;A<=M;++A){var x=u[A];if(!(!x.boundary||x.lastVisited<=-C)){for(var z=x.vertices,I=0;I<=M;++I){var O=z[I];O<0?_[I]=S:_[I]=w[O]}var D=this.orient();if(D>0)return x;x.lastVisited=-C,D===0&&h.push(x)}}}return null},m.walk=function(T,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,w=this.tuple,h=S?this.interior.length*Math.random()|0:this.interior.length-1,u=this.interior[h];e:for(;!u.boundary;){for(var A=u.vertices,x=u.adjacent,z=0;z<=C;++z)w[z]=_[A[z]];u.lastVisited=M;for(var z=0;z<=C;++z){var I=x[z];if(!(I.lastVisited>=M)){var O=w[z];w[z]=T;var D=this.orient();if(w[z]=O,D<0){u=I;continue e}else I.boundary?I.lastVisited=-M:I.lastVisited=M}}return}return u},m.addPeaks=function(T,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,w=this.tuple,h=this.interior,u=this.simplices,A=[S];S.lastVisited=M,S.vertices[S.vertices.indexOf(-1)]=M,S.boundary=!1,h.push(S);for(var x=[];A.length>0;){var S=A.pop(),z=S.vertices,I=S.adjacent,O=z.indexOf(M);if(!(O<0)){for(var D=0;D<=C;++D)if(D!==O){var B=I[D];if(!(!B.boundary||B.lastVisited>=M)){var F=B.vertices;if(B.lastVisited!==-M){for(var P=0,j=0;j<=C;++j)F[j]<0?(P=j,w[j]=T):w[j]=_[F[j]];var U=this.orient();if(U>0){F[P]=M,B.boundary=!1,h.push(B),A.push(B),B.lastVisited=M;continue}else B.lastVisited=-M}var $=B.adjacent,Q=z.slice(),re=I.slice(),ne=new a(Q,re,!0);u.push(ne);var se=$.indexOf(S);if(!(se<0)){$[se]=ne,re[O]=B,Q[D]=-1,re[D]=S,I[D]=ne,ne.flip();for(var j=0;j<=C;++j){var V=Q[j];if(!(V<0||V===M)){for(var Z=new Array(C-1),K=0,H=0;H<=C;++H){var X=Q[H];X<0||H===j||(Z[K++]=X)}x.push(new o(Z,ne,j))}}}}}}}x.sort(s);for(var D=0;D+1=0?h[A++]=u[z]:x=z&1;if(x===(T&1)){var I=h[0];h[0]=h[1],h[1]=I}S.push(h)}}return S};function i(T,S){var M=T.length;if(M===0)throw new Error("Must have at least d+1 points");var C=T[0].length;if(M<=C)throw new Error("Must input at least d+1 points");var _=T.slice(0,C+1),w=n.apply(void 0,_);if(w===0)throw new Error("Input not in general position");for(var h=new Array(C+1),u=0;u<=C;++u)h[u]=u;w<0&&(h[0]=1,h[1]=0);for(var A=new a(h,new Array(C+1),!1),x=A.adjacent,z=new Array(C+2),u=0;u<=C;++u){for(var I=h.slice(),O=0;O<=C;++O)O===u&&(I[O]=-1);var D=I[0];I[0]=I[1],I[1]=D;var B=new a(I,new Array(C+1),!0);x[u]=B,z[u]=B}z[C+1]=A;for(var u=0;u<=C;++u)for(var I=x[u].vertices,F=x[u].adjacent,O=0;O<=C;++O){var P=I[O];if(P<0){F[O]=A;continue}for(var j=0;j<=C;++j)x[j].vertices.indexOf(P)<0&&(F[O]=x[j])}for(var U=new v(C,_,z),$=!!S,u=C+1;u3*(z+1)?v(this,x):this.left.insert(x):this.left=w([x]);else if(x[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?v(this,x):this.right.insert(x):this.right=w([x]);else{var I=n.ge(this.leftPoints,x,C),O=n.ge(this.rightPoints,x,_);this.leftPoints.splice(I,0,x),this.rightPoints.splice(O,0,x)}},c.remove=function(x){var z=this.count-this.leftPoints;if(x[1]3*(z-1))return m(this,x);var O=this.left.remove(x);return O===o?(this.left=null,this.count-=1,a):(O===a&&(this.count-=1),O)}else if(x[0]>this.mid){if(!this.right)return r;var D=this.left?this.left.count:0;if(4*D>3*(z-1))return m(this,x);var O=this.right.remove(x);return O===o?(this.right=null,this.count-=1,a):(O===a&&(this.count-=1),O)}else{if(this.count===1)return this.leftPoints[0]===x?o:r;if(this.leftPoints.length===1&&this.leftPoints[0]===x){if(this.left&&this.right){for(var B=this,F=this.left;F.right;)B=F,F=F.right;if(B===this)F.right=this.right;else{var P=this.left,O=this.right;B.count-=F.count,B.right=F.left,F.left=P,F.right=O}g(this,F),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 a}for(var P=n.ge(this.leftPoints,x,C);P=0&&x[O][1]>=z;--O){var D=I(x[O]);if(D)return D}}function S(x,z){for(var I=0;Ithis.mid){if(this.right){var I=this.right.queryPoint(x,z);if(I)return I}return T(this.rightPoints,x,z)}else return S(this.leftPoints,z)},c.queryInterval=function(x,z,I){if(xthis.mid&&this.right){var O=this.right.queryInterval(x,z,I);if(O)return O}return zthis.mid?T(this.rightPoints,x,I):S(this.leftPoints,I)};function M(x,z){return x-z}function C(x,z){var I=x[0]-z[0];return I||x[1]-z[1]}function _(x,z){var I=x[1]-z[1];return I||x[0]-z[0]}function w(x){if(x.length===0)return null;for(var z=[],I=0;I>1],D=[],B=[],F=[],I=0;I1&&o.indexOf("Macintosh")!==-1&&o.indexOf("Safari")!==-1&&(s=!0),s}},5219(l){"use strict";l.exports=function(e){for(var t=e.length,n,r=0;r13)&&n!==32&&n!==133&&n!==160&&n!==5760&&n!==6158&&(n<8192||n>8205)&&n!==8232&&n!==8233&&n!==8239&&n!==8287&&n!==8288&&n!==12288&&n!==65279)return!1;return!0}},395(l){function e(t,n,r){return t*(1-r)+n*r}l.exports=e},2652(l,e,t){var n=t(4335),r=t(6864),a=t(1903),o=t(9921),s=t(7608),c=t(5665),g={length:t(1387),normalize:t(3536),dot:t(244),cross:t(5911)},f=r(),v=r(),m=[0,0,0,0],i=[[0,0,0],[0,0,0],[0,0,0]],T=[0,0,0];l.exports=function(w,h,u,A,x,z){if(h||(h=[0,0,0]),u||(u=[0,0,0]),A||(A=[0,0,0]),x||(x=[0,0,0,1]),z||(z=[0,0,0,1]),!n(f,w)||(a(v,f),v[3]=0,v[7]=0,v[11]=0,v[15]=1,Math.abs(o(v)<1e-8)))return!1;var I=f[3],O=f[7],D=f[11],B=f[12],F=f[13],P=f[14],j=f[15];if(I!==0||O!==0||D!==0){m[0]=I,m[1]=O,m[2]=D,m[3]=j;var U=s(v,v);if(!U)return!1;c(v,v),S(x,m,v)}else x[0]=x[1]=x[2]=0,x[3]=1;if(h[0]=B,h[1]=F,h[2]=P,M(i,f),u[0]=g.length(i[0]),g.normalize(i[0],i[0]),A[0]=g.dot(i[0],i[1]),C(i[1],i[1],i[0],1,-A[0]),u[1]=g.length(i[1]),g.normalize(i[1],i[1]),A[0]/=u[1],A[1]=g.dot(i[0],i[2]),C(i[2],i[2],i[0],1,-A[1]),A[2]=g.dot(i[1],i[2]),C(i[2],i[2],i[1],1,-A[2]),u[2]=g.length(i[2]),g.normalize(i[2],i[2]),A[1]/=u[2],A[2]/=u[2],g.cross(T,i[1],i[2]),g.dot(i[0],T)<0)for(var $=0;$<3;$++)u[$]*=-1,i[$][0]*=-1,i[$][1]*=-1,i[$][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+i[0][0]-i[1][1]-i[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-i[0][0]+i[1][1]-i[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-i[0][0]-i[1][1]+i[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+i[0][0]+i[1][1]+i[2][2],0)),i[2][1]>i[1][2]&&(z[0]=-z[0]),i[0][2]>i[2][0]&&(z[1]=-z[1]),i[1][0]>i[0][1]&&(z[2]=-z[2]),!0};function S(_,w,h){var u=w[0],A=w[1],x=w[2],z=w[3];return _[0]=h[0]*u+h[4]*A+h[8]*x+h[12]*z,_[1]=h[1]*u+h[5]*A+h[9]*x+h[13]*z,_[2]=h[2]*u+h[6]*A+h[10]*x+h[14]*z,_[3]=h[3]*u+h[7]*A+h[11]*x+h[15]*z,_}function M(_,w){_[0][0]=w[0],_[0][1]=w[1],_[0][2]=w[2],_[1][0]=w[4],_[1][1]=w[5],_[1][2]=w[6],_[2][0]=w[8],_[2][1]=w[9],_[2][2]=w[10]}function C(_,w,h,u,A){_[0]=w[0]*u+h[0]*A,_[1]=w[1]*u+h[1]*A,_[2]=w[2]*u+h[2]*A}},4335(l){l.exports=function(t,n){var r=n[15];if(r===0)return!1;for(var a=1/r,o=0;o<16;o++)t[o]=n[o]*a;return!0}},7442(l,e,t){var n=t(6658),r=t(7182),a=t(2652),o=t(9921),s=t(8648),c=m(),g=m(),f=m();l.exports=v;function v(S,M,C,_){if(o(M)===0||o(C)===0)return!1;var w=a(M,c.translate,c.scale,c.skew,c.perspective,c.quaternion),h=a(C,g.translate,g.scale,g.skew,g.perspective,g.quaternion);return!w||!h?!1:(n(f.translate,c.translate,g.translate,_),n(f.skew,c.skew,g.skew,_),n(f.scale,c.scale,g.scale,_),n(f.perspective,c.perspective,g.perspective,_),s(f.quaternion,c.quaternion,g.quaternion,_),r(S,f.translate,f.scale,f.skew,f.perspective,f.quaternion),!0)}function m(){return{translate:i(),scale:i(1),skew:i(),perspective:T(),quaternion:T()}}function i(S){return[S||0,S||0,S||0]}function T(){return[0,0,0,1]}},7182(l,e,t){var n={identity:t(7894),translate:t(7656),multiply:t(6760),create:t(6864),scale:t(2504),fromRotationTranslation:t(6743)},r=n.create(),a=n.create();l.exports=function(s,c,g,f,v,m){return n.identity(s),n.fromRotationTranslation(s,m,c),s[3]=v[0],s[7]=v[1],s[11]=v[2],s[15]=v[3],n.identity(a),f[2]!==0&&(a[9]=f[2],n.multiply(s,s,a)),f[1]!==0&&(a[9]=0,a[8]=f[1],n.multiply(s,s,a)),f[0]!==0&&(a[8]=0,a[4]=f[0],n.multiply(s,s,a)),n.scale(s,s,g),s}},1811(l,e,t){"use strict";var n=t(2478),r=t(7442),a=t(7608),o=t(5567),s=t(2408),c=t(7089),g=t(6582),f=t(7656),v=t(2504),m=t(3536),i=[0,0,0];l.exports=C;function T(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var S=T.prototype;S.recalcMatrix=function(_){var w=this._time,h=n.le(w,_),u=this.computedMatrix;if(!(h<0)){var A=this._components;if(h===w.length-1)for(var x=16*h,z=0;z<16;++z)u[z]=A[x++];else{for(var I=w[h+1]-w[h],x=16*h,O=this.prevMatrix,D=!0,z=0;z<16;++z)O[z]=A[x++];for(var B=this.nextMatrix,z=0;z<16;++z)B[z]=A[x++],D=D&&O[z]===B[z];if(I<1e-6||D)for(var z=0;z<16;++z)u[z]=O[z];else r(u,O,B,(_-w[h])/I)}var F=this.computedUp;F[0]=u[1],F[1]=u[5],F[2]=u[9],m(F,F);var P=this.computedInverse;a(P,u);var j=this.computedEye,U=P[15];j[0]=P[12]/U,j[1]=P[13]/U,j[2]=P[14]/U;for(var $=this.computedCenter,Q=Math.exp(this.computedRadius[0]),z=0;z<3;++z)$[z]=j[z]-u[2+4*z]*Q}},S.idle=function(_){if(!(_1&&n(a[g[i-2]],a[g[i-1]],m)<=0;)i-=1,g.pop();for(g.push(v),i=f.length;i>1&&n(a[f[i-2]],a[f[i-1]],m)>=0;)i-=1,f.pop();f.push(v)}for(var T=new Array(f.length+g.length-2),S=0,s=0,M=g.length;s0;--C)T[S++]=f[C];return T}},351(l,e,t){"use strict";l.exports=r;var n=t(4687);function r(a,o){o||(o=a,a=window);var s=0,c=0,g=0,f={shift:!1,alt:!1,control:!1,meta:!1},v=!1;function m(x){var z=!1;return"altKey"in x&&(z=z||x.altKey!==f.alt,f.alt=!!x.altKey),"shiftKey"in x&&(z=z||x.shiftKey!==f.shift,f.shift=!!x.shiftKey),"ctrlKey"in x&&(z=z||x.ctrlKey!==f.control,f.control=!!x.ctrlKey),"metaKey"in x&&(z=z||x.metaKey!==f.meta,f.meta=!!x.metaKey),z}function i(x,z){var I=n.x(z),O=n.y(z);"buttons"in z&&(x=z.buttons|0),(x!==s||I!==c||O!==g||m(z))&&(s=x|0,c=I||0,g=O||0,o&&o(s,c,g,f))}function T(x){i(0,x)}function S(){(s||c||g||f.shift||f.alt||f.meta||f.control)&&(c=g=0,s=0,f.shift=f.alt=f.control=f.meta=!1,o&&o(0,0,0,f))}function M(x){m(x)&&o&&o(s,c,g,f)}function C(x){n.buttons(x)===0?i(0,x):i(s,x)}function _(x){i(s|n.buttons(x),x)}function w(x){i(s&~n.buttons(x),x)}function h(){v||(v=!0,a.addEventListener("mousemove",C),a.addEventListener("mousedown",_),a.addEventListener("mouseup",w),a.addEventListener("mouseleave",T),a.addEventListener("mouseenter",T),a.addEventListener("mouseout",T),a.addEventListener("mouseover",T),a.addEventListener("blur",S),a.addEventListener("keyup",M),a.addEventListener("keydown",M),a.addEventListener("keypress",M),a!==window&&(window.addEventListener("blur",S),window.addEventListener("keyup",M),window.addEventListener("keydown",M),window.addEventListener("keypress",M)))}function u(){v&&(v=!1,a.removeEventListener("mousemove",C),a.removeEventListener("mousedown",_),a.removeEventListener("mouseup",w),a.removeEventListener("mouseleave",T),a.removeEventListener("mouseenter",T),a.removeEventListener("mouseout",T),a.removeEventListener("mouseover",T),a.removeEventListener("blur",S),a.removeEventListener("keyup",M),a.removeEventListener("keydown",M),a.removeEventListener("keypress",M),a!==window&&(window.removeEventListener("blur",S),window.removeEventListener("keyup",M),window.removeEventListener("keydown",M),window.removeEventListener("keypress",M)))}h();var A={element:a};return Object.defineProperties(A,{enabled:{get:function(){return v},set:function(x){x?h():u()},enumerable:!0},buttons:{get:function(){return s},enumerable:!0},x:{get:function(){return c},enumerable:!0},y:{get:function(){return g},enumerable:!0},mods:{get:function(){return f},enumerable:!0}}),A}},24(l){var e={left:0,top:0};l.exports=t;function t(r,a,o){a=a||r.currentTarget||r.srcElement,Array.isArray(o)||(o=[0,0]);var s=r.clientX||0,c=r.clientY||0,g=n(a);return o[0]=s-g.left,o[1]=c-g.top,o}function n(r){return r===window||r===document||r===document.body?e:r.getBoundingClientRect()}},4687(l,e){"use strict";function t(o){if(typeof o=="object"){if("buttons"in o)return o.buttons;if("which"in o){var s=o.which;if(s===2)return 4;if(s===3)return 2;if(s>0)return 1<=0)return 1<0){if(re=1,V[K++]=f(h[z],S,M,C),z+=U,_>0)for(Q=1,I=h[z],H=V[K]=f(I,S,M,C),W=V[K+X],he=V[K+ee],Me=V[K+xe],(H!==W||H!==he||H!==Me)&&(D=h[z+O],F=h[z+B],j=h[z+P],c(Q,re,I,D,F,j,H,W,he,Me,S,M,C),Se=Z[K]=ne++),K+=1,z+=U,Q=2;Q<_;++Q)I=h[z],H=V[K]=f(I,S,M,C),W=V[K+X],he=V[K+ee],Me=V[K+xe],(H!==W||H!==he||H!==Me)&&(D=h[z+O],F=h[z+B],j=h[z+P],c(Q,re,I,D,F,j,H,W,he,Me,S,M,C),Se=Z[K]=ne++,Me!==W&&g(Z[K+X],Se,j,D,Me,W,S,M,C)),K+=1,z+=U;for(z+=$,K=0,Ie=X,X=q,q=Ie,Ie=ee,ee=ae,ae=Ie,Ie=xe,xe=we,we=Ie,re=2;re0)for(Q=1,I=h[z],H=V[K]=f(I,S,M,C),W=V[K+X],he=V[K+ee],Me=V[K+xe],(H!==W||H!==he||H!==Me)&&(D=h[z+O],F=h[z+B],j=h[z+P],c(Q,re,I,D,F,j,H,W,he,Me,S,M,C),Se=Z[K]=ne++,Me!==he&&g(Z[K+ee],Se,F,j,he,Me,S,M,C)),K+=1,z+=U,Q=2;Q<_;++Q)I=h[z],H=V[K]=f(I,S,M,C),W=V[K+X],he=V[K+ee],Me=V[K+xe],(H!==W||H!==he||H!==Me)&&(D=h[z+O],F=h[z+B],j=h[z+P],c(Q,re,I,D,F,j,H,W,he,Me,S,M,C),Se=Z[K]=ne++,Me!==he&&g(Z[K+ee],Se,F,j,he,Me,S,M,C),Me!==W&&g(Z[K+X],Se,j,D,Me,W,S,M,C)),K+=1,z+=U;re&1&&(K=0),Ie=X,X=q,q=Ie,Ie=ee,ee=ae,ae=Ie,Ie=xe,xe=we,we=Ie,z+=$}}m(Z),m(V)}},"false,1,0":function(c,g,f,v,m){return function(T,S,M,C){var _=T.shape[0]|0,w=T.shape[1]|0,h=T.data,u=T.offset|0,A=T.stride[0]|0,x=T.stride[1]|0,z=u,I,O=-A|0,D=0,B=-x|0,F=0,P=-A-x|0,j=0,U=x|0,$=A-x*w|0,Q=0,re=0,ne=0,se=2*w|0,V=v(se),Z=v(se),K=0,H=0,X=-1,q=-1,W=0,ee=-w|0,ae=w|0,he=0,xe=-w-1|0,we=w-1|0,Me=0,Se=0,Ie=0;for(re=0;re0){if(Q=1,V[K++]=f(h[z],S,M,C),z+=U,w>0)for(re=1,I=h[z],H=V[K]=f(I,S,M,C),he=V[K+ee],W=V[K+X],Me=V[K+xe],(H!==he||H!==W||H!==Me)&&(D=h[z+O],F=h[z+B],j=h[z+P],c(Q,re,I,D,F,j,H,he,W,Me,S,M,C),Se=Z[K]=ne++),K+=1,z+=U,re=2;re0)for(re=1,I=h[z],H=V[K]=f(I,S,M,C),he=V[K+ee],W=V[K+X],Me=V[K+xe],(H!==he||H!==W||H!==Me)&&(D=h[z+O],F=h[z+B],j=h[z+P],c(Q,re,I,D,F,j,H,he,W,Me,S,M,C),Se=Z[K]=ne++,Me!==he&&g(Z[K+ee],Se,j,D,Me,he,S,M,C)),K+=1,z+=U,re=2;re 0"),typeof s.vertex!="function"&&c("Must specify vertex creation function"),typeof s.cell!="function"&&c("Must specify cell creation function"),typeof s.phase!="function"&&c("Must specify phase function");for(var m=s.getters||[],i=new Array(f),T=0;T=0?i[T]=!0:i[T]=!1;return a(s.vertex,s.cell,s.phase,v,g,i)}},6199(l,e,t){"use strict";var n=t(1338),r={zero:function(C,_,w,h){var u=C[0],A=w[0];h|=0;var x=0,z=A;for(x=0;x2&&x[1]>2&&h(A.pick(-1,-1).lo(1,1).hi(x[0]-2,x[1]-2),u.pick(-1,-1,0).lo(1,1).hi(x[0]-2,x[1]-2),u.pick(-1,-1,1).lo(1,1).hi(x[0]-2,x[1]-2)),x[1]>2&&(w(A.pick(0,-1).lo(1).hi(x[1]-2),u.pick(0,-1,1).lo(1).hi(x[1]-2)),_(u.pick(0,-1,0).lo(1).hi(x[1]-2))),x[1]>2&&(w(A.pick(x[0]-1,-1).lo(1).hi(x[1]-2),u.pick(x[0]-1,-1,1).lo(1).hi(x[1]-2)),_(u.pick(x[0]-1,-1,0).lo(1).hi(x[1]-2))),x[0]>2&&(w(A.pick(-1,0).lo(1).hi(x[0]-2),u.pick(-1,0,0).lo(1).hi(x[0]-2)),_(u.pick(-1,0,1).lo(1).hi(x[0]-2))),x[0]>2&&(w(A.pick(-1,x[1]-1).lo(1).hi(x[0]-2),u.pick(-1,x[1]-1,0).lo(1).hi(x[0]-2)),_(u.pick(-1,x[1]-1,1).lo(1).hi(x[0]-2))),u.set(0,0,0,0),u.set(0,0,1,0),u.set(x[0]-1,0,0,0),u.set(x[0]-1,0,1,0),u.set(0,x[1]-1,0,0),u.set(0,x[1]-1,1,0),u.set(x[0]-1,x[1]-1,0,0),u.set(x[0]-1,x[1]-1,1,0),u}}function M(C){var _=C.join(),x=f[_];if(x)return x;for(var w=C.length,h=[m,i],u=1;u<=w;++u)h.push(T(u));var A=S,x=A.apply(void 0,h);return f[_]=x,x}l.exports=function(_,w,h){if(Array.isArray(h)||(typeof h=="string"?h=n(w.dimension,h):h=n(w.dimension,"clamp")),w.size===0)return _;if(w.dimension===0)return _.set(0),_;var u=M(h);return u(_,w)}},4317(l){"use strict";function e(o,s){var c=Math.floor(s),g=s-c,f=0<=c&&c0;){F<64?(_=F,F=0):(_=64,F-=64);for(var P=f[1]|0;P>0;){P<64?(w=P,P=0):(w=64,P-=64),i=D+F*u+P*A,M=B+F*z+P*I;var j=0,U=0,$=0,Q=x,re=u-h*x,ne=A-_*u,se=O,V=z-h*O,Z=I-_*z;for($=0;$0;){I<64?(_=I,I=0):(_=64,I-=64);for(var O=f[0]|0;O>0;){O<64?(C=O,O=0):(C=64,O-=64),i=x+I*h+O*w,M=z+I*A+O*u;var D=0,B=0,F=h,P=w-_*h,j=A,U=u-_*A;for(B=0;B0;){B<64?(w=B,B=0):(w=64,B-=64);for(var F=f[0]|0;F>0;){F<64?(C=F,F=0):(C=64,F-=64);for(var P=f[1]|0;P>0;){P<64?(_=P,P=0):(_=64,P-=64),i=O+B*A+F*h+P*u,M=D+B*I+F*x+P*z;var j=0,U=0,$=0,Q=A,re=h-w*A,ne=u-C*h,se=I,V=x-w*I,Z=z-C*x;for($=0;$<_;++$){for(U=0;UT;){j=0,U=D-_;t:for(F=0;FQ)break t;U+=x,j+=z}for(j=D,U=D-_,F=0;F>1,P=F-O,j=F+O,U=D,$=P,Q=F,re=j,ne=B,se=S+1,V=M-1,Z=!0,K,H,X,q,W,ee,ae,he,xe,we=0,Me=0,Se=0,Ie,Ge,qe,ke,_e,ue,ve,le,Ae,Be,Xe,Ye,yt,gt,Tt,At,$t=A,rr=m($t),_r=m($t);Ge=w*U,qe=w*$,At=_;e:for(Ie=0;Ie0){H=U,U=$,$=H;break e}if(Se<0)break e;At+=z}Ge=w*re,qe=w*ne,At=_;e:for(Ie=0;Ie0){H=re,re=ne,ne=H;break e}if(Se<0)break e;At+=z}Ge=w*U,qe=w*Q,At=_;e:for(Ie=0;Ie0){H=U,U=Q,Q=H;break e}if(Se<0)break e;At+=z}Ge=w*$,qe=w*Q,At=_;e:for(Ie=0;Ie0){H=$,$=Q,Q=H;break e}if(Se<0)break e;At+=z}Ge=w*U,qe=w*re,At=_;e:for(Ie=0;Ie0){H=U,U=re,re=H;break e}if(Se<0)break e;At+=z}Ge=w*Q,qe=w*re,At=_;e:for(Ie=0;Ie0){H=Q,Q=re,re=H;break e}if(Se<0)break e;At+=z}Ge=w*$,qe=w*ne,At=_;e:for(Ie=0;Ie0){H=$,$=ne,ne=H;break e}if(Se<0)break e;At+=z}Ge=w*$,qe=w*Q,At=_;e:for(Ie=0;Ie0){H=$,$=Q,Q=H;break e}if(Se<0)break e;At+=z}Ge=w*re,qe=w*ne,At=_;e:for(Ie=0;Ie0){H=re,re=ne,ne=H;break e}if(Se<0)break e;At+=z}for(Ge=w*U,qe=w*$,ke=w*Q,_e=w*re,ue=w*ne,ve=w*D,le=w*F,Ae=w*B,Tt=0,At=_,Ie=0;Ie0)V--;else if(Se<0){for(Ge=w*ee,qe=w*se,ke=w*V,At=_,Ie=0;Ie0)for(;;){ae=_+V*w,Tt=0;e:for(Ie=0;Ie0){if(--VB){e:for(;;){for(ae=_+se*w,Tt=0,At=_,Ie=0;Ie1&&T?M(i,T[0],T[1]):M(i)}var g={"uint32,1,0":function(v,m){return function(i){var T=i.data,S=i.offset|0,M=i.shape,C=i.stride,_=C[0]|0,w=M[0]|0,h=C[1]|0,u=M[1]|0,A=h,x=h,z=1;w<=32?v(0,w-1,T,S,_,h,w,u,A,x,z):m(0,w-1,T,S,_,h,w,u,A,x,z)}}};function f(v,m){var i=[m,v].join(","),T=g[i],S=o(v,m),M=c(v,m,S);return T(S,M)}l.exports=f},446(l,e,t){"use strict";var n=t(7640),r={};function a(o){var s=o.order,c=o.dtype,g=[s,c],f=g.join(":"),v=r[f];return v||(r[f]=v=n(s,c)),v(o),o}l.exports=a},9618(l,e,t){var n=t(7163),r=typeof Float64Array<"u";function a(m,i){return m[0]-i[0]}function o(){var m=this.stride,i=new Array(m.length),T;for(T=0;T=0&&(h=_|0,w+=A*h,u-=h),new S(this.data,u,A,w)},M.step=function(_){var w=this.shape[0],h=this.stride[0],u=this.offset,A=0,x=Math.ceil;return typeof _=="number"&&(A=_|0,A<0?(u+=h*(w-1),w=x(-w/A)):w=x(w/A),h*=A),new S(this.data,w,h,u)},M.transpose=function(_){_=_===void 0?0:_|0;var w=this.shape,h=this.stride;return new S(this.data,w[_],h[_],this.offset)},M.pick=function(_){var w=[],h=[],u=this.offset;typeof _=="number"&&_>=0?u=u+this.stride[0]*_|0:(w.push(this.shape[0]),h.push(this.stride[0]));var A=i[w.length+1];return A(this.data,w,h,u)},function(_,w,h,u){return new S(_,w[0],h[0],u)}},2:function(m,i,T){function S(C,_,w,h,u,A){this.data=C,this.shape=[_,w],this.stride=[h,u],this.offset=A|0}var M=S.prototype;return M.dtype=m,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,h){return m==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*w,h):this.data[this.offset+this.stride[0]*_+this.stride[1]*w]=h},M.get=function(_,w){return m==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*w):this.data[this.offset+this.stride[0]*_+this.stride[1]*w]},M.index=function(_,w){return this.offset+this.stride[0]*_+this.stride[1]*w},M.hi=function(_,w){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof w!="number"||w<0?this.shape[1]:w|0,this.stride[0],this.stride[1],this.offset)},M.lo=function(_,w){var h=this.offset,u=0,A=this.shape[0],x=this.shape[1],z=this.stride[0],I=this.stride[1];return typeof _=="number"&&_>=0&&(u=_|0,h+=z*u,A-=u),typeof w=="number"&&w>=0&&(u=w|0,h+=I*u,x-=u),new S(this.data,A,x,z,I,h)},M.step=function(_,w){var h=this.shape[0],u=this.shape[1],A=this.stride[0],x=this.stride[1],z=this.offset,I=0,O=Math.ceil;return typeof _=="number"&&(I=_|0,I<0?(z+=A*(h-1),h=O(-h/I)):h=O(h/I),A*=I),typeof w=="number"&&(I=w|0,I<0?(z+=x*(u-1),u=O(-u/I)):u=O(u/I),x*=I),new S(this.data,h,u,A,x,z)},M.transpose=function(_,w){_=_===void 0?0:_|0,w=w===void 0?1:w|0;var h=this.shape,u=this.stride;return new S(this.data,h[_],h[w],u[_],u[w],this.offset)},M.pick=function(_,w){var h=[],u=[],A=this.offset;typeof _=="number"&&_>=0?A=A+this.stride[0]*_|0:(h.push(this.shape[0]),u.push(this.stride[0])),typeof w=="number"&&w>=0?A=A+this.stride[1]*w|0:(h.push(this.shape[1]),u.push(this.stride[1]));var x=i[h.length+1];return x(this.data,h,u,A)},function(_,w,h,u){return new S(_,w[0],w[1],h[0],h[1],u)}},3:function(m,i,T){function S(C,_,w,h,u,A,x,z){this.data=C,this.shape=[_,w,h],this.stride=[u,A,x],this.offset=z|0}var M=S.prototype;return M.dtype=m,M.dimension=3,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(M,"order",{get:function(){var _=Math.abs(this.stride[0]),w=Math.abs(this.stride[1]),h=Math.abs(this.stride[2]);return _>w?w>h?[2,1,0]:_>h?[1,2,0]:[1,0,2]:_>h?[2,0,1]:h>w?[0,1,2]:[0,2,1]}}),M.set=function(_,w,h,u){return m==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h,u):this.data[this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h]=u},M.get=function(_,w,h){return m==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h):this.data[this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h]},M.index=function(_,w,h){return this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h},M.hi=function(_,w,h){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof w!="number"||w<0?this.shape[1]:w|0,typeof h!="number"||h<0?this.shape[2]:h|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},M.lo=function(_,w,h){var u=this.offset,A=0,x=this.shape[0],z=this.shape[1],I=this.shape[2],O=this.stride[0],D=this.stride[1],B=this.stride[2];return typeof _=="number"&&_>=0&&(A=_|0,u+=O*A,x-=A),typeof w=="number"&&w>=0&&(A=w|0,u+=D*A,z-=A),typeof h=="number"&&h>=0&&(A=h|0,u+=B*A,I-=A),new S(this.data,x,z,I,O,D,B,u)},M.step=function(_,w,h){var u=this.shape[0],A=this.shape[1],x=this.shape[2],z=this.stride[0],I=this.stride[1],O=this.stride[2],D=this.offset,B=0,F=Math.ceil;return typeof _=="number"&&(B=_|0,B<0?(D+=z*(u-1),u=F(-u/B)):u=F(u/B),z*=B),typeof w=="number"&&(B=w|0,B<0?(D+=I*(A-1),A=F(-A/B)):A=F(A/B),I*=B),typeof h=="number"&&(B=h|0,B<0?(D+=O*(x-1),x=F(-x/B)):x=F(x/B),O*=B),new S(this.data,u,A,x,z,I,O,D)},M.transpose=function(_,w,h){_=_===void 0?0:_|0,w=w===void 0?1:w|0,h=h===void 0?2:h|0;var u=this.shape,A=this.stride;return new S(this.data,u[_],u[w],u[h],A[_],A[w],A[h],this.offset)},M.pick=function(_,w,h){var u=[],A=[],x=this.offset;typeof _=="number"&&_>=0?x=x+this.stride[0]*_|0:(u.push(this.shape[0]),A.push(this.stride[0])),typeof w=="number"&&w>=0?x=x+this.stride[1]*w|0:(u.push(this.shape[1]),A.push(this.stride[1])),typeof h=="number"&&h>=0?x=x+this.stride[2]*h|0:(u.push(this.shape[2]),A.push(this.stride[2]));var z=i[u.length+1];return z(this.data,u,A,x)},function(_,w,h,u){return new S(_,w[0],w[1],w[2],h[0],h[1],h[2],u)}},4:function(m,i,T){function S(C,_,w,h,u,A,x,z,I,O){this.data=C,this.shape=[_,w,h,u],this.stride=[A,x,z,I],this.offset=O|0}var M=S.prototype;return M.dtype=m,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:T}),M.set=function(_,w,h,u,A){return m==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h+this.stride[3]*u,A):this.data[this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h+this.stride[3]*u]=A},M.get=function(_,w,h,u){return m==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h+this.stride[3]*u):this.data[this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h+this.stride[3]*u]},M.index=function(_,w,h,u){return this.offset+this.stride[0]*_+this.stride[1]*w+this.stride[2]*h+this.stride[3]*u},M.hi=function(_,w,h,u){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof w!="number"||w<0?this.shape[1]:w|0,typeof h!="number"||h<0?this.shape[2]:h|0,typeof u!="number"||u<0?this.shape[3]:u|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},M.lo=function(_,w,h,u){var A=this.offset,x=0,z=this.shape[0],I=this.shape[1],O=this.shape[2],D=this.shape[3],B=this.stride[0],F=this.stride[1],P=this.stride[2],j=this.stride[3];return typeof _=="number"&&_>=0&&(x=_|0,A+=B*x,z-=x),typeof w=="number"&&w>=0&&(x=w|0,A+=F*x,I-=x),typeof h=="number"&&h>=0&&(x=h|0,A+=P*x,O-=x),typeof u=="number"&&u>=0&&(x=u|0,A+=j*x,D-=x),new S(this.data,z,I,O,D,B,F,P,j,A)},M.step=function(_,w,h,u){var A=this.shape[0],x=this.shape[1],z=this.shape[2],I=this.shape[3],O=this.stride[0],D=this.stride[1],B=this.stride[2],F=this.stride[3],P=this.offset,j=0,U=Math.ceil;return typeof _=="number"&&(j=_|0,j<0?(P+=O*(A-1),A=U(-A/j)):A=U(A/j),O*=j),typeof w=="number"&&(j=w|0,j<0?(P+=D*(x-1),x=U(-x/j)):x=U(x/j),D*=j),typeof h=="number"&&(j=h|0,j<0?(P+=B*(z-1),z=U(-z/j)):z=U(z/j),B*=j),typeof u=="number"&&(j=u|0,j<0?(P+=F*(I-1),I=U(-I/j)):I=U(I/j),F*=j),new S(this.data,A,x,z,I,O,D,B,F,P)},M.transpose=function(_,w,h,u){_=_===void 0?0:_|0,w=w===void 0?1:w|0,h=h===void 0?2:h|0,u=u===void 0?3:u|0;var A=this.shape,x=this.stride;return new S(this.data,A[_],A[w],A[h],A[u],x[_],x[w],x[h],x[u],this.offset)},M.pick=function(_,w,h,u){var A=[],x=[],z=this.offset;typeof _=="number"&&_>=0?z=z+this.stride[0]*_|0:(A.push(this.shape[0]),x.push(this.stride[0])),typeof w=="number"&&w>=0?z=z+this.stride[1]*w|0:(A.push(this.shape[1]),x.push(this.stride[1])),typeof h=="number"&&h>=0?z=z+this.stride[2]*h|0:(A.push(this.shape[2]),x.push(this.stride[2])),typeof u=="number"&&u>=0?z=z+this.stride[3]*u|0:(A.push(this.shape[3]),x.push(this.stride[3]));var I=i[A.length+1];return I(this.data,A,x,z)},function(_,w,h,u){return new S(_,w[0],w[1],w[2],w[3],h[0],h[1],h[2],h[3],u)}},5:function(i,T,S){function M(_,w,h,u,A,x,z,I,O,D,B,F){this.data=_,this.shape=[w,h,u,A,x],this.stride=[z,I,O,D,B],this.offset=F|0}var C=M.prototype;return C.dtype=i,C.dimension=5,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(C,"order",{get:S}),C.set=function(w,h,u,A,x,z){return i==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*h+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x,z):this.data[this.offset+this.stride[0]*w+this.stride[1]*h+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x]=z},C.get=function(w,h,u,A,x){return i==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*h+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x):this.data[this.offset+this.stride[0]*w+this.stride[1]*h+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x]},C.index=function(w,h,u,A,x){return this.offset+this.stride[0]*w+this.stride[1]*h+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x},C.hi=function(w,h,u,A,x){return new M(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof h!="number"||h<0?this.shape[1]:h|0,typeof u!="number"||u<0?this.shape[2]:u|0,typeof A!="number"||A<0?this.shape[3]:A|0,typeof x!="number"||x<0?this.shape[4]:x|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},C.lo=function(w,h,u,A,x){var z=this.offset,I=0,O=this.shape[0],D=this.shape[1],B=this.shape[2],F=this.shape[3],P=this.shape[4],j=this.stride[0],U=this.stride[1],$=this.stride[2],Q=this.stride[3],re=this.stride[4];return typeof w=="number"&&w>=0&&(I=w|0,z+=j*I,O-=I),typeof h=="number"&&h>=0&&(I=h|0,z+=U*I,D-=I),typeof u=="number"&&u>=0&&(I=u|0,z+=$*I,B-=I),typeof A=="number"&&A>=0&&(I=A|0,z+=Q*I,F-=I),typeof x=="number"&&x>=0&&(I=x|0,z+=re*I,P-=I),new M(this.data,O,D,B,F,P,j,U,$,Q,re,z)},C.step=function(w,h,u,A,x){var z=this.shape[0],I=this.shape[1],O=this.shape[2],D=this.shape[3],B=this.shape[4],F=this.stride[0],P=this.stride[1],j=this.stride[2],U=this.stride[3],$=this.stride[4],Q=this.offset,re=0,ne=Math.ceil;return typeof w=="number"&&(re=w|0,re<0?(Q+=F*(z-1),z=ne(-z/re)):z=ne(z/re),F*=re),typeof h=="number"&&(re=h|0,re<0?(Q+=P*(I-1),I=ne(-I/re)):I=ne(I/re),P*=re),typeof u=="number"&&(re=u|0,re<0?(Q+=j*(O-1),O=ne(-O/re)):O=ne(O/re),j*=re),typeof A=="number"&&(re=A|0,re<0?(Q+=U*(D-1),D=ne(-D/re)):D=ne(D/re),U*=re),typeof x=="number"&&(re=x|0,re<0?(Q+=$*(B-1),B=ne(-B/re)):B=ne(B/re),$*=re),new M(this.data,z,I,O,D,B,F,P,j,U,$,Q)},C.transpose=function(w,h,u,A,x){w=w===void 0?0:w|0,h=h===void 0?1:h|0,u=u===void 0?2:u|0,A=A===void 0?3:A|0,x=x===void 0?4:x|0;var z=this.shape,I=this.stride;return new M(this.data,z[w],z[h],z[u],z[A],z[x],I[w],I[h],I[u],I[A],I[x],this.offset)},C.pick=function(w,h,u,A,x){var z=[],I=[],O=this.offset;typeof w=="number"&&w>=0?O=O+this.stride[0]*w|0:(z.push(this.shape[0]),I.push(this.stride[0])),typeof h=="number"&&h>=0?O=O+this.stride[1]*h|0:(z.push(this.shape[1]),I.push(this.stride[1])),typeof u=="number"&&u>=0?O=O+this.stride[2]*u|0:(z.push(this.shape[2]),I.push(this.stride[2])),typeof A=="number"&&A>=0?O=O+this.stride[3]*A|0:(z.push(this.shape[3]),I.push(this.stride[3])),typeof x=="number"&&x>=0?O=O+this.stride[4]*x|0:(z.push(this.shape[4]),I.push(this.stride[4]));var D=T[z.length+1];return D(this.data,z,I,O)},function(w,h,u,A){return new M(w,h[0],h[1],h[2],h[3],h[4],u[0],u[1],u[2],u[3],u[4],A)}}};function c(m,i){var T=i===-1?"T":String(i),S=s[T];return i===-1?S(m):i===0?S(m,f[m][0]):S(m,f[m],o)}function g(m){if(n(m))return"buffer";if(r)switch(Object.prototype.toString.call(m)){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(m)?"array":"generic"}var f={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function v(m,i,T,S){if(m===void 0){var u=f.array[0];return u([])}else typeof m=="number"&&(m=[m]);i===void 0&&(i=[m.length]);var M=i.length;if(T===void 0){T=new Array(M);for(var C=M-1,_=1;C>=0;--C)T[C]=_,_*=i[C]}if(S===void 0){S=0;for(var C=0;C>>0;l.exports=o;function o(s,c){if(isNaN(s)||isNaN(c))return NaN;if(s===c)return s;if(s===0)return c<0?-r:r;var g=n.hi(s),f=n.lo(s);return c>s==s>0?f===a?(g+=1,f=0):f+=1:f===0?(f=a,g-=1):f-=1,n.pack(f,g)}},8406(l,e){var t=1e-6,n=1e-6;e.vertexNormals=function(r,a,o){for(var s=a.length,c=new Array(s),g=o===void 0?t:o,f=0;fg)for(var z=c[i],I=1/Math.sqrt(h*A),x=0;x<3;++x){var O=(x+1)%3,D=(x+2)%3;z[x]+=I*(u[O]*w[D]-u[D]*w[O])}}for(var f=0;fg)for(var I=1/Math.sqrt(B),x=0;x<3;++x)z[x]*=I;else for(var x=0;x<3;++x)z[x]=0}return c},e.faceNormals=function(r,a,o){for(var s=r.length,c=new Array(s),g=o===void 0?n:o,f=0;fg?C=1/Math.sqrt(C):C=0;for(var i=0;i<3;++i)M[i]*=C;c[f]=M}return c}},4081(l){"use strict";l.exports=e;function e(t,n,r,a,o,s,c,g,f,v){var m=n+s+v;if(i>0){var i=Math.sqrt(m+1);t[0]=.5*(c-f)/i,t[1]=.5*(g-a)/i,t[2]=.5*(r-s)/i,t[3]=.5*i}else{var T=Math.max(n,s,v),i=Math.sqrt(2*T-m+1);n>=T?(t[0]=.5*i,t[1]=.5*(o+r)/i,t[2]=.5*(g+a)/i,t[3]=.5*(c-f)/i):s>=T?(t[0]=.5*(r+o)/i,t[1]=.5*i,t[2]=.5*(f+c)/i,t[3]=.5*(g-a)/i):(t[0]=.5*(a+g)/i,t[1]=.5*(c+f)/i,t[2]=.5*i,t[3]=.5*(r-o)/i)}return t}},9977(l,e,t){"use strict";l.exports=i;var n=t(9215),r=t(6582),a=t(7399),o=t(7608),s=t(4081);function c(T,S,M){return Math.sqrt(Math.pow(T,2)+Math.pow(S,2)+Math.pow(M,2))}function g(T,S,M,C){return Math.sqrt(Math.pow(T,2)+Math.pow(S,2)+Math.pow(M,2)+Math.pow(C,2))}function f(T,S){var M=S[0],C=S[1],_=S[2],w=S[3],h=g(M,C,_,w);h>1e-6?(T[0]=M/h,T[1]=C/h,T[2]=_/h,T[3]=w/h):(T[0]=T[1]=T[2]=0,T[3]=1)}function v(T,S,M){this.radius=n([M]),this.center=n(S),this.rotation=n(T),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 m=v.prototype;m.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},m.recalcMatrix=function(T){this.radius.curve(T),this.center.curve(T),this.rotation.curve(T);var S=this.computedRotation;f(S,S);var M=this.computedMatrix;a(M,S);var C=this.computedCenter,_=this.computedEye,w=this.computedUp,h=Math.exp(this.computedRadius[0]);_[0]=C[0]+h*M[2],_[1]=C[1]+h*M[6],_[2]=C[2]+h*M[10],w[0]=M[1],w[1]=M[5],w[2]=M[9];for(var u=0;u<3;++u){for(var A=0,x=0;x<3;++x)A+=M[u+4*x]*_[x];M[12+u]=-A}},m.getMatrix=function(T,S){this.recalcMatrix(T);var M=this.computedMatrix;if(S){for(var C=0;C<16;++C)S[C]=M[C];return S}return M},m.idle=function(T){this.center.idle(T),this.radius.idle(T),this.rotation.idle(T)},m.flush=function(T){this.center.flush(T),this.radius.flush(T),this.rotation.flush(T)},m.pan=function(T,S,M,C){S=S||0,M=M||0,C=C||0,this.recalcMatrix(T);var _=this.computedMatrix,w=_[1],h=_[5],u=_[9],A=c(w,h,u);w/=A,h/=A,u/=A;var x=_[0],z=_[4],I=_[8],O=x*w+z*h+I*u;x-=w*O,z-=h*O,I-=u*O;var D=c(x,z,I);x/=D,z/=D,I/=D;var B=_[2],F=_[6],P=_[10],j=B*w+F*h+P*u,U=B*x+F*z+P*I;B-=j*w+U*x,F-=j*h+U*z,P-=j*u+U*I;var $=c(B,F,P);B/=$,F/=$,P/=$;var Q=x*S+w*M,re=z*S+h*M,ne=I*S+u*M;this.center.move(T,Q,re,ne);var se=Math.exp(this.computedRadius[0]);se=Math.max(1e-4,se+C),this.radius.set(T,Math.log(se))},m.rotate=function(T,S,M,C){this.recalcMatrix(T),S=S||0,M=M||0;var _=this.computedMatrix,w=_[0],h=_[4],u=_[8],A=_[1],x=_[5],z=_[9],I=_[2],O=_[6],D=_[10],B=S*w+M*A,F=S*h+M*x,P=S*u+M*z,j=-(O*P-D*F),U=-(D*B-I*P),$=-(I*F-O*B),Q=Math.sqrt(Math.max(0,1-Math.pow(j,2)-Math.pow(U,2)-Math.pow($,2))),re=g(j,U,$,Q);re>1e-6?(j/=re,U/=re,$/=re,Q/=re):(j=U=$=0,Q=1);var ne=this.computedRotation,se=ne[0],V=ne[1],Z=ne[2],K=ne[3],H=se*Q+K*j+V*$-Z*U,X=V*Q+K*U+Z*j-se*$,q=Z*Q+K*$+se*U-V*j,W=K*Q-se*j-V*U-Z*$;if(C){j=I,U=O,$=D;var ee=Math.sin(C)/c(j,U,$);j*=ee,U*=ee,$*=ee,Q=Math.cos(S),H=H*Q+W*j+X*$-q*U,X=X*Q+W*U+q*j-H*$,q=q*Q+W*$+H*U-X*j,W=W*Q-H*j-X*U-q*$}var ae=g(H,X,q,W);ae>1e-6?(H/=ae,X/=ae,q/=ae,W/=ae):(H=X=q=0,W=1),this.rotation.set(T,H,X,q,W)},m.lookAt=function(T,S,M,C){this.recalcMatrix(T),M=M||this.computedCenter,S=S||this.computedEye,C=C||this.computedUp;var _=this.computedMatrix;r(_,S,M,C);var w=this.computedRotation;s(w,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),f(w,w),this.rotation.set(T,w[0],w[1],w[2],w[3]);for(var h=0,u=0;u<3;++u)h+=Math.pow(M[u]-S[u],2);this.radius.set(T,.5*Math.log(Math.max(h,1e-6))),this.center.set(T,M[0],M[1],M[2])},m.translate=function(T,S,M,C){this.center.move(T,S||0,M||0,C||0)},m.setMatrix=function(T,S){var M=this.computedRotation;s(M,S[0],S[1],S[2],S[4],S[5],S[6],S[8],S[9],S[10]),f(M,M),this.rotation.set(T,M[0],M[1],M[2],M[3]);var C=this.computedMatrix;o(C,S);var _=C[15];if(Math.abs(_)>1e-6){var w=C[12]/_,h=C[13]/_,u=C[14]/_;this.recalcMatrix(T);var A=Math.exp(this.computedRadius[0]);this.center.set(T,w-C[2]*A,h-C[6]*A,u-C[10]*A),this.radius.idle(T)}else this.center.idle(T),this.radius.idle(T)},m.setDistance=function(T,S){S>0&&this.radius.set(T,Math.log(S))},m.setDistanceLimits=function(T,S){T>0?T=Math.log(T):T=-1/0,S>0?S=Math.log(S):S=1/0,S=Math.max(S,T),this.radius.bounds[0][0]=T,this.radius.bounds[1][0]=S},m.getDistanceLimits=function(T){var S=this.radius.bounds;return T?(T[0]=Math.exp(S[0][0]),T[1]=Math.exp(S[1][0]),T):[Math.exp(S[0][0]),Math.exp(S[1][0])]},m.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]}},m.fromJSON=function(T){var S=this.lastT(),M=T.center;M&&this.center.set(S,M[0],M[1],M[2]);var C=T.rotation;C&&this.rotation.set(S,C[0],C[1],C[2],C[3]);var _=T.distance;_&&_>0&&this.radius.set(S,Math.log(_)),this.setDistanceLimits(T.zoomMin,T.zoomMax)};function i(T){T=T||{};var S=T.center||[0,0,0],M=T.rotation||[0,0,0,1],C=T.radius||1;S=[].slice.call(S,0,3),M=[].slice.call(M,0,4),f(M,M);var _=new v(M,S,Math.log(C));return _.setDistanceLimits(T.zoomMin,T.zoomMax),("eye"in T||"up"in T)&&_.lookAt(0,T.eye,T.center,T.up),_}},1371(l,e,t){"use strict";var n=t(3233);l.exports=function(a,o,s){return s=typeof s<"u"?s+"":" ",n(s,o)+a}},3202(l){l.exports=function(t,n){n||(n=[0,""]),t=String(t);var r=parseFloat(t,10);return n[0]=r,n[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}},3088(l,e,t){"use strict";l.exports=r;var n=t(3140);function r(a,o){for(var s=o.length|0,c=a.length,g=[new Array(s),new Array(s)],f=0;f0){z=g[D][A][0],O=D;break}I=z[O^1];for(var B=0;B<2;++B)for(var F=g[B][A],P=0;P0&&(z=j,I=U,O=B)}return x||z&&i(z,O),I}function S(u,A){var x=g[A][u][0],z=[u];i(x,A);for(var I=x[A^1],O=A;;){for(;I!==u;)z.push(I),I=T(z[z.length-2],I,!1);if(g[0][u].length+g[1][u].length===0)break;var D=z[z.length-1],B=u,F=z[1],P=T(D,B,!0);if(n(o[D],o[B],o[F],o[P])<0)break;z.push(u),I=T(D,B)}return z}function M(u,A){return A[1]===A[A.length-1]}for(var f=0;f0;){var w=g[0][f].length,h=S(f,C);M(_,h)?_.push.apply(_,h):(_.length>0&&m.push(_),_=h)}_.length>0&&m.push(_)}return m}},5609(l,e,t){"use strict";l.exports=r;var n=t(3134);function r(a,o){for(var s=n(a,o.length),c=new Array(o.length),g=new Array(o.length),f=[],v=0;v0;){var i=f.pop();c[i]=!1;for(var T=s[i],v=0;v0}w=w.filter(h);for(var u=w.length,A=new Array(u),x=new Array(u),_=0;_0;){var ae=q.pop(),he=re[ae];c(he,function(Ie,Ge){return Ie-Ge});var xe=he.length,we=W[ae],Me;if(we===0){var F=w[ae];Me=[F]}for(var _=0;_=0)&&(W[Se]=we^1,q.push(Se),we===0)){var F=w[Se];X(F)||(F.reverse(),Me.push(F))}}we===0&&ee.push(Me)}return ee}},5085(l,e,t){l.exports=T;var n=t(3250)[3],r=t(4209),a=t(3352),o=t(2478);function s(){return!0}function c(S){return function(M,C){var _=S[M];return _?!!_.queryPoint(C,s):!1}}function g(S){for(var M={},C=0;C0&&M[_]===C[0])w=S[_-1];else return 1;for(var h=1;w;){var u=w.key,A=n(C,u[0],u[1]);if(u[0][0]0)h=-1,w=w.right;else return 0;else if(A>0)w=w.left;else if(A<0)h=1,w=w.right;else return 0}return h}}function v(S){return 1}function m(S){return function(C){return S(C[0],C[1])?0:1}}function i(S,M){return function(_){return S(_[0],_[1])?0:M(_)}}function T(S){for(var M=S.length,C=[],_=[],w=0,h=0;h=v?(u=1,x=v+2*T+M):(u=-T/v,x=T*u+M)):(u=0,S>=0?(A=0,x=M):-S>=i?(A=1,x=i+2*S+M):(A=-S/i,x=S*A+M));else if(A<0)A=0,T>=0?(u=0,x=M):-T>=v?(u=1,x=v+2*T+M):(u=-T/v,x=T*u+M);else{var z=1/h;u*=z,A*=z,x=u*(v*u+m*A+2*T)+A*(m*u+i*A+2*S)+M}else{var I,O,D,B;u<0?(I=m+T,O=i+S,O>I?(D=O-I,B=v-2*m+i,D>=B?(u=1,A=0,x=v+2*T+M):(u=D/B,A=1-u,x=u*(v*u+m*A+2*T)+A*(m*u+i*A+2*S)+M)):(u=0,O<=0?(A=1,x=i+2*S+M):S>=0?(A=0,x=M):(A=-S/i,x=S*A+M))):A<0?(I=m+S,O=v+T,O>I?(D=O-I,B=v-2*m+i,D>=B?(A=1,u=0,x=i+2*S+M):(A=D/B,u=1-A,x=u*(v*u+m*A+2*T)+A*(m*u+i*A+2*S)+M)):(A=0,O<=0?(u=1,x=v+2*T+M):T>=0?(u=0,x=M):(u=-T/v,x=T*u+M))):(D=i+S-m-T,D<=0?(u=0,A=1,x=i+2*S+M):(B=v-2*m+i,D>=B?(u=1,A=0,x=v+2*T+M):(u=D/B,A=1-u,x=u*(v*u+m*A+2*T)+A*(m*u+i*A+2*S)+M)))}for(var F=1-u-A,f=0;f0){var i=s[g-1];if(n(v,i)===0&&a(i)!==m){g-=1;continue}}s[g++]=v}}return s.length=g,s}},3233(l){"use strict";var e="",t;l.exports=n;function n(r,a){if(typeof r!="string")throw new TypeError("expected a string");if(a===1)return r;if(a===2)return r+r;var o=r.length*a;if(t!==r||typeof t>"u")t=r,e="";else if(e.length>=o)return e.substr(0,o);for(;o>e.length&&a>1;)a&1&&(e+=r),a>>=1,r+=r;return e+=r,e=e.substr(0,o),e}},3025(l,e,t){l.exports=t.g.performance&&t.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004(l){"use strict";l.exports=e;function e(t){for(var n=t.length,r=t[t.length-1],a=n,o=n-2;o>=0;--o){var s=r,c=t[o];r=s+c;var g=r-s,f=c-g;f&&(t[--a]=r,r=f)}for(var v=0,o=a;o0){if(O<=0)return D;B=I+O}else if(I<0){if(O>=0)return D;B=-(I+O)}else return D;var F=g*B;return D>=F||D<=-F?D:S(A,x,z)},function(A,x,z,I){var O=A[0]-I[0],D=x[0]-I[0],B=z[0]-I[0],F=A[1]-I[1],P=x[1]-I[1],j=z[1]-I[1],U=A[2]-I[2],$=x[2]-I[2],Q=z[2]-I[2],re=D*j,ne=B*P,se=B*F,V=O*j,Z=O*P,K=D*F,H=U*(re-ne)+$*(se-V)+Q*(Z-K),X=(Math.abs(re)+Math.abs(ne))*Math.abs(U)+(Math.abs(se)+Math.abs(V))*Math.abs($)+(Math.abs(Z)+Math.abs(K))*Math.abs(Q),q=f*X;return H>q||-H>q?H:M(A,x,z,I)}];function _(u){var A=C[u.length];return A||(A=C[u.length]=T(u.length)),A.apply(void 0,u)}function w(u,A,x,z,I,O,D){return function(F,P,j,U,$){switch(arguments.length){case 0:case 1:return 0;case 2:return z(F,P);case 3:return I(F,P,j);case 4:return O(F,P,j,U);case 5:return D(F,P,j,U,$)}for(var Q=new Array(arguments.length),re=0;re0&&v>0||f<0&&v<0)return!1;var m=n(c,o,s),i=n(g,o,s);return m>0&&i>0||m<0&&i<0?!1:f===0&&v===0&&m===0&&i===0?r(o,s,c,g):!0}},8545(l){"use strict";l.exports=t;function e(n,r){var a=n+r,o=a-n,s=a-o,c=r-o,g=n-s,f=g+c;return f?[f,a]:[a]}function t(n,r){var a=n.length|0,o=r.length|0;if(a===1&&o===1)return e(n[0],-r[0]);var s=a+o,c=new Array(s),g=0,f=0,v=0,m=Math.abs,i=n[f],T=m(i),S=-r[v],M=m(S),C,_;T=o?(C=i,f+=1,f=o?(C=i,f+=1,f"u"&&(C=s(T));var _=T.length;if(_===0||C<1)return{cells:[],vertexIds:[],vertexWeights:[]};var w=c(S,+M),h=g(T,C),u=f(h,S,w,+M),A=v(h,S.length|0),x=o(C)(T,h.data,A,w),z=m(h),I=[].slice.call(u.data,0,u.shape[0]);return r.free(w),r.free(h.data),r.free(u.data),r.free(A),{cells:x,vertexIds:z,vertexWeights:I}}},1570(l){"use strict";l.exports=t;var e=[function(){function r(o,s,c,g){for(var f=Math.min(c,g)|0,v=Math.max(c,g)|0,m=o[2*f],i=o[2*f+1];m>1,S=s[2*T+1];if(S===v)return T;v>1,S=s[2*T+1];if(S===v)return T;v>1,S=s[2*T+1];if(S===v)return T;v>1,S=s[2*T+1];if(S===v)return T;v>1,B=g(A[D],x);B<=0?(B===0&&(O=D),z=D+1):B>0&&(I=D-1)}return O}n=i;function T(A,x){for(var z=new Array(A.length),I=0,O=z.length;I=A.length||g(A[re],D)!==0););}return z}n=T;function S(A,x){if(!x)return T(m(C(A,0)),A,0);for(var z=new Array(x),I=0;I>>j&1&&P.push(O[j]);x.push(P)}return v(x)}n=M;function C(A,x){if(x<0)return[];for(var z=[],I=(1<0)-(a<0)},e.abs=function(a){var o=a>>t-1;return(a^o)-o},e.min=function(a,o){return o^(a^o)&-(a65535)<<4,a>>>=o,s=(a>255)<<3,a>>>=s,o|=s,s=(a>15)<<2,a>>>=s,o|=s,s=(a>3)<<1,a>>>=s,o|=s,o|a>>1},e.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},e.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function n(a){var o=32;return a&=-a,a&&o--,a&65535&&(o-=16),a&16711935&&(o-=8),a&252645135&&(o-=4),a&858993459&&(o-=2),a&1431655765&&(o-=1),o}e.countTrailingZeros=n,e.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},e.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},e.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var r=new Array(256);(function(a){for(var o=0;o<256;++o){var s=o,c=o,g=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--g;a[o]=c<>>8&255]<<16|r[a>>>16&255]<<8|r[a>>>24&255]},e.interleave2=function(a,o){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,a|o<<1},e.deinterleave2=function(a,o){return a=a>>>o&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},e.interleave3=function(a,o,s){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,a|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,a|s<<2},e.deinterleave3=function(a,o){return a=a>>>o&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},e.nextCombination=function(a){var o=a|a-1;return o+1|(~o&-~o)-1>>>n(a)+1}},2014(l,e,t){"use strict";"use restrict";var n=t(3105),r=t(4623);function a(u){for(var A=0,x=Math.max,z=0,I=u.length;z>1,D=c(u[O],A);D<=0?(D===0&&(I=O),x=O+1):D>0&&(z=O-1)}return I}e.findCell=m;function i(u,A){for(var x=new Array(u.length),z=0,I=x.length;z=u.length||c(u[Q],O)!==0););}return x}e.incidence=i;function T(u,A){if(!A)return i(v(M(u,0)),u,0);for(var x=new Array(A),z=0;z>>P&1&&F.push(I[P]);A.push(F)}return f(A)}e.explode=S;function M(u,A){if(A<0)return[];for(var x=[],z=(1<>1:(V>>1)-1}function z(V){for(var Z=A(V);;){var K=Z,H=2*V+1,X=2*(V+1),q=V;if(H0;){var K=x(V);if(K>=0){var H=A(K);if(Z0){var V=F[0];return u(0,U-1),U-=1,z(0),V}return-1}function D(V,Z){var K=F[V];return T[K]===Z?V:(T[K]=-1/0,I(V),O(),T[K]=Z,U+=1,I(U-1))}function B(V){if(!S[V]){S[V]=!0;var Z=m[V],K=i[V];m[K]>=0&&(m[K]=Z),i[Z]>=0&&(i[Z]=K),P[Z]>=0&&D(P[Z],h(Z)),P[K]>=0&&D(P[K],h(K))}}for(var F=[],P=new Array(f),M=0;M>1;M>=0;--M)z(M);for(;;){var $=O();if($<0||T[$]>g)break;B($)}for(var Q=[],M=0;M=0&&K>=0&&Z!==K){var H=P[Z],X=P[K];H!==X&&se.push([H,X])}}),r.unique(r.normalize(se)),{positions:Q,edges:se}}},1303(l,e,t){"use strict";l.exports=a;var n=t(3250);function r(o,s){var c,g;if(s[0][0]s[1][0])c=s[1],g=s[0];else{var f=Math.min(o[0][1],o[1][1]),v=Math.max(o[0][1],o[1][1]),m=Math.min(s[0][1],s[1][1]),i=Math.max(s[0][1],s[1][1]);return vi?f-i:v-i}var T,S;o[0][1]s[1][0])c=s[1],g=s[0];else return r(s,o);var f,v;if(o[0][0]o[1][0])f=o[1],v=o[0];else return-r(o,s);var m=n(c,g,v),i=n(c,g,f);if(m<0){if(i<=0)return m}else if(m>0){if(i>=0)return m}else if(i)return i;if(m=n(v,f,g),i=n(v,f,c),m<0){if(i<=0)return m}else if(m>0){if(i>=0)return m}else if(i)return i;return g[0]-v[0]}},4209(l,e,t){"use strict";l.exports=i;var n=t(2478),r=t(3840),a=t(3250),o=t(1303);function s(T,S,M){this.slabs=T,this.coordinates=S,this.horizontal=M}var c=s.prototype;function g(T,S){return T.y-S}function f(T,S){for(var M=null;T;){var C=T.key,_,w;C[0][0]0)if(S[0]!==C[1][0])M=T,T=T.right;else{var u=f(T.right,S);if(u)return u;T=T.left}else{if(S[0]!==C[1][0])return T;var u=f(T.right,S);if(u)return u;T=T.left}}return M}c.castUp=function(T){var S=n.le(this.coordinates,T[0]);if(S<0)return-1;var M=this.slabs[S],C=f(this.slabs[S],T),_=-1;if(C&&(_=C.value),this.coordinates[S]===T[0]){var w=null;if(C&&(w=C.key),S>0){var h=f(this.slabs[S-1],T);h&&(w?o(h.key,w)>0&&(w=h.key,_=h.value):(_=h.value,w=h.key))}var u=this.horizontal[S];if(u.length>0){var A=n.ge(u,T[1],g);if(A=u.length)return _;x=u[A]}}if(x.start)if(w){var z=a(w[0],w[1],[T[0],x.y]);w[0][0]>w[1][0]&&(z=-z),z>0&&(_=x.index)}else _=x.index;else x.y!==T[1]&&(_=x.index)}}}return _};function v(T,S,M,C){this.y=T,this.index=S,this.start=M,this.closed=C}function m(T,S,M,C){this.x=T,this.segment=S,this.create=M,this.index=C}function i(T){for(var S=T.length,M=2*S,C=new Array(M),_=0;_1&&(S=1);for(var M=1-S,C=f.length,_=new Array(C),w=0;w0||T>0&&_<0){var w=o(S,_,M,T);m.push(w),i.push(w.slice())}_<0?i.push(M.slice()):_>0?m.push(M.slice()):(m.push(M.slice()),i.push(M.slice())),T=_}return{positive:m,negative:i}}function c(f,v){for(var m=[],i=a(f[f.length-1],v),T=f[f.length-1],S=f[0],M=0;M0||i>0&&C<0)&&m.push(o(T,C,S,i)),C>=0&&m.push(S.slice()),i=C}return m}function g(f,v){for(var m=[],i=a(f[f.length-1],v),T=f[f.length-1],S=f[0],M=0;M0||i>0&&C<0)&&m.push(o(T,C,S,i)),C<=0&&m.push(S.slice()),i=C}return m}},3387(l,e,t){var n;(function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(f){return s(g(f),arguments)}function o(f,v){return a.apply(null,[f].concat(v||[]))}function s(f,v){var m=1,i=f.length,T,S="",M,C,_,w,h,u,A,x;for(M=0;M=0),_.type){case"b":T=parseInt(T,10).toString(2);break;case"c":T=String.fromCharCode(parseInt(T,10));break;case"d":case"i":T=parseInt(T,10);break;case"j":T=JSON.stringify(T,null,_.width?parseInt(_.width):0);break;case"e":T=_.precision?parseFloat(T).toExponential(_.precision):parseFloat(T).toExponential();break;case"f":T=_.precision?parseFloat(T).toFixed(_.precision):parseFloat(T);break;case"g":T=_.precision?String(Number(T.toPrecision(_.precision))):parseFloat(T);break;case"o":T=(parseInt(T,10)>>>0).toString(8);break;case"s":T=String(T),T=_.precision?T.substring(0,_.precision):T;break;case"t":T=String(!!T),T=_.precision?T.substring(0,_.precision):T;break;case"T":T=Object.prototype.toString.call(T).slice(8,-1).toLowerCase(),T=_.precision?T.substring(0,_.precision):T;break;case"u":T=parseInt(T,10)>>>0;break;case"v":T=T.valueOf(),T=_.precision?T.substring(0,_.precision):T;break;case"x":T=(parseInt(T,10)>>>0).toString(16);break;case"X":T=(parseInt(T,10)>>>0).toString(16).toUpperCase();break}r.json.test(_.type)?S+=T:(r.number.test(_.type)&&(!A||_.sign)?(x=A?"+":"-",T=T.toString().replace(r.sign,"")):x="",h=_.pad_char?_.pad_char==="0"?"0":_.pad_char.charAt(1):" ",u=_.width-(x+T).length,w=_.width&&u>0?h.repeat(u):"",S+=_.align?x+T+w:h==="0"?x+w+T:w+x+T)}return S}var c=Object.create(null);function g(f){if(c[f])return c[f];for(var v=f,m,i=[],T=0;v;){if((m=r.text.exec(v))!==null)i.push(m[0]);else if((m=r.modulo.exec(v))!==null)i.push("%");else if((m=r.placeholder.exec(v))!==null){if(m[2]){T|=1;var S=[],M=m[2],C=[];if((C=r.key.exec(M))!==null)for(S.push(C[1]);(M=M.substring(C[0].length))!=="";)if((C=r.key_access.exec(M))!==null)S.push(C[1]);else if((C=r.index_access.exec(M))!==null)S.push(C[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");m[2]=S}else T|=2;if(T===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:m[0],param_no:m[1],keys:m[2],sign:m[3],pad_char:m[4],align:m[5],width:m[6],precision:m[7],type:m[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");v=v.substring(m[0].length)}return c[f]=i}e.sprintf=a,e.vsprintf=o,typeof window<"u"&&(window.sprintf=a,window.vsprintf=o,n=function(){return{sprintf:a,vsprintf:o}}.call(e,t,e,l),n!==void 0&&(l.exports=n))})()},3711(l,e,t){"use strict";l.exports=g;var n=t(2640),r=t(781),a={"2d":function(f,v,m){var i=f({order:v,scalarArguments:3,getters:m==="generic"?[0]:void 0,phase:function(S,M,C,_){return S>_|0},vertex:function(S,M,C,_,w,h,u,A,x,z,I,O,D){var B=(u<<0)+(A<<1)+(x<<2)+(z<<3)|0;if(!(B===0||B===15))switch(B){case 0:I.push([S-.5,M-.5]);break;case 1:I.push([S-.25-.25*(_+C-2*D)/(C-_),M-.25-.25*(w+C-2*D)/(C-w)]);break;case 2:I.push([S-.75-.25*(-_-C+2*D)/(_-C),M-.25-.25*(h+_-2*D)/(_-h)]);break;case 3:I.push([S-.5,M-.5-.5*(w+C+h+_-4*D)/(C-w+_-h)]);break;case 4:I.push([S-.25-.25*(h+w-2*D)/(w-h),M-.75-.25*(-w-C+2*D)/(w-C)]);break;case 5:I.push([S-.5-.5*(_+C+h+w-4*D)/(C-_+w-h),M-.5]);break;case 6:I.push([S-.5-.25*(-_-C+h+w)/(_-C+w-h),M-.5-.25*(-w-C+h+_)/(w-C+_-h)]);break;case 7:I.push([S-.75-.25*(h+w-2*D)/(w-h),M-.75-.25*(h+_-2*D)/(_-h)]);break;case 8:I.push([S-.75-.25*(-h-w+2*D)/(h-w),M-.75-.25*(-h-_+2*D)/(h-_)]);break;case 9:I.push([S-.5-.25*(_+C+-h-w)/(C-_+h-w),M-.5-.25*(w+C+-h-_)/(C-w+h-_)]);break;case 10:I.push([S-.5-.5*(-_-C+-h-w+4*D)/(_-C+h-w),M-.5]);break;case 11:I.push([S-.25-.25*(-h-w+2*D)/(h-w),M-.75-.25*(w+C-2*D)/(C-w)]);break;case 12:I.push([S-.5,M-.5-.5*(-w-C+-h-_+4*D)/(w-C+h-_)]);break;case 13:I.push([S-.75-.25*(_+C-2*D)/(C-_),M-.25-.25*(-h-_+2*D)/(h-_)]);break;case 14:I.push([S-.25-.25*(-_-C+2*D)/(_-C),M-.25-.25*(-w-C+2*D)/(w-C)]);break;case 15:I.push([S-.5,M-.5]);break}},cell:function(S,M,C,_,w,h,u,A,x){w?A.push([S,M]):A.push([M,S])}});return function(T,S){var M=[],C=[];return i(T,M,C,S),{positions:M,cells:C}}}};function o(f,v){var m=f.length+"d",i=a[m];if(i)return i(n,f,v)}function s(f,v){for(var m=r(f,v),i=m.length,T=new Array(i),S=new Array(i),M=0;MMath.max(_,w)?h[2]=1:_>Math.max(C,w)?h[0]=1:h[1]=1;for(var u=0,A=0,x=0;x<3;++x)u+=M[x]*M[x],A+=h[x]*M[x];for(var x=0;x<3;++x)h[x]-=A/u*M[x];return s(h,h),h}function m(M,C,_,w,h,u,A,x){this.center=n(_),this.up=n(w),this.right=n(h),this.radius=n([u]),this.angle=n([A,x]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(M,C),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var i=m.prototype;i.setDistanceLimits=function(M,C){M>0?M=Math.log(M):M=-1/0,C>0?C=Math.log(C):C=1/0,C=Math.max(C,M),this.radius.bounds[0][0]=M,this.radius.bounds[1][0]=C},i.getDistanceLimits=function(M){var C=this.radius.bounds[0];return M?(M[0]=Math.exp(C[0][0]),M[1]=Math.exp(C[1][0]),M):[Math.exp(C[0][0]),Math.exp(C[1][0])]},i.recalcMatrix=function(M){this.center.curve(M),this.up.curve(M),this.right.curve(M),this.radius.curve(M),this.angle.curve(M);for(var C=this.computedUp,_=this.computedRight,w=0,h=0,u=0;u<3;++u)h+=C[u]*_[u],w+=C[u]*C[u];for(var A=Math.sqrt(w),x=0,u=0;u<3;++u)_[u]-=C[u]*h/w,x+=_[u]*_[u],C[u]/=A;for(var z=Math.sqrt(x),u=0;u<3;++u)_[u]/=z;var I=this.computedToward;o(I,C,_),s(I,I);for(var O=Math.exp(this.computedRadius[0]),D=this.computedAngle[0],B=this.computedAngle[1],F=Math.cos(D),P=Math.sin(D),j=Math.cos(B),U=Math.sin(B),$=this.computedCenter,Q=F*j,re=P*j,ne=U,se=-F*U,V=-P*U,Z=j,K=this.computedEye,H=this.computedMatrix,u=0;u<3;++u){var X=Q*_[u]+re*I[u]+ne*C[u];H[4*u+1]=se*_[u]+V*I[u]+Z*C[u],H[4*u+2]=X,H[4*u+3]=0}var q=H[1],W=H[5],ee=H[9],ae=H[2],he=H[6],xe=H[10],we=W*xe-ee*he,Me=ee*ae-q*xe,Se=q*he-W*ae,Ie=g(we,Me,Se);we/=Ie,Me/=Ie,Se/=Ie,H[0]=we,H[4]=Me,H[8]=Se;for(var u=0;u<3;++u)K[u]=$[u]+H[2+4*u]*O;for(var u=0;u<3;++u){for(var x=0,Ge=0;Ge<3;++Ge)x+=H[u+4*Ge]*K[Ge];H[12+u]=-x}H[15]=1},i.getMatrix=function(M,C){this.recalcMatrix(M);var _=this.computedMatrix;if(C){for(var w=0;w<16;++w)C[w]=_[w];return C}return _};var T=[0,0,0];i.rotate=function(M,C,_,w){if(this.angle.move(M,C,_),w){this.recalcMatrix(M);var h=this.computedMatrix;T[0]=h[2],T[1]=h[6],T[2]=h[10];for(var u=this.computedUp,A=this.computedRight,x=this.computedToward,z=0;z<3;++z)h[4*z]=u[z],h[4*z+1]=A[z],h[4*z+2]=x[z];a(h,h,w,T);for(var z=0;z<3;++z)u[z]=h[4*z],A[z]=h[4*z+1];this.up.set(M,u[0],u[1],u[2]),this.right.set(M,A[0],A[1],A[2])}},i.pan=function(M,C,_,w){C=C||0,_=_||0,w=w||0,this.recalcMatrix(M);var h=this.computedMatrix,u=Math.exp(this.computedRadius[0]),A=h[1],x=h[5],z=h[9],I=g(A,x,z);A/=I,x/=I,z/=I;var O=h[0],D=h[4],B=h[8],F=O*A+D*x+B*z;O-=A*F,D-=x*F,B-=z*F;var P=g(O,D,B);O/=P,D/=P,B/=P;var j=O*C+A*_,U=D*C+x*_,$=B*C+z*_;this.center.move(M,j,U,$);var Q=Math.exp(this.computedRadius[0]);Q=Math.max(1e-4,Q+w),this.radius.set(M,Math.log(Q))},i.translate=function(M,C,_,w){this.center.move(M,C||0,_||0,w||0)},i.setMatrix=function(M,C,_,w){var h=1;typeof _=="number"&&(h=_|0),(h<0||h>3)&&(h=1);var u=(h+2)%3,A=(h+1)%3;C||(this.recalcMatrix(M),C=this.computedMatrix);var x=C[h],z=C[h+4],I=C[h+8];if(w){var D=Math.abs(x),B=Math.abs(z),F=Math.abs(I),P=Math.max(D,B,F);D===P?(x=x<0?-1:1,z=I=0):F===P?(I=I<0?-1:1,x=z=0):(z=z<0?-1:1,x=I=0)}else{var O=g(x,z,I);x/=O,z/=O,I/=O}var j=C[u],U=C[u+4],$=C[u+8],Q=j*x+U*z+$*I;j-=x*Q,U-=z*Q,$-=I*Q;var re=g(j,U,$);j/=re,U/=re,$/=re;var ne=z*$-I*U,se=I*j-x*$,V=x*U-z*j,Z=g(ne,se,V);ne/=Z,se/=Z,V/=Z,this.center.jump(M,ve,le,Ae),this.radius.idle(M),this.up.jump(M,x,z,I),this.right.jump(M,j,U,$);var K,H;if(h===2){var X=C[1],q=C[5],W=C[9],ee=X*j+q*U+W*$,ae=X*ne+q*se+W*V;Me<0?K=-Math.PI/2:K=Math.PI/2,H=Math.atan2(ae,ee)}else{var he=C[2],xe=C[6],we=C[10],Me=he*x+xe*z+we*I,Se=he*j+xe*U+we*$,Ie=he*ne+xe*se+we*V;K=Math.asin(f(Me)),H=Math.atan2(Ie,Se)}this.angle.jump(M,H,K),this.recalcMatrix(M);var Ge=C[2],qe=C[6],ke=C[10],_e=this.computedMatrix;r(_e,C);var ue=_e[15],ve=_e[12]/ue,le=_e[13]/ue,Ae=_e[14]/ue,Be=Math.exp(this.computedRadius[0]);this.center.jump(M,ve-Ge*Be,le-qe*Be,Ae-ke*Be)},i.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},i.idle=function(M){this.center.idle(M),this.up.idle(M),this.right.idle(M),this.radius.idle(M),this.angle.idle(M)},i.flush=function(M){this.center.flush(M),this.up.flush(M),this.right.flush(M),this.radius.flush(M),this.angle.flush(M)},i.setDistance=function(M,C){C>0&&this.radius.set(M,Math.log(C))},i.lookAt=function(M,C,_,w){this.recalcMatrix(M),C=C||this.computedEye,_=_||this.computedCenter,w=w||this.computedUp;var h=w[0],u=w[1],A=w[2],x=g(h,u,A);if(!(x<1e-6)){h/=x,u/=x,A/=x;var z=C[0]-_[0],I=C[1]-_[1],O=C[2]-_[2],D=g(z,I,O);if(!(D<1e-6)){z/=D,I/=D,O/=D;var B=this.computedRight,F=B[0],P=B[1],j=B[2],U=h*F+u*P+A*j;F-=U*h,P-=U*u,j-=U*A;var $=g(F,P,j);if(!($<.01&&(F=u*O-A*I,P=A*z-h*O,j=h*I-u*z,$=g(F,P,j),$<1e-6))){F/=$,P/=$,j/=$,this.up.set(M,h,u,A),this.right.set(M,F,P,j),this.center.set(M,_[0],_[1],_[2]),this.radius.set(M,Math.log(D));var Q=u*j-A*P,re=A*F-h*j,ne=h*P-u*F,se=g(Q,re,ne);Q/=se,re/=se,ne/=se;var V=h*z+u*I+A*O,Z=F*z+P*I+j*O,K=Q*z+re*I+ne*O,H=Math.asin(f(V)),X=Math.atan2(K,Z),q=this.angle._state,W=q[q.length-1],ee=q[q.length-2];W=W%(2*Math.PI);var ae=Math.abs(W+2*Math.PI-X),he=Math.abs(W-X),xe=Math.abs(W-2*Math.PI-X);ae0?j.pop():new ArrayBuffer(F)}e.mallocArrayBuffer=T;function S(B){return new Uint8Array(T(B),0,B)}e.mallocUint8=S;function M(B){return new Uint16Array(T(2*B),0,B)}e.mallocUint16=M;function C(B){return new Uint32Array(T(4*B),0,B)}e.mallocUint32=C;function _(B){return new Int8Array(T(B),0,B)}e.mallocInt8=_;function w(B){return new Int16Array(T(2*B),0,B)}e.mallocInt16=w;function h(B){return new Int32Array(T(4*B),0,B)}e.mallocInt32=h;function u(B){return new Float32Array(T(4*B),0,B)}e.mallocFloat32=e.mallocFloat=u;function A(B){return new Float64Array(T(8*B),0,B)}e.mallocFloat64=e.mallocDouble=A;function x(B){return o?new Uint8ClampedArray(T(B),0,B):S(B)}e.mallocUint8Clamped=x;function z(B){return s?new BigUint64Array(T(8*B),0,B):null}e.mallocBigUint64=z;function I(B){return c?new BigInt64Array(T(8*B),0,B):null}e.mallocBigInt64=I;function O(B){return new DataView(T(B),0,B)}e.mallocDataView=O;function D(B){B=n.nextPow2(B);var F=n.log2(B),P=v[F];return P.length>0?P.pop():new a(B)}e.mallocBuffer=D,e.clearCache=function(){for(var F=0;F<32;++F)g.UINT8[F].length=0,g.UINT16[F].length=0,g.UINT32[F].length=0,g.INT8[F].length=0,g.INT16[F].length=0,g.INT32[F].length=0,g.FLOAT[F].length=0,g.DOUBLE[F].length=0,g.BIGUINT64[F].length=0,g.BIGINT64[F].length=0,g.UINT8C[F].length=0,f[F].length=0,v[F].length=0}},1755(l){"use strict";"use restrict";l.exports=e;function e(n){this.roots=new Array(n),this.ranks=new Array(n);for(var r=0;r",j="",U=P.length,$=j.length,Q=D[0]===T||D[0]===C,re=0,ne=-$;re>-1&&(re=B.indexOf(P,re),!(re===-1||(ne=B.indexOf(j,re+U),ne===-1)||ne<=re));){for(var se=re;se=ne)F[se]=null,B=B.substr(0,se)+" "+B.substr(se+1);else if(F[se]!==null){var V=F[se].indexOf(D[0]);V===-1?F[se]+=D:Q&&(F[se]=F[se].substr(0,V+1)+(1+parseInt(F[se][V+1]))+F[se].substr(V+2))}var Z=re+U,K=B.substr(Z,ne-Z),H=K.indexOf(P);H!==-1?re=H:re=ne+$}return F}function h(O,D,B){for(var F=D.textAlign||"start",P=D.textBaseline||"alphabetic",j=[1<<30,1<<30],U=[0,0],$=O.length,Q=0;Q<$;++Q)for(var re=O[Q],ne=0;ne<2;++ne)j[ne]=Math.min(j[ne],re[ne])|0,U[ne]=Math.max(U[ne],re[ne])|0;var se=0;switch(F){case"center":se=-.5*(j[0]+U[0]);break;case"right":case"end":se=-U[0];break;case"left":case"start":se=-j[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+F+"'")}var V=0;switch(P){case"hanging":case"top":V=-j[1];break;case"middle":V=-.5*(j[1]+U[1]);break;case"alphabetic":case"ideographic":V=-3*B;break;case"bottom":V=-U[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+P+"'")}var Z=1/B;return"lineHeight"in D?Z*=+D.lineHeight:"width"in D?Z=D.width/(U[0]-j[0]):"height"in D&&(Z=D.height/(U[1]-j[1])),O.map(function(K){return[Z*(K[0]+se),Z*(K[1]+V)]})}function u(O,D,B,F,P,j){B=B.replace(/\n/g,""),j.breaklines===!0?B=B.replace(/\/g,` +`):B=B.replace(/\/g," ");var U="",$=[];for(W=0;W-1?parseInt(le[1+Xe]):0,gt=Ye>-1?parseInt(Ae[1+Ye]):0;yt!==gt&&(Be=Be.replace(Se(),"?px "),he*=Math.pow(.75,gt-yt),Be=Be.replace("?px ",Se())),ae+=.25*V*(gt-yt)}if(j.superscripts===!0){var Tt=le.indexOf(T),At=Ae.indexOf(T),$t=Tt>-1?parseInt(le[1+Tt]):0,rr=At>-1?parseInt(Ae[1+At]):0;$t!==rr&&(Be=Be.replace(Se(),"?px "),he*=Math.pow(.75,rr-$t),Be=Be.replace("?px ",Se())),ae-=.25*V*(rr-$t)}if(j.bolds===!0){var _r=le.indexOf(f)>-1,Xt=Ae.indexOf(f)>-1;!_r&&Xt&&(or?Be=Be.replace("italic ","italic bold "):Be="bold "+Be),_r&&!Xt&&(Be=Be.replace("bold ",""))}if(j.italics===!0){var or=le.indexOf(m)>-1,Ot=Ae.indexOf(m)>-1;!or&&Ot&&(Be="italic "+Be),or&&!Ot&&(Be=Be.replace("italic ",""))}D.font=Be}for(q=0;q0&&(P=F.size),F.lineSpacing&&F.lineSpacing>0&&(j=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(U.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(U.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(U.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(U.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(U.superscripts=!!F.styletags.superscripts)),B.font=[F.fontStyle,F.fontVariant,F.fontWeight,P+"px",F.font].filter(function(Q){return Q}).join(" "),B.textAlign="start",B.textBaseline="alphabetic",B.direction="ltr";var $=u(D,B,O,P,j,U);return z($,F,P)}},1538(l){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function t(x){x.permitHostObjects___&&x.permitHostObjects___(t)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=t);var n=!1;if(typeof WeakMap=="function"){var r=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var a=new r,o=Object.freeze({});if(a.set(o,1),a.get(o)!==1)n=!0;else{l.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,c=Object.getOwnPropertyNames,g=Object.defineProperty,f=Object.isExtensible,v="weakmap:",m=v+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var i=new ArrayBuffer(25),T=new Uint8Array(i);crypto.getRandomValues(T),m=v+"rand:"+Array.prototype.map.call(T,function(x){return(x%36).toString(36)}).join("")+"___"}function S(x){return!(x.substr(0,v.length)==v&&x.substr(x.length-3)==="___")}if(g(Object,"getOwnPropertyNames",{value:function(z){return c(z).filter(S)}}),"getPropertyNames"in Object){var M=Object.getPropertyNames;g(Object,"getPropertyNames",{value:function(z){return M(z).filter(S)}})}function C(x){if(x!==Object(x))throw new TypeError("Not an object: "+x);var z=x[m];if(z&&z.key===x)return z;if(f(x)){z={key:x};try{return g(x,m,{value:z,writable:!1,enumerable:!1,configurable:!1}),z}catch{return}}}(function(){var x=Object.freeze;g(Object,"freeze",{value:function(D){return C(D),x(D)}});var z=Object.seal;g(Object,"seal",{value:function(D){return C(D),z(D)}});var I=Object.preventExtensions;g(Object,"preventExtensions",{value:function(D){return C(D),I(D)}})})();function _(x){return x.prototype=null,Object.freeze(x)}var w=!1;function h(){!w&&typeof console<"u"&&(w=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var u=0,A=function(){this instanceof A||h();var x=[],z=[],I=u++;function O(P,j){var U,$=C(P);return $?I in $?$[I]:j:(U=x.indexOf(P),U>=0?z[U]:j)}function D(P){var j=C(P);return j?I in j:x.indexOf(P)>=0}function B(P,j){var U,$=C(P);return $?$[I]=j:(U=x.indexOf(P),U>=0?z[U]=j:(U=x.length,z[U]=j,x[U]=P)),this}function F(P){var j=C(P),U,$;return j?I in j&&delete j[I]:(U=x.indexOf(P),U<0?!1:($=x.length-1,x[U]=void 0,z[U]=z[$],x[U]=x[$],x.length=$,z.length=$,!0))}return Object.create(A.prototype,{get___:{value:_(O)},has___:{value:_(D)},set___:{value:_(B)},delete___:{value:_(F)}})};A.prototype=Object.create(Object.prototype,{get:{value:function(z,I){return this.get___(z,I)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,I){return this.set___(z,I)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof r=="function"?function(){n&&typeof Proxy<"u"&&(Proxy=void 0);function x(){this instanceof A||h();var z=new r,I=void 0,O=!1;function D(j,U){return I?z.has(j)?z.get(j):I.get___(j,U):z.get(j,U)}function B(j){return z.has(j)||(I?I.has___(j):!1)}var F;n?F=function(j,U){return z.set(j,U),z.has(j)||(I||(I=new A),I.set(j,U)),this}:F=function(j,U){if(O)try{z.set(j,U)}catch{I||(I=new A),I.set___(j,U)}else z.set(j,U);return this};function P(j){var U=!!z.delete(j);return I&&I.delete___(j)||U}return Object.create(A.prototype,{get___:{value:_(D)},has___:{value:_(B)},set___:{value:_(F)},delete___:{value:_(P)},permitHostObjects___:{value:_(function(j){if(j===t)O=!0;else throw new Error("bogus call to permitHostObjects___")})}})}x.prototype=A.prototype,l.exports=x,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),l.exports=A)})()},236(l,e,t){var n=t(8284);l.exports=r;function r(){var a={};return function(o){if((typeof o!="object"||o===null)&&typeof o!="function")throw new Error("Weakmap-shim: Key must be object");var s=o.valueOf(a);return s&&s.identity===a?s:n(o,a)}}},8284(l){l.exports=e;function e(t,n){var r={identity:n},a=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(o){return o!==n?a.apply(this,arguments):r},writable:!0}),r}},606(l,e,t){var n=t(236);l.exports=r;function r(){var a=n();return{get:function(o,s){var c=a(o);return c.hasOwnProperty("value")?c.value:s},set:function(o,s){return a(o).value=s,this},has:function(o){return"value"in a(o)},delete:function(o){return delete a(o).value}}}},3349(l){"use strict";function e(){return function(s,c,g,f,v,m){var i=s[0],T=g[0],S=[0],M=T;f|=0;var C=0,_=T;for(C=0;C=0!=h>=0&&v.push(S[0]+.5+.5*(w+h)/(w-h))}f+=_,++S[0]}}}function t(){return e()}var n=t;function r(s){var c={};return function(f,v,m){var i=f.dtype,T=f.order,S=[i,T.join()].join(),M=c[S];return M||(c[S]=M=s([i,T])),M(f.shape.slice(0),f.data,f.stride,f.offset|0,v,m)}}function a(s){return r(n.bind(void 0,s))}function o(s){return a({funcName:s.funcName})}l.exports=o({funcName:"zeroCrossings"})},781(l,e,t){"use strict";l.exports=r;var n=t(3349);function r(a,o){var s=[];return o=+o||0,n(a.hi(a.shape[0]-1),s,o),s}},7790(){}};let b={};function E(l){let e=b[l];if(e!==void 0)return e.exports;let t=b[l]={id:l,loaded:!1,exports:{}};return p[l].call(t.exports,t,t.exports,E),t.loaded=!0,t.exports}E.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),E.nmd=l=>(l.paths=[],l.children||(l.children=[]),l);let k=E(3065);G.exports=k})()}}),cp=ze({"src/lib/str2rgbarray.js"(J,G){"use strict";var{normalize:p}=Qn();function b(E){return E?p(E):[0,0,0,1]}G.exports=b}}),fp=ze({"src/lib/gl_format_color.js"(J,G){"use strict";var p=ao(),b=fl(),E=Qn(),k=fc().defaultLine,l=Ff().isArrayOrTypedArray,e=E.normalize(k),t=1;function n(c,g){return[c[0],c[1],c[2],c[3]*g]}function r(c){return p(c)||!E.isChannelArray(c)&&!E.isValid(c)?e:E.normalize(c)}function a(c){return p(c)?c:t}function o(c,g,f){var v=c.color;v&&v._inputArray&&(v=v._inputArray);var m=l(v),i=l(g),T=b.extractOpts(c),S=[],M,C,_,w,h;if(T.colorscale!==void 0?M=b.makeColorScaleFuncFromTrace(c):M=r,m?C=(A,x)=>A[x]===void 0?e:T.colorscale===void 0?M(A[x]):E.normalize(M(A[x])):C=r,i?_=function(A,x){return A[x]===void 0?t:a(A[x])}:_=a,m||i)for(var u=0;u0){var v=n.c2l(g);n._lowerLogErrorBound||(n._lowerLogErrorBound=v),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,v)}}else a[o]=[-s[0]*t,s[1]*t]}return a}function E(l){for(var e=0;e-1?-1:z.indexOf("right")>-1?1:0}function S(z){return z==null?0:z.indexOf("top")>-1?-1:z.indexOf("bottom")>-1?1:0}function M(z){var I=0,O=0,D=[I,O];if(Array.isArray(z))for(var B=0;B=0){var $=m(j.position,j.delaunayColor,j.delaunayAxis);$.opacity=z.opacity,this.delaunayMesh?this.delaunayMesh.update($):($.gl=I,this.delaunayMesh=k($),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},v.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function x(z,I){var O=new f(z,I.uid);return O.update(I),O}G.exports=x}}),mA=ze({"src/traces/scatter3d/attributes.js"(J,G){"use strict";var p=su(),b=Qs(),E=qs(),k=Il().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=ws(),r=vA(),a=w2(),o=Ki().extendFlat,s=Al().overrideAll,c=(Nv(),Po(nv)).default,g=p.line,f=p.marker,v=f.line,m=o({width:g.width,dash:{valType:"enumerated",values:c(r),dflt:"solid"}},E("line"));function i(S){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var T=G.exports=s({x:p.x,y:p.y,z:{valType:"data_array"},text:o({},p.text,{}),texttemplate:e(),texttemplatefallback:t({editType:"calc"}),hovertext:o({},p.hovertext,{}),hovertemplate:l(),hovertemplatefallback:t(),xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z"),mode:o({},p.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:i("x"),y:i("y"),z:i("z")},connectgaps:p.connectgaps,line:m,marker:o({symbol:{valType:"enumerated",values:c(a),dflt:"circle",arrayOk:!0},size:o({},f.size,{dflt:8}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:o({},f.opacity,{arrayOk:!1}),colorbar:f.colorbar,line:o({width:o({},v.width,{arrayOk:!1})},E("marker.line"))},E("marker")),textposition:o({},p.textposition,{dflt:"top center"}),textfont:b({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:n.opacity,hoverinfo:o({},n.hoverinfo)},"calc","nested");T.x.editType=T.y.editType=T.z.editType="calc+clearAxisTypes"}}),LN=ze({"src/traces/scatter3d/defaults.js"(J,G){"use strict";var p=mi(),b=Nr(),E=el(),k=id(),l=_d(),e=xd(),t=mA();G.exports=function(a,o,s,c){function g(C,_){return b.coerce(a,o,t,C,_)}var f=n(a,o,g,c);if(!f){o.visible=!1;return}g("text"),g("hovertext"),g("hovertemplate"),g("hovertemplatefallback"),g("xhoverformat"),g("yhoverformat"),g("zhoverformat"),g("mode"),E.hasMarkers(o)&&k(a,o,s,c,g,{noAngle:!0,noLineDash:!0,noSelect:!0}),E.hasLines(o)&&(g("connectgaps"),l(a,o,s,c,g)),E.hasText(o)&&(g("texttemplate"),g("texttemplatefallback"),e(a,o,c,g,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var v=(o.line||{}).color,m=(o.marker||{}).color;g("surfaceaxis")>=0&&g("surfacecolor",v||m);for(var i=["x","y","z"],T=0;T<3;++T){var S="projection."+i[T];g(S+".show")&&(g(S+".opacity"),g(S+".scale"))}var M=p.getComponentMethod("errorbars","supplyDefaults");M(a,o,v||m||s,{axis:"z"}),M(a,o,v||m||s,{axis:"y",inherit:"z"}),M(a,o,v||m||s,{axis:"x",inherit:"z"})};function n(r,a,o,s){var c=0,g=o("x"),f=o("y"),v=o("z"),m=p.getComponentMethod("calendars","handleTraceDefaults");return m(r,a,["x","y","z"],s),g&&f&&v&&(c=Math.min(g.length,f.length,v.length),a._length=a._xlength=a._ylength=a._zlength=c),c}}}),PN=ze({"src/traces/scatter3d/calc.js"(J,G){"use strict";var p=Nd(),b=od();G.exports=function(k,l){var e=[{x:!1,y:!1,trace:l,t:{}}];return p(e,l),b(k,l),e}}}),RN=ze({"node_modules/get-canvas-context/index.js"(J,G){G.exports=p;function p(b,E){if(typeof b!="string")throw new TypeError("must specify type string");if(E=E||{},typeof document>"u"&&!E.canvas)return null;var k=E.canvas||document.createElement("canvas");typeof E.width=="number"&&(k.width=E.width),typeof E.height=="number"&&(k.height=E.height);var l=E,e;try{var t=[b];b.indexOf("webgl")===0&&t.push("experimental-"+b);for(var n=0;n/g," "));o[s]=v,c.tickmode=g}}n.ticks=o;for(var s=0;s<3;++s){k[s]=.5*(t.glplot.bounds[0][s]+t.glplot.bounds[1][s]);for(var m=0;m<2;++m)n.bounds[m][s]=t.glplot.bounds[m][s]}t.contourLevels=l(o)}}}),BN=ze({"src/plots/gl3d/scene.js"(J,G){"use strict";var p=df().gl_plot3d,b=p.createCamera,E=p.createScene,k=IN(),l=Rx(),e=mi(),t=Nr(),n=t.preserveDrawingBuffer(),r=Gi(),a=Zl(),o=cp(),s=gA(),c=C5(),g=DN(),f=FN(),v=zN(),m=md().applyAutorangeOptions,i,T,S=!1;function M(O,D){var B=document.createElement("div"),F=O.container;this.graphDiv=O.graphDiv;var P=document.createElementNS("http://www.w3.org/2000/svg","svg");P.style.position="absolute",P.style.top=P.style.left="0px",P.style.width=P.style.height="100%",P.style["z-index"]=20,P.style["pointer-events"]="none",B.appendChild(P),this.svgContainer=P,B.id=O.id,B.style.position="absolute",B.style.top=B.style.left="0px",B.style.width=B.style.height="100%",F.appendChild(B),this.fullLayout=D,this.id=O.id||"scene",this.fullSceneLayout=D[this.id],this.plotArgs=[[],{},{}],this.axesOptions=g(D,D[this.id]),this.spikeOptions=f(D[this.id]),this.container=B,this.staticMode=!!O.staticPlot,this.pixelRatio=this.pixelRatio||O.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var C=M.prototype;C.prepareOptions=function(){var O=this,D={canvas:O.canvas,gl:O.gl,glOptions:{preserveDrawingBuffer:n,premultipliedAlpha:!0,antialias:!0},container:O.container,axes:O.axesOptions,spikes:O.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:O.camera,pixelRatio:O.pixelRatio};if(O.staticMode){if(!T&&(i=document.createElement("canvas"),T=k({canvas:i,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!T))throw new Error("error creating static canvas/context for image server");D.gl=T,D.canvas=i}return D};var _=!0;C.tryCreatePlot=function(){var O=this,D=O.prepareOptions(),B=!0;try{O.glplot=E(D)}catch{if(O.staticMode||!_||n)B=!1;else{t.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{n=D.glOptions.preserveDrawingBuffer=!0,O.glplot=E(D)}catch{n=D.glOptions.preserveDrawingBuffer=!1,B=!1}}}return _=!1,B},C.initializeGLCamera=function(){var O=this,D=O.fullSceneLayout.camera,B=D.projection.type==="orthographic";O.camera=b(O.container,{center:[D.center.x,D.center.y,D.center.z],eye:[D.eye.x,D.eye.y,D.eye.z],up:[D.up.x,D.up.y,D.up.z],_ortho:B,zoomMin:.01,zoomMax:100,mode:"orbit"})},C.initializeGLPlot=function(){var O=this;O.initializeGLCamera();var D=O.tryCreatePlot();if(!D)return s(O);O.traces={},O.make4thDimension();var B=O.graphDiv,F=B.layout,P=function(){var U={};return O.isCameraChanged(F)&&(U[O.id+".camera"]=O.getCamera()),O.isAspectChanged(F)&&(U[O.id+".aspectratio"]=O.glplot.getAspectratio(),F[O.id].aspectmode!=="manual"&&(O.fullSceneLayout.aspectmode=F[O.id].aspectmode=U[O.id+".aspectmode"]="manual")),U},j=function(U){if(U.fullSceneLayout.dragmode!==!1){var $=P();U.saveLayout(F),U.graphDiv.emit("plotly_relayout",$)}};return O.glplot.canvas&&(O.glplot.canvas.addEventListener("mouseup",function(){j(O)}),O.glplot.canvas.addEventListener("touchstart",function(){S=!0}),O.glplot.canvas.addEventListener("wheel",function(U){if(B._context._scrollZoom.gl3d){if(O.camera._ortho){var $=U.deltaX>U.deltaY?1.1:.9090909090909091,Q=O.glplot.getAspectratio();O.glplot.setAspectratio({x:$*Q.x,y:$*Q.y,z:$*Q.z})}j(O)}},l?{passive:!1}:!1),O.glplot.canvas.addEventListener("mousemove",function(){if(O.fullSceneLayout.dragmode!==!1&&O.camera.mouseListener.buttons!==0){var U=P();O.graphDiv.emit("plotly_relayouting",U)}}),O.staticMode||O.glplot.canvas.addEventListener("webglcontextlost",function(U){B&&B.emit&&B.emit("plotly_webglcontextlost",{event:U,layer:O.id})},!1)),O.glplot.oncontextloss=function(){O.recoverContext()},O.glplot.onrender=function(){O.render()},!0},C.render=function(){var O=this,D=O.graphDiv,B,F=O.svgContainer,P=O.container.getBoundingClientRect();D._fullLayout._calcInverseTransform(D);var j=D._fullLayout._invScaleX,U=D._fullLayout._invScaleY,$=P.width*j,Q=P.height*U;F.setAttributeNS(null,"viewBox","0 0 "+$+" "+Q),F.setAttributeNS(null,"width",$),F.setAttributeNS(null,"height",Q),v(O),O.glplot.axes.update(O.axesOptions);for(var re=Object.keys(O.traces),ne=null,se=O.glplot.selection,V=0;V")):B.type==="isosurface"||B.type==="volume"?(q.valueLabel=r.hoverLabelText(O._mockAxis,O._mockAxis.d2l(se.traceCoordinate[3]),B.valuehoverformat),xe.push("value: "+q.valueLabel),se.textLabel&&xe.push(se.textLabel),he=xe.join("
")):he=se.textLabel;var we={x:se.traceCoordinate[0],y:se.traceCoordinate[1],z:se.traceCoordinate[2],data:H._input,fullData:H,curveNumber:H.index,pointNumber:X};a.appendArrayPointValue(we,H,X),B._module.eventData&&(we=H._module.eventData(we,se,H,{},X));var Me={points:[we]};if(O.fullSceneLayout.hovermode){var Se=[];a.loneHover({trace:H,x:(.5+.5*K[0]/K[3])*$,y:(.5-.5*K[1]/K[3])*Q,xLabel:q.xLabel,yLabel:q.yLabel,zLabel:q.zLabel,text:he,name:ne.name,color:a.castHoverOption(H,X,"bgcolor")||ne.color,borderColor:a.castHoverOption(H,X,"bordercolor"),fontFamily:a.castHoverOption(H,X,"font.family"),fontSize:a.castHoverOption(H,X,"font.size"),fontColor:a.castHoverOption(H,X,"font.color"),nameLength:a.castHoverOption(H,X,"namelength"),textAlign:a.castHoverOption(H,X,"align"),hovertemplate:t.castOption(H,X,"hovertemplate"),hovertemplateLabels:t.extendFlat({},we,q),eventData:[we]},{container:F,gd:D,inOut_bbox:Se}),we.bbox=Se[0]}se.distance<5&&(se.buttons||S)?D.emit("plotly_click",Me):D.emit("plotly_hover",Me),this.oldEventData=Me}else a.loneUnhover(F),this.oldEventData&&D.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;O.drawAnnotations(O)},C.recoverContext=function(){var O=this;O.glplot.dispose();var D=function(){if(O.glplot.gl.isContextLost()){requestAnimationFrame(D);return}if(!O.initializeGLPlot()){t.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}O.plot.apply(O,O.plotArgs)};requestAnimationFrame(D)};var w=["xaxis","yaxis","zaxis"];function h(O,D,B){for(var F=O.fullSceneLayout,P=0;P<3;P++){var j=w[P],U=j.charAt(0),$=F[j],Q=D[U],re=D[U+"calendar"],ne=D["_"+U+"length"];if(!t.isArrayOrTypedArray(Q))B[0][P]=Math.min(B[0][P],0),B[1][P]=Math.max(B[1][P],ne-1);else for(var se,V=0;V<(ne||Q.length);V++)if(t.isArrayOrTypedArray(Q[V]))for(var Z=0;ZH[1][U])H[0][U]=-1,H[1][U]=1;else{var Ge=H[1][U]-H[0][U];H[0][U]-=Ge/32,H[1][U]+=Ge/32}if(W=[H[0][U],H[1][U]],W=m(W,Q),H[0][U]=W[0],H[1][U]=W[1],Q.isReversed()){var qe=H[0][U];H[0][U]=H[1][U],H[1][U]=qe}}else W=Q.range,H[0][U]=Q.r2l(W[0]),H[1][U]=Q.r2l(W[1]);H[0][U]===H[1][U]&&(H[0][U]-=1,H[1][U]+=1),X[U]=H[1][U]-H[0][U],Q.range=[H[0][U],H[1][U]],Q.limitRange(),F.glplot.setBounds(U,{min:Q.range[0]*Z[U],max:Q.range[1]*Z[U]})}var ke,_e=ne.aspectmode;if(_e==="cube")ke=[1,1,1];else if(_e==="manual"){var ue=ne.aspectratio;ke=[ue.x,ue.y,ue.z]}else if(_e==="auto"||_e==="data"){var ve=[1,1,1];for(U=0;U<3;++U){Q=ne[w[U]],re=Q.type;var le=q[re];ve[U]=Math.pow(le.acc,1/le.count)/Z[U]}_e==="data"||Math.max.apply(null,ve)/Math.min.apply(null,ve)<=4?ke=ve:ke=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ne.aspectratio.x=se.aspectratio.x=ke[0],ne.aspectratio.y=se.aspectratio.y=ke[1],ne.aspectratio.z=se.aspectratio.z=ke[2],F.glplot.setAspectratio(ne.aspectratio),F.viewInitial.aspectratio||(F.viewInitial.aspectratio={x:ne.aspectratio.x,y:ne.aspectratio.y,z:ne.aspectratio.z}),F.viewInitial.aspectmode||(F.viewInitial.aspectmode=ne.aspectmode);var Ae=ne.domain||null,Be=D._size||null;if(Ae&&Be){var Xe=F.container.style;Xe.position="absolute",Xe.left=Be.l+Ae.x[0]*Be.w+"px",Xe.top=Be.t+(1-Ae.y[1])*Be.h+"px",Xe.width=Be.w*(Ae.x[1]-Ae.x[0])+"px",Xe.height=Be.h*(Ae.y[1]-Ae.y[0])+"px"}F.glplot.redraw()}},C.destroy=function(){var O=this;O.glplot&&(O.camera.mouseListener.enabled=!1,O.container.removeEventListener("wheel",O.camera.wheelListener),O.camera=null,O.glplot.dispose(),O.container.parentNode.removeChild(O.container),O.glplot=null)};function A(O){return[[O.eye.x,O.eye.y,O.eye.z],[O.center.x,O.center.y,O.center.z],[O.up.x,O.up.y,O.up.z]]}function x(O){return{up:{x:O.up[0],y:O.up[1],z:O.up[2]},center:{x:O.center[0],y:O.center[1],z:O.center[2]},eye:{x:O.eye[0],y:O.eye[1],z:O.eye[2]},projection:{type:O._ortho===!0?"orthographic":"perspective"}}}C.getCamera=function(){var O=this;return O.camera.view.recalcMatrix(O.camera.view.lastT()),x(O.camera)},C.setViewport=function(O){var D=this,B=O.camera;D.camera.lookAt.apply(this,A(B)),D.glplot.setAspectratio(O.aspectratio);var F=B.projection.type==="orthographic",P=D.camera._ortho;F!==P&&(D.glplot.redraw(),D.glplot.clearRGBA(),D.glplot.dispose(),D.initializeGLPlot())},C.isCameraChanged=function(O){var D=this,B=D.getCamera(),F=t.nestedProperty(O,D.id+".camera"),P=F.get();function j(re,ne,se,V){var Z=["up","center","eye"],K=["x","y","z"];return ne[Z[se]]&&re[Z[se]][K[V]]===ne[Z[se]][K[V]]}var U=!1;if(P===void 0)U=!0;else{for(var $=0;$<3;$++)for(var Q=0;Q<3;Q++)if(!j(B,P,$,Q)){U=!0;break}(!P.projection||B.projection&&B.projection.type!==P.projection.type)&&(U=!0)}return U},C.isAspectChanged=function(O){var D=this,B=D.glplot.getAspectratio(),F=t.nestedProperty(O,D.id+".aspectratio"),P=F.get();return P===void 0||P.x!==B.x||P.y!==B.y||P.z!==B.z},C.saveLayout=function(O){var D=this,B=D.fullLayout,F,P,j,U,$,Q,re=D.isCameraChanged(O),ne=D.isAspectChanged(O),se=re||ne;if(se){var V={};if(re&&(F=D.getCamera(),P=t.nestedProperty(O,D.id+".camera"),j=P.get(),V[D.id+".camera"]=j),ne&&(U=D.glplot.getAspectratio(),$=t.nestedProperty(O,D.id+".aspectratio"),Q=$.get(),V[D.id+".aspectratio"]=Q),e.call("_storeDirectGUIEdit",O,B._preGUI,V),re){P.set(F);var Z=t.nestedProperty(B,D.id+".camera");Z.set(F)}if(ne){$.set(U);var K=t.nestedProperty(B,D.id+".aspectratio");K.set(U),D.glplot.redraw()}}return se},C.updateFx=function(O,D){var B=this,F=B.camera;if(F)if(O==="orbit")F.mode="orbit",F.keyBindingMode="rotate";else if(O==="turntable"){F.up=[0,0,1],F.mode="turntable",F.keyBindingMode="rotate";var P=B.graphDiv,j=P._fullLayout,U=B.fullSceneLayout.camera,$=U.up.x,Q=U.up.y,re=U.up.z;if(re/Math.sqrt($*$+Q*Q+re*re)<.999){var ne=B.id+".camera.up",se={x:0,y:0,z:1},V={};V[ne]=se;var Z=P.layout;e.call("_storeDirectGUIEdit",Z,j._preGUI,V),U.up=se,t.nestedProperty(Z,ne).set(se)}}else F.keyBindingMode=O;B.fullSceneLayout.hovermode=D};function z(O,D,B){for(var F=0,P=B-1;F0)for(var $=255/U,Q=0;Q<3;++Q)O[j+Q]=Math.min($*O[j+Q],255)}}C.toImage=function(O){var D=this;O||(O="png"),D.staticMode&&D.container.appendChild(i),D.glplot.redraw();var B=D.glplot.gl,F=B.drawingBufferWidth,P=B.drawingBufferHeight;B.bindFramebuffer(B.FRAMEBUFFER,null);var j=new Uint8Array(F*P*4);B.readPixels(0,0,F,P,B.RGBA,B.UNSIGNED_BYTE,j),z(j,F,P),I(j,F,P);var U=document.createElement("canvas");U.width=F,U.height=P;var $=U.getContext("2d",{willReadFrequently:!0}),Q=$.createImageData(F,P);Q.data.set(j),$.putImageData(Q,0,0);var re;switch(O){case"jpeg":re=U.toDataURL("image/jpeg");break;case"webp":re=U.toDataURL("image/webp");break;default:re=U.toDataURL("image/png")}return D.staticMode&&D.container.removeChild(i),re},C.setConvert=function(){for(var O=this,D=0;D<3;D++){var B=O.fullSceneLayout[w[D]];r.setConvert(B,O.fullLayout),B.setScale=t.noop}},C.make4thDimension=function(){var O=this,D=O.graphDiv,B=D._fullLayout;O._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},r.setConvert(O._mockAxis,B)},G.exports=M}}),ON=ze({"src/plots/gl3d/layout/attributes.js"(J,G){"use strict";G.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),yA=ze({"src/plots/gl3d/layout/axis_attributes.js"(J,G){"use strict";var p=Qn(),b=cf(),E=Ki().extendFlat,k=Al().overrideAll;G.exports=k({visible:b.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:p.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:b.color,categoryorder:b.categoryorder,categoryarray:b.categoryarray,title:{text:b.title.text,font:b.title.font},type:E({},b.type,{values:["-","linear","log","date","category"]}),autotypenumbers:b.autotypenumbers,autorange:b.autorange,autorangeoptions:{minallowed:b.autorangeoptions.minallowed,maxallowed:b.autorangeoptions.maxallowed,clipmin:b.autorangeoptions.clipmin,clipmax:b.autorangeoptions.clipmax,include:b.autorangeoptions.include,editType:"plot"},rangemode:b.rangemode,minallowed:b.minallowed,maxallowed:b.maxallowed,range:E({},b.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:b.minor.tickmode,nticks:b.nticks,tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,mirror:b.mirror,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,showticklabels:b.showticklabels,labelalias:b.labelalias,tickfont:b.tickfont,tickangle:b.tickangle,tickprefix:b.tickprefix,showtickprefix:b.showtickprefix,ticksuffix:b.ticksuffix,showticksuffix:b.showticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickformat:b.tickformat,tickformatstops:b.tickformatstops,hoverformat:b.hoverformat,showline:b.showline,linecolor:b.linecolor,linewidth:b.linewidth,showgrid:b.showgrid,gridcolor:E({},b.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:b.gridwidth,zeroline:b.zeroline,zerolinecolor:b.zerolinecolor,zerolinewidth:b.zerolinewidth},"plot","from-root")}}),_A=ze({"src/plots/gl3d/layout/layout_attributes.js"(J,G){"use strict";var p=yA(),b=Ml().attributes,E=Ki().extendFlat,k=Nr().counterRegex;function l(e,t,n){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:n,editType:"camera"},editType:"camera"}}G.exports={_arrayAttrRegexps:[k("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:E(l(0,0,1),{}),center:E(l(0,0,0),{}),eye:E(l(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:b({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:p,yaxis:p,zaxis:p,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot"}}}),NN=ze({"src/plots/gl3d/layout/axis_defaults.js"(J,G){"use strict";var p=Qn(),b=Nr(),E=hs(),k=yA(),l=E5(),e=yg(),t=["xaxis","yaxis","zaxis"],n=100*136/187;G.exports=function(a,o,s){var c,g;function f(i,T){return b.coerce(c,g,k,i,T)}for(var v=0;v1;function f(v){if(!g){var m=p.validate(o[v],e[v]);if(m)return o[v]}}k(o,s,c,{type:n,attributes:e,handleDefaults:r,fullLayout:s,font:s.font,fullData:c,getDfltFromLayout:f,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function r(a,o,s,c){for(var g=s("bgcolor"),f=b.combine(g,c.paper_bgcolor),v=["up","center","eye"],m=0;m.999)&&(C="turntable")}else C="turntable";s("dragmode",C),s("hovermode",c.getDfltFromLayout("hovermode"))}}}),xv=ze({"src/plots/gl3d/index.js"(J){"use strict";var G=Al().overrideAll,p=rv(),b=BN(),E=zf().getSubplotData,k=Nr(),l=nd(),e="gl3d",t="scene";J.name=e,J.attr=t,J.idRoot=t,J.idRegex=J.attrRegex=k.counterRegex("scene"),J.attributes=ON(),J.layoutAttributes=_A(),J.baseLayoutAttrOverrides=G({hoverlabel:p.hoverlabel},"plot","nested"),J.supplyLayoutDefaults=jN(),J.plot=function(r){for(var a=r._fullLayout,o=r._fullData,s=a._subplots[e],c=0;c0){z=c[I];break}return z}function m(A,x){if(!(A<1||x<1)){for(var z=f(A),I=f(x),O=1,D=0;DM;)I--,I/=v(I),I++,I1?O:1};function C(A,x,z){var I=z[8]+z[2]*x[0]+z[5]*x[1];return A[0]=(z[6]+z[0]*x[0]+z[3]*x[1])/I,A[1]=(z[7]+z[1]*x[0]+z[4]*x[1])/I,A}function _(A,x,z){return w(A,x,C,z),A}function w(A,x,z,I){for(var O=[0,0],D=A.shape[0],B=A.shape[1],F=0;F0&&this.contourStart[I]!==null&&this.contourEnd[I]!==null&&this.contourEnd[I]>this.contourStart[I]))for(x[I]=!0,O=this.contourStart[I];OQ&&(this.minValues[j]=Q),this.maxValues[j]c&&(n.isomin=null,n.isomax=null);var g=o("x"),f=o("y"),v=o("z"),m=o("value");if(!g||!g.length||!f||!f.length||!v||!v.length||!m||!m.length){n.visible=!1;return}var i=b.getComponentMethod("calendars","handleTraceDefaults");i(t,n,["x","y","z"],a),o("valuehoverformat"),["x","y","z"].forEach(function(C){o(C+"hoverformat");var _="caps."+C,w=o(_+".show");w&&o(_+".fill");var h="slices."+C,u=o(h+".show");u&&(o(h+".fill"),o(h+".locations"))});var T=o("spaceframe.show");T&&o("spaceframe.fill");var S=o("surface.show");S&&(o("surface.count"),o("surface.fill"),o("surface.pattern"));var M=o("contour.show");M&&(o("contour.color"),o("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(C){o(C)}),k(t,n,a,o,{prefix:"",cLetter:"c"}),n._length=null}G.exports={supplyDefaults:l,supplyIsoDefaults:e}}}),A2=ze({"src/traces/streamtube/calc.js"(J,G){"use strict";var p=Nr(),b=Qf();function E(t,n){n._len=Math.min(n.u.length,n.v.length,n.w.length,n.x.length,n.y.length,n.z.length),n._u=e(n.u,n._len),n._v=e(n.v,n._len),n._w=e(n.w,n._len),n._x=e(n.x,n._len),n._y=e(n.y,n._len),n._z=e(n.z,n._len);var r=k(n);n._gridFill=r.fill,n._Xs=r.Xs,n._Ys=r.Ys,n._Zs=r.Zs,n._len=r.len;var a=0,o,s,c;n.starts&&(o=e(n.starts.x||[]),s=e(n.starts.y||[]),c=e(n.starts.z||[]),a=Math.min(o.length,s.length,c.length)),n._startsX=o||[],n._startsY=s||[],n._startsZ=c||[];var g=0,f=1/0,v;for(v=0;v1&&(u=n[o-1],x=r[o-1],I=a[o-1]),s=0;su?"-":"+")+"x"),M=M.replace("y",(A>x?"-":"+")+"y"),M=M.replace("z",(z>I?"-":"+")+"z");var F=function(){o=0,O=[],D=[],B=[]};(!o||o0;f--){var v=Math.min(g[f],g[f-1]),m=Math.max(g[f],g[f-1]);if(m>v&&v-1}function ee(Ot,vt){return Ot===null?vt:Ot}function ae(Ot,vt,ht){re();var De=[vt],Ne=[ht];if(H>=1)De=[vt],Ne=[ht];else if(H>0){var We=q(vt,ht);De=We.xyzv,Ne=We.abc}for(var Ke=0;Ke-1?ht[et]:Q(Mt,pt,Pt);qt>-1?Je[et]=qt:Je[et]=se(Mt,pt,Pt,ee(Ot,Ct))}V(Je[0],Je[1],Je[2])}}function he(Ot,vt,ht){var De=function(Ne,We,Ke){ae(Ot,[vt[Ne],vt[We],vt[Ke]],[ht[Ne],ht[We],ht[Ke]])};De(0,1,2),De(2,3,0)}function xe(Ot,vt,ht){var De=function(Ne,We,Ke){ae(Ot,[vt[Ne],vt[We],vt[Ke]],[ht[Ne],ht[We],ht[Ke]])};De(0,1,2),De(3,0,1),De(2,3,0),De(1,2,3)}function we(Ot,vt,ht,De){var Ne=Ot[3];NeDe&&(Ne=De);for(var We=(Ot[3]-Ne)/(Ot[3]-vt[3]+1e-9),Ke=[],Je=0;Je<4;Je++)Ke[Je]=(1-We)*Ot[Je]+We*vt[Je];return Ke}function Me(Ot,vt,ht){return Ot>=vt&&Ot<=ht}function Se(Ot){var vt=.001*(F-B);return Ot>=B-vt&&Ot<=F+vt}function Ie(Ot){for(var vt=[],ht=0;ht<4;ht++){var De=Ot[ht];vt.push([c._x[De],c._y[De],c._z[De],c._value[De]])}return vt}var Ge=3;function qe(Ot,vt,ht,De,Ne,We){We||(We=1),ht=[-1,-1,-1];var Ke=!1,Je=[Me(vt[0][3],De,Ne),Me(vt[1][3],De,Ne),Me(vt[2][3],De,Ne)];if(!Je[0]&&!Je[1]&&!Je[2])return!1;var et=function(pt,Pt,Ct){return Se(Pt[0][3])&&Se(Pt[1][3])&&Se(Pt[2][3])?(ae(pt,Pt,Ct),!0):WeJe?[O,We]:[We,D];Tt(vt,et[0],et[1])}}var Mt=[[Math.min(B,D),Math.max(B,D)],[Math.min(O,F),Math.max(O,F)]];["x","y","z"].forEach(function(pt){for(var Pt=[],Ct=0;Ct0&&(Yt.push(ur.id),pt==="x"?Rt.push([ur.distRatio,0,0]):pt==="y"?Rt.push([0,ur.distRatio,0]):Rt.push([0,0,ur.distRatio]))}else pt==="x"?Kr=_r(1,u-1):pt==="y"?Kr=_r(1,A-1):Kr=_r(1,x-1);Yt.length>0&&(pt==="x"?Pt[qt]=At(Ot,Yt,Vt,Ht,Rt,Pt[qt]):pt==="y"?Pt[qt]=$t(Ot,Yt,Vt,Ht,Rt,Pt[qt]):Pt[qt]=rr(Ot,Yt,Vt,Ht,Rt,Pt[qt]),qt++),Kr.length>0&&(pt==="x"?Pt[qt]=Be(Ot,Kr,Vt,Ht,Pt[qt]):pt==="y"?Pt[qt]=Xe(Ot,Kr,Vt,Ht,Pt[qt]):Pt[qt]=Ye(Ot,Kr,Vt,Ht,Pt[qt]),qt++)}var cr=c.caps[pt];cr.show&&cr.fill&&(X(cr.fill),pt==="x"?Pt[qt]=Be(Ot,[0,u-1],Vt,Ht,Pt[qt]):pt==="y"?Pt[qt]=Xe(Ot,[0,A-1],Vt,Ht,Pt[qt]):Pt[qt]=Ye(Ot,[0,x-1],Vt,Ht,Pt[qt]),qt++)}}),S===0&&ne(),c._meshX=P,c._meshY=j,c._meshZ=U,c._meshIntensity=$,c._Xs=_,c._Ys=w,c._Zs=h}return or(),c}function s(c,g){var f=c.glplot.gl,v=p({gl:f}),m=new n(c,v,g.uid);return v._trace=m,m.update(g),c.glplot.add(v),m}G.exports={findNearestOnAxis:t,generateIsoMeshes:o,createIsosurfaceTrace:s}}}),YN=ze({"src/traces/isosurface/index.js"(J,G){"use strict";G.exports={attributes:T2(),supplyDefaults:bA().supplyDefaults,calc:wA(),colorbar:{min:"cmin",max:"cmax"},plot:M2().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),XN=ze({"lib/isosurface.js"(J,G){"use strict";G.exports=YN()}}),TA=ze({"src/traces/volume/attributes.js"(J,G){"use strict";var p=qs(),b=T2(),E=Kg(),k=ws(),l=Ki().extendFlat,e=Al().overrideAll,t=G.exports=e(l({x:b.x,y:b.y,z:b.z,value:b.value,isomin:b.isomin,isomax:b.isomax,surface:b.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:b.slices,caps:b.caps,text:b.text,hovertext:b.hovertext,xhoverformat:b.xhoverformat,yhoverformat:b.yhoverformat,zhoverformat:b.zhoverformat,valuehoverformat:b.valuehoverformat,hovertemplate:b.hovertemplate,hovertemplatefallback:b.hovertemplatefallback},p("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:b.colorbar,opacity:b.opacity,opacityscale:E.opacityscale,lightposition:b.lightposition,lighting:b.lighting,flatshading:b.flatshading,contour:b.contour,hoverinfo:l({},k.hoverinfo),showlegend:l({},k.showlegend,{dflt:!1})}),"calc","nested");t.x.editType=t.y.editType=t.z.editType=t.value.editType="calc+clearAxisTypes"}}),ZN=ze({"src/traces/volume/defaults.js"(J,G){"use strict";var p=Nr(),b=TA(),E=bA().supplyIsoDefaults,k=xA().opacityscaleDefaults;G.exports=function(e,t,n,r){function a(o,s){return p.coerce(e,t,b,o,s)}E(e,t,n,r,a),k(e,t,r,a)}}}),$N=ze({"src/traces/volume/convert.js"(J,G){"use strict";var p=df().gl_mesh3d,b=fp().parseColorScale,E=Nr().isArrayOrTypedArray,k=cp(),l=fl().extractOpts,e=m1(),t=M2().findNearestOnAxis,n=M2().generateIsoMeshes;function r(s,c,g){this.scene=s,this.uid=g,this.mesh=c,this.name="",this.data=null,this.showContour=!1}var a=r.prototype;a.handlePick=function(s){if(s.object===this.mesh){var c=s.data.index,g=this.data._meshX[c],f=this.data._meshY[c],v=this.data._meshZ[c],m=this.data._Ys.length,i=this.data._Zs.length,T=t(g,this.data._Xs).id,S=t(f,this.data._Ys).id,M=t(v,this.data._Zs).id,C=s.index=M+i*S+i*m*T;s.traceCoordinate=[this.data._meshX[C],this.data._meshY[C],this.data._meshZ[C],this.data._value[C]];var _=this.data.hovertext||this.data.text;return E(_)&&_[C]!==void 0?s.textLabel=_[C]:_&&(s.textLabel=_),!0}},a.update=function(s){var c=this.scene,g=c.fullSceneLayout;this.data=n(s);function f(S,M,C,_){return M.map(function(w){return S.d2l(w,0,_)*C})}var v=e(f(g.xaxis,s._meshX,c.dataScale[0],s.xcalendar),f(g.yaxis,s._meshY,c.dataScale[1],s.ycalendar),f(g.zaxis,s._meshZ,c.dataScale[2],s.zcalendar)),m=e(s._meshI,s._meshJ,s._meshK),i={positions:v,cells:m,lightPosition:[s.lightposition.x,s.lightposition.y,s.lightposition.z],ambient:s.lighting.ambient,diffuse:s.lighting.diffuse,specular:s.lighting.specular,roughness:s.lighting.roughness,fresnel:s.lighting.fresnel,vertexNormalsEpsilon:s.lighting.vertexnormalsepsilon,faceNormalsEpsilon:s.lighting.facenormalsepsilon,opacity:s.opacity,opacityscale:s.opacityscale,contourEnable:s.contour.show,contourColor:k(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},T=l(s);i.vertexIntensity=s._meshIntensity,i.vertexIntensityBounds=[T.min,T.max],i.colormap=b(s),this.mesh.update(i)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function o(s,c){var g=s.glplot.gl,f=p({gl:g}),v=new r(s,f,c.uid);return f._trace=v,v.update(c),s.glplot.add(f),v}G.exports=o}}),KN=ze({"src/traces/volume/index.js"(J,G){"use strict";G.exports={attributes:TA(),supplyDefaults:ZN(),calc:wA(),colorbar:{min:"cmin",max:"cmax"},plot:$N(),moduleType:"trace",name:"volume",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),JN=ze({"lib/volume.js"(J,G){"use strict";G.exports=KN()}}),QN=ze({"src/traces/mesh3d/defaults.js"(J,G){"use strict";var p=mi(),b=Nr(),E=qc(),k=v1();G.exports=function(e,t,n,r){function a(f,v){return b.coerce(e,t,k,f,v)}function o(f){var v=f.map(function(m){var i=a(m);return i&&b.isArrayOrTypedArray(i)?i:null});return v.every(function(m){return m&&m.length===v[0].length})&&v}var s=o(["x","y","z"]);if(!s){t.visible=!1;return}if(o(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j)){t.visible=!1;return}var c=p.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],r),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(f){a(f)});var g=a("contour.show");g&&(a("contour.color"),a("contour.width")),"intensity"in e?(a("intensity"),a("intensitymode"),E(e,t,r,a,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?a("facecolor"):"vertexcolor"in e?a("vertexcolor"):a("color",n)),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}}),ej=ze({"src/traces/mesh3d/calc.js"(J,G){"use strict";var p=Qf();G.exports=function(E,k){k.intensity&&p(E,k,{vals:k.intensity,containerStr:"",cLetter:"c"})}}}),tj=ze({"src/traces/mesh3d/convert.js"(J,G){"use strict";var p=df().gl_mesh3d,b=df().delaunay_triangulate,E=df().alpha_shape,k=df().convex_hull,l=fp().parseColorScale,e=Nr().isArrayOrTypedArray,t=cp(),n=fl().extractOpts,r=m1();function a(i,T,S){this.scene=i,this.uid=S,this.mesh=T,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var o=a.prototype;o.handlePick=function(i){if(i.object===this.mesh){var T=i.index=i.data.index;i.data._cellCenter?i.traceCoordinate=i.data.dataCoordinate:i.traceCoordinate=[this.data.x[T],this.data.y[T],this.data.z[T]];var S=this.data.hovertext||this.data.text;return e(S)&&S[T]!==void 0?i.textLabel=S[T]:S&&(i.textLabel=S),!0}};function s(i){for(var T=[],S=i.length,M=0;M=T-.5)return!1;return!0}o.update=function(i){var T=this.scene,S=T.fullSceneLayout;this.data=i;var M=i.x.length,C=r(c(S.xaxis,i.x,T.dataScale[0],i.xcalendar),c(S.yaxis,i.y,T.dataScale[1],i.ycalendar),c(S.zaxis,i.z,T.dataScale[2],i.zcalendar)),_;if(i.i&&i.j&&i.k){if(i.i.length!==i.j.length||i.j.length!==i.k.length||!v(i.i,M)||!v(i.j,M)||!v(i.k,M))return;_=r(g(i.i),g(i.j),g(i.k))}else i.alphahull===0?_=k(C):i.alphahull>0?_=E(i.alphahull,C):_=f(i.delaunayaxis,C);var w={positions:C,cells:_,lightPosition:[i.lightposition.x,i.lightposition.y,i.lightposition.z],ambient:i.lighting.ambient,diffuse:i.lighting.diffuse,specular:i.lighting.specular,roughness:i.lighting.roughness,fresnel:i.lighting.fresnel,vertexNormalsEpsilon:i.lighting.vertexnormalsepsilon,faceNormalsEpsilon:i.lighting.facenormalsepsilon,opacity:i.opacity,contourEnable:i.contour.show,contourColor:t(i.contour.color).slice(0,3),contourWidth:i.contour.width,useFacetNormals:i.flatshading};if(i.intensity){var h=n(i);this.color="#fff";var u=i.intensitymode;w[u+"Intensity"]=i.intensity,w[u+"IntensityBounds"]=[h.min,h.max],w.colormap=l(i)}else i.vertexcolor?(this.color=i.vertexcolor[0],w.vertexColors=s(i.vertexcolor)):i.facecolor?(this.color=i.facecolor[0],w.cellColors=s(i.facecolor)):(this.color=i.color,w.meshColor=t(i.color));this.mesh.update(w)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function m(i,T){var S=i.glplot.gl,M=p({gl:S}),C=new a(i,M,T.uid);return M._trace=C,C.update(T),i.glplot.add(M),C}G.exports=m}}),rj=ze({"src/traces/mesh3d/index.js"(J,G){"use strict";G.exports={attributes:v1(),supplyDefaults:QN(),calc:ej(),colorbar:{min:"cmin",max:"cmax"},plot:tj(),moduleType:"trace",name:"mesh3d",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),aj=ze({"lib/mesh3d.js"(J,G){"use strict";G.exports=rj()}}),AA=ze({"src/traces/cone/attributes.js"(J,G){"use strict";var p=qs(),b=Il().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:k}=xs(),l=v1(),e=ws(),t=Ki().extendFlat,n={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:E({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:k({editType:"calc"}),uhoverformat:b("u",1),vhoverformat:b("v",1),whoverformat:b("w",1),xhoverformat:b("x"),yhoverformat:b("y"),zhoverformat:b("z"),showlegend:t({},e.showlegend,{dflt:!1})};t(n,p("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(a){n[a]=l[a]}),n.hoverinfo=t({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),G.exports=n}}),nj=ze({"src/traces/cone/defaults.js"(J,G){"use strict";var p=Nr(),b=qc(),E=AA();G.exports=function(l,e,t,n){function r(m,i){return p.coerce(l,e,E,m,i)}var a=r("u"),o=r("v"),s=r("w"),c=r("x"),g=r("y"),f=r("z");if(!a||!a.length||!o||!o.length||!s||!s.length||!c||!c.length||!g||!g.length||!f||!f.length){e.visible=!1;return}var v=r("sizemode");r("sizeref",v==="raw"?1:.5),r("anchor"),r("lighting.ambient"),r("lighting.diffuse"),r("lighting.specular"),r("lighting.roughness"),r("lighting.fresnel"),r("lightposition.x"),r("lightposition.y"),r("lightposition.z"),b(l,e,n,r,{prefix:"",cLetter:"c"}),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),r("uhoverformat"),r("vhoverformat"),r("whoverformat"),r("xhoverformat"),r("yhoverformat"),r("zhoverformat"),e._length=null}}}),ij=ze({"src/traces/cone/calc.js"(J,G){"use strict";var p=Qf();G.exports=function(E,k){for(var l=k.u,e=k.v,t=k.w,n=Math.min(k.x.length,k.y.length,k.z.length,l.length,e.length,t.length),r=-1/0,a=1/0,o=0;o2?v=g.slice(1,f-1):f===2?v=[(g[0]+g[1])/2]:v=g,v}function o(g){var f=g.length;return f===1?[.5,.5]:[g[1]-g[0],g[f-1]-g[f-2]]}function s(g,f){var v=g.fullSceneLayout,m=g.dataScale,i=f._len,T={};function S(se,V){var Z=v[V],K=m[t[V]];return E.simpleMap(se,function(H){return Z.d2l(H)*K})}if(T.vectors=e(S(f._u,"xaxis"),S(f._v,"yaxis"),S(f._w,"zaxis"),i),!i)return{positions:[],cells:[]};var M=S(f._Xs,"xaxis"),C=S(f._Ys,"yaxis"),_=S(f._Zs,"zaxis");T.meshgrid=[M,C,_],T.gridFill=f._gridFill;var w=f._slen;if(w)T.startingPositions=e(S(f._startsX,"xaxis"),S(f._startsY,"yaxis"),S(f._startsZ,"zaxis"));else{for(var h=C[0],u=a(M),A=a(_),x=new Array(u.length*A.length),z=0,I=0;Ih&&(h=z[0]),z[1]u&&(u=z[1])}function x(z){switch(z.type){case"GeometryCollection":z.geometries.forEach(x);break;case"Point":A(z.coordinates);break;case"MultiPoint":z.coordinates.forEach(A);break}}S.arcs.forEach(function(z){for(var I=-1,O=z.length,D;++Ih&&(h=D[0]),D[1]u&&(u=D[1])});for(C in S.objects)x(S.objects[C]);return[_,w,h,u]}function l(S,M){for(var C,_=S.length,w=_-M;w<--_;)C=S[w],S[w++]=S[_],S[_]=C}function e(S,M){return typeof M=="string"&&(M=S.objects[M]),M.type==="GeometryCollection"?{type:"FeatureCollection",features:M.geometries.map(function(C){return t(S,C)})}:t(S,M)}function t(S,M){var C=M.id,_=M.bbox,w=M.properties==null?{}:M.properties,h=n(S,M);return C==null&&_==null?{type:"Feature",properties:w,geometry:h}:_==null?{type:"Feature",id:C,properties:w,geometry:h}:{type:"Feature",id:C,bbox:_,properties:w,geometry:h}}function n(S,M){var C=E(S.transform),_=S.arcs;function w(I,O){O.length&&O.pop();for(var D=_[I<0?~I:I],B=0,F=D.length;B1)_=s(S,M,C);else for(w=0,_=new Array(h=S.arcs.length);w1)for(var O=1,D=A(z[0]),B,F;OD&&(F=z[0],z[0]=z[O],z[O]=F,D=B);return z}).filter(function(x){return x.length>0})}}function v(S,M){for(var C=0,_=S.length;C<_;){var w=C+_>>>1;S[w]=2))throw new Error("n must be \u22652");x=S.bbox||k(S);var C=x[0],_=x[1],w=x[2],h=x[3],u;M={scale:[w-C?(w-C)/(u-1):1,h-_?(h-_)/(u-1):1],translate:[C,_]}}else x=S.bbox;var A=i(M),x,z,I=S.objects,O={};function D(P){return A(P)}function B(P){var j;switch(P.type){case"GeometryCollection":j={type:"GeometryCollection",geometries:P.geometries.map(B)};break;case"Point":j={type:"Point",coordinates:D(P.coordinates)};break;case"MultiPoint":j={type:"MultiPoint",coordinates:P.coordinates.map(D)};break;default:return P}return P.id!=null&&(j.id=P.id),P.bbox!=null&&(j.bbox=P.bbox),P.properties!=null&&(j.properties=P.properties),j}function F(P){var j=0,U=1,$=P.length,Q,re=new Array($);for(re[0]=A(P[0],0);++j<$;)((Q=A(P[j],j))[0]||Q[1])&&(re[U++]=Q);return U===1&&(re[U++]=[0,0]),re.length=U,re}for(z in I)O[z]=B(I[z]);return{type:"Topology",bbox:x,transform:M,objects:O,arcs:S.arcs.map(F)}}p.bbox=k,p.feature=e,p.merge=g,p.mergeArcs=f,p.mesh=a,p.meshArcs=o,p.neighbors=m,p.quantize=T,p.transform=E,p.untransform=i,Object.defineProperty(p,"__esModule",{value:!0})})}}),S2=ze({"src/lib/topojson_utils.js"(J,G){"use strict";var p=G.exports={},b=Jg().locationmodeToLayer,E=EA().feature;p.getTopojsonName=function(k){return[k.scope.replace(/ /g,"-"),"_",k.resolution.toString(),"m"].join("")},p.getTopojsonPath=function(k,l){return k+=k.endsWith("/")?"":"/",`${k}${l}.json`},p.getTopojsonFeatures=function(k,l){var e=b[k.locationmode],t=l.objects[e];return E(l,t).features}}}),Qg=ze({"src/lib/geojson_utils.js"(J){"use strict";var G=No().BADNUM;J.calcTraceToLineCoords=function(p){for(var b=p[0].trace,E=b.connectgaps,k=[],l=[],e=0;e0&&(k.push(l),l=[])}return l.length>0&&k.push(l),k},J.makeLine=function(p){return p.length===1?{type:"LineString",coordinates:p[0]}:{type:"MultiLineString",coordinates:p}},J.makePolygon=function(p){if(p.length===1)return{type:"Polygon",coordinates:p};for(var b=new Array(p.length),E=0;E{for(var S in T)p(i,S,{get:T[S],enumerable:!0})},e=(i,T,S,M)=>{if(T&&typeof T=="object"||typeof T=="function")for(let C of E(T))!k.call(i,C)&&C!==S&&p(i,C,{get:()=>T[C],enumerable:!(M=b(T,C))||M.enumerable});return i},t=i=>e(p({},"__esModule",{value:!0}),i),n={};l(n,{COUNTRIES:()=>r,byAlpha2:()=>v,byAlpha3:()=>f,byM49:()=>m,createLookup:()=>o,lookup:()=>c,lookupAlpha3:()=>g,sanitize:()=>a}),G.exports=t(n);var r=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","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 a(i){return i.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 o(i){let T=new Map,S=new Map,M=new Map;for(let h of i)T.set(h.iso3,h),h.iso2&&S.set(h.iso2,h),h.m49&&M.set(h.m49,h);let C=new Map;for(let h of i)for(let u of[h.name,...h.aliases]){let A=a(u),x=C.get(A);if(x!==void 0&&x!==h.iso3)throw new Error(`Duplicate name/alias "${A}": ${x} vs ${h.iso3}`);C.set(A,h.iso3)}function _(h){if(h==null)return;let u=String(h).trim();if(!u)return;if(/^\d+$/.test(u)){let x=M.get(String(parseInt(u,10)).padStart(3,"0"));if(x)return x}if(/^[A-Za-z]{2}$/.test(u)){let x=S.get(u.toUpperCase());if(x)return x}if(/^[A-Za-z]{3}$/.test(u)){let x=T.get(u.toUpperCase());if(x)return x}let A=C.get(a(u));return A===void 0?void 0:T.get(A)}function w(h){var u;return(u=_(h))==null?void 0:u.iso3}return{lookup:_,lookupAlpha3:w,byAlpha3:T,byAlpha2:S,byM49:M}}var s=o(r),c=s.lookup,g=s.lookupAlpha3,f=s.byAlpha3,v=s.byAlpha2,m=s.byM49}}),E2=ze({"node_modules/@turf/helpers/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var G=63710088e-1,p={centimeters:G*100,centimetres:G*100,degrees:360/(2*Math.PI),feet:G*3.28084,inches:G*39.37,kilometers:G/1e3,kilometres:G/1e3,meters:G,metres:G,miles:G/1609.344,millimeters:G*1e3,millimetres:G*1e3,nauticalmiles:G/1852,radians:1,yards:G*1.0936},b={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function E(I,O,D={}){let B={type:"Feature"};return(D.id===0||D.id)&&(B.id=D.id),D.bbox&&(B.bbox=D.bbox),B.properties=O||{},B.geometry=I,B}function k(I,O,D={}){switch(I){case"Point":return l(O).geometry;case"LineString":return r(O).geometry;case"Polygon":return t(O).geometry;case"MultiPoint":return c(O).geometry;case"MultiLineString":return s(O).geometry;case"MultiPolygon":return g(O).geometry;default:throw new Error(I+" is invalid")}}function l(I,O,D={}){if(!I)throw new Error("coordinates is required");if(!Array.isArray(I))throw new Error("coordinates must be an Array");if(I.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!u(I[0])||!u(I[1]))throw new Error("coordinates must contain numbers");return E({type:"Point",coordinates:I},O,D)}function e(I,O,D={}){return o(I.map(B=>l(B,O)),D)}function t(I,O,D={}){for(let F of I){if(F.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(F[F.length-1].length!==F[0].length)throw new Error("First and last Position are not equivalent.");for(let P=0;Pt(B,O)),D)}function r(I,O,D={}){if(I.length<2)throw new Error("coordinates must be an array of two or more positions");return E({type:"LineString",coordinates:I},O,D)}function a(I,O,D={}){return o(I.map(B=>r(B,O)),D)}function o(I,O={}){let D={type:"FeatureCollection"};return O.id&&(D.id=O.id),O.bbox&&(D.bbox=O.bbox),D.features=I,D}function s(I,O,D={}){return E({type:"MultiLineString",coordinates:I},O,D)}function c(I,O,D={}){return E({type:"MultiPoint",coordinates:I},O,D)}function g(I,O,D={}){return E({type:"MultiPolygon",coordinates:I},O,D)}function f(I,O,D={}){return E({type:"GeometryCollection",geometries:I},O,D)}function v(I,O=0){if(O&&!(O>=0))throw new Error("precision must be a positive number");let D=Math.pow(10,O||0);return Math.round(I*D)/D}function m(I,O="kilometers"){let D=p[O];if(!D)throw new Error(O+" units is invalid");return I*D}function i(I,O="kilometers"){let D=p[O];if(!D)throw new Error(O+" units is invalid");return I/D}function T(I,O){return C(i(I,O))}function S(I){let O=I%360;return O<0&&(O+=360),O}function M(I){return I=I%360,I>180?I-360:I<-180?I+360:I}function C(I){return I%(2*Math.PI)*180/Math.PI}function _(I){return I%360*Math.PI/180}function w(I,O="kilometers",D="kilometers"){if(!(I>=0))throw new Error("length must be a positive number");return m(i(I,O),D)}function h(I,O="meters",D="kilometers"){if(!(I>=0))throw new Error("area must be a positive number");let B=b[O];if(!B)throw new Error("invalid original units");let F=b[D];if(!F)throw new Error("invalid final units");return I/B*F}function u(I){return!isNaN(I)&&I!==null&&!Array.isArray(I)}function A(I){return I!==null&&typeof I=="object"&&!Array.isArray(I)}function x(I){if(!I)throw new Error("bbox is required");if(!Array.isArray(I))throw new Error("bbox must be an Array");if(I.length!==4&&I.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");I.forEach(O=>{if(!u(O))throw new Error("bbox must only contain numbers")})}function z(I){if(!I)throw new Error("id is required");if(["string","number"].indexOf(typeof I)===-1)throw new Error("id must be a number or a string")}J.areaFactors=b,J.azimuthToBearing=M,J.bearingToAzimuth=S,J.convertArea=h,J.convertLength=w,J.degreesToRadians=_,J.earthRadius=G,J.factors=p,J.feature=E,J.featureCollection=o,J.geometry=k,J.geometryCollection=f,J.isNumber=u,J.isObject=A,J.lengthToDegrees=T,J.lengthToRadians=i,J.lineString=r,J.lineStrings=a,J.multiLineString=s,J.multiPoint=c,J.multiPolygon=g,J.point=l,J.points=e,J.polygon=t,J.polygons=n,J.radiansToDegrees=C,J.radiansToLength=m,J.round=v,J.validateBBox=x,J.validateId=z}}),k2=ze({"node_modules/@turf/meta/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var G=E2();function p(i,T,S){if(i!==null)for(var M,C,_,w,h,u,A,x=0,z=0,I,O=i.type,D=O==="FeatureCollection",B=O==="Feature",F=D?i.features.length:1,P=0;Pu||D>A||B>x){h=z,u=M,A=D,x=B,_=0;return}var F=G.lineString.call(void 0,[h,z],S.properties);if(T(F,M,C,B,_)===!1)return!1;_++,h=z})===!1)return!1}}})}function c(i,T,S){var M=S,C=!1;return s(i,function(_,w,h,u,A){C===!1&&S===void 0?M=_:M=T(M,_,w,h,u,A),C=!0}),M}function g(i,T){if(!i)throw new Error("geojson is required");a(i,function(S,M,C){if(S.geometry!==null){var _=S.geometry.type,w=S.geometry.coordinates;switch(_){case"LineString":if(T(S,M,C,0,0)===!1)return!1;break;case"Polygon":for(var h=0;ha+E(o),0)}function E(r){let a=0,o;switch(r.type){case"Polygon":return k(r.coordinates);case"MultiPolygon":for(o=0;o0){a+=Math.abs(t(r[0]));for(let o=1;o=a?(s+2)%a:s+2],v=c[0]*e,m=g[1]*e,i=f[0]*e;o+=(i-v)*Math.sin(m),s++}return o*l}var n=b;J.area=b,J.default=n}}),gj=ze({"node_modules/@turf/centroid/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var G=E2(),p=k2();function b(k,l={}){let e=0,t=0,n=0;return p.coordEach.call(void 0,k,function(r){e+=r[0],t+=r[1],n++},!0),G.point.call(void 0,[e/n,t/n],l.properties)}var E=b;J.centroid=b,J.default=E}}),yj=ze({"node_modules/d3-geo/node_modules/d3-array/dist/d3-array.js"(J,G){(function(p,b){b(typeof J=="object"&&typeof G<"u"?J:p.d3=p.d3||{})})(J,function(p){"use strict";function b(K,H){return KH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,X,q,W){for(q==null&&(q=0),W==null&&(W=H.length);q>>1;K(H[ee],X)<0?q=ee+1:W=ee}return q},right:function(H,X,q,W){for(q==null&&(q=0),W==null&&(W=H.length);q>>1;K(H[ee],X)>0?W=ee:q=ee+1}return q}}}function k(K){return function(H,X){return b(K(H),X)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var X=0,q=K.length-1,W=K[0],ee=new Array(q<0?0:q);XK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var X=K.length,q=0,W=-1,ee=0,ae,he,xe=0;if(H==null)for(;++W1)return xe/(q-1)}function g(K,H){var X=c(K,H);return X&&Math.sqrt(X)}function f(K,H){var X=K.length,q=-1,W,ee,ae;if(H==null){for(;++q=W)for(ee=ae=W;++qW&&(ee=W),ae=W)for(ee=ae=W;++qW&&(ee=W),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++W=0?(ee>=C?10:ee>=_?5:ee>=w?2:1)*Math.pow(10,W):-Math.pow(10,-W)/(ee>=C?10:ee>=_?5:ee>=w?2:1)}function A(K,H,X){var q=Math.abs(H-K)/Math.max(0,X),W=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/W;return ee>=C?W*=10:ee>=_?W*=5:ee>=w&&(W*=2),HSe;)Ie.pop(),--Ge;var qe=new Array(Ge+1),ke;for(ee=0;ee<=Ge;++ee)ke=qe[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+X(K[q-1],q-1,K);var q,W=(q-1)*H,ee=Math.floor(W),ae=+X(K[ee],ee,K),he=+X(K[ee+1],ee+1,K);return ae+(he-ae)*(W-ee)}}function O(K,H,X){return K=i.call(K,s).sort(b),Math.ceil((X-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,X){return Math.ceil((X-H)/(3.5*g(K)*Math.pow(K.length,-1/3)))}function B(K,H){var X=K.length,q=-1,W,ee;if(H==null){for(;++q=W)for(ee=W;++qee&&(ee=W)}else for(;++q=W)for(ee=W;++qee&&(ee=W);return ee}function F(K,H){var X=K.length,q=X,W=-1,ee,ae=0;if(H==null)for(;++W=0;)for(ae=K[H],X=ae.length;--X>=0;)ee[--W]=ae[X];return ee}function U(K,H){var X=K.length,q=-1,W,ee;if(H==null){for(;++q=W)for(ee=W;++qW&&(ee=W)}else for(;++q=W)for(ee=W;++qW&&(ee=W);return ee}function $(K,H){for(var X=H.length,q=new Array(X);X--;)q[X]=K[H[X]];return q}function Q(K,H){if(X=K.length){var X,q=0,W=0,ee,ae=K[W];for(H==null&&(H=b);++q0?1:Ft<0?-1:0},h=Math.sqrt,u=Math.tan;function A(Ft){return Ft>1?0:Ft<-1?r:Math.acos(Ft)}function x(Ft){return Ft>1?a:Ft<-1?-a:Math.asin(Ft)}function z(Ft){return(Ft=_(Ft/2))*Ft}function I(){}function O(Ft,tr){Ft&&B.hasOwnProperty(Ft.type)&&B[Ft.type](Ft,tr)}var D={Feature:function(Ft,tr){O(Ft.geometry,tr)},FeatureCollection:function(Ft,tr){for(var Fr=Ft.features,wr=-1,ea=Fr.length;++wr=0?1:-1,ea=wr*Fr,ba=i(tr),Ia=_(tr),Na=V*Ia,Za=se*ba+Na*i(ea),mn=Na*wr*_(ea);U.add(m(mn,Za)),ne=Ft,se=ba,V=Ia}function W(Ft){return $.reset(),j(Ft,Z),$*2}function ee(Ft){return[m(Ft[1],Ft[0]),x(Ft[2])]}function ae(Ft){var tr=Ft[0],Fr=Ft[1],wr=i(Fr);return[wr*i(tr),wr*_(tr),_(Fr)]}function he(Ft,tr){return Ft[0]*tr[0]+Ft[1]*tr[1]+Ft[2]*tr[2]}function xe(Ft,tr){return[Ft[1]*tr[2]-Ft[2]*tr[1],Ft[2]*tr[0]-Ft[0]*tr[2],Ft[0]*tr[1]-Ft[1]*tr[0]]}function we(Ft,tr){Ft[0]+=tr[0],Ft[1]+=tr[1],Ft[2]+=tr[2]}function Me(Ft,tr){return[Ft[0]*tr,Ft[1]*tr,Ft[2]*tr]}function Se(Ft){var tr=h(Ft[0]*Ft[0]+Ft[1]*Ft[1]+Ft[2]*Ft[2]);Ft[0]/=tr,Ft[1]/=tr,Ft[2]/=tr}var Ie,Ge,qe,ke,_e,ue,ve,le,Ae=E(),Be,Xe,Ye={point:yt,lineStart:Tt,lineEnd:At,polygonStart:function(){Ye.point=$t,Ye.lineStart=rr,Ye.lineEnd=_r,Ae.reset(),Z.polygonStart()},polygonEnd:function(){Z.polygonEnd(),Ye.point=yt,Ye.lineStart=Tt,Ye.lineEnd=At,U<0?(Ie=-(qe=180),Ge=-(ke=90)):Ae>t?ke=90:Ae<-t&&(Ge=-90),Xe[0]=Ie,Xe[1]=qe},sphere:function(){Ie=-(qe=180),Ge=-(ke=90)}};function yt(Ft,tr){Be.push(Xe=[Ie=Ft,qe=Ft]),trke&&(ke=tr)}function gt(Ft,tr){var Fr=ae([Ft*g,tr*g]);if(le){var wr=xe(le,Fr),ea=[wr[1],-wr[0],0],ba=xe(ea,wr);Se(ba),ba=ee(ba);var Ia=Ft-_e,Na=Ia>0?1:-1,Za=ba[0]*c*Na,mn,Da=f(Ia)>180;Da^(Na*_eke&&(ke=mn)):(Za=(Za+360)%360-180,Da^(Na*_eke&&(ke=tr))),Da?Ft<_e?Xt(Ie,Ft)>Xt(Ie,qe)&&(qe=Ft):Xt(Ft,qe)>Xt(Ie,qe)&&(Ie=Ft):qe>=Ie?(Ftqe&&(qe=Ft)):Ft>_e?Xt(Ie,Ft)>Xt(Ie,qe)&&(qe=Ft):Xt(Ft,qe)>Xt(Ie,qe)&&(Ie=Ft)}else Be.push(Xe=[Ie=Ft,qe=Ft]);trke&&(ke=tr),le=Fr,_e=Ft}function Tt(){Ye.point=gt}function At(){Xe[0]=Ie,Xe[1]=qe,Ye.point=yt,le=null}function $t(Ft,tr){if(le){var Fr=Ft-_e;Ae.add(f(Fr)>180?Fr+(Fr>0?360:-360):Fr)}else ue=Ft,ve=tr;Z.point(Ft,tr),gt(Ft,tr)}function rr(){Z.lineStart()}function _r(){$t(ue,ve),Z.lineEnd(),f(Ae)>t&&(Ie=-(qe=180)),Xe[0]=Ie,Xe[1]=qe,le=null}function Xt(Ft,tr){return(tr-=Ft)<0?tr+360:tr}function or(Ft,tr){return Ft[0]-tr[0]}function Ot(Ft,tr){return Ft[0]<=Ft[1]?Ft[0]<=tr&&tr<=Ft[1]:trXt(wr[0],wr[1])&&(wr[1]=ea[1]),Xt(ea[0],wr[1])>Xt(wr[0],wr[1])&&(wr[0]=ea[0])):ba.push(wr=ea);for(Ia=-1/0,Fr=ba.length-1,tr=0,wr=ba[Fr];tr<=Fr;wr=ea,++tr)ea=ba[tr],(Na=Xt(wr[1],ea[0]))>Ia&&(Ia=Na,Ie=ea[0],qe=wr[1])}return Be=Xe=null,Ie===1/0||Ge===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ie,Ge],[qe,ke]]}var ht,De,Ne,We,Ke,Je,et,Mt,pt,Pt,Ct,qt,Vt,Ht,Sr,Kr,Yt={sphere:I,point:Rt,lineStart:ur,lineEnd:Qr,polygonStart:function(){Yt.lineStart=Zr,Yt.lineEnd=ha},polygonEnd:function(){Yt.lineStart=ur,Yt.lineEnd=Qr}};function Rt(Ft,tr){Ft*=g,tr*=g;var Fr=i(tr);nr(Fr*i(Ft),Fr*_(Ft),_(tr))}function nr(Ft,tr,Fr){++ht,Ne+=(Ft-Ne)/ht,We+=(tr-We)/ht,Ke+=(Fr-Ke)/ht}function ur(){Yt.point=cr}function cr(Ft,tr){Ft*=g,tr*=g;var Fr=i(tr);Ht=Fr*i(Ft),Sr=Fr*_(Ft),Kr=_(tr),Yt.point=Rr,nr(Ht,Sr,Kr)}function Rr(Ft,tr){Ft*=g,tr*=g;var Fr=i(tr),wr=Fr*i(Ft),ea=Fr*_(Ft),ba=_(tr),Ia=m(h((Ia=Sr*ba-Kr*ea)*Ia+(Ia=Kr*wr-Ht*ba)*Ia+(Ia=Ht*ea-Sr*wr)*Ia),Ht*wr+Sr*ea+Kr*ba);De+=Ia,Je+=Ia*(Ht+(Ht=wr)),et+=Ia*(Sr+(Sr=ea)),Mt+=Ia*(Kr+(Kr=ba)),nr(Ht,Sr,Kr)}function Qr(){Yt.point=Rt}function Zr(){Yt.point=Pa}function ha(){La(qt,Vt),Yt.point=Rt}function Pa(Ft,tr){qt=Ft,Vt=tr,Ft*=g,tr*=g,Yt.point=La;var Fr=i(tr);Ht=Fr*i(Ft),Sr=Fr*_(Ft),Kr=_(tr),nr(Ht,Sr,Kr)}function La(Ft,tr){Ft*=g,tr*=g;var Fr=i(tr),wr=Fr*i(Ft),ea=Fr*_(Ft),ba=_(tr),Ia=Sr*ba-Kr*ea,Na=Kr*wr-Ht*ba,Za=Ht*ea-Sr*wr,mn=h(Ia*Ia+Na*Na+Za*Za),Da=x(mn),Ha=mn&&-Da/mn;pt+=Ha*Ia,Pt+=Ha*Na,Ct+=Ha*Za,De+=Da,Je+=Da*(Ht+(Ht=wr)),et+=Da*(Sr+(Sr=ea)),Mt+=Da*(Kr+(Kr=ba)),nr(Ht,Sr,Kr)}function un(Ft){ht=De=Ne=We=Ke=Je=et=Mt=pt=Pt=Ct=0,j(Ft,Yt);var tr=pt,Fr=Pt,wr=Ct,ea=tr*tr+Fr*Fr+wr*wr;return ear?Ft+Math.round(-Ft/s)*s:Ft,tr]}Nn.invert=Nn;function yn(Ft,tr,Fr){return(Ft%=s)?tr||Fr?ja(li(Ft),Yn(tr,Fr)):li(Ft):tr||Fr?Yn(tr,Fr):Nn}function Un(Ft){return function(tr,Fr){return tr+=Ft,[tr>r?tr-s:tr<-r?tr+s:tr,Fr]}}function li(Ft){var tr=Un(Ft);return tr.invert=Un(-Ft),tr}function Yn(Ft,tr){var Fr=i(Ft),wr=_(Ft),ea=i(tr),ba=_(tr);function Ia(Na,Za){var mn=i(Za),Da=i(Na)*mn,Ha=_(Na)*mn,$a=_(Za),vn=$a*Fr+Da*wr;return[m(Ha*ea-vn*ba,Da*Fr-$a*wr),x(vn*ea+Ha*ba)]}return Ia.invert=function(Na,Za){var mn=i(Za),Da=i(Na)*mn,Ha=_(Na)*mn,$a=_(Za),vn=$a*ea-Ha*ba;return[m(Ha*ea+$a*ba,Da*Fr+vn*wr),x(vn*Fr-Da*wr)]},Ia}function on(Ft){Ft=yn(Ft[0]*g,Ft[1]*g,Ft.length>2?Ft[2]*g:0);function tr(Fr){return Fr=Ft(Fr[0]*g,Fr[1]*g),Fr[0]*=c,Fr[1]*=c,Fr}return tr.invert=function(Fr){return Fr=Ft.invert(Fr[0]*g,Fr[1]*g),Fr[0]*=c,Fr[1]*=c,Fr},tr}function en(Ft,tr,Fr,wr,ea,ba){if(Fr){var Ia=i(tr),Na=_(tr),Za=wr*Fr;ea==null?(ea=tr+wr*s,ba=tr-Za/2):(ea=vi(Ia,ea),ba=vi(Ia,ba),(wr>0?eaba)&&(ea+=wr*s));for(var mn,Da=ea;wr>0?Da>ba:Da1&&Ft.push(Ft.pop().concat(Ft.shift()))},result:function(){var Fr=Ft;return Ft=[],tr=null,Fr}}}function Oa(Ft,tr){return f(Ft[0]-tr[0])=0;--Na)ea.point((Ha=Da[Na])[0],Ha[1]);else wr($a.x,$a.p.x,-1,ea);$a=$a.p}$a=$a.o,Da=$a.z,vn=!vn}while(!$a.v);ea.lineEnd()}}}function fr(Ft){if(tr=Ft.length){for(var tr,Fr=0,wr=Ft[0],ea;++Fr=0?1:-1,Fo=Do*Co,Yo=Fo>r,bo=yi*Ni;if(lr.add(m(bo*Do*_(Fo),_i*$i+bo*i(Fo))),Ia+=Yo?Co+Do*s:Co,Yo^vn>=Fr^En>=Fr){var Gs=xe(ae($a),ae(ri));Se(Gs);var Es=xe(ba,Gs);Se(Es);var ns=(Yo^Co>=0?-1:1)*x(Es[2]);(wr>ns||wr===ns&&(Gs[0]||Gs[1]))&&(Na+=Yo^Co>=0?1:-1)}}return(Ia<-t||Ia0){for(Za||(ea.polygonStart(),Za=!0),ea.lineStart(),$i=0;$i1&&Ln&2&&Ni.push(Ni.pop().concat(Ni.shift())),Da.push(Ni.filter(ot))}}return $a}}function ot(Ft){return Ft.length>1}function kt(Ft,tr){return((Ft=Ft.x)[0]<0?Ft[1]-a-t:a-Ft[1])-((tr=tr.x)[0]<0?tr[1]-a-t:a-tr[1])}var jt=Dr(function(){return!0},ar,xr,[-r,-a]);function ar(Ft){var tr=NaN,Fr=NaN,wr=NaN,ea;return{lineStart:function(){Ft.lineStart(),ea=1},point:function(ba,Ia){var Na=ba>0?r:-r,Za=f(ba-tr);f(Za-r)0?a:-a),Ft.point(wr,Fr),Ft.lineEnd(),Ft.lineStart(),Ft.point(Na,Fr),Ft.point(ba,Fr),ea=0):wr!==Na&&Za>=r&&(f(tr-wr)t?v((_(tr)*(ba=i(wr))*_(Fr)-_(wr)*(ea=i(tr))*_(Ft))/(ea*ba*Ia)):(tr+wr)/2}function xr(Ft,tr,Fr,wr){var ea;if(Ft==null)ea=Fr*a,wr.point(-r,ea),wr.point(0,ea),wr.point(r,ea),wr.point(r,0),wr.point(r,-ea),wr.point(0,-ea),wr.point(-r,-ea),wr.point(-r,0),wr.point(-r,ea);else if(f(Ft[0]-tr[0])>t){var ba=Ft[0]0,ea=f(tr)>t;function ba(Da,Ha,$a,vn){en(vn,Ft,Fr,$a,Da,Ha)}function Ia(Da,Ha){return i(Da)*i(Ha)>tr}function Na(Da){var Ha,$a,vn,Sn,yi;return{lineStart:function(){Sn=vn=!1,yi=1},point:function(_i,ki){var ri=[_i,ki],En,Ln=Ia(_i,ki),Ni=wr?Ln?0:mn(_i,ki):Ln?mn(_i+(_i<0?r:-r),ki):0;if(!Ha&&(Sn=vn=Ln)&&Da.lineStart(),Ln!==vn&&(En=Za(Ha,ri),(!En||Oa(Ha,En)||Oa(ri,En))&&(ri[2]=1)),Ln!==vn)yi=0,Ln?(Da.lineStart(),En=Za(ri,Ha),Da.point(En[0],En[1])):(En=Za(Ha,ri),Da.point(En[0],En[1],2),Da.lineEnd()),Ha=En;else if(ea&&Ha&&wr^Ln){var $i;!(Ni&$a)&&($i=Za(ri,Ha,!0))&&(yi=0,wr?(Da.lineStart(),Da.point($i[0][0],$i[0][1]),Da.point($i[1][0],$i[1][1]),Da.lineEnd()):(Da.point($i[1][0],$i[1][1]),Da.lineEnd(),Da.lineStart(),Da.point($i[0][0],$i[0][1],3)))}Ln&&(!Ha||!Oa(Ha,ri))&&Da.point(ri[0],ri[1]),Ha=ri,vn=Ln,$a=Ni},lineEnd:function(){vn&&Da.lineEnd(),Ha=null},clean:function(){return yi|(Sn&&vn)<<1}}}function Za(Da,Ha,$a){var vn=ae(Da),Sn=ae(Ha),yi=[1,0,0],_i=xe(vn,Sn),ki=he(_i,_i),ri=_i[0],En=ki-ri*ri;if(!En)return!$a&&Da;var Ln=tr*ki/En,Ni=-tr*ri/En,$i=xe(yi,_i),Co=Me(yi,Ln),Do=Me(_i,Ni);we(Co,Do);var Fo=$i,Yo=he(Co,Fo),bo=he(Fo,Fo),Gs=Yo*Yo-bo*(he(Co,Co)-1);if(!(Gs<0)){var Es=h(Gs),ns=Me(Fo,(-Yo-Es)/bo);if(we(ns,Co),ns=ee(ns),!$a)return ns;var Kn=Da[0],zo=Ha[0],gs=Da[1],js=Ha[1],Cl;zo0^ns[1]<(f(ns[0]-Kn)r^(Kn<=ns[0]&&ns[0]<=zo)){var xl=Me(Fo,(-Yo+Es)/bo);return we(xl,Co),[ns,ee(xl)]}}}function mn(Da,Ha){var $a=wr?Ft:r-Ft,vn=0;return Da<-$a?vn|=1:Da>$a&&(vn|=2),Ha<-$a?vn|=4:Ha>$a&&(vn|=8),vn}return Dr(Ia,Na,ba,wr?[0,-Ft]:[-r,Ft-r])}function Lr(Ft,tr,Fr,wr,ea,ba){var Ia=Ft[0],Na=Ft[1],Za=tr[0],mn=tr[1],Da=0,Ha=1,$a=Za-Ia,vn=mn-Na,Sn;if(Sn=Fr-Ia,!(!$a&&Sn>0)){if(Sn/=$a,$a<0){if(Sn0){if(Sn>Ha)return;Sn>Da&&(Da=Sn)}if(Sn=ea-Ia,!(!$a&&Sn<0)){if(Sn/=$a,$a<0){if(Sn>Ha)return;Sn>Da&&(Da=Sn)}else if($a>0){if(Sn0)){if(Sn/=vn,vn<0){if(Sn0){if(Sn>Ha)return;Sn>Da&&(Da=Sn)}if(Sn=ba-Na,!(!vn&&Sn<0)){if(Sn/=vn,vn<0){if(Sn>Ha)return;Sn>Da&&(Da=Sn)}else if(vn>0){if(Sn0&&(Ft[0]=Ia+Da*$a,Ft[1]=Na+Da*vn),Ha<1&&(tr[0]=Ia+Ha*$a,tr[1]=Na+Ha*vn),!0}}}}}var aa=1e9,Sa=-aa;function wa(Ft,tr,Fr,wr){function ea(mn,Da){return Ft<=mn&&mn<=Fr&&tr<=Da&&Da<=wr}function ba(mn,Da,Ha,$a){var vn=0,Sn=0;if(mn==null||(vn=Ia(mn,Ha))!==(Sn=Ia(Da,Ha))||Za(mn,Da)<0^Ha>0)do $a.point(vn===0||vn===3?Ft:Fr,vn>1?wr:tr);while((vn=(vn+Ha+4)%4)!==Sn);else $a.point(Da[0],Da[1])}function Ia(mn,Da){return f(mn[0]-Ft)0?0:3:f(mn[0]-Fr)0?2:1:f(mn[1]-tr)0?1:0:Da>0?3:2}function Na(mn,Da){return Za(mn.x,Da.x)}function Za(mn,Da){var Ha=Ia(mn,1),$a=Ia(Da,1);return Ha!==$a?Ha-$a:Ha===0?Da[1]-mn[1]:Ha===1?mn[0]-Da[0]:Ha===2?mn[1]-Da[1]:Da[0]-mn[0]}return function(mn){var Da=mn,Ha=Ja(),$a,vn,Sn,yi,_i,ki,ri,En,Ln,Ni,$i,Co={point:Do,lineStart:Gs,lineEnd:Es,polygonStart:Yo,polygonEnd:bo};function Do(Kn,zo){ea(Kn,zo)&&Da.point(Kn,zo)}function Fo(){for(var Kn=0,zo=0,gs=vn.length;zowr&&(Hu-Gu)*(wr-xl)>(Su-xl)*(Ft-Gu)&&++Kn:Su<=wr&&(Hu-Gu)*(wr-xl)<(Su-xl)*(Ft-Gu)&&--Kn;return Kn}function Yo(){Da=Ha,$a=[],vn=[],$i=!0}function bo(){var Kn=Fo(),zo=$i&&Kn,gs=($a=b.merge($a)).length;(zo||gs)&&(mn.polygonStart(),zo&&(mn.lineStart(),ba(null,null,1,mn),mn.lineEnd()),gs&&rt($a,Na,Kn,ba,mn),mn.polygonEnd()),Da=mn,$a=vn=Sn=null}function Gs(){Co.point=ns,vn&&vn.push(Sn=[]),Ni=!0,Ln=!1,ri=En=NaN}function Es(){$a&&(ns(yi,_i),ki&&Ln&&Ha.rejoin(),$a.push(Ha.result())),Co.point=Do,Ln&&Da.lineEnd()}function ns(Kn,zo){var gs=ea(Kn,zo);if(vn&&Sn.push([Kn,zo]),Ni)yi=Kn,_i=zo,ki=gs,Ni=!1,gs&&(Da.lineStart(),Da.point(Kn,zo));else if(gs&&Ln)Da.point(Kn,zo);else{var js=[ri=Math.max(Sa,Math.min(aa,ri)),En=Math.max(Sa,Math.min(aa,En))],Cl=[Kn=Math.max(Sa,Math.min(aa,Kn)),zo=Math.max(Sa,Math.min(aa,zo))];Lr(js,Cl,Ft,tr,Fr,wr)?(Ln||(Da.lineStart(),Da.point(js[0],js[1])),Da.point(Cl[0],Cl[1]),gs||Da.lineEnd(),$i=!1):gs&&(Da.lineStart(),Da.point(Kn,zo),$i=!1)}ri=Kn,En=zo,Ln=gs}return Co}}function pn(){var Ft=0,tr=0,Fr=960,wr=500,ea,ba,Ia;return Ia={stream:function(Na){return ea&&ba===Na?ea:ea=wa(Ft,tr,Fr,wr)(ba=Na)},extent:function(Na){return arguments.length?(Ft=+Na[0][0],tr=+Na[0][1],Fr=+Na[1][0],wr=+Na[1][1],ea=ba=null,Ia):[[Ft,tr],[Fr,wr]]}}}var tn=E(),ai,rn,Ri,Gn={sphere:I,point:I,lineStart:no,lineEnd:I,polygonStart:I,polygonEnd:I};function no(){Gn.point=fn,Gn.lineEnd=Di}function Di(){Gn.point=Gn.lineEnd=I}function fn(Ft,tr){Ft*=g,tr*=g,ai=Ft,rn=_(tr),Ri=i(tr),Gn.point=Ai}function Ai(Ft,tr){Ft*=g,tr*=g;var Fr=_(tr),wr=i(tr),ea=f(Ft-ai),ba=i(ea),Ia=_(ea),Na=wr*Ia,Za=Ri*Fr-rn*wr*ba,mn=rn*Fr+Ri*wr*ba;tn.add(m(h(Na*Na+Za*Za),mn)),ai=Ft,rn=Fr,Ri=wr}function jn(Ft){return tn.reset(),j(Ft,Gn),+tn}var Xn=[null,null],eo={type:"LineString",coordinates:Xn};function gi(Ft,tr){return Xn[0]=Ft,Xn[1]=tr,jn(eo)}var qi={Feature:function(Ft,tr){return oo(Ft.geometry,tr)},FeatureCollection:function(Ft,tr){for(var Fr=Ft.features,wr=-1,ea=Fr.length;++wr0&&(ea=gi(Ft[ba],Ft[ba-1]),ea>0&&Fr<=ea&&wr<=ea&&(Fr+wr-ea)*(1-Math.pow((Fr-wr)/ea,2))t}).map($a)).concat(b.range(T(ba/mn)*mn,ea,mn).filter(function(En){return f(En%Ha)>t}).map(vn))}return ki.lines=function(){return ri().map(function(En){return{type:"LineString",coordinates:En}})},ki.outline=function(){return{type:"Polygon",coordinates:[Sn(wr).concat(yi(Ia).slice(1),Sn(Fr).reverse().slice(1),yi(Na).reverse().slice(1))]}},ki.extent=function(En){return arguments.length?ki.extentMajor(En).extentMinor(En):ki.extentMinor()},ki.extentMajor=function(En){return arguments.length?(wr=+En[0][0],Fr=+En[1][0],Na=+En[0][1],Ia=+En[1][1],wr>Fr&&(En=wr,wr=Fr,Fr=En),Na>Ia&&(En=Na,Na=Ia,Ia=En),ki.precision(_i)):[[wr,Na],[Fr,Ia]]},ki.extentMinor=function(En){return arguments.length?(tr=+En[0][0],Ft=+En[1][0],ba=+En[0][1],ea=+En[1][1],tr>Ft&&(En=tr,tr=Ft,Ft=En),ba>ea&&(En=ba,ba=ea,ea=En),ki.precision(_i)):[[tr,ba],[Ft,ea]]},ki.step=function(En){return arguments.length?ki.stepMajor(En).stepMinor(En):ki.stepMinor()},ki.stepMajor=function(En){return arguments.length?(Da=+En[0],Ha=+En[1],ki):[Da,Ha]},ki.stepMinor=function(En){return arguments.length?(Za=+En[0],mn=+En[1],ki):[Za,mn]},ki.precision=function(En){return arguments.length?(_i=+En,$a=Eo(ba,ea,90),vn=Ao(tr,Ft,_i),Sn=Eo(Na,Ia,90),yi=Ao(wr,Fr,_i),ki):_i},ki.extentMajor([[-180,-90+t],[180,90-t]]).extentMinor([[-180,-80-t],[180,80+t]])}function jo(){return ds()()}function Wo(Ft,tr){var Fr=Ft[0]*g,wr=Ft[1]*g,ea=tr[0]*g,ba=tr[1]*g,Ia=i(wr),Na=_(wr),Za=i(ba),mn=_(ba),Da=Ia*i(Fr),Ha=Ia*_(Fr),$a=Za*i(ea),vn=Za*_(ea),Sn=2*x(h(z(ba-wr)+Ia*Za*z(ea-Fr))),yi=_(Sn),_i=Sn?function(ki){var ri=_(ki*=Sn)/yi,En=_(Sn-ki)/yi,Ln=En*Da+ri*$a,Ni=En*Ha+ri*vn,$i=En*Na+ri*mn;return[m(Ni,Ln)*c,m($i,h(Ln*Ln+Ni*Ni))*c]}:function(){return[Fr*c,wr*c]};return _i.distance=Sn,_i}function to(Ft){return Ft}var wo=E(),pi=E(),Vi,Io,Zi,Ko,Uo={point:I,lineStart:I,lineEnd:I,polygonStart:function(){Uo.lineStart=Ls,Uo.lineEnd=Vs},polygonEnd:function(){Uo.lineStart=Uo.lineEnd=Uo.point=I,wo.add(f(pi)),pi.reset()},result:function(){var Ft=wo/2;return wo.reset(),Ft}};function Ls(){Uo.point=Ss}function Ss(Ft,tr){Uo.point=Vo,Vi=Zi=Ft,Io=Ko=tr}function Vo(Ft,tr){pi.add(Ko*Ft-Zi*tr),Zi=Ft,Ko=tr}function Vs(){Vo(Vi,Io)}var Ts=1/0,Bo=Ts,_o=-Ts,Pi=_o,yo={point:bs,lineStart:I,lineEnd:I,polygonStart:I,polygonEnd:I,result:function(){var Ft=[[Ts,Bo],[_o,Pi]];return _o=Pi=-(Bo=Ts=1/0),Ft}};function bs(Ft,tr){Ft_o&&(_o=Ft),trPi&&(Pi=tr)}var Dl=0,hl=0,ps=0,dl=0,wu=0,lu=0,xc=0,Fl=0,pl=0,$u,uu,tl,vs,os={point:ms,lineStart:rl,lineEnd:Ku,polygonStart:function(){os.lineStart=bc,os.lineEnd=Lh},polygonEnd:function(){os.point=ms,os.lineStart=rl,os.lineEnd=Ku},result:function(){var Ft=pl?[xc/pl,Fl/pl]:lu?[dl/lu,wu/lu]:ps?[Dl/ps,hl/ps]:[NaN,NaN];return Dl=hl=ps=dl=wu=lu=xc=Fl=pl=0,Ft}};function ms(Ft,tr){Dl+=Ft,hl+=tr,++ps}function rl(){os.point=Fu}function Fu(Ft,tr){os.point=zu,ms(tl=Ft,vs=tr)}function zu(Ft,tr){var Fr=Ft-tl,wr=tr-vs,ea=h(Fr*Fr+wr*wr);dl+=ea*(tl+Ft)/2,wu+=ea*(vs+tr)/2,lu+=ea,ms(tl=Ft,vs=tr)}function Ku(){os.point=ms}function bc(){os.point=rh}function Lh(){Ju($u,uu)}function rh(Ft,tr){os.point=Ju,ms($u=tl=Ft,uu=vs=tr)}function Ju(Ft,tr){var Fr=Ft-tl,wr=tr-vs,ea=h(Fr*Fr+wr*wr);dl+=ea*(tl+Ft)/2,wu+=ea*(vs+tr)/2,lu+=ea,ea=vs*Ft-tl*tr,xc+=ea*(tl+Ft),Fl+=ea*(vs+tr),pl+=ea*3,ms(tl=Ft,vs=tr)}function ss(Ft){this._context=Ft}ss.prototype={_radius:4.5,pointRadius:function(Ft){return this._radius=Ft,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(Ft,tr){switch(this._point){case 0:{this._context.moveTo(Ft,tr),this._point=1;break}case 1:{this._context.lineTo(Ft,tr);break}default:{this._context.moveTo(Ft+this._radius,tr),this._context.arc(Ft,tr,this._radius,0,s);break}}},result:I};var ah=E(),wc,pc,Nf,Bu,Tc,Ou={point:I,lineStart:function(){Ou.point=Gc},lineEnd:function(){wc&&pf(pc,Nf),Ou.point=I},polygonStart:function(){wc=!0},polygonEnd:function(){wc=null},result:function(){var Ft=+ah;return ah.reset(),Ft}};function Gc(Ft,tr){Ou.point=pf,pc=Bu=Ft,Nf=Tc=tr}function pf(Ft,tr){Bu-=Ft,Tc-=tr,ah.add(h(Bu*Bu+Tc*Tc)),Bu=Ft,Tc=tr}function $l(){this._string=[]}$l.prototype={_radius:4.5,_circle:jf(4.5),pointRadius:function(Ft){return(Ft=+Ft)!==this._radius&&(this._radius=Ft,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(Ft,tr){switch(this._point){case 0:{this._string.push("M",Ft,",",tr),this._point=1;break}case 1:{this._string.push("L",Ft,",",tr);break}default:{this._circle==null&&(this._circle=jf(this._radius)),this._string.push("M",Ft,",",tr,this._circle);break}}},result:function(){if(this._string.length){var Ft=this._string.join("");return this._string=[],Ft}else return null}};function jf(Ft){return"m0,"+Ft+"a"+Ft+","+Ft+" 0 1,1 0,"+-2*Ft+"a"+Ft+","+Ft+" 0 1,1 0,"+2*Ft+"z"}function Hc(Ft,tr){var Fr=4.5,wr,ea;function ba(Ia){return Ia&&(typeof Fr=="function"&&ea.pointRadius(+Fr.apply(this,arguments)),j(Ia,wr(ea))),ea.result()}return ba.area=function(Ia){return j(Ia,wr(Uo)),Uo.result()},ba.measure=function(Ia){return j(Ia,wr(Ou)),Ou.result()},ba.bounds=function(Ia){return j(Ia,wr(yo)),yo.result()},ba.centroid=function(Ia){return j(Ia,wr(os)),os.result()},ba.projection=function(Ia){return arguments.length?(wr=Ia==null?(Ft=null,to):(Ft=Ia).stream,ba):Ft},ba.context=function(Ia){return arguments.length?(ea=Ia==null?(tr=null,new $l):new ss(tr=Ia),typeof Fr!="function"&&ea.pointRadius(Fr),ba):tr},ba.pointRadius=function(Ia){return arguments.length?(Fr=typeof Ia=="function"?Ia:(ea.pointRadius(+Ia),+Ia),ba):Fr},ba.projection(Ft).context(tr)}function Wc(Ft){return{stream:Qu(Ft)}}function Qu(Ft){return function(tr){var Fr=new Yc;for(var wr in Ft)Fr[wr]=Ft[wr];return Fr.stream=tr,Fr}}function Yc(){}Yc.prototype={constructor:Yc,point:function(Ft,tr){this.stream.point(Ft,tr)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Nu(Ft,tr,Fr){var wr=Ft.clipExtent&&Ft.clipExtent();return Ft.scale(150).translate([0,0]),wr!=null&&Ft.clipExtent(null),j(Fr,Ft.stream(yo)),tr(yo.result()),wr!=null&&Ft.clipExtent(wr),Ft}function Uf(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=tr[1][0]-tr[0][0],ba=tr[1][1]-tr[0][1],Ia=Math.min(ea/(wr[1][0]-wr[0][0]),ba/(wr[1][1]-wr[0][1])),Na=+tr[0][0]+(ea-Ia*(wr[1][0]+wr[0][0]))/2,Za=+tr[0][1]+(ba-Ia*(wr[1][1]+wr[0][1]))/2;Ft.scale(150*Ia).translate([Na,Za])},Fr)}function al(Ft,tr,Fr){return Uf(Ft,[[0,0],tr],Fr)}function Xc(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=+tr,ba=ea/(wr[1][0]-wr[0][0]),Ia=(ea-ba*(wr[1][0]+wr[0][0]))/2,Na=-ba*wr[0][1];Ft.scale(150*ba).translate([Ia,Na])},Fr)}function ju(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=+tr,ba=ea/(wr[1][1]-wr[0][1]),Ia=-ba*wr[0][0],Na=(ea-ba*(wr[1][1]+wr[0][1]))/2;Ft.scale(150*ba).translate([Ia,Na])},Fr)}var Ac=16,Zc=i(30*g);function ec(Ft,tr){return+tr?tc(Ft,tr):cu(Ft)}function cu(Ft){return Qu({point:function(tr,Fr){tr=Ft(tr,Fr),this.stream.point(tr[0],tr[1])}})}function tc(Ft,tr){function Fr(wr,ea,ba,Ia,Na,Za,mn,Da,Ha,$a,vn,Sn,yi,_i){var ki=mn-wr,ri=Da-ea,En=ki*ki+ri*ri;if(En>4*tr&&yi--){var Ln=Ia+$a,Ni=Na+vn,$i=Za+Sn,Co=h(Ln*Ln+Ni*Ni+$i*$i),Do=x($i/=Co),Fo=f(f($i)-1)tr||f((ki*Es+ri*ns)/En-.5)>.3||Ia*$a+Na*vn+Za*Sn2?Kn[2]%360*g:0,Es()):[Na*c,Za*c,mn*c]},bo.angle=function(Kn){return arguments.length?(Ha=Kn%360*g,Es()):Ha*c},bo.reflectX=function(Kn){return arguments.length?($a=Kn?-1:1,Es()):$a<0},bo.reflectY=function(Kn){return arguments.length?(vn=Kn?-1:1,Es()):vn<0},bo.precision=function(Kn){return arguments.length?($i=ec(Co,Ni=Kn*Kn),ns()):h(Ni)},bo.fitExtent=function(Kn,zo){return Uf(bo,Kn,zo)},bo.fitSize=function(Kn,zo){return al(bo,Kn,zo)},bo.fitWidth=function(Kn,zo){return Xc(bo,Kn,zo)},bo.fitHeight=function(Kn,zo){return ju(bo,Kn,zo)};function Es(){var Kn=vl(Fr,0,0,$a,vn,Ha).apply(null,tr(ba,Ia)),zo=(Ha?vl:nh)(Fr,wr-Kn[0],ea-Kn[1],$a,vn,Ha);return Da=yn(Na,Za,mn),Co=ja(tr,zo),Do=ja(Da,Co),$i=ec(Co,Ni),ns()}function ns(){return Fo=Yo=null,bo}return function(){return tr=Ft.apply(this,arguments),bo.invert=tr.invert&&Gs,Es()}}function yl(Ft){var tr=0,Fr=r/3,wr=rc(Ft),ea=wr(tr,Fr);return ea.parallels=function(ba){return arguments.length?wr(tr=ba[0]*g,Fr=ba[1]*g):[tr*c,Fr*c]},ea}function qf(Ft){var tr=i(Ft);function Fr(wr,ea){return[wr*tr,_(ea)/tr]}return Fr.invert=function(wr,ea){return[wr/tr,x(ea*tr)]},Fr}function ac(Ft,tr){var Fr=_(Ft),wr=(Fr+_(tr))/2;if(f(wr)=.12&&_i<.234&&yi>=-.425&&yi<-.214?ea:_i>=.166&&_i<.234&&yi>=-.214&&yi<-.115?Ia:Fr).invert($a)},Da.stream=function($a){return Ft&&tr===$a?Ft:Ft=Jo([Fr.stream(tr=$a),ea.stream($a),Ia.stream($a)])},Da.precision=function($a){return arguments.length?(Fr.precision($a),ea.precision($a),Ia.precision($a),Ha()):Fr.precision()},Da.scale=function($a){return arguments.length?(Fr.scale($a),ea.scale($a*.35),Ia.scale($a),Da.translate(Fr.translate())):Fr.scale()},Da.translate=function($a){if(!arguments.length)return Fr.translate();var vn=Fr.scale(),Sn=+$a[0],yi=+$a[1];return wr=Fr.translate($a).clipExtent([[Sn-.455*vn,yi-.238*vn],[Sn+.455*vn,yi+.238*vn]]).stream(mn),ba=ea.translate([Sn-.307*vn,yi+.201*vn]).clipExtent([[Sn-.425*vn+t,yi+.12*vn+t],[Sn-.214*vn-t,yi+.234*vn-t]]).stream(mn),Na=Ia.translate([Sn-.205*vn,yi+.212*vn]).clipExtent([[Sn-.214*vn+t,yi+.166*vn+t],[Sn-.115*vn-t,yi+.234*vn-t]]).stream(mn),Ha()},Da.fitExtent=function($a,vn){return Uf(Da,$a,vn)},Da.fitSize=function($a,vn){return al(Da,$a,vn)},Da.fitWidth=function($a,vn){return Xc(Da,$a,vn)},Da.fitHeight=function($a,vn){return ju(Da,$a,vn)};function Ha(){return Ft=tr=null,Da}return Da.scale(1070)}function fu(Ft){return function(tr,Fr){var wr=i(tr),ea=i(Fr),ba=Ft(wr*ea);return[ba*ea*_(tr),ba*_(Fr)]}}function Sl(Ft){return function(tr,Fr){var wr=h(tr*tr+Fr*Fr),ea=Ft(wr),ba=_(ea),Ia=i(ea);return[m(tr*ba,wr*Ia),x(wr&&Fr*ba/wr)]}}var El=fu(function(Ft){return h(2/(1+Ft))});El.invert=Sl(function(Ft){return 2*x(Ft/2)});function oh(){return ml(El).scale(124.75).clipAngle(180-.001)}var Au=fu(function(Ft){return(Ft=A(Ft))&&Ft/_(Ft)});Au.invert=Sl(function(Ft){return Ft});function $c(){return ml(Au).scale(79.4188).clipAngle(180-.001)}function _l(Ft,tr){return[Ft,M(u((a+tr)/2))]}_l.invert=function(Ft,tr){return[Ft,2*v(S(tr))-a]};function nl(){return gf(_l).scale(961/s)}function gf(Ft){var tr=ml(Ft),Fr=tr.center,wr=tr.scale,ea=tr.translate,ba=tr.clipExtent,Ia=null,Na,Za,mn;tr.scale=function(Ha){return arguments.length?(wr(Ha),Da()):wr()},tr.translate=function(Ha){return arguments.length?(ea(Ha),Da()):ea()},tr.center=function(Ha){return arguments.length?(Fr(Ha),Da()):Fr()},tr.clipExtent=function(Ha){return arguments.length?(Ha==null?Ia=Na=Za=mn=null:(Ia=+Ha[0][0],Na=+Ha[0][1],Za=+Ha[1][0],mn=+Ha[1][1]),Da()):Ia==null?null:[[Ia,Na],[Za,mn]]};function Da(){var Ha=r*wr(),$a=tr(on(tr.rotate()).invert([0,0]));return ba(Ia==null?[[$a[0]-Ha,$a[1]-Ha],[$a[0]+Ha,$a[1]+Ha]]:Ft===_l?[[Math.max($a[0]-Ha,Ia),Na],[Math.min($a[0]+Ha,Za),mn]]:[[Ia,Math.max($a[1]-Ha,Na)],[Za,Math.min($a[1]+Ha,mn)]])}return Da()}function Kc(Ft){return u((a+Ft)/2)}function sh(Ft,tr){var Fr=i(Ft),wr=Ft===tr?_(Ft):M(Fr/i(tr))/M(Kc(tr)/Kc(Ft)),ea=Fr*C(Kc(Ft),wr)/wr;if(!wr)return _l;function ba(Ia,Na){ea>0?Na<-a+t&&(Na=-a+t):Na>a-t&&(Na=a-t);var Za=ea/C(Kc(Na),wr);return[Za*_(wr*Ia),ea-Za*i(wr*Ia)]}return ba.invert=function(Ia,Na){var Za=ea-Na,mn=w(wr)*h(Ia*Ia+Za*Za),Da=m(Ia,f(Za))*w(Za);return Za*wr<0&&(Da-=r*w(Ia)*w(Za)),[Da/wr,2*v(C(ea/mn,1/wr))-a]},ba}function hu(){return yl(sh).scale(109.5).parallels([30,30])}function Uu(Ft,tr){return[Ft,tr]}Uu.invert=Uu;function qu(){return ml(Uu).scale(152.63)}function nc(Ft,tr){var Fr=i(Ft),wr=Ft===tr?_(Ft):(Fr-i(tr))/(tr-Ft),ea=Fr/wr+Ft;if(f(wr)t&&--wr>0);return[Ft/(.8707+(ba=Fr*Fr)*(-.131979+ba*(-.013791+ba*ba*ba*(.003971-.001529*ba)))),Fr]};function Hf(){return ml(bh).scale(175.295)}function il(Ft,tr){return[i(tr)*_(Ft),_(tr)]}il.invert=Sl(x);function kl(){return ml(il).scale(249.5).clipAngle(90+t)}function kc(Ft,tr){var Fr=i(tr),wr=1+i(Ft)*Fr;return[Fr*_(Ft)/wr,_(tr)/wr]}kc.invert=Sl(function(Ft){return 2*v(Ft)});function Cc(){return ml(kc).scale(250).clipAngle(142)}function Lc(Ft,tr){return[M(u((a+tr)/2)),-Ft]}Lc.invert=function(Ft,tr){return[-tr,2*v(S(Ft))-a]};function vc(){var Ft=gf(Lc),tr=Ft.center,Fr=Ft.rotate;return Ft.center=function(wr){return arguments.length?tr([-wr[1],wr[0]]):(wr=tr(),[wr[1],-wr[0]])},Ft.rotate=function(wr){return arguments.length?Fr([wr[0],wr[1],wr.length>2?wr[2]+90:90]):(wr=Fr(),[wr[0],wr[1],wr[2]-90])},Fr([0,0,90]).scale(159.155)}p.geoAlbers=mf,p.geoAlbersUsa=ih,p.geoArea=W,p.geoAzimuthalEqualArea=oh,p.geoAzimuthalEqualAreaRaw=El,p.geoAzimuthalEquidistant=$c,p.geoAzimuthalEquidistantRaw=Au,p.geoBounds=vt,p.geoCentroid=un,p.geoCircle=Yi,p.geoClipAntimeridian=jt,p.geoClipCircle=zr,p.geoClipExtent=pn,p.geoClipRectangle=wa,p.geoConicConformal=hu,p.geoConicConformalRaw=sh,p.geoConicEqualArea=Mc,p.geoConicEqualAreaRaw=ac,p.geoConicEquidistant=yf,p.geoConicEquidistantRaw=nc,p.geoContains=go,p.geoDistance=gi,p.geoEqualEarth=xh,p.geoEqualEarthRaw=Ec,p.geoEquirectangular=qu,p.geoEquirectangularRaw=Uu,p.geoGnomonic=xf,p.geoGnomonicRaw=Vf,p.geoGraticule=ds,p.geoGraticule10=jo,p.geoIdentity=Gf,p.geoInterpolate=Wo,p.geoLength=jn,p.geoMercator=nl,p.geoMercatorRaw=_l,p.geoNaturalEarth1=Hf,p.geoNaturalEarth1Raw=bh,p.geoOrthographic=kl,p.geoOrthographicRaw=il,p.geoPath=Hc,p.geoProjection=ml,p.geoProjectionMutator=rc,p.geoRotation=on,p.geoStereographic=Cc,p.geoStereographicRaw=kc,p.geoStream=j,p.geoTransform=Wc,p.geoTransverseMercator=vc,p.geoTransverseMercatorRaw=Lc,Object.defineProperty(p,"__esModule",{value:!0})})}}),_j=ze({"src/lib/usa_location_names.js"(J,G){"use strict";var p={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},b=new Set(Object.values(p));G.exports={usaLocationAbbreviations:b,usaLocationList:p}}}),kA={};bu(kA,{COUNTRIES_X:()=>CA});var CA,xj=zi({"src/lib/custom_country_codes.ts"(){"use strict";CA=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XIT",iso2:"",m49:"",name:"Ilemi Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]}}),hp=ze({"src/lib/geo_location_utils.js"(J,G){"use strict";var p=ci(),{COUNTRIES:b,createLookup:E}=vj(),{area:k}=mj(),{centroid:l}=gj(),{coordAll:e}=k2(),{geoBounds:t}=C2(),n=sg(),r=ap(),a=tv(),o=rg(),s=pg(),{usaLocationAbbreviations:c,usaLocationList:g}=_j(),{COUNTRIES_X:f}=(xj(),Po(kA)),{lookupAlpha3:v}=E([...b,...f]),m={"ISO-3":n,"USA-states":T,"country names":i};function i(P){let j=v(P);return j||(r.log("Unrecognized country name: "+P+"."),!1)}function T(P){P=P.trim();let j=c.has(P.toUpperCase())?P.toUpperCase():g[P.toLowerCase()];return j||(r.log("Unrecognized US location: "+P+"."),!1)}function S(P,j,U){var $;if(!j||typeof j!="string")return!1;let Q=m[P](j);if(Q){let re;if(P==="USA-states"){re=[];for(let ne of U)(($=ne?.properties)==null?void 0:$.gu)==="USA"&&re.push(ne)}else re=U;for(let ne of re)if(ne.id===Q)return ne;r.log(`Location with id ${Q} does not have a matching topojson feature at this resolution.`)}return!1}var M=360;function C(P){for(let j=0;j0&&P[j+1][0]<0)return j;return null}function _(P){var j=P.geometry,U=j.coordinates,$=P.id,Q=[],re,ne,se,V;switch($==="RUS"||$==="FJI"?re=function(Z){var K;if(C(Z)===null)K=Z;else for(K=new Array(Z.length),V=0;VK?H[X++]=[Z[V][0]+M,Z[V][1]]:V===K?(H[X++]=Z[V],H[X++]=[Z[V][0],-90]):H[X++]=Z[V];var q=s.tester(H);q.pts.pop(),Q.push(q)}:re=function(Z){Q.push(s.tester(Z))},j.type){case"MultiPolygon":for(ne=0;neQ&&(Q=se,U=ne)}else U=j;return!U||!U.coordinates.some(V=>V.length>0)?[NaN,NaN]:l(U).geometry.coordinates}function A(P){var j=window.PlotlyGeoAssets||{},U=[];function $(V){return new Promise(function(Z,K){p.json(V,function(H,X){if(H){delete j[V];var q=H.status===404?'GeoJSON at URL "'+V+'" does not exist.':"Unexpected error while fetching from "+V;return K(new Error(q))}return j[V]=X,Z(X)})})}function Q(V){return new Promise(function(Z,K){var H=0,X=setInterval(function(){if(j[V]&&j[V]!=="pending")return clearInterval(X),Z(j[V]);if(H>100)return clearInterval(X),K("Unexpected error while fetching from "+V);H++},50)})}for(var re=0;reI(z(P));function z(P){try{return e(P)}catch{return[]}}function I(P){if(P.length===0)return null;if(P.length===1){let[re,ne]=P[0];return[re,ne,re,ne]}let[[j,U],[$,Q]]=t({type:"MultiPoint",coordinates:P});return[j,U,F([j,$])[1],Q]}var O=(P,j)=>j.fitbounds==="geojson"&&P.locationmode==="geojson-id",D=(P,j)=>O(P,j)?z(w(P)):[],B=(P,j)=>I(D(P,j));function F([P,j]){return[P,P>j?j+M:j]}G.exports={locationToFeature:S,feature2polygons:_,getTraceGeojson:w,extractTraceFeature:h,fetchTraceGeoData:A,boundsOfCoords:I,computeBbox:x,coordsOf:z,doesCrossAntiMeridian:C,fitGeojsonBbox:B,fitGeojsonCoords:D,unwrapLonRange:F,ANTIMERIDIAN_LON_SHIFT:M}}}),LA=ze({"src/traces/scattergeo/style.js"(J,G){"use strict";var p=ci(),b=Xi(),E=Qn(),k=Ch(),l=k.stylePoints,e=k.styleText;G.exports=function(r,a){a&&t(r,a)};function t(n,r){var a=r[0].trace,o=r[0].node3;o.style("opacity",r[0].trace.opacity),l(o,a,n),e(o,a,n),o.selectAll("path.js-line").style("fill","none").each(function(s){var c=p.select(this),g=s.trace,f=g.line||{};c.call(E.stroke,f.color).call(b.dashLine,f.dash||"",f.width||0),g.fill!=="none"&&c.call(E.fill,g.fillcolor)})}}}),L2=ze({"src/traces/scattergeo/plot.js"(J,G){"use strict";var p=ci(),b=Nr(),E=S2().getTopojsonFeatures,k=Qg(),l=hp(),e=md().findExtremes,t=No().BADNUM,n=sd().calcMarkerSize,r=el(),a=LA();function o(g,f,v){var m=f.layers.frontplot.select(".scatterlayer"),i=b.makeTraceGroups(m,v,"trace scattergeo");function T(S,M){S.lonlat[0]===t&&p.select(M).remove()}i.selectAll("*").remove(),i.each(function(S){var M=p.select(this),C=S[0].trace;if(r.hasLines(C)||C.fill!=="none"){var _=k.calcTraceToLineCoords(S),w=C.fill!=="none"?k.makePolygon(_):k.makeLine(_);M.selectAll("path.js-line").data([{geojson:w,trace:C}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}r.hasMarkers(C)&&M.selectAll("path.point").data(b.identity).enter().append("path").classed("point",!0).each(function(h){T(h,this)}),r.hasText(C)&&M.selectAll("g").data(b.identity).enter().append("g").append("text").each(function(h){T(h,this)}),a(g,S)})}function s(g,f){var v=g[0].trace,m=f[v.geo],i=m._subplot,T=v._length,S,M;if(b.isArrayOrTypedArray(v.locations)){var C=v.locationmode,_=C==="geojson-id"?l.extractTraceFeature(g):E(v,i.topojson);for(S=0;S")}}}),wj=ze({"src/traces/scattergeo/event_data.js"(J,G){"use strict";G.exports=function(b,E,k,l,e){b.lon=E.lon,b.lat=E.lat,b.location=E.loc?E.loc:null;var t=l[e];return t.fIn&&t.fIn.properties&&(b.properties=t.fIn.properties),b}}}),Tj=ze({"src/traces/scattergeo/select.js"(J,G){"use strict";var p=el(),b=No().BADNUM;G.exports=function(k,l){var e=k.cd,t=k.xaxis,n=k.yaxis,r=[],a=e[0].trace,o,s,c,g,f,v=!p.hasMarkers(a)&&!p.hasText(a);if(v)return[];if(l===!1)for(f=0;fH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,X,q,W){for(q==null&&(q=0),W==null&&(W=H.length);q>>1;K(H[ee],X)<0?q=ee+1:W=ee}return q},right:function(H,X,q,W){for(q==null&&(q=0),W==null&&(W=H.length);q>>1;K(H[ee],X)>0?W=ee:q=ee+1}return q}}}function k(K){return function(H,X){return b(K(H),X)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var X=0,q=K.length-1,W=K[0],ee=new Array(q<0?0:q);XK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var X=K.length,q=0,W=-1,ee=0,ae,he,xe=0;if(H==null)for(;++W1)return xe/(q-1)}function g(K,H){var X=c(K,H);return X&&Math.sqrt(X)}function f(K,H){var X=K.length,q=-1,W,ee,ae;if(H==null){for(;++q=W)for(ee=ae=W;++qW&&(ee=W),ae=W)for(ee=ae=W;++qW&&(ee=W),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++W=0?(ee>=C?10:ee>=_?5:ee>=w?2:1)*Math.pow(10,W):-Math.pow(10,-W)/(ee>=C?10:ee>=_?5:ee>=w?2:1)}function A(K,H,X){var q=Math.abs(H-K)/Math.max(0,X),W=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/W;return ee>=C?W*=10:ee>=_?W*=5:ee>=w&&(W*=2),HSe;)Ie.pop(),--Ge;var qe=new Array(Ge+1),ke;for(ee=0;ee<=Ge;++ee)ke=qe[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+X(K[q-1],q-1,K);var q,W=(q-1)*H,ee=Math.floor(W),ae=+X(K[ee],ee,K),he=+X(K[ee+1],ee+1,K);return ae+(he-ae)*(W-ee)}}function O(K,H,X){return K=i.call(K,s).sort(b),Math.ceil((X-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,X){return Math.ceil((X-H)/(3.5*g(K)*Math.pow(K.length,-1/3)))}function B(K,H){var X=K.length,q=-1,W,ee;if(H==null){for(;++q=W)for(ee=W;++qee&&(ee=W)}else for(;++q=W)for(ee=W;++qee&&(ee=W);return ee}function F(K,H){var X=K.length,q=X,W=-1,ee,ae=0;if(H==null)for(;++W=0;)for(ae=K[H],X=ae.length;--X>=0;)ee[--W]=ae[X];return ee}function U(K,H){var X=K.length,q=-1,W,ee;if(H==null){for(;++q=W)for(ee=W;++qW&&(ee=W)}else for(;++q=W)for(ee=W;++qW&&(ee=W);return ee}function $(K,H){for(var X=H.length,q=new Array(X);X--;)q[X]=K[H[X]];return q}function Q(K,H){if(X=K.length){var X,q=0,W=0,ee,ae=K[W];for(H==null&&(H=b);++q0?1:$e<0?-1:0},v=Math.sin,m=Math.tan,i=1e-6,T=1e-12,S=Math.PI,M=S/2,C=S/4,_=Math.SQRT1_2,w=D(2),h=D(S),u=S*2,A=180/S,x=S/180;function z($e){return $e?$e/Math.sin($e):1}function I($e){return $e>1?M:$e<-1?-M:Math.asin($e)}function O($e){return $e>1?0:$e<-1?S:Math.acos($e)}function D($e){return $e>0?Math.sqrt($e):0}function B($e){return $e=n(2*$e),($e-1)/($e+1)}function F($e){return(n($e)-n(-$e))/2}function P($e){return(n($e)+n(-$e))/2}function j($e){return a($e+D($e*$e+1))}function U($e){return a($e+D($e*$e-1))}function $($e){var nt=m($e/2),mt=2*a(t($e/2))/(nt*nt);function xt(Bt,zt){var Wt=t(Bt),Pr=t(zt),Br=v(zt),kr=Pr*Wt,jr=-((1-kr?a((1+kr)/2)/(1-kr):-.5)+mt/(1+kr));return[jr*Pr*v(Bt),jr*Br]}return xt.invert=function(Bt,zt){var Wt=D(Bt*Bt+zt*zt),Pr=-$e/2,Br=50,kr;if(!Wt)return[0,0];do{var jr=Pr/2,Jr=t(jr),la=v(jr),xa=la/Jr,Ba=-a(k(Jr));Pr-=kr=(2/xa*Ba-mt*xa-Wt)/(-Ba/(la*la)+1-mt/(2*Jr*Jr))*(Jr<0?.7:1)}while(k(kr)>i&&--Br>0);var an=v(Pr);return[e(Bt*an,Wt*t(Pr)),I(zt*an/Wt)]},xt}function Q(){var $e=M,nt=b.geoProjectionMutator($),mt=nt($e);return mt.radius=function(xt){return arguments.length?nt($e=xt*x):$e*A},mt.scale(179.976).clipAngle(147)}function re($e,nt){var mt=t(nt),xt=z(O(mt*t($e/=2)));return[2*mt*v($e)*xt,v(nt)*xt]}re.invert=function($e,nt){if(!($e*$e+4*nt*nt>S*S+i)){var mt=$e,xt=nt,Bt=25;do{var zt=v(mt),Wt=v(mt/2),Pr=t(mt/2),Br=v(xt),kr=t(xt),jr=v(2*xt),Jr=Br*Br,la=kr*kr,xa=Wt*Wt,Ba=1-la*Pr*Pr,an=Ba?O(kr*Pr)*D(wn=1/Ba):wn=0,wn,ii=2*an*kr*Wt-$e,Si=an*Br-nt,oi=wn*(la*xa+an*kr*Pr*Jr),Ji=wn*(.5*zt*jr-an*2*Br*Wt),Qi=wn*.25*(jr*Wt-an*Br*la*zt),Oo=wn*(Jr*Pr+an*xa*kr),Qo=Ji*Qi-Oo*oi;if(!Qo)break;var vo=(Si*Ji-ii*Oo)/Qo,ys=(ii*Qi-Si*oi)/Qo;mt-=vo,xt-=ys}while((k(vo)>i||k(ys)>i)&&--Bt>0);return[mt,xt]}};function ne(){return b.geoProjection(re).scale(152.63)}function se($e){var nt=v($e),mt=t($e),xt=$e>=0?1:-1,Bt=m(xt*$e),zt=(1+nt-mt)/2;function Wt(Pr,Br){var kr=t(Br),jr=t(Pr/=2);return[(1+kr)*v(Pr),(xt*Br>-e(jr,Bt)-.001?0:-xt*10)+zt+v(Br)*mt-(1+kr)*nt*jr]}return Wt.invert=function(Pr,Br){var kr=0,jr=0,Jr=50;do{var la=t(kr),xa=v(kr),Ba=t(jr),an=v(jr),wn=1+Ba,ii=wn*xa-Pr,Si=zt+an*mt-wn*nt*la-Br,oi=wn*la/2,Ji=-xa*an,Qi=nt*wn*xa/2,Oo=mt*Ba+nt*la*an,Qo=Ji*Qi-Oo*oi,vo=(Si*Ji-ii*Oo)/Qo/2,ys=(ii*Qi-Si*oi)/Qo;k(ys)>2&&(ys/=2),kr-=vo,jr-=ys}while((k(vo)>i||k(ys)>i)&&--Jr>0);return xt*jr>-e(t(kr),Bt)-.001?[kr*2,jr]:null},Wt}function V(){var $e=20*x,nt=$e>=0?1:-1,mt=m(nt*$e),xt=b.geoProjectionMutator(se),Bt=xt($e),zt=Bt.stream;return Bt.parallel=function(Wt){return arguments.length?(mt=m((nt=($e=Wt*x)>=0?1:-1)*$e),xt($e)):$e*A},Bt.stream=function(Wt){var Pr=Bt.rotate(),Br=zt(Wt),kr=(Bt.rotate([0,0]),zt(Wt)),jr=Bt.precision();return Bt.rotate(Pr),Br.sphere=function(){kr.polygonStart(),kr.lineStart();for(var Jr=nt*-180;nt*Jr<180;Jr+=nt*90)kr.point(Jr,nt*90);if($e)for(;nt*(Jr-=3*nt*jr)>=-180;)kr.point(Jr,nt*-e(t(Jr*x/2),mt)*A);kr.lineEnd(),kr.polygonEnd()},Br},Bt.scale(218.695).center([0,28.0974])}function Z($e,nt){var mt=m(nt/2),xt=D(1-mt*mt),Bt=1+xt*t($e/=2),zt=v($e)*xt/Bt,Wt=mt/Bt,Pr=zt*zt,Br=Wt*Wt;return[4/3*zt*(3+Pr-3*Br),4/3*Wt*(3+3*Pr-Br)]}Z.invert=function($e,nt){if($e*=3/8,nt*=3/8,!$e&&k(nt)>1)return null;var mt=$e*$e,xt=nt*nt,Bt=1+mt+xt,zt=D((Bt-D(Bt*Bt-4*nt*nt))/2),Wt=I(zt)/3,Pr=zt?U(k(nt/zt))/3:j(k($e))/3,Br=t(Wt),kr=P(Pr),jr=kr*kr-Br*Br;return[f($e)*2*e(F(Pr)*Br,.25-jr),f(nt)*2*e(kr*v(Wt),.25+jr)]};function K(){return b.geoProjection(Z).scale(66.1603)}var H=D(8),X=a(1+w);function q($e,nt){var mt=k(nt);return mtT&&--xt>0);return[$e/(t(mt)*(H-1/v(mt))),f(nt)*mt]};function W(){return b.geoProjection(q).scale(112.314)}function ee($e){var nt=2*S/$e;function mt(xt,Bt){var zt=b.geoAzimuthalEquidistantRaw(xt,Bt);if(k(xt)>M){var Wt=e(zt[1],zt[0]),Pr=D(zt[0]*zt[0]+zt[1]*zt[1]),Br=nt*g((Wt-M)/nt)+M,kr=e(v(Wt-=Br),2-t(Wt));Wt=Br+I(S/Pr*v(kr))-kr,zt[0]=Pr*t(Wt),zt[1]=Pr*v(Wt)}return zt}return mt.invert=function(xt,Bt){var zt=D(xt*xt+Bt*Bt);if(zt>M){var Wt=e(Bt,xt),Pr=nt*g((Wt-M)/nt)+M,Br=Wt>Pr?-1:1,kr=zt*t(Pr-Wt),jr=1/m(Br*O((kr-S)/D(S*(S-2*kr)+zt*zt)));Wt=Pr+2*l((jr+Br*D(jr*jr-3))/3),xt=zt*t(Wt),Bt=zt*v(Wt)}return b.geoAzimuthalEquidistantRaw.invert(xt,Bt)},mt}function ae(){var $e=5,nt=b.geoProjectionMutator(ee),mt=nt($e),xt=mt.stream,Bt=.01,zt=-t(Bt*x),Wt=v(Bt*x);return mt.lobes=function(Pr){return arguments.length?nt($e=+Pr):$e},mt.stream=function(Pr){var Br=mt.rotate(),kr=xt(Pr),jr=(mt.rotate([0,0]),xt(Pr));return mt.rotate(Br),kr.sphere=function(){jr.polygonStart(),jr.lineStart();for(var Jr=0,la=360/$e,xa=2*S/$e,Ba=90-180/$e,an=M;Jr<$e;++Jr,Ba-=la,an-=xa)jr.point(e(Wt*t(an),zt)*A,I(Wt*v(an))*A),Ba<-90?(jr.point(-90,-180-Ba-Bt),jr.point(-90,-180-Ba+Bt)):(jr.point(90,Ba+Bt),jr.point(90,Ba-Bt));jr.lineEnd(),jr.polygonEnd()},kr},mt.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function he($e,nt){if(arguments.length<2&&(nt=$e),nt===1)return b.geoAzimuthalEqualAreaRaw;if(nt===1/0)return xe;function mt(xt,Bt){var zt=b.geoAzimuthalEqualAreaRaw(xt/nt,Bt);return zt[0]*=$e,zt}return mt.invert=function(xt,Bt){var zt=b.geoAzimuthalEqualAreaRaw.invert(xt/$e,Bt);return zt[0]*=nt,zt},mt}function xe($e,nt){return[$e*t(nt)/t(nt/=2),2*v(nt)]}xe.invert=function($e,nt){var mt=2*I(nt/2);return[$e*t(mt/2)/t(mt),mt]};function we(){var $e=2,nt=b.geoProjectionMutator(he),mt=nt($e);return mt.coefficient=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(169.529)}function Me($e,nt,mt){var xt=100,Bt,zt,Wt;mt=mt===void 0?0:+mt,nt=+nt;do zt=$e(mt),Wt=$e(mt+i),zt===Wt&&(Wt=zt+i),mt-=Bt=-1*i*(zt-nt)/(zt-Wt);while(xt-- >0&&k(Bt)>i);return xt<0?NaN:mt}function Se($e,nt,mt){return nt===void 0&&(nt=40),mt===void 0&&(mt=T),function(xt,Bt,zt,Wt){var Pr,Br,kr;zt=zt===void 0?0:+zt,Wt=Wt===void 0?0:+Wt;for(var jr=0;jrPr){zt-=Br/=2,Wt-=kr/=2;continue}Pr=Ba;var an=(zt>0?-1:1)*mt,wn=(Wt>0?-1:1)*mt,ii=$e(zt+an,Wt),Si=$e(zt,Wt+wn),oi=(ii[0]-Jr[0])/an,Ji=(ii[1]-Jr[1])/an,Qi=(Si[0]-Jr[0])/wn,Oo=(Si[1]-Jr[1])/wn,Qo=Oo*oi-Ji*Qi,vo=(k(Qo)<.5?.5:1)/Qo;if(Br=(xa*Qi-la*Oo)*vo,kr=(la*Ji-xa*oi)*vo,zt+=Br,Wt+=kr,k(Br)0&&(Pr[1]*=1+Br/1.5*Pr[0]*Pr[0]),Pr}return xt.invert=Se(xt),xt}function Ge(){return b.geoProjection(Ie()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function qe($e,nt){var mt=$e*v(nt),xt=30,Bt;do nt-=Bt=(nt+v(nt)-mt)/(1+t(nt));while(k(Bt)>i&&--xt>0);return nt/2}function ke($e,nt,mt){function xt(Bt,zt){return[$e*Bt*t(zt=qe(mt,zt)),nt*v(zt)]}return xt.invert=function(Bt,zt){return zt=I(zt/nt),[Bt/($e*t(zt)),I((2*zt+v(2*zt))/mt)]},xt}var _e=ke(w/M,w,S);function ue(){return b.geoProjection(_e).scale(169.529)}var ve=2.00276,le=1.11072;function Ae($e,nt){var mt=qe(S,nt);return[ve*$e/(1/t(nt)+le/t(mt)),(nt+w*v(mt))/ve]}Ae.invert=function($e,nt){var mt=ve*nt,xt=nt<0?-C:C,Bt=25,zt,Wt;do Wt=mt-w*v(xt),xt-=zt=(v(2*xt)+2*xt-S*v(Wt))/(2*t(2*xt)+2+S*t(Wt)*w*t(xt));while(k(zt)>i&&--Bt>0);return Wt=mt-w*v(xt),[$e*(1/t(Wt)+le/t(xt))/ve,Wt]};function Be(){return b.geoProjection(Ae).scale(160.857)}function Xe($e){var nt=0,mt=b.geoProjectionMutator($e),xt=mt(nt);return xt.parallel=function(Bt){return arguments.length?mt(nt=Bt*x):nt*A},xt}function Ye($e,nt){return[$e*t(nt),nt]}Ye.invert=function($e,nt){return[$e/t(nt),nt]};function yt(){return b.geoProjection(Ye).scale(152.63)}function gt($e){if(!$e)return Ye;var nt=1/m($e);function mt(xt,Bt){var zt=nt+$e-Bt,Wt=zt&&xt*t(Bt)/zt;return[zt*v(Wt),nt-zt*t(Wt)]}return mt.invert=function(xt,Bt){var zt=D(xt*xt+(Bt=nt-Bt)*Bt),Wt=nt+$e-zt;return[zt/t(Wt)*e(xt,Bt),Wt]},mt}function Tt(){return Xe(gt).scale(123.082).center([0,26.1441]).parallel(45)}function At($e){function nt(mt,xt){var Bt=M-xt,zt=Bt&&mt*$e*v(Bt)/Bt;return[Bt*v(zt)/$e,M-Bt*t(zt)]}return nt.invert=function(mt,xt){var Bt=mt*$e,zt=M-xt,Wt=D(Bt*Bt+zt*zt),Pr=e(Bt,zt);return[(Wt?Wt/v(Wt):1)*Pr/$e,M-Wt]},nt}function $t(){var $e=.5,nt=b.geoProjectionMutator(At),mt=nt($e);return mt.fraction=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(158.837)}var rr=ke(1,4/S,S);function _r(){return b.geoProjection(rr).scale(152.63)}function Xt($e,nt,mt,xt,Bt,zt){var Wt=t(zt),Pr;if(k($e)>1||k(zt)>1)Pr=O(mt*Bt+nt*xt*Wt);else{var Br=v($e/2),kr=v(zt/2);Pr=2*I(D(Br*Br+nt*xt*kr*kr))}return k(Pr)>i?[Pr,e(xt*v(zt),nt*Bt-mt*xt*Wt)]:[0,0]}function or($e,nt,mt){return O(($e*$e+nt*nt-mt*mt)/(2*$e*nt))}function Ot($e){return $e-2*S*r(($e+S)/(2*S))}function vt($e,nt,mt){for(var xt=[[$e[0],$e[1],v($e[1]),t($e[1])],[nt[0],nt[1],v(nt[1]),t(nt[1])],[mt[0],mt[1],v(mt[1]),t(mt[1])]],Bt=xt[2],zt,Wt=0;Wt<3;++Wt,Bt=zt)zt=xt[Wt],Bt.v=Xt(zt[1]-Bt[1],Bt[3],Bt[2],zt[3],zt[2],zt[0]-Bt[0]),Bt.point=[0,0];var Pr=or(xt[0].v[0],xt[2].v[0],xt[1].v[0]),Br=or(xt[0].v[0],xt[1].v[0],xt[2].v[0]),kr=S-Pr;xt[2].point[1]=0,xt[0].point[0]=-(xt[1].point[0]=xt[0].v[0]/2);var jr=[xt[2].point[0]=xt[0].point[0]+xt[2].v[0]*t(Pr),2*(xt[0].point[1]=xt[1].point[1]=xt[2].v[0]*v(Pr))];function Jr(la,xa){var Ba=v(xa),an=t(xa),wn=new Array(3),ii;for(ii=0;ii<3;++ii){var Si=xt[ii];if(wn[ii]=Xt(xa-Si[1],Si[3],Si[2],an,Ba,la-Si[0]),!wn[ii][0])return Si.point;wn[ii][1]=Ot(wn[ii][1]-Si.v[1])}var oi=jr.slice();for(ii=0;ii<3;++ii){var Ji=ii==2?0:ii+1,Qi=or(xt[ii].v[0],wn[ii][0],wn[Ji][0]);wn[ii][1]<0&&(Qi=-Qi),ii?ii==1?(Qi=Br-Qi,oi[0]-=wn[ii][0]*t(Qi),oi[1]-=wn[ii][0]*v(Qi)):(Qi=kr-Qi,oi[0]+=wn[ii][0]*t(Qi),oi[1]+=wn[ii][0]*v(Qi)):(oi[0]+=wn[ii][0]*t(Qi),oi[1]-=wn[ii][0]*v(Qi))}return oi[0]/=3,oi[1]/=3,oi}return Jr}function ht($e){return $e[0]*=x,$e[1]*=x,$e}function De(){return Ne([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ne($e,nt,mt){var xt=b.geoCentroid({type:"MultiPoint",coordinates:[$e,nt,mt]}),Bt=[-xt[0],-xt[1]],zt=b.geoRotation(Bt),Wt=vt(ht(zt($e)),ht(zt(nt)),ht(zt(mt)));Wt.invert=Se(Wt);var Pr=b.geoProjection(Wt).rotate(Bt),Br=Pr.center;return delete Pr.rotate,Pr.center=function(kr){return arguments.length?Br(zt(kr)):zt.invert(Br())},Pr.clipAngle(90)}function We($e,nt){var mt=D(1-v(nt));return[2/h*$e*mt,h*(1-mt)]}We.invert=function($e,nt){var mt=(mt=nt/h-1)*mt;return[mt>0?$e*D(S/mt)/2:0,I(1-mt)]};function Ke(){return b.geoProjection(We).scale(95.6464).center([0,30])}function Je($e){var nt=m($e);function mt(xt,Bt){return[xt,(xt?xt/v(xt):1)*(v(Bt)*t(xt)-nt*t(Bt))]}return mt.invert=nt?function(xt,Bt){xt&&(Bt*=v(xt)/xt);var zt=t(xt);return[xt,2*e(D(zt*zt+nt*nt-Bt*Bt)-zt,nt-Bt)]}:function(xt,Bt){return[xt,I(xt?Bt*m(xt)/xt:Bt)]},mt}function et(){return Xe(Je).scale(249.828).clipAngle(90)}var Mt=D(3);function pt($e,nt){return[Mt*$e*(2*t(2*nt/3)-1)/h,Mt*h*v(nt/3)]}pt.invert=function($e,nt){var mt=3*I(nt/(Mt*h));return[h*$e/(Mt*(2*t(2*mt/3)-1)),mt]};function Pt(){return b.geoProjection(pt).scale(156.19)}function Ct($e){var nt=t($e);function mt(xt,Bt){return[xt*nt,v(Bt)/nt]}return mt.invert=function(xt,Bt){return[xt/nt,I(Bt*nt)]},mt}function qt(){return Xe(Ct).parallel(38.58).scale(195.044)}function Vt($e){var nt=t($e);function mt(xt,Bt){return[xt*nt,(1+nt)*m(Bt/2)]}return mt.invert=function(xt,Bt){return[xt/nt,l(Bt/(1+nt))*2]},mt}function Ht(){return Xe(Vt).scale(124.75)}function Sr($e,nt){var mt=D(8/(3*S));return[mt*$e*(1-k(nt)/S),mt*nt]}Sr.invert=function($e,nt){var mt=D(8/(3*S)),xt=nt/mt;return[$e/(mt*(1-k(xt)/S)),xt]};function Kr(){return b.geoProjection(Sr).scale(165.664)}function Yt($e,nt){var mt=D(4-3*v(k(nt)));return[2/D(6*S)*$e*mt,f(nt)*D(2*S/3)*(2-mt)]}Yt.invert=function($e,nt){var mt=2-k(nt)/D(2*S/3);return[$e*D(6*S)/(2*mt),f(nt)*I((4-mt*mt)/3)]};function Rt(){return b.geoProjection(Yt).scale(165.664)}function nr($e,nt){var mt=D(S*(4+S));return[2/mt*$e*(1+D(1-4*nt*nt/(S*S))),4/mt*nt]}nr.invert=function($e,nt){var mt=D(S*(4+S))/2;return[$e*mt/(1+D(1-nt*nt*(4+S)/(4*S))),nt*mt/2]};function ur(){return b.geoProjection(nr).scale(180.739)}function cr($e,nt){var mt=(2+M)*v(nt);nt/=2;for(var xt=0,Bt=1/0;xt<10&&k(Bt)>i;xt++){var zt=t(nt);nt-=Bt=(nt+v(nt)*(zt+2)-mt)/(2*zt*(1+zt))}return[2/D(S*(4+S))*$e*(1+t(nt)),2*D(S/(4+S))*v(nt)]}cr.invert=function($e,nt){var mt=nt*D((4+S)/S)/2,xt=I(mt),Bt=t(xt);return[$e/(2/D(S*(4+S))*(1+Bt)),I((xt+mt*(Bt+2))/(2+M))]};function Rr(){return b.geoProjection(cr).scale(180.739)}function Qr($e,nt){return[$e*(1+t(nt))/D(2+S),2*nt/D(2+S)]}Qr.invert=function($e,nt){var mt=D(2+S),xt=nt*mt/2;return[mt*$e/(1+t(xt)),xt]};function Zr(){return b.geoProjection(Qr).scale(173.044)}function ha($e,nt){for(var mt=(1+M)*v(nt),xt=0,Bt=1/0;xt<10&&k(Bt)>i;xt++)nt-=Bt=(nt+v(nt)-mt)/(1+t(nt));return mt=D(2+S),[$e*(1+t(nt))/mt,2*nt/mt]}ha.invert=function($e,nt){var mt=1+M,xt=D(mt/2);return[$e*2*xt/(1+t(nt*=xt)),I((nt+v(nt))/mt)]};function Pa(){return b.geoProjection(ha).scale(173.044)}var La=3+2*w;function un($e,nt){var mt=v($e/=2),xt=t($e),Bt=D(t(nt)),zt=t(nt/=2),Wt=v(nt)/(zt+w*xt*Bt),Pr=D(2/(1+Wt*Wt)),Br=D((w*zt+(xt+mt)*Bt)/(w*zt+(xt-mt)*Bt));return[La*(Pr*(Br-1/Br)-2*a(Br)),La*(Pr*Wt*(Br+1/Br)-2*l(Wt))]}un.invert=function($e,nt){if(!(zt=Z.invert($e/1.2,nt*1.065)))return null;var mt=zt[0],xt=zt[1],Bt=20,zt;$e/=La,nt/=La;do{var Wt=mt/2,Pr=xt/2,Br=v(Wt),kr=t(Wt),jr=v(Pr),Jr=t(Pr),la=t(xt),xa=D(la),Ba=jr/(Jr+w*kr*xa),an=Ba*Ba,wn=D(2/(1+an)),ii=w*Jr+(kr+Br)*xa,Si=w*Jr+(kr-Br)*xa,oi=ii/Si,Ji=D(oi),Qi=Ji-1/Ji,Oo=Ji+1/Ji,Qo=wn*Qi-2*a(Ji)-$e,vo=wn*Ba*Oo-2*l(Ba)-nt,ys=jr&&_*xa*Br*an/jr,ol=(w*kr*Jr+xa)/(2*(Jr+w*kr*xa)*(Jr+w*kr*xa)*xa),jl=-.5*Ba*wn*wn*wn,Hs=jl*ys,Cu=jl*ol,hi=(hi=2*Jr+w*xa*(kr-Br))*hi*Ji,wi=(w*kr*Jr*xa+la)/hi,sl=-(w*Br*jr)/(xa*hi),sc=Qi*Hs-2*wi/Ji+wn*(wi+wi/oi),tu=Qi*Cu-2*sl/Ji+wn*(sl+sl/oi),Ps=Ba*Oo*Hs-2*ys/(1+an)+wn*Oo*ys+wn*Ba*(wi-wi/oi),gc=Ba*Oo*Cu-2*ol/(1+an)+wn*Oo*ol+wn*Ba*(sl-sl/oi),pu=tu*Ps-gc*sc;if(!pu)break;var ll=(vo*tu-Qo*gc)/pu,ef=(Qo*Ps-vo*sc)/pu;mt-=ll,xt=o(-M,s(M,xt-ef))}while((k(ll)>i||k(ef)>i)&&--Bt>0);return k(k(xt)-M)xt){var Jr=D(jr),la=e(kr,Br),xa=mt*g(la/mt),Ba=la-xa,an=$e*t(Ba),wn=($e*v(Ba)-Ba*v(an))/(M-an),ii=Oa(Ba,wn),Si=(S-$e)/lt(ii,an,S);Br=Jr;var oi=50,Ji;do Br-=Ji=($e+lt(ii,an,Br)*Si-Jr)/(ii(Br)*Si);while(k(Ji)>i&&--oi>0);kr=Ba*v(Br),Brxt){var Br=D(Pr),kr=e(Wt,zt),jr=mt*g(kr/mt),Jr=kr-jr;zt=Br*t(Jr),Wt=Br*v(Jr);for(var la=zt-M,xa=v(zt),Ba=Wt/xa,an=zti||k(Ba)>i)&&--an>0);return[Jr,la]},Br}var lr=fr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Tr(){return b.geoProjection(lr).scale(149.995)}var Ir=fr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Dr(){return b.geoProjection(Ir).scale(153.93)}var ot=fr(5/6*S,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kt(){return b.geoProjection(ot).scale(130.945)}function jt($e,nt){var mt=$e*$e,xt=nt*nt;return[$e*(1-.162388*xt)*(.87-952426e-9*mt*mt),nt*(1+xt/12)]}jt.invert=function($e,nt){var mt=$e,xt=nt,Bt=50,zt;do{var Wt=xt*xt;xt-=zt=(xt*(1+Wt/12)-nt)/(1+Wt/4)}while(k(zt)>i&&--Bt>0);Bt=50,$e/=1-.162388*Wt;do{var Pr=(Pr=mt*mt)*Pr;mt-=zt=(mt*(.87-952426e-9*Pr)-$e)/(.87-.00476213*Pr)}while(k(zt)>i&&--Bt>0);return[mt,xt]};function ar(){return b.geoProjection(jt).scale(131.747)}var Er=fr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function xr(){return b.geoProjection(Er).scale(131.087)}function zr($e){var nt=$e(M,0)[0]-$e(-M,0)[0];function mt(xt,Bt){var zt=xt>0?-.5:.5,Wt=$e(xt+zt*S,Bt);return Wt[0]-=zt*nt,Wt}return $e.invert&&(mt.invert=function(xt,Bt){var zt=xt>0?-.5:.5,Wt=$e.invert(xt+zt*nt,Bt),Pr=Wt[0]-zt*S;return Pr<-S?Pr+=2*S:Pr>S&&(Pr-=2*S),Wt[0]=Pr,Wt}),mt}function Lr($e,nt){var mt=f($e),xt=f(nt),Bt=t(nt),zt=t($e)*Bt,Wt=v($e)*Bt,Pr=v(xt*nt);$e=k(e(Wt,Pr)),nt=I(zt),k($e-M)>i&&($e%=M);var Br=aa($e>S/4?M-$e:$e,nt);return $e>S/4&&(Pr=Br[0],Br[0]=-Br[1],Br[1]=-Pr),Br[0]*=mt,Br[1]*=-xt,Br}Lr.invert=function($e,nt){k($e)>1&&($e=f($e)*2-$e),k(nt)>1&&(nt=f(nt)*2-nt);var mt=f($e),xt=f(nt),Bt=-mt*$e,zt=-xt*nt,Wt=zt/Bt<1,Pr=Sa(Wt?zt:Bt,Wt?Bt:zt),Br=Pr[0],kr=Pr[1],jr=t(kr);return Wt&&(Br=-M-Br),[mt*(e(v(Br)*jr,-v(kr))+S),xt*I(t(Br)*jr)]};function aa($e,nt){if(nt===M)return[0,0];var mt=v(nt),xt=mt*mt,Bt=xt*xt,zt=1+Bt,Wt=1+3*Bt,Pr=1-Bt,Br=I(1/D(zt)),kr=Pr+xt*zt*Br,jr=(1-mt)/kr,Jr=D(jr),la=jr*zt,xa=D(la),Ba=Jr*Pr,an,wn;if($e===0)return[0,-(Ba+xt*xa)];var ii=t(nt),Si=1/ii,oi=2*mt*ii,Ji=(-3*xt+Br*Wt)*oi,Qi=(-kr*ii-(1-mt)*Ji)/(kr*kr),Oo=.5*Qi/Jr,Qo=Pr*Oo-2*xt*Jr*oi,vo=xt*zt*Qi+jr*Wt*oi,ys=-Si*oi,ol=-Si*vo,jl=-2*Si*Qo,Hs=4*$e/S,Cu;if($e>.222*S||nt.175*S){if(an=(Ba+xt*D(la*(1+Bt)-Ba*Ba))/(1+Bt),$e>S/4)return[an,an];var hi=an,wi=.5*an;an=.5*(wi+hi),wn=50;do{var sl=D(la-an*an),sc=an*(jl+ys*sl)+ol*I(an/xa)-Hs;if(!sc)break;sc<0?wi=an:hi=an,an=.5*(wi+hi)}while(k(hi-wi)>i&&--wn>0)}else{an=i,wn=25;do{var tu=an*an,Ps=D(la-tu),gc=jl+ys*Ps,pu=an*gc+ol*I(an/xa)-Hs,ll=gc+(ol-ys*tu)/Ps;an-=Cu=Ps?pu/ll:0}while(k(Cu)>i&&--wn>0)}return[an,-Ba-xt*D(la-an*an)]}function Sa($e,nt){for(var mt=0,xt=1,Bt=.5,zt=50;;){var Wt=Bt*Bt,Pr=D(Bt),Br=I(1/D(1+Wt)),kr=1-Wt+Bt*(1+Wt)*Br,jr=(1-Pr)/kr,Jr=D(jr),la=jr*(1+Wt),xa=Jr*(1-Wt),Ba=la-$e*$e,an=D(Ba),wn=nt+xa+Bt*an;if(k(xt-mt)0?mt=Bt:xt=Bt,Bt=.5*(mt+xt)}if(!zt)return null;var ii=I(Pr),Si=t(ii),oi=1/Si,Ji=2*Pr*Si,Qi=(-3*Bt+Br*(1+3*Wt))*Ji,Oo=(-kr*Si-(1-Pr)*Qi)/(kr*kr),Qo=.5*Oo/Jr,vo=(1-Wt)*Qo-2*Bt*Jr*Ji,ys=-2*oi*vo,ol=-oi*Ji,jl=-oi*(Bt*(1+Wt)*Oo+jr*(1+3*Wt)*Ji);return[S/4*($e*(ys+ol*an)+jl*I($e/D(la))),ii]}function wa(){return b.geoProjection(zr(Lr)).scale(239.75)}function pn($e,nt,mt){var xt,Bt,zt;return $e?(xt=tn($e,mt),nt?(Bt=tn(nt,1-mt),zt=Bt[1]*Bt[1]+mt*xt[0]*xt[0]*Bt[0]*Bt[0],[[xt[0]*Bt[2]/zt,xt[1]*xt[2]*Bt[0]*Bt[1]/zt],[xt[1]*Bt[1]/zt,-xt[0]*xt[2]*Bt[0]*Bt[2]/zt],[xt[2]*Bt[1]*Bt[2]/zt,-mt*xt[0]*xt[1]*Bt[0]/zt]]):[[xt[0],0],[xt[1],0],[xt[2],0]]):(Bt=tn(nt,1-mt),[[0,Bt[0]/Bt[1]],[1/Bt[1],0],[Bt[2]/Bt[1],0]])}function tn($e,nt){var mt,xt,Bt,zt,Wt;if(nt=1-i)return mt=(1-nt)/4,xt=P($e),zt=B($e),Bt=1/xt,Wt=xt*F($e),[zt+mt*(Wt-$e)/(xt*xt),Bt-mt*zt*Bt*(Wt-$e),Bt+mt*zt*Bt*(Wt+$e),2*l(n($e))-M+mt*(Wt-$e)/xt];var Pr=[1,0,0,0,0,0,0,0,0],Br=[D(nt),0,0,0,0,0,0,0,0],kr=0;for(xt=D(1-nt),Wt=1;k(Br[kr]/Pr[kr])>i&&kr<8;)mt=Pr[kr++],Br[kr]=(mt-xt)/2,Pr[kr]=(mt+xt)/2,xt=D(mt*xt),Wt*=2;Bt=Wt*Pr[kr]*$e;do zt=Br[kr]*v(xt=Bt)/Pr[kr],Bt=(I(zt)+Bt)/2;while(--kr);return[v(Bt),zt=t(Bt),zt/t(Bt-xt),Bt]}function ai($e,nt,mt){var xt=k($e),Bt=k(nt),zt=F(Bt);if(xt){var Wt=1/v(xt),Pr=1/(m(xt)*m(xt)),Br=-(Pr+mt*(zt*zt*Wt*Wt)-1+mt),kr=(mt-1)*Pr,jr=(-Br+D(Br*Br-4*kr))/2;return[rn(l(1/D(jr)),mt)*f($e),rn(l(D((jr/Pr-1)/mt)),1-mt)*f(nt)]}return[0,rn(l(zt),1-mt)*f(nt)]}function rn($e,nt){if(!nt)return $e;if(nt===1)return a(m($e/2+C));for(var mt=1,xt=D(1-nt),Bt=D(nt),zt=0;k(Bt)>i;zt++){if($e%S){var Wt=l(xt*m($e)/mt);Wt<0&&(Wt+=S),$e+=Wt+~~($e/S)*S}else $e+=$e;Bt=(mt+xt)/2,xt=D(mt*xt),Bt=((mt=Bt)-xt)/2}return $e/(c(2,zt)*mt)}function Ri($e,nt){var mt=(w-1)/(w+1),xt=D(1-mt*mt),Bt=rn(M,xt*xt),zt=-1,Wt=a(m(S/4+k(nt)/2)),Pr=n(zt*Wt)/D(mt),Br=Gn(Pr*t(zt*$e),Pr*v(zt*$e)),kr=ai(Br[0],Br[1],xt*xt);return[-kr[1],(nt>=0?1:-1)*(.5*Bt-kr[0])]}function Gn($e,nt){var mt=$e*$e,xt=nt+1,Bt=1-mt-nt*nt;return[.5*(($e>=0?M:-M)-e(Bt,2*$e)),-.25*a(Bt*Bt+4*mt)+.5*a(xt*xt+mt)]}function no($e,nt){var mt=nt[0]*nt[0]+nt[1]*nt[1];return[($e[0]*nt[0]+$e[1]*nt[1])/mt,($e[1]*nt[0]-$e[0]*nt[1])/mt]}Ri.invert=function($e,nt){var mt=(w-1)/(w+1),xt=D(1-mt*mt),Bt=rn(M,xt*xt),zt=-1,Wt=pn(.5*Bt-nt,-$e,xt*xt),Pr=no(Wt[0],Wt[1]),Br=e(Pr[1],Pr[0])/zt;return[Br,2*l(n(.5/zt*a(mt*Pr[0]*Pr[0]+mt*Pr[1]*Pr[1])))-M]};function Di(){return b.geoProjection(zr(Ri)).scale(151.496)}function fn($e){var nt=v($e),mt=t($e),xt=Ai($e);xt.invert=Ai(-$e);function Bt(zt,Wt){var Pr=xt(zt,Wt);zt=Pr[0],Wt=Pr[1];var Br=v(Wt),kr=t(Wt),jr=t(zt),Jr=O(nt*Br+mt*kr*jr),la=v(Jr),xa=k(la)>i?Jr/la:1;return[xa*mt*v(zt),(k(zt)>M?xa:-xa)*(nt*kr-mt*Br*jr)]}return Bt.invert=function(zt,Wt){var Pr=D(zt*zt+Wt*Wt),Br=-v(Pr),kr=t(Pr),jr=Pr*kr,Jr=-Wt*Br,la=Pr*nt,xa=D(jr*jr+Jr*Jr-la*la),Ba=e(jr*la+Jr*xa,Jr*la-jr*xa),an=(Pr>M?-1:1)*e(zt*Br,Pr*t(Ba)*kr+Wt*v(Ba)*Br);return xt.invert(an,Ba)},Bt}function Ai($e){var nt=v($e),mt=t($e);return function(xt,Bt){var zt=t(Bt),Wt=t(xt)*zt,Pr=v(xt)*zt,Br=v(Bt);return[e(Pr,Wt*mt-Br*nt),I(Br*mt+Wt*nt)]}}function jn(){var $e=0,nt=b.geoProjectionMutator(fn),mt=nt($e),xt=mt.rotate,Bt=mt.stream,zt=b.geoCircle();return mt.parallel=function(Wt){if(!arguments.length)return $e*A;var Pr=mt.rotate();return nt($e=Wt*x).rotate(Pr)},mt.rotate=function(Wt){return arguments.length?(xt.call(mt,[Wt[0],Wt[1]-$e*A]),zt.center([-Wt[0],-Wt[1]]),mt):(Wt=xt.call(mt),Wt[1]+=$e*A,Wt)},mt.stream=function(Wt){return Wt=Bt(Wt),Wt.sphere=function(){Wt.polygonStart();var Pr=.01,Br=zt.radius(90-Pr)().coordinates[0],kr=Br.length-1,jr=-1,Jr;for(Wt.lineStart();++jr=0;)Wt.point((Jr=Br[jr])[0],Jr[1]);Wt.lineEnd(),Wt.polygonEnd()},Wt},mt.scale(79.4187).parallel(45).clipAngle(180-.001)}var Xn=3,eo=I(1-1/Xn)*A,gi=Ct(0);function qi($e){var nt=eo*x,mt=We(S,nt)[0]-We(-S,nt)[0],xt=gi(0,nt)[1],Bt=We(0,nt)[1],zt=h-Bt,Wt=u/$e,Pr=4/u,Br=xt+zt*zt*4/u;function kr(jr,Jr){var la,xa=k(Jr);if(xa>nt){var Ba=s($e-1,o(0,r((jr+S)/Wt)));jr+=S*($e-1)/$e-Ba*Wt,la=We(jr,xa),la[0]=la[0]*u/mt-u*($e-1)/(2*$e)+Ba*u/$e,la[1]=xt+(la[1]-Bt)*4*zt/u,Jr<0&&(la[1]=-la[1])}else la=gi(jr,Jr);return la[0]*=Pr,la[1]/=Br,la}return kr.invert=function(jr,Jr){jr/=Pr,Jr*=Br;var la=k(Jr);if(la>xt){var xa=s($e-1,o(0,r((jr+S)/Wt)));jr=(jr+S*($e-1)/$e-xa*Wt)*mt/u;var Ba=We.invert(jr,.25*(la-xt)*u/zt+Bt);return Ba[0]-=S*($e-1)/$e-xa*Wt,Jr<0&&(Ba[1]=-Ba[1]),Ba}return gi.invert(jr,Jr)},kr}function io($e,nt){return[$e,nt&1?90-i:eo]}function oo($e,nt){return[$e,nt&1?-90+i:-eo]}function Vn($e){return[$e[0]*(1-i),$e[1]]}function qn($e){var nt=[].concat(E.range(-180,180+$e/2,$e).map(io),E.range(180,-180-$e/2,-$e).map(oo));return{type:"Polygon",coordinates:[$e===180?nt.map(Vn):nt]}}function Hi(){var $e=4,nt=b.geoProjectionMutator(qi),mt=nt($e),xt=mt.stream;return mt.lobes=function(Bt){return arguments.length?nt($e=+Bt):$e},mt.stream=function(Bt){var zt=mt.rotate(),Wt=xt(Bt),Pr=(mt.rotate([0,0]),xt(Bt));return mt.rotate(zt),Wt.sphere=function(){b.geoStream(qn(180/$e),Pr)},Wt},mt.scale(239.75)}function Mi($e){var nt=1+$e,mt=v(1/nt),xt=I(mt),Bt=2*D(S/(zt=S+4*xt*nt)),zt,Wt=.5*Bt*(nt+D($e*(2+$e))),Pr=$e*$e,Br=nt*nt;function kr(jr,Jr){var la=1-v(Jr),xa,Ba;if(la&&la<2){var an=M-Jr,wn=25,ii;do{var Si=v(an),oi=t(an),Ji=xt+e(Si,nt-oi),Qi=1+Br-2*nt*oi;an-=ii=(an-Pr*xt-nt*Si+Qi*Ji-.5*la*zt)/(2*nt*Si*Ji)}while(k(ii)>T&&--wn>0);xa=Bt*D(Qi),Ba=jr*Ji/S}else xa=Bt*($e+la),Ba=jr*xt/S;return[xa*v(Ba),Wt-xa*t(Ba)]}return kr.invert=function(jr,Jr){var la=jr*jr+(Jr-=Wt)*Jr,xa=(1+Br-la/(Bt*Bt))/(2*nt),Ba=O(xa),an=v(Ba),wn=xt+e(an,nt-xa);return[I(jr/D(la))*S/wn,I(1-2*(Ba-Pr*xt-nt*an+(1+Br-2*nt*xa)*wn)/zt)]},kr}function Ro(){var $e=1,nt=b.geoProjectionMutator(Mi),mt=nt($e);return mt.ratio=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(167.774).center([0,18.67])}var go=.7109889596207567,Eo=.0528035274542;function Ao($e,nt){return nt>-go?($e=_e($e,nt),$e[1]+=Eo,$e):Ye($e,nt)}Ao.invert=function($e,nt){return nt>-go?_e.invert($e,nt-Eo):Ye.invert($e,nt)};function ds(){return b.geoProjection(Ao).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function jo($e,nt){return k(nt)>go?($e=_e($e,nt),$e[1]-=nt>0?Eo:-Eo,$e):Ye($e,nt)}jo.invert=function($e,nt){return k(nt)>go?_e.invert($e,nt+(nt>0?Eo:-Eo)):Ye.invert($e,nt)};function Wo(){return b.geoProjection(jo).scale(152.63)}function to($e,nt,mt,xt){var Bt=D(4*S/(2*mt+(1+$e-nt/2)*v(2*mt)+($e+nt)/2*v(4*mt)+nt/2*v(6*mt))),zt=D(xt*v(mt)*D((1+$e*t(2*mt)+nt*t(4*mt))/(1+$e+nt))),Wt=mt*Br(1);function Pr(Jr){return D(1+$e*t(2*Jr)+nt*t(4*Jr))}function Br(Jr){var la=Jr*mt;return(2*la+(1+$e-nt/2)*v(2*la)+($e+nt)/2*v(4*la)+nt/2*v(6*la))/mt}function kr(Jr){return Pr(Jr)*v(Jr)}var jr=function(Jr,la){var xa=mt*Me(Br,Wt*v(la)/mt,la/S);isNaN(xa)&&(xa=mt*f(la));var Ba=Bt*Pr(xa);return[Ba*zt*Jr/S*t(xa),Ba/zt*v(xa)]};return jr.invert=function(Jr,la){var xa=Me(kr,la*zt/Bt);return[Jr*S/(t(xa)*Bt*zt*Pr(xa)),I(mt*Br(xa/mt)/Wt)]},mt===0&&(Bt=D(xt/S),jr=function(Jr,la){return[Jr*Bt,v(la)/Bt]},jr.invert=function(Jr,la){return[Jr/Bt,I(la*Bt)]}),jr}function wo(){var $e=1,nt=0,mt=45*x,xt=2,Bt=b.geoProjectionMutator(to),zt=Bt($e,nt,mt,xt);return zt.a=function(Wt){return arguments.length?Bt($e=+Wt,nt,mt,xt):$e},zt.b=function(Wt){return arguments.length?Bt($e,nt=+Wt,mt,xt):nt},zt.psiMax=function(Wt){return arguments.length?Bt($e,nt,mt=+Wt*x,xt):mt*A},zt.ratio=function(Wt){return arguments.length?Bt($e,nt,mt,xt=+Wt):xt},zt.scale(180.739)}function pi($e,nt,mt,xt,Bt,zt,Wt,Pr,Br,kr,jr){if(jr.nanEncountered)return NaN;var Jr,la,xa,Ba,an,wn,ii,Si,oi,Ji;if(Jr=mt-nt,la=$e(nt+Jr*.25),xa=$e(mt-Jr*.25),isNaN(la)){jr.nanEncountered=!0;return}if(isNaN(xa)){jr.nanEncountered=!0;return}return Ba=Jr*(xt+4*la+Bt)/12,an=Jr*(Bt+4*xa+zt)/12,wn=Ba+an,Ji=(wn-Wt)/15,kr>Br?(jr.maxDepthCount++,wn+Ji):Math.abs(Ji)>1;do Br[wn]>xa?an=wn:Ba=wn,wn=Ba+an>>1;while(wn>Ba);var ii=Br[wn+1]-Br[wn];return ii&&(ii=(xa-Br[wn+1])/ii),(wn+1+ii)/Wt}var Jr=2*jr(1)/S*zt/mt,la=function(xa,Ba){var an=jr(k(v(Ba))),wn=xt(an)*xa;return an/=Jr,[wn,Ba>=0?an:-an]};return la.invert=function(xa,Ba){var an;return Ba*=Jr,k(Ba)<1&&(an=f(Ba)*I(Bt(k(Ba))*zt)),[xa/xt(k(Ba)),an]},la}function Zi(){var $e=0,nt=2.5,mt=1.183136,xt=b.geoProjectionMutator(Io),Bt=xt($e,nt,mt);return Bt.alpha=function(zt){return arguments.length?xt($e=+zt,nt,mt):$e},Bt.k=function(zt){return arguments.length?xt($e,nt=+zt,mt):nt},Bt.gamma=function(zt){return arguments.length?xt($e,nt,mt=+zt):mt},Bt.scale(152.63)}function Ko($e,nt){return k($e[0]-nt[0])=0;--Br)mt=$e[1][Br],xt=mt[0][0],Bt=mt[0][1],zt=mt[1][1],Wt=mt[2][0],Pr=mt[2][1],nt.push(Uo([[Wt-i,Pr-i],[Wt-i,zt+i],[xt+i,zt+i],[xt+i,Bt-i]],30));return{type:"Polygon",coordinates:[E.merge(nt)]}}function Ss($e,nt,mt){var xt,Bt;function zt(Br,kr){for(var jr=kr<0?-1:1,Jr=nt[+(kr<0)],la=0,xa=Jr.length-1;laJr[la][2][0];++la);var Ba=$e(Br-Jr[la][1][0],kr);return Ba[0]+=$e(Jr[la][1][0],jr*kr>jr*Jr[la][0][1]?Jr[la][0][1]:kr)[0],Ba}mt?zt.invert=mt(zt):$e.invert&&(zt.invert=function(Br,kr){for(var jr=Bt[+(kr<0)],Jr=nt[+(kr<0)],la=0,xa=jr.length;laBa&&(an=xa,xa=Ba,Ba=an),[[Jr,xa],[la,Ba]]})}),Wt):nt.map(function(kr){return kr.map(function(jr){return[[jr[0][0]*A,jr[0][1]*A],[jr[1][0]*A,jr[1][1]*A],[jr[2][0]*A,jr[2][1]*A]]})})},nt!=null&&Wt.lobes(nt),Wt}var Vo=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Vs(){return Ss(Ae,Vo).scale(160.857)}var Ts=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Bo(){return Ss(jo,Ts).scale(152.63)}var _o=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Pi(){return Ss(_e,_o).scale(169.529)}var yo=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function bs(){return Ss(_e,yo).scale(169.529).rotate([20,0])}var Dl=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function hl(){return Ss(Ao,Dl,Se).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var ps=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function dl(){return Ss(Ye,ps).scale(152.63).rotate([-20,0])}function wu($e,nt){return[3/u*$e*D(S*S/3-nt*nt),nt]}wu.invert=function($e,nt){return[u/3*$e/D(S*S/3-nt*nt),nt]};function lu(){return b.geoProjection(wu).scale(158.837)}function xc($e){function nt(mt,xt){if(k(k(xt)-M)2)return null;mt/=2,xt/=2;var zt=mt*mt,Wt=xt*xt,Pr=2*xt/(1+zt+Wt);return Pr=c((1+Pr)/(1-Pr),1/$e),[e(2*mt,1-zt-Wt)/$e,I((Pr-1)/(Pr+1))]},nt}function Fl(){var $e=.5,nt=b.geoProjectionMutator(xc),mt=nt($e);return mt.spacing=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(124.75)}var pl=S/w;function $u($e,nt){return[$e*(1+D(t(nt)))/2,nt/(t(nt/2)*t($e/6))]}$u.invert=function($e,nt){var mt=k($e),xt=k(nt),Bt=i,zt=M;xti||k(wn)>i)&&--Bt>0);return Bt&&[mt,xt]};function vs(){return b.geoProjection(tl).scale(139.98)}function os($e,nt){return[v($e)/t(nt),m(nt)*t($e)]}os.invert=function($e,nt){var mt=$e*$e,xt=nt*nt,Bt=xt+1,zt=mt+Bt,Wt=$e?_*D((zt-D(zt*zt-4*mt))/mt):1/D(Bt);return[I($e*Wt),f(nt)*O(Wt)]};function ms(){return b.geoProjection(os).scale(144.049).clipAngle(90-.001)}function rl($e){var nt=t($e),mt=m(C+$e/2);function xt(Bt,zt){var Wt=zt-$e,Pr=k(Wt)=0;)jr=$e[kr],Jr=jr[0]+Pr*(xa=Jr)-Br*la,la=jr[1]+Pr*la+Br*xa;return Jr=Pr*(xa=Jr)-Br*la,la=Pr*la+Br*xa,[Jr,la]}return mt.invert=function(xt,Bt){var zt=20,Wt=xt,Pr=Bt;do{for(var Br=nt,kr=$e[Br],jr=kr[0],Jr=kr[1],la=0,xa=0,Ba;--Br>=0;)kr=$e[Br],la=jr+Wt*(Ba=la)-Pr*xa,xa=Jr+Wt*xa+Pr*Ba,jr=kr[0]+Wt*(Ba=jr)-Pr*Jr,Jr=kr[1]+Wt*Jr+Pr*Ba;la=jr+Wt*(Ba=la)-Pr*xa,xa=Jr+Wt*xa+Pr*Ba,jr=Wt*(Ba=jr)-Pr*Jr-xt,Jr=Wt*Jr+Pr*Ba-Bt;var an=la*la+xa*xa,wn,ii;Wt-=wn=(jr*la+Jr*xa)/an,Pr-=ii=(Jr*la-jr*xa)/an}while(k(wn)+k(ii)>i*i&&--zt>0);if(zt){var Si=D(Wt*Wt+Pr*Pr),oi=2*l(Si*.5),Ji=v(oi);return[e(Wt*Ji,Si*t(oi)),Si?I(Pr*Ji/Si):0]}},mt}var Lh=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],rh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ju=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ss=[[.9245,0],[0,0],[.01943,0]],ah=[[.721316,0],[0,0],[-.00881625,-.00617325]];function wc(){return Ou(Lh,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function pc(){return Ou(rh,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Nf(){return Ou(Ju,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Bu(){return Ou(ss,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Tc(){return Ou(ah,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ou($e,nt){var mt=b.geoProjection(bc($e)).rotate(nt).clipAngle(90),xt=b.geoRotation(nt),Bt=mt.center;return delete mt.rotate,mt.center=function(zt){return arguments.length?Bt(xt(zt)):xt.invert(Bt())},mt}var Gc=D(6),pf=D(7);function $l($e,nt){var mt=I(7*v(nt)/(3*Gc));return[Gc*$e*(2*t(2*mt/3)-1)/pf,9*v(mt/3)/pf]}$l.invert=function($e,nt){var mt=3*I(nt*pf/9);return[$e*pf/(Gc*(2*t(2*mt/3)-1)),I(v(mt)*3*Gc/7)]};function jf(){return b.geoProjection($l).scale(164.859)}function Hc($e,nt){for(var mt=(1+_)*v(nt),xt=nt,Bt=0,zt;Bt<25&&(xt-=zt=(v(xt/2)+v(xt)-mt)/(.5*t(xt/2)+t(xt)),!(k(zt)T&&--xt>0);return zt=mt*mt,Wt=zt*zt,Pr=zt*Wt,[$e/(.84719-.13063*zt+Pr*Pr*(-.04515+.05494*zt-.02326*Wt+.00331*Pr)),mt]};function Uf(){return b.geoProjection(Nu).scale(175.295)}function al($e,nt){return[$e*(1+t(nt))/2,2*(nt-m(nt/2))]}al.invert=function($e,nt){for(var mt=nt/2,xt=0,Bt=1/0;xt<10&&k(Bt)>i;++xt){var zt=t(nt/2);nt-=Bt=(nt-m(nt/2)-mt)/(1-.5/(zt*zt))}return[2*$e/(1+t(nt)),nt]};function Xc(){return b.geoProjection(al).scale(152.63)}var ju=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Ac(){return Ss(he(1/0),ju).rotate([20,0]).scale(152.63)}function Zc($e,nt){var mt=v(nt),xt=t(nt),Bt=f($e);if($e===0||k(nt)===M)return[0,nt];if(nt===0)return[$e,0];if(k($e)===M)return[$e*xt,M*mt];var zt=S/(2*$e)-2*$e/S,Wt=2*nt/S,Pr=(1-Wt*Wt)/(mt-Wt),Br=zt*zt,kr=Pr*Pr,jr=1+Br/kr,Jr=1+kr/Br,la=(zt*mt/Pr-zt/2)/jr,xa=(kr*mt/Br+Pr/2)/Jr,Ba=la*la+xt*xt/jr,an=xa*xa-(kr*mt*mt/Br+Pr*mt-1)/Jr;return[M*(la+D(Ba)*Bt),M*(xa+D(an<0?0:an)*f(-nt*zt)*Bt)]}Zc.invert=function($e,nt){$e/=M,nt/=M;var mt=$e*$e,xt=nt*nt,Bt=mt+xt,zt=S*S;return[$e?(Bt-1+D((1-Bt)*(1-Bt)+4*mt))/(2*$e)*M:0,Me(function(Wt){return Bt*(S*v(Wt)-2*Wt)*S+4*Wt*Wt*(nt-v(Wt))+2*S*Wt-zt*nt},0)]};function ec(){return b.geoProjection(Zc).scale(127.267)}var cu=1.0148,tc=.23185,vf=-.14499,Tu=.02406,nh=cu,vl=5*tc,ml=7*vf,rc=9*Tu,yl=1.790857183;function qf($e,nt){var mt=nt*nt;return[$e,nt*(cu+mt*mt*(tc+mt*(vf+Tu*mt)))]}qf.invert=function($e,nt){nt>yl?nt=yl:nt<-yl&&(nt=-yl);var mt=nt,xt;do{var Bt=mt*mt;mt-=xt=(mt*(cu+Bt*Bt*(tc+Bt*(vf+Tu*Bt)))-nt)/(nh+Bt*Bt*(vl+Bt*(ml+rc*Bt)))}while(k(xt)>i);return[$e,mt]};function ac(){return b.geoProjection(qf).scale(139.319)}function Mc($e,nt){if(k(nt)i&&--Bt>0);return Wt=m(xt),[(k(nt)=0;)if(xt=nt[Pr],mt[0]===xt[0]&&mt[1]===xt[1]){if(zt)return[zt,mt];zt=mt}}}function gf($e){for(var nt=$e.length,mt=[],xt=$e[nt-1],Bt=0;Bt0?[-xt[0],0]:[180-xt[0],180])};var nt=hu.map(function(mt){return{face:mt,project:$e(mt)}});return[-1,0,0,1,0,1,4,5].forEach(function(mt,xt){var Bt=nt[mt];Bt&&(Bt.children||(Bt.children=[])).push(nt[xt])}),Au(nt[0],function(mt,xt){return nt[mt<-S/2?xt<0?6:4:mt<0?xt<0?2:0:mtxt^xa>xt&&mt<(la-kr)*(xt-jr)/(xa-jr)+kr&&(Bt=!Bt)}return Bt}function Vf($e,nt){var mt=nt.stream,xt;if(!mt)throw new Error("invalid projection");switch($e&&$e.type){case"Feature":xt=Gf;break;case"FeatureCollection":xt=xf;break;default:xt=Hf;break}return xt($e,mt)}function xf($e,nt){return{type:"FeatureCollection",features:$e.features.map(function(mt){return Gf(mt,nt)})}}function Gf($e,nt){return{type:"Feature",id:$e.id,properties:$e.properties,geometry:Hf($e.geometry,nt)}}function bh($e,nt){return{type:"GeometryCollection",geometries:$e.geometries.map(function(mt){return Hf(mt,nt)})}}function Hf($e,nt){if(!$e)return null;if($e.type==="GeometryCollection")return bh($e,nt);var mt;switch($e.type){case"Point":mt=kc;break;case"MultiPoint":mt=kc;break;case"LineString":mt=Cc;break;case"MultiLineString":mt=Cc;break;case"Polygon":mt=Lc;break;case"MultiPolygon":mt=Lc;break;case"Sphere":mt=Lc;break;default:return null}return b.geoStream($e,nt(mt)),mt.result()}var il=[],kl=[],kc={point:function($e,nt){il.push([$e,nt])},result:function(){var $e=il.length?il.length<2?{type:"Point",coordinates:il[0]}:{type:"MultiPoint",coordinates:il}:null;return il=[],$e}},Cc={lineStart:xo,point:function($e,nt){il.push([$e,nt])},lineEnd:function(){il.length&&(kl.push(il),il=[])},result:function(){var $e=kl.length?kl.length<2?{type:"LineString",coordinates:kl[0]}:{type:"MultiLineString",coordinates:kl}:null;return kl=[],$e}},Lc={polygonStart:xo,lineStart:xo,point:function($e,nt){il.push([$e,nt])},lineEnd:function(){var $e=il.length;if($e){do il.push(il[0].slice());while(++$e<4);kl.push(il),il=[]}},polygonEnd:xo,result:function(){if(!kl.length)return null;var $e=[],nt=[];return kl.forEach(function(mt){Ec(mt)?$e.push([mt]):nt.push(mt)}),nt.forEach(function(mt){var xt=mt[0];$e.some(function(Bt){if(xh(Bt[0],xt))return Bt.push(mt),!0})||$e.push([mt])}),kl=[],$e.length?$e.length>1?{type:"MultiPolygon",coordinates:$e}:{type:"Polygon",coordinates:$e[0]}:null}};function vc($e){var nt=$e(M,0)[0]-$e(-M,0)[0];function mt(xt,Bt){var zt=k(xt)0?xt-S:xt+S,Bt),Pr=(Wt[0]-Wt[1])*_,Br=(Wt[0]+Wt[1])*_;if(zt)return[Pr,Br];var kr=nt*_,jr=Pr>0^Br>0?-1:1;return[jr*Pr-f(Br)*kr,jr*Br-f(Pr)*kr]}return $e.invert&&(mt.invert=function(xt,Bt){var zt=(xt+Bt)*_,Wt=(Bt-xt)*_,Pr=k(zt)<.5*nt&&k(Wt)<.5*nt;if(!Pr){var Br=nt*_,kr=zt>0^Wt>0?-1:1,jr=-kr*xt+(Wt>0?1:-1)*Br,Jr=-kr*Bt+(zt>0?1:-1)*Br;zt=(-jr-Jr)*_,Wt=(jr-Jr)*_}var la=$e.invert(zt,Wt);return Pr||(la[0]+=zt>0?S:-S),la}),b.geoProjection(mt).rotate([-90,-90,45]).clipAngle(180-.001)}function Ft(){return vc(Lr).scale(176.423)}function tr(){return vc(Ri).scale(111.48)}function Fr($e,nt){if(!(0<=(nt=+nt)&&nt<=20))throw new Error("invalid digits");function mt(kr){var jr=kr.length,Jr=2,la=new Array(jr);for(la[0]=+kr[0].toFixed(nt),la[1]=+kr[1].toFixed(nt);Jr2||xa[0]!=jr[0]||xa[1]!=jr[1])&&(Jr.push(xa),jr=xa)}return Jr.length===1&&kr.length>1&&Jr.push(mt(kr[kr.length-1])),Jr}function zt(kr){return kr.map(Bt)}function Wt(kr){if(kr==null)return kr;var jr;switch(kr.type){case"GeometryCollection":jr={type:"GeometryCollection",geometries:kr.geometries.map(Wt)};break;case"Point":jr={type:"Point",coordinates:mt(kr.coordinates)};break;case"MultiPoint":jr={type:kr.type,coordinates:xt(kr.coordinates)};break;case"LineString":jr={type:kr.type,coordinates:Bt(kr.coordinates)};break;case"MultiLineString":case"Polygon":jr={type:kr.type,coordinates:zt(kr.coordinates)};break;case"MultiPolygon":jr={type:"MultiPolygon",coordinates:kr.coordinates.map(zt)};break;default:return kr}return kr.bbox!=null&&(jr.bbox=kr.bbox),jr}function Pr(kr){var jr={type:"Feature",properties:kr.properties,geometry:Wt(kr.geometry)};return kr.id!=null&&(jr.id=kr.id),kr.bbox!=null&&(jr.bbox=kr.bbox),jr}if($e!=null)switch($e.type){case"Feature":return Pr($e);case"FeatureCollection":{var Br={type:"FeatureCollection",features:$e.features.map(Pr)};return $e.bbox!=null&&(Br.bbox=$e.bbox),Br}default:return Wt($e)}return $e}function wr($e){var nt=v($e);function mt(xt,Bt){var zt=nt?m(xt*nt/2)/nt:xt/2;if(!Bt)return[2*zt,-$e];var Wt=2*l(zt*v(Bt)),Pr=1/m(Bt);return[v(Wt)*Pr,Bt+(1-t(Wt))*Pr-$e]}return mt.invert=function(xt,Bt){if(k(Bt+=$e)i&&--Pr>0);var la=xt*(kr=m(Wt)),xa=m(k(Bt)0?M:-M)*(Br+Bt*(jr-Wt)/2+Bt*Bt*(jr-2*Br+Wt)/2)]}Ia.invert=function($e,nt){var mt=nt/M,xt=mt*90,Bt=s(18,k(xt/5)),zt=o(0,r(Bt));do{var Wt=ba[zt][1],Pr=ba[zt+1][1],Br=ba[s(19,zt+2)][1],kr=Br-Wt,jr=Br-2*Pr+Wt,Jr=2*(k(mt)-Pr)/kr,la=jr/kr,xa=Jr*(1-la*Jr*(1-2*la*Jr));if(xa>=0||zt===1){xt=(nt>=0?5:-5)*(xa+Bt);var Ba=50,an;do Bt=s(18,k(xt)/5),zt=r(Bt),xa=Bt-zt,Wt=ba[zt][1],Pr=ba[zt+1][1],Br=ba[s(19,zt+2)][1],xt-=(an=(nt>=0?M:-M)*(Pr+xa*(Br-Wt)/2+xa*xa*(Br-2*Pr+Wt)/2)-nt)*A;while(k(an)>T&&--Ba>0);break}}while(--zt>=0);var wn=ba[zt][0],ii=ba[zt+1][0],Si=ba[s(19,zt+2)][0];return[$e/(ii+xa*(Si-wn)/2+xa*xa*(Si-2*ii+wn)/2),xt*x]};function Na(){return b.geoProjection(Ia).scale(152.63)}function Za($e){function nt(mt,xt){var Bt=t(xt),zt=($e-1)/($e-Bt*t(mt));return[zt*Bt*v(mt),zt*v(xt)]}return nt.invert=function(mt,xt){var Bt=mt*mt+xt*xt,zt=D(Bt),Wt=($e-D(1-Bt*($e+1)/($e-1)))/(($e-1)/zt+zt/($e-1));return[e(mt*Wt,zt*D(1-Wt*Wt)),zt?I(xt*Wt/zt):0]},nt}function mn($e,nt){var mt=Za($e);if(!nt)return mt;var xt=t(nt),Bt=v(nt);function zt(Wt,Pr){var Br=mt(Wt,Pr),kr=Br[1],jr=kr*Bt/($e-1)+xt;return[Br[0]*xt/jr,kr/jr]}return zt.invert=function(Wt,Pr){var Br=($e-1)/($e-1-Pr*Bt);return mt.invert(Br*Wt,Br*Pr*xt)},zt}function Da(){var $e=2,nt=0,mt=b.geoProjectionMutator(mn),xt=mt($e,nt);return xt.distance=function(Bt){return arguments.length?mt($e=+Bt,nt):$e},xt.tilt=function(Bt){return arguments.length?mt($e,nt=Bt*x):nt*A},xt.scale(432.147).clipAngle(O(1/$e)*A-1e-6)}var Ha=1e-4,$a=1e4,vn=-180,Sn=vn+Ha,yi=180,_i=yi-Ha,ki=-90,ri=ki+Ha,En=90,Ln=En-Ha;function Ni($e){return $e.length>0}function $i($e){return Math.floor($e*$a)/$a}function Co($e){return $e===ki||$e===En?[0,$e]:[vn,$i($e)]}function Do($e){var nt=$e[0],mt=$e[1],xt=!1;return nt<=Sn?(nt=vn,xt=!0):nt>=_i&&(nt=yi,xt=!0),mt<=ri?(mt=ki,xt=!0):mt>=Ln&&(mt=En,xt=!0),xt?[nt,mt]:$e}function Fo($e){return $e.map(Do)}function Yo($e,nt,mt){for(var xt=0,Bt=$e.length;xt=_i||jr<=ri||jr>=Ln){zt[Wt]=Do(Br);for(var Jr=Wt+1;JrSn&&xa<_i&&Ba>ri&&Ba=Pr)break;mt.push({index:-1,polygon:nt,ring:zt=zt.slice(Jr-1)}),zt[0]=Co(zt[0][1]),Wt=-1,Pr=zt.length}}}}function bo($e){var nt,mt=$e.length,xt={},Bt={},zt,Wt,Pr,Br,kr;for(nt=0;nt0?S-Pr:Pr)*A],kr=b.geoProjection($e(Wt)).rotate(Br),jr=b.geoRotation(Br),Jr=kr.center;return delete kr.rotate,kr.center=function(la){return arguments.length?Jr(jr(la)):jr.invert(Jr())},kr.clipAngle(90)}function js($e){var nt=t($e);function mt(xt,Bt){var zt=b.geoGnomonicRaw(xt,Bt);return zt[0]*=nt,zt}return mt.invert=function(xt,Bt){return b.geoGnomonicRaw.invert(xt/nt,Bt)},mt}function Cl(){return zl([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function zl($e,nt){return gs(js,$e,nt)}function Kl($e){if(!($e*=2))return b.geoAzimuthalEquidistantRaw;var nt=-$e/2,mt=-nt,xt=$e*$e,Bt=m(mt),zt=.5/v(mt);function Wt(Pr,Br){var kr=O(t(Br)*t(Pr-nt)),jr=O(t(Br)*t(Pr-mt)),Jr=Br<0?-1:1;return kr*=kr,jr*=jr,[(kr-jr)/(2*$e),Jr*D(4*xt*jr-(xt-kr+jr)*(xt-kr+jr))/(2*$e)]}return Wt.invert=function(Pr,Br){var kr=Br*Br,jr=t(D(kr+(la=Pr+nt)*la)),Jr=t(D(kr+(la=Pr+mt)*la)),la,xa;return[e(xa=jr-Jr,la=(jr+Jr)*Bt),(Br<0?-1:1)*O(D(la*la+xa*xa)*zt)]},Wt}function Gu(){return xl([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function xl($e,nt){return gs(Kl,$e,nt)}function Hu($e,nt){if(k(nt)i&&--Pr>0);return[f($e)*(D(Bt*Bt+4)+Bt)*S/4,M*Wt]};function Ql(){return b.geoProjection(Jl).scale(127.16)}function Eu($e,nt,mt,xt,Bt){function zt(Wt,Pr){var Br=mt*v(xt*Pr),kr=D(1-Br*Br),jr=D(2/(1+kr*t(Wt*=Bt)));return[$e*kr*jr*v(Wt),nt*Br*jr]}return zt.invert=function(Wt,Pr){var Br=Wt/$e,kr=Pr/nt,jr=D(Br*Br+kr*kr),Jr=2*I(jr/2);return[e(Wt*m(Jr),$e*jr)/Bt,jr&&I(Pr*v(Jr)/(nt*mt*jr))/xt]},zt}function bf($e,nt,mt,xt){var Bt=S/3;$e=o($e,i),nt=o(nt,i),$e=s($e,M),nt=s(nt,S-i),mt=o(mt,0),mt=s(mt,100-i),xt=o(xt,i);var zt=mt/100+1,Wt=xt/100,Pr=O(zt*t(Bt))/Bt,Br=v($e)/v(Pr*M),kr=nt/S,jr=D(Wt*v($e/2)/v(nt/2)),Jr=jr/D(kr*Br*Pr),la=1/(jr*D(kr*Br*Pr));return Eu(Jr,la,Br,Pr,kr)}function lh(){var $e=65*x,nt=60*x,mt=20,xt=200,Bt=b.geoProjectionMutator(bf),zt=Bt($e,nt,mt,xt);return zt.poleline=function(Wt){return arguments.length?Bt($e=+Wt*x,nt,mt,xt):$e*A},zt.parallels=function(Wt){return arguments.length?Bt($e,nt=+Wt*x,mt,xt):nt*A},zt.inflation=function(Wt){return arguments.length?Bt($e,nt,mt=+Wt,xt):mt},zt.ratio=function(Wt){return arguments.length?Bt($e,nt,mt,xt=+Wt):xt},zt.scale(163.775)}function Pc(){return lh().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Ks=4*S+3*D(3),Bl=2*D(2*S*D(3)/Ks),Wu=ke(Bl*D(3)/S,Bl,Ks/6);function wf(){return b.geoProjection(Wu).scale(176.84)}function Qc($e,nt){return[$e*D(1-3*nt*nt/(S*S)),nt]}Qc.invert=function($e,nt){return[$e/D(1-3*nt*nt/(S*S)),nt]};function ku(){return b.geoProjection(Qc).scale(152.63)}function Ol($e,nt){var mt=t(nt),xt=t($e)*mt,Bt=1-xt,zt=t($e=e(v($e)*mt,-v(nt))),Wt=v($e);return mt=D(1-xt*xt),[Wt*mt-zt*Bt,-zt*mt-Wt*Bt]}Ol.invert=function($e,nt){var mt=($e*$e+nt*nt)/-2,xt=D(-mt*(2+mt)),Bt=nt*mt+$e*xt,zt=$e*mt-nt*xt,Wt=D(zt*zt+Bt*Bt);return[e(xt*Bt,Wt*(1+mt)),Wt?-I(xt*zt/Wt):0]};function Nl(){return b.geoProjection(Ol).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function fi($e,nt){var mt=re($e,nt);return[(mt[0]+$e/M)/2,(mt[1]+nt)/2]}fi.invert=function($e,nt){var mt=$e,xt=nt,Bt=25;do{var zt=t(xt),Wt=v(xt),Pr=v(2*xt),Br=Wt*Wt,kr=zt*zt,jr=v(mt),Jr=t(mt/2),la=v(mt/2),xa=la*la,Ba=1-kr*Jr*Jr,an=Ba?O(zt*Jr)*D(wn=1/Ba):wn=0,wn,ii=.5*(2*an*zt*la+mt/M)-$e,Si=.5*(an*Wt+xt)-nt,oi=.5*wn*(kr*xa+an*zt*Jr*Br)+.5/M,Ji=wn*(jr*Pr/4-an*Wt*la),Qi=.125*wn*(Pr*la-an*Wt*kr*jr),Oo=.5*wn*(Br*Jr+an*xa*zt)+.5,Qo=Ji*Qi-Oo*oi,vo=(Si*Ji-ii*Oo)/Qo,ys=(ii*Qi-Si*oi)/Qo;mt-=vo,xt-=ys}while((k(vo)>i||k(ys)>i)&&--Bt>0);return[mt,xt]};function eu(){return b.geoProjection(fi).scale(158.837)}p.geoNaturalEarth=b.geoNaturalEarth1,p.geoNaturalEarthRaw=b.geoNaturalEarth1Raw,p.geoAiry=Q,p.geoAiryRaw=$,p.geoAitoff=ne,p.geoAitoffRaw=re,p.geoArmadillo=V,p.geoArmadilloRaw=se,p.geoAugust=K,p.geoAugustRaw=Z,p.geoBaker=W,p.geoBakerRaw=q,p.geoBerghaus=ae,p.geoBerghausRaw=ee,p.geoBertin1953=Ge,p.geoBertin1953Raw=Ie,p.geoBoggs=Be,p.geoBoggsRaw=Ae,p.geoBonne=Tt,p.geoBonneRaw=gt,p.geoBottomley=$t,p.geoBottomleyRaw=At,p.geoBromley=_r,p.geoBromleyRaw=rr,p.geoChamberlin=Ne,p.geoChamberlinRaw=vt,p.geoChamberlinAfrica=De,p.geoCollignon=Ke,p.geoCollignonRaw=We,p.geoCraig=et,p.geoCraigRaw=Je,p.geoCraster=Pt,p.geoCrasterRaw=pt,p.geoCylindricalEqualArea=qt,p.geoCylindricalEqualAreaRaw=Ct,p.geoCylindricalStereographic=Ht,p.geoCylindricalStereographicRaw=Vt,p.geoEckert1=Kr,p.geoEckert1Raw=Sr,p.geoEckert2=Rt,p.geoEckert2Raw=Yt,p.geoEckert3=ur,p.geoEckert3Raw=nr,p.geoEckert4=Rr,p.geoEckert4Raw=cr,p.geoEckert5=Zr,p.geoEckert5Raw=Qr,p.geoEckert6=Pa,p.geoEckert6Raw=ha,p.geoEisenlohr=Xa,p.geoEisenlohrRaw=un,p.geoFahey=yn,p.geoFaheyRaw=Nn,p.geoFoucaut=li,p.geoFoucautRaw=Un,p.geoFoucautSinusoidal=on,p.geoFoucautSinusoidalRaw=Yn,p.geoGilbert=Yi,p.geoGingery=rt,p.geoGingeryRaw=Ja,p.geoGinzburg4=Tr,p.geoGinzburg4Raw=lr,p.geoGinzburg5=Dr,p.geoGinzburg5Raw=Ir,p.geoGinzburg6=kt,p.geoGinzburg6Raw=ot,p.geoGinzburg8=ar,p.geoGinzburg8Raw=jt,p.geoGinzburg9=xr,p.geoGinzburg9Raw=Er,p.geoGringorten=wa,p.geoGringortenRaw=Lr,p.geoGuyou=Di,p.geoGuyouRaw=Ri,p.geoHammer=we,p.geoHammerRaw=he,p.geoHammerRetroazimuthal=jn,p.geoHammerRetroazimuthalRaw=fn,p.geoHealpix=Hi,p.geoHealpixRaw=qi,p.geoHill=Ro,p.geoHillRaw=Mi,p.geoHomolosine=Wo,p.geoHomolosineRaw=jo,p.geoHufnagel=wo,p.geoHufnagelRaw=to,p.geoHyperelliptical=Zi,p.geoHyperellipticalRaw=Io,p.geoInterrupt=Ss,p.geoInterruptedBoggs=Vs,p.geoInterruptedHomolosine=Bo,p.geoInterruptedMollweide=Pi,p.geoInterruptedMollweideHemispheres=bs,p.geoInterruptedSinuMollweide=hl,p.geoInterruptedSinusoidal=dl,p.geoKavrayskiy7=lu,p.geoKavrayskiy7Raw=wu,p.geoLagrange=Fl,p.geoLagrangeRaw=xc,p.geoLarrivee=uu,p.geoLarriveeRaw=$u,p.geoLaskowski=vs,p.geoLaskowskiRaw=tl,p.geoLittrow=ms,p.geoLittrowRaw=os,p.geoLoximuthal=Fu,p.geoLoximuthalRaw=rl,p.geoMiller=Ku,p.geoMillerRaw=zu,p.geoModifiedStereographic=Ou,p.geoModifiedStereographicRaw=bc,p.geoModifiedStereographicAlaska=wc,p.geoModifiedStereographicGs48=pc,p.geoModifiedStereographicGs50=Nf,p.geoModifiedStereographicMiller=Bu,p.geoModifiedStereographicLee=Tc,p.geoMollweide=ue,p.geoMollweideRaw=_e,p.geoMtFlatPolarParabolic=jf,p.geoMtFlatPolarParabolicRaw=$l,p.geoMtFlatPolarQuartic=Wc,p.geoMtFlatPolarQuarticRaw=Hc,p.geoMtFlatPolarSinusoidal=Yc,p.geoMtFlatPolarSinusoidalRaw=Qu,p.geoNaturalEarth2=Uf,p.geoNaturalEarth2Raw=Nu,p.geoNellHammer=Xc,p.geoNellHammerRaw=al,p.geoInterruptedQuarticAuthalic=Ac,p.geoNicolosi=ec,p.geoNicolosiRaw=Zc,p.geoPatterson=ac,p.geoPattersonRaw=qf,p.geoPolyconic=mf,p.geoPolyconicRaw=Mc,p.geoPolyhedral=Au,p.geoPolyhedralButterfly=Uu,p.geoPolyhedralCollignon=yf,p.geoPolyhedralWaterman=_f,p.geoProject=Vf,p.geoGringortenQuincuncial=Ft,p.geoPeirceQuincuncial=tr,p.geoPierceQuincuncial=tr,p.geoQuantize=Fr,p.geoQuincuncial=vc,p.geoRectangularPolyconic=ea,p.geoRectangularPolyconicRaw=wr,p.geoRobinson=Na,p.geoRobinsonRaw=Ia,p.geoSatellite=Da,p.geoSatelliteRaw=mn,p.geoSinuMollweide=ds,p.geoSinuMollweideRaw=Ao,p.geoSinusoidal=yt,p.geoSinusoidalRaw=Ye,p.geoStitch=ns,p.geoTimes=zo,p.geoTimesRaw=Kn,p.geoTwoPointAzimuthal=zl,p.geoTwoPointAzimuthalRaw=js,p.geoTwoPointAzimuthalUsa=Cl,p.geoTwoPointEquidistant=xl,p.geoTwoPointEquidistantRaw=Kl,p.geoTwoPointEquidistantUsa=Gu,p.geoVanDerGrinten=Su,p.geoVanDerGrintenRaw=Hu,p.geoVanDerGrinten2=Jc,p.geoVanDerGrinten2Raw=mc,p.geoVanDerGrinten3=du,p.geoVanDerGrinten3Raw=oc,p.geoVanDerGrinten4=Ql,p.geoVanDerGrinten4Raw=Jl,p.geoWagner=lh,p.geoWagner7=Pc,p.geoWagnerRaw=bf,p.geoWagner4=wf,p.geoWagner4Raw=Wu,p.geoWagner6=ku,p.geoWagner6Raw=Qc,p.geoWiechel=Nl,p.geoWiechelRaw=Ol,p.geoWinkel3=eu,p.geoWinkel3Raw=fi,Object.defineProperty(p,"__esModule",{value:!0})})}}),Sj=ze({"src/plots/geo/zoom.js"(J,G){"use strict";var p=ci(),b=Nr(),E=mi(),k=Math.PI/180,l=180/Math.PI,e={cursor:"pointer"},t={cursor:"auto"};function n(A,x){var z=A.projection,I;return x._isScoped?I=o:x._isClipped?I=c:I=s,I(A,z)}G.exports=n;function r(A,x){return p.behavior.zoom().translate(x.translate()).scaleExtent(x.scaleExtent()).scale(x.scale())}function a(A,x,z){var I=A.id,O=A.graphDiv,D=O.layout,B=D[I],F=O._fullLayout,P=F[I],j={},U={};function $(Q,re){j[I+"."+Q]=b.nestedProperty(B,Q).get(),E.call("_storeDirectGUIEdit",D,F._preGUI,j);var ne=b.nestedProperty(P,Q);ne.get()!==re&&(ne.set(re),b.nestedProperty(B,Q).set(re),U[I+"."+Q]=re)}z($),$("projection.scale",x.scale()/A.fitScale),$("fitbounds",!1),O.emit("plotly_relayout",U)}function o(A,x){var z=r(A,x);function I(){p.select(this).style(e)}function O(){x.scale(p.event.scale).translate(p.event.translate),A.render(!0);var F=x.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.center.lon":F[0],"geo.center.lat":F[1]})}function D(F){var P=x.invert(A.midPt);F("center.lon",P[0]),F("center.lat",P[1])}function B(){p.select(this).style(t),a(A,x,D)}return z.on("zoomstart",I).on("zoom",O).on("zoomend",B),z}function s(A,x){var z=r(A,x),I=2,O,D,B,F,P,j,U,$,Q;function re(H){return x.invert(H)}function ne(H){var X=re(H);if(!X)return!0;var q=x(X);return Math.abs(q[0]-H[0])>I||Math.abs(q[1]-H[1])>I}function se(){p.select(this).style(e);let{x:H,y:X,width:q,height:W}=this.getBBox();O=p.event.sourceEvent?p.mouse(this):[H+q/2,X+W/2],D=x.rotate(),B=x.translate(),F=D,P=re(O)}function V(){let{x:H,y:X,width:q,height:W}=this.getBBox();if(j=p.event.sourceEvent?p.mouse(this):[H+q/2,X+W/2],ne(O)){z.scale(x.scale()),z.translate(x.translate());return}x.scale(p.event.scale),x.translate([B[0],p.event.translate[1]]),P?re(j)&&($=re(j),U=[F[0]+($[0]-P[0]),D[1],D[2]],x.rotate(U),F=U):(O=j,P=re(O)),Q=!0,A.render(!0);var ee=x.rotate(),ae=x.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.center.lon":ae[0],"geo.center.lat":ae[1],"geo.projection.rotation.lon":-ee[0]})}function Z(){p.select(this).style(t),Q&&a(A,x,K)}function K(H){var X=x.rotate(),q=x.invert(A.midPt);H("projection.rotation.lon",-X[0]),H("center.lon",q[0]),H("center.lat",q[1])}return z.on("zoomstart",se).on("zoom",V).on("zoomend",Z),z}function c(A,x){var z={r:x.rotate(),k:x.scale()},I=r(A,x),O=u(I,"zoomstart","zoom","zoomend"),D=0,B=I.on,F;I.on("zoomstart",function(){p.select(this).style(e);let{x:Q,y:re,width:ne,height:se}=this.getBBox(),V=p.event.sourceEvent?p.mouse(this):[Q+ne/2,re+se/2],Z=x.rotate(),K=Z,H=x.translate(),X=f(Z);F=g(x,V),B.call(I,"zoom",function(){let{x:q,y:W,width:ee,height:ae}=this.getBBox(),he=p.event.sourceEvent?p.mouse(this):[q+ee/2,W+ae/2];if(x.scale(z.k=p.event.scale),!F)V=he,F=g(x,V);else if(g(x,he)){x.rotate(Z).translate(H);var xe=g(x,he),we=m(F,xe),Me=C(v(X,we)),Se=z.r=i(Me,F,K);(!isFinite(Se[0])||!isFinite(Se[1])||!isFinite(Se[2]))&&(Se=K),x.rotate(Se),K=Se}j(O.of(this,arguments))}),P(O.of(this,arguments))}).on("zoomend",function(){p.select(this).style(t),B.call(I,"zoom",null),U(O.of(this,arguments)),a(A,x,$)}).on("zoom.redraw",function(){A.render(!0);var Q=x.rotate();A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.projection.rotation.lon":-Q[0],"geo.projection.rotation.lat":-Q[1]})});function P(Q){D++||Q({type:"zoomstart"})}function j(Q){Q({type:"zoom"})}function U(Q){--D||Q({type:"zoomend"})}function $(Q){var re=x.rotate();Q("projection.rotation.lon",-re[0]),Q("projection.rotation.lat",-re[1])}return p.rebind(I,O,"on")}function g(A,x){var z=A.invert(x);return z&&isFinite(z[0])&&isFinite(z[1])&&_(z)}function f(A){var x=.5*A[0]*k,z=.5*A[1]*k,I=.5*A[2]*k,O=Math.sin(x),D=Math.cos(x),B=Math.sin(z),F=Math.cos(z),P=Math.sin(I),j=Math.cos(I);return[D*F*j+O*B*P,O*F*j-D*B*P,D*B*j+O*F*P,D*F*P-O*B*j]}function v(A,x){var z=A[0],I=A[1],O=A[2],D=A[3],B=x[0],F=x[1],P=x[2],j=x[3];return[z*B-I*F-O*P-D*j,z*F+I*B+O*j-D*P,z*P-I*j+O*B+D*F,z*j+I*P-O*F+D*B]}function m(A,x){if(!(!A||!x)){var z=h(A,x),I=Math.sqrt(w(z,z)),O=.5*Math.acos(Math.max(-1,Math.min(1,w(A,x)))),D=Math.sin(O)/I;return I&&[Math.cos(O),z[2]*D,-z[1]*D,z[0]*D]}}function i(A,x,z){var I=M(x,2,A[0]);I=M(I,1,A[1]),I=M(I,0,A[2]-z[2]);var O=x[0],D=x[1],B=x[2],F=I[0],P=I[1],j=I[2],U=Math.atan2(D,O)*l,$=Math.sqrt(O*O+D*D),Q,re;Math.abs(P)>$?(re=(P>0?90:-90)-U,Q=0):(re=Math.asin(P/$)*l-U,Q=Math.sqrt($*$-P*P));var ne=180-re-2*U,se=(Math.atan2(j,F)-Math.atan2(B,Q))*l,V=(Math.atan2(j,F)-Math.atan2(B,-Q))*l,Z=T(z[0],z[1],re,se),K=T(z[0],z[1],ne,V);return Z<=K?[re,se,z[2]]:[ne,V,z[2]]}function T(A,x,z,I){var O=S(z-A),D=S(I-x);return Math.sqrt(O*O+D*D)}function S(A){return(A%360+540)%360-180}function M(A,x,z){var I=z*k,O=A.slice(),D=x===0?1:0,B=x===2?1:2,F=Math.cos(I),P=Math.sin(I);return O[D]=A[D]*F-A[B]*P,O[B]=A[B]*F+A[D]*P,O}function C(A){return[Math.atan2(2*(A[0]*A[1]+A[2]*A[3]),1-2*(A[1]*A[1]+A[2]*A[2]))*l,Math.asin(Math.max(-1,Math.min(1,2*(A[0]*A[2]-A[3]*A[1]))))*l,Math.atan2(2*(A[0]*A[3]+A[1]*A[2]),1-2*(A[2]*A[2]+A[3]*A[3]))*l]}function _(A){var x=A[0]*k,z=A[1]*k,I=Math.cos(z);return[I*Math.cos(x),I*Math.sin(x),Math.sin(z)]}function w(A,x){for(var z=0,I=0,O=A.length;I0&&$._module.calcGeoJSON(U,B)}if(!F){var Q=this.updateProjection(D,B);if(Q)return;(!this.viewInitial||this.scope!==P.scope)&&this.saveViewInitial(P)}this.scope=P.scope,this.updateBaseLayers(B,P),this.updateDims(B,P),this.updateFx(B,P),s.generalUpdatePerTraceModule(this.graphDiv,this,D,P);var re=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=re.selectAll(".point"),this.dataPoints.text=re.selectAll("text"),this.dataPaths.line=re.selectAll(".js-line");var ne=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ne.selectAll("path"),this._render()},x.updateProjection=function(D,B){var F=this.graphDiv,P=B[this.id],j=B._size,U=P.domain,$=P.projection,Q=P.lonaxis,re=P.lataxis,ne=Q._ax,se=re._ax,V=this.projection=z(P),Z=[[j.l+j.w*U.x[0],j.t+j.h*(1-U.y[1])],[j.l+j.w*U.x[1],j.t+j.h*(1-U.y[0])]],K=P.center||{},H=$.rotation||{},X=Q.range||[],q=re.range||[];if(P.fitbounds){ne._length=Z[1][0]-Z[0][0],se._length=Z[1][1]-Z[0][1],ne.range=f(F,ne),se.range=f(F,se);let ve=[];for(let $t of D){let rr=$t[0].trace;rr.visible===!0&&rr._module.fitCoords&&ve.push(rr._module.fitCoords($t,P))}let le=g(F,ne),Ae=le.min.reduce(($t,{val:rr})=>Math.min($t,rr),1/0),Xe=le.max.reduce(($t,{val:rr})=>Math.max($t,rr),-1/0)-Ae,Ye=_.boundsOfCoords(ve.flat()),[yt,,gt]=Ye||[],Tt=gt-yt;if(!!Ye&&(Xe>360||Xe<360&&TtMath.max(ht,$t(De)),0),Xt=le.max.reduce((ht,De)=>Math.max(ht,rr(De)),0),or=ne._length-_r-Xt,Ot=or>ne._length/10?Tt*ne._length/or:Tt,vt=(yt+gt)/2;ne.range=[vt-Ot/2,vt+Ot/2]}var W=(ne.range[0]+ne.range[1])/2,ee=(se.range[0]+se.range[1])/2;if(P._isScoped)K={lon:W,lat:ee};else if(P._isClipped){K={lon:W,lat:ee},H={lon:W,lat:ee,roll:H.roll};var ae=$.type,he=C.lonaxisSpan[ae]/2||180,xe=C.lataxisSpan[ae]/2||90;X=[W-he,W+he],q=[ee-xe,ee+xe]}else K={lon:W,lat:ee},H={lon:W,lat:H.lat,roll:H.roll}}V.center([K.lon-H.lon,K.lat-H.lat]).rotate([-H.lon,-H.lat,H.roll]).parallels($.parallels);var we=O(X,q);V.fitExtent(Z,we);var Me=this.bounds=V.getBounds(we),Se=this.fitScale=V.scale(),Ie=V.translate();if(V.scaleExtent=()=>{var ve;let{minscale:le}=$,Ae=(ve=$.maxscale)!=null?ve:1/0;return[Se*Math.min(le,Ae),Se*Math.max(le,Ae)]},P.fitbounds){var Ge=V.getBounds(O(ne.range,se.range)),qe=Math.min((Me[1][0]-Me[0][0])/(Ge[1][0]-Ge[0][0]),(Me[1][1]-Me[0][1])/(Ge[1][1]-Ge[0][1]));isFinite(qe)?V.scale(qe*Se):t.warn("Something went wrong during"+this.id+"fitbounds computations.")}else V.scale($.scale*Se);var ke=this.midPt=[(Me[0][0]+Me[1][0])/2,(Me[0][1]+Me[1][1])/2];if(V.translate([Ie[0]+(ke[0]-Ie[0]),Ie[1]+(ke[1]-Ie[1])]).clipExtent(Me),P._isAlbersUsa){var _e=V([K.lon,K.lat]);if(_e){var ue=V.translate();V.translate([ue[0]-(_e[0]-ue[0]),ue[1]-(_e[1]-ue[1])])}}},x.updateBaseLayers=function(D,B){var F=this,P=F.topojson,j=F.layers,U=F.basePaths;function $(Z){return Z==="lonaxis"||Z==="lataxis"}function Q(Z){return!!C.lineLayers[Z]}function re(Z){return!!C.fillLayers[Z]}var ne=this.hasChoropleth?C.layersForChoropleth:C.layers,se=ne.filter(function(Z){return Q(Z)||re(Z)?B["show"+Z]:$(Z)?B[Z].showgrid:!0}),V=F.framework.selectAll(".layer").data(se,String);V.exit().each(function(Z){delete j[Z],delete U[Z],p.select(this).remove()}),V.enter().append("g").attr("class",function(Z){return"layer "+Z}).each(function(Z){var K=j[Z]=p.select(this);Z==="bg"?F.bgRect=K.append("rect").style("pointer-events","all"):$(Z)?U[Z]=K.append("path").style("fill","none"):Z==="backplot"?K.append("g").classed("choroplethlayer",!0):Z==="frontplot"?K.append("g").classed("scatterlayer",!0):Q(Z)?U[Z]=K.append("path").style("fill","none").style("stroke-miterlimit",2):re(Z)&&(U[Z]=K.append("path").style("stroke","none"))}),V.order(),V.each(function(Z){var K=U[Z],H=C.layerNameToAdjective[Z];Z==="frame"?K.datum(C.sphereSVG):Q(Z)||re(Z)?K.datum(u(P,P.objects[Z])):$(Z)&&K.datum(I(Z,B,D)).call(r.stroke,B[Z].gridcolor).call(a.dashLine,B[Z].griddash,B[Z].gridwidth),Q(Z)?K.call(r.stroke,B[H+"color"]).call(a.dashLine,"",B[H+"width"]):re(Z)&&K.call(r.fill,B[H+"color"])})},x.updateDims=function(D,B){var F=this.bounds,P=(B.framewidth||0)/2,j=F[0][0]-P,U=F[0][1]-P,$=F[1][0]-j+P,Q=F[1][1]-U+P;a.setRect(this.clipRect,j,U,$,Q),this.bgRect.call(a.setRect,j,U,$,Q).call(r.fill,B.bgcolor),this.xaxis._offset=j,this.xaxis._length=$,this.yaxis._offset=U,this.yaxis._length=Q},x.updateFx=function(D,B){var F=this,P=F.graphDiv,j=F.bgRect,U=D.dragmode,$=D.clickmode;if(F.isStatic)return;function Q(){var V=F.viewInitial,Z={};for(var K in V)Z[F.id+"."+K]=V[K];e.call("_guiRelayout",P,Z),P.emit("plotly_doubleclick",null)}function re(V){return F.projection.invert([V[0]+F.xaxis._offset,V[1]+F.yaxis._offset])}var ne=function(V,Z){if(Z.isRect){var K=V.range={};K[F.id]=[re([Z.xmin,Z.ymin]),re([Z.xmax,Z.ymax])]}else{var H=V.lassoPoints={};H[F.id]=Z.map(re)}},se={element:F.bgRect.node(),gd:P,plotinfo:{id:F.id,xaxis:F.xaxis,yaxis:F.yaxis,fillRangeItems:ne},xaxes:[F.xaxis],yaxes:[F.yaxis],subplot:F.id,clickFn:function(V){V===2&&T(P)}};if(U==="pan"){j.node().onmousedown=null;let V=M(F,B);if(j.call(V),!p.event){let Z=F.projection.scale(),[K,H]=F.projection.scaleExtent();(ZH)&&V.event(j)}j.on("dblclick.zoom",Q),P._context._scrollZoom.geo||j.on("wheel.zoom",null)}else(U==="select"||U==="lasso")&&(j.on(".zoom",null),se.prepFn=function(V,Z,K){i(V,Z,K,se,U)},m.init(se));j.on("mousemove",function(){var V=F.projection.invert(t.getPositionFromD3Event());if(!V)return m.unhover(P,p.event);F.xaxis.p2c=function(){return V[0]},F.yaxis.p2c=function(){return V[1]},o.hover(P,p.event,F.id)}),j.on("mouseout",function(){P._dragging||m.unhover(P,p.event)}),j.on("click",function(){U!=="select"&&U!=="lasso"&&($.indexOf("select")>-1&&S(p.event,P,[F.xaxis],[F.yaxis],F.id,se),$.indexOf("event")>-1&&o.click(P,p.event))})},x.makeFramework=function(){var D=this,B=D.graphDiv,F=B._fullLayout,P="clip"+F._uid+D.id;D.clipDef=F._clips.append("clipPath").attr("id",P),D.clipRect=D.clipDef.append("rect"),D.framework=p.select(D.container).append("g").attr("class","geo "+D.id).call(a.setClipUrl,P,B),D.project=function(j){var U=D.projection(j);return U?[U[0]-D.xaxis._offset,U[1]-D.yaxis._offset]:[null,null]},D.xaxis={_id:"x",c2p:function(j){return D.project(j)[0]}},D.yaxis={_id:"y",c2p:function(j){return D.project(j)[1]}},D.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(D.mockAxis,F)},x.saveViewInitial=function(D){var B=D.center||{},F=D.projection,P=F.rotation||{};this.viewInitial={fitbounds:D.fitbounds,"projection.scale":F.scale};var j;D._isScoped?j={"center.lon":B.lon,"center.lat":B.lat}:D._isClipped?j={"projection.rotation.lon":P.lon,"projection.rotation.lat":P.lat,"center.lon":B.lon,"center.lat":B.lat}:j={"center.lon":B.lon,"center.lat":B.lat,"projection.rotation.lon":P.lon},t.extendFlat(this.viewInitial,j)},x.render=function(D){this._hasMarkerAngles&&D?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},x._render=function(){var D=this.projection,B=D.getPath(),F;function P(U){var $=D(U.lonlat);return $?n($[0],$[1]):null}function j(U){return D.isLonLatOverEdges(U.lonlat)?"none":null}for(F in this.basePaths)this.basePaths[F].attr("d",B);for(F in this.dataPaths)this.dataPaths[F].attr("d",function(U){return B(U.geojson)});for(F in this.dataPoints)this.dataPoints[F].attr("display",j).attr("transform",P)};function z(D){var B=D.projection,F=B.type,P=C.projNames[F];P="geo"+t.titleCase(P);for(var j=b[P]||l[P],U=j(),$=D._isSatellite?Math.acos(1/B.distance)*180/Math.PI:D._isClipped?C.lonaxisSpan[F]/2:null,Q=["center","rotate","parallels","clipExtent"],re=function(V){return V?U:[]},ne=0;neH}else return!1},U.getPath=function(){return E().projection(U)},U.getBounds=function(V){return U.getPath().bounds(V)},U.precision(C.precision),D._isSatellite&&U.tilt(B.tilt).distance(B.distance),$&&U.clipAngle($-C.clipPad),U}function I(D,B,F){var P=1e-6,j=2.5,U=B[D],$=C.scopeDefaults[B.scope],Q,re,ne;D==="lonaxis"?(Q=$.lonaxisRange,re=$.lataxisRange,ne=function(ee,ae){return[ee,ae]}):D==="lataxis"&&(Q=$.lataxisRange,re=$.lonaxisRange,ne=function(ee,ae){return[ae,ee]});var se={type:"linear",range:[Q[0],Q[1]-P],tick0:U.tick0,dtick:U.dtick};c.setConvert(se,F);var V=c.calcTicks(se);!B.isScoped&&D==="lonaxis"&&V.pop();for(var Z=V.length,K=new Array(Z),H=0;Hhe[xe]!=null)||l.fitboundsIncompatible.has(i)?a.fitbounds=!1:ee.forEach(({dst:he,key:xe})=>he&&(he[xe]=null))}}}}),RA=ze({"src/plots/geo/index.js"(J,G){"use strict";var p=zf().getSubplotCalcData,b=Nr().counterRegex,E=Ej(),k="geo",l=b(k),e={};e[k]={valType:"subplotid",dflt:k,editType:"calc"};function t(a){for(var o=a._fullLayout,s=a.calcdata,c=o._subplots[k],g=0;g")}}}}),FA=ze({"src/traces/choropleth/event_data.js"(J,G){"use strict";G.exports=function(b,E,k,l,e){b.location=E.location,b.z=E.z;var t=l[e];return t.fIn&&t.fIn.properties&&(b.properties=t.fIn.properties),b.ct=t.ct,b}}}),zA=ze({"src/traces/choropleth/select.js"(J,G){"use strict";G.exports=function(b,E){var k=b.cd,l=b.xaxis,e=b.yaxis,t=[],n,r,a,o,s;if(E===!1)for(n=0;n=Math.min($,Q)&&i<=Math.max($,Q)?0:1/0}if(O=Math.min(re,ne)&&T<=Math.max(re,ne)?0:1/0}F=Math.sqrt(O*O+D*D),A=M[I]}}}else for(I=M.length-1;I>-1;I--)u=M[I],x=v[u],z=m[u],O=g.c2p(x)-i,D=f.c2p(z)-T,B=Math.sqrt(O*O+D*D),B100},J.isDotSymbol=function(p){return typeof p=="string"?G.DOT_RE.test(p):p>200}}}),Dj=ze({"src/traces/scattergl/defaults.js"(J,G){"use strict";var p=Nr(),b=mi(),E=D2(),k=ty(),l=zd(),e=el(),t=Gv(),n=yd(),r=id(),a=_d(),o=Od(),s=xd();G.exports=function(g,f,v,m){function i(u,A){return p.coerce(g,f,k,u,A)}var T=g.marker?E.isOpenSymbol(g.marker.symbol):!1,S=e.isBubble(g),M=t(g,f,m,i);if(!M){f.visible=!1;return}n(g,f,m,i),i("xhoverformat"),i("yhoverformat");var C=M>>1,g=t[c],f=r!==void 0?r(g,n):g-n;f>=0?(s=c,o=c-1):a=c+1}return s}function b(t,n,r,a,o){for(var s=o+1;a<=o;){var c=a+o>>>1,g=t[c],f=r!==void 0?r(g,n):g-n;f>0?(s=c,o=c-1):a=c+1}return s}function E(t,n,r,a,o){for(var s=a-1;a<=o;){var c=a+o>>>1,g=t[c],f=r!==void 0?r(g,n):g-n;f<0?(s=c,a=c+1):o=c-1}return s}function k(t,n,r,a,o){for(var s=a-1;a<=o;){var c=a+o>>>1,g=t[c],f=r!==void 0?r(g,n):g-n;f<=0?(s=c,a=c+1):o=c-1}return s}function l(t,n,r,a,o){for(;a<=o;){var s=a+o>>>1,c=t[s],g=r!==void 0?r(c,n):c-n;if(g===0)return s;g<=0?a=s+1:o=s-1}return-1}function e(t,n,r,a,o,s){return typeof r=="function"?s(t,n,r,a===void 0?0:a|0,o===void 0?t.length-1:o|0):s(t,n,void 0,r===void 0?0:r|0,a===void 0?t.length-1:a|0)}G.exports={ge:function(t,n,r,a,o){return e(t,n,r,a,o,p)},gt:function(t,n,r,a,o){return e(t,n,r,a,o,b)},lt:function(t,n,r,a,o){return e(t,n,r,a,o,E)},le:function(t,n,r,a,o){return e(t,n,r,a,o,k)},eq:function(t,n,r,a,o){return e(t,n,r,a,o,l)}}}}),BA=ze({"node_modules/clamp/index.js"(J,G){G.exports=p;function p(b,E,k){return Ek?k:b:bE?E:b}}}),qd=ze({"node_modules/pick-by-alias/index.js"(J,G){"use strict";G.exports=function(k,l,e){var t={},n,r;if(typeof l=="string"&&(l=b(l)),Array.isArray(l)){var a={};for(r=0;r1&&(E=arguments),typeof E=="string"?E=E.split(/\s/).map(parseFloat):typeof E=="number"&&(E=[E]),E.length&&typeof E[0]=="number"?E.length===1?k={width:E[0],height:E[0],x:0,y:0}:E.length===2?k={width:E[0],height:E[1],x:0,y:0}:k={x:E[0],y:E[1],width:E[2]-E[0]||0,height:E[3]-E[1]||0}:E&&(E=p(E,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),k={x:E.left||0,y:E.top||0},E.width==null?E.right?k.width=E.right-k.x:k.width=0:k.width=E.width,E.height==null?E.bottom?k.height=E.bottom-k.y:k.height=0:k.height=E.height),k}}}),c0=ze({"node_modules/array-bounds/index.js"(J,G){"use strict";G.exports=p;function p(b,E){if(!b||b.length==null)throw Error("Argument should be an array");E==null?E=1:E=Math.floor(E);for(var k=Array(E*2),l=0;le&&(e=b[n]),b[n]>>1,S;f.dtype||(f.dtype="array"),typeof f.dtype=="string"?S=new(r(f.dtype))(T):f.dtype&&(S=f.dtype,Array.isArray(S)&&(S.length=T));for(let I=0;Iv||P>o){for(let X=0;Xae||$>he||Q=ne||W===ee)return;let xe=M[q];ee===void 0&&(ee=xe.length);for(let ue=W;ue=B&&le<=P&&Ae>=F&&Ae<=j&&se.push(ve)}let we=C[q],Me=we[W*4+0],Se=we[W*4+1],Ie=we[W*4+2],Ge=we[W*4+3],qe=Z(we,W+1),ke=X*.5,_e=q+1;V(K,H,ke,_e,Me,Se||Ie||Ge||qe),V(K,H+ke,ke,_e,Se,Ie||Ge||qe),V(K+ke,H,ke,_e,Ie,Ge||qe),V(K+ke,H+ke,ke,_e,Ge,qe)}function Z(K,H){let X=null,q=0;for(;X===null;)if(X=K[H*4+q],q++,q>K.length)return null;return X}return se}function x(I,O,D,B,F){let P=[];for(let j=0;j2&&(t.push([r].concat(a.splice(0,2))),o="l",r=r=="m"?"l":"L");;){if(a.length==p[o])return a.unshift(r),t.push(a);if(a.length1&&(g=1),g<-1&&(g=-1),c*Math.acos(g)},e=function(r,a,o,s,c,g,f,v,m,i,T,S){var M=Math.pow(c,2),C=Math.pow(g,2),_=Math.pow(T,2),w=Math.pow(S,2),h=M*C-M*w-C*_;h<0&&(h=0),h/=M*w+C*_,h=Math.sqrt(h)*(f===v?-1:1);var u=h*c/g*S,A=h*-g/c*T,x=i*u-m*A+(r+o)/2,z=m*u+i*A+(a+s)/2,I=(T-u)/c,O=(S-A)/g,D=(-T-u)/c,B=(-S-A)/g,F=l(1,0,I,O),P=l(I,O,D,B);return v===0&&P>0&&(P-=b),v===1&&P<0&&(P+=b),[x,z,F,P]},t=function(r){var a=r.px,o=r.py,s=r.cx,c=r.cy,g=r.rx,f=r.ry,v=r.xAxisRotation,m=v===void 0?0:v,i=r.largeArcFlag,T=i===void 0?0:i,S=r.sweepFlag,M=S===void 0?0:S,C=[];if(g===0||f===0)return[];var _=Math.sin(m*b/360),w=Math.cos(m*b/360),h=w*(a-s)/2+_*(o-c)/2,u=-_*(a-s)/2+w*(o-c)/2;if(h===0&&u===0)return[];g=Math.abs(g),f=Math.abs(f);var A=Math.pow(h,2)/Math.pow(g,2)+Math.pow(u,2)/Math.pow(f,2);A>1&&(g*=Math.sqrt(A),f*=Math.sqrt(A));var x=e(a,o,s,c,g,f,T,M,_,w,h,u),z=p(x,4),I=z[0],O=z[1],D=z[2],B=z[3],F=Math.abs(B)/(b/4);Math.abs(1-F)<1e-7&&(F=1);var P=Math.max(Math.ceil(F),1);B/=P;for(var j=0;j4?(n=i[i.length-4],r=i[i.length-3]):(n=g,r=f),t.push(i)}return t}function E(l,e,t,n){return["C",l,e,t,n,t,n]}function k(l,e,t,n,r,a){return["C",l/3+2/3*t,e/3+2/3*n,r/3+2/3*t,a/3+2/3*n,r,a]}}}),OA=ze({"node_modules/is-svg-path/index.js"(J,G){"use strict";G.exports=function(b){return typeof b!="string"?!1:(b=b.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(b)&&/[\dz]$/i.test(b)&&b.length>4))}}}),Hj=ze({"node_modules/svg-path-bounds/index.js"(J,G){"use strict";var p=Uj(),b=qj(),E=Gj(),k=OA();G.exports=l;function l(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!k(e))throw Error("String is not an SVG path.");e=p(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=b(e),e=E(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],n=0,r=e.length;nt[2]&&(t[2]=a[o+0]),a[o+1]>t[3]&&(t[3]=a[o+1]);return t}}}),Wj=ze({"node_modules/bitmap-sdf/index.js"(J,G){"use strict";G.exports=b;var p=1e20;function b(l,e){e||(e={});var t=e.cutoff==null?.25:e.cutoff,n=e.radius==null?8:e.radius,r=e.channel||0,a,o,s,c,g,f,v,m,i,T,S;if(ArrayBuffer.isView(l)||Array.isArray(l)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");a=e.width,o=e.height,c=l,e.stride?f=e.stride:f=Math.floor(l.length/a/o)}else window.HTMLCanvasElement&&l instanceof window.HTMLCanvasElement?(m=l,v=m.getContext("2d"),a=m.width,o=m.height,i=v.getImageData(0,0,a,o),c=i.data,f=4):window.CanvasRenderingContext2D&&l instanceof window.CanvasRenderingContext2D?(m=l.canvas,v=l,a=m.width,o=m.height,i=v.getImageData(0,0,a,o),c=i.data,f=4):window.ImageData&&l instanceof window.ImageData&&(i=l,a=l.width,o=l.height,c=i.data,f=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(g=c,c=Array(a*o),T=0,S=Math.floor(g.length/f);TYj});function Yj(J,G={}){if(!(0,UA.default)(J))throw Error("Invalid SVG path");let p,b;G.shape||Array.isArray(G)?[p,b]=G.shape||G:(p=ry.width=G.width||G.w||200,b=ry.height=G.height||G.h||200);let E=Math.min(p,b),k=G.stroke||0,l=G.viewbox||G.viewBox||(0,jA.default)(J),e=[p/(l[2]-l[0]),b/(l[3]-l[1])],t=Math.min(e[0]||0,e[1]||0)/2;Vh.fillStyle="black",Vh.fillRect(0,0,p,b),Vh.fillStyle="white",k&&(typeof k!="number"&&(k=1),Vh.strokeStyle=k>0?"white":"black",Vh.lineWidth=Math.abs(k)),Vh.translate(p*.5,b*.5),Vh.scale(t,t);let n=new Path2D(J);return Vh.fill(n),k&&Vh.stroke(n),Vh.setTransform(1,0,0,1,0,0),(0,qA.default)(Vh,{cutoff:G.cutoff!=null?G.cutoff:.5,radius:G.radius!=null?G.radius:E*.5})}var jA,UA,qA,ry,Vh,Xj=zi({"node_modules/svg-path-sdf/svg-path-sdf.js"(){jA=Yl(Hj()),UA=Yl(OA()),qA=Yl(Wj()),ry=document.createElement("canvas"),Vh=ry.getContext("2d",{willReadFrequently:!0})}}),h0=ze({"src/traces/scattergl/convert.js"(J,G){"use strict";var p=ao(),b=(Xj(),Po(NA)).default,{normalize:E}=Qn(),k=mi(),l=Nr(),e=l.isArrayOrTypedArray,t=Xi(),n=Xl(),r=fp().formatColor,a=el(),o=lg(),s=D2(),c=bv(),g=np().DESELECTDIM,f={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=kh().appendArrayPointValue;function m(B,F){var P,j={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},U=B._context.plotGlPixelRatio;if(F.visible!==!0)return j;if(a.hasText(F)&&(j.text=i(B,F),j.textSel=C(B,F,F.selected),j.textUnsel=C(B,F,F.unselected)),a.hasMarkers(F)&&(j.marker=S(B,F),j.markerSel=M(B,F,F.selected),j.markerUnsel=M(B,F,F.unselected),!F.unselected&&e(F.marker.opacity))){var $=F.marker.opacity;for(j.markerUnsel.opacity=new Array($.length),P=0;P<$.length;P++)j.markerUnsel.opacity[P]=g*$[P]}if(a.hasLines(F)){j.line={overlay:!0,thickness:F.line.width*U,color:F.line.color,opacity:F.opacity};var Q=(c.DASHES[F.line.dash]||[1]).slice();for(P=0;P500?"bold":"normal":B}function S(B,F){var P=F._length,j=F.marker,U={},$,Q=e(j.symbol),re=e(j.angle),ne=e(j.color),se=e(j.line.color),V=e(j.opacity),Z=e(j.size),K=e(j.line.width),H;if(Q||(H=s.isOpenSymbol(j.symbol)),Q||ne||se||V||re){U.symbols=new Array(P),U.angles=new Array(P),U.colors=new Array(P),U.borderColors=new Array(P);var X=j.symbol,q=j.angle,W=r(j,j.opacity,P),ee=r(j.line,j.opacity,P);if(!e(ee[0])){var ae=ee;for(ee=Array(P),$=0;$c.TOO_MANY_POINTS||a.hasMarkers(F)?"rect":"round";if(se&&F.connectgaps){var Z=$[0],K=$[1];for(Q=0;Q<$.length;Q+=2)isNaN($[Q])||isNaN($[Q+1])?($[Q]=Z,$[Q+1]=K):(Z=$[Q],K=$[Q+1])}return{join:V,positions:$}}function O(B,F,P,j,U){var $=k.getComponentMethod("errorbars","makeComputeError"),Q=n.getFromId(B,F.xaxis,"x"),re=n.getFromId(B,F.yaxis,"y"),ne=P.length/2,se={};function V(Z,K){var H=K._id.charAt(0),X=F["error_"+H];if(X&&X.visible&&(K.type==="linear"||K.type==="log")){for(var q=$(X),W={x:0,y:1}[H],ee={x:[0,1,2,3],y:[2,3,0,1]}[H],ae=new Float64Array(4*ne),he=1/0,xe=-1/0,we=0,Me=0;we1?ne[Q]:ne[0]:ne,H=e(se)?se.length>1?se[Q]:se[0]:se,X=f[K],q=f[H],W=V?V/.8+1:0,ee=-q*W-q*.5;$.offset[Q]=[X*W/Z,ee/Z]}}return $}G.exports={style:m,markerStyle:S,markerSelection:M,linePositions:I,errorBarPositions:O,textPosition:D}}}),VA=ze({"src/traces/scattergl/scene_update.js"(J,G){"use strict";var p=Nr();G.exports=function(E,k){var l=k._scene,e={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},t={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return k._scene||(l=k._scene={},l.init=function(){p.extendFlat(l,t,e)},l.init(),l.update=function(r){var a=p.repeat(r,l.count);if(l.fill2d&&l.fill2d.update(a),l.scatter2d&&l.scatter2d.update(a),l.line2d&&l.line2d.update(a),l.error2d&&l.error2d.update(a.concat(a)),l.select2d&&l.select2d.update(a),l.glText)for(var o=0;o=g,u=w*2,A={},x,z=M.makeCalcdata(T,"x"),I=C.makeCalcdata(T,"y"),O=l(T,M,"x",z),D=l(T,C,"y",I),B=O.vals,F=D.vals;T._x=B,T._y=F,T.xperiodalignment&&(T._origX=z,T._xStarts=O.starts,T._xEnds=O.ends),T.yperiodalignment&&(T._origY=I,T._yStarts=D.starts,T._yEnds=D.ends);var P=new Array(u),j=new Array(w);for(x=0;x1&&b.extendFlat(_.line,o.linePositions(m,T,S)),_.errorX||_.errorY){var w=o.errorBarPositions(m,T,S,M,C);_.errorX&&b.extendFlat(_.errorX,w.x),_.errorY&&b.extendFlat(_.errorY,w.y)}return _.text&&(b.extendFlat(_.text,{positions:S},o.textPosition(m,T,_.text,_.marker)),b.extendFlat(_.textSel,{positions:S},o.textPosition(m,T,_.text,_.markerSel)),b.extendFlat(_.textUnsel,{positions:S},o.textPosition(m,T,_.text,_.markerUnsel))),_}}}),GA=ze({"src/traces/scattergl/edit_style.js"(J,G){"use strict";var p=Nr(),b=Qn(),E=np().DESELECTDIM;function k(l){var e=l[0],t=e.trace,n=e.t,r=n._scene,a=n.index,o=r.selectBatch[a],s=r.unselectBatch[a],c=r.textOptions[a],g=r.textSelectedOptions[a]||{},f=r.textUnselectedOptions[a]||{},v=p.extendFlat({},c),m,i;if(o.length||s.length){var T=g.color,S=f.color,M=c.color,C=p.isArrayOrTypedArray(M);for(v.color=new Array(t._length),m=0;m10&&/[0-9](?:\s|\/)/.test(k)&&(e=k.match(/([0-9]+)/g).map(function(g){return parseFloat(g)}),n=k.match(/([a-z])/ig).join("").toLowerCase());else isNaN(k)?Array.isArray(k)||k.length?(e=[k[0],k[1],k[2]],n="rgb",t=k.length===4?k[3]:1):k instanceof Object&&(k.r!=null||k.red!=null||k.R!=null?(n="rgb",e=[k.r||k.red||k.R||0,k.g||k.green||k.G||0,k.b||k.blue||k.B||0]):(n="hsl",e=[k.h||k.hue||k.H||0,k.s||k.saturation||k.S||0,k.l||k.lightness||k.L||k.b||k.brightness]),t=k.a||k.alpha||k.opacity||1,k.opacity!=null&&(t/=100)):(n="rgb",e=[k>>>16,(k&65280)>>>8,k&255]);return{space:n,values:e,alpha:t}}}}),Qj=ze({"node_modules/color-rgba/index.js"(J,G){"use strict";var p=Jj();G.exports=function(k){Array.isArray(k)&&k.raw&&(k=String.raw.apply(null,arguments));var l,e,t,n=p(k);if(!n.space)return[];var r=[0,0,0],a=n.space[0]==="h"?[360,100,100]:[255,255,255];return l=Array(3),l[0]=Math.min(Math.max(n.values[0],r[0]),a[0]),l[1]=Math.min(Math.max(n.values[1],r[1]),a[1]),l[2]=Math.min(Math.max(n.values[2],r[2]),a[2]),n.space[0]==="h"&&(l=b(l)),l.push(Math.min(Math.max(n.alpha,0),1)),l};function b(E){var k=E[0]/360,l=E[1]/100,e=E[2]/100,t,n,r,a,o,s=0;if(l===0)return o=e*255,[o,o,o];for(n=e<.5?e*(1+l):e+l-e*l,t=2*e-n,a=[0,0,0];s<3;)r=k+1/3*-(s-1),r<0?r++:r>1&&r--,o=6*r<1?t+(n-t)*6*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,a[s++]=o*255;return a}}}),ay=ze({"node_modules/color-normalize/index.js"(J,G){"use strict";var p=Qj(),b=F2();G.exports=function(l,e){(e==="float"||!e)&&(e="array"),e==="uint"&&(e="uint8"),e==="uint_clamped"&&(e="uint8_clamped");var t=b(e),n=new t(4),r=e!=="uint8"&&e!=="uint8_clamped";return(!l.length||typeof l=="string")&&(l=p(l),l[0]/=255,l[1]/=255,l[2]/=255),E(l)?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:255,r&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(r?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:1):(n[0]=Math.min(Math.max(Math.floor(l[0]*255),0),255),n[1]=Math.min(Math.max(Math.floor(l[1]*255),0),255),n[2]=Math.min(Math.max(Math.floor(l[2]*255),0),255),n[3]=l[3]==null?255:Math.min(Math.max(Math.floor(l[3]*255),0),255)),n)};function E(k){return!!(k instanceof Uint8Array||k instanceof Uint8ClampedArray||Array.isArray(k)&&(k[0]>1||k[0]===0)&&(k[1]>1||k[1]===0)&&(k[2]>1||k[2]===0)&&(!k[3]||k[3]>1))}}}),eU=ze({"node_modules/color-id/index.js"(J,G){"use strict";var p=BA();G.exports=b,G.exports.to=b,G.exports.from=E;function b(k,l){l==null&&(l=!0);var e=k[0],t=k[1],n=k[2],r=k[3];r==null&&(r=l?1:255),l&&(e*=255,t*=255,n*=255,r*=255),e=p(e,0,255)&255,t=p(t,0,255)&255,n=p(n,0,255)&255,r=p(r,0,255)&255;var a=e*16777216+(t<<16)+(n<<8)+r;return a}function E(k,l){k=+k;var e=k>>>24,t=(k&16711680)>>>16,n=(k&65280)>>>8,r=k&255;return l===!1?[e,t,n,r]:[e/255,t/255,n/255,r/255]}}}),tU=ze({"node_modules/glslify/browser.js"(J,G){G.exports=function(p){typeof p=="string"&&(p=[p]);for(var b=[].slice.call(arguments,1),E=[],k=0;k[this.tooManyColors?0:_,m.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:m},attributes:{x:(x,z)=>z.xAttr||{buffer:z.positionBuffer,stride:8,offset:0},y:(x,z)=>z.yAttr||{buffer:z.positionBuffer,stride:8,offset:4},xFract:(x,z)=>z.xAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:0},yFract:(x,z)=>z.yAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:4},size:(x,z)=>z.size.length?{buffer:z.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(z.size*255/this.maxSize)]},borderSize:(x,z)=>z.borderSize.length?{buffer:z.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(z.borderSize*255/this.maxSize)]},colorId:(x,z)=>z.color.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?i.slice(z.color*4,z.color*4+4):[z.color]},borderColorId:(x,z)=>z.borderColor.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?i.slice(z.borderColor*4,z.borderColor*4+4):[z.borderColor]},isActive:(x,z)=>z.activation===!0?{constant:[1]}:z.activation?z.activation:{constant:[0]}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box: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"},u=Object.assign({},h);u.frag=l([`precision highp float; #define GLSLIFY 1 uniform float opacity; @@ -2099,7 +2099,7 @@ void main() { fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.); fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.); } -`]),this.drawMarker=m(u);let A=Object.assign({},f);A.frag=l([`precision highp float; +`]),this.drawMarker=g(u);let A=Object.assign({},h);A.frag=l([`precision highp float; #define GLSLIFY 1 varying vec4 fragColor, fragBorderColor; @@ -2194,8 +2194,8 @@ void main() { fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; fragWidth = 1. / gl_PointSize; } -`]),this.drawCircle=m(A)}s.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},s.prototype.render=function(){return arguments.length&&this.update(...arguments),this.draw(),this},s.prototype.draw=function(){for(var m=arguments.length,h=new Array(m),v=0;v{this.drawItem(w)});return this},s.prototype.drawItem=function(m,h){let{groups:v}=this,g=v[m];if(typeof h=="number"&&(m=h,g=v[h],h=null),!(g&&g.count&&g.opacity))return;g.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,g,h));let i=[];for(let w=1;w{let f=g[T];if(_===void 0)return f;_===null?_={positions:null}:typeof _=="function"?_={ondraw:_}:typeof _[0]=="number"&&(_={positions:_}),_=e(_,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),_.positions===null&&(_.positions=[]),_.tooManyColors!=null&&(this.tooManyColors=_.tooManyColors),f||(g[T]=f={id:T,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:w.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},_=Object.assign({},s.defaults,_)),_.positions&&!("marker"in _)&&(_.marker=f.marker,delete f.marker),_.marker&&!("positions"in _)&&(_.positions=f.positions,delete f.positions);let u=0,A=0;if(t(f,_,[{snap:!0,size:(x,z)=>(x==null&&(x=s.defaults.size),u+=x&&x.length?1:0,x),borderSize:(x,z)=>(x==null&&(x=s.defaults.borderSize),u+=x&&x.length?1:0,x),opacity:parseFloat,color:(x,z)=>(x==null&&(x=s.defaults.color),x=this.updateColor(x),A++,x),borderColor:(x,z)=>(x==null&&(x=s.defaults.borderColor),x=this.updateColor(x),A++,x),bounds:(x,z,I)=>("range"in I||(I.range=null),x),positions:(x,z,I)=>{let{snap:O}=z,{positionBuffer:D,positionFractBuffer:B,selectionBuffer:F}=z;if(x.x||x.y)return x.x.length?z.xAttr={buffer:w.buffer(x.x),offset:0,stride:4,count:x.x.length}:z.xAttr={buffer:x.x.buffer,offset:x.x.offset*4||0,stride:(x.x.stride||1)*4,count:x.x.count},x.y.length?z.yAttr={buffer:w.buffer(x.y),offset:0,stride:4,count:x.y.length}:z.yAttr={buffer:x.y.buffer,offset:x.y.offset*4||0,stride:(x.y.stride||1)*4,count:x.y.count},z.count=Math.max(z.xAttr.count,z.yAttr.count),x;x=n(x,"float64");let P=z.count=Math.floor(x.length/2),j=z.bounds=P?b(x,2):null;if(!I.range&&!z.range&&(delete z.range,I.range=j),!I.marker&&!z.marker&&(delete z.marker,I.marker=null),O&&(O===!0||P>O)?z.tree=k(x,{bounds:j}):O&&O.length&&(z.tree=O),z.tree){let Q={primitive:"points",usage:"static",data:z.tree,type:"uint32"};z.elements?z.elements(Q):z.elements=w.elements(Q)}var U=r.float32(x);D({data:U,usage:"dynamic"});var $=r.fract32(x,U);return B({data:$,usage:"dynamic"}),F({data:new Uint8Array(P),type:"uint8",usage:"stream"}),x}},{marker:(x,z,I)=>{let{activation:O}=z;if(O.forEach(D=>D&&D.destroy&&D.destroy()),O.length=0,!x||typeof x[0]=="number"){let D=this.addMarker(x);O[D]=!0}else{let D=[];for(let B=0,F=Math.min(x.length,z.count);B{let O=z.bounds;if(O)return x||(x=O),z.scale=[1/(x[2]-x[0]),1/(x[3]-x[1])],z.translate=[-x[0],-x[1]],z.scaleFract=r.fract(z.scale),z.translateFract=r.fract(z.translate),x},viewport:x=>a(x||[i.drawingBufferWidth,i.drawingBufferHeight])}]),u){let{count:x,size:z,borderSize:I,sizeBuffer:O}=f,D=new Uint8Array(x*2);if(z.length||I.length)for(let B=0;B=0)return i;let w;if(m instanceof Uint8Array||m instanceof Uint8ClampedArray)w=m;else{w=new Uint8Array(m.length);for(let M=0,C=m.length;Mg*4&&(this.tooManyColors=!0),this.updatePalette(v),i.length===1?i[0]:i},s.prototype.updatePalette=function(m){if(this.tooManyColors)return;let{maxColors:h,paletteTexture:v}=this,g=Math.ceil(m.length*.25/h);if(g>1){m=m.slice();for(let i=m.length*.25%h;i{m.sizeBuffer.destroy(),m.positionBuffer.destroy(),m.positionFractBuffer.destroy(),m.colorBuffer.destroy(),m.activation.forEach(h=>h&&h.destroy&&h.destroy()),m.selectionBuffer.destroy(),m.elements&&m.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(m=>m&&m.destroy&&m.destroy()),this};var c=function(m,h){var v=new o(m,h),g=v.render.bind(v);return Object.assign(g,{render:g,update:v.update.bind(v),draw:v.draw.bind(v),destroy:v.destroy.bind(v),regl:v.regl,gl:v.gl,canvas:v.gl.canvas,groups:v.groups,markers:v.markerCache,palette:v.palette}),g};V.exports=c}}),Vc=ze({"node_modules/object-assign/index.js"(J,V){"use strict";var p=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;function k(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function l(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(o){return t[o]});if(r.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(o){a[o]=o}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}V.exports=l()?Object.assign:function(e,t){for(var n,r=k(e),a,o=1;o80*P){re=se=B[0],ne=G=B[1];for(var Y=P;Yse&&(se=X),K>G&&(G=K);H=Math.max(se-re,G-ne),H=H!==0?32767/H:0}return k($,Q,P,re,ne,H,0),Q}function b(B,F,P,j,U){var $,Q;if(U===D(B,F,P,j)>0)for($=F;$=F;$-=j)Q=z($,B[$],B[$+1],Q);return Q&&M(Q,Q.next)&&(I(Q),Q=Q.next),Q}function E(B,F){if(!B)return B;F||(F=B);var P=B,j;do if(j=!1,!P.steiner&&(M(P,P.next)||S(P.prev,P,P.next)===0)){if(I(P),P=F=P.prev,P===P.next)break;j=!0}else P=P.next;while(j||P!==F);return F}function k(B,F,P,j,U,$,Q){if(B){!Q&&$&&m(B,j,U,$);for(var re=B,ne,se;B.prev!==B.next;){if(ne=B.prev,se=B.next,$?e(B,j,U,$):l(B)){F.push(ne.i/P|0),F.push(B.i/P|0),F.push(se.i/P|0),I(B),B=se.next,re=se.next;continue}if(B=se,B===re){Q?Q===1?(B=t(E(B),F,P),k(B,F,P,j,U,$,2)):Q===2&&n(B,F,P,j,U,$):k(E(B),F,P,j,U,$,1);break}}}}function l(B){var F=B.prev,P=B,j=B.next;if(S(F,P,j)>=0)return!1;for(var U=F.x,$=P.x,Q=j.x,re=F.y,ne=P.y,se=j.y,G=U<$?U$?U>Q?U:Q:$>Q?$:Q,H=re>ne?re>se?re:se:ne>se?ne:se,Y=j.next;Y!==F;){if(Y.x>=G&&Y.x<=K&&Y.y>=X&&Y.y<=H&&i(U,re,$,ne,Q,se,Y.x,Y.y)&&S(Y.prev,Y,Y.next)>=0)return!1;Y=Y.next}return!0}function e(B,F,P,j){var U=B.prev,$=B,Q=B.next;if(S(U,$,Q)>=0)return!1;for(var re=U.x,ne=$.x,se=Q.x,G=U.y,X=$.y,K=Q.y,H=rene?re>se?re:se:ne>se?ne:se,Z=G>X?G>K?G:K:X>K?X:K,ee=v(H,Y,F,P,j),ae=v(q,Z,F,P,j),he=B.prevZ,xe=B.nextZ;he&&he.z>=ee&&xe&&xe.z<=ae;){if(he.x>=H&&he.x<=q&&he.y>=Y&&he.y<=Z&&he!==U&&he!==Q&&i(re,G,ne,X,se,K,he.x,he.y)&&S(he.prev,he,he.next)>=0||(he=he.prevZ,xe.x>=H&&xe.x<=q&&xe.y>=Y&&xe.y<=Z&&xe!==U&&xe!==Q&&i(re,G,ne,X,se,K,xe.x,xe.y)&&S(xe.prev,xe,xe.next)>=0))return!1;xe=xe.nextZ}for(;he&&he.z>=ee;){if(he.x>=H&&he.x<=q&&he.y>=Y&&he.y<=Z&&he!==U&&he!==Q&&i(re,G,ne,X,se,K,he.x,he.y)&&S(he.prev,he,he.next)>=0)return!1;he=he.prevZ}for(;xe&&xe.z<=ae;){if(xe.x>=H&&xe.x<=q&&xe.y>=Y&&xe.y<=Z&&xe!==U&&xe!==Q&&i(re,G,ne,X,se,K,xe.x,xe.y)&&S(xe.prev,xe,xe.next)>=0)return!1;xe=xe.nextZ}return!0}function t(B,F,P){var j=B;do{var U=j.prev,$=j.next.next;!M(U,$)&&C(U,j,j.next,$)&&u(U,$)&&u($,U)&&(F.push(U.i/P|0),F.push(j.i/P|0),F.push($.i/P|0),I(j),I(j.next),j=B=$),j=j.next}while(j!==B);return E(j)}function n(B,F,P,j,U,$){var Q=B;do{for(var re=Q.next.next;re!==Q.prev;){if(Q.i!==re.i&&w(Q,re)){var ne=x(Q,re);Q=E(Q,Q.next),ne=E(ne,ne.next),k(Q,F,P,j,U,$,0),k(ne,F,P,j,U,$,0);return}re=re.next}Q=Q.next}while(Q!==B)}function r(B,F,P,j){var U=[],$,Q,re,ne,se;for($=0,Q=F.length;$=P.next.y&&P.next.y!==P.y){var re=P.x+(U-P.y)*(P.next.x-P.x)/(P.next.y-P.y);if(re<=j&&re>$&&($=re,Q=P.x=P.x&&P.x>=se&&j!==P.x&&i(UQ.x||P.x===Q.x&&c(Q,P)))&&(Q=P,X=K)),P=P.next;while(P!==ne);return Q}function c(B,F){return S(B.prev,B,F.prev)<0&&S(F.next,B,B.next)<0}function m(B,F,P,j){var U=B;do U.z===0&&(U.z=v(U.x,U.y,F,P,j)),U.prevZ=U.prev,U.nextZ=U.next,U=U.next;while(U!==B);U.prevZ.nextZ=null,U.prevZ=null,h(U)}function h(B){var F,P,j,U,$,Q,re,ne,se=1;do{for(P=B,B=null,$=null,Q=0;P;){for(Q++,j=P,re=0,F=0;F0||ne>0&&j;)re!==0&&(ne===0||!j||P.z<=j.z)?(U=P,P=P.nextZ,re--):(U=j,j=j.nextZ,ne--),$?$.nextZ=U:B=U,U.prevZ=$,$=U;P=j}$.nextZ=null,se*=2}while(Q>1);return B}function v(B,F,P,j,U){return B=(B-P)*U|0,F=(F-j)*U|0,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,F=(F|F<<8)&16711935,F=(F|F<<4)&252645135,F=(F|F<<2)&858993459,F=(F|F<<1)&1431655765,B|F<<1}function g(B){var F=B,P=B;do(F.x=(B-Q)*($-re)&&(B-Q)*(j-re)>=(P-Q)*(F-re)&&(P-Q)*($-re)>=(U-Q)*(j-re)}function w(B,F){return B.next.i!==F.i&&B.prev.i!==F.i&&!f(B,F)&&(u(B,F)&&u(F,B)&&A(B,F)&&(S(B.prev,B,F.prev)||S(B,F.prev,F))||M(B,F)&&S(B.prev,B,B.next)>0&&S(F.prev,F,F.next)>0)}function S(B,F,P){return(F.y-B.y)*(P.x-F.x)-(F.x-B.x)*(P.y-F.y)}function M(B,F){return B.x===F.x&&B.y===F.y}function C(B,F,P,j){var U=T(S(B,F,P)),$=T(S(B,F,j)),Q=T(S(P,j,B)),re=T(S(P,j,F));return!!(U!==$&&Q!==re||U===0&&_(B,P,F)||$===0&&_(B,j,F)||Q===0&&_(P,B,j)||re===0&&_(P,F,j))}function _(B,F,P){return F.x<=Math.max(B.x,P.x)&&F.x>=Math.min(B.x,P.x)&&F.y<=Math.max(B.y,P.y)&&F.y>=Math.min(B.y,P.y)}function T(B){return B>0?1:B<0?-1:0}function f(B,F){var P=B;do{if(P.i!==B.i&&P.next.i!==B.i&&P.i!==F.i&&P.next.i!==F.i&&C(P,P.next,B,F))return!0;P=P.next}while(P!==B);return!1}function u(B,F){return S(B.prev,B,B.next)<0?S(B,F,B.next)>=0&&S(B,B.prev,F)>=0:S(B,F,B.prev)<0||S(B,B.next,F)<0}function A(B,F){var P=B,j=!1,U=(B.x+F.x)/2,$=(B.y+F.y)/2;do P.y>$!=P.next.y>$&&P.next.y!==P.y&&U<(P.next.x-P.x)*($-P.y)/(P.next.y-P.y)+P.x&&(j=!j),P=P.next;while(P!==B);return j}function x(B,F){var P=new O(B.i,B.x,B.y),j=new O(F.i,F.x,F.y),U=B.next,$=F.prev;return B.next=F,F.prev=B,P.next=U,U.prev=P,j.next=P,P.prev=j,$.next=j,j.prev=$,j}function z(B,F,P,j){var U=new O(B,F,P);return j?(U.next=j.next,U.prev=j,j.next.prev=U,j.next=U):(U.prev=U,U.next=U),U}function I(B){B.next.prev=B.prev,B.prev.next=B.next,B.prevZ&&(B.prevZ.nextZ=B.nextZ),B.nextZ&&(B.nextZ.prevZ=B.prevZ)}function O(B,F,P){this.i=B,this.x=F,this.y=P,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}p.deviation=function(B,F,P,j){var U=F&&F.length,$=U?F[0]*P:B.length,Q=Math.abs(D(B,0,$,P));if(U)for(var re=0,ne=F.length;re0&&(j+=B[U-1].length,P.holes.push(j))}return P}}}),aU=ze({"node_modules/array-normalize/index.js"(J,V){"use strict";var p=c0();V.exports=b;function b(E,k,l){if(!E||E.length==null)throw Error("Argument should be an array");k==null&&(k=1),l==null&&(l=p(E,k));for(var e=0;e-1}}}),eM=ze({"node_modules/es5-ext/string/#/contains/index.js"(J,V){"use strict";V.exports=mU()()?String.prototype.contains:gU()}}),pp=ze({"node_modules/d/index.js"(J,V){"use strict";var p=d0(),b=JA(),E=N2(),k=QA(),l=eM(),e=V.exports=function(t,n){var r,a,o,s,c;return arguments.length<2||typeof t!="string"?(s=n,n=t,t=null):s=arguments[2],p(t)?(r=l.call(t,"c"),a=l.call(t,"e"),o=l.call(t,"w")):(r=o=!0,a=!1),c={value:n,configurable:r,enumerable:a,writable:o},s?E(k(s),c):c};e.gs=function(t,n,r){var a,o,s,c;return typeof t!="string"?(s=r,r=n,n=t,t=null):s=arguments[3],p(n)?b(n)?p(r)?b(r)||(s=r,r=void 0):r=void 0:(s=n,n=r=void 0):n=void 0,p(t)?(a=l.call(t,"c"),o=l.call(t,"e")):(a=!0,o=!1),c={get:n,set:r,configurable:a,enumerable:o},s?E(k(s),c):c}}}),ny=ze({"node_modules/es5-ext/function/is-arguments.js"(J,V){"use strict";var p=Object.prototype.toString,b=p.call(function(){return arguments}());V.exports=function(E){return p.call(E)===b}}}),iy=ze({"node_modules/es5-ext/string/is-string.js"(J,V){"use strict";var p=Object.prototype.toString,b=p.call("");V.exports=function(E){return typeof E=="string"||E&&typeof E=="object"&&(E instanceof String||p.call(E)===b)||!1}}}),yU=ze({"node_modules/ext/global-this/is-implemented.js"(J,V){"use strict";V.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),_U=ze({"node_modules/ext/global-this/implementation.js"(J,V){var p=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};V.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return p()}try{return __global__||p()}finally{delete Object.prototype.__global__}}()}}),oy=ze({"node_modules/ext/global-this/index.js"(J,V){"use strict";V.exports=yU()()?globalThis:_U()}}),xU=ze({"node_modules/es6-symbol/is-implemented.js"(J,V){"use strict";var p=oy(),b={object:!0,symbol:!0};V.exports=function(){var E=p.Symbol,k;if(typeof E!="function")return!1;k=E("test symbol");try{String(k)}catch{return!1}return!(!b[typeof E.iterator]||!b[typeof E.toPrimitive]||!b[typeof E.toStringTag])}}}),bU=ze({"node_modules/es6-symbol/is-symbol.js"(J,V){"use strict";V.exports=function(p){return p?typeof p=="symbol"?!0:!p.constructor||p.constructor.name!=="Symbol"?!1:p[p.constructor.toStringTag]==="Symbol":!1}}}),tM=ze({"node_modules/es6-symbol/validate-symbol.js"(J,V){"use strict";var p=bU();V.exports=function(b){if(!p(b))throw new TypeError(b+" is not a symbol");return b}}}),wU=ze({"node_modules/es6-symbol/lib/private/generate-name.js"(J,V){"use strict";var p=pp(),b=Object.create,E=Object.defineProperty,k=Object.prototype,l=b(null);V.exports=function(e){for(var t=0,n,r;l[e+(t||"")];)++t;return e+=t||"",l[e]=!0,n="@@"+e,E(k,n,p.gs(null,function(a){r||(r=!0,E(this,n,p(a)),r=!1)})),n}}}),TU=ze({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(J,V){"use strict";var p=pp(),b=oy().Symbol;V.exports=function(E){return Object.defineProperties(E,{hasInstance:p("",b&&b.hasInstance||E("hasInstance")),isConcatSpreadable:p("",b&&b.isConcatSpreadable||E("isConcatSpreadable")),iterator:p("",b&&b.iterator||E("iterator")),match:p("",b&&b.match||E("match")),replace:p("",b&&b.replace||E("replace")),search:p("",b&&b.search||E("search")),species:p("",b&&b.species||E("species")),split:p("",b&&b.split||E("split")),toPrimitive:p("",b&&b.toPrimitive||E("toPrimitive")),toStringTag:p("",b&&b.toStringTag||E("toStringTag")),unscopables:p("",b&&b.unscopables||E("unscopables"))})}}}),AU=ze({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(J,V){"use strict";var p=pp(),b=tM(),E=Object.create(null);V.exports=function(k){return Object.defineProperties(k,{for:p(function(l){return E[l]?E[l]:E[l]=k(String(l))}),keyFor:p(function(l){var e;b(l);for(e in E)if(E[e]===l)return e})})}}}),MU=ze({"node_modules/es6-symbol/polyfill.js"(J,V){"use strict";var p=pp(),b=tM(),E=oy().Symbol,k=wU(),l=TU(),e=AU(),t=Object.create,n=Object.defineProperties,r=Object.defineProperty,a,o,s;if(typeof E=="function")try{String(E()),s=!0}catch{}else E=null;o=function(m){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return a(m)},V.exports=a=function c(m){var h;if(this instanceof c)throw new TypeError("Symbol is not a constructor");return s?E(m):(h=t(o.prototype),m=m===void 0?"":String(m),n(h,{__description__:p("",m),__name__:p("",k(m))}))},l(a),e(a),n(o.prototype,{constructor:p(a),toString:p("",function(){return this.__name__})}),n(a.prototype,{toString:p(function(){return"Symbol ("+b(this).__description__+")"}),valueOf:p(function(){return b(this)})}),r(a.prototype,a.toPrimitive,p("",function(){var c=b(this);return typeof c=="symbol"?c:c.toString()})),r(a.prototype,a.toStringTag,p("c","Symbol")),r(o.prototype,a.toStringTag,p("c",a.prototype[a.toStringTag])),r(o.prototype,a.toPrimitive,p("c",a.prototype[a.toPrimitive]))}}),Tv=ze({"node_modules/es6-symbol/index.js"(J,V){"use strict";V.exports=xU()()?oy().Symbol:MU()}}),SU=ze({"node_modules/es5-ext/array/#/clear.js"(J,V){"use strict";var p=dp();V.exports=function(){return p(this).length=0,this}}}),_g=ze({"node_modules/es5-ext/object/valid-callable.js"(J,V){"use strict";V.exports=function(p){if(typeof p!="function")throw new TypeError(p+" is not a function");return p}}}),EU=ze({"node_modules/type/string/coerce.js"(J,V){"use strict";var p=d0(),b=KA(),E=Object.prototype.toString;V.exports=function(k){if(!p(k))return null;if(b(k)){var l=k.toString;if(typeof l!="function"||l===E)return null}try{return""+k}catch{return null}}}}),kU=ze({"node_modules/type/lib/safe-to-string.js"(J,V){"use strict";V.exports=function(p){try{return p.toString()}catch{try{return String(p)}catch{return null}}}}}),CU=ze({"node_modules/type/lib/to-short-string.js"(J,V){"use strict";var p=kU(),b=/[\n\r\u2028\u2029]/g;V.exports=function(E){var k=p(E);return k===null?"":(k.length>100&&(k=k.slice(0,99)+"\u2026"),k=k.replace(b,function(l){switch(l){case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),k)}}}),LU=ze({"node_modules/type/lib/resolve-error-message.js"(J,V){"use strict";var p=EU(),b=CU();V.exports=function(E,k,l){l&&l.errorMessage&&(E=p(l.errorMessage));var e=E.indexOf("%v"),t=e>-1?b(k):null;if(l&&l.name){var n=E.indexOf("%n");if(n>-1){if(e>-1){var r,a,o,s;return n>e?(r=t,o=e,a=l.name,s=n):(r=l.name,o=n,a=t,s=e),E.slice(0,o)+r+E.slice(o+2,s)+a+E.slice(s+2)}return E.slice(0,n)+l.name+E.slice(n+2)}}return e>-1?E.slice(0,e)+t+E.slice(e+2):E}}}),rM=ze({"node_modules/type/lib/resolve-exception.js"(J,V){"use strict";var p=d0(),b=LU();V.exports=function(E,k,l){if(l&&!p(E)){if("default"in l)return l.default;if(l.isOptional)return null}var e=l&&l.Error||TypeError,t=new e(b(k,E,l));throw l&&l.errorCode&&(t.code=l.errorCode),t}}}),PU=ze({"node_modules/type/value/ensure.js"(J,V){"use strict";var p=rM(),b=d0();V.exports=function(E){if(b(E))return E;var k=arguments[1],l=k&&k.name?"Expected a value for %n, received %v":"Cannot use %v";return p(E,l,k)}}}),RU=ze({"node_modules/type/plain-function/ensure.js"(J,V){"use strict";var p=rM(),b=JA();V.exports=function(E){if(b(E))return E;var k=arguments[1],l=k&&k.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return p(E,l,k)}}}),IU=ze({"node_modules/es5-ext/array/from/is-implemented.js"(J,V){"use strict";V.exports=function(){var p=Array.from,b,E;return typeof p!="function"?!1:(b=["raz","dwa"],E=p(b),!!(E&&E!==b&&E[1]==="dwa"))}}}),DU=ze({"node_modules/es5-ext/function/is-function.js"(J,V){"use strict";var p=Object.prototype.toString,b=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);V.exports=function(E){return typeof E=="function"&&b(p.call(E))}}}),FU=ze({"node_modules/es5-ext/math/sign/is-implemented.js"(J,V){"use strict";V.exports=function(){var p=Math.sign;return typeof p!="function"?!1:p(10)===1&&p(-20)===-1}}}),zU=ze({"node_modules/es5-ext/math/sign/shim.js"(J,V){"use strict";V.exports=function(p){return p=Number(p),isNaN(p)||p===0?p:p>0?1:-1}}}),BU=ze({"node_modules/es5-ext/math/sign/index.js"(J,V){"use strict";V.exports=FU()()?Math.sign:zU()}}),OU=ze({"node_modules/es5-ext/number/to-integer.js"(J,V){"use strict";var p=BU(),b=Math.abs,E=Math.floor;V.exports=function(k){return isNaN(k)?0:(k=Number(k),k===0||!isFinite(k)?k:p(k)*E(b(k)))}}}),NU=ze({"node_modules/es5-ext/number/to-pos-integer.js"(J,V){"use strict";var p=OU(),b=Math.max;V.exports=function(E){return b(0,p(E))}}}),jU=ze({"node_modules/es5-ext/array/from/shim.js"(J,V){"use strict";var p=Tv().iterator,b=ny(),E=DU(),k=NU(),l=_g(),e=dp(),t=wv(),n=iy(),r=Array.isArray,a=Function.prototype.call,o={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;V.exports=function(c){var m=arguments[1],h=arguments[2],v,g,i,w,S,M,C,_,T,f;if(c=Object(e(c)),t(m)&&l(m),!this||this===Array||!E(this)){if(!m){if(b(c))return S=c.length,S!==1?Array.apply(null,c):(w=new Array(1),w[0]=c[0],w);if(r(c)){for(w=new Array(S=c.length),g=0;g=55296&&M<=56319&&(f+=c[++g])),f=m?a.call(m,h,f,i):f,v?(o.value=f,s(w,i,o)):w[i]=f,++i;S=i}}if(S===void 0)for(S=k(c.length),v&&(w=new v(S)),g=0;g=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){n(this,"__redo__",l("c",[o]));return}this.__redo__.forEach(function(s,c){s>=o&&(this.__redo__[c]=++s)},this),this.__redo__.push(o)}}),_onDelete:l(function(o){var s;o>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(s=this.__redo__.indexOf(o),s!==-1&&this.__redo__.splice(s,1),this.__redo__.forEach(function(c,m){c>o&&(this.__redo__[m]=--c)},this)))}),_onClear:l(function(){this.__redo__&&p.call(this.__redo__),this.__nextIndex__=0})}))),n(a.prototype,t.iterator,l(function(){return this}))}}),YU=ze({"node_modules/es6-iterator/array.js"(J,V){"use strict";var p=O2(),b=eM(),E=pp(),k=Tv(),l=aM(),e=Object.defineProperty,t;t=V.exports=function(n,r){if(!(this instanceof t))throw new TypeError("Constructor requires 'new'");l.call(this,n),r?b.call(r,"key+value")?r="key+value":b.call(r,"key")?r="key":r="value":r="value",e(this,"__kind__",E("",r))},p&&p(t,l),delete t.prototype.constructor,t.prototype=Object.create(l.prototype,{_resolve:E(function(n){return this.__kind__==="value"?this.__list__[n]:this.__kind__==="key+value"?[n,this.__list__[n]]:n})}),e(t.prototype,k.toStringTag,E("c","Array Iterator"))}}),XU=ze({"node_modules/es6-iterator/string.js"(J,V){"use strict";var p=O2(),b=pp(),E=Tv(),k=aM(),l=Object.defineProperty,e;e=V.exports=function(t){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");t=String(t),k.call(this,t),l(this,"__length__",b("",t.length))},p&&p(e,k),delete e.prototype.constructor,e.prototype=Object.create(k.prototype,{_next:b(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?n+this.__list__[this.__nextIndex__++]:n)})}),l(e.prototype,E.toStringTag,b("c","String Iterator"))}}),ZU=ze({"node_modules/es6-iterator/is-iterable.js"(J,V){"use strict";var p=ny(),b=wv(),E=iy(),k=Tv().iterator,l=Array.isArray;V.exports=function(e){return b(e)?l(e)||E(e)||p(e)?!0:typeof e[k]=="function":!1}}}),$U=ze({"node_modules/es6-iterator/valid-iterable.js"(J,V){"use strict";var p=ZU();V.exports=function(b){if(!p(b))throw new TypeError(b+" is not iterable");return b}}}),nM=ze({"node_modules/es6-iterator/get.js"(J,V){"use strict";var p=ny(),b=iy(),E=YU(),k=XU(),l=$U(),e=Tv().iterator;V.exports=function(t){return typeof l(t)[e]=="function"?t[e]():p(t)?new E(t):b(t)?new k(t):new E(t)}}}),KU=ze({"node_modules/es6-iterator/for-of.js"(J,V){"use strict";var p=ny(),b=_g(),E=iy(),k=nM(),l=Array.isArray,e=Function.prototype.call,t=Array.prototype.some;V.exports=function(n,r){var a,o=arguments[2],s,c,m,h,v,g,i;if(l(n)||p(n)?a="array":E(n)?a="string":n=k(n),b(r),c=function(){m=!0},a==="array"){t.call(n,function(w){return e.call(r,o,w,c),m});return}if(a==="string"){for(v=n.length,h=0;h=55296&&i<=56319&&(g+=n[++h])),e.call(r,o,g,c),!m);++h);return}for(s=n.next();!s.done;){if(e.call(r,o,s.value,c),m)return;s=n.next()}}}}),JU=ze({"node_modules/es6-weak-map/is-native-implemented.js"(J,V){"use strict";V.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}}),QU=ze({"node_modules/es6-weak-map/polyfill.js"(J,V){"use strict";var p=wv(),b=O2(),E=sU(),k=dp(),l=lU(),e=pp(),t=nM(),n=KU(),r=Tv().toStringTag,a=JU(),o=Array.isArray,s=Object.defineProperty,c=Object.prototype.hasOwnProperty,m=Object.getPrototypeOf,h;V.exports=h=function(){var v=arguments[0],g;if(!(this instanceof h))throw new TypeError("Constructor requires 'new'");return g=a&&b&&WeakMap!==h?b(new WeakMap,m(this)):this,p(v)&&(o(v)||(v=t(v))),s(g,"__weakMapData__",e("c","$weakMap$"+l())),v&&n(v,function(i){k(i),g.set(i[0],i[1])}),g},a&&(b&&b(h,WeakMap),h.prototype=Object.create(WeakMap.prototype,{constructor:e(h)})),Object.defineProperties(h.prototype,{delete:e(function(v){return c.call(E(v),this.__weakMapData__)?(delete v[this.__weakMapData__],!0):!1}),get:e(function(v){if(c.call(E(v),this.__weakMapData__))return v[this.__weakMapData__]}),has:e(function(v){return c.call(E(v),this.__weakMapData__)}),set:e(function(v,g){return s(E(v),this.__weakMapData__,e("c",g)),this}),toString:e(function(){return"[object WeakMap]"})}),s(h.prototype,r,e("c","WeakMap"))}}),iM=ze({"node_modules/es6-weak-map/index.js"(J,V){"use strict";V.exports=nU()()?WeakMap:QU()}}),eq=ze({"node_modules/array-find-index/index.js"(J,V){"use strict";V.exports=function(p,b,E){if(typeof Array.prototype.findIndex=="function")return p.findIndex(b,E);if(typeof b!="function")throw new TypeError("predicate must be a function");var k=Object(p),l=k.length;if(l===0)return-1;for(var e=0;e{this.drawItem(T)});return this},s.prototype.drawItem=function(g,f){let{groups:v}=this,m=v[g];if(typeof f=="number"&&(g=f,m=v[f],f=null),!(m&&m.count&&m.opacity))return;m.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,m,f));let i=[];for(let T=1;T{let h=m[w];if(_===void 0)return h;_===null?_={positions:null}:typeof _=="function"?_={ondraw:_}:typeof _[0]=="number"&&(_={positions:_}),_=e(_,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),_.positions===null&&(_.positions=[]),_.tooManyColors!=null&&(this.tooManyColors=_.tooManyColors),h||(m[w]=h={id:w,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:T.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:T.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:T.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:T.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:T.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},_=Object.assign({},s.defaults,_)),_.positions&&!("marker"in _)&&(_.marker=h.marker,delete h.marker),_.marker&&!("positions"in _)&&(_.positions=h.positions,delete h.positions);let u=0,A=0;if(t(h,_,[{snap:!0,size:(x,z)=>(x==null&&(x=s.defaults.size),u+=x&&x.length?1:0,x),borderSize:(x,z)=>(x==null&&(x=s.defaults.borderSize),u+=x&&x.length?1:0,x),opacity:parseFloat,color:(x,z)=>(x==null&&(x=s.defaults.color),x=this.updateColor(x),A++,x),borderColor:(x,z)=>(x==null&&(x=s.defaults.borderColor),x=this.updateColor(x),A++,x),bounds:(x,z,I)=>("range"in I||(I.range=null),x),positions:(x,z,I)=>{let{snap:O}=z,{positionBuffer:D,positionFractBuffer:B,selectionBuffer:F}=z;if(x.x||x.y)return x.x.length?z.xAttr={buffer:T.buffer(x.x),offset:0,stride:4,count:x.x.length}:z.xAttr={buffer:x.x.buffer,offset:x.x.offset*4||0,stride:(x.x.stride||1)*4,count:x.x.count},x.y.length?z.yAttr={buffer:T.buffer(x.y),offset:0,stride:4,count:x.y.length}:z.yAttr={buffer:x.y.buffer,offset:x.y.offset*4||0,stride:(x.y.stride||1)*4,count:x.y.count},z.count=Math.max(z.xAttr.count,z.yAttr.count),x;x=n(x,"float64");let P=z.count=Math.floor(x.length/2),j=z.bounds=P?b(x,2):null;if(!I.range&&!z.range&&(delete z.range,I.range=j),!I.marker&&!z.marker&&(delete z.marker,I.marker=null),O&&(O===!0||P>O)?z.tree=k(x,{bounds:j}):O&&O.length&&(z.tree=O),z.tree){let Q={primitive:"points",usage:"static",data:z.tree,type:"uint32"};z.elements?z.elements(Q):z.elements=T.elements(Q)}var U=r.float32(x);D({data:U,usage:"dynamic"});var $=r.fract32(x,U);return B({data:$,usage:"dynamic"}),F({data:new Uint8Array(P),type:"uint8",usage:"stream"}),x}},{marker:(x,z,I)=>{let{activation:O}=z;if(O.forEach(D=>D&&D.destroy&&D.destroy()),O.length=0,!x||typeof x[0]=="number"){let D=this.addMarker(x);O[D]=!0}else{let D=[];for(let B=0,F=Math.min(x.length,z.count);B{let O=z.bounds;if(O)return x||(x=O),z.scale=[1/(x[2]-x[0]),1/(x[3]-x[1])],z.translate=[-x[0],-x[1]],z.scaleFract=r.fract(z.scale),z.translateFract=r.fract(z.translate),x},viewport:x=>a(x||[i.drawingBufferWidth,i.drawingBufferHeight])}]),u){let{count:x,size:z,borderSize:I,sizeBuffer:O}=h,D=new Uint8Array(x*2);if(z.length||I.length)for(let B=0;B=0)return i;let T;if(g instanceof Uint8Array||g instanceof Uint8ClampedArray)T=g;else{T=new Uint8Array(g.length);for(let M=0,C=g.length;Mm*4&&(this.tooManyColors=!0),this.updatePalette(v),i.length===1?i[0]:i},s.prototype.updatePalette=function(g){if(this.tooManyColors)return;let{maxColors:f,paletteTexture:v}=this,m=Math.ceil(g.length*.25/f);if(m>1){g=g.slice();for(let i=g.length*.25%f;i{g.sizeBuffer.destroy(),g.positionBuffer.destroy(),g.positionFractBuffer.destroy(),g.colorBuffer.destroy(),g.activation.forEach(f=>f&&f.destroy&&f.destroy()),g.selectionBuffer.destroy(),g.elements&&g.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(g=>g&&g.destroy&&g.destroy()),this};var c=function(g,f){var v=new o(g,f),m=v.render.bind(v);return Object.assign(m,{render:m,update:v.update.bind(v),draw:v.draw.bind(v),destroy:v.destroy.bind(v),regl:v.regl,gl:v.gl,canvas:v.gl.canvas,groups:v.groups,markers:v.markerCache,palette:v.palette}),m};G.exports=c}}),Vc=ze({"node_modules/object-assign/index.js"(J,G){"use strict";var p=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;function k(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function l(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(o){return t[o]});if(r.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(o){a[o]=o}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}G.exports=l()?Object.assign:function(e,t){for(var n,r=k(e),a,o=1;o80*P){re=se=B[0],ne=V=B[1];for(var X=P;Xse&&(se=Z),K>V&&(V=K);H=Math.max(se-re,V-ne),H=H!==0?32767/H:0}return k($,Q,P,re,ne,H,0),Q}function b(B,F,P,j,U){var $,Q;if(U===D(B,F,P,j)>0)for($=F;$=F;$-=j)Q=z($,B[$],B[$+1],Q);return Q&&M(Q,Q.next)&&(I(Q),Q=Q.next),Q}function E(B,F){if(!B)return B;F||(F=B);var P=B,j;do if(j=!1,!P.steiner&&(M(P,P.next)||S(P.prev,P,P.next)===0)){if(I(P),P=F=P.prev,P===P.next)break;j=!0}else P=P.next;while(j||P!==F);return F}function k(B,F,P,j,U,$,Q){if(B){!Q&&$&&g(B,j,U,$);for(var re=B,ne,se;B.prev!==B.next;){if(ne=B.prev,se=B.next,$?e(B,j,U,$):l(B)){F.push(ne.i/P|0),F.push(B.i/P|0),F.push(se.i/P|0),I(B),B=se.next,re=se.next;continue}if(B=se,B===re){Q?Q===1?(B=t(E(B),F,P),k(B,F,P,j,U,$,2)):Q===2&&n(B,F,P,j,U,$):k(E(B),F,P,j,U,$,1);break}}}}function l(B){var F=B.prev,P=B,j=B.next;if(S(F,P,j)>=0)return!1;for(var U=F.x,$=P.x,Q=j.x,re=F.y,ne=P.y,se=j.y,V=U<$?U$?U>Q?U:Q:$>Q?$:Q,H=re>ne?re>se?re:se:ne>se?ne:se,X=j.next;X!==F;){if(X.x>=V&&X.x<=K&&X.y>=Z&&X.y<=H&&i(U,re,$,ne,Q,se,X.x,X.y)&&S(X.prev,X,X.next)>=0)return!1;X=X.next}return!0}function e(B,F,P,j){var U=B.prev,$=B,Q=B.next;if(S(U,$,Q)>=0)return!1;for(var re=U.x,ne=$.x,se=Q.x,V=U.y,Z=$.y,K=Q.y,H=rene?re>se?re:se:ne>se?ne:se,W=V>Z?V>K?V:K:Z>K?Z:K,ee=v(H,X,F,P,j),ae=v(q,W,F,P,j),he=B.prevZ,xe=B.nextZ;he&&he.z>=ee&&xe&&xe.z<=ae;){if(he.x>=H&&he.x<=q&&he.y>=X&&he.y<=W&&he!==U&&he!==Q&&i(re,V,ne,Z,se,K,he.x,he.y)&&S(he.prev,he,he.next)>=0||(he=he.prevZ,xe.x>=H&&xe.x<=q&&xe.y>=X&&xe.y<=W&&xe!==U&&xe!==Q&&i(re,V,ne,Z,se,K,xe.x,xe.y)&&S(xe.prev,xe,xe.next)>=0))return!1;xe=xe.nextZ}for(;he&&he.z>=ee;){if(he.x>=H&&he.x<=q&&he.y>=X&&he.y<=W&&he!==U&&he!==Q&&i(re,V,ne,Z,se,K,he.x,he.y)&&S(he.prev,he,he.next)>=0)return!1;he=he.prevZ}for(;xe&&xe.z<=ae;){if(xe.x>=H&&xe.x<=q&&xe.y>=X&&xe.y<=W&&xe!==U&&xe!==Q&&i(re,V,ne,Z,se,K,xe.x,xe.y)&&S(xe.prev,xe,xe.next)>=0)return!1;xe=xe.nextZ}return!0}function t(B,F,P){var j=B;do{var U=j.prev,$=j.next.next;!M(U,$)&&C(U,j,j.next,$)&&u(U,$)&&u($,U)&&(F.push(U.i/P|0),F.push(j.i/P|0),F.push($.i/P|0),I(j),I(j.next),j=B=$),j=j.next}while(j!==B);return E(j)}function n(B,F,P,j,U,$){var Q=B;do{for(var re=Q.next.next;re!==Q.prev;){if(Q.i!==re.i&&T(Q,re)){var ne=x(Q,re);Q=E(Q,Q.next),ne=E(ne,ne.next),k(Q,F,P,j,U,$,0),k(ne,F,P,j,U,$,0);return}re=re.next}Q=Q.next}while(Q!==B)}function r(B,F,P,j){var U=[],$,Q,re,ne,se;for($=0,Q=F.length;$=P.next.y&&P.next.y!==P.y){var re=P.x+(U-P.y)*(P.next.x-P.x)/(P.next.y-P.y);if(re<=j&&re>$&&($=re,Q=P.x=P.x&&P.x>=se&&j!==P.x&&i(UQ.x||P.x===Q.x&&c(Q,P)))&&(Q=P,Z=K)),P=P.next;while(P!==ne);return Q}function c(B,F){return S(B.prev,B,F.prev)<0&&S(F.next,B,B.next)<0}function g(B,F,P,j){var U=B;do U.z===0&&(U.z=v(U.x,U.y,F,P,j)),U.prevZ=U.prev,U.nextZ=U.next,U=U.next;while(U!==B);U.prevZ.nextZ=null,U.prevZ=null,f(U)}function f(B){var F,P,j,U,$,Q,re,ne,se=1;do{for(P=B,B=null,$=null,Q=0;P;){for(Q++,j=P,re=0,F=0;F0||ne>0&&j;)re!==0&&(ne===0||!j||P.z<=j.z)?(U=P,P=P.nextZ,re--):(U=j,j=j.nextZ,ne--),$?$.nextZ=U:B=U,U.prevZ=$,$=U;P=j}$.nextZ=null,se*=2}while(Q>1);return B}function v(B,F,P,j,U){return B=(B-P)*U|0,F=(F-j)*U|0,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,F=(F|F<<8)&16711935,F=(F|F<<4)&252645135,F=(F|F<<2)&858993459,F=(F|F<<1)&1431655765,B|F<<1}function m(B){var F=B,P=B;do(F.x=(B-Q)*($-re)&&(B-Q)*(j-re)>=(P-Q)*(F-re)&&(P-Q)*($-re)>=(U-Q)*(j-re)}function T(B,F){return B.next.i!==F.i&&B.prev.i!==F.i&&!h(B,F)&&(u(B,F)&&u(F,B)&&A(B,F)&&(S(B.prev,B,F.prev)||S(B,F.prev,F))||M(B,F)&&S(B.prev,B,B.next)>0&&S(F.prev,F,F.next)>0)}function S(B,F,P){return(F.y-B.y)*(P.x-F.x)-(F.x-B.x)*(P.y-F.y)}function M(B,F){return B.x===F.x&&B.y===F.y}function C(B,F,P,j){var U=w(S(B,F,P)),$=w(S(B,F,j)),Q=w(S(P,j,B)),re=w(S(P,j,F));return!!(U!==$&&Q!==re||U===0&&_(B,P,F)||$===0&&_(B,j,F)||Q===0&&_(P,B,j)||re===0&&_(P,F,j))}function _(B,F,P){return F.x<=Math.max(B.x,P.x)&&F.x>=Math.min(B.x,P.x)&&F.y<=Math.max(B.y,P.y)&&F.y>=Math.min(B.y,P.y)}function w(B){return B>0?1:B<0?-1:0}function h(B,F){var P=B;do{if(P.i!==B.i&&P.next.i!==B.i&&P.i!==F.i&&P.next.i!==F.i&&C(P,P.next,B,F))return!0;P=P.next}while(P!==B);return!1}function u(B,F){return S(B.prev,B,B.next)<0?S(B,F,B.next)>=0&&S(B,B.prev,F)>=0:S(B,F,B.prev)<0||S(B,B.next,F)<0}function A(B,F){var P=B,j=!1,U=(B.x+F.x)/2,$=(B.y+F.y)/2;do P.y>$!=P.next.y>$&&P.next.y!==P.y&&U<(P.next.x-P.x)*($-P.y)/(P.next.y-P.y)+P.x&&(j=!j),P=P.next;while(P!==B);return j}function x(B,F){var P=new O(B.i,B.x,B.y),j=new O(F.i,F.x,F.y),U=B.next,$=F.prev;return B.next=F,F.prev=B,P.next=U,U.prev=P,j.next=P,P.prev=j,$.next=j,j.prev=$,j}function z(B,F,P,j){var U=new O(B,F,P);return j?(U.next=j.next,U.prev=j,j.next.prev=U,j.next=U):(U.prev=U,U.next=U),U}function I(B){B.next.prev=B.prev,B.prev.next=B.next,B.prevZ&&(B.prevZ.nextZ=B.nextZ),B.nextZ&&(B.nextZ.prevZ=B.prevZ)}function O(B,F,P){this.i=B,this.x=F,this.y=P,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}p.deviation=function(B,F,P,j){var U=F&&F.length,$=U?F[0]*P:B.length,Q=Math.abs(D(B,0,$,P));if(U)for(var re=0,ne=F.length;re0&&(j+=B[U-1].length,P.holes.push(j))}return P}}}),aU=ze({"node_modules/array-normalize/index.js"(J,G){"use strict";var p=c0();G.exports=b;function b(E,k,l){if(!E||E.length==null)throw Error("Argument should be an array");k==null&&(k=1),l==null&&(l=p(E,k));for(var e=0;e-1}}}),eM=ze({"node_modules/es5-ext/string/#/contains/index.js"(J,G){"use strict";G.exports=mU()()?String.prototype.contains:gU()}}),pp=ze({"node_modules/d/index.js"(J,G){"use strict";var p=d0(),b=JA(),E=N2(),k=QA(),l=eM(),e=G.exports=function(t,n){var r,a,o,s,c;return arguments.length<2||typeof t!="string"?(s=n,n=t,t=null):s=arguments[2],p(t)?(r=l.call(t,"c"),a=l.call(t,"e"),o=l.call(t,"w")):(r=o=!0,a=!1),c={value:n,configurable:r,enumerable:a,writable:o},s?E(k(s),c):c};e.gs=function(t,n,r){var a,o,s,c;return typeof t!="string"?(s=r,r=n,n=t,t=null):s=arguments[3],p(n)?b(n)?p(r)?b(r)||(s=r,r=void 0):r=void 0:(s=n,n=r=void 0):n=void 0,p(t)?(a=l.call(t,"c"),o=l.call(t,"e")):(a=!0,o=!1),c={get:n,set:r,configurable:a,enumerable:o},s?E(k(s),c):c}}}),ny=ze({"node_modules/es5-ext/function/is-arguments.js"(J,G){"use strict";var p=Object.prototype.toString,b=p.call(function(){return arguments}());G.exports=function(E){return p.call(E)===b}}}),iy=ze({"node_modules/es5-ext/string/is-string.js"(J,G){"use strict";var p=Object.prototype.toString,b=p.call("");G.exports=function(E){return typeof E=="string"||E&&typeof E=="object"&&(E instanceof String||p.call(E)===b)||!1}}}),yU=ze({"node_modules/ext/global-this/is-implemented.js"(J,G){"use strict";G.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),_U=ze({"node_modules/ext/global-this/implementation.js"(J,G){var p=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};G.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return p()}try{return __global__||p()}finally{delete Object.prototype.__global__}}()}}),oy=ze({"node_modules/ext/global-this/index.js"(J,G){"use strict";G.exports=yU()()?globalThis:_U()}}),xU=ze({"node_modules/es6-symbol/is-implemented.js"(J,G){"use strict";var p=oy(),b={object:!0,symbol:!0};G.exports=function(){var E=p.Symbol,k;if(typeof E!="function")return!1;k=E("test symbol");try{String(k)}catch{return!1}return!(!b[typeof E.iterator]||!b[typeof E.toPrimitive]||!b[typeof E.toStringTag])}}}),bU=ze({"node_modules/es6-symbol/is-symbol.js"(J,G){"use strict";G.exports=function(p){return p?typeof p=="symbol"?!0:!p.constructor||p.constructor.name!=="Symbol"?!1:p[p.constructor.toStringTag]==="Symbol":!1}}}),tM=ze({"node_modules/es6-symbol/validate-symbol.js"(J,G){"use strict";var p=bU();G.exports=function(b){if(!p(b))throw new TypeError(b+" is not a symbol");return b}}}),wU=ze({"node_modules/es6-symbol/lib/private/generate-name.js"(J,G){"use strict";var p=pp(),b=Object.create,E=Object.defineProperty,k=Object.prototype,l=b(null);G.exports=function(e){for(var t=0,n,r;l[e+(t||"")];)++t;return e+=t||"",l[e]=!0,n="@@"+e,E(k,n,p.gs(null,function(a){r||(r=!0,E(this,n,p(a)),r=!1)})),n}}}),TU=ze({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(J,G){"use strict";var p=pp(),b=oy().Symbol;G.exports=function(E){return Object.defineProperties(E,{hasInstance:p("",b&&b.hasInstance||E("hasInstance")),isConcatSpreadable:p("",b&&b.isConcatSpreadable||E("isConcatSpreadable")),iterator:p("",b&&b.iterator||E("iterator")),match:p("",b&&b.match||E("match")),replace:p("",b&&b.replace||E("replace")),search:p("",b&&b.search||E("search")),species:p("",b&&b.species||E("species")),split:p("",b&&b.split||E("split")),toPrimitive:p("",b&&b.toPrimitive||E("toPrimitive")),toStringTag:p("",b&&b.toStringTag||E("toStringTag")),unscopables:p("",b&&b.unscopables||E("unscopables"))})}}}),AU=ze({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(J,G){"use strict";var p=pp(),b=tM(),E=Object.create(null);G.exports=function(k){return Object.defineProperties(k,{for:p(function(l){return E[l]?E[l]:E[l]=k(String(l))}),keyFor:p(function(l){var e;b(l);for(e in E)if(E[e]===l)return e})})}}}),MU=ze({"node_modules/es6-symbol/polyfill.js"(J,G){"use strict";var p=pp(),b=tM(),E=oy().Symbol,k=wU(),l=TU(),e=AU(),t=Object.create,n=Object.defineProperties,r=Object.defineProperty,a,o,s;if(typeof E=="function")try{String(E()),s=!0}catch{}else E=null;o=function(g){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return a(g)},G.exports=a=function c(g){var f;if(this instanceof c)throw new TypeError("Symbol is not a constructor");return s?E(g):(f=t(o.prototype),g=g===void 0?"":String(g),n(f,{__description__:p("",g),__name__:p("",k(g))}))},l(a),e(a),n(o.prototype,{constructor:p(a),toString:p("",function(){return this.__name__})}),n(a.prototype,{toString:p(function(){return"Symbol ("+b(this).__description__+")"}),valueOf:p(function(){return b(this)})}),r(a.prototype,a.toPrimitive,p("",function(){var c=b(this);return typeof c=="symbol"?c:c.toString()})),r(a.prototype,a.toStringTag,p("c","Symbol")),r(o.prototype,a.toStringTag,p("c",a.prototype[a.toStringTag])),r(o.prototype,a.toPrimitive,p("c",a.prototype[a.toPrimitive]))}}),Tv=ze({"node_modules/es6-symbol/index.js"(J,G){"use strict";G.exports=xU()()?oy().Symbol:MU()}}),SU=ze({"node_modules/es5-ext/array/#/clear.js"(J,G){"use strict";var p=dp();G.exports=function(){return p(this).length=0,this}}}),_1=ze({"node_modules/es5-ext/object/valid-callable.js"(J,G){"use strict";G.exports=function(p){if(typeof p!="function")throw new TypeError(p+" is not a function");return p}}}),EU=ze({"node_modules/type/string/coerce.js"(J,G){"use strict";var p=d0(),b=KA(),E=Object.prototype.toString;G.exports=function(k){if(!p(k))return null;if(b(k)){var l=k.toString;if(typeof l!="function"||l===E)return null}try{return""+k}catch{return null}}}}),kU=ze({"node_modules/type/lib/safe-to-string.js"(J,G){"use strict";G.exports=function(p){try{return p.toString()}catch{try{return String(p)}catch{return null}}}}}),CU=ze({"node_modules/type/lib/to-short-string.js"(J,G){"use strict";var p=kU(),b=/[\n\r\u2028\u2029]/g;G.exports=function(E){var k=p(E);return k===null?"":(k.length>100&&(k=k.slice(0,99)+"\u2026"),k=k.replace(b,function(l){switch(l){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),k)}}}),LU=ze({"node_modules/type/lib/resolve-error-message.js"(J,G){"use strict";var p=EU(),b=CU();G.exports=function(E,k,l){l&&l.errorMessage&&(E=p(l.errorMessage));var e=E.indexOf("%v"),t=e>-1?b(k):null;if(l&&l.name){var n=E.indexOf("%n");if(n>-1){if(e>-1){var r,a,o,s;return n>e?(r=t,o=e,a=l.name,s=n):(r=l.name,o=n,a=t,s=e),E.slice(0,o)+r+E.slice(o+2,s)+a+E.slice(s+2)}return E.slice(0,n)+l.name+E.slice(n+2)}}return e>-1?E.slice(0,e)+t+E.slice(e+2):E}}}),rM=ze({"node_modules/type/lib/resolve-exception.js"(J,G){"use strict";var p=d0(),b=LU();G.exports=function(E,k,l){if(l&&!p(E)){if("default"in l)return l.default;if(l.isOptional)return null}var e=l&&l.Error||TypeError,t=new e(b(k,E,l));throw l&&l.errorCode&&(t.code=l.errorCode),t}}}),PU=ze({"node_modules/type/value/ensure.js"(J,G){"use strict";var p=rM(),b=d0();G.exports=function(E){if(b(E))return E;var k=arguments[1],l=k&&k.name?"Expected a value for %n, received %v":"Cannot use %v";return p(E,l,k)}}}),RU=ze({"node_modules/type/plain-function/ensure.js"(J,G){"use strict";var p=rM(),b=JA();G.exports=function(E){if(b(E))return E;var k=arguments[1],l=k&&k.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return p(E,l,k)}}}),IU=ze({"node_modules/es5-ext/array/from/is-implemented.js"(J,G){"use strict";G.exports=function(){var p=Array.from,b,E;return typeof p!="function"?!1:(b=["raz","dwa"],E=p(b),!!(E&&E!==b&&E[1]==="dwa"))}}}),DU=ze({"node_modules/es5-ext/function/is-function.js"(J,G){"use strict";var p=Object.prototype.toString,b=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);G.exports=function(E){return typeof E=="function"&&b(p.call(E))}}}),FU=ze({"node_modules/es5-ext/math/sign/is-implemented.js"(J,G){"use strict";G.exports=function(){var p=Math.sign;return typeof p!="function"?!1:p(10)===1&&p(-20)===-1}}}),zU=ze({"node_modules/es5-ext/math/sign/shim.js"(J,G){"use strict";G.exports=function(p){return p=Number(p),isNaN(p)||p===0?p:p>0?1:-1}}}),BU=ze({"node_modules/es5-ext/math/sign/index.js"(J,G){"use strict";G.exports=FU()()?Math.sign:zU()}}),OU=ze({"node_modules/es5-ext/number/to-integer.js"(J,G){"use strict";var p=BU(),b=Math.abs,E=Math.floor;G.exports=function(k){return isNaN(k)?0:(k=Number(k),k===0||!isFinite(k)?k:p(k)*E(b(k)))}}}),NU=ze({"node_modules/es5-ext/number/to-pos-integer.js"(J,G){"use strict";var p=OU(),b=Math.max;G.exports=function(E){return b(0,p(E))}}}),jU=ze({"node_modules/es5-ext/array/from/shim.js"(J,G){"use strict";var p=Tv().iterator,b=ny(),E=DU(),k=NU(),l=_1(),e=dp(),t=wv(),n=iy(),r=Array.isArray,a=Function.prototype.call,o={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;G.exports=function(c){var g=arguments[1],f=arguments[2],v,m,i,T,S,M,C,_,w,h;if(c=Object(e(c)),t(g)&&l(g),!this||this===Array||!E(this)){if(!g){if(b(c))return S=c.length,S!==1?Array.apply(null,c):(T=new Array(1),T[0]=c[0],T);if(r(c)){for(T=new Array(S=c.length),m=0;m=55296&&M<=56319&&(h+=c[++m])),h=g?a.call(g,f,h,i):h,v?(o.value=h,s(T,i,o)):T[i]=h,++i;S=i}}if(S===void 0)for(S=k(c.length),v&&(T=new v(S)),m=0;m=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){n(this,"__redo__",l("c",[o]));return}this.__redo__.forEach(function(s,c){s>=o&&(this.__redo__[c]=++s)},this),this.__redo__.push(o)}}),_onDelete:l(function(o){var s;o>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(s=this.__redo__.indexOf(o),s!==-1&&this.__redo__.splice(s,1),this.__redo__.forEach(function(c,g){c>o&&(this.__redo__[g]=--c)},this)))}),_onClear:l(function(){this.__redo__&&p.call(this.__redo__),this.__nextIndex__=0})}))),n(a.prototype,t.iterator,l(function(){return this}))}}),YU=ze({"node_modules/es6-iterator/array.js"(J,G){"use strict";var p=O2(),b=eM(),E=pp(),k=Tv(),l=aM(),e=Object.defineProperty,t;t=G.exports=function(n,r){if(!(this instanceof t))throw new TypeError("Constructor requires 'new'");l.call(this,n),r?b.call(r,"key+value")?r="key+value":b.call(r,"key")?r="key":r="value":r="value",e(this,"__kind__",E("",r))},p&&p(t,l),delete t.prototype.constructor,t.prototype=Object.create(l.prototype,{_resolve:E(function(n){return this.__kind__==="value"?this.__list__[n]:this.__kind__==="key+value"?[n,this.__list__[n]]:n})}),e(t.prototype,k.toStringTag,E("c","Array Iterator"))}}),XU=ze({"node_modules/es6-iterator/string.js"(J,G){"use strict";var p=O2(),b=pp(),E=Tv(),k=aM(),l=Object.defineProperty,e;e=G.exports=function(t){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");t=String(t),k.call(this,t),l(this,"__length__",b("",t.length))},p&&p(e,k),delete e.prototype.constructor,e.prototype=Object.create(k.prototype,{_next:b(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?n+this.__list__[this.__nextIndex__++]:n)})}),l(e.prototype,E.toStringTag,b("c","String Iterator"))}}),ZU=ze({"node_modules/es6-iterator/is-iterable.js"(J,G){"use strict";var p=ny(),b=wv(),E=iy(),k=Tv().iterator,l=Array.isArray;G.exports=function(e){return b(e)?l(e)||E(e)||p(e)?!0:typeof e[k]=="function":!1}}}),$U=ze({"node_modules/es6-iterator/valid-iterable.js"(J,G){"use strict";var p=ZU();G.exports=function(b){if(!p(b))throw new TypeError(b+" is not iterable");return b}}}),nM=ze({"node_modules/es6-iterator/get.js"(J,G){"use strict";var p=ny(),b=iy(),E=YU(),k=XU(),l=$U(),e=Tv().iterator;G.exports=function(t){return typeof l(t)[e]=="function"?t[e]():p(t)?new E(t):b(t)?new k(t):new E(t)}}}),KU=ze({"node_modules/es6-iterator/for-of.js"(J,G){"use strict";var p=ny(),b=_1(),E=iy(),k=nM(),l=Array.isArray,e=Function.prototype.call,t=Array.prototype.some;G.exports=function(n,r){var a,o=arguments[2],s,c,g,f,v,m,i;if(l(n)||p(n)?a="array":E(n)?a="string":n=k(n),b(r),c=function(){g=!0},a==="array"){t.call(n,function(T){return e.call(r,o,T,c),g});return}if(a==="string"){for(v=n.length,f=0;f=55296&&i<=56319&&(m+=n[++f])),e.call(r,o,m,c),!g);++f);return}for(s=n.next();!s.done;){if(e.call(r,o,s.value,c),g)return;s=n.next()}}}}),JU=ze({"node_modules/es6-weak-map/is-native-implemented.js"(J,G){"use strict";G.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}}),QU=ze({"node_modules/es6-weak-map/polyfill.js"(J,G){"use strict";var p=wv(),b=O2(),E=sU(),k=dp(),l=lU(),e=pp(),t=nM(),n=KU(),r=Tv().toStringTag,a=JU(),o=Array.isArray,s=Object.defineProperty,c=Object.prototype.hasOwnProperty,g=Object.getPrototypeOf,f;G.exports=f=function(){var v=arguments[0],m;if(!(this instanceof f))throw new TypeError("Constructor requires 'new'");return m=a&&b&&WeakMap!==f?b(new WeakMap,g(this)):this,p(v)&&(o(v)||(v=t(v))),s(m,"__weakMapData__",e("c","$weakMap$"+l())),v&&n(v,function(i){k(i),m.set(i[0],i[1])}),m},a&&(b&&b(f,WeakMap),f.prototype=Object.create(WeakMap.prototype,{constructor:e(f)})),Object.defineProperties(f.prototype,{delete:e(function(v){return c.call(E(v),this.__weakMapData__)?(delete v[this.__weakMapData__],!0):!1}),get:e(function(v){if(c.call(E(v),this.__weakMapData__))return v[this.__weakMapData__]}),has:e(function(v){return c.call(E(v),this.__weakMapData__)}),set:e(function(v,m){return s(E(v),this.__weakMapData__,e("c",m)),this}),toString:e(function(){return"[object WeakMap]"})}),s(f.prototype,r,e("c","WeakMap"))}}),iM=ze({"node_modules/es6-weak-map/index.js"(J,G){"use strict";G.exports=nU()()?WeakMap:QU()}}),eq=ze({"node_modules/array-find-index/index.js"(J,G){"use strict";G.exports=function(p,b,E){if(typeof Array.prototype.findIndex=="function")return p.findIndex(b,E);if(typeof b!="function")throw new TypeError("predicate must be a function");var k=Object(p),l=k.length;if(l===0)return-1;for(var e=0;eA.join==="round"?2:1,miterLimit:S.prop("miterLimit"),scale:S.prop("scale"),scaleFract:S.prop("scaleFract"),translateFract:S.prop("translateFract"),translate:S.prop("translate"),thickness:S.prop("thickness"),dashTexture:S.prop("dashTexture"),opacity:S.prop("opacity"),pixelRatio:S.context("pixelRatio"),id:S.prop("id"),dashLength:S.prop("dashLength"),viewport:(u,A)=>[A.viewport.x,A.viewport.y,u.viewportWidth,u.viewportHeight],depth:S.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(u,A)=>!A.overlay},stencil:{enable:!1},scissor:{enable:!0,box:S.prop("viewport")},viewport:S.prop("viewport")},_=S(E({vert:c,frag:m,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:S.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},C)),T;try{T=S(E({cull:{enable:!0,face:"back"},vert:g,frag:i,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aColor:{buffer:S.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:S.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},C))}catch{T=_}return{fill:S({primitive:"triangle",elements:(u,A)=>A.triangles,offset:0,vert:h,frag:v,uniforms:{scale:S.prop("scale"),color:S.prop("fill"),scaleFract:S.prop("scaleFract"),translateFract:S.prop("translateFract"),translate:S.prop("translate"),opacity:S.prop("opacity"),pixelRatio:S.context("pixelRatio"),id:S.prop("id"),viewport:(u,A)=>[A.viewport.x,A.viewport.y,u.viewportWidth,u.viewportHeight]},attributes:{position:{buffer:S.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:8}},blend:C.blend,depth:{enable:!1},scissor:C.scissor,stencil:C.stencil,viewport:C.viewport}),rect:_,miter:T}},w.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},w.prototype.render=function(...S){S.length&&this.update(...S),this.draw()},w.prototype.draw=function(...S){return(S.length?S:this.passes).forEach((M,C)=>{if(M&&Array.isArray(M))return this.draw(...M);typeof M=="number"&&(M=this.passes[M]),M&&M.count>1&&M.opacity&&(this.regl._refresh(),M.fill&&M.triangles&&M.triangles.length>2&&this.shaders.fill(M),M.thickness&&(M.scale[0]*M.viewport.width>w.precisionThreshold||M.scale[1]*M.viewport.height>w.precisionThreshold?this.shaders.rect(M):M.join==="rect"||!M.join&&(M.thickness<=2||M.count>=w.maxPoints)?this.shaders.rect(M):this.shaders.miter(M)))}),this},w.prototype.update=function(S){if(!S)return;S.length!=null?typeof S[0]=="number"&&(S=[{positions:S}]):Array.isArray(S)||(S=[S]);let{regl:M,gl:C}=this;if(S.forEach((T,f)=>{let u=this.passes[f];if(T!==void 0){if(T===null){this.passes[f]=null;return}if(typeof T[0]=="number"&&(T={positions:T}),T=k(T,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),u||(this.passes[f]=u={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:M.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:M.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},T=E({},w.defaults,T)),T.thickness!=null&&(u.thickness=parseFloat(T.thickness)),T.opacity!=null&&(u.opacity=parseFloat(T.opacity)),T.miterLimit!=null&&(u.miterLimit=parseFloat(T.miterLimit)),T.overlay!=null&&(u.overlay=!!T.overlay,fne-se),$=[],Q=0,re=u.hole!=null?u.hole[0]:null;if(re!=null){let ne=s(U,se=>se>=re);U=U.slice(0,ne),U.push(re)}for(let ne=0;neK-re+(U[ne]-Q)),X=e(se,G);X=X.map(K=>K+Q+(K+Q{S.colorBuffer.destroy(),S.positionBuffer.destroy(),S.dashTexture.destroy()}),this.passes.length=0,this}}}),tq=ze({"node_modules/regl-error2d/index.js"(J,V){"use strict";var p=c0(),b=ay(),E=WA(),k=qd(),l=Vc(),e=f0(),{float32:t,fract32:n}=B2();V.exports=a;var r=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function a(o,s){if(typeof o=="function"?(s||(s={}),s.regl=o):s=o,s.length&&(s.positions=s),o=s.regl,!o.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let c=o._gl,m,h,v,g,i,w,S={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},M=[];return g=o.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),h=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),i=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),w=o.buffer({usage:"static",type:"float",data:r}),f(s),m=o({vert:` +`;G.exports=T;function T(S,M){if(!(this instanceof T))return new T(S,M);if(typeof S=="function"?(M||(M={}),M.regl=S):M=S,M.length&&(M.positions=M),S=M.regl,!S.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=S._gl,this.regl=S,this.passes=[],this.shaders=T.shaders.has(S)?T.shaders.get(S):T.shaders.set(S,T.createShaders(S)).get(S),this.update(M)}T.dashMult=2,T.maxPatternLength=256,T.precisionThreshold=3e6,T.maxPoints=1e4,T.maxLines=2048,T.shaders=new a,T.createShaders=function(S){let M=S.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),C={primitive:"triangle strip",instances:S.prop("count"),count:4,offset:0,uniforms:{miterMode:(u,A)=>A.join==="round"?2:1,miterLimit:S.prop("miterLimit"),scale:S.prop("scale"),scaleFract:S.prop("scaleFract"),translateFract:S.prop("translateFract"),translate:S.prop("translate"),thickness:S.prop("thickness"),dashTexture:S.prop("dashTexture"),opacity:S.prop("opacity"),pixelRatio:S.context("pixelRatio"),id:S.prop("id"),dashLength:S.prop("dashLength"),viewport:(u,A)=>[A.viewport.x,A.viewport.y,u.viewportWidth,u.viewportHeight],depth:S.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(u,A)=>!A.overlay},stencil:{enable:!1},scissor:{enable:!0,box:S.prop("viewport")},viewport:S.prop("viewport")},_=S(E({vert:c,frag:g,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:S.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},C)),w;try{w=S(E({cull:{enable:!0,face:"back"},vert:m,frag:i,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aColor:{buffer:S.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:S.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},C))}catch{w=_}return{fill:S({primitive:"triangle",elements:(u,A)=>A.triangles,offset:0,vert:f,frag:v,uniforms:{scale:S.prop("scale"),color:S.prop("fill"),scaleFract:S.prop("scaleFract"),translateFract:S.prop("translateFract"),translate:S.prop("translate"),opacity:S.prop("opacity"),pixelRatio:S.context("pixelRatio"),id:S.prop("id"),viewport:(u,A)=>[A.viewport.x,A.viewport.y,u.viewportWidth,u.viewportHeight]},attributes:{position:{buffer:S.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:8}},blend:C.blend,depth:{enable:!1},scissor:C.scissor,stencil:C.stencil,viewport:C.viewport}),rect:_,miter:w}},T.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},T.prototype.render=function(...S){S.length&&this.update(...S),this.draw()},T.prototype.draw=function(...S){return(S.length?S:this.passes).forEach((M,C)=>{if(M&&Array.isArray(M))return this.draw(...M);typeof M=="number"&&(M=this.passes[M]),M&&M.count>1&&M.opacity&&(this.regl._refresh(),M.fill&&M.triangles&&M.triangles.length>2&&this.shaders.fill(M),M.thickness&&(M.scale[0]*M.viewport.width>T.precisionThreshold||M.scale[1]*M.viewport.height>T.precisionThreshold?this.shaders.rect(M):M.join==="rect"||!M.join&&(M.thickness<=2||M.count>=T.maxPoints)?this.shaders.rect(M):this.shaders.miter(M)))}),this},T.prototype.update=function(S){if(!S)return;S.length!=null?typeof S[0]=="number"&&(S=[{positions:S}]):Array.isArray(S)||(S=[S]);let{regl:M,gl:C}=this;if(S.forEach((w,h)=>{let u=this.passes[h];if(w!==void 0){if(w===null){this.passes[h]=null;return}if(typeof w[0]=="number"&&(w={positions:w}),w=k(w,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),u||(this.passes[h]=u={id:h,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:M.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:M.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},w=E({},T.defaults,w)),w.thickness!=null&&(u.thickness=parseFloat(w.thickness)),w.opacity!=null&&(u.opacity=parseFloat(w.opacity)),w.miterLimit!=null&&(u.miterLimit=parseFloat(w.miterLimit)),w.overlay!=null&&(u.overlay=!!w.overlay,hne-se),$=[],Q=0,re=u.hole!=null?u.hole[0]:null;if(re!=null){let ne=s(U,se=>se>=re);U=U.slice(0,ne),U.push(re)}for(let ne=0;neK-re+(U[ne]-Q)),Z=e(se,V);Z=Z.map(K=>K+Q+(K+Q{S.colorBuffer.destroy(),S.positionBuffer.destroy(),S.dashTexture.destroy()}),this.passes.length=0,this}}}),tq=ze({"node_modules/regl-error2d/index.js"(J,G){"use strict";var p=c0(),b=ay(),E=WA(),k=qd(),l=Vc(),e=f0(),{float32:t,fract32:n}=B2();G.exports=a;var r=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function a(o,s){if(typeof o=="function"?(s||(s={}),s.regl=o):s=o,s.length&&(s.positions=s),o=s.regl,!o.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let c=o._gl,g,f,v,m,i,T,S={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},M=[];return m=o.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),f=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),i=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),T=o.buffer({usage:"static",type:"float",data:r}),h(s),g=o({vert:` precision highp float; attribute vec2 position, positionFract; @@ -2615,10 +2615,10 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } - `,uniforms:{range:o.prop("range"),lineWidth:o.prop("lineWidth"),capSize:o.prop("capSize"),opacity:o.prop("opacity"),scale:o.prop("scale"),translate:o.prop("translate"),scaleFract:o.prop("scaleFract"),translateFract:o.prop("translateFract"),viewport:(A,x)=>[x.viewport.x,x.viewport.y,A.viewportWidth,A.viewportHeight]},attributes:{color:{buffer:g,offset:(A,x)=>x.offset*4,divisor:1},position:{buffer:h,offset:(A,x)=>x.offset*8,divisor:1},positionFract:{buffer:v,offset:(A,x)=>x.offset*8,divisor:1},error:{buffer:i,offset:(A,x)=>x.offset*16,divisor:1},direction:{buffer:w,stride:24,offset:0},lineOffset:{buffer:w,stride:24,offset:8},capOffset:{buffer:w,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:o.prop("viewport")},viewport:o.prop("viewport"),stencil:!1,instances:o.prop("count"),count:r.length}),l(C,{update:f,draw:_,destroy:u,regl:o,gl:c,canvas:c.canvas,groups:M}),C;function C(A){A?f(A):A===null&&u(),_()}function _(A){if(typeof A=="number")return T(A);A&&!Array.isArray(A)&&(A=[A]),o._refresh(),M.forEach((x,z)=>{if(x){if(A&&(A[z]?x.draw=!0:x.draw=!1),!x.draw){x.draw=!0;return}T(z)}})}function T(A){typeof A=="number"&&(A=M[A]),A!=null&&A&&A.count&&A.color&&A.opacity&&A.positions&&A.positions.length>1&&(A.scaleRatio=[A.scale[0]*A.viewport.width,A.scale[1]*A.viewport.height],m(A),A.after&&A.after(A))}function f(A){if(!A)return;A.length!=null?typeof A[0]=="number"&&(A=[{positions:A}]):Array.isArray(A)||(A=[A]);let x=0,z=0;if(C.groups=M=A.map((D,B)=>{let F=M[B];if(D)typeof D=="function"?D={after:D}:typeof D[0]=="number"&&(D={positions:D});else return F;return D=k(D,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),F||(M[B]=F={id:B,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},D=l({},S,D)),E(F,D,[{lineWidth:P=>+P*.5,capSize:P=>+P*.5,opacity:parseFloat,errors:P=>(P=e(P),z+=P.length,P),positions:(P,j)=>(P=e(P,"float64"),j.count=Math.floor(P.length/2),j.bounds=p(P,2),j.offset=x,x+=j.count,P)},{color:(P,j)=>{let U=j.count;if(P||(P="transparent"),!Array.isArray(P)||typeof P[0]=="number"){let Q=P;P=Array(U);for(let re=0;re{let $=j.bounds;return P||(P=$),j.scale=[1/(P[2]-P[0]),1/(P[3]-P[1])],j.translate=[-P[0],-P[1]],j.scaleFract=n(j.scale),j.translateFract=n(j.translate),P},viewport:P=>{let j;return Array.isArray(P)?j={x:P[0],y:P[1],width:P[2]-P[0],height:P[3]-P[1]}:P?(j={x:P.x||P.left||0,y:P.y||P.top||0},P.right?j.width=P.right-j.x:j.width=P.w||P.width||0,P.bottom?j.height=P.bottom-j.y:j.height=P.h||P.height||0):j={x:0,y:0,width:c.drawingBufferWidth,height:c.drawingBufferHeight},j}}]),F}),x||z){let D=M.reduce((j,U,$)=>j+(U?U.count:0),0),B=new Float64Array(D*2),F=new Uint8Array(D*4),P=new Float32Array(D*4);M.forEach((j,U)=>{if(!j)return;let{positions:$,count:Q,offset:re,color:ne,errors:se}=j;Q&&(F.set(ne,re*4),P.set(se,re*4),B.set($,re*2))});var I=t(B);h(I);var O=n(B,I);v(O),g(F),i(P)}}function u(){h.destroy(),v.destroy(),g.destroy(),i.destroy(),w.destroy()}}}}),rq=ze({"node_modules/unquote/index.js"(J,V){var p=/[\'\"]/;V.exports=function(E){return E?(p.test(E.charAt(0))&&(E=E.substr(1)),p.test(E.charAt(E.length-1))&&(E=E.substr(0,E.length-1)),E):""}}}),sM=ze({"node_modules/css-global-keywords/index.json"(J,V){V.exports=["inherit","initial","unset"]}}),lM=ze({"node_modules/css-system-font-keywords/index.json"(J,V){V.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),uM=ze({"node_modules/css-font-weight-keywords/index.json"(J,V){V.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),cM=ze({"node_modules/css-font-style-keywords/index.json"(J,V){V.exports=["normal","italic","oblique"]}}),fM=ze({"node_modules/css-font-stretch-keywords/index.json"(J,V){V.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),aq=ze({"node_modules/parenthesis/index.js"(J,V){"use strict";function p(k,l){if(typeof k!="string")return[k];var e=[k];typeof l=="string"||Array.isArray(l)?l={brackets:l}:l||(l={});var t=l.brackets?Array.isArray(l.brackets)?l.brackets:[l.brackets]:["{}","[]","()"],n=l.escape||"___",r=!!l.flat;t.forEach(function(s){var c=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),m=[];function h(v,g,i){var w=e.push(v.slice(s[0].length,-s[1].length))-1;return m.push(w),n+w+n}e.forEach(function(v,g){for(var i,w=0;v!=i;)if(i=v,v=v.replace(c,h),w++>1e4)throw Error("References have circular dependency. Please, check them.");e[g]=v}),m=m.reverse(),e=e.map(function(v){return m.forEach(function(g){v=v.replace(new RegExp("(\\"+n+g+"\\"+n+")","g"),s[0]+"$1"+s[1])}),v})});var a=new RegExp("\\"+n+"([0-9]+)\\"+n);function o(s,c,m){for(var h=[],v,g=0;v=a.exec(s);){if(g++>1e4)throw Error("Circular references in parenthesis");h.push(s.slice(0,v.index)),h.push(o(c[v[1]],c)),s=s.slice(v.index+v[0].length)}return h.push(s),h}return r?e:o(e[0],e)}function b(k,l){if(l&&l.flat){var e=l&&l.escape||"___",t=k[0],n;if(!t)return"";for(var r=new RegExp("\\"+e+"([0-9]+)\\"+e),a=0;t!=n;){if(a++>1e4)throw Error("Circular references in "+k);n=t,t=t.replace(r,o)}return t}return k.reduce(function s(c,m){return Array.isArray(m)&&(m=m.reduce(s,"")),c+m},"");function o(s,c){if(k[c]==null)throw Error("Reference "+c+"is undefined");return k[c]}}function E(k,l){return Array.isArray(k)?b(k,l):p(k,l)}E.parse=p,E.stringify=b,V.exports=E}}),nq=ze({"node_modules/string-split-by/index.js"(J,V){"use strict";var p=aq();V.exports=function(E,k,l){if(E==null)throw Error("First argument should be a string");if(k==null)throw Error("Separator should be a string or a RegExp");l?(typeof l=="string"||Array.isArray(l))&&(l={ignore:l}):l={},l.escape==null&&(l.escape=!0),l.ignore==null?l.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof l.ignore=="string"&&(l.ignore=[l.ignore]),l.ignore=l.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var e=p.parse(E,{flat:!0,brackets:l.ignore}),t=e[0],n=t.split(k);if(l.escape){for(var r=[],a=0;a1&&It===Ut&&(It==='"'||It==="'"))return['"'+t(st.substr(1,st.length-2))+'"'];var ir=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(st);if(ir)return n(st.substr(0,ir.index)).concat(n(ir[1])).concat(n(st.substr(ir.index+ir[0].length)));var dr=st.split(".");if(dr.length===1)return['"'+t(st)+'"'];for(var Ar=[],hr=0;hr"u"?1:window.devicePixelRatio,ta=!1,ka={},Ta=function(ia){},Ra=function(){};if(typeof It=="string"?Ut=document.querySelector(It):typeof It=="object"&&(w(It)?Ut=It:S(It)?(Ar=It,dr=Ar.canvas):("gl"in It?Ar=It.gl:"canvas"in It?dr=C(It.canvas):"container"in It&&(ir=C(It.container)),"attributes"in It&&(hr=It.attributes),"extensions"in It&&(vr=M(It.extensions)),"optionalExtensions"in It&&(Or=M(It.optionalExtensions)),"onDone"in It&&(Ta=It.onDone),"profile"in It&&(ta=!!It.profile),"pixelRatio"in It&&(Cr=+It.pixelRatio),"cachedCode"in It&&(ka=It.cachedCode))),Ut&&(Ut.nodeName.toLowerCase()==="canvas"?dr=Ut:ir=Ut),!Ar){if(!dr){var ua=g(ir||document.body,Ta,Cr);if(!ua)return null;dr=ua.canvas,Ra=ua.onDestroy}hr.premultipliedAlpha===void 0&&(hr.premultipliedAlpha=!0),Ar=i(dr,hr)}return Ar?{gl:Ar,canvas:dr,container:ir,extensions:vr,optionalExtensions:Or,pixelRatio:Cr,profile:ta,cachedCode:ka,onDone:Ta,onDestroy:Ra}:(Ra(),Ta("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function T(st,It){var Ut={};function ir(hr){var vr=hr.toLowerCase(),Or;try{Or=Ut[vr]=st.getExtension(vr)}catch{}return!!Or}for(var dr=0;dr65535)<<4,st>>>=It,Ut=(st>255)<<3,st>>>=Ut,It|=Ut,Ut=(st>15)<<2,st>>>=Ut,It|=Ut,Ut=(st>3)<<1,st>>>=Ut,It|=Ut,It|st>>1}function P(){var st=f(8,function(){return[]});function It(Ar){var hr=B(Ar),vr=st[F(hr)>>2];return vr.length>0?vr.pop():new ArrayBuffer(hr)}function Ut(Ar){st[F(Ar.byteLength)>>2].push(Ar)}function ir(Ar,hr){var vr=null;switch(Ar){case u:vr=new Int8Array(It(hr),0,hr);break;case A:vr=new Uint8Array(It(hr),0,hr);break;case x:vr=new Int16Array(It(2*hr),0,hr);break;case z:vr=new Uint16Array(It(2*hr),0,hr);break;case I:vr=new Int32Array(It(4*hr),0,hr);break;case O:vr=new Uint32Array(It(4*hr),0,hr);break;case D:vr=new Float32Array(It(4*hr),0,hr);break;default:return null}return vr.length!==hr?vr.subarray(0,hr):vr}function dr(Ar){Ut(Ar.buffer)}return{alloc:It,free:Ut,allocType:ir,freeType:dr}}var j=P();j.zero=P();var U=3408,$=3410,Q=3411,re=3412,ne=3413,se=3414,G=3415,X=33901,K=33902,H=3379,Y=3386,q=34921,Z=36347,ee=36348,ae=35661,he=35660,xe=34930,we=36349,Me=34076,Se=34024,Ie=7936,Ve=7937,Ge=7938,ke=35724,_e=34047,ce=36063,ve=34852,le=3553,Ae=34067,Be=34069,Xe=33984,Ye=6408,yt=5126,gt=5121,Tt=36160,At=36053,$t=36064,rr=16384,_r=function(st,It){var Ut=1;It.ext_texture_filter_anisotropic&&(Ut=st.getParameter(_e));var ir=1,dr=1;It.webgl_draw_buffers&&(ir=st.getParameter(ve),dr=st.getParameter(ce));var Ar=!!It.oes_texture_float;if(Ar){var hr=st.createTexture();st.bindTexture(le,hr),st.texImage2D(le,0,Ye,1,1,0,Ye,yt,null);var vr=st.createFramebuffer();if(st.bindFramebuffer(Tt,vr),st.framebufferTexture2D(Tt,$t,le,hr,0),st.bindTexture(le,null),st.checkFramebufferStatus(Tt)!==At)Ar=!1;else{st.viewport(0,0,1,1),st.clearColor(1,0,0,1),st.clear(rr);var Or=j.allocType(yt,4);st.readPixels(0,0,1,1,Ye,yt,Or),st.getError()?Ar=!1:(st.deleteFramebuffer(vr),st.deleteTexture(hr),Ar=Or[0]===1),j.freeType(Or)}}var Cr=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ta=!0;if(!Cr){var ka=st.createTexture(),Ta=j.allocType(gt,36);st.activeTexture(Xe),st.bindTexture(Ae,ka),st.texImage2D(Be,0,Ye,3,3,0,Ye,gt,Ta),j.freeType(Ta),st.bindTexture(Ae,null),st.deleteTexture(ka),ta=!st.getError()}return{colorBits:[st.getParameter($),st.getParameter(Q),st.getParameter(re),st.getParameter(ne)],depthBits:st.getParameter(se),stencilBits:st.getParameter(G),subpixelBits:st.getParameter(U),extensions:Object.keys(It).filter(function(Ra){return!!It[Ra]}),maxAnisotropic:Ut,maxDrawbuffers:ir,maxColorAttachments:dr,pointSizeDims:st.getParameter(X),lineWidthDims:st.getParameter(K),maxViewportDims:st.getParameter(Y),maxCombinedTextureUnits:st.getParameter(ae),maxCubeMapSize:st.getParameter(Me),maxRenderbufferSize:st.getParameter(Se),maxTextureUnits:st.getParameter(xe),maxTextureSize:st.getParameter(H),maxAttributes:st.getParameter(q),maxVertexUniforms:st.getParameter(Z),maxVertexTextureUnits:st.getParameter(he),maxVaryingVectors:st.getParameter(ee),maxFragmentUniforms:st.getParameter(we),glsl:st.getParameter(ke),renderer:st.getParameter(Ve),vendor:st.getParameter(Ie),version:st.getParameter(Ge),readFloat:Ar,npotTextureCube:ta}},Xt=function(st){return st instanceof Uint8Array||st instanceof Uint16Array||st instanceof Uint32Array||st instanceof Int8Array||st instanceof Int16Array||st instanceof Int32Array||st instanceof Float32Array||st instanceof Float64Array||st instanceof Uint8ClampedArray};function or(st){return!!st&&typeof st=="object"&&Array.isArray(st.shape)&&Array.isArray(st.stride)&&typeof st.offset=="number"&&st.shape.length===st.stride.length&&(Array.isArray(st.data)||Xt(st.data))}var Ot=function(st){return Object.keys(st).map(function(It){return st[It]})},vt={shape:Je,flatten:Ke};function ht(st,It,Ut){for(var ir=0;ir0){var ui;if(Array.isArray(ma[0])){Dn=cr(ma);for(var cn=1,sn=1;sn0){if(typeof cn[0]=="number"){var Rn=j.allocType(za.dtype,cn.length);un(Rn,cn),Dn(Rn,ei),j.freeType(Rn)}else if(Array.isArray(cn[0])||Xt(cn[0])){Pn=cr(cn);var In=ur(cn,Pn,za.dtype);Dn(In,ei),j.freeType(In)}}}else if(or(cn)){Pn=cn.shape;var Jn=cn.stride,Ei=0,so=0,ti=0,bi=0;Pn.length===1?(Ei=Pn[0],so=1,ti=Jn[0],bi=0):Pn.length===2&&(Ei=Pn[0],so=Pn[1],ti=Jn[0],bi=Jn[1]);var Wi=Array.isArray(cn.data)?za.dtype:La(cn.data),ro=j.allocType(Wi,Ei*so);Xa(ro,cn.data,Ei,so,ti,bi,cn.offset),Dn(ro,ei),j.freeType(ro)}return kn}return da||kn(ia),kn._reglType="buffer",kn._buffer=za,kn.subdata=ui,Ut.profile&&(kn.stats=za.stats),kn.destroy=function(){Ta(za)},kn}function ua(){Ot(Ar).forEach(function(ia){ia.buffer=st.createBuffer(),st.bindBuffer(ia.type,ia.buffer),st.bufferData(ia.type,ia.persistentData||ia.byteLength,ia.usage)})}return Ut.profile&&(It.getTotalBufferSize=function(){var ia=0;return Object.keys(Ar).forEach(function(ma){ia+=Ar[ma].stats.size}),ia}),{create:Ra,createStream:Or,destroyStream:Cr,clear:function(){Ot(Ar).forEach(Ta),vr.forEach(Ta)},getBuffer:function(ia){return ia&&ia._buffer instanceof hr?ia._buffer:null},restore:ua,_initBuffer:ka}}var Nn=0,yn=0,Un=1,li=1,Yn=4,on=4,en={points:Nn,point:yn,lines:Un,line:li,triangles:Yn,triangle:on,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},vi=0,Yi=1,Ja=4,Oa=5120,lt=5121,rt=5122,fr=5123,lr=5124,Tr=5125,Ir=34963,Dr=35040,ot=35044;function kt(st,It,Ut,ir){var dr={},Ar=0,hr={uint8:lt,uint16:fr};It.oes_element_index_uint&&(hr.uint32=Tr);function vr(ua){this.id=Ar++,dr[this.id]=this,this.buffer=ua,this.primType=Ja,this.vertCount=0,this.type=0}vr.prototype.bind=function(){this.buffer.bind()};var Or=[];function Cr(ua){var ia=Or.pop();return ia||(ia=new vr(Ut.create(null,Ir,!0,!1)._buffer)),ka(ia,ua,Dr,-1,-1,0,0),ia}function ta(ua){Or.push(ua)}function ka(ua,ia,ma,da,Fa,za,kn){ua.buffer.bind();var Dn;if(ia){var ui=kn;!kn&&(!Xt(ia)||or(ia)&&!Xt(ia.data))&&(ui=It.oes_element_index_uint?Tr:fr),Ut._initBuffer(ua.buffer,ia,ma,ui,3)}else st.bufferData(Ir,za,ma),ua.buffer.dtype=Dn||lt,ua.buffer.usage=ma,ua.buffer.dimension=3,ua.buffer.byteLength=za;if(Dn=kn,!kn){switch(ua.buffer.dtype){case lt:case Oa:Dn=lt;break;case fr:case rt:Dn=fr;break;case Tr:case lr:Dn=Tr;break;default:}ua.buffer.dtype=Dn}ua.type=Dn;var cn=Fa;cn<0&&(cn=ua.buffer.byteLength,Dn===fr?cn>>=1:Dn===Tr&&(cn>>=2)),ua.vertCount=cn;var sn=da;if(da<0){sn=Ja;var ei=ua.buffer.dimension;ei===1&&(sn=vi),ei===2&&(sn=Yi),ei===3&&(sn=Ja)}ua.primType=sn}function Ta(ua){ir.elementsCount--,delete dr[ua.id],ua.buffer.destroy(),ua.buffer=null}function Ra(ua,ia){var ma=Ut.create(null,Ir,!0),da=new vr(ma._buffer);ir.elementsCount++;function Fa(za){if(!za)ma(),da.primType=Ja,da.vertCount=0,da.type=lt;else if(typeof za=="number")ma(za),da.primType=Ja,da.vertCount=za|0,da.type=lt;else{var kn=null,Dn=ot,ui=-1,cn=-1,sn=0,ei=0;Array.isArray(za)||Xt(za)||or(za)?kn=za:("data"in za&&(kn=za.data),"usage"in za&&(Dn=nr[za.usage]),"primitive"in za&&(ui=en[za.primitive]),"count"in za&&(cn=za.count|0),"type"in za&&(ei=hr[za.type]),"length"in za?sn=za.length|0:(sn=cn,ei===fr||ei===rt?sn*=2:(ei===Tr||ei===lr)&&(sn*=4))),ka(da,kn,Dn,ui,cn,sn,ei)}return Fa}return Fa(ua),Fa._reglType="elements",Fa._elements=da,Fa.subdata=function(za,kn){return ma.subdata(za,kn),Fa},Fa.destroy=function(){Ta(da)},Fa}return{create:Ra,createStream:Cr,destroyStream:ta,getElements:function(ua){return typeof ua=="function"&&ua._elements instanceof vr?ua._elements:null},clear:function(){Ot(dr).forEach(Ta)}}}var jt=new Float32Array(1),ar=new Uint32Array(jt.buffer),Er=5123;function xr(st){for(var It=j.allocType(Er,st.length),Ut=0;Ut>>31<<15,Ar=(ir<<1>>>24)-127,hr=ir>>13&1023;if(Ar<-24)It[Ut]=dr;else if(Ar<-14){var vr=-14-Ar;It[Ut]=dr+(hr+1024>>vr)}else Ar>15?It[Ut]=dr+31744:It[Ut]=dr+(Ar+15<<10)+hr}return It}function zr(st){return Array.isArray(st)||Xt(st)}var Lr=34467,aa=3553,Sa=34067,wa=34069,pn=6408,tn=6406,ai=6407,rn=6409,Ri=6410,Gn=32854,no=32855,Di=36194,fn=32819,Ai=32820,jn=33635,Xn=34042,eo=6402,gi=34041,qi=35904,io=35906,oo=36193,Vn=33776,qn=33777,Hi=33778,Mi=33779,Ro=35986,go=35987,Eo=34798,Ao=35840,ds=35841,jo=35842,Wo=35843,to=36196,wo=5121,pi=5123,Vi=5125,Io=5126,Xi=10242,Ko=10243,Uo=10497,Ls=33071,Ss=33648,Vo=10240,Vs=10241,Ts=9728,Bo=9729,_o=9984,Pi=9985,yo=9986,bs=9987,Dl=33170,hl=4352,ps=4353,dl=4354,wu=34046,lu=3317,xc=37440,Fl=37441,pl=37443,$u=37444,uu=33984,tl=[_o,yo,Pi,bs],vs=[0,rn,Ri,ai,pn],os={};os[rn]=os[tn]=os[eo]=1,os[gi]=os[Ri]=2,os[ai]=os[qi]=3,os[pn]=os[io]=4;function ms(st){return"[object "+st+"]"}var rl=ms("HTMLCanvasElement"),Fu=ms("OffscreenCanvas"),zu=ms("CanvasRenderingContext2D"),Ku=ms("ImageBitmap"),bc=ms("HTMLImageElement"),Lh=ms("HTMLVideoElement"),rh=Object.keys(et).concat([rl,Fu,zu,Ku,bc,Lh]),Ju=[];Ju[wo]=1,Ju[Io]=4,Ju[oo]=2,Ju[pi]=2,Ju[Vi]=4;var ss=[];ss[Gn]=2,ss[no]=2,ss[Di]=2,ss[gi]=4,ss[Vn]=.5,ss[qn]=.5,ss[Hi]=1,ss[Mi]=1,ss[Ro]=.5,ss[go]=1,ss[Eo]=1,ss[Ao]=.5,ss[ds]=.25,ss[jo]=.5,ss[Wo]=.25,ss[to]=.5;function ah(st){return Array.isArray(st)&&(st.length===0||typeof st[0]=="number")}function wc(st){if(!Array.isArray(st))return!1;var It=st.length;return!(It===0||!zr(st[0]))}function pc(st){return Object.prototype.toString.call(st)}function Nf(st){return pc(st)===rl}function Bu(st){return pc(st)===Fu}function Tc(st){return pc(st)===zu}function Ou(st){return pc(st)===Ku}function Gc(st){return pc(st)===bc}function pf(st){return pc(st)===Lh}function $l(st){if(!st)return!1;var It=pc(st);return rh.indexOf(It)>=0?!0:ah(st)||wc(st)||or(st)}function jf(st){return et[Object.prototype.toString.call(st)]|0}function Hc(st,It){var Ut=It.length;switch(st.type){case wo:case pi:case Vi:case Io:var ir=j.allocType(st.type,Ut);ir.set(It),st.data=ir;break;case oo:st.data=xr(It);break;default:}}function Wc(st,It){return j.allocType(st.type===oo?Io:st.type,It)}function Qu(st,It){st.type===oo?(st.data=xr(It),j.freeType(It)):st.data=It}function Yc(st,It,Ut,ir,dr,Ar){for(var hr=st.width,vr=st.height,Or=st.channels,Cr=hr*vr*Or,ta=Wc(st,Cr),ka=0,Ta=0;Ta=1;)vr+=hr*Or*Or,Or/=2;return vr}else return hr*Ut*ir}function Uf(st,It,Ut,ir,dr,Ar,hr){var vr={"don't care":hl,"dont care":hl,nice:dl,fast:ps},Or={repeat:Uo,clamp:Ls,mirror:Ss},Cr={nearest:Ts,linear:Bo},ta=p({mipmap:bs,"nearest mipmap nearest":_o,"linear mipmap nearest":Pi,"nearest mipmap linear":yo,"linear mipmap linear":bs},Cr),ka={none:0,browser:$u},Ta={uint8:wo,rgba4:fn,rgb565:jn,"rgb5 a1":Ai},Ra={alpha:tn,luminance:rn,"luminance alpha":Ri,rgb:ai,rgba:pn,rgba4:Gn,"rgb5 a1":no,rgb565:Di},ua={};It.ext_srgb&&(Ra.srgb=qi,Ra.srgba=io),It.oes_texture_float&&(Ta.float32=Ta.float=Io),It.oes_texture_half_float&&(Ta.float16=Ta["half float"]=oo),It.webgl_depth_texture&&(p(Ra,{depth:eo,"depth stencil":gi}),p(Ta,{uint16:pi,uint32:Vi,"depth stencil":Xn})),It.webgl_compressed_texture_s3tc&&p(ua,{"rgb s3tc dxt1":Vn,"rgba s3tc dxt1":qn,"rgba s3tc dxt3":Hi,"rgba s3tc dxt5":Mi}),It.webgl_compressed_texture_atc&&p(ua,{"rgb atc":Ro,"rgba atc explicit alpha":go,"rgba atc interpolated alpha":Eo}),It.webgl_compressed_texture_pvrtc&&p(ua,{"rgb pvrtc 4bppv1":Ao,"rgb pvrtc 2bppv1":ds,"rgba pvrtc 4bppv1":jo,"rgba pvrtc 2bppv1":Wo}),It.webgl_compressed_texture_etc1&&(ua["rgb etc1"]=to);var ia=Array.prototype.slice.call(st.getParameter(Lr));Object.keys(ua).forEach(function(ra){var Ya=ua[ra];ia.indexOf(Ya)>=0&&(Ra[ra]=Ya)});var ma=Object.keys(Ra);Ut.textureFormats=ma;var da=[];Object.keys(Ra).forEach(function(ra){var Ya=Ra[ra];da[Ya]=ra});var Fa=[];Object.keys(Ta).forEach(function(ra){var Ya=Ta[ra];Fa[Ya]=ra});var za=[];Object.keys(Cr).forEach(function(ra){var Ya=Cr[ra];za[Ya]=ra});var kn=[];Object.keys(ta).forEach(function(ra){var Ya=ta[ra];kn[Ya]=ra});var Dn=[];Object.keys(Or).forEach(function(ra){var Ya=Or[ra];Dn[Ya]=ra});var ui=ma.reduce(function(ra,Ya){var Ka=Ra[Ya];return Ka===rn||Ka===tn||Ka===rn||Ka===Ri||Ka===eo||Ka===gi||It.ext_srgb&&(Ka===qi||Ka===io)?ra[Ka]=Ka:Ka===no||Ya.indexOf("rgba")>=0?ra[Ka]=pn:ra[Ka]=ai,ra},{});function cn(){this.internalformat=pn,this.format=pn,this.type=wo,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=$u,this.width=0,this.height=0,this.channels=0}function sn(ra,Ya){ra.internalformat=Ya.internalformat,ra.format=Ya.format,ra.type=Ya.type,ra.compressed=Ya.compressed,ra.premultiplyAlpha=Ya.premultiplyAlpha,ra.flipY=Ya.flipY,ra.unpackAlignment=Ya.unpackAlignment,ra.colorSpace=Ya.colorSpace,ra.width=Ya.width,ra.height=Ya.height,ra.channels=Ya.channels}function ei(ra,Ya){if(!(typeof Ya!="object"||!Ya)){if("premultiplyAlpha"in Ya&&(ra.premultiplyAlpha=Ya.premultiplyAlpha),"flipY"in Ya&&(ra.flipY=Ya.flipY),"alignment"in Ya&&(ra.unpackAlignment=Ya.alignment),"colorSpace"in Ya&&(ra.colorSpace=ka[Ya.colorSpace]),"type"in Ya){var Ka=Ya.type;ra.type=Ta[Ka]}var Bi=ra.width,rs=ra.height,Is=ra.channels,Oi=!1;"shape"in Ya?(Bi=Ya.shape[0],rs=Ya.shape[1],Ya.shape.length===3&&(Is=Ya.shape[2],Oi=!0)):("radius"in Ya&&(Bi=rs=Ya.radius),"width"in Ya&&(Bi=Ya.width),"height"in Ya&&(rs=Ya.height),"channels"in Ya&&(Is=Ya.channels,Oi=!0)),ra.width=Bi|0,ra.height=rs|0,ra.channels=Is|0;var Wr=!1;if("format"in Ya){var na=Ya.format,pa=ra.internalformat=Ra[na];ra.format=ui[pa],na in Ta&&("type"in Ya||(ra.type=Ta[na])),na in ua&&(ra.compressed=!0),Wr=!0}!Oi&&Wr?ra.channels=os[ra.format]:Oi&&!Wr&&ra.channels!==vs[ra.format]&&(ra.format=ra.internalformat=vs[ra.channels])}}function Pn(ra){st.pixelStorei(xc,ra.flipY),st.pixelStorei(Fl,ra.premultiplyAlpha),st.pixelStorei(pl,ra.colorSpace),st.pixelStorei(lu,ra.unpackAlignment)}function Rn(){cn.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function In(ra,Ya){var Ka=null;if($l(Ya)?Ka=Ya:Ya&&(ei(ra,Ya),"x"in Ya&&(ra.xOffset=Ya.x|0),"y"in Ya&&(ra.yOffset=Ya.y|0),$l(Ya.data)&&(Ka=Ya.data)),Ya.copy){var Bi=dr.viewportWidth,rs=dr.viewportHeight;ra.width=ra.width||Bi-ra.xOffset,ra.height=ra.height||rs-ra.yOffset,ra.needsCopy=!0}else if(!Ka)ra.width=ra.width||1,ra.height=ra.height||1,ra.channels=ra.channels||4;else if(Xt(Ka))ra.channels=ra.channels||4,ra.data=Ka,!("type"in Ya)&&ra.type===wo&&(ra.type=jf(Ka));else if(ah(Ka))ra.channels=ra.channels||4,Hc(ra,Ka),ra.alignment=1,ra.needsFree=!0;else if(or(Ka)){var Is=Ka.data;!Array.isArray(Is)&&ra.type===wo&&(ra.type=jf(Is));var Oi=Ka.shape,Wr=Ka.stride,na,pa,Wa,ln,Le,Ue;Oi.length===3?(Wa=Oi[2],Ue=Wr[2]):(Wa=1,Ue=1),na=Oi[0],pa=Oi[1],ln=Wr[0],Le=Wr[1],ra.alignment=1,ra.width=na,ra.height=pa,ra.channels=Wa,ra.format=ra.internalformat=vs[Wa],ra.needsFree=!0,Yc(ra,Is,ln,Le,Ue,Ka.offset)}else if(Nf(Ka)||Bu(Ka)||Tc(Ka))Nf(Ka)||Bu(Ka)?ra.element=Ka:ra.element=Ka.canvas,ra.width=ra.element.width,ra.height=ra.element.height,ra.channels=4;else if(Ou(Ka))ra.element=Ka,ra.width=Ka.width,ra.height=Ka.height,ra.channels=4;else if(Gc(Ka))ra.element=Ka,ra.width=Ka.naturalWidth,ra.height=Ka.naturalHeight,ra.channels=4;else if(pf(Ka))ra.element=Ka,ra.width=Ka.videoWidth,ra.height=Ka.videoHeight,ra.channels=4;else if(wc(Ka)){var Qe=ra.width||Ka[0].length,_t=ra.height||Ka.length,wt=ra.channels;zr(Ka[0][0])?wt=wt||Ka[0][0].length:wt=wt||1;for(var Lt=vt.shape(Ka),pr=1,Gr=0;Gr>=rs,Ka.height>>=rs,In(Ka,Bi[rs]),ra.mipmask|=1<=0&&!("faces"in Ya)&&(ra.genMipmaps=!0)}if("mag"in Ya){var Bi=Ya.mag;ra.magFilter=Cr[Bi]}var rs=ra.wrapS,Is=ra.wrapT;if("wrap"in Ya){var Oi=Ya.wrap;typeof Oi=="string"?rs=Is=Or[Oi]:Array.isArray(Oi)&&(rs=Or[Oi[0]],Is=Or[Oi[1]])}else{if("wrapS"in Ya){var Wr=Ya.wrapS;rs=Or[Wr]}if("wrapT"in Ya){var na=Ya.wrapT;Is=Or[na]}}if(ra.wrapS=rs,ra.wrapT=Is,"anisotropic"in Ya){var pa=Ya.anisotropic;ra.anisotropic=Ya.anisotropic}if("mipmap"in Ya){var Wa=!1;switch(typeof Ya.mipmap){case"string":ra.mipmapHint=vr[Ya.mipmap],ra.genMipmaps=!0,Wa=!0;break;case"boolean":Wa=ra.genMipmaps=Ya.mipmap;break;case"object":ra.genMipmaps=!1,Wa=!0;break;default:}Wa&&!("min"in Ya)&&(ra.minFilter=_o)}}function $o(ra,Ya){st.texParameteri(Ya,Vs,ra.minFilter),st.texParameteri(Ya,Vo,ra.magFilter),st.texParameteri(Ya,Xi,ra.wrapS),st.texParameteri(Ya,Ko,ra.wrapT),It.ext_texture_filter_anisotropic&&st.texParameteri(Ya,wu,ra.anisotropic),ra.genMipmaps&&(st.hint(Dl,ra.mipmapHint),st.generateMipmap(Ya))}var _s=0,Go={},Ys=Ut.maxTextureUnits,Ll=Array(Ys).map(function(){return null});function mo(ra){cn.call(this),this.mipmask=0,this.internalformat=pn,this.id=_s++,this.refCount=1,this.target=ra,this.texture=st.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Zo,hr.profile&&(this.stats={size:0})}function ru(ra){st.activeTexture(uu),st.bindTexture(ra.target,ra.texture)}function Rs(){var ra=Ll[0];ra?st.bindTexture(ra.target,ra.texture):st.bindTexture(aa,null)}function Yu(ra){var Ya=ra.texture,Ka=ra.unit,Bi=ra.target;Ka>=0&&(st.activeTexture(uu+Ka),st.bindTexture(Bi,null),Ll[Ka]=null),st.deleteTexture(Ya),ra.texture=null,ra.params=null,ra.pixels=null,ra.refCount=0,delete Go[ra.id],Ar.textureCount--}p(mo.prototype,{bind:function(){var ra=this;ra.bindCount+=1;var Ya=ra.unit;if(Ya<0){for(var Ka=0;Ka0)continue;Bi.unit=-1}Ll[Ka]=ra,Ya=Ka;break}Ya>=Ys,hr.profile&&Ar.maxTextureUnits>Le)-Wa,Ue.height=Ue.height||(Ka.height>>Le)-ln,ru(Ka),Ei(Ue,aa,Wa,ln,Le),Rs(),bi(Ue),Bi}function Is(Oi,Wr){var na=Oi|0,pa=Wr|0||na;if(na===Ka.width&&pa===Ka.height)return Bi;Bi.width=Ka.width=na,Bi.height=Ka.height=pa,ru(Ka);for(var Wa=0;Ka.mipmask>>Wa;++Wa){var ln=na>>Wa,Le=pa>>Wa;if(!ln||!Le)break;st.texImage2D(aa,Wa,Ka.format,ln,Le,0,Ka.format,Ka.type,null)}return Rs(),hr.profile&&(Ka.stats.size=Nu(Ka.internalformat,Ka.type,na,pa,!1,!1)),Bi}return Bi(ra,Ya),Bi.subimage=rs,Bi.resize=Is,Bi._reglType="texture2d",Bi._texture=Ka,hr.profile&&(Bi.stats=Ka.stats),Bi.destroy=function(){Ka.decRef()},Bi}function ql(ra,Ya,Ka,Bi,rs,Is){var Oi=new mo(Sa);Go[Oi.id]=Oi,Ar.cubeCount++;var Wr=new Array(6);function na(ln,Le,Ue,Qe,_t,wt){var Lt,pr=Oi.texInfo;for(Zo.call(pr),Lt=0;Lt<6;++Lt)Wr[Lt]=So();if(typeof ln=="number"||!ln){var Gr=ln|0||1;for(Lt=0;Lt<6;++Lt)ro(Wr[Lt],Gr,Gr)}else if(typeof ln=="object")if(Le)Mo(Wr[0],ln),Mo(Wr[1],Le),Mo(Wr[2],Ue),Mo(Wr[3],Qe),Mo(Wr[4],_t),Mo(Wr[5],wt);else if(es(pr,ln),ei(Oi,ln),"faces"in ln){var va=ln.faces;for(Lt=0;Lt<6;++Lt)sn(Wr[Lt],Oi),Mo(Wr[Lt],va[Lt])}else for(Lt=0;Lt<6;++Lt)Mo(Wr[Lt],ln);for(sn(Oi,Wr[0]),pr.genMipmaps?Oi.mipmask=(Wr[0].width<<1)-1:Oi.mipmask=Wr[0].mipmask,Oi.internalformat=Wr[0].internalformat,na.width=Wr[0].width,na.height=Wr[0].height,ru(Oi),Lt=0;Lt<6;++Lt)zs(Wr[Lt],wa+Lt);for($o(pr,Sa),Rs(),hr.profile&&(Oi.stats.size=Nu(Oi.internalformat,Oi.type,na.width,na.height,pr.genMipmaps,!0)),na.format=da[Oi.internalformat],na.type=Fa[Oi.type],na.mag=za[pr.magFilter],na.min=kn[pr.minFilter],na.wrapS=Dn[pr.wrapS],na.wrapT=Dn[pr.wrapT],Lt=0;Lt<6;++Lt)Ws(Wr[Lt]);return na}function pa(ln,Le,Ue,Qe,_t){var wt=Ue|0,Lt=Qe|0,pr=_t|0,Gr=ti();return sn(Gr,Oi),Gr.width=0,Gr.height=0,In(Gr,Le),Gr.width=Gr.width||(Oi.width>>pr)-wt,Gr.height=Gr.height||(Oi.height>>pr)-Lt,ru(Oi),Ei(Gr,wa+ln,wt,Lt,pr),Rs(),bi(Gr),na}function Wa(ln){var Le=ln|0;if(Le!==Oi.width){na.width=Oi.width=Le,na.height=Oi.height=Le,ru(Oi);for(var Ue=0;Ue<6;++Ue)for(var Qe=0;Oi.mipmask>>Qe;++Qe)st.texImage2D(wa+Ue,Qe,Oi.format,Le>>Qe,Le>>Qe,0,Oi.format,Oi.type,null);return Rs(),hr.profile&&(Oi.stats.size=Nu(Oi.internalformat,Oi.type,na.width,na.height,!1,!0)),na}}return na(ra,Ya,Ka,Bi,rs,Is),na.subimage=pa,na.resize=Wa,na._reglType="textureCube",na._texture=Oi,hr.profile&&(na.stats=Oi.stats),na.destroy=function(){Oi.decRef()},na}function fo(){for(var ra=0;ra>Bi,Ka.height>>Bi,0,Ka.internalformat,Ka.type,null);else for(var rs=0;rs<6;++rs)st.texImage2D(wa+rs,Bi,Ka.internalformat,Ka.width>>Bi,Ka.height>>Bi,0,Ka.internalformat,Ka.type,null);$o(Ka.texInfo,Ka.target)})}function Os(){for(var ra=0;ra=0?Ws=!0:Or.indexOf(Zo)>=0&&(Ws=!1))),("depthTexture"in mo||"depthStencilTexture"in mo)&&(Ll=!!(mo.depthTexture||mo.depthStencilTexture)),"depth"in mo&&(typeof mo.depth=="boolean"?zs=mo.depth:(_s=mo.depth,Bs=!1)),"stencil"in mo&&(typeof mo.stencil=="boolean"?Bs=mo.stencil:(Go=mo.stencil,zs=!1)),"depthStencil"in mo&&(typeof mo.depthStencil=="boolean"?zs=Bs=mo.depthStencil:(Ys=mo.depthStencil,zs=!1,Bs=!1))}var Rs=null,Yu=null,Ul=null,ql=null;if(Array.isArray(So))Rs=So.map(ua);else if(So)Rs=[ua(So)];else for(Rs=new Array($o),Wi=0;Wi<$o;++Wi)Rs[Wi]=ia(ro,Mo,Ws,Zo,es);ro=ro||Rs[0].width,Mo=Mo||Rs[0].height,_s?Yu=ua(_s):zs&&!Bs&&(Yu=ia(ro,Mo,Ll,"depth","uint32")),Go?Ul=ua(Go):Bs&&!zs&&(Ul=ia(ro,Mo,!1,"stencil","uint8")),Ys?ql=ua(Ys):!_s&&!Go&&Bs&&zs&&(ql=ia(ro,Mo,Ll,"depth stencil","depth stencil"));var fo=null;for(Wi=0;Wi0&&(bi.depth=In[0].depth,bi.stencil=In[0].stencil,bi.depthStencil=In[0].depthStencil),In[ti]?In[ti](bi):In[ti]=sn(bi)}return p(Jn,{width:Wi,height:Wi,color:Zo})}function Ei(so){var ti,bi=so|0;if(bi===Jn.width)return Jn;var Wi=Jn.color;for(ti=0;ti=Wi.byteLength?ro.subdata(Wi):(ro.destroy(),sn.buffers[so]=null)),sn.buffers[so]||(ro=sn.buffers[so]=dr.create(ti,hu,!1,!0)),bi.buffer=dr.getBuffer(ro),bi.size=bi.buffer.dimension|0,bi.normalized=!1,bi.type=bi.buffer.dtype,bi.offset=0,bi.stride=0,bi.divisor=0,bi.state=1,Jn[so]=1}else dr.getBuffer(ti)?(bi.buffer=dr.getBuffer(ti),bi.size=bi.buffer.dimension|0,bi.normalized=!1,bi.type=bi.buffer.dtype,bi.offset=0,bi.stride=0,bi.divisor=0,bi.state=1):dr.getBuffer(ti.buffer)?(bi.buffer=dr.getBuffer(ti.buffer),bi.size=(+ti.size||bi.buffer.dimension)|0,bi.normalized=!!ti.normalized||!1,"type"in ti?bi.type=Kr[ti.type]:bi.type=bi.buffer.dtype,bi.offset=(ti.offset||0)|0,bi.stride=(ti.stride||0)|0,bi.divisor=(ti.divisor||0)|0,bi.state=1):"x"in ti&&(bi.x=+ti.x||0,bi.y=+ti.y||0,bi.z=+ti.z||0,bi.w=+ti.w||0,bi.state=2)}for(var Mo=0;Mo1)for(var Pn=0;Pnia&&(ia=ma.stats.uniformsCount)}),ia},Ut.getMaxAttributesCount=function(){var ia=0;return ta.forEach(function(ma){ma.stats.attributesCount>ia&&(ia=ma.stats.attributesCount)}),ia});function ua(){dr={},Ar={};for(var ia=0;ia16&&(Ut=Da(Ut,st.length*8));for(var ir=Array(16),dr=Array(16),Ar=0;Ar<16;Ar++)ir[Ar]=Ut[Ar]^909522486,dr[Ar]=Ut[Ar]^1549556828;var hr=Da(ir.concat(vc(It)),512+It.length*8);return Ft(Da(dr.concat(hr),768))}function kl(st){for(var It=xf?"0123456789ABCDEF":"0123456789abcdef",Ut="",ir,dr=0;dr>>4&15)+It.charAt(ir&15);return Ut}function kc(st){for(var It="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ut="",ir=st.length,dr=0;drst.length*8?Ut+=Gf:Ut+=It.charAt(Ar>>>6*(3-hr)&63);return Ut}function Cc(st,It){var Ut=It.length,ir=Array(),dr,Ar,hr,vr,Or=Array(Math.ceil(st.length/2));for(dr=0;dr0;){for(vr=Array(),hr=0,dr=0;dr0||Ar>0)&&(vr[vr.length]=Ar);ir[ir.length]=hr,Or=vr}var Cr="";for(dr=ir.length-1;dr>=0;dr--)Cr+=It.charAt(ir[dr]);var ta=Math.ceil(st.length*8/(Math.log(It.length)/Math.log(2)));for(dr=Cr.length;dr>>6&31,128|ir&63):ir<=65535?It+=String.fromCharCode(224|ir>>>12&15,128|ir>>>6&63,128|ir&63):ir<=2097151&&(It+=String.fromCharCode(240|ir>>>18&7,128|ir>>>12&63,128|ir>>>6&63,128|ir&63));return It}function vc(st){for(var It=Array(st.length>>2),Ut=0;Ut>5]|=(st.charCodeAt(Ut/8)&255)<<24-Ut%32;return It}function Ft(st){for(var It="",Ut=0;Ut>5]>>>24-Ut%32&255);return It}function tr(st,It){return st>>>It|st<<32-It}function Fr(st,It){return st>>>It}function wr(st,It,Ut){return st&It^~st&Ut}function ea(st,It,Ut){return st&It^st&Ut^It&Ut}function ba(st){return tr(st,2)^tr(st,13)^tr(st,22)}function Ia(st){return tr(st,6)^tr(st,11)^tr(st,25)}function Na(st){return tr(st,7)^tr(st,18)^Fr(st,3)}function Za(st){return tr(st,17)^tr(st,19)^Fr(st,10)}var mn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Da(st,It){var Ut=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),ir=new Array(64),dr,Ar,hr,vr,Or,Cr,ta,ka,Ta,Ra,ua,ia;for(st[It>>5]|=128<<24-It%32,st[(It+64>>9<<4)+15]=It,Ta=0;Ta>16)+(It>>16)+(Ut>>16);return ir<<16|Ut&65535}function $a(st){return Array.prototype.slice.call(st)}function vn(st){return $a(st).join("")}function Sn(st){var It=st&&st.cache,Ut=0,ir=[],dr=[],Ar=[];function hr(ua,ia){var ma=ia&&ia.stable;if(!ma){for(var da=0;da0&&(ua.push(Fa,"="),ua.push.apply(ua,$a(arguments)),ua.push(";")),Fa}return p(ia,{def:da,toString:function(){return vn([ma.length>0?"var "+ma.join(",")+";":"",vn(ua)])}})}function Or(){var ua=vr(),ia=vr(),ma=ua.toString,da=ia.toString;function Fa(za,kn){ia(za,kn,"=",ua.def(za,kn),";")}return p(function(){ua.apply(ua,$a(arguments))},{def:ua.def,entry:ua,exit:ia,save:Fa,set:function(za,kn,Dn){Fa(za,kn),ua(za,kn,"=",Dn,";")},toString:function(){return ma()+da()}})}function Cr(){var ua=vn(arguments),ia=Or(),ma=Or(),da=ia.toString,Fa=ma.toString;return p(ia,{then:function(){return ia.apply(ia,$a(arguments)),this},else:function(){return ma.apply(ma,$a(arguments)),this},toString:function(){var za=Fa();return za&&(za="else{"+za+"}"),vn(["if(",ua,"){",da(),"}",za])}})}var ta=vr(),ka={};function Ta(ua,ia){var ma=[];function da(){var ui="a"+ma.length;return ma.push(ui),ui}ia=ia||0;for(var Fa=0;Fa[x.viewport.x,x.viewport.y,A.viewportWidth,A.viewportHeight]},attributes:{color:{buffer:m,offset:(A,x)=>x.offset*4,divisor:1},position:{buffer:f,offset:(A,x)=>x.offset*8,divisor:1},positionFract:{buffer:v,offset:(A,x)=>x.offset*8,divisor:1},error:{buffer:i,offset:(A,x)=>x.offset*16,divisor:1},direction:{buffer:T,stride:24,offset:0},lineOffset:{buffer:T,stride:24,offset:8},capOffset:{buffer:T,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:o.prop("viewport")},viewport:o.prop("viewport"),stencil:!1,instances:o.prop("count"),count:r.length}),l(C,{update:h,draw:_,destroy:u,regl:o,gl:c,canvas:c.canvas,groups:M}),C;function C(A){A?h(A):A===null&&u(),_()}function _(A){if(typeof A=="number")return w(A);A&&!Array.isArray(A)&&(A=[A]),o._refresh(),M.forEach((x,z)=>{if(x){if(A&&(A[z]?x.draw=!0:x.draw=!1),!x.draw){x.draw=!0;return}w(z)}})}function w(A){typeof A=="number"&&(A=M[A]),A!=null&&A&&A.count&&A.color&&A.opacity&&A.positions&&A.positions.length>1&&(A.scaleRatio=[A.scale[0]*A.viewport.width,A.scale[1]*A.viewport.height],g(A),A.after&&A.after(A))}function h(A){if(!A)return;A.length!=null?typeof A[0]=="number"&&(A=[{positions:A}]):Array.isArray(A)||(A=[A]);let x=0,z=0;if(C.groups=M=A.map((D,B)=>{let F=M[B];if(D)typeof D=="function"?D={after:D}:typeof D[0]=="number"&&(D={positions:D});else return F;return D=k(D,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),F||(M[B]=F={id:B,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},D=l({},S,D)),E(F,D,[{lineWidth:P=>+P*.5,capSize:P=>+P*.5,opacity:parseFloat,errors:P=>(P=e(P),z+=P.length,P),positions:(P,j)=>(P=e(P,"float64"),j.count=Math.floor(P.length/2),j.bounds=p(P,2),j.offset=x,x+=j.count,P)},{color:(P,j)=>{let U=j.count;if(P||(P="transparent"),!Array.isArray(P)||typeof P[0]=="number"){let Q=P;P=Array(U);for(let re=0;re{let $=j.bounds;return P||(P=$),j.scale=[1/(P[2]-P[0]),1/(P[3]-P[1])],j.translate=[-P[0],-P[1]],j.scaleFract=n(j.scale),j.translateFract=n(j.translate),P},viewport:P=>{let j;return Array.isArray(P)?j={x:P[0],y:P[1],width:P[2]-P[0],height:P[3]-P[1]}:P?(j={x:P.x||P.left||0,y:P.y||P.top||0},P.right?j.width=P.right-j.x:j.width=P.w||P.width||0,P.bottom?j.height=P.bottom-j.y:j.height=P.h||P.height||0):j={x:0,y:0,width:c.drawingBufferWidth,height:c.drawingBufferHeight},j}}]),F}),x||z){let D=M.reduce((j,U,$)=>j+(U?U.count:0),0),B=new Float64Array(D*2),F=new Uint8Array(D*4),P=new Float32Array(D*4);M.forEach((j,U)=>{if(!j)return;let{positions:$,count:Q,offset:re,color:ne,errors:se}=j;Q&&(F.set(ne,re*4),P.set(se,re*4),B.set($,re*2))});var I=t(B);f(I);var O=n(B,I);v(O),m(F),i(P)}}function u(){f.destroy(),v.destroy(),m.destroy(),i.destroy(),T.destroy()}}}}),rq=ze({"node_modules/unquote/index.js"(J,G){var p=/[\'\"]/;G.exports=function(E){return E?(p.test(E.charAt(0))&&(E=E.substr(1)),p.test(E.charAt(E.length-1))&&(E=E.substr(0,E.length-1)),E):""}}}),sM=ze({"node_modules/css-global-keywords/index.json"(J,G){G.exports=["inherit","initial","unset"]}}),lM=ze({"node_modules/css-system-font-keywords/index.json"(J,G){G.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),uM=ze({"node_modules/css-font-weight-keywords/index.json"(J,G){G.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),cM=ze({"node_modules/css-font-style-keywords/index.json"(J,G){G.exports=["normal","italic","oblique"]}}),fM=ze({"node_modules/css-font-stretch-keywords/index.json"(J,G){G.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),aq=ze({"node_modules/parenthesis/index.js"(J,G){"use strict";function p(k,l){if(typeof k!="string")return[k];var e=[k];typeof l=="string"||Array.isArray(l)?l={brackets:l}:l||(l={});var t=l.brackets?Array.isArray(l.brackets)?l.brackets:[l.brackets]:["{}","[]","()"],n=l.escape||"___",r=!!l.flat;t.forEach(function(s){var c=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),g=[];function f(v,m,i){var T=e.push(v.slice(s[0].length,-s[1].length))-1;return g.push(T),n+T+n}e.forEach(function(v,m){for(var i,T=0;v!=i;)if(i=v,v=v.replace(c,f),T++>1e4)throw Error("References have circular dependency. Please, check them.");e[m]=v}),g=g.reverse(),e=e.map(function(v){return g.forEach(function(m){v=v.replace(new RegExp("(\\"+n+m+"\\"+n+")","g"),s[0]+"$1"+s[1])}),v})});var a=new RegExp("\\"+n+"([0-9]+)\\"+n);function o(s,c,g){for(var f=[],v,m=0;v=a.exec(s);){if(m++>1e4)throw Error("Circular references in parenthesis");f.push(s.slice(0,v.index)),f.push(o(c[v[1]],c)),s=s.slice(v.index+v[0].length)}return f.push(s),f}return r?e:o(e[0],e)}function b(k,l){if(l&&l.flat){var e=l&&l.escape||"___",t=k[0],n;if(!t)return"";for(var r=new RegExp("\\"+e+"([0-9]+)\\"+e),a=0;t!=n;){if(a++>1e4)throw Error("Circular references in "+k);n=t,t=t.replace(r,o)}return t}return k.reduce(function s(c,g){return Array.isArray(g)&&(g=g.reduce(s,"")),c+g},"");function o(s,c){if(k[c]==null)throw Error("Reference "+c+"is undefined");return k[c]}}function E(k,l){return Array.isArray(k)?b(k,l):p(k,l)}E.parse=p,E.stringify=b,G.exports=E}}),nq=ze({"node_modules/string-split-by/index.js"(J,G){"use strict";var p=aq();G.exports=function(E,k,l){if(E==null)throw Error("First argument should be a string");if(k==null)throw Error("Separator should be a string or a RegExp");l?(typeof l=="string"||Array.isArray(l))&&(l={ignore:l}):l={},l.escape==null&&(l.escape=!0),l.ignore==null?l.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof l.ignore=="string"&&(l.ignore=[l.ignore]),l.ignore=l.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var e=p.parse(E,{flat:!0,brackets:l.ignore}),t=e[0],n=t.split(k);if(l.escape){for(var r=[],a=0;a1&&It===Ut&&(It==='"'||It==="'"))return['"'+t(st.substr(1,st.length-2))+'"'];var ir=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(st);if(ir)return n(st.substr(0,ir.index)).concat(n(ir[1])).concat(n(st.substr(ir.index+ir[0].length)));var dr=st.split(".");if(dr.length===1)return['"'+t(st)+'"'];for(var Ar=[],hr=0;hr"u"?1:window.devicePixelRatio,ta=!1,ka={},Ta=function(ia){},Ra=function(){};if(typeof It=="string"?Ut=document.querySelector(It):typeof It=="object"&&(T(It)?Ut=It:S(It)?(Ar=It,dr=Ar.canvas):("gl"in It?Ar=It.gl:"canvas"in It?dr=C(It.canvas):"container"in It&&(ir=C(It.container)),"attributes"in It&&(hr=It.attributes),"extensions"in It&&(vr=M(It.extensions)),"optionalExtensions"in It&&(Or=M(It.optionalExtensions)),"onDone"in It&&(Ta=It.onDone),"profile"in It&&(ta=!!It.profile),"pixelRatio"in It&&(Cr=+It.pixelRatio),"cachedCode"in It&&(ka=It.cachedCode))),Ut&&(Ut.nodeName.toLowerCase()==="canvas"?dr=Ut:ir=Ut),!Ar){if(!dr){var ua=m(ir||document.body,Ta,Cr);if(!ua)return null;dr=ua.canvas,Ra=ua.onDestroy}hr.premultipliedAlpha===void 0&&(hr.premultipliedAlpha=!0),Ar=i(dr,hr)}return Ar?{gl:Ar,canvas:dr,container:ir,extensions:vr,optionalExtensions:Or,pixelRatio:Cr,profile:ta,cachedCode:ka,onDone:Ta,onDestroy:Ra}:(Ra(),Ta("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function w(st,It){var Ut={};function ir(hr){var vr=hr.toLowerCase(),Or;try{Or=Ut[vr]=st.getExtension(vr)}catch{}return!!Or}for(var dr=0;dr65535)<<4,st>>>=It,Ut=(st>255)<<3,st>>>=Ut,It|=Ut,Ut=(st>15)<<2,st>>>=Ut,It|=Ut,Ut=(st>3)<<1,st>>>=Ut,It|=Ut,It|st>>1}function P(){var st=h(8,function(){return[]});function It(Ar){var hr=B(Ar),vr=st[F(hr)>>2];return vr.length>0?vr.pop():new ArrayBuffer(hr)}function Ut(Ar){st[F(Ar.byteLength)>>2].push(Ar)}function ir(Ar,hr){var vr=null;switch(Ar){case u:vr=new Int8Array(It(hr),0,hr);break;case A:vr=new Uint8Array(It(hr),0,hr);break;case x:vr=new Int16Array(It(2*hr),0,hr);break;case z:vr=new Uint16Array(It(2*hr),0,hr);break;case I:vr=new Int32Array(It(4*hr),0,hr);break;case O:vr=new Uint32Array(It(4*hr),0,hr);break;case D:vr=new Float32Array(It(4*hr),0,hr);break;default:return null}return vr.length!==hr?vr.subarray(0,hr):vr}function dr(Ar){Ut(Ar.buffer)}return{alloc:It,free:Ut,allocType:ir,freeType:dr}}var j=P();j.zero=P();var U=3408,$=3410,Q=3411,re=3412,ne=3413,se=3414,V=3415,Z=33901,K=33902,H=3379,X=3386,q=34921,W=36347,ee=36348,ae=35661,he=35660,xe=34930,we=36349,Me=34076,Se=34024,Ie=7936,Ge=7937,qe=7938,ke=35724,_e=34047,ue=36063,ve=34852,le=3553,Ae=34067,Be=34069,Xe=33984,Ye=6408,yt=5126,gt=5121,Tt=36160,At=36053,$t=36064,rr=16384,_r=function(st,It){var Ut=1;It.ext_texture_filter_anisotropic&&(Ut=st.getParameter(_e));var ir=1,dr=1;It.webgl_draw_buffers&&(ir=st.getParameter(ve),dr=st.getParameter(ue));var Ar=!!It.oes_texture_float;if(Ar){var hr=st.createTexture();st.bindTexture(le,hr),st.texImage2D(le,0,Ye,1,1,0,Ye,yt,null);var vr=st.createFramebuffer();if(st.bindFramebuffer(Tt,vr),st.framebufferTexture2D(Tt,$t,le,hr,0),st.bindTexture(le,null),st.checkFramebufferStatus(Tt)!==At)Ar=!1;else{st.viewport(0,0,1,1),st.clearColor(1,0,0,1),st.clear(rr);var Or=j.allocType(yt,4);st.readPixels(0,0,1,1,Ye,yt,Or),st.getError()?Ar=!1:(st.deleteFramebuffer(vr),st.deleteTexture(hr),Ar=Or[0]===1),j.freeType(Or)}}var Cr=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ta=!0;if(!Cr){var ka=st.createTexture(),Ta=j.allocType(gt,36);st.activeTexture(Xe),st.bindTexture(Ae,ka),st.texImage2D(Be,0,Ye,3,3,0,Ye,gt,Ta),j.freeType(Ta),st.bindTexture(Ae,null),st.deleteTexture(ka),ta=!st.getError()}return{colorBits:[st.getParameter($),st.getParameter(Q),st.getParameter(re),st.getParameter(ne)],depthBits:st.getParameter(se),stencilBits:st.getParameter(V),subpixelBits:st.getParameter(U),extensions:Object.keys(It).filter(function(Ra){return!!It[Ra]}),maxAnisotropic:Ut,maxDrawbuffers:ir,maxColorAttachments:dr,pointSizeDims:st.getParameter(Z),lineWidthDims:st.getParameter(K),maxViewportDims:st.getParameter(X),maxCombinedTextureUnits:st.getParameter(ae),maxCubeMapSize:st.getParameter(Me),maxRenderbufferSize:st.getParameter(Se),maxTextureUnits:st.getParameter(xe),maxTextureSize:st.getParameter(H),maxAttributes:st.getParameter(q),maxVertexUniforms:st.getParameter(W),maxVertexTextureUnits:st.getParameter(he),maxVaryingVectors:st.getParameter(ee),maxFragmentUniforms:st.getParameter(we),glsl:st.getParameter(ke),renderer:st.getParameter(Ge),vendor:st.getParameter(Ie),version:st.getParameter(qe),readFloat:Ar,npotTextureCube:ta}},Xt=function(st){return st instanceof Uint8Array||st instanceof Uint16Array||st instanceof Uint32Array||st instanceof Int8Array||st instanceof Int16Array||st instanceof Int32Array||st instanceof Float32Array||st instanceof Float64Array||st instanceof Uint8ClampedArray};function or(st){return!!st&&typeof st=="object"&&Array.isArray(st.shape)&&Array.isArray(st.stride)&&typeof st.offset=="number"&&st.shape.length===st.stride.length&&(Array.isArray(st.data)||Xt(st.data))}var Ot=function(st){return Object.keys(st).map(function(It){return st[It]})},vt={shape:Je,flatten:Ke};function ht(st,It,Ut){for(var ir=0;ir0){var ui;if(Array.isArray(ma[0])){Dn=cr(ma);for(var cn=1,sn=1;sn0){if(typeof cn[0]=="number"){var Rn=j.allocType(za.dtype,cn.length);un(Rn,cn),Dn(Rn,ei),j.freeType(Rn)}else if(Array.isArray(cn[0])||Xt(cn[0])){Pn=cr(cn);var In=ur(cn,Pn,za.dtype);Dn(In,ei),j.freeType(In)}}}else if(or(cn)){Pn=cn.shape;var Jn=cn.stride,Ei=0,so=0,ti=0,bi=0;Pn.length===1?(Ei=Pn[0],so=1,ti=Jn[0],bi=0):Pn.length===2&&(Ei=Pn[0],so=Pn[1],ti=Jn[0],bi=Jn[1]);var Wi=Array.isArray(cn.data)?za.dtype:La(cn.data),ro=j.allocType(Wi,Ei*so);Xa(ro,cn.data,Ei,so,ti,bi,cn.offset),Dn(ro,ei),j.freeType(ro)}return kn}return da||kn(ia),kn._reglType="buffer",kn._buffer=za,kn.subdata=ui,Ut.profile&&(kn.stats=za.stats),kn.destroy=function(){Ta(za)},kn}function ua(){Ot(Ar).forEach(function(ia){ia.buffer=st.createBuffer(),st.bindBuffer(ia.type,ia.buffer),st.bufferData(ia.type,ia.persistentData||ia.byteLength,ia.usage)})}return Ut.profile&&(It.getTotalBufferSize=function(){var ia=0;return Object.keys(Ar).forEach(function(ma){ia+=Ar[ma].stats.size}),ia}),{create:Ra,createStream:Or,destroyStream:Cr,clear:function(){Ot(Ar).forEach(Ta),vr.forEach(Ta)},getBuffer:function(ia){return ia&&ia._buffer instanceof hr?ia._buffer:null},restore:ua,_initBuffer:ka}}var Nn=0,yn=0,Un=1,li=1,Yn=4,on=4,en={points:Nn,point:yn,lines:Un,line:li,triangles:Yn,triangle:on,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},vi=0,Yi=1,Ja=4,Oa=5120,lt=5121,rt=5122,fr=5123,lr=5124,Tr=5125,Ir=34963,Dr=35040,ot=35044;function kt(st,It,Ut,ir){var dr={},Ar=0,hr={uint8:lt,uint16:fr};It.oes_element_index_uint&&(hr.uint32=Tr);function vr(ua){this.id=Ar++,dr[this.id]=this,this.buffer=ua,this.primType=Ja,this.vertCount=0,this.type=0}vr.prototype.bind=function(){this.buffer.bind()};var Or=[];function Cr(ua){var ia=Or.pop();return ia||(ia=new vr(Ut.create(null,Ir,!0,!1)._buffer)),ka(ia,ua,Dr,-1,-1,0,0),ia}function ta(ua){Or.push(ua)}function ka(ua,ia,ma,da,Fa,za,kn){ua.buffer.bind();var Dn;if(ia){var ui=kn;!kn&&(!Xt(ia)||or(ia)&&!Xt(ia.data))&&(ui=It.oes_element_index_uint?Tr:fr),Ut._initBuffer(ua.buffer,ia,ma,ui,3)}else st.bufferData(Ir,za,ma),ua.buffer.dtype=Dn||lt,ua.buffer.usage=ma,ua.buffer.dimension=3,ua.buffer.byteLength=za;if(Dn=kn,!kn){switch(ua.buffer.dtype){case lt:case Oa:Dn=lt;break;case fr:case rt:Dn=fr;break;case Tr:case lr:Dn=Tr;break;default:}ua.buffer.dtype=Dn}ua.type=Dn;var cn=Fa;cn<0&&(cn=ua.buffer.byteLength,Dn===fr?cn>>=1:Dn===Tr&&(cn>>=2)),ua.vertCount=cn;var sn=da;if(da<0){sn=Ja;var ei=ua.buffer.dimension;ei===1&&(sn=vi),ei===2&&(sn=Yi),ei===3&&(sn=Ja)}ua.primType=sn}function Ta(ua){ir.elementsCount--,delete dr[ua.id],ua.buffer.destroy(),ua.buffer=null}function Ra(ua,ia){var ma=Ut.create(null,Ir,!0),da=new vr(ma._buffer);ir.elementsCount++;function Fa(za){if(!za)ma(),da.primType=Ja,da.vertCount=0,da.type=lt;else if(typeof za=="number")ma(za),da.primType=Ja,da.vertCount=za|0,da.type=lt;else{var kn=null,Dn=ot,ui=-1,cn=-1,sn=0,ei=0;Array.isArray(za)||Xt(za)||or(za)?kn=za:("data"in za&&(kn=za.data),"usage"in za&&(Dn=nr[za.usage]),"primitive"in za&&(ui=en[za.primitive]),"count"in za&&(cn=za.count|0),"type"in za&&(ei=hr[za.type]),"length"in za?sn=za.length|0:(sn=cn,ei===fr||ei===rt?sn*=2:(ei===Tr||ei===lr)&&(sn*=4))),ka(da,kn,Dn,ui,cn,sn,ei)}return Fa}return Fa(ua),Fa._reglType="elements",Fa._elements=da,Fa.subdata=function(za,kn){return ma.subdata(za,kn),Fa},Fa.destroy=function(){Ta(da)},Fa}return{create:Ra,createStream:Cr,destroyStream:ta,getElements:function(ua){return typeof ua=="function"&&ua._elements instanceof vr?ua._elements:null},clear:function(){Ot(dr).forEach(Ta)}}}var jt=new Float32Array(1),ar=new Uint32Array(jt.buffer),Er=5123;function xr(st){for(var It=j.allocType(Er,st.length),Ut=0;Ut>>31<<15,Ar=(ir<<1>>>24)-127,hr=ir>>13&1023;if(Ar<-24)It[Ut]=dr;else if(Ar<-14){var vr=-14-Ar;It[Ut]=dr+(hr+1024>>vr)}else Ar>15?It[Ut]=dr+31744:It[Ut]=dr+(Ar+15<<10)+hr}return It}function zr(st){return Array.isArray(st)||Xt(st)}var Lr=34467,aa=3553,Sa=34067,wa=34069,pn=6408,tn=6406,ai=6407,rn=6409,Ri=6410,Gn=32854,no=32855,Di=36194,fn=32819,Ai=32820,jn=33635,Xn=34042,eo=6402,gi=34041,qi=35904,io=35906,oo=36193,Vn=33776,qn=33777,Hi=33778,Mi=33779,Ro=35986,go=35987,Eo=34798,Ao=35840,ds=35841,jo=35842,Wo=35843,to=36196,wo=5121,pi=5123,Vi=5125,Io=5126,Zi=10242,Ko=10243,Uo=10497,Ls=33071,Ss=33648,Vo=10240,Vs=10241,Ts=9728,Bo=9729,_o=9984,Pi=9985,yo=9986,bs=9987,Dl=33170,hl=4352,ps=4353,dl=4354,wu=34046,lu=3317,xc=37440,Fl=37441,pl=37443,$u=37444,uu=33984,tl=[_o,yo,Pi,bs],vs=[0,rn,Ri,ai,pn],os={};os[rn]=os[tn]=os[eo]=1,os[gi]=os[Ri]=2,os[ai]=os[qi]=3,os[pn]=os[io]=4;function ms(st){return"[object "+st+"]"}var rl=ms("HTMLCanvasElement"),Fu=ms("OffscreenCanvas"),zu=ms("CanvasRenderingContext2D"),Ku=ms("ImageBitmap"),bc=ms("HTMLImageElement"),Lh=ms("HTMLVideoElement"),rh=Object.keys(et).concat([rl,Fu,zu,Ku,bc,Lh]),Ju=[];Ju[wo]=1,Ju[Io]=4,Ju[oo]=2,Ju[pi]=2,Ju[Vi]=4;var ss=[];ss[Gn]=2,ss[no]=2,ss[Di]=2,ss[gi]=4,ss[Vn]=.5,ss[qn]=.5,ss[Hi]=1,ss[Mi]=1,ss[Ro]=.5,ss[go]=1,ss[Eo]=1,ss[Ao]=.5,ss[ds]=.25,ss[jo]=.5,ss[Wo]=.25,ss[to]=.5;function ah(st){return Array.isArray(st)&&(st.length===0||typeof st[0]=="number")}function wc(st){if(!Array.isArray(st))return!1;var It=st.length;return!(It===0||!zr(st[0]))}function pc(st){return Object.prototype.toString.call(st)}function Nf(st){return pc(st)===rl}function Bu(st){return pc(st)===Fu}function Tc(st){return pc(st)===zu}function Ou(st){return pc(st)===Ku}function Gc(st){return pc(st)===bc}function pf(st){return pc(st)===Lh}function $l(st){if(!st)return!1;var It=pc(st);return rh.indexOf(It)>=0?!0:ah(st)||wc(st)||or(st)}function jf(st){return et[Object.prototype.toString.call(st)]|0}function Hc(st,It){var Ut=It.length;switch(st.type){case wo:case pi:case Vi:case Io:var ir=j.allocType(st.type,Ut);ir.set(It),st.data=ir;break;case oo:st.data=xr(It);break;default:}}function Wc(st,It){return j.allocType(st.type===oo?Io:st.type,It)}function Qu(st,It){st.type===oo?(st.data=xr(It),j.freeType(It)):st.data=It}function Yc(st,It,Ut,ir,dr,Ar){for(var hr=st.width,vr=st.height,Or=st.channels,Cr=hr*vr*Or,ta=Wc(st,Cr),ka=0,Ta=0;Ta=1;)vr+=hr*Or*Or,Or/=2;return vr}else return hr*Ut*ir}function Uf(st,It,Ut,ir,dr,Ar,hr){var vr={"don't care":hl,"dont care":hl,nice:dl,fast:ps},Or={repeat:Uo,clamp:Ls,mirror:Ss},Cr={nearest:Ts,linear:Bo},ta=p({mipmap:bs,"nearest mipmap nearest":_o,"linear mipmap nearest":Pi,"nearest mipmap linear":yo,"linear mipmap linear":bs},Cr),ka={none:0,browser:$u},Ta={uint8:wo,rgba4:fn,rgb565:jn,"rgb5 a1":Ai},Ra={alpha:tn,luminance:rn,"luminance alpha":Ri,rgb:ai,rgba:pn,rgba4:Gn,"rgb5 a1":no,rgb565:Di},ua={};It.ext_srgb&&(Ra.srgb=qi,Ra.srgba=io),It.oes_texture_float&&(Ta.float32=Ta.float=Io),It.oes_texture_half_float&&(Ta.float16=Ta["half float"]=oo),It.webgl_depth_texture&&(p(Ra,{depth:eo,"depth stencil":gi}),p(Ta,{uint16:pi,uint32:Vi,"depth stencil":Xn})),It.webgl_compressed_texture_s3tc&&p(ua,{"rgb s3tc dxt1":Vn,"rgba s3tc dxt1":qn,"rgba s3tc dxt3":Hi,"rgba s3tc dxt5":Mi}),It.webgl_compressed_texture_atc&&p(ua,{"rgb atc":Ro,"rgba atc explicit alpha":go,"rgba atc interpolated alpha":Eo}),It.webgl_compressed_texture_pvrtc&&p(ua,{"rgb pvrtc 4bppv1":Ao,"rgb pvrtc 2bppv1":ds,"rgba pvrtc 4bppv1":jo,"rgba pvrtc 2bppv1":Wo}),It.webgl_compressed_texture_etc1&&(ua["rgb etc1"]=to);var ia=Array.prototype.slice.call(st.getParameter(Lr));Object.keys(ua).forEach(function(ra){var Ya=ua[ra];ia.indexOf(Ya)>=0&&(Ra[ra]=Ya)});var ma=Object.keys(Ra);Ut.textureFormats=ma;var da=[];Object.keys(Ra).forEach(function(ra){var Ya=Ra[ra];da[Ya]=ra});var Fa=[];Object.keys(Ta).forEach(function(ra){var Ya=Ta[ra];Fa[Ya]=ra});var za=[];Object.keys(Cr).forEach(function(ra){var Ya=Cr[ra];za[Ya]=ra});var kn=[];Object.keys(ta).forEach(function(ra){var Ya=ta[ra];kn[Ya]=ra});var Dn=[];Object.keys(Or).forEach(function(ra){var Ya=Or[ra];Dn[Ya]=ra});var ui=ma.reduce(function(ra,Ya){var Ka=Ra[Ya];return Ka===rn||Ka===tn||Ka===rn||Ka===Ri||Ka===eo||Ka===gi||It.ext_srgb&&(Ka===qi||Ka===io)?ra[Ka]=Ka:Ka===no||Ya.indexOf("rgba")>=0?ra[Ka]=pn:ra[Ka]=ai,ra},{});function cn(){this.internalformat=pn,this.format=pn,this.type=wo,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=$u,this.width=0,this.height=0,this.channels=0}function sn(ra,Ya){ra.internalformat=Ya.internalformat,ra.format=Ya.format,ra.type=Ya.type,ra.compressed=Ya.compressed,ra.premultiplyAlpha=Ya.premultiplyAlpha,ra.flipY=Ya.flipY,ra.unpackAlignment=Ya.unpackAlignment,ra.colorSpace=Ya.colorSpace,ra.width=Ya.width,ra.height=Ya.height,ra.channels=Ya.channels}function ei(ra,Ya){if(!(typeof Ya!="object"||!Ya)){if("premultiplyAlpha"in Ya&&(ra.premultiplyAlpha=Ya.premultiplyAlpha),"flipY"in Ya&&(ra.flipY=Ya.flipY),"alignment"in Ya&&(ra.unpackAlignment=Ya.alignment),"colorSpace"in Ya&&(ra.colorSpace=ka[Ya.colorSpace]),"type"in Ya){var Ka=Ya.type;ra.type=Ta[Ka]}var Bi=ra.width,rs=ra.height,Is=ra.channels,Oi=!1;"shape"in Ya?(Bi=Ya.shape[0],rs=Ya.shape[1],Ya.shape.length===3&&(Is=Ya.shape[2],Oi=!0)):("radius"in Ya&&(Bi=rs=Ya.radius),"width"in Ya&&(Bi=Ya.width),"height"in Ya&&(rs=Ya.height),"channels"in Ya&&(Is=Ya.channels,Oi=!0)),ra.width=Bi|0,ra.height=rs|0,ra.channels=Is|0;var Wr=!1;if("format"in Ya){var na=Ya.format,pa=ra.internalformat=Ra[na];ra.format=ui[pa],na in Ta&&("type"in Ya||(ra.type=Ta[na])),na in ua&&(ra.compressed=!0),Wr=!0}!Oi&&Wr?ra.channels=os[ra.format]:Oi&&!Wr&&ra.channels!==vs[ra.format]&&(ra.format=ra.internalformat=vs[ra.channels])}}function Pn(ra){st.pixelStorei(xc,ra.flipY),st.pixelStorei(Fl,ra.premultiplyAlpha),st.pixelStorei(pl,ra.colorSpace),st.pixelStorei(lu,ra.unpackAlignment)}function Rn(){cn.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function In(ra,Ya){var Ka=null;if($l(Ya)?Ka=Ya:Ya&&(ei(ra,Ya),"x"in Ya&&(ra.xOffset=Ya.x|0),"y"in Ya&&(ra.yOffset=Ya.y|0),$l(Ya.data)&&(Ka=Ya.data)),Ya.copy){var Bi=dr.viewportWidth,rs=dr.viewportHeight;ra.width=ra.width||Bi-ra.xOffset,ra.height=ra.height||rs-ra.yOffset,ra.needsCopy=!0}else if(!Ka)ra.width=ra.width||1,ra.height=ra.height||1,ra.channels=ra.channels||4;else if(Xt(Ka))ra.channels=ra.channels||4,ra.data=Ka,!("type"in Ya)&&ra.type===wo&&(ra.type=jf(Ka));else if(ah(Ka))ra.channels=ra.channels||4,Hc(ra,Ka),ra.alignment=1,ra.needsFree=!0;else if(or(Ka)){var Is=Ka.data;!Array.isArray(Is)&&ra.type===wo&&(ra.type=jf(Is));var Oi=Ka.shape,Wr=Ka.stride,na,pa,Wa,ln,Le,Ue;Oi.length===3?(Wa=Oi[2],Ue=Wr[2]):(Wa=1,Ue=1),na=Oi[0],pa=Oi[1],ln=Wr[0],Le=Wr[1],ra.alignment=1,ra.width=na,ra.height=pa,ra.channels=Wa,ra.format=ra.internalformat=vs[Wa],ra.needsFree=!0,Yc(ra,Is,ln,Le,Ue,Ka.offset)}else if(Nf(Ka)||Bu(Ka)||Tc(Ka))Nf(Ka)||Bu(Ka)?ra.element=Ka:ra.element=Ka.canvas,ra.width=ra.element.width,ra.height=ra.element.height,ra.channels=4;else if(Ou(Ka))ra.element=Ka,ra.width=Ka.width,ra.height=Ka.height,ra.channels=4;else if(Gc(Ka))ra.element=Ka,ra.width=Ka.naturalWidth,ra.height=Ka.naturalHeight,ra.channels=4;else if(pf(Ka))ra.element=Ka,ra.width=Ka.videoWidth,ra.height=Ka.videoHeight,ra.channels=4;else if(wc(Ka)){var Qe=ra.width||Ka[0].length,_t=ra.height||Ka.length,wt=ra.channels;zr(Ka[0][0])?wt=wt||Ka[0][0].length:wt=wt||1;for(var Lt=vt.shape(Ka),pr=1,Gr=0;Gr>=rs,Ka.height>>=rs,In(Ka,Bi[rs]),ra.mipmask|=1<=0&&!("faces"in Ya)&&(ra.genMipmaps=!0)}if("mag"in Ya){var Bi=Ya.mag;ra.magFilter=Cr[Bi]}var rs=ra.wrapS,Is=ra.wrapT;if("wrap"in Ya){var Oi=Ya.wrap;typeof Oi=="string"?rs=Is=Or[Oi]:Array.isArray(Oi)&&(rs=Or[Oi[0]],Is=Or[Oi[1]])}else{if("wrapS"in Ya){var Wr=Ya.wrapS;rs=Or[Wr]}if("wrapT"in Ya){var na=Ya.wrapT;Is=Or[na]}}if(ra.wrapS=rs,ra.wrapT=Is,"anisotropic"in Ya){var pa=Ya.anisotropic;ra.anisotropic=Ya.anisotropic}if("mipmap"in Ya){var Wa=!1;switch(typeof Ya.mipmap){case"string":ra.mipmapHint=vr[Ya.mipmap],ra.genMipmaps=!0,Wa=!0;break;case"boolean":Wa=ra.genMipmaps=Ya.mipmap;break;case"object":ra.genMipmaps=!1,Wa=!0;break;default:}Wa&&!("min"in Ya)&&(ra.minFilter=_o)}}function $o(ra,Ya){st.texParameteri(Ya,Vs,ra.minFilter),st.texParameteri(Ya,Vo,ra.magFilter),st.texParameteri(Ya,Zi,ra.wrapS),st.texParameteri(Ya,Ko,ra.wrapT),It.ext_texture_filter_anisotropic&&st.texParameteri(Ya,wu,ra.anisotropic),ra.genMipmaps&&(st.hint(Dl,ra.mipmapHint),st.generateMipmap(Ya))}var _s=0,Go={},Ys=Ut.maxTextureUnits,Ll=Array(Ys).map(function(){return null});function mo(ra){cn.call(this),this.mipmask=0,this.internalformat=pn,this.id=_s++,this.refCount=1,this.target=ra,this.texture=st.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Zo,hr.profile&&(this.stats={size:0})}function ru(ra){st.activeTexture(uu),st.bindTexture(ra.target,ra.texture)}function Rs(){var ra=Ll[0];ra?st.bindTexture(ra.target,ra.texture):st.bindTexture(aa,null)}function Yu(ra){var Ya=ra.texture,Ka=ra.unit,Bi=ra.target;Ka>=0&&(st.activeTexture(uu+Ka),st.bindTexture(Bi,null),Ll[Ka]=null),st.deleteTexture(Ya),ra.texture=null,ra.params=null,ra.pixels=null,ra.refCount=0,delete Go[ra.id],Ar.textureCount--}p(mo.prototype,{bind:function(){var ra=this;ra.bindCount+=1;var Ya=ra.unit;if(Ya<0){for(var Ka=0;Ka0)continue;Bi.unit=-1}Ll[Ka]=ra,Ya=Ka;break}Ya>=Ys,hr.profile&&Ar.maxTextureUnits>Le)-Wa,Ue.height=Ue.height||(Ka.height>>Le)-ln,ru(Ka),Ei(Ue,aa,Wa,ln,Le),Rs(),bi(Ue),Bi}function Is(Oi,Wr){var na=Oi|0,pa=Wr|0||na;if(na===Ka.width&&pa===Ka.height)return Bi;Bi.width=Ka.width=na,Bi.height=Ka.height=pa,ru(Ka);for(var Wa=0;Ka.mipmask>>Wa;++Wa){var ln=na>>Wa,Le=pa>>Wa;if(!ln||!Le)break;st.texImage2D(aa,Wa,Ka.format,ln,Le,0,Ka.format,Ka.type,null)}return Rs(),hr.profile&&(Ka.stats.size=Nu(Ka.internalformat,Ka.type,na,pa,!1,!1)),Bi}return Bi(ra,Ya),Bi.subimage=rs,Bi.resize=Is,Bi._reglType="texture2d",Bi._texture=Ka,hr.profile&&(Bi.stats=Ka.stats),Bi.destroy=function(){Ka.decRef()},Bi}function ql(ra,Ya,Ka,Bi,rs,Is){var Oi=new mo(Sa);Go[Oi.id]=Oi,Ar.cubeCount++;var Wr=new Array(6);function na(ln,Le,Ue,Qe,_t,wt){var Lt,pr=Oi.texInfo;for(Zo.call(pr),Lt=0;Lt<6;++Lt)Wr[Lt]=So();if(typeof ln=="number"||!ln){var Gr=ln|0||1;for(Lt=0;Lt<6;++Lt)ro(Wr[Lt],Gr,Gr)}else if(typeof ln=="object")if(Le)Mo(Wr[0],ln),Mo(Wr[1],Le),Mo(Wr[2],Ue),Mo(Wr[3],Qe),Mo(Wr[4],_t),Mo(Wr[5],wt);else if(es(pr,ln),ei(Oi,ln),"faces"in ln){var va=ln.faces;for(Lt=0;Lt<6;++Lt)sn(Wr[Lt],Oi),Mo(Wr[Lt],va[Lt])}else for(Lt=0;Lt<6;++Lt)Mo(Wr[Lt],ln);for(sn(Oi,Wr[0]),pr.genMipmaps?Oi.mipmask=(Wr[0].width<<1)-1:Oi.mipmask=Wr[0].mipmask,Oi.internalformat=Wr[0].internalformat,na.width=Wr[0].width,na.height=Wr[0].height,ru(Oi),Lt=0;Lt<6;++Lt)zs(Wr[Lt],wa+Lt);for($o(pr,Sa),Rs(),hr.profile&&(Oi.stats.size=Nu(Oi.internalformat,Oi.type,na.width,na.height,pr.genMipmaps,!0)),na.format=da[Oi.internalformat],na.type=Fa[Oi.type],na.mag=za[pr.magFilter],na.min=kn[pr.minFilter],na.wrapS=Dn[pr.wrapS],na.wrapT=Dn[pr.wrapT],Lt=0;Lt<6;++Lt)Ws(Wr[Lt]);return na}function pa(ln,Le,Ue,Qe,_t){var wt=Ue|0,Lt=Qe|0,pr=_t|0,Gr=ti();return sn(Gr,Oi),Gr.width=0,Gr.height=0,In(Gr,Le),Gr.width=Gr.width||(Oi.width>>pr)-wt,Gr.height=Gr.height||(Oi.height>>pr)-Lt,ru(Oi),Ei(Gr,wa+ln,wt,Lt,pr),Rs(),bi(Gr),na}function Wa(ln){var Le=ln|0;if(Le!==Oi.width){na.width=Oi.width=Le,na.height=Oi.height=Le,ru(Oi);for(var Ue=0;Ue<6;++Ue)for(var Qe=0;Oi.mipmask>>Qe;++Qe)st.texImage2D(wa+Ue,Qe,Oi.format,Le>>Qe,Le>>Qe,0,Oi.format,Oi.type,null);return Rs(),hr.profile&&(Oi.stats.size=Nu(Oi.internalformat,Oi.type,na.width,na.height,!1,!0)),na}}return na(ra,Ya,Ka,Bi,rs,Is),na.subimage=pa,na.resize=Wa,na._reglType="textureCube",na._texture=Oi,hr.profile&&(na.stats=Oi.stats),na.destroy=function(){Oi.decRef()},na}function fo(){for(var ra=0;ra>Bi,Ka.height>>Bi,0,Ka.internalformat,Ka.type,null);else for(var rs=0;rs<6;++rs)st.texImage2D(wa+rs,Bi,Ka.internalformat,Ka.width>>Bi,Ka.height>>Bi,0,Ka.internalformat,Ka.type,null);$o(Ka.texInfo,Ka.target)})}function Os(){for(var ra=0;ra=0?Ws=!0:Or.indexOf(Zo)>=0&&(Ws=!1))),("depthTexture"in mo||"depthStencilTexture"in mo)&&(Ll=!!(mo.depthTexture||mo.depthStencilTexture)),"depth"in mo&&(typeof mo.depth=="boolean"?zs=mo.depth:(_s=mo.depth,Bs=!1)),"stencil"in mo&&(typeof mo.stencil=="boolean"?Bs=mo.stencil:(Go=mo.stencil,zs=!1)),"depthStencil"in mo&&(typeof mo.depthStencil=="boolean"?zs=Bs=mo.depthStencil:(Ys=mo.depthStencil,zs=!1,Bs=!1))}var Rs=null,Yu=null,Ul=null,ql=null;if(Array.isArray(So))Rs=So.map(ua);else if(So)Rs=[ua(So)];else for(Rs=new Array($o),Wi=0;Wi<$o;++Wi)Rs[Wi]=ia(ro,Mo,Ws,Zo,es);ro=ro||Rs[0].width,Mo=Mo||Rs[0].height,_s?Yu=ua(_s):zs&&!Bs&&(Yu=ia(ro,Mo,Ll,"depth","uint32")),Go?Ul=ua(Go):Bs&&!zs&&(Ul=ia(ro,Mo,!1,"stencil","uint8")),Ys?ql=ua(Ys):!_s&&!Go&&Bs&&zs&&(ql=ia(ro,Mo,Ll,"depth stencil","depth stencil"));var fo=null;for(Wi=0;Wi0&&(bi.depth=In[0].depth,bi.stencil=In[0].stencil,bi.depthStencil=In[0].depthStencil),In[ti]?In[ti](bi):In[ti]=sn(bi)}return p(Jn,{width:Wi,height:Wi,color:Zo})}function Ei(so){var ti,bi=so|0;if(bi===Jn.width)return Jn;var Wi=Jn.color;for(ti=0;ti=Wi.byteLength?ro.subdata(Wi):(ro.destroy(),sn.buffers[so]=null)),sn.buffers[so]||(ro=sn.buffers[so]=dr.create(ti,hu,!1,!0)),bi.buffer=dr.getBuffer(ro),bi.size=bi.buffer.dimension|0,bi.normalized=!1,bi.type=bi.buffer.dtype,bi.offset=0,bi.stride=0,bi.divisor=0,bi.state=1,Jn[so]=1}else dr.getBuffer(ti)?(bi.buffer=dr.getBuffer(ti),bi.size=bi.buffer.dimension|0,bi.normalized=!1,bi.type=bi.buffer.dtype,bi.offset=0,bi.stride=0,bi.divisor=0,bi.state=1):dr.getBuffer(ti.buffer)?(bi.buffer=dr.getBuffer(ti.buffer),bi.size=(+ti.size||bi.buffer.dimension)|0,bi.normalized=!!ti.normalized||!1,"type"in ti?bi.type=Kr[ti.type]:bi.type=bi.buffer.dtype,bi.offset=(ti.offset||0)|0,bi.stride=(ti.stride||0)|0,bi.divisor=(ti.divisor||0)|0,bi.state=1):"x"in ti&&(bi.x=+ti.x||0,bi.y=+ti.y||0,bi.z=+ti.z||0,bi.w=+ti.w||0,bi.state=2)}for(var Mo=0;Mo1)for(var Pn=0;Pnia&&(ia=ma.stats.uniformsCount)}),ia},Ut.getMaxAttributesCount=function(){var ia=0;return ta.forEach(function(ma){ma.stats.attributesCount>ia&&(ia=ma.stats.attributesCount)}),ia});function ua(){dr={},Ar={};for(var ia=0;ia16&&(Ut=Da(Ut,st.length*8));for(var ir=Array(16),dr=Array(16),Ar=0;Ar<16;Ar++)ir[Ar]=Ut[Ar]^909522486,dr[Ar]=Ut[Ar]^1549556828;var hr=Da(ir.concat(vc(It)),512+It.length*8);return Ft(Da(dr.concat(hr),768))}function kl(st){for(var It=xf?"0123456789ABCDEF":"0123456789abcdef",Ut="",ir,dr=0;dr>>4&15)+It.charAt(ir&15);return Ut}function kc(st){for(var It="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ut="",ir=st.length,dr=0;drst.length*8?Ut+=Gf:Ut+=It.charAt(Ar>>>6*(3-hr)&63);return Ut}function Cc(st,It){var Ut=It.length,ir=Array(),dr,Ar,hr,vr,Or=Array(Math.ceil(st.length/2));for(dr=0;dr0;){for(vr=Array(),hr=0,dr=0;dr0||Ar>0)&&(vr[vr.length]=Ar);ir[ir.length]=hr,Or=vr}var Cr="";for(dr=ir.length-1;dr>=0;dr--)Cr+=It.charAt(ir[dr]);var ta=Math.ceil(st.length*8/(Math.log(It.length)/Math.log(2)));for(dr=Cr.length;dr>>6&31,128|ir&63):ir<=65535?It+=String.fromCharCode(224|ir>>>12&15,128|ir>>>6&63,128|ir&63):ir<=2097151&&(It+=String.fromCharCode(240|ir>>>18&7,128|ir>>>12&63,128|ir>>>6&63,128|ir&63));return It}function vc(st){for(var It=Array(st.length>>2),Ut=0;Ut>5]|=(st.charCodeAt(Ut/8)&255)<<24-Ut%32;return It}function Ft(st){for(var It="",Ut=0;Ut>5]>>>24-Ut%32&255);return It}function tr(st,It){return st>>>It|st<<32-It}function Fr(st,It){return st>>>It}function wr(st,It,Ut){return st&It^~st&Ut}function ea(st,It,Ut){return st&It^st&Ut^It&Ut}function ba(st){return tr(st,2)^tr(st,13)^tr(st,22)}function Ia(st){return tr(st,6)^tr(st,11)^tr(st,25)}function Na(st){return tr(st,7)^tr(st,18)^Fr(st,3)}function Za(st){return tr(st,17)^tr(st,19)^Fr(st,10)}var mn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Da(st,It){var Ut=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),ir=new Array(64),dr,Ar,hr,vr,Or,Cr,ta,ka,Ta,Ra,ua,ia;for(st[It>>5]|=128<<24-It%32,st[(It+64>>9<<4)+15]=It,Ta=0;Ta>16)+(It>>16)+(Ut>>16);return ir<<16|Ut&65535}function $a(st){return Array.prototype.slice.call(st)}function vn(st){return $a(st).join("")}function Sn(st){var It=st&&st.cache,Ut=0,ir=[],dr=[],Ar=[];function hr(ua,ia){var ma=ia&&ia.stable;if(!ma){for(var da=0;da0&&(ua.push(Fa,"="),ua.push.apply(ua,$a(arguments)),ua.push(";")),Fa}return p(ia,{def:da,toString:function(){return vn([ma.length>0?"var "+ma.join(",")+";":"",vn(ua)])}})}function Or(){var ua=vr(),ia=vr(),ma=ua.toString,da=ia.toString;function Fa(za,kn){ia(za,kn,"=",ua.def(za,kn),";")}return p(function(){ua.apply(ua,$a(arguments))},{def:ua.def,entry:ua,exit:ia,save:Fa,set:function(za,kn,Dn){Fa(za,kn),ua(za,kn,"=",Dn,";")},toString:function(){return ma()+da()}})}function Cr(){var ua=vn(arguments),ia=Or(),ma=Or(),da=ia.toString,Fa=ma.toString;return p(ia,{then:function(){return ia.apply(ia,$a(arguments)),this},else:function(){return ma.apply(ma,$a(arguments)),this},toString:function(){var za=Fa();return za&&(za="else{"+za+"}"),vn(["if(",ua,"){",da(),"}",za])}})}var ta=vr(),ka={};function Ta(ua,ia){var ma=[];function da(){var ui="a"+ma.length;return ma.push(ui),ui}ia=ia||0;for(var Fa=0;Fa":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},oa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},fa={cw:qe,ccw:tt};function Ea(st){return Array.isArray(st)||Xt(st)||or(st)}function Ma(st){return st.sort(function(It,Ut){return It===Ks?-1:Ut===Ks?1:It=1,ir>=2,It)}else if(Ut===Co){var dr=st.data;return new sa(dr.thisDep,dr.contextDep,dr.propDep,It)}else{if(Ut===Do)return new sa(!1,!1,!1,It);if(Ut===Fo){for(var Ar=!1,hr=!1,vr=!1,Or=0;Or=1&&(hr=!0),ta>=2&&(vr=!0)}else Cr.type===Co&&(Ar=Ar||Cr.data.thisDep,hr=hr||Cr.data.contextDep,vr=vr||Cr.data.propDep)}return new sa(Ar,hr,vr,It)}else return new sa(Ut===Zi,Ut===Ni,Ut===Ln,It)}}var $n=new sa(!1,!1,!1,function(){});function xi(st,It,Ut,ir,dr,Ar,hr,vr,Or,Cr,ta,ka,Ta,Ra,ua,ia){var ma=Cr.Record,da={add:32774,subtract:32778,"reverse subtract":32779};Ut.ext_blend_minmax&&(da.min=at,da.max=ct);var Fa=Ut.angle_instanced_arrays,za=Ut.webgl_draw_buffers,kn=Ut.oes_vertex_array_object,Dn={dirty:!0,profile:ia.profile},ui={},cn=[],sn={},ei={};function Pn(Wr){return Wr.replace(".","_")}function Rn(Wr,na,pa){var Wa=Pn(Wr);cn.push(Wr),ui[Wa]=Dn[Wa]=!!pa,sn[Wa]=na}function In(Wr,na,pa){var Wa=Pn(Wr);cn.push(Wr),Array.isArray(pa)?(Dn[Wa]=pa.slice(),ui[Wa]=pa.slice()):Dn[Wa]=ui[Wa]=pa,ei[Wa]=na}function Jn(Wr){return!!isNaN(Wr)}Rn(Yo,an),Rn(bo,Ba),In(Gs,"blendColor",[0,0,0,0]),In(Es,"blendEquationSeparate",[gr,gr]),In(ns,"blendFuncSeparate",[mr,Jt,mr,Jt]),Rn(Kn,ii,!0),In(zo,"depthFunc",Hr),In(gs,"depthRange",[0,1]),In(js,"depthMask",!0),In(Cl,Cl,[!0,!0,!0,!0]),Rn(zl,xa),In(Kl,"cullFace",Ee),In(Gu,Gu,tt),In(xl,xl,1),Rn(Hu,oi),In(Su,"polygonOffset",[0,0]),Rn(mc,Ji),Rn(Jc,Qi),In(oc,"sampleCoverage",[1,!1]),Rn(du,wn),In(Jl,"stencilMask",-1),In(Ql,"stencilFunc",[Nt,0,-1]),In(Eu,"stencilOpSeparate",[de,St,St,St]),In(bf,"stencilOpSeparate",[Ee,St,St,St]),Rn(lh,Si),In(Pc,"scissor",[0,0,st.drawingBufferWidth,st.drawingBufferHeight]),In(Ks,Ks,[0,0,st.drawingBufferWidth,st.drawingBufferHeight]);var Ei={gl:st,context:Ta,strings:It,next:ui,current:Dn,draw:ka,elements:Ar,buffer:dr,shader:ta,attributes:Cr.state,vao:Cr,uniforms:Or,framebuffer:vr,extensions:Ut,timer:Ra,isBufferArgs:Ea},so={primTypes:en,compareFuncs:Yr,blendFuncs:Aa,blendEquations:da,stencilOps:oa,glTypes:Kr,orientationType:fa};za&&(so.backBuffer=[Ee],so.drawBuffer=f(ir.maxDrawbuffers,function(Wr){return Wr===0?[0]:f(Wr,function(na){return ca+na})}));var ti=0;function bi(){var Wr=Sn({cache:ua}),na=Wr.link,pa=Wr.global;Wr.id=ti++,Wr.batchId="0";var Wa=na(Ei),ln=Wr.shared={props:"a0"};Object.keys(Ei).forEach(function(wt){ln[wt]=pa.def(Wa,".",wt)});var Le=Wr.next={},Ue=Wr.current={};Object.keys(ei).forEach(function(wt){Array.isArray(Dn[wt])&&(Le[wt]=pa.def(ln.next,".",wt),Ue[wt]=pa.def(ln.current,".",wt))});var Qe=Wr.constants={};Object.keys(so).forEach(function(wt){Qe[wt]=pa.def(JSON.stringify(so[wt]))}),Wr.invoke=function(wt,Lt){switch(Lt.type){case En:var pr=["this",ln.context,ln.props,Wr.batchId];return wt.def(na(Lt.data),".call(",pr.slice(0,Math.max(Lt.data.length+1,4)),")");case Ln:return wt.def(ln.props,Lt.data);case Ni:return wt.def(ln.context,Lt.data);case Zi:return wt.def("this",Lt.data);case Co:return Lt.data.append(Wr,wt),Lt.data.ref;case Do:return Lt.data.toString();case Fo:return Lt.data.map(function(Gr){return Wr.invoke(wt,Gr)})}},Wr.attribCache={};var _t={};return Wr.scopeAttrib=function(wt){var Lt=It.id(wt);if(Lt in _t)return _t[Lt];var pr=Cr.scope[Lt];pr||(pr=Cr.scope[Lt]=new ma);var Gr=_t[Lt]=na(pr);return Gr},Wr}function Wi(Wr){var na=Wr.static,pa=Wr.dynamic,Wa;if(Bl in na){var ln=!!na[Bl];Wa=Tn(function(Ue,Qe){return ln}),Wa.enable=ln}else if(Bl in pa){var Le=pa[Bl];Wa=zn(Le,function(Ue,Qe){return Ue.invoke(Qe,Le)})}return Wa}function ro(Wr,na){var pa=Wr.static,Wa=Wr.dynamic;if(Wu in pa){var ln=pa[Wu];return ln?(ln=vr.getFramebuffer(ln),Tn(function(Ue,Qe){var _t=Ue.link(ln),wt=Ue.shared;Qe.set(wt.framebuffer,".next",_t);var Lt=wt.context;return Qe.set(Lt,"."+xt,_t+".width"),Qe.set(Lt,"."+Bt,_t+".height"),_t})):Tn(function(Ue,Qe){var _t=Ue.shared;Qe.set(_t.framebuffer,".next","null");var wt=_t.context;return Qe.set(wt,"."+xt,wt+"."+Br),Qe.set(wt,"."+Bt,wt+"."+kr),"null"})}else if(Wu in Wa){var Le=Wa[Wu];return zn(Le,function(Ue,Qe){var _t=Ue.invoke(Qe,Le),wt=Ue.shared,Lt=wt.framebuffer,pr=Qe.def(Lt,".getFramebuffer(",_t,")");Qe.set(Lt,".next",pr);var Gr=wt.context;return Qe.set(Gr,"."+xt,pr+"?"+pr+".width:"+Gr+"."+Br),Qe.set(Gr,"."+Bt,pr+"?"+pr+".height:"+Gr+"."+kr),pr})}else return null}function Mo(Wr,na,pa){var Wa=Wr.static,ln=Wr.dynamic;function Le(_t){if(_t in Wa){var wt=Wa[_t],Lt=!0,pr=wt.x|0,Gr=wt.y|0,va,Qa;return"width"in wt?va=wt.width|0:Lt=!1,"height"in wt?Qa=wt.height|0:Lt=!1,new sa(!Lt&&na&&na.thisDep,!Lt&&na&&na.contextDep,!Lt&&na&&na.propDep,function(An,dn){var _n=An.shared.context,Mn=va;"width"in wt||(Mn=dn.def(_n,".",xt,"-",pr));var Bn=Qa;return"height"in wt||(Bn=dn.def(_n,".",Bt,"-",Gr)),[pr,Gr,Mn,Bn]})}else if(_t in ln){var Ga=ln[_t],Ua=zn(Ga,function(An,dn){var _n=An.invoke(dn,Ga),Mn=An.shared.context,Bn=dn.def(_n,".x|0"),Zn=dn.def(_n,".y|0"),Ci=dn.def('"width" in ',_n,"?",_n,".width|0:","(",Mn,".",xt,"-",Bn,")"),qo=dn.def('"height" in ',_n,"?",_n,".height|0:","(",Mn,".",Bt,"-",Zn,")");return[Bn,Zn,Ci,qo]});return na&&(Ua.thisDep=Ua.thisDep||na.thisDep,Ua.contextDep=Ua.contextDep||na.contextDep,Ua.propDep=Ua.propDep||na.propDep),Ua}else return na?new sa(na.thisDep,na.contextDep,na.propDep,function(An,dn){var _n=An.shared.context;return[0,0,dn.def(_n,".",xt),dn.def(_n,".",Bt)]}):null}var Ue=Le(Ks);if(Ue){var Qe=Ue;Ue=new sa(Ue.thisDep,Ue.contextDep,Ue.propDep,function(_t,wt){var Lt=Qe.append(_t,wt),pr=_t.shared.context;return wt.set(pr,"."+zt,Lt[2]),wt.set(pr,"."+Wt,Lt[3]),Lt})}return{viewport:Ue,scissor_box:Le(Pc)}}function zs(Wr,na){var pa=Wr.static,Wa=typeof pa[Qc]=="string"&&typeof pa[wf]=="string";if(Wa){if(Object.keys(na.dynamic).length>0)return null;var ln=na.static,Le=Object.keys(ln);if(Le.length>0&&typeof ln[Le[0]]=="number"){for(var Ue=[],Qe=0;Qe"+Bn+"?"+Lt+".constant["+Bn+"]:0;"}).join(""),"}}else{","if(",va,"(",Lt,".buffer)){",An,"=",Qa,".createStream(",Jr,",",Lt,".buffer);","}else{",An,"=",Qa,".getBuffer(",Lt,".buffer);","}",dn,'="type" in ',Lt,"?",Gr.glTypes,"[",Lt,".type]:",An,".dtype;",Ga.normalized,"=!!",Lt,".normalized;");function _n(Mn){wt(Ga[Mn],"=",Lt,".",Mn,"|0;")}return _n("size"),_n("offset"),_n("stride"),_n("divisor"),wt("}}"),wt.exit("if(",Ga.isStream,"){",Qa,".destroyStream(",An,");","}"),Ga}ln[Le]=zn(Ue,Qe)}),ln}function $o(Wr){var na=Wr.static,pa=Wr.dynamic,Wa={};return Object.keys(na).forEach(function(ln){var Le=na[ln];Wa[ln]=Tn(function(Ue,Qe){return typeof Le=="number"||typeof Le=="boolean"?""+Le:Ue.link(Le)})}),Object.keys(pa).forEach(function(ln){var Le=pa[ln];Wa[ln]=zn(Le,function(Ue,Qe){return Ue.invoke(Qe,Le)})}),Wa}function _s(Wr,na,pa,Wa,ln){var Le=Wr.static,Ue=Wr.dynamic,Qe=zs(Wr,na),_t=ro(Wr,ln),wt=Mo(Wr,_t,ln),Lt=So(Wr,ln),pr=Ws(Wr,ln),Gr=Bs(Wr,ln,Qe);function va(_n){var Mn=wt[_n];Mn&&(pr[_n]=Mn)}va(Ks),va(Pn(Pc));var Qa=Object.keys(pr).length>0,Ga={framebuffer:_t,draw:Lt,shader:Gr,state:pr,dirty:Qa,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=Wi(Wr,ln),Ga.uniforms=Zo(pa,ln),Ga.drawVAO=Ga.scopeVAO=Lt.vao,!Ga.drawVAO&&Gr.program&&!Qe&&Ut.angle_instanced_arrays&&Lt.static.elements){var Ua=!0,An=Gr.program.attributes.map(function(_n){var Mn=na.static[_n];return Ua=Ua&&!!Mn,Mn});if(Ua&&An.length>0){var dn=Cr.getVAO(Cr.createVAO({attributes:An,elements:Lt.static.elements}));Ga.drawVAO=new sa(null,null,null,function(_n,Mn){return _n.link(dn)}),Ga.useVAO=!0}}return Qe?Ga.useVAO=!0:Ga.attributes=es(na,ln),Ga.context=$o(Wa,ln),Ga}function Go(Wr,na,pa){var Wa=Wr.shared,ln=Wa.context,Le=Wr.scope();Object.keys(pa).forEach(function(Ue){na.save(ln,"."+Ue);var Qe=pa[Ue],_t=Qe.append(Wr,na);Array.isArray(_t)?Le(ln,".",Ue,"=[",_t.join(),"];"):Le(ln,".",Ue,"=",_t,";")}),na(Le)}function Ys(Wr,na,pa,Wa){var ln=Wr.shared,Le=ln.gl,Ue=ln.framebuffer,Qe;za&&(Qe=na.def(ln.extensions,".webgl_draw_buffers"));var _t=Wr.constants,wt=_t.drawBuffer,Lt=_t.backBuffer,pr;pa?pr=pa.append(Wr,na):pr=na.def(Ue,".next"),Wa||na("if(",pr,"!==",Ue,".cur){"),na("if(",pr,"){",Le,".bindFramebuffer(",Vr,",",pr,".framebuffer);"),za&&na(Qe,".drawBuffersWEBGL(",wt,"[",pr,".colorAttachments.length]);"),na("}else{",Le,".bindFramebuffer(",Vr,",null);"),za&&na(Qe,".drawBuffersWEBGL(",Lt,");"),na("}",Ue,".cur=",pr,";"),Wa||na("}")}function Ll(Wr,na,pa){var Wa=Wr.shared,ln=Wa.gl,Le=Wr.current,Ue=Wr.next,Qe=Wa.current,_t=Wa.next,wt=Wr.cond(Qe,".dirty");cn.forEach(function(Lt){var pr=Pn(Lt);if(!(pr in pa.state)){var Gr,va;if(pr in Ue){Gr=Ue[pr],va=Le[pr];var Qa=f(Dn[pr].length,function(Ua){return wt.def(Gr,"[",Ua,"]")});wt(Wr.cond(Qa.map(function(Ua,An){return Ua+"!=="+va+"["+An+"]"}).join("||")).then(ln,".",ei[pr],"(",Qa,");",Qa.map(function(Ua,An){return va+"["+An+"]="+Ua}).join(";"),";"))}else{Gr=wt.def(_t,".",pr);var Ga=Wr.cond(Gr,"!==",Qe,".",pr);wt(Ga),pr in sn?Ga(Wr.cond(Gr).then(ln,".enable(",sn[pr],");").else(ln,".disable(",sn[pr],");"),Qe,".",pr,"=",Gr,";"):Ga(ln,".",ei[pr],"(",Gr,");",Qe,".",pr,"=",Gr,";")}}}),Object.keys(pa.state).length===0&&wt(Qe,".dirty=false;"),na(wt)}function mo(Wr,na,pa,Wa){var ln=Wr.shared,Le=Wr.current,Ue=ln.current,Qe=ln.gl,_t;Ma(Object.keys(pa)).forEach(function(wt){var Lt=pa[wt];if(!(Wa&&!Wa(Lt))){var pr=Lt.append(Wr,na);if(sn[wt]){var Gr=sn[wt];hn(Lt)?(_t=Wr.link(pr,{stable:!0}),na(Wr.cond(_t).then(Qe,".enable(",Gr,");").else(Qe,".disable(",Gr,");")),na(Ue,".",wt,"=",_t,";")):(na(Wr.cond(pr).then(Qe,".enable(",Gr,");").else(Qe,".disable(",Gr,");")),na(Ue,".",wt,"=",pr,";"))}else if(zr(pr)){var va=Le[wt];na(Qe,".",ei[wt],"(",pr,");",pr.map(function(Qa,Ga){return va+"["+Ga+"]="+Qa}).join(";"),";")}else hn(Lt)?(_t=Wr.link(pr,{stable:!0}),na(Qe,".",ei[wt],"(",_t,");",Ue,".",wt,"=",_t,";")):na(Qe,".",ei[wt],"(",pr,");",Ue,".",wt,"=",pr,";")}})}function ru(Wr,na){Fa&&(Wr.instancing=na.def(Wr.shared.extensions,".angle_instanced_arrays"))}function Rs(Wr,na,pa,Wa,ln){var Le=Wr.shared,Ue=Wr.stats,Qe=Le.current,_t=Le.timer,wt=pa.profile;function Lt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var pr,Gr;function va(_n){pr=na.def(),_n(pr,"=",Lt(),";"),typeof ln=="string"?_n(Ue,".count+=",ln,";"):_n(Ue,".count++;"),Ra&&(Wa?(Gr=na.def(),_n(Gr,"=",_t,".getNumPendingQueries();")):_n(_t,".beginQuery(",Ue,");"))}function Qa(_n){_n(Ue,".cpuTime+=",Lt(),"-",pr,";"),Ra&&(Wa?_n(_t,".pushScopeStats(",Gr,",",_t,".getNumPendingQueries(),",Ue,");"):_n(_t,".endQuery();"))}function Ga(_n){var Mn=na.def(Qe,".profile");na(Qe,".profile=",_n,";"),na.exit(Qe,".profile=",Mn,";")}var Ua;if(wt){if(hn(wt)){wt.enable?(va(na),Qa(na.exit),Ga("true")):Ga("false");return}Ua=wt.append(Wr,na),Ga(Ua)}else Ua=na.def(Qe,".profile");var An=Wr.block();va(An),na("if(",Ua,"){",An,"}");var dn=Wr.block();Qa(dn),na.exit("if(",Ua,"){",dn,"}")}function Yu(Wr,na,pa,Wa,ln){var Le=Wr.shared;function Ue(_t){switch(_t){case Qo:case jl:case wi:return 2;case vo:case Hs:case sl:return 3;case ys:case Cu:case sc:return 4;default:return 1}}function Qe(_t,wt,Lt){var pr=Le.gl,Gr=na.def(_t,".location"),va=na.def(Le.attributes,"[",Gr,"]"),Qa=Lt.state,Ga=Lt.buffer,Ua=[Lt.x,Lt.y,Lt.z,Lt.w],An=["buffer","normalized","offset","stride"];function dn(){na("if(!",va,".buffer){",pr,".enableVertexAttribArray(",Gr,");}");var Mn=Lt.type,Bn;if(Lt.size?Bn=na.def(Lt.size,"||",wt):Bn=wt,na("if(",va,".type!==",Mn,"||",va,".size!==",Bn,"||",An.map(function(Ci){return va+"."+Ci+"!=="+Lt[Ci]}).join("||"),"){",pr,".bindBuffer(",Jr,",",Ga,".buffer);",pr,".vertexAttribPointer(",[Gr,Bn,Mn,Lt.normalized,Lt.stride,Lt.offset],");",va,".type=",Mn,";",va,".size=",Bn,";",An.map(function(Ci){return va+"."+Ci+"="+Lt[Ci]+";"}).join(""),"}"),Fa){var Zn=Lt.divisor;na("if(",va,".divisor!==",Zn,"){",Wr.instancing,".vertexAttribDivisorANGLE(",[Gr,Zn],");",va,".divisor=",Zn,";}")}}function _n(){na("if(",va,".buffer){",pr,".disableVertexAttribArray(",Gr,");",va,".buffer=null;","}if(",yi.map(function(Mn,Bn){return va+"."+Mn+"!=="+Ua[Bn]}).join("||"),"){",pr,".vertexAttrib4f(",Gr,",",Ua,");",yi.map(function(Mn,Bn){return va+"."+Mn+"="+Ua[Bn]+";"}).join(""),"}")}Qa===ki?dn():Qa===ri?_n():(na("if(",Qa,"===",ki,"){"),dn(),na("}else{"),_n(),na("}"))}Wa.forEach(function(_t){var wt=_t.name,Lt=pa.attributes[wt],pr;if(Lt){if(!ln(Lt))return;pr=Lt.append(Wr,na)}else{if(!ln($n))return;var Gr=Wr.scopeAttrib(wt);pr={},Object.keys(new ma).forEach(function(va){pr[va]=na.def(Gr,".",va)})}Qe(Wr.link(_t),Ue(_t.info.type),pr)})}function Ul(Wr,na,pa,Wa,ln,Le){for(var Ue=Wr.shared,Qe=Ue.gl,_t,wt=0;wt1){for(var As=[],ls=[],Vl=0;Vl>1)",Ga],");")}function Zn(){pa(Ua,".drawArraysInstancedANGLE(",[Gr,va,Qa,Ga],");")}Lt&&Lt!=="null"?dn?Bn():(pa("if(",Lt,"){"),Bn(),pa("}else{"),Zn(),pa("}")):Zn()}function Mn(){function Bn(){pa(Le+".drawElements("+[Gr,Qa,An,va+"<<(("+An+"-"+_i+")>>1)"]+");")}function Zn(){pa(Le+".drawArrays("+[Gr,va,Qa]+");")}Lt&&Lt!=="null"?dn?Bn():(pa("if(",Lt,"){"),Bn(),pa("}else{"),Zn(),pa("}")):Zn()}Fa&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(pa("if(",Ga,">0){"),_n(),pa("}else if(",Ga,"<0){"),Mn(),pa("}")):_n():Mn()}function fo(Wr,na,pa,Wa,ln){var Le=bi(),Ue=Le.proc("body",ln);return Fa&&(Le.instancing=Ue.def(Le.shared.extensions,".angle_instanced_arrays")),Wr(Le,Ue,pa,Wa),Le.compile().body}function Xo(Wr,na,pa,Wa){ru(Wr,na),pa.useVAO?pa.drawVAO?na(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,na),");"):na(Wr.shared.vao,".setVAO(",Wr.shared.vao,".targetVAO);"):(na(Wr.shared.vao,".setVAO(null);"),Yu(Wr,na,pa,Wa.attributes,function(){return!0})),Ul(Wr,na,pa,Wa.uniforms,function(){return!0},!1),ql(Wr,na,na,pa)}function Os(Wr,na){var pa=Wr.proc("draw",1);ru(Wr,pa),Go(Wr,pa,na.context),Ys(Wr,pa,na.framebuffer),Ll(Wr,pa,na),mo(Wr,pa,na.state),Rs(Wr,pa,na,!1,!0);var Wa=na.shader.progVar.append(Wr,pa);if(pa(Wr.shared.gl,".useProgram(",Wa,".program);"),na.shader.program)Xo(Wr,pa,na,na.shader.program);else{pa(Wr.shared.vao,".setVAO(null);");var ln=Wr.global.def("{}"),Le=pa.def(Wa,".id"),Ue=pa.def(ln,"[",Le,"]");pa(Wr.cond(Ue).then(Ue,".call(this,a0);").else(Ue,"=",ln,"[",Le,"]=",Wr.link(function(Qe){return fo(Xo,Wr,na,Qe,1)}),"(",Wa,");",Ue,".call(this,a0);"))}Object.keys(na.state).length>0&&pa(Wr.shared.current,".dirty=true;"),Wr.shared.vao&&pa(Wr.shared.vao,".setVAO(null);")}function ra(Wr,na,pa,Wa){Wr.batchId="a1",ru(Wr,na);function ln(){return!0}Yu(Wr,na,pa,Wa.attributes,ln),Ul(Wr,na,pa,Wa.uniforms,ln,!1),ql(Wr,na,na,pa)}function Ya(Wr,na,pa,Wa){ru(Wr,na);var ln=pa.contextDep,Le=na.def(),Ue="a0",Qe="a1",_t=na.def();Wr.shared.props=_t,Wr.batchId=Le;var wt=Wr.scope(),Lt=Wr.scope();na(wt.entry,"for(",Le,"=0;",Le,"<",Qe,";++",Le,"){",_t,"=",Ue,"[",Le,"];",Lt,"}",wt.exit);function pr(An){return An.contextDep&&ln||An.propDep}function Gr(An){return!pr(An)}if(pa.needsContext&&Go(Wr,Lt,pa.context),pa.needsFramebuffer&&Ys(Wr,Lt,pa.framebuffer),mo(Wr,Lt,pa.state,pr),pa.profile&&pr(pa.profile)&&Rs(Wr,Lt,pa,!1,!0),Wa)pa.useVAO?pa.drawVAO?pr(pa.drawVAO)?Lt(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,Lt),");"):wt(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,wt),");"):wt(Wr.shared.vao,".setVAO(",Wr.shared.vao,".targetVAO);"):(wt(Wr.shared.vao,".setVAO(null);"),Yu(Wr,wt,pa,Wa.attributes,Gr),Yu(Wr,Lt,pa,Wa.attributes,pr)),Ul(Wr,wt,pa,Wa.uniforms,Gr,!1),Ul(Wr,Lt,pa,Wa.uniforms,pr,!0),ql(Wr,wt,Lt,pa);else{var va=Wr.global.def("{}"),Qa=pa.shader.progVar.append(Wr,Lt),Ga=Lt.def(Qa,".id"),Ua=Lt.def(va,"[",Ga,"]");Lt(Wr.shared.gl,".useProgram(",Qa,".program);","if(!",Ua,"){",Ua,"=",va,"[",Ga,"]=",Wr.link(function(An){return fo(ra,Wr,pa,An,2)}),"(",Qa,");}",Ua,".call(this,a0[",Le,"],",Le,");")}}function Ka(Wr,na){var pa=Wr.proc("batch",2);Wr.batchId="0",ru(Wr,pa);var Wa=!1,ln=!0;Object.keys(na.context).forEach(function(va){Wa=Wa||na.context[va].propDep}),Wa||(Go(Wr,pa,na.context),ln=!1);var Le=na.framebuffer,Ue=!1;Le?(Le.propDep?Wa=Ue=!0:Le.contextDep&&Wa&&(Ue=!0),Ue||Ys(Wr,pa,Le)):Ys(Wr,pa,null),na.state.viewport&&na.state.viewport.propDep&&(Wa=!0);function Qe(va){return va.contextDep&&Wa||va.propDep}Ll(Wr,pa,na),mo(Wr,pa,na.state,function(va){return!Qe(va)}),(!na.profile||!Qe(na.profile))&&Rs(Wr,pa,na,!1,"a1"),na.contextDep=Wa,na.needsContext=ln,na.needsFramebuffer=Ue;var _t=na.shader.progVar;if(_t.contextDep&&Wa||_t.propDep)Ya(Wr,pa,na,null);else{var wt=_t.append(Wr,pa);if(pa(Wr.shared.gl,".useProgram(",wt,".program);"),na.shader.program)Ya(Wr,pa,na,na.shader.program);else{pa(Wr.shared.vao,".setVAO(null);");var Lt=Wr.global.def("{}"),pr=pa.def(wt,".id"),Gr=pa.def(Lt,"[",pr,"]");pa(Wr.cond(Gr).then(Gr,".call(this,a0,a1);").else(Gr,"=",Lt,"[",pr,"]=",Wr.link(function(va){return fo(Ya,Wr,na,va,2)}),"(",wt,");",Gr,".call(this,a0,a1);"))}}Object.keys(na.state).length>0&&pa(Wr.shared.current,".dirty=true;"),Wr.shared.vao&&pa(Wr.shared.vao,".setVAO(null);")}function Bi(Wr,na){var pa=Wr.proc("scope",3);Wr.batchId="a2";var Wa=Wr.shared,ln=Wa.current;if(Go(Wr,pa,na.context),na.framebuffer&&na.framebuffer.append(Wr,pa),Ma(Object.keys(na.state)).forEach(function(Qe){var _t=na.state[Qe],wt=_t.append(Wr,pa);zr(wt)?wt.forEach(function(Lt,pr){Jn(Lt)?pa.set(Wr.next[Qe],"["+pr+"]",Lt):pa.set(Wr.next[Qe],"["+pr+"]",Wr.link(Lt,{stable:!0}))}):hn(_t)?pa.set(Wa.next,"."+Qe,Wr.link(wt,{stable:!0})):pa.set(Wa.next,"."+Qe,wt)}),Rs(Wr,pa,na,!0,!0),[ku,fi,Nl,eu,Ol].forEach(function(Qe){var _t=na.draw[Qe];if(_t){var wt=_t.append(Wr,pa);Jn(wt)?pa.set(Wa.draw,"."+Qe,wt):pa.set(Wa.draw,"."+Qe,Wr.link(wt),{stable:!0})}}),Object.keys(na.uniforms).forEach(function(Qe){var _t=na.uniforms[Qe].append(Wr,pa);Array.isArray(_t)&&(_t="["+_t.map(function(wt){return Jn(wt)?wt:Wr.link(wt,{stable:!0})})+"]"),pa.set(Wa.uniforms,"["+Wr.link(It.id(Qe),{stable:!0})+"]",_t)}),Object.keys(na.attributes).forEach(function(Qe){var _t=na.attributes[Qe].append(Wr,pa),wt=Wr.scopeAttrib(Qe);Object.keys(new ma).forEach(function(Lt){pa.set(wt,"."+Lt,_t[Lt])})}),na.scopeVAO){var Le=na.scopeVAO.append(Wr,pa);Jn(Le)?pa.set(Wa.vao,".targetVAO",Le):pa.set(Wa.vao,".targetVAO",Wr.link(Le,{stable:!0}))}function Ue(Qe){var _t=na.shader[Qe];if(_t){var wt=_t.append(Wr,pa);Jn(wt)?pa.set(Wa.shader,"."+Qe,wt):pa.set(Wa.shader,"."+Qe,Wr.link(wt,{stable:!0}))}}Ue(wf),Ue(Qc),Object.keys(na.state).length>0&&(pa(ln,".dirty=true;"),pa.exit(ln,".dirty=true;")),pa("a1(",Wr.shared.context,",a0,",Wr.batchId,");")}function rs(Wr){if(!(typeof Wr!="object"||zr(Wr))){for(var na=Object.keys(Wr),pa=0;pa=0;--fo){var Xo=Ei[fo];Xo&&Xo(ua,null,0)}Ut.flush(),ta&&ta.update()}function Mo(){!Wi&&Ei.length>0&&(Wi=m.next(ro))}function zs(){Wi&&(m.cancel(ro),Wi=null)}function Bs(fo){fo.preventDefault(),dr=!0,zs(),so.forEach(function(Xo){Xo()})}function So(fo){Ut.getError(),dr=!1,Ar.restore(),ui.restore(),Fa.restore(),cn.restore(),sn.restore(),ei.restore(),kn.restore(),ta&&ta.restore(),Pn.procs.refresh(),Mo(),ti.forEach(function(Xo){Xo()})}Jn&&(Jn.addEventListener(je,Bs,!1),Jn.addEventListener(Ze,So,!1));function Ws(){Ei.length=0,zs(),Jn&&(Jn.removeEventListener(je,Bs),Jn.removeEventListener(Ze,So)),ui.clear(),ei.clear(),sn.clear(),kn.clear(),cn.clear(),za.clear(),Fa.clear(),ta&&ta.clear(),bi.forEach(function(fo){fo()})}function Zo(fo){function Xo(Le){var Ue=p({},Le);delete Ue.uniforms,delete Ue.attributes,delete Ue.context,delete Ue.vao,"stencil"in Ue&&Ue.stencil.op&&(Ue.stencil.opBack=Ue.stencil.opFront=Ue.stencil.op,delete Ue.stencil.op);function Qe(_t){if(_t in Ue){var wt=Ue[_t];delete Ue[_t],Object.keys(wt).forEach(function(Lt){Ue[_t+"."+Lt]=wt[Lt]})}}return Qe("blend"),Qe("depth"),Qe("cull"),Qe("stencil"),Qe("polygonOffset"),Qe("scissor"),Qe("sample"),"vao"in Le&&(Ue.vao=Le.vao),Ue}function Os(Le,Ue){var Qe={},_t={};return Object.keys(Le).forEach(function(wt){var Lt=Le[wt];if(c.isDynamic(Lt)){_t[wt]=c.unbox(Lt,wt);return}else if(Ue&&Array.isArray(Lt)){for(var pr=0;pr0)return Wr.call(this,Wa(Le|0),Le|0)}else if(Array.isArray(Le)){if(Le.length)return Wr.call(this,Le,Le.length)}else return Oi.call(this,Le)}return p(ln,{stats:rs,destroy:function(){Is.destroy()}})}var es=ei.setFBO=Zo({framebuffer:c.define.call(null,ut,"framebuffer")});function $o(fo,Xo){var Os=0;Pn.procs.poll();var ra=Xo.color;ra&&(Ut.clearColor(+ra[0]||0,+ra[1]||0,+ra[2]||0,+ra[3]||0),Os|=ie),"depth"in Xo&&(Ut.clearDepth(+Xo.depth),Os|=fe),"stencil"in Xo&&(Ut.clearStencil(Xo.stencil|0),Os|=be),Ut.clear(Os)}function _s(fo){if("framebuffer"in fo)if(fo.framebuffer&&fo.framebuffer_reglType==="framebufferCube")for(var Xo=0;Xo<6;++Xo)es(p({framebuffer:fo.framebuffer.faces[Xo]},fo),$o);else es(fo,$o);else $o(null,fo)}function Go(fo){Ei.push(fo);function Xo(){var Os=Gt(Ei,fo);function ra(){var Ya=Gt(Ei,ra);Ei[Ya]=Ei[Ei.length-1],Ei.length-=1,Ei.length<=0&&zs()}Ei[Os]=ra}return Mo(),{cancel:Xo}}function Ys(){var fo=In.viewport,Xo=In.scissor_box;fo[0]=fo[1]=Xo[0]=Xo[1]=0,ua.viewportWidth=ua.framebufferWidth=ua.drawingBufferWidth=fo[2]=Xo[2]=Ut.drawingBufferWidth,ua.viewportHeight=ua.framebufferHeight=ua.drawingBufferHeight=fo[3]=Xo[3]=Ut.drawingBufferHeight}function Ll(){ua.tick+=1,ua.time=ru(),Ys(),Pn.procs.poll()}function mo(){cn.refresh(),Ys(),Pn.procs.refresh(),ta&&ta.update()}function ru(){return(h()-ka)/1e3}mo();function Rs(fo,Xo){var Os;switch(fo){case"frame":return Go(Xo);case"lost":Os=so;break;case"restore":Os=ti;break;case"destroy":Os=bi;break;default:}return Os.push(Xo),{cancel:function(){for(var ra=0;ra=0},read:Rn,destroy:Ws,_gl:Ut,_refresh:mo,poll:function(){Ll(),ta&&ta.update()},now:ru,stats:vr,getCachedCode:Yu,preloadCachedCode:Ul});return It.onDone(null,ql),ql}return Kt})}}),lq=ze({"node_modules/gl-util/context.js"(J,V){"use strict";var p=qd();V.exports=function(n){if(n?typeof n=="string"&&(n={container:n}):n={},E(n)?n={container:n}:k(n)?n={container:n}:l(n)?n={gl:n}:n=p(n,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),n.pixelRatio||(n.pixelRatio=window.pixelRatio||1),n.gl)return n.gl;if(n.canvas&&(n.container=n.canvas.parentNode),n.container){if(typeof n.container=="string"){var r=document.querySelector(n.container);if(!r)throw Error("Element "+n.container+" is not found");n.container=r}E(n.container)?(n.canvas=n.container,n.container=n.canvas.parentNode):n.canvas||(n.canvas=e(),n.container.appendChild(n.canvas),b(n))}else if(!n.canvas)if(typeof document<"u")n.container=document.body||document.documentElement,n.canvas=e(),n.container.appendChild(n.canvas),b(n);else throw Error("Not DOM environment. Use headless-gl.");return n.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(a){try{n.gl=n.canvas.getContext(a,n.attrs)}catch{}return n.gl}),n.gl};function b(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*window.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*window.innerHeight);else{var n=t.container.getBoundingClientRect();t.canvas.width=t.width||n.right-n.left,t.canvas.height=t.height||n.bottom-n.top}}function E(t){return typeof t.getContext=="function"&&"width"in t&&"height"in t}function k(t){return typeof t.nodeName=="string"&&typeof t.appendChild=="function"&&typeof t.getBoundingClientRect=="function"}function l(t){return typeof t.drawArrays=="function"||typeof t.drawElements=="function"}function e(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}}}),uq=ze({"node_modules/font-atlas/index.js"(J,V){"use strict";var p=dM(),b=[32,126];V.exports=E;function E(k){k=k||{};var l=k.shape?k.shape:k.canvas?[k.canvas.width,k.canvas.height]:[512,512],e=k.canvas||document.createElement("canvas"),t=k.font,n=typeof k.step=="number"?[k.step,k.step]:k.step||[32,32],r=k.chars||b;if(t&&typeof t!="string"&&(t=p(t)),!Array.isArray(r))r=String(r).split("");else if(r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"){for(var a=[],o=r[0],s=0;o<=r[1];o++)a[s++]=String.fromCharCode(o);r=a}l=l.slice(),e.width=l[0],e.height=l[1];var c=e.getContext("2d");c.fillStyle="#000",c.fillRect(0,0,e.width,e.height),c.font=t,c.textAlign="center",c.textBaseline="middle",c.fillStyle="#fff";for(var m=n[0]/2,h=n[1]/2,o=0;ol[0]-n[0]/2&&(m=n[0]/2,h+=n[1]);return e}}}),vM=ze({"node_modules/bit-twiddle/twiddle.js"(J){"use strict";"use restrict";var V=32;J.INT_BITS=V,J.INT_MAX=2147483647,J.INT_MIN=-1<0)-(E<0)},J.abs=function(E){var k=E>>V-1;return(E^k)-k},J.min=function(E,k){return k^(E^k)&-(E65535)<<4,E>>>=k,l=(E>255)<<3,E>>>=l,k|=l,l=(E>15)<<2,E>>>=l,k|=l,l=(E>3)<<1,E>>>=l,k|=l,k|E>>1},J.log10=function(E){return E>=1e9?9:E>=1e8?8:E>=1e7?7:E>=1e6?6:E>=1e5?5:E>=1e4?4:E>=1e3?3:E>=100?2:E>=10?1:0},J.popCount=function(E){return E=E-(E>>>1&1431655765),E=(E&858993459)+(E>>>2&858993459),(E+(E>>>4)&252645135)*16843009>>>24};function p(E){var k=32;return E&=-E,E&&k--,E&65535&&(k-=16),E&16711935&&(k-=8),E&252645135&&(k-=4),E&858993459&&(k-=2),E&1431655765&&(k-=1),k}J.countTrailingZeros=p,J.nextPow2=function(E){return E+=E===0,--E,E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E+1},J.prevPow2=function(E){return E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E-(E>>>1)},J.parity=function(E){return E^=E>>>16,E^=E>>>8,E^=E>>>4,E&=15,27030>>>E&1};var b=new Array(256);(function(E){for(var k=0;k<256;++k){var l=k,e=k,t=7;for(l>>>=1;l;l>>>=1)e<<=1,e|=l&1,--t;E[k]=e<>>8&255]<<16|b[E>>>16&255]<<8|b[E>>>24&255]},J.interleave2=function(E,k){return E&=65535,E=(E|E<<8)&16711935,E=(E|E<<4)&252645135,E=(E|E<<2)&858993459,E=(E|E<<1)&1431655765,k&=65535,k=(k|k<<8)&16711935,k=(k|k<<4)&252645135,k=(k|k<<2)&858993459,k=(k|k<<1)&1431655765,E|k<<1},J.deinterleave2=function(E,k){return E=E>>>k&1431655765,E=(E|E>>>1)&858993459,E=(E|E>>>2)&252645135,E=(E|E>>>4)&16711935,E=(E|E>>>16)&65535,E<<16>>16},J.interleave3=function(E,k,l){return E&=1023,E=(E|E<<16)&4278190335,E=(E|E<<8)&251719695,E=(E|E<<4)&3272356035,E=(E|E<<2)&1227133513,k&=1023,k=(k|k<<16)&4278190335,k=(k|k<<8)&251719695,k=(k|k<<4)&3272356035,k=(k|k<<2)&1227133513,E|=k<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,E|l<<2},J.deinterleave3=function(E,k){return E=E>>>k&1227133513,E=(E|E>>>2)&3272356035,E=(E|E>>>4)&251719695,E=(E|E>>>8)&4278190335,E=(E|E>>>16)&1023,E<<22>>22},J.nextCombination=function(E){var k=E|E-1;return k+1|(~k&-~k)-1>>>p(E)+1}}}),cq=ze({"node_modules/dup/dup.js"(J,V){"use strict";function p(k,l,e){var t=k[e]|0;if(t<=0)return[];var n=new Array(t),r;if(e===k.length-1)for(r=0;r"u"&&(l=0),typeof k){case"number":if(k>0)return b(k|0,l);break;case"object":if(typeof k.length=="number")return p(k,l,0);break}return[]}V.exports=E}}),fq=ze({"node_modules/typedarray-pool/pool.js"(J){"use strict";var V=vM(),p=cq(),b=$v().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:p([32,0]),UINT16:p([32,0]),UINT32:p([32,0]),BIGUINT64:p([32,0]),INT8:p([32,0]),INT16:p([32,0]),INT32:p([32,0]),BIGINT64:p([32,0]),FLOAT:p([32,0]),DOUBLE:p([32,0]),DATA:p([32,0]),UINT8C:p([32,0]),BUFFER:p([32,0])});var E=typeof Uint8ClampedArray<"u",k=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=p([32,0])),e.BIGUINT64||(e.BIGUINT64=p([32,0])),e.BIGINT64||(e.BIGINT64=p([32,0])),e.BUFFER||(e.BUFFER=p([32,0]));var t=e.DATA,n=e.BUFFER;J.free=function(u){if(b.isBuffer(u))n[V.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var A=u.length||u.byteLength,x=V.log2(A)|0;t[x].push(u)}};function r(f){if(f){var u=f.length||f.byteLength,A=V.log2(u);t[A].push(f)}}function a(f){r(f.buffer)}J.freeUint8=J.freeUint16=J.freeUint32=J.freeBigUint64=J.freeInt8=J.freeInt16=J.freeInt32=J.freeBigInt64=J.freeFloat32=J.freeFloat=J.freeFloat64=J.freeDouble=J.freeUint8Clamped=J.freeDataView=a,J.freeArrayBuffer=r,J.freeBuffer=function(u){n[V.log2(u.length)].push(u)},J.malloc=function(u,A){if(A===void 0||A==="arraybuffer")return o(u);switch(A){case"uint8":return s(u);case"uint16":return c(u);case"uint32":return m(u);case"int8":return h(u);case"int16":return v(u);case"int32":return g(u);case"float":case"float32":return i(u);case"double":case"float64":return w(u);case"uint8_clamped":return S(u);case"bigint64":return C(u);case"biguint64":return M(u);case"buffer":return T(u);case"data":case"dataview":return _(u);default:return null}return null};function o(u){var u=V.nextPow2(u),A=V.log2(u),x=t[A];return x.length>0?x.pop():new ArrayBuffer(u)}J.mallocArrayBuffer=o;function s(f){return new Uint8Array(o(f),0,f)}J.mallocUint8=s;function c(f){return new Uint16Array(o(2*f),0,f)}J.mallocUint16=c;function m(f){return new Uint32Array(o(4*f),0,f)}J.mallocUint32=m;function h(f){return new Int8Array(o(f),0,f)}J.mallocInt8=h;function v(f){return new Int16Array(o(2*f),0,f)}J.mallocInt16=v;function g(f){return new Int32Array(o(4*f),0,f)}J.mallocInt32=g;function i(f){return new Float32Array(o(4*f),0,f)}J.mallocFloat32=J.mallocFloat=i;function w(f){return new Float64Array(o(8*f),0,f)}J.mallocFloat64=J.mallocDouble=w;function S(f){return E?new Uint8ClampedArray(o(f),0,f):s(f)}J.mallocUint8Clamped=S;function M(f){return k?new BigUint64Array(o(8*f),0,f):null}J.mallocBigUint64=M;function C(f){return l?new BigInt64Array(o(8*f),0,f):null}J.mallocBigInt64=C;function _(f){return new DataView(o(f),0,f)}J.mallocDataView=_;function T(f){f=V.nextPow2(f);var u=V.log2(f),A=n[u];return A.length>0?A.pop():new b(f)}J.mallocBuffer=T,J.clearCache=function(){for(var u=0;u<32;++u)e.UINT8[u].length=0,e.UINT16[u].length=0,e.UINT32[u].length=0,e.INT8[u].length=0,e.INT16[u].length=0,e.INT32[u].length=0,e.FLOAT[u].length=0,e.DOUBLE[u].length=0,e.BIGUINT64[u].length=0,e.BIGINT64[u].length=0,e.UINT8C[u].length=0,t[u].length=0,n[u].length=0}}}),hq=ze({"node_modules/is-plain-obj/index.js"(J,V){"use strict";var p=Object.prototype.toString;V.exports=function(b){var E;return p.call(b)==="[object Object]"&&(E=Object.getPrototypeOf(b),E===null||E===Object.getPrototypeOf({}))}}}),mM=ze({"node_modules/parse-unit/index.js"(J,V){V.exports=function(b,E){E||(E=[0,""]),b=String(b);var k=parseFloat(b,10);return E[0]=k,E[1]=b.match(/[\d.\-\+]*\s*(.*)/)[1]||"",E}}}),dq=ze({"node_modules/gl-text/node_modules/to-px/topx.js"(J,V){"use strict";var p=mM();V.exports=l;var b=96;function E(e,t){var n=p(getComputedStyle(e).getPropertyValue(t));return n[0]*l(n[1],e)}function k(e,t){var n=document.createElement("div");n.style["font-size"]="128"+e,t.appendChild(n);var r=E(n,"font-size")/128;return t.removeChild(n),r}function l(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return k(e,t);case"em":return E(t,"font-size");case"rem":return E(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return b;case"cm":return b/2.54;case"mm":return b/25.4;case"pt":return b/72;case"pc":return b/6}return 1}}}),pq=ze({"node_modules/detect-kerning/index.js"(J,V){"use strict";V.exports=k;var p=k.canvas=document.createElement("canvas"),b=p.getContext("2d"),E=l([32,126]);k.createPairs=l,k.ascii=E;function k(e,t){Array.isArray(e)&&(e=e.join(", "));var n={},r,a=16,o=.05;t&&(t.length===2&&typeof t[0]=="number"?r=l(t):Array.isArray(t)?r=t:(t.o?r=l(t.o):t.pairs&&(r=t.pairs),t.fontSize&&(a=t.fontSize),t.threshold!=null&&(o=t.threshold))),r||(r=E),b.font=a+"px "+e;for(var s=0;sa*o){var v=(h-m)/a;n[c]=v*1e3}}return n}function l(e){for(var t=[],n=e[0];n<=e[1];n++)for(var r=String.fromCharCode(n),a=e[0];a0;n-=4)if(t[n]!==0)return Math.floor((n-3)*.25/e)}}}),mq=ze({"node_modules/gl-text/dist.js"(J,V){"use strict";var p=sq(),b=qd(),E=pM(),k=lq(),l=iM(),e=ay(),t=uq(),n=fq(),r=yg(),a=hq(),o=mM(),s=dq(),c=pq(),m=Vc(),h=vq(),v=f0(),g=vM(),i=g.nextPow2,w=new l,S=!1;document.body&&(M=document.body.appendChild(document.createElement("div")),M.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(M).fontStretch&&(S=!0),document.body.removeChild(M));var M,C=function(f){_(f)?(f={regl:f},this.gl=f.regl._gl):this.gl=k(f),this.shader=w.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=f.regl||E({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),w.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(a(f)?f:{})};C.prototype.createShader=function(){var f=this.regl,u=f({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:f.prop("count"),offset:f.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:f.this("sizeBuffer")},width:{offset:0,stride:8,buffer:f.this("sizeBuffer")},char:f.this("charBuffer"),position:f.this("position")},uniforms:{atlasSize:function(x,z){return[z.atlas.width,z.atlas.height]},atlasDim:function(x,z){return[z.atlas.cols,z.atlas.rows]},atlas:function(x,z){return z.atlas.texture},charStep:function(x,z){return z.atlas.step},em:function(x,z){return z.atlas.em},color:f.prop("color"),opacity:f.prop("opacity"),viewport:f.this("viewportArray"),scale:f.this("scale"),align:f.prop("align"),baseline:f.prop("baseline"),translate:f.this("translate"),positionOffset:f.prop("positionOffset")},primitive:"points",viewport:f.this("viewport"),vert:` +`),ma;if(It&&(ma=bh(ia),It[ma]))return It[ma].apply(null,dr);var da=Function.apply(null,ir.concat(ia));return It&&(It[ma]=da),da.apply(null,dr)}return{global:ta,link:hr,block:vr,proc:Ta,scope:Or,cond:Cr,compile:Ra}}var yi="xyzw".split(""),_i=5121,ki=1,ri=2,En=0,Ln=1,Ni=2,$i=3,Co=4,Do=5,Fo=6,Yo="dither",bo="blend.enable",Gs="blend.color",Es="blend.equation",ns="blend.func",Kn="depth.enable",zo="depth.func",gs="depth.range",js="depth.mask",Cl="colorMask",zl="cull.enable",Kl="cull.face",Gu="frontFace",xl="lineWidth",Hu="polygonOffset.enable",Su="polygonOffset.offset",mc="sample.alpha",Jc="sample.enable",oc="sample.coverage",du="stencil.enable",Jl="stencil.mask",Ql="stencil.func",Eu="stencil.opFront",bf="stencil.opBack",lh="scissor.enable",Pc="scissor.box",Ks="viewport",Bl="profile",Wu="framebuffer",wf="vert",Qc="frag",ku="elements",Ol="primitive",Nl="count",fi="offset",eu="instances",$e="vao",nt="Width",mt="Height",xt=Wu+nt,Bt=Wu+mt,zt=Ks+nt,Wt=Ks+mt,Pr="drawingBuffer",Br=Pr+nt,kr=Pr+mt,jr=[ns,Es,Ql,Eu,bf,oc,Ks,Pc,Su],Jr=34962,la=34963,xa=2884,Ba=3042,an=3024,wn=2960,ii=2929,Si=3089,oi=32823,Ji=32926,Qi=32928,Oo=5126,Qo=35664,vo=35665,ys=35666,ol=5124,jl=35667,Hs=35668,Cu=35669,hi=35670,wi=35671,sl=35672,sc=35673,tu=35674,Ps=35675,gc=35676,pu=35678,ll=35680,ef=4,de=1028,Ee=1029,Ve=2304,tt=2305,at=32775,ct=32776,Nt=519,St=7680,Jt=0,mr=1,gr=32774,Hr=513,Vr=36160,ca=36064,Aa={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Yr={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},oa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},fa={cw:Ve,ccw:tt};function Ea(st){return Array.isArray(st)||Xt(st)||or(st)}function Ma(st){return st.sort(function(It,Ut){return It===Ks?-1:Ut===Ks?1:It=1,ir>=2,It)}else if(Ut===Co){var dr=st.data;return new sa(dr.thisDep,dr.contextDep,dr.propDep,It)}else{if(Ut===Do)return new sa(!1,!1,!1,It);if(Ut===Fo){for(var Ar=!1,hr=!1,vr=!1,Or=0;Or=1&&(hr=!0),ta>=2&&(vr=!0)}else Cr.type===Co&&(Ar=Ar||Cr.data.thisDep,hr=hr||Cr.data.contextDep,vr=vr||Cr.data.propDep)}return new sa(Ar,hr,vr,It)}else return new sa(Ut===$i,Ut===Ni,Ut===Ln,It)}}var $n=new sa(!1,!1,!1,function(){});function xi(st,It,Ut,ir,dr,Ar,hr,vr,Or,Cr,ta,ka,Ta,Ra,ua,ia){var ma=Cr.Record,da={add:32774,subtract:32778,"reverse subtract":32779};Ut.ext_blend_minmax&&(da.min=at,da.max=ct);var Fa=Ut.angle_instanced_arrays,za=Ut.webgl_draw_buffers,kn=Ut.oes_vertex_array_object,Dn={dirty:!0,profile:ia.profile},ui={},cn=[],sn={},ei={};function Pn(Wr){return Wr.replace(".","_")}function Rn(Wr,na,pa){var Wa=Pn(Wr);cn.push(Wr),ui[Wa]=Dn[Wa]=!!pa,sn[Wa]=na}function In(Wr,na,pa){var Wa=Pn(Wr);cn.push(Wr),Array.isArray(pa)?(Dn[Wa]=pa.slice(),ui[Wa]=pa.slice()):Dn[Wa]=ui[Wa]=pa,ei[Wa]=na}function Jn(Wr){return!!isNaN(Wr)}Rn(Yo,an),Rn(bo,Ba),In(Gs,"blendColor",[0,0,0,0]),In(Es,"blendEquationSeparate",[gr,gr]),In(ns,"blendFuncSeparate",[mr,Jt,mr,Jt]),Rn(Kn,ii,!0),In(zo,"depthFunc",Hr),In(gs,"depthRange",[0,1]),In(js,"depthMask",!0),In(Cl,Cl,[!0,!0,!0,!0]),Rn(zl,xa),In(Kl,"cullFace",Ee),In(Gu,Gu,tt),In(xl,xl,1),Rn(Hu,oi),In(Su,"polygonOffset",[0,0]),Rn(mc,Ji),Rn(Jc,Qi),In(oc,"sampleCoverage",[1,!1]),Rn(du,wn),In(Jl,"stencilMask",-1),In(Ql,"stencilFunc",[Nt,0,-1]),In(Eu,"stencilOpSeparate",[de,St,St,St]),In(bf,"stencilOpSeparate",[Ee,St,St,St]),Rn(lh,Si),In(Pc,"scissor",[0,0,st.drawingBufferWidth,st.drawingBufferHeight]),In(Ks,Ks,[0,0,st.drawingBufferWidth,st.drawingBufferHeight]);var Ei={gl:st,context:Ta,strings:It,next:ui,current:Dn,draw:ka,elements:Ar,buffer:dr,shader:ta,attributes:Cr.state,vao:Cr,uniforms:Or,framebuffer:vr,extensions:Ut,timer:Ra,isBufferArgs:Ea},so={primTypes:en,compareFuncs:Yr,blendFuncs:Aa,blendEquations:da,stencilOps:oa,glTypes:Kr,orientationType:fa};za&&(so.backBuffer=[Ee],so.drawBuffer=h(ir.maxDrawbuffers,function(Wr){return Wr===0?[0]:h(Wr,function(na){return ca+na})}));var ti=0;function bi(){var Wr=Sn({cache:ua}),na=Wr.link,pa=Wr.global;Wr.id=ti++,Wr.batchId="0";var Wa=na(Ei),ln=Wr.shared={props:"a0"};Object.keys(Ei).forEach(function(wt){ln[wt]=pa.def(Wa,".",wt)});var Le=Wr.next={},Ue=Wr.current={};Object.keys(ei).forEach(function(wt){Array.isArray(Dn[wt])&&(Le[wt]=pa.def(ln.next,".",wt),Ue[wt]=pa.def(ln.current,".",wt))});var Qe=Wr.constants={};Object.keys(so).forEach(function(wt){Qe[wt]=pa.def(JSON.stringify(so[wt]))}),Wr.invoke=function(wt,Lt){switch(Lt.type){case En:var pr=["this",ln.context,ln.props,Wr.batchId];return wt.def(na(Lt.data),".call(",pr.slice(0,Math.max(Lt.data.length+1,4)),")");case Ln:return wt.def(ln.props,Lt.data);case Ni:return wt.def(ln.context,Lt.data);case $i:return wt.def("this",Lt.data);case Co:return Lt.data.append(Wr,wt),Lt.data.ref;case Do:return Lt.data.toString();case Fo:return Lt.data.map(function(Gr){return Wr.invoke(wt,Gr)})}},Wr.attribCache={};var _t={};return Wr.scopeAttrib=function(wt){var Lt=It.id(wt);if(Lt in _t)return _t[Lt];var pr=Cr.scope[Lt];pr||(pr=Cr.scope[Lt]=new ma);var Gr=_t[Lt]=na(pr);return Gr},Wr}function Wi(Wr){var na=Wr.static,pa=Wr.dynamic,Wa;if(Bl in na){var ln=!!na[Bl];Wa=Tn(function(Ue,Qe){return ln}),Wa.enable=ln}else if(Bl in pa){var Le=pa[Bl];Wa=zn(Le,function(Ue,Qe){return Ue.invoke(Qe,Le)})}return Wa}function ro(Wr,na){var pa=Wr.static,Wa=Wr.dynamic;if(Wu in pa){var ln=pa[Wu];return ln?(ln=vr.getFramebuffer(ln),Tn(function(Ue,Qe){var _t=Ue.link(ln),wt=Ue.shared;Qe.set(wt.framebuffer,".next",_t);var Lt=wt.context;return Qe.set(Lt,"."+xt,_t+".width"),Qe.set(Lt,"."+Bt,_t+".height"),_t})):Tn(function(Ue,Qe){var _t=Ue.shared;Qe.set(_t.framebuffer,".next","null");var wt=_t.context;return Qe.set(wt,"."+xt,wt+"."+Br),Qe.set(wt,"."+Bt,wt+"."+kr),"null"})}else if(Wu in Wa){var Le=Wa[Wu];return zn(Le,function(Ue,Qe){var _t=Ue.invoke(Qe,Le),wt=Ue.shared,Lt=wt.framebuffer,pr=Qe.def(Lt,".getFramebuffer(",_t,")");Qe.set(Lt,".next",pr);var Gr=wt.context;return Qe.set(Gr,"."+xt,pr+"?"+pr+".width:"+Gr+"."+Br),Qe.set(Gr,"."+Bt,pr+"?"+pr+".height:"+Gr+"."+kr),pr})}else return null}function Mo(Wr,na,pa){var Wa=Wr.static,ln=Wr.dynamic;function Le(_t){if(_t in Wa){var wt=Wa[_t],Lt=!0,pr=wt.x|0,Gr=wt.y|0,va,Qa;return"width"in wt?va=wt.width|0:Lt=!1,"height"in wt?Qa=wt.height|0:Lt=!1,new sa(!Lt&&na&&na.thisDep,!Lt&&na&&na.contextDep,!Lt&&na&&na.propDep,function(An,dn){var _n=An.shared.context,Mn=va;"width"in wt||(Mn=dn.def(_n,".",xt,"-",pr));var Bn=Qa;return"height"in wt||(Bn=dn.def(_n,".",Bt,"-",Gr)),[pr,Gr,Mn,Bn]})}else if(_t in ln){var Ga=ln[_t],Ua=zn(Ga,function(An,dn){var _n=An.invoke(dn,Ga),Mn=An.shared.context,Bn=dn.def(_n,".x|0"),Zn=dn.def(_n,".y|0"),Ci=dn.def('"width" in ',_n,"?",_n,".width|0:","(",Mn,".",xt,"-",Bn,")"),qo=dn.def('"height" in ',_n,"?",_n,".height|0:","(",Mn,".",Bt,"-",Zn,")");return[Bn,Zn,Ci,qo]});return na&&(Ua.thisDep=Ua.thisDep||na.thisDep,Ua.contextDep=Ua.contextDep||na.contextDep,Ua.propDep=Ua.propDep||na.propDep),Ua}else return na?new sa(na.thisDep,na.contextDep,na.propDep,function(An,dn){var _n=An.shared.context;return[0,0,dn.def(_n,".",xt),dn.def(_n,".",Bt)]}):null}var Ue=Le(Ks);if(Ue){var Qe=Ue;Ue=new sa(Ue.thisDep,Ue.contextDep,Ue.propDep,function(_t,wt){var Lt=Qe.append(_t,wt),pr=_t.shared.context;return wt.set(pr,"."+zt,Lt[2]),wt.set(pr,"."+Wt,Lt[3]),Lt})}return{viewport:Ue,scissor_box:Le(Pc)}}function zs(Wr,na){var pa=Wr.static,Wa=typeof pa[Qc]=="string"&&typeof pa[wf]=="string";if(Wa){if(Object.keys(na.dynamic).length>0)return null;var ln=na.static,Le=Object.keys(ln);if(Le.length>0&&typeof ln[Le[0]]=="number"){for(var Ue=[],Qe=0;Qe"+Bn+"?"+Lt+".constant["+Bn+"]:0;"}).join(""),"}}else{","if(",va,"(",Lt,".buffer)){",An,"=",Qa,".createStream(",Jr,",",Lt,".buffer);","}else{",An,"=",Qa,".getBuffer(",Lt,".buffer);","}",dn,'="type" in ',Lt,"?",Gr.glTypes,"[",Lt,".type]:",An,".dtype;",Ga.normalized,"=!!",Lt,".normalized;");function _n(Mn){wt(Ga[Mn],"=",Lt,".",Mn,"|0;")}return _n("size"),_n("offset"),_n("stride"),_n("divisor"),wt("}}"),wt.exit("if(",Ga.isStream,"){",Qa,".destroyStream(",An,");","}"),Ga}ln[Le]=zn(Ue,Qe)}),ln}function $o(Wr){var na=Wr.static,pa=Wr.dynamic,Wa={};return Object.keys(na).forEach(function(ln){var Le=na[ln];Wa[ln]=Tn(function(Ue,Qe){return typeof Le=="number"||typeof Le=="boolean"?""+Le:Ue.link(Le)})}),Object.keys(pa).forEach(function(ln){var Le=pa[ln];Wa[ln]=zn(Le,function(Ue,Qe){return Ue.invoke(Qe,Le)})}),Wa}function _s(Wr,na,pa,Wa,ln){var Le=Wr.static,Ue=Wr.dynamic,Qe=zs(Wr,na),_t=ro(Wr,ln),wt=Mo(Wr,_t,ln),Lt=So(Wr,ln),pr=Ws(Wr,ln),Gr=Bs(Wr,ln,Qe);function va(_n){var Mn=wt[_n];Mn&&(pr[_n]=Mn)}va(Ks),va(Pn(Pc));var Qa=Object.keys(pr).length>0,Ga={framebuffer:_t,draw:Lt,shader:Gr,state:pr,dirty:Qa,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=Wi(Wr,ln),Ga.uniforms=Zo(pa,ln),Ga.drawVAO=Ga.scopeVAO=Lt.vao,!Ga.drawVAO&&Gr.program&&!Qe&&Ut.angle_instanced_arrays&&Lt.static.elements){var Ua=!0,An=Gr.program.attributes.map(function(_n){var Mn=na.static[_n];return Ua=Ua&&!!Mn,Mn});if(Ua&&An.length>0){var dn=Cr.getVAO(Cr.createVAO({attributes:An,elements:Lt.static.elements}));Ga.drawVAO=new sa(null,null,null,function(_n,Mn){return _n.link(dn)}),Ga.useVAO=!0}}return Qe?Ga.useVAO=!0:Ga.attributes=es(na,ln),Ga.context=$o(Wa,ln),Ga}function Go(Wr,na,pa){var Wa=Wr.shared,ln=Wa.context,Le=Wr.scope();Object.keys(pa).forEach(function(Ue){na.save(ln,"."+Ue);var Qe=pa[Ue],_t=Qe.append(Wr,na);Array.isArray(_t)?Le(ln,".",Ue,"=[",_t.join(),"];"):Le(ln,".",Ue,"=",_t,";")}),na(Le)}function Ys(Wr,na,pa,Wa){var ln=Wr.shared,Le=ln.gl,Ue=ln.framebuffer,Qe;za&&(Qe=na.def(ln.extensions,".webgl_draw_buffers"));var _t=Wr.constants,wt=_t.drawBuffer,Lt=_t.backBuffer,pr;pa?pr=pa.append(Wr,na):pr=na.def(Ue,".next"),Wa||na("if(",pr,"!==",Ue,".cur){"),na("if(",pr,"){",Le,".bindFramebuffer(",Vr,",",pr,".framebuffer);"),za&&na(Qe,".drawBuffersWEBGL(",wt,"[",pr,".colorAttachments.length]);"),na("}else{",Le,".bindFramebuffer(",Vr,",null);"),za&&na(Qe,".drawBuffersWEBGL(",Lt,");"),na("}",Ue,".cur=",pr,";"),Wa||na("}")}function Ll(Wr,na,pa){var Wa=Wr.shared,ln=Wa.gl,Le=Wr.current,Ue=Wr.next,Qe=Wa.current,_t=Wa.next,wt=Wr.cond(Qe,".dirty");cn.forEach(function(Lt){var pr=Pn(Lt);if(!(pr in pa.state)){var Gr,va;if(pr in Ue){Gr=Ue[pr],va=Le[pr];var Qa=h(Dn[pr].length,function(Ua){return wt.def(Gr,"[",Ua,"]")});wt(Wr.cond(Qa.map(function(Ua,An){return Ua+"!=="+va+"["+An+"]"}).join("||")).then(ln,".",ei[pr],"(",Qa,");",Qa.map(function(Ua,An){return va+"["+An+"]="+Ua}).join(";"),";"))}else{Gr=wt.def(_t,".",pr);var Ga=Wr.cond(Gr,"!==",Qe,".",pr);wt(Ga),pr in sn?Ga(Wr.cond(Gr).then(ln,".enable(",sn[pr],");").else(ln,".disable(",sn[pr],");"),Qe,".",pr,"=",Gr,";"):Ga(ln,".",ei[pr],"(",Gr,");",Qe,".",pr,"=",Gr,";")}}}),Object.keys(pa.state).length===0&&wt(Qe,".dirty=false;"),na(wt)}function mo(Wr,na,pa,Wa){var ln=Wr.shared,Le=Wr.current,Ue=ln.current,Qe=ln.gl,_t;Ma(Object.keys(pa)).forEach(function(wt){var Lt=pa[wt];if(!(Wa&&!Wa(Lt))){var pr=Lt.append(Wr,na);if(sn[wt]){var Gr=sn[wt];hn(Lt)?(_t=Wr.link(pr,{stable:!0}),na(Wr.cond(_t).then(Qe,".enable(",Gr,");").else(Qe,".disable(",Gr,");")),na(Ue,".",wt,"=",_t,";")):(na(Wr.cond(pr).then(Qe,".enable(",Gr,");").else(Qe,".disable(",Gr,");")),na(Ue,".",wt,"=",pr,";"))}else if(zr(pr)){var va=Le[wt];na(Qe,".",ei[wt],"(",pr,");",pr.map(function(Qa,Ga){return va+"["+Ga+"]="+Qa}).join(";"),";")}else hn(Lt)?(_t=Wr.link(pr,{stable:!0}),na(Qe,".",ei[wt],"(",_t,");",Ue,".",wt,"=",_t,";")):na(Qe,".",ei[wt],"(",pr,");",Ue,".",wt,"=",pr,";")}})}function ru(Wr,na){Fa&&(Wr.instancing=na.def(Wr.shared.extensions,".angle_instanced_arrays"))}function Rs(Wr,na,pa,Wa,ln){var Le=Wr.shared,Ue=Wr.stats,Qe=Le.current,_t=Le.timer,wt=pa.profile;function Lt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var pr,Gr;function va(_n){pr=na.def(),_n(pr,"=",Lt(),";"),typeof ln=="string"?_n(Ue,".count+=",ln,";"):_n(Ue,".count++;"),Ra&&(Wa?(Gr=na.def(),_n(Gr,"=",_t,".getNumPendingQueries();")):_n(_t,".beginQuery(",Ue,");"))}function Qa(_n){_n(Ue,".cpuTime+=",Lt(),"-",pr,";"),Ra&&(Wa?_n(_t,".pushScopeStats(",Gr,",",_t,".getNumPendingQueries(),",Ue,");"):_n(_t,".endQuery();"))}function Ga(_n){var Mn=na.def(Qe,".profile");na(Qe,".profile=",_n,";"),na.exit(Qe,".profile=",Mn,";")}var Ua;if(wt){if(hn(wt)){wt.enable?(va(na),Qa(na.exit),Ga("true")):Ga("false");return}Ua=wt.append(Wr,na),Ga(Ua)}else Ua=na.def(Qe,".profile");var An=Wr.block();va(An),na("if(",Ua,"){",An,"}");var dn=Wr.block();Qa(dn),na.exit("if(",Ua,"){",dn,"}")}function Yu(Wr,na,pa,Wa,ln){var Le=Wr.shared;function Ue(_t){switch(_t){case Qo:case jl:case wi:return 2;case vo:case Hs:case sl:return 3;case ys:case Cu:case sc:return 4;default:return 1}}function Qe(_t,wt,Lt){var pr=Le.gl,Gr=na.def(_t,".location"),va=na.def(Le.attributes,"[",Gr,"]"),Qa=Lt.state,Ga=Lt.buffer,Ua=[Lt.x,Lt.y,Lt.z,Lt.w],An=["buffer","normalized","offset","stride"];function dn(){na("if(!",va,".buffer){",pr,".enableVertexAttribArray(",Gr,");}");var Mn=Lt.type,Bn;if(Lt.size?Bn=na.def(Lt.size,"||",wt):Bn=wt,na("if(",va,".type!==",Mn,"||",va,".size!==",Bn,"||",An.map(function(Ci){return va+"."+Ci+"!=="+Lt[Ci]}).join("||"),"){",pr,".bindBuffer(",Jr,",",Ga,".buffer);",pr,".vertexAttribPointer(",[Gr,Bn,Mn,Lt.normalized,Lt.stride,Lt.offset],");",va,".type=",Mn,";",va,".size=",Bn,";",An.map(function(Ci){return va+"."+Ci+"="+Lt[Ci]+";"}).join(""),"}"),Fa){var Zn=Lt.divisor;na("if(",va,".divisor!==",Zn,"){",Wr.instancing,".vertexAttribDivisorANGLE(",[Gr,Zn],");",va,".divisor=",Zn,";}")}}function _n(){na("if(",va,".buffer){",pr,".disableVertexAttribArray(",Gr,");",va,".buffer=null;","}if(",yi.map(function(Mn,Bn){return va+"."+Mn+"!=="+Ua[Bn]}).join("||"),"){",pr,".vertexAttrib4f(",Gr,",",Ua,");",yi.map(function(Mn,Bn){return va+"."+Mn+"="+Ua[Bn]+";"}).join(""),"}")}Qa===ki?dn():Qa===ri?_n():(na("if(",Qa,"===",ki,"){"),dn(),na("}else{"),_n(),na("}"))}Wa.forEach(function(_t){var wt=_t.name,Lt=pa.attributes[wt],pr;if(Lt){if(!ln(Lt))return;pr=Lt.append(Wr,na)}else{if(!ln($n))return;var Gr=Wr.scopeAttrib(wt);pr={},Object.keys(new ma).forEach(function(va){pr[va]=na.def(Gr,".",va)})}Qe(Wr.link(_t),Ue(_t.info.type),pr)})}function Ul(Wr,na,pa,Wa,ln,Le){for(var Ue=Wr.shared,Qe=Ue.gl,_t,wt=0;wt1){for(var As=[],ls=[],Vl=0;Vl>1)",Ga],");")}function Zn(){pa(Ua,".drawArraysInstancedANGLE(",[Gr,va,Qa,Ga],");")}Lt&&Lt!=="null"?dn?Bn():(pa("if(",Lt,"){"),Bn(),pa("}else{"),Zn(),pa("}")):Zn()}function Mn(){function Bn(){pa(Le+".drawElements("+[Gr,Qa,An,va+"<<(("+An+"-"+_i+")>>1)"]+");")}function Zn(){pa(Le+".drawArrays("+[Gr,va,Qa]+");")}Lt&&Lt!=="null"?dn?Bn():(pa("if(",Lt,"){"),Bn(),pa("}else{"),Zn(),pa("}")):Zn()}Fa&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(pa("if(",Ga,">0){"),_n(),pa("}else if(",Ga,"<0){"),Mn(),pa("}")):_n():Mn()}function fo(Wr,na,pa,Wa,ln){var Le=bi(),Ue=Le.proc("body",ln);return Fa&&(Le.instancing=Ue.def(Le.shared.extensions,".angle_instanced_arrays")),Wr(Le,Ue,pa,Wa),Le.compile().body}function Xo(Wr,na,pa,Wa){ru(Wr,na),pa.useVAO?pa.drawVAO?na(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,na),");"):na(Wr.shared.vao,".setVAO(",Wr.shared.vao,".targetVAO);"):(na(Wr.shared.vao,".setVAO(null);"),Yu(Wr,na,pa,Wa.attributes,function(){return!0})),Ul(Wr,na,pa,Wa.uniforms,function(){return!0},!1),ql(Wr,na,na,pa)}function Os(Wr,na){var pa=Wr.proc("draw",1);ru(Wr,pa),Go(Wr,pa,na.context),Ys(Wr,pa,na.framebuffer),Ll(Wr,pa,na),mo(Wr,pa,na.state),Rs(Wr,pa,na,!1,!0);var Wa=na.shader.progVar.append(Wr,pa);if(pa(Wr.shared.gl,".useProgram(",Wa,".program);"),na.shader.program)Xo(Wr,pa,na,na.shader.program);else{pa(Wr.shared.vao,".setVAO(null);");var ln=Wr.global.def("{}"),Le=pa.def(Wa,".id"),Ue=pa.def(ln,"[",Le,"]");pa(Wr.cond(Ue).then(Ue,".call(this,a0);").else(Ue,"=",ln,"[",Le,"]=",Wr.link(function(Qe){return fo(Xo,Wr,na,Qe,1)}),"(",Wa,");",Ue,".call(this,a0);"))}Object.keys(na.state).length>0&&pa(Wr.shared.current,".dirty=true;"),Wr.shared.vao&&pa(Wr.shared.vao,".setVAO(null);")}function ra(Wr,na,pa,Wa){Wr.batchId="a1",ru(Wr,na);function ln(){return!0}Yu(Wr,na,pa,Wa.attributes,ln),Ul(Wr,na,pa,Wa.uniforms,ln,!1),ql(Wr,na,na,pa)}function Ya(Wr,na,pa,Wa){ru(Wr,na);var ln=pa.contextDep,Le=na.def(),Ue="a0",Qe="a1",_t=na.def();Wr.shared.props=_t,Wr.batchId=Le;var wt=Wr.scope(),Lt=Wr.scope();na(wt.entry,"for(",Le,"=0;",Le,"<",Qe,";++",Le,"){",_t,"=",Ue,"[",Le,"];",Lt,"}",wt.exit);function pr(An){return An.contextDep&&ln||An.propDep}function Gr(An){return!pr(An)}if(pa.needsContext&&Go(Wr,Lt,pa.context),pa.needsFramebuffer&&Ys(Wr,Lt,pa.framebuffer),mo(Wr,Lt,pa.state,pr),pa.profile&&pr(pa.profile)&&Rs(Wr,Lt,pa,!1,!0),Wa)pa.useVAO?pa.drawVAO?pr(pa.drawVAO)?Lt(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,Lt),");"):wt(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,wt),");"):wt(Wr.shared.vao,".setVAO(",Wr.shared.vao,".targetVAO);"):(wt(Wr.shared.vao,".setVAO(null);"),Yu(Wr,wt,pa,Wa.attributes,Gr),Yu(Wr,Lt,pa,Wa.attributes,pr)),Ul(Wr,wt,pa,Wa.uniforms,Gr,!1),Ul(Wr,Lt,pa,Wa.uniforms,pr,!0),ql(Wr,wt,Lt,pa);else{var va=Wr.global.def("{}"),Qa=pa.shader.progVar.append(Wr,Lt),Ga=Lt.def(Qa,".id"),Ua=Lt.def(va,"[",Ga,"]");Lt(Wr.shared.gl,".useProgram(",Qa,".program);","if(!",Ua,"){",Ua,"=",va,"[",Ga,"]=",Wr.link(function(An){return fo(ra,Wr,pa,An,2)}),"(",Qa,");}",Ua,".call(this,a0[",Le,"],",Le,");")}}function Ka(Wr,na){var pa=Wr.proc("batch",2);Wr.batchId="0",ru(Wr,pa);var Wa=!1,ln=!0;Object.keys(na.context).forEach(function(va){Wa=Wa||na.context[va].propDep}),Wa||(Go(Wr,pa,na.context),ln=!1);var Le=na.framebuffer,Ue=!1;Le?(Le.propDep?Wa=Ue=!0:Le.contextDep&&Wa&&(Ue=!0),Ue||Ys(Wr,pa,Le)):Ys(Wr,pa,null),na.state.viewport&&na.state.viewport.propDep&&(Wa=!0);function Qe(va){return va.contextDep&&Wa||va.propDep}Ll(Wr,pa,na),mo(Wr,pa,na.state,function(va){return!Qe(va)}),(!na.profile||!Qe(na.profile))&&Rs(Wr,pa,na,!1,"a1"),na.contextDep=Wa,na.needsContext=ln,na.needsFramebuffer=Ue;var _t=na.shader.progVar;if(_t.contextDep&&Wa||_t.propDep)Ya(Wr,pa,na,null);else{var wt=_t.append(Wr,pa);if(pa(Wr.shared.gl,".useProgram(",wt,".program);"),na.shader.program)Ya(Wr,pa,na,na.shader.program);else{pa(Wr.shared.vao,".setVAO(null);");var Lt=Wr.global.def("{}"),pr=pa.def(wt,".id"),Gr=pa.def(Lt,"[",pr,"]");pa(Wr.cond(Gr).then(Gr,".call(this,a0,a1);").else(Gr,"=",Lt,"[",pr,"]=",Wr.link(function(va){return fo(Ya,Wr,na,va,2)}),"(",wt,");",Gr,".call(this,a0,a1);"))}}Object.keys(na.state).length>0&&pa(Wr.shared.current,".dirty=true;"),Wr.shared.vao&&pa(Wr.shared.vao,".setVAO(null);")}function Bi(Wr,na){var pa=Wr.proc("scope",3);Wr.batchId="a2";var Wa=Wr.shared,ln=Wa.current;if(Go(Wr,pa,na.context),na.framebuffer&&na.framebuffer.append(Wr,pa),Ma(Object.keys(na.state)).forEach(function(Qe){var _t=na.state[Qe],wt=_t.append(Wr,pa);zr(wt)?wt.forEach(function(Lt,pr){Jn(Lt)?pa.set(Wr.next[Qe],"["+pr+"]",Lt):pa.set(Wr.next[Qe],"["+pr+"]",Wr.link(Lt,{stable:!0}))}):hn(_t)?pa.set(Wa.next,"."+Qe,Wr.link(wt,{stable:!0})):pa.set(Wa.next,"."+Qe,wt)}),Rs(Wr,pa,na,!0,!0),[ku,fi,Nl,eu,Ol].forEach(function(Qe){var _t=na.draw[Qe];if(_t){var wt=_t.append(Wr,pa);Jn(wt)?pa.set(Wa.draw,"."+Qe,wt):pa.set(Wa.draw,"."+Qe,Wr.link(wt),{stable:!0})}}),Object.keys(na.uniforms).forEach(function(Qe){var _t=na.uniforms[Qe].append(Wr,pa);Array.isArray(_t)&&(_t="["+_t.map(function(wt){return Jn(wt)?wt:Wr.link(wt,{stable:!0})})+"]"),pa.set(Wa.uniforms,"["+Wr.link(It.id(Qe),{stable:!0})+"]",_t)}),Object.keys(na.attributes).forEach(function(Qe){var _t=na.attributes[Qe].append(Wr,pa),wt=Wr.scopeAttrib(Qe);Object.keys(new ma).forEach(function(Lt){pa.set(wt,"."+Lt,_t[Lt])})}),na.scopeVAO){var Le=na.scopeVAO.append(Wr,pa);Jn(Le)?pa.set(Wa.vao,".targetVAO",Le):pa.set(Wa.vao,".targetVAO",Wr.link(Le,{stable:!0}))}function Ue(Qe){var _t=na.shader[Qe];if(_t){var wt=_t.append(Wr,pa);Jn(wt)?pa.set(Wa.shader,"."+Qe,wt):pa.set(Wa.shader,"."+Qe,Wr.link(wt,{stable:!0}))}}Ue(wf),Ue(Qc),Object.keys(na.state).length>0&&(pa(ln,".dirty=true;"),pa.exit(ln,".dirty=true;")),pa("a1(",Wr.shared.context,",a0,",Wr.batchId,");")}function rs(Wr){if(!(typeof Wr!="object"||zr(Wr))){for(var na=Object.keys(Wr),pa=0;pa=0;--fo){var Xo=Ei[fo];Xo&&Xo(ua,null,0)}Ut.flush(),ta&&ta.update()}function Mo(){!Wi&&Ei.length>0&&(Wi=g.next(ro))}function zs(){Wi&&(g.cancel(ro),Wi=null)}function Bs(fo){fo.preventDefault(),dr=!0,zs(),so.forEach(function(Xo){Xo()})}function So(fo){Ut.getError(),dr=!1,Ar.restore(),ui.restore(),Fa.restore(),cn.restore(),sn.restore(),ei.restore(),kn.restore(),ta&&ta.restore(),Pn.procs.refresh(),Mo(),ti.forEach(function(Xo){Xo()})}Jn&&(Jn.addEventListener(je,Bs,!1),Jn.addEventListener(Ze,So,!1));function Ws(){Ei.length=0,zs(),Jn&&(Jn.removeEventListener(je,Bs),Jn.removeEventListener(Ze,So)),ui.clear(),ei.clear(),sn.clear(),kn.clear(),cn.clear(),za.clear(),Fa.clear(),ta&&ta.clear(),bi.forEach(function(fo){fo()})}function Zo(fo){function Xo(Le){var Ue=p({},Le);delete Ue.uniforms,delete Ue.attributes,delete Ue.context,delete Ue.vao,"stencil"in Ue&&Ue.stencil.op&&(Ue.stencil.opBack=Ue.stencil.opFront=Ue.stencil.op,delete Ue.stencil.op);function Qe(_t){if(_t in Ue){var wt=Ue[_t];delete Ue[_t],Object.keys(wt).forEach(function(Lt){Ue[_t+"."+Lt]=wt[Lt]})}}return Qe("blend"),Qe("depth"),Qe("cull"),Qe("stencil"),Qe("polygonOffset"),Qe("scissor"),Qe("sample"),"vao"in Le&&(Ue.vao=Le.vao),Ue}function Os(Le,Ue){var Qe={},_t={};return Object.keys(Le).forEach(function(wt){var Lt=Le[wt];if(c.isDynamic(Lt)){_t[wt]=c.unbox(Lt,wt);return}else if(Ue&&Array.isArray(Lt)){for(var pr=0;pr0)return Wr.call(this,Wa(Le|0),Le|0)}else if(Array.isArray(Le)){if(Le.length)return Wr.call(this,Le,Le.length)}else return Oi.call(this,Le)}return p(ln,{stats:rs,destroy:function(){Is.destroy()}})}var es=ei.setFBO=Zo({framebuffer:c.define.call(null,ut,"framebuffer")});function $o(fo,Xo){var Os=0;Pn.procs.poll();var ra=Xo.color;ra&&(Ut.clearColor(+ra[0]||0,+ra[1]||0,+ra[2]||0,+ra[3]||0),Os|=ie),"depth"in Xo&&(Ut.clearDepth(+Xo.depth),Os|=fe),"stencil"in Xo&&(Ut.clearStencil(Xo.stencil|0),Os|=be),Ut.clear(Os)}function _s(fo){if("framebuffer"in fo)if(fo.framebuffer&&fo.framebuffer_reglType==="framebufferCube")for(var Xo=0;Xo<6;++Xo)es(p({framebuffer:fo.framebuffer.faces[Xo]},fo),$o);else es(fo,$o);else $o(null,fo)}function Go(fo){Ei.push(fo);function Xo(){var Os=Gt(Ei,fo);function ra(){var Ya=Gt(Ei,ra);Ei[Ya]=Ei[Ei.length-1],Ei.length-=1,Ei.length<=0&&zs()}Ei[Os]=ra}return Mo(),{cancel:Xo}}function Ys(){var fo=In.viewport,Xo=In.scissor_box;fo[0]=fo[1]=Xo[0]=Xo[1]=0,ua.viewportWidth=ua.framebufferWidth=ua.drawingBufferWidth=fo[2]=Xo[2]=Ut.drawingBufferWidth,ua.viewportHeight=ua.framebufferHeight=ua.drawingBufferHeight=fo[3]=Xo[3]=Ut.drawingBufferHeight}function Ll(){ua.tick+=1,ua.time=ru(),Ys(),Pn.procs.poll()}function mo(){cn.refresh(),Ys(),Pn.procs.refresh(),ta&&ta.update()}function ru(){return(f()-ka)/1e3}mo();function Rs(fo,Xo){var Os;switch(fo){case"frame":return Go(Xo);case"lost":Os=so;break;case"restore":Os=ti;break;case"destroy":Os=bi;break;default:}return Os.push(Xo),{cancel:function(){for(var ra=0;ra=0},read:Rn,destroy:Ws,_gl:Ut,_refresh:mo,poll:function(){Ll(),ta&&ta.update()},now:ru,stats:vr,getCachedCode:Yu,preloadCachedCode:Ul});return It.onDone(null,ql),ql}return Kt})}}),lq=ze({"node_modules/gl-util/context.js"(J,G){"use strict";var p=qd();G.exports=function(n){if(n?typeof n=="string"&&(n={container:n}):n={},E(n)?n={container:n}:k(n)?n={container:n}:l(n)?n={gl:n}:n=p(n,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),n.pixelRatio||(n.pixelRatio=window.pixelRatio||1),n.gl)return n.gl;if(n.canvas&&(n.container=n.canvas.parentNode),n.container){if(typeof n.container=="string"){var r=document.querySelector(n.container);if(!r)throw Error("Element "+n.container+" is not found");n.container=r}E(n.container)?(n.canvas=n.container,n.container=n.canvas.parentNode):n.canvas||(n.canvas=e(),n.container.appendChild(n.canvas),b(n))}else if(!n.canvas)if(typeof document<"u")n.container=document.body||document.documentElement,n.canvas=e(),n.container.appendChild(n.canvas),b(n);else throw Error("Not DOM environment. Use headless-gl.");return n.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(a){try{n.gl=n.canvas.getContext(a,n.attrs)}catch{}return n.gl}),n.gl};function b(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*window.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*window.innerHeight);else{var n=t.container.getBoundingClientRect();t.canvas.width=t.width||n.right-n.left,t.canvas.height=t.height||n.bottom-n.top}}function E(t){return typeof t.getContext=="function"&&"width"in t&&"height"in t}function k(t){return typeof t.nodeName=="string"&&typeof t.appendChild=="function"&&typeof t.getBoundingClientRect=="function"}function l(t){return typeof t.drawArrays=="function"||typeof t.drawElements=="function"}function e(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}}}),uq=ze({"node_modules/font-atlas/index.js"(J,G){"use strict";var p=dM(),b=[32,126];G.exports=E;function E(k){k=k||{};var l=k.shape?k.shape:k.canvas?[k.canvas.width,k.canvas.height]:[512,512],e=k.canvas||document.createElement("canvas"),t=k.font,n=typeof k.step=="number"?[k.step,k.step]:k.step||[32,32],r=k.chars||b;if(t&&typeof t!="string"&&(t=p(t)),!Array.isArray(r))r=String(r).split("");else if(r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"){for(var a=[],o=r[0],s=0;o<=r[1];o++)a[s++]=String.fromCharCode(o);r=a}l=l.slice(),e.width=l[0],e.height=l[1];var c=e.getContext("2d");c.fillStyle="#000",c.fillRect(0,0,e.width,e.height),c.font=t,c.textAlign="center",c.textBaseline="middle",c.fillStyle="#fff";for(var g=n[0]/2,f=n[1]/2,o=0;ol[0]-n[0]/2&&(g=n[0]/2,f+=n[1]);return e}}}),vM=ze({"node_modules/bit-twiddle/twiddle.js"(J){"use strict";"use restrict";var G=32;J.INT_BITS=G,J.INT_MAX=2147483647,J.INT_MIN=-1<0)-(E<0)},J.abs=function(E){var k=E>>G-1;return(E^k)-k},J.min=function(E,k){return k^(E^k)&-(E65535)<<4,E>>>=k,l=(E>255)<<3,E>>>=l,k|=l,l=(E>15)<<2,E>>>=l,k|=l,l=(E>3)<<1,E>>>=l,k|=l,k|E>>1},J.log10=function(E){return E>=1e9?9:E>=1e8?8:E>=1e7?7:E>=1e6?6:E>=1e5?5:E>=1e4?4:E>=1e3?3:E>=100?2:E>=10?1:0},J.popCount=function(E){return E=E-(E>>>1&1431655765),E=(E&858993459)+(E>>>2&858993459),(E+(E>>>4)&252645135)*16843009>>>24};function p(E){var k=32;return E&=-E,E&&k--,E&65535&&(k-=16),E&16711935&&(k-=8),E&252645135&&(k-=4),E&858993459&&(k-=2),E&1431655765&&(k-=1),k}J.countTrailingZeros=p,J.nextPow2=function(E){return E+=E===0,--E,E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E+1},J.prevPow2=function(E){return E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E-(E>>>1)},J.parity=function(E){return E^=E>>>16,E^=E>>>8,E^=E>>>4,E&=15,27030>>>E&1};var b=new Array(256);(function(E){for(var k=0;k<256;++k){var l=k,e=k,t=7;for(l>>>=1;l;l>>>=1)e<<=1,e|=l&1,--t;E[k]=e<>>8&255]<<16|b[E>>>16&255]<<8|b[E>>>24&255]},J.interleave2=function(E,k){return E&=65535,E=(E|E<<8)&16711935,E=(E|E<<4)&252645135,E=(E|E<<2)&858993459,E=(E|E<<1)&1431655765,k&=65535,k=(k|k<<8)&16711935,k=(k|k<<4)&252645135,k=(k|k<<2)&858993459,k=(k|k<<1)&1431655765,E|k<<1},J.deinterleave2=function(E,k){return E=E>>>k&1431655765,E=(E|E>>>1)&858993459,E=(E|E>>>2)&252645135,E=(E|E>>>4)&16711935,E=(E|E>>>16)&65535,E<<16>>16},J.interleave3=function(E,k,l){return E&=1023,E=(E|E<<16)&4278190335,E=(E|E<<8)&251719695,E=(E|E<<4)&3272356035,E=(E|E<<2)&1227133513,k&=1023,k=(k|k<<16)&4278190335,k=(k|k<<8)&251719695,k=(k|k<<4)&3272356035,k=(k|k<<2)&1227133513,E|=k<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,E|l<<2},J.deinterleave3=function(E,k){return E=E>>>k&1227133513,E=(E|E>>>2)&3272356035,E=(E|E>>>4)&251719695,E=(E|E>>>8)&4278190335,E=(E|E>>>16)&1023,E<<22>>22},J.nextCombination=function(E){var k=E|E-1;return k+1|(~k&-~k)-1>>>p(E)+1}}}),cq=ze({"node_modules/dup/dup.js"(J,G){"use strict";function p(k,l,e){var t=k[e]|0;if(t<=0)return[];var n=new Array(t),r;if(e===k.length-1)for(r=0;r"u"&&(l=0),typeof k){case"number":if(k>0)return b(k|0,l);break;case"object":if(typeof k.length=="number")return p(k,l,0);break}return[]}G.exports=E}}),fq=ze({"node_modules/typedarray-pool/pool.js"(J){"use strict";var G=vM(),p=cq(),b=$v().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:p([32,0]),UINT16:p([32,0]),UINT32:p([32,0]),BIGUINT64:p([32,0]),INT8:p([32,0]),INT16:p([32,0]),INT32:p([32,0]),BIGINT64:p([32,0]),FLOAT:p([32,0]),DOUBLE:p([32,0]),DATA:p([32,0]),UINT8C:p([32,0]),BUFFER:p([32,0])});var E=typeof Uint8ClampedArray<"u",k=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=p([32,0])),e.BIGUINT64||(e.BIGUINT64=p([32,0])),e.BIGINT64||(e.BIGINT64=p([32,0])),e.BUFFER||(e.BUFFER=p([32,0]));var t=e.DATA,n=e.BUFFER;J.free=function(u){if(b.isBuffer(u))n[G.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var A=u.length||u.byteLength,x=G.log2(A)|0;t[x].push(u)}};function r(h){if(h){var u=h.length||h.byteLength,A=G.log2(u);t[A].push(h)}}function a(h){r(h.buffer)}J.freeUint8=J.freeUint16=J.freeUint32=J.freeBigUint64=J.freeInt8=J.freeInt16=J.freeInt32=J.freeBigInt64=J.freeFloat32=J.freeFloat=J.freeFloat64=J.freeDouble=J.freeUint8Clamped=J.freeDataView=a,J.freeArrayBuffer=r,J.freeBuffer=function(u){n[G.log2(u.length)].push(u)},J.malloc=function(u,A){if(A===void 0||A==="arraybuffer")return o(u);switch(A){case"uint8":return s(u);case"uint16":return c(u);case"uint32":return g(u);case"int8":return f(u);case"int16":return v(u);case"int32":return m(u);case"float":case"float32":return i(u);case"double":case"float64":return T(u);case"uint8_clamped":return S(u);case"bigint64":return C(u);case"biguint64":return M(u);case"buffer":return w(u);case"data":case"dataview":return _(u);default:return null}return null};function o(u){var u=G.nextPow2(u),A=G.log2(u),x=t[A];return x.length>0?x.pop():new ArrayBuffer(u)}J.mallocArrayBuffer=o;function s(h){return new Uint8Array(o(h),0,h)}J.mallocUint8=s;function c(h){return new Uint16Array(o(2*h),0,h)}J.mallocUint16=c;function g(h){return new Uint32Array(o(4*h),0,h)}J.mallocUint32=g;function f(h){return new Int8Array(o(h),0,h)}J.mallocInt8=f;function v(h){return new Int16Array(o(2*h),0,h)}J.mallocInt16=v;function m(h){return new Int32Array(o(4*h),0,h)}J.mallocInt32=m;function i(h){return new Float32Array(o(4*h),0,h)}J.mallocFloat32=J.mallocFloat=i;function T(h){return new Float64Array(o(8*h),0,h)}J.mallocFloat64=J.mallocDouble=T;function S(h){return E?new Uint8ClampedArray(o(h),0,h):s(h)}J.mallocUint8Clamped=S;function M(h){return k?new BigUint64Array(o(8*h),0,h):null}J.mallocBigUint64=M;function C(h){return l?new BigInt64Array(o(8*h),0,h):null}J.mallocBigInt64=C;function _(h){return new DataView(o(h),0,h)}J.mallocDataView=_;function w(h){h=G.nextPow2(h);var u=G.log2(h),A=n[u];return A.length>0?A.pop():new b(h)}J.mallocBuffer=w,J.clearCache=function(){for(var u=0;u<32;++u)e.UINT8[u].length=0,e.UINT16[u].length=0,e.UINT32[u].length=0,e.INT8[u].length=0,e.INT16[u].length=0,e.INT32[u].length=0,e.FLOAT[u].length=0,e.DOUBLE[u].length=0,e.BIGUINT64[u].length=0,e.BIGINT64[u].length=0,e.UINT8C[u].length=0,t[u].length=0,n[u].length=0}}}),hq=ze({"node_modules/is-plain-obj/index.js"(J,G){"use strict";var p=Object.prototype.toString;G.exports=function(b){var E;return p.call(b)==="[object Object]"&&(E=Object.getPrototypeOf(b),E===null||E===Object.getPrototypeOf({}))}}}),mM=ze({"node_modules/parse-unit/index.js"(J,G){G.exports=function(b,E){E||(E=[0,""]),b=String(b);var k=parseFloat(b,10);return E[0]=k,E[1]=b.match(/[\d.\-\+]*\s*(.*)/)[1]||"",E}}}),dq=ze({"node_modules/gl-text/node_modules/to-px/topx.js"(J,G){"use strict";var p=mM();G.exports=l;var b=96;function E(e,t){var n=p(getComputedStyle(e).getPropertyValue(t));return n[0]*l(n[1],e)}function k(e,t){var n=document.createElement("div");n.style["font-size"]="128"+e,t.appendChild(n);var r=E(n,"font-size")/128;return t.removeChild(n),r}function l(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return k(e,t);case"em":return E(t,"font-size");case"rem":return E(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return b;case"cm":return b/2.54;case"mm":return b/25.4;case"pt":return b/72;case"pc":return b/6}return 1}}}),pq=ze({"node_modules/detect-kerning/index.js"(J,G){"use strict";G.exports=k;var p=k.canvas=document.createElement("canvas"),b=p.getContext("2d"),E=l([32,126]);k.createPairs=l,k.ascii=E;function k(e,t){Array.isArray(e)&&(e=e.join(", "));var n={},r,a=16,o=.05;t&&(t.length===2&&typeof t[0]=="number"?r=l(t):Array.isArray(t)?r=t:(t.o?r=l(t.o):t.pairs&&(r=t.pairs),t.fontSize&&(a=t.fontSize),t.threshold!=null&&(o=t.threshold))),r||(r=E),b.font=a+"px "+e;for(var s=0;sa*o){var v=(f-g)/a;n[c]=v*1e3}}return n}function l(e){for(var t=[],n=e[0];n<=e[1];n++)for(var r=String.fromCharCode(n),a=e[0];a0;n-=4)if(t[n]!==0)return Math.floor((n-3)*.25/e)}}}),mq=ze({"node_modules/gl-text/dist.js"(J,G){"use strict";var p=sq(),b=qd(),E=pM(),k=lq(),l=iM(),e=ay(),t=uq(),n=fq(),r=y1(),a=hq(),o=mM(),s=dq(),c=pq(),g=Vc(),f=vq(),v=f0(),m=vM(),i=m.nextPow2,T=new l,S=!1;document.body&&(M=document.body.appendChild(document.createElement("div")),M.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(M).fontStretch&&(S=!0),document.body.removeChild(M));var M,C=function(h){_(h)?(h={regl:h},this.gl=h.regl._gl):this.gl=k(h),this.shader=T.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=h.regl||E({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),T.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(a(h)?h:{})};C.prototype.createShader=function(){var h=this.regl,u=h({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:h.prop("count"),offset:h.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:h.this("sizeBuffer")},width:{offset:0,stride:8,buffer:h.this("sizeBuffer")},char:h.this("charBuffer"),position:h.this("position")},uniforms:{atlasSize:function(x,z){return[z.atlas.width,z.atlas.height]},atlasDim:function(x,z){return[z.atlas.cols,z.atlas.rows]},atlas:function(x,z){return z.atlas.texture},charStep:function(x,z){return z.atlas.step},em:function(x,z){return z.atlas.em},color:h.prop("color"),opacity:h.prop("opacity"),viewport:h.this("viewportArray"),scale:h.this("scale"),align:h.prop("align"),baseline:h.prop("baseline"),translate:h.this("translate"),positionOffset:h.prop("positionOffset")},primitive:"points",viewport:h.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -2692,9 +2692,9 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),A={};return{regl:f,draw:u,atlas:A}},C.prototype.update=function(f){var u=this;if(typeof f=="string")f={text:f};else if(!f)return;f=b(f,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0),f.opacity!=null&&(Array.isArray(f.opacity)?this.opacity=f.opacity.map(function(le){return parseFloat(le)}):this.opacity=parseFloat(f.opacity)),f.viewport!=null&&(this.viewport=r(f.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),f.kerning!=null&&(this.kerning=f.kerning),f.offset!=null&&(typeof f.offset=="number"&&(f.offset=[f.offset,0]),this.positionOffset=v(f.offset)),f.direction&&(this.direction=f.direction),f.range&&(this.range=f.range,this.scale=[1/(f.range[2]-f.range[0]),1/(f.range[3]-f.range[1])],this.translate=[-f.range[0],-f.range[1]]),f.scale&&(this.scale=f.scale),f.translate&&(this.translate=f.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!f.font&&(f.font=C.baseFontSize+"px sans-serif");var A=!1,x=!1;if(f.font&&(Array.isArray(f.font)?f.font:[f.font]).forEach(function(le,Ae){if(typeof le=="string")try{le=p.parse(le)}catch{le=p.parse(C.baseFontSize+"px "+le)}else{var Be=le.style,Xe=le.weight,Ye=le.stretch,yt=le.variant;le=p.parse(p.stringify(le)),Be&&(le.style=Be),Xe&&(le.weight=Xe),Ye&&(le.stretch=Ye),yt&&(le.variant=yt)}var gt=p.stringify({size:C.baseFontSize,family:le.family,stretch:S?le.stretch:void 0,variant:le.variant,weight:le.weight,style:le.style}),Tt=o(le.size),At=Math.round(Tt[0]*s(Tt[1]));if(At!==u.fontSize[Ae]&&(x=!0,u.fontSize[Ae]=At),(!u.font[Ae]||gt!=u.font[Ae].baseString)&&(A=!0,u.font[Ae]=C.fonts[gt],!u.font[Ae])){var $t=le.family.join(", "),rr=[le.style];le.style!=le.variant&&rr.push(le.variant),le.variant!=le.weight&&rr.push(le.weight),S&&le.weight!=le.stretch&&rr.push(le.stretch),u.font[Ae]={baseString:gt,family:$t,weight:le.weight,stretch:le.stretch,style:le.style,variant:le.variant,width:{},kerning:{},metrics:h($t,{origin:"top",fontSize:C.baseFontSize,fontStyle:rr.join(" ")})},C.fonts[gt]=u.font[Ae]}}),(A||x)&&this.font.forEach(function(le,Ae){var Be=p.stringify({size:u.fontSize[Ae],family:le.family,stretch:S?le.stretch:void 0,variant:le.variant,weight:le.weight,style:le.style});if(u.fontAtlas[Ae]=u.shader.atlas[Be],!u.fontAtlas[Ae]){var Xe=le.metrics;u.shader.atlas[Be]=u.fontAtlas[Ae]={fontString:Be,step:Math.ceil(u.fontSize[Ae]*Xe.bottom*.5)*2,em:u.fontSize[Ae],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:u.regl.texture()}}f.text==null&&(f.text=u.text)}),typeof f.text=="string"&&f.position&&f.position.length>2){for(var z=Array(f.position.length*.5),I=0;I2){for(var B=!f.position[0].length,F=n.mallocFloat(this.count*2),P=0,j=0;P1?u.align[Ae]:u.align[0]:u.align;if(typeof Be=="number")return Be;switch(Be){case"right":case"end":return-le;case"center":case"centre":case"middle":return-le*.5}return 0})),this.baseline==null&&f.baseline==null&&(f.baseline=0),f.baseline!=null&&(this.baseline=f.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(le,Ae){var Be=(u.font[Ae]||u.font[0]).metrics,Xe=0;return Xe+=Be.bottom*.5,typeof le=="number"?Xe+=le-Be.baseline:Xe+=-Be[le],Xe*=-1,Xe})),f.color!=null)if(f.color||(f.color="transparent"),typeof f.color=="string"||!isNaN(f.color))this.color=e(f.color,"uint8");else{var Me;if(typeof f.color[0]=="number"&&f.color.length>this.counts.length){var Se=f.color.length;Me=n.mallocUint8(Se);for(var Ie=(f.color.subarray||f.color.slice).bind(f.color),Ve=0;Ve4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(_e){var ce=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(ce);for(var ve=0;ve1?this.counts[ve]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ve]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ve*4,ve*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ve]:this.opacity,baseline:this.baselineOffset[ve]!=null?this.baselineOffset[ve]:this.baselineOffset[0],align:this.align?this.alignOffset[ve]!=null?this.alignOffset[ve]:this.alignOffset[0]:0,atlas:this.fontAtlas[ve]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ve*2,ve*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},C.prototype.destroy=function(){},C.prototype.kerning=!0,C.prototype.position={constant:new Float32Array(2)},C.prototype.translate=null,C.prototype.scale=null,C.prototype.font=null,C.prototype.text="",C.prototype.positionOffset=[0,0],C.prototype.opacity=1,C.prototype.color=new Uint8Array([0,0,0,255]),C.prototype.alignOffset=[0,0],C.maxAtlasSize=1024,C.atlasCanvas=document.createElement("canvas"),C.atlasContext=C.atlasCanvas.getContext("2d",{alpha:!1}),C.baseFontSize=64,C.fonts={};function _(T){return typeof T=="function"&&T._gl&&T.prop&&T.texture&&T.buffer}V.exports=C}}),j2=ze({"src/lib/prepare_regl.js"(J,V){"use strict";var p=gA(),b=pM();V.exports=function(k,l,e){var t=k._fullLayout,n=!0;return t._glcanvas.each(function(r){if(r.regl){r.regl.preloadCachedCode(e);return}if(!(r.pick&&!t._has("parcoords"))){try{r.regl=b({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:k._context.plotGlPixelRatio||window.devicePixelRatio,extensions:l||[],cachedCode:e||{}})}catch{n=!1}r.regl||(n=!1),n&&this.addEventListener("webglcontextlost",function(a){k&&k.emit&&k.emit("plotly_webglcontextlost",{event:a,layer:r.key})},!1)}}),n||p({container:t._glcontainer.node()}),n}}}),gM=ze({"src/traces/scattergl/plot.js"(c,V){"use strict";var p=YA(),b=oM(),E=tq(),k=mq(),l=Nr(),e=Fd().selectMode,t=j2(),n=el(),r=S5(),a=GA().styleTextSelection,o={};function s(m,h,v,g){var i=m._size,w=m.width*g,S=m.height*g,M=i.l*g,C=i.b*g,_=i.r*g,T=i.t*g,f=i.w*g,u=i.h*g;return[M+h.domain[0]*f,C+v.domain[0]*u,w-_-(1-h.domain[1])*f,S-T-(1-v.domain[1])*u]}var c=V.exports=function(h,v,g){if(g.length){var i=h._fullLayout,w=v._scene,S=v.xaxis,M=v.yaxis,C,_;if(w){var T=t(h,["ANGLE_instanced_arrays","OES_element_index_uint"],o);if(!T){w.init();return}var f=w.count,u=i._glcanvas.data()[0].regl;if(r(h,v,g),w.dirty){if((w.line2d||w.error2d)&&!(w.scatter2d||w.fill2d||w.glText)&&u.clear({color:!0,depth:!0}),w.error2d===!0&&(w.error2d=E(u)),w.line2d===!0&&(w.line2d=b(u)),w.scatter2d===!0&&(w.scatter2d=p(u)),w.fill2d===!0&&(w.fill2d=b(u)),w.glText===!0)for(w.glText=new Array(f),C=0;Cw.glText.length){var A=f-w.glText.length;for(C=0;Cee&&(isNaN(Z[ae])||isNaN(Z[ae+1]));)ae-=2;q.positions=Z.slice(ee,ae+2)}return q}),w.line2d.update(w.lineOptions)),w.error2d){var I=(w.errorXOptions||[]).concat(w.errorYOptions||[]).map(function(q){return q||{positions:[],errors:[]}});w.error2d.update(I)}w.scatter2d&&w.scatter2d.update(w.markerOptions),w.fillOrder=l.repeat(null,f),w.fill2d&&(w.fillOptions=w.fillOptions.map(function(q,Z){var ee=g[Z];if(!(!q||!ee||!ee[0]||!ee[0].trace)){var ae=ee[0],he=ae.trace,xe=ae.t,we=w.lineOptions[Z],Me,Se,Ie=[];he._ownfill&&Ie.push(Z),he._nexttrace&&Ie.push(Z+1),Ie.length&&(w.fillOrder[Z]=Ie);var Ve=[],Ge=we&&we.positions||xe.positions,ke,_e;if(he.fill==="tozeroy"){for(ke=0;keke&&isNaN(Ge[_e+1]);)_e-=2;Ge[ke+1]!==0&&(Ve=[Ge[ke],0]),Ve=Ve.concat(Ge.slice(ke,_e+2)),Ge[_e+1]!==0&&(Ve=Ve.concat([Ge[_e],0]))}else if(he.fill==="tozerox"){for(ke=0;keke&&isNaN(Ge[_e]);)_e-=2;Ge[ke]!==0&&(Ve=[0,Ge[ke+1]]),Ve=Ve.concat(Ge.slice(ke,_e+2)),Ge[_e]!==0&&(Ve=Ve.concat([0,Ge[_e+1]]))}else if(he.fill==="toself"||he.fill==="tonext"){for(Ve=[],Me=0,q.splitNull=!0,Se=0;Se-1;for(let[q]of g)if(q){var F=q.trace,P=q.t,j=P.index,U=F._length,$=P.x,Q=P.y;if(F.selectedpoints||D||B){if(D||(D=!0),F.selectedpoints){var re=w.selectBatch[j]=F.selectedpoints,ne={};for(_=0;_S&&v||wa,x;for(A?x=v.sizeAvg||Math.max(v.size,3):x=E(c,h),M=0;M{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,k(()=>{this.dirty=!1})),this)},n.prototype.update=function(...s){if(!s.length)return;for(let h=0;hx||!v.lower&&A{c[g+w]=h})}this.scatter.draw(...c)}return this},n.prototype.destroy=function(){return this.traces.forEach(s=>{s.buffer&&s.buffer.destroy&&s.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function r(s,c,m){let h=s.id!=null?s.id:s,v=c,g=m;return h<<16|(v&255)<<8|g&255}function a(s,c,m){let h,v,g,i,w,S,M,C,_=s[c],T=s[m];return _.length>2?(h=_[0],g=_[2],v=_[1],i=_[3]):_.length?(h=v=_[0],g=i=_[1]):(h=_.x,v=_.y,g=_.x+_.width,i=_.y+_.height),T.length>2?(w=T[0],M=T[2],S=T[1],C=T[3]):T.length?(w=S=T[0],M=C=T[1]):(w=T.x,S=T.y,M=T.x+T.width,C=T.y+T.height),[w,v,M,i]}function o(s){if(typeof s=="number")return[s,s,s,s];if(s.length===2)return[s[0],s[1],s[0],s[1]];{let c=e(s);return[c.x,c.y,c.x+c.width,c.y+c.height]}}}}),Sq=ze({"src/traces/splom/plot.js"(J,V){"use strict";var p=Mq(),b=Nr(),E=Xl(),k=Fd().selectMode;V.exports=function(t,n,r){if(r.length)for(var a=0;a-1,B=k(v)||!!a.selectedpoints||D,F=!0;if(B){var P=a._length;if(a.selectedpoints){s.selectBatch=a.selectedpoints;var j=a.selectedpoints,U={};for(w=0;w=$[Q][0]&&U<=$[Q][1])return!0;return!1}function c(U){U.attr("x",-p.bar.captureWidth/2).attr("width",p.bar.captureWidth)}function m(U){U.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function h(U){if(!U.brush.filterSpecified)return"0,"+U.height;for(var $=v(U.brush.filter.getConsolidated(),U.height),Q=[0],re,ne,se,G=$.length?$[0][0]:null,X=0;X<$.length;X++)re=$[X],ne=re[1]-re[0],Q.push(G),Q.push(ne),se=X+1,se<$.length&&(G=$[se][0]-re[1]);return Q.push(U.height),Q}function v(U,$){return U.map(function(Q){return Q.map(function(re){return Math.max(0,re*$)}).sort(l)})}function g(U,$){var Q=p.bar.handleHeight;if(!($>U[1]+Q||$=.9*U[1]+.1*U[0]?"n":$<=.9*U[0]+.1*U[1]?"s":"ns"}function i(){b.select(document.body).style("cursor",null)}function w(U){U.attr("stroke-dasharray",h)}function S(U,$){var Q=b.select(U).selectAll(".highlight, .highlight-shadow"),re=$?Q.transition().duration(p.bar.snapDuration).each("end",$):Q;w(re)}function M(U,$){var Q=U.brush,re=Q.filterSpecified,ne=NaN,se={},G;if(re){var X=U.height,K=Q.filter.getConsolidated(),H=v(K,X),Y=NaN,q=NaN,Z=NaN;for(G=0;G<=H.length;G++){var ee=H[G];if(ee&&ee[0]<=$&&$<=ee[1]){Y=G;break}else if(q=G?G-1:NaN,ee&&ee[0]>$){Z=G;break}}if(ne=Y,isNaN(ne)&&(isNaN(q)||isNaN(Z)?ne=isNaN(q)?Z:q:ne=$-H[q][1]=Me[0]&&we<=Me[1]){se.clickableOrdinalRange=Me;break}}}return se}function C(U,$){b.event.sourceEvent.stopPropagation();var Q=$.height-b.mouse(U)[1]-2*p.verticalPadding,re=$.unitToPaddedPx.invert(Q),ne=$.brush,se=M($,Q),G=se.interval,X=ne.svgBrush;if(X.wasDragged=!1,X.grabbingBar=se.region==="ns",X.grabbingBar){var K=G.map($.unitToPaddedPx);X.grabPoint=Q-K[0]-p.verticalPadding,X.barLength=K[1]-K[0]}X.clickableOrdinalRange=se.clickableOrdinalRange,X.stayingIntervals=$.multiselect&&ne.filterSpecified?ne.filter.getConsolidated():[],G&&(X.stayingIntervals=X.stayingIntervals.filter(function(H){return H[0]!==G[0]&&H[1]!==G[1]})),X.startExtent=se.region?G[se.region==="s"?1:0]:re,$.parent.inBrushDrag=!0,X.brushStartCallback()}function _(U,$){b.event.sourceEvent.stopPropagation();var Q=$.height-b.mouse(U)[1]-2*p.verticalPadding,re=$.brush.svgBrush;re.wasDragged=!0,re._dragging=!0,re.grabbingBar?re.newExtent=[Q-re.grabPoint,Q+re.barLength-re.grabPoint].map($.unitToPaddedPx.invert):re.newExtent=[re.startExtent,$.unitToPaddedPx.invert(Q)].sort(l),$.brush.filterSpecified=!0,re.extent=re.stayingIntervals.concat([re.newExtent]),re.brushCallback($),S(U.parentNode)}function T(U,$){var Q=$.brush,re=Q.filter,ne=Q.svgBrush;ne._dragging||(f(U,$),_(U,$),$.brush.svgBrush.wasDragged=!1),ne._dragging=!1;var se=b.event;se.sourceEvent.stopPropagation();var G=ne.grabbingBar;if(ne.grabbingBar=!1,ne.grabLocation=void 0,$.parent.inBrushDrag=!1,i(),!ne.wasDragged){ne.wasDragged=void 0,ne.clickableOrdinalRange?Q.filterSpecified&&$.multiselect?ne.extent.push(ne.clickableOrdinalRange):(ne.extent=[ne.clickableOrdinalRange],Q.filterSpecified=!0):G?(ne.extent=ne.stayingIntervals,ne.extent.length===0&&O(Q)):O(Q),ne.brushCallback($),S(U.parentNode),ne.brushEndCallback(Q.filterSpecified?re.getConsolidated():[]);return}var X=function(){re.set(re.getConsolidated())};if($.ordinal){var K=$.unitTickvals;K[K.length-1]ne.newExtent[0];ne.extent=ne.stayingIntervals.concat(H?[ne.newExtent]:[]),ne.extent.length||O(Q),ne.brushCallback($),H?S(U.parentNode,X):(X(),S(U.parentNode))}else X();ne.brushEndCallback(Q.filterSpecified?re.getConsolidated():[])}function f(U,$){var Q=$.height-b.mouse(U)[1]-2*p.verticalPadding,re=M($,Q),ne="crosshair";re.clickableOrdinalRange?ne="pointer":re.region&&(ne=re.region+"-resize"),b.select(document.body).style("cursor",ne)}function u(U){U.on("mousemove",function($){b.event.preventDefault(),$.parent.inBrushDrag||f(this,$)}).on("mouseleave",function($){$.parent.inBrushDrag||i()}).call(b.behavior.drag().on("dragstart",function($){C(this,$)}).on("drag",function($){_(this,$)}).on("dragend",function($){T(this,$)}))}function A(U,$){return U[0]-$[0]}function x(U,$,Q){var re=Q._context.staticPlot,ne=U.selectAll(".background").data(k);ne.enter().append("rect").classed("background",!0).call(c).call(m).style("pointer-events",re?"none":"auto").attr("transform",e(0,p.verticalPadding)),ne.call(u).attr("height",function(X){return X.height-p.verticalPadding});var se=U.selectAll(".highlight-shadow").data(k);se.enter().append("line").classed("highlight-shadow",!0).attr("x",-p.bar.width/2).attr("stroke-width",p.bar.width+p.bar.strokeWidth).attr("stroke",$).attr("opacity",p.bar.strokeOpacity).attr("stroke-linecap","butt"),se.attr("y1",function(X){return X.height}).call(w);var G=U.selectAll(".highlight").data(k);G.enter().append("line").classed("highlight",!0).attr("x",-p.bar.width/2).attr("stroke-width",p.bar.width-p.bar.strokeWidth).attr("stroke",p.bar.fillColor).attr("opacity",p.bar.fillOpacity).attr("stroke-linecap","butt"),G.attr("y1",function(X){return X.height}).call(w)}function z(U,$,Q){var re=U.selectAll("."+p.cn.axisBrush).data(k,E);re.enter().append("g").classed(p.cn.axisBrush,!0),x(re,$,Q)}function I(U){return U.svgBrush.extent.map(function($){return $.slice()})}function O(U){U.filterSpecified=!1,U.svgBrush.extent=[[-1/0,1/0]]}function D(U){return function(Q){var re=Q.brush,ne=I(re),se=ne.slice();re.filter.set(se),U()}}function B(U){for(var $=U.slice(),Q=[],re,ne=$.shift();ne;){for(re=ne.slice();(ne=$.shift())&&ne[0]<=re[1];)re[1]=Math.max(re[1],ne[1]);Q.push(re)}return Q.length===1&&Q[0][0]>Q[0][1]&&(Q=[]),Q}function F(){var U=[],$,Q;return{set:function(re){U=re.map(function(ne){return ne.slice().sort(l)}).sort(A),U.length===1&&U[0][0]===-1/0&&U[0][1]===1/0&&(U=[[0,-1]]),$=B(U),Q=U.reduce(function(ne,se){return[Math.min(ne[0],se[0]),Math.max(ne[1],se[1])]},[1/0,-1/0])},get:function(){return U.slice()},getConsolidated:function(){return $},getBounds:function(){return Q}}}function P(U,$,Q,re,ne,se){var G=F();return G.set(Q),{filter:G,filterSpecified:$,svgBrush:{extent:[],brushStartCallback:re,brushCallback:D(ne),brushEndCallback:se}}}function j(U,$){if(Array.isArray(U[0])?(U=U.map(function(re){return re.sort(l)}),$.multiselect?U=B(U.sort(A)):U=[U[0]]):U=[U.sort(l)],$.tickvals){var Q=$.tickvals.slice().sort(l);if(U=U.map(function(re){var ne=[o(0,Q,re[0],[]),o(1,Q,re[1],[])];if(ne[1]>ne[0])return ne}).filter(function(re){return re}),!U.length)return}return U.length>1?U:U[0]}V.exports={makeBrush:P,ensureAxisBrush:z,cleanRanges:j}}}),Dq=ze({"src/traces/parcoords/defaults.js"(J,V){"use strict";var p=Nr(),b=Bf().hasColorscale,E=qc(),k=Ml().defaults,l=Jf(),e=Gi(),t=xM(),n=bM(),r=sy().maxDimensionCount,a=U2();function o(c,m,h,v,g){var i=g("line.color",h);if(b(c,"line")&&p.isArrayOrTypedArray(i)){if(i.length)return g("line.colorscale"),E(c,m,v,g,{prefix:"line.",cLetter:"c"}),i.length;m.line.color=h}return 1/0}function s(c,m,h,v){function g(C,_){return p.coerce(c,m,t.dimensions,C,_)}var i=g("values"),w=g("visible");if(i&&i.length||(w=m.visible=!1),w){g("label"),g("tickvals"),g("ticktext"),g("tickformat");var S=g("range");m._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:S},e.setConvert(m._ax,v.layout),g("multiselect");var M=g("constraintrange");M&&(m.constraintrange=n.cleanRanges(M,m))}}V.exports=function(m,h,v,g){function i(_,T){return p.coerce(m,h,t,_,T)}var w=m.dimensions;Array.isArray(w)&&w.length>r&&(p.log("parcoords traces support up to "+r+" dimensions at the moment"),w.splice(r));var S=l(m,h,{name:"dimensions",layout:g,handleItemDefaults:s}),M=o(m,h,v,g,i);k(h,g,i),(!Array.isArray(S)||!S.length)&&(h.visible=!1),a(h,S,"values",M);var C=p.extendFlat({},g.font,{size:Math.round(g.font.size/1.2)});p.coerceFont(i,"labelfont",C),p.coerceFont(i,"tickfont",C,{autoShadowDflt:!0}),p.coerceFont(i,"rangefont",C),i("labelangle"),i("labelside"),i("unselected.line.color"),i("unselected.line.opacity")}}}),Fq=ze({"src/traces/parcoords/calc.js"(J,V){"use strict";var p=Nr().isArrayOrTypedArray,b=fl(),E=Vd().wrap;V.exports=function(e,t){var n,r;return b.hasColorscale(t,"line")&&p(t.line.color)?(n=t.line.color,r=b.extractOpts(t.line).colorscale,b.calc(e,t,{vals:n,containerStr:"line",cLetter:"c"})):(n=k(t._length),r=[[0,t.line.color],[1,t.line.color]]),E({lineColor:n,cscale:r})};function k(l){for(var e=new Array(l),t=0;t 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` + }`}),A={};return{regl:h,draw:u,atlas:A}},C.prototype.update=function(h){var u=this;if(typeof h=="string")h={text:h};else if(!h)return;h=b(h,{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),h.opacity!=null&&(Array.isArray(h.opacity)?this.opacity=h.opacity.map(function(le){return parseFloat(le)}):this.opacity=parseFloat(h.opacity)),h.viewport!=null&&(this.viewport=r(h.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]),h.kerning!=null&&(this.kerning=h.kerning),h.offset!=null&&(typeof h.offset=="number"&&(h.offset=[h.offset,0]),this.positionOffset=v(h.offset)),h.direction&&(this.direction=h.direction),h.range&&(this.range=h.range,this.scale=[1/(h.range[2]-h.range[0]),1/(h.range[3]-h.range[1])],this.translate=[-h.range[0],-h.range[1]]),h.scale&&(this.scale=h.scale),h.translate&&(this.translate=h.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!h.font&&(h.font=C.baseFontSize+"px sans-serif");var A=!1,x=!1;if(h.font&&(Array.isArray(h.font)?h.font:[h.font]).forEach(function(le,Ae){if(typeof le=="string")try{le=p.parse(le)}catch{le=p.parse(C.baseFontSize+"px "+le)}else{var Be=le.style,Xe=le.weight,Ye=le.stretch,yt=le.variant;le=p.parse(p.stringify(le)),Be&&(le.style=Be),Xe&&(le.weight=Xe),Ye&&(le.stretch=Ye),yt&&(le.variant=yt)}var gt=p.stringify({size:C.baseFontSize,family:le.family,stretch:S?le.stretch:void 0,variant:le.variant,weight:le.weight,style:le.style}),Tt=o(le.size),At=Math.round(Tt[0]*s(Tt[1]));if(At!==u.fontSize[Ae]&&(x=!0,u.fontSize[Ae]=At),(!u.font[Ae]||gt!=u.font[Ae].baseString)&&(A=!0,u.font[Ae]=C.fonts[gt],!u.font[Ae])){var $t=le.family.join(", "),rr=[le.style];le.style!=le.variant&&rr.push(le.variant),le.variant!=le.weight&&rr.push(le.weight),S&&le.weight!=le.stretch&&rr.push(le.stretch),u.font[Ae]={baseString:gt,family:$t,weight:le.weight,stretch:le.stretch,style:le.style,variant:le.variant,width:{},kerning:{},metrics:f($t,{origin:"top",fontSize:C.baseFontSize,fontStyle:rr.join(" ")})},C.fonts[gt]=u.font[Ae]}}),(A||x)&&this.font.forEach(function(le,Ae){var Be=p.stringify({size:u.fontSize[Ae],family:le.family,stretch:S?le.stretch:void 0,variant:le.variant,weight:le.weight,style:le.style});if(u.fontAtlas[Ae]=u.shader.atlas[Be],!u.fontAtlas[Ae]){var Xe=le.metrics;u.shader.atlas[Be]=u.fontAtlas[Ae]={fontString:Be,step:Math.ceil(u.fontSize[Ae]*Xe.bottom*.5)*2,em:u.fontSize[Ae],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:u.regl.texture()}}h.text==null&&(h.text=u.text)}),typeof h.text=="string"&&h.position&&h.position.length>2){for(var z=Array(h.position.length*.5),I=0;I2){for(var B=!h.position[0].length,F=n.mallocFloat(this.count*2),P=0,j=0;P1?u.align[Ae]:u.align[0]:u.align;if(typeof Be=="number")return Be;switch(Be){case"right":case"end":return-le;case"center":case"centre":case"middle":return-le*.5}return 0})),this.baseline==null&&h.baseline==null&&(h.baseline=0),h.baseline!=null&&(this.baseline=h.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(le,Ae){var Be=(u.font[Ae]||u.font[0]).metrics,Xe=0;return Xe+=Be.bottom*.5,typeof le=="number"?Xe+=le-Be.baseline:Xe+=-Be[le],Xe*=-1,Xe})),h.color!=null)if(h.color||(h.color="transparent"),typeof h.color=="string"||!isNaN(h.color))this.color=e(h.color,"uint8");else{var Me;if(typeof h.color[0]=="number"&&h.color.length>this.counts.length){var Se=h.color.length;Me=n.mallocUint8(Se);for(var Ie=(h.color.subarray||h.color.slice).bind(h.color),Ge=0;Ge4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(_e){var ue=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(ue);for(var ve=0;ve1?this.counts[ve]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ve]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ve*4,ve*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ve]:this.opacity,baseline:this.baselineOffset[ve]!=null?this.baselineOffset[ve]:this.baselineOffset[0],align:this.align?this.alignOffset[ve]!=null?this.alignOffset[ve]:this.alignOffset[0]:0,atlas:this.fontAtlas[ve]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ve*2,ve*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},C.prototype.destroy=function(){},C.prototype.kerning=!0,C.prototype.position={constant:new Float32Array(2)},C.prototype.translate=null,C.prototype.scale=null,C.prototype.font=null,C.prototype.text="",C.prototype.positionOffset=[0,0],C.prototype.opacity=1,C.prototype.color=new Uint8Array([0,0,0,255]),C.prototype.alignOffset=[0,0],C.maxAtlasSize=1024,C.atlasCanvas=document.createElement("canvas"),C.atlasContext=C.atlasCanvas.getContext("2d",{alpha:!1}),C.baseFontSize=64,C.fonts={};function _(w){return typeof w=="function"&&w._gl&&w.prop&&w.texture&&w.buffer}G.exports=C}}),j2=ze({"src/lib/prepare_regl.js"(J,G){"use strict";var p=gA(),b=pM();G.exports=function(k,l,e){var t=k._fullLayout,n=!0;return t._glcanvas.each(function(r){if(r.regl){r.regl.preloadCachedCode(e);return}if(!(r.pick&&!t._has("parcoords"))){try{r.regl=b({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:k._context.plotGlPixelRatio||window.devicePixelRatio,extensions:l||[],cachedCode:e||{}})}catch{n=!1}r.regl||(n=!1),n&&this.addEventListener("webglcontextlost",function(a){k&&k.emit&&k.emit("plotly_webglcontextlost",{event:a,layer:r.key})},!1)}}),n||p({container:t._glcontainer.node()}),n}}}),gM=ze({"src/traces/scattergl/plot.js"(c,G){"use strict";var p=YA(),b=oM(),E=tq(),k=mq(),l=Nr(),e=Fd().selectMode,t=j2(),n=el(),r=S5(),a=GA().styleTextSelection,o={};function s(g,f,v,m){var i=g._size,T=g.width*m,S=g.height*m,M=i.l*m,C=i.b*m,_=i.r*m,w=i.t*m,h=i.w*m,u=i.h*m;return[M+f.domain[0]*h,C+v.domain[0]*u,T-_-(1-f.domain[1])*h,S-w-(1-v.domain[1])*u]}var c=G.exports=function(f,v,m){if(m.length){var i=f._fullLayout,T=v._scene,S=v.xaxis,M=v.yaxis,C,_;if(T){var w=t(f,["ANGLE_instanced_arrays","OES_element_index_uint"],o);if(!w){T.init();return}var h=T.count,u=i._glcanvas.data()[0].regl;if(r(f,v,m),T.dirty){if((T.line2d||T.error2d)&&!(T.scatter2d||T.fill2d||T.glText)&&u.clear({color:!0,depth:!0}),T.error2d===!0&&(T.error2d=E(u)),T.line2d===!0&&(T.line2d=b(u)),T.scatter2d===!0&&(T.scatter2d=p(u)),T.fill2d===!0&&(T.fill2d=b(u)),T.glText===!0)for(T.glText=new Array(h),C=0;CT.glText.length){var A=h-T.glText.length;for(C=0;Cee&&(isNaN(W[ae])||isNaN(W[ae+1]));)ae-=2;q.positions=W.slice(ee,ae+2)}return q}),T.line2d.update(T.lineOptions)),T.error2d){var I=(T.errorXOptions||[]).concat(T.errorYOptions||[]).map(function(q){return q||{positions:[],errors:[]}});T.error2d.update(I)}T.scatter2d&&T.scatter2d.update(T.markerOptions),T.fillOrder=l.repeat(null,h),T.fill2d&&(T.fillOptions=T.fillOptions.map(function(q,W){var ee=m[W];if(!(!q||!ee||!ee[0]||!ee[0].trace)){var ae=ee[0],he=ae.trace,xe=ae.t,we=T.lineOptions[W],Me,Se,Ie=[];he._ownfill&&Ie.push(W),he._nexttrace&&Ie.push(W+1),Ie.length&&(T.fillOrder[W]=Ie);var Ge=[],qe=we&&we.positions||xe.positions,ke,_e;if(he.fill==="tozeroy"){for(ke=0;keke&&isNaN(qe[_e+1]);)_e-=2;qe[ke+1]!==0&&(Ge=[qe[ke],0]),Ge=Ge.concat(qe.slice(ke,_e+2)),qe[_e+1]!==0&&(Ge=Ge.concat([qe[_e],0]))}else if(he.fill==="tozerox"){for(ke=0;keke&&isNaN(qe[_e]);)_e-=2;qe[ke]!==0&&(Ge=[0,qe[ke+1]]),Ge=Ge.concat(qe.slice(ke,_e+2)),qe[_e]!==0&&(Ge=Ge.concat([0,qe[_e+1]]))}else if(he.fill==="toself"||he.fill==="tonext"){for(Ge=[],Me=0,q.splitNull=!0,Se=0;Se-1;for(let[q]of m)if(q){var F=q.trace,P=q.t,j=P.index,U=F._length,$=P.x,Q=P.y;if(F.selectedpoints||D||B){if(D||(D=!0),F.selectedpoints){var re=T.selectBatch[j]=F.selectedpoints,ne={};for(_=0;_S&&v||Ta,x;for(A?x=v.sizeAvg||Math.max(v.size,3):x=E(c,f),M=0;M{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,k(()=>{this.dirty=!1})),this)},n.prototype.update=function(...s){if(!s.length)return;for(let f=0;fx||!v.lower&&A{c[m+T]=f})}this.scatter.draw(...c)}return this},n.prototype.destroy=function(){return this.traces.forEach(s=>{s.buffer&&s.buffer.destroy&&s.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function r(s,c,g){let f=s.id!=null?s.id:s,v=c,m=g;return f<<16|(v&255)<<8|m&255}function a(s,c,g){let f,v,m,i,T,S,M,C,_=s[c],w=s[g];return _.length>2?(f=_[0],m=_[2],v=_[1],i=_[3]):_.length?(f=v=_[0],m=i=_[1]):(f=_.x,v=_.y,m=_.x+_.width,i=_.y+_.height),w.length>2?(T=w[0],M=w[2],S=w[1],C=w[3]):w.length?(T=S=w[0],M=C=w[1]):(T=w.x,S=w.y,M=w.x+w.width,C=w.y+w.height),[T,v,M,i]}function o(s){if(typeof s=="number")return[s,s,s,s];if(s.length===2)return[s[0],s[1],s[0],s[1]];{let c=e(s);return[c.x,c.y,c.x+c.width,c.y+c.height]}}}}),Sq=ze({"src/traces/splom/plot.js"(J,G){"use strict";var p=Mq(),b=Nr(),E=Xl(),k=Fd().selectMode;G.exports=function(t,n,r){if(r.length)for(var a=0;a-1,B=k(v)||!!a.selectedpoints||D,F=!0;if(B){var P=a._length;if(a.selectedpoints){s.selectBatch=a.selectedpoints;var j=a.selectedpoints,U={};for(T=0;T=$[Q][0]&&U<=$[Q][1])return!0;return!1}function c(U){U.attr("x",-p.bar.captureWidth/2).attr("width",p.bar.captureWidth)}function g(U){U.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function f(U){if(!U.brush.filterSpecified)return"0,"+U.height;for(var $=v(U.brush.filter.getConsolidated(),U.height),Q=[0],re,ne,se,V=$.length?$[0][0]:null,Z=0;Z<$.length;Z++)re=$[Z],ne=re[1]-re[0],Q.push(V),Q.push(ne),se=Z+1,se<$.length&&(V=$[se][0]-re[1]);return Q.push(U.height),Q}function v(U,$){return U.map(function(Q){return Q.map(function(re){return Math.max(0,re*$)}).sort(l)})}function m(U,$){var Q=p.bar.handleHeight;if(!($>U[1]+Q||$=.9*U[1]+.1*U[0]?"n":$<=.9*U[0]+.1*U[1]?"s":"ns"}function i(){b.select(document.body).style("cursor",null)}function T(U){U.attr("stroke-dasharray",f)}function S(U,$){var Q=b.select(U).selectAll(".highlight, .highlight-shadow"),re=$?Q.transition().duration(p.bar.snapDuration).each("end",$):Q;T(re)}function M(U,$){var Q=U.brush,re=Q.filterSpecified,ne=NaN,se={},V;if(re){var Z=U.height,K=Q.filter.getConsolidated(),H=v(K,Z),X=NaN,q=NaN,W=NaN;for(V=0;V<=H.length;V++){var ee=H[V];if(ee&&ee[0]<=$&&$<=ee[1]){X=V;break}else if(q=V?V-1:NaN,ee&&ee[0]>$){W=V;break}}if(ne=X,isNaN(ne)&&(isNaN(q)||isNaN(W)?ne=isNaN(q)?W:q:ne=$-H[q][1]=Me[0]&&we<=Me[1]){se.clickableOrdinalRange=Me;break}}}return se}function C(U,$){b.event.sourceEvent.stopPropagation();var Q=$.height-b.mouse(U)[1]-2*p.verticalPadding,re=$.unitToPaddedPx.invert(Q),ne=$.brush,se=M($,Q),V=se.interval,Z=ne.svgBrush;if(Z.wasDragged=!1,Z.grabbingBar=se.region==="ns",Z.grabbingBar){var K=V.map($.unitToPaddedPx);Z.grabPoint=Q-K[0]-p.verticalPadding,Z.barLength=K[1]-K[0]}Z.clickableOrdinalRange=se.clickableOrdinalRange,Z.stayingIntervals=$.multiselect&&ne.filterSpecified?ne.filter.getConsolidated():[],V&&(Z.stayingIntervals=Z.stayingIntervals.filter(function(H){return H[0]!==V[0]&&H[1]!==V[1]})),Z.startExtent=se.region?V[se.region==="s"?1:0]:re,$.parent.inBrushDrag=!0,Z.brushStartCallback()}function _(U,$){b.event.sourceEvent.stopPropagation();var Q=$.height-b.mouse(U)[1]-2*p.verticalPadding,re=$.brush.svgBrush;re.wasDragged=!0,re._dragging=!0,re.grabbingBar?re.newExtent=[Q-re.grabPoint,Q+re.barLength-re.grabPoint].map($.unitToPaddedPx.invert):re.newExtent=[re.startExtent,$.unitToPaddedPx.invert(Q)].sort(l),$.brush.filterSpecified=!0,re.extent=re.stayingIntervals.concat([re.newExtent]),re.brushCallback($),S(U.parentNode)}function w(U,$){var Q=$.brush,re=Q.filter,ne=Q.svgBrush;ne._dragging||(h(U,$),_(U,$),$.brush.svgBrush.wasDragged=!1),ne._dragging=!1;var se=b.event;se.sourceEvent.stopPropagation();var V=ne.grabbingBar;if(ne.grabbingBar=!1,ne.grabLocation=void 0,$.parent.inBrushDrag=!1,i(),!ne.wasDragged){ne.wasDragged=void 0,ne.clickableOrdinalRange?Q.filterSpecified&&$.multiselect?ne.extent.push(ne.clickableOrdinalRange):(ne.extent=[ne.clickableOrdinalRange],Q.filterSpecified=!0):V?(ne.extent=ne.stayingIntervals,ne.extent.length===0&&O(Q)):O(Q),ne.brushCallback($),S(U.parentNode),ne.brushEndCallback(Q.filterSpecified?re.getConsolidated():[]);return}var Z=function(){re.set(re.getConsolidated())};if($.ordinal){var K=$.unitTickvals;K[K.length-1]ne.newExtent[0];ne.extent=ne.stayingIntervals.concat(H?[ne.newExtent]:[]),ne.extent.length||O(Q),ne.brushCallback($),H?S(U.parentNode,Z):(Z(),S(U.parentNode))}else Z();ne.brushEndCallback(Q.filterSpecified?re.getConsolidated():[])}function h(U,$){var Q=$.height-b.mouse(U)[1]-2*p.verticalPadding,re=M($,Q),ne="crosshair";re.clickableOrdinalRange?ne="pointer":re.region&&(ne=re.region+"-resize"),b.select(document.body).style("cursor",ne)}function u(U){U.on("mousemove",function($){b.event.preventDefault(),$.parent.inBrushDrag||h(this,$)}).on("mouseleave",function($){$.parent.inBrushDrag||i()}).call(b.behavior.drag().on("dragstart",function($){C(this,$)}).on("drag",function($){_(this,$)}).on("dragend",function($){w(this,$)}))}function A(U,$){return U[0]-$[0]}function x(U,$,Q){var re=Q._context.staticPlot,ne=U.selectAll(".background").data(k);ne.enter().append("rect").classed("background",!0).call(c).call(g).style("pointer-events",re?"none":"auto").attr("transform",e(0,p.verticalPadding)),ne.call(u).attr("height",function(Z){return Z.height-p.verticalPadding});var se=U.selectAll(".highlight-shadow").data(k);se.enter().append("line").classed("highlight-shadow",!0).attr("x",-p.bar.width/2).attr("stroke-width",p.bar.width+p.bar.strokeWidth).attr("stroke",$).attr("opacity",p.bar.strokeOpacity).attr("stroke-linecap","butt"),se.attr("y1",function(Z){return Z.height}).call(T);var V=U.selectAll(".highlight").data(k);V.enter().append("line").classed("highlight",!0).attr("x",-p.bar.width/2).attr("stroke-width",p.bar.width-p.bar.strokeWidth).attr("stroke",p.bar.fillColor).attr("opacity",p.bar.fillOpacity).attr("stroke-linecap","butt"),V.attr("y1",function(Z){return Z.height}).call(T)}function z(U,$,Q){var re=U.selectAll("."+p.cn.axisBrush).data(k,E);re.enter().append("g").classed(p.cn.axisBrush,!0),x(re,$,Q)}function I(U){return U.svgBrush.extent.map(function($){return $.slice()})}function O(U){U.filterSpecified=!1,U.svgBrush.extent=[[-1/0,1/0]]}function D(U){return function(Q){var re=Q.brush,ne=I(re),se=ne.slice();re.filter.set(se),U()}}function B(U){for(var $=U.slice(),Q=[],re,ne=$.shift();ne;){for(re=ne.slice();(ne=$.shift())&&ne[0]<=re[1];)re[1]=Math.max(re[1],ne[1]);Q.push(re)}return Q.length===1&&Q[0][0]>Q[0][1]&&(Q=[]),Q}function F(){var U=[],$,Q;return{set:function(re){U=re.map(function(ne){return ne.slice().sort(l)}).sort(A),U.length===1&&U[0][0]===-1/0&&U[0][1]===1/0&&(U=[[0,-1]]),$=B(U),Q=U.reduce(function(ne,se){return[Math.min(ne[0],se[0]),Math.max(ne[1],se[1])]},[1/0,-1/0])},get:function(){return U.slice()},getConsolidated:function(){return $},getBounds:function(){return Q}}}function P(U,$,Q,re,ne,se){var V=F();return V.set(Q),{filter:V,filterSpecified:$,svgBrush:{extent:[],brushStartCallback:re,brushCallback:D(ne),brushEndCallback:se}}}function j(U,$){if(Array.isArray(U[0])?(U=U.map(function(re){return re.sort(l)}),$.multiselect?U=B(U.sort(A)):U=[U[0]]):U=[U.sort(l)],$.tickvals){var Q=$.tickvals.slice().sort(l);if(U=U.map(function(re){var ne=[o(0,Q,re[0],[]),o(1,Q,re[1],[])];if(ne[1]>ne[0])return ne}).filter(function(re){return re}),!U.length)return}return U.length>1?U:U[0]}G.exports={makeBrush:P,ensureAxisBrush:z,cleanRanges:j}}}),Dq=ze({"src/traces/parcoords/defaults.js"(J,G){"use strict";var p=Nr(),b=Bf().hasColorscale,E=qc(),k=Ml().defaults,l=Jf(),e=Gi(),t=xM(),n=bM(),r=sy().maxDimensionCount,a=U2();function o(c,g,f,v,m){var i=m("line.color",f);if(b(c,"line")&&p.isArrayOrTypedArray(i)){if(i.length)return m("line.colorscale"),E(c,g,v,m,{prefix:"line.",cLetter:"c"}),i.length;g.line.color=f}return 1/0}function s(c,g,f,v){function m(C,_){return p.coerce(c,g,t.dimensions,C,_)}var i=m("values"),T=m("visible");if(i&&i.length||(T=g.visible=!1),T){m("label"),m("tickvals"),m("ticktext"),m("tickformat");var S=m("range");g._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:S},e.setConvert(g._ax,v.layout),m("multiselect");var M=m("constraintrange");M&&(g.constraintrange=n.cleanRanges(M,g))}}G.exports=function(g,f,v,m){function i(_,w){return p.coerce(g,f,t,_,w)}var T=g.dimensions;Array.isArray(T)&&T.length>r&&(p.log("parcoords traces support up to "+r+" dimensions at the moment"),T.splice(r));var S=l(g,f,{name:"dimensions",layout:m,handleItemDefaults:s}),M=o(g,f,v,m,i);k(f,m,i),(!Array.isArray(S)||!S.length)&&(f.visible=!1),a(f,S,"values",M);var C=p.extendFlat({},m.font,{size:Math.round(m.font.size/1.2)});p.coerceFont(i,"labelfont",C),p.coerceFont(i,"tickfont",C,{autoShadowDflt:!0}),p.coerceFont(i,"rangefont",C),i("labelangle"),i("labelside"),i("unselected.line.color"),i("unselected.line.opacity")}}}),Fq=ze({"src/traces/parcoords/calc.js"(J,G){"use strict";var p=Nr().isArrayOrTypedArray,b=fl(),E=Vd().wrap;G.exports=function(e,t){var n,r;return b.hasColorscale(t,"line")&&p(t.line.color)?(n=t.line.color,r=b.extractOpts(t.line).colorscale,b.calc(e,t,{vals:n,containerStr:"line",cLetter:"c"})):(n=k(t._length),r=[[0,t.line.color],[1,t.line.color]]),E({lineColor:n,cscale:r})};function k(l){for(var e=new Array(l),t=0;t 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` `),b=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),E=sy().maxDimensionCount,k=Nr(),l=1e-6,e=2048,t=new Uint8Array(4),n=new Uint8Array(4),r={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function a(T){T.read({x:0,y:0,width:1,height:1,data:t})}function o(T,f,u,A,x){var z=T._gl;z.enable(z.SCISSOR_TEST),z.scissor(f,u,A,x),T.clear({color:[0,0,0,0],depth:1})}function s(T,f,u,A,x,z){var I=z.key;function O(D){var B=Math.min(A,x-D*A);D===0&&(window.cancelAnimationFrame(u.currentRafs[I]),delete u.currentRafs[I],o(T,z.scissorX,z.scissorY,z.scissorWidth,z.viewBoxSize[1])),!u.clearOnly&&(z.count=2*B,z.offset=2*D*A,f(z),D*A+B>>8*f)%256/255}function v(T,f,u){for(var A=new Array(T*(E+4)),x=0,z=0;zSe&&(Se=q[he].dim1.canvasX,we=he);ae===0&&o(x,0,0,B.canvasWidth,B.canvasHeight);var Ie=G(u);for(he=0;hehe._length&&(_e=_e.slice(0,he._length));var ce=he.tickvals,ve;function le(yt,gt){return{val:yt,text:ve[gt]}}function Ae(yt,gt){return yt.val-gt.val}if(E(ce)&&ce.length){b.isTypedArray(ce)&&(ce=Array.from(ce)),ve=he.ticktext,!E(ve)||!ve.length?ve=ce.map(k(he.tickformat)):ve.length>ce.length?ve=ve.slice(0,ce.length):ce.length>ve.length&&(ce=ce.slice(0,ve.length));for(var Be=1;Be=gt||rr>=Tt)return;var _r=Ye.lineLayer.readPixel($t,Tt-1-rr),Xt=_r[3]!==0,or=Xt?_r[2]+256*(_r[1]+256*_r[0]):null,Ot={x:$t,y:rr,clientX:yt.clientX,clientY:yt.clientY,dataIndex:Ye.model.key,curveNumber:or};or!==we&&(Xt?X.hover(Ot):X.unhover&&X.unhover(Ot),we=or)}}),xe.style("opacity",function(Ye){return Ye.pick?0:1}),Y.style("background","rgba(255, 255, 255, 0)");var Se=Y.selectAll("."+g.cn.parcoords).data(he,c);Se.exit().remove(),Se.enter().append("g").classed(g.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Se.attr("transform",function(Ye){return n(Ye.model.translateX,Ye.model.translateY)});var Ie=Se.selectAll("."+g.cn.parcoordsControlView).data(m,c);Ie.enter().append("g").classed(g.cn.parcoordsControlView,!0),Ie.attr("transform",function(Ye){return n(Ye.model.pad.l,Ye.model.pad.t)});var Ve=Ie.selectAll("."+g.cn.yAxis).data(function(Ye){return Ye.dimensions},c);Ve.enter().append("g").classed(g.cn.yAxis,!0),Ie.each(function(Ye){j(Ve,Ye,Z)}),xe.each(function(Ye){if(Ye.viewModel){!Ye.lineLayer||X?Ye.lineLayer=w(this,Ye):Ye.lineLayer.update(Ye),(Ye.key||Ye.key===0)&&(Ye.viewModel[Ye.key]=Ye.lineLayer);var yt=!Ye.context||X;Ye.lineLayer.render(Ye.viewModel.panels,yt)}}),Ve.attr("transform",function(Ye){return n(Ye.xScale(Ye.xIndex),0)}),Ve.call(p.behavior.drag().origin(function(Ye){return Ye}).on("drag",function(Ye){var yt=Ye.parent;ae.linePickActive(!1),Ye.x=Math.max(-g.overdrag,Math.min(Ye.model.width+g.overdrag,p.event.x)),Ye.canvasX=Ye.x*Ye.model.canvasPixelRatio,Ve.sort(function(gt,Tt){return gt.x-Tt.x}).each(function(gt,Tt){gt.xIndex=Tt,gt.x=Ye===gt?gt.x:gt.xScale(gt.xIndex),gt.canvasX=gt.x*gt.model.canvasPixelRatio}),j(Ve,yt,Z),Ve.filter(function(gt){return Math.abs(Ye.xIndex-gt.xIndex)!==0}).attr("transform",function(gt){return n(gt.xScale(gt.xIndex),0)}),p.select(this).attr("transform",n(Ye.x,0)),Ve.each(function(gt,Tt,At){At===Ye.parent.key&&(yt.dimensions[Tt]=gt)}),yt.contextLayer&&yt.contextLayer.render(yt.panels,!1,!I(yt)),yt.focusLayer.render&&yt.focusLayer.render(yt.panels)}).on("dragend",function(Ye){var yt=Ye.parent;Ye.x=Ye.xScale(Ye.xIndex),Ye.canvasX=Ye.x*Ye.model.canvasPixelRatio,j(Ve,yt,Z),p.select(this).attr("transform",function(gt){return n(gt.x,0)}),yt.contextLayer&&yt.contextLayer.render(yt.panels,!1,!I(yt)),yt.focusLayer&&yt.focusLayer.render(yt.panels),yt.pickLayer&&yt.pickLayer.render(yt.panels,!0),ae.linePickActive(!0),X&&X.axesMoved&&X.axesMoved(yt.key,yt.dimensions.map(function(gt){return gt.crossfilterDimensionIndex}))})),Ve.exit().remove();var Ge=Ve.selectAll("."+g.cn.axisOverlays).data(m,c);Ge.enter().append("g").classed(g.cn.axisOverlays,!0),Ge.selectAll("."+g.cn.axis).remove();var ke=Ge.selectAll("."+g.cn.axis).data(m,c);ke.enter().append("g").classed(g.cn.axis,!0),ke.each(function(Ye){var yt=Ye.model.height/Ye.model.tickDistance,gt=Ye.domainScale,Tt=gt.domain();p.select(this).call(p.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(yt,Ye.tickFormat).tickValues(Ye.ordinal?Tt:null).tickFormat(function(At){return v.isOrdinal(Ye)?At:$(Ye.model.dimensions[Ye.visibleIndex],At)}).scale(gt)),a.font(ke.selectAll("text"),Ye.model.tickFont)}),ke.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),ke.selectAll("text").style("cursor","default");var _e=Ge.selectAll("."+g.cn.axisHeading).data(m,c);_e.enter().append("g").classed(g.cn.axisHeading,!0);var ce=_e.selectAll("."+g.cn.axisTitle).data(m,c);ce.enter().append("text").classed(g.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",K?"none":"auto"),ce.text(function(Ye){return Ye.label}).each(function(Ye){var yt=p.select(this);a.font(yt,Ye.model.labelFont),r.convertToTspans(yt,ne)}).attr("transform",function(Ye){var yt=P(Ye.model.labelAngle,Ye.model.labelSide),gt=g.axisTitleOffset;return(yt.dir>0?"":n(0,2*gt+Ye.model.height))+t(yt.degrees)+n(-gt*yt.dx,-gt*yt.dy)}).attr("text-anchor",function(Ye){var yt=P(Ye.model.labelAngle,Ye.model.labelSide),gt=Math.abs(yt.dx),Tt=Math.abs(yt.dy);return 2*gt>Tt?yt.dir*yt.dx<0?"start":"end":"middle"});var ve=Ge.selectAll("."+g.cn.axisExtent).data(m,c);ve.enter().append("g").classed(g.cn.axisExtent,!0);var le=ve.selectAll("."+g.cn.axisExtentTop).data(m,c);le.enter().append("g").classed(g.cn.axisExtentTop,!0),le.attr("transform",n(0,-g.axisExtentOffset));var Ae=le.selectAll("."+g.cn.axisExtentTopText).data(m,c);Ae.enter().append("text").classed(g.cn.axisExtentTopText,!0).call(B),Ae.text(function(Ye){return Q(Ye,!0)}).each(function(Ye){a.font(p.select(this),Ye.model.rangeFont)});var Be=ve.selectAll("."+g.cn.axisExtentBottom).data(m,c);Be.enter().append("g").classed(g.cn.axisExtentBottom,!0),Be.attr("transform",function(Ye){return n(0,Ye.model.height+g.axisExtentOffset)});var Xe=Be.selectAll("."+g.cn.axisExtentBottomText).data(m,c);Xe.enter().append("text").classed(g.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(B),Xe.text(function(Ye){return Q(Ye,!1)}).each(function(Ye){a.font(p.select(this),Ye.model.rangeFont)}),i.ensureAxisBrush(Ge,ee,ne)}}}),TM=ze({"src/traces/parcoords/plot.js"(t,V){"use strict";var p=Bq(),b=j2(),E=wM().isVisible,k={};function l(n,r,a){var o=r.indexOf(a),s=n.indexOf(o);return s===-1&&(s+=r.length),s}function e(n,r){return function(o,s){return l(n,r,o)-l(n,r,s)}}var t=V.exports=function(r,a){var o=r._fullLayout,s=b(r,[],k);if(s){var c={},m={},h={},v=o._size;a.forEach(function(M,C){var _=M[0].trace,T=h[C]=_.index;c[C]=r.data[T].dimensions,m[C]=r.data[T].dimensions.slice()});var g=function(M,C,_){var T=m[M][C],f=_.map(function(O){return O.slice()}),u="dimensions["+C+"].constraintrange",A=o._tracePreGUI[r._fullData[h[M]].uid];if(A[u]===void 0){var x=T.constraintrange;A[u]=x||null}var z=r._fullData[h[M]].dimensions[C];f.length?(f.length===1&&(f=f[0]),T.constraintrange=f,z.constraintrange=f.slice(),f=[f]):(delete T.constraintrange,delete z.constraintrange,f=null);var I={};I[u]=f,r.emit("plotly_restyle",[I,[h[M]]])},i=function(M){r.emit("plotly_hover",M)},w=function(M){r.emit("plotly_unhover",M)},S=function(M,C){var _=e(C,m[M].filter(E));c[M].sort(_),m[M].filter(function(T){return!E(T)}).sort(function(T){return m[M].indexOf(T)}).forEach(function(T){c[M].splice(c[M].indexOf(T),1),c[M].splice(m[M].indexOf(T),0,T)}),r.emit("plotly_restyle",[{dimensions:[c[M]]},[h[M]]])};p(r,a,{width:v.w,height:v.h,margin:{t:v.t,r:v.r,b:v.b,l:v.l}},{filterChanged:g,hover:i,unhover:w,axesMoved:S})}};t.reglPrecompiled=k}}),Oq=ze({"src/traces/parcoords/base_plot.js"(J){"use strict";var V=ci(),p=zf().getModuleCalcData,b=TM(),E=nd();J.name="parcoords",J.plot=function(k){var l=p(k.calcdata,"parcoords")[0];l.length&&b(k,l)},J.clean=function(k,l,e,t){var n=t._has&&t._has("parcoords"),r=l._has&&l._has("parcoords");n&&!r&&(t._paperdiv.selectAll(".parcoords").remove(),t._glimages.selectAll("*").remove())},J.toSVG=function(k){var l=k._fullLayout._glimages,e=V.select(k).selectAll(".svg-container"),t=e.filter(function(r,a){return a===e.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function n(){var r=this,a=r.toDataURL("image/png"),o=l.append("svg:image");o.attr({xmlns:E.svg,"xlink:href":a,preserveAspectRatio:"none",x:0,y:0,width:r.style.width,height:r.style.height})}t.each(n),window.setTimeout(function(){V.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),Nq=ze({"src/traces/parcoords/base_index.js"(J,V){"use strict";V.exports={attributes:xM(),supplyDefaults:Dq(),calc:Fq(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:Oq(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),jq=ze({"src/traces/parcoords/index.js"(J,V){"use strict";var p=Nq();p.plot=TM(),V.exports=p}}),Uq=ze({"lib/parcoords.js"(J,V){"use strict";V.exports=jq()}}),AM=ze({"src/traces/parcats/attributes.js"(J,V){"use strict";var p=Ki().extendFlat,b=ws(),E=Qs(),k=qs(),{hovertemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=Ml().attributes,n=p({editType:"calc"},k("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:e({editType:"plot"})});V.exports={domain:t({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:p({},b.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:e({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:E({editType:"calc"}),tickfont:E({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:n,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}}),qq=ze({"src/traces/parcats/defaults.js"(J,V){"use strict";var p=Nr(),b=Bf().hasColorscale,E=qc(),k=Ml().defaults,l=Jf(),e=AM(),t=U2(),n=Ff().isTypedArraySpec;function r(o,s,c,m,h){h("line.shape"),h("line.hovertemplate"),h("line.hovertemplatefallback");var v=h("line.color",m.colorway[0]);if(b(o,"line")&&p.isArrayOrTypedArray(v)){if(v.length)return h("line.colorscale"),E(o,s,m,h,{prefix:"line.",cLetter:"c"}),v.length;s.line.color=c}return 1/0}function a(o,s){function c(S,M){return p.coerce(o,s,e.dimensions,S,M)}var m=c("values"),h=c("visible");if(m&&m.length||(h=s.visible=!1),h){c("label"),c("displayindex",s._index);var v=o.categoryarray,g=p.isArrayOrTypedArray(v)&&v.length>0||n(v),i;g&&(i="array");var w=c("categoryorder",i);w==="array"?(c("categoryarray"),c("ticktext")):(delete o.categoryarray,delete o.ticktext),!g&&w==="array"&&(s.categoryorder="trace")}}V.exports=function(s,c,m,h){function v(S,M){return p.coerce(s,c,e,S,M)}var g=l(s,c,{name:"dimensions",handleItemDefaults:a}),i=r(s,c,m,h,v);k(c,h,v),(!Array.isArray(g)||!g.length)&&(c.visible=!1),t(c,g,"values",i),v("hoveron"),v("hovertemplate"),v("hovertemplatefallback"),v("arrangement"),v("bundlecolors"),v("sortpaths"),v("counts");var w=h.font;p.coerceFont(v,"labelfont",w,{overrideDflt:{size:Math.round(w.size)}}),p.coerceFont(v,"tickfont",w,{autoShadowDflt:!0,overrideDflt:{size:Math.round(w.size/1.2)}})}}}),Vq=ze({"src/traces/parcats/calc.js"(J,V){"use strict";var p=Vd().wrap,b=Bf().hasColorscale,E=Qf(),k=Bw(),l=$i(),e=Nr(),t=ao();V.exports=function(w,S){var M=e.filterVisible(S.dimensions);if(M.length===0)return[];var C=M.map(function(G){var X;if(G.categoryorder==="trace")X=null;else if(G.categoryorder==="array")X=G.categoryarray;else{X=k(G.values);for(var K=!0,H=0;H=i.length||w[i[S]]!==void 0)return!1;w[i[S]]=!0}return!0}}}),Gq=ze({"src/traces/parcats/parcats.js"(J,V){"use strict";var p=ci(),b=(l0(),Po(_v)).interpolateNumber,E=Ux(),k=Qn(),l=Zl(),e=Nr(),t=e.strTranslate,n=$i(),r=Cs();function a(Y,q,Z,ee){var ae=q._context.staticPlot,he=Y.map(se.bind(0,q,Z)),xe=ee.selectAll("g.parcatslayer").data([null]);xe.enter().append("g").attr("class","parcatslayer").style("pointer-events",ae?"none":"all");var we=xe.selectAll("g.trace.parcats").data(he,o),Me=we.enter().append("g").attr("class","trace parcats");we.attr("transform",function(Ae){return t(Ae.x,Ae.y)}),Me.append("g").attr("class","paths");var Se=we.select("g.paths"),Ie=Se.selectAll("path.path").data(function(Ae){return Ae.paths},o);Ie.attr("fill",function(Ae){return Ae.model.color});var Ve=Ie.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Ae){return Ae.model.color}).attr("fill-opacity",0);S(Ve),Ie.attr("d",function(Ae){return Ae.svgD}),Ve.empty()||Ie.sort(c),Ie.exit().remove(),Ie.on("mouseover",h).on("mouseout",v).on("click",w),Me.append("g").attr("class","dimensions");var Ge=we.select("g.dimensions"),ke=Ge.selectAll("g.dimension").data(function(Ae){return Ae.dimensions},o);ke.enter().append("g").attr("class","dimension"),ke.attr("transform",function(Ae){return t(Ae.x,0)}),ke.exit().remove();var _e=ke.selectAll("g.category").data(function(Ae){return Ae.categories},o),ce=_e.enter().append("g").attr("class","category");_e.attr("transform",function(Ae){return t(0,Ae.y)}),ce.append("rect").attr("class","catrect").attr("pointer-events","none"),_e.select("rect.catrect").attr("fill","none").attr("width",function(Ae){return Ae.width}).attr("height",function(Ae){return Ae.height}),_(ce);var ve=_e.selectAll("rect.bandrect").data(function(Ae){return Ae.bands},o);ve.each(function(){e.raiseToTop(this)}),ve.attr("fill",function(Ae){return Ae.color});var le=ve.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Ae){return Ae.color}).attr("fill-opacity",0);ve.attr("fill",function(Ae){return Ae.color}).attr("width",function(Ae){return Ae.width}).attr("height",function(Ae){return Ae.height}).attr("y",function(Ae){return Ae.y}).attr("cursor",function(Ae){return Ae.parcatsViewModel.arrangement==="fixed"?"default":Ae.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),f(le),ve.exit().remove(),ce.append("text").attr("class","catlabel").attr("pointer-events","none"),_e.select("text.catlabel").attr("text-anchor",function(Ae){return s(Ae)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(Ae){return s(Ae)?Ae.width+5:-5}).attr("y",function(Ae){return Ae.height/2}).text(function(Ae){return Ae.model.categoryLabel}).each(function(Ae){n.font(p.select(this),Ae.parcatsViewModel.categorylabelfont),r.convertToTspans(p.select(this),q)}),ce.append("text").attr("class","dimlabel"),_e.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Ae){return Ae.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Ae){return Ae.width/2}).attr("y",-5).text(function(Ae,Be){return Be===0?Ae.parcatsViewModel.model.dimensions[Ae.model.dimensionInd].dimensionLabel:null}).each(function(Ae){n.font(p.select(this),Ae.parcatsViewModel.labelfont)}),_e.selectAll("rect.bandrect").on("mouseover",F).on("mouseout",P),_e.exit().remove(),ke.call(p.behavior.drag().origin(function(Ae){return{x:Ae.x,y:0}}).on("dragstart",j).on("drag",U).on("dragend",$)),we.each(function(Ae){Ae.traceSelection=p.select(this),Ae.pathSelection=p.select(this).selectAll("g.paths").selectAll("path.path"),Ae.dimensionSelection=p.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),we.exit().remove()}V.exports=function(Y,q,Z,ee){a(Z,Y,ee,q)};function o(Y){return Y.key}function s(Y){var q=Y.parcatsViewModel.dimensions.length,Z=Y.parcatsViewModel.dimensions[q-1].model.dimensionInd;return Y.model.dimensionInd===Z}function c(Y,q){return Y.model.rawColor>q.model.rawColor?1:Y.model.rawColorae)return 1;if(ee!==ae){var he=isNaN(ee),xe=isNaN(ae);if(he!==xe)return he?1:-1}}return Y.length-q.length}function h(Y){if(!Y.parcatsViewModel.dragDimension&&Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){e.raiseToTop(this),M(p.select(this));var q=g(Y),Z=i(Y);if(Y.parcatsViewModel.graphDiv.emit("plotly_hover",{points:q,event:p.event,constraints:Z}),Y.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var ee=p.mouse(this)[0],ae=Y.parcatsViewModel.graphDiv,he=Y.parcatsViewModel.trace,xe=ae._fullLayout,we=xe._paperdiv.node().getBoundingClientRect(),Me=Y.parcatsViewModel.graphDiv.getBoundingClientRect(),Se,Ie,Ve;for(Ve=0;Ve"),yt=p.mouse(ae)[0];l.loneHover({trace:he,x:_e-we.left+Me.left,y:ce-we.top+Me.top,text:Ye,color:Y.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:ve,idealAlign:yt<_e?"right":"left",hovertemplate:(he.line||{}).hovertemplate,hovertemplateLabels:Be,eventData:[{data:he._input,fullData:he,count:le,probability:Ae}]},{container:xe._hoverlayer.node(),outerContainer:xe._paper.node(),gd:ae})}}}function v(Y){if(!Y.parcatsViewModel.dragDimension&&(S(p.select(this)),l.loneUnhover(Y.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),Y.parcatsViewModel.pathSelection.sort(c),Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var q=g(Y),Z=i(Y);Y.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:q,event:p.event,constraints:Z})}}function g(Y){for(var q=[],Z=Q(Y.parcatsViewModel),ee=0;eek.mostReadable(q.model.color)).attr("stroke-width",.3)}function C(Y){Y.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function _(Y){Y.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function T(Y){Y.attr("stroke","black").attr("stroke-width",1.5)}function f(Y){Y.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function u(Y){var q=Y.parcatsViewModel.pathSelection,Z=Y.categoryViewModel.model.dimensionInd,ee=Y.categoryViewModel.model.categoryInd;return q.filter(function(ae){return ae.model.categoryInds[Z]===ee&&ae.model.color===Y.color})}function A(Y){var q=p.select(Y.parentNode).selectAll("rect.bandrect");q.each(function(Z){var ee=u(Z);M(ee),ee.each(function(){e.raiseToTop(this)})}),C(p.select(Y.parentNode))}function x(Y){var q=p.select(Y).datum(),Z=u(q);M(Z),Z.each(function(){e.raiseToTop(this)}),p.select(Y.parentNode).selectAll("rect.bandrect").filter(function(ee){return ee.color===q.color}).each(function(){e.raiseToTop(this),T(p.select(this))})}function z(Y,q,Z){var ee=p.select(Y).datum(),ae=ee.categoryViewModel.model,he=ee.parcatsViewModel.graphDiv,xe=p.select(Y.parentNode).selectAll("rect.bandrect"),we=[];xe.each(function(Se){var Ie=u(Se);Ie.each(function(Ve){Array.prototype.push.apply(we,g(Ve))})});var Me={};Me[ae.dimensionInd]=ae.categoryValue,he.emit(q,{points:we,event:Z,constraints:Me})}function I(Y,q,Z){var ee=p.select(Y).datum(),ae=ee.categoryViewModel.model,he=ee.parcatsViewModel.graphDiv,xe=u(ee),we=[];xe.each(function(Se){Array.prototype.push.apply(we,g(Se))});var Me={};Me[ae.dimensionInd]=ae.categoryValue,ee.rawColor!==void 0&&(Me.color=ee.rawColor),he.emit(q,{points:we,event:Z,constraints:Me})}function O(Y,q,Z){Y._fullLayout._calcInverseTransform(Y);var ee=Y._fullLayout._invScaleX,ae=Y._fullLayout._invScaleY,he=p.select(Z.parentNode).select("rect.catrect"),xe=he.node().getBoundingClientRect(),we=he.datum(),Me=we.parcatsViewModel,Se=Me.model.dimensions[we.model.dimensionInd],Ie=Me.trace,Ve=xe.top+xe.height/2,Ge,ke;Me.dimensions.length>1&&Se.displayInd===Me.dimensions.length-1?(Ge=xe.left,ke="left"):(Ge=xe.left+xe.width,ke="right");var _e=we.model.count,ce=we.model.categoryLabel,ve=_e/we.parcatsViewModel.model.count,le={countLabel:_e,categoryLabel:ce,probabilityLabel:ve.toFixed(3)},Ae=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ae.push(["Count:",le.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Ae.push(["P("+le.categoryLabel+"):",le.probabilityLabel].join(" "));var Be=Ae.join("
");return{trace:Ie,x:ee*(Ge-q.left),y:ae*(Ve-q.top),text:Be,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:ke,hovertemplate:Ie.hovertemplate,hovertemplateLabels:le,eventData:[{data:Ie._input,fullData:Ie,count:_e,category:ce,probability:ve}]}}function D(Y,q,Z){var ee=[];return p.select(Z.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ae=this;ee.push(O(Y,q,ae))}),ee}function B(Y,q,Z){Y._fullLayout._calcInverseTransform(Y);var ee=Y._fullLayout._invScaleX,ae=Y._fullLayout._invScaleY,he=Z.getBoundingClientRect(),xe=p.select(Z).datum(),we=xe.categoryViewModel,Me=we.parcatsViewModel,Se=Me.model.dimensions[we.model.dimensionInd],Ie=Me.trace,Ve=he.y+he.height/2,Ge,ke;Me.dimensions.length>1&&Se.displayInd===Me.dimensions.length-1?(Ge=he.left,ke="left"):(Ge=he.left+he.width,ke="right");var _e=we.model.categoryLabel,ce=xe.parcatsViewModel.model.count,ve=0;xe.categoryViewModel.bands.forEach(function($t){$t.color===xe.color&&(ve+=$t.count)});var le=we.model.count,Ae=0;Me.pathSelection.each(function($t){$t.model.color===xe.color&&(Ae+=$t.model.count)});var Be=ve/ce,Xe=ve/Ae,Ye=ve/le,yt={countLabel:ve,categoryLabel:_e,probabilityLabel:Be.toFixed(3)},gt=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&>.push(["Count:",yt.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(gt.push("P(color \u2229 "+_e+"): "+yt.probabilityLabel),gt.push("P("+_e+" | color): "+Xe.toFixed(3)),gt.push("P(color | "+_e+"): "+Ye.toFixed(3)));var Tt=gt.join("
"),At=k.mostReadable(xe.color);return{trace:Ie,x:ee*(Ge-q.left),y:ae*(Ve-q.top),text:Tt,color:xe.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:At,fontSize:10,idealAlign:ke,hovertemplate:Ie.hovertemplate,hovertemplateLabels:yt,eventData:[{data:Ie._input,fullData:Ie,category:_e,count:ce,probability:Be,categorycount:le,colorcount:Ae,bandcolorcount:ve}]}}function F(Y){if(!Y.parcatsViewModel.dragDimension&&Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var q=p.mouse(this)[1];if(q<-1)return;var Z=Y.parcatsViewModel.graphDiv,ee=Z._fullLayout,ae=ee._paperdiv.node().getBoundingClientRect(),he=Y.parcatsViewModel.hoveron,xe=this;if(he==="color"?(x(xe),I(xe,"plotly_hover",p.event)):(A(xe),z(xe,"plotly_hover",p.event)),Y.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var we;he==="category"?we=O(Z,ae,xe):he==="color"?we=B(Z,ae,xe):he==="dimension"&&(we=D(Z,ae,xe)),we&&l.loneHover(we,{container:ee._hoverlayer.node(),outerContainer:ee._paper.node(),gd:Z})}}}function P(Y){var q=Y.parcatsViewModel;if(!q.dragDimension&&(S(q.pathSelection),_(q.dimensionSelection.selectAll("g.category")),f(q.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),l.loneUnhover(q.graphDiv._fullLayout._hoverlayer.node()),q.pathSelection.sort(c),q.hoverinfoItems.indexOf("skip")===-1)){var Z=Y.parcatsViewModel.hoveron,ee=this;Z==="color"?I(ee,"plotly_unhover",p.event):z(ee,"plotly_unhover",p.event)}}function j(Y){Y.parcatsViewModel.arrangement!=="fixed"&&(Y.dragDimensionDisplayInd=Y.model.displayInd,Y.initialDragDimensionDisplayInds=Y.parcatsViewModel.model.dimensions.map(function(q){return q.displayInd}),Y.dragHasMoved=!1,Y.dragCategoryDisplayInd=null,p.select(this).selectAll("g.category").select("rect.catrect").each(function(q){var Z=p.mouse(this)[0],ee=p.mouse(this)[1];-2<=Z&&Z<=q.width+2&&-2<=ee&&ee<=q.height+2&&(Y.dragCategoryDisplayInd=q.model.displayInd,Y.initialDragCategoryDisplayInds=Y.model.categories.map(function(ae){return ae.displayInd}),q.model.dragY=q.y,e.raiseToTop(this.parentNode),p.select(this.parentNode).selectAll("rect.bandrect").each(function(ae){ae.yIe.y+Ie.height/2&&(he.model.displayInd=Ie.model.displayInd,Ie.model.displayInd=we),Y.dragCategoryDisplayInd=he.model.displayInd}if(Y.dragCategoryDisplayInd===null||Y.parcatsViewModel.arrangement==="freeform"){ae.model.dragX=p.event.x;var Ve=Y.parcatsViewModel.dimensions[Z],Ge=Y.parcatsViewModel.dimensions[ee];Ve!==void 0&&ae.model.dragXGe.x&&(ae.model.displayInd=Ge.model.displayInd,Ge.model.displayInd=Y.dragDimensionDisplayInd),Y.dragDimensionDisplayInd=ae.model.displayInd}K(Y.parcatsViewModel),X(Y.parcatsViewModel),ne(Y.parcatsViewModel),re(Y.parcatsViewModel)}}function $(Y){if(Y.parcatsViewModel.arrangement!=="fixed"&&Y.dragDimensionDisplayInd!==null){p.select(this).selectAll("text").attr("font-weight","normal");var q={},Z=Q(Y.parcatsViewModel),ee=Y.parcatsViewModel.model.dimensions.map(function(Ge){return Ge.displayInd}),ae=Y.initialDragDimensionDisplayInds.some(function(Ge,ke){return Ge!==ee[ke]});ae&&ee.forEach(function(Ge,ke){var _e=Y.parcatsViewModel.model.dimensions[ke].containerInd;q["dimensions["+_e+"].displayindex"]=Ge});var he=!1;if(Y.dragCategoryDisplayInd!==null){var xe=Y.model.categories.map(function(Ge){return Ge.displayInd});if(he=Y.initialDragCategoryDisplayInds.some(function(Ge,ke){return Ge!==xe[ke]}),he){var we=Y.model.categories.slice().sort(function(Ge,ke){return Ge.displayInd-ke.displayInd}),Me=we.map(function(Ge){return Ge.categoryValue}),Se=we.map(function(Ge){return Ge.categoryLabel});q["dimensions["+Y.model.containerInd+"].categoryarray"]=[Me],q["dimensions["+Y.model.containerInd+"].ticktext"]=[Se],q["dimensions["+Y.model.containerInd+"].categoryorder"]="array"}}if(Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!Y.dragHasMoved&&Y.potentialClickBand&&(Y.parcatsViewModel.hoveron==="color"?I(Y.potentialClickBand,"plotly_click",p.event.sourceEvent):z(Y.potentialClickBand,"plotly_click",p.event.sourceEvent)),Y.model.dragX=null,Y.dragCategoryDisplayInd!==null){var Ie=Y.parcatsViewModel.dimensions[Y.dragDimensionDisplayInd].categories[Y.dragCategoryDisplayInd];Ie.model.dragY=null,Y.dragCategoryDisplayInd=null}Y.dragDimensionDisplayInd=null,Y.parcatsViewModel.dragDimension=null,Y.dragHasMoved=null,Y.potentialClickBand=null,K(Y.parcatsViewModel),X(Y.parcatsViewModel);var Ve=p.transition().duration(300).ease("cubic-in-out");Ve.each(function(){ne(Y.parcatsViewModel,!0),re(Y.parcatsViewModel,!0)}).each("end",function(){(ae||he)&&E.restyle(Y.parcatsViewModel.graphDiv,q,[Z])})}}function Q(Y){for(var q,Z=Y.graphDiv._fullData,ee=0;ee=0;Me--)Se+="C"+xe[Me]+","+(q[Me+1]+ee)+" "+he[Me]+","+(q[Me]+ee)+" "+(Y[Me]+Z[Me])+","+(q[Me]+ee),Se+="l-"+Z[Me]+",0 ";return Se+="Z",Se}function X(Y){var q=Y.dimensions,Z=Y.model,ee=q.map(function(Xt){return Xt.categories.map(function(or){return or.y})}),ae=Y.model.dimensions.map(function(Xt){return Xt.categories.map(function(or){return or.displayInd})}),he=Y.model.dimensions.map(function(Xt){return Xt.displayInd}),xe=Y.dimensions.map(function(Xt){return Xt.model.dimensionInd}),we=q.map(function(Xt){return Xt.x}),Me=q.map(function(Xt){return Xt.width}),Se=[];for(var Ie in Z.paths)Z.paths.hasOwnProperty(Ie)&&Se.push(Z.paths[Ie]);function Ve(Xt){var or=Xt.categoryInds.map(function(vt,ht){return ae[ht][vt]}),Ot=xe.map(function(vt){return or[vt]});return Ot}Se.sort(function(Xt,or){var Ot=Ve(Xt),vt=Ve(or);return Y.sortpaths==="backward"&&(Ot.reverse(),vt.reverse()),Ot.push(Xt.valueInds[0]),vt.push(or.valueInds[0]),Y.bundlecolors&&(Ot.unshift(Xt.rawColor),vt.unshift(or.rawColor)),m(Ot,vt)});for(var Ge=new Array(Se.length),ke=q[0].model.count,_e=q[0].categories.map(function(Xt){return Xt.height}).reduce(function(Xt,or){return Xt+or}),ce=0;ce0?le=_e*(ve.count/ke):le=0;for(var Ae=new Array(ee.length),Be=0;Be1?xe=(Y.width-2*Z-ee)/(ae-1):xe=0,we=Z,Me=we+xe*he;var Se=[],Ie=Y.model.maxCats,Ve=q.categories.length,Ge=8,ke=q.count,_e=Y.height-Ge*(Ie-1),ce,ve,le,Ae,Be,Xe=(Ie-Ve)*Ge/2,Ye=q.categories.map(function(yt){return{displayInd:yt.displayInd,categoryInd:yt.categoryInd}});for(Ye.sort(function(yt,gt){return yt.displayInd-gt.displayInd}),Be=0;Be0?ce=ve.count/ke*_e:ce=0,le={key:ve.valueInds[0],model:ve,width:ee,height:ce,y:ve.dragY!==null?ve.dragY:Xe,bands:[],parcatsViewModel:Y},Xe=Xe+ce+Ge,Se.push(le);return{key:q.dimensionInd,x:q.dragX!==null?q.dragX:Me,y:0,width:ee,model:q,categories:Se,parcatsViewModel:Y,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),MM=ze({"src/traces/parcats/plot.js"(J,V){"use strict";var p=Gq();V.exports=function(E,k,l,e){var t=E._fullLayout,n=t._paper,r=t._size;p(E,n,k,{width:r.w,height:r.h,margin:{t:r.t,r:r.r,b:r.b,l:r.l}},l,e)}}}),Hq=ze({"src/traces/parcats/base_plot.js"(J){"use strict";var V=zf().getModuleCalcData,p=MM(),b="parcats";J.name=b,J.plot=function(E,k,l,e){var t=V(E.calcdata,b);if(t.length){var n=t[0];p(E,n,l,e)}},J.clean=function(E,k,l,e){var t=e._has&&e._has("parcats"),n=k._has&&k._has("parcats");t&&!n&&e._paperdiv.selectAll(".parcats").remove()}}}),Wq=ze({"src/traces/parcats/index.js"(J,V){"use strict";V.exports={attributes:AM(),supplyDefaults:qq(),calc:Vq(),plot:MM(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:Hq(),categories:["noOpacity"],meta:{}}}}),Yq=ze({"lib/parcats.js"(J,V){"use strict";V.exports=Wq()}}),Xq=ze({"src/plots/map/styles/arcgis-sat-hybrid.js"(J,V){"use strict";V.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI ©
ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} +`),E=sy().maxDimensionCount,k=Nr(),l=1e-6,e=2048,t=new Uint8Array(4),n=new Uint8Array(4),r={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function a(w){w.read({x:0,y:0,width:1,height:1,data:t})}function o(w,h,u,A,x){var z=w._gl;z.enable(z.SCISSOR_TEST),z.scissor(h,u,A,x),w.clear({color:[0,0,0,0],depth:1})}function s(w,h,u,A,x,z){var I=z.key;function O(D){var B=Math.min(A,x-D*A);D===0&&(window.cancelAnimationFrame(u.currentRafs[I]),delete u.currentRafs[I],o(w,z.scissorX,z.scissorY,z.scissorWidth,z.viewBoxSize[1])),!u.clearOnly&&(z.count=2*B,z.offset=2*D*A,h(z),D*A+B>>8*h)%256/255}function v(w,h,u){for(var A=new Array(w*(E+4)),x=0,z=0;zSe&&(Se=q[he].dim1.canvasX,we=he);ae===0&&o(x,0,0,B.canvasWidth,B.canvasHeight);var Ie=V(u);for(he=0;hehe._length&&(_e=_e.slice(0,he._length));var ue=he.tickvals,ve;function le(yt,gt){return{val:yt,text:ve[gt]}}function Ae(yt,gt){return yt.val-gt.val}if(E(ue)&&ue.length){b.isTypedArray(ue)&&(ue=Array.from(ue)),ve=he.ticktext,!E(ve)||!ve.length?ve=ue.map(k(he.tickformat)):ve.length>ue.length?ve=ve.slice(0,ue.length):ue.length>ve.length&&(ue=ue.slice(0,ve.length));for(var Be=1;Be=gt||rr>=Tt)return;var _r=Ye.lineLayer.readPixel($t,Tt-1-rr),Xt=_r[3]!==0,or=Xt?_r[2]+256*(_r[1]+256*_r[0]):null,Ot={x:$t,y:rr,clientX:yt.clientX,clientY:yt.clientY,dataIndex:Ye.model.key,curveNumber:or};or!==we&&(Xt?Z.hover(Ot):Z.unhover&&Z.unhover(Ot),we=or)}}),xe.style("opacity",function(Ye){return Ye.pick?0:1}),X.style("background","rgba(255, 255, 255, 0)");var Se=X.selectAll("."+m.cn.parcoords).data(he,c);Se.exit().remove(),Se.enter().append("g").classed(m.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Se.attr("transform",function(Ye){return n(Ye.model.translateX,Ye.model.translateY)});var Ie=Se.selectAll("."+m.cn.parcoordsControlView).data(g,c);Ie.enter().append("g").classed(m.cn.parcoordsControlView,!0),Ie.attr("transform",function(Ye){return n(Ye.model.pad.l,Ye.model.pad.t)});var Ge=Ie.selectAll("."+m.cn.yAxis).data(function(Ye){return Ye.dimensions},c);Ge.enter().append("g").classed(m.cn.yAxis,!0),Ie.each(function(Ye){j(Ge,Ye,W)}),xe.each(function(Ye){if(Ye.viewModel){!Ye.lineLayer||Z?Ye.lineLayer=T(this,Ye):Ye.lineLayer.update(Ye),(Ye.key||Ye.key===0)&&(Ye.viewModel[Ye.key]=Ye.lineLayer);var yt=!Ye.context||Z;Ye.lineLayer.render(Ye.viewModel.panels,yt)}}),Ge.attr("transform",function(Ye){return n(Ye.xScale(Ye.xIndex),0)}),Ge.call(p.behavior.drag().origin(function(Ye){return Ye}).on("drag",function(Ye){var yt=Ye.parent;ae.linePickActive(!1),Ye.x=Math.max(-m.overdrag,Math.min(Ye.model.width+m.overdrag,p.event.x)),Ye.canvasX=Ye.x*Ye.model.canvasPixelRatio,Ge.sort(function(gt,Tt){return gt.x-Tt.x}).each(function(gt,Tt){gt.xIndex=Tt,gt.x=Ye===gt?gt.x:gt.xScale(gt.xIndex),gt.canvasX=gt.x*gt.model.canvasPixelRatio}),j(Ge,yt,W),Ge.filter(function(gt){return Math.abs(Ye.xIndex-gt.xIndex)!==0}).attr("transform",function(gt){return n(gt.xScale(gt.xIndex),0)}),p.select(this).attr("transform",n(Ye.x,0)),Ge.each(function(gt,Tt,At){At===Ye.parent.key&&(yt.dimensions[Tt]=gt)}),yt.contextLayer&&yt.contextLayer.render(yt.panels,!1,!I(yt)),yt.focusLayer.render&&yt.focusLayer.render(yt.panels)}).on("dragend",function(Ye){var yt=Ye.parent;Ye.x=Ye.xScale(Ye.xIndex),Ye.canvasX=Ye.x*Ye.model.canvasPixelRatio,j(Ge,yt,W),p.select(this).attr("transform",function(gt){return n(gt.x,0)}),yt.contextLayer&&yt.contextLayer.render(yt.panels,!1,!I(yt)),yt.focusLayer&&yt.focusLayer.render(yt.panels),yt.pickLayer&&yt.pickLayer.render(yt.panels,!0),ae.linePickActive(!0),Z&&Z.axesMoved&&Z.axesMoved(yt.key,yt.dimensions.map(function(gt){return gt.crossfilterDimensionIndex}))})),Ge.exit().remove();var qe=Ge.selectAll("."+m.cn.axisOverlays).data(g,c);qe.enter().append("g").classed(m.cn.axisOverlays,!0),qe.selectAll("."+m.cn.axis).remove();var ke=qe.selectAll("."+m.cn.axis).data(g,c);ke.enter().append("g").classed(m.cn.axis,!0),ke.each(function(Ye){var yt=Ye.model.height/Ye.model.tickDistance,gt=Ye.domainScale,Tt=gt.domain();p.select(this).call(p.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(yt,Ye.tickFormat).tickValues(Ye.ordinal?Tt:null).tickFormat(function(At){return v.isOrdinal(Ye)?At:$(Ye.model.dimensions[Ye.visibleIndex],At)}).scale(gt)),a.font(ke.selectAll("text"),Ye.model.tickFont)}),ke.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),ke.selectAll("text").style("cursor","default");var _e=qe.selectAll("."+m.cn.axisHeading).data(g,c);_e.enter().append("g").classed(m.cn.axisHeading,!0);var ue=_e.selectAll("."+m.cn.axisTitle).data(g,c);ue.enter().append("text").classed(m.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",K?"none":"auto"),ue.text(function(Ye){return Ye.label}).each(function(Ye){var yt=p.select(this);a.font(yt,Ye.model.labelFont),r.convertToTspans(yt,ne)}).attr("transform",function(Ye){var yt=P(Ye.model.labelAngle,Ye.model.labelSide),gt=m.axisTitleOffset;return(yt.dir>0?"":n(0,2*gt+Ye.model.height))+t(yt.degrees)+n(-gt*yt.dx,-gt*yt.dy)}).attr("text-anchor",function(Ye){var yt=P(Ye.model.labelAngle,Ye.model.labelSide),gt=Math.abs(yt.dx),Tt=Math.abs(yt.dy);return 2*gt>Tt?yt.dir*yt.dx<0?"start":"end":"middle"});var ve=qe.selectAll("."+m.cn.axisExtent).data(g,c);ve.enter().append("g").classed(m.cn.axisExtent,!0);var le=ve.selectAll("."+m.cn.axisExtentTop).data(g,c);le.enter().append("g").classed(m.cn.axisExtentTop,!0),le.attr("transform",n(0,-m.axisExtentOffset));var Ae=le.selectAll("."+m.cn.axisExtentTopText).data(g,c);Ae.enter().append("text").classed(m.cn.axisExtentTopText,!0).call(B),Ae.text(function(Ye){return Q(Ye,!0)}).each(function(Ye){a.font(p.select(this),Ye.model.rangeFont)});var Be=ve.selectAll("."+m.cn.axisExtentBottom).data(g,c);Be.enter().append("g").classed(m.cn.axisExtentBottom,!0),Be.attr("transform",function(Ye){return n(0,Ye.model.height+m.axisExtentOffset)});var Xe=Be.selectAll("."+m.cn.axisExtentBottomText).data(g,c);Xe.enter().append("text").classed(m.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(B),Xe.text(function(Ye){return Q(Ye,!1)}).each(function(Ye){a.font(p.select(this),Ye.model.rangeFont)}),i.ensureAxisBrush(qe,ee,ne)}}}),TM=ze({"src/traces/parcoords/plot.js"(t,G){"use strict";var p=Bq(),b=j2(),E=wM().isVisible,k={};function l(n,r,a){var o=r.indexOf(a),s=n.indexOf(o);return s===-1&&(s+=r.length),s}function e(n,r){return function(o,s){return l(n,r,o)-l(n,r,s)}}var t=G.exports=function(r,a){var o=r._fullLayout,s=b(r,[],k);if(s){var c={},g={},f={},v=o._size;a.forEach(function(M,C){var _=M[0].trace,w=f[C]=_.index;c[C]=r.data[w].dimensions,g[C]=r.data[w].dimensions.slice()});var m=function(M,C,_){var w=g[M][C],h=_.map(function(O){return O.slice()}),u="dimensions["+C+"].constraintrange",A=o._tracePreGUI[r._fullData[f[M]].uid];if(A[u]===void 0){var x=w.constraintrange;A[u]=x||null}var z=r._fullData[f[M]].dimensions[C];h.length?(h.length===1&&(h=h[0]),w.constraintrange=h,z.constraintrange=h.slice(),h=[h]):(delete w.constraintrange,delete z.constraintrange,h=null);var I={};I[u]=h,r.emit("plotly_restyle",[I,[f[M]]])},i=function(M){r.emit("plotly_hover",M)},T=function(M){r.emit("plotly_unhover",M)},S=function(M,C){var _=e(C,g[M].filter(E));c[M].sort(_),g[M].filter(function(w){return!E(w)}).sort(function(w){return g[M].indexOf(w)}).forEach(function(w){c[M].splice(c[M].indexOf(w),1),c[M].splice(g[M].indexOf(w),0,w)}),r.emit("plotly_restyle",[{dimensions:[c[M]]},[f[M]]])};p(r,a,{width:v.w,height:v.h,margin:{t:v.t,r:v.r,b:v.b,l:v.l}},{filterChanged:m,hover:i,unhover:T,axesMoved:S})}};t.reglPrecompiled=k}}),Oq=ze({"src/traces/parcoords/base_plot.js"(J){"use strict";var G=ci(),p=zf().getModuleCalcData,b=TM(),E=nd();J.name="parcoords",J.plot=function(k){var l=p(k.calcdata,"parcoords")[0];l.length&&b(k,l)},J.clean=function(k,l,e,t){var n=t._has&&t._has("parcoords"),r=l._has&&l._has("parcoords");n&&!r&&(t._paperdiv.selectAll(".parcoords").remove(),t._glimages.selectAll("*").remove())},J.toSVG=function(k){var l=k._fullLayout._glimages,e=G.select(k).selectAll(".svg-container"),t=e.filter(function(r,a){return a===e.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function n(){var r=this,a=r.toDataURL("image/png"),o=l.append("svg:image");o.attr({xmlns:E.svg,"xlink:href":a,preserveAspectRatio:"none",x:0,y:0,width:r.style.width,height:r.style.height})}t.each(n),window.setTimeout(function(){G.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),Nq=ze({"src/traces/parcoords/base_index.js"(J,G){"use strict";G.exports={attributes:xM(),supplyDefaults:Dq(),calc:Fq(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:Oq(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),jq=ze({"src/traces/parcoords/index.js"(J,G){"use strict";var p=Nq();p.plot=TM(),G.exports=p}}),Uq=ze({"lib/parcoords.js"(J,G){"use strict";G.exports=jq()}}),AM=ze({"src/traces/parcats/attributes.js"(J,G){"use strict";var p=Ki().extendFlat,b=ws(),E=Qs(),k=qs(),{hovertemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=Ml().attributes,n=p({editType:"calc"},k("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:e({editType:"plot"})});G.exports={domain:t({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:p({},b.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:e({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:E({editType:"calc"}),tickfont:E({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:n,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}}),qq=ze({"src/traces/parcats/defaults.js"(J,G){"use strict";var p=Nr(),b=Bf().hasColorscale,E=qc(),k=Ml().defaults,l=Jf(),e=AM(),t=U2(),n=Ff().isTypedArraySpec;function r(o,s,c,g,f){f("line.shape"),f("line.hovertemplate"),f("line.hovertemplatefallback");var v=f("line.color",g.colorway[0]);if(b(o,"line")&&p.isArrayOrTypedArray(v)){if(v.length)return f("line.colorscale"),E(o,s,g,f,{prefix:"line.",cLetter:"c"}),v.length;s.line.color=c}return 1/0}function a(o,s){function c(S,M){return p.coerce(o,s,e.dimensions,S,M)}var g=c("values"),f=c("visible");if(g&&g.length||(f=s.visible=!1),f){c("label"),c("displayindex",s._index);var v=o.categoryarray,m=p.isArrayOrTypedArray(v)&&v.length>0||n(v),i;m&&(i="array");var T=c("categoryorder",i);T==="array"?(c("categoryarray"),c("ticktext")):(delete o.categoryarray,delete o.ticktext),!m&&T==="array"&&(s.categoryorder="trace")}}G.exports=function(s,c,g,f){function v(S,M){return p.coerce(s,c,e,S,M)}var m=l(s,c,{name:"dimensions",handleItemDefaults:a}),i=r(s,c,g,f,v);k(c,f,v),(!Array.isArray(m)||!m.length)&&(c.visible=!1),t(c,m,"values",i),v("hoveron"),v("hovertemplate"),v("hovertemplatefallback"),v("arrangement"),v("bundlecolors"),v("sortpaths"),v("counts");var T=f.font;p.coerceFont(v,"labelfont",T,{overrideDflt:{size:Math.round(T.size)}}),p.coerceFont(v,"tickfont",T,{autoShadowDflt:!0,overrideDflt:{size:Math.round(T.size/1.2)}})}}}),Vq=ze({"src/traces/parcats/calc.js"(J,G){"use strict";var p=Vd().wrap,b=Bf().hasColorscale,E=Qf(),k=Bw(),l=Xi(),e=Nr(),t=ao();G.exports=function(T,S){var M=e.filterVisible(S.dimensions);if(M.length===0)return[];var C=M.map(function(V){var Z;if(V.categoryorder==="trace")Z=null;else if(V.categoryorder==="array")Z=V.categoryarray;else{Z=k(V.values);for(var K=!0,H=0;H=i.length||T[i[S]]!==void 0)return!1;T[i[S]]=!0}return!0}}}),Gq=ze({"src/traces/parcats/parcats.js"(J,G){"use strict";var p=ci(),b=(l0(),Po(_v)).interpolateNumber,E=Ux(),k=Qn(),l=Zl(),e=Nr(),t=e.strTranslate,n=Xi(),r=Cs();function a(X,q,W,ee){var ae=q._context.staticPlot,he=X.map(se.bind(0,q,W)),xe=ee.selectAll("g.parcatslayer").data([null]);xe.enter().append("g").attr("class","parcatslayer").style("pointer-events",ae?"none":"all");var we=xe.selectAll("g.trace.parcats").data(he,o),Me=we.enter().append("g").attr("class","trace parcats");we.attr("transform",function(Ae){return t(Ae.x,Ae.y)}),Me.append("g").attr("class","paths");var Se=we.select("g.paths"),Ie=Se.selectAll("path.path").data(function(Ae){return Ae.paths},o);Ie.attr("fill",function(Ae){return Ae.model.color});var Ge=Ie.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Ae){return Ae.model.color}).attr("fill-opacity",0);S(Ge),Ie.attr("d",function(Ae){return Ae.svgD}),Ge.empty()||Ie.sort(c),Ie.exit().remove(),Ie.on("mouseover",f).on("mouseout",v).on("click",T),Me.append("g").attr("class","dimensions");var qe=we.select("g.dimensions"),ke=qe.selectAll("g.dimension").data(function(Ae){return Ae.dimensions},o);ke.enter().append("g").attr("class","dimension"),ke.attr("transform",function(Ae){return t(Ae.x,0)}),ke.exit().remove();var _e=ke.selectAll("g.category").data(function(Ae){return Ae.categories},o),ue=_e.enter().append("g").attr("class","category");_e.attr("transform",function(Ae){return t(0,Ae.y)}),ue.append("rect").attr("class","catrect").attr("pointer-events","none"),_e.select("rect.catrect").attr("fill","none").attr("width",function(Ae){return Ae.width}).attr("height",function(Ae){return Ae.height}),_(ue);var ve=_e.selectAll("rect.bandrect").data(function(Ae){return Ae.bands},o);ve.each(function(){e.raiseToTop(this)}),ve.attr("fill",function(Ae){return Ae.color});var le=ve.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Ae){return Ae.color}).attr("fill-opacity",0);ve.attr("fill",function(Ae){return Ae.color}).attr("width",function(Ae){return Ae.width}).attr("height",function(Ae){return Ae.height}).attr("y",function(Ae){return Ae.y}).attr("cursor",function(Ae){return Ae.parcatsViewModel.arrangement==="fixed"?"default":Ae.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),h(le),ve.exit().remove(),ue.append("text").attr("class","catlabel").attr("pointer-events","none"),_e.select("text.catlabel").attr("text-anchor",function(Ae){return s(Ae)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(Ae){return s(Ae)?Ae.width+5:-5}).attr("y",function(Ae){return Ae.height/2}).text(function(Ae){return Ae.model.categoryLabel}).each(function(Ae){n.font(p.select(this),Ae.parcatsViewModel.categorylabelfont),r.convertToTspans(p.select(this),q)}),ue.append("text").attr("class","dimlabel"),_e.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Ae){return Ae.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Ae){return Ae.width/2}).attr("y",-5).text(function(Ae,Be){return Be===0?Ae.parcatsViewModel.model.dimensions[Ae.model.dimensionInd].dimensionLabel:null}).each(function(Ae){n.font(p.select(this),Ae.parcatsViewModel.labelfont)}),_e.selectAll("rect.bandrect").on("mouseover",F).on("mouseout",P),_e.exit().remove(),ke.call(p.behavior.drag().origin(function(Ae){return{x:Ae.x,y:0}}).on("dragstart",j).on("drag",U).on("dragend",$)),we.each(function(Ae){Ae.traceSelection=p.select(this),Ae.pathSelection=p.select(this).selectAll("g.paths").selectAll("path.path"),Ae.dimensionSelection=p.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),we.exit().remove()}G.exports=function(X,q,W,ee){a(W,X,ee,q)};function o(X){return X.key}function s(X){var q=X.parcatsViewModel.dimensions.length,W=X.parcatsViewModel.dimensions[q-1].model.dimensionInd;return X.model.dimensionInd===W}function c(X,q){return X.model.rawColor>q.model.rawColor?1:X.model.rawColorae)return 1;if(ee!==ae){var he=isNaN(ee),xe=isNaN(ae);if(he!==xe)return he?1:-1}}return X.length-q.length}function f(X){if(!X.parcatsViewModel.dragDimension&&X.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){e.raiseToTop(this),M(p.select(this));var q=m(X),W=i(X);if(X.parcatsViewModel.graphDiv.emit("plotly_hover",{points:q,event:p.event,constraints:W}),X.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var ee=p.mouse(this)[0],ae=X.parcatsViewModel.graphDiv,he=X.parcatsViewModel.trace,xe=ae._fullLayout,we=xe._paperdiv.node().getBoundingClientRect(),Me=X.parcatsViewModel.graphDiv.getBoundingClientRect(),Se,Ie,Ge;for(Ge=0;Ge"),yt=p.mouse(ae)[0];l.loneHover({trace:he,x:_e-we.left+Me.left,y:ue-we.top+Me.top,text:Ye,color:X.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:ve,idealAlign:yt<_e?"right":"left",hovertemplate:(he.line||{}).hovertemplate,hovertemplateLabels:Be,eventData:[{data:he._input,fullData:he,count:le,probability:Ae}]},{container:xe._hoverlayer.node(),outerContainer:xe._paper.node(),gd:ae})}}}function v(X){if(!X.parcatsViewModel.dragDimension&&(S(p.select(this)),l.loneUnhover(X.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),X.parcatsViewModel.pathSelection.sort(c),X.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var q=m(X),W=i(X);X.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:q,event:p.event,constraints:W})}}function m(X){for(var q=[],W=Q(X.parcatsViewModel),ee=0;eek.mostReadable(q.model.color)).attr("stroke-width",.3)}function C(X){X.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function _(X){X.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function w(X){X.attr("stroke","black").attr("stroke-width",1.5)}function h(X){X.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function u(X){var q=X.parcatsViewModel.pathSelection,W=X.categoryViewModel.model.dimensionInd,ee=X.categoryViewModel.model.categoryInd;return q.filter(function(ae){return ae.model.categoryInds[W]===ee&&ae.model.color===X.color})}function A(X){var q=p.select(X.parentNode).selectAll("rect.bandrect");q.each(function(W){var ee=u(W);M(ee),ee.each(function(){e.raiseToTop(this)})}),C(p.select(X.parentNode))}function x(X){var q=p.select(X).datum(),W=u(q);M(W),W.each(function(){e.raiseToTop(this)}),p.select(X.parentNode).selectAll("rect.bandrect").filter(function(ee){return ee.color===q.color}).each(function(){e.raiseToTop(this),w(p.select(this))})}function z(X,q,W){var ee=p.select(X).datum(),ae=ee.categoryViewModel.model,he=ee.parcatsViewModel.graphDiv,xe=p.select(X.parentNode).selectAll("rect.bandrect"),we=[];xe.each(function(Se){var Ie=u(Se);Ie.each(function(Ge){Array.prototype.push.apply(we,m(Ge))})});var Me={};Me[ae.dimensionInd]=ae.categoryValue,he.emit(q,{points:we,event:W,constraints:Me})}function I(X,q,W){var ee=p.select(X).datum(),ae=ee.categoryViewModel.model,he=ee.parcatsViewModel.graphDiv,xe=u(ee),we=[];xe.each(function(Se){Array.prototype.push.apply(we,m(Se))});var Me={};Me[ae.dimensionInd]=ae.categoryValue,ee.rawColor!==void 0&&(Me.color=ee.rawColor),he.emit(q,{points:we,event:W,constraints:Me})}function O(X,q,W){X._fullLayout._calcInverseTransform(X);var ee=X._fullLayout._invScaleX,ae=X._fullLayout._invScaleY,he=p.select(W.parentNode).select("rect.catrect"),xe=he.node().getBoundingClientRect(),we=he.datum(),Me=we.parcatsViewModel,Se=Me.model.dimensions[we.model.dimensionInd],Ie=Me.trace,Ge=xe.top+xe.height/2,qe,ke;Me.dimensions.length>1&&Se.displayInd===Me.dimensions.length-1?(qe=xe.left,ke="left"):(qe=xe.left+xe.width,ke="right");var _e=we.model.count,ue=we.model.categoryLabel,ve=_e/we.parcatsViewModel.model.count,le={countLabel:_e,categoryLabel:ue,probabilityLabel:ve.toFixed(3)},Ae=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ae.push(["Count:",le.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Ae.push(["P("+le.categoryLabel+"):",le.probabilityLabel].join(" "));var Be=Ae.join("
");return{trace:Ie,x:ee*(qe-q.left),y:ae*(Ge-q.top),text:Be,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:ke,hovertemplate:Ie.hovertemplate,hovertemplateLabels:le,eventData:[{data:Ie._input,fullData:Ie,count:_e,category:ue,probability:ve}]}}function D(X,q,W){var ee=[];return p.select(W.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ae=this;ee.push(O(X,q,ae))}),ee}function B(X,q,W){X._fullLayout._calcInverseTransform(X);var ee=X._fullLayout._invScaleX,ae=X._fullLayout._invScaleY,he=W.getBoundingClientRect(),xe=p.select(W).datum(),we=xe.categoryViewModel,Me=we.parcatsViewModel,Se=Me.model.dimensions[we.model.dimensionInd],Ie=Me.trace,Ge=he.y+he.height/2,qe,ke;Me.dimensions.length>1&&Se.displayInd===Me.dimensions.length-1?(qe=he.left,ke="left"):(qe=he.left+he.width,ke="right");var _e=we.model.categoryLabel,ue=xe.parcatsViewModel.model.count,ve=0;xe.categoryViewModel.bands.forEach(function($t){$t.color===xe.color&&(ve+=$t.count)});var le=we.model.count,Ae=0;Me.pathSelection.each(function($t){$t.model.color===xe.color&&(Ae+=$t.model.count)});var Be=ve/ue,Xe=ve/Ae,Ye=ve/le,yt={countLabel:ve,categoryLabel:_e,probabilityLabel:Be.toFixed(3)},gt=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&>.push(["Count:",yt.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(gt.push("P(color \u2229 "+_e+"): "+yt.probabilityLabel),gt.push("P("+_e+" | color): "+Xe.toFixed(3)),gt.push("P(color | "+_e+"): "+Ye.toFixed(3)));var Tt=gt.join("
"),At=k.mostReadable(xe.color);return{trace:Ie,x:ee*(qe-q.left),y:ae*(Ge-q.top),text:Tt,color:xe.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:At,fontSize:10,idealAlign:ke,hovertemplate:Ie.hovertemplate,hovertemplateLabels:yt,eventData:[{data:Ie._input,fullData:Ie,category:_e,count:ue,probability:Be,categorycount:le,colorcount:Ae,bandcolorcount:ve}]}}function F(X){if(!X.parcatsViewModel.dragDimension&&X.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var q=p.mouse(this)[1];if(q<-1)return;var W=X.parcatsViewModel.graphDiv,ee=W._fullLayout,ae=ee._paperdiv.node().getBoundingClientRect(),he=X.parcatsViewModel.hoveron,xe=this;if(he==="color"?(x(xe),I(xe,"plotly_hover",p.event)):(A(xe),z(xe,"plotly_hover",p.event)),X.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var we;he==="category"?we=O(W,ae,xe):he==="color"?we=B(W,ae,xe):he==="dimension"&&(we=D(W,ae,xe)),we&&l.loneHover(we,{container:ee._hoverlayer.node(),outerContainer:ee._paper.node(),gd:W})}}}function P(X){var q=X.parcatsViewModel;if(!q.dragDimension&&(S(q.pathSelection),_(q.dimensionSelection.selectAll("g.category")),h(q.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),l.loneUnhover(q.graphDiv._fullLayout._hoverlayer.node()),q.pathSelection.sort(c),q.hoverinfoItems.indexOf("skip")===-1)){var W=X.parcatsViewModel.hoveron,ee=this;W==="color"?I(ee,"plotly_unhover",p.event):z(ee,"plotly_unhover",p.event)}}function j(X){X.parcatsViewModel.arrangement!=="fixed"&&(X.dragDimensionDisplayInd=X.model.displayInd,X.initialDragDimensionDisplayInds=X.parcatsViewModel.model.dimensions.map(function(q){return q.displayInd}),X.dragHasMoved=!1,X.dragCategoryDisplayInd=null,p.select(this).selectAll("g.category").select("rect.catrect").each(function(q){var W=p.mouse(this)[0],ee=p.mouse(this)[1];-2<=W&&W<=q.width+2&&-2<=ee&&ee<=q.height+2&&(X.dragCategoryDisplayInd=q.model.displayInd,X.initialDragCategoryDisplayInds=X.model.categories.map(function(ae){return ae.displayInd}),q.model.dragY=q.y,e.raiseToTop(this.parentNode),p.select(this.parentNode).selectAll("rect.bandrect").each(function(ae){ae.yIe.y+Ie.height/2&&(he.model.displayInd=Ie.model.displayInd,Ie.model.displayInd=we),X.dragCategoryDisplayInd=he.model.displayInd}if(X.dragCategoryDisplayInd===null||X.parcatsViewModel.arrangement==="freeform"){ae.model.dragX=p.event.x;var Ge=X.parcatsViewModel.dimensions[W],qe=X.parcatsViewModel.dimensions[ee];Ge!==void 0&&ae.model.dragXqe.x&&(ae.model.displayInd=qe.model.displayInd,qe.model.displayInd=X.dragDimensionDisplayInd),X.dragDimensionDisplayInd=ae.model.displayInd}K(X.parcatsViewModel),Z(X.parcatsViewModel),ne(X.parcatsViewModel),re(X.parcatsViewModel)}}function $(X){if(X.parcatsViewModel.arrangement!=="fixed"&&X.dragDimensionDisplayInd!==null){p.select(this).selectAll("text").attr("font-weight","normal");var q={},W=Q(X.parcatsViewModel),ee=X.parcatsViewModel.model.dimensions.map(function(qe){return qe.displayInd}),ae=X.initialDragDimensionDisplayInds.some(function(qe,ke){return qe!==ee[ke]});ae&&ee.forEach(function(qe,ke){var _e=X.parcatsViewModel.model.dimensions[ke].containerInd;q["dimensions["+_e+"].displayindex"]=qe});var he=!1;if(X.dragCategoryDisplayInd!==null){var xe=X.model.categories.map(function(qe){return qe.displayInd});if(he=X.initialDragCategoryDisplayInds.some(function(qe,ke){return qe!==xe[ke]}),he){var we=X.model.categories.slice().sort(function(qe,ke){return qe.displayInd-ke.displayInd}),Me=we.map(function(qe){return qe.categoryValue}),Se=we.map(function(qe){return qe.categoryLabel});q["dimensions["+X.model.containerInd+"].categoryarray"]=[Me],q["dimensions["+X.model.containerInd+"].ticktext"]=[Se],q["dimensions["+X.model.containerInd+"].categoryorder"]="array"}}if(X.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!X.dragHasMoved&&X.potentialClickBand&&(X.parcatsViewModel.hoveron==="color"?I(X.potentialClickBand,"plotly_click",p.event.sourceEvent):z(X.potentialClickBand,"plotly_click",p.event.sourceEvent)),X.model.dragX=null,X.dragCategoryDisplayInd!==null){var Ie=X.parcatsViewModel.dimensions[X.dragDimensionDisplayInd].categories[X.dragCategoryDisplayInd];Ie.model.dragY=null,X.dragCategoryDisplayInd=null}X.dragDimensionDisplayInd=null,X.parcatsViewModel.dragDimension=null,X.dragHasMoved=null,X.potentialClickBand=null,K(X.parcatsViewModel),Z(X.parcatsViewModel);var Ge=p.transition().duration(300).ease("cubic-in-out");Ge.each(function(){ne(X.parcatsViewModel,!0),re(X.parcatsViewModel,!0)}).each("end",function(){(ae||he)&&E.restyle(X.parcatsViewModel.graphDiv,q,[W])})}}function Q(X){for(var q,W=X.graphDiv._fullData,ee=0;ee=0;Me--)Se+="C"+xe[Me]+","+(q[Me+1]+ee)+" "+he[Me]+","+(q[Me]+ee)+" "+(X[Me]+W[Me])+","+(q[Me]+ee),Se+="l-"+W[Me]+",0 ";return Se+="Z",Se}function Z(X){var q=X.dimensions,W=X.model,ee=q.map(function(Xt){return Xt.categories.map(function(or){return or.y})}),ae=X.model.dimensions.map(function(Xt){return Xt.categories.map(function(or){return or.displayInd})}),he=X.model.dimensions.map(function(Xt){return Xt.displayInd}),xe=X.dimensions.map(function(Xt){return Xt.model.dimensionInd}),we=q.map(function(Xt){return Xt.x}),Me=q.map(function(Xt){return Xt.width}),Se=[];for(var Ie in W.paths)W.paths.hasOwnProperty(Ie)&&Se.push(W.paths[Ie]);function Ge(Xt){var or=Xt.categoryInds.map(function(vt,ht){return ae[ht][vt]}),Ot=xe.map(function(vt){return or[vt]});return Ot}Se.sort(function(Xt,or){var Ot=Ge(Xt),vt=Ge(or);return X.sortpaths==="backward"&&(Ot.reverse(),vt.reverse()),Ot.push(Xt.valueInds[0]),vt.push(or.valueInds[0]),X.bundlecolors&&(Ot.unshift(Xt.rawColor),vt.unshift(or.rawColor)),g(Ot,vt)});for(var qe=new Array(Se.length),ke=q[0].model.count,_e=q[0].categories.map(function(Xt){return Xt.height}).reduce(function(Xt,or){return Xt+or}),ue=0;ue0?le=_e*(ve.count/ke):le=0;for(var Ae=new Array(ee.length),Be=0;Be1?xe=(X.width-2*W-ee)/(ae-1):xe=0,we=W,Me=we+xe*he;var Se=[],Ie=X.model.maxCats,Ge=q.categories.length,qe=8,ke=q.count,_e=X.height-qe*(Ie-1),ue,ve,le,Ae,Be,Xe=(Ie-Ge)*qe/2,Ye=q.categories.map(function(yt){return{displayInd:yt.displayInd,categoryInd:yt.categoryInd}});for(Ye.sort(function(yt,gt){return yt.displayInd-gt.displayInd}),Be=0;Be0?ue=ve.count/ke*_e:ue=0,le={key:ve.valueInds[0],model:ve,width:ee,height:ue,y:ve.dragY!==null?ve.dragY:Xe,bands:[],parcatsViewModel:X},Xe=Xe+ue+qe,Se.push(le);return{key:q.dimensionInd,x:q.dragX!==null?q.dragX:Me,y:0,width:ee,model:q,categories:Se,parcatsViewModel:X,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),MM=ze({"src/traces/parcats/plot.js"(J,G){"use strict";var p=Gq();G.exports=function(E,k,l,e){var t=E._fullLayout,n=t._paper,r=t._size;p(E,n,k,{width:r.w,height:r.h,margin:{t:r.t,r:r.r,b:r.b,l:r.l}},l,e)}}}),Hq=ze({"src/traces/parcats/base_plot.js"(J){"use strict";var G=zf().getModuleCalcData,p=MM(),b="parcats";J.name=b,J.plot=function(E,k,l,e){var t=G(E.calcdata,b);if(t.length){var n=t[0];p(E,n,l,e)}},J.clean=function(E,k,l,e){var t=e._has&&e._has("parcats"),n=k._has&&k._has("parcats");t&&!n&&e._paperdiv.selectAll(".parcats").remove()}}}),Wq=ze({"src/traces/parcats/index.js"(J,G){"use strict";G.exports={attributes:AM(),supplyDefaults:qq(),calc:Vq(),plot:MM(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:Hq(),categories:["noOpacity"],meta:{}}}}),Yq=ze({"lib/parcats.js"(J,G){"use strict";G.exports=Wq()}}),Xq=ze({"src/plots/map/styles/arcgis-sat-hybrid.js"(J,G){"use strict";G.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} @@ -2705,10 +2705,10 @@ void main() { {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} -{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}}),Zq=ze({"src/plots/map/styles/arcgis-sat.js"(J,V){"use strict";V.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}}),Av=ze({"src/plots/map/constants.js"(J,V){"use strict";var p=(Nv(),Po(nv)).default,b=Xq(),E=Zq(),k='\xA9 OpenStreetMap contributors',l="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",e="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",t="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",o={basic:t,streets:t,outdoors:t,light:l,dark:e,satellite:E,"satellite-streets":b,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:k,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":l,"carto-darkmatter":e,"carto-voyager":t,"carto-positron-nolabels":n,"carto-darkmatter-nolabels":r,"carto-voyager-nolabels":a},s=p(o);V.exports={styleValueDflt:"basic",stylesMap:o,styleValuesMap:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",s.join(", "),"or use a tile service."].join(` -`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}}}),ly=ze({"src/plots/map/layout_attributes.js"(J,V){"use strict";var p=Nr(),b=Qn().defaultLine,E=Ml().attributes,k=Qs(),l=su().textposition,e=Al().overrideAll,t=hs().templatedArray,n=Av(),r=k({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});r.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var a=V.exports=e({_arrayAttrRegexps:[p.counterRegex("map",".layers",!0)],domain:E({name:"map"}),style:{valType:"any",values:n.styleValuesMap,dflt:n.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:t("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:b},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:b}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:r,textposition:p.extendFlat({},l,{arrayOk:!1})}})},"plot","from-root");a.uirevision={valType:"any",editType:"none"}}}),q2=ze({"src/traces/scattermap/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=Bd(),l=gg(),e=su(),t=ly(),n=ws(),r=qs(),a=Ki().extendFlat,o=Al().overrideAll,s=ly(),c=l.line,m=l.marker;V.exports=o({lon:l.lon,lat:l.lat,cluster:{enabled:{valType:"boolean"},maxzoom:a({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:a({},m.opacity,{dflt:1})},mode:a({},e.mode,{dflt:"markers"}),text:a({},e.text,{}),texttemplate:b({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:a({},e.hovertext,{}),line:{color:c.color,width:c.width},connectgaps:e.connectgaps,marker:a({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:m.opacity,size:m.size,sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode},r("marker")),fill:l.fill,fillcolor:k(),textfont:t.layers.symbol.textfont,textposition:t.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:a({},n.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:p(),hovertemplatefallback:E()},"calc","nested")}}),SM=ze({"src/traces/scattermap/constants.js"(J,V){"use strict";var p=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];V.exports={isSupportedFont:function(b){return p.indexOf(b)!==-1}}}}),$q=ze({"src/traces/scattermap/defaults.js"(J,V){"use strict";var p=Nr(),b=el(),E=id(),k=_d(),l=xd(),e=Od(),t=q2(),n=SM().isSupportedFont;V.exports=function(o,s,c,m){function h(A,x){return p.coerce(o,s,t,A,x)}function v(A,x){return p.coerce2(o,s,t,A,x)}var g=r(o,s,h);if(!g){s.visible=!1;return}if(h("text"),h("texttemplate"),h("texttemplatefallback"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),h("mode"),h("below"),b.hasMarkers(s)){E(o,s,c,m,h,{noLine:!0,noAngle:!0}),h("marker.allowoverlap"),h("marker.angle");var i=s.marker;i.symbol!=="circle"&&(p.isArrayOrTypedArray(i.size)&&(i.size=i.size[0]),p.isArrayOrTypedArray(i.color)&&(i.color=i.color[0]))}b.hasLines(s)&&(k(o,s,c,m,h,{noDash:!0}),h("connectgaps"));var w=v("cluster.maxzoom"),S=v("cluster.step"),M=v("cluster.color",s.marker&&s.marker.color||c),C=v("cluster.size"),_=v("cluster.opacity"),T=w!==!1||S!==!1||M!==!1||C!==!1||_!==!1,f=h("cluster.enabled",T);if(f||b.hasText(s)){var u=m.font.family;l(o,s,m,h,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:n(u)?u:"Open Sans Regular",weight:m.font.weight,style:m.font.style,size:m.font.size,color:m.font.color}})}h("fill"),s.fill!=="none"&&e(o,s,c,h),p.coerceSelectionMarkerOpacity(s,h)};function r(a,o,s){var c=s("lon")||[],m=s("lat")||[],h=Math.min(c.length,m.length);return o._length=h,h}}}),EM=ze({"src/traces/scattermap/format_labels.js"(J,V){"use strict";var p=Gi();V.exports=function(E,k,l){var e={},t=l[k.subplot]._subplot,n=t.mockAxis,r=E.lonlat;return e.lonLabel=p.tickText(n,n.c2l(r[0]),!0).text,e.latLabel=p.tickText(n,n.c2l(r[1]),!0).text,e}}}),kM=ze({"src/plots/map/convert_text_opts.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){var l=E.split(" "),e=l[0],t=l[1],n=p.isArrayOrTypedArray(k)?p.mean(k):k,r=.5+n/100,a=1.5+n/100,o=["",""],s=[0,0];switch(e){case"top":o[0]="top",s[1]=-a;break;case"bottom":o[0]="bottom",s[1]=a;break}switch(t){case"left":o[1]="right",s[0]=-r;break;case"right":o[1]="left",s[0]=r;break}var c;return o[0]&&o[1]?c=o.join("-"):o[0]?c=o[0]:o[1]?c=o[1]:c="center",{anchor:c,offset:s}}}}),Kq=ze({"src/traces/scattermap/convert.js"(J,V){"use strict";var p=ao(),b=Nr(),E=No().BADNUM,k=Q1(),l=fl(),e=$i(),t=l1(),n=el(),r=SM().isSupportedFont,a=kM(),o=kh().appendArrayPointValue,s=Cs().NEWLINES,c=Cs().BR_TAG_ALL;V.exports=function(_,T){var f=T[0].trace,u=f.visible===!0&&f._length!==0,A=f.fill!=="none",x=n.hasLines(f),z=n.hasMarkers(f),I=n.hasText(f),O=z&&f.marker.symbol==="circle",D=z&&f.marker.symbol!=="circle",B=f.cluster&&f.cluster.enabled,F=m("fill"),P=m("line"),j=m("circle"),U=m("symbol"),$={fill:F,line:P,circle:j,symbol:U};if(!u)return $;var Q;if((A||x)&&(Q=k.calcTraceToLineCoords(T)),A&&(F.geojson=k.makePolygon(Q),F.layout.visibility="visible",b.extendFlat(F.paint,{"fill-color":f.fillcolor})),x&&(P.geojson=k.makeLine(Q),P.layout.visibility="visible",b.extendFlat(P.paint,{"line-width":f.line.width,"line-color":f.line.color,"line-opacity":f.opacity})),O){var re=h(T);j.geojson=re.geojson,j.layout.visibility="visible",B&&(j.filter=["!",["has","point_count"]],$.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":S(f.cluster.color,f.cluster.step),"circle-radius":S(f.cluster.size,f.cluster.step),"circle-opacity":S(f.cluster.opacity,f.cluster.step)}},$.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":M(f),"text-size":12}}),b.extendFlat(j.paint,{"circle-color":re.mcc,"circle-radius":re.mrc,"circle-opacity":re.mo})}if(O&&B&&(j.filter=["!",["has","point_count"]]),(D||I)&&(U.geojson=v(T,_),b.extendFlat(U.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),D&&(b.extendFlat(U.layout,{"icon-size":f.marker.size/10}),"angle"in f.marker&&f.marker.angle!=="auto"&&b.extendFlat(U.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),U.layout["icon-allow-overlap"]=f.marker.allowoverlap,b.extendFlat(U.paint,{"icon-opacity":f.opacity*f.marker.opacity,"icon-color":f.marker.color,"icon-halo-color":f.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),I)){var ne=(f.marker||{}).size,se=a(f.textposition,ne);b.extendFlat(U.layout,{"text-size":f.textfont.size,"text-anchor":se.anchor,"text-offset":se.offset,"text-font":M(f)}),b.extendFlat(U.paint,{"text-color":f.textfont.color,"text-opacity":f.opacity})}return $};function m(C){return{type:C,geojson:k.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function h(C){var _=C[0].trace,T=_.marker,f=_.selectedpoints,u=b.isArrayOrTypedArray(T.color),A=b.isArrayOrTypedArray(T.size),x=b.isArrayOrTypedArray(T.opacity),z;function I(ne){return _.opacity*ne}function O(ne){return ne/2}var D;u&&(l.hasColorscale(_,"marker")?D=l.makeColorScaleFuncFromTrace(T):D=b.identity);var B;A&&(B=t(_));var F;x&&(F=function(ne){var se=p(ne)?+b.constrain(ne,0,1):0;return I(se)});var P=[];for(z=0;z850?z+=" Black":u>750?z+=" Extra Bold":u>650?z+=" Bold":u>550?z+=" Semi Bold":u>450?z+=" Medium":u>350?z+=" Regular":u>250?z+=" Light":u>150?z+=" Extra Light":z+=" Thin"):A.slice(0,2).join(" ")==="Open Sans"?(z="Open Sans",u>750?z+=" Extrabold":u>650?z+=" Bold":u>550?z+=" Semibold":u>350?z+=" Regular":z+=" Light"):A.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(z="Klokantech Noto Sans",A[3]==="CJK"&&(z+=" CJK"),z+=u>500?" Bold":" Regular")),x&&(z+=" Italic"),z==="Open Sans Regular Italic"?z="Open Sans Italic":z==="Open Sans Regular Bold"?z="Open Sans Bold":z==="Open Sans Regular Bold Italic"?z="Open Sans Bold Italic":z==="Klokantech Noto Sans Regular Italic"&&(z="Klokantech Noto Sans Italic"),r(z)||(z=T);var I=z.split(", ");return I}}}),Jq=ze({"src/traces/scattermap/plot.js"(J,V){"use strict";var p=Nr(),b=Kq(),E=Av().traceLayerPrefix,k={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function l(t,n,r,a){this.type="scattermap",this.subplot=t,this.uid=n,this.clusterEnabled=r,this.isHidden=a,this.sourceIds={fill:"source-"+n+"-fill",line:"source-"+n+"-line",circle:"source-"+n+"-circle",symbol:"source-"+n+"-symbol",cluster:"source-"+n+"-circle",clusterCount:"source-"+n+"-circle"},this.layerIds={fill:E+n+"-fill",line:E+n+"-line",circle:E+n+"-circle",symbol:E+n+"-symbol",cluster:E+n+"-cluster",clusterCount:E+n+"-cluster-count"},this.below=null}var e=l.prototype;e.addSource=function(t,n,r){var a={type:"geojson",data:n.geojson};r&&r.enabled&&p.extendFlat(a,{cluster:!0,clusterMaxZoom:r.maxzoom});var o=this.subplot.map.getSource(this.sourceIds[t]);o?o.setData(n.geojson):this.subplot.map.addSource(this.sourceIds[t],a)},e.setSourceData=function(t,n){this.subplot.map.getSource(this.sourceIds[t]).setData(n.geojson)},e.addLayer=function(t,n,r){var a={type:n.type,id:this.layerIds[t],source:this.sourceIds[t],layout:n.layout,paint:n.paint};n.filter&&(a.filter=n.filter);for(var o=this.layerIds[t],s,c=this.subplot.getMapLayers(),m=0;m=0;x--){var z=A[x];o.removeLayer(v.layerIds[z])}u||o.removeSource(v.sourceIds.circle)}function w(u){for(var A=k.nonCluster,x=0;x=0;x--){var z=A[x];o.removeLayer(v.layerIds[z]),u||o.removeSource(v.sourceIds[z])}}function M(u){h?i(u):S(u)}function C(u){m?g(u):w(u)}function _(){for(var u=m?k.cluster:k.nonCluster,A=0;A=0;a--){var o=r[a];n.removeLayer(this.layerIds[o]),n.removeSource(this.sourceIds[o])}},V.exports=function(n,r){var a=r[0].trace,o=a.cluster&&a.cluster.enabled,s=a.visible!==!0,c=new l(n,a.uid,o,s),m=b(n.gd,r),h=c.below=n.belowLookup["trace-"+a.uid],v,g,i;if(o)for(c.addSource("circle",m.circle,a.cluster),v=0;v=0?Math.floor((a+180)/360):Math.ceil((a-180)/360),C=M*360,_=a-C;function T(B){var F=B.lonlat;if(F[0]===l||w&&g.indexOf(B.i+1)===-1)return 1/0;var P=b.modHalf(F[0],360),j=F[1],U=v.project([P,j]),$=U.x-m.c2p([_,j]),Q=U.y-h.c2p([P,o]),re=Math.max(3,B.mrc||0);return Math.max(Math.sqrt($*$+Q*Q)-re,1-3/re)}if(p.getClosest(s,T,r),r.index!==!1){var f=s[r.index],u=f.lonlat,A=[b.modHalf(u[0],360)+C,u[1]],x=m.c2p(A),z=h.c2p(A),I=f.mrc||1;r.x0=x-I,r.x1=x+I,r.y0=z-I,r.y1=z+I;var O={};O[c.subplot]={_subplot:v};var D=c._module.formatLabels(f,c,O);return r.lonLabel=D.lonLabel,r.latLabel=D.latLabel,r.color=E(c,f),r.extraText=n(c,f,s[0].t.labels),r.hovertemplate=c.hovertemplate,[r]}}function n(r,a,o){if(r.hovertemplate)return;var s=a.hi||r.hoverinfo,c=s.split("+"),m=c.indexOf("all")!==-1,h=c.indexOf("lon")!==-1,v=c.indexOf("lat")!==-1,g=a.lonlat,i=[];function w(S){return S+"\xB0"}return m||h&&v?i.push("("+w(g[1])+", "+w(g[0])+")"):h?i.push(o.lon+w(g[0])):v&&i.push(o.lat+w(g[1])),(m||c.indexOf("text")!==-1)&&k(a,r,i),i.join("
")}V.exports={hoverPoints:t,getExtraText:n}}}),Qq=ze({"src/traces/scattermap/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.lon=E.lon,b.lat=E.lat,b}}}),eV=ze({"src/traces/scattermap/select.js"(J,V){"use strict";var p=Nr(),b=el(),{BADNUM:E}=No();V.exports=function(l,e){var t;let{cd:n,xaxis:r,yaxis:a}=l,{trace:o}=n[0];if(!b.hasMarkers(o))return[];if(e===!1){for(let h of n)h.selected=0;return[]}let s=(t=r._subplot)==null?void 0:t.map,c=s?.getRenderWorldCopies()&&e.xmax>e.xmin?s.transform.worldSize:0,m=[];for(let h=0;h1)return 1;for(var W=d,te=0;te<8;te++){var ue=this.sampleCurveX(W)-d;if(Math.abs(ue)ue?ge=W:Ce=W,W=.5*(Ce-ge)+ge;return W},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},r}(),s=n(o);let c,m;function h(){return c!=null||(c=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),c}function v(){if(m==null&&(m=!1,h())){let d=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(d){for(let W=0;W<5*5;W++){let te=4*W;d.fillStyle=`rgb(${te},${te+1},${te+2})`,d.fillRect(W%5,Math.floor(W/5),1,1)}let L=d.getImageData(0,0,5,5).data;for(let W=0;W<5*5*4;W++)if(W%4!=3&&L[W]!==W){m=!0;break}}}return m||!1}var g=1e-6,i=typeof Float32Array<"u"?Float32Array:Array;function w(){var R=new i(9);return i!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[5]=0,R[6]=0,R[7]=0),R[0]=1,R[4]=1,R[8]=1,R}function S(R){return R[0]=1,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=1,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=1,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}function M(){var R=new i(3);return i!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R}function C(R){var d=R[0],L=R[1],W=R[2];return Math.sqrt(d*d+L*L+W*W)}function _(R,d,L){var W=new i(3);return W[0]=R,W[1]=d,W[2]=L,W}function T(R,d,L){return R[0]=d[0]+L[0],R[1]=d[1]+L[1],R[2]=d[2]+L[2],R}function f(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R[2]=d[2]*L,R}function u(R,d,L){var W=d[0],te=d[1],ue=d[2],me=L[0],ge=L[1],Ce=L[2];return R[0]=te*Ce-ue*ge,R[1]=ue*me-W*Ce,R[2]=W*ge-te*me,R}var A,x=C;function z(R,d,L){var W=d[0],te=d[1],ue=d[2],me=d[3];return R[0]=L[0]*W+L[4]*te+L[8]*ue+L[12]*me,R[1]=L[1]*W+L[5]*te+L[9]*ue+L[13]*me,R[2]=L[2]*W+L[6]*te+L[10]*ue+L[14]*me,R[3]=L[3]*W+L[7]*te+L[11]*ue+L[15]*me,R}function I(){var R=new i(4);return i!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R[3]=1,R}function O(R,d,L,W){var te=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",ue=Math.PI/360;d*=ue,W*=ue,L*=ue;var me=Math.sin(d),ge=Math.cos(d),Ce=Math.sin(L),Te=Math.cos(L),Oe=Math.sin(W),Pe=Math.cos(W);switch(te){case"xyz":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"xzy":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;case"yxz":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;case"yzx":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"zxy":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"zyx":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;default:throw new Error("Unknown angle order "+te)}return R}function D(){var R=new i(2);return i!=Float32Array&&(R[0]=0,R[1]=0),R}function B(R,d){var L=new i(2);return L[0]=R,L[1]=d,L}M(),A=new i(4),i!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0,A[3]=0),M(),_(1,0,0),_(0,1,0),I(),I(),w(),D();let F=8192;function P(R,d,L){return d*(F/(R.tileSize*Math.pow(2,L-R.tileID.overscaledZ)))}function j(R){return R instanceof Error?R:new Error(typeof R=="string"?R:String(R))}function U(R,d){return(R%d+d)%d}function $(R,d,L){return R*(1-L)+d*L}function Q(R){if(R<=0)return 0;if(R>=1)return 1;let d=R*R,L=d*R;return 4*(R<.5?L:3*(R-d)+L-.75)}function re(R,d,L,W){let te=new s(R,d,L,W);return ue=>te.solve(ue)}let ne=re(.25,.1,.25,1);function se(R,d,L){return Math.min(L,Math.max(d,R))}function G(R,d,L){let W=L-d,te=((R-d)%W+W)%W+d;return te===d?L:te}function X(R,...d){for(let L of d)for(let W in L)R[W]=L[W];return R}let K=1;function H(R,d,L){let W={};for(let te in R)W[te]=d.call(this,R[te],te,R);return W}function Y(R,d,L){let W={};for(let te in R)d.call(this,R[te],te,R)&&(W[te]=R[te]);return W}function q(R){return Array.isArray(R)?R.map(q):typeof R=="object"&&R?H(R,q):R}let Z={};function ee(R){Z[R]||(typeof console<"u"&&console.warn(R),Z[R]=!0)}function ae(R,d,L){return(L.y-R.y)*(d.x-R.x)>(d.y-R.y)*(L.x-R.x)}function he(R){return typeof WorkerGlobalScope<"u"&&R!==void 0&&R instanceof WorkerGlobalScope}let xe=null;function we(R){return typeof ImageBitmap<"u"&&R instanceof ImageBitmap}let Me="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Se(R,d,L,W,te){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let ue=new VideoFrame(R,{timestamp:0});try{let me=ue?.format;if(!me||!me.startsWith("BGR")&&!me.startsWith("RGB"))throw new Error(`Unrecognized format ${me}`);let ge=me.startsWith("BGR"),Ce=new Uint8ClampedArray(W*te*4);if(yield ue.copyTo(Ce,function(Te,Oe,Pe,it,He){let bt=4*Math.max(-Oe,0),Et=(Math.max(0,Pe)-Pe)*it*4+bt,Qt=4*it,er=Math.max(0,Oe),br=Math.max(0,Pe);return{rect:{x:er,y:br,width:Math.min(Te.width,Oe+it)-er,height:Math.min(Te.height,Pe+He)-br},layout:[{offset:Et,stride:Qt}]}}(R,d,L,W,te)),ge)for(let Te=0;Te{R.removeEventListener(d,L,W)}}}function ke(R){return R*Math.PI/180}function _e(R){return R/Math.PI*180}let ce={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},ve={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},le="AbortError";class Ae extends Error{constructor(d=le){super(d instanceof Error?d.message:d),this.name=le,d instanceof Error&&d.stack&&(this.stack=d.stack)}}function Be(R){return R instanceof Error&&R.name===le}function Xe(R){if(R.aborted)throw new Ae(R.reason)}let Ye={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function yt(R){return Ye.REGISTERED_PROTOCOLS[R.substring(0,R.indexOf("://"))]}let gt="global-dispatcher";class Tt extends Error{constructor(d,L,W,te){super(`AJAXError: ${L} (${d}): ${W}`),this.status=d,this.statusText=L,this.url=W,this.body=te}}let At=()=>{var R;return he(self)?(R=self.worker)===null||R===void 0?void 0:R.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href},$t=function(R,d){return e(this,void 0,void 0,function*(){var L,W;if(R.url.includes("://")&&!/^https?:|^file:/.test(R.url)){let te=yt(R.url);if(te){let ue=yield te(R,d);return ue.data||R.type!=="arrayBuffer"?ue:X(ue,{data:new ArrayBuffer(0)})}if(he(self)&&(!((L=self.worker)===null||L===void 0)&&L.actor))return self.worker.actor.sendAsync({type:"GR",data:R,targetMapId:gt},d)}if(!(te=>{var ue;return te.startsWith("file:")||((ue=At())===null||ue===void 0?void 0:ue.startsWith("file:"))&&!/^\w+:/.test(te)})(R.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return function(te,ue){return e(this,void 0,void 0,function*(){let me=new Request(te.url,{method:te.method||"GET",body:te.body,credentials:te.credentials,headers:te.headers,cache:te.cache,referrer:At(),referrerPolicy:te.referrerPolicy,signal:ue.signal}),ge,Ce;te.type!=="json"||me.headers.has("Accept")||me.headers.set("Accept","application/json");try{ge=yield fetch(me)}catch(Oe){throw Be(Oe)?Oe:new Tt(0,j(Oe).message,te.url,new Blob)}if(!ge.ok){let Oe=yield ge.blob();throw new Tt(ge.status,ge.statusText,te.url,Oe)}Ce=te.type==="arrayBuffer"||te.type==="image"?ge.arrayBuffer():te.type==="json"?ge.json():ge.text();let Te=yield Ce;return Xe(ue.signal),{data:Te,cacheControl:ge.headers.get("Cache-Control"),expires:ge.headers.get("Expires"),etag:ge.headers.get("ETag")}})}(R,d);if(he(self)&&(!((W=self.worker)===null||W===void 0)&&W.actor))return self.worker.actor.sendAsync({type:"GR",data:R,mustQueue:!0,targetMapId:gt},d)}return function(te,ue){return new Promise((me,ge)=>{var Ce;let Te=new XMLHttpRequest;Te.open(te.method||"GET",te.url,!0),te.type!=="arrayBuffer"&&te.type!=="image"||(Te.responseType="arraybuffer");for(let Oe in te.headers)Te.setRequestHeader(Oe,te.headers[Oe]);te.type==="json"&&(Te.responseType="text",!((Ce=te.headers)===null||Ce===void 0)&&Ce.Accept||Te.setRequestHeader("Accept","application/json")),Te.withCredentials=te.credentials==="include",Te.onerror=()=>{ge(new Error(Te.statusText))},Te.onload=()=>{if(!ue.signal.aborted)if((Te.status>=200&&Te.status<300||Te.status===0)&&Te.response!==null){let Oe=Te.response;if(te.type==="json")try{Oe=JSON.parse(Te.response)}catch(Pe){return void ge(Pe)}me({data:Oe,cacheControl:Te.getResponseHeader("Cache-Control"),expires:Te.getResponseHeader("Expires"),etag:Te.getResponseHeader("ETag")})}else{let Oe=new Blob([Te.response],{type:Te.getResponseHeader("Content-Type")});ge(new Tt(Te.status,Te.statusText,te.url,Oe))}},ue.signal.addEventListener("abort",()=>{Te.abort(),ge(new Ae(ue.signal.reason))}),Te.send(te.body)})}(R,d)})};function rr(R){if(!R||R.indexOf("://")<=0||R.startsWith("data:image/")||R.startsWith("blob:"))return!0;let d=new URL(R),L=window.location;return d.protocol===L.protocol&&d.host===L.host}function _r(R,d,L){var W;!((W=L[R])===null||W===void 0)&&W.includes(d)||(L[R]||(L[R]=[]),L[R].push(d))}function Xt(R,d,L){if(L?.[R]){let W=L[R].indexOf(d);W!==-1&&L[R].splice(W,1)}}class or{constructor(d,L={}){X(this,L),this.type=d}}class Ot extends or{constructor(d,L={}){super("error",X({error:d},L))}}class vt{on(d,L){return this._listeners||(this._listeners={}),_r(d,L,this._listeners),{unsubscribe:()=>{this.off(d,L)}}}off(d,L){return Xt(d,L,this._listeners),Xt(d,L,this._oneTimeListeners),this}once(d,L){return L?(this._oneTimeListeners||(this._oneTimeListeners={}),_r(d,L,this._oneTimeListeners),this):new Promise(W=>this.once(d,W))}fire(d,L){var W,te;typeof d=="string"&&(d=new or(d,L||{}));let ue=d.type;if(this.listens(ue)){d.target=this;let me=!((W=this._listeners)===null||W===void 0)&&W[ue]?this._listeners[ue].slice():[];for(let Te of me)Te.call(this,d);let ge=!((te=this._oneTimeListeners)===null||te===void 0)&&te[ue]?this._oneTimeListeners[ue].slice():[];for(let Te of ge)Xt(ue,Te,this._oneTimeListeners),Te.call(this,d);let Ce=this._eventedParent;Ce&&(X(d,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ce.fire(d))}else d instanceof Ot&&console.error(d.error);return this}listens(d){var L,W,te,ue,me;return((W=(L=this._listeners)===null||L===void 0?void 0:L[d])===null||W===void 0?void 0:W.length)>0||((ue=(te=this._oneTimeListeners)===null||te===void 0?void 0:te[d])===null||ue===void 0?void 0:ue.length)>0||((me=this._eventedParent)===null||me===void 0?void 0:me.listens(d))}setEventedParent(d,L){return this._eventedParent=d,this._eventedParentData=L,this}}var ht={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let De=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Ne(R,d){let L={};for(let W in R)W!=="ref"&&(L[W]=R[W]);return De.forEach(W=>{W in d&&(L[W]=d[W])}),L}function We(R,d){if(Array.isArray(R)){if(!Array.isArray(d)||R.length!==d.length)return!1;for(let L=0;L`:R.itemType.kind==="value"?"array":`array<${d}>`}return R.kind}let li=[Yt,Rt,nr,ur,cr,Rr,Pa,Qr,yn(Zr),La,Xa,un,ja,Nn];function Yn(R,d){if(d.kind==="error")return null;if(R.kind==="array"){if(d.kind==="array"&&(d.N===0&&d.itemType.kind==="value"||!Yn(R.itemType,d.itemType))&&(typeof R.N!="number"||R.N===d.N))return null}else{if(R.kind===d.kind)return null;if(R.kind==="value"){for(let L of li)if(!Yn(L,d))return null}}return`Expected ${Un(R)} but found ${Un(d)} instead.`}function on(R,d){return d.some(L=>L.kind===R.kind)}function en(R,d){return d.some(L=>L==="null"?R===null:L==="array"?Array.isArray(R):L==="object"?R&&!Array.isArray(R)&&typeof R=="object":L===typeof R)}function vi(R,d){return R.kind==="array"&&d.kind==="array"?R.itemType.kind===d.itemType.kind&&typeof R.N=="number":R.kind===d.kind}let Yi=.96422,Ja=.82521,Oa=4/29,lt=6/29,rt=3*lt*lt,fr=lt*lt*lt,lr=Math.PI/180,Tr=180/Math.PI;function Ir(R){return(R%=360)<0&&(R+=360),R}function Dr([R,d,L,W]){let te,ue,me=kt((.2225045*(R=ot(R))+.7168786*(d=ot(d))+.0606169*(L=ot(L)))/1);R===d&&d===L?te=ue=me:(te=kt((.4360747*R+.3850649*d+.1430804*L)/Yi),ue=kt((.0139322*R+.0971045*d+.7141733*L)/Ja));let ge=116*me-16;return[ge<0?0:ge,500*(te-me),200*(me-ue),W]}function ot(R){return R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function kt(R){return R>fr?Math.pow(R,1/3):R/rt+Oa}function jt([R,d,L,W]){let te=(R+16)/116,ue=isNaN(d)?te:te+d/500,me=isNaN(L)?te:te-L/200;return te=1*Er(te),ue=Yi*Er(ue),me=Ja*Er(me),[ar(3.1338561*ue-1.6168667*te-.4906146*me),ar(-.9787684*ue+1.9161415*te+.033454*me),ar(.0719453*ue-.2289914*te+1.4052427*me),W]}function ar(R){return(R=R<=.00304?12.92*R:1.055*Math.pow(R,1/2.4)-.055)<0?0:R>1?1:R}function Er(R){return R>lt?R*R*R:rt*(R-Oa)}let xr=Object.hasOwn||function(R,d){return Object.prototype.hasOwnProperty.call(R,d)};function zr(R,d){return xr(R,d)?R[d]:void 0}function Lr(R){return parseInt(R.padEnd(2,R),16)/255}function aa(R,d){return Sa(d?R/100:R,0,1)}function Sa(R,d,L){return Math.min(Math.max(d,R),L)}function wa(R){return!R.some(Number.isNaN)}let pn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function tn(R,d,L){return R+L*(d-R)}function ai(R,d,L){return R.map((W,te)=>tn(W,d[te],L))}class rn{constructor(d,L,W,te=1,ue=!0){this.r=d,this.g=L,this.b=W,this.a=te,ue||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter("rgb",[d,L,W,te]))}static parse(d){if(d instanceof rn)return d;if(typeof d!="string")return;let L=function(W){if((W=W.toLowerCase().trim())==="transparent")return[0,0,0,0];let te=zr(pn,W);if(te){let[me,ge,Ce]=te;return[me/255,ge/255,Ce/255,1]}if(W.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(W)){let me=W.length<6?1:2,ge=1;return[Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+me)||"ff")]}if(W.startsWith("rgb")){let me=W.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(me){let[ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br]=me,sr=[Oe||" ",He||" ",Qt].join("");if(sr===" "||sr===" /"||sr===",,"||sr===",,,"){let Mr=[Te,it,Et].join(""),qr=Mr==="%%%"?100:Mr===""?255:0;if(qr){let $r=[Sa(+Ce/qr,0,1),Sa(+Pe/qr,0,1),Sa(+bt/qr,0,1),er?aa(+er,br):1];if(wa($r))return $r}}return}}let ue=W.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(ue){let[me,ge,Ce,Te,Oe,Pe,it,He,bt]=ue,Et=[Ce||" ",Oe||" ",it].join("");if(Et===" "||Et===" /"||Et===",,"||Et===",,,"){let Qt=[+ge,Sa(+Te,0,100),Sa(+Pe,0,100),He?aa(+He,bt):1];if(wa(Qt))return function([er,br,sr,Mr]){function qr($r){let _a=($r+er/30)%12,Ca=br*Math.min(sr,1-sr);return sr-Ca*Math.max(-1,Math.min(_a-3,9-_a,1))}return er=Ir(er),br/=100,sr/=100,[qr(0),qr(8),qr(4),Mr]}(Qt)}}}(d);return L?new rn(...L,!1):void 0}get rgb(){let{r:d,g:L,b:W,a:te}=this,ue=te||1/0;return this.overwriteGetter("rgb",[d/ue,L/ue,W/ue,te])}get hcl(){return this.overwriteGetter("hcl",function(d){let[L,W,te,ue]=Dr(d),me=Math.sqrt(W*W+te*te);return[Math.round(1e4*me)?Ir(Math.atan2(te,W)*Tr):NaN,me,L,ue]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Dr(this.rgb))}overwriteGetter(d,L){return Object.defineProperty(this,d,{value:L}),L}toString(){let[d,L,W,te]=this.rgb;return`rgba(${[d,L,W].map(ue=>Math.round(255*ue)).join(",")},${te})`}static interpolate(d,L,W,te="rgb"){switch(te){case"rgb":{let[ue,me,ge,Ce]=ai(d.rgb,L.rgb,W);return new rn(ue,me,ge,Ce,!1)}case"hcl":{let[ue,me,ge,Ce]=d.hcl,[Te,Oe,Pe,it]=L.hcl,He,bt;if(isNaN(ue)||isNaN(Te))isNaN(ue)?isNaN(Te)?He=NaN:(He=Te,ge!==1&&ge!==0||(bt=Oe)):(He=ue,Pe!==1&&Pe!==0||(bt=me));else{let sr=Te-ue;Te>ue&&sr>180?sr-=360:Te180&&(sr+=360),He=ue+W*sr}let[Et,Qt,er,br]=function([sr,Mr,qr,$r]){return sr=isNaN(sr)?0:sr*lr,jt([qr,Math.cos(sr)*Mr,Math.sin(sr)*Mr,$r])}([He,bt??tn(me,Oe,W),tn(ge,Pe,W),tn(Ce,it,W)]);return new rn(Et,Qt,er,br,!1)}case"lab":{let[ue,me,ge,Ce]=jt(ai(d.lab,L.lab,W));return new rn(ue,me,ge,Ce,!1)}}}}rn.black=new rn(0,0,0,1),rn.white=new rn(1,1,1,1),rn.transparent=new rn(0,0,0,0),rn.red=new rn(1,0,0,1);class Ri{constructor(d,L,W){this.sensitivity=d?L?"variant":"case":L?"accent":"base",this.locale=W,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(d,L){return this.collator.compare(d,L)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let Gn=["bottom","center","top"];class no{constructor(d,L,W,te,ue,me){this.text=d,this.image=L,this.scale=W,this.fontStack=te,this.textColor=ue,this.verticalAlign=me}}class Di{constructor(d){this.sections=d}static fromString(d){return new Di([new no(d,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(d=>d.text.length!==0||d.image&&d.image.name.length!==0)}static factory(d){return d instanceof Di?d:Di.fromString(d)}toString(){return this.sections.length===0?"":this.sections.map(d=>d.text).join("")}}class fn{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof fn)return d;if(typeof d=="number")return new fn([d,d,d,d]);if(Array.isArray(d)&&!(d.length<1||d.length>4)){for(let L of d)if(typeof L!="number")return;switch(d.length){case 1:d=[d[0],d[0],d[0],d[0]];break;case 2:d=[d[0],d[1],d[0],d[1]];break;case 3:d=[d[0],d[1],d[2],d[1]]}return new fn(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W){return new fn(ai(d.values,L.values,W))}}class Ai{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof Ai)return d;if(typeof d=="number")return new Ai([d]);if(Array.isArray(d)){for(let L of d)if(typeof L!="number")return;return new Ai(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W){return new Ai(ai(d.values,L.values,W))}}class jn{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof jn)return d;if(typeof d=="string"){let W=rn.parse(d);return W?new jn([W]):void 0}if(!Array.isArray(d))return;let L=[];for(let W of d){if(typeof W!="string")return;let te=rn.parse(W);if(!te)return;L.push(te)}return new jn(L)}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W,te="rgb"){let ue=[];if(d.values.length!=L.values.length)throw new Error(`colorArray: Arrays have mismatched length (${d.values.length} vs. ${L.values.length}), cannot interpolate.`);for(let me=0;me=0&&R<=255&&typeof d=="number"&&d>=0&&d<=255&&typeof L=="number"&&L>=0&&L<=255?W===void 0||typeof W=="number"&&W>=0&&W<=1?null:`Invalid rgba value [${[R,d,L,W].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof W=="number"?[R,d,L,W]:[R,d,L]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Vn(R){if(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number"||R instanceof io||R instanceof rn||R instanceof Ri||R instanceof Di||R instanceof fn||R instanceof Ai||R instanceof jn||R instanceof gi||R instanceof qi)return!0;if(Array.isArray(R)){for(let d of R)if(!Vn(d))return!1;return!0}if(typeof R=="object"){for(let d in R)if(!Vn(R[d]))return!1;return!0}return!1}function qn(R){if(R===null)return Yt;if(typeof R=="string")return nr;if(typeof R=="boolean")return ur;if(typeof R=="number")return Rt;if(R instanceof rn)return cr;if(R instanceof io)return Rr;if(R instanceof Ri)return ha;if(R instanceof Di)return Pa;if(R instanceof fn)return La;if(R instanceof Ai)return Xa;if(R instanceof jn)return un;if(R instanceof gi)return Nn;if(R instanceof qi)return ja;if(Array.isArray(R)){let d=R.length,L;for(let W of R){let te=qn(W);if(L){if(L===te)continue;L=Zr;break}L=te}return yn(L||Zr,d)}return Qr}function Hi(R){let d=typeof R;return R===null?"":d==="string"||d==="number"||d==="boolean"?String(R):R instanceof rn||R instanceof io||R instanceof Di||R instanceof fn||R instanceof Ai||R instanceof jn||R instanceof gi||R instanceof qi?R.toString():JSON.stringify(R)}class Mi{constructor(d,L){this.type=d,this.value=L}static parse(d,L){if(d.length!==2)return L.error(`'literal' expression requires exactly one argument, but found ${d.length-1} instead.`);if(!Vn(d[1]))return L.error("invalid value");let W=d[1],te=qn(W),ue=L.expectedType;return te.kind!=="array"||te.N!==0||!ue||ue.kind!=="array"||typeof ue.N=="number"&&ue.N!==0||(te=ue),new Mi(te,W)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let Ro={string:nr,number:Rt,boolean:ur,object:Qr};class go{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W,te=1,ue=d[0];if(ue==="array"){let ge,Ce;if(d.length>2){let Te=d[1];if(typeof Te!="string"||!(Te in Ro)||Te==="object")return L.error('The item type argument of "array" must be one of string, number, boolean',1);ge=Ro[Te],te++}else ge=Zr;if(d.length>3){if(d[2]!==null&&(typeof d[2]!="number"||d[2]<0||d[2]!==Math.floor(d[2])))return L.error('The length argument to "array" must be a positive integer literal',2);Ce=d[2],te++}W=yn(ge,Ce)}else{if(!Ro[ue])throw new Error(`Types doesn't contain name = ${ue}`);W=Ro[ue]}let me=[];for(;ted.outputDefined())}}let Eo={"to-boolean":ur,"to-color":cr,"to-number":Rt,"to-string":nr};class Ao{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=d[0];if(!Eo[W])throw new Error(`Can't parse ${W} as it is not part of the known types`);if((W==="to-boolean"||W==="to-string")&&d.length!==2)return L.error("Expected one argument.");let te=Eo[W],ue=[];for(let me=1;me4?`Invalid rgba value ${JSON.stringify(L)}: expected an array containing either three or four numeric values.`:oo(L[0],L[1],L[2],L[3]),!W))return new rn(L[0]/255,L[1]/255,L[2]/255,L[3])}throw new Xn(W||`Could not parse color from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"padding":{let L;for(let W of this.args){L=W.evaluate(d);let te=fn.parse(L);if(te)return te}throw new Xn(`Could not parse padding from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"numberArray":{let L;for(let W of this.args){L=W.evaluate(d);let te=Ai.parse(L);if(te)return te}throw new Xn(`Could not parse numberArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"colorArray":{let L;for(let W of this.args){L=W.evaluate(d);let te=jn.parse(L);if(te)return te}throw new Xn(`Could not parse colorArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"variableAnchorOffsetCollection":{let L;for(let W of this.args){L=W.evaluate(d);let te=gi.parse(L);if(te)return te}throw new Xn(`Could not parse variableAnchorOffsetCollection from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"number":{let L=null;for(let W of this.args){if(L=W.evaluate(d),L===null)return 0;let te=Number(L);if(!isNaN(te))return te}throw new Xn(`Could not convert ${JSON.stringify(L)} to number.`)}case"formatted":return Di.fromString(Hi(this.args[0].evaluate(d)));case"resolvedImage":return qi.fromString(Hi(this.args[0].evaluate(d)));case"projectionDefinition":return this.args[0].evaluate(d);default:return Hi(this.args[0].evaluate(d))}}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}let ds=["Unknown","Point","LineString","Polygon"];class jo{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?ds[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(d){let L=this._parseColorCache.get(d);return L||(L=rn.parse(d),this._parseColorCache.set(d,L)),L}}class Wo{constructor(d,L,W=[],te,ue=new Kr,me=[]){this.registry=d,this.path=W,this.key=W.map(ge=>`[${ge}]`).join(""),this.scope=ue,this.errors=me,this.expectedType=te,this._isConstant=L}parse(d,L,W,te,ue={}){return L?this.concat(L,W,te)._parse(d,ue):this._parse(d,ue)}_parse(d,L){function W(te,ue,me){return me==="assert"?new go(ue,[te]):me==="coerce"?new Ao(ue,[te]):te}if(d!==null&&typeof d!="string"&&typeof d!="boolean"&&typeof d!="number"||(d=["literal",d]),Array.isArray(d)){if(d.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let te=d[0];if(typeof te!="string")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let ue=this.registry[te];if(ue){let me=ue.parse(d,this);if(!me)return null;if(this.expectedType){let ge=this.expectedType,Ce=me.type;if(ge.kind!=="string"&&ge.kind!=="number"&&ge.kind!=="boolean"&&ge.kind!=="object"&&ge.kind!=="array"||Ce.kind!=="value"){if(ge.kind==="projectionDefinition"&&["string","array"].includes(Ce.kind)||["color","formatted","resolvedImage"].includes(ge.kind)&&["value","string"].includes(Ce.kind)||["padding","numberArray"].includes(ge.kind)&&["value","number","array"].includes(Ce.kind)||ge.kind==="colorArray"&&["value","string","array"].includes(Ce.kind)||ge.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(Ce.kind))me=W(me,ge,L.typeAnnotation||"coerce");else if(this.checkSubtype(ge,Ce))return null}else me=W(me,ge,L.typeAnnotation||"assert")}if(!(me instanceof Mi)&&me.type.kind!=="resolvedImage"&&this._isConstant(me)){let ge=new jo;try{me=new Mi(me.type,me.evaluate(ge))}catch(Ce){return this.error(Ce.message),null}}return me}return this.error(`Unknown expression "${te}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(d===void 0?"'undefined' value invalid. Use null instead.":typeof d=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof d} instead.`)}concat(d,L,W){let te=typeof d=="number"?this.path.concat(d):this.path,ue=W?this.scope.concat(W):this.scope;return new Wo(this.registry,this._isConstant,te,L||null,ue,this.errors)}error(d,...L){let W=`${this.key}${L.map(te=>`[${te}]`).join("")}`;this.errors.push(new Sr(W,d))}checkSubtype(d,L){let W=Yn(d,L);return W&&this.error(W),W}}class to{constructor(d,L){this.type=L.type,this.bindings=[].concat(d),this.result=L}evaluate(d){return this.result.evaluate(d)}eachChild(d){for(let L of this.bindings)d(L[1]);d(this.result)}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found ${d.length-1} instead.`);let W=[];for(let ue=1;ue=W.length)throw new Xn(`Array index out of bounds: ${L} > ${W.length-1}.`);if(L!==Math.floor(L))throw new Xn(`Array index must be an integer, but found ${L} instead.`);return W[L]}eachChild(d){d(this.index),d(this.input)}outputDefined(){return!1}}class Vi{constructor(d,L){this.type=ur,this.needle=d,this.haystack=L}static parse(d,L){if(d.length!==3)return L.error(`Expected 2 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Zr);return W&&te?on(W.type,[ur,nr,Rt,Yt,Zr])?new Vi(W,te):L.error(`Expected first argument to be of type boolean, string, number or null, but found ${Un(W.type)} instead`):null}evaluate(d){let L=this.needle.evaluate(d),W=this.haystack.evaluate(d);if(!W)return!1;if(!en(L,["boolean","string","number","null"]))throw new Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Un(qn(L))} instead.`);if(!en(W,["string","array"]))throw new Xn(`Expected second argument to be of type array or string, but found ${Un(qn(W))} instead.`);return W.indexOf(L)>=0}eachChild(d){d(this.needle),d(this.haystack)}outputDefined(){return!0}}class Io{constructor(d,L,W){this.type=Rt,this.needle=d,this.haystack=L,this.fromIndex=W}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Zr);if(!W||!te)return null;if(!on(W.type,[ur,nr,Rt,Yt,Zr]))return L.error(`Expected first argument to be of type boolean, string, number or null, but found ${Un(W.type)} instead`);if(d.length===4){let ue=L.parse(d[3],3,Rt);return ue?new Io(W,te,ue):null}return new Io(W,te)}evaluate(d){let L=this.needle.evaluate(d),W=this.haystack.evaluate(d);if(!en(L,["boolean","string","number","null"]))throw new Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Un(qn(L))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(d)),en(W,["string"])){let ue=W.indexOf(L,te);return ue===-1?-1:[...W.slice(0,ue)].length}if(en(W,["array"]))return W.indexOf(L,te);throw new Xn(`Expected second argument to be of type array or string, but found ${Un(qn(W))} instead.`)}eachChild(d){d(this.needle),d(this.haystack),this.fromIndex&&d(this.fromIndex)}outputDefined(){return!1}}class Xi{constructor(d,L,W,te,ue,me){this.inputType=d,this.type=L,this.input=W,this.cases=te,this.outputs=ue,this.otherwise=me}static parse(d,L){if(d.length<5)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if(d.length%2!=1)return L.error("Expected an even number of arguments.");let W,te;L.expectedType&&L.expectedType.kind!=="value"&&(te=L.expectedType);let ue={},me=[];for(let Te=2;TeNumber.MAX_SAFE_INTEGER)return it.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof bt=="number"&&Math.floor(bt)!==bt)return it.error("Numeric branch labels must be integer values.");if(W){if(it.checkSubtype(W,qn(bt)))return null}else W=qn(bt);if(ue[String(bt)]!==void 0)return it.error("Branch labels must be unique.");ue[String(bt)]=me.length}let He=L.parse(Pe,Te,te);if(!He)return null;te=te||He.type,me.push(He)}let ge=L.parse(d[1],1,Zr);if(!ge)return null;let Ce=L.parse(d[d.length-1],d.length-1,te);return Ce?ge.type.kind!=="value"&&L.concat(1).checkSubtype(W,ge.type)?null:new Xi(W,te,ge,ue,me,Ce):null}evaluate(d){let L=this.input.evaluate(d);return(qn(L)===this.inputType&&this.outputs[this.cases[L]]||this.otherwise).evaluate(d)}eachChild(d){d(this.input),this.outputs.forEach(d),d(this.otherwise)}outputDefined(){return this.outputs.every(d=>d.outputDefined())&&this.otherwise.outputDefined()}}class Ko{constructor(d,L,W){this.type=d,this.branches=L,this.otherwise=W}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found only ${d.length-1}.`);if(d.length%2!=0)return L.error("Expected an odd number of arguments.");let W;L.expectedType&&L.expectedType.kind!=="value"&&(W=L.expectedType);let te=[];for(let me=1;meL.outputDefined())&&this.otherwise.outputDefined()}}class Uo{constructor(d,L,W,te){this.type=d,this.input=L,this.beginIndex=W,this.endIndex=te}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Rt);if(!W||!te)return null;if(!on(W.type,[yn(Zr),nr,Zr]))return L.error(`Expected first argument to be of type array or string, but found ${Un(W.type)} instead`);if(d.length===4){let ue=L.parse(d[3],3,Rt);return ue?new Uo(W.type,W,te,ue):null}return new Uo(W.type,W,te)}evaluate(d){let L=this.input.evaluate(d),W=this.beginIndex.evaluate(d),te;if(this.endIndex&&(te=this.endIndex.evaluate(d)),en(L,["string"]))return[...L].slice(W,te).join("");if(en(L,["array"]))return L.slice(W,te);throw new Xn(`Expected first argument to be of type array or string, but found ${Un(qn(L))} instead.`)}eachChild(d){d(this.input),d(this.beginIndex),this.endIndex&&d(this.endIndex)}outputDefined(){return!1}}function Ls(R,d){let L=R.length-1,W,te,ue=0,me=L,ge=0;for(;ue<=me;)if(ge=Math.floor((ue+me)/2),W=R[ge],te=R[ge+1],W<=d){if(ge===L||dd))throw new Xn("Input is not a number.");me=ge-1}return 0}class Ss{constructor(d,L,W){this.type=d,this.input=L,this.labels=[],this.outputs=[];for(let[te,ue]of W)this.labels.push(te),this.outputs.push(ue)}static parse(d,L){if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");let W=L.parse(d[1],1,Rt);if(!W)return null;let te=[],ue=null;L.expectedType&&L.expectedType.kind!=="value"&&(ue=L.expectedType);for(let me=1;me=ge)return L.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Te);let Pe=L.parse(Ce,Oe,ue);if(!Pe)return null;ue=ue||Pe.type,te.push([ge,Pe])}return new Ss(ue,W,te)}evaluate(d){let L=this.labels,W=this.outputs;if(L.length===1)return W[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return W[0].evaluate(d);let ue=L.length;return te>=L[ue-1]?W[ue-1].evaluate(d):W[Ls(L,te)].evaluate(d)}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function Vo(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}var Vs,Ts,Bo=function(){if(Ts)return Vs;function R(d,L,W,te){this.cx=3*d,this.bx=3*(W-d)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*L,this.by=3*(te-L)-this.cy,this.ay=1-this.cy-this.by,this.p1x=d,this.p1y=L,this.p2x=W,this.p2y=te}return Ts=1,Vs=R,R.prototype={sampleCurveX:function(d){return((this.ax*d+this.bx)*d+this.cx)*d},sampleCurveY:function(d){return((this.ay*d+this.by)*d+this.cy)*d},sampleCurveDerivativeX:function(d){return(3*this.ax*d+2*this.bx)*d+this.cx},solveCurveX:function(d,L){if(L===void 0&&(L=1e-6),d<0)return 0;if(d>1)return 1;for(var W=d,te=0;te<8;te++){var ue=this.sampleCurveX(W)-d;if(Math.abs(ue)ue?ge=W:Ce=W,W=.5*(Ce-ge)+ge;return W},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},Vs}(),_o=Vo(Bo);class Pi{constructor(d,L,W,te,ue){this.type=d,this.operator=L,this.interpolation=W,this.input=te,this.labels=[],this.outputs=[];for(let[me,ge]of ue)this.labels.push(me),this.outputs.push(ge)}static interpolationFactor(d,L,W,te){let ue=0;if(d.name==="exponential")ue=yo(L,d.base,W,te);else if(d.name==="linear")ue=yo(L,1,W,te);else if(d.name==="cubic-bezier"){let me=d.controlPoints;ue=new _o(me[0],me[1],me[2],me[3]).solve(yo(L,1,W,te))}return ue}static parse(d,L){let[W,te,ue,...me]=d;if(!Array.isArray(te)||te.length===0)return L.error("Expected an interpolation type expression.",1);if(te[0]==="linear")te={name:"linear"};else if(te[0]==="exponential"){let Te=te[1];if(typeof Te!="number")return L.error("Exponential interpolation requires a numeric base.",1,1);te={name:"exponential",base:Te}}else{if(te[0]!=="cubic-bezier")return L.error(`Unknown interpolation type ${String(te[0])}`,1,0);{let Te=te.slice(1);if(Te.length!==4||Te.some(Oe=>typeof Oe!="number"||Oe<0||Oe>1))return L.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);te={name:"cubic-bezier",controlPoints:Te}}}if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");if(ue=L.parse(ue,2,Rt),!ue)return null;let ge=[],Ce=null;W!=="interpolate-hcl"&&W!=="interpolate-lab"||L.expectedType==un?L.expectedType&&L.expectedType.kind!=="value"&&(Ce=L.expectedType):Ce=cr;for(let Te=0;Te=Oe)return L.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',it);let bt=L.parse(Pe,He,Ce);if(!bt)return null;Ce=Ce||bt.type,ge.push([Oe,bt])}return vi(Ce,Rt)||vi(Ce,Rr)||vi(Ce,cr)||vi(Ce,La)||vi(Ce,Xa)||vi(Ce,un)||vi(Ce,Nn)||vi(Ce,yn(Rt))?new Pi(Ce,W,te,ue,ge):L.error(`Type ${Un(Ce)} is not interpolatable.`)}evaluate(d){let L=this.labels,W=this.outputs;if(L.length===1)return W[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return W[0].evaluate(d);let ue=L.length;if(te>=L[ue-1])return W[ue-1].evaluate(d);let me=Ls(L,te),ge=Pi.interpolationFactor(this.interpolation,te,L[me],L[me+1]),Ce=W[me].evaluate(d),Te=W[me+1].evaluate(d);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return tn(Ce,Te,ge);case"color":return rn.interpolate(Ce,Te,ge);case"padding":return fn.interpolate(Ce,Te,ge);case"colorArray":return jn.interpolate(Ce,Te,ge);case"numberArray":return Ai.interpolate(Ce,Te,ge);case"variableAnchorOffsetCollection":return gi.interpolate(Ce,Te,ge);case"array":return ai(Ce,Te,ge);case"projectionDefinition":return io.interpolate(Ce,Te,ge)}case"interpolate-hcl":switch(this.type.kind){case"color":return rn.interpolate(Ce,Te,ge,"hcl");case"colorArray":return jn.interpolate(Ce,Te,ge,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return rn.interpolate(Ce,Te,ge,"lab");case"colorArray":return jn.interpolate(Ce,Te,ge,"lab")}}}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function yo(R,d,L,W){let te=W-L,ue=R-L;return te===0?0:d===1?ue/te:(Math.pow(d,ue)-1)/(Math.pow(d,te)-1)}let bs={color:rn.interpolate,number:tn,padding:fn.interpolate,numberArray:Ai.interpolate,colorArray:jn.interpolate,variableAnchorOffsetCollection:gi.interpolate,array:ai};class Dl{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=null,te=L.expectedType;te&&te.kind!=="value"&&(W=te);let ue=[];for(let ge of d.slice(1)){let Ce=L.parse(ge,1+ue.length,W,void 0,{typeAnnotation:"omit"});if(!Ce)return null;W=W||Ce.type,ue.push(Ce)}if(!W)throw new Error("No output type");let me=te&&ue.some(ge=>Yn(te,ge.type));return new Dl(me?Zr:W,ue)}evaluate(d){let L,W=null,te=0;for(let ue of this.args)if(te++,W=ue.evaluate(d),W&&W instanceof qi&&!W.available&&(L||(L=W.name),W=null,te===this.args.length&&(W=L)),W!==null)break;return W}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}function hl(R,d){return R==="=="||R==="!="?d.kind==="boolean"||d.kind==="string"||d.kind==="number"||d.kind==="null"||d.kind==="value":d.kind==="string"||d.kind==="number"||d.kind==="value"}function ps(R,d,L,W){return W.compare(d,L)===0}function dl(R,d,L){let W=R!=="=="&&R!=="!=";return class ER{constructor(ue,me,ge){this.type=ur,this.lhs=ue,this.rhs=me,this.collator=ge,this.hasUntypedArgument=ue.type.kind==="value"||me.type.kind==="value"}static parse(ue,me){if(ue.length!==3&&ue.length!==4)return me.error("Expected two or three arguments.");let ge=ue[0],Ce=me.parse(ue[1],1,Zr);if(!Ce)return null;if(!hl(ge,Ce.type))return me.concat(1).error(`"${ge}" comparisons are not supported for type '${Un(Ce.type)}'.`);let Te=me.parse(ue[2],2,Zr);if(!Te)return null;if(!hl(ge,Te.type))return me.concat(2).error(`"${ge}" comparisons are not supported for type '${Un(Te.type)}'.`);if(Ce.type.kind!==Te.type.kind&&Ce.type.kind!=="value"&&Te.type.kind!=="value")return me.error(`Cannot compare types '${Un(Ce.type)}' and '${Un(Te.type)}'.`);W&&(Ce.type.kind==="value"&&Te.type.kind!=="value"?Ce=new go(Te.type,[Ce]):Ce.type.kind!=="value"&&Te.type.kind==="value"&&(Te=new go(Ce.type,[Te])));let Oe=null;if(ue.length===4){if(Ce.type.kind!=="string"&&Te.type.kind!=="string"&&Ce.type.kind!=="value"&&Te.type.kind!=="value")return me.error("Cannot use collator to compare non-string types.");if(Oe=me.parse(ue[3],3,ha),!Oe)return null}return new ER(Ce,Te,Oe)}evaluate(ue){let me=this.lhs.evaluate(ue),ge=this.rhs.evaluate(ue);if(W&&this.hasUntypedArgument){let Ce=qn(me),Te=qn(ge);if(Ce.kind!==Te.kind||Ce.kind!=="string"&&Ce.kind!=="number")throw new Xn(`Expected arguments for "${R}" to be (string, string) or (number, number), but found (${Ce.kind}, ${Te.kind}) instead.`)}if(this.collator&&!W&&this.hasUntypedArgument){let Ce=qn(me),Te=qn(ge);if(Ce.kind!=="string"||Te.kind!=="string")return d(ue,me,ge)}return this.collator?L(ue,me,ge,this.collator.evaluate(ue)):d(ue,me,ge)}eachChild(ue){ue(this.lhs),ue(this.rhs),this.collator&&ue(this.collator)}outputDefined(){return!0}}}let wu=dl("==",function(R,d,L){return d===L},ps),lu=dl("!=",function(R,d,L){return d!==L},function(R,d,L,W){return!ps(0,d,L,W)}),xc=dl("<",function(R,d,L){return d",function(R,d,L){return d>L},function(R,d,L,W){return W.compare(d,L)>0}),pl=dl("<=",function(R,d,L){return d<=L},function(R,d,L,W){return W.compare(d,L)<=0}),$u=dl(">=",function(R,d,L){return d>=L},function(R,d,L,W){return W.compare(d,L)>=0});class uu{constructor(d,L,W){this.type=ha,this.locale=W,this.caseSensitive=d,this.diacriticSensitive=L}static parse(d,L){if(d.length!==2)return L.error("Expected one argument.");let W=d[1];if(typeof W!="object"||Array.isArray(W))return L.error("Collator options argument must be an object.");let te=L.parse(W["case-sensitive"]!==void 0&&W["case-sensitive"],1,ur);if(!te)return null;let ue=L.parse(W["diacritic-sensitive"]!==void 0&&W["diacritic-sensitive"],1,ur);if(!ue)return null;let me=null;return W.locale&&(me=L.parse(W.locale,1,nr),!me)?null:new uu(te,ue,me)}evaluate(d){return new Ri(this.caseSensitive.evaluate(d),this.diacriticSensitive.evaluate(d),this.locale?this.locale.evaluate(d):null)}eachChild(d){d(this.caseSensitive),d(this.diacriticSensitive),this.locale&&d(this.locale)}outputDefined(){return!1}}class tl{constructor(d,L,W,te,ue,me){this.type=nr,this.number=d,this.locale=L,this.currency=W,this.unit=te,this.minFractionDigits=ue,this.maxFractionDigits=me}static parse(d,L){if(d.length!==3)return L.error("Expected two arguments.");let W=L.parse(d[1],1,Rt);if(!W)return null;let te=d[2];if(typeof te!="object"||Array.isArray(te))return L.error("NumberFormat options argument must be an object.");let ue=null;if(te.locale&&(ue=L.parse(te.locale,1,nr),!ue))return null;let me=null;if(te.currency&&(me=L.parse(te.currency,1,nr),!me))return null;let ge=null;if(te.unit&&(ge=L.parse(te.unit,1,nr),!ge))return null;if(me&&ge)return L.error("NumberFormat options `currency` and `unit` are mutually exclusive");let Ce=null;if(te["min-fraction-digits"]&&(Ce=L.parse(te["min-fraction-digits"],1,Rt),!Ce))return null;let Te=null;return te["max-fraction-digits"]&&(Te=L.parse(te["max-fraction-digits"],1,Rt),!Te)?null:new tl(W,ue,me,ge,Ce,Te)}evaluate(d){return new Intl.NumberFormat(this.locale?this.locale.evaluate(d):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(d):void 0,unit:this.unit?this.unit.evaluate(d):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(d):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(d):void 0}).format(this.number.evaluate(d))}eachChild(d){d(this.number),this.locale&&d(this.locale),this.currency&&d(this.currency),this.unit&&d(this.unit),this.minFractionDigits&&d(this.minFractionDigits),this.maxFractionDigits&&d(this.maxFractionDigits)}outputDefined(){return!1}}class vs{constructor(d){this.type=Pa,this.sections=d}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=d[1];if(!Array.isArray(W)&&typeof W=="object")return L.error("First argument must be an image or text section.");let te=[],ue=!1;for(let me=1;me<=d.length-1;++me){let ge=d[me];if(ue&&typeof ge=="object"&&!Array.isArray(ge)){ue=!1;let Ce=null;if(ge["font-scale"]&&(Ce=L.parse(ge["font-scale"],1,Rt),!Ce))return null;let Te=null;if(ge["text-font"]&&(Te=L.parse(ge["text-font"],1,yn(nr)),!Te))return null;let Oe=null;if(ge["text-color"]&&(Oe=L.parse(ge["text-color"],1,cr),!Oe))return null;let Pe=null;if(ge["vertical-align"]){if(typeof ge["vertical-align"]=="string"&&!Gn.includes(ge["vertical-align"]))return L.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${ge["vertical-align"]}' instead.`);if(Pe=L.parse(ge["vertical-align"],1,nr),!Pe)return null}let it=te[te.length-1];it.scale=Ce,it.font=Te,it.textColor=Oe,it.verticalAlign=Pe}else{let Ce=L.parse(d[me],1,Zr);if(!Ce)return null;let Te=Ce.type.kind;if(Te!=="string"&&Te!=="value"&&Te!=="null"&&Te!=="resolvedImage")return L.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ue=!0,te.push({content:Ce,scale:null,font:null,textColor:null,verticalAlign:null})}}return new vs(te)}evaluate(d){return new Di(this.sections.map(L=>{let W=L.content.evaluate(d);return qn(W)===ja?new no("",W,null,null,null,L.verticalAlign?L.verticalAlign.evaluate(d):null):new no(Hi(W),null,L.scale?L.scale.evaluate(d):null,L.font?L.font.evaluate(d).join(","):null,L.textColor?L.textColor.evaluate(d):null,L.verticalAlign?L.verticalAlign.evaluate(d):null)}))}eachChild(d){for(let L of this.sections)d(L.content),L.scale&&d(L.scale),L.font&&d(L.font),L.textColor&&d(L.textColor),L.verticalAlign&&d(L.verticalAlign)}outputDefined(){return!1}}class os{constructor(d){this.type=ja,this.input=d}static parse(d,L){if(d.length!==2)return L.error("Expected two arguments.");let W=L.parse(d[1],1,nr);return W?new os(W):L.error("No image name provided.")}evaluate(d){let L=this.input.evaluate(d),W=qi.fromString(L);return W&&d.availableImages&&(W.available=d.availableImages.indexOf(L)>-1),W}eachChild(d){d(this.input)}outputDefined(){return!1}}class ms{constructor(d){this.type=Rt,this.input=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let W=L.parse(d[1],1);return W?W.type.kind!=="array"&&W.type.kind!=="string"&&W.type.kind!=="value"?L.error(`Expected argument of type string or array, but found ${Un(W.type)} instead.`):new ms(W):null}evaluate(d){let L=this.input.evaluate(d);if(typeof L=="string")return[...L].length;if(Array.isArray(L))return L.length;throw new Xn(`Expected value to be of type string or array, but found ${Un(qn(L))} instead.`)}eachChild(d){d(this.input)}outputDefined(){return!1}}let rl=8192;function Fu(R,d){let L=(180+R[0])/360,W=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R[1]*Math.PI/360)))/360,te=Math.pow(2,d.z);return[Math.round(L*te*rl),Math.round(W*te*rl)]}function zu(R,d){let L=Math.pow(2,d.z);return[(te=(R[0]/rl+d.x)/L,360*te-180),(W=(R[1]/rl+d.y)/L,360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90)];var W,te}function Ku(R,d){R[0]=Math.min(R[0],d[0]),R[1]=Math.min(R[1],d[1]),R[2]=Math.max(R[2],d[0]),R[3]=Math.max(R[3],d[1])}function bc(R,d){return!(R[0]<=d[0]||R[2]>=d[2]||R[1]<=d[1]||R[3]>=d[3])}function Lh(R,d,L){let W=R[0]-d[0],te=R[1]-d[1],ue=R[0]-L[0],me=R[1]-L[1];return W*me-ue*te==0&&W*ue<=0&&te*me<=0}function rh(R,d,L,W){return(te=[W[0]-L[0],W[1]-L[1]])[0]*(ue=[d[0]-R[0],d[1]-R[1]])[1]-te[1]*ue[0]!=0&&!(!Nf(R,d,L,W)||!Nf(L,W,R,d));var te,ue}function Ju(R,d,L){for(let W of L)for(let te=0;te(te=R)[1]!=(me=ge[Ce+1])[1]>te[1]&&te[0]<(me[0]-ue[0])*(te[1]-ue[1])/(me[1]-ue[1])+ue[0]&&(W=!W)}var te,ue,me;return W}function ah(R,d){for(let L of d)if(ss(R,L))return!0;return!1}function wc(R,d){for(let L of R)if(!ss(L,d))return!1;for(let L=0;L0&&ge<0||me<0&&ge>0}function Bu(R,d,L){let W=[];for(let te=0;teL[2]){let te=.5*W,ue=R[0]-L[0]>te?-W:L[0]-R[0]>te?W:0;ue===0&&(ue=R[0]-L[2]>te?-W:L[2]-R[0]>te?W:0),R[0]+=ue}Ku(d,R)}function Gc(R,d,L,W){let te=Math.pow(2,W.z)*rl,ue=[W.x*rl,W.y*rl],me=[];for(let ge of R)for(let Ce of ge){let Te=[Ce.x+ue[0],Ce.y+ue[1]];Ou(Te,d,L,te),me.push(Te)}return me}function pf(R,d,L,W){let te=Math.pow(2,W.z)*rl,ue=[W.x*rl,W.y*rl],me=[];for(let Ce of R){let Te=[];for(let Oe of Ce){let Pe=[Oe.x+ue[0],Oe.y+ue[1]];Ku(d,Pe),Te.push(Pe)}me.push(Te)}if(d[2]-d[0]<=te/2){(ge=d)[0]=ge[1]=1/0,ge[2]=ge[3]=-1/0;for(let Ce of me)for(let Te of Ce)Ou(Te,d,L,te)}var ge;return me}class $l{constructor(d,L){this.type=ur,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'within' expression requires exactly one argument, but found ${d.length-1} instead.`);if(Vn(d[1])){let W=d[1];if(W.type==="FeatureCollection"){let te=[];for(let ue of W.features){let{type:me,coordinates:ge}=ue.geometry;me==="Polygon"&&te.push(ge),me==="MultiPolygon"&&te.push(...ge)}if(te.length)return new $l(W,{type:"MultiPolygon",coordinates:te})}else if(W.type==="Feature"){let te=W.geometry.type;if(te==="Polygon"||te==="MultiPolygon")return new $l(W,W.geometry)}else if(W.type==="Polygon"||W.type==="MultiPolygon")return new $l(W,W)}return L.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(d){if(d.geometry()!=null&&d.canonicalID()!=null){if(d.geometryType()==="Point")return function(L,W){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],me=L.canonicalID();if(W.type==="Polygon"){let ge=Bu(W.coordinates,ue,me),Ce=Gc(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!ss(Te,ge))return!1}if(W.type==="MultiPolygon"){let ge=Tc(W.coordinates,ue,me),Ce=Gc(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!ah(Te,ge))return!1}return!0}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,W){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],me=L.canonicalID();if(W.type==="Polygon"){let ge=Bu(W.coordinates,ue,me),Ce=pf(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!wc(Te,ge))return!1}if(W.type==="MultiPolygon"){let ge=Tc(W.coordinates,ue,me),Ce=pf(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!pc(Te,ge))return!1}return!0}(d,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let jf=class{constructor(R=[],d=(L,W)=>LW?1:0){if(this.data=R,this.length=this.data.length,this.compare=d,this.length>0)for(let L=(this.length>>1)-1;L>=0;L--)this._down(L)}push(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],d=this.data.pop();return--this.length>0&&(this.data[0]=d,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:d,compare:L}=this,W=d[R];for(;R>0;){let te=R-1>>1,ue=d[te];if(L(W,ue)>=0)break;d[R]=ue,R=te}d[R]=W}_down(R){let{data:d,compare:L}=this,W=this.length>>1,te=d[R];for(;R=0)break;d[R]=d[ue],R=ue}d[R]=te}};function Hc(R,d,L=0,W=R.length-1,te=Qu){for(;W>L;){if(W-L>600){let Ce=W-L+1,Te=d-L+1,Oe=Math.log(Ce),Pe=.5*Math.exp(2*Oe/3),it=.5*Math.sqrt(Oe*Pe*(Ce-Pe)/Ce)*(Te-Ce/2<0?-1:1);Hc(R,d,Math.max(L,Math.floor(d-Te*Pe/Ce+it)),Math.min(W,Math.floor(d+(Ce-Te)*Pe/Ce+it)),te)}let ue=R[d],me=L,ge=W;for(Wc(R,L,d),te(R[W],ue)>0&&Wc(R,L,W);me0;)ge--}te(R[L],ue)===0?Wc(R,L,ge):(ge++,Wc(R,ge,W)),ge<=d&&(L=ge+1),d<=ge&&(W=ge-1)}}function Wc(R,d,L){let W=R[d];R[d]=R[L],R[L]=W}function Qu(R,d){return Rd?1:0}function Yc(R,d){if(R.length<=1)return[R];let L=[],W,te;for(let ue of R){let me=Uf(ue);me!==0&&(ue.area=Math.abs(me),te===void 0&&(te=me<0),te===me<0?(W&&L.push(W),W=[ue]):W.push(ue))}if(W&&L.push(W),d>1)for(let ue=0;ue1?(Te=d[Ce+1][0],Oe=d[Ce+1][1]):He>0&&(Te+=Pe/this.kx*He,Oe+=it/this.ky*He)),Pe=this.wrap(L[0]-Te)*this.kx,it=(L[1]-Oe)*this.ky;let bt=Pe*Pe+it*it;bt180;)d-=360;return d}}function Zc(R,d){return d[0]-R[0]}function ec(R){return R[1]-R[0]+1}function cu(R,d){return R[1]>=R[0]&&R[1]R[1])return[null,null];let L=ec(R);if(d){if(L===2)return[R,null];let te=Math.floor(L/2);return[[R[0],R[0]+te],[R[0]+te,R[1]]]}if(L===1)return[R,null];let W=Math.floor(L/2)-1;return[[R[0],R[0]+W],[R[0]+W+1,R[1]]]}function vf(R,d){if(!cu(d,R.length))return[1/0,1/0,-1/0,-1/0];let L=[1/0,1/0,-1/0,-1/0];for(let W=d[0];W<=d[1];++W)Ku(L,R[W]);return L}function Tu(R){let d=[1/0,1/0,-1/0,-1/0];for(let L of R)for(let W of L)Ku(d,W);return d}function nh(R){return R[0]!==-1/0&&R[1]!==-1/0&&R[2]!==1/0&&R[3]!==1/0}function vl(R,d,L){if(!nh(R)||!nh(d))return NaN;let W=0,te=0;return R[2]d[2]&&(W=R[0]-d[2]),R[1]>d[3]&&(te=R[1]-d[3]),R[3]=W)return W;if(bc(te,ue)){if(mf(R,d))return 0}else if(mf(d,R))return 0;let me=1/0;for(let ge of R)for(let Ce=0,Te=ge.length,Oe=Te-1;Ce0;){let Ce=me.pop();if(Ce[0]>=ue)continue;let Te=Ce[1],Oe=d?50:100;if(ec(Te)<=Oe){if(!cu(Te,R.length))return NaN;if(d){let Pe=Mc(R,Te,L,W);if(isNaN(Pe)||Pe===0)return Pe;ue=Math.min(ue,Pe)}else for(let Pe=Te[0];Pe<=Te[1];++Pe){let it=ac(R[Pe],L,W);if(ue=Math.min(ue,it),ue===0)return 0}}else{let Pe=tc(Te,d);ih(me,ue,W,R,ge,Pe[0]),ih(me,ue,W,R,ge,Pe[1])}}return ue}function El(R,d,L,W,te,ue=1/0){let me=Math.min(ue,te.distance(R[0],L[0]));if(me===0)return me;let ge=new jf([[0,[0,R.length-1],[0,L.length-1]]],Zc);for(;ge.length>0;){let Ce=ge.pop();if(Ce[0]>=me)continue;let Te=Ce[1],Oe=Ce[2],Pe=d?50:100,it=W?50:100;if(ec(Te)<=Pe&&ec(Oe)<=it){if(!cu(Te,R.length)&&cu(Oe,L.length))return NaN;let He;if(d&&W)He=yl(R,Te,L,Oe,te),me=Math.min(me,He);else if(d&&!W){let bt=R.slice(Te[0],Te[1]+1);for(let Et=Oe[0];Et<=Oe[1];++Et)if(He=ml(L[Et],bt,te),me=Math.min(me,He),me===0)return me}else if(!d&&W){let bt=L.slice(Oe[0],Oe[1]+1);for(let Et=Te[0];Et<=Te[1];++Et)if(He=ml(R[Et],bt,te),me=Math.min(me,He),me===0)return me}else He=qf(R,Te,L,Oe,te),me=Math.min(me,He)}else{let He=tc(Te,d),bt=tc(Oe,W);fu(ge,me,te,R,L,He[0],bt[0]),fu(ge,me,te,R,L,He[0],bt[1]),fu(ge,me,te,R,L,He[1],bt[0]),fu(ge,me,te,R,L,He[1],bt[1])}}return me}function oh(R){return R.type==="MultiPolygon"?R.coordinates.map(d=>({type:"Polygon",coordinates:d})):R.type==="MultiLineString"?R.coordinates.map(d=>({type:"LineString",coordinates:d})):R.type==="MultiPoint"?R.coordinates.map(d=>({type:"Point",coordinates:d})):[R]}class Au{constructor(d,L){this.type=Rt,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'distance' expression requires exactly one argument, but found ${d.length-1} instead.`);if(Vn(d[1])){let W=d[1];if(W.type==="FeatureCollection")return new Au(W,W.features.map(te=>oh(te.geometry)).flat());if(W.type==="Feature")return new Au(W,oh(W.geometry));if("type"in W&&"coordinates"in W)return new Au(W,oh(W))}return L.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(d){if(d.geometry()!=null&&d.canonicalID()!=null){if(d.geometryType()==="Point")return function(L,W){let te=L.geometry(),ue=te.flat().map(Ce=>zu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let me=new Ac(ue[0][1]),ge=1/0;for(let Ce of W){switch(Ce.type){case"Point":ge=Math.min(ge,El(ue,!1,[Ce.coordinates],!1,me,ge));break;case"LineString":ge=Math.min(ge,El(ue,!1,Ce.coordinates,!0,me,ge));break;case"Polygon":ge=Math.min(ge,Sl(ue,!1,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,W){let te=L.geometry(),ue=te.flat().map(Ce=>zu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let me=new Ac(ue[0][1]),ge=1/0;for(let Ce of W){switch(Ce.type){case"Point":ge=Math.min(ge,El(ue,!0,[Ce.coordinates],!1,me,ge));break;case"LineString":ge=Math.min(ge,El(ue,!0,Ce.coordinates,!0,me,ge));break;case"Polygon":ge=Math.min(ge,Sl(ue,!0,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries);if(d.geometryType()==="Polygon")return function(L,W){let te=L.geometry();if(te.length===0||te[0].length===0)return NaN;let ue=Yc(te,0).map(Ce=>Ce.map(Te=>Te.map(Oe=>zu([Oe.x,Oe.y],L.canonical)))),me=new Ac(ue[0][0][0][1]),ge=1/0;for(let Ce of W)for(let Te of ue){switch(Ce.type){case"Point":ge=Math.min(ge,Sl([Ce.coordinates],!1,Te,me,ge));break;case"LineString":ge=Math.min(ge,Sl(Ce.coordinates,!0,Te,me,ge));break;case"Polygon":ge=Math.min(ge,Jo(Te,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class $c{constructor(d){this.type=Zr,this.key=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let W=d[1];return W==null?L.error("Global state property must be defined."):typeof W!="string"?L.error(`Global state property must be string, but found ${typeof d[1]} instead.`):new $c(W)}evaluate(d){var L;let W=(L=d.globals)===null||L===void 0?void 0:L.globalState;return W&&Object.keys(W).length!==0?zr(W,this.key):null}eachChild(){}outputDefined(){return!1}}let _l={"==":wu,"!=":lu,">":Fl,"<":xc,">=":$u,"<=":pl,array:go,at:pi,boolean:go,case:Ko,coalesce:Dl,collator:uu,format:vs,image:os,in:Vi,"index-of":Io,interpolate:Pi,"interpolate-hcl":Pi,"interpolate-lab":Pi,length:ms,let:to,literal:Mi,match:Xi,number:go,"number-format":tl,object:go,slice:Uo,step:Ss,string:go,"to-boolean":Ao,"to-color":Ao,"to-number":Ao,"to-string":Ao,var:wo,within:$l,distance:Au,"global-state":$c};class nl{constructor(d,L,W,te){this.name=d,this.type=L,this._evaluate=W,this.args=te}evaluate(d){return this._evaluate(d,this.args)}eachChild(d){this.args.forEach(d)}outputDefined(){return!1}static parse(d,L){let W=d[0],te=nl.definitions[W];if(!te)return L.error(`Unknown expression "${W}". If you wanted a literal array, use ["literal", [...]].`,0);let ue=Array.isArray(te)?te[0]:te.type,me=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,ge=me.filter(([Te])=>!Array.isArray(Te)||Te.length===d.length-1),Ce=null;for(let[Te,Oe]of ge){Ce=new Wo(L.registry,Uu,L.path,null,L.scope);let Pe=[],it=!1;for(let He=1;He{return it=Pe,Array.isArray(it)?`(${it.map(Un).join(", ")})`:`(${Un(it.type)}...)`;var it}).join(" | "),Oe=[];for(let Pe=1;Pe{L=d?L&&Uu(W):L&&W instanceof Mi}),!!L&&qu(R)&&yf(R,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function qu(R){if(R instanceof nl&&(R.name==="get"&&R.args.length===1||R.name==="feature-state"||R.name==="has"&&R.args.length===1||R.name==="properties"||R.name==="geometry-type"||R.name==="id"||/^filter-/.test(R.name))||R instanceof $l||R instanceof Au)return!1;let d=!0;return R.eachChild(L=>{d&&!qu(L)&&(d=!1)}),d}function nc(R){if(R instanceof nl&&R.name==="feature-state")return!1;let d=!0;return R.eachChild(L=>{d&&!nc(L)&&(d=!1)}),d}function yf(R,d){if(R instanceof nl&&d.indexOf(R.name)>=0)return!1;let L=!0;return R.eachChild(W=>{L&&!yf(W,d)&&(L=!1)}),L}function _f(R){return{result:"success",value:R}}function Mu(R){return{result:"error",value:R}}function ic(R){return R["property-type"]==="data-driven"||R["property-type"]==="cross-faded-data-driven"}function Sc(R){return!!R.expression&&R.expression.parameters.indexOf("zoom")>-1}function Vu(R){return!!R.expression&&R.expression.interpolated}function xo(R){return R instanceof Number?"number":R instanceof String?"string":R instanceof Boolean?"boolean":Array.isArray(R)?"array":R===null?"null":typeof R}function Ec(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)&&qn(R)===Qr}function xh(R){return R}function Vf(R,d){let L=R.stops&&typeof R.stops[0][0]=="object",W=L||!(L||R.property!==void 0),te=R.type||(Vu(d)?"exponential":"interval"),ue=function(Oe){switch(Oe.type){case"color":return rn.parse;case"padding":return fn.parse;case"numberArray":return Ai.parse;case"colorArray":return jn.parse;default:return null}}(d);if(ue&&((R=Ht({},R)).stops&&(R.stops=R.stops.map(Oe=>[Oe[0],ue(Oe[1])])),R.default=ue(R.default?R.default:d.default)),R.colorSpace&&(me=R.colorSpace)!=="rgb"&&me!=="hcl"&&me!=="lab")throw new Error(`Unknown color space: "${R.colorSpace}"`);var me;let ge=function(Oe){switch(Oe){case"exponential":return Hf;case"interval":return bh;case"categorical":return Gf;case"identity":return il;default:throw new Error(`Unknown function type "${Oe}"`)}}(te),Ce,Te;if(te==="categorical"){Ce=Object.create(null);for(let Oe of R.stops)Ce[Oe[0]]=Oe[1];Te=typeof R.stops[0][0]}if(L){let Oe={},Pe=[];for(let bt=0;btbt[0]),evaluate:({zoom:bt},Et)=>Hf({stops:it,base:R.base},d,bt).evaluate(bt,Et)}}if(W){let Oe=te==="exponential"?{name:"exponential",base:R.base!==void 0?R.base:1}:null;return{kind:"camera",interpolationType:Oe,interpolationFactor:Pi.interpolationFactor.bind(void 0,Oe),zoomStops:R.stops.map(Pe=>Pe[0]),evaluate:({zoom:Pe})=>ge(R,d,Pe,Ce,Te)}}return{kind:"source",evaluate(Oe,Pe){let it=Pe&&Pe.properties?Pe.properties[R.property]:void 0;return it===void 0?xf(R.default,d.default):ge(R,d,it,Ce,Te)}}}function xf(R,d,L){return R!==void 0?R:d!==void 0?d:L!==void 0?L:void 0}function Gf(R,d,L,W,te){return xf(typeof L===te?W[L]:void 0,R.default,d.default)}function bh(R,d,L){if(xo(L)!=="number")return xf(R.default,d.default);let W=R.stops.length;if(W===1||L<=R.stops[0][0])return R.stops[0][1];if(L>=R.stops[W-1][0])return R.stops[W-1][1];let te=Ls(R.stops.map(ue=>ue[0]),L);return R.stops[te][1]}function Hf(R,d,L){let W=R.base!==void 0?R.base:1;if(xo(L)!=="number")return xf(R.default,d.default);let te=R.stops.length;if(te===1||L<=R.stops[0][0])return R.stops[0][1];if(L>=R.stops[te-1][0])return R.stops[te-1][1];let ue=Ls(R.stops.map(Oe=>Oe[0]),L),me=function(Oe,Pe,it,He){let bt=He-it,Et=Oe-it;return bt===0?0:Pe===1?Et/bt:(Math.pow(Pe,Et)-1)/(Math.pow(Pe,bt)-1)}(L,W,R.stops[ue][0],R.stops[ue+1][0]),ge=R.stops[ue][1],Ce=R.stops[ue+1][1],Te=bs[d.type]||xh;return typeof ge.evaluate=="function"?{evaluate(...Oe){let Pe=ge.evaluate.apply(void 0,Oe),it=Ce.evaluate.apply(void 0,Oe);if(Pe!==void 0&&it!==void 0)return Te(Pe,it,me,R.colorSpace)}}:Te(ge,Ce,me,R.colorSpace)}function il(R,d,L){switch(d.type){case"color":L=rn.parse(L);break;case"formatted":L=Di.fromString(L.toString());break;case"resolvedImage":L=qi.fromString(L.toString());break;case"padding":L=fn.parse(L);break;case"colorArray":L=jn.parse(L);break;case"numberArray":L=Ai.parse(L);break;default:xo(L)===d.type||d.type==="enum"&&d.values[L]||(L=void 0)}return xf(L,R.default,d.default)}nl.register(_l,{error:[{kind:"error"},[nr],(R,[d])=>{throw new Xn(d.evaluate(R))}],typeof:[nr,[Zr],(R,[d])=>Un(qn(d.evaluate(R)))],"to-rgba":[yn(Rt,4),[cr],(R,[d])=>{let[L,W,te,ue]=d.evaluate(R).rgb;return[255*L,255*W,255*te,ue]}],rgb:[cr,[Rt,Rt,Rt],gf],rgba:[cr,[Rt,Rt,Rt,Rt],gf],has:{type:ur,overloads:[[[nr],(R,[d])=>Kc(d.evaluate(R),R.properties())],[[nr,Qr],(R,[d,L])=>Kc(d.evaluate(R),L.evaluate(R))]]},get:{type:Zr,overloads:[[[nr],(R,[d])=>sh(d.evaluate(R),R.properties())],[[nr,Qr],(R,[d,L])=>sh(d.evaluate(R),L.evaluate(R))]]},"feature-state":[Zr,[nr],(R,[d])=>sh(d.evaluate(R),R.featureState||{})],properties:[Qr,[],R=>R.properties()],"geometry-type":[nr,[],R=>R.geometryType()],id:[Zr,[],R=>R.id()],zoom:[Rt,[],R=>R.globals.zoom],"heatmap-density":[Rt,[],R=>R.globals.heatmapDensity||0],elevation:[Rt,[],R=>R.globals.elevation||0],"line-progress":[Rt,[],R=>R.globals.lineProgress||0],accumulated:[Zr,[],R=>R.globals.accumulated===void 0?null:R.globals.accumulated],"+":[Rt,hu(Rt),(R,d)=>{let L=0;for(let W of d)L+=W.evaluate(R);return L}],"*":[Rt,hu(Rt),(R,d)=>{let L=1;for(let W of d)L*=W.evaluate(R);return L}],"-":{type:Rt,overloads:[[[Rt,Rt],(R,[d,L])=>d.evaluate(R)-L.evaluate(R)],[[Rt],(R,[d])=>-d.evaluate(R)]]},"/":[Rt,[Rt,Rt],(R,[d,L])=>d.evaluate(R)/L.evaluate(R)],"%":[Rt,[Rt,Rt],(R,[d,L])=>d.evaluate(R)%L.evaluate(R)],ln2:[Rt,[],()=>Math.LN2],pi:[Rt,[],()=>Math.PI],e:[Rt,[],()=>Math.E],"^":[Rt,[Rt,Rt],(R,[d,L])=>Math.pow(d.evaluate(R),L.evaluate(R))],sqrt:[Rt,[Rt],(R,[d])=>Math.sqrt(d.evaluate(R))],log10:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))/Math.LN10],ln:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))],log2:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))/Math.LN2],sin:[Rt,[Rt],(R,[d])=>Math.sin(d.evaluate(R))],cos:[Rt,[Rt],(R,[d])=>Math.cos(d.evaluate(R))],tan:[Rt,[Rt],(R,[d])=>Math.tan(d.evaluate(R))],asin:[Rt,[Rt],(R,[d])=>Math.asin(d.evaluate(R))],acos:[Rt,[Rt],(R,[d])=>Math.acos(d.evaluate(R))],atan:[Rt,[Rt],(R,[d])=>Math.atan(d.evaluate(R))],min:[Rt,hu(Rt),(R,d)=>Math.min(...d.map(L=>L.evaluate(R)))],max:[Rt,hu(Rt),(R,d)=>Math.max(...d.map(L=>L.evaluate(R)))],abs:[Rt,[Rt],(R,[d])=>Math.abs(d.evaluate(R))],round:[Rt,[Rt],(R,[d])=>{let L=d.evaluate(R);return L<0?-Math.round(-L):Math.round(L)}],floor:[Rt,[Rt],(R,[d])=>Math.floor(d.evaluate(R))],ceil:[Rt,[Rt],(R,[d])=>Math.ceil(d.evaluate(R))],"filter-==":[ur,[nr,Zr],(R,[d,L])=>R.properties()[d.value]===L.value],"filter-id-==":[ur,[Zr],(R,[d])=>R.id()===d.value],"filter-type-==":[ur,[nr],(R,[d])=>R.geometryType()===d.value],"filter-<":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W{let L=R.id(),W=d.value;return typeof L==typeof W&&L":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W>te}],"filter-id->":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L>W}],"filter-<=":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W<=te}],"filter-id-<=":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L<=W}],"filter->=":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W>=te}],"filter-id->=":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L>=W}],"filter-has":[ur,[Zr],(R,[d])=>d.value in R.properties()],"filter-has-id":[ur,[],R=>R.id()!==null&&R.id()!==void 0],"filter-type-in":[ur,[yn(nr)],(R,[d])=>d.value.indexOf(R.geometryType())>=0],"filter-id-in":[ur,[yn(Zr)],(R,[d])=>d.value.indexOf(R.id())>=0],"filter-in-small":[ur,[nr,yn(Zr)],(R,[d,L])=>L.value.indexOf(R.properties()[d.value])>=0],"filter-in-large":[ur,[nr,yn(Zr)],(R,[d,L])=>function(W,te,ue,me){for(;ue<=me;){let ge=ue+me>>1;if(te[ge]===W)return!0;te[ge]>W?me=ge-1:ue=ge+1}return!1}(R.properties()[d.value],L.value,0,L.value.length-1)],all:{type:ur,overloads:[[[ur,ur],(R,[d,L])=>d.evaluate(R)&&L.evaluate(R)],[hu(ur),(R,d)=>{for(let L of d)if(!L.evaluate(R))return!1;return!0}]]},any:{type:ur,overloads:[[[ur,ur],(R,[d,L])=>d.evaluate(R)||L.evaluate(R)],[hu(ur),(R,d)=>{for(let L of d)if(L.evaluate(R))return!0;return!1}]]},"!":[ur,[ur],(R,[d])=>!d.evaluate(R)],"is-supported-script":[ur,[nr],(R,[d])=>{let L=R.globals&&R.globals.isSupportedScript;return!L||L(d.evaluate(R))}],upcase:[nr,[nr],(R,[d])=>d.evaluate(R).toUpperCase()],downcase:[nr,[nr],(R,[d])=>d.evaluate(R).toLowerCase()],concat:[nr,hu(Zr),(R,d)=>d.map(L=>Hi(L.evaluate(R))).join("")],split:[yn(nr),[nr,nr],(R,[d,L])=>d.evaluate(R).split(L.evaluate(R))],join:[nr,[yn(nr),nr],(R,[d,L])=>d.evaluate(R).join(L.evaluate(R))],"resolved-locale":[nr,[ha],(R,[d])=>d.evaluate(R).resolvedLocale()]});class kl{constructor(d,L,W){this.expression=d,this._warningHistory={},this._evaluator=new jo,this._defaultValue=L?function(te){if(te.type==="color"&&Ec(te.default))return new rn(0,0,0,0);switch(te.type){case"color":return rn.parse(te.default)||null;case"padding":return fn.parse(te.default)||null;case"numberArray":return Ai.parse(te.default)||null;case"colorArray":return jn.parse(te.default)||null;case"variableAnchorOffsetCollection":return gi.parse(te.default)||null;case"projectionDefinition":return io.parse(te.default)||null;default:return te.default===void 0?null:te.default}}(L):null,this._enumValues=L&&L.type==="enum"?L.values:null,this._globalState=W}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L,this._evaluator.featureState=W,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=me,this.expression.evaluate(this._evaluator)}evaluate(d,L,W,te,ue,me){this._globalState&&(d=ea(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L||null,this._evaluator.featureState=W||null,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=me||null;try{let ge=this.expression.evaluate(this._evaluator);if(ge==null||typeof ge=="number"&&ge!=ge)return this._defaultValue;if(this._enumValues&&!(ge in this._enumValues))throw new Xn(`Expected value to be one of ${Object.keys(this._enumValues).map(Ce=>JSON.stringify(Ce)).join(", ")}, but found ${JSON.stringify(ge)} instead.`);return ge}catch(ge){return this._warningHistory[ge.message]||(this._warningHistory[ge.message]=!0,typeof console<"u"&&console.warn(ge.message)),this._defaultValue}}}function kc(R){return Array.isArray(R)&&R.length>0&&typeof R[0]=="string"&&R[0]in _l}function Cc(R,d,L){let W=new Wo(_l,Uu,[],d?function(ue){let me={color:cr,string:nr,number:Rt,enum:nr,boolean:ur,formatted:Pa,padding:La,numberArray:Xa,colorArray:un,projectionDefinition:Rr,resolvedImage:ja,variableAnchorOffsetCollection:Nn};return ue.type==="array"?yn(me[ue.value]||Zr,ue.length):me[ue.type]}(d):void 0),te=W.parse(R,void 0,void 0,void 0,d&&d.type==="string"?{typeAnnotation:"coerce"}:void 0);return te?_f(new kl(te,d,L)):Mu(W.errors)}class Lc{constructor(d,L,W){this.kind=d,this._styleExpression=L,this.isStateDependent=d!=="constant"&&!nc(L.expression),this.globalStateRefs=wr(L.expression),this._globalState=W}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,W,te,ue,me)}evaluate(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluate(d,L,W,te,ue,me)}}class vc{constructor(d,L,W,te,ue){this.kind=d,this.zoomStops=W,this._styleExpression=L,this.isStateDependent=d!=="camera"&&!nc(L.expression),this.globalStateRefs=wr(L.expression),this.interpolationType=te,this._globalState=ue}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,W,te,ue,me)}evaluate(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluate(d,L,W,te,ue,me)}interpolationFactor(d,L,W){return this.interpolationType?Pi.interpolationFactor(this.interpolationType,d,L,W):0}}function Ft(R,d,L){let W=Cc(R,d,L);if(W.result==="error")return W;let te=W.value.expression,ue=qu(te);if(!ue&&!ic(d))return Mu([new Sr("","data expressions not supported")]);let me=yf(te,["zoom"]);if(!me&&!Sc(d))return Mu([new Sr("","zoom expressions not supported")]);let ge=Fr(te);return ge||me?ge instanceof Sr?Mu([ge]):ge instanceof Pi&&!Vu(d)?Mu([new Sr("",'"interpolate" expressions cannot be used with this property')]):_f(ge?new vc(ue?"camera":"composite",W.value,ge.labels,ge instanceof Pi?ge.interpolation:void 0,L):new Lc(ue?"constant":"source",W.value,L)):Mu([new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class tr{constructor(d,L){this._parameters=d,this._specification=L,Ht(this,Vf(this._parameters,this._specification))}static deserialize(d){return new tr(d._parameters,d._specification)}static serialize(d){return{_parameters:d._parameters,_specification:d._specification}}}function Fr(R){let d=null;if(R instanceof to)d=Fr(R.result);else if(R instanceof Dl){for(let L of R.args)if(d=Fr(L),d)break}else(R instanceof Ss||R instanceof Pi)&&R.input instanceof nl&&R.input.name==="zoom"&&(d=R);return d instanceof Sr||R.eachChild(L=>{let W=Fr(L);W instanceof Sr?d=W:!d&&W?d=new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):d&&W&&d!==W&&(d=new Sr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),d}function wr(R,d=new Set){return R instanceof $c&&d.add(R.key),R.eachChild(L=>{wr(L,d)}),d}function ea(R,d){let{zoom:L,heatmapDensity:W,elevation:te,lineProgress:ue,isSupportedScript:me,accumulated:ge}=R??{};return{zoom:L,heatmapDensity:W,elevation:te,lineProgress:ue,isSupportedScript:me,accumulated:ge,globalState:d}}function ba(R){if(R===!0||R===!1)return!0;if(!Array.isArray(R)||R.length===0)return!1;switch(R[0]){case"has":return R.length>=2&&R[1]!=="$id"&&R[1]!=="$type";case"in":return R.length>=3&&(typeof R[1]!="string"||Array.isArray(R[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case"any":case"all":for(let d of R.slice(1))if(!ba(d)&&typeof d!="boolean")return!1;return!0;default:return!0}}let Ia={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Na(R,d){if(R==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};ba(R)||(R=Da(R));let L=Cc(R,Ia,d);if(L.result==="error")throw new Error(L.value.map(W=>`${W.key}: ${W.message}`).join(", "));return{filter:(W,te,ue)=>L.value.evaluate(W,te,{},ue),needGeometry:mn(R),getGlobalStateRefs:()=>wr(L.value.expression)}}function Za(R,d){return Rd?1:0}function mn(R){if(!Array.isArray(R))return!1;if(R[0]==="within"||R[0]==="distance")return!0;for(let d=1;d"||d==="<="||d===">="?Ha(R[1],R[2],d):d==="any"?(L=R.slice(1),["any"].concat(L.map(Da))):d==="all"?["all"].concat(R.slice(1).map(Da)):d==="none"?["all"].concat(R.slice(1).map(Da).map(Sn)):d==="in"?$a(R[1],R.slice(2)):d==="!in"?Sn($a(R[1],R.slice(2))):d==="has"?vn(R[1]):d!=="!has"||Sn(vn(R[1]));var L}function Ha(R,d,L){switch(R){case"$type":return[`filter-type-${L}`,d];case"$id":return[`filter-id-${L}`,d];default:return[`filter-${L}`,R,d]}}function $a(R,d){if(d.length===0)return!1;switch(R){case"$type":return["filter-type-in",["literal",d]];case"$id":return["filter-id-in",["literal",d]];default:return d.length>200&&!d.some(L=>typeof L!=typeof d[0])?["filter-in-large",R,["literal",d.sort(Za)]]:["filter-in-small",R,["literal",d]]}}function vn(R){switch(R){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",R]}}function Sn(R){return["!",R]}function yi(R){let d=typeof R;if(d==="number"||d==="boolean"||d==="string"||R==null)return JSON.stringify(R);if(Array.isArray(R)){let te="[";for(let ue of R)te+=`${yi(ue)},`;return`${te}]`}let L=Object.keys(R).sort(),W="{";for(let te=0;teW.maximum?[new Vt(d,L,`${L} is greater than the maximum value ${W.maximum}`)]:[]}function Co(R){let d=R.valueSpec,L=ri(R.value.type),W,te,ue,me={},ge=L!=="categorical"&&R.value.property===void 0,Ce=!ge,Te=xo(R.value.stops)==="array"&&xo(R.value.stops[0])==="array"&&xo(R.value.stops[0][0])==="object",Oe=Ln({key:R.key,value:R.value,valueSpec:R.styleSpec.function,validateSpec:R.validateSpec,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:function(He){if(L==="identity")return[new Vt(He.key,He.value,'identity function may not have a "stops" property')];let bt=[],Et=He.value;return bt=bt.concat(Ni({key:He.key,value:Et,valueSpec:He.valueSpec,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec,arrayElementValidator:Pe})),xo(Et)==="array"&&Et.length===0&&bt.push(new Vt(He.key,Et,"array must have at least one stop")),bt},default:function(He){return He.validateSpec({key:He.key,value:He.value,valueSpec:d,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec})}}});return L==="identity"&&ge&&Oe.push(new Vt(R.key,R.value,'missing required property "property"')),L==="identity"||R.value.stops||Oe.push(new Vt(R.key,R.value,'missing required property "stops"')),L==="exponential"&&R.valueSpec.expression&&!Vu(R.valueSpec)&&Oe.push(new Vt(R.key,R.value,"exponential functions not supported")),R.styleSpec.$version>=8&&(Ce&&!ic(R.valueSpec)?Oe.push(new Vt(R.key,R.value,"property functions not supported")):ge&&!Sc(R.valueSpec)&&Oe.push(new Vt(R.key,R.value,"zoom functions not supported"))),L!=="categorical"&&!Te||R.value.property!==void 0||Oe.push(new Vt(R.key,R.value,'"property" property is required')),Oe;function Pe(He){let bt=[],Et=He.value,Qt=He.key;if(xo(Et)!=="array")return[new Vt(Qt,Et,`array expected, ${xo(Et)} found`)];if(Et.length!==2)return[new Vt(Qt,Et,`array length 2 expected, length ${Et.length} found`)];if(Te){if(xo(Et[0])!=="object")return[new Vt(Qt,Et,`object expected, ${xo(Et[0])} found`)];if(Et[0].zoom===void 0)return[new Vt(Qt,Et,"object stop key must have zoom")];if(Et[0].value===void 0)return[new Vt(Qt,Et,"object stop key must have value")];if(ue&&ue>ri(Et[0].zoom))return[new Vt(Qt,Et[0].zoom,"stop zoom values must appear in ascending order")];ri(Et[0].zoom)!==ue&&(ue=ri(Et[0].zoom),te=void 0,me={}),bt=bt.concat(Ln({key:`${Qt}[0]`,value:Et[0],valueSpec:{zoom:{}},validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec,objectElementValidators:{zoom:Zi,value:it}}))}else bt=bt.concat(it({key:`${Qt}[0]`,value:Et[0],validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec},Et));return kc(En(Et[1]))?bt.concat([new Vt(`${Qt}[1]`,Et[1],"expressions are not allowed in function stops.")]):bt.concat(He.validateSpec({key:`${Qt}[1]`,value:Et[1],valueSpec:d,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec}))}function it(He,bt){let Et=xo(He.value),Qt=ri(He.value),er=He.value!==null?He.value:bt;if(W){if(Et!==W)return[new Vt(He.key,er,`${Et} stop domain type must match previous stop domain type ${W}`)]}else W=Et;if(Et!=="number"&&Et!=="string"&&Et!=="boolean")return[new Vt(He.key,er,"stop domain value must be a number, string, or boolean")];if(Et!=="number"&&L!=="categorical"){let br=`number expected, ${Et} found`;return ic(d)&&L===void 0&&(br+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Vt(He.key,er,br)]}return L!=="categorical"||Et!=="number"||isFinite(Qt)&&Math.floor(Qt)===Qt?L!=="categorical"&&Et==="number"&&te!==void 0&&Qtnew Vt(`${R.key}${W.key}`,R.value,W.message));let L=d.value.expression||d.value._styleExpression.expression;if(R.expressionContext==="property"&&R.propertyKey==="text-font"&&!L.outputDefined())return[new Vt(R.key,R.value,`Invalid data expression for "${R.propertyKey}". Output values must be contained as literals within the expression.`)];if(R.expressionContext==="property"&&R.propertyType==="layout"&&!nc(L))return[new Vt(R.key,R.value,'"feature-state" data expressions are not supported with layout properties.')];if(R.expressionContext==="filter"&&!nc(L))return[new Vt(R.key,R.value,'"feature-state" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf("cluster")===0){if(!yf(L,["zoom","feature-state"]))return[new Vt(R.key,R.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(R.expressionContext==="cluster-initial"&&!qu(L))return[new Vt(R.key,R.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Fo(R){let d=R.key,L=R.value,W=xo(L);return W!=="string"?[new Vt(d,L,`color expected, ${W} found`)]:rn.parse(String(L))?[]:[new Vt(d,L,`color expected, "${L}" found`)]}function Yo(R){let d=R.key,L=R.value,W=R.valueSpec,te=[];return Array.isArray(W.values)?W.values.indexOf(ri(L))===-1&&te.push(new Vt(d,L,`expected one of [${W.values.join(", ")}], ${JSON.stringify(L)} found`)):Object.keys(W.values).indexOf(ri(L))===-1&&te.push(new Vt(d,L,`expected one of [${Object.keys(W.values).join(", ")}], ${JSON.stringify(L)} found`)),te}function bo(R){return ba(En(R.value))?Do(Ht({},R,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Gs(R)}function Gs(R){let d=R.value,L=R.key;if(xo(d)!=="array")return[new Vt(L,d,`array expected, ${xo(d)} found`)];let W=R.styleSpec,te,ue=[];if(d.length<1)return[new Vt(L,d,"filter array must have at least 1 element")];switch(ue=ue.concat(Yo({key:`${L}[0]`,value:d[0],valueSpec:W.filter_operator,style:R.style,styleSpec:R.styleSpec})),ri(d[0])){case"<":case"<=":case">":case">=":d.length>=2&&ri(d[1])==="$type"&&ue.push(new Vt(L,d,`"$type" cannot be use with operator "${d[0]}"`));case"==":case"!=":d.length!==3&&ue.push(new Vt(L,d,`filter array for operator "${d[0]}" must have 3 elements`));case"in":case"!in":d.length>=2&&(te=xo(d[1]),te!=="string"&&ue.push(new Vt(`${L}[1]`,d[1],`string expected, ${te} found`)));for(let me=2;me{Pe in te&&W.push(new Vt(ue,te[Pe],`"${Pe}" is prohibited for ref layers`))}),me.layers.forEach(Pe=>{ri(Pe.id)===Te&&(Oe=Pe)}),Oe?Oe.ref?W.push(new Vt(ue,te.ref,"ref cannot reference another ref layer")):Ce=ri(Oe.type):W.push(new Vt(ue,te.ref,`ref layer "${Te}" not found`))}else if(Ce!=="background")if(te.source){let Oe=me.sources&&me.sources[te.source],Pe=Oe&&ri(Oe.type);Oe?Pe==="vector"&&Ce==="raster"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a raster source`)):Pe!=="raster-dem"&&Ce==="hillshade"||Pe!=="raster-dem"&&Ce==="color-relief"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a raster-dem source`)):Pe==="raster"&&Ce!=="raster"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a vector source`)):Pe!=="vector"||te["source-layer"]?Pe==="raster-dem"&&Ce!=="hillshade"&&Ce!=="color-relief"?W.push(new Vt(ue,te.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):Ce!=="line"||!te.paint||!te.paint["line-gradient"]||Pe==="geojson"&&Oe.lineMetrics||W.push(new Vt(ue,te,`layer "${te.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):W.push(new Vt(ue,te,`layer "${te.id}" must specify a "source-layer"`)):W.push(new Vt(ue,te.source,`source "${te.source}" not found`))}else W.push(new Vt(ue,te,'missing required property "source"'));return Ce==="raster"&&(!((d=te.paint)===null||d===void 0)&&d.resampling)&&(!((L=te.paint)===null||L===void 0)&&L["raster-resampling"])&&W.push(new Vt(ue,te.paint,`layer "${te.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),W=W.concat(Ln({key:ue,value:te,valueSpec:ge.layer,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,objectElementValidators:{"*":()=>[],type:()=>R.validateSpec({key:`${ue}.type`,value:te.type,valueSpec:ge.layer.type,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,object:te,objectKey:"type"}),filter:bo,layout:Oe=>Ln({layer:te,key:Oe.key,value:Oe.value,style:Oe.style,styleSpec:Oe.styleSpec,validateSpec:Oe.validateSpec,objectElementValidators:{"*":Pe=>Kn(Ht({layerType:Ce},Pe))}}),paint:Oe=>Ln({layer:te,key:Oe.key,value:Oe.value,style:Oe.style,styleSpec:Oe.styleSpec,validateSpec:Oe.validateSpec,objectElementValidators:{"*":Pe=>ns(Ht({layerType:Ce},Pe))}})}})),W}function gs(R){let d=R.value,L=R.key,W=xo(d);return W!=="string"?[new Vt(L,d,`string expected, ${W} found`)]:[]}let js={promoteId:function({key:R,value:d}){if(xo(d)==="string")return gs({key:R,value:d});{let L=[];for(let W in d)L.push(...gs({key:`${R}.${W}`,value:d[W]}));return L}}};function Cl(R){let d=R.value,L=R.key,W=R.styleSpec,te=R.style,ue=R.validateSpec;if(!d.type)return[new Vt(L,d,'"type" is required')];let me=ri(d.type),ge;switch(me){case"vector":case"raster":return ge=Ln({key:L,value:d,valueSpec:W[`source_${me.replace("-","_")}`],style:R.style,styleSpec:W,objectElementValidators:js,validateSpec:ue}),ge;case"raster-dem":return ge=function(Ce){var Te;let Oe=(Te=Ce.sourceName)!==null&&Te!==void 0?Te:"",Pe=Ce.value,it=Ce.styleSpec,He=it.source_raster_dem,bt=Ce.style,Et=[],Qt=xo(Pe);if(Pe===void 0)return Et;if(Qt!=="object")return Et.push(new Vt("source_raster_dem",Pe,`object expected, ${Qt} found`)),Et;let er=ri(Pe.encoding)==="custom",br=["redFactor","greenFactor","blueFactor","baseShift"],sr=Ce.value.encoding?`"${Ce.value.encoding}"`:"Default";for(let Mr in Pe)!er&&br.includes(Mr)?Et.push(new Vt(Mr,Pe[Mr],`In "${Oe}": "${Mr}" is only valid when "encoding" is set to "custom". ${sr} encoding found`)):He[Mr]?Et=Et.concat(Ce.validateSpec({key:Mr,value:Pe[Mr],valueSpec:He[Mr],validateSpec:Ce.validateSpec,style:bt,styleSpec:it})):Et.push(new Vt(Mr,Pe[Mr],`unknown property "${Mr}"`));return Et}({sourceName:L,value:d,style:R.style,styleSpec:W,validateSpec:ue}),ge;case"geojson":if(ge=Ln({key:L,value:d,valueSpec:W.source_geojson,style:te,styleSpec:W,validateSpec:ue,objectElementValidators:js}),d.cluster)for(let Ce in d.clusterProperties){let[Te,Oe]=d.clusterProperties[Ce],Pe=typeof Te=="string"?[Te,["accumulated"],["get",Ce]]:Te;ge.push(...Do({key:`${L}.${Ce}.map`,value:Oe,expressionContext:"cluster-map"})),ge.push(...Do({key:`${L}.${Ce}.reduce`,value:Pe,expressionContext:"cluster-reduce"}))}return ge;case"video":return Ln({key:L,value:d,valueSpec:W.source_video,style:te,validateSpec:ue,styleSpec:W});case"image":return Ln({key:L,value:d,valueSpec:W.source_image,style:te,validateSpec:ue,styleSpec:W});case"canvas":return[new Vt(L,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Yo({key:`${L}.type`,value:d.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function zl(R){let d=R.value,L=R.styleSpec,W=L.light,te=R.style,ue=[],me=xo(d);if(d===void 0)return ue;if(me!=="object")return ue=ue.concat([new Vt("light",d,`object expected, ${me} found`)]),ue;for(let ge in d){let Ce=ge.match(/^(.*)-transition$/);ue=ue.concat(Ce&&W[Ce[1]]&&W[Ce[1]].transition?R.validateSpec({key:ge,value:d[ge],valueSpec:L.transition,validateSpec:R.validateSpec,style:te,styleSpec:L}):W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],validateSpec:R.validateSpec,style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)])}return ue}function Kl(R){let d=R.value,L=R.styleSpec,W=L.sky,te=R.style,ue=xo(d);if(d===void 0)return[];if(ue!=="object")return[new Vt("sky",d,`object expected, ${ue} found`)];let me=[];for(let ge in d)me=me.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return me}function Gu(R){let d=R.value,L=R.styleSpec,W=L.terrain,te=R.style,ue=[],me=xo(d);if(d===void 0)return ue;if(me!=="object")return ue=ue.concat([new Vt("terrain",d,`object expected, ${me} found`)]),ue;for(let ge in d)ue=ue.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],validateSpec:R.validateSpec,style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return ue}function xl(R){let d=[],L=R.value,W=R.key;if(Array.isArray(L)){let te=[],ue=[];for(let me in L)L[me].id&&te.includes(L[me].id)&&d.push(new Vt(W,L,`all the sprites' ids must be unique, but ${L[me].id} is duplicated`)),te.push(L[me].id),L[me].url&&ue.includes(L[me].url)&&d.push(new Vt(W,L,`all the sprites' URLs must be unique, but ${L[me].url} is duplicated`)),ue.push(L[me].url),d=d.concat(Ln({key:`${W}[${me}]`,value:L[me],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:R.validateSpec}));return d}return gs({key:W,value:L})}function Hu(R){return!!R&&R.constructor===Object}function Su(R){return Hu(R.value)?[]:[new Vt(R.key,R.value,`object expected, ${xo(R.value)} found`)]}let mc={"*":()=>[],array:Ni,boolean:function(R){let d=R.value,L=R.key,W=xo(d);return W!=="boolean"?[new Vt(L,d,`boolean expected, ${W} found`)]:[]},number:Zi,color:Fo,constants:ki,enum:Yo,filter:bo,function:Co,layer:zo,object:Ln,source:Cl,light:zl,sky:Kl,terrain:Gu,projection:function(R){let d=R.value,L=R.styleSpec,W=L.projection,te=R.style,ue=xo(d);if(d===void 0)return[];if(ue!=="object")return[new Vt("projection",d,`object expected, ${ue} found`)];let me=[];for(let ge in d)me=me.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return me},projectionDefinition:function(R){let d=R.key,L=R.value;L=L instanceof String?L.valueOf():L;let W=xo(L);return W!=="array"||function(te){return Array.isArray(te)&&te.length===3&&typeof te[0]=="string"&&typeof te[1]=="string"&&typeof te[2]=="number"}(L)||function(te){return!!["interpolate","step","literal"].includes(te[0])}(L)?["array","string"].includes(W)?[]:[new Vt(d,L,`projection expected, invalid type "${W}" found`)]:[new Vt(d,L,`projection expected, invalid array ${JSON.stringify(L)} found`)]},string:gs,formatted:function(R){return gs(R).length===0?[]:Do(R)},resolvedImage:function(R){return gs(R).length===0?[]:Do(R)},padding:function(R){let d=R.key,L=R.value;if(xo(L)==="array"){if(L.length<1||L.length>4)return[new Vt(d,L,`padding requires 1 to 4 values; ${L.length} values found`)];let W={type:"number"},te=[];for(let ue=0;ue[]}})),R.constants&&(L=L.concat(ki({key:"constants",value:R.constants}))),Ql(L)}function Jl(R){return function(d){return R(Object.assign({},d,{validateSpec:Jc}))}}function Ql(R){return[].concat(R).sort((d,L)=>d.line-L.line)}function Eu(R){return function(...d){return Ql(R.apply(this,d))}}du.source=Eu(Jl(Cl)),du.sprite=Eu(Jl(xl)),du.glyphs=Eu(Jl(oc)),du.light=Eu(Jl(zl)),du.sky=Eu(Jl(Kl)),du.terrain=Eu(Jl(Gu)),du.state=Eu(Jl(Su)),du.layer=Eu(Jl(zo)),du.filter=Eu(Jl(bo)),du.paintProperty=Eu(Jl(ns)),du.layoutProperty=Eu(Jl(Kn));let bf={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class lh{constructor(d,L){this._globalState=L,this.setValue(d)}evaluate(){var d;return(d=this._literalValue)!==null&&d!==void 0?d:this._compiledValue.evaluate({})}setValue(d){if(d==null||d==="visible"||d==="none")return this._literalValue=d==="none"?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let L=Cc(d,bf,this._globalState);if(L.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,new Error(L.value.map(W=>`${W.key}: ${W.message}`).join(", "));this._literalValue=void 0,this._compiledValue=L.value,this._globalStateRefs=wr(L.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let Pc=ht,Ks=du,Bl=Ks.light,Wu=Ks.sky,wf=Ks.paintProperty,Qc=Ks.layoutProperty;function ku(R,d){let L=!1;if(d?.length)for(let W of d)R.fire(new Ot(new Error(W.message))),L=!0;return L}class Ol{constructor(d,L,W){let te=this.cells=[];if(d instanceof ArrayBuffer){this.arrayBuffer=d;let me=new Int32Array(this.arrayBuffer);d=me[0],this.d=(L=me[1])+2*(W=me[2]);for(let Ce=0;Ce=Pe[He+0]&&te>=Pe[He+1])?(ge[it]=!0,me.push(Oe[it])):ge[it]=!1}}}_forEachCell(d,L,W,te,ue,me,ge,Ce){let Te=this._convertToCellCoord(d),Oe=this._convertToCellCoord(L),Pe=this._convertToCellCoord(W),it=this._convertToCellCoord(te);for(let He=Te;He<=Pe;He++)for(let bt=Oe;bt<=it;bt++){let Et=this.d*bt+He;if((!Ce||Ce(this._convertFromCellCoord(He),this._convertFromCellCoord(bt),this._convertFromCellCoord(He+1),this._convertFromCellCoord(bt+1)))&&ue.call(this,d,L,W,te,Et,me,ge,Ce))return}}_convertFromCellCoord(d){return(d-this.padding)/this.scale}_convertToCellCoord(d){return Math.max(0,Math.min(this.d-1,Math.floor(d*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let d=this.cells,L=3+this.cells.length+1+1,W=0;for(let me of this.cells)W+=me.length;let te=new Int32Array(L+W+this.keys.length+this.bboxes.length);te[0]=this.extent,te[1]=this.n,te[2]=this.padding;let ue=L;for(let me=0;meW?(this.lastIntegerZoom=W+1,this.lastIntegerZoomTime=L):this.lastFloorZoom{try{return new RegExp(`\\p{sc=${L}}`,"u").source}catch{return null}}).filter(L=>L);return new RegExp(d.join("|"),"u")}let Jr=jr(["Arab","Dupl","Mong","Ougr","Syrc"]);function la(R){return!Jr.test(String.fromCodePoint(R))}function xa(R){return!(Wt(R)||(d=R,/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(d))));var d}let Ba=jr(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function an(R){return Ba.test(String.fromCodePoint(R))}function wn(R,d){return!(!d&&an(R)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(R)))}function ii(R){for(let d of R)if(an(d.codePointAt(0)))return!0;return!1}let Si=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(R){this.pluginStatus=R.pluginStatus,this.pluginURL=R.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(R){if(Si.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=R.applyArabicShaping,this.processBidirectionalText=R.processBidirectionalText,this.processStyledBidirectionalText=R.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(R,d){return e(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(R.pluginStatus!=="loading")return this.setState(R),R;let L=R.pluginURL,W=new Promise(ue=>{this.loadScriptResolve=ue});d(L);let te=new Promise(ue=>setTimeout(()=>ue(),this.TIMEOUT));if(yield Promise.race([W,te]),this.isParsed()){let ue={pluginStatus:"loaded",pluginURL:L};return this.setState(ue),ue}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${L}`)})}};class oi{constructor(d,L){this.isSupportedScript=Ji,this.zoom=d,L?(this.now=L.now||0,this.fadeDuration=L.fadeDuration||0,this.zoomHistory=L.zoomHistory||new Bt,this.transition=L.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Bt,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let d=this.zoom,L=d-Math.floor(d),W=this.crossFadingFactor();return d>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:L+(1-L)*W}:{fromScale:.5,toScale:1,t:1-(1-W)*L}}}function Ji(R){return function(d,L){for(let W of d)if(!wn(W.codePointAt(0),L))return!1;return!0}(R,Si.getRTLTextPluginStatus()==="loaded")}let Qi="-transition";class Oo{constructor(d,L,W){this.property=d,this.value=L,this.expression=function(te,ue,me){if(Ec(te))return new tr(te,ue);if(kc(te)){let ge=Ft(te,ue,me);if(ge.result==="error")throw new Error(ge.value.map(Ce=>`${Ce.key}: ${Ce.message}`).join(", "));return ge.value}{let ge=te;return ue.type==="color"&&typeof te=="string"?ge=rn.parse(te):ue.type!=="padding"||typeof te!="number"&&!Array.isArray(te)?ue.type!=="numberArray"||typeof te!="number"&&!Array.isArray(te)?ue.type!=="colorArray"||typeof te!="string"&&!Array.isArray(te)?ue.type==="variableAnchorOffsetCollection"&&Array.isArray(te)?ge=gi.parse(te):ue.type==="projectionDefinition"&&typeof te=="string"&&(ge=io.parse(te)):ge=jn.parse(te):ge=Ai.parse(te):ge=fn.parse(te),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>ge}}}(L===void 0?d.specification.default:L,d.specification,W)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(d,L,W){return this.property.possiblyEvaluate(this,d,L,W)}}class Qo{constructor(d,L){this.property=d,this.value=new Oo(d,void 0,L)}transitioned(d,L){return new ys(this.property,this.value,L,X({},d.transition,this.transition),d.now)}untransitioned(){return new ys(this.property,this.value,null,{},0)}}class vo{constructor(d,L){this._properties=d,this._values=Object.create(d.defaultTransitionablePropertyValues),this._globalState=L}hasProperty(d){return d in this._properties.defaultTransitionablePropertyValues}getValue(d){return q(this._values[d].value.value)}setValue(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new Qo(this._values[d].property,this._globalState)),this._values[d].value=new Oo(this._values[d].property,L===null?void 0:q(L),this._globalState)}getTransition(d){return q(this._values[d].transition)}setTransition(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new Qo(this._values[d].property,this._globalState)),this._values[d].transition=q(L)||void 0}serialize(){let d={};for(let L of Object.keys(this._values)){let W=this.getValue(L);W!==void 0&&(d[L]=W);let te=this.getTransition(L);te!==void 0&&(d[`${L}${Qi}`]=te)}return d}transitioned(d,L){let W=new ol(this._properties);for(let te of Object.keys(this._values))W._values[te]=this._values[te].transitioned(d,L._values[te]);return W}untransitioned(){let d=new ol(this._properties);for(let L of Object.keys(this._values))d._values[L]=this._values[L].untransitioned();return d}}class ys{constructor(d,L,W,te,ue){this.property=d,this.value=L,this.begin=ue+te.delay||0,this.end=this.begin+te.duration||0,d.specification.transition&&(te.delay||te.duration)&&(this.prior=W)}possiblyEvaluate(d,L,W){let te=d.now||0,ue=this.value.possiblyEvaluate(d,L,W),me=this.prior;if(me){if(te>this.end)return this.prior=null,ue;if(this.value.isDataDriven())return this.prior=null,ue;if(tete.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:W,to:L}}interpolate(d){return d}}class sc{constructor(d){this.specification=d}possiblyEvaluate(d,L,W,te){if(d.value!==void 0){if(d.expression.kind==="constant"){let ue=d.expression.evaluate(L,null,{},W,te);return this._calculate(ue,ue,ue,L)}return this._calculate(d.expression.evaluate(new oi(Math.floor(L.zoom-1),L)),d.expression.evaluate(new oi(Math.floor(L.zoom),L)),d.expression.evaluate(new oi(Math.floor(L.zoom+1),L)),L)}}_calculate(d,L,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:W,to:L}}interpolate(d){return d}}class tu{constructor(d){this.specification=d}possiblyEvaluate(d,L,W,te){return!!d.expression.evaluate(L,null,{},W,te)}interpolate(){return!1}}class Ps{constructor(d){this.properties=d,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let L in d){let W=d[L];W.specification.overridable&&this.overridableProperties.push(L);let te=this.defaultPropertyValues[L]=new Oo(W,void 0,void 0),ue=this.defaultTransitionablePropertyValues[L]=new Qo(W,void 0);this.defaultTransitioningPropertyValues[L]=ue.untransitioned(),this.defaultPossiblyEvaluatedValues[L]=te.possiblyEvaluate({})}}}fi("DataDrivenProperty",wi),fi("DataConstantProperty",hi),fi("CrossFadedDataDrivenProperty",sl),fi("CrossFadedProperty",sc),fi("ColorRampProperty",tu);let gc=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",pu=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class ll extends vt{constructor(d,L,W){if(super(),this.id=d.id,this.type=d.type,this._globalState=W,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=function(te,ue){return new lh(te,ue)}(this.visibility,W),d.type!=="custom"&&(this.metadata=d.metadata,this.minzoom=d.minzoom,this.maxzoom=d.maxzoom,d.type!=="background"&&(this.source=d.source,this.sourceLayer=d["source-layer"],this.filter=d.filter,this._featureFilter=Na(d.filter,W)),L.layout&&(this._unevaluatedLayout=new jl(L.layout,W)),L.paint)){this._transitionablePaint=new vo(L.paint,W);for(let te in d.paint)this.setPaintProperty(te,d.paint[te],{validate:!1});for(let te in d.layout)this.setLayoutProperty(te,d.layout[te],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Cu(L.paint)}}setFilter(d){this.filter=d,this._featureFilter=Na(d,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(d){var L;if(d==="visibility")return this.visibility;if(!((L=this._transitionablePaint)===null||L===void 0)&&L.hasProperty(d))throw new Error(d+gc);if(!this._unevaluatedLayout)throw new Error(`Cannot get layout property "${d}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(d)}getLayoutAffectingGlobalStateRefs(){let d=new Set;for(let L of this._visibilityExpression.getGlobalStateRefs())d.add(L);if(this._unevaluatedLayout)for(let L in this._unevaluatedLayout._values){let W=this._unevaluatedLayout._values[L];for(let te of W.getGlobalStateRefs())d.add(te)}for(let L of this._featureFilter.getGlobalStateRefs())d.add(L);return d}getPaintAffectingGlobalStateRefs(){var d;let L=new globalThis.Map;if(this._transitionablePaint)for(let W in this._transitionablePaint._values){let te=this._transitionablePaint._values[W].value;for(let ue of te.getGlobalStateRefs()){let me=(d=L.get(ue))!==null&&d!==void 0?d:[];me.push({name:W,value:te.value}),L.set(ue,me)}}return L}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(d,L,W={}){var te;if(d==="visibility")return this.visibility=L,this._visibilityExpression.setValue(L),void this.recalculateVisibility();!((te=this._transitionablePaint)===null||te===void 0)&&te.hasProperty(d)?this.fire(new Ot(new Error(d+gc))):L!=null&&this._validate(Qc,`layers.${this.id}.layout.${d}`,d,L,W)||this._unevaluatedLayout.setValue(d,L)}getPaintProperty(d){var L,W;if(d.endsWith(Qi)){let te=d.slice(0,-11);if(te==="visibility"||!((L=this._unevaluatedLayout)===null||L===void 0)&&L.hasProperty(te))throw new Error(d+pu);return this._transitionablePaint.getTransition(te)}if(d==="visibility"||!((W=this._unevaluatedLayout)===null||W===void 0)&&W.hasProperty(d))throw new Error(d+pu);return this._transitionablePaint.getValue(d)}setPaintProperty(d,L,W={}){var te;if(d==="visibility"||!((te=this._unevaluatedLayout)===null||te===void 0)&&te.hasProperty(d))return this.fire(new Ot(new Error(d+pu))),!1;if(L!=null&&this._validate(wf,`layers.${this.id}.paint.${d}`,d,L,W))return!1;if(d.endsWith(Qi))return this._transitionablePaint.setTransition(d.slice(0,-11),L||void 0),!1;{let ue=this._transitionablePaint._values[d],me=ue.property.specification["property-type"]==="cross-faded-data-driven",ge=ue.value.isDataDriven(),Ce=ue.value;this._transitionablePaint.setValue(d,L),this._handleSpecialPaintPropertyUpdate(d);let Te=this._transitionablePaint._values[d].value;return Te.isDataDriven()||ge||me||this._handleOverridablePaintPropertyUpdate(d,Ce,Te)}}_handleSpecialPaintPropertyUpdate(d){}_handleOverridablePaintPropertyUpdate(d,L,W){return!1}isHidden(d=this.minzoom,L=!1){return!!(this.minzoom&&d<(L?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&d>=this.maxzoom)||this._evaluatedVisibility==="none"}updateTransitions(d){this._transitioningPaint=this._transitionablePaint.transitioned(d,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(d,L){d.getCrossfadeParameters&&(this._crossfadeParameters=d.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(d,void 0,L)),this.paint=this._transitioningPaint.possiblyEvaluate(d,void 0,L)}serialize(){var d,L;let W={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:(d=this._unevaluatedLayout)===null||d===void 0?void 0:d.serialize(),paint:(L=this._transitionablePaint)===null||L===void 0?void 0:L.serialize()};return this.visibility&&(W.layout||(W.layout={}),W.layout.visibility=this.visibility),Y(W,(te,ue)=>!(te===void 0||ue==="layout"&&!Object.keys(te).length||ue==="paint"&&!Object.keys(te).length))}_validate(d,L,W,te,ue={}){return ue?.validate!==!1&&ku(this,d.call(Ks,{key:L,layerType:this.type,objectKey:W,value:te,styleSpec:ht,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let d in this.paint._values){let L=this.paint.get(d);if(L instanceof Hs&&ic(L.property.specification)&&(L.value.kind==="source"||L.value.kind==="composite")&&L.value.isStateDependent)return!0}return!1}}let ef;var de={get paint(){return ef=ef||new Ps({"raster-opacity":new hi(ht.paint_raster["raster-opacity"]),"raster-hue-rotate":new hi(ht.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new hi(ht.paint_raster["raster-brightness-min"]),"raster-brightness-max":new hi(ht.paint_raster["raster-brightness-max"]),"raster-saturation":new hi(ht.paint_raster["raster-saturation"]),"raster-contrast":new hi(ht.paint_raster["raster-contrast"]),resampling:new hi(ht.paint_raster.resampling),"raster-resampling":new hi(ht.paint_raster["raster-resampling"]),"raster-fade-duration":new hi(ht.paint_raster["raster-fade-duration"])})}};class Ee extends ll{constructor(d,L){super(d,de,L)}}let qe={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class tt{constructor(d,L){this._structArray=d,this._pos1=L*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class at{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(d,L){return d._trim(),L&&(d.isTransferred=!0,L.push(d.arrayBuffer)),{length:d.length,arrayBuffer:d.arrayBuffer}}static deserialize(d){let L=Object.create(this.prototype);return L.arrayBuffer=d.arrayBuffer,L.length=d.length,L.capacity=d.arrayBuffer.byteLength/L.bytesPerElement,L._refreshViews(),L}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(d){this.reserve(d),this.length=d}reserve(d){if(d>this.capacity){this.capacity=Math.max(d,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let L=this.uint8;this._refreshViews(),L&&this.uint8.set(L)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function ct(R,d=1){let L=0,W=0;return{members:R.map(te=>{let ue=qe[te.type].BYTES_PER_ELEMENT,me=L=Nt(L,Math.max(d,ue)),ge=te.components||1;return W=Math.max(W,ue),L+=ue*ge,{name:te.name,type:te.type,components:ge,offset:me}}),size:Nt(L,Math.max(W,d)),alignment:d}}function Nt(R,d){return Math.ceil(R/d)*d}class St extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.int16[te+0]=L,this.int16[te+1]=W,d}}St.prototype.bytesPerElement=4,fi("StructArrayLayout2i4",St);class Jt extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.int16[ue+0]=L,this.int16[ue+1]=W,this.int16[ue+2]=te,d}}Jt.prototype.bytesPerElement=6,fi("StructArrayLayout3i6",Jt);class mr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,d,L,W,te)}emplace(d,L,W,te,ue){let me=4*d;return this.int16[me+0]=L,this.int16[me+1]=W,this.int16[me+2]=te,this.int16[me+3]=ue,d}}mr.prototype.bytesPerElement=8,fi("StructArrayLayout4i8",mr);class gr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.int16[Ce+2]=te,this.int16[Ce+3]=ue,this.int16[Ce+4]=me,this.int16[Ce+5]=ge,d}}gr.prototype.bytesPerElement=12,fi("StructArrayLayout2i4i12",gr);class Hr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=4*d,Te=8*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.uint8[Te+4]=te,this.uint8[Te+5]=ue,this.uint8[Te+6]=me,this.uint8[Te+7]=ge,d}}Hr.prototype.bytesPerElement=8,fi("StructArrayLayout2i4ub8",Hr);class Vr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.float32[te+0]=L,this.float32[te+1]=W,d}}Vr.prototype.bytesPerElement=8,fi("StructArrayLayout2f8",Vr);class ca extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,d,L,W,te,ue,me,ge,Ce,Te,Oe)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=10*d;return this.uint16[it+0]=L,this.uint16[it+1]=W,this.uint16[it+2]=te,this.uint16[it+3]=ue,this.uint16[it+4]=me,this.uint16[it+5]=ge,this.uint16[it+6]=Ce,this.uint16[it+7]=Te,this.uint16[it+8]=Oe,this.uint16[it+9]=Pe,d}}ca.prototype.bytesPerElement=20,fi("StructArrayLayout10ui20",ca);class Aa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce){let Te=this.length;return this.resize(Te+1),this.emplace(Te,d,L,W,te,ue,me,ge,Ce)}emplace(d,L,W,te,ue,me,ge,Ce,Te){let Oe=8*d;return this.uint16[Oe+0]=L,this.uint16[Oe+1]=W,this.uint16[Oe+2]=te,this.uint16[Oe+3]=ue,this.uint16[Oe+4]=me,this.uint16[Oe+5]=ge,this.uint16[Oe+6]=Ce,this.uint16[Oe+7]=Te,d}}Aa.prototype.bytesPerElement=16,fi("StructArrayLayout8ui16",Aa);class Yr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it){let He=this.length;return this.resize(He+1),this.emplace(He,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He){let bt=12*d;return this.int16[bt+0]=L,this.int16[bt+1]=W,this.int16[bt+2]=te,this.int16[bt+3]=ue,this.uint16[bt+4]=me,this.uint16[bt+5]=ge,this.uint16[bt+6]=Ce,this.uint16[bt+7]=Te,this.int16[bt+8]=Oe,this.int16[bt+9]=Pe,this.int16[bt+10]=it,this.int16[bt+11]=He,d}}Yr.prototype.bytesPerElement=24,fi("StructArrayLayout4i4ui4i24",Yr);class oa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.float32[ue+0]=L,this.float32[ue+1]=W,this.float32[ue+2]=te,d}}oa.prototype.bytesPerElement=12,fi("StructArrayLayout3f12",oa);class fa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint32[1*d+0]=L,d}}fa.prototype.bytesPerElement=4,fi("StructArrayLayout1ul4",fa);class Ea extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te){let Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,d,L,W,te,ue,me,ge,Ce,Te)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=10*d,it=5*d;return this.int16[Pe+0]=L,this.int16[Pe+1]=W,this.int16[Pe+2]=te,this.int16[Pe+3]=ue,this.int16[Pe+4]=me,this.int16[Pe+5]=ge,this.uint32[it+3]=Ce,this.uint16[Pe+8]=Te,this.uint16[Pe+9]=Oe,d}}Ea.prototype.bytesPerElement=20,fi("StructArrayLayout6i1ul2ui20",Ea);class Ma extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.int16[Ce+2]=te,this.int16[Ce+3]=ue,this.int16[Ce+4]=me,this.int16[Ce+5]=ge,d}}Ma.prototype.bytesPerElement=12,fi("StructArrayLayout2i2i2i12",Ma);class sa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,W,te,ue)}emplace(d,L,W,te,ue,me){let ge=4*d,Ce=8*d;return this.float32[ge+0]=L,this.float32[ge+1]=W,this.float32[ge+2]=te,this.int16[Ce+6]=ue,this.int16[Ce+7]=me,d}}sa.prototype.bytesPerElement=16,fi("StructArrayLayout2f1f2i16",sa);class hn extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=16*d,Te=4*d,Oe=8*d;return this.uint8[Ce+0]=L,this.uint8[Ce+1]=W,this.float32[Te+1]=te,this.float32[Te+2]=ue,this.int16[Oe+6]=me,this.int16[Oe+7]=ge,d}}hn.prototype.bytesPerElement=16,fi("StructArrayLayout2ub2f2i16",hn);class Tn extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.uint16[ue+0]=L,this.uint16[ue+1]=W,this.uint16[ue+2]=te,d}}Tn.prototype.bytesPerElement=6,fi("StructArrayLayout3ui6",Tn);class zn extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er){let br=this.length;return this.resize(br+1),this.emplace(br,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br){let sr=24*d,Mr=12*d,qr=48*d;return this.int16[sr+0]=L,this.int16[sr+1]=W,this.uint16[sr+2]=te,this.uint16[sr+3]=ue,this.uint32[Mr+2]=me,this.uint32[Mr+3]=ge,this.uint32[Mr+4]=Ce,this.uint16[sr+10]=Te,this.uint16[sr+11]=Oe,this.uint16[sr+12]=Pe,this.float32[Mr+7]=it,this.float32[Mr+8]=He,this.uint8[qr+36]=bt,this.uint8[qr+37]=Et,this.uint8[qr+38]=Qt,this.uint32[Mr+10]=er,this.int16[sr+22]=br,d}}zn.prototype.bytesPerElement=48,fi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",zn);class $n extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn){let gn=this.length;return this.resize(gn+1),this.emplace(gn,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn,gn){let Va=32*d,Hn=16*d;return this.int16[Va+0]=L,this.int16[Va+1]=W,this.int16[Va+2]=te,this.int16[Va+3]=ue,this.int16[Va+4]=me,this.int16[Va+5]=ge,this.int16[Va+6]=Ce,this.int16[Va+7]=Te,this.uint16[Va+8]=Oe,this.uint16[Va+9]=Pe,this.uint16[Va+10]=it,this.uint16[Va+11]=He,this.uint16[Va+12]=bt,this.uint16[Va+13]=Et,this.uint16[Va+14]=Qt,this.uint16[Va+15]=er,this.uint16[Va+16]=br,this.uint16[Va+17]=sr,this.uint16[Va+18]=Mr,this.uint16[Va+19]=qr,this.uint16[Va+20]=$r,this.uint16[Va+21]=_a,this.uint16[Va+22]=Ca,this.uint32[Hn+12]=nn,this.float32[Hn+13]=qa,this.float32[Hn+14]=bn,this.uint16[Va+30]=Fn,this.uint16[Va+31]=gn,d}}$n.prototype.bytesPerElement=64,fi("StructArrayLayout8i15ui1ul2f2ui64",$n);class xi extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.float32[1*d+0]=L,d}}xi.prototype.bytesPerElement=4,fi("StructArrayLayout1f4",xi);class di extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.uint16[6*d+0]=L,this.float32[ue+1]=W,this.float32[ue+2]=te,d}}di.prototype.bytesPerElement=12,fi("StructArrayLayout1ui2f12",di);class uo extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=4*d;return this.uint32[2*d+0]=L,this.uint16[ue+2]=W,this.uint16[ue+3]=te,d}}uo.prototype.bytesPerElement=8,fi("StructArrayLayout1ul2ui8",uo);class pe extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.uint16[te+0]=L,this.uint16[te+1]=W,d}}pe.prototype.bytesPerElement=4,fi("StructArrayLayout2ui4",pe);class y extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint16[1*d+0]=L,d}}y.prototype.bytesPerElement=2,fi("StructArrayLayout1ui2",y);class N extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,d,L,W,te)}emplace(d,L,W,te,ue){let me=4*d;return this.float32[me+0]=L,this.float32[me+1]=W,this.float32[me+2]=te,this.float32[me+3]=ue,d}}N.prototype.bytesPerElement=16,fi("StructArrayLayout4f16",N);class ie extends tt{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new t(this.anchorPointX,this.anchorPointY)}}ie.prototype.size=20;class fe extends Ea{get(d){return new ie(this,d)}}fi("CollisionBoxArray",fe);class be extends tt{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(d){this._structArray.uint8[this._pos1+37]=d}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(d){this._structArray.uint8[this._pos1+38]=d}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(d){this._structArray.uint32[this._pos4+10]=d}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}be.prototype.size=48;class Re extends zn{get(d){return new be(this,d)}}fi("PlacedSymbolArray",Re);class je extends tt{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(d){this._structArray.uint32[this._pos4+12]=d}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}je.prototype.size=64;class Ze extends $n{get(d){return new je(this,d)}}fi("SymbolInstanceArray",Ze);class ut extends xi{getoffsetX(d){return this.float32[1*d+0]}}fi("GlyphOffsetArray",ut);class ft extends Jt{getx(d){return this.int16[3*d+0]}gety(d){return this.int16[3*d+1]}gettileUnitDistanceFromAnchor(d){return this.int16[3*d+2]}}fi("SymbolLineVertexArray",ft);class Dt extends tt{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Dt.prototype.size=12;class Gt extends di{get(d){return new Dt(this,d)}}fi("TextAnchorOffsetArray",Gt);class Kt extends tt{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Kt.prototype.size=8;class st extends uo{get(d){return new Kt(this,d)}}fi("FeatureIndexArray",st);class It extends St{}class Ut extends St{}class ir extends St{}class dr extends gr{}class Ar extends Hr{}class hr extends Vr{}class vr extends ca{}class Or extends Aa{}class Cr extends Yr{}class ta extends oa{}class ka extends fa{}class Ta extends Ma{}class Ra extends hn{}class ua extends Tn{}class ia extends pe{}let ma=ct([{name:"a_pos",components:2,type:"Int16"}],4),{members:da}=ma;class Fa{constructor(d=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=d}prepareSegment(d,L,W,te){let ue=this.segments[this.segments.length-1];return d>Fa.MAX_VERTEX_ARRAY_LENGTH&&ee(`Max vertices per segment is ${Fa.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${d}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Fa.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!ue||ue.vertexLength+d>Fa.MAX_VERTEX_ARRAY_LENGTH||ue.sortKey!==te?this.createNewSegment(L,W,te):ue}createNewSegment(d,L,W){let te={vertexOffset:d.length,primitiveOffset:L.length,vertexLength:0,primitiveLength:0,vaos:{}};return W!==void 0&&(te.sortKey=W),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(te),te}getOrCreateLatestSegment(d,L,W){return this.prepareSegment(0,d,L,W)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let d of this.segments)for(let L in d.vaos)d.vaos[L].destroy()}static simpleSegment(d,L,W,te){return new Fa([{vertexOffset:d,primitiveOffset:L,vertexLength:W,primitiveLength:te,vaos:{},sortKey:0}])}}function za(R,d){return 256*(R=se(Math.floor(R),0,255))+se(Math.floor(d),0,255)}Fa.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,fi("SegmentVector",Fa);let kn=ct([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),Dn=ct([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var ui,cn,sn,ei={exports:{}},Pn={exports:{}},Rn={exports:{}},In=function(){if(sn)return ei.exports;sn=1;var R=(ui||(ui=1,Pn.exports=function(L,W){var te,ue,me,ge,Ce,Te,Oe,Pe;for(ue=L.length-(te=3&L.length),me=W,Ce=3432918353,Te=461845907,Pe=0;Pe>>16)*Ce&65535)<<16)&4294967295)<<15|Oe>>>17))*Te+(((Oe>>>16)*Te&65535)<<16)&4294967295)<<13|me>>>19))+((5*(me>>>16)&65535)<<16)&4294967295))+((58964+(ge>>>16)&65535)<<16);switch(Oe=0,te){case 3:Oe^=(255&L.charCodeAt(Pe+2))<<16;case 2:Oe^=(255&L.charCodeAt(Pe+1))<<8;case 1:me^=Oe=(65535&(Oe=(Oe=(65535&(Oe^=255&L.charCodeAt(Pe)))*Ce+(((Oe>>>16)*Ce&65535)<<16)&4294967295)<<15|Oe>>>17))*Te+(((Oe>>>16)*Te&65535)<<16)&4294967295}return me^=L.length,me=2246822507*(65535&(me^=me>>>16))+((2246822507*(me>>>16)&65535)<<16)&4294967295,me=3266489909*(65535&(me^=me>>>13))+((3266489909*(me>>>16)&65535)<<16)&4294967295,(me^=me>>>16)>>>0}),Pn.exports),d=(cn||(cn=1,Rn.exports=function(L,W){for(var te,ue=L.length,me=W^ue,ge=0;ue>=4;)te=1540483477*(65535&(te=255&L.charCodeAt(ge)|(255&L.charCodeAt(++ge))<<8|(255&L.charCodeAt(++ge))<<16|(255&L.charCodeAt(++ge))<<24))+((1540483477*(te>>>16)&65535)<<16),me=1540483477*(65535&me)+((1540483477*(me>>>16)&65535)<<16)^(te=1540483477*(65535&(te^=te>>>24))+((1540483477*(te>>>16)&65535)<<16)),ue-=4,++ge;switch(ue){case 3:me^=(255&L.charCodeAt(ge+2))<<16;case 2:me^=(255&L.charCodeAt(ge+1))<<8;case 1:me=1540483477*(65535&(me^=255&L.charCodeAt(ge)))+((1540483477*(me>>>16)&65535)<<16)}return me=1540483477*(65535&(me^=me>>>13))+((1540483477*(me>>>16)&65535)<<16),(me^=me>>>15)>>>0}),Rn.exports);return ei.exports=R,ei.exports.murmur3=R,ei.exports.murmur2=d,ei.exports}(),Jn=n(In);class Ei{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(d,L,W,te){this.ids.push(so(d)),this.positions.push(L,W,te)}getPositions(d){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let L=so(d),W=0,te=this.ids.length-1;for(;W>1;this.ids[me]>=L?te=me:W=me+1}let ue=[];for(;this.ids[W]===L;)ue.push({index:this.positions[3*W],start:this.positions[3*W+1],end:this.positions[3*W+2]}),W++;return ue}static serialize(d,L){let W=new Float64Array(d.ids),te=new Uint32Array(d.positions);return ti(W,te,0,W.length-1),L&&L.push(W.buffer,te.buffer),{ids:W,positions:te}}static deserialize(d){let L=new Ei;return L.ids=d.ids,L.positions=d.positions,L.indexed=!0,L}}function so(R){let d=+R;return!isNaN(d)&&d<=Number.MAX_SAFE_INTEGER?d:Jn(String(R))}function ti(R,d,L,W){for(;L>1],ue=L-1,me=W+1;for(;;){do ue++;while(R[ue]te);if(ue>=me)break;bi(R,ue,me),bi(d,3*ue,3*me),bi(d,3*ue+1,3*me+1),bi(d,3*ue+2,3*me+2)}me-L`u_${te}`),this.type=W}setUniform(d,L,W){d.set(W.constantOr(this.value))}getBinding(d,L,W){return this.type==="color"?new zs(d,L):new ro(d,L)}}class Zo{constructor(d,L){this.uniformNames=L.map(W=>`u_${W}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(d,L){this.pixelRatioFrom=L.pixelRatio,this.pixelRatioTo=d.pixelRatio,this.patternFrom=L.tlbr,this.patternTo=d.tlbr}setConstantDashPositions(d,L){this.dashTo=[0,d.y,d.height,d.width],this.dashFrom=[0,L.y,L.height,L.width]}setUniform(d,L,W,te){let ue=null;te==="u_pattern_to"?ue=this.patternTo:te==="u_pattern_from"?ue=this.patternFrom:te==="u_dasharray_to"?ue=this.dashTo:te==="u_dasharray_from"?ue=this.dashFrom:te==="u_pixel_ratio_to"?ue=this.pixelRatioTo:te==="u_pixel_ratio_from"&&(ue=this.pixelRatioFrom),ue!==null&&d.set(ue)}getBinding(d,L,W){return W.startsWith("u_pattern")||W.startsWith("u_dasharray_")?new Mo(d,L):new ro(d,L)}}class es{constructor(d,L,W,te){this.expression=d,this.type=W,this.maxValue=0,this.paintVertexAttributes=L.map(ue=>({name:`a_${ue}`,type:"Float32",components:W==="color"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(d,L,W){let te=this.paintVertexArray.length,ue=this.expression.evaluate(new oi(0,W),L,{},W.canonical,[],W.formattedSection);this.paintVertexArray.resize(d),this._setPaintValue(te,d,ue)}updatePaintArray(d,L,W,te,ue){let me=this.expression.evaluate(new oi(0,ue),W,te);this._setPaintValue(d,L,me)}_setPaintValue(d,L,W){if(this.type==="color"){let te=So(W);for(let ue=d;ue`u_${ge}_t`),this.type=W,this.useIntegerZoom=te,this.zoom=ue,this.maxValue=0,this.paintVertexAttributes=L.map(ge=>({name:`a_${ge}`,type:"Float32",components:W==="color"?4:2,offset:0})),this.paintVertexArray=new me}populatePaintArray(d,L,W){let te=this.expression.evaluate(new oi(this.zoom,W),L,{},W.canonical,[],W.formattedSection),ue=this.expression.evaluate(new oi(this.zoom+1,W),L,{},W.canonical,[],W.formattedSection),me=this.paintVertexArray.length;this.paintVertexArray.resize(d),this._setPaintValue(me,d,te,ue)}updatePaintArray(d,L,W,te,ue){let me=this.expression.evaluate(new oi(this.zoom,ue),W,te),ge=this.expression.evaluate(new oi(this.zoom+1,ue),W,te);this._setPaintValue(d,L,me,ge)}_setPaintValue(d,L,W,te){if(this.type==="color"){let ue=So(W),me=So(te);for(let ge=d;ge`#define HAS_UNIFORM_${te}`))}return d}getBinderAttributes(){let d=[];for(let L in this.binders){let W=this.binders[L];if(W instanceof es||W instanceof $o)for(let te of W.paintVertexAttributes)d.push(te.name);else if(W instanceof _s){let te=W.getVertexAttributes();for(let ue of te)d.push(ue.name)}}return d}getBinderUniforms(){let d=[];for(let L in this.binders){let W=this.binders[L];if(W instanceof Ws||W instanceof Zo||W instanceof $o)for(let te of W.uniformNames)d.push(te)}return d}getPaintVertexBuffers(){return this._buffers}getUniforms(d,L){let W=[];for(let te in this.binders){let ue=this.binders[te];if(ue instanceof Ws||ue instanceof Zo||ue instanceof $o){for(let me of ue.uniformNames)if(L[me]){let ge=ue.getBinding(d,L[me],me);W.push({name:me,property:te,binding:ge})}}}return W}setUniforms(d,L,W,te){for(let{name:ue,property:me,binding:ge}of L)this.binders[me].setUniform(ge,te,W.get(me),ue)}updatePaintBuffers(d){this._buffers=[];for(let L in this.binders){let W=this.binders[L];if(d&&W instanceof _s){let te=d.fromScale===2?W.zoomInPaintVertexBuffer:W.zoomOutPaintVertexBuffer;te&&this._buffers.push(te)}else(W instanceof es||W instanceof $o)&&W.paintVertexBuffer&&this._buffers.push(W.paintVertexBuffer)}}upload(d){for(let L in this.binders){let W=this.binders[L];(W instanceof es||W instanceof $o||W instanceof _s)&&W.upload(d)}this.updatePaintBuffers()}destroy(){for(let d in this.binders){let L=this.binders[d];(L instanceof es||L instanceof $o||L instanceof _s)&&L.destroy()}}}class mo{constructor(d,L,W=()=>!0){this.programConfigurations={};for(let te of d)this.programConfigurations[te.id]=new Ll(te,L,W);this.needsUpload=!1,this._featureMap=new Ei,this._bufferOffset=0}populatePaintArrays(d,L,W,te){for(let ue in this.programConfigurations)this.programConfigurations[ue].populatePaintArrays(d,L,te);L.id!==void 0&&this._featureMap.add(L.id,W,this._bufferOffset,d),this._bufferOffset=d,this.needsUpload=!0}updatePaintArrays(d,L,W,te){for(let ue of W)this.needsUpload=this.programConfigurations[ue.id].updatePaintArrays(d,this._featureMap,L,ue,te)||this.needsUpload}get(d){return this.programConfigurations[d]}upload(d){if(this.needsUpload){for(let L in this.programConfigurations)this.programConfigurations[L].upload(d);this.needsUpload=!1}}destroy(){for(let d in this.programConfigurations)this.programConfigurations[d].destroy()}}function ru(R,d){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[R]||[R.replace(`${d}-`,"").replace(/-/g,"_")]}function Rs(R,d,L){let W={color:{source:Vr,composite:N},number:{source:xi,composite:Vr}},te=function(ue){return{"line-pattern":{source:vr,composite:vr},"fill-pattern":{source:vr,composite:vr},"fill-extrusion-pattern":{source:vr,composite:vr},"line-dasharray":{source:Or,composite:Or}}[ue]}(R);return te?.[L]||W[d][L]}fi("ConstantBinder",Ws),fi("CrossFadedConstantBinder",Zo),fi("SourceExpressionBinder",es),fi("CrossFadedPatternBinder",Go),fi("CrossFadedDasharrayBinder",Ys),fi("CompositeExpressionBinder",$o),fi("ProgramConfiguration",Ll,{omit:["_buffers"]}),fi("ProgramConfigurationSet",mo);let Yu=Math.pow(2,14)-1,Ul=-Yu-1;function ql(R){let d=F/R.extent,L=R.loadGeometry();for(let W of L)for(let te of W){let ue=Math.round(te.x*d),me=Math.round(te.y*d);te.x=se(ue,Ul,Yu),te.y=se(me,Ul,Yu),(uete.x+1||mete.y+1)&&ee("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return L}function fo(R,d){return{type:R.type,id:R.id,properties:R.properties,geometry:d?ql(R):[]}}let Xo=-32768;function Os(R,d,L,W,te){R.emplaceBack(Xo+8*d+W,Xo+8*L+te)}class ra{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new Ut,this.indexArray=new ua,this.segments=new Fa,this.programConfigurations=new mo(d.layers,d.zoom),this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){let te=this.layers[0],ue=[],me=null,ge=!1,Ce=te.type==="heatmap";if(te.type==="circle"){let Oe=te;me=Oe.layout.get("circle-sort-key"),ge=!me.isConstant(),Ce||(Ce=Oe.paint.get("circle-pitch-alignment")==="map")}let Te=Ce?L.subdivisionGranularity.circle:1;for(let{feature:Oe,id:Pe,index:it,sourceLayerIndex:He}of d){let bt=this.layers[0]._featureFilter.needGeometry,Et=fo(Oe,bt);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),Et,W))continue;let Qt=ge?me.evaluate(Et,{},W):void 0,er={id:Pe,properties:Oe.properties,type:Oe.type,sourceLayerIndex:He,index:it,geometry:bt?Et.geometry:ql(Oe),patterns:{},sortKey:Qt};ue.push(er)}ge&&ue.sort((Oe,Pe)=>Oe.sortKey-Pe.sortKey);for(let Oe of ue){let{geometry:Pe,index:it,sourceLayerIndex:He}=Oe,bt=d[it].feature;this.addFeature(Oe,Pe,it,W,Te),L.featureIndex.insert(bt,Pe,it,He,this.index)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,da),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(d,L,W,te,ue=1){let me;switch(ue){case 1:me=[0,7];break;case 3:me=[0,2,5,7];break;case 5:me=[0,1,3,4,6,7];break;case 7:me=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${ue}; valid values are 1, 3, 5, 7.`)}let ge=me.length;for(let Ce of L)for(let Te of Ce){let Oe=Te.x,Pe=Te.y;if(Oe<0||Oe>=F||Pe<0||Pe>=F)continue;let it=this.segments.prepareSegment(ge*ge,this.layoutVertexArray,this.indexArray,d.sortKey),He=it.vertexLength;for(let bt=0;bt1){if(Is(R,d))return!0;for(let W of d)if(Wr(W,R,L))return!0}for(let W of R)if(Wr(W,d,L))return!0;return!1}function Is(R,d){if(R.length===0||d.length===0)return!1;for(let L=0;L1?L:L.sub(d)._mult(te)._add(d))}function pa(R,d){let L,W,te,ue=!1;for(let me of R){L=me;for(let ge=0,Ce=L.length-1;ged.y!=te.y>d.y&&d.x<(te.x-W.x)*(d.y-W.y)/(te.y-W.y)+W.x&&(ue=!ue)}return ue}function Wa(R,d){let L=!1;for(let W=0,te=R.length-1;Wd.y!=me.y>d.y&&d.x<(me.x-ue.x)*(d.y-ue.y)/(me.y-ue.y)+ue.x&&(L=!L)}return L}function ln(R,d,L){let W=L[0],te=L[2];if(R.xte.x&&d.x>te.x||R.yte.y&&d.y>te.y)return!1;let ue=ae(R,d,L[0]);return ue!==ae(R,d,L[1])||ue!==ae(R,d,L[2])||ue!==ae(R,d,L[3])}function Le(R,d,L){let W=d.paint.get(R).value;return W.kind==="constant"?W.value:L.programConfigurations.get(d.id).getMaxValue(R)}function Ue(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function Qe(R,d,L,W,te){if(!d[0]&&!d[1])return R;let ue=t.convert(d)._mult(te);L==="viewport"&&ue._rotate(-W);let me=[];for(let ge of R)me.push(ge.sub(ue));return me}function _t(R){let d=[];for(let L=0;LQa(sr,Qt,er,br))}(Te,ue,ge,Ce),bt=Oe),va({queryGeometry:He,size:bt,transform:ue,unwrappedTileID:ge,getElevation:Ce,pitchAlignment:it,pitchScale:Pe},te)}}class _n extends ra{}let Mn;fi("HeatmapBucket",_n,{omit:["layers"]});var Bn={get paint(){return Mn=Mn||new Ps({"heatmap-radius":new wi(ht.paint_heatmap["heatmap-radius"]),"heatmap-weight":new wi(ht.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new hi(ht.paint_heatmap["heatmap-intensity"]),"heatmap-color":new tu(ht.paint_heatmap["heatmap-color"]),"heatmap-opacity":new hi(ht.paint_heatmap["heatmap-opacity"])})}};function Zn(R,{width:d,height:L},W,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==d*L*W)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${d*L*W}`)}else te=new Uint8Array(d*L*W);return R.width=d,R.height=L,R.data=te,R}function Ci(R,{width:d,height:L},W){if(d===R.width&&L===R.height)return;let te=Zn({},{width:d,height:L},W);qo(R,te,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,d),height:Math.min(R.height,L)},W),R.width=d,R.height=L,R.data=te.data}function qo(R,d,L,W,te,ue){if(te.width===0||te.height===0)return d;if(te.width>R.width||te.height>R.height||L.x>R.width-te.width||L.y>R.height-te.height)throw new RangeError("out of range source coordinates for image copy");if(te.width>d.width||te.height>d.height||W.x>d.width-te.width||W.y>d.height-te.height)throw new RangeError("out of range destination coordinates for image copy");let me=R.data,ge=d.data;if(me===ge)throw new Error("srcData equals dstData, so image is already copied");for(let Ce=0;Ce{d[R.evaluationKey]=Ce;let Te=R.expression.evaluate(d);te.setPixel(me/4/L,ge/4,Te)};if(R.clips)for(let me=0,ge=0;methis.max&&(this.max=Pe),Pe=this.dim+1||L<-1||L>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${d}, y: ${L}, dim: ${this.dim}`);return(L+1)*this.stride+(d+1)}unpack(d,L,W){return d*this.redFactor+L*this.greenFactor+W*this.blueFactor-this.baseShift}pack(d){return gp(d,this.getUnpackVector())}getPixels(){return new ls({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(d,L,W){if(this.dim!==d.dim)throw new Error("dem dimension mismatch");let te=L*this.dim,ue=L*this.dim+this.dim,me=W*this.dim,ge=W*this.dim+this.dim;switch(L){case-1:te=ue-1;break;case 1:ue=te+1}switch(W){case-1:me=ge-1;break;case 1:ge=me+1}let Ce=-L*this.dim,Te=-W*this.dim;for(let Oe=me;Oe0)for(let me=d;me=d;me-=W)ue=m4(me/W|0,R[me],R[me+1],ue);return ue&&g0(ue,ue.next)&&(Ag(ue),ue=ue.next),ue}function Hd(R,d){if(!R)return R;d||(d=R);let L,W=R;do if(L=!1,W.steiner||!g0(W,W.next)&&Xu(W.prev,W,W.next)!==0)W=W.next;else{if(Ag(W),W=d=W.prev,W===W.next)break;L=!0}while(L||W!==d);return d}function _p(R,d,L,W,te,ue,me){if(!R)return;!me&&ue&&function(Ce,Te,Oe,Pe){let it=Ce;do it.z===0&&(it.z=t3(it.x,it.y,Te,Oe,Pe)),it.prevZ=it.prev,it.nextZ=it.next,it=it.next;while(it!==Ce);it.prevZ.nextZ=null,it.prevZ=null,function(He){let bt,Et=1;do{let Qt,er=He;He=null;let br=null;for(bt=0;er;){bt++;let sr=er,Mr=0;for(let $r=0;$r0||qr>0&&sr;)Mr!==0&&(qr===0||!sr||er.z<=sr.z)?(Qt=er,er=er.nextZ,Mr--):(Qt=sr,sr=sr.nextZ,qr--),br?br.nextZ=Qt:He=Qt,Qt.prevZ=br,br=Qt;er=sr}br.nextZ=null,Et*=2}while(bt>1)}(it)}(R,W,te,ue);let ge=R;for(;R.prev!==R.next;){let Ce=R.prev,Te=R.next;if(ue?GH(R,W,te,ue):bg(R))d.push(Ce.i,R.i,Te.i),Ag(R),R=Te.next,ge=Te.next;else if((R=Te)===ge){me?me===1?_p(R=HH(Hd(R),d),d,L,W,te,ue,2):me===2&&WH(R,d,L,W,te,ue):_p(Hd(R),d,L,W,te,ue,1);break}}}function bg(R){let d=R.prev,L=R,W=R.next;if(Xu(d,L,W)>=0)return!1;let te=d.x,ue=L.x,me=W.x,ge=d.y,Ce=L.y,Te=W.y,Oe=Math.min(te,ue,me),Pe=Math.min(ge,Ce,Te),it=Math.max(te,ue,me),He=Math.max(ge,Ce,Te),bt=W.next;for(;bt!==d;){if(bt.x>=Oe&&bt.x<=it&&bt.y>=Pe&&bt.y<=He&&wg(te,ge,ue,Ce,me,Te,bt.x,bt.y)&&Xu(bt.prev,bt,bt.next)>=0)return!1;bt=bt.next}return!0}function GH(R,d,L,W){let te=R.prev,ue=R,me=R.next;if(Xu(te,ue,me)>=0)return!1;let ge=te.x,Ce=ue.x,Te=me.x,Oe=te.y,Pe=ue.y,it=me.y,He=Math.min(ge,Ce,Te),bt=Math.min(Oe,Pe,it),Et=Math.max(ge,Ce,Te),Qt=Math.max(Oe,Pe,it),er=t3(He,bt,d,L,W),br=t3(Et,Qt,d,L,W),sr=R.prevZ,Mr=R.nextZ;for(;sr&&sr.z>=er&&Mr&&Mr.z<=br;){if(sr.x>=He&&sr.x<=Et&&sr.y>=bt&&sr.y<=Qt&&sr!==te&&sr!==me&&wg(ge,Oe,Ce,Pe,Te,it,sr.x,sr.y)&&Xu(sr.prev,sr,sr.next)>=0||(sr=sr.prevZ,Mr.x>=He&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=Qt&&Mr!==te&&Mr!==me&&wg(ge,Oe,Ce,Pe,Te,it,Mr.x,Mr.y)&&Xu(Mr.prev,Mr,Mr.next)>=0))return!1;Mr=Mr.nextZ}for(;sr&&sr.z>=er;){if(sr.x>=He&&sr.x<=Et&&sr.y>=bt&&sr.y<=Qt&&sr!==te&&sr!==me&&wg(ge,Oe,Ce,Pe,Te,it,sr.x,sr.y)&&Xu(sr.prev,sr,sr.next)>=0)return!1;sr=sr.prevZ}for(;Mr&&Mr.z<=br;){if(Mr.x>=He&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=Qt&&Mr!==te&&Mr!==me&&wg(ge,Oe,Ce,Pe,Te,it,Mr.x,Mr.y)&&Xu(Mr.prev,Mr,Mr.next)>=0)return!1;Mr=Mr.nextZ}return!0}function HH(R,d){let L=R;do{let W=L.prev,te=L.next.next;!g0(W,te)&&p4(W,L,L.next,te)&&Tg(W,te)&&Tg(te,W)&&(d.push(W.i,L.i,te.i),Ag(L),Ag(L.next),L=R=te),L=L.next}while(L!==R);return Hd(L)}function WH(R,d,L,W,te,ue){let me=R;do{let ge=me.next.next;for(;ge!==me.prev;){if(me.i!==ge.i&&KH(me,ge)){let Ce=v4(me,ge);return me=Hd(me,me.next),Ce=Hd(Ce,Ce.next),_p(me,d,L,W,te,ue,0),void _p(Ce,d,L,W,te,ue,0)}ge=ge.next}me=me.next}while(me!==R)}function YH(R,d){let L=R.x-d.x;return L===0&&(L=R.y-d.y,L===0)&&(L=(R.next.y-R.y)/(R.next.x-R.x)-(d.next.y-d.y)/(d.next.x-d.x)),L}function XH(R,d){let L=function(te,ue){let me=ue,ge=te.x,Ce=te.y,Te,Oe=-1/0;if(g0(te,me))return me;do{if(g0(te,me.next))return me.next;if(Ce<=me.y&&Ce>=me.next.y&&me.next.y!==me.y){let Et=me.x+(Ce-me.y)*(me.next.x-me.x)/(me.next.y-me.y);if(Et<=ge&&Et>Oe&&(Oe=Et,Te=me.x=me.x&&me.x>=it&&ge!==me.x&&d4(CeTe.x||me.x===Te.x&&ZH(Te,me)))&&(Te=me,bt=Et)}me=me.next}while(me!==Pe);return Te}(R,d);if(!L)return d;let W=v4(L,R);return Hd(W,W.next),Hd(L,L.next)}function ZH(R,d){return Xu(R.prev,R,d.prev)<0&&Xu(d.next,R,R.next)<0}function t3(R,d,L,W,te){return(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-L)*te|0)|R<<8))|R<<4))|R<<2))|R<<1))|(d=1431655765&((d=858993459&((d=252645135&((d=16711935&((d=(d-W)*te|0)|d<<8))|d<<4))|d<<2))|d<<1))<<1}function $H(R){let d=R,L=R;do(d.x=(R-me)*(ue-ge)&&(R-me)*(W-ge)>=(L-me)*(d-ge)&&(L-me)*(ue-ge)>=(te-me)*(W-ge)}function wg(R,d,L,W,te,ue,me,ge){return!(R===me&&d===ge)&&d4(R,d,L,W,te,ue,me,ge)}function KH(R,d){return R.next.i!==d.i&&R.prev.i!==d.i&&!function(L,W){let te=L;do{if(te.i!==L.i&&te.next.i!==L.i&&te.i!==W.i&&te.next.i!==W.i&&p4(te,te.next,L,W))return!0;te=te.next}while(te!==L);return!1}(R,d)&&(Tg(R,d)&&Tg(d,R)&&function(L,W){let te=L,ue=!1,me=(L.x+W.x)/2,ge=(L.y+W.y)/2;do te.y>ge!=te.next.y>ge&&te.next.y!==te.y&&me<(te.next.x-te.x)*(ge-te.y)/(te.next.y-te.y)+te.x&&(ue=!ue),te=te.next;while(te!==L);return ue}(R,d)&&(Xu(R.prev,R,d.prev)||Xu(R,d.prev,d))||g0(R,d)&&Xu(R.prev,R,R.next)>0&&Xu(d.prev,d,d.next)>0)}function Xu(R,d,L){return(d.y-R.y)*(L.x-d.x)-(d.x-R.x)*(L.y-d.y)}function g0(R,d){return R.x===d.x&&R.y===d.y}function p4(R,d,L,W){let te=fy(Xu(R,d,L)),ue=fy(Xu(R,d,W)),me=fy(Xu(L,W,R)),ge=fy(Xu(L,W,d));return te!==ue&&me!==ge||!(te!==0||!cy(R,L,d))||!(ue!==0||!cy(R,W,d))||!(me!==0||!cy(L,R,W))||!(ge!==0||!cy(L,d,W))}function cy(R,d,L){return d.x<=Math.max(R.x,L.x)&&d.x>=Math.min(R.x,L.x)&&d.y<=Math.max(R.y,L.y)&&d.y>=Math.min(R.y,L.y)}function fy(R){return R>0?1:R<0?-1:0}function Tg(R,d){return Xu(R.prev,R,R.next)<0?Xu(R,d,R.next)>=0&&Xu(R,R.prev,d)>=0:Xu(R,d,R.prev)<0||Xu(R,R.next,d)<0}function v4(R,d){let L=r3(R.i,R.x,R.y),W=r3(d.i,d.x,d.y),te=R.next,ue=d.prev;return R.next=d,d.prev=R,L.next=te,te.prev=L,W.next=L,L.prev=W,ue.next=W,W.prev=ue,W}function m4(R,d,L,W){let te=r3(R,d,L);return W?(te.next=W.next,te.prev=W,W.next.prev=te,W.next=te):(te.prev=te,te.next=te),te}function Ag(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function r3(R,d,L){return{i:R,x:d,y:L,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class y0{constructor(d,L){if(L>d)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=d,this._minGranularity=L}getGranularityForZoomLevel(d){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||L>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let W=0|Math.round(d),te=0|Math.round(L),ue=this._getKey(W,te);if(this._vertexDictionary.has(ue))return this._vertexDictionary.get(ue);let me=this._vertexBuffer.length/2;return this._vertexDictionary.set(ue,me),this._vertexBuffer.push(W,te),me}_subdivideTrianglesScanline(d){if(this._granularity<2)return function(te,ue){let me=[];for(let ge=0;ge0?(me.push(Ce),me.push(Oe),me.push(Te)):(me.push(Ce),me.push(Te),me.push(Oe))}return me}(this._vertexBuffer,d);let L=[],W=d.length;for(let te=0;te=1||qr<=0)||er&&(Teue)){Pe>=te&&Pe<=ue&&me.push(W[(ge+1)%3]);continue}!er&&Mr>0&&me.push(this._vertexToIndex(Ce+bt*Mr,Te+Et*Mr));let $r=Ce+bt*Math.max(Mr,0),_a=Ce+bt*Math.min(qr,1);Qt||this._generateIntraEdgeVertices(me,Ce,Te,Oe,Pe,$r,_a),!er&&qr<1&&me.push(this._vertexToIndex(Ce+bt*qr,Te+Et*qr)),(er||Pe>=te&&Pe<=ue)&&me.push(W[(ge+1)%3]),!er&&(Pe<=te||Pe>=ue)&&this._generateInterEdgeVertices(me,Ce,Te,Oe,Pe,it,He,_a,te,ue)}return me}_generateIntraEdgeVertices(d,L,W,te,ue,me,ge){let Ce=te-L,Te=ue-W,Oe=Te===0,Pe=Oe?Math.min(L,te):Math.min(me,ge),it=Oe?Math.max(L,te):Math.max(me,ge),He=Math.floor(Pe/this._granularityCellSize)+1,bt=Math.ceil(it/this._granularityCellSize)-1;if(Oe?L=He;Et--){let Qt=Et*this._granularityCellSize;d.push(this._vertexToIndex(Qt,W+Te*(Qt-L)/Ce))}}_generateInterEdgeVertices(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=ue-W,it=me-te,He=ge-ue,bt=(Te-ue)/He,Et=(Oe-ue)/He,Qt=Math.min(bt,Et),er=Math.max(bt,Et),br=te+it*Qt,sr=Math.floor(Math.min(br,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(br,Ce)/this._granularityCellSize)-1,qr=Ce=1||er<=0){let Ca=W-ge,nn=me+(L-me)*Math.min((Te-ge)/Ca,(Oe-ge)/Ca);sr=Math.floor(Math.min(nn,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(nn,Ce)/this._granularityCellSize)-1,qr=Ce0?Oe:Te;if(qr)for(let Ca=sr;Ca<=Mr;Ca++)d.push(this._vertexToIndex(Ca*this._granularityCellSize,_a));else for(let Ca=Mr;Ca>=sr;Ca--)d.push(this._vertexToIndex(Ca*this._granularityCellSize,_a))}_generateOutline(d){let L=[];for(let W of d){let te=Sv(W,this._granularity,!0),ue=this._pointArrayToIndices(te),me=[];for(let ge=1;geue!=(me===_0)?(d.push(L),d.push(W),d.push(this._vertexToIndex(te,me)),d.push(W),d.push(this._vertexToIndex(ue,me)),d.push(this._vertexToIndex(te,me))):(d.push(W),d.push(L),d.push(this._vertexToIndex(te,me)),d.push(this._vertexToIndex(ue,me)),d.push(W),d.push(this._vertexToIndex(te,me)))}_fillPoles(d,L,W){let te=this._vertexBuffer,ue=F,me=d.length;for(let ge=2;ge80*Pe){Qt=Te[0],er=Te[1];let sr=Qt,Mr=er;for(let qr=Pe;qrsr&&(sr=$r),_a>Mr&&(Mr=_a)}br=Math.max(sr-Qt,Mr-er),br=br!==0?32767/br:0}return _p(bt,Et,Pe,Qt,er,br,0),Et}(W,te),Ce=this._convertIndices(W,ge);ue=this._subdivideTrianglesScanline(Ce)}catch(ge){console.error(ge)}let me=[];return L&&(me=this._generateOutline(d)),this._ensureNoPoleVertices(),this._handlePoles(ue),{verticesFlattened:this._vertexBuffer,indicesTriangles:ue,indicesLineList:me}}_convertIndices(d,L){let W=[];for(let te of L)W.push(this._vertexToIndex(d[2*te],d[2*te+1]));return W}_pointArrayToIndices(d){let L=[];for(let W of d)L.push(this._vertexToIndex(W.x,W.y));return L}}function g4(R,d,L,W=!0){return new JH(L,d).subdividePolygonInternal(R,W)}function Sv(R,d,L=!1){if(!R||R.length<1)return[];if(R.length<2)return[];let W=R[0],te=R[R.length-1],ue=L&&(W.x!==te.x||W.y!==te.y);if(d<2)return ue?[...R,R[0]]:[...R];let me=Math.floor(F/d),ge=[];ge.push(new t(R[0].x,R[0].y));let Ce=R.length,Te=ue?Ce:Ce-1;for(let Oe=0;Oe0?(Math.floor(_a/me)+1)*me:(Math.ceil(_a/me)-1)*me,bn=Mr>0?(Math.floor(Ca/me)+1)*me:(Math.ceil(Ca/me)-1)*me,Fn=Math.abs(_a-qa),gn=Math.abs(Ca-bn),Va=Math.abs(_a-Et),Hn=Math.abs(Ca-Qt),ni=er?Fn/qr:Number.POSITIVE_INFINITY,Wn=br?gn/$r:Number.POSITIVE_INFINITY;if((Va<=Fn||!er)&&(Hn<=gn||!br))break;if(ni=0?me-1:ue-1,Te=(ge+1)%ue,Oe=R[2*d[Ce]],Pe=R[2*d[Te]],it=R[2*d[me]],He=R[2*d[me]+1],bt=R[2*d[ge]+1],Et=!1;if(OePe)Et=!1;else{let Qt=bt-He,er=-(R[2*d[ge]]-it),br=He((Pe-it)*Qt+(R[2*d[Te]+1]-He)*er)*br&&(Et=!0)}if(Et){let Qt=d[Ce],er=d[me],br=d[ge];Qt!==er&&Qt!==br&&er!==br&&L.push(br,er,Qt),me--,me<0&&(me=ue-1)}else{let Qt=d[Te],er=d[me],br=d[ge];Qt!==er&&Qt!==br&&er!==br&&L.push(br,er,Qt),ge++,ge>=ue&&(ge=0)}if(Ce===Te)break}}function y4(R,d,L,W,te,ue,me,ge,Ce){let Te=te.length/2,Oe=me&&ge&&Ce;if(TeFa.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(it,He),sr=br.count,qa=!0,bn=!0,Fn=!0,qr=0);let gn=Sg(er,bt,Qt,br,_a,qa,Mr),Va=Sg(er,bt,Qt,br,Ca,bn,Mr),Hn=Sg(er,bt,Qt,br,nn,Fn,Mr);He.emplaceBack(qr+gn-sr,qr+Va-sr,qr+Hn-sr),Mr.primitiveLength++}})(d,L,W,te,ue,R),Oe&&function(Pe,it,He,bt,Et,Qt){let er=[];for(let $r=0;$rFa.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(it,He),sr=br.count,qa=!0,bn=!0,qr=0);let Fn=Sg(er,bt,Qt,br,Ca,qa,Mr),gn=Sg(er,bt,Qt,br,nn,bn,Mr);He.emplaceBack(qr+Fn-sr,qr+gn-sr),Mr.primitiveLength++}}(me,L,ge,te,Ce,R),d.forceNewSegmentOnNextPrepare(),me?.forceNewSegmentOnNextPrepare()}function Sg(R,d,L,W,te,ue,me){if(ue){let ge=W.count;return L(d[2*te],d[2*te+1]),R[te]=W.count,W.count++,me.vertexLength++,ge}return R[te]}class a3{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new ir,this.indexArray=new ua,this.indexArray2=new ia,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.segments2=new Fa,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.hasDependencies=Md("fill",this.layers,L);let te=this.layers[0].layout.get("fill-sort-key"),ue=!te.isConstant(),me=[];for(let{feature:ge,id:Ce,index:Te,sourceLayerIndex:Oe}of d){let Pe=this.layers[0]._featureFilter.needGeometry,it=fo(ge,Pe);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),it,W))continue;let He=ue?te.evaluate(it,{},W,L.availableImages):void 0,bt={id:Ce,properties:ge.properties,type:ge.type,sourceLayerIndex:Oe,index:Te,geometry:Pe?it.geometry:ql(ge),patterns:{},sortKey:He};me.push(bt)}ue&&me.sort((ge,Ce)=>ge.sortKey-Ce.sortKey);for(let ge of me){let{geometry:Ce,index:Te,sourceLayerIndex:Oe}=ge;if(this.hasDependencies){let Pe=v0("fill",this.layers,ge,{zoom:this.zoom},L);this.patternFeatures.push(Pe)}else this.addFeature(ge,Ce,Te,W,{},L.subdivisionGranularity);L.featureIndex.insert(d[Te].feature,Ce,Te,Oe,this.index)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}addFeatures(d,L,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,L,W,d.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,p0),this.indexBuffer=d.createIndexBuffer(this.indexArray),this.indexBuffer2=d.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(d,L,W,te,ue,me){for(let ge of Yc(L,500)){let Ce=g4(ge,te,me.fill.getGranularityForZoomLevel(te.z)),Te=this.layoutVertexArray;y4((Oe,Pe)=>{Te.emplaceBack(Oe,Pe)},this.segments,this.layoutVertexArray,this.indexArray,Ce.verticesFlattened,Ce.indicesTriangles,this.segments2,this.indexArray2,Ce.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,W,{imagePositions:ue,canonical:te})}}let _4,x4;fi("FillBucket",a3,{omit:["layers","patternFeatures"]});var eW={get paint(){return x4=x4||new Ps({"fill-antialias":new hi(ht.paint_fill["fill-antialias"]),"fill-opacity":new wi(ht.paint_fill["fill-opacity"]),"fill-color":new wi(ht.paint_fill["fill-color"]),"fill-outline-color":new wi(ht.paint_fill["fill-outline-color"]),"fill-translate":new hi(ht.paint_fill["fill-translate"]),"fill-translate-anchor":new hi(ht.paint_fill["fill-translate-anchor"]),"fill-pattern":new sl(ht.paint_fill["fill-pattern"])})},get layout(){return _4=_4||new Ps({"fill-sort-key":new wi(ht.layout_fill["fill-sort-key"])})}};class tW extends ll{constructor(d,L){super(d,eW,L)}recalculate(d,L){super.recalculate(d,L);let W=this.paint._values["fill-outline-color"];W.value.kind==="constant"&&W.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(d){return new a3(d)}queryRadius(){return Ue(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:d,geometry:L,transform:W,pixelsToTileUnits:te}){return Bi(Qe(d,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-W.bearingInRadians,te),L)}isTileClipped(){return!0}}let rW=ct([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),aW=ct([{name:"a_centroid",components:2,type:"Int16"}],4),{members:nW}=rW;class Eg{constructor(d,L,W,te,ue){this.properties={},this.extent=W,this.type=0,this.id=void 0,this._pbf=d,this._geometry=-1,this._keys=te,this._values=ue,d.readFields(iW,this,L)}loadGeometry(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,W=[],te,ue=1,me=0,ge=0,Ce=0;for(;d.pos>3}if(me--,ue===1||ue===2)ge+=d.readSVarint(),Ce+=d.readSVarint(),ue===1&&(te&&W.push(te),te=[]),te&&te.push(new t(ge,Ce));else{if(ue!==7)throw new Error(`unknown command ${ue}`);te&&te.push(te[0].clone())}}return te&&W.push(te),W}bbox(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,W=1,te=0,ue=0,me=0,ge=1/0,Ce=-1/0,Te=1/0,Oe=-1/0;for(;d.pos>3}if(te--,W===1||W===2)ue+=d.readSVarint(),me+=d.readSVarint(),ueCe&&(Ce=ue),meOe&&(Oe=me);else if(W!==7)throw new Error(`unknown command ${W}`)}return[ge,Te,Ce,Oe]}toGeoJSON(d,L,W){let te=this.extent*Math.pow(2,W),ue=this.extent*d,me=this.extent*L,ge=this.loadGeometry();function Ce(it){return[360*(it.x+ue)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(it.y+me)/te)*Math.PI))-90]}function Te(it){return it.map(Ce)}let Oe;if(this.type===1){let it=[];for(let bt of ge)it.push(bt[0]);let He=Te(it);Oe=it.length===1?{type:"Point",coordinates:He[0]}:{type:"MultiPoint",coordinates:He}}else if(this.type===2){let it=ge.map(Te);Oe=it.length===1?{type:"LineString",coordinates:it[0]}:{type:"MultiLineString",coordinates:it}}else{if(this.type!==3)throw new Error("unknown feature type");{let it=b4(ge),He=[];for(let bt of it)He.push(bt.map(Te));Oe=He.length===1?{type:"Polygon",coordinates:He[0]}:{type:"MultiPolygon",coordinates:He}}}let Pe={type:"Feature",geometry:Oe,properties:this.properties};return this.id!=null&&(Pe.id=this.id),Pe}}function iW(R,d,L){R===1?d.id=L.readVarint():R===2?function(W,te){let ue=W.readVarint()+W.pos;for(;W.pos=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[d];let L=this._pbf.readVarint()+this._pbf.pos;return new Eg(this._pbf,L,this.extent,this._keys,this._values)}}function lW(R,d,L){R===15?d.version=L.readVarint():R===1?d.name=L.readString():R===5?d.extent=L.readVarint():R===2?d._features.push(L.pos):R===3?d._keys.push(L.readString()):R===4&&d._values.push(function(W){let te=null,ue=W.readVarint()+W.pos;for(;W.pos>3;te=me===1?W.readString():me===2?W.readFloat():me===3?W.readDouble():me===4?W.readVarint64():me===5?W.readVarint():me===6?W.readSVarint():me===7?W.readBoolean():null}if(te==null)throw new Error("unknown feature value");return te}(L))}class w4{constructor(d,L){this.layers=d.readFields(uW,{},L)}}function uW(R,d,L){if(R===3){let W=new sW(L,L.readVarint()+L.pos);W.length&&(d[W.name]=W)}}let n3=Math.pow(2,13);function kg(R,d,L,W,te,ue,me,ge){R.emplaceBack(d,L,2*Math.floor(W*n3)+me,te*n3*2,ue*n3*2,Math.round(ge))}class i3{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new dr,this.centroidVertexArray=new It,this.indexArray=new ua,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.features=[],this.hasDependencies=Md("fill-extrusion",this.layers,L);for(let{feature:te,id:ue,index:me,sourceLayerIndex:ge}of d){let Ce=this.layers[0]._featureFilter.needGeometry,Te=fo(te,Ce);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),Te,W))continue;let Oe={id:ue,sourceLayerIndex:ge,index:me,geometry:Ce?Te.geometry:ql(te),properties:te.properties,type:te.type,patterns:{}};this.hasDependencies?this.features.push(v0("fill-extrusion",this.layers,Oe,{zoom:this.zoom},L)):this.addFeature(Oe,Oe.geometry,me,W,{},L.subdivisionGranularity),L.featureIndex.insert(te,Oe.geometry,me,ge,this.index,!0)}}addFeatures(d,L,W){for(let te of this.features){let{geometry:ue}=te;this.addFeature(te,ue,te.index,L,W,d.subdivisionGranularity)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,nW),this.centroidVertexBuffer=d.createVertexBuffer(this.centroidVertexArray,aW.members,!0),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(d,L,W,te,ue,me){for(let ge of Yc(L,500)){let Ce={x:0,y:0,sampleCount:0},Te=this.layoutVertexArray.length;this.processPolygon(Ce,te,d,ge,me);let Oe=this.layoutVertexArray.length-Te,Pe=Math.floor(Ce.x/Ce.sampleCount),it=Math.floor(Ce.y/Ce.sampleCount);for(let He=0;He{kg(Oe,Pe,it,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,Te.verticesFlattened,Te.indicesTriangles)}_generateSideFaces(d,L){let W=0;for(let te=1;teFa.MAX_VERTEX_ARRAY_LENGTH&&(L.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let ge=ue.sub(me)._perp()._unit(),Ce=me.dist(ue);W+Ce>32768&&(W=0),kg(this.layoutVertexArray,ue.x,ue.y,ge.x,ge.y,0,0,W),kg(this.layoutVertexArray,ue.x,ue.y,ge.x,ge.y,0,1,W),W+=Ce,kg(this.layoutVertexArray,me.x,me.y,ge.x,ge.y,0,0,W),kg(this.layoutVertexArray,me.x,me.y,ge.x,ge.y,0,1,W);let Te=L.segment.vertexLength;this.indexArray.emplaceBack(Te,Te+2,Te+1),this.indexArray.emplaceBack(Te+1,Te+2,Te+3),L.segment.vertexLength+=4,L.segment.primitiveLength+=2}}}function cW(R,d){for(let L=0;LF)||R.y===d.y&&(R.y<0||R.y>F)}function T4(R){return R.every(d=>d.x<0)||R.every(d=>d.x>F)||R.every(d=>d.y<0)||R.every(d=>d.y>F)}let A4;fi("FillExtrusionBucket",i3,{omit:["layers","features"]});var hW={get paint(){return A4=A4||new Ps({"fill-extrusion-opacity":new hi(ht["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new wi(ht["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new hi(ht["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new hi(ht["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new sl(ht["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new wi(ht["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new wi(ht["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new hi(ht["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class dW extends ll{constructor(d,L){super(d,hW,L)}createBucket(d){return new i3(d)}queryRadius(){return Ue(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:W,geometry:te,transform:ue,pixelsToTileUnits:me,pixelPosMatrix:ge}){let Ce=Qe(d,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-ue.bearingInRadians,me),Te=this.paint.get("fill-extrusion-height").evaluate(L,W),Oe=this.paint.get("fill-extrusion-base").evaluate(L,W),Pe=function(He,bt){let Et=[];for(let Qt of He){let er=[Qt.x,Qt.y,0,1];z(er,er,bt),Et.push(new t(er[0]/er[3],er[1]/er[3]))}return Et}(Ce,ge),it=function(He,bt,Et,Qt){let er=[],br=[],sr=Qt[8]*bt,Mr=Qt[9]*bt,qr=Qt[10]*bt,$r=Qt[11]*bt,_a=Qt[8]*Et,Ca=Qt[9]*Et,nn=Qt[10]*Et,qa=Qt[11]*Et;for(let bn of He){let Fn=[],gn=[];for(let Va of bn){let Hn=Va.x,ni=Va.y,Wn=Qt[0]*Hn+Qt[4]*ni+Qt[12],si=Qt[1]*Hn+Qt[5]*ni+Qt[13],po=Qt[2]*Hn+Qt[6]*ni+Qt[14],cs=Qt[3]*Hn+Qt[7]*ni+Qt[15],Ds=po+qr,Xs=cs+$r,Mf=Wn+_a,vu=si+Ca,yc=po+nn,Dc=cs+qa,Hl=new t((Wn+sr)/Xs,(si+Mr)/Xs);Hl.z=Ds/Xs,Fn.push(Hl);let rf=new t(Mf/Dc,vu/Dc);rf.z=yc/Dc,gn.push(rf)}er.push(Fn),br.push(gn)}return[er,br]}(te,Oe,Te,ge);return function(He,bt,Et){let Qt=1/0;Bi(Et,bt)&&(Qt=M4(Et,bt[0]));for(let er=0;er>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let ue=S4[15&W];if(!ue)throw new Error("Unrecognized array type.");let[me]=new Uint16Array(d,2,1),[ge]=new Uint32Array(d,4,1);return new dy(ge,me,ue,d)}constructor(d,L=64,W=Float64Array,te){if(isNaN(d)||d<0)throw new Error(`Unpexpected numItems value: ${d}.`);this.numItems=+d,this.nodeSize=Math.min(Math.max(+L,2),65535),this.ArrayType=W,this.IndexArrayType=d<65536?Uint16Array:Uint32Array;let ue=S4.indexOf(this.ArrayType),me=2*d*this.ArrayType.BYTES_PER_ELEMENT,ge=d*this.IndexArrayType.BYTES_PER_ELEMENT,Ce=(8-ge%8)%8;if(ue<0)throw new Error(`Unexpected typed array class: ${W}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+ge+Ce,2*d),this._pos=2*d,this._finished=!0):(this.data=new ArrayBuffer(8+me+ge+Ce),this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+ge+Ce,2*d),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+ue]),new Uint16Array(this.data,2,1)[0]=L,new Uint32Array(this.data,4,1)[0]=d)}add(d,L){let W=this._pos>>1;return this.ids[W]=W,this.coords[this._pos++]=d,this.coords[this._pos++]=L,W}finish(){let d=this._pos>>1;if(d!==this.numItems)throw new Error(`Added ${d} items when expected ${this.numItems}.`);return o3(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(d,L,W,te){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ue,coords:me,nodeSize:ge}=this,Ce=[0,ue.length-1,0],Te=[];for(;Ce.length;){let Oe=Ce.pop()||0,Pe=Ce.pop()||0,it=Ce.pop()||0;if(Pe-it<=ge){for(let Qt=it;Qt<=Pe;Qt++){let er=me[2*Qt],br=me[2*Qt+1];er>=d&&er<=W&&br>=L&&br<=te&&Te.push(ue[Qt])}continue}let He=it+Pe>>1,bt=me[2*He],Et=me[2*He+1];bt>=d&&bt<=W&&Et>=L&&Et<=te&&Te.push(ue[He]),(Oe===0?d<=bt:L<=Et)&&(Ce.push(it),Ce.push(He-1),Ce.push(1-Oe)),(Oe===0?W>=bt:te>=Et)&&(Ce.push(He+1),Ce.push(Pe),Ce.push(1-Oe))}return Te}within(d,L,W){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:te,coords:ue,nodeSize:me}=this,ge=[0,te.length-1,0],Ce=[],Te=W*W;for(;ge.length;){let Oe=ge.pop()||0,Pe=ge.pop()||0,it=ge.pop()||0;if(Pe-it<=me){for(let Qt=it;Qt<=Pe;Qt++)k4(ue[2*Qt],ue[2*Qt+1],d,L)<=Te&&Ce.push(te[Qt]);continue}let He=it+Pe>>1,bt=ue[2*He],Et=ue[2*He+1];k4(bt,Et,d,L)<=Te&&Ce.push(te[He]),(Oe===0?d-W<=bt:L-W<=Et)&&(ge.push(it),ge.push(He-1),ge.push(1-Oe)),(Oe===0?d+W>=bt:L+W>=Et)&&(ge.push(He+1),ge.push(Pe),ge.push(1-Oe))}return Ce}}function o3(R,d,L,W,te,ue){if(te-W<=L)return;let me=W+te>>1;E4(R,d,me,W,te,ue),o3(R,d,L,W,me-1,1-ue),o3(R,d,L,me+1,te,1-ue)}function E4(R,d,L,W,te,ue){for(;te>W;){if(te-W>600){let Te=te-W+1,Oe=L-W+1,Pe=Math.log(Te),it=.5*Math.exp(2*Pe/3),He=.5*Math.sqrt(Pe*it*(Te-it)/Te)*(Oe-Te/2<0?-1:1);E4(R,d,L,Math.max(W,Math.floor(L-Oe*it/Te+He)),Math.min(te,Math.floor(L+(Te-Oe)*it/Te+He)),ue)}let me=d[2*L+ue],ge=W,Ce=te;for(Lg(R,d,W,L),d[2*te+ue]>me&&Lg(R,d,W,te);geme;)Ce--}d[2*W+ue]===me?Lg(R,d,W,Ce):(Ce++,Lg(R,d,Ce,te)),Ce<=L&&(W=Ce+1),L<=Ce&&(te=Ce-1)}}function Lg(R,d,L,W){s3(R,L,W),s3(d,2*L,2*W),s3(d,2*L+1,2*W+1)}function s3(R,d,L){let W=R[d];R[d]=R[L],R[L]=W}function k4(R,d,L,W){let te=R-L,ue=d-W;return te*te+ue*ue}function l3(R,d,L,W){let te=W,ue=d+(L-d>>1),me,ge=L-d,Ce=R[d],Te=R[d+1],Oe=R[L],Pe=R[L+1];for(let it=d+3;itte)me=it,te=He;else if(He===te){let bt=Math.abs(it-ue);btW&&(me-d>3&&l3(R,d,me,W),R[me+2]=te,L-me>3&&l3(R,me,L,W))}function pW(R,d,L,W,te,ue){let me=te-L,ge=ue-W;if(me!==0||ge!==0){let Ce=((R-L)*me+(d-W)*ge)/(me*me+ge*ge);Ce>1?(L=te,W=ue):Ce>0&&(L+=me*Ce,W+=ge*Ce)}return me=R-L,ge=d-W,me*me+ge*ge}function tf(R,d,L,W){let te={type:d,geom:L},ue={id:R??null,type:te.type,geometry:te.geom,tags:W,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(te.type){case"Point":case"MultiPoint":Pg(ue,te.geom);break;case"LineString":Pg(ue,te.geom.points);break;case"Polygon":Pg(ue,te.geom[0].points);break;case"MultiLineString":for(let me of te.geom)Pg(ue,me.points);break;case"MultiPolygon":for(let me of te.geom)Pg(ue,me[0].points)}return ue}function u3(R){R.points.length>64&&(R.points=new Float64Array(R.points))}function Pg(R,d){for(let L=0;L0&&(me+=W?(te*Oe-Te*ue)/2:Math.sqrt(Math.pow(Te-te,2)+Math.pow(Oe-ue,2))),te=Te,ue=Oe}let ge=d.points.length-3;d.points[2]=1,L>0&&l3(d.points,0,ge,L),d.points[ge+2]=1,u3(d),d.size=Math.abs(me),d.start=0,d.end=d.size}function h3(R,d,L,W){for(let te=0;te1?1:L}function vy(R){let d={type:"Feature",geometry:vW(R),properties:R.tags};return R.id!=null&&(d.id=R.id),d}function vW(R){let{type:d,geometry:L}=R;switch(d){case"Point":return{type:d,coordinates:C4(L[0],L[1])};case"MultiPoint":return{type:d,coordinates:my(L)};case"LineString":return{type:d,coordinates:my(L.points)};case"MultiLineString":case"Polygon":return{type:d,coordinates:L.map(W=>my(W.points))};case"MultiPolygon":return{type:d,coordinates:L.map(W=>W.map(te=>my(te.points)))}}}function my(R){let d=[];for(let L=0;L=(L/=d)&&me=W)return null;let Ce=[];for(let Te of R){let Oe=te===Wf.X?Te.minX:Te.minY,Pe=te===Wf.X?Te.maxX:Te.maxY;if(Oe>=L&&Pe=W))switch(Te.type){case"Point":case"MultiPoint":mW(Te,Ce,L,W,te);continue;case"LineString":gW(Te,Ce,L,W,te,ge);continue;case"MultiLineString":yW(Te,Ce,L,W,te);continue;case"Polygon":_W(Te,Ce,L,W,te);continue;case"MultiPolygon":xW(Te,Ce,L,W,te);continue}}return Ce.length?Ce:null}function mW(R,d,L,W,te){let ue=[];(function(me,ge,Ce,Te,Oe){for(let Pe=0;Pe=Ce&&it<=Te&&w0(ge,me[Pe],me[Pe+1],me[Pe+2])}})(R.geometry,ue,L,W,te),ue.length&&d.push(tf(R.id,ue.length===3?"Point":"MultiPoint",ue,R.tags))}function gW(R,d,L,W,te,ue){let me=[];if(R4(R.geometry,me,L,W,te,!1,ue.lineMetrics),me.length)if(ue.lineMetrics)for(let ge of me)d.push(tf(R.id,"LineString",ge,R.tags));else d.push(me.length>1?tf(R.id,"MultiLineString",me,R.tags):tf(R.id,"LineString",me[0],R.tags))}function yW(R,d,L,W,te){let ue=[];d3(R.geometry,ue,L,W,te,!1),ue.length&&d.push(ue.length!==1?tf(R.id,"MultiLineString",ue,R.tags):tf(R.id,"LineString",ue[0],R.tags))}function _W(R,d,L,W,te){let ue=[];d3(R.geometry,ue,L,W,te,!0),ue.length&&d.push(tf(R.id,"Polygon",ue,R.tags))}function xW(R,d,L,W,te){let ue=[];for(let me of R.geometry){let ge=[];d3(me,ge,L,W,te,!0),ge.length&&ue.push(ge)}ue.length&&d.push(tf(R.id,"MultiPolygon",ue,R.tags))}function R4(R,d,L,W,te,ue,me){let ge=I4(R),Ce=te===Wf.X?bW:wW,Te,Oe,Pe=R.start;for(let Qt=0;QtL&&(Oe=Ce(ge,er,br,Mr,qr,L),me&&(ge.start=Pe+Te*Oe)):$r>W?_a=L&&(Oe=Ce(ge,er,br,Mr,qr,L),Ca=!0),_a>W&&$r<=W&&(Oe=Ce(ge,er,br,Mr,qr,W),Ca=!0),!ue&&Ca&&(me&&(ge.end=Pe+Te*Oe),d.push(ge),ge=I4(R)),me&&(Pe+=Te)}let it=R.points.length-3,He=R.points[it],bt=R.points[it+1],Et=te===Wf.X?He:bt;Et>=L&&Et<=W&&w0(ge.points,He,bt,R.points[it+2]),it=ge.points.length-3,ue&&it>=3&&(ge.points[it]!==ge.points[0]||ge.points[it+1]!==ge.points[1])&&w0(ge.points,ge.points[0],ge.points[1],ge.points[2]),ge.points.length&&(u3(ge),d.push(ge))}function I4(R){return{points:[],size:R.size,start:R.start,end:R.end}}function d3(R,d,L,W,te,ue){for(let me of R)R4(me,d,L,W,te,ue,!1)}function w0(R,d,L,W){R.push(d,L,W)}function bW(R,d,L,W,te,ue){let me=(ue-d)/(W-d);return w0(R.points,ue,L+(te-L)*me,1),me}function wW(R,d,L,W,te,ue){let me=(ue-L)/(te-L);return w0(R.points,d+(W-d)*me,ue,1),me}function p3(R,d){let L=d.buffer/d.extent,W=R,te=Wd(R,1,-1-L,L,Wf.X,-1,2,d),ue=Wd(R,1,1-L,2+L,Wf.X,-1,2,d);return(te||ue)&&(W=Wd(R,1,-L,1+L,Wf.X,-1,2,d)||[],te&&(W=D4(te,1).concat(W)),ue&&(W=W.concat(D4(ue,-1)))),W}function D4(R,d){let L=[];for(let W of R)switch(W.type){case"Point":case"MultiPoint":{let te=TW(W.geometry,d);L.push(tf(W.id,W.type,te,W.tags));continue}case"LineString":{let te=v3(W.geometry,d);L.push(tf(W.id,W.type,te,W.tags));continue}case"MultiLineString":case"Polygon":{let te=[];for(let ue of W.geometry)te.push(v3(ue,d));L.push(tf(W.id,W.type,te,W.tags));continue}case"MultiPolygon":{let te=[];for(let ue of W.geometry){let me=[];for(let ge of ue)me.push(v3(ge,d));te.push(me)}L.push(tf(W.id,W.type,te,W.tags));continue}}return L}function TW(R,d){let L=[];for(let W=0;W0||((te=d.addOrUpdateProperties)==null?void 0:te.length)>0;if(ue){let ge=R[0],Ce=c3({type:"FeatureCollection",features:[{type:"Feature",id:ge.id,geometry:d.newGeometry,properties:me?F4(ge.tags,d):ge.tags}]},L);return Ce=p3(Ce,L),Ce}if(me){let ge=[];for(let Ce of R){let Te=Li({},Ce);Te.tags=F4(Te.tags,d),ge.push(Te)}return ge}return R}function F4(R,d){if(d.removeAllProperties)return{};let L=Li({},R||{});if(d.removeProperties)for(let W of d.removeProperties)delete L[W];if(d.addOrUpdateProperties)for(let{key:W,value:te}of d.addOrUpdateProperties)L[W]=te;return L}(function(R){R[R.X=0]="X",R[R.Y=1]="Y"})(Wf||(Wf={}));let m3={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:R=>R};class MW{constructor(d){this.options=Object.assign(Object.create(m3),d),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(d){let L=[];for(let W of d){if(!W.geometry)continue;let[te,ue]=W.geometry.coordinates,[me,ge]=[x0(te),b0(ue)];L.push({id:W.id,type:"Point",geometry:[me,ge],tags:W.properties})}this.createIndex(L)}initialize(d){let L=[];for(let W of d)W.type==="Point"&&L.push(W);this.createIndex(L)}updateIndex(d,L,W){this.options=Object.assign(Object.create(m3),W.clusterOptions),this.initialize(d)}createIndex(d){let{log:L,minZoom:W,maxZoom:te}=this.options;L&&console.time("total time");let ue=`prepare ${d.length} points`;L&&console.time(ue),this.points=d;let me=[];for(let Ce=0;Ce=W;Ce--){let Te=Date.now();ge=this.trees[Ce]=this.createTree(this.cluster(ge,Ce)),L&&console.log("z%d: %d clusters in %dms",Ce,ge.numItems,Date.now()-Te)}L&&console.timeEnd("total time")}getClusters(d,L){return this.getClustersInternal(d,L).map(W=>vy(W))}getClustersInternal(d,L){let W=((d[0]+180)%360+360)%360-180,te=Math.max(-90,Math.min(90,d[1])),ue=d[2]===180?180:((d[2]+180)%360+360)%360-180,me=Math.max(-90,Math.min(90,d[3]));if(d[2]-d[0]>=360)W=-180,ue=180;else if(W>ue){let Pe=this.getClustersInternal([W,te,180,me],L),it=this.getClustersInternal([-180,te,ue,me],L);return Pe.concat(it)}let ge=this.trees[this.limitZoom(L)],Ce=ge.range(x0(W),b0(me),x0(ue),b0(te)),Te=ge.flatData,Oe=[];for(let Pe of Ce){let it=this.stride*Pe;Oe.push(Te[it+5]>1?SW(Te,it,this.clusterProps):this.points[Te[it+3]])}return Oe}getChildren(d){let L=this.getOriginId(d),W=this.getOriginZoom(d),te=new Error("No cluster with the specified id: "+d),ue=this.trees[W];if(!ue)throw te;let me=ue.flatData;if(L*this.stride>=me.length)throw te;let ge=this.options.radius/(this.options.extent*Math.pow(2,W-1)),Ce=ue.within(me[L*this.stride],me[L*this.stride+1],ge),Te=[];for(let Oe of Ce){let Pe=Oe*this.stride;me[Pe+4]===d&&Te.push(me[Pe+5]>1?EW(me,Pe,this.clusterProps):vy(this.points[me[Pe+3]]))}if(Te.length===0)throw te;return Te}getLeaves(d,L,W){let te=[];return this.appendLeaves(te,d,L=L||10,W=W||0,0),te}getTile(d,L,W){let te=this.trees[this.limitZoom(d)];if(!te)return null;let ue=Math.pow(2,d),{extent:me,radius:ge}=this.options,Ce=ge/me,Te=(W-Ce)/ue,Oe=(W+1+Ce)/ue,Pe={transformed:!0,features:[],source:null,x:L,y:W,z:d};return this.addTileFeatures(te.range((L-Ce)/ue,Te,(L+1+Ce)/ue,Oe),te.flatData,L,W,ue,Pe),L===0&&this.addTileFeatures(te.range(1-Ce/ue,Te,1,Oe),te.flatData,ue,W,ue,Pe),L===ue-1&&this.addTileFeatures(te.range(0,Te,Ce/ue,Oe),te.flatData,-1,W,ue,Pe),Pe}getClusterExpansionZoom(d){return this.getOriginZoom(d)}appendLeaves(d,L,W,te,ue){let me=this.getChildren(L);for(let ge of me){let Ce=ge.properties;if(Ce?.cluster?ue+Ce.point_count<=te?ue+=Ce.point_count:ue=this.appendLeaves(d,Ce.cluster_id,W,te,ue):ue1,Oe,Pe,it;if(Te)Oe=g3(L,Ce,this.clusterProps),Pe=L[Ce],it=L[Ce+1];else{let Et=this.points[L[Ce+3]];Oe=Et.tags,[Pe,it]=Et.geometry}let He={type:1,geometry:[[Math.round(this.options.extent*(Pe*ue-W)),Math.round(this.options.extent*(it*ue-te))]],tags:Oe},bt;bt=Te||this.options.generateId?L[Ce+3]:this.points[L[Ce+3]].id,bt!==void 0&&(He.id=bt),me.features.push(He)}}limitZoom(d){return Math.max(this.options.minZoom,Math.min(Math.floor(+d),this.options.maxZoom+1))}cluster(d,L){let{radius:W,extent:te,reduce:ue,minPoints:me}=this.options,ge=W/(te*Math.pow(2,L)),Ce=d.flatData,Te=[],Oe=this.stride;for(let Pe=0;PeL&&(Qt+=Ce[br+5])}if(Qt>Et&&Qt>=me){let er,br=it*Et,sr=He*Et,Mr=-1,qr=(Pe/Oe<<5)+(L+1)+this.points.length;for(let $r of bt){let _a=$r*Oe;if(Ce[_a+2]<=L)continue;Ce[_a+2]=L;let Ca=Ce[_a+5];br+=Ce[_a]*Ca,sr+=Ce[_a+1]*Ca,Ce[_a+4]=qr,ue&&(er||(er=this.map(Ce,Pe,!0),Mr=this.clusterProps.length,this.clusterProps.push(er)),ue(er,this.map(Ce,_a)))}Ce[Pe+4]=qr,Te.push(br/Qt,sr/Qt,1/0,qr,-1,Qt),ue&&Te.push(Mr)}else{for(let er=0;er1)for(let er of bt){let br=er*Oe;if(!(Ce[br+2]<=L)){Ce[br+2]=L;for(let sr=0;sr>5}getOriginZoom(d){return(d-this.points.length)%32}map(d,L,W){if(d[L+5]>1){let me=this.clusterProps[d[L+6]];return W?Object.assign({},me):me}let te=this.points[d[L+3]].tags,ue=this.options.map(te);return W&&ue===te?Object.assign({},ue):ue}}function SW(R,d,L){return{id:R[d+3],type:"Point",tags:g3(R,d,L),geometry:[R[d],R[d+1]]}}function EW(R,d,L){return{type:"Feature",id:R[d+3],properties:g3(R,d,L),geometry:{type:"Point",coordinates:[L4(R[d]),P4(R[d+1])]}}}function g3(R,d,L){let W=R[d+5],te=W>=1e4?`${Math.round(W/1e3)}k`:W>=1e3?Math.round(W/100)/10+"k":W,ue=R[d+6],me=ue===-1?{}:Object.assign({},L[ue]);return Object.assign(me,{cluster:!0,cluster_id:R[d+3],point_count:W,point_count_abbreviated:te})}let y3="geojsonvt_clip_start",_3="geojsonvt_clip_end";function z4(R,d,L,W,te){let ue=d===te.maxZoom?0:te.tolerance/((1<0&&d.size<(te?me:W))return void(L.numPoints+=d.points.length/3);let ge=[];for(let Ce=0;Ceme)&&(L.numSimplified++,ge.push(d.points[Ce],d.points[Ce+1])),L.numPoints++;te&&function(Ce,Te){let Oe=0;for(let Pe=0,it=Ce.length,He=it-2;Pe0===Te)for(let Pe=0,it=Ce.length;Pe1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(L),W.debug>1&&console.timeEnd("invalidating");let[te,ue,me]=[0,0,0],ge=z4(d,te,ue,me,W);ge.source=d;let Ce=gy(te,ue,me);if(this.tiles[Ce]=ge,this.tileCoords.push({z:te,x:ue,y:me,id:Ce}),W.debug){let Te=`z${te}`;this.stats[Te]=(this.stats[Te]||0)+1,this.total++}}getClusterExpansionZoom(d){return null}getChildren(d){return null}getLeaves(d,L,W){return null}getTile(d,L,W){let{extent:te,debug:ue}=this.options,me=1<1&&console.log("drilling down to z%d-%d-%d",d,L,W);let Ce,Te=d,Oe=L,Pe=W;for(;!Ce&&Te>0;)Te--,Oe>>=1,Pe>>=1,Ce=this.tiles[gy(Te,Oe,Pe)];return Ce?.source?(ue>1&&(console.log("found parent tile z%d-%d-%d",Te,Oe,Pe),console.time("drilling down")),this.splitTile(Ce.source,Te,Oe,Pe,d,L,W),ue>1&&console.timeEnd("drilling down"),this.tiles[ge]?B4(this.tiles[ge],te):null):null}splitTile(d,L,W,te,ue,me,ge){let Ce=[d,L,W,te],Te=this.options,Oe=Te.debug;for(;Ce.length;){te=Ce.pop(),W=Ce.pop(),L=Ce.pop(),d=Ce.pop();let Pe=1<1&&console.time("creation"),He=this.tiles[it]=z4(d,L,W,te,Te),this.tileCoords.push({z:L,x:W,y:te,id:it}),Oe)){Oe>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",L,W,te,He.numFeatures,He.numPoints,He.numSimplified),console.timeEnd("creation"));let Ca=`z${L}`;this.stats[Ca]=(this.stats[Ca]||0)+1,this.total++}if(He.source=d,ue==null){if(L===Te.indexMaxZoom||He.numPoints<=Te.indexMaxPoints)continue}else{if(L===Te.maxZoom||L===ue)continue;if(ue!=null){let Ca=ue-L;if(W!==me>>Ca||te!==ge>>Ca)continue}}if(He.source=null,!d.length)continue;Oe>1&&console.time("clipping");let bt=.5*Te.buffer/Te.extent,Et=.5-bt,Qt=.5+bt,er=1+bt,br=null,sr=null,Mr=null,qr=null,$r=Wd(d,Pe,W-bt,W+Qt,Wf.X,He.minX,He.maxX,Te),_a=Wd(d,Pe,W+Et,W+er,Wf.X,He.minX,He.maxX,Te);$r&&(br=Wd($r,Pe,te-bt,te+Qt,Wf.Y,He.minY,He.maxY,Te),sr=Wd($r,Pe,te+Et,te+er,Wf.Y,He.minY,He.maxY,Te)),_a&&(Mr=Wd(_a,Pe,te-bt,te+Qt,Wf.Y,He.minY,He.maxY,Te),qr=Wd(_a,Pe,te+Et,te+er,Wf.Y,He.minY,He.maxY,Te)),Oe>1&&console.timeEnd("clipping"),Ce.push(br||[],L+1,2*W,2*te),Ce.push(sr||[],L+1,2*W,2*te+1),Ce.push(Mr||[],L+1,2*W+1,2*te),Ce.push(qr||[],L+1,2*W+1,2*te+1)}}invalidateTiles(d){if(!d.length)return;let L=this.options,{debug:W}=L,te=1/0,ue=-1/0,me=1/0,ge=-1/0;for(let Oe of d)te=Math.min(te,Oe.minX),ue=Math.max(ue,Oe.maxX),me=Math.min(me,Oe.minY),ge=Math.max(ge,Oe.maxY);let Ce=L.buffer/L.extent,Te=new Set;for(let Oe in this.tiles){let Pe=this.tiles[Oe],it=1<=bt||ge=Qt)continue;let er=!1;for(let br of d)if(br.maxX>=He&&br.minX=Et&&br.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Pe.z,Pe.x,Pe.y,Pe.numFeatures,Pe.numPoints,Pe.numSimplified);let br=`z${Pe.z}`;this.stats[br]=(this.stats[br]||0)-1,this.total--}delete this.tiles[Oe],Te.add(Oe)}}Te.size&&(this.tileCoords=this.tileCoords.filter(Oe=>!Te.has(Oe.id)))}}function gy(R,d,L){return 32*((1<L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let L of this.layers)this.gradients[L.id]={};this.layoutVertexArray=new Ar,this.layoutVertexArray2=new hr,this.indexArray=new ua,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.hasDependencies=Md("line",this.layers,L)||this.hasLineDasharray(this.layers);let te=this.layers[0].layout.get("line-sort-key"),ue=!te.isConstant(),me=[];for(let{feature:ge,id:Ce,index:Te,sourceLayerIndex:Oe}of d){let Pe=this.layers[0]._featureFilter.needGeometry,it=fo(ge,Pe);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),it,W))continue;let He=ue?te.evaluate(it,{},W):void 0,bt={id:Ce,properties:ge.properties,type:ge.type,sourceLayerIndex:Oe,index:Te,geometry:Pe?it.geometry:ql(ge),patterns:{},dashes:{},sortKey:He};me.push(bt)}ue&&me.sort((ge,Ce)=>ge.sortKey-Ce.sortKey);for(let ge of me){let{geometry:Ce,index:Te,sourceLayerIndex:Oe}=ge;this.hasDependencies?(Md("line",this.layers,L)?v0("line",this.layers,ge,{zoom:this.zoom},L):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,ge,this.zoom,L),this.patternFeatures.push(ge)):this.addFeature(ge,Ce,Te,W,{},{},L.subdivisionGranularity),L.featureIndex.insert(d[Te].feature,Ce,Te,Oe,this.index)}}update(d,L,W,te){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W,dashPositions:te})}addFeatures(d,L,W,te){for(let ue of this.patternFeatures)this.addFeature(ue,ue.geometry,ue.index,L,W,te,d.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=d.createVertexBuffer(this.layoutVertexArray2,zW)),this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,DW),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(d){if(d.properties&&Object.hasOwn(d.properties,y3)&&Object.hasOwn(d.properties,_3))return{start:+d.properties[y3],end:+d.properties[_3]}}addFeature(d,L,W,te,ue,me,ge){let Ce=this.layers[0].layout,Te=Ce.get("line-join").evaluate(d,{}),Oe=Ce.get("line-cap").evaluate(d,{}),Pe=Ce.get("line-miter-limit").evaluate(d,{}),it=Ce.get("line-round-limit").evaluate(d,{});this.lineClips=this.lineFeatureClips(d);for(let He of L)this.addLine(He,d,Te,Oe,Pe,it,te,ge);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,W,{imagePositions:ue,dashPositions:me,canonical:te})}addLine(d,L,W,te,ue,me,ge,Ce){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,d=Sv(d,ge?Ce.line.getGranularityForZoomLevel(ge.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let sr=0;sr=2&&d[Oe-1].equals(d[Oe-2]);)Oe--;let Pe=0;for(;Pe0;if(nn&&sr>Pe){let gn=bt.dist(Et);if(gn>2*it){let Va=bt.sub(bt.sub(Et)._mult(it/gn)._round());this.updateDistance(Et,Va),this.addCurrentVertex(Va,er,0,0,He),Et=Va}}let bn=Et&&Qt,Fn=bn?W:Te?"butt":te;if(bn&&Fn==="round"&&(_aue&&(Fn="bevel"),Fn==="bevel"&&(_a>2&&(Fn="flipbevel"),_a100)Mr=br.mult(-1);else{let gn=_a*er.add(br).mag()/er.sub(br).mag();Mr._perp()._mult(gn*(qa?-1:1))}this.addCurrentVertex(bt,Mr,0,0,He),this.addCurrentVertex(bt,Mr.mult(-1),0,0,He)}else if(Fn==="bevel"||Fn==="fakeround"){let gn=-Math.sqrt(_a*_a-1),Va=qa?gn:0,Hn=qa?0:gn;if(Et&&this.addCurrentVertex(bt,er,Va,Hn,He),Fn==="fakeround"){let ni=Math.round(180*Ca/Math.PI/20);for(let Wn=1;Wn2*it){let Va=bt.add(Qt.sub(bt)._mult(it/gn)._round());this.updateDistance(bt,Va),this.addCurrentVertex(Va,br,0,0,He),bt=Va}}}}addCurrentVertex(d,L,W,te,ue,me=!1){let ge=L.y*te-L.x,Ce=-L.y-L.x*te;this.addHalfVertex(d,L.x+L.y*W,L.y-L.x*W,me,!1,W,ue),this.addHalfVertex(d,ge,Ce,me,!0,-te,ue),this.distance>N4/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(d,L,W,te,ue,me))}addHalfVertex({x:d,y:L},W,te,ue,me,ge,Ce){let Te=.5*(this.lineClips?this.scaledDistance*(N4-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((d<<1)+(ue?1:0),(L<<1)+(me?1:0),Math.round(63*W)+128,Math.round(63*te)+128,1+(ge===0?0:ge<0?-1:1)|(63&Te)<<2,Te>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Oe=Ce.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,Oe,this.e2),Ce.primitiveLength++),me?this.e2=Oe:this.e1=Oe}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(d,L){this.distance+=d.dist(L),this.updateScaledDistance()}hasLineDasharray(d){for(let L of d){let W=L.paint.get("line-dasharray");if(W&&!W.isConstant())return!0}return!1}addLineDashDependencies(d,L,W,te){for(let ue of d){let me=ue.paint.get("line-dasharray");if(!me||me.value.kind==="constant")continue;let ge=ue.layout.get("line-cap").evaluate(L,{})==="round",Ce={dasharray:me.value.evaluate({zoom:W-1},L,{}),round:ge},Te={dasharray:me.value.evaluate({zoom:W},L,{}),round:ge},Oe={dasharray:me.value.evaluate({zoom:W+1},L,{}),round:ge},Pe=`${Ce.dasharray.join(",")},${Ce.round}`,it=`${Te.dasharray.join(",")},${Te.round}`,He=`${Oe.dasharray.join(",")},${Oe.round}`;te.dashDependencies[Pe]=Ce,te.dashDependencies[it]=Te,te.dashDependencies[He]=Oe,L.dashes[ue.id]={min:Pe,mid:it,max:He}}}}let j4,U4;fi("LineBucket",b3,{omit:["layers","patternFeatures"]});var q4={get paint(){return U4=U4||new Ps({"line-opacity":new wi(ht.paint_line["line-opacity"]),"line-color":new wi(ht.paint_line["line-color"]),"line-translate":new hi(ht.paint_line["line-translate"]),"line-translate-anchor":new hi(ht.paint_line["line-translate-anchor"]),"line-width":new wi(ht.paint_line["line-width"]),"line-gap-width":new wi(ht.paint_line["line-gap-width"]),"line-offset":new wi(ht.paint_line["line-offset"]),"line-blur":new wi(ht.paint_line["line-blur"]),"line-dasharray":new sl(ht.paint_line["line-dasharray"]),"line-pattern":new sl(ht.paint_line["line-pattern"]),"line-gradient":new tu(ht.paint_line["line-gradient"])})},get layout(){return j4=j4||new Ps({"line-cap":new wi(ht.layout_line["line-cap"]),"line-join":new wi(ht.layout_line["line-join"]),"line-miter-limit":new wi(ht.layout_line["line-miter-limit"]),"line-round-limit":new wi(ht.layout_line["line-round-limit"]),"line-sort-key":new wi(ht.layout_line["line-sort-key"])})}};class OW extends wi{possiblyEvaluate(d,L){return L=new oi(Math.floor(L.zoom),{now:L.now,fadeDuration:L.fadeDuration,zoomHistory:L.zoomHistory,transition:L.transition}),super.possiblyEvaluate(d,L)}evaluate(d,L,W,te){return L=X({},L,{zoom:Math.floor(L.zoom)}),super.evaluate(d,L,W,te)}}let yy;class NW extends ll{constructor(d,L){super(d,q4,L),this.gradientVersion=0,yy||(yy=new OW(q4.paint.properties["line-width"].specification),yy.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(d){if(d==="line-gradient"){let L=this.gradientExpression();this.stepInterpolant=!!function(W){return W._styleExpression!==void 0}(L)&&L._styleExpression.expression instanceof Ss,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(d,L){super.recalculate(d,L),this.paint._values["line-floorwidth"]=yy.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,d)}createBucket(d){return new b3(d)}queryRadius(d){let L=d,W=V4(Le("line-width",this,L),Le("line-gap-width",this,L)),te=Le("line-offset",this,L);return W/2+Math.abs(te)+Ue(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:W,geometry:te,transform:ue,pixelsToTileUnits:me}){let ge=Qe(d,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-ue.bearingInRadians,me),Ce=me/2*V4(this.paint.get("line-width").evaluate(L,W),this.paint.get("line-gap-width").evaluate(L,W)),Te=this.paint.get("line-offset").evaluate(L,W);return Te&&(te=function(Oe,Pe){let it=[];for(let He of Oe){let bt=_t(He),Et=[];for(let Qt=0;Qt=3){for(let bt of He)if(Wa(Oe,bt))return!0}if(rs(Oe,He,it))return!0}return!1}(ge,te,Ce)}isTileClipped(){return!0}}function V4(R,d){return d>0?d+2*R:R}let jW=ct([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),UW=ct([{name:"a_projected_pos",components:3,type:"Float32"}],4);ct([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let qW=ct([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ct([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let G4=ct([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),VW=ct([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function GW(R,d,L){let W=d.layout.get("text-transform").evaluate(L,{});return W==="uppercase"?R=R.toLocaleUpperCase():W==="lowercase"&&(R=R.toLocaleLowerCase()),Si.applyArabicShaping&&(R=Si.applyArabicShaping(R)),R}function HW(R,d,L){for(let W of R.sections)W.text=GW(W.text,d,L);return R}ct([{name:"triangle",components:3,type:"Uint16"}]),ct([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ct([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ct([{type:"Float32",name:"offsetX"}]),ct([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ct([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var Rc=24;let Rg={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u22EF":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"},WW={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},YW={40:!0};function H4(R,d,L,W,te,ue){if("fontStack"in d){let me=L[d.fontStack],ge=me?.[R];return ge?ge.metrics.advance*d.scale+te:0}{let me=W[d.imageName];return me?me.displaySize[0]*d.scale*Rc/ue+te:0}}function W4(R,d,L,W){let te=Math.pow(R-d,2);return W?RMath.max(d,this.sections[L].scale),0)}getMaxImageSize(d){let L=0,W=0;for(let te=0;teW))}addImageSection(d){let L=d.image?d.image.name:"";if(L.length===0)return void ee("Can't add FormattedSection with an empty image.");let W=this.getNextImageSectionCharCode();W?(this.text+=String.fromCharCode(W),this.sections.push({scale:1,verticalAlign:d.verticalAlign||"bottom",imageName:L}),this.sectionIndex.push(this.sections.length-1)):ee("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(d,L,W,te,ue){let me=[],ge=this.determineAverageLineWidth(d,L,W,te,ue),Ce=this.hasZeroWidthSpaces(),Te=0,Oe=0,Pe=this.text[Symbol.iterator](),it=Pe.next(),He=this.text[Symbol.iterator]();He.next();let bt=He.next(),Et=this.text[Symbol.iterator]();Et.next(),Et.next();let Qt=Et.next();for(;!it.done;){let er=this.getSection(Oe),br=it.value.codePointAt(0);if(Pr(br)||(Te+=H4(br,er,W,te,d,ue)),!bt.done){let sr=zt(br),Mr=bt.value.codePointAt(0);(WW[br]||sr||"imageName"in er||!Qt.done&&YW[Mr])&&me.push(Y4(Oe+1,Te,ge,me,XW(br,Mr,sr&&Ce),!1))}Oe++,it=Pe.next(),bt=He.next(),Qt=Et.next()}return X4(Y4(this.length(),Te,ge,me,0,!0))}determineAverageLineWidth(d,L,W,te,ue){let me=0,ge=0;for(let Ce of this.text){let Te=this.getSection(ge);me+=H4(Ce.codePointAt(0),Te,W,te,d,ue),ge++}return me/Math.max(1,Math.ceil(me/L))}}let w3=4294967296,Z4=1/w3,$4=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class _y{constructor(d=new Uint8Array(16)){this.buf=ArrayBuffer.isView(d)?d:new Uint8Array(d),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(d,L,W=this.length){for(;this.pos>3,me=this.pos;this.type=7&te,d(ue,L,this),this.pos===me&&this.skip(te)}return L}readMessage(d,L){return this.readFields(d,L,this.readVarint()+this.pos)}readFixed32(){let d=this.dataView.getUint32(this.pos,!0);return this.pos+=4,d}readSFixed32(){let d=this.dataView.getInt32(this.pos,!0);return this.pos+=4,d}readFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*w3;return this.pos+=8,d}readSFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*w3;return this.pos+=8,d}readFloat(){let d=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,d}readDouble(){let d=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,d}readVarint(d){let L=this.buf,W,te;return te=L[this.pos++],W=127&te,te<128?W:(te=L[this.pos++],W|=(127&te)<<7,te<128?W:(te=L[this.pos++],W|=(127&te)<<14,te<128?W:(te=L[this.pos++],W|=(127&te)<<21,te<128?W:(te=L[this.pos],W|=(15&te)<<28,function(ue,me,ge){let Ce=ge.buf,Te,Oe;if(Oe=Ce[ge.pos++],Te=(112&Oe)>>4,Oe<128||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<3,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<10,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<17,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<24,Oe<128)||(Oe=Ce[ge.pos++],Te|=(1&Oe)<<31,Oe<128))return A0(ue,Te,me);throw new Error("Expected varint not more than 10 bytes")}(W,d,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let d=this.readVarint();return d%2==1?(d+1)/-2:d/2}readBoolean(){return!!this.readVarint()}readString(){let d=this.readVarint()+this.pos,L=this.pos;return this.pos=d,d-L>=12&&$4?$4.decode(this.buf.subarray(L,d)):function(W,te,ue){let me="",ge=te;for(;ge239?4:Ce>223?3:Ce>191?2:1;if(ge+He>ue)break;He===1?Ce<128&&(it=Ce):He===2?(Te=W[ge+1],(192&Te)==128&&(it=(31&Ce)<<6|63&Te,it<=127&&(it=null))):He===3?(Te=W[ge+1],Oe=W[ge+2],(192&Te)==128&&(192&Oe)==128&&(it=(15&Ce)<<12|(63&Te)<<6|63&Oe,(it<=2047||it>=55296&&it<=57343)&&(it=null))):He===4&&(Te=W[ge+1],Oe=W[ge+2],Pe=W[ge+3],(192&Te)==128&&(192&Oe)==128&&(192&Pe)==128&&(it=(15&Ce)<<18|(63&Te)<<12|(63&Oe)<<6|63&Pe,(it<=65535||it>=1114112)&&(it=null))),it===null?(it=65533,He=1):it>65535&&(it-=65536,me+=String.fromCharCode(it>>>10&1023|55296),it=56320|1023&it),me+=String.fromCharCode(it),ge+=He}return me}(this.buf,L,d)}readBytes(){let d=this.readVarint()+this.pos,L=this.buf.subarray(this.pos,d);return this.pos=d,L}readPackedVarint(d=[],L){let W=this.readPackedEnd();for(;this.pos127;);else if(L===2)this.pos=this.readVarint()+this.pos;else if(L===5)this.pos+=4;else{if(L!==1)throw new Error(`Unimplemented type: ${L}`);this.pos+=8}}writeTag(d,L){this.writeVarint(d<<3|L)}realloc(d){let L=this.length||16;for(;L268435455||d<0?function(L,W){let te,ue;if(L>=0?(te=L%4294967296|0,ue=L/4294967296|0):(te=~(-L%4294967296),ue=~(-L/4294967296),4294967295^te?te=te+1|0:(te=0,ue=ue+1|0)),L>=18446744073709552e3||L<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");W.realloc(10),function(me,ge,Ce){Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,Ce.buf[Ce.pos]=127&(me>>>=7)}(te,0,W),function(me,ge){let Ce=(7&me)<<4;ge.buf[ge.pos++]|=Ce|((me>>>=3)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me)))))}(ue,W)}(d,this):(this.realloc(4),this.buf[this.pos++]=127&d|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=d>>>7&127))))}writeSVarint(d){this.writeVarint(d<0?2*-d-1:2*d)}writeBoolean(d){this.writeVarint(+d)}writeString(d){d=String(d),this.realloc(4*d.length),this.pos++;let L=this.pos;this.pos=function(te,ue,me){for(let ge,Ce,Te=0;Te55295&&ge<57344){if(!Ce){ge>56319||Te+1===ue.length?(te[me++]=239,te[me++]=191,te[me++]=189):Ce=ge;continue}if(ge<56320){te[me++]=239,te[me++]=191,te[me++]=189,Ce=ge;continue}ge=Ce-55296<<10|ge-56320|65536,Ce=null}else Ce&&(te[me++]=239,te[me++]=191,te[me++]=189,Ce=null);ge<128?te[me++]=ge:(ge<2048?te[me++]=ge>>6|192:(ge<65536?te[me++]=ge>>12|224:(te[me++]=ge>>18|240,te[me++]=ge>>12&63|128),te[me++]=ge>>6&63|128),te[me++]=63&ge|128)}return me}(this.buf,d,this.pos);let W=this.pos-L;W>=128&&K4(L,W,this),this.pos=L-1,this.writeVarint(W),this.pos+=W}writeFloat(d){this.realloc(4),this.dataView.setFloat32(this.pos,d,!0),this.pos+=4}writeDouble(d){this.realloc(8),this.dataView.setFloat64(this.pos,d,!0),this.pos+=8}writeBytes(d){let L=d.length;this.writeVarint(L),this.realloc(L);for(let W=0;W=128&&K4(W,te,this),this.pos=W-1,this.writeVarint(te),this.pos+=te}writeMessage(d,L,W){this.writeTag(d,2),this.writeRawMessage(L,W)}writePackedVarint(d,L){L.length&&this.writeMessage(d,ZW,L)}writePackedSVarint(d,L){L.length&&this.writeMessage(d,$W,L)}writePackedBoolean(d,L){L.length&&this.writeMessage(d,QW,L)}writePackedFloat(d,L){L.length&&this.writeMessage(d,KW,L)}writePackedDouble(d,L){L.length&&this.writeMessage(d,JW,L)}writePackedFixed32(d,L){L.length&&this.writeMessage(d,eY,L)}writePackedSFixed32(d,L){L.length&&this.writeMessage(d,tY,L)}writePackedFixed64(d,L){L.length&&this.writeMessage(d,rY,L)}writePackedSFixed64(d,L){L.length&&this.writeMessage(d,aY,L)}writeBytesField(d,L){this.writeTag(d,2),this.writeBytes(L)}writeFixed32Field(d,L){this.writeTag(d,5),this.writeFixed32(L)}writeSFixed32Field(d,L){this.writeTag(d,5),this.writeSFixed32(L)}writeFixed64Field(d,L){this.writeTag(d,1),this.writeFixed64(L)}writeSFixed64Field(d,L){this.writeTag(d,1),this.writeSFixed64(L)}writeVarintField(d,L){this.writeTag(d,0),this.writeVarint(L)}writeSVarintField(d,L){this.writeTag(d,0),this.writeSVarint(L)}writeStringField(d,L){this.writeTag(d,2),this.writeString(L)}writeFloatField(d,L){this.writeTag(d,5),this.writeFloat(L)}writeDoubleField(d,L){this.writeTag(d,1),this.writeDouble(L)}writeBooleanField(d,L){this.writeVarintField(d,+L)}}function A0(R,d,L){return L?4294967296*d+(R>>>0):4294967296*(d>>>0)+(R>>>0)}function K4(R,d,L){let W=d<=16383?1:d<=2097151?2:d<=268435455?3:Math.floor(Math.log(d)/(7*Math.LN2));L.realloc(W);for(let te=L.pos-1;te>=R;te--)L.buf[te+W]=L.buf[te]}function ZW(R,d){for(let L=0;Lge.h-me.h);let W=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(d/.95)),L),h:1/0}],te=0,ue=0;for(let me of R)for(let ge=W.length-1;ge>=0;ge--){let Ce=W[ge];if(!(me.w>Ce.w||me.h>Ce.h)){if(me.x=Ce.x,me.y=Ce.y,ue=Math.max(ue,me.y+me.h),te=Math.max(te,me.x+me.w),me.w===Ce.w&&me.h===Ce.h){let Te=W.pop();Te&&geEt.toCodeUnitIndex(_a));let $r=br(Et.toString(),er);for(let _a of $r){let Ca=[..._a].map(()=>0);Qt.push(new T0(_a,Et.sections,Ca))}}else if(sr){Qt=[],er=er.map(nn=>Et.toCodeUnitIndex(nn));let $r=0,_a=[];for(let nn of Et.text)_a.push(...Array(nn.length).fill(Et.sectionIndex[$r])),$r++;let Ca=sr(Et.text,_a,er);for(let nn of Ca){let qa=[],bn="";for(let Fn of nn[0])qa.push(nn[1][bn.length]),bn+=Fn;Qt.push(new T0(nn[0],Et.sections,qa))}}else Qt=function($r,_a){let Ca=[],nn=0;for(let qa of _a)Ca.push($r.substring(nn,qa)),nn=qa;return nn<$r.length()&&Ca.push($r.substring(nn,$r.length())),Ca}(Et,er);let Mr=[],qr={positionedLines:Mr,text:Et.toString(),top:Oe[1],bottom:Oe[1],left:Oe[0],right:Oe[0],writingMode:Pe,iconsInText:!1,verticalizable:!1};return function($r,_a,Ca,nn,qa,bn,Fn,gn,Va,Hn,ni,Wn){let si=0,po=0,cs=0,Ds=0,Xs=gn==="right"?1:gn==="left"?0:.5,Mf=Rc/Wn,vu=0;for(let Hl of qa){Hl.trim();let rf=Hl.getMaxScale(),Xf={positionedGlyphs:[],lineOffset:0};$r.positionedLines[vu]=Xf;let Zf=Xf.positionedGlyphs,Th=0;if(!Hl.length()){po+=bn,++vu;continue}let Sf=sY(nn,Hl,Mf),Ah=0;for(let Fc of Hl.text){let nu=Hl.getSection(Ah),lc=Fc.codePointAt(0),mu=lY(Va,ni,lc),zc={glyph:lc,imageName:null,x:si,y:po+-17,vertical:mu,scale:1,fontStack:"",sectionIndex:Hl.getSectionIndex(Ah),metrics:null,rect:null},Zd;if("fontStack"in nu){if(Zd=uY(nu,lc,mu,Sf,_a,Ca),!Zd)continue;zc.fontStack=nu.fontStack}else{if($r.iconsInText=!0,nu.scale*=Mf,Zd=cY(nu,mu,rf,Sf,nn),!Zd)continue;Th=Math.max(Th,Zd.imageOffset),zc.imageName=nu.imageName}let{rect:dd,metrics:Bg,baselineOffset:Ep}=Zd;zc.y+=Ep,zc.scale=nu.scale,zc.metrics=Bg,zc.rect=dd,Zf.push(zc),mu?($r.verticalizable=!0,si+=("imageName"in nu?Bg.advance:Rc)*nu.scale+Hn):si+=Bg.advance*nu.scale+Hn,Ah++}Zf.length!==0&&(cs=Math.max(si-Hn,cs),fY(Zf,0,Zf.length-1,Xs)),si=0,Xf.lineOffset=Math.max(Th,(rf-1)*Rc);let Hh=bn*rf+Th;po+=Hh,Ds=Math.max(Hh,Ds),++vu}let{horizontalAlign:yc,verticalAlign:Dc}=A3(Fn);(function(Hl,rf,Xf,Zf,Th,Sf,Ah,Hh,Fc){let nu=(rf-Xf)*Th,lc=0;lc=Sf!==Ah?-Hh*Zf- -17:-Zf*Fc*Ah+.5*Ah;for(let mu of Hl)for(let zc of mu.positionedGlyphs)zc.x+=nu,zc.y+=lc})($r.positionedLines,Xs,yc,Dc,cs,Ds,bn,po,qa.length),$r.top+=-Dc*po,$r.bottom=$r.top+po,$r.left+=-yc*cs,$r.right=$r.left+cs}(qr,d,L,W,Qt,me,ge,Ce,Pe,Te,it,bt),!function($r){for(let _a of $r)if(_a.positionedGlyphs.length!==0)return!1;return!0}(Mr)&&qr}function A3(R){let d=.5,L=.5;switch(R){case"right":case"top-right":case"bottom-right":d=1;break;case"left":case"top-left":case"bottom-left":d=0}switch(R){case"bottom":case"bottom-right":case"bottom-left":L=1;break;case"top":case"top-right":case"top-left":L=0}return{horizontalAlign:d,verticalAlign:L}}function sY(R,d,L){let W=d.getMaxScale()*Rc,{maxImageWidth:te,maxImageHeight:ue}=d.getMaxImageSize(R),me=Math.max(W,ue*L);return{verticalLineContentWidth:Math.max(W,te*L),horizontalLineContentHeight:me}}function eS(R){switch(R){case"top":return 0;case"center":return .5;default:return 1}}function lY(R,d,L){return!(R===l.ax.horizontal||!d&&!Wt(L)||d&&(Pr(L)||(W=L,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(W)))));var W}function uY(R,d,L,W,te,ue){let me=ue[R.fontStack],ge=function(Te,Oe,Pe,it){if(Te?.rect)return Te;let He=Oe[Pe.fontStack],bt=He?.[it];return bt?{rect:null,metrics:bt.metrics}:null}(me?.[d],te,R,d);if(ge===null)return null;let Ce;if(L)Ce=W.verticalLineContentWidth-R.scale*Rc;else{let Te=eS(R.verticalAlign);Ce=(W.horizontalLineContentHeight-R.scale*Rc)*Te}return{rect:ge.rect,metrics:ge.metrics,baselineOffset:Ce}}function cY(R,d,L,W,te){let ue=te[R.imageName];if(!ue)return null;let me=ue.paddedRect,ge=ue.displaySize,Ce={width:ge[0],height:ge[1],left:1,top:-3,advance:d?ge[1]:ge[0]},Te;if(d)Te=W.verticalLineContentWidth-ge[1]*R.scale;else{let Oe=eS(R.verticalAlign);Te=(W.horizontalLineContentHeight-ge[1]*R.scale)*Oe}return{rect:me,metrics:Ce,baselineOffset:Te,imageOffset:(d?ge[0]:ge[1])*R.scale-Rc*L}}function fY(R,d,L,W){if(W===0)return;let te=R[L],ue=(R[L].x+te.metrics.advance*te.scale)*W;for(let me=d;me<=L;me++)R[me].x-=ue}function hY(R,d,L){let{horizontalAlign:W,verticalAlign:te}=A3(L),ue=d[0]-R.displaySize[0]*W,me=d[1]-R.displaySize[1]*te;return{image:R,top:me,bottom:me+R.displaySize[1],left:ue,right:ue+R.displaySize[0]}}function tS(R){var d,L;let W=R.left,te=R.top,ue=R.right-W,me=R.bottom-te,ge=(d=R.image.textFitWidth)!==null&&d!==void 0?d:"stretchOrShrink",Ce=(L=R.image.textFitHeight)!==null&&L!==void 0?L:"stretchOrShrink",Te=(R.image.content[2]-R.image.content[0])/(R.image.content[3]-R.image.content[1]);if(Ce==="proportional"){if(ge==="stretchOnly"&&ue/meTe){let Oe=Math.ceil(ue/Te);te*=Oe/me,me=Oe}return{x1:W,y1:te,x2:W+ue,y2:te+me}}function rS(R,d,L,W,te,ue){let me=R.image,ge;if(me.content){let Qt=me.content,er=me.pixelRatio||1;ge=[Qt[0]/er,Qt[1]/er,me.displaySize[0]-Qt[2]/er,me.displaySize[1]-Qt[3]/er]}let Ce=d.left*ue,Te=d.right*ue,Oe,Pe,it,He;L==="width"||L==="both"?(He=te[0]+Ce-W[3],Pe=te[0]+Te+W[1]):(He=te[0]+(Ce+Te-me.displaySize[0])/2,Pe=He+me.displaySize[0]);let bt=d.top*ue,Et=d.bottom*ue;return L==="height"||L==="both"?(Oe=te[1]+bt-W[0],it=te[1]+Et+W[2]):(Oe=te[1]+(bt+Et-me.displaySize[1])/2,it=Oe+me.displaySize[1]),{image:me,top:Oe,right:Pe,bottom:it,left:He,collisionPadding:ge}}fi("ImagePosition",T3),fi("ImageAtlas",Q4),l.ax=void 0,(xp=l.ax||(l.ax={}))[xp.none=0]="none",xp[xp.horizontal=1]="horizontal",xp[xp.vertical=2]="vertical",xp[xp.horizontalOnly=3]="horizontalOnly";let Yd=128,bp=32640;function aS(R,d){let{expression:L}=d;if(L.kind==="constant")return{kind:"constant",layoutSize:L.evaluate(new oi(R+1))};if(L.kind==="source")return{kind:"source"};{let{zoomStops:W,interpolationType:te}=L,ue=0;for(;ueme.id),this.index=d.index,this.pixelRatio=d.pixelRatio,this.sourceLayerIndex=d.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let L=this.layers[0]._unevaluatedLayout._values;this.textSizeData=aS(this.zoom,L["text-size"]),this.iconSizeData=aS(this.zoom,L["icon-size"]);let W=this.layers[0].layout,te=W.get("symbol-sort-key"),ue=W.get("symbol-z-order");this.canOverlap=M3(W,"text-overlap","text-allow-overlap")!=="never"||M3(W,"icon-overlap","icon-allow-overlap")!=="never"||W.get("text-ignore-placement")||W.get("icon-ignore-placement"),this.sortFeaturesByKey=ue!=="viewport-y"&&!te.isConstant(),this.sortFeaturesByY=(ue==="viewport-y"||ue==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,W.get("symbol-placement")==="point"&&(this.writingModes=W.get("text-writing-mode").map(me=>l.ax[me])),this.stateDependentLayerIds=this.layers.filter(me=>me.isStateDependent()).map(me=>me.id),this.sourceID=d.sourceID}createArrays(){this.text=new E3(new mo(this.layers,this.zoom,d=>d.startsWith("text"))),this.icon=new E3(new mo(this.layers,this.zoom,d=>d.startsWith("icon"))),this.glyphOffsetArray=new ut,this.lineVertexArray=new ft,this.symbolInstances=new Ze,this.textAnchorOffsets=new Gt}calculateGlyphDependencies(d,L,W,te,ue){for(let me of d)if(L[me.codePointAt(0)]=!0,(W||te)&&ue){let ge=Rg[me];ge&&(L[ge.codePointAt(0)]=!0)}}populate(d,L,W){var te;let ue=this.layers[0],me=ue.layout,ge=me.get("text-font"),Ce=me.get("text-field"),Te=me.get("icon-image"),Oe=(Ce.value.kind!=="constant"||Ce.value.value instanceof Di&&!Ce.value.value.isEmpty()||Ce.value.value.toString().length>0)&&(ge.value.kind!=="constant"||ge.value.value.length>0),Pe=Te.value.kind!=="constant"||!!Te.value.value||Object.keys(Te.parameters).length>0,it=me.get("symbol-sort-key");if(this.features=[],!Oe&&!Pe)return;let He=L.iconDependencies,bt=L.glyphDependencies,Et=L.availableImages,Qt=new oi(this.zoom);for(let{feature:er,id:br,index:sr,sourceLayerIndex:Mr}of d){let qr=ue._featureFilter.needGeometry,$r=fo(er,qr);if(!ue._featureFilter.filter(Qt,$r,W))continue;let _a,Ca;if(qr||($r.geometry=ql(er)),Oe){let qa=ue.getValueAndResolveTokens("text-field",$r,W,Et),bn=Di.factory(qa);this.hasRTLText||(this.hasRTLText=pY(bn)),(!this.hasRTLText||Si.getRTLTextPluginStatus()==="unavailable"||this.hasRTLText&&Si.isParsed())&&(_a=HW(bn,ue,$r))}if(Pe){let qa=ue.getValueAndResolveTokens("icon-image",$r,W,Et);Ca=qa instanceof qi?qa:qi.fromString(qa)}if(!_a&&!Ca)continue;let nn=this.sortFeaturesByKey?it.evaluate($r,{},W):void 0;if(this.features.push({id:br,text:_a,icon:Ca,index:sr,sourceLayerIndex:Mr,geometry:$r.geometry,properties:er.properties,type:Eg.types[er.type],sortKey:nn}),Ca&&(He[Ca.name]=!0),_a){let qa=ge.evaluate($r,{},W).join(","),bn=me.get("text-rotation-alignment")!=="viewport"&&me.get("symbol-placement")!=="point";this.allowVerticalPlacement=(te=this.writingModes)===null||te===void 0?void 0:te.includes(l.ax.vertical);for(let Fn of _a.sections)if(Fn.image)He[Fn.image.name]=!0;else{let gn=Br(_a.toString()),Va=Fn.fontStack||qa;bt[Va]||(bt[Va]={}),this.calculateGlyphDependencies(Fn.text,bt[Va],bn,this.allowVerticalPlacement,gn)}}}me.get("symbol-placement")==="line"&&(this.features=function(er){let br={},sr={},Mr=[],qr=0;function $r(qa){Mr.push(er[qa]),qr++}function _a(qa,bn,Fn){let gn=sr[qa];return delete sr[qa],sr[bn]=gn,Mr[gn].geometry[0].pop(),Mr[gn].geometry[0]=Mr[gn].geometry[0].concat(Fn[0]),gn}function Ca(qa,bn,Fn){let gn=br[bn];return delete br[bn],br[qa]=gn,Mr[gn].geometry[0].shift(),Mr[gn].geometry[0]=Fn[0].concat(Mr[gn].geometry[0]),gn}function nn(qa,bn,Fn){let gn=Fn?bn[0][bn[0].length-1]:bn[0][0];return`${qa}:${gn.x}:${gn.y}`}for(let qa=0;qaqa.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((er,br)=>er.sortKey-br.sortKey)}update(d,L,W){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:W}),this.icon.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:W}))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(d){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(d),this.iconCollisionBox.upload(d)),this.text.upload(d,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(d,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(d,L){let W=this.lineVertexArray.length;if(d.segment!==void 0){let te=d.dist(L[d.segment+1]),ue=d.dist(L[d.segment]),me={};for(let ge=d.segment+1;ge=0;ge--)me[ge]={x:L[ge].x,y:L[ge].y,tileUnitDistanceFromAnchor:ue},ge>0&&(ue+=L[ge-1].dist(L[ge]));for(let ge=0;ge0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(d,L){let W=d.placedSymbolArray.get(L),te=W.vertexStartIndex+4*W.numGlyphs;for(let ue=W.vertexStartIndex;uete[ge]-te[Ce]||ue[Ce]-ue[ge]),me}addToSortKeyRanges(d,L){let W=this.sortKeyRanges[this.sortKeyRanges.length-1];W?.sortKey===L?W.symbolInstanceEnd=d+1:this.sortKeyRanges.push({sortKey:L,symbolInstanceStart:d,symbolInstanceEnd:d+1})}sortFeatures(d){if(this.sortFeaturesByY&&this.sortedAngle!==d&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(d),this.sortedAngle=d,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let L of this.symbolInstanceIndexes){let W=this.symbolInstances.get(L);this.featureSortOrder.push(W.featureIndex);let te=[W.rightJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.leftJustifiedTextSymbolIndex];for(let ue=0;ue=0&&te.indexOf(me)===ue&&this.addIndicesForPlacedSymbol(this.text,me)}W.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,W.verticalPlacedTextSymbolIndex),W.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.placedIconSymbolIndex),W.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let nS,iS;fi("SymbolBucket",M0,{omit:["layers","collisionBoxArray","features","compareText"]}),M0.MAX_GLYPHS=65535,M0.addDynamicAttributes=S3;var C3={get paint(){return iS=iS||new Ps({"icon-opacity":new wi(ht.paint_symbol["icon-opacity"]),"icon-color":new wi(ht.paint_symbol["icon-color"]),"icon-halo-color":new wi(ht.paint_symbol["icon-halo-color"]),"icon-halo-width":new wi(ht.paint_symbol["icon-halo-width"]),"icon-halo-blur":new wi(ht.paint_symbol["icon-halo-blur"]),"icon-translate":new hi(ht.paint_symbol["icon-translate"]),"icon-translate-anchor":new hi(ht.paint_symbol["icon-translate-anchor"]),"text-opacity":new wi(ht.paint_symbol["text-opacity"]),"text-color":new wi(ht.paint_symbol["text-color"],{runtimeType:cr,getOverride:R=>R.textColor,hasOverride:R=>!!R.textColor}),"text-halo-color":new wi(ht.paint_symbol["text-halo-color"]),"text-halo-width":new wi(ht.paint_symbol["text-halo-width"]),"text-halo-blur":new wi(ht.paint_symbol["text-halo-blur"]),"text-translate":new hi(ht.paint_symbol["text-translate"]),"text-translate-anchor":new hi(ht.paint_symbol["text-translate-anchor"])})},get layout(){return nS=nS||new Ps({"symbol-placement":new hi(ht.layout_symbol["symbol-placement"]),"symbol-spacing":new hi(ht.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new hi(ht.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new wi(ht.layout_symbol["symbol-sort-key"]),"symbol-z-order":new hi(ht.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new hi(ht.layout_symbol["icon-allow-overlap"]),"icon-overlap":new hi(ht.layout_symbol["icon-overlap"]),"icon-ignore-placement":new hi(ht.layout_symbol["icon-ignore-placement"]),"icon-optional":new hi(ht.layout_symbol["icon-optional"]),"icon-rotation-alignment":new hi(ht.layout_symbol["icon-rotation-alignment"]),"icon-size":new wi(ht.layout_symbol["icon-size"]),"icon-text-fit":new hi(ht.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new hi(ht.layout_symbol["icon-text-fit-padding"]),"icon-image":new wi(ht.layout_symbol["icon-image"]),"icon-rotate":new wi(ht.layout_symbol["icon-rotate"]),"icon-padding":new wi(ht.layout_symbol["icon-padding"]),"icon-keep-upright":new hi(ht.layout_symbol["icon-keep-upright"]),"icon-offset":new wi(ht.layout_symbol["icon-offset"]),"icon-anchor":new wi(ht.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new hi(ht.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new hi(ht.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new hi(ht.layout_symbol["text-rotation-alignment"]),"text-field":new wi(ht.layout_symbol["text-field"]),"text-font":new wi(ht.layout_symbol["text-font"]),"text-size":new wi(ht.layout_symbol["text-size"]),"text-max-width":new wi(ht.layout_symbol["text-max-width"]),"text-line-height":new hi(ht.layout_symbol["text-line-height"]),"text-letter-spacing":new wi(ht.layout_symbol["text-letter-spacing"]),"text-justify":new wi(ht.layout_symbol["text-justify"]),"text-radial-offset":new wi(ht.layout_symbol["text-radial-offset"]),"text-variable-anchor":new hi(ht.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new wi(ht.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new wi(ht.layout_symbol["text-anchor"]),"text-max-angle":new hi(ht.layout_symbol["text-max-angle"]),"text-writing-mode":new hi(ht.layout_symbol["text-writing-mode"]),"text-rotate":new wi(ht.layout_symbol["text-rotate"]),"text-padding":new hi(ht.layout_symbol["text-padding"]),"text-keep-upright":new hi(ht.layout_symbol["text-keep-upright"]),"text-transform":new wi(ht.layout_symbol["text-transform"]),"text-offset":new wi(ht.layout_symbol["text-offset"]),"text-allow-overlap":new hi(ht.layout_symbol["text-allow-overlap"]),"text-overlap":new hi(ht.layout_symbol["text-overlap"]),"text-ignore-placement":new hi(ht.layout_symbol["text-ignore-placement"]),"text-optional":new hi(ht.layout_symbol["text-optional"])})}};class oS{constructor(d){if(d.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=d.property.overrides?d.property.overrides.runtimeType:Yt,this.defaultValue=d}evaluate(d){if(d.formattedSection){let L=this.defaultValue.property.overrides;if(L?.hasOverride(d.formattedSection))return L.getOverride(d.formattedSection)}return d.feature&&d.featureState?this.defaultValue.evaluate(d.feature,d.featureState):this.defaultValue.property.specification.default}eachChild(d){this.defaultValue.isConstant()||d(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}fi("FormatSectionOverride",oS,{omit:["defaultValue"]});class wy extends ll{constructor(d,L){super(d,C3,L)}recalculate(d,L){if(super.recalculate(d,L),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let W=this.layout.get("text-writing-mode");if(W){let te=[];for(let ue of W)te.includes(ue)||te.push(ue);this.layout._values["text-writing-mode"]=te}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(d,L,W,te){let ue=this.layout.get(d).evaluate(L,{},W,te),me=this._unevaluatedLayout._values[d];return me.isDataDriven()||kc(me.value)||!ue?ue:function(ge,Ce){return Ce.replace(/{([^{}]+)}/g,(Te,Oe)=>ge&&Oe in ge?String(ge[Oe]):"")}(L.properties,ue)}createBucket(d){return new M0(d)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let d of C3.paint.overridableProperties){if(!wy.hasPaintOverride(this.layout,d))continue;let L=this.paint.get(d),W=new oS(L),te=new kl(W,L.property.specification),ue=null;ue=L.value.kind==="constant"||L.value.kind==="source"?new Lc("source",te):new vc("composite",te,L.value.zoomStops),this.paint._values[d]=new Hs(L.property,ue,L.parameters)}}_handleOverridablePaintPropertyUpdate(d,L,W){return!(!this.layout||L.isDataDriven()||W.isDataDriven())&&wy.hasPaintOverride(this.layout,d)}static hasPaintOverride(d,L){let W=d.get("text-field"),te=C3.paint.properties[L],ue=!1,me=ge=>{var Ce;for(let Te of ge)if(!((Ce=te.overrides)===null||Ce===void 0)&&Ce.hasOverride(Te))return void(ue=!0)};if(W.value.kind==="constant"&&W.value.value instanceof Di)me(W.value.value.sections);else if(W.value.kind==="source"||W.value.kind==="composite"){let ge=Te=>{ue||(Te instanceof Mi&&qn(Te.value)===Pa?me(Te.value.sections):Te instanceof vs?me(Te.sections):Te.eachChild(ge))},Ce=W.value;Ce._styleExpression&&ge(Ce._styleExpression.expression)}return ue}}let sS;var vY={get paint(){return sS=sS||new Ps({"background-color":new hi(ht.paint_background["background-color"]),"background-pattern":new sc(ht.paint_background["background-pattern"]),"background-opacity":new hi(ht.paint_background["background-opacity"])})}};class mY extends ll{constructor(d,L){super(d,vY,L)}}class gY extends ll{constructor(d,L){super(d,{},L),this.onAdd=W=>{this.implementation.onAdd&&this.implementation.onAdd(W,W.painter.context.gl)},this.onRemove=W=>{this.implementation.onRemove&&this.implementation.onRemove(W,W.painter.context.gl)},this.implementation=d}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class yY{constructor(d){this._methodToThrottle=d,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var d;this._triggered||(this._triggered=!0,(d=this._channel)===null||d===void 0||d.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let _Y={once:!0},L3=63710088e-1;class wp{constructor(d,L){if(isNaN(d)||isNaN(L))throw new Error(`Invalid LngLat object: (${d}, ${L})`);if(this.lng=+d,this.lat=+L,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new wp(G(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(d){let L=Math.PI/180,W=this.lat*L,te=d.lat*L,ue=Math.sin(W)*Math.sin(te)+Math.cos(W)*Math.cos(te)*Math.cos((d.lng-this.lng)*L);return L3*Math.acos(Math.min(ue,1))}static convert(d){if(d instanceof wp)return d;if(Array.isArray(d)&&(d.length===2||d.length===3))return new wp(Number(d[0]),Number(d[1]));if(!Array.isArray(d)&&typeof d=="object"&&d!==null)return new wp(Number("lng"in d?d.lng:d.lon),Number(d.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let lS=2*Math.PI*L3;function uS(R){return lS*Math.cos(R*Math.PI/180)}function cS(R){return(180+R)/360}function fS(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function hS(R,d){return R/uS(d)}function dS(R){return 360*R-180}function Ty(R){return 360/Math.PI*Math.atan(Math.exp((180-360*R)*Math.PI/180))-90}function pS(R,d){return R*uS(Ty(d))}class Ig{constructor(d,L,W=0){this.x=+d,this.y=+L,this.z=+W}static fromLngLat(d,L=0){let W=wp.convert(d);return new Ig(cS(W.lng),fS(W.lat),hS(L,W.lat))}toLngLat(){return new wp(dS(this.x),Ty(this.y))}toAltitude(){return pS(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/lS*(d=Ty(this.y),1/Math.cos(d*Math.PI/180));var d}}function vS(R,d,L){var W=2*Math.PI*6378137/256/Math.pow(2,L);return[R*W-2*Math.PI*6378137/2,d*W-2*Math.PI*6378137/2]}class P3{constructor(d,L,W){if(!function(te,ue,me){return!(te<0||te>25||me<0||me>=Math.pow(2,te)||ue<0||ue>=Math.pow(2,te))}(d,L,W))throw new Error(`x=${L}, y=${W}, z=${d} outside of bounds. 0<=x<${Math.pow(2,d)}, 0<=y<${Math.pow(2,d)} 0<=z<=25 `);this.z=d,this.x=L,this.y=W,this.key=S0(0,d,d,L,W)}equals(d){return this.z===d.z&&this.x===d.x&&this.y===d.y}url(d,L,W){let te=(me=this.y,ge=this.z,Ce=vS(256*(ue=this.x),256*(me=Math.pow(2,ge)-me-1),ge),Te=vS(256*(ue+1),256*(me+1),ge),Ce[0]+","+Ce[1]+","+Te[0]+","+Te[1]);var ue,me,ge,Ce,Te;let Oe=function(Pe,it,He){let bt="";for(let Et=Pe;Et>0;Et--){let Qt=1<1?"@2x":"").replace(/{quadkey}/g,Oe).replace(/{bbox-epsg-3857}/g,te)}isChildOf(d){let L=this.z-d.z;return L>0&&d.x===this.x>>L&&d.y===this.y>>L}getTilePoint(d){let L=Math.pow(2,this.z);return new t((d.x*L-this.x)*F,(d.y*L-this.y)*F)}toString(){return`${this.z}/${this.x}/${this.y}`}}class mS{constructor(d,L){this.wrap=d,this.canonical=L,this.key=S0(d,L.z,L.z,L.x,L.y)}}class Ph{constructor(d,L,W,te,ue){if(this.terrainRttPosMatrix32f=null,d= z; overscaledZ = ${d}; z = ${W}`);this.overscaledZ=d,this.wrap=L,this.canonical=new P3(W,+te,+ue),this.key=S0(L,d,W,te,ue)}clone(){return new Ph(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(d){return this.overscaledZ===d.overscaledZ&&this.wrap===d.wrap&&this.canonical.equals(d.canonical)}scaledTo(d){if(d>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${d}; overscaledZ = ${this.overscaledZ}`);let L=this.canonical.z-d;return d>this.canonical.z?new Ph(d,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ph(d,this.wrap,d,this.canonical.x>>L,this.canonical.y>>L)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(d,L){if(d>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${d}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-d;return d>this.canonical.z?S0(this.wrap*+L,d,this.canonical.z,this.canonical.x,this.canonical.y):S0(this.wrap*+L,d,d,this.canonical.x>>W,this.canonical.y>>W)}isChildOf(d){if(d.wrap!==this.wrap||this.overscaledZ-d.overscaledZ<=0)return!1;if(d.overscaledZ===0)return this.overscaledZ>0;let L=this.canonical.z-d.canonical.z;return!(L<0)&&d.canonical.x===this.canonical.x>>L&&d.canonical.y===this.canonical.y>>L}children(d){if(this.overscaledZ>=d)return[new Ph(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let L=this.canonical.z+1,W=2*this.canonical.x,te=2*this.canonical.y;return[new Ph(L,this.wrap,L,W,te),new Ph(L,this.wrap,L,W+1,te),new Ph(L,this.wrap,L,W,te+1),new Ph(L,this.wrap,L,W+1,te+1)]}isLessThan(d){return this.wrapd.wrap)&&(this.overscaledZd.overscaledZ)&&(this.canonical.xd.canonical.x)&&this.canonical.y=0&&d=0&&L=Te)return null;let Pe=this.canonical.x+te,it=this.wrap;return Pe<0?(it-=Math.ceil(-Pe/Te),Pe=(Pe%Te+Te)%Te):Pe>=Te&&(it+=Math.floor(Pe/Te),Pe%=Te),{tileID:new Ph(this.overscaledZ,it,Ce,Pe,Oe),x:me,y:ge}}}function S0(R,d,L,W,te){(R*=2)<0&&(R=-1*R-1);let ue=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(d){return this.expandBy(-d)}map(d){let L=new Ev;return L.extend(d(new t(this.minX,this.minY))),L.extend(d(new t(this.maxX,this.minY))),L.extend(d(new t(this.minX,this.maxY))),L.extend(d(new t(this.maxX,this.maxY))),L}static fromPoints(d){let L=new Ev;for(let W of d)L.extend(W);return L}contains(d){return d.x>=this.minX&&d.x<=this.maxX&&d.y>=this.minY&&d.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(d){return!this.empty()&&!d.empty()&&d.minX>=this.minX&&d.maxX<=this.maxX&&d.minY>=this.minY&&d.maxY<=this.maxY}intersects(d){return!this.empty()&&!d.empty()&&d.minX<=this.maxX&&d.maxX>=this.minX&&d.minY<=this.maxY&&d.maxY>=this.minY}}class gS{constructor(d){this._stringToNumber={},this._numberToString=[];for(let L=0;L=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${d} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[d]}}class yS{constructor(d,L,W,te,ue){this.type="Feature",this._vectorTileFeature=d,this._x=W,this._y=te,this._z=L,this.properties=d.properties,this.id=ue}projectPoint(d,L,W,te){return[360*(d.x+L)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(d.y+W)/te)*Math.PI))-90]}projectLine(d,L,W,te){return d.map(ue=>this.projectPoint(ue,L,W,te))}get geometry(){if(this._geometry)return this._geometry;let d=this._vectorTileFeature,L=d.extent*Math.pow(2,this._z),W=d.extent*this._x,te=d.extent*this._y,ue=d.loadGeometry();switch(d.type){case 1:{let me=[];for(let Ce of ue)me.push(Ce[0]);let ge=this.projectLine(me,W,te,L);this._geometry=me.length===1?{type:"Point",coordinates:ge[0]}:{type:"MultiPoint",coordinates:ge};break}case 2:{let me=ue.map(ge=>this.projectLine(ge,W,te,L));this._geometry=me.length===1?{type:"LineString",coordinates:me[0]}:{type:"MultiLineString",coordinates:me};break}case 3:{let me=b4(ue),ge=[];for(let Ce of me)ge.push(Ce.map(Te=>this.projectLine(Te,W,te,L)));this._geometry=ge.length===1?{type:"Polygon",coordinates:ge[0]}:{type:"MultiPolygon",coordinates:ge};break}default:throw new Error(`unknown feature type: ${d.type}`)}return this._geometry}set geometry(d){this._geometry=d}toJSON(){let d={geometry:this.geometry};for(let L in this)L!=="_geometry"&&L!=="_vectorTileFeature"&&L!=="_x"&&L!=="_y"&&L!=="_z"&&(d[L]=this[L]);return d}}class E0{constructor(d,L,W){this._name=d,this.dataBuffer=L,typeof W=="number"?this._size=W:(this.nullabilityBuffer=W,this._size=W.size())}getValue(d){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(d)?null:this.getValueFromBuffer(d)}has(d){var L;return((L=this.nullabilityBuffer)==null?void 0:L.get(d))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class Ay extends E0{}class R3 extends Ay{getValueFromBuffer(d){return this.dataBuffer[d]}}class I3 extends Ay{getValueFromBuffer(d){return this.dataBuffer[d]}}class _S extends E0{constructor(d,L,W,te){super(d,L,te),this.delta=W}}class D3 extends _S{constructor(d,L,W,te){super(d,Int32Array.of(L),W,te)}getValueFromBuffer(d){return this.dataBuffer[0]+d*this.delta}}class F3 extends E0{constructor(d,L,W,te){super(d,te?Int32Array.of(L):Uint32Array.of(L),W)}getValueFromBuffer(d){return this.dataBuffer[0]}}class xY{constructor(d,L,W,te,ue=4096){this._name=d,this._geometryVector=L,this._idVector=W,this._propertyVectors=te,this._extent=ue}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(d){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map(L=>[L.name,L]))),this.propertyVectorsMap.get(d)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let d=[],L=this.geometryVector.getGeometries();for(let W=0;W>>32-R;let B3=z3,Xd=256;function O3(R,d){return R-R%d}function bY(R){let d=R>>>0;return((255&d)<<24|(65280&d)<<8|d>>>8&65280|d>>>24&255)>>>0}let N3=function(){if(!Number.isFinite(65536))return 65536;let R=O3(Math.floor(65536),Xd);return R===0?Xd:R}(),wY=3*N3/Xd+N3|0;function bS(){let R=new Uint8Array(wY);return{dataToBePacked:new Array(33),dataPointers:new Int32Array(33),byteContainer:R,byteContainerI32:new Int32Array(R.buffer,R.byteOffset,R.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function TY(R,d,L,W,te){switch(te){case 1:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0;ge[Te++]=it>>>0&1,ge[Te++]=it>>>1&1,ge[Te++]=it>>>2&1,ge[Te++]=it>>>3&1,ge[Te++]=it>>>4&1,ge[Te++]=it>>>5&1,ge[Te++]=it>>>6&1,ge[Te++]=it>>>7&1,ge[Te++]=it>>>8&1,ge[Te++]=it>>>9&1,ge[Te++]=it>>>10&1,ge[Te++]=it>>>11&1,ge[Te++]=it>>>12&1,ge[Te++]=it>>>13&1,ge[Te++]=it>>>14&1,ge[Te++]=it>>>15&1,ge[Te++]=it>>>16&1,ge[Te++]=it>>>17&1,ge[Te++]=it>>>18&1,ge[Te++]=it>>>19&1,ge[Te++]=it>>>20&1,ge[Te++]=it>>>21&1,ge[Te++]=it>>>22&1,ge[Te++]=it>>>23&1,ge[Te++]=it>>>24&1,ge[Te++]=it>>>25&1,ge[Te++]=it>>>26&1,ge[Te++]=it>>>27&1,ge[Te++]=it>>>28&1,ge[Te++]=it>>>29&1,ge[Te++]=it>>>30&1,ge[Te++]=it>>>31&1}})(R,d,L,W);break;case 2:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0;ge[Te++]=it>>>0&3,ge[Te++]=it>>>2&3,ge[Te++]=it>>>4&3,ge[Te++]=it>>>6&3,ge[Te++]=it>>>8&3,ge[Te++]=it>>>10&3,ge[Te++]=it>>>12&3,ge[Te++]=it>>>14&3,ge[Te++]=it>>>16&3,ge[Te++]=it>>>18&3,ge[Te++]=it>>>20&3,ge[Te++]=it>>>22&3,ge[Te++]=it>>>24&3,ge[Te++]=it>>>26&3,ge[Te++]=it>>>28&3,ge[Te++]=it>>>30&3,ge[Te++]=He>>>0&3,ge[Te++]=He>>>2&3,ge[Te++]=He>>>4&3,ge[Te++]=He>>>6&3,ge[Te++]=He>>>8&3,ge[Te++]=He>>>10&3,ge[Te++]=He>>>12&3,ge[Te++]=He>>>14&3,ge[Te++]=He>>>16&3,ge[Te++]=He>>>18&3,ge[Te++]=He>>>20&3,ge[Te++]=He>>>22&3,ge[Te++]=He>>>24&3,ge[Te++]=He>>>26&3,ge[Te++]=He>>>28&3,ge[Te++]=He>>>30&3}})(R,d,L,W);break;case 3:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0;ge[Te++]=it>>>0&7,ge[Te++]=it>>>3&7,ge[Te++]=it>>>6&7,ge[Te++]=it>>>9&7,ge[Te++]=it>>>12&7,ge[Te++]=it>>>15&7,ge[Te++]=it>>>18&7,ge[Te++]=it>>>21&7,ge[Te++]=it>>>24&7,ge[Te++]=it>>>27&7,ge[Te++]=7&(it>>>30|(1&He)<<2),ge[Te++]=He>>>1&7,ge[Te++]=He>>>4&7,ge[Te++]=He>>>7&7,ge[Te++]=He>>>10&7,ge[Te++]=He>>>13&7,ge[Te++]=He>>>16&7,ge[Te++]=He>>>19&7,ge[Te++]=He>>>22&7,ge[Te++]=He>>>25&7,ge[Te++]=He>>>28&7,ge[Te++]=7&(He>>>31|(3&bt)<<1),ge[Te++]=bt>>>2&7,ge[Te++]=bt>>>5&7,ge[Te++]=bt>>>8&7,ge[Te++]=bt>>>11&7,ge[Te++]=bt>>>14&7,ge[Te++]=bt>>>17&7,ge[Te++]=bt>>>20&7,ge[Te++]=bt>>>23&7,ge[Te++]=bt>>>26&7,ge[Te++]=bt>>>29&7}})(R,d,L,W);break;case 4:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0;ge[Te++]=it>>>0&15,ge[Te++]=it>>>4&15,ge[Te++]=it>>>8&15,ge[Te++]=it>>>12&15,ge[Te++]=it>>>16&15,ge[Te++]=it>>>20&15,ge[Te++]=it>>>24&15,ge[Te++]=it>>>28&15,ge[Te++]=He>>>0&15,ge[Te++]=He>>>4&15,ge[Te++]=He>>>8&15,ge[Te++]=He>>>12&15,ge[Te++]=He>>>16&15,ge[Te++]=He>>>20&15,ge[Te++]=He>>>24&15,ge[Te++]=He>>>28&15,ge[Te++]=bt>>>0&15,ge[Te++]=bt>>>4&15,ge[Te++]=bt>>>8&15,ge[Te++]=bt>>>12&15,ge[Te++]=bt>>>16&15,ge[Te++]=bt>>>20&15,ge[Te++]=bt>>>24&15,ge[Te++]=bt>>>28&15,ge[Te++]=Et>>>0&15,ge[Te++]=Et>>>4&15,ge[Te++]=Et>>>8&15,ge[Te++]=Et>>>12&15,ge[Te++]=Et>>>16&15,ge[Te++]=Et>>>20&15,ge[Te++]=Et>>>24&15,ge[Te++]=Et>>>28&15}})(R,d,L,W);break;case 5:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0;ge[Te++]=it>>>0&31,ge[Te++]=it>>>5&31,ge[Te++]=it>>>10&31,ge[Te++]=it>>>15&31,ge[Te++]=it>>>20&31,ge[Te++]=it>>>25&31,ge[Te++]=31&(it>>>30|(7&He)<<2),ge[Te++]=He>>>3&31,ge[Te++]=He>>>8&31,ge[Te++]=He>>>13&31,ge[Te++]=He>>>18&31,ge[Te++]=He>>>23&31,ge[Te++]=31&(He>>>28|(1&bt)<<4),ge[Te++]=bt>>>1&31,ge[Te++]=bt>>>6&31,ge[Te++]=bt>>>11&31,ge[Te++]=bt>>>16&31,ge[Te++]=bt>>>21&31,ge[Te++]=bt>>>26&31,ge[Te++]=31&(bt>>>31|(15&Et)<<1),ge[Te++]=Et>>>4&31,ge[Te++]=Et>>>9&31,ge[Te++]=Et>>>14&31,ge[Te++]=Et>>>19&31,ge[Te++]=Et>>>24&31,ge[Te++]=31&(Et>>>29|(3&Qt)<<3),ge[Te++]=Qt>>>2&31,ge[Te++]=Qt>>>7&31,ge[Te++]=Qt>>>12&31,ge[Te++]=Qt>>>17&31,ge[Te++]=Qt>>>22&31,ge[Te++]=Qt>>>27&31}})(R,d,L,W);break;case 6:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0;ge[Te++]=it>>>0&63,ge[Te++]=it>>>6&63,ge[Te++]=it>>>12&63,ge[Te++]=it>>>18&63,ge[Te++]=it>>>24&63,ge[Te++]=63&(it>>>30|(15&He)<<2),ge[Te++]=He>>>4&63,ge[Te++]=He>>>10&63,ge[Te++]=He>>>16&63,ge[Te++]=He>>>22&63,ge[Te++]=63&(He>>>28|(3&bt)<<4),ge[Te++]=bt>>>2&63,ge[Te++]=bt>>>8&63,ge[Te++]=bt>>>14&63,ge[Te++]=bt>>>20&63,ge[Te++]=bt>>>26&63,ge[Te++]=Et>>>0&63,ge[Te++]=Et>>>6&63,ge[Te++]=Et>>>12&63,ge[Te++]=Et>>>18&63,ge[Te++]=Et>>>24&63,ge[Te++]=63&(Et>>>30|(15&Qt)<<2),ge[Te++]=Qt>>>4&63,ge[Te++]=Qt>>>10&63,ge[Te++]=Qt>>>16&63,ge[Te++]=Qt>>>22&63,ge[Te++]=63&(Qt>>>28|(3&er)<<4),ge[Te++]=er>>>2&63,ge[Te++]=er>>>8&63,ge[Te++]=er>>>14&63,ge[Te++]=er>>>20&63,ge[Te++]=er>>>26&63}})(R,d,L,W);break;case 7:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0,br=ue[Oe++]>>>0;ge[Te++]=it>>>0&127,ge[Te++]=it>>>7&127,ge[Te++]=it>>>14&127,ge[Te++]=it>>>21&127,ge[Te++]=127&(it>>>28|(7&He)<<4),ge[Te++]=He>>>3&127,ge[Te++]=He>>>10&127,ge[Te++]=He>>>17&127,ge[Te++]=He>>>24&127,ge[Te++]=127&(He>>>31|(63&bt)<<1),ge[Te++]=bt>>>6&127,ge[Te++]=bt>>>13&127,ge[Te++]=bt>>>20&127,ge[Te++]=127&(bt>>>27|(3&Et)<<5),ge[Te++]=Et>>>2&127,ge[Te++]=Et>>>9&127,ge[Te++]=Et>>>16&127,ge[Te++]=Et>>>23&127,ge[Te++]=127&(Et>>>30|(31&Qt)<<2),ge[Te++]=Qt>>>5&127,ge[Te++]=Qt>>>12&127,ge[Te++]=Qt>>>19&127,ge[Te++]=127&(Qt>>>26|(1&er)<<6),ge[Te++]=er>>>1&127,ge[Te++]=er>>>8&127,ge[Te++]=er>>>15&127,ge[Te++]=er>>>22&127,ge[Te++]=127&(er>>>29|(15&br)<<3),ge[Te++]=br>>>4&127,ge[Te++]=br>>>11&127,ge[Te++]=br>>>18&127,ge[Te++]=br>>>25&127}})(R,d,L,W);break;case 8:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0,br=ue[Oe++]>>>0,sr=ue[Oe++]>>>0;ge[Te++]=it>>>0&255,ge[Te++]=it>>>8&255,ge[Te++]=it>>>16&255,ge[Te++]=it>>>24&255,ge[Te++]=He>>>0&255,ge[Te++]=He>>>8&255,ge[Te++]=He>>>16&255,ge[Te++]=He>>>24&255,ge[Te++]=bt>>>0&255,ge[Te++]=bt>>>8&255,ge[Te++]=bt>>>16&255,ge[Te++]=bt>>>24&255,ge[Te++]=Et>>>0&255,ge[Te++]=Et>>>8&255,ge[Te++]=Et>>>16&255,ge[Te++]=Et>>>24&255,ge[Te++]=Qt>>>0&255,ge[Te++]=Qt>>>8&255,ge[Te++]=Qt>>>16&255,ge[Te++]=Qt>>>24&255,ge[Te++]=er>>>0&255,ge[Te++]=er>>>8&255,ge[Te++]=er>>>16&255,ge[Te++]=er>>>24&255,ge[Te++]=br>>>0&255,ge[Te++]=br>>>8&255,ge[Te++]=br>>>16&255,ge[Te++]=br>>>24&255,ge[Te++]=sr>>>0&255,ge[Te++]=sr>>>8&255,ge[Te++]=sr>>>16&255,ge[Te++]=sr>>>24&255}})(R,d,L,W);break;case 16:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<128;Pe++){let it=ue[Oe++]>>>0;ge[Te++]=65535&it,ge[Te++]=it>>>16&65535}})(R,d,L,W);break;default:(function(ue,me,ge,Ce,Te){let Oe=B3[Te]>>>0,Pe=me,it=0,He=ue[Pe]>>>0,bt=Ce;for(let Et=0;Et<8;Et++){for(let Qt=0;Qt<32;Qt++)if(it+Te<=32)ge[bt+Qt]=He>>>it&Oe,it+=Te,it===32&&(it=0,Pe++,Qt!==31&&(He=ue[Pe]>>>0));else{let er=32-it,br=He>>>it;Pe++,He=ue[Pe]>>>0;let sr=Te-er;ge[bt+Qt]=(br|(He&-1>>>32-sr>>>0)<>>0)}})(R,d,L,W,te)}return d+(te<<3)|0}function AY(R,d,L,W){if(L+2>d)throw new Error(`FastPFOR decode: byteContainer underflow at block=${W} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${L}, byteSize=${d})`);let te=R[L++],ue=R[L++];if(te>32)throw new Error(`FastPFOR decode: invalid bitWidth=${te} at block=${W} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:te,exceptionCount:ue,bytePosIn:L}}function MY(R,d,L,W,te,ue,me,ge,Ce){let{maxBits:Te,exceptionBitWidth:Oe,bytePosIn:Pe}=function(Qt,er,br,sr,Mr,qr){if(br+1>er)throw new Error(`FastPFOR decode: exception header underflow at block=${qr} (need 1 byte for maxBits, bytePos=${br}, byteSize=${er})`);let $r=Qt[br++];if($r32)throw new Error(`FastPFOR decode: invalid maxBits=${$r} at block=${qr} (bitWidth=${sr}, expected ${sr}..32)`);let _a=$r-sr|0;if(_a<1||_a>32)throw new Error(`FastPFOR decode: invalid exceptionBitWidth=${_a} at block=${qr} (bitWidth=${sr}, maxBits=${$r})`);if(br+Mr>er)throw new Error(`FastPFOR decode: exception positions underflow at block=${qr} (need=${Mr}, have=${er-br})`);return{maxBits:$r,exceptionBitWidth:_a,bytePosIn:br}}(te,ue,me,L,W,Ce);if(me=Pe,Oe===1){let Qt=1<Et)throw new Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${Oe} (ptr=${bt}, need ${W}, size=${Et}) at block ${Ce}`);for(let Qt=0;QtR.length-1)throw new Error(`FastPFOR decode: invalid whereMeta=${ge} at pageStart=${me} (expected > 0 and pageStart+whereMeta < encoded.length=${R.length})`);let Ce=me+1|0,Te=me+ge|0,Oe=R[Te]>>>0,Pe=Oe+3>>>2,it=Te+1,He=it+Pe;if(He>=R.length)throw new Error(`FastPFOR decode: invalid byteSize=${Oe} (metaInts=${Pe}, pageStart=${me}, packedEnd=${Te}, byteContainerStart=${it}) causes bitmapPos=${He} out of bounds (encoded.length=${R.length})`);let bt=function(er,br,sr,Mr){Mr.byteContainer.length>>2;if(3&qr.byteOffset)for(let Ca=0;Ca<$r;Ca=Ca+1|0){let nn=0|er[br+Ca|0],qa=Ca<<2;qr[qa]=255&nn,qr[qa+1|0]=nn>>>8&255,qr[qa+2|0]=nn>>>16&255,qr[qa+3|0]=nn>>>24&255}else{let Ca=Mr.byteContainerI32;(!Ca||Ca.buffer!==qr.buffer||Ca.byteOffset!==qr.byteOffset||Ca.length<$r)&&(Ca=Mr.byteContainerI32=new Int32Array(qr.buffer,qr.byteOffset,qr.byteLength>>>2)),Ca.set(er.subarray(br,br+$r))}let _a=3&sr;if(_a>0){let Ca=0|er[br+$r|0],nn=$r<<2;for(let qa=0;qa<_a;qa=qa+1|0)qr[nn+qa|0]=Ca>>>(qa<<3)&255}return qr}(R,it,Oe,ue),Et=Oe,Qt=function(er,br,sr){let Mr=0|er[br++],qr=sr.dataToBePacked;for(let $r=2;$r<=32;$r=$r+1|0){if(!(Mr>>>$r-1&1))continue;if(br>=er.length)throw new Error(`FastPFOR decode: truncated exception stream header (bitWidth=${$r}, streamWordIndex=${br}, needWords=1, availableWords=${er.length-br}, encodedWords=${er.length})`);let _a=er[br++]>>>0,Ca=O3(_a+31,32),nn=_a*$r+31>>>5;if(br+nn>er.length)throw new Error(`FastPFOR decode: truncated exception stream (bitWidth=${$r}, size=${_a}, streamWordIndex=${br}, needWords=${nn}, availableWords=${er.length-br}, encodedWords=${er.length})`);let qa=qr[$r];(!qa||qa.length>>5)|0,sr.exceptionSizes[$r]=_a}return br}(R,He,ue);return ue.dataPointers.fill(0),function(er,br,sr,Mr,qr,$r,_a,Ca,nn,qa){let bn=0|sr,Fn=0;for(let gn=0;gn<_a;gn=gn+1|0){let Va=AY(Ca,nn,Fn,gn);Fn=Va.bytePosIn;let Hn=Va.bitWidth,ni=Va.exceptionCount,Wn=$r+gn*Xd|0;switch(Hn){case 0:qr.fill(0,Wn,Wn+Xd);break;case 32:for(let si=0;si0&&(Fn=MY(qr,Wn,Hn,ni,Ca,nn,Fn,qa,gn))}if(bn!==Mr)throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${br}, packedStart=${sr}, consumedPackedEnd=${bn}, expectedPackedEnd=${Mr}, packedWords=${Mr-sr}, encoded.length=${er.length})`)}(R,me,Ce,Te,d,0|W,te/Xd|0,bt,Et,ue),Qt}function EY(R,d,L,W,te){switch(te){case 2:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0;Pe[He++]=bt>>>0&3,Pe[He++]=bt>>>2&3,Pe[He++]=bt>>>4&3,Pe[He++]=bt>>>6&3,Pe[He++]=bt>>>8&3,Pe[He++]=bt>>>10&3,Pe[He++]=bt>>>12&3,Pe[He++]=bt>>>14&3,Pe[He++]=bt>>>16&3,Pe[He++]=bt>>>18&3,Pe[He++]=bt>>>20&3,Pe[He++]=bt>>>22&3,Pe[He++]=bt>>>24&3,Pe[He++]=bt>>>26&3,Pe[He++]=bt>>>28&3,Pe[He++]=bt>>>30&3,Pe[He++]=Et>>>0&3,Pe[He++]=Et>>>2&3,Pe[He++]=Et>>>4&3,Pe[He++]=Et>>>6&3,Pe[He++]=Et>>>8&3,Pe[He++]=Et>>>10&3,Pe[He++]=Et>>>12&3,Pe[He++]=Et>>>14&3,Pe[He++]=Et>>>16&3,Pe[He++]=Et>>>18&3,Pe[He++]=Et>>>20&3,Pe[He++]=Et>>>22&3,Pe[He++]=Et>>>24&3,Pe[He++]=Et>>>26&3,Pe[He++]=Et>>>28&3,Pe[He]=Et>>>30&3}(R,d,L,W);case 3:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0;Pe[He++]=bt>>>0&7,Pe[He++]=bt>>>3&7,Pe[He++]=bt>>>6&7,Pe[He++]=bt>>>9&7,Pe[He++]=bt>>>12&7,Pe[He++]=bt>>>15&7,Pe[He++]=bt>>>18&7,Pe[He++]=bt>>>21&7,Pe[He++]=bt>>>24&7,Pe[He++]=bt>>>27&7,Pe[He++]=7&(bt>>>30|(1&Et)<<2),Pe[He++]=Et>>>1&7,Pe[He++]=Et>>>4&7,Pe[He++]=Et>>>7&7,Pe[He++]=Et>>>10&7,Pe[He++]=Et>>>13&7,Pe[He++]=Et>>>16&7,Pe[He++]=Et>>>19&7,Pe[He++]=Et>>>22&7,Pe[He++]=Et>>>25&7,Pe[He++]=Et>>>28&7,Pe[He++]=7&(Et>>>31|(3&Qt)<<1),Pe[He++]=Qt>>>2&7,Pe[He++]=Qt>>>5&7,Pe[He++]=Qt>>>8&7,Pe[He++]=Qt>>>11&7,Pe[He++]=Qt>>>14&7,Pe[He++]=Qt>>>17&7,Pe[He++]=Qt>>>20&7,Pe[He++]=Qt>>>23&7,Pe[He++]=Qt>>>26&7,Pe[He]=Qt>>>29&7}(R,d,L,W);case 4:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0;Pe[He++]=bt>>>0&15,Pe[He++]=bt>>>4&15,Pe[He++]=bt>>>8&15,Pe[He++]=bt>>>12&15,Pe[He++]=bt>>>16&15,Pe[He++]=bt>>>20&15,Pe[He++]=bt>>>24&15,Pe[He++]=bt>>>28&15,Pe[He++]=Et>>>0&15,Pe[He++]=Et>>>4&15,Pe[He++]=Et>>>8&15,Pe[He++]=Et>>>12&15,Pe[He++]=Et>>>16&15,Pe[He++]=Et>>>20&15,Pe[He++]=Et>>>24&15,Pe[He++]=Et>>>28&15,Pe[He++]=Qt>>>0&15,Pe[He++]=Qt>>>4&15,Pe[He++]=Qt>>>8&15,Pe[He++]=Qt>>>12&15,Pe[He++]=Qt>>>16&15,Pe[He++]=Qt>>>20&15,Pe[He++]=Qt>>>24&15,Pe[He++]=Qt>>>28&15,Pe[He++]=er>>>0&15,Pe[He++]=er>>>4&15,Pe[He++]=er>>>8&15,Pe[He++]=er>>>12&15,Pe[He++]=er>>>16&15,Pe[He++]=er>>>20&15,Pe[He++]=er>>>24&15,Pe[He]=er>>>28&15}(R,d,L,W);case 5:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0;Pe[He++]=bt>>>0&31,Pe[He++]=bt>>>5&31,Pe[He++]=bt>>>10&31,Pe[He++]=bt>>>15&31,Pe[He++]=bt>>>20&31,Pe[He++]=bt>>>25&31,Pe[He++]=31&(bt>>>30|(7&Et)<<2),Pe[He++]=Et>>>3&31,Pe[He++]=Et>>>8&31,Pe[He++]=Et>>>13&31,Pe[He++]=Et>>>18&31,Pe[He++]=Et>>>23&31,Pe[He++]=31&(Et>>>28|(1&Qt)<<4),Pe[He++]=Qt>>>1&31,Pe[He++]=Qt>>>6&31,Pe[He++]=Qt>>>11&31,Pe[He++]=Qt>>>16&31,Pe[He++]=Qt>>>21&31,Pe[He++]=Qt>>>26&31,Pe[He++]=31&(Qt>>>31|(15&er)<<1),Pe[He++]=er>>>4&31,Pe[He++]=er>>>9&31,Pe[He++]=er>>>14&31,Pe[He++]=er>>>19&31,Pe[He++]=er>>>24&31,Pe[He++]=31&(er>>>29|(3&br)<<3),Pe[He++]=br>>>2&31,Pe[He++]=br>>>7&31,Pe[He++]=br>>>12&31,Pe[He++]=br>>>17&31,Pe[He++]=br>>>22&31,Pe[He]=br>>>27&31}(R,d,L,W);case 6:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0;Pe[He++]=bt>>>0&63,Pe[He++]=bt>>>6&63,Pe[He++]=bt>>>12&63,Pe[He++]=bt>>>18&63,Pe[He++]=bt>>>24&63,Pe[He++]=63&(bt>>>30|(15&Et)<<2),Pe[He++]=Et>>>4&63,Pe[He++]=Et>>>10&63,Pe[He++]=Et>>>16&63,Pe[He++]=Et>>>22&63,Pe[He++]=63&(Et>>>28|(3&Qt)<<4),Pe[He++]=Qt>>>2&63,Pe[He++]=Qt>>>8&63,Pe[He++]=Qt>>>14&63,Pe[He++]=Qt>>>20&63,Pe[He++]=Qt>>>26&63,Pe[He++]=er>>>0&63,Pe[He++]=er>>>6&63,Pe[He++]=er>>>12&63,Pe[He++]=er>>>18&63,Pe[He++]=er>>>24&63,Pe[He++]=63&(er>>>30|(15&br)<<2),Pe[He++]=br>>>4&63,Pe[He++]=br>>>10&63,Pe[He++]=br>>>16&63,Pe[He++]=br>>>22&63,Pe[He++]=63&(br>>>28|(3&sr)<<4),Pe[He++]=sr>>>2&63,Pe[He++]=sr>>>8&63,Pe[He++]=sr>>>14&63,Pe[He++]=sr>>>20&63,Pe[He]=sr>>>26&63}(R,d,L,W);case 7:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0;Pe[He++]=bt>>>0&127,Pe[He++]=bt>>>7&127,Pe[He++]=bt>>>14&127,Pe[He++]=bt>>>21&127,Pe[He++]=127&(bt>>>28|(7&Et)<<4),Pe[He++]=Et>>>3&127,Pe[He++]=Et>>>10&127,Pe[He++]=Et>>>17&127,Pe[He++]=Et>>>24&127,Pe[He++]=127&(Et>>>31|(63&Qt)<<1),Pe[He++]=Qt>>>6&127,Pe[He++]=Qt>>>13&127,Pe[He++]=Qt>>>20&127,Pe[He++]=127&(Qt>>>27|(3&er)<<5),Pe[He++]=er>>>2&127,Pe[He++]=er>>>9&127,Pe[He++]=er>>>16&127,Pe[He++]=er>>>23&127,Pe[He++]=127&(er>>>30|(31&br)<<2),Pe[He++]=br>>>5&127,Pe[He++]=br>>>12&127,Pe[He++]=br>>>19&127,Pe[He++]=127&(br>>>26|(1&sr)<<6),Pe[He++]=sr>>>1&127,Pe[He++]=sr>>>8&127,Pe[He++]=sr>>>15&127,Pe[He++]=sr>>>22&127,Pe[He++]=127&(sr>>>29|(15&Mr)<<3),Pe[He++]=Mr>>>4&127,Pe[He++]=Mr>>>11&127,Pe[He++]=Mr>>>18&127,Pe[He]=Mr>>>25&127}(R,d,L,W);case 8:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0;Pe[He++]=bt>>>0&255,Pe[He++]=bt>>>8&255,Pe[He++]=bt>>>16&255,Pe[He++]=bt>>>24&255,Pe[He++]=Et>>>0&255,Pe[He++]=Et>>>8&255,Pe[He++]=Et>>>16&255,Pe[He++]=Et>>>24&255,Pe[He++]=Qt>>>0&255,Pe[He++]=Qt>>>8&255,Pe[He++]=Qt>>>16&255,Pe[He++]=Qt>>>24&255,Pe[He++]=er>>>0&255,Pe[He++]=er>>>8&255,Pe[He++]=er>>>16&255,Pe[He++]=er>>>24&255,Pe[He++]=br>>>0&255,Pe[He++]=br>>>8&255,Pe[He++]=br>>>16&255,Pe[He++]=br>>>24&255,Pe[He++]=sr>>>0&255,Pe[He++]=sr>>>8&255,Pe[He++]=sr>>>16&255,Pe[He++]=sr>>>24&255,Pe[He++]=Mr>>>0&255,Pe[He++]=Mr>>>8&255,Pe[He++]=Mr>>>16&255,Pe[He++]=Mr>>>24&255,Pe[He++]=qr>>>0&255,Pe[He++]=qr>>>8&255,Pe[He++]=qr>>>16&255,Pe[He]=qr>>>24&255}(R,d,L,W);case 9:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0;Pe[He++]=bt>>>0&511,Pe[He++]=bt>>>9&511,Pe[He++]=bt>>>18&511,Pe[He++]=511&(bt>>>27|(15&Et)<<5),Pe[He++]=Et>>>4&511,Pe[He++]=Et>>>13&511,Pe[He++]=Et>>>22&511,Pe[He++]=511&(Et>>>31|(255&Qt)<<1),Pe[He++]=Qt>>>8&511,Pe[He++]=Qt>>>17&511,Pe[He++]=511&(Qt>>>26|(7&er)<<6),Pe[He++]=er>>>3&511,Pe[He++]=er>>>12&511,Pe[He++]=er>>>21&511,Pe[He++]=511&(er>>>30|(127&br)<<2),Pe[He++]=br>>>7&511,Pe[He++]=br>>>16&511,Pe[He++]=511&(br>>>25|(3&sr)<<7),Pe[He++]=sr>>>2&511,Pe[He++]=sr>>>11&511,Pe[He++]=sr>>>20&511,Pe[He++]=511&(sr>>>29|(63&Mr)<<3),Pe[He++]=Mr>>>6&511,Pe[He++]=Mr>>>15&511,Pe[He++]=511&(Mr>>>24|(1&qr)<<8),Pe[He++]=qr>>>1&511,Pe[He++]=qr>>>10&511,Pe[He++]=qr>>>19&511,Pe[He++]=511&(qr>>>28|(31&$r)<<4),Pe[He++]=$r>>>5&511,Pe[He++]=$r>>>14&511,Pe[He]=$r>>>23&511}(R,d,L,W);case 10:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0;Pe[He++]=bt>>>0&1023,Pe[He++]=bt>>>10&1023,Pe[He++]=bt>>>20&1023,Pe[He++]=1023&(bt>>>30|(255&Et)<<2),Pe[He++]=Et>>>8&1023,Pe[He++]=Et>>>18&1023,Pe[He++]=1023&(Et>>>28|(63&Qt)<<4),Pe[He++]=Qt>>>6&1023,Pe[He++]=Qt>>>16&1023,Pe[He++]=1023&(Qt>>>26|(15&er)<<6),Pe[He++]=er>>>4&1023,Pe[He++]=er>>>14&1023,Pe[He++]=1023&(er>>>24|(3&br)<<8),Pe[He++]=br>>>2&1023,Pe[He++]=br>>>12&1023,Pe[He++]=br>>>22&1023,Pe[He++]=sr>>>0&1023,Pe[He++]=sr>>>10&1023,Pe[He++]=sr>>>20&1023,Pe[He++]=1023&(sr>>>30|(255&Mr)<<2),Pe[He++]=Mr>>>8&1023,Pe[He++]=Mr>>>18&1023,Pe[He++]=1023&(Mr>>>28|(63&qr)<<4),Pe[He++]=qr>>>6&1023,Pe[He++]=qr>>>16&1023,Pe[He++]=1023&(qr>>>26|(15&$r)<<6),Pe[He++]=$r>>>4&1023,Pe[He++]=$r>>>14&1023,Pe[He++]=1023&($r>>>24|(3&_a)<<8),Pe[He++]=_a>>>2&1023,Pe[He++]=_a>>>12&1023,Pe[He]=_a>>>22&1023}(R,d,L,W);case 11:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0;Pe[He++]=bt>>>0&2047,Pe[He++]=bt>>>11&2047,Pe[He++]=2047&(bt>>>22|(1&Et)<<10),Pe[He++]=Et>>>1&2047,Pe[He++]=Et>>>12&2047,Pe[He++]=2047&(Et>>>23|(3&Qt)<<9),Pe[He++]=Qt>>>2&2047,Pe[He++]=Qt>>>13&2047,Pe[He++]=2047&(Qt>>>24|(7&er)<<8),Pe[He++]=er>>>3&2047,Pe[He++]=er>>>14&2047,Pe[He++]=2047&(er>>>25|(15&br)<<7),Pe[He++]=br>>>4&2047,Pe[He++]=br>>>15&2047,Pe[He++]=2047&(br>>>26|(31&sr)<<6),Pe[He++]=sr>>>5&2047,Pe[He++]=sr>>>16&2047,Pe[He++]=2047&(sr>>>27|(63&Mr)<<5),Pe[He++]=Mr>>>6&2047,Pe[He++]=Mr>>>17&2047,Pe[He++]=2047&(Mr>>>28|(127&qr)<<4),Pe[He++]=qr>>>7&2047,Pe[He++]=qr>>>18&2047,Pe[He++]=2047&(qr>>>29|(255&$r)<<3),Pe[He++]=$r>>>8&2047,Pe[He++]=$r>>>19&2047,Pe[He++]=2047&($r>>>30|(511&_a)<<2),Pe[He++]=_a>>>9&2047,Pe[He++]=_a>>>20&2047,Pe[He++]=2047&(_a>>>31|(1023&Ca)<<1),Pe[He++]=Ca>>>10&2047,Pe[He]=Ca>>>21&2047}(R,d,L,W);case 12:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0,nn=Te[Oe+11]>>>0;Pe[He++]=bt>>>0&4095,Pe[He++]=bt>>>12&4095,Pe[He++]=4095&(bt>>>24|(15&Et)<<8),Pe[He++]=Et>>>4&4095,Pe[He++]=Et>>>16&4095,Pe[He++]=4095&(Et>>>28|(255&Qt)<<4),Pe[He++]=Qt>>>8&4095,Pe[He++]=Qt>>>20&4095,Pe[He++]=er>>>0&4095,Pe[He++]=er>>>12&4095,Pe[He++]=4095&(er>>>24|(15&br)<<8),Pe[He++]=br>>>4&4095,Pe[He++]=br>>>16&4095,Pe[He++]=4095&(br>>>28|(255&sr)<<4),Pe[He++]=sr>>>8&4095,Pe[He++]=sr>>>20&4095,Pe[He++]=Mr>>>0&4095,Pe[He++]=Mr>>>12&4095,Pe[He++]=4095&(Mr>>>24|(15&qr)<<8),Pe[He++]=qr>>>4&4095,Pe[He++]=qr>>>16&4095,Pe[He++]=4095&(qr>>>28|(255&$r)<<4),Pe[He++]=$r>>>8&4095,Pe[He++]=$r>>>20&4095,Pe[He++]=_a>>>0&4095,Pe[He++]=_a>>>12&4095,Pe[He++]=4095&(_a>>>24|(15&Ca)<<8),Pe[He++]=Ca>>>4&4095,Pe[He++]=Ca>>>16&4095,Pe[He++]=4095&(Ca>>>28|(255&nn)<<4),Pe[He++]=nn>>>8&4095,Pe[He]=nn>>>20&4095}(R,d,L,W);case 16:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0,nn=Te[Oe+11]>>>0,qa=Te[Oe+12]>>>0,bn=Te[Oe+13]>>>0,Fn=Te[Oe+14]>>>0,gn=Te[Oe+15]>>>0;Pe[He++]=bt>>>0&65535,Pe[He++]=bt>>>16&65535,Pe[He++]=Et>>>0&65535,Pe[He++]=Et>>>16&65535,Pe[He++]=Qt>>>0&65535,Pe[He++]=Qt>>>16&65535,Pe[He++]=er>>>0&65535,Pe[He++]=er>>>16&65535,Pe[He++]=br>>>0&65535,Pe[He++]=br>>>16&65535,Pe[He++]=sr>>>0&65535,Pe[He++]=sr>>>16&65535,Pe[He++]=Mr>>>0&65535,Pe[He++]=Mr>>>16&65535,Pe[He++]=qr>>>0&65535,Pe[He++]=qr>>>16&65535,Pe[He++]=$r>>>0&65535,Pe[He++]=$r>>>16&65535,Pe[He++]=_a>>>0&65535,Pe[He++]=_a>>>16&65535,Pe[He++]=Ca>>>0&65535,Pe[He++]=Ca>>>16&65535,Pe[He++]=nn>>>0&65535,Pe[He++]=nn>>>16&65535,Pe[He++]=qa>>>0&65535,Pe[He++]=qa>>>16&65535,Pe[He++]=bn>>>0&65535,Pe[He++]=bn>>>16&65535,Pe[He++]=Fn>>>0&65535,Pe[He++]=Fn>>>16&65535,Pe[He++]=gn>>>0&65535,Pe[He]=gn>>>16&65535}(R,d,L,W);case 32:for(let Te=0;Te<32;Te=Te+1|0)L[W+Te|0]=0|R[d+Te|0];return}let ue=B3[te]>>>0,me=d,ge=0,Ce=R[me]>>>0;for(let Te=0;Te<32;Te++)if(ge+te<=32)L[W+Te]=Ce>>>ge&ue,ge+=te,ge===32&&(ge=0,me++,Te!==31&&(Ce=R[me]>>>0));else{let Oe=32-ge,Pe=Ce>>>ge;me++,Ce=R[me]>>>0,L[W+Te]=(Pe|(Ce&B3[te-Oe]>>>0)<=64)throw new Error("Varint too long")}return d.set(te),L}function CY(R,d){let L,W;return W=R[d.get()],d.increment(),L=127&W,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<7,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<14,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<21,W<128?L:(W=R[d.get()],L|=(15&W)<<28,function(te,ue,me){let ge,Ce;if(Ce=ue[me.get()],me.increment(),ge=(112&Ce)>>4,Ce<128||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<3,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<10,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<17,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<24,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(1&Ce)<<31,Ce<128))return 4294967296*ge+(te>>>0);throw new Error("Expected varint not more than 10 bytes")}(L,R,d)))))}function Js(R){return R>>>1^-(1&R)}function fh(R){return R>>BigInt("1")^-(BigInt("1")&R)}function C0(R){return R%2==1?(R+1)/-2:R/2}function j3(R,d,L){if(L===void 0){L=0;for(let ue=0;ue=4)for(;W=4)for(;W=4)for(let W=R[0];L>4],ge=null;switch(me){case Tf.DATA:ge={dictionaryType:Object.values(fd)[15&ue]};break;case Tf.OFFSET:ge={offsetType:Object.values(kv)[15&ue]};break;case Tf.LENGTH:ge={lengthType:Object.values(Rh)[15&ue]}}te.increment();let Ce=W[te.get()],Te=Object.values(us)[Ce>>5],Oe=Object.values(us)[Ce>>2&7],Pe=Object.values(Tp)[3&Ce];te.increment();let it=Yf(W,te,2),He=it[0];return{physicalStreamType:me,logicalStreamType:ge,logicalLevelTechnique1:Te,logicalLevelTechnique2:Oe,physicalLevelTechnique:Pe,numValues:He,byteLength:it[1],decompressedCount:He}}(R,d);return L.logicalLevelTechnique1===us.MORTON?function(W,te,ue){let me=Yf(te,ue,2);return{physicalStreamType:W.physicalStreamType,logicalStreamType:W.logicalStreamType,logicalLevelTechnique1:W.logicalLevelTechnique1,logicalLevelTechnique2:W.logicalLevelTechnique2,physicalLevelTechnique:W.physicalLevelTechnique,numValues:W.numValues,byteLength:W.byteLength,decompressedCount:W.decompressedCount,numBits:me[0],coordinateShift:me[1]}}(L,R,d):us.RLE!==L.logicalLevelTechnique1&&us.RLE!==L.logicalLevelTechnique2||Tp.NONE===L.physicalLevelTechnique?L:function(W,te,ue){let me=Yf(te,ue,2);return{physicalStreamType:W.physicalStreamType,logicalStreamType:W.logicalStreamType,logicalLevelTechnique1:W.logicalLevelTechnique1,logicalLevelTechnique2:W.logicalLevelTechnique2,physicalLevelTechnique:W.physicalLevelTechnique,numValues:W.numValues,byteLength:W.byteLength,decompressedCount:me[1],runs:me[0],numRleValues:me[1]}}(L,R,d)}(function(R){R.PRESENT="PRESENT",R.DATA="DATA",R.OFFSET="OFFSET",R.LENGTH="LENGTH"})(Tf||(Tf={})),function(R){R.NONE="NONE",R.SINGLE="SINGLE",R.SHARED="SHARED",R.VERTEX="VERTEX",R.MORTON="MORTON",R.FSST="FSST"}(fd||(fd={})),function(R){R.VERTEX="VERTEX",R.INDEX="INDEX",R.STRING="STRING",R.KEY="KEY"}(kv||(kv={})),function(R){R.VAR_BINARY="VAR_BINARY",R.GEOMETRIES="GEOMETRIES",R.PARTS="PARTS",R.RINGS="RINGS",R.TRIANGLES="TRIANGLES",R.SYMBOL="SYMBOL",R.DICTIONARY="DICTIONARY"}(Rh||(Rh={})),function(R){R[R.FLAT=0]="FLAT",R[R.CONST=1]="CONST",R[R.SEQUENCE=2]="SEQUENCE",R[R.DICTIONARY=3]="DICTIONARY",R[R.FSST_DICTIONARY=4]="FSST_DICTIONARY"}(Gl||(Gl={}));class hd{constructor(d,L){this.values=d,this._size=L}get(d){let L=Math.floor(d/8);return(this.values[L]>>d%8&1)==1}set(d,L){let W=Math.floor(d/8);this.values[W]=this.values[W]|(L?1:0)<>d%8&1}size(){return this._size}getBuffer(){return this.values}}function L0(R,d,L){if(!d)return R;let W=d.size(),te=new R.constructor(W),ue=0;for(let me=0;me=4)for(;He>>0;for(let it=1;it>>0;return Pe}(me.logicalLevelTechnique2===us.RLE?j3(ue,me.runs,me.numRleValues):ue);break;case us.RLE:Te=j3(ue,me.runs,me.numRleValues);break;case us.MORTON:q3(ue),Te=ue;break;case us.COMPONENTWISE_DELTA:Te=function(Oe){if(Oe.length<2)return new Uint32Array(Oe);let Pe=new Uint32Array(Oe.length);Pe[0]=Js(Oe[0])>>>0,Pe[1]=Js(Oe[1])>>>0;for(let it=2;it>>0,Pe[it+1]=Pe[it-1]+Js(Oe[it+1])>>>0;return Pe}(ue);break;case us.NONE:Te=ue;break;default:throw new Error(`The specified Logical level technique is not supported: ${me.logicalLevelTechnique1}`)}return Ce?L0(Te,Ce,0):Te}(P0(R,d,L),L,0,te)}function Mp(R,d,L){return function(W,te){if(te.logicalLevelTechnique1===us.DELTA&&te.logicalLevelTechnique2===us.NONE)return function(ue){let me=new Int32Array(ue.length+1);me[0]=0,me[1]=Js(ue[0]);let ge=me[1];for(let Ce=2;Ce!==me.length;++Ce)ge+=Js(ue[Ce-1]),me[Ce]=me[Ce-1]+ge;return new Uint32Array(me)}(W);if(te.logicalLevelTechnique1===us.RLE&&te.logicalLevelTechnique2===us.NONE)return function(ue,me,ge){let Ce=new Uint32Array(ge+1);Ce[0]=0;let Te=1,Oe=Ce[0];for(let Pe=0;Pe>>2,Et=function(er,br){if(br<=er.encodedWords.length)return er.encodedWords;let sr=new Uint32Array(Math.max(16,2*br));return er.encodedWords=sr,sr}(it,bt);(function(er,br,sr,Mr){if(br<0||sr<0||br+sr>er.length)throw new RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${br}, byteLength=${sr}, bytes.length=${er.length})`);let qr=Math.floor(sr/4),$r=sr%4!=0,_a=$r?qr+1:qr;if(Mr.length<_a)throw new RangeError(`decodeBigEndianInt32sInto: out.length=${Mr.length} < ${_a}`);if(qr>0){let Ca=er.byteOffset+br;if(3&Ca)for(let nn=0;nn0){let Ca=0|er[Mr];if(Mr=Mr+1|0,255&Ca)throw new Error(`FastPFOR decode: invalid alignedLength=${Ca} (expected multiple of 256)`);if(qr+Ca>$r.length)throw new Error(`FastPFOR decode: output buffer too small (outPos=${qr}, alignedLength=${Ca}, out.length=${$r.length})`);Mr=function(nn,qa,bn,Fn,gn,Va){let Hn=Fn+O3(gn,Xd),ni=Fn,Wn=bn;for(;ni!==Hn;){let si=Math.min(N3,Hn-ni);Wn=SY(nn,qa,Wn,ni,si,Va),ni=ni+si|0}return Wn}(er,$r,Mr,qr,Ca,_a),qr=qr+Ca|0}return function(Ca,nn,qa,bn,Fn,gn){if(gn===0)return nn;let Va=0,Hn=nn,ni=nn+qa,Wn=Fn,si=Fn,po=Fn+gn,cs=0,Ds=0;for(;Hn>>Va&255;if(Va+=8,Hn+=Va>>>5,Va&=31,cs|=(127&Xs)<28)throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${Ds}, partial=${cs}, decoded=${si-Wn}/${gn}, inPos=${Hn}, inEnd=${ni})`)}if(si!==po)throw new Error(`FastPFOR VByte: truncated stream (decoded=${si-Wn}, expected=${gn}, consumedWords=${Hn-nn}/${qa}, vbyteStart=${nn}, vbyteEnd=${ni})`)}(er,Mr,er.length-Mr|0,$r,qr,br-qr|0),$r}(Et.subarray(0,bt),Te,it.decoderWorkspace);return Pe.add(Oe),Qt}(te,ue,me,ge,function(Ce=16){if(Ce<0)throw new RangeError(`initialEncodedWordCapacity must be >= 0, got ${Ce}`);let Te=Math.max(16,0|Ce);return{encodedWords:new Uint32Array(Te),decoderWorkspace:bS()}}(me>>>2))}(R,L.numValues,L.byteLength,d);case Tp.VARINT:return Yf(R,d,L.numValues);case Tp.NONE:{let te=d.get();d.add(L.byteLength);let ue=R.subarray(te,d.get());return new Uint32Array(ue)}default:throw new Error(`Specified physicalLevelTechnique ${W} is not supported (yet).`)}}function G3(R,d,L){let W=P0(R,d,L);return W.length===1?W[0]:function(te){return te[1]}(W)}function SS(R,d,L){return function(W){if(W.length===2){let te=Js(W[1]);return[te,te]}return[Js(W[2]),Js(W[3])]}(P0(R,d,L))}function ES(R,d,L){return function(W){if(W.length===2){let te=fh(W[1]);return[te,te]}return[fh(W[2]),fh(W[3])]}(k0(R,d,L.numValues))}function kS(R,d,L,W){return function(te,ue,me){let ge;switch(ue.logicalLevelTechnique1){case us.DELTA:ge=function(Ce){let Te=new BigUint64Array(Ce.length);Te[0]=BigInt.asUintN(64,fh(Ce[0]));for(let Oe=1;Oe>1,d)-L}}function RS(R,d){let L=0;for(let W=0;W>W;return L}function R0(R,d,L,W,te,ue,me){return R===Ap.MORTON?function(ge,Ce,Te,Oe,Pe,it){let He=new Array(Pe?Oe+1:Oe);for(let bt=0;bt[qr]),W+=sr,te+=sr}break;case Ic.LINESTRING:{let sr,Mr;Qt?(sr=He[te]-He[te-1],te++):sr=it[W]-it[W-1],W++,Et?(Mr=I0(er,ge,sr,!1),ge+=2*sr):(Mr=R0(d.vertexBufferType,er,bt,Ce,sr,!1,Te),Ce+=sr),L[me++]=[Mr],Pe&&ue++}break;case Ic.POLYGON:{let sr=it[W]-it[W-1];W++;let Mr=new Array(sr-1),qr,$r=He[te]-He[te-1];if(te++,Et){qr=I0(er,ge,$r,!0),ge+=2*$r;for(let _a=0;_a0&&Et.push(Et[0]),it.push(Et)}d[Oe]=it,ue&&Te++}break;case Ic.MULTIPOLYGON:{let Pe=ue[Te]-ue[Te-1];Te++;let it=[];for(let He=0;He0&&er.push(er[0]),it.push(er)}}d[Oe]=it}}return d}[Symbol.iterator](){return null}}function BS(R,d,L,W,te,ue){return new LY(R,d,L,W,te,ue)}class LY extends zS{constructor(d,L,W,te,ue,me){super(W,te,ue,me),this._numGeometries=d,this._geometryType=L}geometryType(d){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}function OS(R,d,L,W,te){return new PY(R,d,L,W,te)}class PY extends zS{constructor(d,L,W,te,ue){super(L,W,te,ue),this._geometryTypes=d}geometryType(d){return this._geometryTypes[d]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function RY(R,d,L,W,te){let ue=hh(R,L),me,ge,Ce,Te;if(My(ue,W,R,L)===Gl.CONST){let br=G3(R,L,ue),sr,Mr,qr,$r;for(let _a=0;_aL?d[ue++]:1);return W}function NS(R,d,L,W){let te=new Uint32Array(d[d.length-1]+1),ue=0;te[0]=ue;let me=1,ge=0;for(let Ce=0;Ce=it);){let He=me[Te.increment()];if(He<=127){let bt=He+3,Et=me[Te.increment()],Qt=Math.min(Pe+bt,ge);Oe.fill(Et,Pe,Qt),Pe=Qt}else{let bt=256-He;for(let Et=0;Et=12?FY.decode(R.subarray(d,L)):function(W,te,ue){let me="",ge=te;for(;ge239?4:Ce>223?3:Ce>191?2:1;if(ge+He>ue)break;He===1?Ce<128&&(it=Ce):He===2?(Te=W[ge+1],(192&Te)==128&&(it=(31&Ce)<<6|63&Te,it<=127&&(it=null))):He===3?(Te=W[ge+1],Oe=W[ge+2],(192&Te)==128&&(192&Oe)==128&&(it=(15&Ce)<<12|(63&Te)<<6|63&Oe,(it<=2047||it>=55296&&it<=57343)&&(it=null))):He===4&&(Te=W[ge+1],Oe=W[ge+2],Pe=W[ge+3],(192&Te)==128&&(192&Oe)==128&&(192&Pe)==128&&(it=(15&Ce)<<18|(63&Te)<<12|(63&Oe)<<6|63&Pe,(it<=65535||it>=1114112)&&(it=null))),it===null?(it=65533,He=1):it>65535&&(it-=65536,me+=String.fromCharCode(it>>>10&1023|55296),it=56320|1023&it),me+=String.fromCharCode(it),ge+=He}return me}(R,d,L)}class X3 extends E0{constructor(d,L,W,te){super(d,W,te),this.offsetBuffer=L}}class US extends X3{constructor(d,L,W,te){super(d,L,W,te??L.length-1)}getValueFromBuffer(d){return Y3(this.dataBuffer,this.offsetBuffer[d],this.offsetBuffer[d+1])}}class D0 extends X3{constructor(d,L,W,te,ue){super(d,W,te,ue??L.length),this.indexBuffer=L,this.indexBuffer=L}getValueFromBuffer(d){let L=this.indexBuffer[d];return Y3(this.dataBuffer,this.offsetBuffer[L],this.offsetBuffer[L+1])}}class qS extends X3{constructor(d,L,W,te,ue,me,ge){super(d,W,te,ge),this.indexBuffer=L,this.symbolOffsetBuffer=ue,this.symbolTableBuffer=me}getValueFromBuffer(d){this.decodedDictionary==null&&(this.symbolLengthBuffer==null&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=function(W,te,ue){let me=[],ge=new Array(te.length).fill(0);for(let Ce=1;Ce=10}function HS(R){return R===30}function BY(R){if(R.type==="scalarType"){let d=R.scalarType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if(d.type==="logicalType")return!1}else if(R.type==="complexType"){let d=R.complexType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",R),!1}function OY(R){var d;return R.type==="complexType"&&((d=R.complexType)==null?void 0:d.type)==="physicalType"&&R.complexType.physicalType===0}let NY=new TextDecoder;function Z3(R,d){let L=Yf(R,d,1)[0];if(L===0)return"";let W=d.get(),te=R.subarray(W,W+L);return d.add(L),NY.decode(te)}function WS(R,d){let L=Yf(R,d,1)[0]>>>0;if(L<10||L>30)throw new Error(`Unsupported field type code ${L}. Supported: 10-29(scalars), 30(STRUCT)`);let W=VS(L);if(GS(L)&&(W.name=Z3(R,d)),HS(L)){let te=Yf(R,d,1)[0]>>>0;W.complexType.children=new Array(te);for(let ue=0;ue>>0,W=VS(L);if(!W)throw new Error(`Unsupported column type code ${L}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(GS(L)?W.name=Z3(R,d):L>=0&&L<=3?W.name="id":L===4&&(W.name="geometry"),HS(L)){let te=Yf(R,d,1)[0]>>>0,ue=W.complexType;ue.children=new Array(te);for(let me=0;me>>0,ue=Yf(R,d,1)[0]>>>0;W.columns=new Array(ue);for(let me=0;me=4)for(;qr>>0,Pe=ge.get()+Oe;if(Pe>W.length)throw new Error(`Block overruns tile: ${Pe} > ${W.length}`);if(Yf(W,ge,1)[0]>>>0!=1){ge.set(Pe);continue}let[it,He]=UY(W,ge),bt=it.featureTables[0],Et=null,Qt=null,er=[],br=0;for(let Mr of bt.columns){let qr=Mr.name;if((Te=Mr).type==="scalarType"&&((me=Te.scalarType)==null?void 0:me.type)==="logicalType"&&Te.scalarType.logicalType===0){let $r=null;if(Mr.nullable){let Ca=hh(W,ge),nn=ge.get(),qa=Dg(W,Ca.numValues,Ca.byteLength,ge);ge.set(nn+Ca.byteLength),$r=new hd(qa,Ca.numValues)}let _a=hh(W,ge);br=$r?$r.size():_a.decompressedCount,Et=qY(W,Mr,ge,qr,_a,$r??br,ue)}else if(OY(Mr)){let $r=Yf(W,ge,1)[0];if(br===0){let _a=ge.get();br=hh(W,ge).decompressedCount,ge.set(_a)}Qt=RY(W,$r,ge,br)}else{let $r=BY(Mr)?Yf(W,ge,1)[0]:1;if($r===0)continue;let _a=zY(W,ge,Mr,$r,br);if(_a)if(Array.isArray(_a))for(let Ca of _a)er.push(Ca);else er.push(_a)}}let sr=new xY(bt.name,Qt,Et,er,He);Ce.push(sr),ge.set(Pe)}var Te;return Ce}(new Uint8Array(d));this.layers=L.reduce((W,te)=>Object.assign(Object.assign({},W),{[te.name]:new GY(te)}),{})}}class HY{constructor(d,L){this.feature=d,this.type=d.type,this.properties=d.tags?d.tags:{},this.extent=L,"id"in d&&(typeof d.id=="string"?this.id=parseInt(d.id,10):typeof d.id!="number"||isNaN(d.id)||(this.id=d.id))}loadGeometry(){let d=[],L=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(let W of L){let te=[];for(let ue of W)te.push(new t(ue[0],ue[1]));d.push(te)}return d}}let zg="_geojsonTileLayer";function WY(R,d,L=""){d.writeVarintField(15,R.version||1),d.writeStringField(1,R.name||""),d.writeVarintField(5,R.extent||4096);let W={jsonPrefix:L,keys:[],values:[],keycache:{},valuecache:{}};for(let me=0;me>31}function ZY(R,d){let L=R.loadGeometry(),W=R.type,te=0,ue=0;for(let me of L){let ge=1;W===1&&(ge=me.length),d.writeVarint($3(1,ge));let Ce=W===3?me.length-1:me.length;for(let Te=0;Te=0&&Oe[3]>=0&&Ce.insert(ge,Oe[0],Oe[1],Oe[2],Oe[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=this.encoding!=="mlt"?new w4(new _y(this.rawTileData)).layers:new YS(this.rawTileData).layers,this.sourceLayerCoder=new gS(this.vtLayers?Object.keys(this.vtLayers).sort():[zg])),this.vtLayers}query(d,L,W,te){this.loadVTLayers();let ue=d.params,me=F/d.tileSize/d.scale,ge=Na(ue.filter,ue.globalState),Ce=d.queryGeometry,Te=d.queryPadding*me,Oe=Ev.fromPoints(Ce),Pe=this.grid.query(Oe.minX-Te,Oe.minY-Te,Oe.maxX+Te,Oe.maxY+Te),it=Ev.fromPoints(d.cameraQueryGeometry).expandBy(Te),He=this.grid3D.query(it.minX,it.minY,it.maxX,it.maxY,(Qt,er,br,sr)=>function(Mr,qr,$r,_a,Ca){for(let qa of Mr)if(qr<=qa.x&&$r<=qa.y&&_a>=qa.x&&Ca>=qa.y)return!0;let nn=[new t(qr,$r),new t(qr,Ca),new t(_a,Ca),new t(_a,$r)];if(Mr.length>2){for(let qa of nn)if(Wa(Mr,qa))return!0}for(let qa=0;qa(br||(br=ql(sr)),Mr.queryIntersectsFeature({queryGeometry:Ce,feature:sr,featureState:qr,geometry:br,zoom:this.z,transform:d.transform,pixelsToTileUnits:me,pixelPosMatrix:d.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:d.getElevation})))}return bt}loadMatchingFeature(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=this.bucketLayerIDs[L];if(me&&!it.some(Qt=>me.has(Qt)))return;let He=this.sourceLayerCoder.decode(W),bt=this.vtLayers[He].feature(te);if(ue.needGeometry){let Qt=fo(bt,!0);if(!ue.filter(new oi(this.tileID.overscaledZ),Qt,this.tileID.canonical))return}else if(!ue.filter(new oi(this.tileID.overscaledZ),bt))return;let Et=this.getId(bt,He);for(let Qt of it){if(me&&!me.has(Qt))continue;let er=Ce[Qt];if(!er)continue;let br={};Et&&Oe&&(br=Oe.getState(er.sourceLayer||zg,Et));let sr=X({},Te[Qt]);sr.paint=$S(sr.paint,er.paint,bt,br,ge),sr.layout=$S(sr.layout,er.layout,bt,br,ge);let Mr=!Pe||Pe(bt,er,br);if(!Mr)continue;let qr=new yS(bt,this.z,this.x,this.y,Et);qr.layer=sr;let $r=d[Qt];$r===void 0&&($r=d[Qt]=[]),$r.push({featureIndex:te,feature:qr,intersectionZ:Mr})}}lookupSymbolFeatures(d,L,W,te,ue,me,ge,Ce){let Te={};this.loadVTLayers();let Oe=Na(ue.filterSpec,ue.globalState);for(let Pe of d)this.loadMatchingFeature(Te,W,te,Pe,Oe,me,ge,Ce,L);return Te}hasLayer(d){for(let L of this.bucketLayerIDs)for(let W of L)if(d===W)return!0;return!1}getId(d,L){var W;let te=d.id;return this.promoteId&&(te=d.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[L]],typeof te=="boolean"&&(te=Number(te)),te===void 0&&(!((W=d.properties)===null||W===void 0)&&W.cluster)&&this.promoteId&&(te=Number(d.properties.cluster_id))),te}}function $S(R,d,L,W,te){return H(R,(ue,me)=>{let ge=d instanceof Cu?d.get(me):null;return ge?.evaluate?ge.evaluate(L,W,te):ge})}function KY(R,d){return d-R}function KS(R,d,L,W,te){let ue=[];for(let me of R){let ge;for(let Ce=0;Ce=W&&Oe.x>=W||(Te.x>=W?Te=new t(W,Te.y+(W-Te.x)/(Oe.x-Te.x)*(Oe.y-Te.y))._round():Oe.x>=W&&(Oe=new t(W,Te.y+(W-Te.x)/(Oe.x-Te.x)*(Oe.y-Te.y))._round()),Te.y>=te&&Oe.y>=te||(Te.y>=te?Te=new t(Te.x+(te-Te.y)/(Oe.y-Te.y)*(Oe.x-Te.x),te)._round():Oe.y>=te&&(Oe=new t(Te.x+(te-Te.y)/(Oe.y-Te.y)*(Oe.x-Te.x),te)._round()),ge&&Te.equals(ge[ge.length-1])||(ge=[Te],ue.push(ge)),ge.push(Oe)))))}}return ue}function JS(R,d,L,W,te){switch(d){case 1:return function(ue,me,ge,Ce){let Te=[];for(let Oe of ue)for(let Pe of Oe){let it=Ce===0?Pe.x:Pe.y;it>=me&&it<=ge&&Te.push([Pe])}return Te}(R,L,W,te);case 2:return QS(R,L,W,te,!1);case 3:return QS(R,L,W,te,!0)}return[]}function JY(R,d,L,W,te){let ue=W===0?QY:eX,me=[],ge=[];for(let Oe=0;Oed&&me.push(ue(Pe,it,d)):He>L?bt=d&&(me.push(ue(Pe,it,d)),Et=!0),bt>L&&He<=L&&(me.push(ue(Pe,it,L)),Et=!0),!te&&Et&&(ge.push(me),me=[])}let Ce=R.length-1,Te=W===0?R[Ce].x:R[Ce].y;return Te>=d&&Te<=L&&me.push(R[Ce]),te&&me.length>0&&!me[0].equals(me[me.length-1])&&me.push(new t(me[0].x,me[0].y)),me.length>0&&ge.push(me),ge}function QS(R,d,L,W,te){let ue=[];for(let me of R){let ge=JY(me,d,L,W,te);ge.length>0&&ue.push(...ge)}return ue}function QY(R,d,L){return new t(L,R.y+(L-R.x)/(d.x-R.x)*(d.y-R.y))}function eX(R,d,L){return new t(R.x+(L-R.y)/(d.y-R.y)*(d.x-R.x),L)}fi("FeatureIndex",ZS,{omit:["rawTileData","sourceLayerCoder"]});class Sp extends t{constructor(d,L,W,te){super(d,L),this.angle=W,te!==void 0&&(this.segment=te)}clone(){return new Sp(this.x,this.y,this.angle,this.segment)}}function eE(R,d,L,W,te){if(d.segment===void 0||L===0)return!0;let ue=d,me=d.segment+1,ge=0;for(;ge>-L/2;){if(me--,me<0)return!1;ge-=R[me].dist(ue),ue=R[me]}ge+=R[me].dist(R[me+1]),me++;let Ce=[],Te=0;for(;geW;)Te-=Ce.shift().angleDelta;if(Te>te)return!1;me++,ge+=Oe.dist(Pe)}return!0}function tE(R){let d=0;for(let L=0;LTe){let bt=(Te-Ce)/He,Et=bs.number(Pe.x,it.x,bt),Qt=bs.number(Pe.y,it.y,bt),er=new Sp(Et,Qt,it.angleTo(Pe),Oe);return er._round(),!me||eE(R,er,ge,me,d)?er:void 0}Ce+=He}}function rX(R,d,L,W,te,ue,me,ge,Ce){let Te=rE(W,ue,me),Oe=aE(W,te),Pe=Oe*me,it=R[0].x===0||R[0].x===Ce||R[0].y===0||R[0].y===Ce;return d-Pe=0&&Mr=0&&qr=0&&it+Te<=Oe){let $r=new Sp(Mr,qr,br,bt);$r._round(),W&&!eE(R,$r,ue,W,te)||He.push($r)}}Pe+=er}return ge||He.length||me||(He=nE(R,Pe/2,L,W,te,ue,me,!0,Ce)),He}function iE(R,d,L,W){let te=[],ue=R.image,me=ue.pixelRatio,ge=ue.paddedRect.w-2,Ce=ue.paddedRect.h-2,Te={x1:R.left,y1:R.top,x2:R.right,y2:R.bottom},Oe=ue.stretchX||[[0,ge]],Pe=ue.stretchY||[[0,Ce]],it=(Va,Hn)=>Va+Hn[1]-Hn[0],He=Oe.reduce(it,0),bt=Pe.reduce(it,0),Et=ge-He,Qt=Ce-bt,er=0,br=He,sr=0,Mr=bt,qr=0,$r=Et,_a=0,Ca=Qt;if(ue.content&&W){let Va=ue.content,Hn=Va[2]-Va[0],ni=Va[3]-Va[1];(ue.textFitWidth||ue.textFitHeight)&&(Te=tS(R)),er=Sy(Oe,0,Va[0]),sr=Sy(Pe,0,Va[1]),br=Sy(Oe,Va[0],Va[2]),Mr=Sy(Pe,Va[1],Va[3]),qr=Va[0]-er,_a=Va[1]-sr,$r=Hn-br,Ca=ni-Mr}let nn=Te.x1,qa=Te.y1,bn=Te.x2-nn,Fn=Te.y2-qa,gn=(Va,Hn,ni,Wn)=>{let si=Ey(Va.stretch-er,br,bn,nn),po=ky(Va.fixed-qr,$r,Va.stretch,He),cs=Ey(Hn.stretch-sr,Mr,Fn,qa),Ds=ky(Hn.fixed-_a,Ca,Hn.stretch,bt),Xs=Ey(ni.stretch-er,br,bn,nn),Mf=ky(ni.fixed-qr,$r,ni.stretch,He),vu=Ey(Wn.stretch-sr,Mr,Fn,qa),yc=ky(Wn.fixed-_a,Ca,Wn.stretch,bt),Dc=new t(si,cs),Hl=new t(Xs,cs),rf=new t(Xs,vu),Xf=new t(si,vu),Zf=new t(po/me,Ds/me),Th=new t(Mf/me,yc/me),Sf=d*Math.PI/180;if(Sf){let Fc=Math.sin(Sf),nu=Math.cos(Sf),lc=[nu,-Fc,Fc,nu];Dc._matMult(lc),Hl._matMult(lc),Xf._matMult(lc),rf._matMult(lc)}let Ah=Va.stretch+Va.fixed,Hh=Hn.stretch+Hn.fixed;return{tl:Dc,tr:Hl,bl:Xf,br:rf,tex:{x:ue.paddedRect.x+1+Ah,y:ue.paddedRect.y+1+Hh,w:ni.stretch+ni.fixed-Ah,h:Wn.stretch+Wn.fixed-Hh},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Zf,pixelOffsetBR:Th,minFontScaleX:$r/me/bn,minFontScaleY:Ca/me/Fn,isSDF:L}};if(W&&(ue.stretchX||ue.stretchY)){let Va=oE(Oe,Et,He),Hn=oE(Pe,Qt,bt);for(let ni=0;ni0&&(Et=Math.max(10,Et),this.circleDiameter=Et)}else{let it=!((Pe=me.image)===null||Pe===void 0)&&Pe.content&&(me.image.textFitWidth||me.image.textFitHeight)?tS(me):{x1:me.left,y1:me.top,x2:me.right,y2:me.bottom};it.y1=it.y1*ge-Ce[0],it.y2=it.y2*ge+Ce[2],it.x1=it.x1*ge-Ce[3],it.x2=it.x2*ge+Ce[1];let He=me.collisionPadding;if(He&&(it.x1-=He[0]*ge,it.y1-=He[1]*ge,it.x2+=He[2]*ge,it.y2+=He[3]*ge),Oe){let bt=new t(it.x1,it.y1),Et=new t(it.x2,it.y1),Qt=new t(it.x1,it.y2),er=new t(it.x2,it.y2),br=Oe*Math.PI/180;bt._rotate(br),Et._rotate(br),Qt._rotate(br),er._rotate(br),it.x1=Math.min(bt.x,Et.x,Qt.x,er.x),it.x2=Math.max(bt.x,Et.x,Qt.x,er.x),it.y1=Math.min(bt.y,Et.y,Qt.y,er.y),it.y2=Math.max(bt.y,Et.y,Qt.y,er.y)}d.emplaceBack(L.x,L.y,it.x1,it.y1,it.x2,it.y2,W,te,ue)}this.boxEndIndex=d.length}}class aX{constructor(d=[],L=(W,te)=>Wte?1:0){if(this.data=d,this.length=this.data.length,this.compare=L,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(d){this.data.push(d),this._up(this.length++)}pop(){if(this.length===0)return;let d=this.data[0],L=this.data.pop();return--this.length>0&&(this.data[0]=L,this._down(0)),d}peek(){return this.data[0]}_up(d){let{data:L,compare:W}=this,te=L[d];for(;d>0;){let ue=d-1>>1,me=L[ue];if(W(te,me)>=0)break;L[d]=me,d=ue}L[d]=te}_down(d){let{data:L,compare:W}=this,te=this.length>>1,ue=L[d];for(;d=0)break;L[d]=L[me],d=me}L[d]=ue}}function nX(R,d=1){let L=Ev.fromPoints(R[0]),W=Math.min(L.width(),L.height()),te=W/2,ue=new aX([],iX),{minX:me,minY:ge,maxX:Ce,maxY:Te}=L;if(W===0)return new t(me,ge);for(let it=me;itPe.d||!Pe.d)&&(Pe=it),it.max-Pe.d<=d||(te=it.h/2,ue.push(new F0(it.p.x-te,it.p.y-te,te,R)),ue.push(new F0(it.p.x+te,it.p.y-te,te,R)),ue.push(new F0(it.p.x-te,it.p.y+te,te,R)),ue.push(new F0(it.p.x+te,it.p.y+te,te,R)))}return Oe.d>0&&Pe.d-Oe.d<=d?Oe.p:Pe.p}function iX(R,d){return d.max-R.max}class F0{constructor(d,L,W,te){this.p=new t(d,L),this.h=W,this.d=function(ue,me){let ge=!1,Ce=1/0;for(let Te of me)for(let Oe=0,Pe=Te.length,it=Pe-1;Oeue.y!=bt.y>ue.y&&ue.x<(bt.x-He.x)*(ue.y-He.y)/(bt.y-He.y)+He.x&&(ge=!ge),Ce=Math.min(Ce,na(ue,He,bt))}return(ge?1:-1)*Math.sqrt(Ce)}(this.p,te),this.max=this.d+this.h*Math.SQRT2}}var Af;l.aM=void 0,(Af=l.aM||(l.aM={}))[Af.center=1]="center",Af[Af.left=2]="left",Af[Af.right=3]="right",Af[Af.top=4]="top",Af[Af.bottom=5]="bottom",Af[Af["top-left"]=6]="top-left",Af[Af["top-right"]=7]="top-right",Af[Af["bottom-left"]=8]="bottom-left",Af[Af["bottom-right"]=9]="bottom-right";let K3=Number.POSITIVE_INFINITY;function sE(R,d){return d[1]!==K3?function(L,W,te){let ue=0,me=0;switch(W=Math.abs(W),te=Math.abs(te),L){case"top-right":case"top-left":case"top":me=te-7;break;case"bottom-right":case"bottom-left":case"bottom":me=7-te}switch(L){case"top-right":case"bottom-right":case"right":ue=-W;break;case"top-left":case"bottom-left":case"left":ue=W}return[ue,me]}(R,d[0],d[1]):function(L,W){let te=0,ue=0;W<0&&(W=0);let me=W/Math.SQRT2;switch(L){case"top-right":case"top-left":ue=me-7;break;case"bottom-right":case"bottom-left":ue=7-me;break;case"bottom":ue=7-W;break;case"top":ue=W-7}switch(L){case"top-right":case"bottom-right":te=-me;break;case"top-left":case"bottom-left":te=me;break;case"left":te=W;break;case"right":te=-W}return[te,ue]}(R,d[0])}function lE(R,d,L){var W;let te=R.layout,ue=(W=te.get("text-variable-anchor-offset"))===null||W===void 0?void 0:W.evaluate(d,{},L);if(ue){let ge=ue.values,Ce=[];for(let Te=0;Teit*Rc);Oe.startsWith("top")?Pe[1]-=7:Oe.startsWith("bottom")&&(Pe[1]+=7),Ce[Te+1]=Pe}return new gi(Ce)}let me=te.get("text-variable-anchor");if(me){let ge;ge=R._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[te.get("text-radial-offset").evaluate(d,{},L)*Rc,K3]:te.get("text-offset").evaluate(d,{},L).map(Te=>Te*Rc);let Ce=[];for(let Te of me)Ce.push(Te,sE(Te,ge));return new gi(Ce)}return null}function J3(R){switch(R){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function oX(R,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=ue.textMaxSize.evaluate(d,{});it===void 0&&(it=me);let He=R.layers[0].layout,bt=He.get("icon-offset").evaluate(d,{},Oe),Et=cE(L.horizontal),Qt=me/24,er=R.tilePixelRatio*Qt,br=R.tilePixelRatio*it/24,sr=R.tilePixelRatio*ge,Mr=R.tilePixelRatio*He.get("symbol-spacing"),qr=He.get("text-padding")*R.tilePixelRatio,$r=function(ni,Wn,si,po=1){let cs=ni.get("icon-padding").evaluate(Wn,{},si),Ds=cs?.values;return[Ds[0]*po,Ds[1]*po,Ds[2]*po,Ds[3]*po]}(He,d,Oe,R.tilePixelRatio),_a=He.get("text-max-angle")/180*Math.PI,Ca=He.get("text-rotation-alignment")!=="viewport"&&He.get("symbol-placement")!=="point",nn=He.get("icon-rotation-alignment")==="map"&&He.get("symbol-placement")!=="point",qa=He.get("symbol-placement"),bn=Mr/2,Fn=He.get("icon-text-fit"),gn;W&&Fn!=="none"&&(R.allowVerticalPlacement&&L.vertical&&(gn=rS(W,L.vertical,Fn,He.get("icon-text-fit-padding"),bt,Qt)),Et&&(W=rS(W,Et,Fn,He.get("icon-text-fit-padding"),bt,Qt)));let Va=Oe?Pe.line.getGranularityForZoomLevel(Oe.z):1,Hn=(ni,Wn)=>{Wn.x<0||Wn.x>=F||Wn.y<0||Wn.y>=F||function(si,po,cs,Ds,Xs,Mf,vu,yc,Dc,Hl,rf,Xf,Zf,Th,Sf,Ah,Hh,Fc,nu,lc,mu,zc,Zd,dd,Bg){let Ep=si.addToLineVertexArray(po,cs),Cv,z0,B0,O0,fE=0,hE=0,dE=0,pE=0,Q3=-1,ew=-1,$d={},vE=Jn("");if(si.allowVerticalPlacement&&Ds.vertical){let $f=yc.layout.get("text-rotate").evaluate(mu,{},dd)+90;B0=new Cy(Dc,po,Hl,rf,Xf,Ds.vertical,Zf,Th,Sf,$f),vu&&(O0=new Cy(Dc,po,Hl,rf,Xf,vu,Hh,Fc,Sf,$f))}if(Xs){let $f=yc.layout.get("icon-rotate").evaluate(mu,{}),Nh=yc.layout.get("icon-text-fit")!=="none",Lv=iE(Xs,$f,Zd,Nh),vd=vu?iE(vu,$f,Zd,Nh):void 0;z0=new Cy(Dc,po,Hl,rf,Xf,Xs,Hh,Fc,!1,$f),fE=4*Lv.length;let Pv=si.iconSizeData,Sd=null;Pv.kind==="source"?(Sd=[Yd*yc.layout.get("icon-size").evaluate(mu,{})],Sd[0]>bp&&ee(`${si.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):Pv.kind==="composite"&&(Sd=[Yd*zc.compositeIconSizes[0].evaluate(mu,{},dd),Yd*zc.compositeIconSizes[1].evaluate(mu,{},dd)],(Sd[0]>bp||Sd[1]>bp)&&ee(`${si.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),si.addSymbols(si.icon,Lv,Sd,lc,nu,mu,l.ax.none,po,Ep.lineStartIndex,Ep.lineLength,-1,dd),Q3=si.icon.placedSymbolArray.length-1,vd&&(hE=4*vd.length,si.addSymbols(si.icon,vd,Sd,lc,nu,mu,l.ax.vertical,po,Ep.lineStartIndex,Ep.lineLength,-1,dd),ew=si.icon.placedSymbolArray.length-1)}let mE=Object.keys(Ds.horizontal);for(let $f of mE){let Nh=Ds.horizontal[$f];if(!Cv){vE=Jn(Nh.text);let vd=yc.layout.get("text-rotate").evaluate(mu,{},dd);Cv=new Cy(Dc,po,Hl,rf,Xf,Nh,Zf,Th,Sf,vd)}let Lv=Nh.positionedLines.length===1;if(dE+=uE(si,po,Nh,Mf,yc,Sf,mu,Ah,Ep,Ds.vertical?l.ax.horizontal:l.ax.horizontalOnly,Lv?mE:[$f],$d,Q3,zc,dd),Lv)break}Ds.vertical&&(pE+=uE(si,po,Ds.vertical,Mf,yc,Sf,mu,Ah,Ep,l.ax.vertical,["vertical"],$d,ew,zc,dd));let lX=Cv?Cv.boxStartIndex:si.collisionBoxArray.length,uX=Cv?Cv.boxEndIndex:si.collisionBoxArray.length,cX=B0?B0.boxStartIndex:si.collisionBoxArray.length,fX=B0?B0.boxEndIndex:si.collisionBoxArray.length,hX=z0?z0.boxStartIndex:si.collisionBoxArray.length,dX=z0?z0.boxEndIndex:si.collisionBoxArray.length,pX=O0?O0.boxStartIndex:si.collisionBoxArray.length,vX=O0?O0.boxEndIndex:si.collisionBoxArray.length,pd=-1,Ly=($f,Nh)=>$f?.circleDiameter?Math.max($f.circleDiameter,Nh):Nh;pd=Ly(Cv,pd),pd=Ly(B0,pd),pd=Ly(z0,pd),pd=Ly(O0,pd);let gE=pd>-1?1:0;gE&&(pd*=Bg/Rc),si.glyphOffsetArray.length>=M0.MAX_GLYPHS&&ee("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),mu.sortKey!==void 0&&si.addToSortKeyRanges(si.symbolInstances.length,mu.sortKey);let mX=lE(yc,mu,dd),[gX,yX]=function($f,Nh){let Lv=$f.length,vd=Nh?.values;if(vd?.length>0)for(let Pv=0;Pv=0?$d.right:-1,$d.center>=0?$d.center:-1,$d.left>=0?$d.left:-1,$d.vertical||-1,Q3,ew,vE,lX,uX,cX,fX,hX,dX,pX,vX,Hl,dE,pE,fE,hE,gE,0,Zf,pd,gX,yX)}(R,Wn,ni,L,W,te,gn,R.layers[0],R.collisionBoxArray,d.index,d.sourceLayerIndex,R.index,er,[qr,qr,qr,qr],Ca,Ce,sr,$r,nn,bt,d,ue,Te,Oe,me)};if(qa==="line")for(let ni of KS(d.geometry,0,0,F,F)){let Wn=Sv(ni,Va),si=rX(Wn,Mr,_a,L.vertical||Et,W,24,br,R.overscaling,F);for(let po of si)Et&&sX(R,Et.text,bn,po)||Hn(Wn,po)}else if(qa==="line-center"){for(let ni of d.geometry)if(ni.length>1){let Wn=Sv(ni,Va),si=tX(Wn,_a,L.vertical||Et,W,24,br);si&&Hn(Wn,si)}}else if(d.type==="Polygon")for(let ni of Yc(d.geometry,0)){let Wn=nX(ni,16);Hn(Sv(ni[0],Va,!0),new Sp(Wn.x,Wn.y,0))}else if(d.type==="LineString")for(let ni of d.geometry){let Wn=Sv(ni,Va);Hn(Wn,new Sp(Wn[0].x,Wn[0].y,0))}else if(d.type==="Point")for(let ni of d.geometry)for(let Wn of ni)Hn([Wn],new Sp(Wn.x,Wn.y,0))}function uE(R,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt){let Et=function(br,sr,Mr,qr,$r,_a,Ca,nn){let qa=qr.layout.get("text-rotate").evaluate(_a,{})*Math.PI/180,bn=[];for(let Fn of sr.positionedLines)for(let gn of Fn.positionedGlyphs){if(!gn.rect)continue;let Va=gn.rect||{},Hn=4,ni=!0,Wn=1,si=0,po=($r||nn)&&gn.vertical,cs=gn.metrics.advance*gn.scale/2;if(nn&&sr.verticalizable&&(si=Fn.lineOffset/2-(gn.imageName?-(Rc-gn.metrics.width*gn.scale)/2:(gn.scale-1)*Rc)),gn.imageName){let Fc=Ca[gn.imageName];ni=Fc.sdf,Wn=Fc.pixelRatio,Hn=1/Wn}let Ds=$r?[gn.x+cs,gn.y]:[0,0],Xs=$r?[0,0]:[gn.x+cs+Mr[0],gn.y+Mr[1]-si],Mf=[0,0];po&&(Mf=Xs,Xs=[0,0]);let vu=gn.metrics.isDoubleResolution?2:1,yc=(gn.metrics.left-Hn)*gn.scale-cs+Xs[0],Dc=(-gn.metrics.top-Hn)*gn.scale+Xs[1],Hl=yc+Va.w/vu*gn.scale/Wn,rf=Dc+Va.h/vu*gn.scale/Wn,Xf=new t(yc,Dc),Zf=new t(Hl,Dc),Th=new t(yc,rf),Sf=new t(Hl,rf);if(po){let Fc=new t(-cs,cs- -17),nu=-Math.PI/2,lc=12-cs,mu=new t(22-lc,-(gn.imageName?lc:0)),zc=new t(...Mf);Xf._rotateAround(nu,Fc)._add(mu)._add(zc),Zf._rotateAround(nu,Fc)._add(mu)._add(zc),Th._rotateAround(nu,Fc)._add(mu)._add(zc),Sf._rotateAround(nu,Fc)._add(mu)._add(zc)}if(qa){let Fc=Math.sin(qa),nu=Math.cos(qa),lc=[nu,-Fc,Fc,nu];Xf._matMult(lc),Zf._matMult(lc),Th._matMult(lc),Sf._matMult(lc)}let Ah=new t(0,0),Hh=new t(0,0);bn.push({tl:Xf,tr:Zf,bl:Th,br:Sf,tex:Va,writingMode:sr.writingMode,glyphOffset:Ds,sectionIndex:gn.sectionIndex,isSDF:ni,pixelOffsetTL:Ah,pixelOffsetBR:Hh,minFontScaleX:0,minFontScaleY:0})}return bn}(0,L,ge,te,ue,me,W,R.allowVerticalPlacement),Qt=R.textSizeData,er=null;Qt.kind==="source"?(er=[Yd*te.layout.get("text-size").evaluate(me,{})],er[0]>bp&&ee(`${R.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):Qt.kind==="composite"&&(er=[Yd*He.compositeTextSizes[0].evaluate(me,{},bt),Yd*He.compositeTextSizes[1].evaluate(me,{},bt)],(er[0]>bp||er[1]>bp)&&ee(`${R.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),R.addSymbols(R.text,Et,er,ge,ue,me,Te,d,Ce.lineStartIndex,Ce.lineLength,it,bt);for(let br of Oe)Pe[br]=R.text.placedSymbolArray.length-1;return 4*Et.length}function cE(R){for(let d in R)return R[d];return null}function sX(R,d,L,W){let te=R.compareText;if(d in te){let ue=te[d];for(let me=ue.length-1;me>=0;me--)if(W.dist(ue[me])this.process()),this.subscription=Ge(this.target,"message",L=>this.receive(L),!1),this.globalScope=he(self)?R:window}registerMessageHandler(R,d){this.messageHandlers[R]=d}unregisterMessageHandler(R){delete this.messageHandlers[R]}sendAsync(R,d){return new Promise((L,W)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10),ue=d?Ge(d.signal,"abort",()=>{ue?.unsubscribe(),delete this.resolveRejects[te];let Ce={id:te,type:"",origin:location.origin,targetMapId:R.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Ce)},_Y):null;this.resolveRejects[te]={resolve:Ce=>{ue?.unsubscribe(),L(Ce)},reject:Ce=>{ue?.unsubscribe(),W(Ce)}};let me=[],ge=Object.assign(Object.assign({},R),{id:te,sourceMapId:this.mapId,origin:location.origin,data:mt(R.data,me)});this.target.postMessage(ge,{transfer:me})})}receive(R){let d=R.data,L=d.id,W=["file://","resource://android","null"],te=[d.origin,location.origin],ue=d.origin===location.origin,me=te.some(ge=>W.includes(ge));if((ue||me)&&(!d.targetMapId||this.mapId===d.targetMapId)){if(d.type===""){delete this.tasks[L];let ge=this.abortControllers[L];return delete this.abortControllers[L],void(ge&&ge.abort())}if(he(self)||d.mustQueue)return this.tasks[L]=d,this.taskQueue.push(L),void this.invoker.trigger();this.processTask(L,d)}}process(){if(this.taskQueue.length===0)return;let R=this.taskQueue.shift(),d=this.tasks[R];delete this.tasks[R],this.taskQueue.length>0&&this.invoker.trigger(),d&&this.processTask(R,d)}processTask(R,d){return e(this,void 0,void 0,function*(){if(d.type===""){let te=this.resolveRejects[R];return delete this.resolveRejects[R],te?void(d.error?te.reject(j(xt(d.error))):te.resolve(xt(d.data))):void 0}if(!this.messageHandlers[d.type])return void this.completeTask(R,new Error(`Could not find a registered handler for ${d.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let L=xt(d.data),W=new AbortController;this.abortControllers[R]=W;try{let te=yield this.messageHandlers[d.type](d.sourceMapId,L,W);this.completeTask(R,null,te)}catch(te){this.completeTask(R,j(te))}})}completeTask(R,d,L){let W=[];delete this.abortControllers[R];let te={id:R,type:"",sourceMapId:this.mapId,origin:location.origin,error:d?mt(d):null,data:mt(L,W)};this.target.postMessage(te,{transfer:W})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},l.O=function(){var R=new i(16);return i!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=0,R[12]=0,R[13]=0,R[14]=0),R[0]=1,R[5]=1,R[10]=1,R[15]=1,R},l.P=t,l.Q=function(R,d,L){var W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et=L[0],Qt=L[1],er=L[2];return d===R?(R[12]=d[0]*Et+d[4]*Qt+d[8]*er+d[12],R[13]=d[1]*Et+d[5]*Qt+d[9]*er+d[13],R[14]=d[2]*Et+d[6]*Qt+d[10]*er+d[14],R[15]=d[3]*Et+d[7]*Qt+d[11]*er+d[15]):(te=d[1],ue=d[2],me=d[3],ge=d[4],Ce=d[5],Te=d[6],Oe=d[7],Pe=d[8],it=d[9],He=d[10],bt=d[11],R[0]=W=d[0],R[1]=te,R[2]=ue,R[3]=me,R[4]=ge,R[5]=Ce,R[6]=Te,R[7]=Oe,R[8]=Pe,R[9]=it,R[10]=He,R[11]=bt,R[12]=W*Et+ge*Qt+Pe*er+d[12],R[13]=te*Et+Ce*Qt+it*er+d[13],R[14]=ue*Et+Te*Qt+He*er+d[14],R[15]=me*Et+Oe*Qt+bt*er+d[15]),R},l.R=ls,l.S=function(R,d,L){var W=L[0],te=L[1],ue=L[2];return R[0]=d[0]*W,R[1]=d[1]*W,R[2]=d[2]*W,R[3]=d[3]*W,R[4]=d[4]*te,R[5]=d[5]*te,R[6]=d[6]*te,R[7]=d[7]*te,R[8]=d[8]*ue,R[9]=d[9]*ue,R[10]=d[10]*ue,R[11]=d[11]*ue,R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15],R},l.T=vp,l.U=function(R,d,L){var W=d[0],te=d[1],ue=d[2],me=d[3],ge=d[4],Ce=d[5],Te=d[6],Oe=d[7],Pe=d[8],it=d[9],He=d[10],bt=d[11],Et=d[12],Qt=d[13],er=d[14],br=d[15],sr=L[0],Mr=L[1],qr=L[2],$r=L[3];return R[0]=sr*W+Mr*ge+qr*Pe+$r*Et,R[1]=sr*te+Mr*Ce+qr*it+$r*Qt,R[2]=sr*ue+Mr*Te+qr*He+$r*er,R[3]=sr*me+Mr*Oe+qr*bt+$r*br,R[4]=(sr=L[4])*W+(Mr=L[5])*ge+(qr=L[6])*Pe+($r=L[7])*Et,R[5]=sr*te+Mr*Ce+qr*it+$r*Qt,R[6]=sr*ue+Mr*Te+qr*He+$r*er,R[7]=sr*me+Mr*Oe+qr*bt+$r*br,R[8]=(sr=L[8])*W+(Mr=L[9])*ge+(qr=L[10])*Pe+($r=L[11])*Et,R[9]=sr*te+Mr*Ce+qr*it+$r*Qt,R[10]=sr*ue+Mr*Te+qr*He+$r*er,R[11]=sr*me+Mr*Oe+qr*bt+$r*br,R[12]=(sr=L[12])*W+(Mr=L[13])*ge+(qr=L[14])*Pe+($r=L[15])*Et,R[13]=sr*te+Mr*Ce+qr*it+$r*Qt,R[14]=sr*ue+Mr*Te+qr*He+$r*er,R[15]=sr*me+Mr*Oe+qr*bt+$r*br,R},l.V=function(R,d){let L={};for(let W of d)W in R&&(L[W]=R[W]);return L},l.W=wp,l.X=G,l.Y=fS,l.Z=cS,l._=e,l.a=Ae,l.a$=function(R){var d=new i(3);return d[0]=R[0],d[1]=R[1],d[2]=R[2],d},l.a0=h,l.a1=v,l.a2=Se,l.a3=Ph,l.a4=dS,l.a5=Ty,l.a6=F,l.a7=Ig,l.a8=Ev,l.a9=25,l.aA=function(R){var d=R[0],L=R[1];return Math.sqrt(d*d+L*L)},l.aB=function(R){return R[0]=0,R[1]=0,R},l.aC=function(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R},l.aD=S3,l.aE=z,l.aF=function(R,d,L,W){let te=d.y-R.y,ue=d.x-R.x,me=W.y-L.y,ge=W.x-L.x,Ce=me*ue-ge*te;if(Ce===0)return null;let Te=(ge*(R.y-L.y)-me*(R.x-L.x))/Ce;return new t(R.x+Te*ue,R.y+Te*te)},l.aG=KS,l.aH=Ya,l.aI=function(R){let d=1/0,L=1/0,W=-1/0,te=-1/0;for(let ue of R)d=Math.min(d,ue.x),L=Math.min(L,ue.y),W=Math.max(W,ue.x),te=Math.max(te,ue.y);return[d,L,W,te]},l.aJ=Rc,l.aK=P,l.aL=function(R,d,L,W,te=!1){if(!L[0]&&!L[1])return[0,0];let ue=te?W==="map"?-R.bearingInRadians:0:W==="viewport"?R.bearingInRadians:0;if(ue){let me=Math.sin(ue),ge=Math.cos(ue);L=[L[0]*ge-L[1]*me,L[0]*me+L[1]*ge]}return[te?L[0]:P(d,L[0],R.zoom),te?L[1]:P(d,L[1],R.zoom)]},l.aN=M3,l.aO=J3,l.aP=A3,l.aQ=R=>R.type==="symbol",l.aR=dy,l.aS=ct,l.aT=hy,l.aU=It,l.aV=Fa,l.aW=ua,l.aX=_e,l.aY=pS,l.aZ=f,l.a_=T,l.aa=P3,l.ab=R=>{let d=window.document.createElement("video");return d.muted=!0,new Promise(L=>{d.onloadstart=()=>{L(d)};for(let W of R){let te=window.document.createElement("source");rr(W)||(d.crossOrigin="Anonymous"),te.src=W,d.appendChild(te)}})},l.ac=Vt,l.ad=function(){return K++},l.ae=fe,l.af=M0,l.ag=zg,l.ah=Na,l.ai=fo,l.aj=yS,l.ak=function(R){let d={};if(R.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(L,W,te,ue)=>{let me=te||ue;return d[W]=!me||me.toLowerCase(),""}),d["max-age"]){let L=parseInt(d["max-age"],10);isNaN(L)?delete d["max-age"]:d["max-age"]=L}return d},l.al=se,l.am=85.051129,l.an=ke,l.ao=function(R){return Math.pow(2,R)},l.ap=S,l.aq=hS,l.ar=function(R){return Math.log(R)/Math.LN2},l.as=function(R){var d=R[0],L=R[1];return d*d+L*L},l.at=function(R){if(!R.length)return new Set;let d=Math.max(...R.map(Ce=>Ce.canonical.z)),L=1/0,W=-1/0,te=1/0,ue=-1/0,me=[];for(let Ce of R){let{x:Te,y:Oe,z:Pe}=Ce.canonical,it=Math.pow(2,d-Pe),He=Te*it,bt=Oe*it;me.push({id:Ce,x:He,y:bt}),HeW&&(W=He),btue&&(ue=bt)}let ge=new Set;for(let Ce of me)Ce.x!==L&&Ce.x!==W&&Ce.y!==te&&Ce.y!==ue||ge.add(Ce.id);return ge},l.au=function(R,d){let L=Math.abs(2*R.wrap)-+(R.wrap<0),W=Math.abs(2*d.wrap)-+(d.wrap<0);return R.overscaledZ-d.overscaledZ||W-L||d.canonical.y-R.canonical.y||d.canonical.x-R.canonical.x},l.av=class{constructor(R,d){this.max=R,this.onRemove=d,this.reset()}reset(){for(let R in this.data)for(let d of this.data[R])d.timeout&&clearTimeout(d.timeout),this.onRemove(d.value);return this.data={},this.order=[],this}add(R,d,L){let W=R.wrapped().key;this.data[W]===void 0&&(this.data[W]=[]);let te={value:d,timeout:void 0};if(L!==void 0&&(te.timeout=setTimeout(()=>{this.remove(R,te)},L)),this.data[W].push(te),this.order.push(W),this.order.length>this.max){let ue=this._getAndRemoveByKey(this.order[0]);ue&&this.onRemove(ue)}return this}has(R){return R.wrapped().key in this.data}getAndRemove(R){return this.has(R)?this._getAndRemoveByKey(R.wrapped().key):null}_getAndRemoveByKey(R){let d=this.data[R].shift();return d.timeout&&clearTimeout(d.timeout),this.data[R].length===0&&delete this.data[R],this.order.splice(this.order.indexOf(R),1),d.value}getByKey(R){let d=this.data[R];return d?d[0].value:null}get(R){return this.has(R)?this.data[R.wrapped().key][0].value:null}remove(R,d){if(!this.has(R))return this;let L=R.wrapped().key,W=d===void 0?0:this.data[L].indexOf(d),te=this.data[L][W];return this.data[L].splice(W,1),te.timeout&&clearTimeout(te.timeout),this.data[L].length===0&&delete this.data[L],this.onRemove(te.value),this.order.splice(this.order.indexOf(L),1),this}setMaxSize(R){for(this.max=R;this.order.length>this.max;){let d=this._getAndRemoveByKey(this.order[0]);d&&this.onRemove(d)}return this}filter(R){let d=[];for(let L in this.data)for(let W of this.data[L])R(W.value)||d.push(W);for(let L of d)this.remove(L.value.tileID,L)}},l.aw=function(R,d){let L=0,W=0;if(R.kind==="constant")W=R.layoutSize;else if(R.kind!=="source"){let{interpolationType:te,minZoom:ue,maxZoom:me}=R,ge=te?se(Pi.interpolationFactor(te,d,ue,me),0,1):0;R.kind==="camera"?W=bs.number(R.minSize,R.maxSize,ge):L=ge}return{uSizeT:L,uSize:W}},l.ay=function(R,{uSize:d,uSizeT:L},{lowerSize:W,upperSize:te}){return R.kind==="source"?W/Yd:R.kind==="composite"?bs.number(W/Yd,te/Yd,L):d},l.az=D,l.b=we,l.b$=zs,l.b0=function(R,d,L){return R[0]=d[0]-L[0],R[1]=d[1]-L[1],R[2]=d[2]-L[2],R},l.b1=function(R,d){var L=d[0],W=d[1],te=d[2],ue=L*L+W*W+te*te;return ue>0&&(ue=1/Math.sqrt(ue)),R[0]=d[0]*ue,R[1]=d[1]*ue,R[2]=d[2]*ue,R},l.b2=u,l.b3=function(R,d){return R[0]*d[0]+R[1]*d[1]+R[2]*d[2]},l.b4=function(R,d,L){return R[0]=d[0]*L[0],R[1]=d[1]*L[1],R[2]=d[2]*L[2],R[3]=d[3]*L[3],R},l.b5=C,l.b6=function(R,d,L){let W=d[0]*L[0]+d[1]*L[1]+d[2]*L[2];return W===0?null:(-(R[0]*L[0]+R[1]*L[1]+R[2]*L[2])-L[3])/W},l.b7=x,l.b8=function(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R[2]=d[2]*L,R[3]=d[3]*L,R},l.b9=function(R,d){return R[0]*d[0]+R[1]*d[1]+R[2]*d[2]+R[3]},l.bA=O,l.bB=function(R,d,L){var W=L[0],te=L[1],ue=L[2],me=L[3],ge=d[0],Ce=d[1],Te=d[2],Oe=te*Te-ue*Ce,Pe=ue*ge-W*Te,it=W*Ce-te*ge;return R[0]=ge+me*(Oe+=Oe)+te*(it+=it)-ue*(Pe+=Pe),R[1]=Ce+me*Pe+ue*Oe-W*it,R[2]=Te+me*it+W*Pe-te*Oe,R},l.bC=function(R,d,L){let W=(te=[R[0],R[1],R[2],d[0],d[1],d[2],L[0],L[1],L[2]])[0]*((Oe=te[8])*(me=te[4])-(ge=te[5])*(Te=te[7]))+te[1]*(-Oe*(ue=te[3])+ge*(Ce=te[6]))+te[2]*(Te*ue-me*Ce);var te,ue,me,ge,Ce,Te,Oe;if(W===0)return null;let Pe=u([],[d[0],d[1],d[2]],[L[0],L[1],L[2]]),it=u([],[L[0],L[1],L[2]],[R[0],R[1],R[2]]),He=u([],[R[0],R[1],R[2]],[d[0],d[1],d[2]]),bt=f([],Pe,-R[3]);return T(bt,bt,f([],it,-d[3])),T(bt,bt,f([],He,-L[3])),f(bt,bt,1/W),bt},l.bD=L3,l.bE=function(){return new Float64Array(4)},l.bF=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[0]*Math.cos(W)-te[1]*Math.sin(W),ue[1]=te[0]*Math.sin(W)+te[1]*Math.cos(W),ue[2]=te[2],R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bG=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[0],ue[1]=te[1]*Math.cos(W)-te[2]*Math.sin(W),ue[2]=te[1]*Math.sin(W)+te[2]*Math.cos(W),R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bH=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[2]*Math.sin(W)+te[0]*Math.cos(W),ue[1]=te[1],ue[2]=te[2]*Math.cos(W)-te[0]*Math.sin(W),R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bI=function(R,d,L){var W=Math.sin(L),te=Math.cos(L),ue=d[0],me=d[1],ge=d[2],Ce=d[3],Te=d[8],Oe=d[9],Pe=d[10],it=d[11];return d!==R&&(R[4]=d[4],R[5]=d[5],R[6]=d[6],R[7]=d[7],R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15]),R[0]=ue*te-Te*W,R[1]=me*te-Oe*W,R[2]=ge*te-Pe*W,R[3]=Ce*te-it*W,R[8]=ue*W+Te*te,R[9]=me*W+Oe*te,R[10]=ge*W+Pe*te,R[11]=Ce*W+it*te,R},l.bJ=function(R,d){let L=U(R,360),W=U(d,360),te=W-L,ue=W>L?te-360:te+360;return Math.abs(te)0?me:-me},l.bM=function(R,d){let L=U(R,2*Math.PI),W=U(d,2*Math.PI);return Math.min(Math.abs(L-W),Math.abs(L-W+2*Math.PI),Math.abs(L-W-2*Math.PI))},l.bN=function(){let R={},d=ht.$version;for(let L in ht.$root){let W=ht.$root[L];if(W.required){let te=null;te=L==="version"?d:W.type==="array"?[]:{},te!=null&&(R[L]=te)}}return R},l.bO=At,l.bP=Bt,l.bQ=function R(d,L){if(Array.isArray(d)){if(!Array.isArray(L)||d.length!==L.length)return!1;for(let W=0;WR.type==="raster",l.bV=q,l.bW=function(R,d){if(!R)return[{command:"setStyle",args:[d]}];let L=[];try{if(!We(R.version,d.version))return[{command:"setStyle",args:[d]}];We(R.center,d.center)||L.push({command:"setCenter",args:[d.center]}),We(R.state,d.state)||L.push({command:"setGlobalState",args:[d.state]}),We(R.centerAltitude,d.centerAltitude)||L.push({command:"setCenterAltitude",args:[d.centerAltitude]}),We(R.zoom,d.zoom)||L.push({command:"setZoom",args:[d.zoom]}),We(R.bearing,d.bearing)||L.push({command:"setBearing",args:[d.bearing]}),We(R.pitch,d.pitch)||L.push({command:"setPitch",args:[d.pitch]}),We(R.roll,d.roll)||L.push({command:"setRoll",args:[d.roll]}),We(R.sprite,d.sprite)||L.push({command:"setSprite",args:[d.sprite]}),We(R.glyphs,d.glyphs)||L.push({command:"setGlyphs",args:[d.glyphs]}),We(R.transition,d.transition)||L.push({command:"setTransition",args:[d.transition]}),We(R.light,d.light)||L.push({command:"setLight",args:[d.light]}),We(R.terrain,d.terrain)||L.push({command:"setTerrain",args:[d.terrain]}),We(R.sky,d.sky)||L.push({command:"setSky",args:[d.sky]}),We(R.projection,d.projection)||L.push({command:"setProjection",args:[d.projection]});let W={},te=[];(function(me,ge,Ce,Te){let Oe;for(Oe in ge=ge||{},me=me||{})Object.prototype.hasOwnProperty.call(me,Oe)&&(Object.prototype.hasOwnProperty.call(ge,Oe)||et(Oe,Ce,Te));for(Oe in ge)Object.prototype.hasOwnProperty.call(ge,Oe)&&(Object.prototype.hasOwnProperty.call(me,Oe)?We(me[Oe],ge[Oe])||(me[Oe].type==="geojson"&&ge[Oe].type==="geojson"&&pt(me,ge,Oe)?Ke(Ce,{command:"setGeoJSONSourceData",args:[Oe,ge[Oe].data]}):Mt(Oe,ge,Ce,Te)):Je(Oe,ge,Ce))})(R.sources,d.sources,te,W);let ue=[];R.layers&&R.layers.forEach(me=>{"source"in me&&W[me.source]?L.push({command:"removeLayer",args:[me.id]}):ue.push(me)}),L=L.concat(te),function(me,ge,Ce){ge=ge||[];let Te=(me=me||[]).map(Ct),Oe=ge.map(Ct),Pe=me.reduce(qt,{}),it=ge.reduce(qt,{}),He=Te.slice(),bt=Object.create(null),Et,Qt,er,br,sr;for(let Mr=0,qr=0;Mrg?(te=Math.acos(ue),me=Math.sin(te),ge=Math.sin((1-W)*te)/me,Ce=Math.sin(W*te)/me):(ge=1-W,Ce=W),R[0]=ge*Te+Ce*He,R[1]=ge*Oe+Ce*bt,R[2]=ge*Pe+Ce*Et,R[3]=ge*it+Ce*Qt,R},l.bm=function(R){let d=new Float64Array(9);var L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr;Pe=(te=(W=R)[0])*(Ce=te+te),it=(ue=W[1])*Ce,bt=(me=W[2])*Ce,Et=me*(Te=ue+ue),er=(ge=W[3])*Ce,br=ge*Te,sr=ge*(Oe=me+me),(L=d)[0]=1-(He=ue*Te)-(Qt=me*Oe),L[3]=it-sr,L[6]=bt+br,L[1]=it+sr,L[4]=1-Pe-Qt,L[7]=Et-er,L[2]=bt-br,L[5]=Et+er,L[8]=1-Pe-He;let Mr=_e(-Math.asin(se(d[2],-1,1))),qr,$r;return Math.hypot(d[5],d[8])<.001?(qr=0,$r=-_e(Math.atan2(d[3],d[4]))):(qr=_e(d[5]===0&&d[8]===0?0:Math.atan2(d[5],d[8])),$r=_e(d[1]===0&&d[0]===0?0:Math.atan2(d[1],d[0]))),{roll:qr,pitch:Mr+90,bearing:$r}},l.bn=function(R,d){return R.roll==d.roll&&R.pitch==d.pitch&&R.bearing==d.bearing},l.bo=rn,l.bp=ro,l.bq=_0,l.br=Mg,l.bs=y0,l.bt=$,l.bu=Q,l.bv=io,l.bw=function(R,d,L,W,te){return $(W,te,se((R-d)/(L-d),0,1))},l.bx=function(R,d,L,W){return R[0]=d[0]+L[0]*W,R[1]=d[1]+L[1]*W,R[2]=d[2]+L[2]*W,R},l.by=U,l.bz=function(){return new Float64Array(3)},l.c=Ye,l.c$=Cc,l.c0=class extends Wi{constructor(R,d){super(R,d),this.current=Bs}set(R){if(R[12]!==this.current[12]||R[0]!==this.current[0])return this.current=R,void this.gl.uniformMatrix4fv(this.location,!1,R);for(let d=1;d<16;d++)if(R[d]!==this.current[d]){this.current=R,this.gl.uniformMatrix4fv(this.location,!1,R);break}}},l.c1=Mo,l.c2=class extends Wi{constructor(R,d){super(R,d),this.current=[0,0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]&&R[2]===this.current[2]||(this.current=R,this.gl.uniform3f(this.location,R[0],R[1],R[2]))}},l.c3=class extends Wi{constructor(R,d){super(R,d),this.current=[0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]||(this.current=R,this.gl.uniform2f(this.location,R[0],R[1]))}},l.c4=w,l.c5=function(R,d){var L=Math.sin(d),W=Math.cos(d);return R[0]=W,R[1]=L,R[2]=0,R[3]=-L,R[4]=W,R[5]=0,R[6]=0,R[7]=0,R[8]=1,R},l.c6=function(R,d,L){var W=d[0],te=d[1],ue=d[2];return R[0]=W*L[0]+te*L[3]+ue*L[6],R[1]=W*L[1]+te*L[4]+ue*L[7],R[2]=W*L[2]+te*L[5]+ue*L[8],R},l.c7=function(R,d,L,W,te,ue,me){var ge=1/(d-L),Ce=1/(W-te),Te=1/(ue-me);return R[0]=-2*ge,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=-2*Ce,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=2*Te,R[11]=0,R[12]=(d+L)*ge,R[13]=(te+W)*Ce,R[14]=(me+ue)*Te,R[15]=1,R},l.c8=class extends Wi{constructor(R,d){super(R,d),this.current=new Array}set(R){if(R!=this.current){this.current=R;let d=new Float32Array(4*R.length);for(let L=0;L25||W<0||W>=1||L<0||L>=1)},l.cE=function(R,d){return R[0]=d[0],R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=d[1],R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=d[2],R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R},l.cF=class extends Jt{},l.cG=Tt,l.cH=function(R,d){Ye.REGISTERED_PROTOCOLS[R]=d},l.cI=function(R){delete Ye.REGISTERED_PROTOCOLS[R]},l.cJ=function(R,d){let L={};for(let te=0;teHn*Rc)}let bn=Ce?"center":te.get("text-justify").evaluate(Pe,{},R.canonical),Fn=te.get("symbol-placement")==="point"?te.get("text-max-width").evaluate(Pe,{},R.canonical)*Rc:1/0,gn=()=>{R.bucket.allowVerticalPlacement&&Br($r)&&(Qt.vertical=xy(er,R.glyphMap,R.glyphPositions,R.imagePositions,it,Fn,ge,nn,"left",Ca,sr,l.ax.vertical,!0,bt,He))};if(!Ce&&qa){let Va=new Set;if(bn==="auto")for(let ni=0;niWY(ge,Ce,ue),W.layers[me])}(R,L,d),L.finish()},l.cT=function(R,d,L,W,te,ue){let me=JS(R,d,L,te,0);return me=JS(me,d,W,ue,1),me},l.cU=class{constructor(R){this.maxEntries=R,this.map=new Map}get(R){let d=this.map.get(R);return d!==void 0&&(this.map.delete(R),this.map.set(R,d)),d}set(R,d){if(this.map.has(R))this.map.delete(R);else if(this.map.size>=this.maxEntries){let L=this.map.keys().next().value;this.map.delete(L)}this.map.set(R,d)}clear(){this.map.clear()}},l.cV=w4,l.cW=_y,l.cX=YS,l.cY=function(R,d,L,W,te){return e(this,void 0,void 0,function*(){if(v())try{return yield Se(R,d,L,W,te)}catch{}return function(ue,me,ge,Ce,Te){let Oe=ue.width,Pe=ue.height;Ie&&Ve||(Ie=new OffscreenCanvas(Oe,Pe),Ve=Ie.getContext("2d",{willReadFrequently:!0})),Ie.width=Oe,Ie.height=Pe,Ve.drawImage(ue,0,0,Oe,Pe);let it=Ve.getImageData(me,ge,Ce,Te);return Ve.clearRect(0,0,Oe,Pe),it.data}(R,d,L,W,te)})},l.cZ=mp,l.c_=class{constructor(R,d){this.layers={[zg]:this},this.name=zg,this.version=d?d.version:1,this.extent=d?d.extent:4096,this.length=R.length,this.features=R}feature(R){return new HY(this.features[R],this.extent)}},l.ca=class extends sa{},l.cb=VW,l.cc=class extends Tn{},l.cd=Lu,l.ce=function(R){return R<=1?1:Math.pow(2,Math.ceil(Math.log(R)/Math.LN2))},l.cf=au,l.cg=function(R,d,L){var W=d[0],te=d[1],ue=d[2],me=L[3]*W+L[7]*te+L[11]*ue+L[15];return R[0]=(L[0]*W+L[4]*te+L[8]*ue+L[12])/(me=me||1),R[1]=(L[1]*W+L[5]*te+L[9]*ue+L[13])/me,R[2]=(L[2]*W+L[6]*te+L[10]*ue+L[14])/me,R},l.ch=class extends mr{},l.ci=class extends y{},l.cj=function(R,d){return R[0]===d[0]&&R[1]===d[1]&&R[2]===d[2]&&R[3]===d[3]&&R[4]===d[4]&&R[5]===d[5]&&R[6]===d[6]&&R[7]===d[7]&&R[8]===d[8]&&R[9]===d[9]&&R[10]===d[10]&&R[11]===d[11]&&R[12]===d[12]&&R[13]===d[13]&&R[14]===d[14]&&R[15]===d[15]},l.ck=function(R,d){var L=R[0],W=R[1],te=R[2],ue=R[3],me=R[4],ge=R[5],Ce=R[6],Te=R[7],Oe=R[8],Pe=R[9],it=R[10],He=R[11],bt=R[12],Et=R[13],Qt=R[14],er=R[15],br=d[0],sr=d[1],Mr=d[2],qr=d[3],$r=d[4],_a=d[5],Ca=d[6],nn=d[7],qa=d[8],bn=d[9],Fn=d[10],gn=d[11],Va=d[12],Hn=d[13],ni=d[14],Wn=d[15];return Math.abs(L-br)<=g*Math.max(1,Math.abs(L),Math.abs(br))&&Math.abs(W-sr)<=g*Math.max(1,Math.abs(W),Math.abs(sr))&&Math.abs(te-Mr)<=g*Math.max(1,Math.abs(te),Math.abs(Mr))&&Math.abs(ue-qr)<=g*Math.max(1,Math.abs(ue),Math.abs(qr))&&Math.abs(me-$r)<=g*Math.max(1,Math.abs(me),Math.abs($r))&&Math.abs(ge-_a)<=g*Math.max(1,Math.abs(ge),Math.abs(_a))&&Math.abs(Ce-Ca)<=g*Math.max(1,Math.abs(Ce),Math.abs(Ca))&&Math.abs(Te-nn)<=g*Math.max(1,Math.abs(Te),Math.abs(nn))&&Math.abs(Oe-qa)<=g*Math.max(1,Math.abs(Oe),Math.abs(qa))&&Math.abs(Pe-bn)<=g*Math.max(1,Math.abs(Pe),Math.abs(bn))&&Math.abs(it-Fn)<=g*Math.max(1,Math.abs(it),Math.abs(Fn))&&Math.abs(He-gn)<=g*Math.max(1,Math.abs(He),Math.abs(gn))&&Math.abs(bt-Va)<=g*Math.max(1,Math.abs(bt),Math.abs(Va))&&Math.abs(Et-Hn)<=g*Math.max(1,Math.abs(Et),Math.abs(Hn))&&Math.abs(Qt-ni)<=g*Math.max(1,Math.abs(Qt),Math.abs(ni))&&Math.abs(er-Wn)<=g*Math.max(1,Math.abs(er),Math.abs(Wn))},l.cl=function(R,d){return R[0]=d[0],R[1]=d[1],R[2]=d[2],R[3]=d[3],R[4]=d[4],R[5]=d[5],R[6]=d[6],R[7]=d[7],R[8]=d[8],R[9]=d[9],R[10]=d[10],R[11]=d[11],R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15],R},l.cm=R=>R.type==="circle",l.cn=R=>R.type==="heatmap",l.co=R=>R.type==="line",l.cp=R=>R.type==="fill",l.cq=R=>R.type==="fill-extrusion",l.cr=R=>R.type==="hillshade",l.cs=R=>R.type==="color-relief",l.ct=R=>R.type==="background",l.cu=R=>R.type==="custom",l.cv=re,l.cw=function(R,d,L){if(d<=0)return R;let W=1/d;return L===void 0||Math.abs(L)<1e-10?Math.round(R*W)/W:(L>0?Math.ceil(R*W-1e-9):Math.floor(R*W+1e-10))/W},l.cx=function(R,d,L){let W=B(d.x-L.x,d.y-L.y),te=B(R.x-L.x,R.y-L.y);var ue,me;return _e(Math.atan2(W[0]*te[1]-W[1]*te[0],(ue=W)[0]*(me=te)[0]+ue[1]*me[1]))},l.cy=ne,l.cz=function(R,d){var L;if(!ve[d])return!1;let W=R?.target,te=((L=W?.ownerDocument)===null||L===void 0?void 0:L.defaultView)||window;return R instanceof te.MouseEvent||R instanceof te.WheelEvent},l.d=j,l.d0=class{constructor(R,d){let L=(d=this.options=Object.assign({},RW,d)).debug;if(L&&console.time("preprocess data"),d.maxZoom<0||d.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(d.promoteId&&d.generateId)throw new Error("promoteId and generateId cannot be used together.");let W=c3(R,d);L&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",d.indexMaxZoom,d.indexMaxPoints),console.time("generate tiles")),W=p3(W,d),d.updateable&&(this.source=W),this.initializeIndex(W,d)}initializeIndex(R,d){this.tileIndex=d.cluster?new MW(d.clusterOptions):new PW(d),R.length&&this.tileIndex.initialize(R)}getTile(R,d,L){return d=+d,L=+L,(R=+R)<0||R>24?null:this.tileIndex.getTile(R,d,L)}updateData(R,d){let L=this.options;if(!L.updateable)throw new Error("to update tile geojson `updateable` option must be set to true");let{affected:W,source:te}=function(ue,me,ge){let Ce=function(Oe,Pe){var it,He;return Oe?{removeAll:Oe.removeAll,remove:new Set(Oe.remove||[]),add:new Map((it=Oe.add)==null?void 0:it.map(bt=>[Pe.promoteId?bt.properties[Pe.promoteId]:bt.id,bt])),update:new Map((He=Oe.update)==null?void 0:He.map(bt=>[bt.id,bt]))}:{remove:new Set,add:new Map,update:new Map}}(me,ge),Te=[];if(Ce.removeAll&&(Te=ue,ue=[]),Ce.remove.size||Ce.add.size){let Oe=[];for(let Pe of ue)(Ce.remove.has(Pe.id)||Ce.add.has(Pe.id))&&Oe.push(Pe);if(Oe.length){Te.push(...Oe);let Pe=new Set(Oe.map(it=>it.id));ue=ue.filter(it=>!Pe.has(it.id))}if(Ce.add.size){let Pe=c3({type:"FeatureCollection",features:Array.from(Ce.add.values())},ge);Pe=p3(Pe,ge),Te.push(...Pe),ue.push(...Pe)}}if(Ce.update.size){let Oe=new Map,Pe=[];for(let it of ue)Ce.update.has(it.id)?Oe.set(it.id,[...Oe.get(it.id)||[],it]):Pe.push(it);for(let[it,He]of Ce.update){let bt=Oe.get(it);if(!bt||bt.length===0)continue;let Et=AW(bt,He,ge);Te.push(...bt,...Et),Pe.push(...Et)}ue=Pe}return{affected:Te,source:ue}}(this.source,R,L);d&&({affected:W,source:te}=this.filterUpdate(te,W,d)),W.length&&(this.source=te,this.tileIndex.updateIndex(te,W,L))}filterUpdate(R,d,L){let W=new Set;for(let te of R)te.id!=null&&(L(vy(te))||(d.push(te),W.add(te.id)));return{affected:d,source:R=R.filter(te=>!W.has(te.id))}}getData(){if(!this.options.updateable)throw new Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map(R=>vy(R))}}updateClusterOptions(R,d){let L=this.options.cluster;this.options.cluster=R,this.options.clusterOptions=d,L!=R?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(R){return this.tileIndex.getClusterExpansionZoom(R)}getClusterChildren(R){return this.tileIndex.getChildren(R)}getClusterLeaves(R,d,L){return this.tileIndex.getLeaves(R,d,L)}},l.d1=Si,l.e=X,l.f=rr,l.g=yt,l.h=R=>e(void 0,void 0,void 0,function*(){if(R.byteLength===0)return createImageBitmap(new ImageData(1,1));let d=new Blob([new Uint8Array(R)],{type:"image/png"});try{return createImageBitmap(d)}catch(L){throw new Error(`Could not load image because of ${j(L).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),l.i=he,l.j=R=>new Promise((d,L)=>{let W=new Image;W.onload=()=>{d(W),URL.revokeObjectURL(W.src),W.onload=null,window.requestAnimationFrame(()=>W.src=Me)},W.onerror=()=>L(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let te=new Blob([new Uint8Array(R)],{type:"image/png"});W.src=R.byteLength?URL.createObjectURL(te):Me}),l.k=(R,d)=>$t(X(R,{type:"json"}),d),l.l=Ot,l.m=$t,l.n=or,l.o=(R,d)=>$t(X(R,{type:"arrayBuffer"}),d),l.p=J4,l.q=function(R){return new _y(R).readFields(nY,[])},l.r=function(R){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(R))},l.s=Ge,l.t=As,l.u=Ps,l.v=Pc,l.w=ee,l.x=ht,l.y=vo,l.z=Bl}),E("worker",["./shared"],function(l){"use strict";class e{constructor(T,f){this.keyCache={},T&&this.replace(T,f)}replace(T,f){this._layerConfigs={},this._layers={},this.update(T,[],f)}update(T,f,u){for(let x of T){this._layerConfigs[x.id]=x;let z=this._layers[x.id]=l.bT(x,u);z._featureFilter=l.ah(z.filter,u),this.keyCache[x.id]&&delete this.keyCache[x.id]}for(let x of f)delete this.keyCache[x],delete this._layerConfigs[x],delete this._layers[x];this.familiesBySource={};let A=l.cJ(Object.values(this._layerConfigs),this.keyCache);for(let x of A){let z=x.map(P=>this._layers[P.id]),I=z[0];if(I.isHidden())continue;let O=I.source||"",D=this.familiesBySource[O];D||(D=this.familiesBySource[O]={});let B=I.sourceLayer||l.ag,F=D[B];F||(F=D[B]=[]),F.push(z)}}}class t{constructor(T){let f={},u=[];for(let I in T){let O=T[I],D=f[I]={};for(let B in O){let F=O[+B];if(!F||F.bitmap.width===0||F.bitmap.height===0)continue;let P={x:0,y:0,w:F.bitmap.width+2,h:F.bitmap.height+2};u.push(P),D[B]={rect:P,metrics:F.metrics}}}let{w:A,h:x}=l.p(u),z=new l.t({width:A||1,height:x||1});for(let I in T){let O=T[I];for(let D in O){let B=O[+D];if(!B||B.bitmap.width===0||B.bitmap.height===0)continue;let F=f[I][D].rect;l.t.copy(B.bitmap,z,{x:0,y:0},{x:F.x+1,y:F.y+1},B.bitmap)}}this.image=z,this.positions=f}}l.cK("GlyphAtlas",t);class n{constructor(T){this.tileID=new l.a3(T.tileID.overscaledZ,T.tileID.wrap,T.tileID.canonical.z,T.tileID.canonical.x,T.tileID.canonical.y),this.uid=T.uid,this.zoom=T.zoom,this.pixelRatio=T.pixelRatio,this.tileSize=T.tileSize,this.source=T.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=T.showCollisionBoxes,this.collectResourceTiming=!!T.collectResourceTiming,this.returnDependencies=!!T.returnDependencies,this.promoteId=T.promoteId,this.inFlightDependencies=[]}parse(T,f,u,A,x){return l._(this,void 0,void 0,function*(){this.status="parsing",this.data=T,this.collisionBoxArray=new l.ae;let z=new l.cL(Object.keys(T.layers).sort()),I=new l.cM(this.tileID,this.promoteId);I.bucketLayerIDs=[];let O={},D={featureIndex:I,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:u,subdivisionGranularity:x},B=f.familiesBySource[this.source];for(let q in B){let Z=T.layers[q];if(!Z)continue;Z.version===1&&l.w(`Vector tile source "${this.source}" layer "${q}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ee=z.encode(q),ae=[];for(let he=0;hewe.id)))}}let F=l.bY(D.glyphDependencies,q=>Object.keys(q).map(Number));for(let q of this.inFlightDependencies)q?.abort();this.inFlightDependencies=[];let P=Promise.resolve({});if(Object.keys(F).length){let q=new AbortController;this.inFlightDependencies.push(q),P=A.sendAsync({type:"GG",data:{stacks:F,source:this.source,tileID:this.tileID,type:"glyphs"}},q)}let j=Object.keys(D.iconDependencies),U=Promise.resolve({});if(j.length){let q=new AbortController;this.inFlightDependencies.push(q),U=A.sendAsync({type:"GI",data:{icons:j,source:this.source,tileID:this.tileID,type:"icons"}},q)}let $=Object.keys(D.patternDependencies),Q=Promise.resolve({});if($.length){let q=new AbortController;this.inFlightDependencies.push(q),Q=A.sendAsync({type:"GI",data:{icons:$,source:this.source,tileID:this.tileID,type:"patterns"}},q)}let re=D.dashDependencies,ne=Promise.resolve({});if(Object.keys(re).length){let q=new AbortController;this.inFlightDependencies.push(q),ne=A.sendAsync({type:"GDA",data:{dashes:re}},q)}let[se,G,X,K]=yield Promise.all([P,U,Q,ne]),H=new t(se),Y=new l.cN(G,X);for(let q in O){let Z=O[q];Z instanceof l.af?(r(Z.layers,this.zoom,u),l.cO({bucket:Z,glyphMap:se,glyphPositions:H.positions,imageMap:G,imagePositions:Y.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:D.subdivisionGranularity})):Z.hasDependencies&&(Z instanceof l.cP||Z instanceof l.cQ||Z instanceof l.cR)&&(r(Z.layers,this.zoom,u),Z.addFeatures(D,this.tileID.canonical,Y.patternPositions,K))}return this.status="done",{buckets:Object.values(O).filter(q=>!q.isEmpty()),featureIndex:I,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:H.image,imageAtlas:Y,dashPositions:K,glyphMap:this.returnDependencies?se:null,iconMap:this.returnDependencies?G:null,glyphPositions:this.returnDependencies?H.positions:null}})}}function r(_,T,f){let u=new l.J(T);for(let A of _)A.recalculate(u,f)}class a{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(T,f){this.loading[T]=f}finishLoading(T){delete this.loading[T]}abort(T){let f=this.loading[T];f?.abort&&(f.abort.abort(),delete this.loading[T])}setParsing(T,f){this.parsing[T]=f}consumeParsing(T){let f=this.parsing[T];if(f)return delete this.parsing[T],f}clearParsing(T){delete this.parsing[T]}markLoaded(T,f){this.loaded[T]=f}getLoaded(T){let f=this.loaded[T];if(f)return f}removeLoaded(T){delete this.loaded[T]}clearLoaded(){this.loaded={}}}class o{constructor(T){this.start=`${T}#start`,this.end=`${T}#end`,this.measure=T,performance.mark(this.start)}finish(){performance.mark(this.end);let T=performance.getEntriesByName(this.measure);return T.length===0&&(performance.measure(this.measure,this.start,this.end),T=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),T}}class s{constructor(T,f,u,A,x){this.type=T,this.properties=u||{},this.extent=x,this.pointsArray=f,this.id=A}loadGeometry(){return this.pointsArray.map(T=>T.map(f=>new l.P(f.x,f.y)))}}class c{constructor(T,f,u){this.version=2,this._myFeatures=T,this.name=f,this.length=T.length,this.extent=u}feature(T){return this._myFeatures[T]}}class m{constructor(){this.layers={}}addLayer(T){this.layers[T.name]=T}}function h(_){let T=l.cS(_);return T.byteOffset===0&&T.byteLength===T.buffer.byteLength||(T=new Uint8Array(T)),{vectorTile:_,rawData:T.buffer}}function v(_,T,f){let{extent:u}=_,A=Math.pow(2,f.z-T.z),x=(f.x-T.x*A)*u,z=(f.y-T.y*A)*u,I=[];for(let O=0;O<_.length;O++){let D=_.feature(O),B=D.loadGeometry();for(let P of B)for(let j of P)j.x=j.x*A-x,j.y=j.y*A-z;let F=128;B=l.cT(B,D.type,-F,-F,u+F,u+F),B.length!==0&&I.push(new s(D.type,B,D.properties,D.id,u))}return new c(I,_.name,u)}class g{constructor(T,f,u){this.actor=T,this.layerIndex=f,this.availableImages=u,this.tileState=new a,this.overzoomedTileResultCache=new l.cU(1e3)}loadVectorTile(T,f){try{return{vectorTile:T.encoding!=="mlt"?new l.cV(new l.cW(f)):new l.cX(f),rawData:f}}catch(u){let A=new Uint8Array(f),x=`Unable to parse the tile at ${T.request.url}, `;throw x+=A[0]===31&&A[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${l.d(u).message}`,new Error(x)}}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f,overzoomParameters:u}=T;u&&(T.request=u.overzoomRequest);let A=this._startRequestTiming(T),x=new n(T);this.tileState.startLoading(f,x);let z=new AbortController;x.abort=z;try{let I=yield l.o(T.request,z);if(T.etag&&T.etag===I.etag)return this.tileState.finishLoading(f),this._getEtagUnmodifiedResult(I,A);let O=this.loadVectorTile(T,I.data);if(this.tileState.finishLoading(f),!O)return null;let{vectorTile:D,rawData:B}=O;u&&({vectorTile:D,rawData:B}=this._getOverzoomTile(T,D));let F=this._getExpiryData(I),P=this._finishRequestTiming(A);x.vectorTile=D,this.tileState.markLoaded(f,x);let j={rawData:B,cacheControl:F,resourceTiming:P};this.tileState.setParsing(f,j);try{return yield this._parseWorkerTile(x,T,j)}finally{this.tileState.clearParsing(f)}}catch(I){throw this.tileState.finishLoading(f),x.status="done",this.tileState.markLoaded(f,x),I}})}_getEtagUnmodifiedResult(T,f){let u=this._getExpiryData(T),A=this._finishRequestTiming(f);return l.e({etagUnmodified:!0},u,A)}_parseWorkerTile(T,f,u){return l._(this,void 0,void 0,function*(){let A=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,f.subdivisionGranularity);if(u){let{rawData:x,cacheControl:z,resourceTiming:I}=u;A=l.e({rawTileData:x.slice(0),encoding:f.encoding},A,z,I)}return A})}_getExpiryData({expires:T,cacheControl:f,etag:u}){let A={};return T&&(A.expires=T),f&&(A.cacheControl=f),u&&(A.etag=u),A}_startRequestTiming(T){var f;if(!((f=T.request)===null||f===void 0)&&f.collectResourceTiming)return new o(T.request.url)}_finishRequestTiming(T){let f=T?.finish();return f?{resourceTiming:JSON.parse(JSON.stringify(f))}:{}}_getOverzoomTile(T,f){var u;let{tileID:A,source:x,overzoomParameters:z}=T,{maxZoomTileID:I}=z,O=`${I.key}_${A.key}_${(u=T.request)===null||u===void 0?void 0:u.url}`,D=this.overzoomedTileResultCache.get(O);if(D)return D;let B=new m,F=this.layerIndex.familiesBySource[x];for(let j in F){let U=f.layers[j];if(!U)continue;let $=v(U,I,A.canonical);$.length>0&&B.addLayer($)}let P=h(B);return this.overzoomedTileResultCache.set(O,P),P}reloadTile(T){return l._(this,void 0,void 0,function*(){let f=T.uid,u=this.tileState.getLoaded(f);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=T.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(f);return yield this._parseWorkerTile(u,T,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,T)})}abortTile(T){return l._(this,void 0,void 0,function*(){this.tileState.abort(T.uid)})}removeTile(T){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(T.uid)})}}class i{constructor(){this.loaded={}}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f,encoding:u,rawImageData:A,redFactor:x,greenFactor:z,blueFactor:I,baseShift:O}=T,D=A.width+2,B=A.height+2,F=l.b(A)?new l.R({width:D,height:B},yield l.cY(A,-1,-1,D,B)):A,P=new l.cZ(f,F,u,x,z,I,O);return this.loaded||(this.loaded={}),this.loaded[f]=P,P})}removeTile(T){let f=this.loaded,u=T.uid;f?.[u]&&delete f[u]}}class w{constructor(T,f,u,A=S){this.actor=T,this.layerIndex=f,this.availableImages=u,this.tileState=new a,this._createGeoJSONIndex=A}loadVectorTile(T){if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let{z:f,x:u,y:A}=T.tileID.canonical,x=this._geoJSONIndex.getTile(f,u,A);return x?h(new l.c_(x.features,{version:2,extent:l.a6})):null}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f}=T,u=new n(T);u.abort=new AbortController;try{let A=this.loadVectorTile(T);if(!A)return null;let{vectorTile:x,rawData:z}=A;u.vectorTile=x,this.tileState.markLoaded(f,u);let I={rawData:z};this.tileState.setParsing(f,I);try{return yield this._parseWorkerTile(u,T,I)}finally{this.tileState.clearParsing(f)}}catch(A){throw u.status="done",this.tileState.markLoaded(f,u),A}})}_reloadLoadedTile(T){return l._(this,void 0,void 0,function*(){let f=T.uid,u=this.tileState.getLoaded(f);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=T.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(f);return yield this._parseWorkerTile(u,T,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,T)})}_parseWorkerTile(T,f,u){return l._(this,void 0,void 0,function*(){let A=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,f.subdivisionGranularity);if(u){let{rawData:x}=u;A=l.e({rawTileData:x.slice(0),encoding:"mvt"},A)}return A})}abortTile(T){return l._(this,void 0,void 0,function*(){this.tileState.abort(T.uid)})}removeTile(T){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(T.uid)})}loadData(T){return l._(this,void 0,void 0,function*(){var f;(f=this._pendingRequest)===null||f===void 0||f.abort();let u=this._startRequestTiming(T);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(T,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let A={};return T.request&&(A.data=T.data),this._finishRequestTiming(u,T,A),A}catch(A){if(delete this._pendingRequest,!l.$(A))throw A;return{abandoned:!0}}})}_startRequestTiming(T){var f;if(!((f=T.request)===null||f===void 0)&&f.collectResourceTiming)return new o(T.request.url)}_finishRequestTiming(T,f,u){let A=T?.finish();A&&(u.resourceTiming={[f.source]:JSON.parse(JSON.stringify(A))})}reloadTile(T){return this.tileState.getLoaded(T.uid)?this._reloadLoadedTile(T):this.loadTile(T)}loadAndProcessGeoJSON(T,f){return l._(this,void 0,void 0,function*(){var u;if(T.request&&(T.data=(yield l.k(T.request,f)).data),T.data)return T.data=this._filterGeoJSON(T.data,T.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(T.data,T));if(T.dataDiff)return(u=this._geoJSONIndex)!==null&&u!==void 0||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},T)),void this._geoJSONIndex.updateData(T.dataDiff,this._getFilterPredicate(T.filter));if(T.updateCluster&&this._geoJSONIndex.updateClusterOptions(T.geojsonVtOptions.cluster,M(T)),this._geoJSONIndex==null)throw new Error(`Input data given to '${T.source}' is not a valid GeoJSON object.`)})}_filterGeoJSON(T,f){if(T.type!=="FeatureCollection")return T;let u=this._getFilterPredicate(f);return u?{type:"FeatureCollection",features:T.features.filter(A=>u(A))}:T}_getFilterPredicate(T){if(typeof T!="boolean"&&!T?.length)return;let f=l.c$(T,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(f.result==="error")throw new Error(f.value.map(u=>`${u.key}: ${u.message}`).join(", "));return u=>f.value.evaluate({zoom:0},u)}removeSource(T){return l._(this,void 0,void 0,function*(){var f;(f=this._pendingRequest)===null||f===void 0||f.abort()})}getClusterExpansionZoom(T){return this._geoJSONIndex.getClusterExpansionZoom(T.clusterId)}getClusterChildren(T){return this._geoJSONIndex.getClusterChildren(T.clusterId)}getClusterLeaves(T){return this._geoJSONIndex.getClusterLeaves(T.clusterId,T.limit,T.offset)}}function S(_,T){let f=l.e(T.geojsonVtOptions||{},{updateable:!0,clusterOptions:M(T)});return new l.d0(_,f)}function M({geojsonVtOptions:_,clusterProperties:T}){if(!T||!_.clusterOptions)return _.clusterOptions;let f={},u={},A={accumulated:null,zoom:0},x={properties:null},z=Object.keys(T);for(let I of z){let[O,D]=T[I],B=l.c$(D),F=l.c$(typeof O=="string"?[O,["accumulated"],["get",I]]:O);f[I]=B.value,u[I]=F.value}return _.clusterOptions.map=I=>{x.properties=I;let O={};for(let D of z)O[D]=f[D].evaluate(A,x);return O},_.clusterOptions.reduce=(I,O)=>{x.properties=O;for(let D of z)A.accumulated=I[D],I[D]=u[D].evaluate(A,x)},_.clusterOptions}class C{constructor(T){this.self=T,this.actor=new l.N(T),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(f,u)=>{if(this.externalWorkerSourceTypes[f])throw new Error(`Worker source with name "${f}" already registered.`);this.externalWorkerSourceTypes[f]=u},this.self.addProtocol=l.cH,this.self.removeProtocol=l.cI,this.self.registerRTLTextPlugin=f=>{l.d1.setMethods(f)},this.self.makeRequest=l.m,this.actor.registerMessageHandler("LDT",(f,u)=>this._getDEMWorkerSource(f,u.source).loadTile(u)),this.actor.registerMessageHandler("RDT",(f,u)=>l._(this,void 0,void 0,function*(){this._getDEMWorkerSource(f,u.source).removeTile(u)})),this.actor.registerMessageHandler("GCEZ",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterExpansionZoom(u)})),this.actor.registerMessageHandler("GCC",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterChildren(u)})),this.actor.registerMessageHandler("GCL",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterLeaves(u)})),this.actor.registerMessageHandler("LD",(f,u)=>this._getWorkerSource(f,u.type,u.source).loadData(u)),this.actor.registerMessageHandler("LT",(f,u)=>this._getWorkerSource(f,u.type,u.source).loadTile(u)),this.actor.registerMessageHandler("RT",(f,u)=>this._getWorkerSource(f,u.type,u.source).reloadTile(u)),this.actor.registerMessageHandler("AT",(f,u)=>this._getWorkerSource(f,u.type,u.source).abortTile(u)),this.actor.registerMessageHandler("RMT",(f,u)=>this._getWorkerSource(f,u.type,u.source).removeTile(u)),this.actor.registerMessageHandler("RS",(f,u)=>l._(this,void 0,void 0,function*(){var A,x;if(!(!((x=(A=this.workerSources[f])===null||A===void 0?void 0:A[u.type])===null||x===void 0)&&x[u.source]))return;let z=this.workerSources[f][u.type][u.source];delete this.workerSources[f][u.type][u.source],z.removeSource!==void 0&&z.removeSource(u)})),this.actor.registerMessageHandler("RM",f=>l._(this,void 0,void 0,function*(){delete this.layerIndexes[f],delete this.availableImages[f],delete this.workerSources[f],delete this.demWorkerSources[f],this.globalStates.delete(f)})),this.actor.registerMessageHandler("SR",(f,u)=>l._(this,void 0,void 0,function*(){this.referrer=u})),this.actor.registerMessageHandler("SRPS",(f,u)=>this._syncRTLPluginState(f,u)),this.actor.registerMessageHandler("IS",(f,u)=>l._(this,void 0,void 0,function*(){this.self.importScripts(u)})),this.actor.registerMessageHandler("SI",(f,u)=>this._setImages(f,u)),this.actor.registerMessageHandler("UL",(f,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(f).update(u.layers,u.removedIds,this._getGlobalState(f))})),this.actor.registerMessageHandler("UGS",(f,u)=>l._(this,void 0,void 0,function*(){let A=this._getGlobalState(f);for(let x in u)A[x]=u[x]})),this.actor.registerMessageHandler("SL",(f,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(f).replace(u,this._getGlobalState(f))}))}_getGlobalState(T){let f=this.globalStates.get(T);return f||(f={},this.globalStates.set(T,f)),f}_setImages(T,f){return l._(this,void 0,void 0,function*(){this.availableImages[T]=f;for(let u in this.workerSources[T]){let A=this.workerSources[T][u];for(let x in A)A[x].availableImages=f}})}_syncRTLPluginState(T,f){return l._(this,void 0,void 0,function*(){return yield l.d1.syncState(f,this.self.importScripts)})}_getAvailableImages(T){let f=this.availableImages[T];return f||(f=[]),f}_getLayerIndex(T){let f=this.layerIndexes[T];return f||(f=this.layerIndexes[T]=new e),f}_getWorkerSource(T,f,u){var A,x;if((A=this.workerSources)[T]||(A[T]={}),(x=this.workerSources[T])[f]||(x[f]={}),!this.workerSources[T][f][u]){let z={sendAsync:(I,O)=>(I.targetMapId=T,this.actor.sendAsync(I,O))};switch(f){case"vector":this.workerSources[T][f][u]=new g(z,this._getLayerIndex(T),this._getAvailableImages(T));break;case"geojson":this.workerSources[T][f][u]=new w(z,this._getLayerIndex(T),this._getAvailableImages(T));break;default:this.workerSources[T][f][u]=new this.externalWorkerSourceTypes[f](z,this._getLayerIndex(T),this._getAvailableImages(T))}}return this.workerSources[T][f][u]}_getDEMWorkerSource(T,f){var u,A;return(u=this.demWorkerSources)[T]||(u[T]={}),(A=this.demWorkerSources[T])[f]||(A[f]=new i),this.demWorkerSources[T][f]}}return l.i(self)&&(self.worker=new C(self)),C}),E("index",["exports","./shared"],function(l,e){"use strict";var t="5.24.0";function n(){var pe=new e.A(4);return e.A!=Float32Array&&(pe[1]=0,pe[2]=0),pe[0]=1,pe[3]=1,pe}let r,a,o,s={frame(pe,y,N,ie){let fe=ie||window,be=fe.requestAnimationFrame(je=>{Re(),y(je)}),{unsubscribe:Re}=e.s(pe.signal,"abort",()=>{Re(),fe.cancelAnimationFrame(be),N(new e.a(pe.signal.reason))},!1)},frameAsync(pe,y){return new Promise((N,ie)=>{this.frame(pe,N,ie,y)})},getImageData(pe,y=0){return this.getImageCanvasContext(pe).getImageData(-y,-y,pe.width+2*y,pe.height+2*y)},getImageCanvasContext(pe){let y=window.document.createElement("canvas"),N=y.getContext("2d",{willReadFrequently:!0});if(!N)throw new Error("failed to create canvas 2d context");return y.width=pe.width,y.height=pe.height,N.drawImage(pe,0,0,pe.width,pe.height),N},resolveURL:pe=>(r||(r=document.createElement("a")),r.href=pe,r.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return o!==void 0?o:!!matchMedia&&(a!=null||(a=matchMedia("(prefers-reduced-motion: reduce)")),a.matches)},set prefersReducedMotion(pe){o=pe}},c=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt!==null?this._frozenAt:performance.now()}setNow(pe){this._frozenAt=pe}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};function m(){return c.getCurrentTime()}var h,v;class g{static create(y,N,ie){let fe=window.document.createElement(y);return N!==void 0&&(fe.className=N),ie&&ie.appendChild(fe),fe}static createNS(y,N){return window.document.createElementNS(y,N)}static disableDrag(){g.docStyle&&g.selectProp&&(g.userSelect=g.docStyle[g.selectProp],g.docStyle[g.selectProp]="none")}static enableDrag(){g.docStyle&&g.selectProp&&(g.docStyle[g.selectProp]=g.userSelect)}static suppressClickInternal(y){y.preventDefault(),y.stopPropagation(),window.removeEventListener("click",g.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",g.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",g.suppressClickInternal,!0)},0)}static getScale(y){let N=y.getBoundingClientRect();return{x:N.width/y.offsetWidth||1,y:N.height/y.offsetHeight||1,boundingClientRect:N}}static getPoint(y,N,ie){let fe=N.boundingClientRect;return new e.P((ie.clientX-fe.left)/N.x-y.clientLeft,(ie.clientY-fe.top)/N.y-y.clientTop)}static mousePos(y,N){let ie=g.getScale(y);return g.getPoint(y,ie,N)}static touchPos(y,N){let ie=[],fe=g.getScale(y);for(let be of N)ie.push(g.getPoint(y,fe,be));return ie}static sanitize(y){let N=new DOMParser().parseFromString(y,"text/html").body||document.createElement("body"),ie=N.querySelectorAll("script");for(let fe of ie)fe.remove();return g.clean(N),N.innerHTML}static isPossiblyDangerous(y,N){let ie=N.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(y)||!ie.includes("javascript:")&&!ie.includes("data:"))||!!y.startsWith("on")||void 0}static clean(y){let N=y.children;for(let ie of N)g.removeAttributes(ie),g.clean(ie)}static removeAttributes(y){for(let{name:N,value:ie}of y.attributes)g.isPossiblyDangerous(N,ie)&&y.removeAttribute(N)}}g.docStyle=typeof window<"u"&&((h=window.document)===null||h===void 0?void 0:h.documentElement.style),g.selectProp=!g.docStyle||"userSelect"in g.docStyle?"userSelect":"webkitUserSelect",function(pe){let y,N,ie,fe;pe.resetRequestQueue=()=>{y=[],N=0,ie=0,fe={}},pe.addThrottleControl=Ze=>{let ut=ie++;return fe[ut]=Ze,ut},pe.removeThrottleControl=Ze=>{delete fe[Ze],Re()},pe.getImage=(Ze,ut,ft=!0)=>new Promise((Dt,Gt)=>{Ze.headers||(Ze.headers={}),Ze.headers.accept="image/webp,*/*",e.e(Ze,{type:"image"}),y.push({abortController:ut,requestParameters:Ze,supportImageRefresh:ft,state:"queued",onError:Kt=>{Gt(Kt)},onSuccess:Kt=>{Dt(Kt)}}),Re()});let be=Ze=>e._(this,void 0,void 0,function*(){Ze.state="running";let{requestParameters:ut,supportImageRefresh:ft,onError:Dt,onSuccess:Gt,abortController:Kt}=Ze,st=ft===!1&&!e.i(self)&&!e.g(ut.url)&&(!ut.headers||Object.keys(ut.headers).reduce((ir,dr)=>ir&&dr==="accept",!0));N++;let It=st?je(ut,Kt):e.m(ut,Kt);try{let ir=yield It;delete Ze.abortController,Ze.state="completed",ir.data instanceof HTMLImageElement||e.b(ir.data)?Gt(ir):ir.data&&Gt({data:yield(Ut=ir.data,typeof createImageBitmap=="function"?e.h(Ut):e.j(Ut)),cacheControl:ir.cacheControl,expires:ir.expires})}catch(ir){delete Ze.abortController,Dt(e.d(ir))}finally{N--,Re()}var Ut}),Re=()=>{let Ze=(()=>{for(let ut of Object.keys(fe))if(fe[ut]())return!0;return!1})()?e.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let ut=N;ut0;ut++){let ft=y.shift();ft.abortController.signal.aborted?ut--:be(ft)}},je=(Ze,ut)=>new Promise((ft,Dt)=>{let Gt=new Image,Kt=Ze.url,st=Ze.credentials;st&&st==="include"?Gt.crossOrigin="use-credentials":(st&&st==="same-origin"||!e.f(Kt))&&(Gt.crossOrigin="anonymous"),ut.signal.addEventListener("abort",()=>{Gt.src="",Dt(new e.a(ut.signal.reason))}),Gt.fetchPriority="high",Gt.onload=()=>{Gt.onerror=Gt.onload=null,ft({data:Gt})},Gt.onerror=()=>{Gt.onerror=Gt.onload=null,ut.signal.aborted||Dt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},Gt.src=Kt})}(v||(v={})),v.resetRequestQueue();class i{constructor(y){this._transformRequestFn=y??null}transformRequest(y,N){return this._transformRequestFn&&this._transformRequestFn(y,N)||{url:y}}setTransformRequest(y){this._transformRequestFn=y}}function w(pe){let y=[];if(typeof pe=="string")y.push({id:"default",url:pe});else if(pe&&pe.length>0){let N=[];for(let{id:ie,url:fe}of pe){let be=`${ie}${fe}`;N.includes(be)||(N.push(be),y.push({id:ie,url:fe}))}}return y}function S(pe,y,N){try{let ie=new URL(pe);return ie.pathname+=`${y}${N}`,ie.toString()}catch{throw new Error(`Invalid sprite URL "${pe}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function M(pe){let{userImage:y}=pe;return!(!y?.render||!y.render()||(pe.data.replace(new Uint8Array(y.data.buffer)),0))}class C extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(let y of Object.keys(this.images))this.removeImage(y);this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(y){if(this.loaded!==y&&(this.loaded=y,y)){for(let{ids:N,promiseResolve:ie}of this.requestors)ie(this._getImagesForIds(N));this.requestors=[]}}getImage(y){let N=this.images[y];if(N&&!N.data&&N.spriteData){let ie=N.spriteData;N.data=new e.R({width:ie.width,height:ie.height},ie.context.getImageData(ie.x,ie.y,ie.width,ie.height).data),N.spriteData=null}return N}addImage(y,N){if(this.images[y])throw new Error(`Image id ${y} already exist, use updateImage instead`);this._validate(y,N)&&(this.images[y]=N)}_validate(y,N){let ie=!0,fe=N.data||N.spriteData;return this._validateStretch(N.stretchX,fe?.width)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchX" value`))),ie=!1),this._validateStretch(N.stretchY,fe?.height)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchY" value`))),ie=!1),this._validateContent(N.content,N)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "content" value`))),ie=!1),ie}_validateStretch(y,N){if(!y)return!0;let ie=0;for(let fe of y){if(fe[0]=y[1]))}updateImage(y,N,ie=!0){let fe=this.getImage(y);if(ie&&(fe.data.width!==N.data.width||fe.data.height!==N.data.height))throw new Error(`size mismatch between old image (${fe.data.width}x${fe.data.height}) and new image (${N.data.width}x${N.data.height}).`);N.version=fe.version+1,this.images[y]=N,this.updatedImages[y]=!0}removeImage(y){var N;let ie=this.images[y];delete this.images[y],delete this.patterns[y],!((N=ie.userImage)===null||N===void 0)&&N.onRemove&&ie.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(y){return new Promise((N,ie)=>{let fe=!0;if(!this.isLoaded())for(let be of y)this.images[be]||(fe=!1);this.isLoaded()||fe?N(this._getImagesForIds(y)):this.requestors.push({ids:y,promiseResolve:N})})}_getImagesForIds(y){var N;let ie={};for(let fe of y){let be=this.getImage(fe);be||(this.fire(new e.n("styleimagemissing",{id:fe})),be=this.getImage(fe)),be?ie[fe]={data:be.data.clone(),pixelRatio:be.pixelRatio,sdf:be.sdf,version:be.version,stretchX:be.stretchX,stretchY:be.stretchY,content:be.content,textFitWidth:be.textFitWidth,textFitHeight:be.textFitHeight,hasRenderCallback:!!(!((N=be.userImage)===null||N===void 0)&&N.render)}:e.w(`Image "${fe}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return ie}getPixelSize(){let{width:y,height:N}=this.atlasImage;return{width:y,height:N}}getPattern(y){let N=this.patterns[y],ie=this.getImage(y);if(!ie)return null;if(N&&N.position.version===ie.version)return N.position;if(N)N.position.version=ie.version;else{let fe={w:ie.data.width+2,h:ie.data.height+2,x:0,y:0},be=new e.I(fe,ie);this.patterns[y]={bin:fe,position:be}}return this._updatePatternAtlas(),this.patterns[y].position}bind(y){let N=y.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.T(y,this.atlasImage,N.RGBA),this.atlasTexture.bind(N.LINEAR,N.CLAMP_TO_EDGE)}_updatePatternAtlas(){let y=[];for(let be in this.patterns)y.push(this.patterns[be].bin);let{w:N,h:ie}=e.p(y),fe=this.atlasImage;fe.resize({width:N||1,height:ie||1});for(let be in this.patterns){let{bin:Re}=this.patterns[be],je=Re.x+1,Ze=Re.y+1,ut=this.getImage(be).data,ft=ut.width,Dt=ut.height;e.R.copy(ut,fe,{x:0,y:0},{x:je,y:Ze},{width:ft,height:Dt}),e.R.copy(ut,fe,{x:0,y:Dt-1},{x:je,y:Ze-1},{width:ft,height:1}),e.R.copy(ut,fe,{x:0,y:0},{x:je,y:Ze+Dt},{width:ft,height:1}),e.R.copy(ut,fe,{x:ft-1,y:0},{x:je-1,y:Ze},{width:1,height:Dt}),e.R.copy(ut,fe,{x:0,y:0},{x:je+ft,y:Ze},{width:1,height:Dt})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(y){for(let N of y){if(this.callbackDispatchedThisFrame[N])continue;this.callbackDispatchedThisFrame[N]=!0;let ie=this.getImage(N);ie||e.w(`Image with ID: "${N}" was not found`),M(ie)&&this.updateImage(N,ie)}}cloneImages(){let y={};for(let N in this.images){let ie=this.images[N];y[N]=Object.assign(Object.assign({},ie),{data:ie.data?ie.data.clone():null})}return y}}let _=1e20,T=new Float64Array(256);for(let pe=0;pe<256;pe++){let y=.5-Math.pow(pe/255,.45454545454545453);T[pe]=y*Math.abs(y)}function f(pe,y,N,ie,fe,be,Re,je,Ze){for(let ut=y;ut-1);Ze++,be[Ze]=je,Re[Ze]=ut,Re[Ze+1]=_}for(let je=0,Ze=0;je/[-\w]+/.test(fe)?fe:`'${CSS.escape(fe)}'`).join(",");return new x.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ie,fontWeight:this._fontWeight(N[0]),fontStyle:this._fontStyle(N[0]),lang:this.lang})}_fontStyle(y){return/italic/i.test(y)?"italic":/oblique/i.test(y)?"oblique":"normal"}_fontWeight(y){let N={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},ie;for(let[fe,be]of Object.entries(N))new RegExp(`\\b${fe}\\b`,"i").test(y)&&(ie=`${be}`);return ie}destroy(){for(let y in this.entries){let N=this.entries[y];N.tinySDF=null,N.ideographTinySDF=null,N.glyphs={},N.requests={},N.ranges={}}this.entries={}}}x.loadGlyphRange=function(pe,y,N,ie){return e._(this,void 0,void 0,function*(){let fe=256*y,be=fe+255,Re=yield ie.transformRequest(N.replace("{fontstack}",pe).replace("{range}",`${fe}-${be}`),"Glyphs"),je=yield e.o(Re,new AbortController);if(!je?.data)throw new Error(`Could not load glyph range. range: ${y}, ${fe}-${be}`);let Ze={};for(let ut of e.q(je.data))Ze[ut.id]=ut;return Ze})},x.TinySDF=class{constructor({fontSize:pe=24,buffer:y=3,radius:N=8,cutoff:ie=.25,fontFamily:fe="sans-serif",fontWeight:be="normal",fontStyle:Re="normal",lang:je=null}={}){this.buffer=y,this.radius=N,this.cutoff=ie,this.lang=je;let Ze=this.size=pe+4*y,ut=this._createCanvas(Ze),ft=this.ctx=ut.getContext("2d",{willReadFrequently:!0});ft.font=`${Re} ${be} ${pe}px ${fe}`,ft.textBaseline="alphabetic",ft.textAlign="left",ft.fillStyle="black",this.gridOuter=new Float64Array(Ze*Ze),this.gridInner=new Float64Array(Ze*Ze),this.f=new Float64Array(Ze),this.z=new Float64Array(Ze+1),this.v=new Uint16Array(Ze)}_createCanvas(pe){if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(pe,pe);let y=document.createElement("canvas");return y.width=y.height=pe,y}draw(pe){let{width:y,actualBoundingBoxAscent:N,actualBoundingBoxDescent:ie,actualBoundingBoxLeft:fe,actualBoundingBoxRight:be}=this.ctx.measureText(pe),Re=Math.ceil(N),je=Math.floor(fe),Ze=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(be)-je)),ut=Math.max(0,Math.min(this.size-this.buffer,Re+Math.ceil(ie))),ft=Ze+2*this.buffer,Dt=ut+2*this.buffer,Gt=Math.max(ft*Dt,0),Kt=new Uint8ClampedArray(Gt),st={data:Kt,width:ft,height:Dt,glyphWidth:Ze,glyphHeight:ut,glyphTop:Re,glyphLeft:je,glyphAdvance:y};if(Ze===0||ut===0)return st;let{ctx:It,buffer:Ut,gridInner:ir,gridOuter:dr}=this;this.lang&&(It.lang=this.lang),It.clearRect(Ut,Ut,Ze,ut),It.fillText(pe,Ut-je,Ut+Re);let Ar=It.getImageData(Ut,Ut,Ze,ut);dr.fill(_,0,Gt),ir.fill(0,0,Gt);let hr=3;for(let Cr=0;Cr1&&(Ze=y[++je]);let ft=Math.abs(ut-Ze.left),Dt=Math.abs(ut-Ze.right),Gt=Math.min(ft,Dt),Kt,st=be/ie*(fe+1);if(Ze.isDash){let It=fe-Math.abs(st);Kt=Math.sqrt(Gt*Gt+It*It)}else Kt=fe-Math.sqrt(Gt*Gt+st*st);this.data[Re+ut]=Math.max(0,Math.min(255,Kt+128))}}}addRegularDash(y){for(let je=y.length-1;je>=0;--je){let Ze=y[je],ut=y[je+1];Ze.zeroLength?y.splice(je,1):ut&&ut.isDash===Ze.isDash&&(ut.left=Ze.left,y.splice(je,1))}let N=y[0],ie=y[y.length-1];N.isDash===ie.isDash&&(N.left=ie.left-this.width,ie.right=N.right+this.width);let fe=this.width*this.nextRow,be=0,Re=y[be];for(let je=0;je1&&(Re=y[++be]);let Ze=Math.abs(je-Re.left),ut=Math.abs(je-Re.right),ft=Math.min(Ze,ut);this.data[fe+je]=Math.max(0,Math.min(255,(Re.isDash?ft:-ft)+128))}}addDash(y,N){let ie=N?7:0,fe=2*ie+1;if(this.nextRow+fe>this.height)return e.w("LineAtlas out of space"),null;let be=0;for(let je of y)be+=je;if(be!==0){let je=this.width/be,Ze=this.getDashRanges(y,this.width,je);N?this.addRoundDash(Ze,je,ie):this.addRegularDash(Ze)}let Re={y:this.nextRow+ie,height:2*ie,width:be};return this.nextRow+=fe,this.dirty=!0,Re}bind(y){let N=y.gl;this.texture?(N.bindTexture(N.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,N.texSubImage2D(N.TEXTURE_2D,0,0,0,this.width,this.height,N.ALPHA,N.UNSIGNED_BYTE,this.data))):(this.texture=N.createTexture(),N.bindTexture(N.TEXTURE_2D,this.texture),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_S,N.REPEAT),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_T,N.REPEAT),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MIN_FILTER,N.LINEAR),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MAG_FILTER,N.LINEAR),N.texImage2D(N.TEXTURE_2D,0,N.ALPHA,this.width,this.height,0,N.ALPHA,N.UNSIGNED_BYTE,this.data))}}let P="maplibre_preloaded_worker_pool";class j{constructor(){this.active={}}acquire(y){if(!this.workers)for(this.workers=[];this.workers.lengthe.m(y,N))),Q}function G(pe,y){let N=e.O();return e.Q(N,N,[1,1,0]),e.S(N,N,[.5*pe.width,.5*pe.height,1]),pe.calculatePosMatrix?e.U(N,N,pe.calculatePosMatrix(y.toUnwrapped())):N}function X(pe,y,N,ie,fe,be,Re){var je;let Ze=function(Gt,Kt,st){if(Gt)for(let It of Gt){let Ut=Kt[It];if(Ut?.source===st&&Ut.type==="fill-extrusion")return!0}else for(let It in Kt){let Ut=Kt[It];if(Ut.source===st&&Ut.type==="fill-extrusion")return!0}return!1}((je=fe?.layers)!==null&&je!==void 0?je:null,y,pe.id),ut=be.maxPitchScaleFactor(),ft=pe.tilesIn(ie,ut,Ze);ft.sort(K);let Dt=[];for(let Gt of ft)Dt.push({wrappedTileID:Gt.tileID.wrapped().key,queryResults:Gt.tile.queryRenderedFeatures(y,N,pe.getState(),Gt.queryGeometry,Gt.cameraQueryGeometry,Gt.scale,fe,be,ut,G(be,Gt.tileID),Re?(Kt,st)=>Re(Gt.tileID,Kt,st):void 0)});return function(Gt,Kt){for(let st in Gt)for(let It of Gt[st])H(It,Kt);return Gt}(function(Gt){let Kt={},st={};for(let{queryResults:It,wrappedTileID:Ut}of Gt){st[Ut]||(st[Ut]={});let ir=st[Ut];for(let dr in It){let Ar=It[dr];ir[dr]||(ir[dr]={});let hr=ir[dr];Kt[dr]||(Kt[dr]=[]);for(let vr of Ar)hr[vr.featureIndex]||(hr[vr.featureIndex]=!0,Kt[dr].push(vr))}}return Kt}(Dt),pe)}function K(pe,y){let N=pe.tileID,ie=y.tileID;return N.overscaledZ-ie.overscaledZ||N.canonical.y-ie.canonical.y||N.wrap-ie.wrap||N.canonical.x-ie.canonical.x}function H(pe,y){let N=pe.feature,ie=y.getFeatureState(N.layer["source-layer"],N.id);N.source=N.layer.source,N.layer["source-layer"]&&(N.sourceLayer=N.layer["source-layer"]),N.state=ie}function Y(pe,y,N,ie){return e._(this,void 0,void 0,function*(){let fe=pe;if(pe.url?fe=(yield e.k(yield y.transformRequest(pe.url,"Source"),N)).data:yield s.frameAsync(N,ie),!fe)return null;let be=e.V(e.e(fe,pe),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in fe&&fe.vector_layers&&(be.vectorLayerIds=fe.vector_layers.map(Re=>Re.id)),be})}class q{constructor(y,N){y&&(N?this.setSouthWest(y).setNorthEast(N):Array.isArray(y)&&(y.length===4?this.setSouthWest([y[0],y[1]]).setNorthEast([y[2],y[3]]):this.setSouthWest(y[0]).setNorthEast(y[1])))}setNorthEast(y){return this._ne=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}setSouthWest(y){return this._sw=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}extend(y){let N=this._sw,ie=this._ne,fe,be;if(y instanceof e.W)fe=y,be=y;else{if(!(y instanceof q))return Array.isArray(y)?y.length===4||y.every(Array.isArray)?this.extend(q.convert(y)):this.extend(e.W.convert(y)):y&&("lng"in y||"lon"in y)&&"lat"in y?this.extend(e.W.convert(y)):this;if(fe=y._sw,be=y._ne,!fe||!be)return this}return N||ie?(N.lng=Math.min(fe.lng,N.lng),N.lat=Math.min(fe.lat,N.lat),ie.lng=Math.max(be.lng,ie.lng),ie.lat=Math.max(be.lat,ie.lat)):(this._sw=new e.W(fe.lng,fe.lat),this._ne=new e.W(be.lng,be.lat)),this}getCenter(){return new e.W((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new e.W(this.getWest(),this.getNorth())}getSouthEast(){return new e.W(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(y){let{lng:N,lat:ie}=e.W.convert(y),fe=this._sw.lng<=N&&N<=this._ne.lng;return this._sw.lng>this._ne.lng&&(fe=this._sw.lng>=N&&N>=this._ne.lng),this._sw.lat<=ie&&ie<=this._ne.lat&&fe}intersects(y){if(!((y=q.convert(y)).getNorth()>=this.getSouth()&&y.getSouth()<=this.getNorth()))return!1;let N=Math.abs(this.getEast()-this.getWest()),ie=Math.abs(y.getEast()-y.getWest());if(N>=360||ie>=360)return!0;let fe=e.X(this.getWest(),-180,180),be=e.X(this.getEast(),-180,180),Re=e.X(y.getWest(),-180,180),je=e.X(y.getEast(),-180,180),Ze=fe>be,ut=Re>je;return!(!Ze||!ut)||(Ze?je>=fe||Re<=be:ut?be>=Re||fe<=je:Re<=be&&je>=fe)}static convert(y){return y instanceof q?y:y&&new q(y)}static fromLngLat(y,N=0){let ie=360*N/40075017,fe=ie/Math.cos(Math.PI/180*y.lat);return new q(new e.W(y.lng-fe,y.lat-ie),new e.W(y.lng+fe,y.lat+ie))}adjustAntiMeridian(){let y=new e.W(this._sw.lng,this._sw.lat),N=new e.W(this._ne.lng,this._ne.lat);return new q(y,y.lng>N.lng?new e.W(N.lng+360,N.lat):N)}}class Z{constructor(y,N,ie){this.bounds=q.convert(this.validateBounds(y)),this.minzoom=N||0,this.maxzoom=ie||24}validateBounds(y){return Array.isArray(y)&&y.length===4?[Math.max(-180,y[0]),Math.max(-90,y[1]),Math.min(180,y[2]),Math.min(90,y[3])]:[-180,-90,180,90]}contains(y){let N=Math.pow(2,y.z),ie=Math.floor(e.Z(this.bounds.getWest())*N),fe=Math.floor(e.Y(this.bounds.getNorth())*N),be=Math.ceil(e.Z(this.bounds.getEast())*N),Re=Math.ceil(e.Y(this.bounds.getSouth())*N);return y.x>=ie&&y.x=fe&&y.y{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie={request:yield this.map._requestManager.transformRequest(N,"Tile"),uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,tileSize:this.tileSize*y.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(y),etag:y.etag};ie.request.collectResourceTiming=this._collectResourceTiming;let fe="RT";if(y.actor&&y.state!=="expired"){if(y.state==="loading")return new Promise((be,Re)=>{y.reloadPromise={resolve:be,reject:Re}})}else y.actor=this.dispatcher.getActor(),fe="LT";y.abortController=new AbortController;try{let be=yield y.actor.sendAsync({type:fe,data:ie},y.abortController);if(delete y.abortController,y.aborted)return;this._afterTileLoadWorkerResponse(y,be);let Re={};return be?.etagUnmodified&&(Re.unmodified=!0),Re}catch(be){if(delete y.abortController,y.aborted)return;if(be&&be.status!==404)throw be;this._afterTileLoadWorkerResponse(y,null)}})}_getOverzoomParameters(y){return e._(this,void 0,void 0,function*(){if(y.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let N=y.tileID.scaledTo(this.maxzoom).canonical,ie=N.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:N,overzoomRequest:yield this.map._requestManager.transformRequest(ie,"Tile")}})}_afterTileLoadWorkerResponse(y,N){if(N?.resourceTiming&&(y.resourceTiming=N.resourceTiming),N&&this.map._refreshExpiredTiles&&y.setExpiryData(N),y.etag=N?.etag,y.loadVectorData(N,this.map.painter),y.reloadPromise){let ie=y.reloadPromise;y.reloadPromise=null,this.loadTile(y).then(ie.resolve).catch(ie.reject)}}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.actor&&(yield y.actor.sendAsync({type:"AT",data:{uid:y.uid,type:this.type,source:this.id}}))})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),y.actor&&(yield y.actor.sendAsync({type:"RMT",data:{uid:y.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class ae extends e.E{constructor(y,N,ie,fe){super(),this.id=y,this.dispatcher=ie,this.setEventedParent(fe),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},N),e.e(this,e.V(N,["url","scheme","tileSize"]))}load(){return e._(this,arguments,void 0,function*(y=!1){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let N=yield Y(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,N&&(e.e(this,N),N.bounds&&(this.tileBounds=new Z(N.bounds,this.minzoom,this.maxzoom)),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:y})))}catch(N){this._tileJSONRequest=null,this._loaded=!0,e.$(N)||this.fire(new e.l(e.d(N)))}})}loaded(){return this._loaded}onAdd(y){this.map=y,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(y){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),y(),this.load(!0)}setTiles(y){return this.setSourceProperty(()=>{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}serialize(){return e.e({},this._options)}hasTile(y){return!this.tileBounds||this.tileBounds.contains(y.canonical)}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);y.abortController=new AbortController;try{let ie=yield v.getImage(yield this.map._requestManager.transformRequest(N,"Tile"),y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(ie?.data){this.map._refreshExpiredTiles&&(ie.cacheControl||ie.expires)&&y.setExpiryData({cacheControl:ie.cacheControl,expires:ie.expires});let fe=this.map.painter.context,be=fe.gl,Re=ie.data;y.texture=this.map.painter.getTileTexture(Re.width),y.texture?y.texture.update(Re,{useMipmap:!0}):(y.texture=new e.T(fe,Re,be.RGBA,{useMipmap:!0}),y.texture.bind(be.LINEAR,be.CLAMP_TO_EDGE,be.LINEAR_MIPMAP_NEAREST)),y.state="loaded"}}catch(ie){if(delete y.abortController,y.aborted)y.state="unloaded";else if(ie)throw y.state="errored",ie}})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController)})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.texture&&this.map.painter.saveTileTexture(y.texture)})}hasTransition(){return!1}}class he extends ae{constructor(y,N,ie,fe){super(y,N,ie,fe),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},N),this.encoding=N.encoding||"mapbox",this.redFactor=N.redFactor,this.greenFactor=N.greenFactor,this.blueFactor=N.blueFactor,this.baseShift=N.baseShift}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie=yield this.map._requestManager.transformRequest(N,"Tile");y.neighboringTiles=this._getNeighboringTiles(y.tileID),y.abortController=new AbortController;try{let fe=yield v.getImage(ie,y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(fe?.data){let be=fe.data;this.map._refreshExpiredTiles&&(fe.cacheControl||fe.expires)&&y.setExpiryData({cacheControl:fe.cacheControl,expires:fe.expires});let Re=e.b(be)&&e.a0()?be:yield this.readImageNow(be),je={type:this.type,uid:y.uid,source:this.id,rawImageData:Re,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(y.actor&&y.state!=="expired"&&y.state!=="reloading")return;y.actor&&y.state!=="expired"||(y.actor=this.dispatcher.getActor()),y.dem=yield y.actor.sendAsync({type:"LDT",data:je}),y.needsHillshadePrepare=!0,y.needsTerrainPrepare=!0,y.state="loaded"}}catch(fe){if(delete y.abortController,y.aborted)y.state="unloaded";else if(fe)throw y.state="errored",fe}})}readImageNow(y){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.a1()){let N=y.width+2,ie=y.height+2;try{return new e.R({width:N,height:ie},yield e.a2(y,-1,-1,N,ie))}catch{}}return s.getImageData(y,1)})}_getNeighboringTiles(y){let N=y.canonical,ie=Math.pow(2,N.z),fe=(N.x-1+ie)%ie,be=N.x===0?y.wrap-1:y.wrap,Re=(N.x+1+ie)%ie,je=N.x+1===ie?y.wrap+1:y.wrap,Ze={};return Ze[new e.a3(y.overscaledZ,be,N.z,fe,N.y).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,je,N.z,Re,N.y).key]={backfilled:!1},N.y>0&&(Ze[new e.a3(y.overscaledZ,be,N.z,fe,N.y-1).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,y.wrap,N.z,N.x,N.y-1).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,je,N.z,Re,N.y-1).key]={backfilled:!1}),N.y+1be.key===ie);fe>-1&&pe.addOrUpdateProperties.splice(fe,1)}return(pe.removeAllProperties||y.removeAllProperties)&&(N.removeAllProperties=!0),(pe.removeProperties||y.removeProperties)&&(N.removeProperties=[...pe.removeProperties||[],...y.removeProperties||[]]),(pe.addOrUpdateProperties||y.addOrUpdateProperties)&&(N.addOrUpdateProperties=[...pe.addOrUpdateProperties||[],...y.addOrUpdateProperties||[]]),(pe.newGeometry||y.newGeometry)&&(N.newGeometry=y.newGeometry||pe.newGeometry),N}function Me(pe){var y,N;if(!pe)return{};let ie={};return ie.removeAll=pe.removeAll,ie.remove=new Set(pe.remove||[]),ie.add=new Map((y=pe.add)===null||y===void 0?void 0:y.map(fe=>[fe.id,fe])),ie.update=new Map((N=pe.update)===null||N===void 0?void 0:N.map(fe=>[fe.id,fe])),ie}function Se(pe){return pe&&pe.length!==0?typeof pe[0]=="number"?[pe]:pe.flatMap(y=>Se(y)):[]}function Ie(pe){return pe.type==="GeometryCollection"?pe.geometries.flatMap(y=>Ie(y)):Se(pe.coordinates)}function Ve(pe){let y=new q,N;switch(pe.type){case"FeatureCollection":N=pe.features.flatMap(ie=>Ie(ie.geometry));break;case"Feature":N=Ie(pe.geometry);break;default:N=Ie(pe)}if(N.length===0)return y;for(let ie of N){let[fe,be]=ie;y.extend([fe,be])}return y}class Ge extends e.E{constructor(y,N,ie,fe){super(),this.id=y,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:N.data},this.actor=ie.getActor(),this.setEventedParent(fe),this._data=typeof N.data=="string"?{url:N.data}:{geojson:N.data},this._options=e.e({},N),this._collectResourceTiming=N.collectResourceTiming,N.maxzoom!==void 0&&(this.maxzoom=N.maxzoom),N.type&&(this.type=N.type),N.attribution&&(this.attribution=N.attribution),this.promoteId=N.promoteId,N.clusterMaxZoom!==void 0&&this.maxzoom<=N.clusterMaxZoom&&e.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${N.clusterMaxZoom}".`),this.workerOptions=e.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(N.buffer!==void 0?N.buffer:128),tolerance:this._pixelsToTileUnits(N.tolerance!==void 0?N.tolerance:.375),extent:e.a6,maxZoom:this.maxzoom,lineMetrics:N.lineMetrics||!1,generateId:N.generateId||!1,promoteId:typeof N.promoteId=="string"?N.promoteId:void 0,cluster:N.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(N.clusterMaxZoom),minPoints:Math.max(2,N.clusterMinPoints||2),extent:e.a6,radius:this._pixelsToTileUnits(N.clusterRadius||50),log:!1,generateId:N.generateId||!1}},clusterProperties:N.clusterProperties,filter:N.filter},N.workerOptions)}_hasPendingWorkerUpdate(){return this._pendingWorkerUpdate.data!==void 0||this._pendingWorkerUpdate.diff!==void 0||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(y){return y*(e.a6/this.tileSize)}_getClusterMaxZoom(y){let N=y?Math.round(y):this.maxzoom-1;return Number.isInteger(y)||y===void 0||e.w(`Integer expected for option 'clusterMaxZoom': provided value "${y}" rounded to "${N}"`),N}load(){return e._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(y){this.map=y,this.load()}setData(y,N){this._data=typeof y=="string"?{url:y}:{geojson:y},this._pendingWorkerUpdate={data:y};let ie=this._updateWorkerData();return N?ie:this}updateData(y,N){this._pendingWorkerUpdate.diff=function(fe,be){if(!fe)return be||{};if(!be)return fe||{};let Re=Me(fe),je=Me(be);(function(ut,ft){ft.removeAll&&(ut.add.clear(),ut.update.clear(),ut.remove.clear(),ft.remove.clear());for(let Dt of ft.remove)ut.add.delete(Dt),ut.update.delete(Dt);for(let[Dt,Gt]of ft.update){let Kt=ut.update.get(Dt);Kt&&(ft.update.set(Dt,we(Kt,Gt)),ut.update.delete(Dt))}})(Re,je);let Ze={};if((Re.removeAll||je.removeAll)&&(Ze.removeAll=!0),Ze.remove=new Set([...Re.remove,...je.remove]),Ze.add=new Map([...Re.add,...je.add]),Ze.update=new Map([...Re.update,...je.update]),Ze.remove.size&&Ze.add.size)for(let ut of Ze.add.keys())Ze.remove.delete(ut);return function(ut){let ft={};return ut.removeAll&&(ft.removeAll=ut.removeAll),ut.remove&&(ft.remove=Array.from(ut.remove)),ut.add&&(ft.add=Array.from(ut.add.values())),ut.update&&(ft.update=Array.from(ut.update.values())),ft}(Ze)}(this._pendingWorkerUpdate.diff,y);let ie=this._updateWorkerData();return N?ie:this}getData(){return e._(this,void 0,void 0,function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}})}getBounds(){return e._(this,void 0,void 0,function*(){return Ve(yield this.getData())})}setClusterOptions(y){return this.workerOptions.geojsonVtOptions.cluster=y.cluster,y.clusterRadius!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(y.clusterRadius)),y.clusterMaxZoom!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(y.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(y){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:y,source:this.id}})}getClusterChildren(y){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:y,source:this.id}})}getClusterLeaves(y,N,ie){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:y,limit:N,offset:ie}})}_updateWorkerData(){return e._(this,void 0,void 0,function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void e.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:y,diff:N,updateCluster:ie}=this._pendingWorkerUpdate,fe=this._getLoadGeoJSONParameters(y,N,ie);y!==void 0?this._pendingWorkerUpdate.data=void 0:N?this._pendingWorkerUpdate.diff=void 0:ie&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(fe)})}_getLoadGeoJSONParameters(y,N,ie){return e._(this,void 0,void 0,function*(){let fe=e.e({type:this.type},this.workerOptions);return typeof y=="string"?(fe.request=yield this.map._requestManager.transformRequest(s.resolveURL(y),"Source"),fe.request.collectResourceTiming=this._collectResourceTiming,fe):y!==void 0?(fe.data=y,fe):N?(fe.dataDiff=N,fe):ie?(fe.updateCluster=!0,fe):void 0})}_dispatchWorkerUpdate(y){return e._(this,void 0,void 0,function*(){this._isUpdatingWorker=!0,this.fire(new e.n("dataloading",{dataType:"source"}));try{let N=yield y,ie=yield this.actor.sendAsync({type:"LD",data:N});if(this._isUpdatingWorker=!1,this._removed||ie.abandoned)return void this.fire(new e.n("dataabort",{dataType:"source"}));ie.data&&(this._data={geojson:ie.data});let fe=this._applyDiffToSource(N.dataDiff),be=this._getShouldReloadTileOptions(fe),Re={dataType:"source"};this._applyResourceTiming(Re,ie),this.fire(new e.n("data",Object.assign(Object.assign({},Re),{sourceDataType:"metadata"}))),this.fire(new e.n("data",Object.assign(Object.assign({},Re),{sourceDataType:"content",shouldReloadTileOptions:be})))}catch(N){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new e.n("dataabort",{dataType:"source"}));this.fire(new e.l(e.d(N)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}})}_applyResourceTiming(y,N){var ie;if(!this._collectResourceTiming)return;let fe=(ie=N.resourceTiming)===null||ie===void 0?void 0:ie[this.id];if(!fe)return;let be=fe.slice(0);be?.length&&e.e(y,{resourceTiming:be})}_applyDiffToSource(y){if(!y)return;let N=typeof this.promoteId=="string"?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let fe=function(be,Re){let je=new Map;if(be==null||be.type==null)return je;if(be.type==="Feature"){let Ze=xe(be,Re);return Ze==null?void 0:(je.set(Ze,be),je)}if(be.type==="FeatureCollection"){let Ze=new Set;for(let ut of be.features){let ft=xe(ut,Re);if(ft==null||Ze.has(ft))return;Ze.add(ft),je.set(ft,ut)}return je}}(this._data.geojson,N);if(!fe)throw new Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:fe}}if(!this._data.updateable)return;let ie=function(fe,be,Re){var je,Ze;let ut=[];if(be.removeAll)fe.clear();else if(be.remove)for(let ft of be.remove){let Dt=fe.get(ft);Dt&&(ut.push(Dt.geometry),fe.delete(ft))}if(be.add)for(let ft of be.add){let Dt=xe(ft,Re);if(Dt==null)continue;let Gt=fe.get(Dt);Gt&&ut.push(Gt.geometry),ut.push(ft.geometry),fe.set(Dt,ft)}if(be.update)for(let ft of be.update){let Dt=fe.get(ft.id);if(!Dt)continue;let Gt=!!ft.newGeometry,Kt=ft.removeAllProperties||((je=ft.removeProperties)===null||je===void 0?void 0:je.length)>0||((Ze=ft.addOrUpdateProperties)===null||Ze===void 0?void 0:Ze.length)>0;if(!Gt&&!Kt)continue;ut.push(Dt.geometry);let st=Object.assign({},Dt);if(fe.set(ft.id,st),Gt&&(ut.push(ft.newGeometry),st.geometry=ft.newGeometry),Kt){if(st.properties=ft.removeAllProperties?{}:Object.assign({},st.properties||{}),ft.removeProperties)for(let It of ft.removeProperties)delete st.properties[It];if(ft.addOrUpdateProperties)for(let{key:It,value:Ut}of ft.addOrUpdateProperties)st.properties[It]=Ut}}return ut}(this._data.updateable,y,N);return y.removeAll||this._options.cluster?void 0:ie}_getShouldReloadTileOptions(y){if(y)return{affectedBounds:y.filter(Boolean).map(N=>Ve(N))}}shouldReloadTile(y,{affectedBounds:N}){if(y.state==="loading")return!0;if(y.state==="unloaded")return!1;let{buffer:ie,extent:fe}=this.workerOptions.geojsonVtOptions,be=function({x:Re,y:je,z:Ze},ut=0){let ft=e.a4((Re-ut)/Math.pow(2,Ze)),Dt=e.a5((je+1+ut)/Math.pow(2,Ze)),Gt=e.a4((Re+1+ut)/Math.pow(2,Ze)),Kt=e.a5((je-ut)/Math.pow(2,Ze));return new q([ft,Dt],[Gt,Kt])}(y.tileID.canonical,ie/fe);for(let Re of N)if(be.intersects(Re))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.actor?"RT":"LT";y.actor=this.actor;let ie={type:this.type,uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};y.abortController=new AbortController;let fe=yield this.actor.sendAsync({type:N,data:ie},y.abortController);delete y.abortController,y.unloadVectorData(),y.aborted||y.loadVectorData(fe,this.map.painter,N==="RT")})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.aborted=!0})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:y.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return e.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class ke extends e.E{constructor(y,N,ie,fe){super(),this.flippedWindingOrder=!1,this.id=y,this.dispatcher=ie,this.coordinates=N.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(fe),this.options=N}load(y){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let N=yield v.getImage(yield this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,N?.data&&(this.image=N.data,y&&(this.coordinates=y),this._finishLoading())}catch(N){this._request=null,this._loaded=!0,e.$(N)||this.fire(new e.l(e.d(N)))}})}loaded(){return this._loaded}updateImage(y){return y.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=y.url,this.load(y.coordinates).finally(()=>this.texture=null),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(y){this.map=y,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(y){this.coordinates=y;let N=y.map(e.a7.fromLngLat);var ie;return this.tileID=function(fe){let be=e.a8.fromPoints(fe),Re=be.width(),je=be.height(),Ze=Math.max(Re,je),ut=Math.max(0,Math.floor(-Math.log(Ze)/Math.LN2)),ft=Math.pow(2,ut);return new e.aa(ut,Math.floor((be.minX+be.maxX)/2*ft),Math.floor((be.minY+be.maxY)/2*ft))}(N),this.terrainTileRanges=this._getOverlappingTileRanges(N),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=N.map(fe=>this.tileID.getTilePoint(fe)._round()),this.flippedWindingOrder=((ie=this.tileCoords)[1].x-ie[0].x)*(ie[2].y-ie[0].y)-(ie[1].y-ie[0].y)*(ie[2].x-ie[0].x)<0,this.fire(new e.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let y=this.map.painter.context,N=y.gl;this.texture||(this.texture=new e.T(y,this.image,N.RGBA),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let ie=!1;for(let fe in this.tiles){let be=this.tiles[fe];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(y){return e._(this,void 0,void 0,function*(){var N;!((N=this.tileID)===null||N===void 0)&&N.equals(y.tileID.canonical)?(this.tiles[String(y.tileID.wrap)]=y,y.buckets={}):y.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(y){let{minX:N,minY:ie,maxX:fe,maxY:be}=e.a8.fromPoints(y),Re={};for(let je=0;je<=e.a9;je++){let Ze=Math.pow(2,je),ut=Math.floor(N*Ze),ft=Math.floor(ie*Ze),Dt=Math.floor(fe*Ze),Gt=Math.floor(be*Ze),Kt=(ut%Ze+Ze)%Ze,st=Dt%Ze,It=Math.floor(ut/Ze),Ut=Math.floor(Dt/Ze);Re[je]={minWrap:It,maxWrap:Ut,minTileXWrapped:Kt,maxTileXWrapped:st,minTileY:ft,maxTileY:Gt}}return Re}}class _e extends ke{constructor(y,N,ie,fe){super(y,N,ie,fe),this._onPlayingHandler=()=>{var be;(be=this.map)===null||be===void 0||be.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=N}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let y=this.options;this.urls=[];for(let N of y.urls)this.urls.push((yield this.map._requestManager.transformRequest(N,"Source")).url);try{let N=yield e.ab(this.urls);if(this._loaded=!0,!N)return;this.video=N,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(N){this.fire(new e.l(e.d(N)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(y){if(this.video){let N=this.video.seekable;yN.end(0)?this.fire(new e.l(new e.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${N.start(0)} and ${N.end(0)}-second mark.`))):this.video.currentTime=y}}getVideo(){return this.video}onAdd(y){this.map||(this.map=y,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let y=this.map.painter.context,N=y.gl;this.texture?this.video.paused||(this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE),N.texSubImage2D(N.TEXTURE_2D,0,0,0,N.RGBA,N.UNSIGNED_BYTE,this.video)):(this.texture=new e.T(y,this.video,N.RGBA),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let ie=!1;for(let fe in this.tiles){let be=this.tiles[fe];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class ce extends ke{constructor(y,N,ie,fe){super(y,N,ie,fe),N.coordinates?Array.isArray(N.coordinates)&&N.coordinates.length===4&&!N.coordinates.some(be=>!Array.isArray(be)||be.length!==2||be.some(Re=>typeof Re!="number"))||this.fire(new e.l(new e.ac(`sources.${y}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.l(new e.ac(`sources.${y}`,null,'missing required property "coordinates"'))),N.animate&&typeof N.animate!="boolean"&&this.fire(new e.l(new e.ac(`sources.${y}`,null,'optional "animate" property must be a boolean value'))),N.canvas?typeof N.canvas=="string"||N.canvas instanceof HTMLCanvasElement||this.fire(new e.l(new e.ac(`sources.${y}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.l(new e.ac(`sources.${y}`,null,'missing required property "canvas"'))),this.options=N,this.animate=N.animate===void 0||N.animate}load(){return e._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.l(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(y){this.map=y,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let y=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,y=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,y=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let N=this.map.painter.context,ie=N.gl;this.texture?(y||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new e.T(N,this.canvas,ie.RGBA,{premultiply:!0}),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let fe=!1;for(let be in this.tiles){let Re=this.tiles[be];Re.state!=="loaded"&&(Re.state="loaded",Re.texture=this.texture,fe=!0)}fe&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let y of[this.canvas.width,this.canvas.height])if(isNaN(y)||y<=0)return!0;return!1}}let ve={},le=pe=>{switch(pe){case"geojson":return Ge;case"image":return ke;case"raster":return ae;case"raster-dem":return he;case"vector":return ee;case"video":return _e;case"canvas":return ce}return ve[pe]},Ae="RTLPluginLoaded";class Be extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=se()}_syncState(y){return this.status=y,this.dispatcher.broadcast("SRPS",{pluginStatus:y,pluginURL:this.url}).catch(N=>{throw this.status="error",N})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(y){return e._(this,arguments,void 0,function*(N,ie=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=s.resolveURL(N),!this.url)throw new Error(`requested url ${N} is invalid`);if(this.status==="unavailable"){if(!ie)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.n(Ae))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Xe=null;function Ye(){return Xe||(Xe=new Be),Xe}var yt,gt;(function(pe){pe[pe.Base=0]="Base",pe[pe.Parent=1]="Parent"})(yt||(yt={})),function(pe){pe[pe.Departing=0]="Departing",pe[pe.Incoming=1]="Incoming"}(gt||(gt={}));class Tt{constructor(y,N){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=y,this.uid=e.ad(),this.uses=0,this.tileSize=N,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(y){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(y||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:y,fadingDirection:N,fadingParentID:ie,fadeEndTime:fe}){this.resetFadeLogic(),this.fadingRole=y,this.fadingDirection=N,this.fadingParentID=ie,this.fadeEndTime=fe}setSelfFadeLogic(y){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=y}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=m(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(y){this.demTexture&&y.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(y,N,ie){if(y?.etagUnmodified!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",y){y.featureIndex&&(this.latestFeatureIndex=y.featureIndex,y.rawTileData?(this.latestRawTileData=y.rawTileData,this.latestEncoding=y.encoding,this.latestFeatureIndex.rawTileData=y.rawTileData,this.latestFeatureIndex.encoding=y.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=y.collisionBoxArray,this.buckets=function(fe,be){let Re={};if(!be)return Re;for(let je of fe){let Ze=je.layerIds.map(ut=>be.getLayer(ut)).filter(Boolean);if(Ze.length!==0){je.layers=Ze,je.stateDependentLayerIds&&(je.stateDependentLayers=je.stateDependentLayerIds.map(ut=>Ze.filter(ft=>ft.id===ut)[0]));for(let ut of Ze)Re[ut.id]=je}}return Re}(y.buckets,N?.style),this.hasSymbolBuckets=!1;for(let fe in this.buckets){let be=this.buckets[fe];if(be instanceof e.af){if(this.hasSymbolBuckets=!0,!ie)break;be.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let fe in this.buckets){let be=this.buckets[fe];if(be instanceof e.af&&be.hasRTLText){this.hasRTLText=!0,Ye().lazyLoad();break}}this.queryPadding=0;for(let fe in this.buckets){let be=this.buckets[fe];this.queryPadding=Math.max(this.queryPadding,N.style.getLayer(fe).queryRadius(be))}y.imageAtlas&&(this.imageAtlas=y.imageAtlas),y.glyphAtlasImage&&(this.glyphAtlasImage=y.glyphAtlasImage),this.dashPositions=y.dashPositions}else this.collisionBoxArray=new e.ae;else this.state="loaded"}unloadVectorData(){for(let y in this.buckets)this.buckets[y].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(y){return this.buckets[y.id]}upload(y){for(let ie in this.buckets){let fe=this.buckets[ie];fe.uploadPending()&&fe.upload(y)}let N=y.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new e.T(y,this.imageAtlas.image,N.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new e.T(y,this.glyphAtlasImage,N.ALPHA),this.glyphAtlasImage=null)}prepare(y){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(y,this.imageAtlasTexture)}queryRenderedFeatures(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt){var Gt;return!((Gt=this.latestFeatureIndex)===null||Gt===void 0)&&Gt.rawTileData?this.latestFeatureIndex.query({queryGeometry:fe,cameraQueryGeometry:be,scale:Re,tileSize:this.tileSize,pixelPosMatrix:ft,transform:Ze,params:je,queryPadding:this.queryPadding*ut,getElevation:Dt},y,N,ie):{}}querySourceFeatures(y,N){let ie=this.latestFeatureIndex;if(!ie?.rawTileData)return;let fe=ie.loadVTLayers(),be=N?.sourceLayer?N.sourceLayer:"",Re=fe[e.ag]||fe[be];if(!Re)return;let je=e.ah(N?.filter,N?.globalState),{z:Ze,x:ut,y:ft}=this.tileID.canonical,Dt={z:Ze,x:ut,y:ft};for(let Gt=0;Gtie)fe=!1;else if(N)if(this.expirationTime({zoom:0,x:0,y:0,wrap:vr,fullyVisible:!1}),Ar=[],hr=[];if(pe.renderWorldCopies&&Re.allowWorldCopies())for(let vr=1;vr<=3;vr++)Ar.push(dr(-vr)),Ar.push(dr(vr));for(Ar.push(dr(0));Ar.length>0;){let vr=Ar.pop(),Or=vr.x,Cr=vr.y,ta=vr.fullyVisible,ka={x:Or,y:Cr,z:vr.zoom},Ta=Re.getTileBoundingVolume(ka,vr.wrap,pe.elevation,y);if(!ta){let ma=ht(N,Ta,ie);if(ma===0)continue;ta=ma===2}let Ra=Re.distanceToTile2d(fe.x,fe.y,ka,Ta),ua=Ze;je&&(ua=(y.calculateTileZoom||We)(pe.zoom+e.ar(pe.tileSize/y.tileSize),Ra,Ut,ir,pe.fov)),ua=(y.roundZoom?Math.round:Math.floor)(ua),ua=Math.max(0,ua);let ia=Math.min(ua,ft);if(vr.wrap=Re.getWrap(be,ka,vr.wrap),vr.zoom>=ia){if(vr.zoom>1),wrap:vr.wrap,fullyVisible:ta})}return hr.sort((vr,Or)=>vr.distanceSq-Or.distanceSq).map(vr=>vr.tileID)}let et=e.a8.fromPoints([new e.P(0,0),new e.P(e.a6,e.a6)]);function Mt(pe){return pe==="raster"||pe==="image"||pe==="video"}function pt(pe,y,N,ie,fe,be,Re){if(!y.hasData())return!1;let{tileID:je,fadingRole:Ze,fadingDirection:ut,fadingParentID:ft}=y;if(Ze===yt.Base&&ut===gt.Incoming&&ft)return N[ft.key]=ft,!0;let Dt=Math.max(je.overscaledZ-fe,be);for(let Gt=je.overscaledZ-1;Gt>=Dt;Gt--){let Kt=je.scaledTo(Gt),st=pe.getLoadedTile(Kt);if(st)return y.setCrossFadeLogic({fadingRole:yt.Base,fadingDirection:gt.Incoming,fadingParentID:st.tileID,fadeEndTime:ie+Re}),st.setCrossFadeLogic({fadingRole:yt.Parent,fadingDirection:gt.Departing,fadeEndTime:ie+Re}),N[Kt.key]=Kt,!0}return!1}function Pt(pe,y,N,ie,fe,be){if(!y.hasData())return!1;let Re=y.tileID.children(fe),je=Ct(pe,y,Re,N,ie,fe,be);if(je)return!0;for(let Ze of Re)Ct(pe,y,Ze.children(fe),N,ie,fe,be)&&(je=!0);return je}function Ct(pe,y,N,ie,fe,be,Re){if(N[0].overscaledZ>=be)return!1;let je=!1;for(let Ze of N){let ut=pe.getLoadedTile(Ze);if(!ut)continue;let{fadingRole:ft,fadingDirection:Dt,fadingParentID:Gt}=ut;ft===yt.Base&&Dt===gt.Departing&&Gt||(ut.setCrossFadeLogic({fadingRole:yt.Base,fadingDirection:gt.Departing,fadingParentID:y.tileID,fadeEndTime:fe+Re}),y.setCrossFadeLogic({fadingRole:yt.Parent,fadingDirection:gt.Incoming,fadeEndTime:fe+Re})),ie[Ze.key]=Ze,je=!0}return je}function qt(pe,y,N,ie){let fe=pe.tileID;return!!pe.selfFading||!pe.hasData()&&!!y.has(fe)&&(pe.setSelfFadeLogic(N+ie),!0)}function Vt(pe,y){var N;pe.needsHillshadePrepare=!0,pe.needsTerrainPrepare=!0;let ie=y.tileID.canonical.x-pe.tileID.canonical.x,fe=y.tileID.canonical.y-pe.tileID.canonical.y,be=Math.pow(2,pe.tileID.canonical.z),Re=y.tileID.key;ie===0&&fe===0||Math.abs(fe)>1||(Math.abs(ie)>1&&(Math.abs(ie+be)===1?ie+=be:Math.abs(ie-be)===1&&(ie-=be)),y.dem&&pe.dem&&(pe.dem.backfillBorder(y.dem,ie,fe),!((N=pe.neighboringTiles)===null||N===void 0)&&N[Re]&&(pe.neighboringTiles[Re].backfilled=!0)))}class Ht{constructor(){this._tiles={}}handleWrapJump(y){let N={};for(let ie in this._tiles){let fe=this._tiles[ie];fe.tileID=fe.tileID.unwrapTo(fe.tileID.wrap+y),N[fe.tileID.key]=fe}this._tiles=N}setFeatureState(y,N){for(let ie in this._tiles)this._tiles[ie].setFeatureState(y,N)}getAllTiles(){return Object.values(this._tiles)}getAllIds(y=!1){return y?Object.values(this._tiles).map(N=>N.tileID).sort(e.au).map(N=>N.key):Object.keys(this._tiles)}getTileById(y){return this._tiles[y]}setTile(y,N){this._tiles[y]=N}deleteTileById(y){delete this._tiles[y]}getLoadedTile(y){let N=this.getTileById(y.key);return N?.hasData()?N:null}isIdRenderable(y,N=!1){var ie;return(ie=this.getTileById(y))===null||ie===void 0?void 0:ie.isRenderable(N)}getRenderableIds(y=0,N){let ie=[];for(let fe of this.getAllIds())this.isIdRenderable(fe,N)&&ie.push(this.getTileById(fe));return N?ie.sort((fe,be)=>{let Re=fe.tileID,je=be.tileID,Ze=new e.P(Re.canonical.x,Re.canonical.y)._rotate(-y),ut=new e.P(je.canonical.x,je.canonical.y)._rotate(-y);return Re.overscaledZ-je.overscaledZ||ut.y-Ze.y||ut.x-Ze.x}).map(fe=>fe.tileID.key):ie.map(fe=>fe.tileID).sort(e.au).map(fe=>fe.key)}}class Sr extends e.E{constructor(y,N,ie){super(),this.id=y,this.dispatcher=ie,this.on("data",fe=>{this._dataHandler(fe)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((fe,be,Re,je)=>{let Ze=new(le(be.type))(fe,be,Re,je);if(Ze.id!==fe)throw new Error(`Expected Source id to be ${fe} instead of ${Ze.id}`);return Ze})(y,N,ie,this),this._inViewTiles=new Ht,this._outOfViewCache=new e.av(0,fe=>this._unloadTile(fe)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new At,this._didEmitContent=!1,this._updated=!1}onAdd(y){var N;this.map=y,this._maxTileCacheSize=y?y._maxTileCacheSize:null,this._maxTileCacheZoomLevels=y?y._maxTileCacheZoomLevels:null,!((N=this._source)===null||N===void 0)&&N.onAdd&&this._source.onAdd(y)}onRemove(y){var N;for(let ie of this._inViewTiles.getAllTiles())ie.unloadVectorData();this.clearTiles(),!((N=this._source)===null||N===void 0)&&N.onRemove&&this._source.onRemove(y),this._inViewTiles=new Ht}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let y=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,y&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(y,N,ie){return e._(this,void 0,void 0,function*(){try{let fe=yield this._source.loadTile(y);this._tileLoaded(y,N,ie,fe)}catch(fe){y.state="errored",fe.status!==404?this._source.fire(new e.l(e.d(fe),{tile:y})):this.update(this.transform,this.terrain)}})}_unloadTile(y){this._source.unloadTile&&this._source.unloadTile(y)}_abortTile(y){this._source.abortTile&&this._source.abortTile(y),this._source.fire(new e.n("dataabort",{tile:y,coord:y.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(y){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let N of this._inViewTiles.getAllTiles())N.upload(y),N.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(y){var N;return this._inViewTiles.getRenderableIds((N=this.transform)===null||N===void 0?void 0:N.bearingInRadians,y)}hasRenderableParent(y){let N=y.overscaledZ-1;if(N>=this._source.minzoom){let ie=this.getLoadedTile(y.scaledTo(N));if(ie)return this._inViewTiles.isIdRenderable(ie.tileID.key)}return!1}reload(y,N=void 0){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(let ie of this._inViewTiles.getAllIds()){let fe=this._inViewTiles.getTileById(ie);N&&!this._source.shouldReloadTile(fe,N)||(y?this._reloadTile(ie,"expired"):fe.state!=="errored"&&this._reloadTile(ie,"reloading"))}}}_reloadTile(y,N){return e._(this,void 0,void 0,function*(){let ie=this._inViewTiles.getTileById(y);ie&&(ie.state!=="loading"&&(ie.state=N),yield this._loadTile(ie,y,N))})}_tileLoaded(y,N,ie,fe){y.timeAdded=m(),y.selfFading&&(y.fadeEndTime=y.timeAdded+this._rasterFadeDuration),ie==="expired"&&(y.refreshedUponExpiration=!0),this._setTileReloadTimer(N,y),fe?.unmodified||(this.getSource().type==="raster-dem"&&y.dem&&function(be,Re){var je,Ze,ut;let ft=Re.getRenderableIds();for(let Dt of ft){if(!(!((je=be.neighboringTiles)===null||je===void 0)&&je[Dt]))continue;let Gt=Re.getTileById(Dt);be.neighboringTiles[Dt].backfilled||Vt(be,Gt),!((ut=(Ze=Gt.neighboringTiles)===null||Ze===void 0?void 0:Ze[be.tileID.key])===null||ut===void 0)&&ut.backfilled||Vt(Gt,be)}}(y,this._inViewTiles),this._state.initializeTileState(y,this.map?this.map.painter:null),y.aborted||this._source.fire(new e.n("data",{dataType:"source",tile:y,coord:y.tileID})))}getTile(y){return this.getTileByID(y.key)}getTileByID(y){return this._inViewTiles.getTileById(y)}_retainLoadedChildren(y,N){let ie=this._getLoadedDescendents(N),fe=new Set;for(let be of N){let Re=ie[be.key];if(!Re?.length){fe.add(be);continue}let je=be.overscaledZ+Sr.maxOverzooming,Ze=Re.filter(Dt=>Dt.tileID.overscaledZ<=je);if(!Ze.length){fe.add(be);continue}let ut=Math.min(...Ze.map(Dt=>Dt.tileID.overscaledZ)),ft=Ze.filter(Dt=>Dt.tileID.overscaledZ===ut).map(Dt=>Dt.tileID);for(let Dt of ft)y[Dt.key]=Dt;this._areDescendentsComplete(ft,ut,be.overscaledZ)||fe.add(be)}return fe}_getLoadedDescendents(y){var N;let ie={};for(let fe of this._inViewTiles.getAllTiles().filter(be=>be.hasData()))for(let be of y)fe.tileID.isChildOf(be)&&(ie[N=be.key]||(ie[N]=[]),ie[be.key].push(fe));return ie}_areDescendentsComplete(y,N,ie){return y.length===1&&y[0].isOverscaled()?y[0].overscaledZ===N:Math.pow(4,N-ie)===y.length}getLoadedTile(y){return this._inViewTiles.getLoadedTile(y)}updateCacheSize(y){let N=Math.ceil(y.width/this._source.tileSize)+1,ie=Math.ceil(y.height/this._source.tileSize)+1,fe=Math.floor(N*ie*(this._maxTileCacheZoomLevels===null?e.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),be=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,fe):fe;this._outOfViewCache.setMaxSize(be)}handleWrapJump(y){let N=Math.round((y-(this._prevLng===void 0?y:this._prevLng))/360);this._prevLng=y,N&&(this._inViewTiles.handleWrapJump(N),this._resetTileReloadTimers())}update(y,N){if(!this._sourceLoaded||this._paused)return;let ie;this.transform=y,this.terrain=N,this.updateCacheSize(y),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?ie=y.getVisibleUnwrappedCoordinates(this._source.tileID).map(Ze=>new e.a3(Ze.canonical.z,Ze.wrap,Ze.canonical.z,Ze.canonical.x,Ze.canonical.y)):(ie=Je(y,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?y.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:N,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(ie=ie.filter(Ze=>this._source.hasTile(Ze)))):ie=[],this.usedForTerrain&&(ie=this._addTerrainIdealTiles(ie));let fe=ie.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,fe&&this.fire(new e.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let be=Ke(y,this._source),Re=this._updateRetainedTiles(ie,be),je=Mt(this._source.type);je&&this._rasterFadeDuration>0&&!N&&function(Ze,ut,ft,Dt,Gt,Kt,st){let It=m(),Ut=e.at(ut);for(let ir of ut){let dr=Ze.getTileById(ir.key);dr.fadingDirection!==gt.Departing&&dr.fadeOpacity!==0||dr.resetFadeLogic(),pt(Ze,dr,ft,It,Dt,Gt,st)||Pt(Ze,dr,ft,It,Kt,st)||qt(dr,Ut,It,st)||dr.resetFadeLogic()}}(this._inViewTiles,ie,Re,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),je?this._cleanUpRasterTiles(Re):this._cleanUpVectorTiles(Re)}_cleanUpRasterTiles(y){for(let N of this._inViewTiles.getAllIds())y[N]||this._removeTile(N)}_cleanUpVectorTiles(y){for(let N of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(N);y[N]?ie.clearSymbolFadeHold():ie.hasSymbolBuckets?ie.holdingForSymbolFade()?ie.symbolFadeFinished()&&this._removeTile(N):ie.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(N)}}_addTerrainIdealTiles(y){let N=[];for(let ie of y)if(ie.canonical.z>this._source.minzoom){let fe=ie.scaledTo(ie.canonical.z-1);N.push(fe);let be=ie.scaledTo(Math.max(this._source.minzoom,Math.min(ie.canonical.z,5)));N.push(be)}return y.concat(N)}releaseSymbolFadeTiles(){for(let y of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(y).holdingForSymbolFade()&&this._removeTile(y)}_updateRetainedTiles(y,N){var ie;let fe=new Set;for(let ut of y)this._addTile(ut).hasData()||fe.add(ut);let be=y.reduce((ut,ft)=>(ut[ft.key]=ft,ut),{}),Re=this._retainLoadedChildren(be,fe),je={},Ze=Math.max(N-Sr.maxUnderzooming,this._source.minzoom);for(let ut of Re){let ft=this._inViewTiles.getTileById(ut.key),Dt=ft?.wasRequested();for(let Gt=ut.overscaledZ-1;Gt>=Ze;--Gt){let Kt=ut.scaledTo(Gt);if(je[Kt.key])break;if(je[Kt.key]=!0,ft=this.getTile(Kt),!ft&&Dt&&(ft=this._addTile(Kt)),ft){let st=ft.hasData();if((st||!(!((ie=this.map)===null||ie===void 0)&&ie.cancelPendingTileRequestsWhileZooming)||Dt)&&(be[Kt.key]=Kt),Dt=ft.wasRequested(),st)break}}}return be}_addTile(y){let N=this._inViewTiles.getTileById(y.key);if(N)return N;N=this._outOfViewCache.getAndRemove(y),N&&(N.resetFadeLogic(),this._setTileReloadTimer(y.key,N),N.tileID=y,this._state.initializeTileState(N,this.map?this.map.painter:null));let ie=N;return N||(N=new Tt(y,this._source.tileSize*y.overscaleFactor()),this._loadTile(N,y.key,N.state)),N.uses++,this._inViewTiles.setTile(y.key,N),ie||this._source.fire(new e.n("dataloading",{tile:N,coord:N.tileID,dataType:"source"})),N}_setTileReloadTimer(y,N){this._clearTileReloadTimer(y);let ie=N.getExpiryTimeout();ie&&(this._timers[y]=setTimeout(()=>{this._reloadTile(y,"expired"),delete this._timers[y]},ie))}_clearTileReloadTimer(y){let N=this._timers[y];N&&(clearTimeout(N),delete this._timers[y])}_resetTileReloadTimers(){for(let y in this._timers)clearTimeout(this._timers[y]),delete this._timers[y];for(let y of this._inViewTiles.getAllIds()){let N=this._inViewTiles.getTileById(y);this._setTileReloadTimer(y,N)}}refreshTiles(y){for(let N of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(N);(this._inViewTiles.isIdRenderable(N)||ie.state=="errored")&&y.some(fe=>fe.equals(ie.tileID.canonical))&&this._reloadTile(N,"expired")}}_removeTile(y){let N=this._inViewTiles.getTileById(y);N&&(N.uses--,this._inViewTiles.deleteTileById(y),this._clearTileReloadTimer(y),N.uses>0||(N.hasData()&&N.state!=="reloading"?this._outOfViewCache.add(N.tileID,N,N.getExpiryTimeout()):(N.aborted=!0,this._abortTile(N),this._unloadTile(N))))}_dataHandler(y){y.dataType==="source"&&(y.sourceDataType!=="metadata"?y.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(y.sourceDataChanged,y.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let y of this._inViewTiles.getAllIds())this._removeTile(y);this._outOfViewCache.reset()}tilesIn(y,N,ie){let fe=[],be=this.transform;if(!be)return fe;let Re=be.getCoveringTilesDetailsProvider().allowWorldCopies(),je=ie?be.getCameraQueryGeometry(y):y,Ze=Kt=>be.screenPointToMercatorCoordinate(Kt,this.terrain),ut=this.transformBbox(y,Ze,!Re),ft=this.transformBbox(je,Ze,!Re),Dt=this.getIds(),Gt=e.a8.fromPoints(ft);for(let Kt of Dt){let st=this._inViewTiles.getTileById(Kt);if(st.holdingForSymbolFade())continue;let It=Re?[st.tileID]:[st.tileID.unwrapTo(-1),st.tileID.unwrapTo(0)],Ut=Math.pow(2,be.zoom-st.tileID.overscaledZ),ir=N*st.queryPadding*e.a6/st.tileSize/Ut;for(let dr of It){let Ar=Gt.map(hr=>dr.getTilePoint(new e.a7(hr.x,hr.y)));if(Ar.expandBy(ir),Ar.intersects(et)){let hr=ut.map(Or=>dr.getTilePoint(Or)),vr=ft.map(Or=>dr.getTilePoint(Or));fe.push({tile:st,tileID:Re?dr:dr.unwrapTo(0),queryGeometry:hr,cameraQueryGeometry:vr,scale:Ut})}}}return fe}transformBbox(y,N,ie){let fe=y.map(N);if(ie){let be=e.a8.fromPoints(y);be.shrinkBy(.001*Math.min(be.width(),be.height()));let Re=be.map(N);e.a8.fromPoints(fe).covers(Re)||(fe=fe.map(je=>je.x>.5?new e.a7(je.x-1,je.y,je.z):je))}return fe}getVisibleCoordinates(y){let N=this.getRenderableIds(y).map(ie=>this._inViewTiles.getTileById(ie).tileID);return this.transform&&this.transform.populateCache(N),N}hasTransition(){return!!this._source.hasTransition()||Mt(this._source.type)&&function(y,N){if(N<=0)return!1;let ie=m();for(let fe of y.getAllTiles())if(fe.fadeEndTime>=ie)return!0;return!1}(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(y){this._rasterFadeDuration=y}setFeatureState(y,N,ie){y||(y=e.ag),this._state.updateState(y,N,ie)}removeFeatureState(y,N,ie){y||(y=e.ag),this._state.removeFeatureState(y,N,ie)}getFeatureState(y,N){return y||(y=e.ag),this._state.getState(y,N)}setDependencies(y,N,ie){let fe=this._inViewTiles.getTileById(y);fe&&fe.setDependencies(N,ie)}reloadTilesForDependencies(y,N){for(let ie of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(ie).hasDependency(y,N)&&this._reloadTile(ie,"reloading");this._outOfViewCache.filter(ie=>!ie.hasDependency(y,N))}areTilesLoaded(){for(let y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}}Sr.maxUnderzooming=10,Sr.maxOverzooming=3;class Kr{constructor(y,N){this.reset(y,N)}reset(y,N){this.points=y||[],this._distances=[0];for(let ie=1;ie0?(fe-Re)/je:0;return this.points[be].mult(1-Ze).add(this.points[N].mult(Ze))}}function Yt(pe,y){let N=!0;return pe==="always"||pe!=="never"&&y!=="never"||(N=!1),N}class Rt{constructor(y,N,ie){let fe=this.boxCells=[],be=this.circleCells=[];this.xCellCount=Math.ceil(y/ie),this.yCellCount=Math.ceil(N/ie);for(let Re=0;Rethis.width||fe<0||N>this.height)return[];let Ze=[];if(y<=0&&N<=0&&this.width<=ie&&this.height<=fe){if(be)return[{key:null,x1:y,y1:N,x2:ie,y2:fe}];for(let ut=0;ut0}hitTestCircle(y,N,ie,fe,be){let Re=y-ie,je=y+ie,Ze=N-ie,ut=N+ie;if(je<0||Re>this.width||ut<0||Ze>this.height)return!1;let ft=[];return this._forEachCell(Re,Ze,je,ut,this._queryCellCircle,ft,{hitTest:!0,overlapMode:fe,circle:{x:y,y:N,radius:ie},seenUids:{box:{},circle:{}}},be),ft.length>0}_queryCell(y,N,ie,fe,be,Re,je,Ze){let{seenUids:ut,hitTest:ft,overlapMode:Dt}=je,Gt=this.boxCells[be],Kt=1e-6;if(Gt!==null){let It=this.bboxes;for(let Ut of Gt)if(!ut.box[Ut]){ut.box[Ut]=!0;let ir=4*Ut,dr=this.boxKeys[Ut];if(y<=It[ir+2]+Kt&&N<=It[ir+3]+Kt&&ie>=It[ir+0]-Kt&&fe>=It[ir+1]-Kt&&(!Ze||Ze(dr))&&(!ft||!Yt(Dt,dr.overlapMode))&&(Re.push({key:dr,x1:It[ir],y1:It[ir+1],x2:It[ir+2],y2:It[ir+3]}),ft))return!0}}let st=this.circleCells[be];if(st!==null){let It=this.circles;for(let Ut of st)if(!ut.circle[Ut]){ut.circle[Ut]=!0;let ir=3*Ut,dr=this.circleKeys[Ut];if(this._circleAndRectCollide(It[ir],It[ir+1],It[ir+2],y,N,ie,fe)&&(!Ze||Ze(dr))&&(!ft||!Yt(Dt,dr.overlapMode))){let Ar=It[ir],hr=It[ir+1],vr=It[ir+2];if(Re.push({key:dr,x1:Ar-vr,y1:hr-vr,x2:Ar+vr,y2:hr+vr}),ft)return!0}}}return!1}_queryCellCircle(y,N,ie,fe,be,Re,je,Ze){let{circle:ut,seenUids:ft,overlapMode:Dt}=je,Gt=this.boxCells[be];if(Gt!==null){let st=this.bboxes;for(let It of Gt)if(!ft.box[It]){ft.box[It]=!0;let Ut=4*It,ir=this.boxKeys[It];if(this._circleAndRectCollide(ut.x,ut.y,ut.radius,st[Ut+0],st[Ut+1],st[Ut+2],st[Ut+3])&&(!Ze||Ze(ir))&&!Yt(Dt,ir.overlapMode))return Re.push(!0),!0}}let Kt=this.circleCells[be];if(Kt!==null){let st=this.circles;for(let It of Kt)if(!ft.circle[It]){ft.circle[It]=!0;let Ut=3*It,ir=this.circleKeys[It];if(this._circlesCollide(st[Ut],st[Ut+1],st[Ut+2],ut.x,ut.y,ut.radius)&&(!Ze||Ze(ir))&&!Yt(Dt,ir.overlapMode))return Re.push(!0),!0}}}_forEachCell(y,N,ie,fe,be,Re,je,Ze){let ut=this._convertToXCellCoord(y),ft=this._convertToYCellCoord(N),Dt=this._convertToXCellCoord(ie),Gt=this._convertToYCellCoord(fe);for(let Kt=ut;Kt<=Dt;Kt++)for(let st=ft;st<=Gt;st++)if(be.call(this,y,N,ie,fe,this.xCellCount*st+Kt,Re,je,Ze))return}_convertToXCellCoord(y){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(y*this.xScale)))}_convertToYCellCoord(y){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(y*this.yScale)))}_circlesCollide(y,N,ie,fe,be,Re){let je=fe-y,Ze=be-N,ut=ie+Re;return ut*ut>je*je+Ze*Ze}_circleAndRectCollide(y,N,ie,fe,be,Re,je){let Ze=(Re-fe)/2,ut=Math.abs(y-(fe+Ze));if(ut>Ze+ie)return!1;let ft=(je-be)/2,Dt=Math.abs(N-(be+ft));if(Dt>ft+ie)return!1;if(ut<=Ze||Dt<=ft)return!0;let Gt=ut-Ze,Kt=Dt-ft;return Gt*Gt+Kt*Kt<=ie*ie}}function nr(pe,y){let N=1/(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]),ie=1/(y[8]*y[8]+y[9]*y[9]+y[10]*y[10]),fe=y[0]*N,be=y[4]*N,Re=y[8]*ie,je=y[1]*N,Ze=y[5]*N,ut=y[9]*ie,ft=y[2]*N,Dt=y[6]*N,Gt=y[10]*ie;pe[0]=fe,pe[1]=be,pe[2]=Re,pe[4]=je,pe[5]=Ze,pe[6]=ut,pe[8]=ft,pe[9]=Dt,pe[10]=Gt;let Kt=y[12],st=y[13],It=y[14];return pe[12]=-fe*Kt-je*st-ft*It,pe[13]=-be*Kt-Ze*st-Dt*It,pe[14]=-Re*Kt-ut*st-Gt*It,pe[3]=0,pe[7]=0,pe[11]=0,pe[15]=1,pe}let ur=e.O();function cr(pe,y,N){let ie=e.O();if(!pe){let{vecSouth:Dt,vecEast:Gt}=Qr(y),Kt=n();Kt[0]=Gt[0],Kt[1]=Gt[1],Kt[2]=Dt[0],Kt[3]=Dt[1],fe=Kt,(ft=(Re=(be=Kt)[0])*(ut=be[3])-(Ze=be[2])*(je=be[1]))&&(fe[0]=ut*(ft=1/ft),fe[1]=-je*ft,fe[2]=-Ze*ft,fe[3]=Re*ft),ie[0]=Kt[0],ie[1]=Kt[1],ie[4]=Kt[2],ie[5]=Kt[3]}var fe,be,Re,je,Ze,ut,ft;return e.S(ie,ie,[1/N,1/N,1]),ie}function Rr(pe,y,N,ie){if(pe){let fe=e.O();if(!y){let{vecSouth:be,vecEast:Re}=Qr(N);fe[0]=Re[0],fe[1]=Re[1],fe[4]=be[0],fe[5]=be[1]}return e.S(fe,fe,[ie,ie,1]),fe}return N.pixelsToClipSpaceMatrix}function Qr(pe){let y=Math.cos(pe.rollInRadians),N=Math.sin(pe.rollInRadians),ie=Math.cos(pe.pitchInRadians),fe=Math.cos(pe.bearingInRadians),be=Math.sin(pe.bearingInRadians),Re=e.az();Re[0]=-fe*ie*N-be*y,Re[1]=-be*ie*N+fe*y;let je=e.aA(Re);je<1e-9?e.aB(Re):e.aC(Re,Re,1/je);let Ze=e.az();Ze[0]=fe*ie*y-be*N,Ze[1]=be*ie*y+fe*N;let ut=e.aA(Ze);return ut<1e-9?e.aB(Ze):e.aC(Ze,Ze,1/ut),{vecEast:Ze,vecSouth:Re}}function Zr(pe,y,N,ie){let fe;ie?(fe=[pe,y,ie(pe,y),1],e.aE(fe,fe,N)):(fe=[pe,y,0,1],Oa(fe,fe,N));let be=fe[3];return{point:new e.P(fe[0]/be,fe[1]/be),signedDistanceFromCamera:be,isOccluded:!1}}function ha(pe,y){return .5+pe/y*.5}function Pa(pe,y){return pe.x>=-y[0]&&pe.x<=y[0]&&pe.y>=-y[1]&&pe.y<=y[1]}function La(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt){let Kt=N?pe.textSizeData:pe.iconSizeData,st=e.aw(Kt,y.transform.zoom),It=[256/y.width*2+1,256/y.height*2+1],Ut=N?pe.text.dynamicLayoutVertexArray:pe.icon.dynamicLayoutVertexArray;Ut.clear();let ir=pe.lineVertexArray,dr=N?pe.text.placedSymbolArray:pe.icon.placedSymbolArray,Ar=y.transform.width/y.transform.height,hr=!1;for(let vr=0;vrMath.abs(N.x-y.x)*ie?{useVertical:!0}:(pe===e.ax.vertical?y.yN.x)?{needsFlipping:!0}:null}function ja(pe){let{projectionContext:y,pitchedLabelPlaneMatrixInverse:N,symbol:ie,fontSize:fe,flip:be,keepUpright:Re,glyphOffsetArray:je,dynamicLayoutVertexArray:Ze,aspectRatio:ut,rotateToLine:ft}=pe,Dt=fe/24,Gt=ie.lineOffsetX*Dt,Kt=ie.lineOffsetY*Dt,st;if(ie.numGlyphs>1){let It=ie.glyphStartIndex+ie.numGlyphs,Ut=ie.lineStartIndex,ir=ie.lineStartIndex+ie.lineLength,dr=un(Dt,je,Gt,Kt,be,ie,ft,y);if(!dr)return{notEnoughRoom:!0};let Ar=li(dr.first.point.x,dr.first.point.y,y,N),hr=li(dr.last.point.x,dr.last.point.y,y,N);if(Re&&!be){let vr=Xa(ie.writingMode,Ar,hr,ut);if(vr)return vr}st=[dr.first];for(let vr=ie.glyphStartIndex+1;vr0?Ar.point:Nn(y.tileAnchorPoint,dr,Ut,1,y),vr=li(Ut.x,Ut.y,y,N),Or=li(hr.x,hr.y,y,N),Cr=Xa(ie.writingMode,vr,Or,ut);if(Cr)return Cr}let It=vi(Dt*je.getoffsetX(ie.glyphStartIndex),Gt,Kt,be,ie.segment,ie.lineStartIndex,ie.lineStartIndex+ie.lineLength,y,ft);if(!It||y.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};st=[It]}for(let It of st)e.aD(Ze,It.point,It.angle);return{}}function Nn(pe,y,N,ie,fe){let be=pe.add(pe.sub(y)._unit()),Re=Un(be.x,be.y,fe).point,je=N.sub(Re);return N.add(je._mult(ie/je.mag()))}function yn(pe,y,N){let ie=y.projectionCache;if(ie.projections[pe])return ie.projections[pe];let fe=new e.P(y.lineVertexArray.getx(pe),y.lineVertexArray.gety(pe)),be=Un(fe.x,fe.y,y);if(be.signedDistanceFromCamera>0)return ie.projections[pe]=be.point,ie.anyProjectionOccluded||(ie.anyProjectionOccluded=be.isOccluded),be.point;let Re=pe-N.direction;return Nn(N.distanceFromAnchor===0?y.tileAnchorPoint:new e.P(y.lineVertexArray.getx(Re),y.lineVertexArray.gety(Re)),fe,N.previousVertex,N.absOffsetX-N.distanceFromAnchor+1,y)}function Un(pe,y,N){let ie=pe+N.translation[0],fe=y+N.translation[1],be;return N.pitchWithMap?(be=Zr(ie,fe,N.pitchedLabelPlaneMatrix,N.getElevation),be.isOccluded=!1):(be=N.transform.projectTileCoordinates(ie,fe,N.unwrappedTileID,N.getElevation),be.point.x=(.5*be.point.x+.5)*N.width,be.point.y=(.5*-be.point.y+.5)*N.height),be}function li(pe,y,N,ie){if(N.pitchWithMap){let fe=[pe,y,0,1];return e.aE(fe,fe,ie),N.transform.projectTileCoordinates(fe[0]/fe[3],fe[1]/fe[3],N.unwrappedTileID,N.getElevation).point}return{x:pe/N.width*2-1,y:1-y/N.height*2}}function Yn(pe,y,N){return N.transform.projectTileCoordinates(pe,y,N.unwrappedTileID,N.getElevation)}function on(pe,y,N){return pe._unit()._perp()._mult(y*N)}function en(pe,y,N,ie,fe,be,Re,je,Ze){if(je.projectionCache.offsets[pe])return je.projectionCache.offsets[pe];let ut=N.add(y);if(pe+Ze.direction=fe)return je.projectionCache.offsets[pe]=ut,ut;let ft=yn(pe+Ze.direction,je,Ze),Dt=on(ft.sub(N),Re,Ze.direction),Gt=N.add(Dt),Kt=ft.add(Dt);return je.projectionCache.offsets[pe]=e.aF(be,ut,Gt,Kt)||ut,je.projectionCache.offsets[pe]}function vi(pe,y,N,ie,fe,be,Re,je,Ze){let ut=ie?pe-y:pe+y,ft=ut>0?1:-1,Dt=0;ie&&(ft*=-1,Dt=Math.PI),ft<0&&(Dt+=Math.PI);let Gt,Kt=ft>0?be+fe:be+fe+1;je.projectionCache.cachedAnchorPoint?Gt=je.projectionCache.cachedAnchorPoint:(Gt=Un(je.tileAnchorPoint.x,je.tileAnchorPoint.y,je).point,je.projectionCache.cachedAnchorPoint=Gt);let st,It,Ut=Gt,ir=Gt,dr=0,Ar=0,hr=Math.abs(ut),vr=[],Or;for(;dr+Ar<=hr;){if(Kt+=ft,Kt=Re)return null;dr+=Ar,ir=Ut,It=st;let ka={absOffsetX:hr,direction:ft,distanceFromAnchor:dr,previousVertex:ir};if(Ut=yn(Kt,je,ka),N===0)vr.push(ir),Or=Ut.sub(ir);else{let Ta,Ra=Ut.sub(ir);Ta=Ra.mag()===0?on(yn(Kt+ft,je,ka).sub(Ut),N,ft):on(Ra,N,ft),It||(It=ir.add(Ta)),st=en(Kt,Ta,Ut,be,Re,It,N,je,ka),vr.push(It),Or=st.sub(It)}Ar=Or.mag()}let Cr=Or._mult((hr-dr)/Ar)._add(It||ir),ta=Dt+Math.atan2(Ut.y-ir.y,Ut.x-ir.x);return vr.push(Cr),{point:Cr,angle:Ze?ta:0,path:vr}}let Yi=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ja(pe,y){for(let N=0;N=1;za--)ma.push(ua.path[za]);for(let za=1;zakn.signedDistanceFromCamera<=0)?[]:za.map(kn=>kn.point)}let Fa=[];if(ma.length>0){let za=ma[0].clone(),kn=ma[0].clone();for(let Dn=1;Dn=ka.x&&kn.x<=Ta.x&&za.y>=ka.y&&kn.y<=Ta.y?[ma]:kn.xTa.x||kn.yTa.y?[]:e.aG([ma],ka.x,ka.y,Ta.x,Ta.y)}for(let za of Fa){Ra.reset(za,.25*ta);let kn=0;kn=Ra.length<=.5*ta?1:Math.ceil(Ra.paddedLength/da)+1;for(let Dn=0;Dn{let Ze=Zr(je.x,je.y,Re,be.getElevation),ut=be.transform.projectTileCoordinates(Ze.point.x,Ze.point.y,be.unwrappedTileID,be.getElevation);return ut.point.x=(.5*ut.point.x+.5)*be.width,ut.point.y=(.5*-ut.point.y+.5)*be.height,ut})}(y,N);return function(fe){let be=0,Re=0,je=0,Ze=0;for(let ut=0;utRe&&(Re=Ze,be=je));return fe.slice(be,be+Re)}(ie)}queryRenderedSymbols(y){if(y.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let N=[],ie=new e.a8;for(let Dt of y){let Gt=new e.P(Dt.x+lt,Dt.y+lt);ie.extend(Gt),N.push(Gt)}let{minX:fe,minY:be,maxX:Re,maxY:je}=ie,Ze=this.grid.query(fe,be,Re,je).concat(this.ignoredGrid.query(fe,be,Re,je)),ut={},ft={};for(let Dt of Ze){let Gt=Dt.key;if(ut[Gt.bucketInstanceId]===void 0&&(ut[Gt.bucketInstanceId]={}),ut[Gt.bucketInstanceId][Gt.featureIndex])continue;let Kt=[new e.P(Dt.x1,Dt.y1),new e.P(Dt.x2,Dt.y1),new e.P(Dt.x2,Dt.y2),new e.P(Dt.x1,Dt.y2)];e.aH(N,Kt)&&(ut[Gt.bucketInstanceId][Gt.featureIndex]=!0,ft[Gt.bucketInstanceId]===void 0&&(ft[Gt.bucketInstanceId]=[]),ft[Gt.bucketInstanceId].push(Gt.featureIndex))}return ft}insertCollisionBox(y,N,ie,fe,be,Re){(ie?this.ignoredGrid:this.grid).insert({bucketInstanceId:fe,featureIndex:be,collisionGroupID:Re,overlapMode:N},y[0],y[1],y[2],y[3])}insertCollisionCircles(y,N,ie,fe,be,Re){let je=ie?this.ignoredGrid:this.grid,Ze={bucketInstanceId:fe,featureIndex:be,collisionGroupID:Re,overlapMode:N};for(let ut=0;ut=this.screenRightBoundary||fethis.screenBottomBoundary}isInsideGrid(y,N,ie,fe){return ie>=0&&y=0&&Nthis.projectAndGetPerspectiveRatio(da.x,da.y,fe,ut,Dt));ia=ma.some(da=>!da.isOccluded),ua=ma.map(da=>new e.P(da.x,da.y))}else ia=!0;return{box:e.aI(ua),allPointsOccluded:!ia}}}class fr{constructor(y,N,ie,fe){this.opacity=y?Math.max(0,Math.min(1,y.opacity+(y.placed?N:-N))):fe&&ie?1:0,this.placed=ie}isHidden(){return this.opacity===0&&!this.placed}}class lr{constructor(y,N,ie,fe,be){this.text=new fr(y?y.text:null,N,ie,be),this.icon=new fr(y?y.icon:null,N,fe,be)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Tr{constructor(y,N,ie){this.text=y,this.icon=N,this.skipFade=ie}}class Ir{constructor(y,N,ie,fe,be){this.bucketInstanceId=y,this.featureIndex=N,this.sourceLayerIndex=ie,this.bucketIndex=fe,this.tileID=be}}class Dr{constructor(y){this.crossSourceCollisions=y,this.maxGroupID=0,this.collisionGroups={}}get(y){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[y]){let N=++this.maxGroupID;this.collisionGroups[y]={ID:N,predicate:ie=>ie.collisionGroupID===N}}return this.collisionGroups[y]}}function ot(pe,y,N,ie,fe){let{horizontalAlign:be,verticalAlign:Re}=e.aP(pe);return new e.P(-(be-.5)*y+ie[0]*fe,-(Re-.5)*N+ie[1]*fe)}class kt{constructor(y,N,ie,fe,be){this.transform=y.clone(),this.terrain=N,this.collisionIndex=new rt(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ie,this.retainedQueryData={},this.collisionGroups=new Dr(fe),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=be,be&&(be.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(y){let N=this.terrain;return N?(ie,fe)=>N.getElevation(y,ie,fe):null}getBucketParts(y,N,ie,fe){let be=ie.getBucket(N),Re=ie.latestFeatureIndex;if(!be||!Re||N.id!==be.layerIds[0])return;let je=ie.collisionBoxArray,Ze=be.layers[0].layout,ut=be.layers[0].paint,ft=Math.pow(2,this.transform.zoom-ie.tileID.overscaledZ),Dt=ie.tileSize/e.a6,Gt=ie.tileID.toUnwrapped(),Kt=Ze.get("text-rotation-alignment")==="map",st=e.aK(ie,1,this.transform.zoom),It=e.aL(this.collisionIndex.transform,ie,ut.get("text-translate"),ut.get("text-translate-anchor")),Ut=e.aL(this.collisionIndex.transform,ie,ut.get("icon-translate"),ut.get("icon-translate-anchor")),ir=cr(Kt,this.transform,st);this.retainedQueryData[be.bucketInstanceId]=new Ir(be.bucketInstanceId,Re,be.sourceLayerIndex,be.index,ie.tileID);let dr={bucket:be,layout:Ze,translationText:It,translationIcon:Ut,unwrappedTileID:Gt,pitchedLabelPlaneMatrix:ir,scale:ft,textPixelRatio:Dt,holdingForFade:ie.holdingForSymbolFade(),collisionBoxArray:je,partiallyEvaluatedTextSize:e.aw(be.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(be.sourceID)};if(fe)for(let Ar of be.sortKeyRanges){let{sortKey:hr,symbolInstanceStart:vr,symbolInstanceEnd:Or}=Ar;y.push({sortKey:hr,symbolInstanceStart:vr,symbolInstanceEnd:Or,parameters:dr})}else y.push({symbolInstanceStart:0,symbolInstanceEnd:be.symbolInstances.length,parameters:dr})}attemptAnchorPlacement(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt,st,It,Ut,ir,dr,Ar,hr){var vr,Or,Cr;let ta=e.aM[y.textAnchor],ka=[y.textOffset0,y.textOffset1],Ta=ot(ta,ie,fe,ka,be),Ra=this.collisionIndex.placeCollisionBox(N,Gt,Ze,ut,ft,je,Re,Ut,Dt.predicate,Ar,Ta,hr);if((!dr||this.collisionIndex.placeCollisionBox(dr,Gt,Ze,ut,ft,je,Re,ir,Dt.predicate,Ar,Ta,hr).placeable)&&Ra.placeable){let ua;if(!((vr=this.prevPlacement)===null||vr===void 0)&&vr.variableOffsets[Kt.crossTileID]&&(!((Cr=(Or=this.prevPlacement)===null||Or===void 0?void 0:Or.placements[Kt.crossTileID])===null||Cr===void 0)&&Cr.text)&&(ua=this.prevPlacement.variableOffsets[Kt.crossTileID].anchor),Kt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Kt.crossTileID]={textOffset:ka,width:ie,height:fe,anchor:ta,textBoxScale:be,prevAnchor:ua},this.markUsedJustification(st,ta,Kt,It),st.allowVerticalPlacement&&(this.markUsedOrientation(st,It,Kt),this.placedOrientations[Kt.crossTileID]=It),{shift:Ta,placedGlyphBoxes:Ra}}}placeLayerBucketPart(y,N,ie){let{bucket:fe,layout:be,translationText:Re,translationIcon:je,unwrappedTileID:Ze,pitchedLabelPlaneMatrix:ut,textPixelRatio:ft,holdingForFade:Dt,collisionBoxArray:Gt,partiallyEvaluatedTextSize:Kt,collisionGroup:st}=y.parameters,It=be.get("text-optional"),Ut=be.get("icon-optional"),ir=e.aN(be,"text-overlap","text-allow-overlap"),dr=ir==="always",Ar=e.aN(be,"icon-overlap","icon-allow-overlap"),hr=Ar==="always",vr=be.get("text-rotation-alignment")==="map",Or=be.get("text-pitch-alignment")==="map",Cr=be.get("icon-text-fit")!=="none",ta=be.get("symbol-z-order")==="viewport-y",ka=dr&&(hr||!fe.hasIconData()||Ut),Ta=hr&&(dr||!fe.hasTextData()||It);!fe.collisionArrays&&Gt&&fe.deserializeCollisionBoxes(Gt);let Ra=this.retainedQueryData[fe.bucketInstanceId].tileID,ua=this._getTerrainElevationFunc(Ra),ia=this.transform.getFastPathSimpleProjectionMatrix(Ra),ma=(da,Fa,za)=>{var kn,Dn;if(N[da.crossTileID])return;if(Dt)return void(this.placements[da.crossTileID]=new Tr(!1,!1,!1));let ui=!1,cn=!1,sn=!0,ei=null,Pn={box:null,placeable:!1,offscreen:null,occluded:!1},Rn={placeable:!1},In=null,Jn=null,Ei=null,so=0,ti=0,bi=0;Fa.textFeatureIndex?so=Fa.textFeatureIndex:da.useRuntimeCollisionCircles&&(so=da.featureIndex),Fa.verticalTextFeatureIndex&&(ti=Fa.verticalTextFeatureIndex);let Wi=Fa.textBox;if(Wi){let Bs=es=>{let $o=e.ax.horizontal;if(fe.allowVerticalPlacement&&!es&&this.prevPlacement){let _s=this.prevPlacement.placedOrientations[da.crossTileID];_s&&(this.placedOrientations[da.crossTileID]=_s,$o=_s,this.markUsedOrientation(fe,$o,da))}return $o},So=(es,$o)=>{if(fe.allowVerticalPlacement&&da.numVerticalGlyphVertices>0&&Fa.verticalTextBox){for(let _s of fe.writingModes)if(_s===e.ax.vertical?(Pn=$o(),Rn=Pn):Pn=es(),Pn?.placeable)break}else Pn=es()},Ws=da.textAnchorOffsetStartIndex,Zo=da.textAnchorOffsetEndIndex;if(Zo===Ws){let es=($o,_s)=>{let Go=this.collisionIndex.placeCollisionBox($o,ir,ft,Ra,Ze,Or,vr,Re,st.predicate,ua,void 0,ia);return Go?.placeable&&(this.markUsedOrientation(fe,_s,da),this.placedOrientations[da.crossTileID]=_s),Go};So(()=>es(Wi,e.ax.horizontal),()=>{let $o=Fa.verticalTextBox;return fe.allowVerticalPlacement&&da.numVerticalGlyphVertices>0&&$o?es($o,e.ax.vertical):{box:null,offscreen:null}}),Bs(Pn?.placeable)}else{let es=e.aM[(Dn=(kn=this.prevPlacement)===null||kn===void 0?void 0:kn.variableOffsets[da.crossTileID])===null||Dn===void 0?void 0:Dn.anchor],$o=(Go,Ys,Ll)=>{let mo=Go.x2-Go.x1,ru=Go.y2-Go.y1,Rs=da.textBoxScale,Yu=Cr&&Ar==="never"?Ys:null,Ul=null,ql=ir==="never"?1:2,fo="never";es&&ql++;for(let Xo=0;Xo$o(Wi,Fa.iconBox,e.ax.horizontal),()=>{let Go=Fa.verticalTextBox;return fe.allowVerticalPlacement&&!Pn?.placeable&&da.numVerticalGlyphVertices>0&&Go?$o(Go,Fa.verticalIconBox,e.ax.vertical):{box:null,occluded:!0,offscreen:null}}),Pn&&(ui=Pn.placeable,sn=Pn.offscreen);let _s=Bs(Pn?.placeable);if(!ui&&this.prevPlacement){let Go=this.prevPlacement.variableOffsets[da.crossTileID];Go&&(this.variableOffsets[da.crossTileID]=Go,this.markUsedJustification(fe,Go.anchor,da,_s))}}}if(In=Pn,ui=In?.placeable,sn=In?.offscreen,da.useRuntimeCollisionCircles&&da.centerJustifiedTextSymbolIndex>=0){let Bs=fe.text.placedSymbolArray.get(da.centerJustifiedTextSymbolIndex),So=e.ay(fe.textSizeData,Kt,Bs),Ws=be.get("text-padding");Jn=this.collisionIndex.placeCollisionCircles(ir,Bs,fe.lineVertexArray,fe.glyphOffsetArray,So,Ze,ut,ie,Or,st.predicate,da.collisionCircleDiameter,Ws,Re,ua),Jn.circles.length&&Jn.collisionDetected&&!ie&&e.w("Collisions detected, but collision boxes are not shown"),ui=dr||Jn.circles.length>0&&!Jn.collisionDetected,sn&&(sn=Jn.offscreen)}if(Fa.iconFeatureIndex&&(bi=Fa.iconFeatureIndex),Fa.iconBox){let Bs=So=>this.collisionIndex.placeCollisionBox(So,Ar,ft,Ra,Ze,Or,vr,je,st.predicate,ua,Cr&&ei?ei:void 0,ia);Rn&&Rn.placeable&&Fa.verticalIconBox?(Ei=Bs(Fa.verticalIconBox),cn=Ei.placeable):(Ei=Bs(Fa.iconBox),cn=Ei.placeable),sn&&(sn=Ei.offscreen)}let ro=It||da.numHorizontalGlyphVertices===0&&da.numVerticalGlyphVertices===0,Mo=Ut||da.numIconVertices===0;ro||Mo?Mo?ro||cn&&(cn=ui):ui=cn&&ui:cn=ui=cn&&ui;let zs=cn&&Ei.placeable;if(ui&&In.placeable&&this.collisionIndex.insertCollisionBox(In.box,ir,be.get("text-ignore-placement"),fe.bucketInstanceId,Rn&&Rn.placeable&&ti?ti:so,st.ID),zs&&this.collisionIndex.insertCollisionBox(Ei.box,Ar,be.get("icon-ignore-placement"),fe.bucketInstanceId,bi,st.ID),Jn&&ui&&this.collisionIndex.insertCollisionCircles(Jn.circles,ir,be.get("text-ignore-placement"),fe.bucketInstanceId,so,st.ID),ie&&this.storeCollisionData(fe.bucketInstanceId,za,Fa,In,Ei,Jn),da.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(fe.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[da.crossTileID]=new Tr((ui||ka)&&!In?.occluded,(cn||Ta)&&!Ei?.occluded,sn||fe.justReloaded),N[da.crossTileID]=!0};if(ta){if(y.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let da=fe.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let Fa=da.length-1;Fa>=0;--Fa){let za=da[Fa];ma(fe.symbolInstances.get(za),fe.collisionArrays[za],za)}}else for(let da=y.symbolInstanceStart;da=0&&(y.text.placedSymbolArray.get(je).crossTileID=be>=0&&je!==be?0:ie.crossTileID)}markUsedOrientation(y,N,ie){let fe=N===e.ax.horizontal||N===e.ax.horizontalOnly?N:0,be=N===e.ax.vertical?N:0,Re=[ie.leftJustifiedTextSymbolIndex,ie.centerJustifiedTextSymbolIndex,ie.rightJustifiedTextSymbolIndex];for(let je of Re)y.text.placedSymbolArray.get(je).placedOrientation=fe;ie.verticalPlacedTextSymbolIndex&&(y.text.placedSymbolArray.get(ie.verticalPlacedTextSymbolIndex).placedOrientation=be)}commit(y){this.commitTime=y,this.zoomAtLastRecencyCheck=this.transform.zoom;let N=this.prevPlacement,ie=!1;this.prevZoomAdjustment=N?N.zoomAdjustment(this.transform.zoom):0;let fe=N?N.symbolFadeChange(y):1,be=N?N.opacities:{},Re=N?N.variableOffsets:{},je=N?N.placedOrientations:{};for(let Ze in this.placements){let ut=this.placements[Ze],ft=be[Ze];ft?(this.opacities[Ze]=new lr(ft,fe,ut.text,ut.icon),ie||(ie=ut.text!==ft.text.placed),ie||(ie=ut.icon!==ft.icon.placed)):(this.opacities[Ze]=new lr(null,fe,ut.text,ut.icon,ut.skipFade),ie||(ie=ut.text||ut.icon))}for(let Ze in be){let ut=be[Ze];if(!this.opacities[Ze]){let ft=new lr(ut,fe,!1,!1);ft.isHidden()||(this.opacities[Ze]=ft,ie||(ie=ut.text.placed),ie||(ie=ut.icon.placed))}}for(let Ze in Re)this.variableOffsets[Ze]||!this.opacities[Ze]||this.opacities[Ze].isHidden()||(this.variableOffsets[Ze]=Re[Ze]);for(let Ze in je)this.placedOrientations[Ze]||!this.opacities[Ze]||this.opacities[Ze].isHidden()||(this.placedOrientations[Ze]=je[Ze]);if(N&&N.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");ie?this.lastPlacementChangeTime=y:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=N?N.lastPlacementChangeTime:y)}updateLayerOpacities(y,N){let ie={};for(let fe of N){let be=fe.getBucket(y);be&&fe.latestFeatureIndex&&y.id===be.layerIds[0]&&this.updateBucketOpacities(be,fe.tileID,ie,fe.collisionBoxArray)}}updateBucketOpacities(y,N,ie,fe){y.hasTextData()&&(y.text.opacityVertexArray.clear(),y.text.hasVisibleVertices=!1),y.hasIconData()&&(y.icon.opacityVertexArray.clear(),y.icon.hasVisibleVertices=!1),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexArray.clear(),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexArray.clear();let be=y.layers[0],Re=be.layout,je=new lr(null,0,!1,!1,!0),Ze=Re.get("text-allow-overlap"),ut=Re.get("icon-allow-overlap"),ft=be._unevaluatedLayout.hasValue("text-variable-anchor")||be._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Dt=Re.get("text-rotation-alignment")==="map",Gt=Re.get("text-pitch-alignment")==="map",Kt=Re.get("icon-text-fit")!=="none",st=new lr(null,0,Ze&&(ut||!y.hasIconData()||Re.get("icon-optional")),ut&&(Ze||!y.hasTextData()||Re.get("text-optional")),!0);!y.collisionArrays&&fe&&(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData())&&y.deserializeCollisionBoxes(fe);let It=(ir,dr,Ar)=>{for(let hr=0;hr0,ta=this.placedOrientations[dr.crossTileID],ka=ta===e.ax.vertical,Ta=ta===e.ax.horizontal||ta===e.ax.horizontalOnly;if(Ar>0||hr>0){let ua=wa(Or.text);It(y.text,Ar,ka?pn:ua),It(y.text,hr,Ta?pn:ua);let ia=Or.text.isHidden(),ma=[dr.rightJustifiedTextSymbolIndex,dr.centerJustifiedTextSymbolIndex,dr.leftJustifiedTextSymbolIndex];for(let za of ma)za>=0&&(y.text.placedSymbolArray.get(za).hidden=ia||ka?1:0);dr.verticalPlacedTextSymbolIndex>=0&&(y.text.placedSymbolArray.get(dr.verticalPlacedTextSymbolIndex).hidden=ia||Ta?1:0);let da=this.variableOffsets[dr.crossTileID];da&&this.markUsedJustification(y,da.anchor,dr,ta);let Fa=this.placedOrientations[dr.crossTileID];Fa&&(this.markUsedJustification(y,"left",dr,Fa),this.markUsedOrientation(y,Fa,dr))}if(Cr){let ua=wa(Or.icon),ia=!(Kt&&dr.verticalPlacedIconSymbolIndex&&ka);dr.placedIconSymbolIndex>=0&&(It(y.icon,dr.numIconVertices,ia?ua:pn),y.icon.placedSymbolArray.get(dr.placedIconSymbolIndex).hidden=Or.icon.isHidden()),dr.verticalPlacedIconSymbolIndex>=0&&(It(y.icon,dr.numVerticalIconVertices,ia?pn:ua),y.icon.placedSymbolArray.get(dr.verticalPlacedIconSymbolIndex).hidden=Or.icon.isHidden())}let Ra=Ut?.has(ir)?Ut.get(ir):{text:null,icon:null};if(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData()){let ua=y.collisionArrays[ir];if(ua){let ia=new e.P(0,0);if(ua.textBox||ua.verticalTextBox){let ma=!0;if(ft){let da=this.variableOffsets[vr];da?(ia=ot(da.anchor,da.width,da.height,da.textOffset,da.textBoxScale),Dt&&ia._rotate(Gt?-this.transform.bearingInRadians:this.transform.bearingInRadians)):ma=!1}if(ua.textBox||ua.verticalTextBox){let da;ua.textBox&&(da=ka),ua.verticalTextBox&&(da=Ta),jt(y.textCollisionBox.collisionVertexArray,Or.text.placed,!ma||da,Ra.text,ia.x,ia.y)}}if(ua.iconBox||ua.verticalIconBox){let ma=!!(!Ta&&ua.verticalIconBox),da;ua.iconBox&&(da=ma),ua.verticalIconBox&&(da=!ma),jt(y.iconCollisionBox.collisionVertexArray,Or.icon.placed,da,Ra.icon,Kt?ia.x:0,Kt?ia.y:0)}}}}if(y.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[y.bucketInstanceId]&&(this.retainedQueryData[y.bucketInstanceId].featureSortOrder=y.featureSortOrder),y.hasTextData()&&y.text.opacityVertexBuffer&&y.text.opacityVertexBuffer.updateData(y.text.opacityVertexArray),y.hasIconData()&&y.icon.opacityVertexBuffer&&y.icon.opacityVertexBuffer.updateData(y.icon.opacityVertexArray),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexBuffer&&y.iconCollisionBox.collisionVertexBuffer.updateData(y.iconCollisionBox.collisionVertexArray),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexBuffer&&y.textCollisionBox.collisionVertexBuffer.updateData(y.textCollisionBox.collisionVertexArray),y.text.opacityVertexArray.length!==y.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${y.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${y.text.layoutVertexArray.length}) / 4`);if(y.icon.opacityVertexArray.length!==y.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${y.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${y.icon.layoutVertexArray.length}) / 4`);y.bucketInstanceId in this.collisionCircleArrays&&(y.collisionCircleArray=this.collisionCircleArrays[y.bucketInstanceId],delete this.collisionCircleArrays[y.bucketInstanceId])}symbolFadeChange(y){return this.fadeDuration===0?1:(y-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(y){return Math.max(0,(this.transform.zoom-y)/1.5)}hasTransitions(y){return this.stale||y-this.lastPlacementChangeTimey}setStale(){this.stale=!0}}function jt(pe,y,N,ie,fe,be){ie&&ie.length!==0||(ie=[0,0,0,0]);let Re=ie[0]-lt,je=ie[1]-lt,Ze=ie[2]-lt,ut=ie[3]-lt;pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Re,je),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Ze,je),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Ze,ut),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Re,ut)}let ar=Math.pow(2,25),Er=Math.pow(2,24),xr=Math.pow(2,17),zr=Math.pow(2,16),Lr=Math.pow(2,9),aa=Math.pow(2,8),Sa=Math.pow(2,1);function wa(pe){if(pe.opacity===0&&!pe.placed)return 0;if(pe.opacity===1&&pe.placed)return 4294967295;let y=pe.placed?1:0,N=Math.floor(127*pe.opacity);return N*ar+y*Er+N*xr+y*zr+N*Lr+y*aa+N*Sa+y}let pn=0;class tn{constructor(y){this._sortAcrossTiles=y.layout.get("symbol-z-order")!=="viewport-y"&&!y.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(y,N,ie,fe,be){let Re=this._bucketParts;for(;this._currentTileIndexje.sortKey-Ze.sortKey));this._currentPartIndex!this._forceFullPlacement&&m()-fe>2;for(;this._currentPlacementIndex>=0;){let Re=N[y[this._currentPlacementIndex]],je=this.placement.collisionIndex.transform.zoom;if(e.aQ(Re)&&Re.layout&&(!Re.minzoom||Re.minzoom<=je)&&(!Re.maxzoom||Re.maxzoom>je)){if(this._inProgressLayer||(this._inProgressLayer=new tn(Re)),this._inProgressLayer.continuePlacement(ie[Re.source],this.placement,this._showCollisionBoxes,Re,be))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(y){return this.placement.commit(y),this.placement}}let rn=512/e.a6/2;class Ri{constructor(y,N,ie){this.tileID=y,this.bucketInstanceId=ie,this._symbolsByKey={};let fe=new Map;for(let be=0;be({x:Math.floor(Ze.anchorX*rn),y:Math.floor(Ze.anchorY*rn)})),crossTileIDs:Re.map(Ze=>Ze.crossTileID)};if(je.positions.length>128){let Ze=new e.aR(je.positions.length,16,Uint16Array);for(let{x:ut,y:ft}of je.positions)Ze.add(ut,ft);Ze.finish(),delete je.positions,je.index=Ze}this._symbolsByKey[be]=je}}getScaledCoordinates(y,N){let{x:ie,y:fe,z:be}=this.tileID.canonical,{x:Re,y:je,z:Ze}=N.canonical,ut=rn/Math.pow(2,Ze-be),ft=(je*e.a6+y.anchorY)*ut,Dt=fe*e.a6*rn;return{x:Math.floor((Re*e.a6+y.anchorX)*ut-ie*e.a6*rn),y:Math.floor(ft-Dt)}}findMatches(y,N,ie){let fe=this.tileID.canonical.zy)}}class Gn{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class no{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(y){let N=Math.round((y-this.lng)/360);if(N!==0)for(let ie in this.indexes){let fe=this.indexes[ie],be={};for(let Re in fe){let je=fe[Re];je.tileID=je.tileID.unwrapTo(je.tileID.wrap+N),be[je.tileID.key]=je}this.indexes[ie]=be}this.lng=y}addBucket(y,N,ie){var fe,be,Re;if(!((fe=this.indexes[y.overscaledZ])===null||fe===void 0)&&fe[y.key]){if(this.indexes[y.overscaledZ][y.key].bucketInstanceId===N.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(y.overscaledZ,this.indexes[y.overscaledZ][y.key])}for(let Ze=0;Zey.overscaledZ)for(let ft in ut){let Dt=ut[ft];Dt.tileID.isChildOf(y)&&Dt.findMatches(N.symbolInstances,y,je)}else{let ft=ut[y.scaledTo(Number(Ze)).key];ft&&ft.findMatches(N.symbolInstances,y,je)}}for(let Ze=0;Ze=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}}),Zq=ze({"src/plots/map/styles/arcgis-sat.js"(J,G){"use strict";G.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}}),Av=ze({"src/plots/map/constants.js"(J,G){"use strict";var p=(Nv(),Po(nv)).default,b=Xq(),E=Zq(),k='\xA9 OpenStreetMap contributors',l="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",e="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",t="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",o={basic:t,streets:t,outdoors:t,light:l,dark:e,satellite:E,"satellite-streets":b,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:k,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":l,"carto-darkmatter":e,"carto-voyager":t,"carto-positron-nolabels":n,"carto-darkmatter-nolabels":r,"carto-voyager-nolabels":a},s=p(o);G.exports={styleValueDflt:"basic",stylesMap:o,styleValuesMap:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",s.join(", "),"or use a tile service."].join(` +`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}}}),ly=ze({"src/plots/map/layout_attributes.js"(J,G){"use strict";var p=Nr(),b=Qn().defaultLine,E=Ml().attributes,k=Qs(),l=su().textposition,e=Al().overrideAll,t=hs().templatedArray,n=Av(),r=k({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});r.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var a=G.exports=e({_arrayAttrRegexps:[p.counterRegex("map",".layers",!0)],domain:E({name:"map"}),style:{valType:"any",values:n.styleValuesMap,dflt:n.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:t("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:b},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:b}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:r,textposition:p.extendFlat({},l,{arrayOk:!1})}})},"plot","from-root");a.uirevision={valType:"any",editType:"none"}}}),q2=ze({"src/traces/scattermap/attributes.js"(J,G){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=Bd(),l=g1(),e=su(),t=ly(),n=ws(),r=qs(),a=Ki().extendFlat,o=Al().overrideAll,s=ly(),c=l.line,g=l.marker;G.exports=o({lon:l.lon,lat:l.lat,cluster:{enabled:{valType:"boolean"},maxzoom:a({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:a({},g.opacity,{dflt:1})},mode:a({},e.mode,{dflt:"markers"}),text:a({},e.text,{}),texttemplate:b({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:a({},e.hovertext,{}),line:{color:c.color,width:c.width},connectgaps:e.connectgaps,marker:a({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:g.opacity,size:g.size,sizeref:g.sizeref,sizemin:g.sizemin,sizemode:g.sizemode},r("marker")),fill:l.fill,fillcolor:k(),textfont:t.layers.symbol.textfont,textposition:t.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:a({},n.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:p(),hovertemplatefallback:E()},"calc","nested")}}),SM=ze({"src/traces/scattermap/constants.js"(J,G){"use strict";var p=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];G.exports={isSupportedFont:function(b){return p.indexOf(b)!==-1}}}}),$q=ze({"src/traces/scattermap/defaults.js"(J,G){"use strict";var p=Nr(),b=el(),E=id(),k=_d(),l=xd(),e=Od(),t=q2(),n=SM().isSupportedFont;G.exports=function(o,s,c,g){function f(A,x){return p.coerce(o,s,t,A,x)}function v(A,x){return p.coerce2(o,s,t,A,x)}var m=r(o,s,f);if(!m){s.visible=!1;return}if(f("text"),f("texttemplate"),f("texttemplatefallback"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("mode"),f("below"),b.hasMarkers(s)){E(o,s,c,g,f,{noLine:!0,noAngle:!0}),f("marker.allowoverlap"),f("marker.angle");var i=s.marker;i.symbol!=="circle"&&(p.isArrayOrTypedArray(i.size)&&(i.size=i.size[0]),p.isArrayOrTypedArray(i.color)&&(i.color=i.color[0]))}b.hasLines(s)&&(k(o,s,c,g,f,{noDash:!0}),f("connectgaps"));var T=v("cluster.maxzoom"),S=v("cluster.step"),M=v("cluster.color",s.marker&&s.marker.color||c),C=v("cluster.size"),_=v("cluster.opacity"),w=T!==!1||S!==!1||M!==!1||C!==!1||_!==!1,h=f("cluster.enabled",w);if(h||b.hasText(s)){var u=g.font.family;l(o,s,g,f,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:n(u)?u:"Open Sans Regular",weight:g.font.weight,style:g.font.style,size:g.font.size,color:g.font.color}})}f("fill"),s.fill!=="none"&&e(o,s,c,f),p.coerceSelectionMarkerOpacity(s,f)};function r(a,o,s){var c=s("lon")||[],g=s("lat")||[],f=Math.min(c.length,g.length);return o._length=f,f}}}),EM=ze({"src/traces/scattermap/format_labels.js"(J,G){"use strict";var p=Gi();G.exports=function(E,k,l){var e={},t=l[k.subplot]._subplot,n=t.mockAxis,r=E.lonlat;return e.lonLabel=p.tickText(n,n.c2l(r[0]),!0).text,e.latLabel=p.tickText(n,n.c2l(r[1]),!0).text,e}}}),kM=ze({"src/plots/map/convert_text_opts.js"(J,G){"use strict";var p=Nr();G.exports=function(E,k){var l=E.split(" "),e=l[0],t=l[1],n=p.isArrayOrTypedArray(k)?p.mean(k):k,r=.5+n/100,a=1.5+n/100,o=["",""],s=[0,0];switch(e){case"top":o[0]="top",s[1]=-a;break;case"bottom":o[0]="bottom",s[1]=a;break}switch(t){case"left":o[1]="right",s[0]=-r;break;case"right":o[1]="left",s[0]=r;break}var c;return o[0]&&o[1]?c=o.join("-"):o[0]?c=o[0]:o[1]?c=o[1]:c="center",{anchor:c,offset:s}}}}),Kq=ze({"src/traces/scattermap/convert.js"(J,G){"use strict";var p=ao(),b=Nr(),E=No().BADNUM,k=Qg(),l=fl(),e=Xi(),t=lg(),n=el(),r=SM().isSupportedFont,a=kM(),o=kh().appendArrayPointValue,s=Cs().NEWLINES,c=Cs().BR_TAG_ALL;G.exports=function(_,w){var h=w[0].trace,u=h.visible===!0&&h._length!==0,A=h.fill!=="none",x=n.hasLines(h),z=n.hasMarkers(h),I=n.hasText(h),O=z&&h.marker.symbol==="circle",D=z&&h.marker.symbol!=="circle",B=h.cluster&&h.cluster.enabled,F=g("fill"),P=g("line"),j=g("circle"),U=g("symbol"),$={fill:F,line:P,circle:j,symbol:U};if(!u)return $;var Q;if((A||x)&&(Q=k.calcTraceToLineCoords(w)),A&&(F.geojson=k.makePolygon(Q),F.layout.visibility="visible",b.extendFlat(F.paint,{"fill-color":h.fillcolor})),x&&(P.geojson=k.makeLine(Q),P.layout.visibility="visible",b.extendFlat(P.paint,{"line-width":h.line.width,"line-color":h.line.color,"line-opacity":h.opacity})),O){var re=f(w);j.geojson=re.geojson,j.layout.visibility="visible",B&&(j.filter=["!",["has","point_count"]],$.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":S(h.cluster.color,h.cluster.step),"circle-radius":S(h.cluster.size,h.cluster.step),"circle-opacity":S(h.cluster.opacity,h.cluster.step)}},$.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":M(h),"text-size":12}}),b.extendFlat(j.paint,{"circle-color":re.mcc,"circle-radius":re.mrc,"circle-opacity":re.mo})}if(O&&B&&(j.filter=["!",["has","point_count"]]),(D||I)&&(U.geojson=v(w,_),b.extendFlat(U.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),D&&(b.extendFlat(U.layout,{"icon-size":h.marker.size/10}),"angle"in h.marker&&h.marker.angle!=="auto"&&b.extendFlat(U.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),U.layout["icon-allow-overlap"]=h.marker.allowoverlap,b.extendFlat(U.paint,{"icon-opacity":h.opacity*h.marker.opacity,"icon-color":h.marker.color,"icon-halo-color":h.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),I)){var ne=(h.marker||{}).size,se=a(h.textposition,ne);b.extendFlat(U.layout,{"text-size":h.textfont.size,"text-anchor":se.anchor,"text-offset":se.offset,"text-font":M(h)}),b.extendFlat(U.paint,{"text-color":h.textfont.color,"text-opacity":h.opacity})}return $};function g(C){return{type:C,geojson:k.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function f(C){var _=C[0].trace,w=_.marker,h=_.selectedpoints,u=b.isArrayOrTypedArray(w.color),A=b.isArrayOrTypedArray(w.size),x=b.isArrayOrTypedArray(w.opacity),z;function I(ne){return _.opacity*ne}function O(ne){return ne/2}var D;u&&(l.hasColorscale(_,"marker")?D=l.makeColorScaleFuncFromTrace(w):D=b.identity);var B;A&&(B=t(_));var F;x&&(F=function(ne){var se=p(ne)?+b.constrain(ne,0,1):0;return I(se)});var P=[];for(z=0;z850?z+=" Black":u>750?z+=" Extra Bold":u>650?z+=" Bold":u>550?z+=" Semi Bold":u>450?z+=" Medium":u>350?z+=" Regular":u>250?z+=" Light":u>150?z+=" Extra Light":z+=" Thin"):A.slice(0,2).join(" ")==="Open Sans"?(z="Open Sans",u>750?z+=" Extrabold":u>650?z+=" Bold":u>550?z+=" Semibold":u>350?z+=" Regular":z+=" Light"):A.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(z="Klokantech Noto Sans",A[3]==="CJK"&&(z+=" CJK"),z+=u>500?" Bold":" Regular")),x&&(z+=" Italic"),z==="Open Sans Regular Italic"?z="Open Sans Italic":z==="Open Sans Regular Bold"?z="Open Sans Bold":z==="Open Sans Regular Bold Italic"?z="Open Sans Bold Italic":z==="Klokantech Noto Sans Regular Italic"&&(z="Klokantech Noto Sans Italic"),r(z)||(z=w);var I=z.split(", ");return I}}}),Jq=ze({"src/traces/scattermap/plot.js"(J,G){"use strict";var p=Nr(),b=Kq(),E=Av().traceLayerPrefix,k={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function l(t,n,r,a){this.type="scattermap",this.subplot=t,this.uid=n,this.clusterEnabled=r,this.isHidden=a,this.sourceIds={fill:"source-"+n+"-fill",line:"source-"+n+"-line",circle:"source-"+n+"-circle",symbol:"source-"+n+"-symbol",cluster:"source-"+n+"-circle",clusterCount:"source-"+n+"-circle"},this.layerIds={fill:E+n+"-fill",line:E+n+"-line",circle:E+n+"-circle",symbol:E+n+"-symbol",cluster:E+n+"-cluster",clusterCount:E+n+"-cluster-count"},this.below=null}var e=l.prototype;e.addSource=function(t,n,r){var a={type:"geojson",data:n.geojson};r&&r.enabled&&p.extendFlat(a,{cluster:!0,clusterMaxZoom:r.maxzoom});var o=this.subplot.map.getSource(this.sourceIds[t]);o?o.setData(n.geojson):this.subplot.map.addSource(this.sourceIds[t],a)},e.setSourceData=function(t,n){this.subplot.map.getSource(this.sourceIds[t]).setData(n.geojson)},e.addLayer=function(t,n,r){var a={type:n.type,id:this.layerIds[t],source:this.sourceIds[t],layout:n.layout,paint:n.paint};n.filter&&(a.filter=n.filter);for(var o=this.layerIds[t],s,c=this.subplot.getMapLayers(),g=0;g=0;x--){var z=A[x];o.removeLayer(v.layerIds[z])}u||o.removeSource(v.sourceIds.circle)}function T(u){for(var A=k.nonCluster,x=0;x=0;x--){var z=A[x];o.removeLayer(v.layerIds[z]),u||o.removeSource(v.sourceIds[z])}}function M(u){f?i(u):S(u)}function C(u){g?m(u):T(u)}function _(){for(var u=g?k.cluster:k.nonCluster,A=0;A=0;a--){var o=r[a];n.removeLayer(this.layerIds[o]),n.removeSource(this.sourceIds[o])}},G.exports=function(n,r){var a=r[0].trace,o=a.cluster&&a.cluster.enabled,s=a.visible!==!0,c=new l(n,a.uid,o,s),g=b(n.gd,r),f=c.below=n.belowLookup["trace-"+a.uid],v,m,i;if(o)for(c.addSource("circle",g.circle,a.cluster),v=0;v=0?Math.floor((a+180)/360):Math.ceil((a-180)/360),C=M*360,_=a-C;function w(B){var F=B.lonlat;if(F[0]===l||T&&m.indexOf(B.i+1)===-1)return 1/0;var P=b.modHalf(F[0],360),j=F[1],U=v.project([P,j]),$=U.x-g.c2p([_,j]),Q=U.y-f.c2p([P,o]),re=Math.max(3,B.mrc||0);return Math.max(Math.sqrt($*$+Q*Q)-re,1-3/re)}if(p.getClosest(s,w,r),r.index!==!1){var h=s[r.index],u=h.lonlat,A=[b.modHalf(u[0],360)+C,u[1]],x=g.c2p(A),z=f.c2p(A),I=h.mrc||1;r.x0=x-I,r.x1=x+I,r.y0=z-I,r.y1=z+I;var O={};O[c.subplot]={_subplot:v};var D=c._module.formatLabels(h,c,O);return r.lonLabel=D.lonLabel,r.latLabel=D.latLabel,r.color=E(c,h),r.extraText=n(c,h,s[0].t.labels),r.hovertemplate=c.hovertemplate,[r]}}function n(r,a,o){if(r.hovertemplate)return;var s=a.hi||r.hoverinfo,c=s.split("+"),g=c.indexOf("all")!==-1,f=c.indexOf("lon")!==-1,v=c.indexOf("lat")!==-1,m=a.lonlat,i=[];function T(S){return S+"\xB0"}return g||f&&v?i.push("("+T(m[1])+", "+T(m[0])+")"):f?i.push(o.lon+T(m[0])):v&&i.push(o.lat+T(m[1])),(g||c.indexOf("text")!==-1)&&k(a,r,i),i.join("
")}G.exports={hoverPoints:t,getExtraText:n}}}),Qq=ze({"src/traces/scattermap/event_data.js"(J,G){"use strict";G.exports=function(b,E){return b.lon=E.lon,b.lat=E.lat,b}}}),eV=ze({"src/traces/scattermap/select.js"(J,G){"use strict";var p=Nr(),b=el(),{BADNUM:E}=No();G.exports=function(l,e){var t;let{cd:n,xaxis:r,yaxis:a}=l,{trace:o}=n[0];if(!b.hasMarkers(o))return[];if(e===!1){for(let f of n)f.selected=0;return[]}let s=(t=r._subplot)==null?void 0:t.map,c=s?.getRenderWorldCopies()&&e.xmax>e.xmin?s.transform.worldSize:0,g=[];for(let f=0;f1)return 1;for(var Y=d,te=0;te<8;te++){var ce=this.sampleCurveX(Y)-d;if(Math.abs(ce)ce?ge=Y:Ce=Y,Y=.5*(Ce-ge)+ge;return Y},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},r}(),s=n(o);let c,g;function f(){return c!=null||(c=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),c}function v(){if(g==null&&(g=!1,f())){let d=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(d){for(let Y=0;Y<5*5;Y++){let te=4*Y;d.fillStyle=`rgb(${te},${te+1},${te+2})`,d.fillRect(Y%5,Math.floor(Y/5),1,1)}let L=d.getImageData(0,0,5,5).data;for(let Y=0;Y<5*5*4;Y++)if(Y%4!=3&&L[Y]!==Y){g=!0;break}}}return g||!1}var m=1e-6,i=typeof Float32Array<"u"?Float32Array:Array;function T(){var R=new i(9);return i!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[5]=0,R[6]=0,R[7]=0),R[0]=1,R[4]=1,R[8]=1,R}function S(R){return R[0]=1,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=1,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=1,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}function M(){var R=new i(3);return i!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R}function C(R){var d=R[0],L=R[1],Y=R[2];return Math.sqrt(d*d+L*L+Y*Y)}function _(R,d,L){var Y=new i(3);return Y[0]=R,Y[1]=d,Y[2]=L,Y}function w(R,d,L){return R[0]=d[0]+L[0],R[1]=d[1]+L[1],R[2]=d[2]+L[2],R}function h(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R[2]=d[2]*L,R}function u(R,d,L){var Y=d[0],te=d[1],ce=d[2],me=L[0],ge=L[1],Ce=L[2];return R[0]=te*Ce-ce*ge,R[1]=ce*me-Y*Ce,R[2]=Y*ge-te*me,R}var A,x=C;function z(R,d,L){var Y=d[0],te=d[1],ce=d[2],me=d[3];return R[0]=L[0]*Y+L[4]*te+L[8]*ce+L[12]*me,R[1]=L[1]*Y+L[5]*te+L[9]*ce+L[13]*me,R[2]=L[2]*Y+L[6]*te+L[10]*ce+L[14]*me,R[3]=L[3]*Y+L[7]*te+L[11]*ce+L[15]*me,R}function I(){var R=new i(4);return i!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R[3]=1,R}function O(R,d,L,Y){var te=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",ce=Math.PI/360;d*=ce,Y*=ce,L*=ce;var me=Math.sin(d),ge=Math.cos(d),Ce=Math.sin(L),Te=Math.cos(L),Oe=Math.sin(Y),Pe=Math.cos(Y);switch(te){case"xyz":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"xzy":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;case"yxz":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;case"yzx":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"zxy":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"zyx":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;default:throw new Error("Unknown angle order "+te)}return R}function D(){var R=new i(2);return i!=Float32Array&&(R[0]=0,R[1]=0),R}function B(R,d){var L=new i(2);return L[0]=R,L[1]=d,L}M(),A=new i(4),i!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0,A[3]=0),M(),_(1,0,0),_(0,1,0),I(),I(),T(),D();let F=8192;function P(R,d,L){return d*(F/(R.tileSize*Math.pow(2,L-R.tileID.overscaledZ)))}function j(R){return R instanceof Error?R:new Error(typeof R=="string"?R:String(R))}function U(R,d){return(R%d+d)%d}function $(R,d,L){return R*(1-L)+d*L}function Q(R){if(R<=0)return 0;if(R>=1)return 1;let d=R*R,L=d*R;return 4*(R<.5?L:3*(R-d)+L-.75)}function re(R,d,L,Y){let te=new s(R,d,L,Y);return ce=>te.solve(ce)}let ne=re(.25,.1,.25,1);function se(R,d,L){return Math.min(L,Math.max(d,R))}function V(R,d,L){let Y=L-d,te=((R-d)%Y+Y)%Y+d;return te===d?L:te}function Z(R,...d){for(let L of d)for(let Y in L)R[Y]=L[Y];return R}let K=1;function H(R,d,L){let Y={};for(let te in R)Y[te]=d.call(this,R[te],te,R);return Y}function X(R,d,L){let Y={};for(let te in R)d.call(this,R[te],te,R)&&(Y[te]=R[te]);return Y}function q(R){return Array.isArray(R)?R.map(q):typeof R=="object"&&R?H(R,q):R}let W={};function ee(R){W[R]||(typeof console<"u"&&console.warn(R),W[R]=!0)}function ae(R,d,L){return(L.y-R.y)*(d.x-R.x)>(d.y-R.y)*(L.x-R.x)}function he(R){return typeof WorkerGlobalScope<"u"&&R!==void 0&&R instanceof WorkerGlobalScope}let xe=null;function we(R){return typeof ImageBitmap<"u"&&R instanceof ImageBitmap}let Me="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Se(R,d,L,Y,te){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let ce=new VideoFrame(R,{timestamp:0});try{let me=ce?.format;if(!me||!me.startsWith("BGR")&&!me.startsWith("RGB"))throw new Error(`Unrecognized format ${me}`);let ge=me.startsWith("BGR"),Ce=new Uint8ClampedArray(Y*te*4);if(yield ce.copyTo(Ce,function(Te,Oe,Pe,it,He){let bt=4*Math.max(-Oe,0),Et=(Math.max(0,Pe)-Pe)*it*4+bt,Qt=4*it,er=Math.max(0,Oe),br=Math.max(0,Pe);return{rect:{x:er,y:br,width:Math.min(Te.width,Oe+it)-er,height:Math.min(Te.height,Pe+He)-br},layout:[{offset:Et,stride:Qt}]}}(R,d,L,Y,te)),ge)for(let Te=0;Te{R.removeEventListener(d,L,Y)}}}function ke(R){return R*Math.PI/180}function _e(R){return R/Math.PI*180}let ue={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},ve={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},le="AbortError";class Ae extends Error{constructor(d=le){super(d instanceof Error?d.message:d),this.name=le,d instanceof Error&&d.stack&&(this.stack=d.stack)}}function Be(R){return R instanceof Error&&R.name===le}function Xe(R){if(R.aborted)throw new Ae(R.reason)}let Ye={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function yt(R){return Ye.REGISTERED_PROTOCOLS[R.substring(0,R.indexOf("://"))]}let gt="global-dispatcher";class Tt extends Error{constructor(d,L,Y,te){super(`AJAXError: ${L} (${d}): ${Y}`),this.status=d,this.statusText=L,this.url=Y,this.body=te}}let At=()=>{var R;return he(self)?(R=self.worker)===null||R===void 0?void 0:R.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href},$t=function(R,d){return e(this,void 0,void 0,function*(){var L,Y;if(R.url.includes("://")&&!/^https?:|^file:/.test(R.url)){let te=yt(R.url);if(te){let ce=yield te(R,d);return ce.data||R.type!=="arrayBuffer"?ce:Z(ce,{data:new ArrayBuffer(0)})}if(he(self)&&(!((L=self.worker)===null||L===void 0)&&L.actor))return self.worker.actor.sendAsync({type:"GR",data:R,targetMapId:gt},d)}if(!(te=>{var ce;return te.startsWith("file:")||((ce=At())===null||ce===void 0?void 0:ce.startsWith("file:"))&&!/^\w+:/.test(te)})(R.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return function(te,ce){return e(this,void 0,void 0,function*(){let me=new Request(te.url,{method:te.method||"GET",body:te.body,credentials:te.credentials,headers:te.headers,cache:te.cache,referrer:At(),referrerPolicy:te.referrerPolicy,signal:ce.signal}),ge,Ce;te.type!=="json"||me.headers.has("Accept")||me.headers.set("Accept","application/json");try{ge=yield fetch(me)}catch(Oe){throw Be(Oe)?Oe:new Tt(0,j(Oe).message,te.url,new Blob)}if(!ge.ok){let Oe=yield ge.blob();throw new Tt(ge.status,ge.statusText,te.url,Oe)}Ce=te.type==="arrayBuffer"||te.type==="image"?ge.arrayBuffer():te.type==="json"?ge.json():ge.text();let Te=yield Ce;return Xe(ce.signal),{data:Te,cacheControl:ge.headers.get("Cache-Control"),expires:ge.headers.get("Expires"),etag:ge.headers.get("ETag")}})}(R,d);if(he(self)&&(!((Y=self.worker)===null||Y===void 0)&&Y.actor))return self.worker.actor.sendAsync({type:"GR",data:R,mustQueue:!0,targetMapId:gt},d)}return function(te,ce){return new Promise((me,ge)=>{var Ce;let Te=new XMLHttpRequest;Te.open(te.method||"GET",te.url,!0),te.type!=="arrayBuffer"&&te.type!=="image"||(Te.responseType="arraybuffer");for(let Oe in te.headers)Te.setRequestHeader(Oe,te.headers[Oe]);te.type==="json"&&(Te.responseType="text",!((Ce=te.headers)===null||Ce===void 0)&&Ce.Accept||Te.setRequestHeader("Accept","application/json")),Te.withCredentials=te.credentials==="include",Te.onerror=()=>{ge(new Error(Te.statusText))},Te.onload=()=>{if(!ce.signal.aborted)if((Te.status>=200&&Te.status<300||Te.status===0)&&Te.response!==null){let Oe=Te.response;if(te.type==="json")try{Oe=JSON.parse(Te.response)}catch(Pe){return void ge(Pe)}me({data:Oe,cacheControl:Te.getResponseHeader("Cache-Control"),expires:Te.getResponseHeader("Expires"),etag:Te.getResponseHeader("ETag")})}else{let Oe=new Blob([Te.response],{type:Te.getResponseHeader("Content-Type")});ge(new Tt(Te.status,Te.statusText,te.url,Oe))}},ce.signal.addEventListener("abort",()=>{Te.abort(),ge(new Ae(ce.signal.reason))}),Te.send(te.body)})}(R,d)})};function rr(R){if(!R||R.indexOf("://")<=0||R.startsWith("data:image/")||R.startsWith("blob:"))return!0;let d=new URL(R),L=window.location;return d.protocol===L.protocol&&d.host===L.host}function _r(R,d,L){var Y;!((Y=L[R])===null||Y===void 0)&&Y.includes(d)||(L[R]||(L[R]=[]),L[R].push(d))}function Xt(R,d,L){if(L?.[R]){let Y=L[R].indexOf(d);Y!==-1&&L[R].splice(Y,1)}}class or{constructor(d,L={}){Z(this,L),this.type=d}}class Ot extends or{constructor(d,L={}){super("error",Z({error:d},L))}}class vt{on(d,L){return this._listeners||(this._listeners={}),_r(d,L,this._listeners),{unsubscribe:()=>{this.off(d,L)}}}off(d,L){return Xt(d,L,this._listeners),Xt(d,L,this._oneTimeListeners),this}once(d,L){return L?(this._oneTimeListeners||(this._oneTimeListeners={}),_r(d,L,this._oneTimeListeners),this):new Promise(Y=>this.once(d,Y))}fire(d,L){var Y,te;typeof d=="string"&&(d=new or(d,L||{}));let ce=d.type;if(this.listens(ce)){d.target=this;let me=!((Y=this._listeners)===null||Y===void 0)&&Y[ce]?this._listeners[ce].slice():[];for(let Te of me)Te.call(this,d);let ge=!((te=this._oneTimeListeners)===null||te===void 0)&&te[ce]?this._oneTimeListeners[ce].slice():[];for(let Te of ge)Xt(ce,Te,this._oneTimeListeners),Te.call(this,d);let Ce=this._eventedParent;Ce&&(Z(d,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ce.fire(d))}else d instanceof Ot&&console.error(d.error);return this}listens(d){var L,Y,te,ce,me;return((Y=(L=this._listeners)===null||L===void 0?void 0:L[d])===null||Y===void 0?void 0:Y.length)>0||((ce=(te=this._oneTimeListeners)===null||te===void 0?void 0:te[d])===null||ce===void 0?void 0:ce.length)>0||((me=this._eventedParent)===null||me===void 0?void 0:me.listens(d))}setEventedParent(d,L){return this._eventedParent=d,this._eventedParentData=L,this}}var ht={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let De=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Ne(R,d){let L={};for(let Y in R)Y!=="ref"&&(L[Y]=R[Y]);return De.forEach(Y=>{Y in d&&(L[Y]=d[Y])}),L}function We(R,d){if(Array.isArray(R)){if(!Array.isArray(d)||R.length!==d.length)return!1;for(let L=0;L`:R.itemType.kind==="value"?"array":`array<${d}>`}return R.kind}let li=[Yt,Rt,nr,ur,cr,Rr,Pa,Qr,yn(Zr),La,Xa,un,ja,Nn];function Yn(R,d){if(d.kind==="error")return null;if(R.kind==="array"){if(d.kind==="array"&&(d.N===0&&d.itemType.kind==="value"||!Yn(R.itemType,d.itemType))&&(typeof R.N!="number"||R.N===d.N))return null}else{if(R.kind===d.kind)return null;if(R.kind==="value"){for(let L of li)if(!Yn(L,d))return null}}return`Expected ${Un(R)} but found ${Un(d)} instead.`}function on(R,d){return d.some(L=>L.kind===R.kind)}function en(R,d){return d.some(L=>L==="null"?R===null:L==="array"?Array.isArray(R):L==="object"?R&&!Array.isArray(R)&&typeof R=="object":L===typeof R)}function vi(R,d){return R.kind==="array"&&d.kind==="array"?R.itemType.kind===d.itemType.kind&&typeof R.N=="number":R.kind===d.kind}let Yi=.96422,Ja=.82521,Oa=4/29,lt=6/29,rt=3*lt*lt,fr=lt*lt*lt,lr=Math.PI/180,Tr=180/Math.PI;function Ir(R){return(R%=360)<0&&(R+=360),R}function Dr([R,d,L,Y]){let te,ce,me=kt((.2225045*(R=ot(R))+.7168786*(d=ot(d))+.0606169*(L=ot(L)))/1);R===d&&d===L?te=ce=me:(te=kt((.4360747*R+.3850649*d+.1430804*L)/Yi),ce=kt((.0139322*R+.0971045*d+.7141733*L)/Ja));let ge=116*me-16;return[ge<0?0:ge,500*(te-me),200*(me-ce),Y]}function ot(R){return R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function kt(R){return R>fr?Math.pow(R,1/3):R/rt+Oa}function jt([R,d,L,Y]){let te=(R+16)/116,ce=isNaN(d)?te:te+d/500,me=isNaN(L)?te:te-L/200;return te=1*Er(te),ce=Yi*Er(ce),me=Ja*Er(me),[ar(3.1338561*ce-1.6168667*te-.4906146*me),ar(-.9787684*ce+1.9161415*te+.033454*me),ar(.0719453*ce-.2289914*te+1.4052427*me),Y]}function ar(R){return(R=R<=.00304?12.92*R:1.055*Math.pow(R,1/2.4)-.055)<0?0:R>1?1:R}function Er(R){return R>lt?R*R*R:rt*(R-Oa)}let xr=Object.hasOwn||function(R,d){return Object.prototype.hasOwnProperty.call(R,d)};function zr(R,d){return xr(R,d)?R[d]:void 0}function Lr(R){return parseInt(R.padEnd(2,R),16)/255}function aa(R,d){return Sa(d?R/100:R,0,1)}function Sa(R,d,L){return Math.min(Math.max(d,R),L)}function wa(R){return!R.some(Number.isNaN)}let pn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function tn(R,d,L){return R+L*(d-R)}function ai(R,d,L){return R.map((Y,te)=>tn(Y,d[te],L))}class rn{constructor(d,L,Y,te=1,ce=!0){this.r=d,this.g=L,this.b=Y,this.a=te,ce||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter("rgb",[d,L,Y,te]))}static parse(d){if(d instanceof rn)return d;if(typeof d!="string")return;let L=function(Y){if((Y=Y.toLowerCase().trim())==="transparent")return[0,0,0,0];let te=zr(pn,Y);if(te){let[me,ge,Ce]=te;return[me/255,ge/255,Ce/255,1]}if(Y.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(Y)){let me=Y.length<6?1:2,ge=1;return[Lr(Y.slice(ge,ge+=me)),Lr(Y.slice(ge,ge+=me)),Lr(Y.slice(ge,ge+=me)),Lr(Y.slice(ge,ge+me)||"ff")]}if(Y.startsWith("rgb")){let me=Y.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(me){let[ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br]=me,sr=[Oe||" ",He||" ",Qt].join("");if(sr===" "||sr===" /"||sr===",,"||sr===",,,"){let Mr=[Te,it,Et].join(""),qr=Mr==="%%%"?100:Mr===""?255:0;if(qr){let $r=[Sa(+Ce/qr,0,1),Sa(+Pe/qr,0,1),Sa(+bt/qr,0,1),er?aa(+er,br):1];if(wa($r))return $r}}return}}let ce=Y.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(ce){let[me,ge,Ce,Te,Oe,Pe,it,He,bt]=ce,Et=[Ce||" ",Oe||" ",it].join("");if(Et===" "||Et===" /"||Et===",,"||Et===",,,"){let Qt=[+ge,Sa(+Te,0,100),Sa(+Pe,0,100),He?aa(+He,bt):1];if(wa(Qt))return function([er,br,sr,Mr]){function qr($r){let _a=($r+er/30)%12,Ca=br*Math.min(sr,1-sr);return sr-Ca*Math.max(-1,Math.min(_a-3,9-_a,1))}return er=Ir(er),br/=100,sr/=100,[qr(0),qr(8),qr(4),Mr]}(Qt)}}}(d);return L?new rn(...L,!1):void 0}get rgb(){let{r:d,g:L,b:Y,a:te}=this,ce=te||1/0;return this.overwriteGetter("rgb",[d/ce,L/ce,Y/ce,te])}get hcl(){return this.overwriteGetter("hcl",function(d){let[L,Y,te,ce]=Dr(d),me=Math.sqrt(Y*Y+te*te);return[Math.round(1e4*me)?Ir(Math.atan2(te,Y)*Tr):NaN,me,L,ce]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Dr(this.rgb))}overwriteGetter(d,L){return Object.defineProperty(this,d,{value:L}),L}toString(){let[d,L,Y,te]=this.rgb;return`rgba(${[d,L,Y].map(ce=>Math.round(255*ce)).join(",")},${te})`}static interpolate(d,L,Y,te="rgb"){switch(te){case"rgb":{let[ce,me,ge,Ce]=ai(d.rgb,L.rgb,Y);return new rn(ce,me,ge,Ce,!1)}case"hcl":{let[ce,me,ge,Ce]=d.hcl,[Te,Oe,Pe,it]=L.hcl,He,bt;if(isNaN(ce)||isNaN(Te))isNaN(ce)?isNaN(Te)?He=NaN:(He=Te,ge!==1&&ge!==0||(bt=Oe)):(He=ce,Pe!==1&&Pe!==0||(bt=me));else{let sr=Te-ce;Te>ce&&sr>180?sr-=360:Te180&&(sr+=360),He=ce+Y*sr}let[Et,Qt,er,br]=function([sr,Mr,qr,$r]){return sr=isNaN(sr)?0:sr*lr,jt([qr,Math.cos(sr)*Mr,Math.sin(sr)*Mr,$r])}([He,bt??tn(me,Oe,Y),tn(ge,Pe,Y),tn(Ce,it,Y)]);return new rn(Et,Qt,er,br,!1)}case"lab":{let[ce,me,ge,Ce]=jt(ai(d.lab,L.lab,Y));return new rn(ce,me,ge,Ce,!1)}}}}rn.black=new rn(0,0,0,1),rn.white=new rn(1,1,1,1),rn.transparent=new rn(0,0,0,0),rn.red=new rn(1,0,0,1);class Ri{constructor(d,L,Y){this.sensitivity=d?L?"variant":"case":L?"accent":"base",this.locale=Y,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(d,L){return this.collator.compare(d,L)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let Gn=["bottom","center","top"];class no{constructor(d,L,Y,te,ce,me){this.text=d,this.image=L,this.scale=Y,this.fontStack=te,this.textColor=ce,this.verticalAlign=me}}class Di{constructor(d){this.sections=d}static fromString(d){return new Di([new no(d,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(d=>d.text.length!==0||d.image&&d.image.name.length!==0)}static factory(d){return d instanceof Di?d:Di.fromString(d)}toString(){return this.sections.length===0?"":this.sections.map(d=>d.text).join("")}}class fn{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof fn)return d;if(typeof d=="number")return new fn([d,d,d,d]);if(Array.isArray(d)&&!(d.length<1||d.length>4)){for(let L of d)if(typeof L!="number")return;switch(d.length){case 1:d=[d[0],d[0],d[0],d[0]];break;case 2:d=[d[0],d[1],d[0],d[1]];break;case 3:d=[d[0],d[1],d[2],d[1]]}return new fn(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,Y){return new fn(ai(d.values,L.values,Y))}}class Ai{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof Ai)return d;if(typeof d=="number")return new Ai([d]);if(Array.isArray(d)){for(let L of d)if(typeof L!="number")return;return new Ai(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,Y){return new Ai(ai(d.values,L.values,Y))}}class jn{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof jn)return d;if(typeof d=="string"){let Y=rn.parse(d);return Y?new jn([Y]):void 0}if(!Array.isArray(d))return;let L=[];for(let Y of d){if(typeof Y!="string")return;let te=rn.parse(Y);if(!te)return;L.push(te)}return new jn(L)}toString(){return JSON.stringify(this.values)}static interpolate(d,L,Y,te="rgb"){let ce=[];if(d.values.length!=L.values.length)throw new Error(`colorArray: Arrays have mismatched length (${d.values.length} vs. ${L.values.length}), cannot interpolate.`);for(let me=0;me=0&&R<=255&&typeof d=="number"&&d>=0&&d<=255&&typeof L=="number"&&L>=0&&L<=255?Y===void 0||typeof Y=="number"&&Y>=0&&Y<=1?null:`Invalid rgba value [${[R,d,L,Y].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof Y=="number"?[R,d,L,Y]:[R,d,L]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Vn(R){if(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number"||R instanceof io||R instanceof rn||R instanceof Ri||R instanceof Di||R instanceof fn||R instanceof Ai||R instanceof jn||R instanceof gi||R instanceof qi)return!0;if(Array.isArray(R)){for(let d of R)if(!Vn(d))return!1;return!0}if(typeof R=="object"){for(let d in R)if(!Vn(R[d]))return!1;return!0}return!1}function qn(R){if(R===null)return Yt;if(typeof R=="string")return nr;if(typeof R=="boolean")return ur;if(typeof R=="number")return Rt;if(R instanceof rn)return cr;if(R instanceof io)return Rr;if(R instanceof Ri)return ha;if(R instanceof Di)return Pa;if(R instanceof fn)return La;if(R instanceof Ai)return Xa;if(R instanceof jn)return un;if(R instanceof gi)return Nn;if(R instanceof qi)return ja;if(Array.isArray(R)){let d=R.length,L;for(let Y of R){let te=qn(Y);if(L){if(L===te)continue;L=Zr;break}L=te}return yn(L||Zr,d)}return Qr}function Hi(R){let d=typeof R;return R===null?"":d==="string"||d==="number"||d==="boolean"?String(R):R instanceof rn||R instanceof io||R instanceof Di||R instanceof fn||R instanceof Ai||R instanceof jn||R instanceof gi||R instanceof qi?R.toString():JSON.stringify(R)}class Mi{constructor(d,L){this.type=d,this.value=L}static parse(d,L){if(d.length!==2)return L.error(`'literal' expression requires exactly one argument, but found ${d.length-1} instead.`);if(!Vn(d[1]))return L.error("invalid value");let Y=d[1],te=qn(Y),ce=L.expectedType;return te.kind!=="array"||te.N!==0||!ce||ce.kind!=="array"||typeof ce.N=="number"&&ce.N!==0||(te=ce),new Mi(te,Y)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let Ro={string:nr,number:Rt,boolean:ur,object:Qr};class go{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let Y,te=1,ce=d[0];if(ce==="array"){let ge,Ce;if(d.length>2){let Te=d[1];if(typeof Te!="string"||!(Te in Ro)||Te==="object")return L.error('The item type argument of "array" must be one of string, number, boolean',1);ge=Ro[Te],te++}else ge=Zr;if(d.length>3){if(d[2]!==null&&(typeof d[2]!="number"||d[2]<0||d[2]!==Math.floor(d[2])))return L.error('The length argument to "array" must be a positive integer literal',2);Ce=d[2],te++}Y=yn(ge,Ce)}else{if(!Ro[ce])throw new Error(`Types doesn't contain name = ${ce}`);Y=Ro[ce]}let me=[];for(;ted.outputDefined())}}let Eo={"to-boolean":ur,"to-color":cr,"to-number":Rt,"to-string":nr};class Ao{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let Y=d[0];if(!Eo[Y])throw new Error(`Can't parse ${Y} as it is not part of the known types`);if((Y==="to-boolean"||Y==="to-string")&&d.length!==2)return L.error("Expected one argument.");let te=Eo[Y],ce=[];for(let me=1;me4?`Invalid rgba value ${JSON.stringify(L)}: expected an array containing either three or four numeric values.`:oo(L[0],L[1],L[2],L[3]),!Y))return new rn(L[0]/255,L[1]/255,L[2]/255,L[3])}throw new Xn(Y||`Could not parse color from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"padding":{let L;for(let Y of this.args){L=Y.evaluate(d);let te=fn.parse(L);if(te)return te}throw new Xn(`Could not parse padding from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"numberArray":{let L;for(let Y of this.args){L=Y.evaluate(d);let te=Ai.parse(L);if(te)return te}throw new Xn(`Could not parse numberArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"colorArray":{let L;for(let Y of this.args){L=Y.evaluate(d);let te=jn.parse(L);if(te)return te}throw new Xn(`Could not parse colorArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"variableAnchorOffsetCollection":{let L;for(let Y of this.args){L=Y.evaluate(d);let te=gi.parse(L);if(te)return te}throw new Xn(`Could not parse variableAnchorOffsetCollection from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"number":{let L=null;for(let Y of this.args){if(L=Y.evaluate(d),L===null)return 0;let te=Number(L);if(!isNaN(te))return te}throw new Xn(`Could not convert ${JSON.stringify(L)} to number.`)}case"formatted":return Di.fromString(Hi(this.args[0].evaluate(d)));case"resolvedImage":return qi.fromString(Hi(this.args[0].evaluate(d)));case"projectionDefinition":return this.args[0].evaluate(d);default:return Hi(this.args[0].evaluate(d))}}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}let ds=["Unknown","Point","LineString","Polygon"];class jo{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?ds[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(d){let L=this._parseColorCache.get(d);return L||(L=rn.parse(d),this._parseColorCache.set(d,L)),L}}class Wo{constructor(d,L,Y=[],te,ce=new Kr,me=[]){this.registry=d,this.path=Y,this.key=Y.map(ge=>`[${ge}]`).join(""),this.scope=ce,this.errors=me,this.expectedType=te,this._isConstant=L}parse(d,L,Y,te,ce={}){return L?this.concat(L,Y,te)._parse(d,ce):this._parse(d,ce)}_parse(d,L){function Y(te,ce,me){return me==="assert"?new go(ce,[te]):me==="coerce"?new Ao(ce,[te]):te}if(d!==null&&typeof d!="string"&&typeof d!="boolean"&&typeof d!="number"||(d=["literal",d]),Array.isArray(d)){if(d.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let te=d[0];if(typeof te!="string")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let ce=this.registry[te];if(ce){let me=ce.parse(d,this);if(!me)return null;if(this.expectedType){let ge=this.expectedType,Ce=me.type;if(ge.kind!=="string"&&ge.kind!=="number"&&ge.kind!=="boolean"&&ge.kind!=="object"&&ge.kind!=="array"||Ce.kind!=="value"){if(ge.kind==="projectionDefinition"&&["string","array"].includes(Ce.kind)||["color","formatted","resolvedImage"].includes(ge.kind)&&["value","string"].includes(Ce.kind)||["padding","numberArray"].includes(ge.kind)&&["value","number","array"].includes(Ce.kind)||ge.kind==="colorArray"&&["value","string","array"].includes(Ce.kind)||ge.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(Ce.kind))me=Y(me,ge,L.typeAnnotation||"coerce");else if(this.checkSubtype(ge,Ce))return null}else me=Y(me,ge,L.typeAnnotation||"assert")}if(!(me instanceof Mi)&&me.type.kind!=="resolvedImage"&&this._isConstant(me)){let ge=new jo;try{me=new Mi(me.type,me.evaluate(ge))}catch(Ce){return this.error(Ce.message),null}}return me}return this.error(`Unknown expression "${te}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(d===void 0?"'undefined' value invalid. Use null instead.":typeof d=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof d} instead.`)}concat(d,L,Y){let te=typeof d=="number"?this.path.concat(d):this.path,ce=Y?this.scope.concat(Y):this.scope;return new Wo(this.registry,this._isConstant,te,L||null,ce,this.errors)}error(d,...L){let Y=`${this.key}${L.map(te=>`[${te}]`).join("")}`;this.errors.push(new Sr(Y,d))}checkSubtype(d,L){let Y=Yn(d,L);return Y&&this.error(Y),Y}}class to{constructor(d,L){this.type=L.type,this.bindings=[].concat(d),this.result=L}evaluate(d){return this.result.evaluate(d)}eachChild(d){for(let L of this.bindings)d(L[1]);d(this.result)}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found ${d.length-1} instead.`);let Y=[];for(let ce=1;ce=Y.length)throw new Xn(`Array index out of bounds: ${L} > ${Y.length-1}.`);if(L!==Math.floor(L))throw new Xn(`Array index must be an integer, but found ${L} instead.`);return Y[L]}eachChild(d){d(this.index),d(this.input)}outputDefined(){return!1}}class Vi{constructor(d,L){this.type=ur,this.needle=d,this.haystack=L}static parse(d,L){if(d.length!==3)return L.error(`Expected 2 arguments, but found ${d.length-1} instead.`);let Y=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Zr);return Y&&te?on(Y.type,[ur,nr,Rt,Yt,Zr])?new Vi(Y,te):L.error(`Expected first argument to be of type boolean, string, number or null, but found ${Un(Y.type)} instead`):null}evaluate(d){let L=this.needle.evaluate(d),Y=this.haystack.evaluate(d);if(!Y)return!1;if(!en(L,["boolean","string","number","null"]))throw new Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Un(qn(L))} instead.`);if(!en(Y,["string","array"]))throw new Xn(`Expected second argument to be of type array or string, but found ${Un(qn(Y))} instead.`);return Y.indexOf(L)>=0}eachChild(d){d(this.needle),d(this.haystack)}outputDefined(){return!0}}class Io{constructor(d,L,Y){this.type=Rt,this.needle=d,this.haystack=L,this.fromIndex=Y}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let Y=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Zr);if(!Y||!te)return null;if(!on(Y.type,[ur,nr,Rt,Yt,Zr]))return L.error(`Expected first argument to be of type boolean, string, number or null, but found ${Un(Y.type)} instead`);if(d.length===4){let ce=L.parse(d[3],3,Rt);return ce?new Io(Y,te,ce):null}return new Io(Y,te)}evaluate(d){let L=this.needle.evaluate(d),Y=this.haystack.evaluate(d);if(!en(L,["boolean","string","number","null"]))throw new Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Un(qn(L))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(d)),en(Y,["string"])){let ce=Y.indexOf(L,te);return ce===-1?-1:[...Y.slice(0,ce)].length}if(en(Y,["array"]))return Y.indexOf(L,te);throw new Xn(`Expected second argument to be of type array or string, but found ${Un(qn(Y))} instead.`)}eachChild(d){d(this.needle),d(this.haystack),this.fromIndex&&d(this.fromIndex)}outputDefined(){return!1}}class Zi{constructor(d,L,Y,te,ce,me){this.inputType=d,this.type=L,this.input=Y,this.cases=te,this.outputs=ce,this.otherwise=me}static parse(d,L){if(d.length<5)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if(d.length%2!=1)return L.error("Expected an even number of arguments.");let Y,te;L.expectedType&&L.expectedType.kind!=="value"&&(te=L.expectedType);let ce={},me=[];for(let Te=2;TeNumber.MAX_SAFE_INTEGER)return it.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof bt=="number"&&Math.floor(bt)!==bt)return it.error("Numeric branch labels must be integer values.");if(Y){if(it.checkSubtype(Y,qn(bt)))return null}else Y=qn(bt);if(ce[String(bt)]!==void 0)return it.error("Branch labels must be unique.");ce[String(bt)]=me.length}let He=L.parse(Pe,Te,te);if(!He)return null;te=te||He.type,me.push(He)}let ge=L.parse(d[1],1,Zr);if(!ge)return null;let Ce=L.parse(d[d.length-1],d.length-1,te);return Ce?ge.type.kind!=="value"&&L.concat(1).checkSubtype(Y,ge.type)?null:new Zi(Y,te,ge,ce,me,Ce):null}evaluate(d){let L=this.input.evaluate(d);return(qn(L)===this.inputType&&this.outputs[this.cases[L]]||this.otherwise).evaluate(d)}eachChild(d){d(this.input),this.outputs.forEach(d),d(this.otherwise)}outputDefined(){return this.outputs.every(d=>d.outputDefined())&&this.otherwise.outputDefined()}}class Ko{constructor(d,L,Y){this.type=d,this.branches=L,this.otherwise=Y}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found only ${d.length-1}.`);if(d.length%2!=0)return L.error("Expected an odd number of arguments.");let Y;L.expectedType&&L.expectedType.kind!=="value"&&(Y=L.expectedType);let te=[];for(let me=1;meL.outputDefined())&&this.otherwise.outputDefined()}}class Uo{constructor(d,L,Y,te){this.type=d,this.input=L,this.beginIndex=Y,this.endIndex=te}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let Y=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Rt);if(!Y||!te)return null;if(!on(Y.type,[yn(Zr),nr,Zr]))return L.error(`Expected first argument to be of type array or string, but found ${Un(Y.type)} instead`);if(d.length===4){let ce=L.parse(d[3],3,Rt);return ce?new Uo(Y.type,Y,te,ce):null}return new Uo(Y.type,Y,te)}evaluate(d){let L=this.input.evaluate(d),Y=this.beginIndex.evaluate(d),te;if(this.endIndex&&(te=this.endIndex.evaluate(d)),en(L,["string"]))return[...L].slice(Y,te).join("");if(en(L,["array"]))return L.slice(Y,te);throw new Xn(`Expected first argument to be of type array or string, but found ${Un(qn(L))} instead.`)}eachChild(d){d(this.input),d(this.beginIndex),this.endIndex&&d(this.endIndex)}outputDefined(){return!1}}function Ls(R,d){let L=R.length-1,Y,te,ce=0,me=L,ge=0;for(;ce<=me;)if(ge=Math.floor((ce+me)/2),Y=R[ge],te=R[ge+1],Y<=d){if(ge===L||dd))throw new Xn("Input is not a number.");me=ge-1}return 0}class Ss{constructor(d,L,Y){this.type=d,this.input=L,this.labels=[],this.outputs=[];for(let[te,ce]of Y)this.labels.push(te),this.outputs.push(ce)}static parse(d,L){if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");let Y=L.parse(d[1],1,Rt);if(!Y)return null;let te=[],ce=null;L.expectedType&&L.expectedType.kind!=="value"&&(ce=L.expectedType);for(let me=1;me=ge)return L.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Te);let Pe=L.parse(Ce,Oe,ce);if(!Pe)return null;ce=ce||Pe.type,te.push([ge,Pe])}return new Ss(ce,Y,te)}evaluate(d){let L=this.labels,Y=this.outputs;if(L.length===1)return Y[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return Y[0].evaluate(d);let ce=L.length;return te>=L[ce-1]?Y[ce-1].evaluate(d):Y[Ls(L,te)].evaluate(d)}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function Vo(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}var Vs,Ts,Bo=function(){if(Ts)return Vs;function R(d,L,Y,te){this.cx=3*d,this.bx=3*(Y-d)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*L,this.by=3*(te-L)-this.cy,this.ay=1-this.cy-this.by,this.p1x=d,this.p1y=L,this.p2x=Y,this.p2y=te}return Ts=1,Vs=R,R.prototype={sampleCurveX:function(d){return((this.ax*d+this.bx)*d+this.cx)*d},sampleCurveY:function(d){return((this.ay*d+this.by)*d+this.cy)*d},sampleCurveDerivativeX:function(d){return(3*this.ax*d+2*this.bx)*d+this.cx},solveCurveX:function(d,L){if(L===void 0&&(L=1e-6),d<0)return 0;if(d>1)return 1;for(var Y=d,te=0;te<8;te++){var ce=this.sampleCurveX(Y)-d;if(Math.abs(ce)ce?ge=Y:Ce=Y,Y=.5*(Ce-ge)+ge;return Y},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},Vs}(),_o=Vo(Bo);class Pi{constructor(d,L,Y,te,ce){this.type=d,this.operator=L,this.interpolation=Y,this.input=te,this.labels=[],this.outputs=[];for(let[me,ge]of ce)this.labels.push(me),this.outputs.push(ge)}static interpolationFactor(d,L,Y,te){let ce=0;if(d.name==="exponential")ce=yo(L,d.base,Y,te);else if(d.name==="linear")ce=yo(L,1,Y,te);else if(d.name==="cubic-bezier"){let me=d.controlPoints;ce=new _o(me[0],me[1],me[2],me[3]).solve(yo(L,1,Y,te))}return ce}static parse(d,L){let[Y,te,ce,...me]=d;if(!Array.isArray(te)||te.length===0)return L.error("Expected an interpolation type expression.",1);if(te[0]==="linear")te={name:"linear"};else if(te[0]==="exponential"){let Te=te[1];if(typeof Te!="number")return L.error("Exponential interpolation requires a numeric base.",1,1);te={name:"exponential",base:Te}}else{if(te[0]!=="cubic-bezier")return L.error(`Unknown interpolation type ${String(te[0])}`,1,0);{let Te=te.slice(1);if(Te.length!==4||Te.some(Oe=>typeof Oe!="number"||Oe<0||Oe>1))return L.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);te={name:"cubic-bezier",controlPoints:Te}}}if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");if(ce=L.parse(ce,2,Rt),!ce)return null;let ge=[],Ce=null;Y!=="interpolate-hcl"&&Y!=="interpolate-lab"||L.expectedType==un?L.expectedType&&L.expectedType.kind!=="value"&&(Ce=L.expectedType):Ce=cr;for(let Te=0;Te=Oe)return L.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',it);let bt=L.parse(Pe,He,Ce);if(!bt)return null;Ce=Ce||bt.type,ge.push([Oe,bt])}return vi(Ce,Rt)||vi(Ce,Rr)||vi(Ce,cr)||vi(Ce,La)||vi(Ce,Xa)||vi(Ce,un)||vi(Ce,Nn)||vi(Ce,yn(Rt))?new Pi(Ce,Y,te,ce,ge):L.error(`Type ${Un(Ce)} is not interpolatable.`)}evaluate(d){let L=this.labels,Y=this.outputs;if(L.length===1)return Y[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return Y[0].evaluate(d);let ce=L.length;if(te>=L[ce-1])return Y[ce-1].evaluate(d);let me=Ls(L,te),ge=Pi.interpolationFactor(this.interpolation,te,L[me],L[me+1]),Ce=Y[me].evaluate(d),Te=Y[me+1].evaluate(d);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return tn(Ce,Te,ge);case"color":return rn.interpolate(Ce,Te,ge);case"padding":return fn.interpolate(Ce,Te,ge);case"colorArray":return jn.interpolate(Ce,Te,ge);case"numberArray":return Ai.interpolate(Ce,Te,ge);case"variableAnchorOffsetCollection":return gi.interpolate(Ce,Te,ge);case"array":return ai(Ce,Te,ge);case"projectionDefinition":return io.interpolate(Ce,Te,ge)}case"interpolate-hcl":switch(this.type.kind){case"color":return rn.interpolate(Ce,Te,ge,"hcl");case"colorArray":return jn.interpolate(Ce,Te,ge,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return rn.interpolate(Ce,Te,ge,"lab");case"colorArray":return jn.interpolate(Ce,Te,ge,"lab")}}}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function yo(R,d,L,Y){let te=Y-L,ce=R-L;return te===0?0:d===1?ce/te:(Math.pow(d,ce)-1)/(Math.pow(d,te)-1)}let bs={color:rn.interpolate,number:tn,padding:fn.interpolate,numberArray:Ai.interpolate,colorArray:jn.interpolate,variableAnchorOffsetCollection:gi.interpolate,array:ai};class Dl{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let Y=null,te=L.expectedType;te&&te.kind!=="value"&&(Y=te);let ce=[];for(let ge of d.slice(1)){let Ce=L.parse(ge,1+ce.length,Y,void 0,{typeAnnotation:"omit"});if(!Ce)return null;Y=Y||Ce.type,ce.push(Ce)}if(!Y)throw new Error("No output type");let me=te&&ce.some(ge=>Yn(te,ge.type));return new Dl(me?Zr:Y,ce)}evaluate(d){let L,Y=null,te=0;for(let ce of this.args)if(te++,Y=ce.evaluate(d),Y&&Y instanceof qi&&!Y.available&&(L||(L=Y.name),Y=null,te===this.args.length&&(Y=L)),Y!==null)break;return Y}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}function hl(R,d){return R==="=="||R==="!="?d.kind==="boolean"||d.kind==="string"||d.kind==="number"||d.kind==="null"||d.kind==="value":d.kind==="string"||d.kind==="number"||d.kind==="value"}function ps(R,d,L,Y){return Y.compare(d,L)===0}function dl(R,d,L){let Y=R!=="=="&&R!=="!=";return class ER{constructor(ce,me,ge){this.type=ur,this.lhs=ce,this.rhs=me,this.collator=ge,this.hasUntypedArgument=ce.type.kind==="value"||me.type.kind==="value"}static parse(ce,me){if(ce.length!==3&&ce.length!==4)return me.error("Expected two or three arguments.");let ge=ce[0],Ce=me.parse(ce[1],1,Zr);if(!Ce)return null;if(!hl(ge,Ce.type))return me.concat(1).error(`"${ge}" comparisons are not supported for type '${Un(Ce.type)}'.`);let Te=me.parse(ce[2],2,Zr);if(!Te)return null;if(!hl(ge,Te.type))return me.concat(2).error(`"${ge}" comparisons are not supported for type '${Un(Te.type)}'.`);if(Ce.type.kind!==Te.type.kind&&Ce.type.kind!=="value"&&Te.type.kind!=="value")return me.error(`Cannot compare types '${Un(Ce.type)}' and '${Un(Te.type)}'.`);Y&&(Ce.type.kind==="value"&&Te.type.kind!=="value"?Ce=new go(Te.type,[Ce]):Ce.type.kind!=="value"&&Te.type.kind==="value"&&(Te=new go(Ce.type,[Te])));let Oe=null;if(ce.length===4){if(Ce.type.kind!=="string"&&Te.type.kind!=="string"&&Ce.type.kind!=="value"&&Te.type.kind!=="value")return me.error("Cannot use collator to compare non-string types.");if(Oe=me.parse(ce[3],3,ha),!Oe)return null}return new ER(Ce,Te,Oe)}evaluate(ce){let me=this.lhs.evaluate(ce),ge=this.rhs.evaluate(ce);if(Y&&this.hasUntypedArgument){let Ce=qn(me),Te=qn(ge);if(Ce.kind!==Te.kind||Ce.kind!=="string"&&Ce.kind!=="number")throw new Xn(`Expected arguments for "${R}" to be (string, string) or (number, number), but found (${Ce.kind}, ${Te.kind}) instead.`)}if(this.collator&&!Y&&this.hasUntypedArgument){let Ce=qn(me),Te=qn(ge);if(Ce.kind!=="string"||Te.kind!=="string")return d(ce,me,ge)}return this.collator?L(ce,me,ge,this.collator.evaluate(ce)):d(ce,me,ge)}eachChild(ce){ce(this.lhs),ce(this.rhs),this.collator&&ce(this.collator)}outputDefined(){return!0}}}let wu=dl("==",function(R,d,L){return d===L},ps),lu=dl("!=",function(R,d,L){return d!==L},function(R,d,L,Y){return!ps(0,d,L,Y)}),xc=dl("<",function(R,d,L){return d",function(R,d,L){return d>L},function(R,d,L,Y){return Y.compare(d,L)>0}),pl=dl("<=",function(R,d,L){return d<=L},function(R,d,L,Y){return Y.compare(d,L)<=0}),$u=dl(">=",function(R,d,L){return d>=L},function(R,d,L,Y){return Y.compare(d,L)>=0});class uu{constructor(d,L,Y){this.type=ha,this.locale=Y,this.caseSensitive=d,this.diacriticSensitive=L}static parse(d,L){if(d.length!==2)return L.error("Expected one argument.");let Y=d[1];if(typeof Y!="object"||Array.isArray(Y))return L.error("Collator options argument must be an object.");let te=L.parse(Y["case-sensitive"]!==void 0&&Y["case-sensitive"],1,ur);if(!te)return null;let ce=L.parse(Y["diacritic-sensitive"]!==void 0&&Y["diacritic-sensitive"],1,ur);if(!ce)return null;let me=null;return Y.locale&&(me=L.parse(Y.locale,1,nr),!me)?null:new uu(te,ce,me)}evaluate(d){return new Ri(this.caseSensitive.evaluate(d),this.diacriticSensitive.evaluate(d),this.locale?this.locale.evaluate(d):null)}eachChild(d){d(this.caseSensitive),d(this.diacriticSensitive),this.locale&&d(this.locale)}outputDefined(){return!1}}class tl{constructor(d,L,Y,te,ce,me){this.type=nr,this.number=d,this.locale=L,this.currency=Y,this.unit=te,this.minFractionDigits=ce,this.maxFractionDigits=me}static parse(d,L){if(d.length!==3)return L.error("Expected two arguments.");let Y=L.parse(d[1],1,Rt);if(!Y)return null;let te=d[2];if(typeof te!="object"||Array.isArray(te))return L.error("NumberFormat options argument must be an object.");let ce=null;if(te.locale&&(ce=L.parse(te.locale,1,nr),!ce))return null;let me=null;if(te.currency&&(me=L.parse(te.currency,1,nr),!me))return null;let ge=null;if(te.unit&&(ge=L.parse(te.unit,1,nr),!ge))return null;if(me&&ge)return L.error("NumberFormat options `currency` and `unit` are mutually exclusive");let Ce=null;if(te["min-fraction-digits"]&&(Ce=L.parse(te["min-fraction-digits"],1,Rt),!Ce))return null;let Te=null;return te["max-fraction-digits"]&&(Te=L.parse(te["max-fraction-digits"],1,Rt),!Te)?null:new tl(Y,ce,me,ge,Ce,Te)}evaluate(d){return new Intl.NumberFormat(this.locale?this.locale.evaluate(d):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(d):void 0,unit:this.unit?this.unit.evaluate(d):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(d):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(d):void 0}).format(this.number.evaluate(d))}eachChild(d){d(this.number),this.locale&&d(this.locale),this.currency&&d(this.currency),this.unit&&d(this.unit),this.minFractionDigits&&d(this.minFractionDigits),this.maxFractionDigits&&d(this.maxFractionDigits)}outputDefined(){return!1}}class vs{constructor(d){this.type=Pa,this.sections=d}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let Y=d[1];if(!Array.isArray(Y)&&typeof Y=="object")return L.error("First argument must be an image or text section.");let te=[],ce=!1;for(let me=1;me<=d.length-1;++me){let ge=d[me];if(ce&&typeof ge=="object"&&!Array.isArray(ge)){ce=!1;let Ce=null;if(ge["font-scale"]&&(Ce=L.parse(ge["font-scale"],1,Rt),!Ce))return null;let Te=null;if(ge["text-font"]&&(Te=L.parse(ge["text-font"],1,yn(nr)),!Te))return null;let Oe=null;if(ge["text-color"]&&(Oe=L.parse(ge["text-color"],1,cr),!Oe))return null;let Pe=null;if(ge["vertical-align"]){if(typeof ge["vertical-align"]=="string"&&!Gn.includes(ge["vertical-align"]))return L.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${ge["vertical-align"]}' instead.`);if(Pe=L.parse(ge["vertical-align"],1,nr),!Pe)return null}let it=te[te.length-1];it.scale=Ce,it.font=Te,it.textColor=Oe,it.verticalAlign=Pe}else{let Ce=L.parse(d[me],1,Zr);if(!Ce)return null;let Te=Ce.type.kind;if(Te!=="string"&&Te!=="value"&&Te!=="null"&&Te!=="resolvedImage")return L.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ce=!0,te.push({content:Ce,scale:null,font:null,textColor:null,verticalAlign:null})}}return new vs(te)}evaluate(d){return new Di(this.sections.map(L=>{let Y=L.content.evaluate(d);return qn(Y)===ja?new no("",Y,null,null,null,L.verticalAlign?L.verticalAlign.evaluate(d):null):new no(Hi(Y),null,L.scale?L.scale.evaluate(d):null,L.font?L.font.evaluate(d).join(","):null,L.textColor?L.textColor.evaluate(d):null,L.verticalAlign?L.verticalAlign.evaluate(d):null)}))}eachChild(d){for(let L of this.sections)d(L.content),L.scale&&d(L.scale),L.font&&d(L.font),L.textColor&&d(L.textColor),L.verticalAlign&&d(L.verticalAlign)}outputDefined(){return!1}}class os{constructor(d){this.type=ja,this.input=d}static parse(d,L){if(d.length!==2)return L.error("Expected two arguments.");let Y=L.parse(d[1],1,nr);return Y?new os(Y):L.error("No image name provided.")}evaluate(d){let L=this.input.evaluate(d),Y=qi.fromString(L);return Y&&d.availableImages&&(Y.available=d.availableImages.indexOf(L)>-1),Y}eachChild(d){d(this.input)}outputDefined(){return!1}}class ms{constructor(d){this.type=Rt,this.input=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let Y=L.parse(d[1],1);return Y?Y.type.kind!=="array"&&Y.type.kind!=="string"&&Y.type.kind!=="value"?L.error(`Expected argument of type string or array, but found ${Un(Y.type)} instead.`):new ms(Y):null}evaluate(d){let L=this.input.evaluate(d);if(typeof L=="string")return[...L].length;if(Array.isArray(L))return L.length;throw new Xn(`Expected value to be of type string or array, but found ${Un(qn(L))} instead.`)}eachChild(d){d(this.input)}outputDefined(){return!1}}let rl=8192;function Fu(R,d){let L=(180+R[0])/360,Y=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R[1]*Math.PI/360)))/360,te=Math.pow(2,d.z);return[Math.round(L*te*rl),Math.round(Y*te*rl)]}function zu(R,d){let L=Math.pow(2,d.z);return[(te=(R[0]/rl+d.x)/L,360*te-180),(Y=(R[1]/rl+d.y)/L,360/Math.PI*Math.atan(Math.exp((180-360*Y)*Math.PI/180))-90)];var Y,te}function Ku(R,d){R[0]=Math.min(R[0],d[0]),R[1]=Math.min(R[1],d[1]),R[2]=Math.max(R[2],d[0]),R[3]=Math.max(R[3],d[1])}function bc(R,d){return!(R[0]<=d[0]||R[2]>=d[2]||R[1]<=d[1]||R[3]>=d[3])}function Lh(R,d,L){let Y=R[0]-d[0],te=R[1]-d[1],ce=R[0]-L[0],me=R[1]-L[1];return Y*me-ce*te==0&&Y*ce<=0&&te*me<=0}function rh(R,d,L,Y){return(te=[Y[0]-L[0],Y[1]-L[1]])[0]*(ce=[d[0]-R[0],d[1]-R[1]])[1]-te[1]*ce[0]!=0&&!(!Nf(R,d,L,Y)||!Nf(L,Y,R,d));var te,ce}function Ju(R,d,L){for(let Y of L)for(let te=0;te(te=R)[1]!=(me=ge[Ce+1])[1]>te[1]&&te[0]<(me[0]-ce[0])*(te[1]-ce[1])/(me[1]-ce[1])+ce[0]&&(Y=!Y)}var te,ce,me;return Y}function ah(R,d){for(let L of d)if(ss(R,L))return!0;return!1}function wc(R,d){for(let L of R)if(!ss(L,d))return!1;for(let L=0;L0&&ge<0||me<0&&ge>0}function Bu(R,d,L){let Y=[];for(let te=0;teL[2]){let te=.5*Y,ce=R[0]-L[0]>te?-Y:L[0]-R[0]>te?Y:0;ce===0&&(ce=R[0]-L[2]>te?-Y:L[2]-R[0]>te?Y:0),R[0]+=ce}Ku(d,R)}function Gc(R,d,L,Y){let te=Math.pow(2,Y.z)*rl,ce=[Y.x*rl,Y.y*rl],me=[];for(let ge of R)for(let Ce of ge){let Te=[Ce.x+ce[0],Ce.y+ce[1]];Ou(Te,d,L,te),me.push(Te)}return me}function pf(R,d,L,Y){let te=Math.pow(2,Y.z)*rl,ce=[Y.x*rl,Y.y*rl],me=[];for(let Ce of R){let Te=[];for(let Oe of Ce){let Pe=[Oe.x+ce[0],Oe.y+ce[1]];Ku(d,Pe),Te.push(Pe)}me.push(Te)}if(d[2]-d[0]<=te/2){(ge=d)[0]=ge[1]=1/0,ge[2]=ge[3]=-1/0;for(let Ce of me)for(let Te of Ce)Ou(Te,d,L,te)}var ge;return me}class $l{constructor(d,L){this.type=ur,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'within' expression requires exactly one argument, but found ${d.length-1} instead.`);if(Vn(d[1])){let Y=d[1];if(Y.type==="FeatureCollection"){let te=[];for(let ce of Y.features){let{type:me,coordinates:ge}=ce.geometry;me==="Polygon"&&te.push(ge),me==="MultiPolygon"&&te.push(...ge)}if(te.length)return new $l(Y,{type:"MultiPolygon",coordinates:te})}else if(Y.type==="Feature"){let te=Y.geometry.type;if(te==="Polygon"||te==="MultiPolygon")return new $l(Y,Y.geometry)}else if(Y.type==="Polygon"||Y.type==="MultiPolygon")return new $l(Y,Y)}return L.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(d){if(d.geometry()!=null&&d.canonicalID()!=null){if(d.geometryType()==="Point")return function(L,Y){let te=[1/0,1/0,-1/0,-1/0],ce=[1/0,1/0,-1/0,-1/0],me=L.canonicalID();if(Y.type==="Polygon"){let ge=Bu(Y.coordinates,ce,me),Ce=Gc(L.geometry(),te,ce,me);if(!bc(te,ce))return!1;for(let Te of Ce)if(!ss(Te,ge))return!1}if(Y.type==="MultiPolygon"){let ge=Tc(Y.coordinates,ce,me),Ce=Gc(L.geometry(),te,ce,me);if(!bc(te,ce))return!1;for(let Te of Ce)if(!ah(Te,ge))return!1}return!0}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,Y){let te=[1/0,1/0,-1/0,-1/0],ce=[1/0,1/0,-1/0,-1/0],me=L.canonicalID();if(Y.type==="Polygon"){let ge=Bu(Y.coordinates,ce,me),Ce=pf(L.geometry(),te,ce,me);if(!bc(te,ce))return!1;for(let Te of Ce)if(!wc(Te,ge))return!1}if(Y.type==="MultiPolygon"){let ge=Tc(Y.coordinates,ce,me),Ce=pf(L.geometry(),te,ce,me);if(!bc(te,ce))return!1;for(let Te of Ce)if(!pc(Te,ge))return!1}return!0}(d,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let jf=class{constructor(R=[],d=(L,Y)=>LY?1:0){if(this.data=R,this.length=this.data.length,this.compare=d,this.length>0)for(let L=(this.length>>1)-1;L>=0;L--)this._down(L)}push(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],d=this.data.pop();return--this.length>0&&(this.data[0]=d,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:d,compare:L}=this,Y=d[R];for(;R>0;){let te=R-1>>1,ce=d[te];if(L(Y,ce)>=0)break;d[R]=ce,R=te}d[R]=Y}_down(R){let{data:d,compare:L}=this,Y=this.length>>1,te=d[R];for(;R=0)break;d[R]=d[ce],R=ce}d[R]=te}};function Hc(R,d,L=0,Y=R.length-1,te=Qu){for(;Y>L;){if(Y-L>600){let Ce=Y-L+1,Te=d-L+1,Oe=Math.log(Ce),Pe=.5*Math.exp(2*Oe/3),it=.5*Math.sqrt(Oe*Pe*(Ce-Pe)/Ce)*(Te-Ce/2<0?-1:1);Hc(R,d,Math.max(L,Math.floor(d-Te*Pe/Ce+it)),Math.min(Y,Math.floor(d+(Ce-Te)*Pe/Ce+it)),te)}let ce=R[d],me=L,ge=Y;for(Wc(R,L,d),te(R[Y],ce)>0&&Wc(R,L,Y);me0;)ge--}te(R[L],ce)===0?Wc(R,L,ge):(ge++,Wc(R,ge,Y)),ge<=d&&(L=ge+1),d<=ge&&(Y=ge-1)}}function Wc(R,d,L){let Y=R[d];R[d]=R[L],R[L]=Y}function Qu(R,d){return Rd?1:0}function Yc(R,d){if(R.length<=1)return[R];let L=[],Y,te;for(let ce of R){let me=Uf(ce);me!==0&&(ce.area=Math.abs(me),te===void 0&&(te=me<0),te===me<0?(Y&&L.push(Y),Y=[ce]):Y.push(ce))}if(Y&&L.push(Y),d>1)for(let ce=0;ce1?(Te=d[Ce+1][0],Oe=d[Ce+1][1]):He>0&&(Te+=Pe/this.kx*He,Oe+=it/this.ky*He)),Pe=this.wrap(L[0]-Te)*this.kx,it=(L[1]-Oe)*this.ky;let bt=Pe*Pe+it*it;bt180;)d-=360;return d}}function Zc(R,d){return d[0]-R[0]}function ec(R){return R[1]-R[0]+1}function cu(R,d){return R[1]>=R[0]&&R[1]R[1])return[null,null];let L=ec(R);if(d){if(L===2)return[R,null];let te=Math.floor(L/2);return[[R[0],R[0]+te],[R[0]+te,R[1]]]}if(L===1)return[R,null];let Y=Math.floor(L/2)-1;return[[R[0],R[0]+Y],[R[0]+Y+1,R[1]]]}function vf(R,d){if(!cu(d,R.length))return[1/0,1/0,-1/0,-1/0];let L=[1/0,1/0,-1/0,-1/0];for(let Y=d[0];Y<=d[1];++Y)Ku(L,R[Y]);return L}function Tu(R){let d=[1/0,1/0,-1/0,-1/0];for(let L of R)for(let Y of L)Ku(d,Y);return d}function nh(R){return R[0]!==-1/0&&R[1]!==-1/0&&R[2]!==1/0&&R[3]!==1/0}function vl(R,d,L){if(!nh(R)||!nh(d))return NaN;let Y=0,te=0;return R[2]d[2]&&(Y=R[0]-d[2]),R[1]>d[3]&&(te=R[1]-d[3]),R[3]=Y)return Y;if(bc(te,ce)){if(mf(R,d))return 0}else if(mf(d,R))return 0;let me=1/0;for(let ge of R)for(let Ce=0,Te=ge.length,Oe=Te-1;Ce0;){let Ce=me.pop();if(Ce[0]>=ce)continue;let Te=Ce[1],Oe=d?50:100;if(ec(Te)<=Oe){if(!cu(Te,R.length))return NaN;if(d){let Pe=Mc(R,Te,L,Y);if(isNaN(Pe)||Pe===0)return Pe;ce=Math.min(ce,Pe)}else for(let Pe=Te[0];Pe<=Te[1];++Pe){let it=ac(R[Pe],L,Y);if(ce=Math.min(ce,it),ce===0)return 0}}else{let Pe=tc(Te,d);ih(me,ce,Y,R,ge,Pe[0]),ih(me,ce,Y,R,ge,Pe[1])}}return ce}function El(R,d,L,Y,te,ce=1/0){let me=Math.min(ce,te.distance(R[0],L[0]));if(me===0)return me;let ge=new jf([[0,[0,R.length-1],[0,L.length-1]]],Zc);for(;ge.length>0;){let Ce=ge.pop();if(Ce[0]>=me)continue;let Te=Ce[1],Oe=Ce[2],Pe=d?50:100,it=Y?50:100;if(ec(Te)<=Pe&&ec(Oe)<=it){if(!cu(Te,R.length)&&cu(Oe,L.length))return NaN;let He;if(d&&Y)He=yl(R,Te,L,Oe,te),me=Math.min(me,He);else if(d&&!Y){let bt=R.slice(Te[0],Te[1]+1);for(let Et=Oe[0];Et<=Oe[1];++Et)if(He=ml(L[Et],bt,te),me=Math.min(me,He),me===0)return me}else if(!d&&Y){let bt=L.slice(Oe[0],Oe[1]+1);for(let Et=Te[0];Et<=Te[1];++Et)if(He=ml(R[Et],bt,te),me=Math.min(me,He),me===0)return me}else He=qf(R,Te,L,Oe,te),me=Math.min(me,He)}else{let He=tc(Te,d),bt=tc(Oe,Y);fu(ge,me,te,R,L,He[0],bt[0]),fu(ge,me,te,R,L,He[0],bt[1]),fu(ge,me,te,R,L,He[1],bt[0]),fu(ge,me,te,R,L,He[1],bt[1])}}return me}function oh(R){return R.type==="MultiPolygon"?R.coordinates.map(d=>({type:"Polygon",coordinates:d})):R.type==="MultiLineString"?R.coordinates.map(d=>({type:"LineString",coordinates:d})):R.type==="MultiPoint"?R.coordinates.map(d=>({type:"Point",coordinates:d})):[R]}class Au{constructor(d,L){this.type=Rt,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'distance' expression requires exactly one argument, but found ${d.length-1} instead.`);if(Vn(d[1])){let Y=d[1];if(Y.type==="FeatureCollection")return new Au(Y,Y.features.map(te=>oh(te.geometry)).flat());if(Y.type==="Feature")return new Au(Y,oh(Y.geometry));if("type"in Y&&"coordinates"in Y)return new Au(Y,oh(Y))}return L.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(d){if(d.geometry()!=null&&d.canonicalID()!=null){if(d.geometryType()==="Point")return function(L,Y){let te=L.geometry(),ce=te.flat().map(Ce=>zu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let me=new Ac(ce[0][1]),ge=1/0;for(let Ce of Y){switch(Ce.type){case"Point":ge=Math.min(ge,El(ce,!1,[Ce.coordinates],!1,me,ge));break;case"LineString":ge=Math.min(ge,El(ce,!1,Ce.coordinates,!0,me,ge));break;case"Polygon":ge=Math.min(ge,Sl(ce,!1,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,Y){let te=L.geometry(),ce=te.flat().map(Ce=>zu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let me=new Ac(ce[0][1]),ge=1/0;for(let Ce of Y){switch(Ce.type){case"Point":ge=Math.min(ge,El(ce,!0,[Ce.coordinates],!1,me,ge));break;case"LineString":ge=Math.min(ge,El(ce,!0,Ce.coordinates,!0,me,ge));break;case"Polygon":ge=Math.min(ge,Sl(ce,!0,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries);if(d.geometryType()==="Polygon")return function(L,Y){let te=L.geometry();if(te.length===0||te[0].length===0)return NaN;let ce=Yc(te,0).map(Ce=>Ce.map(Te=>Te.map(Oe=>zu([Oe.x,Oe.y],L.canonical)))),me=new Ac(ce[0][0][0][1]),ge=1/0;for(let Ce of Y)for(let Te of ce){switch(Ce.type){case"Point":ge=Math.min(ge,Sl([Ce.coordinates],!1,Te,me,ge));break;case"LineString":ge=Math.min(ge,Sl(Ce.coordinates,!0,Te,me,ge));break;case"Polygon":ge=Math.min(ge,Jo(Te,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class $c{constructor(d){this.type=Zr,this.key=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let Y=d[1];return Y==null?L.error("Global state property must be defined."):typeof Y!="string"?L.error(`Global state property must be string, but found ${typeof d[1]} instead.`):new $c(Y)}evaluate(d){var L;let Y=(L=d.globals)===null||L===void 0?void 0:L.globalState;return Y&&Object.keys(Y).length!==0?zr(Y,this.key):null}eachChild(){}outputDefined(){return!1}}let _l={"==":wu,"!=":lu,">":Fl,"<":xc,">=":$u,"<=":pl,array:go,at:pi,boolean:go,case:Ko,coalesce:Dl,collator:uu,format:vs,image:os,in:Vi,"index-of":Io,interpolate:Pi,"interpolate-hcl":Pi,"interpolate-lab":Pi,length:ms,let:to,literal:Mi,match:Zi,number:go,"number-format":tl,object:go,slice:Uo,step:Ss,string:go,"to-boolean":Ao,"to-color":Ao,"to-number":Ao,"to-string":Ao,var:wo,within:$l,distance:Au,"global-state":$c};class nl{constructor(d,L,Y,te){this.name=d,this.type=L,this._evaluate=Y,this.args=te}evaluate(d){return this._evaluate(d,this.args)}eachChild(d){this.args.forEach(d)}outputDefined(){return!1}static parse(d,L){let Y=d[0],te=nl.definitions[Y];if(!te)return L.error(`Unknown expression "${Y}". If you wanted a literal array, use ["literal", [...]].`,0);let ce=Array.isArray(te)?te[0]:te.type,me=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,ge=me.filter(([Te])=>!Array.isArray(Te)||Te.length===d.length-1),Ce=null;for(let[Te,Oe]of ge){Ce=new Wo(L.registry,Uu,L.path,null,L.scope);let Pe=[],it=!1;for(let He=1;He{return it=Pe,Array.isArray(it)?`(${it.map(Un).join(", ")})`:`(${Un(it.type)}...)`;var it}).join(" | "),Oe=[];for(let Pe=1;Pe{L=d?L&&Uu(Y):L&&Y instanceof Mi}),!!L&&qu(R)&&yf(R,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function qu(R){if(R instanceof nl&&(R.name==="get"&&R.args.length===1||R.name==="feature-state"||R.name==="has"&&R.args.length===1||R.name==="properties"||R.name==="geometry-type"||R.name==="id"||/^filter-/.test(R.name))||R instanceof $l||R instanceof Au)return!1;let d=!0;return R.eachChild(L=>{d&&!qu(L)&&(d=!1)}),d}function nc(R){if(R instanceof nl&&R.name==="feature-state")return!1;let d=!0;return R.eachChild(L=>{d&&!nc(L)&&(d=!1)}),d}function yf(R,d){if(R instanceof nl&&d.indexOf(R.name)>=0)return!1;let L=!0;return R.eachChild(Y=>{L&&!yf(Y,d)&&(L=!1)}),L}function _f(R){return{result:"success",value:R}}function Mu(R){return{result:"error",value:R}}function ic(R){return R["property-type"]==="data-driven"||R["property-type"]==="cross-faded-data-driven"}function Sc(R){return!!R.expression&&R.expression.parameters.indexOf("zoom")>-1}function Vu(R){return!!R.expression&&R.expression.interpolated}function xo(R){return R instanceof Number?"number":R instanceof String?"string":R instanceof Boolean?"boolean":Array.isArray(R)?"array":R===null?"null":typeof R}function Ec(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)&&qn(R)===Qr}function xh(R){return R}function Vf(R,d){let L=R.stops&&typeof R.stops[0][0]=="object",Y=L||!(L||R.property!==void 0),te=R.type||(Vu(d)?"exponential":"interval"),ce=function(Oe){switch(Oe.type){case"color":return rn.parse;case"padding":return fn.parse;case"numberArray":return Ai.parse;case"colorArray":return jn.parse;default:return null}}(d);if(ce&&((R=Ht({},R)).stops&&(R.stops=R.stops.map(Oe=>[Oe[0],ce(Oe[1])])),R.default=ce(R.default?R.default:d.default)),R.colorSpace&&(me=R.colorSpace)!=="rgb"&&me!=="hcl"&&me!=="lab")throw new Error(`Unknown color space: "${R.colorSpace}"`);var me;let ge=function(Oe){switch(Oe){case"exponential":return Hf;case"interval":return bh;case"categorical":return Gf;case"identity":return il;default:throw new Error(`Unknown function type "${Oe}"`)}}(te),Ce,Te;if(te==="categorical"){Ce=Object.create(null);for(let Oe of R.stops)Ce[Oe[0]]=Oe[1];Te=typeof R.stops[0][0]}if(L){let Oe={},Pe=[];for(let bt=0;btbt[0]),evaluate:({zoom:bt},Et)=>Hf({stops:it,base:R.base},d,bt).evaluate(bt,Et)}}if(Y){let Oe=te==="exponential"?{name:"exponential",base:R.base!==void 0?R.base:1}:null;return{kind:"camera",interpolationType:Oe,interpolationFactor:Pi.interpolationFactor.bind(void 0,Oe),zoomStops:R.stops.map(Pe=>Pe[0]),evaluate:({zoom:Pe})=>ge(R,d,Pe,Ce,Te)}}return{kind:"source",evaluate(Oe,Pe){let it=Pe&&Pe.properties?Pe.properties[R.property]:void 0;return it===void 0?xf(R.default,d.default):ge(R,d,it,Ce,Te)}}}function xf(R,d,L){return R!==void 0?R:d!==void 0?d:L!==void 0?L:void 0}function Gf(R,d,L,Y,te){return xf(typeof L===te?Y[L]:void 0,R.default,d.default)}function bh(R,d,L){if(xo(L)!=="number")return xf(R.default,d.default);let Y=R.stops.length;if(Y===1||L<=R.stops[0][0])return R.stops[0][1];if(L>=R.stops[Y-1][0])return R.stops[Y-1][1];let te=Ls(R.stops.map(ce=>ce[0]),L);return R.stops[te][1]}function Hf(R,d,L){let Y=R.base!==void 0?R.base:1;if(xo(L)!=="number")return xf(R.default,d.default);let te=R.stops.length;if(te===1||L<=R.stops[0][0])return R.stops[0][1];if(L>=R.stops[te-1][0])return R.stops[te-1][1];let ce=Ls(R.stops.map(Oe=>Oe[0]),L),me=function(Oe,Pe,it,He){let bt=He-it,Et=Oe-it;return bt===0?0:Pe===1?Et/bt:(Math.pow(Pe,Et)-1)/(Math.pow(Pe,bt)-1)}(L,Y,R.stops[ce][0],R.stops[ce+1][0]),ge=R.stops[ce][1],Ce=R.stops[ce+1][1],Te=bs[d.type]||xh;return typeof ge.evaluate=="function"?{evaluate(...Oe){let Pe=ge.evaluate.apply(void 0,Oe),it=Ce.evaluate.apply(void 0,Oe);if(Pe!==void 0&&it!==void 0)return Te(Pe,it,me,R.colorSpace)}}:Te(ge,Ce,me,R.colorSpace)}function il(R,d,L){switch(d.type){case"color":L=rn.parse(L);break;case"formatted":L=Di.fromString(L.toString());break;case"resolvedImage":L=qi.fromString(L.toString());break;case"padding":L=fn.parse(L);break;case"colorArray":L=jn.parse(L);break;case"numberArray":L=Ai.parse(L);break;default:xo(L)===d.type||d.type==="enum"&&d.values[L]||(L=void 0)}return xf(L,R.default,d.default)}nl.register(_l,{error:[{kind:"error"},[nr],(R,[d])=>{throw new Xn(d.evaluate(R))}],typeof:[nr,[Zr],(R,[d])=>Un(qn(d.evaluate(R)))],"to-rgba":[yn(Rt,4),[cr],(R,[d])=>{let[L,Y,te,ce]=d.evaluate(R).rgb;return[255*L,255*Y,255*te,ce]}],rgb:[cr,[Rt,Rt,Rt],gf],rgba:[cr,[Rt,Rt,Rt,Rt],gf],has:{type:ur,overloads:[[[nr],(R,[d])=>Kc(d.evaluate(R),R.properties())],[[nr,Qr],(R,[d,L])=>Kc(d.evaluate(R),L.evaluate(R))]]},get:{type:Zr,overloads:[[[nr],(R,[d])=>sh(d.evaluate(R),R.properties())],[[nr,Qr],(R,[d,L])=>sh(d.evaluate(R),L.evaluate(R))]]},"feature-state":[Zr,[nr],(R,[d])=>sh(d.evaluate(R),R.featureState||{})],properties:[Qr,[],R=>R.properties()],"geometry-type":[nr,[],R=>R.geometryType()],id:[Zr,[],R=>R.id()],zoom:[Rt,[],R=>R.globals.zoom],"heatmap-density":[Rt,[],R=>R.globals.heatmapDensity||0],elevation:[Rt,[],R=>R.globals.elevation||0],"line-progress":[Rt,[],R=>R.globals.lineProgress||0],accumulated:[Zr,[],R=>R.globals.accumulated===void 0?null:R.globals.accumulated],"+":[Rt,hu(Rt),(R,d)=>{let L=0;for(let Y of d)L+=Y.evaluate(R);return L}],"*":[Rt,hu(Rt),(R,d)=>{let L=1;for(let Y of d)L*=Y.evaluate(R);return L}],"-":{type:Rt,overloads:[[[Rt,Rt],(R,[d,L])=>d.evaluate(R)-L.evaluate(R)],[[Rt],(R,[d])=>-d.evaluate(R)]]},"/":[Rt,[Rt,Rt],(R,[d,L])=>d.evaluate(R)/L.evaluate(R)],"%":[Rt,[Rt,Rt],(R,[d,L])=>d.evaluate(R)%L.evaluate(R)],ln2:[Rt,[],()=>Math.LN2],pi:[Rt,[],()=>Math.PI],e:[Rt,[],()=>Math.E],"^":[Rt,[Rt,Rt],(R,[d,L])=>Math.pow(d.evaluate(R),L.evaluate(R))],sqrt:[Rt,[Rt],(R,[d])=>Math.sqrt(d.evaluate(R))],log10:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))/Math.LN10],ln:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))],log2:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))/Math.LN2],sin:[Rt,[Rt],(R,[d])=>Math.sin(d.evaluate(R))],cos:[Rt,[Rt],(R,[d])=>Math.cos(d.evaluate(R))],tan:[Rt,[Rt],(R,[d])=>Math.tan(d.evaluate(R))],asin:[Rt,[Rt],(R,[d])=>Math.asin(d.evaluate(R))],acos:[Rt,[Rt],(R,[d])=>Math.acos(d.evaluate(R))],atan:[Rt,[Rt],(R,[d])=>Math.atan(d.evaluate(R))],min:[Rt,hu(Rt),(R,d)=>Math.min(...d.map(L=>L.evaluate(R)))],max:[Rt,hu(Rt),(R,d)=>Math.max(...d.map(L=>L.evaluate(R)))],abs:[Rt,[Rt],(R,[d])=>Math.abs(d.evaluate(R))],round:[Rt,[Rt],(R,[d])=>{let L=d.evaluate(R);return L<0?-Math.round(-L):Math.round(L)}],floor:[Rt,[Rt],(R,[d])=>Math.floor(d.evaluate(R))],ceil:[Rt,[Rt],(R,[d])=>Math.ceil(d.evaluate(R))],"filter-==":[ur,[nr,Zr],(R,[d,L])=>R.properties()[d.value]===L.value],"filter-id-==":[ur,[Zr],(R,[d])=>R.id()===d.value],"filter-type-==":[ur,[nr],(R,[d])=>R.geometryType()===d.value],"filter-<":[ur,[nr,Zr],(R,[d,L])=>{let Y=R.properties()[d.value],te=L.value;return typeof Y==typeof te&&Y{let L=R.id(),Y=d.value;return typeof L==typeof Y&&L":[ur,[nr,Zr],(R,[d,L])=>{let Y=R.properties()[d.value],te=L.value;return typeof Y==typeof te&&Y>te}],"filter-id->":[ur,[Zr],(R,[d])=>{let L=R.id(),Y=d.value;return typeof L==typeof Y&&L>Y}],"filter-<=":[ur,[nr,Zr],(R,[d,L])=>{let Y=R.properties()[d.value],te=L.value;return typeof Y==typeof te&&Y<=te}],"filter-id-<=":[ur,[Zr],(R,[d])=>{let L=R.id(),Y=d.value;return typeof L==typeof Y&&L<=Y}],"filter->=":[ur,[nr,Zr],(R,[d,L])=>{let Y=R.properties()[d.value],te=L.value;return typeof Y==typeof te&&Y>=te}],"filter-id->=":[ur,[Zr],(R,[d])=>{let L=R.id(),Y=d.value;return typeof L==typeof Y&&L>=Y}],"filter-has":[ur,[Zr],(R,[d])=>d.value in R.properties()],"filter-has-id":[ur,[],R=>R.id()!==null&&R.id()!==void 0],"filter-type-in":[ur,[yn(nr)],(R,[d])=>d.value.indexOf(R.geometryType())>=0],"filter-id-in":[ur,[yn(Zr)],(R,[d])=>d.value.indexOf(R.id())>=0],"filter-in-small":[ur,[nr,yn(Zr)],(R,[d,L])=>L.value.indexOf(R.properties()[d.value])>=0],"filter-in-large":[ur,[nr,yn(Zr)],(R,[d,L])=>function(Y,te,ce,me){for(;ce<=me;){let ge=ce+me>>1;if(te[ge]===Y)return!0;te[ge]>Y?me=ge-1:ce=ge+1}return!1}(R.properties()[d.value],L.value,0,L.value.length-1)],all:{type:ur,overloads:[[[ur,ur],(R,[d,L])=>d.evaluate(R)&&L.evaluate(R)],[hu(ur),(R,d)=>{for(let L of d)if(!L.evaluate(R))return!1;return!0}]]},any:{type:ur,overloads:[[[ur,ur],(R,[d,L])=>d.evaluate(R)||L.evaluate(R)],[hu(ur),(R,d)=>{for(let L of d)if(L.evaluate(R))return!0;return!1}]]},"!":[ur,[ur],(R,[d])=>!d.evaluate(R)],"is-supported-script":[ur,[nr],(R,[d])=>{let L=R.globals&&R.globals.isSupportedScript;return!L||L(d.evaluate(R))}],upcase:[nr,[nr],(R,[d])=>d.evaluate(R).toUpperCase()],downcase:[nr,[nr],(R,[d])=>d.evaluate(R).toLowerCase()],concat:[nr,hu(Zr),(R,d)=>d.map(L=>Hi(L.evaluate(R))).join("")],split:[yn(nr),[nr,nr],(R,[d,L])=>d.evaluate(R).split(L.evaluate(R))],join:[nr,[yn(nr),nr],(R,[d,L])=>d.evaluate(R).join(L.evaluate(R))],"resolved-locale":[nr,[ha],(R,[d])=>d.evaluate(R).resolvedLocale()]});class kl{constructor(d,L,Y){this.expression=d,this._warningHistory={},this._evaluator=new jo,this._defaultValue=L?function(te){if(te.type==="color"&&Ec(te.default))return new rn(0,0,0,0);switch(te.type){case"color":return rn.parse(te.default)||null;case"padding":return fn.parse(te.default)||null;case"numberArray":return Ai.parse(te.default)||null;case"colorArray":return jn.parse(te.default)||null;case"variableAnchorOffsetCollection":return gi.parse(te.default)||null;case"projectionDefinition":return io.parse(te.default)||null;default:return te.default===void 0?null:te.default}}(L):null,this._enumValues=L&&L.type==="enum"?L.values:null,this._globalState=Y}evaluateWithoutErrorHandling(d,L,Y,te,ce,me){return this._globalState&&(d=ea(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L,this._evaluator.featureState=Y,this._evaluator.canonical=te,this._evaluator.availableImages=ce||null,this._evaluator.formattedSection=me,this.expression.evaluate(this._evaluator)}evaluate(d,L,Y,te,ce,me){this._globalState&&(d=ea(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L||null,this._evaluator.featureState=Y||null,this._evaluator.canonical=te,this._evaluator.availableImages=ce||null,this._evaluator.formattedSection=me||null;try{let ge=this.expression.evaluate(this._evaluator);if(ge==null||typeof ge=="number"&&ge!=ge)return this._defaultValue;if(this._enumValues&&!(ge in this._enumValues))throw new Xn(`Expected value to be one of ${Object.keys(this._enumValues).map(Ce=>JSON.stringify(Ce)).join(", ")}, but found ${JSON.stringify(ge)} instead.`);return ge}catch(ge){return this._warningHistory[ge.message]||(this._warningHistory[ge.message]=!0,typeof console<"u"&&console.warn(ge.message)),this._defaultValue}}}function kc(R){return Array.isArray(R)&&R.length>0&&typeof R[0]=="string"&&R[0]in _l}function Cc(R,d,L){let Y=new Wo(_l,Uu,[],d?function(ce){let me={color:cr,string:nr,number:Rt,enum:nr,boolean:ur,formatted:Pa,padding:La,numberArray:Xa,colorArray:un,projectionDefinition:Rr,resolvedImage:ja,variableAnchorOffsetCollection:Nn};return ce.type==="array"?yn(me[ce.value]||Zr,ce.length):me[ce.type]}(d):void 0),te=Y.parse(R,void 0,void 0,void 0,d&&d.type==="string"?{typeAnnotation:"coerce"}:void 0);return te?_f(new kl(te,d,L)):Mu(Y.errors)}class Lc{constructor(d,L,Y){this.kind=d,this._styleExpression=L,this.isStateDependent=d!=="constant"&&!nc(L.expression),this.globalStateRefs=wr(L.expression),this._globalState=Y}evaluateWithoutErrorHandling(d,L,Y,te,ce,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,Y,te,ce,me)}evaluate(d,L,Y,te,ce,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluate(d,L,Y,te,ce,me)}}class vc{constructor(d,L,Y,te,ce){this.kind=d,this.zoomStops=Y,this._styleExpression=L,this.isStateDependent=d!=="camera"&&!nc(L.expression),this.globalStateRefs=wr(L.expression),this.interpolationType=te,this._globalState=ce}evaluateWithoutErrorHandling(d,L,Y,te,ce,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,Y,te,ce,me)}evaluate(d,L,Y,te,ce,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluate(d,L,Y,te,ce,me)}interpolationFactor(d,L,Y){return this.interpolationType?Pi.interpolationFactor(this.interpolationType,d,L,Y):0}}function Ft(R,d,L){let Y=Cc(R,d,L);if(Y.result==="error")return Y;let te=Y.value.expression,ce=qu(te);if(!ce&&!ic(d))return Mu([new Sr("","data expressions not supported")]);let me=yf(te,["zoom"]);if(!me&&!Sc(d))return Mu([new Sr("","zoom expressions not supported")]);let ge=Fr(te);return ge||me?ge instanceof Sr?Mu([ge]):ge instanceof Pi&&!Vu(d)?Mu([new Sr("",'"interpolate" expressions cannot be used with this property')]):_f(ge?new vc(ce?"camera":"composite",Y.value,ge.labels,ge instanceof Pi?ge.interpolation:void 0,L):new Lc(ce?"constant":"source",Y.value,L)):Mu([new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class tr{constructor(d,L){this._parameters=d,this._specification=L,Ht(this,Vf(this._parameters,this._specification))}static deserialize(d){return new tr(d._parameters,d._specification)}static serialize(d){return{_parameters:d._parameters,_specification:d._specification}}}function Fr(R){let d=null;if(R instanceof to)d=Fr(R.result);else if(R instanceof Dl){for(let L of R.args)if(d=Fr(L),d)break}else(R instanceof Ss||R instanceof Pi)&&R.input instanceof nl&&R.input.name==="zoom"&&(d=R);return d instanceof Sr||R.eachChild(L=>{let Y=Fr(L);Y instanceof Sr?d=Y:!d&&Y?d=new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):d&&Y&&d!==Y&&(d=new Sr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),d}function wr(R,d=new Set){return R instanceof $c&&d.add(R.key),R.eachChild(L=>{wr(L,d)}),d}function ea(R,d){let{zoom:L,heatmapDensity:Y,elevation:te,lineProgress:ce,isSupportedScript:me,accumulated:ge}=R??{};return{zoom:L,heatmapDensity:Y,elevation:te,lineProgress:ce,isSupportedScript:me,accumulated:ge,globalState:d}}function ba(R){if(R===!0||R===!1)return!0;if(!Array.isArray(R)||R.length===0)return!1;switch(R[0]){case"has":return R.length>=2&&R[1]!=="$id"&&R[1]!=="$type";case"in":return R.length>=3&&(typeof R[1]!="string"||Array.isArray(R[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case"any":case"all":for(let d of R.slice(1))if(!ba(d)&&typeof d!="boolean")return!1;return!0;default:return!0}}let Ia={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Na(R,d){if(R==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};ba(R)||(R=Da(R));let L=Cc(R,Ia,d);if(L.result==="error")throw new Error(L.value.map(Y=>`${Y.key}: ${Y.message}`).join(", "));return{filter:(Y,te,ce)=>L.value.evaluate(Y,te,{},ce),needGeometry:mn(R),getGlobalStateRefs:()=>wr(L.value.expression)}}function Za(R,d){return Rd?1:0}function mn(R){if(!Array.isArray(R))return!1;if(R[0]==="within"||R[0]==="distance")return!0;for(let d=1;d"||d==="<="||d===">="?Ha(R[1],R[2],d):d==="any"?(L=R.slice(1),["any"].concat(L.map(Da))):d==="all"?["all"].concat(R.slice(1).map(Da)):d==="none"?["all"].concat(R.slice(1).map(Da).map(Sn)):d==="in"?$a(R[1],R.slice(2)):d==="!in"?Sn($a(R[1],R.slice(2))):d==="has"?vn(R[1]):d!=="!has"||Sn(vn(R[1]));var L}function Ha(R,d,L){switch(R){case"$type":return[`filter-type-${L}`,d];case"$id":return[`filter-id-${L}`,d];default:return[`filter-${L}`,R,d]}}function $a(R,d){if(d.length===0)return!1;switch(R){case"$type":return["filter-type-in",["literal",d]];case"$id":return["filter-id-in",["literal",d]];default:return d.length>200&&!d.some(L=>typeof L!=typeof d[0])?["filter-in-large",R,["literal",d.sort(Za)]]:["filter-in-small",R,["literal",d]]}}function vn(R){switch(R){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",R]}}function Sn(R){return["!",R]}function yi(R){let d=typeof R;if(d==="number"||d==="boolean"||d==="string"||R==null)return JSON.stringify(R);if(Array.isArray(R)){let te="[";for(let ce of R)te+=`${yi(ce)},`;return`${te}]`}let L=Object.keys(R).sort(),Y="{";for(let te=0;teY.maximum?[new Vt(d,L,`${L} is greater than the maximum value ${Y.maximum}`)]:[]}function Co(R){let d=R.valueSpec,L=ri(R.value.type),Y,te,ce,me={},ge=L!=="categorical"&&R.value.property===void 0,Ce=!ge,Te=xo(R.value.stops)==="array"&&xo(R.value.stops[0])==="array"&&xo(R.value.stops[0][0])==="object",Oe=Ln({key:R.key,value:R.value,valueSpec:R.styleSpec.function,validateSpec:R.validateSpec,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:function(He){if(L==="identity")return[new Vt(He.key,He.value,'identity function may not have a "stops" property')];let bt=[],Et=He.value;return bt=bt.concat(Ni({key:He.key,value:Et,valueSpec:He.valueSpec,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec,arrayElementValidator:Pe})),xo(Et)==="array"&&Et.length===0&&bt.push(new Vt(He.key,Et,"array must have at least one stop")),bt},default:function(He){return He.validateSpec({key:He.key,value:He.value,valueSpec:d,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec})}}});return L==="identity"&&ge&&Oe.push(new Vt(R.key,R.value,'missing required property "property"')),L==="identity"||R.value.stops||Oe.push(new Vt(R.key,R.value,'missing required property "stops"')),L==="exponential"&&R.valueSpec.expression&&!Vu(R.valueSpec)&&Oe.push(new Vt(R.key,R.value,"exponential functions not supported")),R.styleSpec.$version>=8&&(Ce&&!ic(R.valueSpec)?Oe.push(new Vt(R.key,R.value,"property functions not supported")):ge&&!Sc(R.valueSpec)&&Oe.push(new Vt(R.key,R.value,"zoom functions not supported"))),L!=="categorical"&&!Te||R.value.property!==void 0||Oe.push(new Vt(R.key,R.value,'"property" property is required')),Oe;function Pe(He){let bt=[],Et=He.value,Qt=He.key;if(xo(Et)!=="array")return[new Vt(Qt,Et,`array expected, ${xo(Et)} found`)];if(Et.length!==2)return[new Vt(Qt,Et,`array length 2 expected, length ${Et.length} found`)];if(Te){if(xo(Et[0])!=="object")return[new Vt(Qt,Et,`object expected, ${xo(Et[0])} found`)];if(Et[0].zoom===void 0)return[new Vt(Qt,Et,"object stop key must have zoom")];if(Et[0].value===void 0)return[new Vt(Qt,Et,"object stop key must have value")];if(ce&&ce>ri(Et[0].zoom))return[new Vt(Qt,Et[0].zoom,"stop zoom values must appear in ascending order")];ri(Et[0].zoom)!==ce&&(ce=ri(Et[0].zoom),te=void 0,me={}),bt=bt.concat(Ln({key:`${Qt}[0]`,value:Et[0],valueSpec:{zoom:{}},validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec,objectElementValidators:{zoom:$i,value:it}}))}else bt=bt.concat(it({key:`${Qt}[0]`,value:Et[0],validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec},Et));return kc(En(Et[1]))?bt.concat([new Vt(`${Qt}[1]`,Et[1],"expressions are not allowed in function stops.")]):bt.concat(He.validateSpec({key:`${Qt}[1]`,value:Et[1],valueSpec:d,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec}))}function it(He,bt){let Et=xo(He.value),Qt=ri(He.value),er=He.value!==null?He.value:bt;if(Y){if(Et!==Y)return[new Vt(He.key,er,`${Et} stop domain type must match previous stop domain type ${Y}`)]}else Y=Et;if(Et!=="number"&&Et!=="string"&&Et!=="boolean")return[new Vt(He.key,er,"stop domain value must be a number, string, or boolean")];if(Et!=="number"&&L!=="categorical"){let br=`number expected, ${Et} found`;return ic(d)&&L===void 0&&(br+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Vt(He.key,er,br)]}return L!=="categorical"||Et!=="number"||isFinite(Qt)&&Math.floor(Qt)===Qt?L!=="categorical"&&Et==="number"&&te!==void 0&&Qtnew Vt(`${R.key}${Y.key}`,R.value,Y.message));let L=d.value.expression||d.value._styleExpression.expression;if(R.expressionContext==="property"&&R.propertyKey==="text-font"&&!L.outputDefined())return[new Vt(R.key,R.value,`Invalid data expression for "${R.propertyKey}". Output values must be contained as literals within the expression.`)];if(R.expressionContext==="property"&&R.propertyType==="layout"&&!nc(L))return[new Vt(R.key,R.value,'"feature-state" data expressions are not supported with layout properties.')];if(R.expressionContext==="filter"&&!nc(L))return[new Vt(R.key,R.value,'"feature-state" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf("cluster")===0){if(!yf(L,["zoom","feature-state"]))return[new Vt(R.key,R.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(R.expressionContext==="cluster-initial"&&!qu(L))return[new Vt(R.key,R.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Fo(R){let d=R.key,L=R.value,Y=xo(L);return Y!=="string"?[new Vt(d,L,`color expected, ${Y} found`)]:rn.parse(String(L))?[]:[new Vt(d,L,`color expected, "${L}" found`)]}function Yo(R){let d=R.key,L=R.value,Y=R.valueSpec,te=[];return Array.isArray(Y.values)?Y.values.indexOf(ri(L))===-1&&te.push(new Vt(d,L,`expected one of [${Y.values.join(", ")}], ${JSON.stringify(L)} found`)):Object.keys(Y.values).indexOf(ri(L))===-1&&te.push(new Vt(d,L,`expected one of [${Object.keys(Y.values).join(", ")}], ${JSON.stringify(L)} found`)),te}function bo(R){return ba(En(R.value))?Do(Ht({},R,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Gs(R)}function Gs(R){let d=R.value,L=R.key;if(xo(d)!=="array")return[new Vt(L,d,`array expected, ${xo(d)} found`)];let Y=R.styleSpec,te,ce=[];if(d.length<1)return[new Vt(L,d,"filter array must have at least 1 element")];switch(ce=ce.concat(Yo({key:`${L}[0]`,value:d[0],valueSpec:Y.filter_operator,style:R.style,styleSpec:R.styleSpec})),ri(d[0])){case"<":case"<=":case">":case">=":d.length>=2&&ri(d[1])==="$type"&&ce.push(new Vt(L,d,`"$type" cannot be use with operator "${d[0]}"`));case"==":case"!=":d.length!==3&&ce.push(new Vt(L,d,`filter array for operator "${d[0]}" must have 3 elements`));case"in":case"!in":d.length>=2&&(te=xo(d[1]),te!=="string"&&ce.push(new Vt(`${L}[1]`,d[1],`string expected, ${te} found`)));for(let me=2;me{Pe in te&&Y.push(new Vt(ce,te[Pe],`"${Pe}" is prohibited for ref layers`))}),me.layers.forEach(Pe=>{ri(Pe.id)===Te&&(Oe=Pe)}),Oe?Oe.ref?Y.push(new Vt(ce,te.ref,"ref cannot reference another ref layer")):Ce=ri(Oe.type):Y.push(new Vt(ce,te.ref,`ref layer "${Te}" not found`))}else if(Ce!=="background")if(te.source){let Oe=me.sources&&me.sources[te.source],Pe=Oe&&ri(Oe.type);Oe?Pe==="vector"&&Ce==="raster"?Y.push(new Vt(ce,te.source,`layer "${te.id}" requires a raster source`)):Pe!=="raster-dem"&&Ce==="hillshade"||Pe!=="raster-dem"&&Ce==="color-relief"?Y.push(new Vt(ce,te.source,`layer "${te.id}" requires a raster-dem source`)):Pe==="raster"&&Ce!=="raster"?Y.push(new Vt(ce,te.source,`layer "${te.id}" requires a vector source`)):Pe!=="vector"||te["source-layer"]?Pe==="raster-dem"&&Ce!=="hillshade"&&Ce!=="color-relief"?Y.push(new Vt(ce,te.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):Ce!=="line"||!te.paint||!te.paint["line-gradient"]||Pe==="geojson"&&Oe.lineMetrics||Y.push(new Vt(ce,te,`layer "${te.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):Y.push(new Vt(ce,te,`layer "${te.id}" must specify a "source-layer"`)):Y.push(new Vt(ce,te.source,`source "${te.source}" not found`))}else Y.push(new Vt(ce,te,'missing required property "source"'));return Ce==="raster"&&(!((d=te.paint)===null||d===void 0)&&d.resampling)&&(!((L=te.paint)===null||L===void 0)&&L["raster-resampling"])&&Y.push(new Vt(ce,te.paint,`layer "${te.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),Y=Y.concat(Ln({key:ce,value:te,valueSpec:ge.layer,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,objectElementValidators:{"*":()=>[],type:()=>R.validateSpec({key:`${ce}.type`,value:te.type,valueSpec:ge.layer.type,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,object:te,objectKey:"type"}),filter:bo,layout:Oe=>Ln({layer:te,key:Oe.key,value:Oe.value,style:Oe.style,styleSpec:Oe.styleSpec,validateSpec:Oe.validateSpec,objectElementValidators:{"*":Pe=>Kn(Ht({layerType:Ce},Pe))}}),paint:Oe=>Ln({layer:te,key:Oe.key,value:Oe.value,style:Oe.style,styleSpec:Oe.styleSpec,validateSpec:Oe.validateSpec,objectElementValidators:{"*":Pe=>ns(Ht({layerType:Ce},Pe))}})}})),Y}function gs(R){let d=R.value,L=R.key,Y=xo(d);return Y!=="string"?[new Vt(L,d,`string expected, ${Y} found`)]:[]}let js={promoteId:function({key:R,value:d}){if(xo(d)==="string")return gs({key:R,value:d});{let L=[];for(let Y in d)L.push(...gs({key:`${R}.${Y}`,value:d[Y]}));return L}}};function Cl(R){let d=R.value,L=R.key,Y=R.styleSpec,te=R.style,ce=R.validateSpec;if(!d.type)return[new Vt(L,d,'"type" is required')];let me=ri(d.type),ge;switch(me){case"vector":case"raster":return ge=Ln({key:L,value:d,valueSpec:Y[`source_${me.replace("-","_")}`],style:R.style,styleSpec:Y,objectElementValidators:js,validateSpec:ce}),ge;case"raster-dem":return ge=function(Ce){var Te;let Oe=(Te=Ce.sourceName)!==null&&Te!==void 0?Te:"",Pe=Ce.value,it=Ce.styleSpec,He=it.source_raster_dem,bt=Ce.style,Et=[],Qt=xo(Pe);if(Pe===void 0)return Et;if(Qt!=="object")return Et.push(new Vt("source_raster_dem",Pe,`object expected, ${Qt} found`)),Et;let er=ri(Pe.encoding)==="custom",br=["redFactor","greenFactor","blueFactor","baseShift"],sr=Ce.value.encoding?`"${Ce.value.encoding}"`:"Default";for(let Mr in Pe)!er&&br.includes(Mr)?Et.push(new Vt(Mr,Pe[Mr],`In "${Oe}": "${Mr}" is only valid when "encoding" is set to "custom". ${sr} encoding found`)):He[Mr]?Et=Et.concat(Ce.validateSpec({key:Mr,value:Pe[Mr],valueSpec:He[Mr],validateSpec:Ce.validateSpec,style:bt,styleSpec:it})):Et.push(new Vt(Mr,Pe[Mr],`unknown property "${Mr}"`));return Et}({sourceName:L,value:d,style:R.style,styleSpec:Y,validateSpec:ce}),ge;case"geojson":if(ge=Ln({key:L,value:d,valueSpec:Y.source_geojson,style:te,styleSpec:Y,validateSpec:ce,objectElementValidators:js}),d.cluster)for(let Ce in d.clusterProperties){let[Te,Oe]=d.clusterProperties[Ce],Pe=typeof Te=="string"?[Te,["accumulated"],["get",Ce]]:Te;ge.push(...Do({key:`${L}.${Ce}.map`,value:Oe,expressionContext:"cluster-map"})),ge.push(...Do({key:`${L}.${Ce}.reduce`,value:Pe,expressionContext:"cluster-reduce"}))}return ge;case"video":return Ln({key:L,value:d,valueSpec:Y.source_video,style:te,validateSpec:ce,styleSpec:Y});case"image":return Ln({key:L,value:d,valueSpec:Y.source_image,style:te,validateSpec:ce,styleSpec:Y});case"canvas":return[new Vt(L,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Yo({key:`${L}.type`,value:d.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function zl(R){let d=R.value,L=R.styleSpec,Y=L.light,te=R.style,ce=[],me=xo(d);if(d===void 0)return ce;if(me!=="object")return ce=ce.concat([new Vt("light",d,`object expected, ${me} found`)]),ce;for(let ge in d){let Ce=ge.match(/^(.*)-transition$/);ce=ce.concat(Ce&&Y[Ce[1]]&&Y[Ce[1]].transition?R.validateSpec({key:ge,value:d[ge],valueSpec:L.transition,validateSpec:R.validateSpec,style:te,styleSpec:L}):Y[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:Y[ge],validateSpec:R.validateSpec,style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)])}return ce}function Kl(R){let d=R.value,L=R.styleSpec,Y=L.sky,te=R.style,ce=xo(d);if(d===void 0)return[];if(ce!=="object")return[new Vt("sky",d,`object expected, ${ce} found`)];let me=[];for(let ge in d)me=me.concat(Y[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:Y[ge],style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return me}function Gu(R){let d=R.value,L=R.styleSpec,Y=L.terrain,te=R.style,ce=[],me=xo(d);if(d===void 0)return ce;if(me!=="object")return ce=ce.concat([new Vt("terrain",d,`object expected, ${me} found`)]),ce;for(let ge in d)ce=ce.concat(Y[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:Y[ge],validateSpec:R.validateSpec,style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return ce}function xl(R){let d=[],L=R.value,Y=R.key;if(Array.isArray(L)){let te=[],ce=[];for(let me in L)L[me].id&&te.includes(L[me].id)&&d.push(new Vt(Y,L,`all the sprites' ids must be unique, but ${L[me].id} is duplicated`)),te.push(L[me].id),L[me].url&&ce.includes(L[me].url)&&d.push(new Vt(Y,L,`all the sprites' URLs must be unique, but ${L[me].url} is duplicated`)),ce.push(L[me].url),d=d.concat(Ln({key:`${Y}[${me}]`,value:L[me],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:R.validateSpec}));return d}return gs({key:Y,value:L})}function Hu(R){return!!R&&R.constructor===Object}function Su(R){return Hu(R.value)?[]:[new Vt(R.key,R.value,`object expected, ${xo(R.value)} found`)]}let mc={"*":()=>[],array:Ni,boolean:function(R){let d=R.value,L=R.key,Y=xo(d);return Y!=="boolean"?[new Vt(L,d,`boolean expected, ${Y} found`)]:[]},number:$i,color:Fo,constants:ki,enum:Yo,filter:bo,function:Co,layer:zo,object:Ln,source:Cl,light:zl,sky:Kl,terrain:Gu,projection:function(R){let d=R.value,L=R.styleSpec,Y=L.projection,te=R.style,ce=xo(d);if(d===void 0)return[];if(ce!=="object")return[new Vt("projection",d,`object expected, ${ce} found`)];let me=[];for(let ge in d)me=me.concat(Y[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:Y[ge],style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return me},projectionDefinition:function(R){let d=R.key,L=R.value;L=L instanceof String?L.valueOf():L;let Y=xo(L);return Y!=="array"||function(te){return Array.isArray(te)&&te.length===3&&typeof te[0]=="string"&&typeof te[1]=="string"&&typeof te[2]=="number"}(L)||function(te){return!!["interpolate","step","literal"].includes(te[0])}(L)?["array","string"].includes(Y)?[]:[new Vt(d,L,`projection expected, invalid type "${Y}" found`)]:[new Vt(d,L,`projection expected, invalid array ${JSON.stringify(L)} found`)]},string:gs,formatted:function(R){return gs(R).length===0?[]:Do(R)},resolvedImage:function(R){return gs(R).length===0?[]:Do(R)},padding:function(R){let d=R.key,L=R.value;if(xo(L)==="array"){if(L.length<1||L.length>4)return[new Vt(d,L,`padding requires 1 to 4 values; ${L.length} values found`)];let Y={type:"number"},te=[];for(let ce=0;ce[]}})),R.constants&&(L=L.concat(ki({key:"constants",value:R.constants}))),Ql(L)}function Jl(R){return function(d){return R(Object.assign({},d,{validateSpec:Jc}))}}function Ql(R){return[].concat(R).sort((d,L)=>d.line-L.line)}function Eu(R){return function(...d){return Ql(R.apply(this,d))}}du.source=Eu(Jl(Cl)),du.sprite=Eu(Jl(xl)),du.glyphs=Eu(Jl(oc)),du.light=Eu(Jl(zl)),du.sky=Eu(Jl(Kl)),du.terrain=Eu(Jl(Gu)),du.state=Eu(Jl(Su)),du.layer=Eu(Jl(zo)),du.filter=Eu(Jl(bo)),du.paintProperty=Eu(Jl(ns)),du.layoutProperty=Eu(Jl(Kn));let bf={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class lh{constructor(d,L){this._globalState=L,this.setValue(d)}evaluate(){var d;return(d=this._literalValue)!==null&&d!==void 0?d:this._compiledValue.evaluate({})}setValue(d){if(d==null||d==="visible"||d==="none")return this._literalValue=d==="none"?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let L=Cc(d,bf,this._globalState);if(L.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,new Error(L.value.map(Y=>`${Y.key}: ${Y.message}`).join(", "));this._literalValue=void 0,this._compiledValue=L.value,this._globalStateRefs=wr(L.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let Pc=ht,Ks=du,Bl=Ks.light,Wu=Ks.sky,wf=Ks.paintProperty,Qc=Ks.layoutProperty;function ku(R,d){let L=!1;if(d?.length)for(let Y of d)R.fire(new Ot(new Error(Y.message))),L=!0;return L}class Ol{constructor(d,L,Y){let te=this.cells=[];if(d instanceof ArrayBuffer){this.arrayBuffer=d;let me=new Int32Array(this.arrayBuffer);d=me[0],this.d=(L=me[1])+2*(Y=me[2]);for(let Ce=0;Ce=Pe[He+0]&&te>=Pe[He+1])?(ge[it]=!0,me.push(Oe[it])):ge[it]=!1}}}_forEachCell(d,L,Y,te,ce,me,ge,Ce){let Te=this._convertToCellCoord(d),Oe=this._convertToCellCoord(L),Pe=this._convertToCellCoord(Y),it=this._convertToCellCoord(te);for(let He=Te;He<=Pe;He++)for(let bt=Oe;bt<=it;bt++){let Et=this.d*bt+He;if((!Ce||Ce(this._convertFromCellCoord(He),this._convertFromCellCoord(bt),this._convertFromCellCoord(He+1),this._convertFromCellCoord(bt+1)))&&ce.call(this,d,L,Y,te,Et,me,ge,Ce))return}}_convertFromCellCoord(d){return(d-this.padding)/this.scale}_convertToCellCoord(d){return Math.max(0,Math.min(this.d-1,Math.floor(d*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let d=this.cells,L=3+this.cells.length+1+1,Y=0;for(let me of this.cells)Y+=me.length;let te=new Int32Array(L+Y+this.keys.length+this.bboxes.length);te[0]=this.extent,te[1]=this.n,te[2]=this.padding;let ce=L;for(let me=0;meY?(this.lastIntegerZoom=Y+1,this.lastIntegerZoomTime=L):this.lastFloorZoom{try{return new RegExp(`\\p{sc=${L}}`,"u").source}catch{return null}}).filter(L=>L);return new RegExp(d.join("|"),"u")}let Jr=jr(["Arab","Dupl","Mong","Ougr","Syrc"]);function la(R){return!Jr.test(String.fromCodePoint(R))}function xa(R){return!(Wt(R)||(d=R,/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(d))));var d}let Ba=jr(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function an(R){return Ba.test(String.fromCodePoint(R))}function wn(R,d){return!(!d&&an(R)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(R)))}function ii(R){for(let d of R)if(an(d.codePointAt(0)))return!0;return!1}let Si=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(R){this.pluginStatus=R.pluginStatus,this.pluginURL=R.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(R){if(Si.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=R.applyArabicShaping,this.processBidirectionalText=R.processBidirectionalText,this.processStyledBidirectionalText=R.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(R,d){return e(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(R.pluginStatus!=="loading")return this.setState(R),R;let L=R.pluginURL,Y=new Promise(ce=>{this.loadScriptResolve=ce});d(L);let te=new Promise(ce=>setTimeout(()=>ce(),this.TIMEOUT));if(yield Promise.race([Y,te]),this.isParsed()){let ce={pluginStatus:"loaded",pluginURL:L};return this.setState(ce),ce}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${L}`)})}};class oi{constructor(d,L){this.isSupportedScript=Ji,this.zoom=d,L?(this.now=L.now||0,this.fadeDuration=L.fadeDuration||0,this.zoomHistory=L.zoomHistory||new Bt,this.transition=L.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Bt,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let d=this.zoom,L=d-Math.floor(d),Y=this.crossFadingFactor();return d>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:L+(1-L)*Y}:{fromScale:.5,toScale:1,t:1-(1-Y)*L}}}function Ji(R){return function(d,L){for(let Y of d)if(!wn(Y.codePointAt(0),L))return!1;return!0}(R,Si.getRTLTextPluginStatus()==="loaded")}let Qi="-transition";class Oo{constructor(d,L,Y){this.property=d,this.value=L,this.expression=function(te,ce,me){if(Ec(te))return new tr(te,ce);if(kc(te)){let ge=Ft(te,ce,me);if(ge.result==="error")throw new Error(ge.value.map(Ce=>`${Ce.key}: ${Ce.message}`).join(", "));return ge.value}{let ge=te;return ce.type==="color"&&typeof te=="string"?ge=rn.parse(te):ce.type!=="padding"||typeof te!="number"&&!Array.isArray(te)?ce.type!=="numberArray"||typeof te!="number"&&!Array.isArray(te)?ce.type!=="colorArray"||typeof te!="string"&&!Array.isArray(te)?ce.type==="variableAnchorOffsetCollection"&&Array.isArray(te)?ge=gi.parse(te):ce.type==="projectionDefinition"&&typeof te=="string"&&(ge=io.parse(te)):ge=jn.parse(te):ge=Ai.parse(te):ge=fn.parse(te),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>ge}}}(L===void 0?d.specification.default:L,d.specification,Y)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(d,L,Y){return this.property.possiblyEvaluate(this,d,L,Y)}}class Qo{constructor(d,L){this.property=d,this.value=new Oo(d,void 0,L)}transitioned(d,L){return new ys(this.property,this.value,L,Z({},d.transition,this.transition),d.now)}untransitioned(){return new ys(this.property,this.value,null,{},0)}}class vo{constructor(d,L){this._properties=d,this._values=Object.create(d.defaultTransitionablePropertyValues),this._globalState=L}hasProperty(d){return d in this._properties.defaultTransitionablePropertyValues}getValue(d){return q(this._values[d].value.value)}setValue(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new Qo(this._values[d].property,this._globalState)),this._values[d].value=new Oo(this._values[d].property,L===null?void 0:q(L),this._globalState)}getTransition(d){return q(this._values[d].transition)}setTransition(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new Qo(this._values[d].property,this._globalState)),this._values[d].transition=q(L)||void 0}serialize(){let d={};for(let L of Object.keys(this._values)){let Y=this.getValue(L);Y!==void 0&&(d[L]=Y);let te=this.getTransition(L);te!==void 0&&(d[`${L}${Qi}`]=te)}return d}transitioned(d,L){let Y=new ol(this._properties);for(let te of Object.keys(this._values))Y._values[te]=this._values[te].transitioned(d,L._values[te]);return Y}untransitioned(){let d=new ol(this._properties);for(let L of Object.keys(this._values))d._values[L]=this._values[L].untransitioned();return d}}class ys{constructor(d,L,Y,te,ce){this.property=d,this.value=L,this.begin=ce+te.delay||0,this.end=this.begin+te.duration||0,d.specification.transition&&(te.delay||te.duration)&&(this.prior=Y)}possiblyEvaluate(d,L,Y){let te=d.now||0,ce=this.value.possiblyEvaluate(d,L,Y),me=this.prior;if(me){if(te>this.end)return this.prior=null,ce;if(this.value.isDataDriven())return this.prior=null,ce;if(tete.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:Y,to:L}}interpolate(d){return d}}class sc{constructor(d){this.specification=d}possiblyEvaluate(d,L,Y,te){if(d.value!==void 0){if(d.expression.kind==="constant"){let ce=d.expression.evaluate(L,null,{},Y,te);return this._calculate(ce,ce,ce,L)}return this._calculate(d.expression.evaluate(new oi(Math.floor(L.zoom-1),L)),d.expression.evaluate(new oi(Math.floor(L.zoom),L)),d.expression.evaluate(new oi(Math.floor(L.zoom+1),L)),L)}}_calculate(d,L,Y,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:Y,to:L}}interpolate(d){return d}}class tu{constructor(d){this.specification=d}possiblyEvaluate(d,L,Y,te){return!!d.expression.evaluate(L,null,{},Y,te)}interpolate(){return!1}}class Ps{constructor(d){this.properties=d,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let L in d){let Y=d[L];Y.specification.overridable&&this.overridableProperties.push(L);let te=this.defaultPropertyValues[L]=new Oo(Y,void 0,void 0),ce=this.defaultTransitionablePropertyValues[L]=new Qo(Y,void 0);this.defaultTransitioningPropertyValues[L]=ce.untransitioned(),this.defaultPossiblyEvaluatedValues[L]=te.possiblyEvaluate({})}}}fi("DataDrivenProperty",wi),fi("DataConstantProperty",hi),fi("CrossFadedDataDrivenProperty",sl),fi("CrossFadedProperty",sc),fi("ColorRampProperty",tu);let gc=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",pu=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class ll extends vt{constructor(d,L,Y){if(super(),this.id=d.id,this.type=d.type,this._globalState=Y,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=function(te,ce){return new lh(te,ce)}(this.visibility,Y),d.type!=="custom"&&(this.metadata=d.metadata,this.minzoom=d.minzoom,this.maxzoom=d.maxzoom,d.type!=="background"&&(this.source=d.source,this.sourceLayer=d["source-layer"],this.filter=d.filter,this._featureFilter=Na(d.filter,Y)),L.layout&&(this._unevaluatedLayout=new jl(L.layout,Y)),L.paint)){this._transitionablePaint=new vo(L.paint,Y);for(let te in d.paint)this.setPaintProperty(te,d.paint[te],{validate:!1});for(let te in d.layout)this.setLayoutProperty(te,d.layout[te],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Cu(L.paint)}}setFilter(d){this.filter=d,this._featureFilter=Na(d,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(d){var L;if(d==="visibility")return this.visibility;if(!((L=this._transitionablePaint)===null||L===void 0)&&L.hasProperty(d))throw new Error(d+gc);if(!this._unevaluatedLayout)throw new Error(`Cannot get layout property "${d}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(d)}getLayoutAffectingGlobalStateRefs(){let d=new Set;for(let L of this._visibilityExpression.getGlobalStateRefs())d.add(L);if(this._unevaluatedLayout)for(let L in this._unevaluatedLayout._values){let Y=this._unevaluatedLayout._values[L];for(let te of Y.getGlobalStateRefs())d.add(te)}for(let L of this._featureFilter.getGlobalStateRefs())d.add(L);return d}getPaintAffectingGlobalStateRefs(){var d;let L=new globalThis.Map;if(this._transitionablePaint)for(let Y in this._transitionablePaint._values){let te=this._transitionablePaint._values[Y].value;for(let ce of te.getGlobalStateRefs()){let me=(d=L.get(ce))!==null&&d!==void 0?d:[];me.push({name:Y,value:te.value}),L.set(ce,me)}}return L}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(d,L,Y={}){var te;if(d==="visibility")return this.visibility=L,this._visibilityExpression.setValue(L),void this.recalculateVisibility();!((te=this._transitionablePaint)===null||te===void 0)&&te.hasProperty(d)?this.fire(new Ot(new Error(d+gc))):L!=null&&this._validate(Qc,`layers.${this.id}.layout.${d}`,d,L,Y)||this._unevaluatedLayout.setValue(d,L)}getPaintProperty(d){var L,Y;if(d.endsWith(Qi)){let te=d.slice(0,-11);if(te==="visibility"||!((L=this._unevaluatedLayout)===null||L===void 0)&&L.hasProperty(te))throw new Error(d+pu);return this._transitionablePaint.getTransition(te)}if(d==="visibility"||!((Y=this._unevaluatedLayout)===null||Y===void 0)&&Y.hasProperty(d))throw new Error(d+pu);return this._transitionablePaint.getValue(d)}setPaintProperty(d,L,Y={}){var te;if(d==="visibility"||!((te=this._unevaluatedLayout)===null||te===void 0)&&te.hasProperty(d))return this.fire(new Ot(new Error(d+pu))),!1;if(L!=null&&this._validate(wf,`layers.${this.id}.paint.${d}`,d,L,Y))return!1;if(d.endsWith(Qi))return this._transitionablePaint.setTransition(d.slice(0,-11),L||void 0),!1;{let ce=this._transitionablePaint._values[d],me=ce.property.specification["property-type"]==="cross-faded-data-driven",ge=ce.value.isDataDriven(),Ce=ce.value;this._transitionablePaint.setValue(d,L),this._handleSpecialPaintPropertyUpdate(d);let Te=this._transitionablePaint._values[d].value;return Te.isDataDriven()||ge||me||this._handleOverridablePaintPropertyUpdate(d,Ce,Te)}}_handleSpecialPaintPropertyUpdate(d){}_handleOverridablePaintPropertyUpdate(d,L,Y){return!1}isHidden(d=this.minzoom,L=!1){return!!(this.minzoom&&d<(L?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&d>=this.maxzoom)||this._evaluatedVisibility==="none"}updateTransitions(d){this._transitioningPaint=this._transitionablePaint.transitioned(d,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(d,L){d.getCrossfadeParameters&&(this._crossfadeParameters=d.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(d,void 0,L)),this.paint=this._transitioningPaint.possiblyEvaluate(d,void 0,L)}serialize(){var d,L;let Y={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:(d=this._unevaluatedLayout)===null||d===void 0?void 0:d.serialize(),paint:(L=this._transitionablePaint)===null||L===void 0?void 0:L.serialize()};return this.visibility&&(Y.layout||(Y.layout={}),Y.layout.visibility=this.visibility),X(Y,(te,ce)=>!(te===void 0||ce==="layout"&&!Object.keys(te).length||ce==="paint"&&!Object.keys(te).length))}_validate(d,L,Y,te,ce={}){return ce?.validate!==!1&&ku(this,d.call(Ks,{key:L,layerType:this.type,objectKey:Y,value:te,styleSpec:ht,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let d in this.paint._values){let L=this.paint.get(d);if(L instanceof Hs&&ic(L.property.specification)&&(L.value.kind==="source"||L.value.kind==="composite")&&L.value.isStateDependent)return!0}return!1}}let ef;var de={get paint(){return ef=ef||new Ps({"raster-opacity":new hi(ht.paint_raster["raster-opacity"]),"raster-hue-rotate":new hi(ht.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new hi(ht.paint_raster["raster-brightness-min"]),"raster-brightness-max":new hi(ht.paint_raster["raster-brightness-max"]),"raster-saturation":new hi(ht.paint_raster["raster-saturation"]),"raster-contrast":new hi(ht.paint_raster["raster-contrast"]),resampling:new hi(ht.paint_raster.resampling),"raster-resampling":new hi(ht.paint_raster["raster-resampling"]),"raster-fade-duration":new hi(ht.paint_raster["raster-fade-duration"])})}};class Ee extends ll{constructor(d,L){super(d,de,L)}}let Ve={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class tt{constructor(d,L){this._structArray=d,this._pos1=L*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class at{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(d,L){return d._trim(),L&&(d.isTransferred=!0,L.push(d.arrayBuffer)),{length:d.length,arrayBuffer:d.arrayBuffer}}static deserialize(d){let L=Object.create(this.prototype);return L.arrayBuffer=d.arrayBuffer,L.length=d.length,L.capacity=d.arrayBuffer.byteLength/L.bytesPerElement,L._refreshViews(),L}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(d){this.reserve(d),this.length=d}reserve(d){if(d>this.capacity){this.capacity=Math.max(d,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let L=this.uint8;this._refreshViews(),L&&this.uint8.set(L)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function ct(R,d=1){let L=0,Y=0;return{members:R.map(te=>{let ce=Ve[te.type].BYTES_PER_ELEMENT,me=L=Nt(L,Math.max(d,ce)),ge=te.components||1;return Y=Math.max(Y,ce),L+=ce*ge,{name:te.name,type:te.type,components:ge,offset:me}}),size:Nt(L,Math.max(Y,d)),alignment:d}}function Nt(R,d){return Math.ceil(R/d)*d}class St extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L){let Y=this.length;return this.resize(Y+1),this.emplace(Y,d,L)}emplace(d,L,Y){let te=2*d;return this.int16[te+0]=L,this.int16[te+1]=Y,d}}St.prototype.bytesPerElement=4,fi("StructArrayLayout2i4",St);class Jt extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,Y){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,Y)}emplace(d,L,Y,te){let ce=3*d;return this.int16[ce+0]=L,this.int16[ce+1]=Y,this.int16[ce+2]=te,d}}Jt.prototype.bytesPerElement=6,fi("StructArrayLayout3i6",Jt);class mr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te){let ce=this.length;return this.resize(ce+1),this.emplace(ce,d,L,Y,te)}emplace(d,L,Y,te,ce){let me=4*d;return this.int16[me+0]=L,this.int16[me+1]=Y,this.int16[me+2]=te,this.int16[me+3]=ce,d}}mr.prototype.bytesPerElement=8,fi("StructArrayLayout4i8",mr);class gr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ce,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,Y,te,ce,me)}emplace(d,L,Y,te,ce,me,ge){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=Y,this.int16[Ce+2]=te,this.int16[Ce+3]=ce,this.int16[Ce+4]=me,this.int16[Ce+5]=ge,d}}gr.prototype.bytesPerElement=12,fi("StructArrayLayout2i4i12",gr);class Hr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ce,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,Y,te,ce,me)}emplace(d,L,Y,te,ce,me,ge){let Ce=4*d,Te=8*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=Y,this.uint8[Te+4]=te,this.uint8[Te+5]=ce,this.uint8[Te+6]=me,this.uint8[Te+7]=ge,d}}Hr.prototype.bytesPerElement=8,fi("StructArrayLayout2i4ub8",Hr);class Vr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L){let Y=this.length;return this.resize(Y+1),this.emplace(Y,d,L)}emplace(d,L,Y){let te=2*d;return this.float32[te+0]=L,this.float32[te+1]=Y,d}}Vr.prototype.bytesPerElement=8,fi("StructArrayLayout2f8",Vr);class ca extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ce,me,ge,Ce,Te,Oe){let Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,d,L,Y,te,ce,me,ge,Ce,Te,Oe)}emplace(d,L,Y,te,ce,me,ge,Ce,Te,Oe,Pe){let it=10*d;return this.uint16[it+0]=L,this.uint16[it+1]=Y,this.uint16[it+2]=te,this.uint16[it+3]=ce,this.uint16[it+4]=me,this.uint16[it+5]=ge,this.uint16[it+6]=Ce,this.uint16[it+7]=Te,this.uint16[it+8]=Oe,this.uint16[it+9]=Pe,d}}ca.prototype.bytesPerElement=20,fi("StructArrayLayout10ui20",ca);class Aa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ce,me,ge,Ce){let Te=this.length;return this.resize(Te+1),this.emplace(Te,d,L,Y,te,ce,me,ge,Ce)}emplace(d,L,Y,te,ce,me,ge,Ce,Te){let Oe=8*d;return this.uint16[Oe+0]=L,this.uint16[Oe+1]=Y,this.uint16[Oe+2]=te,this.uint16[Oe+3]=ce,this.uint16[Oe+4]=me,this.uint16[Oe+5]=ge,this.uint16[Oe+6]=Ce,this.uint16[Oe+7]=Te,d}}Aa.prototype.bytesPerElement=16,fi("StructArrayLayout8ui16",Aa);class Yr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ce,me,ge,Ce,Te,Oe,Pe,it){let He=this.length;return this.resize(He+1),this.emplace(He,d,L,Y,te,ce,me,ge,Ce,Te,Oe,Pe,it)}emplace(d,L,Y,te,ce,me,ge,Ce,Te,Oe,Pe,it,He){let bt=12*d;return this.int16[bt+0]=L,this.int16[bt+1]=Y,this.int16[bt+2]=te,this.int16[bt+3]=ce,this.uint16[bt+4]=me,this.uint16[bt+5]=ge,this.uint16[bt+6]=Ce,this.uint16[bt+7]=Te,this.int16[bt+8]=Oe,this.int16[bt+9]=Pe,this.int16[bt+10]=it,this.int16[bt+11]=He,d}}Yr.prototype.bytesPerElement=24,fi("StructArrayLayout4i4ui4i24",Yr);class oa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,Y){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,Y)}emplace(d,L,Y,te){let ce=3*d;return this.float32[ce+0]=L,this.float32[ce+1]=Y,this.float32[ce+2]=te,d}}oa.prototype.bytesPerElement=12,fi("StructArrayLayout3f12",oa);class fa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint32[1*d+0]=L,d}}fa.prototype.bytesPerElement=4,fi("StructArrayLayout1ul4",fa);class Ea extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ce,me,ge,Ce,Te){let Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,d,L,Y,te,ce,me,ge,Ce,Te)}emplace(d,L,Y,te,ce,me,ge,Ce,Te,Oe){let Pe=10*d,it=5*d;return this.int16[Pe+0]=L,this.int16[Pe+1]=Y,this.int16[Pe+2]=te,this.int16[Pe+3]=ce,this.int16[Pe+4]=me,this.int16[Pe+5]=ge,this.uint32[it+3]=Ce,this.uint16[Pe+8]=Te,this.uint16[Pe+9]=Oe,d}}Ea.prototype.bytesPerElement=20,fi("StructArrayLayout6i1ul2ui20",Ea);class Ma extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ce,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,Y,te,ce,me)}emplace(d,L,Y,te,ce,me,ge){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=Y,this.int16[Ce+2]=te,this.int16[Ce+3]=ce,this.int16[Ce+4]=me,this.int16[Ce+5]=ge,d}}Ma.prototype.bytesPerElement=12,fi("StructArrayLayout2i2i2i12",Ma);class sa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ce){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,Y,te,ce)}emplace(d,L,Y,te,ce,me){let ge=4*d,Ce=8*d;return this.float32[ge+0]=L,this.float32[ge+1]=Y,this.float32[ge+2]=te,this.int16[Ce+6]=ce,this.int16[Ce+7]=me,d}}sa.prototype.bytesPerElement=16,fi("StructArrayLayout2f1f2i16",sa);class hn extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ce,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,Y,te,ce,me)}emplace(d,L,Y,te,ce,me,ge){let Ce=16*d,Te=4*d,Oe=8*d;return this.uint8[Ce+0]=L,this.uint8[Ce+1]=Y,this.float32[Te+1]=te,this.float32[Te+2]=ce,this.int16[Oe+6]=me,this.int16[Oe+7]=ge,d}}hn.prototype.bytesPerElement=16,fi("StructArrayLayout2ub2f2i16",hn);class Tn extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,Y){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,Y)}emplace(d,L,Y,te){let ce=3*d;return this.uint16[ce+0]=L,this.uint16[ce+1]=Y,this.uint16[ce+2]=te,d}}Tn.prototype.bytesPerElement=6,fi("StructArrayLayout3ui6",Tn);class zn extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ce,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er){let br=this.length;return this.resize(br+1),this.emplace(br,d,L,Y,te,ce,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er)}emplace(d,L,Y,te,ce,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br){let sr=24*d,Mr=12*d,qr=48*d;return this.int16[sr+0]=L,this.int16[sr+1]=Y,this.uint16[sr+2]=te,this.uint16[sr+3]=ce,this.uint32[Mr+2]=me,this.uint32[Mr+3]=ge,this.uint32[Mr+4]=Ce,this.uint16[sr+10]=Te,this.uint16[sr+11]=Oe,this.uint16[sr+12]=Pe,this.float32[Mr+7]=it,this.float32[Mr+8]=He,this.uint8[qr+36]=bt,this.uint8[qr+37]=Et,this.uint8[qr+38]=Qt,this.uint32[Mr+10]=er,this.int16[sr+22]=br,d}}zn.prototype.bytesPerElement=48,fi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",zn);class $n extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,Y,te,ce,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn){let gn=this.length;return this.resize(gn+1),this.emplace(gn,d,L,Y,te,ce,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn)}emplace(d,L,Y,te,ce,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn,gn){let Va=32*d,Hn=16*d;return this.int16[Va+0]=L,this.int16[Va+1]=Y,this.int16[Va+2]=te,this.int16[Va+3]=ce,this.int16[Va+4]=me,this.int16[Va+5]=ge,this.int16[Va+6]=Ce,this.int16[Va+7]=Te,this.uint16[Va+8]=Oe,this.uint16[Va+9]=Pe,this.uint16[Va+10]=it,this.uint16[Va+11]=He,this.uint16[Va+12]=bt,this.uint16[Va+13]=Et,this.uint16[Va+14]=Qt,this.uint16[Va+15]=er,this.uint16[Va+16]=br,this.uint16[Va+17]=sr,this.uint16[Va+18]=Mr,this.uint16[Va+19]=qr,this.uint16[Va+20]=$r,this.uint16[Va+21]=_a,this.uint16[Va+22]=Ca,this.uint32[Hn+12]=nn,this.float32[Hn+13]=qa,this.float32[Hn+14]=bn,this.uint16[Va+30]=Fn,this.uint16[Va+31]=gn,d}}$n.prototype.bytesPerElement=64,fi("StructArrayLayout8i15ui1ul2f2ui64",$n);class xi extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.float32[1*d+0]=L,d}}xi.prototype.bytesPerElement=4,fi("StructArrayLayout1f4",xi);class di extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,Y){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,Y)}emplace(d,L,Y,te){let ce=3*d;return this.uint16[6*d+0]=L,this.float32[ce+1]=Y,this.float32[ce+2]=te,d}}di.prototype.bytesPerElement=12,fi("StructArrayLayout1ui2f12",di);class uo extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,Y){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,Y)}emplace(d,L,Y,te){let ce=4*d;return this.uint32[2*d+0]=L,this.uint16[ce+2]=Y,this.uint16[ce+3]=te,d}}uo.prototype.bytesPerElement=8,fi("StructArrayLayout1ul2ui8",uo);class pe extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L){let Y=this.length;return this.resize(Y+1),this.emplace(Y,d,L)}emplace(d,L,Y){let te=2*d;return this.uint16[te+0]=L,this.uint16[te+1]=Y,d}}pe.prototype.bytesPerElement=4,fi("StructArrayLayout2ui4",pe);class y extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint16[1*d+0]=L,d}}y.prototype.bytesPerElement=2,fi("StructArrayLayout1ui2",y);class N extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,Y,te){let ce=this.length;return this.resize(ce+1),this.emplace(ce,d,L,Y,te)}emplace(d,L,Y,te,ce){let me=4*d;return this.float32[me+0]=L,this.float32[me+1]=Y,this.float32[me+2]=te,this.float32[me+3]=ce,d}}N.prototype.bytesPerElement=16,fi("StructArrayLayout4f16",N);class ie extends tt{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new t(this.anchorPointX,this.anchorPointY)}}ie.prototype.size=20;class fe extends Ea{get(d){return new ie(this,d)}}fi("CollisionBoxArray",fe);class be extends tt{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(d){this._structArray.uint8[this._pos1+37]=d}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(d){this._structArray.uint8[this._pos1+38]=d}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(d){this._structArray.uint32[this._pos4+10]=d}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}be.prototype.size=48;class Re extends zn{get(d){return new be(this,d)}}fi("PlacedSymbolArray",Re);class je extends tt{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(d){this._structArray.uint32[this._pos4+12]=d}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}je.prototype.size=64;class Ze extends $n{get(d){return new je(this,d)}}fi("SymbolInstanceArray",Ze);class ut extends xi{getoffsetX(d){return this.float32[1*d+0]}}fi("GlyphOffsetArray",ut);class ft extends Jt{getx(d){return this.int16[3*d+0]}gety(d){return this.int16[3*d+1]}gettileUnitDistanceFromAnchor(d){return this.int16[3*d+2]}}fi("SymbolLineVertexArray",ft);class Dt extends tt{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Dt.prototype.size=12;class Gt extends di{get(d){return new Dt(this,d)}}fi("TextAnchorOffsetArray",Gt);class Kt extends tt{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Kt.prototype.size=8;class st extends uo{get(d){return new Kt(this,d)}}fi("FeatureIndexArray",st);class It extends St{}class Ut extends St{}class ir extends St{}class dr extends gr{}class Ar extends Hr{}class hr extends Vr{}class vr extends ca{}class Or extends Aa{}class Cr extends Yr{}class ta extends oa{}class ka extends fa{}class Ta extends Ma{}class Ra extends hn{}class ua extends Tn{}class ia extends pe{}let ma=ct([{name:"a_pos",components:2,type:"Int16"}],4),{members:da}=ma;class Fa{constructor(d=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=d}prepareSegment(d,L,Y,te){let ce=this.segments[this.segments.length-1];return d>Fa.MAX_VERTEX_ARRAY_LENGTH&&ee(`Max vertices per segment is ${Fa.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${d}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Fa.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!ce||ce.vertexLength+d>Fa.MAX_VERTEX_ARRAY_LENGTH||ce.sortKey!==te?this.createNewSegment(L,Y,te):ce}createNewSegment(d,L,Y){let te={vertexOffset:d.length,primitiveOffset:L.length,vertexLength:0,primitiveLength:0,vaos:{}};return Y!==void 0&&(te.sortKey=Y),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(te),te}getOrCreateLatestSegment(d,L,Y){return this.prepareSegment(0,d,L,Y)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let d of this.segments)for(let L in d.vaos)d.vaos[L].destroy()}static simpleSegment(d,L,Y,te){return new Fa([{vertexOffset:d,primitiveOffset:L,vertexLength:Y,primitiveLength:te,vaos:{},sortKey:0}])}}function za(R,d){return 256*(R=se(Math.floor(R),0,255))+se(Math.floor(d),0,255)}Fa.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,fi("SegmentVector",Fa);let kn=ct([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),Dn=ct([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var ui,cn,sn,ei={exports:{}},Pn={exports:{}},Rn={exports:{}},In=function(){if(sn)return ei.exports;sn=1;var R=(ui||(ui=1,Pn.exports=function(L,Y){var te,ce,me,ge,Ce,Te,Oe,Pe;for(ce=L.length-(te=3&L.length),me=Y,Ce=3432918353,Te=461845907,Pe=0;Pe>>16)*Ce&65535)<<16)&4294967295)<<15|Oe>>>17))*Te+(((Oe>>>16)*Te&65535)<<16)&4294967295)<<13|me>>>19))+((5*(me>>>16)&65535)<<16)&4294967295))+((58964+(ge>>>16)&65535)<<16);switch(Oe=0,te){case 3:Oe^=(255&L.charCodeAt(Pe+2))<<16;case 2:Oe^=(255&L.charCodeAt(Pe+1))<<8;case 1:me^=Oe=(65535&(Oe=(Oe=(65535&(Oe^=255&L.charCodeAt(Pe)))*Ce+(((Oe>>>16)*Ce&65535)<<16)&4294967295)<<15|Oe>>>17))*Te+(((Oe>>>16)*Te&65535)<<16)&4294967295}return me^=L.length,me=2246822507*(65535&(me^=me>>>16))+((2246822507*(me>>>16)&65535)<<16)&4294967295,me=3266489909*(65535&(me^=me>>>13))+((3266489909*(me>>>16)&65535)<<16)&4294967295,(me^=me>>>16)>>>0}),Pn.exports),d=(cn||(cn=1,Rn.exports=function(L,Y){for(var te,ce=L.length,me=Y^ce,ge=0;ce>=4;)te=1540483477*(65535&(te=255&L.charCodeAt(ge)|(255&L.charCodeAt(++ge))<<8|(255&L.charCodeAt(++ge))<<16|(255&L.charCodeAt(++ge))<<24))+((1540483477*(te>>>16)&65535)<<16),me=1540483477*(65535&me)+((1540483477*(me>>>16)&65535)<<16)^(te=1540483477*(65535&(te^=te>>>24))+((1540483477*(te>>>16)&65535)<<16)),ce-=4,++ge;switch(ce){case 3:me^=(255&L.charCodeAt(ge+2))<<16;case 2:me^=(255&L.charCodeAt(ge+1))<<8;case 1:me=1540483477*(65535&(me^=255&L.charCodeAt(ge)))+((1540483477*(me>>>16)&65535)<<16)}return me=1540483477*(65535&(me^=me>>>13))+((1540483477*(me>>>16)&65535)<<16),(me^=me>>>15)>>>0}),Rn.exports);return ei.exports=R,ei.exports.murmur3=R,ei.exports.murmur2=d,ei.exports}(),Jn=n(In);class Ei{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(d,L,Y,te){this.ids.push(so(d)),this.positions.push(L,Y,te)}getPositions(d){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let L=so(d),Y=0,te=this.ids.length-1;for(;Y>1;this.ids[me]>=L?te=me:Y=me+1}let ce=[];for(;this.ids[Y]===L;)ce.push({index:this.positions[3*Y],start:this.positions[3*Y+1],end:this.positions[3*Y+2]}),Y++;return ce}static serialize(d,L){let Y=new Float64Array(d.ids),te=new Uint32Array(d.positions);return ti(Y,te,0,Y.length-1),L&&L.push(Y.buffer,te.buffer),{ids:Y,positions:te}}static deserialize(d){let L=new Ei;return L.ids=d.ids,L.positions=d.positions,L.indexed=!0,L}}function so(R){let d=+R;return!isNaN(d)&&d<=Number.MAX_SAFE_INTEGER?d:Jn(String(R))}function ti(R,d,L,Y){for(;L>1],ce=L-1,me=Y+1;for(;;){do ce++;while(R[ce]te);if(ce>=me)break;bi(R,ce,me),bi(d,3*ce,3*me),bi(d,3*ce+1,3*me+1),bi(d,3*ce+2,3*me+2)}me-L`u_${te}`),this.type=Y}setUniform(d,L,Y){d.set(Y.constantOr(this.value))}getBinding(d,L,Y){return this.type==="color"?new zs(d,L):new ro(d,L)}}class Zo{constructor(d,L){this.uniformNames=L.map(Y=>`u_${Y}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(d,L){this.pixelRatioFrom=L.pixelRatio,this.pixelRatioTo=d.pixelRatio,this.patternFrom=L.tlbr,this.patternTo=d.tlbr}setConstantDashPositions(d,L){this.dashTo=[0,d.y,d.height,d.width],this.dashFrom=[0,L.y,L.height,L.width]}setUniform(d,L,Y,te){let ce=null;te==="u_pattern_to"?ce=this.patternTo:te==="u_pattern_from"?ce=this.patternFrom:te==="u_dasharray_to"?ce=this.dashTo:te==="u_dasharray_from"?ce=this.dashFrom:te==="u_pixel_ratio_to"?ce=this.pixelRatioTo:te==="u_pixel_ratio_from"&&(ce=this.pixelRatioFrom),ce!==null&&d.set(ce)}getBinding(d,L,Y){return Y.startsWith("u_pattern")||Y.startsWith("u_dasharray_")?new Mo(d,L):new ro(d,L)}}class es{constructor(d,L,Y,te){this.expression=d,this.type=Y,this.maxValue=0,this.paintVertexAttributes=L.map(ce=>({name:`a_${ce}`,type:"Float32",components:Y==="color"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(d,L,Y){let te=this.paintVertexArray.length,ce=this.expression.evaluate(new oi(0,Y),L,{},Y.canonical,[],Y.formattedSection);this.paintVertexArray.resize(d),this._setPaintValue(te,d,ce)}updatePaintArray(d,L,Y,te,ce){let me=this.expression.evaluate(new oi(0,ce),Y,te);this._setPaintValue(d,L,me)}_setPaintValue(d,L,Y){if(this.type==="color"){let te=So(Y);for(let ce=d;ce`u_${ge}_t`),this.type=Y,this.useIntegerZoom=te,this.zoom=ce,this.maxValue=0,this.paintVertexAttributes=L.map(ge=>({name:`a_${ge}`,type:"Float32",components:Y==="color"?4:2,offset:0})),this.paintVertexArray=new me}populatePaintArray(d,L,Y){let te=this.expression.evaluate(new oi(this.zoom,Y),L,{},Y.canonical,[],Y.formattedSection),ce=this.expression.evaluate(new oi(this.zoom+1,Y),L,{},Y.canonical,[],Y.formattedSection),me=this.paintVertexArray.length;this.paintVertexArray.resize(d),this._setPaintValue(me,d,te,ce)}updatePaintArray(d,L,Y,te,ce){let me=this.expression.evaluate(new oi(this.zoom,ce),Y,te),ge=this.expression.evaluate(new oi(this.zoom+1,ce),Y,te);this._setPaintValue(d,L,me,ge)}_setPaintValue(d,L,Y,te){if(this.type==="color"){let ce=So(Y),me=So(te);for(let ge=d;ge`#define HAS_UNIFORM_${te}`))}return d}getBinderAttributes(){let d=[];for(let L in this.binders){let Y=this.binders[L];if(Y instanceof es||Y instanceof $o)for(let te of Y.paintVertexAttributes)d.push(te.name);else if(Y instanceof _s){let te=Y.getVertexAttributes();for(let ce of te)d.push(ce.name)}}return d}getBinderUniforms(){let d=[];for(let L in this.binders){let Y=this.binders[L];if(Y instanceof Ws||Y instanceof Zo||Y instanceof $o)for(let te of Y.uniformNames)d.push(te)}return d}getPaintVertexBuffers(){return this._buffers}getUniforms(d,L){let Y=[];for(let te in this.binders){let ce=this.binders[te];if(ce instanceof Ws||ce instanceof Zo||ce instanceof $o){for(let me of ce.uniformNames)if(L[me]){let ge=ce.getBinding(d,L[me],me);Y.push({name:me,property:te,binding:ge})}}}return Y}setUniforms(d,L,Y,te){for(let{name:ce,property:me,binding:ge}of L)this.binders[me].setUniform(ge,te,Y.get(me),ce)}updatePaintBuffers(d){this._buffers=[];for(let L in this.binders){let Y=this.binders[L];if(d&&Y instanceof _s){let te=d.fromScale===2?Y.zoomInPaintVertexBuffer:Y.zoomOutPaintVertexBuffer;te&&this._buffers.push(te)}else(Y instanceof es||Y instanceof $o)&&Y.paintVertexBuffer&&this._buffers.push(Y.paintVertexBuffer)}}upload(d){for(let L in this.binders){let Y=this.binders[L];(Y instanceof es||Y instanceof $o||Y instanceof _s)&&Y.upload(d)}this.updatePaintBuffers()}destroy(){for(let d in this.binders){let L=this.binders[d];(L instanceof es||L instanceof $o||L instanceof _s)&&L.destroy()}}}class mo{constructor(d,L,Y=()=>!0){this.programConfigurations={};for(let te of d)this.programConfigurations[te.id]=new Ll(te,L,Y);this.needsUpload=!1,this._featureMap=new Ei,this._bufferOffset=0}populatePaintArrays(d,L,Y,te){for(let ce in this.programConfigurations)this.programConfigurations[ce].populatePaintArrays(d,L,te);L.id!==void 0&&this._featureMap.add(L.id,Y,this._bufferOffset,d),this._bufferOffset=d,this.needsUpload=!0}updatePaintArrays(d,L,Y,te){for(let ce of Y)this.needsUpload=this.programConfigurations[ce.id].updatePaintArrays(d,this._featureMap,L,ce,te)||this.needsUpload}get(d){return this.programConfigurations[d]}upload(d){if(this.needsUpload){for(let L in this.programConfigurations)this.programConfigurations[L].upload(d);this.needsUpload=!1}}destroy(){for(let d in this.programConfigurations)this.programConfigurations[d].destroy()}}function ru(R,d){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[R]||[R.replace(`${d}-`,"").replace(/-/g,"_")]}function Rs(R,d,L){let Y={color:{source:Vr,composite:N},number:{source:xi,composite:Vr}},te=function(ce){return{"line-pattern":{source:vr,composite:vr},"fill-pattern":{source:vr,composite:vr},"fill-extrusion-pattern":{source:vr,composite:vr},"line-dasharray":{source:Or,composite:Or}}[ce]}(R);return te?.[L]||Y[d][L]}fi("ConstantBinder",Ws),fi("CrossFadedConstantBinder",Zo),fi("SourceExpressionBinder",es),fi("CrossFadedPatternBinder",Go),fi("CrossFadedDasharrayBinder",Ys),fi("CompositeExpressionBinder",$o),fi("ProgramConfiguration",Ll,{omit:["_buffers"]}),fi("ProgramConfigurationSet",mo);let Yu=Math.pow(2,14)-1,Ul=-Yu-1;function ql(R){let d=F/R.extent,L=R.loadGeometry();for(let Y of L)for(let te of Y){let ce=Math.round(te.x*d),me=Math.round(te.y*d);te.x=se(ce,Ul,Yu),te.y=se(me,Ul,Yu),(cete.x+1||mete.y+1)&&ee("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return L}function fo(R,d){return{type:R.type,id:R.id,properties:R.properties,geometry:d?ql(R):[]}}let Xo=-32768;function Os(R,d,L,Y,te){R.emplaceBack(Xo+8*d+Y,Xo+8*L+te)}class ra{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new Ut,this.indexArray=new ua,this.segments=new Fa,this.programConfigurations=new mo(d.layers,d.zoom),this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,Y){let te=this.layers[0],ce=[],me=null,ge=!1,Ce=te.type==="heatmap";if(te.type==="circle"){let Oe=te;me=Oe.layout.get("circle-sort-key"),ge=!me.isConstant(),Ce||(Ce=Oe.paint.get("circle-pitch-alignment")==="map")}let Te=Ce?L.subdivisionGranularity.circle:1;for(let{feature:Oe,id:Pe,index:it,sourceLayerIndex:He}of d){let bt=this.layers[0]._featureFilter.needGeometry,Et=fo(Oe,bt);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),Et,Y))continue;let Qt=ge?me.evaluate(Et,{},Y):void 0,er={id:Pe,properties:Oe.properties,type:Oe.type,sourceLayerIndex:He,index:it,geometry:bt?Et.geometry:ql(Oe),patterns:{},sortKey:Qt};ce.push(er)}ge&&ce.sort((Oe,Pe)=>Oe.sortKey-Pe.sortKey);for(let Oe of ce){let{geometry:Pe,index:it,sourceLayerIndex:He}=Oe,bt=d[it].feature;this.addFeature(Oe,Pe,it,Y,Te),L.featureIndex.insert(bt,Pe,it,He,this.index)}}update(d,L,Y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:Y})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,da),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(d,L,Y,te,ce=1){let me;switch(ce){case 1:me=[0,7];break;case 3:me=[0,2,5,7];break;case 5:me=[0,1,3,4,6,7];break;case 7:me=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${ce}; valid values are 1, 3, 5, 7.`)}let ge=me.length;for(let Ce of L)for(let Te of Ce){let Oe=Te.x,Pe=Te.y;if(Oe<0||Oe>=F||Pe<0||Pe>=F)continue;let it=this.segments.prepareSegment(ge*ge,this.layoutVertexArray,this.indexArray,d.sortKey),He=it.vertexLength;for(let bt=0;bt1){if(Is(R,d))return!0;for(let Y of d)if(Wr(Y,R,L))return!0}for(let Y of R)if(Wr(Y,d,L))return!0;return!1}function Is(R,d){if(R.length===0||d.length===0)return!1;for(let L=0;L1?L:L.sub(d)._mult(te)._add(d))}function pa(R,d){let L,Y,te,ce=!1;for(let me of R){L=me;for(let ge=0,Ce=L.length-1;ged.y!=te.y>d.y&&d.x<(te.x-Y.x)*(d.y-Y.y)/(te.y-Y.y)+Y.x&&(ce=!ce)}return ce}function Wa(R,d){let L=!1;for(let Y=0,te=R.length-1;Yd.y!=me.y>d.y&&d.x<(me.x-ce.x)*(d.y-ce.y)/(me.y-ce.y)+ce.x&&(L=!L)}return L}function ln(R,d,L){let Y=L[0],te=L[2];if(R.xte.x&&d.x>te.x||R.yte.y&&d.y>te.y)return!1;let ce=ae(R,d,L[0]);return ce!==ae(R,d,L[1])||ce!==ae(R,d,L[2])||ce!==ae(R,d,L[3])}function Le(R,d,L){let Y=d.paint.get(R).value;return Y.kind==="constant"?Y.value:L.programConfigurations.get(d.id).getMaxValue(R)}function Ue(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function Qe(R,d,L,Y,te){if(!d[0]&&!d[1])return R;let ce=t.convert(d)._mult(te);L==="viewport"&&ce._rotate(-Y);let me=[];for(let ge of R)me.push(ge.sub(ce));return me}function _t(R){let d=[];for(let L=0;LQa(sr,Qt,er,br))}(Te,ce,ge,Ce),bt=Oe),va({queryGeometry:He,size:bt,transform:ce,unwrappedTileID:ge,getElevation:Ce,pitchAlignment:it,pitchScale:Pe},te)}}class _n extends ra{}let Mn;fi("HeatmapBucket",_n,{omit:["layers"]});var Bn={get paint(){return Mn=Mn||new Ps({"heatmap-radius":new wi(ht.paint_heatmap["heatmap-radius"]),"heatmap-weight":new wi(ht.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new hi(ht.paint_heatmap["heatmap-intensity"]),"heatmap-color":new tu(ht.paint_heatmap["heatmap-color"]),"heatmap-opacity":new hi(ht.paint_heatmap["heatmap-opacity"])})}};function Zn(R,{width:d,height:L},Y,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==d*L*Y)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${d*L*Y}`)}else te=new Uint8Array(d*L*Y);return R.width=d,R.height=L,R.data=te,R}function Ci(R,{width:d,height:L},Y){if(d===R.width&&L===R.height)return;let te=Zn({},{width:d,height:L},Y);qo(R,te,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,d),height:Math.min(R.height,L)},Y),R.width=d,R.height=L,R.data=te.data}function qo(R,d,L,Y,te,ce){if(te.width===0||te.height===0)return d;if(te.width>R.width||te.height>R.height||L.x>R.width-te.width||L.y>R.height-te.height)throw new RangeError("out of range source coordinates for image copy");if(te.width>d.width||te.height>d.height||Y.x>d.width-te.width||Y.y>d.height-te.height)throw new RangeError("out of range destination coordinates for image copy");let me=R.data,ge=d.data;if(me===ge)throw new Error("srcData equals dstData, so image is already copied");for(let Ce=0;Ce{d[R.evaluationKey]=Ce;let Te=R.expression.evaluate(d);te.setPixel(me/4/L,ge/4,Te)};if(R.clips)for(let me=0,ge=0;methis.max&&(this.max=Pe),Pe=this.dim+1||L<-1||L>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${d}, y: ${L}, dim: ${this.dim}`);return(L+1)*this.stride+(d+1)}unpack(d,L,Y){return d*this.redFactor+L*this.greenFactor+Y*this.blueFactor-this.baseShift}pack(d){return gp(d,this.getUnpackVector())}getPixels(){return new ls({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(d,L,Y){if(this.dim!==d.dim)throw new Error("dem dimension mismatch");let te=L*this.dim,ce=L*this.dim+this.dim,me=Y*this.dim,ge=Y*this.dim+this.dim;switch(L){case-1:te=ce-1;break;case 1:ce=te+1}switch(Y){case-1:me=ge-1;break;case 1:ge=me+1}let Ce=-L*this.dim,Te=-Y*this.dim;for(let Oe=me;Oe0)for(let me=d;me=d;me-=Y)ce=m4(me/Y|0,R[me],R[me+1],ce);return ce&&g0(ce,ce.next)&&(A1(ce),ce=ce.next),ce}function Hd(R,d){if(!R)return R;d||(d=R);let L,Y=R;do if(L=!1,Y.steiner||!g0(Y,Y.next)&&Xu(Y.prev,Y,Y.next)!==0)Y=Y.next;else{if(A1(Y),Y=d=Y.prev,Y===Y.next)break;L=!0}while(L||Y!==d);return d}function _p(R,d,L,Y,te,ce,me){if(!R)return;!me&&ce&&function(Ce,Te,Oe,Pe){let it=Ce;do it.z===0&&(it.z=t3(it.x,it.y,Te,Oe,Pe)),it.prevZ=it.prev,it.nextZ=it.next,it=it.next;while(it!==Ce);it.prevZ.nextZ=null,it.prevZ=null,function(He){let bt,Et=1;do{let Qt,er=He;He=null;let br=null;for(bt=0;er;){bt++;let sr=er,Mr=0;for(let $r=0;$r0||qr>0&&sr;)Mr!==0&&(qr===0||!sr||er.z<=sr.z)?(Qt=er,er=er.nextZ,Mr--):(Qt=sr,sr=sr.nextZ,qr--),br?br.nextZ=Qt:He=Qt,Qt.prevZ=br,br=Qt;er=sr}br.nextZ=null,Et*=2}while(bt>1)}(it)}(R,Y,te,ce);let ge=R;for(;R.prev!==R.next;){let Ce=R.prev,Te=R.next;if(ce?GH(R,Y,te,ce):b1(R))d.push(Ce.i,R.i,Te.i),A1(R),R=Te.next,ge=Te.next;else if((R=Te)===ge){me?me===1?_p(R=HH(Hd(R),d),d,L,Y,te,ce,2):me===2&&WH(R,d,L,Y,te,ce):_p(Hd(R),d,L,Y,te,ce,1);break}}}function b1(R){let d=R.prev,L=R,Y=R.next;if(Xu(d,L,Y)>=0)return!1;let te=d.x,ce=L.x,me=Y.x,ge=d.y,Ce=L.y,Te=Y.y,Oe=Math.min(te,ce,me),Pe=Math.min(ge,Ce,Te),it=Math.max(te,ce,me),He=Math.max(ge,Ce,Te),bt=Y.next;for(;bt!==d;){if(bt.x>=Oe&&bt.x<=it&&bt.y>=Pe&&bt.y<=He&&w1(te,ge,ce,Ce,me,Te,bt.x,bt.y)&&Xu(bt.prev,bt,bt.next)>=0)return!1;bt=bt.next}return!0}function GH(R,d,L,Y){let te=R.prev,ce=R,me=R.next;if(Xu(te,ce,me)>=0)return!1;let ge=te.x,Ce=ce.x,Te=me.x,Oe=te.y,Pe=ce.y,it=me.y,He=Math.min(ge,Ce,Te),bt=Math.min(Oe,Pe,it),Et=Math.max(ge,Ce,Te),Qt=Math.max(Oe,Pe,it),er=t3(He,bt,d,L,Y),br=t3(Et,Qt,d,L,Y),sr=R.prevZ,Mr=R.nextZ;for(;sr&&sr.z>=er&&Mr&&Mr.z<=br;){if(sr.x>=He&&sr.x<=Et&&sr.y>=bt&&sr.y<=Qt&&sr!==te&&sr!==me&&w1(ge,Oe,Ce,Pe,Te,it,sr.x,sr.y)&&Xu(sr.prev,sr,sr.next)>=0||(sr=sr.prevZ,Mr.x>=He&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=Qt&&Mr!==te&&Mr!==me&&w1(ge,Oe,Ce,Pe,Te,it,Mr.x,Mr.y)&&Xu(Mr.prev,Mr,Mr.next)>=0))return!1;Mr=Mr.nextZ}for(;sr&&sr.z>=er;){if(sr.x>=He&&sr.x<=Et&&sr.y>=bt&&sr.y<=Qt&&sr!==te&&sr!==me&&w1(ge,Oe,Ce,Pe,Te,it,sr.x,sr.y)&&Xu(sr.prev,sr,sr.next)>=0)return!1;sr=sr.prevZ}for(;Mr&&Mr.z<=br;){if(Mr.x>=He&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=Qt&&Mr!==te&&Mr!==me&&w1(ge,Oe,Ce,Pe,Te,it,Mr.x,Mr.y)&&Xu(Mr.prev,Mr,Mr.next)>=0)return!1;Mr=Mr.nextZ}return!0}function HH(R,d){let L=R;do{let Y=L.prev,te=L.next.next;!g0(Y,te)&&p4(Y,L,L.next,te)&&T1(Y,te)&&T1(te,Y)&&(d.push(Y.i,L.i,te.i),A1(L),A1(L.next),L=R=te),L=L.next}while(L!==R);return Hd(L)}function WH(R,d,L,Y,te,ce){let me=R;do{let ge=me.next.next;for(;ge!==me.prev;){if(me.i!==ge.i&&KH(me,ge)){let Ce=v4(me,ge);return me=Hd(me,me.next),Ce=Hd(Ce,Ce.next),_p(me,d,L,Y,te,ce,0),void _p(Ce,d,L,Y,te,ce,0)}ge=ge.next}me=me.next}while(me!==R)}function YH(R,d){let L=R.x-d.x;return L===0&&(L=R.y-d.y,L===0)&&(L=(R.next.y-R.y)/(R.next.x-R.x)-(d.next.y-d.y)/(d.next.x-d.x)),L}function XH(R,d){let L=function(te,ce){let me=ce,ge=te.x,Ce=te.y,Te,Oe=-1/0;if(g0(te,me))return me;do{if(g0(te,me.next))return me.next;if(Ce<=me.y&&Ce>=me.next.y&&me.next.y!==me.y){let Et=me.x+(Ce-me.y)*(me.next.x-me.x)/(me.next.y-me.y);if(Et<=ge&&Et>Oe&&(Oe=Et,Te=me.x=me.x&&me.x>=it&&ge!==me.x&&d4(CeTe.x||me.x===Te.x&&ZH(Te,me)))&&(Te=me,bt=Et)}me=me.next}while(me!==Pe);return Te}(R,d);if(!L)return d;let Y=v4(L,R);return Hd(Y,Y.next),Hd(L,L.next)}function ZH(R,d){return Xu(R.prev,R,d.prev)<0&&Xu(d.next,R,R.next)<0}function t3(R,d,L,Y,te){return(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-L)*te|0)|R<<8))|R<<4))|R<<2))|R<<1))|(d=1431655765&((d=858993459&((d=252645135&((d=16711935&((d=(d-Y)*te|0)|d<<8))|d<<4))|d<<2))|d<<1))<<1}function $H(R){let d=R,L=R;do(d.x=(R-me)*(ce-ge)&&(R-me)*(Y-ge)>=(L-me)*(d-ge)&&(L-me)*(ce-ge)>=(te-me)*(Y-ge)}function w1(R,d,L,Y,te,ce,me,ge){return!(R===me&&d===ge)&&d4(R,d,L,Y,te,ce,me,ge)}function KH(R,d){return R.next.i!==d.i&&R.prev.i!==d.i&&!function(L,Y){let te=L;do{if(te.i!==L.i&&te.next.i!==L.i&&te.i!==Y.i&&te.next.i!==Y.i&&p4(te,te.next,L,Y))return!0;te=te.next}while(te!==L);return!1}(R,d)&&(T1(R,d)&&T1(d,R)&&function(L,Y){let te=L,ce=!1,me=(L.x+Y.x)/2,ge=(L.y+Y.y)/2;do te.y>ge!=te.next.y>ge&&te.next.y!==te.y&&me<(te.next.x-te.x)*(ge-te.y)/(te.next.y-te.y)+te.x&&(ce=!ce),te=te.next;while(te!==L);return ce}(R,d)&&(Xu(R.prev,R,d.prev)||Xu(R,d.prev,d))||g0(R,d)&&Xu(R.prev,R,R.next)>0&&Xu(d.prev,d,d.next)>0)}function Xu(R,d,L){return(d.y-R.y)*(L.x-d.x)-(d.x-R.x)*(L.y-d.y)}function g0(R,d){return R.x===d.x&&R.y===d.y}function p4(R,d,L,Y){let te=fy(Xu(R,d,L)),ce=fy(Xu(R,d,Y)),me=fy(Xu(L,Y,R)),ge=fy(Xu(L,Y,d));return te!==ce&&me!==ge||!(te!==0||!cy(R,L,d))||!(ce!==0||!cy(R,Y,d))||!(me!==0||!cy(L,R,Y))||!(ge!==0||!cy(L,d,Y))}function cy(R,d,L){return d.x<=Math.max(R.x,L.x)&&d.x>=Math.min(R.x,L.x)&&d.y<=Math.max(R.y,L.y)&&d.y>=Math.min(R.y,L.y)}function fy(R){return R>0?1:R<0?-1:0}function T1(R,d){return Xu(R.prev,R,R.next)<0?Xu(R,d,R.next)>=0&&Xu(R,R.prev,d)>=0:Xu(R,d,R.prev)<0||Xu(R,R.next,d)<0}function v4(R,d){let L=r3(R.i,R.x,R.y),Y=r3(d.i,d.x,d.y),te=R.next,ce=d.prev;return R.next=d,d.prev=R,L.next=te,te.prev=L,Y.next=L,L.prev=Y,ce.next=Y,Y.prev=ce,Y}function m4(R,d,L,Y){let te=r3(R,d,L);return Y?(te.next=Y.next,te.prev=Y,Y.next.prev=te,Y.next=te):(te.prev=te,te.next=te),te}function A1(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function r3(R,d,L){return{i:R,x:d,y:L,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class y0{constructor(d,L){if(L>d)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=d,this._minGranularity=L}getGranularityForZoomLevel(d){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||L>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let Y=0|Math.round(d),te=0|Math.round(L),ce=this._getKey(Y,te);if(this._vertexDictionary.has(ce))return this._vertexDictionary.get(ce);let me=this._vertexBuffer.length/2;return this._vertexDictionary.set(ce,me),this._vertexBuffer.push(Y,te),me}_subdivideTrianglesScanline(d){if(this._granularity<2)return function(te,ce){let me=[];for(let ge=0;ge0?(me.push(Ce),me.push(Oe),me.push(Te)):(me.push(Ce),me.push(Te),me.push(Oe))}return me}(this._vertexBuffer,d);let L=[],Y=d.length;for(let te=0;te=1||qr<=0)||er&&(Tece)){Pe>=te&&Pe<=ce&&me.push(Y[(ge+1)%3]);continue}!er&&Mr>0&&me.push(this._vertexToIndex(Ce+bt*Mr,Te+Et*Mr));let $r=Ce+bt*Math.max(Mr,0),_a=Ce+bt*Math.min(qr,1);Qt||this._generateIntraEdgeVertices(me,Ce,Te,Oe,Pe,$r,_a),!er&&qr<1&&me.push(this._vertexToIndex(Ce+bt*qr,Te+Et*qr)),(er||Pe>=te&&Pe<=ce)&&me.push(Y[(ge+1)%3]),!er&&(Pe<=te||Pe>=ce)&&this._generateInterEdgeVertices(me,Ce,Te,Oe,Pe,it,He,_a,te,ce)}return me}_generateIntraEdgeVertices(d,L,Y,te,ce,me,ge){let Ce=te-L,Te=ce-Y,Oe=Te===0,Pe=Oe?Math.min(L,te):Math.min(me,ge),it=Oe?Math.max(L,te):Math.max(me,ge),He=Math.floor(Pe/this._granularityCellSize)+1,bt=Math.ceil(it/this._granularityCellSize)-1;if(Oe?L=He;Et--){let Qt=Et*this._granularityCellSize;d.push(this._vertexToIndex(Qt,Y+Te*(Qt-L)/Ce))}}_generateInterEdgeVertices(d,L,Y,te,ce,me,ge,Ce,Te,Oe){let Pe=ce-Y,it=me-te,He=ge-ce,bt=(Te-ce)/He,Et=(Oe-ce)/He,Qt=Math.min(bt,Et),er=Math.max(bt,Et),br=te+it*Qt,sr=Math.floor(Math.min(br,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(br,Ce)/this._granularityCellSize)-1,qr=Ce=1||er<=0){let Ca=Y-ge,nn=me+(L-me)*Math.min((Te-ge)/Ca,(Oe-ge)/Ca);sr=Math.floor(Math.min(nn,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(nn,Ce)/this._granularityCellSize)-1,qr=Ce0?Oe:Te;if(qr)for(let Ca=sr;Ca<=Mr;Ca++)d.push(this._vertexToIndex(Ca*this._granularityCellSize,_a));else for(let Ca=Mr;Ca>=sr;Ca--)d.push(this._vertexToIndex(Ca*this._granularityCellSize,_a))}_generateOutline(d){let L=[];for(let Y of d){let te=Sv(Y,this._granularity,!0),ce=this._pointArrayToIndices(te),me=[];for(let ge=1;gece!=(me===_0)?(d.push(L),d.push(Y),d.push(this._vertexToIndex(te,me)),d.push(Y),d.push(this._vertexToIndex(ce,me)),d.push(this._vertexToIndex(te,me))):(d.push(Y),d.push(L),d.push(this._vertexToIndex(te,me)),d.push(this._vertexToIndex(ce,me)),d.push(Y),d.push(this._vertexToIndex(te,me)))}_fillPoles(d,L,Y){let te=this._vertexBuffer,ce=F,me=d.length;for(let ge=2;ge80*Pe){Qt=Te[0],er=Te[1];let sr=Qt,Mr=er;for(let qr=Pe;qrsr&&(sr=$r),_a>Mr&&(Mr=_a)}br=Math.max(sr-Qt,Mr-er),br=br!==0?32767/br:0}return _p(bt,Et,Pe,Qt,er,br,0),Et}(Y,te),Ce=this._convertIndices(Y,ge);ce=this._subdivideTrianglesScanline(Ce)}catch(ge){console.error(ge)}let me=[];return L&&(me=this._generateOutline(d)),this._ensureNoPoleVertices(),this._handlePoles(ce),{verticesFlattened:this._vertexBuffer,indicesTriangles:ce,indicesLineList:me}}_convertIndices(d,L){let Y=[];for(let te of L)Y.push(this._vertexToIndex(d[2*te],d[2*te+1]));return Y}_pointArrayToIndices(d){let L=[];for(let Y of d)L.push(this._vertexToIndex(Y.x,Y.y));return L}}function g4(R,d,L,Y=!0){return new JH(L,d).subdividePolygonInternal(R,Y)}function Sv(R,d,L=!1){if(!R||R.length<1)return[];if(R.length<2)return[];let Y=R[0],te=R[R.length-1],ce=L&&(Y.x!==te.x||Y.y!==te.y);if(d<2)return ce?[...R,R[0]]:[...R];let me=Math.floor(F/d),ge=[];ge.push(new t(R[0].x,R[0].y));let Ce=R.length,Te=ce?Ce:Ce-1;for(let Oe=0;Oe0?(Math.floor(_a/me)+1)*me:(Math.ceil(_a/me)-1)*me,bn=Mr>0?(Math.floor(Ca/me)+1)*me:(Math.ceil(Ca/me)-1)*me,Fn=Math.abs(_a-qa),gn=Math.abs(Ca-bn),Va=Math.abs(_a-Et),Hn=Math.abs(Ca-Qt),ni=er?Fn/qr:Number.POSITIVE_INFINITY,Wn=br?gn/$r:Number.POSITIVE_INFINITY;if((Va<=Fn||!er)&&(Hn<=gn||!br))break;if(ni=0?me-1:ce-1,Te=(ge+1)%ce,Oe=R[2*d[Ce]],Pe=R[2*d[Te]],it=R[2*d[me]],He=R[2*d[me]+1],bt=R[2*d[ge]+1],Et=!1;if(OePe)Et=!1;else{let Qt=bt-He,er=-(R[2*d[ge]]-it),br=He((Pe-it)*Qt+(R[2*d[Te]+1]-He)*er)*br&&(Et=!0)}if(Et){let Qt=d[Ce],er=d[me],br=d[ge];Qt!==er&&Qt!==br&&er!==br&&L.push(br,er,Qt),me--,me<0&&(me=ce-1)}else{let Qt=d[Te],er=d[me],br=d[ge];Qt!==er&&Qt!==br&&er!==br&&L.push(br,er,Qt),ge++,ge>=ce&&(ge=0)}if(Ce===Te)break}}function y4(R,d,L,Y,te,ce,me,ge,Ce){let Te=te.length/2,Oe=me&&ge&&Ce;if(TeFa.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(it,He),sr=br.count,qa=!0,bn=!0,Fn=!0,qr=0);let gn=S1(er,bt,Qt,br,_a,qa,Mr),Va=S1(er,bt,Qt,br,Ca,bn,Mr),Hn=S1(er,bt,Qt,br,nn,Fn,Mr);He.emplaceBack(qr+gn-sr,qr+Va-sr,qr+Hn-sr),Mr.primitiveLength++}})(d,L,Y,te,ce,R),Oe&&function(Pe,it,He,bt,Et,Qt){let er=[];for(let $r=0;$rFa.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(it,He),sr=br.count,qa=!0,bn=!0,qr=0);let Fn=S1(er,bt,Qt,br,Ca,qa,Mr),gn=S1(er,bt,Qt,br,nn,bn,Mr);He.emplaceBack(qr+Fn-sr,qr+gn-sr),Mr.primitiveLength++}}(me,L,ge,te,Ce,R),d.forceNewSegmentOnNextPrepare(),me?.forceNewSegmentOnNextPrepare()}function S1(R,d,L,Y,te,ce,me){if(ce){let ge=Y.count;return L(d[2*te],d[2*te+1]),R[te]=Y.count,Y.count++,me.vertexLength++,ge}return R[te]}class a3{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new ir,this.indexArray=new ua,this.indexArray2=new ia,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.segments2=new Fa,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,Y){this.hasDependencies=Md("fill",this.layers,L);let te=this.layers[0].layout.get("fill-sort-key"),ce=!te.isConstant(),me=[];for(let{feature:ge,id:Ce,index:Te,sourceLayerIndex:Oe}of d){let Pe=this.layers[0]._featureFilter.needGeometry,it=fo(ge,Pe);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),it,Y))continue;let He=ce?te.evaluate(it,{},Y,L.availableImages):void 0,bt={id:Ce,properties:ge.properties,type:ge.type,sourceLayerIndex:Oe,index:Te,geometry:Pe?it.geometry:ql(ge),patterns:{},sortKey:He};me.push(bt)}ce&&me.sort((ge,Ce)=>ge.sortKey-Ce.sortKey);for(let ge of me){let{geometry:Ce,index:Te,sourceLayerIndex:Oe}=ge;if(this.hasDependencies){let Pe=v0("fill",this.layers,ge,{zoom:this.zoom},L);this.patternFeatures.push(Pe)}else this.addFeature(ge,Ce,Te,Y,{},L.subdivisionGranularity);L.featureIndex.insert(d[Te].feature,Ce,Te,Oe,this.index)}}update(d,L,Y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:Y})}addFeatures(d,L,Y){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,L,Y,d.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,p0),this.indexBuffer=d.createIndexBuffer(this.indexArray),this.indexBuffer2=d.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(d,L,Y,te,ce,me){for(let ge of Yc(L,500)){let Ce=g4(ge,te,me.fill.getGranularityForZoomLevel(te.z)),Te=this.layoutVertexArray;y4((Oe,Pe)=>{Te.emplaceBack(Oe,Pe)},this.segments,this.layoutVertexArray,this.indexArray,Ce.verticesFlattened,Ce.indicesTriangles,this.segments2,this.indexArray2,Ce.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,Y,{imagePositions:ce,canonical:te})}}let _4,x4;fi("FillBucket",a3,{omit:["layers","patternFeatures"]});var eW={get paint(){return x4=x4||new Ps({"fill-antialias":new hi(ht.paint_fill["fill-antialias"]),"fill-opacity":new wi(ht.paint_fill["fill-opacity"]),"fill-color":new wi(ht.paint_fill["fill-color"]),"fill-outline-color":new wi(ht.paint_fill["fill-outline-color"]),"fill-translate":new hi(ht.paint_fill["fill-translate"]),"fill-translate-anchor":new hi(ht.paint_fill["fill-translate-anchor"]),"fill-pattern":new sl(ht.paint_fill["fill-pattern"])})},get layout(){return _4=_4||new Ps({"fill-sort-key":new wi(ht.layout_fill["fill-sort-key"])})}};class tW extends ll{constructor(d,L){super(d,eW,L)}recalculate(d,L){super.recalculate(d,L);let Y=this.paint._values["fill-outline-color"];Y.value.kind==="constant"&&Y.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(d){return new a3(d)}queryRadius(){return Ue(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:d,geometry:L,transform:Y,pixelsToTileUnits:te}){return Bi(Qe(d,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-Y.bearingInRadians,te),L)}isTileClipped(){return!0}}let rW=ct([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),aW=ct([{name:"a_centroid",components:2,type:"Int16"}],4),{members:nW}=rW;class E1{constructor(d,L,Y,te,ce){this.properties={},this.extent=Y,this.type=0,this.id=void 0,this._pbf=d,this._geometry=-1,this._keys=te,this._values=ce,d.readFields(iW,this,L)}loadGeometry(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,Y=[],te,ce=1,me=0,ge=0,Ce=0;for(;d.pos>3}if(me--,ce===1||ce===2)ge+=d.readSVarint(),Ce+=d.readSVarint(),ce===1&&(te&&Y.push(te),te=[]),te&&te.push(new t(ge,Ce));else{if(ce!==7)throw new Error(`unknown command ${ce}`);te&&te.push(te[0].clone())}}return te&&Y.push(te),Y}bbox(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,Y=1,te=0,ce=0,me=0,ge=1/0,Ce=-1/0,Te=1/0,Oe=-1/0;for(;d.pos>3}if(te--,Y===1||Y===2)ce+=d.readSVarint(),me+=d.readSVarint(),ceCe&&(Ce=ce),meOe&&(Oe=me);else if(Y!==7)throw new Error(`unknown command ${Y}`)}return[ge,Te,Ce,Oe]}toGeoJSON(d,L,Y){let te=this.extent*Math.pow(2,Y),ce=this.extent*d,me=this.extent*L,ge=this.loadGeometry();function Ce(it){return[360*(it.x+ce)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(it.y+me)/te)*Math.PI))-90]}function Te(it){return it.map(Ce)}let Oe;if(this.type===1){let it=[];for(let bt of ge)it.push(bt[0]);let He=Te(it);Oe=it.length===1?{type:"Point",coordinates:He[0]}:{type:"MultiPoint",coordinates:He}}else if(this.type===2){let it=ge.map(Te);Oe=it.length===1?{type:"LineString",coordinates:it[0]}:{type:"MultiLineString",coordinates:it}}else{if(this.type!==3)throw new Error("unknown feature type");{let it=b4(ge),He=[];for(let bt of it)He.push(bt.map(Te));Oe=He.length===1?{type:"Polygon",coordinates:He[0]}:{type:"MultiPolygon",coordinates:He}}}let Pe={type:"Feature",geometry:Oe,properties:this.properties};return this.id!=null&&(Pe.id=this.id),Pe}}function iW(R,d,L){R===1?d.id=L.readVarint():R===2?function(Y,te){let ce=Y.readVarint()+Y.pos;for(;Y.pos=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[d];let L=this._pbf.readVarint()+this._pbf.pos;return new E1(this._pbf,L,this.extent,this._keys,this._values)}}function lW(R,d,L){R===15?d.version=L.readVarint():R===1?d.name=L.readString():R===5?d.extent=L.readVarint():R===2?d._features.push(L.pos):R===3?d._keys.push(L.readString()):R===4&&d._values.push(function(Y){let te=null,ce=Y.readVarint()+Y.pos;for(;Y.pos>3;te=me===1?Y.readString():me===2?Y.readFloat():me===3?Y.readDouble():me===4?Y.readVarint64():me===5?Y.readVarint():me===6?Y.readSVarint():me===7?Y.readBoolean():null}if(te==null)throw new Error("unknown feature value");return te}(L))}class w4{constructor(d,L){this.layers=d.readFields(uW,{},L)}}function uW(R,d,L){if(R===3){let Y=new sW(L,L.readVarint()+L.pos);Y.length&&(d[Y.name]=Y)}}let n3=Math.pow(2,13);function k1(R,d,L,Y,te,ce,me,ge){R.emplaceBack(d,L,2*Math.floor(Y*n3)+me,te*n3*2,ce*n3*2,Math.round(ge))}class i3{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new dr,this.centroidVertexArray=new It,this.indexArray=new ua,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,Y){this.features=[],this.hasDependencies=Md("fill-extrusion",this.layers,L);for(let{feature:te,id:ce,index:me,sourceLayerIndex:ge}of d){let Ce=this.layers[0]._featureFilter.needGeometry,Te=fo(te,Ce);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),Te,Y))continue;let Oe={id:ce,sourceLayerIndex:ge,index:me,geometry:Ce?Te.geometry:ql(te),properties:te.properties,type:te.type,patterns:{}};this.hasDependencies?this.features.push(v0("fill-extrusion",this.layers,Oe,{zoom:this.zoom},L)):this.addFeature(Oe,Oe.geometry,me,Y,{},L.subdivisionGranularity),L.featureIndex.insert(te,Oe.geometry,me,ge,this.index,!0)}}addFeatures(d,L,Y){for(let te of this.features){let{geometry:ce}=te;this.addFeature(te,ce,te.index,L,Y,d.subdivisionGranularity)}}update(d,L,Y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:Y})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,nW),this.centroidVertexBuffer=d.createVertexBuffer(this.centroidVertexArray,aW.members,!0),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(d,L,Y,te,ce,me){for(let ge of Yc(L,500)){let Ce={x:0,y:0,sampleCount:0},Te=this.layoutVertexArray.length;this.processPolygon(Ce,te,d,ge,me);let Oe=this.layoutVertexArray.length-Te,Pe=Math.floor(Ce.x/Ce.sampleCount),it=Math.floor(Ce.y/Ce.sampleCount);for(let He=0;He{k1(Oe,Pe,it,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,Te.verticesFlattened,Te.indicesTriangles)}_generateSideFaces(d,L){let Y=0;for(let te=1;teFa.MAX_VERTEX_ARRAY_LENGTH&&(L.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let ge=ce.sub(me)._perp()._unit(),Ce=me.dist(ce);Y+Ce>32768&&(Y=0),k1(this.layoutVertexArray,ce.x,ce.y,ge.x,ge.y,0,0,Y),k1(this.layoutVertexArray,ce.x,ce.y,ge.x,ge.y,0,1,Y),Y+=Ce,k1(this.layoutVertexArray,me.x,me.y,ge.x,ge.y,0,0,Y),k1(this.layoutVertexArray,me.x,me.y,ge.x,ge.y,0,1,Y);let Te=L.segment.vertexLength;this.indexArray.emplaceBack(Te,Te+2,Te+1),this.indexArray.emplaceBack(Te+1,Te+2,Te+3),L.segment.vertexLength+=4,L.segment.primitiveLength+=2}}}function cW(R,d){for(let L=0;LF)||R.y===d.y&&(R.y<0||R.y>F)}function T4(R){return R.every(d=>d.x<0)||R.every(d=>d.x>F)||R.every(d=>d.y<0)||R.every(d=>d.y>F)}let A4;fi("FillExtrusionBucket",i3,{omit:["layers","features"]});var hW={get paint(){return A4=A4||new Ps({"fill-extrusion-opacity":new hi(ht["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new wi(ht["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new hi(ht["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new hi(ht["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new sl(ht["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new wi(ht["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new wi(ht["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new hi(ht["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class dW extends ll{constructor(d,L){super(d,hW,L)}createBucket(d){return new i3(d)}queryRadius(){return Ue(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:Y,geometry:te,transform:ce,pixelsToTileUnits:me,pixelPosMatrix:ge}){let Ce=Qe(d,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-ce.bearingInRadians,me),Te=this.paint.get("fill-extrusion-height").evaluate(L,Y),Oe=this.paint.get("fill-extrusion-base").evaluate(L,Y),Pe=function(He,bt){let Et=[];for(let Qt of He){let er=[Qt.x,Qt.y,0,1];z(er,er,bt),Et.push(new t(er[0]/er[3],er[1]/er[3]))}return Et}(Ce,ge),it=function(He,bt,Et,Qt){let er=[],br=[],sr=Qt[8]*bt,Mr=Qt[9]*bt,qr=Qt[10]*bt,$r=Qt[11]*bt,_a=Qt[8]*Et,Ca=Qt[9]*Et,nn=Qt[10]*Et,qa=Qt[11]*Et;for(let bn of He){let Fn=[],gn=[];for(let Va of bn){let Hn=Va.x,ni=Va.y,Wn=Qt[0]*Hn+Qt[4]*ni+Qt[12],si=Qt[1]*Hn+Qt[5]*ni+Qt[13],po=Qt[2]*Hn+Qt[6]*ni+Qt[14],cs=Qt[3]*Hn+Qt[7]*ni+Qt[15],Ds=po+qr,Xs=cs+$r,Mf=Wn+_a,vu=si+Ca,yc=po+nn,Dc=cs+qa,Hl=new t((Wn+sr)/Xs,(si+Mr)/Xs);Hl.z=Ds/Xs,Fn.push(Hl);let rf=new t(Mf/Dc,vu/Dc);rf.z=yc/Dc,gn.push(rf)}er.push(Fn),br.push(gn)}return[er,br]}(te,Oe,Te,ge);return function(He,bt,Et){let Qt=1/0;Bi(Et,bt)&&(Qt=M4(Et,bt[0]));for(let er=0;er>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let ce=S4[15&Y];if(!ce)throw new Error("Unrecognized array type.");let[me]=new Uint16Array(d,2,1),[ge]=new Uint32Array(d,4,1);return new dy(ge,me,ce,d)}constructor(d,L=64,Y=Float64Array,te){if(isNaN(d)||d<0)throw new Error(`Unpexpected numItems value: ${d}.`);this.numItems=+d,this.nodeSize=Math.min(Math.max(+L,2),65535),this.ArrayType=Y,this.IndexArrayType=d<65536?Uint16Array:Uint32Array;let ce=S4.indexOf(this.ArrayType),me=2*d*this.ArrayType.BYTES_PER_ELEMENT,ge=d*this.IndexArrayType.BYTES_PER_ELEMENT,Ce=(8-ge%8)%8;if(ce<0)throw new Error(`Unexpected typed array class: ${Y}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+ge+Ce,2*d),this._pos=2*d,this._finished=!0):(this.data=new ArrayBuffer(8+me+ge+Ce),this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+ge+Ce,2*d),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+ce]),new Uint16Array(this.data,2,1)[0]=L,new Uint32Array(this.data,4,1)[0]=d)}add(d,L){let Y=this._pos>>1;return this.ids[Y]=Y,this.coords[this._pos++]=d,this.coords[this._pos++]=L,Y}finish(){let d=this._pos>>1;if(d!==this.numItems)throw new Error(`Added ${d} items when expected ${this.numItems}.`);return o3(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(d,L,Y,te){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ce,coords:me,nodeSize:ge}=this,Ce=[0,ce.length-1,0],Te=[];for(;Ce.length;){let Oe=Ce.pop()||0,Pe=Ce.pop()||0,it=Ce.pop()||0;if(Pe-it<=ge){for(let Qt=it;Qt<=Pe;Qt++){let er=me[2*Qt],br=me[2*Qt+1];er>=d&&er<=Y&&br>=L&&br<=te&&Te.push(ce[Qt])}continue}let He=it+Pe>>1,bt=me[2*He],Et=me[2*He+1];bt>=d&&bt<=Y&&Et>=L&&Et<=te&&Te.push(ce[He]),(Oe===0?d<=bt:L<=Et)&&(Ce.push(it),Ce.push(He-1),Ce.push(1-Oe)),(Oe===0?Y>=bt:te>=Et)&&(Ce.push(He+1),Ce.push(Pe),Ce.push(1-Oe))}return Te}within(d,L,Y){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:te,coords:ce,nodeSize:me}=this,ge=[0,te.length-1,0],Ce=[],Te=Y*Y;for(;ge.length;){let Oe=ge.pop()||0,Pe=ge.pop()||0,it=ge.pop()||0;if(Pe-it<=me){for(let Qt=it;Qt<=Pe;Qt++)k4(ce[2*Qt],ce[2*Qt+1],d,L)<=Te&&Ce.push(te[Qt]);continue}let He=it+Pe>>1,bt=ce[2*He],Et=ce[2*He+1];k4(bt,Et,d,L)<=Te&&Ce.push(te[He]),(Oe===0?d-Y<=bt:L-Y<=Et)&&(ge.push(it),ge.push(He-1),ge.push(1-Oe)),(Oe===0?d+Y>=bt:L+Y>=Et)&&(ge.push(He+1),ge.push(Pe),ge.push(1-Oe))}return Ce}}function o3(R,d,L,Y,te,ce){if(te-Y<=L)return;let me=Y+te>>1;E4(R,d,me,Y,te,ce),o3(R,d,L,Y,me-1,1-ce),o3(R,d,L,me+1,te,1-ce)}function E4(R,d,L,Y,te,ce){for(;te>Y;){if(te-Y>600){let Te=te-Y+1,Oe=L-Y+1,Pe=Math.log(Te),it=.5*Math.exp(2*Pe/3),He=.5*Math.sqrt(Pe*it*(Te-it)/Te)*(Oe-Te/2<0?-1:1);E4(R,d,L,Math.max(Y,Math.floor(L-Oe*it/Te+He)),Math.min(te,Math.floor(L+(Te-Oe)*it/Te+He)),ce)}let me=d[2*L+ce],ge=Y,Ce=te;for(L1(R,d,Y,L),d[2*te+ce]>me&&L1(R,d,Y,te);geme;)Ce--}d[2*Y+ce]===me?L1(R,d,Y,Ce):(Ce++,L1(R,d,Ce,te)),Ce<=L&&(Y=Ce+1),L<=Ce&&(te=Ce-1)}}function L1(R,d,L,Y){s3(R,L,Y),s3(d,2*L,2*Y),s3(d,2*L+1,2*Y+1)}function s3(R,d,L){let Y=R[d];R[d]=R[L],R[L]=Y}function k4(R,d,L,Y){let te=R-L,ce=d-Y;return te*te+ce*ce}function l3(R,d,L,Y){let te=Y,ce=d+(L-d>>1),me,ge=L-d,Ce=R[d],Te=R[d+1],Oe=R[L],Pe=R[L+1];for(let it=d+3;itte)me=it,te=He;else if(He===te){let bt=Math.abs(it-ce);btY&&(me-d>3&&l3(R,d,me,Y),R[me+2]=te,L-me>3&&l3(R,me,L,Y))}function pW(R,d,L,Y,te,ce){let me=te-L,ge=ce-Y;if(me!==0||ge!==0){let Ce=((R-L)*me+(d-Y)*ge)/(me*me+ge*ge);Ce>1?(L=te,Y=ce):Ce>0&&(L+=me*Ce,Y+=ge*Ce)}return me=R-L,ge=d-Y,me*me+ge*ge}function tf(R,d,L,Y){let te={type:d,geom:L},ce={id:R??null,type:te.type,geometry:te.geom,tags:Y,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(te.type){case"Point":case"MultiPoint":P1(ce,te.geom);break;case"LineString":P1(ce,te.geom.points);break;case"Polygon":P1(ce,te.geom[0].points);break;case"MultiLineString":for(let me of te.geom)P1(ce,me.points);break;case"MultiPolygon":for(let me of te.geom)P1(ce,me[0].points)}return ce}function u3(R){R.points.length>64&&(R.points=new Float64Array(R.points))}function P1(R,d){for(let L=0;L0&&(me+=Y?(te*Oe-Te*ce)/2:Math.sqrt(Math.pow(Te-te,2)+Math.pow(Oe-ce,2))),te=Te,ce=Oe}let ge=d.points.length-3;d.points[2]=1,L>0&&l3(d.points,0,ge,L),d.points[ge+2]=1,u3(d),d.size=Math.abs(me),d.start=0,d.end=d.size}function h3(R,d,L,Y){for(let te=0;te1?1:L}function vy(R){let d={type:"Feature",geometry:vW(R),properties:R.tags};return R.id!=null&&(d.id=R.id),d}function vW(R){let{type:d,geometry:L}=R;switch(d){case"Point":return{type:d,coordinates:C4(L[0],L[1])};case"MultiPoint":return{type:d,coordinates:my(L)};case"LineString":return{type:d,coordinates:my(L.points)};case"MultiLineString":case"Polygon":return{type:d,coordinates:L.map(Y=>my(Y.points))};case"MultiPolygon":return{type:d,coordinates:L.map(Y=>Y.map(te=>my(te.points)))}}}function my(R){let d=[];for(let L=0;L=(L/=d)&&me=Y)return null;let Ce=[];for(let Te of R){let Oe=te===Wf.X?Te.minX:Te.minY,Pe=te===Wf.X?Te.maxX:Te.maxY;if(Oe>=L&&Pe=Y))switch(Te.type){case"Point":case"MultiPoint":mW(Te,Ce,L,Y,te);continue;case"LineString":gW(Te,Ce,L,Y,te,ge);continue;case"MultiLineString":yW(Te,Ce,L,Y,te);continue;case"Polygon":_W(Te,Ce,L,Y,te);continue;case"MultiPolygon":xW(Te,Ce,L,Y,te);continue}}return Ce.length?Ce:null}function mW(R,d,L,Y,te){let ce=[];(function(me,ge,Ce,Te,Oe){for(let Pe=0;Pe=Ce&&it<=Te&&w0(ge,me[Pe],me[Pe+1],me[Pe+2])}})(R.geometry,ce,L,Y,te),ce.length&&d.push(tf(R.id,ce.length===3?"Point":"MultiPoint",ce,R.tags))}function gW(R,d,L,Y,te,ce){let me=[];if(R4(R.geometry,me,L,Y,te,!1,ce.lineMetrics),me.length)if(ce.lineMetrics)for(let ge of me)d.push(tf(R.id,"LineString",ge,R.tags));else d.push(me.length>1?tf(R.id,"MultiLineString",me,R.tags):tf(R.id,"LineString",me[0],R.tags))}function yW(R,d,L,Y,te){let ce=[];d3(R.geometry,ce,L,Y,te,!1),ce.length&&d.push(ce.length!==1?tf(R.id,"MultiLineString",ce,R.tags):tf(R.id,"LineString",ce[0],R.tags))}function _W(R,d,L,Y,te){let ce=[];d3(R.geometry,ce,L,Y,te,!0),ce.length&&d.push(tf(R.id,"Polygon",ce,R.tags))}function xW(R,d,L,Y,te){let ce=[];for(let me of R.geometry){let ge=[];d3(me,ge,L,Y,te,!0),ge.length&&ce.push(ge)}ce.length&&d.push(tf(R.id,"MultiPolygon",ce,R.tags))}function R4(R,d,L,Y,te,ce,me){let ge=I4(R),Ce=te===Wf.X?bW:wW,Te,Oe,Pe=R.start;for(let Qt=0;QtL&&(Oe=Ce(ge,er,br,Mr,qr,L),me&&(ge.start=Pe+Te*Oe)):$r>Y?_a=L&&(Oe=Ce(ge,er,br,Mr,qr,L),Ca=!0),_a>Y&&$r<=Y&&(Oe=Ce(ge,er,br,Mr,qr,Y),Ca=!0),!ce&&Ca&&(me&&(ge.end=Pe+Te*Oe),d.push(ge),ge=I4(R)),me&&(Pe+=Te)}let it=R.points.length-3,He=R.points[it],bt=R.points[it+1],Et=te===Wf.X?He:bt;Et>=L&&Et<=Y&&w0(ge.points,He,bt,R.points[it+2]),it=ge.points.length-3,ce&&it>=3&&(ge.points[it]!==ge.points[0]||ge.points[it+1]!==ge.points[1])&&w0(ge.points,ge.points[0],ge.points[1],ge.points[2]),ge.points.length&&(u3(ge),d.push(ge))}function I4(R){return{points:[],size:R.size,start:R.start,end:R.end}}function d3(R,d,L,Y,te,ce){for(let me of R)R4(me,d,L,Y,te,ce,!1)}function w0(R,d,L,Y){R.push(d,L,Y)}function bW(R,d,L,Y,te,ce){let me=(ce-d)/(Y-d);return w0(R.points,ce,L+(te-L)*me,1),me}function wW(R,d,L,Y,te,ce){let me=(ce-L)/(te-L);return w0(R.points,d+(Y-d)*me,ce,1),me}function p3(R,d){let L=d.buffer/d.extent,Y=R,te=Wd(R,1,-1-L,L,Wf.X,-1,2,d),ce=Wd(R,1,1-L,2+L,Wf.X,-1,2,d);return(te||ce)&&(Y=Wd(R,1,-L,1+L,Wf.X,-1,2,d)||[],te&&(Y=D4(te,1).concat(Y)),ce&&(Y=Y.concat(D4(ce,-1)))),Y}function D4(R,d){let L=[];for(let Y of R)switch(Y.type){case"Point":case"MultiPoint":{let te=TW(Y.geometry,d);L.push(tf(Y.id,Y.type,te,Y.tags));continue}case"LineString":{let te=v3(Y.geometry,d);L.push(tf(Y.id,Y.type,te,Y.tags));continue}case"MultiLineString":case"Polygon":{let te=[];for(let ce of Y.geometry)te.push(v3(ce,d));L.push(tf(Y.id,Y.type,te,Y.tags));continue}case"MultiPolygon":{let te=[];for(let ce of Y.geometry){let me=[];for(let ge of ce)me.push(v3(ge,d));te.push(me)}L.push(tf(Y.id,Y.type,te,Y.tags));continue}}return L}function TW(R,d){let L=[];for(let Y=0;Y0||((te=d.addOrUpdateProperties)==null?void 0:te.length)>0;if(ce){let ge=R[0],Ce=c3({type:"FeatureCollection",features:[{type:"Feature",id:ge.id,geometry:d.newGeometry,properties:me?F4(ge.tags,d):ge.tags}]},L);return Ce=p3(Ce,L),Ce}if(me){let ge=[];for(let Ce of R){let Te=Li({},Ce);Te.tags=F4(Te.tags,d),ge.push(Te)}return ge}return R}function F4(R,d){if(d.removeAllProperties)return{};let L=Li({},R||{});if(d.removeProperties)for(let Y of d.removeProperties)delete L[Y];if(d.addOrUpdateProperties)for(let{key:Y,value:te}of d.addOrUpdateProperties)L[Y]=te;return L}(function(R){R[R.X=0]="X",R[R.Y=1]="Y"})(Wf||(Wf={}));let m3={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:R=>R};class MW{constructor(d){this.options=Object.assign(Object.create(m3),d),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(d){let L=[];for(let Y of d){if(!Y.geometry)continue;let[te,ce]=Y.geometry.coordinates,[me,ge]=[x0(te),b0(ce)];L.push({id:Y.id,type:"Point",geometry:[me,ge],tags:Y.properties})}this.createIndex(L)}initialize(d){let L=[];for(let Y of d)Y.type==="Point"&&L.push(Y);this.createIndex(L)}updateIndex(d,L,Y){this.options=Object.assign(Object.create(m3),Y.clusterOptions),this.initialize(d)}createIndex(d){let{log:L,minZoom:Y,maxZoom:te}=this.options;L&&console.time("total time");let ce=`prepare ${d.length} points`;L&&console.time(ce),this.points=d;let me=[];for(let Ce=0;Ce=Y;Ce--){let Te=Date.now();ge=this.trees[Ce]=this.createTree(this.cluster(ge,Ce)),L&&console.log("z%d: %d clusters in %dms",Ce,ge.numItems,Date.now()-Te)}L&&console.timeEnd("total time")}getClusters(d,L){return this.getClustersInternal(d,L).map(Y=>vy(Y))}getClustersInternal(d,L){let Y=((d[0]+180)%360+360)%360-180,te=Math.max(-90,Math.min(90,d[1])),ce=d[2]===180?180:((d[2]+180)%360+360)%360-180,me=Math.max(-90,Math.min(90,d[3]));if(d[2]-d[0]>=360)Y=-180,ce=180;else if(Y>ce){let Pe=this.getClustersInternal([Y,te,180,me],L),it=this.getClustersInternal([-180,te,ce,me],L);return Pe.concat(it)}let ge=this.trees[this.limitZoom(L)],Ce=ge.range(x0(Y),b0(me),x0(ce),b0(te)),Te=ge.flatData,Oe=[];for(let Pe of Ce){let it=this.stride*Pe;Oe.push(Te[it+5]>1?SW(Te,it,this.clusterProps):this.points[Te[it+3]])}return Oe}getChildren(d){let L=this.getOriginId(d),Y=this.getOriginZoom(d),te=new Error("No cluster with the specified id: "+d),ce=this.trees[Y];if(!ce)throw te;let me=ce.flatData;if(L*this.stride>=me.length)throw te;let ge=this.options.radius/(this.options.extent*Math.pow(2,Y-1)),Ce=ce.within(me[L*this.stride],me[L*this.stride+1],ge),Te=[];for(let Oe of Ce){let Pe=Oe*this.stride;me[Pe+4]===d&&Te.push(me[Pe+5]>1?EW(me,Pe,this.clusterProps):vy(this.points[me[Pe+3]]))}if(Te.length===0)throw te;return Te}getLeaves(d,L,Y){let te=[];return this.appendLeaves(te,d,L=L||10,Y=Y||0,0),te}getTile(d,L,Y){let te=this.trees[this.limitZoom(d)];if(!te)return null;let ce=Math.pow(2,d),{extent:me,radius:ge}=this.options,Ce=ge/me,Te=(Y-Ce)/ce,Oe=(Y+1+Ce)/ce,Pe={transformed:!0,features:[],source:null,x:L,y:Y,z:d};return this.addTileFeatures(te.range((L-Ce)/ce,Te,(L+1+Ce)/ce,Oe),te.flatData,L,Y,ce,Pe),L===0&&this.addTileFeatures(te.range(1-Ce/ce,Te,1,Oe),te.flatData,ce,Y,ce,Pe),L===ce-1&&this.addTileFeatures(te.range(0,Te,Ce/ce,Oe),te.flatData,-1,Y,ce,Pe),Pe}getClusterExpansionZoom(d){return this.getOriginZoom(d)}appendLeaves(d,L,Y,te,ce){let me=this.getChildren(L);for(let ge of me){let Ce=ge.properties;if(Ce?.cluster?ce+Ce.point_count<=te?ce+=Ce.point_count:ce=this.appendLeaves(d,Ce.cluster_id,Y,te,ce):ce1,Oe,Pe,it;if(Te)Oe=g3(L,Ce,this.clusterProps),Pe=L[Ce],it=L[Ce+1];else{let Et=this.points[L[Ce+3]];Oe=Et.tags,[Pe,it]=Et.geometry}let He={type:1,geometry:[[Math.round(this.options.extent*(Pe*ce-Y)),Math.round(this.options.extent*(it*ce-te))]],tags:Oe},bt;bt=Te||this.options.generateId?L[Ce+3]:this.points[L[Ce+3]].id,bt!==void 0&&(He.id=bt),me.features.push(He)}}limitZoom(d){return Math.max(this.options.minZoom,Math.min(Math.floor(+d),this.options.maxZoom+1))}cluster(d,L){let{radius:Y,extent:te,reduce:ce,minPoints:me}=this.options,ge=Y/(te*Math.pow(2,L)),Ce=d.flatData,Te=[],Oe=this.stride;for(let Pe=0;PeL&&(Qt+=Ce[br+5])}if(Qt>Et&&Qt>=me){let er,br=it*Et,sr=He*Et,Mr=-1,qr=(Pe/Oe<<5)+(L+1)+this.points.length;for(let $r of bt){let _a=$r*Oe;if(Ce[_a+2]<=L)continue;Ce[_a+2]=L;let Ca=Ce[_a+5];br+=Ce[_a]*Ca,sr+=Ce[_a+1]*Ca,Ce[_a+4]=qr,ce&&(er||(er=this.map(Ce,Pe,!0),Mr=this.clusterProps.length,this.clusterProps.push(er)),ce(er,this.map(Ce,_a)))}Ce[Pe+4]=qr,Te.push(br/Qt,sr/Qt,1/0,qr,-1,Qt),ce&&Te.push(Mr)}else{for(let er=0;er1)for(let er of bt){let br=er*Oe;if(!(Ce[br+2]<=L)){Ce[br+2]=L;for(let sr=0;sr>5}getOriginZoom(d){return(d-this.points.length)%32}map(d,L,Y){if(d[L+5]>1){let me=this.clusterProps[d[L+6]];return Y?Object.assign({},me):me}let te=this.points[d[L+3]].tags,ce=this.options.map(te);return Y&&ce===te?Object.assign({},ce):ce}}function SW(R,d,L){return{id:R[d+3],type:"Point",tags:g3(R,d,L),geometry:[R[d],R[d+1]]}}function EW(R,d,L){return{type:"Feature",id:R[d+3],properties:g3(R,d,L),geometry:{type:"Point",coordinates:[L4(R[d]),P4(R[d+1])]}}}function g3(R,d,L){let Y=R[d+5],te=Y>=1e4?`${Math.round(Y/1e3)}k`:Y>=1e3?Math.round(Y/100)/10+"k":Y,ce=R[d+6],me=ce===-1?{}:Object.assign({},L[ce]);return Object.assign(me,{cluster:!0,cluster_id:R[d+3],point_count:Y,point_count_abbreviated:te})}let y3="geojsonvt_clip_start",_3="geojsonvt_clip_end";function z4(R,d,L,Y,te){let ce=d===te.maxZoom?0:te.tolerance/((1<0&&d.size<(te?me:Y))return void(L.numPoints+=d.points.length/3);let ge=[];for(let Ce=0;Ceme)&&(L.numSimplified++,ge.push(d.points[Ce],d.points[Ce+1])),L.numPoints++;te&&function(Ce,Te){let Oe=0;for(let Pe=0,it=Ce.length,He=it-2;Pe0===Te)for(let Pe=0,it=Ce.length;Pe1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(L),Y.debug>1&&console.timeEnd("invalidating");let[te,ce,me]=[0,0,0],ge=z4(d,te,ce,me,Y);ge.source=d;let Ce=gy(te,ce,me);if(this.tiles[Ce]=ge,this.tileCoords.push({z:te,x:ce,y:me,id:Ce}),Y.debug){let Te=`z${te}`;this.stats[Te]=(this.stats[Te]||0)+1,this.total++}}getClusterExpansionZoom(d){return null}getChildren(d){return null}getLeaves(d,L,Y){return null}getTile(d,L,Y){let{extent:te,debug:ce}=this.options,me=1<1&&console.log("drilling down to z%d-%d-%d",d,L,Y);let Ce,Te=d,Oe=L,Pe=Y;for(;!Ce&&Te>0;)Te--,Oe>>=1,Pe>>=1,Ce=this.tiles[gy(Te,Oe,Pe)];return Ce?.source?(ce>1&&(console.log("found parent tile z%d-%d-%d",Te,Oe,Pe),console.time("drilling down")),this.splitTile(Ce.source,Te,Oe,Pe,d,L,Y),ce>1&&console.timeEnd("drilling down"),this.tiles[ge]?B4(this.tiles[ge],te):null):null}splitTile(d,L,Y,te,ce,me,ge){let Ce=[d,L,Y,te],Te=this.options,Oe=Te.debug;for(;Ce.length;){te=Ce.pop(),Y=Ce.pop(),L=Ce.pop(),d=Ce.pop();let Pe=1<1&&console.time("creation"),He=this.tiles[it]=z4(d,L,Y,te,Te),this.tileCoords.push({z:L,x:Y,y:te,id:it}),Oe)){Oe>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",L,Y,te,He.numFeatures,He.numPoints,He.numSimplified),console.timeEnd("creation"));let Ca=`z${L}`;this.stats[Ca]=(this.stats[Ca]||0)+1,this.total++}if(He.source=d,ce==null){if(L===Te.indexMaxZoom||He.numPoints<=Te.indexMaxPoints)continue}else{if(L===Te.maxZoom||L===ce)continue;if(ce!=null){let Ca=ce-L;if(Y!==me>>Ca||te!==ge>>Ca)continue}}if(He.source=null,!d.length)continue;Oe>1&&console.time("clipping");let bt=.5*Te.buffer/Te.extent,Et=.5-bt,Qt=.5+bt,er=1+bt,br=null,sr=null,Mr=null,qr=null,$r=Wd(d,Pe,Y-bt,Y+Qt,Wf.X,He.minX,He.maxX,Te),_a=Wd(d,Pe,Y+Et,Y+er,Wf.X,He.minX,He.maxX,Te);$r&&(br=Wd($r,Pe,te-bt,te+Qt,Wf.Y,He.minY,He.maxY,Te),sr=Wd($r,Pe,te+Et,te+er,Wf.Y,He.minY,He.maxY,Te)),_a&&(Mr=Wd(_a,Pe,te-bt,te+Qt,Wf.Y,He.minY,He.maxY,Te),qr=Wd(_a,Pe,te+Et,te+er,Wf.Y,He.minY,He.maxY,Te)),Oe>1&&console.timeEnd("clipping"),Ce.push(br||[],L+1,2*Y,2*te),Ce.push(sr||[],L+1,2*Y,2*te+1),Ce.push(Mr||[],L+1,2*Y+1,2*te),Ce.push(qr||[],L+1,2*Y+1,2*te+1)}}invalidateTiles(d){if(!d.length)return;let L=this.options,{debug:Y}=L,te=1/0,ce=-1/0,me=1/0,ge=-1/0;for(let Oe of d)te=Math.min(te,Oe.minX),ce=Math.max(ce,Oe.maxX),me=Math.min(me,Oe.minY),ge=Math.max(ge,Oe.maxY);let Ce=L.buffer/L.extent,Te=new Set;for(let Oe in this.tiles){let Pe=this.tiles[Oe],it=1<=bt||ge=Qt)continue;let er=!1;for(let br of d)if(br.maxX>=He&&br.minX=Et&&br.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Pe.z,Pe.x,Pe.y,Pe.numFeatures,Pe.numPoints,Pe.numSimplified);let br=`z${Pe.z}`;this.stats[br]=(this.stats[br]||0)-1,this.total--}delete this.tiles[Oe],Te.add(Oe)}}Te.size&&(this.tileCoords=this.tileCoords.filter(Oe=>!Te.has(Oe.id)))}}function gy(R,d,L){return 32*((1<L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let L of this.layers)this.gradients[L.id]={};this.layoutVertexArray=new Ar,this.layoutVertexArray2=new hr,this.indexArray=new ua,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,Y){this.hasDependencies=Md("line",this.layers,L)||this.hasLineDasharray(this.layers);let te=this.layers[0].layout.get("line-sort-key"),ce=!te.isConstant(),me=[];for(let{feature:ge,id:Ce,index:Te,sourceLayerIndex:Oe}of d){let Pe=this.layers[0]._featureFilter.needGeometry,it=fo(ge,Pe);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),it,Y))continue;let He=ce?te.evaluate(it,{},Y):void 0,bt={id:Ce,properties:ge.properties,type:ge.type,sourceLayerIndex:Oe,index:Te,geometry:Pe?it.geometry:ql(ge),patterns:{},dashes:{},sortKey:He};me.push(bt)}ce&&me.sort((ge,Ce)=>ge.sortKey-Ce.sortKey);for(let ge of me){let{geometry:Ce,index:Te,sourceLayerIndex:Oe}=ge;this.hasDependencies?(Md("line",this.layers,L)?v0("line",this.layers,ge,{zoom:this.zoom},L):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,ge,this.zoom,L),this.patternFeatures.push(ge)):this.addFeature(ge,Ce,Te,Y,{},{},L.subdivisionGranularity),L.featureIndex.insert(d[Te].feature,Ce,Te,Oe,this.index)}}update(d,L,Y,te){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:Y,dashPositions:te})}addFeatures(d,L,Y,te){for(let ce of this.patternFeatures)this.addFeature(ce,ce.geometry,ce.index,L,Y,te,d.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=d.createVertexBuffer(this.layoutVertexArray2,zW)),this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,DW),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(d){if(d.properties&&Object.hasOwn(d.properties,y3)&&Object.hasOwn(d.properties,_3))return{start:+d.properties[y3],end:+d.properties[_3]}}addFeature(d,L,Y,te,ce,me,ge){let Ce=this.layers[0].layout,Te=Ce.get("line-join").evaluate(d,{}),Oe=Ce.get("line-cap").evaluate(d,{}),Pe=Ce.get("line-miter-limit").evaluate(d,{}),it=Ce.get("line-round-limit").evaluate(d,{});this.lineClips=this.lineFeatureClips(d);for(let He of L)this.addLine(He,d,Te,Oe,Pe,it,te,ge);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,Y,{imagePositions:ce,dashPositions:me,canonical:te})}addLine(d,L,Y,te,ce,me,ge,Ce){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,d=Sv(d,ge?Ce.line.getGranularityForZoomLevel(ge.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let sr=0;sr=2&&d[Oe-1].equals(d[Oe-2]);)Oe--;let Pe=0;for(;Pe0;if(nn&&sr>Pe){let gn=bt.dist(Et);if(gn>2*it){let Va=bt.sub(bt.sub(Et)._mult(it/gn)._round());this.updateDistance(Et,Va),this.addCurrentVertex(Va,er,0,0,He),Et=Va}}let bn=Et&&Qt,Fn=bn?Y:Te?"butt":te;if(bn&&Fn==="round"&&(_ace&&(Fn="bevel"),Fn==="bevel"&&(_a>2&&(Fn="flipbevel"),_a100)Mr=br.mult(-1);else{let gn=_a*er.add(br).mag()/er.sub(br).mag();Mr._perp()._mult(gn*(qa?-1:1))}this.addCurrentVertex(bt,Mr,0,0,He),this.addCurrentVertex(bt,Mr.mult(-1),0,0,He)}else if(Fn==="bevel"||Fn==="fakeround"){let gn=-Math.sqrt(_a*_a-1),Va=qa?gn:0,Hn=qa?0:gn;if(Et&&this.addCurrentVertex(bt,er,Va,Hn,He),Fn==="fakeround"){let ni=Math.round(180*Ca/Math.PI/20);for(let Wn=1;Wn2*it){let Va=bt.add(Qt.sub(bt)._mult(it/gn)._round());this.updateDistance(bt,Va),this.addCurrentVertex(Va,br,0,0,He),bt=Va}}}}addCurrentVertex(d,L,Y,te,ce,me=!1){let ge=L.y*te-L.x,Ce=-L.y-L.x*te;this.addHalfVertex(d,L.x+L.y*Y,L.y-L.x*Y,me,!1,Y,ce),this.addHalfVertex(d,ge,Ce,me,!0,-te,ce),this.distance>N4/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(d,L,Y,te,ce,me))}addHalfVertex({x:d,y:L},Y,te,ce,me,ge,Ce){let Te=.5*(this.lineClips?this.scaledDistance*(N4-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((d<<1)+(ce?1:0),(L<<1)+(me?1:0),Math.round(63*Y)+128,Math.round(63*te)+128,1+(ge===0?0:ge<0?-1:1)|(63&Te)<<2,Te>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Oe=Ce.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,Oe,this.e2),Ce.primitiveLength++),me?this.e2=Oe:this.e1=Oe}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(d,L){this.distance+=d.dist(L),this.updateScaledDistance()}hasLineDasharray(d){for(let L of d){let Y=L.paint.get("line-dasharray");if(Y&&!Y.isConstant())return!0}return!1}addLineDashDependencies(d,L,Y,te){for(let ce of d){let me=ce.paint.get("line-dasharray");if(!me||me.value.kind==="constant")continue;let ge=ce.layout.get("line-cap").evaluate(L,{})==="round",Ce={dasharray:me.value.evaluate({zoom:Y-1},L,{}),round:ge},Te={dasharray:me.value.evaluate({zoom:Y},L,{}),round:ge},Oe={dasharray:me.value.evaluate({zoom:Y+1},L,{}),round:ge},Pe=`${Ce.dasharray.join(",")},${Ce.round}`,it=`${Te.dasharray.join(",")},${Te.round}`,He=`${Oe.dasharray.join(",")},${Oe.round}`;te.dashDependencies[Pe]=Ce,te.dashDependencies[it]=Te,te.dashDependencies[He]=Oe,L.dashes[ce.id]={min:Pe,mid:it,max:He}}}}let j4,U4;fi("LineBucket",b3,{omit:["layers","patternFeatures"]});var q4={get paint(){return U4=U4||new Ps({"line-opacity":new wi(ht.paint_line["line-opacity"]),"line-color":new wi(ht.paint_line["line-color"]),"line-translate":new hi(ht.paint_line["line-translate"]),"line-translate-anchor":new hi(ht.paint_line["line-translate-anchor"]),"line-width":new wi(ht.paint_line["line-width"]),"line-gap-width":new wi(ht.paint_line["line-gap-width"]),"line-offset":new wi(ht.paint_line["line-offset"]),"line-blur":new wi(ht.paint_line["line-blur"]),"line-dasharray":new sl(ht.paint_line["line-dasharray"]),"line-pattern":new sl(ht.paint_line["line-pattern"]),"line-gradient":new tu(ht.paint_line["line-gradient"])})},get layout(){return j4=j4||new Ps({"line-cap":new wi(ht.layout_line["line-cap"]),"line-join":new wi(ht.layout_line["line-join"]),"line-miter-limit":new wi(ht.layout_line["line-miter-limit"]),"line-round-limit":new wi(ht.layout_line["line-round-limit"]),"line-sort-key":new wi(ht.layout_line["line-sort-key"])})}};class OW extends wi{possiblyEvaluate(d,L){return L=new oi(Math.floor(L.zoom),{now:L.now,fadeDuration:L.fadeDuration,zoomHistory:L.zoomHistory,transition:L.transition}),super.possiblyEvaluate(d,L)}evaluate(d,L,Y,te){return L=Z({},L,{zoom:Math.floor(L.zoom)}),super.evaluate(d,L,Y,te)}}let yy;class NW extends ll{constructor(d,L){super(d,q4,L),this.gradientVersion=0,yy||(yy=new OW(q4.paint.properties["line-width"].specification),yy.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(d){if(d==="line-gradient"){let L=this.gradientExpression();this.stepInterpolant=!!function(Y){return Y._styleExpression!==void 0}(L)&&L._styleExpression.expression instanceof Ss,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(d,L){super.recalculate(d,L),this.paint._values["line-floorwidth"]=yy.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,d)}createBucket(d){return new b3(d)}queryRadius(d){let L=d,Y=V4(Le("line-width",this,L),Le("line-gap-width",this,L)),te=Le("line-offset",this,L);return Y/2+Math.abs(te)+Ue(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:Y,geometry:te,transform:ce,pixelsToTileUnits:me}){let ge=Qe(d,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-ce.bearingInRadians,me),Ce=me/2*V4(this.paint.get("line-width").evaluate(L,Y),this.paint.get("line-gap-width").evaluate(L,Y)),Te=this.paint.get("line-offset").evaluate(L,Y);return Te&&(te=function(Oe,Pe){let it=[];for(let He of Oe){let bt=_t(He),Et=[];for(let Qt=0;Qt=3){for(let bt of He)if(Wa(Oe,bt))return!0}if(rs(Oe,He,it))return!0}return!1}(ge,te,Ce)}isTileClipped(){return!0}}function V4(R,d){return d>0?d+2*R:R}let jW=ct([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),UW=ct([{name:"a_projected_pos",components:3,type:"Float32"}],4);ct([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let qW=ct([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ct([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let G4=ct([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),VW=ct([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function GW(R,d,L){let Y=d.layout.get("text-transform").evaluate(L,{});return Y==="uppercase"?R=R.toLocaleUpperCase():Y==="lowercase"&&(R=R.toLocaleLowerCase()),Si.applyArabicShaping&&(R=Si.applyArabicShaping(R)),R}function HW(R,d,L){for(let Y of R.sections)Y.text=GW(Y.text,d,L);return R}ct([{name:"triangle",components:3,type:"Uint16"}]),ct([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ct([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ct([{type:"Float32",name:"offsetX"}]),ct([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ct([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var Rc=24;let R1={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u22EF":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"},WW={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},YW={40:!0};function H4(R,d,L,Y,te,ce){if("fontStack"in d){let me=L[d.fontStack],ge=me?.[R];return ge?ge.metrics.advance*d.scale+te:0}{let me=Y[d.imageName];return me?me.displaySize[0]*d.scale*Rc/ce+te:0}}function W4(R,d,L,Y){let te=Math.pow(R-d,2);return Y?RMath.max(d,this.sections[L].scale),0)}getMaxImageSize(d){let L=0,Y=0;for(let te=0;teY))}addImageSection(d){let L=d.image?d.image.name:"";if(L.length===0)return void ee("Can't add FormattedSection with an empty image.");let Y=this.getNextImageSectionCharCode();Y?(this.text+=String.fromCharCode(Y),this.sections.push({scale:1,verticalAlign:d.verticalAlign||"bottom",imageName:L}),this.sectionIndex.push(this.sections.length-1)):ee("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(d,L,Y,te,ce){let me=[],ge=this.determineAverageLineWidth(d,L,Y,te,ce),Ce=this.hasZeroWidthSpaces(),Te=0,Oe=0,Pe=this.text[Symbol.iterator](),it=Pe.next(),He=this.text[Symbol.iterator]();He.next();let bt=He.next(),Et=this.text[Symbol.iterator]();Et.next(),Et.next();let Qt=Et.next();for(;!it.done;){let er=this.getSection(Oe),br=it.value.codePointAt(0);if(Pr(br)||(Te+=H4(br,er,Y,te,d,ce)),!bt.done){let sr=zt(br),Mr=bt.value.codePointAt(0);(WW[br]||sr||"imageName"in er||!Qt.done&&YW[Mr])&&me.push(Y4(Oe+1,Te,ge,me,XW(br,Mr,sr&&Ce),!1))}Oe++,it=Pe.next(),bt=He.next(),Qt=Et.next()}return X4(Y4(this.length(),Te,ge,me,0,!0))}determineAverageLineWidth(d,L,Y,te,ce){let me=0,ge=0;for(let Ce of this.text){let Te=this.getSection(ge);me+=H4(Ce.codePointAt(0),Te,Y,te,d,ce),ge++}return me/Math.max(1,Math.ceil(me/L))}}let w3=4294967296,Z4=1/w3,$4=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class _y{constructor(d=new Uint8Array(16)){this.buf=ArrayBuffer.isView(d)?d:new Uint8Array(d),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(d,L,Y=this.length){for(;this.pos>3,me=this.pos;this.type=7&te,d(ce,L,this),this.pos===me&&this.skip(te)}return L}readMessage(d,L){return this.readFields(d,L,this.readVarint()+this.pos)}readFixed32(){let d=this.dataView.getUint32(this.pos,!0);return this.pos+=4,d}readSFixed32(){let d=this.dataView.getInt32(this.pos,!0);return this.pos+=4,d}readFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*w3;return this.pos+=8,d}readSFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*w3;return this.pos+=8,d}readFloat(){let d=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,d}readDouble(){let d=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,d}readVarint(d){let L=this.buf,Y,te;return te=L[this.pos++],Y=127&te,te<128?Y:(te=L[this.pos++],Y|=(127&te)<<7,te<128?Y:(te=L[this.pos++],Y|=(127&te)<<14,te<128?Y:(te=L[this.pos++],Y|=(127&te)<<21,te<128?Y:(te=L[this.pos],Y|=(15&te)<<28,function(ce,me,ge){let Ce=ge.buf,Te,Oe;if(Oe=Ce[ge.pos++],Te=(112&Oe)>>4,Oe<128||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<3,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<10,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<17,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<24,Oe<128)||(Oe=Ce[ge.pos++],Te|=(1&Oe)<<31,Oe<128))return A0(ce,Te,me);throw new Error("Expected varint not more than 10 bytes")}(Y,d,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let d=this.readVarint();return d%2==1?(d+1)/-2:d/2}readBoolean(){return!!this.readVarint()}readString(){let d=this.readVarint()+this.pos,L=this.pos;return this.pos=d,d-L>=12&&$4?$4.decode(this.buf.subarray(L,d)):function(Y,te,ce){let me="",ge=te;for(;ge239?4:Ce>223?3:Ce>191?2:1;if(ge+He>ce)break;He===1?Ce<128&&(it=Ce):He===2?(Te=Y[ge+1],(192&Te)==128&&(it=(31&Ce)<<6|63&Te,it<=127&&(it=null))):He===3?(Te=Y[ge+1],Oe=Y[ge+2],(192&Te)==128&&(192&Oe)==128&&(it=(15&Ce)<<12|(63&Te)<<6|63&Oe,(it<=2047||it>=55296&&it<=57343)&&(it=null))):He===4&&(Te=Y[ge+1],Oe=Y[ge+2],Pe=Y[ge+3],(192&Te)==128&&(192&Oe)==128&&(192&Pe)==128&&(it=(15&Ce)<<18|(63&Te)<<12|(63&Oe)<<6|63&Pe,(it<=65535||it>=1114112)&&(it=null))),it===null?(it=65533,He=1):it>65535&&(it-=65536,me+=String.fromCharCode(it>>>10&1023|55296),it=56320|1023&it),me+=String.fromCharCode(it),ge+=He}return me}(this.buf,L,d)}readBytes(){let d=this.readVarint()+this.pos,L=this.buf.subarray(this.pos,d);return this.pos=d,L}readPackedVarint(d=[],L){let Y=this.readPackedEnd();for(;this.pos127;);else if(L===2)this.pos=this.readVarint()+this.pos;else if(L===5)this.pos+=4;else{if(L!==1)throw new Error(`Unimplemented type: ${L}`);this.pos+=8}}writeTag(d,L){this.writeVarint(d<<3|L)}realloc(d){let L=this.length||16;for(;L268435455||d<0?function(L,Y){let te,ce;if(L>=0?(te=L%4294967296|0,ce=L/4294967296|0):(te=~(-L%4294967296),ce=~(-L/4294967296),4294967295^te?te=te+1|0:(te=0,ce=ce+1|0)),L>=18446744073709552e3||L<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");Y.realloc(10),function(me,ge,Ce){Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,Ce.buf[Ce.pos]=127&(me>>>=7)}(te,0,Y),function(me,ge){let Ce=(7&me)<<4;ge.buf[ge.pos++]|=Ce|((me>>>=3)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me)))))}(ce,Y)}(d,this):(this.realloc(4),this.buf[this.pos++]=127&d|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=d>>>7&127))))}writeSVarint(d){this.writeVarint(d<0?2*-d-1:2*d)}writeBoolean(d){this.writeVarint(+d)}writeString(d){d=String(d),this.realloc(4*d.length),this.pos++;let L=this.pos;this.pos=function(te,ce,me){for(let ge,Ce,Te=0;Te55295&&ge<57344){if(!Ce){ge>56319||Te+1===ce.length?(te[me++]=239,te[me++]=191,te[me++]=189):Ce=ge;continue}if(ge<56320){te[me++]=239,te[me++]=191,te[me++]=189,Ce=ge;continue}ge=Ce-55296<<10|ge-56320|65536,Ce=null}else Ce&&(te[me++]=239,te[me++]=191,te[me++]=189,Ce=null);ge<128?te[me++]=ge:(ge<2048?te[me++]=ge>>6|192:(ge<65536?te[me++]=ge>>12|224:(te[me++]=ge>>18|240,te[me++]=ge>>12&63|128),te[me++]=ge>>6&63|128),te[me++]=63&ge|128)}return me}(this.buf,d,this.pos);let Y=this.pos-L;Y>=128&&K4(L,Y,this),this.pos=L-1,this.writeVarint(Y),this.pos+=Y}writeFloat(d){this.realloc(4),this.dataView.setFloat32(this.pos,d,!0),this.pos+=4}writeDouble(d){this.realloc(8),this.dataView.setFloat64(this.pos,d,!0),this.pos+=8}writeBytes(d){let L=d.length;this.writeVarint(L),this.realloc(L);for(let Y=0;Y=128&&K4(Y,te,this),this.pos=Y-1,this.writeVarint(te),this.pos+=te}writeMessage(d,L,Y){this.writeTag(d,2),this.writeRawMessage(L,Y)}writePackedVarint(d,L){L.length&&this.writeMessage(d,ZW,L)}writePackedSVarint(d,L){L.length&&this.writeMessage(d,$W,L)}writePackedBoolean(d,L){L.length&&this.writeMessage(d,QW,L)}writePackedFloat(d,L){L.length&&this.writeMessage(d,KW,L)}writePackedDouble(d,L){L.length&&this.writeMessage(d,JW,L)}writePackedFixed32(d,L){L.length&&this.writeMessage(d,eY,L)}writePackedSFixed32(d,L){L.length&&this.writeMessage(d,tY,L)}writePackedFixed64(d,L){L.length&&this.writeMessage(d,rY,L)}writePackedSFixed64(d,L){L.length&&this.writeMessage(d,aY,L)}writeBytesField(d,L){this.writeTag(d,2),this.writeBytes(L)}writeFixed32Field(d,L){this.writeTag(d,5),this.writeFixed32(L)}writeSFixed32Field(d,L){this.writeTag(d,5),this.writeSFixed32(L)}writeFixed64Field(d,L){this.writeTag(d,1),this.writeFixed64(L)}writeSFixed64Field(d,L){this.writeTag(d,1),this.writeSFixed64(L)}writeVarintField(d,L){this.writeTag(d,0),this.writeVarint(L)}writeSVarintField(d,L){this.writeTag(d,0),this.writeSVarint(L)}writeStringField(d,L){this.writeTag(d,2),this.writeString(L)}writeFloatField(d,L){this.writeTag(d,5),this.writeFloat(L)}writeDoubleField(d,L){this.writeTag(d,1),this.writeDouble(L)}writeBooleanField(d,L){this.writeVarintField(d,+L)}}function A0(R,d,L){return L?4294967296*d+(R>>>0):4294967296*(d>>>0)+(R>>>0)}function K4(R,d,L){let Y=d<=16383?1:d<=2097151?2:d<=268435455?3:Math.floor(Math.log(d)/(7*Math.LN2));L.realloc(Y);for(let te=L.pos-1;te>=R;te--)L.buf[te+Y]=L.buf[te]}function ZW(R,d){for(let L=0;Lge.h-me.h);let Y=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(d/.95)),L),h:1/0}],te=0,ce=0;for(let me of R)for(let ge=Y.length-1;ge>=0;ge--){let Ce=Y[ge];if(!(me.w>Ce.w||me.h>Ce.h)){if(me.x=Ce.x,me.y=Ce.y,ce=Math.max(ce,me.y+me.h),te=Math.max(te,me.x+me.w),me.w===Ce.w&&me.h===Ce.h){let Te=Y.pop();Te&&geEt.toCodeUnitIndex(_a));let $r=br(Et.toString(),er);for(let _a of $r){let Ca=[..._a].map(()=>0);Qt.push(new T0(_a,Et.sections,Ca))}}else if(sr){Qt=[],er=er.map(nn=>Et.toCodeUnitIndex(nn));let $r=0,_a=[];for(let nn of Et.text)_a.push(...Array(nn.length).fill(Et.sectionIndex[$r])),$r++;let Ca=sr(Et.text,_a,er);for(let nn of Ca){let qa=[],bn="";for(let Fn of nn[0])qa.push(nn[1][bn.length]),bn+=Fn;Qt.push(new T0(nn[0],Et.sections,qa))}}else Qt=function($r,_a){let Ca=[],nn=0;for(let qa of _a)Ca.push($r.substring(nn,qa)),nn=qa;return nn<$r.length()&&Ca.push($r.substring(nn,$r.length())),Ca}(Et,er);let Mr=[],qr={positionedLines:Mr,text:Et.toString(),top:Oe[1],bottom:Oe[1],left:Oe[0],right:Oe[0],writingMode:Pe,iconsInText:!1,verticalizable:!1};return function($r,_a,Ca,nn,qa,bn,Fn,gn,Va,Hn,ni,Wn){let si=0,po=0,cs=0,Ds=0,Xs=gn==="right"?1:gn==="left"?0:.5,Mf=Rc/Wn,vu=0;for(let Hl of qa){Hl.trim();let rf=Hl.getMaxScale(),Xf={positionedGlyphs:[],lineOffset:0};$r.positionedLines[vu]=Xf;let Zf=Xf.positionedGlyphs,Th=0;if(!Hl.length()){po+=bn,++vu;continue}let Sf=sY(nn,Hl,Mf),Ah=0;for(let Fc of Hl.text){let nu=Hl.getSection(Ah),lc=Fc.codePointAt(0),mu=lY(Va,ni,lc),zc={glyph:lc,imageName:null,x:si,y:po+-17,vertical:mu,scale:1,fontStack:"",sectionIndex:Hl.getSectionIndex(Ah),metrics:null,rect:null},Zd;if("fontStack"in nu){if(Zd=uY(nu,lc,mu,Sf,_a,Ca),!Zd)continue;zc.fontStack=nu.fontStack}else{if($r.iconsInText=!0,nu.scale*=Mf,Zd=cY(nu,mu,rf,Sf,nn),!Zd)continue;Th=Math.max(Th,Zd.imageOffset),zc.imageName=nu.imageName}let{rect:dd,metrics:B1,baselineOffset:Ep}=Zd;zc.y+=Ep,zc.scale=nu.scale,zc.metrics=B1,zc.rect=dd,Zf.push(zc),mu?($r.verticalizable=!0,si+=("imageName"in nu?B1.advance:Rc)*nu.scale+Hn):si+=B1.advance*nu.scale+Hn,Ah++}Zf.length!==0&&(cs=Math.max(si-Hn,cs),fY(Zf,0,Zf.length-1,Xs)),si=0,Xf.lineOffset=Math.max(Th,(rf-1)*Rc);let Hh=bn*rf+Th;po+=Hh,Ds=Math.max(Hh,Ds),++vu}let{horizontalAlign:yc,verticalAlign:Dc}=A3(Fn);(function(Hl,rf,Xf,Zf,Th,Sf,Ah,Hh,Fc){let nu=(rf-Xf)*Th,lc=0;lc=Sf!==Ah?-Hh*Zf- -17:-Zf*Fc*Ah+.5*Ah;for(let mu of Hl)for(let zc of mu.positionedGlyphs)zc.x+=nu,zc.y+=lc})($r.positionedLines,Xs,yc,Dc,cs,Ds,bn,po,qa.length),$r.top+=-Dc*po,$r.bottom=$r.top+po,$r.left+=-yc*cs,$r.right=$r.left+cs}(qr,d,L,Y,Qt,me,ge,Ce,Pe,Te,it,bt),!function($r){for(let _a of $r)if(_a.positionedGlyphs.length!==0)return!1;return!0}(Mr)&&qr}function A3(R){let d=.5,L=.5;switch(R){case"right":case"top-right":case"bottom-right":d=1;break;case"left":case"top-left":case"bottom-left":d=0}switch(R){case"bottom":case"bottom-right":case"bottom-left":L=1;break;case"top":case"top-right":case"top-left":L=0}return{horizontalAlign:d,verticalAlign:L}}function sY(R,d,L){let Y=d.getMaxScale()*Rc,{maxImageWidth:te,maxImageHeight:ce}=d.getMaxImageSize(R),me=Math.max(Y,ce*L);return{verticalLineContentWidth:Math.max(Y,te*L),horizontalLineContentHeight:me}}function eS(R){switch(R){case"top":return 0;case"center":return .5;default:return 1}}function lY(R,d,L){return!(R===l.ax.horizontal||!d&&!Wt(L)||d&&(Pr(L)||(Y=L,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(Y)))));var Y}function uY(R,d,L,Y,te,ce){let me=ce[R.fontStack],ge=function(Te,Oe,Pe,it){if(Te?.rect)return Te;let He=Oe[Pe.fontStack],bt=He?.[it];return bt?{rect:null,metrics:bt.metrics}:null}(me?.[d],te,R,d);if(ge===null)return null;let Ce;if(L)Ce=Y.verticalLineContentWidth-R.scale*Rc;else{let Te=eS(R.verticalAlign);Ce=(Y.horizontalLineContentHeight-R.scale*Rc)*Te}return{rect:ge.rect,metrics:ge.metrics,baselineOffset:Ce}}function cY(R,d,L,Y,te){let ce=te[R.imageName];if(!ce)return null;let me=ce.paddedRect,ge=ce.displaySize,Ce={width:ge[0],height:ge[1],left:1,top:-3,advance:d?ge[1]:ge[0]},Te;if(d)Te=Y.verticalLineContentWidth-ge[1]*R.scale;else{let Oe=eS(R.verticalAlign);Te=(Y.horizontalLineContentHeight-ge[1]*R.scale)*Oe}return{rect:me,metrics:Ce,baselineOffset:Te,imageOffset:(d?ge[0]:ge[1])*R.scale-Rc*L}}function fY(R,d,L,Y){if(Y===0)return;let te=R[L],ce=(R[L].x+te.metrics.advance*te.scale)*Y;for(let me=d;me<=L;me++)R[me].x-=ce}function hY(R,d,L){let{horizontalAlign:Y,verticalAlign:te}=A3(L),ce=d[0]-R.displaySize[0]*Y,me=d[1]-R.displaySize[1]*te;return{image:R,top:me,bottom:me+R.displaySize[1],left:ce,right:ce+R.displaySize[0]}}function tS(R){var d,L;let Y=R.left,te=R.top,ce=R.right-Y,me=R.bottom-te,ge=(d=R.image.textFitWidth)!==null&&d!==void 0?d:"stretchOrShrink",Ce=(L=R.image.textFitHeight)!==null&&L!==void 0?L:"stretchOrShrink",Te=(R.image.content[2]-R.image.content[0])/(R.image.content[3]-R.image.content[1]);if(Ce==="proportional"){if(ge==="stretchOnly"&&ce/meTe){let Oe=Math.ceil(ce/Te);te*=Oe/me,me=Oe}return{x1:Y,y1:te,x2:Y+ce,y2:te+me}}function rS(R,d,L,Y,te,ce){let me=R.image,ge;if(me.content){let Qt=me.content,er=me.pixelRatio||1;ge=[Qt[0]/er,Qt[1]/er,me.displaySize[0]-Qt[2]/er,me.displaySize[1]-Qt[3]/er]}let Ce=d.left*ce,Te=d.right*ce,Oe,Pe,it,He;L==="width"||L==="both"?(He=te[0]+Ce-Y[3],Pe=te[0]+Te+Y[1]):(He=te[0]+(Ce+Te-me.displaySize[0])/2,Pe=He+me.displaySize[0]);let bt=d.top*ce,Et=d.bottom*ce;return L==="height"||L==="both"?(Oe=te[1]+bt-Y[0],it=te[1]+Et+Y[2]):(Oe=te[1]+(bt+Et-me.displaySize[1])/2,it=Oe+me.displaySize[1]),{image:me,top:Oe,right:Pe,bottom:it,left:He,collisionPadding:ge}}fi("ImagePosition",T3),fi("ImageAtlas",Q4),l.ax=void 0,(xp=l.ax||(l.ax={}))[xp.none=0]="none",xp[xp.horizontal=1]="horizontal",xp[xp.vertical=2]="vertical",xp[xp.horizontalOnly=3]="horizontalOnly";let Yd=128,bp=32640;function aS(R,d){let{expression:L}=d;if(L.kind==="constant")return{kind:"constant",layoutSize:L.evaluate(new oi(R+1))};if(L.kind==="source")return{kind:"source"};{let{zoomStops:Y,interpolationType:te}=L,ce=0;for(;ceme.id),this.index=d.index,this.pixelRatio=d.pixelRatio,this.sourceLayerIndex=d.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let L=this.layers[0]._unevaluatedLayout._values;this.textSizeData=aS(this.zoom,L["text-size"]),this.iconSizeData=aS(this.zoom,L["icon-size"]);let Y=this.layers[0].layout,te=Y.get("symbol-sort-key"),ce=Y.get("symbol-z-order");this.canOverlap=M3(Y,"text-overlap","text-allow-overlap")!=="never"||M3(Y,"icon-overlap","icon-allow-overlap")!=="never"||Y.get("text-ignore-placement")||Y.get("icon-ignore-placement"),this.sortFeaturesByKey=ce!=="viewport-y"&&!te.isConstant(),this.sortFeaturesByY=(ce==="viewport-y"||ce==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,Y.get("symbol-placement")==="point"&&(this.writingModes=Y.get("text-writing-mode").map(me=>l.ax[me])),this.stateDependentLayerIds=this.layers.filter(me=>me.isStateDependent()).map(me=>me.id),this.sourceID=d.sourceID}createArrays(){this.text=new E3(new mo(this.layers,this.zoom,d=>d.startsWith("text"))),this.icon=new E3(new mo(this.layers,this.zoom,d=>d.startsWith("icon"))),this.glyphOffsetArray=new ut,this.lineVertexArray=new ft,this.symbolInstances=new Ze,this.textAnchorOffsets=new Gt}calculateGlyphDependencies(d,L,Y,te,ce){for(let me of d)if(L[me.codePointAt(0)]=!0,(Y||te)&&ce){let ge=R1[me];ge&&(L[ge.codePointAt(0)]=!0)}}populate(d,L,Y){var te;let ce=this.layers[0],me=ce.layout,ge=me.get("text-font"),Ce=me.get("text-field"),Te=me.get("icon-image"),Oe=(Ce.value.kind!=="constant"||Ce.value.value instanceof Di&&!Ce.value.value.isEmpty()||Ce.value.value.toString().length>0)&&(ge.value.kind!=="constant"||ge.value.value.length>0),Pe=Te.value.kind!=="constant"||!!Te.value.value||Object.keys(Te.parameters).length>0,it=me.get("symbol-sort-key");if(this.features=[],!Oe&&!Pe)return;let He=L.iconDependencies,bt=L.glyphDependencies,Et=L.availableImages,Qt=new oi(this.zoom);for(let{feature:er,id:br,index:sr,sourceLayerIndex:Mr}of d){let qr=ce._featureFilter.needGeometry,$r=fo(er,qr);if(!ce._featureFilter.filter(Qt,$r,Y))continue;let _a,Ca;if(qr||($r.geometry=ql(er)),Oe){let qa=ce.getValueAndResolveTokens("text-field",$r,Y,Et),bn=Di.factory(qa);this.hasRTLText||(this.hasRTLText=pY(bn)),(!this.hasRTLText||Si.getRTLTextPluginStatus()==="unavailable"||this.hasRTLText&&Si.isParsed())&&(_a=HW(bn,ce,$r))}if(Pe){let qa=ce.getValueAndResolveTokens("icon-image",$r,Y,Et);Ca=qa instanceof qi?qa:qi.fromString(qa)}if(!_a&&!Ca)continue;let nn=this.sortFeaturesByKey?it.evaluate($r,{},Y):void 0;if(this.features.push({id:br,text:_a,icon:Ca,index:sr,sourceLayerIndex:Mr,geometry:$r.geometry,properties:er.properties,type:E1.types[er.type],sortKey:nn}),Ca&&(He[Ca.name]=!0),_a){let qa=ge.evaluate($r,{},Y).join(","),bn=me.get("text-rotation-alignment")!=="viewport"&&me.get("symbol-placement")!=="point";this.allowVerticalPlacement=(te=this.writingModes)===null||te===void 0?void 0:te.includes(l.ax.vertical);for(let Fn of _a.sections)if(Fn.image)He[Fn.image.name]=!0;else{let gn=Br(_a.toString()),Va=Fn.fontStack||qa;bt[Va]||(bt[Va]={}),this.calculateGlyphDependencies(Fn.text,bt[Va],bn,this.allowVerticalPlacement,gn)}}}me.get("symbol-placement")==="line"&&(this.features=function(er){let br={},sr={},Mr=[],qr=0;function $r(qa){Mr.push(er[qa]),qr++}function _a(qa,bn,Fn){let gn=sr[qa];return delete sr[qa],sr[bn]=gn,Mr[gn].geometry[0].pop(),Mr[gn].geometry[0]=Mr[gn].geometry[0].concat(Fn[0]),gn}function Ca(qa,bn,Fn){let gn=br[bn];return delete br[bn],br[qa]=gn,Mr[gn].geometry[0].shift(),Mr[gn].geometry[0]=Fn[0].concat(Mr[gn].geometry[0]),gn}function nn(qa,bn,Fn){let gn=Fn?bn[0][bn[0].length-1]:bn[0][0];return`${qa}:${gn.x}:${gn.y}`}for(let qa=0;qaqa.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((er,br)=>er.sortKey-br.sortKey)}update(d,L,Y){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:Y}),this.icon.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:Y}))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(d){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(d),this.iconCollisionBox.upload(d)),this.text.upload(d,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(d,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(d,L){let Y=this.lineVertexArray.length;if(d.segment!==void 0){let te=d.dist(L[d.segment+1]),ce=d.dist(L[d.segment]),me={};for(let ge=d.segment+1;ge=0;ge--)me[ge]={x:L[ge].x,y:L[ge].y,tileUnitDistanceFromAnchor:ce},ge>0&&(ce+=L[ge-1].dist(L[ge]));for(let ge=0;ge0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(d,L){let Y=d.placedSymbolArray.get(L),te=Y.vertexStartIndex+4*Y.numGlyphs;for(let ce=Y.vertexStartIndex;cete[ge]-te[Ce]||ce[Ce]-ce[ge]),me}addToSortKeyRanges(d,L){let Y=this.sortKeyRanges[this.sortKeyRanges.length-1];Y?.sortKey===L?Y.symbolInstanceEnd=d+1:this.sortKeyRanges.push({sortKey:L,symbolInstanceStart:d,symbolInstanceEnd:d+1})}sortFeatures(d){if(this.sortFeaturesByY&&this.sortedAngle!==d&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(d),this.sortedAngle=d,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let L of this.symbolInstanceIndexes){let Y=this.symbolInstances.get(L);this.featureSortOrder.push(Y.featureIndex);let te=[Y.rightJustifiedTextSymbolIndex,Y.centerJustifiedTextSymbolIndex,Y.leftJustifiedTextSymbolIndex];for(let ce=0;ce=0&&te.indexOf(me)===ce&&this.addIndicesForPlacedSymbol(this.text,me)}Y.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Y.verticalPlacedTextSymbolIndex),Y.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Y.placedIconSymbolIndex),Y.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Y.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let nS,iS;fi("SymbolBucket",M0,{omit:["layers","collisionBoxArray","features","compareText"]}),M0.MAX_GLYPHS=65535,M0.addDynamicAttributes=S3;var C3={get paint(){return iS=iS||new Ps({"icon-opacity":new wi(ht.paint_symbol["icon-opacity"]),"icon-color":new wi(ht.paint_symbol["icon-color"]),"icon-halo-color":new wi(ht.paint_symbol["icon-halo-color"]),"icon-halo-width":new wi(ht.paint_symbol["icon-halo-width"]),"icon-halo-blur":new wi(ht.paint_symbol["icon-halo-blur"]),"icon-translate":new hi(ht.paint_symbol["icon-translate"]),"icon-translate-anchor":new hi(ht.paint_symbol["icon-translate-anchor"]),"text-opacity":new wi(ht.paint_symbol["text-opacity"]),"text-color":new wi(ht.paint_symbol["text-color"],{runtimeType:cr,getOverride:R=>R.textColor,hasOverride:R=>!!R.textColor}),"text-halo-color":new wi(ht.paint_symbol["text-halo-color"]),"text-halo-width":new wi(ht.paint_symbol["text-halo-width"]),"text-halo-blur":new wi(ht.paint_symbol["text-halo-blur"]),"text-translate":new hi(ht.paint_symbol["text-translate"]),"text-translate-anchor":new hi(ht.paint_symbol["text-translate-anchor"])})},get layout(){return nS=nS||new Ps({"symbol-placement":new hi(ht.layout_symbol["symbol-placement"]),"symbol-spacing":new hi(ht.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new hi(ht.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new wi(ht.layout_symbol["symbol-sort-key"]),"symbol-z-order":new hi(ht.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new hi(ht.layout_symbol["icon-allow-overlap"]),"icon-overlap":new hi(ht.layout_symbol["icon-overlap"]),"icon-ignore-placement":new hi(ht.layout_symbol["icon-ignore-placement"]),"icon-optional":new hi(ht.layout_symbol["icon-optional"]),"icon-rotation-alignment":new hi(ht.layout_symbol["icon-rotation-alignment"]),"icon-size":new wi(ht.layout_symbol["icon-size"]),"icon-text-fit":new hi(ht.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new hi(ht.layout_symbol["icon-text-fit-padding"]),"icon-image":new wi(ht.layout_symbol["icon-image"]),"icon-rotate":new wi(ht.layout_symbol["icon-rotate"]),"icon-padding":new wi(ht.layout_symbol["icon-padding"]),"icon-keep-upright":new hi(ht.layout_symbol["icon-keep-upright"]),"icon-offset":new wi(ht.layout_symbol["icon-offset"]),"icon-anchor":new wi(ht.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new hi(ht.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new hi(ht.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new hi(ht.layout_symbol["text-rotation-alignment"]),"text-field":new wi(ht.layout_symbol["text-field"]),"text-font":new wi(ht.layout_symbol["text-font"]),"text-size":new wi(ht.layout_symbol["text-size"]),"text-max-width":new wi(ht.layout_symbol["text-max-width"]),"text-line-height":new hi(ht.layout_symbol["text-line-height"]),"text-letter-spacing":new wi(ht.layout_symbol["text-letter-spacing"]),"text-justify":new wi(ht.layout_symbol["text-justify"]),"text-radial-offset":new wi(ht.layout_symbol["text-radial-offset"]),"text-variable-anchor":new hi(ht.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new wi(ht.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new wi(ht.layout_symbol["text-anchor"]),"text-max-angle":new hi(ht.layout_symbol["text-max-angle"]),"text-writing-mode":new hi(ht.layout_symbol["text-writing-mode"]),"text-rotate":new wi(ht.layout_symbol["text-rotate"]),"text-padding":new hi(ht.layout_symbol["text-padding"]),"text-keep-upright":new hi(ht.layout_symbol["text-keep-upright"]),"text-transform":new wi(ht.layout_symbol["text-transform"]),"text-offset":new wi(ht.layout_symbol["text-offset"]),"text-allow-overlap":new hi(ht.layout_symbol["text-allow-overlap"]),"text-overlap":new hi(ht.layout_symbol["text-overlap"]),"text-ignore-placement":new hi(ht.layout_symbol["text-ignore-placement"]),"text-optional":new hi(ht.layout_symbol["text-optional"])})}};class oS{constructor(d){if(d.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=d.property.overrides?d.property.overrides.runtimeType:Yt,this.defaultValue=d}evaluate(d){if(d.formattedSection){let L=this.defaultValue.property.overrides;if(L?.hasOverride(d.formattedSection))return L.getOverride(d.formattedSection)}return d.feature&&d.featureState?this.defaultValue.evaluate(d.feature,d.featureState):this.defaultValue.property.specification.default}eachChild(d){this.defaultValue.isConstant()||d(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}fi("FormatSectionOverride",oS,{omit:["defaultValue"]});class wy extends ll{constructor(d,L){super(d,C3,L)}recalculate(d,L){if(super.recalculate(d,L),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let Y=this.layout.get("text-writing-mode");if(Y){let te=[];for(let ce of Y)te.includes(ce)||te.push(ce);this.layout._values["text-writing-mode"]=te}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(d,L,Y,te){let ce=this.layout.get(d).evaluate(L,{},Y,te),me=this._unevaluatedLayout._values[d];return me.isDataDriven()||kc(me.value)||!ce?ce:function(ge,Ce){return Ce.replace(/{([^{}]+)}/g,(Te,Oe)=>ge&&Oe in ge?String(ge[Oe]):"")}(L.properties,ce)}createBucket(d){return new M0(d)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let d of C3.paint.overridableProperties){if(!wy.hasPaintOverride(this.layout,d))continue;let L=this.paint.get(d),Y=new oS(L),te=new kl(Y,L.property.specification),ce=null;ce=L.value.kind==="constant"||L.value.kind==="source"?new Lc("source",te):new vc("composite",te,L.value.zoomStops),this.paint._values[d]=new Hs(L.property,ce,L.parameters)}}_handleOverridablePaintPropertyUpdate(d,L,Y){return!(!this.layout||L.isDataDriven()||Y.isDataDriven())&&wy.hasPaintOverride(this.layout,d)}static hasPaintOverride(d,L){let Y=d.get("text-field"),te=C3.paint.properties[L],ce=!1,me=ge=>{var Ce;for(let Te of ge)if(!((Ce=te.overrides)===null||Ce===void 0)&&Ce.hasOverride(Te))return void(ce=!0)};if(Y.value.kind==="constant"&&Y.value.value instanceof Di)me(Y.value.value.sections);else if(Y.value.kind==="source"||Y.value.kind==="composite"){let ge=Te=>{ce||(Te instanceof Mi&&qn(Te.value)===Pa?me(Te.value.sections):Te instanceof vs?me(Te.sections):Te.eachChild(ge))},Ce=Y.value;Ce._styleExpression&&ge(Ce._styleExpression.expression)}return ce}}let sS;var vY={get paint(){return sS=sS||new Ps({"background-color":new hi(ht.paint_background["background-color"]),"background-pattern":new sc(ht.paint_background["background-pattern"]),"background-opacity":new hi(ht.paint_background["background-opacity"])})}};class mY extends ll{constructor(d,L){super(d,vY,L)}}class gY extends ll{constructor(d,L){super(d,{},L),this.onAdd=Y=>{this.implementation.onAdd&&this.implementation.onAdd(Y,Y.painter.context.gl)},this.onRemove=Y=>{this.implementation.onRemove&&this.implementation.onRemove(Y,Y.painter.context.gl)},this.implementation=d}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class yY{constructor(d){this._methodToThrottle=d,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var d;this._triggered||(this._triggered=!0,(d=this._channel)===null||d===void 0||d.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let _Y={once:!0},L3=63710088e-1;class wp{constructor(d,L){if(isNaN(d)||isNaN(L))throw new Error(`Invalid LngLat object: (${d}, ${L})`);if(this.lng=+d,this.lat=+L,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new wp(V(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(d){let L=Math.PI/180,Y=this.lat*L,te=d.lat*L,ce=Math.sin(Y)*Math.sin(te)+Math.cos(Y)*Math.cos(te)*Math.cos((d.lng-this.lng)*L);return L3*Math.acos(Math.min(ce,1))}static convert(d){if(d instanceof wp)return d;if(Array.isArray(d)&&(d.length===2||d.length===3))return new wp(Number(d[0]),Number(d[1]));if(!Array.isArray(d)&&typeof d=="object"&&d!==null)return new wp(Number("lng"in d?d.lng:d.lon),Number(d.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let lS=2*Math.PI*L3;function uS(R){return lS*Math.cos(R*Math.PI/180)}function cS(R){return(180+R)/360}function fS(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function hS(R,d){return R/uS(d)}function dS(R){return 360*R-180}function Ty(R){return 360/Math.PI*Math.atan(Math.exp((180-360*R)*Math.PI/180))-90}function pS(R,d){return R*uS(Ty(d))}class I1{constructor(d,L,Y=0){this.x=+d,this.y=+L,this.z=+Y}static fromLngLat(d,L=0){let Y=wp.convert(d);return new I1(cS(Y.lng),fS(Y.lat),hS(L,Y.lat))}toLngLat(){return new wp(dS(this.x),Ty(this.y))}toAltitude(){return pS(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/lS*(d=Ty(this.y),1/Math.cos(d*Math.PI/180));var d}}function vS(R,d,L){var Y=2*Math.PI*6378137/256/Math.pow(2,L);return[R*Y-2*Math.PI*6378137/2,d*Y-2*Math.PI*6378137/2]}class P3{constructor(d,L,Y){if(!function(te,ce,me){return!(te<0||te>25||me<0||me>=Math.pow(2,te)||ce<0||ce>=Math.pow(2,te))}(d,L,Y))throw new Error(`x=${L}, y=${Y}, z=${d} outside of bounds. 0<=x<${Math.pow(2,d)}, 0<=y<${Math.pow(2,d)} 0<=z<=25 `);this.z=d,this.x=L,this.y=Y,this.key=S0(0,d,d,L,Y)}equals(d){return this.z===d.z&&this.x===d.x&&this.y===d.y}url(d,L,Y){let te=(me=this.y,ge=this.z,Ce=vS(256*(ce=this.x),256*(me=Math.pow(2,ge)-me-1),ge),Te=vS(256*(ce+1),256*(me+1),ge),Ce[0]+","+Ce[1]+","+Te[0]+","+Te[1]);var ce,me,ge,Ce,Te;let Oe=function(Pe,it,He){let bt="";for(let Et=Pe;Et>0;Et--){let Qt=1<1?"@2x":"").replace(/{quadkey}/g,Oe).replace(/{bbox-epsg-3857}/g,te)}isChildOf(d){let L=this.z-d.z;return L>0&&d.x===this.x>>L&&d.y===this.y>>L}getTilePoint(d){let L=Math.pow(2,this.z);return new t((d.x*L-this.x)*F,(d.y*L-this.y)*F)}toString(){return`${this.z}/${this.x}/${this.y}`}}class mS{constructor(d,L){this.wrap=d,this.canonical=L,this.key=S0(d,L.z,L.z,L.x,L.y)}}class Ph{constructor(d,L,Y,te,ce){if(this.terrainRttPosMatrix32f=null,d= z; overscaledZ = ${d}; z = ${Y}`);this.overscaledZ=d,this.wrap=L,this.canonical=new P3(Y,+te,+ce),this.key=S0(L,d,Y,te,ce)}clone(){return new Ph(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(d){return this.overscaledZ===d.overscaledZ&&this.wrap===d.wrap&&this.canonical.equals(d.canonical)}scaledTo(d){if(d>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${d}; overscaledZ = ${this.overscaledZ}`);let L=this.canonical.z-d;return d>this.canonical.z?new Ph(d,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ph(d,this.wrap,d,this.canonical.x>>L,this.canonical.y>>L)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(d,L){if(d>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${d}; overscaledZ = ${this.overscaledZ}`);let Y=this.canonical.z-d;return d>this.canonical.z?S0(this.wrap*+L,d,this.canonical.z,this.canonical.x,this.canonical.y):S0(this.wrap*+L,d,d,this.canonical.x>>Y,this.canonical.y>>Y)}isChildOf(d){if(d.wrap!==this.wrap||this.overscaledZ-d.overscaledZ<=0)return!1;if(d.overscaledZ===0)return this.overscaledZ>0;let L=this.canonical.z-d.canonical.z;return!(L<0)&&d.canonical.x===this.canonical.x>>L&&d.canonical.y===this.canonical.y>>L}children(d){if(this.overscaledZ>=d)return[new Ph(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let L=this.canonical.z+1,Y=2*this.canonical.x,te=2*this.canonical.y;return[new Ph(L,this.wrap,L,Y,te),new Ph(L,this.wrap,L,Y+1,te),new Ph(L,this.wrap,L,Y,te+1),new Ph(L,this.wrap,L,Y+1,te+1)]}isLessThan(d){return this.wrapd.wrap)&&(this.overscaledZd.overscaledZ)&&(this.canonical.xd.canonical.x)&&this.canonical.y=0&&d=0&&L=Te)return null;let Pe=this.canonical.x+te,it=this.wrap;return Pe<0?(it-=Math.ceil(-Pe/Te),Pe=(Pe%Te+Te)%Te):Pe>=Te&&(it+=Math.floor(Pe/Te),Pe%=Te),{tileID:new Ph(this.overscaledZ,it,Ce,Pe,Oe),x:me,y:ge}}}function S0(R,d,L,Y,te){(R*=2)<0&&(R=-1*R-1);let ce=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(d){return this.expandBy(-d)}map(d){let L=new Ev;return L.extend(d(new t(this.minX,this.minY))),L.extend(d(new t(this.maxX,this.minY))),L.extend(d(new t(this.minX,this.maxY))),L.extend(d(new t(this.maxX,this.maxY))),L}static fromPoints(d){let L=new Ev;for(let Y of d)L.extend(Y);return L}contains(d){return d.x>=this.minX&&d.x<=this.maxX&&d.y>=this.minY&&d.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(d){return!this.empty()&&!d.empty()&&d.minX>=this.minX&&d.maxX<=this.maxX&&d.minY>=this.minY&&d.maxY<=this.maxY}intersects(d){return!this.empty()&&!d.empty()&&d.minX<=this.maxX&&d.maxX>=this.minX&&d.minY<=this.maxY&&d.maxY>=this.minY}}class gS{constructor(d){this._stringToNumber={},this._numberToString=[];for(let L=0;L=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${d} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[d]}}class yS{constructor(d,L,Y,te,ce){this.type="Feature",this._vectorTileFeature=d,this._x=Y,this._y=te,this._z=L,this.properties=d.properties,this.id=ce}projectPoint(d,L,Y,te){return[360*(d.x+L)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(d.y+Y)/te)*Math.PI))-90]}projectLine(d,L,Y,te){return d.map(ce=>this.projectPoint(ce,L,Y,te))}get geometry(){if(this._geometry)return this._geometry;let d=this._vectorTileFeature,L=d.extent*Math.pow(2,this._z),Y=d.extent*this._x,te=d.extent*this._y,ce=d.loadGeometry();switch(d.type){case 1:{let me=[];for(let Ce of ce)me.push(Ce[0]);let ge=this.projectLine(me,Y,te,L);this._geometry=me.length===1?{type:"Point",coordinates:ge[0]}:{type:"MultiPoint",coordinates:ge};break}case 2:{let me=ce.map(ge=>this.projectLine(ge,Y,te,L));this._geometry=me.length===1?{type:"LineString",coordinates:me[0]}:{type:"MultiLineString",coordinates:me};break}case 3:{let me=b4(ce),ge=[];for(let Ce of me)ge.push(Ce.map(Te=>this.projectLine(Te,Y,te,L)));this._geometry=ge.length===1?{type:"Polygon",coordinates:ge[0]}:{type:"MultiPolygon",coordinates:ge};break}default:throw new Error(`unknown feature type: ${d.type}`)}return this._geometry}set geometry(d){this._geometry=d}toJSON(){let d={geometry:this.geometry};for(let L in this)L!=="_geometry"&&L!=="_vectorTileFeature"&&L!=="_x"&&L!=="_y"&&L!=="_z"&&(d[L]=this[L]);return d}}class E0{constructor(d,L,Y){this._name=d,this.dataBuffer=L,typeof Y=="number"?this._size=Y:(this.nullabilityBuffer=Y,this._size=Y.size())}getValue(d){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(d)?null:this.getValueFromBuffer(d)}has(d){var L;return((L=this.nullabilityBuffer)==null?void 0:L.get(d))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class Ay extends E0{}class R3 extends Ay{getValueFromBuffer(d){return this.dataBuffer[d]}}class I3 extends Ay{getValueFromBuffer(d){return this.dataBuffer[d]}}class _S extends E0{constructor(d,L,Y,te){super(d,L,te),this.delta=Y}}class D3 extends _S{constructor(d,L,Y,te){super(d,Int32Array.of(L),Y,te)}getValueFromBuffer(d){return this.dataBuffer[0]+d*this.delta}}class F3 extends E0{constructor(d,L,Y,te){super(d,te?Int32Array.of(L):Uint32Array.of(L),Y)}getValueFromBuffer(d){return this.dataBuffer[0]}}class xY{constructor(d,L,Y,te,ce=4096){this._name=d,this._geometryVector=L,this._idVector=Y,this._propertyVectors=te,this._extent=ce}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(d){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map(L=>[L.name,L]))),this.propertyVectorsMap.get(d)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let d=[],L=this.geometryVector.getGeometries();for(let Y=0;Y>>32-R;let B3=z3,Xd=256;function O3(R,d){return R-R%d}function bY(R){let d=R>>>0;return((255&d)<<24|(65280&d)<<8|d>>>8&65280|d>>>24&255)>>>0}let N3=function(){if(!Number.isFinite(65536))return 65536;let R=O3(Math.floor(65536),Xd);return R===0?Xd:R}(),wY=3*N3/Xd+N3|0;function bS(){let R=new Uint8Array(wY);return{dataToBePacked:new Array(33),dataPointers:new Int32Array(33),byteContainer:R,byteContainerI32:new Int32Array(R.buffer,R.byteOffset,R.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function TY(R,d,L,Y,te){switch(te){case 1:(function(ce,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ce[Oe++]>>>0;ge[Te++]=it>>>0&1,ge[Te++]=it>>>1&1,ge[Te++]=it>>>2&1,ge[Te++]=it>>>3&1,ge[Te++]=it>>>4&1,ge[Te++]=it>>>5&1,ge[Te++]=it>>>6&1,ge[Te++]=it>>>7&1,ge[Te++]=it>>>8&1,ge[Te++]=it>>>9&1,ge[Te++]=it>>>10&1,ge[Te++]=it>>>11&1,ge[Te++]=it>>>12&1,ge[Te++]=it>>>13&1,ge[Te++]=it>>>14&1,ge[Te++]=it>>>15&1,ge[Te++]=it>>>16&1,ge[Te++]=it>>>17&1,ge[Te++]=it>>>18&1,ge[Te++]=it>>>19&1,ge[Te++]=it>>>20&1,ge[Te++]=it>>>21&1,ge[Te++]=it>>>22&1,ge[Te++]=it>>>23&1,ge[Te++]=it>>>24&1,ge[Te++]=it>>>25&1,ge[Te++]=it>>>26&1,ge[Te++]=it>>>27&1,ge[Te++]=it>>>28&1,ge[Te++]=it>>>29&1,ge[Te++]=it>>>30&1,ge[Te++]=it>>>31&1}})(R,d,L,Y);break;case 2:(function(ce,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ce[Oe++]>>>0,He=ce[Oe++]>>>0;ge[Te++]=it>>>0&3,ge[Te++]=it>>>2&3,ge[Te++]=it>>>4&3,ge[Te++]=it>>>6&3,ge[Te++]=it>>>8&3,ge[Te++]=it>>>10&3,ge[Te++]=it>>>12&3,ge[Te++]=it>>>14&3,ge[Te++]=it>>>16&3,ge[Te++]=it>>>18&3,ge[Te++]=it>>>20&3,ge[Te++]=it>>>22&3,ge[Te++]=it>>>24&3,ge[Te++]=it>>>26&3,ge[Te++]=it>>>28&3,ge[Te++]=it>>>30&3,ge[Te++]=He>>>0&3,ge[Te++]=He>>>2&3,ge[Te++]=He>>>4&3,ge[Te++]=He>>>6&3,ge[Te++]=He>>>8&3,ge[Te++]=He>>>10&3,ge[Te++]=He>>>12&3,ge[Te++]=He>>>14&3,ge[Te++]=He>>>16&3,ge[Te++]=He>>>18&3,ge[Te++]=He>>>20&3,ge[Te++]=He>>>22&3,ge[Te++]=He>>>24&3,ge[Te++]=He>>>26&3,ge[Te++]=He>>>28&3,ge[Te++]=He>>>30&3}})(R,d,L,Y);break;case 3:(function(ce,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ce[Oe++]>>>0,He=ce[Oe++]>>>0,bt=ce[Oe++]>>>0;ge[Te++]=it>>>0&7,ge[Te++]=it>>>3&7,ge[Te++]=it>>>6&7,ge[Te++]=it>>>9&7,ge[Te++]=it>>>12&7,ge[Te++]=it>>>15&7,ge[Te++]=it>>>18&7,ge[Te++]=it>>>21&7,ge[Te++]=it>>>24&7,ge[Te++]=it>>>27&7,ge[Te++]=7&(it>>>30|(1&He)<<2),ge[Te++]=He>>>1&7,ge[Te++]=He>>>4&7,ge[Te++]=He>>>7&7,ge[Te++]=He>>>10&7,ge[Te++]=He>>>13&7,ge[Te++]=He>>>16&7,ge[Te++]=He>>>19&7,ge[Te++]=He>>>22&7,ge[Te++]=He>>>25&7,ge[Te++]=He>>>28&7,ge[Te++]=7&(He>>>31|(3&bt)<<1),ge[Te++]=bt>>>2&7,ge[Te++]=bt>>>5&7,ge[Te++]=bt>>>8&7,ge[Te++]=bt>>>11&7,ge[Te++]=bt>>>14&7,ge[Te++]=bt>>>17&7,ge[Te++]=bt>>>20&7,ge[Te++]=bt>>>23&7,ge[Te++]=bt>>>26&7,ge[Te++]=bt>>>29&7}})(R,d,L,Y);break;case 4:(function(ce,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ce[Oe++]>>>0,He=ce[Oe++]>>>0,bt=ce[Oe++]>>>0,Et=ce[Oe++]>>>0;ge[Te++]=it>>>0&15,ge[Te++]=it>>>4&15,ge[Te++]=it>>>8&15,ge[Te++]=it>>>12&15,ge[Te++]=it>>>16&15,ge[Te++]=it>>>20&15,ge[Te++]=it>>>24&15,ge[Te++]=it>>>28&15,ge[Te++]=He>>>0&15,ge[Te++]=He>>>4&15,ge[Te++]=He>>>8&15,ge[Te++]=He>>>12&15,ge[Te++]=He>>>16&15,ge[Te++]=He>>>20&15,ge[Te++]=He>>>24&15,ge[Te++]=He>>>28&15,ge[Te++]=bt>>>0&15,ge[Te++]=bt>>>4&15,ge[Te++]=bt>>>8&15,ge[Te++]=bt>>>12&15,ge[Te++]=bt>>>16&15,ge[Te++]=bt>>>20&15,ge[Te++]=bt>>>24&15,ge[Te++]=bt>>>28&15,ge[Te++]=Et>>>0&15,ge[Te++]=Et>>>4&15,ge[Te++]=Et>>>8&15,ge[Te++]=Et>>>12&15,ge[Te++]=Et>>>16&15,ge[Te++]=Et>>>20&15,ge[Te++]=Et>>>24&15,ge[Te++]=Et>>>28&15}})(R,d,L,Y);break;case 5:(function(ce,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ce[Oe++]>>>0,He=ce[Oe++]>>>0,bt=ce[Oe++]>>>0,Et=ce[Oe++]>>>0,Qt=ce[Oe++]>>>0;ge[Te++]=it>>>0&31,ge[Te++]=it>>>5&31,ge[Te++]=it>>>10&31,ge[Te++]=it>>>15&31,ge[Te++]=it>>>20&31,ge[Te++]=it>>>25&31,ge[Te++]=31&(it>>>30|(7&He)<<2),ge[Te++]=He>>>3&31,ge[Te++]=He>>>8&31,ge[Te++]=He>>>13&31,ge[Te++]=He>>>18&31,ge[Te++]=He>>>23&31,ge[Te++]=31&(He>>>28|(1&bt)<<4),ge[Te++]=bt>>>1&31,ge[Te++]=bt>>>6&31,ge[Te++]=bt>>>11&31,ge[Te++]=bt>>>16&31,ge[Te++]=bt>>>21&31,ge[Te++]=bt>>>26&31,ge[Te++]=31&(bt>>>31|(15&Et)<<1),ge[Te++]=Et>>>4&31,ge[Te++]=Et>>>9&31,ge[Te++]=Et>>>14&31,ge[Te++]=Et>>>19&31,ge[Te++]=Et>>>24&31,ge[Te++]=31&(Et>>>29|(3&Qt)<<3),ge[Te++]=Qt>>>2&31,ge[Te++]=Qt>>>7&31,ge[Te++]=Qt>>>12&31,ge[Te++]=Qt>>>17&31,ge[Te++]=Qt>>>22&31,ge[Te++]=Qt>>>27&31}})(R,d,L,Y);break;case 6:(function(ce,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ce[Oe++]>>>0,He=ce[Oe++]>>>0,bt=ce[Oe++]>>>0,Et=ce[Oe++]>>>0,Qt=ce[Oe++]>>>0,er=ce[Oe++]>>>0;ge[Te++]=it>>>0&63,ge[Te++]=it>>>6&63,ge[Te++]=it>>>12&63,ge[Te++]=it>>>18&63,ge[Te++]=it>>>24&63,ge[Te++]=63&(it>>>30|(15&He)<<2),ge[Te++]=He>>>4&63,ge[Te++]=He>>>10&63,ge[Te++]=He>>>16&63,ge[Te++]=He>>>22&63,ge[Te++]=63&(He>>>28|(3&bt)<<4),ge[Te++]=bt>>>2&63,ge[Te++]=bt>>>8&63,ge[Te++]=bt>>>14&63,ge[Te++]=bt>>>20&63,ge[Te++]=bt>>>26&63,ge[Te++]=Et>>>0&63,ge[Te++]=Et>>>6&63,ge[Te++]=Et>>>12&63,ge[Te++]=Et>>>18&63,ge[Te++]=Et>>>24&63,ge[Te++]=63&(Et>>>30|(15&Qt)<<2),ge[Te++]=Qt>>>4&63,ge[Te++]=Qt>>>10&63,ge[Te++]=Qt>>>16&63,ge[Te++]=Qt>>>22&63,ge[Te++]=63&(Qt>>>28|(3&er)<<4),ge[Te++]=er>>>2&63,ge[Te++]=er>>>8&63,ge[Te++]=er>>>14&63,ge[Te++]=er>>>20&63,ge[Te++]=er>>>26&63}})(R,d,L,Y);break;case 7:(function(ce,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ce[Oe++]>>>0,He=ce[Oe++]>>>0,bt=ce[Oe++]>>>0,Et=ce[Oe++]>>>0,Qt=ce[Oe++]>>>0,er=ce[Oe++]>>>0,br=ce[Oe++]>>>0;ge[Te++]=it>>>0&127,ge[Te++]=it>>>7&127,ge[Te++]=it>>>14&127,ge[Te++]=it>>>21&127,ge[Te++]=127&(it>>>28|(7&He)<<4),ge[Te++]=He>>>3&127,ge[Te++]=He>>>10&127,ge[Te++]=He>>>17&127,ge[Te++]=He>>>24&127,ge[Te++]=127&(He>>>31|(63&bt)<<1),ge[Te++]=bt>>>6&127,ge[Te++]=bt>>>13&127,ge[Te++]=bt>>>20&127,ge[Te++]=127&(bt>>>27|(3&Et)<<5),ge[Te++]=Et>>>2&127,ge[Te++]=Et>>>9&127,ge[Te++]=Et>>>16&127,ge[Te++]=Et>>>23&127,ge[Te++]=127&(Et>>>30|(31&Qt)<<2),ge[Te++]=Qt>>>5&127,ge[Te++]=Qt>>>12&127,ge[Te++]=Qt>>>19&127,ge[Te++]=127&(Qt>>>26|(1&er)<<6),ge[Te++]=er>>>1&127,ge[Te++]=er>>>8&127,ge[Te++]=er>>>15&127,ge[Te++]=er>>>22&127,ge[Te++]=127&(er>>>29|(15&br)<<3),ge[Te++]=br>>>4&127,ge[Te++]=br>>>11&127,ge[Te++]=br>>>18&127,ge[Te++]=br>>>25&127}})(R,d,L,Y);break;case 8:(function(ce,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ce[Oe++]>>>0,He=ce[Oe++]>>>0,bt=ce[Oe++]>>>0,Et=ce[Oe++]>>>0,Qt=ce[Oe++]>>>0,er=ce[Oe++]>>>0,br=ce[Oe++]>>>0,sr=ce[Oe++]>>>0;ge[Te++]=it>>>0&255,ge[Te++]=it>>>8&255,ge[Te++]=it>>>16&255,ge[Te++]=it>>>24&255,ge[Te++]=He>>>0&255,ge[Te++]=He>>>8&255,ge[Te++]=He>>>16&255,ge[Te++]=He>>>24&255,ge[Te++]=bt>>>0&255,ge[Te++]=bt>>>8&255,ge[Te++]=bt>>>16&255,ge[Te++]=bt>>>24&255,ge[Te++]=Et>>>0&255,ge[Te++]=Et>>>8&255,ge[Te++]=Et>>>16&255,ge[Te++]=Et>>>24&255,ge[Te++]=Qt>>>0&255,ge[Te++]=Qt>>>8&255,ge[Te++]=Qt>>>16&255,ge[Te++]=Qt>>>24&255,ge[Te++]=er>>>0&255,ge[Te++]=er>>>8&255,ge[Te++]=er>>>16&255,ge[Te++]=er>>>24&255,ge[Te++]=br>>>0&255,ge[Te++]=br>>>8&255,ge[Te++]=br>>>16&255,ge[Te++]=br>>>24&255,ge[Te++]=sr>>>0&255,ge[Te++]=sr>>>8&255,ge[Te++]=sr>>>16&255,ge[Te++]=sr>>>24&255}})(R,d,L,Y);break;case 16:(function(ce,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<128;Pe++){let it=ce[Oe++]>>>0;ge[Te++]=65535&it,ge[Te++]=it>>>16&65535}})(R,d,L,Y);break;default:(function(ce,me,ge,Ce,Te){let Oe=B3[Te]>>>0,Pe=me,it=0,He=ce[Pe]>>>0,bt=Ce;for(let Et=0;Et<8;Et++){for(let Qt=0;Qt<32;Qt++)if(it+Te<=32)ge[bt+Qt]=He>>>it&Oe,it+=Te,it===32&&(it=0,Pe++,Qt!==31&&(He=ce[Pe]>>>0));else{let er=32-it,br=He>>>it;Pe++,He=ce[Pe]>>>0;let sr=Te-er;ge[bt+Qt]=(br|(He&-1>>>32-sr>>>0)<>>0)}})(R,d,L,Y,te)}return d+(te<<3)|0}function AY(R,d,L,Y){if(L+2>d)throw new Error(`FastPFOR decode: byteContainer underflow at block=${Y} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${L}, byteSize=${d})`);let te=R[L++],ce=R[L++];if(te>32)throw new Error(`FastPFOR decode: invalid bitWidth=${te} at block=${Y} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:te,exceptionCount:ce,bytePosIn:L}}function MY(R,d,L,Y,te,ce,me,ge,Ce){let{maxBits:Te,exceptionBitWidth:Oe,bytePosIn:Pe}=function(Qt,er,br,sr,Mr,qr){if(br+1>er)throw new Error(`FastPFOR decode: exception header underflow at block=${qr} (need 1 byte for maxBits, bytePos=${br}, byteSize=${er})`);let $r=Qt[br++];if($r32)throw new Error(`FastPFOR decode: invalid maxBits=${$r} at block=${qr} (bitWidth=${sr}, expected ${sr}..32)`);let _a=$r-sr|0;if(_a<1||_a>32)throw new Error(`FastPFOR decode: invalid exceptionBitWidth=${_a} at block=${qr} (bitWidth=${sr}, maxBits=${$r})`);if(br+Mr>er)throw new Error(`FastPFOR decode: exception positions underflow at block=${qr} (need=${Mr}, have=${er-br})`);return{maxBits:$r,exceptionBitWidth:_a,bytePosIn:br}}(te,ce,me,L,Y,Ce);if(me=Pe,Oe===1){let Qt=1<Et)throw new Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${Oe} (ptr=${bt}, need ${Y}, size=${Et}) at block ${Ce}`);for(let Qt=0;QtR.length-1)throw new Error(`FastPFOR decode: invalid whereMeta=${ge} at pageStart=${me} (expected > 0 and pageStart+whereMeta < encoded.length=${R.length})`);let Ce=me+1|0,Te=me+ge|0,Oe=R[Te]>>>0,Pe=Oe+3>>>2,it=Te+1,He=it+Pe;if(He>=R.length)throw new Error(`FastPFOR decode: invalid byteSize=${Oe} (metaInts=${Pe}, pageStart=${me}, packedEnd=${Te}, byteContainerStart=${it}) causes bitmapPos=${He} out of bounds (encoded.length=${R.length})`);let bt=function(er,br,sr,Mr){Mr.byteContainer.length>>2;if(3&qr.byteOffset)for(let Ca=0;Ca<$r;Ca=Ca+1|0){let nn=0|er[br+Ca|0],qa=Ca<<2;qr[qa]=255&nn,qr[qa+1|0]=nn>>>8&255,qr[qa+2|0]=nn>>>16&255,qr[qa+3|0]=nn>>>24&255}else{let Ca=Mr.byteContainerI32;(!Ca||Ca.buffer!==qr.buffer||Ca.byteOffset!==qr.byteOffset||Ca.length<$r)&&(Ca=Mr.byteContainerI32=new Int32Array(qr.buffer,qr.byteOffset,qr.byteLength>>>2)),Ca.set(er.subarray(br,br+$r))}let _a=3&sr;if(_a>0){let Ca=0|er[br+$r|0],nn=$r<<2;for(let qa=0;qa<_a;qa=qa+1|0)qr[nn+qa|0]=Ca>>>(qa<<3)&255}return qr}(R,it,Oe,ce),Et=Oe,Qt=function(er,br,sr){let Mr=0|er[br++],qr=sr.dataToBePacked;for(let $r=2;$r<=32;$r=$r+1|0){if(!(Mr>>>$r-1&1))continue;if(br>=er.length)throw new Error(`FastPFOR decode: truncated exception stream header (bitWidth=${$r}, streamWordIndex=${br}, needWords=1, availableWords=${er.length-br}, encodedWords=${er.length})`);let _a=er[br++]>>>0,Ca=O3(_a+31,32),nn=_a*$r+31>>>5;if(br+nn>er.length)throw new Error(`FastPFOR decode: truncated exception stream (bitWidth=${$r}, size=${_a}, streamWordIndex=${br}, needWords=${nn}, availableWords=${er.length-br}, encodedWords=${er.length})`);let qa=qr[$r];(!qa||qa.length>>5)|0,sr.exceptionSizes[$r]=_a}return br}(R,He,ce);return ce.dataPointers.fill(0),function(er,br,sr,Mr,qr,$r,_a,Ca,nn,qa){let bn=0|sr,Fn=0;for(let gn=0;gn<_a;gn=gn+1|0){let Va=AY(Ca,nn,Fn,gn);Fn=Va.bytePosIn;let Hn=Va.bitWidth,ni=Va.exceptionCount,Wn=$r+gn*Xd|0;switch(Hn){case 0:qr.fill(0,Wn,Wn+Xd);break;case 32:for(let si=0;si0&&(Fn=MY(qr,Wn,Hn,ni,Ca,nn,Fn,qa,gn))}if(bn!==Mr)throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${br}, packedStart=${sr}, consumedPackedEnd=${bn}, expectedPackedEnd=${Mr}, packedWords=${Mr-sr}, encoded.length=${er.length})`)}(R,me,Ce,Te,d,0|Y,te/Xd|0,bt,Et,ce),Qt}function EY(R,d,L,Y,te){switch(te){case 2:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0;Pe[He++]=bt>>>0&3,Pe[He++]=bt>>>2&3,Pe[He++]=bt>>>4&3,Pe[He++]=bt>>>6&3,Pe[He++]=bt>>>8&3,Pe[He++]=bt>>>10&3,Pe[He++]=bt>>>12&3,Pe[He++]=bt>>>14&3,Pe[He++]=bt>>>16&3,Pe[He++]=bt>>>18&3,Pe[He++]=bt>>>20&3,Pe[He++]=bt>>>22&3,Pe[He++]=bt>>>24&3,Pe[He++]=bt>>>26&3,Pe[He++]=bt>>>28&3,Pe[He++]=bt>>>30&3,Pe[He++]=Et>>>0&3,Pe[He++]=Et>>>2&3,Pe[He++]=Et>>>4&3,Pe[He++]=Et>>>6&3,Pe[He++]=Et>>>8&3,Pe[He++]=Et>>>10&3,Pe[He++]=Et>>>12&3,Pe[He++]=Et>>>14&3,Pe[He++]=Et>>>16&3,Pe[He++]=Et>>>18&3,Pe[He++]=Et>>>20&3,Pe[He++]=Et>>>22&3,Pe[He++]=Et>>>24&3,Pe[He++]=Et>>>26&3,Pe[He++]=Et>>>28&3,Pe[He]=Et>>>30&3}(R,d,L,Y);case 3:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0;Pe[He++]=bt>>>0&7,Pe[He++]=bt>>>3&7,Pe[He++]=bt>>>6&7,Pe[He++]=bt>>>9&7,Pe[He++]=bt>>>12&7,Pe[He++]=bt>>>15&7,Pe[He++]=bt>>>18&7,Pe[He++]=bt>>>21&7,Pe[He++]=bt>>>24&7,Pe[He++]=bt>>>27&7,Pe[He++]=7&(bt>>>30|(1&Et)<<2),Pe[He++]=Et>>>1&7,Pe[He++]=Et>>>4&7,Pe[He++]=Et>>>7&7,Pe[He++]=Et>>>10&7,Pe[He++]=Et>>>13&7,Pe[He++]=Et>>>16&7,Pe[He++]=Et>>>19&7,Pe[He++]=Et>>>22&7,Pe[He++]=Et>>>25&7,Pe[He++]=Et>>>28&7,Pe[He++]=7&(Et>>>31|(3&Qt)<<1),Pe[He++]=Qt>>>2&7,Pe[He++]=Qt>>>5&7,Pe[He++]=Qt>>>8&7,Pe[He++]=Qt>>>11&7,Pe[He++]=Qt>>>14&7,Pe[He++]=Qt>>>17&7,Pe[He++]=Qt>>>20&7,Pe[He++]=Qt>>>23&7,Pe[He++]=Qt>>>26&7,Pe[He]=Qt>>>29&7}(R,d,L,Y);case 4:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0;Pe[He++]=bt>>>0&15,Pe[He++]=bt>>>4&15,Pe[He++]=bt>>>8&15,Pe[He++]=bt>>>12&15,Pe[He++]=bt>>>16&15,Pe[He++]=bt>>>20&15,Pe[He++]=bt>>>24&15,Pe[He++]=bt>>>28&15,Pe[He++]=Et>>>0&15,Pe[He++]=Et>>>4&15,Pe[He++]=Et>>>8&15,Pe[He++]=Et>>>12&15,Pe[He++]=Et>>>16&15,Pe[He++]=Et>>>20&15,Pe[He++]=Et>>>24&15,Pe[He++]=Et>>>28&15,Pe[He++]=Qt>>>0&15,Pe[He++]=Qt>>>4&15,Pe[He++]=Qt>>>8&15,Pe[He++]=Qt>>>12&15,Pe[He++]=Qt>>>16&15,Pe[He++]=Qt>>>20&15,Pe[He++]=Qt>>>24&15,Pe[He++]=Qt>>>28&15,Pe[He++]=er>>>0&15,Pe[He++]=er>>>4&15,Pe[He++]=er>>>8&15,Pe[He++]=er>>>12&15,Pe[He++]=er>>>16&15,Pe[He++]=er>>>20&15,Pe[He++]=er>>>24&15,Pe[He]=er>>>28&15}(R,d,L,Y);case 5:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0;Pe[He++]=bt>>>0&31,Pe[He++]=bt>>>5&31,Pe[He++]=bt>>>10&31,Pe[He++]=bt>>>15&31,Pe[He++]=bt>>>20&31,Pe[He++]=bt>>>25&31,Pe[He++]=31&(bt>>>30|(7&Et)<<2),Pe[He++]=Et>>>3&31,Pe[He++]=Et>>>8&31,Pe[He++]=Et>>>13&31,Pe[He++]=Et>>>18&31,Pe[He++]=Et>>>23&31,Pe[He++]=31&(Et>>>28|(1&Qt)<<4),Pe[He++]=Qt>>>1&31,Pe[He++]=Qt>>>6&31,Pe[He++]=Qt>>>11&31,Pe[He++]=Qt>>>16&31,Pe[He++]=Qt>>>21&31,Pe[He++]=Qt>>>26&31,Pe[He++]=31&(Qt>>>31|(15&er)<<1),Pe[He++]=er>>>4&31,Pe[He++]=er>>>9&31,Pe[He++]=er>>>14&31,Pe[He++]=er>>>19&31,Pe[He++]=er>>>24&31,Pe[He++]=31&(er>>>29|(3&br)<<3),Pe[He++]=br>>>2&31,Pe[He++]=br>>>7&31,Pe[He++]=br>>>12&31,Pe[He++]=br>>>17&31,Pe[He++]=br>>>22&31,Pe[He]=br>>>27&31}(R,d,L,Y);case 6:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0;Pe[He++]=bt>>>0&63,Pe[He++]=bt>>>6&63,Pe[He++]=bt>>>12&63,Pe[He++]=bt>>>18&63,Pe[He++]=bt>>>24&63,Pe[He++]=63&(bt>>>30|(15&Et)<<2),Pe[He++]=Et>>>4&63,Pe[He++]=Et>>>10&63,Pe[He++]=Et>>>16&63,Pe[He++]=Et>>>22&63,Pe[He++]=63&(Et>>>28|(3&Qt)<<4),Pe[He++]=Qt>>>2&63,Pe[He++]=Qt>>>8&63,Pe[He++]=Qt>>>14&63,Pe[He++]=Qt>>>20&63,Pe[He++]=Qt>>>26&63,Pe[He++]=er>>>0&63,Pe[He++]=er>>>6&63,Pe[He++]=er>>>12&63,Pe[He++]=er>>>18&63,Pe[He++]=er>>>24&63,Pe[He++]=63&(er>>>30|(15&br)<<2),Pe[He++]=br>>>4&63,Pe[He++]=br>>>10&63,Pe[He++]=br>>>16&63,Pe[He++]=br>>>22&63,Pe[He++]=63&(br>>>28|(3&sr)<<4),Pe[He++]=sr>>>2&63,Pe[He++]=sr>>>8&63,Pe[He++]=sr>>>14&63,Pe[He++]=sr>>>20&63,Pe[He]=sr>>>26&63}(R,d,L,Y);case 7:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0;Pe[He++]=bt>>>0&127,Pe[He++]=bt>>>7&127,Pe[He++]=bt>>>14&127,Pe[He++]=bt>>>21&127,Pe[He++]=127&(bt>>>28|(7&Et)<<4),Pe[He++]=Et>>>3&127,Pe[He++]=Et>>>10&127,Pe[He++]=Et>>>17&127,Pe[He++]=Et>>>24&127,Pe[He++]=127&(Et>>>31|(63&Qt)<<1),Pe[He++]=Qt>>>6&127,Pe[He++]=Qt>>>13&127,Pe[He++]=Qt>>>20&127,Pe[He++]=127&(Qt>>>27|(3&er)<<5),Pe[He++]=er>>>2&127,Pe[He++]=er>>>9&127,Pe[He++]=er>>>16&127,Pe[He++]=er>>>23&127,Pe[He++]=127&(er>>>30|(31&br)<<2),Pe[He++]=br>>>5&127,Pe[He++]=br>>>12&127,Pe[He++]=br>>>19&127,Pe[He++]=127&(br>>>26|(1&sr)<<6),Pe[He++]=sr>>>1&127,Pe[He++]=sr>>>8&127,Pe[He++]=sr>>>15&127,Pe[He++]=sr>>>22&127,Pe[He++]=127&(sr>>>29|(15&Mr)<<3),Pe[He++]=Mr>>>4&127,Pe[He++]=Mr>>>11&127,Pe[He++]=Mr>>>18&127,Pe[He]=Mr>>>25&127}(R,d,L,Y);case 8:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0;Pe[He++]=bt>>>0&255,Pe[He++]=bt>>>8&255,Pe[He++]=bt>>>16&255,Pe[He++]=bt>>>24&255,Pe[He++]=Et>>>0&255,Pe[He++]=Et>>>8&255,Pe[He++]=Et>>>16&255,Pe[He++]=Et>>>24&255,Pe[He++]=Qt>>>0&255,Pe[He++]=Qt>>>8&255,Pe[He++]=Qt>>>16&255,Pe[He++]=Qt>>>24&255,Pe[He++]=er>>>0&255,Pe[He++]=er>>>8&255,Pe[He++]=er>>>16&255,Pe[He++]=er>>>24&255,Pe[He++]=br>>>0&255,Pe[He++]=br>>>8&255,Pe[He++]=br>>>16&255,Pe[He++]=br>>>24&255,Pe[He++]=sr>>>0&255,Pe[He++]=sr>>>8&255,Pe[He++]=sr>>>16&255,Pe[He++]=sr>>>24&255,Pe[He++]=Mr>>>0&255,Pe[He++]=Mr>>>8&255,Pe[He++]=Mr>>>16&255,Pe[He++]=Mr>>>24&255,Pe[He++]=qr>>>0&255,Pe[He++]=qr>>>8&255,Pe[He++]=qr>>>16&255,Pe[He]=qr>>>24&255}(R,d,L,Y);case 9:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0;Pe[He++]=bt>>>0&511,Pe[He++]=bt>>>9&511,Pe[He++]=bt>>>18&511,Pe[He++]=511&(bt>>>27|(15&Et)<<5),Pe[He++]=Et>>>4&511,Pe[He++]=Et>>>13&511,Pe[He++]=Et>>>22&511,Pe[He++]=511&(Et>>>31|(255&Qt)<<1),Pe[He++]=Qt>>>8&511,Pe[He++]=Qt>>>17&511,Pe[He++]=511&(Qt>>>26|(7&er)<<6),Pe[He++]=er>>>3&511,Pe[He++]=er>>>12&511,Pe[He++]=er>>>21&511,Pe[He++]=511&(er>>>30|(127&br)<<2),Pe[He++]=br>>>7&511,Pe[He++]=br>>>16&511,Pe[He++]=511&(br>>>25|(3&sr)<<7),Pe[He++]=sr>>>2&511,Pe[He++]=sr>>>11&511,Pe[He++]=sr>>>20&511,Pe[He++]=511&(sr>>>29|(63&Mr)<<3),Pe[He++]=Mr>>>6&511,Pe[He++]=Mr>>>15&511,Pe[He++]=511&(Mr>>>24|(1&qr)<<8),Pe[He++]=qr>>>1&511,Pe[He++]=qr>>>10&511,Pe[He++]=qr>>>19&511,Pe[He++]=511&(qr>>>28|(31&$r)<<4),Pe[He++]=$r>>>5&511,Pe[He++]=$r>>>14&511,Pe[He]=$r>>>23&511}(R,d,L,Y);case 10:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0;Pe[He++]=bt>>>0&1023,Pe[He++]=bt>>>10&1023,Pe[He++]=bt>>>20&1023,Pe[He++]=1023&(bt>>>30|(255&Et)<<2),Pe[He++]=Et>>>8&1023,Pe[He++]=Et>>>18&1023,Pe[He++]=1023&(Et>>>28|(63&Qt)<<4),Pe[He++]=Qt>>>6&1023,Pe[He++]=Qt>>>16&1023,Pe[He++]=1023&(Qt>>>26|(15&er)<<6),Pe[He++]=er>>>4&1023,Pe[He++]=er>>>14&1023,Pe[He++]=1023&(er>>>24|(3&br)<<8),Pe[He++]=br>>>2&1023,Pe[He++]=br>>>12&1023,Pe[He++]=br>>>22&1023,Pe[He++]=sr>>>0&1023,Pe[He++]=sr>>>10&1023,Pe[He++]=sr>>>20&1023,Pe[He++]=1023&(sr>>>30|(255&Mr)<<2),Pe[He++]=Mr>>>8&1023,Pe[He++]=Mr>>>18&1023,Pe[He++]=1023&(Mr>>>28|(63&qr)<<4),Pe[He++]=qr>>>6&1023,Pe[He++]=qr>>>16&1023,Pe[He++]=1023&(qr>>>26|(15&$r)<<6),Pe[He++]=$r>>>4&1023,Pe[He++]=$r>>>14&1023,Pe[He++]=1023&($r>>>24|(3&_a)<<8),Pe[He++]=_a>>>2&1023,Pe[He++]=_a>>>12&1023,Pe[He]=_a>>>22&1023}(R,d,L,Y);case 11:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0;Pe[He++]=bt>>>0&2047,Pe[He++]=bt>>>11&2047,Pe[He++]=2047&(bt>>>22|(1&Et)<<10),Pe[He++]=Et>>>1&2047,Pe[He++]=Et>>>12&2047,Pe[He++]=2047&(Et>>>23|(3&Qt)<<9),Pe[He++]=Qt>>>2&2047,Pe[He++]=Qt>>>13&2047,Pe[He++]=2047&(Qt>>>24|(7&er)<<8),Pe[He++]=er>>>3&2047,Pe[He++]=er>>>14&2047,Pe[He++]=2047&(er>>>25|(15&br)<<7),Pe[He++]=br>>>4&2047,Pe[He++]=br>>>15&2047,Pe[He++]=2047&(br>>>26|(31&sr)<<6),Pe[He++]=sr>>>5&2047,Pe[He++]=sr>>>16&2047,Pe[He++]=2047&(sr>>>27|(63&Mr)<<5),Pe[He++]=Mr>>>6&2047,Pe[He++]=Mr>>>17&2047,Pe[He++]=2047&(Mr>>>28|(127&qr)<<4),Pe[He++]=qr>>>7&2047,Pe[He++]=qr>>>18&2047,Pe[He++]=2047&(qr>>>29|(255&$r)<<3),Pe[He++]=$r>>>8&2047,Pe[He++]=$r>>>19&2047,Pe[He++]=2047&($r>>>30|(511&_a)<<2),Pe[He++]=_a>>>9&2047,Pe[He++]=_a>>>20&2047,Pe[He++]=2047&(_a>>>31|(1023&Ca)<<1),Pe[He++]=Ca>>>10&2047,Pe[He]=Ca>>>21&2047}(R,d,L,Y);case 12:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0,nn=Te[Oe+11]>>>0;Pe[He++]=bt>>>0&4095,Pe[He++]=bt>>>12&4095,Pe[He++]=4095&(bt>>>24|(15&Et)<<8),Pe[He++]=Et>>>4&4095,Pe[He++]=Et>>>16&4095,Pe[He++]=4095&(Et>>>28|(255&Qt)<<4),Pe[He++]=Qt>>>8&4095,Pe[He++]=Qt>>>20&4095,Pe[He++]=er>>>0&4095,Pe[He++]=er>>>12&4095,Pe[He++]=4095&(er>>>24|(15&br)<<8),Pe[He++]=br>>>4&4095,Pe[He++]=br>>>16&4095,Pe[He++]=4095&(br>>>28|(255&sr)<<4),Pe[He++]=sr>>>8&4095,Pe[He++]=sr>>>20&4095,Pe[He++]=Mr>>>0&4095,Pe[He++]=Mr>>>12&4095,Pe[He++]=4095&(Mr>>>24|(15&qr)<<8),Pe[He++]=qr>>>4&4095,Pe[He++]=qr>>>16&4095,Pe[He++]=4095&(qr>>>28|(255&$r)<<4),Pe[He++]=$r>>>8&4095,Pe[He++]=$r>>>20&4095,Pe[He++]=_a>>>0&4095,Pe[He++]=_a>>>12&4095,Pe[He++]=4095&(_a>>>24|(15&Ca)<<8),Pe[He++]=Ca>>>4&4095,Pe[He++]=Ca>>>16&4095,Pe[He++]=4095&(Ca>>>28|(255&nn)<<4),Pe[He++]=nn>>>8&4095,Pe[He]=nn>>>20&4095}(R,d,L,Y);case 16:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0,nn=Te[Oe+11]>>>0,qa=Te[Oe+12]>>>0,bn=Te[Oe+13]>>>0,Fn=Te[Oe+14]>>>0,gn=Te[Oe+15]>>>0;Pe[He++]=bt>>>0&65535,Pe[He++]=bt>>>16&65535,Pe[He++]=Et>>>0&65535,Pe[He++]=Et>>>16&65535,Pe[He++]=Qt>>>0&65535,Pe[He++]=Qt>>>16&65535,Pe[He++]=er>>>0&65535,Pe[He++]=er>>>16&65535,Pe[He++]=br>>>0&65535,Pe[He++]=br>>>16&65535,Pe[He++]=sr>>>0&65535,Pe[He++]=sr>>>16&65535,Pe[He++]=Mr>>>0&65535,Pe[He++]=Mr>>>16&65535,Pe[He++]=qr>>>0&65535,Pe[He++]=qr>>>16&65535,Pe[He++]=$r>>>0&65535,Pe[He++]=$r>>>16&65535,Pe[He++]=_a>>>0&65535,Pe[He++]=_a>>>16&65535,Pe[He++]=Ca>>>0&65535,Pe[He++]=Ca>>>16&65535,Pe[He++]=nn>>>0&65535,Pe[He++]=nn>>>16&65535,Pe[He++]=qa>>>0&65535,Pe[He++]=qa>>>16&65535,Pe[He++]=bn>>>0&65535,Pe[He++]=bn>>>16&65535,Pe[He++]=Fn>>>0&65535,Pe[He++]=Fn>>>16&65535,Pe[He++]=gn>>>0&65535,Pe[He]=gn>>>16&65535}(R,d,L,Y);case 32:for(let Te=0;Te<32;Te=Te+1|0)L[Y+Te|0]=0|R[d+Te|0];return}let ce=B3[te]>>>0,me=d,ge=0,Ce=R[me]>>>0;for(let Te=0;Te<32;Te++)if(ge+te<=32)L[Y+Te]=Ce>>>ge&ce,ge+=te,ge===32&&(ge=0,me++,Te!==31&&(Ce=R[me]>>>0));else{let Oe=32-ge,Pe=Ce>>>ge;me++,Ce=R[me]>>>0,L[Y+Te]=(Pe|(Ce&B3[te-Oe]>>>0)<=64)throw new Error("Varint too long")}return d.set(te),L}function CY(R,d){let L,Y;return Y=R[d.get()],d.increment(),L=127&Y,Y<128?L:(Y=R[d.get()],d.increment(),L|=(127&Y)<<7,Y<128?L:(Y=R[d.get()],d.increment(),L|=(127&Y)<<14,Y<128?L:(Y=R[d.get()],d.increment(),L|=(127&Y)<<21,Y<128?L:(Y=R[d.get()],L|=(15&Y)<<28,function(te,ce,me){let ge,Ce;if(Ce=ce[me.get()],me.increment(),ge=(112&Ce)>>4,Ce<128||(Ce=ce[me.get()],me.increment(),ge|=(127&Ce)<<3,Ce<128)||(Ce=ce[me.get()],me.increment(),ge|=(127&Ce)<<10,Ce<128)||(Ce=ce[me.get()],me.increment(),ge|=(127&Ce)<<17,Ce<128)||(Ce=ce[me.get()],me.increment(),ge|=(127&Ce)<<24,Ce<128)||(Ce=ce[me.get()],me.increment(),ge|=(1&Ce)<<31,Ce<128))return 4294967296*ge+(te>>>0);throw new Error("Expected varint not more than 10 bytes")}(L,R,d)))))}function Js(R){return R>>>1^-(1&R)}function fh(R){return R>>BigInt("1")^-(BigInt("1")&R)}function C0(R){return R%2==1?(R+1)/-2:R/2}function j3(R,d,L){if(L===void 0){L=0;for(let ce=0;ce=4)for(;Y=4)for(;Y=4)for(let Y=R[0];L>4],ge=null;switch(me){case Tf.DATA:ge={dictionaryType:Object.values(fd)[15&ce]};break;case Tf.OFFSET:ge={offsetType:Object.values(kv)[15&ce]};break;case Tf.LENGTH:ge={lengthType:Object.values(Rh)[15&ce]}}te.increment();let Ce=Y[te.get()],Te=Object.values(us)[Ce>>5],Oe=Object.values(us)[Ce>>2&7],Pe=Object.values(Tp)[3&Ce];te.increment();let it=Yf(Y,te,2),He=it[0];return{physicalStreamType:me,logicalStreamType:ge,logicalLevelTechnique1:Te,logicalLevelTechnique2:Oe,physicalLevelTechnique:Pe,numValues:He,byteLength:it[1],decompressedCount:He}}(R,d);return L.logicalLevelTechnique1===us.MORTON?function(Y,te,ce){let me=Yf(te,ce,2);return{physicalStreamType:Y.physicalStreamType,logicalStreamType:Y.logicalStreamType,logicalLevelTechnique1:Y.logicalLevelTechnique1,logicalLevelTechnique2:Y.logicalLevelTechnique2,physicalLevelTechnique:Y.physicalLevelTechnique,numValues:Y.numValues,byteLength:Y.byteLength,decompressedCount:Y.decompressedCount,numBits:me[0],coordinateShift:me[1]}}(L,R,d):us.RLE!==L.logicalLevelTechnique1&&us.RLE!==L.logicalLevelTechnique2||Tp.NONE===L.physicalLevelTechnique?L:function(Y,te,ce){let me=Yf(te,ce,2);return{physicalStreamType:Y.physicalStreamType,logicalStreamType:Y.logicalStreamType,logicalLevelTechnique1:Y.logicalLevelTechnique1,logicalLevelTechnique2:Y.logicalLevelTechnique2,physicalLevelTechnique:Y.physicalLevelTechnique,numValues:Y.numValues,byteLength:Y.byteLength,decompressedCount:me[1],runs:me[0],numRleValues:me[1]}}(L,R,d)}(function(R){R.PRESENT="PRESENT",R.DATA="DATA",R.OFFSET="OFFSET",R.LENGTH="LENGTH"})(Tf||(Tf={})),function(R){R.NONE="NONE",R.SINGLE="SINGLE",R.SHARED="SHARED",R.VERTEX="VERTEX",R.MORTON="MORTON",R.FSST="FSST"}(fd||(fd={})),function(R){R.VERTEX="VERTEX",R.INDEX="INDEX",R.STRING="STRING",R.KEY="KEY"}(kv||(kv={})),function(R){R.VAR_BINARY="VAR_BINARY",R.GEOMETRIES="GEOMETRIES",R.PARTS="PARTS",R.RINGS="RINGS",R.TRIANGLES="TRIANGLES",R.SYMBOL="SYMBOL",R.DICTIONARY="DICTIONARY"}(Rh||(Rh={})),function(R){R[R.FLAT=0]="FLAT",R[R.CONST=1]="CONST",R[R.SEQUENCE=2]="SEQUENCE",R[R.DICTIONARY=3]="DICTIONARY",R[R.FSST_DICTIONARY=4]="FSST_DICTIONARY"}(Gl||(Gl={}));class hd{constructor(d,L){this.values=d,this._size=L}get(d){let L=Math.floor(d/8);return(this.values[L]>>d%8&1)==1}set(d,L){let Y=Math.floor(d/8);this.values[Y]=this.values[Y]|(L?1:0)<>d%8&1}size(){return this._size}getBuffer(){return this.values}}function L0(R,d,L){if(!d)return R;let Y=d.size(),te=new R.constructor(Y),ce=0;for(let me=0;me=4)for(;He>>0;for(let it=1;it>>0;return Pe}(me.logicalLevelTechnique2===us.RLE?j3(ce,me.runs,me.numRleValues):ce);break;case us.RLE:Te=j3(ce,me.runs,me.numRleValues);break;case us.MORTON:q3(ce),Te=ce;break;case us.COMPONENTWISE_DELTA:Te=function(Oe){if(Oe.length<2)return new Uint32Array(Oe);let Pe=new Uint32Array(Oe.length);Pe[0]=Js(Oe[0])>>>0,Pe[1]=Js(Oe[1])>>>0;for(let it=2;it>>0,Pe[it+1]=Pe[it-1]+Js(Oe[it+1])>>>0;return Pe}(ce);break;case us.NONE:Te=ce;break;default:throw new Error(`The specified Logical level technique is not supported: ${me.logicalLevelTechnique1}`)}return Ce?L0(Te,Ce,0):Te}(P0(R,d,L),L,0,te)}function Mp(R,d,L){return function(Y,te){if(te.logicalLevelTechnique1===us.DELTA&&te.logicalLevelTechnique2===us.NONE)return function(ce){let me=new Int32Array(ce.length+1);me[0]=0,me[1]=Js(ce[0]);let ge=me[1];for(let Ce=2;Ce!==me.length;++Ce)ge+=Js(ce[Ce-1]),me[Ce]=me[Ce-1]+ge;return new Uint32Array(me)}(Y);if(te.logicalLevelTechnique1===us.RLE&&te.logicalLevelTechnique2===us.NONE)return function(ce,me,ge){let Ce=new Uint32Array(ge+1);Ce[0]=0;let Te=1,Oe=Ce[0];for(let Pe=0;Pe>>2,Et=function(er,br){if(br<=er.encodedWords.length)return er.encodedWords;let sr=new Uint32Array(Math.max(16,2*br));return er.encodedWords=sr,sr}(it,bt);(function(er,br,sr,Mr){if(br<0||sr<0||br+sr>er.length)throw new RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${br}, byteLength=${sr}, bytes.length=${er.length})`);let qr=Math.floor(sr/4),$r=sr%4!=0,_a=$r?qr+1:qr;if(Mr.length<_a)throw new RangeError(`decodeBigEndianInt32sInto: out.length=${Mr.length} < ${_a}`);if(qr>0){let Ca=er.byteOffset+br;if(3&Ca)for(let nn=0;nn0){let Ca=0|er[Mr];if(Mr=Mr+1|0,255&Ca)throw new Error(`FastPFOR decode: invalid alignedLength=${Ca} (expected multiple of 256)`);if(qr+Ca>$r.length)throw new Error(`FastPFOR decode: output buffer too small (outPos=${qr}, alignedLength=${Ca}, out.length=${$r.length})`);Mr=function(nn,qa,bn,Fn,gn,Va){let Hn=Fn+O3(gn,Xd),ni=Fn,Wn=bn;for(;ni!==Hn;){let si=Math.min(N3,Hn-ni);Wn=SY(nn,qa,Wn,ni,si,Va),ni=ni+si|0}return Wn}(er,$r,Mr,qr,Ca,_a),qr=qr+Ca|0}return function(Ca,nn,qa,bn,Fn,gn){if(gn===0)return nn;let Va=0,Hn=nn,ni=nn+qa,Wn=Fn,si=Fn,po=Fn+gn,cs=0,Ds=0;for(;Hn>>Va&255;if(Va+=8,Hn+=Va>>>5,Va&=31,cs|=(127&Xs)<28)throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${Ds}, partial=${cs}, decoded=${si-Wn}/${gn}, inPos=${Hn}, inEnd=${ni})`)}if(si!==po)throw new Error(`FastPFOR VByte: truncated stream (decoded=${si-Wn}, expected=${gn}, consumedWords=${Hn-nn}/${qa}, vbyteStart=${nn}, vbyteEnd=${ni})`)}(er,Mr,er.length-Mr|0,$r,qr,br-qr|0),$r}(Et.subarray(0,bt),Te,it.decoderWorkspace);return Pe.add(Oe),Qt}(te,ce,me,ge,function(Ce=16){if(Ce<0)throw new RangeError(`initialEncodedWordCapacity must be >= 0, got ${Ce}`);let Te=Math.max(16,0|Ce);return{encodedWords:new Uint32Array(Te),decoderWorkspace:bS()}}(me>>>2))}(R,L.numValues,L.byteLength,d);case Tp.VARINT:return Yf(R,d,L.numValues);case Tp.NONE:{let te=d.get();d.add(L.byteLength);let ce=R.subarray(te,d.get());return new Uint32Array(ce)}default:throw new Error(`Specified physicalLevelTechnique ${Y} is not supported (yet).`)}}function G3(R,d,L){let Y=P0(R,d,L);return Y.length===1?Y[0]:function(te){return te[1]}(Y)}function SS(R,d,L){return function(Y){if(Y.length===2){let te=Js(Y[1]);return[te,te]}return[Js(Y[2]),Js(Y[3])]}(P0(R,d,L))}function ES(R,d,L){return function(Y){if(Y.length===2){let te=fh(Y[1]);return[te,te]}return[fh(Y[2]),fh(Y[3])]}(k0(R,d,L.numValues))}function kS(R,d,L,Y){return function(te,ce,me){let ge;switch(ce.logicalLevelTechnique1){case us.DELTA:ge=function(Ce){let Te=new BigUint64Array(Ce.length);Te[0]=BigInt.asUintN(64,fh(Ce[0]));for(let Oe=1;Oe>1,d)-L}}function RS(R,d){let L=0;for(let Y=0;Y>Y;return L}function R0(R,d,L,Y,te,ce,me){return R===Ap.MORTON?function(ge,Ce,Te,Oe,Pe,it){let He=new Array(Pe?Oe+1:Oe);for(let bt=0;bt[qr]),Y+=sr,te+=sr}break;case Ic.LINESTRING:{let sr,Mr;Qt?(sr=He[te]-He[te-1],te++):sr=it[Y]-it[Y-1],Y++,Et?(Mr=I0(er,ge,sr,!1),ge+=2*sr):(Mr=R0(d.vertexBufferType,er,bt,Ce,sr,!1,Te),Ce+=sr),L[me++]=[Mr],Pe&&ce++}break;case Ic.POLYGON:{let sr=it[Y]-it[Y-1];Y++;let Mr=new Array(sr-1),qr,$r=He[te]-He[te-1];if(te++,Et){qr=I0(er,ge,$r,!0),ge+=2*$r;for(let _a=0;_a0&&Et.push(Et[0]),it.push(Et)}d[Oe]=it,ce&&Te++}break;case Ic.MULTIPOLYGON:{let Pe=ce[Te]-ce[Te-1];Te++;let it=[];for(let He=0;He0&&er.push(er[0]),it.push(er)}}d[Oe]=it}}return d}[Symbol.iterator](){return null}}function BS(R,d,L,Y,te,ce){return new LY(R,d,L,Y,te,ce)}class LY extends zS{constructor(d,L,Y,te,ce,me){super(Y,te,ce,me),this._numGeometries=d,this._geometryType=L}geometryType(d){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}function OS(R,d,L,Y,te){return new PY(R,d,L,Y,te)}class PY extends zS{constructor(d,L,Y,te,ce){super(L,Y,te,ce),this._geometryTypes=d}geometryType(d){return this._geometryTypes[d]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function RY(R,d,L,Y,te){let ce=hh(R,L),me,ge,Ce,Te;if(My(ce,Y,R,L)===Gl.CONST){let br=G3(R,L,ce),sr,Mr,qr,$r;for(let _a=0;_aL?d[ce++]:1);return Y}function NS(R,d,L,Y){let te=new Uint32Array(d[d.length-1]+1),ce=0;te[0]=ce;let me=1,ge=0;for(let Ce=0;Ce=it);){let He=me[Te.increment()];if(He<=127){let bt=He+3,Et=me[Te.increment()],Qt=Math.min(Pe+bt,ge);Oe.fill(Et,Pe,Qt),Pe=Qt}else{let bt=256-He;for(let Et=0;Et=12?FY.decode(R.subarray(d,L)):function(Y,te,ce){let me="",ge=te;for(;ge239?4:Ce>223?3:Ce>191?2:1;if(ge+He>ce)break;He===1?Ce<128&&(it=Ce):He===2?(Te=Y[ge+1],(192&Te)==128&&(it=(31&Ce)<<6|63&Te,it<=127&&(it=null))):He===3?(Te=Y[ge+1],Oe=Y[ge+2],(192&Te)==128&&(192&Oe)==128&&(it=(15&Ce)<<12|(63&Te)<<6|63&Oe,(it<=2047||it>=55296&&it<=57343)&&(it=null))):He===4&&(Te=Y[ge+1],Oe=Y[ge+2],Pe=Y[ge+3],(192&Te)==128&&(192&Oe)==128&&(192&Pe)==128&&(it=(15&Ce)<<18|(63&Te)<<12|(63&Oe)<<6|63&Pe,(it<=65535||it>=1114112)&&(it=null))),it===null?(it=65533,He=1):it>65535&&(it-=65536,me+=String.fromCharCode(it>>>10&1023|55296),it=56320|1023&it),me+=String.fromCharCode(it),ge+=He}return me}(R,d,L)}class X3 extends E0{constructor(d,L,Y,te){super(d,Y,te),this.offsetBuffer=L}}class US extends X3{constructor(d,L,Y,te){super(d,L,Y,te??L.length-1)}getValueFromBuffer(d){return Y3(this.dataBuffer,this.offsetBuffer[d],this.offsetBuffer[d+1])}}class D0 extends X3{constructor(d,L,Y,te,ce){super(d,Y,te,ce??L.length),this.indexBuffer=L,this.indexBuffer=L}getValueFromBuffer(d){let L=this.indexBuffer[d];return Y3(this.dataBuffer,this.offsetBuffer[L],this.offsetBuffer[L+1])}}class qS extends X3{constructor(d,L,Y,te,ce,me,ge){super(d,Y,te,ge),this.indexBuffer=L,this.symbolOffsetBuffer=ce,this.symbolTableBuffer=me}getValueFromBuffer(d){this.decodedDictionary==null&&(this.symbolLengthBuffer==null&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=function(Y,te,ce){let me=[],ge=new Array(te.length).fill(0);for(let Ce=1;Ce=10}function HS(R){return R===30}function BY(R){if(R.type==="scalarType"){let d=R.scalarType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if(d.type==="logicalType")return!1}else if(R.type==="complexType"){let d=R.complexType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",R),!1}function OY(R){var d;return R.type==="complexType"&&((d=R.complexType)==null?void 0:d.type)==="physicalType"&&R.complexType.physicalType===0}let NY=new TextDecoder;function Z3(R,d){let L=Yf(R,d,1)[0];if(L===0)return"";let Y=d.get(),te=R.subarray(Y,Y+L);return d.add(L),NY.decode(te)}function WS(R,d){let L=Yf(R,d,1)[0]>>>0;if(L<10||L>30)throw new Error(`Unsupported field type code ${L}. Supported: 10-29(scalars), 30(STRUCT)`);let Y=VS(L);if(GS(L)&&(Y.name=Z3(R,d)),HS(L)){let te=Yf(R,d,1)[0]>>>0;Y.complexType.children=new Array(te);for(let ce=0;ce>>0,Y=VS(L);if(!Y)throw new Error(`Unsupported column type code ${L}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(GS(L)?Y.name=Z3(R,d):L>=0&&L<=3?Y.name="id":L===4&&(Y.name="geometry"),HS(L)){let te=Yf(R,d,1)[0]>>>0,ce=Y.complexType;ce.children=new Array(te);for(let me=0;me>>0,ce=Yf(R,d,1)[0]>>>0;Y.columns=new Array(ce);for(let me=0;me=4)for(;qr>>0,Pe=ge.get()+Oe;if(Pe>Y.length)throw new Error(`Block overruns tile: ${Pe} > ${Y.length}`);if(Yf(Y,ge,1)[0]>>>0!=1){ge.set(Pe);continue}let[it,He]=UY(Y,ge),bt=it.featureTables[0],Et=null,Qt=null,er=[],br=0;for(let Mr of bt.columns){let qr=Mr.name;if((Te=Mr).type==="scalarType"&&((me=Te.scalarType)==null?void 0:me.type)==="logicalType"&&Te.scalarType.logicalType===0){let $r=null;if(Mr.nullable){let Ca=hh(Y,ge),nn=ge.get(),qa=D1(Y,Ca.numValues,Ca.byteLength,ge);ge.set(nn+Ca.byteLength),$r=new hd(qa,Ca.numValues)}let _a=hh(Y,ge);br=$r?$r.size():_a.decompressedCount,Et=qY(Y,Mr,ge,qr,_a,$r??br,ce)}else if(OY(Mr)){let $r=Yf(Y,ge,1)[0];if(br===0){let _a=ge.get();br=hh(Y,ge).decompressedCount,ge.set(_a)}Qt=RY(Y,$r,ge,br)}else{let $r=BY(Mr)?Yf(Y,ge,1)[0]:1;if($r===0)continue;let _a=zY(Y,ge,Mr,$r,br);if(_a)if(Array.isArray(_a))for(let Ca of _a)er.push(Ca);else er.push(_a)}}let sr=new xY(bt.name,Qt,Et,er,He);Ce.push(sr),ge.set(Pe)}var Te;return Ce}(new Uint8Array(d));this.layers=L.reduce((Y,te)=>Object.assign(Object.assign({},Y),{[te.name]:new GY(te)}),{})}}class HY{constructor(d,L){this.feature=d,this.type=d.type,this.properties=d.tags?d.tags:{},this.extent=L,"id"in d&&(typeof d.id=="string"?this.id=parseInt(d.id,10):typeof d.id!="number"||isNaN(d.id)||(this.id=d.id))}loadGeometry(){let d=[],L=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(let Y of L){let te=[];for(let ce of Y)te.push(new t(ce[0],ce[1]));d.push(te)}return d}}let z1="_geojsonTileLayer";function WY(R,d,L=""){d.writeVarintField(15,R.version||1),d.writeStringField(1,R.name||""),d.writeVarintField(5,R.extent||4096);let Y={jsonPrefix:L,keys:[],values:[],keycache:{},valuecache:{}};for(let me=0;me>31}function ZY(R,d){let L=R.loadGeometry(),Y=R.type,te=0,ce=0;for(let me of L){let ge=1;Y===1&&(ge=me.length),d.writeVarint($3(1,ge));let Ce=Y===3?me.length-1:me.length;for(let Te=0;Te=0&&Oe[3]>=0&&Ce.insert(ge,Oe[0],Oe[1],Oe[2],Oe[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=this.encoding!=="mlt"?new w4(new _y(this.rawTileData)).layers:new YS(this.rawTileData).layers,this.sourceLayerCoder=new gS(this.vtLayers?Object.keys(this.vtLayers).sort():[z1])),this.vtLayers}query(d,L,Y,te){this.loadVTLayers();let ce=d.params,me=F/d.tileSize/d.scale,ge=Na(ce.filter,ce.globalState),Ce=d.queryGeometry,Te=d.queryPadding*me,Oe=Ev.fromPoints(Ce),Pe=this.grid.query(Oe.minX-Te,Oe.minY-Te,Oe.maxX+Te,Oe.maxY+Te),it=Ev.fromPoints(d.cameraQueryGeometry).expandBy(Te),He=this.grid3D.query(it.minX,it.minY,it.maxX,it.maxY,(Qt,er,br,sr)=>function(Mr,qr,$r,_a,Ca){for(let qa of Mr)if(qr<=qa.x&&$r<=qa.y&&_a>=qa.x&&Ca>=qa.y)return!0;let nn=[new t(qr,$r),new t(qr,Ca),new t(_a,Ca),new t(_a,$r)];if(Mr.length>2){for(let qa of nn)if(Wa(Mr,qa))return!0}for(let qa=0;qa(br||(br=ql(sr)),Mr.queryIntersectsFeature({queryGeometry:Ce,feature:sr,featureState:qr,geometry:br,zoom:this.z,transform:d.transform,pixelsToTileUnits:me,pixelPosMatrix:d.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:d.getElevation})))}return bt}loadMatchingFeature(d,L,Y,te,ce,me,ge,Ce,Te,Oe,Pe){let it=this.bucketLayerIDs[L];if(me&&!it.some(Qt=>me.has(Qt)))return;let He=this.sourceLayerCoder.decode(Y),bt=this.vtLayers[He].feature(te);if(ce.needGeometry){let Qt=fo(bt,!0);if(!ce.filter(new oi(this.tileID.overscaledZ),Qt,this.tileID.canonical))return}else if(!ce.filter(new oi(this.tileID.overscaledZ),bt))return;let Et=this.getId(bt,He);for(let Qt of it){if(me&&!me.has(Qt))continue;let er=Ce[Qt];if(!er)continue;let br={};Et&&Oe&&(br=Oe.getState(er.sourceLayer||z1,Et));let sr=Z({},Te[Qt]);sr.paint=$S(sr.paint,er.paint,bt,br,ge),sr.layout=$S(sr.layout,er.layout,bt,br,ge);let Mr=!Pe||Pe(bt,er,br);if(!Mr)continue;let qr=new yS(bt,this.z,this.x,this.y,Et);qr.layer=sr;let $r=d[Qt];$r===void 0&&($r=d[Qt]=[]),$r.push({featureIndex:te,feature:qr,intersectionZ:Mr})}}lookupSymbolFeatures(d,L,Y,te,ce,me,ge,Ce){let Te={};this.loadVTLayers();let Oe=Na(ce.filterSpec,ce.globalState);for(let Pe of d)this.loadMatchingFeature(Te,Y,te,Pe,Oe,me,ge,Ce,L);return Te}hasLayer(d){for(let L of this.bucketLayerIDs)for(let Y of L)if(d===Y)return!0;return!1}getId(d,L){var Y;let te=d.id;return this.promoteId&&(te=d.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[L]],typeof te=="boolean"&&(te=Number(te)),te===void 0&&(!((Y=d.properties)===null||Y===void 0)&&Y.cluster)&&this.promoteId&&(te=Number(d.properties.cluster_id))),te}}function $S(R,d,L,Y,te){return H(R,(ce,me)=>{let ge=d instanceof Cu?d.get(me):null;return ge?.evaluate?ge.evaluate(L,Y,te):ge})}function KY(R,d){return d-R}function KS(R,d,L,Y,te){let ce=[];for(let me of R){let ge;for(let Ce=0;Ce=Y&&Oe.x>=Y||(Te.x>=Y?Te=new t(Y,Te.y+(Y-Te.x)/(Oe.x-Te.x)*(Oe.y-Te.y))._round():Oe.x>=Y&&(Oe=new t(Y,Te.y+(Y-Te.x)/(Oe.x-Te.x)*(Oe.y-Te.y))._round()),Te.y>=te&&Oe.y>=te||(Te.y>=te?Te=new t(Te.x+(te-Te.y)/(Oe.y-Te.y)*(Oe.x-Te.x),te)._round():Oe.y>=te&&(Oe=new t(Te.x+(te-Te.y)/(Oe.y-Te.y)*(Oe.x-Te.x),te)._round()),ge&&Te.equals(ge[ge.length-1])||(ge=[Te],ce.push(ge)),ge.push(Oe)))))}}return ce}function JS(R,d,L,Y,te){switch(d){case 1:return function(ce,me,ge,Ce){let Te=[];for(let Oe of ce)for(let Pe of Oe){let it=Ce===0?Pe.x:Pe.y;it>=me&&it<=ge&&Te.push([Pe])}return Te}(R,L,Y,te);case 2:return QS(R,L,Y,te,!1);case 3:return QS(R,L,Y,te,!0)}return[]}function JY(R,d,L,Y,te){let ce=Y===0?QY:eX,me=[],ge=[];for(let Oe=0;Oed&&me.push(ce(Pe,it,d)):He>L?bt=d&&(me.push(ce(Pe,it,d)),Et=!0),bt>L&&He<=L&&(me.push(ce(Pe,it,L)),Et=!0),!te&&Et&&(ge.push(me),me=[])}let Ce=R.length-1,Te=Y===0?R[Ce].x:R[Ce].y;return Te>=d&&Te<=L&&me.push(R[Ce]),te&&me.length>0&&!me[0].equals(me[me.length-1])&&me.push(new t(me[0].x,me[0].y)),me.length>0&&ge.push(me),ge}function QS(R,d,L,Y,te){let ce=[];for(let me of R){let ge=JY(me,d,L,Y,te);ge.length>0&&ce.push(...ge)}return ce}function QY(R,d,L){return new t(L,R.y+(L-R.x)/(d.x-R.x)*(d.y-R.y))}function eX(R,d,L){return new t(R.x+(L-R.y)/(d.y-R.y)*(d.x-R.x),L)}fi("FeatureIndex",ZS,{omit:["rawTileData","sourceLayerCoder"]});class Sp extends t{constructor(d,L,Y,te){super(d,L),this.angle=Y,te!==void 0&&(this.segment=te)}clone(){return new Sp(this.x,this.y,this.angle,this.segment)}}function eE(R,d,L,Y,te){if(d.segment===void 0||L===0)return!0;let ce=d,me=d.segment+1,ge=0;for(;ge>-L/2;){if(me--,me<0)return!1;ge-=R[me].dist(ce),ce=R[me]}ge+=R[me].dist(R[me+1]),me++;let Ce=[],Te=0;for(;geY;)Te-=Ce.shift().angleDelta;if(Te>te)return!1;me++,ge+=Oe.dist(Pe)}return!0}function tE(R){let d=0;for(let L=0;LTe){let bt=(Te-Ce)/He,Et=bs.number(Pe.x,it.x,bt),Qt=bs.number(Pe.y,it.y,bt),er=new Sp(Et,Qt,it.angleTo(Pe),Oe);return er._round(),!me||eE(R,er,ge,me,d)?er:void 0}Ce+=He}}function rX(R,d,L,Y,te,ce,me,ge,Ce){let Te=rE(Y,ce,me),Oe=aE(Y,te),Pe=Oe*me,it=R[0].x===0||R[0].x===Ce||R[0].y===0||R[0].y===Ce;return d-Pe=0&&Mr=0&&qr=0&&it+Te<=Oe){let $r=new Sp(Mr,qr,br,bt);$r._round(),Y&&!eE(R,$r,ce,Y,te)||He.push($r)}}Pe+=er}return ge||He.length||me||(He=nE(R,Pe/2,L,Y,te,ce,me,!0,Ce)),He}function iE(R,d,L,Y){let te=[],ce=R.image,me=ce.pixelRatio,ge=ce.paddedRect.w-2,Ce=ce.paddedRect.h-2,Te={x1:R.left,y1:R.top,x2:R.right,y2:R.bottom},Oe=ce.stretchX||[[0,ge]],Pe=ce.stretchY||[[0,Ce]],it=(Va,Hn)=>Va+Hn[1]-Hn[0],He=Oe.reduce(it,0),bt=Pe.reduce(it,0),Et=ge-He,Qt=Ce-bt,er=0,br=He,sr=0,Mr=bt,qr=0,$r=Et,_a=0,Ca=Qt;if(ce.content&&Y){let Va=ce.content,Hn=Va[2]-Va[0],ni=Va[3]-Va[1];(ce.textFitWidth||ce.textFitHeight)&&(Te=tS(R)),er=Sy(Oe,0,Va[0]),sr=Sy(Pe,0,Va[1]),br=Sy(Oe,Va[0],Va[2]),Mr=Sy(Pe,Va[1],Va[3]),qr=Va[0]-er,_a=Va[1]-sr,$r=Hn-br,Ca=ni-Mr}let nn=Te.x1,qa=Te.y1,bn=Te.x2-nn,Fn=Te.y2-qa,gn=(Va,Hn,ni,Wn)=>{let si=Ey(Va.stretch-er,br,bn,nn),po=ky(Va.fixed-qr,$r,Va.stretch,He),cs=Ey(Hn.stretch-sr,Mr,Fn,qa),Ds=ky(Hn.fixed-_a,Ca,Hn.stretch,bt),Xs=Ey(ni.stretch-er,br,bn,nn),Mf=ky(ni.fixed-qr,$r,ni.stretch,He),vu=Ey(Wn.stretch-sr,Mr,Fn,qa),yc=ky(Wn.fixed-_a,Ca,Wn.stretch,bt),Dc=new t(si,cs),Hl=new t(Xs,cs),rf=new t(Xs,vu),Xf=new t(si,vu),Zf=new t(po/me,Ds/me),Th=new t(Mf/me,yc/me),Sf=d*Math.PI/180;if(Sf){let Fc=Math.sin(Sf),nu=Math.cos(Sf),lc=[nu,-Fc,Fc,nu];Dc._matMult(lc),Hl._matMult(lc),Xf._matMult(lc),rf._matMult(lc)}let Ah=Va.stretch+Va.fixed,Hh=Hn.stretch+Hn.fixed;return{tl:Dc,tr:Hl,bl:Xf,br:rf,tex:{x:ce.paddedRect.x+1+Ah,y:ce.paddedRect.y+1+Hh,w:ni.stretch+ni.fixed-Ah,h:Wn.stretch+Wn.fixed-Hh},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Zf,pixelOffsetBR:Th,minFontScaleX:$r/me/bn,minFontScaleY:Ca/me/Fn,isSDF:L}};if(Y&&(ce.stretchX||ce.stretchY)){let Va=oE(Oe,Et,He),Hn=oE(Pe,Qt,bt);for(let ni=0;ni0&&(Et=Math.max(10,Et),this.circleDiameter=Et)}else{let it=!((Pe=me.image)===null||Pe===void 0)&&Pe.content&&(me.image.textFitWidth||me.image.textFitHeight)?tS(me):{x1:me.left,y1:me.top,x2:me.right,y2:me.bottom};it.y1=it.y1*ge-Ce[0],it.y2=it.y2*ge+Ce[2],it.x1=it.x1*ge-Ce[3],it.x2=it.x2*ge+Ce[1];let He=me.collisionPadding;if(He&&(it.x1-=He[0]*ge,it.y1-=He[1]*ge,it.x2+=He[2]*ge,it.y2+=He[3]*ge),Oe){let bt=new t(it.x1,it.y1),Et=new t(it.x2,it.y1),Qt=new t(it.x1,it.y2),er=new t(it.x2,it.y2),br=Oe*Math.PI/180;bt._rotate(br),Et._rotate(br),Qt._rotate(br),er._rotate(br),it.x1=Math.min(bt.x,Et.x,Qt.x,er.x),it.x2=Math.max(bt.x,Et.x,Qt.x,er.x),it.y1=Math.min(bt.y,Et.y,Qt.y,er.y),it.y2=Math.max(bt.y,Et.y,Qt.y,er.y)}d.emplaceBack(L.x,L.y,it.x1,it.y1,it.x2,it.y2,Y,te,ce)}this.boxEndIndex=d.length}}class aX{constructor(d=[],L=(Y,te)=>Yte?1:0){if(this.data=d,this.length=this.data.length,this.compare=L,this.length>0)for(let Y=(this.length>>1)-1;Y>=0;Y--)this._down(Y)}push(d){this.data.push(d),this._up(this.length++)}pop(){if(this.length===0)return;let d=this.data[0],L=this.data.pop();return--this.length>0&&(this.data[0]=L,this._down(0)),d}peek(){return this.data[0]}_up(d){let{data:L,compare:Y}=this,te=L[d];for(;d>0;){let ce=d-1>>1,me=L[ce];if(Y(te,me)>=0)break;L[d]=me,d=ce}L[d]=te}_down(d){let{data:L,compare:Y}=this,te=this.length>>1,ce=L[d];for(;d=0)break;L[d]=L[me],d=me}L[d]=ce}}function nX(R,d=1){let L=Ev.fromPoints(R[0]),Y=Math.min(L.width(),L.height()),te=Y/2,ce=new aX([],iX),{minX:me,minY:ge,maxX:Ce,maxY:Te}=L;if(Y===0)return new t(me,ge);for(let it=me;itPe.d||!Pe.d)&&(Pe=it),it.max-Pe.d<=d||(te=it.h/2,ce.push(new F0(it.p.x-te,it.p.y-te,te,R)),ce.push(new F0(it.p.x+te,it.p.y-te,te,R)),ce.push(new F0(it.p.x-te,it.p.y+te,te,R)),ce.push(new F0(it.p.x+te,it.p.y+te,te,R)))}return Oe.d>0&&Pe.d-Oe.d<=d?Oe.p:Pe.p}function iX(R,d){return d.max-R.max}class F0{constructor(d,L,Y,te){this.p=new t(d,L),this.h=Y,this.d=function(ce,me){let ge=!1,Ce=1/0;for(let Te of me)for(let Oe=0,Pe=Te.length,it=Pe-1;Oece.y!=bt.y>ce.y&&ce.x<(bt.x-He.x)*(ce.y-He.y)/(bt.y-He.y)+He.x&&(ge=!ge),Ce=Math.min(Ce,na(ce,He,bt))}return(ge?1:-1)*Math.sqrt(Ce)}(this.p,te),this.max=this.d+this.h*Math.SQRT2}}var Af;l.aM=void 0,(Af=l.aM||(l.aM={}))[Af.center=1]="center",Af[Af.left=2]="left",Af[Af.right=3]="right",Af[Af.top=4]="top",Af[Af.bottom=5]="bottom",Af[Af["top-left"]=6]="top-left",Af[Af["top-right"]=7]="top-right",Af[Af["bottom-left"]=8]="bottom-left",Af[Af["bottom-right"]=9]="bottom-right";let K3=Number.POSITIVE_INFINITY;function sE(R,d){return d[1]!==K3?function(L,Y,te){let ce=0,me=0;switch(Y=Math.abs(Y),te=Math.abs(te),L){case"top-right":case"top-left":case"top":me=te-7;break;case"bottom-right":case"bottom-left":case"bottom":me=7-te}switch(L){case"top-right":case"bottom-right":case"right":ce=-Y;break;case"top-left":case"bottom-left":case"left":ce=Y}return[ce,me]}(R,d[0],d[1]):function(L,Y){let te=0,ce=0;Y<0&&(Y=0);let me=Y/Math.SQRT2;switch(L){case"top-right":case"top-left":ce=me-7;break;case"bottom-right":case"bottom-left":ce=7-me;break;case"bottom":ce=7-Y;break;case"top":ce=Y-7}switch(L){case"top-right":case"bottom-right":te=-me;break;case"top-left":case"bottom-left":te=me;break;case"left":te=Y;break;case"right":te=-Y}return[te,ce]}(R,d[0])}function lE(R,d,L){var Y;let te=R.layout,ce=(Y=te.get("text-variable-anchor-offset"))===null||Y===void 0?void 0:Y.evaluate(d,{},L);if(ce){let ge=ce.values,Ce=[];for(let Te=0;Teit*Rc);Oe.startsWith("top")?Pe[1]-=7:Oe.startsWith("bottom")&&(Pe[1]+=7),Ce[Te+1]=Pe}return new gi(Ce)}let me=te.get("text-variable-anchor");if(me){let ge;ge=R._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[te.get("text-radial-offset").evaluate(d,{},L)*Rc,K3]:te.get("text-offset").evaluate(d,{},L).map(Te=>Te*Rc);let Ce=[];for(let Te of me)Ce.push(Te,sE(Te,ge));return new gi(Ce)}return null}function J3(R){switch(R){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function oX(R,d,L,Y,te,ce,me,ge,Ce,Te,Oe,Pe){let it=ce.textMaxSize.evaluate(d,{});it===void 0&&(it=me);let He=R.layers[0].layout,bt=He.get("icon-offset").evaluate(d,{},Oe),Et=cE(L.horizontal),Qt=me/24,er=R.tilePixelRatio*Qt,br=R.tilePixelRatio*it/24,sr=R.tilePixelRatio*ge,Mr=R.tilePixelRatio*He.get("symbol-spacing"),qr=He.get("text-padding")*R.tilePixelRatio,$r=function(ni,Wn,si,po=1){let cs=ni.get("icon-padding").evaluate(Wn,{},si),Ds=cs?.values;return[Ds[0]*po,Ds[1]*po,Ds[2]*po,Ds[3]*po]}(He,d,Oe,R.tilePixelRatio),_a=He.get("text-max-angle")/180*Math.PI,Ca=He.get("text-rotation-alignment")!=="viewport"&&He.get("symbol-placement")!=="point",nn=He.get("icon-rotation-alignment")==="map"&&He.get("symbol-placement")!=="point",qa=He.get("symbol-placement"),bn=Mr/2,Fn=He.get("icon-text-fit"),gn;Y&&Fn!=="none"&&(R.allowVerticalPlacement&&L.vertical&&(gn=rS(Y,L.vertical,Fn,He.get("icon-text-fit-padding"),bt,Qt)),Et&&(Y=rS(Y,Et,Fn,He.get("icon-text-fit-padding"),bt,Qt)));let Va=Oe?Pe.line.getGranularityForZoomLevel(Oe.z):1,Hn=(ni,Wn)=>{Wn.x<0||Wn.x>=F||Wn.y<0||Wn.y>=F||function(si,po,cs,Ds,Xs,Mf,vu,yc,Dc,Hl,rf,Xf,Zf,Th,Sf,Ah,Hh,Fc,nu,lc,mu,zc,Zd,dd,B1){let Ep=si.addToLineVertexArray(po,cs),Cv,z0,B0,O0,fE=0,hE=0,dE=0,pE=0,Q3=-1,ew=-1,$d={},vE=Jn("");if(si.allowVerticalPlacement&&Ds.vertical){let $f=yc.layout.get("text-rotate").evaluate(mu,{},dd)+90;B0=new Cy(Dc,po,Hl,rf,Xf,Ds.vertical,Zf,Th,Sf,$f),vu&&(O0=new Cy(Dc,po,Hl,rf,Xf,vu,Hh,Fc,Sf,$f))}if(Xs){let $f=yc.layout.get("icon-rotate").evaluate(mu,{}),Nh=yc.layout.get("icon-text-fit")!=="none",Lv=iE(Xs,$f,Zd,Nh),vd=vu?iE(vu,$f,Zd,Nh):void 0;z0=new Cy(Dc,po,Hl,rf,Xf,Xs,Hh,Fc,!1,$f),fE=4*Lv.length;let Pv=si.iconSizeData,Sd=null;Pv.kind==="source"?(Sd=[Yd*yc.layout.get("icon-size").evaluate(mu,{})],Sd[0]>bp&&ee(`${si.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):Pv.kind==="composite"&&(Sd=[Yd*zc.compositeIconSizes[0].evaluate(mu,{},dd),Yd*zc.compositeIconSizes[1].evaluate(mu,{},dd)],(Sd[0]>bp||Sd[1]>bp)&&ee(`${si.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),si.addSymbols(si.icon,Lv,Sd,lc,nu,mu,l.ax.none,po,Ep.lineStartIndex,Ep.lineLength,-1,dd),Q3=si.icon.placedSymbolArray.length-1,vd&&(hE=4*vd.length,si.addSymbols(si.icon,vd,Sd,lc,nu,mu,l.ax.vertical,po,Ep.lineStartIndex,Ep.lineLength,-1,dd),ew=si.icon.placedSymbolArray.length-1)}let mE=Object.keys(Ds.horizontal);for(let $f of mE){let Nh=Ds.horizontal[$f];if(!Cv){vE=Jn(Nh.text);let vd=yc.layout.get("text-rotate").evaluate(mu,{},dd);Cv=new Cy(Dc,po,Hl,rf,Xf,Nh,Zf,Th,Sf,vd)}let Lv=Nh.positionedLines.length===1;if(dE+=uE(si,po,Nh,Mf,yc,Sf,mu,Ah,Ep,Ds.vertical?l.ax.horizontal:l.ax.horizontalOnly,Lv?mE:[$f],$d,Q3,zc,dd),Lv)break}Ds.vertical&&(pE+=uE(si,po,Ds.vertical,Mf,yc,Sf,mu,Ah,Ep,l.ax.vertical,["vertical"],$d,ew,zc,dd));let lX=Cv?Cv.boxStartIndex:si.collisionBoxArray.length,uX=Cv?Cv.boxEndIndex:si.collisionBoxArray.length,cX=B0?B0.boxStartIndex:si.collisionBoxArray.length,fX=B0?B0.boxEndIndex:si.collisionBoxArray.length,hX=z0?z0.boxStartIndex:si.collisionBoxArray.length,dX=z0?z0.boxEndIndex:si.collisionBoxArray.length,pX=O0?O0.boxStartIndex:si.collisionBoxArray.length,vX=O0?O0.boxEndIndex:si.collisionBoxArray.length,pd=-1,Ly=($f,Nh)=>$f?.circleDiameter?Math.max($f.circleDiameter,Nh):Nh;pd=Ly(Cv,pd),pd=Ly(B0,pd),pd=Ly(z0,pd),pd=Ly(O0,pd);let gE=pd>-1?1:0;gE&&(pd*=B1/Rc),si.glyphOffsetArray.length>=M0.MAX_GLYPHS&&ee("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),mu.sortKey!==void 0&&si.addToSortKeyRanges(si.symbolInstances.length,mu.sortKey);let mX=lE(yc,mu,dd),[gX,yX]=function($f,Nh){let Lv=$f.length,vd=Nh?.values;if(vd?.length>0)for(let Pv=0;Pv=0?$d.right:-1,$d.center>=0?$d.center:-1,$d.left>=0?$d.left:-1,$d.vertical||-1,Q3,ew,vE,lX,uX,cX,fX,hX,dX,pX,vX,Hl,dE,pE,fE,hE,gE,0,Zf,pd,gX,yX)}(R,Wn,ni,L,Y,te,gn,R.layers[0],R.collisionBoxArray,d.index,d.sourceLayerIndex,R.index,er,[qr,qr,qr,qr],Ca,Ce,sr,$r,nn,bt,d,ce,Te,Oe,me)};if(qa==="line")for(let ni of KS(d.geometry,0,0,F,F)){let Wn=Sv(ni,Va),si=rX(Wn,Mr,_a,L.vertical||Et,Y,24,br,R.overscaling,F);for(let po of si)Et&&sX(R,Et.text,bn,po)||Hn(Wn,po)}else if(qa==="line-center"){for(let ni of d.geometry)if(ni.length>1){let Wn=Sv(ni,Va),si=tX(Wn,_a,L.vertical||Et,Y,24,br);si&&Hn(Wn,si)}}else if(d.type==="Polygon")for(let ni of Yc(d.geometry,0)){let Wn=nX(ni,16);Hn(Sv(ni[0],Va,!0),new Sp(Wn.x,Wn.y,0))}else if(d.type==="LineString")for(let ni of d.geometry){let Wn=Sv(ni,Va);Hn(Wn,new Sp(Wn[0].x,Wn[0].y,0))}else if(d.type==="Point")for(let ni of d.geometry)for(let Wn of ni)Hn([Wn],new Sp(Wn.x,Wn.y,0))}function uE(R,d,L,Y,te,ce,me,ge,Ce,Te,Oe,Pe,it,He,bt){let Et=function(br,sr,Mr,qr,$r,_a,Ca,nn){let qa=qr.layout.get("text-rotate").evaluate(_a,{})*Math.PI/180,bn=[];for(let Fn of sr.positionedLines)for(let gn of Fn.positionedGlyphs){if(!gn.rect)continue;let Va=gn.rect||{},Hn=4,ni=!0,Wn=1,si=0,po=($r||nn)&&gn.vertical,cs=gn.metrics.advance*gn.scale/2;if(nn&&sr.verticalizable&&(si=Fn.lineOffset/2-(gn.imageName?-(Rc-gn.metrics.width*gn.scale)/2:(gn.scale-1)*Rc)),gn.imageName){let Fc=Ca[gn.imageName];ni=Fc.sdf,Wn=Fc.pixelRatio,Hn=1/Wn}let Ds=$r?[gn.x+cs,gn.y]:[0,0],Xs=$r?[0,0]:[gn.x+cs+Mr[0],gn.y+Mr[1]-si],Mf=[0,0];po&&(Mf=Xs,Xs=[0,0]);let vu=gn.metrics.isDoubleResolution?2:1,yc=(gn.metrics.left-Hn)*gn.scale-cs+Xs[0],Dc=(-gn.metrics.top-Hn)*gn.scale+Xs[1],Hl=yc+Va.w/vu*gn.scale/Wn,rf=Dc+Va.h/vu*gn.scale/Wn,Xf=new t(yc,Dc),Zf=new t(Hl,Dc),Th=new t(yc,rf),Sf=new t(Hl,rf);if(po){let Fc=new t(-cs,cs- -17),nu=-Math.PI/2,lc=12-cs,mu=new t(22-lc,-(gn.imageName?lc:0)),zc=new t(...Mf);Xf._rotateAround(nu,Fc)._add(mu)._add(zc),Zf._rotateAround(nu,Fc)._add(mu)._add(zc),Th._rotateAround(nu,Fc)._add(mu)._add(zc),Sf._rotateAround(nu,Fc)._add(mu)._add(zc)}if(qa){let Fc=Math.sin(qa),nu=Math.cos(qa),lc=[nu,-Fc,Fc,nu];Xf._matMult(lc),Zf._matMult(lc),Th._matMult(lc),Sf._matMult(lc)}let Ah=new t(0,0),Hh=new t(0,0);bn.push({tl:Xf,tr:Zf,bl:Th,br:Sf,tex:Va,writingMode:sr.writingMode,glyphOffset:Ds,sectionIndex:gn.sectionIndex,isSDF:ni,pixelOffsetTL:Ah,pixelOffsetBR:Hh,minFontScaleX:0,minFontScaleY:0})}return bn}(0,L,ge,te,ce,me,Y,R.allowVerticalPlacement),Qt=R.textSizeData,er=null;Qt.kind==="source"?(er=[Yd*te.layout.get("text-size").evaluate(me,{})],er[0]>bp&&ee(`${R.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):Qt.kind==="composite"&&(er=[Yd*He.compositeTextSizes[0].evaluate(me,{},bt),Yd*He.compositeTextSizes[1].evaluate(me,{},bt)],(er[0]>bp||er[1]>bp)&&ee(`${R.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),R.addSymbols(R.text,Et,er,ge,ce,me,Te,d,Ce.lineStartIndex,Ce.lineLength,it,bt);for(let br of Oe)Pe[br]=R.text.placedSymbolArray.length-1;return 4*Et.length}function cE(R){for(let d in R)return R[d];return null}function sX(R,d,L,Y){let te=R.compareText;if(d in te){let ce=te[d];for(let me=ce.length-1;me>=0;me--)if(Y.dist(ce[me])this.process()),this.subscription=qe(this.target,"message",L=>this.receive(L),!1),this.globalScope=he(self)?R:window}registerMessageHandler(R,d){this.messageHandlers[R]=d}unregisterMessageHandler(R){delete this.messageHandlers[R]}sendAsync(R,d){return new Promise((L,Y)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10),ce=d?qe(d.signal,"abort",()=>{ce?.unsubscribe(),delete this.resolveRejects[te];let Ce={id:te,type:"",origin:location.origin,targetMapId:R.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Ce)},_Y):null;this.resolveRejects[te]={resolve:Ce=>{ce?.unsubscribe(),L(Ce)},reject:Ce=>{ce?.unsubscribe(),Y(Ce)}};let me=[],ge=Object.assign(Object.assign({},R),{id:te,sourceMapId:this.mapId,origin:location.origin,data:mt(R.data,me)});this.target.postMessage(ge,{transfer:me})})}receive(R){let d=R.data,L=d.id,Y=["file://","resource://android","null"],te=[d.origin,location.origin],ce=d.origin===location.origin,me=te.some(ge=>Y.includes(ge));if((ce||me)&&(!d.targetMapId||this.mapId===d.targetMapId)){if(d.type===""){delete this.tasks[L];let ge=this.abortControllers[L];return delete this.abortControllers[L],void(ge&&ge.abort())}if(he(self)||d.mustQueue)return this.tasks[L]=d,this.taskQueue.push(L),void this.invoker.trigger();this.processTask(L,d)}}process(){if(this.taskQueue.length===0)return;let R=this.taskQueue.shift(),d=this.tasks[R];delete this.tasks[R],this.taskQueue.length>0&&this.invoker.trigger(),d&&this.processTask(R,d)}processTask(R,d){return e(this,void 0,void 0,function*(){if(d.type===""){let te=this.resolveRejects[R];return delete this.resolveRejects[R],te?void(d.error?te.reject(j(xt(d.error))):te.resolve(xt(d.data))):void 0}if(!this.messageHandlers[d.type])return void this.completeTask(R,new Error(`Could not find a registered handler for ${d.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let L=xt(d.data),Y=new AbortController;this.abortControllers[R]=Y;try{let te=yield this.messageHandlers[d.type](d.sourceMapId,L,Y);this.completeTask(R,null,te)}catch(te){this.completeTask(R,j(te))}})}completeTask(R,d,L){let Y=[];delete this.abortControllers[R];let te={id:R,type:"",sourceMapId:this.mapId,origin:location.origin,error:d?mt(d):null,data:mt(L,Y)};this.target.postMessage(te,{transfer:Y})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},l.O=function(){var R=new i(16);return i!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=0,R[12]=0,R[13]=0,R[14]=0),R[0]=1,R[5]=1,R[10]=1,R[15]=1,R},l.P=t,l.Q=function(R,d,L){var Y,te,ce,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et=L[0],Qt=L[1],er=L[2];return d===R?(R[12]=d[0]*Et+d[4]*Qt+d[8]*er+d[12],R[13]=d[1]*Et+d[5]*Qt+d[9]*er+d[13],R[14]=d[2]*Et+d[6]*Qt+d[10]*er+d[14],R[15]=d[3]*Et+d[7]*Qt+d[11]*er+d[15]):(te=d[1],ce=d[2],me=d[3],ge=d[4],Ce=d[5],Te=d[6],Oe=d[7],Pe=d[8],it=d[9],He=d[10],bt=d[11],R[0]=Y=d[0],R[1]=te,R[2]=ce,R[3]=me,R[4]=ge,R[5]=Ce,R[6]=Te,R[7]=Oe,R[8]=Pe,R[9]=it,R[10]=He,R[11]=bt,R[12]=Y*Et+ge*Qt+Pe*er+d[12],R[13]=te*Et+Ce*Qt+it*er+d[13],R[14]=ce*Et+Te*Qt+He*er+d[14],R[15]=me*Et+Oe*Qt+bt*er+d[15]),R},l.R=ls,l.S=function(R,d,L){var Y=L[0],te=L[1],ce=L[2];return R[0]=d[0]*Y,R[1]=d[1]*Y,R[2]=d[2]*Y,R[3]=d[3]*Y,R[4]=d[4]*te,R[5]=d[5]*te,R[6]=d[6]*te,R[7]=d[7]*te,R[8]=d[8]*ce,R[9]=d[9]*ce,R[10]=d[10]*ce,R[11]=d[11]*ce,R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15],R},l.T=vp,l.U=function(R,d,L){var Y=d[0],te=d[1],ce=d[2],me=d[3],ge=d[4],Ce=d[5],Te=d[6],Oe=d[7],Pe=d[8],it=d[9],He=d[10],bt=d[11],Et=d[12],Qt=d[13],er=d[14],br=d[15],sr=L[0],Mr=L[1],qr=L[2],$r=L[3];return R[0]=sr*Y+Mr*ge+qr*Pe+$r*Et,R[1]=sr*te+Mr*Ce+qr*it+$r*Qt,R[2]=sr*ce+Mr*Te+qr*He+$r*er,R[3]=sr*me+Mr*Oe+qr*bt+$r*br,R[4]=(sr=L[4])*Y+(Mr=L[5])*ge+(qr=L[6])*Pe+($r=L[7])*Et,R[5]=sr*te+Mr*Ce+qr*it+$r*Qt,R[6]=sr*ce+Mr*Te+qr*He+$r*er,R[7]=sr*me+Mr*Oe+qr*bt+$r*br,R[8]=(sr=L[8])*Y+(Mr=L[9])*ge+(qr=L[10])*Pe+($r=L[11])*Et,R[9]=sr*te+Mr*Ce+qr*it+$r*Qt,R[10]=sr*ce+Mr*Te+qr*He+$r*er,R[11]=sr*me+Mr*Oe+qr*bt+$r*br,R[12]=(sr=L[12])*Y+(Mr=L[13])*ge+(qr=L[14])*Pe+($r=L[15])*Et,R[13]=sr*te+Mr*Ce+qr*it+$r*Qt,R[14]=sr*ce+Mr*Te+qr*He+$r*er,R[15]=sr*me+Mr*Oe+qr*bt+$r*br,R},l.V=function(R,d){let L={};for(let Y of d)Y in R&&(L[Y]=R[Y]);return L},l.W=wp,l.X=V,l.Y=fS,l.Z=cS,l._=e,l.a=Ae,l.a$=function(R){var d=new i(3);return d[0]=R[0],d[1]=R[1],d[2]=R[2],d},l.a0=f,l.a1=v,l.a2=Se,l.a3=Ph,l.a4=dS,l.a5=Ty,l.a6=F,l.a7=I1,l.a8=Ev,l.a9=25,l.aA=function(R){var d=R[0],L=R[1];return Math.sqrt(d*d+L*L)},l.aB=function(R){return R[0]=0,R[1]=0,R},l.aC=function(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R},l.aD=S3,l.aE=z,l.aF=function(R,d,L,Y){let te=d.y-R.y,ce=d.x-R.x,me=Y.y-L.y,ge=Y.x-L.x,Ce=me*ce-ge*te;if(Ce===0)return null;let Te=(ge*(R.y-L.y)-me*(R.x-L.x))/Ce;return new t(R.x+Te*ce,R.y+Te*te)},l.aG=KS,l.aH=Ya,l.aI=function(R){let d=1/0,L=1/0,Y=-1/0,te=-1/0;for(let ce of R)d=Math.min(d,ce.x),L=Math.min(L,ce.y),Y=Math.max(Y,ce.x),te=Math.max(te,ce.y);return[d,L,Y,te]},l.aJ=Rc,l.aK=P,l.aL=function(R,d,L,Y,te=!1){if(!L[0]&&!L[1])return[0,0];let ce=te?Y==="map"?-R.bearingInRadians:0:Y==="viewport"?R.bearingInRadians:0;if(ce){let me=Math.sin(ce),ge=Math.cos(ce);L=[L[0]*ge-L[1]*me,L[0]*me+L[1]*ge]}return[te?L[0]:P(d,L[0],R.zoom),te?L[1]:P(d,L[1],R.zoom)]},l.aN=M3,l.aO=J3,l.aP=A3,l.aQ=R=>R.type==="symbol",l.aR=dy,l.aS=ct,l.aT=hy,l.aU=It,l.aV=Fa,l.aW=ua,l.aX=_e,l.aY=pS,l.aZ=h,l.a_=w,l.aa=P3,l.ab=R=>{let d=window.document.createElement("video");return d.muted=!0,new Promise(L=>{d.onloadstart=()=>{L(d)};for(let Y of R){let te=window.document.createElement("source");rr(Y)||(d.crossOrigin="Anonymous"),te.src=Y,d.appendChild(te)}})},l.ac=Vt,l.ad=function(){return K++},l.ae=fe,l.af=M0,l.ag=z1,l.ah=Na,l.ai=fo,l.aj=yS,l.ak=function(R){let d={};if(R.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(L,Y,te,ce)=>{let me=te||ce;return d[Y]=!me||me.toLowerCase(),""}),d["max-age"]){let L=parseInt(d["max-age"],10);isNaN(L)?delete d["max-age"]:d["max-age"]=L}return d},l.al=se,l.am=85.051129,l.an=ke,l.ao=function(R){return Math.pow(2,R)},l.ap=S,l.aq=hS,l.ar=function(R){return Math.log(R)/Math.LN2},l.as=function(R){var d=R[0],L=R[1];return d*d+L*L},l.at=function(R){if(!R.length)return new Set;let d=Math.max(...R.map(Ce=>Ce.canonical.z)),L=1/0,Y=-1/0,te=1/0,ce=-1/0,me=[];for(let Ce of R){let{x:Te,y:Oe,z:Pe}=Ce.canonical,it=Math.pow(2,d-Pe),He=Te*it,bt=Oe*it;me.push({id:Ce,x:He,y:bt}),HeY&&(Y=He),btce&&(ce=bt)}let ge=new Set;for(let Ce of me)Ce.x!==L&&Ce.x!==Y&&Ce.y!==te&&Ce.y!==ce||ge.add(Ce.id);return ge},l.au=function(R,d){let L=Math.abs(2*R.wrap)-+(R.wrap<0),Y=Math.abs(2*d.wrap)-+(d.wrap<0);return R.overscaledZ-d.overscaledZ||Y-L||d.canonical.y-R.canonical.y||d.canonical.x-R.canonical.x},l.av=class{constructor(R,d){this.max=R,this.onRemove=d,this.reset()}reset(){for(let R in this.data)for(let d of this.data[R])d.timeout&&clearTimeout(d.timeout),this.onRemove(d.value);return this.data={},this.order=[],this}add(R,d,L){let Y=R.wrapped().key;this.data[Y]===void 0&&(this.data[Y]=[]);let te={value:d,timeout:void 0};if(L!==void 0&&(te.timeout=setTimeout(()=>{this.remove(R,te)},L)),this.data[Y].push(te),this.order.push(Y),this.order.length>this.max){let ce=this._getAndRemoveByKey(this.order[0]);ce&&this.onRemove(ce)}return this}has(R){return R.wrapped().key in this.data}getAndRemove(R){return this.has(R)?this._getAndRemoveByKey(R.wrapped().key):null}_getAndRemoveByKey(R){let d=this.data[R].shift();return d.timeout&&clearTimeout(d.timeout),this.data[R].length===0&&delete this.data[R],this.order.splice(this.order.indexOf(R),1),d.value}getByKey(R){let d=this.data[R];return d?d[0].value:null}get(R){return this.has(R)?this.data[R.wrapped().key][0].value:null}remove(R,d){if(!this.has(R))return this;let L=R.wrapped().key,Y=d===void 0?0:this.data[L].indexOf(d),te=this.data[L][Y];return this.data[L].splice(Y,1),te.timeout&&clearTimeout(te.timeout),this.data[L].length===0&&delete this.data[L],this.onRemove(te.value),this.order.splice(this.order.indexOf(L),1),this}setMaxSize(R){for(this.max=R;this.order.length>this.max;){let d=this._getAndRemoveByKey(this.order[0]);d&&this.onRemove(d)}return this}filter(R){let d=[];for(let L in this.data)for(let Y of this.data[L])R(Y.value)||d.push(Y);for(let L of d)this.remove(L.value.tileID,L)}},l.aw=function(R,d){let L=0,Y=0;if(R.kind==="constant")Y=R.layoutSize;else if(R.kind!=="source"){let{interpolationType:te,minZoom:ce,maxZoom:me}=R,ge=te?se(Pi.interpolationFactor(te,d,ce,me),0,1):0;R.kind==="camera"?Y=bs.number(R.minSize,R.maxSize,ge):L=ge}return{uSizeT:L,uSize:Y}},l.ay=function(R,{uSize:d,uSizeT:L},{lowerSize:Y,upperSize:te}){return R.kind==="source"?Y/Yd:R.kind==="composite"?bs.number(Y/Yd,te/Yd,L):d},l.az=D,l.b=we,l.b$=zs,l.b0=function(R,d,L){return R[0]=d[0]-L[0],R[1]=d[1]-L[1],R[2]=d[2]-L[2],R},l.b1=function(R,d){var L=d[0],Y=d[1],te=d[2],ce=L*L+Y*Y+te*te;return ce>0&&(ce=1/Math.sqrt(ce)),R[0]=d[0]*ce,R[1]=d[1]*ce,R[2]=d[2]*ce,R},l.b2=u,l.b3=function(R,d){return R[0]*d[0]+R[1]*d[1]+R[2]*d[2]},l.b4=function(R,d,L){return R[0]=d[0]*L[0],R[1]=d[1]*L[1],R[2]=d[2]*L[2],R[3]=d[3]*L[3],R},l.b5=C,l.b6=function(R,d,L){let Y=d[0]*L[0]+d[1]*L[1]+d[2]*L[2];return Y===0?null:(-(R[0]*L[0]+R[1]*L[1]+R[2]*L[2])-L[3])/Y},l.b7=x,l.b8=function(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R[2]=d[2]*L,R[3]=d[3]*L,R},l.b9=function(R,d){return R[0]*d[0]+R[1]*d[1]+R[2]*d[2]+R[3]},l.bA=O,l.bB=function(R,d,L){var Y=L[0],te=L[1],ce=L[2],me=L[3],ge=d[0],Ce=d[1],Te=d[2],Oe=te*Te-ce*Ce,Pe=ce*ge-Y*Te,it=Y*Ce-te*ge;return R[0]=ge+me*(Oe+=Oe)+te*(it+=it)-ce*(Pe+=Pe),R[1]=Ce+me*Pe+ce*Oe-Y*it,R[2]=Te+me*it+Y*Pe-te*Oe,R},l.bC=function(R,d,L){let Y=(te=[R[0],R[1],R[2],d[0],d[1],d[2],L[0],L[1],L[2]])[0]*((Oe=te[8])*(me=te[4])-(ge=te[5])*(Te=te[7]))+te[1]*(-Oe*(ce=te[3])+ge*(Ce=te[6]))+te[2]*(Te*ce-me*Ce);var te,ce,me,ge,Ce,Te,Oe;if(Y===0)return null;let Pe=u([],[d[0],d[1],d[2]],[L[0],L[1],L[2]]),it=u([],[L[0],L[1],L[2]],[R[0],R[1],R[2]]),He=u([],[R[0],R[1],R[2]],[d[0],d[1],d[2]]),bt=h([],Pe,-R[3]);return w(bt,bt,h([],it,-d[3])),w(bt,bt,h([],He,-L[3])),h(bt,bt,1/Y),bt},l.bD=L3,l.bE=function(){return new Float64Array(4)},l.bF=function(R,d,L,Y){var te=[],ce=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ce[0]=te[0]*Math.cos(Y)-te[1]*Math.sin(Y),ce[1]=te[0]*Math.sin(Y)+te[1]*Math.cos(Y),ce[2]=te[2],R[0]=ce[0]+L[0],R[1]=ce[1]+L[1],R[2]=ce[2]+L[2],R},l.bG=function(R,d,L,Y){var te=[],ce=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ce[0]=te[0],ce[1]=te[1]*Math.cos(Y)-te[2]*Math.sin(Y),ce[2]=te[1]*Math.sin(Y)+te[2]*Math.cos(Y),R[0]=ce[0]+L[0],R[1]=ce[1]+L[1],R[2]=ce[2]+L[2],R},l.bH=function(R,d,L,Y){var te=[],ce=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ce[0]=te[2]*Math.sin(Y)+te[0]*Math.cos(Y),ce[1]=te[1],ce[2]=te[2]*Math.cos(Y)-te[0]*Math.sin(Y),R[0]=ce[0]+L[0],R[1]=ce[1]+L[1],R[2]=ce[2]+L[2],R},l.bI=function(R,d,L){var Y=Math.sin(L),te=Math.cos(L),ce=d[0],me=d[1],ge=d[2],Ce=d[3],Te=d[8],Oe=d[9],Pe=d[10],it=d[11];return d!==R&&(R[4]=d[4],R[5]=d[5],R[6]=d[6],R[7]=d[7],R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15]),R[0]=ce*te-Te*Y,R[1]=me*te-Oe*Y,R[2]=ge*te-Pe*Y,R[3]=Ce*te-it*Y,R[8]=ce*Y+Te*te,R[9]=me*Y+Oe*te,R[10]=ge*Y+Pe*te,R[11]=Ce*Y+it*te,R},l.bJ=function(R,d){let L=U(R,360),Y=U(d,360),te=Y-L,ce=Y>L?te-360:te+360;return Math.abs(te)0?me:-me},l.bM=function(R,d){let L=U(R,2*Math.PI),Y=U(d,2*Math.PI);return Math.min(Math.abs(L-Y),Math.abs(L-Y+2*Math.PI),Math.abs(L-Y-2*Math.PI))},l.bN=function(){let R={},d=ht.$version;for(let L in ht.$root){let Y=ht.$root[L];if(Y.required){let te=null;te=L==="version"?d:Y.type==="array"?[]:{},te!=null&&(R[L]=te)}}return R},l.bO=At,l.bP=Bt,l.bQ=function R(d,L){if(Array.isArray(d)){if(!Array.isArray(L)||d.length!==L.length)return!1;for(let Y=0;YR.type==="raster",l.bV=q,l.bW=function(R,d){if(!R)return[{command:"setStyle",args:[d]}];let L=[];try{if(!We(R.version,d.version))return[{command:"setStyle",args:[d]}];We(R.center,d.center)||L.push({command:"setCenter",args:[d.center]}),We(R.state,d.state)||L.push({command:"setGlobalState",args:[d.state]}),We(R.centerAltitude,d.centerAltitude)||L.push({command:"setCenterAltitude",args:[d.centerAltitude]}),We(R.zoom,d.zoom)||L.push({command:"setZoom",args:[d.zoom]}),We(R.bearing,d.bearing)||L.push({command:"setBearing",args:[d.bearing]}),We(R.pitch,d.pitch)||L.push({command:"setPitch",args:[d.pitch]}),We(R.roll,d.roll)||L.push({command:"setRoll",args:[d.roll]}),We(R.sprite,d.sprite)||L.push({command:"setSprite",args:[d.sprite]}),We(R.glyphs,d.glyphs)||L.push({command:"setGlyphs",args:[d.glyphs]}),We(R.transition,d.transition)||L.push({command:"setTransition",args:[d.transition]}),We(R.light,d.light)||L.push({command:"setLight",args:[d.light]}),We(R.terrain,d.terrain)||L.push({command:"setTerrain",args:[d.terrain]}),We(R.sky,d.sky)||L.push({command:"setSky",args:[d.sky]}),We(R.projection,d.projection)||L.push({command:"setProjection",args:[d.projection]});let Y={},te=[];(function(me,ge,Ce,Te){let Oe;for(Oe in ge=ge||{},me=me||{})Object.prototype.hasOwnProperty.call(me,Oe)&&(Object.prototype.hasOwnProperty.call(ge,Oe)||et(Oe,Ce,Te));for(Oe in ge)Object.prototype.hasOwnProperty.call(ge,Oe)&&(Object.prototype.hasOwnProperty.call(me,Oe)?We(me[Oe],ge[Oe])||(me[Oe].type==="geojson"&&ge[Oe].type==="geojson"&&pt(me,ge,Oe)?Ke(Ce,{command:"setGeoJSONSourceData",args:[Oe,ge[Oe].data]}):Mt(Oe,ge,Ce,Te)):Je(Oe,ge,Ce))})(R.sources,d.sources,te,Y);let ce=[];R.layers&&R.layers.forEach(me=>{"source"in me&&Y[me.source]?L.push({command:"removeLayer",args:[me.id]}):ce.push(me)}),L=L.concat(te),function(me,ge,Ce){ge=ge||[];let Te=(me=me||[]).map(Ct),Oe=ge.map(Ct),Pe=me.reduce(qt,{}),it=ge.reduce(qt,{}),He=Te.slice(),bt=Object.create(null),Et,Qt,er,br,sr;for(let Mr=0,qr=0;Mrm?(te=Math.acos(ce),me=Math.sin(te),ge=Math.sin((1-Y)*te)/me,Ce=Math.sin(Y*te)/me):(ge=1-Y,Ce=Y),R[0]=ge*Te+Ce*He,R[1]=ge*Oe+Ce*bt,R[2]=ge*Pe+Ce*Et,R[3]=ge*it+Ce*Qt,R},l.bm=function(R){let d=new Float64Array(9);var L,Y,te,ce,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr;Pe=(te=(Y=R)[0])*(Ce=te+te),it=(ce=Y[1])*Ce,bt=(me=Y[2])*Ce,Et=me*(Te=ce+ce),er=(ge=Y[3])*Ce,br=ge*Te,sr=ge*(Oe=me+me),(L=d)[0]=1-(He=ce*Te)-(Qt=me*Oe),L[3]=it-sr,L[6]=bt+br,L[1]=it+sr,L[4]=1-Pe-Qt,L[7]=Et-er,L[2]=bt-br,L[5]=Et+er,L[8]=1-Pe-He;let Mr=_e(-Math.asin(se(d[2],-1,1))),qr,$r;return Math.hypot(d[5],d[8])<.001?(qr=0,$r=-_e(Math.atan2(d[3],d[4]))):(qr=_e(d[5]===0&&d[8]===0?0:Math.atan2(d[5],d[8])),$r=_e(d[1]===0&&d[0]===0?0:Math.atan2(d[1],d[0]))),{roll:qr,pitch:Mr+90,bearing:$r}},l.bn=function(R,d){return R.roll==d.roll&&R.pitch==d.pitch&&R.bearing==d.bearing},l.bo=rn,l.bp=ro,l.bq=_0,l.br=M1,l.bs=y0,l.bt=$,l.bu=Q,l.bv=io,l.bw=function(R,d,L,Y,te){return $(Y,te,se((R-d)/(L-d),0,1))},l.bx=function(R,d,L,Y){return R[0]=d[0]+L[0]*Y,R[1]=d[1]+L[1]*Y,R[2]=d[2]+L[2]*Y,R},l.by=U,l.bz=function(){return new Float64Array(3)},l.c=Ye,l.c$=Cc,l.c0=class extends Wi{constructor(R,d){super(R,d),this.current=Bs}set(R){if(R[12]!==this.current[12]||R[0]!==this.current[0])return this.current=R,void this.gl.uniformMatrix4fv(this.location,!1,R);for(let d=1;d<16;d++)if(R[d]!==this.current[d]){this.current=R,this.gl.uniformMatrix4fv(this.location,!1,R);break}}},l.c1=Mo,l.c2=class extends Wi{constructor(R,d){super(R,d),this.current=[0,0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]&&R[2]===this.current[2]||(this.current=R,this.gl.uniform3f(this.location,R[0],R[1],R[2]))}},l.c3=class extends Wi{constructor(R,d){super(R,d),this.current=[0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]||(this.current=R,this.gl.uniform2f(this.location,R[0],R[1]))}},l.c4=T,l.c5=function(R,d){var L=Math.sin(d),Y=Math.cos(d);return R[0]=Y,R[1]=L,R[2]=0,R[3]=-L,R[4]=Y,R[5]=0,R[6]=0,R[7]=0,R[8]=1,R},l.c6=function(R,d,L){var Y=d[0],te=d[1],ce=d[2];return R[0]=Y*L[0]+te*L[3]+ce*L[6],R[1]=Y*L[1]+te*L[4]+ce*L[7],R[2]=Y*L[2]+te*L[5]+ce*L[8],R},l.c7=function(R,d,L,Y,te,ce,me){var ge=1/(d-L),Ce=1/(Y-te),Te=1/(ce-me);return R[0]=-2*ge,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=-2*Ce,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=2*Te,R[11]=0,R[12]=(d+L)*ge,R[13]=(te+Y)*Ce,R[14]=(me+ce)*Te,R[15]=1,R},l.c8=class extends Wi{constructor(R,d){super(R,d),this.current=new Array}set(R){if(R!=this.current){this.current=R;let d=new Float32Array(4*R.length);for(let L=0;L25||Y<0||Y>=1||L<0||L>=1)},l.cE=function(R,d){return R[0]=d[0],R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=d[1],R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=d[2],R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R},l.cF=class extends Jt{},l.cG=Tt,l.cH=function(R,d){Ye.REGISTERED_PROTOCOLS[R]=d},l.cI=function(R){delete Ye.REGISTERED_PROTOCOLS[R]},l.cJ=function(R,d){let L={};for(let te=0;teHn*Rc)}let bn=Ce?"center":te.get("text-justify").evaluate(Pe,{},R.canonical),Fn=te.get("symbol-placement")==="point"?te.get("text-max-width").evaluate(Pe,{},R.canonical)*Rc:1/0,gn=()=>{R.bucket.allowVerticalPlacement&&Br($r)&&(Qt.vertical=xy(er,R.glyphMap,R.glyphPositions,R.imagePositions,it,Fn,ge,nn,"left",Ca,sr,l.ax.vertical,!0,bt,He))};if(!Ce&&qa){let Va=new Set;if(bn==="auto")for(let ni=0;niWY(ge,Ce,ce),Y.layers[me])}(R,L,d),L.finish()},l.cT=function(R,d,L,Y,te,ce){let me=JS(R,d,L,te,0);return me=JS(me,d,Y,ce,1),me},l.cU=class{constructor(R){this.maxEntries=R,this.map=new Map}get(R){let d=this.map.get(R);return d!==void 0&&(this.map.delete(R),this.map.set(R,d)),d}set(R,d){if(this.map.has(R))this.map.delete(R);else if(this.map.size>=this.maxEntries){let L=this.map.keys().next().value;this.map.delete(L)}this.map.set(R,d)}clear(){this.map.clear()}},l.cV=w4,l.cW=_y,l.cX=YS,l.cY=function(R,d,L,Y,te){return e(this,void 0,void 0,function*(){if(v())try{return yield Se(R,d,L,Y,te)}catch{}return function(ce,me,ge,Ce,Te){let Oe=ce.width,Pe=ce.height;Ie&&Ge||(Ie=new OffscreenCanvas(Oe,Pe),Ge=Ie.getContext("2d",{willReadFrequently:!0})),Ie.width=Oe,Ie.height=Pe,Ge.drawImage(ce,0,0,Oe,Pe);let it=Ge.getImageData(me,ge,Ce,Te);return Ge.clearRect(0,0,Oe,Pe),it.data}(R,d,L,Y,te)})},l.cZ=mp,l.c_=class{constructor(R,d){this.layers={[z1]:this},this.name=z1,this.version=d?d.version:1,this.extent=d?d.extent:4096,this.length=R.length,this.features=R}feature(R){return new HY(this.features[R],this.extent)}},l.ca=class extends sa{},l.cb=VW,l.cc=class extends Tn{},l.cd=Lu,l.ce=function(R){return R<=1?1:Math.pow(2,Math.ceil(Math.log(R)/Math.LN2))},l.cf=au,l.cg=function(R,d,L){var Y=d[0],te=d[1],ce=d[2],me=L[3]*Y+L[7]*te+L[11]*ce+L[15];return R[0]=(L[0]*Y+L[4]*te+L[8]*ce+L[12])/(me=me||1),R[1]=(L[1]*Y+L[5]*te+L[9]*ce+L[13])/me,R[2]=(L[2]*Y+L[6]*te+L[10]*ce+L[14])/me,R},l.ch=class extends mr{},l.ci=class extends y{},l.cj=function(R,d){return R[0]===d[0]&&R[1]===d[1]&&R[2]===d[2]&&R[3]===d[3]&&R[4]===d[4]&&R[5]===d[5]&&R[6]===d[6]&&R[7]===d[7]&&R[8]===d[8]&&R[9]===d[9]&&R[10]===d[10]&&R[11]===d[11]&&R[12]===d[12]&&R[13]===d[13]&&R[14]===d[14]&&R[15]===d[15]},l.ck=function(R,d){var L=R[0],Y=R[1],te=R[2],ce=R[3],me=R[4],ge=R[5],Ce=R[6],Te=R[7],Oe=R[8],Pe=R[9],it=R[10],He=R[11],bt=R[12],Et=R[13],Qt=R[14],er=R[15],br=d[0],sr=d[1],Mr=d[2],qr=d[3],$r=d[4],_a=d[5],Ca=d[6],nn=d[7],qa=d[8],bn=d[9],Fn=d[10],gn=d[11],Va=d[12],Hn=d[13],ni=d[14],Wn=d[15];return Math.abs(L-br)<=m*Math.max(1,Math.abs(L),Math.abs(br))&&Math.abs(Y-sr)<=m*Math.max(1,Math.abs(Y),Math.abs(sr))&&Math.abs(te-Mr)<=m*Math.max(1,Math.abs(te),Math.abs(Mr))&&Math.abs(ce-qr)<=m*Math.max(1,Math.abs(ce),Math.abs(qr))&&Math.abs(me-$r)<=m*Math.max(1,Math.abs(me),Math.abs($r))&&Math.abs(ge-_a)<=m*Math.max(1,Math.abs(ge),Math.abs(_a))&&Math.abs(Ce-Ca)<=m*Math.max(1,Math.abs(Ce),Math.abs(Ca))&&Math.abs(Te-nn)<=m*Math.max(1,Math.abs(Te),Math.abs(nn))&&Math.abs(Oe-qa)<=m*Math.max(1,Math.abs(Oe),Math.abs(qa))&&Math.abs(Pe-bn)<=m*Math.max(1,Math.abs(Pe),Math.abs(bn))&&Math.abs(it-Fn)<=m*Math.max(1,Math.abs(it),Math.abs(Fn))&&Math.abs(He-gn)<=m*Math.max(1,Math.abs(He),Math.abs(gn))&&Math.abs(bt-Va)<=m*Math.max(1,Math.abs(bt),Math.abs(Va))&&Math.abs(Et-Hn)<=m*Math.max(1,Math.abs(Et),Math.abs(Hn))&&Math.abs(Qt-ni)<=m*Math.max(1,Math.abs(Qt),Math.abs(ni))&&Math.abs(er-Wn)<=m*Math.max(1,Math.abs(er),Math.abs(Wn))},l.cl=function(R,d){return R[0]=d[0],R[1]=d[1],R[2]=d[2],R[3]=d[3],R[4]=d[4],R[5]=d[5],R[6]=d[6],R[7]=d[7],R[8]=d[8],R[9]=d[9],R[10]=d[10],R[11]=d[11],R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15],R},l.cm=R=>R.type==="circle",l.cn=R=>R.type==="heatmap",l.co=R=>R.type==="line",l.cp=R=>R.type==="fill",l.cq=R=>R.type==="fill-extrusion",l.cr=R=>R.type==="hillshade",l.cs=R=>R.type==="color-relief",l.ct=R=>R.type==="background",l.cu=R=>R.type==="custom",l.cv=re,l.cw=function(R,d,L){if(d<=0)return R;let Y=1/d;return L===void 0||Math.abs(L)<1e-10?Math.round(R*Y)/Y:(L>0?Math.ceil(R*Y-1e-9):Math.floor(R*Y+1e-10))/Y},l.cx=function(R,d,L){let Y=B(d.x-L.x,d.y-L.y),te=B(R.x-L.x,R.y-L.y);var ce,me;return _e(Math.atan2(Y[0]*te[1]-Y[1]*te[0],(ce=Y)[0]*(me=te)[0]+ce[1]*me[1]))},l.cy=ne,l.cz=function(R,d){var L;if(!ve[d])return!1;let Y=R?.target,te=((L=Y?.ownerDocument)===null||L===void 0?void 0:L.defaultView)||window;return R instanceof te.MouseEvent||R instanceof te.WheelEvent},l.d=j,l.d0=class{constructor(R,d){let L=(d=this.options=Object.assign({},RW,d)).debug;if(L&&console.time("preprocess data"),d.maxZoom<0||d.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(d.promoteId&&d.generateId)throw new Error("promoteId and generateId cannot be used together.");let Y=c3(R,d);L&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",d.indexMaxZoom,d.indexMaxPoints),console.time("generate tiles")),Y=p3(Y,d),d.updateable&&(this.source=Y),this.initializeIndex(Y,d)}initializeIndex(R,d){this.tileIndex=d.cluster?new MW(d.clusterOptions):new PW(d),R.length&&this.tileIndex.initialize(R)}getTile(R,d,L){return d=+d,L=+L,(R=+R)<0||R>24?null:this.tileIndex.getTile(R,d,L)}updateData(R,d){let L=this.options;if(!L.updateable)throw new Error("to update tile geojson `updateable` option must be set to true");let{affected:Y,source:te}=function(ce,me,ge){let Ce=function(Oe,Pe){var it,He;return Oe?{removeAll:Oe.removeAll,remove:new Set(Oe.remove||[]),add:new Map((it=Oe.add)==null?void 0:it.map(bt=>[Pe.promoteId?bt.properties[Pe.promoteId]:bt.id,bt])),update:new Map((He=Oe.update)==null?void 0:He.map(bt=>[bt.id,bt]))}:{remove:new Set,add:new Map,update:new Map}}(me,ge),Te=[];if(Ce.removeAll&&(Te=ce,ce=[]),Ce.remove.size||Ce.add.size){let Oe=[];for(let Pe of ce)(Ce.remove.has(Pe.id)||Ce.add.has(Pe.id))&&Oe.push(Pe);if(Oe.length){Te.push(...Oe);let Pe=new Set(Oe.map(it=>it.id));ce=ce.filter(it=>!Pe.has(it.id))}if(Ce.add.size){let Pe=c3({type:"FeatureCollection",features:Array.from(Ce.add.values())},ge);Pe=p3(Pe,ge),Te.push(...Pe),ce.push(...Pe)}}if(Ce.update.size){let Oe=new Map,Pe=[];for(let it of ce)Ce.update.has(it.id)?Oe.set(it.id,[...Oe.get(it.id)||[],it]):Pe.push(it);for(let[it,He]of Ce.update){let bt=Oe.get(it);if(!bt||bt.length===0)continue;let Et=AW(bt,He,ge);Te.push(...bt,...Et),Pe.push(...Et)}ce=Pe}return{affected:Te,source:ce}}(this.source,R,L);d&&({affected:Y,source:te}=this.filterUpdate(te,Y,d)),Y.length&&(this.source=te,this.tileIndex.updateIndex(te,Y,L))}filterUpdate(R,d,L){let Y=new Set;for(let te of R)te.id!=null&&(L(vy(te))||(d.push(te),Y.add(te.id)));return{affected:d,source:R=R.filter(te=>!Y.has(te.id))}}getData(){if(!this.options.updateable)throw new Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map(R=>vy(R))}}updateClusterOptions(R,d){let L=this.options.cluster;this.options.cluster=R,this.options.clusterOptions=d,L!=R?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(R){return this.tileIndex.getClusterExpansionZoom(R)}getClusterChildren(R){return this.tileIndex.getChildren(R)}getClusterLeaves(R,d,L){return this.tileIndex.getLeaves(R,d,L)}},l.d1=Si,l.e=Z,l.f=rr,l.g=yt,l.h=R=>e(void 0,void 0,void 0,function*(){if(R.byteLength===0)return createImageBitmap(new ImageData(1,1));let d=new Blob([new Uint8Array(R)],{type:"image/png"});try{return createImageBitmap(d)}catch(L){throw new Error(`Could not load image because of ${j(L).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),l.i=he,l.j=R=>new Promise((d,L)=>{let Y=new Image;Y.onload=()=>{d(Y),URL.revokeObjectURL(Y.src),Y.onload=null,window.requestAnimationFrame(()=>Y.src=Me)},Y.onerror=()=>L(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let te=new Blob([new Uint8Array(R)],{type:"image/png"});Y.src=R.byteLength?URL.createObjectURL(te):Me}),l.k=(R,d)=>$t(Z(R,{type:"json"}),d),l.l=Ot,l.m=$t,l.n=or,l.o=(R,d)=>$t(Z(R,{type:"arrayBuffer"}),d),l.p=J4,l.q=function(R){return new _y(R).readFields(nY,[])},l.r=function(R){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(R))},l.s=qe,l.t=As,l.u=Ps,l.v=Pc,l.w=ee,l.x=ht,l.y=vo,l.z=Bl}),E("worker",["./shared"],function(l){"use strict";class e{constructor(w,h){this.keyCache={},w&&this.replace(w,h)}replace(w,h){this._layerConfigs={},this._layers={},this.update(w,[],h)}update(w,h,u){for(let x of w){this._layerConfigs[x.id]=x;let z=this._layers[x.id]=l.bT(x,u);z._featureFilter=l.ah(z.filter,u),this.keyCache[x.id]&&delete this.keyCache[x.id]}for(let x of h)delete this.keyCache[x],delete this._layerConfigs[x],delete this._layers[x];this.familiesBySource={};let A=l.cJ(Object.values(this._layerConfigs),this.keyCache);for(let x of A){let z=x.map(P=>this._layers[P.id]),I=z[0];if(I.isHidden())continue;let O=I.source||"",D=this.familiesBySource[O];D||(D=this.familiesBySource[O]={});let B=I.sourceLayer||l.ag,F=D[B];F||(F=D[B]=[]),F.push(z)}}}class t{constructor(w){let h={},u=[];for(let I in w){let O=w[I],D=h[I]={};for(let B in O){let F=O[+B];if(!F||F.bitmap.width===0||F.bitmap.height===0)continue;let P={x:0,y:0,w:F.bitmap.width+2,h:F.bitmap.height+2};u.push(P),D[B]={rect:P,metrics:F.metrics}}}let{w:A,h:x}=l.p(u),z=new l.t({width:A||1,height:x||1});for(let I in w){let O=w[I];for(let D in O){let B=O[+D];if(!B||B.bitmap.width===0||B.bitmap.height===0)continue;let F=h[I][D].rect;l.t.copy(B.bitmap,z,{x:0,y:0},{x:F.x+1,y:F.y+1},B.bitmap)}}this.image=z,this.positions=h}}l.cK("GlyphAtlas",t);class n{constructor(w){this.tileID=new l.a3(w.tileID.overscaledZ,w.tileID.wrap,w.tileID.canonical.z,w.tileID.canonical.x,w.tileID.canonical.y),this.uid=w.uid,this.zoom=w.zoom,this.pixelRatio=w.pixelRatio,this.tileSize=w.tileSize,this.source=w.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=w.showCollisionBoxes,this.collectResourceTiming=!!w.collectResourceTiming,this.returnDependencies=!!w.returnDependencies,this.promoteId=w.promoteId,this.inFlightDependencies=[]}parse(w,h,u,A,x){return l._(this,void 0,void 0,function*(){this.status="parsing",this.data=w,this.collisionBoxArray=new l.ae;let z=new l.cL(Object.keys(w.layers).sort()),I=new l.cM(this.tileID,this.promoteId);I.bucketLayerIDs=[];let O={},D={featureIndex:I,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:u,subdivisionGranularity:x},B=h.familiesBySource[this.source];for(let q in B){let W=w.layers[q];if(!W)continue;W.version===1&&l.w(`Vector tile source "${this.source}" layer "${q}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ee=z.encode(q),ae=[];for(let he=0;hewe.id)))}}let F=l.bY(D.glyphDependencies,q=>Object.keys(q).map(Number));for(let q of this.inFlightDependencies)q?.abort();this.inFlightDependencies=[];let P=Promise.resolve({});if(Object.keys(F).length){let q=new AbortController;this.inFlightDependencies.push(q),P=A.sendAsync({type:"GG",data:{stacks:F,source:this.source,tileID:this.tileID,type:"glyphs"}},q)}let j=Object.keys(D.iconDependencies),U=Promise.resolve({});if(j.length){let q=new AbortController;this.inFlightDependencies.push(q),U=A.sendAsync({type:"GI",data:{icons:j,source:this.source,tileID:this.tileID,type:"icons"}},q)}let $=Object.keys(D.patternDependencies),Q=Promise.resolve({});if($.length){let q=new AbortController;this.inFlightDependencies.push(q),Q=A.sendAsync({type:"GI",data:{icons:$,source:this.source,tileID:this.tileID,type:"patterns"}},q)}let re=D.dashDependencies,ne=Promise.resolve({});if(Object.keys(re).length){let q=new AbortController;this.inFlightDependencies.push(q),ne=A.sendAsync({type:"GDA",data:{dashes:re}},q)}let[se,V,Z,K]=yield Promise.all([P,U,Q,ne]),H=new t(se),X=new l.cN(V,Z);for(let q in O){let W=O[q];W instanceof l.af?(r(W.layers,this.zoom,u),l.cO({bucket:W,glyphMap:se,glyphPositions:H.positions,imageMap:V,imagePositions:X.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:D.subdivisionGranularity})):W.hasDependencies&&(W instanceof l.cP||W instanceof l.cQ||W instanceof l.cR)&&(r(W.layers,this.zoom,u),W.addFeatures(D,this.tileID.canonical,X.patternPositions,K))}return this.status="done",{buckets:Object.values(O).filter(q=>!q.isEmpty()),featureIndex:I,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:H.image,imageAtlas:X,dashPositions:K,glyphMap:this.returnDependencies?se:null,iconMap:this.returnDependencies?V:null,glyphPositions:this.returnDependencies?H.positions:null}})}}function r(_,w,h){let u=new l.J(w);for(let A of _)A.recalculate(u,h)}class a{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(w,h){this.loading[w]=h}finishLoading(w){delete this.loading[w]}abort(w){let h=this.loading[w];h?.abort&&(h.abort.abort(),delete this.loading[w])}setParsing(w,h){this.parsing[w]=h}consumeParsing(w){let h=this.parsing[w];if(h)return delete this.parsing[w],h}clearParsing(w){delete this.parsing[w]}markLoaded(w,h){this.loaded[w]=h}getLoaded(w){let h=this.loaded[w];if(h)return h}removeLoaded(w){delete this.loaded[w]}clearLoaded(){this.loaded={}}}class o{constructor(w){this.start=`${w}#start`,this.end=`${w}#end`,this.measure=w,performance.mark(this.start)}finish(){performance.mark(this.end);let w=performance.getEntriesByName(this.measure);return w.length===0&&(performance.measure(this.measure,this.start,this.end),w=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),w}}class s{constructor(w,h,u,A,x){this.type=w,this.properties=u||{},this.extent=x,this.pointsArray=h,this.id=A}loadGeometry(){return this.pointsArray.map(w=>w.map(h=>new l.P(h.x,h.y)))}}class c{constructor(w,h,u){this.version=2,this._myFeatures=w,this.name=h,this.length=w.length,this.extent=u}feature(w){return this._myFeatures[w]}}class g{constructor(){this.layers={}}addLayer(w){this.layers[w.name]=w}}function f(_){let w=l.cS(_);return w.byteOffset===0&&w.byteLength===w.buffer.byteLength||(w=new Uint8Array(w)),{vectorTile:_,rawData:w.buffer}}function v(_,w,h){let{extent:u}=_,A=Math.pow(2,h.z-w.z),x=(h.x-w.x*A)*u,z=(h.y-w.y*A)*u,I=[];for(let O=0;O<_.length;O++){let D=_.feature(O),B=D.loadGeometry();for(let P of B)for(let j of P)j.x=j.x*A-x,j.y=j.y*A-z;let F=128;B=l.cT(B,D.type,-F,-F,u+F,u+F),B.length!==0&&I.push(new s(D.type,B,D.properties,D.id,u))}return new c(I,_.name,u)}class m{constructor(w,h,u){this.actor=w,this.layerIndex=h,this.availableImages=u,this.tileState=new a,this.overzoomedTileResultCache=new l.cU(1e3)}loadVectorTile(w,h){try{return{vectorTile:w.encoding!=="mlt"?new l.cV(new l.cW(h)):new l.cX(h),rawData:h}}catch(u){let A=new Uint8Array(h),x=`Unable to parse the tile at ${w.request.url}, `;throw x+=A[0]===31&&A[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${l.d(u).message}`,new Error(x)}}loadTile(w){return l._(this,void 0,void 0,function*(){let{uid:h,overzoomParameters:u}=w;u&&(w.request=u.overzoomRequest);let A=this._startRequestTiming(w),x=new n(w);this.tileState.startLoading(h,x);let z=new AbortController;x.abort=z;try{let I=yield l.o(w.request,z);if(w.etag&&w.etag===I.etag)return this.tileState.finishLoading(h),this._getEtagUnmodifiedResult(I,A);let O=this.loadVectorTile(w,I.data);if(this.tileState.finishLoading(h),!O)return null;let{vectorTile:D,rawData:B}=O;u&&({vectorTile:D,rawData:B}=this._getOverzoomTile(w,D));let F=this._getExpiryData(I),P=this._finishRequestTiming(A);x.vectorTile=D,this.tileState.markLoaded(h,x);let j={rawData:B,cacheControl:F,resourceTiming:P};this.tileState.setParsing(h,j);try{return yield this._parseWorkerTile(x,w,j)}finally{this.tileState.clearParsing(h)}}catch(I){throw this.tileState.finishLoading(h),x.status="done",this.tileState.markLoaded(h,x),I}})}_getEtagUnmodifiedResult(w,h){let u=this._getExpiryData(w),A=this._finishRequestTiming(h);return l.e({etagUnmodified:!0},u,A)}_parseWorkerTile(w,h,u){return l._(this,void 0,void 0,function*(){let A=yield w.parse(w.vectorTile,this.layerIndex,this.availableImages,this.actor,h.subdivisionGranularity);if(u){let{rawData:x,cacheControl:z,resourceTiming:I}=u;A=l.e({rawTileData:x.slice(0),encoding:h.encoding},A,z,I)}return A})}_getExpiryData({expires:w,cacheControl:h,etag:u}){let A={};return w&&(A.expires=w),h&&(A.cacheControl=h),u&&(A.etag=u),A}_startRequestTiming(w){var h;if(!((h=w.request)===null||h===void 0)&&h.collectResourceTiming)return new o(w.request.url)}_finishRequestTiming(w){let h=w?.finish();return h?{resourceTiming:JSON.parse(JSON.stringify(h))}:{}}_getOverzoomTile(w,h){var u;let{tileID:A,source:x,overzoomParameters:z}=w,{maxZoomTileID:I}=z,O=`${I.key}_${A.key}_${(u=w.request)===null||u===void 0?void 0:u.url}`,D=this.overzoomedTileResultCache.get(O);if(D)return D;let B=new g,F=this.layerIndex.familiesBySource[x];for(let j in F){let U=h.layers[j];if(!U)continue;let $=v(U,I,A.canonical);$.length>0&&B.addLayer($)}let P=f(B);return this.overzoomedTileResultCache.set(O,P),P}reloadTile(w){return l._(this,void 0,void 0,function*(){let h=w.uid,u=this.tileState.getLoaded(h);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=w.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(h);return yield this._parseWorkerTile(u,w,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,w)})}abortTile(w){return l._(this,void 0,void 0,function*(){this.tileState.abort(w.uid)})}removeTile(w){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(w.uid)})}}class i{constructor(){this.loaded={}}loadTile(w){return l._(this,void 0,void 0,function*(){let{uid:h,encoding:u,rawImageData:A,redFactor:x,greenFactor:z,blueFactor:I,baseShift:O}=w,D=A.width+2,B=A.height+2,F=l.b(A)?new l.R({width:D,height:B},yield l.cY(A,-1,-1,D,B)):A,P=new l.cZ(h,F,u,x,z,I,O);return this.loaded||(this.loaded={}),this.loaded[h]=P,P})}removeTile(w){let h=this.loaded,u=w.uid;h?.[u]&&delete h[u]}}class T{constructor(w,h,u,A=S){this.actor=w,this.layerIndex=h,this.availableImages=u,this.tileState=new a,this._createGeoJSONIndex=A}loadVectorTile(w){if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let{z:h,x:u,y:A}=w.tileID.canonical,x=this._geoJSONIndex.getTile(h,u,A);return x?f(new l.c_(x.features,{version:2,extent:l.a6})):null}loadTile(w){return l._(this,void 0,void 0,function*(){let{uid:h}=w,u=new n(w);u.abort=new AbortController;try{let A=this.loadVectorTile(w);if(!A)return null;let{vectorTile:x,rawData:z}=A;u.vectorTile=x,this.tileState.markLoaded(h,u);let I={rawData:z};this.tileState.setParsing(h,I);try{return yield this._parseWorkerTile(u,w,I)}finally{this.tileState.clearParsing(h)}}catch(A){throw u.status="done",this.tileState.markLoaded(h,u),A}})}_reloadLoadedTile(w){return l._(this,void 0,void 0,function*(){let h=w.uid,u=this.tileState.getLoaded(h);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=w.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(h);return yield this._parseWorkerTile(u,w,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,w)})}_parseWorkerTile(w,h,u){return l._(this,void 0,void 0,function*(){let A=yield w.parse(w.vectorTile,this.layerIndex,this.availableImages,this.actor,h.subdivisionGranularity);if(u){let{rawData:x}=u;A=l.e({rawTileData:x.slice(0),encoding:"mvt"},A)}return A})}abortTile(w){return l._(this,void 0,void 0,function*(){this.tileState.abort(w.uid)})}removeTile(w){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(w.uid)})}loadData(w){return l._(this,void 0,void 0,function*(){var h;(h=this._pendingRequest)===null||h===void 0||h.abort();let u=this._startRequestTiming(w);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(w,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let A={};return w.request&&(A.data=w.data),this._finishRequestTiming(u,w,A),A}catch(A){if(delete this._pendingRequest,!l.$(A))throw A;return{abandoned:!0}}})}_startRequestTiming(w){var h;if(!((h=w.request)===null||h===void 0)&&h.collectResourceTiming)return new o(w.request.url)}_finishRequestTiming(w,h,u){let A=w?.finish();A&&(u.resourceTiming={[h.source]:JSON.parse(JSON.stringify(A))})}reloadTile(w){return this.tileState.getLoaded(w.uid)?this._reloadLoadedTile(w):this.loadTile(w)}loadAndProcessGeoJSON(w,h){return l._(this,void 0,void 0,function*(){var u;if(w.request&&(w.data=(yield l.k(w.request,h)).data),w.data)return w.data=this._filterGeoJSON(w.data,w.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(w.data,w));if(w.dataDiff)return(u=this._geoJSONIndex)!==null&&u!==void 0||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},w)),void this._geoJSONIndex.updateData(w.dataDiff,this._getFilterPredicate(w.filter));if(w.updateCluster&&this._geoJSONIndex.updateClusterOptions(w.geojsonVtOptions.cluster,M(w)),this._geoJSONIndex==null)throw new Error(`Input data given to '${w.source}' is not a valid GeoJSON object.`)})}_filterGeoJSON(w,h){if(w.type!=="FeatureCollection")return w;let u=this._getFilterPredicate(h);return u?{type:"FeatureCollection",features:w.features.filter(A=>u(A))}:w}_getFilterPredicate(w){if(typeof w!="boolean"&&!w?.length)return;let h=l.c$(w,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(h.result==="error")throw new Error(h.value.map(u=>`${u.key}: ${u.message}`).join(", "));return u=>h.value.evaluate({zoom:0},u)}removeSource(w){return l._(this,void 0,void 0,function*(){var h;(h=this._pendingRequest)===null||h===void 0||h.abort()})}getClusterExpansionZoom(w){return this._geoJSONIndex.getClusterExpansionZoom(w.clusterId)}getClusterChildren(w){return this._geoJSONIndex.getClusterChildren(w.clusterId)}getClusterLeaves(w){return this._geoJSONIndex.getClusterLeaves(w.clusterId,w.limit,w.offset)}}function S(_,w){let h=l.e(w.geojsonVtOptions||{},{updateable:!0,clusterOptions:M(w)});return new l.d0(_,h)}function M({geojsonVtOptions:_,clusterProperties:w}){if(!w||!_.clusterOptions)return _.clusterOptions;let h={},u={},A={accumulated:null,zoom:0},x={properties:null},z=Object.keys(w);for(let I of z){let[O,D]=w[I],B=l.c$(D),F=l.c$(typeof O=="string"?[O,["accumulated"],["get",I]]:O);h[I]=B.value,u[I]=F.value}return _.clusterOptions.map=I=>{x.properties=I;let O={};for(let D of z)O[D]=h[D].evaluate(A,x);return O},_.clusterOptions.reduce=(I,O)=>{x.properties=O;for(let D of z)A.accumulated=I[D],I[D]=u[D].evaluate(A,x)},_.clusterOptions}class C{constructor(w){this.self=w,this.actor=new l.N(w),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(h,u)=>{if(this.externalWorkerSourceTypes[h])throw new Error(`Worker source with name "${h}" already registered.`);this.externalWorkerSourceTypes[h]=u},this.self.addProtocol=l.cH,this.self.removeProtocol=l.cI,this.self.registerRTLTextPlugin=h=>{l.d1.setMethods(h)},this.self.makeRequest=l.m,this.actor.registerMessageHandler("LDT",(h,u)=>this._getDEMWorkerSource(h,u.source).loadTile(u)),this.actor.registerMessageHandler("RDT",(h,u)=>l._(this,void 0,void 0,function*(){this._getDEMWorkerSource(h,u.source).removeTile(u)})),this.actor.registerMessageHandler("GCEZ",(h,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(h,u.type,u.source).getClusterExpansionZoom(u)})),this.actor.registerMessageHandler("GCC",(h,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(h,u.type,u.source).getClusterChildren(u)})),this.actor.registerMessageHandler("GCL",(h,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(h,u.type,u.source).getClusterLeaves(u)})),this.actor.registerMessageHandler("LD",(h,u)=>this._getWorkerSource(h,u.type,u.source).loadData(u)),this.actor.registerMessageHandler("LT",(h,u)=>this._getWorkerSource(h,u.type,u.source).loadTile(u)),this.actor.registerMessageHandler("RT",(h,u)=>this._getWorkerSource(h,u.type,u.source).reloadTile(u)),this.actor.registerMessageHandler("AT",(h,u)=>this._getWorkerSource(h,u.type,u.source).abortTile(u)),this.actor.registerMessageHandler("RMT",(h,u)=>this._getWorkerSource(h,u.type,u.source).removeTile(u)),this.actor.registerMessageHandler("RS",(h,u)=>l._(this,void 0,void 0,function*(){var A,x;if(!(!((x=(A=this.workerSources[h])===null||A===void 0?void 0:A[u.type])===null||x===void 0)&&x[u.source]))return;let z=this.workerSources[h][u.type][u.source];delete this.workerSources[h][u.type][u.source],z.removeSource!==void 0&&z.removeSource(u)})),this.actor.registerMessageHandler("RM",h=>l._(this,void 0,void 0,function*(){delete this.layerIndexes[h],delete this.availableImages[h],delete this.workerSources[h],delete this.demWorkerSources[h],this.globalStates.delete(h)})),this.actor.registerMessageHandler("SR",(h,u)=>l._(this,void 0,void 0,function*(){this.referrer=u})),this.actor.registerMessageHandler("SRPS",(h,u)=>this._syncRTLPluginState(h,u)),this.actor.registerMessageHandler("IS",(h,u)=>l._(this,void 0,void 0,function*(){this.self.importScripts(u)})),this.actor.registerMessageHandler("SI",(h,u)=>this._setImages(h,u)),this.actor.registerMessageHandler("UL",(h,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(h).update(u.layers,u.removedIds,this._getGlobalState(h))})),this.actor.registerMessageHandler("UGS",(h,u)=>l._(this,void 0,void 0,function*(){let A=this._getGlobalState(h);for(let x in u)A[x]=u[x]})),this.actor.registerMessageHandler("SL",(h,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(h).replace(u,this._getGlobalState(h))}))}_getGlobalState(w){let h=this.globalStates.get(w);return h||(h={},this.globalStates.set(w,h)),h}_setImages(w,h){return l._(this,void 0,void 0,function*(){this.availableImages[w]=h;for(let u in this.workerSources[w]){let A=this.workerSources[w][u];for(let x in A)A[x].availableImages=h}})}_syncRTLPluginState(w,h){return l._(this,void 0,void 0,function*(){return yield l.d1.syncState(h,this.self.importScripts)})}_getAvailableImages(w){let h=this.availableImages[w];return h||(h=[]),h}_getLayerIndex(w){let h=this.layerIndexes[w];return h||(h=this.layerIndexes[w]=new e),h}_getWorkerSource(w,h,u){var A,x;if((A=this.workerSources)[w]||(A[w]={}),(x=this.workerSources[w])[h]||(x[h]={}),!this.workerSources[w][h][u]){let z={sendAsync:(I,O)=>(I.targetMapId=w,this.actor.sendAsync(I,O))};switch(h){case"vector":this.workerSources[w][h][u]=new m(z,this._getLayerIndex(w),this._getAvailableImages(w));break;case"geojson":this.workerSources[w][h][u]=new T(z,this._getLayerIndex(w),this._getAvailableImages(w));break;default:this.workerSources[w][h][u]=new this.externalWorkerSourceTypes[h](z,this._getLayerIndex(w),this._getAvailableImages(w))}}return this.workerSources[w][h][u]}_getDEMWorkerSource(w,h){var u,A;return(u=this.demWorkerSources)[w]||(u[w]={}),(A=this.demWorkerSources[w])[h]||(A[h]=new i),this.demWorkerSources[w][h]}}return l.i(self)&&(self.worker=new C(self)),C}),E("index",["exports","./shared"],function(l,e){"use strict";var t="5.24.0";function n(){var pe=new e.A(4);return e.A!=Float32Array&&(pe[1]=0,pe[2]=0),pe[0]=1,pe[3]=1,pe}let r,a,o,s={frame(pe,y,N,ie){let fe=ie||window,be=fe.requestAnimationFrame(je=>{Re(),y(je)}),{unsubscribe:Re}=e.s(pe.signal,"abort",()=>{Re(),fe.cancelAnimationFrame(be),N(new e.a(pe.signal.reason))},!1)},frameAsync(pe,y){return new Promise((N,ie)=>{this.frame(pe,N,ie,y)})},getImageData(pe,y=0){return this.getImageCanvasContext(pe).getImageData(-y,-y,pe.width+2*y,pe.height+2*y)},getImageCanvasContext(pe){let y=window.document.createElement("canvas"),N=y.getContext("2d",{willReadFrequently:!0});if(!N)throw new Error("failed to create canvas 2d context");return y.width=pe.width,y.height=pe.height,N.drawImage(pe,0,0,pe.width,pe.height),N},resolveURL:pe=>(r||(r=document.createElement("a")),r.href=pe,r.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return o!==void 0?o:!!matchMedia&&(a!=null||(a=matchMedia("(prefers-reduced-motion: reduce)")),a.matches)},set prefersReducedMotion(pe){o=pe}},c=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt!==null?this._frozenAt:performance.now()}setNow(pe){this._frozenAt=pe}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};function g(){return c.getCurrentTime()}var f,v;class m{static create(y,N,ie){let fe=window.document.createElement(y);return N!==void 0&&(fe.className=N),ie&&ie.appendChild(fe),fe}static createNS(y,N){return window.document.createElementNS(y,N)}static disableDrag(){m.docStyle&&m.selectProp&&(m.userSelect=m.docStyle[m.selectProp],m.docStyle[m.selectProp]="none")}static enableDrag(){m.docStyle&&m.selectProp&&(m.docStyle[m.selectProp]=m.userSelect)}static suppressClickInternal(y){y.preventDefault(),y.stopPropagation(),window.removeEventListener("click",m.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",m.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",m.suppressClickInternal,!0)},0)}static getScale(y){let N=y.getBoundingClientRect();return{x:N.width/y.offsetWidth||1,y:N.height/y.offsetHeight||1,boundingClientRect:N}}static getPoint(y,N,ie){let fe=N.boundingClientRect;return new e.P((ie.clientX-fe.left)/N.x-y.clientLeft,(ie.clientY-fe.top)/N.y-y.clientTop)}static mousePos(y,N){let ie=m.getScale(y);return m.getPoint(y,ie,N)}static touchPos(y,N){let ie=[],fe=m.getScale(y);for(let be of N)ie.push(m.getPoint(y,fe,be));return ie}static sanitize(y){let N=new DOMParser().parseFromString(y,"text/html").body||document.createElement("body"),ie=N.querySelectorAll("script");for(let fe of ie)fe.remove();return m.clean(N),N.innerHTML}static isPossiblyDangerous(y,N){let ie=N.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(y)||!ie.includes("javascript:")&&!ie.includes("data:"))||!!y.startsWith("on")||void 0}static clean(y){let N=y.children;for(let ie of N)m.removeAttributes(ie),m.clean(ie)}static removeAttributes(y){for(let{name:N,value:ie}of y.attributes)m.isPossiblyDangerous(N,ie)&&y.removeAttribute(N)}}m.docStyle=typeof window<"u"&&((f=window.document)===null||f===void 0?void 0:f.documentElement.style),m.selectProp=!m.docStyle||"userSelect"in m.docStyle?"userSelect":"webkitUserSelect",function(pe){let y,N,ie,fe;pe.resetRequestQueue=()=>{y=[],N=0,ie=0,fe={}},pe.addThrottleControl=Ze=>{let ut=ie++;return fe[ut]=Ze,ut},pe.removeThrottleControl=Ze=>{delete fe[Ze],Re()},pe.getImage=(Ze,ut,ft=!0)=>new Promise((Dt,Gt)=>{Ze.headers||(Ze.headers={}),Ze.headers.accept="image/webp,*/*",e.e(Ze,{type:"image"}),y.push({abortController:ut,requestParameters:Ze,supportImageRefresh:ft,state:"queued",onError:Kt=>{Gt(Kt)},onSuccess:Kt=>{Dt(Kt)}}),Re()});let be=Ze=>e._(this,void 0,void 0,function*(){Ze.state="running";let{requestParameters:ut,supportImageRefresh:ft,onError:Dt,onSuccess:Gt,abortController:Kt}=Ze,st=ft===!1&&!e.i(self)&&!e.g(ut.url)&&(!ut.headers||Object.keys(ut.headers).reduce((ir,dr)=>ir&&dr==="accept",!0));N++;let It=st?je(ut,Kt):e.m(ut,Kt);try{let ir=yield It;delete Ze.abortController,Ze.state="completed",ir.data instanceof HTMLImageElement||e.b(ir.data)?Gt(ir):ir.data&&Gt({data:yield(Ut=ir.data,typeof createImageBitmap=="function"?e.h(Ut):e.j(Ut)),cacheControl:ir.cacheControl,expires:ir.expires})}catch(ir){delete Ze.abortController,Dt(e.d(ir))}finally{N--,Re()}var Ut}),Re=()=>{let Ze=(()=>{for(let ut of Object.keys(fe))if(fe[ut]())return!0;return!1})()?e.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let ut=N;ut0;ut++){let ft=y.shift();ft.abortController.signal.aborted?ut--:be(ft)}},je=(Ze,ut)=>new Promise((ft,Dt)=>{let Gt=new Image,Kt=Ze.url,st=Ze.credentials;st&&st==="include"?Gt.crossOrigin="use-credentials":(st&&st==="same-origin"||!e.f(Kt))&&(Gt.crossOrigin="anonymous"),ut.signal.addEventListener("abort",()=>{Gt.src="",Dt(new e.a(ut.signal.reason))}),Gt.fetchPriority="high",Gt.onload=()=>{Gt.onerror=Gt.onload=null,ft({data:Gt})},Gt.onerror=()=>{Gt.onerror=Gt.onload=null,ut.signal.aborted||Dt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},Gt.src=Kt})}(v||(v={})),v.resetRequestQueue();class i{constructor(y){this._transformRequestFn=y??null}transformRequest(y,N){return this._transformRequestFn&&this._transformRequestFn(y,N)||{url:y}}setTransformRequest(y){this._transformRequestFn=y}}function T(pe){let y=[];if(typeof pe=="string")y.push({id:"default",url:pe});else if(pe&&pe.length>0){let N=[];for(let{id:ie,url:fe}of pe){let be=`${ie}${fe}`;N.includes(be)||(N.push(be),y.push({id:ie,url:fe}))}}return y}function S(pe,y,N){try{let ie=new URL(pe);return ie.pathname+=`${y}${N}`,ie.toString()}catch{throw new Error(`Invalid sprite URL "${pe}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function M(pe){let{userImage:y}=pe;return!(!y?.render||!y.render()||(pe.data.replace(new Uint8Array(y.data.buffer)),0))}class C extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(let y of Object.keys(this.images))this.removeImage(y);this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(y){if(this.loaded!==y&&(this.loaded=y,y)){for(let{ids:N,promiseResolve:ie}of this.requestors)ie(this._getImagesForIds(N));this.requestors=[]}}getImage(y){let N=this.images[y];if(N&&!N.data&&N.spriteData){let ie=N.spriteData;N.data=new e.R({width:ie.width,height:ie.height},ie.context.getImageData(ie.x,ie.y,ie.width,ie.height).data),N.spriteData=null}return N}addImage(y,N){if(this.images[y])throw new Error(`Image id ${y} already exist, use updateImage instead`);this._validate(y,N)&&(this.images[y]=N)}_validate(y,N){let ie=!0,fe=N.data||N.spriteData;return this._validateStretch(N.stretchX,fe?.width)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchX" value`))),ie=!1),this._validateStretch(N.stretchY,fe?.height)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchY" value`))),ie=!1),this._validateContent(N.content,N)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "content" value`))),ie=!1),ie}_validateStretch(y,N){if(!y)return!0;let ie=0;for(let fe of y){if(fe[0]=y[1]))}updateImage(y,N,ie=!0){let fe=this.getImage(y);if(ie&&(fe.data.width!==N.data.width||fe.data.height!==N.data.height))throw new Error(`size mismatch between old image (${fe.data.width}x${fe.data.height}) and new image (${N.data.width}x${N.data.height}).`);N.version=fe.version+1,this.images[y]=N,this.updatedImages[y]=!0}removeImage(y){var N;let ie=this.images[y];delete this.images[y],delete this.patterns[y],!((N=ie.userImage)===null||N===void 0)&&N.onRemove&&ie.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(y){return new Promise((N,ie)=>{let fe=!0;if(!this.isLoaded())for(let be of y)this.images[be]||(fe=!1);this.isLoaded()||fe?N(this._getImagesForIds(y)):this.requestors.push({ids:y,promiseResolve:N})})}_getImagesForIds(y){var N;let ie={};for(let fe of y){let be=this.getImage(fe);be||(this.fire(new e.n("styleimagemissing",{id:fe})),be=this.getImage(fe)),be?ie[fe]={data:be.data.clone(),pixelRatio:be.pixelRatio,sdf:be.sdf,version:be.version,stretchX:be.stretchX,stretchY:be.stretchY,content:be.content,textFitWidth:be.textFitWidth,textFitHeight:be.textFitHeight,hasRenderCallback:!!(!((N=be.userImage)===null||N===void 0)&&N.render)}:e.w(`Image "${fe}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return ie}getPixelSize(){let{width:y,height:N}=this.atlasImage;return{width:y,height:N}}getPattern(y){let N=this.patterns[y],ie=this.getImage(y);if(!ie)return null;if(N&&N.position.version===ie.version)return N.position;if(N)N.position.version=ie.version;else{let fe={w:ie.data.width+2,h:ie.data.height+2,x:0,y:0},be=new e.I(fe,ie);this.patterns[y]={bin:fe,position:be}}return this._updatePatternAtlas(),this.patterns[y].position}bind(y){let N=y.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.T(y,this.atlasImage,N.RGBA),this.atlasTexture.bind(N.LINEAR,N.CLAMP_TO_EDGE)}_updatePatternAtlas(){let y=[];for(let be in this.patterns)y.push(this.patterns[be].bin);let{w:N,h:ie}=e.p(y),fe=this.atlasImage;fe.resize({width:N||1,height:ie||1});for(let be in this.patterns){let{bin:Re}=this.patterns[be],je=Re.x+1,Ze=Re.y+1,ut=this.getImage(be).data,ft=ut.width,Dt=ut.height;e.R.copy(ut,fe,{x:0,y:0},{x:je,y:Ze},{width:ft,height:Dt}),e.R.copy(ut,fe,{x:0,y:Dt-1},{x:je,y:Ze-1},{width:ft,height:1}),e.R.copy(ut,fe,{x:0,y:0},{x:je,y:Ze+Dt},{width:ft,height:1}),e.R.copy(ut,fe,{x:ft-1,y:0},{x:je-1,y:Ze},{width:1,height:Dt}),e.R.copy(ut,fe,{x:0,y:0},{x:je+ft,y:Ze},{width:1,height:Dt})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(y){for(let N of y){if(this.callbackDispatchedThisFrame[N])continue;this.callbackDispatchedThisFrame[N]=!0;let ie=this.getImage(N);ie||e.w(`Image with ID: "${N}" was not found`),M(ie)&&this.updateImage(N,ie)}}cloneImages(){let y={};for(let N in this.images){let ie=this.images[N];y[N]=Object.assign(Object.assign({},ie),{data:ie.data?ie.data.clone():null})}return y}}let _=1e20,w=new Float64Array(256);for(let pe=0;pe<256;pe++){let y=.5-Math.pow(pe/255,.45454545454545453);w[pe]=y*Math.abs(y)}function h(pe,y,N,ie,fe,be,Re,je,Ze){for(let ut=y;ut-1);Ze++,be[Ze]=je,Re[Ze]=ut,Re[Ze+1]=_}for(let je=0,Ze=0;je/[-\w]+/.test(fe)?fe:`'${CSS.escape(fe)}'`).join(",");return new x.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ie,fontWeight:this._fontWeight(N[0]),fontStyle:this._fontStyle(N[0]),lang:this.lang})}_fontStyle(y){return/italic/i.test(y)?"italic":/oblique/i.test(y)?"oblique":"normal"}_fontWeight(y){let N={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},ie;for(let[fe,be]of Object.entries(N))new RegExp(`\\b${fe}\\b`,"i").test(y)&&(ie=`${be}`);return ie}destroy(){for(let y in this.entries){let N=this.entries[y];N.tinySDF=null,N.ideographTinySDF=null,N.glyphs={},N.requests={},N.ranges={}}this.entries={}}}x.loadGlyphRange=function(pe,y,N,ie){return e._(this,void 0,void 0,function*(){let fe=256*y,be=fe+255,Re=yield ie.transformRequest(N.replace("{fontstack}",pe).replace("{range}",`${fe}-${be}`),"Glyphs"),je=yield e.o(Re,new AbortController);if(!je?.data)throw new Error(`Could not load glyph range. range: ${y}, ${fe}-${be}`);let Ze={};for(let ut of e.q(je.data))Ze[ut.id]=ut;return Ze})},x.TinySDF=class{constructor({fontSize:pe=24,buffer:y=3,radius:N=8,cutoff:ie=.25,fontFamily:fe="sans-serif",fontWeight:be="normal",fontStyle:Re="normal",lang:je=null}={}){this.buffer=y,this.radius=N,this.cutoff=ie,this.lang=je;let Ze=this.size=pe+4*y,ut=this._createCanvas(Ze),ft=this.ctx=ut.getContext("2d",{willReadFrequently:!0});ft.font=`${Re} ${be} ${pe}px ${fe}`,ft.textBaseline="alphabetic",ft.textAlign="left",ft.fillStyle="black",this.gridOuter=new Float64Array(Ze*Ze),this.gridInner=new Float64Array(Ze*Ze),this.f=new Float64Array(Ze),this.z=new Float64Array(Ze+1),this.v=new Uint16Array(Ze)}_createCanvas(pe){if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(pe,pe);let y=document.createElement("canvas");return y.width=y.height=pe,y}draw(pe){let{width:y,actualBoundingBoxAscent:N,actualBoundingBoxDescent:ie,actualBoundingBoxLeft:fe,actualBoundingBoxRight:be}=this.ctx.measureText(pe),Re=Math.ceil(N),je=Math.floor(fe),Ze=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(be)-je)),ut=Math.max(0,Math.min(this.size-this.buffer,Re+Math.ceil(ie))),ft=Ze+2*this.buffer,Dt=ut+2*this.buffer,Gt=Math.max(ft*Dt,0),Kt=new Uint8ClampedArray(Gt),st={data:Kt,width:ft,height:Dt,glyphWidth:Ze,glyphHeight:ut,glyphTop:Re,glyphLeft:je,glyphAdvance:y};if(Ze===0||ut===0)return st;let{ctx:It,buffer:Ut,gridInner:ir,gridOuter:dr}=this;this.lang&&(It.lang=this.lang),It.clearRect(Ut,Ut,Ze,ut),It.fillText(pe,Ut-je,Ut+Re);let Ar=It.getImageData(Ut,Ut,Ze,ut);dr.fill(_,0,Gt),ir.fill(0,0,Gt);let hr=3;for(let Cr=0;Cr1&&(Ze=y[++je]);let ft=Math.abs(ut-Ze.left),Dt=Math.abs(ut-Ze.right),Gt=Math.min(ft,Dt),Kt,st=be/ie*(fe+1);if(Ze.isDash){let It=fe-Math.abs(st);Kt=Math.sqrt(Gt*Gt+It*It)}else Kt=fe-Math.sqrt(Gt*Gt+st*st);this.data[Re+ut]=Math.max(0,Math.min(255,Kt+128))}}}addRegularDash(y){for(let je=y.length-1;je>=0;--je){let Ze=y[je],ut=y[je+1];Ze.zeroLength?y.splice(je,1):ut&&ut.isDash===Ze.isDash&&(ut.left=Ze.left,y.splice(je,1))}let N=y[0],ie=y[y.length-1];N.isDash===ie.isDash&&(N.left=ie.left-this.width,ie.right=N.right+this.width);let fe=this.width*this.nextRow,be=0,Re=y[be];for(let je=0;je1&&(Re=y[++be]);let Ze=Math.abs(je-Re.left),ut=Math.abs(je-Re.right),ft=Math.min(Ze,ut);this.data[fe+je]=Math.max(0,Math.min(255,(Re.isDash?ft:-ft)+128))}}addDash(y,N){let ie=N?7:0,fe=2*ie+1;if(this.nextRow+fe>this.height)return e.w("LineAtlas out of space"),null;let be=0;for(let je of y)be+=je;if(be!==0){let je=this.width/be,Ze=this.getDashRanges(y,this.width,je);N?this.addRoundDash(Ze,je,ie):this.addRegularDash(Ze)}let Re={y:this.nextRow+ie,height:2*ie,width:be};return this.nextRow+=fe,this.dirty=!0,Re}bind(y){let N=y.gl;this.texture?(N.bindTexture(N.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,N.texSubImage2D(N.TEXTURE_2D,0,0,0,this.width,this.height,N.ALPHA,N.UNSIGNED_BYTE,this.data))):(this.texture=N.createTexture(),N.bindTexture(N.TEXTURE_2D,this.texture),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_S,N.REPEAT),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_T,N.REPEAT),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MIN_FILTER,N.LINEAR),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MAG_FILTER,N.LINEAR),N.texImage2D(N.TEXTURE_2D,0,N.ALPHA,this.width,this.height,0,N.ALPHA,N.UNSIGNED_BYTE,this.data))}}let P="maplibre_preloaded_worker_pool";class j{constructor(){this.active={}}acquire(y){if(!this.workers)for(this.workers=[];this.workers.lengthe.m(y,N))),Q}function V(pe,y){let N=e.O();return e.Q(N,N,[1,1,0]),e.S(N,N,[.5*pe.width,.5*pe.height,1]),pe.calculatePosMatrix?e.U(N,N,pe.calculatePosMatrix(y.toUnwrapped())):N}function Z(pe,y,N,ie,fe,be,Re){var je;let Ze=function(Gt,Kt,st){if(Gt)for(let It of Gt){let Ut=Kt[It];if(Ut?.source===st&&Ut.type==="fill-extrusion")return!0}else for(let It in Kt){let Ut=Kt[It];if(Ut.source===st&&Ut.type==="fill-extrusion")return!0}return!1}((je=fe?.layers)!==null&&je!==void 0?je:null,y,pe.id),ut=be.maxPitchScaleFactor(),ft=pe.tilesIn(ie,ut,Ze);ft.sort(K);let Dt=[];for(let Gt of ft)Dt.push({wrappedTileID:Gt.tileID.wrapped().key,queryResults:Gt.tile.queryRenderedFeatures(y,N,pe.getState(),Gt.queryGeometry,Gt.cameraQueryGeometry,Gt.scale,fe,be,ut,V(be,Gt.tileID),Re?(Kt,st)=>Re(Gt.tileID,Kt,st):void 0)});return function(Gt,Kt){for(let st in Gt)for(let It of Gt[st])H(It,Kt);return Gt}(function(Gt){let Kt={},st={};for(let{queryResults:It,wrappedTileID:Ut}of Gt){st[Ut]||(st[Ut]={});let ir=st[Ut];for(let dr in It){let Ar=It[dr];ir[dr]||(ir[dr]={});let hr=ir[dr];Kt[dr]||(Kt[dr]=[]);for(let vr of Ar)hr[vr.featureIndex]||(hr[vr.featureIndex]=!0,Kt[dr].push(vr))}}return Kt}(Dt),pe)}function K(pe,y){let N=pe.tileID,ie=y.tileID;return N.overscaledZ-ie.overscaledZ||N.canonical.y-ie.canonical.y||N.wrap-ie.wrap||N.canonical.x-ie.canonical.x}function H(pe,y){let N=pe.feature,ie=y.getFeatureState(N.layer["source-layer"],N.id);N.source=N.layer.source,N.layer["source-layer"]&&(N.sourceLayer=N.layer["source-layer"]),N.state=ie}function X(pe,y,N,ie){return e._(this,void 0,void 0,function*(){let fe=pe;if(pe.url?fe=(yield e.k(yield y.transformRequest(pe.url,"Source"),N)).data:yield s.frameAsync(N,ie),!fe)return null;let be=e.V(e.e(fe,pe),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in fe&&fe.vector_layers&&(be.vectorLayerIds=fe.vector_layers.map(Re=>Re.id)),be})}class q{constructor(y,N){y&&(N?this.setSouthWest(y).setNorthEast(N):Array.isArray(y)&&(y.length===4?this.setSouthWest([y[0],y[1]]).setNorthEast([y[2],y[3]]):this.setSouthWest(y[0]).setNorthEast(y[1])))}setNorthEast(y){return this._ne=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}setSouthWest(y){return this._sw=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}extend(y){let N=this._sw,ie=this._ne,fe,be;if(y instanceof e.W)fe=y,be=y;else{if(!(y instanceof q))return Array.isArray(y)?y.length===4||y.every(Array.isArray)?this.extend(q.convert(y)):this.extend(e.W.convert(y)):y&&("lng"in y||"lon"in y)&&"lat"in y?this.extend(e.W.convert(y)):this;if(fe=y._sw,be=y._ne,!fe||!be)return this}return N||ie?(N.lng=Math.min(fe.lng,N.lng),N.lat=Math.min(fe.lat,N.lat),ie.lng=Math.max(be.lng,ie.lng),ie.lat=Math.max(be.lat,ie.lat)):(this._sw=new e.W(fe.lng,fe.lat),this._ne=new e.W(be.lng,be.lat)),this}getCenter(){return new e.W((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new e.W(this.getWest(),this.getNorth())}getSouthEast(){return new e.W(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(y){let{lng:N,lat:ie}=e.W.convert(y),fe=this._sw.lng<=N&&N<=this._ne.lng;return this._sw.lng>this._ne.lng&&(fe=this._sw.lng>=N&&N>=this._ne.lng),this._sw.lat<=ie&&ie<=this._ne.lat&&fe}intersects(y){if(!((y=q.convert(y)).getNorth()>=this.getSouth()&&y.getSouth()<=this.getNorth()))return!1;let N=Math.abs(this.getEast()-this.getWest()),ie=Math.abs(y.getEast()-y.getWest());if(N>=360||ie>=360)return!0;let fe=e.X(this.getWest(),-180,180),be=e.X(this.getEast(),-180,180),Re=e.X(y.getWest(),-180,180),je=e.X(y.getEast(),-180,180),Ze=fe>be,ut=Re>je;return!(!Ze||!ut)||(Ze?je>=fe||Re<=be:ut?be>=Re||fe<=je:Re<=be&&je>=fe)}static convert(y){return y instanceof q?y:y&&new q(y)}static fromLngLat(y,N=0){let ie=360*N/40075017,fe=ie/Math.cos(Math.PI/180*y.lat);return new q(new e.W(y.lng-fe,y.lat-ie),new e.W(y.lng+fe,y.lat+ie))}adjustAntiMeridian(){let y=new e.W(this._sw.lng,this._sw.lat),N=new e.W(this._ne.lng,this._ne.lat);return new q(y,y.lng>N.lng?new e.W(N.lng+360,N.lat):N)}}class W{constructor(y,N,ie){this.bounds=q.convert(this.validateBounds(y)),this.minzoom=N||0,this.maxzoom=ie||24}validateBounds(y){return Array.isArray(y)&&y.length===4?[Math.max(-180,y[0]),Math.max(-90,y[1]),Math.min(180,y[2]),Math.min(90,y[3])]:[-180,-90,180,90]}contains(y){let N=Math.pow(2,y.z),ie=Math.floor(e.Z(this.bounds.getWest())*N),fe=Math.floor(e.Y(this.bounds.getNorth())*N),be=Math.ceil(e.Z(this.bounds.getEast())*N),Re=Math.ceil(e.Y(this.bounds.getSouth())*N);return y.x>=ie&&y.x=fe&&y.y{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie={request:yield this.map._requestManager.transformRequest(N,"Tile"),uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,tileSize:this.tileSize*y.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(y),etag:y.etag};ie.request.collectResourceTiming=this._collectResourceTiming;let fe="RT";if(y.actor&&y.state!=="expired"){if(y.state==="loading")return new Promise((be,Re)=>{y.reloadPromise={resolve:be,reject:Re}})}else y.actor=this.dispatcher.getActor(),fe="LT";y.abortController=new AbortController;try{let be=yield y.actor.sendAsync({type:fe,data:ie},y.abortController);if(delete y.abortController,y.aborted)return;this._afterTileLoadWorkerResponse(y,be);let Re={};return be?.etagUnmodified&&(Re.unmodified=!0),Re}catch(be){if(delete y.abortController,y.aborted)return;if(be&&be.status!==404)throw be;this._afterTileLoadWorkerResponse(y,null)}})}_getOverzoomParameters(y){return e._(this,void 0,void 0,function*(){if(y.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let N=y.tileID.scaledTo(this.maxzoom).canonical,ie=N.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:N,overzoomRequest:yield this.map._requestManager.transformRequest(ie,"Tile")}})}_afterTileLoadWorkerResponse(y,N){if(N?.resourceTiming&&(y.resourceTiming=N.resourceTiming),N&&this.map._refreshExpiredTiles&&y.setExpiryData(N),y.etag=N?.etag,y.loadVectorData(N,this.map.painter),y.reloadPromise){let ie=y.reloadPromise;y.reloadPromise=null,this.loadTile(y).then(ie.resolve).catch(ie.reject)}}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.actor&&(yield y.actor.sendAsync({type:"AT",data:{uid:y.uid,type:this.type,source:this.id}}))})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),y.actor&&(yield y.actor.sendAsync({type:"RMT",data:{uid:y.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class ae extends e.E{constructor(y,N,ie,fe){super(),this.id=y,this.dispatcher=ie,this.setEventedParent(fe),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},N),e.e(this,e.V(N,["url","scheme","tileSize"]))}load(){return e._(this,arguments,void 0,function*(y=!1){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let N=yield X(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,N&&(e.e(this,N),N.bounds&&(this.tileBounds=new W(N.bounds,this.minzoom,this.maxzoom)),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:y})))}catch(N){this._tileJSONRequest=null,this._loaded=!0,e.$(N)||this.fire(new e.l(e.d(N)))}})}loaded(){return this._loaded}onAdd(y){this.map=y,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(y){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),y(),this.load(!0)}setTiles(y){return this.setSourceProperty(()=>{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}serialize(){return e.e({},this._options)}hasTile(y){return!this.tileBounds||this.tileBounds.contains(y.canonical)}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);y.abortController=new AbortController;try{let ie=yield v.getImage(yield this.map._requestManager.transformRequest(N,"Tile"),y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(ie?.data){this.map._refreshExpiredTiles&&(ie.cacheControl||ie.expires)&&y.setExpiryData({cacheControl:ie.cacheControl,expires:ie.expires});let fe=this.map.painter.context,be=fe.gl,Re=ie.data;y.texture=this.map.painter.getTileTexture(Re.width),y.texture?y.texture.update(Re,{useMipmap:!0}):(y.texture=new e.T(fe,Re,be.RGBA,{useMipmap:!0}),y.texture.bind(be.LINEAR,be.CLAMP_TO_EDGE,be.LINEAR_MIPMAP_NEAREST)),y.state="loaded"}}catch(ie){if(delete y.abortController,y.aborted)y.state="unloaded";else if(ie)throw y.state="errored",ie}})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController)})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.texture&&this.map.painter.saveTileTexture(y.texture)})}hasTransition(){return!1}}class he extends ae{constructor(y,N,ie,fe){super(y,N,ie,fe),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},N),this.encoding=N.encoding||"mapbox",this.redFactor=N.redFactor,this.greenFactor=N.greenFactor,this.blueFactor=N.blueFactor,this.baseShift=N.baseShift}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie=yield this.map._requestManager.transformRequest(N,"Tile");y.neighboringTiles=this._getNeighboringTiles(y.tileID),y.abortController=new AbortController;try{let fe=yield v.getImage(ie,y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(fe?.data){let be=fe.data;this.map._refreshExpiredTiles&&(fe.cacheControl||fe.expires)&&y.setExpiryData({cacheControl:fe.cacheControl,expires:fe.expires});let Re=e.b(be)&&e.a0()?be:yield this.readImageNow(be),je={type:this.type,uid:y.uid,source:this.id,rawImageData:Re,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(y.actor&&y.state!=="expired"&&y.state!=="reloading")return;y.actor&&y.state!=="expired"||(y.actor=this.dispatcher.getActor()),y.dem=yield y.actor.sendAsync({type:"LDT",data:je}),y.needsHillshadePrepare=!0,y.needsTerrainPrepare=!0,y.state="loaded"}}catch(fe){if(delete y.abortController,y.aborted)y.state="unloaded";else if(fe)throw y.state="errored",fe}})}readImageNow(y){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.a1()){let N=y.width+2,ie=y.height+2;try{return new e.R({width:N,height:ie},yield e.a2(y,-1,-1,N,ie))}catch{}}return s.getImageData(y,1)})}_getNeighboringTiles(y){let N=y.canonical,ie=Math.pow(2,N.z),fe=(N.x-1+ie)%ie,be=N.x===0?y.wrap-1:y.wrap,Re=(N.x+1+ie)%ie,je=N.x+1===ie?y.wrap+1:y.wrap,Ze={};return Ze[new e.a3(y.overscaledZ,be,N.z,fe,N.y).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,je,N.z,Re,N.y).key]={backfilled:!1},N.y>0&&(Ze[new e.a3(y.overscaledZ,be,N.z,fe,N.y-1).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,y.wrap,N.z,N.x,N.y-1).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,je,N.z,Re,N.y-1).key]={backfilled:!1}),N.y+1be.key===ie);fe>-1&&pe.addOrUpdateProperties.splice(fe,1)}return(pe.removeAllProperties||y.removeAllProperties)&&(N.removeAllProperties=!0),(pe.removeProperties||y.removeProperties)&&(N.removeProperties=[...pe.removeProperties||[],...y.removeProperties||[]]),(pe.addOrUpdateProperties||y.addOrUpdateProperties)&&(N.addOrUpdateProperties=[...pe.addOrUpdateProperties||[],...y.addOrUpdateProperties||[]]),(pe.newGeometry||y.newGeometry)&&(N.newGeometry=y.newGeometry||pe.newGeometry),N}function Me(pe){var y,N;if(!pe)return{};let ie={};return ie.removeAll=pe.removeAll,ie.remove=new Set(pe.remove||[]),ie.add=new Map((y=pe.add)===null||y===void 0?void 0:y.map(fe=>[fe.id,fe])),ie.update=new Map((N=pe.update)===null||N===void 0?void 0:N.map(fe=>[fe.id,fe])),ie}function Se(pe){return pe&&pe.length!==0?typeof pe[0]=="number"?[pe]:pe.flatMap(y=>Se(y)):[]}function Ie(pe){return pe.type==="GeometryCollection"?pe.geometries.flatMap(y=>Ie(y)):Se(pe.coordinates)}function Ge(pe){let y=new q,N;switch(pe.type){case"FeatureCollection":N=pe.features.flatMap(ie=>Ie(ie.geometry));break;case"Feature":N=Ie(pe.geometry);break;default:N=Ie(pe)}if(N.length===0)return y;for(let ie of N){let[fe,be]=ie;y.extend([fe,be])}return y}class qe extends e.E{constructor(y,N,ie,fe){super(),this.id=y,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:N.data},this.actor=ie.getActor(),this.setEventedParent(fe),this._data=typeof N.data=="string"?{url:N.data}:{geojson:N.data},this._options=e.e({},N),this._collectResourceTiming=N.collectResourceTiming,N.maxzoom!==void 0&&(this.maxzoom=N.maxzoom),N.type&&(this.type=N.type),N.attribution&&(this.attribution=N.attribution),this.promoteId=N.promoteId,N.clusterMaxZoom!==void 0&&this.maxzoom<=N.clusterMaxZoom&&e.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${N.clusterMaxZoom}".`),this.workerOptions=e.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(N.buffer!==void 0?N.buffer:128),tolerance:this._pixelsToTileUnits(N.tolerance!==void 0?N.tolerance:.375),extent:e.a6,maxZoom:this.maxzoom,lineMetrics:N.lineMetrics||!1,generateId:N.generateId||!1,promoteId:typeof N.promoteId=="string"?N.promoteId:void 0,cluster:N.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(N.clusterMaxZoom),minPoints:Math.max(2,N.clusterMinPoints||2),extent:e.a6,radius:this._pixelsToTileUnits(N.clusterRadius||50),log:!1,generateId:N.generateId||!1}},clusterProperties:N.clusterProperties,filter:N.filter},N.workerOptions)}_hasPendingWorkerUpdate(){return this._pendingWorkerUpdate.data!==void 0||this._pendingWorkerUpdate.diff!==void 0||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(y){return y*(e.a6/this.tileSize)}_getClusterMaxZoom(y){let N=y?Math.round(y):this.maxzoom-1;return Number.isInteger(y)||y===void 0||e.w(`Integer expected for option 'clusterMaxZoom': provided value "${y}" rounded to "${N}"`),N}load(){return e._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(y){this.map=y,this.load()}setData(y,N){this._data=typeof y=="string"?{url:y}:{geojson:y},this._pendingWorkerUpdate={data:y};let ie=this._updateWorkerData();return N?ie:this}updateData(y,N){this._pendingWorkerUpdate.diff=function(fe,be){if(!fe)return be||{};if(!be)return fe||{};let Re=Me(fe),je=Me(be);(function(ut,ft){ft.removeAll&&(ut.add.clear(),ut.update.clear(),ut.remove.clear(),ft.remove.clear());for(let Dt of ft.remove)ut.add.delete(Dt),ut.update.delete(Dt);for(let[Dt,Gt]of ft.update){let Kt=ut.update.get(Dt);Kt&&(ft.update.set(Dt,we(Kt,Gt)),ut.update.delete(Dt))}})(Re,je);let Ze={};if((Re.removeAll||je.removeAll)&&(Ze.removeAll=!0),Ze.remove=new Set([...Re.remove,...je.remove]),Ze.add=new Map([...Re.add,...je.add]),Ze.update=new Map([...Re.update,...je.update]),Ze.remove.size&&Ze.add.size)for(let ut of Ze.add.keys())Ze.remove.delete(ut);return function(ut){let ft={};return ut.removeAll&&(ft.removeAll=ut.removeAll),ut.remove&&(ft.remove=Array.from(ut.remove)),ut.add&&(ft.add=Array.from(ut.add.values())),ut.update&&(ft.update=Array.from(ut.update.values())),ft}(Ze)}(this._pendingWorkerUpdate.diff,y);let ie=this._updateWorkerData();return N?ie:this}getData(){return e._(this,void 0,void 0,function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}})}getBounds(){return e._(this,void 0,void 0,function*(){return Ge(yield this.getData())})}setClusterOptions(y){return this.workerOptions.geojsonVtOptions.cluster=y.cluster,y.clusterRadius!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(y.clusterRadius)),y.clusterMaxZoom!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(y.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(y){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:y,source:this.id}})}getClusterChildren(y){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:y,source:this.id}})}getClusterLeaves(y,N,ie){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:y,limit:N,offset:ie}})}_updateWorkerData(){return e._(this,void 0,void 0,function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void e.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:y,diff:N,updateCluster:ie}=this._pendingWorkerUpdate,fe=this._getLoadGeoJSONParameters(y,N,ie);y!==void 0?this._pendingWorkerUpdate.data=void 0:N?this._pendingWorkerUpdate.diff=void 0:ie&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(fe)})}_getLoadGeoJSONParameters(y,N,ie){return e._(this,void 0,void 0,function*(){let fe=e.e({type:this.type},this.workerOptions);return typeof y=="string"?(fe.request=yield this.map._requestManager.transformRequest(s.resolveURL(y),"Source"),fe.request.collectResourceTiming=this._collectResourceTiming,fe):y!==void 0?(fe.data=y,fe):N?(fe.dataDiff=N,fe):ie?(fe.updateCluster=!0,fe):void 0})}_dispatchWorkerUpdate(y){return e._(this,void 0,void 0,function*(){this._isUpdatingWorker=!0,this.fire(new e.n("dataloading",{dataType:"source"}));try{let N=yield y,ie=yield this.actor.sendAsync({type:"LD",data:N});if(this._isUpdatingWorker=!1,this._removed||ie.abandoned)return void this.fire(new e.n("dataabort",{dataType:"source"}));ie.data&&(this._data={geojson:ie.data});let fe=this._applyDiffToSource(N.dataDiff),be=this._getShouldReloadTileOptions(fe),Re={dataType:"source"};this._applyResourceTiming(Re,ie),this.fire(new e.n("data",Object.assign(Object.assign({},Re),{sourceDataType:"metadata"}))),this.fire(new e.n("data",Object.assign(Object.assign({},Re),{sourceDataType:"content",shouldReloadTileOptions:be})))}catch(N){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new e.n("dataabort",{dataType:"source"}));this.fire(new e.l(e.d(N)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}})}_applyResourceTiming(y,N){var ie;if(!this._collectResourceTiming)return;let fe=(ie=N.resourceTiming)===null||ie===void 0?void 0:ie[this.id];if(!fe)return;let be=fe.slice(0);be?.length&&e.e(y,{resourceTiming:be})}_applyDiffToSource(y){if(!y)return;let N=typeof this.promoteId=="string"?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let fe=function(be,Re){let je=new Map;if(be==null||be.type==null)return je;if(be.type==="Feature"){let Ze=xe(be,Re);return Ze==null?void 0:(je.set(Ze,be),je)}if(be.type==="FeatureCollection"){let Ze=new Set;for(let ut of be.features){let ft=xe(ut,Re);if(ft==null||Ze.has(ft))return;Ze.add(ft),je.set(ft,ut)}return je}}(this._data.geojson,N);if(!fe)throw new Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:fe}}if(!this._data.updateable)return;let ie=function(fe,be,Re){var je,Ze;let ut=[];if(be.removeAll)fe.clear();else if(be.remove)for(let ft of be.remove){let Dt=fe.get(ft);Dt&&(ut.push(Dt.geometry),fe.delete(ft))}if(be.add)for(let ft of be.add){let Dt=xe(ft,Re);if(Dt==null)continue;let Gt=fe.get(Dt);Gt&&ut.push(Gt.geometry),ut.push(ft.geometry),fe.set(Dt,ft)}if(be.update)for(let ft of be.update){let Dt=fe.get(ft.id);if(!Dt)continue;let Gt=!!ft.newGeometry,Kt=ft.removeAllProperties||((je=ft.removeProperties)===null||je===void 0?void 0:je.length)>0||((Ze=ft.addOrUpdateProperties)===null||Ze===void 0?void 0:Ze.length)>0;if(!Gt&&!Kt)continue;ut.push(Dt.geometry);let st=Object.assign({},Dt);if(fe.set(ft.id,st),Gt&&(ut.push(ft.newGeometry),st.geometry=ft.newGeometry),Kt){if(st.properties=ft.removeAllProperties?{}:Object.assign({},st.properties||{}),ft.removeProperties)for(let It of ft.removeProperties)delete st.properties[It];if(ft.addOrUpdateProperties)for(let{key:It,value:Ut}of ft.addOrUpdateProperties)st.properties[It]=Ut}}return ut}(this._data.updateable,y,N);return y.removeAll||this._options.cluster?void 0:ie}_getShouldReloadTileOptions(y){if(y)return{affectedBounds:y.filter(Boolean).map(N=>Ge(N))}}shouldReloadTile(y,{affectedBounds:N}){if(y.state==="loading")return!0;if(y.state==="unloaded")return!1;let{buffer:ie,extent:fe}=this.workerOptions.geojsonVtOptions,be=function({x:Re,y:je,z:Ze},ut=0){let ft=e.a4((Re-ut)/Math.pow(2,Ze)),Dt=e.a5((je+1+ut)/Math.pow(2,Ze)),Gt=e.a4((Re+1+ut)/Math.pow(2,Ze)),Kt=e.a5((je-ut)/Math.pow(2,Ze));return new q([ft,Dt],[Gt,Kt])}(y.tileID.canonical,ie/fe);for(let Re of N)if(be.intersects(Re))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.actor?"RT":"LT";y.actor=this.actor;let ie={type:this.type,uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};y.abortController=new AbortController;let fe=yield this.actor.sendAsync({type:N,data:ie},y.abortController);delete y.abortController,y.unloadVectorData(),y.aborted||y.loadVectorData(fe,this.map.painter,N==="RT")})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.aborted=!0})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:y.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return e.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class ke extends e.E{constructor(y,N,ie,fe){super(),this.flippedWindingOrder=!1,this.id=y,this.dispatcher=ie,this.coordinates=N.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(fe),this.options=N}load(y){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let N=yield v.getImage(yield this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,N?.data&&(this.image=N.data,y&&(this.coordinates=y),this._finishLoading())}catch(N){this._request=null,this._loaded=!0,e.$(N)||this.fire(new e.l(e.d(N)))}})}loaded(){return this._loaded}updateImage(y){return y.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=y.url,this.load(y.coordinates).finally(()=>this.texture=null),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(y){this.map=y,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(y){this.coordinates=y;let N=y.map(e.a7.fromLngLat);var ie;return this.tileID=function(fe){let be=e.a8.fromPoints(fe),Re=be.width(),je=be.height(),Ze=Math.max(Re,je),ut=Math.max(0,Math.floor(-Math.log(Ze)/Math.LN2)),ft=Math.pow(2,ut);return new e.aa(ut,Math.floor((be.minX+be.maxX)/2*ft),Math.floor((be.minY+be.maxY)/2*ft))}(N),this.terrainTileRanges=this._getOverlappingTileRanges(N),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=N.map(fe=>this.tileID.getTilePoint(fe)._round()),this.flippedWindingOrder=((ie=this.tileCoords)[1].x-ie[0].x)*(ie[2].y-ie[0].y)-(ie[1].y-ie[0].y)*(ie[2].x-ie[0].x)<0,this.fire(new e.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let y=this.map.painter.context,N=y.gl;this.texture||(this.texture=new e.T(y,this.image,N.RGBA),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let ie=!1;for(let fe in this.tiles){let be=this.tiles[fe];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(y){return e._(this,void 0,void 0,function*(){var N;!((N=this.tileID)===null||N===void 0)&&N.equals(y.tileID.canonical)?(this.tiles[String(y.tileID.wrap)]=y,y.buckets={}):y.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(y){let{minX:N,minY:ie,maxX:fe,maxY:be}=e.a8.fromPoints(y),Re={};for(let je=0;je<=e.a9;je++){let Ze=Math.pow(2,je),ut=Math.floor(N*Ze),ft=Math.floor(ie*Ze),Dt=Math.floor(fe*Ze),Gt=Math.floor(be*Ze),Kt=(ut%Ze+Ze)%Ze,st=Dt%Ze,It=Math.floor(ut/Ze),Ut=Math.floor(Dt/Ze);Re[je]={minWrap:It,maxWrap:Ut,minTileXWrapped:Kt,maxTileXWrapped:st,minTileY:ft,maxTileY:Gt}}return Re}}class _e extends ke{constructor(y,N,ie,fe){super(y,N,ie,fe),this._onPlayingHandler=()=>{var be;(be=this.map)===null||be===void 0||be.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=N}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let y=this.options;this.urls=[];for(let N of y.urls)this.urls.push((yield this.map._requestManager.transformRequest(N,"Source")).url);try{let N=yield e.ab(this.urls);if(this._loaded=!0,!N)return;this.video=N,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(N){this.fire(new e.l(e.d(N)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(y){if(this.video){let N=this.video.seekable;yN.end(0)?this.fire(new e.l(new e.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${N.start(0)} and ${N.end(0)}-second mark.`))):this.video.currentTime=y}}getVideo(){return this.video}onAdd(y){this.map||(this.map=y,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let y=this.map.painter.context,N=y.gl;this.texture?this.video.paused||(this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE),N.texSubImage2D(N.TEXTURE_2D,0,0,0,N.RGBA,N.UNSIGNED_BYTE,this.video)):(this.texture=new e.T(y,this.video,N.RGBA),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let ie=!1;for(let fe in this.tiles){let be=this.tiles[fe];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class ue extends ke{constructor(y,N,ie,fe){super(y,N,ie,fe),N.coordinates?Array.isArray(N.coordinates)&&N.coordinates.length===4&&!N.coordinates.some(be=>!Array.isArray(be)||be.length!==2||be.some(Re=>typeof Re!="number"))||this.fire(new e.l(new e.ac(`sources.${y}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.l(new e.ac(`sources.${y}`,null,'missing required property "coordinates"'))),N.animate&&typeof N.animate!="boolean"&&this.fire(new e.l(new e.ac(`sources.${y}`,null,'optional "animate" property must be a boolean value'))),N.canvas?typeof N.canvas=="string"||N.canvas instanceof HTMLCanvasElement||this.fire(new e.l(new e.ac(`sources.${y}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.l(new e.ac(`sources.${y}`,null,'missing required property "canvas"'))),this.options=N,this.animate=N.animate===void 0||N.animate}load(){return e._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.l(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(y){this.map=y,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let y=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,y=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,y=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let N=this.map.painter.context,ie=N.gl;this.texture?(y||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new e.T(N,this.canvas,ie.RGBA,{premultiply:!0}),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let fe=!1;for(let be in this.tiles){let Re=this.tiles[be];Re.state!=="loaded"&&(Re.state="loaded",Re.texture=this.texture,fe=!0)}fe&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let y of[this.canvas.width,this.canvas.height])if(isNaN(y)||y<=0)return!0;return!1}}let ve={},le=pe=>{switch(pe){case"geojson":return qe;case"image":return ke;case"raster":return ae;case"raster-dem":return he;case"vector":return ee;case"video":return _e;case"canvas":return ue}return ve[pe]},Ae="RTLPluginLoaded";class Be extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=se()}_syncState(y){return this.status=y,this.dispatcher.broadcast("SRPS",{pluginStatus:y,pluginURL:this.url}).catch(N=>{throw this.status="error",N})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(y){return e._(this,arguments,void 0,function*(N,ie=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=s.resolveURL(N),!this.url)throw new Error(`requested url ${N} is invalid`);if(this.status==="unavailable"){if(!ie)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.n(Ae))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Xe=null;function Ye(){return Xe||(Xe=new Be),Xe}var yt,gt;(function(pe){pe[pe.Base=0]="Base",pe[pe.Parent=1]="Parent"})(yt||(yt={})),function(pe){pe[pe.Departing=0]="Departing",pe[pe.Incoming=1]="Incoming"}(gt||(gt={}));class Tt{constructor(y,N){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=y,this.uid=e.ad(),this.uses=0,this.tileSize=N,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(y){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(y||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:y,fadingDirection:N,fadingParentID:ie,fadeEndTime:fe}){this.resetFadeLogic(),this.fadingRole=y,this.fadingDirection=N,this.fadingParentID=ie,this.fadeEndTime=fe}setSelfFadeLogic(y){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=y}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=g(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(y){this.demTexture&&y.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(y,N,ie){if(y?.etagUnmodified!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",y){y.featureIndex&&(this.latestFeatureIndex=y.featureIndex,y.rawTileData?(this.latestRawTileData=y.rawTileData,this.latestEncoding=y.encoding,this.latestFeatureIndex.rawTileData=y.rawTileData,this.latestFeatureIndex.encoding=y.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=y.collisionBoxArray,this.buckets=function(fe,be){let Re={};if(!be)return Re;for(let je of fe){let Ze=je.layerIds.map(ut=>be.getLayer(ut)).filter(Boolean);if(Ze.length!==0){je.layers=Ze,je.stateDependentLayerIds&&(je.stateDependentLayers=je.stateDependentLayerIds.map(ut=>Ze.filter(ft=>ft.id===ut)[0]));for(let ut of Ze)Re[ut.id]=je}}return Re}(y.buckets,N?.style),this.hasSymbolBuckets=!1;for(let fe in this.buckets){let be=this.buckets[fe];if(be instanceof e.af){if(this.hasSymbolBuckets=!0,!ie)break;be.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let fe in this.buckets){let be=this.buckets[fe];if(be instanceof e.af&&be.hasRTLText){this.hasRTLText=!0,Ye().lazyLoad();break}}this.queryPadding=0;for(let fe in this.buckets){let be=this.buckets[fe];this.queryPadding=Math.max(this.queryPadding,N.style.getLayer(fe).queryRadius(be))}y.imageAtlas&&(this.imageAtlas=y.imageAtlas),y.glyphAtlasImage&&(this.glyphAtlasImage=y.glyphAtlasImage),this.dashPositions=y.dashPositions}else this.collisionBoxArray=new e.ae;else this.state="loaded"}unloadVectorData(){for(let y in this.buckets)this.buckets[y].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(y){return this.buckets[y.id]}upload(y){for(let ie in this.buckets){let fe=this.buckets[ie];fe.uploadPending()&&fe.upload(y)}let N=y.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new e.T(y,this.imageAtlas.image,N.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new e.T(y,this.glyphAtlasImage,N.ALPHA),this.glyphAtlasImage=null)}prepare(y){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(y,this.imageAtlasTexture)}queryRenderedFeatures(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt){var Gt;return!((Gt=this.latestFeatureIndex)===null||Gt===void 0)&&Gt.rawTileData?this.latestFeatureIndex.query({queryGeometry:fe,cameraQueryGeometry:be,scale:Re,tileSize:this.tileSize,pixelPosMatrix:ft,transform:Ze,params:je,queryPadding:this.queryPadding*ut,getElevation:Dt},y,N,ie):{}}querySourceFeatures(y,N){let ie=this.latestFeatureIndex;if(!ie?.rawTileData)return;let fe=ie.loadVTLayers(),be=N?.sourceLayer?N.sourceLayer:"",Re=fe[e.ag]||fe[be];if(!Re)return;let je=e.ah(N?.filter,N?.globalState),{z:Ze,x:ut,y:ft}=this.tileID.canonical,Dt={z:Ze,x:ut,y:ft};for(let Gt=0;Gtie)fe=!1;else if(N)if(this.expirationTime({zoom:0,x:0,y:0,wrap:vr,fullyVisible:!1}),Ar=[],hr=[];if(pe.renderWorldCopies&&Re.allowWorldCopies())for(let vr=1;vr<=3;vr++)Ar.push(dr(-vr)),Ar.push(dr(vr));for(Ar.push(dr(0));Ar.length>0;){let vr=Ar.pop(),Or=vr.x,Cr=vr.y,ta=vr.fullyVisible,ka={x:Or,y:Cr,z:vr.zoom},Ta=Re.getTileBoundingVolume(ka,vr.wrap,pe.elevation,y);if(!ta){let ma=ht(N,Ta,ie);if(ma===0)continue;ta=ma===2}let Ra=Re.distanceToTile2d(fe.x,fe.y,ka,Ta),ua=Ze;je&&(ua=(y.calculateTileZoom||We)(pe.zoom+e.ar(pe.tileSize/y.tileSize),Ra,Ut,ir,pe.fov)),ua=(y.roundZoom?Math.round:Math.floor)(ua),ua=Math.max(0,ua);let ia=Math.min(ua,ft);if(vr.wrap=Re.getWrap(be,ka,vr.wrap),vr.zoom>=ia){if(vr.zoom>1),wrap:vr.wrap,fullyVisible:ta})}return hr.sort((vr,Or)=>vr.distanceSq-Or.distanceSq).map(vr=>vr.tileID)}let et=e.a8.fromPoints([new e.P(0,0),new e.P(e.a6,e.a6)]);function Mt(pe){return pe==="raster"||pe==="image"||pe==="video"}function pt(pe,y,N,ie,fe,be,Re){if(!y.hasData())return!1;let{tileID:je,fadingRole:Ze,fadingDirection:ut,fadingParentID:ft}=y;if(Ze===yt.Base&&ut===gt.Incoming&&ft)return N[ft.key]=ft,!0;let Dt=Math.max(je.overscaledZ-fe,be);for(let Gt=je.overscaledZ-1;Gt>=Dt;Gt--){let Kt=je.scaledTo(Gt),st=pe.getLoadedTile(Kt);if(st)return y.setCrossFadeLogic({fadingRole:yt.Base,fadingDirection:gt.Incoming,fadingParentID:st.tileID,fadeEndTime:ie+Re}),st.setCrossFadeLogic({fadingRole:yt.Parent,fadingDirection:gt.Departing,fadeEndTime:ie+Re}),N[Kt.key]=Kt,!0}return!1}function Pt(pe,y,N,ie,fe,be){if(!y.hasData())return!1;let Re=y.tileID.children(fe),je=Ct(pe,y,Re,N,ie,fe,be);if(je)return!0;for(let Ze of Re)Ct(pe,y,Ze.children(fe),N,ie,fe,be)&&(je=!0);return je}function Ct(pe,y,N,ie,fe,be,Re){if(N[0].overscaledZ>=be)return!1;let je=!1;for(let Ze of N){let ut=pe.getLoadedTile(Ze);if(!ut)continue;let{fadingRole:ft,fadingDirection:Dt,fadingParentID:Gt}=ut;ft===yt.Base&&Dt===gt.Departing&&Gt||(ut.setCrossFadeLogic({fadingRole:yt.Base,fadingDirection:gt.Departing,fadingParentID:y.tileID,fadeEndTime:fe+Re}),y.setCrossFadeLogic({fadingRole:yt.Parent,fadingDirection:gt.Incoming,fadeEndTime:fe+Re})),ie[Ze.key]=Ze,je=!0}return je}function qt(pe,y,N,ie){let fe=pe.tileID;return!!pe.selfFading||!pe.hasData()&&!!y.has(fe)&&(pe.setSelfFadeLogic(N+ie),!0)}function Vt(pe,y){var N;pe.needsHillshadePrepare=!0,pe.needsTerrainPrepare=!0;let ie=y.tileID.canonical.x-pe.tileID.canonical.x,fe=y.tileID.canonical.y-pe.tileID.canonical.y,be=Math.pow(2,pe.tileID.canonical.z),Re=y.tileID.key;ie===0&&fe===0||Math.abs(fe)>1||(Math.abs(ie)>1&&(Math.abs(ie+be)===1?ie+=be:Math.abs(ie-be)===1&&(ie-=be)),y.dem&&pe.dem&&(pe.dem.backfillBorder(y.dem,ie,fe),!((N=pe.neighboringTiles)===null||N===void 0)&&N[Re]&&(pe.neighboringTiles[Re].backfilled=!0)))}class Ht{constructor(){this._tiles={}}handleWrapJump(y){let N={};for(let ie in this._tiles){let fe=this._tiles[ie];fe.tileID=fe.tileID.unwrapTo(fe.tileID.wrap+y),N[fe.tileID.key]=fe}this._tiles=N}setFeatureState(y,N){for(let ie in this._tiles)this._tiles[ie].setFeatureState(y,N)}getAllTiles(){return Object.values(this._tiles)}getAllIds(y=!1){return y?Object.values(this._tiles).map(N=>N.tileID).sort(e.au).map(N=>N.key):Object.keys(this._tiles)}getTileById(y){return this._tiles[y]}setTile(y,N){this._tiles[y]=N}deleteTileById(y){delete this._tiles[y]}getLoadedTile(y){let N=this.getTileById(y.key);return N?.hasData()?N:null}isIdRenderable(y,N=!1){var ie;return(ie=this.getTileById(y))===null||ie===void 0?void 0:ie.isRenderable(N)}getRenderableIds(y=0,N){let ie=[];for(let fe of this.getAllIds())this.isIdRenderable(fe,N)&&ie.push(this.getTileById(fe));return N?ie.sort((fe,be)=>{let Re=fe.tileID,je=be.tileID,Ze=new e.P(Re.canonical.x,Re.canonical.y)._rotate(-y),ut=new e.P(je.canonical.x,je.canonical.y)._rotate(-y);return Re.overscaledZ-je.overscaledZ||ut.y-Ze.y||ut.x-Ze.x}).map(fe=>fe.tileID.key):ie.map(fe=>fe.tileID).sort(e.au).map(fe=>fe.key)}}class Sr extends e.E{constructor(y,N,ie){super(),this.id=y,this.dispatcher=ie,this.on("data",fe=>{this._dataHandler(fe)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((fe,be,Re,je)=>{let Ze=new(le(be.type))(fe,be,Re,je);if(Ze.id!==fe)throw new Error(`Expected Source id to be ${fe} instead of ${Ze.id}`);return Ze})(y,N,ie,this),this._inViewTiles=new Ht,this._outOfViewCache=new e.av(0,fe=>this._unloadTile(fe)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new At,this._didEmitContent=!1,this._updated=!1}onAdd(y){var N;this.map=y,this._maxTileCacheSize=y?y._maxTileCacheSize:null,this._maxTileCacheZoomLevels=y?y._maxTileCacheZoomLevels:null,!((N=this._source)===null||N===void 0)&&N.onAdd&&this._source.onAdd(y)}onRemove(y){var N;for(let ie of this._inViewTiles.getAllTiles())ie.unloadVectorData();this.clearTiles(),!((N=this._source)===null||N===void 0)&&N.onRemove&&this._source.onRemove(y),this._inViewTiles=new Ht}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let y=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,y&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(y,N,ie){return e._(this,void 0,void 0,function*(){try{let fe=yield this._source.loadTile(y);this._tileLoaded(y,N,ie,fe)}catch(fe){y.state="errored",fe.status!==404?this._source.fire(new e.l(e.d(fe),{tile:y})):this.update(this.transform,this.terrain)}})}_unloadTile(y){this._source.unloadTile&&this._source.unloadTile(y)}_abortTile(y){this._source.abortTile&&this._source.abortTile(y),this._source.fire(new e.n("dataabort",{tile:y,coord:y.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(y){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let N of this._inViewTiles.getAllTiles())N.upload(y),N.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(y){var N;return this._inViewTiles.getRenderableIds((N=this.transform)===null||N===void 0?void 0:N.bearingInRadians,y)}hasRenderableParent(y){let N=y.overscaledZ-1;if(N>=this._source.minzoom){let ie=this.getLoadedTile(y.scaledTo(N));if(ie)return this._inViewTiles.isIdRenderable(ie.tileID.key)}return!1}reload(y,N=void 0){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(let ie of this._inViewTiles.getAllIds()){let fe=this._inViewTiles.getTileById(ie);N&&!this._source.shouldReloadTile(fe,N)||(y?this._reloadTile(ie,"expired"):fe.state!=="errored"&&this._reloadTile(ie,"reloading"))}}}_reloadTile(y,N){return e._(this,void 0,void 0,function*(){let ie=this._inViewTiles.getTileById(y);ie&&(ie.state!=="loading"&&(ie.state=N),yield this._loadTile(ie,y,N))})}_tileLoaded(y,N,ie,fe){y.timeAdded=g(),y.selfFading&&(y.fadeEndTime=y.timeAdded+this._rasterFadeDuration),ie==="expired"&&(y.refreshedUponExpiration=!0),this._setTileReloadTimer(N,y),fe?.unmodified||(this.getSource().type==="raster-dem"&&y.dem&&function(be,Re){var je,Ze,ut;let ft=Re.getRenderableIds();for(let Dt of ft){if(!(!((je=be.neighboringTiles)===null||je===void 0)&&je[Dt]))continue;let Gt=Re.getTileById(Dt);be.neighboringTiles[Dt].backfilled||Vt(be,Gt),!((ut=(Ze=Gt.neighboringTiles)===null||Ze===void 0?void 0:Ze[be.tileID.key])===null||ut===void 0)&&ut.backfilled||Vt(Gt,be)}}(y,this._inViewTiles),this._state.initializeTileState(y,this.map?this.map.painter:null),y.aborted||this._source.fire(new e.n("data",{dataType:"source",tile:y,coord:y.tileID})))}getTile(y){return this.getTileByID(y.key)}getTileByID(y){return this._inViewTiles.getTileById(y)}_retainLoadedChildren(y,N){let ie=this._getLoadedDescendents(N),fe=new Set;for(let be of N){let Re=ie[be.key];if(!Re?.length){fe.add(be);continue}let je=be.overscaledZ+Sr.maxOverzooming,Ze=Re.filter(Dt=>Dt.tileID.overscaledZ<=je);if(!Ze.length){fe.add(be);continue}let ut=Math.min(...Ze.map(Dt=>Dt.tileID.overscaledZ)),ft=Ze.filter(Dt=>Dt.tileID.overscaledZ===ut).map(Dt=>Dt.tileID);for(let Dt of ft)y[Dt.key]=Dt;this._areDescendentsComplete(ft,ut,be.overscaledZ)||fe.add(be)}return fe}_getLoadedDescendents(y){var N;let ie={};for(let fe of this._inViewTiles.getAllTiles().filter(be=>be.hasData()))for(let be of y)fe.tileID.isChildOf(be)&&(ie[N=be.key]||(ie[N]=[]),ie[be.key].push(fe));return ie}_areDescendentsComplete(y,N,ie){return y.length===1&&y[0].isOverscaled()?y[0].overscaledZ===N:Math.pow(4,N-ie)===y.length}getLoadedTile(y){return this._inViewTiles.getLoadedTile(y)}updateCacheSize(y){let N=Math.ceil(y.width/this._source.tileSize)+1,ie=Math.ceil(y.height/this._source.tileSize)+1,fe=Math.floor(N*ie*(this._maxTileCacheZoomLevels===null?e.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),be=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,fe):fe;this._outOfViewCache.setMaxSize(be)}handleWrapJump(y){let N=Math.round((y-(this._prevLng===void 0?y:this._prevLng))/360);this._prevLng=y,N&&(this._inViewTiles.handleWrapJump(N),this._resetTileReloadTimers())}update(y,N){if(!this._sourceLoaded||this._paused)return;let ie;this.transform=y,this.terrain=N,this.updateCacheSize(y),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?ie=y.getVisibleUnwrappedCoordinates(this._source.tileID).map(Ze=>new e.a3(Ze.canonical.z,Ze.wrap,Ze.canonical.z,Ze.canonical.x,Ze.canonical.y)):(ie=Je(y,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?y.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:N,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(ie=ie.filter(Ze=>this._source.hasTile(Ze)))):ie=[],this.usedForTerrain&&(ie=this._addTerrainIdealTiles(ie));let fe=ie.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,fe&&this.fire(new e.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let be=Ke(y,this._source),Re=this._updateRetainedTiles(ie,be),je=Mt(this._source.type);je&&this._rasterFadeDuration>0&&!N&&function(Ze,ut,ft,Dt,Gt,Kt,st){let It=g(),Ut=e.at(ut);for(let ir of ut){let dr=Ze.getTileById(ir.key);dr.fadingDirection!==gt.Departing&&dr.fadeOpacity!==0||dr.resetFadeLogic(),pt(Ze,dr,ft,It,Dt,Gt,st)||Pt(Ze,dr,ft,It,Kt,st)||qt(dr,Ut,It,st)||dr.resetFadeLogic()}}(this._inViewTiles,ie,Re,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),je?this._cleanUpRasterTiles(Re):this._cleanUpVectorTiles(Re)}_cleanUpRasterTiles(y){for(let N of this._inViewTiles.getAllIds())y[N]||this._removeTile(N)}_cleanUpVectorTiles(y){for(let N of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(N);y[N]?ie.clearSymbolFadeHold():ie.hasSymbolBuckets?ie.holdingForSymbolFade()?ie.symbolFadeFinished()&&this._removeTile(N):ie.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(N)}}_addTerrainIdealTiles(y){let N=[];for(let ie of y)if(ie.canonical.z>this._source.minzoom){let fe=ie.scaledTo(ie.canonical.z-1);N.push(fe);let be=ie.scaledTo(Math.max(this._source.minzoom,Math.min(ie.canonical.z,5)));N.push(be)}return y.concat(N)}releaseSymbolFadeTiles(){for(let y of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(y).holdingForSymbolFade()&&this._removeTile(y)}_updateRetainedTiles(y,N){var ie;let fe=new Set;for(let ut of y)this._addTile(ut).hasData()||fe.add(ut);let be=y.reduce((ut,ft)=>(ut[ft.key]=ft,ut),{}),Re=this._retainLoadedChildren(be,fe),je={},Ze=Math.max(N-Sr.maxUnderzooming,this._source.minzoom);for(let ut of Re){let ft=this._inViewTiles.getTileById(ut.key),Dt=ft?.wasRequested();for(let Gt=ut.overscaledZ-1;Gt>=Ze;--Gt){let Kt=ut.scaledTo(Gt);if(je[Kt.key])break;if(je[Kt.key]=!0,ft=this.getTile(Kt),!ft&&Dt&&(ft=this._addTile(Kt)),ft){let st=ft.hasData();if((st||!(!((ie=this.map)===null||ie===void 0)&&ie.cancelPendingTileRequestsWhileZooming)||Dt)&&(be[Kt.key]=Kt),Dt=ft.wasRequested(),st)break}}}return be}_addTile(y){let N=this._inViewTiles.getTileById(y.key);if(N)return N;N=this._outOfViewCache.getAndRemove(y),N&&(N.resetFadeLogic(),this._setTileReloadTimer(y.key,N),N.tileID=y,this._state.initializeTileState(N,this.map?this.map.painter:null));let ie=N;return N||(N=new Tt(y,this._source.tileSize*y.overscaleFactor()),this._loadTile(N,y.key,N.state)),N.uses++,this._inViewTiles.setTile(y.key,N),ie||this._source.fire(new e.n("dataloading",{tile:N,coord:N.tileID,dataType:"source"})),N}_setTileReloadTimer(y,N){this._clearTileReloadTimer(y);let ie=N.getExpiryTimeout();ie&&(this._timers[y]=setTimeout(()=>{this._reloadTile(y,"expired"),delete this._timers[y]},ie))}_clearTileReloadTimer(y){let N=this._timers[y];N&&(clearTimeout(N),delete this._timers[y])}_resetTileReloadTimers(){for(let y in this._timers)clearTimeout(this._timers[y]),delete this._timers[y];for(let y of this._inViewTiles.getAllIds()){let N=this._inViewTiles.getTileById(y);this._setTileReloadTimer(y,N)}}refreshTiles(y){for(let N of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(N);(this._inViewTiles.isIdRenderable(N)||ie.state=="errored")&&y.some(fe=>fe.equals(ie.tileID.canonical))&&this._reloadTile(N,"expired")}}_removeTile(y){let N=this._inViewTiles.getTileById(y);N&&(N.uses--,this._inViewTiles.deleteTileById(y),this._clearTileReloadTimer(y),N.uses>0||(N.hasData()&&N.state!=="reloading"?this._outOfViewCache.add(N.tileID,N,N.getExpiryTimeout()):(N.aborted=!0,this._abortTile(N),this._unloadTile(N))))}_dataHandler(y){y.dataType==="source"&&(y.sourceDataType!=="metadata"?y.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(y.sourceDataChanged,y.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let y of this._inViewTiles.getAllIds())this._removeTile(y);this._outOfViewCache.reset()}tilesIn(y,N,ie){let fe=[],be=this.transform;if(!be)return fe;let Re=be.getCoveringTilesDetailsProvider().allowWorldCopies(),je=ie?be.getCameraQueryGeometry(y):y,Ze=Kt=>be.screenPointToMercatorCoordinate(Kt,this.terrain),ut=this.transformBbox(y,Ze,!Re),ft=this.transformBbox(je,Ze,!Re),Dt=this.getIds(),Gt=e.a8.fromPoints(ft);for(let Kt of Dt){let st=this._inViewTiles.getTileById(Kt);if(st.holdingForSymbolFade())continue;let It=Re?[st.tileID]:[st.tileID.unwrapTo(-1),st.tileID.unwrapTo(0)],Ut=Math.pow(2,be.zoom-st.tileID.overscaledZ),ir=N*st.queryPadding*e.a6/st.tileSize/Ut;for(let dr of It){let Ar=Gt.map(hr=>dr.getTilePoint(new e.a7(hr.x,hr.y)));if(Ar.expandBy(ir),Ar.intersects(et)){let hr=ut.map(Or=>dr.getTilePoint(Or)),vr=ft.map(Or=>dr.getTilePoint(Or));fe.push({tile:st,tileID:Re?dr:dr.unwrapTo(0),queryGeometry:hr,cameraQueryGeometry:vr,scale:Ut})}}}return fe}transformBbox(y,N,ie){let fe=y.map(N);if(ie){let be=e.a8.fromPoints(y);be.shrinkBy(.001*Math.min(be.width(),be.height()));let Re=be.map(N);e.a8.fromPoints(fe).covers(Re)||(fe=fe.map(je=>je.x>.5?new e.a7(je.x-1,je.y,je.z):je))}return fe}getVisibleCoordinates(y){let N=this.getRenderableIds(y).map(ie=>this._inViewTiles.getTileById(ie).tileID);return this.transform&&this.transform.populateCache(N),N}hasTransition(){return!!this._source.hasTransition()||Mt(this._source.type)&&function(y,N){if(N<=0)return!1;let ie=g();for(let fe of y.getAllTiles())if(fe.fadeEndTime>=ie)return!0;return!1}(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(y){this._rasterFadeDuration=y}setFeatureState(y,N,ie){y||(y=e.ag),this._state.updateState(y,N,ie)}removeFeatureState(y,N,ie){y||(y=e.ag),this._state.removeFeatureState(y,N,ie)}getFeatureState(y,N){return y||(y=e.ag),this._state.getState(y,N)}setDependencies(y,N,ie){let fe=this._inViewTiles.getTileById(y);fe&&fe.setDependencies(N,ie)}reloadTilesForDependencies(y,N){for(let ie of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(ie).hasDependency(y,N)&&this._reloadTile(ie,"reloading");this._outOfViewCache.filter(ie=>!ie.hasDependency(y,N))}areTilesLoaded(){for(let y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}}Sr.maxUnderzooming=10,Sr.maxOverzooming=3;class Kr{constructor(y,N){this.reset(y,N)}reset(y,N){this.points=y||[],this._distances=[0];for(let ie=1;ie0?(fe-Re)/je:0;return this.points[be].mult(1-Ze).add(this.points[N].mult(Ze))}}function Yt(pe,y){let N=!0;return pe==="always"||pe!=="never"&&y!=="never"||(N=!1),N}class Rt{constructor(y,N,ie){let fe=this.boxCells=[],be=this.circleCells=[];this.xCellCount=Math.ceil(y/ie),this.yCellCount=Math.ceil(N/ie);for(let Re=0;Rethis.width||fe<0||N>this.height)return[];let Ze=[];if(y<=0&&N<=0&&this.width<=ie&&this.height<=fe){if(be)return[{key:null,x1:y,y1:N,x2:ie,y2:fe}];for(let ut=0;ut0}hitTestCircle(y,N,ie,fe,be){let Re=y-ie,je=y+ie,Ze=N-ie,ut=N+ie;if(je<0||Re>this.width||ut<0||Ze>this.height)return!1;let ft=[];return this._forEachCell(Re,Ze,je,ut,this._queryCellCircle,ft,{hitTest:!0,overlapMode:fe,circle:{x:y,y:N,radius:ie},seenUids:{box:{},circle:{}}},be),ft.length>0}_queryCell(y,N,ie,fe,be,Re,je,Ze){let{seenUids:ut,hitTest:ft,overlapMode:Dt}=je,Gt=this.boxCells[be],Kt=1e-6;if(Gt!==null){let It=this.bboxes;for(let Ut of Gt)if(!ut.box[Ut]){ut.box[Ut]=!0;let ir=4*Ut,dr=this.boxKeys[Ut];if(y<=It[ir+2]+Kt&&N<=It[ir+3]+Kt&&ie>=It[ir+0]-Kt&&fe>=It[ir+1]-Kt&&(!Ze||Ze(dr))&&(!ft||!Yt(Dt,dr.overlapMode))&&(Re.push({key:dr,x1:It[ir],y1:It[ir+1],x2:It[ir+2],y2:It[ir+3]}),ft))return!0}}let st=this.circleCells[be];if(st!==null){let It=this.circles;for(let Ut of st)if(!ut.circle[Ut]){ut.circle[Ut]=!0;let ir=3*Ut,dr=this.circleKeys[Ut];if(this._circleAndRectCollide(It[ir],It[ir+1],It[ir+2],y,N,ie,fe)&&(!Ze||Ze(dr))&&(!ft||!Yt(Dt,dr.overlapMode))){let Ar=It[ir],hr=It[ir+1],vr=It[ir+2];if(Re.push({key:dr,x1:Ar-vr,y1:hr-vr,x2:Ar+vr,y2:hr+vr}),ft)return!0}}}return!1}_queryCellCircle(y,N,ie,fe,be,Re,je,Ze){let{circle:ut,seenUids:ft,overlapMode:Dt}=je,Gt=this.boxCells[be];if(Gt!==null){let st=this.bboxes;for(let It of Gt)if(!ft.box[It]){ft.box[It]=!0;let Ut=4*It,ir=this.boxKeys[It];if(this._circleAndRectCollide(ut.x,ut.y,ut.radius,st[Ut+0],st[Ut+1],st[Ut+2],st[Ut+3])&&(!Ze||Ze(ir))&&!Yt(Dt,ir.overlapMode))return Re.push(!0),!0}}let Kt=this.circleCells[be];if(Kt!==null){let st=this.circles;for(let It of Kt)if(!ft.circle[It]){ft.circle[It]=!0;let Ut=3*It,ir=this.circleKeys[It];if(this._circlesCollide(st[Ut],st[Ut+1],st[Ut+2],ut.x,ut.y,ut.radius)&&(!Ze||Ze(ir))&&!Yt(Dt,ir.overlapMode))return Re.push(!0),!0}}}_forEachCell(y,N,ie,fe,be,Re,je,Ze){let ut=this._convertToXCellCoord(y),ft=this._convertToYCellCoord(N),Dt=this._convertToXCellCoord(ie),Gt=this._convertToYCellCoord(fe);for(let Kt=ut;Kt<=Dt;Kt++)for(let st=ft;st<=Gt;st++)if(be.call(this,y,N,ie,fe,this.xCellCount*st+Kt,Re,je,Ze))return}_convertToXCellCoord(y){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(y*this.xScale)))}_convertToYCellCoord(y){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(y*this.yScale)))}_circlesCollide(y,N,ie,fe,be,Re){let je=fe-y,Ze=be-N,ut=ie+Re;return ut*ut>je*je+Ze*Ze}_circleAndRectCollide(y,N,ie,fe,be,Re,je){let Ze=(Re-fe)/2,ut=Math.abs(y-(fe+Ze));if(ut>Ze+ie)return!1;let ft=(je-be)/2,Dt=Math.abs(N-(be+ft));if(Dt>ft+ie)return!1;if(ut<=Ze||Dt<=ft)return!0;let Gt=ut-Ze,Kt=Dt-ft;return Gt*Gt+Kt*Kt<=ie*ie}}function nr(pe,y){let N=1/(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]),ie=1/(y[8]*y[8]+y[9]*y[9]+y[10]*y[10]),fe=y[0]*N,be=y[4]*N,Re=y[8]*ie,je=y[1]*N,Ze=y[5]*N,ut=y[9]*ie,ft=y[2]*N,Dt=y[6]*N,Gt=y[10]*ie;pe[0]=fe,pe[1]=be,pe[2]=Re,pe[4]=je,pe[5]=Ze,pe[6]=ut,pe[8]=ft,pe[9]=Dt,pe[10]=Gt;let Kt=y[12],st=y[13],It=y[14];return pe[12]=-fe*Kt-je*st-ft*It,pe[13]=-be*Kt-Ze*st-Dt*It,pe[14]=-Re*Kt-ut*st-Gt*It,pe[3]=0,pe[7]=0,pe[11]=0,pe[15]=1,pe}let ur=e.O();function cr(pe,y,N){let ie=e.O();if(!pe){let{vecSouth:Dt,vecEast:Gt}=Qr(y),Kt=n();Kt[0]=Gt[0],Kt[1]=Gt[1],Kt[2]=Dt[0],Kt[3]=Dt[1],fe=Kt,(ft=(Re=(be=Kt)[0])*(ut=be[3])-(Ze=be[2])*(je=be[1]))&&(fe[0]=ut*(ft=1/ft),fe[1]=-je*ft,fe[2]=-Ze*ft,fe[3]=Re*ft),ie[0]=Kt[0],ie[1]=Kt[1],ie[4]=Kt[2],ie[5]=Kt[3]}var fe,be,Re,je,Ze,ut,ft;return e.S(ie,ie,[1/N,1/N,1]),ie}function Rr(pe,y,N,ie){if(pe){let fe=e.O();if(!y){let{vecSouth:be,vecEast:Re}=Qr(N);fe[0]=Re[0],fe[1]=Re[1],fe[4]=be[0],fe[5]=be[1]}return e.S(fe,fe,[ie,ie,1]),fe}return N.pixelsToClipSpaceMatrix}function Qr(pe){let y=Math.cos(pe.rollInRadians),N=Math.sin(pe.rollInRadians),ie=Math.cos(pe.pitchInRadians),fe=Math.cos(pe.bearingInRadians),be=Math.sin(pe.bearingInRadians),Re=e.az();Re[0]=-fe*ie*N-be*y,Re[1]=-be*ie*N+fe*y;let je=e.aA(Re);je<1e-9?e.aB(Re):e.aC(Re,Re,1/je);let Ze=e.az();Ze[0]=fe*ie*y-be*N,Ze[1]=be*ie*y+fe*N;let ut=e.aA(Ze);return ut<1e-9?e.aB(Ze):e.aC(Ze,Ze,1/ut),{vecEast:Ze,vecSouth:Re}}function Zr(pe,y,N,ie){let fe;ie?(fe=[pe,y,ie(pe,y),1],e.aE(fe,fe,N)):(fe=[pe,y,0,1],Oa(fe,fe,N));let be=fe[3];return{point:new e.P(fe[0]/be,fe[1]/be),signedDistanceFromCamera:be,isOccluded:!1}}function ha(pe,y){return .5+pe/y*.5}function Pa(pe,y){return pe.x>=-y[0]&&pe.x<=y[0]&&pe.y>=-y[1]&&pe.y<=y[1]}function La(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt){let Kt=N?pe.textSizeData:pe.iconSizeData,st=e.aw(Kt,y.transform.zoom),It=[256/y.width*2+1,256/y.height*2+1],Ut=N?pe.text.dynamicLayoutVertexArray:pe.icon.dynamicLayoutVertexArray;Ut.clear();let ir=pe.lineVertexArray,dr=N?pe.text.placedSymbolArray:pe.icon.placedSymbolArray,Ar=y.transform.width/y.transform.height,hr=!1;for(let vr=0;vrMath.abs(N.x-y.x)*ie?{useVertical:!0}:(pe===e.ax.vertical?y.yN.x)?{needsFlipping:!0}:null}function ja(pe){let{projectionContext:y,pitchedLabelPlaneMatrixInverse:N,symbol:ie,fontSize:fe,flip:be,keepUpright:Re,glyphOffsetArray:je,dynamicLayoutVertexArray:Ze,aspectRatio:ut,rotateToLine:ft}=pe,Dt=fe/24,Gt=ie.lineOffsetX*Dt,Kt=ie.lineOffsetY*Dt,st;if(ie.numGlyphs>1){let It=ie.glyphStartIndex+ie.numGlyphs,Ut=ie.lineStartIndex,ir=ie.lineStartIndex+ie.lineLength,dr=un(Dt,je,Gt,Kt,be,ie,ft,y);if(!dr)return{notEnoughRoom:!0};let Ar=li(dr.first.point.x,dr.first.point.y,y,N),hr=li(dr.last.point.x,dr.last.point.y,y,N);if(Re&&!be){let vr=Xa(ie.writingMode,Ar,hr,ut);if(vr)return vr}st=[dr.first];for(let vr=ie.glyphStartIndex+1;vr0?Ar.point:Nn(y.tileAnchorPoint,dr,Ut,1,y),vr=li(Ut.x,Ut.y,y,N),Or=li(hr.x,hr.y,y,N),Cr=Xa(ie.writingMode,vr,Or,ut);if(Cr)return Cr}let It=vi(Dt*je.getoffsetX(ie.glyphStartIndex),Gt,Kt,be,ie.segment,ie.lineStartIndex,ie.lineStartIndex+ie.lineLength,y,ft);if(!It||y.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};st=[It]}for(let It of st)e.aD(Ze,It.point,It.angle);return{}}function Nn(pe,y,N,ie,fe){let be=pe.add(pe.sub(y)._unit()),Re=Un(be.x,be.y,fe).point,je=N.sub(Re);return N.add(je._mult(ie/je.mag()))}function yn(pe,y,N){let ie=y.projectionCache;if(ie.projections[pe])return ie.projections[pe];let fe=new e.P(y.lineVertexArray.getx(pe),y.lineVertexArray.gety(pe)),be=Un(fe.x,fe.y,y);if(be.signedDistanceFromCamera>0)return ie.projections[pe]=be.point,ie.anyProjectionOccluded||(ie.anyProjectionOccluded=be.isOccluded),be.point;let Re=pe-N.direction;return Nn(N.distanceFromAnchor===0?y.tileAnchorPoint:new e.P(y.lineVertexArray.getx(Re),y.lineVertexArray.gety(Re)),fe,N.previousVertex,N.absOffsetX-N.distanceFromAnchor+1,y)}function Un(pe,y,N){let ie=pe+N.translation[0],fe=y+N.translation[1],be;return N.pitchWithMap?(be=Zr(ie,fe,N.pitchedLabelPlaneMatrix,N.getElevation),be.isOccluded=!1):(be=N.transform.projectTileCoordinates(ie,fe,N.unwrappedTileID,N.getElevation),be.point.x=(.5*be.point.x+.5)*N.width,be.point.y=(.5*-be.point.y+.5)*N.height),be}function li(pe,y,N,ie){if(N.pitchWithMap){let fe=[pe,y,0,1];return e.aE(fe,fe,ie),N.transform.projectTileCoordinates(fe[0]/fe[3],fe[1]/fe[3],N.unwrappedTileID,N.getElevation).point}return{x:pe/N.width*2-1,y:1-y/N.height*2}}function Yn(pe,y,N){return N.transform.projectTileCoordinates(pe,y,N.unwrappedTileID,N.getElevation)}function on(pe,y,N){return pe._unit()._perp()._mult(y*N)}function en(pe,y,N,ie,fe,be,Re,je,Ze){if(je.projectionCache.offsets[pe])return je.projectionCache.offsets[pe];let ut=N.add(y);if(pe+Ze.direction=fe)return je.projectionCache.offsets[pe]=ut,ut;let ft=yn(pe+Ze.direction,je,Ze),Dt=on(ft.sub(N),Re,Ze.direction),Gt=N.add(Dt),Kt=ft.add(Dt);return je.projectionCache.offsets[pe]=e.aF(be,ut,Gt,Kt)||ut,je.projectionCache.offsets[pe]}function vi(pe,y,N,ie,fe,be,Re,je,Ze){let ut=ie?pe-y:pe+y,ft=ut>0?1:-1,Dt=0;ie&&(ft*=-1,Dt=Math.PI),ft<0&&(Dt+=Math.PI);let Gt,Kt=ft>0?be+fe:be+fe+1;je.projectionCache.cachedAnchorPoint?Gt=je.projectionCache.cachedAnchorPoint:(Gt=Un(je.tileAnchorPoint.x,je.tileAnchorPoint.y,je).point,je.projectionCache.cachedAnchorPoint=Gt);let st,It,Ut=Gt,ir=Gt,dr=0,Ar=0,hr=Math.abs(ut),vr=[],Or;for(;dr+Ar<=hr;){if(Kt+=ft,Kt=Re)return null;dr+=Ar,ir=Ut,It=st;let ka={absOffsetX:hr,direction:ft,distanceFromAnchor:dr,previousVertex:ir};if(Ut=yn(Kt,je,ka),N===0)vr.push(ir),Or=Ut.sub(ir);else{let Ta,Ra=Ut.sub(ir);Ta=Ra.mag()===0?on(yn(Kt+ft,je,ka).sub(Ut),N,ft):on(Ra,N,ft),It||(It=ir.add(Ta)),st=en(Kt,Ta,Ut,be,Re,It,N,je,ka),vr.push(It),Or=st.sub(It)}Ar=Or.mag()}let Cr=Or._mult((hr-dr)/Ar)._add(It||ir),ta=Dt+Math.atan2(Ut.y-ir.y,Ut.x-ir.x);return vr.push(Cr),{point:Cr,angle:Ze?ta:0,path:vr}}let Yi=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ja(pe,y){for(let N=0;N=1;za--)ma.push(ua.path[za]);for(let za=1;zakn.signedDistanceFromCamera<=0)?[]:za.map(kn=>kn.point)}let Fa=[];if(ma.length>0){let za=ma[0].clone(),kn=ma[0].clone();for(let Dn=1;Dn=ka.x&&kn.x<=Ta.x&&za.y>=ka.y&&kn.y<=Ta.y?[ma]:kn.xTa.x||kn.yTa.y?[]:e.aG([ma],ka.x,ka.y,Ta.x,Ta.y)}for(let za of Fa){Ra.reset(za,.25*ta);let kn=0;kn=Ra.length<=.5*ta?1:Math.ceil(Ra.paddedLength/da)+1;for(let Dn=0;Dn{let Ze=Zr(je.x,je.y,Re,be.getElevation),ut=be.transform.projectTileCoordinates(Ze.point.x,Ze.point.y,be.unwrappedTileID,be.getElevation);return ut.point.x=(.5*ut.point.x+.5)*be.width,ut.point.y=(.5*-ut.point.y+.5)*be.height,ut})}(y,N);return function(fe){let be=0,Re=0,je=0,Ze=0;for(let ut=0;utRe&&(Re=Ze,be=je));return fe.slice(be,be+Re)}(ie)}queryRenderedSymbols(y){if(y.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let N=[],ie=new e.a8;for(let Dt of y){let Gt=new e.P(Dt.x+lt,Dt.y+lt);ie.extend(Gt),N.push(Gt)}let{minX:fe,minY:be,maxX:Re,maxY:je}=ie,Ze=this.grid.query(fe,be,Re,je).concat(this.ignoredGrid.query(fe,be,Re,je)),ut={},ft={};for(let Dt of Ze){let Gt=Dt.key;if(ut[Gt.bucketInstanceId]===void 0&&(ut[Gt.bucketInstanceId]={}),ut[Gt.bucketInstanceId][Gt.featureIndex])continue;let Kt=[new e.P(Dt.x1,Dt.y1),new e.P(Dt.x2,Dt.y1),new e.P(Dt.x2,Dt.y2),new e.P(Dt.x1,Dt.y2)];e.aH(N,Kt)&&(ut[Gt.bucketInstanceId][Gt.featureIndex]=!0,ft[Gt.bucketInstanceId]===void 0&&(ft[Gt.bucketInstanceId]=[]),ft[Gt.bucketInstanceId].push(Gt.featureIndex))}return ft}insertCollisionBox(y,N,ie,fe,be,Re){(ie?this.ignoredGrid:this.grid).insert({bucketInstanceId:fe,featureIndex:be,collisionGroupID:Re,overlapMode:N},y[0],y[1],y[2],y[3])}insertCollisionCircles(y,N,ie,fe,be,Re){let je=ie?this.ignoredGrid:this.grid,Ze={bucketInstanceId:fe,featureIndex:be,collisionGroupID:Re,overlapMode:N};for(let ut=0;ut=this.screenRightBoundary||fethis.screenBottomBoundary}isInsideGrid(y,N,ie,fe){return ie>=0&&y=0&&Nthis.projectAndGetPerspectiveRatio(da.x,da.y,fe,ut,Dt));ia=ma.some(da=>!da.isOccluded),ua=ma.map(da=>new e.P(da.x,da.y))}else ia=!0;return{box:e.aI(ua),allPointsOccluded:!ia}}}class fr{constructor(y,N,ie,fe){this.opacity=y?Math.max(0,Math.min(1,y.opacity+(y.placed?N:-N))):fe&&ie?1:0,this.placed=ie}isHidden(){return this.opacity===0&&!this.placed}}class lr{constructor(y,N,ie,fe,be){this.text=new fr(y?y.text:null,N,ie,be),this.icon=new fr(y?y.icon:null,N,fe,be)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Tr{constructor(y,N,ie){this.text=y,this.icon=N,this.skipFade=ie}}class Ir{constructor(y,N,ie,fe,be){this.bucketInstanceId=y,this.featureIndex=N,this.sourceLayerIndex=ie,this.bucketIndex=fe,this.tileID=be}}class Dr{constructor(y){this.crossSourceCollisions=y,this.maxGroupID=0,this.collisionGroups={}}get(y){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[y]){let N=++this.maxGroupID;this.collisionGroups[y]={ID:N,predicate:ie=>ie.collisionGroupID===N}}return this.collisionGroups[y]}}function ot(pe,y,N,ie,fe){let{horizontalAlign:be,verticalAlign:Re}=e.aP(pe);return new e.P(-(be-.5)*y+ie[0]*fe,-(Re-.5)*N+ie[1]*fe)}class kt{constructor(y,N,ie,fe,be){this.transform=y.clone(),this.terrain=N,this.collisionIndex=new rt(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ie,this.retainedQueryData={},this.collisionGroups=new Dr(fe),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=be,be&&(be.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(y){let N=this.terrain;return N?(ie,fe)=>N.getElevation(y,ie,fe):null}getBucketParts(y,N,ie,fe){let be=ie.getBucket(N),Re=ie.latestFeatureIndex;if(!be||!Re||N.id!==be.layerIds[0])return;let je=ie.collisionBoxArray,Ze=be.layers[0].layout,ut=be.layers[0].paint,ft=Math.pow(2,this.transform.zoom-ie.tileID.overscaledZ),Dt=ie.tileSize/e.a6,Gt=ie.tileID.toUnwrapped(),Kt=Ze.get("text-rotation-alignment")==="map",st=e.aK(ie,1,this.transform.zoom),It=e.aL(this.collisionIndex.transform,ie,ut.get("text-translate"),ut.get("text-translate-anchor")),Ut=e.aL(this.collisionIndex.transform,ie,ut.get("icon-translate"),ut.get("icon-translate-anchor")),ir=cr(Kt,this.transform,st);this.retainedQueryData[be.bucketInstanceId]=new Ir(be.bucketInstanceId,Re,be.sourceLayerIndex,be.index,ie.tileID);let dr={bucket:be,layout:Ze,translationText:It,translationIcon:Ut,unwrappedTileID:Gt,pitchedLabelPlaneMatrix:ir,scale:ft,textPixelRatio:Dt,holdingForFade:ie.holdingForSymbolFade(),collisionBoxArray:je,partiallyEvaluatedTextSize:e.aw(be.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(be.sourceID)};if(fe)for(let Ar of be.sortKeyRanges){let{sortKey:hr,symbolInstanceStart:vr,symbolInstanceEnd:Or}=Ar;y.push({sortKey:hr,symbolInstanceStart:vr,symbolInstanceEnd:Or,parameters:dr})}else y.push({symbolInstanceStart:0,symbolInstanceEnd:be.symbolInstances.length,parameters:dr})}attemptAnchorPlacement(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt,st,It,Ut,ir,dr,Ar,hr){var vr,Or,Cr;let ta=e.aM[y.textAnchor],ka=[y.textOffset0,y.textOffset1],Ta=ot(ta,ie,fe,ka,be),Ra=this.collisionIndex.placeCollisionBox(N,Gt,Ze,ut,ft,je,Re,Ut,Dt.predicate,Ar,Ta,hr);if((!dr||this.collisionIndex.placeCollisionBox(dr,Gt,Ze,ut,ft,je,Re,ir,Dt.predicate,Ar,Ta,hr).placeable)&&Ra.placeable){let ua;if(!((vr=this.prevPlacement)===null||vr===void 0)&&vr.variableOffsets[Kt.crossTileID]&&(!((Cr=(Or=this.prevPlacement)===null||Or===void 0?void 0:Or.placements[Kt.crossTileID])===null||Cr===void 0)&&Cr.text)&&(ua=this.prevPlacement.variableOffsets[Kt.crossTileID].anchor),Kt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Kt.crossTileID]={textOffset:ka,width:ie,height:fe,anchor:ta,textBoxScale:be,prevAnchor:ua},this.markUsedJustification(st,ta,Kt,It),st.allowVerticalPlacement&&(this.markUsedOrientation(st,It,Kt),this.placedOrientations[Kt.crossTileID]=It),{shift:Ta,placedGlyphBoxes:Ra}}}placeLayerBucketPart(y,N,ie){let{bucket:fe,layout:be,translationText:Re,translationIcon:je,unwrappedTileID:Ze,pitchedLabelPlaneMatrix:ut,textPixelRatio:ft,holdingForFade:Dt,collisionBoxArray:Gt,partiallyEvaluatedTextSize:Kt,collisionGroup:st}=y.parameters,It=be.get("text-optional"),Ut=be.get("icon-optional"),ir=e.aN(be,"text-overlap","text-allow-overlap"),dr=ir==="always",Ar=e.aN(be,"icon-overlap","icon-allow-overlap"),hr=Ar==="always",vr=be.get("text-rotation-alignment")==="map",Or=be.get("text-pitch-alignment")==="map",Cr=be.get("icon-text-fit")!=="none",ta=be.get("symbol-z-order")==="viewport-y",ka=dr&&(hr||!fe.hasIconData()||Ut),Ta=hr&&(dr||!fe.hasTextData()||It);!fe.collisionArrays&&Gt&&fe.deserializeCollisionBoxes(Gt);let Ra=this.retainedQueryData[fe.bucketInstanceId].tileID,ua=this._getTerrainElevationFunc(Ra),ia=this.transform.getFastPathSimpleProjectionMatrix(Ra),ma=(da,Fa,za)=>{var kn,Dn;if(N[da.crossTileID])return;if(Dt)return void(this.placements[da.crossTileID]=new Tr(!1,!1,!1));let ui=!1,cn=!1,sn=!0,ei=null,Pn={box:null,placeable:!1,offscreen:null,occluded:!1},Rn={placeable:!1},In=null,Jn=null,Ei=null,so=0,ti=0,bi=0;Fa.textFeatureIndex?so=Fa.textFeatureIndex:da.useRuntimeCollisionCircles&&(so=da.featureIndex),Fa.verticalTextFeatureIndex&&(ti=Fa.verticalTextFeatureIndex);let Wi=Fa.textBox;if(Wi){let Bs=es=>{let $o=e.ax.horizontal;if(fe.allowVerticalPlacement&&!es&&this.prevPlacement){let _s=this.prevPlacement.placedOrientations[da.crossTileID];_s&&(this.placedOrientations[da.crossTileID]=_s,$o=_s,this.markUsedOrientation(fe,$o,da))}return $o},So=(es,$o)=>{if(fe.allowVerticalPlacement&&da.numVerticalGlyphVertices>0&&Fa.verticalTextBox){for(let _s of fe.writingModes)if(_s===e.ax.vertical?(Pn=$o(),Rn=Pn):Pn=es(),Pn?.placeable)break}else Pn=es()},Ws=da.textAnchorOffsetStartIndex,Zo=da.textAnchorOffsetEndIndex;if(Zo===Ws){let es=($o,_s)=>{let Go=this.collisionIndex.placeCollisionBox($o,ir,ft,Ra,Ze,Or,vr,Re,st.predicate,ua,void 0,ia);return Go?.placeable&&(this.markUsedOrientation(fe,_s,da),this.placedOrientations[da.crossTileID]=_s),Go};So(()=>es(Wi,e.ax.horizontal),()=>{let $o=Fa.verticalTextBox;return fe.allowVerticalPlacement&&da.numVerticalGlyphVertices>0&&$o?es($o,e.ax.vertical):{box:null,offscreen:null}}),Bs(Pn?.placeable)}else{let es=e.aM[(Dn=(kn=this.prevPlacement)===null||kn===void 0?void 0:kn.variableOffsets[da.crossTileID])===null||Dn===void 0?void 0:Dn.anchor],$o=(Go,Ys,Ll)=>{let mo=Go.x2-Go.x1,ru=Go.y2-Go.y1,Rs=da.textBoxScale,Yu=Cr&&Ar==="never"?Ys:null,Ul=null,ql=ir==="never"?1:2,fo="never";es&&ql++;for(let Xo=0;Xo$o(Wi,Fa.iconBox,e.ax.horizontal),()=>{let Go=Fa.verticalTextBox;return fe.allowVerticalPlacement&&!Pn?.placeable&&da.numVerticalGlyphVertices>0&&Go?$o(Go,Fa.verticalIconBox,e.ax.vertical):{box:null,occluded:!0,offscreen:null}}),Pn&&(ui=Pn.placeable,sn=Pn.offscreen);let _s=Bs(Pn?.placeable);if(!ui&&this.prevPlacement){let Go=this.prevPlacement.variableOffsets[da.crossTileID];Go&&(this.variableOffsets[da.crossTileID]=Go,this.markUsedJustification(fe,Go.anchor,da,_s))}}}if(In=Pn,ui=In?.placeable,sn=In?.offscreen,da.useRuntimeCollisionCircles&&da.centerJustifiedTextSymbolIndex>=0){let Bs=fe.text.placedSymbolArray.get(da.centerJustifiedTextSymbolIndex),So=e.ay(fe.textSizeData,Kt,Bs),Ws=be.get("text-padding");Jn=this.collisionIndex.placeCollisionCircles(ir,Bs,fe.lineVertexArray,fe.glyphOffsetArray,So,Ze,ut,ie,Or,st.predicate,da.collisionCircleDiameter,Ws,Re,ua),Jn.circles.length&&Jn.collisionDetected&&!ie&&e.w("Collisions detected, but collision boxes are not shown"),ui=dr||Jn.circles.length>0&&!Jn.collisionDetected,sn&&(sn=Jn.offscreen)}if(Fa.iconFeatureIndex&&(bi=Fa.iconFeatureIndex),Fa.iconBox){let Bs=So=>this.collisionIndex.placeCollisionBox(So,Ar,ft,Ra,Ze,Or,vr,je,st.predicate,ua,Cr&&ei?ei:void 0,ia);Rn&&Rn.placeable&&Fa.verticalIconBox?(Ei=Bs(Fa.verticalIconBox),cn=Ei.placeable):(Ei=Bs(Fa.iconBox),cn=Ei.placeable),sn&&(sn=Ei.offscreen)}let ro=It||da.numHorizontalGlyphVertices===0&&da.numVerticalGlyphVertices===0,Mo=Ut||da.numIconVertices===0;ro||Mo?Mo?ro||cn&&(cn=ui):ui=cn&&ui:cn=ui=cn&&ui;let zs=cn&&Ei.placeable;if(ui&&In.placeable&&this.collisionIndex.insertCollisionBox(In.box,ir,be.get("text-ignore-placement"),fe.bucketInstanceId,Rn&&Rn.placeable&&ti?ti:so,st.ID),zs&&this.collisionIndex.insertCollisionBox(Ei.box,Ar,be.get("icon-ignore-placement"),fe.bucketInstanceId,bi,st.ID),Jn&&ui&&this.collisionIndex.insertCollisionCircles(Jn.circles,ir,be.get("text-ignore-placement"),fe.bucketInstanceId,so,st.ID),ie&&this.storeCollisionData(fe.bucketInstanceId,za,Fa,In,Ei,Jn),da.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(fe.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[da.crossTileID]=new Tr((ui||ka)&&!In?.occluded,(cn||Ta)&&!Ei?.occluded,sn||fe.justReloaded),N[da.crossTileID]=!0};if(ta){if(y.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let da=fe.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let Fa=da.length-1;Fa>=0;--Fa){let za=da[Fa];ma(fe.symbolInstances.get(za),fe.collisionArrays[za],za)}}else for(let da=y.symbolInstanceStart;da=0&&(y.text.placedSymbolArray.get(je).crossTileID=be>=0&&je!==be?0:ie.crossTileID)}markUsedOrientation(y,N,ie){let fe=N===e.ax.horizontal||N===e.ax.horizontalOnly?N:0,be=N===e.ax.vertical?N:0,Re=[ie.leftJustifiedTextSymbolIndex,ie.centerJustifiedTextSymbolIndex,ie.rightJustifiedTextSymbolIndex];for(let je of Re)y.text.placedSymbolArray.get(je).placedOrientation=fe;ie.verticalPlacedTextSymbolIndex&&(y.text.placedSymbolArray.get(ie.verticalPlacedTextSymbolIndex).placedOrientation=be)}commit(y){this.commitTime=y,this.zoomAtLastRecencyCheck=this.transform.zoom;let N=this.prevPlacement,ie=!1;this.prevZoomAdjustment=N?N.zoomAdjustment(this.transform.zoom):0;let fe=N?N.symbolFadeChange(y):1,be=N?N.opacities:{},Re=N?N.variableOffsets:{},je=N?N.placedOrientations:{};for(let Ze in this.placements){let ut=this.placements[Ze],ft=be[Ze];ft?(this.opacities[Ze]=new lr(ft,fe,ut.text,ut.icon),ie||(ie=ut.text!==ft.text.placed),ie||(ie=ut.icon!==ft.icon.placed)):(this.opacities[Ze]=new lr(null,fe,ut.text,ut.icon,ut.skipFade),ie||(ie=ut.text||ut.icon))}for(let Ze in be){let ut=be[Ze];if(!this.opacities[Ze]){let ft=new lr(ut,fe,!1,!1);ft.isHidden()||(this.opacities[Ze]=ft,ie||(ie=ut.text.placed),ie||(ie=ut.icon.placed))}}for(let Ze in Re)this.variableOffsets[Ze]||!this.opacities[Ze]||this.opacities[Ze].isHidden()||(this.variableOffsets[Ze]=Re[Ze]);for(let Ze in je)this.placedOrientations[Ze]||!this.opacities[Ze]||this.opacities[Ze].isHidden()||(this.placedOrientations[Ze]=je[Ze]);if(N&&N.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");ie?this.lastPlacementChangeTime=y:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=N?N.lastPlacementChangeTime:y)}updateLayerOpacities(y,N){let ie={};for(let fe of N){let be=fe.getBucket(y);be&&fe.latestFeatureIndex&&y.id===be.layerIds[0]&&this.updateBucketOpacities(be,fe.tileID,ie,fe.collisionBoxArray)}}updateBucketOpacities(y,N,ie,fe){y.hasTextData()&&(y.text.opacityVertexArray.clear(),y.text.hasVisibleVertices=!1),y.hasIconData()&&(y.icon.opacityVertexArray.clear(),y.icon.hasVisibleVertices=!1),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexArray.clear(),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexArray.clear();let be=y.layers[0],Re=be.layout,je=new lr(null,0,!1,!1,!0),Ze=Re.get("text-allow-overlap"),ut=Re.get("icon-allow-overlap"),ft=be._unevaluatedLayout.hasValue("text-variable-anchor")||be._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Dt=Re.get("text-rotation-alignment")==="map",Gt=Re.get("text-pitch-alignment")==="map",Kt=Re.get("icon-text-fit")!=="none",st=new lr(null,0,Ze&&(ut||!y.hasIconData()||Re.get("icon-optional")),ut&&(Ze||!y.hasTextData()||Re.get("text-optional")),!0);!y.collisionArrays&&fe&&(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData())&&y.deserializeCollisionBoxes(fe);let It=(ir,dr,Ar)=>{for(let hr=0;hr0,ta=this.placedOrientations[dr.crossTileID],ka=ta===e.ax.vertical,Ta=ta===e.ax.horizontal||ta===e.ax.horizontalOnly;if(Ar>0||hr>0){let ua=wa(Or.text);It(y.text,Ar,ka?pn:ua),It(y.text,hr,Ta?pn:ua);let ia=Or.text.isHidden(),ma=[dr.rightJustifiedTextSymbolIndex,dr.centerJustifiedTextSymbolIndex,dr.leftJustifiedTextSymbolIndex];for(let za of ma)za>=0&&(y.text.placedSymbolArray.get(za).hidden=ia||ka?1:0);dr.verticalPlacedTextSymbolIndex>=0&&(y.text.placedSymbolArray.get(dr.verticalPlacedTextSymbolIndex).hidden=ia||Ta?1:0);let da=this.variableOffsets[dr.crossTileID];da&&this.markUsedJustification(y,da.anchor,dr,ta);let Fa=this.placedOrientations[dr.crossTileID];Fa&&(this.markUsedJustification(y,"left",dr,Fa),this.markUsedOrientation(y,Fa,dr))}if(Cr){let ua=wa(Or.icon),ia=!(Kt&&dr.verticalPlacedIconSymbolIndex&&ka);dr.placedIconSymbolIndex>=0&&(It(y.icon,dr.numIconVertices,ia?ua:pn),y.icon.placedSymbolArray.get(dr.placedIconSymbolIndex).hidden=Or.icon.isHidden()),dr.verticalPlacedIconSymbolIndex>=0&&(It(y.icon,dr.numVerticalIconVertices,ia?pn:ua),y.icon.placedSymbolArray.get(dr.verticalPlacedIconSymbolIndex).hidden=Or.icon.isHidden())}let Ra=Ut?.has(ir)?Ut.get(ir):{text:null,icon:null};if(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData()){let ua=y.collisionArrays[ir];if(ua){let ia=new e.P(0,0);if(ua.textBox||ua.verticalTextBox){let ma=!0;if(ft){let da=this.variableOffsets[vr];da?(ia=ot(da.anchor,da.width,da.height,da.textOffset,da.textBoxScale),Dt&&ia._rotate(Gt?-this.transform.bearingInRadians:this.transform.bearingInRadians)):ma=!1}if(ua.textBox||ua.verticalTextBox){let da;ua.textBox&&(da=ka),ua.verticalTextBox&&(da=Ta),jt(y.textCollisionBox.collisionVertexArray,Or.text.placed,!ma||da,Ra.text,ia.x,ia.y)}}if(ua.iconBox||ua.verticalIconBox){let ma=!!(!Ta&&ua.verticalIconBox),da;ua.iconBox&&(da=ma),ua.verticalIconBox&&(da=!ma),jt(y.iconCollisionBox.collisionVertexArray,Or.icon.placed,da,Ra.icon,Kt?ia.x:0,Kt?ia.y:0)}}}}if(y.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[y.bucketInstanceId]&&(this.retainedQueryData[y.bucketInstanceId].featureSortOrder=y.featureSortOrder),y.hasTextData()&&y.text.opacityVertexBuffer&&y.text.opacityVertexBuffer.updateData(y.text.opacityVertexArray),y.hasIconData()&&y.icon.opacityVertexBuffer&&y.icon.opacityVertexBuffer.updateData(y.icon.opacityVertexArray),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexBuffer&&y.iconCollisionBox.collisionVertexBuffer.updateData(y.iconCollisionBox.collisionVertexArray),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexBuffer&&y.textCollisionBox.collisionVertexBuffer.updateData(y.textCollisionBox.collisionVertexArray),y.text.opacityVertexArray.length!==y.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${y.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${y.text.layoutVertexArray.length}) / 4`);if(y.icon.opacityVertexArray.length!==y.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${y.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${y.icon.layoutVertexArray.length}) / 4`);y.bucketInstanceId in this.collisionCircleArrays&&(y.collisionCircleArray=this.collisionCircleArrays[y.bucketInstanceId],delete this.collisionCircleArrays[y.bucketInstanceId])}symbolFadeChange(y){return this.fadeDuration===0?1:(y-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(y){return Math.max(0,(this.transform.zoom-y)/1.5)}hasTransitions(y){return this.stale||y-this.lastPlacementChangeTimey}setStale(){this.stale=!0}}function jt(pe,y,N,ie,fe,be){ie&&ie.length!==0||(ie=[0,0,0,0]);let Re=ie[0]-lt,je=ie[1]-lt,Ze=ie[2]-lt,ut=ie[3]-lt;pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Re,je),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Ze,je),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Ze,ut),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Re,ut)}let ar=Math.pow(2,25),Er=Math.pow(2,24),xr=Math.pow(2,17),zr=Math.pow(2,16),Lr=Math.pow(2,9),aa=Math.pow(2,8),Sa=Math.pow(2,1);function wa(pe){if(pe.opacity===0&&!pe.placed)return 0;if(pe.opacity===1&&pe.placed)return 4294967295;let y=pe.placed?1:0,N=Math.floor(127*pe.opacity);return N*ar+y*Er+N*xr+y*zr+N*Lr+y*aa+N*Sa+y}let pn=0;class tn{constructor(y){this._sortAcrossTiles=y.layout.get("symbol-z-order")!=="viewport-y"&&!y.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(y,N,ie,fe,be){let Re=this._bucketParts;for(;this._currentTileIndexje.sortKey-Ze.sortKey));this._currentPartIndex!this._forceFullPlacement&&g()-fe>2;for(;this._currentPlacementIndex>=0;){let Re=N[y[this._currentPlacementIndex]],je=this.placement.collisionIndex.transform.zoom;if(e.aQ(Re)&&Re.layout&&(!Re.minzoom||Re.minzoom<=je)&&(!Re.maxzoom||Re.maxzoom>je)){if(this._inProgressLayer||(this._inProgressLayer=new tn(Re)),this._inProgressLayer.continuePlacement(ie[Re.source],this.placement,this._showCollisionBoxes,Re,be))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(y){return this.placement.commit(y),this.placement}}let rn=512/e.a6/2;class Ri{constructor(y,N,ie){this.tileID=y,this.bucketInstanceId=ie,this._symbolsByKey={};let fe=new Map;for(let be=0;be({x:Math.floor(Ze.anchorX*rn),y:Math.floor(Ze.anchorY*rn)})),crossTileIDs:Re.map(Ze=>Ze.crossTileID)};if(je.positions.length>128){let Ze=new e.aR(je.positions.length,16,Uint16Array);for(let{x:ut,y:ft}of je.positions)Ze.add(ut,ft);Ze.finish(),delete je.positions,je.index=Ze}this._symbolsByKey[be]=je}}getScaledCoordinates(y,N){let{x:ie,y:fe,z:be}=this.tileID.canonical,{x:Re,y:je,z:Ze}=N.canonical,ut=rn/Math.pow(2,Ze-be),ft=(je*e.a6+y.anchorY)*ut,Dt=fe*e.a6*rn;return{x:Math.floor((Re*e.a6+y.anchorX)*ut-ie*e.a6*rn),y:Math.floor(ft-Dt)}}findMatches(y,N,ie){let fe=this.tileID.canonical.zy)}}class Gn{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class no{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(y){let N=Math.round((y-this.lng)/360);if(N!==0)for(let ie in this.indexes){let fe=this.indexes[ie],be={};for(let Re in fe){let je=fe[Re];je.tileID=je.tileID.unwrapTo(je.tileID.wrap+N),be[je.tileID.key]=je}this.indexes[ie]=be}this.lng=y}addBucket(y,N,ie){var fe,be,Re;if(!((fe=this.indexes[y.overscaledZ])===null||fe===void 0)&&fe[y.key]){if(this.indexes[y.overscaledZ][y.key].bucketInstanceId===N.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(y.overscaledZ,this.indexes[y.overscaledZ][y.key])}for(let Ze=0;Zey.overscaledZ)for(let ft in ut){let Dt=ut[ft];Dt.tileID.isChildOf(y)&&Dt.findMatches(N.symbolInstances,y,je)}else{let ft=ut[y.scaledTo(Number(Ze)).key];ft&&ft.findMatches(N.symbolInstances,y,je)}}for(let Ze=0;Ze180?-360:N<-180?360:0}function qn(pe){return Math.max(0,Math.floor(pe))}class Hi{constructor(y,N){var ie;this.applyConstrain=(fe,be)=>this._constrainOverride!==null?this._constrainOverride(fe,be):this._callbacks.defaultConstrain(fe,be),this._callbacks=y,this._tileSize=512,this._renderWorldCopies=N?.renderWorldCopies===void 0||!!N?.renderWorldCopies,this._minZoom=N?.minZoom||0,this._maxZoom=N?.maxZoom||22,this._minPitch=N?.minPitch==null?0:N?.minPitch,this._maxPitch=N?.maxPitch==null?60:N?.maxPitch,this._constrainOverride=(ie=N?.constrainOverride)!==null&&ie!==void 0?ie:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new e.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=qn(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new oo,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(y,N,ie){this._constrainOverride=y.constrainOverride,this._latRange=y.latRange,this._lngRange=y.lngRange,this._width=y.width,this._height=y.height,this._center=y.center,this._elevation=y.elevation,this._minElevationForCurrentTile=y.minElevationForCurrentTile,this._zoom=y.zoom,this._tileZoom=qn(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=y.bearingInRadians,this._fovInRadians=y.fovInRadians,this._pitchInRadians=y.pitchInRadians,this._rollInRadians=y.rollInRadians,this._unmodified=y.unmodified,this._edgeInsets=new oo(y.padding.top,y.padding.bottom,y.padding.left,y.padding.right),this._minZoom=y.minZoom,this._maxZoom=y.maxZoom,this._minPitch=y.minPitch,this._maxPitch=y.maxPitch,this._renderWorldCopies=y.renderWorldCopies,this._cameraToCenterDistance=y.cameraToCenterDistance,this._nearZ=y.nearZ,this._farZ=y.farZ,this._autoCalculateNearFarZ=!ie&&y.autoCalculateNearFarZ,N&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(y){this._minElevationForCurrentTile=y}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(y){this._minZoom!==y&&(this._minZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(y){this._maxZoom!==y&&(this._maxZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(y){this._minPitch!==y&&(this._minPitch=y,this.setPitch(Math.max(this.pitch,y)))}get maxPitch(){return this._maxPitch}setMaxPitch(y){this._maxPitch!==y&&(this._maxPitch=y,this.setPitch(Math.min(this.pitch,y)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(y){y===void 0?y=!0:y===null&&(y=!1),this._renderWorldCopies=y}get constrainOverride(){return this._constrainOverride}setConstrainOverride(y){y===void 0&&(y=null),this._constrainOverride!==y&&(this._constrainOverride=y,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(y){let N=e.X(y,-180,180)*Math.PI/180;var ie,fe,be,Re,je,Ze,ut,ft,Dt;this._bearingInRadians!==N&&(this._unmodified=!1,this._bearingInRadians=N,this._calcMatrices(),this._rotationMatrix=n(),ie=this._rotationMatrix,be=-this._bearingInRadians,Re=(fe=this._rotationMatrix)[0],je=fe[1],Ze=fe[2],ut=fe[3],ft=Math.sin(be),Dt=Math.cos(be),ie[0]=Re*Dt+Ze*ft,ie[1]=je*Dt+ut*ft,ie[2]=Re*-ft+Ze*Dt,ie[3]=je*-ft+ut*Dt)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(y){let N=e.al(y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==N&&(this._unmodified=!1,this._pitchInRadians=N,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(y){let N=y/180*Math.PI;this._rollInRadians!==N&&(this._unmodified=!1,this._rollInRadians=N,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return e.aX(this._fovInRadians)}setFov(y){y=e.al(y,.1,150),this.fov!==y&&(this._unmodified=!1,this._fovInRadians=e.an(y),this._calcMatrices())}get zoom(){return this._zoom}setZoom(y){let N=this.applyConstrain(this._center,y).zoom;this._zoom!==N&&(this._unmodified=!1,this._zoom=N,this._tileZoom=Math.max(0,Math.floor(N)),this._scale=e.ao(N),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(y){y.lat===this._center.lat&&y.lng===this._center.lng||(this._unmodified=!1,this._center=y,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(y){y!==this._elevation&&(this._elevation=y,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(y){this._edgeInsets.equals(y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,y,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(y,N){this._autoCalculateNearFarZ=!1,this._nearZ=y,this._farZ=N,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(y){return this._edgeInsets.equals(y)}interpolatePadding(y,N,ie){this._unmodified=!1,this._edgeInsets.interpolate(y,N,ie),this.constrainInternal(),this._calcMatrices()}resize(y,N,ie=!0){this._width=y,this._height=N,ie&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var y,N;return((y=this._latRange)===null||y===void 0?void 0:y.length)!==2||((N=this._lngRange)===null||N===void 0?void 0:N.length)!==2?null:new q([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(y){y?(this._lngRange=[y.getWest(),y.getEast()],this._latRange=[y.getSouth(),y.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-e.am,e.am])}getCameraQueryGeometry(y,N){if(N.length===1)return[N[0],y];{let{minX:ie,minY:fe,maxX:be,maxY:Re}=e.a8.fromPoints(N).extend(y);return[new e.P(ie,fe),new e.P(be,fe),new e.P(be,Re),new e.P(ie,Re),new e.P(ie,fe)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let y=this._unmodified,{center:N,zoom:ie}=this.applyConstrain(this.center,this.zoom);this.setCenter(N),this.setZoom(ie),this._unmodified=y,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let y=e.ap(new Float64Array(16));e.S(y,y,[this._width/2,-this._height/2,1]),e.Q(y,y,[1,-1,0]),this._clipSpaceToPixelsMatrix=y,y=e.ap(new Float64Array(16)),e.S(y,y,[1,-1,1]),e.Q(y,y,[-1,-1,0]),e.S(y,y,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=y,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){let be=ie!==void 0?ie:this.bearing,Re=fe=fe!==void 0?fe:this.pitch,{distanceToCenter:je,clampedElevation:Ze}=this._distanceToCenterFromAltElevationPitch(N,this.elevation,Re),{x:ut,y:ft}=vt(Re,be),Dt=e.a7.fromLngLat(y,N),Gt,Kt,st=e.aY(1,Dt.y),It=0;do{if(It+=1,It>10)break;Kt=je/st,Gt=new e.a7(Dt.x+ut*Kt,Dt.y+ft*Kt),st=1/Gt.meterInMercatorCoordinateUnits()}while(Math.abs(je-Kt*st)>1e-12);return{center:Gt.toLngLat(),elevation:Ze,zoom:e.ar(this.height/2/Math.tan(this.fovInRadians/2)/Kt/this.tileSize)}}recalculateZoomAndCenter(y){if(this.elevation-y==0)return;let N=1/this.worldSize,ie=e.aq(1,this.center.lat)*this.worldSize,fe=e.a7.fromLngLat(this.center,this.elevation),be=fe.x/N,Re=fe.y/N,je=fe.z/N,Ze=this.pitch,ut=this.bearing,{x:ft,y:Dt,z:Gt}=vt(Ze,ut),Kt=this.cameraToCenterDistance,st=be+Kt*-ft,It=Re+Kt*-Dt,Ut=je+Kt*Gt,{distanceToCenter:ir,clampedElevation:dr}=this._distanceToCenterFromAltElevationPitch(Ut/ie,y,Ze),Ar=ir*ie,hr=new e.a7((st+ft*Ar)*N,(It+Dt*Ar)*N,0).toLngLat(),vr=e.aq(1,hr.lat),Or=e.ar(this.height/2/Math.tan(this.fovInRadians/2)/ir/vr/this.tileSize);this._elevation=dr,this._center=hr,this.setZoom(Or)}_distanceToCenterFromAltElevationPitch(y,N,ie){let fe=-Math.cos(e.an(ie)),be=y-N,Re,je=N;return fe*be>=0||Math.abs(fe)<.1?(Re=1e4,je=y+Re*fe):Re=-be/fe,{distanceToCenter:Re,clampedElevation:je}}getCameraPoint(){let y=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(y*Math.sin(this.rollInRadians),y*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/y).toLngLat()}getMercatorTileCoordinates(y){if(!y)return[0,0,1,1];let N=y.canonical.z>=0?1<this.max[0]||y.aabb.min[1]>this.max[1]||y.aabb.min[2]>this.max[2]||y.aabb.max[0]0?(N+=y[fe]*this.min[fe],ie+=y[fe]*this.max[fe]):(ie+=y[fe]*this.min[fe],N+=y[fe]*this.max[fe]);return N>=0?2:ie<0?0:1}}class Ro{distanceToTile2d(y,N,ie,fe){let be=fe,Re=be.distanceX([y,N]),je=be.distanceY([y,N]);return Math.hypot(Re,je)}getWrap(y,N,ie){return ie}getTileBoundingVolume(y,N,ie,fe){var be,Re;let je=0,Ze=0;if(fe?.terrain){let ft=new e.a3(y.z,N,y.z,y.x,y.y),Dt=fe.terrain.getMinMaxElevation(ft);je=(be=Dt.minElevation)!==null&&be!==void 0?be:Math.min(0,ie),Ze=(Re=Dt.maxElevation)!==null&&Re!==void 0?Re:Math.max(0,ie)}let ut=1<fe}allowWorldCopies(){return!0}prepareNextFrame(){}}class go{constructor(y,N,ie){this.points=y,this.planes=N,this.aabb=ie}static fromInvProjectionMatrix(y,N=1,ie=0,fe,be){let Re=be?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],je=Math.pow(2,ie),Ze=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Gt=>function(Kt,st,It,Ut){let ir=e.aE([],Kt,st),dr=1/ir[3]/It*Ut;return e.b4(ir,ir,[dr,dr,1/ir[3],dr])}(Gt,y,N,je));fe&&function(Gt,Kt,st,It){let Ut=It?4:0,ir=It?0:4,dr=0,Ar=[],hr=[];for(let Cr=0;Cr<4;Cr++){let ta=e.b0([],Gt[Cr+ir],Gt[Cr+Ut]),ka=e.b5(ta);e.aZ(ta,ta,1/ka),Ar.push(ka),hr.push(ta)}for(let Cr=0;Cr<4;Cr++){let ta=e.b6(Gt[Cr+Ut],hr[Cr],st);dr=ta!==null&&ta>=0?Math.max(dr,ta):Math.max(dr,Ar[Cr])}let vr=function(Cr,ta){let ka=e.b0([],Cr[ta[0]],Cr[ta[1]]),Ta=e.b0([],Cr[ta[2]],Cr[ta[1]]),Ra=[0,0,0,0];return e.b1(Ra,e.b2([],ka,Ta)),Ra[3]=-e.b3(Ra,Cr[ta[0]]),Ra}(Gt,Kt),Or=function(Cr,ta){let ka=e.b7(Cr),Ta=e.b8([],Cr,1/ka),Ra=e.b0([],ta,e.aZ([],Ta,e.b3(ta,Ta))),ua=e.b7(Ra);if(ua>0){let ia=Math.sqrt(1-Ta[3]*Ta[3]),ma=e.aZ([],Ta,-Ta[3]),da=e.a_([],ma,e.aZ([],Ra,ia/ua));return e.b9(ta,da)}return null}(st,vr);if(Or!==null){let Cr=Or/e.b3(hr[0],vr);dr=Math.min(dr,Cr)}for(let Cr=0;Cr<4;Cr++){let ta=Math.min(dr,Ar[Cr]);Gt[Cr+ir]=[Gt[Cr+Ut][0]+hr[Cr][0]*ta,Gt[Cr+Ut][1]+hr[Cr][1]*ta,Gt[Cr+Ut][2]+hr[Cr][2]*ta,1]}}(Ze,Re[0],fe,be);let ut=Re.map(Gt=>{let Kt=e.b0([],Ze[Gt[0]],Ze[Gt[1]]),st=e.b0([],Ze[Gt[2]],Ze[Gt[1]]),It=e.b1([],e.b2([],Kt,st)),Ut=-e.b3(It,Ze[Gt[1]]);return It.concat(Ut)}),ft=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],Dt=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let Gt of Ze)for(let Kt=0;Kt<3;Kt++)ft[Kt]=Math.min(ft[Kt],Gt[Kt]),Dt[Kt]=Math.max(Dt[Kt],Gt[Kt]);return new go(Ze,ut,new Mi(ft,Dt))}}class Eo{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,N,ie){this._helper.interpolatePadding(y,N,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,N,ie=!0){this._helper.resize(y,N,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,N){this._helper.overrideNearFarZ(y,N)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(y,N){}constructor(y){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(N,ie)=>{ie=e.al(+ie,this.minZoom,this.maxZoom);let fe={center:new e.W(N.lng,N.lat),zoom:ie},be=this._helper._lngRange;if(!this._helper._renderWorldCopies&&be===null){let hr=179.9999999999;be=[-hr,hr]}let Re=this.tileSize*e.ao(fe.zoom),je=0,Ze=Re,ut=0,ft=Re,Dt=0,Gt=0,{x:Kt,y:st}=this.size;if(this._helper._latRange){let hr=this._helper._latRange;je=e.Y(hr[1])*Re,Ze=e.Y(hr[0])*Re,Ze-jeZe&&(dr=Ze-hr)}if(be){let hr=(ut+ft)/2,vr=It;this._helper._renderWorldCopies&&(vr=e.X(It,hr-Re/2,hr+Re/2));let Or=Kt/2;vr-Orft&&(ir=ft-Or)}if(ir!==void 0||dr!==void 0){let hr=new e.P(ir??It,dr??Ut);fe.center=_r(Re,hr).wrap()}return fe},this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._coveringTilesDetailsProvider=new Ro}clone(){let y=new Eo;return y.apply(this,!1),y}apply(y,N,ie){this._helper.apply(y,N,ie)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(y){let N=[new e.ba(0,y)];if(this._helper._renderWorldCopies){let ie=this.screenPointToMercatorCoordinate(new e.P(0,0)),fe=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,0)),be=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,this._helper._height)),Re=this.screenPointToMercatorCoordinate(new e.P(0,this._helper._height)),je=Math.floor(Math.min(ie.x,fe.x,be.x,Re.x)),Ze=Math.floor(Math.max(ie.x,fe.x,be.x,Re.x)),ut=1;for(let ft=je-ut;ft<=Ze+ut;ft++)ft!==0&&N.push(new e.ba(ft,y))}return N}getCameraFrustum(){return go.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(y){let N=this.screenPointToLocation(this.centerPoint,y),ie=y?y.getElevationForLngLatZoom(N,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(ie)}setLocationAtPoint(y,N){let ie=e.aq(this.elevation,this.center.lat),fe=this.screenPointToMercatorCoordinateAtZ(N,ie),be=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,ie),Re=e.a7.fromLngLat(y),je=new e.a7(Re.x-(fe.x-be.x),Re.y-(fe.y-be.y));this.setCenter(je?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(y,N){return N?this.coordinatePoint(e.a7.fromLngLat(y),N.getElevationForLngLat(y,this),this._pixelMatrix3D):this.coordinatePoint(e.a7.fromLngLat(y))}screenPointToLocation(y,N){var ie;return(ie=this.screenPointToMercatorCoordinate(y,N))===null||ie===void 0?void 0:ie.toLngLat()}screenPointToMercatorCoordinate(y,N){if(N){let ie=N.pointCoordinate(y);if(ie!=null)return ie}return this.screenPointToMercatorCoordinateAtZ(y)}screenPointToMercatorCoordinateAtZ(y,N){let ie=N||0,fe=[y.x,y.y,0,1],be=[y.x,y.y,1,1];e.aE(fe,fe,this._pixelMatrixInverse),e.aE(be,be,this._pixelMatrixInverse);let Re=fe[3],je=be[3],Ze=fe[1]/Re,ut=be[1]/je,ft=fe[2]/Re,Dt=be[2]/je,Gt=ft===Dt?0:(ie-ft)/(Dt-ft);return new e.a7(e.H.number(fe[0]/Re,be[0]/je,Gt)/this.worldSize,e.H.number(Ze,ut,Gt)/this.worldSize,ie)}coordinatePoint(y,N=0,ie=this._pixelMatrix){let fe=[y.x*this.worldSize,y.y*this.worldSize,N,1];return e.aE(fe,fe,ie),new e.P(fe[0]/fe[3],fe[1]/fe[3])}getBounds(){let y=Math.max(0,this._helper._height/2-Xt(this));return new q().extend(this.screenPointToLocation(new e.P(0,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new e.P(0,this._helper._height)))}isPointOnMapSurface(y,N){return N?N.pointCoordinate(y)!=null:y.y>this.height/2-Xt(this)}calculatePosMatrix(y,N=!1,ie){var fe;let be=(fe=y.key)!==null&&fe!==void 0?fe:e.bb(y.wrap,y.canonical.z,y.canonical.z,y.canonical.x,y.canonical.y),Re=N?this._alignedPosMatrixCache:this._posMatrixCache;if(Re.has(be)){let ut=Re.get(be);return ie?ut.f32:ut.f64}let je=or(y,this.worldSize);e.U(je,N?this._alignedProjMatrix:this._viewProjMatrix,je);let Ze={f64:je,f32:new Float32Array(je)};return Re.set(be,Ze),ie?Ze.f32:Ze.f64}calculateFogMatrix(y){let N=y.key,ie=this._fogMatrixCacheF32;if(ie.has(N))return ie.get(N);let fe=or(y,this.worldSize);return e.U(fe,this._fogMatrix,fe),ie.set(N,new Float32Array(fe)),ie.get(N)}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}_calculateNearFarZIfNeeded(y,N,ie){if(!this._helper.autoCalculateNearFarZ)return;let fe=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),be=y-fe*this._helper._pixelPerMeter/Math.cos(N),Re=fe<0?be:y,je=Math.PI/2+this.pitchInRadians,Ze=e.an(this.fov)*(Math.abs(Math.cos(e.an(this.roll)))*this.height+Math.abs(Math.sin(e.an(this.roll)))*this.width)/this.height*(.5+ie.y/this.height),ut=Math.sin(Ze)*Re/Math.sin(e.al(Math.PI-je-Ze,.01,Math.PI-.01)),ft=Xt(this),Dt=Math.atan(ft/this._helper.cameraToCenterDistance),Gt=e.an(.75),Kt=Dt>Gt?2*Dt*(.5+ie.y/(2*ft)):Gt,st=Math.sin(Kt)*Re/Math.sin(e.al(Math.PI-je-Kt,.01,Math.PI-.01)),It=Math.min(ut,st);this._helper._farZ=1.01*(Math.cos(Math.PI/2-N)*It+Re),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let y=this.centerOffset,N=rr(this.worldSize,this.center),ie=N.x,fe=N.y;this._helper._pixelPerMeter=e.aq(1,this.center.lat)*this.worldSize;let be=e.an(Math.min(this.pitch,$t)),Re=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(be)),je;var Ze,ut;this._calculateNearFarZIfNeeded(Re,be,y),je=new Float64Array(16),e.bc(je,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(Ze=this._invProjMatrix)[0]=1/(ut=je)[0],Ze[1]=0,Ze[2]=0,Ze[3]=0,Ze[4]=0,Ze[5]=1/ut[5],Ze[6]=0,Ze[7]=0,Ze[8]=0,Ze[9]=0,Ze[10]=0,Ze[11]=1/ut[14],Ze[12]=0,Ze[13]=0,Ze[14]=-1,Ze[15]=ut[10]/ut[14],je[8]=2*-y.x/this._helper._width,je[9]=2*y.y/this._helper._height,this._projectionMatrix=e.bd(je),e.S(je,je,[1,-1,1]),e.Q(je,je,[0,0,-this._helper.cameraToCenterDistance]),e.be(je,je,-this.rollInRadians),e.bf(je,je,this.pitchInRadians),e.be(je,je,-this.bearingInRadians),e.Q(je,je,[-ie,-fe,0]),this._mercatorMatrix=e.S([],je,[this.worldSize,this.worldSize,this.worldSize]),e.S(je,je,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,je),e.Q(je,je,[0,0,-this.elevation]),this._viewProjMatrix=je,this._invViewProjMatrix=e.bg([],je);let ft=[0,0,-1,1];e.aE(ft,ft,this._invViewProjMatrix),this._cameraPosition=[ft[0]/ft[3],ft[1]/ft[3],ft[2]/ft[3]],this._fogMatrix=new Float64Array(16),e.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,Re,this._helper._farZ),this._fogMatrix[8]=2*-y.x/this.width,this._fogMatrix[9]=2*y.y/this.height,e.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),e.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),e.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),e.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),e.Q(this._fogMatrix,this._fogMatrix,[-ie,-fe,0]),e.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,je);let Dt=this._helper._width%2/2,Gt=this._helper._height%2/2,Kt=Math.cos(this.bearingInRadians),st=Math.sin(-this.bearingInRadians),It=ie-Math.round(ie)+Kt*Dt+st*Gt,Ut=fe-Math.round(fe)+Kt*Gt+st*Dt,ir=new Float64Array(je);if(e.Q(ir,ir,[It>.5?It-1:It,Ut>.5?Ut-1:Ut,0]),this._alignedProjMatrix=ir,je=e.bg(new Float64Array(16),this._pixelMatrix),!je)throw new Error("failed to invert matrix");this._pixelMatrixInverse=je,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let y=this.screenPointToMercatorCoordinate(new e.P(0,0)),N=[y.x*this.worldSize,y.y*this.worldSize,0,1];return e.aE(N,N,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/y).toLngLat()}lngLatToCameraDepth(y,N){let ie=e.a7.fromLngLat(y),fe=[ie.x*this.worldSize,ie.y*this.worldSize,N,1];return e.aE(fe,fe,this._viewProjMatrix),fe[2]/fe[3]}getProjectionData(y){let{overscaledTileID:N,aligned:ie,applyTerrainMatrix:fe}=y,be=this._helper.getMercatorTileCoordinates(N),Re=N?this.calculatePosMatrix(N,ie,!0):null,je;return je=N?.terrainRttPosMatrix32f&&fe?N.terrainRttPosMatrix32f:Re||e.bh(),{mainMatrix:je,tileMercatorCoords:be,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:je}}isLocationOccluded(y){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(y,N,ie){return 1}transformLightDirection(y){return e.a$(y)}getRayDirectionFromPixel(y){throw new Error("Not implemented.")}projectTileCoordinates(y,N,ie,fe){let be=this.calculatePosMatrix(ie),Re;fe?(Re=[y,N,fe(y,N),1],e.aE(Re,Re,be)):(Re=[y,N,0,1],Oa(Re,Re,be));let je=Re[3];return{point:new e.P(Re[0]/je,Re[1]/je),signedDistanceFromCamera:je,isOccluded:!1}}populateCache(y){for(let N of y)this.calculatePosMatrix(N)}getMatrixForModel(y,N){let ie=e.a7.fromLngLat(y,N),fe=ie.meterInMercatorCoordinateUnits(),be=e.bi();return e.Q(be,be,[ie.x,ie.y,ie.z]),e.be(be,be,Math.PI),e.bf(be,be,Math.PI/2),e.S(be,be,[-fe,fe,fe]),be}getProjectionDataForCustomLayer(y=!0){let N=new e.a3(0,0,0,0,0),ie=this.getProjectionData({overscaledTileID:N,applyGlobeMatrix:y}),fe=or(N,this.worldSize);e.U(fe,this._viewProjMatrix,fe),ie.tileMercatorCoords=[0,0,1,1];let be=[e.a6,e.a6,this.worldSize/this._helper.pixelsPerMeter],Re=e.bj();return e.S(Re,fe,be),ie.fallbackMatrix=Re,ie.mainMatrix=Re,ie}getFastPathSimpleProjectionMatrix(y){return this.calculatePosMatrix(y)}}function Ao(){e.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function ds(pe){if(pe.useSlerp)if(pe.k<1){let y=e.bk(pe.startEulerAngles.roll,pe.startEulerAngles.pitch,pe.startEulerAngles.bearing),N=e.bk(pe.endEulerAngles.roll,pe.endEulerAngles.pitch,pe.endEulerAngles.bearing),ie=new Float64Array(4);e.bl(ie,y,N,pe.k);let fe=e.bm(ie);pe.tr.setRoll(fe.roll),pe.tr.setPitch(fe.pitch),pe.tr.setBearing(fe.bearing)}else pe.tr.setRoll(pe.endEulerAngles.roll),pe.tr.setPitch(pe.endEulerAngles.pitch),pe.tr.setBearing(pe.endEulerAngles.bearing);else pe.tr.setRoll(e.H.number(pe.startEulerAngles.roll,pe.endEulerAngles.roll,pe.k)),pe.tr.setPitch(e.H.number(pe.startEulerAngles.pitch,pe.endEulerAngles.pitch,pe.k)),pe.tr.setBearing(e.H.number(pe.startEulerAngles.bearing,pe.endEulerAngles.bearing,pe.k))}function jo(pe,y,N,ie,fe){let be=fe.padding,Re=rr(fe.worldSize,N.getNorthWest()),je=rr(fe.worldSize,N.getNorthEast()),Ze=rr(fe.worldSize,N.getSouthEast()),ut=rr(fe.worldSize,N.getSouthWest()),ft=e.an(-ie),Dt=Re.rotate(ft),Gt=je.rotate(ft),Kt=Ze.rotate(ft),st=ut.rotate(ft),It=new e.P(Math.max(Dt.x,Gt.x,st.x,Kt.x),Math.max(Dt.y,Gt.y,st.y,Kt.y)),Ut=new e.P(Math.min(Dt.x,Gt.x,st.x,Kt.x),Math.min(Dt.y,Gt.y,st.y,Kt.y)),ir=It.sub(Ut),dr=(fe.width-(be.left+be.right+y.left+y.right))/ir.x,Ar=(fe.height-(be.top+be.bottom+y.top+y.bottom))/ir.y;if(Ar<0||dr<0)return void Ao();let hr=Math.min(e.ar(fe.scale*Math.min(dr,Ar)),pe.maxZoom),vr=e.P.convert(pe.offset),Or=new e.P((y.left-y.right)/2,(y.top-y.bottom)/2).rotate(e.an(ie)),Cr=vr.add(Or).mult(fe.scale/e.ao(hr));return{center:_r(fe.worldSize,Re.add(Ze).div(2).sub(Cr)),zoom:hr,bearing:ie}}class Wo{get useGlobeControls(){return!1}handlePanInertia(y,N){let ie=y.mag(),fe=Math.abs(Xt(N));return{easingOffset:y.mult(Math.min(.75*fe/ie,1)),easingCenter:N.center}}handleMapControlsRollPitchBearingZoom(y,N){y.bearingDelta&&N.setBearing(N.bearing+y.bearingDelta),y.pitchDelta&&N.setPitch(N.pitch+y.pitchDelta),y.rollDelta&&N.setRoll(N.roll+y.rollDelta),y.zoomDelta&&N.setZoom(N.zoom+y.zoomDelta)}handleMapControlsPan(y,N,ie){y.around.distSqr(N.centerPoint)<.01||N.setLocationAtPoint(ie,y.around)}cameraForBoxAndBearing(y,N,ie,fe,be){return jo(y,N,ie,fe,be)}handleJumpToCenterZoom(y,N){y.zoom!==(N.zoom!==void 0?+N.zoom:y.zoom)&&y.setZoom(+N.zoom),N.center!==void 0&&y.setCenter(e.W.convert(N.center))}handleEaseTo(y,N){let ie=y.zoom,fe=y.padding,be={roll:y.roll,pitch:y.pitch,bearing:y.bearing},Re={roll:N.roll===void 0?y.roll:N.roll,pitch:N.pitch===void 0?y.pitch:N.pitch,bearing:N.bearing===void 0?y.bearing:N.bearing},je=N.zoom!==void 0,Ze=!y.isPaddingEqual(N.padding),ut=!1,ft=je?+N.zoom:y.zoom,Dt=y.centerPoint.add(N.offsetAsPoint),Gt=y.screenPointToLocation(Dt),{center:Kt,zoom:st}=y.applyConstrain(e.W.convert(N.center||Gt),ft??ie);Vn(y,Kt);let It=rr(y.worldSize,Gt),Ut=rr(y.worldSize,Kt).sub(It),ir=e.ao(st-ie);return ut=st!==ie,{easeFunc:dr=>{if(ut&&y.setZoom(e.H.number(ie,st,dr)),e.bn(be,Re)||ds({startEulerAngles:be,endEulerAngles:Re,tr:y,k:dr,useSlerp:be.roll!=Re.roll}),Ze&&(y.interpolatePadding(fe,N.padding,dr),Dt=y.centerPoint.add(N.offsetAsPoint)),N.around)y.setLocationAtPoint(N.around,N.aroundPoint);else{let Ar=e.ao(y.zoom-ie),hr=st>ie?Math.min(2,ir):Math.max(.5,ir),vr=Math.pow(hr,1-dr),Or=_r(y.worldSize,It.add(Ut.mult(dr*vr)).mult(Ar));y.setLocationAtPoint(y.renderWorldCopies?Or.wrap():Or,Dt)}},isZooming:ut,elevationCenter:Kt}}handleFlyTo(y,N){let ie=N.zoom!==void 0,fe=y.zoom,be=y.applyConstrain(e.W.convert(N.center||N.locationAtOffset),ie?+N.zoom:fe),Re=be.center,je=be.zoom;Vn(y,Re);let Ze=rr(y.worldSize,N.locationAtOffset),ut=rr(y.worldSize,Re).sub(Ze),ft=ut.mag(),Dt=e.ao(je-fe),Gt;if(N.minZoom!==void 0){let Kt=Math.min(+N.minZoom,fe,je),st=y.applyConstrain(Re,Kt).zoom;Gt=e.ao(st-fe)}return{easeFunc:(Kt,st,It,Ut)=>{y.setZoom(Kt===1?je:fe+e.ar(st));let ir=Kt===1?Re:_r(y.worldSize,Ze.add(ut.mult(It)).mult(st));y.setLocationAtPoint(y.renderWorldCopies?ir.wrap():ir,Ut)},scaleOfZoom:Dt,targetCenter:Re,scaleOfMinZoom:Gt,pixelPathLength:ft}}}class to{constructor(y,N,ie){this.blendFunction=y,this.blendColor=N,this.mask=ie}}to.Replace=[1,0],to.disabled=new to(to.Replace,e.bo.transparent,[!1,!1,!1,!1]),to.unblended=new to(to.Replace,e.bo.transparent,[!0,!0,!0,!0]),to.alphaBlended=new to([1,771],e.bo.transparent,[!0,!0,!0,!0]);let wo=2305;class pi{constructor(y,N,ie){this.enable=y,this.mode=N,this.frontFace=ie}}pi.disabled=new pi(!1,1029,wo),pi.backCCW=new pi(!0,1029,wo),pi.frontCCW=new pi(!0,1028,wo);class Vi{constructor(y,N,ie){this.func=y,this.mask=N,this.range=ie}}Vi.ReadOnly=!1,Vi.ReadWrite=!0,Vi.disabled=new Vi(519,Vi.ReadOnly,[0,1]);let Io=7680;class Xi{constructor(y,N,ie,fe,be,Re){this.test=y,this.ref=N,this.mask=ie,this.fail=fe,this.depthFail=be,this.pass=Re}}function Ko(pe){return typeof WebGL2RenderingContext<"u"&&pe instanceof WebGL2RenderingContext}Xi.disabled=new Xi({func:519,mask:0},0,0,Io,Io,Io);class Uo{get awaitingQuery(){return!!this._readbackQueue}constructor(y){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=y;let N=y.context,ie=N.gl;this._texFormat=ie.RGBA,this._texType=ie.UNSIGNED_BYTE;let fe=new e.aU;fe.emplaceBack(-1,-1),fe.emplaceBack(2,-1),fe.emplaceBack(-1,2);let be=new e.aW;be.emplaceBack(0,1,2),this._fullscreenTriangle=new Xn(N.createVertexBuffer(fe,eo.members),N.createIndexBuffer(be),e.aV.simpleSegment(0,0,fe.length,be.length)),this._resultBuffer=new Uint8Array(4),N.activeTexture.set(ie.TEXTURE1);let Re=ie.createTexture();ie.bindTexture(ie.TEXTURE_2D,Re),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_S,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_T,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MIN_FILTER,ie.NEAREST),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MAG_FILTER,ie.NEAREST),ie.texImage2D(ie.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=N.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(Re),Ko(ie)&&(this._pbo=ie.createBuffer(),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,this._pbo),ie.bufferData(ie.PIXEL_PACK_BUFFER,4,ie.STREAM_READ),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,null))}destroy(){let y=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),y.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(y,N){let ie=this._updateCount;return this._readbackQueue?ie>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():ie>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(y,N),this._updateCount++,this._measuredError}_bindFramebuffer(){let y=this._cachedRenderContext.context,N=y.gl;y.activeTexture.set(N.TEXTURE1),N.bindTexture(N.TEXTURE_2D,this._fbo.colorAttachment.get()),y.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(y,N){let ie=this._cachedRenderContext.context,fe=ie.gl;if(this._bindFramebuffer(),ie.viewport.set([0,0,this._texWidth,this._texHeight]),ie.clear({color:e.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(ie,fe.TRIANGLES,Vi.disabled,Xi.disabled,to.unblended,pi.disabled,((be,Re)=>({u_input:be,u_output_expected:Re}))(y,N),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Ko(fe)){fe.bindBuffer(fe.PIXEL_PACK_BUFFER,this._pbo),fe.readBuffer(fe.COLOR_ATTACHMENT0),fe.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),fe.bindBuffer(fe.PIXEL_PACK_BUFFER,null);let be=fe.fenceSync(fe.SYNC_GPU_COMMANDS_COMPLETE,0);fe.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:be}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let y=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Ko(y)){let N=y.clientWaitSync(this._readbackQueue.sync,0,0);if(N===y.WAIT_FAILED)return e.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(N===y.TIMEOUT_EXPIRED)return;y.bindBuffer(y.PIXEL_PACK_BUFFER,this._pbo),y.getBufferSubData(y.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),y.bindBuffer(y.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),y.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=Uo._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(y){let N=0;return N+=y[0]/256,N+=y[1]/65536,N+=y[2]/16777216,y[3]<127&&(N=-N),N/128}}let Ls=e.a6/128;function Ss(pe,y){let N=pe.granularity!==void 0?Math.max(pe.granularity,1):1,ie=N+(pe.generateBorders?2:0),fe=N+(pe.extendToNorthPole||pe.generateBorders?1:0)+(pe.extendToSouthPole||pe.generateBorders?1:0),be=ie+1,Re=fe+1,je=pe.generateBorders?-1:0,Ze=pe.generateBorders||pe.extendToNorthPole?-1:0,ut=N+(pe.generateBorders?1:0),ft=N+(pe.generateBorders||pe.extendToSouthPole?1:0),Dt=be*Re,Gt=ie*fe*6,Kt=be*Re>65536;if(Kt&&y==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let st=Kt||y==="32bit",It=new Int16Array(2*Dt),Ut=0;for(let Ar=Ze;Ar<=ft;Ar++)for(let hr=je;hr<=ut;hr++){let vr=hr/N*e.a6;hr===-1&&(vr=-Ls),hr===N+1&&(vr=e.a6+Ls);let Or=Ar/N*e.a6;Ar===-1&&(Or=pe.extendToNorthPole?e.bq:-Ls),Ar===N+1&&(Or=pe.extendToSouthPole?e.br:e.a6+Ls),It[Ut++]=vr,It[Ut++]=Or}let ir=st?new Uint32Array(Gt):new Uint16Array(Gt),dr=0;for(let Ar=0;Ar0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(y){this._mercatorProjection.updateGPUdependent(y),this._verticalPerspectiveProjection.updateGPUdependent(y)}getMeshFromTileID(y,N,ie,fe,be){return this.currentProjection.getMeshFromTileID(y,N,ie,fe,be)}setProjection(y){this._transitionable.setValue("type",y?.type||"mercator")}updateTransitions(y){this._transitioning=this._transitionable.transitioned(y,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(y){this.properties=this._transitioning.possiblyEvaluate(y)}setErrorQueryLatitudeDegrees(y){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(y),this._mercatorProjection.setErrorQueryLatitudeDegrees(y)}}function _o(pe){let y=bs(pe.worldSize,pe.center.lat);return 2*Math.PI*y}function Pi(pe,y,N,ie,fe){let be=1/(1<1e-6){let ie=pe[0]/N,fe=Math.acos(pe[2]/N),be=(ie>0?fe:-fe)/Math.PI*180;return new e.W(e.X(be,-180,180),y)}return new e.W(0,y)}function hl(pe){return Math.cos(pe*Math.PI/180)}function ps(pe,y){let N=hl(pe),ie=hl(y);return e.ar(ie/N)}function dl(pe,y){let N=pe.rotate(y.bearingInRadians),ie=y.zoom+ps(y.center.lat,0),fe=e.bt(1/hl(y.center.lat),1/hl(Math.min(Math.abs(y.center.lat),60)),e.bw(ie,7,3,0,1)),be=360/_o({worldSize:y.worldSize,center:{lat:y.center.lat}});return new e.W(y.center.lng-N.x*be*fe,e.al(y.center.lat+N.y*be,-e.am,e.am))}function wu(pe){let y=.5*pe,N=Math.sin(y),ie=Math.cos(y);return Math.log(N+ie)-Math.log(ie-N)}function lu(pe,y,N,ie){let fe=pe.lat+N*ie;if(Math.abs(N)>1){let be=(Math.sign(pe.lat+N)!==Math.sign(pe.lat)?-Math.abs(pe.lat):Math.abs(pe.lat))*Math.PI/180,Re=Math.abs(pe.lat+N)*Math.PI/180,je=wu(be+ie*(Re-be)),Ze=wu(be),ut=wu(Re);return new e.W(pe.lng+y*((je-Ze)/(ut-Ze)),fe)}return new e.W(pe.lng+y*ie,fe)}class xc{constructor(y){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=y}swapBuffers(){if(!this._hadAnyChanges)return;let y=this._cachePrevious;this._cachePrevious=this._cache,this._cache=y,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(y,N,ie,fe){let be=`${y.z}_${y.x}_${y.y}_${fe?.terrain?"t":""}`,Re=this._cache.get(be);if(Re)return Re;let je=this._cachePrevious.get(be);if(je)return this._cache.set(be,je),je;let Ze=this._boundingVolumeFactory(y,N,ie,fe);return this._cache.set(be,Ze),this._hadAnyChanges=!0,Ze}}class Fl{constructor(y,N,ie,fe){this.min=ie,this.max=fe,this.points=y,this.planes=N}static fromAabb(y,N){let ie=[];for(let fe=0;fe<8;fe++)ie.push([1&~fe?y[0]:N[0],(fe>>1&1)==1?N[1]:y[1],(fe>>2&1)==1?N[2]:y[2]]);return new Fl(ie,[[-1,0,0,N[0]],[1,0,0,-y[0]],[0,-1,0,N[1]],[0,1,0,-y[1]],[0,0,-1,N[2]],[0,0,1,-y[2]]],y,N)}static fromCenterSizeAngles(y,N,ie){let fe=e.bA([],ie[0],ie[1],ie[2]),be=e.bB([],[N[0],0,0],fe),Re=e.bB([],[0,N[1],0],fe),je=e.bB([],[0,0,N[2]],fe),Ze=[...y],ut=[...y];for(let Dt=0;Dt<8;Dt++)for(let Gt=0;Gt<3;Gt++){let Kt=y[Gt]+be[Gt]*(1&~Dt?-1:1)+Re[Gt]*((Dt>>1&1)==1?1:-1)+je[Gt]*((Dt>>2&1)==1?1:-1);Ze[Gt]=Math.min(Ze[Gt],Kt),ut[Gt]=Math.max(ut[Gt],Kt)}let ft=[];for(let Dt=0;Dt<8;Dt++){let Gt=[...y];e.a_(Gt,Gt,e.aZ([],be,1&~Dt?-1:1)),e.a_(Gt,Gt,e.aZ([],Re,(Dt>>1&1)==1?1:-1)),e.a_(Gt,Gt,e.aZ([],je,(Dt>>2&1)==1?1:-1)),ft.push(Gt)}return new Fl(ft,[[...be,-e.b3(be,ft[0])],[...Re,-e.b3(Re,ft[0])],[...je,-e.b3(je,ft[0])],[-be[0],-be[1],-be[2],-e.b3(be,ft[7])],[-Re[0],-Re[1],-Re[2],-e.b3(Re,ft[7])],[-je[0],-je[1],-je[2],-e.b3(je,ft[7])]],Ze,ut)}intersectsFrustum(y){let N=!0,ie=this.points.length,fe=this.planes.length,be=y.planes.length,Re=y.points.length;for(let je=0;je=0&&ut++}if(ut===0)return 0;ut=0&&ut++}if(ut===0)return 0}return 1}intersectsPlane(y){let N=this.points.length,ie=0;for(let fe=0;fe=0&&ie++}return ie===N?2:ie===0?0:1}}function pl(pe,y,N){let ie=pe-y;return ie<0?-ie:Math.max(0,ie-N)}function $u(pe,y,N,ie,fe){let be=pe-N,Re;return Re=be<0?Math.min(-be,1+be-fe):be>fe?Math.min(Math.max(be-fe,0),1-be):0,Math.max(Re,pl(y,ie,fe))}class uu{constructor(){this._boundingVolumeCache=new xc(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(y,N,ie,fe){let be=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(y,N,ie,fe){return this._boundingVolumeCache.getTileBoundingVolume(y,N,ie,fe)}_computeTileBoundingVolume(y,N,ie,fe){var be,Re;let je=0,Ze=0;if(fe?.terrain){let ut=new e.a3(y.z,N,y.z,y.x,y.y),ft=fe.terrain.getMinMaxElevation(ut);je=(be=ft.minElevation)!==null&&be!==void 0?be:Math.min(0,ie),Ze=(Re=ft.maxElevation)!==null&&Re!==void 0?Re:Math.max(0,ie)}if(je/=e.bD,Ze/=e.bD,je+=1,Ze+=1,y.z<=0)return Fl.fromAabb([-Ze,-Ze,-Ze],[Ze,Ze,Ze]);if(y.z===1)return Fl.fromAabb([y.x===0?-Ze:0,y.y===0?0:-Ze,-Ze],[y.x===0?0:Ze,y.y===0?Ze:0,Ze]);{let ut=[Pi(0,0,y.x,y.y,y.z),Pi(e.a6,0,y.x,y.y,y.z),Pi(e.a6,e.a6,y.x,y.y,y.z),Pi(0,e.a6,y.x,y.y,y.z)],ft=[];for(let Ra of ut)ft.push(e.aZ([],Ra,Ze));if(Ze!==je)for(let Ra of ut)ft.push(e.aZ([],Ra,je));y.y===0&&ft.push([0,1,0]),y.y===(1<=(1<{let fe=e.al(N.lat,-e.am,e.am),be=e.al(+ie,this.minZoom+ps(0,fe),this.maxZoom);return{center:new e.W(N.lng,fe),zoom:be}},this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._coveringTilesDetailsProvider=new uu}clone(){let y=new vs;return y.apply(this,!1),y}apply(y,N,ie){this._globeLatitudeErrorCorrectionRadians=ie||0,this._helper.apply(y,N)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let y=e.bz();return y[0]=this._cameraPosition[0],y[1]=this._cameraPosition[1],y[2]=this._cameraPosition[2],y}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(y){let{overscaledTileID:N,applyGlobeMatrix:ie}=y,fe=this._helper.getMercatorTileCoordinates(N);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:fe,clippingPlane:this._cachedClippingPlane,projectionTransition:ie?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(y){let N=this.pitchInRadians,ie=this.cameraToCenterDistance/y,fe=Math.sin(N)*ie,be=Math.cos(N)*ie+1,Re=1/Math.sqrt(fe*fe+be*be)*1,je=-fe,Ze=be,ut=Math.sqrt(je*je+Ze*Ze);je/=ut,Ze/=ut;let ft=[0,je,Ze];e.bF(ft,ft,[0,0,0],-this.bearingInRadians),e.bG(ft,ft,[0,0,0],-1*this.center.lat*Math.PI/180),e.bH(ft,ft,[0,0,0],this.center.lng*Math.PI/180);let Dt=1/e.b5(ft);return e.aZ(ft,ft,Dt),[...ft,-Re*Dt]}isLocationOccluded(y){return!this.isSurfacePointVisible(yo(y))}transformLightDirection(y){let N=this._helper._center.lng*Math.PI/180,ie=this._helper._center.lat*Math.PI/180,fe=Math.cos(ie),be=[Math.sin(N)*fe,Math.sin(ie),Math.cos(N)*fe],Re=[be[2],0,-be[0]],je=[0,0,0];e.b2(je,Re,be),e.b1(Re,Re),e.b1(je,je);let Ze=[0,0,0];return e.b1(Ze,[Re[0]*y[0]+je[0]*y[1]+be[0]*y[2],Re[1]*y[0]+je[1]*y[1]+be[1]*y[2],Re[2]*y[0]+je[2]*y[1]+be[2]*y[2]]),Ze}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(y,N,ie){let fe=function(je,Ze,ut){let ft=1/(1<be&&(be=Gt),Ktje&&(je=Kt)}let ft=[ut.lng+Re,ut.lat+Ze,ut.lng+be,ut.lat+je];return this.isSurfacePointOnScreen([0,1,0])&&(ft[3]=90,ft[0]=-180,ft[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(ft[1]=-90,ft[0]=-180,ft[2]=180),new q(ft)}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}setLocationAtPoint(y,N){let ie=yo(this.unprojectScreenPoint(N)),fe=yo(y),be=e.bz();e.bK(be);let Re=e.bz();e.bH(Re,ie,be,-this.center.lng*Math.PI/180),e.bG(Re,Re,be,this.center.lat*Math.PI/180);let je=fe[0]*fe[0]+fe[2]*fe[2],Ze=Re[0]*Re[0];if(je=-ir&&st<=ir,Ar=Ut>=-ir&&Ut<=ir,hr,vr;if(dr&&Ar){let ka=this.center.lng*Math.PI/180,Ta=this.center.lat*Math.PI/180;e.bM(Dt,ka)+e.bM(st,Ta)=0}isSurfacePointOnScreen(y){if(!this.isSurfacePointVisible(y))return!1;let N=e.bE();return e.aE(N,[...y,1],this._globeViewProjMatrixNoCorrection),N[0]/=N[3],N[1]/=N[3],N[2]/=N[3],N[0]>-1&&N[0]<1&&N[1]>-1&&N[1]<1&&N[2]>-1&&N[2]<1}rayPlanetIntersection(y,N){let ie=e.b3(y,N),fe=e.bz(),be=e.bz();e.aZ(be,N,ie),e.b0(fe,y,be);let Re=1-e.b3(fe,fe);if(Re<0)return null;let je=e.b3(y,y)-1,Ze=-ie+(ie<0?1:-1)*Math.sqrt(Re),ut=je/Ze,ft=Ze;return{tMin:Math.min(ut,ft),tMax:Math.max(ut,ft)}}unprojectScreenPoint(y){let N=this._cameraPosition,ie=this.getRayDirectionFromPixel(y),fe=this.rayPlanetIntersection(N,ie);if(fe){let ft=e.bz();e.a_(ft,N,[ie[0]*fe.tMin,ie[1]*fe.tMin,ie[2]*fe.tMin]);let Dt=e.bz();return e.b1(Dt,ft),Dl(Dt)}let be=this._cachedClippingPlane,Re=be[0]*ie[0]+be[1]*ie[1]+be[2]*ie[2],je=-e.b9(be,N)/Re,Ze=e.bz();if(je>0)e.a_(Ze,N,[ie[0]*je,ie[1]*je,ie[2]*je]);else{let ft=e.bz();e.a_(ft,N,[2*ie[0],2*ie[1],2*ie[2]]);let Dt=e.b9(this._cachedClippingPlane,ft);e.b0(Ze,ft,[this._cachedClippingPlane[0]*Dt,this._cachedClippingPlane[1]*Dt,this._cachedClippingPlane[2]*Dt])}let ut=function(ft){let Dt=e.bz();return Dt[0]=ft[0]*-ft[3],Dt[1]=ft[1]*-ft[3],Dt[2]=ft[2]*-ft[3],{center:Dt,radius:Math.sqrt(1-ft[3]*ft[3])}}(be);return Dl(function(ft,Dt,Gt){let Kt=e.bz();e.b0(Kt,Gt,ft);let st=e.bz();return e.bx(st,ft,Kt,Dt/e.b7(Kt)),st}(ut.center,ut.radius,Ze))}getMatrixForModel(y,N){let ie=e.W.convert(y),fe=1/e.bD,be=e.bi();return e.bI(be,be,ie.lng/180*Math.PI),e.bf(be,be,-ie.lat/180*Math.PI),e.Q(be,be,[0,0,1+N/e.bD]),e.bf(be,be,.5*Math.PI),e.S(be,be,[fe,fe,fe]),be}getProjectionDataForCustomLayer(y=!0){let N=this.getProjectionData({overscaledTileID:new e.a3(0,0,0,0,0),applyGlobeMatrix:y});return N.tileMercatorCoords=[0,0,1,1],N}getFastPathSimpleProjectionMatrix(y){}}class os{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,N,ie){this._helper.interpolatePadding(y,N,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,N,ie=!0){this._helper.resize(y,N,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,N){this._helper.overrideNearFarZ(y,N)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(y,N){this._globeness=y,this._globeLatitudeErrorCorrectionRadians=N,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(y){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(N,ie)=>this.currentTransform.defaultConstrain(N,ie),this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._globeness=1,this._mercatorTransform=new Eo,this._verticalPerspectiveTransform=new vs}clone(){let y=new os;return y._globeness=this._globeness,y._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,y.apply(this,!1),y}apply(y,N){this._helper.apply(y,N),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(y){let N=this._mercatorTransform.getProjectionData(y),ie=this._verticalPerspectiveTransform.getProjectionData(y);return{mainMatrix:this.isGlobeRendering?ie.mainMatrix:N.mainMatrix,clippingPlane:ie.clippingPlane,tileMercatorCoords:ie.tileMercatorCoords,projectionTransition:y.applyGlobeMatrix?this._globeness:0,fallbackMatrix:N.fallbackMatrix}}isLocationOccluded(y){return this.currentTransform.isLocationOccluded(y)}transformLightDirection(y){return this.currentTransform.transformLightDirection(y)}getPixelScale(){return e.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return e.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(y,N,ie){let fe=this._mercatorTransform.getPitchedTextCorrection(y,N,ie),be=this._verticalPerspectiveTransform.getPitchedTextCorrection(y,N,ie);return e.bt(fe,be,this._globeness)}projectTileCoordinates(y,N,ie,fe){return this.currentTransform.projectTileCoordinates(y,N,ie,fe)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(y){return this.currentTransform.calculateFogMatrix(y)}getVisibleUnwrappedCoordinates(y){return this.currentTransform.getVisibleUnwrappedCoordinates(y)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(y){this._mercatorTransform.recalculateZoomAndCenter(y),this._verticalPerspectiveTransform.recalculateZoomAndCenter(y)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(y,N){return this.currentTransform.lngLatToCameraDepth(y,N)}populateCache(y){this._mercatorTransform.populateCache(y),this._verticalPerspectiveTransform.populateCache(y)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}setLocationAtPoint(y,N){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(y,N),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(y,N),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(y,N){return this.currentTransform.locationToScreenPoint(y,N)}screenPointToMercatorCoordinate(y,N){return this.currentTransform.screenPointToMercatorCoordinate(y,N)}screenPointToLocation(y,N){return this.currentTransform.screenPointToLocation(y,N)}isPointOnMapSurface(y,N){return this.currentTransform.isPointOnMapSurface(y,N)}getRayDirectionFromPixel(y){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(y)}getMatrixForModel(y,N){return this.currentTransform.getMatrixForModel(y,N)}getProjectionDataForCustomLayer(y=!0){let N=this._mercatorTransform.getProjectionDataForCustomLayer(y);if(!this.isGlobeRendering)return N;let ie=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(y);return ie.fallbackMatrix=N.mainMatrix,ie}getFastPathSimpleProjectionMatrix(y){return this.currentTransform.getFastPathSimpleProjectionMatrix(y)}}class ms{get useGlobeControls(){return!0}handlePanInertia(y,N){let ie=dl(y,N);return Math.abs(ie.lng-N.center.lng)>180&&(ie.lng=N.center.lng+179.5*Math.sign(ie.lng-N.center.lng)),{easingCenter:ie,easingOffset:new e.P(0,0)}}handleMapControlsRollPitchBearingZoom(y,N){let ie=y.around,fe=N.screenPointToLocation(ie);y.bearingDelta&&N.setBearing(N.bearing+y.bearingDelta),y.pitchDelta&&N.setPitch(N.pitch+y.pitchDelta),y.rollDelta&&N.setRoll(N.roll+y.rollDelta);let be=N.zoom;y.zoomDelta&&N.setZoom(N.zoom+y.zoomDelta);let Re=N.zoom-be;if(Re===0)return;let je=e.bJ(N.center.lng,fe.lng),Ze=je/(Math.abs(je/180)+1),ut=e.bJ(N.center.lat,fe.lat),ft=N.getRayDirectionFromPixel(ie),Dt=N.cameraPosition,Gt=-1*e.b3(Dt,ft),Kt=e.bz();e.a_(Kt,Dt,[ft[0]*Gt,ft[1]*Gt,ft[2]*Gt]);let st=e.b5(Kt)-1,It=Math.exp(.5*-Math.max(st-.3,0)),Ut=bs(N.worldSize,N.center.lat)/Math.min(N.width,N.height),ir=e.bw(Ut,.9,.5,1,.25),dr=(1-e.ao(-Re))*Math.min(It,ir),Ar=N.center.lat,hr=N.zoom,vr=new e.W(N.center.lng+Ze*dr,e.al(N.center.lat+ut*dr,-e.am,e.am));N.setLocationAtPoint(fe,ie);let Or=N.center,Cr=e.bw(Math.abs(je),45,85,0,1),ta=e.bw(Ut,.75,.35,0,1),ka=Math.pow(Math.max(Cr,ta),.25),Ta=e.bJ(Or.lng,vr.lng),Ra=e.bJ(Or.lat,vr.lat);N.setCenter(new e.W(Or.lng+Ta*ka,Or.lat+Ra*ka).wrap()),N.setZoom(hr+ps(Ar,N.center.lat))}handleMapControlsPan(y,N,ie){if(!y.panDelta)return;let fe=N.center.lat,be=N.zoom;N.setCenter(dl(y.panDelta,N).wrap()),N.setZoom(be+ps(fe,N.center.lat))}cameraForBoxAndBearing(y,N,ie,fe,be){let Re=jo(y,N,ie,fe,be),je=N.left/be.width*2-1,Ze=(be.width-N.right)/be.width*2-1,ut=N.top/be.height*-2+1,ft=(be.height-N.bottom)/be.height*-2+1,Dt=e.bJ(ie.getWest(),ie.getEast())<0,Gt=Dt?ie.getEast():ie.getWest(),Kt=Dt?ie.getWest():ie.getEast(),st=Math.max(ie.getNorth(),ie.getSouth()),It=Math.min(ie.getNorth(),ie.getSouth()),Ut=Gt+.5*e.bJ(Gt,Kt),ir=st+.5*e.bJ(st,It),dr=be.clone();dr.setCenter(Re.center),dr.setBearing(Re.bearing),dr.setPitch(0),dr.setRoll(0),dr.setZoom(Re.zoom);let Ar=dr.modelViewProjectionMatrix,hr=[yo(ie.getNorthWest()),yo(ie.getNorthEast()),yo(ie.getSouthWest()),yo(ie.getSouthEast()),yo(new e.W(Kt,ir)),yo(new e.W(Gt,ir)),yo(new e.W(Ut,st)),yo(new e.W(Ut,It))],vr=yo(Re.center),Or=Number.POSITIVE_INFINITY;for(let Cr of hr)je<0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"x",je))),Ze>0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"x",Ze))),ut>0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"y",ut))),ft<0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"y",ft)));if(Number.isFinite(Or)&&Or!==0)return Re.zoom=Math.min(dr.zoom+e.ar(Or),y.maxZoom),Re;Ao()}handleJumpToCenterZoom(y,N){let ie=y.center.lat,fe=y.applyConstrain(N.center?e.W.convert(N.center):y.center,y.zoom).center;y.setCenter(fe.wrap());let be=N.zoom!==void 0?+N.zoom:y.zoom+ps(ie,fe.lat);y.zoom!==be&&y.setZoom(be)}handleEaseTo(y,N){let ie=y.zoom,fe=y.center,be=y.padding,Re={roll:y.roll,pitch:y.pitch,bearing:y.bearing},je={roll:N.roll===void 0?y.roll:N.roll,pitch:N.pitch===void 0?y.pitch:N.pitch,bearing:N.bearing===void 0?y.bearing:N.bearing},Ze=N.zoom!==void 0,ut=!y.isPaddingEqual(N.padding),ft=!1,Dt=N.center?e.W.convert(N.center):fe,Gt=y.applyConstrain(Dt,ie).center;Vn(y,Gt);let Kt=y.clone();Kt.setCenter(Gt),Kt.setZoom(Ze?+N.zoom:ie+ps(fe.lat,Dt.lat)),Kt.setBearing(N.bearing);let st=new e.P(e.al(y.centerPoint.x+N.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+N.offsetAsPoint.y,0,y.height));Kt.setLocationAtPoint(Gt,st);let It=(N.offset&&N.offsetAsPoint.mag())>0?Kt.center:Gt,Ut=Ze?+N.zoom:ie+ps(fe.lat,It.lat),ir=ie+ps(fe.lat,0),dr=Ut+ps(It.lat,0),Ar=e.bJ(fe.lng,It.lng),hr=e.bJ(fe.lat,It.lat),vr=e.ao(dr-ir);return ft=Ut!==ie,{easeFunc:Or=>{if(e.bn(Re,je)||ds({startEulerAngles:Re,endEulerAngles:je,tr:y,k:Or,useSlerp:Re.roll!=je.roll}),ut&&y.interpolatePadding(be,N.padding,Or),N.around)e.w("Easing around a point is not supported under globe projection."),y.setLocationAtPoint(N.around,N.aroundPoint);else{let Cr=dr>ir?Math.min(2,vr):Math.max(.5,vr),ta=Math.pow(Cr,1-Or),ka=lu(fe,Ar,hr,Or*ta);y.setCenter(ka.wrap())}if(ft){let Cr=e.H.number(ir,dr,Or)+ps(0,y.center.lat);y.setZoom(Cr)}},isZooming:ft,elevationCenter:It}}handleFlyTo(y,N){let ie=N.zoom!==void 0,fe=y.center,be=y.zoom,Re=y.padding,je=!y.isPaddingEqual(N.padding),Ze=y.applyConstrain(e.W.convert(N.center||N.locationAtOffset),be).center,ut=ie?+N.zoom:y.zoom+ps(y.center.lat,Ze.lat),ft=y.clone();ft.setCenter(Ze),ft.setZoom(ut),ft.setBearing(N.bearing);let Dt=new e.P(e.al(y.centerPoint.x+N.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+N.offsetAsPoint.y,0,y.height));ft.setLocationAtPoint(Ze,Dt);let Gt=ft.center;Vn(y,Gt);let Kt=function(hr,vr,Or){let Cr=yo(vr),ta=yo(Or),ka=e.b3(Cr,ta),Ta=Math.acos(ka),Ra=_o(hr);return Ta/(2*Math.PI)*Ra}(y,fe,Gt),st=be+ps(fe.lat,0),It=ut+ps(Gt.lat,0),Ut=e.ao(It-st),ir;if(typeof N.minZoom=="number"){let hr=+N.minZoom+ps(Gt.lat,0),vr=Math.min(hr,st,It)+ps(0,Gt.lat),Or=y.applyConstrain(Gt,vr).zoom+ps(Gt.lat,0);ir=e.ao(Or-st)}let dr=e.bJ(fe.lng,Gt.lng),Ar=e.bJ(fe.lat,Gt.lat);return{easeFunc:(hr,vr,Or,Cr)=>{let ta=lu(fe,dr,Ar,Or);je&&y.interpolatePadding(Re,N.padding,hr);let ka=hr===1?Gt:ta;y.setCenter(ka.wrap());let Ta=st+e.ar(vr);y.setZoom(hr===1?ut:Ta+ps(0,ka.lat))},scaleOfZoom:Ut,targetCenter:Gt,scaleOfMinZoom:ir,pixelPathLength:Kt}}static solveVectorScale(y,N,ie,fe,be){let Re=fe==="x"?[ie[0],ie[4],ie[8],ie[12]]:[ie[1],ie[5],ie[9],ie[13]],je=[ie[3],ie[7],ie[11],ie[15]],Ze=y[0]*Re[0]+y[1]*Re[1]+y[2]*Re[2],ut=y[0]*je[0]+y[1]*je[1]+y[2]*je[2],ft=N[0]*Re[0]+N[1]*Re[1]+N[2]*Re[2],Dt=N[0]*je[0]+N[1]*je[1]+N[2]*je[2];return ft+be*ut===Ze+be*Dt||je[3]*(Ze-ft)+Re[3]*(Dt-ut)+Ze*Dt==ft*ut?null:(ft+Re[3]-be*Dt-be*je[3])/(ft-Ze-be*Dt+be*ut)}static getLesserNonNegativeNonNull(y,N){return N!==null&&N>=0&&Ne.C(pe,y?.filter(N=>N.identifier!=="source.canvas")),zu=e.bN();class Ku extends e.E{constructor(y,N={}){var ie,fe;super(),this._rtlPluginLoaded=()=>{for(let Re in this.tileManagers){let je=this.tileManagers[Re].getSource().type;je!=="vector"&&je!=="geojson"||this.tileManagers[Re].reload()}},this.map=y,this.dispatcher=new ne(re(),y._getMapId()),this.dispatcher.registerMessageHandler("GG",(Re,je)=>this.getGlyphs(Re,je)),this.dispatcher.registerMessageHandler("GI",(Re,je)=>this.getImages(Re,je)),this.dispatcher.registerMessageHandler("GDA",(Re,je)=>this.getDashes(Re,je)),this.imageManager=new C,this.imageManager.setEventedParent(this);let be=((ie=y._container)===null||ie===void 0?void 0:ie.lang)||typeof document<"u"&&((fe=document.documentElement)===null||fe===void 0?void 0:fe.lang)||void 0;this.glyphManager=new x(y._requestManager,N.localIdeographFontFamily,be),this.lineAtlas=new F(256,512),this.crossTileSymbolIndex=new Di,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",e.bO()),Ye().on(Ae,this._rtlPluginLoaded),this.on("data",Re=>{if(Re.dataType!=="source"||Re.sourceDataType!=="metadata")return;let je=this.tileManagers[Re.sourceId];if(!je)return;let Ze=je.getSource();if(Ze?.vectorLayerIds)for(let ut in this._layers){let ft=this._layers[ut];ft.source===Ze.id&&this._validateLayer(ft)}})}_setInitialValues(){var y;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new e.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new(((y=this.crossTileSymbolIndex)===null||y===void 0?void 0:y.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(y,N){var ie,fe,be;this._checkLoaded();let Re=N===null?(be=(fe=(ie=this.stylesheet.state)===null||ie===void 0?void 0:ie[y])===null||fe===void 0?void 0:fe.default)!==null&&be!==void 0?be:null:N;if(e.bQ(Re,this._globalState[y]))return this;this._globalState[y]=Re,this._applyGlobalStateChanges([y])}getGlobalState(){return this._globalState}setGlobalState(y){this._checkLoaded();let N=[];for(let ie in y)!e.bQ(this._globalState[ie],y[ie].default)&&(N.push(ie),this._globalState[ie]=y[ie].default);this._applyGlobalStateChanges(N)}_applyGlobalStateChanges(y){if(y.length===0)return;let N=new Set,ie={};for(let fe of y){ie[fe]=this._globalState[fe];for(let be in this._layers){let Re=this._layers[be],je=Re.getLayoutAffectingGlobalStateRefs(),Ze=Re.getPaintAffectingGlobalStateRefs(),ut=Re.getVisibilityAffectingGlobalStateRefs();if(je.has(fe)&&N.add(Re.source),Ze.has(fe))for(let{name:ft,value:Dt}of Ze.get(fe))this._updatePaintProperty(Re,ft,Dt);ut?.has(fe)&&(Re.recalculateVisibility(),this._updateLayer(Re))}}this.dispatcher.broadcast("UGS",ie);for(let fe in this.tileManagers)N.has(fe)&&(this._reloadSource(fe),this._changed=!0)}loadURL(y){return e._(this,arguments,void 0,function*(N,ie={},fe){this.fire(new e.n("dataloading",{dataType:"style"})),ie.validate=typeof ie.validate!="boolean"||ie.validate,this._loadStyleRequest=new AbortController;let be=this._loadStyleRequest;try{let Re=yield this.map._requestManager.transformRequest(N,"Style");e.bR(be.signal);let je=yield e.k(Re,be);this._loadStyleRequest===be&&(this._loadStyleRequest=null),this._load(je.data,ie,fe)}catch(Re){this._loadStyleRequest===be&&(this._loadStyleRequest=null),Re&&!be.signal.aborted&&this.fire(new e.l(e.d(Re)))}})}loadJSON(y,N={},ie){this.fire(new e.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,s.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,N.validate=N.validate!==!1,this._load(y,N,ie)}).catch(()=>{})}loadEmpty(){this.fire(new e.n("dataloading",{dataType:"style"})),this._load(zu,{validate:!1})}_load(y,N,ie){var fe,be;let Re=N.transformStyle?N.transformStyle(ie,y):y;if(!N.validate||!Fu(this,e.F(Re))){Re=Object.assign({},Re),this._loaded=!0,this.stylesheet=Re;for(let je in Re.sources)this.addSource(je,Re.sources[je],{validate:!1});Re.sprite?this._loadSprite(Re.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Re.glyphs),this._createLayers(),this.light=new O(this.stylesheet.light),this._setProjectionInternal(((fe=this.stylesheet.projection)===null||fe===void 0?void 0:fe.type)||"mercator"),this.sky=new B(this.stylesheet.sky),this.map.setTerrain((be=this.stylesheet.terrain)!==null&&be!==void 0?be:null),this.fire(new e.n("data",{dataType:"style"})),this.fire(new e.n("style.load"))}}_createLayers(){var y,N,ie;let fe=e.bS(this.stylesheet.layers);this.setGlobalState((y=this.stylesheet.state)!==null&&y!==void 0?y:null),this.dispatcher.broadcast("SL",fe),this._order=fe.map(be=>be.id),this._layers={},this._serializedLayers=null;for(let be of fe){let Re=e.bT(be,this._globalState);if(Re.setEventedParent(this,{layer:{id:be.id}}),this._layers[be.id]=Re,e.bU(Re)&&this.tileManagers[Re.source]){let je=(ie=(N=be.paint)===null||N===void 0?void 0:N["raster-fade-duration"])!==null&&ie!==void 0?ie:Re.paint.get("raster-fade-duration");this.tileManagers[Re.source].setRasterFadeDuration(je)}}}_loadSprite(y,N=!1,ie=void 0){this.imageManager.setLoaded(!1);let fe=new AbortController,be;this._spriteRequest=fe,function(Re,je,Ze,ut){return e._(this,void 0,void 0,function*(){let ft=w(Re),Dt=Ze>1?"@2x":"",Gt={},Kt={};for(let{id:st,url:It}of ft){let Ut=yield je.transformRequest(S(It,Dt,".json"),"SpriteJSON");Gt[st]=e.k(Ut,ut);let ir=yield je.transformRequest(S(It,Dt,".png"),"SpriteImage");Kt[st]=v.getImage(ir,ut)}return yield Promise.all([...Object.values(Gt),...Object.values(Kt)]),function(st,It){return e._(this,void 0,void 0,function*(){let Ut={};for(let ir in st){Ut[ir]={};let dr=s.getImageCanvasContext((yield It[ir]).data),Ar=(yield st[ir]).data;for(let hr in Ar){let{width:vr,height:Or,x:Cr,y:ta,sdf:ka,pixelRatio:Ta,stretchX:Ra,stretchY:ua,content:ia,textFitWidth:ma,textFitHeight:da}=Ar[hr];Ut[ir][hr]={data:null,pixelRatio:Ta,sdf:ka,stretchX:Ra,stretchY:ua,content:ia,textFitWidth:ma,textFitHeight:da,spriteData:{width:vr,height:Or,x:Cr,y:ta,context:dr}}}}return Ut})}(Gt,Kt)})}(y,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Re=>{if(this._spriteRequest=null,Re)for(let je in Re){this._spritesImagesIds[je]=[];let Ze=this._spritesImagesIds[je]?this._spritesImagesIds[je].filter(ut=>!(ut in Re)):[];for(let ut of Ze)this.imageManager.removeImage(ut),this._changedImages[ut]=!0;for(let ut in Re[je]){let ft=je==="default"?ut:`${je}:${ut}`;this._spritesImagesIds[je].push(ft),ft in this.imageManager.images?this.imageManager.updateImage(ft,Re[je][ut],!1):this.imageManager.addImage(ft,Re[je][ut]),N&&(this._changedImages[ft]=!0)}}}).catch(Re=>{this._spriteRequest=null,be=Re,fe.signal.aborted||this.fire(new e.l(be))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),N&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"})),ie&&ie(be)})}_unloadSprite(){for(let y of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(y),this._changedImages[y]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}_validateLayer(y){let N=this.tileManagers[y.source];if(!N)return;let ie=y.sourceLayer;if(!ie)return;let fe=N.getSource();(fe.type==="geojson"||fe.vectorLayerIds&&!fe.vectorLayerIds.includes(ie))&&this.fire(new e.l(new Error(`Source layer "${ie}" does not exist on source "${fe.id}" as specified by style layer "${y.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let y in this.tileManagers)if(!this.tileManagers[y].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(y,N=!1){let ie=this._serializedAllLayers();if(!y||y.length===0)return Object.values(N?e.bV(ie):ie);let fe=[];for(let be of y)if(ie[be]){let Re=N?e.bV(ie[be]):ie[be];fe.push(Re)}return fe}_serializedAllLayers(){let y=this._serializedLayers;if(y)return y;y=this._serializedLayers={};let N=Object.keys(this._layers);for(let ie of N){let fe=this._layers[ie];fe.type!=="custom"&&(y[ie]=fe.serialize())}return y}hasTransitions(){var y,N,ie;if(!((y=this.light)===null||y===void 0)&&y.hasTransition()||!((N=this.sky)===null||N===void 0)&&N.hasTransition()||!((ie=this.projection)===null||ie===void 0)&&ie.hasTransition())return!0;for(let fe in this.tileManagers)if(this.tileManagers[fe].hasTransition())return!0;for(let fe in this._layers)if(this._layers[fe].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(y){if(!this._loaded)return;let N=this._changed;if(N){let fe=Object.keys(this._updatedLayers),be=Object.keys(this._removedLayers);(fe.length||be.length)&&this._updateWorkerLayers(fe,be);for(let Re in this._updatedSources){let je=this._updatedSources[Re];if(je==="reload")this._reloadSource(Re);else{if(je!=="clear")throw new Error(`Invalid action ${je}`);this._clearSource(Re)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let Re in this._updatedPaintProps)this._layers[Re].updateTransitions(y);this.light.updateTransitions(y),this.sky.updateTransitions(y),this._resetUpdates()}let ie={};for(let fe in this.tileManagers){let be=this.tileManagers[fe];ie[fe]=be.used,be.used=!1}for(let fe of this._order){let be=this._layers[fe];be.recalculate(y,this._availableImages),!be.isHidden(y.zoom)&&be.source&&(this.tileManagers[be.source].used=!0)}for(let fe in ie){let be=this.tileManagers[fe];!!ie[fe]!=!!be.used&&be.fire(new e.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:fe}))}this.light.recalculate(y),this.sky.recalculate(y),this.projection.recalculate(y),this.z=y.zoom,N&&this.fire(new e.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let y=Object.keys(this._changedImages);if(y.length){for(let N in this.tileManagers)this.tileManagers[N].reloadTilesForDependencies(["icons","patterns"],y);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let y in this.tileManagers)this.tileManagers[y].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(y,N){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(y,!1),removedIds:N})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(y,N={}){var ie;this._checkLoaded();let fe=this.serialize();if(y=N.transformStyle?N.transformStyle(fe,y):y,((ie=N.validate)===null||ie===void 0||ie)&&Fu(this,e.F(y)))return!1;(y=e.bV(y)).layers=e.bS(y.layers);let be=e.bW(fe,y),Re=this._getOperationsToPerform(be);if(Re.unimplemented.length>0)throw new Error(`Unimplemented: ${Re.unimplemented.join(", ")}.`);if(Re.operations.length===0)return!1;for(let je of Re.operations)je();return this.stylesheet=y,this._serializedLayers=null,this.fire(new e.n("style.load",{style:this})),!0}_getOperationsToPerform(y){let N=[],ie=[];for(let fe of y)switch(fe.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":N.push(()=>this.addLayer.apply(this,fe.args));break;case"removeLayer":N.push(()=>this.removeLayer.apply(this,fe.args));break;case"setPaintProperty":N.push(()=>this.setPaintProperty.apply(this,fe.args));break;case"setLayoutProperty":N.push(()=>this.setLayoutProperty.apply(this,fe.args));break;case"setFilter":N.push(()=>this.setFilter.apply(this,fe.args));break;case"addSource":N.push(()=>this.addSource.apply(this,fe.args));break;case"removeSource":N.push(()=>this.removeSource.apply(this,fe.args));break;case"setLayerZoomRange":N.push(()=>this.setLayerZoomRange.apply(this,fe.args));break;case"setLight":N.push(()=>this.setLight.apply(this,fe.args));break;case"setGeoJSONSourceData":N.push(()=>this.setGeoJSONSourceData.apply(this,fe.args));break;case"setGlyphs":N.push(()=>this.setGlyphs.apply(this,fe.args));break;case"setSprite":N.push(()=>this.setSprite.apply(this,fe.args));break;case"setTerrain":N.push(()=>this.map.setTerrain.apply(this,fe.args));break;case"setSky":N.push(()=>this.setSky.apply(this,fe.args));break;case"setProjection":this.setProjection.apply(this,fe.args);break;case"setGlobalState":N.push(()=>this.setGlobalState.apply(this,fe.args));break;case"setTransition":N.push(()=>{});break;default:ie.push(fe.command)}return{operations:N,unimplemented:ie}}addImage(y,N){if(this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" already exists.`)));this.imageManager.addImage(y,N),this._afterImageUpdated(y)}updateImage(y,N){this.imageManager.updateImage(y,N)}getImage(y){return this.imageManager.getImage(y)}removeImage(y){if(!this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" does not exist.`)));this.imageManager.removeImage(y),this._afterImageUpdated(y)}_afterImageUpdated(y){this._availableImages=this.imageManager.listImages(),this._changedImages[y]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(y,N,ie={}){var fe;if(this._checkLoaded(),this.tileManagers[y]!==void 0)throw new Error(`Source "${y}" already exists.`);if(!N.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(N).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(N.type)&&this._validate(e.F.source,`sources.${y}`,N,null,ie))return;!((fe=this.map)===null||fe===void 0)&&fe._collectResourceTiming&&(N.collectResourceTiming=!0);let be=this.tileManagers[y]=new Sr(y,N,this.dispatcher);be.style=this,be.setEventedParent(this,()=>({isSourceLoaded:be.loaded(),source:be.serialize(),sourceId:y})),be.onAdd(this.map),this._changed=!0}removeSource(y){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);for(let ie in this._layers)if(this._layers[ie].source===y)return this.fire(new e.l(new Error(`Source "${y}" cannot be removed while layer "${ie}" is using it.`)));let N=this.tileManagers[y];delete this.tileManagers[y],delete this._updatedSources[y],N.fire(new e.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:y})),N.setEventedParent(null),N.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(y,N){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);let ie=this.tileManagers[y].getSource();if(ie.type!=="geojson")throw new Error(`geojsonSource.type is ${ie.type}, which is !== 'geojson`);ie.setData(N),this._changed=!0}getSource(y){var N;return(N=this.tileManagers[y])===null||N===void 0?void 0:N.getSource()}addLayer(y,N,ie={}){this._checkLoaded();let fe=y.id;if(this.getLayer(fe))return void this.fire(new e.l(new Error(`Layer "${fe}" already exists on this map.`)));let be;if(y.type==="custom"){if(Fu(this,e.bX(y)))return;be=e.bT(y,this._globalState)}else{if("source"in y&&typeof y.source=="object"&&(this.addSource(fe,y.source),y=e.bV(y),y=e.e(y,{source:fe})),this._validate(e.F.layer,`layers.${fe}`,y,{arrayIndex:-1},ie))return;be=e.bT(y,this._globalState),this._validateLayer(be),be.setEventedParent(this,{layer:{id:fe}})}let Re=N?this._order.indexOf(N):this._order.length;if(N&&Re===-1)this.fire(new e.l(new Error(`Cannot add layer "${fe}" before non-existing layer "${N}".`)));else{if(this._order.splice(Re,0,fe),this._layerOrderChanged=!0,this._layers[fe]=be,this._removedLayers[fe]&&be.source&&be.type!=="custom"){let je=this._removedLayers[fe];delete this._removedLayers[fe],je.type!==be.type?this._updatedSources[be.source]="clear":(this._updatedSources[be.source]="reload",this.tileManagers[be.source].pause())}this._updateLayer(be),be.onAdd&&be.onAdd(this.map)}}moveLayer(y,N){if(this._checkLoaded(),this._changed=!0,!this._layers[y])return void this.fire(new e.l(new Error(`The layer '${y}' does not exist in the map's style and cannot be moved.`)));if(y===N)return;let ie=this._order.indexOf(y);this._order.splice(ie,1);let fe=N?this._order.indexOf(N):this._order.length;N&&fe===-1?this.fire(new e.l(new Error(`Cannot move layer "${y}" before non-existing layer "${N}".`))):(this._order.splice(fe,0,y),this._layerOrderChanged=!0)}removeLayer(y){this._checkLoaded();let N=this._layers[y];if(!N)return void this.fire(new e.l(new Error(`Cannot remove non-existing layer "${y}".`)));N.setEventedParent(null);let ie=this._order.indexOf(y);this._order.splice(ie,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[y]=N,delete this._layers[y],this._serializedLayers&&delete this._serializedLayers[y],delete this._updatedLayers[y],delete this._updatedPaintProps[y],N.onRemove&&N.onRemove(this.map)}getLayer(y){return this._layers[y]}getLayersOrder(){return[...this._order]}hasLayer(y){return y in this._layers}setLayerZoomRange(y,N,ie){this._checkLoaded();let fe=this.getLayer(y);fe?fe.minzoom===N&&fe.maxzoom===ie||(N!=null&&(fe.minzoom=N),ie!=null&&(fe.maxzoom=ie),this._updateLayer(fe)):this.fire(new e.l(new Error(`Cannot set the zoom range of non-existing layer "${y}".`)))}setFilter(y,N,ie={}){this._checkLoaded();let fe=this.getLayer(y);if(fe){if(!e.bQ(fe.filter,N))return N==null?(fe.setFilter(void 0),void this._updateLayer(fe)):void(this._validate(e.F.filter,`layers.${fe.id}.filter`,N,null,ie)||(fe.setFilter(e.bV(N)),this._updateLayer(fe)))}else this.fire(new e.l(new Error(`Cannot filter non-existing layer "${y}".`)))}getFilter(y){return e.bV(this.getLayer(y).filter)}setLayoutProperty(y,N,ie,fe={}){this._checkLoaded();let be=this.getLayer(y);be?e.bQ(be.getLayoutProperty(N),ie)||(be.setLayoutProperty(N,ie,fe),this._updateLayer(be)):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}getLayoutProperty(y,N){let ie=this.getLayer(y);if(ie)return ie.getLayoutProperty(N);this.fire(new e.l(new Error(`Cannot get style of non-existing layer "${y}".`)))}setPaintProperty(y,N,ie,fe={}){this._checkLoaded();let be=this.getLayer(y);be?e.bQ(be.getPaintProperty(N),ie)||this._updatePaintProperty(be,N,ie,fe):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}_updatePaintProperty(y,N,ie,fe={}){y.setPaintProperty(N,ie,fe)&&this._updateLayer(y),e.bU(y)&&N==="raster-fade-duration"&&this.tileManagers[y.source].setRasterFadeDuration(ie),this._changed=!0,this._updatedPaintProps[y.id]=!0,this._serializedLayers=null}getPaintProperty(y,N){return this.getLayer(y).getPaintProperty(N)}setFeatureState(y,N){this._checkLoaded();let ie=y.source,fe=y.sourceLayer,be=this.tileManagers[ie];if(be===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let Re=be.getSource().type;Re==="geojson"&&fe?this.fire(new e.l(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Re!=="vector"||fe?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),be.setFeatureState(fe,y.id,N)):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(y,N){this._checkLoaded();let ie=y.source,fe=this.tileManagers[ie];if(fe===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let be=fe.getSource().type,Re=be==="vector"?y.sourceLayer:void 0;be!=="vector"||Re?N&&typeof y.id!="string"&&typeof y.id!="number"?this.fire(new e.l(new Error("A feature id is required to remove its specific state property."))):fe.removeFeatureState(Re,y.id,N):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(y){this._checkLoaded();let N=y.source,ie=y.sourceLayer,fe=this.tileManagers[N];if(fe!==void 0)return fe.getSource().type!=="vector"||ie?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),fe.getFeatureState(ie,y.id)):void this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.l(new Error(`The source '${N}' does not exist in the map's style.`)))}getTransition(){var y;return e.e({duration:300,delay:0},(y=this.stylesheet)===null||y===void 0?void 0:y.transition)}serialize(){if(!this._loaded)return;let y=e.bY(this.tileManagers,be=>be.serialize()),N=this._serializeByIds(this._order,!0),ie=this.map.getTerrain()||void 0,fe=this.stylesheet;return e.bZ({version:fe.version,name:fe.name,metadata:fe.metadata,light:fe.light,sky:fe.sky,center:fe.center,zoom:fe.zoom,bearing:fe.bearing,pitch:fe.pitch,sprite:fe.sprite,glyphs:fe.glyphs,transition:fe.transition,projection:fe.projection,sources:y,layers:N,terrain:ie},be=>be!==void 0)}_updateLayer(y){this._updatedLayers[y.id]=!0,y.source&&!this._updatedSources[y.source]&&this.tileManagers[y.source].getSource().type!=="raster"&&(this._updatedSources[y.source]="reload",this.tileManagers[y.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(y){let N=Re=>this._layers[Re].type==="fill-extrusion",ie={},fe=[];for(let Re=this._order.length-1;Re>=0;Re--){let je=this._order[Re];if(N(je)){ie[je]=Re;for(let Ze of y){let ut=Ze[je];if(ut)for(let ft of ut)fe.push(ft)}}}fe.sort((Re,je)=>je.intersectionZ-Re.intersectionZ);let be=[];for(let Re=this._order.length-1;Re>=0;Re--){let je=this._order[Re];if(N(je))for(let Ze=fe.length-1;Ze>=0;Ze--){let ut=fe[Ze].feature;if(ie[ut.layer.id]this.map.terrain.getElevation(ft,Dt,Gt):void 0));return this.placement&&be.push(function(ut,ft,Dt,Gt,Kt,st,It){let Ut={},ir=st.queryRenderedSymbols(Gt),dr=[];for(let Ar of Object.keys(ir).map(Number))dr.push(It[Ar]);dr.sort(K);for(let Ar of dr){let hr=Ar.featureIndex.lookupSymbolFeatures(ir[Ar.bucketInstanceId],ft,Ar.bucketIndex,Ar.sourceLayerIndex,{filterSpec:Kt.filter,globalState:Kt.globalState},Kt.layers,Kt.availableImages,ut);for(let vr in hr){Ut[vr]||(Ut[vr]=[]);let Or=hr[vr];Or.sort((Cr,ta)=>{let ka=Ar.featureSortOrder;if(ka){let Ta=ka.indexOf(Cr.featureIndex);return ka.indexOf(ta.featureIndex)-Ta}return ta.featureIndex-Cr.featureIndex});for(let Cr of Or)Ut[vr].push(Cr)}}return function(Ar,hr,vr){for(let Or in Ar)for(let Cr of Ar[Or])H(Cr,vr[hr[Or].source]);return Ar}(Ut,ut,Dt)}(this._layers,Re,this.tileManagers,y,Ze,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(be)}querySourceFeatures(y,N){N?.filter&&this._validate(e.F.filter,"querySourceFeatures.filter",N.filter,null,N);let ie=this.tileManagers[y];return ie?function(fe,be){let Re=fe.getRenderableIds().map(ut=>fe.getTileByID(ut)),je=[],Ze={};for(let ut of Re){let ft=ut.tileID.canonical.key;Ze[ft]||(Ze[ft]=!0,ut.querySourceFeatures(je,be))}return je}(ie,N?Object.assign(Object.assign({},N),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(y,N={}){this._checkLoaded();let ie=this.light.getLight(),fe=!1;for(let Re in y)if(!e.bQ(y[Re],ie[Re])){fe=!0;break}if(!fe)return;let be={now:m(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(y,N),this.light.updateTransitions(be)}getProjection(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.projection}setProjection(y){this._checkLoaded();let N=y??{type:"mercator"};if(this.stylesheet.projection=y,this.projection){if(this.projection.name===N.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(N.type)}getSky(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.sky}setSky(y,N={}){this._checkLoaded();let ie=this.getSky(),fe=!1;if(!y&&!ie)return;if(y&&!ie)fe=!0;else if(!y&&ie)fe=!0;else for(let Re in y)if(!e.bQ(y[Re],ie[Re])){fe=!0;break}if(!fe)return;let be={now:m(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=y,this.sky.setSky(y,N),this.sky.updateTransitions(be)}_setProjectionInternal(y){let N=function(ie,fe){let be={constrainOverride:fe};if(Array.isArray(ie)){let Re=new Bo({type:ie});return{projection:Re,transform:new os(be),cameraHelper:new rl(Re)}}switch(ie){case"mercator":return{projection:new io,transform:new Eo(be),cameraHelper:new Wo};case"globe":{let Re=new Bo({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:Re,transform:new os(be),cameraHelper:new rl(Re)}}case"vertical-perspective":return{projection:new Vs,transform:new vs(be),cameraHelper:new ms};default:return e.w(`Unknown projection name: ${ie}. Falling back to mercator projection.`),{projection:new io,transform:new Eo(be),cameraHelper:new Wo}}}(y,this.map.transformConstrain);this.projection=N.projection,this.map.migrateProjection(N.transform,N.cameraHelper);for(let ie in this.tileManagers)this.tileManagers[ie].reload()}_validate(y,N,ie,fe,be={}){return be?.validate!==!1&&Fu(this,y.call(e.F,e.e({key:N,style:this.serialize(),value:ie,styleSpec:e.x},fe)))}_remove(y=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),Ye().off(Ae,this._rtlPluginLoaded);for(let N in this._layers)this._layers[N].setEventedParent(null);for(let N in this.tileManagers){let ie=this.tileManagers[N];ie.setEventedParent(null),ie.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),y&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(y)}_clearSource(y){this.tileManagers[y].clearTiles()}_reloadSource(y){this.tileManagers[y].resume(),this.tileManagers[y].reload()}_updateSources(y){for(let N in this.tileManagers)this.tileManagers[N].update(y,this.map.terrain)}_generateCollisionBoxes(){for(let y in this.tileManagers)this._reloadSource(y)}_updatePlacement(y,N,ie,fe,be=!1){let Re=!1,je=!1,Ze={};for(let ut of this._order){let ft=this._layers[ut];if(ft.type!=="symbol")continue;if(!Ze[ft.source]){let Gt=this.tileManagers[ft.source];Ze[ft.source]=Gt.getRenderableIds(!0).map(Kt=>Gt.getTileByID(Kt)).sort((Kt,st)=>st.tileID.overscaledZ-Kt.tileID.overscaledZ||(Kt.tileID.isLessThan(st.tileID)?-1:1))}let Dt=this.crossTileSymbolIndex.addLayer(ft,Ze[ft.source],y.center.lng);Re||(Re=Dt)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),be||(be=this._layerOrderChanged||ie===0),(be||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(m(),y.zoom))&&(this.pauseablePlacement=new ai(y,this.map.terrain,this._order,be,N,ie,fe,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ze),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(m()),je=!0),Re&&this.pauseablePlacement.placement.setStale()),je||Re)for(let ut of this._order){let ft=this._layers[ut];ft.type==="symbol"&&this.placement.updateLayerOpacities(ft,Ze[ft.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(m())}_releaseSymbolFadeTiles(){for(let y in this.tileManagers)this.tileManagers[y].releaseSymbolFadeTiles()}getImages(y,N){return e._(this,void 0,void 0,function*(){let ie=yield this.imageManager.getImages(N.icons);this._updateTilesForChangedImages();let fe=this.tileManagers[N.source];return fe&&fe.setDependencies(N.tileID.key,N.type,N.icons),ie})}getGlyphs(y,N){return e._(this,void 0,void 0,function*(){let ie=yield this.glyphManager.getGlyphs(N.stacks),fe=this.tileManagers[N.source];return fe&&fe.setDependencies(N.tileID.key,N.type,[""]),ie})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(y,N={}){this._checkLoaded(),y&&this._validate(e.F.glyphs,"glyphs",y,null,N)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=y,this.glyphManager.entries={},this.glyphManager.setURL(y))}getDashes(y,N){return e._(this,void 0,void 0,function*(){let ie={};for(let[fe,be]of Object.entries(N.dashes))ie[fe]=this.lineAtlas.getDash(be.dasharray,be.round);return ie})}addSprite(y,N,ie={},fe){this._checkLoaded();let be=[{id:y,url:N}],Re=[...w(this.stylesheet.sprite),...be];this._validate(e.F.sprite,"sprite",Re,null,ie)||(this.stylesheet.sprite=Re,this._loadSprite(be,!0,fe))}removeSprite(y){this._checkLoaded();let N=w(this.stylesheet.sprite);if(N.find(ie=>ie.id===y)){if(this._spritesImagesIds[y])for(let ie of this._spritesImagesIds[y])this.imageManager.removeImage(ie),this._changedImages[ie]=!0;N.splice(N.findIndex(ie=>ie.id===y),1),this.stylesheet.sprite=N.length>0?N:void 0,delete this._spritesImagesIds[y],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}else this.fire(new e.l(new Error(`Sprite "${y}" doesn't exists on this map.`)))}getSprite(){return w(this.stylesheet.sprite)}setSprite(y,N={},ie){this._checkLoaded(),y&&this._validate(e.F.sprite,"sprite",y,null,N)||(this.stylesheet.sprite=y,y?this._loadSprite(y,!0,ie):(this._unloadSprite(),ie&&ie(null)))}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(let y in this.tileManagers){let N=this.tileManagers[y];N.setEventedParent(null),N.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(let y in this._layers){let N=this._layers[y];N.setEventedParent(null),N.onRemove&&N.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var bc=e.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Lh{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(y,N,ie,fe,be,Re,je,Ze,ut){this.context=y;let ft=this.boundPaintVertexBuffers.length!==fe.length;for(let Dt=0;!ft&&Dt({u_texture:0,u_ele_delta:pe,u_fog_matrix:y,u_fog_color:N?N.properties.get("fog-color"):e.bo.white,u_fog_ground_blend:N?N.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:fe?0:N?N.calculateFogBlendOpacity(ie):0,u_horizon_color:N?N.properties.get("horizon-color"):e.bo.white,u_horizon_fog_blend:N?N.properties.get("horizon-fog-blend"):1,u_is_globe_mode:fe?1:0}),Ju={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function ss(pe){let y=[];for(let N of pe){if(N===null)continue;let ie=N.split(" ");y.push(ie.pop())}return y}class ah{constructor(y,N,ie,fe,be,Re,je,Ze,ut=[]){let ft=y.gl;this.program=ft.createProgram();let Dt=ss(N.staticAttributes),Gt=ie?ie.getBinderAttributes():[],Kt=Dt.concat(Gt),st=Ai.prelude.staticUniforms?ss(Ai.prelude.staticUniforms):[],It=je.staticUniforms?ss(je.staticUniforms):[],Ut=N.staticUniforms?ss(N.staticUniforms):[],ir=ie?ie.getBinderUniforms():[],dr=st.concat(It).concat(Ut).concat(ir),Ar=[];for(let Ta of dr)Ar.includes(Ta)||Ar.push(Ta);let hr=ie?ie.defines():[];Ko(ft)&&hr.unshift("#version 300 es"),be&&hr.push("#define OVERDRAW_INSPECTOR;"),Re&&hr.push("#define TERRAIN3D;"),Ze&&hr.push(Ze),ut&&hr.push(...ut);let vr=hr.concat(Ai.prelude.fragmentSource,je.fragmentSource,N.fragmentSource).join(` +`}),staticAttributes:ie,staticUniforms:Re}}class Xn{constructor(y,N,ie){this.vertexBuffer=y,this.indexBuffer=N,this.segments=ie}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var eo=e.aS([{name:"a_pos",type:"Int16",components:2}]);let gi="#define PROJECTION_MERCATOR",qi="mercator";class io{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return qi}get shaderDefine(){return gi}get shaderPreludeCode(){return Ai.projectionMercator}get vertexShaderPreludeCode(){return Ai.projectionMercator.vertexSource}get subdivisionGranularity(){return e.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(y){}getMeshFromTileID(y,N,ie,fe,be){if(this._cachedMesh)return this._cachedMesh;let Re=new e.aU;Re.emplaceBack(0,0),Re.emplaceBack(e.a6,0),Re.emplaceBack(0,e.a6),Re.emplaceBack(e.a6,e.a6);let je=y.createVertexBuffer(Re,eo.members),Ze=e.aV.simpleSegment(0,0,4,2),ut=new e.aW;ut.emplaceBack(1,0,2),ut.emplaceBack(1,2,3);let ft=y.createIndexBuffer(ut);return this._cachedMesh=new Xn(je,ft,Ze),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(y){}}class oo{constructor(y=0,N=0,ie=0,fe=0){if(isNaN(y)||y<0||isNaN(N)||N<0||isNaN(ie)||ie<0||isNaN(fe)||fe<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=y,this.bottom=N,this.left=ie,this.right=fe}interpolate(y,N,ie){return N.top!=null&&y.top!=null&&(this.top=e.H.number(y.top,N.top,ie)),N.bottom!=null&&y.bottom!=null&&(this.bottom=e.H.number(y.bottom,N.bottom,ie)),N.left!=null&&y.left!=null&&(this.left=e.H.number(y.left,N.left,ie)),N.right!=null&&y.right!=null&&(this.right=e.H.number(y.right,N.right,ie)),this}getCenter(y,N){let ie=e.al((this.left+y-this.right)/2,0,y),fe=e.al((this.top+N-this.bottom)/2,0,N);return new e.P(ie,fe)}equals(y){return this.top===y.top&&this.bottom===y.bottom&&this.left===y.left&&this.right===y.right}clone(){return new oo(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function Vn(pe,y){if(!pe.renderWorldCopies||pe.lngRange)return;let N=y.lng-pe.center.lng;y.lng+=N>180?-360:N<-180?360:0}function qn(pe){return Math.max(0,Math.floor(pe))}class Hi{constructor(y,N){var ie;this.applyConstrain=(fe,be)=>this._constrainOverride!==null?this._constrainOverride(fe,be):this._callbacks.defaultConstrain(fe,be),this._callbacks=y,this._tileSize=512,this._renderWorldCopies=N?.renderWorldCopies===void 0||!!N?.renderWorldCopies,this._minZoom=N?.minZoom||0,this._maxZoom=N?.maxZoom||22,this._minPitch=N?.minPitch==null?0:N?.minPitch,this._maxPitch=N?.maxPitch==null?60:N?.maxPitch,this._constrainOverride=(ie=N?.constrainOverride)!==null&&ie!==void 0?ie:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new e.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=qn(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new oo,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(y,N,ie){this._constrainOverride=y.constrainOverride,this._latRange=y.latRange,this._lngRange=y.lngRange,this._width=y.width,this._height=y.height,this._center=y.center,this._elevation=y.elevation,this._minElevationForCurrentTile=y.minElevationForCurrentTile,this._zoom=y.zoom,this._tileZoom=qn(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=y.bearingInRadians,this._fovInRadians=y.fovInRadians,this._pitchInRadians=y.pitchInRadians,this._rollInRadians=y.rollInRadians,this._unmodified=y.unmodified,this._edgeInsets=new oo(y.padding.top,y.padding.bottom,y.padding.left,y.padding.right),this._minZoom=y.minZoom,this._maxZoom=y.maxZoom,this._minPitch=y.minPitch,this._maxPitch=y.maxPitch,this._renderWorldCopies=y.renderWorldCopies,this._cameraToCenterDistance=y.cameraToCenterDistance,this._nearZ=y.nearZ,this._farZ=y.farZ,this._autoCalculateNearFarZ=!ie&&y.autoCalculateNearFarZ,N&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(y){this._minElevationForCurrentTile=y}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(y){this._minZoom!==y&&(this._minZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(y){this._maxZoom!==y&&(this._maxZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(y){this._minPitch!==y&&(this._minPitch=y,this.setPitch(Math.max(this.pitch,y)))}get maxPitch(){return this._maxPitch}setMaxPitch(y){this._maxPitch!==y&&(this._maxPitch=y,this.setPitch(Math.min(this.pitch,y)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(y){y===void 0?y=!0:y===null&&(y=!1),this._renderWorldCopies=y}get constrainOverride(){return this._constrainOverride}setConstrainOverride(y){y===void 0&&(y=null),this._constrainOverride!==y&&(this._constrainOverride=y,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(y){let N=e.X(y,-180,180)*Math.PI/180;var ie,fe,be,Re,je,Ze,ut,ft,Dt;this._bearingInRadians!==N&&(this._unmodified=!1,this._bearingInRadians=N,this._calcMatrices(),this._rotationMatrix=n(),ie=this._rotationMatrix,be=-this._bearingInRadians,Re=(fe=this._rotationMatrix)[0],je=fe[1],Ze=fe[2],ut=fe[3],ft=Math.sin(be),Dt=Math.cos(be),ie[0]=Re*Dt+Ze*ft,ie[1]=je*Dt+ut*ft,ie[2]=Re*-ft+Ze*Dt,ie[3]=je*-ft+ut*Dt)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(y){let N=e.al(y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==N&&(this._unmodified=!1,this._pitchInRadians=N,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(y){let N=y/180*Math.PI;this._rollInRadians!==N&&(this._unmodified=!1,this._rollInRadians=N,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return e.aX(this._fovInRadians)}setFov(y){y=e.al(y,.1,150),this.fov!==y&&(this._unmodified=!1,this._fovInRadians=e.an(y),this._calcMatrices())}get zoom(){return this._zoom}setZoom(y){let N=this.applyConstrain(this._center,y).zoom;this._zoom!==N&&(this._unmodified=!1,this._zoom=N,this._tileZoom=Math.max(0,Math.floor(N)),this._scale=e.ao(N),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(y){y.lat===this._center.lat&&y.lng===this._center.lng||(this._unmodified=!1,this._center=y,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(y){y!==this._elevation&&(this._elevation=y,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(y){this._edgeInsets.equals(y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,y,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(y,N){this._autoCalculateNearFarZ=!1,this._nearZ=y,this._farZ=N,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(y){return this._edgeInsets.equals(y)}interpolatePadding(y,N,ie){this._unmodified=!1,this._edgeInsets.interpolate(y,N,ie),this.constrainInternal(),this._calcMatrices()}resize(y,N,ie=!0){this._width=y,this._height=N,ie&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var y,N;return((y=this._latRange)===null||y===void 0?void 0:y.length)!==2||((N=this._lngRange)===null||N===void 0?void 0:N.length)!==2?null:new q([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(y){y?(this._lngRange=[y.getWest(),y.getEast()],this._latRange=[y.getSouth(),y.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-e.am,e.am])}getCameraQueryGeometry(y,N){if(N.length===1)return[N[0],y];{let{minX:ie,minY:fe,maxX:be,maxY:Re}=e.a8.fromPoints(N).extend(y);return[new e.P(ie,fe),new e.P(be,fe),new e.P(be,Re),new e.P(ie,Re),new e.P(ie,fe)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let y=this._unmodified,{center:N,zoom:ie}=this.applyConstrain(this.center,this.zoom);this.setCenter(N),this.setZoom(ie),this._unmodified=y,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let y=e.ap(new Float64Array(16));e.S(y,y,[this._width/2,-this._height/2,1]),e.Q(y,y,[1,-1,0]),this._clipSpaceToPixelsMatrix=y,y=e.ap(new Float64Array(16)),e.S(y,y,[1,-1,1]),e.Q(y,y,[-1,-1,0]),e.S(y,y,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=y,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){let be=ie!==void 0?ie:this.bearing,Re=fe=fe!==void 0?fe:this.pitch,{distanceToCenter:je,clampedElevation:Ze}=this._distanceToCenterFromAltElevationPitch(N,this.elevation,Re),{x:ut,y:ft}=vt(Re,be),Dt=e.a7.fromLngLat(y,N),Gt,Kt,st=e.aY(1,Dt.y),It=0;do{if(It+=1,It>10)break;Kt=je/st,Gt=new e.a7(Dt.x+ut*Kt,Dt.y+ft*Kt),st=1/Gt.meterInMercatorCoordinateUnits()}while(Math.abs(je-Kt*st)>1e-12);return{center:Gt.toLngLat(),elevation:Ze,zoom:e.ar(this.height/2/Math.tan(this.fovInRadians/2)/Kt/this.tileSize)}}recalculateZoomAndCenter(y){if(this.elevation-y==0)return;let N=1/this.worldSize,ie=e.aq(1,this.center.lat)*this.worldSize,fe=e.a7.fromLngLat(this.center,this.elevation),be=fe.x/N,Re=fe.y/N,je=fe.z/N,Ze=this.pitch,ut=this.bearing,{x:ft,y:Dt,z:Gt}=vt(Ze,ut),Kt=this.cameraToCenterDistance,st=be+Kt*-ft,It=Re+Kt*-Dt,Ut=je+Kt*Gt,{distanceToCenter:ir,clampedElevation:dr}=this._distanceToCenterFromAltElevationPitch(Ut/ie,y,Ze),Ar=ir*ie,hr=new e.a7((st+ft*Ar)*N,(It+Dt*Ar)*N,0).toLngLat(),vr=e.aq(1,hr.lat),Or=e.ar(this.height/2/Math.tan(this.fovInRadians/2)/ir/vr/this.tileSize);this._elevation=dr,this._center=hr,this.setZoom(Or)}_distanceToCenterFromAltElevationPitch(y,N,ie){let fe=-Math.cos(e.an(ie)),be=y-N,Re,je=N;return fe*be>=0||Math.abs(fe)<.1?(Re=1e4,je=y+Re*fe):Re=-be/fe,{distanceToCenter:Re,clampedElevation:je}}getCameraPoint(){let y=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(y*Math.sin(this.rollInRadians),y*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/y).toLngLat()}getMercatorTileCoordinates(y){if(!y)return[0,0,1,1];let N=y.canonical.z>=0?1<this.max[0]||y.aabb.min[1]>this.max[1]||y.aabb.min[2]>this.max[2]||y.aabb.max[0]0?(N+=y[fe]*this.min[fe],ie+=y[fe]*this.max[fe]):(ie+=y[fe]*this.min[fe],N+=y[fe]*this.max[fe]);return N>=0?2:ie<0?0:1}}class Ro{distanceToTile2d(y,N,ie,fe){let be=fe,Re=be.distanceX([y,N]),je=be.distanceY([y,N]);return Math.hypot(Re,je)}getWrap(y,N,ie){return ie}getTileBoundingVolume(y,N,ie,fe){var be,Re;let je=0,Ze=0;if(fe?.terrain){let ft=new e.a3(y.z,N,y.z,y.x,y.y),Dt=fe.terrain.getMinMaxElevation(ft);je=(be=Dt.minElevation)!==null&&be!==void 0?be:Math.min(0,ie),Ze=(Re=Dt.maxElevation)!==null&&Re!==void 0?Re:Math.max(0,ie)}let ut=1<fe}allowWorldCopies(){return!0}prepareNextFrame(){}}class go{constructor(y,N,ie){this.points=y,this.planes=N,this.aabb=ie}static fromInvProjectionMatrix(y,N=1,ie=0,fe,be){let Re=be?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],je=Math.pow(2,ie),Ze=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Gt=>function(Kt,st,It,Ut){let ir=e.aE([],Kt,st),dr=1/ir[3]/It*Ut;return e.b4(ir,ir,[dr,dr,1/ir[3],dr])}(Gt,y,N,je));fe&&function(Gt,Kt,st,It){let Ut=It?4:0,ir=It?0:4,dr=0,Ar=[],hr=[];for(let Cr=0;Cr<4;Cr++){let ta=e.b0([],Gt[Cr+ir],Gt[Cr+Ut]),ka=e.b5(ta);e.aZ(ta,ta,1/ka),Ar.push(ka),hr.push(ta)}for(let Cr=0;Cr<4;Cr++){let ta=e.b6(Gt[Cr+Ut],hr[Cr],st);dr=ta!==null&&ta>=0?Math.max(dr,ta):Math.max(dr,Ar[Cr])}let vr=function(Cr,ta){let ka=e.b0([],Cr[ta[0]],Cr[ta[1]]),Ta=e.b0([],Cr[ta[2]],Cr[ta[1]]),Ra=[0,0,0,0];return e.b1(Ra,e.b2([],ka,Ta)),Ra[3]=-e.b3(Ra,Cr[ta[0]]),Ra}(Gt,Kt),Or=function(Cr,ta){let ka=e.b7(Cr),Ta=e.b8([],Cr,1/ka),Ra=e.b0([],ta,e.aZ([],Ta,e.b3(ta,Ta))),ua=e.b7(Ra);if(ua>0){let ia=Math.sqrt(1-Ta[3]*Ta[3]),ma=e.aZ([],Ta,-Ta[3]),da=e.a_([],ma,e.aZ([],Ra,ia/ua));return e.b9(ta,da)}return null}(st,vr);if(Or!==null){let Cr=Or/e.b3(hr[0],vr);dr=Math.min(dr,Cr)}for(let Cr=0;Cr<4;Cr++){let ta=Math.min(dr,Ar[Cr]);Gt[Cr+ir]=[Gt[Cr+Ut][0]+hr[Cr][0]*ta,Gt[Cr+Ut][1]+hr[Cr][1]*ta,Gt[Cr+Ut][2]+hr[Cr][2]*ta,1]}}(Ze,Re[0],fe,be);let ut=Re.map(Gt=>{let Kt=e.b0([],Ze[Gt[0]],Ze[Gt[1]]),st=e.b0([],Ze[Gt[2]],Ze[Gt[1]]),It=e.b1([],e.b2([],Kt,st)),Ut=-e.b3(It,Ze[Gt[1]]);return It.concat(Ut)}),ft=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],Dt=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let Gt of Ze)for(let Kt=0;Kt<3;Kt++)ft[Kt]=Math.min(ft[Kt],Gt[Kt]),Dt[Kt]=Math.max(Dt[Kt],Gt[Kt]);return new go(Ze,ut,new Mi(ft,Dt))}}class Eo{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,N,ie){this._helper.interpolatePadding(y,N,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,N,ie=!0){this._helper.resize(y,N,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,N){this._helper.overrideNearFarZ(y,N)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(y,N){}constructor(y){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(N,ie)=>{ie=e.al(+ie,this.minZoom,this.maxZoom);let fe={center:new e.W(N.lng,N.lat),zoom:ie},be=this._helper._lngRange;if(!this._helper._renderWorldCopies&&be===null){let hr=179.9999999999;be=[-hr,hr]}let Re=this.tileSize*e.ao(fe.zoom),je=0,Ze=Re,ut=0,ft=Re,Dt=0,Gt=0,{x:Kt,y:st}=this.size;if(this._helper._latRange){let hr=this._helper._latRange;je=e.Y(hr[1])*Re,Ze=e.Y(hr[0])*Re,Ze-jeZe&&(dr=Ze-hr)}if(be){let hr=(ut+ft)/2,vr=It;this._helper._renderWorldCopies&&(vr=e.X(It,hr-Re/2,hr+Re/2));let Or=Kt/2;vr-Orft&&(ir=ft-Or)}if(ir!==void 0||dr!==void 0){let hr=new e.P(ir??It,dr??Ut);fe.center=_r(Re,hr).wrap()}return fe},this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._coveringTilesDetailsProvider=new Ro}clone(){let y=new Eo;return y.apply(this,!1),y}apply(y,N,ie){this._helper.apply(y,N,ie)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(y){let N=[new e.ba(0,y)];if(this._helper._renderWorldCopies){let ie=this.screenPointToMercatorCoordinate(new e.P(0,0)),fe=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,0)),be=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,this._helper._height)),Re=this.screenPointToMercatorCoordinate(new e.P(0,this._helper._height)),je=Math.floor(Math.min(ie.x,fe.x,be.x,Re.x)),Ze=Math.floor(Math.max(ie.x,fe.x,be.x,Re.x)),ut=1;for(let ft=je-ut;ft<=Ze+ut;ft++)ft!==0&&N.push(new e.ba(ft,y))}return N}getCameraFrustum(){return go.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(y){let N=this.screenPointToLocation(this.centerPoint,y),ie=y?y.getElevationForLngLatZoom(N,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(ie)}setLocationAtPoint(y,N){let ie=e.aq(this.elevation,this.center.lat),fe=this.screenPointToMercatorCoordinateAtZ(N,ie),be=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,ie),Re=e.a7.fromLngLat(y),je=new e.a7(Re.x-(fe.x-be.x),Re.y-(fe.y-be.y));this.setCenter(je?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(y,N){return N?this.coordinatePoint(e.a7.fromLngLat(y),N.getElevationForLngLat(y,this),this._pixelMatrix3D):this.coordinatePoint(e.a7.fromLngLat(y))}screenPointToLocation(y,N){var ie;return(ie=this.screenPointToMercatorCoordinate(y,N))===null||ie===void 0?void 0:ie.toLngLat()}screenPointToMercatorCoordinate(y,N){if(N){let ie=N.pointCoordinate(y);if(ie!=null)return ie}return this.screenPointToMercatorCoordinateAtZ(y)}screenPointToMercatorCoordinateAtZ(y,N){let ie=N||0,fe=[y.x,y.y,0,1],be=[y.x,y.y,1,1];e.aE(fe,fe,this._pixelMatrixInverse),e.aE(be,be,this._pixelMatrixInverse);let Re=fe[3],je=be[3],Ze=fe[1]/Re,ut=be[1]/je,ft=fe[2]/Re,Dt=be[2]/je,Gt=ft===Dt?0:(ie-ft)/(Dt-ft);return new e.a7(e.H.number(fe[0]/Re,be[0]/je,Gt)/this.worldSize,e.H.number(Ze,ut,Gt)/this.worldSize,ie)}coordinatePoint(y,N=0,ie=this._pixelMatrix){let fe=[y.x*this.worldSize,y.y*this.worldSize,N,1];return e.aE(fe,fe,ie),new e.P(fe[0]/fe[3],fe[1]/fe[3])}getBounds(){let y=Math.max(0,this._helper._height/2-Xt(this));return new q().extend(this.screenPointToLocation(new e.P(0,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new e.P(0,this._helper._height)))}isPointOnMapSurface(y,N){return N?N.pointCoordinate(y)!=null:y.y>this.height/2-Xt(this)}calculatePosMatrix(y,N=!1,ie){var fe;let be=(fe=y.key)!==null&&fe!==void 0?fe:e.bb(y.wrap,y.canonical.z,y.canonical.z,y.canonical.x,y.canonical.y),Re=N?this._alignedPosMatrixCache:this._posMatrixCache;if(Re.has(be)){let ut=Re.get(be);return ie?ut.f32:ut.f64}let je=or(y,this.worldSize);e.U(je,N?this._alignedProjMatrix:this._viewProjMatrix,je);let Ze={f64:je,f32:new Float32Array(je)};return Re.set(be,Ze),ie?Ze.f32:Ze.f64}calculateFogMatrix(y){let N=y.key,ie=this._fogMatrixCacheF32;if(ie.has(N))return ie.get(N);let fe=or(y,this.worldSize);return e.U(fe,this._fogMatrix,fe),ie.set(N,new Float32Array(fe)),ie.get(N)}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}_calculateNearFarZIfNeeded(y,N,ie){if(!this._helper.autoCalculateNearFarZ)return;let fe=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),be=y-fe*this._helper._pixelPerMeter/Math.cos(N),Re=fe<0?be:y,je=Math.PI/2+this.pitchInRadians,Ze=e.an(this.fov)*(Math.abs(Math.cos(e.an(this.roll)))*this.height+Math.abs(Math.sin(e.an(this.roll)))*this.width)/this.height*(.5+ie.y/this.height),ut=Math.sin(Ze)*Re/Math.sin(e.al(Math.PI-je-Ze,.01,Math.PI-.01)),ft=Xt(this),Dt=Math.atan(ft/this._helper.cameraToCenterDistance),Gt=e.an(.75),Kt=Dt>Gt?2*Dt*(.5+ie.y/(2*ft)):Gt,st=Math.sin(Kt)*Re/Math.sin(e.al(Math.PI-je-Kt,.01,Math.PI-.01)),It=Math.min(ut,st);this._helper._farZ=1.01*(Math.cos(Math.PI/2-N)*It+Re),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let y=this.centerOffset,N=rr(this.worldSize,this.center),ie=N.x,fe=N.y;this._helper._pixelPerMeter=e.aq(1,this.center.lat)*this.worldSize;let be=e.an(Math.min(this.pitch,$t)),Re=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(be)),je;var Ze,ut;this._calculateNearFarZIfNeeded(Re,be,y),je=new Float64Array(16),e.bc(je,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(Ze=this._invProjMatrix)[0]=1/(ut=je)[0],Ze[1]=0,Ze[2]=0,Ze[3]=0,Ze[4]=0,Ze[5]=1/ut[5],Ze[6]=0,Ze[7]=0,Ze[8]=0,Ze[9]=0,Ze[10]=0,Ze[11]=1/ut[14],Ze[12]=0,Ze[13]=0,Ze[14]=-1,Ze[15]=ut[10]/ut[14],je[8]=2*-y.x/this._helper._width,je[9]=2*y.y/this._helper._height,this._projectionMatrix=e.bd(je),e.S(je,je,[1,-1,1]),e.Q(je,je,[0,0,-this._helper.cameraToCenterDistance]),e.be(je,je,-this.rollInRadians),e.bf(je,je,this.pitchInRadians),e.be(je,je,-this.bearingInRadians),e.Q(je,je,[-ie,-fe,0]),this._mercatorMatrix=e.S([],je,[this.worldSize,this.worldSize,this.worldSize]),e.S(je,je,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,je),e.Q(je,je,[0,0,-this.elevation]),this._viewProjMatrix=je,this._invViewProjMatrix=e.bg([],je);let ft=[0,0,-1,1];e.aE(ft,ft,this._invViewProjMatrix),this._cameraPosition=[ft[0]/ft[3],ft[1]/ft[3],ft[2]/ft[3]],this._fogMatrix=new Float64Array(16),e.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,Re,this._helper._farZ),this._fogMatrix[8]=2*-y.x/this.width,this._fogMatrix[9]=2*y.y/this.height,e.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),e.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),e.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),e.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),e.Q(this._fogMatrix,this._fogMatrix,[-ie,-fe,0]),e.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,je);let Dt=this._helper._width%2/2,Gt=this._helper._height%2/2,Kt=Math.cos(this.bearingInRadians),st=Math.sin(-this.bearingInRadians),It=ie-Math.round(ie)+Kt*Dt+st*Gt,Ut=fe-Math.round(fe)+Kt*Gt+st*Dt,ir=new Float64Array(je);if(e.Q(ir,ir,[It>.5?It-1:It,Ut>.5?Ut-1:Ut,0]),this._alignedProjMatrix=ir,je=e.bg(new Float64Array(16),this._pixelMatrix),!je)throw new Error("failed to invert matrix");this._pixelMatrixInverse=je,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let y=this.screenPointToMercatorCoordinate(new e.P(0,0)),N=[y.x*this.worldSize,y.y*this.worldSize,0,1];return e.aE(N,N,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/y).toLngLat()}lngLatToCameraDepth(y,N){let ie=e.a7.fromLngLat(y),fe=[ie.x*this.worldSize,ie.y*this.worldSize,N,1];return e.aE(fe,fe,this._viewProjMatrix),fe[2]/fe[3]}getProjectionData(y){let{overscaledTileID:N,aligned:ie,applyTerrainMatrix:fe}=y,be=this._helper.getMercatorTileCoordinates(N),Re=N?this.calculatePosMatrix(N,ie,!0):null,je;return je=N?.terrainRttPosMatrix32f&&fe?N.terrainRttPosMatrix32f:Re||e.bh(),{mainMatrix:je,tileMercatorCoords:be,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:je}}isLocationOccluded(y){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(y,N,ie){return 1}transformLightDirection(y){return e.a$(y)}getRayDirectionFromPixel(y){throw new Error("Not implemented.")}projectTileCoordinates(y,N,ie,fe){let be=this.calculatePosMatrix(ie),Re;fe?(Re=[y,N,fe(y,N),1],e.aE(Re,Re,be)):(Re=[y,N,0,1],Oa(Re,Re,be));let je=Re[3];return{point:new e.P(Re[0]/je,Re[1]/je),signedDistanceFromCamera:je,isOccluded:!1}}populateCache(y){for(let N of y)this.calculatePosMatrix(N)}getMatrixForModel(y,N){let ie=e.a7.fromLngLat(y,N),fe=ie.meterInMercatorCoordinateUnits(),be=e.bi();return e.Q(be,be,[ie.x,ie.y,ie.z]),e.be(be,be,Math.PI),e.bf(be,be,Math.PI/2),e.S(be,be,[-fe,fe,fe]),be}getProjectionDataForCustomLayer(y=!0){let N=new e.a3(0,0,0,0,0),ie=this.getProjectionData({overscaledTileID:N,applyGlobeMatrix:y}),fe=or(N,this.worldSize);e.U(fe,this._viewProjMatrix,fe),ie.tileMercatorCoords=[0,0,1,1];let be=[e.a6,e.a6,this.worldSize/this._helper.pixelsPerMeter],Re=e.bj();return e.S(Re,fe,be),ie.fallbackMatrix=Re,ie.mainMatrix=Re,ie}getFastPathSimpleProjectionMatrix(y){return this.calculatePosMatrix(y)}}function Ao(){e.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function ds(pe){if(pe.useSlerp)if(pe.k<1){let y=e.bk(pe.startEulerAngles.roll,pe.startEulerAngles.pitch,pe.startEulerAngles.bearing),N=e.bk(pe.endEulerAngles.roll,pe.endEulerAngles.pitch,pe.endEulerAngles.bearing),ie=new Float64Array(4);e.bl(ie,y,N,pe.k);let fe=e.bm(ie);pe.tr.setRoll(fe.roll),pe.tr.setPitch(fe.pitch),pe.tr.setBearing(fe.bearing)}else pe.tr.setRoll(pe.endEulerAngles.roll),pe.tr.setPitch(pe.endEulerAngles.pitch),pe.tr.setBearing(pe.endEulerAngles.bearing);else pe.tr.setRoll(e.H.number(pe.startEulerAngles.roll,pe.endEulerAngles.roll,pe.k)),pe.tr.setPitch(e.H.number(pe.startEulerAngles.pitch,pe.endEulerAngles.pitch,pe.k)),pe.tr.setBearing(e.H.number(pe.startEulerAngles.bearing,pe.endEulerAngles.bearing,pe.k))}function jo(pe,y,N,ie,fe){let be=fe.padding,Re=rr(fe.worldSize,N.getNorthWest()),je=rr(fe.worldSize,N.getNorthEast()),Ze=rr(fe.worldSize,N.getSouthEast()),ut=rr(fe.worldSize,N.getSouthWest()),ft=e.an(-ie),Dt=Re.rotate(ft),Gt=je.rotate(ft),Kt=Ze.rotate(ft),st=ut.rotate(ft),It=new e.P(Math.max(Dt.x,Gt.x,st.x,Kt.x),Math.max(Dt.y,Gt.y,st.y,Kt.y)),Ut=new e.P(Math.min(Dt.x,Gt.x,st.x,Kt.x),Math.min(Dt.y,Gt.y,st.y,Kt.y)),ir=It.sub(Ut),dr=(fe.width-(be.left+be.right+y.left+y.right))/ir.x,Ar=(fe.height-(be.top+be.bottom+y.top+y.bottom))/ir.y;if(Ar<0||dr<0)return void Ao();let hr=Math.min(e.ar(fe.scale*Math.min(dr,Ar)),pe.maxZoom),vr=e.P.convert(pe.offset),Or=new e.P((y.left-y.right)/2,(y.top-y.bottom)/2).rotate(e.an(ie)),Cr=vr.add(Or).mult(fe.scale/e.ao(hr));return{center:_r(fe.worldSize,Re.add(Ze).div(2).sub(Cr)),zoom:hr,bearing:ie}}class Wo{get useGlobeControls(){return!1}handlePanInertia(y,N){let ie=y.mag(),fe=Math.abs(Xt(N));return{easingOffset:y.mult(Math.min(.75*fe/ie,1)),easingCenter:N.center}}handleMapControlsRollPitchBearingZoom(y,N){y.bearingDelta&&N.setBearing(N.bearing+y.bearingDelta),y.pitchDelta&&N.setPitch(N.pitch+y.pitchDelta),y.rollDelta&&N.setRoll(N.roll+y.rollDelta),y.zoomDelta&&N.setZoom(N.zoom+y.zoomDelta)}handleMapControlsPan(y,N,ie){y.around.distSqr(N.centerPoint)<.01||N.setLocationAtPoint(ie,y.around)}cameraForBoxAndBearing(y,N,ie,fe,be){return jo(y,N,ie,fe,be)}handleJumpToCenterZoom(y,N){y.zoom!==(N.zoom!==void 0?+N.zoom:y.zoom)&&y.setZoom(+N.zoom),N.center!==void 0&&y.setCenter(e.W.convert(N.center))}handleEaseTo(y,N){let ie=y.zoom,fe=y.padding,be={roll:y.roll,pitch:y.pitch,bearing:y.bearing},Re={roll:N.roll===void 0?y.roll:N.roll,pitch:N.pitch===void 0?y.pitch:N.pitch,bearing:N.bearing===void 0?y.bearing:N.bearing},je=N.zoom!==void 0,Ze=!y.isPaddingEqual(N.padding),ut=!1,ft=je?+N.zoom:y.zoom,Dt=y.centerPoint.add(N.offsetAsPoint),Gt=y.screenPointToLocation(Dt),{center:Kt,zoom:st}=y.applyConstrain(e.W.convert(N.center||Gt),ft??ie);Vn(y,Kt);let It=rr(y.worldSize,Gt),Ut=rr(y.worldSize,Kt).sub(It),ir=e.ao(st-ie);return ut=st!==ie,{easeFunc:dr=>{if(ut&&y.setZoom(e.H.number(ie,st,dr)),e.bn(be,Re)||ds({startEulerAngles:be,endEulerAngles:Re,tr:y,k:dr,useSlerp:be.roll!=Re.roll}),Ze&&(y.interpolatePadding(fe,N.padding,dr),Dt=y.centerPoint.add(N.offsetAsPoint)),N.around)y.setLocationAtPoint(N.around,N.aroundPoint);else{let Ar=e.ao(y.zoom-ie),hr=st>ie?Math.min(2,ir):Math.max(.5,ir),vr=Math.pow(hr,1-dr),Or=_r(y.worldSize,It.add(Ut.mult(dr*vr)).mult(Ar));y.setLocationAtPoint(y.renderWorldCopies?Or.wrap():Or,Dt)}},isZooming:ut,elevationCenter:Kt}}handleFlyTo(y,N){let ie=N.zoom!==void 0,fe=y.zoom,be=y.applyConstrain(e.W.convert(N.center||N.locationAtOffset),ie?+N.zoom:fe),Re=be.center,je=be.zoom;Vn(y,Re);let Ze=rr(y.worldSize,N.locationAtOffset),ut=rr(y.worldSize,Re).sub(Ze),ft=ut.mag(),Dt=e.ao(je-fe),Gt;if(N.minZoom!==void 0){let Kt=Math.min(+N.minZoom,fe,je),st=y.applyConstrain(Re,Kt).zoom;Gt=e.ao(st-fe)}return{easeFunc:(Kt,st,It,Ut)=>{y.setZoom(Kt===1?je:fe+e.ar(st));let ir=Kt===1?Re:_r(y.worldSize,Ze.add(ut.mult(It)).mult(st));y.setLocationAtPoint(y.renderWorldCopies?ir.wrap():ir,Ut)},scaleOfZoom:Dt,targetCenter:Re,scaleOfMinZoom:Gt,pixelPathLength:ft}}}class to{constructor(y,N,ie){this.blendFunction=y,this.blendColor=N,this.mask=ie}}to.Replace=[1,0],to.disabled=new to(to.Replace,e.bo.transparent,[!1,!1,!1,!1]),to.unblended=new to(to.Replace,e.bo.transparent,[!0,!0,!0,!0]),to.alphaBlended=new to([1,771],e.bo.transparent,[!0,!0,!0,!0]);let wo=2305;class pi{constructor(y,N,ie){this.enable=y,this.mode=N,this.frontFace=ie}}pi.disabled=new pi(!1,1029,wo),pi.backCCW=new pi(!0,1029,wo),pi.frontCCW=new pi(!0,1028,wo);class Vi{constructor(y,N,ie){this.func=y,this.mask=N,this.range=ie}}Vi.ReadOnly=!1,Vi.ReadWrite=!0,Vi.disabled=new Vi(519,Vi.ReadOnly,[0,1]);let Io=7680;class Zi{constructor(y,N,ie,fe,be,Re){this.test=y,this.ref=N,this.mask=ie,this.fail=fe,this.depthFail=be,this.pass=Re}}function Ko(pe){return typeof WebGL2RenderingContext<"u"&&pe instanceof WebGL2RenderingContext}Zi.disabled=new Zi({func:519,mask:0},0,0,Io,Io,Io);class Uo{get awaitingQuery(){return!!this._readbackQueue}constructor(y){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=y;let N=y.context,ie=N.gl;this._texFormat=ie.RGBA,this._texType=ie.UNSIGNED_BYTE;let fe=new e.aU;fe.emplaceBack(-1,-1),fe.emplaceBack(2,-1),fe.emplaceBack(-1,2);let be=new e.aW;be.emplaceBack(0,1,2),this._fullscreenTriangle=new Xn(N.createVertexBuffer(fe,eo.members),N.createIndexBuffer(be),e.aV.simpleSegment(0,0,fe.length,be.length)),this._resultBuffer=new Uint8Array(4),N.activeTexture.set(ie.TEXTURE1);let Re=ie.createTexture();ie.bindTexture(ie.TEXTURE_2D,Re),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_S,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_T,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MIN_FILTER,ie.NEAREST),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MAG_FILTER,ie.NEAREST),ie.texImage2D(ie.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=N.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(Re),Ko(ie)&&(this._pbo=ie.createBuffer(),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,this._pbo),ie.bufferData(ie.PIXEL_PACK_BUFFER,4,ie.STREAM_READ),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,null))}destroy(){let y=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),y.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(y,N){let ie=this._updateCount;return this._readbackQueue?ie>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():ie>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(y,N),this._updateCount++,this._measuredError}_bindFramebuffer(){let y=this._cachedRenderContext.context,N=y.gl;y.activeTexture.set(N.TEXTURE1),N.bindTexture(N.TEXTURE_2D,this._fbo.colorAttachment.get()),y.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(y,N){let ie=this._cachedRenderContext.context,fe=ie.gl;if(this._bindFramebuffer(),ie.viewport.set([0,0,this._texWidth,this._texHeight]),ie.clear({color:e.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(ie,fe.TRIANGLES,Vi.disabled,Zi.disabled,to.unblended,pi.disabled,((be,Re)=>({u_input:be,u_output_expected:Re}))(y,N),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Ko(fe)){fe.bindBuffer(fe.PIXEL_PACK_BUFFER,this._pbo),fe.readBuffer(fe.COLOR_ATTACHMENT0),fe.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),fe.bindBuffer(fe.PIXEL_PACK_BUFFER,null);let be=fe.fenceSync(fe.SYNC_GPU_COMMANDS_COMPLETE,0);fe.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:be}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let y=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Ko(y)){let N=y.clientWaitSync(this._readbackQueue.sync,0,0);if(N===y.WAIT_FAILED)return e.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(N===y.TIMEOUT_EXPIRED)return;y.bindBuffer(y.PIXEL_PACK_BUFFER,this._pbo),y.getBufferSubData(y.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),y.bindBuffer(y.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),y.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=Uo._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(y){let N=0;return N+=y[0]/256,N+=y[1]/65536,N+=y[2]/16777216,y[3]<127&&(N=-N),N/128}}let Ls=e.a6/128;function Ss(pe,y){let N=pe.granularity!==void 0?Math.max(pe.granularity,1):1,ie=N+(pe.generateBorders?2:0),fe=N+(pe.extendToNorthPole||pe.generateBorders?1:0)+(pe.extendToSouthPole||pe.generateBorders?1:0),be=ie+1,Re=fe+1,je=pe.generateBorders?-1:0,Ze=pe.generateBorders||pe.extendToNorthPole?-1:0,ut=N+(pe.generateBorders?1:0),ft=N+(pe.generateBorders||pe.extendToSouthPole?1:0),Dt=be*Re,Gt=ie*fe*6,Kt=be*Re>65536;if(Kt&&y==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let st=Kt||y==="32bit",It=new Int16Array(2*Dt),Ut=0;for(let Ar=Ze;Ar<=ft;Ar++)for(let hr=je;hr<=ut;hr++){let vr=hr/N*e.a6;hr===-1&&(vr=-Ls),hr===N+1&&(vr=e.a6+Ls);let Or=Ar/N*e.a6;Ar===-1&&(Or=pe.extendToNorthPole?e.bq:-Ls),Ar===N+1&&(Or=pe.extendToSouthPole?e.br:e.a6+Ls),It[Ut++]=vr,It[Ut++]=Or}let ir=st?new Uint32Array(Gt):new Uint16Array(Gt),dr=0;for(let Ar=0;Ar0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(y){this._mercatorProjection.updateGPUdependent(y),this._verticalPerspectiveProjection.updateGPUdependent(y)}getMeshFromTileID(y,N,ie,fe,be){return this.currentProjection.getMeshFromTileID(y,N,ie,fe,be)}setProjection(y){this._transitionable.setValue("type",y?.type||"mercator")}updateTransitions(y){this._transitioning=this._transitionable.transitioned(y,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(y){this.properties=this._transitioning.possiblyEvaluate(y)}setErrorQueryLatitudeDegrees(y){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(y),this._mercatorProjection.setErrorQueryLatitudeDegrees(y)}}function _o(pe){let y=bs(pe.worldSize,pe.center.lat);return 2*Math.PI*y}function Pi(pe,y,N,ie,fe){let be=1/(1<1e-6){let ie=pe[0]/N,fe=Math.acos(pe[2]/N),be=(ie>0?fe:-fe)/Math.PI*180;return new e.W(e.X(be,-180,180),y)}return new e.W(0,y)}function hl(pe){return Math.cos(pe*Math.PI/180)}function ps(pe,y){let N=hl(pe),ie=hl(y);return e.ar(ie/N)}function dl(pe,y){let N=pe.rotate(y.bearingInRadians),ie=y.zoom+ps(y.center.lat,0),fe=e.bt(1/hl(y.center.lat),1/hl(Math.min(Math.abs(y.center.lat),60)),e.bw(ie,7,3,0,1)),be=360/_o({worldSize:y.worldSize,center:{lat:y.center.lat}});return new e.W(y.center.lng-N.x*be*fe,e.al(y.center.lat+N.y*be,-e.am,e.am))}function wu(pe){let y=.5*pe,N=Math.sin(y),ie=Math.cos(y);return Math.log(N+ie)-Math.log(ie-N)}function lu(pe,y,N,ie){let fe=pe.lat+N*ie;if(Math.abs(N)>1){let be=(Math.sign(pe.lat+N)!==Math.sign(pe.lat)?-Math.abs(pe.lat):Math.abs(pe.lat))*Math.PI/180,Re=Math.abs(pe.lat+N)*Math.PI/180,je=wu(be+ie*(Re-be)),Ze=wu(be),ut=wu(Re);return new e.W(pe.lng+y*((je-Ze)/(ut-Ze)),fe)}return new e.W(pe.lng+y*ie,fe)}class xc{constructor(y){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=y}swapBuffers(){if(!this._hadAnyChanges)return;let y=this._cachePrevious;this._cachePrevious=this._cache,this._cache=y,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(y,N,ie,fe){let be=`${y.z}_${y.x}_${y.y}_${fe?.terrain?"t":""}`,Re=this._cache.get(be);if(Re)return Re;let je=this._cachePrevious.get(be);if(je)return this._cache.set(be,je),je;let Ze=this._boundingVolumeFactory(y,N,ie,fe);return this._cache.set(be,Ze),this._hadAnyChanges=!0,Ze}}class Fl{constructor(y,N,ie,fe){this.min=ie,this.max=fe,this.points=y,this.planes=N}static fromAabb(y,N){let ie=[];for(let fe=0;fe<8;fe++)ie.push([1&~fe?y[0]:N[0],(fe>>1&1)==1?N[1]:y[1],(fe>>2&1)==1?N[2]:y[2]]);return new Fl(ie,[[-1,0,0,N[0]],[1,0,0,-y[0]],[0,-1,0,N[1]],[0,1,0,-y[1]],[0,0,-1,N[2]],[0,0,1,-y[2]]],y,N)}static fromCenterSizeAngles(y,N,ie){let fe=e.bA([],ie[0],ie[1],ie[2]),be=e.bB([],[N[0],0,0],fe),Re=e.bB([],[0,N[1],0],fe),je=e.bB([],[0,0,N[2]],fe),Ze=[...y],ut=[...y];for(let Dt=0;Dt<8;Dt++)for(let Gt=0;Gt<3;Gt++){let Kt=y[Gt]+be[Gt]*(1&~Dt?-1:1)+Re[Gt]*((Dt>>1&1)==1?1:-1)+je[Gt]*((Dt>>2&1)==1?1:-1);Ze[Gt]=Math.min(Ze[Gt],Kt),ut[Gt]=Math.max(ut[Gt],Kt)}let ft=[];for(let Dt=0;Dt<8;Dt++){let Gt=[...y];e.a_(Gt,Gt,e.aZ([],be,1&~Dt?-1:1)),e.a_(Gt,Gt,e.aZ([],Re,(Dt>>1&1)==1?1:-1)),e.a_(Gt,Gt,e.aZ([],je,(Dt>>2&1)==1?1:-1)),ft.push(Gt)}return new Fl(ft,[[...be,-e.b3(be,ft[0])],[...Re,-e.b3(Re,ft[0])],[...je,-e.b3(je,ft[0])],[-be[0],-be[1],-be[2],-e.b3(be,ft[7])],[-Re[0],-Re[1],-Re[2],-e.b3(Re,ft[7])],[-je[0],-je[1],-je[2],-e.b3(je,ft[7])]],Ze,ut)}intersectsFrustum(y){let N=!0,ie=this.points.length,fe=this.planes.length,be=y.planes.length,Re=y.points.length;for(let je=0;je=0&&ut++}if(ut===0)return 0;ut=0&&ut++}if(ut===0)return 0}return 1}intersectsPlane(y){let N=this.points.length,ie=0;for(let fe=0;fe=0&&ie++}return ie===N?2:ie===0?0:1}}function pl(pe,y,N){let ie=pe-y;return ie<0?-ie:Math.max(0,ie-N)}function $u(pe,y,N,ie,fe){let be=pe-N,Re;return Re=be<0?Math.min(-be,1+be-fe):be>fe?Math.min(Math.max(be-fe,0),1-be):0,Math.max(Re,pl(y,ie,fe))}class uu{constructor(){this._boundingVolumeCache=new xc(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(y,N,ie,fe){let be=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(y,N,ie,fe){return this._boundingVolumeCache.getTileBoundingVolume(y,N,ie,fe)}_computeTileBoundingVolume(y,N,ie,fe){var be,Re;let je=0,Ze=0;if(fe?.terrain){let ut=new e.a3(y.z,N,y.z,y.x,y.y),ft=fe.terrain.getMinMaxElevation(ut);je=(be=ft.minElevation)!==null&&be!==void 0?be:Math.min(0,ie),Ze=(Re=ft.maxElevation)!==null&&Re!==void 0?Re:Math.max(0,ie)}if(je/=e.bD,Ze/=e.bD,je+=1,Ze+=1,y.z<=0)return Fl.fromAabb([-Ze,-Ze,-Ze],[Ze,Ze,Ze]);if(y.z===1)return Fl.fromAabb([y.x===0?-Ze:0,y.y===0?0:-Ze,-Ze],[y.x===0?0:Ze,y.y===0?Ze:0,Ze]);{let ut=[Pi(0,0,y.x,y.y,y.z),Pi(e.a6,0,y.x,y.y,y.z),Pi(e.a6,e.a6,y.x,y.y,y.z),Pi(0,e.a6,y.x,y.y,y.z)],ft=[];for(let Ra of ut)ft.push(e.aZ([],Ra,Ze));if(Ze!==je)for(let Ra of ut)ft.push(e.aZ([],Ra,je));y.y===0&&ft.push([0,1,0]),y.y===(1<=(1<{let fe=e.al(N.lat,-e.am,e.am),be=e.al(+ie,this.minZoom+ps(0,fe),this.maxZoom);return{center:new e.W(N.lng,fe),zoom:be}},this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._coveringTilesDetailsProvider=new uu}clone(){let y=new vs;return y.apply(this,!1),y}apply(y,N,ie){this._globeLatitudeErrorCorrectionRadians=ie||0,this._helper.apply(y,N)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let y=e.bz();return y[0]=this._cameraPosition[0],y[1]=this._cameraPosition[1],y[2]=this._cameraPosition[2],y}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(y){let{overscaledTileID:N,applyGlobeMatrix:ie}=y,fe=this._helper.getMercatorTileCoordinates(N);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:fe,clippingPlane:this._cachedClippingPlane,projectionTransition:ie?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(y){let N=this.pitchInRadians,ie=this.cameraToCenterDistance/y,fe=Math.sin(N)*ie,be=Math.cos(N)*ie+1,Re=1/Math.sqrt(fe*fe+be*be)*1,je=-fe,Ze=be,ut=Math.sqrt(je*je+Ze*Ze);je/=ut,Ze/=ut;let ft=[0,je,Ze];e.bF(ft,ft,[0,0,0],-this.bearingInRadians),e.bG(ft,ft,[0,0,0],-1*this.center.lat*Math.PI/180),e.bH(ft,ft,[0,0,0],this.center.lng*Math.PI/180);let Dt=1/e.b5(ft);return e.aZ(ft,ft,Dt),[...ft,-Re*Dt]}isLocationOccluded(y){return!this.isSurfacePointVisible(yo(y))}transformLightDirection(y){let N=this._helper._center.lng*Math.PI/180,ie=this._helper._center.lat*Math.PI/180,fe=Math.cos(ie),be=[Math.sin(N)*fe,Math.sin(ie),Math.cos(N)*fe],Re=[be[2],0,-be[0]],je=[0,0,0];e.b2(je,Re,be),e.b1(Re,Re),e.b1(je,je);let Ze=[0,0,0];return e.b1(Ze,[Re[0]*y[0]+je[0]*y[1]+be[0]*y[2],Re[1]*y[0]+je[1]*y[1]+be[1]*y[2],Re[2]*y[0]+je[2]*y[1]+be[2]*y[2]]),Ze}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(y,N,ie){let fe=function(je,Ze,ut){let ft=1/(1<be&&(be=Gt),Ktje&&(je=Kt)}let ft=[ut.lng+Re,ut.lat+Ze,ut.lng+be,ut.lat+je];return this.isSurfacePointOnScreen([0,1,0])&&(ft[3]=90,ft[0]=-180,ft[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(ft[1]=-90,ft[0]=-180,ft[2]=180),new q(ft)}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}setLocationAtPoint(y,N){let ie=yo(this.unprojectScreenPoint(N)),fe=yo(y),be=e.bz();e.bK(be);let Re=e.bz();e.bH(Re,ie,be,-this.center.lng*Math.PI/180),e.bG(Re,Re,be,this.center.lat*Math.PI/180);let je=fe[0]*fe[0]+fe[2]*fe[2],Ze=Re[0]*Re[0];if(je=-ir&&st<=ir,Ar=Ut>=-ir&&Ut<=ir,hr,vr;if(dr&&Ar){let ka=this.center.lng*Math.PI/180,Ta=this.center.lat*Math.PI/180;e.bM(Dt,ka)+e.bM(st,Ta)=0}isSurfacePointOnScreen(y){if(!this.isSurfacePointVisible(y))return!1;let N=e.bE();return e.aE(N,[...y,1],this._globeViewProjMatrixNoCorrection),N[0]/=N[3],N[1]/=N[3],N[2]/=N[3],N[0]>-1&&N[0]<1&&N[1]>-1&&N[1]<1&&N[2]>-1&&N[2]<1}rayPlanetIntersection(y,N){let ie=e.b3(y,N),fe=e.bz(),be=e.bz();e.aZ(be,N,ie),e.b0(fe,y,be);let Re=1-e.b3(fe,fe);if(Re<0)return null;let je=e.b3(y,y)-1,Ze=-ie+(ie<0?1:-1)*Math.sqrt(Re),ut=je/Ze,ft=Ze;return{tMin:Math.min(ut,ft),tMax:Math.max(ut,ft)}}unprojectScreenPoint(y){let N=this._cameraPosition,ie=this.getRayDirectionFromPixel(y),fe=this.rayPlanetIntersection(N,ie);if(fe){let ft=e.bz();e.a_(ft,N,[ie[0]*fe.tMin,ie[1]*fe.tMin,ie[2]*fe.tMin]);let Dt=e.bz();return e.b1(Dt,ft),Dl(Dt)}let be=this._cachedClippingPlane,Re=be[0]*ie[0]+be[1]*ie[1]+be[2]*ie[2],je=-e.b9(be,N)/Re,Ze=e.bz();if(je>0)e.a_(Ze,N,[ie[0]*je,ie[1]*je,ie[2]*je]);else{let ft=e.bz();e.a_(ft,N,[2*ie[0],2*ie[1],2*ie[2]]);let Dt=e.b9(this._cachedClippingPlane,ft);e.b0(Ze,ft,[this._cachedClippingPlane[0]*Dt,this._cachedClippingPlane[1]*Dt,this._cachedClippingPlane[2]*Dt])}let ut=function(ft){let Dt=e.bz();return Dt[0]=ft[0]*-ft[3],Dt[1]=ft[1]*-ft[3],Dt[2]=ft[2]*-ft[3],{center:Dt,radius:Math.sqrt(1-ft[3]*ft[3])}}(be);return Dl(function(ft,Dt,Gt){let Kt=e.bz();e.b0(Kt,Gt,ft);let st=e.bz();return e.bx(st,ft,Kt,Dt/e.b7(Kt)),st}(ut.center,ut.radius,Ze))}getMatrixForModel(y,N){let ie=e.W.convert(y),fe=1/e.bD,be=e.bi();return e.bI(be,be,ie.lng/180*Math.PI),e.bf(be,be,-ie.lat/180*Math.PI),e.Q(be,be,[0,0,1+N/e.bD]),e.bf(be,be,.5*Math.PI),e.S(be,be,[fe,fe,fe]),be}getProjectionDataForCustomLayer(y=!0){let N=this.getProjectionData({overscaledTileID:new e.a3(0,0,0,0,0),applyGlobeMatrix:y});return N.tileMercatorCoords=[0,0,1,1],N}getFastPathSimpleProjectionMatrix(y){}}class os{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,N,ie){this._helper.interpolatePadding(y,N,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,N,ie=!0){this._helper.resize(y,N,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,N){this._helper.overrideNearFarZ(y,N)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(y,N){this._globeness=y,this._globeLatitudeErrorCorrectionRadians=N,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(y){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(N,ie)=>this.currentTransform.defaultConstrain(N,ie),this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._globeness=1,this._mercatorTransform=new Eo,this._verticalPerspectiveTransform=new vs}clone(){let y=new os;return y._globeness=this._globeness,y._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,y.apply(this,!1),y}apply(y,N){this._helper.apply(y,N),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(y){let N=this._mercatorTransform.getProjectionData(y),ie=this._verticalPerspectiveTransform.getProjectionData(y);return{mainMatrix:this.isGlobeRendering?ie.mainMatrix:N.mainMatrix,clippingPlane:ie.clippingPlane,tileMercatorCoords:ie.tileMercatorCoords,projectionTransition:y.applyGlobeMatrix?this._globeness:0,fallbackMatrix:N.fallbackMatrix}}isLocationOccluded(y){return this.currentTransform.isLocationOccluded(y)}transformLightDirection(y){return this.currentTransform.transformLightDirection(y)}getPixelScale(){return e.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return e.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(y,N,ie){let fe=this._mercatorTransform.getPitchedTextCorrection(y,N,ie),be=this._verticalPerspectiveTransform.getPitchedTextCorrection(y,N,ie);return e.bt(fe,be,this._globeness)}projectTileCoordinates(y,N,ie,fe){return this.currentTransform.projectTileCoordinates(y,N,ie,fe)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(y){return this.currentTransform.calculateFogMatrix(y)}getVisibleUnwrappedCoordinates(y){return this.currentTransform.getVisibleUnwrappedCoordinates(y)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(y){this._mercatorTransform.recalculateZoomAndCenter(y),this._verticalPerspectiveTransform.recalculateZoomAndCenter(y)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(y,N){return this.currentTransform.lngLatToCameraDepth(y,N)}populateCache(y){this._mercatorTransform.populateCache(y),this._verticalPerspectiveTransform.populateCache(y)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}setLocationAtPoint(y,N){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(y,N),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(y,N),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(y,N){return this.currentTransform.locationToScreenPoint(y,N)}screenPointToMercatorCoordinate(y,N){return this.currentTransform.screenPointToMercatorCoordinate(y,N)}screenPointToLocation(y,N){return this.currentTransform.screenPointToLocation(y,N)}isPointOnMapSurface(y,N){return this.currentTransform.isPointOnMapSurface(y,N)}getRayDirectionFromPixel(y){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(y)}getMatrixForModel(y,N){return this.currentTransform.getMatrixForModel(y,N)}getProjectionDataForCustomLayer(y=!0){let N=this._mercatorTransform.getProjectionDataForCustomLayer(y);if(!this.isGlobeRendering)return N;let ie=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(y);return ie.fallbackMatrix=N.mainMatrix,ie}getFastPathSimpleProjectionMatrix(y){return this.currentTransform.getFastPathSimpleProjectionMatrix(y)}}class ms{get useGlobeControls(){return!0}handlePanInertia(y,N){let ie=dl(y,N);return Math.abs(ie.lng-N.center.lng)>180&&(ie.lng=N.center.lng+179.5*Math.sign(ie.lng-N.center.lng)),{easingCenter:ie,easingOffset:new e.P(0,0)}}handleMapControlsRollPitchBearingZoom(y,N){let ie=y.around,fe=N.screenPointToLocation(ie);y.bearingDelta&&N.setBearing(N.bearing+y.bearingDelta),y.pitchDelta&&N.setPitch(N.pitch+y.pitchDelta),y.rollDelta&&N.setRoll(N.roll+y.rollDelta);let be=N.zoom;y.zoomDelta&&N.setZoom(N.zoom+y.zoomDelta);let Re=N.zoom-be;if(Re===0)return;let je=e.bJ(N.center.lng,fe.lng),Ze=je/(Math.abs(je/180)+1),ut=e.bJ(N.center.lat,fe.lat),ft=N.getRayDirectionFromPixel(ie),Dt=N.cameraPosition,Gt=-1*e.b3(Dt,ft),Kt=e.bz();e.a_(Kt,Dt,[ft[0]*Gt,ft[1]*Gt,ft[2]*Gt]);let st=e.b5(Kt)-1,It=Math.exp(.5*-Math.max(st-.3,0)),Ut=bs(N.worldSize,N.center.lat)/Math.min(N.width,N.height),ir=e.bw(Ut,.9,.5,1,.25),dr=(1-e.ao(-Re))*Math.min(It,ir),Ar=N.center.lat,hr=N.zoom,vr=new e.W(N.center.lng+Ze*dr,e.al(N.center.lat+ut*dr,-e.am,e.am));N.setLocationAtPoint(fe,ie);let Or=N.center,Cr=e.bw(Math.abs(je),45,85,0,1),ta=e.bw(Ut,.75,.35,0,1),ka=Math.pow(Math.max(Cr,ta),.25),Ta=e.bJ(Or.lng,vr.lng),Ra=e.bJ(Or.lat,vr.lat);N.setCenter(new e.W(Or.lng+Ta*ka,Or.lat+Ra*ka).wrap()),N.setZoom(hr+ps(Ar,N.center.lat))}handleMapControlsPan(y,N,ie){if(!y.panDelta)return;let fe=N.center.lat,be=N.zoom;N.setCenter(dl(y.panDelta,N).wrap()),N.setZoom(be+ps(fe,N.center.lat))}cameraForBoxAndBearing(y,N,ie,fe,be){let Re=jo(y,N,ie,fe,be),je=N.left/be.width*2-1,Ze=(be.width-N.right)/be.width*2-1,ut=N.top/be.height*-2+1,ft=(be.height-N.bottom)/be.height*-2+1,Dt=e.bJ(ie.getWest(),ie.getEast())<0,Gt=Dt?ie.getEast():ie.getWest(),Kt=Dt?ie.getWest():ie.getEast(),st=Math.max(ie.getNorth(),ie.getSouth()),It=Math.min(ie.getNorth(),ie.getSouth()),Ut=Gt+.5*e.bJ(Gt,Kt),ir=st+.5*e.bJ(st,It),dr=be.clone();dr.setCenter(Re.center),dr.setBearing(Re.bearing),dr.setPitch(0),dr.setRoll(0),dr.setZoom(Re.zoom);let Ar=dr.modelViewProjectionMatrix,hr=[yo(ie.getNorthWest()),yo(ie.getNorthEast()),yo(ie.getSouthWest()),yo(ie.getSouthEast()),yo(new e.W(Kt,ir)),yo(new e.W(Gt,ir)),yo(new e.W(Ut,st)),yo(new e.W(Ut,It))],vr=yo(Re.center),Or=Number.POSITIVE_INFINITY;for(let Cr of hr)je<0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"x",je))),Ze>0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"x",Ze))),ut>0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"y",ut))),ft<0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"y",ft)));if(Number.isFinite(Or)&&Or!==0)return Re.zoom=Math.min(dr.zoom+e.ar(Or),y.maxZoom),Re;Ao()}handleJumpToCenterZoom(y,N){let ie=y.center.lat,fe=y.applyConstrain(N.center?e.W.convert(N.center):y.center,y.zoom).center;y.setCenter(fe.wrap());let be=N.zoom!==void 0?+N.zoom:y.zoom+ps(ie,fe.lat);y.zoom!==be&&y.setZoom(be)}handleEaseTo(y,N){let ie=y.zoom,fe=y.center,be=y.padding,Re={roll:y.roll,pitch:y.pitch,bearing:y.bearing},je={roll:N.roll===void 0?y.roll:N.roll,pitch:N.pitch===void 0?y.pitch:N.pitch,bearing:N.bearing===void 0?y.bearing:N.bearing},Ze=N.zoom!==void 0,ut=!y.isPaddingEqual(N.padding),ft=!1,Dt=N.center?e.W.convert(N.center):fe,Gt=y.applyConstrain(Dt,ie).center;Vn(y,Gt);let Kt=y.clone();Kt.setCenter(Gt),Kt.setZoom(Ze?+N.zoom:ie+ps(fe.lat,Dt.lat)),Kt.setBearing(N.bearing);let st=new e.P(e.al(y.centerPoint.x+N.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+N.offsetAsPoint.y,0,y.height));Kt.setLocationAtPoint(Gt,st);let It=(N.offset&&N.offsetAsPoint.mag())>0?Kt.center:Gt,Ut=Ze?+N.zoom:ie+ps(fe.lat,It.lat),ir=ie+ps(fe.lat,0),dr=Ut+ps(It.lat,0),Ar=e.bJ(fe.lng,It.lng),hr=e.bJ(fe.lat,It.lat),vr=e.ao(dr-ir);return ft=Ut!==ie,{easeFunc:Or=>{if(e.bn(Re,je)||ds({startEulerAngles:Re,endEulerAngles:je,tr:y,k:Or,useSlerp:Re.roll!=je.roll}),ut&&y.interpolatePadding(be,N.padding,Or),N.around)e.w("Easing around a point is not supported under globe projection."),y.setLocationAtPoint(N.around,N.aroundPoint);else{let Cr=dr>ir?Math.min(2,vr):Math.max(.5,vr),ta=Math.pow(Cr,1-Or),ka=lu(fe,Ar,hr,Or*ta);y.setCenter(ka.wrap())}if(ft){let Cr=e.H.number(ir,dr,Or)+ps(0,y.center.lat);y.setZoom(Cr)}},isZooming:ft,elevationCenter:It}}handleFlyTo(y,N){let ie=N.zoom!==void 0,fe=y.center,be=y.zoom,Re=y.padding,je=!y.isPaddingEqual(N.padding),Ze=y.applyConstrain(e.W.convert(N.center||N.locationAtOffset),be).center,ut=ie?+N.zoom:y.zoom+ps(y.center.lat,Ze.lat),ft=y.clone();ft.setCenter(Ze),ft.setZoom(ut),ft.setBearing(N.bearing);let Dt=new e.P(e.al(y.centerPoint.x+N.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+N.offsetAsPoint.y,0,y.height));ft.setLocationAtPoint(Ze,Dt);let Gt=ft.center;Vn(y,Gt);let Kt=function(hr,vr,Or){let Cr=yo(vr),ta=yo(Or),ka=e.b3(Cr,ta),Ta=Math.acos(ka),Ra=_o(hr);return Ta/(2*Math.PI)*Ra}(y,fe,Gt),st=be+ps(fe.lat,0),It=ut+ps(Gt.lat,0),Ut=e.ao(It-st),ir;if(typeof N.minZoom=="number"){let hr=+N.minZoom+ps(Gt.lat,0),vr=Math.min(hr,st,It)+ps(0,Gt.lat),Or=y.applyConstrain(Gt,vr).zoom+ps(Gt.lat,0);ir=e.ao(Or-st)}let dr=e.bJ(fe.lng,Gt.lng),Ar=e.bJ(fe.lat,Gt.lat);return{easeFunc:(hr,vr,Or,Cr)=>{let ta=lu(fe,dr,Ar,Or);je&&y.interpolatePadding(Re,N.padding,hr);let ka=hr===1?Gt:ta;y.setCenter(ka.wrap());let Ta=st+e.ar(vr);y.setZoom(hr===1?ut:Ta+ps(0,ka.lat))},scaleOfZoom:Ut,targetCenter:Gt,scaleOfMinZoom:ir,pixelPathLength:Kt}}static solveVectorScale(y,N,ie,fe,be){let Re=fe==="x"?[ie[0],ie[4],ie[8],ie[12]]:[ie[1],ie[5],ie[9],ie[13]],je=[ie[3],ie[7],ie[11],ie[15]],Ze=y[0]*Re[0]+y[1]*Re[1]+y[2]*Re[2],ut=y[0]*je[0]+y[1]*je[1]+y[2]*je[2],ft=N[0]*Re[0]+N[1]*Re[1]+N[2]*Re[2],Dt=N[0]*je[0]+N[1]*je[1]+N[2]*je[2];return ft+be*ut===Ze+be*Dt||je[3]*(Ze-ft)+Re[3]*(Dt-ut)+Ze*Dt==ft*ut?null:(ft+Re[3]-be*Dt-be*je[3])/(ft-Ze-be*Dt+be*ut)}static getLesserNonNegativeNonNull(y,N){return N!==null&&N>=0&&Ne.C(pe,y?.filter(N=>N.identifier!=="source.canvas")),zu=e.bN();class Ku extends e.E{constructor(y,N={}){var ie,fe;super(),this._rtlPluginLoaded=()=>{for(let Re in this.tileManagers){let je=this.tileManagers[Re].getSource().type;je!=="vector"&&je!=="geojson"||this.tileManagers[Re].reload()}},this.map=y,this.dispatcher=new ne(re(),y._getMapId()),this.dispatcher.registerMessageHandler("GG",(Re,je)=>this.getGlyphs(Re,je)),this.dispatcher.registerMessageHandler("GI",(Re,je)=>this.getImages(Re,je)),this.dispatcher.registerMessageHandler("GDA",(Re,je)=>this.getDashes(Re,je)),this.imageManager=new C,this.imageManager.setEventedParent(this);let be=((ie=y._container)===null||ie===void 0?void 0:ie.lang)||typeof document<"u"&&((fe=document.documentElement)===null||fe===void 0?void 0:fe.lang)||void 0;this.glyphManager=new x(y._requestManager,N.localIdeographFontFamily,be),this.lineAtlas=new F(256,512),this.crossTileSymbolIndex=new Di,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",e.bO()),Ye().on(Ae,this._rtlPluginLoaded),this.on("data",Re=>{if(Re.dataType!=="source"||Re.sourceDataType!=="metadata")return;let je=this.tileManagers[Re.sourceId];if(!je)return;let Ze=je.getSource();if(Ze?.vectorLayerIds)for(let ut in this._layers){let ft=this._layers[ut];ft.source===Ze.id&&this._validateLayer(ft)}})}_setInitialValues(){var y;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new e.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new(((y=this.crossTileSymbolIndex)===null||y===void 0?void 0:y.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(y,N){var ie,fe,be;this._checkLoaded();let Re=N===null?(be=(fe=(ie=this.stylesheet.state)===null||ie===void 0?void 0:ie[y])===null||fe===void 0?void 0:fe.default)!==null&&be!==void 0?be:null:N;if(e.bQ(Re,this._globalState[y]))return this;this._globalState[y]=Re,this._applyGlobalStateChanges([y])}getGlobalState(){return this._globalState}setGlobalState(y){this._checkLoaded();let N=[];for(let ie in y)!e.bQ(this._globalState[ie],y[ie].default)&&(N.push(ie),this._globalState[ie]=y[ie].default);this._applyGlobalStateChanges(N)}_applyGlobalStateChanges(y){if(y.length===0)return;let N=new Set,ie={};for(let fe of y){ie[fe]=this._globalState[fe];for(let be in this._layers){let Re=this._layers[be],je=Re.getLayoutAffectingGlobalStateRefs(),Ze=Re.getPaintAffectingGlobalStateRefs(),ut=Re.getVisibilityAffectingGlobalStateRefs();if(je.has(fe)&&N.add(Re.source),Ze.has(fe))for(let{name:ft,value:Dt}of Ze.get(fe))this._updatePaintProperty(Re,ft,Dt);ut?.has(fe)&&(Re.recalculateVisibility(),this._updateLayer(Re))}}this.dispatcher.broadcast("UGS",ie);for(let fe in this.tileManagers)N.has(fe)&&(this._reloadSource(fe),this._changed=!0)}loadURL(y){return e._(this,arguments,void 0,function*(N,ie={},fe){this.fire(new e.n("dataloading",{dataType:"style"})),ie.validate=typeof ie.validate!="boolean"||ie.validate,this._loadStyleRequest=new AbortController;let be=this._loadStyleRequest;try{let Re=yield this.map._requestManager.transformRequest(N,"Style");e.bR(be.signal);let je=yield e.k(Re,be);this._loadStyleRequest===be&&(this._loadStyleRequest=null),this._load(je.data,ie,fe)}catch(Re){this._loadStyleRequest===be&&(this._loadStyleRequest=null),Re&&!be.signal.aborted&&this.fire(new e.l(e.d(Re)))}})}loadJSON(y,N={},ie){this.fire(new e.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,s.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,N.validate=N.validate!==!1,this._load(y,N,ie)}).catch(()=>{})}loadEmpty(){this.fire(new e.n("dataloading",{dataType:"style"})),this._load(zu,{validate:!1})}_load(y,N,ie){var fe,be;let Re=N.transformStyle?N.transformStyle(ie,y):y;if(!N.validate||!Fu(this,e.F(Re))){Re=Object.assign({},Re),this._loaded=!0,this.stylesheet=Re;for(let je in Re.sources)this.addSource(je,Re.sources[je],{validate:!1});Re.sprite?this._loadSprite(Re.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Re.glyphs),this._createLayers(),this.light=new O(this.stylesheet.light),this._setProjectionInternal(((fe=this.stylesheet.projection)===null||fe===void 0?void 0:fe.type)||"mercator"),this.sky=new B(this.stylesheet.sky),this.map.setTerrain((be=this.stylesheet.terrain)!==null&&be!==void 0?be:null),this.fire(new e.n("data",{dataType:"style"})),this.fire(new e.n("style.load"))}}_createLayers(){var y,N,ie;let fe=e.bS(this.stylesheet.layers);this.setGlobalState((y=this.stylesheet.state)!==null&&y!==void 0?y:null),this.dispatcher.broadcast("SL",fe),this._order=fe.map(be=>be.id),this._layers={},this._serializedLayers=null;for(let be of fe){let Re=e.bT(be,this._globalState);if(Re.setEventedParent(this,{layer:{id:be.id}}),this._layers[be.id]=Re,e.bU(Re)&&this.tileManagers[Re.source]){let je=(ie=(N=be.paint)===null||N===void 0?void 0:N["raster-fade-duration"])!==null&&ie!==void 0?ie:Re.paint.get("raster-fade-duration");this.tileManagers[Re.source].setRasterFadeDuration(je)}}}_loadSprite(y,N=!1,ie=void 0){this.imageManager.setLoaded(!1);let fe=new AbortController,be;this._spriteRequest=fe,function(Re,je,Ze,ut){return e._(this,void 0,void 0,function*(){let ft=T(Re),Dt=Ze>1?"@2x":"",Gt={},Kt={};for(let{id:st,url:It}of ft){let Ut=yield je.transformRequest(S(It,Dt,".json"),"SpriteJSON");Gt[st]=e.k(Ut,ut);let ir=yield je.transformRequest(S(It,Dt,".png"),"SpriteImage");Kt[st]=v.getImage(ir,ut)}return yield Promise.all([...Object.values(Gt),...Object.values(Kt)]),function(st,It){return e._(this,void 0,void 0,function*(){let Ut={};for(let ir in st){Ut[ir]={};let dr=s.getImageCanvasContext((yield It[ir]).data),Ar=(yield st[ir]).data;for(let hr in Ar){let{width:vr,height:Or,x:Cr,y:ta,sdf:ka,pixelRatio:Ta,stretchX:Ra,stretchY:ua,content:ia,textFitWidth:ma,textFitHeight:da}=Ar[hr];Ut[ir][hr]={data:null,pixelRatio:Ta,sdf:ka,stretchX:Ra,stretchY:ua,content:ia,textFitWidth:ma,textFitHeight:da,spriteData:{width:vr,height:Or,x:Cr,y:ta,context:dr}}}}return Ut})}(Gt,Kt)})}(y,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Re=>{if(this._spriteRequest=null,Re)for(let je in Re){this._spritesImagesIds[je]=[];let Ze=this._spritesImagesIds[je]?this._spritesImagesIds[je].filter(ut=>!(ut in Re)):[];for(let ut of Ze)this.imageManager.removeImage(ut),this._changedImages[ut]=!0;for(let ut in Re[je]){let ft=je==="default"?ut:`${je}:${ut}`;this._spritesImagesIds[je].push(ft),ft in this.imageManager.images?this.imageManager.updateImage(ft,Re[je][ut],!1):this.imageManager.addImage(ft,Re[je][ut]),N&&(this._changedImages[ft]=!0)}}}).catch(Re=>{this._spriteRequest=null,be=Re,fe.signal.aborted||this.fire(new e.l(be))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),N&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"})),ie&&ie(be)})}_unloadSprite(){for(let y of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(y),this._changedImages[y]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}_validateLayer(y){let N=this.tileManagers[y.source];if(!N)return;let ie=y.sourceLayer;if(!ie)return;let fe=N.getSource();(fe.type==="geojson"||fe.vectorLayerIds&&!fe.vectorLayerIds.includes(ie))&&this.fire(new e.l(new Error(`Source layer "${ie}" does not exist on source "${fe.id}" as specified by style layer "${y.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let y in this.tileManagers)if(!this.tileManagers[y].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(y,N=!1){let ie=this._serializedAllLayers();if(!y||y.length===0)return Object.values(N?e.bV(ie):ie);let fe=[];for(let be of y)if(ie[be]){let Re=N?e.bV(ie[be]):ie[be];fe.push(Re)}return fe}_serializedAllLayers(){let y=this._serializedLayers;if(y)return y;y=this._serializedLayers={};let N=Object.keys(this._layers);for(let ie of N){let fe=this._layers[ie];fe.type!=="custom"&&(y[ie]=fe.serialize())}return y}hasTransitions(){var y,N,ie;if(!((y=this.light)===null||y===void 0)&&y.hasTransition()||!((N=this.sky)===null||N===void 0)&&N.hasTransition()||!((ie=this.projection)===null||ie===void 0)&&ie.hasTransition())return!0;for(let fe in this.tileManagers)if(this.tileManagers[fe].hasTransition())return!0;for(let fe in this._layers)if(this._layers[fe].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(y){if(!this._loaded)return;let N=this._changed;if(N){let fe=Object.keys(this._updatedLayers),be=Object.keys(this._removedLayers);(fe.length||be.length)&&this._updateWorkerLayers(fe,be);for(let Re in this._updatedSources){let je=this._updatedSources[Re];if(je==="reload")this._reloadSource(Re);else{if(je!=="clear")throw new Error(`Invalid action ${je}`);this._clearSource(Re)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let Re in this._updatedPaintProps)this._layers[Re].updateTransitions(y);this.light.updateTransitions(y),this.sky.updateTransitions(y),this._resetUpdates()}let ie={};for(let fe in this.tileManagers){let be=this.tileManagers[fe];ie[fe]=be.used,be.used=!1}for(let fe of this._order){let be=this._layers[fe];be.recalculate(y,this._availableImages),!be.isHidden(y.zoom)&&be.source&&(this.tileManagers[be.source].used=!0)}for(let fe in ie){let be=this.tileManagers[fe];!!ie[fe]!=!!be.used&&be.fire(new e.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:fe}))}this.light.recalculate(y),this.sky.recalculate(y),this.projection.recalculate(y),this.z=y.zoom,N&&this.fire(new e.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let y=Object.keys(this._changedImages);if(y.length){for(let N in this.tileManagers)this.tileManagers[N].reloadTilesForDependencies(["icons","patterns"],y);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let y in this.tileManagers)this.tileManagers[y].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(y,N){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(y,!1),removedIds:N})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(y,N={}){var ie;this._checkLoaded();let fe=this.serialize();if(y=N.transformStyle?N.transformStyle(fe,y):y,((ie=N.validate)===null||ie===void 0||ie)&&Fu(this,e.F(y)))return!1;(y=e.bV(y)).layers=e.bS(y.layers);let be=e.bW(fe,y),Re=this._getOperationsToPerform(be);if(Re.unimplemented.length>0)throw new Error(`Unimplemented: ${Re.unimplemented.join(", ")}.`);if(Re.operations.length===0)return!1;for(let je of Re.operations)je();return this.stylesheet=y,this._serializedLayers=null,this.fire(new e.n("style.load",{style:this})),!0}_getOperationsToPerform(y){let N=[],ie=[];for(let fe of y)switch(fe.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":N.push(()=>this.addLayer.apply(this,fe.args));break;case"removeLayer":N.push(()=>this.removeLayer.apply(this,fe.args));break;case"setPaintProperty":N.push(()=>this.setPaintProperty.apply(this,fe.args));break;case"setLayoutProperty":N.push(()=>this.setLayoutProperty.apply(this,fe.args));break;case"setFilter":N.push(()=>this.setFilter.apply(this,fe.args));break;case"addSource":N.push(()=>this.addSource.apply(this,fe.args));break;case"removeSource":N.push(()=>this.removeSource.apply(this,fe.args));break;case"setLayerZoomRange":N.push(()=>this.setLayerZoomRange.apply(this,fe.args));break;case"setLight":N.push(()=>this.setLight.apply(this,fe.args));break;case"setGeoJSONSourceData":N.push(()=>this.setGeoJSONSourceData.apply(this,fe.args));break;case"setGlyphs":N.push(()=>this.setGlyphs.apply(this,fe.args));break;case"setSprite":N.push(()=>this.setSprite.apply(this,fe.args));break;case"setTerrain":N.push(()=>this.map.setTerrain.apply(this,fe.args));break;case"setSky":N.push(()=>this.setSky.apply(this,fe.args));break;case"setProjection":this.setProjection.apply(this,fe.args);break;case"setGlobalState":N.push(()=>this.setGlobalState.apply(this,fe.args));break;case"setTransition":N.push(()=>{});break;default:ie.push(fe.command)}return{operations:N,unimplemented:ie}}addImage(y,N){if(this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" already exists.`)));this.imageManager.addImage(y,N),this._afterImageUpdated(y)}updateImage(y,N){this.imageManager.updateImage(y,N)}getImage(y){return this.imageManager.getImage(y)}removeImage(y){if(!this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" does not exist.`)));this.imageManager.removeImage(y),this._afterImageUpdated(y)}_afterImageUpdated(y){this._availableImages=this.imageManager.listImages(),this._changedImages[y]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(y,N,ie={}){var fe;if(this._checkLoaded(),this.tileManagers[y]!==void 0)throw new Error(`Source "${y}" already exists.`);if(!N.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(N).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(N.type)&&this._validate(e.F.source,`sources.${y}`,N,null,ie))return;!((fe=this.map)===null||fe===void 0)&&fe._collectResourceTiming&&(N.collectResourceTiming=!0);let be=this.tileManagers[y]=new Sr(y,N,this.dispatcher);be.style=this,be.setEventedParent(this,()=>({isSourceLoaded:be.loaded(),source:be.serialize(),sourceId:y})),be.onAdd(this.map),this._changed=!0}removeSource(y){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);for(let ie in this._layers)if(this._layers[ie].source===y)return this.fire(new e.l(new Error(`Source "${y}" cannot be removed while layer "${ie}" is using it.`)));let N=this.tileManagers[y];delete this.tileManagers[y],delete this._updatedSources[y],N.fire(new e.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:y})),N.setEventedParent(null),N.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(y,N){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);let ie=this.tileManagers[y].getSource();if(ie.type!=="geojson")throw new Error(`geojsonSource.type is ${ie.type}, which is !== 'geojson`);ie.setData(N),this._changed=!0}getSource(y){var N;return(N=this.tileManagers[y])===null||N===void 0?void 0:N.getSource()}addLayer(y,N,ie={}){this._checkLoaded();let fe=y.id;if(this.getLayer(fe))return void this.fire(new e.l(new Error(`Layer "${fe}" already exists on this map.`)));let be;if(y.type==="custom"){if(Fu(this,e.bX(y)))return;be=e.bT(y,this._globalState)}else{if("source"in y&&typeof y.source=="object"&&(this.addSource(fe,y.source),y=e.bV(y),y=e.e(y,{source:fe})),this._validate(e.F.layer,`layers.${fe}`,y,{arrayIndex:-1},ie))return;be=e.bT(y,this._globalState),this._validateLayer(be),be.setEventedParent(this,{layer:{id:fe}})}let Re=N?this._order.indexOf(N):this._order.length;if(N&&Re===-1)this.fire(new e.l(new Error(`Cannot add layer "${fe}" before non-existing layer "${N}".`)));else{if(this._order.splice(Re,0,fe),this._layerOrderChanged=!0,this._layers[fe]=be,this._removedLayers[fe]&&be.source&&be.type!=="custom"){let je=this._removedLayers[fe];delete this._removedLayers[fe],je.type!==be.type?this._updatedSources[be.source]="clear":(this._updatedSources[be.source]="reload",this.tileManagers[be.source].pause())}this._updateLayer(be),be.onAdd&&be.onAdd(this.map)}}moveLayer(y,N){if(this._checkLoaded(),this._changed=!0,!this._layers[y])return void this.fire(new e.l(new Error(`The layer '${y}' does not exist in the map's style and cannot be moved.`)));if(y===N)return;let ie=this._order.indexOf(y);this._order.splice(ie,1);let fe=N?this._order.indexOf(N):this._order.length;N&&fe===-1?this.fire(new e.l(new Error(`Cannot move layer "${y}" before non-existing layer "${N}".`))):(this._order.splice(fe,0,y),this._layerOrderChanged=!0)}removeLayer(y){this._checkLoaded();let N=this._layers[y];if(!N)return void this.fire(new e.l(new Error(`Cannot remove non-existing layer "${y}".`)));N.setEventedParent(null);let ie=this._order.indexOf(y);this._order.splice(ie,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[y]=N,delete this._layers[y],this._serializedLayers&&delete this._serializedLayers[y],delete this._updatedLayers[y],delete this._updatedPaintProps[y],N.onRemove&&N.onRemove(this.map)}getLayer(y){return this._layers[y]}getLayersOrder(){return[...this._order]}hasLayer(y){return y in this._layers}setLayerZoomRange(y,N,ie){this._checkLoaded();let fe=this.getLayer(y);fe?fe.minzoom===N&&fe.maxzoom===ie||(N!=null&&(fe.minzoom=N),ie!=null&&(fe.maxzoom=ie),this._updateLayer(fe)):this.fire(new e.l(new Error(`Cannot set the zoom range of non-existing layer "${y}".`)))}setFilter(y,N,ie={}){this._checkLoaded();let fe=this.getLayer(y);if(fe){if(!e.bQ(fe.filter,N))return N==null?(fe.setFilter(void 0),void this._updateLayer(fe)):void(this._validate(e.F.filter,`layers.${fe.id}.filter`,N,null,ie)||(fe.setFilter(e.bV(N)),this._updateLayer(fe)))}else this.fire(new e.l(new Error(`Cannot filter non-existing layer "${y}".`)))}getFilter(y){return e.bV(this.getLayer(y).filter)}setLayoutProperty(y,N,ie,fe={}){this._checkLoaded();let be=this.getLayer(y);be?e.bQ(be.getLayoutProperty(N),ie)||(be.setLayoutProperty(N,ie,fe),this._updateLayer(be)):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}getLayoutProperty(y,N){let ie=this.getLayer(y);if(ie)return ie.getLayoutProperty(N);this.fire(new e.l(new Error(`Cannot get style of non-existing layer "${y}".`)))}setPaintProperty(y,N,ie,fe={}){this._checkLoaded();let be=this.getLayer(y);be?e.bQ(be.getPaintProperty(N),ie)||this._updatePaintProperty(be,N,ie,fe):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}_updatePaintProperty(y,N,ie,fe={}){y.setPaintProperty(N,ie,fe)&&this._updateLayer(y),e.bU(y)&&N==="raster-fade-duration"&&this.tileManagers[y.source].setRasterFadeDuration(ie),this._changed=!0,this._updatedPaintProps[y.id]=!0,this._serializedLayers=null}getPaintProperty(y,N){return this.getLayer(y).getPaintProperty(N)}setFeatureState(y,N){this._checkLoaded();let ie=y.source,fe=y.sourceLayer,be=this.tileManagers[ie];if(be===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let Re=be.getSource().type;Re==="geojson"&&fe?this.fire(new e.l(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Re!=="vector"||fe?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),be.setFeatureState(fe,y.id,N)):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(y,N){this._checkLoaded();let ie=y.source,fe=this.tileManagers[ie];if(fe===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let be=fe.getSource().type,Re=be==="vector"?y.sourceLayer:void 0;be!=="vector"||Re?N&&typeof y.id!="string"&&typeof y.id!="number"?this.fire(new e.l(new Error("A feature id is required to remove its specific state property."))):fe.removeFeatureState(Re,y.id,N):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(y){this._checkLoaded();let N=y.source,ie=y.sourceLayer,fe=this.tileManagers[N];if(fe!==void 0)return fe.getSource().type!=="vector"||ie?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),fe.getFeatureState(ie,y.id)):void this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.l(new Error(`The source '${N}' does not exist in the map's style.`)))}getTransition(){var y;return e.e({duration:300,delay:0},(y=this.stylesheet)===null||y===void 0?void 0:y.transition)}serialize(){if(!this._loaded)return;let y=e.bY(this.tileManagers,be=>be.serialize()),N=this._serializeByIds(this._order,!0),ie=this.map.getTerrain()||void 0,fe=this.stylesheet;return e.bZ({version:fe.version,name:fe.name,metadata:fe.metadata,light:fe.light,sky:fe.sky,center:fe.center,zoom:fe.zoom,bearing:fe.bearing,pitch:fe.pitch,sprite:fe.sprite,glyphs:fe.glyphs,transition:fe.transition,projection:fe.projection,sources:y,layers:N,terrain:ie},be=>be!==void 0)}_updateLayer(y){this._updatedLayers[y.id]=!0,y.source&&!this._updatedSources[y.source]&&this.tileManagers[y.source].getSource().type!=="raster"&&(this._updatedSources[y.source]="reload",this.tileManagers[y.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(y){let N=Re=>this._layers[Re].type==="fill-extrusion",ie={},fe=[];for(let Re=this._order.length-1;Re>=0;Re--){let je=this._order[Re];if(N(je)){ie[je]=Re;for(let Ze of y){let ut=Ze[je];if(ut)for(let ft of ut)fe.push(ft)}}}fe.sort((Re,je)=>je.intersectionZ-Re.intersectionZ);let be=[];for(let Re=this._order.length-1;Re>=0;Re--){let je=this._order[Re];if(N(je))for(let Ze=fe.length-1;Ze>=0;Ze--){let ut=fe[Ze].feature;if(ie[ut.layer.id]this.map.terrain.getElevation(ft,Dt,Gt):void 0));return this.placement&&be.push(function(ut,ft,Dt,Gt,Kt,st,It){let Ut={},ir=st.queryRenderedSymbols(Gt),dr=[];for(let Ar of Object.keys(ir).map(Number))dr.push(It[Ar]);dr.sort(K);for(let Ar of dr){let hr=Ar.featureIndex.lookupSymbolFeatures(ir[Ar.bucketInstanceId],ft,Ar.bucketIndex,Ar.sourceLayerIndex,{filterSpec:Kt.filter,globalState:Kt.globalState},Kt.layers,Kt.availableImages,ut);for(let vr in hr){Ut[vr]||(Ut[vr]=[]);let Or=hr[vr];Or.sort((Cr,ta)=>{let ka=Ar.featureSortOrder;if(ka){let Ta=ka.indexOf(Cr.featureIndex);return ka.indexOf(ta.featureIndex)-Ta}return ta.featureIndex-Cr.featureIndex});for(let Cr of Or)Ut[vr].push(Cr)}}return function(Ar,hr,vr){for(let Or in Ar)for(let Cr of Ar[Or])H(Cr,vr[hr[Or].source]);return Ar}(Ut,ut,Dt)}(this._layers,Re,this.tileManagers,y,Ze,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(be)}querySourceFeatures(y,N){N?.filter&&this._validate(e.F.filter,"querySourceFeatures.filter",N.filter,null,N);let ie=this.tileManagers[y];return ie?function(fe,be){let Re=fe.getRenderableIds().map(ut=>fe.getTileByID(ut)),je=[],Ze={};for(let ut of Re){let ft=ut.tileID.canonical.key;Ze[ft]||(Ze[ft]=!0,ut.querySourceFeatures(je,be))}return je}(ie,N?Object.assign(Object.assign({},N),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(y,N={}){this._checkLoaded();let ie=this.light.getLight(),fe=!1;for(let Re in y)if(!e.bQ(y[Re],ie[Re])){fe=!0;break}if(!fe)return;let be={now:g(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(y,N),this.light.updateTransitions(be)}getProjection(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.projection}setProjection(y){this._checkLoaded();let N=y??{type:"mercator"};if(this.stylesheet.projection=y,this.projection){if(this.projection.name===N.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(N.type)}getSky(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.sky}setSky(y,N={}){this._checkLoaded();let ie=this.getSky(),fe=!1;if(!y&&!ie)return;if(y&&!ie)fe=!0;else if(!y&&ie)fe=!0;else for(let Re in y)if(!e.bQ(y[Re],ie[Re])){fe=!0;break}if(!fe)return;let be={now:g(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=y,this.sky.setSky(y,N),this.sky.updateTransitions(be)}_setProjectionInternal(y){let N=function(ie,fe){let be={constrainOverride:fe};if(Array.isArray(ie)){let Re=new Bo({type:ie});return{projection:Re,transform:new os(be),cameraHelper:new rl(Re)}}switch(ie){case"mercator":return{projection:new io,transform:new Eo(be),cameraHelper:new Wo};case"globe":{let Re=new Bo({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:Re,transform:new os(be),cameraHelper:new rl(Re)}}case"vertical-perspective":return{projection:new Vs,transform:new vs(be),cameraHelper:new ms};default:return e.w(`Unknown projection name: ${ie}. Falling back to mercator projection.`),{projection:new io,transform:new Eo(be),cameraHelper:new Wo}}}(y,this.map.transformConstrain);this.projection=N.projection,this.map.migrateProjection(N.transform,N.cameraHelper);for(let ie in this.tileManagers)this.tileManagers[ie].reload()}_validate(y,N,ie,fe,be={}){return be?.validate!==!1&&Fu(this,y.call(e.F,e.e({key:N,style:this.serialize(),value:ie,styleSpec:e.x},fe)))}_remove(y=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),Ye().off(Ae,this._rtlPluginLoaded);for(let N in this._layers)this._layers[N].setEventedParent(null);for(let N in this.tileManagers){let ie=this.tileManagers[N];ie.setEventedParent(null),ie.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),y&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(y)}_clearSource(y){this.tileManagers[y].clearTiles()}_reloadSource(y){this.tileManagers[y].resume(),this.tileManagers[y].reload()}_updateSources(y){for(let N in this.tileManagers)this.tileManagers[N].update(y,this.map.terrain)}_generateCollisionBoxes(){for(let y in this.tileManagers)this._reloadSource(y)}_updatePlacement(y,N,ie,fe,be=!1){let Re=!1,je=!1,Ze={};for(let ut of this._order){let ft=this._layers[ut];if(ft.type!=="symbol")continue;if(!Ze[ft.source]){let Gt=this.tileManagers[ft.source];Ze[ft.source]=Gt.getRenderableIds(!0).map(Kt=>Gt.getTileByID(Kt)).sort((Kt,st)=>st.tileID.overscaledZ-Kt.tileID.overscaledZ||(Kt.tileID.isLessThan(st.tileID)?-1:1))}let Dt=this.crossTileSymbolIndex.addLayer(ft,Ze[ft.source],y.center.lng);Re||(Re=Dt)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),be||(be=this._layerOrderChanged||ie===0),(be||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(g(),y.zoom))&&(this.pauseablePlacement=new ai(y,this.map.terrain,this._order,be,N,ie,fe,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ze),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(g()),je=!0),Re&&this.pauseablePlacement.placement.setStale()),je||Re)for(let ut of this._order){let ft=this._layers[ut];ft.type==="symbol"&&this.placement.updateLayerOpacities(ft,Ze[ft.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(g())}_releaseSymbolFadeTiles(){for(let y in this.tileManagers)this.tileManagers[y].releaseSymbolFadeTiles()}getImages(y,N){return e._(this,void 0,void 0,function*(){let ie=yield this.imageManager.getImages(N.icons);this._updateTilesForChangedImages();let fe=this.tileManagers[N.source];return fe&&fe.setDependencies(N.tileID.key,N.type,N.icons),ie})}getGlyphs(y,N){return e._(this,void 0,void 0,function*(){let ie=yield this.glyphManager.getGlyphs(N.stacks),fe=this.tileManagers[N.source];return fe&&fe.setDependencies(N.tileID.key,N.type,[""]),ie})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(y,N={}){this._checkLoaded(),y&&this._validate(e.F.glyphs,"glyphs",y,null,N)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=y,this.glyphManager.entries={},this.glyphManager.setURL(y))}getDashes(y,N){return e._(this,void 0,void 0,function*(){let ie={};for(let[fe,be]of Object.entries(N.dashes))ie[fe]=this.lineAtlas.getDash(be.dasharray,be.round);return ie})}addSprite(y,N,ie={},fe){this._checkLoaded();let be=[{id:y,url:N}],Re=[...T(this.stylesheet.sprite),...be];this._validate(e.F.sprite,"sprite",Re,null,ie)||(this.stylesheet.sprite=Re,this._loadSprite(be,!0,fe))}removeSprite(y){this._checkLoaded();let N=T(this.stylesheet.sprite);if(N.find(ie=>ie.id===y)){if(this._spritesImagesIds[y])for(let ie of this._spritesImagesIds[y])this.imageManager.removeImage(ie),this._changedImages[ie]=!0;N.splice(N.findIndex(ie=>ie.id===y),1),this.stylesheet.sprite=N.length>0?N:void 0,delete this._spritesImagesIds[y],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}else this.fire(new e.l(new Error(`Sprite "${y}" doesn't exists on this map.`)))}getSprite(){return T(this.stylesheet.sprite)}setSprite(y,N={},ie){this._checkLoaded(),y&&this._validate(e.F.sprite,"sprite",y,null,N)||(this.stylesheet.sprite=y,y?this._loadSprite(y,!0,ie):(this._unloadSprite(),ie&&ie(null)))}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(let y in this.tileManagers){let N=this.tileManagers[y];N.setEventedParent(null),N.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(let y in this._layers){let N=this._layers[y];N.setEventedParent(null),N.onRemove&&N.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var bc=e.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Lh{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(y,N,ie,fe,be,Re,je,Ze,ut){this.context=y;let ft=this.boundPaintVertexBuffers.length!==fe.length;for(let Dt=0;!ft&&Dt({u_texture:0,u_ele_delta:pe,u_fog_matrix:y,u_fog_color:N?N.properties.get("fog-color"):e.bo.white,u_fog_ground_blend:N?N.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:fe?0:N?N.calculateFogBlendOpacity(ie):0,u_horizon_color:N?N.properties.get("horizon-color"):e.bo.white,u_horizon_fog_blend:N?N.properties.get("horizon-fog-blend"):1,u_is_globe_mode:fe?1:0}),Ju={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function ss(pe){let y=[];for(let N of pe){if(N===null)continue;let ie=N.split(" ");y.push(ie.pop())}return y}class ah{constructor(y,N,ie,fe,be,Re,je,Ze,ut=[]){let ft=y.gl;this.program=ft.createProgram();let Dt=ss(N.staticAttributes),Gt=ie?ie.getBinderAttributes():[],Kt=Dt.concat(Gt),st=Ai.prelude.staticUniforms?ss(Ai.prelude.staticUniforms):[],It=je.staticUniforms?ss(je.staticUniforms):[],Ut=N.staticUniforms?ss(N.staticUniforms):[],ir=ie?ie.getBinderUniforms():[],dr=st.concat(It).concat(Ut).concat(ir),Ar=[];for(let Ta of dr)Ar.includes(Ta)||Ar.push(Ta);let hr=ie?ie.defines():[];Ko(ft)&&hr.unshift("#version 300 es"),be&&hr.push("#define OVERDRAW_INSPECTOR;"),Re&&hr.push("#define TERRAIN3D;"),Ze&&hr.push(Ze),ut&&hr.push(...ut);let vr=hr.concat(Ai.prelude.fragmentSource,je.fragmentSource,N.fragmentSource).join(` `),Or=hr.concat(Ai.prelude.vertexSource,je.vertexSource,N.vertexSource).join(` -`);Ko(ft)||(vr=function(Ta){return Ta.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(vr),Or=function(Ta){return Ta.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(Or));let Cr=ft.createShader(ft.FRAGMENT_SHADER);if(ft.isContextLost())return void(this.failedToCreate=!0);if(ft.shaderSource(Cr,vr),ft.compileShader(Cr),!ft.getShaderParameter(Cr,ft.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${ft.getShaderInfoLog(Cr)}`);ft.attachShader(this.program,Cr);let ta=ft.createShader(ft.VERTEX_SHADER);if(ft.isContextLost())return void(this.failedToCreate=!0);if(ft.shaderSource(ta,Or),ft.compileShader(ta),!ft.getShaderParameter(ta,ft.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${ft.getShaderInfoLog(ta)}`);ft.attachShader(this.program,ta),this.attributes={};let ka={};this.numAttributes=Kt.length;for(let Ta=0;Ta({u_depth:new e.b_(Ta,Ra.u_depth),u_terrain:new e.b_(Ta,Ra.u_terrain),u_terrain_dim:new e.bp(Ta,Ra.u_terrain_dim),u_terrain_matrix:new e.c0(Ta,Ra.u_terrain_matrix),u_terrain_unpack:new e.c1(Ta,Ra.u_terrain_unpack),u_terrain_exaggeration:new e.bp(Ta,Ra.u_terrain_exaggeration)}))(y,ka),this.projectionUniforms=((Ta,Ra)=>({u_projection_matrix:new e.c0(Ta,Ra.u_projection_matrix),u_projection_tile_mercator_coords:new e.c1(Ta,Ra.u_projection_tile_mercator_coords),u_projection_clipping_plane:new e.c1(Ta,Ra.u_projection_clipping_plane),u_projection_transition:new e.bp(Ta,Ra.u_projection_transition),u_projection_fallback_matrix:new e.c0(Ta,Ra.u_projection_fallback_matrix)}))(y,ka),this.binderUniforms=ie?ie.getUniforms(y,ka):[]}draw(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt,st,It,Ut,ir,dr,Ar){var hr;let vr=y.gl;if(this.failedToCreate)return;if(y.program.set(this.program),y.setDepthMode(ie),y.setStencilMode(fe),y.setColorMode(be),y.setCullFace(Re),Ze){y.activeTexture.set(vr.TEXTURE2),vr.bindTexture(vr.TEXTURE_2D,Ze.depthTexture),y.activeTexture.set(vr.TEXTURE3),vr.bindTexture(vr.TEXTURE_2D,Ze.texture);for(let Cr in this.terrainUniforms)this.terrainUniforms[Cr].set(Ze[Cr])}if(ut)for(let Cr in ut)this.projectionUniforms[Ju[Cr]].set(ut[Cr]);if(je)for(let Cr in this.fixedUniforms)this.fixedUniforms[Cr].set(je[Cr]);Ut&&Ut.setUniforms(y,this.binderUniforms,st,{zoom:It});let Or=0;switch(N){case vr.LINES:Or=2;break;case vr.TRIANGLES:Or=3;break;case vr.LINE_STRIP:Or=1}for(let Cr of Kt.get())Cr.vaos||(Cr.vaos={}),(hr=Cr.vaos)[ft]||(hr[ft]=new Lh),Cr.vaos[ft].bind(y,this,Dt,Ut?Ut.getPaintVertexBuffers():[],Gt,Cr.vertexOffset,ir,dr,Ar),vr.drawElements(N,Cr.primitiveLength*Or,vr.UNSIGNED_SHORT,Cr.primitiveOffset*Or*2)}}function wc(pe,y,N){let ie=1/e.aK(N,1,y.transform.tileZoom),fe=Math.pow(2,N.tileID.overscaledZ),be=N.tileSize*Math.pow(2,y.transform.tileZoom)/fe,Re=be*(N.tileID.canonical.x+N.tileID.wrap*fe),je=be*N.tileID.canonical.y;return{u_image:0,u_texsize:N.imageAtlasTexture.size,u_scale:[ie,pe.fromScale,pe.toScale],u_fade:pe.t,u_pixel_coord_upper:[Re>>16,je>>16],u_pixel_coord_lower:[65535&Re,65535&je]}}let pc=(pe,y,N,ie)=>{let fe=pe.style.light,be=fe.properties.get("position"),Re=[be.x,be.y,be.z],je=e.c4();fe.properties.get("anchor")==="viewport"&&e.c5(je,pe.transform.bearingInRadians),e.c6(Re,Re,je);let Ze=pe.transform.transformLightDirection(Re),ut=fe.properties.get("color");return{u_lightpos:Re,u_lightpos_globe:Ze,u_lightintensity:fe.properties.get("intensity"),u_lightcolor:[ut.r,ut.g,ut.b],u_vertical_gradient:+y,u_opacity:N,u_fill_translate:ie}},Nf=(pe,y,N,ie,fe,be,Re)=>e.e(pc(pe,y,N,ie),wc(be,pe,Re),{u_height_factor:-Math.pow(2,fe.overscaledZ)/Re.tileSize/8}),Bu=(pe,y,N,ie)=>e.e(wc(y,pe,N),{u_fill_translate:ie}),Tc=(pe,y)=>({u_world:pe,u_fill_translate:y}),Ou=(pe,y,N,ie,fe)=>e.e(Bu(pe,y,N,fe),{u_world:ie}),Gc=(pe,y,N,ie,fe)=>{let be=pe.transform,Re,je,Ze=0;if(N.paint.get("circle-pitch-alignment")==="map"){let ut=e.aK(y,1,be.zoom);Re=!0,je=[ut,ut],Ze=ut/(e.a6*Math.pow(2,y.tileID.overscaledZ))*2*Math.PI*fe}else Re=!1,je=be.pixelsToGLUnits;return{u_camera_to_center_distance:be.cameraToCenterDistance,u_scale_with_map:+(N.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+Re,u_device_pixel_ratio:pe.pixelRatio,u_extrude_scale:je,u_globe_extrude_scale:Ze,u_translate:ie}},pf=pe=>({u_pixel_extrude_scale:[1/pe.width,1/pe.height]}),$l=pe=>({u_viewport_size:[pe.width,pe.height]}),jf=(pe,y=1)=>({u_color:pe,u_overlay:0,u_overlay_scale:y}),Hc=(pe,y,N,ie)=>{let fe=e.aK(pe,1,y)/(e.a6*Math.pow(2,pe.tileID.overscaledZ))*2*Math.PI*ie;return{u_extrude_scale:e.aK(pe,1,y),u_intensity:N,u_globe_extrude_scale:fe}},Wc=(pe,y,N,ie)=>{let fe=e.O();e.c7(fe,0,pe.width,pe.height,0,0,1);let be=pe.context.gl;return{u_matrix:fe,u_world:[be.drawingBufferWidth,be.drawingBufferHeight],u_image:N,u_color_ramp:ie,u_opacity:y.paint.get("heatmap-opacity")}},Qu=(pe,y,N)=>{let ie=N.paint.get("hillshade-accent-color"),fe;switch(N.paint.get("hillshade-method")){case"basic":fe=4;break;case"combined":fe=1;break;case"igor":fe=2;break;case"multidirectional":fe=3;break;default:fe=0}let be=N.getIlluminationProperties();for(let Re=0;Re{let N=y.stride,ie=e.O();return e.c7(ie,0,e.a6,-e.a6,0,0,1),e.Q(ie,ie,[0,-e.a6,0]),{u_matrix:ie,u_image:1,u_dimension:[N,N],u_zoom:pe.overscaledZ,u_unpack:y.getUnpackVector()}};function Nu(pe,y){let N=Math.pow(2,y.canonical.z),ie=y.canonical.y;return[new e.a7(0,ie/N).toLngLat().lat,new e.a7(0,(ie+1)/N).toLngLat().lat]}let Uf=(pe,y,N=0)=>({u_image:0,u_unpack:y.getUnpackVector(),u_dimension:[y.stride,y.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:N,u_opacity:pe.paint.get("color-relief-opacity")}),al=(pe,y,N,ie)=>{let fe=pe.transform;return{u_translation:cu(pe,y,N),u_ratio:ie/e.aK(y,1,fe.zoom),u_device_pixel_ratio:pe.pixelRatio,u_units_to_pixels:[1/fe.pixelsToGLUnits[0],1/fe.pixelsToGLUnits[1]]}},Xc=(pe,y,N,ie,fe)=>e.e(al(pe,y,N,ie),{u_image:0,u_image_height:fe}),ju=(pe,y,N,ie,fe)=>{let be=pe.transform,Re=ec(y,be);return{u_translation:cu(pe,y,N),u_texsize:y.imageAtlasTexture.size,u_ratio:ie/e.aK(y,1,be.zoom),u_device_pixel_ratio:pe.pixelRatio,u_image:0,u_scale:[Re,fe.fromScale,fe.toScale],u_fade:fe.t,u_units_to_pixels:[1/be.pixelsToGLUnits[0],1/be.pixelsToGLUnits[1]]}},Ac=(pe,y,N,ie,fe)=>{let be=ec(y,pe.transform);return e.e(al(pe,y,N,ie),{u_tileratio:be,u_crossfade_from:fe.fromScale,u_crossfade_to:fe.toScale,u_image:0,u_mix:fe.t,u_lineatlas_width:pe.lineAtlas.width,u_lineatlas_height:pe.lineAtlas.height})},Zc=(pe,y,N,ie,fe,be)=>{let Re=ec(y,pe.transform);return e.e(al(pe,y,N,ie),{u_image:0,u_image_height:be,u_tileratio:Re,u_crossfade_from:fe.fromScale,u_crossfade_to:fe.toScale,u_image_dash:1,u_mix:fe.t,u_lineatlas_width:pe.lineAtlas.width,u_lineatlas_height:pe.lineAtlas.height})};function ec(pe,y){return 1/e.aK(pe,1,y.tileZoom)}function cu(pe,y,N){return e.aL(pe.transform,y,N.paint.get("line-translate"),N.paint.get("line-translate-anchor"))}let tc=(pe,y,N,ie,fe)=>{return{u_tl_parent:pe,u_scale_parent:y,u_buffer_scale:1,u_fade_t:N.mix,u_opacity:N.opacity*ie.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ie.paint.get("raster-brightness-min"),u_brightness_high:ie.paint.get("raster-brightness-max"),u_saturation_factor:(Re=ie.paint.get("raster-saturation"),Re>0?1-1/(1.001-Re):-Re),u_contrast_factor:(be=ie.paint.get("raster-contrast"),be>0?1/(1-be):1+be),u_spin_weights:vf(ie.paint.get("raster-hue-rotate")),u_coords_top:[fe[0].x,fe[0].y,fe[1].x,fe[1].y],u_coords_bottom:[fe[3].x,fe[3].y,fe[2].x,fe[2].y]};var be,Re};function vf(pe){pe*=Math.PI/180;let y=Math.sin(pe),N=Math.cos(pe);return[(2*N+1)/3,(-Math.sqrt(3)*y-N+1)/3,(Math.sqrt(3)*y-N+1)/3]}let Tu=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt)=>{let Kt=Re.transform;return{u_is_size_zoom_constant:+(pe==="constant"||pe==="source"),u_is_size_feature_constant:+(pe==="constant"||pe==="camera"),u_size_t:y?y.uSizeT:0,u_size:y?y.uSize:0,u_camera_to_center_distance:Kt.cameraToCenterDistance,u_pitch:Kt.pitch/360*2*Math.PI,u_rotate_symbol:+N,u_aspect_ratio:Kt.width/Kt.height,u_fade_change:Re.options.fadeDuration?Re.symbolFadeChange:1,u_label_plane_matrix:je,u_coord_matrix:Ze,u_is_text:+ft,u_pitch_with_map:+ie,u_is_along_line:fe,u_is_variable_anchor:be,u_texsize:Dt,u_texture:0,u_translation:ut,u_pitched_scale:Gt}},nh=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt)=>{let st=Re.transform;return e.e(Tu(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Kt),{u_gamma_scale:ie?Math.cos(st.pitch*Math.PI/180)*st.cameraToCenterDistance:1,u_device_pixel_ratio:Re.pixelRatio,u_is_halo:Gt?1:0,u_is_plain:1})},vl=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt)=>e.e(nh(pe,y,N,ie,fe,be,Re,je,Ze,ut,!0,ft,!0,Gt),{u_texsize_icon:Dt,u_texture_icon:1}),ml=(pe,y)=>({u_opacity:pe,u_color:y}),rc=(pe,y,N,ie,fe)=>e.e(function(be,Re,je,Ze){let ut=je.imageManager.getPattern(be.from.toString()),ft=je.imageManager.getPattern(be.to.toString()),{width:Dt,height:Gt}=je.imageManager.getPixelSize(),Kt=Math.pow(2,Ze.tileID.overscaledZ),st=Ze.tileSize*Math.pow(2,je.transform.tileZoom)/Kt,It=st*(Ze.tileID.canonical.x+Ze.tileID.wrap*Kt),Ut=st*Ze.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ut.tl,u_pattern_br_a:ut.br,u_pattern_tl_b:ft.tl,u_pattern_br_b:ft.br,u_texsize:[Dt,Gt],u_mix:Re.t,u_pattern_size_a:ut.displaySize,u_pattern_size_b:ft.displaySize,u_scale_a:Re.fromScale,u_scale_b:Re.toScale,u_tile_units_to_pixels:1/e.aK(Ze,1,je.transform.tileZoom),u_pixel_coord_upper:[It>>16,Ut>>16],u_pixel_coord_lower:[65535&It,65535&Ut]}}(N,fe,y,ie),{u_opacity:pe}),yl=(pe,y)=>{},qf={fillExtrusion:(pe,y)=>({u_lightpos:new e.c2(pe,y.u_lightpos),u_lightpos_globe:new e.c2(pe,y.u_lightpos_globe),u_lightintensity:new e.bp(pe,y.u_lightintensity),u_lightcolor:new e.c2(pe,y.u_lightcolor),u_vertical_gradient:new e.bp(pe,y.u_vertical_gradient),u_opacity:new e.bp(pe,y.u_opacity),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillExtrusionPattern:(pe,y)=>({u_lightpos:new e.c2(pe,y.u_lightpos),u_lightpos_globe:new e.c2(pe,y.u_lightpos_globe),u_lightintensity:new e.bp(pe,y.u_lightintensity),u_lightcolor:new e.c2(pe,y.u_lightcolor),u_vertical_gradient:new e.bp(pe,y.u_vertical_gradient),u_height_factor:new e.bp(pe,y.u_height_factor),u_opacity:new e.bp(pe,y.u_opacity),u_fill_translate:new e.c3(pe,y.u_fill_translate),u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade)}),fill:(pe,y)=>({u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillPattern:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillOutline:(pe,y)=>({u_world:new e.c3(pe,y.u_world),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillOutlinePattern:(pe,y)=>({u_world:new e.c3(pe,y.u_world),u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),circle:(pe,y)=>({u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_scale_with_map:new e.b_(pe,y.u_scale_with_map),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_extrude_scale:new e.c3(pe,y.u_extrude_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_globe_extrude_scale:new e.bp(pe,y.u_globe_extrude_scale),u_translate:new e.c3(pe,y.u_translate)}),collisionBox:(pe,y)=>({u_pixel_extrude_scale:new e.c3(pe,y.u_pixel_extrude_scale)}),collisionCircle:(pe,y)=>({u_viewport_size:new e.c3(pe,y.u_viewport_size)}),debug:(pe,y)=>({u_color:new e.b$(pe,y.u_color),u_overlay:new e.b_(pe,y.u_overlay),u_overlay_scale:new e.bp(pe,y.u_overlay_scale)}),depth:yl,clippingMask:yl,heatmap:(pe,y)=>({u_extrude_scale:new e.bp(pe,y.u_extrude_scale),u_intensity:new e.bp(pe,y.u_intensity),u_globe_extrude_scale:new e.bp(pe,y.u_globe_extrude_scale)}),heatmapTexture:(pe,y)=>({u_matrix:new e.c0(pe,y.u_matrix),u_world:new e.c3(pe,y.u_world),u_image:new e.b_(pe,y.u_image),u_color_ramp:new e.b_(pe,y.u_color_ramp),u_opacity:new e.bp(pe,y.u_opacity)}),hillshade:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_latrange:new e.c3(pe,y.u_latrange),u_exaggeration:new e.bp(pe,y.u_exaggeration),u_altitudes:new e.c9(pe,y.u_altitudes),u_azimuths:new e.c9(pe,y.u_azimuths),u_accent:new e.b$(pe,y.u_accent),u_method:new e.b_(pe,y.u_method),u_shadows:new e.c8(pe,y.u_shadows),u_highlights:new e.c8(pe,y.u_highlights)}),hillshadePrepare:(pe,y)=>({u_matrix:new e.c0(pe,y.u_matrix),u_image:new e.b_(pe,y.u_image),u_dimension:new e.c3(pe,y.u_dimension),u_zoom:new e.bp(pe,y.u_zoom),u_unpack:new e.c1(pe,y.u_unpack)}),colorRelief:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_unpack:new e.c1(pe,y.u_unpack),u_dimension:new e.c3(pe,y.u_dimension),u_elevation_stops:new e.b_(pe,y.u_elevation_stops),u_color_stops:new e.b_(pe,y.u_color_stops),u_color_ramp_size:new e.b_(pe,y.u_color_ramp_size),u_opacity:new e.bp(pe,y.u_opacity)}),line:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels)}),lineGradient:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_image_height:new e.bp(pe,y.u_image_height)}),linePattern:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_texsize:new e.c3(pe,y.u_texsize),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_image:new e.b_(pe,y.u_image),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade)}),lineSDF:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_mix:new e.bp(pe,y.u_mix),u_tileratio:new e.bp(pe,y.u_tileratio),u_crossfade_from:new e.bp(pe,y.u_crossfade_from),u_crossfade_to:new e.bp(pe,y.u_crossfade_to),u_lineatlas_width:new e.bp(pe,y.u_lineatlas_width),u_lineatlas_height:new e.bp(pe,y.u_lineatlas_height)}),lineGradientSDF:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_image_height:new e.bp(pe,y.u_image_height),u_tileratio:new e.bp(pe,y.u_tileratio),u_crossfade_from:new e.bp(pe,y.u_crossfade_from),u_crossfade_to:new e.bp(pe,y.u_crossfade_to),u_image_dash:new e.b_(pe,y.u_image_dash),u_mix:new e.bp(pe,y.u_mix),u_lineatlas_width:new e.bp(pe,y.u_lineatlas_width),u_lineatlas_height:new e.bp(pe,y.u_lineatlas_height)}),raster:(pe,y)=>({u_tl_parent:new e.c3(pe,y.u_tl_parent),u_scale_parent:new e.bp(pe,y.u_scale_parent),u_buffer_scale:new e.bp(pe,y.u_buffer_scale),u_fade_t:new e.bp(pe,y.u_fade_t),u_opacity:new e.bp(pe,y.u_opacity),u_image0:new e.b_(pe,y.u_image0),u_image1:new e.b_(pe,y.u_image1),u_brightness_low:new e.bp(pe,y.u_brightness_low),u_brightness_high:new e.bp(pe,y.u_brightness_high),u_saturation_factor:new e.bp(pe,y.u_saturation_factor),u_contrast_factor:new e.bp(pe,y.u_contrast_factor),u_spin_weights:new e.c2(pe,y.u_spin_weights),u_coords_top:new e.c1(pe,y.u_coords_top),u_coords_bottom:new e.c1(pe,y.u_coords_bottom)}),symbolIcon:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texture:new e.b_(pe,y.u_texture),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),symbolSDF:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texture:new e.b_(pe,y.u_texture),u_gamma_scale:new e.bp(pe,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_is_halo:new e.b_(pe,y.u_is_halo),u_is_plain:new e.b_(pe,y.u_is_plain),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),symbolTextAndIcon:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texsize_icon:new e.c3(pe,y.u_texsize_icon),u_texture:new e.b_(pe,y.u_texture),u_texture_icon:new e.b_(pe,y.u_texture_icon),u_gamma_scale:new e.bp(pe,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_is_halo:new e.b_(pe,y.u_is_halo),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),background:(pe,y)=>({u_opacity:new e.bp(pe,y.u_opacity),u_color:new e.b$(pe,y.u_color)}),backgroundPattern:(pe,y)=>({u_opacity:new e.bp(pe,y.u_opacity),u_image:new e.b_(pe,y.u_image),u_pattern_tl_a:new e.c3(pe,y.u_pattern_tl_a),u_pattern_br_a:new e.c3(pe,y.u_pattern_br_a),u_pattern_tl_b:new e.c3(pe,y.u_pattern_tl_b),u_pattern_br_b:new e.c3(pe,y.u_pattern_br_b),u_texsize:new e.c3(pe,y.u_texsize),u_mix:new e.bp(pe,y.u_mix),u_pattern_size_a:new e.c3(pe,y.u_pattern_size_a),u_pattern_size_b:new e.c3(pe,y.u_pattern_size_b),u_scale_a:new e.bp(pe,y.u_scale_a),u_scale_b:new e.bp(pe,y.u_scale_b),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_tile_units_to_pixels:new e.bp(pe,y.u_tile_units_to_pixels)}),terrain:(pe,y)=>({u_texture:new e.b_(pe,y.u_texture),u_ele_delta:new e.bp(pe,y.u_ele_delta),u_fog_matrix:new e.c0(pe,y.u_fog_matrix),u_fog_color:new e.b$(pe,y.u_fog_color),u_fog_ground_blend:new e.bp(pe,y.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.bp(pe,y.u_fog_ground_blend_opacity),u_horizon_color:new e.b$(pe,y.u_horizon_color),u_horizon_fog_blend:new e.bp(pe,y.u_horizon_fog_blend),u_is_globe_mode:new e.bp(pe,y.u_is_globe_mode)}),terrainDepth:(pe,y)=>({u_ele_delta:new e.bp(pe,y.u_ele_delta)}),terrainCoords:(pe,y)=>({u_texture:new e.b_(pe,y.u_texture),u_terrain_coords_id:new e.bp(pe,y.u_terrain_coords_id),u_ele_delta:new e.bp(pe,y.u_ele_delta)}),projectionErrorMeasurement:(pe,y)=>({u_input:new e.bp(pe,y.u_input),u_output_expected:new e.bp(pe,y.u_output_expected)}),atmosphere:(pe,y)=>({u_sun_pos:new e.c2(pe,y.u_sun_pos),u_atmosphere_blend:new e.bp(pe,y.u_atmosphere_blend),u_globe_position:new e.c2(pe,y.u_globe_position),u_globe_radius:new e.bp(pe,y.u_globe_radius),u_inv_proj_matrix:new e.c0(pe,y.u_inv_proj_matrix)}),sky:(pe,y)=>({u_sky_color:new e.b$(pe,y.u_sky_color),u_horizon_color:new e.b$(pe,y.u_horizon_color),u_horizon:new e.c3(pe,y.u_horizon),u_horizon_normal:new e.c3(pe,y.u_horizon_normal),u_sky_horizon_blend:new e.bp(pe,y.u_sky_horizon_blend),u_sky_blend:new e.bp(pe,y.u_sky_blend)})};class ac{constructor(y,N,ie){this.context=y;let fe=y.gl;this.buffer=fe.createBuffer(),this.dynamicDraw=!!ie,this.context.unbindVAO(),y.bindElementBuffer.set(this.buffer),fe.bufferData(fe.ELEMENT_ARRAY_BUFFER,N.arrayBuffer,this.dynamicDraw?fe.DYNAMIC_DRAW:fe.STATIC_DRAW),this.dynamicDraw||N.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(y){let N=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),N.bufferSubData(N.ELEMENT_ARRAY_BUFFER,0,y.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Mc={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class mf{constructor(y,N,ie,fe){this.length=N.length,this.attributes=ie,this.itemSize=N.bytesPerElement,this.dynamicDraw=fe,this.context=y;let be=y.gl;this.buffer=be.createBuffer(),y.bindVertexBuffer.set(this.buffer),be.bufferData(be.ARRAY_BUFFER,N.arrayBuffer,this.dynamicDraw?be.DYNAMIC_DRAW:be.STATIC_DRAW),this.dynamicDraw||N.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(y){if(y.length!==this.length)throw new Error(`Length of new data is ${y.length}, which doesn't match current length of ${this.length}`);let N=this.context.gl;this.bind(),N.bufferSubData(N.ARRAY_BUFFER,0,y.arrayBuffer)}enableAttributes(y,N){for(let ie of this.attributes){let fe=N.attributes[ie.name];fe!==void 0&&y.enableVertexAttribArray(fe)}}setVertexAttribPointers(y,N,ie){for(let fe of this.attributes){let be=N.attributes[fe.name];be!==void 0&&y.vertexAttribPointer(be,fe.components,y[Mc[fe.type]],!1,this.itemSize,fe.offset+this.itemSize*(ie||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class Jo{constructor(y){this.gl=y.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(y){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class ih extends Jo{getDefault(){return e.bo.transparent}set(y){let N=this.current;(y.r!==N.r||y.g!==N.g||y.b!==N.b||y.a!==N.a||this.dirty)&&(this.gl.clearColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class fu extends Jo{getDefault(){return 1}set(y){(y!==this.current||this.dirty)&&(this.gl.clearDepth(y),this.current=y,this.dirty=!1)}}class Sl extends Jo{getDefault(){return 0}set(y){(y!==this.current||this.dirty)&&(this.gl.clearStencil(y),this.current=y,this.dirty=!1)}}class El extends Jo{getDefault(){return[!0,!0,!0,!0]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||y[3]!==N[3]||this.dirty)&&(this.gl.colorMask(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class oh extends Jo{getDefault(){return!0}set(y){(y!==this.current||this.dirty)&&(this.gl.depthMask(y),this.current=y,this.dirty=!1)}}class Au extends Jo{getDefault(){return 255}set(y){(y!==this.current||this.dirty)&&(this.gl.stencilMask(y),this.current=y,this.dirty=!1)}}class $c extends Jo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(y){let N=this.current;(y.func!==N.func||y.ref!==N.ref||y.mask!==N.mask||this.dirty)&&(this.gl.stencilFunc(y.func,y.ref,y.mask),this.current=y,this.dirty=!1)}}class _l extends Jo{getDefault(){let y=this.gl;return[y.KEEP,y.KEEP,y.KEEP]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||this.dirty)&&(this.gl.stencilOp(y[0],y[1],y[2]),this.current=y,this.dirty=!1)}}class nl extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.STENCIL_TEST):N.disable(N.STENCIL_TEST),this.current=y,this.dirty=!1}}class gf extends Jo{getDefault(){return[0,1]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||this.dirty)&&(this.gl.depthRange(y[0],y[1]),this.current=y,this.dirty=!1)}}class Kc extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.DEPTH_TEST):N.disable(N.DEPTH_TEST),this.current=y,this.dirty=!1}}class sh extends Jo{getDefault(){return this.gl.LESS}set(y){(y!==this.current||this.dirty)&&(this.gl.depthFunc(y),this.current=y,this.dirty=!1)}}class hu extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.BLEND):N.disable(N.BLEND),this.current=y,this.dirty=!1}}class Uu extends Jo{getDefault(){let y=this.gl;return[y.ONE,y.ZERO]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||this.dirty)&&(this.gl.blendFunc(y[0],y[1]),this.current=y,this.dirty=!1)}}class qu extends Jo{getDefault(){return e.bo.transparent}set(y){let N=this.current;(y.r!==N.r||y.g!==N.g||y.b!==N.b||y.a!==N.a||this.dirty)&&(this.gl.blendColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class nc extends Jo{getDefault(){return this.gl.FUNC_ADD}set(y){(y!==this.current||this.dirty)&&(this.gl.blendEquation(y),this.current=y,this.dirty=!1)}}class yf extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.CULL_FACE):N.disable(N.CULL_FACE),this.current=y,this.dirty=!1}}class _f extends Jo{getDefault(){return this.gl.BACK}set(y){(y!==this.current||this.dirty)&&(this.gl.cullFace(y),this.current=y,this.dirty=!1)}}class Mu extends Jo{getDefault(){return this.gl.CCW}set(y){(y!==this.current||this.dirty)&&(this.gl.frontFace(y),this.current=y,this.dirty=!1)}}class ic extends Jo{getDefault(){return null}set(y){(y!==this.current||this.dirty)&&(this.gl.useProgram(y),this.current=y,this.dirty=!1)}}class Sc extends Jo{getDefault(){return this.gl.TEXTURE0}set(y){(y!==this.current||this.dirty)&&(this.gl.activeTexture(y),this.current=y,this.dirty=!1)}}class Vu extends Jo{getDefault(){let y=this.gl;return[0,0,y.drawingBufferWidth,y.drawingBufferHeight]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||y[3]!==N[3]||this.dirty)&&(this.gl.viewport(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class xo extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindFramebuffer(N.FRAMEBUFFER,y),this.current=y,this.dirty=!1}}class Ec extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindRenderbuffer(N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class xh extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindTexture(N.TEXTURE_2D,y),this.current=y,this.dirty=!1}}class Vf extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindBuffer(N.ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class xf extends Jo{getDefault(){return null}set(y){let N=this.gl;N.bindBuffer(N.ELEMENT_ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class Gf extends Jo{getDefault(){return null}set(y){var N;if(y===this.current&&!this.dirty)return;let ie=this.gl;Ko(ie)?ie.bindVertexArray(y):(N=ie.getExtension("OES_vertex_array_object"))===null||N===void 0||N.bindVertexArrayOES(y),this.current=y,this.dirty=!1}}class bh extends Jo{getDefault(){return 4}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_ALIGNMENT,y),this.current=y,this.dirty=!1}}class Hf extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),this.current=y,this.dirty=!1}}class il extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,y),this.current=y,this.dirty=!1}}class kl extends Jo{constructor(y,N){super(y),this.context=y,this.parent=N}getDefault(){return null}}class kc extends kl{setDirty(){this.dirty=!0}set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_2D,y,0),this.current=y,this.dirty=!1}}class Cc extends kl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferRenderbuffer(N.FRAMEBUFFER,N.DEPTH_ATTACHMENT,N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class Lc extends kl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferRenderbuffer(N.FRAMEBUFFER,N.DEPTH_STENCIL_ATTACHMENT,N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}let vc="Framebuffer is not complete";class Ft{constructor(y,N,ie,fe,be){this.context=y,this.width=N,this.height=ie;let Re=y.gl,je=this.framebuffer=Re.createFramebuffer();if(this.colorAttachment=new kc(y,je),fe)this.depthAttachment=be?new Lc(y,je):new Cc(y,je);else if(be)throw new Error("Stencil cannot be set without depth");if(Re.checkFramebufferStatus(Re.FRAMEBUFFER)!==Re.FRAMEBUFFER_COMPLETE)throw new Error(vc)}destroy(){let y=this.context.gl,N=this.colorAttachment.get();if(N&&y.deleteTexture(N),this.depthAttachment){let ie=this.depthAttachment.get();ie&&y.deleteRenderbuffer(ie)}y.deleteFramebuffer(this.framebuffer)}}class tr{constructor(y){var N,ie;if(this.gl=y,this.clearColor=new ih(this),this.clearDepth=new fu(this),this.clearStencil=new Sl(this),this.colorMask=new El(this),this.depthMask=new oh(this),this.stencilMask=new Au(this),this.stencilFunc=new $c(this),this.stencilOp=new _l(this),this.stencilTest=new nl(this),this.depthRange=new gf(this),this.depthTest=new Kc(this),this.depthFunc=new sh(this),this.blend=new hu(this),this.blendFunc=new Uu(this),this.blendColor=new qu(this),this.blendEquation=new nc(this),this.cullFace=new yf(this),this.cullFaceSide=new _f(this),this.frontFace=new Mu(this),this.program=new ic(this),this.activeTexture=new Sc(this),this.viewport=new Vu(this),this.bindFramebuffer=new xo(this),this.bindRenderbuffer=new Ec(this),this.bindTexture=new xh(this),this.bindVertexBuffer=new Vf(this),this.bindElementBuffer=new xf(this),this.bindVertexArray=new Gf(this),this.pixelStoreUnpack=new bh(this),this.pixelStoreUnpackPremultiplyAlpha=new Hf(this),this.pixelStoreUnpackFlipY=new il(this),this.extTextureFilterAnisotropic=y.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=y.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=y.getParameter(y.MAX_TEXTURE_SIZE),Ko(y)){this.HALF_FLOAT=y.HALF_FLOAT;let fe=y.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(N=y.RGBA16F)!==null&&N!==void 0?N:fe?.RGBA16F_EXT,this.RGB16F=(ie=y.RGB16F)!==null&&ie!==void 0?ie:fe?.RGB16F_EXT,y.getExtension("EXT_color_buffer_float")}else{y.getExtension("EXT_color_buffer_half_float"),y.getExtension("OES_texture_half_float_linear");let fe=y.getExtension("OES_texture_half_float");this.HALF_FLOAT=fe?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(y,N){return new ac(this,y,N)}createVertexBuffer(y,N,ie){return new mf(this,y,N,ie)}createRenderbuffer(y,N,ie){let fe=this.gl,be=fe.createRenderbuffer();return this.bindRenderbuffer.set(be),fe.renderbufferStorage(fe.RENDERBUFFER,y,N,ie),this.bindRenderbuffer.set(null),be}createFramebuffer(y,N,ie,fe){return new Ft(this,y,N,ie,fe)}clear({color:y,depth:N,stencil:ie}){let fe=this.gl,be=0;y&&(be|=fe.COLOR_BUFFER_BIT,this.clearColor.set(y),this.colorMask.set([!0,!0,!0,!0])),N!==void 0&&(be|=fe.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(N),this.depthMask.set(!0)),ie!==void 0&&(be|=fe.STENCIL_BUFFER_BIT,this.clearStencil.set(ie),this.stencilMask.set(255)),fe.clear(be)}setCullFace(y){y.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(y.mode),this.frontFace.set(y.frontFace))}setDepthMode(y){y.func!==this.gl.ALWAYS||y.mask?(this.depthTest.set(!0),this.depthFunc.set(y.func),this.depthMask.set(y.mask),this.depthRange.set(y.range)):this.depthTest.set(!1)}setStencilMode(y){y.test.func!==this.gl.ALWAYS||y.mask?(this.stencilTest.set(!0),this.stencilMask.set(y.mask),this.stencilOp.set([y.fail,y.depthFail,y.pass]),this.stencilFunc.set({func:y.test.func,ref:y.ref,mask:y.test.mask})):this.stencilTest.set(!1)}setColorMode(y){e.bQ(y.blendFunction,to.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(y.blendFunction),this.blendColor.set(y.blendColor)),this.colorMask.set(y.mask)}createVertexArray(){var y;return Ko(this.gl)?this.gl.createVertexArray():(y=this.gl.getExtension("OES_vertex_array_object"))===null||y===void 0?void 0:y.createVertexArrayOES()}deleteVertexArray(y){var N;Ko(this.gl)?this.gl.deleteVertexArray(y):(N=this.gl.getExtension("OES_vertex_array_object"))===null||N===void 0||N.deleteVertexArrayOES(y)}unbindVAO(){this.bindVertexArray.set(null)}}let Fr;function wr(pe,y,N,ie,fe){var be,Re;let je=pe.context,Ze=pe.transform,ut=je.gl,ft=pe.useProgram("collisionBox"),Dt=[],Gt=0,Kt=0;for(let Ar of ie){let hr=y.getTile(Ar).getBucket(N);if(!hr)continue;let vr=fe?hr.textCollisionBox:hr.iconCollisionBox,Or=hr.collisionCircleArray;Or.length>0&&(Dt.push({circleArray:Or,circleOffset:Kt,coord:Ar}),Gt+=Or.length/4,Kt=Gt),vr&&ft.draw(je,ut.LINES,Vi.disabled,Xi.disabled,pe.colorModeForRenderPass(),pi.disabled,pf(pe.transform),(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Ar),Ze.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),N.id,vr.layoutVertexBuffer,vr.indexBuffer,vr.segments,null,pe.transform.zoom,null,null,vr.collisionVertexBuffer)}if(!fe||!Dt.length)return;let st=pe.useProgram("collisionCircle"),It=new e.ca;It.resize(4*Gt),It._trim();let Ut=0;for(let Ar of Dt)for(let hr=0;hr=0&&(It[ir.associatedIconIndex]={shiftedAnchor:da,angle:Fa})}else Ja(ir.numGlyphs,Kt)}if(Ze){st.clear();let Ut=pe.icon.placedSymbolArray;for(let ir=0;irpe.style.map.terrain.getElevation(ma,mo,ru):null,Ll=N.layout.get("text-rotation-alignment")==="map";La(Fa,pe,fe,Wi,Go,Ar,ut,Ll,ma.toUnwrapped(),ir.width,ir.height,Mo,Ys)}let Ws=fe&&ka||So,Zo=hr||Ws?ea:Ar?Wi:pe.transform.clipSpaceToPixelsMatrix,es=Dn&&N.paint.get(fe?"text-halo-width":"icon-halo-width").constantOr(1)!==0,$o;$o=Dn?Fa.iconsInText?vl(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,Rn,so,Ra):nh(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,fe,Rn,es,Ra):Tu(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,fe,Rn,Ra);let _s={program:sn,buffers:za,uniformValues:$o,projectionData:zs,atlasTexture:In,atlasTextureIcon:ti,atlasInterpolation:Jn,atlasInterpolationIcon:Ei,isSDF:Dn,hasHalo:es};if(Or&&Fa.canOverlap){Cr=!0;let Go=za.segments.get();for(let Ys of Go)Ta.push({segments:new e.aV([Ys]),sortKey:Ys.sortKey,state:_s,terrainData:Pn})}else Ta.push({segments:za.segments,sortKey:0,state:_s,terrainData:Pn})}Cr&&Ta.sort((ma,da)=>ma.sortKey-da.sortKey);let ua=(st=N.paint.get(fe?"text-halo-width":"icon-halo-width").constantOr(null))!==null&&st!==void 0?st:1/0,ia=N.layout.get("text-letter-spacing").constantOr(0)*e.aJ<0||ua>1;for(let ma of Ta){let da=ma.state;It.activeTexture.set(Ut.TEXTURE0),da.atlasTexture.bind(da.atlasInterpolation,Ut.CLAMP_TO_EDGE),da.atlasTextureIcon&&(It.activeTexture.set(Ut.TEXTURE1),da.atlasTextureIcon&&da.atlasTextureIcon.bind(da.atlasInterpolationIcon,Ut.CLAMP_TO_EDGE));let Fa=da.isSDF&&da.hasHalo;if(Fa){let za=da.uniformValues;za.u_is_halo=1,ia&&(za.u_is_plain=0,Da(da.buffers,ma.segments,N,pe,da.program,ta,ft,Dt,za,da.projectionData,ma.terrainData),za.u_is_halo=0,za.u_is_plain=1)}Da(da.buffers,ma.segments,N,pe,da.program,ta,ft,Dt,da.uniformValues,da.projectionData,ma.terrainData),Fa&&!ia&&(da.uniformValues.u_is_halo=0)}}function Da(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft){let Dt=ie.context;fe.draw(Dt,Dt.gl.TRIANGLES,be,Re,je,pi.backCCW,Ze,ft,ut,N.id,pe.layoutVertexBuffer,pe.indexBuffer,y,N.paint,ie.transform.zoom,pe.programConfigurations.get(N.id),pe.dynamicLayoutVertexBuffer,pe.opacityVertexBuffer)}function Ha(pe,y,N,ie,fe){let be=pe.context,Re=be.gl,je=Xi.disabled,Ze=new to([Re.ONE,Re.ONE],e.bo.transparent,[!0,!0,!0,!0]),ut=y.getBucket(N);if(!ut)return;let ft=ie.key,Dt=N.heatmapFbos.get(ft);Dt||(Dt=vn(be,y.tileSize,y.tileSize),N.heatmapFbos.set(ft,Dt)),be.bindFramebuffer.set(Dt.framebuffer),be.viewport.set([0,0,y.tileSize,y.tileSize]),be.clear({color:e.bo.transparent});let Gt=ut.programConfigurations.get(N.id),Kt=pe.useProgram("heatmap",Gt,!fe),st=pe.transform.getProjectionData({overscaledTileID:y.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),It=pe.style.map.terrain.getTerrainData(ie);Kt.draw(be,Re.TRIANGLES,Vi.disabled,je,Ze,pi.disabled,Hc(y,pe.transform.zoom,N.paint.get("heatmap-intensity"),1),It,st,N.id,ut.layoutVertexBuffer,ut.indexBuffer,ut.segments,N.paint,pe.transform.zoom,Gt)}function $a(pe,y,N,ie,fe){let be=pe.context,Re=be.gl,je=pe.transform;be.setColorMode(pe.colorModeForRenderPass());let Ze=Sn(be,y),ut=N.key,ft=y.heatmapFbos.get(ut);if(!ft)return;be.activeTexture.set(Re.TEXTURE0),Re.bindTexture(Re.TEXTURE_2D,ft.colorAttachment.get()),be.activeTexture.set(Re.TEXTURE1),Ze.bind(Re.LINEAR,Re.CLAMP_TO_EDGE);let Dt=je.getProjectionData({overscaledTileID:N,applyTerrainMatrix:fe,applyGlobeMatrix:!ie});pe.useProgram("heatmapTexture").draw(be,Re.TRIANGLES,Vi.disabled,Xi.disabled,pe.colorModeForRenderPass(),pi.disabled,Wc(pe,y,0,1),null,Dt,y.id,pe.rasterBoundsBuffer,pe.quadTriangleIndexBuffer,pe.rasterBoundsSegments,y.paint,je.zoom),ft.destroy(),y.heatmapFbos.delete(ut)}function vn(pe,y,N){var ie,fe;let be=pe.gl,Re=be.createTexture();be.bindTexture(be.TEXTURE_2D,Re),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_WRAP_S,be.CLAMP_TO_EDGE),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_WRAP_T,be.CLAMP_TO_EDGE),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_MIN_FILTER,be.LINEAR),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_MAG_FILTER,be.LINEAR);let je=(ie=pe.HALF_FLOAT)!==null&&ie!==void 0?ie:be.UNSIGNED_BYTE,Ze=(fe=pe.RGBA16F)!==null&&fe!==void 0?fe:be.RGBA;be.texImage2D(be.TEXTURE_2D,0,Ze,y,N,0,be.RGBA,je,null);let ut=pe.createFramebuffer(y,N,!1,!1);return ut.colorAttachment.set(Re),ut}function Sn(pe,y){return y.colorRampTexture||(y.colorRampTexture=new e.T(pe,y.colorRamp,pe.gl.RGBA)),y.colorRampTexture}function yi(pe,y,N,ie,fe,be,Re,je){let Ze=256;if(fe.stepInterpolant){let ut=y.getSource().maxzoom,ft=Re.canonical.z===ut?Math.ceil(1<pe.options.anisotropicFilterPitch&&Kt.texParameterf(Kt.TEXTURE_2D,Gt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Gt.extTextureFilterAnisotropicMax);let ma=(ft=pe.style.map.terrain)===null||ft===void 0?void 0:ft.getTerrainData(Cr),da=It.getProjectionData({overscaledTileID:Cr,aligned:dr,applyGlobeMatrix:!ut,applyTerrainMatrix:!0}),Fa=tc(ua,Ra,ia.fadeMix,N,je),za=Ut.getMeshFromTileID(Gt,Cr.canonical,be,Re,"raster");st.draw(Gt,Kt.TRIANGLES,ta,fe?fe[Cr.overscaledZ]:Xi.disabled,ir,Ze?pi.frontCCW:pi.backCCW,Fa,ma,da,N.id,za.vertexBuffer,za.indexBuffer,za.segments)}}function Gs(pe,y,N,ie){let fe={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(N===0||ie)return fe;if(pe.fadingParentID){let be=y.getLoadedTile(pe.fadingParentID);if(!be)return fe;let Re=Math.pow(2,be.tileID.overscaledZ-pe.tileID.overscaledZ),je=[pe.tileID.canonical.x*Re%1,pe.tileID.canonical.y*Re%1],Ze=function(ut,ft,Dt){let Gt=m(),Kt=(Gt-ft.timeAdded)/Dt,st=ut.fadingDirection===gt.Incoming,It=e.al((Gt-ut.timeAdded)/Dt,0,1),Ut=e.al(1-Kt,0,1),ir=st?It:Ut;return{tileOpacity:ir,parentTileOpacity:st?Ut:It,fadeMix:{opacity:1,mix:1-ir}}}(pe,be,N);return{parentTile:be,parentScaleBy:Re,parentTopLeft:je,fadeValues:Ze}}if(pe.selfFading){let be=function(Re,je){let Ze=(m()-Re.timeAdded)/je,ut=e.al(Ze,0,1);return{tileOpacity:ut,fadeMix:{opacity:ut,mix:0}}}(pe,N);return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:be}}return fe}let Es=new e.bo(1,0,0,1),ns=new e.bo(0,1,0,1),Kn=new e.bo(0,0,1,1),zo=new e.bo(1,0,1,1),gs=new e.bo(0,1,1,1);function js(pe,y,N,ie){zl(pe,0,y+N/2,pe.transform.width,N,ie)}function Cl(pe,y,N,ie){zl(pe,y-N/2,0,N,pe.transform.height,ie)}function zl(pe,y,N,ie,fe,be){let Re=pe.context,je=Re.gl;je.enable(je.SCISSOR_TEST),je.scissor(y*pe.pixelRatio,N*pe.pixelRatio,ie*pe.pixelRatio,fe*pe.pixelRatio),Re.clear({color:be}),je.disable(je.SCISSOR_TEST)}function Kl(pe,y,N){var ie;let fe=pe.context,be=fe.gl,Re=pe.useProgram("debug"),je=Vi.disabled,Ze=Xi.disabled,ut=pe.colorModeForRenderPass(),ft="$debug",Dt=(ie=pe.style.map.terrain)===null||ie===void 0?void 0:ie.getTerrainData(N);fe.activeTexture.set(be.TEXTURE0);let Gt=y.getTileByID(N.key).latestRawTileData,Kt=Math.floor((Gt?.byteLength||0)/1024),st=y.getTile(N).tileSize,It=512/Math.min(st,512)*(N.overscaledZ/pe.transform.zoom)*.5,Ut=N.canonical.toString();N.overscaledZ!==N.canonical.z&&(Ut+=` => ${N.overscaledZ}`),function(dr,Ar){dr.initDebugOverlayCanvas();let hr=dr.debugOverlayCanvas,vr=dr.context.gl,Or=dr.debugOverlayCanvas.getContext("2d");Or.clearRect(0,0,hr.width,hr.height),Or.shadowColor="white",Or.shadowBlur=2,Or.lineWidth=1.5,Or.strokeStyle="white",Or.textBaseline="top",Or.font="bold 36px Open Sans, sans-serif",Or.fillText(Ar,5,5),Or.strokeText(Ar,5,5),dr.debugOverlayTexture.update(hr),dr.debugOverlayTexture.bind(vr.LINEAR,vr.CLAMP_TO_EDGE)}(pe,`${Ut} ${Kt}kB`);let ir=pe.transform.getProjectionData({overscaledTileID:N,applyGlobeMatrix:!0,applyTerrainMatrix:!0});Re.draw(fe,be.TRIANGLES,je,Ze,to.alphaBlended,pi.disabled,jf(e.bo.transparent,It),null,ir,ft,pe.debugBuffer,pe.quadTriangleIndexBuffer,pe.debugSegments),Re.draw(fe,be.LINE_STRIP,je,Ze,ut,pi.disabled,jf(e.bo.red),Dt,ir,ft,pe.debugBuffer,pe.tileBorderIndexBuffer,pe.debugSegments)}function Gu(pe,y,N,ie){let{isRenderingGlobe:fe}=ie,be=pe.context,Re=be.gl,je=pe.transform,Ze=pe.colorModeForRenderPass(),ut=pe.getDepthModeFor3D(),ft=pe.useProgram("terrain");be.bindFramebuffer.set(null),be.viewport.set([0,0,pe.width,pe.height]);for(let Dt of N){let Gt=y.getTerrainMesh(Dt.tileID),Kt=pe.renderToTexture.getTexture(Dt),st=y.getTerrainData(Dt.tileID);be.activeTexture.set(Re.TEXTURE0),Re.bindTexture(Re.TEXTURE_2D,Kt.texture);let It=y.getMeshFrameDelta(je.zoom),Ut=je.calculateFogMatrix(Dt.tileID.toUnwrapped()),ir=rh(It,Ut,pe.style.sky,je.pitch,fe),dr=je.getProjectionData({overscaledTileID:Dt.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ft.draw(be,Re.TRIANGLES,ut,Xi.disabled,Ze,pi.backCCW,ir,st,dr,"terrain",Gt.vertexBuffer,Gt.indexBuffer,Gt.segments)}}function xl(pe,y){if(!y.mesh){let N=new e.aU;N.emplaceBack(-1,-1),N.emplaceBack(1,-1),N.emplaceBack(1,1),N.emplaceBack(-1,1);let ie=new e.aW;ie.emplaceBack(0,1,2),ie.emplaceBack(0,2,3),y.mesh=new Xn(pe.createVertexBuffer(N,eo.members),pe.createIndexBuffer(ie),e.aV.simpleSegment(0,0,N.length,ie.length))}return y.mesh}let Hu={symbol:function(pe,y,N,ie,fe,be){if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=be,je=Xi.disabled,Ze=pe.colorModeForRenderPass();(N._unevaluatedLayout.hasValue("text-variable-anchor")||N._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(ut,ft,Dt,Gt,Kt,st,It,Ut,ir){var dr;let Ar=ft.transform,hr=ft.style.map.terrain,vr=Kt==="map",Or=st==="map";for(let Cr of ut){let ta=Gt.getTile(Cr),ka=ta.getBucket(Dt);if(!(!((dr=ka?.text)===null||dr===void 0)&&dr.segments.get().length))continue;let Ta=e.aw(ka.textSizeData,Ar.zoom),Ra=e.aK(ta,1,ft.transform.zoom),ua=cr(vr,ft.transform,Ra),ia=Dt.layout.get("icon-text-fit")!=="none"&&ka.hasIconData();if(Ta){let ma=Math.pow(2,Ar.zoom-ta.tileID.overscaledZ),da=hr?(Fa,za)=>hr.getElevation(Cr,Fa,za):null;Na(ka,vr,Or,ir,Ar,ua,ma,Ta,ia,e.aL(Ar,ta,It,Ut),Cr.toUnwrapped(),da)}}}(ie,pe,N,y,N.layout.get("text-rotation-alignment"),N.layout.get("text-pitch-alignment"),N.paint.get("text-translate"),N.paint.get("text-translate-anchor"),fe),N.paint.get("icon-opacity").constantOr(1)!==0&&mn(pe,y,N,ie,!1,N.paint.get("icon-translate"),N.paint.get("icon-translate-anchor"),N.layout.get("icon-rotation-alignment"),N.layout.get("icon-pitch-alignment"),N.layout.get("icon-keep-upright"),je,Ze,Re),N.paint.get("text-opacity").constantOr(1)!==0&&mn(pe,y,N,ie,!0,N.paint.get("text-translate"),N.paint.get("text-translate-anchor"),N.layout.get("text-rotation-alignment"),N.layout.get("text-pitch-alignment"),N.layout.get("text-keep-upright"),je,Ze,Re),y.map.showCollisionBoxes&&(wr(pe,y,N,ie,!0),wr(pe,y,N,ie,!1))},circle:function(pe,y,N,ie,fe){var be;if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=fe,je=N.paint.get("circle-opacity"),Ze=N.paint.get("circle-stroke-width"),ut=N.paint.get("circle-stroke-opacity"),ft=!N.layout.get("circle-sort-key").isConstant();if(je.constantOr(1)===0&&(Ze.constantOr(1)===0||ut.constantOr(1)===0))return;let Dt=pe.context,Gt=Dt.gl,Kt=pe.transform,st=pe.getDepthModeForSublayer(0,Vi.ReadOnly),It=Xi.disabled,Ut=pe.colorModeForRenderPass(),ir=[],dr=Kt.getCircleRadiusCorrection();for(let Ar of ie){let hr=y.getTile(Ar),vr=hr.getBucket(N);if(!vr)continue;let Or=N.paint.get("circle-translate"),Cr=N.paint.get("circle-translate-anchor"),ta=e.aL(Kt,hr,Or,Cr),ka=vr.programConfigurations.get(N.id),Ta=pe.useProgram("circle",ka),Ra=vr.layoutVertexBuffer,ua=vr.indexBuffer,ia=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Ar),ma={programConfiguration:ka,program:Ta,layoutVertexBuffer:Ra,indexBuffer:ua,uniformValues:Gc(pe,hr,N,ta,dr),terrainData:ia,projectionData:Kt.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!Re,applyTerrainMatrix:!0})};if(ft){let da=vr.segments.get();for(let Fa of da)ir.push({segments:new e.aV([Fa]),sortKey:Fa.sortKey,state:ma})}else ir.push({segments:vr.segments,sortKey:0,state:ma})}ft&&ir.sort((Ar,hr)=>Ar.sortKey-hr.sortKey);for(let Ar of ir){let{programConfiguration:hr,program:vr,layoutVertexBuffer:Or,indexBuffer:Cr,uniformValues:ta,terrainData:ka,projectionData:Ta}=Ar.state;vr.draw(Dt,Gt.TRIANGLES,st,It,Ut,pi.backCCW,ta,ka,Ta,N.id,Or,Cr,Ar.segments,N.paint,pe.transform.zoom,hr)}},heatmap:function(pe,y,N,ie,fe){if(N.paint.get("heatmap-opacity")===0)return;let be=pe.context,{isRenderingToTexture:Re,isRenderingGlobe:je}=fe;if(pe.style.map.terrain){for(let Ze of ie){let ut=y.getTile(Ze);y.hasRenderableParent(Ze)||(pe.renderPass==="offscreen"?Ha(pe,ut,N,Ze,je):pe.renderPass==="translucent"&&$a(pe,N,Ze,Re,je))}be.viewport.set([0,0,pe.width,pe.height])}else pe.renderPass==="offscreen"?function(Ze,ut,ft,Dt){let Gt=Ze.context,Kt=Gt.gl,st=Ze.transform,It=Xi.disabled,Ut=new to([Kt.ONE,Kt.ONE],e.bo.transparent,[!0,!0,!0,!0]);(function(ir,dr,Ar){let hr=ir.gl;ir.activeTexture.set(hr.TEXTURE1),ir.viewport.set([0,0,dr.width/4,dr.height/4]);let vr=Ar.heatmapFbos.get(e.cd);vr?(hr.bindTexture(hr.TEXTURE_2D,vr.colorAttachment.get()),ir.bindFramebuffer.set(vr.framebuffer)):(vr=vn(ir,dr.width/4,dr.height/4),Ar.heatmapFbos.set(e.cd,vr))})(Gt,Ze,ft),Gt.clear({color:e.bo.transparent});for(let ir of Dt){if(ut.hasRenderableParent(ir))continue;let dr=ut.getTile(ir),Ar=dr.getBucket(ft);if(!Ar)continue;let hr=Ar.programConfigurations.get(ft.id),vr=Ze.useProgram("heatmap",hr),Or=st.getProjectionData({overscaledTileID:ir,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Cr=st.getCircleRadiusCorrection();vr.draw(Gt,Kt.TRIANGLES,Vi.disabled,It,Ut,pi.backCCW,Hc(dr,st.zoom,ft.paint.get("heatmap-intensity"),Cr),null,Or,ft.id,Ar.layoutVertexBuffer,Ar.indexBuffer,Ar.segments,ft.paint,st.zoom,hr)}Gt.viewport.set([0,0,Ze.width,Ze.height])}(pe,y,N,ie):pe.renderPass==="translucent"&&function(Ze,ut){let ft=Ze.context,Dt=ft.gl;ft.setColorMode(Ze.colorModeForRenderPass());let Gt=ut.heatmapFbos.get(e.cd);Gt&&(ft.activeTexture.set(Dt.TEXTURE0),Dt.bindTexture(Dt.TEXTURE_2D,Gt.colorAttachment.get()),ft.activeTexture.set(Dt.TEXTURE1),Sn(ft,ut).bind(Dt.LINEAR,Dt.CLAMP_TO_EDGE),Ze.useProgram("heatmapTexture").draw(ft,Dt.TRIANGLES,Vi.disabled,Xi.disabled,Ze.colorModeForRenderPass(),pi.disabled,Wc(Ze,ut,0,1),null,null,ut.id,Ze.viewportBuffer,Ze.quadTriangleIndexBuffer,Ze.viewportSegments,ut.paint,Ze.transform.zoom))}(pe,N)},line:function(pe,y,N,ie,fe){var be;if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=fe,je=N.paint.get("line-opacity"),Ze=N.paint.get("line-width");if(je.constantOr(1)===0||Ze.constantOr(1)===0)return;let ut=pe.getDepthModeForSublayer(0,Vi.ReadOnly),ft=pe.colorModeForRenderPass(),Dt=N.paint.get("line-dasharray"),Gt=Dt.constantOr(1),Kt=N.paint.get("line-pattern"),st=Kt.constantOr(1),It=N.paint.get("line-gradient"),Ut=N.getCrossfadeParameters(),ir;ir=st?"linePattern":Gt&&It?"lineGradientSDF":Gt?"lineSDF":It?"lineGradient":"line";let dr=pe.context,Ar=dr.gl,hr=pe.transform,vr=!0;for(let Or of ie){let Cr=y.getTile(Or);if(st&&!Cr.patternsLoaded())continue;let ta=Cr.getBucket(N);if(!ta)continue;let ka=ta.programConfigurations.get(N.id),Ta=pe.context.program.get(),Ra=pe.useProgram(ir,ka),ua=vr||Ra.program!==Ta,ia=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Or),ma=Kt.constantOr(null),da=Dt?.constantOr(null);if(ma&&Cr.imageAtlas){let ui=Cr.imageAtlas,cn=ui.patternPositions[ma.to.toString()],sn=ui.patternPositions[ma.from.toString()];cn&&sn&&ka.setConstantPatternPositions(cn,sn)}else if(da){let ui=N.layout.get("line-cap").constantOr(null)==="round",cn=pe.lineAtlas.getDash(da.to,ui),sn=pe.lineAtlas.getDash(da.from,ui);ka.setConstantDashPositions(cn,sn)}let Fa=hr.getProjectionData({overscaledTileID:Or,applyGlobeMatrix:!Re,applyTerrainMatrix:!0}),za=hr.getPixelScale(),kn;st?(kn=ju(pe,Cr,N,za,Ut),_i(dr,Ar,Cr,ka,Ut)):Gt&&It?(kn=Zc(pe,Cr,N,za,Ut,ta.lineClipsArray.length),En(pe,y,dr,Ar,N,ta,Or,ka,Ut)):Gt?(kn=Ac(pe,Cr,N,za,Ut),ki(pe,dr,Ar,ka,ua,Ut)):It?(kn=Xc(pe,Cr,N,za,ta.lineClipsArray.length),ri(pe,y,dr,Ar,N,ta,Or)):kn=al(pe,Cr,N,za);let Dn=pe.stencilModeForClipping(Or);Ra.draw(dr,Ar.TRIANGLES,ut,Dn,ft,pi.disabled,kn,ia,Fa,N.id,ta.layoutVertexBuffer,ta.indexBuffer,ta.segments,N.paint,pe.transform.zoom,ka,ta.layoutVertexBuffer2),vr=!1}},fill:function(pe,y,N,ie,fe){let be=N.paint.get("fill-color"),Re=N.paint.get("fill-opacity");if(Re.constantOr(1)===0)return;let{isRenderingToTexture:je}=fe,Ze=pe.colorModeForRenderPass(),ut=N.paint.get("fill-pattern"),ft=pe.opaquePassEnabledForLayer()&&!ut.constantOr(1)&&be.constantOr(e.bo.transparent).a===1&&Re.constantOr(0)===1?"opaque":"translucent";if(pe.renderPass===ft){let Dt=pe.getDepthModeForSublayer(1,pe.renderPass==="opaque"?Vi.ReadWrite:Vi.ReadOnly);Ni(pe,y,N,ie,Dt,Ze,!1,je)}if(pe.renderPass==="translucent"&&N.paint.get("fill-antialias")){let Dt=pe.getDepthModeForSublayer(N.getPaintProperty("fill-outline-color")?2:0,Vi.ReadOnly);Ni(pe,y,N,ie,Dt,Ze,!0,je)}},fillExtrusion:function(pe,y,N,ie,fe){let be=N.paint.get("fill-extrusion-opacity");if(be===0)return;let{isRenderingToTexture:Re}=fe;if(pe.renderPass==="translucent"){let je=new Vi(pe.context.gl.LEQUAL,Vi.ReadWrite,pe.depthRangeFor3D);if(be!==1||N.paint.get("fill-extrusion-pattern").constantOr(1))Zi(pe,y,N,ie,je,Xi.disabled,to.disabled,Re),Zi(pe,y,N,ie,je,pe.stencilModeFor3D(),pe.colorModeForRenderPass(),Re);else{let Ze=pe.colorModeForRenderPass();Zi(pe,y,N,ie,je,Xi.disabled,Ze,Re)}}},hillshade:function(pe,y,N,ie,fe){if(pe.renderPass!=="offscreen"&&pe.renderPass!=="translucent")return;let{isRenderingToTexture:be}=fe,Re=pe.context,je=pe.style.projection.useSubdivision,Ze=pe.getDepthModeForSublayer(0,Vi.ReadOnly),ut=pe.colorModeForRenderPass();if(pe.renderPass==="offscreen")(function(ft,Dt,Gt,Kt,st,It,Ut){let ir=ft.context,dr=ir.gl,Ar=Kt.paint.get("resampling")==="nearest"?dr.NEAREST:dr.LINEAR;for(let hr of Gt){let vr=Dt.getTile(hr),Or=vr.dem;if(!Or?.data||!vr.needsHillshadePrepare)continue;let Cr=Or.dim,ta=Or.stride,ka=Or.getPixels();if(ir.activeTexture.set(dr.TEXTURE1),ir.pixelStoreUnpackPremultiplyAlpha.set(!1),vr.demTexture||(vr.demTexture=ft.getTileTexture(ta)),vr.demTexture){let Ra=vr.demTexture;Ra.update(ka,{premultiply:!1}),Ra.bind(dr.NEAREST,dr.CLAMP_TO_EDGE)}else vr.demTexture=new e.T(ir,ka,dr.RGBA,{premultiply:!1}),vr.demTexture.bind(dr.NEAREST,dr.CLAMP_TO_EDGE);ir.activeTexture.set(dr.TEXTURE0);let Ta=vr.fbo;if(!Ta){let Ra=new e.T(ir,{width:Cr,height:Cr,data:null},dr.RGBA);Ra.bind(Ar,dr.CLAMP_TO_EDGE),Ta=vr.fbo=ir.createFramebuffer(Cr,Cr,!0,!1),Ta.colorAttachment.set(Ra.texture)}ir.bindFramebuffer.set(Ta.framebuffer),ir.viewport.set([0,0,Cr,Cr]),ft.useProgram("hillshadePrepare").draw(ir,dr.TRIANGLES,st,It,Ut,pi.disabled,Yc(vr.tileID,Or),null,null,Kt.id,ft.rasterBoundsBuffer,ft.quadTriangleIndexBuffer,ft.rasterBoundsSegments),vr.needsHillshadePrepare=!1}})(pe,y,ie,N,Ze,Xi.disabled,ut),Re.viewport.set([0,0,pe.width,pe.height]);else if(pe.renderPass==="translucent")if(je){let[ft,Dt,Gt]=pe.stencilConfigForOverlapTwoPass(ie);Co(pe,y,N,Gt,ft,Ze,ut,!1,be),Co(pe,y,N,Gt,Dt,Ze,ut,!0,be)}else{let[ft,Dt]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);Co(pe,y,N,Dt,ft,Ze,ut,!1,be)}},colorRelief:function(pe,y,N,ie,fe){if(pe.renderPass!=="translucent"||!ie.length)return;let{isRenderingToTexture:be}=fe,Re=pe.style.projection.useSubdivision,je=pe.getDepthModeForSublayer(0,Vi.ReadOnly),Ze=pe.colorModeForRenderPass();if(Re){let[ut,ft,Dt]=pe.stencilConfigForOverlapTwoPass(ie);Fo(pe,y,N,Dt,ut,je,Ze,!1,be),Fo(pe,y,N,Dt,ft,je,Ze,!0,be)}else{let[ut,ft]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);Fo(pe,y,N,ft,ut,je,Ze,!1,be)}},raster:function(pe,y,N,ie,fe){if(pe.renderPass!=="translucent"||N.paint.get("raster-opacity")===0||!ie.length)return;let{isRenderingToTexture:be}=fe,Re=y.getSource(),je=pe.style.projection.useSubdivision;if(Re instanceof ke)bo(pe,y,N,ie,null,!1,!1,Re.tileCoords,Re.flippedWindingOrder,be);else if(je){let[Ze,ut,ft]=pe.stencilConfigForOverlapTwoPass(ie);bo(pe,y,N,ft,Ze,!1,!0,Yo,!1,be),bo(pe,y,N,ft,ut,!0,!0,Yo,!1,be)}else{let[Ze,ut]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);bo(pe,y,N,ut,Ze,!1,!0,Yo,!1,be)}},background:function(pe,y,N,ie,fe){var be;let Re=N.paint.get("background-color"),je=N.paint.get("background-opacity");if(je===0)return;let{isRenderingToTexture:Ze}=fe,ut=pe.context,ft=ut.gl,Dt=pe.style.projection,Gt=pe.transform,Kt=Gt.tileSize,st=N.paint.get("background-pattern");if(pe.isPatternMissing(st))return;let It=!st&&Re.a===1&&je===1&&pe.opaquePassEnabledForLayer()?"opaque":"translucent";if(pe.renderPass!==It)return;let Ut=Xi.disabled,ir=pe.getDepthModeForSublayer(0,It==="opaque"?Vi.ReadWrite:Vi.ReadOnly),dr=pe.colorModeForRenderPass(),Ar=pe.useProgram(st?"backgroundPattern":"background"),hr=ie||Je(Gt,{tileSize:Kt,terrain:pe.style.map.terrain});st&&(ut.activeTexture.set(ft.TEXTURE0),pe.imageManager.bind(pe.context));let vr=N.getCrossfadeParameters();for(let Or of hr){let Cr=Gt.getProjectionData({overscaledTileID:Or,applyGlobeMatrix:!Ze,applyTerrainMatrix:!0}),ta=st?rc(je,pe,st,{tileID:Or,tileSize:Kt},vr):ml(je,Re),ka=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Or),Ta=Dt.getMeshFromTileID(ut,Or.canonical,!1,!0,"raster");Ar.draw(ut,ft.TRIANGLES,ir,Ut,dr,pi.backCCW,ta,ka,Cr,N.id,Ta.vertexBuffer,Ta.indexBuffer,Ta.segments)}},sky:function(pe,y){let N=pe.context,ie=N.gl,fe=((ft,Dt,Gt)=>{let Kt=Math.cos(Dt.rollInRadians),st=Math.sin(Dt.rollInRadians),It=Xt(Dt),Ut=Dt.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:ft.properties.get("sky-color"),u_horizon_color:ft.properties.get("horizon-color"),u_horizon:[(Dt.width/2-It*st)*Gt,(Dt.height/2+It*Kt)*Gt],u_horizon_normal:[-st,Kt],u_sky_horizon_blend:ft.properties.get("sky-horizon-blend")*Dt.height/2*Gt,u_sky_blend:Ut}})(y,pe.style.map.transform,pe.pixelRatio),be=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),Re=Xi.disabled,je=pe.colorModeForRenderPass(),Ze=pe.useProgram("sky"),ut=xl(N,y);Ze.draw(N,ie.TRIANGLES,be,Re,je,pi.disabled,fe,null,void 0,"sky",ut.vertexBuffer,ut.indexBuffer,ut.segments)},atmosphere:function(pe,y,N){let ie=pe.context,fe=ie.gl,be=pe.useProgram("atmosphere"),Re=new Vi(fe.LEQUAL,Vi.ReadOnly,[0,1]),je=pe.transform,Ze=function(Ut,ir){let dr=Ut.properties.get("position"),Ar=[-dr.x,-dr.y,-dr.z],hr=e.ap(new Float64Array(16));return Ut.properties.get("anchor")==="map"&&(e.be(hr,hr,ir.rollInRadians),e.bf(hr,hr,-ir.pitchInRadians),e.be(hr,hr,ir.bearingInRadians),e.bf(hr,hr,ir.center.lat*Math.PI/180),e.bI(hr,hr,-ir.center.lng*Math.PI/180)),e.cg(Ar,Ar,hr),Ar}(N,pe.transform),ut=je.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),ft=y.properties.get("atmosphere-blend")*ut.projectionTransition;if(ft===0)return;let Dt=bs(je.worldSize,je.center.lat),Gt=je.inverseProjectionMatrix,Kt=new Float64Array(4);Kt[3]=1,e.aE(Kt,Kt,je.modelViewProjectionMatrix),Kt[0]/=Kt[3],Kt[1]/=Kt[3],Kt[2]/=Kt[3],Kt[3]=1,e.aE(Kt,Kt,Gt),Kt[0]/=Kt[3],Kt[1]/=Kt[3],Kt[2]/=Kt[3],Kt[3]=1;let st=((Ut,ir,dr,Ar,hr)=>({u_sun_pos:Ut,u_atmosphere_blend:ir,u_globe_position:dr,u_globe_radius:Ar,u_inv_proj_matrix:hr}))(Ze,ft,[Kt[0],Kt[1],Kt[2]],Dt,Gt),It=xl(ie,y);be.draw(ie,fe.TRIANGLES,Re,Xi.disabled,to.alphaBlended,pi.disabled,st,null,null,"atmosphere",It.vertexBuffer,It.indexBuffer,It.segments)},custom:function(pe,y,N,ie){let{isRenderingGlobe:fe}=ie,be=pe.context,Re=N.implementation,je=pe.style.projection,Ze=pe.transform,ut=Ze.getProjectionDataForCustomLayer(fe),ft={farZ:Ze.farZ,nearZ:Ze.nearZ,fov:Ze.fov*Math.PI/180,modelViewProjectionMatrix:Ze.modelViewProjectionMatrix,projectionMatrix:Ze.projectionMatrix,shaderData:{variantName:je.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; +`);Ko(ft)||(vr=function(Ta){return Ta.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(vr),Or=function(Ta){return Ta.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(Or));let Cr=ft.createShader(ft.FRAGMENT_SHADER);if(ft.isContextLost())return void(this.failedToCreate=!0);if(ft.shaderSource(Cr,vr),ft.compileShader(Cr),!ft.getShaderParameter(Cr,ft.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${ft.getShaderInfoLog(Cr)}`);ft.attachShader(this.program,Cr);let ta=ft.createShader(ft.VERTEX_SHADER);if(ft.isContextLost())return void(this.failedToCreate=!0);if(ft.shaderSource(ta,Or),ft.compileShader(ta),!ft.getShaderParameter(ta,ft.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${ft.getShaderInfoLog(ta)}`);ft.attachShader(this.program,ta),this.attributes={};let ka={};this.numAttributes=Kt.length;for(let Ta=0;Ta({u_depth:new e.b_(Ta,Ra.u_depth),u_terrain:new e.b_(Ta,Ra.u_terrain),u_terrain_dim:new e.bp(Ta,Ra.u_terrain_dim),u_terrain_matrix:new e.c0(Ta,Ra.u_terrain_matrix),u_terrain_unpack:new e.c1(Ta,Ra.u_terrain_unpack),u_terrain_exaggeration:new e.bp(Ta,Ra.u_terrain_exaggeration)}))(y,ka),this.projectionUniforms=((Ta,Ra)=>({u_projection_matrix:new e.c0(Ta,Ra.u_projection_matrix),u_projection_tile_mercator_coords:new e.c1(Ta,Ra.u_projection_tile_mercator_coords),u_projection_clipping_plane:new e.c1(Ta,Ra.u_projection_clipping_plane),u_projection_transition:new e.bp(Ta,Ra.u_projection_transition),u_projection_fallback_matrix:new e.c0(Ta,Ra.u_projection_fallback_matrix)}))(y,ka),this.binderUniforms=ie?ie.getUniforms(y,ka):[]}draw(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt,st,It,Ut,ir,dr,Ar){var hr;let vr=y.gl;if(this.failedToCreate)return;if(y.program.set(this.program),y.setDepthMode(ie),y.setStencilMode(fe),y.setColorMode(be),y.setCullFace(Re),Ze){y.activeTexture.set(vr.TEXTURE2),vr.bindTexture(vr.TEXTURE_2D,Ze.depthTexture),y.activeTexture.set(vr.TEXTURE3),vr.bindTexture(vr.TEXTURE_2D,Ze.texture);for(let Cr in this.terrainUniforms)this.terrainUniforms[Cr].set(Ze[Cr])}if(ut)for(let Cr in ut)this.projectionUniforms[Ju[Cr]].set(ut[Cr]);if(je)for(let Cr in this.fixedUniforms)this.fixedUniforms[Cr].set(je[Cr]);Ut&&Ut.setUniforms(y,this.binderUniforms,st,{zoom:It});let Or=0;switch(N){case vr.LINES:Or=2;break;case vr.TRIANGLES:Or=3;break;case vr.LINE_STRIP:Or=1}for(let Cr of Kt.get())Cr.vaos||(Cr.vaos={}),(hr=Cr.vaos)[ft]||(hr[ft]=new Lh),Cr.vaos[ft].bind(y,this,Dt,Ut?Ut.getPaintVertexBuffers():[],Gt,Cr.vertexOffset,ir,dr,Ar),vr.drawElements(N,Cr.primitiveLength*Or,vr.UNSIGNED_SHORT,Cr.primitiveOffset*Or*2)}}function wc(pe,y,N){let ie=1/e.aK(N,1,y.transform.tileZoom),fe=Math.pow(2,N.tileID.overscaledZ),be=N.tileSize*Math.pow(2,y.transform.tileZoom)/fe,Re=be*(N.tileID.canonical.x+N.tileID.wrap*fe),je=be*N.tileID.canonical.y;return{u_image:0,u_texsize:N.imageAtlasTexture.size,u_scale:[ie,pe.fromScale,pe.toScale],u_fade:pe.t,u_pixel_coord_upper:[Re>>16,je>>16],u_pixel_coord_lower:[65535&Re,65535&je]}}let pc=(pe,y,N,ie)=>{let fe=pe.style.light,be=fe.properties.get("position"),Re=[be.x,be.y,be.z],je=e.c4();fe.properties.get("anchor")==="viewport"&&e.c5(je,pe.transform.bearingInRadians),e.c6(Re,Re,je);let Ze=pe.transform.transformLightDirection(Re),ut=fe.properties.get("color");return{u_lightpos:Re,u_lightpos_globe:Ze,u_lightintensity:fe.properties.get("intensity"),u_lightcolor:[ut.r,ut.g,ut.b],u_vertical_gradient:+y,u_opacity:N,u_fill_translate:ie}},Nf=(pe,y,N,ie,fe,be,Re)=>e.e(pc(pe,y,N,ie),wc(be,pe,Re),{u_height_factor:-Math.pow(2,fe.overscaledZ)/Re.tileSize/8}),Bu=(pe,y,N,ie)=>e.e(wc(y,pe,N),{u_fill_translate:ie}),Tc=(pe,y)=>({u_world:pe,u_fill_translate:y}),Ou=(pe,y,N,ie,fe)=>e.e(Bu(pe,y,N,fe),{u_world:ie}),Gc=(pe,y,N,ie,fe)=>{let be=pe.transform,Re,je,Ze=0;if(N.paint.get("circle-pitch-alignment")==="map"){let ut=e.aK(y,1,be.zoom);Re=!0,je=[ut,ut],Ze=ut/(e.a6*Math.pow(2,y.tileID.overscaledZ))*2*Math.PI*fe}else Re=!1,je=be.pixelsToGLUnits;return{u_camera_to_center_distance:be.cameraToCenterDistance,u_scale_with_map:+(N.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+Re,u_device_pixel_ratio:pe.pixelRatio,u_extrude_scale:je,u_globe_extrude_scale:Ze,u_translate:ie}},pf=pe=>({u_pixel_extrude_scale:[1/pe.width,1/pe.height]}),$l=pe=>({u_viewport_size:[pe.width,pe.height]}),jf=(pe,y=1)=>({u_color:pe,u_overlay:0,u_overlay_scale:y}),Hc=(pe,y,N,ie)=>{let fe=e.aK(pe,1,y)/(e.a6*Math.pow(2,pe.tileID.overscaledZ))*2*Math.PI*ie;return{u_extrude_scale:e.aK(pe,1,y),u_intensity:N,u_globe_extrude_scale:fe}},Wc=(pe,y,N,ie)=>{let fe=e.O();e.c7(fe,0,pe.width,pe.height,0,0,1);let be=pe.context.gl;return{u_matrix:fe,u_world:[be.drawingBufferWidth,be.drawingBufferHeight],u_image:N,u_color_ramp:ie,u_opacity:y.paint.get("heatmap-opacity")}},Qu=(pe,y,N)=>{let ie=N.paint.get("hillshade-accent-color"),fe;switch(N.paint.get("hillshade-method")){case"basic":fe=4;break;case"combined":fe=1;break;case"igor":fe=2;break;case"multidirectional":fe=3;break;default:fe=0}let be=N.getIlluminationProperties();for(let Re=0;Re{let N=y.stride,ie=e.O();return e.c7(ie,0,e.a6,-e.a6,0,0,1),e.Q(ie,ie,[0,-e.a6,0]),{u_matrix:ie,u_image:1,u_dimension:[N,N],u_zoom:pe.overscaledZ,u_unpack:y.getUnpackVector()}};function Nu(pe,y){let N=Math.pow(2,y.canonical.z),ie=y.canonical.y;return[new e.a7(0,ie/N).toLngLat().lat,new e.a7(0,(ie+1)/N).toLngLat().lat]}let Uf=(pe,y,N=0)=>({u_image:0,u_unpack:y.getUnpackVector(),u_dimension:[y.stride,y.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:N,u_opacity:pe.paint.get("color-relief-opacity")}),al=(pe,y,N,ie)=>{let fe=pe.transform;return{u_translation:cu(pe,y,N),u_ratio:ie/e.aK(y,1,fe.zoom),u_device_pixel_ratio:pe.pixelRatio,u_units_to_pixels:[1/fe.pixelsToGLUnits[0],1/fe.pixelsToGLUnits[1]]}},Xc=(pe,y,N,ie,fe)=>e.e(al(pe,y,N,ie),{u_image:0,u_image_height:fe}),ju=(pe,y,N,ie,fe)=>{let be=pe.transform,Re=ec(y,be);return{u_translation:cu(pe,y,N),u_texsize:y.imageAtlasTexture.size,u_ratio:ie/e.aK(y,1,be.zoom),u_device_pixel_ratio:pe.pixelRatio,u_image:0,u_scale:[Re,fe.fromScale,fe.toScale],u_fade:fe.t,u_units_to_pixels:[1/be.pixelsToGLUnits[0],1/be.pixelsToGLUnits[1]]}},Ac=(pe,y,N,ie,fe)=>{let be=ec(y,pe.transform);return e.e(al(pe,y,N,ie),{u_tileratio:be,u_crossfade_from:fe.fromScale,u_crossfade_to:fe.toScale,u_image:0,u_mix:fe.t,u_lineatlas_width:pe.lineAtlas.width,u_lineatlas_height:pe.lineAtlas.height})},Zc=(pe,y,N,ie,fe,be)=>{let Re=ec(y,pe.transform);return e.e(al(pe,y,N,ie),{u_image:0,u_image_height:be,u_tileratio:Re,u_crossfade_from:fe.fromScale,u_crossfade_to:fe.toScale,u_image_dash:1,u_mix:fe.t,u_lineatlas_width:pe.lineAtlas.width,u_lineatlas_height:pe.lineAtlas.height})};function ec(pe,y){return 1/e.aK(pe,1,y.tileZoom)}function cu(pe,y,N){return e.aL(pe.transform,y,N.paint.get("line-translate"),N.paint.get("line-translate-anchor"))}let tc=(pe,y,N,ie,fe)=>{return{u_tl_parent:pe,u_scale_parent:y,u_buffer_scale:1,u_fade_t:N.mix,u_opacity:N.opacity*ie.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ie.paint.get("raster-brightness-min"),u_brightness_high:ie.paint.get("raster-brightness-max"),u_saturation_factor:(Re=ie.paint.get("raster-saturation"),Re>0?1-1/(1.001-Re):-Re),u_contrast_factor:(be=ie.paint.get("raster-contrast"),be>0?1/(1-be):1+be),u_spin_weights:vf(ie.paint.get("raster-hue-rotate")),u_coords_top:[fe[0].x,fe[0].y,fe[1].x,fe[1].y],u_coords_bottom:[fe[3].x,fe[3].y,fe[2].x,fe[2].y]};var be,Re};function vf(pe){pe*=Math.PI/180;let y=Math.sin(pe),N=Math.cos(pe);return[(2*N+1)/3,(-Math.sqrt(3)*y-N+1)/3,(Math.sqrt(3)*y-N+1)/3]}let Tu=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt)=>{let Kt=Re.transform;return{u_is_size_zoom_constant:+(pe==="constant"||pe==="source"),u_is_size_feature_constant:+(pe==="constant"||pe==="camera"),u_size_t:y?y.uSizeT:0,u_size:y?y.uSize:0,u_camera_to_center_distance:Kt.cameraToCenterDistance,u_pitch:Kt.pitch/360*2*Math.PI,u_rotate_symbol:+N,u_aspect_ratio:Kt.width/Kt.height,u_fade_change:Re.options.fadeDuration?Re.symbolFadeChange:1,u_label_plane_matrix:je,u_coord_matrix:Ze,u_is_text:+ft,u_pitch_with_map:+ie,u_is_along_line:fe,u_is_variable_anchor:be,u_texsize:Dt,u_texture:0,u_translation:ut,u_pitched_scale:Gt}},nh=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt)=>{let st=Re.transform;return e.e(Tu(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Kt),{u_gamma_scale:ie?Math.cos(st.pitch*Math.PI/180)*st.cameraToCenterDistance:1,u_device_pixel_ratio:Re.pixelRatio,u_is_halo:Gt?1:0,u_is_plain:1})},vl=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt)=>e.e(nh(pe,y,N,ie,fe,be,Re,je,Ze,ut,!0,ft,!0,Gt),{u_texsize_icon:Dt,u_texture_icon:1}),ml=(pe,y)=>({u_opacity:pe,u_color:y}),rc=(pe,y,N,ie,fe)=>e.e(function(be,Re,je,Ze){let ut=je.imageManager.getPattern(be.from.toString()),ft=je.imageManager.getPattern(be.to.toString()),{width:Dt,height:Gt}=je.imageManager.getPixelSize(),Kt=Math.pow(2,Ze.tileID.overscaledZ),st=Ze.tileSize*Math.pow(2,je.transform.tileZoom)/Kt,It=st*(Ze.tileID.canonical.x+Ze.tileID.wrap*Kt),Ut=st*Ze.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ut.tl,u_pattern_br_a:ut.br,u_pattern_tl_b:ft.tl,u_pattern_br_b:ft.br,u_texsize:[Dt,Gt],u_mix:Re.t,u_pattern_size_a:ut.displaySize,u_pattern_size_b:ft.displaySize,u_scale_a:Re.fromScale,u_scale_b:Re.toScale,u_tile_units_to_pixels:1/e.aK(Ze,1,je.transform.tileZoom),u_pixel_coord_upper:[It>>16,Ut>>16],u_pixel_coord_lower:[65535&It,65535&Ut]}}(N,fe,y,ie),{u_opacity:pe}),yl=(pe,y)=>{},qf={fillExtrusion:(pe,y)=>({u_lightpos:new e.c2(pe,y.u_lightpos),u_lightpos_globe:new e.c2(pe,y.u_lightpos_globe),u_lightintensity:new e.bp(pe,y.u_lightintensity),u_lightcolor:new e.c2(pe,y.u_lightcolor),u_vertical_gradient:new e.bp(pe,y.u_vertical_gradient),u_opacity:new e.bp(pe,y.u_opacity),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillExtrusionPattern:(pe,y)=>({u_lightpos:new e.c2(pe,y.u_lightpos),u_lightpos_globe:new e.c2(pe,y.u_lightpos_globe),u_lightintensity:new e.bp(pe,y.u_lightintensity),u_lightcolor:new e.c2(pe,y.u_lightcolor),u_vertical_gradient:new e.bp(pe,y.u_vertical_gradient),u_height_factor:new e.bp(pe,y.u_height_factor),u_opacity:new e.bp(pe,y.u_opacity),u_fill_translate:new e.c3(pe,y.u_fill_translate),u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade)}),fill:(pe,y)=>({u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillPattern:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillOutline:(pe,y)=>({u_world:new e.c3(pe,y.u_world),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillOutlinePattern:(pe,y)=>({u_world:new e.c3(pe,y.u_world),u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),circle:(pe,y)=>({u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_scale_with_map:new e.b_(pe,y.u_scale_with_map),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_extrude_scale:new e.c3(pe,y.u_extrude_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_globe_extrude_scale:new e.bp(pe,y.u_globe_extrude_scale),u_translate:new e.c3(pe,y.u_translate)}),collisionBox:(pe,y)=>({u_pixel_extrude_scale:new e.c3(pe,y.u_pixel_extrude_scale)}),collisionCircle:(pe,y)=>({u_viewport_size:new e.c3(pe,y.u_viewport_size)}),debug:(pe,y)=>({u_color:new e.b$(pe,y.u_color),u_overlay:new e.b_(pe,y.u_overlay),u_overlay_scale:new e.bp(pe,y.u_overlay_scale)}),depth:yl,clippingMask:yl,heatmap:(pe,y)=>({u_extrude_scale:new e.bp(pe,y.u_extrude_scale),u_intensity:new e.bp(pe,y.u_intensity),u_globe_extrude_scale:new e.bp(pe,y.u_globe_extrude_scale)}),heatmapTexture:(pe,y)=>({u_matrix:new e.c0(pe,y.u_matrix),u_world:new e.c3(pe,y.u_world),u_image:new e.b_(pe,y.u_image),u_color_ramp:new e.b_(pe,y.u_color_ramp),u_opacity:new e.bp(pe,y.u_opacity)}),hillshade:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_latrange:new e.c3(pe,y.u_latrange),u_exaggeration:new e.bp(pe,y.u_exaggeration),u_altitudes:new e.c9(pe,y.u_altitudes),u_azimuths:new e.c9(pe,y.u_azimuths),u_accent:new e.b$(pe,y.u_accent),u_method:new e.b_(pe,y.u_method),u_shadows:new e.c8(pe,y.u_shadows),u_highlights:new e.c8(pe,y.u_highlights)}),hillshadePrepare:(pe,y)=>({u_matrix:new e.c0(pe,y.u_matrix),u_image:new e.b_(pe,y.u_image),u_dimension:new e.c3(pe,y.u_dimension),u_zoom:new e.bp(pe,y.u_zoom),u_unpack:new e.c1(pe,y.u_unpack)}),colorRelief:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_unpack:new e.c1(pe,y.u_unpack),u_dimension:new e.c3(pe,y.u_dimension),u_elevation_stops:new e.b_(pe,y.u_elevation_stops),u_color_stops:new e.b_(pe,y.u_color_stops),u_color_ramp_size:new e.b_(pe,y.u_color_ramp_size),u_opacity:new e.bp(pe,y.u_opacity)}),line:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels)}),lineGradient:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_image_height:new e.bp(pe,y.u_image_height)}),linePattern:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_texsize:new e.c3(pe,y.u_texsize),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_image:new e.b_(pe,y.u_image),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade)}),lineSDF:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_mix:new e.bp(pe,y.u_mix),u_tileratio:new e.bp(pe,y.u_tileratio),u_crossfade_from:new e.bp(pe,y.u_crossfade_from),u_crossfade_to:new e.bp(pe,y.u_crossfade_to),u_lineatlas_width:new e.bp(pe,y.u_lineatlas_width),u_lineatlas_height:new e.bp(pe,y.u_lineatlas_height)}),lineGradientSDF:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_image_height:new e.bp(pe,y.u_image_height),u_tileratio:new e.bp(pe,y.u_tileratio),u_crossfade_from:new e.bp(pe,y.u_crossfade_from),u_crossfade_to:new e.bp(pe,y.u_crossfade_to),u_image_dash:new e.b_(pe,y.u_image_dash),u_mix:new e.bp(pe,y.u_mix),u_lineatlas_width:new e.bp(pe,y.u_lineatlas_width),u_lineatlas_height:new e.bp(pe,y.u_lineatlas_height)}),raster:(pe,y)=>({u_tl_parent:new e.c3(pe,y.u_tl_parent),u_scale_parent:new e.bp(pe,y.u_scale_parent),u_buffer_scale:new e.bp(pe,y.u_buffer_scale),u_fade_t:new e.bp(pe,y.u_fade_t),u_opacity:new e.bp(pe,y.u_opacity),u_image0:new e.b_(pe,y.u_image0),u_image1:new e.b_(pe,y.u_image1),u_brightness_low:new e.bp(pe,y.u_brightness_low),u_brightness_high:new e.bp(pe,y.u_brightness_high),u_saturation_factor:new e.bp(pe,y.u_saturation_factor),u_contrast_factor:new e.bp(pe,y.u_contrast_factor),u_spin_weights:new e.c2(pe,y.u_spin_weights),u_coords_top:new e.c1(pe,y.u_coords_top),u_coords_bottom:new e.c1(pe,y.u_coords_bottom)}),symbolIcon:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texture:new e.b_(pe,y.u_texture),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),symbolSDF:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texture:new e.b_(pe,y.u_texture),u_gamma_scale:new e.bp(pe,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_is_halo:new e.b_(pe,y.u_is_halo),u_is_plain:new e.b_(pe,y.u_is_plain),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),symbolTextAndIcon:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texsize_icon:new e.c3(pe,y.u_texsize_icon),u_texture:new e.b_(pe,y.u_texture),u_texture_icon:new e.b_(pe,y.u_texture_icon),u_gamma_scale:new e.bp(pe,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_is_halo:new e.b_(pe,y.u_is_halo),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),background:(pe,y)=>({u_opacity:new e.bp(pe,y.u_opacity),u_color:new e.b$(pe,y.u_color)}),backgroundPattern:(pe,y)=>({u_opacity:new e.bp(pe,y.u_opacity),u_image:new e.b_(pe,y.u_image),u_pattern_tl_a:new e.c3(pe,y.u_pattern_tl_a),u_pattern_br_a:new e.c3(pe,y.u_pattern_br_a),u_pattern_tl_b:new e.c3(pe,y.u_pattern_tl_b),u_pattern_br_b:new e.c3(pe,y.u_pattern_br_b),u_texsize:new e.c3(pe,y.u_texsize),u_mix:new e.bp(pe,y.u_mix),u_pattern_size_a:new e.c3(pe,y.u_pattern_size_a),u_pattern_size_b:new e.c3(pe,y.u_pattern_size_b),u_scale_a:new e.bp(pe,y.u_scale_a),u_scale_b:new e.bp(pe,y.u_scale_b),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_tile_units_to_pixels:new e.bp(pe,y.u_tile_units_to_pixels)}),terrain:(pe,y)=>({u_texture:new e.b_(pe,y.u_texture),u_ele_delta:new e.bp(pe,y.u_ele_delta),u_fog_matrix:new e.c0(pe,y.u_fog_matrix),u_fog_color:new e.b$(pe,y.u_fog_color),u_fog_ground_blend:new e.bp(pe,y.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.bp(pe,y.u_fog_ground_blend_opacity),u_horizon_color:new e.b$(pe,y.u_horizon_color),u_horizon_fog_blend:new e.bp(pe,y.u_horizon_fog_blend),u_is_globe_mode:new e.bp(pe,y.u_is_globe_mode)}),terrainDepth:(pe,y)=>({u_ele_delta:new e.bp(pe,y.u_ele_delta)}),terrainCoords:(pe,y)=>({u_texture:new e.b_(pe,y.u_texture),u_terrain_coords_id:new e.bp(pe,y.u_terrain_coords_id),u_ele_delta:new e.bp(pe,y.u_ele_delta)}),projectionErrorMeasurement:(pe,y)=>({u_input:new e.bp(pe,y.u_input),u_output_expected:new e.bp(pe,y.u_output_expected)}),atmosphere:(pe,y)=>({u_sun_pos:new e.c2(pe,y.u_sun_pos),u_atmosphere_blend:new e.bp(pe,y.u_atmosphere_blend),u_globe_position:new e.c2(pe,y.u_globe_position),u_globe_radius:new e.bp(pe,y.u_globe_radius),u_inv_proj_matrix:new e.c0(pe,y.u_inv_proj_matrix)}),sky:(pe,y)=>({u_sky_color:new e.b$(pe,y.u_sky_color),u_horizon_color:new e.b$(pe,y.u_horizon_color),u_horizon:new e.c3(pe,y.u_horizon),u_horizon_normal:new e.c3(pe,y.u_horizon_normal),u_sky_horizon_blend:new e.bp(pe,y.u_sky_horizon_blend),u_sky_blend:new e.bp(pe,y.u_sky_blend)})};class ac{constructor(y,N,ie){this.context=y;let fe=y.gl;this.buffer=fe.createBuffer(),this.dynamicDraw=!!ie,this.context.unbindVAO(),y.bindElementBuffer.set(this.buffer),fe.bufferData(fe.ELEMENT_ARRAY_BUFFER,N.arrayBuffer,this.dynamicDraw?fe.DYNAMIC_DRAW:fe.STATIC_DRAW),this.dynamicDraw||N.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(y){let N=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),N.bufferSubData(N.ELEMENT_ARRAY_BUFFER,0,y.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Mc={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class mf{constructor(y,N,ie,fe){this.length=N.length,this.attributes=ie,this.itemSize=N.bytesPerElement,this.dynamicDraw=fe,this.context=y;let be=y.gl;this.buffer=be.createBuffer(),y.bindVertexBuffer.set(this.buffer),be.bufferData(be.ARRAY_BUFFER,N.arrayBuffer,this.dynamicDraw?be.DYNAMIC_DRAW:be.STATIC_DRAW),this.dynamicDraw||N.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(y){if(y.length!==this.length)throw new Error(`Length of new data is ${y.length}, which doesn't match current length of ${this.length}`);let N=this.context.gl;this.bind(),N.bufferSubData(N.ARRAY_BUFFER,0,y.arrayBuffer)}enableAttributes(y,N){for(let ie of this.attributes){let fe=N.attributes[ie.name];fe!==void 0&&y.enableVertexAttribArray(fe)}}setVertexAttribPointers(y,N,ie){for(let fe of this.attributes){let be=N.attributes[fe.name];be!==void 0&&y.vertexAttribPointer(be,fe.components,y[Mc[fe.type]],!1,this.itemSize,fe.offset+this.itemSize*(ie||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class Jo{constructor(y){this.gl=y.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(y){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class ih extends Jo{getDefault(){return e.bo.transparent}set(y){let N=this.current;(y.r!==N.r||y.g!==N.g||y.b!==N.b||y.a!==N.a||this.dirty)&&(this.gl.clearColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class fu extends Jo{getDefault(){return 1}set(y){(y!==this.current||this.dirty)&&(this.gl.clearDepth(y),this.current=y,this.dirty=!1)}}class Sl extends Jo{getDefault(){return 0}set(y){(y!==this.current||this.dirty)&&(this.gl.clearStencil(y),this.current=y,this.dirty=!1)}}class El extends Jo{getDefault(){return[!0,!0,!0,!0]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||y[3]!==N[3]||this.dirty)&&(this.gl.colorMask(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class oh extends Jo{getDefault(){return!0}set(y){(y!==this.current||this.dirty)&&(this.gl.depthMask(y),this.current=y,this.dirty=!1)}}class Au extends Jo{getDefault(){return 255}set(y){(y!==this.current||this.dirty)&&(this.gl.stencilMask(y),this.current=y,this.dirty=!1)}}class $c extends Jo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(y){let N=this.current;(y.func!==N.func||y.ref!==N.ref||y.mask!==N.mask||this.dirty)&&(this.gl.stencilFunc(y.func,y.ref,y.mask),this.current=y,this.dirty=!1)}}class _l extends Jo{getDefault(){let y=this.gl;return[y.KEEP,y.KEEP,y.KEEP]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||this.dirty)&&(this.gl.stencilOp(y[0],y[1],y[2]),this.current=y,this.dirty=!1)}}class nl extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.STENCIL_TEST):N.disable(N.STENCIL_TEST),this.current=y,this.dirty=!1}}class gf extends Jo{getDefault(){return[0,1]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||this.dirty)&&(this.gl.depthRange(y[0],y[1]),this.current=y,this.dirty=!1)}}class Kc extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.DEPTH_TEST):N.disable(N.DEPTH_TEST),this.current=y,this.dirty=!1}}class sh extends Jo{getDefault(){return this.gl.LESS}set(y){(y!==this.current||this.dirty)&&(this.gl.depthFunc(y),this.current=y,this.dirty=!1)}}class hu extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.BLEND):N.disable(N.BLEND),this.current=y,this.dirty=!1}}class Uu extends Jo{getDefault(){let y=this.gl;return[y.ONE,y.ZERO]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||this.dirty)&&(this.gl.blendFunc(y[0],y[1]),this.current=y,this.dirty=!1)}}class qu extends Jo{getDefault(){return e.bo.transparent}set(y){let N=this.current;(y.r!==N.r||y.g!==N.g||y.b!==N.b||y.a!==N.a||this.dirty)&&(this.gl.blendColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class nc extends Jo{getDefault(){return this.gl.FUNC_ADD}set(y){(y!==this.current||this.dirty)&&(this.gl.blendEquation(y),this.current=y,this.dirty=!1)}}class yf extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.CULL_FACE):N.disable(N.CULL_FACE),this.current=y,this.dirty=!1}}class _f extends Jo{getDefault(){return this.gl.BACK}set(y){(y!==this.current||this.dirty)&&(this.gl.cullFace(y),this.current=y,this.dirty=!1)}}class Mu extends Jo{getDefault(){return this.gl.CCW}set(y){(y!==this.current||this.dirty)&&(this.gl.frontFace(y),this.current=y,this.dirty=!1)}}class ic extends Jo{getDefault(){return null}set(y){(y!==this.current||this.dirty)&&(this.gl.useProgram(y),this.current=y,this.dirty=!1)}}class Sc extends Jo{getDefault(){return this.gl.TEXTURE0}set(y){(y!==this.current||this.dirty)&&(this.gl.activeTexture(y),this.current=y,this.dirty=!1)}}class Vu extends Jo{getDefault(){let y=this.gl;return[0,0,y.drawingBufferWidth,y.drawingBufferHeight]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||y[3]!==N[3]||this.dirty)&&(this.gl.viewport(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class xo extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindFramebuffer(N.FRAMEBUFFER,y),this.current=y,this.dirty=!1}}class Ec extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindRenderbuffer(N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class xh extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindTexture(N.TEXTURE_2D,y),this.current=y,this.dirty=!1}}class Vf extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindBuffer(N.ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class xf extends Jo{getDefault(){return null}set(y){let N=this.gl;N.bindBuffer(N.ELEMENT_ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class Gf extends Jo{getDefault(){return null}set(y){var N;if(y===this.current&&!this.dirty)return;let ie=this.gl;Ko(ie)?ie.bindVertexArray(y):(N=ie.getExtension("OES_vertex_array_object"))===null||N===void 0||N.bindVertexArrayOES(y),this.current=y,this.dirty=!1}}class bh extends Jo{getDefault(){return 4}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_ALIGNMENT,y),this.current=y,this.dirty=!1}}class Hf extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),this.current=y,this.dirty=!1}}class il extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,y),this.current=y,this.dirty=!1}}class kl extends Jo{constructor(y,N){super(y),this.context=y,this.parent=N}getDefault(){return null}}class kc extends kl{setDirty(){this.dirty=!0}set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_2D,y,0),this.current=y,this.dirty=!1}}class Cc extends kl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferRenderbuffer(N.FRAMEBUFFER,N.DEPTH_ATTACHMENT,N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class Lc extends kl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferRenderbuffer(N.FRAMEBUFFER,N.DEPTH_STENCIL_ATTACHMENT,N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}let vc="Framebuffer is not complete";class Ft{constructor(y,N,ie,fe,be){this.context=y,this.width=N,this.height=ie;let Re=y.gl,je=this.framebuffer=Re.createFramebuffer();if(this.colorAttachment=new kc(y,je),fe)this.depthAttachment=be?new Lc(y,je):new Cc(y,je);else if(be)throw new Error("Stencil cannot be set without depth");if(Re.checkFramebufferStatus(Re.FRAMEBUFFER)!==Re.FRAMEBUFFER_COMPLETE)throw new Error(vc)}destroy(){let y=this.context.gl,N=this.colorAttachment.get();if(N&&y.deleteTexture(N),this.depthAttachment){let ie=this.depthAttachment.get();ie&&y.deleteRenderbuffer(ie)}y.deleteFramebuffer(this.framebuffer)}}class tr{constructor(y){var N,ie;if(this.gl=y,this.clearColor=new ih(this),this.clearDepth=new fu(this),this.clearStencil=new Sl(this),this.colorMask=new El(this),this.depthMask=new oh(this),this.stencilMask=new Au(this),this.stencilFunc=new $c(this),this.stencilOp=new _l(this),this.stencilTest=new nl(this),this.depthRange=new gf(this),this.depthTest=new Kc(this),this.depthFunc=new sh(this),this.blend=new hu(this),this.blendFunc=new Uu(this),this.blendColor=new qu(this),this.blendEquation=new nc(this),this.cullFace=new yf(this),this.cullFaceSide=new _f(this),this.frontFace=new Mu(this),this.program=new ic(this),this.activeTexture=new Sc(this),this.viewport=new Vu(this),this.bindFramebuffer=new xo(this),this.bindRenderbuffer=new Ec(this),this.bindTexture=new xh(this),this.bindVertexBuffer=new Vf(this),this.bindElementBuffer=new xf(this),this.bindVertexArray=new Gf(this),this.pixelStoreUnpack=new bh(this),this.pixelStoreUnpackPremultiplyAlpha=new Hf(this),this.pixelStoreUnpackFlipY=new il(this),this.extTextureFilterAnisotropic=y.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=y.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=y.getParameter(y.MAX_TEXTURE_SIZE),Ko(y)){this.HALF_FLOAT=y.HALF_FLOAT;let fe=y.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(N=y.RGBA16F)!==null&&N!==void 0?N:fe?.RGBA16F_EXT,this.RGB16F=(ie=y.RGB16F)!==null&&ie!==void 0?ie:fe?.RGB16F_EXT,y.getExtension("EXT_color_buffer_float")}else{y.getExtension("EXT_color_buffer_half_float"),y.getExtension("OES_texture_half_float_linear");let fe=y.getExtension("OES_texture_half_float");this.HALF_FLOAT=fe?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(y,N){return new ac(this,y,N)}createVertexBuffer(y,N,ie){return new mf(this,y,N,ie)}createRenderbuffer(y,N,ie){let fe=this.gl,be=fe.createRenderbuffer();return this.bindRenderbuffer.set(be),fe.renderbufferStorage(fe.RENDERBUFFER,y,N,ie),this.bindRenderbuffer.set(null),be}createFramebuffer(y,N,ie,fe){return new Ft(this,y,N,ie,fe)}clear({color:y,depth:N,stencil:ie}){let fe=this.gl,be=0;y&&(be|=fe.COLOR_BUFFER_BIT,this.clearColor.set(y),this.colorMask.set([!0,!0,!0,!0])),N!==void 0&&(be|=fe.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(N),this.depthMask.set(!0)),ie!==void 0&&(be|=fe.STENCIL_BUFFER_BIT,this.clearStencil.set(ie),this.stencilMask.set(255)),fe.clear(be)}setCullFace(y){y.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(y.mode),this.frontFace.set(y.frontFace))}setDepthMode(y){y.func!==this.gl.ALWAYS||y.mask?(this.depthTest.set(!0),this.depthFunc.set(y.func),this.depthMask.set(y.mask),this.depthRange.set(y.range)):this.depthTest.set(!1)}setStencilMode(y){y.test.func!==this.gl.ALWAYS||y.mask?(this.stencilTest.set(!0),this.stencilMask.set(y.mask),this.stencilOp.set([y.fail,y.depthFail,y.pass]),this.stencilFunc.set({func:y.test.func,ref:y.ref,mask:y.test.mask})):this.stencilTest.set(!1)}setColorMode(y){e.bQ(y.blendFunction,to.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(y.blendFunction),this.blendColor.set(y.blendColor)),this.colorMask.set(y.mask)}createVertexArray(){var y;return Ko(this.gl)?this.gl.createVertexArray():(y=this.gl.getExtension("OES_vertex_array_object"))===null||y===void 0?void 0:y.createVertexArrayOES()}deleteVertexArray(y){var N;Ko(this.gl)?this.gl.deleteVertexArray(y):(N=this.gl.getExtension("OES_vertex_array_object"))===null||N===void 0||N.deleteVertexArrayOES(y)}unbindVAO(){this.bindVertexArray.set(null)}}let Fr;function wr(pe,y,N,ie,fe){var be,Re;let je=pe.context,Ze=pe.transform,ut=je.gl,ft=pe.useProgram("collisionBox"),Dt=[],Gt=0,Kt=0;for(let Ar of ie){let hr=y.getTile(Ar).getBucket(N);if(!hr)continue;let vr=fe?hr.textCollisionBox:hr.iconCollisionBox,Or=hr.collisionCircleArray;Or.length>0&&(Dt.push({circleArray:Or,circleOffset:Kt,coord:Ar}),Gt+=Or.length/4,Kt=Gt),vr&&ft.draw(je,ut.LINES,Vi.disabled,Zi.disabled,pe.colorModeForRenderPass(),pi.disabled,pf(pe.transform),(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Ar),Ze.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),N.id,vr.layoutVertexBuffer,vr.indexBuffer,vr.segments,null,pe.transform.zoom,null,null,vr.collisionVertexBuffer)}if(!fe||!Dt.length)return;let st=pe.useProgram("collisionCircle"),It=new e.ca;It.resize(4*Gt),It._trim();let Ut=0;for(let Ar of Dt)for(let hr=0;hr=0&&(It[ir.associatedIconIndex]={shiftedAnchor:da,angle:Fa})}else Ja(ir.numGlyphs,Kt)}if(Ze){st.clear();let Ut=pe.icon.placedSymbolArray;for(let ir=0;irpe.style.map.terrain.getElevation(ma,mo,ru):null,Ll=N.layout.get("text-rotation-alignment")==="map";La(Fa,pe,fe,Wi,Go,Ar,ut,Ll,ma.toUnwrapped(),ir.width,ir.height,Mo,Ys)}let Ws=fe&&ka||So,Zo=hr||Ws?ea:Ar?Wi:pe.transform.clipSpaceToPixelsMatrix,es=Dn&&N.paint.get(fe?"text-halo-width":"icon-halo-width").constantOr(1)!==0,$o;$o=Dn?Fa.iconsInText?vl(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,Rn,so,Ra):nh(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,fe,Rn,es,Ra):Tu(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,fe,Rn,Ra);let _s={program:sn,buffers:za,uniformValues:$o,projectionData:zs,atlasTexture:In,atlasTextureIcon:ti,atlasInterpolation:Jn,atlasInterpolationIcon:Ei,isSDF:Dn,hasHalo:es};if(Or&&Fa.canOverlap){Cr=!0;let Go=za.segments.get();for(let Ys of Go)Ta.push({segments:new e.aV([Ys]),sortKey:Ys.sortKey,state:_s,terrainData:Pn})}else Ta.push({segments:za.segments,sortKey:0,state:_s,terrainData:Pn})}Cr&&Ta.sort((ma,da)=>ma.sortKey-da.sortKey);let ua=(st=N.paint.get(fe?"text-halo-width":"icon-halo-width").constantOr(null))!==null&&st!==void 0?st:1/0,ia=N.layout.get("text-letter-spacing").constantOr(0)*e.aJ<0||ua>1;for(let ma of Ta){let da=ma.state;It.activeTexture.set(Ut.TEXTURE0),da.atlasTexture.bind(da.atlasInterpolation,Ut.CLAMP_TO_EDGE),da.atlasTextureIcon&&(It.activeTexture.set(Ut.TEXTURE1),da.atlasTextureIcon&&da.atlasTextureIcon.bind(da.atlasInterpolationIcon,Ut.CLAMP_TO_EDGE));let Fa=da.isSDF&&da.hasHalo;if(Fa){let za=da.uniformValues;za.u_is_halo=1,ia&&(za.u_is_plain=0,Da(da.buffers,ma.segments,N,pe,da.program,ta,ft,Dt,za,da.projectionData,ma.terrainData),za.u_is_halo=0,za.u_is_plain=1)}Da(da.buffers,ma.segments,N,pe,da.program,ta,ft,Dt,da.uniformValues,da.projectionData,ma.terrainData),Fa&&!ia&&(da.uniformValues.u_is_halo=0)}}function Da(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft){let Dt=ie.context;fe.draw(Dt,Dt.gl.TRIANGLES,be,Re,je,pi.backCCW,Ze,ft,ut,N.id,pe.layoutVertexBuffer,pe.indexBuffer,y,N.paint,ie.transform.zoom,pe.programConfigurations.get(N.id),pe.dynamicLayoutVertexBuffer,pe.opacityVertexBuffer)}function Ha(pe,y,N,ie,fe){let be=pe.context,Re=be.gl,je=Zi.disabled,Ze=new to([Re.ONE,Re.ONE],e.bo.transparent,[!0,!0,!0,!0]),ut=y.getBucket(N);if(!ut)return;let ft=ie.key,Dt=N.heatmapFbos.get(ft);Dt||(Dt=vn(be,y.tileSize,y.tileSize),N.heatmapFbos.set(ft,Dt)),be.bindFramebuffer.set(Dt.framebuffer),be.viewport.set([0,0,y.tileSize,y.tileSize]),be.clear({color:e.bo.transparent});let Gt=ut.programConfigurations.get(N.id),Kt=pe.useProgram("heatmap",Gt,!fe),st=pe.transform.getProjectionData({overscaledTileID:y.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),It=pe.style.map.terrain.getTerrainData(ie);Kt.draw(be,Re.TRIANGLES,Vi.disabled,je,Ze,pi.disabled,Hc(y,pe.transform.zoom,N.paint.get("heatmap-intensity"),1),It,st,N.id,ut.layoutVertexBuffer,ut.indexBuffer,ut.segments,N.paint,pe.transform.zoom,Gt)}function $a(pe,y,N,ie,fe){let be=pe.context,Re=be.gl,je=pe.transform;be.setColorMode(pe.colorModeForRenderPass());let Ze=Sn(be,y),ut=N.key,ft=y.heatmapFbos.get(ut);if(!ft)return;be.activeTexture.set(Re.TEXTURE0),Re.bindTexture(Re.TEXTURE_2D,ft.colorAttachment.get()),be.activeTexture.set(Re.TEXTURE1),Ze.bind(Re.LINEAR,Re.CLAMP_TO_EDGE);let Dt=je.getProjectionData({overscaledTileID:N,applyTerrainMatrix:fe,applyGlobeMatrix:!ie});pe.useProgram("heatmapTexture").draw(be,Re.TRIANGLES,Vi.disabled,Zi.disabled,pe.colorModeForRenderPass(),pi.disabled,Wc(pe,y,0,1),null,Dt,y.id,pe.rasterBoundsBuffer,pe.quadTriangleIndexBuffer,pe.rasterBoundsSegments,y.paint,je.zoom),ft.destroy(),y.heatmapFbos.delete(ut)}function vn(pe,y,N){var ie,fe;let be=pe.gl,Re=be.createTexture();be.bindTexture(be.TEXTURE_2D,Re),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_WRAP_S,be.CLAMP_TO_EDGE),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_WRAP_T,be.CLAMP_TO_EDGE),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_MIN_FILTER,be.LINEAR),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_MAG_FILTER,be.LINEAR);let je=(ie=pe.HALF_FLOAT)!==null&&ie!==void 0?ie:be.UNSIGNED_BYTE,Ze=(fe=pe.RGBA16F)!==null&&fe!==void 0?fe:be.RGBA;be.texImage2D(be.TEXTURE_2D,0,Ze,y,N,0,be.RGBA,je,null);let ut=pe.createFramebuffer(y,N,!1,!1);return ut.colorAttachment.set(Re),ut}function Sn(pe,y){return y.colorRampTexture||(y.colorRampTexture=new e.T(pe,y.colorRamp,pe.gl.RGBA)),y.colorRampTexture}function yi(pe,y,N,ie,fe,be,Re,je){let Ze=256;if(fe.stepInterpolant){let ut=y.getSource().maxzoom,ft=Re.canonical.z===ut?Math.ceil(1<pe.options.anisotropicFilterPitch&&Kt.texParameterf(Kt.TEXTURE_2D,Gt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Gt.extTextureFilterAnisotropicMax);let ma=(ft=pe.style.map.terrain)===null||ft===void 0?void 0:ft.getTerrainData(Cr),da=It.getProjectionData({overscaledTileID:Cr,aligned:dr,applyGlobeMatrix:!ut,applyTerrainMatrix:!0}),Fa=tc(ua,Ra,ia.fadeMix,N,je),za=Ut.getMeshFromTileID(Gt,Cr.canonical,be,Re,"raster");st.draw(Gt,Kt.TRIANGLES,ta,fe?fe[Cr.overscaledZ]:Zi.disabled,ir,Ze?pi.frontCCW:pi.backCCW,Fa,ma,da,N.id,za.vertexBuffer,za.indexBuffer,za.segments)}}function Gs(pe,y,N,ie){let fe={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(N===0||ie)return fe;if(pe.fadingParentID){let be=y.getLoadedTile(pe.fadingParentID);if(!be)return fe;let Re=Math.pow(2,be.tileID.overscaledZ-pe.tileID.overscaledZ),je=[pe.tileID.canonical.x*Re%1,pe.tileID.canonical.y*Re%1],Ze=function(ut,ft,Dt){let Gt=g(),Kt=(Gt-ft.timeAdded)/Dt,st=ut.fadingDirection===gt.Incoming,It=e.al((Gt-ut.timeAdded)/Dt,0,1),Ut=e.al(1-Kt,0,1),ir=st?It:Ut;return{tileOpacity:ir,parentTileOpacity:st?Ut:It,fadeMix:{opacity:1,mix:1-ir}}}(pe,be,N);return{parentTile:be,parentScaleBy:Re,parentTopLeft:je,fadeValues:Ze}}if(pe.selfFading){let be=function(Re,je){let Ze=(g()-Re.timeAdded)/je,ut=e.al(Ze,0,1);return{tileOpacity:ut,fadeMix:{opacity:ut,mix:0}}}(pe,N);return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:be}}return fe}let Es=new e.bo(1,0,0,1),ns=new e.bo(0,1,0,1),Kn=new e.bo(0,0,1,1),zo=new e.bo(1,0,1,1),gs=new e.bo(0,1,1,1);function js(pe,y,N,ie){zl(pe,0,y+N/2,pe.transform.width,N,ie)}function Cl(pe,y,N,ie){zl(pe,y-N/2,0,N,pe.transform.height,ie)}function zl(pe,y,N,ie,fe,be){let Re=pe.context,je=Re.gl;je.enable(je.SCISSOR_TEST),je.scissor(y*pe.pixelRatio,N*pe.pixelRatio,ie*pe.pixelRatio,fe*pe.pixelRatio),Re.clear({color:be}),je.disable(je.SCISSOR_TEST)}function Kl(pe,y,N){var ie;let fe=pe.context,be=fe.gl,Re=pe.useProgram("debug"),je=Vi.disabled,Ze=Zi.disabled,ut=pe.colorModeForRenderPass(),ft="$debug",Dt=(ie=pe.style.map.terrain)===null||ie===void 0?void 0:ie.getTerrainData(N);fe.activeTexture.set(be.TEXTURE0);let Gt=y.getTileByID(N.key).latestRawTileData,Kt=Math.floor((Gt?.byteLength||0)/1024),st=y.getTile(N).tileSize,It=512/Math.min(st,512)*(N.overscaledZ/pe.transform.zoom)*.5,Ut=N.canonical.toString();N.overscaledZ!==N.canonical.z&&(Ut+=` => ${N.overscaledZ}`),function(dr,Ar){dr.initDebugOverlayCanvas();let hr=dr.debugOverlayCanvas,vr=dr.context.gl,Or=dr.debugOverlayCanvas.getContext("2d");Or.clearRect(0,0,hr.width,hr.height),Or.shadowColor="white",Or.shadowBlur=2,Or.lineWidth=1.5,Or.strokeStyle="white",Or.textBaseline="top",Or.font="bold 36px Open Sans, sans-serif",Or.fillText(Ar,5,5),Or.strokeText(Ar,5,5),dr.debugOverlayTexture.update(hr),dr.debugOverlayTexture.bind(vr.LINEAR,vr.CLAMP_TO_EDGE)}(pe,`${Ut} ${Kt}kB`);let ir=pe.transform.getProjectionData({overscaledTileID:N,applyGlobeMatrix:!0,applyTerrainMatrix:!0});Re.draw(fe,be.TRIANGLES,je,Ze,to.alphaBlended,pi.disabled,jf(e.bo.transparent,It),null,ir,ft,pe.debugBuffer,pe.quadTriangleIndexBuffer,pe.debugSegments),Re.draw(fe,be.LINE_STRIP,je,Ze,ut,pi.disabled,jf(e.bo.red),Dt,ir,ft,pe.debugBuffer,pe.tileBorderIndexBuffer,pe.debugSegments)}function Gu(pe,y,N,ie){let{isRenderingGlobe:fe}=ie,be=pe.context,Re=be.gl,je=pe.transform,Ze=pe.colorModeForRenderPass(),ut=pe.getDepthModeFor3D(),ft=pe.useProgram("terrain");be.bindFramebuffer.set(null),be.viewport.set([0,0,pe.width,pe.height]);for(let Dt of N){let Gt=y.getTerrainMesh(Dt.tileID),Kt=pe.renderToTexture.getTexture(Dt),st=y.getTerrainData(Dt.tileID);be.activeTexture.set(Re.TEXTURE0),Re.bindTexture(Re.TEXTURE_2D,Kt.texture);let It=y.getMeshFrameDelta(je.zoom),Ut=je.calculateFogMatrix(Dt.tileID.toUnwrapped()),ir=rh(It,Ut,pe.style.sky,je.pitch,fe),dr=je.getProjectionData({overscaledTileID:Dt.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ft.draw(be,Re.TRIANGLES,ut,Zi.disabled,Ze,pi.backCCW,ir,st,dr,"terrain",Gt.vertexBuffer,Gt.indexBuffer,Gt.segments)}}function xl(pe,y){if(!y.mesh){let N=new e.aU;N.emplaceBack(-1,-1),N.emplaceBack(1,-1),N.emplaceBack(1,1),N.emplaceBack(-1,1);let ie=new e.aW;ie.emplaceBack(0,1,2),ie.emplaceBack(0,2,3),y.mesh=new Xn(pe.createVertexBuffer(N,eo.members),pe.createIndexBuffer(ie),e.aV.simpleSegment(0,0,N.length,ie.length))}return y.mesh}let Hu={symbol:function(pe,y,N,ie,fe,be){if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=be,je=Zi.disabled,Ze=pe.colorModeForRenderPass();(N._unevaluatedLayout.hasValue("text-variable-anchor")||N._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(ut,ft,Dt,Gt,Kt,st,It,Ut,ir){var dr;let Ar=ft.transform,hr=ft.style.map.terrain,vr=Kt==="map",Or=st==="map";for(let Cr of ut){let ta=Gt.getTile(Cr),ka=ta.getBucket(Dt);if(!(!((dr=ka?.text)===null||dr===void 0)&&dr.segments.get().length))continue;let Ta=e.aw(ka.textSizeData,Ar.zoom),Ra=e.aK(ta,1,ft.transform.zoom),ua=cr(vr,ft.transform,Ra),ia=Dt.layout.get("icon-text-fit")!=="none"&&ka.hasIconData();if(Ta){let ma=Math.pow(2,Ar.zoom-ta.tileID.overscaledZ),da=hr?(Fa,za)=>hr.getElevation(Cr,Fa,za):null;Na(ka,vr,Or,ir,Ar,ua,ma,Ta,ia,e.aL(Ar,ta,It,Ut),Cr.toUnwrapped(),da)}}}(ie,pe,N,y,N.layout.get("text-rotation-alignment"),N.layout.get("text-pitch-alignment"),N.paint.get("text-translate"),N.paint.get("text-translate-anchor"),fe),N.paint.get("icon-opacity").constantOr(1)!==0&&mn(pe,y,N,ie,!1,N.paint.get("icon-translate"),N.paint.get("icon-translate-anchor"),N.layout.get("icon-rotation-alignment"),N.layout.get("icon-pitch-alignment"),N.layout.get("icon-keep-upright"),je,Ze,Re),N.paint.get("text-opacity").constantOr(1)!==0&&mn(pe,y,N,ie,!0,N.paint.get("text-translate"),N.paint.get("text-translate-anchor"),N.layout.get("text-rotation-alignment"),N.layout.get("text-pitch-alignment"),N.layout.get("text-keep-upright"),je,Ze,Re),y.map.showCollisionBoxes&&(wr(pe,y,N,ie,!0),wr(pe,y,N,ie,!1))},circle:function(pe,y,N,ie,fe){var be;if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=fe,je=N.paint.get("circle-opacity"),Ze=N.paint.get("circle-stroke-width"),ut=N.paint.get("circle-stroke-opacity"),ft=!N.layout.get("circle-sort-key").isConstant();if(je.constantOr(1)===0&&(Ze.constantOr(1)===0||ut.constantOr(1)===0))return;let Dt=pe.context,Gt=Dt.gl,Kt=pe.transform,st=pe.getDepthModeForSublayer(0,Vi.ReadOnly),It=Zi.disabled,Ut=pe.colorModeForRenderPass(),ir=[],dr=Kt.getCircleRadiusCorrection();for(let Ar of ie){let hr=y.getTile(Ar),vr=hr.getBucket(N);if(!vr)continue;let Or=N.paint.get("circle-translate"),Cr=N.paint.get("circle-translate-anchor"),ta=e.aL(Kt,hr,Or,Cr),ka=vr.programConfigurations.get(N.id),Ta=pe.useProgram("circle",ka),Ra=vr.layoutVertexBuffer,ua=vr.indexBuffer,ia=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Ar),ma={programConfiguration:ka,program:Ta,layoutVertexBuffer:Ra,indexBuffer:ua,uniformValues:Gc(pe,hr,N,ta,dr),terrainData:ia,projectionData:Kt.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!Re,applyTerrainMatrix:!0})};if(ft){let da=vr.segments.get();for(let Fa of da)ir.push({segments:new e.aV([Fa]),sortKey:Fa.sortKey,state:ma})}else ir.push({segments:vr.segments,sortKey:0,state:ma})}ft&&ir.sort((Ar,hr)=>Ar.sortKey-hr.sortKey);for(let Ar of ir){let{programConfiguration:hr,program:vr,layoutVertexBuffer:Or,indexBuffer:Cr,uniformValues:ta,terrainData:ka,projectionData:Ta}=Ar.state;vr.draw(Dt,Gt.TRIANGLES,st,It,Ut,pi.backCCW,ta,ka,Ta,N.id,Or,Cr,Ar.segments,N.paint,pe.transform.zoom,hr)}},heatmap:function(pe,y,N,ie,fe){if(N.paint.get("heatmap-opacity")===0)return;let be=pe.context,{isRenderingToTexture:Re,isRenderingGlobe:je}=fe;if(pe.style.map.terrain){for(let Ze of ie){let ut=y.getTile(Ze);y.hasRenderableParent(Ze)||(pe.renderPass==="offscreen"?Ha(pe,ut,N,Ze,je):pe.renderPass==="translucent"&&$a(pe,N,Ze,Re,je))}be.viewport.set([0,0,pe.width,pe.height])}else pe.renderPass==="offscreen"?function(Ze,ut,ft,Dt){let Gt=Ze.context,Kt=Gt.gl,st=Ze.transform,It=Zi.disabled,Ut=new to([Kt.ONE,Kt.ONE],e.bo.transparent,[!0,!0,!0,!0]);(function(ir,dr,Ar){let hr=ir.gl;ir.activeTexture.set(hr.TEXTURE1),ir.viewport.set([0,0,dr.width/4,dr.height/4]);let vr=Ar.heatmapFbos.get(e.cd);vr?(hr.bindTexture(hr.TEXTURE_2D,vr.colorAttachment.get()),ir.bindFramebuffer.set(vr.framebuffer)):(vr=vn(ir,dr.width/4,dr.height/4),Ar.heatmapFbos.set(e.cd,vr))})(Gt,Ze,ft),Gt.clear({color:e.bo.transparent});for(let ir of Dt){if(ut.hasRenderableParent(ir))continue;let dr=ut.getTile(ir),Ar=dr.getBucket(ft);if(!Ar)continue;let hr=Ar.programConfigurations.get(ft.id),vr=Ze.useProgram("heatmap",hr),Or=st.getProjectionData({overscaledTileID:ir,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Cr=st.getCircleRadiusCorrection();vr.draw(Gt,Kt.TRIANGLES,Vi.disabled,It,Ut,pi.backCCW,Hc(dr,st.zoom,ft.paint.get("heatmap-intensity"),Cr),null,Or,ft.id,Ar.layoutVertexBuffer,Ar.indexBuffer,Ar.segments,ft.paint,st.zoom,hr)}Gt.viewport.set([0,0,Ze.width,Ze.height])}(pe,y,N,ie):pe.renderPass==="translucent"&&function(Ze,ut){let ft=Ze.context,Dt=ft.gl;ft.setColorMode(Ze.colorModeForRenderPass());let Gt=ut.heatmapFbos.get(e.cd);Gt&&(ft.activeTexture.set(Dt.TEXTURE0),Dt.bindTexture(Dt.TEXTURE_2D,Gt.colorAttachment.get()),ft.activeTexture.set(Dt.TEXTURE1),Sn(ft,ut).bind(Dt.LINEAR,Dt.CLAMP_TO_EDGE),Ze.useProgram("heatmapTexture").draw(ft,Dt.TRIANGLES,Vi.disabled,Zi.disabled,Ze.colorModeForRenderPass(),pi.disabled,Wc(Ze,ut,0,1),null,null,ut.id,Ze.viewportBuffer,Ze.quadTriangleIndexBuffer,Ze.viewportSegments,ut.paint,Ze.transform.zoom))}(pe,N)},line:function(pe,y,N,ie,fe){var be;if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=fe,je=N.paint.get("line-opacity"),Ze=N.paint.get("line-width");if(je.constantOr(1)===0||Ze.constantOr(1)===0)return;let ut=pe.getDepthModeForSublayer(0,Vi.ReadOnly),ft=pe.colorModeForRenderPass(),Dt=N.paint.get("line-dasharray"),Gt=Dt.constantOr(1),Kt=N.paint.get("line-pattern"),st=Kt.constantOr(1),It=N.paint.get("line-gradient"),Ut=N.getCrossfadeParameters(),ir;ir=st?"linePattern":Gt&&It?"lineGradientSDF":Gt?"lineSDF":It?"lineGradient":"line";let dr=pe.context,Ar=dr.gl,hr=pe.transform,vr=!0;for(let Or of ie){let Cr=y.getTile(Or);if(st&&!Cr.patternsLoaded())continue;let ta=Cr.getBucket(N);if(!ta)continue;let ka=ta.programConfigurations.get(N.id),Ta=pe.context.program.get(),Ra=pe.useProgram(ir,ka),ua=vr||Ra.program!==Ta,ia=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Or),ma=Kt.constantOr(null),da=Dt?.constantOr(null);if(ma&&Cr.imageAtlas){let ui=Cr.imageAtlas,cn=ui.patternPositions[ma.to.toString()],sn=ui.patternPositions[ma.from.toString()];cn&&sn&&ka.setConstantPatternPositions(cn,sn)}else if(da){let ui=N.layout.get("line-cap").constantOr(null)==="round",cn=pe.lineAtlas.getDash(da.to,ui),sn=pe.lineAtlas.getDash(da.from,ui);ka.setConstantDashPositions(cn,sn)}let Fa=hr.getProjectionData({overscaledTileID:Or,applyGlobeMatrix:!Re,applyTerrainMatrix:!0}),za=hr.getPixelScale(),kn;st?(kn=ju(pe,Cr,N,za,Ut),_i(dr,Ar,Cr,ka,Ut)):Gt&&It?(kn=Zc(pe,Cr,N,za,Ut,ta.lineClipsArray.length),En(pe,y,dr,Ar,N,ta,Or,ka,Ut)):Gt?(kn=Ac(pe,Cr,N,za,Ut),ki(pe,dr,Ar,ka,ua,Ut)):It?(kn=Xc(pe,Cr,N,za,ta.lineClipsArray.length),ri(pe,y,dr,Ar,N,ta,Or)):kn=al(pe,Cr,N,za);let Dn=pe.stencilModeForClipping(Or);Ra.draw(dr,Ar.TRIANGLES,ut,Dn,ft,pi.disabled,kn,ia,Fa,N.id,ta.layoutVertexBuffer,ta.indexBuffer,ta.segments,N.paint,pe.transform.zoom,ka,ta.layoutVertexBuffer2),vr=!1}},fill:function(pe,y,N,ie,fe){let be=N.paint.get("fill-color"),Re=N.paint.get("fill-opacity");if(Re.constantOr(1)===0)return;let{isRenderingToTexture:je}=fe,Ze=pe.colorModeForRenderPass(),ut=N.paint.get("fill-pattern"),ft=pe.opaquePassEnabledForLayer()&&!ut.constantOr(1)&&be.constantOr(e.bo.transparent).a===1&&Re.constantOr(0)===1?"opaque":"translucent";if(pe.renderPass===ft){let Dt=pe.getDepthModeForSublayer(1,pe.renderPass==="opaque"?Vi.ReadWrite:Vi.ReadOnly);Ni(pe,y,N,ie,Dt,Ze,!1,je)}if(pe.renderPass==="translucent"&&N.paint.get("fill-antialias")){let Dt=pe.getDepthModeForSublayer(N.getPaintProperty("fill-outline-color")?2:0,Vi.ReadOnly);Ni(pe,y,N,ie,Dt,Ze,!0,je)}},fillExtrusion:function(pe,y,N,ie,fe){let be=N.paint.get("fill-extrusion-opacity");if(be===0)return;let{isRenderingToTexture:Re}=fe;if(pe.renderPass==="translucent"){let je=new Vi(pe.context.gl.LEQUAL,Vi.ReadWrite,pe.depthRangeFor3D);if(be!==1||N.paint.get("fill-extrusion-pattern").constantOr(1))$i(pe,y,N,ie,je,Zi.disabled,to.disabled,Re),$i(pe,y,N,ie,je,pe.stencilModeFor3D(),pe.colorModeForRenderPass(),Re);else{let Ze=pe.colorModeForRenderPass();$i(pe,y,N,ie,je,Zi.disabled,Ze,Re)}}},hillshade:function(pe,y,N,ie,fe){if(pe.renderPass!=="offscreen"&&pe.renderPass!=="translucent")return;let{isRenderingToTexture:be}=fe,Re=pe.context,je=pe.style.projection.useSubdivision,Ze=pe.getDepthModeForSublayer(0,Vi.ReadOnly),ut=pe.colorModeForRenderPass();if(pe.renderPass==="offscreen")(function(ft,Dt,Gt,Kt,st,It,Ut){let ir=ft.context,dr=ir.gl,Ar=Kt.paint.get("resampling")==="nearest"?dr.NEAREST:dr.LINEAR;for(let hr of Gt){let vr=Dt.getTile(hr),Or=vr.dem;if(!Or?.data||!vr.needsHillshadePrepare)continue;let Cr=Or.dim,ta=Or.stride,ka=Or.getPixels();if(ir.activeTexture.set(dr.TEXTURE1),ir.pixelStoreUnpackPremultiplyAlpha.set(!1),vr.demTexture||(vr.demTexture=ft.getTileTexture(ta)),vr.demTexture){let Ra=vr.demTexture;Ra.update(ka,{premultiply:!1}),Ra.bind(dr.NEAREST,dr.CLAMP_TO_EDGE)}else vr.demTexture=new e.T(ir,ka,dr.RGBA,{premultiply:!1}),vr.demTexture.bind(dr.NEAREST,dr.CLAMP_TO_EDGE);ir.activeTexture.set(dr.TEXTURE0);let Ta=vr.fbo;if(!Ta){let Ra=new e.T(ir,{width:Cr,height:Cr,data:null},dr.RGBA);Ra.bind(Ar,dr.CLAMP_TO_EDGE),Ta=vr.fbo=ir.createFramebuffer(Cr,Cr,!0,!1),Ta.colorAttachment.set(Ra.texture)}ir.bindFramebuffer.set(Ta.framebuffer),ir.viewport.set([0,0,Cr,Cr]),ft.useProgram("hillshadePrepare").draw(ir,dr.TRIANGLES,st,It,Ut,pi.disabled,Yc(vr.tileID,Or),null,null,Kt.id,ft.rasterBoundsBuffer,ft.quadTriangleIndexBuffer,ft.rasterBoundsSegments),vr.needsHillshadePrepare=!1}})(pe,y,ie,N,Ze,Zi.disabled,ut),Re.viewport.set([0,0,pe.width,pe.height]);else if(pe.renderPass==="translucent")if(je){let[ft,Dt,Gt]=pe.stencilConfigForOverlapTwoPass(ie);Co(pe,y,N,Gt,ft,Ze,ut,!1,be),Co(pe,y,N,Gt,Dt,Ze,ut,!0,be)}else{let[ft,Dt]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);Co(pe,y,N,Dt,ft,Ze,ut,!1,be)}},colorRelief:function(pe,y,N,ie,fe){if(pe.renderPass!=="translucent"||!ie.length)return;let{isRenderingToTexture:be}=fe,Re=pe.style.projection.useSubdivision,je=pe.getDepthModeForSublayer(0,Vi.ReadOnly),Ze=pe.colorModeForRenderPass();if(Re){let[ut,ft,Dt]=pe.stencilConfigForOverlapTwoPass(ie);Fo(pe,y,N,Dt,ut,je,Ze,!1,be),Fo(pe,y,N,Dt,ft,je,Ze,!0,be)}else{let[ut,ft]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);Fo(pe,y,N,ft,ut,je,Ze,!1,be)}},raster:function(pe,y,N,ie,fe){if(pe.renderPass!=="translucent"||N.paint.get("raster-opacity")===0||!ie.length)return;let{isRenderingToTexture:be}=fe,Re=y.getSource(),je=pe.style.projection.useSubdivision;if(Re instanceof ke)bo(pe,y,N,ie,null,!1,!1,Re.tileCoords,Re.flippedWindingOrder,be);else if(je){let[Ze,ut,ft]=pe.stencilConfigForOverlapTwoPass(ie);bo(pe,y,N,ft,Ze,!1,!0,Yo,!1,be),bo(pe,y,N,ft,ut,!0,!0,Yo,!1,be)}else{let[Ze,ut]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);bo(pe,y,N,ut,Ze,!1,!0,Yo,!1,be)}},background:function(pe,y,N,ie,fe){var be;let Re=N.paint.get("background-color"),je=N.paint.get("background-opacity");if(je===0)return;let{isRenderingToTexture:Ze}=fe,ut=pe.context,ft=ut.gl,Dt=pe.style.projection,Gt=pe.transform,Kt=Gt.tileSize,st=N.paint.get("background-pattern");if(pe.isPatternMissing(st))return;let It=!st&&Re.a===1&&je===1&&pe.opaquePassEnabledForLayer()?"opaque":"translucent";if(pe.renderPass!==It)return;let Ut=Zi.disabled,ir=pe.getDepthModeForSublayer(0,It==="opaque"?Vi.ReadWrite:Vi.ReadOnly),dr=pe.colorModeForRenderPass(),Ar=pe.useProgram(st?"backgroundPattern":"background"),hr=ie||Je(Gt,{tileSize:Kt,terrain:pe.style.map.terrain});st&&(ut.activeTexture.set(ft.TEXTURE0),pe.imageManager.bind(pe.context));let vr=N.getCrossfadeParameters();for(let Or of hr){let Cr=Gt.getProjectionData({overscaledTileID:Or,applyGlobeMatrix:!Ze,applyTerrainMatrix:!0}),ta=st?rc(je,pe,st,{tileID:Or,tileSize:Kt},vr):ml(je,Re),ka=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Or),Ta=Dt.getMeshFromTileID(ut,Or.canonical,!1,!0,"raster");Ar.draw(ut,ft.TRIANGLES,ir,Ut,dr,pi.backCCW,ta,ka,Cr,N.id,Ta.vertexBuffer,Ta.indexBuffer,Ta.segments)}},sky:function(pe,y){let N=pe.context,ie=N.gl,fe=((ft,Dt,Gt)=>{let Kt=Math.cos(Dt.rollInRadians),st=Math.sin(Dt.rollInRadians),It=Xt(Dt),Ut=Dt.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:ft.properties.get("sky-color"),u_horizon_color:ft.properties.get("horizon-color"),u_horizon:[(Dt.width/2-It*st)*Gt,(Dt.height/2+It*Kt)*Gt],u_horizon_normal:[-st,Kt],u_sky_horizon_blend:ft.properties.get("sky-horizon-blend")*Dt.height/2*Gt,u_sky_blend:Ut}})(y,pe.style.map.transform,pe.pixelRatio),be=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),Re=Zi.disabled,je=pe.colorModeForRenderPass(),Ze=pe.useProgram("sky"),ut=xl(N,y);Ze.draw(N,ie.TRIANGLES,be,Re,je,pi.disabled,fe,null,void 0,"sky",ut.vertexBuffer,ut.indexBuffer,ut.segments)},atmosphere:function(pe,y,N){let ie=pe.context,fe=ie.gl,be=pe.useProgram("atmosphere"),Re=new Vi(fe.LEQUAL,Vi.ReadOnly,[0,1]),je=pe.transform,Ze=function(Ut,ir){let dr=Ut.properties.get("position"),Ar=[-dr.x,-dr.y,-dr.z],hr=e.ap(new Float64Array(16));return Ut.properties.get("anchor")==="map"&&(e.be(hr,hr,ir.rollInRadians),e.bf(hr,hr,-ir.pitchInRadians),e.be(hr,hr,ir.bearingInRadians),e.bf(hr,hr,ir.center.lat*Math.PI/180),e.bI(hr,hr,-ir.center.lng*Math.PI/180)),e.cg(Ar,Ar,hr),Ar}(N,pe.transform),ut=je.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),ft=y.properties.get("atmosphere-blend")*ut.projectionTransition;if(ft===0)return;let Dt=bs(je.worldSize,je.center.lat),Gt=je.inverseProjectionMatrix,Kt=new Float64Array(4);Kt[3]=1,e.aE(Kt,Kt,je.modelViewProjectionMatrix),Kt[0]/=Kt[3],Kt[1]/=Kt[3],Kt[2]/=Kt[3],Kt[3]=1,e.aE(Kt,Kt,Gt),Kt[0]/=Kt[3],Kt[1]/=Kt[3],Kt[2]/=Kt[3],Kt[3]=1;let st=((Ut,ir,dr,Ar,hr)=>({u_sun_pos:Ut,u_atmosphere_blend:ir,u_globe_position:dr,u_globe_radius:Ar,u_inv_proj_matrix:hr}))(Ze,ft,[Kt[0],Kt[1],Kt[2]],Dt,Gt),It=xl(ie,y);be.draw(ie,fe.TRIANGLES,Re,Zi.disabled,to.alphaBlended,pi.disabled,st,null,null,"atmosphere",It.vertexBuffer,It.indexBuffer,It.segments)},custom:function(pe,y,N,ie){let{isRenderingGlobe:fe}=ie,be=pe.context,Re=N.implementation,je=pe.style.projection,Ze=pe.transform,ut=Ze.getProjectionDataForCustomLayer(fe),ft={farZ:Ze.farZ,nearZ:Ze.nearZ,fov:Ze.fov*Math.PI/180,modelViewProjectionMatrix:Ze.modelViewProjectionMatrix,projectionMatrix:Ze.projectionMatrix,shaderData:{variantName:je.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; uniform mat4 u_projection_matrix; -${je.shaderPreludeCode.vertexSource}`,define:je.shaderDefine},defaultProjectionData:ut},Dt=Re.renderingMode?Re.renderingMode:"2d";if(pe.renderPass==="offscreen"){let Gt=Re.prerender;Gt&&(pe.setCustomLayerDefaults(),be.setColorMode(pe.colorModeForRenderPass()),Gt.call(Re,be.gl,ft),be.setDirty(),pe.setBaseState())}else if(pe.renderPass==="translucent"){pe.setCustomLayerDefaults(),be.setColorMode(pe.colorModeForRenderPass()),be.setStencilMode(Xi.disabled);let Gt=Dt==="3d"?pe.getDepthModeFor3D():pe.getDepthModeForSublayer(0,Vi.ReadOnly);be.setDepthMode(Gt),Re.render(be.gl,ft),be.setDirty(),pe.setBaseState(),be.bindFramebuffer.set(null)}},debug:function(pe,y,N){for(let ie of N)Kl(pe,y,ie)},debugPadding:function(pe){let y=pe.transform.padding;js(pe,pe.transform.height-(y.top||0),3,Es),js(pe,y.bottom||0,3,ns),Cl(pe,y.left||0,3,Kn),Cl(pe,pe.transform.width-(y.right||0),3,zo);let N=pe.transform.centerPoint;(function(ie,fe,be,Re){zl(ie,fe-1,be-10,2,20,Re),zl(ie,fe-10,be-1,20,2,Re)})(pe,N.x,pe.transform.height-N.y,gs)},terrainDepth:function(pe,y){let N=pe.context,ie=N.gl,fe=pe.transform,be=to.unblended,Re=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),je=y.tileManager.getRenderableTiles(),Ze=pe.useProgram("terrainDepth");N.bindFramebuffer.set(y.getFramebuffer("depth").framebuffer),N.viewport.set([0,0,pe.width/devicePixelRatio,pe.height/devicePixelRatio]),N.clear({color:e.bo.transparent,depth:1});for(let ut of je){let ft=y.getTerrainMesh(ut.tileID),Dt=y.getTerrainData(ut.tileID),Gt=fe.getProjectionData({overscaledTileID:ut.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),Kt={u_ele_delta:y.getMeshFrameDelta(fe.zoom)};Ze.draw(N,ie.TRIANGLES,Re,Xi.disabled,be,pi.backCCW,Kt,Dt,Gt,"terrain",ft.vertexBuffer,ft.indexBuffer,ft.segments)}N.bindFramebuffer.set(null),N.viewport.set([0,0,pe.width,pe.height])},terrainCoords:function(pe,y){let N=pe.context,ie=N.gl,fe=pe.transform,be=to.unblended,Re=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),je=y.getCoordsTexture(),Ze=y.tileManager.getRenderableTiles(),ut=pe.useProgram("terrainCoords");N.bindFramebuffer.set(y.getFramebuffer("coords").framebuffer),N.viewport.set([0,0,pe.width/devicePixelRatio,pe.height/devicePixelRatio]),N.clear({color:e.bo.transparent,depth:1}),y.coordsIndex=[];for(let ft of Ze){let Dt=y.getTerrainMesh(ft.tileID),Gt=y.getTerrainData(ft.tileID);N.activeTexture.set(ie.TEXTURE0),ie.bindTexture(ie.TEXTURE_2D,je.texture);let Kt={u_terrain_coords_id:(255-y.coordsIndex.length)/255,u_texture:0,u_ele_delta:y.getMeshFrameDelta(fe.zoom)},st=fe.getProjectionData({overscaledTileID:ft.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ut.draw(N,ie.TRIANGLES,Re,Xi.disabled,be,pi.backCCW,Kt,Gt,st,"terrain",Dt.vertexBuffer,Dt.indexBuffer,Dt.segments),y.coordsIndex.push(ft.tileID.key)}N.bindFramebuffer.set(null),N.viewport.set([0,0,pe.width,pe.height])}};class Su{constructor(y,N){this.drawFunctions=Hu,this.context=new tr(y),this.transform=N,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:e.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Sr.maxOverzooming+Sr.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Di}resize(y,N,ie){if(this.width=Math.floor(y*ie),this.height=Math.floor(N*ie),this.pixelRatio=ie,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let fe of this.style._order)this.style._layers[fe].resize()}setup(){let y=this.context,N=new e.aU;N.emplaceBack(0,0),N.emplaceBack(e.a6,0),N.emplaceBack(0,e.a6),N.emplaceBack(e.a6,e.a6),this.tileExtentBuffer=y.createVertexBuffer(N,eo.members),this.tileExtentSegments=e.aV.simpleSegment(0,0,4,2);let ie=new e.aU;ie.emplaceBack(0,0),ie.emplaceBack(e.a6,0),ie.emplaceBack(0,e.a6),ie.emplaceBack(e.a6,e.a6),this.debugBuffer=y.createVertexBuffer(ie,eo.members),this.debugSegments=e.aV.simpleSegment(0,0,4,5);let fe=new e.ch;fe.emplaceBack(0,0,0,0),fe.emplaceBack(e.a6,0,e.a6,0),fe.emplaceBack(0,e.a6,0,e.a6),fe.emplaceBack(e.a6,e.a6,e.a6,e.a6),this.rasterBoundsBuffer=y.createVertexBuffer(fe,bc.members),this.rasterBoundsSegments=e.aV.simpleSegment(0,0,4,2);let be=new e.aU;be.emplaceBack(0,0),be.emplaceBack(e.a6,0),be.emplaceBack(0,e.a6),be.emplaceBack(e.a6,e.a6),this.rasterBoundsBufferPosOnly=y.createVertexBuffer(be,eo.members),this.rasterBoundsSegmentsPosOnly=e.aV.simpleSegment(0,0,4,5);let Re=new e.aU;Re.emplaceBack(0,0),Re.emplaceBack(1,0),Re.emplaceBack(0,1),Re.emplaceBack(1,1),this.viewportBuffer=y.createVertexBuffer(Re,eo.members),this.viewportSegments=e.aV.simpleSegment(0,0,4,2);let je=new e.ci;je.emplaceBack(0),je.emplaceBack(1),je.emplaceBack(3),je.emplaceBack(2),je.emplaceBack(0),this.tileBorderIndexBuffer=y.createIndexBuffer(je);let Ze=new e.aW;Ze.emplaceBack(1,0,2),Ze.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=y.createIndexBuffer(Ze);let ut=this.context.gl;this.stencilClearMode=new Xi({func:ut.ALWAYS,mask:0},0,255,ut.ZERO,ut.ZERO,ut.ZERO),this.tileExtentMesh=new Xn(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let y=this.context,N=y.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let ie=e.O();e.c7(ie,0,this.width,this.height,0,0,1),e.S(ie,ie,[N.drawingBufferWidth,N.drawingBufferHeight,0]);let fe={mainMatrix:ie,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:ie};this.useProgram("clippingMask",null,!0).draw(y,N.TRIANGLES,Vi.disabled,this.stencilClearMode,to.disabled,pi.disabled,null,null,fe,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(y,N,ie){if(this.currentStencilSource===y.source||!y.isTileClipped()||!N?.length)return;this.currentStencilSource=y.source,this.nextStencilID+N.length>256&&this.clearStencil();let fe=this.context;fe.setColorMode(to.disabled),fe.setDepthMode(Vi.disabled);let be={};for(let Re of N)be[Re.key]=this.nextStencilID++;this._renderTileMasks(be,N,ie,!0),this._renderTileMasks(be,N,ie,!1),this._tileClippingMaskIDs=be}_renderTileMasks(y,N,ie,fe){var be;let Re=this.context,je=Re.gl,Ze=this.style.projection,ut=this.transform,ft=this.useProgram("clippingMask");for(let Dt of N){let Gt=y[Dt.key],Kt=(be=this.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Dt),st=Ze.getMeshFromTileID(this.context,Dt.canonical,fe,!0,"stencil"),It=ut.getProjectionData({overscaledTileID:Dt,applyGlobeMatrix:!ie,applyTerrainMatrix:!0});ft.draw(Re,je.TRIANGLES,Vi.disabled,new Xi({func:je.ALWAYS,mask:0},Gt,255,je.KEEP,je.KEEP,je.REPLACE),to.disabled,ie?pi.disabled:pi.backCCW,null,Kt,It,"$clipping",st.vertexBuffer,st.indexBuffer,st.segments)}}_renderTilesDepthBuffer(){var y;let N=this.context,ie=N.gl,fe=this.style.projection,be=this.transform,Re=this.useProgram("depth"),je=this.getDepthModeFor3D(),Ze=Je(be,{tileSize:be.tileSize});for(let ut of Ze){let ft=(y=this.style.map.terrain)===null||y===void 0?void 0:y.getTerrainData(ut),Dt=fe.getMeshFromTileID(this.context,ut.canonical,!0,!0,"raster"),Gt=be.getProjectionData({overscaledTileID:ut,applyGlobeMatrix:!0,applyTerrainMatrix:!0});Re.draw(N,ie.TRIANGLES,je,Xi.disabled,to.disabled,pi.backCCW,null,ft,Gt,"$clipping",Dt.vertexBuffer,Dt.indexBuffer,Dt.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let y=this.nextStencilID++,N=this.context.gl;return new Xi({func:N.NOTEQUAL,mask:255},y,255,N.KEEP,N.KEEP,N.REPLACE)}stencilModeForClipping(y){let N=this.context.gl;return new Xi({func:N.EQUAL,mask:255},this._tileClippingMaskIDs[y.key],0,N.KEEP,N.KEEP,N.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(y){let N=this.context.gl,ie=y.sort((Re,je)=>je.overscaledZ-Re.overscaledZ),fe=ie[ie.length-1].overscaledZ,be=ie[0].overscaledZ-fe+1;if(be>1){this.currentStencilSource=void 0,this.nextStencilID+be>256&&this.clearStencil();let Re={};for(let je=0;jeje.overscaledZ-Re.overscaledZ),fe=ie[ie.length-1].overscaledZ,be=ie[0].overscaledZ-fe+1;if(this.clearStencil(),be>1){let Re={},je={};for(let Ze=0;Ze0};for(let Kt in je){let st=je[Kt];st.used&&st.prepare(this.context),Ze[Kt]=st.getVisibleCoordinates(!1),ut[Kt]=Ze[Kt].slice().reverse(),ft[Kt]=st.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Kt=0;Ktthis.useProgram(Kt)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:N.showOverdrawInspector?e.bo.black:e.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=N.showOverdrawInspector,this.depthRangeFor3D=[0,1-(y._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Re.length-1;this.currentLayer>=0;this.currentLayer--){let Kt=this.style._layers[Re[this.currentLayer]],st=je[Kt.source],It=Ze[Kt.source];this._renderTileClippingMasks(Kt,It,!1),this.renderLayer(this,st,Kt,It,Dt)}this.renderPass="translucent";let Gt=!1;for(this.currentLayer=0;this.currentLayervr.source&&!vr.isHidden(It)?[st.tileManagers[vr.source]]:[]),dr=ir.filter(vr=>vr.getSource().type==="vector"),Ar=ir.filter(vr=>vr.getSource().type!=="vector"),hr=vr=>{(!Ut||Ut.getSource().maxzoom0?N.pop():null}isPatternMissing(y){if(!y)return!1;if(!y.from||!y.to)return!0;let N=this.imageManager.getPattern(y.from.toString()),ie=this.imageManager.getPattern(y.to.toString());return!N||!ie}useProgram(y,N,ie=!1,fe=[]){var be;this.cache||(this.cache={});let Re=!!this.style.map.terrain,je=this.style.projection,Ze=ie?Ai.projectionMercator:je.shaderPreludeCode,ut=ie?gi:je.shaderDefine,ft=y+(N?N.cacheKey:"")+`/${ie?qi:je.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(Re?"/terrain":"")+(fe?`/${fe.join("/")}`:"");return(be=this.cache)[ft]||(be[ft]=new ah(this.context,Ai[y],N,qf[y],this._showOverdrawInspector,Re,Ze,ut,fe)),this.cache[ft]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let y=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(y.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new e.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var y,N;if(this._tileTextures){for(let ie in this._tileTextures){let fe=this._tileTextures[ie];if(fe)for(let be of fe)be.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((y=this.tileExtentMesh.vertexBuffer)===null||y===void 0||y.destroy()),this.tileExtentMesh&&((N=this.tileExtentMesh.indexBuffer)===null||N===void 0||N.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let ie in this.cache){let fe=this.cache[ie];fe?.program&&this.context.gl.deleteProgram(fe.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:y,drawingBufferHeight:N}=this.context.gl;return this.width!==y||this.height!==N}}function mc(pe,y){let N,ie=!1,fe=null,be=()=>{fe=null,ie&&(pe(...N),fe=setTimeout(be,y),ie=!1)};return(...Re)=>(ie=!0,N=Re,fe||be(),fe)}Su.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class Jc{constructor(y){this._getCurrentHash=()=>{let N=window.location.hash.replace("#","");if(this._hashName){let ie,fe=N.split("&").map(be=>be.split("="));for(let be of fe)be[0]===this._hashName&&(ie=be);return(ie&&ie[1]||"").split("/")}return N.split("/")},this._onHashChange=()=>{let N=this._getCurrentHash();if(!this._isValidHash(N))return!1;let ie=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(N[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+N[2],+N[1]],zoom:+N[0],bearing:ie,pitch:+(N[4]||0)}),!0},this._updateHashUnthrottled=()=>{let N=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,N)},this._removeHash=()=>{let N=this._getCurrentHash();if(N.length===0)return;let ie=N.join("/"),fe=ie;fe.split("&").length>0&&(fe=fe.split("&")[0]),this._hashName&&(fe=`${this._hashName}=${ie}`);let be=window.location.hash.replace(fe,"");be.startsWith("#&")?be=be.slice(0,1)+be.slice(2):be==="#"&&(be="");let Re=window.location.href.replace(/(#.+)?$/,be);Re=Re.replace("&&","&"),window.history.replaceState(window.history.state,null,Re)},this._updateHash=mc(this._updateHashUnthrottled,300),this._hashName=y&&encodeURIComponent(y)}addTo(y){return this._map=y,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(y){let N=this._map.getCenter(),ie=Math.round(100*this._map.getZoom())/100,fe=Math.ceil((ie*Math.LN2+Math.log(512/360/.5))/Math.LN10),be=Math.pow(10,fe),Re=Math.round(N.lng*be)/be,je=Math.round(N.lat*be)/be,Ze=this._map.getBearing(),ut=this._map.getPitch(),ft="";if(ft+=y?`/${Re}/${je}/${ie}`:`${ie}/${je}/${Re}`,(Ze||ut)&&(ft+="/"+Math.round(10*Ze)/10),ut&&(ft+=`/${Math.round(ut)}`),this._hashName){let Dt=this._hashName,Gt=!1,Kt=window.location.hash.slice(1).split("&").map(st=>{let It=st.split("=")[0];return It===Dt?(Gt=!0,`${It}=${ft}`):st}).filter(st=>st);return Gt||Kt.push(`${Dt}=${ft}`),`#${Kt.join("&")}`}return`#${ft}`}_isValidHash(y){if(y.length<3||y.some(isNaN))return!1;try{new e.W(+y[2],+y[1])}catch{return!1}let N=+y[0],ie=+(y[3]||0),fe=+(y[4]||0);return N>=this._map.getMinZoom()&&N<=this._map.getMaxZoom()&&ie>=-180&&ie<=180&&fe>=this._map.getMinPitch()&&fe<=this._map.getMaxPitch()}}let oc={linearity:.3,easing:e.cv(0,0,.3,1)},du=e.e({deceleration:2500,maxSpeed:1400},oc),Jl=e.e({deceleration:20,maxSpeed:1400},oc),Ql=e.e({deceleration:1e3,maxSpeed:360},oc),Eu=e.e({deceleration:1e3,maxSpeed:90},oc),bf=e.e({deceleration:1e3,maxSpeed:360},oc);class lh{constructor(y){this._map=y,this.clear()}clear(){this._inertiaBuffer=[]}record(y){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:m(),settings:y})}_drainInertiaBuffer(){let y=this._inertiaBuffer,N=m();for(;y.length>0&&N-y[0].time>160;)y.shift()}_onMoveEnd(y){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let N={zoom:0,bearing:0,pitch:0,roll:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:be}of this._inertiaBuffer)N.zoom+=be.zoomDelta||0,N.bearing+=be.bearingDelta||0,N.pitch+=be.pitchDelta||0,N.roll+=be.rollDelta||0,be.panDelta&&N.pan._add(be.panDelta),be.around&&(N.around=be.around),be.pinchAround&&(N.pinchAround=be.pinchAround);let ie=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,fe={};if(N.pan.mag()){let be=Ks(N.pan.mag(),ie,e.e({},du,y||{})),Re=N.pan.mult(be.amount/N.pan.mag()),je=this._map.cameraHelper.handlePanInertia(Re,this._map.transform);fe.center=je.easingCenter,fe.offset=je.easingOffset,Pc(fe,be)}if(N.zoom){let be=Ks(N.zoom,ie,Jl);fe.zoom=e.cw(this._map.transform.zoom+be.amount,this._map.getZoomSnap(),be.amount),Pc(fe,be)}if(N.bearing){let be=Ks(N.bearing,ie,Ql);fe.bearing=this._map.transform.bearing+e.al(be.amount,-179,179),Pc(fe,be)}if(N.pitch){let be=Ks(N.pitch,ie,Eu);fe.pitch=this._map.transform.pitch+be.amount,Pc(fe,be)}if(N.roll){let be=Ks(N.roll,ie,bf);fe.roll=this._map.transform.roll+e.al(be.amount,-179,179),Pc(fe,be)}if(fe.zoom||fe.bearing){let be=N.pinchAround===void 0?N.around:N.pinchAround;fe.around=be?this._map.unproject(be):this._map.getCenter()}return this.clear(),e.e(fe,{noMoveStart:!0})}}function Pc(pe,y){(!pe.duration||pe.durationN.unproject(Ze)),je=be.reduce((Ze,ut,ft,Dt)=>Ze.add(ut.div(Dt.length)),new e.P(0,0));super(y,{points:be,point:je,lngLats:Re,lngLat:N.unproject(je),originalEvent:ie}),this._defaultPrevented=!1}}class wf extends e.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(y,N,ie){super(y,{originalEvent:ie}),this._defaultPrevented=!1}}class Qc{constructor(y,N){this._map=y,this._clickTolerance=N.clickTolerance}reset(){delete this._mousedownPos}wheel(y){return this._firePreventable(new wf(y.type,this._map,y))}mousedown(y,N){return this._mousedownPos=N,this._firePreventable(new Bl(y.type,this._map,y))}mouseup(y){this._map.fire(new Bl(y.type,this._map,y))}click(y,N){this._mousedownPos&&this._mousedownPos.dist(N)>=this._clickTolerance||this._map.fire(new Bl(y.type,this._map,y))}dblclick(y){return this._firePreventable(new Bl(y.type,this._map,y))}mouseover(y){this._map.fire(new Bl(y.type,this._map,y))}mouseout(y){this._map.fire(new Bl(y.type,this._map,y))}touchstart(y){return this._firePreventable(new Wu(y.type,this._map,y))}touchmove(y){this._map.fire(new Wu(y.type,this._map,y))}touchend(y){this._map.fire(new Wu(y.type,this._map,y))}touchcancel(y){this._map.fire(new Wu(y.type,this._map,y))}_firePreventable(y){if(this._map.fire(y),y.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ku{constructor(y){this._map=y}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(y){this._map.fire(new Bl(y.type,this._map,y))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Bl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(y){this._delayContextMenu?this._contextMenuEvent=y:this._ignoreContextMenu||this._map.fire(new Bl(y.type,this._map,y)),this._map.listens("contextmenu")&&y.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ol{constructor(y){this._map=y}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(y){return this.transform.screenPointToLocation(e.P.convert(y),this._map.terrain)}}class Nl{constructor(y,N){this._map=y,this._tr=new Ol(y),this._el=y.getCanvasContainer(),this._container=y.getContainer(),this._clickTolerance=N.clickTolerance||1,N.boxZoom&&typeof N.boxZoom=="object"&&(this._boxZoomEnd=N.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(y,N){this.isEnabled()&&y.shiftKey&&y.button===0&&(g.disableDrag(),this._startPos=this._lastPos=N,this._active=!0)}mousemoveWindow(y,N){if(!this._active)return;let ie=N;if(this._lastPos.equals(ie)||!this._box&&ie.dist(this._startPos)be.fitScreenCoordinates(ie,fe,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",y)}keydown(y){this._active&&y.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",y))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),g.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(y,N){return this._map.fire(new e.n(y,{originalEvent:N}))}}function fi(pe,y){if(pe.length!==y.length)throw new Error(`The number of touches and points are not equal - touches ${pe.length}, points ${y.length}`);let N={};for(let ie=0;iethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=y.timeStamp),ie.length===this.numTouches&&(this.centroid=function(fe){let be=new e.P(0,0);for(let Re of fe)be._add(Re);return be.div(fe.length)}(N),this.touches=fi(ie,N)))}touchmove(y,N,ie){if(this.aborted||!this.centroid)return;let fe=fi(ie,N);for(let be in this.touches){let Re=fe[be];(!Re||Re.dist(this.touches[be])>30)&&(this.aborted=!0)}}touchend(y,N,ie){if((!this.centroid||y.timeStamp-this.startTime>500)&&(this.aborted=!0),ie.length===0){let fe=!this.aborted&&this.centroid;if(this.reset(),fe)return fe}}}class $e{constructor(y){this.singleTap=new eu(y),this.numTaps=y.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(y,N,ie){this.singleTap.touchstart(y,N,ie)}touchmove(y,N,ie){this.singleTap.touchmove(y,N,ie)}touchend(y,N,ie){let fe=this.singleTap.touchend(y,N,ie);if(fe){let be=y.timeStamp-this.lastTime<500,Re=!this.lastTap||this.lastTap.dist(fe)<30;if(be&&Re||this.reset(),this.count++,this.lastTime=y.timeStamp,this.lastTap=fe,this.count===this.numTaps)return this.reset(),fe}}}class nt{constructor(y){this._tr=new Ol(y),this._zoomIn=new $e({numTouches:1,numTaps:2}),this._zoomOut=new $e({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(y,N,ie){this._zoomIn.touchstart(y,N,ie),this._zoomOut.touchstart(y,N,ie)}touchmove(y,N,ie){this._zoomIn.touchmove(y,N,ie),this._zoomOut.touchmove(y,N,ie)}touchend(y,N,ie){let fe=this._zoomIn.touchend(y,N,ie),be=this._zoomOut.touchend(y,N,ie),Re=this._tr;return fe?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:e.cw(Re.zoom+1,je.getZoomSnap()),around:Re.unproject(fe)},{originalEvent:y})}):be?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:e.cw(Re.zoom-1,je.getZoomSnap()),around:Re.unproject(be)},{originalEvent:y})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class mt{constructor(y){this._enabled=!!y.enable,this._moveStateManager=y.moveStateManager,this._clickTolerance=y.clickTolerance||1,this._moveFunction=y.move,this._activateOnStart=!!y.activateOnStart,y.assignEvents(this),this.reset()}reset(y){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(y)}_move(...y){let N=this._moveFunction(...y);if(N.bearingDelta||N.pitchDelta||N.rollDelta||N.around||N.panDelta)return this._active=!0,N}dragStart(y,N){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(y)&&(this._moveStateManager.startMove(y),this._lastPoint=Array.isArray(N)?N[0]:N,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(y,N){if(!this.isEnabled())return;let ie=this._lastPoint;if(!ie)return;if(y.preventDefault(),!this._moveStateManager.isValidMoveEvent(y))return void this.reset(y);let fe=Array.isArray(N)?N[0]:N;return!this._moved&&fe.dist(ie)!0}),N=new Pr){this.mouseMoveStateManager=y,this.oneFingerTouchMoveStateManager=N}_executeRelevantHandler(y,N,ie){return y instanceof MouseEvent?N(y):typeof TouchEvent<"u"&&y instanceof TouchEvent?ie(y):void 0}startMove(y){this._executeRelevantHandler(y,N=>{this.mouseMoveStateManager.startMove(N)},N=>{this.oneFingerTouchMoveStateManager.startMove(N)})}endMove(y){this._executeRelevantHandler(y,N=>{this.mouseMoveStateManager.endMove(N)},N=>{this.oneFingerTouchMoveStateManager.endMove(N)})}isValidStartEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidStartEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidStartEvent(N))}isValidMoveEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidMoveEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(N))}isValidEndEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidEndEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidEndEvent(N))}}let kr=pe=>{pe.mousedown=pe.dragStart,pe.mousemoveWindow=pe.dragMove,pe.mouseup=pe.dragEnd,pe.contextmenu=y=>{y.preventDefault()}};class jr{constructor(y,N){this._clickTolerance=y.clickTolerance||1,this._map=N,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(y){return y<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(y,N,ie){return this._calculateTransform(y,N,ie)}touchmove(y,N,ie){if(this._active){if(!this._shouldBePrevented(ie.length))return y.preventDefault(),this._calculateTransform(y,N,ie);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",y)}}touchend(y,N,ie){this._calculateTransform(y,N,ie),this._active&&this._shouldBePrevented(ie.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(y,N,ie){ie.length>0&&(this._active=!0);let fe=fi(ie,N),be=new e.P(0,0),Re=new e.P(0,0),je=0;for(let ut in fe){let ft=fe[ut],Dt=this._touches[ut];Dt&&(be._add(ft),Re._add(ft.sub(Dt)),je++,fe[ut]=ft)}if(this._touches=fe,this._shouldBePrevented(je)||!Re.mag())return;let Ze=Re.div(je);return this._sum._add(Ze),this._sum.mag()Math.abs(pe.x)}class Si extends Jr{constructor(y){super(),this._currentTouchCount=0,this._map=y}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(y,N,ie){super.touchstart(y,N,ie),this._currentTouchCount=ie.length}_start(y){this._lastPoints=y,ii(y[0].sub(y[1]))&&(this._valid=!1)}_move(y,N,ie){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let fe=y[0].sub(this._lastPoints[0]),be=y[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(fe,be,ie.timeStamp),this._valid?(this._lastPoints=y,this._active=!0,{pitchDelta:(fe.y+be.y)/2*-.5}):void 0}gestureBeginsVertically(y,N,ie){if(this._valid!==void 0)return this._valid;let fe=y.mag()>=2,be=N.mag()>=2;if(!fe&&!be)return;if(!fe||!be)return this._firstMove===void 0&&(this._firstMove=ie),ie-this._firstMove<100&&void 0;let Re=y.y>0==N.y>0;return ii(y)&&ii(N)&&Re}}let oi={panStep:100,bearingStep:15,pitchStep:10};class Ji{constructor(y){this._tr=new Ol(y);let N=oi;this._panStep=N.panStep,this._bearingStep=N.bearingStep,this._pitchStep=N.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(y){if(y.altKey||y.ctrlKey||y.metaKey)return;let N=0,ie=0,fe=0,be=0,Re=0;switch(y.keyCode){case 61:case 107:case 171:case 187:N=1;break;case 189:case 109:case 173:N=-1;break;case 37:y.shiftKey?ie=-1:(y.preventDefault(),be=-1);break;case 39:y.shiftKey?ie=1:(y.preventDefault(),be=1);break;case 38:y.shiftKey?fe=1:(y.preventDefault(),Re=-1);break;case 40:y.shiftKey?fe=-1:(y.preventDefault(),Re=1);break;default:return}return this._rotationDisabled&&(ie=0,fe=0),{cameraAnimation:je=>{let Ze=this._tr;je.easeTo({duration:300,easeId:"keyboardHandler",easing:Qi,zoom:N?e.cw(Ze.zoom+N*(y.shiftKey?2:1),je.getZoomSnap()):Ze.zoom,bearing:Ze.bearing+ie*this._bearingStep,pitch:Ze.pitch+fe*this._pitchStep,offset:[-be*this._panStep,-Re*this._panStep],center:Ze.center},{originalEvent:y})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Qi(pe){return pe*(2-pe)}let Oo=4.000244140625,Qo=1/450;class vo{constructor(y,N){this._onTimeout=ie=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(ie)},this._map=y,this._tr=new Ol(y),this._triggerRenderFrame=N,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Qo}setZoomRate(y){this._defaultZoomRate=y}setWheelZoomRate(y){this._wheelZoomRate=y}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(y){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!y&&y.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(y){return!!this._map.cooperativeGestures.isEnabled()&&!(y.ctrlKey||this._map.cooperativeGestures.isBypassed(y))}wheel(y){if(!this.isEnabled())return;if(this._shouldBePrevented(y))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",y);let N=y.deltaMode===WheelEvent.DOM_DELTA_LINE?40*y.deltaY:y.deltaY,ie=m(),fe=ie-(this._lastWheelEventTime||0);this._lastWheelEventTime=ie,N!==0&&N%Oo==0?this._type="wheel":N!==0&&Math.abs(N)<4?this._type="trackpad":fe>400?(this._type=null,this._lastValue=N,this._timeout=setTimeout(this._onTimeout,40,y)):this._type||(this._type=Math.abs(fe*N)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,N+=this._lastValue)),y.shiftKey&&N&&(N/=4),this._type&&(this._lastWheelEvent=y,this._delta-=N,this._active||this._start(y)),y.preventDefault()}_start(y){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let N=g.mousePos(this._map.getCanvas(),y),ie=this._tr;this._aroundPoint=this._aroundCenter?ie.transform.locationToScreenPoint(e.W.convert(ie.center)):N,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let y=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let je=y.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=je),typeof this._targetZoom=="number"&&(this._targetZoom+=je)}if(this._delta!==0){let je=this._type==="wheel"&&Math.abs(this._delta)>Oo?this._wheelZoomRate:this._defaultZoomRate,Ze=2/(1+Math.exp(-Math.abs(this._delta*je)));this._delta<0&&Ze!==0&&(Ze=1/Ze);let ut=typeof this._targetZoom!="number"?y.scale:e.ao(this._targetZoom),ft=y.applyConstrain(y.getCameraLngLat(),e.ar(ut*Ze)).zoom,Dt=this._map.getZoomSnap();if(this._type==="wheel"&&Dt>0){let Gt=e.cw(y.zoom,Dt);this._targetZoom=e.cw(ft,Dt,ft-Gt)}else this._targetZoom=ft;this._type==="wheel"&&(this._startZoom=y.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let N=typeof this._targetZoom!="number"?y.zoom:this._targetZoom,ie=this._startZoom,fe=this._easing,be,Re=!1;if(this._type==="wheel"&&ie&&fe){let je=m()-this._lastWheelEventTime,Ze=Math.min((je+5)/200,1),ut=fe(Ze);be=e.H.number(ie,N,ut),Ze<1?this._needsRerender=!0:Re=!0}else be=N,Re=!0;return this._active=!0,Re&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=be,{noInertia:!0,needsRenderFrame:!Re,zoomDelta:be-y.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(y){let N=e.cy;if(this._prevEase){let ie=this._prevEase,fe=(m()-ie.start)/ie.duration,be=ie.easing(fe+.01)-ie.easing(fe),Re=.27/Math.sqrt(be*be+1e-4)*.01,je=Math.sqrt(.0729-Re*Re);N=e.cv(Re,je,.25,1)}return this._prevEase={start:m(),duration:y,easing:N},N}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ys{constructor(y,N){this._clickZoom=y,this._tapZoom=N}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class ol{constructor(y){this._tr=new Ol(y),this.reset()}reset(){this._active=!1}dblclick(y,N){return y.preventDefault(),{cameraAnimation:ie=>{ie.easeTo({duration:300,zoom:e.cw(this._tr.zoom+(y.shiftKey?-1:1),ie.getZoomSnap()),around:this._tr.unproject(N)},{originalEvent:y})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class jl{constructor(){this._tap=new $e({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(y){this._zoomRate=y??1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(y,N,ie){if(!this._swipePoint)if(this._tapTime){let fe=N[0],be=y.timeStamp-this._tapTime<500,Re=this._tapPoint.dist(fe)<30;be&&Re?ie.length>0&&(this._swipePoint=fe,this._swipeTouch=ie[0].identifier):this.reset()}else this._tap.touchstart(y,N,ie)}touchmove(y,N,ie){if(this._tapTime){if(this._swipePoint){if(ie[0].identifier!==this._swipeTouch)return;let fe=N[0],be=fe.y-this._swipePoint.y;return this._swipePoint=fe,y.preventDefault(),this._active=!0,{zoomDelta:be/128*this._zoomRate}}}else this._tap.touchmove(y,N,ie)}touchend(y,N,ie){if(this._tapTime)this._swipePoint&&ie.length===0&&this.reset();else{let fe=this._tap.touchend(y,N,ie);fe&&(this._tapTime=y.timeStamp,this._tapPoint=fe)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hs{constructor(y,N,ie){this._el=y,this._mousePan=N,this._touchPan=ie}enable(y){this._inertiaOptions=y||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Cu{constructor(y,N,ie,fe){this._pitchWithRotate=y.pitchWithRotate,this._rollEnabled=y.rollEnabled,this._mouseRotate=N,this._mousePitch=ie,this._mouseRoll=fe}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class hi{constructor(y,N,ie,fe){this._el=y,this._touchZoom=N,this._touchRotate=ie,this._tapDragZoom=fe,this._rotationDisabled=!1,this._enabled=!0}enable(y){this._touchZoom.enable(y),this._rotationDisabled||this._touchRotate.enable(y),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}setZoomRate(y){this._touchZoom.setZoomRate(y),this._tapDragZoom.setZoomRate(y)}setZoomThreshold(y){this._touchZoom.setZoomThreshold(y)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class wi{constructor(y,N){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=y,this._options=N,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let y=this._map.getCanvasContainer();y.classList.add("maplibregl-cooperative-gestures"),this._container=g.create("div","maplibregl-cooperative-gesture-screen",y);let N=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(N=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let ie=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),fe=document.createElement("div");fe.className="maplibregl-desktop-message",fe.textContent=N,this._container.appendChild(fe);let be=document.createElement("div");be.className="maplibregl-mobile-message",be.textContent=ie,this._container.appendChild(be),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(y){return y[this._bypassKey]}notifyGestureBlocked(y,N){this._enabled&&(this._map.fire(new e.n("cooperativegestureprevented",{gestureType:y,originalEvent:N})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let sl=pe=>pe.zoom||pe.drag||pe.roll||pe.pitch||pe.rotate;class sc extends e.n{}function tu(pe){var y;return((y=pe.panDelta)===null||y===void 0?void 0:y.mag())||pe.zoomDelta||pe.bearingDelta||pe.pitchDelta||pe.rollDelta}class Ps{get _ownerDocument(){var y;return((y=this._el)===null||y===void 0?void 0:y.ownerDocument)||document}get _ownerWindow(){var y,N;return((N=(y=this._el)===null||y===void 0?void 0:y.ownerDocument)===null||N===void 0?void 0:N.defaultView)||window}constructor(y,N){this.handleWindowEvent=fe=>{this.handleEvent(fe,`${fe.type}Window`)},this.handleEvent=(fe,be)=>{if(fe.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let Re=fe.type==="renderFrame"?void 0:fe,je={needsRenderFrame:!1},Ze={},ut={};for(let{handlerName:Gt,handler:Kt,allowed:st}of this._handlers){if(!Kt.isEnabled())continue;let It;if(this._blockedByActive(ut,st,Gt))Kt.reset();else if(Kt[be||fe.type]){if(e.cz(fe,be||fe.type)){let Ut=g.mousePos(this._map.getCanvas(),fe);It=Kt[be||fe.type](fe,Ut)}else if(e.cA(fe,be||fe.type)){let Ut=this._getMapTouches(fe.touches),ir=g.touchPos(this._map.getCanvas(),Ut);It=Kt[be||fe.type](fe,ir,Ut)}else e.cB(be||fe.type)||(It=Kt[be||fe.type](fe));this.mergeHandlerResult(je,Ze,It,Gt,Re),It?.needsRenderFrame&&this._triggerRenderFrame()}(It||Kt.isActive())&&(ut[Gt]=Kt)}let ft={};for(let Gt in this._previousActiveHandlers)ut[Gt]||(ft[Gt]=Re);this._previousActiveHandlers=ut,(Object.keys(ft).length||tu(je))&&(this._changes.push([je,Ze,ft]),this._triggerRenderFrame()),(Object.keys(ut).length||tu(je))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Dt}=je;Dt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Dt(this._map))},this._map=y,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new lh(y),this._bearingSnap=N.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(N);let ie=this._el;this._listeners=[[ie,"touchstart",{passive:!0}],[ie,"touchmove",{passive:!1}],[ie,"touchend",void 0],[ie,"touchcancel",void 0],[ie,"mousedown",void 0],[ie,"mousemove",void 0],[ie,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[ie,"mouseover",void 0],[ie,"mouseout",void 0],[ie,"dblclick",void 0],[ie,"click",void 0],[ie,"keydown",{capture:!1}],[ie,"keyup",void 0],[ie,"wheel",{passive:!1}],[ie,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[fe,be,Re]of this._listeners)fe.addEventListener(be,fe===this._ownerDocument?this.handleWindowEvent:this.handleEvent,Re)}destroy(){for(let[y,N,ie]of this._listeners)y.removeEventListener(N,y===this._ownerDocument?this.handleWindowEvent:this.handleEvent,ie)}_addDefaultHandlers(y){let N=this._map,ie=N.getCanvasContainer();this._add("mapEvent",new Qc(N,y));let fe=N.boxZoom=new Nl(N,y);this._add("boxZoom",fe),y.interactive&&y.boxZoom&&fe.enable();let be=N.cooperativeGestures=new wi(N,y.cooperativeGestures);this._add("cooperativeGestures",be),y.cooperativeGestures&&be.enable();let Re=new nt(N),je=new ol(N);N.doubleClickZoom=new ys(je,Re),this._add("tapZoom",Re),this._add("clickZoom",je),y.interactive&&y.doubleClickZoom&&N.doubleClickZoom.enable();let Ze=new jl;this._add("tapDragZoom",Ze);let ut=N.touchPitch=new Si(N);this._add("touchPitch",ut),y.interactive&&y.touchPitch&&N.touchPitch.enable(y.touchPitch);let ft=()=>N.project(N.getCenter()),Dt=function({enable:hr,clickTolerance:vr,aroundCenter:Or=!0,minPixelCenterThreshold:Cr=100,rotateDegreesPerPixelMoved:ta=.8},ka){let Ta=new Wt({checkCorrectEvent:Ra=>Ra.button===0&&Ra.ctrlKey||Ra.button===2&&!Ra.ctrlKey});return new mt({clickTolerance:vr,move:(Ra,ua)=>{let ia=ka();if(Or&&Math.abs(ia.y-Ra.y)>Cr)return{bearingDelta:e.cx(new e.P(Ra.x,ua.y),ua,ia)};let ma=(ua.x-Ra.x)*ta;return Or&&ua.yta.button===0&&ta.ctrlKey||ta.button===2});return new mt({clickTolerance:vr,move:(ta,ka)=>({pitchDelta:(ka.y-ta.y)*Or}),moveStateManager:Cr,enable:hr,assignEvents:kr})}(y),Kt=function({enable:hr,clickTolerance:vr,rollDegreesPerPixelMoved:Or=.3},Cr){let ta=new Wt({checkCorrectEvent:ka=>ka.button===2&&ka.ctrlKey});return new mt({clickTolerance:vr,move:(ka,Ta)=>{let Ra=Cr(),ua=(Ta.x-ka.x)*Or;return Ta.yCr.button===0&&!Cr.ctrlKey});return new mt({clickTolerance:vr,move:(Cr,ta)=>({around:ta,panDelta:ta.sub(Cr)}),activateOnStart:!0,moveStateManager:Or,enable:hr,assignEvents:kr})}(y),It=new jr(y,N);N.dragPan=new Hs(ie,st,It),this._add("mousePan",st),this._add("touchPan",It,["touchZoom","touchRotate"]),y.interactive&&y.dragPan&&N.dragPan.enable(y.dragPan);let Ut=new wn,ir=new Ba;N.touchZoomRotate=new hi(ie,ir,Ut,Ze),this._add("touchRotate",Ut,["touchPan","touchZoom"]),this._add("touchZoom",ir,["touchPan","touchRotate"]),y.interactive&&y.touchZoomRotate&&N.touchZoomRotate.enable(y.touchZoomRotate),this._add("blockableMapEvent",new ku(N));let dr=N.scrollZoom=new vo(N,()=>this._triggerRenderFrame());this._add("scrollZoom",dr,["mousePan"]),y.interactive&&y.scrollZoom&&N.scrollZoom.enable(y.scrollZoom);let Ar=N.keyboard=new Ji(N);this._add("keyboard",Ar),y.interactive&&y.keyboard&&N.keyboard.enable()}_add(y,N,ie){this._handlers.push({handlerName:y,handler:N,allowed:ie}),this._handlersById[y]=N}stop(y){if(!this._updatingCamera){for(let{handler:N}of this._handlers)N.reset();this._inertia.clear(),this._fireEvents({},{},y),this._changes=[]}}isActive(){for(let{handler:y}of this._handlers)if(y.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!sl(this._eventsInProgress)||this.isZooming()}_blockedByActive(y,N,ie){for(let fe in y)if(fe!==ie&&!N?.includes(fe))return!0;return!1}_getMapTouches(y){let N=[];for(let ie of y)this._el.contains(ie.target)&&N.push(ie);return N}mergeHandlerResult(y,N,ie,fe,be){if(!ie)return;e.e(y,ie);let Re={handlerName:fe,originalEvent:ie.originalEvent||be};ie.zoomDelta!==void 0&&(N.zoom=Re),ie.panDelta!==void 0&&(N.drag=Re),ie.rollDelta!==void 0&&(N.roll=Re),ie.pitchDelta!==void 0&&(N.pitch=Re),ie.bearingDelta!==void 0&&(N.rotate=Re)}_applyChanges(){let y={},N={},ie={};for(let[fe,be,Re]of this._changes)fe.panDelta&&(y.panDelta=(y.panDelta||new e.P(0,0))._add(fe.panDelta)),fe.zoomDelta&&(y.zoomDelta=(y.zoomDelta||0)+fe.zoomDelta),fe.bearingDelta&&(y.bearingDelta=(y.bearingDelta||0)+fe.bearingDelta),fe.pitchDelta&&(y.pitchDelta=(y.pitchDelta||0)+fe.pitchDelta),fe.rollDelta&&(y.rollDelta=(y.rollDelta||0)+fe.rollDelta),fe.around!==void 0&&(y.around=fe.around),fe.pinchAround!==void 0&&(y.pinchAround=fe.pinchAround),fe.noInertia&&(y.noInertia=fe.noInertia),e.e(N,be),e.e(ie,Re);this._updateMapTransform(y,N,ie),this._changes=[]}_updateMapTransform(y,N,ie){let fe=this._map,be=fe._getTransformForUpdate(),Re=fe.terrain;if(!(tu(y)||Re&&this._terrainMovement))return void this._fireEvents(N,ie,!0);fe._stop(!0);let{panDelta:je,zoomDelta:Ze,bearingDelta:ut,pitchDelta:ft,rollDelta:Dt,around:Gt,pinchAround:Kt}=y;Kt!==void 0&&(Gt=Kt),Gt||(Gt=fe.transform.centerPoint),Re&&!be.isPointOnMapSurface(Gt)&&(Gt=be.centerPoint);let st={panDelta:je,zoomDelta:Ze,rollDelta:Dt,pitchDelta:ft,bearingDelta:ut,around:Gt};this._map.cameraHelper.useGlobeControls&&!be.isPointOnMapSurface(Gt)&&(Gt=be.centerPoint);let It=Gt.distSqr(be.centerPoint)<.01?be.center:be.screenPointToLocation(je?Gt.sub(je):Gt);this._handleMapControls({terrain:Re,tr:be,deltasForHelper:st,preZoomAroundLoc:It,combinedEventsInProgress:N,panDelta:je}),fe._applyUpdatedTransform(be),this._map._update(),y.noInertia||this._inertia.record(y),this._fireEvents(N,ie,!0)}_handleMapControls({terrain:y,tr:N,deltasForHelper:ie,preZoomAroundLoc:fe,combinedEventsInProgress:be,panDelta:Re}){let je=this._map.cameraHelper;if(je.handleMapControlsRollPitchBearingZoom(ie,N),y)return je.useGlobeControls?(this._terrainMovement||!be.drag&&!be.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void je.handleMapControlsPan(ie,N,fe)):this._terrainMovement||!be.drag&&!be.zoom?void(be.drag&&this._terrainMovement&&Re?N.setCenter(N.screenPointToLocation(N.centerPoint.sub(Re))):je.handleMapControlsPan(ie,N,fe)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void je.handleMapControlsPan(ie,N,fe));je.handleMapControlsPan(ie,N,fe)}_fireEvents(y,N,ie){let fe=sl(this._eventsInProgress),be=sl(y),Re={};for(let Dt in y){let{originalEvent:Gt}=y[Dt];this._eventsInProgress[Dt]||(Re[`${Dt}start`]=Gt),this._eventsInProgress[Dt]=y[Dt]}!fe&&be&&this._fireEvent("movestart",be.originalEvent);for(let Dt in Re)this._fireEvent(Dt,Re[Dt]);be&&this._fireEvent("move",be.originalEvent);for(let Dt in y){let{originalEvent:Gt}=y[Dt];this._fireEvent(Dt,Gt)}let je={},Ze;for(let Dt in this._eventsInProgress){let{handlerName:Gt,originalEvent:Kt}=this._eventsInProgress[Dt];this._handlersById[Gt].isActive()||(delete this._eventsInProgress[Dt],Ze=N[Gt]||Kt,je[`${Dt}end`]=Ze)}for(let Dt in je)this._fireEvent(Dt,je[Dt]);let ut=sl(this._eventsInProgress),ft=(fe||be)&&!ut;if(ft&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Dt=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&Dt.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(Dt)}if(ie&&ft){this._updatingCamera=!0;let Dt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Gt=Kt=>Kt!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new sc("renderFrame",{timeStamp:y})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class gc extends e.E{constructor(y,N,ie){super(),this._renderFrameCallback=()=>{let fe=Math.min((m()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(fe)),fe<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=y,this._bearingSnap=ie.bearingSnap,this._zoomSnap=ie.zoomSnap,this.cameraHelper=N,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(y,N){y.apply(this.transform,!0),this.transform=y,this.cameraHelper=N}getCenter(){return new e.W(this.transform.center.lng,this.transform.center.lat)}setCenter(y,N){return this.jumpTo({center:y},N)}getCenterElevation(){return this.transform.elevation}setCenterElevation(y,N){return this.jumpTo({elevation:y},N),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(y){this._centerClampedToGround=y}panBy(y,N,ie){return y=e.P.convert(y).mult(-1),this.panTo(this.transform.center,e.e({offset:y},N),ie)}panTo(y,N,ie){return this.easeTo(e.e({center:y},N),ie)}getZoom(){return this.transform.zoom}setZoom(y,N){return this.jumpTo({zoom:y},N),this}zoomTo(y,N,ie){return this.easeTo(e.e({zoom:y},N),ie)}zoomIn(y,N){return this.zoomTo(e.cw(this.getZoom()+1,this._zoomSnap),y,N),this}zoomOut(y,N){return this.zoomTo(e.cw(this.getZoom()-1,this._zoomSnap),y,N),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(y,N){return y!=this.transform.fov&&(this.transform.setFov(y),this.fire(new e.n("movestart",N)).fire(new e.n("move",N)).fire(new e.n("moveend",N))),this}getBearing(){return this.transform.bearing}setZoomSnap(y){return this._zoomSnap=y,this}getZoomSnap(){return this._zoomSnap}setBearing(y,N){return this.jumpTo({bearing:y},N),this}getPadding(){return this.transform.padding}setPadding(y,N){return this.jumpTo({padding:y},N),this}rotateTo(y,N,ie){return this.easeTo(e.e({bearing:y},N),ie)}resetNorth(y,N){return this.rotateTo(0,e.e({duration:1e3},y),N),this}resetNorthPitch(y,N){return this.easeTo(e.e({bearing:0,pitch:0,roll:0,duration:1e3},y),N),this}snapToNorth(y,N){return Math.abs(this.getBearing()){It.easeFunc(Ut),this.terrain&&!y.freezeElevation&&this._updateElevation(Ut),this._applyUpdatedTransform(ie),this._fireMoveEvents(N)},Ut=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(N,Ut)},y),this}_prepareEase(y,N,ie={}){this._moving=!0,N||ie.moving||this.fire(new e.n("movestart",y)),this._zooming&&!ie.zooming&&this.fire(new e.n("zoomstart",y)),this._rotating&&!ie.rotating&&this.fire(new e.n("rotatestart",y)),this._pitching&&!ie.pitching&&this.fire(new e.n("pitchstart",y)),this._rolling&&!ie.rolling&&this.fire(new e.n("rollstart",y))}_prepareElevation(y){this._elevationCenter=y,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(y,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(y){this._elevationStart!==void 0&&this._elevationCenter!==void 0||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let N=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(y<1&&N!==this._elevationTarget){let ie=this._elevationTarget-this._elevationStart;this._elevationStart+=y*(ie-(N-(ie*y+this._elevationStart))/(1-y)),this._elevationTarget=N}this.transform.setElevation(e.H.number(this._elevationStart,this._elevationTarget,y))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(y){if(!this.terrain&&y.elevation>=0&&y.pitch<=90)return{};let N=y.getCameraLngLat(),ie=y.getCameraAltitude(),fe=this.terrain?this.terrain.getElevationForLngLatZoom(N,y.zoom):0;if(iethis._elevateCameraIfInsideTerrain(fe)),this.transformCameraUpdate&&N.push(fe=>this.transformCameraUpdate(fe)),!N.length)return;let ie=y.clone();for(let fe of N){let be=ie.clone(),{center:Re,zoom:je,roll:Ze,pitch:ut,bearing:ft,elevation:Dt}=fe(be);Re&&be.setCenter(Re),Dt!==void 0&&be.setElevation(Dt),je!==void 0&&be.setZoom(je),Ze!==void 0&&be.setRoll(Ze),ut!==void 0&&be.setPitch(ut),ft!==void 0&&be.setBearing(ft),ie.apply(be,!1)}this.transform.apply(ie,!1)}_fireMoveEvents(y){this.fire(new e.n("move",y)),this._zooming&&this.fire(new e.n("zoom",y)),this._rotating&&this.fire(new e.n("rotate",y)),this._pitching&&this.fire(new e.n("pitch",y)),this._rolling&&this.fire(new e.n("roll",y))}_afterEase(y,N){if(this._easeId&&N&&this._easeId===N)return;delete this._easeId;let ie=this._zooming,fe=this._rotating,be=this._pitching,Re=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,ie&&this.fire(new e.n("zoomend",y)),fe&&this.fire(new e.n("rotateend",y)),be&&this.fire(new e.n("pitchend",y)),Re&&this.fire(new e.n("rollend",y)),this.fire(new e.n("moveend",y))}flyTo(y,N){if(!y.essential&&s.prefersReducedMotion){let ua=e.V(y,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(ua,N)}this.stop(),"zoom"in(y=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.cy},y))&&this._zoomSnap&&(y.zoom=e.cw(y.zoom,this._zoomSnap));let ie=this._getTransformForUpdate(),fe=ie.bearing,be=ie.pitch,Re=ie.roll,je=ie.padding,Ze="bearing"in y?this._normalizeBearing(y.bearing,fe):fe,ut="pitch"in y?+y.pitch:be,ft="roll"in y?this._normalizeBearing(y.roll,Re):Re,Dt="padding"in y?y.padding:ie.padding,Gt=e.P.convert(y.offset),Kt=ie.centerPoint.add(Gt),st=ie.screenPointToLocation(Kt),It=this.cameraHelper.handleFlyTo(ie,{bearing:Ze,pitch:ut,roll:ft,padding:Dt,locationAtOffset:st,offsetAsPoint:Gt,center:y.center,minZoom:y.minZoom,zoom:y.zoom}),Ut=y.curve,ir=Math.max(ie.width,ie.height),dr=ir/It.scaleOfZoom,Ar=It.pixelPathLength;typeof It.scaleOfMinZoom=="number"&&(Ut=Math.sqrt(ir/It.scaleOfMinZoom/Ar*2));let hr=Ut*Ut;function vr(ua){let ia=(dr*dr-ir*ir+(ua?-1:1)*hr*hr*Ar*Ar)/(2*(ua?dr:ir)*hr*Ar);return Math.log(Math.sqrt(ia*ia+1)-ia)}function Or(ua){return(Math.exp(ua)-Math.exp(-ua))/2}function Cr(ua){return(Math.exp(ua)+Math.exp(-ua))/2}let ta=vr(!1),ka=function(ua){return Cr(ta)/Cr(ta+Ut*ua)},Ta=function(ua){return ir*((Cr(ta)*(Or(ia=ta+Ut*ua)/Cr(ia))-Or(ta))/hr)/Ar;var ia},Ra=(vr(!0)-ta)/Ut;if(Math.abs(Ar)<2e-6||!isFinite(Ra)){if(Math.abs(ir-dr)<1e-6)return this.easeTo(y,N);let ua=dr0,ka=ia=>Math.exp(ua*Ut*ia)}return y.duration="duration"in y?+y.duration:1e3*Ra/("screenSpeed"in y?+y.screenSpeed/Ut:+y.speed),y.maxDuration&&y.duration>y.maxDuration&&(y.duration=0),this._zooming=!0,this._rotating=fe!==Ze,this._pitching=ut!==be,this._rolling=ft!==Re,this._padding=!ie.isPaddingEqual(Dt),this._prepareEase(N,!1),this.terrain&&this._prepareElevation(It.targetCenter),this._ease(ua=>{let ia=ua*Ra,ma=1/ka(ia),da=Ta(ia);this._rotating&&ie.setBearing(e.H.number(fe,Ze,ua)),this._pitching&&ie.setPitch(e.H.number(be,ut,ua)),this._rolling&&ie.setRoll(e.H.number(Re,ft,ua)),this._padding&&(ie.interpolatePadding(je,Dt,ua),Kt=ie.centerPoint.add(Gt)),It.easeFunc(ua,ma,da,Kt),this.terrain&&!y.freezeElevation&&this._updateElevation(ua),this._applyUpdatedTransform(ie),this._fireMoveEvents(N)},()=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(N)},y),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(y,N){var ie;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let fe=this._onEaseEnd;delete this._onEaseEnd,fe.call(this,N)}return y||(ie=this.handlers)===null||ie===void 0||ie.stop(!1),this}_ease(y,N,ie){ie.animate===!1||ie.duration===0?(y(1),N()):(this._easeStart=m(),this._easeOptions=ie,this._onEaseFrame=y,this._onEaseEnd=N,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(y,N){y=e.X(y,-180,180);let ie=Math.abs(y-N);return Math.abs(y-360-N)MapLibre'};class ll{constructor(y=pu){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=N=>{!N||N.sourceDataType!=="metadata"&&N.sourceDataType!=="visibility"&&N.dataType!=="style"&&N.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=y}getDefaultPosition(){return"bottom-right"}onAdd(y){return this._map=y,this._compact=this.options.compact,this._container=g.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=g.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=g.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(y,N){let ie=this._map._getUIString(`AttributionControl.${N}`);y.title=ie,y.setAttribute("aria-label",ie)}_updateAttributions(){if(!this._map.style)return;let y=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?y=y.concat(this.options.customAttribution.map(fe=>typeof fe!="string"?"":fe)):typeof this.options.customAttribution=="string"&&y.push(this.options.customAttribution)),this._map.style.stylesheet){let fe=this._map.style.stylesheet;this.styleOwner=fe.owner,this.styleId=fe.id}let N=this._map.style.tileManagers;for(let fe in N){let be=N[fe];if(be.used||be.usedForTerrain){let Re=be.getSource();Re.attribution&&!y.includes(Re.attribution)&&y.push(Re.attribution)}}y=y.filter(fe=>String(fe).trim()),y.sort((fe,be)=>fe.length-be.length),y=y.filter((fe,be)=>{for(let Re=be+1;Re{let N=this._container.children;if(N.length){let ie=N[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&ie.classList.add("maplibregl-compact"):ie.classList.remove("maplibregl-compact")}},this.options=y}getDefaultPosition(){return"bottom-left"}onAdd(y){var N;this._map=y,this._compact=(N=this.options)===null||N===void 0?void 0:N.compact,this._container=g.create("div","maplibregl-ctrl");let ie=g.create("a","maplibregl-ctrl-logo");return ie.target="_blank",ie.rel="noopener nofollow",ie.href="https://maplibre.org/",ie.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ie.setAttribute("rel","noopener nofollow"),this._container.appendChild(ie),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class de{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(y){let N=++this._id;return this._queue.push({callback:y,id:N,cancelled:!1}),N}remove(y){let N=this._currentlyRunning,ie=N?this._queue.concat(N):this._queue;for(let fe of ie)if(fe.id===y)return void(fe.cancelled=!0)}run(y=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let N=this._currentlyRunning=this._queue;this._queue=[];for(let ie of N)if(!ie.cancelled&&(ie.callback(y),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ee=e.aS([{name:"a_pos3d",type:"Int16",components:3}]);class qe extends e.E{constructor(y){super(),this._lastTilesetChange=m(),this.tileManager=y,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=y._source.tileSize*2**this.deltaZoom,y.usedForTerrain=!0,y.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(y,N){this.tileManager.update(y,N),this._renderableTilesKeys=[];let ie={};for(let fe of Je(y,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:N,calculateTileZoom:this.tileManager._source.calculateTileZoom}))ie[fe.key]=!0,this._renderableTilesKeys.push(fe.key),this._tiles[fe.key]||(fe.terrainRttPosMatrix32f=new Float64Array(16),e.c7(fe.terrainRttPosMatrix32f,0,e.a6,e.a6,0,0,1),this._tiles[fe.key]=new Tt(fe,this.tileSize),this._lastTilesetChange=m());for(let fe in this._tiles)ie[fe]||delete this._tiles[fe]}freeRtt(y){for(let N in this._tiles){let ie=this._tiles[N];(!y||ie.tileID.equals(y)||ie.tileID.isChildOf(y)||y.isChildOf(ie.tileID))&&(ie.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(y=>this.getTileByID(y))}getTileByID(y){return this._tiles[y]}getTerrainCoords(y,N){return N?this._getTerrainCoordsForTileRanges(y,N):this._getTerrainCoordsForRegularTile(y)}_getTerrainCoordsForRegularTile(y){let N={};for(let ie of this._renderableTilesKeys){let fe=this._tiles[ie].tileID,be=y.clone(),Re=e.bj();if(fe.canonical.equals(y.canonical))e.c7(Re,0,e.a6,e.a6,0,0,1);else if(fe.canonical.isChildOf(y.canonical)){let je=fe.canonical.z-y.canonical.z,Ze=fe.canonical.x-(fe.canonical.x>>je<>je<>je;e.c7(Re,0,ft,ft,0,0,1),e.Q(Re,Re,[-Ze*ft,-ut*ft,0])}else{if(!y.canonical.isChildOf(fe.canonical))continue;{let je=y.canonical.z-fe.canonical.z,Ze=y.canonical.x-(y.canonical.x>>je<>je<>je;e.c7(Re,0,e.a6,e.a6,0,0,1),e.Q(Re,Re,[Ze*ft,ut*ft,0]),e.S(Re,Re,[1/2**je,1/2**je,0])}}be.terrainRttPosMatrix32f=new Float32Array(Re),N[ie]=be}return N}_getTerrainCoordsForTileRanges(y,N){let ie={};for(let fe of this._renderableTilesKeys){let be=this._tiles[fe].tileID;if(!this._isWithinTileRanges(be,N))continue;let Re=y.clone(),je=e.bj();if(be.canonical.z===y.canonical.z){let Ze=y.canonical.x-be.canonical.x+y.wrap*(1<y.canonical.z){let Ze=be.canonical.z-y.canonical.z,ut=be.canonical.x-(be.canonical.x>>Ze<>Ze<>Ze),Gt=y.canonical.y-(be.canonical.y>>Ze),Kt=e.a6>>Ze;e.c7(je,0,Kt,Kt,0,0,1),e.Q(je,je,[-ut*Kt+Dt*e.a6,-ft*Kt+Gt*e.a6,0])}else{let Ze=y.canonical.z-be.canonical.z,ut=y.canonical.x-(y.canonical.x>>Ze<>Ze<>Ze)-be.canonical.x,Gt=(y.canonical.y>>Ze)-be.canonical.y,Kt=e.a6<be.maxzoom&&(Re=be.maxzoom),Re=be.minzoom&&!je?.dem;)je=this.findTileInCaches(y.scaledTo(Re--).key);return je}findTileInCaches(y){let N=this.tileManager.getTileByID(y);return N||(N=this.tileManager._outOfViewCache.getByKey(y),N)}anyTilesAfterTime(y=Date.now()){return this._lastTilesetChange>=y}_isWithinTileRanges(y,N){let ie=N[y.canonical.z];return!!ie&&(y.wrap>ie.minWrap||y.wrap=ie.minTileXWrapped&&y.canonical.x<=ie.maxTileXWrapped&&y.canonical.y>=ie.minTileY&&y.canonical.y<=ie.maxTileY)}}class tt{constructor(y,N,ie){this._meshCache={},this.painter=y,this.tileManager=new qe(N),this.options=ie,this.exaggeration=typeof ie.exaggeration=="number"?ie.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null);for(let y in this._meshCache)this._meshCache[y].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(y,N,ie,fe=e.a6){var be;let Re=y.normalizeCoordinates(N,ie,fe);if(!Re)return 0;let je=this.getTerrainData(Re.tileID),Ze=(be=je.tile)===null||be===void 0?void 0:be.dem;if(!Ze)return 0;let ut=e.cC([],[Re.x/fe*e.a6,Re.y/fe*e.a6],je.u_terrain_matrix),ft=[ut[0]*Ze.dim,ut[1]*Ze.dim],Dt=Math.floor(ft[0]),Gt=Math.floor(ft[1]),Kt=ft[0]-Dt,st=ft[1]-Gt;return Ze.get(Dt,Gt)*(1-Kt)*(1-st)+Ze.get(Dt+1,Gt)*Kt*(1-st)+Ze.get(Dt,Gt+1)*(1-Kt)*st+Ze.get(Dt+1,Gt+1)*Kt*st}getElevationForLngLatZoom(y,N){if(!e.cD(N,y.wrap()))return 0;let{tileID:ie,mercatorX:fe,mercatorY:be}=this._getOverscaledTileIDFromLngLatZoom(y,N);return this.getElevation(ie,fe%e.a6,be%e.a6,e.a6)}getElevationForLngLat(y,N){let ie=Je(N,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),fe=0;for(let be of ie)be.canonical.z>fe&&(fe=Math.min(be.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(y,fe)}getElevation(y,N,ie,fe=e.a6){return this.getDEMElevation(y,N,ie,fe)*this.exaggeration}getTerrainData(y){var N,ie;if(!this._emptyDemTexture){let Re=this.painter.context,je=new e.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new e.T(Re,je,Re.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new e.T(Re,new e.R({width:1,height:1}),Re.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Re.gl.NEAREST,Re.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=e.ap([])}let fe=this.tileManager.getSourceTile(y,!0);if(fe?.dem&&(!fe.demTexture||fe.needsTerrainPrepare)){let Re=this.painter.context;fe.demTexture=this.painter.getTileTexture(fe.dem.stride),fe.demTexture?fe.demTexture.update(fe.dem.getPixels(),{premultiply:!1}):fe.demTexture=new e.T(Re,fe.dem.getPixels(),Re.gl.RGBA,{premultiply:!1}),fe.demTexture.bind(Re.gl.NEAREST,Re.gl.CLAMP_TO_EDGE),fe.needsTerrainPrepare=!1}let be=fe&&fe.toString()+fe.tileID.key+y.key;if(be&&!this._demMatrixCache[be]){let Re=this.tileManager.getSource().maxzoom,je=y.canonical.z-fe.tileID.canonical.z;y.overscaledZ>y.canonical.z&&(y.canonical.z>=Re?je=y.canonical.z-Re:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Ze=y.canonical.x-(y.canonical.x>>je<>je<>8<<4|be>>8,N[Re+3]=0;let ie=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(N.buffer)),fe=new e.T(y,ie,y.gl.RGBA,{premultiply:!1});return fe.bind(y.gl.NEAREST,y.gl.CLAMP_TO_EDGE),this._coordsTexture=fe,fe}pointCoordinate(y){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let N=new Uint8Array(4),ie=this.painter.context,fe=ie.gl,be=Math.round(y.x*this.painter.pixelRatio/devicePixelRatio),Re=Math.round(y.y*this.painter.pixelRatio/devicePixelRatio),je=Math.round(this.painter.height/devicePixelRatio);ie.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),fe.readPixels(be,je-Re-1,1,1,fe.RGBA,fe.UNSIGNED_BYTE,N),ie.bindFramebuffer.set(null);let Ze=N[0]+(N[2]>>4<<8),ut=N[1]+((15&N[2])<<8),ft=this.coordsIndex[255-N[3]],Dt=ft&&this.tileManager.getTileByID(ft);if(!Dt)return null;let Gt=this._coordsTextureSize,Kt=(1<0,fe=ie&&y.canonical.y===0,be=ie&&y.canonical.y===(1<y.id!==N),this._recentlyUsed.push(y.id)}stampObject(y){y.stamp=++this._stamp}getOrCreateFreeObject(){for(let N of this._recentlyUsed)if(!this._objects[N].inUse)return this._objects[N];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let y=this._createObject(this._objects.length);return this._objects.push(y),y}freeObject(y){y.inUse=!1}freeAllObjects(){for(let y of this._objects)this.freeObject(y)}isFull(){return!(this._objects.length!y.inUse)===!1}}let ct={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class Nt{constructor(y,N){this.painter=y,this.terrain=N,this.pool=new at(y.context,30,N.tileManager.tileSize*N.qualityFactor)}destruct(){this.pool.destruct()}getTexture(y){return this.pool.getObjectForId(y.rtt[this._stacks.length-1].id).texture}prepareForRender(y,N){var ie,fe,be;this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=y._order.filter(Re=>!y._layers[Re].isHidden(N)),this._coordsAscending={};for(let Re in y.tileManagers){this._coordsAscending[Re]={};let je=y.tileManagers[Re].getVisibleCoordinates(),Ze=y.tileManagers[Re].getSource(),ut=Ze instanceof ke?Ze.terrainTileRanges:null;for(let ft of je){let Dt=this.terrain.tileManager.getTerrainCoords(ft,ut);for(let Gt in Dt)(be=this._coordsAscending[Re])[Gt]||(be[Gt]=[]),this._coordsAscending[Re][Gt].push(Dt[Gt])}}this._rttFingerprints={};for(let Re of y._order){let je=y._layers[Re],Ze=je.source;if(ct[je.type]&&!this._rttFingerprints[Ze]){this._rttFingerprints[Ze]={};let ut=(fe=(ie=y.tileManagers[Ze])===null||ie===void 0?void 0:ie.getState().revision)!==null&&fe!==void 0?fe:0;for(let ft in this._coordsAscending[Ze])this._rttFingerprints[Ze][ft]=`${this._coordsAscending[Ze][ft].map(Dt=>Dt.key).sort().join()}#${ut}`}}for(let Re of this._renderableTiles)for(let je in this._rttFingerprints){let Ze=this._rttFingerprints[je][Re.tileID.key];Ze&&Ze!==Re.rttFingerprint[je]&&(Re.rtt=[])}}renderLayer(y,N){if(y.isHidden(this.painter.transform.zoom))return!1;let ie=Object.assign(Object.assign({},N),{isRenderingToTexture:!0}),fe=y.type,be=this.painter,Re=this._renderableLayerIds[this._renderableLayerIds.length-1]===y.id;if(ct[fe]&&(this._prevType&&ct[this._prevType]||this._stacks.push([]),this._prevType=fe,this._stacks[this._stacks.length-1].push(y.id),!Re))return!0;if(ct[this._prevType]||ct[fe]&&Re){this._prevType=fe;let je=this._stacks.length-1,Ze=this._stacks[je]||[];for(let ut of this._renderableTiles){if(this.pool.isFull()&&(Gu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(ut),ut.rtt[je]){let Dt=this.pool.getObjectForId(ut.rtt[je].id);if(Dt.stamp===ut.rtt[je].stamp){this.pool.useObject(Dt);continue}}let ft=this.pool.getOrCreateFreeObject();this.pool.useObject(ft),this.pool.stampObject(ft),ut.rtt[je]={id:ft.id,stamp:ft.stamp},be.context.bindFramebuffer.set(ft.fbo.framebuffer),be.context.clear({color:e.bo.transparent,stencil:0}),be.currentStencilSource=void 0;for(let Dt of Ze){let Gt=be.style._layers[Dt],Kt=Gt.source?this._coordsAscending[Gt.source][ut.tileID.key]:[ut.tileID];be.context.viewport.set([0,0,ft.fbo.width,ft.fbo.height]),be._renderTileClippingMasks(Gt,Kt,!0),be.renderLayer(be,be.style.tileManagers[Gt.source],Gt,Kt,ie),Gt.source&&(ut.rttFingerprint[Gt.source]=this._rttFingerprints[Gt.source][ut.tileID.key])}}return Gu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects(),ct[fe]}return!1}}let St={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Jt=t,mr={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:pu,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:e.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},gr=class extends gc{get _ownerWindow(){var pe,y;return((y=(pe=this._container)===null||pe===void 0?void 0:pe.ownerDocument)===null||y===void 0?void 0:y.defaultView)||window}constructor(pe){var y,N,ie;let fe=Object.assign(Object.assign(Object.assign({},mr),pe),{canvasContextAttributes:Object.assign(Object.assign({},mr.canvasContextAttributes),pe.canvasContextAttributes)});if(fe.minZoom!=null&&fe.maxZoom!=null&&fe.minZoom>fe.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(fe.minPitch!=null&&fe.maxPitch!=null&&fe.minPitch>fe.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(fe.minPitch!=null&&fe.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(fe.maxPitch!=null&&fe.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let be=new Eo,Re=new Wo;fe.minZoom!==void 0&&be.setMinZoom(fe.minZoom),fe.maxZoom!==void 0&&be.setMaxZoom(fe.maxZoom),fe.minPitch!==void 0&&be.setMinPitch(fe.minPitch),fe.maxPitch!==void 0&&be.setMaxPitch(fe.maxPitch),fe.renderWorldCopies!==void 0&&be.setRenderWorldCopies(fe.renderWorldCopies),fe.transformConstrain!==null&&be.setConstrainOverride(fe.transformConstrain),super(be,Re,{bearingSnap:fe.bearingSnap,zoomSnap:fe.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new de,this._controls=[],this._mapId=e.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=Ze=>{if(Ze.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let ut of Object.values(this.style._layers))if(ut.type==="custom"&&console.warn(`Custom layer with id '${ut.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),ut._listeners)for(let[ft]of Object.entries(ut._listeners))console.warn(`Custom layer with id '${ut.id}' had event listeners for event '${ft}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new e.n("webglcontextlost",{originalEvent:Ze}))}else this.fire(new e.n("webglcontextlost",{originalEvent:Ze}))},this._contextRestored=Ze=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new e.n("webglcontextrestored",{originalEvent:Ze}))},this._onMapScroll=Ze=>{if(Ze.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=fe.interactive,this._maxTileCacheSize=fe.maxTileCacheSize,this._maxTileCacheZoomLevels=fe.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},fe.canvasContextAttributes),this._trackResize=fe.trackResize===!0,this._bearingSnap=fe.bearingSnap,this._zoomSnap=fe.zoomSnap,this._centerClampedToGround=fe.centerClampedToGround,this._refreshExpiredTiles=fe.refreshExpiredTiles===!0,this._fadeDuration=fe.fadeDuration,this._crossSourceCollisions=fe.crossSourceCollisions===!0,this._collectResourceTiming=fe.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},St),fe.locale),this._clickTolerance=fe.clickTolerance,this._overridePixelRatio=fe.pixelRatio,this._maxCanvasSize=fe.maxCanvasSize,this._zoomLevelsToOverscale=fe.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=fe.transformCameraUpdate,this.transformConstrain=fe.transformConstrain,this.cancelPendingTileRequestsWhileZooming=fe.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(fe.anisotropicFilterPitch),fe.reduceMotion!==void 0&&(s.prefersReducedMotion=fe.reduceMotion),this._imageQueueHandle=v.addThrottleControl(()=>this.isMoving()),this._requestManager=new i(fe.transformRequest),this._container=this._resolveContainer(fe.container),fe.maxBounds&&this.setMaxBounds(fe.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new Ps(this,fe),this._hash=fe.hash?new Jc(typeof fe.hash=="string"&&fe.hash||void 0).addTo(this):void 0,!((y=this._hash)===null||y===void 0)&&y._onHashChange()||(this.jumpTo({center:fe.center,elevation:fe.elevation,zoom:fe.zoom,bearing:fe.bearing,pitch:fe.pitch,roll:fe.roll}),fe.bounds&&(this.resize(),this.fitBounds(fe.bounds,e.e({},fe.fitBoundsOptions,{duration:0}))));let je=typeof fe.style=="string"||((ie=(N=fe.style)===null||N===void 0?void 0:N.projection)===null||ie===void 0?void 0:ie.type)!=="globe";this.resize(null,je),this._localIdeographFontFamily=fe.localIdeographFontFamily,this._validateStyle=fe.validateStyle,fe.style&&this.setStyle(fe.style,{localIdeographFontFamily:fe.localIdeographFontFamily}),fe.attributionControl&&this.addControl(new ll(typeof fe.attributionControl=="boolean"?void 0:fe.attributionControl)),fe.maplibreLogo&&this.addControl(new ef,fe.logoPosition),this.on("style.load",()=>{if(je||this._resizeTransform(),this.transform.unmodified){let Ze=e.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(Ze)}}),this.on("data",Ze=>{this._update(Ze.dataType==="style"),this.fire(new e.n(`${Ze.dataType}data`,Ze))}),this.on("dataloading",Ze=>{this.fire(new e.n(`${Ze.dataType}dataloading`,Ze))}),this.on("dataabort",Ze=>{this.fire(new e.n("sourcedataabort",Ze))})}_getMapId(){return this._mapId}setGlobalStateProperty(pe,y){return this.style.setGlobalStateProperty(pe,y),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(pe,y){if(y===void 0&&(y=pe.getDefaultPosition?pe.getDefaultPosition():"top-right"),!pe?.onAdd)return this.fire(new e.l(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let N=pe.onAdd(this);this._controls.push(pe);let ie=this._controlPositions[y];return y.includes("bottom")?ie.insertBefore(N,ie.firstChild):ie.appendChild(N),this}removeControl(pe){if(!pe?.onRemove)return this.fire(new e.l(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let y=this._controls.indexOf(pe);return y>-1&&this._controls.splice(y,1),pe.onRemove(this),this}hasControl(pe){return this._controls.includes(pe)}coveringTiles(pe){return Je(this.transform,pe)}calculateCameraOptionsFromTo(pe,y,N,ie){return ie==null&&this.terrain&&(ie=this.terrain.getElevationForLngLat(N,this.transform)),super.calculateCameraOptionsFromTo(pe,y,N,ie)}resize(pe,y=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(y);let N=!this._moving;return N&&(this.stop(),this.fire(new e.n("movestart",pe)).fire(new e.n("move",pe))),this.fire(new e.n("resize",pe)),N&&this.fire(new e.n("moveend",pe)),this}_resizeInternal(pe=!0){let[y,N]=this._containerDimensions(),ie=this._getClampedPixelRatio(y,N);if(this._resizeCanvas(y,N,ie),this.painter.resize(y,N,ie),this.painter.overLimit()){let fe=this.painter.context.gl;this._maxCanvasSize=[fe.drawingBufferWidth,fe.drawingBufferHeight];let be=this._getClampedPixelRatio(y,N);this._resizeCanvas(y,N,be),this.painter.resize(y,N,be)}this._resizeTransform(pe)}_resizeTransform(pe=!0){var y;let[N,ie]=this._containerDimensions();this.transform.resize(N,ie,pe),(y=this._requestedCameraState)===null||y===void 0||y.resize(N,ie,pe)}_getClampedPixelRatio(pe,y){let{0:N,1:ie}=this._maxCanvasSize,fe=this.getPixelRatio(),be=pe*fe,Re=y*fe;return Math.min(be>N?N/be:1,Re>ie?ie/Re:1)*fe}getPixelRatio(){var pe;return(pe=this._overridePixelRatio)!==null&&pe!==void 0?pe:devicePixelRatio}setPixelRatio(pe){this._overridePixelRatio=pe,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(pe){return this.transform.setMaxBounds(q.convert(pe)),this._update()}setMinZoom(pe){if((pe=pe??-2)>=-2&&pe<=this.transform.maxZoom){let y=this.transform.zoom,N=this._getTransformForUpdate();return N.setMinZoom(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(pe){if((pe=pe??22)>=this.transform.minZoom){let y=this.transform.zoom,N=this._getTransformForUpdate();return N.setMaxZoom(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(pe){if((pe=pe??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(pe>=0&&pe<=this.transform.maxPitch){let y=this.transform.pitch,N=this._getTransformForUpdate();return N.setMinPitch(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(pe){if((pe=pe??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(pe>=this.transform.minPitch){let y=this.transform.pitch,N=this._getTransformForUpdate();return N.setMaxPitch(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(pe){if((pe=pe??20)>180)throw new Error("anisotropicFilterPitch must be less than or equal to 180");if(pe<0)throw new Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=pe,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(pe){return this.transform.setRenderWorldCopies(pe),this._update()}setTransformConstrain(pe){return this.transform.setConstrainOverride(pe),this._update()}project(pe){return this.transform.locationToScreenPoint(e.W.convert(pe),this.style&&this.terrain)}unproject(pe){return this.transform.screenPointToLocation(e.P.convert(pe),this.terrain)}isMoving(){var pe;return this._moving||((pe=this.handlers)===null||pe===void 0?void 0:pe.isMoving())}isZooming(){var pe;return this._zooming||((pe=this.handlers)===null||pe===void 0?void 0:pe.isZooming())}isRotating(){var pe;return this._rotating||((pe=this.handlers)===null||pe===void 0?void 0:pe.isRotating())}_createDelegatedListener(pe,y,N){if(pe==="mouseenter"||pe==="mouseover"){let ie=!1;return{layers:y,listener:N,delegates:{mousemove:be=>{let Re=y.filter(Ze=>this.getLayer(Ze)),je=Re.length!==0?this.queryRenderedFeatures(be.point,{layers:Re}):[];je.length?ie||(ie=!0,N.call(this,new Bl(pe,this,be.originalEvent,{features:je}))):ie=!1},mouseout:()=>{ie=!1}}}}if(pe==="mouseleave"||pe==="mouseout"){let ie=!1;return{layers:y,listener:N,delegates:{mousemove:Re=>{let je=y.filter(Ze=>this.getLayer(Ze));(je.length!==0?this.queryRenderedFeatures(Re.point,{layers:je}):[]).length?ie=!0:ie&&(ie=!1,N.call(this,new Bl(pe,this,Re.originalEvent)))},mouseout:Re=>{ie&&(ie=!1,N.call(this,new Bl(pe,this,Re.originalEvent)))}}}}{let ie=fe=>{let be=y.filter(je=>this.getLayer(je)),Re=be.length!==0?this.queryRenderedFeatures(fe.point,{layers:be}):[];Re.length&&(fe.features=Re,N.call(this,fe),delete fe.features)};return{layers:y,listener:N,delegates:{[pe]:ie}}}}_saveDelegatedListener(pe,y){var N;this._delegatedListeners||(this._delegatedListeners={}),(N=this._delegatedListeners)[pe]||(N[pe]=[]),this._delegatedListeners[pe].push(y)}_removeDelegatedListener(pe,y,N){var ie;if(!(!((ie=this._delegatedListeners)===null||ie===void 0)&&ie[pe]))return;let fe=this._delegatedListeners[pe];for(let be=0;bey.includes(je))){for(let je in Re.delegates)this.off(je,Re.delegates[je]);return void fe.splice(be,1)}}}on(pe,y,N){if(N===void 0)return super.on(pe,y);let ie=typeof y=="string"?[y]:y,fe=this._createDelegatedListener(pe,ie,N);this._saveDelegatedListener(pe,fe);for(let be in fe.delegates)this.on(be,fe.delegates[be]);return{unsubscribe:()=>{this._removeDelegatedListener(pe,ie,N)}}}once(pe,y,N){if(N===void 0)return super.once(pe,y);let ie=typeof y=="string"?[y]:y,fe=this._createDelegatedListener(pe,ie,N);for(let be in fe.delegates){let Re=fe.delegates[be];fe.delegates[be]=(...je)=>{this._removeDelegatedListener(pe,ie,N),Re(...je)}}this._saveDelegatedListener(pe,fe);for(let be in fe.delegates)this.once(be,fe.delegates[be]);return this}off(pe,y,N){return N===void 0?super.off(pe,y):(this._removeDelegatedListener(pe,typeof y=="string"?[y]:y,N),this)}queryRenderedFeatures(pe,y){if(!this.style)return[];let N,ie=pe instanceof e.P||Array.isArray(pe),fe=ie?pe:[[0,0],[this.transform.width,this.transform.height]];if(y||(y=(ie?{}:pe)||{}),fe instanceof e.P||typeof fe[0]=="number")N=[e.P.convert(fe)];else{let be=e.P.convert(fe[0]),Re=e.P.convert(fe[1]);N=[be,new e.P(Re.x,be.y),Re,new e.P(be.x,Re.y),be]}return this.style.queryRenderedFeatures(N,y,this.transform)}querySourceFeatures(pe,y){return this.style.querySourceFeatures(pe,y)}setStyle(pe,y){return(y=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},y)).diff!==!1&&y.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&pe?(this._diffStyle(pe,y),this):(this._localIdeographFontFamily=y.localIdeographFontFamily,this._updateStyle(pe,y))}setTransformRequest(pe){return this._requestManager.setTransformRequest(pe),this}_getUIString(pe){let y=this._locale[pe];if(y==null)throw new Error(`Missing UI string '${pe}'`);return y}_updateStyle(pe,y){var N,ie,fe;if((N=this._diffStyleRequest)===null||N===void 0||N.abort(),this._diffStyleRequest=null,y.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(pe,y));let be=this.style&&y.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!pe)),pe?(this.style=new Ku(this,y||{}),this.style.setEventedParent(this,{style:this.style}),typeof pe=="string"?this.style.loadURL(pe,y,be):this.style.loadJSON(pe,y,be),this):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),(fe=(ie=this.style)===null||ie===void 0?void 0:ie.projection)===null||fe===void 0||fe.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ku(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(pe,y){return e._(this,void 0,void 0,function*(){var N;if((N=this._diffStyleRequest)===null||N===void 0||N.abort(),typeof pe=="string"){let ie=pe;this._diffStyleRequest=new AbortController;let fe=this._diffStyleRequest;try{let be=yield this._requestManager.transformRequest(ie,"Style");if(fe.signal.aborted)return void(this._diffStyleRequest=null);let Re=yield e.k(be,fe);this._diffStyleRequest=null,this._updateDiff(Re.data,y)}catch(be){this._diffStyleRequest=null,e.$(be)||this.fire(new e.l(e.d(be)))}}else typeof pe=="object"&&(this._diffStyleRequest=null,this._updateDiff(pe,y))})}_updateDiff(pe,y){try{this.style.setState(pe,y)&&this._update(!0)}catch(N){e.w(`Unable to perform style diff: ${e.d(N).message}. Rebuilding the style from scratch.`),this._updateStyle(pe,y)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();e.w("There is no style added to the map.")}addSource(pe,y){return this._lazyInitEmptyStyle(),this.style.addSource(pe,y),this._update(!0)}isSourceLoaded(pe){var y;let N=(y=this.style)===null||y===void 0?void 0:y.tileManagers[pe];if(N!==void 0)return N.loaded();this.fire(new e.l(new Error(`There is no tile manager with ID '${pe}'`)))}setTerrain(pe){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),pe){let y=this.style.tileManagers[pe.source];if(!y)throw new Error(`cannot load terrain, because there exists no source with ID: ${pe.source}`);this.terrain===null&&y.reload();for(let N in this.style._layers){let ie=this.style._layers[N];ie.type==="hillshade"&&ie.source===pe.source&&e.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),ie.type==="color-relief"&&ie.source===pe.source&&e.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new tt(this.painter,y,pe),this.painter.renderToTexture=new Nt(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=N=>{var ie;N.dataType==="style"?this.terrain.tileManager.freeRtt():N.dataType==="source"&&N.tile&&(N.sourceId!==pe.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((ie=N.source)===null||ie===void 0?void 0:ie.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(N.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new e.n("terrain",{terrain:pe})),this}getTerrain(){var pe,y;return(y=(pe=this.terrain)===null||pe===void 0?void 0:pe.options)!==null&&y!==void 0?y:null}areTilesLoaded(){var pe;let y=(pe=this.style)===null||pe===void 0?void 0:pe.tileManagers;for(let N of Object.values(y))if(!N.areTilesLoaded())return!1;return!0}removeSource(pe){return this.style.removeSource(pe),this._update(!0)}getSource(pe){return this.style.getSource(pe)}setSourceTileLodParams(pe,y,N){if(N){let ie=this.getSource(N);if(!ie)throw new Error(`There is no source with ID "${N}", cannot set LOD parameters`);ie.calculateTileZoom=Ne(Math.max(1,pe),Math.max(1,y))}else for(let ie in this.style.tileManagers)this.style.tileManagers[ie].getSource().calculateTileZoom=Ne(Math.max(1,pe),Math.max(1,y));return this._update(!0),this}refreshTiles(pe,y){let N=this.style.tileManagers[pe];if(!N)throw new Error(`There is no tile manager with ID "${pe}", cannot refresh tile`);y===void 0?N.reload(!0):N.refreshTiles(y.map(ie=>new e.aa(ie.z,ie.x,ie.y)))}addImage(pe,y,N={}){let{pixelRatio:ie=1,sdf:fe=!1,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut}=N;if(this._lazyInitEmptyStyle(),!(y instanceof HTMLImageElement||e.b(y))){if(y.width===void 0||y.height===void 0)return this.fire(new e.l(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:ft,height:Dt,data:Gt}=y,Kt=y;return this.style.addImage(pe,{data:new e.R({width:ft,height:Dt},new Uint8Array(Gt)),pixelRatio:ie,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut,sdf:fe,version:0,userImage:Kt}),Kt.onAdd&&Kt.onAdd(this,pe),this}}{let{width:ft,height:Dt,data:Gt}=s.getImageData(y);this.style.addImage(pe,{data:new e.R({width:ft,height:Dt},Gt),pixelRatio:ie,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut,sdf:fe,version:0})}}updateImage(pe,y){let N=this.style.getImage(pe);if(!N)return this.fire(new e.l(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let ie=y instanceof HTMLImageElement||e.b(y)?s.getImageData(y):y,{width:fe,height:be,data:Re}=ie;if(fe===void 0||be===void 0)return this.fire(new e.l(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(fe!==N.data.width||be!==N.data.height)return this.fire(new e.l(new Error("The width and height of the updated image must be that same as the previous version of the image")));let je=!(y instanceof HTMLImageElement||e.b(y));return N.data.replace(Re,je),this.style.updateImage(pe,N),this}getImage(pe){return this.style.getImage(pe)}hasImage(pe){return pe?!!this.style.getImage(pe):(this.fire(new e.l(new Error("Missing required image id"))),!1)}removeImage(pe){this.style.removeImage(pe)}loadImage(pe){return e._(this,void 0,void 0,function*(){return v.getImage(yield this._requestManager.transformRequest(pe,"Image"),new AbortController)})}listImages(){return this.style.listImages()}addLayer(pe,y){return this._lazyInitEmptyStyle(),this.style.addLayer(pe,y),this._update(!0)}moveLayer(pe,y){return this.style.moveLayer(pe,y),this._update(!0)}removeLayer(pe){return this.style.removeLayer(pe),this._update(!0)}getLayer(pe){return this.style.getLayer(pe)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(pe,y,N){return this.style.setLayerZoomRange(pe,y,N),this._update(!0)}setFilter(pe,y,N={}){return this.style.setFilter(pe,y,N),this._update(!0)}getFilter(pe){return this.style.getFilter(pe)}setPaintProperty(pe,y,N,ie={}){return this.style.setPaintProperty(pe,y,N,ie),this._update(!0)}getPaintProperty(pe,y){return this.style.getPaintProperty(pe,y)}setLayoutProperty(pe,y,N,ie={}){return this.style.setLayoutProperty(pe,y,N,ie),this._update(!0)}getLayoutProperty(pe,y){return this.style.getLayoutProperty(pe,y)}setGlyphs(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(pe,y),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(pe,y,N={}){return this._lazyInitEmptyStyle(),this.style.addSprite(pe,y,N,ie=>{ie||this._update(!0)}),this}removeSprite(pe){return this._lazyInitEmptyStyle(),this.style.removeSprite(pe),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setSprite(pe,y,N=>{N||this._update(!0)}),this}setLight(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setLight(pe,y),this._update(!0)}getLight(){return this.style.getLight()}setSky(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setSky(pe,y),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(pe,y){return this.style.setFeatureState(pe,y),this._update()}removeFeatureState(pe,y){return this.style.removeFeatureState(pe,y),this._update()}getFeatureState(pe){return this.style.getFeatureState(pe)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let pe=0,y=0;return this._container&&(pe=this._container.clientWidth||400,y=this._container.clientHeight||300),[pe,y]}_setupResizeObserver(){var pe;let y=!1,N=mc(fe=>{this._trackResize&&!this._removed&&(this.resize(fe),this.redraw())},50),ie=(pe=this._ownerWindow.ResizeObserver)!==null&&pe!==void 0?pe:ResizeObserver;this._resizeObserver=new ie(fe=>{y?N(fe):y=!0}),this._resizeObserver.observe(this._container)}_resolveContainer(pe){if(typeof pe=="string"){let y=document.getElementById(pe);if(!y)throw new Error(`Container '${pe}' not found.`);return y}if(pe instanceof HTMLElement||pe&&typeof pe=="object"&&pe.nodeType===1)return pe;throw new Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let pe=this._container;pe.classList.add("maplibregl-map");let y=this._canvasContainer=g.create("div","maplibregl-canvas-container",pe);this._interactive&&y.classList.add("maplibregl-interactive"),this._canvas=g.create("canvas","maplibregl-canvas",y),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let N=this._containerDimensions(),ie=this._getClampedPixelRatio(N[0],N[1]);this._resizeCanvas(N[0],N[1],ie);let fe=this._controlContainer=g.create("div","maplibregl-control-container",pe),be=this._controlPositions={};for(let Re of["top-left","top-right","bottom-left","bottom-right"])be[Re]=g.create("div",`maplibregl-ctrl-${Re} `,fe);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(pe,y,N){this._canvas.width=Math.floor(N*pe),this._canvas.height=Math.floor(N*y),this._canvas.style.width=`${pe}px`,this._canvas.style.height=`${y}px`}_setupPainter(){let pe=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),y=null;this._canvas.addEventListener("webglcontextcreationerror",ie=>{y={requestedAttributes:pe},ie&&(y.statusMessage=ie.statusMessage,y.type=ie.type)},{once:!0});let N=null;if(N=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,pe):this._canvas.getContext("webgl2",pe)||this._canvas.getContext("webgl",pe),!N){let ie="Failed to initialize WebGL";throw y?(y.message=ie,new Error(JSON.stringify(y))):new Error(ie)}this.painter=new Su(N,this.transform)}migrateProjection(pe,y){super.migrateProjection(pe,y),this.painter.transform=pe,this.fire(new e.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(pe){var y;return!((y=this.style)===null||y===void 0)&&y._loaded?(this._styleDirty||(this._styleDirty=pe),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(pe){return this._update(),this._renderTaskQueue.add(pe)}_cancelRenderFrame(pe){this._renderTaskQueue.remove(pe)}_render(pe){var y,N,ie,fe,be,Re;let je=this._idleTriggered?this._fadeDuration:0,Ze=((y=this.style.projection)===null||y===void 0?void 0:y.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(pe),this._removed)return;let ut=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Gt=this.transform.zoom,Kt=m();this.style.zoomHistory.update(Gt,Kt);let st=new e.J(Gt,{now:Kt,fadeDuration:je,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),It=st.crossFadingFactor();It===1&&It===this._crossFadingFactor||(ut=!0,this._crossFadingFactor=It),this.style.update(st)}let ft=((N=this.style.projection)===null||N===void 0?void 0:N.transitionState)>0!==Ze;(ie=this.style.projection)===null||ie===void 0||ie.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((fe=this.style.projection)===null||fe===void 0?void 0:fe.transitionState,(be=this.style.projection)===null||be===void 0?void 0:be.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||ft)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=(Re=this.style)===null||Re===void 0?void 0:Re._updatePlacement(this.transform,this.showCollisionBoxes,je,this._crossSourceCollisions,ft),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:je,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new e.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.n("load"))),this.style&&(this.style.hasTransitions()||ut)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Dt=this._sourcesDirty||this._styleDirty||this._placementDirty;return Dt||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.n("idle")),!this._loaded||this._fullyLoaded||Dt||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var pe,y;this._hash&&this._hash.remove();for(let ie of this._controls)ie.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),(pe=this._diffStyleRequest)===null||pe===void 0||pe.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),v.removeThrottleControl(this._imageQueueHandle),(y=this._resizeObserver)===null||y===void 0||y.disconnect();let N=this.painter.context.gl.getExtension("WEBGL_lose_context");N?.loseContext&&N.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new e.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,s.frame(this._frameRequest,pe=>{this._frameRequest=null;try{this._render(pe)}catch(y){if(!e.$(y)&&!function(N){return N.message===vc}(y))throw y}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(pe){this._showTileBoundaries!==pe&&(this._showTileBoundaries=pe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(pe){this._showPadding!==pe&&(this._showPadding=pe,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(pe){this._showCollisionBoxes!==pe&&(this._showCollisionBoxes=pe,pe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(pe){this._showOverdrawInspector!==pe&&(this._showOverdrawInspector=pe,this._update())}get repaint(){return!!this._repaint}set repaint(pe){this._repaint!==pe&&(this._repaint=pe,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(pe){this._vertices=pe,this._update()}get version(){return Jt}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(pe){return this._lazyInitEmptyStyle(),this.style.setProjection(pe),this._update(!0)}},Hr={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class Vr{constructor(y,N,ie=!1){this.mousedown=be=>{this.startMove(be,g.mousePos(this.element,be)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=be=>{this.move(be,g.mousePos(this.element,be))},this.mouseup=be=>{this._rotatePitchHandler.dragEnd(be),this.offTemp()},this.touchstart=be=>{be.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=g.touchPos(this.element,be.targetTouches)[0],this.startMove(be,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=be=>{be.targetTouches.length!==1?this.reset():(this._lastPos=g.touchPos(this.element,be.targetTouches)[0],this.move(be,this._lastPos))},this.touchend=be=>{be.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=N;let fe=new Br;this._rotatePitchHandler=new mt({clickTolerance:3,move:(be,Re)=>{let je=N.getBoundingClientRect(),Ze=new e.P((je.bottom-je.top)/2,(je.right-je.left)/2);return{bearingDelta:e.cx(new e.P(be.x,Re.y),Re,Ze),pitchDelta:ie?-.5*(Re.y-be.y):void 0}},moveStateManager:fe,enable:!0,assignEvents:()=>{}}),this.map=y,N.addEventListener("mousedown",this.mousedown),N.addEventListener("touchstart",this.touchstart,{passive:!1}),N.addEventListener("touchcancel",this.reset)}startMove(y,N){this._rotatePitchHandler.dragStart(y,N),g.disableDrag()}move(y,N){let ie=this.map,{bearingDelta:fe,pitchDelta:be}=this._rotatePitchHandler.dragMove(y,N)||{};fe&&ie.setBearing(ie.getBearing()+fe),be&&ie.setPitch(ie.getPitch()+be)}off(){let y=this.element;y.removeEventListener("mousedown",this.mousedown),y.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),y.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){g.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}let ca;function Aa(pe,y,N,ie=!1){if(ie||!N.getCoveringTilesDetailsProvider().allowWorldCopies())return pe?.wrap();let fe=new e.W(pe.lng,pe.lat);if(pe=new e.W(pe.lng,pe.lat),y){let be=new e.W(pe.lng-360,pe.lat),Re=new e.W(pe.lng+360,pe.lat),je=N.locationToScreenPoint(pe).distSqr(y);N.locationToScreenPoint(be).distSqr(y)180;){let be=N.locationToScreenPoint(pe);if(be.x>=0&&be.y>=0&&be.x<=N.width&&be.y<=N.height)break;pe.lng>N.center.lng?pe.lng-=360:pe.lng+=360}return pe.lng!==fe.lng&&N.isPointOnMapSurface(N.locationToScreenPoint(pe))?pe:fe}let Yr={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function oa(pe,y,N){let ie=pe.classList;for(let fe in Yr)ie.remove(`maplibregl-${N}-anchor-${fe}`);ie.add(`maplibregl-${N}-anchor-${y}`)}class fa extends e.E{constructor(y){if(super(),this._onClick=N=>{this.fire(new e.n("click",{originalEvent:N}))},this._onKeyPress=N=>{N.code!=="Space"&&N.code!=="Enter"||this.togglePopup()},this._onMapClick=N=>{let ie=N.originalEvent.target,fe=this._element;this._popup&&(ie===fe||fe.contains(ie))&&this.togglePopup()},this._update=N=>{if(!this._map)return;let ie=this._map.loaded()&&!this._map.isMoving();(N?.type==="terrain"||N?.type==="render"&&!ie)&&this._map.once("render",this._update),this._lngLat=Aa(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let fe="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?fe=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(fe=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let be="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?be="rotateX(0deg)":this._pitchAlignment==="map"&&(be=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||N&&N.type!=="moveend"||(this._pos=this._pos.round()),this._element.style.transform=`${Yr[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${be} ${fe}`,s.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity(N?.type==="moveend")}).catch(()=>{})},this._onMove=N=>{if(!this._isDragging){let ie=this._clickTolerance||this._map._clickTolerance;this._isDragging=N.point.dist(this._pointerdownPos)>=ie}this._isDragging&&(this._pos=N.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.n("dragstart"))),this.fire(new e.n("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new e.n("dragend")),this._state="inactive"},this._addDragHandler=N=>{this._element.contains(N.originalEvent.target)&&(N.preventDefault(),this._positionDelta=N.point.sub(this._pos).add(this._offset),this._pointerdownPos=N.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=y?.anchor||"center",this._color=y?.color||"#3FB1CE",this._scale=y?.scale||1,this._draggable=y?.draggable||!1,this._clickTolerance=y?.clickTolerance||0,this._subpixelPositioning=y?.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=y?.rotation||0,this._rotationAlignment=y?.rotationAlignment||"auto",this._pitchAlignment=y?.pitchAlignment&&y.pitchAlignment!=="auto"?y.pitchAlignment:this._rotationAlignment,this.setOpacity(y?.opacity,y?.opacityWhenCovered),y?.element)this._element=y.element,this._offset=e.P.convert(y?.offset||[0,0]);else{this._defaultMarker=!0,this._element=g.create("div");let N=g.createNS("http://www.w3.org/2000/svg","svg"),ie=41,fe=27;N.setAttributeNS(null,"display","block"),N.setAttributeNS(null,"height",`${ie}px`),N.setAttributeNS(null,"width",`${fe}px`),N.setAttributeNS(null,"viewBox",`0 0 ${fe} ${ie}`);let be=g.createNS("http://www.w3.org/2000/svg","g");be.setAttributeNS(null,"stroke","none"),be.setAttributeNS(null,"stroke-width","1"),be.setAttributeNS(null,"fill","none"),be.setAttributeNS(null,"fill-rule","evenodd");let Re=g.createNS("http://www.w3.org/2000/svg","g");Re.setAttributeNS(null,"fill-rule","nonzero");let je=g.createNS("http://www.w3.org/2000/svg","g");je.setAttributeNS(null,"transform","translate(3.0, 29.0)"),je.setAttributeNS(null,"fill","#000000");let Ze=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let ir of Ze){let dr=g.createNS("http://www.w3.org/2000/svg","ellipse");dr.setAttributeNS(null,"opacity","0.04"),dr.setAttributeNS(null,"cx","10.5"),dr.setAttributeNS(null,"cy","5.80029008"),dr.setAttributeNS(null,"rx",ir.rx),dr.setAttributeNS(null,"ry",ir.ry),je.appendChild(dr)}let ut=g.createNS("http://www.w3.org/2000/svg","g");ut.setAttributeNS(null,"fill",this._color);let ft=g.createNS("http://www.w3.org/2000/svg","path");ft.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),ut.appendChild(ft);let Dt=g.createNS("http://www.w3.org/2000/svg","g");Dt.setAttributeNS(null,"opacity","0.25"),Dt.setAttributeNS(null,"fill","#000000");let Gt=g.createNS("http://www.w3.org/2000/svg","path");Gt.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Dt.appendChild(Gt);let Kt=g.createNS("http://www.w3.org/2000/svg","g");Kt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Kt.setAttributeNS(null,"fill","#FFFFFF");let st=g.createNS("http://www.w3.org/2000/svg","g");st.setAttributeNS(null,"transform","translate(8.0, 8.0)");let It=g.createNS("http://www.w3.org/2000/svg","circle");It.setAttributeNS(null,"fill","#000000"),It.setAttributeNS(null,"opacity","0.25"),It.setAttributeNS(null,"cx","5.5"),It.setAttributeNS(null,"cy","5.5"),It.setAttributeNS(null,"r","5.4999962");let Ut=g.createNS("http://www.w3.org/2000/svg","circle");Ut.setAttributeNS(null,"fill","#FFFFFF"),Ut.setAttributeNS(null,"cx","5.5"),Ut.setAttributeNS(null,"cy","5.5"),Ut.setAttributeNS(null,"r","5.4999962"),st.appendChild(It),st.appendChild(Ut),Re.appendChild(je),Re.appendChild(ut),Re.appendChild(Dt),Re.appendChild(Kt),Re.appendChild(st),N.appendChild(Re),N.setAttributeNS(null,"height",ie*this._scale+"px"),N.setAttributeNS(null,"width",fe*this._scale+"px"),this._element.appendChild(N),this._offset=e.P.convert(y?.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",N=>{N.preventDefault()}),this._element.addEventListener("mousedown",N=>{N.preventDefault()}),oa(this._element,this._anchor,"marker"),y?.className)for(let N of y.className.split(" "))this._element.classList.add(N);this._popup=null}addTo(y){return this.remove(),this._map=y,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",y._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),y.getCanvasContainer().appendChild(this._element),y.on("move",this._update),y.on("moveend",this._update),y.on("terrain",this._update),y.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(y){return this._lngLat=e.W.convert(y),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(y){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),y){if(!("offset"in y.options)){let fe=Math.abs(13.5)/Math.SQRT2;y.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[fe,-1*(38.1-13.5+fe)],"bottom-right":[-fe,-1*(38.1-13.5+fe)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=y,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(y){return this._subpixelPositioning=y,this}getPopup(){return this._popup}togglePopup(){let y=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:y?(y.isOpen()?y.remove():(y.setLngLat(this._lngLat),y.addTo(this._map)),this):this}_updateOpacity(y=!1){var N,ie;let fe=(N=this._map)===null||N===void 0?void 0:N.terrain,be=this._map.transform.isLocationOccluded(this._lngLat);if(!fe||be){let Kt=be?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==Kt&&(this._element.style.opacity=Kt,this._element.classList.toggle("maplibregl-marker-covered",be)))}if(y)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let Re=this._map,je=Re.terrain.depthAtPoint(this._pos),Ze=Re.terrain.getElevationForLngLat(this._lngLat,Re.transform);if(Re.transform.lngLatToCameraDepth(this._lngLat,Ze)-je<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let ut=-this._offset.y/Re.transform.pixelsPerMeter,ft=Math.sin(Re.getPitch()*Math.PI/180)*ut,Dt=Re.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Gt=Re.transform.lngLatToCameraDepth(this._lngLat,Ze+ft)-Dt>.006;!((ie=this._popup)===null||ie===void 0)&&ie.isOpen()&&Gt&&this._popup.remove(),this._element.style.opacity=Gt?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",Gt)}getOffset(){return this._offset}setOffset(y){return this._offset=e.P.convert(y),this._update(),this}addClassName(y){this._element.classList.add(y)}removeClassName(y){this._element.classList.remove(y)}toggleClassName(y){return this._element.classList.toggle(y)}setDraggable(y){return this._draggable=!!y,this._map&&(y?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(y){return this._rotation=y||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(y){return this._rotationAlignment=y||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(y){return this._pitchAlignment=y&&y!=="auto"?y:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(y,N){return(this._opacity===void 0||y===void 0&&N===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),y!==void 0&&(this._opacity=String(y)),N!==void 0&&(this._opacityWhenCovered=String(N)),this._map&&this._updateOpacity(!0),this}}let Ea={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Ma=0,sa=!1,hn={maxWidth:100,unit:"metric"};function Tn(pe,y,N){let ie=N?.maxWidth||100,fe=pe._container.clientHeight/2,be=pe._container.clientWidth/2,Re=pe.unproject([be-ie/2,fe]),je=pe.unproject([be+ie/2,fe]),Ze=Math.round(pe.project(je).x-pe.project(Re).x),ut=Math.min(ie,Ze,pe._container.clientWidth),ft=Re.distanceTo(je);if(N?.unit==="imperial"){let Dt=3.2808*ft;Dt>5280?zn(y,ut,Dt/5280,pe._getUIString("ScaleControl.Miles")):zn(y,ut,Dt,pe._getUIString("ScaleControl.Feet"))}else N?.unit==="nautical"?zn(y,ut,ft/1852,pe._getUIString("ScaleControl.NauticalMiles")):ft>=1e3?zn(y,ut,ft/1e3,pe._getUIString("ScaleControl.Kilometers")):zn(y,ut,ft,pe._getUIString("ScaleControl.Meters"))}function zn(pe,y,N,ie){let fe=function(be){let Re=Math.pow(10,`${Math.floor(be)}`.length-1),je=be/Re;return je=je>=10?10:je>=5?5:je>=3?3:je>=2?2:je>=1?1:function(Ze){let ut=Math.pow(10,Math.ceil(-Math.log(Ze)/Math.LN10));return Math.round(Ze*ut)/ut}(je),Re*je}(N);pe.style.width=y*(fe/N)+"px",pe.innerHTML=`${fe} ${ie}`}let $n={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},xi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function di(pe){if(pe){if(typeof pe=="number"){let y=Math.round(Math.abs(pe)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,pe),"top-left":new e.P(y,y),"top-right":new e.P(-y,y),bottom:new e.P(0,-pe),"bottom-left":new e.P(y,-y),"bottom-right":new e.P(-y,-y),left:new e.P(pe,0),right:new e.P(-pe,0)}}if(pe instanceof e.P||Array.isArray(pe)){let y=e.P.convert(pe);return{center:y,top:y,"top-left":y,"top-right":y,bottom:y,"bottom-left":y,"bottom-right":y,left:y,right:y}}return{center:e.P.convert(pe.center||[0,0]),top:e.P.convert(pe.top||[0,0]),"top-left":e.P.convert(pe["top-left"]||[0,0]),"top-right":e.P.convert(pe["top-right"]||[0,0]),bottom:e.P.convert(pe.bottom||[0,0]),"bottom-left":e.P.convert(pe["bottom-left"]||[0,0]),"bottom-right":e.P.convert(pe["bottom-right"]||[0,0]),left:e.P.convert(pe.left||[0,0]),right:e.P.convert(pe.right||[0,0])}}return di(new e.P(0,0))}let uo=t;l.AJAXError=e.cG,l.EXTENT=e.a6,l.Event=e.n,l.Evented=e.E,l.LngLat=e.W,l.MercatorCoordinate=e.a7,l.Point=e.P,l.addProtocol=e.cH,l.config=e.c,l.removeProtocol=e.cI,l.AttributionControl=ll,l.BoxZoomHandler=Nl,l.CanvasSource=ce,l.CooperativeGesturesHandler=wi,l.DoubleClickZoomHandler=ys,l.DragPanHandler=Hs,l.DragRotateHandler=Cu,l.EdgeInsets=oo,l.FullscreenControl=class extends e.E{constructor(pe={}){var y;super(),this._onFullscreenChange=()=>{var N;let ie=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;!((N=ie?.shadowRoot)===null||N===void 0)&&N.fullscreenElement;)ie=ie.shadowRoot.fullscreenElement;ie===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(y=pe.pseudo)!==null&&y!==void 0&&y,pe?.container&&(pe.container instanceof HTMLElement?this._container=pe.container:e.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(pe){return this._map=pe,this._container||(this._container=this._map.getContainer()),this._controlContainer=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let pe=this._fullscreenButton=g.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);g.create("span","maplibregl-ctrl-icon",pe).setAttribute("aria-hidden","true"),pe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let pe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",pe),this._fullscreenButton.title=pe}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new e.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},l.GeoJSONSource=Ge,l.GeolocateControl=class extends e.E{constructor(pe){super(),this._onSuccess=y=>{if(this._map){if(this._isOutOfMapMaxBounds(y))return this._setErrorState(),this.fire(new e.n("outofmaxbounds",y)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=y,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(y),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(y),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.n("geolocate",y)),this._finish()}},this._updateCamera=y=>{let N=new e.W(y.coords.longitude,y.coords.latitude),ie=y.coords.accuracy,fe=this._map.getBearing(),be=e.e({bearing:fe},this.options.fitBoundsOptions),Re=q.fromLngLat(N,ie);this._map.fitBounds(Re,be,{geolocateSource:!0})},this._updateMarker=y=>{if(y){let N=new e.W(y.coords.longitude,y.coords.latitude);this._accuracyCircleMarker.setLngLat(N).addTo(this._map),this._userLocationDotMarker.setLngLat(N).addTo(this._map),this._accuracy=y.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=y=>{if(this._map){if(y.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let N=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(y.code===3&&sa)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.n("error",y)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=y=>{if(!this._map)return;let N=y?.[0]instanceof ResizeObserverEntry;y.geolocateSource||this._watchState!=="ACTIVE_LOCK"||N||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.n("trackuserlocationend")),this.fire(new e.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",y=>{y.preventDefault()}),this._geolocateButton=g.create("button","maplibregl-ctrl-geolocate",this._container),g.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=y=>{if(this._map){if(y===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let N=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N)}else{let N=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=g.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new fa({element:this._dotElement}),this._circleElement=g.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new fa({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=e.e({},Ea,pe)}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(y=!1){if(ca!==void 0&&!y)return ca;if(window.navigator.permissions===void 0)return ca=!!window.navigator.geolocation,ca;try{ca=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{ca=!!window.navigator.geolocation}return ca})}().then(y=>this._finishSetupUI(y)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,Ma=0,sa=!1}_isOutOfMapMaxBounds(pe){let y=this._map.getMaxBounds(),N=pe.coords;return y&&(N.longitudey.getEast()||N.latitudey.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let pe=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&pe))return;let y=this._map.project(pe),N=this._map.unproject([y.x+100,y.y]),ie=pe.distanceTo(N)/100,fe=2*this._accuracy/ie;this._circleElement.style.width=`${fe.toFixed(2)}px`,this._circleElement.style.height=`${fe.toFixed(2)}px`}trigger(){if(!this._setup)return e.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ma--,sa=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new e.n("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.n("trackuserlocationstart")),this.fire(new e.n("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let pe;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ma++,Ma>1?(pe={maximumAge:6e5,timeout:0},sa=!0):(pe=this.options.positionOptions,sa=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,pe)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},l.GlobeControl=class{constructor(){this._toggleProjection=()=>{var pe;let y=(pe=this._map.getProjection())===null||pe===void 0?void 0:pe.type;this._map.setProjection(y!=="mercator"&&y?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var pe;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((pe=this._map.getProjection())===null||pe===void 0?void 0:pe.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=g.create("button","maplibregl-ctrl-globe",this._container),g.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},l.Hash=Jc,l.ImageSource=ke,l.KeyboardHandler=Ji,l.LngLatBounds=q,l.LogoControl=ef,l.Map=gr,l.MapLibreMap=gr,l.MapMouseEvent=Bl,l.MapTouchEvent=Wu,l.MapWheelEvent=wf,l.Marker=fa,l.NavigationControl=class{constructor(pe){this._updateZoomButtons=()=>{let y=this._map.getZoom(),N=y===this._map.getMaxZoom(),ie=y===this._map.getMinZoom();this._zoomInButton.disabled=N,this._zoomOutButton.disabled=ie,this._zoomInButton.setAttribute("aria-disabled",N.toString()),this._zoomOutButton.setAttribute("aria-disabled",ie.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(y,N)=>{let ie=this._map._getUIString(`NavigationControl.${N}`);y.title=ie,y.setAttribute("aria-label",ie)},this.options=e.e({},Hr,pe),this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",y=>y.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",y=>this._map.zoomIn({},{originalEvent:y})),g.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",y=>this._map.zoomOut({},{originalEvent:y})),g.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",y=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:y}):this._map.resetNorth({},{originalEvent:y})}),this._compassIcon=g.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(pe){return this._map=pe,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Vr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(pe,y){let N=g.create("button",pe,this._container);return N.type="button",N.addEventListener("click",y),N}},l.Popup=class extends e.E{constructor(pe){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.n("close"))),this),this._update=y=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=g.create("div","maplibregl-popup",this._map.getContainer()),this._tip=g.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let je of this.options.className.split(" "))this._container.classList.add(je);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}let N;if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Aa(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),y&&"point"in y&&y.point&&(N=y.point),this._trackPointer&&!N)return;let ie=this._flatPos=this._pos=this._trackPointer&&N?N:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&N?N:this._map.transform.locationToScreenPoint(this._lngLat));let fe=this.options.anchor,be=di(this.options.offset);if(!fe){let je=this._container.offsetWidth,Ze=this._container.offsetHeight,ut=function(Dt){var Gt,Kt,st,It;return Dt?{top:(Gt=Dt.top)!==null&&Gt!==void 0?Gt:0,right:(Kt=Dt.right)!==null&&Kt!==void 0?Kt:0,bottom:(st=Dt.bottom)!==null&&st!==void 0?st:0,left:(It=Dt.left)!==null&&It!==void 0?It:0}:{top:0,right:0,bottom:0,left:0}}(this.options.padding),ft;ft=ie.y+be.bottom.ythis._map.transform.height-Ze-ut.bottom?["bottom"]:[],ie.xthis._map.transform.width-je/2-ut.right&&ft.push("right"),fe=ft.length===0?"bottom":ft.join("-")}let Re=ie.add(be[fe]);this.options.subpixelPositioning||(Re=Re.round()),this._container.style.transform=`${Yr[fe]} translate(${Re.x}px,${Re.y}px)`,oa(this._container,fe,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=e.e(Object.create($n),pe)}addTo(pe){return this._map&&this.remove(),this._map=pe,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new e.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(pe){return this._lngLat=e.W.convert(pe),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(pe){return this.setDOMContent(document.createTextNode(pe))}setHTML(pe){let y=document.createDocumentFragment(),N=document.createElement("body"),ie;for(N.innerHTML=pe;ie=N.firstChild,ie;)y.appendChild(ie);return this.setDOMContent(y)}getMaxWidth(){var pe;return(pe=this._container)===null||pe===void 0?void 0:pe.style.maxWidth}setMaxWidth(pe){return this.options.maxWidth=pe,this._update(),this}setDOMContent(pe){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=g.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(pe),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(pe){return this._container&&this._container.classList.add(pe),this}removeClassName(pe){return this._container&&this._container.classList.remove(pe),this}setOffset(pe){return this.options.offset=pe,this._update(),this}toggleClassName(pe){if(this._container)return this._container.classList.toggle(pe)}setSubpixelPositioning(pe){this.options.subpixelPositioning=pe}setPadding(pe){this.options.padding=pe,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=g.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let pe=this._container.querySelector(xi);pe&&pe.focus()}},l.RasterDEMTileSource=he,l.RasterTileSource=ae,l.ScaleControl=class{constructor(pe){this._onMove=()=>{Tn(this._map,this._container,this.options)},this.setUnit=y=>{this.options.unit=y,Tn(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},hn),pe)}getDefaultPosition(){return"bottom-left"}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-scale",pe.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},l.ScrollZoomHandler=vo,l.Style=Ku,l.TerrainControl=class{constructor(pe){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=pe}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=g.create("button","maplibregl-ctrl-terrain",this._container),g.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},l.TwoFingersTouchPitchHandler=Si,l.TwoFingersTouchRotateHandler=wn,l.TwoFingersTouchZoomHandler=Ba,l.TwoFingersTouchZoomRotateHandler=hi,l.VectorTileSource=ee,l.VideoSource=_e,l.addSourceType=(pe,y)=>e._(void 0,void 0,void 0,function*(){if(le(pe))throw new Error(`A source type called "${pe}" already exists.`);((N,ie)=>{ve[N]=ie})(pe,y)}),l.clearPrewarmedResources=function(){let pe=$;pe&&(pe.isPreloaded()&&pe.numActive()===1?(pe.release(P),$=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},l.createTileMesh=Ss,l.getGlobalDispatcher=se,l.getMaxParallelImageRequests=function(){return e.c.MAX_PARALLEL_IMAGE_REQUESTS},l.getRTLTextPluginStatus=function(){return Ye().getRTLTextPluginStatus()},l.getVersion=function(){return uo},l.getWorkerCount=function(){return j.workerCount},l.getWorkerUrl=function(){return e.c.WORKER_URL},l.importScriptInWorkers=function(pe){return se().broadcast("IS",pe)},l.isTimeFrozen=function(){return c.isFrozen()},l.now=m,l.prewarm=function(){re().acquire(P)},l.restoreNow=function(){c.restoreNow()},l.setMaxParallelImageRequests=function(pe){e.c.MAX_PARALLEL_IMAGE_REQUESTS=pe},l.setNow=function(pe){c.setNow(pe)},l.setRTLTextPlugin=function(pe,y){return Ye().setRTLTextPlugin(pe,y)},l.setWorkerCount=function(pe){j.workerCount=pe},l.setWorkerUrl=function(pe){e.c.WORKER_URL=pe}});var k=p;return k})}}),rV=ze({"src/plots/map/layers.js"(J,V){"use strict";var p=Nr(),b=Cs().sanitizeHTML,E=kM(),k=Av();function l(a,o){this.subplot=a,this.uid=a.uid+"-"+o,this.index=o,this.idSource="source-"+this.uid,this.idLayer=k.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=l.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=t(o)},e.needsNewImage=function(a){var o=this.subplot.map;return o.getSource(this.idSource)&&this.sourceType==="image"&&a.sourcetype==="image"&&(this.source!==a.source||JSON.stringify(this.coordinates)!==JSON.stringify(a.coordinates))},e.needsNewSource=function(a){return this.sourceType!==a.sourcetype||JSON.stringify(this.source)!==JSON.stringify(a.source)||this.layerType!==a.type},e.needsNewLayer=function(a){return this.layerType!==a.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(a){var o=this.subplot.map;o.getSource(this.idSource).updateImage({url:a.source,coordinates:a.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},e.updateSource=function(a){var o=this.subplot.map;if(o.getSource(this.idSource)&&o.removeSource(this.idSource),this.sourceType=a.sourcetype,this.source=a.source,!!t(a)){var s=r(a);o.addSource(this.idSource,s)}},e.findFollowingMapLayerId=function(a){if(a==="traces")for(var o=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function n(a){var o={},s={};switch(a.type){case"circle":p.extendFlat(s,{"circle-radius":a.circle.radius,"circle-color":a.color,"circle-opacity":a.opacity});break;case"line":p.extendFlat(s,{"line-width":a.line.width,"line-color":a.color,"line-opacity":a.opacity,"line-dasharray":a.line.dash});break;case"fill":p.extendFlat(s,{"fill-color":a.color,"fill-outline-color":a.fill.outlinecolor,"fill-opacity":a.opacity});break;case"symbol":var c=a.symbol,m=E(c.textposition,c.iconsize);p.extendFlat(o,{"icon-image":c.icon,"icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":m.anchor,"text-offset":m.offset,"symbol-placement":c.placement}),p.extendFlat(s,{"icon-color":a.color,"text-color":c.textfont.color,"text-opacity":a.opacity});break;case"raster":p.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":a.opacity});break}return{layout:o,paint:s}}function r(a){var o=a.sourcetype,s=a.source,c={type:o},m;return o==="geojson"?m="data":o==="vector"?m=typeof s=="string"?"url":"tiles":o==="raster"?(m="tiles",c.tileSize=256):o==="image"&&(m="url",c.coordinates=a.coordinates),c[m]=s,a.sourceattribution&&(c.attribution=b(a.sourceattribution)),c}V.exports=function(o,s,c){var m=new l(o,s);return m.update(c),m}}}),aV=ze({"src/plots/map/map.js"(J,V){"use strict";var p=tV(),b=Nr(),E=hp(),k=mi(),l=Gi(),e=_h(),t=Zl(),n=Fd(),r=n.drawMode,a=n.selectMode,o=_c().prepSelect,s=_c().clearOutline,c=_c().clearSelectionsCache,m=_c().selectOnClick,h=Av(),v=rV();function g(T,f){this.id=f,this.gd=T;var u=T._fullLayout,A=T._context;this.container=u._glcontainer.node(),this.isStatic=A.staticPlot,this.uid=u._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(u),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var i=g.prototype;i.plot=function(T,f,u){var A=this,x;A.map?x=new Promise(function(z,I){A.updateMap(T,f,z,I)}):x=new Promise(function(z,I){A.createMap(T,f,z,I)}),u.push(x)},i.createMap=function(T,f,u,A){var x=this,z=f[x.id],I=x.styleObj=C(z.style),O=z.bounds,D=O?[[O.west,O.south],[O.east,O.north]]:null;let B={container:x.div,style:I.style,center:_(z.center),zoom:z.zoom,bearing:z.bearing,pitch:z.pitch,maxBounds:D,interactive:!x.isStatic,canvasContextAttributes:{preserveDrawingBuffer:x.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},F=z._fitBounds;F&&(B.bounds=[[F.west,F.south],[F.east,F.north]],B.fitBoundsOptions={padding:h.fitBoundsPadding});let P=x.map=new p.Map(B).addControl(new p.AttributionControl({compact:!0}));var j={};P.on("styleimagemissing",function($){var Q=$.id;if(!j[Q]&&/^[a-zA-Z0-9-]+$/.test(Q)){j[Q]=!0;var re=new Image(15,15);re.onload=function(){P.addImage(Q,re,{sdf:!0})},re.crossOrigin="Anonymous",re.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+Q+".svg"}}),P.setTransformRequest(function($){return $=$.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),$=$.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),$=$.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:$}}),P._canvas.style.left="0px",P._canvas.style.top="0px",x.rejectOnError(A),x.isStatic||x.initFx(T,f);var U=[];U.push(new Promise(function($){P.once("load",$)})),U=U.concat(E.fetchTraceGeoData(T)),Promise.all(U).then(function(){F&&w(x,z),S(x,z),x.fillBelowLookup(T,f),x.updateData(T),x.updateLayout(f),x.resolveOnRender(u)}).catch(A)},i.updateMap=function(T,f,u,A){var x=this,z=x.map,I=f[this.id];x.rejectOnError(A);var O=[],D=C(I.style);JSON.stringify(x.styleObj)!==JSON.stringify(D)&&(x.styleObj=D,z.setStyle(D.style),x.traceHash={},O.push(new Promise(function(B){z.once("styledata",B)}))),O=O.concat(E.fetchTraceGeoData(T)),Promise.all(O).then(function(){x.fillBelowLookup(T,f),x.updateData(T);let B=I._fitBounds;B&&(z.fitBounds([[B.west,B.south],[B.east,B.north]],{padding:h.fitBoundsPadding,animate:!1}),w(x,I),S(x,I)),x.updateLayout(f),x.resolveOnRender(u)}).catch(A)};function w(T,f){let{center:u,zoom:A}=T.getView();f._input.center=f.center=u,f._input.zoom=f.zoom=A,f._input._fitView={center:Li({},u),zoom:A}}function S(T,f){let u=T.getView();T.viewInitial={center:b.extendFlat({},u.center),bearing:f.bearing,pitch:f.pitch,zoom:u.zoom}}i.fillBelowLookup=function(T,f){var u=f[this.id],A=u.layers,x,z,I=this.belowLookup={},O=!1;for(x=0;x1)for(x=0;x<$.length;x++)j=$[x],j.indexOf("trace-")===0?(U=j.split("trace-")[1],this.traceHash[U]&&(this.traceHash[U].below=null)):j.indexOf("layout-")===0&&(U=j.split("layout-")[1],this.layerList[U]&&(this.layerList[U].below=null))}};var M={choroplethmap:0,densitymap:1,scattermap:2};i.updateData=function(T){var f=this.traceHash,u,A,x,z,I=T.slice().sort(function(P,j){return M[P[0].trace.type]-M[j[0].trace.type]});for(x=0;xf.project(A).x,_subplot:f},f.yaxis={_id:"y",c2p:A=>f.project(A).y,_subplot:f},f.updateFramework(T),f.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},l.setConvert(f.mockAxis,T)},i.initFx=function(T,f){var u=this,A=u.gd,x=u.map;x.on("moveend",function(O){if(u.map){var D=A._fullLayout;if(O.originalEvent||u.wheeling){var B=D[u.id];k.call("_storeDirectGUIEdit",A.layout,D._preGUI,u.getViewEdits(B));var F=u.getView();B._input.center=B.center=F.center,B._input.zoom=B.zoom=F.zoom,B._input.bearing=B.bearing=F.bearing,B._input.pitch=B.pitch=F.pitch,A.emit("plotly_relayout",u.getViewEditsWithDerived(F))}O.originalEvent&&O.originalEvent.type==="mouseup"?u.dragging=!1:u.wheeling&&(u.wheeling=!1),D&&D._rehover&&D._rehover()}}),x.on("wheel",function(){u.wheeling=!0}),x.on("mousemove",function(O){var D=u.div.getBoundingClientRect(),B=[O.originalEvent.offsetX,O.originalEvent.offsetY];O.target.getBoundingClientRect=function(){return D},u.xaxis.p2c=function(){return x.unproject(B).lng},u.yaxis.p2c=function(){return x.unproject(B).lat},A._fullLayout._rehover=function(){A._fullLayout._hoversubplot===u.id&&A._fullLayout[u.id]&&t.hover(A,O,u.id)},t.hover(A,O,u.id),A._fullLayout._hoversubplot=u.id});function z(){t.loneUnhover(f._hoverlayer)}x.on("dragstart",function(){u.dragging=!0,z()}),x.on("zoomstart",z),x.on("mouseout",function(){A._fullLayout._hoversubplot=null});function I(){var O=u.getView();A.emit("plotly_relayouting",u.getViewEditsWithDerived(O))}x.on("drag",I),x.on("zoom",I),x.on("dblclick",function(){var O=A._fullLayout[u.id];k.call("_storeDirectGUIEdit",A.layout,A._fullLayout._preGUI,u.getViewEdits(O));var D=u.viewInitial;x.setCenter(_(D.center)),x.setZoom(D.zoom),x.setBearing(D.bearing),x.setPitch(D.pitch);var B=u.getView();O._input.center=O.center=B.center,O._input.zoom=O.zoom=B.zoom,O._input.bearing=O.bearing=B.bearing,O._input.pitch=O.pitch=B.pitch,A.emit("plotly_doubleclick",null),A.emit("plotly_relayout",u.getViewEditsWithDerived(B))}),u.clearOutline=function(){c(u.dragOptions),s(u.dragOptions.gd)},u.onClickInPanFn=function(O){return function(D){var B=A._fullLayout.clickmode;B.indexOf("select")>-1&&m(D.originalEvent,A,[u.xaxis],[u.yaxis],u.id,O),B.indexOf("event")>-1&&t.click(A,D.originalEvent)}}},i.updateFx=function(T){var f=this,u=f.map,A=f.gd;if(f.isStatic)return;function x(D){var B=f.map.unproject(D);return[B.lng,B.lat]}var z=T.dragmode,I;I=function(D,B){if(B.isRect){var F=D.range={};F[f.id]=[x([B.xmin,B.ymin]),x([B.xmax,B.ymax])]}else{var P=D.lassoPoints={};P[f.id]=B.map(x)}};var O=f.dragOptions;f.dragOptions=b.extendDeep(O||{},{dragmode:T.dragmode,element:f.div,gd:A,plotinfo:{id:f.id,domain:T[f.id].domain,xaxis:f.xaxis,yaxis:f.yaxis,fillRangeItems:I},xaxes:[f.xaxis],yaxes:[f.yaxis],subplot:f.id}),u.off("click",f.onClickInPanHandler),a(z)||r(z)?(u.dragPan.disable(),u.on("zoomstart",f.clearOutline),f.dragOptions.prepFn=function(D,B,F){o(D,B,F,f.dragOptions,z)},e.init(f.dragOptions)):(u.dragPan.enable(),u.off("zoomstart",f.clearOutline),f.div.onmousedown=null,f.div.ontouchstart=null,f.div.removeEventListener("touchstart",f.div._ontouchstart),f.onClickInPanHandler=f.onClickInPanFn(f.dragOptions),u.on("click",f.onClickInPanHandler))},i.updateFramework=function(T){var f=T[this.id].domain,u=T._size,A=this.div.style;A.width=u.w*(f.x[1]-f.x[0])+"px",A.height=u.h*(f.y[1]-f.y[0])+"px",A.left=u.l+f.x[0]*u.w+"px",A.top=u.t+(1-f.y[1])*u.h+"px",this.xaxis._offset=u.l+f.x[0]*u.w,this.xaxis._length=u.w*(f.x[1]-f.x[0]),this.yaxis._offset=u.t+(1-f.y[1])*u.h,this.yaxis._length=u.h*(f.y[1]-f.y[0])},i.updateLayers=function(T){var f=T[this.id],u=f.layers,A=this.layerList,x;if(u.length!==A.length){for(x=0;xnV});function nV(J,V){let p=[];for(let t of J){if(t.subplot!==V||t.visible!==!0)continue;if(t.type==="choroplethmap")return null;let{lat:n,lon:r}=t;if(!r||!n)continue;let a=Math.min(r.length,n.length);for(let o=0;of/2){var u=M.split("|").join("
");_.text(u).attr("data-unformatted",u).call(t.convertToTspans,a),T=e.bBox(_.node())}_.attr("transform",p(-3,-T.height+8)),C.insert("rect",".static-attribution").attr({x:-T.width-6,y:-T.height-3,width:T.width+6,height:T.height+3,fill:"rgba(255, 255, 255, 0.75)"});var A=1;T.width+6>f&&(A=f/(T.width+6));var x=[c.l+c.w*v.x[1],c.t+c.h*(1-v.y[0])];C.attr("transform",p(x[0],x[1])+b(A))}},J.updateFx=function(a){for(var o=a._fullLayout,s=o._subplots[r],c=0;c=0;n--)e.removeLayer(t[n][1])},l.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},V.exports=function(t,n){var r=n[0].trace,a=new k(t,r.uid),o=a.sourceId,s=p(n),c=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,c),n[0].trace._glTrace=a,a}}}),fV=ze({"src/traces/choroplethmap/index.js"(J,V){"use strict";V.exports={attributes:PM(),supplyDefaults:uV(),colorbar:ag(),calc:IA(),plot:cV(),hoverPoints:DA(),eventData:FA(),selectPoints:zA(),styleOnSelect:function(p,b){if(b){var E=b[0].trace;E._glTrace.updateOnSelect(b)}},getBelow:function(p,b){for(var E=b.getMapLayers(),k=E.length-2;k>=0;k--){var l=E[k].id;if(typeof l=="string"&&l.indexOf("water")===0){for(var e=k+1;e0?+v[m]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:S},properties:M})}}var _=k.extractOpts(r),T=_.reversescale?k.flipScale(_.colorscale):_.colorscale,f=T[0][1],u=E.opacity(f)<1?f:E.addOpacity(f,0),A=["interpolate",["linear"],["heatmap-density"],0,u];for(m=1;m=0;t--)l.removeLayer(e[t][1])},k.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},V.exports=function(e,t){var n=t[0].trace,r=new E(e,n.uid),a=r.sourceId,o=p(t),s=r.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(a,{type:"geojson",data:o.geojson}),r._addLayers(o,s),r}}}),gV=ze({"src/traces/densitymap/hover.js"(J,V){"use strict";var p=Gi(),b=V2().hoverPoints,E=V2().getExtraText;V.exports=function(l,e,t){var n=b(l,e,t);if(n){var r=n[0],a=r.cd,o=a[0].trace,s=a[r.index];if(delete r.color,"z"in s){var c=r.subplot.mockAxis;r.z=s.z,r.zLabel=p.tickText(c,c.c2l(s.z),"hover").text}return r.extraText=E(o,s,a[0].t.labels),[r]}}}}),yV=ze({"src/traces/densitymap/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.lon=E.lon,b.lat=E.lat,b.z=E.z,b}}}),_V=ze({"src/traces/densitymap/index.js"(J,V){"use strict";V.exports={attributes:IM(),supplyDefaults:dV(),colorbar:ag(),formatLabels:EM(),calc:pV(),plot:mV(),hoverPoints:gV(),eventData:yV(),getBelow:function(p,b){for(var E=b.getMapLayers(),k=0;kw[z%w.length];i("color",g.label.map((z,I)=>E.addOpacity(S(I),.8))),i("customdata");var M=a.link||{},C=e.newContainer(o,"link");function _(z,I){return p.coerce(M,C,b.link,z,I)}_("label"),_("arrowlen"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",a.hoverinfo),l(M,C,_,h),_("hovertemplate"),_("sort");var T=E.luminosity(c.paper_bgcolor)<.333,f=T?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",u=_("color",f);function A(z){if(!E.isValid(z))return z;let I=E.opacity(z);return I<=.8?E.addOpacity(z,I+.2):T?E.brighten(z,10):E.adjustLightness(z,-10)}_("hovercolor",Array.isArray(u)?u.map(A):A(u)),_("customdata"),t(M,C,{name:"colorscales",handleItemDefaults:n}),k(o,c,m),m("orientation"),m("direction"),m("valueformat"),m("valuesuffix");let x=g.x.length&&g.y.length?"freeform":void 0;m("arrangement",x),p.coerceFont(m,"textfont",c.font,{autoShadowDflt:!0}),o._length=null};function n(r,a){function o(s,c){return p.coerce(r,a,b.link.colorscales,s,c)}o("label"),o("cmin"),o("cmax"),o("colorscale")}}}),FM=ze({"node_modules/strongly-connected-components/scc.js"(J,V){"use strict";V.exports=p;function p(b){for(var E=b.length,k=new Array(E),l=new Array(E),e=new Array(E),t=new Array(E),n=new Array(E),r=new Array(E),a=0;a0;){i=S[S.length-1];var M=b[i];if(t[i]=0&&r[i].push(n[_])}t[i]=C}else{if(l[i]===k[i]){for(var T=[],f=[],u=0,C=w.length-1;C>=0;--C){var A=w[C];if(e[A]=!1,T.push(A),f.push(r[A]),u+=r[A].length,n[A]=s.length,A===i){w.length=C;break}}s.push(T);for(var x=new Array(u),C=0;C_&&(_=o.source[w]),o.target[w]>_&&(_=o.target[w]);var T=_+1;r.node._count=T;var f,u=r.node.groups,A={};for(w=0;w0&&l(B,T)&&l(F,T)&&!(A.hasOwnProperty(B)&&A.hasOwnProperty(F)&&A[B]===A[F])){A.hasOwnProperty(F)&&(F=A[F]),A.hasOwnProperty(B)&&(B=A[B]),B=+B,F=+F,v[B]=v[F]=!0;var P="";o.label&&o.label[w]&&(P=o.label[w]);var j=null;P&&g.hasOwnProperty(P)&&(j=g[P]),s.push({pointNumber:w,label:P,color:c?o.color[w]:o.color,hovercolor:m?o.hovercolor[w]:o.hovercolor,customdata:h?o.customdata[w]:o.customdata,concentrationscale:j,source:B,target:F,value:+D}),O.source.push(B),O.target.push(F)}}var U=T+u.length,$=k(a.color),Q=k(a.customdata),re=[];for(w=0;wT-1,childrenNodes:[],pointNumber:w,label:ne,color:$?a.color[w]:a.color,customdata:Q?a.customdata[w]:a.customdata})}var se=!1;return n(U,O.source,O.target)&&(se=!0),{circular:se,links:s,nodes:re,groups:u,groupLookup:A}}function n(r,a,o){for(var s=b.init2dArray(r,0),c=0;c1})}V.exports=function(a,o){var s=t(o);return E({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),TV=ze({"node_modules/d3-quadtree/dist/d3-quadtree.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(T){var f=+this._x.call(null,T),u=+this._y.call(null,T);return E(this.cover(f,u),f,u,T)}function E(T,f,u,A){if(isNaN(f)||isNaN(u))return T;var x,z=T._root,I={data:A},O=T._x0,D=T._y0,B=T._x1,F=T._y1,P,j,U,$,Q,re,ne,se;if(!z)return T._root=I,T;for(;z.length;)if((Q=f>=(P=(O+B)/2))?O=P:B=P,(re=u>=(j=(D+F)/2))?D=j:F=j,x=z,!(z=z[ne=re<<1|Q]))return x[ne]=I,T;if(U=+T._x.call(null,z.data),$=+T._y.call(null,z.data),f===U&&u===$)return I.next=z,x?x[ne]=I:T._root=I,T;do x=x?x[ne]=new Array(4):T._root=new Array(4),(Q=f>=(P=(O+B)/2))?O=P:B=P,(re=u>=(j=(D+F)/2))?D=j:F=j;while((ne=re<<1|Q)===(se=($>=j)<<1|U>=P));return x[se]=z,x[ne]=I,T}function k(T){var f,u,A=T.length,x,z,I=new Array(A),O=new Array(A),D=1/0,B=1/0,F=-1/0,P=-1/0;for(u=0;uF&&(F=x),zP&&(P=z));if(D>F||B>P)return this;for(this.cover(D,B).cover(F,P),u=0;uT||T>=x||A>f||f>=z;)switch(B=(fF||(O=$.y0)>P||(D=$.x1)=ne)<<1|T>=re)&&($=j[j.length-1],j[j.length-1]=j[j.length-1-Q],j[j.length-1-Q]=$)}else{var se=T-+this._x.call(null,U.data),G=f-+this._y.call(null,U.data),X=se*se+G*G;if(X=(j=(I+D)/2))?I=j:D=j,(Q=P>=(U=(O+B)/2))?O=U:B=U,f=u,!(u=u[re=Q<<1|$]))return this;if(!u.length)break;(f[re+1&3]||f[re+2&3]||f[re+3&3])&&(A=f,ne=re)}for(;u.data!==T;)if(x=u,!(u=u.next))return this;return(z=u.next)&&delete u.next,x?(z?x.next=z:delete x.next,this):f?(z?f[re]=z:delete f[re],(u=f[0]||f[1]||f[2]||f[3])&&u===(f[3]||f[2]||f[1]||f[0])&&!u.length&&(A?A[ne]=u:this._root=u),this):(this._root=z,this)}function o(T){for(var f=0,u=T.length;f=v.length)return i!=null&&_.sort(i),w!=null?w(_):_;for(var A=-1,x=_.length,z=v[T++],I,O,D=k(),B,F=f();++Av.length)return _;var f,u=g[T-1];return w!=null&&T>=v.length?f=_.entries():(f=[],_.each(function(A,x){f.push({key:x,values:C(A,T)})})),u!=null?f.sort(function(A,x){return u(A.key,x.key)}):f}return S={object:function(_){return M(_,0,e,t)},map:function(_){return M(_,0,n,r)},entries:function(_){return C(M(_,0,n,r),0)},key:function(_){return v.push(_),S},sortKeys:function(_){return g[v.length-1]=_,S},sortValues:function(_){return i=_,S},rollup:function(_){return w=_,S}}}function e(){return{}}function t(v,g,i){v[g]=i}function n(){return k()}function r(v,g,i){v.set(g,i)}function a(){}var o=k.prototype;a.prototype=s.prototype={constructor:a,has:o.has,add:function(v){return v+="",this[b+v]=v,this},remove:o.remove,clear:o.clear,values:o.keys,size:o.size,empty:o.empty,each:o.each};function s(v,g){var i=new a;if(v instanceof a)v.each(function(M){i.add(M)});else if(v){var w=-1,S=v.length;if(g==null)for(;++w=0&&(o=a.slice(s+1),a=a.slice(0,s)),a&&!r.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:o}})}k.prototype=E.prototype={constructor:k,on:function(n,r){var a=this._,o=l(n+"",a),s,c=-1,m=o.length;if(arguments.length<2){for(;++c0)for(var a=new Array(s),o=0,s,c;o=0&&T._call.call(null,f),T=T._next;--b}function i(){r=(n=o.now())+a,b=E=0;try{g()}finally{b=0,S(),r=0}}function w(){var T=o.now(),f=T-n;f>l&&(a-=f,n=T)}function S(){for(var T,f=e,u,A=1/0;f;)f._call?(A>f._time&&(A=f._time),T=f,f=f._next):(u=f._next,f._next=null,f=T?T._next=u:e=u);t=T,M(A)}function M(T){if(!b){E&&(E=clearTimeout(E));var f=T-r;f>24?(T<1/0&&(E=setTimeout(i,T-o.now()-a)),k&&(k=clearInterval(k))):(k||(n=o.now(),k=setInterval(w,l)),b=1,s(i))}}function C(T,f,u){var A=new h;return f=f==null?0:+f,A.restart(function(x){A.stop(),T(x+f)},f,u),A}function _(T,f,u){var A=new h,x=f;return f==null?(A.restart(T,f,u),A):(f=+f,u=u==null?c():+u,A.restart(function z(I){I+=x,A.restart(z,x+=f,u),T(I)},f,u),A)}p.interval=_,p.now=c,p.timeout=C,p.timer=v,p.timerFlush=g,Object.defineProperty(p,"__esModule",{value:!0})})}}),SV=ze({"node_modules/d3-force/dist/d3-force.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,TV(),zM(),AV(),MV()):b(p.d3=p.d3||{},p.d3,p.d3,p.d3,p.d3)})(J,function(p,b,E,k,l){"use strict";function e(T,f){var u;T==null&&(T=0),f==null&&(f=0);function A(){var x,z=u.length,I,O=0,D=0;for(x=0;xP.index){var ee=j-Y.x-Y.vx,ae=U-Y.y-Y.vy,he=ee*ee+ae*ae;hej+Z||KU+Z||HD.r&&(D.r=D[B].r)}function O(){if(f){var D,B=f.length,F;for(u=new Array(B),D=0;D1?(Q==null?O.remove($):O.set($,U(Q)),f):O.get($)},find:function($,Q,re){var ne=0,se=T.length,G,X,K,H,Y;for(re==null?re=1/0:re*=re,ne=0;ne1?(B.on($,Q),f):B.on($)}}}function S(){var T,f,u,A=t(-30),x,z=1,I=1/0,O=.81;function D(j){var U,$=T.length,Q=b.quadtree(T,h,v).visitAfter(F);for(u=j,U=0;U<$;++U)f=T[U],Q.visit(P)}function B(){if(T){var j,U=T.length,$;for(x=new Array(U),j=0;j=I)return;(j.data!==f||j.next)&&(re===0&&(re=n(),G+=re*re),ne===0&&(ne=n(),G+=ne*ne),GRt?1:Yt>=Rt?0:NaN}function E(Yt){let Rt=Yt,nr=Yt;Yt.length===1&&(Rt=(Qr,Zr)=>Yt(Qr)-Zr,nr=k(Yt));function ur(Qr,Zr,ha,Pa){for(ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);ha>>1;nr(Qr[La],Zr)<0?ha=La+1:Pa=La}return ha}function cr(Qr,Zr,ha,Pa){for(ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);ha>>1;nr(Qr[La],Zr)>0?Pa=La:ha=La+1}return ha}function Rr(Qr,Zr,ha,Pa){ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);let La=ur(Qr,Zr,ha,Pa-1);return La>ha&&Rt(Qr[La-1],Zr)>-Rt(Qr[La],Zr)?La-1:La}return{left:ur,center:Rr,right:cr}}function k(Yt){return(Rt,nr)=>b(Yt(Rt),nr)}function l(Yt){return Yt===null?NaN:+Yt}function*e(Yt,Rt){if(Rt===void 0)for(let nr of Yt)nr!=null&&(nr=+nr)>=nr&&(yield nr);else{let nr=-1;for(let ur of Yt)(ur=Rt(ur,++nr,Yt))!=null&&(ur=+ur)>=ur&&(yield ur)}}let t=E(b),n=t.right,r=t.left,a=E(l).center;function o(Yt,Rt){let nr=0;if(Rt===void 0)for(let ur of Yt)ur!=null&&(ur=+ur)>=ur&&++nr;else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(cr=+cr)>=cr&&++nr}return nr}function s(Yt){return Yt.length|0}function c(Yt){return!(Yt>0)}function m(Yt){return typeof Yt!="object"||"length"in Yt?Yt:Array.from(Yt)}function h(Yt){return Rt=>Yt(...Rt)}function v(...Yt){let Rt=typeof Yt[Yt.length-1]=="function"&&h(Yt.pop());Yt=Yt.map(m);let nr=Yt.map(s),ur=Yt.length-1,cr=new Array(ur+1).fill(0),Rr=[];if(ur<0||nr.some(c))return Rr;for(;;){Rr.push(cr.map((Zr,ha)=>Yt[ha][Zr]));let Qr=ur;for(;++cr[Qr]===nr[Qr];){if(Qr===0)return Rt?Rr.map(Rt):Rr;cr[Qr--]=0}}}function g(Yt,Rt){var nr=0,ur=0;return Float64Array.from(Yt,Rt===void 0?cr=>nr+=+cr||0:cr=>nr+=+Rt(cr,ur++,Yt)||0)}function i(Yt,Rt){return RtYt?1:Rt>=Yt?0:NaN}function w(Yt,Rt){let nr=0,ur,cr=0,Rr=0;if(Rt===void 0)for(let Qr of Yt)Qr!=null&&(Qr=+Qr)>=Qr&&(ur=Qr-cr,cr+=ur/++nr,Rr+=ur*(Qr-cr));else{let Qr=-1;for(let Zr of Yt)(Zr=Rt(Zr,++Qr,Yt))!=null&&(Zr=+Zr)>=Zr&&(ur=Zr-cr,cr+=ur/++nr,Rr+=ur*(Zr-cr))}if(nr>1)return Rr/(nr-1)}function S(Yt,Rt){let nr=w(Yt,Rt);return nr&&Math.sqrt(nr)}function M(Yt,Rt){let nr,ur;if(Rt===void 0)for(let cr of Yt)cr!=null&&(nr===void 0?cr>=cr&&(nr=ur=cr):(nr>cr&&(nr=cr),ur=Rr&&(nr=ur=Rr):(nr>Rr&&(nr=Rr),ur0){for(Qr=Rt[--nr];nr>0&&(ur=Qr,cr=Rt[--nr],Qr=ur+cr,Rr=cr-(Qr-ur),!Rr););nr>0&&(Rr<0&&Rt[nr-1]<0||Rr>0&&Rt[nr-1]>0)&&(cr=Rr*2,ur=Qr+cr,cr==ur-Qr&&(Qr=ur))}return Qr}}function _(Yt,Rt){let nr=new C;if(Rt===void 0)for(let ur of Yt)(ur=+ur)&&nr.add(ur);else{let ur=-1;for(let cr of Yt)(cr=+Rt(cr,++ur,Yt))&&nr.add(cr)}return+nr}function T(Yt,Rt){let nr=new C,ur=-1;return Float64Array.from(Yt,Rt===void 0?cr=>nr.add(+cr||0):cr=>nr.add(+Rt(cr,++ur,Yt)||0))}class f extends Map{constructor(Rt,nr=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nr}}),Rt!=null)for(let[ur,cr]of Rt)this.set(ur,cr)}get(Rt){return super.get(A(this,Rt))}has(Rt){return super.has(A(this,Rt))}set(Rt,nr){return super.set(x(this,Rt),nr)}delete(Rt){return super.delete(z(this,Rt))}}class u extends Set{constructor(Rt,nr=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nr}}),Rt!=null)for(let ur of Rt)this.add(ur)}has(Rt){return super.has(A(this,Rt))}add(Rt){return super.add(x(this,Rt))}delete(Rt){return super.delete(z(this,Rt))}}function A({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)?Yt.get(ur):nr}function x({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)?Yt.get(ur):(Yt.set(ur,nr),nr)}function z({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)&&(nr=Yt.get(nr),Yt.delete(ur)),nr}function I(Yt){return Yt!==null&&typeof Yt=="object"?Yt.valueOf():Yt}function O(Yt){return Yt}function D(Yt,...Rt){return Q(Yt,O,O,Rt)}function B(Yt,...Rt){return Q(Yt,Array.from,O,Rt)}function F(Yt,Rt,...nr){return Q(Yt,O,Rt,nr)}function P(Yt,Rt,...nr){return Q(Yt,Array.from,Rt,nr)}function j(Yt,...Rt){return Q(Yt,O,$,Rt)}function U(Yt,...Rt){return Q(Yt,Array.from,$,Rt)}function $(Yt){if(Yt.length!==1)throw new Error("duplicate key");return Yt[0]}function Q(Yt,Rt,nr,ur){return function cr(Rr,Qr){if(Qr>=ur.length)return nr(Rr);let Zr=new f,ha=ur[Qr++],Pa=-1;for(let La of Rr){let un=ha(La,++Pa,Rr),Xa=Zr.get(un);Xa?Xa.push(La):Zr.set(un,[La])}for(let[La,un]of Zr)Zr.set(La,cr(un,Qr));return Rt(Zr)}(Yt,0)}function re(Yt,Rt){return Array.from(Rt,nr=>Yt[nr])}function ne(Yt,...Rt){if(typeof Yt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");Yt=Array.from(Yt);let[nr=b]=Rt;if(nr.length===1||Rt.length>1){let ur=Uint32Array.from(Yt,(cr,Rr)=>Rr);return Rt.length>1?(Rt=Rt.map(cr=>Yt.map(cr)),ur.sort((cr,Rr)=>{for(let Qr of Rt){let Zr=b(Qr[cr],Qr[Rr]);if(Zr)return Zr}})):(nr=Yt.map(nr),ur.sort((cr,Rr)=>b(nr[cr],nr[Rr]))),re(Yt,ur)}return Yt.sort(nr)}function se(Yt,Rt,nr){return(Rt.length===1?ne(F(Yt,Rt,nr),([ur,cr],[Rr,Qr])=>b(cr,Qr)||b(ur,Rr)):ne(D(Yt,nr),([ur,cr],[Rr,Qr])=>Rt(cr,Qr)||b(ur,Rr))).map(([ur])=>ur)}var G=Array.prototype,X=G.slice;function K(Yt){return function(){return Yt}}var H=Math.sqrt(50),Y=Math.sqrt(10),q=Math.sqrt(2);function Z(Yt,Rt,nr){var ur,cr=-1,Rr,Qr,Zr;if(Rt=+Rt,Yt=+Yt,nr=+nr,Yt===Rt&&nr>0)return[Yt];if((ur=Rt0){let ha=Math.round(Yt/Zr),Pa=Math.round(Rt/Zr);for(ha*ZrRt&&--Pa,Qr=new Array(Rr=Pa-ha+1);++crRt&&--Pa,Qr=new Array(Rr=Pa-ha+1);++cr=0?(Rr>=H?10:Rr>=Y?5:Rr>=q?2:1)*Math.pow(10,cr):-Math.pow(10,-cr)/(Rr>=H?10:Rr>=Y?5:Rr>=q?2:1)}function ae(Yt,Rt,nr){var ur=Math.abs(Rt-Yt)/Math.max(0,nr),cr=Math.pow(10,Math.floor(Math.log(ur)/Math.LN10)),Rr=ur/cr;return Rr>=H?cr*=10:Rr>=Y?cr*=5:Rr>=q&&(cr*=2),Rt0?(Yt=Math.floor(Yt/cr)*cr,Rt=Math.ceil(Rt/cr)*cr):cr<0&&(Yt=Math.ceil(Yt*cr)/cr,Rt=Math.floor(Rt*cr)/cr),ur=cr}}function xe(Yt){return Math.ceil(Math.log(o(Yt))/Math.LN2)+1}function we(){var Yt=O,Rt=M,nr=xe;function ur(cr){Array.isArray(cr)||(cr=Array.from(cr));var Rr,Qr=cr.length,Zr,ha=new Array(Qr);for(Rr=0;Rr=un)if(Un>=un&&Rt===M){let Yn=ee(La,un,li);isFinite(Yn)&&(Yn>0?un=(Math.floor(un/Yn)+1)*Yn:Yn<0&&(un=(Math.ceil(un*-Yn)+1)/-Yn))}else Xa.pop()}for(var ja=Xa.length;Xa[0]<=La;)Xa.shift(),--ja;for(;Xa[ja-1]>un;)Xa.pop(),--ja;var Nn=new Array(ja+1),yn;for(Rr=0;Rr<=ja;++Rr)yn=Nn[Rr]=[],yn.x0=Rr>0?Xa[Rr-1]:La,yn.x1=Rr=ur)&&(nr=ur);else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(nr=cr)&&(nr=cr)}return nr}function Se(Yt,Rt){let nr;if(Rt===void 0)for(let ur of Yt)ur!=null&&(nr>ur||nr===void 0&&ur>=ur)&&(nr=ur);else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(nr>cr||nr===void 0&&cr>=cr)&&(nr=cr)}return nr}function Ie(Yt,Rt,nr=0,ur=Yt.length-1,cr=b){for(;ur>nr;){if(ur-nr>600){let ha=ur-nr+1,Pa=Rt-nr+1,La=Math.log(ha),un=.5*Math.exp(2*La/3),Xa=.5*Math.sqrt(La*un*(ha-un)/ha)*(Pa-ha/2<0?-1:1),ja=Math.max(nr,Math.floor(Rt-Pa*un/ha+Xa)),Nn=Math.min(ur,Math.floor(Rt+(ha-Pa)*un/ha+Xa));Ie(Yt,Rt,ja,Nn,cr)}let Rr=Yt[Rt],Qr=nr,Zr=ur;for(Ve(Yt,nr,Rt),cr(Yt[ur],Rr)>0&&Ve(Yt,nr,ur);Qr0;)--Zr}cr(Yt[nr],Rr)===0?Ve(Yt,nr,Zr):(++Zr,Ve(Yt,Zr,ur)),Zr<=Rt&&(nr=Zr+1),Rt<=Zr&&(ur=Zr-1)}return Yt}function Ve(Yt,Rt,nr){let ur=Yt[Rt];Yt[Rt]=Yt[nr],Yt[nr]=ur}function Ge(Yt,Rt,nr){if(Yt=Float64Array.from(e(Yt,nr)),!!(ur=Yt.length)){if((Rt=+Rt)<=0||ur<2)return Se(Yt);if(Rt>=1)return Me(Yt);var ur,cr=(ur-1)*Rt,Rr=Math.floor(cr),Qr=Me(Ie(Yt,Rr).subarray(0,Rr+1)),Zr=Se(Yt.subarray(Rr+1));return Qr+(Zr-Qr)*(cr-Rr)}}function ke(Yt,Rt,nr=l){if(ur=Yt.length){if((Rt=+Rt)<=0||ur<2)return+nr(Yt[0],0,Yt);if(Rt>=1)return+nr(Yt[ur-1],ur-1,Yt);var ur,cr=(ur-1)*Rt,Rr=Math.floor(cr),Qr=+nr(Yt[Rr],Rr,Yt),Zr=+nr(Yt[Rr+1],Rr+1,Yt);return Qr+(Zr-Qr)*(cr-Rr)}}function _e(Yt,Rt,nr){return Math.ceil((nr-Rt)/(2*(Ge(Yt,.75)-Ge(Yt,.25))*Math.pow(o(Yt),-1/3)))}function ce(Yt,Rt,nr){return Math.ceil((nr-Rt)/(3.5*S(Yt)*Math.pow(o(Yt),-1/3)))}function ve(Yt,Rt){let nr,ur=-1,cr=-1;if(Rt===void 0)for(let Rr of Yt)++cr,Rr!=null&&(nr=Rr)&&(nr=Rr,ur=cr);else for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(nr=Rr)&&(nr=Rr,ur=cr);return ur}function le(Yt,Rt){let nr=0,ur=0;if(Rt===void 0)for(let cr of Yt)cr!=null&&(cr=+cr)>=cr&&(++nr,ur+=cr);else{let cr=-1;for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(Rr=+Rr)>=Rr&&(++nr,ur+=Rr)}if(nr)return ur/nr}function Ae(Yt,Rt){return Ge(Yt,.5,Rt)}function*Be(Yt){for(let Rt of Yt)yield*ad(Rt)}function Xe(Yt){return Array.from(Be(Yt))}function Ye(Yt,Rt){let nr,ur=-1,cr=-1;if(Rt===void 0)for(let Rr of Yt)++cr,Rr!=null&&(nr>Rr||nr===void 0&&Rr>=Rr)&&(nr=Rr,ur=cr);else for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(nr>Rr||nr===void 0&&Rr>=Rr)&&(nr=Rr,ur=cr);return ur}function yt(Yt,Rt=gt){let nr=[],ur,cr=!1;for(let Rr of Yt)cr&&nr.push(Rt(ur,Rr)),ur=Rr,cr=!0;return nr}function gt(Yt,Rt){return[Yt,Rt]}function Tt(Yt,Rt,nr){Yt=+Yt,Rt=+Rt,nr=(cr=arguments.length)<2?(Rt=Yt,Yt=0,1):cr<3?1:+nr;for(var ur=-1,cr=Math.max(0,Math.ceil((Rt-Yt)/nr))|0,Rr=new Array(cr);++ur0:b(Qr,Qr)===0)&&(nr=Rr,cr=Qr,ur=!0)}}else for(let cr of Yt)(ur?Rt(cr,nr)>0:Rt(cr,cr)===0)&&(nr=cr,ur=!0);return nr}function _r(Yt,Rt=b){if(Rt.length===1)return ve(Yt,Rt);let nr,ur=-1,cr=-1;for(let Rr of Yt)++cr,(ur<0?Rt(Rr,Rr)===0:Rt(Rr,nr)>0)&&(nr=Rr,ur=cr);return ur}function Xt(Yt,Rt){let nr=$t(Yt,Rt);return nr<0?void 0:nr}var or=Ot(Math.random);function Ot(Yt){return function(nr,ur=0,cr=nr.length){let Rr=cr-(ur=+ur);for(;Rr;){let Qr=Yt()*Rr--|0,Zr=nr[Rr+ur];nr[Rr+ur]=nr[Qr+ur],nr[Qr+ur]=Zr}return nr}}function vt(Yt,Rt){let nr=0;if(Rt===void 0)for(let ur of Yt)(ur=+ur)&&(nr+=ur);else{let ur=-1;for(let cr of Yt)(cr=+Rt(cr,++ur,Yt))&&(nr+=cr)}return nr}function ht(Yt){if(!(Rr=Yt.length))return[];for(var Rt=-1,nr=Se(Yt,De),ur=new Array(nr);++RtRt(nr,ur,Yt))}function Mt(Yt,Rt,nr){if(typeof Rt!="function")throw new TypeError("reducer is not a function");let ur=Yt[Symbol.iterator](),cr,Rr,Qr=-1;if(arguments.length<3){if({done:cr,value:nr}=ur.next(),cr)return;++Qr}for(;{done:cr,value:Rr}=ur.next(),!cr;)nr=Rt(nr,Rr,++Qr,Yt);return nr}function pt(Yt){if(typeof Yt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(Yt).reverse()}function Pt(Yt,...Rt){Yt=new Set(Yt);for(let nr of Rt)for(let ur of nr)Yt.delete(ur);return Yt}function Ct(Yt,Rt){let nr=Rt[Symbol.iterator](),ur=new Set;for(let cr of Yt){if(ur.has(cr))return!1;let Rr,Qr;for(;({value:Rr,done:Qr}=nr.next())&&!Qr;){if(Object.is(cr,Rr))return!1;ur.add(Rr)}}return!0}function qt(Yt){return Yt instanceof Set?Yt:new Set(Yt)}function Vt(Yt,...Rt){Yt=new Set(Yt),Rt=Rt.map(qt);e:for(let nr of Yt)for(let ur of Rt)if(!ur.has(nr)){Yt.delete(nr);continue e}return Yt}function Ht(Yt,Rt){let nr=Yt[Symbol.iterator](),ur=new Set;for(let cr of Rt){if(ur.has(cr))continue;let Rr,Qr;for(;{value:Rr,done:Qr}=nr.next();){if(Qr)return!1;if(ur.add(Rr),Object.is(cr,Rr))break}}return!0}function Sr(Yt,Rt){return Ht(Rt,Yt)}function Kr(...Yt){let Rt=new Set;for(let nr of Yt)for(let ur of nr)Rt.add(ur);return Rt}p.Adder=C,p.InternMap=f,p.InternSet=u,p.ascending=b,p.bin=we,p.bisect=n,p.bisectCenter=a,p.bisectLeft=r,p.bisectRight=n,p.bisector=E,p.count=o,p.cross=v,p.cumsum=g,p.descending=i,p.deviation=S,p.difference=Pt,p.disjoint=Ct,p.every=We,p.extent=M,p.fcumsum=T,p.filter=Je,p.fsum=_,p.greatest=rr,p.greatestIndex=_r,p.group=D,p.groupSort=se,p.groups=B,p.histogram=we,p.index=j,p.indexes=U,p.intersection=Vt,p.least=At,p.leastIndex=$t,p.map=et,p.max=Me,p.maxIndex=ve,p.mean=le,p.median=Ae,p.merge=Xe,p.min=Se,p.minIndex=Ye,p.nice=he,p.pairs=yt,p.permute=re,p.quantile=Ge,p.quantileSorted=ke,p.quickselect=Ie,p.range=Tt,p.reduce=Mt,p.reverse=pt,p.rollup=F,p.rollups=P,p.scan=Xt,p.shuffle=or,p.shuffler=Ot,p.some=Ke,p.sort=ne,p.subset=Sr,p.sum=vt,p.superset=Ht,p.thresholdFreedmanDiaconis=_e,p.thresholdScott=ce,p.thresholdSturges=xe,p.tickIncrement=ee,p.tickStep=ae,p.ticks=Z,p.transpose=ht,p.union=Kr,p.variance=w,p.zip=Ne,Object.defineProperty(p,"__esModule",{value:!0})})}}),kV=ze({"node_modules/d3-path/dist/d3-path.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";var b=Math.PI,E=2*b,k=1e-6,l=E-k;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function t(){return new e}e.prototype=t.prototype={constructor:e,moveTo:function(n,r){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+r)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(n,r){this._+="L"+(this._x1=+n)+","+(this._y1=+r)},quadraticCurveTo:function(n,r,a,o){this._+="Q"+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+o)},bezierCurveTo:function(n,r,a,o,s,c){this._+="C"+ +n+","+ +r+","+ +a+","+ +o+","+(this._x1=+s)+","+(this._y1=+c)},arcTo:function(n,r,a,o,s){n=+n,r=+r,a=+a,o=+o,s=+s;var c=this._x1,m=this._y1,h=a-n,v=o-r,g=c-n,i=m-r,w=g*g+i*i;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=n)+","+(this._y1=r);else if(w>k)if(!(Math.abs(i*h-v*g)>k)||!s)this._+="L"+(this._x1=n)+","+(this._y1=r);else{var S=a-c,M=o-m,C=h*h+v*v,_=S*S+M*M,T=Math.sqrt(C),f=Math.sqrt(w),u=s*Math.tan((b-Math.acos((C+w-_)/(2*T*f)))/2),A=u/f,x=u/T;Math.abs(A-1)>k&&(this._+="L"+(n+A*g)+","+(r+A*i)),this._+="A"+s+","+s+",0,0,"+ +(i*S>g*M)+","+(this._x1=n+x*h)+","+(this._y1=r+x*v)}},arc:function(n,r,a,o,s,c){n=+n,r=+r,a=+a,c=!!c;var m=a*Math.cos(o),h=a*Math.sin(o),v=n+m,g=r+h,i=1^c,w=c?o-s:s-o;if(a<0)throw new Error("negative radius: "+a);this._x1===null?this._+="M"+v+","+g:(Math.abs(this._x1-v)>k||Math.abs(this._y1-g)>k)&&(this._+="L"+v+","+g),a&&(w<0&&(w=w%E+E),w>l?this._+="A"+a+","+a+",0,1,"+i+","+(n-m)+","+(r-h)+"A"+a+","+a+",0,1,"+i+","+(this._x1=v)+","+(this._y1=g):w>k&&(this._+="A"+a+","+a+",0,"+ +(w>=b)+","+i+","+(this._x1=n+a*Math.cos(s))+","+(this._y1=r+a*Math.sin(s))))},rect:function(n,r,a,o){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+r)+"h"+ +a+"v"+ +o+"h"+-a+"Z"},toString:function(){return this._}},p.path=t,Object.defineProperty(p,"__esModule",{value:!0})})}}),BM=ze({"node_modules/d3-shape/dist/d3-shape.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,kV()):(p=p||self,b(p.d3=p.d3||{},p.d3))})(J,function(p,b){"use strict";function E(ot){return function(){return ot}}var k=Math.abs,l=Math.atan2,e=Math.cos,t=Math.max,n=Math.min,r=Math.sin,a=Math.sqrt,o=1e-12,s=Math.PI,c=s/2,m=2*s;function h(ot){return ot>1?0:ot<-1?s:Math.acos(ot)}function v(ot){return ot>=1?c:ot<=-1?-c:Math.asin(ot)}function g(ot){return ot.innerRadius}function i(ot){return ot.outerRadius}function w(ot){return ot.startAngle}function S(ot){return ot.endAngle}function M(ot){return ot&&ot.padAngle}function C(ot,kt,jt,ar,Er,xr,zr,Lr){var aa=jt-ot,Sa=ar-kt,wa=zr-Er,pn=Lr-xr,tn=pn*aa-wa*Sa;if(!(tn*tnHi*Hi+Mi*Mi&&(gi=io,qi=oo),{cx:gi,cy:qi,x01:-wa,y01:-pn,x11:gi*(Er/jn-1),y11:qi*(Er/jn-1)}}function T(){var ot=g,kt=i,jt=E(0),ar=null,Er=w,xr=S,zr=M,Lr=null;function aa(){var Sa,wa,pn=+ot.apply(this,arguments),tn=+kt.apply(this,arguments),ai=Er.apply(this,arguments)-c,rn=xr.apply(this,arguments)-c,Ri=k(rn-ai),Gn=rn>ai;if(Lr||(Lr=Sa=b.path()),tno))Lr.moveTo(0,0);else if(Ri>m-o)Lr.moveTo(tn*e(ai),tn*r(ai)),Lr.arc(0,0,tn,ai,rn,!Gn),pn>o&&(Lr.moveTo(pn*e(rn),pn*r(rn)),Lr.arc(0,0,pn,rn,ai,Gn));else{var no=ai,Di=rn,fn=ai,Ai=rn,jn=Ri,Xn=Ri,eo=zr.apply(this,arguments)/2,gi=eo>o&&(ar?+ar.apply(this,arguments):a(pn*pn+tn*tn)),qi=n(k(tn-pn)/2,+jt.apply(this,arguments)),io=qi,oo=qi,Vn,qn;if(gi>o){var Hi=v(gi/pn*r(eo)),Mi=v(gi/tn*r(eo));(jn-=Hi*2)>o?(Hi*=Gn?1:-1,fn+=Hi,Ai-=Hi):(jn=0,fn=Ai=(ai+rn)/2),(Xn-=Mi*2)>o?(Mi*=Gn?1:-1,no+=Mi,Di-=Mi):(Xn=0,no=Di=(ai+rn)/2)}var Ro=tn*e(no),go=tn*r(no),Eo=pn*e(Ai),Ao=pn*r(Ai);if(qi>o){var ds=tn*e(Di),jo=tn*r(Di),Wo=pn*e(fn),to=pn*r(fn),wo;if(Rio?oo>o?(Vn=_(Wo,to,Ro,go,tn,oo,Gn),qn=_(ds,jo,Eo,Ao,tn,oo,Gn),Lr.moveTo(Vn.cx+Vn.x01,Vn.cy+Vn.y01),ooo)||!(jn>o)?Lr.lineTo(Eo,Ao):io>o?(Vn=_(Eo,Ao,ds,jo,pn,-io,Gn),qn=_(Ro,go,Wo,to,pn,-io,Gn),Lr.lineTo(Vn.cx+Vn.x01,Vn.cy+Vn.y01),io=tn;--ai)Lr.point(Di[ai],fn[ai]);Lr.lineEnd(),Lr.areaEnd()}Gn&&(Di[pn]=+ot(Ri,pn,wa),fn[pn]=+jt(Ri,pn,wa),Lr.point(kt?+kt(Ri,pn,wa):Di[pn],ar?+ar(Ri,pn,wa):fn[pn]))}if(no)return Lr=null,no+""||null}function Sa(){return z().defined(Er).curve(zr).context(xr)}return aa.x=function(wa){return arguments.length?(ot=typeof wa=="function"?wa:E(+wa),kt=null,aa):ot},aa.x0=function(wa){return arguments.length?(ot=typeof wa=="function"?wa:E(+wa),aa):ot},aa.x1=function(wa){return arguments.length?(kt=wa==null?null:typeof wa=="function"?wa:E(+wa),aa):kt},aa.y=function(wa){return arguments.length?(jt=typeof wa=="function"?wa:E(+wa),ar=null,aa):jt},aa.y0=function(wa){return arguments.length?(jt=typeof wa=="function"?wa:E(+wa),aa):jt},aa.y1=function(wa){return arguments.length?(ar=wa==null?null:typeof wa=="function"?wa:E(+wa),aa):ar},aa.lineX0=aa.lineY0=function(){return Sa().x(ot).y(jt)},aa.lineY1=function(){return Sa().x(ot).y(ar)},aa.lineX1=function(){return Sa().x(kt).y(jt)},aa.defined=function(wa){return arguments.length?(Er=typeof wa=="function"?wa:E(!!wa),aa):Er},aa.curve=function(wa){return arguments.length?(zr=wa,xr!=null&&(Lr=zr(xr)),aa):zr},aa.context=function(wa){return arguments.length?(wa==null?xr=Lr=null:Lr=zr(xr=wa),aa):xr},aa}function O(ot,kt){return ktot?1:kt>=ot?0:NaN}function D(ot){return ot}function B(){var ot=D,kt=O,jt=null,ar=E(0),Er=E(m),xr=E(0);function zr(Lr){var aa,Sa=Lr.length,wa,pn,tn=0,ai=new Array(Sa),rn=new Array(Sa),Ri=+ar.apply(this,arguments),Gn=Math.min(m,Math.max(-m,Er.apply(this,arguments)-Ri)),no,Di=Math.min(Math.abs(Gn)/Sa,xr.apply(this,arguments)),fn=Di*(Gn<0?-1:1),Ai;for(aa=0;aa0&&(tn+=Ai);for(kt!=null?ai.sort(function(jn,Xn){return kt(rn[jn],rn[Xn])}):jt!=null&&ai.sort(function(jn,Xn){return jt(Lr[jn],Lr[Xn])}),aa=0,pn=tn?(Gn-Sa*fn)/tn:0;aa0?Ai*pn:0)+fn,rn[wa]={data:Lr[wa],index:aa,value:Ai,startAngle:Ri,endAngle:no,padAngle:Di};return rn}return zr.value=function(Lr){return arguments.length?(ot=typeof Lr=="function"?Lr:E(+Lr),zr):ot},zr.sortValues=function(Lr){return arguments.length?(kt=Lr,jt=null,zr):kt},zr.sort=function(Lr){return arguments.length?(jt=Lr,kt=null,zr):jt},zr.startAngle=function(Lr){return arguments.length?(ar=typeof Lr=="function"?Lr:E(+Lr),zr):ar},zr.endAngle=function(Lr){return arguments.length?(Er=typeof Lr=="function"?Lr:E(+Lr),zr):Er},zr.padAngle=function(Lr){return arguments.length?(xr=typeof Lr=="function"?Lr:E(+Lr),zr):xr},zr}var F=j(u);function P(ot){this._curve=ot}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(ot,kt){this._curve.point(kt*Math.sin(ot),kt*-Math.cos(ot))}};function j(ot){function kt(jt){return new P(ot(jt))}return kt._curve=ot,kt}function U(ot){var kt=ot.curve;return ot.angle=ot.x,delete ot.x,ot.radius=ot.y,delete ot.y,ot.curve=function(jt){return arguments.length?kt(j(jt)):kt()._curve},ot}function $(){return U(z().curve(F))}function Q(){var ot=I().curve(F),kt=ot.curve,jt=ot.lineX0,ar=ot.lineX1,Er=ot.lineY0,xr=ot.lineY1;return ot.angle=ot.x,delete ot.x,ot.startAngle=ot.x0,delete ot.x0,ot.endAngle=ot.x1,delete ot.x1,ot.radius=ot.y,delete ot.y,ot.innerRadius=ot.y0,delete ot.y0,ot.outerRadius=ot.y1,delete ot.y1,ot.lineStartAngle=function(){return U(jt())},delete ot.lineX0,ot.lineEndAngle=function(){return U(ar())},delete ot.lineX1,ot.lineInnerRadius=function(){return U(Er())},delete ot.lineY0,ot.lineOuterRadius=function(){return U(xr())},delete ot.lineY1,ot.curve=function(zr){return arguments.length?kt(j(zr)):kt()._curve},ot}function re(ot,kt){return[(kt=+kt)*Math.cos(ot-=Math.PI/2),kt*Math.sin(ot)]}var ne=Array.prototype.slice;function se(ot){return ot.source}function G(ot){return ot.target}function X(ot){var kt=se,jt=G,ar=A,Er=x,xr=null;function zr(){var Lr,aa=ne.call(arguments),Sa=kt.apply(this,aa),wa=jt.apply(this,aa);if(xr||(xr=Lr=b.path()),ot(xr,+ar.apply(this,(aa[0]=Sa,aa)),+Er.apply(this,aa),+ar.apply(this,(aa[0]=wa,aa)),+Er.apply(this,aa)),Lr)return xr=null,Lr+""||null}return zr.source=function(Lr){return arguments.length?(kt=Lr,zr):kt},zr.target=function(Lr){return arguments.length?(jt=Lr,zr):jt},zr.x=function(Lr){return arguments.length?(ar=typeof Lr=="function"?Lr:E(+Lr),zr):ar},zr.y=function(Lr){return arguments.length?(Er=typeof Lr=="function"?Lr:E(+Lr),zr):Er},zr.context=function(Lr){return arguments.length?(xr=Lr??null,zr):xr},zr}function K(ot,kt,jt,ar,Er){ot.moveTo(kt,jt),ot.bezierCurveTo(kt=(kt+ar)/2,jt,kt,Er,ar,Er)}function H(ot,kt,jt,ar,Er){ot.moveTo(kt,jt),ot.bezierCurveTo(kt,jt=(jt+Er)/2,ar,jt,ar,Er)}function Y(ot,kt,jt,ar,Er){var xr=re(kt,jt),zr=re(kt,jt=(jt+Er)/2),Lr=re(ar,jt),aa=re(ar,Er);ot.moveTo(xr[0],xr[1]),ot.bezierCurveTo(zr[0],zr[1],Lr[0],Lr[1],aa[0],aa[1])}function q(){return X(K)}function Z(){return X(H)}function ee(){var ot=X(Y);return ot.angle=ot.x,delete ot.x,ot.radius=ot.y,delete ot.y,ot}var ae={draw:function(ot,kt){var jt=Math.sqrt(kt/s);ot.moveTo(jt,0),ot.arc(0,0,jt,0,m)}},he={draw:function(ot,kt){var jt=Math.sqrt(kt/5)/2;ot.moveTo(-3*jt,-jt),ot.lineTo(-jt,-jt),ot.lineTo(-jt,-3*jt),ot.lineTo(jt,-3*jt),ot.lineTo(jt,-jt),ot.lineTo(3*jt,-jt),ot.lineTo(3*jt,jt),ot.lineTo(jt,jt),ot.lineTo(jt,3*jt),ot.lineTo(-jt,3*jt),ot.lineTo(-jt,jt),ot.lineTo(-3*jt,jt),ot.closePath()}},xe=Math.sqrt(1/3),we=xe*2,Me={draw:function(ot,kt){var jt=Math.sqrt(kt/we),ar=jt*xe;ot.moveTo(0,-jt),ot.lineTo(ar,0),ot.lineTo(0,jt),ot.lineTo(-ar,0),ot.closePath()}},Se=.8908130915292852,Ie=Math.sin(s/10)/Math.sin(7*s/10),Ve=Math.sin(m/10)*Ie,Ge=-Math.cos(m/10)*Ie,ke={draw:function(ot,kt){var jt=Math.sqrt(kt*Se),ar=Ve*jt,Er=Ge*jt;ot.moveTo(0,-jt),ot.lineTo(ar,Er);for(var xr=1;xr<5;++xr){var zr=m*xr/5,Lr=Math.cos(zr),aa=Math.sin(zr);ot.lineTo(aa*jt,-Lr*jt),ot.lineTo(Lr*ar-aa*Er,aa*ar+Lr*Er)}ot.closePath()}},_e={draw:function(ot,kt){var jt=Math.sqrt(kt),ar=-jt/2;ot.rect(ar,ar,jt,jt)}},ce=Math.sqrt(3),ve={draw:function(ot,kt){var jt=-Math.sqrt(kt/(ce*3));ot.moveTo(0,jt*2),ot.lineTo(-ce*jt,-jt),ot.lineTo(ce*jt,-jt),ot.closePath()}},le=-.5,Ae=Math.sqrt(3)/2,Be=1/Math.sqrt(12),Xe=(Be/2+1)*3,Ye={draw:function(ot,kt){var jt=Math.sqrt(kt/Xe),ar=jt/2,Er=jt*Be,xr=ar,zr=jt*Be+jt,Lr=-xr,aa=zr;ot.moveTo(ar,Er),ot.lineTo(xr,zr),ot.lineTo(Lr,aa),ot.lineTo(le*ar-Ae*Er,Ae*ar+le*Er),ot.lineTo(le*xr-Ae*zr,Ae*xr+le*zr),ot.lineTo(le*Lr-Ae*aa,Ae*Lr+le*aa),ot.lineTo(le*ar+Ae*Er,le*Er-Ae*ar),ot.lineTo(le*xr+Ae*zr,le*zr-Ae*xr),ot.lineTo(le*Lr+Ae*aa,le*aa-Ae*Lr),ot.closePath()}},yt=[ae,he,Me,_e,ke,ve,Ye];function gt(){var ot=E(ae),kt=E(64),jt=null;function ar(){var Er;if(jt||(jt=Er=b.path()),ot.apply(this,arguments).draw(jt,+kt.apply(this,arguments)),Er)return jt=null,Er+""||null}return ar.type=function(Er){return arguments.length?(ot=typeof Er=="function"?Er:E(Er),ar):ot},ar.size=function(Er){return arguments.length?(kt=typeof Er=="function"?Er:E(+Er),ar):kt},ar.context=function(Er){return arguments.length?(jt=Er??null,ar):jt},ar}function Tt(){}function At(ot,kt,jt){ot._context.bezierCurveTo((2*ot._x0+ot._x1)/3,(2*ot._y0+ot._y1)/3,(ot._x0+2*ot._x1)/3,(ot._y0+2*ot._y1)/3,(ot._x0+4*ot._x1+kt)/6,(ot._y0+4*ot._y1+jt)/6)}function $t(ot){this._context=ot}$t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:At(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function rr(ot){return new $t(ot)}function _r(ot){this._context=ot}_r.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._x2=ot,this._y2=kt;break;case 1:this._point=2,this._x3=ot,this._y3=kt;break;case 2:this._point=3,this._x4=ot,this._y4=kt,this._context.moveTo((this._x0+4*this._x1+ot)/6,(this._y0+4*this._y1+kt)/6);break;default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function Xt(ot){return new _r(ot)}function or(ot){this._context=ot}or.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var jt=(this._x0+4*this._x1+ot)/6,ar=(this._y0+4*this._y1+kt)/6;this._line?this._context.lineTo(jt,ar):this._context.moveTo(jt,ar);break;case 3:this._point=4;default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function Ot(ot){return new or(ot)}function vt(ot,kt){this._basis=new $t(ot),this._beta=kt}vt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var ot=this._x,kt=this._y,jt=ot.length-1;if(jt>0)for(var ar=ot[0],Er=kt[0],xr=ot[jt]-ar,zr=kt[jt]-Er,Lr=-1,aa;++Lr<=jt;)aa=Lr/jt,this._basis.point(this._beta*ot[Lr]+(1-this._beta)*(ar+aa*xr),this._beta*kt[Lr]+(1-this._beta)*(Er+aa*zr));this._x=this._y=null,this._basis.lineEnd()},point:function(ot,kt){this._x.push(+ot),this._y.push(+kt)}};var ht=function ot(kt){function jt(ar){return kt===1?new $t(ar):new vt(ar,kt)}return jt.beta=function(ar){return ot(+ar)},jt}(.85);function De(ot,kt,jt){ot._context.bezierCurveTo(ot._x1+ot._k*(ot._x2-ot._x0),ot._y1+ot._k*(ot._y2-ot._y0),ot._x2+ot._k*(ot._x1-kt),ot._y2+ot._k*(ot._y1-jt),ot._x2,ot._y2)}function Ne(ot,kt){this._context=ot,this._k=(1-kt)/6}Ne.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:De(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2,this._x1=ot,this._y1=kt;break;case 2:this._point=3;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var We=function ot(kt){function jt(ar){return new Ne(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function Ke(ot,kt){this._context=ot,this._k=(1-kt)/6}Ke.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._x3=ot,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=ot,this._y4=kt);break;case 2:this._point=3,this._x5=ot,this._y5=kt;break;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Je=function ot(kt){function jt(ar){return new Ke(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function et(ot,kt){this._context=ot,this._k=(1-kt)/6}et.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Mt=function ot(kt){function jt(ar){return new et(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function pt(ot,kt,jt){var ar=ot._x1,Er=ot._y1,xr=ot._x2,zr=ot._y2;if(ot._l01_a>o){var Lr=2*ot._l01_2a+3*ot._l01_a*ot._l12_a+ot._l12_2a,aa=3*ot._l01_a*(ot._l01_a+ot._l12_a);ar=(ar*Lr-ot._x0*ot._l12_2a+ot._x2*ot._l01_2a)/aa,Er=(Er*Lr-ot._y0*ot._l12_2a+ot._y2*ot._l01_2a)/aa}if(ot._l23_a>o){var Sa=2*ot._l23_2a+3*ot._l23_a*ot._l12_a+ot._l12_2a,wa=3*ot._l23_a*(ot._l23_a+ot._l12_a);xr=(xr*Sa+ot._x1*ot._l23_2a-kt*ot._l12_2a)/wa,zr=(zr*Sa+ot._y1*ot._l23_2a-jt*ot._l12_2a)/wa}ot._context.bezierCurveTo(ar,Er,xr,zr,ot._x2,ot._y2)}function Pt(ot,kt){this._context=ot,this._alpha=kt}Pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3;default:pt(this,ot,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Ct=function ot(kt){function jt(ar){return kt?new Pt(ar,kt):new Ne(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function qt(ot,kt){this._context=ot,this._alpha=kt}qt.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=ot,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=ot,this._y4=kt);break;case 2:this._point=3,this._x5=ot,this._y5=kt;break;default:pt(this,ot,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Vt=function ot(kt){function jt(ar){return kt?new qt(ar,kt):new Ke(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function Ht(ot,kt){this._context=ot,this._alpha=kt}Ht.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:pt(this,ot,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Sr=function ot(kt){function jt(ar){return kt?new Ht(ar,kt):new et(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function Kr(ot){this._context=ot}Kr.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(ot,kt){ot=+ot,kt=+kt,this._point?this._context.lineTo(ot,kt):(this._point=1,this._context.moveTo(ot,kt))}};function Yt(ot){return new Kr(ot)}function Rt(ot){return ot<0?-1:1}function nr(ot,kt,jt){var ar=ot._x1-ot._x0,Er=kt-ot._x1,xr=(ot._y1-ot._y0)/(ar||Er<0&&-0),zr=(jt-ot._y1)/(Er||ar<0&&-0),Lr=(xr*Er+zr*ar)/(ar+Er);return(Rt(xr)+Rt(zr))*Math.min(Math.abs(xr),Math.abs(zr),.5*Math.abs(Lr))||0}function ur(ot,kt){var jt=ot._x1-ot._x0;return jt?(3*(ot._y1-ot._y0)/jt-kt)/2:kt}function cr(ot,kt,jt){var ar=ot._x0,Er=ot._y0,xr=ot._x1,zr=ot._y1,Lr=(xr-ar)/3;ot._context.bezierCurveTo(ar+Lr,Er+Lr*kt,xr-Lr,zr-Lr*jt,xr,zr)}function Rr(ot){this._context=ot}Rr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:cr(this,this._t0,ur(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){var jt=NaN;if(ot=+ot,kt=+kt,!(ot===this._x1&&kt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3,cr(this,ur(this,jt=nr(this,ot,kt)),jt);break;default:cr(this,this._t0,jt=nr(this,ot,kt));break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt,this._t0=jt}}};function Qr(ot){this._context=new Zr(ot)}(Qr.prototype=Object.create(Rr.prototype)).point=function(ot,kt){Rr.prototype.point.call(this,kt,ot)};function Zr(ot){this._context=ot}Zr.prototype={moveTo:function(ot,kt){this._context.moveTo(kt,ot)},closePath:function(){this._context.closePath()},lineTo:function(ot,kt){this._context.lineTo(kt,ot)},bezierCurveTo:function(ot,kt,jt,ar,Er,xr){this._context.bezierCurveTo(kt,ot,ar,jt,xr,Er)}};function ha(ot){return new Rr(ot)}function Pa(ot){return new Qr(ot)}function La(ot){this._context=ot}La.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var ot=this._x,kt=this._y,jt=ot.length;if(jt)if(this._line?this._context.lineTo(ot[0],kt[0]):this._context.moveTo(ot[0],kt[0]),jt===2)this._context.lineTo(ot[1],kt[1]);else for(var ar=un(ot),Er=un(kt),xr=0,zr=1;zr=0;--kt)Er[kt]=(zr[kt]-Er[kt+1])/xr[kt];for(xr[jt-1]=(ot[jt]+Er[jt-1])/2,kt=0;kt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,kt),this._context.lineTo(ot,kt);else{var jt=this._x*(1-this._t)+ot*this._t;this._context.lineTo(jt,this._y),this._context.lineTo(jt,kt)}break}}this._x=ot,this._y=kt}};function Nn(ot){return new ja(ot,.5)}function yn(ot){return new ja(ot,0)}function Un(ot){return new ja(ot,1)}function li(ot,kt){if((zr=ot.length)>1)for(var jt=1,ar,Er,xr=ot[kt[0]],zr,Lr=xr.length;jt=0;)jt[kt]=kt;return jt}function on(ot,kt){return ot[kt]}function en(){var ot=E([]),kt=Yn,jt=li,ar=on;function Er(xr){var zr=ot.apply(this,arguments),Lr,aa=xr.length,Sa=zr.length,wa=new Array(Sa),pn;for(Lr=0;Lr0){for(var jt,ar,Er=0,xr=ot[0].length,zr;Er0)for(var jt,ar=0,Er,xr,zr,Lr,aa,Sa=ot[kt[0]].length;ar0?(Er[0]=zr,Er[1]=zr+=xr):xr<0?(Er[1]=Lr,Er[0]=Lr+=xr):(Er[0]=0,Er[1]=xr)}function Ja(ot,kt){if((Er=ot.length)>0){for(var jt=0,ar=ot[kt[0]],Er,xr=ar.length;jt0)||!((xr=(Er=ot[kt[0]]).length)>0))){for(var jt=0,ar=1,Er,xr,zr;arxr&&(xr=Er,jt=kt);return jt}function fr(ot){var kt=ot.map(lr);return Yn(ot).sort(function(jt,ar){return kt[jt]-kt[ar]})}function lr(ot){for(var kt=0,jt=-1,ar=ot.length,Er;++jt[I(Ve,Ge,Me),Ve]));for(let[Ve,Ge]of Se.entries()){Ge.index=Ve;let{source:ke,target:_e}=Ge;typeof ke!="object"&&(ke=Ge.source=g(Ie,ke)),typeof _e!="object"&&(_e=Ge.target=g(Ie,_e)),ke.sourceLinks.push(Ge),_e.targetLinks.push(Ge)}if(B!=null)for(let{sourceLinks:Ve,targetLinks:Ge}of Me)Ve.sort(B),Ge.sort(B)}function re({nodes:Me}){for(let Se of Me)Se.value=Se.fixedValue===void 0?Math.max(b.sum(Se.sourceLinks,c),b.sum(Se.targetLinks,c)):Se.fixedValue}function ne({nodes:Me}){let Se=Me.length,Ie=new Set(Me),Ve=new Set,Ge=0;for(;Ie.size;){for(let ke of Ie){ke.depth=Ge;for(let{target:_e}of ke.sourceLinks)Ve.add(_e)}if(++Ge>Se)throw new Error("circular link");Ie=Ve,Ve=new Set}}function se({nodes:Me}){let Se=Me.length,Ie=new Set(Me),Ve=new Set,Ge=0;for(;Ie.size;){for(let ke of Ie){ke.height=Ge;for(let{source:_e}of ke.targetLinks)Ve.add(_e)}if(++Ge>Se)throw new Error("circular link");Ie=Ve,Ve=new Set}}function G({nodes:Me}){let Se=b.max(Me,Ge=>Ge.depth)+1,Ie=(f-_-A)/(Se-1),Ve=new Array(Se);for(let Ge of Me){let ke=Math.max(0,Math.min(Se-1,Math.floor(O.call(null,Ge,Se))));Ge.layer=ke,Ge.x0=_+ke*Ie,Ge.x1=Ge.x0+A,Ve[ke]?Ve[ke].push(Ge):Ve[ke]=[Ge]}if(D)for(let Ge of Ve)Ge.sort(D);return Ve}function X(Me){let Se=b.min(Me,Ie=>(u-T-(Ie.length-1)*z)/b.sum(Ie,c));for(let Ie of Me){let Ve=T;for(let Ge of Ie){Ge.y0=Ve,Ge.y1=Ve+Ge.value*Se,Ve=Ge.y1+z;for(let ke of Ge.sourceLinks)ke.width=ke.value*Se}Ve=(u-Ve+z)/(Ie.length+1);for(let Ge=0;GeIe.length)-1)),X(Se);for(let Ie=0;Ie0))continue;let le=(ce/ve-_e.y0)*Se;_e.y0+=le,_e.y1+=le,ae(_e)}D===void 0&&ke.sort(s),q(ke,Ie)}}function Y(Me,Se,Ie){for(let Ve=Me.length,Ge=Ve-2;Ge>=0;--Ge){let ke=Me[Ge];for(let _e of ke){let ce=0,ve=0;for(let{target:Ae,value:Be}of _e.sourceLinks){let Xe=Be*(Ae.layer-_e.layer);ce+=we(_e,Ae)*Xe,ve+=Xe}if(!(ve>0))continue;let le=(ce/ve-_e.y0)*Se;_e.y0+=le,_e.y1+=le,ae(_e)}D===void 0&&ke.sort(s),q(ke,Ie)}}function q(Me,Se){let Ie=Me.length>>1,Ve=Me[Ie];ee(Me,Ve.y0-z,Ie-1,Se),Z(Me,Ve.y1+z,Ie+1,Se),ee(Me,u,Me.length-1,Se),Z(Me,T,0,Se)}function Z(Me,Se,Ie,Ve){for(;Ie1e-6&&(Ge.y0+=ke,Ge.y1+=ke),Se=Ge.y1+z}}function ee(Me,Se,Ie,Ve){for(;Ie>=0;--Ie){let Ge=Me[Ie],ke=(Ge.y1-Se)*Ve;ke>1e-6&&(Ge.y0-=ke,Ge.y1-=ke),Se=Ge.y0-z}}function ae({sourceLinks:Me,targetLinks:Se}){if(B===void 0){for(let{source:{sourceLinks:Ie}}of Se)Ie.sort(o);for(let{target:{targetLinks:Ie}}of Me)Ie.sort(a)}}function he(Me){if(B===void 0)for(let{sourceLinks:Se,targetLinks:Ie}of Me)Se.sort(o),Ie.sort(a)}function xe(Me,Se){let Ie=Me.y0-(Me.sourceLinks.length-1)*z/2;for(let{target:Ve,width:Ge}of Me.sourceLinks){if(Ve===Se)break;Ie+=Ge+z}for(let{source:Ve,width:Ge}of Se.targetLinks){if(Ve===Me)break;Ie-=Ge}return Ie}function we(Me,Se){let Ie=Se.y0-(Se.targetLinks.length-1)*z/2;for(let{source:Ve,width:Ge}of Se.targetLinks){if(Ve===Me)break;Ie+=Ge+z}for(let{target:Ve,width:Ge}of Me.sourceLinks){if(Ve===Se)break;Ie-=Ge}return Ie}return $}function S(_){return[_.source.x1,_.y0]}function M(_){return[_.target.x0,_.y1]}function C(){return E.linkHorizontal().source(S).target(M)}p.sankey=w,p.sankeyCenter=n,p.sankeyJustify=t,p.sankeyLeft=l,p.sankeyLinkHorizontal=C,p.sankeyRight=e,Object.defineProperty(p,"__esModule",{value:!0})})}}),LV=ze({"node_modules/@plotly/d3-sankey-circular/node_modules/d3-array/dist/d3-array.js"(J,V){(function(p,b){b(typeof J=="object"&&typeof V<"u"?J:p.d3=p.d3||{})})(J,function(p){"use strict";function b(K,H){return KH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q=M})}function h(M){m(M);for(var C=E,_=p(C),T=_.components.filter(function(O){return O.length>1}),f=1/0,u,A=0;A"u"?"undefined":s(Ne))!=="object"&&(Ne=ht.source=_(vt,Ne)),(typeof We>"u"?"undefined":s(We))!=="object"&&(We=ht.target=_(vt,We)),Ne.sourceLinks.push(ht),We.targetLinks.push(ht)}),Ot}function At(Ot){Ot.nodes.forEach(function(vt){vt.partOfCycle=!1,vt.value=Math.max(b.sum(vt.sourceLinks,v),b.sum(vt.targetLinks,v)),vt.sourceLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)}),vt.targetLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)})})}function $t(Ot){var vt=0,ht=0,De=0,Ne=0,We=b.max(Ot.nodes,function(Ke){return Ke.column});return Ot.links.forEach(function(Ke){Ke.circular&&(Ke.circularLinkType=="top"?vt=vt+Ke.width:ht=ht+Ke.width,Ke.target.column==0&&(Ne=Ne+Ke.width),Ke.source.column==We&&(De=De+Ke.width))}),vt=vt>0?vt+f+u:vt,ht=ht>0?ht+f+u:ht,De=De>0?De+f+u:De,Ne=Ne>0?Ne+f+u:Ne,{top:vt,bottom:ht,left:Ne,right:De}}function rr(Ot,vt){var ht=b.max(Ot.nodes,function(Mt){return Mt.column}),De=Ve-Se,Ne=Ge-Ie,We=De+vt.right+vt.left,Ke=Ne+vt.top+vt.bottom,Je=De/We,et=Ne/Ke;return Se=Se*Je+vt.left,Ve=vt.right==0?Ve:Ve*Je,Ie=Ie*et+vt.top,Ge=Ge*et,Ot.nodes.forEach(function(Mt){Mt.x0=Se+Mt.column*((Ve-Se-ke)/ht),Mt.x1=Mt.x0+ke}),et}function _r(Ot){var vt,ht,De;for(vt=Ot.nodes,ht=[],De=0;vt.length;++De,vt=ht,ht=[])vt.forEach(function(Ne){Ne.depth=De,Ne.sourceLinks.forEach(function(We){ht.indexOf(We.target)<0&&!We.circular&&ht.push(We.target)})});for(vt=Ot.nodes,ht=[],De=0;vt.length;++De,vt=ht,ht=[])vt.forEach(function(Ne){Ne.height=De,Ne.targetLinks.forEach(function(We){ht.indexOf(We.source)<0&&!We.circular&&ht.push(We.source)})});Ot.nodes.forEach(function(Ne){Ne.column=Math.floor(ve.call(null,Ne,De))})}function Xt(Ot,vt,ht){var De=E.nest().key(function(Mt){return Mt.column}).sortKeys(b.ascending).entries(Ot.nodes).map(function(Mt){return Mt.values});Ke(ht),et();for(var Ne=1,We=vt;We>0;--We)Je(Ne*=.99,ht),et();function Ke(Mt){if(Ye){var pt=1/0;De.forEach(function(Vt){var Ht=Ge*Ye/(Vt.length+1);pt=Ht0))if(Vt==0&&qt==1)Sr=Ht.y1-Ht.y0,Ht.y0=Ge/2-Sr/2,Ht.y1=Ge/2+Sr/2;else if(Vt==Pt-1&&qt==1)Sr=Ht.y1-Ht.y0,Ht.y0=Ge/2-Sr/2,Ht.y1=Ge/2+Sr/2;else{var Kr=0,Yt=b.mean(Ht.sourceLinks,w),Rt=b.mean(Ht.targetLinks,i);Yt&&Rt?Kr=(Yt+Rt)/2:Kr=Yt||Rt;var nr=(Kr-g(Ht))*Mt;Ht.y0+=nr,Ht.y1+=nr}})})}function et(){De.forEach(function(Mt){var pt,Pt,Ct=Ie,qt=Mt.length,Vt;for(Mt.sort(h),Vt=0;Vt0&&(pt.y0+=Pt,pt.y1+=Pt),Ct=pt.y1+_e;if(Pt=Ct-_e-Ge,Pt>0)for(Ct=pt.y0-=Pt,pt.y1-=Pt,Vt=qt-2;Vt>=0;--Vt)pt=Mt[Vt],Pt=pt.y1+_e-Ct,Pt>0&&(pt.y0-=Pt,pt.y1-=Pt),Ct=pt.y0})}}function or(Ot){Ot.nodes.forEach(function(vt){vt.sourceLinks.sort(m),vt.targetLinks.sort(c)}),Ot.nodes.forEach(function(vt){var ht=vt.y0,De=ht,Ne=vt.y1,We=Ne;vt.sourceLinks.forEach(function(Ke){Ke.circular?(Ke.y0=Ne-Ke.width/2,Ne=Ne-Ke.width):(Ke.y0=ht+Ke.width/2,ht+=Ke.width)}),vt.targetLinks.forEach(function(Ke){Ke.circular?(Ke.y1=We-Ke.width/2,We=We-Ke.width):(Ke.y1=De+Ke.width/2,De+=Ke.width)})})}return gt}function z(Se,Ie,Ve){var Ge=0;if(Ve===null){for(var ke=[],_e=0;_eIe.source.column)}function B(Se,Ie){var Ve=0;Se.sourceLinks.forEach(function(ke){Ve=ke.circular&&!we(ke,Ie)?Ve+1:Ve});var Ge=0;return Se.targetLinks.forEach(function(ke){Ge=ke.circular&&!we(ke,Ie)?Ge+1:Ge}),Ve+Ge}function F(Se){var Ie=Se.source.sourceLinks,Ve=0;Ie.forEach(function(_e){Ve=_e.circular?Ve+1:Ve});var Ge=Se.target.targetLinks,ke=0;return Ge.forEach(function(_e){ke=_e.circular?ke+1:ke}),!(Ve>1||ke>1)}function P(Se,Ie,Ve){return Se.sort($),Se.forEach(function(Ge,ke){var _e=0;if(we(Ge,Ve)&&F(Ge))Ge.circularPathData.verticalBuffer=_e+Ge.width/2;else{var ce=0;for(ce;ce_e?ve:_e}Ge.circularPathData.verticalBuffer=_e+Ge.width/2}}),Se}function j(Se,Ie,Ve,Ge){var ke=5,_e=b.min(Se.links,function(le){return le.source.y0});Se.links.forEach(function(le){le.circular&&(le.circularPathData={})});var ce=Se.links.filter(function(le){return le.circularLinkType=="top"});P(ce,Ie,Ge);var ve=Se.links.filter(function(le){return le.circularLinkType=="bottom"});P(ve,Ie,Ge),Se.links.forEach(function(le){if(le.circular){if(le.circularPathData.arcRadius=le.width+u,le.circularPathData.leftNodeBuffer=ke,le.circularPathData.rightNodeBuffer=ke,le.circularPathData.sourceWidth=le.source.x1-le.source.x0,le.circularPathData.sourceX=le.source.x0+le.circularPathData.sourceWidth,le.circularPathData.targetX=le.target.x0,le.circularPathData.sourceY=le.y0,le.circularPathData.targetY=le.y1,we(le,Ge)&&F(le))le.circularPathData.leftSmallArcRadius=u+le.width/2,le.circularPathData.leftLargeArcRadius=u+le.width/2,le.circularPathData.rightSmallArcRadius=u+le.width/2,le.circularPathData.rightLargeArcRadius=u+le.width/2,le.circularLinkType=="bottom"?(le.circularPathData.verticalFullExtent=le.source.y1+f+le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.rightLargeArcRadius):(le.circularPathData.verticalFullExtent=le.source.y0-f-le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.rightLargeArcRadius);else{var Ae=le.source.column,Be=le.circularLinkType,Xe=Se.links.filter(function(gt){return gt.source.column==Ae&>.circularLinkType==Be});le.circularLinkType=="bottom"?Xe.sort(re):Xe.sort(Q);var Ye=0;Xe.forEach(function(gt,Tt){gt.circularLinkID==le.circularLinkID&&(le.circularPathData.leftSmallArcRadius=u+le.width/2+Ye,le.circularPathData.leftLargeArcRadius=u+le.width/2+Tt*Ie+Ye),Ye=Ye+gt.width}),Ae=le.target.column,Xe=Se.links.filter(function(gt){return gt.target.column==Ae&>.circularLinkType==Be}),le.circularLinkType=="bottom"?Xe.sort(se):Xe.sort(ne),Ye=0,Xe.forEach(function(gt,Tt){gt.circularLinkID==le.circularLinkID&&(le.circularPathData.rightSmallArcRadius=u+le.width/2+Ye,le.circularPathData.rightLargeArcRadius=u+le.width/2+Tt*Ie+Ye),Ye=Ye+gt.width}),le.circularLinkType=="bottom"?(le.circularPathData.verticalFullExtent=Math.max(Ve,le.source.y1,le.target.y1)+f+le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.rightLargeArcRadius):(le.circularPathData.verticalFullExtent=_e-f-le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.rightLargeArcRadius)}le.circularPathData.leftInnerExtent=le.circularPathData.sourceX+le.circularPathData.leftNodeBuffer,le.circularPathData.rightInnerExtent=le.circularPathData.targetX-le.circularPathData.rightNodeBuffer,le.circularPathData.leftFullExtent=le.circularPathData.sourceX+le.circularPathData.leftLargeArcRadius+le.circularPathData.leftNodeBuffer,le.circularPathData.rightFullExtent=le.circularPathData.targetX-le.circularPathData.rightLargeArcRadius-le.circularPathData.rightNodeBuffer}if(le.circular)le.path=U(le);else{var yt=k.linkHorizontal().source(function(gt){var Tt=gt.source.x0+(gt.source.x1-gt.source.x0),At=gt.y0;return[Tt,At]}).target(function(gt){var Tt=gt.target.x0,At=gt.y1;return[Tt,At]});le.path=yt(le)}})}function U(Se){var Ie="";return Se.circularLinkType=="top"?Ie="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 0 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY-Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 0 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 0 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY-Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 0 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY:Ie="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 1 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY+Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 1 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 1 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY+Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 1 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY,Ie}function $(Se,Ie){return G(Se)==G(Ie)?Se.circularLinkType=="bottom"?re(Se,Ie):Q(Se,Ie):G(Ie)-G(Se)}function Q(Se,Ie){return Se.y0-Ie.y0}function re(Se,Ie){return Ie.y0-Se.y0}function ne(Se,Ie){return Se.y1-Ie.y1}function se(Se,Ie){return Ie.y1-Se.y1}function G(Se){return Se.target.column-Se.source.column}function X(Se){return Se.target.x0-Se.source.x1}function K(Se,Ie){var Ve=O(Se),Ge=X(Ie)/Math.tan(Ve),ke=xe(Se)=="up"?Se.y1+Ge:Se.y1-Ge;return ke}function H(Se,Ie){var Ve=O(Se),Ge=X(Ie)/Math.tan(Ve),ke=xe(Se)=="up"?Se.y1-Ge:Se.y1+Ge;return ke}function Y(Se,Ie,Ve,Ge){Se.links.forEach(function(ke){if(!ke.circular&&ke.target.column-ke.source.column>1){var _e=ke.source.column+1,ce=ke.target.column-1,ve=1,le=ce-_e+1;for(ve=1;_e<=ce;_e++,ve++)Se.nodes.forEach(function(Ae){if(Ae.column==_e){var Be=ve/(le+1),Xe=Math.pow(1-Be,3),Ye=3*Be*Math.pow(1-Be,2),yt=3*Math.pow(Be,2)*(1-Be),gt=Math.pow(Be,3),Tt=Xe*ke.y0+Ye*ke.y0+yt*ke.y1+gt*ke.y1,At=Tt-ke.width/2,$t=Tt+ke.width/2,rr;At>Ae.y0&&AtAe.y0&&$tAe.y1&&Z(_r,rr,Ie,Ve)})):AtAe.y1&&(rr=$t-Ae.y0+10,Ae=Z(Ae,rr,Ie,Ve),Se.nodes.forEach(function(_r){T(_r,Ge)==T(Ae,Ge)||_r.column!=Ae.column||_r.y0Ae.y1&&Z(_r,rr,Ie,Ve)}))}})}})}function q(Se,Ie){return Se.y0>Ie.y0&&Se.y0Ie.y0&&Se.y1Ie.y1}function Z(Se,Ie,Ve,Ge){return Se.y0+Ie>=Ve&&Se.y1+Ie<=Ge&&(Se.y0=Se.y0+Ie,Se.y1=Se.y1+Ie,Se.targetLinks.forEach(function(ke){ke.y1=ke.y1+Ie}),Se.sourceLinks.forEach(function(ke){ke.y0=ke.y0+Ie})),Se}function ee(Se,Ie,Ve,Ge){Se.nodes.forEach(function(ke){Ge&&ke.y+(ke.y1-ke.y0)>Ie&&(ke.y=ke.y-(ke.y+(ke.y1-ke.y0)-Ie));var _e=Se.links.filter(function(le){return T(le.source,Ve)==T(ke,Ve)}),ce=_e.length;ce>1&&_e.sort(function(le,Ae){if(!le.circular&&!Ae.circular){if(le.target.column==Ae.target.column)return le.y1-Ae.y1;if(he(le,Ae)){if(le.target.column>Ae.target.column){var Be=H(Ae,le);return le.y1-Be}if(Ae.target.column>le.target.column){var Xe=H(le,Ae);return Xe-Ae.y1}}else return le.y1-Ae.y1}if(le.circular&&!Ae.circular)return le.circularLinkType=="top"?-1:1;if(Ae.circular&&!le.circular)return Ae.circularLinkType=="top"?1:-1;if(le.circular&&Ae.circular)return le.circularLinkType===Ae.circularLinkType&&le.circularLinkType=="top"?le.target.column===Ae.target.column?le.target.y1-Ae.target.y1:Ae.target.column-le.target.column:le.circularLinkType===Ae.circularLinkType&&le.circularLinkType=="bottom"?le.target.column===Ae.target.column?Ae.target.y1-le.target.y1:le.target.column-Ae.target.column:le.circularLinkType=="top"?-1:1});var ve=ke.y0;_e.forEach(function(le){le.y0=ve+le.width/2,ve=ve+le.width}),_e.forEach(function(le,Ae){if(le.circularLinkType=="bottom"){var Be=Ae+1,Xe=0;for(Be;Be1&&ke.sort(function(ve,le){if(!ve.circular&&!le.circular){if(ve.source.column==le.source.column)return ve.y0-le.y0;if(he(ve,le)){if(le.source.column0?"up":"down"}function we(Se,Ie){return T(Se.source,Ie)==T(Se.target,Ie)}function Me(Se,Ie,Ve){var Ge=Se.nodes,ke=Se.links,_e=!1,ce=!1;if(ke.forEach(function(Ye){Ye.circularLinkType=="top"?_e=!0:Ye.circularLinkType=="bottom"&&(ce=!0)}),_e==!1||ce==!1){var ve=b.min(Ge,function(Ye){return Ye.y0}),le=b.max(Ge,function(Ye){return Ye.y1}),Ae=le-ve,Be=Ve-Ie,Xe=Be/Ae;Ge.forEach(function(Ye){var yt=(Ye.y1-Ye.y0)*Xe;Ye.y0=(Ye.y0-ve)*Xe,Ye.y1=Ye.y0+yt}),ke.forEach(function(Ye){Ye.y0=(Ye.y0-ve)*Xe,Ye.y1=(Ye.y1-ve)*Xe,Ye.width=Ye.width*Xe})}}p.sankeyCircular=x,p.sankeyCenter=a,p.sankeyLeft=t,p.sankeyRight=n,p.sankeyJustify=r,Object.defineProperty(p,"__esModule",{value:!0})})}}),OM=ze({"src/traces/sankey/constants.js"(J,V){"use strict";V.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}}),IV=ze({"src/traces/sankey/render.js"(J,V){"use strict";var p=SV(),b=(l0(),Po(_v)).interpolateNumber,E=ci(),k=CV(),l=RV(),e=OM(),t=Qn(),n=$i(),r=Nr(),a=r.strTranslate,o=r.strRotate,s=Vd(),c=s.keyFun,m=s.repeat,h=s.unwrap,v=Cs(),g=mi(),i=dc(),w=i.CAP_SHIFT,S=i.LINE_SPACING,M=3;function C(X,K,H){var Y=h(K),q=Y.trace,Z=q.domain,ee=q.orientation==="h",ae=q.direction==="reversed",he=q.node.pad,xe=q.node.thickness,we={justify:k.sankeyJustify,left:k.sankeyLeft,right:k.sankeyRight,center:k.sankeyCenter}[q.node.align],Me=X.width*(Z.x[1]-Z.x[0]),Se=X.height*(Z.y[1]-Z.y[0]),Ie=Y._nodes,Ve=Y._links,Ge=Y.circular,ke;Ge?ke=l.sankeyCircular().circularLinkGap(0):ke=k.sankey(),ke.iterations(e.sankeyIterations).size(ee?[Me,Se]:[Se,Me]).nodeWidth(xe).nodePadding(he).nodeId(function(Xt){return Xt.pointNumber}).nodeAlign(we).nodes(Ie).links(Ve);function _e(Xt){q[Xt].sort==="input"&&(Ge?r.warn(`Circular Sankey diagrams do not support the "input" ${Xt}.sort mode; falling back to the default sort.`):ke[`${Xt}Sort`](null))}_e("link"),_e("node");var ce=ke();ke.nodePadding()=ht||(vt=ht-Ot.y0,vt>1e-6&&(Ot.y0+=vt,Ot.y1+=vt)),ht=Ot.y1+he})}function At(Xt){var or=Xt.map(function(Ke,Je){return{x0:Ke.x0,index:Je}}).sort(function(Ke,Je){return Ke.x0-Je.x0}),Ot=[],vt=-1,ht,De=-1/0,Ne;for(ve=0;veDe+xe&&(vt+=1,ht=We.x0),De=We.x0,Ot[vt]||(Ot[vt]=[]),Ot[vt].push(We),Ne=ht-We.x0,We.x0+=Ne,We.x1+=Ne}return Ot}if(q.node.x.length&&q.node.y.length){for(ve=0;ve0?" L "+q.targetX+" "+q.targetY:"")+"Z"):(H="M "+(q.targetX-K)+" "+(q.targetY-Y)+" L "+(q.rightInnerExtent-K)+" "+(q.targetY-Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightSmallArcRadius+Y)+" 0 0 0 "+(q.rightFullExtent-Y-K)+" "+(q.targetY+q.rightSmallArcRadius)+" L "+(q.rightFullExtent-Y-K)+" "+q.verticalRightInnerExtent,Z&&ee?H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightInnerExtent-Y-K)+" "+(q.verticalFullExtent+Y)+" L "+(q.rightFullExtent+Y-K-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent+Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent:Z?H+=" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent-K-Y-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" L "+(q.leftFullExtent+Y+(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent:H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent+Y)+" L "+q.leftInnerExtent+" "+(q.verticalFullExtent+Y)+" A "+(q.leftLargeArcRadius+Y)+" "+(q.leftLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent,H+=" L "+(q.leftFullExtent+Y)+" "+(q.sourceY+q.leftSmallArcRadius)+" A "+(q.leftLargeArcRadius+Y)+" "+(q.leftSmallArcRadius+Y)+" 0 0 0 "+q.leftInnerExtent+" "+(q.sourceY-Y)+" L "+q.sourceX+" "+(q.sourceY-Y)+" L "+q.sourceX+" "+(q.sourceY+Y)+" L "+q.leftInnerExtent+" "+(q.sourceY+Y)+" A "+(q.leftLargeArcRadius-Y)+" "+(q.leftSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent-Y)+" "+(q.sourceY+q.leftSmallArcRadius)+" L "+(q.leftFullExtent-Y)+" "+q.verticalLeftInnerExtent,Z&&ee?H+=" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent-Y-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" L "+(q.rightFullExtent+Y-K+(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent:Z?H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+(q.verticalFullExtent+Y)+" L "+(q.rightFullExtent-K-Y)+" "+(q.verticalFullExtent+Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent:H+=" A "+(q.leftLargeArcRadius-Y)+" "+(q.leftLargeArcRadius-Y)+" 0 0 1 "+q.leftInnerExtent+" "+(q.verticalFullExtent-Y)+" L "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightLargeArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent,H+=" L "+(q.rightFullExtent+Y-K)+" "+(q.targetY+q.rightSmallArcRadius)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightInnerExtent-K)+" "+(q.targetY+Y)+" L "+(q.targetX-K)+" "+(q.targetY+Y)+(K>0?" L "+q.targetX+" "+q.targetY:"")+"Z"),H}function f(){var X=.5;function K(H){var Y=H.linkArrowLength;if(H.link.circular)return T(H.link,Y);var q=Math.abs((H.link.target.x0-H.link.source.x1)/2);Y>q&&(Y=q);var Z=H.link.source.x1,ee=H.link.target.x0-Y,ae=b(Z,ee),he=ae(X),xe=ae(1-X),we=H.link.y0-H.link.width/2,Me=H.link.y0+H.link.width/2,Se=H.link.y1-H.link.width/2,Ie=H.link.y1+H.link.width/2,Ve="M"+Z+","+we,Ge="C"+he+","+we+" "+xe+","+Se+" "+ee+","+Se,ke="C"+xe+","+Ie+" "+he+","+Me+" "+Z+","+Me,_e=Y>0?"L"+(ee+Y)+","+(Se+H.link.width/2):"";return _e+="L"+ee+","+Ie,Ve+Ge+_e+ke+"Z"}return K}function u(X,K){var H=e.nodePadAcross,Y=X.nodePad/2;K.dx=K.x1-K.x0,K.dy=K.y1-K.y0;var q=K.dx,Z=Math.max(.5,K.dy),ee="node_"+K.pointNumber;return K.group&&(ee=r.randstr()),K.trace=X.trace,K.curveNumber=X.trace.index,{index:K.pointNumber,key:ee,partOfGroup:K.partOfGroup||!1,group:K.group,traceId:X.key,trace:X.trace,node:K,nodePad:X.nodePad,nodeLineColor:X.nodeLineColor,nodeLineWidth:X.nodeLineWidth,textFont:X.textFont,size:X.horizontal?X.height:X.width,visibleWidth:Math.ceil(q),visibleHeight:Z,zoneX:-H,zoneY:-Y,zoneWidth:q+2*H,zoneHeight:Z+2*Y,labelY:X.horizontal?K.dy/2+1:K.dx/2+1,left:K.originalLayer===1,sizeAcross:X.width,forceLayouts:X.forceLayouts,horizontal:X.horizontal,reversed:X.reversed,rgb:t.rgb(K.color),alpha:t.parse(K.color).alpha,valueFormat:X.valueFormat,valueSuffix:X.valueSuffix,sankey:X.sankey,graph:X.graph,arrangement:X.arrangement,uniqueNodeLabelPathId:[X.guid,X.key,ee].join("_"),interactionState:X.interactionState,figure:X}}function A(X){X.attr("transform",function(K){return a(K.node.x0.toFixed(3),K.node.y0.toFixed(3))})}function x(X){X.call(A)}function z(X,K){X.call(x),K.attr("d",f())}function I(X){X.attr("width",function(K){return K.node.x1-K.node.x0}).attr("height",function(K){return K.visibleHeight})}function O(X){return X.link.width>1||X.linkLineWidth>0}function D(X){return X.horizontal?X.reversed?a(X.translateX+X.width,X.translateY)+"matrix(-1 0 0 1 0 0)":a(X.translateX,X.translateY)+"matrix(1 0 0 1 0 0)":X.reversed?a(X.translateX,X.translateY+X.height)+"matrix(0 -1 1 0 0 0)":a(X.translateX,X.translateY)+"matrix(0 1 1 0 0 0)"}function B(X,K,H){X.on(".basic",null).on("mouseover.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.hover(this,Y,K),Y.interactionState.hovered=[this,Y])}).on("mousemove.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.follow(this,Y),Y.interactionState.hovered=[this,Y])}).on("mouseout.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.unhover(this,Y,K),Y.interactionState.hovered=!1)}).on("click.basic",function(Y){Y.interactionState.hovered&&(H.unhover(this,Y,K),Y.interactionState.hovered=!1),!Y.interactionState.dragInProgress&&!Y.partOfGroup&&H.select(this,Y,K)})}function F(X,K,H,Y){var q=E.behavior.drag().origin(function(Z){return{x:Z.node.x0+Z.visibleWidth/2,y:Z.node.y0+Z.visibleHeight/2}}).on("dragstart",function(Z){if(Z.arrangement!=="fixed"&&(r.ensureSingle(Y._fullLayout._infolayer,"g","dragcover",function(ae){Y._fullLayout._dragCover=ae}),r.raiseToTop(this),Z.interactionState.dragInProgress=Z.node,re(Z.node),Z.interactionState.hovered&&(H.nodeEvents.unhover.apply(0,Z.interactionState.hovered),Z.interactionState.hovered=!1),Z.arrangement==="snap")){var ee=Z.traceId+"|"+Z.key;Z.forceLayouts[ee]?Z.forceLayouts[ee].alpha(1):P(X,ee,Z,Y),j(X,K,Z,ee,Y)}}).on("drag",function(Z){if(Z.arrangement!=="fixed"){var ee=E.event.x,ae=E.event.y;Z.arrangement==="snap"?(Z.node.x0=ee-Z.visibleWidth/2,Z.node.x1=ee+Z.visibleWidth/2,Z.node.y0=ae-Z.visibleHeight/2,Z.node.y1=ae+Z.visibleHeight/2):(Z.arrangement==="freeform"&&(Z.node.x0=ee-Z.visibleWidth/2,Z.node.x1=ee+Z.visibleWidth/2),ae=Math.max(0,Math.min(Z.size-Z.visibleHeight/2,ae)),Z.node.y0=ae-Z.visibleHeight/2,Z.node.y1=ae+Z.visibleHeight/2),re(Z.node),Z.arrangement!=="snap"&&(Z.sankey.update(Z.graph),z(X.filter(ne(Z)),K))}}).on("dragend",function(Z){if(Z.arrangement!=="fixed"){Z.interactionState.dragInProgress=!1;for(var ee=0;ee0)window.requestAnimationFrame(Z);else{var he=H.node.originalX;H.node.x0=he-H.visibleWidth/2,H.node.x1=he+H.visibleWidth/2,$(H,q)}})}function U(X,K,H,Y){return function(){for(var Z=0,ee=0;ee0&&Y.forceLayouts[K].alpha(0)}}function $(X,K){for(var H=[],Y=[],q=0;qO(ke)?t.rgb(ke.linkLineColor):ke.rgb).style("stroke-opacity",ke=>O(ke)?t.opacity(ke.linkLineColor):ke.alpha).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha).style("stroke-width",ke=>O(ke)?ke.linkLineWidth:1).attr("d",f()),Me.style("opacity",function(){return X._context.staticPlot||ee||ae?1:0}).transition().ease(e.ease).duration(e.duration).style("opacity",1),Me.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Se=xe.selectAll("."+e.cn.sankeyNodeSet).data(m,c);Se.enter().append("g").classed(e.cn.sankeyNodeSet,!0),Se.style("cursor",function(ke){switch(ke.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var Ie=Se.selectAll("."+e.cn.sankeyNode).data(function(ke){var _e=ke.graph.nodes;return Q(_e),_e.map(u.bind(null,ke))},c);Ie.enter().append("g").classed(e.cn.sankeyNode,!0).call(A).style("opacity",function(ke){return(X._context.staticPlot||ee)&&!ke.partOfGroup?1:0}),Ie.call(B,xe,q.nodeEvents).call(F,Me,q,X),Ie.transition().ease(e.ease).duration(e.duration).call(A).style("opacity",function(ke){return ke.partOfGroup?0:1}),Ie.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Ve=Ie.selectAll("."+e.cn.nodeRect).data(m);Ve.enter().append("rect").classed(e.cn.nodeRect,!0).call(I),Ve.style("stroke-width",function(ke){return ke.nodeLineWidth}).style("stroke",function(ke){return t.rgb(ke.nodeLineColor)}).style("stroke-opacity",function(ke){return t.opacity(ke.nodeLineColor)}).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha),Ve.transition().ease(e.ease).duration(e.duration).call(I);var Ge=Ie.selectAll("."+e.cn.nodeLabel).data(m);Ge.enter().append("text").classed(e.cn.nodeLabel,!0).style("cursor","default"),Ge.attr("data-notex",1).text(function(ke){return ke.node.label}).each(function(ke){var _e=E.select(this);n.font(_e,ke.textFont),v.convertToTspans(_e,X)}).attr("text-anchor",function(ke){return ke.horizontal&&ke.left!==ke.reversed?"end":"start"}).attr("transform",function(ke){var _e=E.select(this),ce=v.lineCount(_e),ve=ke.textFont.size*((ce-1)*S-w),le=ke.nodeLineWidth/2+M;if(!ke.horizontal){var Xe=ke.reversed?(ke.visibleWidth+ve)/2:(ke.visibleWidth-ve)/2,Ae=ke.reversed?o(90):"scale(-1,1)"+o(90);return a(Xe,le)+Ae}var Be=le,Xe=(ke.visibleHeight-ve)/2;return ke.left?Be=-Be:Be+=ke.visibleWidth,a(Be,Xe)+(ke.reversed?"scale(-1,1)":"")}),Ge.transition().ease(e.ease).duration(e.duration)}}}),NM=ze({"src/traces/sankey/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=b.numberFormat,k=IV(),l=Zl(),e=Qn(),t=OM().cn,n=b._;function r(S){return S!==""}function a(S,M){return S.filter(function(C){return C.key===M.traceId})}function o(S,M){p.select(S).select("path").style("fill-opacity",M),p.select(S).select("rect").style("fill-opacity",M)}function s(S){p.select(S).select("text.name").style("fill","black")}function c(S){return function(M){return S.node.sourceLinks.indexOf(M.link)!==-1||S.node.targetLinks.indexOf(M.link)!==-1}}function m(S){return function(M){return M.node.sourceLinks.indexOf(S.link)!==-1||M.node.targetLinks.indexOf(S.link)!==-1}}function h(S,M,C){M&&C&&a(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(g.bind(0,M,C,!1))}function v(S,M,C){M&&C&&a(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(i.bind(0,M,C,!1))}function g(S,M,C,_){_.style("fill",function(T){if(!T.link.concentrationscale)return T.hoverRgb}).style("fill-opacity",function(T){if(!T.link.concentrationscale)return T.hoverAlpha}),_.each(function(T){var f=T.link.label;f!==""&&a(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===f}).style("fill",function(u){if(!u.link.concentrationscale)return u.hoverRgb}).style("fill-opacity",function(u){if(!u.link.concentrationscale)return u.hoverAlpha})}),C&&a(M,S).selectAll("."+t.sankeyNode).filter(m(S)).call(h)}function i(S,M,C,_){_.style("fill",function(T){return T.rgb}).style("fill-opacity",function(T){return T.alpha}),_.each(function(T){var f=T.link.label;f!==""&&a(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===f}).style("fill",u=>u.rgb).style("fill-opacity",u=>u.alpha)}),C&&a(M,S).selectAll(t.sankeyNode).filter(m(S)).call(v)}function w(S,M){var C=S.hoverlabel||{},_=b.nestedProperty(C,M).get();return Array.isArray(_)?!1:_}V.exports=function(M,C){for(var _=M._fullLayout,T=_._paper,f=_._size,u=0;u"),color:w(G,"bgcolor")||e.addOpacity(q.color,1),borderColor:w(G,"bordercolor"),fontFamily:w(G,"font.family"),fontSize:w(G,"font.size"),fontColor:w(G,"font.color"),fontWeight:w(G,"font.weight"),fontStyle:w(G,"font.style"),fontVariant:w(G,"font.variant"),fontTextcase:w(G,"font.textcase"),fontLineposition:w(G,"font.lineposition"),fontShadow:w(G,"font.shadow"),nameLength:w(G,"namelength"),textAlign:w(G,"align"),idealAlign:p.event.x"),color:w(G,"bgcolor")||se.rgb,borderColor:w(G,"bordercolor"),fontFamily:w(G,"font.family"),fontSize:w(G,"font.size"),fontColor:w(G,"font.color"),fontWeight:w(G,"font.weight"),fontStyle:w(G,"font.style"),fontVariant:w(G,"font.variant"),fontTextcase:w(G,"font.textcase"),fontLineposition:w(G,"font.lineposition"),fontShadow:w(G,"font.shadow"),nameLength:w(G,"namelength"),textAlign:w(G,"align"),idealAlign:"left",hovertemplate:G.hovertemplate,hovertemplateLabels:ee,eventData:[se.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:M});o(xe,.85),s(xe)}}},re=function(ne,se,G){M._fullLayout.hovermode!==!1&&(p.select(ne).call(v,se,G),se.node.trace.node.hoverinfo!=="skip"&&(se.node.fullData=se.node.trace,M.emit("plotly_unhover",{event:p.event,points:[se.node]})),l.loneUnhover(_._hoverlayer.node()))};k(M,T,C,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{linkEvents:{hover:z,follow:P,unhover:j,select:x},nodeEvents:{hover:$,follow:Q,unhover:re,select:U}})}}}),DV=ze({"src/traces/sankey/base_plot.js"(J){"use strict";var V=Al().overrideAll,p=zf().getModuleCalcData,b=NM(),E=rv(),k=gd(),l=_h(),e=_c().prepSelect,t=Nr(),n=mi(),r="sankey";J.name=r,J.baseLayoutAttrOverrides=V({hoverlabel:E.hoverlabel},"plot","nested"),J.plot=function(o){var s=p(o.calcdata,r)[0];b(o,s),J.updateFx(o)},J.clean=function(o,s,c,m){var h=m._has&&m._has(r),v=s._has&&s._has(r);h&&!v&&(m._paperdiv.selectAll(".sankey").remove(),m._paperdiv.selectAll(".bgsankey").remove())},J.updateFx=function(o){for(var s=0;s0}V.exports=function(D,B,F,P){var j=D._fullLayout,U;S(F)&&P&&(U=P()),k.makeTraceGroups(j._indicatorlayer,B,"trace").each(function($){var Q=$[0],re=Q.trace,ne=p.select(this),se=re._hasGauge,G=re._isAngular,X=re._isBullet,K=re.domain,H={w:j._size.w*(K.x[1]-K.x[0]),h:j._size.h*(K.y[1]-K.y[0]),l:j._size.l+j._size.w*K.x[0],r:j._size.r+j._size.w*(1-K.x[1]),t:j._size.t+j._size.h*(1-K.y[1]),b:j._size.b+j._size.h*K.y[0]},Y=H.l+H.w/2,q=H.t+H.h/2,Z=Math.min(H.w/2,H.h),ee=a.innerRadius*Z,ae,he,xe,we=re.align||"center";if(he=q,!se)ae=H.l+i[we]*H.w,xe=function(le){return A(le,H.w,H.h)};else if(G&&(ae=Y,he=q+Z/2,xe=function(le){return x(le,.9*ee)}),X){var Me=a.bulletPadding,Se=1-a.bulletNumberDomainSize+Me;ae=H.l+(Se+(1-Se)*i[we])*H.w,xe=function(le){return A(le,(a.bulletNumberDomainSize-Me)*H.w,H.h)}}_(D,ne,$,{numbersX:ae,numbersY:he,numbersScaler:xe,transitionOpts:F,onComplete:U});var Ie,Ve;se&&(Ie={range:re.gauge.axis.range,color:re.gauge.bgcolor,line:{color:re.gauge.bordercolor,width:0},thickness:1},Ve={range:re.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:re.gauge.bordercolor,width:re.gauge.borderwidth},thickness:1});var Ge=ne.selectAll("g.angular").data(G?$:[]);Ge.exit().remove();var ke=ne.selectAll("g.angularaxis").data(G?$:[]);ke.exit().remove(),G&&C(D,ne,$,{radius:Z,innerRadius:ee,gauge:Ge,layer:ke,size:H,gaugeBg:Ie,gaugeOutline:Ve,transitionOpts:F,onComplete:U});var _e=ne.selectAll("g.bullet").data(X?$:[]);_e.exit().remove();var ce=ne.selectAll("g.bulletaxis").data(X?$:[]);ce.exit().remove(),X&&M(D,ne,$,{gauge:_e,layer:ce,size:H,gaugeBg:Ie,gaugeOutline:Ve,transitionOpts:F,onComplete:U});var ve=ne.selectAll("text.title").data($);ve.exit().remove(),ve.enter().append("text").classed("title",!0),ve.attr("text-anchor",function(){return X?g.right:g[re.title.align]}).text(re.title.text).call(r.font,re.title.font).call(o.convertToTspans,D),ve.attr("transform",function(){var le=H.l+H.w*i[re.title.align],Ae,Be=a.titlePadding,Xe=r.bBox(ve.node());if(se){if(G)if(re.gauge.axis.visible){var Ye=r.bBox(ke.node());Ae=Ye.top-Be-Xe.bottom}else Ae=H.t+H.h/2-Z/2-Xe.bottom-Be;X&&(Ae=he-(Xe.top+Xe.bottom)/2,le=H.l-a.bulletPadding*H.w)}else Ae=re._numbersTop-Be-Xe.bottom;return e(le,Ae)})})};function M(O,D,B,F){var P=B[0].trace,j=F.gauge,U=F.layer,$=F.gaugeBg,Q=F.gaugeOutline,re=F.size,ne=P.domain,se=F.transitionOpts,G=F.onComplete,X,K,H,Y,q;j.enter().append("g").classed("bullet",!0),j.attr("transform",e(re.l,re.t)),U.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),U.selectAll("g.xbulletaxistick,path,text").remove();var Z=re.h,ee=P.gauge.bar.thickness*Z,ae=ne.x[0],he=ne.x[0]+(ne.x[1]-ne.x[0])*(P._hasNumber||P._hasDelta?1-a.bulletNumberDomainSize:1);X=u(O,P.gauge.axis),X._id="xbulletaxis",X.domain=[ae,he],X.setScale(),K=s.calcTicks(X),H=s.makeTransTickFn(X),Y=s.getTickSigns(X)[2],q=re.t+re.h,X.visible&&(s.drawTicks(O,X,{vals:X.ticks==="inside"?s.clipEnds(X,K):K,layer:U,path:s.makeTickPath(X,q,Y),transFn:H}),s.drawLabels(O,X,{vals:K,layer:U,transFn:H,labelFns:s.makeLabelFns(X,q)}));function xe(ke){ke.attr("width",function(_e){return Math.max(0,X.c2p(_e.range[1])-X.c2p(_e.range[0]))}).attr("x",function(_e){return X.c2p(_e.range[0])}).attr("y",function(_e){return .5*(1-_e.thickness)*Z}).attr("height",function(_e){return _e.thickness*Z})}var we=[$].concat(P.gauge.steps),Me=j.selectAll("g.bg-bullet").data(we);Me.enter().append("g").classed("bg-bullet",!0).append("rect"),Me.select("rect").call(xe).call(T),Me.exit().remove();var Se=j.selectAll("g.value-bullet").data([P.gauge.bar]);Se.enter().append("g").classed("value-bullet",!0).append("rect"),Se.select("rect").attr("height",ee).attr("y",(Z-ee)/2).call(T),S(se)?Se.select("rect").transition().duration(se.duration).ease(se.easing).each("end",function(){G&&G()}).each("interrupt",function(){G&&G()}).attr("width",Math.max(0,X.c2p(Math.min(P.gauge.axis.range[1],B[0].y)))):Se.select("rect").attr("width",typeof B[0].y=="number"?Math.max(0,X.c2p(Math.min(P.gauge.axis.range[1],B[0].y))):0),Se.exit().remove();var Ie=B.filter(function(){return P.gauge.threshold.value||P.gauge.threshold.value===0}),Ve=j.selectAll("g.threshold-bullet").data(Ie);Ve.enter().append("g").classed("threshold-bullet",!0).append("line"),Ve.select("line").attr("x1",X.c2p(P.gauge.threshold.value)).attr("x2",X.c2p(P.gauge.threshold.value)).attr("y1",(1-P.gauge.threshold.thickness)/2*Z).attr("y2",(1-(1-P.gauge.threshold.thickness)/2)*Z).call(v.stroke,P.gauge.threshold.line.color).style("stroke-width",P.gauge.threshold.line.width),Ve.exit().remove();var Ge=j.selectAll("g.gauge-outline").data([Q]);Ge.enter().append("g").classed("gauge-outline",!0).append("rect"),Ge.select("rect").call(xe).call(T),Ge.exit().remove()}function C(O,D,B,F){var P=B[0].trace,j=F.size,U=F.radius,$=F.innerRadius,Q=F.gaugeBg,re=F.gaugeOutline,ne=[j.l+j.w/2,j.t+j.h/2+U/2],se=F.gauge,G=F.layer,X=F.transitionOpts,K=F.onComplete,H=Math.PI/2;function Y(yt){var gt=P.gauge.axis.range[0],Tt=P.gauge.axis.range[1],At=(yt-gt)/(Tt-gt)*Math.PI-H;return At<-H?-H:At>H?H:At}function q(yt){return p.svg.arc().innerRadius(($+U)/2-yt/2*(U-$)).outerRadius(($+U)/2+yt/2*(U-$)).startAngle(-H)}function Z(yt){yt.attr("d",function(gt){return q(gt.thickness).startAngle(Y(gt.range[0])).endAngle(Y(gt.range[1]))()})}var ee,ae,he,xe;se.enter().append("g").classed("angular",!0),se.attr("transform",e(ne[0],ne[1])),G.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),G.selectAll("g.xangularaxistick,path,text").remove(),ee=u(O,P.gauge.axis),ee.type="linear",ee.range=P.gauge.axis.range,ee._id="xangularaxis",ee.ticklabeloverflow="allow",ee.setScale();var we=function(yt){return(ee.range[0]-yt.x)/(ee.range[1]-ee.range[0])*Math.PI+Math.PI},Me={},Se=s.makeLabelFns(ee,0),Ie=Se.labelStandoff;Me.xFn=function(yt){var gt=we(yt);return Math.cos(gt)*Ie},Me.yFn=function(yt){var gt=we(yt),Tt=Math.sin(gt)>0?.2:1;return-Math.sin(gt)*(Ie+yt.fontSize*Tt)+Math.abs(Math.cos(gt))*(yt.fontSize*n)},Me.anchorFn=function(yt){var gt=we(yt),Tt=Math.cos(gt);return Math.abs(Tt)<.1?"middle":Tt>0?"start":"end"},Me.heightFn=function(yt,gt,Tt){var At=we(yt);return-.5*(1+Math.sin(At))*Tt};var Ve=function(yt){return e(ne[0]+U*Math.cos(yt),ne[1]-U*Math.sin(yt))};he=function(yt){return Ve(we(yt))};var Ge=function(yt){var gt=we(yt);return Ve(gt)+"rotate("+-t(gt)+")"};if(ae=s.calcTicks(ee),xe=s.getTickSigns(ee)[2],ee.visible){xe=ee.ticks==="inside"?-1:1;var ke=(ee.linewidth||1)/2;s.drawTicks(O,ee,{vals:ae,layer:G,path:"M"+xe*ke+",0h"+xe*ee.ticklen,transFn:Ge}),s.drawLabels(O,ee,{vals:ae,layer:G,transFn:he,labelFns:Me})}var _e=[Q].concat(P.gauge.steps),ce=se.selectAll("g.bg-arc").data(_e);ce.enter().append("g").classed("bg-arc",!0).append("path"),ce.select("path").call(Z).call(T),ce.exit().remove();var ve=q(P.gauge.bar.thickness),le=se.selectAll("g.value-arc").data([P.gauge.bar]);le.enter().append("g").classed("value-arc",!0).append("path");var Ae=le.select("path");S(X)?(Ae.transition().duration(X.duration).ease(X.easing).each("end",function(){K&&K()}).each("interrupt",function(){K&&K()}).attrTween("d",f(ve,Y(B[0].lastY),Y(B[0].y))),P._lastValue=B[0].y):Ae.attr("d",typeof B[0].y=="number"?ve.endAngle(Y(B[0].y)):"M0,0Z"),Ae.call(T),le.exit().remove(),_e=[];var Be=P.gauge.threshold.value;(Be||Be===0)&&_e.push({range:[Be,Be],color:P.gauge.threshold.color,line:{color:P.gauge.threshold.line.color,width:P.gauge.threshold.line.width},thickness:P.gauge.threshold.thickness});var Xe=se.selectAll("g.threshold-arc").data(_e);Xe.enter().append("g").classed("threshold-arc",!0).append("path"),Xe.select("path").call(Z).call(T),Xe.exit().remove();var Ye=se.selectAll("g.gauge-outline").data([re]);Ye.enter().append("g").classed("gauge-outline",!0).append("path"),Ye.select("path").call(Z).call(T),Ye.exit().remove()}function _(O,D,B,F){var P=B[0].trace,j=F.numbersX,U=F.numbersY,$=P.align||"center",Q=g[$],re=F.transitionOpts,ne=F.onComplete,se=k.ensureSingle(D,"g","numbers"),G,X,K,H=[];P._hasNumber&&H.push("number"),P._hasDelta&&(H.push("delta"),P.delta.position==="left"&&H.reverse());var Y=se.selectAll("text").data(H);Y.enter().append("text"),Y.attr("text-anchor",function(){return Q}).attr("class",function(Ve){return Ve}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),Y.exit().remove();function q(Ve,Ge,ke,_e){if(Ve.match("s")&&ke>=0!=_e>=0&&!Ge(ke).slice(-1).match(w)&&!Ge(_e).slice(-1).match(w)){var ce=Ve.slice().replace("s","f").replace(/\d+/,function(le){return parseInt(le)-1}),ve=u(O,{tickformat:ce});return function(le){return Math.abs(le)<1?s.tickText(ve,le).text:Ge(le)}}else return Ge}function Z(){var Ve=u(O,{tickformat:P.number.valueformat},P._range);Ve.setScale(),s.prepTicks(Ve);var Ge=function(le){return s.tickText(Ve,le).text},ke=P.number.suffix,_e=P.number.prefix,ce=se.select("text.number");function ve(){var le=typeof B[0].y=="number"?_e+Ge(B[0].y)+ke:"-";ce.text(le).call(r.font,P.number.font).call(o.convertToTspans,O)}return S(re)?ce.transition().duration(re.duration).ease(re.easing).each("end",function(){ve(),ne&&ne()}).each("interrupt",function(){ve(),ne&&ne()}).attrTween("text",function(){var le=p.select(this),Ae=E(B[0].lastY,B[0].y);P._lastValue=B[0].y;var Be=q(P.number.valueformat,Ge,B[0].lastY,B[0].y);return function(Xe){le.text(_e+Be(Ae(Xe))+ke)}}):ve(),G=z(_e+Ge(B[0].y)+ke,P.number.font,Q,O),ce}function ee(){var Ve=u(O,{tickformat:P.delta.valueformat},P._range);Ve.setScale(),s.prepTicks(Ve);var Ge=function(Xe){return s.tickText(Ve,Xe).text},ke=P.delta.suffix,_e=P.delta.prefix,ce=function(Xe){var Ye=P.delta.relative?Xe.relativeDelta:Xe.delta;return Ye},ve=function(Xe,Ye){return Xe===0||typeof Xe!="number"||isNaN(Xe)?"-":(Xe>0?P.delta.increasing.symbol:P.delta.decreasing.symbol)+_e+Ye(Xe)+ke},le=function(Xe){return Xe.delta>=0?P.delta.increasing.color:P.delta.decreasing.color};P._deltaLastValue===void 0&&(P._deltaLastValue=ce(B[0]));var Ae=se.select("text.delta");Ae.call(r.font,P.delta.font).call(v.fill,le({delta:P._deltaLastValue}));function Be(){Ae.text(ve(ce(B[0]),Ge)).call(v.fill,le(B[0])).call(o.convertToTspans,O)}return S(re)?Ae.transition().duration(re.duration).ease(re.easing).tween("text",function(){var Xe=p.select(this),Ye=ce(B[0]),yt=P._deltaLastValue,gt=q(P.delta.valueformat,Ge,yt,Ye),Tt=E(yt,Ye);return P._deltaLastValue=Ye,function(At){Xe.text(ve(Tt(At),gt)),Xe.call(v.fill,le({delta:Tt(At)}))}}).each("end",function(){Be(),ne&&ne()}).each("interrupt",function(){Be(),ne&&ne()}):Be(),X=z(ve(ce(B[0]),Ge),P.delta.font,Q,O),Ae}var ae=P.mode+P.align,he;if(P._hasDelta&&(he=ee(),ae+=P.delta.position+P.delta.font.size+P.delta.font.family+P.delta.valueformat,ae+=P.delta.increasing.symbol+P.delta.decreasing.symbol,K=X),P._hasNumber&&(Z(),ae+=P.number.font.size+P.number.font.family+P.number.valueformat+P.number.suffix+P.number.prefix,K=G),P._hasDelta&&P._hasNumber){var xe=[(G.left+G.right)/2,(G.top+G.bottom)/2],we=[(X.left+X.right)/2,(X.top+X.bottom)/2],Me,Se,Ie=.75*P.delta.font.size;P.delta.position==="left"&&(Me=I(P,"deltaPos",0,-1*(G.width*i[P.align]+X.width*(1-i[P.align])+Ie),ae,Math.min),Se=xe[1]-we[1],K={width:G.width+X.width+Ie,height:Math.max(G.height,X.height),left:X.left+Me,right:G.right,top:Math.min(G.top,X.top+Se),bottom:Math.max(G.bottom,X.bottom+Se)}),P.delta.position==="right"&&(Me=I(P,"deltaPos",0,G.width*(1-i[P.align])+X.width*i[P.align]+Ie,ae,Math.max),Se=xe[1]-we[1],K={width:G.width+X.width+Ie,height:Math.max(G.height,X.height),left:G.left,right:X.right+Me,top:Math.min(G.top,X.top+Se),bottom:Math.max(G.bottom,X.bottom+Se)}),P.delta.position==="bottom"&&(Me=null,Se=X.height,K={width:Math.max(G.width,X.width),height:G.height+X.height,left:Math.min(G.left,X.left),right:Math.max(G.right,X.right),top:G.bottom-G.height,bottom:G.bottom+X.height}),P.delta.position==="top"&&(Me=null,Se=G.top,K={width:Math.max(G.width,X.width),height:G.height+X.height,left:Math.min(G.left,X.left),right:Math.max(G.right,X.right),top:G.bottom-G.height-X.height,bottom:G.bottom}),he.attr({dx:Me,dy:Se})}(P._hasNumber||P._hasDelta)&&se.attr("transform",function(){var Ve=F.numbersScaler(K);ae+=Ve[2];var Ge=I(P,"numbersScale",1,Ve[0],ae,Math.min),ke;P._scaleNumbers||(Ge=1),P._isAngular?ke=U-Ge*K.bottom:ke=U-Ge*(K.top+K.bottom)/2,P._numbersTop=Ge*K.top+ke;var _e=K[$];$==="center"&&(_e=(K.left+K.right)/2);var ce=j-Ge*_e;return ce=I(P,"numbersTranslate",0,ce,ae,Math.max),e(ce,ke)+l(Ge)})}function T(O){O.each(function(D){v.stroke(p.select(this),D.line.color)}).each(function(D){v.fill(p.select(this),D.color)}).style("stroke-width",function(D){return D.line.width})}function f(O,D,B){return function(){var F=b(D,B);return function(P){return O.endAngle(F(P))()}}}function u(O,D,B){var F=O._fullLayout,P=k.extendFlat({type:"linear",ticks:"outside",range:B,showline:!0},D),j={type:"linear",_id:"x"+D._id},U={letter:"x",font:F.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function $(Q,re){return k.coerce(P,j,h,Q,re)}return c(P,j,$,U,F),m(P,j,$,U),j}function A(O,D,B){var F=Math.min(D/O.width,B/O.height);return[F,O,D+"x"+B]}function x(O,D){var B=Math.sqrt(O.width/2*(O.width/2)+O.height*O.height),F=D/B;return[F,O,D]}function z(O,D,B,F){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),j=p.select(P);return j.text(O).attr("x",0).attr("y",0).attr("text-anchor",B).attr("data-unformatted",O).call(o.convertToTspans,F).call(r.font,D),r.bBox(j.node())}function I(O,D,B,F,P,j){var U="_cache"+D;O[U]&&O[U].key===P||(O[U]={key:P,value:B});var $=k.aggNums(j,null,[O[U].value,F],2);return O[U].value=$,$}}}),qV=ze({"src/traces/indicator/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"indicator",basePlotModule:OV(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:jM(),supplyDefaults:NV().supplyDefaults,calc:jV().calc,plot:UV(),meta:{}}}}),VV=ze({"lib/indicator.js"(J,V){"use strict";V.exports=qV()}}),qM=ze({"src/traces/table/attributes.js"(J,V){"use strict";var p=fv(),b=Ki().extendFlat,E=Al().overrideAll,k=Qs(),l=Ml().attributes,e=Il().descriptionOnlyNumbers,t=V.exports=E({domain:l({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:b({},p.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:b({},k({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:b({},p.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:b({},k({arrayOk:!0}))}},"calc","from-root")}}),GV=ze({"src/traces/table/defaults.js"(J,V){"use strict";var p=Nr(),b=qM(),E=Ml().defaults;function k(l,e){for(var t=l.columnorder||[],n=l.header.values.length,r=t.slice(0,n),a=r.slice().sort(function(c,m){return c-m}),o=r.map(function(c){return a.indexOf(c)}),s=o.length;s",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}}),WV=ze({"src/traces/table/data_preparation_helper.js"(J,V){"use strict";var p=VM(),b=Ki().extendFlat,E=ao(),k=Ff().isTypedArray,l=Ff().isArrayOrTypedArray;V.exports=function(h,v){var g=n(v.cells.values),i=function(Q){return Q.slice(v.header.values.length,Q.length)},w=n(v.header.values);w.length&&!w[0].length&&(w[0]=[""],w=n(w));var S=w.concat(i(g).map(function(){return r((w[0]||[""]).length)})),M=v.domain,C=Math.floor(h._fullLayout._size.w*(M.x[1]-M.x[0])),_=Math.floor(h._fullLayout._size.h*(M.y[1]-M.y[0])),T=v.header.values.length?S[0].map(function(){return v.header.height}):[p.emptyHeaderHeight],f=g.length?g[0].map(function(){return v.cells.height}):[],u=T.reduce(t,0),A=_-u,x=A+p.uplift,z=s(f,x),I=s(T,u),O=o(I,[]),D=o(z,O),B={},F=v.columnorder;l(F)&&(F=Array.from(F)),F=F.concat(i(g.map(function(Q,re){return re})));var P=S.map(function(Q,re){var ne=l(v.columnwidth)?v.columnwidth[Math.min(re,v.columnwidth.length-1)]:v.columnwidth;return E(ne)?Number(ne):1}),j=P.reduce(t,0);P=P.map(function(Q){return Q/j*C});var U=Math.max(e(v.header.line.width),e(v.cells.line.width)),$={key:v.uid+h._context.staticPlot,translateX:M.x[0]*h._fullLayout._size.w,translateY:h._fullLayout._size.h*(1-M.y[1]),size:h._fullLayout._size,width:C,maxLineWidth:U,height:_,columnOrder:F,groupHeight:_,rowBlocks:D,headerRowBlocks:O,scrollY:0,cells:b({},v.cells,{values:g}),headerCells:b({},v.header,{values:S}),gdColumns:S.map(function(Q){return Q[0]}),gdColumnsOriginalOrder:S.map(function(Q){return Q[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:S.map(function(Q,re){var ne=B[Q];B[Q]=(ne||0)+1;var se=Q+"__"+B[Q];return{key:se,label:Q,specIndex:re,xIndex:F[re],xScale:a,x:void 0,calcdata:void 0,columnWidth:P[re]}})};return $.columns.forEach(function(Q){Q.calcdata=$,Q.x=a(Q)}),$};function e(m){if(l(m)){for(var h=0,v=0;v=h||_===m.length-1)&&(v[i]=S,S.key=C++,S.firstRowIndex=M,S.lastRowIndex=_,S=c(),i+=w,M=_+1,w=0);return v}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),YV=ze({"src/traces/table/data_split_helpers.js"(J){"use strict";var V=Ki().extendFlat;J.splitToPanels=function(b){var E=[0,0],k=V({},b,{key:"header",type:"header",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!0,values:b.calcdata.headerCells.values[b.specIndex],rowBlocks:b.calcdata.headerRowBlocks,calcdata:V({},b.calcdata,{cells:b.calcdata.headerCells})}),l=V({},b,{key:"cells1",type:"cells",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks}),e=V({},b,{key:"cells2",type:"cells",page:1,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks});return[l,e,k]},J.splitToCells=function(b){var E=p(b);return(b.values||[]).slice(E[0],E[1]).map(function(k,l){var e=typeof k=="string"&&k.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:l+e,key:E[0]+l,column:b,calcdata:b.calcdata,page:b.page,rowBlocks:b.rowBlocks,value:k}})};function p(b){var E=b.rowBlocks[b.page],k=E?E.rows[0].rowIndex:0,l=E?k+E.rows.length:0;return[k,l]}}}),GM=ze({"src/traces/table/plot.js"(J,V){"use strict";var p=VM(),b=ci(),E=Nr(),k=E.numberFormat,l=Vd(),e=$i(),t=Cs(),n=Nr().raiseToTop,r=Nr().strTranslate,a=Nr().cancelTransition,o=WV(),s=YV(),c=Qn();V.exports=function(ae,he){var xe=!ae._context.staticPlot,we=ae._fullLayout._paper.selectAll("."+p.cn.table).data(he.map(function(Ye){var yt=l.unwrap(Ye),gt=yt.trace;return o(ae,gt)}),l.keyFun);we.exit().remove(),we.enter().append("g").classed(p.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),we.attr("width",function(Ye){return Ye.width+Ye.size.l+Ye.size.r}).attr("height",function(Ye){return Ye.height+Ye.size.t+Ye.size.b}).attr("transform",function(Ye){return r(Ye.translateX,Ye.translateY)});var Me=we.selectAll("."+p.cn.tableControlView).data(l.repeat,l.keyFun),Se=Me.enter().append("g").classed(p.cn.tableControlView,!0).style("box-sizing","content-box");if(xe){var Ie="onwheel"in document?"wheel":"mousewheel";Se.on("mousemove",function(Ye){Me.filter(function(yt){return Ye===yt}).call(i,ae)}).on(Ie,function(Ye){if(!Ye.scrollbarState.wheeling){Ye.scrollbarState.wheeling=!0;var yt=Ye.scrollY+b.event.deltaY,gt=Q(ae,Me,null,yt)(Ye);gt||(b.event.stopPropagation(),b.event.preventDefault()),Ye.scrollbarState.wheeling=!1}}).call(i,ae,!0)}Me.attr("transform",function(Ye){return r(Ye.size.l,Ye.size.t)});var Ve=Me.selectAll("."+p.cn.scrollBackground).data(l.repeat,l.keyFun);Ve.enter().append("rect").classed(p.cn.scrollBackground,!0).attr("fill","none"),Ve.attr("width",function(Ye){return Ye.width}).attr("height",function(Ye){return Ye.height}),Me.each(function(Ye){e.setClipUrl(b.select(this),h(ae,Ye),ae)});var Ge=Me.selectAll("."+p.cn.yColumn).data(function(Ye){return Ye.columns},l.keyFun);Ge.enter().append("g").classed(p.cn.yColumn,!0),Ge.exit().remove(),Ge.attr("transform",function(Ye){return r(Ye.x,0)}),xe&&Ge.call(b.behavior.drag().origin(function(Ye){var yt=b.select(this);return B(yt,Ye,-p.uplift),n(this),Ye.calcdata.columnDragInProgress=!0,i(Me.filter(function(gt){return Ye.calcdata.key===gt.key}),ae),Ye}).on("drag",function(Ye){var yt=b.select(this),gt=function($t){return(Ye===$t?b.event.x:$t.x)+$t.columnWidth/2};Ye.x=Math.max(-p.overdrag,Math.min(Ye.calcdata.width+p.overdrag-Ye.columnWidth,b.event.x));var Tt=g(Ge).filter(function($t){return $t.calcdata.key===Ye.calcdata.key}),At=Tt.sort(function($t,rr){return gt($t)-gt(rr)});At.forEach(function($t,rr){$t.xIndex=rr,$t.x=Ye===$t?$t.x:$t.xScale($t)}),Ge.filter(function($t){return Ye!==$t}).transition().ease(p.transitionEase).duration(p.transitionDuration).attr("transform",function($t){return r($t.x,0)}),yt.call(a).attr("transform",r(Ye.x,-p.uplift))}).on("dragend",function(Ye){var yt=b.select(this),gt=Ye.calcdata;Ye.x=Ye.xScale(Ye),Ye.calcdata.columnDragInProgress=!1,B(yt,Ye,0),O(ae,gt,gt.columns.map(function(Tt){return Tt.xIndex}))})),Ge.each(function(Ye){e.setClipUrl(b.select(this),v(ae,Ye),ae)});var ke=Ge.selectAll("."+p.cn.columnBlock).data(s.splitToPanels,l.keyFun);ke.enter().append("g").classed(p.cn.columnBlock,!0).attr("id",function(Ye){return Ye.key}),ke.style("cursor",function(Ye){return Ye.dragHandle?"ew-resize":Ye.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var _e=ke.filter(P),ce=ke.filter(F);xe&&ce.call(b.behavior.drag().origin(function(Ye){return b.event.stopPropagation(),Ye}).on("drag",Q(ae,Me,-1)).on("dragend",function(){})),w(ae,Me,_e,ke),w(ae,Me,ce,ke);var ve=Me.selectAll("."+p.cn.scrollAreaClip).data(l.repeat,l.keyFun);ve.enter().append("clipPath").classed(p.cn.scrollAreaClip,!0).attr("id",function(Ye){return h(ae,Ye)});var le=ve.selectAll("."+p.cn.scrollAreaClipRect).data(l.repeat,l.keyFun);le.enter().append("rect").classed(p.cn.scrollAreaClipRect,!0).attr("x",-p.overdrag).attr("y",-p.uplift).attr("fill","none"),le.attr("width",function(Ye){return Ye.width+2*p.overdrag}).attr("height",function(Ye){return Ye.height+p.uplift});var Ae=Ge.selectAll("."+p.cn.columnBoundary).data(l.repeat,l.keyFun);Ae.enter().append("g").classed(p.cn.columnBoundary,!0);var Be=Ge.selectAll("."+p.cn.columnBoundaryClippath).data(l.repeat,l.keyFun);Be.enter().append("clipPath").classed(p.cn.columnBoundaryClippath,!0),Be.attr("id",function(Ye){return v(ae,Ye)});var Xe=Be.selectAll("."+p.cn.columnBoundaryRect).data(l.repeat,l.keyFun);Xe.enter().append("rect").classed(p.cn.columnBoundaryRect,!0).attr("fill","none"),Xe.attr("width",function(Ye){return Ye.columnWidth+2*m(Ye)}).attr("height",function(Ye){return Ye.calcdata.height+2*m(Ye)+p.uplift}).attr("x",function(Ye){return-m(Ye)}).attr("y",function(Ye){return-m(Ye)}),$(null,ce,Me)};function m(ee){return Math.ceil(ee.calcdata.maxLineWidth/2)}function h(ee,ae){return"clip"+ee._fullLayout._uid+"_scrollAreaBottomClip_"+ae.key}function v(ee,ae){return"clip"+ee._fullLayout._uid+"_columnBoundaryClippath_"+ae.calcdata.key+"_"+ae.specIndex}function g(ee){return[].concat.apply([],ee.map(function(ae){return ae})).map(function(ae){return ae.__data__})}function i(ee,ae,he){function xe(Ge){var ke=Ge.rowBlocks;return K(ke,ke.length-1)+(ke.length?H(ke[ke.length-1],1/0):1)}var we=ee.selectAll("."+p.cn.scrollbarKit).data(l.repeat,l.keyFun);we.enter().append("g").classed(p.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),we.each(function(Ge){var ke=Ge.scrollbarState;ke.totalHeight=xe(Ge),ke.scrollableAreaHeight=Ge.groupHeight-j(Ge),ke.currentlyVisibleHeight=Math.min(ke.totalHeight,ke.scrollableAreaHeight),ke.ratio=ke.currentlyVisibleHeight/ke.totalHeight,ke.barLength=Math.max(ke.ratio*ke.currentlyVisibleHeight,p.goldenRatio*p.scrollbarWidth),ke.barWiggleRoom=ke.currentlyVisibleHeight-ke.barLength,ke.wiggleRoom=Math.max(0,ke.totalHeight-ke.scrollableAreaHeight),ke.topY=ke.barWiggleRoom===0?0:Ge.scrollY/ke.wiggleRoom*ke.barWiggleRoom,ke.bottomY=ke.topY+ke.barLength,ke.dragMultiplier=ke.wiggleRoom/ke.barWiggleRoom}).attr("transform",function(Ge){var ke=Ge.width+p.scrollbarWidth/2+p.scrollbarOffset;return r(ke,j(Ge))});var Me=we.selectAll("."+p.cn.scrollbar).data(l.repeat,l.keyFun);Me.enter().append("g").classed(p.cn.scrollbar,!0);var Se=Me.selectAll("."+p.cn.scrollbarSlider).data(l.repeat,l.keyFun);Se.enter().append("g").classed(p.cn.scrollbarSlider,!0),Se.attr("transform",function(Ge){return r(0,Ge.scrollbarState.topY||0)});var Ie=Se.selectAll("."+p.cn.scrollbarGlyph).data(l.repeat,l.keyFun);Ie.enter().append("line").classed(p.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",p.scrollbarWidth).attr("stroke-linecap","round").attr("y1",p.scrollbarWidth/2),Ie.attr("y2",function(Ge){return Ge.scrollbarState.barLength-p.scrollbarWidth/2}).attr("stroke-opacity",function(Ge){return Ge.columnDragInProgress||!Ge.scrollbarState.barWiggleRoom||he?0:.4}),Ie.transition().delay(0).duration(0),Ie.transition().delay(p.scrollbarHideDelay).duration(p.scrollbarHideDuration).attr("stroke-opacity",0);var Ve=Me.selectAll("."+p.cn.scrollbarCaptureZone).data(l.repeat,l.keyFun);Ve.enter().append("line").classed(p.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",p.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(Ge){var ke=b.event.y,_e=this.getBoundingClientRect(),ce=Ge.scrollbarState,ve=ke-_e.top,le=b.scale.linear().domain([0,ce.scrollableAreaHeight]).range([0,ce.totalHeight]).clamp(!0);ce.topY<=ve&&ve<=ce.bottomY||Q(ae,ee,null,le(ve-ce.barLength/2))(Ge)}).call(b.behavior.drag().origin(function(Ge){return b.event.stopPropagation(),Ge.scrollbarState.scrollbarScrollInProgress=!0,Ge}).on("drag",Q(ae,ee)).on("dragend",function(){})),Ve.attr("y2",function(Ge){return Ge.scrollbarState.scrollableAreaHeight}),ae._context.staticPlot&&(Ie.remove(),Ve.remove())}function w(ee,ae,he,xe){var we=S(he),Me=M(we);f(Me);var Se=C(Me);A(Se);var Ie=T(Me),Ve=_(Ie);u(Ve),x(Ve,ae,xe,ee),X(Me)}function S(ee){var ae=ee.selectAll("."+p.cn.columnCells).data(l.repeat,l.keyFun);return ae.enter().append("g").classed(p.cn.columnCells,!0),ae.exit().remove(),ae}function M(ee){var ae=ee.selectAll("."+p.cn.columnCell).data(s.splitToCells,function(he){return he.keyWithinBlock});return ae.enter().append("g").classed(p.cn.columnCell,!0),ae.exit().remove(),ae}function C(ee){var ae=ee.selectAll("."+p.cn.cellRect).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("rect").classed(p.cn.cellRect,!0),ae}function _(ee){var ae=ee.selectAll("."+p.cn.cellText).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("text").classed(p.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){b.event.stopPropagation()}),ae}function T(ee){var ae=ee.selectAll("."+p.cn.cellTextHolder).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("g").classed(p.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ae}function f(ee){ee.each(function(ae,he){var xe=ae.calcdata.cells.font,we=ae.column.specIndex,Me={size:D(xe.size,we,he),color:D(xe.color,we,he),family:D(xe.family,we,he),weight:D(xe.weight,we,he),style:D(xe.style,we,he),variant:D(xe.variant,we,he),textcase:D(xe.textcase,we,he),lineposition:D(xe.lineposition,we,he),shadow:D(xe.shadow,we,he)};ae.rowNumber=ae.key,ae.align=D(ae.calcdata.cells.align,we,he),ae.cellBorderWidth=D(ae.calcdata.cells.line.width,we,he),ae.font=Me})}function u(ee){ee.each(function(ae){e.font(b.select(this),ae.font)})}function A(ee){ee.attr("width",function(ae){return ae.column.columnWidth}).attr("stroke-width",function(ae){return ae.cellBorderWidth}).each(function(ae){var he=b.select(this);c.stroke(he,D(ae.calcdata.cells.line.color,ae.column.specIndex,ae.rowNumber)),c.fill(he,D(ae.calcdata.cells.fill.color,ae.column.specIndex,ae.rowNumber))})}function x(ee,ae,he,xe){ee.text(function(we){var Me=we.column.specIndex,Se=we.rowNumber,Ie=we.value,Ve=typeof Ie=="string",Ge=Ve&&Ie.match(/
/i),ke=!Ve||Ge;we.mayHaveMarkup=Ve&&Ie.match(/[<&>]/);var _e=z(Ie);we.latex=_e;var ce=_e?"":D(we.calcdata.cells.prefix,Me,Se)||"",ve=_e?"":D(we.calcdata.cells.suffix,Me,Se)||"",le=_e?null:D(we.calcdata.cells.format,Me,Se)||null,Ae=ce+(le?k(le)(we.value):we.value)+ve,Be;we.wrappingNeeded=!we.wrapped&&!ke&&!_e&&(Be=I(Ae)),we.cellHeightMayIncrease=Ge||_e||we.mayHaveMarkup||(Be===void 0?I(Ae):Be),we.needsConvertToTspans=we.mayHaveMarkup||we.wrappingNeeded||we.latex;var Xe;if(we.wrappingNeeded){var Ye=p.wrapSplitCharacter===" "?Ae.replace(/we&&xe.push(Me),we+=Ve}return xe}function $(ee,ae,he){var xe=g(ae)[0];if(xe!==void 0){var we=xe.rowBlocks,Me=xe.calcdata,Se=K(we,we.length),Ie=xe.calcdata.groupHeight-j(xe),Ve=Me.scrollY=Math.max(0,Math.min(Se-Ie,Me.scrollY)),Ge=U(we,Ve,Ie);Ge.length===1&&(Ge[0]===we.length-1?Ge.unshift(Ge[0]-1):Ge.push(Ge[0]+1)),Ge[0]%2&&Ge.reverse(),ae.each(function(ke,_e){ke.page=Ge[_e],ke.scrollY=Ve}),ae.attr("transform",function(ke){var _e=K(ke.rowBlocks,ke.page)-ke.scrollY;return r(0,_e)}),ee&&(re(ee,he,ae,Ge,xe.prevPages,xe,0),re(ee,he,ae,Ge,xe.prevPages,xe,1),i(he,ee))}}function Q(ee,ae,he,xe){return function(Me){var Se=Me.calcdata?Me.calcdata:Me,Ie=ae.filter(function(_e){return Se.key===_e.key}),Ve=he||Se.scrollbarState.dragMultiplier,Ge=Se.scrollY;Se.scrollY=xe===void 0?Se.scrollY+Ve*b.event.dy:xe;var ke=Ie.selectAll("."+p.cn.yColumn).selectAll("."+p.cn.columnBlock).filter(F);return $(ee,ke,Ie),Se.scrollY===Ge}}function re(ee,ae,he,xe,we,Me,Se){var Ie=xe[Se]!==we[Se];Ie&&(clearTimeout(Me.currentRepaint[Se]),Me.currentRepaint[Se]=setTimeout(function(){var Ve=he.filter(function(Ge,ke){return ke===Se&&xe[ke]!==we[ke]});w(ee,ae,Ve,he),we[Se]=xe[Se]}))}function ne(ee,ae,he,xe){return function(){var Me=b.select(ae.parentNode);Me.each(function(Se){var Ie=Se.fragments;Me.selectAll("tspan.line").each(function(Ae,Be){Ie[Be].width=this.getComputedTextLength()});var Ve=Ie[Ie.length-1].width,Ge=Ie.slice(0,-1),ke=[],_e,ce,ve=0,le=Se.column.columnWidth-2*p.cellPad;for(Se.value="";Ge.length;)_e=Ge.shift(),ce=_e.width+Ve,ve+ce>le&&(Se.value+=ke.join(p.wrapSpacer)+p.lineBreaker,ke=[],ve=0),ke.push(_e.text),ve+=ce;ve&&(Se.value+=ke.join(p.wrapSpacer)),Se.wrapped=!0}),Me.selectAll("tspan.line").remove(),x(Me.select("."+p.cn.cellText),he,ee,xe),b.select(ae.parentNode.parentNode).call(X)}}function se(ee,ae,he,xe,we){return function(){if(!we.settledY){var Se=b.select(ae.parentNode),Ie=q(we),Ve=we.key-Ie.firstRowIndex,Ge=Ie.rows[Ve].rowHeight,ke=we.cellHeightMayIncrease?ae.parentNode.getBoundingClientRect().height+2*p.cellPad:Ge,_e=Math.max(ke,Ge),ce=_e-Ie.rows[Ve].rowHeight;ce&&(Ie.rows[Ve].rowHeight=_e,ee.selectAll("."+p.cn.columnCell).call(X),$(null,ee.filter(F),0),i(he,xe,!0)),Se.attr("transform",function(){var ve=this,le=ve.parentNode,Ae=le.getBoundingClientRect(),Be=b.select(ve.parentNode).select("."+p.cn.cellRect).node().getBoundingClientRect(),Xe=ve.transform.baseVal.consolidate(),Ye=Be.top-Ae.top+(Xe?Xe.matrix.f:p.cellPad);return r(G(we,b.select(ve.parentNode).select("."+p.cn.cellTextHolder).node().getBoundingClientRect().width),Ye)}),we.settledY=!0}}}function G(ee,ae){switch(ee.align){case"left":return p.cellPad;case"right":return ee.column.columnWidth-(ae||0)-p.cellPad;case"center":return(ee.column.columnWidth-(ae||0))/2;default:return p.cellPad}}function X(ee){ee.attr("transform",function(ae){var he=ae.rowBlocks[0].auxiliaryBlocks.reduce(function(Se,Ie){return Se+H(Ie,1/0)},0),xe=q(ae),we=H(xe,ae.key),Me=we+he;return r(0,Me)}).selectAll("."+p.cn.cellRect).attr("height",function(ae){return Z(q(ae),ae.key).rowHeight})}function K(ee,ae){for(var he=0,xe=ae-1;xe>=0;xe--)he+=Y(ee[xe]);return he}function H(ee,ae){for(var he=0,xe=0;xek.length&&(E=E.slice(0,k.length)):E=[],e=0;e90&&(h-=180,a=-a),{angle:h,flip:a,p:b.c2p(l,E,k),offsetMultplier:o}}}}),aG=ze({"src/traces/carpet/plot.js"(J,V){"use strict";var p=ci(),b=$i(),E=HM(),k=WM(),l=rG(),e=Cs(),t=Nr(),n=t.strRotate,r=t.strTranslate,a=dc();V.exports=function(w,S,M,C){var _=w._context.staticPlot,T=S.xaxis,f=S.yaxis,u=w._fullLayout,A=u._clips;t.makeTraceGroups(C,M,"trace").each(function(x){var z=p.select(this),I=x[0],O=I.trace,D=O.aaxis,B=O.baxis,F=t.ensureSingle(z,"g","minorlayer"),P=t.ensureSingle(z,"g","majorlayer"),j=t.ensureSingle(z,"g","boundarylayer"),U=t.ensureSingle(z,"g","labellayer");z.style("opacity",O.opacity),s(T,f,P,D,"a",D._gridlines,!0,_),s(T,f,P,B,"b",B._gridlines,!0,_),s(T,f,F,D,"a",D._minorgridlines,!0,_),s(T,f,F,B,"b",B._minorgridlines,!0,_),s(T,f,j,D,"a-boundary",D._boundarylines,_),s(T,f,j,B,"b-boundary",B._boundarylines,_);var $=c(w,T,f,O,I,U,D._labels,"a-label"),Q=c(w,T,f,O,I,U,B._labels,"b-label");m(w,U,O,I,T,f,$,Q),o(O,I,A,T,f)})};function o(i,w,S,M,C){var _,T,f,u,A=S.select("#"+i._clipPathId);A.size()||(A=S.append("clipPath").classed("carpetclip",!0));var x=t.ensureSingle(A,"path","carpetboundary"),z=w.clipsegments,I=[];for(u=0;u0?"start":"end","data-notex":1}).call(b.font,z.font).text(z.text).call(e.convertToTspans,i),P=b.bBox(this);F.attr("transform",r(O.p[0],O.p[1])+n(O.angle)+r(z.axis.labelpadding*B,P.height*.3)),A=Math.max(A,P.width+z.axis.labelpadding)}),u.exit().remove(),x.maxExtent=A,x}function m(i,w,S,M,C,_,T,f){var u,A,x,z,I=t.aggNums(Math.min,null,S.a),O=t.aggNums(Math.max,null,S.a),D=t.aggNums(Math.min,null,S.b),B=t.aggNums(Math.max,null,S.b);u=.5*(I+O),A=D,x=S.ab2xy(u,A,!0),z=S.dxyda_rough(u,A),T.angle===void 0&&t.extendFlat(T,l(S,C,_,x,S.dxydb_rough(u,A))),g(i,w,S,M,x,z,S.aaxis,C,_,T,"a-title"),u=I,A=.5*(D+B),x=S.ab2xy(u,A,!0),z=S.dxydb_rough(u,A),f.angle===void 0&&t.extendFlat(f,l(S,C,_,x,S.dxyda_rough(u,A))),g(i,w,S,M,x,z,S.baxis,C,_,f,"b-title")}var h=a.LINE_SPACING,v=(1-a.MID_SHIFT)/h+1;function g(i,w,S,M,C,_,T,f,u,A,x){var z=[];T.title.text&&z.push(T.title.text);var I=w.selectAll("text."+x).data(z),O=A.maxExtent;I.enter().append("text").classed(x,!0),I.each(function(){var D=l(S,f,u,C,_);["start","both"].indexOf(T.showticklabels)===-1&&(O=0);var B=T.title.font.size;O+=B+T.title.offset;var F=A.angle+(A.flip<0?180:0),P=(F-D.angle+450)%360,j=P>90&&P<270,U=p.select(this);U.text(T.title.text).call(e.convertToTspans,i),j&&(O=(-e.lineCount(U)+v)*h*B-O),U.attr("transform",r(D.p[0],D.p[1])+n(D.angle)+r(0,O)).attr("text-anchor","middle").call(b.font,T.title.font)}),I.exit().remove()}}}),nG=ze({"src/traces/carpet/cheater_basis.js"(J,V){"use strict";var p=Nr().isArrayOrTypedArray;V.exports=function(b,E,k){var l,e,t,n,r,a,o=[],s=p(b)?b.length:b,c=p(E)?E.length:E,m=p(b)?b:null,h=p(E)?E:null;m&&(t=(m.length-1)/(m[m.length-1]-m[0])/(s-1)),h&&(n=(h.length-1)/(h[h.length-1]-h[0])/(c-1));var v,g=1/0,i=-1/0;for(e=0;e=10)return null;for(var l=1/0,e=-1/0,t=E.length,n=0;n0&&(H=k.dxydi([],$-1,re,0,ne),ee.push(se[0]+H[0]/3),ae.push(se[1]+H[1]/3),Y=k.dxydi([],$-1,re,1,ne),ee.push(K[0]-Y[0]/3),ae.push(K[1]-Y[1]/3)),ee.push(K[0]),ae.push(K[1]),se=K;else for($=k.a2i(U),G=Math.floor(Math.max(0,Math.min(D-2,$))),X=$-G,he.length=D,he.crossLength=B,he.xy=function(xe){return k.evalxy([],$,xe)},he.dxy=function(xe,we){return k.dxydj([],G,xe,X,we)},Q=0;Q0&&(q=k.dxydj([],G,Q-1,X,0),ee.push(se[0]+q[0]/3),ae.push(se[1]+q[1]/3),Z=k.dxydj([],G,Q-1,X,1),ee.push(K[0]-Z[0]/3),ae.push(K[1]-Z[1]/3)),ee.push(K[0]),ae.push(K[1]),se=K;return he.axisLetter=l,he.axis=C,he.crossAxis=A,he.value=U,he.constvar=e,he.index=m,he.x=ee,he.y=ae,he.smoothing=A.smoothing,he}function j(U){var $,Q,re,ne,se,G=[],X=[],K={};if(K.length=M.length,K.crossLength=u.length,l==="b")for(re=Math.max(0,Math.min(B-2,U)),se=Math.min(1,Math.max(0,U-re)),K.xy=function(H){return k.evalxy([],H,U)},K.dxy=function(H,Y){return k.dxydi([],H,re,Y,se)},$=0;$M.length-1)&&_.push(b(j(n),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(m=s;mM.length-1)&&!(g<0||g>M.length-1))for(i=M[r],w=M[g],t=0;tM[M.length-1])&&T.push(b(P(v),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash})));C.startline&&f.push(b(j(0),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&f.push(b(j(M.length-1),{color:C.endlinecolor,width:C.endlinewidth}))}else{for(a=5e-15,o=[Math.floor((M[M.length-1]-C.tick0)/C.dtick*(1+a)),Math.ceil((M[0]-C.tick0)/C.dtick/(1+a))].sort(function(U,$){return U-$}),s=o[0],c=o[1],m=s;m<=c;m++)h=C.tick0+C.dtick*m,_.push(b(P(h),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(m=s-1;mM[M.length-1])&&T.push(b(P(v),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash}));C.startline&&f.push(b(P(M[0]),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&f.push(b(P(M[M.length-1]),{color:C.endlinecolor,width:C.endlinewidth}))}}}}),sG=ze({"src/traces/carpet/calc_labels.js"(J,V){"use strict";var p=Gi(),b=Ki().extendFlat;V.exports=function(k,l){var e,t,n,r,a,o=l._labels=[],s=l._gridlines;for(e=0;e=0;e--)t[s-e]=b[c][e],n[s-e]=E[c][e];for(r.push({x:t,y:n,bicubic:a}),e=c,t=[],n=[];e>=0;e--)t[c-e]=b[e][0],n[c-e]=E[e][0];return r.push({x:t,y:n,bicubic:o}),r}}}),uG=ze({"src/traces/carpet/smooth_fill_2d_array.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k,l){var e,t,n,r=[],a=[],o=E[0].length,s=E.length;function c(Q,re){var ne=0,se,G=0;return Q>0&&(se=E[re][Q-1])!==void 0&&(G++,ne+=se),Q0&&(se=E[re-1][Q])!==void 0&&(G++,ne+=se),re0&&t0&&eu);return p.log("Smoother converged to",A,"after",z,"iterations"),E}}}),cG=ze({"src/traces/carpet/constants.js"(J,V){"use strict";V.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),fG=ze({"src/traces/carpet/catmull_rom.js"(J,V){"use strict";var p=.5;V.exports=function(E,k,l,e){var t=E[0]-k[0],n=E[1]-k[1],r=l[0]-k[0],a=l[1]-k[1],o=Math.pow(t*t+n*n,p/2),s=Math.pow(r*r+a*a,p/2),c=(s*s*t-o*o*r)*e,m=(s*s*n-o*o*a)*e,h=s*(o+s)*3,v=o*(o+s)*3;return[[k[0]+(h&&c/h),k[1]+(h&&m/h)],[k[0]-(v&&c/v),k[1]-(v&&m/v)]]}}}),hG=ze({"src/traces/carpet/compute_control_points.js"(J,V){"use strict";var p=fG(),b=Nr().ensureArray;function E(k,l,e){var t=-.5*e[0]+1.5*l[0],n=-.5*e[1]+1.5*l[1];return[(2*t+k[0])/3,(2*n+k[1])/3]}V.exports=function(l,e,t,n,r,a){var o,s,c,m,h,v,g,i,w,S,M=t[0].length,C=t.length,_=r?3*M-2:M,T=a?3*C-2:C;for(l=b(l,T),e=b(e,T),c=0;ch&&_g&&Tv||Ti},n.setScale=function(){var _=n._x,T=n._y,f=E(n._xctrl,n._yctrl,_,T,c.smoothing,m.smoothing);n._xctrl=f[0],n._yctrl=f[1],n.evalxy=k([n._xctrl,n._yctrl],o,s,c.smoothing,m.smoothing),n.dxydi=l([n._xctrl,n._yctrl],c.smoothing,m.smoothing),n.dxydj=e([n._xctrl,n._yctrl],c.smoothing,m.smoothing)},n.i2a=function(_){var T=Math.max(0,Math.floor(_[0]),o-2),f=_[0]-T;return(1-f)*r[T]+f*r[T+1]},n.j2b=function(_){var T=Math.max(0,Math.floor(_[1]),o-2),f=_[1]-T;return(1-f)*a[T]+f*a[T+1]},n.ij2ab=function(_){return[n.i2a(_[0]),n.j2b(_[1])]},n.a2i=function(_){var T=Math.max(0,Math.min(b(_,r),o-2)),f=r[T],u=r[T+1];return Math.max(0,Math.min(o-1,T+(_-f)/(u-f)))},n.b2j=function(_){var T=Math.max(0,Math.min(b(_,a),s-2)),f=a[T],u=a[T+1];return Math.max(0,Math.min(s-1,T+(_-f)/(u-f)))},n.ab2ij=function(_){return[n.a2i(_[0]),n.b2j(_[1])]},n.i2c=function(_,T){return n.evalxy([],_,T)},n.ab2xy=function(_,T,f){if(!f&&(_r[o-1]|Ta[s-1]))return[!1,!1];var u=n.a2i(_),A=n.b2j(T),x=n.evalxy([],u,A);if(f){var z=0,I=0,O=[],D,B,F,P;_r[o-1]?(D=o-2,B=1,z=(_-r[o-1])/(r[o-1]-r[o-2])):(D=Math.max(0,Math.min(o-2,Math.floor(u))),B=u-D),Ta[s-1]?(F=s-2,P=1,I=(T-a[s-1])/(a[s-1]-a[s-2])):(F=Math.max(0,Math.min(s-2,Math.floor(A))),P=A-F),z&&(n.dxydi(O,D,F,B,P),x[0]+=O[0]*z,x[1]+=O[1]*z),I&&(n.dxydj(O,D,F,B,P),x[0]+=O[0]*I,x[1]+=O[1]*I)}return x},n.c2p=function(_,T,f){return[T.c2p(_[0]),f.c2p(_[1])]},n.p2x=function(_,T,f){return[T.p2c(_[0]),f.p2c(_[1])]},n.dadi=function(_){var T=Math.max(0,Math.min(r.length-2,_));return r[T+1]-r[T]},n.dbdj=function(_){var T=Math.max(0,Math.min(a.length-2,_));return a[T+1]-a[T]},n.dxyda=function(_,T,f,u){var A=n.dxydi(null,_,T,f,u),x=n.dadi(_,f);return[A[0]/x,A[1]/x]},n.dxydb=function(_,T,f,u){var A=n.dxydj(null,_,T,f,u),x=n.dbdj(T,u);return[A[0]/x,A[1]/x]},n.dxyda_rough=function(_,T,f){var u=w*(f||.1),A=n.ab2xy(_+u,T,!0),x=n.ab2xy(_-u,T,!0);return[(A[0]-x[0])*.5/u,(A[1]-x[1])*.5/u]},n.dxydb_rough=function(_,T,f){var u=S*(f||.1),A=n.ab2xy(_,T+u,!0),x=n.ab2xy(_,T-u,!0);return[(A[0]-x[0])*.5/u,(A[1]-x[1])*.5/u]},n.dpdx=function(_){return _._m},n.dpdy=function(_){return _._m}}}}),gG=ze({"src/traces/carpet/calc.js"(J,V){"use strict";var p=Gi(),b=Nr().isArray1D,E=nG(),k=iG(),l=oG(),e=sG(),t=lG(),n=lb(),r=uG(),a=sb(),o=mG();V.exports=function(c,m){var h=p.getFromId(c,m.xaxis),v=p.getFromId(c,m.yaxis),g=m.aaxis,i=m.baxis,w=m.x,S=m.y,M=[];w&&b(w)&&M.push("x"),S&&b(S)&&M.push("y"),M.length&&a(m,g,i,"a","b",M);var C=m._a=m._a||m.a,_=m._b=m._b||m.b;w=m._x||m.x,S=m._y||m.y;var T={};if(m._cheater){var f=g.cheatertype==="index"?C.length:C,u=i.cheatertype==="index"?_.length:_;w=E(f,u,m.cheaterslope)}m._x=w=n(w),m._y=S=n(S),r(w,C,_),r(S,C,_),o(m),m.setScale();var A=k(w),x=k(S),z=.5*(A[1]-A[0]),I=.5*(A[1]+A[0]),O=.5*(x[1]-x[0]),D=.5*(x[1]+x[0]),B=1.3;return A=[I-z*B,I+z*B],x=[D-O*B,D+O*B],m._extremes[h._id]=p.findExtremes(h,A,{padded:!0}),m._extremes[v._id]=p.findExtremes(v,x,{padded:!0}),l(m,"a","b"),l(m,"b","a"),e(m,g),e(m,i),T.clipsegments=t(m._xctrl,m._yctrl,g,i),T.x=w,T.y=S,T.a=C,T.b=_,[T]}}}),yG=ze({"src/traces/carpet/index.js"(J,V){"use strict";V.exports={attributes:H2(),supplyDefaults:tG(),plot:aG(),calc:gG(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Du(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),_G=ze({"lib/carpet.js"(J,V){"use strict";V.exports=yG()}}),YM=ze({"src/traces/scattercarpet/attributes.js"(J,V){"use strict";var p=Bd(),b=su(),E=ws(),{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=qs(),n=Ki().extendFlat,r=b.marker,a=b.line,o=r.line;V.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:n({},b.mode,{dflt:"markers"}),text:n({},b.text,{}),texttemplate:l({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:n({},b.hovertext,{}),line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:n({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:b.connectgaps,fill:n({},b.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:p(),marker:n({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:n({width:o.width,dash:o.dash,editType:"calc"},t("marker.line")),gradient:r.gradient,editType:"calc"},t("marker")),textfont:b.textfont,textposition:b.textposition,selected:b.selected,unselected:b.unselected,hoverinfo:n({},E.hoverinfo,{flags:["a","b","text","name"]}),hoveron:b.hoveron,hovertemplate:k(),hovertemplatefallback:e(),zorder:b.zorder}}}),xG=ze({"src/traces/scattercarpet/defaults.js"(J,V){"use strict";var p=Nr(),b=zd(),E=el(),k=id(),l=_d(),e=$m(),t=xd(),n=Od(),r=YM();V.exports=function(o,s,c,m){function h(C,_){return p.coerce(o,s,r,C,_)}h("carpet"),s.xaxis="x",s.yaxis="y";var v=h("a"),g=h("b"),i=Math.min(v.length,g.length);if(!i){s.visible=!1;return}s._length=i,h("text"),h("texttemplate"),h("texttemplatefallback"),h("hovertext");var w=i0?T=C.labelprefix.replace(/ = $/,""):T=C._hovertitle,i.push(T+": "+_.toFixed(3)+C.labelsuffix)}if(!h.hovertemplate){var S=m.hi||h.hoverinfo,M=S.split("+");M.indexOf("all")!==-1&&(M=["a","b","text"]),M.indexOf("a")!==-1&&w(v.aaxis,m.a),M.indexOf("b")!==-1&&w(v.baxis,m.b),i.push("y: "+r.yLabel),M.indexOf("text")!==-1&&b(m,h,i),r.extraText=i.join("
")}return n}}}),MG=ze({"src/traces/scattercarpet/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){var t=l[e];return b.a=t.a,b.b=t.b,b.y=t.y,b}}}),SG=ze({"src/traces/scattercarpet/index.js"(J,V){"use strict";V.exports={attributes:YM(),supplyDefaults:xG(),colorbar:Of(),formatLabels:bG(),calc:wG(),plot:TG(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:AG(),selectPoints:Yv(),eventData:MG(),moduleType:"trace",name:"scattercarpet",basePlotModule:Du(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),EG=ze({"lib/scattercarpet.js"(J,V){"use strict";V.exports=SG()}}),XM=ze({"src/traces/contourcarpet/attributes.js"(J,V){"use strict";var p=rg(),b=M1(),E=qs(),k=Ki().extendFlat,l=b.contours;V.exports=k({carpet:{valType:"string",editType:"calc"},z:p.z,a:p.x,a0:p.x0,da:p.dx,b:p.y,b0:p.y0,db:p.dy,text:p.text,hovertext:p.hovertext,transpose:p.transpose,atype:p.xtype,btype:p.ytype,fillcolor:b.fillcolor,autocontour:b.autocontour,ncontours:b.ncontours,contours:{type:l.type,start:l.start,end:l.end,size:l.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:l.showlines,showlabels:l.showlabels,labelfont:l.labelfont,labelformat:l.labelformat,operation:l.operation,value:l.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:b.line.color,width:b.line.width,dash:b.line.dash,smoothing:b.line.smoothing,editType:"plot"},zorder:b.zorder},E("",{cLetter:"z",autoColorDflt:!1}))}}),ZM=ze({"src/traces/contourcarpet/defaults.js"(J,V){"use strict";var p=Nr(),b=ob(),E=XM(),k=hT(),l=xb(),e=bb();V.exports=function(n,r,a,o){function s(v,g){return p.coerce(n,r,E,v,g)}function c(v){return p.coerce2(n,r,E,v)}if(s("carpet"),n.a&&n.b){var m=b(n,r,s,o,"a","b");if(!m){r.visible=!1;return}s("text");var h=s("contours.type")==="constraint";h?k(n,r,s,o,a,{hasHover:!1}):(l(n,r,s,c),e(n,r,s,o,{hasHover:!1}))}else r._defaultColor=a,r._length=null;s("zorder")}}}),kG=ze({"src/traces/contourcarpet/calc.js"(J,V){"use strict";var p=Qf(),b=Nr(),E=sb(),k=lb(),l=ub(),e=cb(),t=$5(),n=ZM(),r=W2(),a=aT();V.exports=function(c,m){var h=m._carpetTrace=r(c,m);if(!(!h||!h.visible||h.visible==="legendonly")){if(!m.a||!m.b){var v=c.data[h.index],g=c.data[m.index];g.a||(g.a=v.a),g.b||(g.b=v.b),n(g,m,m._defaultColor,c._fullLayout)}var i=o(c,m);return a(m,m._z),i}};function o(s,c){var m=c._carpetTrace,h=m.aaxis,v=m.baxis,g,i,w,S,M,C,_;h._minDtick=0,v._minDtick=0,b.isArray1D(c.z)&&E(c,h,v,"a","b",["z"]),g=c._a=c._a||c.a,S=c._b=c._b||c.b,g=g?h.makeCalcdata(c,"_a"):[],S=S?v.makeCalcdata(c,"_b"):[],i=c.a0||0,w=c.da||1,M=c.b0||0,C=c.db||1,_=c._z=k(c._z||c.z,c.transpose),c._emptypoints=e(_),l(_,c._emptypoints);var T=b.maxRowLength(_),f=c.xtype==="scaled"?"":g,u=t(c,f,i,w,T,h),A=c.ytype==="scaled"?"":S,x=t(c,A,M,C,_.length,v),z={a:u,b:x,z:_};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&p(s,c,{vals:_,containerStr:"",cLetter:"z"}),[z]}}}),CG=ze({"src/traces/carpet/axis_aligned_line.js"(J,V){"use strict";var p=Nr().isArrayOrTypedArray;V.exports=function(b,E,k,l){var e,t,n,r,a,o,s,c,m,h,v,g,i,w=p(k)?"a":"b",S=w==="a"?b.aaxis:b.baxis,M=S.smoothing,C=w==="a"?b.a2i:b.b2j,_=w==="a"?k:l,T=w==="a"?l:k,f=w==="a"?E.a.length:E.b.length,u=w==="a"?E.b.length:E.a.length,A=Math.floor(w==="a"?b.b2j(T):b.a2i(T)),x=w==="a"?function(re){return b.evalxy([],re,A)}:function(re){return b.evalxy([],A,re)};M&&(n=Math.max(0,Math.min(u-2,A)),r=A-n,t=w==="a"?function(re,ne){return b.dxydi([],re,n,ne,r)}:function(re,ne){return b.dxydj([],n,re,r,ne)});var z=C(_[0]),I=C(_[1]),O=z0?Math.floor:Math.ceil,F=O>0?Math.ceil:Math.floor,P=O>0?Math.min:Math.max,j=O>0?Math.max:Math.min,U=B(z+D),$=F(I-D);s=x(z);var Q=[[s]];for(e=U;e*O<$*O;e+=O)a=[],v=j(z,e),g=P(I,e+O),i=g-v,o=Math.max(0,Math.min(f-2,Math.floor(.5*(v+g)))),c=x(g),M&&(m=t(o,v-o),h=t(o,g-o),a.push([s[0]+m[0]/3*i,s[1]+m[1]/3*i]),a.push([c[0]-h[0]/3*i,c[1]-h[1]/3*i])),a.push(c),Q.push(a),s=c;return Q}}}),LG=ze({"src/traces/contourcarpet/plot.js"(J,V){"use strict";var p=ci(),b=HM(),E=WM(),k=$i(),l=Nr(),e=iT(),t=oT(),n=wb(),r=E1(),a=lT(),o=sT(),s=uT(),c=W2(),m=CG();V.exports=function(f,u,A,x){var z=u.xaxis,I=u.yaxis;l.makeTraceGroups(x,A,"contour").each(function(O){var D=p.select(this),B=O[0],F=B.trace,P=F._carpetTrace=c(f,F),j=f.calcdata[P.index][0];if(!P.visible||P.visible==="legendonly")return;var U=B.a,$=B.b,Q=F.contours,re=o(Q,u,B),ne=Q.type==="constraint",se=Q._operation,G=ne?se==="="?"lines":"fill":Q.coloring;function X(Me){var Se=P.ab2xy(Me[0],Me[1],!0);return[z.c2p(Se[0]),I.c2p(Se[1])]}var K=[[U[0],$[$.length-1]],[U[U.length-1],$[$.length-1]],[U[U.length-1],$[0]],[U[0],$[0]]];e(re);var H=(U[U.length-1]-U[0])*1e-8,Y=($[$.length-1]-$[0])*1e-8;t(re,H,Y);var q=re;Q.type==="constraint"&&(q=a(re,se)),h(re,X);var Z,ee,ae,he,xe=[];for(he=j.clipsegments.length-1;he>=0;he--)Z=j.clipsegments[he],ee=b([],Z.x,z.c2p),ae=b([],Z.y,I.c2p),ee.reverse(),ae.reverse(),xe.push(E(ee,ae,Z.bicubic));var we="M"+xe.join("L")+"Z";M(D,j.clipsegments,z,I,ne,G),C(F,D,z,I,q,K,X,P,j,G,we),v(D,re,f,B,Q,u,P),k.setClipUrl(D,P._clipPathId,f)})};function h(T,f){var u,A,x,z,I,O,D,B,F;for(u=0;ure&&(A.max=re),A.len=A.max-A.min}function i(T,f,u){var A=T.getPointAtLength(f),x=T.getPointAtLength(u),z=x.x-A.x,I=x.y-A.y,O=Math.sqrt(z*z+I*I);return[z/O,I/O]}function w(T){var f=Math.sqrt(T[0]*T[0]+T[1]*T[1]);return[T[0]/f,T[1]/f]}function S(T,f){var u=Math.abs(T[0]*f[0]+T[1]*f[1]),A=Math.sqrt(1-u*u);return A/u}function M(T,f,u,A,x,z){var I,O,D,B,F=l.ensureSingle(T,"g","contourbg"),P=F.selectAll("path").data(z==="fill"&&!x?[0]:[]);P.enter().append("path"),P.exit().remove();var j=[];for(B=0;B=0&&(U=ee,Q=re):Math.abs(j[1]-U[1])=0&&(U=ee,Q=re):l.log("endpt to newendpt is not vert. or horz.",j,U,ee)}if(Q>=0)break;B+=q(j,U),j=U}if(Q===f.edgepaths.length){l.log("unclosed perimeter path");break}D=Q,P=F.indexOf(D)===-1,P&&(D=F[0],B+=q(j,U)+"Z",j=null)}for(D=0;D_):C=O>x,_=O;var D=h(x,z,I,O);D.pos=A,D.yc=(x+O)/2,D.i=u,D.dir=C?"increasing":"decreasing",D.x=D.pos,D.y=[I,z],T&&(D.orig_p=s[u]),S&&(D.tx=o.text[u]),M&&(D.htx=o.hovertext[u]),f.push(D)}else f.push({pos:A,empty:!0})}return o._extremes[m._id]=E.findExtremes(m,p.concat(i,g),{padded:!0}),f.length&&(f[0].t={labels:{open:b(a,"open:")+" ",high:b(a,"high:")+" ",low:b(a,"low:")+" ",close:b(a,"close:")+" "}}),f}function r(a,o,s){var c=s._minDiff;if(!c){var m=a._fullData,h=[];c=1/0;var v;for(v=0;v"+w.labels[A]+p.hoverLabelText(g,x,i.yhoverformat)):(I=b.extendFlat({},M),I.y0=I.y1=z,I.yLabelVal=x,I.yLabel=w.labels[A]+p.hoverLabelText(g,x,i.yhoverformat),I.name="",S.push(I),f[x]=I)}return S}function o(s,c,m,h){var v=s.cd,g=s.ya,i=v[0].trace,w=v[0].t,S=r(s,c,m,h);if(!S)return[];var M=S.index,C=v[M],_=S.index=C.i,T=C.dir;function f(D){return w.labels[D]+p.hoverLabelText(g,i[D][_],i.yhoverformat)}var u=C.hi||i.hoverinfo||"",A=u.split("+"),x=u==="all",z=x||A.indexOf("y")!==-1,I=x||A.indexOf("text")!==-1,O=z?[f("open"),f("high"),f("low"),f("close")+" "+t[T]]:[];return I&&l(C,i,O),S.extraText=O.join("
"),S.y0=S.y1=g.c2p(C.yc,!0),[S]}V.exports={hoverPoints:n,hoverSplit:a,hoverOnPoints:o}}}),QM=ze({"src/traces/ohlc/select.js"(J,V){"use strict";V.exports=function(b,E){var k=b.cd,l=b.xaxis,e=b.yaxis,t=[],n,r=k[0].t.bPos||0;if(E===!1)for(n=0;nc?function(i){return i<=0}:function(i){return i>=0};r.c2g=function(i){var w=r.c2l(i)-s;return(g(w)?w:0)+v},r.g2c=function(i){return r.l2c(i+s-v)},r.g2p=function(i){return i*h},r.c2p=function(i){return r.g2p(r.c2g(i))}}}function e(r,a){return a==="degrees"?E(r):r}function t(r,a){return a==="degrees"?k(r):r}function n(r,a){var o=r.type;if(o==="linear"){var s=r.d2c,c=r.c2d;r.d2c=function(m,h){return e(s(m),h)},r.c2d=function(m,h){return c(t(m,h))}}r.makeCalcdata=function(m,h){var v=m[h],g=m._length,i,w,S=function(f){return r.d2c(f,m.thetaunit)};if(v)for(i=new Array(g),w=0;w0?f:1/0},C=E(S,M),_=p.mod(C+1,S.length);return[S[C],S[_]]}function h(w){return Math.abs(w)>1e-10?w:0}function v(w,S,M){S=S||0,M=M||0;for(var C=w.length,_=new Array(C),T=0;T0?1:0}function b(t){var n=t[0],r=t[1];if(!isFinite(n)||!isFinite(r))return[1,0];var a=(n+1)*(n+1)+r*r;return[(n*n+r*r-1)/a,2*r/a]}function E(t,n){var r=n[0],a=n[1];return[r*t.radius+t.cx,-a*t.radius+t.cy]}function k(t,n){return n*t.radius}function l(t,n,r,a){var o=E(t,b([r,n])),s=o[0],c=o[1],m=E(t,b([a,n])),h=m[0],v=m[1];if(n===0)return["M"+s+","+c,"L"+h+","+v].join(" ");var g=k(t,1/Math.abs(n));return["M"+s+","+c,"A"+g+","+g+" 0 0,"+(n<0?1:0)+" "+h+","+v].join(" ")}function e(t,n,r,a){var o=k(t,1/(n+1)),s=E(t,b([n,r])),c=s[0],m=s[1],h=E(t,b([n,a])),v=h[0],g=h[1];if(p(r)!==p(a)){var i=E(t,b([n,0])),w=i[0],S=i[1];return["M"+c+","+m,"A"+o+","+o+" 0 0,"+(0Ie?(Ve=ee,Ge=ee*Ie,ce=(ae-Ge)/K.h/2,ke=[q[0],q[1]],_e=[Z[0]+ce,Z[1]-ce]):(Ve=ae/Ie,Ge=ae,ce=(ee-Ve)/K.w/2,ke=[q[0]+ce,q[1]-ce],_e=[Z[0],Z[1]]),G.xLength2=Ve,G.yLength2=Ge,G.xDomain2=ke,G.yDomain2=_e;var ve=G.xOffset2=K.l+K.w*ke[0],le=G.yOffset2=K.t+K.h*(1-_e[1]),Ae=G.radius=Ve/we,Be=G.innerRadius=G.getHole(se)*Ae,Xe=G.cx=ve-Ae*xe[0],Ye=G.cy=le+Ae*xe[3],yt=G.cxx=Xe-ve,gt=G.cyy=Ye-le,Tt=H.side,At;Tt==="counterclockwise"?(At=Tt,Tt="top"):Tt==="clockwise"&&(At=Tt,Tt="bottom"),G.radialAxis=G.mockAxis(ne,se,H,{_id:"x",side:Tt,_trueSide:At,domain:[Be/K.w,Ae/K.w]}),G.angularAxis=G.mockAxis(ne,se,Y,{side:"right",domain:[0,Math.PI],autorange:!1}),G.doAutoRange(ne,se),G.updateAngularAxis(ne,se),G.updateRadialAxis(ne,se),G.updateRadialAxisTitle(ne,se),G.xaxis=G.mockCartesianAxis(ne,se,{_id:"x",domain:ke}),G.yaxis=G.mockCartesianAxis(ne,se,{_id:"y",domain:_e});var $t=G.pathSubplot();G.clipPaths.forTraces.select("path").attr("d",$t).attr("transform",l(yt,gt)),X.frontplot.attr("transform",l(ve,le)).call(t.setClipUrl,G._hasClipOnAxisFalse?null:G.clipIds.forTraces,G.gd),X.bg.attr("d",$t).attr("transform",l(Xe,Ye)).call(e.fill,se.bgcolor)},j.mockAxis=function(ne,se,G,X){var K=E.extendFlat({},G,X);return o(K,se,ne),K},j.mockCartesianAxis=function(ne,se,G){var X=this,K=X.isSmith,H=G._id,Y=E.extendFlat({type:"linear"},G);a(Y,ne);var q={x:[0,2],y:[1,3]};return Y.setRange=function(){var Z=X.sectorBBox,ee=q[H],ae=X.radialAxis._rl,he=(ae[1]-ae[0])/(1-X.getHole(se));Y.range=[Z[ee[0]]*he,Z[ee[1]]*he]},Y.isPtWithinRange=H==="x"&&!K?function(Z){return X.isPtInside(Z)}:function(){return!0},Y.setRange(),Y.setScale(),Y},j.doAutoRange=function(ne,se){var G=this,X=G.gd,K=G.radialAxis,H=G.getRadial(se);s(X,K);var Y=K.range;if(H.range=Y.slice(),H._input.range=Y.slice(),K._rl=[K.r2l(Y[0],null,"gregorian"),K.r2l(Y[1],null,"gregorian")],K.minallowed!==void 0){var q=K.r2l(K.minallowed);K._rl[0]>K._rl[1]?K._rl[1]=Math.max(K._rl[1],q):K._rl[0]=Math.max(K._rl[0],q)}if(K.maxallowed!==void 0){var Z=K.r2l(K.maxallowed);K._rl[0]90&&ae<=270&&(he.tickangle=180);var Me=we?function(Ae){var Be=I(G,A([Ae.x,0]));return l(Be[0]-q,Be[1]-Z)}:function(Ae){return l(he.l2p(Ae.x)+Y,0)},Se=we?function(Ae){return z(G,Ae.x,-1/0,1/0)}:function(Ae){return G.pathArc(he.r2p(Ae.x)+Y)},Ie=U(ee);if(G.radialTickLayout!==Ie&&(K["radial-axis"].selectAll(".xtick").remove(),G.radialTickLayout=Ie),xe){he.setScale();var Ve=0,Ge=we?(he.tickvals||[]).filter(function(Ae){return Ae>=0}).map(function(Ae){return r.tickText(he,Ae,!0,!1)}):r.calcTicks(he),ke=we?Ge:r.clipEnds(he,Ge),_e=r.getTickSigns(he)[2];we&&((he.ticks==="top"&&he.side==="bottom"||he.ticks==="bottom"&&he.side==="top")&&(_e=-_e),he.ticks==="top"&&he.side==="top"&&(Ve=-he.ticklen),he.ticks==="bottom"&&he.side==="bottom"&&(Ve=he.ticklen)),r.drawTicks(X,he,{vals:Ge,layer:K["radial-axis"],path:r.makeTickPath(he,0,_e),transFn:Me,crisp:!1}),r.drawGrid(X,he,{vals:ke,layer:K["radial-grid"],path:Se,transFn:E.noop,crisp:!1}),r.drawLabels(X,he,{vals:Ge,layer:K["radial-axis"],transFn:Me,labelFns:r.makeLabelFns(he,Ve)})}var ce=G.radialAxisAngle=G.vangles?F(Q(B(ee.angle),G.vangles)):ee.angle,ve=l(q,Z),le=ve+k(-ce);re(K["radial-axis"],xe&&(ee.showticklabels||ee.ticks),{transform:le}),re(K["radial-grid"],xe&&ee.showgrid,{transform:we?"":ve}),re(K["radial-line"].select("line"),xe&&ee.showline,{x1:we?-H:Y,y1:0,x2:H,y2:0,transform:le}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateRadialAxisTitle=function(ne,se,G){if(!this.isSmith){var X=this,K=X.gd,H=X.radius,Y=X.cx,q=X.cy,Z=X.getRadial(se),ee=X.id+"title",ae=0;if(Z.title){var he=t.bBox(X.layers["radial-axis"].node()).height,xe=Z.title.font.size,we=Z.side;ae=we==="top"?xe:we==="counterclockwise"?-(he+xe*.4):he+xe*.8}var Me=G!==void 0?G:X.radialAxisAngle,Se=B(Me),Ie=Math.cos(Se),Ve=Math.sin(Se),Ge=Y+H/2*Ie+ae*Ve,ke=q-H/2*Ve+ae*Ie;X.layers["radial-axis-title"]=v.draw(K,ee,{propContainer:Z,propName:X.id+".radialaxis.title.text",placeholder:O(K,"Click to enter radial axis title"),attributes:{x:Ge,y:ke,"text-anchor":"middle"},transform:{rotate:-Me}})}},j.updateAngularAxis=function(ne,se){var G=this,X=G.gd,K=G.layers,H=G.radius,Y=G.innerRadius,q=G.cx,Z=G.cy,ee=G.getAngular(se),ae=G.angularAxis,he=G.isSmith;he||(G.fillViewInitialKey("angularaxis.rotation",ee.rotation),ae.setGeometry(),ae.setScale());var xe=he?function(Be){var Xe=I(G,A([0,Be.x]));return Math.atan2(Xe[0]-q,Xe[1]-Z)-Math.PI/2}:function(Be){return ae.t2g(Be.x)};ae.type==="linear"&&ae.thetaunit==="radians"&&(ae.tick0=F(ae.tick0),ae.dtick=F(ae.dtick));var we=function(Be){return l(q+H*Math.cos(Be),Z-H*Math.sin(Be))},Me=he?function(Be){var Xe=I(G,A([0,Be.x]));return l(Xe[0],Xe[1])}:function(Be){return we(xe(Be))},Se=he?function(Be){var Xe=I(G,A([0,Be.x])),Ye=Math.atan2(Xe[0]-q,Xe[1]-Z)-Math.PI/2;return l(Xe[0],Xe[1])+k(-F(Ye))}:function(Be){var Xe=xe(Be);return we(Xe)+k(-F(Xe))},Ie=he?function(Be){return x(G,Be.x,0,1/0)}:function(Be){var Xe=xe(Be),Ye=Math.cos(Xe),yt=Math.sin(Xe);return"M"+[q+Y*Ye,Z-Y*yt]+"L"+[q+H*Ye,Z-H*yt]},Ve=r.makeLabelFns(ae,0),Ge=Ve.labelStandoff,ke={};ke.xFn=function(Be){var Xe=xe(Be);return Math.cos(Xe)*Ge},ke.yFn=function(Be){var Xe=xe(Be),Ye=Math.sin(Xe)>0?.2:1;return-Math.sin(Xe)*(Ge+Be.fontSize*Ye)+Math.abs(Math.cos(Xe))*(Be.fontSize*_)},ke.anchorFn=function(Be){var Xe=xe(Be),Ye=Math.cos(Xe);return Math.abs(Ye)<.1?"middle":Ye>0?"start":"end"},ke.heightFn=function(Be,Xe,Ye){var yt=xe(Be);return-.5*(1+Math.sin(yt))*Ye};var _e=U(ee);G.angularTickLayout!==_e&&(K["angular-axis"].selectAll("."+ae._id+"tick").remove(),G.angularTickLayout=_e);var ce=he?[1/0].concat(ae.tickvals||[]).map(function(Be){return r.tickText(ae,Be,!0,!1)}):r.calcTicks(ae);he&&(ce[0].text="\u221E",ce[0].fontSize*=1.75);var ve;if(se.gridshape==="linear"?(ve=ce.map(xe),E.angleDelta(ve[0],ve[1])<0&&(ve=ve.slice().reverse())):ve=null,G.vangles=ve,ae.type==="category"&&(ce=ce.filter(function(Be){return E.isAngleInsideSector(xe(Be),G.sectorInRad)})),ae.visible){var le=ae.ticks==="inside"?-1:1,Ae=(ae.linewidth||1)/2;r.drawTicks(X,ae,{vals:ce,layer:K["angular-axis"],path:"M"+le*Ae+",0h"+le*ae.ticklen,transFn:Se,crisp:!1}),r.drawGrid(X,ae,{vals:ce,layer:K["angular-grid"],path:Ie,transFn:E.noop,crisp:!1}),r.drawLabels(X,ae,{vals:ce,layer:K["angular-axis"],repositionOnUpdate:!0,transFn:Me,labelFns:ke})}re(K["angular-line"].select("path"),ee.showline,{d:G.pathSubplot(),transform:l(q,Z)}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateFx=function(ne,se){if(!this.gd._context.staticPlot){var G=!this.isSmith;G&&(this.updateAngularDrag(ne),this.updateRadialDrag(ne,se,0),this.updateRadialDrag(ne,se,1)),this.updateHoverAndMainDrag(ne)}},j.updateHoverAndMainDrag=function(ne){var se=this,G=se.isSmith,X=se.gd,K=se.layers,H=ne._zoomlayer,Y=T.MINZOOM,q=T.OFFEDGE,Z=se.radius,ee=se.innerRadius,ae=se.cx,he=se.cy,xe=se.cxx,we=se.cyy,Me=se.sectorInRad,Se=se.vangles,Ie=se.radialAxis,Ve=f.clampTiny,Ge=f.findXYatLength,ke=f.findEnclosingVertexAngles,_e=T.cornerHalfWidth,ce=T.cornerLen/2,ve,le,Ae=c.makeDragger(K,"path","maindrag",ne.dragmode===!1?"none":"crosshair");p.select(Ae).attr("d",se.pathSubplot()).attr("transform",l(ae,he)),Ae.onmousemove=function(qt){h.hover(X,qt,se.id),X._fullLayout._lasthover=Ae,X._fullLayout._hoversubplot=se.id},Ae.onmouseout=function(qt){X._dragging||m.unhover(X,qt)};var Be={element:Ae,gd:X,subplot:se.id,plotinfo:{id:se.id,xaxis:se.xaxis,yaxis:se.yaxis},xaxes:[se.xaxis],yaxes:[se.yaxis]},Xe,Ye,yt,gt,Tt,At,$t,rr,_r;function Xt(qt,Vt){return Math.sqrt(qt*qt+Vt*Vt)}function or(qt,Vt){return Xt(qt-xe,Vt-we)}function Ot(qt,Vt){return Math.atan2(we-Vt,qt-xe)}function vt(qt,Vt){return[qt*Math.cos(Vt),qt*Math.sin(-Vt)]}function ht(qt,Vt){if(qt===0)return se.pathSector(2*_e);var Ht=ce/qt,Sr=Vt-Ht,Kr=Vt+Ht,Yt=Math.max(0,Math.min(qt,Z)),Rt=Yt-_e,nr=Yt+_e;return"M"+vt(Rt,Sr)+"A"+[Rt,Rt]+" 0,0,0 "+vt(Rt,Kr)+"L"+vt(nr,Kr)+"A"+[nr,nr]+" 0,0,1 "+vt(nr,Sr)+"Z"}function De(qt,Vt,Ht){if(qt===0)return se.pathSector(2*_e);var Sr=vt(qt,Vt),Kr=vt(qt,Ht),Yt=Ve((Sr[0]+Kr[0])/2),Rt=Ve((Sr[1]+Kr[1])/2),nr,ur;if(Yt&&Rt){var cr=Rt/Yt,Rr=-1/cr,Qr=Ge(_e,cr,Yt,Rt);nr=Ge(ce,Rr,Qr[0][0],Qr[0][1]),ur=Ge(ce,Rr,Qr[1][0],Qr[1][1])}else{var Zr,ha;Rt?(Zr=ce,ha=_e):(Zr=_e,ha=ce),nr=[[Yt-Zr,Rt-ha],[Yt+Zr,Rt-ha]],ur=[[Yt-Zr,Rt+ha],[Yt+Zr,Rt+ha]]}return"M"+nr.join("L")+"L"+ur.reverse().join("L")+"Z"}function Ne(){yt=null,gt=null,Tt=se.pathSubplot(),At=!1;var qt=X._fullLayout[se.id];$t=e.luminosity(qt.bgcolor),rr=c.makeZoombox(H,$t,ae,he,Tt),rr.attr("fill-rule","evenodd"),_r=c.makeCorners(H,ae,he),w(X)}function We(qt,Vt){return Vt=Math.max(Math.min(Vt,Z),ee),qtY?(qt-1&&qt===1&&i(Vt,X,[se.xaxis],[se.yaxis],se.id,Be),Ht.indexOf("event")>-1&&h.click(X,Vt,se.id)}Be.prepFn=function(qt,Vt,Ht){var Sr=X._fullLayout.dragmode,Kr=Ae.getBoundingClientRect();X._fullLayout._calcInverseTransform(X);var Yt=X._fullLayout._invTransform;ve=X._fullLayout._invScaleX,le=X._fullLayout._invScaleY;var Rt=E.apply3DTransform(Yt)(Vt-Kr.left,Ht-Kr.top);if(Xe=Rt[0],Ye=Rt[1],Se){var nr=f.findPolygonOffset(Z,Me[0],Me[1],Se);Xe+=xe+nr[0],Ye+=we+nr[1]}switch(Sr){case"zoom":Be.clickFn=Ct,G||(Se?Be.moveFn=Mt:Be.moveFn=Je,Be.doneFn=pt,Ne(qt,Vt,Ht));break;case"select":case"lasso":g(qt,Vt,Ht,Be,Sr);break}},m.init(Be)},j.updateRadialDrag=function(ne,se,G){var X=this,K=X.gd,H=X.layers,Y=X.radius,q=X.innerRadius,Z=X.cx,ee=X.cy,ae=X.radialAxis,he=T.radialDragBoxSize,xe=he/2;if(!ae.visible)return;var we=B(X.radialAxisAngle),Me=ae._rl,Se=Me[0],Ie=Me[1],Ve=Me[G],Ge=.75*(Me[1]-Me[0])/(1-X.getHole(se))/Y,ke,_e,ce;G?(ke=Z+(Y+xe)*Math.cos(we),_e=ee-(Y+xe)*Math.sin(we),ce="radialdrag"):(ke=Z+(q-xe)*Math.cos(we),_e=ee-(q-xe)*Math.sin(we),ce="radialdrag-inner");var ve=c.makeRectDragger(H,ce,"crosshair",-xe,-xe,he,he),le={element:ve,gd:K};ne.dragmode===!1&&(le.dragmode=!1),re(p.select(ve),ae.visible&&q0!=(G?Xe>Se:Xe=90||K>90&&H>=450?we=1:q<=0&&ee<=0?we=0:we=Math.max(q,ee),K<=180&&H>=180||K>180&&H>=540?ae=-1:Y>=0&&Z>=0?ae=0:ae=Math.min(Y,Z),K<=270&&H>=270||K>270&&H>=630?he=-1:q>=0&&ee>=0?he=0:he=Math.min(q,ee),H>=360?xe=1:Y<=0&&Z<=0?xe=0:xe=Math.max(Y,Z),[ae,he,xe,we]}function Q(ne,se){var G=function(K){return E.angleDist(ne,K)},X=E.findIndexOfMin(se,G);return se[X]}function re(ne,se,G){return se?(ne.attr("display",null),ne.attr(G)):ne&&ne.attr("display","none"),ne}}}),n4=ze({"src/plots/polar/layout_attributes.js"(J,V){"use strict";var p=fc(),b=cf(),E=Ml().attributes,k=Nr().extendFlat,l=Al().overrideAll,e=l({color:b.color,showline:k({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:k({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),t=l({tickmode:b.minor.tickmode,nticks:b.nticks,tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,ticklabelstep:b.ticklabelstep,showticklabels:b.showticklabels,labelalias:b.labelalias,minorloglabels:b.minorloglabels,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickfont:b.tickfont,tickangle:b.tickangle,tickformat:b.tickformat,tickformatstops:b.tickformatstops,layer:b.layer},"plot","from-root"),n={visible:k({},b.visible,{dflt:!0}),type:k({},b.type,{values:["-","linear","log","date","category"]}),autotypenumbers:b.autotypenumbers,autorangeoptions:{minallowed:b.autorangeoptions.minallowed,maxallowed:b.autorangeoptions.maxallowed,clipmin:b.autorangeoptions.clipmin,clipmax:b.autorangeoptions.clipmax,include:b.autorangeoptions.include,editType:"plot"},autorange:k({},b.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:k({},b.minallowed,{editType:"plot"}),maxallowed:k({},b.maxallowed,{editType:"plot"}),range:k({},b.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:b.categoryorder,categoryarray:b.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:b.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:k({},b.title.text,{editType:"plot",dflt:""}),font:k({},b.title.font,{editType:"plot"}),editType:"plot"},hoverformat:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(n,e,t);var r={visible:k({},b.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:b.autotypenumbers,categoryorder:b.categoryorder,categoryarray:b.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(r,e,t),V.exports={domain:E({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:p.background},radialaxis:n,angularaxis:r,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),qG=ze({"src/plots/polar/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=Zv(),l=zf().getSubplotData,e=Uv(),t=Ym(),n=ov(),r=sv(),a=Hx(),o=g1(),s=Jw(),c=Xm(),m=n4(),h=t4(),v=X2(),g=v.axisNames;function i(S,M,C,_){var T=C("bgcolor");_.bgColor=b.combine(T,_.paper_bgcolor);var f=C("sector");C("hole");var u=l(_.fullData,v.name,_.id),A=_.layoutOut,x;function z(xe,we){return C(x+"."+xe,we)}for(var I=0;I")}}V.exports={hoverPoints:b,makeHoverPointText:E}}}),HG=ze({"src/traces/scatterpolar/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:$2(),categories:["polar","symbols","showLegend","scatter-like"],attributes:uy(),supplyDefaults:K2().supplyDefaults,colorbar:Of(),formatLabels:J2(),calc:VG(),plot:GG(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:Q2().hoverPoints,selectPoints:Yv(),meta:{}}}}),WG=ze({"lib/scatterpolar.js"(J,V){"use strict";V.exports=HG()}}),i4=ze({"src/traces/scatterpolargl/attributes.js"(J,V){"use strict";var p=uy(),{cliponaxis:b,hoveron:E}=p,k=Lo(p,["cliponaxis","hoveron"]),{connectgaps:l,line:{color:e,dash:t,width:n},fill:r,fillcolor:a,marker:o,textfont:s,textposition:c}=ty();V.exports=lo(Li({},k),{connectgaps:l,fill:r,fillcolor:a,line:{color:e,dash:t,editType:"calc",width:n},marker:o,textfont:s,textposition:c})}}),YG=ze({"src/traces/scatterpolargl/defaults.js"(J,V){"use strict";var p=Nr(),b=el(),E=K2().handleRThetaDefaults,k=id(),l=_d(),e=xd(),t=Od(),n=zd().PTS_LINESONLY,r=i4();V.exports=function(o,s,c,m){function h(g,i){return p.coerce(o,s,r,g,i)}var v=E(o,s,m,h);if(!v){s.visible=!1;return}h("thetaunit"),h("mode",v=t&&(_.marker.cluster=w.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=A),_.line&&A.length>1&&e.extendFlat(_.line,l.linePositions(a,i,A)),_.text&&(e.extendFlat(_.text,{positions:A},l.textPosition(a,i,_.text,_.marker)),e.extendFlat(_.textSel,{positions:A},l.textPosition(a,i,_.text,_.markerSel)),e.extendFlat(_.textUnsel,{positions:A},l.textPosition(a,i,_.text,_.markerUnsel))),_.fill&&!h.fill2d&&(h.fill2d=!0),_.marker&&!h.scatter2d&&(h.scatter2d=!0),_.line&&!h.line2d&&(h.line2d=!0),_.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(_.line),h.fillOptions.push(_.fill),h.markerOptions.push(_.marker),h.markerSelectedOptions.push(_.markerSel),h.markerUnselectedOptions.push(_.markerUnsel),h.textOptions.push(_.text),h.textSelectedOptions.push(_.textSel),h.textUnselectedOptions.push(_.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),w.x=x,w.y=z,w.rawx=x,w.rawy=z,w.r=M,w.theta=C,w.positions=A,w._scene=h,w.index=h.count,h.count++}}),E(a,o,s)}},V.exports.reglPrecompiled=n}}),QG=ze({"src/traces/scatterpolargl/index.js"(J,V){"use strict";var p=KG();p.plot=JG(),V.exports=p}}),eH=ze({"lib/scatterpolargl.js"(J,V){"use strict";V.exports=QG()}}),o4=ze({"src/traces/barpolar/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,templatefallbackAttrs:b}=xs(),E=Ki().extendFlat,k=uy(),l=jd();V.exports={r:k.r,theta:k.theta,r0:k.r0,dr:k.dr,theta0:k.theta0,dtheta:k.dtheta,thetaunit:k.thetaunit,base:E({},l.base,{}),offset:E({},l.offset,{}),width:E({},l.width,{}),text:E({},l.text,{}),hovertext:E({},l.hovertext,{}),marker:e(),hoverinfo:k.hoverinfo,hovertemplate:p(),hovertemplatefallback:b(),selected:l.selected,unselected:l.unselected};function e(){var t=E({},l.marker);return delete t.cornerradius,t}}}),s4=ze({"src/traces/barpolar/layout_attributes.js"(J,V){"use strict";V.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),tH=ze({"src/traces/barpolar/defaults.js"(J,V){"use strict";var p=Nr(),b=K2().handleRThetaDefaults,E=eb(),k=o4();V.exports=function(e,t,n,r){function a(s,c){return p.coerce(e,t,k,s,c)}var o=b(e,t,r,a);if(!o){t.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),E(e,t,a,n,r),p.coerceSelectionMarkerOpacity(t,a)}}}),rH=ze({"src/traces/barpolar/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=s4();V.exports=function(E,k,l){var e={},t;function n(o,s){return p.coerce(E[t]||{},k[t],b,o,s)}for(var r=0;r0?(m=s,h=c):(m=c,h=s);var v=l.findEnclosingVertexAngles(m,t.vangles)[0],g=l.findEnclosingVertexAngles(h,t.vangles)[1],i=[v,(m+h)/2,g];return l.pathPolygonAnnulus(a,o,m,h,i,n,r)}:function(a,o,s,c){return E.pathAnnulus(a,o,s,c,n,r)}}}}),nH=ze({"src/traces/barpolar/hover.js"(J,V){"use strict";var p=Zl(),b=Nr(),E=eg().getTraceColor,k=b.fillText,l=Q2().makeHoverPointText,e=Z2().isPtInsidePolygon;V.exports=function(n,r,a){var o=n.cd,s=o[0].trace,c=n.subplot,m=c.radialAxis,h=c.angularAxis,v=c.vangles,g=v?e:b.isPtInsideSector,i=n.maxHoverDistance,w=h._period||2*Math.PI,S=Math.abs(m.g2p(Math.sqrt(r*r+a*a))),M=Math.atan2(a,r);m.range[0]>m.range[1]&&(M+=Math.PI);var C=function(u){return g(S,M,[u.rp0,u.rp1],[u.thetag0,u.thetag1],v)?i+Math.min(1,Math.abs(u.thetag1-u.thetag0)/w)-1+(u.rp1-S)/(u.rp1-u.rp0)-1:1/0};if(p.getClosest(o,C,n),n.index!==!1){var _=n.index,T=o[_];n.x0=n.x1=T.ct[0],n.y0=n.y1=T.ct[1];var f=b.extendFlat({},T,{r:T.s,theta:T.p});return k(T,s,n),l(f,s,c,n),n.hovertemplate=s.hovertemplate,n.color=E(s,T),n.xLabelVal=n.yLabelVal=void 0,T.s<0&&(n.idealAlign="left"),[n]}}}}),iH=ze({"src/traces/barpolar/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"barpolar",basePlotModule:$2(),categories:["polar","bar","showLegend"],attributes:o4(),layoutAttributes:s4(),supplyDefaults:tH(),supplyLayoutDefaults:rH(),calc:l4().calc,crossTraceCalc:l4().crossTraceCalc,plot:aH(),colorbar:Of(),formatLabels:J2(),style:ld().style,styleOnSelect:ld().styleOnSelect,hoverPoints:nH(),selectPoints:tg(),meta:{}}}}),oH=ze({"lib/barpolar.js"(J,V){"use strict";V.exports=iH()}}),u4=ze({"src/plots/smith/constants.js"(J,V){"use strict";V.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),c4=ze({"src/plots/smith/layout_attributes.js"(J,V){"use strict";var p=fc(),b=cf(),E=Ml().attributes,k=Nr().extendFlat,l=Al().overrideAll,e=l({color:b.color,showline:k({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:k({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),t=l({ticklen:b.ticklen,tickwidth:k({},b.tickwidth,{dflt:2}),tickcolor:b.tickcolor,showticklabels:b.showticklabels,labelalias:b.labelalias,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,tickfont:b.tickfont,tickformat:b.tickformat,hoverformat:b.hoverformat,layer:b.layer},"plot","from-root"),n=k({visible:k({},b.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:k({},b.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,t),r=k({visible:k({},b.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:b.ticks,editType:"calc"},e,t);V.exports={domain:E({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:p.background},realaxis:n,imaginaryaxis:r,editType:"calc"}}}),sH=ze({"src/plots/smith/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=Zv(),l=zf().getSubplotData,e=sv(),t=ov(),n=g1(),r=Dd(),a=c4(),o=u4(),s=o.axisNames,c=h(function(v){return p.isTypedArray(v)&&(v=Array.from(v)),v.slice().reverse().map(function(g){return-g}).concat([0]).concat(v)},String);function m(v,g,i,w){var S=i("bgcolor");w.bgColor=b.combine(S,w.paper_bgcolor);var M=l(w.fullData,o.name,w.id),C=w.layoutOut,_;function T(U,$){return i(_+"."+U,$)}for(var f=0;f")}}V.exports={hoverPoints:b,makeHoverPointText:E}}}),pH=ze({"src/traces/scattersmith/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"scattersmith",basePlotModule:lH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:f4(),supplyDefaults:uH(),colorbar:Of(),formatLabels:cH(),calc:fH(),plot:hH(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:dH().hoverPoints,selectPoints:Yv(),meta:{}}}}),vH=ze({"lib/scattersmith.js"(J,V){"use strict";V.exports=pH()}}),h4=ze({"src/traces/quiver/attributes.js"(J,V){"use strict";var p=ws(),b=xs().hovertemplateAttrs,E=Il().axisHoverFormat,k=Ki().extendFlat,l=qs(),e=Uc().dash,t=fv(),n=su(),r={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:n.x0,dx:n.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:n.y0,dy:n.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},arrowref:{valType:"enumerated",values:["paper","data"],dflt:"data",editType:"calc"},lengthmode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},lengthfactor:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:E("x"),yhoverformat:E("y"),uhoverformat:E("u","noDate"),vhoverformat:E("v","noDate"),hoverinfo:k({},p.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:b({},{keys:["x","y","u","v","text","name"]}),text:n.text,textposition:n.textposition,textfont:n.textfont,marker:k({arrowsize:k({},t.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:e,editType:"style"},editType:"calc"},l("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};V.exports=r}}),mH=ze({"src/traces/quiver/defaults.js"(J,V){"use strict";var p=Nr(),b=h4(),E=Gv(),k=Bf().hasColorscale,l=qc();V.exports=function(t,n,r,a){function o(S,M){return p.coerce(t,n,b,S,M)}var s=E(t,n,a,o);if(!s){n.visible=!1;return}var c=o("u"),m=o("v");if(!p.isArrayOrTypedArray(c)||c.length===0){n.u=new Array(s);for(var h=0;hO&&(O=c[Q]),m[Q]B&&(B=m[Q]),GP&&(P=G),XU&&(U=X);var K=Math.sqrt(G*G+X*X);if(K>i&&(i=K),KS&&(S=H))}}else re.x=k,re.y=k}if(a._maxNorm=i,u==="scaled"||A==="paper"){let Me=O-I,Se=B-D;var Y;Me===0&&Se===0?Y=1:Y=(Me+Se+Math.sqrt((Me-Se)*(Me-Se)+4*$*Me*Se))/(2*($-1)),Y*=t,a._scaleFactor=Y/a._maxNorm}else a._scaleFactor=1;a._scaleFactor*=a.lengthfactor;let q=new Array(h),Z=new Array(h),ee=new Array(h),ae=new Array(h);for(var he,xe,Q=0;Qm.i&&isFinite(h[m.i]))v=h[m.i];else{var g=o.u&&o.u[m.i]||0,i=o.v&&o.v[m.i]||0;v=Math.sqrt(g*g+i*i)}return c(v)})}function t(a){var o=p.select(a).selectAll("g.trace.quiver");o.each(function(s){r(a,s,p.select(this))})}function n(a,o,s){r(a,o,s)}function r(a,o,s){var c=o[0].trace,m=c.marker||{},h=m.line||{},v=b.isArrayOrTypedArray(m.color)?void 0:m.color,g=c._hasColorscale;if(s)if(c.selectedpoints){var i=(c.selected||{}).marker||{},w=(c.unselected||{}).marker||{},S=i.line||{},M=w.line||{};s.selectAll("path.js-line").each(function(_){var T=p.select(this),f=!_.selected,u=f?w.color:i.color,A=f?M.width!==void 0?M.width:h.width:S.width!==void 0?S.width:h.width;u?(E.lineGroupStyle(T,A,u,h.dash),T.style("stroke-opacity",1)):(E.lineGroupStyle(T,A,v,h.dash),g&&e(T,c),T.style("stroke-opacity",f?l:1))}),E.selectedTextStyle(s.selectAll("text"),c)}else{var C=s.selectAll("path.js-line");C.call(E.lineGroupStyle,h.width,v,h.dash),g&&e(C,c),C.style("stroke-opacity",1),E.textPointStyle(s.selectAll("text"),c,a)}}V.exports={style:t,styleOnSelect:n,colorscaleStroke:e}}}),_H=ze({"src/traces/quiver/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=$i(),k=e3().colorscaleStroke,l=Math.PI/12,e=5.8,t=1.5,n=.7;V.exports=function(o,s,c,m,h,v){var g,i,w=!h,S=!!h&&h.duration>0;if(g=m.selectAll("g.trace").data(c,function(C){return C[0].trace.uid}),g.enter().append("g").attr("class",function(C){return"trace quiver trace"+C[0].trace.uid}).style("stroke-miterlimit",2),g.order(),S){v&&(i=v());var M=p.transition().duration(h.duration).ease(h.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()});M.each(function(){m.selectAll("g.trace").each(function(C,_){r(o,_,s,C,c,this,h)})})}else g.each(function(C,_){r(o,_,s,C,c,this,h)});w&&g.exit().remove()};function r(a,o,s,c,m,h,v){var g=c[0].trace,i=s.xaxis,w=s.yaxis;c[0][s.isRangePlot?"nodeRangePlot3":"node3"]=p.select(h);var S=p.select(h).selectAll("g.lines").data([c]);S.enter().append("g").classed("lines",!0),E.setClipUrl(S,s.layerClipId,a);var M=S.selectAll("path.js-line").data(c);M.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),M.exit().remove();let{anchor:C,maxNorm:_=0,arrowref:T}=g,f=T==="paper"?g._scaleFactor*Math.sqrt(Math.abs(i._m*w._m)):g._scaleFactor,u=g.marker.arrowsize;M.each(function(B){let F=p.select(this);if(B.x===void 0||B.y===void 0){F.attr("d",null);return}let P=(T==="paper"?B._u*Math.sign(i._m):p.round(i._m*B._u))*f,j=(T==="paper"?B._v*Math.sign(w._m):p.round(w._m*B._v))*f,U=(g._input.marker||{}).arrowsize!==void 0;var $,Q,re,ne;C==="tip"?($=i.c2p(B.x)-P,re=w.c2p(B.y)-j,Q=i.c2p(B.x),ne=w.c2p(B.y)):C==="center"?($=i.c2p(B.x)-P/2,re=w.c2p(B.y)-j/2,Q=i.c2p(B.x)+P/2,ne=w.c2p(B.y)+j/2):($=i.c2p(B.x),re=w.c2p(B.y),Q=i.c2p(B.x)+P,ne=w.c2p(B.y)+j),B._px0=$,B._py0=re,B._px1=Q,B._py1=ne;var se=g.marker.line.width;U||(se=Math.max(se,t));let G=Math.sqrt((Q-$)*(Q-$)+(ne-re)*(ne-re)),X=n*G,K=Math.min(e*u*se,X),H=Math.atan2(ne-re,Q-$),Y=Q-K*Math.cos(H-l),q=ne-K*Math.sin(H-l),Z=Q-K*Math.cos(H+l),ee=ne-K*Math.sin(H+l),ae="M"+$+","+re+"L"+Q+","+ne+"L"+Y+","+q+"L"+Q+","+ne+"L"+Z+","+ee;F.attr("d",ae)});var A=g.marker||{},x=A.line||{},z=b.isArrayOrTypedArray(A.color)?void 0:A.color;E.lineGroupStyle(M,x.width,z,x.dash),g._hasColorscale&&k(M,g);var I=p.select(h).selectAll("g.text").data([c]);I.enter().append("g").classed("text",!0),E.setClipUrl(I,s.layerClipId,a);var O=I.selectAll("g.textpoint").data(c);if(O.enter().append("g").classed("textpoint",!0).append("text"),O.exit().remove(),O.each(function(B){var F=p.select(this),P=E.translatePoint(B,F.select("text"),i,w);P||F.remove()}),O.selectAll("text").call(E.textPointStyle,g,a).each(function(B){var F=i.c2p(B.x),P=w.c2p(B.y);p.select(this).selectAll("tspan.line").each(function(){p.select(this).attr({x:F,y:P})})}),v&&v.duration>0){var D=p.transition().duration(v.duration).ease(v.easing);M.transition(D).style("opacity",1)}}}}),xH=ze({"src/traces/quiver/hover.js"(J,V){"use strict";var p=Nr(),b=Zl(),E=Jm();function k(l,e,t,n,r,a){let o=r-t,s=a-n,c=o*o+s*s;if(!c)return Math.sqrt((l-t)*(l-t)+(e-n)*(e-n));var m=((l-t)*o+(e-n)*s)/c;m=Math.max(0,Math.min(1,m));let h=t+m*o,v=n+m*s;return Math.sqrt((l-h)*(l-h)+(e-v)*(e-v))}V.exports=function(e,t,n,r){var a=e.cd,o=a[0].trace,s=e.xa,c=e.ya,m=s.c2p(t),h=c.c2p(n),v=function(T){return T._px0===void 0?1/0:k(m,h,T._px0,T._py0,T._px1,T._py1)};if(b.getClosest(a,v,e),e.index!==!1){var g=a[e.index],i=s.c2p(g.x,!0),w=c.c2p(g.y,!0),S=Math.sqrt((m-i)*(m-i)+(h-w)*(h-w));e.index=g.i;var M=o.u?o.u[g.i]:0,C=o.v?o.v[g.i]:0,_="u: "+M+", v: "+C;return p.extendFlat(e,{color:E(o,g),x0:i-3,x1:i+3,xLabelVal:g.x,y0:w-3,y1:w+3,yLabelVal:g.y,uLabelVal:M,vLabelVal:C,extraText:_,spikeDistance:S,hovertemplate:o.hovertemplate}),p.fillText(g,o,e),[e]}}}}),bH=ze({"src/traces/quiver/format_labels.js"(J,V){"use strict";var p=Gi(),b=Nr();V.exports=function(k,l,e){var t={},n={_fullLayout:e},r=p.getFromTrace(n,l,"x"),a=p.getFromTrace(n,l,"y"),o=k.x,s=k.y;t.xLabel=p.tickText(r,r.c2l(o),!0).text,t.yLabel=p.tickText(a,a.c2l(s),!0).text;var c=l.u?l.u[k.i]:0,m=l.v?l.v[k.i]:0,h=l.uhoverformat,v=l.vhoverformat;return t.uLabel=h?b.numberFormat(h)(c):String(c),t.vLabel=v?b.numberFormat(v)(m):String(m),t}}}),wH=ze({"src/traces/quiver/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){return b.x=E.x,b.y=E.y,b.u=k.u?k.u[e]:void 0,b.v=k.v?k.v[e]:void 0,b}}}),TH=ze({"src/traces/quiver/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"quiver",basePlotModule:Du(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:h4(),supplyDefaults:mH(),calc:gH(),crossTraceCalc:yH(),plot:_H(),style:e3().style,styleOnSelect:e3().styleOnSelect,hoverPoints:xH(),formatLabels:bH(),eventData:wH(),selectPoints:Yv(),colorbar:Of(),animatable:!0,meta:{}}}}),AH=ze({"lib/quiver.js"(J,V){"use strict";V.exports=TH()}}),th=ze({"node_modules/world-calendars/dist/main.js"(J,V){var p=Vc();function b(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}p(b.prototype,{instance:function(n,r){n=(n||"gregorian").toLowerCase(),r=r||"";var a=this._localCals[n+"-"+r];if(!a&&this.calendars[n]&&(a=new this.calendars[n](r),this._localCals[n+"-"+r]=a),!a)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,n);return a},newDate:function(n,r,a,o,s){return o=(n!=null&&n.year?n.calendar():typeof o=="string"?this.instance(o,s):o)||this.instance(),o.newDate(n,r,a)},substituteDigits:function(n){return function(r){return(r+"").replace(/[0-9]/g,function(a){return n[a]})}},substituteChineseDigits:function(n,r){return function(a){for(var o="",s=0;a>0;){var c=a%10;o=(c===0?"":n[c]+r[s])+o,s++,a=Math.floor(a/10)}return o.indexOf(n[1]+r[1])===0&&(o=o.substr(1)),o||n[0]}}});function E(n,r,a,o){if(this._calendar=n,this._year=r,this._month=a,this._day=o,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function k(n,r){return n=""+n,"000000".substring(0,r-n.length)+n}p(E.prototype,{newDate:function(n,r,a){return this._calendar.newDate(n??this,r,a)},year:function(n){return arguments.length===0?this._year:this.set(n,"y")},month:function(n){return arguments.length===0?this._month:this.set(n,"m")},day:function(n){return arguments.length===0?this._day:this.set(n,"d")},date:function(n,r,a){if(!this._calendar.isValid(n,r,a))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=n,this._month=r,this._day=a,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(n,r){return this._calendar.add(this,n,r)},set:function(n,r){return this._calendar.set(this,n,r)},compareTo:function(n){if(this._calendar.name!==n._calendar.name)throw(t.local.differentCalendars||t.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,n._calendar.local.name);var r=this._year!==n._year?this._year-n._year:this._month!==n._month?this.monthOfYear()-n.monthOfYear():this._day-n._day;return r===0?0:r<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(n){return this._calendar.fromJD(n)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(n){return this._calendar.fromJSDate(n)},toString:function(){return(this.year()<0?"-":"")+k(Math.abs(this.year()),4)+"-"+k(this.month(),2)+"-"+k(this.day(),2)}});function l(){this.shortYearCutoff="+10"}p(l.prototype,{_validateLevel:0,newDate:function(n,r,a){return n==null?this.today():(n.year&&(this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),a=n.day(),r=n.month(),n=n.year()),new E(this,n,r,a))},today:function(){return this.fromJSDate(new Date)},epoch:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+k(Math.abs(r.year()),4)},monthsInYear:function(n){return this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear),12},monthOfYear:function(n,r){var a=this._validate(n,r,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth);return(a.month()+this.monthsInYear(a)-this.firstMonth)%this.monthsInYear(a)+this.minMonth},fromMonthOfYear:function(n,r){var a=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(n)+this.minMonth;return this._validate(n,a,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth),a},daysInYear:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate);return o.toJD()-this.newDate(o.year(),this.fromMonthOfYear(o.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(o))+2)%this.daysInWeek()},extraInfo:function(n,r,a){return this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),{}},add:function(n,r,a){return this._validate(n,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate),this._correctAdd(n,this._add(n,r,a),r,a)},_add:function(n,r,a){if(this._validateLevel++,a==="d"||a==="w"){var o=n.toJD()+r*(a==="w"?this.daysInWeek():1),s=n.calendar().fromJD(o);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var c=n.year()+(a==="y"?r:0),m=n.monthOfYear()+(a==="m"?r:0),s=n.day(),h=function(i){for(;mw-1+i.minMonth;)c++,m-=w,w=i.monthsInYear(c)};a==="y"?(n.month()!==this.fromMonthOfYear(c,m)&&(m=this.newDate(c,n.month(),this.minDay).monthOfYear()),m=Math.min(m,this.monthsInYear(c)),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,m)))):a==="m"&&(h(this),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,m))));var v=[c,this.fromMonthOfYear(c,m),s];return this._validateLevel--,v}catch(g){throw this._validateLevel--,g}},_correctAdd:function(n,r,a,o){if(!this.hasYearZero&&(o==="y"||o==="m")&&(r[0]===0||n.year()>0!=r[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[o],c=a<0?-1:1;r=this._add(n,a*s[0]+c*s[1],s[2])}return n.date(r[0],r[1],r[2])},set:function(n,r,a){this._validate(n,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate);var o=a==="y"?r:n.year(),s=a==="m"?r:n.month(),c=a==="d"?r:n.day();return(a==="y"||a==="m")&&(c=Math.min(c,this.daysInMonth(o,s))),n.date(o,s,c)},isValid:function(n,r,a){this._validateLevel++;var o=this.hasYearZero||n!==0;if(o){var s=this.newDate(n,r,this.minDay);o=r>=this.minMonth&&r-this.minMonth=this.minDay&&a-this.minDay13.5?13:1),g=s-(v>2.5?4716:4715);return g<=0&&g--,this.newDate(g,v,h)},toJSDate:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),s=new Date(o.year(),o.month()-1,o.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(n){return this.newDate(n.getFullYear(),n.getMonth()+1,n.getDate())}});var t=V.exports=new b;t.cdate=E,t.baseCalendar=l,t.calendars.gregorian=e}}),MH=ze({"node_modules/world-calendars/dist/plus.js"(){var J=Vc(),V=th();J(V.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),V.local=V.regionalOptions[""],J(V.cdate.prototype,{formatDate:function(p,b){return typeof p!="string"&&(b=p,p=""),this._calendar.formatDate(p||"",this,b)}}),J(V.baseCalendar.prototype,{UNIX_EPOCH:V.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:V.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(p,b,E){if(typeof p!="string"&&(E=b,b=p,p=""),!b)return"";if(b.calendar()!==this)throw V.local.invalidFormat||V.regionalOptions[""].invalidFormat;p=p||this.local.dateFormat,E=E||{};for(var k=E.dayNamesShort||this.local.dayNamesShort,l=E.dayNames||this.local.dayNames,e=E.monthNumbers||this.local.monthNumbers,t=E.monthNamesShort||this.local.monthNamesShort,n=E.monthNames||this.local.monthNames,r=E.calculateWeek||this.local.calculateWeek,a=function(M,C){for(var _=1;S+_1},o=function(M,C,_,T){var f=""+C;if(a(M,T))for(;f.length<_;)f="0"+f;return f},s=function(M,C,_,T){return a(M)?T[C]:_[C]},c=this,m=function(M){return typeof e=="function"?e.call(c,M,a("m")):g(o("m",M.month(),2))},h=function(M,C){return C?typeof n=="function"?n.call(c,M):n[M.month()-c.minMonth]:typeof t=="function"?t.call(c,M):t[M.month()-c.minMonth]},v=this.local.digits,g=function(M){return E.localNumbers&&v?v(M):M},i="",w=!1,S=0;S1},w=function(z,I){var O=i(z,I),D=[2,3,O?4:2,O?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],B=new RegExp("^-?\\d{1,"+D+"}"),F=b.substring(f).match(B);if(!F)throw(V.local.missingNumberAt||V.regionalOptions[""].missingNumberAt).replace(/\{0\}/,f);return f+=F[0].length,parseInt(F[0],10)},S=this,M=function(){if(typeof n=="function"){i("m");var z=n.call(S,b.substring(f));return f+=z.length,z}return w("m")},C=function(z,I,O,D){for(var B=i(z,D)?O:I,F=0;F-1){c=1,m=h;for(var x=this.daysInMonth(s,c);m>x;x=this.daysInMonth(s,c))c++,m-=x}return o>-1?this.fromJD(o):this.newDate(s,c,m)},determineDate:function(p,b,E,k,l){E&&typeof E!="object"&&(l=k,k=E,E=null),typeof k!="string"&&(l=k,k="");var e=this,t=function(n){try{return e.parseDate(k,n,l)}catch{}n=n.toLowerCase();for(var r=(n.match(/^c/)&&E?E.newDate():null)||e.today(),a=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=a.exec(n);o;)r.add(parseInt(o[1],10),o[2]||"d"),o=a.exec(n);return r};return b=b?b.newDate():null,p=p==null?b:typeof p=="string"?t(p):typeof p=="number"?isNaN(p)||p===1/0||p===-1/0?b:e.today().add(p,"d"):e.newDate(p),p}})}}),SH=ze({"node_modules/world-calendars/dist/calendars/chinese.js"(){var J=th(),V=Vc(),p=J.instance();function b(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(o,s){if(typeof o=="string"){var c=o.match(k);return c?c[0]:""}var m=this._validateYear(o),h=o.month(),v=""+this.toChineseMonth(m,h);return s&&v.length<2&&(v="0"+v),this.isIntercalaryMonth(m,h)&&(v+="i"),v},monthNames:function(o){if(typeof o=="string"){var s=o.match(l);return s?s[0]:""}var c=this._validateYear(o),m=o.month(),h=this.toChineseMonth(c,m),v=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][h-1];return this.isIntercalaryMonth(c,m)&&(v="\u95F0"+v),v},monthNamesShort:function(o){if(typeof o=="string"){var s=o.match(e);return s?s[0]:""}var c=this._validateYear(o),m=o.month(),h=this.toChineseMonth(c,m),v=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][h-1];return this.isIntercalaryMonth(c,m)&&(v="\u95F0"+v),v},parseMonth:function(o,s){o=this._validateYear(o);var c=parseInt(s),m;if(isNaN(c))s[0]==="\u95F0"&&(m=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),c=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var h=s[s.length-1];m=h==="i"||h==="I"}var v=this.toMonthIndex(o,c,m);return v},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(o,s){if(o.year&&(o=o.year()),typeof o!="number"||o<1888||o>2111)throw s.replace(/\{0\}/,this.local.name);return o},toMonthIndex:function(o,s,c){var m=this.intercalaryMonth(o),h=c&&s!==m;if(h||s<1||s>12)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var v;return m?!c&&s<=m?v=s-1:v=s:v=s-1,v},toChineseMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o),m=c?12:11;if(s<0||s>m)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var h;return c?s>13;return c},isIntercalaryMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o);return!!c&&c===s},leapYear:function(o){return this.intercalaryMonth(o)!==0},weekOfYear:function(o,s,c){var m=this._validateYear(o,J.local.invalidyear),h=n[m-n[0]],v=h>>9&4095,g=h>>5&15,i=h&31,w;w=p.newDate(v,g,i),w.add(4-(w.dayOfWeek()||7),"d");var S=this.toJD(o,s,c)-w.toJD();return 1+Math.floor(S/7)},monthsInYear:function(o){return this.leapYear(o)?13:12},daysInMonth:function(o,s){o.year&&(s=o.month(),o=o.year()),o=this._validateYear(o);var c=t[o-t[0]],m=c>>13,h=m?12:11;if(s>h)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var v=c&1<<12-s?30:29;return v},weekDay:function(o,s,c){return(this.dayOfWeek(o,s,c)||7)<6},toJD:function(o,s,c){var m=this._validate(o,v,c,J.local.invalidDate);o=this._validateYear(m.year()),s=m.month(),c=m.day();var h=this.isIntercalaryMonth(o,s),v=this.toChineseMonth(o,s),g=a(o,v,c,h);return p.toJD(g.year,g.month,g.day)},fromJD:function(o){var s=p.fromJD(o),c=r(s.year(),s.month(),s.day()),m=this.toMonthIndex(c.year,c.month,c.isIntercalary);return this.newDate(c.year,m,c.day)},fromString:function(o){var s=o.match(E),c=this._validateYear(+s[1]),m=+s[2],h=!!s[3],v=this.toMonthIndex(c,m,h),g=+s[4];return this.newDate(c,v,g)},add:function(o,s,c){var m=o.year(),h=o.month(),v=this.isIntercalaryMonth(m,h),g=this.toChineseMonth(m,h),i=Object.getPrototypeOf(b.prototype).add.call(this,o,s,c);if(c==="y"){var w=i.year(),S=i.month(),M=this.isIntercalaryMonth(w,g),C=v&&M?this.toMonthIndex(w,g,!0):this.toMonthIndex(w,g,!1);C!==S&&i.month(C)}return i}});var E=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,k=/^\d?\d[iI]?/m,l=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;J.calendars.chinese=b;var t=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],n=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function r(o,s,c,m){var h,v;if(typeof o=="object")h=o,v=s||{};else{var g=typeof o=="number"&&o>=1888&&o<=2111;if(!g)throw new Error("Solar year outside range 1888-2111");var i=typeof s=="number"&&s>=1&&s<=12;if(!i)throw new Error("Solar month outside range 1 - 12");var w=typeof c=="number"&&c>=1&&c<=31;if(!w)throw new Error("Solar day outside range 1 - 31");h={year:o,month:s,day:c},v=m||{}}var S=n[h.year-n[0]],M=h.year<<9|h.month<<5|h.day;v.year=M>=S?h.year:h.year-1,S=n[v.year-n[0]];var C=S>>9&4095,_=S>>5&15,T=S&31,f,u=new Date(C,_-1,T),A=new Date(h.year,h.month-1,h.day);f=Math.round((A-u)/(24*3600*1e3));var x=t[v.year-t[0]],z;for(z=0;z<13;z++){var I=x&1<<12-z?30:29;if(f>13;return!O||z=1888&&o<=2111;if(!i)throw new Error("Lunar year outside range 1888-2111");var w=typeof s=="number"&&s>=1&&s<=12;if(!w)throw new Error("Lunar month outside range 1 - 12");var S=typeof c=="number"&&c>=1&&c<=30;if(!S)throw new Error("Lunar day outside range 1 - 30");var M;typeof m=="object"?(M=!1,v=m):(M=!!m,v=h||{}),g={year:o,month:s,day:c,isIntercalary:M}}var C;C=g.day-1;var _=t[g.year-t[0]],T=_>>13,f;T&&(g.month>T||g.isIntercalary)?f=g.month:f=g.month-1;for(var u=0;u>9&4095,I=x>>5&15,O=x&31,D=new Date(z,I-1,O+C);return v.year=D.getFullYear(),v.month=1+D.getMonth(),v.day=D.getDate(),v}}}),EH=ze({"node_modules/world-calendars/dist/calendars/coptic.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),b<0&&b++,l.day()+(l.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var E=Math.floor(b)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(b)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.coptic=p}}),kH=ze({"node_modules/world-calendars/dist/calendars/discworld.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),!1},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),13},daysInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),400},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return(e.day()+1)%8},weekDay:function(E,k,l){var e=this.dayOfWeek(E,k,l);return e>=2&&e<=6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{century:b[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return E=e.year()+(e.year()<0?1:0),k=e.month(),l=e.day(),l+(k>1?16:0)+(k>2?(k-2)*32:0)+(E-1)*400+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E+.5)-Math.floor(this.jdEpoch)-1;var k=Math.floor(E/400)+1;E-=(k-1)*400,E+=E>15?16:0;var l=Math.floor(E/32)+1,e=E-(l-1)*32+1;return this.newDate(k<=0?k-1:k,l,e)}});var b={20:"Fruitbat",21:"Anchovy"};J.calendars.discworld=p}}),CH=ze({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),b<0&&b++,l.day()+(l.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var E=Math.floor(b)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(b)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.ethiopian=p}}),LH=ze({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this._leapYear(k.year())},_leapYear:function(E){return E=E<0?E+1:E,b(E*7+1,19)<7},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),this._leapYear(E.year?E.year():E)?13:12},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return E=k.year(),this.toJD(E===-1?1:E+1,7,1)-this.toJD(E,7,1)},daysInMonth:function(E,k){return E.year&&(k=E.month(),E=E.year()),this._validate(E,k,this.minDay,J.local.invalidMonth),k===12&&this.leapYear(E)||k===8&&b(this.daysInYear(E),10)===5?30:k===9&&b(this.daysInYear(E),10)===3?29:this.daysPerMonth[k-1]},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=E<=0?E+1:E,n=this.jdEpoch+this._delay1(t)+this._delay2(t)+l+1;if(k<7){for(var r=7;r<=this.monthsInYear(E);r++)n+=this.daysInMonth(E,r);for(var r=1;r=this.toJD(k===-1?1:k+1,7,1);)k++;for(var l=Ethis.toJD(k,l,this.daysInMonth(k,l));)l++;var e=E-this.toJD(k,l,1)+1;return this.newDate(k,l,e)}});function b(E,k){return E-k*Math.floor(E/k)}J.calendars.hebrew=p}}),PH=ze({"node_modules/world-calendars/dist/calendars/islamic.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012Bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(b){var E=this._validate(b,this.minMonth,this.minDay,J.local.invalidYear);return(E.year()*11+14)%30<11},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(b){return this.leapYear(b)?355:354},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===12&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return this.dayOfWeek(b,E,k)!==5},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),E=l.month(),k=l.day(),b=b<=0?b+1:b,k+Math.ceil(29.5*(E-1))+(b-1)*354+Math.floor((3+11*b)/30)+this.jdEpoch-1},fromJD:function(b){b=Math.floor(b)+.5;var E=Math.floor((30*(b-this.jdEpoch)+10646)/10631);E=E<=0?E-1:E;var k=Math.min(12,Math.ceil((b-29-this.toJD(E,1,1))/29.5)+1),l=b-this.toJD(E,k,1)+1;return this.newDate(E,k,l)}}),J.calendars.islamic=p}}),RH=ze({"node_modules/world-calendars/dist/calendars/julian.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()<0?E.year()+1:E.year();return k%4===0},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===2&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),E=l.month(),k=l.day(),b<0&&b++,E<=2&&(b--,E+=12),Math.floor(365.25*(b+4716))+Math.floor(30.6001*(E+1))+k-1524.5},fromJD:function(b){var E=Math.floor(b+.5),k=E+1524,l=Math.floor((k-122.1)/365.25),e=Math.floor(365.25*l),t=Math.floor((k-e)/30.6001),n=t-Math.floor(t<14?1:13),r=l-Math.floor(n>2?4716:4715),a=k-e-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,n,a)}}),J.calendars.julian=p}}),IH=ze({"node_modules/world-calendars/dist/calendars/mayan.js"(){var J=th(),V=Vc();function p(k){this.local=this.regionalOptions[k||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),!1},formatYear:function(k){var l=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear);k=l.year();var e=Math.floor(k/400);k=k%400,k+=k<0?400:0;var t=Math.floor(k/20);return e+"."+t+"."+k%20},forYear:function(k){if(k=k.split("."),k.length<3)throw"Invalid Mayan year";for(var l=0,e=0;e19||e>0&&t<0)throw"Invalid Mayan year";l=l*20+t}return l},monthsInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),18},weekOfYear:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),0},daysInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),360},daysInMonth:function(k,l){return this._validate(k,l,this.minDay,J.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()},weekDay:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),!0},extraInfo:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate),n=t.toJD(),r=this._toHaab(n),a=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[a[0]-1],tzolkinDay:a[0],tzolkinTrecena:a[1]}},_toHaab:function(k){k-=this.jdEpoch;var l=b(k+8+17*20,365);return[Math.floor(l/20)+1,b(l,20)]},_toTzolkin:function(k){return k-=this.jdEpoch,[E(k+20,20),E(k+4,13)]},toJD:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()+t.month()*20+t.year()*360+this.jdEpoch},fromJD:function(k){k=Math.floor(k)+.5-this.jdEpoch;var l=Math.floor(k/360);k=k%360,k+=k<0?360:0;var e=Math.floor(k/20),t=k%20;return this.newDate(l,e,t)}});function b(k,l){return k-l*Math.floor(k/l)}function E(k,l){return b(k-1,l)+1}J.calendars.mayan=p}}),DH=ze({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar;var b=J.instance("gregorian");V(p.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear);return b.leapYear(k.year()+(k.year()<1?1:0)+1469)},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidMonth),t=e.year();t<0&&t++;for(var n=e.day(),r=1;r=this.toJD(k+1,1,1);)k++;for(var l=E-Math.floor(this.toJD(k,1,1)+.5)+1,e=1;l>this.daysInMonth(k,e);)l-=this.daysInMonth(k,e),e++;return this.newDate(k,e,l)}}),J.calendars.nanakshahi=p}}),FH=ze({"node_modules/world-calendars/dist/calendars/nepali.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(b){return this.daysInYear(b)!==this.daysPerYear},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(b){var E=this._validate(b,this.minMonth,this.minDay,J.local.invalidYear);if(b=E.year(),typeof this.NEPALI_CALENDAR_DATA[b]>"u")return this.daysPerYear;for(var k=0,l=this.minMonth;l<=12;l++)k+=this.NEPALI_CALENDAR_DATA[b][l];return k},daysInMonth:function(b,E){return b.year&&(E=b.month(),b=b.year()),this._validate(b,E,this.minDay,J.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[b]>"u"?this.daysPerMonth[E-1]:this.NEPALI_CALENDAR_DATA[b][E]},weekDay:function(b,E,k){return this.dayOfWeek(b,E,k)!==6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);b=l.year(),E=l.month(),k=l.day();var e=J.instance(),t=0,n=E,r=b;this._createMissingCalendarData(b);var a=b-(n>9||n===9&&k>=this.NEPALI_CALENDAR_DATA[r][0]?56:57);for(E!==9&&(t=k,n--);n!==9;)n<=0&&(n=12,r--),t+=this.NEPALI_CALENDAR_DATA[r][n],n--;return E===9?(t+=k-this.NEPALI_CALENDAR_DATA[r][0],t<0&&(t+=e.daysInYear(a))):t+=this.NEPALI_CALENDAR_DATA[r][9]-this.NEPALI_CALENDAR_DATA[r][0],e.newDate(a,1,1).add(t,"d").toJD()},fromJD:function(b){var E=J.instance(),k=E.fromJD(b),l=k.year(),e=k.dayOfYear(),t=l+56;this._createMissingCalendarData(t);for(var n=9,r=this.NEPALI_CALENDAR_DATA[t][0],a=this.NEPALI_CALENDAR_DATA[t][n]-r+1;e>a;)n++,n>12&&(n=1,t++),a+=this.NEPALI_CALENDAR_DATA[t][n];var o=this.NEPALI_CALENDAR_DATA[t][n]-(a-e);return this.newDate(t,n,o)},_createMissingCalendarData:function(b){var E=this.daysPerMonth.slice(0);E.unshift(17);for(var k=b-1;k"u"&&(this.NEPALI_CALENDAR_DATA[k]=E)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),J.calendars.nepali=p}}),zH=ze({"node_modules/world-calendars/dist/calendars/persian.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}function b(E){var k=E-475;E<0&&k++;var l=.242197,e=l*k,t=l*(k+1),n=e-Math.floor(e),r=t-Math.floor(t);return n>r}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return b(k.year())},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=0;if(E>0)for(var n=1;n0?E-1:E)*365+t+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E)+.5;var k=475+(E-this.toJD(475,1,1))/365.242197,l=Math.floor(k);l<=0&&l--,E>this.toJD(l,12,b(l)?30:29)&&(l++,l===0&&l++);var e=E-this.toJD(l,1,1)+1,t=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),n=E-this.toJD(l,t,1)+1;return this.newDate(l,t,n)}}),J.calendars.persian=p,J.calendars.jalali=p}}),BH=ze({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var J=th(),V=Vc(),p=J.instance();function b(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return p.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return p.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return p.toJD(t,e.month(),e.day())},fromJD:function(E){var k=p.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)},_g2tYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)}}),J.calendars.taiwan=b}}),OH=ze({"node_modules/world-calendars/dist/calendars/thai.js"(){var J=th(),V=Vc(),p=J.instance();function b(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return p.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return p.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return p.toJD(t,e.month(),e.day())},fromJD:function(E){var k=p.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)},_g2tYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)}}),J.calendars.thai=b}}),NH=ze({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this.daysInYear(k.year())===355},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){for(var k=0,l=1;l<=12;l++)k+=this.daysInMonth(E,l);return k},daysInMonth:function(E,k){for(var l=this._validate(E,k,this.minDay,J.local.invalidMonth),e=l.toJD()-24e5+.5,t=0,n=0;ne)return b[t]-b[t-1];t++}return 30},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate),t=12*(e.year()-1)+e.month()-15292,n=e.day()+b[t-1]-1;return n+24e5-.5},fromJD:function(E){for(var k=E-24e5+.5,l=0,e=0;ek);e++)l++;var t=l+15292,n=Math.floor((t-1)/12),r=n+1,a=t-12*n,o=k-b[l-1]+1;return this.newDate(r,a,o)},isValid:function(E,k,l){var e=J.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(E=E.year!=null?E.year:E,e=E>=1276&&E<=1500),e},_validate:function(E,k,l,e){var t=J.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw e.replace(/\{0\}/,this.local.name);return t}}),J.calendars.ummalqura=p;var b=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]}}),jH=ze({"src/components/calendars/calendars.js"(J,V){"use strict";V.exports=th(),MH(),SH(),EH(),kH(),CH(),LH(),PH(),RH(),IH(),DH(),FH(),zH(),BH(),OH(),NH()}}),UH=ze({"src/components/calendars/index.js"(J,V){"use strict";var p=jH(),b=Nr(),E=No(),k=E.EPOCHJD,l=E.ONEDAY,e={valType:"enumerated",values:b.sortObjectKeys(p.calendars),editType:"calc",dflt:"gregorian"},t=function(_,T,f,u){var A={};return A[f]=e,b.coerce(_,T,A,f,u)},n=function(_,T,f,u){for(var A=0;A0){if(++ye>=n$)return arguments[0]}else ye=0;return oe.apply(void 0,arguments)}}var qy=s$;var l$=qy(Fy),Vy=l$;var u$=/\{\n\/\* \[wrapped with (.+)\] \*/,c$=/,? & /;function f$(oe){var ye=oe.match(u$);return ye?ye[1].split(c$):[]}var zE=f$;var h$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function d$(oe,ye){var Fe=ye.length;if(!Fe)return oe;var dt=Fe-1;return ye[dt]=(Fe>1?"& ":"")+ye[dt],ye=ye.join(Fe>2?", ":" "),oe.replace(h$,`{ +${je.shaderPreludeCode.vertexSource}`,define:je.shaderDefine},defaultProjectionData:ut},Dt=Re.renderingMode?Re.renderingMode:"2d";if(pe.renderPass==="offscreen"){let Gt=Re.prerender;Gt&&(pe.setCustomLayerDefaults(),be.setColorMode(pe.colorModeForRenderPass()),Gt.call(Re,be.gl,ft),be.setDirty(),pe.setBaseState())}else if(pe.renderPass==="translucent"){pe.setCustomLayerDefaults(),be.setColorMode(pe.colorModeForRenderPass()),be.setStencilMode(Zi.disabled);let Gt=Dt==="3d"?pe.getDepthModeFor3D():pe.getDepthModeForSublayer(0,Vi.ReadOnly);be.setDepthMode(Gt),Re.render(be.gl,ft),be.setDirty(),pe.setBaseState(),be.bindFramebuffer.set(null)}},debug:function(pe,y,N){for(let ie of N)Kl(pe,y,ie)},debugPadding:function(pe){let y=pe.transform.padding;js(pe,pe.transform.height-(y.top||0),3,Es),js(pe,y.bottom||0,3,ns),Cl(pe,y.left||0,3,Kn),Cl(pe,pe.transform.width-(y.right||0),3,zo);let N=pe.transform.centerPoint;(function(ie,fe,be,Re){zl(ie,fe-1,be-10,2,20,Re),zl(ie,fe-10,be-1,20,2,Re)})(pe,N.x,pe.transform.height-N.y,gs)},terrainDepth:function(pe,y){let N=pe.context,ie=N.gl,fe=pe.transform,be=to.unblended,Re=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),je=y.tileManager.getRenderableTiles(),Ze=pe.useProgram("terrainDepth");N.bindFramebuffer.set(y.getFramebuffer("depth").framebuffer),N.viewport.set([0,0,pe.width/devicePixelRatio,pe.height/devicePixelRatio]),N.clear({color:e.bo.transparent,depth:1});for(let ut of je){let ft=y.getTerrainMesh(ut.tileID),Dt=y.getTerrainData(ut.tileID),Gt=fe.getProjectionData({overscaledTileID:ut.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),Kt={u_ele_delta:y.getMeshFrameDelta(fe.zoom)};Ze.draw(N,ie.TRIANGLES,Re,Zi.disabled,be,pi.backCCW,Kt,Dt,Gt,"terrain",ft.vertexBuffer,ft.indexBuffer,ft.segments)}N.bindFramebuffer.set(null),N.viewport.set([0,0,pe.width,pe.height])},terrainCoords:function(pe,y){let N=pe.context,ie=N.gl,fe=pe.transform,be=to.unblended,Re=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),je=y.getCoordsTexture(),Ze=y.tileManager.getRenderableTiles(),ut=pe.useProgram("terrainCoords");N.bindFramebuffer.set(y.getFramebuffer("coords").framebuffer),N.viewport.set([0,0,pe.width/devicePixelRatio,pe.height/devicePixelRatio]),N.clear({color:e.bo.transparent,depth:1}),y.coordsIndex=[];for(let ft of Ze){let Dt=y.getTerrainMesh(ft.tileID),Gt=y.getTerrainData(ft.tileID);N.activeTexture.set(ie.TEXTURE0),ie.bindTexture(ie.TEXTURE_2D,je.texture);let Kt={u_terrain_coords_id:(255-y.coordsIndex.length)/255,u_texture:0,u_ele_delta:y.getMeshFrameDelta(fe.zoom)},st=fe.getProjectionData({overscaledTileID:ft.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ut.draw(N,ie.TRIANGLES,Re,Zi.disabled,be,pi.backCCW,Kt,Gt,st,"terrain",Dt.vertexBuffer,Dt.indexBuffer,Dt.segments),y.coordsIndex.push(ft.tileID.key)}N.bindFramebuffer.set(null),N.viewport.set([0,0,pe.width,pe.height])}};class Su{constructor(y,N){this.drawFunctions=Hu,this.context=new tr(y),this.transform=N,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:e.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Sr.maxOverzooming+Sr.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Di}resize(y,N,ie){if(this.width=Math.floor(y*ie),this.height=Math.floor(N*ie),this.pixelRatio=ie,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let fe of this.style._order)this.style._layers[fe].resize()}setup(){let y=this.context,N=new e.aU;N.emplaceBack(0,0),N.emplaceBack(e.a6,0),N.emplaceBack(0,e.a6),N.emplaceBack(e.a6,e.a6),this.tileExtentBuffer=y.createVertexBuffer(N,eo.members),this.tileExtentSegments=e.aV.simpleSegment(0,0,4,2);let ie=new e.aU;ie.emplaceBack(0,0),ie.emplaceBack(e.a6,0),ie.emplaceBack(0,e.a6),ie.emplaceBack(e.a6,e.a6),this.debugBuffer=y.createVertexBuffer(ie,eo.members),this.debugSegments=e.aV.simpleSegment(0,0,4,5);let fe=new e.ch;fe.emplaceBack(0,0,0,0),fe.emplaceBack(e.a6,0,e.a6,0),fe.emplaceBack(0,e.a6,0,e.a6),fe.emplaceBack(e.a6,e.a6,e.a6,e.a6),this.rasterBoundsBuffer=y.createVertexBuffer(fe,bc.members),this.rasterBoundsSegments=e.aV.simpleSegment(0,0,4,2);let be=new e.aU;be.emplaceBack(0,0),be.emplaceBack(e.a6,0),be.emplaceBack(0,e.a6),be.emplaceBack(e.a6,e.a6),this.rasterBoundsBufferPosOnly=y.createVertexBuffer(be,eo.members),this.rasterBoundsSegmentsPosOnly=e.aV.simpleSegment(0,0,4,5);let Re=new e.aU;Re.emplaceBack(0,0),Re.emplaceBack(1,0),Re.emplaceBack(0,1),Re.emplaceBack(1,1),this.viewportBuffer=y.createVertexBuffer(Re,eo.members),this.viewportSegments=e.aV.simpleSegment(0,0,4,2);let je=new e.ci;je.emplaceBack(0),je.emplaceBack(1),je.emplaceBack(3),je.emplaceBack(2),je.emplaceBack(0),this.tileBorderIndexBuffer=y.createIndexBuffer(je);let Ze=new e.aW;Ze.emplaceBack(1,0,2),Ze.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=y.createIndexBuffer(Ze);let ut=this.context.gl;this.stencilClearMode=new Zi({func:ut.ALWAYS,mask:0},0,255,ut.ZERO,ut.ZERO,ut.ZERO),this.tileExtentMesh=new Xn(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let y=this.context,N=y.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let ie=e.O();e.c7(ie,0,this.width,this.height,0,0,1),e.S(ie,ie,[N.drawingBufferWidth,N.drawingBufferHeight,0]);let fe={mainMatrix:ie,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:ie};this.useProgram("clippingMask",null,!0).draw(y,N.TRIANGLES,Vi.disabled,this.stencilClearMode,to.disabled,pi.disabled,null,null,fe,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(y,N,ie){if(this.currentStencilSource===y.source||!y.isTileClipped()||!N?.length)return;this.currentStencilSource=y.source,this.nextStencilID+N.length>256&&this.clearStencil();let fe=this.context;fe.setColorMode(to.disabled),fe.setDepthMode(Vi.disabled);let be={};for(let Re of N)be[Re.key]=this.nextStencilID++;this._renderTileMasks(be,N,ie,!0),this._renderTileMasks(be,N,ie,!1),this._tileClippingMaskIDs=be}_renderTileMasks(y,N,ie,fe){var be;let Re=this.context,je=Re.gl,Ze=this.style.projection,ut=this.transform,ft=this.useProgram("clippingMask");for(let Dt of N){let Gt=y[Dt.key],Kt=(be=this.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Dt),st=Ze.getMeshFromTileID(this.context,Dt.canonical,fe,!0,"stencil"),It=ut.getProjectionData({overscaledTileID:Dt,applyGlobeMatrix:!ie,applyTerrainMatrix:!0});ft.draw(Re,je.TRIANGLES,Vi.disabled,new Zi({func:je.ALWAYS,mask:0},Gt,255,je.KEEP,je.KEEP,je.REPLACE),to.disabled,ie?pi.disabled:pi.backCCW,null,Kt,It,"$clipping",st.vertexBuffer,st.indexBuffer,st.segments)}}_renderTilesDepthBuffer(){var y;let N=this.context,ie=N.gl,fe=this.style.projection,be=this.transform,Re=this.useProgram("depth"),je=this.getDepthModeFor3D(),Ze=Je(be,{tileSize:be.tileSize});for(let ut of Ze){let ft=(y=this.style.map.terrain)===null||y===void 0?void 0:y.getTerrainData(ut),Dt=fe.getMeshFromTileID(this.context,ut.canonical,!0,!0,"raster"),Gt=be.getProjectionData({overscaledTileID:ut,applyGlobeMatrix:!0,applyTerrainMatrix:!0});Re.draw(N,ie.TRIANGLES,je,Zi.disabled,to.disabled,pi.backCCW,null,ft,Gt,"$clipping",Dt.vertexBuffer,Dt.indexBuffer,Dt.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let y=this.nextStencilID++,N=this.context.gl;return new Zi({func:N.NOTEQUAL,mask:255},y,255,N.KEEP,N.KEEP,N.REPLACE)}stencilModeForClipping(y){let N=this.context.gl;return new Zi({func:N.EQUAL,mask:255},this._tileClippingMaskIDs[y.key],0,N.KEEP,N.KEEP,N.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(y){let N=this.context.gl,ie=y.sort((Re,je)=>je.overscaledZ-Re.overscaledZ),fe=ie[ie.length-1].overscaledZ,be=ie[0].overscaledZ-fe+1;if(be>1){this.currentStencilSource=void 0,this.nextStencilID+be>256&&this.clearStencil();let Re={};for(let je=0;jeje.overscaledZ-Re.overscaledZ),fe=ie[ie.length-1].overscaledZ,be=ie[0].overscaledZ-fe+1;if(this.clearStencil(),be>1){let Re={},je={};for(let Ze=0;Ze0};for(let Kt in je){let st=je[Kt];st.used&&st.prepare(this.context),Ze[Kt]=st.getVisibleCoordinates(!1),ut[Kt]=Ze[Kt].slice().reverse(),ft[Kt]=st.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Kt=0;Ktthis.useProgram(Kt)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:N.showOverdrawInspector?e.bo.black:e.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=N.showOverdrawInspector,this.depthRangeFor3D=[0,1-(y._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Re.length-1;this.currentLayer>=0;this.currentLayer--){let Kt=this.style._layers[Re[this.currentLayer]],st=je[Kt.source],It=Ze[Kt.source];this._renderTileClippingMasks(Kt,It,!1),this.renderLayer(this,st,Kt,It,Dt)}this.renderPass="translucent";let Gt=!1;for(this.currentLayer=0;this.currentLayervr.source&&!vr.isHidden(It)?[st.tileManagers[vr.source]]:[]),dr=ir.filter(vr=>vr.getSource().type==="vector"),Ar=ir.filter(vr=>vr.getSource().type!=="vector"),hr=vr=>{(!Ut||Ut.getSource().maxzoom0?N.pop():null}isPatternMissing(y){if(!y)return!1;if(!y.from||!y.to)return!0;let N=this.imageManager.getPattern(y.from.toString()),ie=this.imageManager.getPattern(y.to.toString());return!N||!ie}useProgram(y,N,ie=!1,fe=[]){var be;this.cache||(this.cache={});let Re=!!this.style.map.terrain,je=this.style.projection,Ze=ie?Ai.projectionMercator:je.shaderPreludeCode,ut=ie?gi:je.shaderDefine,ft=y+(N?N.cacheKey:"")+`/${ie?qi:je.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(Re?"/terrain":"")+(fe?`/${fe.join("/")}`:"");return(be=this.cache)[ft]||(be[ft]=new ah(this.context,Ai[y],N,qf[y],this._showOverdrawInspector,Re,Ze,ut,fe)),this.cache[ft]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let y=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(y.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new e.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var y,N;if(this._tileTextures){for(let ie in this._tileTextures){let fe=this._tileTextures[ie];if(fe)for(let be of fe)be.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((y=this.tileExtentMesh.vertexBuffer)===null||y===void 0||y.destroy()),this.tileExtentMesh&&((N=this.tileExtentMesh.indexBuffer)===null||N===void 0||N.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let ie in this.cache){let fe=this.cache[ie];fe?.program&&this.context.gl.deleteProgram(fe.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:y,drawingBufferHeight:N}=this.context.gl;return this.width!==y||this.height!==N}}function mc(pe,y){let N,ie=!1,fe=null,be=()=>{fe=null,ie&&(pe(...N),fe=setTimeout(be,y),ie=!1)};return(...Re)=>(ie=!0,N=Re,fe||be(),fe)}Su.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class Jc{constructor(y){this._getCurrentHash=()=>{let N=window.location.hash.replace("#","");if(this._hashName){let ie,fe=N.split("&").map(be=>be.split("="));for(let be of fe)be[0]===this._hashName&&(ie=be);return(ie&&ie[1]||"").split("/")}return N.split("/")},this._onHashChange=()=>{let N=this._getCurrentHash();if(!this._isValidHash(N))return!1;let ie=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(N[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+N[2],+N[1]],zoom:+N[0],bearing:ie,pitch:+(N[4]||0)}),!0},this._updateHashUnthrottled=()=>{let N=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,N)},this._removeHash=()=>{let N=this._getCurrentHash();if(N.length===0)return;let ie=N.join("/"),fe=ie;fe.split("&").length>0&&(fe=fe.split("&")[0]),this._hashName&&(fe=`${this._hashName}=${ie}`);let be=window.location.hash.replace(fe,"");be.startsWith("#&")?be=be.slice(0,1)+be.slice(2):be==="#"&&(be="");let Re=window.location.href.replace(/(#.+)?$/,be);Re=Re.replace("&&","&"),window.history.replaceState(window.history.state,null,Re)},this._updateHash=mc(this._updateHashUnthrottled,300),this._hashName=y&&encodeURIComponent(y)}addTo(y){return this._map=y,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(y){let N=this._map.getCenter(),ie=Math.round(100*this._map.getZoom())/100,fe=Math.ceil((ie*Math.LN2+Math.log(512/360/.5))/Math.LN10),be=Math.pow(10,fe),Re=Math.round(N.lng*be)/be,je=Math.round(N.lat*be)/be,Ze=this._map.getBearing(),ut=this._map.getPitch(),ft="";if(ft+=y?`/${Re}/${je}/${ie}`:`${ie}/${je}/${Re}`,(Ze||ut)&&(ft+="/"+Math.round(10*Ze)/10),ut&&(ft+=`/${Math.round(ut)}`),this._hashName){let Dt=this._hashName,Gt=!1,Kt=window.location.hash.slice(1).split("&").map(st=>{let It=st.split("=")[0];return It===Dt?(Gt=!0,`${It}=${ft}`):st}).filter(st=>st);return Gt||Kt.push(`${Dt}=${ft}`),`#${Kt.join("&")}`}return`#${ft}`}_isValidHash(y){if(y.length<3||y.some(isNaN))return!1;try{new e.W(+y[2],+y[1])}catch{return!1}let N=+y[0],ie=+(y[3]||0),fe=+(y[4]||0);return N>=this._map.getMinZoom()&&N<=this._map.getMaxZoom()&&ie>=-180&&ie<=180&&fe>=this._map.getMinPitch()&&fe<=this._map.getMaxPitch()}}let oc={linearity:.3,easing:e.cv(0,0,.3,1)},du=e.e({deceleration:2500,maxSpeed:1400},oc),Jl=e.e({deceleration:20,maxSpeed:1400},oc),Ql=e.e({deceleration:1e3,maxSpeed:360},oc),Eu=e.e({deceleration:1e3,maxSpeed:90},oc),bf=e.e({deceleration:1e3,maxSpeed:360},oc);class lh{constructor(y){this._map=y,this.clear()}clear(){this._inertiaBuffer=[]}record(y){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:g(),settings:y})}_drainInertiaBuffer(){let y=this._inertiaBuffer,N=g();for(;y.length>0&&N-y[0].time>160;)y.shift()}_onMoveEnd(y){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let N={zoom:0,bearing:0,pitch:0,roll:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:be}of this._inertiaBuffer)N.zoom+=be.zoomDelta||0,N.bearing+=be.bearingDelta||0,N.pitch+=be.pitchDelta||0,N.roll+=be.rollDelta||0,be.panDelta&&N.pan._add(be.panDelta),be.around&&(N.around=be.around),be.pinchAround&&(N.pinchAround=be.pinchAround);let ie=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,fe={};if(N.pan.mag()){let be=Ks(N.pan.mag(),ie,e.e({},du,y||{})),Re=N.pan.mult(be.amount/N.pan.mag()),je=this._map.cameraHelper.handlePanInertia(Re,this._map.transform);fe.center=je.easingCenter,fe.offset=je.easingOffset,Pc(fe,be)}if(N.zoom){let be=Ks(N.zoom,ie,Jl);fe.zoom=e.cw(this._map.transform.zoom+be.amount,this._map.getZoomSnap(),be.amount),Pc(fe,be)}if(N.bearing){let be=Ks(N.bearing,ie,Ql);fe.bearing=this._map.transform.bearing+e.al(be.amount,-179,179),Pc(fe,be)}if(N.pitch){let be=Ks(N.pitch,ie,Eu);fe.pitch=this._map.transform.pitch+be.amount,Pc(fe,be)}if(N.roll){let be=Ks(N.roll,ie,bf);fe.roll=this._map.transform.roll+e.al(be.amount,-179,179),Pc(fe,be)}if(fe.zoom||fe.bearing){let be=N.pinchAround===void 0?N.around:N.pinchAround;fe.around=be?this._map.unproject(be):this._map.getCenter()}return this.clear(),e.e(fe,{noMoveStart:!0})}}function Pc(pe,y){(!pe.duration||pe.durationN.unproject(Ze)),je=be.reduce((Ze,ut,ft,Dt)=>Ze.add(ut.div(Dt.length)),new e.P(0,0));super(y,{points:be,point:je,lngLats:Re,lngLat:N.unproject(je),originalEvent:ie}),this._defaultPrevented=!1}}class wf extends e.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(y,N,ie){super(y,{originalEvent:ie}),this._defaultPrevented=!1}}class Qc{constructor(y,N){this._map=y,this._clickTolerance=N.clickTolerance}reset(){delete this._mousedownPos}wheel(y){return this._firePreventable(new wf(y.type,this._map,y))}mousedown(y,N){return this._mousedownPos=N,this._firePreventable(new Bl(y.type,this._map,y))}mouseup(y){this._map.fire(new Bl(y.type,this._map,y))}click(y,N){this._mousedownPos&&this._mousedownPos.dist(N)>=this._clickTolerance||this._map.fire(new Bl(y.type,this._map,y))}dblclick(y){return this._firePreventable(new Bl(y.type,this._map,y))}mouseover(y){this._map.fire(new Bl(y.type,this._map,y))}mouseout(y){this._map.fire(new Bl(y.type,this._map,y))}touchstart(y){return this._firePreventable(new Wu(y.type,this._map,y))}touchmove(y){this._map.fire(new Wu(y.type,this._map,y))}touchend(y){this._map.fire(new Wu(y.type,this._map,y))}touchcancel(y){this._map.fire(new Wu(y.type,this._map,y))}_firePreventable(y){if(this._map.fire(y),y.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ku{constructor(y){this._map=y}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(y){this._map.fire(new Bl(y.type,this._map,y))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Bl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(y){this._delayContextMenu?this._contextMenuEvent=y:this._ignoreContextMenu||this._map.fire(new Bl(y.type,this._map,y)),this._map.listens("contextmenu")&&y.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ol{constructor(y){this._map=y}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(y){return this.transform.screenPointToLocation(e.P.convert(y),this._map.terrain)}}class Nl{constructor(y,N){this._map=y,this._tr=new Ol(y),this._el=y.getCanvasContainer(),this._container=y.getContainer(),this._clickTolerance=N.clickTolerance||1,N.boxZoom&&typeof N.boxZoom=="object"&&(this._boxZoomEnd=N.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(y,N){this.isEnabled()&&y.shiftKey&&y.button===0&&(m.disableDrag(),this._startPos=this._lastPos=N,this._active=!0)}mousemoveWindow(y,N){if(!this._active)return;let ie=N;if(this._lastPos.equals(ie)||!this._box&&ie.dist(this._startPos)be.fitScreenCoordinates(ie,fe,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",y)}keydown(y){this._active&&y.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",y))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),m.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(y,N){return this._map.fire(new e.n(y,{originalEvent:N}))}}function fi(pe,y){if(pe.length!==y.length)throw new Error(`The number of touches and points are not equal - touches ${pe.length}, points ${y.length}`);let N={};for(let ie=0;iethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=y.timeStamp),ie.length===this.numTouches&&(this.centroid=function(fe){let be=new e.P(0,0);for(let Re of fe)be._add(Re);return be.div(fe.length)}(N),this.touches=fi(ie,N)))}touchmove(y,N,ie){if(this.aborted||!this.centroid)return;let fe=fi(ie,N);for(let be in this.touches){let Re=fe[be];(!Re||Re.dist(this.touches[be])>30)&&(this.aborted=!0)}}touchend(y,N,ie){if((!this.centroid||y.timeStamp-this.startTime>500)&&(this.aborted=!0),ie.length===0){let fe=!this.aborted&&this.centroid;if(this.reset(),fe)return fe}}}class $e{constructor(y){this.singleTap=new eu(y),this.numTaps=y.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(y,N,ie){this.singleTap.touchstart(y,N,ie)}touchmove(y,N,ie){this.singleTap.touchmove(y,N,ie)}touchend(y,N,ie){let fe=this.singleTap.touchend(y,N,ie);if(fe){let be=y.timeStamp-this.lastTime<500,Re=!this.lastTap||this.lastTap.dist(fe)<30;if(be&&Re||this.reset(),this.count++,this.lastTime=y.timeStamp,this.lastTap=fe,this.count===this.numTaps)return this.reset(),fe}}}class nt{constructor(y){this._tr=new Ol(y),this._zoomIn=new $e({numTouches:1,numTaps:2}),this._zoomOut=new $e({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(y,N,ie){this._zoomIn.touchstart(y,N,ie),this._zoomOut.touchstart(y,N,ie)}touchmove(y,N,ie){this._zoomIn.touchmove(y,N,ie),this._zoomOut.touchmove(y,N,ie)}touchend(y,N,ie){let fe=this._zoomIn.touchend(y,N,ie),be=this._zoomOut.touchend(y,N,ie),Re=this._tr;return fe?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:e.cw(Re.zoom+1,je.getZoomSnap()),around:Re.unproject(fe)},{originalEvent:y})}):be?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:e.cw(Re.zoom-1,je.getZoomSnap()),around:Re.unproject(be)},{originalEvent:y})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class mt{constructor(y){this._enabled=!!y.enable,this._moveStateManager=y.moveStateManager,this._clickTolerance=y.clickTolerance||1,this._moveFunction=y.move,this._activateOnStart=!!y.activateOnStart,y.assignEvents(this),this.reset()}reset(y){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(y)}_move(...y){let N=this._moveFunction(...y);if(N.bearingDelta||N.pitchDelta||N.rollDelta||N.around||N.panDelta)return this._active=!0,N}dragStart(y,N){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(y)&&(this._moveStateManager.startMove(y),this._lastPoint=Array.isArray(N)?N[0]:N,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(y,N){if(!this.isEnabled())return;let ie=this._lastPoint;if(!ie)return;if(y.preventDefault(),!this._moveStateManager.isValidMoveEvent(y))return void this.reset(y);let fe=Array.isArray(N)?N[0]:N;return!this._moved&&fe.dist(ie)!0}),N=new Pr){this.mouseMoveStateManager=y,this.oneFingerTouchMoveStateManager=N}_executeRelevantHandler(y,N,ie){return y instanceof MouseEvent?N(y):typeof TouchEvent<"u"&&y instanceof TouchEvent?ie(y):void 0}startMove(y){this._executeRelevantHandler(y,N=>{this.mouseMoveStateManager.startMove(N)},N=>{this.oneFingerTouchMoveStateManager.startMove(N)})}endMove(y){this._executeRelevantHandler(y,N=>{this.mouseMoveStateManager.endMove(N)},N=>{this.oneFingerTouchMoveStateManager.endMove(N)})}isValidStartEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidStartEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidStartEvent(N))}isValidMoveEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidMoveEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(N))}isValidEndEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidEndEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidEndEvent(N))}}let kr=pe=>{pe.mousedown=pe.dragStart,pe.mousemoveWindow=pe.dragMove,pe.mouseup=pe.dragEnd,pe.contextmenu=y=>{y.preventDefault()}};class jr{constructor(y,N){this._clickTolerance=y.clickTolerance||1,this._map=N,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(y){return y<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(y,N,ie){return this._calculateTransform(y,N,ie)}touchmove(y,N,ie){if(this._active){if(!this._shouldBePrevented(ie.length))return y.preventDefault(),this._calculateTransform(y,N,ie);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",y)}}touchend(y,N,ie){this._calculateTransform(y,N,ie),this._active&&this._shouldBePrevented(ie.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(y,N,ie){ie.length>0&&(this._active=!0);let fe=fi(ie,N),be=new e.P(0,0),Re=new e.P(0,0),je=0;for(let ut in fe){let ft=fe[ut],Dt=this._touches[ut];Dt&&(be._add(ft),Re._add(ft.sub(Dt)),je++,fe[ut]=ft)}if(this._touches=fe,this._shouldBePrevented(je)||!Re.mag())return;let Ze=Re.div(je);return this._sum._add(Ze),this._sum.mag()Math.abs(pe.x)}class Si extends Jr{constructor(y){super(),this._currentTouchCount=0,this._map=y}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(y,N,ie){super.touchstart(y,N,ie),this._currentTouchCount=ie.length}_start(y){this._lastPoints=y,ii(y[0].sub(y[1]))&&(this._valid=!1)}_move(y,N,ie){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let fe=y[0].sub(this._lastPoints[0]),be=y[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(fe,be,ie.timeStamp),this._valid?(this._lastPoints=y,this._active=!0,{pitchDelta:(fe.y+be.y)/2*-.5}):void 0}gestureBeginsVertically(y,N,ie){if(this._valid!==void 0)return this._valid;let fe=y.mag()>=2,be=N.mag()>=2;if(!fe&&!be)return;if(!fe||!be)return this._firstMove===void 0&&(this._firstMove=ie),ie-this._firstMove<100&&void 0;let Re=y.y>0==N.y>0;return ii(y)&&ii(N)&&Re}}let oi={panStep:100,bearingStep:15,pitchStep:10};class Ji{constructor(y){this._tr=new Ol(y);let N=oi;this._panStep=N.panStep,this._bearingStep=N.bearingStep,this._pitchStep=N.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(y){if(y.altKey||y.ctrlKey||y.metaKey)return;let N=0,ie=0,fe=0,be=0,Re=0;switch(y.keyCode){case 61:case 107:case 171:case 187:N=1;break;case 189:case 109:case 173:N=-1;break;case 37:y.shiftKey?ie=-1:(y.preventDefault(),be=-1);break;case 39:y.shiftKey?ie=1:(y.preventDefault(),be=1);break;case 38:y.shiftKey?fe=1:(y.preventDefault(),Re=-1);break;case 40:y.shiftKey?fe=-1:(y.preventDefault(),Re=1);break;default:return}return this._rotationDisabled&&(ie=0,fe=0),{cameraAnimation:je=>{let Ze=this._tr;je.easeTo({duration:300,easeId:"keyboardHandler",easing:Qi,zoom:N?e.cw(Ze.zoom+N*(y.shiftKey?2:1),je.getZoomSnap()):Ze.zoom,bearing:Ze.bearing+ie*this._bearingStep,pitch:Ze.pitch+fe*this._pitchStep,offset:[-be*this._panStep,-Re*this._panStep],center:Ze.center},{originalEvent:y})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Qi(pe){return pe*(2-pe)}let Oo=4.000244140625,Qo=1/450;class vo{constructor(y,N){this._onTimeout=ie=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(ie)},this._map=y,this._tr=new Ol(y),this._triggerRenderFrame=N,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Qo}setZoomRate(y){this._defaultZoomRate=y}setWheelZoomRate(y){this._wheelZoomRate=y}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(y){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!y&&y.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(y){return!!this._map.cooperativeGestures.isEnabled()&&!(y.ctrlKey||this._map.cooperativeGestures.isBypassed(y))}wheel(y){if(!this.isEnabled())return;if(this._shouldBePrevented(y))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",y);let N=y.deltaMode===WheelEvent.DOM_DELTA_LINE?40*y.deltaY:y.deltaY,ie=g(),fe=ie-(this._lastWheelEventTime||0);this._lastWheelEventTime=ie,N!==0&&N%Oo==0?this._type="wheel":N!==0&&Math.abs(N)<4?this._type="trackpad":fe>400?(this._type=null,this._lastValue=N,this._timeout=setTimeout(this._onTimeout,40,y)):this._type||(this._type=Math.abs(fe*N)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,N+=this._lastValue)),y.shiftKey&&N&&(N/=4),this._type&&(this._lastWheelEvent=y,this._delta-=N,this._active||this._start(y)),y.preventDefault()}_start(y){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let N=m.mousePos(this._map.getCanvas(),y),ie=this._tr;this._aroundPoint=this._aroundCenter?ie.transform.locationToScreenPoint(e.W.convert(ie.center)):N,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let y=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let je=y.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=je),typeof this._targetZoom=="number"&&(this._targetZoom+=je)}if(this._delta!==0){let je=this._type==="wheel"&&Math.abs(this._delta)>Oo?this._wheelZoomRate:this._defaultZoomRate,Ze=2/(1+Math.exp(-Math.abs(this._delta*je)));this._delta<0&&Ze!==0&&(Ze=1/Ze);let ut=typeof this._targetZoom!="number"?y.scale:e.ao(this._targetZoom),ft=y.applyConstrain(y.getCameraLngLat(),e.ar(ut*Ze)).zoom,Dt=this._map.getZoomSnap();if(this._type==="wheel"&&Dt>0){let Gt=e.cw(y.zoom,Dt);this._targetZoom=e.cw(ft,Dt,ft-Gt)}else this._targetZoom=ft;this._type==="wheel"&&(this._startZoom=y.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let N=typeof this._targetZoom!="number"?y.zoom:this._targetZoom,ie=this._startZoom,fe=this._easing,be,Re=!1;if(this._type==="wheel"&&ie&&fe){let je=g()-this._lastWheelEventTime,Ze=Math.min((je+5)/200,1),ut=fe(Ze);be=e.H.number(ie,N,ut),Ze<1?this._needsRerender=!0:Re=!0}else be=N,Re=!0;return this._active=!0,Re&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=be,{noInertia:!0,needsRenderFrame:!Re,zoomDelta:be-y.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(y){let N=e.cy;if(this._prevEase){let ie=this._prevEase,fe=(g()-ie.start)/ie.duration,be=ie.easing(fe+.01)-ie.easing(fe),Re=.27/Math.sqrt(be*be+1e-4)*.01,je=Math.sqrt(.0729-Re*Re);N=e.cv(Re,je,.25,1)}return this._prevEase={start:g(),duration:y,easing:N},N}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ys{constructor(y,N){this._clickZoom=y,this._tapZoom=N}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class ol{constructor(y){this._tr=new Ol(y),this.reset()}reset(){this._active=!1}dblclick(y,N){return y.preventDefault(),{cameraAnimation:ie=>{ie.easeTo({duration:300,zoom:e.cw(this._tr.zoom+(y.shiftKey?-1:1),ie.getZoomSnap()),around:this._tr.unproject(N)},{originalEvent:y})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class jl{constructor(){this._tap=new $e({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(y){this._zoomRate=y??1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(y,N,ie){if(!this._swipePoint)if(this._tapTime){let fe=N[0],be=y.timeStamp-this._tapTime<500,Re=this._tapPoint.dist(fe)<30;be&&Re?ie.length>0&&(this._swipePoint=fe,this._swipeTouch=ie[0].identifier):this.reset()}else this._tap.touchstart(y,N,ie)}touchmove(y,N,ie){if(this._tapTime){if(this._swipePoint){if(ie[0].identifier!==this._swipeTouch)return;let fe=N[0],be=fe.y-this._swipePoint.y;return this._swipePoint=fe,y.preventDefault(),this._active=!0,{zoomDelta:be/128*this._zoomRate}}}else this._tap.touchmove(y,N,ie)}touchend(y,N,ie){if(this._tapTime)this._swipePoint&&ie.length===0&&this.reset();else{let fe=this._tap.touchend(y,N,ie);fe&&(this._tapTime=y.timeStamp,this._tapPoint=fe)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hs{constructor(y,N,ie){this._el=y,this._mousePan=N,this._touchPan=ie}enable(y){this._inertiaOptions=y||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Cu{constructor(y,N,ie,fe){this._pitchWithRotate=y.pitchWithRotate,this._rollEnabled=y.rollEnabled,this._mouseRotate=N,this._mousePitch=ie,this._mouseRoll=fe}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class hi{constructor(y,N,ie,fe){this._el=y,this._touchZoom=N,this._touchRotate=ie,this._tapDragZoom=fe,this._rotationDisabled=!1,this._enabled=!0}enable(y){this._touchZoom.enable(y),this._rotationDisabled||this._touchRotate.enable(y),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}setZoomRate(y){this._touchZoom.setZoomRate(y),this._tapDragZoom.setZoomRate(y)}setZoomThreshold(y){this._touchZoom.setZoomThreshold(y)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class wi{constructor(y,N){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=y,this._options=N,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let y=this._map.getCanvasContainer();y.classList.add("maplibregl-cooperative-gestures"),this._container=m.create("div","maplibregl-cooperative-gesture-screen",y);let N=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(N=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let ie=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),fe=document.createElement("div");fe.className="maplibregl-desktop-message",fe.textContent=N,this._container.appendChild(fe);let be=document.createElement("div");be.className="maplibregl-mobile-message",be.textContent=ie,this._container.appendChild(be),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(y){return y[this._bypassKey]}notifyGestureBlocked(y,N){this._enabled&&(this._map.fire(new e.n("cooperativegestureprevented",{gestureType:y,originalEvent:N})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let sl=pe=>pe.zoom||pe.drag||pe.roll||pe.pitch||pe.rotate;class sc extends e.n{}function tu(pe){var y;return((y=pe.panDelta)===null||y===void 0?void 0:y.mag())||pe.zoomDelta||pe.bearingDelta||pe.pitchDelta||pe.rollDelta}class Ps{get _ownerDocument(){var y;return((y=this._el)===null||y===void 0?void 0:y.ownerDocument)||document}get _ownerWindow(){var y,N;return((N=(y=this._el)===null||y===void 0?void 0:y.ownerDocument)===null||N===void 0?void 0:N.defaultView)||window}constructor(y,N){this.handleWindowEvent=fe=>{this.handleEvent(fe,`${fe.type}Window`)},this.handleEvent=(fe,be)=>{if(fe.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let Re=fe.type==="renderFrame"?void 0:fe,je={needsRenderFrame:!1},Ze={},ut={};for(let{handlerName:Gt,handler:Kt,allowed:st}of this._handlers){if(!Kt.isEnabled())continue;let It;if(this._blockedByActive(ut,st,Gt))Kt.reset();else if(Kt[be||fe.type]){if(e.cz(fe,be||fe.type)){let Ut=m.mousePos(this._map.getCanvas(),fe);It=Kt[be||fe.type](fe,Ut)}else if(e.cA(fe,be||fe.type)){let Ut=this._getMapTouches(fe.touches),ir=m.touchPos(this._map.getCanvas(),Ut);It=Kt[be||fe.type](fe,ir,Ut)}else e.cB(be||fe.type)||(It=Kt[be||fe.type](fe));this.mergeHandlerResult(je,Ze,It,Gt,Re),It?.needsRenderFrame&&this._triggerRenderFrame()}(It||Kt.isActive())&&(ut[Gt]=Kt)}let ft={};for(let Gt in this._previousActiveHandlers)ut[Gt]||(ft[Gt]=Re);this._previousActiveHandlers=ut,(Object.keys(ft).length||tu(je))&&(this._changes.push([je,Ze,ft]),this._triggerRenderFrame()),(Object.keys(ut).length||tu(je))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Dt}=je;Dt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Dt(this._map))},this._map=y,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new lh(y),this._bearingSnap=N.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(N);let ie=this._el;this._listeners=[[ie,"touchstart",{passive:!0}],[ie,"touchmove",{passive:!1}],[ie,"touchend",void 0],[ie,"touchcancel",void 0],[ie,"mousedown",void 0],[ie,"mousemove",void 0],[ie,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[ie,"mouseover",void 0],[ie,"mouseout",void 0],[ie,"dblclick",void 0],[ie,"click",void 0],[ie,"keydown",{capture:!1}],[ie,"keyup",void 0],[ie,"wheel",{passive:!1}],[ie,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[fe,be,Re]of this._listeners)fe.addEventListener(be,fe===this._ownerDocument?this.handleWindowEvent:this.handleEvent,Re)}destroy(){for(let[y,N,ie]of this._listeners)y.removeEventListener(N,y===this._ownerDocument?this.handleWindowEvent:this.handleEvent,ie)}_addDefaultHandlers(y){let N=this._map,ie=N.getCanvasContainer();this._add("mapEvent",new Qc(N,y));let fe=N.boxZoom=new Nl(N,y);this._add("boxZoom",fe),y.interactive&&y.boxZoom&&fe.enable();let be=N.cooperativeGestures=new wi(N,y.cooperativeGestures);this._add("cooperativeGestures",be),y.cooperativeGestures&&be.enable();let Re=new nt(N),je=new ol(N);N.doubleClickZoom=new ys(je,Re),this._add("tapZoom",Re),this._add("clickZoom",je),y.interactive&&y.doubleClickZoom&&N.doubleClickZoom.enable();let Ze=new jl;this._add("tapDragZoom",Ze);let ut=N.touchPitch=new Si(N);this._add("touchPitch",ut),y.interactive&&y.touchPitch&&N.touchPitch.enable(y.touchPitch);let ft=()=>N.project(N.getCenter()),Dt=function({enable:hr,clickTolerance:vr,aroundCenter:Or=!0,minPixelCenterThreshold:Cr=100,rotateDegreesPerPixelMoved:ta=.8},ka){let Ta=new Wt({checkCorrectEvent:Ra=>Ra.button===0&&Ra.ctrlKey||Ra.button===2&&!Ra.ctrlKey});return new mt({clickTolerance:vr,move:(Ra,ua)=>{let ia=ka();if(Or&&Math.abs(ia.y-Ra.y)>Cr)return{bearingDelta:e.cx(new e.P(Ra.x,ua.y),ua,ia)};let ma=(ua.x-Ra.x)*ta;return Or&&ua.yta.button===0&&ta.ctrlKey||ta.button===2});return new mt({clickTolerance:vr,move:(ta,ka)=>({pitchDelta:(ka.y-ta.y)*Or}),moveStateManager:Cr,enable:hr,assignEvents:kr})}(y),Kt=function({enable:hr,clickTolerance:vr,rollDegreesPerPixelMoved:Or=.3},Cr){let ta=new Wt({checkCorrectEvent:ka=>ka.button===2&&ka.ctrlKey});return new mt({clickTolerance:vr,move:(ka,Ta)=>{let Ra=Cr(),ua=(Ta.x-ka.x)*Or;return Ta.yCr.button===0&&!Cr.ctrlKey});return new mt({clickTolerance:vr,move:(Cr,ta)=>({around:ta,panDelta:ta.sub(Cr)}),activateOnStart:!0,moveStateManager:Or,enable:hr,assignEvents:kr})}(y),It=new jr(y,N);N.dragPan=new Hs(ie,st,It),this._add("mousePan",st),this._add("touchPan",It,["touchZoom","touchRotate"]),y.interactive&&y.dragPan&&N.dragPan.enable(y.dragPan);let Ut=new wn,ir=new Ba;N.touchZoomRotate=new hi(ie,ir,Ut,Ze),this._add("touchRotate",Ut,["touchPan","touchZoom"]),this._add("touchZoom",ir,["touchPan","touchRotate"]),y.interactive&&y.touchZoomRotate&&N.touchZoomRotate.enable(y.touchZoomRotate),this._add("blockableMapEvent",new ku(N));let dr=N.scrollZoom=new vo(N,()=>this._triggerRenderFrame());this._add("scrollZoom",dr,["mousePan"]),y.interactive&&y.scrollZoom&&N.scrollZoom.enable(y.scrollZoom);let Ar=N.keyboard=new Ji(N);this._add("keyboard",Ar),y.interactive&&y.keyboard&&N.keyboard.enable()}_add(y,N,ie){this._handlers.push({handlerName:y,handler:N,allowed:ie}),this._handlersById[y]=N}stop(y){if(!this._updatingCamera){for(let{handler:N}of this._handlers)N.reset();this._inertia.clear(),this._fireEvents({},{},y),this._changes=[]}}isActive(){for(let{handler:y}of this._handlers)if(y.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!sl(this._eventsInProgress)||this.isZooming()}_blockedByActive(y,N,ie){for(let fe in y)if(fe!==ie&&!N?.includes(fe))return!0;return!1}_getMapTouches(y){let N=[];for(let ie of y)this._el.contains(ie.target)&&N.push(ie);return N}mergeHandlerResult(y,N,ie,fe,be){if(!ie)return;e.e(y,ie);let Re={handlerName:fe,originalEvent:ie.originalEvent||be};ie.zoomDelta!==void 0&&(N.zoom=Re),ie.panDelta!==void 0&&(N.drag=Re),ie.rollDelta!==void 0&&(N.roll=Re),ie.pitchDelta!==void 0&&(N.pitch=Re),ie.bearingDelta!==void 0&&(N.rotate=Re)}_applyChanges(){let y={},N={},ie={};for(let[fe,be,Re]of this._changes)fe.panDelta&&(y.panDelta=(y.panDelta||new e.P(0,0))._add(fe.panDelta)),fe.zoomDelta&&(y.zoomDelta=(y.zoomDelta||0)+fe.zoomDelta),fe.bearingDelta&&(y.bearingDelta=(y.bearingDelta||0)+fe.bearingDelta),fe.pitchDelta&&(y.pitchDelta=(y.pitchDelta||0)+fe.pitchDelta),fe.rollDelta&&(y.rollDelta=(y.rollDelta||0)+fe.rollDelta),fe.around!==void 0&&(y.around=fe.around),fe.pinchAround!==void 0&&(y.pinchAround=fe.pinchAround),fe.noInertia&&(y.noInertia=fe.noInertia),e.e(N,be),e.e(ie,Re);this._updateMapTransform(y,N,ie),this._changes=[]}_updateMapTransform(y,N,ie){let fe=this._map,be=fe._getTransformForUpdate(),Re=fe.terrain;if(!(tu(y)||Re&&this._terrainMovement))return void this._fireEvents(N,ie,!0);fe._stop(!0);let{panDelta:je,zoomDelta:Ze,bearingDelta:ut,pitchDelta:ft,rollDelta:Dt,around:Gt,pinchAround:Kt}=y;Kt!==void 0&&(Gt=Kt),Gt||(Gt=fe.transform.centerPoint),Re&&!be.isPointOnMapSurface(Gt)&&(Gt=be.centerPoint);let st={panDelta:je,zoomDelta:Ze,rollDelta:Dt,pitchDelta:ft,bearingDelta:ut,around:Gt};this._map.cameraHelper.useGlobeControls&&!be.isPointOnMapSurface(Gt)&&(Gt=be.centerPoint);let It=Gt.distSqr(be.centerPoint)<.01?be.center:be.screenPointToLocation(je?Gt.sub(je):Gt);this._handleMapControls({terrain:Re,tr:be,deltasForHelper:st,preZoomAroundLoc:It,combinedEventsInProgress:N,panDelta:je}),fe._applyUpdatedTransform(be),this._map._update(),y.noInertia||this._inertia.record(y),this._fireEvents(N,ie,!0)}_handleMapControls({terrain:y,tr:N,deltasForHelper:ie,preZoomAroundLoc:fe,combinedEventsInProgress:be,panDelta:Re}){let je=this._map.cameraHelper;if(je.handleMapControlsRollPitchBearingZoom(ie,N),y)return je.useGlobeControls?(this._terrainMovement||!be.drag&&!be.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void je.handleMapControlsPan(ie,N,fe)):this._terrainMovement||!be.drag&&!be.zoom?void(be.drag&&this._terrainMovement&&Re?N.setCenter(N.screenPointToLocation(N.centerPoint.sub(Re))):je.handleMapControlsPan(ie,N,fe)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void je.handleMapControlsPan(ie,N,fe));je.handleMapControlsPan(ie,N,fe)}_fireEvents(y,N,ie){let fe=sl(this._eventsInProgress),be=sl(y),Re={};for(let Dt in y){let{originalEvent:Gt}=y[Dt];this._eventsInProgress[Dt]||(Re[`${Dt}start`]=Gt),this._eventsInProgress[Dt]=y[Dt]}!fe&&be&&this._fireEvent("movestart",be.originalEvent);for(let Dt in Re)this._fireEvent(Dt,Re[Dt]);be&&this._fireEvent("move",be.originalEvent);for(let Dt in y){let{originalEvent:Gt}=y[Dt];this._fireEvent(Dt,Gt)}let je={},Ze;for(let Dt in this._eventsInProgress){let{handlerName:Gt,originalEvent:Kt}=this._eventsInProgress[Dt];this._handlersById[Gt].isActive()||(delete this._eventsInProgress[Dt],Ze=N[Gt]||Kt,je[`${Dt}end`]=Ze)}for(let Dt in je)this._fireEvent(Dt,je[Dt]);let ut=sl(this._eventsInProgress),ft=(fe||be)&&!ut;if(ft&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Dt=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&Dt.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(Dt)}if(ie&&ft){this._updatingCamera=!0;let Dt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Gt=Kt=>Kt!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new sc("renderFrame",{timeStamp:y})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class gc extends e.E{constructor(y,N,ie){super(),this._renderFrameCallback=()=>{let fe=Math.min((g()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(fe)),fe<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=y,this._bearingSnap=ie.bearingSnap,this._zoomSnap=ie.zoomSnap,this.cameraHelper=N,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(y,N){y.apply(this.transform,!0),this.transform=y,this.cameraHelper=N}getCenter(){return new e.W(this.transform.center.lng,this.transform.center.lat)}setCenter(y,N){return this.jumpTo({center:y},N)}getCenterElevation(){return this.transform.elevation}setCenterElevation(y,N){return this.jumpTo({elevation:y},N),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(y){this._centerClampedToGround=y}panBy(y,N,ie){return y=e.P.convert(y).mult(-1),this.panTo(this.transform.center,e.e({offset:y},N),ie)}panTo(y,N,ie){return this.easeTo(e.e({center:y},N),ie)}getZoom(){return this.transform.zoom}setZoom(y,N){return this.jumpTo({zoom:y},N),this}zoomTo(y,N,ie){return this.easeTo(e.e({zoom:y},N),ie)}zoomIn(y,N){return this.zoomTo(e.cw(this.getZoom()+1,this._zoomSnap),y,N),this}zoomOut(y,N){return this.zoomTo(e.cw(this.getZoom()-1,this._zoomSnap),y,N),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(y,N){return y!=this.transform.fov&&(this.transform.setFov(y),this.fire(new e.n("movestart",N)).fire(new e.n("move",N)).fire(new e.n("moveend",N))),this}getBearing(){return this.transform.bearing}setZoomSnap(y){return this._zoomSnap=y,this}getZoomSnap(){return this._zoomSnap}setBearing(y,N){return this.jumpTo({bearing:y},N),this}getPadding(){return this.transform.padding}setPadding(y,N){return this.jumpTo({padding:y},N),this}rotateTo(y,N,ie){return this.easeTo(e.e({bearing:y},N),ie)}resetNorth(y,N){return this.rotateTo(0,e.e({duration:1e3},y),N),this}resetNorthPitch(y,N){return this.easeTo(e.e({bearing:0,pitch:0,roll:0,duration:1e3},y),N),this}snapToNorth(y,N){return Math.abs(this.getBearing()){It.easeFunc(Ut),this.terrain&&!y.freezeElevation&&this._updateElevation(Ut),this._applyUpdatedTransform(ie),this._fireMoveEvents(N)},Ut=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(N,Ut)},y),this}_prepareEase(y,N,ie={}){this._moving=!0,N||ie.moving||this.fire(new e.n("movestart",y)),this._zooming&&!ie.zooming&&this.fire(new e.n("zoomstart",y)),this._rotating&&!ie.rotating&&this.fire(new e.n("rotatestart",y)),this._pitching&&!ie.pitching&&this.fire(new e.n("pitchstart",y)),this._rolling&&!ie.rolling&&this.fire(new e.n("rollstart",y))}_prepareElevation(y){this._elevationCenter=y,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(y,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(y){this._elevationStart!==void 0&&this._elevationCenter!==void 0||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let N=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(y<1&&N!==this._elevationTarget){let ie=this._elevationTarget-this._elevationStart;this._elevationStart+=y*(ie-(N-(ie*y+this._elevationStart))/(1-y)),this._elevationTarget=N}this.transform.setElevation(e.H.number(this._elevationStart,this._elevationTarget,y))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(y){if(!this.terrain&&y.elevation>=0&&y.pitch<=90)return{};let N=y.getCameraLngLat(),ie=y.getCameraAltitude(),fe=this.terrain?this.terrain.getElevationForLngLatZoom(N,y.zoom):0;if(iethis._elevateCameraIfInsideTerrain(fe)),this.transformCameraUpdate&&N.push(fe=>this.transformCameraUpdate(fe)),!N.length)return;let ie=y.clone();for(let fe of N){let be=ie.clone(),{center:Re,zoom:je,roll:Ze,pitch:ut,bearing:ft,elevation:Dt}=fe(be);Re&&be.setCenter(Re),Dt!==void 0&&be.setElevation(Dt),je!==void 0&&be.setZoom(je),Ze!==void 0&&be.setRoll(Ze),ut!==void 0&&be.setPitch(ut),ft!==void 0&&be.setBearing(ft),ie.apply(be,!1)}this.transform.apply(ie,!1)}_fireMoveEvents(y){this.fire(new e.n("move",y)),this._zooming&&this.fire(new e.n("zoom",y)),this._rotating&&this.fire(new e.n("rotate",y)),this._pitching&&this.fire(new e.n("pitch",y)),this._rolling&&this.fire(new e.n("roll",y))}_afterEase(y,N){if(this._easeId&&N&&this._easeId===N)return;delete this._easeId;let ie=this._zooming,fe=this._rotating,be=this._pitching,Re=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,ie&&this.fire(new e.n("zoomend",y)),fe&&this.fire(new e.n("rotateend",y)),be&&this.fire(new e.n("pitchend",y)),Re&&this.fire(new e.n("rollend",y)),this.fire(new e.n("moveend",y))}flyTo(y,N){if(!y.essential&&s.prefersReducedMotion){let ua=e.V(y,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(ua,N)}this.stop(),"zoom"in(y=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.cy},y))&&this._zoomSnap&&(y.zoom=e.cw(y.zoom,this._zoomSnap));let ie=this._getTransformForUpdate(),fe=ie.bearing,be=ie.pitch,Re=ie.roll,je=ie.padding,Ze="bearing"in y?this._normalizeBearing(y.bearing,fe):fe,ut="pitch"in y?+y.pitch:be,ft="roll"in y?this._normalizeBearing(y.roll,Re):Re,Dt="padding"in y?y.padding:ie.padding,Gt=e.P.convert(y.offset),Kt=ie.centerPoint.add(Gt),st=ie.screenPointToLocation(Kt),It=this.cameraHelper.handleFlyTo(ie,{bearing:Ze,pitch:ut,roll:ft,padding:Dt,locationAtOffset:st,offsetAsPoint:Gt,center:y.center,minZoom:y.minZoom,zoom:y.zoom}),Ut=y.curve,ir=Math.max(ie.width,ie.height),dr=ir/It.scaleOfZoom,Ar=It.pixelPathLength;typeof It.scaleOfMinZoom=="number"&&(Ut=Math.sqrt(ir/It.scaleOfMinZoom/Ar*2));let hr=Ut*Ut;function vr(ua){let ia=(dr*dr-ir*ir+(ua?-1:1)*hr*hr*Ar*Ar)/(2*(ua?dr:ir)*hr*Ar);return Math.log(Math.sqrt(ia*ia+1)-ia)}function Or(ua){return(Math.exp(ua)-Math.exp(-ua))/2}function Cr(ua){return(Math.exp(ua)+Math.exp(-ua))/2}let ta=vr(!1),ka=function(ua){return Cr(ta)/Cr(ta+Ut*ua)},Ta=function(ua){return ir*((Cr(ta)*(Or(ia=ta+Ut*ua)/Cr(ia))-Or(ta))/hr)/Ar;var ia},Ra=(vr(!0)-ta)/Ut;if(Math.abs(Ar)<2e-6||!isFinite(Ra)){if(Math.abs(ir-dr)<1e-6)return this.easeTo(y,N);let ua=dr0,ka=ia=>Math.exp(ua*Ut*ia)}return y.duration="duration"in y?+y.duration:1e3*Ra/("screenSpeed"in y?+y.screenSpeed/Ut:+y.speed),y.maxDuration&&y.duration>y.maxDuration&&(y.duration=0),this._zooming=!0,this._rotating=fe!==Ze,this._pitching=ut!==be,this._rolling=ft!==Re,this._padding=!ie.isPaddingEqual(Dt),this._prepareEase(N,!1),this.terrain&&this._prepareElevation(It.targetCenter),this._ease(ua=>{let ia=ua*Ra,ma=1/ka(ia),da=Ta(ia);this._rotating&&ie.setBearing(e.H.number(fe,Ze,ua)),this._pitching&&ie.setPitch(e.H.number(be,ut,ua)),this._rolling&&ie.setRoll(e.H.number(Re,ft,ua)),this._padding&&(ie.interpolatePadding(je,Dt,ua),Kt=ie.centerPoint.add(Gt)),It.easeFunc(ua,ma,da,Kt),this.terrain&&!y.freezeElevation&&this._updateElevation(ua),this._applyUpdatedTransform(ie),this._fireMoveEvents(N)},()=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(N)},y),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(y,N){var ie;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let fe=this._onEaseEnd;delete this._onEaseEnd,fe.call(this,N)}return y||(ie=this.handlers)===null||ie===void 0||ie.stop(!1),this}_ease(y,N,ie){ie.animate===!1||ie.duration===0?(y(1),N()):(this._easeStart=g(),this._easeOptions=ie,this._onEaseFrame=y,this._onEaseEnd=N,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(y,N){y=e.X(y,-180,180);let ie=Math.abs(y-N);return Math.abs(y-360-N)MapLibre
'};class ll{constructor(y=pu){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=N=>{!N||N.sourceDataType!=="metadata"&&N.sourceDataType!=="visibility"&&N.dataType!=="style"&&N.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=y}getDefaultPosition(){return"bottom-right"}onAdd(y){return this._map=y,this._compact=this.options.compact,this._container=m.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=m.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=m.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(y,N){let ie=this._map._getUIString(`AttributionControl.${N}`);y.title=ie,y.setAttribute("aria-label",ie)}_updateAttributions(){if(!this._map.style)return;let y=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?y=y.concat(this.options.customAttribution.map(fe=>typeof fe!="string"?"":fe)):typeof this.options.customAttribution=="string"&&y.push(this.options.customAttribution)),this._map.style.stylesheet){let fe=this._map.style.stylesheet;this.styleOwner=fe.owner,this.styleId=fe.id}let N=this._map.style.tileManagers;for(let fe in N){let be=N[fe];if(be.used||be.usedForTerrain){let Re=be.getSource();Re.attribution&&!y.includes(Re.attribution)&&y.push(Re.attribution)}}y=y.filter(fe=>String(fe).trim()),y.sort((fe,be)=>fe.length-be.length),y=y.filter((fe,be)=>{for(let Re=be+1;Re{let N=this._container.children;if(N.length){let ie=N[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&ie.classList.add("maplibregl-compact"):ie.classList.remove("maplibregl-compact")}},this.options=y}getDefaultPosition(){return"bottom-left"}onAdd(y){var N;this._map=y,this._compact=(N=this.options)===null||N===void 0?void 0:N.compact,this._container=m.create("div","maplibregl-ctrl");let ie=m.create("a","maplibregl-ctrl-logo");return ie.target="_blank",ie.rel="noopener nofollow",ie.href="https://maplibre.org/",ie.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ie.setAttribute("rel","noopener nofollow"),this._container.appendChild(ie),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class de{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(y){let N=++this._id;return this._queue.push({callback:y,id:N,cancelled:!1}),N}remove(y){let N=this._currentlyRunning,ie=N?this._queue.concat(N):this._queue;for(let fe of ie)if(fe.id===y)return void(fe.cancelled=!0)}run(y=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let N=this._currentlyRunning=this._queue;this._queue=[];for(let ie of N)if(!ie.cancelled&&(ie.callback(y),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ee=e.aS([{name:"a_pos3d",type:"Int16",components:3}]);class Ve extends e.E{constructor(y){super(),this._lastTilesetChange=g(),this.tileManager=y,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=y._source.tileSize*2**this.deltaZoom,y.usedForTerrain=!0,y.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(y,N){this.tileManager.update(y,N),this._renderableTilesKeys=[];let ie={};for(let fe of Je(y,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:N,calculateTileZoom:this.tileManager._source.calculateTileZoom}))ie[fe.key]=!0,this._renderableTilesKeys.push(fe.key),this._tiles[fe.key]||(fe.terrainRttPosMatrix32f=new Float64Array(16),e.c7(fe.terrainRttPosMatrix32f,0,e.a6,e.a6,0,0,1),this._tiles[fe.key]=new Tt(fe,this.tileSize),this._lastTilesetChange=g());for(let fe in this._tiles)ie[fe]||delete this._tiles[fe]}freeRtt(y){for(let N in this._tiles){let ie=this._tiles[N];(!y||ie.tileID.equals(y)||ie.tileID.isChildOf(y)||y.isChildOf(ie.tileID))&&(ie.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(y=>this.getTileByID(y))}getTileByID(y){return this._tiles[y]}getTerrainCoords(y,N){return N?this._getTerrainCoordsForTileRanges(y,N):this._getTerrainCoordsForRegularTile(y)}_getTerrainCoordsForRegularTile(y){let N={};for(let ie of this._renderableTilesKeys){let fe=this._tiles[ie].tileID,be=y.clone(),Re=e.bj();if(fe.canonical.equals(y.canonical))e.c7(Re,0,e.a6,e.a6,0,0,1);else if(fe.canonical.isChildOf(y.canonical)){let je=fe.canonical.z-y.canonical.z,Ze=fe.canonical.x-(fe.canonical.x>>je<>je<>je;e.c7(Re,0,ft,ft,0,0,1),e.Q(Re,Re,[-Ze*ft,-ut*ft,0])}else{if(!y.canonical.isChildOf(fe.canonical))continue;{let je=y.canonical.z-fe.canonical.z,Ze=y.canonical.x-(y.canonical.x>>je<>je<>je;e.c7(Re,0,e.a6,e.a6,0,0,1),e.Q(Re,Re,[Ze*ft,ut*ft,0]),e.S(Re,Re,[1/2**je,1/2**je,0])}}be.terrainRttPosMatrix32f=new Float32Array(Re),N[ie]=be}return N}_getTerrainCoordsForTileRanges(y,N){let ie={};for(let fe of this._renderableTilesKeys){let be=this._tiles[fe].tileID;if(!this._isWithinTileRanges(be,N))continue;let Re=y.clone(),je=e.bj();if(be.canonical.z===y.canonical.z){let Ze=y.canonical.x-be.canonical.x+y.wrap*(1<y.canonical.z){let Ze=be.canonical.z-y.canonical.z,ut=be.canonical.x-(be.canonical.x>>Ze<>Ze<>Ze),Gt=y.canonical.y-(be.canonical.y>>Ze),Kt=e.a6>>Ze;e.c7(je,0,Kt,Kt,0,0,1),e.Q(je,je,[-ut*Kt+Dt*e.a6,-ft*Kt+Gt*e.a6,0])}else{let Ze=y.canonical.z-be.canonical.z,ut=y.canonical.x-(y.canonical.x>>Ze<>Ze<>Ze)-be.canonical.x,Gt=(y.canonical.y>>Ze)-be.canonical.y,Kt=e.a6<be.maxzoom&&(Re=be.maxzoom),Re=be.minzoom&&!je?.dem;)je=this.findTileInCaches(y.scaledTo(Re--).key);return je}findTileInCaches(y){let N=this.tileManager.getTileByID(y);return N||(N=this.tileManager._outOfViewCache.getByKey(y),N)}anyTilesAfterTime(y=Date.now()){return this._lastTilesetChange>=y}_isWithinTileRanges(y,N){let ie=N[y.canonical.z];return!!ie&&(y.wrap>ie.minWrap||y.wrap=ie.minTileXWrapped&&y.canonical.x<=ie.maxTileXWrapped&&y.canonical.y>=ie.minTileY&&y.canonical.y<=ie.maxTileY)}}class tt{constructor(y,N,ie){this._meshCache={},this.painter=y,this.tileManager=new Ve(N),this.options=ie,this.exaggeration=typeof ie.exaggeration=="number"?ie.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null);for(let y in this._meshCache)this._meshCache[y].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(y,N,ie,fe=e.a6){var be;let Re=y.normalizeCoordinates(N,ie,fe);if(!Re)return 0;let je=this.getTerrainData(Re.tileID),Ze=(be=je.tile)===null||be===void 0?void 0:be.dem;if(!Ze)return 0;let ut=e.cC([],[Re.x/fe*e.a6,Re.y/fe*e.a6],je.u_terrain_matrix),ft=[ut[0]*Ze.dim,ut[1]*Ze.dim],Dt=Math.floor(ft[0]),Gt=Math.floor(ft[1]),Kt=ft[0]-Dt,st=ft[1]-Gt;return Ze.get(Dt,Gt)*(1-Kt)*(1-st)+Ze.get(Dt+1,Gt)*Kt*(1-st)+Ze.get(Dt,Gt+1)*(1-Kt)*st+Ze.get(Dt+1,Gt+1)*Kt*st}getElevationForLngLatZoom(y,N){if(!e.cD(N,y.wrap()))return 0;let{tileID:ie,mercatorX:fe,mercatorY:be}=this._getOverscaledTileIDFromLngLatZoom(y,N);return this.getElevation(ie,fe%e.a6,be%e.a6,e.a6)}getElevationForLngLat(y,N){let ie=Je(N,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),fe=0;for(let be of ie)be.canonical.z>fe&&(fe=Math.min(be.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(y,fe)}getElevation(y,N,ie,fe=e.a6){return this.getDEMElevation(y,N,ie,fe)*this.exaggeration}getTerrainData(y){var N,ie;if(!this._emptyDemTexture){let Re=this.painter.context,je=new e.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new e.T(Re,je,Re.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new e.T(Re,new e.R({width:1,height:1}),Re.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Re.gl.NEAREST,Re.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=e.ap([])}let fe=this.tileManager.getSourceTile(y,!0);if(fe?.dem&&(!fe.demTexture||fe.needsTerrainPrepare)){let Re=this.painter.context;fe.demTexture=this.painter.getTileTexture(fe.dem.stride),fe.demTexture?fe.demTexture.update(fe.dem.getPixels(),{premultiply:!1}):fe.demTexture=new e.T(Re,fe.dem.getPixels(),Re.gl.RGBA,{premultiply:!1}),fe.demTexture.bind(Re.gl.NEAREST,Re.gl.CLAMP_TO_EDGE),fe.needsTerrainPrepare=!1}let be=fe&&fe.toString()+fe.tileID.key+y.key;if(be&&!this._demMatrixCache[be]){let Re=this.tileManager.getSource().maxzoom,je=y.canonical.z-fe.tileID.canonical.z;y.overscaledZ>y.canonical.z&&(y.canonical.z>=Re?je=y.canonical.z-Re:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Ze=y.canonical.x-(y.canonical.x>>je<>je<>8<<4|be>>8,N[Re+3]=0;let ie=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(N.buffer)),fe=new e.T(y,ie,y.gl.RGBA,{premultiply:!1});return fe.bind(y.gl.NEAREST,y.gl.CLAMP_TO_EDGE),this._coordsTexture=fe,fe}pointCoordinate(y){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let N=new Uint8Array(4),ie=this.painter.context,fe=ie.gl,be=Math.round(y.x*this.painter.pixelRatio/devicePixelRatio),Re=Math.round(y.y*this.painter.pixelRatio/devicePixelRatio),je=Math.round(this.painter.height/devicePixelRatio);ie.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),fe.readPixels(be,je-Re-1,1,1,fe.RGBA,fe.UNSIGNED_BYTE,N),ie.bindFramebuffer.set(null);let Ze=N[0]+(N[2]>>4<<8),ut=N[1]+((15&N[2])<<8),ft=this.coordsIndex[255-N[3]],Dt=ft&&this.tileManager.getTileByID(ft);if(!Dt)return null;let Gt=this._coordsTextureSize,Kt=(1<0,fe=ie&&y.canonical.y===0,be=ie&&y.canonical.y===(1<y.id!==N),this._recentlyUsed.push(y.id)}stampObject(y){y.stamp=++this._stamp}getOrCreateFreeObject(){for(let N of this._recentlyUsed)if(!this._objects[N].inUse)return this._objects[N];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let y=this._createObject(this._objects.length);return this._objects.push(y),y}freeObject(y){y.inUse=!1}freeAllObjects(){for(let y of this._objects)this.freeObject(y)}isFull(){return!(this._objects.length!y.inUse)===!1}}let ct={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class Nt{constructor(y,N){this.painter=y,this.terrain=N,this.pool=new at(y.context,30,N.tileManager.tileSize*N.qualityFactor)}destruct(){this.pool.destruct()}getTexture(y){return this.pool.getObjectForId(y.rtt[this._stacks.length-1].id).texture}prepareForRender(y,N){var ie,fe,be;this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=y._order.filter(Re=>!y._layers[Re].isHidden(N)),this._coordsAscending={};for(let Re in y.tileManagers){this._coordsAscending[Re]={};let je=y.tileManagers[Re].getVisibleCoordinates(),Ze=y.tileManagers[Re].getSource(),ut=Ze instanceof ke?Ze.terrainTileRanges:null;for(let ft of je){let Dt=this.terrain.tileManager.getTerrainCoords(ft,ut);for(let Gt in Dt)(be=this._coordsAscending[Re])[Gt]||(be[Gt]=[]),this._coordsAscending[Re][Gt].push(Dt[Gt])}}this._rttFingerprints={};for(let Re of y._order){let je=y._layers[Re],Ze=je.source;if(ct[je.type]&&!this._rttFingerprints[Ze]){this._rttFingerprints[Ze]={};let ut=(fe=(ie=y.tileManagers[Ze])===null||ie===void 0?void 0:ie.getState().revision)!==null&&fe!==void 0?fe:0;for(let ft in this._coordsAscending[Ze])this._rttFingerprints[Ze][ft]=`${this._coordsAscending[Ze][ft].map(Dt=>Dt.key).sort().join()}#${ut}`}}for(let Re of this._renderableTiles)for(let je in this._rttFingerprints){let Ze=this._rttFingerprints[je][Re.tileID.key];Ze&&Ze!==Re.rttFingerprint[je]&&(Re.rtt=[])}}renderLayer(y,N){if(y.isHidden(this.painter.transform.zoom))return!1;let ie=Object.assign(Object.assign({},N),{isRenderingToTexture:!0}),fe=y.type,be=this.painter,Re=this._renderableLayerIds[this._renderableLayerIds.length-1]===y.id;if(ct[fe]&&(this._prevType&&ct[this._prevType]||this._stacks.push([]),this._prevType=fe,this._stacks[this._stacks.length-1].push(y.id),!Re))return!0;if(ct[this._prevType]||ct[fe]&&Re){this._prevType=fe;let je=this._stacks.length-1,Ze=this._stacks[je]||[];for(let ut of this._renderableTiles){if(this.pool.isFull()&&(Gu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(ut),ut.rtt[je]){let Dt=this.pool.getObjectForId(ut.rtt[je].id);if(Dt.stamp===ut.rtt[je].stamp){this.pool.useObject(Dt);continue}}let ft=this.pool.getOrCreateFreeObject();this.pool.useObject(ft),this.pool.stampObject(ft),ut.rtt[je]={id:ft.id,stamp:ft.stamp},be.context.bindFramebuffer.set(ft.fbo.framebuffer),be.context.clear({color:e.bo.transparent,stencil:0}),be.currentStencilSource=void 0;for(let Dt of Ze){let Gt=be.style._layers[Dt],Kt=Gt.source?this._coordsAscending[Gt.source][ut.tileID.key]:[ut.tileID];be.context.viewport.set([0,0,ft.fbo.width,ft.fbo.height]),be._renderTileClippingMasks(Gt,Kt,!0),be.renderLayer(be,be.style.tileManagers[Gt.source],Gt,Kt,ie),Gt.source&&(ut.rttFingerprint[Gt.source]=this._rttFingerprints[Gt.source][ut.tileID.key])}}return Gu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects(),ct[fe]}return!1}}let St={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Jt=t,mr={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:pu,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:e.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},gr=class extends gc{get _ownerWindow(){var pe,y;return((y=(pe=this._container)===null||pe===void 0?void 0:pe.ownerDocument)===null||y===void 0?void 0:y.defaultView)||window}constructor(pe){var y,N,ie;let fe=Object.assign(Object.assign(Object.assign({},mr),pe),{canvasContextAttributes:Object.assign(Object.assign({},mr.canvasContextAttributes),pe.canvasContextAttributes)});if(fe.minZoom!=null&&fe.maxZoom!=null&&fe.minZoom>fe.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(fe.minPitch!=null&&fe.maxPitch!=null&&fe.minPitch>fe.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(fe.minPitch!=null&&fe.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(fe.maxPitch!=null&&fe.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let be=new Eo,Re=new Wo;fe.minZoom!==void 0&&be.setMinZoom(fe.minZoom),fe.maxZoom!==void 0&&be.setMaxZoom(fe.maxZoom),fe.minPitch!==void 0&&be.setMinPitch(fe.minPitch),fe.maxPitch!==void 0&&be.setMaxPitch(fe.maxPitch),fe.renderWorldCopies!==void 0&&be.setRenderWorldCopies(fe.renderWorldCopies),fe.transformConstrain!==null&&be.setConstrainOverride(fe.transformConstrain),super(be,Re,{bearingSnap:fe.bearingSnap,zoomSnap:fe.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new de,this._controls=[],this._mapId=e.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=Ze=>{if(Ze.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let ut of Object.values(this.style._layers))if(ut.type==="custom"&&console.warn(`Custom layer with id '${ut.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),ut._listeners)for(let[ft]of Object.entries(ut._listeners))console.warn(`Custom layer with id '${ut.id}' had event listeners for event '${ft}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new e.n("webglcontextlost",{originalEvent:Ze}))}else this.fire(new e.n("webglcontextlost",{originalEvent:Ze}))},this._contextRestored=Ze=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new e.n("webglcontextrestored",{originalEvent:Ze}))},this._onMapScroll=Ze=>{if(Ze.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=fe.interactive,this._maxTileCacheSize=fe.maxTileCacheSize,this._maxTileCacheZoomLevels=fe.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},fe.canvasContextAttributes),this._trackResize=fe.trackResize===!0,this._bearingSnap=fe.bearingSnap,this._zoomSnap=fe.zoomSnap,this._centerClampedToGround=fe.centerClampedToGround,this._refreshExpiredTiles=fe.refreshExpiredTiles===!0,this._fadeDuration=fe.fadeDuration,this._crossSourceCollisions=fe.crossSourceCollisions===!0,this._collectResourceTiming=fe.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},St),fe.locale),this._clickTolerance=fe.clickTolerance,this._overridePixelRatio=fe.pixelRatio,this._maxCanvasSize=fe.maxCanvasSize,this._zoomLevelsToOverscale=fe.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=fe.transformCameraUpdate,this.transformConstrain=fe.transformConstrain,this.cancelPendingTileRequestsWhileZooming=fe.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(fe.anisotropicFilterPitch),fe.reduceMotion!==void 0&&(s.prefersReducedMotion=fe.reduceMotion),this._imageQueueHandle=v.addThrottleControl(()=>this.isMoving()),this._requestManager=new i(fe.transformRequest),this._container=this._resolveContainer(fe.container),fe.maxBounds&&this.setMaxBounds(fe.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new Ps(this,fe),this._hash=fe.hash?new Jc(typeof fe.hash=="string"&&fe.hash||void 0).addTo(this):void 0,!((y=this._hash)===null||y===void 0)&&y._onHashChange()||(this.jumpTo({center:fe.center,elevation:fe.elevation,zoom:fe.zoom,bearing:fe.bearing,pitch:fe.pitch,roll:fe.roll}),fe.bounds&&(this.resize(),this.fitBounds(fe.bounds,e.e({},fe.fitBoundsOptions,{duration:0}))));let je=typeof fe.style=="string"||((ie=(N=fe.style)===null||N===void 0?void 0:N.projection)===null||ie===void 0?void 0:ie.type)!=="globe";this.resize(null,je),this._localIdeographFontFamily=fe.localIdeographFontFamily,this._validateStyle=fe.validateStyle,fe.style&&this.setStyle(fe.style,{localIdeographFontFamily:fe.localIdeographFontFamily}),fe.attributionControl&&this.addControl(new ll(typeof fe.attributionControl=="boolean"?void 0:fe.attributionControl)),fe.maplibreLogo&&this.addControl(new ef,fe.logoPosition),this.on("style.load",()=>{if(je||this._resizeTransform(),this.transform.unmodified){let Ze=e.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(Ze)}}),this.on("data",Ze=>{this._update(Ze.dataType==="style"),this.fire(new e.n(`${Ze.dataType}data`,Ze))}),this.on("dataloading",Ze=>{this.fire(new e.n(`${Ze.dataType}dataloading`,Ze))}),this.on("dataabort",Ze=>{this.fire(new e.n("sourcedataabort",Ze))})}_getMapId(){return this._mapId}setGlobalStateProperty(pe,y){return this.style.setGlobalStateProperty(pe,y),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(pe,y){if(y===void 0&&(y=pe.getDefaultPosition?pe.getDefaultPosition():"top-right"),!pe?.onAdd)return this.fire(new e.l(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let N=pe.onAdd(this);this._controls.push(pe);let ie=this._controlPositions[y];return y.includes("bottom")?ie.insertBefore(N,ie.firstChild):ie.appendChild(N),this}removeControl(pe){if(!pe?.onRemove)return this.fire(new e.l(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let y=this._controls.indexOf(pe);return y>-1&&this._controls.splice(y,1),pe.onRemove(this),this}hasControl(pe){return this._controls.includes(pe)}coveringTiles(pe){return Je(this.transform,pe)}calculateCameraOptionsFromTo(pe,y,N,ie){return ie==null&&this.terrain&&(ie=this.terrain.getElevationForLngLat(N,this.transform)),super.calculateCameraOptionsFromTo(pe,y,N,ie)}resize(pe,y=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(y);let N=!this._moving;return N&&(this.stop(),this.fire(new e.n("movestart",pe)).fire(new e.n("move",pe))),this.fire(new e.n("resize",pe)),N&&this.fire(new e.n("moveend",pe)),this}_resizeInternal(pe=!0){let[y,N]=this._containerDimensions(),ie=this._getClampedPixelRatio(y,N);if(this._resizeCanvas(y,N,ie),this.painter.resize(y,N,ie),this.painter.overLimit()){let fe=this.painter.context.gl;this._maxCanvasSize=[fe.drawingBufferWidth,fe.drawingBufferHeight];let be=this._getClampedPixelRatio(y,N);this._resizeCanvas(y,N,be),this.painter.resize(y,N,be)}this._resizeTransform(pe)}_resizeTransform(pe=!0){var y;let[N,ie]=this._containerDimensions();this.transform.resize(N,ie,pe),(y=this._requestedCameraState)===null||y===void 0||y.resize(N,ie,pe)}_getClampedPixelRatio(pe,y){let{0:N,1:ie}=this._maxCanvasSize,fe=this.getPixelRatio(),be=pe*fe,Re=y*fe;return Math.min(be>N?N/be:1,Re>ie?ie/Re:1)*fe}getPixelRatio(){var pe;return(pe=this._overridePixelRatio)!==null&&pe!==void 0?pe:devicePixelRatio}setPixelRatio(pe){this._overridePixelRatio=pe,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(pe){return this.transform.setMaxBounds(q.convert(pe)),this._update()}setMinZoom(pe){if((pe=pe??-2)>=-2&&pe<=this.transform.maxZoom){let y=this.transform.zoom,N=this._getTransformForUpdate();return N.setMinZoom(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(pe){if((pe=pe??22)>=this.transform.minZoom){let y=this.transform.zoom,N=this._getTransformForUpdate();return N.setMaxZoom(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(pe){if((pe=pe??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(pe>=0&&pe<=this.transform.maxPitch){let y=this.transform.pitch,N=this._getTransformForUpdate();return N.setMinPitch(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(pe){if((pe=pe??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(pe>=this.transform.minPitch){let y=this.transform.pitch,N=this._getTransformForUpdate();return N.setMaxPitch(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(pe){if((pe=pe??20)>180)throw new Error("anisotropicFilterPitch must be less than or equal to 180");if(pe<0)throw new Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=pe,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(pe){return this.transform.setRenderWorldCopies(pe),this._update()}setTransformConstrain(pe){return this.transform.setConstrainOverride(pe),this._update()}project(pe){return this.transform.locationToScreenPoint(e.W.convert(pe),this.style&&this.terrain)}unproject(pe){return this.transform.screenPointToLocation(e.P.convert(pe),this.terrain)}isMoving(){var pe;return this._moving||((pe=this.handlers)===null||pe===void 0?void 0:pe.isMoving())}isZooming(){var pe;return this._zooming||((pe=this.handlers)===null||pe===void 0?void 0:pe.isZooming())}isRotating(){var pe;return this._rotating||((pe=this.handlers)===null||pe===void 0?void 0:pe.isRotating())}_createDelegatedListener(pe,y,N){if(pe==="mouseenter"||pe==="mouseover"){let ie=!1;return{layers:y,listener:N,delegates:{mousemove:be=>{let Re=y.filter(Ze=>this.getLayer(Ze)),je=Re.length!==0?this.queryRenderedFeatures(be.point,{layers:Re}):[];je.length?ie||(ie=!0,N.call(this,new Bl(pe,this,be.originalEvent,{features:je}))):ie=!1},mouseout:()=>{ie=!1}}}}if(pe==="mouseleave"||pe==="mouseout"){let ie=!1;return{layers:y,listener:N,delegates:{mousemove:Re=>{let je=y.filter(Ze=>this.getLayer(Ze));(je.length!==0?this.queryRenderedFeatures(Re.point,{layers:je}):[]).length?ie=!0:ie&&(ie=!1,N.call(this,new Bl(pe,this,Re.originalEvent)))},mouseout:Re=>{ie&&(ie=!1,N.call(this,new Bl(pe,this,Re.originalEvent)))}}}}{let ie=fe=>{let be=y.filter(je=>this.getLayer(je)),Re=be.length!==0?this.queryRenderedFeatures(fe.point,{layers:be}):[];Re.length&&(fe.features=Re,N.call(this,fe),delete fe.features)};return{layers:y,listener:N,delegates:{[pe]:ie}}}}_saveDelegatedListener(pe,y){var N;this._delegatedListeners||(this._delegatedListeners={}),(N=this._delegatedListeners)[pe]||(N[pe]=[]),this._delegatedListeners[pe].push(y)}_removeDelegatedListener(pe,y,N){var ie;if(!(!((ie=this._delegatedListeners)===null||ie===void 0)&&ie[pe]))return;let fe=this._delegatedListeners[pe];for(let be=0;bey.includes(je))){for(let je in Re.delegates)this.off(je,Re.delegates[je]);return void fe.splice(be,1)}}}on(pe,y,N){if(N===void 0)return super.on(pe,y);let ie=typeof y=="string"?[y]:y,fe=this._createDelegatedListener(pe,ie,N);this._saveDelegatedListener(pe,fe);for(let be in fe.delegates)this.on(be,fe.delegates[be]);return{unsubscribe:()=>{this._removeDelegatedListener(pe,ie,N)}}}once(pe,y,N){if(N===void 0)return super.once(pe,y);let ie=typeof y=="string"?[y]:y,fe=this._createDelegatedListener(pe,ie,N);for(let be in fe.delegates){let Re=fe.delegates[be];fe.delegates[be]=(...je)=>{this._removeDelegatedListener(pe,ie,N),Re(...je)}}this._saveDelegatedListener(pe,fe);for(let be in fe.delegates)this.once(be,fe.delegates[be]);return this}off(pe,y,N){return N===void 0?super.off(pe,y):(this._removeDelegatedListener(pe,typeof y=="string"?[y]:y,N),this)}queryRenderedFeatures(pe,y){if(!this.style)return[];let N,ie=pe instanceof e.P||Array.isArray(pe),fe=ie?pe:[[0,0],[this.transform.width,this.transform.height]];if(y||(y=(ie?{}:pe)||{}),fe instanceof e.P||typeof fe[0]=="number")N=[e.P.convert(fe)];else{let be=e.P.convert(fe[0]),Re=e.P.convert(fe[1]);N=[be,new e.P(Re.x,be.y),Re,new e.P(be.x,Re.y),be]}return this.style.queryRenderedFeatures(N,y,this.transform)}querySourceFeatures(pe,y){return this.style.querySourceFeatures(pe,y)}setStyle(pe,y){return(y=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},y)).diff!==!1&&y.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&pe?(this._diffStyle(pe,y),this):(this._localIdeographFontFamily=y.localIdeographFontFamily,this._updateStyle(pe,y))}setTransformRequest(pe){return this._requestManager.setTransformRequest(pe),this}_getUIString(pe){let y=this._locale[pe];if(y==null)throw new Error(`Missing UI string '${pe}'`);return y}_updateStyle(pe,y){var N,ie,fe;if((N=this._diffStyleRequest)===null||N===void 0||N.abort(),this._diffStyleRequest=null,y.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(pe,y));let be=this.style&&y.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!pe)),pe?(this.style=new Ku(this,y||{}),this.style.setEventedParent(this,{style:this.style}),typeof pe=="string"?this.style.loadURL(pe,y,be):this.style.loadJSON(pe,y,be),this):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),(fe=(ie=this.style)===null||ie===void 0?void 0:ie.projection)===null||fe===void 0||fe.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ku(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(pe,y){return e._(this,void 0,void 0,function*(){var N;if((N=this._diffStyleRequest)===null||N===void 0||N.abort(),typeof pe=="string"){let ie=pe;this._diffStyleRequest=new AbortController;let fe=this._diffStyleRequest;try{let be=yield this._requestManager.transformRequest(ie,"Style");if(fe.signal.aborted)return void(this._diffStyleRequest=null);let Re=yield e.k(be,fe);this._diffStyleRequest=null,this._updateDiff(Re.data,y)}catch(be){this._diffStyleRequest=null,e.$(be)||this.fire(new e.l(e.d(be)))}}else typeof pe=="object"&&(this._diffStyleRequest=null,this._updateDiff(pe,y))})}_updateDiff(pe,y){try{this.style.setState(pe,y)&&this._update(!0)}catch(N){e.w(`Unable to perform style diff: ${e.d(N).message}. Rebuilding the style from scratch.`),this._updateStyle(pe,y)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();e.w("There is no style added to the map.")}addSource(pe,y){return this._lazyInitEmptyStyle(),this.style.addSource(pe,y),this._update(!0)}isSourceLoaded(pe){var y;let N=(y=this.style)===null||y===void 0?void 0:y.tileManagers[pe];if(N!==void 0)return N.loaded();this.fire(new e.l(new Error(`There is no tile manager with ID '${pe}'`)))}setTerrain(pe){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),pe){let y=this.style.tileManagers[pe.source];if(!y)throw new Error(`cannot load terrain, because there exists no source with ID: ${pe.source}`);this.terrain===null&&y.reload();for(let N in this.style._layers){let ie=this.style._layers[N];ie.type==="hillshade"&&ie.source===pe.source&&e.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),ie.type==="color-relief"&&ie.source===pe.source&&e.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new tt(this.painter,y,pe),this.painter.renderToTexture=new Nt(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=N=>{var ie;N.dataType==="style"?this.terrain.tileManager.freeRtt():N.dataType==="source"&&N.tile&&(N.sourceId!==pe.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((ie=N.source)===null||ie===void 0?void 0:ie.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(N.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new e.n("terrain",{terrain:pe})),this}getTerrain(){var pe,y;return(y=(pe=this.terrain)===null||pe===void 0?void 0:pe.options)!==null&&y!==void 0?y:null}areTilesLoaded(){var pe;let y=(pe=this.style)===null||pe===void 0?void 0:pe.tileManagers;for(let N of Object.values(y))if(!N.areTilesLoaded())return!1;return!0}removeSource(pe){return this.style.removeSource(pe),this._update(!0)}getSource(pe){return this.style.getSource(pe)}setSourceTileLodParams(pe,y,N){if(N){let ie=this.getSource(N);if(!ie)throw new Error(`There is no source with ID "${N}", cannot set LOD parameters`);ie.calculateTileZoom=Ne(Math.max(1,pe),Math.max(1,y))}else for(let ie in this.style.tileManagers)this.style.tileManagers[ie].getSource().calculateTileZoom=Ne(Math.max(1,pe),Math.max(1,y));return this._update(!0),this}refreshTiles(pe,y){let N=this.style.tileManagers[pe];if(!N)throw new Error(`There is no tile manager with ID "${pe}", cannot refresh tile`);y===void 0?N.reload(!0):N.refreshTiles(y.map(ie=>new e.aa(ie.z,ie.x,ie.y)))}addImage(pe,y,N={}){let{pixelRatio:ie=1,sdf:fe=!1,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut}=N;if(this._lazyInitEmptyStyle(),!(y instanceof HTMLImageElement||e.b(y))){if(y.width===void 0||y.height===void 0)return this.fire(new e.l(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:ft,height:Dt,data:Gt}=y,Kt=y;return this.style.addImage(pe,{data:new e.R({width:ft,height:Dt},new Uint8Array(Gt)),pixelRatio:ie,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut,sdf:fe,version:0,userImage:Kt}),Kt.onAdd&&Kt.onAdd(this,pe),this}}{let{width:ft,height:Dt,data:Gt}=s.getImageData(y);this.style.addImage(pe,{data:new e.R({width:ft,height:Dt},Gt),pixelRatio:ie,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut,sdf:fe,version:0})}}updateImage(pe,y){let N=this.style.getImage(pe);if(!N)return this.fire(new e.l(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let ie=y instanceof HTMLImageElement||e.b(y)?s.getImageData(y):y,{width:fe,height:be,data:Re}=ie;if(fe===void 0||be===void 0)return this.fire(new e.l(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(fe!==N.data.width||be!==N.data.height)return this.fire(new e.l(new Error("The width and height of the updated image must be that same as the previous version of the image")));let je=!(y instanceof HTMLImageElement||e.b(y));return N.data.replace(Re,je),this.style.updateImage(pe,N),this}getImage(pe){return this.style.getImage(pe)}hasImage(pe){return pe?!!this.style.getImage(pe):(this.fire(new e.l(new Error("Missing required image id"))),!1)}removeImage(pe){this.style.removeImage(pe)}loadImage(pe){return e._(this,void 0,void 0,function*(){return v.getImage(yield this._requestManager.transformRequest(pe,"Image"),new AbortController)})}listImages(){return this.style.listImages()}addLayer(pe,y){return this._lazyInitEmptyStyle(),this.style.addLayer(pe,y),this._update(!0)}moveLayer(pe,y){return this.style.moveLayer(pe,y),this._update(!0)}removeLayer(pe){return this.style.removeLayer(pe),this._update(!0)}getLayer(pe){return this.style.getLayer(pe)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(pe,y,N){return this.style.setLayerZoomRange(pe,y,N),this._update(!0)}setFilter(pe,y,N={}){return this.style.setFilter(pe,y,N),this._update(!0)}getFilter(pe){return this.style.getFilter(pe)}setPaintProperty(pe,y,N,ie={}){return this.style.setPaintProperty(pe,y,N,ie),this._update(!0)}getPaintProperty(pe,y){return this.style.getPaintProperty(pe,y)}setLayoutProperty(pe,y,N,ie={}){return this.style.setLayoutProperty(pe,y,N,ie),this._update(!0)}getLayoutProperty(pe,y){return this.style.getLayoutProperty(pe,y)}setGlyphs(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(pe,y),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(pe,y,N={}){return this._lazyInitEmptyStyle(),this.style.addSprite(pe,y,N,ie=>{ie||this._update(!0)}),this}removeSprite(pe){return this._lazyInitEmptyStyle(),this.style.removeSprite(pe),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setSprite(pe,y,N=>{N||this._update(!0)}),this}setLight(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setLight(pe,y),this._update(!0)}getLight(){return this.style.getLight()}setSky(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setSky(pe,y),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(pe,y){return this.style.setFeatureState(pe,y),this._update()}removeFeatureState(pe,y){return this.style.removeFeatureState(pe,y),this._update()}getFeatureState(pe){return this.style.getFeatureState(pe)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let pe=0,y=0;return this._container&&(pe=this._container.clientWidth||400,y=this._container.clientHeight||300),[pe,y]}_setupResizeObserver(){var pe;let y=!1,N=mc(fe=>{this._trackResize&&!this._removed&&(this.resize(fe),this.redraw())},50),ie=(pe=this._ownerWindow.ResizeObserver)!==null&&pe!==void 0?pe:ResizeObserver;this._resizeObserver=new ie(fe=>{y?N(fe):y=!0}),this._resizeObserver.observe(this._container)}_resolveContainer(pe){if(typeof pe=="string"){let y=document.getElementById(pe);if(!y)throw new Error(`Container '${pe}' not found.`);return y}if(pe instanceof HTMLElement||pe&&typeof pe=="object"&&pe.nodeType===1)return pe;throw new Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let pe=this._container;pe.classList.add("maplibregl-map");let y=this._canvasContainer=m.create("div","maplibregl-canvas-container",pe);this._interactive&&y.classList.add("maplibregl-interactive"),this._canvas=m.create("canvas","maplibregl-canvas",y),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let N=this._containerDimensions(),ie=this._getClampedPixelRatio(N[0],N[1]);this._resizeCanvas(N[0],N[1],ie);let fe=this._controlContainer=m.create("div","maplibregl-control-container",pe),be=this._controlPositions={};for(let Re of["top-left","top-right","bottom-left","bottom-right"])be[Re]=m.create("div",`maplibregl-ctrl-${Re} `,fe);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(pe,y,N){this._canvas.width=Math.floor(N*pe),this._canvas.height=Math.floor(N*y),this._canvas.style.width=`${pe}px`,this._canvas.style.height=`${y}px`}_setupPainter(){let pe=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),y=null;this._canvas.addEventListener("webglcontextcreationerror",ie=>{y={requestedAttributes:pe},ie&&(y.statusMessage=ie.statusMessage,y.type=ie.type)},{once:!0});let N=null;if(N=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,pe):this._canvas.getContext("webgl2",pe)||this._canvas.getContext("webgl",pe),!N){let ie="Failed to initialize WebGL";throw y?(y.message=ie,new Error(JSON.stringify(y))):new Error(ie)}this.painter=new Su(N,this.transform)}migrateProjection(pe,y){super.migrateProjection(pe,y),this.painter.transform=pe,this.fire(new e.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(pe){var y;return!((y=this.style)===null||y===void 0)&&y._loaded?(this._styleDirty||(this._styleDirty=pe),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(pe){return this._update(),this._renderTaskQueue.add(pe)}_cancelRenderFrame(pe){this._renderTaskQueue.remove(pe)}_render(pe){var y,N,ie,fe,be,Re;let je=this._idleTriggered?this._fadeDuration:0,Ze=((y=this.style.projection)===null||y===void 0?void 0:y.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(pe),this._removed)return;let ut=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Gt=this.transform.zoom,Kt=g();this.style.zoomHistory.update(Gt,Kt);let st=new e.J(Gt,{now:Kt,fadeDuration:je,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),It=st.crossFadingFactor();It===1&&It===this._crossFadingFactor||(ut=!0,this._crossFadingFactor=It),this.style.update(st)}let ft=((N=this.style.projection)===null||N===void 0?void 0:N.transitionState)>0!==Ze;(ie=this.style.projection)===null||ie===void 0||ie.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((fe=this.style.projection)===null||fe===void 0?void 0:fe.transitionState,(be=this.style.projection)===null||be===void 0?void 0:be.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||ft)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=(Re=this.style)===null||Re===void 0?void 0:Re._updatePlacement(this.transform,this.showCollisionBoxes,je,this._crossSourceCollisions,ft),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:je,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new e.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.n("load"))),this.style&&(this.style.hasTransitions()||ut)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Dt=this._sourcesDirty||this._styleDirty||this._placementDirty;return Dt||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.n("idle")),!this._loaded||this._fullyLoaded||Dt||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var pe,y;this._hash&&this._hash.remove();for(let ie of this._controls)ie.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),(pe=this._diffStyleRequest)===null||pe===void 0||pe.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),v.removeThrottleControl(this._imageQueueHandle),(y=this._resizeObserver)===null||y===void 0||y.disconnect();let N=this.painter.context.gl.getExtension("WEBGL_lose_context");N?.loseContext&&N.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new e.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,s.frame(this._frameRequest,pe=>{this._frameRequest=null;try{this._render(pe)}catch(y){if(!e.$(y)&&!function(N){return N.message===vc}(y))throw y}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(pe){this._showTileBoundaries!==pe&&(this._showTileBoundaries=pe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(pe){this._showPadding!==pe&&(this._showPadding=pe,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(pe){this._showCollisionBoxes!==pe&&(this._showCollisionBoxes=pe,pe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(pe){this._showOverdrawInspector!==pe&&(this._showOverdrawInspector=pe,this._update())}get repaint(){return!!this._repaint}set repaint(pe){this._repaint!==pe&&(this._repaint=pe,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(pe){this._vertices=pe,this._update()}get version(){return Jt}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(pe){return this._lazyInitEmptyStyle(),this.style.setProjection(pe),this._update(!0)}},Hr={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class Vr{constructor(y,N,ie=!1){this.mousedown=be=>{this.startMove(be,m.mousePos(this.element,be)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=be=>{this.move(be,m.mousePos(this.element,be))},this.mouseup=be=>{this._rotatePitchHandler.dragEnd(be),this.offTemp()},this.touchstart=be=>{be.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=m.touchPos(this.element,be.targetTouches)[0],this.startMove(be,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=be=>{be.targetTouches.length!==1?this.reset():(this._lastPos=m.touchPos(this.element,be.targetTouches)[0],this.move(be,this._lastPos))},this.touchend=be=>{be.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=N;let fe=new Br;this._rotatePitchHandler=new mt({clickTolerance:3,move:(be,Re)=>{let je=N.getBoundingClientRect(),Ze=new e.P((je.bottom-je.top)/2,(je.right-je.left)/2);return{bearingDelta:e.cx(new e.P(be.x,Re.y),Re,Ze),pitchDelta:ie?-.5*(Re.y-be.y):void 0}},moveStateManager:fe,enable:!0,assignEvents:()=>{}}),this.map=y,N.addEventListener("mousedown",this.mousedown),N.addEventListener("touchstart",this.touchstart,{passive:!1}),N.addEventListener("touchcancel",this.reset)}startMove(y,N){this._rotatePitchHandler.dragStart(y,N),m.disableDrag()}move(y,N){let ie=this.map,{bearingDelta:fe,pitchDelta:be}=this._rotatePitchHandler.dragMove(y,N)||{};fe&&ie.setBearing(ie.getBearing()+fe),be&&ie.setPitch(ie.getPitch()+be)}off(){let y=this.element;y.removeEventListener("mousedown",this.mousedown),y.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),y.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){m.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}let ca;function Aa(pe,y,N,ie=!1){if(ie||!N.getCoveringTilesDetailsProvider().allowWorldCopies())return pe?.wrap();let fe=new e.W(pe.lng,pe.lat);if(pe=new e.W(pe.lng,pe.lat),y){let be=new e.W(pe.lng-360,pe.lat),Re=new e.W(pe.lng+360,pe.lat),je=N.locationToScreenPoint(pe).distSqr(y);N.locationToScreenPoint(be).distSqr(y)180;){let be=N.locationToScreenPoint(pe);if(be.x>=0&&be.y>=0&&be.x<=N.width&&be.y<=N.height)break;pe.lng>N.center.lng?pe.lng-=360:pe.lng+=360}return pe.lng!==fe.lng&&N.isPointOnMapSurface(N.locationToScreenPoint(pe))?pe:fe}let Yr={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function oa(pe,y,N){let ie=pe.classList;for(let fe in Yr)ie.remove(`maplibregl-${N}-anchor-${fe}`);ie.add(`maplibregl-${N}-anchor-${y}`)}class fa extends e.E{constructor(y){if(super(),this._onClick=N=>{this.fire(new e.n("click",{originalEvent:N}))},this._onKeyPress=N=>{N.code!=="Space"&&N.code!=="Enter"||this.togglePopup()},this._onMapClick=N=>{let ie=N.originalEvent.target,fe=this._element;this._popup&&(ie===fe||fe.contains(ie))&&this.togglePopup()},this._update=N=>{if(!this._map)return;let ie=this._map.loaded()&&!this._map.isMoving();(N?.type==="terrain"||N?.type==="render"&&!ie)&&this._map.once("render",this._update),this._lngLat=Aa(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let fe="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?fe=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(fe=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let be="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?be="rotateX(0deg)":this._pitchAlignment==="map"&&(be=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||N&&N.type!=="moveend"||(this._pos=this._pos.round()),this._element.style.transform=`${Yr[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${be} ${fe}`,s.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity(N?.type==="moveend")}).catch(()=>{})},this._onMove=N=>{if(!this._isDragging){let ie=this._clickTolerance||this._map._clickTolerance;this._isDragging=N.point.dist(this._pointerdownPos)>=ie}this._isDragging&&(this._pos=N.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.n("dragstart"))),this.fire(new e.n("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new e.n("dragend")),this._state="inactive"},this._addDragHandler=N=>{this._element.contains(N.originalEvent.target)&&(N.preventDefault(),this._positionDelta=N.point.sub(this._pos).add(this._offset),this._pointerdownPos=N.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=y?.anchor||"center",this._color=y?.color||"#3FB1CE",this._scale=y?.scale||1,this._draggable=y?.draggable||!1,this._clickTolerance=y?.clickTolerance||0,this._subpixelPositioning=y?.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=y?.rotation||0,this._rotationAlignment=y?.rotationAlignment||"auto",this._pitchAlignment=y?.pitchAlignment&&y.pitchAlignment!=="auto"?y.pitchAlignment:this._rotationAlignment,this.setOpacity(y?.opacity,y?.opacityWhenCovered),y?.element)this._element=y.element,this._offset=e.P.convert(y?.offset||[0,0]);else{this._defaultMarker=!0,this._element=m.create("div");let N=m.createNS("http://www.w3.org/2000/svg","svg"),ie=41,fe=27;N.setAttributeNS(null,"display","block"),N.setAttributeNS(null,"height",`${ie}px`),N.setAttributeNS(null,"width",`${fe}px`),N.setAttributeNS(null,"viewBox",`0 0 ${fe} ${ie}`);let be=m.createNS("http://www.w3.org/2000/svg","g");be.setAttributeNS(null,"stroke","none"),be.setAttributeNS(null,"stroke-width","1"),be.setAttributeNS(null,"fill","none"),be.setAttributeNS(null,"fill-rule","evenodd");let Re=m.createNS("http://www.w3.org/2000/svg","g");Re.setAttributeNS(null,"fill-rule","nonzero");let je=m.createNS("http://www.w3.org/2000/svg","g");je.setAttributeNS(null,"transform","translate(3.0, 29.0)"),je.setAttributeNS(null,"fill","#000000");let Ze=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let ir of Ze){let dr=m.createNS("http://www.w3.org/2000/svg","ellipse");dr.setAttributeNS(null,"opacity","0.04"),dr.setAttributeNS(null,"cx","10.5"),dr.setAttributeNS(null,"cy","5.80029008"),dr.setAttributeNS(null,"rx",ir.rx),dr.setAttributeNS(null,"ry",ir.ry),je.appendChild(dr)}let ut=m.createNS("http://www.w3.org/2000/svg","g");ut.setAttributeNS(null,"fill",this._color);let ft=m.createNS("http://www.w3.org/2000/svg","path");ft.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),ut.appendChild(ft);let Dt=m.createNS("http://www.w3.org/2000/svg","g");Dt.setAttributeNS(null,"opacity","0.25"),Dt.setAttributeNS(null,"fill","#000000");let Gt=m.createNS("http://www.w3.org/2000/svg","path");Gt.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Dt.appendChild(Gt);let Kt=m.createNS("http://www.w3.org/2000/svg","g");Kt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Kt.setAttributeNS(null,"fill","#FFFFFF");let st=m.createNS("http://www.w3.org/2000/svg","g");st.setAttributeNS(null,"transform","translate(8.0, 8.0)");let It=m.createNS("http://www.w3.org/2000/svg","circle");It.setAttributeNS(null,"fill","#000000"),It.setAttributeNS(null,"opacity","0.25"),It.setAttributeNS(null,"cx","5.5"),It.setAttributeNS(null,"cy","5.5"),It.setAttributeNS(null,"r","5.4999962");let Ut=m.createNS("http://www.w3.org/2000/svg","circle");Ut.setAttributeNS(null,"fill","#FFFFFF"),Ut.setAttributeNS(null,"cx","5.5"),Ut.setAttributeNS(null,"cy","5.5"),Ut.setAttributeNS(null,"r","5.4999962"),st.appendChild(It),st.appendChild(Ut),Re.appendChild(je),Re.appendChild(ut),Re.appendChild(Dt),Re.appendChild(Kt),Re.appendChild(st),N.appendChild(Re),N.setAttributeNS(null,"height",ie*this._scale+"px"),N.setAttributeNS(null,"width",fe*this._scale+"px"),this._element.appendChild(N),this._offset=e.P.convert(y?.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",N=>{N.preventDefault()}),this._element.addEventListener("mousedown",N=>{N.preventDefault()}),oa(this._element,this._anchor,"marker"),y?.className)for(let N of y.className.split(" "))this._element.classList.add(N);this._popup=null}addTo(y){return this.remove(),this._map=y,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",y._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),y.getCanvasContainer().appendChild(this._element),y.on("move",this._update),y.on("moveend",this._update),y.on("terrain",this._update),y.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(y){return this._lngLat=e.W.convert(y),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(y){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),y){if(!("offset"in y.options)){let fe=Math.abs(13.5)/Math.SQRT2;y.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[fe,-1*(38.1-13.5+fe)],"bottom-right":[-fe,-1*(38.1-13.5+fe)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=y,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(y){return this._subpixelPositioning=y,this}getPopup(){return this._popup}togglePopup(){let y=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:y?(y.isOpen()?y.remove():(y.setLngLat(this._lngLat),y.addTo(this._map)),this):this}_updateOpacity(y=!1){var N,ie;let fe=(N=this._map)===null||N===void 0?void 0:N.terrain,be=this._map.transform.isLocationOccluded(this._lngLat);if(!fe||be){let Kt=be?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==Kt&&(this._element.style.opacity=Kt,this._element.classList.toggle("maplibregl-marker-covered",be)))}if(y)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let Re=this._map,je=Re.terrain.depthAtPoint(this._pos),Ze=Re.terrain.getElevationForLngLat(this._lngLat,Re.transform);if(Re.transform.lngLatToCameraDepth(this._lngLat,Ze)-je<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let ut=-this._offset.y/Re.transform.pixelsPerMeter,ft=Math.sin(Re.getPitch()*Math.PI/180)*ut,Dt=Re.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Gt=Re.transform.lngLatToCameraDepth(this._lngLat,Ze+ft)-Dt>.006;!((ie=this._popup)===null||ie===void 0)&&ie.isOpen()&&Gt&&this._popup.remove(),this._element.style.opacity=Gt?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",Gt)}getOffset(){return this._offset}setOffset(y){return this._offset=e.P.convert(y),this._update(),this}addClassName(y){this._element.classList.add(y)}removeClassName(y){this._element.classList.remove(y)}toggleClassName(y){return this._element.classList.toggle(y)}setDraggable(y){return this._draggable=!!y,this._map&&(y?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(y){return this._rotation=y||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(y){return this._rotationAlignment=y||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(y){return this._pitchAlignment=y&&y!=="auto"?y:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(y,N){return(this._opacity===void 0||y===void 0&&N===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),y!==void 0&&(this._opacity=String(y)),N!==void 0&&(this._opacityWhenCovered=String(N)),this._map&&this._updateOpacity(!0),this}}let Ea={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Ma=0,sa=!1,hn={maxWidth:100,unit:"metric"};function Tn(pe,y,N){let ie=N?.maxWidth||100,fe=pe._container.clientHeight/2,be=pe._container.clientWidth/2,Re=pe.unproject([be-ie/2,fe]),je=pe.unproject([be+ie/2,fe]),Ze=Math.round(pe.project(je).x-pe.project(Re).x),ut=Math.min(ie,Ze,pe._container.clientWidth),ft=Re.distanceTo(je);if(N?.unit==="imperial"){let Dt=3.2808*ft;Dt>5280?zn(y,ut,Dt/5280,pe._getUIString("ScaleControl.Miles")):zn(y,ut,Dt,pe._getUIString("ScaleControl.Feet"))}else N?.unit==="nautical"?zn(y,ut,ft/1852,pe._getUIString("ScaleControl.NauticalMiles")):ft>=1e3?zn(y,ut,ft/1e3,pe._getUIString("ScaleControl.Kilometers")):zn(y,ut,ft,pe._getUIString("ScaleControl.Meters"))}function zn(pe,y,N,ie){let fe=function(be){let Re=Math.pow(10,`${Math.floor(be)}`.length-1),je=be/Re;return je=je>=10?10:je>=5?5:je>=3?3:je>=2?2:je>=1?1:function(Ze){let ut=Math.pow(10,Math.ceil(-Math.log(Ze)/Math.LN10));return Math.round(Ze*ut)/ut}(je),Re*je}(N);pe.style.width=y*(fe/N)+"px",pe.innerHTML=`${fe} ${ie}`}let $n={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},xi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function di(pe){if(pe){if(typeof pe=="number"){let y=Math.round(Math.abs(pe)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,pe),"top-left":new e.P(y,y),"top-right":new e.P(-y,y),bottom:new e.P(0,-pe),"bottom-left":new e.P(y,-y),"bottom-right":new e.P(-y,-y),left:new e.P(pe,0),right:new e.P(-pe,0)}}if(pe instanceof e.P||Array.isArray(pe)){let y=e.P.convert(pe);return{center:y,top:y,"top-left":y,"top-right":y,bottom:y,"bottom-left":y,"bottom-right":y,left:y,right:y}}return{center:e.P.convert(pe.center||[0,0]),top:e.P.convert(pe.top||[0,0]),"top-left":e.P.convert(pe["top-left"]||[0,0]),"top-right":e.P.convert(pe["top-right"]||[0,0]),bottom:e.P.convert(pe.bottom||[0,0]),"bottom-left":e.P.convert(pe["bottom-left"]||[0,0]),"bottom-right":e.P.convert(pe["bottom-right"]||[0,0]),left:e.P.convert(pe.left||[0,0]),right:e.P.convert(pe.right||[0,0])}}return di(new e.P(0,0))}let uo=t;l.AJAXError=e.cG,l.EXTENT=e.a6,l.Event=e.n,l.Evented=e.E,l.LngLat=e.W,l.MercatorCoordinate=e.a7,l.Point=e.P,l.addProtocol=e.cH,l.config=e.c,l.removeProtocol=e.cI,l.AttributionControl=ll,l.BoxZoomHandler=Nl,l.CanvasSource=ue,l.CooperativeGesturesHandler=wi,l.DoubleClickZoomHandler=ys,l.DragPanHandler=Hs,l.DragRotateHandler=Cu,l.EdgeInsets=oo,l.FullscreenControl=class extends e.E{constructor(pe={}){var y;super(),this._onFullscreenChange=()=>{var N;let ie=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;!((N=ie?.shadowRoot)===null||N===void 0)&&N.fullscreenElement;)ie=ie.shadowRoot.fullscreenElement;ie===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(y=pe.pseudo)!==null&&y!==void 0&&y,pe?.container&&(pe.container instanceof HTMLElement?this._container=pe.container:e.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(pe){return this._map=pe,this._container||(this._container=this._map.getContainer()),this._controlContainer=m.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let pe=this._fullscreenButton=m.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);m.create("span","maplibregl-ctrl-icon",pe).setAttribute("aria-hidden","true"),pe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let pe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",pe),this._fullscreenButton.title=pe}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new e.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},l.GeoJSONSource=qe,l.GeolocateControl=class extends e.E{constructor(pe){super(),this._onSuccess=y=>{if(this._map){if(this._isOutOfMapMaxBounds(y))return this._setErrorState(),this.fire(new e.n("outofmaxbounds",y)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=y,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(y),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(y),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.n("geolocate",y)),this._finish()}},this._updateCamera=y=>{let N=new e.W(y.coords.longitude,y.coords.latitude),ie=y.coords.accuracy,fe=this._map.getBearing(),be=e.e({bearing:fe},this.options.fitBoundsOptions),Re=q.fromLngLat(N,ie);this._map.fitBounds(Re,be,{geolocateSource:!0})},this._updateMarker=y=>{if(y){let N=new e.W(y.coords.longitude,y.coords.latitude);this._accuracyCircleMarker.setLngLat(N).addTo(this._map),this._userLocationDotMarker.setLngLat(N).addTo(this._map),this._accuracy=y.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=y=>{if(this._map){if(y.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let N=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(y.code===3&&sa)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.n("error",y)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=y=>{if(!this._map)return;let N=y?.[0]instanceof ResizeObserverEntry;y.geolocateSource||this._watchState!=="ACTIVE_LOCK"||N||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.n("trackuserlocationend")),this.fire(new e.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",y=>{y.preventDefault()}),this._geolocateButton=m.create("button","maplibregl-ctrl-geolocate",this._container),m.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=y=>{if(this._map){if(y===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let N=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N)}else{let N=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=m.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new fa({element:this._dotElement}),this._circleElement=m.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new fa({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=e.e({},Ea,pe)}onAdd(pe){return this._map=pe,this._container=m.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(y=!1){if(ca!==void 0&&!y)return ca;if(window.navigator.permissions===void 0)return ca=!!window.navigator.geolocation,ca;try{ca=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{ca=!!window.navigator.geolocation}return ca})}().then(y=>this._finishSetupUI(y)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,Ma=0,sa=!1}_isOutOfMapMaxBounds(pe){let y=this._map.getMaxBounds(),N=pe.coords;return y&&(N.longitudey.getEast()||N.latitudey.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let pe=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&pe))return;let y=this._map.project(pe),N=this._map.unproject([y.x+100,y.y]),ie=pe.distanceTo(N)/100,fe=2*this._accuracy/ie;this._circleElement.style.width=`${fe.toFixed(2)}px`,this._circleElement.style.height=`${fe.toFixed(2)}px`}trigger(){if(!this._setup)return e.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ma--,sa=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new e.n("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.n("trackuserlocationstart")),this.fire(new e.n("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let pe;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ma++,Ma>1?(pe={maximumAge:6e5,timeout:0},sa=!0):(pe=this.options.positionOptions,sa=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,pe)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},l.GlobeControl=class{constructor(){this._toggleProjection=()=>{var pe;let y=(pe=this._map.getProjection())===null||pe===void 0?void 0:pe.type;this._map.setProjection(y!=="mercator"&&y?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var pe;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((pe=this._map.getProjection())===null||pe===void 0?void 0:pe.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(pe){return this._map=pe,this._container=m.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=m.create("button","maplibregl-ctrl-globe",this._container),m.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},l.Hash=Jc,l.ImageSource=ke,l.KeyboardHandler=Ji,l.LngLatBounds=q,l.LogoControl=ef,l.Map=gr,l.MapLibreMap=gr,l.MapMouseEvent=Bl,l.MapTouchEvent=Wu,l.MapWheelEvent=wf,l.Marker=fa,l.NavigationControl=class{constructor(pe){this._updateZoomButtons=()=>{let y=this._map.getZoom(),N=y===this._map.getMaxZoom(),ie=y===this._map.getMinZoom();this._zoomInButton.disabled=N,this._zoomOutButton.disabled=ie,this._zoomInButton.setAttribute("aria-disabled",N.toString()),this._zoomOutButton.setAttribute("aria-disabled",ie.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(y,N)=>{let ie=this._map._getUIString(`NavigationControl.${N}`);y.title=ie,y.setAttribute("aria-label",ie)},this.options=e.e({},Hr,pe),this._container=m.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",y=>y.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",y=>this._map.zoomIn({},{originalEvent:y})),m.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",y=>this._map.zoomOut({},{originalEvent:y})),m.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",y=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:y}):this._map.resetNorth({},{originalEvent:y})}),this._compassIcon=m.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(pe){return this._map=pe,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Vr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(pe,y){let N=m.create("button",pe,this._container);return N.type="button",N.addEventListener("click",y),N}},l.Popup=class extends e.E{constructor(pe){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.n("close"))),this),this._update=y=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=m.create("div","maplibregl-popup",this._map.getContainer()),this._tip=m.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let je of this.options.className.split(" "))this._container.classList.add(je);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}let N;if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Aa(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),y&&"point"in y&&y.point&&(N=y.point),this._trackPointer&&!N)return;let ie=this._flatPos=this._pos=this._trackPointer&&N?N:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&N?N:this._map.transform.locationToScreenPoint(this._lngLat));let fe=this.options.anchor,be=di(this.options.offset);if(!fe){let je=this._container.offsetWidth,Ze=this._container.offsetHeight,ut=function(Dt){var Gt,Kt,st,It;return Dt?{top:(Gt=Dt.top)!==null&&Gt!==void 0?Gt:0,right:(Kt=Dt.right)!==null&&Kt!==void 0?Kt:0,bottom:(st=Dt.bottom)!==null&&st!==void 0?st:0,left:(It=Dt.left)!==null&&It!==void 0?It:0}:{top:0,right:0,bottom:0,left:0}}(this.options.padding),ft;ft=ie.y+be.bottom.ythis._map.transform.height-Ze-ut.bottom?["bottom"]:[],ie.xthis._map.transform.width-je/2-ut.right&&ft.push("right"),fe=ft.length===0?"bottom":ft.join("-")}let Re=ie.add(be[fe]);this.options.subpixelPositioning||(Re=Re.round()),this._container.style.transform=`${Yr[fe]} translate(${Re.x}px,${Re.y}px)`,oa(this._container,fe,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=e.e(Object.create($n),pe)}addTo(pe){return this._map&&this.remove(),this._map=pe,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new e.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(pe){return this._lngLat=e.W.convert(pe),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(pe){return this.setDOMContent(document.createTextNode(pe))}setHTML(pe){let y=document.createDocumentFragment(),N=document.createElement("body"),ie;for(N.innerHTML=pe;ie=N.firstChild,ie;)y.appendChild(ie);return this.setDOMContent(y)}getMaxWidth(){var pe;return(pe=this._container)===null||pe===void 0?void 0:pe.style.maxWidth}setMaxWidth(pe){return this.options.maxWidth=pe,this._update(),this}setDOMContent(pe){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=m.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(pe),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(pe){return this._container&&this._container.classList.add(pe),this}removeClassName(pe){return this._container&&this._container.classList.remove(pe),this}setOffset(pe){return this.options.offset=pe,this._update(),this}toggleClassName(pe){if(this._container)return this._container.classList.toggle(pe)}setSubpixelPositioning(pe){this.options.subpixelPositioning=pe}setPadding(pe){this.options.padding=pe,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=m.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let pe=this._container.querySelector(xi);pe&&pe.focus()}},l.RasterDEMTileSource=he,l.RasterTileSource=ae,l.ScaleControl=class{constructor(pe){this._onMove=()=>{Tn(this._map,this._container,this.options)},this.setUnit=y=>{this.options.unit=y,Tn(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},hn),pe)}getDefaultPosition(){return"bottom-left"}onAdd(pe){return this._map=pe,this._container=m.create("div","maplibregl-ctrl maplibregl-ctrl-scale",pe.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},l.ScrollZoomHandler=vo,l.Style=Ku,l.TerrainControl=class{constructor(pe){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=pe}onAdd(pe){return this._map=pe,this._container=m.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=m.create("button","maplibregl-ctrl-terrain",this._container),m.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},l.TwoFingersTouchPitchHandler=Si,l.TwoFingersTouchRotateHandler=wn,l.TwoFingersTouchZoomHandler=Ba,l.TwoFingersTouchZoomRotateHandler=hi,l.VectorTileSource=ee,l.VideoSource=_e,l.addSourceType=(pe,y)=>e._(void 0,void 0,void 0,function*(){if(le(pe))throw new Error(`A source type called "${pe}" already exists.`);((N,ie)=>{ve[N]=ie})(pe,y)}),l.clearPrewarmedResources=function(){let pe=$;pe&&(pe.isPreloaded()&&pe.numActive()===1?(pe.release(P),$=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},l.createTileMesh=Ss,l.getGlobalDispatcher=se,l.getMaxParallelImageRequests=function(){return e.c.MAX_PARALLEL_IMAGE_REQUESTS},l.getRTLTextPluginStatus=function(){return Ye().getRTLTextPluginStatus()},l.getVersion=function(){return uo},l.getWorkerCount=function(){return j.workerCount},l.getWorkerUrl=function(){return e.c.WORKER_URL},l.importScriptInWorkers=function(pe){return se().broadcast("IS",pe)},l.isTimeFrozen=function(){return c.isFrozen()},l.now=g,l.prewarm=function(){re().acquire(P)},l.restoreNow=function(){c.restoreNow()},l.setMaxParallelImageRequests=function(pe){e.c.MAX_PARALLEL_IMAGE_REQUESTS=pe},l.setNow=function(pe){c.setNow(pe)},l.setRTLTextPlugin=function(pe,y){return Ye().setRTLTextPlugin(pe,y)},l.setWorkerCount=function(pe){j.workerCount=pe},l.setWorkerUrl=function(pe){e.c.WORKER_URL=pe}});var k=p;return k})}}),rV=ze({"src/plots/map/layers.js"(J,G){"use strict";var p=Nr(),b=Cs().sanitizeHTML,E=kM(),k=Av();function l(a,o){this.subplot=a,this.uid=a.uid+"-"+o,this.index=o,this.idSource="source-"+this.uid,this.idLayer=k.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=l.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=t(o)},e.needsNewImage=function(a){var o=this.subplot.map;return o.getSource(this.idSource)&&this.sourceType==="image"&&a.sourcetype==="image"&&(this.source!==a.source||JSON.stringify(this.coordinates)!==JSON.stringify(a.coordinates))},e.needsNewSource=function(a){return this.sourceType!==a.sourcetype||JSON.stringify(this.source)!==JSON.stringify(a.source)||this.layerType!==a.type},e.needsNewLayer=function(a){return this.layerType!==a.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(a){var o=this.subplot.map;o.getSource(this.idSource).updateImage({url:a.source,coordinates:a.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},e.updateSource=function(a){var o=this.subplot.map;if(o.getSource(this.idSource)&&o.removeSource(this.idSource),this.sourceType=a.sourcetype,this.source=a.source,!!t(a)){var s=r(a);o.addSource(this.idSource,s)}},e.findFollowingMapLayerId=function(a){if(a==="traces")for(var o=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function n(a){var o={},s={};switch(a.type){case"circle":p.extendFlat(s,{"circle-radius":a.circle.radius,"circle-color":a.color,"circle-opacity":a.opacity});break;case"line":p.extendFlat(s,{"line-width":a.line.width,"line-color":a.color,"line-opacity":a.opacity,"line-dasharray":a.line.dash});break;case"fill":p.extendFlat(s,{"fill-color":a.color,"fill-outline-color":a.fill.outlinecolor,"fill-opacity":a.opacity});break;case"symbol":var c=a.symbol,g=E(c.textposition,c.iconsize);p.extendFlat(o,{"icon-image":c.icon,"icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":g.anchor,"text-offset":g.offset,"symbol-placement":c.placement}),p.extendFlat(s,{"icon-color":a.color,"text-color":c.textfont.color,"text-opacity":a.opacity});break;case"raster":p.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":a.opacity});break}return{layout:o,paint:s}}function r(a){var o=a.sourcetype,s=a.source,c={type:o},g;return o==="geojson"?g="data":o==="vector"?g=typeof s=="string"?"url":"tiles":o==="raster"?(g="tiles",c.tileSize=256):o==="image"&&(g="url",c.coordinates=a.coordinates),c[g]=s,a.sourceattribution&&(c.attribution=b(a.sourceattribution)),c}G.exports=function(o,s,c){var g=new l(o,s);return g.update(c),g}}}),aV=ze({"src/plots/map/map.js"(J,G){"use strict";var p=tV(),b=Nr(),E=hp(),k=mi(),l=Gi(),e=_h(),t=Zl(),n=Fd(),r=n.drawMode,a=n.selectMode,o=_c().prepSelect,s=_c().clearOutline,c=_c().clearSelectionsCache,g=_c().selectOnClick,f=Av(),v=rV();function m(w,h){this.id=h,this.gd=w;var u=w._fullLayout,A=w._context;this.container=u._glcontainer.node(),this.isStatic=A.staticPlot,this.uid=u._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(u),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var i=m.prototype;i.plot=function(w,h,u){var A=this,x;A.map?x=new Promise(function(z,I){A.updateMap(w,h,z,I)}):x=new Promise(function(z,I){A.createMap(w,h,z,I)}),u.push(x)},i.createMap=function(w,h,u,A){var x=this,z=h[x.id],I=x.styleObj=C(z.style),O=z.bounds,D=O?[[O.west,O.south],[O.east,O.north]]:null;let B={container:x.div,style:I.style,center:_(z.center),zoom:z.zoom,bearing:z.bearing,pitch:z.pitch,maxBounds:D,interactive:!x.isStatic,canvasContextAttributes:{preserveDrawingBuffer:x.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},F=z._fitBounds;F&&(B.bounds=[[F.west,F.south],[F.east,F.north]],B.fitBoundsOptions={padding:f.fitBoundsPadding});let P=x.map=new p.Map(B).addControl(new p.AttributionControl({compact:!0}));var j={};P.on("styleimagemissing",function($){var Q=$.id;if(!j[Q]&&/^[a-zA-Z0-9-]+$/.test(Q)){j[Q]=!0;var re=new Image(15,15);re.onload=function(){P.addImage(Q,re,{sdf:!0})},re.crossOrigin="Anonymous",re.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+Q+".svg"}}),P.setTransformRequest(function($){return $=$.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),$=$.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),$=$.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:$}}),P._canvas.style.left="0px",P._canvas.style.top="0px",x.rejectOnError(A),x.isStatic||x.initFx(w,h);var U=[];U.push(new Promise(function($){P.once("load",$)})),U=U.concat(E.fetchTraceGeoData(w)),Promise.all(U).then(function(){F&&T(x,z),S(x,z),x.fillBelowLookup(w,h),x.updateData(w),x.updateLayout(h),x.resolveOnRender(u)}).catch(A)},i.updateMap=function(w,h,u,A){var x=this,z=x.map,I=h[this.id];x.rejectOnError(A);var O=[],D=C(I.style);JSON.stringify(x.styleObj)!==JSON.stringify(D)&&(x.styleObj=D,z.setStyle(D.style),x.traceHash={},O.push(new Promise(function(B){z.once("styledata",B)}))),O=O.concat(E.fetchTraceGeoData(w)),Promise.all(O).then(function(){x.fillBelowLookup(w,h),x.updateData(w);let B=I._fitBounds;B&&(z.fitBounds([[B.west,B.south],[B.east,B.north]],{padding:f.fitBoundsPadding,animate:!1}),T(x,I),S(x,I)),x.updateLayout(h),x.resolveOnRender(u)}).catch(A)};function T(w,h){let{center:u,zoom:A}=w.getView();h._input.center=h.center=u,h._input.zoom=h.zoom=A,h._input._fitView={center:Li({},u),zoom:A}}function S(w,h){let u=w.getView();w.viewInitial={center:b.extendFlat({},u.center),bearing:h.bearing,pitch:h.pitch,zoom:u.zoom}}i.fillBelowLookup=function(w,h){var u=h[this.id],A=u.layers,x,z,I=this.belowLookup={},O=!1;for(x=0;x1)for(x=0;x<$.length;x++)j=$[x],j.indexOf("trace-")===0?(U=j.split("trace-")[1],this.traceHash[U]&&(this.traceHash[U].below=null)):j.indexOf("layout-")===0&&(U=j.split("layout-")[1],this.layerList[U]&&(this.layerList[U].below=null))}};var M={choroplethmap:0,densitymap:1,scattermap:2};i.updateData=function(w){var h=this.traceHash,u,A,x,z,I=w.slice().sort(function(P,j){return M[P[0].trace.type]-M[j[0].trace.type]});for(x=0;xh.project(A).x,_subplot:h},h.yaxis={_id:"y",c2p:A=>h.project(A).y,_subplot:h},h.updateFramework(w),h.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},l.setConvert(h.mockAxis,w)},i.initFx=function(w,h){var u=this,A=u.gd,x=u.map;x.on("moveend",function(O){if(u.map){var D=A._fullLayout;if(O.originalEvent||u.wheeling){var B=D[u.id];k.call("_storeDirectGUIEdit",A.layout,D._preGUI,u.getViewEdits(B));var F=u.getView();B._input.center=B.center=F.center,B._input.zoom=B.zoom=F.zoom,B._input.bearing=B.bearing=F.bearing,B._input.pitch=B.pitch=F.pitch,A.emit("plotly_relayout",u.getViewEditsWithDerived(F))}O.originalEvent&&O.originalEvent.type==="mouseup"?u.dragging=!1:u.wheeling&&(u.wheeling=!1),D&&D._rehover&&D._rehover()}}),x.on("wheel",function(){u.wheeling=!0}),x.on("mousemove",function(O){var D=u.div.getBoundingClientRect(),B=[O.originalEvent.offsetX,O.originalEvent.offsetY];O.target.getBoundingClientRect=function(){return D},u.xaxis.p2c=function(){return x.unproject(B).lng},u.yaxis.p2c=function(){return x.unproject(B).lat},A._fullLayout._rehover=function(){A._fullLayout._hoversubplot===u.id&&A._fullLayout[u.id]&&t.hover(A,O,u.id)},t.hover(A,O,u.id),A._fullLayout._hoversubplot=u.id});function z(){t.loneUnhover(h._hoverlayer)}x.on("dragstart",function(){u.dragging=!0,z()}),x.on("zoomstart",z),x.on("mouseout",function(){A._fullLayout._hoversubplot=null});function I(){var O=u.getView();A.emit("plotly_relayouting",u.getViewEditsWithDerived(O))}x.on("drag",I),x.on("zoom",I),x.on("dblclick",function(){var O=A._fullLayout[u.id];k.call("_storeDirectGUIEdit",A.layout,A._fullLayout._preGUI,u.getViewEdits(O));var D=u.viewInitial;x.setCenter(_(D.center)),x.setZoom(D.zoom),x.setBearing(D.bearing),x.setPitch(D.pitch);var B=u.getView();O._input.center=O.center=B.center,O._input.zoom=O.zoom=B.zoom,O._input.bearing=O.bearing=B.bearing,O._input.pitch=O.pitch=B.pitch,A.emit("plotly_doubleclick",null),A.emit("plotly_relayout",u.getViewEditsWithDerived(B))}),u.clearOutline=function(){c(u.dragOptions),s(u.dragOptions.gd)},u.onClickInPanFn=function(O){return function(D){var B=A._fullLayout.clickmode;B.indexOf("select")>-1&&g(D.originalEvent,A,[u.xaxis],[u.yaxis],u.id,O),B.indexOf("event")>-1&&t.click(A,D.originalEvent)}}},i.updateFx=function(w){var h=this,u=h.map,A=h.gd;if(h.isStatic)return;function x(D){var B=h.map.unproject(D);return[B.lng,B.lat]}var z=w.dragmode,I;I=function(D,B){if(B.isRect){var F=D.range={};F[h.id]=[x([B.xmin,B.ymin]),x([B.xmax,B.ymax])]}else{var P=D.lassoPoints={};P[h.id]=B.map(x)}};var O=h.dragOptions;h.dragOptions=b.extendDeep(O||{},{dragmode:w.dragmode,element:h.div,gd:A,plotinfo:{id:h.id,domain:w[h.id].domain,xaxis:h.xaxis,yaxis:h.yaxis,fillRangeItems:I},xaxes:[h.xaxis],yaxes:[h.yaxis],subplot:h.id}),u.off("click",h.onClickInPanHandler),a(z)||r(z)?(u.dragPan.disable(),u.on("zoomstart",h.clearOutline),h.dragOptions.prepFn=function(D,B,F){o(D,B,F,h.dragOptions,z)},e.init(h.dragOptions)):(u.dragPan.enable(),u.off("zoomstart",h.clearOutline),h.div.onmousedown=null,h.div.ontouchstart=null,h.div.removeEventListener("touchstart",h.div._ontouchstart),h.onClickInPanHandler=h.onClickInPanFn(h.dragOptions),u.on("click",h.onClickInPanHandler))},i.updateFramework=function(w){var h=w[this.id].domain,u=w._size,A=this.div.style;A.width=u.w*(h.x[1]-h.x[0])+"px",A.height=u.h*(h.y[1]-h.y[0])+"px",A.left=u.l+h.x[0]*u.w+"px",A.top=u.t+(1-h.y[1])*u.h+"px",this.xaxis._offset=u.l+h.x[0]*u.w,this.xaxis._length=u.w*(h.x[1]-h.x[0]),this.yaxis._offset=u.t+(1-h.y[1])*u.h,this.yaxis._length=u.h*(h.y[1]-h.y[0])},i.updateLayers=function(w){var h=w[this.id],u=h.layers,A=this.layerList,x;if(u.length!==A.length){for(x=0;xnV});function nV(J,G){let p=[];for(let t of J){if(t.subplot!==G||t.visible!==!0)continue;if(t.type==="choroplethmap")return null;let{lat:n,lon:r}=t;if(!r||!n)continue;let a=Math.min(r.length,n.length);for(let o=0;oh/2){var u=M.split("|").join("
");_.text(u).attr("data-unformatted",u).call(t.convertToTspans,a),w=e.bBox(_.node())}_.attr("transform",p(-3,-w.height+8)),C.insert("rect",".static-attribution").attr({x:-w.width-6,y:-w.height-3,width:w.width+6,height:w.height+3,fill:"rgba(255, 255, 255, 0.75)"});var A=1;w.width+6>h&&(A=h/(w.width+6));var x=[c.l+c.w*v.x[1],c.t+c.h*(1-v.y[0])];C.attr("transform",p(x[0],x[1])+b(A))}},J.updateFx=function(a){for(var o=a._fullLayout,s=o._subplots[r],c=0;c=0;n--)e.removeLayer(t[n][1])},l.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},G.exports=function(t,n){var r=n[0].trace,a=new k(t,r.uid),o=a.sourceId,s=p(n),c=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,c),n[0].trace._glTrace=a,a}}}),fV=ze({"src/traces/choroplethmap/index.js"(J,G){"use strict";G.exports={attributes:PM(),supplyDefaults:uV(),colorbar:a1(),calc:IA(),plot:cV(),hoverPoints:DA(),eventData:FA(),selectPoints:zA(),styleOnSelect:function(p,b){if(b){var E=b[0].trace;E._glTrace.updateOnSelect(b)}},getBelow:function(p,b){for(var E=b.getMapLayers(),k=E.length-2;k>=0;k--){var l=E[k].id;if(typeof l=="string"&&l.indexOf("water")===0){for(var e=k+1;e0?+v[g]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:S},properties:M})}}var _=k.extractOpts(r),w=_.reversescale?k.flipScale(_.colorscale):_.colorscale,h=w[0][1],u=E.opacity(h)<1?h:E.addOpacity(h,0),A=["interpolate",["linear"],["heatmap-density"],0,u];for(g=1;g=0;t--)l.removeLayer(e[t][1])},k.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},G.exports=function(e,t){var n=t[0].trace,r=new E(e,n.uid),a=r.sourceId,o=p(t),s=r.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(a,{type:"geojson",data:o.geojson}),r._addLayers(o,s),r}}}),gV=ze({"src/traces/densitymap/hover.js"(J,G){"use strict";var p=Gi(),b=V2().hoverPoints,E=V2().getExtraText;G.exports=function(l,e,t){var n=b(l,e,t);if(n){var r=n[0],a=r.cd,o=a[0].trace,s=a[r.index];if(delete r.color,"z"in s){var c=r.subplot.mockAxis;r.z=s.z,r.zLabel=p.tickText(c,c.c2l(s.z),"hover").text}return r.extraText=E(o,s,a[0].t.labels),[r]}}}}),yV=ze({"src/traces/densitymap/event_data.js"(J,G){"use strict";G.exports=function(b,E){return b.lon=E.lon,b.lat=E.lat,b.z=E.z,b}}}),_V=ze({"src/traces/densitymap/index.js"(J,G){"use strict";G.exports={attributes:IM(),supplyDefaults:dV(),colorbar:a1(),formatLabels:EM(),calc:pV(),plot:mV(),hoverPoints:gV(),eventData:yV(),getBelow:function(p,b){for(var E=b.getMapLayers(),k=0;kT[z%T.length];i("color",m.label.map((z,I)=>E.addOpacity(S(I),.8))),i("customdata");var M=a.link||{},C=e.newContainer(o,"link");function _(z,I){return p.coerce(M,C,b.link,z,I)}_("label"),_("arrowlen"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",a.hoverinfo),l(M,C,_,f),_("hovertemplate"),_("sort");var w=E.luminosity(c.paper_bgcolor)<.333,h=w?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",u=_("color",h);function A(z){if(!E.isValid(z))return z;let I=E.opacity(z);return I<=.8?E.addOpacity(z,I+.2):w?E.brighten(z,10):E.adjustLightness(z,-10)}_("hovercolor",Array.isArray(u)?u.map(A):A(u)),_("customdata"),t(M,C,{name:"colorscales",handleItemDefaults:n}),k(o,c,g),g("orientation"),g("direction"),g("valueformat"),g("valuesuffix");let x=m.x.length&&m.y.length?"freeform":void 0;g("arrangement",x),p.coerceFont(g,"textfont",c.font,{autoShadowDflt:!0}),o._length=null};function n(r,a){function o(s,c){return p.coerce(r,a,b.link.colorscales,s,c)}o("label"),o("cmin"),o("cmax"),o("colorscale")}}}),FM=ze({"node_modules/strongly-connected-components/scc.js"(J,G){"use strict";G.exports=p;function p(b){for(var E=b.length,k=new Array(E),l=new Array(E),e=new Array(E),t=new Array(E),n=new Array(E),r=new Array(E),a=0;a0;){i=S[S.length-1];var M=b[i];if(t[i]=0&&r[i].push(n[_])}t[i]=C}else{if(l[i]===k[i]){for(var w=[],h=[],u=0,C=T.length-1;C>=0;--C){var A=T[C];if(e[A]=!1,w.push(A),h.push(r[A]),u+=r[A].length,n[A]=s.length,A===i){T.length=C;break}}s.push(w);for(var x=new Array(u),C=0;C_&&(_=o.source[T]),o.target[T]>_&&(_=o.target[T]);var w=_+1;r.node._count=w;var h,u=r.node.groups,A={};for(T=0;T0&&l(B,w)&&l(F,w)&&!(A.hasOwnProperty(B)&&A.hasOwnProperty(F)&&A[B]===A[F])){A.hasOwnProperty(F)&&(F=A[F]),A.hasOwnProperty(B)&&(B=A[B]),B=+B,F=+F,v[B]=v[F]=!0;var P="";o.label&&o.label[T]&&(P=o.label[T]);var j=null;P&&m.hasOwnProperty(P)&&(j=m[P]),s.push({pointNumber:T,label:P,color:c?o.color[T]:o.color,hovercolor:g?o.hovercolor[T]:o.hovercolor,customdata:f?o.customdata[T]:o.customdata,concentrationscale:j,source:B,target:F,value:+D}),O.source.push(B),O.target.push(F)}}var U=w+u.length,$=k(a.color),Q=k(a.customdata),re=[];for(T=0;Tw-1,childrenNodes:[],pointNumber:T,label:ne,color:$?a.color[T]:a.color,customdata:Q?a.customdata[T]:a.customdata})}var se=!1;return n(U,O.source,O.target)&&(se=!0),{circular:se,links:s,nodes:re,groups:u,groupLookup:A}}function n(r,a,o){for(var s=b.init2dArray(r,0),c=0;c1})}G.exports=function(a,o){var s=t(o);return E({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),TV=ze({"node_modules/d3-quadtree/dist/d3-quadtree.js"(J,G){(function(p,b){typeof J=="object"&&typeof G<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(w){var h=+this._x.call(null,w),u=+this._y.call(null,w);return E(this.cover(h,u),h,u,w)}function E(w,h,u,A){if(isNaN(h)||isNaN(u))return w;var x,z=w._root,I={data:A},O=w._x0,D=w._y0,B=w._x1,F=w._y1,P,j,U,$,Q,re,ne,se;if(!z)return w._root=I,w;for(;z.length;)if((Q=h>=(P=(O+B)/2))?O=P:B=P,(re=u>=(j=(D+F)/2))?D=j:F=j,x=z,!(z=z[ne=re<<1|Q]))return x[ne]=I,w;if(U=+w._x.call(null,z.data),$=+w._y.call(null,z.data),h===U&&u===$)return I.next=z,x?x[ne]=I:w._root=I,w;do x=x?x[ne]=new Array(4):w._root=new Array(4),(Q=h>=(P=(O+B)/2))?O=P:B=P,(re=u>=(j=(D+F)/2))?D=j:F=j;while((ne=re<<1|Q)===(se=($>=j)<<1|U>=P));return x[se]=z,x[ne]=I,w}function k(w){var h,u,A=w.length,x,z,I=new Array(A),O=new Array(A),D=1/0,B=1/0,F=-1/0,P=-1/0;for(u=0;uF&&(F=x),zP&&(P=z));if(D>F||B>P)return this;for(this.cover(D,B).cover(F,P),u=0;uw||w>=x||A>h||h>=z;)switch(B=(hF||(O=$.y0)>P||(D=$.x1)=ne)<<1|w>=re)&&($=j[j.length-1],j[j.length-1]=j[j.length-1-Q],j[j.length-1-Q]=$)}else{var se=w-+this._x.call(null,U.data),V=h-+this._y.call(null,U.data),Z=se*se+V*V;if(Z=(j=(I+D)/2))?I=j:D=j,(Q=P>=(U=(O+B)/2))?O=U:B=U,h=u,!(u=u[re=Q<<1|$]))return this;if(!u.length)break;(h[re+1&3]||h[re+2&3]||h[re+3&3])&&(A=h,ne=re)}for(;u.data!==w;)if(x=u,!(u=u.next))return this;return(z=u.next)&&delete u.next,x?(z?x.next=z:delete x.next,this):h?(z?h[re]=z:delete h[re],(u=h[0]||h[1]||h[2]||h[3])&&u===(h[3]||h[2]||h[1]||h[0])&&!u.length&&(A?A[ne]=u:this._root=u),this):(this._root=z,this)}function o(w){for(var h=0,u=w.length;h=v.length)return i!=null&&_.sort(i),T!=null?T(_):_;for(var A=-1,x=_.length,z=v[w++],I,O,D=k(),B,F=h();++Av.length)return _;var h,u=m[w-1];return T!=null&&w>=v.length?h=_.entries():(h=[],_.each(function(A,x){h.push({key:x,values:C(A,w)})})),u!=null?h.sort(function(A,x){return u(A.key,x.key)}):h}return S={object:function(_){return M(_,0,e,t)},map:function(_){return M(_,0,n,r)},entries:function(_){return C(M(_,0,n,r),0)},key:function(_){return v.push(_),S},sortKeys:function(_){return m[v.length-1]=_,S},sortValues:function(_){return i=_,S},rollup:function(_){return T=_,S}}}function e(){return{}}function t(v,m,i){v[m]=i}function n(){return k()}function r(v,m,i){v.set(m,i)}function a(){}var o=k.prototype;a.prototype=s.prototype={constructor:a,has:o.has,add:function(v){return v+="",this[b+v]=v,this},remove:o.remove,clear:o.clear,values:o.keys,size:o.size,empty:o.empty,each:o.each};function s(v,m){var i=new a;if(v instanceof a)v.each(function(M){i.add(M)});else if(v){var T=-1,S=v.length;if(m==null)for(;++T=0&&(o=a.slice(s+1),a=a.slice(0,s)),a&&!r.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:o}})}k.prototype=E.prototype={constructor:k,on:function(n,r){var a=this._,o=l(n+"",a),s,c=-1,g=o.length;if(arguments.length<2){for(;++c0)for(var a=new Array(s),o=0,s,c;o=0&&w._call.call(null,h),w=w._next;--b}function i(){r=(n=o.now())+a,b=E=0;try{m()}finally{b=0,S(),r=0}}function T(){var w=o.now(),h=w-n;h>l&&(a-=h,n=w)}function S(){for(var w,h=e,u,A=1/0;h;)h._call?(A>h._time&&(A=h._time),w=h,h=h._next):(u=h._next,h._next=null,h=w?w._next=u:e=u);t=w,M(A)}function M(w){if(!b){E&&(E=clearTimeout(E));var h=w-r;h>24?(w<1/0&&(E=setTimeout(i,w-o.now()-a)),k&&(k=clearInterval(k))):(k||(n=o.now(),k=setInterval(T,l)),b=1,s(i))}}function C(w,h,u){var A=new f;return h=h==null?0:+h,A.restart(function(x){A.stop(),w(x+h)},h,u),A}function _(w,h,u){var A=new f,x=h;return h==null?(A.restart(w,h,u),A):(h=+h,u=u==null?c():+u,A.restart(function z(I){I+=x,A.restart(z,x+=h,u),w(I)},h,u),A)}p.interval=_,p.now=c,p.timeout=C,p.timer=v,p.timerFlush=m,Object.defineProperty(p,"__esModule",{value:!0})})}}),SV=ze({"node_modules/d3-force/dist/d3-force.js"(J,G){(function(p,b){typeof J=="object"&&typeof G<"u"?b(J,TV(),zM(),AV(),MV()):b(p.d3=p.d3||{},p.d3,p.d3,p.d3,p.d3)})(J,function(p,b,E,k,l){"use strict";function e(w,h){var u;w==null&&(w=0),h==null&&(h=0);function A(){var x,z=u.length,I,O=0,D=0;for(x=0;xP.index){var ee=j-X.x-X.vx,ae=U-X.y-X.vy,he=ee*ee+ae*ae;hej+W||KU+W||HD.r&&(D.r=D[B].r)}function O(){if(h){var D,B=h.length,F;for(u=new Array(B),D=0;D1?(Q==null?O.remove($):O.set($,U(Q)),h):O.get($)},find:function($,Q,re){var ne=0,se=w.length,V,Z,K,H,X;for(re==null?re=1/0:re*=re,ne=0;ne1?(B.on($,Q),h):B.on($)}}}function S(){var w,h,u,A=t(-30),x,z=1,I=1/0,O=.81;function D(j){var U,$=w.length,Q=b.quadtree(w,f,v).visitAfter(F);for(u=j,U=0;U<$;++U)h=w[U],Q.visit(P)}function B(){if(w){var j,U=w.length,$;for(x=new Array(U),j=0;j=I)return;(j.data!==h||j.next)&&(re===0&&(re=n(),V+=re*re),ne===0&&(ne=n(),V+=ne*ne),VRt?1:Yt>=Rt?0:NaN}function E(Yt){let Rt=Yt,nr=Yt;Yt.length===1&&(Rt=(Qr,Zr)=>Yt(Qr)-Zr,nr=k(Yt));function ur(Qr,Zr,ha,Pa){for(ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);ha>>1;nr(Qr[La],Zr)<0?ha=La+1:Pa=La}return ha}function cr(Qr,Zr,ha,Pa){for(ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);ha>>1;nr(Qr[La],Zr)>0?Pa=La:ha=La+1}return ha}function Rr(Qr,Zr,ha,Pa){ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);let La=ur(Qr,Zr,ha,Pa-1);return La>ha&&Rt(Qr[La-1],Zr)>-Rt(Qr[La],Zr)?La-1:La}return{left:ur,center:Rr,right:cr}}function k(Yt){return(Rt,nr)=>b(Yt(Rt),nr)}function l(Yt){return Yt===null?NaN:+Yt}function*e(Yt,Rt){if(Rt===void 0)for(let nr of Yt)nr!=null&&(nr=+nr)>=nr&&(yield nr);else{let nr=-1;for(let ur of Yt)(ur=Rt(ur,++nr,Yt))!=null&&(ur=+ur)>=ur&&(yield ur)}}let t=E(b),n=t.right,r=t.left,a=E(l).center;function o(Yt,Rt){let nr=0;if(Rt===void 0)for(let ur of Yt)ur!=null&&(ur=+ur)>=ur&&++nr;else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(cr=+cr)>=cr&&++nr}return nr}function s(Yt){return Yt.length|0}function c(Yt){return!(Yt>0)}function g(Yt){return typeof Yt!="object"||"length"in Yt?Yt:Array.from(Yt)}function f(Yt){return Rt=>Yt(...Rt)}function v(...Yt){let Rt=typeof Yt[Yt.length-1]=="function"&&f(Yt.pop());Yt=Yt.map(g);let nr=Yt.map(s),ur=Yt.length-1,cr=new Array(ur+1).fill(0),Rr=[];if(ur<0||nr.some(c))return Rr;for(;;){Rr.push(cr.map((Zr,ha)=>Yt[ha][Zr]));let Qr=ur;for(;++cr[Qr]===nr[Qr];){if(Qr===0)return Rt?Rr.map(Rt):Rr;cr[Qr--]=0}}}function m(Yt,Rt){var nr=0,ur=0;return Float64Array.from(Yt,Rt===void 0?cr=>nr+=+cr||0:cr=>nr+=+Rt(cr,ur++,Yt)||0)}function i(Yt,Rt){return RtYt?1:Rt>=Yt?0:NaN}function T(Yt,Rt){let nr=0,ur,cr=0,Rr=0;if(Rt===void 0)for(let Qr of Yt)Qr!=null&&(Qr=+Qr)>=Qr&&(ur=Qr-cr,cr+=ur/++nr,Rr+=ur*(Qr-cr));else{let Qr=-1;for(let Zr of Yt)(Zr=Rt(Zr,++Qr,Yt))!=null&&(Zr=+Zr)>=Zr&&(ur=Zr-cr,cr+=ur/++nr,Rr+=ur*(Zr-cr))}if(nr>1)return Rr/(nr-1)}function S(Yt,Rt){let nr=T(Yt,Rt);return nr&&Math.sqrt(nr)}function M(Yt,Rt){let nr,ur;if(Rt===void 0)for(let cr of Yt)cr!=null&&(nr===void 0?cr>=cr&&(nr=ur=cr):(nr>cr&&(nr=cr),ur=Rr&&(nr=ur=Rr):(nr>Rr&&(nr=Rr),ur0){for(Qr=Rt[--nr];nr>0&&(ur=Qr,cr=Rt[--nr],Qr=ur+cr,Rr=cr-(Qr-ur),!Rr););nr>0&&(Rr<0&&Rt[nr-1]<0||Rr>0&&Rt[nr-1]>0)&&(cr=Rr*2,ur=Qr+cr,cr==ur-Qr&&(Qr=ur))}return Qr}}function _(Yt,Rt){let nr=new C;if(Rt===void 0)for(let ur of Yt)(ur=+ur)&&nr.add(ur);else{let ur=-1;for(let cr of Yt)(cr=+Rt(cr,++ur,Yt))&&nr.add(cr)}return+nr}function w(Yt,Rt){let nr=new C,ur=-1;return Float64Array.from(Yt,Rt===void 0?cr=>nr.add(+cr||0):cr=>nr.add(+Rt(cr,++ur,Yt)||0))}class h extends Map{constructor(Rt,nr=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nr}}),Rt!=null)for(let[ur,cr]of Rt)this.set(ur,cr)}get(Rt){return super.get(A(this,Rt))}has(Rt){return super.has(A(this,Rt))}set(Rt,nr){return super.set(x(this,Rt),nr)}delete(Rt){return super.delete(z(this,Rt))}}class u extends Set{constructor(Rt,nr=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nr}}),Rt!=null)for(let ur of Rt)this.add(ur)}has(Rt){return super.has(A(this,Rt))}add(Rt){return super.add(x(this,Rt))}delete(Rt){return super.delete(z(this,Rt))}}function A({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)?Yt.get(ur):nr}function x({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)?Yt.get(ur):(Yt.set(ur,nr),nr)}function z({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)&&(nr=Yt.get(nr),Yt.delete(ur)),nr}function I(Yt){return Yt!==null&&typeof Yt=="object"?Yt.valueOf():Yt}function O(Yt){return Yt}function D(Yt,...Rt){return Q(Yt,O,O,Rt)}function B(Yt,...Rt){return Q(Yt,Array.from,O,Rt)}function F(Yt,Rt,...nr){return Q(Yt,O,Rt,nr)}function P(Yt,Rt,...nr){return Q(Yt,Array.from,Rt,nr)}function j(Yt,...Rt){return Q(Yt,O,$,Rt)}function U(Yt,...Rt){return Q(Yt,Array.from,$,Rt)}function $(Yt){if(Yt.length!==1)throw new Error("duplicate key");return Yt[0]}function Q(Yt,Rt,nr,ur){return function cr(Rr,Qr){if(Qr>=ur.length)return nr(Rr);let Zr=new h,ha=ur[Qr++],Pa=-1;for(let La of Rr){let un=ha(La,++Pa,Rr),Xa=Zr.get(un);Xa?Xa.push(La):Zr.set(un,[La])}for(let[La,un]of Zr)Zr.set(La,cr(un,Qr));return Rt(Zr)}(Yt,0)}function re(Yt,Rt){return Array.from(Rt,nr=>Yt[nr])}function ne(Yt,...Rt){if(typeof Yt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");Yt=Array.from(Yt);let[nr=b]=Rt;if(nr.length===1||Rt.length>1){let ur=Uint32Array.from(Yt,(cr,Rr)=>Rr);return Rt.length>1?(Rt=Rt.map(cr=>Yt.map(cr)),ur.sort((cr,Rr)=>{for(let Qr of Rt){let Zr=b(Qr[cr],Qr[Rr]);if(Zr)return Zr}})):(nr=Yt.map(nr),ur.sort((cr,Rr)=>b(nr[cr],nr[Rr]))),re(Yt,ur)}return Yt.sort(nr)}function se(Yt,Rt,nr){return(Rt.length===1?ne(F(Yt,Rt,nr),([ur,cr],[Rr,Qr])=>b(cr,Qr)||b(ur,Rr)):ne(D(Yt,nr),([ur,cr],[Rr,Qr])=>Rt(cr,Qr)||b(ur,Rr))).map(([ur])=>ur)}var V=Array.prototype,Z=V.slice;function K(Yt){return function(){return Yt}}var H=Math.sqrt(50),X=Math.sqrt(10),q=Math.sqrt(2);function W(Yt,Rt,nr){var ur,cr=-1,Rr,Qr,Zr;if(Rt=+Rt,Yt=+Yt,nr=+nr,Yt===Rt&&nr>0)return[Yt];if((ur=Rt0){let ha=Math.round(Yt/Zr),Pa=Math.round(Rt/Zr);for(ha*ZrRt&&--Pa,Qr=new Array(Rr=Pa-ha+1);++crRt&&--Pa,Qr=new Array(Rr=Pa-ha+1);++cr=0?(Rr>=H?10:Rr>=X?5:Rr>=q?2:1)*Math.pow(10,cr):-Math.pow(10,-cr)/(Rr>=H?10:Rr>=X?5:Rr>=q?2:1)}function ae(Yt,Rt,nr){var ur=Math.abs(Rt-Yt)/Math.max(0,nr),cr=Math.pow(10,Math.floor(Math.log(ur)/Math.LN10)),Rr=ur/cr;return Rr>=H?cr*=10:Rr>=X?cr*=5:Rr>=q&&(cr*=2),Rt0?(Yt=Math.floor(Yt/cr)*cr,Rt=Math.ceil(Rt/cr)*cr):cr<0&&(Yt=Math.ceil(Yt*cr)/cr,Rt=Math.floor(Rt*cr)/cr),ur=cr}}function xe(Yt){return Math.ceil(Math.log(o(Yt))/Math.LN2)+1}function we(){var Yt=O,Rt=M,nr=xe;function ur(cr){Array.isArray(cr)||(cr=Array.from(cr));var Rr,Qr=cr.length,Zr,ha=new Array(Qr);for(Rr=0;Rr=un)if(Un>=un&&Rt===M){let Yn=ee(La,un,li);isFinite(Yn)&&(Yn>0?un=(Math.floor(un/Yn)+1)*Yn:Yn<0&&(un=(Math.ceil(un*-Yn)+1)/-Yn))}else Xa.pop()}for(var ja=Xa.length;Xa[0]<=La;)Xa.shift(),--ja;for(;Xa[ja-1]>un;)Xa.pop(),--ja;var Nn=new Array(ja+1),yn;for(Rr=0;Rr<=ja;++Rr)yn=Nn[Rr]=[],yn.x0=Rr>0?Xa[Rr-1]:La,yn.x1=Rr=ur)&&(nr=ur);else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(nr=cr)&&(nr=cr)}return nr}function Se(Yt,Rt){let nr;if(Rt===void 0)for(let ur of Yt)ur!=null&&(nr>ur||nr===void 0&&ur>=ur)&&(nr=ur);else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(nr>cr||nr===void 0&&cr>=cr)&&(nr=cr)}return nr}function Ie(Yt,Rt,nr=0,ur=Yt.length-1,cr=b){for(;ur>nr;){if(ur-nr>600){let ha=ur-nr+1,Pa=Rt-nr+1,La=Math.log(ha),un=.5*Math.exp(2*La/3),Xa=.5*Math.sqrt(La*un*(ha-un)/ha)*(Pa-ha/2<0?-1:1),ja=Math.max(nr,Math.floor(Rt-Pa*un/ha+Xa)),Nn=Math.min(ur,Math.floor(Rt+(ha-Pa)*un/ha+Xa));Ie(Yt,Rt,ja,Nn,cr)}let Rr=Yt[Rt],Qr=nr,Zr=ur;for(Ge(Yt,nr,Rt),cr(Yt[ur],Rr)>0&&Ge(Yt,nr,ur);Qr0;)--Zr}cr(Yt[nr],Rr)===0?Ge(Yt,nr,Zr):(++Zr,Ge(Yt,Zr,ur)),Zr<=Rt&&(nr=Zr+1),Rt<=Zr&&(ur=Zr-1)}return Yt}function Ge(Yt,Rt,nr){let ur=Yt[Rt];Yt[Rt]=Yt[nr],Yt[nr]=ur}function qe(Yt,Rt,nr){if(Yt=Float64Array.from(e(Yt,nr)),!!(ur=Yt.length)){if((Rt=+Rt)<=0||ur<2)return Se(Yt);if(Rt>=1)return Me(Yt);var ur,cr=(ur-1)*Rt,Rr=Math.floor(cr),Qr=Me(Ie(Yt,Rr).subarray(0,Rr+1)),Zr=Se(Yt.subarray(Rr+1));return Qr+(Zr-Qr)*(cr-Rr)}}function ke(Yt,Rt,nr=l){if(ur=Yt.length){if((Rt=+Rt)<=0||ur<2)return+nr(Yt[0],0,Yt);if(Rt>=1)return+nr(Yt[ur-1],ur-1,Yt);var ur,cr=(ur-1)*Rt,Rr=Math.floor(cr),Qr=+nr(Yt[Rr],Rr,Yt),Zr=+nr(Yt[Rr+1],Rr+1,Yt);return Qr+(Zr-Qr)*(cr-Rr)}}function _e(Yt,Rt,nr){return Math.ceil((nr-Rt)/(2*(qe(Yt,.75)-qe(Yt,.25))*Math.pow(o(Yt),-1/3)))}function ue(Yt,Rt,nr){return Math.ceil((nr-Rt)/(3.5*S(Yt)*Math.pow(o(Yt),-1/3)))}function ve(Yt,Rt){let nr,ur=-1,cr=-1;if(Rt===void 0)for(let Rr of Yt)++cr,Rr!=null&&(nr=Rr)&&(nr=Rr,ur=cr);else for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(nr=Rr)&&(nr=Rr,ur=cr);return ur}function le(Yt,Rt){let nr=0,ur=0;if(Rt===void 0)for(let cr of Yt)cr!=null&&(cr=+cr)>=cr&&(++nr,ur+=cr);else{let cr=-1;for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(Rr=+Rr)>=Rr&&(++nr,ur+=Rr)}if(nr)return ur/nr}function Ae(Yt,Rt){return qe(Yt,.5,Rt)}function*Be(Yt){for(let Rt of Yt)yield*ad(Rt)}function Xe(Yt){return Array.from(Be(Yt))}function Ye(Yt,Rt){let nr,ur=-1,cr=-1;if(Rt===void 0)for(let Rr of Yt)++cr,Rr!=null&&(nr>Rr||nr===void 0&&Rr>=Rr)&&(nr=Rr,ur=cr);else for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(nr>Rr||nr===void 0&&Rr>=Rr)&&(nr=Rr,ur=cr);return ur}function yt(Yt,Rt=gt){let nr=[],ur,cr=!1;for(let Rr of Yt)cr&&nr.push(Rt(ur,Rr)),ur=Rr,cr=!0;return nr}function gt(Yt,Rt){return[Yt,Rt]}function Tt(Yt,Rt,nr){Yt=+Yt,Rt=+Rt,nr=(cr=arguments.length)<2?(Rt=Yt,Yt=0,1):cr<3?1:+nr;for(var ur=-1,cr=Math.max(0,Math.ceil((Rt-Yt)/nr))|0,Rr=new Array(cr);++ur0:b(Qr,Qr)===0)&&(nr=Rr,cr=Qr,ur=!0)}}else for(let cr of Yt)(ur?Rt(cr,nr)>0:Rt(cr,cr)===0)&&(nr=cr,ur=!0);return nr}function _r(Yt,Rt=b){if(Rt.length===1)return ve(Yt,Rt);let nr,ur=-1,cr=-1;for(let Rr of Yt)++cr,(ur<0?Rt(Rr,Rr)===0:Rt(Rr,nr)>0)&&(nr=Rr,ur=cr);return ur}function Xt(Yt,Rt){let nr=$t(Yt,Rt);return nr<0?void 0:nr}var or=Ot(Math.random);function Ot(Yt){return function(nr,ur=0,cr=nr.length){let Rr=cr-(ur=+ur);for(;Rr;){let Qr=Yt()*Rr--|0,Zr=nr[Rr+ur];nr[Rr+ur]=nr[Qr+ur],nr[Qr+ur]=Zr}return nr}}function vt(Yt,Rt){let nr=0;if(Rt===void 0)for(let ur of Yt)(ur=+ur)&&(nr+=ur);else{let ur=-1;for(let cr of Yt)(cr=+Rt(cr,++ur,Yt))&&(nr+=cr)}return nr}function ht(Yt){if(!(Rr=Yt.length))return[];for(var Rt=-1,nr=Se(Yt,De),ur=new Array(nr);++RtRt(nr,ur,Yt))}function Mt(Yt,Rt,nr){if(typeof Rt!="function")throw new TypeError("reducer is not a function");let ur=Yt[Symbol.iterator](),cr,Rr,Qr=-1;if(arguments.length<3){if({done:cr,value:nr}=ur.next(),cr)return;++Qr}for(;{done:cr,value:Rr}=ur.next(),!cr;)nr=Rt(nr,Rr,++Qr,Yt);return nr}function pt(Yt){if(typeof Yt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(Yt).reverse()}function Pt(Yt,...Rt){Yt=new Set(Yt);for(let nr of Rt)for(let ur of nr)Yt.delete(ur);return Yt}function Ct(Yt,Rt){let nr=Rt[Symbol.iterator](),ur=new Set;for(let cr of Yt){if(ur.has(cr))return!1;let Rr,Qr;for(;({value:Rr,done:Qr}=nr.next())&&!Qr;){if(Object.is(cr,Rr))return!1;ur.add(Rr)}}return!0}function qt(Yt){return Yt instanceof Set?Yt:new Set(Yt)}function Vt(Yt,...Rt){Yt=new Set(Yt),Rt=Rt.map(qt);e:for(let nr of Yt)for(let ur of Rt)if(!ur.has(nr)){Yt.delete(nr);continue e}return Yt}function Ht(Yt,Rt){let nr=Yt[Symbol.iterator](),ur=new Set;for(let cr of Rt){if(ur.has(cr))continue;let Rr,Qr;for(;{value:Rr,done:Qr}=nr.next();){if(Qr)return!1;if(ur.add(Rr),Object.is(cr,Rr))break}}return!0}function Sr(Yt,Rt){return Ht(Rt,Yt)}function Kr(...Yt){let Rt=new Set;for(let nr of Yt)for(let ur of nr)Rt.add(ur);return Rt}p.Adder=C,p.InternMap=h,p.InternSet=u,p.ascending=b,p.bin=we,p.bisect=n,p.bisectCenter=a,p.bisectLeft=r,p.bisectRight=n,p.bisector=E,p.count=o,p.cross=v,p.cumsum=m,p.descending=i,p.deviation=S,p.difference=Pt,p.disjoint=Ct,p.every=We,p.extent=M,p.fcumsum=w,p.filter=Je,p.fsum=_,p.greatest=rr,p.greatestIndex=_r,p.group=D,p.groupSort=se,p.groups=B,p.histogram=we,p.index=j,p.indexes=U,p.intersection=Vt,p.least=At,p.leastIndex=$t,p.map=et,p.max=Me,p.maxIndex=ve,p.mean=le,p.median=Ae,p.merge=Xe,p.min=Se,p.minIndex=Ye,p.nice=he,p.pairs=yt,p.permute=re,p.quantile=qe,p.quantileSorted=ke,p.quickselect=Ie,p.range=Tt,p.reduce=Mt,p.reverse=pt,p.rollup=F,p.rollups=P,p.scan=Xt,p.shuffle=or,p.shuffler=Ot,p.some=Ke,p.sort=ne,p.subset=Sr,p.sum=vt,p.superset=Ht,p.thresholdFreedmanDiaconis=_e,p.thresholdScott=ue,p.thresholdSturges=xe,p.tickIncrement=ee,p.tickStep=ae,p.ticks=W,p.transpose=ht,p.union=Kr,p.variance=T,p.zip=Ne,Object.defineProperty(p,"__esModule",{value:!0})})}}),kV=ze({"node_modules/d3-path/dist/d3-path.js"(J,G){(function(p,b){typeof J=="object"&&typeof G<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";var b=Math.PI,E=2*b,k=1e-6,l=E-k;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function t(){return new e}e.prototype=t.prototype={constructor:e,moveTo:function(n,r){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+r)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(n,r){this._+="L"+(this._x1=+n)+","+(this._y1=+r)},quadraticCurveTo:function(n,r,a,o){this._+="Q"+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+o)},bezierCurveTo:function(n,r,a,o,s,c){this._+="C"+ +n+","+ +r+","+ +a+","+ +o+","+(this._x1=+s)+","+(this._y1=+c)},arcTo:function(n,r,a,o,s){n=+n,r=+r,a=+a,o=+o,s=+s;var c=this._x1,g=this._y1,f=a-n,v=o-r,m=c-n,i=g-r,T=m*m+i*i;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=n)+","+(this._y1=r);else if(T>k)if(!(Math.abs(i*f-v*m)>k)||!s)this._+="L"+(this._x1=n)+","+(this._y1=r);else{var S=a-c,M=o-g,C=f*f+v*v,_=S*S+M*M,w=Math.sqrt(C),h=Math.sqrt(T),u=s*Math.tan((b-Math.acos((C+T-_)/(2*w*h)))/2),A=u/h,x=u/w;Math.abs(A-1)>k&&(this._+="L"+(n+A*m)+","+(r+A*i)),this._+="A"+s+","+s+",0,0,"+ +(i*S>m*M)+","+(this._x1=n+x*f)+","+(this._y1=r+x*v)}},arc:function(n,r,a,o,s,c){n=+n,r=+r,a=+a,c=!!c;var g=a*Math.cos(o),f=a*Math.sin(o),v=n+g,m=r+f,i=1^c,T=c?o-s:s-o;if(a<0)throw new Error("negative radius: "+a);this._x1===null?this._+="M"+v+","+m:(Math.abs(this._x1-v)>k||Math.abs(this._y1-m)>k)&&(this._+="L"+v+","+m),a&&(T<0&&(T=T%E+E),T>l?this._+="A"+a+","+a+",0,1,"+i+","+(n-g)+","+(r-f)+"A"+a+","+a+",0,1,"+i+","+(this._x1=v)+","+(this._y1=m):T>k&&(this._+="A"+a+","+a+",0,"+ +(T>=b)+","+i+","+(this._x1=n+a*Math.cos(s))+","+(this._y1=r+a*Math.sin(s))))},rect:function(n,r,a,o){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+r)+"h"+ +a+"v"+ +o+"h"+-a+"Z"},toString:function(){return this._}},p.path=t,Object.defineProperty(p,"__esModule",{value:!0})})}}),BM=ze({"node_modules/d3-shape/dist/d3-shape.js"(J,G){(function(p,b){typeof J=="object"&&typeof G<"u"?b(J,kV()):(p=p||self,b(p.d3=p.d3||{},p.d3))})(J,function(p,b){"use strict";function E(ot){return function(){return ot}}var k=Math.abs,l=Math.atan2,e=Math.cos,t=Math.max,n=Math.min,r=Math.sin,a=Math.sqrt,o=1e-12,s=Math.PI,c=s/2,g=2*s;function f(ot){return ot>1?0:ot<-1?s:Math.acos(ot)}function v(ot){return ot>=1?c:ot<=-1?-c:Math.asin(ot)}function m(ot){return ot.innerRadius}function i(ot){return ot.outerRadius}function T(ot){return ot.startAngle}function S(ot){return ot.endAngle}function M(ot){return ot&&ot.padAngle}function C(ot,kt,jt,ar,Er,xr,zr,Lr){var aa=jt-ot,Sa=ar-kt,wa=zr-Er,pn=Lr-xr,tn=pn*aa-wa*Sa;if(!(tn*tnHi*Hi+Mi*Mi&&(gi=io,qi=oo),{cx:gi,cy:qi,x01:-wa,y01:-pn,x11:gi*(Er/jn-1),y11:qi*(Er/jn-1)}}function w(){var ot=m,kt=i,jt=E(0),ar=null,Er=T,xr=S,zr=M,Lr=null;function aa(){var Sa,wa,pn=+ot.apply(this,arguments),tn=+kt.apply(this,arguments),ai=Er.apply(this,arguments)-c,rn=xr.apply(this,arguments)-c,Ri=k(rn-ai),Gn=rn>ai;if(Lr||(Lr=Sa=b.path()),tno))Lr.moveTo(0,0);else if(Ri>g-o)Lr.moveTo(tn*e(ai),tn*r(ai)),Lr.arc(0,0,tn,ai,rn,!Gn),pn>o&&(Lr.moveTo(pn*e(rn),pn*r(rn)),Lr.arc(0,0,pn,rn,ai,Gn));else{var no=ai,Di=rn,fn=ai,Ai=rn,jn=Ri,Xn=Ri,eo=zr.apply(this,arguments)/2,gi=eo>o&&(ar?+ar.apply(this,arguments):a(pn*pn+tn*tn)),qi=n(k(tn-pn)/2,+jt.apply(this,arguments)),io=qi,oo=qi,Vn,qn;if(gi>o){var Hi=v(gi/pn*r(eo)),Mi=v(gi/tn*r(eo));(jn-=Hi*2)>o?(Hi*=Gn?1:-1,fn+=Hi,Ai-=Hi):(jn=0,fn=Ai=(ai+rn)/2),(Xn-=Mi*2)>o?(Mi*=Gn?1:-1,no+=Mi,Di-=Mi):(Xn=0,no=Di=(ai+rn)/2)}var Ro=tn*e(no),go=tn*r(no),Eo=pn*e(Ai),Ao=pn*r(Ai);if(qi>o){var ds=tn*e(Di),jo=tn*r(Di),Wo=pn*e(fn),to=pn*r(fn),wo;if(Rio?oo>o?(Vn=_(Wo,to,Ro,go,tn,oo,Gn),qn=_(ds,jo,Eo,Ao,tn,oo,Gn),Lr.moveTo(Vn.cx+Vn.x01,Vn.cy+Vn.y01),ooo)||!(jn>o)?Lr.lineTo(Eo,Ao):io>o?(Vn=_(Eo,Ao,ds,jo,pn,-io,Gn),qn=_(Ro,go,Wo,to,pn,-io,Gn),Lr.lineTo(Vn.cx+Vn.x01,Vn.cy+Vn.y01),io=tn;--ai)Lr.point(Di[ai],fn[ai]);Lr.lineEnd(),Lr.areaEnd()}Gn&&(Di[pn]=+ot(Ri,pn,wa),fn[pn]=+jt(Ri,pn,wa),Lr.point(kt?+kt(Ri,pn,wa):Di[pn],ar?+ar(Ri,pn,wa):fn[pn]))}if(no)return Lr=null,no+""||null}function Sa(){return z().defined(Er).curve(zr).context(xr)}return aa.x=function(wa){return arguments.length?(ot=typeof wa=="function"?wa:E(+wa),kt=null,aa):ot},aa.x0=function(wa){return arguments.length?(ot=typeof wa=="function"?wa:E(+wa),aa):ot},aa.x1=function(wa){return arguments.length?(kt=wa==null?null:typeof wa=="function"?wa:E(+wa),aa):kt},aa.y=function(wa){return arguments.length?(jt=typeof wa=="function"?wa:E(+wa),ar=null,aa):jt},aa.y0=function(wa){return arguments.length?(jt=typeof wa=="function"?wa:E(+wa),aa):jt},aa.y1=function(wa){return arguments.length?(ar=wa==null?null:typeof wa=="function"?wa:E(+wa),aa):ar},aa.lineX0=aa.lineY0=function(){return Sa().x(ot).y(jt)},aa.lineY1=function(){return Sa().x(ot).y(ar)},aa.lineX1=function(){return Sa().x(kt).y(jt)},aa.defined=function(wa){return arguments.length?(Er=typeof wa=="function"?wa:E(!!wa),aa):Er},aa.curve=function(wa){return arguments.length?(zr=wa,xr!=null&&(Lr=zr(xr)),aa):zr},aa.context=function(wa){return arguments.length?(wa==null?xr=Lr=null:Lr=zr(xr=wa),aa):xr},aa}function O(ot,kt){return ktot?1:kt>=ot?0:NaN}function D(ot){return ot}function B(){var ot=D,kt=O,jt=null,ar=E(0),Er=E(g),xr=E(0);function zr(Lr){var aa,Sa=Lr.length,wa,pn,tn=0,ai=new Array(Sa),rn=new Array(Sa),Ri=+ar.apply(this,arguments),Gn=Math.min(g,Math.max(-g,Er.apply(this,arguments)-Ri)),no,Di=Math.min(Math.abs(Gn)/Sa,xr.apply(this,arguments)),fn=Di*(Gn<0?-1:1),Ai;for(aa=0;aa0&&(tn+=Ai);for(kt!=null?ai.sort(function(jn,Xn){return kt(rn[jn],rn[Xn])}):jt!=null&&ai.sort(function(jn,Xn){return jt(Lr[jn],Lr[Xn])}),aa=0,pn=tn?(Gn-Sa*fn)/tn:0;aa0?Ai*pn:0)+fn,rn[wa]={data:Lr[wa],index:aa,value:Ai,startAngle:Ri,endAngle:no,padAngle:Di};return rn}return zr.value=function(Lr){return arguments.length?(ot=typeof Lr=="function"?Lr:E(+Lr),zr):ot},zr.sortValues=function(Lr){return arguments.length?(kt=Lr,jt=null,zr):kt},zr.sort=function(Lr){return arguments.length?(jt=Lr,kt=null,zr):jt},zr.startAngle=function(Lr){return arguments.length?(ar=typeof Lr=="function"?Lr:E(+Lr),zr):ar},zr.endAngle=function(Lr){return arguments.length?(Er=typeof Lr=="function"?Lr:E(+Lr),zr):Er},zr.padAngle=function(Lr){return arguments.length?(xr=typeof Lr=="function"?Lr:E(+Lr),zr):xr},zr}var F=j(u);function P(ot){this._curve=ot}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(ot,kt){this._curve.point(kt*Math.sin(ot),kt*-Math.cos(ot))}};function j(ot){function kt(jt){return new P(ot(jt))}return kt._curve=ot,kt}function U(ot){var kt=ot.curve;return ot.angle=ot.x,delete ot.x,ot.radius=ot.y,delete ot.y,ot.curve=function(jt){return arguments.length?kt(j(jt)):kt()._curve},ot}function $(){return U(z().curve(F))}function Q(){var ot=I().curve(F),kt=ot.curve,jt=ot.lineX0,ar=ot.lineX1,Er=ot.lineY0,xr=ot.lineY1;return ot.angle=ot.x,delete ot.x,ot.startAngle=ot.x0,delete ot.x0,ot.endAngle=ot.x1,delete ot.x1,ot.radius=ot.y,delete ot.y,ot.innerRadius=ot.y0,delete ot.y0,ot.outerRadius=ot.y1,delete ot.y1,ot.lineStartAngle=function(){return U(jt())},delete ot.lineX0,ot.lineEndAngle=function(){return U(ar())},delete ot.lineX1,ot.lineInnerRadius=function(){return U(Er())},delete ot.lineY0,ot.lineOuterRadius=function(){return U(xr())},delete ot.lineY1,ot.curve=function(zr){return arguments.length?kt(j(zr)):kt()._curve},ot}function re(ot,kt){return[(kt=+kt)*Math.cos(ot-=Math.PI/2),kt*Math.sin(ot)]}var ne=Array.prototype.slice;function se(ot){return ot.source}function V(ot){return ot.target}function Z(ot){var kt=se,jt=V,ar=A,Er=x,xr=null;function zr(){var Lr,aa=ne.call(arguments),Sa=kt.apply(this,aa),wa=jt.apply(this,aa);if(xr||(xr=Lr=b.path()),ot(xr,+ar.apply(this,(aa[0]=Sa,aa)),+Er.apply(this,aa),+ar.apply(this,(aa[0]=wa,aa)),+Er.apply(this,aa)),Lr)return xr=null,Lr+""||null}return zr.source=function(Lr){return arguments.length?(kt=Lr,zr):kt},zr.target=function(Lr){return arguments.length?(jt=Lr,zr):jt},zr.x=function(Lr){return arguments.length?(ar=typeof Lr=="function"?Lr:E(+Lr),zr):ar},zr.y=function(Lr){return arguments.length?(Er=typeof Lr=="function"?Lr:E(+Lr),zr):Er},zr.context=function(Lr){return arguments.length?(xr=Lr??null,zr):xr},zr}function K(ot,kt,jt,ar,Er){ot.moveTo(kt,jt),ot.bezierCurveTo(kt=(kt+ar)/2,jt,kt,Er,ar,Er)}function H(ot,kt,jt,ar,Er){ot.moveTo(kt,jt),ot.bezierCurveTo(kt,jt=(jt+Er)/2,ar,jt,ar,Er)}function X(ot,kt,jt,ar,Er){var xr=re(kt,jt),zr=re(kt,jt=(jt+Er)/2),Lr=re(ar,jt),aa=re(ar,Er);ot.moveTo(xr[0],xr[1]),ot.bezierCurveTo(zr[0],zr[1],Lr[0],Lr[1],aa[0],aa[1])}function q(){return Z(K)}function W(){return Z(H)}function ee(){var ot=Z(X);return ot.angle=ot.x,delete ot.x,ot.radius=ot.y,delete ot.y,ot}var ae={draw:function(ot,kt){var jt=Math.sqrt(kt/s);ot.moveTo(jt,0),ot.arc(0,0,jt,0,g)}},he={draw:function(ot,kt){var jt=Math.sqrt(kt/5)/2;ot.moveTo(-3*jt,-jt),ot.lineTo(-jt,-jt),ot.lineTo(-jt,-3*jt),ot.lineTo(jt,-3*jt),ot.lineTo(jt,-jt),ot.lineTo(3*jt,-jt),ot.lineTo(3*jt,jt),ot.lineTo(jt,jt),ot.lineTo(jt,3*jt),ot.lineTo(-jt,3*jt),ot.lineTo(-jt,jt),ot.lineTo(-3*jt,jt),ot.closePath()}},xe=Math.sqrt(1/3),we=xe*2,Me={draw:function(ot,kt){var jt=Math.sqrt(kt/we),ar=jt*xe;ot.moveTo(0,-jt),ot.lineTo(ar,0),ot.lineTo(0,jt),ot.lineTo(-ar,0),ot.closePath()}},Se=.8908130915292852,Ie=Math.sin(s/10)/Math.sin(7*s/10),Ge=Math.sin(g/10)*Ie,qe=-Math.cos(g/10)*Ie,ke={draw:function(ot,kt){var jt=Math.sqrt(kt*Se),ar=Ge*jt,Er=qe*jt;ot.moveTo(0,-jt),ot.lineTo(ar,Er);for(var xr=1;xr<5;++xr){var zr=g*xr/5,Lr=Math.cos(zr),aa=Math.sin(zr);ot.lineTo(aa*jt,-Lr*jt),ot.lineTo(Lr*ar-aa*Er,aa*ar+Lr*Er)}ot.closePath()}},_e={draw:function(ot,kt){var jt=Math.sqrt(kt),ar=-jt/2;ot.rect(ar,ar,jt,jt)}},ue=Math.sqrt(3),ve={draw:function(ot,kt){var jt=-Math.sqrt(kt/(ue*3));ot.moveTo(0,jt*2),ot.lineTo(-ue*jt,-jt),ot.lineTo(ue*jt,-jt),ot.closePath()}},le=-.5,Ae=Math.sqrt(3)/2,Be=1/Math.sqrt(12),Xe=(Be/2+1)*3,Ye={draw:function(ot,kt){var jt=Math.sqrt(kt/Xe),ar=jt/2,Er=jt*Be,xr=ar,zr=jt*Be+jt,Lr=-xr,aa=zr;ot.moveTo(ar,Er),ot.lineTo(xr,zr),ot.lineTo(Lr,aa),ot.lineTo(le*ar-Ae*Er,Ae*ar+le*Er),ot.lineTo(le*xr-Ae*zr,Ae*xr+le*zr),ot.lineTo(le*Lr-Ae*aa,Ae*Lr+le*aa),ot.lineTo(le*ar+Ae*Er,le*Er-Ae*ar),ot.lineTo(le*xr+Ae*zr,le*zr-Ae*xr),ot.lineTo(le*Lr+Ae*aa,le*aa-Ae*Lr),ot.closePath()}},yt=[ae,he,Me,_e,ke,ve,Ye];function gt(){var ot=E(ae),kt=E(64),jt=null;function ar(){var Er;if(jt||(jt=Er=b.path()),ot.apply(this,arguments).draw(jt,+kt.apply(this,arguments)),Er)return jt=null,Er+""||null}return ar.type=function(Er){return arguments.length?(ot=typeof Er=="function"?Er:E(Er),ar):ot},ar.size=function(Er){return arguments.length?(kt=typeof Er=="function"?Er:E(+Er),ar):kt},ar.context=function(Er){return arguments.length?(jt=Er??null,ar):jt},ar}function Tt(){}function At(ot,kt,jt){ot._context.bezierCurveTo((2*ot._x0+ot._x1)/3,(2*ot._y0+ot._y1)/3,(ot._x0+2*ot._x1)/3,(ot._y0+2*ot._y1)/3,(ot._x0+4*ot._x1+kt)/6,(ot._y0+4*ot._y1+jt)/6)}function $t(ot){this._context=ot}$t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:At(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function rr(ot){return new $t(ot)}function _r(ot){this._context=ot}_r.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._x2=ot,this._y2=kt;break;case 1:this._point=2,this._x3=ot,this._y3=kt;break;case 2:this._point=3,this._x4=ot,this._y4=kt,this._context.moveTo((this._x0+4*this._x1+ot)/6,(this._y0+4*this._y1+kt)/6);break;default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function Xt(ot){return new _r(ot)}function or(ot){this._context=ot}or.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var jt=(this._x0+4*this._x1+ot)/6,ar=(this._y0+4*this._y1+kt)/6;this._line?this._context.lineTo(jt,ar):this._context.moveTo(jt,ar);break;case 3:this._point=4;default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function Ot(ot){return new or(ot)}function vt(ot,kt){this._basis=new $t(ot),this._beta=kt}vt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var ot=this._x,kt=this._y,jt=ot.length-1;if(jt>0)for(var ar=ot[0],Er=kt[0],xr=ot[jt]-ar,zr=kt[jt]-Er,Lr=-1,aa;++Lr<=jt;)aa=Lr/jt,this._basis.point(this._beta*ot[Lr]+(1-this._beta)*(ar+aa*xr),this._beta*kt[Lr]+(1-this._beta)*(Er+aa*zr));this._x=this._y=null,this._basis.lineEnd()},point:function(ot,kt){this._x.push(+ot),this._y.push(+kt)}};var ht=function ot(kt){function jt(ar){return kt===1?new $t(ar):new vt(ar,kt)}return jt.beta=function(ar){return ot(+ar)},jt}(.85);function De(ot,kt,jt){ot._context.bezierCurveTo(ot._x1+ot._k*(ot._x2-ot._x0),ot._y1+ot._k*(ot._y2-ot._y0),ot._x2+ot._k*(ot._x1-kt),ot._y2+ot._k*(ot._y1-jt),ot._x2,ot._y2)}function Ne(ot,kt){this._context=ot,this._k=(1-kt)/6}Ne.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:De(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2,this._x1=ot,this._y1=kt;break;case 2:this._point=3;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var We=function ot(kt){function jt(ar){return new Ne(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function Ke(ot,kt){this._context=ot,this._k=(1-kt)/6}Ke.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._x3=ot,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=ot,this._y4=kt);break;case 2:this._point=3,this._x5=ot,this._y5=kt;break;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Je=function ot(kt){function jt(ar){return new Ke(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function et(ot,kt){this._context=ot,this._k=(1-kt)/6}et.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Mt=function ot(kt){function jt(ar){return new et(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function pt(ot,kt,jt){var ar=ot._x1,Er=ot._y1,xr=ot._x2,zr=ot._y2;if(ot._l01_a>o){var Lr=2*ot._l01_2a+3*ot._l01_a*ot._l12_a+ot._l12_2a,aa=3*ot._l01_a*(ot._l01_a+ot._l12_a);ar=(ar*Lr-ot._x0*ot._l12_2a+ot._x2*ot._l01_2a)/aa,Er=(Er*Lr-ot._y0*ot._l12_2a+ot._y2*ot._l01_2a)/aa}if(ot._l23_a>o){var Sa=2*ot._l23_2a+3*ot._l23_a*ot._l12_a+ot._l12_2a,wa=3*ot._l23_a*(ot._l23_a+ot._l12_a);xr=(xr*Sa+ot._x1*ot._l23_2a-kt*ot._l12_2a)/wa,zr=(zr*Sa+ot._y1*ot._l23_2a-jt*ot._l12_2a)/wa}ot._context.bezierCurveTo(ar,Er,xr,zr,ot._x2,ot._y2)}function Pt(ot,kt){this._context=ot,this._alpha=kt}Pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3;default:pt(this,ot,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Ct=function ot(kt){function jt(ar){return kt?new Pt(ar,kt):new Ne(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function qt(ot,kt){this._context=ot,this._alpha=kt}qt.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=ot,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=ot,this._y4=kt);break;case 2:this._point=3,this._x5=ot,this._y5=kt;break;default:pt(this,ot,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Vt=function ot(kt){function jt(ar){return kt?new qt(ar,kt):new Ke(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function Ht(ot,kt){this._context=ot,this._alpha=kt}Ht.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:pt(this,ot,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Sr=function ot(kt){function jt(ar){return kt?new Ht(ar,kt):new et(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function Kr(ot){this._context=ot}Kr.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(ot,kt){ot=+ot,kt=+kt,this._point?this._context.lineTo(ot,kt):(this._point=1,this._context.moveTo(ot,kt))}};function Yt(ot){return new Kr(ot)}function Rt(ot){return ot<0?-1:1}function nr(ot,kt,jt){var ar=ot._x1-ot._x0,Er=kt-ot._x1,xr=(ot._y1-ot._y0)/(ar||Er<0&&-0),zr=(jt-ot._y1)/(Er||ar<0&&-0),Lr=(xr*Er+zr*ar)/(ar+Er);return(Rt(xr)+Rt(zr))*Math.min(Math.abs(xr),Math.abs(zr),.5*Math.abs(Lr))||0}function ur(ot,kt){var jt=ot._x1-ot._x0;return jt?(3*(ot._y1-ot._y0)/jt-kt)/2:kt}function cr(ot,kt,jt){var ar=ot._x0,Er=ot._y0,xr=ot._x1,zr=ot._y1,Lr=(xr-ar)/3;ot._context.bezierCurveTo(ar+Lr,Er+Lr*kt,xr-Lr,zr-Lr*jt,xr,zr)}function Rr(ot){this._context=ot}Rr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:cr(this,this._t0,ur(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){var jt=NaN;if(ot=+ot,kt=+kt,!(ot===this._x1&&kt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3,cr(this,ur(this,jt=nr(this,ot,kt)),jt);break;default:cr(this,this._t0,jt=nr(this,ot,kt));break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt,this._t0=jt}}};function Qr(ot){this._context=new Zr(ot)}(Qr.prototype=Object.create(Rr.prototype)).point=function(ot,kt){Rr.prototype.point.call(this,kt,ot)};function Zr(ot){this._context=ot}Zr.prototype={moveTo:function(ot,kt){this._context.moveTo(kt,ot)},closePath:function(){this._context.closePath()},lineTo:function(ot,kt){this._context.lineTo(kt,ot)},bezierCurveTo:function(ot,kt,jt,ar,Er,xr){this._context.bezierCurveTo(kt,ot,ar,jt,xr,Er)}};function ha(ot){return new Rr(ot)}function Pa(ot){return new Qr(ot)}function La(ot){this._context=ot}La.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var ot=this._x,kt=this._y,jt=ot.length;if(jt)if(this._line?this._context.lineTo(ot[0],kt[0]):this._context.moveTo(ot[0],kt[0]),jt===2)this._context.lineTo(ot[1],kt[1]);else for(var ar=un(ot),Er=un(kt),xr=0,zr=1;zr=0;--kt)Er[kt]=(zr[kt]-Er[kt+1])/xr[kt];for(xr[jt-1]=(ot[jt]+Er[jt-1])/2,kt=0;kt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,kt),this._context.lineTo(ot,kt);else{var jt=this._x*(1-this._t)+ot*this._t;this._context.lineTo(jt,this._y),this._context.lineTo(jt,kt)}break}}this._x=ot,this._y=kt}};function Nn(ot){return new ja(ot,.5)}function yn(ot){return new ja(ot,0)}function Un(ot){return new ja(ot,1)}function li(ot,kt){if((zr=ot.length)>1)for(var jt=1,ar,Er,xr=ot[kt[0]],zr,Lr=xr.length;jt=0;)jt[kt]=kt;return jt}function on(ot,kt){return ot[kt]}function en(){var ot=E([]),kt=Yn,jt=li,ar=on;function Er(xr){var zr=ot.apply(this,arguments),Lr,aa=xr.length,Sa=zr.length,wa=new Array(Sa),pn;for(Lr=0;Lr0){for(var jt,ar,Er=0,xr=ot[0].length,zr;Er0)for(var jt,ar=0,Er,xr,zr,Lr,aa,Sa=ot[kt[0]].length;ar0?(Er[0]=zr,Er[1]=zr+=xr):xr<0?(Er[1]=Lr,Er[0]=Lr+=xr):(Er[0]=0,Er[1]=xr)}function Ja(ot,kt){if((Er=ot.length)>0){for(var jt=0,ar=ot[kt[0]],Er,xr=ar.length;jt0)||!((xr=(Er=ot[kt[0]]).length)>0))){for(var jt=0,ar=1,Er,xr,zr;arxr&&(xr=Er,jt=kt);return jt}function fr(ot){var kt=ot.map(lr);return Yn(ot).sort(function(jt,ar){return kt[jt]-kt[ar]})}function lr(ot){for(var kt=0,jt=-1,ar=ot.length,Er;++jt[I(Ge,qe,Me),Ge]));for(let[Ge,qe]of Se.entries()){qe.index=Ge;let{source:ke,target:_e}=qe;typeof ke!="object"&&(ke=qe.source=m(Ie,ke)),typeof _e!="object"&&(_e=qe.target=m(Ie,_e)),ke.sourceLinks.push(qe),_e.targetLinks.push(qe)}if(B!=null)for(let{sourceLinks:Ge,targetLinks:qe}of Me)Ge.sort(B),qe.sort(B)}function re({nodes:Me}){for(let Se of Me)Se.value=Se.fixedValue===void 0?Math.max(b.sum(Se.sourceLinks,c),b.sum(Se.targetLinks,c)):Se.fixedValue}function ne({nodes:Me}){let Se=Me.length,Ie=new Set(Me),Ge=new Set,qe=0;for(;Ie.size;){for(let ke of Ie){ke.depth=qe;for(let{target:_e}of ke.sourceLinks)Ge.add(_e)}if(++qe>Se)throw new Error("circular link");Ie=Ge,Ge=new Set}}function se({nodes:Me}){let Se=Me.length,Ie=new Set(Me),Ge=new Set,qe=0;for(;Ie.size;){for(let ke of Ie){ke.height=qe;for(let{source:_e}of ke.targetLinks)Ge.add(_e)}if(++qe>Se)throw new Error("circular link");Ie=Ge,Ge=new Set}}function V({nodes:Me}){let Se=b.max(Me,qe=>qe.depth)+1,Ie=(h-_-A)/(Se-1),Ge=new Array(Se);for(let qe of Me){let ke=Math.max(0,Math.min(Se-1,Math.floor(O.call(null,qe,Se))));qe.layer=ke,qe.x0=_+ke*Ie,qe.x1=qe.x0+A,Ge[ke]?Ge[ke].push(qe):Ge[ke]=[qe]}if(D)for(let qe of Ge)qe.sort(D);return Ge}function Z(Me){let Se=b.min(Me,Ie=>(u-w-(Ie.length-1)*z)/b.sum(Ie,c));for(let Ie of Me){let Ge=w;for(let qe of Ie){qe.y0=Ge,qe.y1=Ge+qe.value*Se,Ge=qe.y1+z;for(let ke of qe.sourceLinks)ke.width=ke.value*Se}Ge=(u-Ge+z)/(Ie.length+1);for(let qe=0;qeIe.length)-1)),Z(Se);for(let Ie=0;Ie0))continue;let le=(ue/ve-_e.y0)*Se;_e.y0+=le,_e.y1+=le,ae(_e)}D===void 0&&ke.sort(s),q(ke,Ie)}}function X(Me,Se,Ie){for(let Ge=Me.length,qe=Ge-2;qe>=0;--qe){let ke=Me[qe];for(let _e of ke){let ue=0,ve=0;for(let{target:Ae,value:Be}of _e.sourceLinks){let Xe=Be*(Ae.layer-_e.layer);ue+=we(_e,Ae)*Xe,ve+=Xe}if(!(ve>0))continue;let le=(ue/ve-_e.y0)*Se;_e.y0+=le,_e.y1+=le,ae(_e)}D===void 0&&ke.sort(s),q(ke,Ie)}}function q(Me,Se){let Ie=Me.length>>1,Ge=Me[Ie];ee(Me,Ge.y0-z,Ie-1,Se),W(Me,Ge.y1+z,Ie+1,Se),ee(Me,u,Me.length-1,Se),W(Me,w,0,Se)}function W(Me,Se,Ie,Ge){for(;Ie1e-6&&(qe.y0+=ke,qe.y1+=ke),Se=qe.y1+z}}function ee(Me,Se,Ie,Ge){for(;Ie>=0;--Ie){let qe=Me[Ie],ke=(qe.y1-Se)*Ge;ke>1e-6&&(qe.y0-=ke,qe.y1-=ke),Se=qe.y0-z}}function ae({sourceLinks:Me,targetLinks:Se}){if(B===void 0){for(let{source:{sourceLinks:Ie}}of Se)Ie.sort(o);for(let{target:{targetLinks:Ie}}of Me)Ie.sort(a)}}function he(Me){if(B===void 0)for(let{sourceLinks:Se,targetLinks:Ie}of Me)Se.sort(o),Ie.sort(a)}function xe(Me,Se){let Ie=Me.y0-(Me.sourceLinks.length-1)*z/2;for(let{target:Ge,width:qe}of Me.sourceLinks){if(Ge===Se)break;Ie+=qe+z}for(let{source:Ge,width:qe}of Se.targetLinks){if(Ge===Me)break;Ie-=qe}return Ie}function we(Me,Se){let Ie=Se.y0-(Se.targetLinks.length-1)*z/2;for(let{source:Ge,width:qe}of Se.targetLinks){if(Ge===Me)break;Ie+=qe+z}for(let{target:Ge,width:qe}of Me.sourceLinks){if(Ge===Se)break;Ie-=qe}return Ie}return $}function S(_){return[_.source.x1,_.y0]}function M(_){return[_.target.x0,_.y1]}function C(){return E.linkHorizontal().source(S).target(M)}p.sankey=T,p.sankeyCenter=n,p.sankeyJustify=t,p.sankeyLeft=l,p.sankeyLinkHorizontal=C,p.sankeyRight=e,Object.defineProperty(p,"__esModule",{value:!0})})}}),LV=ze({"node_modules/@plotly/d3-sankey-circular/node_modules/d3-array/dist/d3-array.js"(J,G){(function(p,b){b(typeof J=="object"&&typeof G<"u"?J:p.d3=p.d3||{})})(J,function(p){"use strict";function b(K,H){return KH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,X,q,W){for(q==null&&(q=0),W==null&&(W=H.length);q>>1;K(H[ee],X)<0?q=ee+1:W=ee}return q},right:function(H,X,q,W){for(q==null&&(q=0),W==null&&(W=H.length);q>>1;K(H[ee],X)>0?W=ee:q=ee+1}return q}}}function k(K){return function(H,X){return b(K(H),X)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var X=0,q=K.length-1,W=K[0],ee=new Array(q<0?0:q);XK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var X=K.length,q=0,W=-1,ee=0,ae,he,xe=0;if(H==null)for(;++W1)return xe/(q-1)}function g(K,H){var X=c(K,H);return X&&Math.sqrt(X)}function f(K,H){var X=K.length,q=-1,W,ee,ae;if(H==null){for(;++q=W)for(ee=ae=W;++qW&&(ee=W),ae=W)for(ee=ae=W;++qW&&(ee=W),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++W=0?(ee>=C?10:ee>=_?5:ee>=w?2:1)*Math.pow(10,W):-Math.pow(10,-W)/(ee>=C?10:ee>=_?5:ee>=w?2:1)}function A(K,H,X){var q=Math.abs(H-K)/Math.max(0,X),W=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/W;return ee>=C?W*=10:ee>=_?W*=5:ee>=w&&(W*=2),HSe;)Ie.pop(),--Ge;var qe=new Array(Ge+1),ke;for(ee=0;ee<=Ge;++ee)ke=qe[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+X(K[q-1],q-1,K);var q,W=(q-1)*H,ee=Math.floor(W),ae=+X(K[ee],ee,K),he=+X(K[ee+1],ee+1,K);return ae+(he-ae)*(W-ee)}}function O(K,H,X){return K=i.call(K,s).sort(b),Math.ceil((X-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,X){return Math.ceil((X-H)/(3.5*g(K)*Math.pow(K.length,-1/3)))}function B(K,H){var X=K.length,q=-1,W,ee;if(H==null){for(;++q=W)for(ee=W;++qee&&(ee=W)}else for(;++q=W)for(ee=W;++qee&&(ee=W);return ee}function F(K,H){var X=K.length,q=X,W=-1,ee,ae=0;if(H==null)for(;++W=0;)for(ae=K[H],X=ae.length;--X>=0;)ee[--W]=ae[X];return ee}function U(K,H){var X=K.length,q=-1,W,ee;if(H==null){for(;++q=W)for(ee=W;++qW&&(ee=W)}else for(;++q=W)for(ee=W;++qW&&(ee=W);return ee}function $(K,H){for(var X=H.length,q=new Array(X);X--;)q[X]=K[H[X]];return q}function Q(K,H){if(X=K.length){var X,q=0,W=0,ee,ae=K[W];for(H==null&&(H=b);++q=M})}function f(M){g(M);for(var C=E,_=p(C),w=_.components.filter(function(O){return O.length>1}),h=1/0,u,A=0;A"u"?"undefined":s(Ne))!=="object"&&(Ne=ht.source=_(vt,Ne)),(typeof We>"u"?"undefined":s(We))!=="object"&&(We=ht.target=_(vt,We)),Ne.sourceLinks.push(ht),We.targetLinks.push(ht)}),Ot}function At(Ot){Ot.nodes.forEach(function(vt){vt.partOfCycle=!1,vt.value=Math.max(b.sum(vt.sourceLinks,v),b.sum(vt.targetLinks,v)),vt.sourceLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)}),vt.targetLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)})})}function $t(Ot){var vt=0,ht=0,De=0,Ne=0,We=b.max(Ot.nodes,function(Ke){return Ke.column});return Ot.links.forEach(function(Ke){Ke.circular&&(Ke.circularLinkType=="top"?vt=vt+Ke.width:ht=ht+Ke.width,Ke.target.column==0&&(Ne=Ne+Ke.width),Ke.source.column==We&&(De=De+Ke.width))}),vt=vt>0?vt+h+u:vt,ht=ht>0?ht+h+u:ht,De=De>0?De+h+u:De,Ne=Ne>0?Ne+h+u:Ne,{top:vt,bottom:ht,left:Ne,right:De}}function rr(Ot,vt){var ht=b.max(Ot.nodes,function(Mt){return Mt.column}),De=Ge-Se,Ne=qe-Ie,We=De+vt.right+vt.left,Ke=Ne+vt.top+vt.bottom,Je=De/We,et=Ne/Ke;return Se=Se*Je+vt.left,Ge=vt.right==0?Ge:Ge*Je,Ie=Ie*et+vt.top,qe=qe*et,Ot.nodes.forEach(function(Mt){Mt.x0=Se+Mt.column*((Ge-Se-ke)/ht),Mt.x1=Mt.x0+ke}),et}function _r(Ot){var vt,ht,De;for(vt=Ot.nodes,ht=[],De=0;vt.length;++De,vt=ht,ht=[])vt.forEach(function(Ne){Ne.depth=De,Ne.sourceLinks.forEach(function(We){ht.indexOf(We.target)<0&&!We.circular&&ht.push(We.target)})});for(vt=Ot.nodes,ht=[],De=0;vt.length;++De,vt=ht,ht=[])vt.forEach(function(Ne){Ne.height=De,Ne.targetLinks.forEach(function(We){ht.indexOf(We.source)<0&&!We.circular&&ht.push(We.source)})});Ot.nodes.forEach(function(Ne){Ne.column=Math.floor(ve.call(null,Ne,De))})}function Xt(Ot,vt,ht){var De=E.nest().key(function(Mt){return Mt.column}).sortKeys(b.ascending).entries(Ot.nodes).map(function(Mt){return Mt.values});Ke(ht),et();for(var Ne=1,We=vt;We>0;--We)Je(Ne*=.99,ht),et();function Ke(Mt){if(Ye){var pt=1/0;De.forEach(function(Vt){var Ht=qe*Ye/(Vt.length+1);pt=Ht0))if(Vt==0&&qt==1)Sr=Ht.y1-Ht.y0,Ht.y0=qe/2-Sr/2,Ht.y1=qe/2+Sr/2;else if(Vt==Pt-1&&qt==1)Sr=Ht.y1-Ht.y0,Ht.y0=qe/2-Sr/2,Ht.y1=qe/2+Sr/2;else{var Kr=0,Yt=b.mean(Ht.sourceLinks,T),Rt=b.mean(Ht.targetLinks,i);Yt&&Rt?Kr=(Yt+Rt)/2:Kr=Yt||Rt;var nr=(Kr-m(Ht))*Mt;Ht.y0+=nr,Ht.y1+=nr}})})}function et(){De.forEach(function(Mt){var pt,Pt,Ct=Ie,qt=Mt.length,Vt;for(Mt.sort(f),Vt=0;Vt0&&(pt.y0+=Pt,pt.y1+=Pt),Ct=pt.y1+_e;if(Pt=Ct-_e-qe,Pt>0)for(Ct=pt.y0-=Pt,pt.y1-=Pt,Vt=qt-2;Vt>=0;--Vt)pt=Mt[Vt],Pt=pt.y1+_e-Ct,Pt>0&&(pt.y0-=Pt,pt.y1-=Pt),Ct=pt.y0})}}function or(Ot){Ot.nodes.forEach(function(vt){vt.sourceLinks.sort(g),vt.targetLinks.sort(c)}),Ot.nodes.forEach(function(vt){var ht=vt.y0,De=ht,Ne=vt.y1,We=Ne;vt.sourceLinks.forEach(function(Ke){Ke.circular?(Ke.y0=Ne-Ke.width/2,Ne=Ne-Ke.width):(Ke.y0=ht+Ke.width/2,ht+=Ke.width)}),vt.targetLinks.forEach(function(Ke){Ke.circular?(Ke.y1=We-Ke.width/2,We=We-Ke.width):(Ke.y1=De+Ke.width/2,De+=Ke.width)})})}return gt}function z(Se,Ie,Ge){var qe=0;if(Ge===null){for(var ke=[],_e=0;_eIe.source.column)}function B(Se,Ie){var Ge=0;Se.sourceLinks.forEach(function(ke){Ge=ke.circular&&!we(ke,Ie)?Ge+1:Ge});var qe=0;return Se.targetLinks.forEach(function(ke){qe=ke.circular&&!we(ke,Ie)?qe+1:qe}),Ge+qe}function F(Se){var Ie=Se.source.sourceLinks,Ge=0;Ie.forEach(function(_e){Ge=_e.circular?Ge+1:Ge});var qe=Se.target.targetLinks,ke=0;return qe.forEach(function(_e){ke=_e.circular?ke+1:ke}),!(Ge>1||ke>1)}function P(Se,Ie,Ge){return Se.sort($),Se.forEach(function(qe,ke){var _e=0;if(we(qe,Ge)&&F(qe))qe.circularPathData.verticalBuffer=_e+qe.width/2;else{var ue=0;for(ue;ue_e?ve:_e}qe.circularPathData.verticalBuffer=_e+qe.width/2}}),Se}function j(Se,Ie,Ge,qe){var ke=5,_e=b.min(Se.links,function(le){return le.source.y0});Se.links.forEach(function(le){le.circular&&(le.circularPathData={})});var ue=Se.links.filter(function(le){return le.circularLinkType=="top"});P(ue,Ie,qe);var ve=Se.links.filter(function(le){return le.circularLinkType=="bottom"});P(ve,Ie,qe),Se.links.forEach(function(le){if(le.circular){if(le.circularPathData.arcRadius=le.width+u,le.circularPathData.leftNodeBuffer=ke,le.circularPathData.rightNodeBuffer=ke,le.circularPathData.sourceWidth=le.source.x1-le.source.x0,le.circularPathData.sourceX=le.source.x0+le.circularPathData.sourceWidth,le.circularPathData.targetX=le.target.x0,le.circularPathData.sourceY=le.y0,le.circularPathData.targetY=le.y1,we(le,qe)&&F(le))le.circularPathData.leftSmallArcRadius=u+le.width/2,le.circularPathData.leftLargeArcRadius=u+le.width/2,le.circularPathData.rightSmallArcRadius=u+le.width/2,le.circularPathData.rightLargeArcRadius=u+le.width/2,le.circularLinkType=="bottom"?(le.circularPathData.verticalFullExtent=le.source.y1+h+le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.rightLargeArcRadius):(le.circularPathData.verticalFullExtent=le.source.y0-h-le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.rightLargeArcRadius);else{var Ae=le.source.column,Be=le.circularLinkType,Xe=Se.links.filter(function(gt){return gt.source.column==Ae&>.circularLinkType==Be});le.circularLinkType=="bottom"?Xe.sort(re):Xe.sort(Q);var Ye=0;Xe.forEach(function(gt,Tt){gt.circularLinkID==le.circularLinkID&&(le.circularPathData.leftSmallArcRadius=u+le.width/2+Ye,le.circularPathData.leftLargeArcRadius=u+le.width/2+Tt*Ie+Ye),Ye=Ye+gt.width}),Ae=le.target.column,Xe=Se.links.filter(function(gt){return gt.target.column==Ae&>.circularLinkType==Be}),le.circularLinkType=="bottom"?Xe.sort(se):Xe.sort(ne),Ye=0,Xe.forEach(function(gt,Tt){gt.circularLinkID==le.circularLinkID&&(le.circularPathData.rightSmallArcRadius=u+le.width/2+Ye,le.circularPathData.rightLargeArcRadius=u+le.width/2+Tt*Ie+Ye),Ye=Ye+gt.width}),le.circularLinkType=="bottom"?(le.circularPathData.verticalFullExtent=Math.max(Ge,le.source.y1,le.target.y1)+h+le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.rightLargeArcRadius):(le.circularPathData.verticalFullExtent=_e-h-le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.rightLargeArcRadius)}le.circularPathData.leftInnerExtent=le.circularPathData.sourceX+le.circularPathData.leftNodeBuffer,le.circularPathData.rightInnerExtent=le.circularPathData.targetX-le.circularPathData.rightNodeBuffer,le.circularPathData.leftFullExtent=le.circularPathData.sourceX+le.circularPathData.leftLargeArcRadius+le.circularPathData.leftNodeBuffer,le.circularPathData.rightFullExtent=le.circularPathData.targetX-le.circularPathData.rightLargeArcRadius-le.circularPathData.rightNodeBuffer}if(le.circular)le.path=U(le);else{var yt=k.linkHorizontal().source(function(gt){var Tt=gt.source.x0+(gt.source.x1-gt.source.x0),At=gt.y0;return[Tt,At]}).target(function(gt){var Tt=gt.target.x0,At=gt.y1;return[Tt,At]});le.path=yt(le)}})}function U(Se){var Ie="";return Se.circularLinkType=="top"?Ie="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 0 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY-Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 0 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 0 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY-Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 0 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY:Ie="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 1 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY+Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 1 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 1 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY+Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 1 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY,Ie}function $(Se,Ie){return V(Se)==V(Ie)?Se.circularLinkType=="bottom"?re(Se,Ie):Q(Se,Ie):V(Ie)-V(Se)}function Q(Se,Ie){return Se.y0-Ie.y0}function re(Se,Ie){return Ie.y0-Se.y0}function ne(Se,Ie){return Se.y1-Ie.y1}function se(Se,Ie){return Ie.y1-Se.y1}function V(Se){return Se.target.column-Se.source.column}function Z(Se){return Se.target.x0-Se.source.x1}function K(Se,Ie){var Ge=O(Se),qe=Z(Ie)/Math.tan(Ge),ke=xe(Se)=="up"?Se.y1+qe:Se.y1-qe;return ke}function H(Se,Ie){var Ge=O(Se),qe=Z(Ie)/Math.tan(Ge),ke=xe(Se)=="up"?Se.y1-qe:Se.y1+qe;return ke}function X(Se,Ie,Ge,qe){Se.links.forEach(function(ke){if(!ke.circular&&ke.target.column-ke.source.column>1){var _e=ke.source.column+1,ue=ke.target.column-1,ve=1,le=ue-_e+1;for(ve=1;_e<=ue;_e++,ve++)Se.nodes.forEach(function(Ae){if(Ae.column==_e){var Be=ve/(le+1),Xe=Math.pow(1-Be,3),Ye=3*Be*Math.pow(1-Be,2),yt=3*Math.pow(Be,2)*(1-Be),gt=Math.pow(Be,3),Tt=Xe*ke.y0+Ye*ke.y0+yt*ke.y1+gt*ke.y1,At=Tt-ke.width/2,$t=Tt+ke.width/2,rr;At>Ae.y0&&AtAe.y0&&$tAe.y1&&W(_r,rr,Ie,Ge)})):AtAe.y1&&(rr=$t-Ae.y0+10,Ae=W(Ae,rr,Ie,Ge),Se.nodes.forEach(function(_r){w(_r,qe)==w(Ae,qe)||_r.column!=Ae.column||_r.y0Ae.y1&&W(_r,rr,Ie,Ge)}))}})}})}function q(Se,Ie){return Se.y0>Ie.y0&&Se.y0Ie.y0&&Se.y1Ie.y1}function W(Se,Ie,Ge,qe){return Se.y0+Ie>=Ge&&Se.y1+Ie<=qe&&(Se.y0=Se.y0+Ie,Se.y1=Se.y1+Ie,Se.targetLinks.forEach(function(ke){ke.y1=ke.y1+Ie}),Se.sourceLinks.forEach(function(ke){ke.y0=ke.y0+Ie})),Se}function ee(Se,Ie,Ge,qe){Se.nodes.forEach(function(ke){qe&&ke.y+(ke.y1-ke.y0)>Ie&&(ke.y=ke.y-(ke.y+(ke.y1-ke.y0)-Ie));var _e=Se.links.filter(function(le){return w(le.source,Ge)==w(ke,Ge)}),ue=_e.length;ue>1&&_e.sort(function(le,Ae){if(!le.circular&&!Ae.circular){if(le.target.column==Ae.target.column)return le.y1-Ae.y1;if(he(le,Ae)){if(le.target.column>Ae.target.column){var Be=H(Ae,le);return le.y1-Be}if(Ae.target.column>le.target.column){var Xe=H(le,Ae);return Xe-Ae.y1}}else return le.y1-Ae.y1}if(le.circular&&!Ae.circular)return le.circularLinkType=="top"?-1:1;if(Ae.circular&&!le.circular)return Ae.circularLinkType=="top"?1:-1;if(le.circular&&Ae.circular)return le.circularLinkType===Ae.circularLinkType&&le.circularLinkType=="top"?le.target.column===Ae.target.column?le.target.y1-Ae.target.y1:Ae.target.column-le.target.column:le.circularLinkType===Ae.circularLinkType&&le.circularLinkType=="bottom"?le.target.column===Ae.target.column?Ae.target.y1-le.target.y1:le.target.column-Ae.target.column:le.circularLinkType=="top"?-1:1});var ve=ke.y0;_e.forEach(function(le){le.y0=ve+le.width/2,ve=ve+le.width}),_e.forEach(function(le,Ae){if(le.circularLinkType=="bottom"){var Be=Ae+1,Xe=0;for(Be;Be1&&ke.sort(function(ve,le){if(!ve.circular&&!le.circular){if(ve.source.column==le.source.column)return ve.y0-le.y0;if(he(ve,le)){if(le.source.column0?"up":"down"}function we(Se,Ie){return w(Se.source,Ie)==w(Se.target,Ie)}function Me(Se,Ie,Ge){var qe=Se.nodes,ke=Se.links,_e=!1,ue=!1;if(ke.forEach(function(Ye){Ye.circularLinkType=="top"?_e=!0:Ye.circularLinkType=="bottom"&&(ue=!0)}),_e==!1||ue==!1){var ve=b.min(qe,function(Ye){return Ye.y0}),le=b.max(qe,function(Ye){return Ye.y1}),Ae=le-ve,Be=Ge-Ie,Xe=Be/Ae;qe.forEach(function(Ye){var yt=(Ye.y1-Ye.y0)*Xe;Ye.y0=(Ye.y0-ve)*Xe,Ye.y1=Ye.y0+yt}),ke.forEach(function(Ye){Ye.y0=(Ye.y0-ve)*Xe,Ye.y1=(Ye.y1-ve)*Xe,Ye.width=Ye.width*Xe})}}p.sankeyCircular=x,p.sankeyCenter=a,p.sankeyLeft=t,p.sankeyRight=n,p.sankeyJustify=r,Object.defineProperty(p,"__esModule",{value:!0})})}}),OM=ze({"src/traces/sankey/constants.js"(J,G){"use strict";G.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}}),IV=ze({"src/traces/sankey/render.js"(J,G){"use strict";var p=SV(),b=(l0(),Po(_v)).interpolateNumber,E=ci(),k=CV(),l=RV(),e=OM(),t=Qn(),n=Xi(),r=Nr(),a=r.strTranslate,o=r.strRotate,s=Vd(),c=s.keyFun,g=s.repeat,f=s.unwrap,v=Cs(),m=mi(),i=dc(),T=i.CAP_SHIFT,S=i.LINE_SPACING,M=3;function C(Z,K,H){var X=f(K),q=X.trace,W=q.domain,ee=q.orientation==="h",ae=q.direction==="reversed",he=q.node.pad,xe=q.node.thickness,we={justify:k.sankeyJustify,left:k.sankeyLeft,right:k.sankeyRight,center:k.sankeyCenter}[q.node.align],Me=Z.width*(W.x[1]-W.x[0]),Se=Z.height*(W.y[1]-W.y[0]),Ie=X._nodes,Ge=X._links,qe=X.circular,ke;qe?ke=l.sankeyCircular().circularLinkGap(0):ke=k.sankey(),ke.iterations(e.sankeyIterations).size(ee?[Me,Se]:[Se,Me]).nodeWidth(xe).nodePadding(he).nodeId(function(Xt){return Xt.pointNumber}).nodeAlign(we).nodes(Ie).links(Ge);function _e(Xt){q[Xt].sort==="input"&&(qe?r.warn(`Circular Sankey diagrams do not support the "input" ${Xt}.sort mode; falling back to the default sort.`):ke[`${Xt}Sort`](null))}_e("link"),_e("node");var ue=ke();ke.nodePadding()=ht||(vt=ht-Ot.y0,vt>1e-6&&(Ot.y0+=vt,Ot.y1+=vt)),ht=Ot.y1+he})}function At(Xt){var or=Xt.map(function(Ke,Je){return{x0:Ke.x0,index:Je}}).sort(function(Ke,Je){return Ke.x0-Je.x0}),Ot=[],vt=-1,ht,De=-1/0,Ne;for(ve=0;veDe+xe&&(vt+=1,ht=We.x0),De=We.x0,Ot[vt]||(Ot[vt]=[]),Ot[vt].push(We),Ne=ht-We.x0,We.x0+=Ne,We.x1+=Ne}return Ot}if(q.node.x.length&&q.node.y.length){for(ve=0;ve0?" L "+q.targetX+" "+q.targetY:"")+"Z"):(H="M "+(q.targetX-K)+" "+(q.targetY-X)+" L "+(q.rightInnerExtent-K)+" "+(q.targetY-X)+" A "+(q.rightLargeArcRadius+X)+" "+(q.rightSmallArcRadius+X)+" 0 0 0 "+(q.rightFullExtent-X-K)+" "+(q.targetY+q.rightSmallArcRadius)+" L "+(q.rightFullExtent-X-K)+" "+q.verticalRightInnerExtent,W&&ee?H+=" A "+(q.rightLargeArcRadius+X)+" "+(q.rightLargeArcRadius+X)+" 0 0 0 "+(q.rightInnerExtent-X-K)+" "+(q.verticalFullExtent+X)+" L "+(q.rightFullExtent+X-K-(q.rightLargeArcRadius-X))+" "+(q.verticalFullExtent+X)+" A "+(q.rightLargeArcRadius+X)+" "+(q.rightLargeArcRadius+X)+" 0 0 0 "+(q.leftFullExtent+X)+" "+q.verticalLeftInnerExtent:W?H+=" A "+(q.rightLargeArcRadius-X)+" "+(q.rightSmallArcRadius-X)+" 0 0 1 "+(q.rightFullExtent-K-X-(q.rightLargeArcRadius-X))+" "+(q.verticalFullExtent-X)+" L "+(q.leftFullExtent+X+(q.rightLargeArcRadius-X))+" "+(q.verticalFullExtent-X)+" A "+(q.rightLargeArcRadius-X)+" "+(q.rightSmallArcRadius-X)+" 0 0 1 "+(q.leftFullExtent+X)+" "+q.verticalLeftInnerExtent:H+=" A "+(q.rightLargeArcRadius+X)+" "+(q.rightLargeArcRadius+X)+" 0 0 0 "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent+X)+" L "+q.leftInnerExtent+" "+(q.verticalFullExtent+X)+" A "+(q.leftLargeArcRadius+X)+" "+(q.leftLargeArcRadius+X)+" 0 0 0 "+(q.leftFullExtent+X)+" "+q.verticalLeftInnerExtent,H+=" L "+(q.leftFullExtent+X)+" "+(q.sourceY+q.leftSmallArcRadius)+" A "+(q.leftLargeArcRadius+X)+" "+(q.leftSmallArcRadius+X)+" 0 0 0 "+q.leftInnerExtent+" "+(q.sourceY-X)+" L "+q.sourceX+" "+(q.sourceY-X)+" L "+q.sourceX+" "+(q.sourceY+X)+" L "+q.leftInnerExtent+" "+(q.sourceY+X)+" A "+(q.leftLargeArcRadius-X)+" "+(q.leftSmallArcRadius-X)+" 0 0 1 "+(q.leftFullExtent-X)+" "+(q.sourceY+q.leftSmallArcRadius)+" L "+(q.leftFullExtent-X)+" "+q.verticalLeftInnerExtent,W&&ee?H+=" A "+(q.rightLargeArcRadius-X)+" "+(q.rightSmallArcRadius-X)+" 0 0 1 "+(q.leftFullExtent-X-(q.rightLargeArcRadius-X))+" "+(q.verticalFullExtent-X)+" L "+(q.rightFullExtent+X-K+(q.rightLargeArcRadius-X))+" "+(q.verticalFullExtent-X)+" A "+(q.rightLargeArcRadius-X)+" "+(q.rightSmallArcRadius-X)+" 0 0 1 "+(q.rightFullExtent+X-K)+" "+q.verticalRightInnerExtent:W?H+=" A "+(q.rightLargeArcRadius+X)+" "+(q.rightLargeArcRadius+X)+" 0 0 0 "+(q.leftFullExtent+X)+" "+(q.verticalFullExtent+X)+" L "+(q.rightFullExtent-K-X)+" "+(q.verticalFullExtent+X)+" A "+(q.rightLargeArcRadius+X)+" "+(q.rightLargeArcRadius+X)+" 0 0 0 "+(q.rightFullExtent+X-K)+" "+q.verticalRightInnerExtent:H+=" A "+(q.leftLargeArcRadius-X)+" "+(q.leftLargeArcRadius-X)+" 0 0 1 "+q.leftInnerExtent+" "+(q.verticalFullExtent-X)+" L "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent-X)+" A "+(q.rightLargeArcRadius-X)+" "+(q.rightLargeArcRadius-X)+" 0 0 1 "+(q.rightFullExtent+X-K)+" "+q.verticalRightInnerExtent,H+=" L "+(q.rightFullExtent+X-K)+" "+(q.targetY+q.rightSmallArcRadius)+" A "+(q.rightLargeArcRadius-X)+" "+(q.rightSmallArcRadius-X)+" 0 0 1 "+(q.rightInnerExtent-K)+" "+(q.targetY+X)+" L "+(q.targetX-K)+" "+(q.targetY+X)+(K>0?" L "+q.targetX+" "+q.targetY:"")+"Z"),H}function h(){var Z=.5;function K(H){var X=H.linkArrowLength;if(H.link.circular)return w(H.link,X);var q=Math.abs((H.link.target.x0-H.link.source.x1)/2);X>q&&(X=q);var W=H.link.source.x1,ee=H.link.target.x0-X,ae=b(W,ee),he=ae(Z),xe=ae(1-Z),we=H.link.y0-H.link.width/2,Me=H.link.y0+H.link.width/2,Se=H.link.y1-H.link.width/2,Ie=H.link.y1+H.link.width/2,Ge="M"+W+","+we,qe="C"+he+","+we+" "+xe+","+Se+" "+ee+","+Se,ke="C"+xe+","+Ie+" "+he+","+Me+" "+W+","+Me,_e=X>0?"L"+(ee+X)+","+(Se+H.link.width/2):"";return _e+="L"+ee+","+Ie,Ge+qe+_e+ke+"Z"}return K}function u(Z,K){var H=e.nodePadAcross,X=Z.nodePad/2;K.dx=K.x1-K.x0,K.dy=K.y1-K.y0;var q=K.dx,W=Math.max(.5,K.dy),ee="node_"+K.pointNumber;return K.group&&(ee=r.randstr()),K.trace=Z.trace,K.curveNumber=Z.trace.index,{index:K.pointNumber,key:ee,partOfGroup:K.partOfGroup||!1,group:K.group,traceId:Z.key,trace:Z.trace,node:K,nodePad:Z.nodePad,nodeLineColor:Z.nodeLineColor,nodeLineWidth:Z.nodeLineWidth,textFont:Z.textFont,size:Z.horizontal?Z.height:Z.width,visibleWidth:Math.ceil(q),visibleHeight:W,zoneX:-H,zoneY:-X,zoneWidth:q+2*H,zoneHeight:W+2*X,labelY:Z.horizontal?K.dy/2+1:K.dx/2+1,left:K.originalLayer===1,sizeAcross:Z.width,forceLayouts:Z.forceLayouts,horizontal:Z.horizontal,reversed:Z.reversed,rgb:t.rgb(K.color),alpha:t.parse(K.color).alpha,valueFormat:Z.valueFormat,valueSuffix:Z.valueSuffix,sankey:Z.sankey,graph:Z.graph,arrangement:Z.arrangement,uniqueNodeLabelPathId:[Z.guid,Z.key,ee].join("_"),interactionState:Z.interactionState,figure:Z}}function A(Z){Z.attr("transform",function(K){return a(K.node.x0.toFixed(3),K.node.y0.toFixed(3))})}function x(Z){Z.call(A)}function z(Z,K){Z.call(x),K.attr("d",h())}function I(Z){Z.attr("width",function(K){return K.node.x1-K.node.x0}).attr("height",function(K){return K.visibleHeight})}function O(Z){return Z.link.width>1||Z.linkLineWidth>0}function D(Z){return Z.horizontal?Z.reversed?a(Z.translateX+Z.width,Z.translateY)+"matrix(-1 0 0 1 0 0)":a(Z.translateX,Z.translateY)+"matrix(1 0 0 1 0 0)":Z.reversed?a(Z.translateX,Z.translateY+Z.height)+"matrix(0 -1 1 0 0 0)":a(Z.translateX,Z.translateY)+"matrix(0 1 1 0 0 0)"}function B(Z,K,H){Z.on(".basic",null).on("mouseover.basic",function(X){!X.interactionState.dragInProgress&&!X.partOfGroup&&(H.hover(this,X,K),X.interactionState.hovered=[this,X])}).on("mousemove.basic",function(X){!X.interactionState.dragInProgress&&!X.partOfGroup&&(H.follow(this,X),X.interactionState.hovered=[this,X])}).on("mouseout.basic",function(X){!X.interactionState.dragInProgress&&!X.partOfGroup&&(H.unhover(this,X,K),X.interactionState.hovered=!1)}).on("click.basic",function(X){X.interactionState.hovered&&(H.unhover(this,X,K),X.interactionState.hovered=!1),!X.interactionState.dragInProgress&&!X.partOfGroup&&H.select(this,X,K)})}function F(Z,K,H,X){var q=E.behavior.drag().origin(function(W){return{x:W.node.x0+W.visibleWidth/2,y:W.node.y0+W.visibleHeight/2}}).on("dragstart",function(W){if(W.arrangement!=="fixed"&&(r.ensureSingle(X._fullLayout._infolayer,"g","dragcover",function(ae){X._fullLayout._dragCover=ae}),r.raiseToTop(this),W.interactionState.dragInProgress=W.node,re(W.node),W.interactionState.hovered&&(H.nodeEvents.unhover.apply(0,W.interactionState.hovered),W.interactionState.hovered=!1),W.arrangement==="snap")){var ee=W.traceId+"|"+W.key;W.forceLayouts[ee]?W.forceLayouts[ee].alpha(1):P(Z,ee,W,X),j(Z,K,W,ee,X)}}).on("drag",function(W){if(W.arrangement!=="fixed"){var ee=E.event.x,ae=E.event.y;W.arrangement==="snap"?(W.node.x0=ee-W.visibleWidth/2,W.node.x1=ee+W.visibleWidth/2,W.node.y0=ae-W.visibleHeight/2,W.node.y1=ae+W.visibleHeight/2):(W.arrangement==="freeform"&&(W.node.x0=ee-W.visibleWidth/2,W.node.x1=ee+W.visibleWidth/2),ae=Math.max(0,Math.min(W.size-W.visibleHeight/2,ae)),W.node.y0=ae-W.visibleHeight/2,W.node.y1=ae+W.visibleHeight/2),re(W.node),W.arrangement!=="snap"&&(W.sankey.update(W.graph),z(Z.filter(ne(W)),K))}}).on("dragend",function(W){if(W.arrangement!=="fixed"){W.interactionState.dragInProgress=!1;for(var ee=0;ee0)window.requestAnimationFrame(W);else{var he=H.node.originalX;H.node.x0=he-H.visibleWidth/2,H.node.x1=he+H.visibleWidth/2,$(H,q)}})}function U(Z,K,H,X){return function(){for(var W=0,ee=0;ee0&&X.forceLayouts[K].alpha(0)}}function $(Z,K){for(var H=[],X=[],q=0;qO(ke)?t.rgb(ke.linkLineColor):ke.rgb).style("stroke-opacity",ke=>O(ke)?t.opacity(ke.linkLineColor):ke.alpha).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha).style("stroke-width",ke=>O(ke)?ke.linkLineWidth:1).attr("d",h()),Me.style("opacity",function(){return Z._context.staticPlot||ee||ae?1:0}).transition().ease(e.ease).duration(e.duration).style("opacity",1),Me.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Se=xe.selectAll("."+e.cn.sankeyNodeSet).data(g,c);Se.enter().append("g").classed(e.cn.sankeyNodeSet,!0),Se.style("cursor",function(ke){switch(ke.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var Ie=Se.selectAll("."+e.cn.sankeyNode).data(function(ke){var _e=ke.graph.nodes;return Q(_e),_e.map(u.bind(null,ke))},c);Ie.enter().append("g").classed(e.cn.sankeyNode,!0).call(A).style("opacity",function(ke){return(Z._context.staticPlot||ee)&&!ke.partOfGroup?1:0}),Ie.call(B,xe,q.nodeEvents).call(F,Me,q,Z),Ie.transition().ease(e.ease).duration(e.duration).call(A).style("opacity",function(ke){return ke.partOfGroup?0:1}),Ie.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Ge=Ie.selectAll("."+e.cn.nodeRect).data(g);Ge.enter().append("rect").classed(e.cn.nodeRect,!0).call(I),Ge.style("stroke-width",function(ke){return ke.nodeLineWidth}).style("stroke",function(ke){return t.rgb(ke.nodeLineColor)}).style("stroke-opacity",function(ke){return t.opacity(ke.nodeLineColor)}).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha),Ge.transition().ease(e.ease).duration(e.duration).call(I);var qe=Ie.selectAll("."+e.cn.nodeLabel).data(g);qe.enter().append("text").classed(e.cn.nodeLabel,!0).style("cursor","default"),qe.attr("data-notex",1).text(function(ke){return ke.node.label}).each(function(ke){var _e=E.select(this);n.font(_e,ke.textFont),v.convertToTspans(_e,Z)}).attr("text-anchor",function(ke){return ke.horizontal&&ke.left!==ke.reversed?"end":"start"}).attr("transform",function(ke){var _e=E.select(this),ue=v.lineCount(_e),ve=ke.textFont.size*((ue-1)*S-T),le=ke.nodeLineWidth/2+M;if(!ke.horizontal){var Xe=ke.reversed?(ke.visibleWidth+ve)/2:(ke.visibleWidth-ve)/2,Ae=ke.reversed?o(90):"scale(-1,1)"+o(90);return a(Xe,le)+Ae}var Be=le,Xe=(ke.visibleHeight-ve)/2;return ke.left?Be=-Be:Be+=ke.visibleWidth,a(Be,Xe)+(ke.reversed?"scale(-1,1)":"")}),qe.transition().ease(e.ease).duration(e.duration)}}}),NM=ze({"src/traces/sankey/plot.js"(J,G){"use strict";var p=ci(),b=Nr(),E=b.numberFormat,k=IV(),l=Zl(),e=Qn(),t=OM().cn,n=b._;function r(S){return S!==""}function a(S,M){return S.filter(function(C){return C.key===M.traceId})}function o(S,M){p.select(S).select("path").style("fill-opacity",M),p.select(S).select("rect").style("fill-opacity",M)}function s(S){p.select(S).select("text.name").style("fill","black")}function c(S){return function(M){return S.node.sourceLinks.indexOf(M.link)!==-1||S.node.targetLinks.indexOf(M.link)!==-1}}function g(S){return function(M){return M.node.sourceLinks.indexOf(S.link)!==-1||M.node.targetLinks.indexOf(S.link)!==-1}}function f(S,M,C){M&&C&&a(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(m.bind(0,M,C,!1))}function v(S,M,C){M&&C&&a(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(i.bind(0,M,C,!1))}function m(S,M,C,_){_.style("fill",function(w){if(!w.link.concentrationscale)return w.hoverRgb}).style("fill-opacity",function(w){if(!w.link.concentrationscale)return w.hoverAlpha}),_.each(function(w){var h=w.link.label;h!==""&&a(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===h}).style("fill",function(u){if(!u.link.concentrationscale)return u.hoverRgb}).style("fill-opacity",function(u){if(!u.link.concentrationscale)return u.hoverAlpha})}),C&&a(M,S).selectAll("."+t.sankeyNode).filter(g(S)).call(f)}function i(S,M,C,_){_.style("fill",function(w){return w.rgb}).style("fill-opacity",function(w){return w.alpha}),_.each(function(w){var h=w.link.label;h!==""&&a(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===h}).style("fill",u=>u.rgb).style("fill-opacity",u=>u.alpha)}),C&&a(M,S).selectAll(t.sankeyNode).filter(g(S)).call(v)}function T(S,M){var C=S.hoverlabel||{},_=b.nestedProperty(C,M).get();return Array.isArray(_)?!1:_}G.exports=function(M,C){for(var _=M._fullLayout,w=_._paper,h=_._size,u=0;u"),color:T(V,"bgcolor")||e.addOpacity(q.color,1),borderColor:T(V,"bordercolor"),fontFamily:T(V,"font.family"),fontSize:T(V,"font.size"),fontColor:T(V,"font.color"),fontWeight:T(V,"font.weight"),fontStyle:T(V,"font.style"),fontVariant:T(V,"font.variant"),fontTextcase:T(V,"font.textcase"),fontLineposition:T(V,"font.lineposition"),fontShadow:T(V,"font.shadow"),nameLength:T(V,"namelength"),textAlign:T(V,"align"),idealAlign:p.event.x"),color:T(V,"bgcolor")||se.rgb,borderColor:T(V,"bordercolor"),fontFamily:T(V,"font.family"),fontSize:T(V,"font.size"),fontColor:T(V,"font.color"),fontWeight:T(V,"font.weight"),fontStyle:T(V,"font.style"),fontVariant:T(V,"font.variant"),fontTextcase:T(V,"font.textcase"),fontLineposition:T(V,"font.lineposition"),fontShadow:T(V,"font.shadow"),nameLength:T(V,"namelength"),textAlign:T(V,"align"),idealAlign:"left",hovertemplate:V.hovertemplate,hovertemplateLabels:ee,eventData:[se.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:M});o(xe,.85),s(xe)}}},re=function(ne,se,V){M._fullLayout.hovermode!==!1&&(p.select(ne).call(v,se,V),se.node.trace.node.hoverinfo!=="skip"&&(se.node.fullData=se.node.trace,M.emit("plotly_unhover",{event:p.event,points:[se.node]})),l.loneUnhover(_._hoverlayer.node()))};k(M,w,C,{width:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{linkEvents:{hover:z,follow:P,unhover:j,select:x},nodeEvents:{hover:$,follow:Q,unhover:re,select:U}})}}}),DV=ze({"src/traces/sankey/base_plot.js"(J){"use strict";var G=Al().overrideAll,p=zf().getModuleCalcData,b=NM(),E=rv(),k=gd(),l=_h(),e=_c().prepSelect,t=Nr(),n=mi(),r="sankey";J.name=r,J.baseLayoutAttrOverrides=G({hoverlabel:E.hoverlabel},"plot","nested"),J.plot=function(o){var s=p(o.calcdata,r)[0];b(o,s),J.updateFx(o)},J.clean=function(o,s,c,g){var f=g._has&&g._has(r),v=s._has&&s._has(r);f&&!v&&(g._paperdiv.selectAll(".sankey").remove(),g._paperdiv.selectAll(".bgsankey").remove())},J.updateFx=function(o){for(var s=0;s0}G.exports=function(D,B,F,P){var j=D._fullLayout,U;S(F)&&P&&(U=P()),k.makeTraceGroups(j._indicatorlayer,B,"trace").each(function($){var Q=$[0],re=Q.trace,ne=p.select(this),se=re._hasGauge,V=re._isAngular,Z=re._isBullet,K=re.domain,H={w:j._size.w*(K.x[1]-K.x[0]),h:j._size.h*(K.y[1]-K.y[0]),l:j._size.l+j._size.w*K.x[0],r:j._size.r+j._size.w*(1-K.x[1]),t:j._size.t+j._size.h*(1-K.y[1]),b:j._size.b+j._size.h*K.y[0]},X=H.l+H.w/2,q=H.t+H.h/2,W=Math.min(H.w/2,H.h),ee=a.innerRadius*W,ae,he,xe,we=re.align||"center";if(he=q,!se)ae=H.l+i[we]*H.w,xe=function(le){return A(le,H.w,H.h)};else if(V&&(ae=X,he=q+W/2,xe=function(le){return x(le,.9*ee)}),Z){var Me=a.bulletPadding,Se=1-a.bulletNumberDomainSize+Me;ae=H.l+(Se+(1-Se)*i[we])*H.w,xe=function(le){return A(le,(a.bulletNumberDomainSize-Me)*H.w,H.h)}}_(D,ne,$,{numbersX:ae,numbersY:he,numbersScaler:xe,transitionOpts:F,onComplete:U});var Ie,Ge;se&&(Ie={range:re.gauge.axis.range,color:re.gauge.bgcolor,line:{color:re.gauge.bordercolor,width:0},thickness:1},Ge={range:re.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:re.gauge.bordercolor,width:re.gauge.borderwidth},thickness:1});var qe=ne.selectAll("g.angular").data(V?$:[]);qe.exit().remove();var ke=ne.selectAll("g.angularaxis").data(V?$:[]);ke.exit().remove(),V&&C(D,ne,$,{radius:W,innerRadius:ee,gauge:qe,layer:ke,size:H,gaugeBg:Ie,gaugeOutline:Ge,transitionOpts:F,onComplete:U});var _e=ne.selectAll("g.bullet").data(Z?$:[]);_e.exit().remove();var ue=ne.selectAll("g.bulletaxis").data(Z?$:[]);ue.exit().remove(),Z&&M(D,ne,$,{gauge:_e,layer:ue,size:H,gaugeBg:Ie,gaugeOutline:Ge,transitionOpts:F,onComplete:U});var ve=ne.selectAll("text.title").data($);ve.exit().remove(),ve.enter().append("text").classed("title",!0),ve.attr("text-anchor",function(){return Z?m.right:m[re.title.align]}).text(re.title.text).call(r.font,re.title.font).call(o.convertToTspans,D),ve.attr("transform",function(){var le=H.l+H.w*i[re.title.align],Ae,Be=a.titlePadding,Xe=r.bBox(ve.node());if(se){if(V)if(re.gauge.axis.visible){var Ye=r.bBox(ke.node());Ae=Ye.top-Be-Xe.bottom}else Ae=H.t+H.h/2-W/2-Xe.bottom-Be;Z&&(Ae=he-(Xe.top+Xe.bottom)/2,le=H.l-a.bulletPadding*H.w)}else Ae=re._numbersTop-Be-Xe.bottom;return e(le,Ae)})})};function M(O,D,B,F){var P=B[0].trace,j=F.gauge,U=F.layer,$=F.gaugeBg,Q=F.gaugeOutline,re=F.size,ne=P.domain,se=F.transitionOpts,V=F.onComplete,Z,K,H,X,q;j.enter().append("g").classed("bullet",!0),j.attr("transform",e(re.l,re.t)),U.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),U.selectAll("g.xbulletaxistick,path,text").remove();var W=re.h,ee=P.gauge.bar.thickness*W,ae=ne.x[0],he=ne.x[0]+(ne.x[1]-ne.x[0])*(P._hasNumber||P._hasDelta?1-a.bulletNumberDomainSize:1);Z=u(O,P.gauge.axis),Z._id="xbulletaxis",Z.domain=[ae,he],Z.setScale(),K=s.calcTicks(Z),H=s.makeTransTickFn(Z),X=s.getTickSigns(Z)[2],q=re.t+re.h,Z.visible&&(s.drawTicks(O,Z,{vals:Z.ticks==="inside"?s.clipEnds(Z,K):K,layer:U,path:s.makeTickPath(Z,q,X),transFn:H}),s.drawLabels(O,Z,{vals:K,layer:U,transFn:H,labelFns:s.makeLabelFns(Z,q)}));function xe(ke){ke.attr("width",function(_e){return Math.max(0,Z.c2p(_e.range[1])-Z.c2p(_e.range[0]))}).attr("x",function(_e){return Z.c2p(_e.range[0])}).attr("y",function(_e){return .5*(1-_e.thickness)*W}).attr("height",function(_e){return _e.thickness*W})}var we=[$].concat(P.gauge.steps),Me=j.selectAll("g.bg-bullet").data(we);Me.enter().append("g").classed("bg-bullet",!0).append("rect"),Me.select("rect").call(xe).call(w),Me.exit().remove();var Se=j.selectAll("g.value-bullet").data([P.gauge.bar]);Se.enter().append("g").classed("value-bullet",!0).append("rect"),Se.select("rect").attr("height",ee).attr("y",(W-ee)/2).call(w),S(se)?Se.select("rect").transition().duration(se.duration).ease(se.easing).each("end",function(){V&&V()}).each("interrupt",function(){V&&V()}).attr("width",Math.max(0,Z.c2p(Math.min(P.gauge.axis.range[1],B[0].y)))):Se.select("rect").attr("width",typeof B[0].y=="number"?Math.max(0,Z.c2p(Math.min(P.gauge.axis.range[1],B[0].y))):0),Se.exit().remove();var Ie=B.filter(function(){return P.gauge.threshold.value||P.gauge.threshold.value===0}),Ge=j.selectAll("g.threshold-bullet").data(Ie);Ge.enter().append("g").classed("threshold-bullet",!0).append("line"),Ge.select("line").attr("x1",Z.c2p(P.gauge.threshold.value)).attr("x2",Z.c2p(P.gauge.threshold.value)).attr("y1",(1-P.gauge.threshold.thickness)/2*W).attr("y2",(1-(1-P.gauge.threshold.thickness)/2)*W).call(v.stroke,P.gauge.threshold.line.color).style("stroke-width",P.gauge.threshold.line.width),Ge.exit().remove();var qe=j.selectAll("g.gauge-outline").data([Q]);qe.enter().append("g").classed("gauge-outline",!0).append("rect"),qe.select("rect").call(xe).call(w),qe.exit().remove()}function C(O,D,B,F){var P=B[0].trace,j=F.size,U=F.radius,$=F.innerRadius,Q=F.gaugeBg,re=F.gaugeOutline,ne=[j.l+j.w/2,j.t+j.h/2+U/2],se=F.gauge,V=F.layer,Z=F.transitionOpts,K=F.onComplete,H=Math.PI/2;function X(yt){var gt=P.gauge.axis.range[0],Tt=P.gauge.axis.range[1],At=(yt-gt)/(Tt-gt)*Math.PI-H;return At<-H?-H:At>H?H:At}function q(yt){return p.svg.arc().innerRadius(($+U)/2-yt/2*(U-$)).outerRadius(($+U)/2+yt/2*(U-$)).startAngle(-H)}function W(yt){yt.attr("d",function(gt){return q(gt.thickness).startAngle(X(gt.range[0])).endAngle(X(gt.range[1]))()})}var ee,ae,he,xe;se.enter().append("g").classed("angular",!0),se.attr("transform",e(ne[0],ne[1])),V.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),V.selectAll("g.xangularaxistick,path,text").remove(),ee=u(O,P.gauge.axis),ee.type="linear",ee.range=P.gauge.axis.range,ee._id="xangularaxis",ee.ticklabeloverflow="allow",ee.setScale();var we=function(yt){return(ee.range[0]-yt.x)/(ee.range[1]-ee.range[0])*Math.PI+Math.PI},Me={},Se=s.makeLabelFns(ee,0),Ie=Se.labelStandoff;Me.xFn=function(yt){var gt=we(yt);return Math.cos(gt)*Ie},Me.yFn=function(yt){var gt=we(yt),Tt=Math.sin(gt)>0?.2:1;return-Math.sin(gt)*(Ie+yt.fontSize*Tt)+Math.abs(Math.cos(gt))*(yt.fontSize*n)},Me.anchorFn=function(yt){var gt=we(yt),Tt=Math.cos(gt);return Math.abs(Tt)<.1?"middle":Tt>0?"start":"end"},Me.heightFn=function(yt,gt,Tt){var At=we(yt);return-.5*(1+Math.sin(At))*Tt};var Ge=function(yt){return e(ne[0]+U*Math.cos(yt),ne[1]-U*Math.sin(yt))};he=function(yt){return Ge(we(yt))};var qe=function(yt){var gt=we(yt);return Ge(gt)+"rotate("+-t(gt)+")"};if(ae=s.calcTicks(ee),xe=s.getTickSigns(ee)[2],ee.visible){xe=ee.ticks==="inside"?-1:1;var ke=(ee.linewidth||1)/2;s.drawTicks(O,ee,{vals:ae,layer:V,path:"M"+xe*ke+",0h"+xe*ee.ticklen,transFn:qe}),s.drawLabels(O,ee,{vals:ae,layer:V,transFn:he,labelFns:Me})}var _e=[Q].concat(P.gauge.steps),ue=se.selectAll("g.bg-arc").data(_e);ue.enter().append("g").classed("bg-arc",!0).append("path"),ue.select("path").call(W).call(w),ue.exit().remove();var ve=q(P.gauge.bar.thickness),le=se.selectAll("g.value-arc").data([P.gauge.bar]);le.enter().append("g").classed("value-arc",!0).append("path");var Ae=le.select("path");S(Z)?(Ae.transition().duration(Z.duration).ease(Z.easing).each("end",function(){K&&K()}).each("interrupt",function(){K&&K()}).attrTween("d",h(ve,X(B[0].lastY),X(B[0].y))),P._lastValue=B[0].y):Ae.attr("d",typeof B[0].y=="number"?ve.endAngle(X(B[0].y)):"M0,0Z"),Ae.call(w),le.exit().remove(),_e=[];var Be=P.gauge.threshold.value;(Be||Be===0)&&_e.push({range:[Be,Be],color:P.gauge.threshold.color,line:{color:P.gauge.threshold.line.color,width:P.gauge.threshold.line.width},thickness:P.gauge.threshold.thickness});var Xe=se.selectAll("g.threshold-arc").data(_e);Xe.enter().append("g").classed("threshold-arc",!0).append("path"),Xe.select("path").call(W).call(w),Xe.exit().remove();var Ye=se.selectAll("g.gauge-outline").data([re]);Ye.enter().append("g").classed("gauge-outline",!0).append("path"),Ye.select("path").call(W).call(w),Ye.exit().remove()}function _(O,D,B,F){var P=B[0].trace,j=F.numbersX,U=F.numbersY,$=P.align||"center",Q=m[$],re=F.transitionOpts,ne=F.onComplete,se=k.ensureSingle(D,"g","numbers"),V,Z,K,H=[];P._hasNumber&&H.push("number"),P._hasDelta&&(H.push("delta"),P.delta.position==="left"&&H.reverse());var X=se.selectAll("text").data(H);X.enter().append("text"),X.attr("text-anchor",function(){return Q}).attr("class",function(Ge){return Ge}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),X.exit().remove();function q(Ge,qe,ke,_e){if(Ge.match("s")&&ke>=0!=_e>=0&&!qe(ke).slice(-1).match(T)&&!qe(_e).slice(-1).match(T)){var ue=Ge.slice().replace("s","f").replace(/\d+/,function(le){return parseInt(le)-1}),ve=u(O,{tickformat:ue});return function(le){return Math.abs(le)<1?s.tickText(ve,le).text:qe(le)}}else return qe}function W(){var Ge=u(O,{tickformat:P.number.valueformat},P._range);Ge.setScale(),s.prepTicks(Ge);var qe=function(le){return s.tickText(Ge,le).text},ke=P.number.suffix,_e=P.number.prefix,ue=se.select("text.number");function ve(){var le=typeof B[0].y=="number"?_e+qe(B[0].y)+ke:"-";ue.text(le).call(r.font,P.number.font).call(o.convertToTspans,O)}return S(re)?ue.transition().duration(re.duration).ease(re.easing).each("end",function(){ve(),ne&&ne()}).each("interrupt",function(){ve(),ne&&ne()}).attrTween("text",function(){var le=p.select(this),Ae=E(B[0].lastY,B[0].y);P._lastValue=B[0].y;var Be=q(P.number.valueformat,qe,B[0].lastY,B[0].y);return function(Xe){le.text(_e+Be(Ae(Xe))+ke)}}):ve(),V=z(_e+qe(B[0].y)+ke,P.number.font,Q,O),ue}function ee(){var Ge=u(O,{tickformat:P.delta.valueformat},P._range);Ge.setScale(),s.prepTicks(Ge);var qe=function(Xe){return s.tickText(Ge,Xe).text},ke=P.delta.suffix,_e=P.delta.prefix,ue=function(Xe){var Ye=P.delta.relative?Xe.relativeDelta:Xe.delta;return Ye},ve=function(Xe,Ye){return Xe===0||typeof Xe!="number"||isNaN(Xe)?"-":(Xe>0?P.delta.increasing.symbol:P.delta.decreasing.symbol)+_e+Ye(Xe)+ke},le=function(Xe){return Xe.delta>=0?P.delta.increasing.color:P.delta.decreasing.color};P._deltaLastValue===void 0&&(P._deltaLastValue=ue(B[0]));var Ae=se.select("text.delta");Ae.call(r.font,P.delta.font).call(v.fill,le({delta:P._deltaLastValue}));function Be(){Ae.text(ve(ue(B[0]),qe)).call(v.fill,le(B[0])).call(o.convertToTspans,O)}return S(re)?Ae.transition().duration(re.duration).ease(re.easing).tween("text",function(){var Xe=p.select(this),Ye=ue(B[0]),yt=P._deltaLastValue,gt=q(P.delta.valueformat,qe,yt,Ye),Tt=E(yt,Ye);return P._deltaLastValue=Ye,function(At){Xe.text(ve(Tt(At),gt)),Xe.call(v.fill,le({delta:Tt(At)}))}}).each("end",function(){Be(),ne&&ne()}).each("interrupt",function(){Be(),ne&&ne()}):Be(),Z=z(ve(ue(B[0]),qe),P.delta.font,Q,O),Ae}var ae=P.mode+P.align,he;if(P._hasDelta&&(he=ee(),ae+=P.delta.position+P.delta.font.size+P.delta.font.family+P.delta.valueformat,ae+=P.delta.increasing.symbol+P.delta.decreasing.symbol,K=Z),P._hasNumber&&(W(),ae+=P.number.font.size+P.number.font.family+P.number.valueformat+P.number.suffix+P.number.prefix,K=V),P._hasDelta&&P._hasNumber){var xe=[(V.left+V.right)/2,(V.top+V.bottom)/2],we=[(Z.left+Z.right)/2,(Z.top+Z.bottom)/2],Me,Se,Ie=.75*P.delta.font.size;P.delta.position==="left"&&(Me=I(P,"deltaPos",0,-1*(V.width*i[P.align]+Z.width*(1-i[P.align])+Ie),ae,Math.min),Se=xe[1]-we[1],K={width:V.width+Z.width+Ie,height:Math.max(V.height,Z.height),left:Z.left+Me,right:V.right,top:Math.min(V.top,Z.top+Se),bottom:Math.max(V.bottom,Z.bottom+Se)}),P.delta.position==="right"&&(Me=I(P,"deltaPos",0,V.width*(1-i[P.align])+Z.width*i[P.align]+Ie,ae,Math.max),Se=xe[1]-we[1],K={width:V.width+Z.width+Ie,height:Math.max(V.height,Z.height),left:V.left,right:Z.right+Me,top:Math.min(V.top,Z.top+Se),bottom:Math.max(V.bottom,Z.bottom+Se)}),P.delta.position==="bottom"&&(Me=null,Se=Z.height,K={width:Math.max(V.width,Z.width),height:V.height+Z.height,left:Math.min(V.left,Z.left),right:Math.max(V.right,Z.right),top:V.bottom-V.height,bottom:V.bottom+Z.height}),P.delta.position==="top"&&(Me=null,Se=V.top,K={width:Math.max(V.width,Z.width),height:V.height+Z.height,left:Math.min(V.left,Z.left),right:Math.max(V.right,Z.right),top:V.bottom-V.height-Z.height,bottom:V.bottom}),he.attr({dx:Me,dy:Se})}(P._hasNumber||P._hasDelta)&&se.attr("transform",function(){var Ge=F.numbersScaler(K);ae+=Ge[2];var qe=I(P,"numbersScale",1,Ge[0],ae,Math.min),ke;P._scaleNumbers||(qe=1),P._isAngular?ke=U-qe*K.bottom:ke=U-qe*(K.top+K.bottom)/2,P._numbersTop=qe*K.top+ke;var _e=K[$];$==="center"&&(_e=(K.left+K.right)/2);var ue=j-qe*_e;return ue=I(P,"numbersTranslate",0,ue,ae,Math.max),e(ue,ke)+l(qe)})}function w(O){O.each(function(D){v.stroke(p.select(this),D.line.color)}).each(function(D){v.fill(p.select(this),D.color)}).style("stroke-width",function(D){return D.line.width})}function h(O,D,B){return function(){var F=b(D,B);return function(P){return O.endAngle(F(P))()}}}function u(O,D,B){var F=O._fullLayout,P=k.extendFlat({type:"linear",ticks:"outside",range:B,showline:!0},D),j={type:"linear",_id:"x"+D._id},U={letter:"x",font:F.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function $(Q,re){return k.coerce(P,j,f,Q,re)}return c(P,j,$,U,F),g(P,j,$,U),j}function A(O,D,B){var F=Math.min(D/O.width,B/O.height);return[F,O,D+"x"+B]}function x(O,D){var B=Math.sqrt(O.width/2*(O.width/2)+O.height*O.height),F=D/B;return[F,O,D]}function z(O,D,B,F){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),j=p.select(P);return j.text(O).attr("x",0).attr("y",0).attr("text-anchor",B).attr("data-unformatted",O).call(o.convertToTspans,F).call(r.font,D),r.bBox(j.node())}function I(O,D,B,F,P,j){var U="_cache"+D;O[U]&&O[U].key===P||(O[U]={key:P,value:B});var $=k.aggNums(j,null,[O[U].value,F],2);return O[U].value=$,$}}}),qV=ze({"src/traces/indicator/index.js"(J,G){"use strict";G.exports={moduleType:"trace",name:"indicator",basePlotModule:OV(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:jM(),supplyDefaults:NV().supplyDefaults,calc:jV().calc,plot:UV(),meta:{}}}}),VV=ze({"lib/indicator.js"(J,G){"use strict";G.exports=qV()}}),qM=ze({"src/traces/table/attributes.js"(J,G){"use strict";var p=fv(),b=Ki().extendFlat,E=Al().overrideAll,k=Qs(),l=Ml().attributes,e=Il().descriptionOnlyNumbers,t=G.exports=E({domain:l({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:b({},p.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:b({},k({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:b({},p.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:b({},k({arrayOk:!0}))}},"calc","from-root")}}),GV=ze({"src/traces/table/defaults.js"(J,G){"use strict";var p=Nr(),b=qM(),E=Ml().defaults;function k(l,e){for(var t=l.columnorder||[],n=l.header.values.length,r=t.slice(0,n),a=r.slice().sort(function(c,g){return c-g}),o=r.map(function(c){return a.indexOf(c)}),s=o.length;s",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}}),WV=ze({"src/traces/table/data_preparation_helper.js"(J,G){"use strict";var p=VM(),b=Ki().extendFlat,E=ao(),k=Ff().isTypedArray,l=Ff().isArrayOrTypedArray;G.exports=function(f,v){var m=n(v.cells.values),i=function(Q){return Q.slice(v.header.values.length,Q.length)},T=n(v.header.values);T.length&&!T[0].length&&(T[0]=[""],T=n(T));var S=T.concat(i(m).map(function(){return r((T[0]||[""]).length)})),M=v.domain,C=Math.floor(f._fullLayout._size.w*(M.x[1]-M.x[0])),_=Math.floor(f._fullLayout._size.h*(M.y[1]-M.y[0])),w=v.header.values.length?S[0].map(function(){return v.header.height}):[p.emptyHeaderHeight],h=m.length?m[0].map(function(){return v.cells.height}):[],u=w.reduce(t,0),A=_-u,x=A+p.uplift,z=s(h,x),I=s(w,u),O=o(I,[]),D=o(z,O),B={},F=v.columnorder;l(F)&&(F=Array.from(F)),F=F.concat(i(m.map(function(Q,re){return re})));var P=S.map(function(Q,re){var ne=l(v.columnwidth)?v.columnwidth[Math.min(re,v.columnwidth.length-1)]:v.columnwidth;return E(ne)?Number(ne):1}),j=P.reduce(t,0);P=P.map(function(Q){return Q/j*C});var U=Math.max(e(v.header.line.width),e(v.cells.line.width)),$={key:v.uid+f._context.staticPlot,translateX:M.x[0]*f._fullLayout._size.w,translateY:f._fullLayout._size.h*(1-M.y[1]),size:f._fullLayout._size,width:C,maxLineWidth:U,height:_,columnOrder:F,groupHeight:_,rowBlocks:D,headerRowBlocks:O,scrollY:0,cells:b({},v.cells,{values:m}),headerCells:b({},v.header,{values:S}),gdColumns:S.map(function(Q){return Q[0]}),gdColumnsOriginalOrder:S.map(function(Q){return Q[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:S.map(function(Q,re){var ne=B[Q];B[Q]=(ne||0)+1;var se=Q+"__"+B[Q];return{key:se,label:Q,specIndex:re,xIndex:F[re],xScale:a,x:void 0,calcdata:void 0,columnWidth:P[re]}})};return $.columns.forEach(function(Q){Q.calcdata=$,Q.x=a(Q)}),$};function e(g){if(l(g)){for(var f=0,v=0;v=f||_===g.length-1)&&(v[i]=S,S.key=C++,S.firstRowIndex=M,S.lastRowIndex=_,S=c(),i+=T,M=_+1,T=0);return v}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),YV=ze({"src/traces/table/data_split_helpers.js"(J){"use strict";var G=Ki().extendFlat;J.splitToPanels=function(b){var E=[0,0],k=G({},b,{key:"header",type:"header",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!0,values:b.calcdata.headerCells.values[b.specIndex],rowBlocks:b.calcdata.headerRowBlocks,calcdata:G({},b.calcdata,{cells:b.calcdata.headerCells})}),l=G({},b,{key:"cells1",type:"cells",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks}),e=G({},b,{key:"cells2",type:"cells",page:1,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks});return[l,e,k]},J.splitToCells=function(b){var E=p(b);return(b.values||[]).slice(E[0],E[1]).map(function(k,l){var e=typeof k=="string"&&k.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:l+e,key:E[0]+l,column:b,calcdata:b.calcdata,page:b.page,rowBlocks:b.rowBlocks,value:k}})};function p(b){var E=b.rowBlocks[b.page],k=E?E.rows[0].rowIndex:0,l=E?k+E.rows.length:0;return[k,l]}}}),GM=ze({"src/traces/table/plot.js"(J,G){"use strict";var p=VM(),b=ci(),E=Nr(),k=E.numberFormat,l=Vd(),e=Xi(),t=Cs(),n=Nr().raiseToTop,r=Nr().strTranslate,a=Nr().cancelTransition,o=WV(),s=YV(),c=Qn();G.exports=function(ae,he){var xe=!ae._context.staticPlot,we=ae._fullLayout._paper.selectAll("."+p.cn.table).data(he.map(function(Ye){var yt=l.unwrap(Ye),gt=yt.trace;return o(ae,gt)}),l.keyFun);we.exit().remove(),we.enter().append("g").classed(p.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),we.attr("width",function(Ye){return Ye.width+Ye.size.l+Ye.size.r}).attr("height",function(Ye){return Ye.height+Ye.size.t+Ye.size.b}).attr("transform",function(Ye){return r(Ye.translateX,Ye.translateY)});var Me=we.selectAll("."+p.cn.tableControlView).data(l.repeat,l.keyFun),Se=Me.enter().append("g").classed(p.cn.tableControlView,!0).style("box-sizing","content-box");if(xe){var Ie="onwheel"in document?"wheel":"mousewheel";Se.on("mousemove",function(Ye){Me.filter(function(yt){return Ye===yt}).call(i,ae)}).on(Ie,function(Ye){if(!Ye.scrollbarState.wheeling){Ye.scrollbarState.wheeling=!0;var yt=Ye.scrollY+b.event.deltaY,gt=Q(ae,Me,null,yt)(Ye);gt||(b.event.stopPropagation(),b.event.preventDefault()),Ye.scrollbarState.wheeling=!1}}).call(i,ae,!0)}Me.attr("transform",function(Ye){return r(Ye.size.l,Ye.size.t)});var Ge=Me.selectAll("."+p.cn.scrollBackground).data(l.repeat,l.keyFun);Ge.enter().append("rect").classed(p.cn.scrollBackground,!0).attr("fill","none"),Ge.attr("width",function(Ye){return Ye.width}).attr("height",function(Ye){return Ye.height}),Me.each(function(Ye){e.setClipUrl(b.select(this),f(ae,Ye),ae)});var qe=Me.selectAll("."+p.cn.yColumn).data(function(Ye){return Ye.columns},l.keyFun);qe.enter().append("g").classed(p.cn.yColumn,!0),qe.exit().remove(),qe.attr("transform",function(Ye){return r(Ye.x,0)}),xe&&qe.call(b.behavior.drag().origin(function(Ye){var yt=b.select(this);return B(yt,Ye,-p.uplift),n(this),Ye.calcdata.columnDragInProgress=!0,i(Me.filter(function(gt){return Ye.calcdata.key===gt.key}),ae),Ye}).on("drag",function(Ye){var yt=b.select(this),gt=function($t){return(Ye===$t?b.event.x:$t.x)+$t.columnWidth/2};Ye.x=Math.max(-p.overdrag,Math.min(Ye.calcdata.width+p.overdrag-Ye.columnWidth,b.event.x));var Tt=m(qe).filter(function($t){return $t.calcdata.key===Ye.calcdata.key}),At=Tt.sort(function($t,rr){return gt($t)-gt(rr)});At.forEach(function($t,rr){$t.xIndex=rr,$t.x=Ye===$t?$t.x:$t.xScale($t)}),qe.filter(function($t){return Ye!==$t}).transition().ease(p.transitionEase).duration(p.transitionDuration).attr("transform",function($t){return r($t.x,0)}),yt.call(a).attr("transform",r(Ye.x,-p.uplift))}).on("dragend",function(Ye){var yt=b.select(this),gt=Ye.calcdata;Ye.x=Ye.xScale(Ye),Ye.calcdata.columnDragInProgress=!1,B(yt,Ye,0),O(ae,gt,gt.columns.map(function(Tt){return Tt.xIndex}))})),qe.each(function(Ye){e.setClipUrl(b.select(this),v(ae,Ye),ae)});var ke=qe.selectAll("."+p.cn.columnBlock).data(s.splitToPanels,l.keyFun);ke.enter().append("g").classed(p.cn.columnBlock,!0).attr("id",function(Ye){return Ye.key}),ke.style("cursor",function(Ye){return Ye.dragHandle?"ew-resize":Ye.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var _e=ke.filter(P),ue=ke.filter(F);xe&&ue.call(b.behavior.drag().origin(function(Ye){return b.event.stopPropagation(),Ye}).on("drag",Q(ae,Me,-1)).on("dragend",function(){})),T(ae,Me,_e,ke),T(ae,Me,ue,ke);var ve=Me.selectAll("."+p.cn.scrollAreaClip).data(l.repeat,l.keyFun);ve.enter().append("clipPath").classed(p.cn.scrollAreaClip,!0).attr("id",function(Ye){return f(ae,Ye)});var le=ve.selectAll("."+p.cn.scrollAreaClipRect).data(l.repeat,l.keyFun);le.enter().append("rect").classed(p.cn.scrollAreaClipRect,!0).attr("x",-p.overdrag).attr("y",-p.uplift).attr("fill","none"),le.attr("width",function(Ye){return Ye.width+2*p.overdrag}).attr("height",function(Ye){return Ye.height+p.uplift});var Ae=qe.selectAll("."+p.cn.columnBoundary).data(l.repeat,l.keyFun);Ae.enter().append("g").classed(p.cn.columnBoundary,!0);var Be=qe.selectAll("."+p.cn.columnBoundaryClippath).data(l.repeat,l.keyFun);Be.enter().append("clipPath").classed(p.cn.columnBoundaryClippath,!0),Be.attr("id",function(Ye){return v(ae,Ye)});var Xe=Be.selectAll("."+p.cn.columnBoundaryRect).data(l.repeat,l.keyFun);Xe.enter().append("rect").classed(p.cn.columnBoundaryRect,!0).attr("fill","none"),Xe.attr("width",function(Ye){return Ye.columnWidth+2*g(Ye)}).attr("height",function(Ye){return Ye.calcdata.height+2*g(Ye)+p.uplift}).attr("x",function(Ye){return-g(Ye)}).attr("y",function(Ye){return-g(Ye)}),$(null,ue,Me)};function g(ee){return Math.ceil(ee.calcdata.maxLineWidth/2)}function f(ee,ae){return"clip"+ee._fullLayout._uid+"_scrollAreaBottomClip_"+ae.key}function v(ee,ae){return"clip"+ee._fullLayout._uid+"_columnBoundaryClippath_"+ae.calcdata.key+"_"+ae.specIndex}function m(ee){return[].concat.apply([],ee.map(function(ae){return ae})).map(function(ae){return ae.__data__})}function i(ee,ae,he){function xe(qe){var ke=qe.rowBlocks;return K(ke,ke.length-1)+(ke.length?H(ke[ke.length-1],1/0):1)}var we=ee.selectAll("."+p.cn.scrollbarKit).data(l.repeat,l.keyFun);we.enter().append("g").classed(p.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),we.each(function(qe){var ke=qe.scrollbarState;ke.totalHeight=xe(qe),ke.scrollableAreaHeight=qe.groupHeight-j(qe),ke.currentlyVisibleHeight=Math.min(ke.totalHeight,ke.scrollableAreaHeight),ke.ratio=ke.currentlyVisibleHeight/ke.totalHeight,ke.barLength=Math.max(ke.ratio*ke.currentlyVisibleHeight,p.goldenRatio*p.scrollbarWidth),ke.barWiggleRoom=ke.currentlyVisibleHeight-ke.barLength,ke.wiggleRoom=Math.max(0,ke.totalHeight-ke.scrollableAreaHeight),ke.topY=ke.barWiggleRoom===0?0:qe.scrollY/ke.wiggleRoom*ke.barWiggleRoom,ke.bottomY=ke.topY+ke.barLength,ke.dragMultiplier=ke.wiggleRoom/ke.barWiggleRoom}).attr("transform",function(qe){var ke=qe.width+p.scrollbarWidth/2+p.scrollbarOffset;return r(ke,j(qe))});var Me=we.selectAll("."+p.cn.scrollbar).data(l.repeat,l.keyFun);Me.enter().append("g").classed(p.cn.scrollbar,!0);var Se=Me.selectAll("."+p.cn.scrollbarSlider).data(l.repeat,l.keyFun);Se.enter().append("g").classed(p.cn.scrollbarSlider,!0),Se.attr("transform",function(qe){return r(0,qe.scrollbarState.topY||0)});var Ie=Se.selectAll("."+p.cn.scrollbarGlyph).data(l.repeat,l.keyFun);Ie.enter().append("line").classed(p.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",p.scrollbarWidth).attr("stroke-linecap","round").attr("y1",p.scrollbarWidth/2),Ie.attr("y2",function(qe){return qe.scrollbarState.barLength-p.scrollbarWidth/2}).attr("stroke-opacity",function(qe){return qe.columnDragInProgress||!qe.scrollbarState.barWiggleRoom||he?0:.4}),Ie.transition().delay(0).duration(0),Ie.transition().delay(p.scrollbarHideDelay).duration(p.scrollbarHideDuration).attr("stroke-opacity",0);var Ge=Me.selectAll("."+p.cn.scrollbarCaptureZone).data(l.repeat,l.keyFun);Ge.enter().append("line").classed(p.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",p.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(qe){var ke=b.event.y,_e=this.getBoundingClientRect(),ue=qe.scrollbarState,ve=ke-_e.top,le=b.scale.linear().domain([0,ue.scrollableAreaHeight]).range([0,ue.totalHeight]).clamp(!0);ue.topY<=ve&&ve<=ue.bottomY||Q(ae,ee,null,le(ve-ue.barLength/2))(qe)}).call(b.behavior.drag().origin(function(qe){return b.event.stopPropagation(),qe.scrollbarState.scrollbarScrollInProgress=!0,qe}).on("drag",Q(ae,ee)).on("dragend",function(){})),Ge.attr("y2",function(qe){return qe.scrollbarState.scrollableAreaHeight}),ae._context.staticPlot&&(Ie.remove(),Ge.remove())}function T(ee,ae,he,xe){var we=S(he),Me=M(we);h(Me);var Se=C(Me);A(Se);var Ie=w(Me),Ge=_(Ie);u(Ge),x(Ge,ae,xe,ee),Z(Me)}function S(ee){var ae=ee.selectAll("."+p.cn.columnCells).data(l.repeat,l.keyFun);return ae.enter().append("g").classed(p.cn.columnCells,!0),ae.exit().remove(),ae}function M(ee){var ae=ee.selectAll("."+p.cn.columnCell).data(s.splitToCells,function(he){return he.keyWithinBlock});return ae.enter().append("g").classed(p.cn.columnCell,!0),ae.exit().remove(),ae}function C(ee){var ae=ee.selectAll("."+p.cn.cellRect).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("rect").classed(p.cn.cellRect,!0),ae}function _(ee){var ae=ee.selectAll("."+p.cn.cellText).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("text").classed(p.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){b.event.stopPropagation()}),ae}function w(ee){var ae=ee.selectAll("."+p.cn.cellTextHolder).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("g").classed(p.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ae}function h(ee){ee.each(function(ae,he){var xe=ae.calcdata.cells.font,we=ae.column.specIndex,Me={size:D(xe.size,we,he),color:D(xe.color,we,he),family:D(xe.family,we,he),weight:D(xe.weight,we,he),style:D(xe.style,we,he),variant:D(xe.variant,we,he),textcase:D(xe.textcase,we,he),lineposition:D(xe.lineposition,we,he),shadow:D(xe.shadow,we,he)};ae.rowNumber=ae.key,ae.align=D(ae.calcdata.cells.align,we,he),ae.cellBorderWidth=D(ae.calcdata.cells.line.width,we,he),ae.font=Me})}function u(ee){ee.each(function(ae){e.font(b.select(this),ae.font)})}function A(ee){ee.attr("width",function(ae){return ae.column.columnWidth}).attr("stroke-width",function(ae){return ae.cellBorderWidth}).each(function(ae){var he=b.select(this);c.stroke(he,D(ae.calcdata.cells.line.color,ae.column.specIndex,ae.rowNumber)),c.fill(he,D(ae.calcdata.cells.fill.color,ae.column.specIndex,ae.rowNumber))})}function x(ee,ae,he,xe){ee.text(function(we){var Me=we.column.specIndex,Se=we.rowNumber,Ie=we.value,Ge=typeof Ie=="string",qe=Ge&&Ie.match(/
/i),ke=!Ge||qe;we.mayHaveMarkup=Ge&&Ie.match(/[<&>]/);var _e=z(Ie);we.latex=_e;var ue=_e?"":D(we.calcdata.cells.prefix,Me,Se)||"",ve=_e?"":D(we.calcdata.cells.suffix,Me,Se)||"",le=_e?null:D(we.calcdata.cells.format,Me,Se)||null,Ae=ue+(le?k(le)(we.value):we.value)+ve,Be;we.wrappingNeeded=!we.wrapped&&!ke&&!_e&&(Be=I(Ae)),we.cellHeightMayIncrease=qe||_e||we.mayHaveMarkup||(Be===void 0?I(Ae):Be),we.needsConvertToTspans=we.mayHaveMarkup||we.wrappingNeeded||we.latex;var Xe;if(we.wrappingNeeded){var Ye=p.wrapSplitCharacter===" "?Ae.replace(/we&&xe.push(Me),we+=Ge}return xe}function $(ee,ae,he){var xe=m(ae)[0];if(xe!==void 0){var we=xe.rowBlocks,Me=xe.calcdata,Se=K(we,we.length),Ie=xe.calcdata.groupHeight-j(xe),Ge=Me.scrollY=Math.max(0,Math.min(Se-Ie,Me.scrollY)),qe=U(we,Ge,Ie);qe.length===1&&(qe[0]===we.length-1?qe.unshift(qe[0]-1):qe.push(qe[0]+1)),qe[0]%2&&qe.reverse(),ae.each(function(ke,_e){ke.page=qe[_e],ke.scrollY=Ge}),ae.attr("transform",function(ke){var _e=K(ke.rowBlocks,ke.page)-ke.scrollY;return r(0,_e)}),ee&&(re(ee,he,ae,qe,xe.prevPages,xe,0),re(ee,he,ae,qe,xe.prevPages,xe,1),i(he,ee))}}function Q(ee,ae,he,xe){return function(Me){var Se=Me.calcdata?Me.calcdata:Me,Ie=ae.filter(function(_e){return Se.key===_e.key}),Ge=he||Se.scrollbarState.dragMultiplier,qe=Se.scrollY;Se.scrollY=xe===void 0?Se.scrollY+Ge*b.event.dy:xe;var ke=Ie.selectAll("."+p.cn.yColumn).selectAll("."+p.cn.columnBlock).filter(F);return $(ee,ke,Ie),Se.scrollY===qe}}function re(ee,ae,he,xe,we,Me,Se){var Ie=xe[Se]!==we[Se];Ie&&(clearTimeout(Me.currentRepaint[Se]),Me.currentRepaint[Se]=setTimeout(function(){var Ge=he.filter(function(qe,ke){return ke===Se&&xe[ke]!==we[ke]});T(ee,ae,Ge,he),we[Se]=xe[Se]}))}function ne(ee,ae,he,xe){return function(){var Me=b.select(ae.parentNode);Me.each(function(Se){var Ie=Se.fragments;Me.selectAll("tspan.line").each(function(Ae,Be){Ie[Be].width=this.getComputedTextLength()});var Ge=Ie[Ie.length-1].width,qe=Ie.slice(0,-1),ke=[],_e,ue,ve=0,le=Se.column.columnWidth-2*p.cellPad;for(Se.value="";qe.length;)_e=qe.shift(),ue=_e.width+Ge,ve+ue>le&&(Se.value+=ke.join(p.wrapSpacer)+p.lineBreaker,ke=[],ve=0),ke.push(_e.text),ve+=ue;ve&&(Se.value+=ke.join(p.wrapSpacer)),Se.wrapped=!0}),Me.selectAll("tspan.line").remove(),x(Me.select("."+p.cn.cellText),he,ee,xe),b.select(ae.parentNode.parentNode).call(Z)}}function se(ee,ae,he,xe,we){return function(){if(!we.settledY){var Se=b.select(ae.parentNode),Ie=q(we),Ge=we.key-Ie.firstRowIndex,qe=Ie.rows[Ge].rowHeight,ke=we.cellHeightMayIncrease?ae.parentNode.getBoundingClientRect().height+2*p.cellPad:qe,_e=Math.max(ke,qe),ue=_e-Ie.rows[Ge].rowHeight;ue&&(Ie.rows[Ge].rowHeight=_e,ee.selectAll("."+p.cn.columnCell).call(Z),$(null,ee.filter(F),0),i(he,xe,!0)),Se.attr("transform",function(){var ve=this,le=ve.parentNode,Ae=le.getBoundingClientRect(),Be=b.select(ve.parentNode).select("."+p.cn.cellRect).node().getBoundingClientRect(),Xe=ve.transform.baseVal.consolidate(),Ye=Be.top-Ae.top+(Xe?Xe.matrix.f:p.cellPad);return r(V(we,b.select(ve.parentNode).select("."+p.cn.cellTextHolder).node().getBoundingClientRect().width),Ye)}),we.settledY=!0}}}function V(ee,ae){switch(ee.align){case"left":return p.cellPad;case"right":return ee.column.columnWidth-(ae||0)-p.cellPad;case"center":return(ee.column.columnWidth-(ae||0))/2;default:return p.cellPad}}function Z(ee){ee.attr("transform",function(ae){var he=ae.rowBlocks[0].auxiliaryBlocks.reduce(function(Se,Ie){return Se+H(Ie,1/0)},0),xe=q(ae),we=H(xe,ae.key),Me=we+he;return r(0,Me)}).selectAll("."+p.cn.cellRect).attr("height",function(ae){return W(q(ae),ae.key).rowHeight})}function K(ee,ae){for(var he=0,xe=ae-1;xe>=0;xe--)he+=X(ee[xe]);return he}function H(ee,ae){for(var he=0,xe=0;xek.length&&(E=E.slice(0,k.length)):E=[],e=0;e90&&(f-=180,a=-a),{angle:f,flip:a,p:b.c2p(l,E,k),offsetMultplier:o}}}}),aG=ze({"src/traces/carpet/plot.js"(J,G){"use strict";var p=ci(),b=Xi(),E=HM(),k=WM(),l=rG(),e=Cs(),t=Nr(),n=t.strRotate,r=t.strTranslate,a=dc();G.exports=function(T,S,M,C){var _=T._context.staticPlot,w=S.xaxis,h=S.yaxis,u=T._fullLayout,A=u._clips;t.makeTraceGroups(C,M,"trace").each(function(x){var z=p.select(this),I=x[0],O=I.trace,D=O.aaxis,B=O.baxis,F=t.ensureSingle(z,"g","minorlayer"),P=t.ensureSingle(z,"g","majorlayer"),j=t.ensureSingle(z,"g","boundarylayer"),U=t.ensureSingle(z,"g","labellayer");z.style("opacity",O.opacity),s(w,h,P,D,"a",D._gridlines,!0,_),s(w,h,P,B,"b",B._gridlines,!0,_),s(w,h,F,D,"a",D._minorgridlines,!0,_),s(w,h,F,B,"b",B._minorgridlines,!0,_),s(w,h,j,D,"a-boundary",D._boundarylines,_),s(w,h,j,B,"b-boundary",B._boundarylines,_);var $=c(T,w,h,O,I,U,D._labels,"a-label"),Q=c(T,w,h,O,I,U,B._labels,"b-label");g(T,U,O,I,w,h,$,Q),o(O,I,A,w,h)})};function o(i,T,S,M,C){var _,w,h,u,A=S.select("#"+i._clipPathId);A.size()||(A=S.append("clipPath").classed("carpetclip",!0));var x=t.ensureSingle(A,"path","carpetboundary"),z=T.clipsegments,I=[];for(u=0;u0?"start":"end","data-notex":1}).call(b.font,z.font).text(z.text).call(e.convertToTspans,i),P=b.bBox(this);F.attr("transform",r(O.p[0],O.p[1])+n(O.angle)+r(z.axis.labelpadding*B,P.height*.3)),A=Math.max(A,P.width+z.axis.labelpadding)}),u.exit().remove(),x.maxExtent=A,x}function g(i,T,S,M,C,_,w,h){var u,A,x,z,I=t.aggNums(Math.min,null,S.a),O=t.aggNums(Math.max,null,S.a),D=t.aggNums(Math.min,null,S.b),B=t.aggNums(Math.max,null,S.b);u=.5*(I+O),A=D,x=S.ab2xy(u,A,!0),z=S.dxyda_rough(u,A),w.angle===void 0&&t.extendFlat(w,l(S,C,_,x,S.dxydb_rough(u,A))),m(i,T,S,M,x,z,S.aaxis,C,_,w,"a-title"),u=I,A=.5*(D+B),x=S.ab2xy(u,A,!0),z=S.dxydb_rough(u,A),h.angle===void 0&&t.extendFlat(h,l(S,C,_,x,S.dxyda_rough(u,A))),m(i,T,S,M,x,z,S.baxis,C,_,h,"b-title")}var f=a.LINE_SPACING,v=(1-a.MID_SHIFT)/f+1;function m(i,T,S,M,C,_,w,h,u,A,x){var z=[];w.title.text&&z.push(w.title.text);var I=T.selectAll("text."+x).data(z),O=A.maxExtent;I.enter().append("text").classed(x,!0),I.each(function(){var D=l(S,h,u,C,_);["start","both"].indexOf(w.showticklabels)===-1&&(O=0);var B=w.title.font.size;O+=B+w.title.offset;var F=A.angle+(A.flip<0?180:0),P=(F-D.angle+450)%360,j=P>90&&P<270,U=p.select(this);U.text(w.title.text).call(e.convertToTspans,i),j&&(O=(-e.lineCount(U)+v)*f*B-O),U.attr("transform",r(D.p[0],D.p[1])+n(D.angle)+r(0,O)).attr("text-anchor","middle").call(b.font,w.title.font)}),I.exit().remove()}}}),nG=ze({"src/traces/carpet/cheater_basis.js"(J,G){"use strict";var p=Nr().isArrayOrTypedArray;G.exports=function(b,E,k){var l,e,t,n,r,a,o=[],s=p(b)?b.length:b,c=p(E)?E.length:E,g=p(b)?b:null,f=p(E)?E:null;g&&(t=(g.length-1)/(g[g.length-1]-g[0])/(s-1)),f&&(n=(f.length-1)/(f[f.length-1]-f[0])/(c-1));var v,m=1/0,i=-1/0;for(e=0;e=10)return null;for(var l=1/0,e=-1/0,t=E.length,n=0;n0&&(H=k.dxydi([],$-1,re,0,ne),ee.push(se[0]+H[0]/3),ae.push(se[1]+H[1]/3),X=k.dxydi([],$-1,re,1,ne),ee.push(K[0]-X[0]/3),ae.push(K[1]-X[1]/3)),ee.push(K[0]),ae.push(K[1]),se=K;else for($=k.a2i(U),V=Math.floor(Math.max(0,Math.min(D-2,$))),Z=$-V,he.length=D,he.crossLength=B,he.xy=function(xe){return k.evalxy([],$,xe)},he.dxy=function(xe,we){return k.dxydj([],V,xe,Z,we)},Q=0;Q0&&(q=k.dxydj([],V,Q-1,Z,0),ee.push(se[0]+q[0]/3),ae.push(se[1]+q[1]/3),W=k.dxydj([],V,Q-1,Z,1),ee.push(K[0]-W[0]/3),ae.push(K[1]-W[1]/3)),ee.push(K[0]),ae.push(K[1]),se=K;return he.axisLetter=l,he.axis=C,he.crossAxis=A,he.value=U,he.constvar=e,he.index=g,he.x=ee,he.y=ae,he.smoothing=A.smoothing,he}function j(U){var $,Q,re,ne,se,V=[],Z=[],K={};if(K.length=M.length,K.crossLength=u.length,l==="b")for(re=Math.max(0,Math.min(B-2,U)),se=Math.min(1,Math.max(0,U-re)),K.xy=function(H){return k.evalxy([],H,U)},K.dxy=function(H,X){return k.dxydi([],H,re,X,se)},$=0;$M.length-1)&&_.push(b(j(n),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(g=s;gM.length-1)&&!(m<0||m>M.length-1))for(i=M[r],T=M[m],t=0;tM[M.length-1])&&w.push(b(P(v),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash})));C.startline&&h.push(b(j(0),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&h.push(b(j(M.length-1),{color:C.endlinecolor,width:C.endlinewidth}))}else{for(a=5e-15,o=[Math.floor((M[M.length-1]-C.tick0)/C.dtick*(1+a)),Math.ceil((M[0]-C.tick0)/C.dtick/(1+a))].sort(function(U,$){return U-$}),s=o[0],c=o[1],g=s;g<=c;g++)f=C.tick0+C.dtick*g,_.push(b(P(f),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(g=s-1;gM[M.length-1])&&w.push(b(P(v),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash}));C.startline&&h.push(b(P(M[0]),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&h.push(b(P(M[M.length-1]),{color:C.endlinecolor,width:C.endlinewidth}))}}}}),sG=ze({"src/traces/carpet/calc_labels.js"(J,G){"use strict";var p=Gi(),b=Ki().extendFlat;G.exports=function(k,l){var e,t,n,r,a,o=l._labels=[],s=l._gridlines;for(e=0;e=0;e--)t[s-e]=b[c][e],n[s-e]=E[c][e];for(r.push({x:t,y:n,bicubic:a}),e=c,t=[],n=[];e>=0;e--)t[c-e]=b[e][0],n[c-e]=E[e][0];return r.push({x:t,y:n,bicubic:o}),r}}}),uG=ze({"src/traces/carpet/smooth_fill_2d_array.js"(J,G){"use strict";var p=Nr();G.exports=function(E,k,l){var e,t,n,r=[],a=[],o=E[0].length,s=E.length;function c(Q,re){var ne=0,se,V=0;return Q>0&&(se=E[re][Q-1])!==void 0&&(V++,ne+=se),Q0&&(se=E[re-1][Q])!==void 0&&(V++,ne+=se),re0&&t0&&eu);return p.log("Smoother converged to",A,"after",z,"iterations"),E}}}),cG=ze({"src/traces/carpet/constants.js"(J,G){"use strict";G.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),fG=ze({"src/traces/carpet/catmull_rom.js"(J,G){"use strict";var p=.5;G.exports=function(E,k,l,e){var t=E[0]-k[0],n=E[1]-k[1],r=l[0]-k[0],a=l[1]-k[1],o=Math.pow(t*t+n*n,p/2),s=Math.pow(r*r+a*a,p/2),c=(s*s*t-o*o*r)*e,g=(s*s*n-o*o*a)*e,f=s*(o+s)*3,v=o*(o+s)*3;return[[k[0]+(f&&c/f),k[1]+(f&&g/f)],[k[0]-(v&&c/v),k[1]-(v&&g/v)]]}}}),hG=ze({"src/traces/carpet/compute_control_points.js"(J,G){"use strict";var p=fG(),b=Nr().ensureArray;function E(k,l,e){var t=-.5*e[0]+1.5*l[0],n=-.5*e[1]+1.5*l[1];return[(2*t+k[0])/3,(2*n+k[1])/3]}G.exports=function(l,e,t,n,r,a){var o,s,c,g,f,v,m,i,T,S,M=t[0].length,C=t.length,_=r?3*M-2:M,w=a?3*C-2:C;for(l=b(l,w),e=b(e,w),c=0;cf&&_m&&wv||wi},n.setScale=function(){var _=n._x,w=n._y,h=E(n._xctrl,n._yctrl,_,w,c.smoothing,g.smoothing);n._xctrl=h[0],n._yctrl=h[1],n.evalxy=k([n._xctrl,n._yctrl],o,s,c.smoothing,g.smoothing),n.dxydi=l([n._xctrl,n._yctrl],c.smoothing,g.smoothing),n.dxydj=e([n._xctrl,n._yctrl],c.smoothing,g.smoothing)},n.i2a=function(_){var w=Math.max(0,Math.floor(_[0]),o-2),h=_[0]-w;return(1-h)*r[w]+h*r[w+1]},n.j2b=function(_){var w=Math.max(0,Math.floor(_[1]),o-2),h=_[1]-w;return(1-h)*a[w]+h*a[w+1]},n.ij2ab=function(_){return[n.i2a(_[0]),n.j2b(_[1])]},n.a2i=function(_){var w=Math.max(0,Math.min(b(_,r),o-2)),h=r[w],u=r[w+1];return Math.max(0,Math.min(o-1,w+(_-h)/(u-h)))},n.b2j=function(_){var w=Math.max(0,Math.min(b(_,a),s-2)),h=a[w],u=a[w+1];return Math.max(0,Math.min(s-1,w+(_-h)/(u-h)))},n.ab2ij=function(_){return[n.a2i(_[0]),n.b2j(_[1])]},n.i2c=function(_,w){return n.evalxy([],_,w)},n.ab2xy=function(_,w,h){if(!h&&(_r[o-1]|wa[s-1]))return[!1,!1];var u=n.a2i(_),A=n.b2j(w),x=n.evalxy([],u,A);if(h){var z=0,I=0,O=[],D,B,F,P;_r[o-1]?(D=o-2,B=1,z=(_-r[o-1])/(r[o-1]-r[o-2])):(D=Math.max(0,Math.min(o-2,Math.floor(u))),B=u-D),wa[s-1]?(F=s-2,P=1,I=(w-a[s-1])/(a[s-1]-a[s-2])):(F=Math.max(0,Math.min(s-2,Math.floor(A))),P=A-F),z&&(n.dxydi(O,D,F,B,P),x[0]+=O[0]*z,x[1]+=O[1]*z),I&&(n.dxydj(O,D,F,B,P),x[0]+=O[0]*I,x[1]+=O[1]*I)}return x},n.c2p=function(_,w,h){return[w.c2p(_[0]),h.c2p(_[1])]},n.p2x=function(_,w,h){return[w.p2c(_[0]),h.p2c(_[1])]},n.dadi=function(_){var w=Math.max(0,Math.min(r.length-2,_));return r[w+1]-r[w]},n.dbdj=function(_){var w=Math.max(0,Math.min(a.length-2,_));return a[w+1]-a[w]},n.dxyda=function(_,w,h,u){var A=n.dxydi(null,_,w,h,u),x=n.dadi(_,h);return[A[0]/x,A[1]/x]},n.dxydb=function(_,w,h,u){var A=n.dxydj(null,_,w,h,u),x=n.dbdj(w,u);return[A[0]/x,A[1]/x]},n.dxyda_rough=function(_,w,h){var u=T*(h||.1),A=n.ab2xy(_+u,w,!0),x=n.ab2xy(_-u,w,!0);return[(A[0]-x[0])*.5/u,(A[1]-x[1])*.5/u]},n.dxydb_rough=function(_,w,h){var u=S*(h||.1),A=n.ab2xy(_,w+u,!0),x=n.ab2xy(_,w-u,!0);return[(A[0]-x[0])*.5/u,(A[1]-x[1])*.5/u]},n.dpdx=function(_){return _._m},n.dpdy=function(_){return _._m}}}}),gG=ze({"src/traces/carpet/calc.js"(J,G){"use strict";var p=Gi(),b=Nr().isArray1D,E=nG(),k=iG(),l=oG(),e=sG(),t=lG(),n=lb(),r=uG(),a=sb(),o=mG();G.exports=function(c,g){var f=p.getFromId(c,g.xaxis),v=p.getFromId(c,g.yaxis),m=g.aaxis,i=g.baxis,T=g.x,S=g.y,M=[];T&&b(T)&&M.push("x"),S&&b(S)&&M.push("y"),M.length&&a(g,m,i,"a","b",M);var C=g._a=g._a||g.a,_=g._b=g._b||g.b;T=g._x||g.x,S=g._y||g.y;var w={};if(g._cheater){var h=m.cheatertype==="index"?C.length:C,u=i.cheatertype==="index"?_.length:_;T=E(h,u,g.cheaterslope)}g._x=T=n(T),g._y=S=n(S),r(T,C,_),r(S,C,_),o(g),g.setScale();var A=k(T),x=k(S),z=.5*(A[1]-A[0]),I=.5*(A[1]+A[0]),O=.5*(x[1]-x[0]),D=.5*(x[1]+x[0]),B=1.3;return A=[I-z*B,I+z*B],x=[D-O*B,D+O*B],g._extremes[f._id]=p.findExtremes(f,A,{padded:!0}),g._extremes[v._id]=p.findExtremes(v,x,{padded:!0}),l(g,"a","b"),l(g,"b","a"),e(g,m),e(g,i),w.clipsegments=t(g._xctrl,g._yctrl,m,i),w.x=T,w.y=S,w.a=C,w.b=_,[w]}}}),yG=ze({"src/traces/carpet/index.js"(J,G){"use strict";G.exports={attributes:H2(),supplyDefaults:tG(),plot:aG(),calc:gG(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Du(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),_G=ze({"lib/carpet.js"(J,G){"use strict";G.exports=yG()}}),YM=ze({"src/traces/scattercarpet/attributes.js"(J,G){"use strict";var p=Bd(),b=su(),E=ws(),{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=qs(),n=Ki().extendFlat,r=b.marker,a=b.line,o=r.line;G.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:n({},b.mode,{dflt:"markers"}),text:n({},b.text,{}),texttemplate:l({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:n({},b.hovertext,{}),line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:n({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:b.connectgaps,fill:n({},b.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:p(),marker:n({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:n({width:o.width,dash:o.dash,editType:"calc"},t("marker.line")),gradient:r.gradient,editType:"calc"},t("marker")),textfont:b.textfont,textposition:b.textposition,selected:b.selected,unselected:b.unselected,hoverinfo:n({},E.hoverinfo,{flags:["a","b","text","name"]}),hoveron:b.hoveron,hovertemplate:k(),hovertemplatefallback:e(),zorder:b.zorder}}}),xG=ze({"src/traces/scattercarpet/defaults.js"(J,G){"use strict";var p=Nr(),b=zd(),E=el(),k=id(),l=_d(),e=$m(),t=xd(),n=Od(),r=YM();G.exports=function(o,s,c,g){function f(C,_){return p.coerce(o,s,r,C,_)}f("carpet"),s.xaxis="x",s.yaxis="y";var v=f("a"),m=f("b"),i=Math.min(v.length,m.length);if(!i){s.visible=!1;return}s._length=i,f("text"),f("texttemplate"),f("texttemplatefallback"),f("hovertext");var T=i0?w=C.labelprefix.replace(/ = $/,""):w=C._hovertitle,i.push(w+": "+_.toFixed(3)+C.labelsuffix)}if(!f.hovertemplate){var S=g.hi||f.hoverinfo,M=S.split("+");M.indexOf("all")!==-1&&(M=["a","b","text"]),M.indexOf("a")!==-1&&T(v.aaxis,g.a),M.indexOf("b")!==-1&&T(v.baxis,g.b),i.push("y: "+r.yLabel),M.indexOf("text")!==-1&&b(g,f,i),r.extraText=i.join("
")}return n}}}),MG=ze({"src/traces/scattercarpet/event_data.js"(J,G){"use strict";G.exports=function(b,E,k,l,e){var t=l[e];return b.a=t.a,b.b=t.b,b.y=t.y,b}}}),SG=ze({"src/traces/scattercarpet/index.js"(J,G){"use strict";G.exports={attributes:YM(),supplyDefaults:xG(),colorbar:Of(),formatLabels:bG(),calc:wG(),plot:TG(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:AG(),selectPoints:Yv(),eventData:MG(),moduleType:"trace",name:"scattercarpet",basePlotModule:Du(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),EG=ze({"lib/scattercarpet.js"(J,G){"use strict";G.exports=SG()}}),XM=ze({"src/traces/contourcarpet/attributes.js"(J,G){"use strict";var p=r1(),b=Mg(),E=qs(),k=Ki().extendFlat,l=b.contours;G.exports=k({carpet:{valType:"string",editType:"calc"},z:p.z,a:p.x,a0:p.x0,da:p.dx,b:p.y,b0:p.y0,db:p.dy,text:p.text,hovertext:p.hovertext,transpose:p.transpose,atype:p.xtype,btype:p.ytype,fillcolor:b.fillcolor,autocontour:b.autocontour,ncontours:b.ncontours,contours:{type:l.type,start:l.start,end:l.end,size:l.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:l.showlines,showlabels:l.showlabels,labelfont:l.labelfont,labelformat:l.labelformat,operation:l.operation,value:l.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:b.line.color,width:b.line.width,dash:b.line.dash,smoothing:b.line.smoothing,editType:"plot"},zorder:b.zorder},E("",{cLetter:"z",autoColorDflt:!1}))}}),ZM=ze({"src/traces/contourcarpet/defaults.js"(J,G){"use strict";var p=Nr(),b=ob(),E=XM(),k=hT(),l=xb(),e=bb();G.exports=function(n,r,a,o){function s(v,m){return p.coerce(n,r,E,v,m)}function c(v){return p.coerce2(n,r,E,v)}if(s("carpet"),n.a&&n.b){var g=b(n,r,s,o,"a","b");if(!g){r.visible=!1;return}s("text");var f=s("contours.type")==="constraint";f?k(n,r,s,o,a,{hasHover:!1}):(l(n,r,s,c),e(n,r,s,o,{hasHover:!1}))}else r._defaultColor=a,r._length=null;s("zorder")}}}),kG=ze({"src/traces/contourcarpet/calc.js"(J,G){"use strict";var p=Qf(),b=Nr(),E=sb(),k=lb(),l=ub(),e=cb(),t=$5(),n=ZM(),r=W2(),a=aT();G.exports=function(c,g){var f=g._carpetTrace=r(c,g);if(!(!f||!f.visible||f.visible==="legendonly")){if(!g.a||!g.b){var v=c.data[f.index],m=c.data[g.index];m.a||(m.a=v.a),m.b||(m.b=v.b),n(m,g,g._defaultColor,c._fullLayout)}var i=o(c,g);return a(g,g._z),i}};function o(s,c){var g=c._carpetTrace,f=g.aaxis,v=g.baxis,m,i,T,S,M,C,_;f._minDtick=0,v._minDtick=0,b.isArray1D(c.z)&&E(c,f,v,"a","b",["z"]),m=c._a=c._a||c.a,S=c._b=c._b||c.b,m=m?f.makeCalcdata(c,"_a"):[],S=S?v.makeCalcdata(c,"_b"):[],i=c.a0||0,T=c.da||1,M=c.b0||0,C=c.db||1,_=c._z=k(c._z||c.z,c.transpose),c._emptypoints=e(_),l(_,c._emptypoints);var w=b.maxRowLength(_),h=c.xtype==="scaled"?"":m,u=t(c,h,i,T,w,f),A=c.ytype==="scaled"?"":S,x=t(c,A,M,C,_.length,v),z={a:u,b:x,z:_};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&p(s,c,{vals:_,containerStr:"",cLetter:"z"}),[z]}}}),CG=ze({"src/traces/carpet/axis_aligned_line.js"(J,G){"use strict";var p=Nr().isArrayOrTypedArray;G.exports=function(b,E,k,l){var e,t,n,r,a,o,s,c,g,f,v,m,i,T=p(k)?"a":"b",S=T==="a"?b.aaxis:b.baxis,M=S.smoothing,C=T==="a"?b.a2i:b.b2j,_=T==="a"?k:l,w=T==="a"?l:k,h=T==="a"?E.a.length:E.b.length,u=T==="a"?E.b.length:E.a.length,A=Math.floor(T==="a"?b.b2j(w):b.a2i(w)),x=T==="a"?function(re){return b.evalxy([],re,A)}:function(re){return b.evalxy([],A,re)};M&&(n=Math.max(0,Math.min(u-2,A)),r=A-n,t=T==="a"?function(re,ne){return b.dxydi([],re,n,ne,r)}:function(re,ne){return b.dxydj([],n,re,r,ne)});var z=C(_[0]),I=C(_[1]),O=z0?Math.floor:Math.ceil,F=O>0?Math.ceil:Math.floor,P=O>0?Math.min:Math.max,j=O>0?Math.max:Math.min,U=B(z+D),$=F(I-D);s=x(z);var Q=[[s]];for(e=U;e*O<$*O;e+=O)a=[],v=j(z,e),m=P(I,e+O),i=m-v,o=Math.max(0,Math.min(h-2,Math.floor(.5*(v+m)))),c=x(m),M&&(g=t(o,v-o),f=t(o,m-o),a.push([s[0]+g[0]/3*i,s[1]+g[1]/3*i]),a.push([c[0]-f[0]/3*i,c[1]-f[1]/3*i])),a.push(c),Q.push(a),s=c;return Q}}}),LG=ze({"src/traces/contourcarpet/plot.js"(J,G){"use strict";var p=ci(),b=HM(),E=WM(),k=Xi(),l=Nr(),e=iT(),t=oT(),n=wb(),r=Eg(),a=lT(),o=sT(),s=uT(),c=W2(),g=CG();G.exports=function(h,u,A,x){var z=u.xaxis,I=u.yaxis;l.makeTraceGroups(x,A,"contour").each(function(O){var D=p.select(this),B=O[0],F=B.trace,P=F._carpetTrace=c(h,F),j=h.calcdata[P.index][0];if(!P.visible||P.visible==="legendonly")return;var U=B.a,$=B.b,Q=F.contours,re=o(Q,u,B),ne=Q.type==="constraint",se=Q._operation,V=ne?se==="="?"lines":"fill":Q.coloring;function Z(Me){var Se=P.ab2xy(Me[0],Me[1],!0);return[z.c2p(Se[0]),I.c2p(Se[1])]}var K=[[U[0],$[$.length-1]],[U[U.length-1],$[$.length-1]],[U[U.length-1],$[0]],[U[0],$[0]]];e(re);var H=(U[U.length-1]-U[0])*1e-8,X=($[$.length-1]-$[0])*1e-8;t(re,H,X);var q=re;Q.type==="constraint"&&(q=a(re,se)),f(re,Z);var W,ee,ae,he,xe=[];for(he=j.clipsegments.length-1;he>=0;he--)W=j.clipsegments[he],ee=b([],W.x,z.c2p),ae=b([],W.y,I.c2p),ee.reverse(),ae.reverse(),xe.push(E(ee,ae,W.bicubic));var we="M"+xe.join("L")+"Z";M(D,j.clipsegments,z,I,ne,V),C(F,D,z,I,q,K,Z,P,j,V,we),v(D,re,h,B,Q,u,P),k.setClipUrl(D,P._clipPathId,h)})};function f(w,h){var u,A,x,z,I,O,D,B,F;for(u=0;ure&&(A.max=re),A.len=A.max-A.min}function i(w,h,u){var A=w.getPointAtLength(h),x=w.getPointAtLength(u),z=x.x-A.x,I=x.y-A.y,O=Math.sqrt(z*z+I*I);return[z/O,I/O]}function T(w){var h=Math.sqrt(w[0]*w[0]+w[1]*w[1]);return[w[0]/h,w[1]/h]}function S(w,h){var u=Math.abs(w[0]*h[0]+w[1]*h[1]),A=Math.sqrt(1-u*u);return A/u}function M(w,h,u,A,x,z){var I,O,D,B,F=l.ensureSingle(w,"g","contourbg"),P=F.selectAll("path").data(z==="fill"&&!x?[0]:[]);P.enter().append("path"),P.exit().remove();var j=[];for(B=0;B=0&&(U=ee,Q=re):Math.abs(j[1]-U[1])=0&&(U=ee,Q=re):l.log("endpt to newendpt is not vert. or horz.",j,U,ee)}if(Q>=0)break;B+=q(j,U),j=U}if(Q===h.edgepaths.length){l.log("unclosed perimeter path");break}D=Q,P=F.indexOf(D)===-1,P&&(D=F[0],B+=q(j,U)+"Z",j=null)}for(D=0;D_):C=O>x,_=O;var D=f(x,z,I,O);D.pos=A,D.yc=(x+O)/2,D.i=u,D.dir=C?"increasing":"decreasing",D.x=D.pos,D.y=[I,z],w&&(D.orig_p=s[u]),S&&(D.tx=o.text[u]),M&&(D.htx=o.hovertext[u]),h.push(D)}else h.push({pos:A,empty:!0})}return o._extremes[g._id]=E.findExtremes(g,p.concat(i,m),{padded:!0}),h.length&&(h[0].t={labels:{open:b(a,"open:")+" ",high:b(a,"high:")+" ",low:b(a,"low:")+" ",close:b(a,"close:")+" "}}),h}function r(a,o,s){var c=s._minDiff;if(!c){var g=a._fullData,f=[];c=1/0;var v;for(v=0;v"+T.labels[A]+p.hoverLabelText(m,x,i.yhoverformat)):(I=b.extendFlat({},M),I.y0=I.y1=z,I.yLabelVal=x,I.yLabel=T.labels[A]+p.hoverLabelText(m,x,i.yhoverformat),I.name="",S.push(I),h[x]=I)}return S}function o(s,c,g,f){var v=s.cd,m=s.ya,i=v[0].trace,T=v[0].t,S=r(s,c,g,f);if(!S)return[];var M=S.index,C=v[M],_=S.index=C.i,w=C.dir;function h(D){return T.labels[D]+p.hoverLabelText(m,i[D][_],i.yhoverformat)}var u=C.hi||i.hoverinfo||"",A=u.split("+"),x=u==="all",z=x||A.indexOf("y")!==-1,I=x||A.indexOf("text")!==-1,O=z?[h("open"),h("high"),h("low"),h("close")+" "+t[w]]:[];return I&&l(C,i,O),S.extraText=O.join("
"),S.y0=S.y1=m.c2p(C.yc,!0),[S]}G.exports={hoverPoints:n,hoverSplit:a,hoverOnPoints:o}}}),QM=ze({"src/traces/ohlc/select.js"(J,G){"use strict";G.exports=function(b,E){var k=b.cd,l=b.xaxis,e=b.yaxis,t=[],n,r=k[0].t.bPos||0;if(E===!1)for(n=0;nc?function(i){return i<=0}:function(i){return i>=0};r.c2g=function(i){var T=r.c2l(i)-s;return(m(T)?T:0)+v},r.g2c=function(i){return r.l2c(i+s-v)},r.g2p=function(i){return i*f},r.c2p=function(i){return r.g2p(r.c2g(i))}}}function e(r,a){return a==="degrees"?E(r):r}function t(r,a){return a==="degrees"?k(r):r}function n(r,a){var o=r.type;if(o==="linear"){var s=r.d2c,c=r.c2d;r.d2c=function(g,f){return e(s(g),f)},r.c2d=function(g,f){return c(t(g,f))}}r.makeCalcdata=function(g,f){var v=g[f],m=g._length,i,T,S=function(h){return r.d2c(h,g.thetaunit)};if(v)for(i=new Array(m),T=0;T0?h:1/0},C=E(S,M),_=p.mod(C+1,S.length);return[S[C],S[_]]}function f(T){return Math.abs(T)>1e-10?T:0}function v(T,S,M){S=S||0,M=M||0;for(var C=T.length,_=new Array(C),w=0;w0?1:0}function b(t){var n=t[0],r=t[1];if(!isFinite(n)||!isFinite(r))return[1,0];var a=(n+1)*(n+1)+r*r;return[(n*n+r*r-1)/a,2*r/a]}function E(t,n){var r=n[0],a=n[1];return[r*t.radius+t.cx,-a*t.radius+t.cy]}function k(t,n){return n*t.radius}function l(t,n,r,a){var o=E(t,b([r,n])),s=o[0],c=o[1],g=E(t,b([a,n])),f=g[0],v=g[1];if(n===0)return["M"+s+","+c,"L"+f+","+v].join(" ");var m=k(t,1/Math.abs(n));return["M"+s+","+c,"A"+m+","+m+" 0 0,"+(n<0?1:0)+" "+f+","+v].join(" ")}function e(t,n,r,a){var o=k(t,1/(n+1)),s=E(t,b([n,r])),c=s[0],g=s[1],f=E(t,b([n,a])),v=f[0],m=f[1];if(p(r)!==p(a)){var i=E(t,b([n,0])),T=i[0],S=i[1];return["M"+c+","+g,"A"+o+","+o+" 0 0,"+(0Ie?(Ge=ee,qe=ee*Ie,ue=(ae-qe)/K.h/2,ke=[q[0],q[1]],_e=[W[0]+ue,W[1]-ue]):(Ge=ae/Ie,qe=ae,ue=(ee-Ge)/K.w/2,ke=[q[0]+ue,q[1]-ue],_e=[W[0],W[1]]),V.xLength2=Ge,V.yLength2=qe,V.xDomain2=ke,V.yDomain2=_e;var ve=V.xOffset2=K.l+K.w*ke[0],le=V.yOffset2=K.t+K.h*(1-_e[1]),Ae=V.radius=Ge/we,Be=V.innerRadius=V.getHole(se)*Ae,Xe=V.cx=ve-Ae*xe[0],Ye=V.cy=le+Ae*xe[3],yt=V.cxx=Xe-ve,gt=V.cyy=Ye-le,Tt=H.side,At;Tt==="counterclockwise"?(At=Tt,Tt="top"):Tt==="clockwise"&&(At=Tt,Tt="bottom"),V.radialAxis=V.mockAxis(ne,se,H,{_id:"x",side:Tt,_trueSide:At,domain:[Be/K.w,Ae/K.w]}),V.angularAxis=V.mockAxis(ne,se,X,{side:"right",domain:[0,Math.PI],autorange:!1}),V.doAutoRange(ne,se),V.updateAngularAxis(ne,se),V.updateRadialAxis(ne,se),V.updateRadialAxisTitle(ne,se),V.xaxis=V.mockCartesianAxis(ne,se,{_id:"x",domain:ke}),V.yaxis=V.mockCartesianAxis(ne,se,{_id:"y",domain:_e});var $t=V.pathSubplot();V.clipPaths.forTraces.select("path").attr("d",$t).attr("transform",l(yt,gt)),Z.frontplot.attr("transform",l(ve,le)).call(t.setClipUrl,V._hasClipOnAxisFalse?null:V.clipIds.forTraces,V.gd),Z.bg.attr("d",$t).attr("transform",l(Xe,Ye)).call(e.fill,se.bgcolor)},j.mockAxis=function(ne,se,V,Z){var K=E.extendFlat({},V,Z);return o(K,se,ne),K},j.mockCartesianAxis=function(ne,se,V){var Z=this,K=Z.isSmith,H=V._id,X=E.extendFlat({type:"linear"},V);a(X,ne);var q={x:[0,2],y:[1,3]};return X.setRange=function(){var W=Z.sectorBBox,ee=q[H],ae=Z.radialAxis._rl,he=(ae[1]-ae[0])/(1-Z.getHole(se));X.range=[W[ee[0]]*he,W[ee[1]]*he]},X.isPtWithinRange=H==="x"&&!K?function(W){return Z.isPtInside(W)}:function(){return!0},X.setRange(),X.setScale(),X},j.doAutoRange=function(ne,se){var V=this,Z=V.gd,K=V.radialAxis,H=V.getRadial(se);s(Z,K);var X=K.range;if(H.range=X.slice(),H._input.range=X.slice(),K._rl=[K.r2l(X[0],null,"gregorian"),K.r2l(X[1],null,"gregorian")],K.minallowed!==void 0){var q=K.r2l(K.minallowed);K._rl[0]>K._rl[1]?K._rl[1]=Math.max(K._rl[1],q):K._rl[0]=Math.max(K._rl[0],q)}if(K.maxallowed!==void 0){var W=K.r2l(K.maxallowed);K._rl[0]90&&ae<=270&&(he.tickangle=180);var Me=we?function(Ae){var Be=I(V,A([Ae.x,0]));return l(Be[0]-q,Be[1]-W)}:function(Ae){return l(he.l2p(Ae.x)+X,0)},Se=we?function(Ae){return z(V,Ae.x,-1/0,1/0)}:function(Ae){return V.pathArc(he.r2p(Ae.x)+X)},Ie=U(ee);if(V.radialTickLayout!==Ie&&(K["radial-axis"].selectAll(".xtick").remove(),V.radialTickLayout=Ie),xe){he.setScale();var Ge=0,qe=we?(he.tickvals||[]).filter(function(Ae){return Ae>=0}).map(function(Ae){return r.tickText(he,Ae,!0,!1)}):r.calcTicks(he),ke=we?qe:r.clipEnds(he,qe),_e=r.getTickSigns(he)[2];we&&((he.ticks==="top"&&he.side==="bottom"||he.ticks==="bottom"&&he.side==="top")&&(_e=-_e),he.ticks==="top"&&he.side==="top"&&(Ge=-he.ticklen),he.ticks==="bottom"&&he.side==="bottom"&&(Ge=he.ticklen)),r.drawTicks(Z,he,{vals:qe,layer:K["radial-axis"],path:r.makeTickPath(he,0,_e),transFn:Me,crisp:!1}),r.drawGrid(Z,he,{vals:ke,layer:K["radial-grid"],path:Se,transFn:E.noop,crisp:!1}),r.drawLabels(Z,he,{vals:qe,layer:K["radial-axis"],transFn:Me,labelFns:r.makeLabelFns(he,Ge)})}var ue=V.radialAxisAngle=V.vangles?F(Q(B(ee.angle),V.vangles)):ee.angle,ve=l(q,W),le=ve+k(-ue);re(K["radial-axis"],xe&&(ee.showticklabels||ee.ticks),{transform:le}),re(K["radial-grid"],xe&&ee.showgrid,{transform:we?"":ve}),re(K["radial-line"].select("line"),xe&&ee.showline,{x1:we?-H:X,y1:0,x2:H,y2:0,transform:le}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateRadialAxisTitle=function(ne,se,V){if(!this.isSmith){var Z=this,K=Z.gd,H=Z.radius,X=Z.cx,q=Z.cy,W=Z.getRadial(se),ee=Z.id+"title",ae=0;if(W.title){var he=t.bBox(Z.layers["radial-axis"].node()).height,xe=W.title.font.size,we=W.side;ae=we==="top"?xe:we==="counterclockwise"?-(he+xe*.4):he+xe*.8}var Me=V!==void 0?V:Z.radialAxisAngle,Se=B(Me),Ie=Math.cos(Se),Ge=Math.sin(Se),qe=X+H/2*Ie+ae*Ge,ke=q-H/2*Ge+ae*Ie;Z.layers["radial-axis-title"]=v.draw(K,ee,{propContainer:W,propName:Z.id+".radialaxis.title.text",placeholder:O(K,"Click to enter radial axis title"),attributes:{x:qe,y:ke,"text-anchor":"middle"},transform:{rotate:-Me}})}},j.updateAngularAxis=function(ne,se){var V=this,Z=V.gd,K=V.layers,H=V.radius,X=V.innerRadius,q=V.cx,W=V.cy,ee=V.getAngular(se),ae=V.angularAxis,he=V.isSmith;he||(V.fillViewInitialKey("angularaxis.rotation",ee.rotation),ae.setGeometry(),ae.setScale());var xe=he?function(Be){var Xe=I(V,A([0,Be.x]));return Math.atan2(Xe[0]-q,Xe[1]-W)-Math.PI/2}:function(Be){return ae.t2g(Be.x)};ae.type==="linear"&&ae.thetaunit==="radians"&&(ae.tick0=F(ae.tick0),ae.dtick=F(ae.dtick));var we=function(Be){return l(q+H*Math.cos(Be),W-H*Math.sin(Be))},Me=he?function(Be){var Xe=I(V,A([0,Be.x]));return l(Xe[0],Xe[1])}:function(Be){return we(xe(Be))},Se=he?function(Be){var Xe=I(V,A([0,Be.x])),Ye=Math.atan2(Xe[0]-q,Xe[1]-W)-Math.PI/2;return l(Xe[0],Xe[1])+k(-F(Ye))}:function(Be){var Xe=xe(Be);return we(Xe)+k(-F(Xe))},Ie=he?function(Be){return x(V,Be.x,0,1/0)}:function(Be){var Xe=xe(Be),Ye=Math.cos(Xe),yt=Math.sin(Xe);return"M"+[q+X*Ye,W-X*yt]+"L"+[q+H*Ye,W-H*yt]},Ge=r.makeLabelFns(ae,0),qe=Ge.labelStandoff,ke={};ke.xFn=function(Be){var Xe=xe(Be);return Math.cos(Xe)*qe},ke.yFn=function(Be){var Xe=xe(Be),Ye=Math.sin(Xe)>0?.2:1;return-Math.sin(Xe)*(qe+Be.fontSize*Ye)+Math.abs(Math.cos(Xe))*(Be.fontSize*_)},ke.anchorFn=function(Be){var Xe=xe(Be),Ye=Math.cos(Xe);return Math.abs(Ye)<.1?"middle":Ye>0?"start":"end"},ke.heightFn=function(Be,Xe,Ye){var yt=xe(Be);return-.5*(1+Math.sin(yt))*Ye};var _e=U(ee);V.angularTickLayout!==_e&&(K["angular-axis"].selectAll("."+ae._id+"tick").remove(),V.angularTickLayout=_e);var ue=he?[1/0].concat(ae.tickvals||[]).map(function(Be){return r.tickText(ae,Be,!0,!1)}):r.calcTicks(ae);he&&(ue[0].text="\u221E",ue[0].fontSize*=1.75);var ve;if(se.gridshape==="linear"?(ve=ue.map(xe),E.angleDelta(ve[0],ve[1])<0&&(ve=ve.slice().reverse())):ve=null,V.vangles=ve,ae.type==="category"&&(ue=ue.filter(function(Be){return E.isAngleInsideSector(xe(Be),V.sectorInRad)})),ae.visible){var le=ae.ticks==="inside"?-1:1,Ae=(ae.linewidth||1)/2;r.drawTicks(Z,ae,{vals:ue,layer:K["angular-axis"],path:"M"+le*Ae+",0h"+le*ae.ticklen,transFn:Se,crisp:!1}),r.drawGrid(Z,ae,{vals:ue,layer:K["angular-grid"],path:Ie,transFn:E.noop,crisp:!1}),r.drawLabels(Z,ae,{vals:ue,layer:K["angular-axis"],repositionOnUpdate:!0,transFn:Me,labelFns:ke})}re(K["angular-line"].select("path"),ee.showline,{d:V.pathSubplot(),transform:l(q,W)}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateFx=function(ne,se){if(!this.gd._context.staticPlot){var V=!this.isSmith;V&&(this.updateAngularDrag(ne),this.updateRadialDrag(ne,se,0),this.updateRadialDrag(ne,se,1)),this.updateHoverAndMainDrag(ne)}},j.updateHoverAndMainDrag=function(ne){var se=this,V=se.isSmith,Z=se.gd,K=se.layers,H=ne._zoomlayer,X=w.MINZOOM,q=w.OFFEDGE,W=se.radius,ee=se.innerRadius,ae=se.cx,he=se.cy,xe=se.cxx,we=se.cyy,Me=se.sectorInRad,Se=se.vangles,Ie=se.radialAxis,Ge=h.clampTiny,qe=h.findXYatLength,ke=h.findEnclosingVertexAngles,_e=w.cornerHalfWidth,ue=w.cornerLen/2,ve,le,Ae=c.makeDragger(K,"path","maindrag",ne.dragmode===!1?"none":"crosshair");p.select(Ae).attr("d",se.pathSubplot()).attr("transform",l(ae,he)),Ae.onmousemove=function(qt){f.hover(Z,qt,se.id),Z._fullLayout._lasthover=Ae,Z._fullLayout._hoversubplot=se.id},Ae.onmouseout=function(qt){Z._dragging||g.unhover(Z,qt)};var Be={element:Ae,gd:Z,subplot:se.id,plotinfo:{id:se.id,xaxis:se.xaxis,yaxis:se.yaxis},xaxes:[se.xaxis],yaxes:[se.yaxis]},Xe,Ye,yt,gt,Tt,At,$t,rr,_r;function Xt(qt,Vt){return Math.sqrt(qt*qt+Vt*Vt)}function or(qt,Vt){return Xt(qt-xe,Vt-we)}function Ot(qt,Vt){return Math.atan2(we-Vt,qt-xe)}function vt(qt,Vt){return[qt*Math.cos(Vt),qt*Math.sin(-Vt)]}function ht(qt,Vt){if(qt===0)return se.pathSector(2*_e);var Ht=ue/qt,Sr=Vt-Ht,Kr=Vt+Ht,Yt=Math.max(0,Math.min(qt,W)),Rt=Yt-_e,nr=Yt+_e;return"M"+vt(Rt,Sr)+"A"+[Rt,Rt]+" 0,0,0 "+vt(Rt,Kr)+"L"+vt(nr,Kr)+"A"+[nr,nr]+" 0,0,1 "+vt(nr,Sr)+"Z"}function De(qt,Vt,Ht){if(qt===0)return se.pathSector(2*_e);var Sr=vt(qt,Vt),Kr=vt(qt,Ht),Yt=Ge((Sr[0]+Kr[0])/2),Rt=Ge((Sr[1]+Kr[1])/2),nr,ur;if(Yt&&Rt){var cr=Rt/Yt,Rr=-1/cr,Qr=qe(_e,cr,Yt,Rt);nr=qe(ue,Rr,Qr[0][0],Qr[0][1]),ur=qe(ue,Rr,Qr[1][0],Qr[1][1])}else{var Zr,ha;Rt?(Zr=ue,ha=_e):(Zr=_e,ha=ue),nr=[[Yt-Zr,Rt-ha],[Yt+Zr,Rt-ha]],ur=[[Yt-Zr,Rt+ha],[Yt+Zr,Rt+ha]]}return"M"+nr.join("L")+"L"+ur.reverse().join("L")+"Z"}function Ne(){yt=null,gt=null,Tt=se.pathSubplot(),At=!1;var qt=Z._fullLayout[se.id];$t=e.luminosity(qt.bgcolor),rr=c.makeZoombox(H,$t,ae,he,Tt),rr.attr("fill-rule","evenodd"),_r=c.makeCorners(H,ae,he),T(Z)}function We(qt,Vt){return Vt=Math.max(Math.min(Vt,W),ee),qtX?(qt-1&&qt===1&&i(Vt,Z,[se.xaxis],[se.yaxis],se.id,Be),Ht.indexOf("event")>-1&&f.click(Z,Vt,se.id)}Be.prepFn=function(qt,Vt,Ht){var Sr=Z._fullLayout.dragmode,Kr=Ae.getBoundingClientRect();Z._fullLayout._calcInverseTransform(Z);var Yt=Z._fullLayout._invTransform;ve=Z._fullLayout._invScaleX,le=Z._fullLayout._invScaleY;var Rt=E.apply3DTransform(Yt)(Vt-Kr.left,Ht-Kr.top);if(Xe=Rt[0],Ye=Rt[1],Se){var nr=h.findPolygonOffset(W,Me[0],Me[1],Se);Xe+=xe+nr[0],Ye+=we+nr[1]}switch(Sr){case"zoom":Be.clickFn=Ct,V||(Se?Be.moveFn=Mt:Be.moveFn=Je,Be.doneFn=pt,Ne(qt,Vt,Ht));break;case"select":case"lasso":m(qt,Vt,Ht,Be,Sr);break}},g.init(Be)},j.updateRadialDrag=function(ne,se,V){var Z=this,K=Z.gd,H=Z.layers,X=Z.radius,q=Z.innerRadius,W=Z.cx,ee=Z.cy,ae=Z.radialAxis,he=w.radialDragBoxSize,xe=he/2;if(!ae.visible)return;var we=B(Z.radialAxisAngle),Me=ae._rl,Se=Me[0],Ie=Me[1],Ge=Me[V],qe=.75*(Me[1]-Me[0])/(1-Z.getHole(se))/X,ke,_e,ue;V?(ke=W+(X+xe)*Math.cos(we),_e=ee-(X+xe)*Math.sin(we),ue="radialdrag"):(ke=W+(q-xe)*Math.cos(we),_e=ee-(q-xe)*Math.sin(we),ue="radialdrag-inner");var ve=c.makeRectDragger(H,ue,"crosshair",-xe,-xe,he,he),le={element:ve,gd:K};ne.dragmode===!1&&(le.dragmode=!1),re(p.select(ve),ae.visible&&q0!=(V?Xe>Se:Xe=90||K>90&&H>=450?we=1:q<=0&&ee<=0?we=0:we=Math.max(q,ee),K<=180&&H>=180||K>180&&H>=540?ae=-1:X>=0&&W>=0?ae=0:ae=Math.min(X,W),K<=270&&H>=270||K>270&&H>=630?he=-1:q>=0&&ee>=0?he=0:he=Math.min(q,ee),H>=360?xe=1:X<=0&&W<=0?xe=0:xe=Math.max(X,W),[ae,he,xe,we]}function Q(ne,se){var V=function(K){return E.angleDist(ne,K)},Z=E.findIndexOfMin(se,V);return se[Z]}function re(ne,se,V){return se?(ne.attr("display",null),ne.attr(V)):ne&&ne.attr("display","none"),ne}}}),n4=ze({"src/plots/polar/layout_attributes.js"(J,G){"use strict";var p=fc(),b=cf(),E=Ml().attributes,k=Nr().extendFlat,l=Al().overrideAll,e=l({color:b.color,showline:k({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:k({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),t=l({tickmode:b.minor.tickmode,nticks:b.nticks,tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,ticklabelstep:b.ticklabelstep,showticklabels:b.showticklabels,labelalias:b.labelalias,minorloglabels:b.minorloglabels,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickfont:b.tickfont,tickangle:b.tickangle,tickformat:b.tickformat,tickformatstops:b.tickformatstops,layer:b.layer},"plot","from-root"),n={visible:k({},b.visible,{dflt:!0}),type:k({},b.type,{values:["-","linear","log","date","category"]}),autotypenumbers:b.autotypenumbers,autorangeoptions:{minallowed:b.autorangeoptions.minallowed,maxallowed:b.autorangeoptions.maxallowed,clipmin:b.autorangeoptions.clipmin,clipmax:b.autorangeoptions.clipmax,include:b.autorangeoptions.include,editType:"plot"},autorange:k({},b.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:k({},b.minallowed,{editType:"plot"}),maxallowed:k({},b.maxallowed,{editType:"plot"}),range:k({},b.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:b.categoryorder,categoryarray:b.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:b.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:k({},b.title.text,{editType:"plot",dflt:""}),font:k({},b.title.font,{editType:"plot"}),editType:"plot"},hoverformat:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(n,e,t);var r={visible:k({},b.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:b.autotypenumbers,categoryorder:b.categoryorder,categoryarray:b.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(r,e,t),G.exports={domain:E({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:p.background},radialaxis:n,angularaxis:r,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),qG=ze({"src/plots/polar/layout_defaults.js"(J,G){"use strict";var p=Nr(),b=Qn(),E=hs(),k=Zv(),l=zf().getSubplotData,e=Uv(),t=Ym(),n=ov(),r=sv(),a=Hx(),o=gg(),s=Jw(),c=Xm(),g=n4(),f=t4(),v=X2(),m=v.axisNames;function i(S,M,C,_){var w=C("bgcolor");_.bgColor=b.combine(w,_.paper_bgcolor);var h=C("sector");C("hole");var u=l(_.fullData,v.name,_.id),A=_.layoutOut,x;function z(xe,we){return C(x+"."+xe,we)}for(var I=0;I")}}G.exports={hoverPoints:b,makeHoverPointText:E}}}),HG=ze({"src/traces/scatterpolar/index.js"(J,G){"use strict";G.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:$2(),categories:["polar","symbols","showLegend","scatter-like"],attributes:uy(),supplyDefaults:K2().supplyDefaults,colorbar:Of(),formatLabels:J2(),calc:VG(),plot:GG(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:Q2().hoverPoints,selectPoints:Yv(),meta:{}}}}),WG=ze({"lib/scatterpolar.js"(J,G){"use strict";G.exports=HG()}}),i4=ze({"src/traces/scatterpolargl/attributes.js"(J,G){"use strict";var p=uy(),{cliponaxis:b,hoveron:E}=p,k=Lo(p,["cliponaxis","hoveron"]),{connectgaps:l,line:{color:e,dash:t,width:n},fill:r,fillcolor:a,marker:o,textfont:s,textposition:c}=ty();G.exports=lo(Li({},k),{connectgaps:l,fill:r,fillcolor:a,line:{color:e,dash:t,editType:"calc",width:n},marker:o,textfont:s,textposition:c})}}),YG=ze({"src/traces/scatterpolargl/defaults.js"(J,G){"use strict";var p=Nr(),b=el(),E=K2().handleRThetaDefaults,k=id(),l=_d(),e=xd(),t=Od(),n=zd().PTS_LINESONLY,r=i4();G.exports=function(o,s,c,g){function f(m,i){return p.coerce(o,s,r,m,i)}var v=E(o,s,g,f);if(!v){s.visible=!1;return}f("thetaunit"),f("mode",v=t&&(_.marker.cluster=T.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=A),_.line&&A.length>1&&e.extendFlat(_.line,l.linePositions(a,i,A)),_.text&&(e.extendFlat(_.text,{positions:A},l.textPosition(a,i,_.text,_.marker)),e.extendFlat(_.textSel,{positions:A},l.textPosition(a,i,_.text,_.markerSel)),e.extendFlat(_.textUnsel,{positions:A},l.textPosition(a,i,_.text,_.markerUnsel))),_.fill&&!f.fill2d&&(f.fill2d=!0),_.marker&&!f.scatter2d&&(f.scatter2d=!0),_.line&&!f.line2d&&(f.line2d=!0),_.text&&!f.glText&&(f.glText=!0),f.lineOptions.push(_.line),f.fillOptions.push(_.fill),f.markerOptions.push(_.marker),f.markerSelectedOptions.push(_.markerSel),f.markerUnselectedOptions.push(_.markerUnsel),f.textOptions.push(_.text),f.textSelectedOptions.push(_.textSel),f.textUnselectedOptions.push(_.textUnsel),f.selectBatch.push([]),f.unselectBatch.push([]),T.x=x,T.y=z,T.rawx=x,T.rawy=z,T.r=M,T.theta=C,T.positions=A,T._scene=f,T.index=f.count,f.count++}}),E(a,o,s)}},G.exports.reglPrecompiled=n}}),QG=ze({"src/traces/scatterpolargl/index.js"(J,G){"use strict";var p=KG();p.plot=JG(),G.exports=p}}),eH=ze({"lib/scatterpolargl.js"(J,G){"use strict";G.exports=QG()}}),o4=ze({"src/traces/barpolar/attributes.js"(J,G){"use strict";var{hovertemplateAttrs:p,templatefallbackAttrs:b}=xs(),E=Ki().extendFlat,k=uy(),l=jd();G.exports={r:k.r,theta:k.theta,r0:k.r0,dr:k.dr,theta0:k.theta0,dtheta:k.dtheta,thetaunit:k.thetaunit,base:E({},l.base,{}),offset:E({},l.offset,{}),width:E({},l.width,{}),text:E({},l.text,{}),hovertext:E({},l.hovertext,{}),marker:e(),hoverinfo:k.hoverinfo,hovertemplate:p(),hovertemplatefallback:b(),selected:l.selected,unselected:l.unselected};function e(){var t=E({},l.marker);return delete t.cornerradius,t}}}),s4=ze({"src/traces/barpolar/layout_attributes.js"(J,G){"use strict";G.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),tH=ze({"src/traces/barpolar/defaults.js"(J,G){"use strict";var p=Nr(),b=K2().handleRThetaDefaults,E=eb(),k=o4();G.exports=function(e,t,n,r){function a(s,c){return p.coerce(e,t,k,s,c)}var o=b(e,t,r,a);if(!o){t.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),E(e,t,a,n,r),p.coerceSelectionMarkerOpacity(t,a)}}}),rH=ze({"src/traces/barpolar/layout_defaults.js"(J,G){"use strict";var p=Nr(),b=s4();G.exports=function(E,k,l){var e={},t;function n(o,s){return p.coerce(E[t]||{},k[t],b,o,s)}for(var r=0;r0?(g=s,f=c):(g=c,f=s);var v=l.findEnclosingVertexAngles(g,t.vangles)[0],m=l.findEnclosingVertexAngles(f,t.vangles)[1],i=[v,(g+f)/2,m];return l.pathPolygonAnnulus(a,o,g,f,i,n,r)}:function(a,o,s,c){return E.pathAnnulus(a,o,s,c,n,r)}}}}),nH=ze({"src/traces/barpolar/hover.js"(J,G){"use strict";var p=Zl(),b=Nr(),E=e1().getTraceColor,k=b.fillText,l=Q2().makeHoverPointText,e=Z2().isPtInsidePolygon;G.exports=function(n,r,a){var o=n.cd,s=o[0].trace,c=n.subplot,g=c.radialAxis,f=c.angularAxis,v=c.vangles,m=v?e:b.isPtInsideSector,i=n.maxHoverDistance,T=f._period||2*Math.PI,S=Math.abs(g.g2p(Math.sqrt(r*r+a*a))),M=Math.atan2(a,r);g.range[0]>g.range[1]&&(M+=Math.PI);var C=function(u){return m(S,M,[u.rp0,u.rp1],[u.thetag0,u.thetag1],v)?i+Math.min(1,Math.abs(u.thetag1-u.thetag0)/T)-1+(u.rp1-S)/(u.rp1-u.rp0)-1:1/0};if(p.getClosest(o,C,n),n.index!==!1){var _=n.index,w=o[_];n.x0=n.x1=w.ct[0],n.y0=n.y1=w.ct[1];var h=b.extendFlat({},w,{r:w.s,theta:w.p});return k(w,s,n),l(h,s,c,n),n.hovertemplate=s.hovertemplate,n.color=E(s,w),n.xLabelVal=n.yLabelVal=void 0,w.s<0&&(n.idealAlign="left"),[n]}}}}),iH=ze({"src/traces/barpolar/index.js"(J,G){"use strict";G.exports={moduleType:"trace",name:"barpolar",basePlotModule:$2(),categories:["polar","bar","showLegend"],attributes:o4(),layoutAttributes:s4(),supplyDefaults:tH(),supplyLayoutDefaults:rH(),calc:l4().calc,crossTraceCalc:l4().crossTraceCalc,plot:aH(),colorbar:Of(),formatLabels:J2(),style:ld().style,styleOnSelect:ld().styleOnSelect,hoverPoints:nH(),selectPoints:t1(),meta:{}}}}),oH=ze({"lib/barpolar.js"(J,G){"use strict";G.exports=iH()}}),u4=ze({"src/plots/smith/constants.js"(J,G){"use strict";G.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),c4=ze({"src/plots/smith/layout_attributes.js"(J,G){"use strict";var p=fc(),b=cf(),E=Ml().attributes,k=Nr().extendFlat,l=Al().overrideAll,e=l({color:b.color,showline:k({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:k({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),t=l({ticklen:b.ticklen,tickwidth:k({},b.tickwidth,{dflt:2}),tickcolor:b.tickcolor,showticklabels:b.showticklabels,labelalias:b.labelalias,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,tickfont:b.tickfont,tickformat:b.tickformat,hoverformat:b.hoverformat,layer:b.layer},"plot","from-root"),n=k({visible:k({},b.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:k({},b.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,t),r=k({visible:k({},b.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:b.ticks,editType:"calc"},e,t);G.exports={domain:E({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:p.background},realaxis:n,imaginaryaxis:r,editType:"calc"}}}),sH=ze({"src/plots/smith/layout_defaults.js"(J,G){"use strict";var p=Nr(),b=Qn(),E=hs(),k=Zv(),l=zf().getSubplotData,e=sv(),t=ov(),n=gg(),r=Dd(),a=c4(),o=u4(),s=o.axisNames,c=f(function(v){return p.isTypedArray(v)&&(v=Array.from(v)),v.slice().reverse().map(function(m){return-m}).concat([0]).concat(v)},String);function g(v,m,i,T){var S=i("bgcolor");T.bgColor=b.combine(S,T.paper_bgcolor);var M=l(T.fullData,o.name,T.id),C=T.layoutOut,_;function w(U,$){return i(_+"."+U,$)}for(var h=0;h")}}G.exports={hoverPoints:b,makeHoverPointText:E}}}),pH=ze({"src/traces/scattersmith/index.js"(J,G){"use strict";G.exports={moduleType:"trace",name:"scattersmith",basePlotModule:lH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:f4(),supplyDefaults:uH(),colorbar:Of(),formatLabels:cH(),calc:fH(),plot:hH(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:dH().hoverPoints,selectPoints:Yv(),meta:{}}}}),vH=ze({"lib/scattersmith.js"(J,G){"use strict";G.exports=pH()}}),h4=ze({"src/traces/quiver/attributes.js"(J,G){"use strict";var p=ws(),b=xs().hovertemplateAttrs,E=Il().axisHoverFormat,k=Ki().extendFlat,l=qs(),e=Uc().dash,t=fv(),n=su(),r={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:n.x0,dx:n.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:n.y0,dy:n.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},arrowref:{valType:"enumerated",values:["paper","data"],dflt:"data",editType:"calc"},lengthmode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},lengthfactor:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:E("x"),yhoverformat:E("y"),uhoverformat:E("u","noDate"),vhoverformat:E("v","noDate"),hoverinfo:k({},p.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:b({},{keys:["x","y","u","v","text","name"]}),text:n.text,textposition:n.textposition,textfont:n.textfont,marker:k({arrowsize:k({},t.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:e,editType:"style"},editType:"calc"},l("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};G.exports=r}}),mH=ze({"src/traces/quiver/defaults.js"(J,G){"use strict";var p=Nr(),b=h4(),E=Gv(),k=Bf().hasColorscale,l=qc();G.exports=function(t,n,r,a){function o(S,M){return p.coerce(t,n,b,S,M)}var s=E(t,n,a,o);if(!s){n.visible=!1;return}var c=o("u"),g=o("v");if(!p.isArrayOrTypedArray(c)||c.length===0){n.u=new Array(s);for(var f=0;fO&&(O=c[Q]),g[Q]B&&(B=g[Q]),VP&&(P=V),ZU&&(U=Z);var K=Math.sqrt(V*V+Z*Z);if(K>i&&(i=K),KS&&(S=H))}}else re.x=k,re.y=k}if(a._maxNorm=i,u==="scaled"||A==="paper"){let Me=O-I,Se=B-D;var X;Me===0&&Se===0?X=1:X=(Me+Se+Math.sqrt((Me-Se)*(Me-Se)+4*$*Me*Se))/(2*($-1)),X*=t,a._scaleFactor=X/a._maxNorm}else a._scaleFactor=1;a._scaleFactor*=a.lengthfactor;let q=new Array(f),W=new Array(f),ee=new Array(f),ae=new Array(f);for(var he,xe,Q=0;Qg.i&&isFinite(f[g.i]))v=f[g.i];else{var m=o.u&&o.u[g.i]||0,i=o.v&&o.v[g.i]||0;v=Math.sqrt(m*m+i*i)}return g.mcc=c(v),g.mcc})}function t(a){var o=p.select(a).selectAll("g.trace.quiver");o.each(function(s){r(a,s,p.select(this))})}function n(a,o,s){r(a,o,s)}function r(a,o,s){var c=o[0].trace,g=c.marker||{},f=g.line||{},v=b.isArrayOrTypedArray(g.color)?void 0:g.color,m=c._hasColorscale;if(s)if(c.selectedpoints){var i=(c.selected||{}).marker||{},T=(c.unselected||{}).marker||{},S=i.line||{},M=T.line||{};s.selectAll("path.js-line").each(function(_){var w=p.select(this),h=!_.selected,u=h?T.color:i.color,A=h?M.width!==void 0?M.width:f.width:S.width!==void 0?S.width:f.width;u?(E.lineGroupStyle(w,A,u,f.dash),w.style("stroke-opacity",1)):(E.lineGroupStyle(w,A,v,f.dash),m&&e(w,c),w.style("stroke-opacity",h?l:1))}),E.selectedTextStyle(s.selectAll("text"),c)}else{var C=s.selectAll("path.js-line");C.call(E.lineGroupStyle,f.width,v,f.dash),m&&e(C,c),C.style("stroke-opacity",1),E.textPointStyle(s.selectAll("text"),c,a)}}G.exports={style:t,styleOnSelect:n,colorscaleStroke:e}}}),_H=ze({"src/traces/quiver/plot.js"(J,G){"use strict";var p=ci(),b=Nr(),E=Xi(),k=e3().colorscaleStroke,l=Math.PI/12,e=5.8,t=1.5,n=.7;G.exports=function(o,s,c,g,f,v){var m,i,T=!f,S=!!f&&f.duration>0;if(m=g.selectAll("g.trace").data(c,function(C){return C[0].trace.uid}),m.enter().append("g").attr("class",function(C){return"trace quiver trace"+C[0].trace.uid}).style("stroke-miterlimit",2),m.order(),S){v&&(i=v());var M=p.transition().duration(f.duration).ease(f.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()});M.each(function(){g.selectAll("g.trace").each(function(C,_){r(o,_,s,C,c,this,f)})})}else m.each(function(C,_){r(o,_,s,C,c,this,f)});T&&m.exit().remove()};function r(a,o,s,c,g,f,v){var m=c[0].trace,i=s.xaxis,T=s.yaxis;c[0][s.isRangePlot?"nodeRangePlot3":"node3"]=p.select(f);var S=p.select(f).selectAll("g.lines").data([c]);S.enter().append("g").classed("lines",!0),E.setClipUrl(S,s.layerClipId,a);var M=S.selectAll("path.js-line").data(c);M.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),M.exit().remove();let{anchor:C,maxNorm:_=0,arrowref:w}=m,h=w==="paper"?m._scaleFactor*Math.sqrt(Math.abs(i._m*T._m)):m._scaleFactor,u=m.marker.arrowsize;M.each(function(B){let F=p.select(this);if(B.x===void 0||B.y===void 0){F.attr("d",null);return}let P=(w==="paper"?B._u*Math.sign(i._m):p.round(i._m*B._u))*h,j=(w==="paper"?B._v*Math.sign(T._m):p.round(T._m*B._v))*h,U=(m._input.marker||{}).arrowsize!==void 0;var $,Q,re,ne;C==="tip"?($=i.c2p(B.x)-P,re=T.c2p(B.y)-j,Q=i.c2p(B.x),ne=T.c2p(B.y)):C==="center"?($=i.c2p(B.x)-P/2,re=T.c2p(B.y)-j/2,Q=i.c2p(B.x)+P/2,ne=T.c2p(B.y)+j/2):($=i.c2p(B.x),re=T.c2p(B.y),Q=i.c2p(B.x)+P,ne=T.c2p(B.y)+j),B._px0=$,B._py0=re,B._px1=Q,B._py1=ne;var se=m.marker.line.width;U||(se=Math.max(se,t));let V=Math.sqrt((Q-$)*(Q-$)+(ne-re)*(ne-re)),Z=n*V,K=Math.min(e*u*se,Z),H=Math.atan2(ne-re,Q-$),X=Q-K*Math.cos(H-l),q=ne-K*Math.sin(H-l),W=Q-K*Math.cos(H+l),ee=ne-K*Math.sin(H+l),ae="M"+$+","+re+"L"+Q+","+ne+"L"+X+","+q+"L"+Q+","+ne+"L"+W+","+ee;F.attr("d",ae)});var A=m.marker||{},x=A.line||{},z=b.isArrayOrTypedArray(A.color)?void 0:A.color;E.lineGroupStyle(M,x.width,z,x.dash),m._hasColorscale&&k(M,m);var I=p.select(f).selectAll("g.text").data([c]);I.enter().append("g").classed("text",!0),E.setClipUrl(I,s.layerClipId,a);var O=I.selectAll("g.textpoint").data(c);if(O.enter().append("g").classed("textpoint",!0).append("text"),O.exit().remove(),O.each(function(B){var F=p.select(this),P=E.translatePoint(B,F.select("text"),i,T);P||F.remove()}),O.selectAll("text").call(E.textPointStyle,m,a).each(function(B){var F=i.c2p(B.x),P=T.c2p(B.y);p.select(this).selectAll("tspan.line").each(function(){p.select(this).attr({x:F,y:P})})}),v&&v.duration>0){var D=p.transition().duration(v.duration).ease(v.easing);M.transition(D).style("opacity",1)}}}}),xH=ze({"src/traces/quiver/hover.js"(J,G){"use strict";var p=Nr(),b=Zl(),E=Jm();function k(l,e,t,n,r,a){let o=r-t,s=a-n,c=o*o+s*s;if(!c)return Math.sqrt((l-t)*(l-t)+(e-n)*(e-n));var g=((l-t)*o+(e-n)*s)/c;g=Math.max(0,Math.min(1,g));let f=t+g*o,v=n+g*s;return Math.sqrt((l-f)*(l-f)+(e-v)*(e-v))}G.exports=function(e,t,n,r){var a=e.cd,o=a[0].trace,s=e.xa,c=e.ya,g=s.c2p(t),f=c.c2p(n),v=function(w){return w._px0===void 0?1/0:k(g,f,w._px0,w._py0,w._px1,w._py1)};if(b.getClosest(a,v,e),e.index!==!1){var m=a[e.index],i=s.c2p(m.x,!0),T=c.c2p(m.y,!0),S=Math.sqrt((g-i)*(g-i)+(f-T)*(f-T));e.index=m.i;var M=o.u?o.u[m.i]:0,C=o.v?o.v[m.i]:0,_="u: "+M+", v: "+C;return p.extendFlat(e,{color:E(o,m),x0:i-3,x1:i+3,xLabelVal:m.x,y0:T-3,y1:T+3,yLabelVal:m.y,uLabelVal:M,vLabelVal:C,extraText:_,spikeDistance:S,hovertemplate:o.hovertemplate}),p.fillText(m,o,e),[e]}}}}),bH=ze({"src/traces/quiver/format_labels.js"(J,G){"use strict";var p=Gi(),b=Nr();G.exports=function(k,l,e){var t={},n={_fullLayout:e},r=p.getFromTrace(n,l,"x"),a=p.getFromTrace(n,l,"y"),o=k.x,s=k.y;t.xLabel=p.tickText(r,r.c2l(o),!0).text,t.yLabel=p.tickText(a,a.c2l(s),!0).text;var c=l.u?l.u[k.i]:0,g=l.v?l.v[k.i]:0,f=l.uhoverformat,v=l.vhoverformat;return t.uLabel=f?b.numberFormat(f)(c):String(c),t.vLabel=v?b.numberFormat(v)(g):String(g),t}}}),wH=ze({"src/traces/quiver/event_data.js"(J,G){"use strict";G.exports=function(b,E,k,l,e){return b.x=E.x,b.y=E.y,b.u=k.u?k.u[e]:void 0,b.v=k.v?k.v[e]:void 0,b}}}),TH=ze({"src/traces/quiver/index.js"(J,G){"use strict";G.exports={moduleType:"trace",name:"quiver",basePlotModule:Du(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:h4(),supplyDefaults:mH(),calc:gH(),crossTraceCalc:yH(),plot:_H(),style:e3().style,styleOnSelect:e3().styleOnSelect,hoverPoints:xH(),formatLabels:bH(),eventData:wH(),selectPoints:Yv(),colorbar:Of(),animatable:!0,meta:{}}}}),AH=ze({"lib/quiver.js"(J,G){"use strict";G.exports=TH()}}),th=ze({"node_modules/world-calendars/dist/main.js"(J,G){var p=Vc();function b(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}p(b.prototype,{instance:function(n,r){n=(n||"gregorian").toLowerCase(),r=r||"";var a=this._localCals[n+"-"+r];if(!a&&this.calendars[n]&&(a=new this.calendars[n](r),this._localCals[n+"-"+r]=a),!a)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,n);return a},newDate:function(n,r,a,o,s){return o=(n!=null&&n.year?n.calendar():typeof o=="string"?this.instance(o,s):o)||this.instance(),o.newDate(n,r,a)},substituteDigits:function(n){return function(r){return(r+"").replace(/[0-9]/g,function(a){return n[a]})}},substituteChineseDigits:function(n,r){return function(a){for(var o="",s=0;a>0;){var c=a%10;o=(c===0?"":n[c]+r[s])+o,s++,a=Math.floor(a/10)}return o.indexOf(n[1]+r[1])===0&&(o=o.substr(1)),o||n[0]}}});function E(n,r,a,o){if(this._calendar=n,this._year=r,this._month=a,this._day=o,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function k(n,r){return n=""+n,"000000".substring(0,r-n.length)+n}p(E.prototype,{newDate:function(n,r,a){return this._calendar.newDate(n??this,r,a)},year:function(n){return arguments.length===0?this._year:this.set(n,"y")},month:function(n){return arguments.length===0?this._month:this.set(n,"m")},day:function(n){return arguments.length===0?this._day:this.set(n,"d")},date:function(n,r,a){if(!this._calendar.isValid(n,r,a))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=n,this._month=r,this._day=a,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(n,r){return this._calendar.add(this,n,r)},set:function(n,r){return this._calendar.set(this,n,r)},compareTo:function(n){if(this._calendar.name!==n._calendar.name)throw(t.local.differentCalendars||t.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,n._calendar.local.name);var r=this._year!==n._year?this._year-n._year:this._month!==n._month?this.monthOfYear()-n.monthOfYear():this._day-n._day;return r===0?0:r<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(n){return this._calendar.fromJD(n)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(n){return this._calendar.fromJSDate(n)},toString:function(){return(this.year()<0?"-":"")+k(Math.abs(this.year()),4)+"-"+k(this.month(),2)+"-"+k(this.day(),2)}});function l(){this.shortYearCutoff="+10"}p(l.prototype,{_validateLevel:0,newDate:function(n,r,a){return n==null?this.today():(n.year&&(this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),a=n.day(),r=n.month(),n=n.year()),new E(this,n,r,a))},today:function(){return this.fromJSDate(new Date)},epoch:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+k(Math.abs(r.year()),4)},monthsInYear:function(n){return this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear),12},monthOfYear:function(n,r){var a=this._validate(n,r,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth);return(a.month()+this.monthsInYear(a)-this.firstMonth)%this.monthsInYear(a)+this.minMonth},fromMonthOfYear:function(n,r){var a=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(n)+this.minMonth;return this._validate(n,a,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth),a},daysInYear:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate);return o.toJD()-this.newDate(o.year(),this.fromMonthOfYear(o.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(o))+2)%this.daysInWeek()},extraInfo:function(n,r,a){return this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),{}},add:function(n,r,a){return this._validate(n,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate),this._correctAdd(n,this._add(n,r,a),r,a)},_add:function(n,r,a){if(this._validateLevel++,a==="d"||a==="w"){var o=n.toJD()+r*(a==="w"?this.daysInWeek():1),s=n.calendar().fromJD(o);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var c=n.year()+(a==="y"?r:0),g=n.monthOfYear()+(a==="m"?r:0),s=n.day(),f=function(i){for(;gT-1+i.minMonth;)c++,g-=T,T=i.monthsInYear(c)};a==="y"?(n.month()!==this.fromMonthOfYear(c,g)&&(g=this.newDate(c,n.month(),this.minDay).monthOfYear()),g=Math.min(g,this.monthsInYear(c)),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,g)))):a==="m"&&(f(this),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,g))));var v=[c,this.fromMonthOfYear(c,g),s];return this._validateLevel--,v}catch(m){throw this._validateLevel--,m}},_correctAdd:function(n,r,a,o){if(!this.hasYearZero&&(o==="y"||o==="m")&&(r[0]===0||n.year()>0!=r[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[o],c=a<0?-1:1;r=this._add(n,a*s[0]+c*s[1],s[2])}return n.date(r[0],r[1],r[2])},set:function(n,r,a){this._validate(n,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate);var o=a==="y"?r:n.year(),s=a==="m"?r:n.month(),c=a==="d"?r:n.day();return(a==="y"||a==="m")&&(c=Math.min(c,this.daysInMonth(o,s))),n.date(o,s,c)},isValid:function(n,r,a){this._validateLevel++;var o=this.hasYearZero||n!==0;if(o){var s=this.newDate(n,r,this.minDay);o=r>=this.minMonth&&r-this.minMonth=this.minDay&&a-this.minDay13.5?13:1),m=s-(v>2.5?4716:4715);return m<=0&&m--,this.newDate(m,v,f)},toJSDate:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),s=new Date(o.year(),o.month()-1,o.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(n){return this.newDate(n.getFullYear(),n.getMonth()+1,n.getDate())}});var t=G.exports=new b;t.cdate=E,t.baseCalendar=l,t.calendars.gregorian=e}}),MH=ze({"node_modules/world-calendars/dist/plus.js"(){var J=Vc(),G=th();J(G.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),G.local=G.regionalOptions[""],J(G.cdate.prototype,{formatDate:function(p,b){return typeof p!="string"&&(b=p,p=""),this._calendar.formatDate(p||"",this,b)}}),J(G.baseCalendar.prototype,{UNIX_EPOCH:G.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:G.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(p,b,E){if(typeof p!="string"&&(E=b,b=p,p=""),!b)return"";if(b.calendar()!==this)throw G.local.invalidFormat||G.regionalOptions[""].invalidFormat;p=p||this.local.dateFormat,E=E||{};for(var k=E.dayNamesShort||this.local.dayNamesShort,l=E.dayNames||this.local.dayNames,e=E.monthNumbers||this.local.monthNumbers,t=E.monthNamesShort||this.local.monthNamesShort,n=E.monthNames||this.local.monthNames,r=E.calculateWeek||this.local.calculateWeek,a=function(M,C){for(var _=1;S+_1},o=function(M,C,_,w){var h=""+C;if(a(M,w))for(;h.length<_;)h="0"+h;return h},s=function(M,C,_,w){return a(M)?w[C]:_[C]},c=this,g=function(M){return typeof e=="function"?e.call(c,M,a("m")):m(o("m",M.month(),2))},f=function(M,C){return C?typeof n=="function"?n.call(c,M):n[M.month()-c.minMonth]:typeof t=="function"?t.call(c,M):t[M.month()-c.minMonth]},v=this.local.digits,m=function(M){return E.localNumbers&&v?v(M):M},i="",T=!1,S=0;S1},T=function(z,I){var O=i(z,I),D=[2,3,O?4:2,O?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],B=new RegExp("^-?\\d{1,"+D+"}"),F=b.substring(h).match(B);if(!F)throw(G.local.missingNumberAt||G.regionalOptions[""].missingNumberAt).replace(/\{0\}/,h);return h+=F[0].length,parseInt(F[0],10)},S=this,M=function(){if(typeof n=="function"){i("m");var z=n.call(S,b.substring(h));return h+=z.length,z}return T("m")},C=function(z,I,O,D){for(var B=i(z,D)?O:I,F=0;F-1){c=1,g=f;for(var x=this.daysInMonth(s,c);g>x;x=this.daysInMonth(s,c))c++,g-=x}return o>-1?this.fromJD(o):this.newDate(s,c,g)},determineDate:function(p,b,E,k,l){E&&typeof E!="object"&&(l=k,k=E,E=null),typeof k!="string"&&(l=k,k="");var e=this,t=function(n){try{return e.parseDate(k,n,l)}catch{}n=n.toLowerCase();for(var r=(n.match(/^c/)&&E?E.newDate():null)||e.today(),a=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=a.exec(n);o;)r.add(parseInt(o[1],10),o[2]||"d"),o=a.exec(n);return r};return b=b?b.newDate():null,p=p==null?b:typeof p=="string"?t(p):typeof p=="number"?isNaN(p)||p===1/0||p===-1/0?b:e.today().add(p,"d"):e.newDate(p),p}})}}),SH=ze({"node_modules/world-calendars/dist/calendars/chinese.js"(){var J=th(),G=Vc(),p=J.instance();function b(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,G(b.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(o,s){if(typeof o=="string"){var c=o.match(k);return c?c[0]:""}var g=this._validateYear(o),f=o.month(),v=""+this.toChineseMonth(g,f);return s&&v.length<2&&(v="0"+v),this.isIntercalaryMonth(g,f)&&(v+="i"),v},monthNames:function(o){if(typeof o=="string"){var s=o.match(l);return s?s[0]:""}var c=this._validateYear(o),g=o.month(),f=this.toChineseMonth(c,g),v=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][f-1];return this.isIntercalaryMonth(c,g)&&(v="\u95F0"+v),v},monthNamesShort:function(o){if(typeof o=="string"){var s=o.match(e);return s?s[0]:""}var c=this._validateYear(o),g=o.month(),f=this.toChineseMonth(c,g),v=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][f-1];return this.isIntercalaryMonth(c,g)&&(v="\u95F0"+v),v},parseMonth:function(o,s){o=this._validateYear(o);var c=parseInt(s),g;if(isNaN(c))s[0]==="\u95F0"&&(g=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),c=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var f=s[s.length-1];g=f==="i"||f==="I"}var v=this.toMonthIndex(o,c,g);return v},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(o,s){if(o.year&&(o=o.year()),typeof o!="number"||o<1888||o>2111)throw s.replace(/\{0\}/,this.local.name);return o},toMonthIndex:function(o,s,c){var g=this.intercalaryMonth(o),f=c&&s!==g;if(f||s<1||s>12)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var v;return g?!c&&s<=g?v=s-1:v=s:v=s-1,v},toChineseMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o),g=c?12:11;if(s<0||s>g)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var f;return c?s>13;return c},isIntercalaryMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o);return!!c&&c===s},leapYear:function(o){return this.intercalaryMonth(o)!==0},weekOfYear:function(o,s,c){var g=this._validateYear(o,J.local.invalidyear),f=n[g-n[0]],v=f>>9&4095,m=f>>5&15,i=f&31,T;T=p.newDate(v,m,i),T.add(4-(T.dayOfWeek()||7),"d");var S=this.toJD(o,s,c)-T.toJD();return 1+Math.floor(S/7)},monthsInYear:function(o){return this.leapYear(o)?13:12},daysInMonth:function(o,s){o.year&&(s=o.month(),o=o.year()),o=this._validateYear(o);var c=t[o-t[0]],g=c>>13,f=g?12:11;if(s>f)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var v=c&1<<12-s?30:29;return v},weekDay:function(o,s,c){return(this.dayOfWeek(o,s,c)||7)<6},toJD:function(o,s,c){var g=this._validate(o,v,c,J.local.invalidDate);o=this._validateYear(g.year()),s=g.month(),c=g.day();var f=this.isIntercalaryMonth(o,s),v=this.toChineseMonth(o,s),m=a(o,v,c,f);return p.toJD(m.year,m.month,m.day)},fromJD:function(o){var s=p.fromJD(o),c=r(s.year(),s.month(),s.day()),g=this.toMonthIndex(c.year,c.month,c.isIntercalary);return this.newDate(c.year,g,c.day)},fromString:function(o){var s=o.match(E),c=this._validateYear(+s[1]),g=+s[2],f=!!s[3],v=this.toMonthIndex(c,g,f),m=+s[4];return this.newDate(c,v,m)},add:function(o,s,c){var g=o.year(),f=o.month(),v=this.isIntercalaryMonth(g,f),m=this.toChineseMonth(g,f),i=Object.getPrototypeOf(b.prototype).add.call(this,o,s,c);if(c==="y"){var T=i.year(),S=i.month(),M=this.isIntercalaryMonth(T,m),C=v&&M?this.toMonthIndex(T,m,!0):this.toMonthIndex(T,m,!1);C!==S&&i.month(C)}return i}});var E=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,k=/^\d?\d[iI]?/m,l=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;J.calendars.chinese=b;var t=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],n=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function r(o,s,c,g){var f,v;if(typeof o=="object")f=o,v=s||{};else{var m=typeof o=="number"&&o>=1888&&o<=2111;if(!m)throw new Error("Solar year outside range 1888-2111");var i=typeof s=="number"&&s>=1&&s<=12;if(!i)throw new Error("Solar month outside range 1 - 12");var T=typeof c=="number"&&c>=1&&c<=31;if(!T)throw new Error("Solar day outside range 1 - 31");f={year:o,month:s,day:c},v=g||{}}var S=n[f.year-n[0]],M=f.year<<9|f.month<<5|f.day;v.year=M>=S?f.year:f.year-1,S=n[v.year-n[0]];var C=S>>9&4095,_=S>>5&15,w=S&31,h,u=new Date(C,_-1,w),A=new Date(f.year,f.month-1,f.day);h=Math.round((A-u)/(24*3600*1e3));var x=t[v.year-t[0]],z;for(z=0;z<13;z++){var I=x&1<<12-z?30:29;if(h>13;return!O||z=1888&&o<=2111;if(!i)throw new Error("Lunar year outside range 1888-2111");var T=typeof s=="number"&&s>=1&&s<=12;if(!T)throw new Error("Lunar month outside range 1 - 12");var S=typeof c=="number"&&c>=1&&c<=30;if(!S)throw new Error("Lunar day outside range 1 - 30");var M;typeof g=="object"?(M=!1,v=g):(M=!!g,v=f||{}),m={year:o,month:s,day:c,isIntercalary:M}}var C;C=m.day-1;var _=t[m.year-t[0]],w=_>>13,h;w&&(m.month>w||m.isIntercalary)?h=m.month:h=m.month-1;for(var u=0;u>9&4095,I=x>>5&15,O=x&31,D=new Date(z,I-1,O+C);return v.year=D.getFullYear(),v.month=1+D.getMonth(),v.day=D.getDate(),v}}}),EH=ze({"node_modules/world-calendars/dist/calendars/coptic.js"(){var J=th(),G=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,G(p.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),b<0&&b++,l.day()+(l.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var E=Math.floor(b)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(b)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.coptic=p}}),kH=ze({"node_modules/world-calendars/dist/calendars/discworld.js"(){var J=th(),G=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,G(p.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),!1},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),13},daysInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),400},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return(e.day()+1)%8},weekDay:function(E,k,l){var e=this.dayOfWeek(E,k,l);return e>=2&&e<=6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{century:b[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return E=e.year()+(e.year()<0?1:0),k=e.month(),l=e.day(),l+(k>1?16:0)+(k>2?(k-2)*32:0)+(E-1)*400+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E+.5)-Math.floor(this.jdEpoch)-1;var k=Math.floor(E/400)+1;E-=(k-1)*400,E+=E>15?16:0;var l=Math.floor(E/32)+1,e=E-(l-1)*32+1;return this.newDate(k<=0?k-1:k,l,e)}});var b={20:"Fruitbat",21:"Anchovy"};J.calendars.discworld=p}}),CH=ze({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var J=th(),G=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,G(p.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),b<0&&b++,l.day()+(l.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var E=Math.floor(b)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(b)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.ethiopian=p}}),LH=ze({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var J=th(),G=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,G(p.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this._leapYear(k.year())},_leapYear:function(E){return E=E<0?E+1:E,b(E*7+1,19)<7},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),this._leapYear(E.year?E.year():E)?13:12},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return E=k.year(),this.toJD(E===-1?1:E+1,7,1)-this.toJD(E,7,1)},daysInMonth:function(E,k){return E.year&&(k=E.month(),E=E.year()),this._validate(E,k,this.minDay,J.local.invalidMonth),k===12&&this.leapYear(E)||k===8&&b(this.daysInYear(E),10)===5?30:k===9&&b(this.daysInYear(E),10)===3?29:this.daysPerMonth[k-1]},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=E<=0?E+1:E,n=this.jdEpoch+this._delay1(t)+this._delay2(t)+l+1;if(k<7){for(var r=7;r<=this.monthsInYear(E);r++)n+=this.daysInMonth(E,r);for(var r=1;r=this.toJD(k===-1?1:k+1,7,1);)k++;for(var l=Ethis.toJD(k,l,this.daysInMonth(k,l));)l++;var e=E-this.toJD(k,l,1)+1;return this.newDate(k,l,e)}});function b(E,k){return E-k*Math.floor(E/k)}J.calendars.hebrew=p}}),PH=ze({"node_modules/world-calendars/dist/calendars/islamic.js"(){var J=th(),G=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,G(p.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012Bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(b){var E=this._validate(b,this.minMonth,this.minDay,J.local.invalidYear);return(E.year()*11+14)%30<11},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(b){return this.leapYear(b)?355:354},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===12&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return this.dayOfWeek(b,E,k)!==5},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),E=l.month(),k=l.day(),b=b<=0?b+1:b,k+Math.ceil(29.5*(E-1))+(b-1)*354+Math.floor((3+11*b)/30)+this.jdEpoch-1},fromJD:function(b){b=Math.floor(b)+.5;var E=Math.floor((30*(b-this.jdEpoch)+10646)/10631);E=E<=0?E-1:E;var k=Math.min(12,Math.ceil((b-29-this.toJD(E,1,1))/29.5)+1),l=b-this.toJD(E,k,1)+1;return this.newDate(E,k,l)}}),J.calendars.islamic=p}}),RH=ze({"node_modules/world-calendars/dist/calendars/julian.js"(){var J=th(),G=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,G(p.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()<0?E.year()+1:E.year();return k%4===0},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===2&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),E=l.month(),k=l.day(),b<0&&b++,E<=2&&(b--,E+=12),Math.floor(365.25*(b+4716))+Math.floor(30.6001*(E+1))+k-1524.5},fromJD:function(b){var E=Math.floor(b+.5),k=E+1524,l=Math.floor((k-122.1)/365.25),e=Math.floor(365.25*l),t=Math.floor((k-e)/30.6001),n=t-Math.floor(t<14?1:13),r=l-Math.floor(n>2?4716:4715),a=k-e-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,n,a)}}),J.calendars.julian=p}}),IH=ze({"node_modules/world-calendars/dist/calendars/mayan.js"(){var J=th(),G=Vc();function p(k){this.local=this.regionalOptions[k||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,G(p.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),!1},formatYear:function(k){var l=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear);k=l.year();var e=Math.floor(k/400);k=k%400,k+=k<0?400:0;var t=Math.floor(k/20);return e+"."+t+"."+k%20},forYear:function(k){if(k=k.split("."),k.length<3)throw"Invalid Mayan year";for(var l=0,e=0;e19||e>0&&t<0)throw"Invalid Mayan year";l=l*20+t}return l},monthsInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),18},weekOfYear:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),0},daysInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),360},daysInMonth:function(k,l){return this._validate(k,l,this.minDay,J.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()},weekDay:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),!0},extraInfo:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate),n=t.toJD(),r=this._toHaab(n),a=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[a[0]-1],tzolkinDay:a[0],tzolkinTrecena:a[1]}},_toHaab:function(k){k-=this.jdEpoch;var l=b(k+8+17*20,365);return[Math.floor(l/20)+1,b(l,20)]},_toTzolkin:function(k){return k-=this.jdEpoch,[E(k+20,20),E(k+4,13)]},toJD:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()+t.month()*20+t.year()*360+this.jdEpoch},fromJD:function(k){k=Math.floor(k)+.5-this.jdEpoch;var l=Math.floor(k/360);k=k%360,k+=k<0?360:0;var e=Math.floor(k/20),t=k%20;return this.newDate(l,e,t)}});function b(k,l){return k-l*Math.floor(k/l)}function E(k,l){return b(k-1,l)+1}J.calendars.mayan=p}}),DH=ze({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var J=th(),G=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar;var b=J.instance("gregorian");G(p.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear);return b.leapYear(k.year()+(k.year()<1?1:0)+1469)},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidMonth),t=e.year();t<0&&t++;for(var n=e.day(),r=1;r=this.toJD(k+1,1,1);)k++;for(var l=E-Math.floor(this.toJD(k,1,1)+.5)+1,e=1;l>this.daysInMonth(k,e);)l-=this.daysInMonth(k,e),e++;return this.newDate(k,e,l)}}),J.calendars.nanakshahi=p}}),FH=ze({"node_modules/world-calendars/dist/calendars/nepali.js"(){var J=th(),G=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,G(p.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(b){return this.daysInYear(b)!==this.daysPerYear},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(b){var E=this._validate(b,this.minMonth,this.minDay,J.local.invalidYear);if(b=E.year(),typeof this.NEPALI_CALENDAR_DATA[b]>"u")return this.daysPerYear;for(var k=0,l=this.minMonth;l<=12;l++)k+=this.NEPALI_CALENDAR_DATA[b][l];return k},daysInMonth:function(b,E){return b.year&&(E=b.month(),b=b.year()),this._validate(b,E,this.minDay,J.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[b]>"u"?this.daysPerMonth[E-1]:this.NEPALI_CALENDAR_DATA[b][E]},weekDay:function(b,E,k){return this.dayOfWeek(b,E,k)!==6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);b=l.year(),E=l.month(),k=l.day();var e=J.instance(),t=0,n=E,r=b;this._createMissingCalendarData(b);var a=b-(n>9||n===9&&k>=this.NEPALI_CALENDAR_DATA[r][0]?56:57);for(E!==9&&(t=k,n--);n!==9;)n<=0&&(n=12,r--),t+=this.NEPALI_CALENDAR_DATA[r][n],n--;return E===9?(t+=k-this.NEPALI_CALENDAR_DATA[r][0],t<0&&(t+=e.daysInYear(a))):t+=this.NEPALI_CALENDAR_DATA[r][9]-this.NEPALI_CALENDAR_DATA[r][0],e.newDate(a,1,1).add(t,"d").toJD()},fromJD:function(b){var E=J.instance(),k=E.fromJD(b),l=k.year(),e=k.dayOfYear(),t=l+56;this._createMissingCalendarData(t);for(var n=9,r=this.NEPALI_CALENDAR_DATA[t][0],a=this.NEPALI_CALENDAR_DATA[t][n]-r+1;e>a;)n++,n>12&&(n=1,t++),a+=this.NEPALI_CALENDAR_DATA[t][n];var o=this.NEPALI_CALENDAR_DATA[t][n]-(a-e);return this.newDate(t,n,o)},_createMissingCalendarData:function(b){var E=this.daysPerMonth.slice(0);E.unshift(17);for(var k=b-1;k"u"&&(this.NEPALI_CALENDAR_DATA[k]=E)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),J.calendars.nepali=p}}),zH=ze({"node_modules/world-calendars/dist/calendars/persian.js"(){var J=th(),G=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}function b(E){var k=E-475;E<0&&k++;var l=.242197,e=l*k,t=l*(k+1),n=e-Math.floor(e),r=t-Math.floor(t);return n>r}p.prototype=new J.baseCalendar,G(p.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return b(k.year())},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=0;if(E>0)for(var n=1;n0?E-1:E)*365+t+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E)+.5;var k=475+(E-this.toJD(475,1,1))/365.242197,l=Math.floor(k);l<=0&&l--,E>this.toJD(l,12,b(l)?30:29)&&(l++,l===0&&l++);var e=E-this.toJD(l,1,1)+1,t=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),n=E-this.toJD(l,t,1)+1;return this.newDate(l,t,n)}}),J.calendars.persian=p,J.calendars.jalali=p}}),BH=ze({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var J=th(),G=Vc(),p=J.instance();function b(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,G(b.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return p.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return p.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return p.toJD(t,e.month(),e.day())},fromJD:function(E){var k=p.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)},_g2tYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)}}),J.calendars.taiwan=b}}),OH=ze({"node_modules/world-calendars/dist/calendars/thai.js"(){var J=th(),G=Vc(),p=J.instance();function b(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,G(b.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return p.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return p.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return p.toJD(t,e.month(),e.day())},fromJD:function(E){var k=p.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)},_g2tYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)}}),J.calendars.thai=b}}),NH=ze({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var J=th(),G=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,G(p.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this.daysInYear(k.year())===355},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){for(var k=0,l=1;l<=12;l++)k+=this.daysInMonth(E,l);return k},daysInMonth:function(E,k){for(var l=this._validate(E,k,this.minDay,J.local.invalidMonth),e=l.toJD()-24e5+.5,t=0,n=0;ne)return b[t]-b[t-1];t++}return 30},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate),t=12*(e.year()-1)+e.month()-15292,n=e.day()+b[t-1]-1;return n+24e5-.5},fromJD:function(E){for(var k=E-24e5+.5,l=0,e=0;ek);e++)l++;var t=l+15292,n=Math.floor((t-1)/12),r=n+1,a=t-12*n,o=k-b[l-1]+1;return this.newDate(r,a,o)},isValid:function(E,k,l){var e=J.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(E=E.year!=null?E.year:E,e=E>=1276&&E<=1500),e},_validate:function(E,k,l,e){var t=J.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw e.replace(/\{0\}/,this.local.name);return t}}),J.calendars.ummalqura=p;var b=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]}}),jH=ze({"src/components/calendars/calendars.js"(J,G){"use strict";G.exports=th(),MH(),SH(),EH(),kH(),CH(),LH(),PH(),RH(),IH(),DH(),FH(),zH(),BH(),OH(),NH()}}),UH=ze({"src/components/calendars/index.js"(J,G){"use strict";var p=jH(),b=Nr(),E=No(),k=E.EPOCHJD,l=E.ONEDAY,e={valType:"enumerated",values:b.sortObjectKeys(p.calendars),editType:"calc",dflt:"gregorian"},t=function(_,w,h,u){var A={};return A[h]=e,b.coerce(_,w,A,h,u)},n=function(_,w,h,u){for(var A=0;A0){if(++ye>=n$)return arguments[0]}else ye=0;return oe.apply(void 0,arguments)}}var qy=s$;var l$=qy(Fy),Vy=l$;var u$=/\{\n\/\* \[wrapped with (.+)\] \*/,c$=/,? & /;function f$(oe){var ye=oe.match(u$);return ye?ye[1].split(c$):[]}var zE=f$;var h$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function d$(oe,ye){var Fe=ye.length;if(!Fe)return oe;var dt=Fe-1;return ye[dt]=(Fe>1?"& ":"")+ye[dt],ye=ye.join(Fe>2?", ":" "),oe.replace(h$,`{ /* [wrapped with `+ye+`] */ -`)}var BE=d$;function p$(oe){return function(){return oe}}var G0=p$;var v$=function(){try{var oe=Fh(Object,"defineProperty");return oe({},"",{}),oe}catch{}}(),H0=v$;var m$=H0?function(oe,ye){return H0(oe,"toString",{configurable:!0,enumerable:!1,value:G0(ye),writable:!0})}:wl,OE=m$;var g$=qy(OE),W0=g$;function y$(oe,ye){for(var Fe=-1,dt=oe==null?0:oe.length;++Fe-1}var Rp=T$;var A$=1,M$=2,S$=8,E$=16,k$=32,C$=64,L$=128,P$=256,R$=512,I$=[["ary",L$],["bind",A$],["bindKey",M$],["curry",S$],["curryRight",E$],["flip",R$],["partial",k$],["partialRight",C$],["rearg",P$]];function D$(oe,ye){return af(I$,function(Fe){var dt="_."+Fe[0];ye&Fe[1]&&!Rp(oe,dt)&&oe.push(dt)}),oe.sort()}var jE=D$;function F$(oe,ye,Fe){var dt=ye+"";return W0(oe,BE(dt,jE(zE(dt),Fe)))}var Hy=F$;var z$=1,B$=2,O$=4,N$=8,UE=32,qE=64;function j$(oe,ye,Fe,dt,Zt,yr,Xr,ga,ya,Cn){var xn=ye&N$,On=xn?Xr:void 0,Fi=xn?void 0:Xr,ho=xn?yr:void 0,Li=xn?void 0:yr;ye|=xn?UE:qE,ye&=~(xn?qE:UE),ye&O$||(ye&=~(z$|B$));var lo=[oe,ye,Zt,ho,On,Li,Fi,ga,ya,Cn],Lo=Fe.apply(void 0,lo);return Ng(oe)&&Vy(Lo,lo),Lo.placeholder=dt,Hy(Lo,oe,ye)}var Wy=j$;function U$(oe){var ye=oe;return ye.placeholder}var Xh=U$;var q$=9007199254740991,V$=/^(?:0|[1-9]\d*)$/;function G$(oe,ye){var Fe=typeof oe;return ye=ye??q$,!!ye&&(Fe=="number"||Fe!="symbol"&&V$.test(oe))&&oe>-1&&oe%1==0&&oe1&&ze.reverse(),xn&&ya-1&&oe%1==0&&oe<=xK}var Ip=bK;function wK(oe){return oe!=null&&Ip(oe.length)&&!Ef(oe)}var Pl=wK;function TK(oe,ye,Fe){if(!as(Fe))return!1;var dt=typeof ye;return(dt=="number"?Pl(Fe)&&kf(ye,Fe.length):dt=="string"&&ye in Fe)?cc(Fe[ye],oe):!1}var Tl=TK;function AK(oe){return Ui(function(ye,Fe){var dt=-1,Zt=Fe.length,yr=Zt>1?Fe[Zt-1]:void 0,Xr=Zt>2?Fe[2]:void 0;for(yr=oe.length>3&&typeof yr=="function"?(Zt--,yr):void 0,Xr&&Tl(Fe[0],Fe[1],Xr)&&(yr=Zt<3?void 0:yr,Zt=1),ye=Object(ye);++dt-1}var w8=QJ;function eQ(oe,ye){var Fe=this.__data__,dt=Fp(Fe,oe);return dt<0?(++this.size,Fe.push([oe,ye])):Fe[dt][1]=ye,this}var T8=eQ;function Q0(oe){var ye=-1,Fe=oe==null?0:oe.length;for(this.clear();++ye0&&Fe(ga)?ye>1?I8(ga,ye-1,Fe,dt,Zt):vh(Zt,ga):dt||(Zt[Zt.length]=ga)}return Zt}var Zs=I8;function AQ(oe){var ye=oe==null?0:oe.length;return ye?Zs(oe,1):[]}var Qy=AQ;function MQ(oe){return W0(Xy(oe,void 0,Qy),oe+"")}var Rf=MQ;var SQ=Rf(rm),D8=SQ;var EQ=$y(Object.getPrototypeOf,Object),Np=EQ;var kQ="[object Object]",CQ=Function.prototype,LQ=Object.prototype,F8=CQ.toString,PQ=LQ.hasOwnProperty,RQ=F8.call(Object);function IQ(oe){if(!is(oe)||bl(oe)!=kQ)return!1;var ye=Np(oe);if(ye===null)return!0;var Fe=PQ.call(ye,"constructor")&&ye.constructor;return typeof Fe=="function"&&Fe instanceof Fe&&F8.call(Fe)==RQ}var Cd=IQ;var DQ="[object DOMException]",FQ="[object Error]";function zQ(oe){if(!is(oe))return!1;var ye=bl(oe);return ye==FQ||ye==DQ||typeof oe.message=="string"&&typeof oe.name=="string"&&!Cd(oe)}var am=zQ;var BQ=Ui(function(oe,ye){try{return gu(oe,void 0,ye)}catch(Fe){return am(Fe)?Fe:new Error(Fe)}}),e_=BQ;var OQ="Expected a function";function NQ(oe,ye){var Fe;if(typeof ye!="function")throw new TypeError(OQ);return oe=ji(oe),function(){return--oe>0&&(Fe=ye.apply(this,arguments)),oe<=1&&(ye=void 0),Fe}}var t_=NQ;var jQ=1,UQ=32,cw=Ui(function(oe,ye,Fe){var dt=jQ;if(Fe.length){var Zt=Mh(Fe,Xh(cw));dt|=UQ}return Cf(oe,dt,ye,Fe,Zt)});cw.placeholder={};var r_=cw;var qQ=Rf(function(oe,ye){return af(ye,function(Fe){Fe=Nc(Fe),Lf(oe,Fe,r_(oe[Fe],oe))}),oe}),z8=qQ;var VQ=1,GQ=2,HQ=32,fw=Ui(function(oe,ye,Fe){var dt=VQ|GQ;if(Fe.length){var Zt=Mh(Fe,Xh(fw));dt|=HQ}return Cf(ye,dt,oe,Fe,Zt)});fw.placeholder={};var B8=fw;function WQ(oe,ye,Fe){var dt=-1,Zt=oe.length;ye<0&&(ye=-ye>Zt?0:Zt+ye),Fe=Fe>Zt?Zt:Fe,Fe<0&&(Fe+=Zt),Zt=ye>Fe?0:Fe-ye>>>0,ye>>>=0;for(var yr=Array(Zt);++dt=dt?oe:Zu(oe,ye,Fe)}var mh=YQ;var XQ="\\ud800-\\udfff",ZQ="\\u0300-\\u036f",$Q="\\ufe20-\\ufe2f",KQ="\\u20d0-\\u20ff",JQ=ZQ+$Q+KQ,QQ="\\ufe0e\\ufe0f",eee="\\u200d",tee=RegExp("["+eee+XQ+JQ+QQ+"]");function ree(oe){return tee.test(oe)}var Kh=ree;function aee(oe){return oe.split("")}var O8=aee;var N8="\\ud800-\\udfff",nee="\\u0300-\\u036f",iee="\\ufe20-\\ufe2f",oee="\\u20d0-\\u20ff",see=nee+iee+oee,lee="\\ufe0e\\ufe0f",uee="["+N8+"]",hw="["+see+"]",dw="\\ud83c[\\udffb-\\udfff]",cee="(?:"+hw+"|"+dw+")",j8="[^"+N8+"]",U8="(?:\\ud83c[\\udde6-\\uddff]){2}",q8="[\\ud800-\\udbff][\\udc00-\\udfff]",fee="\\u200d",V8=cee+"?",G8="["+lee+"]?",hee="(?:"+fee+"(?:"+[j8,U8,q8].join("|")+")"+G8+V8+")*",dee=G8+V8+hee,pee="(?:"+[j8+hw+"?",hw,U8,q8,uee].join("|")+")",vee=RegExp(dw+"(?="+dw+")|"+pee+dee,"g");function mee(oe){return oe.match(vee)||[]}var H8=mee;function gee(oe){return Kh(oe)?H8(oe):O8(oe)}var nf=gee;function yee(oe){return function(ye){ye=To(ye);var Fe=Kh(ye)?nf(ye):void 0,dt=Fe?Fe[0]:ye.charAt(0),Zt=Fe?mh(Fe,1).join(""):ye.slice(1);return dt[oe]()+Zt}}var a_=yee;var _ee=a_("toUpperCase"),nm=_ee;function xee(oe){return nm(To(oe).toLowerCase())}var n_=xee;function bee(oe,ye,Fe,dt){var Zt=-1,yr=oe==null?0:oe.length;for(dt&&yr&&(Fe=oe[++Zt]);++Zt=ye?oe:ye)),oe}var Bh=xte;function bte(oe,ye,Fe){return Fe===void 0&&(Fe=ye,ye=void 0),Fe!==void 0&&(Fe=Bc(Fe),Fe=Fe===Fe?Fe:0),ye!==void 0&&(ye=Bc(ye),ye=ye===ye?ye:0),Bh(Bc(oe),ye,Fe)}var gk=bte;function wte(){this.__data__=new zp,this.size=0}var yk=wte;function Tte(oe){var ye=this.__data__,Fe=ye.delete(oe);return this.size=ye.size,Fe}var _k=Tte;function Ate(oe){return this.__data__.get(oe)}var xk=Ate;function Mte(oe){return this.__data__.has(oe)}var bk=Mte;var Ste=200;function Ete(oe,ye){var Fe=this.__data__;if(Fe instanceof zp){var dt=Fe.__data__;if(!Bp||dt.lengthga))return!1;var Cn=yr.get(oe),xn=yr.get(ye);if(Cn&&xn)return Cn==ye&&xn==oe;var On=-1,Fi=!0,ho=Fe&Eae?new Up:void 0;for(yr.set(oe,ye),yr.set(ye,oe);++On=ye||Oh<0||On&&ad>=yr}function zi(){var Po=wm();if(Lo(Po))return ze(Po);ga=setTimeout(zi,lo(Po))}function ze(Po){return ga=void 0,Fi&&dt?ho(Po):(dt=Zt=void 0,Xr)}function bu(){ga!==void 0&&clearTimeout(ga),Cn=0,dt=ya=Zt=ga=void 0}function uf(){return ga===void 0?Xr:ze(wm())}function Yl(){var Po=wm(),Oh=Lo(Po);if(dt=arguments,Zt=this,ya=Po,Oh){if(ga===void 0)return Li(ya);if(On)return clearTimeout(ga),ga=setTimeout(zi,ye),ho(ya)}return ga===void 0&&(ga=setTimeout(zi,ye)),Xr}return Yl.cancel=bu,Yl.flush=uf,Yl}var P_=jne;function Une(oe,ye){return oe==null||oe!==oe?ye:oe}var MC=Une;var SC=Object.prototype,qne=SC.hasOwnProperty,Vne=Ui(function(oe,ye){oe=Object(oe);var Fe=-1,dt=ye.length,Zt=dt>2?ye[2]:void 0;for(Zt&&Tl(ye[0],ye[1],Zt)&&(dt=1);++Fe=rie&&(yr=ep,Xr=!1,ye=new Up(ye));e:for(;++Zt=0&&oe.slice(Fe,Zt)==ye}var GC=bie;function wie(oe,ye){return ts(ye,function(Fe){return[Fe,oe[Fe]]})}var HC=wie;function Tie(oe){var ye=-1,Fe=Array(oe.size);return oe.forEach(function(dt){Fe[++ye]=[dt,dt]}),Fe}var WC=Tie;var Aie="[object Map]",Mie="[object Set]";function Sie(oe){return function(ye){var Fe=of(ye);return Fe==Aie?mm(ye):Fe==Mie?WC(ye):HC(ye,oe(ye))}}var B_=Sie;var Eie=B_(Ms),Xg=Eie;var kie=B_(Rl),Zg=kie;var Cie={"&":"&","<":"<",">":">",'"':""","'":"'"},Lie=om(Cie),YC=Lie;var XC=/[&<>"']/g,Pie=RegExp(XC.source);function Rie(oe){return oe=To(oe),oe&&Pie.test(oe)?oe.replace(XC,YC):oe}var O_=Rie;var ZC=/[\\^$.*+?()[\]{}|]/g,Iie=RegExp(ZC.source);function Die(oe){return oe=To(oe),oe&&Iie.test(oe)?oe.replace(ZC,"\\$&"):oe}var $C=Die;function Fie(oe,ye){for(var Fe=-1,dt=oe==null?0:oe.length;++FeZt?0:Zt+Fe),dt=dt===void 0||dt>Zt?Zt:ji(dt),dt<0&&(dt+=Zt),dt=Fe>dt?0:j_(dt);Fe-1?Zt[yr?ye[Xr]:Xr]:void 0}}var q_=Gie;var Hie=Math.max;function Wie(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=Fe==null?0:ji(Fe);return Zt<0&&(Zt=Hie(dt+Zt,0)),Pp(oe,Ti(ye,3),Zt)}var V_=Wie;var Yie=q_(V_),r7=Yie;function Xie(oe,ye,Fe){var dt;return Fe(oe,function(Zt,yr,Xr){if(ye(Zt,yr,Xr))return dt=yr,!1}),dt}var G_=Xie;function Zie(oe,ye){return G_(oe,Ti(ye,3),Df)}var a7=Zie;var $ie=Math.max,Kie=Math.min;function Jie(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=dt-1;return Fe!==void 0&&(Zt=ji(Fe),Zt=Fe<0?$ie(dt+Zt,0):Kie(Zt,dt-1)),Pp(oe,Ti(ye,3),Zt,!0)}var H_=Jie;var Qie=q_(H_),n7=Qie;function eoe(oe,ye){return G_(oe,Ti(ye,3),Mm)}var i7=eoe;function toe(oe){return oe&&oe.length?oe[0]:void 0}var $g=toe;function roe(oe,ye){var Fe=-1,dt=Pl(oe)?Array(oe.length):[];return yh(oe,function(Zt,yr,Xr){dt[++Fe]=ye(Zt,yr,Xr)}),dt}var W_=roe;function aoe(oe,ye){var Fe=Ii(oe)?ts:W_;return Fe(oe,Ti(ye,3))}var Wp=aoe;function noe(oe,ye){return Zs(Wp(oe,ye),1)}var o7=noe;var ioe=1/0;function ooe(oe,ye){return Zs(Wp(oe,ye),ioe)}var s7=ooe;function soe(oe,ye,Fe){return Fe=Fe===void 0?1:ji(Fe),Zs(Wp(oe,ye),Fe)}var l7=soe;var loe=1/0;function uoe(oe){var ye=oe==null?0:oe.length;return ye?Zs(oe,loe):[]}var u7=uoe;function coe(oe,ye){var Fe=oe==null?0:oe.length;return Fe?(ye=ye===void 0?1:ji(ye),Zs(oe,ye)):[]}var c7=coe;var foe=512;function hoe(oe){return Cf(oe,foe)}var f7=hoe;var doe=lm("floor"),h7=doe;var poe="Expected a function",voe=8,moe=32,goe=128,yoe=256;function _oe(oe){return Rf(function(ye){var Fe=ye.length,dt=Fe,Zt=dh.prototype.thru;for(oe&&ye.reverse();dt--;){var yr=ye[dt];if(typeof yr!="function")throw new TypeError(poe);if(Zt&&!Xr&&V0(yr)=="wrapper")var Xr=new dh([],!0)}for(dt=Xr?dt:Fe;++dtye}var Sm=Ioe;function Doe(oe){return function(ye,Fe){return typeof ye=="string"&&typeof Fe=="string"||(ye=Bc(ye),Fe=Bc(Fe)),oe(ye,Fe)}}var Xp=Doe;var Foe=Xp(Sm),T7=Foe;var zoe=Xp(function(oe,ye){return oe>=ye}),A7=zoe;var Boe=Object.prototype,Ooe=Boe.hasOwnProperty;function Noe(oe,ye){return oe!=null&&Ooe.call(oe,ye)}var M7=Noe;function joe(oe,ye){return oe!=null&&M_(oe,ye,M7)}var S7=joe;var Uoe=Math.max,qoe=Math.min;function Voe(oe,ye,Fe){return oe>=qoe(ye,Fe)&&oe-1:!!Zt&&Yh(oe,ye,Fe)>-1}var C7=$oe;var Koe=Math.max;function Joe(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=Fe==null?0:ji(Fe);return Zt<0&&(Zt=Koe(dt+Zt,0)),Yh(oe,ye,Zt)}var L7=Joe;function Qoe(oe){var ye=oe==null?0:oe.length;return ye?Zu(oe,0,-1):[]}var P7=Qoe;var ese=Math.min;function tse(oe,ye,Fe){for(var dt=Fe?Am:Rp,Zt=oe[0].length,yr=oe.length,Xr=yr,ga=Array(yr),ya=1/0,Cn=[];Xr--;){var xn=oe[Xr];Xr&&ye&&(xn=ts(xn,_u(ye))),ya=ese(xn.length,ya),ga[Xr]=!Fe&&(ye||Zt>=120&&xn.length>=120)?new Up(Xr&&xn):void 0}xn=oe[0];var On=-1,Fi=ga[0];e:for(;++On=-l9&&oe<=l9}var u9=$se;function Kse(oe){return oe===void 0}var c9=Kse;var Jse="[object WeakMap]";function Qse(oe){return is(oe)&&of(oe)==Jse}var f9=Qse;var ele="[object WeakSet]";function tle(oe){return is(oe)&&bl(oe)==ele}var h9=tle;var rle=1;function ale(oe){return Ti(typeof oe=="function"?oe:If(oe,rle))}var d9=ale;var nle=Array.prototype,ile=nle.join;function ole(oe,ye){return oe==null?"":ile.call(oe,ye)}var p9=ole;var sle=Jh(function(oe,ye,Fe){return oe+(Fe?"-":"")+ye.toLowerCase()}),v9=sle;var lle=Gp(function(oe,ye,Fe){Lf(oe,Fe,ye)}),m9=lle;function ule(oe,ye,Fe){for(var dt=Fe+1;dt--;)if(oe[dt]===ye)return dt;return dt}var g9=ule;var cle=Math.max,fle=Math.min;function hle(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=dt;return Fe!==void 0&&(Zt=ji(Fe),Zt=Zt<0?cle(dt+Zt,0):fle(Zt,dt-1)),ye===ye?g9(oe,ye,Zt):Pp(oe,Gy,Zt,!0)}var y9=hle;var dle=Jh(function(oe,ye,Fe){return oe+(Fe?" ":"")+ye.toLowerCase()}),_9=dle;var ple=a_("toLowerCase"),x9=ple;function vle(oe,ye){return oe=this.__values__.length,ye=oe?void 0:this.__values__[this.__index__++];return{done:oe,value:ye}}var O9=Hle;function Wle(oe,ye){var Fe=oe.length;if(Fe)return ye+=ye<0?Fe:0,kf(ye,Fe)?oe[ye]:void 0}var tx=Wle;function Yle(oe,ye){return oe&&oe.length?tx(oe,ji(ye)):void 0}var N9=Yle;function Xle(oe){return oe=ji(oe),Ui(function(ye){return tx(ye,oe)})}var j9=Xle;function Zle(oe,ye){return ye=ph(ye,oe),oe=Z_(oe,ye),oe==null||delete oe[Nc(xu(ye))]}var Im=Zle;function $le(oe){return Cd(oe)?void 0:oe}var U9=$le;var Kle=1,Jle=2,Qle=4,eue=Rf(function(oe,ye){var Fe={};if(oe==null)return Fe;var dt=!1;ye=ts(ye,function(yr){return yr=ph(yr,oe),dt||(dt=yr.length>1),yr}),Oc(oe,hm(oe),Fe),dt&&(Fe=If(Fe,Kle|Jle|Qle,U9));for(var Zt=ye.length;Zt--;)Im(Fe,ye[Zt]);return Fe}),q9=eue;function tue(oe,ye,Fe,dt){if(!as(oe))return oe;ye=ph(ye,oe);for(var Zt=-1,yr=ye.length,Xr=yr-1,ga=oe;ga!=null&&++Ztye||yr&&Xr&&ya&&!ga&&!Cn||dt&&Xr&&ya||!Fe&&ya||!Zt)return 1;if(!dt&&!yr&&!Cn&&oe=ga)return ya;var Cn=Fe[dt];return ya*(Cn=="desc"?-1:1)}}return oe.index-ye.index}var W9=lue;function uue(oe,ye,Fe){ye.length?ye=ts(ye,function(yr){return Ii(yr)?function(Xr){return zh(Xr,yr.length===1?yr[0]:yr)}:yr}):ye=[wl];var dt=-1;ye=ts(ye,_u(Ti));var Zt=W_(oe,function(yr,Xr,ga){var ya=ts(ye,function(Cn){return Cn(yr)});return{criteria:ya,index:++dt,value:yr}});return H9(Zt,function(yr,Xr){return W9(yr,Xr,Fe)})}var ix=uue;function cue(oe,ye,Fe,dt){return oe==null?[]:(Ii(ye)||(ye=ye==null?[]:[ye]),Fe=dt?void 0:Fe,Ii(Fe)||(Fe=Fe==null?[]:[Fe]),ix(oe,ye,Fe))}var Y9=cue;function fue(oe){return Rf(function(ye){return ye=ts(ye,_u(Ti)),Ui(function(Fe){var dt=this;return oe(ye,function(Zt){return gu(Zt,dt,Fe)})})})}var Dm=fue;var hue=Dm(ts),X9=hue;var due=Ui,Z9=due;var pue=Math.min,vue=Z9(function(oe,ye){ye=ye.length==1&&Ii(ye[0])?ts(ye[0],_u(Ti)):ts(Zs(ye,1),_u(Ti));var Fe=ye.length;return Ui(function(dt){for(var Zt=-1,yr=pue(dt.length,Fe);++Ztyue)return Fe;do ye%2&&(Fe+=oe),ye=_ue(ye/2),ye&&(oe+=oe);while(ye);return Fe}var Kg=xue;var bue=xm("length"),Q9=bue;var tL="\\ud800-\\udfff",wue="\\u0300-\\u036f",Tue="\\ufe20-\\ufe2f",Aue="\\u20d0-\\u20ff",Mue=wue+Tue+Aue,Sue="\\ufe0e\\ufe0f",Eue="["+tL+"]",yw="["+Mue+"]",_w="\\ud83c[\\udffb-\\udfff]",kue="(?:"+yw+"|"+_w+")",rL="[^"+tL+"]",aL="(?:\\ud83c[\\udde6-\\uddff]){2}",nL="[\\ud800-\\udbff][\\udc00-\\udfff]",Cue="\\u200d",iL=kue+"?",oL="["+Sue+"]?",Lue="(?:"+Cue+"(?:"+[rL,aL,nL].join("|")+")"+oL+iL+")*",Pue=oL+iL+Lue,Rue="(?:"+[rL+yw+"?",yw,aL,nL,Eue].join("|")+")",eL=RegExp(_w+"(?="+_w+")|"+Rue+Pue,"g");function Iue(oe){for(var ye=eL.lastIndex=0;eL.test(oe);)++ye;return ye}var sL=Iue;function Due(oe){return Kh(oe)?sL(oe):Q9(oe)}var ed=Due;var Fue=Math.ceil;function zue(oe,ye){ye=ye===void 0?" ":uc(ye);var Fe=ye.length;if(Fe<2)return Fe?Kg(ye,oe):ye;var dt=Kg(ye,Fue(oe/ed(ye)));return Kh(ye)?mh(nf(dt),0,oe).join(""):dt.slice(0,oe)}var Fv=zue;var Bue=Math.ceil,Oue=Math.floor;function Nue(oe,ye,Fe){oe=To(oe),ye=ji(ye);var dt=ye?ed(oe):0;if(!ye||dt>=ye)return oe;var Zt=(ye-dt)/2;return Fv(Oue(Zt),Fe)+oe+Fv(Bue(Zt),Fe)}var lL=Nue;function jue(oe,ye,Fe){oe=To(oe),ye=ji(ye);var dt=ye?ed(oe):0;return ye&&dt-1;)ga!==oe&&_L.call(ga,ya,1),_L.call(oe,ya,1);return oe}var Fm=ece;function tce(oe,ye){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye):oe}var sx=tce;var rce=Ui(sx),xL=rce;function ace(oe,ye,Fe){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye,Ti(Fe,2)):oe}var bL=ace;function nce(oe,ye,Fe){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye,void 0,Fe):oe}var wL=nce;var ice=Array.prototype,oce=ice.splice;function sce(oe,ye){for(var Fe=oe?ye.length:0,dt=Fe-1;Fe--;){var Zt=ye[Fe];if(Fe==dt||Zt!==yr){var yr=Zt;kf(Zt)?oce.call(oe,Zt,1):Im(oe,Zt)}}return oe}var lx=sce;var lce=Rf(function(oe,ye){var Fe=oe==null?0:oe.length,dt=rm(oe,ye);return lx(oe,ts(ye,function(Zt){return kf(Zt,Fe)?+Zt:Zt}).sort(nx)),dt}),TL=lce;var uce=Math.floor,cce=Math.random;function fce(oe,ye){return oe+uce(cce()*(ye-oe+1))}var zm=fce;var hce=parseFloat,dce=Math.min,pce=Math.random;function vce(oe,ye,Fe){if(Fe&&typeof Fe!="boolean"&&Tl(oe,ye,Fe)&&(ye=Fe=void 0),Fe===void 0&&(typeof ye=="boolean"?(Fe=ye,ye=void 0):typeof oe=="boolean"&&(Fe=oe,oe=void 0)),oe===void 0&&ye===void 0?(oe=0,ye=1):(oe=Dh(oe),ye===void 0?(ye=oe,oe=0):ye=Dh(ye)),oe>ye){var dt=oe;oe=ye,ye=dt}if(Fe||oe%1||ye%1){var Zt=pce();return dce(oe+Zt*(ye-oe+hce("1e-"+((Zt+"").length-1))),ye)}return zm(oe,ye)}var AL=vce;var mce=Math.ceil,gce=Math.max;function yce(oe,ye,Fe,dt){for(var Zt=-1,yr=gce(mce((ye-oe)/(Fe||1)),0),Xr=Array(yr);yr--;)Xr[dt?yr:++Zt]=oe,oe+=Fe;return Xr}var ML=yce;function _ce(oe){return function(ye,Fe,dt){return dt&&typeof dt!="number"&&Tl(ye,Fe,dt)&&(Fe=dt=void 0),ye=Dh(ye),Fe===void 0?(Fe=ye,ye=0):Fe=Dh(Fe),dt=dt===void 0?ye1&&Tl(oe,ye[0],ye[1])?ye=[]:Fe>2&&Tl(ye[0],ye[1],ye[2])&&(ye=[ye[0]]),ix(oe,Zs(ye,1),[])}),eP=nfe;var ife=4294967295,ofe=ife-1,sfe=Math.floor,lfe=Math.min;function ufe(oe,ye,Fe,dt){var Zt=0,yr=oe==null?0:oe.length;if(yr===0)return 0;ye=Fe(ye);for(var Xr=ye!==ye,ga=ye===null,ya=Ru(ye),Cn=ye===void 0;Zt>>1;function hfe(oe,ye,Fe){var dt=0,Zt=oe==null?dt:oe.length;if(typeof ye=="number"&&ye===ye&&Zt<=ffe){for(;dt>>1,Xr=oe[yr];Xr!==null&&!Ru(Xr)&&(Fe?Xr<=ye:Xr>>0,Fe?(oe=To(oe),oe&&(typeof ye=="string"||ye!=null&&!Lm(ye))&&(ye=uc(ye),!ye&&Kh(oe))?mh(nf(oe),0,Fe):oe.split(ye,Fe)):[]}var uP=Tfe;var Afe="Expected a function",Mfe=Math.max;function Sfe(oe,ye){if(typeof oe!="function")throw new TypeError(Afe);return ye=ye==null?0:Mfe(ji(ye),0),Ui(function(Fe){var dt=Fe[ye],Zt=mh(Fe,0,ye);return dt&&vh(Zt,dt),gu(oe,this,Zt)})}var cP=Sfe;var Efe=Jh(function(oe,ye,Fe){return oe+(Fe?" ":"")+nm(ye)}),fP=Efe;function kfe(oe,ye,Fe){return oe=To(oe),Fe=Fe==null?0:Bh(ji(Fe),0,oe.length),ye=uc(ye),oe.slice(Fe,Fe+ye.length)==ye}var hP=kfe;function Cfe(){return{}}var dP=Cfe;function Lfe(){return""}var pP=Lfe;function Pfe(){return!0}var vP=Pfe;var Rfe=kp(function(oe,ye){return oe-ye},0),mP=Rfe;function Ife(oe){return oe&&oe.length?Rm(oe,wl):0}var gP=Ife;function Dfe(oe,ye){return oe&&oe.length?Rm(oe,Ti(ye,2)):0}var yP=Dfe;function Ffe(oe){var ye=oe==null?0:oe.length;return ye?Zu(oe,1,ye):[]}var _P=Ffe;function zfe(oe,ye,Fe){return oe&&oe.length?(ye=Fe||ye===void 0?1:ji(ye),Zu(oe,0,ye<0?0:ye)):[]}var xP=zfe;function Bfe(oe,ye,Fe){var dt=oe==null?0:oe.length;return dt?(ye=Fe||ye===void 0?1:ji(ye),ye=dt-ye,Zu(oe,ye<0?0:ye,dt)):[]}var bP=Bfe;function Ofe(oe,ye){return oe&&oe.length?Hp(oe,Ti(ye,3),!1,!0):[]}var wP=Ofe;function Nfe(oe,ye){return oe&&oe.length?Hp(oe,Ti(ye,3)):[]}var TP=Nfe;function jfe(oe,ye){return ye(oe),oe}var AP=jfe;var MP=Object.prototype,Ufe=MP.hasOwnProperty;function qfe(oe,ye,Fe,dt){return oe===void 0||cc(oe,MP[Fe])&&!Ufe.call(dt,Fe)?ye:oe}var ww=qfe;var Vfe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Gfe(oe){return"\\"+Vfe[oe]}var SP=Gfe;var Hfe=/<%=([\s\S]+?)%>/g,dx=Hfe;var Wfe=/<%-([\s\S]+?)%>/g,EP=Wfe;var Yfe=/<%([\s\S]+?)%>/g,kP=Yfe;var Xfe={escape:EP,evaluate:kP,interpolate:dx,variable:"",imports:{_:{escape:O_}}},Qg=Xfe;var Zfe="Invalid `variable` option passed into `_.template`",$fe=/\b__p \+= '';/g,Kfe=/\b(__p \+=) '' \+/g,Jfe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Qfe=/[()=,{}\[\]\/\s]/,ehe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,px=/($^)/,the=/['\n\r\u2028\u2029\\]/g,rhe=Object.prototype,CP=rhe.hasOwnProperty;function ahe(oe,ye,Fe){var dt=Qg.imports._.templateSettings||Qg;Fe&&Tl(oe,ye,Fe)&&(ye=void 0),oe=To(oe),ye=Dp({},ye,dt,ww);var Zt=Dp({},ye.imports,dt.imports,ww),yr=Ms(Zt),Xr=Em(Zt,yr),ga,ya,Cn=0,xn=ye.interpolate||px,On="__p += '",Fi=RegExp((ye.escape||px).source+"|"+xn.source+"|"+(xn===dx?ehe:px).source+"|"+(ye.evaluate||px).source+"|$","g"),ho=CP.call(ye,"sourceURL")?"//# sourceURL="+(ye.sourceURL+"").replace(/\s/g," ")+` +`)}var BE=d$;function p$(oe){return function(){return oe}}var G0=p$;var v$=function(){try{var oe=Fh(Object,"defineProperty");return oe({},"",{}),oe}catch{}}(),H0=v$;var m$=H0?function(oe,ye){return H0(oe,"toString",{configurable:!0,enumerable:!1,value:G0(ye),writable:!0})}:wl,OE=m$;var g$=qy(OE),W0=g$;function y$(oe,ye){for(var Fe=-1,dt=oe==null?0:oe.length;++Fe-1}var Rp=T$;var A$=1,M$=2,S$=8,E$=16,k$=32,C$=64,L$=128,P$=256,R$=512,I$=[["ary",L$],["bind",A$],["bindKey",M$],["curry",S$],["curryRight",E$],["flip",R$],["partial",k$],["partialRight",C$],["rearg",P$]];function D$(oe,ye){return af(I$,function(Fe){var dt="_."+Fe[0];ye&Fe[1]&&!Rp(oe,dt)&&oe.push(dt)}),oe.sort()}var jE=D$;function F$(oe,ye,Fe){var dt=ye+"";return W0(oe,BE(dt,jE(zE(dt),Fe)))}var Hy=F$;var z$=1,B$=2,O$=4,N$=8,UE=32,qE=64;function j$(oe,ye,Fe,dt,Zt,yr,Xr,ga,ya,Cn){var xn=ye&N$,On=xn?Xr:void 0,Fi=xn?void 0:Xr,ho=xn?yr:void 0,Li=xn?void 0:yr;ye|=xn?UE:qE,ye&=~(xn?qE:UE),ye&O$||(ye&=~(z$|B$));var lo=[oe,ye,Zt,ho,On,Li,Fi,ga,ya,Cn],Lo=Fe.apply(void 0,lo);return N1(oe)&&Vy(Lo,lo),Lo.placeholder=dt,Hy(Lo,oe,ye)}var Wy=j$;function U$(oe){var ye=oe;return ye.placeholder}var Xh=U$;var q$=9007199254740991,V$=/^(?:0|[1-9]\d*)$/;function G$(oe,ye){var Fe=typeof oe;return ye=ye??q$,!!ye&&(Fe=="number"||Fe!="symbol"&&V$.test(oe))&&oe>-1&&oe%1==0&&oe1&&ze.reverse(),xn&&ya-1&&oe%1==0&&oe<=xK}var Ip=bK;function wK(oe){return oe!=null&&Ip(oe.length)&&!Ef(oe)}var Pl=wK;function TK(oe,ye,Fe){if(!as(Fe))return!1;var dt=typeof ye;return(dt=="number"?Pl(Fe)&&kf(ye,Fe.length):dt=="string"&&ye in Fe)?cc(Fe[ye],oe):!1}var Tl=TK;function AK(oe){return Ui(function(ye,Fe){var dt=-1,Zt=Fe.length,yr=Zt>1?Fe[Zt-1]:void 0,Xr=Zt>2?Fe[2]:void 0;for(yr=oe.length>3&&typeof yr=="function"?(Zt--,yr):void 0,Xr&&Tl(Fe[0],Fe[1],Xr)&&(yr=Zt<3?void 0:yr,Zt=1),ye=Object(ye);++dt-1}var w8=QJ;function eQ(oe,ye){var Fe=this.__data__,dt=Fp(Fe,oe);return dt<0?(++this.size,Fe.push([oe,ye])):Fe[dt][1]=ye,this}var T8=eQ;function Q0(oe){var ye=-1,Fe=oe==null?0:oe.length;for(this.clear();++ye0&&Fe(ga)?ye>1?I8(ga,ye-1,Fe,dt,Zt):vh(Zt,ga):dt||(Zt[Zt.length]=ga)}return Zt}var Zs=I8;function AQ(oe){var ye=oe==null?0:oe.length;return ye?Zs(oe,1):[]}var Qy=AQ;function MQ(oe){return W0(Xy(oe,void 0,Qy),oe+"")}var Rf=MQ;var SQ=Rf(rm),D8=SQ;var EQ=$y(Object.getPrototypeOf,Object),Np=EQ;var kQ="[object Object]",CQ=Function.prototype,LQ=Object.prototype,F8=CQ.toString,PQ=LQ.hasOwnProperty,RQ=F8.call(Object);function IQ(oe){if(!is(oe)||bl(oe)!=kQ)return!1;var ye=Np(oe);if(ye===null)return!0;var Fe=PQ.call(ye,"constructor")&&ye.constructor;return typeof Fe=="function"&&Fe instanceof Fe&&F8.call(Fe)==RQ}var Cd=IQ;var DQ="[object DOMException]",FQ="[object Error]";function zQ(oe){if(!is(oe))return!1;var ye=bl(oe);return ye==FQ||ye==DQ||typeof oe.message=="string"&&typeof oe.name=="string"&&!Cd(oe)}var am=zQ;var BQ=Ui(function(oe,ye){try{return gu(oe,void 0,ye)}catch(Fe){return am(Fe)?Fe:new Error(Fe)}}),e_=BQ;var OQ="Expected a function";function NQ(oe,ye){var Fe;if(typeof ye!="function")throw new TypeError(OQ);return oe=ji(oe),function(){return--oe>0&&(Fe=ye.apply(this,arguments)),oe<=1&&(ye=void 0),Fe}}var t_=NQ;var jQ=1,UQ=32,cw=Ui(function(oe,ye,Fe){var dt=jQ;if(Fe.length){var Zt=Mh(Fe,Xh(cw));dt|=UQ}return Cf(oe,dt,ye,Fe,Zt)});cw.placeholder={};var r_=cw;var qQ=Rf(function(oe,ye){return af(ye,function(Fe){Fe=Nc(Fe),Lf(oe,Fe,r_(oe[Fe],oe))}),oe}),z8=qQ;var VQ=1,GQ=2,HQ=32,fw=Ui(function(oe,ye,Fe){var dt=VQ|GQ;if(Fe.length){var Zt=Mh(Fe,Xh(fw));dt|=HQ}return Cf(ye,dt,oe,Fe,Zt)});fw.placeholder={};var B8=fw;function WQ(oe,ye,Fe){var dt=-1,Zt=oe.length;ye<0&&(ye=-ye>Zt?0:Zt+ye),Fe=Fe>Zt?Zt:Fe,Fe<0&&(Fe+=Zt),Zt=ye>Fe?0:Fe-ye>>>0,ye>>>=0;for(var yr=Array(Zt);++dt=dt?oe:Zu(oe,ye,Fe)}var mh=YQ;var XQ="\\ud800-\\udfff",ZQ="\\u0300-\\u036f",$Q="\\ufe20-\\ufe2f",KQ="\\u20d0-\\u20ff",JQ=ZQ+$Q+KQ,QQ="\\ufe0e\\ufe0f",eee="\\u200d",tee=RegExp("["+eee+XQ+JQ+QQ+"]");function ree(oe){return tee.test(oe)}var Kh=ree;function aee(oe){return oe.split("")}var O8=aee;var N8="\\ud800-\\udfff",nee="\\u0300-\\u036f",iee="\\ufe20-\\ufe2f",oee="\\u20d0-\\u20ff",see=nee+iee+oee,lee="\\ufe0e\\ufe0f",uee="["+N8+"]",hw="["+see+"]",dw="\\ud83c[\\udffb-\\udfff]",cee="(?:"+hw+"|"+dw+")",j8="[^"+N8+"]",U8="(?:\\ud83c[\\udde6-\\uddff]){2}",q8="[\\ud800-\\udbff][\\udc00-\\udfff]",fee="\\u200d",V8=cee+"?",G8="["+lee+"]?",hee="(?:"+fee+"(?:"+[j8,U8,q8].join("|")+")"+G8+V8+")*",dee=G8+V8+hee,pee="(?:"+[j8+hw+"?",hw,U8,q8,uee].join("|")+")",vee=RegExp(dw+"(?="+dw+")|"+pee+dee,"g");function mee(oe){return oe.match(vee)||[]}var H8=mee;function gee(oe){return Kh(oe)?H8(oe):O8(oe)}var nf=gee;function yee(oe){return function(ye){ye=To(ye);var Fe=Kh(ye)?nf(ye):void 0,dt=Fe?Fe[0]:ye.charAt(0),Zt=Fe?mh(Fe,1).join(""):ye.slice(1);return dt[oe]()+Zt}}var a_=yee;var _ee=a_("toUpperCase"),nm=_ee;function xee(oe){return nm(To(oe).toLowerCase())}var n_=xee;function bee(oe,ye,Fe,dt){var Zt=-1,yr=oe==null?0:oe.length;for(dt&&yr&&(Fe=oe[++Zt]);++Zt=ye?oe:ye)),oe}var Bh=xte;function bte(oe,ye,Fe){return Fe===void 0&&(Fe=ye,ye=void 0),Fe!==void 0&&(Fe=Bc(Fe),Fe=Fe===Fe?Fe:0),ye!==void 0&&(ye=Bc(ye),ye=ye===ye?ye:0),Bh(Bc(oe),ye,Fe)}var gk=bte;function wte(){this.__data__=new zp,this.size=0}var yk=wte;function Tte(oe){var ye=this.__data__,Fe=ye.delete(oe);return this.size=ye.size,Fe}var _k=Tte;function Ate(oe){return this.__data__.get(oe)}var xk=Ate;function Mte(oe){return this.__data__.has(oe)}var bk=Mte;var Ste=200;function Ete(oe,ye){var Fe=this.__data__;if(Fe instanceof zp){var dt=Fe.__data__;if(!Bp||dt.lengthga))return!1;var Cn=yr.get(oe),xn=yr.get(ye);if(Cn&&xn)return Cn==ye&&xn==oe;var On=-1,Fi=!0,ho=Fe&Eae?new Up:void 0;for(yr.set(oe,ye),yr.set(ye,oe);++On=ye||Oh<0||On&&ad>=yr}function zi(){var Po=wm();if(Lo(Po))return ze(Po);ga=setTimeout(zi,lo(Po))}function ze(Po){return ga=void 0,Fi&&dt?ho(Po):(dt=Zt=void 0,Xr)}function bu(){ga!==void 0&&clearTimeout(ga),Cn=0,dt=ya=Zt=ga=void 0}function uf(){return ga===void 0?Xr:ze(wm())}function Yl(){var Po=wm(),Oh=Lo(Po);if(dt=arguments,Zt=this,ya=Po,Oh){if(ga===void 0)return Li(ya);if(On)return clearTimeout(ga),ga=setTimeout(zi,ye),ho(ya)}return ga===void 0&&(ga=setTimeout(zi,ye)),Xr}return Yl.cancel=bu,Yl.flush=uf,Yl}var P_=jne;function Une(oe,ye){return oe==null||oe!==oe?ye:oe}var MC=Une;var SC=Object.prototype,qne=SC.hasOwnProperty,Vne=Ui(function(oe,ye){oe=Object(oe);var Fe=-1,dt=ye.length,Zt=dt>2?ye[2]:void 0;for(Zt&&Tl(ye[0],ye[1],Zt)&&(dt=1);++Fe=rie&&(yr=ep,Xr=!1,ye=new Up(ye));e:for(;++Zt=0&&oe.slice(Fe,Zt)==ye}var GC=bie;function wie(oe,ye){return ts(ye,function(Fe){return[Fe,oe[Fe]]})}var HC=wie;function Tie(oe){var ye=-1,Fe=Array(oe.size);return oe.forEach(function(dt){Fe[++ye]=[dt,dt]}),Fe}var WC=Tie;var Aie="[object Map]",Mie="[object Set]";function Sie(oe){return function(ye){var Fe=of(ye);return Fe==Aie?mm(ye):Fe==Mie?WC(ye):HC(ye,oe(ye))}}var B_=Sie;var Eie=B_(Ms),X1=Eie;var kie=B_(Rl),Z1=kie;var Cie={"&":"&","<":"<",">":">",'"':""","'":"'"},Lie=om(Cie),YC=Lie;var XC=/[&<>"']/g,Pie=RegExp(XC.source);function Rie(oe){return oe=To(oe),oe&&Pie.test(oe)?oe.replace(XC,YC):oe}var O_=Rie;var ZC=/[\\^$.*+?()[\]{}|]/g,Iie=RegExp(ZC.source);function Die(oe){return oe=To(oe),oe&&Iie.test(oe)?oe.replace(ZC,"\\$&"):oe}var $C=Die;function Fie(oe,ye){for(var Fe=-1,dt=oe==null?0:oe.length;++FeZt?0:Zt+Fe),dt=dt===void 0||dt>Zt?Zt:ji(dt),dt<0&&(dt+=Zt),dt=Fe>dt?0:j_(dt);Fe-1?Zt[yr?ye[Xr]:Xr]:void 0}}var q_=Gie;var Hie=Math.max;function Wie(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=Fe==null?0:ji(Fe);return Zt<0&&(Zt=Hie(dt+Zt,0)),Pp(oe,Ti(ye,3),Zt)}var V_=Wie;var Yie=q_(V_),r7=Yie;function Xie(oe,ye,Fe){var dt;return Fe(oe,function(Zt,yr,Xr){if(ye(Zt,yr,Xr))return dt=yr,!1}),dt}var G_=Xie;function Zie(oe,ye){return G_(oe,Ti(ye,3),Df)}var a7=Zie;var $ie=Math.max,Kie=Math.min;function Jie(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=dt-1;return Fe!==void 0&&(Zt=ji(Fe),Zt=Fe<0?$ie(dt+Zt,0):Kie(Zt,dt-1)),Pp(oe,Ti(ye,3),Zt,!0)}var H_=Jie;var Qie=q_(H_),n7=Qie;function eoe(oe,ye){return G_(oe,Ti(ye,3),Mm)}var i7=eoe;function toe(oe){return oe&&oe.length?oe[0]:void 0}var $1=toe;function roe(oe,ye){var Fe=-1,dt=Pl(oe)?Array(oe.length):[];return yh(oe,function(Zt,yr,Xr){dt[++Fe]=ye(Zt,yr,Xr)}),dt}var W_=roe;function aoe(oe,ye){var Fe=Ii(oe)?ts:W_;return Fe(oe,Ti(ye,3))}var Wp=aoe;function noe(oe,ye){return Zs(Wp(oe,ye),1)}var o7=noe;var ioe=1/0;function ooe(oe,ye){return Zs(Wp(oe,ye),ioe)}var s7=ooe;function soe(oe,ye,Fe){return Fe=Fe===void 0?1:ji(Fe),Zs(Wp(oe,ye),Fe)}var l7=soe;var loe=1/0;function uoe(oe){var ye=oe==null?0:oe.length;return ye?Zs(oe,loe):[]}var u7=uoe;function coe(oe,ye){var Fe=oe==null?0:oe.length;return Fe?(ye=ye===void 0?1:ji(ye),Zs(oe,ye)):[]}var c7=coe;var foe=512;function hoe(oe){return Cf(oe,foe)}var f7=hoe;var doe=lm("floor"),h7=doe;var poe="Expected a function",voe=8,moe=32,goe=128,yoe=256;function _oe(oe){return Rf(function(ye){var Fe=ye.length,dt=Fe,Zt=dh.prototype.thru;for(oe&&ye.reverse();dt--;){var yr=ye[dt];if(typeof yr!="function")throw new TypeError(poe);if(Zt&&!Xr&&V0(yr)=="wrapper")var Xr=new dh([],!0)}for(dt=Xr?dt:Fe;++dtye}var Sm=Ioe;function Doe(oe){return function(ye,Fe){return typeof ye=="string"&&typeof Fe=="string"||(ye=Bc(ye),Fe=Bc(Fe)),oe(ye,Fe)}}var Xp=Doe;var Foe=Xp(Sm),T7=Foe;var zoe=Xp(function(oe,ye){return oe>=ye}),A7=zoe;var Boe=Object.prototype,Ooe=Boe.hasOwnProperty;function Noe(oe,ye){return oe!=null&&Ooe.call(oe,ye)}var M7=Noe;function joe(oe,ye){return oe!=null&&M_(oe,ye,M7)}var S7=joe;var Uoe=Math.max,qoe=Math.min;function Voe(oe,ye,Fe){return oe>=qoe(ye,Fe)&&oe-1:!!Zt&&Yh(oe,ye,Fe)>-1}var C7=$oe;var Koe=Math.max;function Joe(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=Fe==null?0:ji(Fe);return Zt<0&&(Zt=Koe(dt+Zt,0)),Yh(oe,ye,Zt)}var L7=Joe;function Qoe(oe){var ye=oe==null?0:oe.length;return ye?Zu(oe,0,-1):[]}var P7=Qoe;var ese=Math.min;function tse(oe,ye,Fe){for(var dt=Fe?Am:Rp,Zt=oe[0].length,yr=oe.length,Xr=yr,ga=Array(yr),ya=1/0,Cn=[];Xr--;){var xn=oe[Xr];Xr&&ye&&(xn=ts(xn,_u(ye))),ya=ese(xn.length,ya),ga[Xr]=!Fe&&(ye||Zt>=120&&xn.length>=120)?new Up(Xr&&xn):void 0}xn=oe[0];var On=-1,Fi=ga[0];e:for(;++On=-l9&&oe<=l9}var u9=$se;function Kse(oe){return oe===void 0}var c9=Kse;var Jse="[object WeakMap]";function Qse(oe){return is(oe)&&of(oe)==Jse}var f9=Qse;var ele="[object WeakSet]";function tle(oe){return is(oe)&&bl(oe)==ele}var h9=tle;var rle=1;function ale(oe){return Ti(typeof oe=="function"?oe:If(oe,rle))}var d9=ale;var nle=Array.prototype,ile=nle.join;function ole(oe,ye){return oe==null?"":ile.call(oe,ye)}var p9=ole;var sle=Jh(function(oe,ye,Fe){return oe+(Fe?"-":"")+ye.toLowerCase()}),v9=sle;var lle=Gp(function(oe,ye,Fe){Lf(oe,Fe,ye)}),m9=lle;function ule(oe,ye,Fe){for(var dt=Fe+1;dt--;)if(oe[dt]===ye)return dt;return dt}var g9=ule;var cle=Math.max,fle=Math.min;function hle(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=dt;return Fe!==void 0&&(Zt=ji(Fe),Zt=Zt<0?cle(dt+Zt,0):fle(Zt,dt-1)),ye===ye?g9(oe,ye,Zt):Pp(oe,Gy,Zt,!0)}var y9=hle;var dle=Jh(function(oe,ye,Fe){return oe+(Fe?" ":"")+ye.toLowerCase()}),_9=dle;var ple=a_("toLowerCase"),x9=ple;function vle(oe,ye){return oe=this.__values__.length,ye=oe?void 0:this.__values__[this.__index__++];return{done:oe,value:ye}}var O9=Hle;function Wle(oe,ye){var Fe=oe.length;if(Fe)return ye+=ye<0?Fe:0,kf(ye,Fe)?oe[ye]:void 0}var tx=Wle;function Yle(oe,ye){return oe&&oe.length?tx(oe,ji(ye)):void 0}var N9=Yle;function Xle(oe){return oe=ji(oe),Ui(function(ye){return tx(ye,oe)})}var j9=Xle;function Zle(oe,ye){return ye=ph(ye,oe),oe=Z_(oe,ye),oe==null||delete oe[Nc(xu(ye))]}var Im=Zle;function $le(oe){return Cd(oe)?void 0:oe}var U9=$le;var Kle=1,Jle=2,Qle=4,eue=Rf(function(oe,ye){var Fe={};if(oe==null)return Fe;var dt=!1;ye=ts(ye,function(yr){return yr=ph(yr,oe),dt||(dt=yr.length>1),yr}),Oc(oe,hm(oe),Fe),dt&&(Fe=If(Fe,Kle|Jle|Qle,U9));for(var Zt=ye.length;Zt--;)Im(Fe,ye[Zt]);return Fe}),q9=eue;function tue(oe,ye,Fe,dt){if(!as(oe))return oe;ye=ph(ye,oe);for(var Zt=-1,yr=ye.length,Xr=yr-1,ga=oe;ga!=null&&++Ztye||yr&&Xr&&ya&&!ga&&!Cn||dt&&Xr&&ya||!Fe&&ya||!Zt)return 1;if(!dt&&!yr&&!Cn&&oe=ga)return ya;var Cn=Fe[dt];return ya*(Cn=="desc"?-1:1)}}return oe.index-ye.index}var W9=lue;function uue(oe,ye,Fe){ye.length?ye=ts(ye,function(yr){return Ii(yr)?function(Xr){return zh(Xr,yr.length===1?yr[0]:yr)}:yr}):ye=[wl];var dt=-1;ye=ts(ye,_u(Ti));var Zt=W_(oe,function(yr,Xr,ga){var ya=ts(ye,function(Cn){return Cn(yr)});return{criteria:ya,index:++dt,value:yr}});return H9(Zt,function(yr,Xr){return W9(yr,Xr,Fe)})}var ix=uue;function cue(oe,ye,Fe,dt){return oe==null?[]:(Ii(ye)||(ye=ye==null?[]:[ye]),Fe=dt?void 0:Fe,Ii(Fe)||(Fe=Fe==null?[]:[Fe]),ix(oe,ye,Fe))}var Y9=cue;function fue(oe){return Rf(function(ye){return ye=ts(ye,_u(Ti)),Ui(function(Fe){var dt=this;return oe(ye,function(Zt){return gu(Zt,dt,Fe)})})})}var Dm=fue;var hue=Dm(ts),X9=hue;var due=Ui,Z9=due;var pue=Math.min,vue=Z9(function(oe,ye){ye=ye.length==1&&Ii(ye[0])?ts(ye[0],_u(Ti)):ts(Zs(ye,1),_u(Ti));var Fe=ye.length;return Ui(function(dt){for(var Zt=-1,yr=pue(dt.length,Fe);++Ztyue)return Fe;do ye%2&&(Fe+=oe),ye=_ue(ye/2),ye&&(oe+=oe);while(ye);return Fe}var K1=xue;var bue=xm("length"),Q9=bue;var tL="\\ud800-\\udfff",wue="\\u0300-\\u036f",Tue="\\ufe20-\\ufe2f",Aue="\\u20d0-\\u20ff",Mue=wue+Tue+Aue,Sue="\\ufe0e\\ufe0f",Eue="["+tL+"]",yw="["+Mue+"]",_w="\\ud83c[\\udffb-\\udfff]",kue="(?:"+yw+"|"+_w+")",rL="[^"+tL+"]",aL="(?:\\ud83c[\\udde6-\\uddff]){2}",nL="[\\ud800-\\udbff][\\udc00-\\udfff]",Cue="\\u200d",iL=kue+"?",oL="["+Sue+"]?",Lue="(?:"+Cue+"(?:"+[rL,aL,nL].join("|")+")"+oL+iL+")*",Pue=oL+iL+Lue,Rue="(?:"+[rL+yw+"?",yw,aL,nL,Eue].join("|")+")",eL=RegExp(_w+"(?="+_w+")|"+Rue+Pue,"g");function Iue(oe){for(var ye=eL.lastIndex=0;eL.test(oe);)++ye;return ye}var sL=Iue;function Due(oe){return Kh(oe)?sL(oe):Q9(oe)}var ed=Due;var Fue=Math.ceil;function zue(oe,ye){ye=ye===void 0?" ":uc(ye);var Fe=ye.length;if(Fe<2)return Fe?K1(ye,oe):ye;var dt=K1(ye,Fue(oe/ed(ye)));return Kh(ye)?mh(nf(dt),0,oe).join(""):dt.slice(0,oe)}var Fv=zue;var Bue=Math.ceil,Oue=Math.floor;function Nue(oe,ye,Fe){oe=To(oe),ye=ji(ye);var dt=ye?ed(oe):0;if(!ye||dt>=ye)return oe;var Zt=(ye-dt)/2;return Fv(Oue(Zt),Fe)+oe+Fv(Bue(Zt),Fe)}var lL=Nue;function jue(oe,ye,Fe){oe=To(oe),ye=ji(ye);var dt=ye?ed(oe):0;return ye&&dt-1;)ga!==oe&&_L.call(ga,ya,1),_L.call(oe,ya,1);return oe}var Fm=ece;function tce(oe,ye){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye):oe}var sx=tce;var rce=Ui(sx),xL=rce;function ace(oe,ye,Fe){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye,Ti(Fe,2)):oe}var bL=ace;function nce(oe,ye,Fe){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye,void 0,Fe):oe}var wL=nce;var ice=Array.prototype,oce=ice.splice;function sce(oe,ye){for(var Fe=oe?ye.length:0,dt=Fe-1;Fe--;){var Zt=ye[Fe];if(Fe==dt||Zt!==yr){var yr=Zt;kf(Zt)?oce.call(oe,Zt,1):Im(oe,Zt)}}return oe}var lx=sce;var lce=Rf(function(oe,ye){var Fe=oe==null?0:oe.length,dt=rm(oe,ye);return lx(oe,ts(ye,function(Zt){return kf(Zt,Fe)?+Zt:Zt}).sort(nx)),dt}),TL=lce;var uce=Math.floor,cce=Math.random;function fce(oe,ye){return oe+uce(cce()*(ye-oe+1))}var zm=fce;var hce=parseFloat,dce=Math.min,pce=Math.random;function vce(oe,ye,Fe){if(Fe&&typeof Fe!="boolean"&&Tl(oe,ye,Fe)&&(ye=Fe=void 0),Fe===void 0&&(typeof ye=="boolean"?(Fe=ye,ye=void 0):typeof oe=="boolean"&&(Fe=oe,oe=void 0)),oe===void 0&&ye===void 0?(oe=0,ye=1):(oe=Dh(oe),ye===void 0?(ye=oe,oe=0):ye=Dh(ye)),oe>ye){var dt=oe;oe=ye,ye=dt}if(Fe||oe%1||ye%1){var Zt=pce();return dce(oe+Zt*(ye-oe+hce("1e-"+((Zt+"").length-1))),ye)}return zm(oe,ye)}var AL=vce;var mce=Math.ceil,gce=Math.max;function yce(oe,ye,Fe,dt){for(var Zt=-1,yr=gce(mce((ye-oe)/(Fe||1)),0),Xr=Array(yr);yr--;)Xr[dt?yr:++Zt]=oe,oe+=Fe;return Xr}var ML=yce;function _ce(oe){return function(ye,Fe,dt){return dt&&typeof dt!="number"&&Tl(ye,Fe,dt)&&(Fe=dt=void 0),ye=Dh(ye),Fe===void 0?(Fe=ye,ye=0):Fe=Dh(Fe),dt=dt===void 0?ye1&&Tl(oe,ye[0],ye[1])?ye=[]:Fe>2&&Tl(ye[0],ye[1],ye[2])&&(ye=[ye[0]]),ix(oe,Zs(ye,1),[])}),eP=nfe;var ife=4294967295,ofe=ife-1,sfe=Math.floor,lfe=Math.min;function ufe(oe,ye,Fe,dt){var Zt=0,yr=oe==null?0:oe.length;if(yr===0)return 0;ye=Fe(ye);for(var Xr=ye!==ye,ga=ye===null,ya=Ru(ye),Cn=ye===void 0;Zt>>1;function hfe(oe,ye,Fe){var dt=0,Zt=oe==null?dt:oe.length;if(typeof ye=="number"&&ye===ye&&Zt<=ffe){for(;dt>>1,Xr=oe[yr];Xr!==null&&!Ru(Xr)&&(Fe?Xr<=ye:Xr>>0,Fe?(oe=To(oe),oe&&(typeof ye=="string"||ye!=null&&!Lm(ye))&&(ye=uc(ye),!ye&&Kh(oe))?mh(nf(oe),0,Fe):oe.split(ye,Fe)):[]}var uP=Tfe;var Afe="Expected a function",Mfe=Math.max;function Sfe(oe,ye){if(typeof oe!="function")throw new TypeError(Afe);return ye=ye==null?0:Mfe(ji(ye),0),Ui(function(Fe){var dt=Fe[ye],Zt=mh(Fe,0,ye);return dt&&vh(Zt,dt),gu(oe,this,Zt)})}var cP=Sfe;var Efe=Jh(function(oe,ye,Fe){return oe+(Fe?" ":"")+nm(ye)}),fP=Efe;function kfe(oe,ye,Fe){return oe=To(oe),Fe=Fe==null?0:Bh(ji(Fe),0,oe.length),ye=uc(ye),oe.slice(Fe,Fe+ye.length)==ye}var hP=kfe;function Cfe(){return{}}var dP=Cfe;function Lfe(){return""}var pP=Lfe;function Pfe(){return!0}var vP=Pfe;var Rfe=kp(function(oe,ye){return oe-ye},0),mP=Rfe;function Ife(oe){return oe&&oe.length?Rm(oe,wl):0}var gP=Ife;function Dfe(oe,ye){return oe&&oe.length?Rm(oe,Ti(ye,2)):0}var yP=Dfe;function Ffe(oe){var ye=oe==null?0:oe.length;return ye?Zu(oe,1,ye):[]}var _P=Ffe;function zfe(oe,ye,Fe){return oe&&oe.length?(ye=Fe||ye===void 0?1:ji(ye),Zu(oe,0,ye<0?0:ye)):[]}var xP=zfe;function Bfe(oe,ye,Fe){var dt=oe==null?0:oe.length;return dt?(ye=Fe||ye===void 0?1:ji(ye),ye=dt-ye,Zu(oe,ye<0?0:ye,dt)):[]}var bP=Bfe;function Ofe(oe,ye){return oe&&oe.length?Hp(oe,Ti(ye,3),!1,!0):[]}var wP=Ofe;function Nfe(oe,ye){return oe&&oe.length?Hp(oe,Ti(ye,3)):[]}var TP=Nfe;function jfe(oe,ye){return ye(oe),oe}var AP=jfe;var MP=Object.prototype,Ufe=MP.hasOwnProperty;function qfe(oe,ye,Fe,dt){return oe===void 0||cc(oe,MP[Fe])&&!Ufe.call(dt,Fe)?ye:oe}var ww=qfe;var Vfe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Gfe(oe){return"\\"+Vfe[oe]}var SP=Gfe;var Hfe=/<%=([\s\S]+?)%>/g,dx=Hfe;var Wfe=/<%-([\s\S]+?)%>/g,EP=Wfe;var Yfe=/<%([\s\S]+?)%>/g,kP=Yfe;var Xfe={escape:EP,evaluate:kP,interpolate:dx,variable:"",imports:{_:{escape:O_}}},Q1=Xfe;var Zfe="Invalid `variable` option passed into `_.template`",$fe=/\b__p \+= '';/g,Kfe=/\b(__p \+=) '' \+/g,Jfe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Qfe=/[()=,{}\[\]\/\s]/,ehe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,px=/($^)/,the=/['\n\r\u2028\u2029\\]/g,rhe=Object.prototype,CP=rhe.hasOwnProperty;function ahe(oe,ye,Fe){var dt=Q1.imports._.templateSettings||Q1;Fe&&Tl(oe,ye,Fe)&&(ye=void 0),oe=To(oe),ye=Dp({},ye,dt,ww);var Zt=Dp({},ye.imports,dt.imports,ww),yr=Ms(Zt),Xr=Em(Zt,yr),ga,ya,Cn=0,xn=ye.interpolate||px,On="__p += '",Fi=RegExp((ye.escape||px).source+"|"+xn.source+"|"+(xn===dx?ehe:px).source+"|"+(ye.evaluate||px).source+"|$","g"),ho=CP.call(ye,"sourceURL")?"//# sourceURL="+(ye.sourceURL+"").replace(/\s/g," ")+` `:"";oe.replace(Fi,function(Lo,zi,ze,bu,uf,Yl){return ze||(ze=bu),On+=oe.slice(Cn,Yl).replace(the,SP),zi&&(ga=!0,On+=`' + __e(`+zi+`) + '`),uf&&(ya=!0,On+=`'; @@ -3525,7 +3525,7 @@ __p += '`),ze&&(On+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+On+`return __p -}`;var lo=e_(function(){return Function(yr,ho+"return "+On).apply(void 0,Xr)});if(lo.source=On,am(lo))throw lo;return lo}var LP=ahe;var nhe="Expected a function";function ihe(oe,ye,Fe){var dt=!0,Zt=!0;if(typeof oe!="function")throw new TypeError(nhe);return as(Fe)&&(dt="leading"in Fe?!!Fe.leading:dt,Zt="trailing"in Fe?!!Fe.trailing:Zt),P_(oe,ye,{leading:dt,maxWait:ye,trailing:Zt})}var PP=ihe;function ohe(oe,ye){return ye(oe)}var rp=ohe;var she=9007199254740991,Tw=4294967295,lhe=Math.min;function uhe(oe,ye){if(oe=ji(oe),oe<1||oe>she)return[];var Fe=Tw,dt=lhe(oe,Tw);ye=jc(ye),oe-=Tw;for(var Zt=X0(dt,ye);++Fe-1;);return Fe}var mx=yhe;function _he(oe,ye){for(var Fe=-1,dt=oe.length;++Fe-1;);return Fe}var gx=_he;function xhe(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return Iy(oe);if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=nf(ye),yr=gx(dt,Zt),Xr=mx(dt,Zt)+1;return mh(dt,yr,Xr).join("")}var jP=xhe;function bhe(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return oe.slice(0,Ry(oe)+1);if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=mx(dt,nf(ye))+1;return mh(dt,0,Zt).join("")}var UP=bhe;var whe=/^\s+/;function The(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return oe.replace(whe,"");if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=gx(dt,nf(ye));return mh(dt,Zt).join("")}var qP=The;var Ahe=30,Mhe="...",She=/\w*$/;function Ehe(oe,ye){var Fe=Ahe,dt=Mhe;if(as(ye)){var Zt="separator"in ye?ye.separator:Zt;Fe="length"in ye?ji(ye.length):Fe,dt="omission"in ye?uc(ye.omission):dt}oe=To(oe);var yr=oe.length;if(Kh(oe)){var Xr=nf(oe);yr=Xr.length}if(Fe>=yr)return oe;var ga=Fe-ed(dt);if(ga<1)return dt;var ya=Xr?mh(Xr,0,ga).join(""):oe.slice(0,ga);if(Zt===void 0)return ya+dt;if(Xr&&(ga+=ya.length-ga),Lm(Zt)){if(oe.slice(ga).search(Zt)){var Cn,xn=ya;for(Zt.global||(Zt=RegExp(Zt.source,To(She.exec(Zt))+"g")),Zt.lastIndex=0;Cn=Zt.exec(xn);)var On=Cn.index;ya=ya.slice(0,On===void 0?ga:On)}}else if(oe.indexOf(uc(Zt),ga)!=ga){var Fi=ya.lastIndexOf(Zt);Fi>-1&&(ya=ya.slice(0,Fi))}return ya+dt}var VP=Ehe;function khe(oe){return Yy(oe,1)}var GP=khe;var Che={"&":"&","<":"<",">":">",""":'"',"'":"'"},Lhe=om(Che),HP=Lhe;var WP=/&(?:amp|lt|gt|quot|#39);/g,Phe=RegExp(WP.source);function Rhe(oe){return oe=To(oe),oe&&Phe.test(oe)?oe.replace(WP,HP):oe}var YP=Rhe;var Ihe=1/0,Dhe=jp&&1/qp(new jp([,-0]))[1]==Ihe?function(oe){return new jp(oe)}:U0,XP=Dhe;var Fhe=200;function zhe(oe,ye,Fe){var dt=-1,Zt=Rp,yr=oe.length,Xr=!0,ga=[],ya=ga;if(Fe)Xr=!1,Zt=Am;else if(yr>=Fhe){var Cn=ye?null:XP(oe);if(Cn)return qp(Cn);Xr=!1,Zt=ep,ya=new Up}else ya=ye?[]:ga;e:for(;++dt1||this.__actions__.length||!(dt instanceof fs)||!kf(Fe)?this.thru(Zt):(dt=dt.slice(Fe,+Fe+(ye?1:0)),dt.__actions__.push({func:rp,args:[Zt],thisArg:void 0}),new dh(dt,this.__chain__).thru(function(yr){return ye&&!yr.length&&yr.push(void 0),yr}))}),uR=rde;function ade(){return s_(this)}var cR=ade;function nde(){var oe=this.__wrapped__;if(oe instanceof fs){var ye=oe;return this.__actions__.length&&(ye=new fs(this)),ye=ye.reverse(),ye.__actions__.push({func:rp,args:[Jg],thisArg:void 0}),new dh(ye,this.__chain__)}return this.thru(Jg)}var fR=nde;function ide(oe,ye,Fe){var dt=oe.length;if(dt<2)return dt?Eh(oe[0]):[];for(var Zt=-1,yr=Array(dt);++Zt1?oe[ye-1]:void 0;return Fe=typeof Fe=="function"?(oe.pop(),Fe):void 0,yx(oe,Fe)}),yR=dde;var co={chunk:mk,compact:tC,concat:rC,difference:FC,differenceBy:zC,differenceWith:BC,drop:NC,dropRight:jC,dropRightWhile:UC,dropWhile:qC,fill:e7,findIndex:V_,findLastIndex:H_,first:$g,flatten:Qy,flattenDeep:u7,flattenDepth:c7,fromPairs:_7,head:$g,indexOf:L7,initial:P7,intersection:R7,intersectionBy:I7,intersectionWith:D7,join:p9,last:xu,lastIndexOf:y9,nth:N9,pull:xL,pullAll:sx,pullAllBy:bL,pullAllWith:wL,pullAt:TL,remove:IL,reverse:Jg,slice:$L,sortedIndex:tP,sortedIndexBy:rP,sortedIndexOf:aP,sortedLastIndex:nP,sortedLastIndexBy:iP,sortedLastIndexOf:oP,sortedUniq:sP,sortedUniqBy:lP,tail:_P,take:xP,takeRight:bP,takeRightWhile:wP,takeWhile:TP,union:ZP,unionBy:$P,unionWith:KP,uniq:JP,uniqBy:QP,uniqWith:eR,unzip:Om,unzipWith:yx,without:sR,xor:hR,xorBy:dR,xorWith:pR,zip:vR,zipObject:mR,zipObjectDeep:gR,zipWith:yR};var ul={countBy:bC,each:Wg,eachRight:Yg,every:JC,filter:t7,find:r7,findLast:n7,flatMap:o7,flatMapDeep:s7,flatMapDepth:l7,forEach:Wg,forEachRight:Yg,groupBy:w7,includes:C7,invokeMap:j7,keyBy:m9,map:Wp,orderBy:Y9,partition:dL,reduce:CL,reduceRight:PL,reject:RL,sample:jL,sampleSize:VL,shuffle:XL,size:ZL,some:QL,sortBy:eP};var Aw={now:wm};var Iu={after:CE,ary:Yy,before:t_,bind:r_,bindKey:B8,curry:TC,curryRight:AC,debounce:P_,defer:IC,delay:DC,flip:f7,memoize:Ky,negate:tp,once:G9,overArgs:$9,partial:ox,partialRight:hL,rearg:kL,rest:zL,spread:cP,throttle:PP,unary:GP,wrap:lR};var ko={castArray:pk,clone:$k,cloneDeep:Kk,cloneDeepWith:Jk,cloneWith:Qk,conformsTo:yC,eq:cc,gt:T7,gte:A7,isArguments:jh,isArray:Ii,isArrayBuffer:V7,isArrayLike:Pl,isArrayLikeObject:Fs,isBoolean:G7,isBuffer:Sh,isDate:Y7,isElement:X7,isEmpty:Z7,isEqual:$7,isEqualWith:K7,isError:am,isFinite:J7,isFunction:Ef,isInteger:$_,isLength:Ip,isMap:m_,isMatch:Q7,isMatchWith:e9,isNaN:t9,isNative:a9,isNil:n9,isNull:i9,isNumber:K_,isObject:as,isObjectLike:is,isPlainObject:Cd,isRegExp:Lm,isSafeInteger:u9,isSet:g_,isString:Zp,isSymbol:Ru,isTypedArray:$h,isUndefined:c9,isWeakMap:f9,isWeakSet:h9,lt:b9,lte:w9,toArray:ex,toFinite:Dh,toInteger:ji,toLength:j_,toNumber:Bc,toPlainObject:R_,toSafeInteger:BP,toString:To};var Kf={add:SE,ceil:vk,divide:OC,floor:h7,max:E9,maxBy:k9,mean:C9,meanBy:L9,min:D9,minBy:F9,multiply:z9,round:OL,subtract:mP,sum:gP,sumBy:yP};var e1={clamp:gk,inRange:k7,random:AL};var Ho={assign:c8,assignIn:qg,assignInWith:Dp,assignWith:d8,at:D8,create:wC,defaults:EC,defaultsDeep:RC,entries:Xg,entriesIn:Zg,extend:qg,extendWith:Dp,findKey:a7,findLastKey:i7,forIn:v7,forInRight:m7,forOwn:g7,forOwnRight:y7,functions:x7,functionsIn:b7,get:tm,has:S7,hasIn:_m,invert:z7,invertBy:O7,invoke:N7,keys:Ms,keysIn:Rl,mapKeys:T9,mapValues:A9,merge:P9,mergeWith:I_,omit:q9,omitBy:V9,pick:vL,pickBy:ax,result:BL,set:GL,setWith:HL,toPairs:Xg,toPairsIn:Zg,transform:NP,unset:rR,update:aR,updateWith:nR,values:Qh,valuesIn:oR};var td={at:uR,chain:s_,commit:eC,lodash:Ur,next:O9,plant:mL,reverse:fR,tap:AP,thru:rp,toIterator:IP,toJSON:Qp,value:Qp,valueOf:Qp,wrapperChain:cR};var Us={camelCase:dk,capitalize:n_,deburr:i_,endsWith:GC,escape:O_,escapeRegExp:$C,kebabCase:v9,lowerCase:_9,lowerFirst:x9,pad:lL,padEnd:uL,padStart:cL,parseInt:fL,repeat:DL,replace:FL,snakeCase:KL,split:uP,startCase:fP,startsWith:hP,template:LP,templateSettings:Qg,toLower:DP,toUpper:OP,trim:jP,trimEnd:UP,trimStart:qP,truncate:VP,unescape:YP,upperCase:iR,upperFirst:nm,words:o_};var $s={attempt:e_,bindAll:z8,cond:vC,conforms:gC,constant:G0,defaultTo:MC,flow:d7,flowRight:p7,identity:wl,iteratee:d9,matches:M9,matchesProperty:S9,method:R9,methodOf:I9,mixin:Q_,noop:U0,nthArg:j9,over:X9,overEvery:K9,overSome:J9,property:E_,propertyOf:gL,range:SL,rangeRight:EL,stubArray:cm,stubFalse:Z0,stubObject:dP,stubString:pP,stubTrue:vP,times:RP,toPath:FP,uniqueId:tR};function pde(){var oe=new fs(this.__wrapped__);return oe.__actions__=iu(this.__actions__),oe.__dir__=this.__dir__,oe.__filtered__=this.__filtered__,oe.__iteratees__=iu(this.__iteratees__),oe.__takeCount__=this.__takeCount__,oe.__views__=iu(this.__views__),oe}var _R=pde;function vde(){if(this.__filtered__){var oe=new fs(this);oe.__dir__=-1,oe.__filtered__=!0}else oe=this.clone(),oe.__dir__*=-1;return oe}var xR=vde;var mde=Math.max,gde=Math.min;function yde(oe,ye,Fe){for(var dt=-1,Zt=Fe.length;++dt0||ye<0)?new fs(Fe):(oe<0?Fe=Fe.takeRight(-oe):oe&&(Fe=Fe.drop(oe)),ye!==void 0&&(ye=ji(ye),Fe=ye<0?Fe.dropRight(-ye):Fe.take(ye-oe)),Fe)};fs.prototype.takeRightWhile=function(oe){return this.reverse().takeWhile(oe).reverse()};fs.prototype.toArray=function(){return this.take(MR)};Df(fs.prototype,function(oe,ye){var Fe=/^(?:filter|find|map|reject)|While$/.test(ye),dt=/^(?:head|last)$/.test(ye),Zt=Ur[dt?"take"+(ye=="last"?"Right":""):ye],yr=dt||/^find/.test(ye);Zt&&(Ur.prototype[ye]=function(){var Xr=this.__wrapped__,ga=dt?[1]:arguments,ya=Xr instanceof fs,Cn=ga[0],xn=ya||Ii(Xr),On=function(zi){var ze=Zt.apply(Ur,vh([zi],ga));return dt&&Fi?ze[0]:ze};xn&&Fe&&typeof Cn=="function"&&Cn.length!=1&&(ya=xn=!1);var Fi=this.__chain__,ho=!!this.__actions__.length,Li=yr&&!Fi,lo=ya&&!ho;if(!yr&&xn){Xr=lo?Xr:new fs(this);var Lo=oe.apply(Xr,ga);return Lo.__actions__.push({func:rp,args:[On],thisArg:void 0}),new dh(Lo,Fi)}return Li&&lo?oe.apply(this,ga):(Lo=this.thru(On),Li?dt?Lo.value()[0]:Lo.value():Lo)})});af(["pop","push","shift","sort","splice","unshift"],function(oe){var ye=Ede[oe],Fe=/^(?:push|sort|unshift)$/.test(oe)?"tap":"thru",dt=/^(?:pop|shift)$/.test(oe);Ur.prototype[oe]=function(){var Zt=arguments;if(dt&&!this.__chain__){var yr=this.value();return ye.apply(Ii(yr)?yr:[],Zt)}return this[Fe](function(Xr){return ye.apply(Ii(Xr)?Xr:[],Zt)})}});Df(fs.prototype,function(oe,ye){var Fe=Ur[ye];if(Fe){var dt=Fe.name+"";SR.call(Lp,dt)||(Lp[dt]=[]),Lp[dt].push({name:ye,func:Fe})}});Lp[Y0(void 0,Ade).name]=[{name:"wrapper",func:void 0}];fs.prototype.clone=_R;fs.prototype.reverse=xR;fs.prototype.value=wR;Ur.prototype.at=td.at;Ur.prototype.chain=td.wrapperChain;Ur.prototype.commit=td.commit;Ur.prototype.next=td.next;Ur.prototype.plant=td.plant;Ur.prototype.reverse=td.reverse;Ur.prototype.toJSON=Ur.prototype.valueOf=Ur.prototype.value=td.value;Ur.prototype.first=Ur.prototype.head;TR&&(Ur.prototype[TR]=td.toIterator);var Wl=Ur;var rd=SX(CR());window.PlotlyConfig={MathJaxConfig:"local"};var Sw=class{constructor(ye,Fe){this.model=ye,this.serializers=Fe}get(ye){let Fe=this.serializers[ye],dt=this.model.get(ye);return Fe?.deserialize?Fe.deserialize(dt):dt}set(ye,Fe){let dt=this.serializers[ye];dt?.serialize&&(Fe=dt.serialize(Fe)),this.model.set(ye,Fe)}on(ye,Fe){this.model.on(ye,Fe)}save_changes(){this.model.save_changes()}defaults(){return{_widget_data:[],_widget_layout:{},_config:{},_py2js_addTraces:null,_py2js_deleteTraces:null,_py2js_moveTraces:null,_py2js_restyle:null,_py2js_relayout:null,_py2js_update:null,_py2js_animate:null,_py2js_removeLayoutProps:null,_py2js_removeTraceProps:null,_js2py_restyle:null,_js2py_relayout:null,_js2py_update:null,_js2py_layoutDelta:null,_js2py_traceDeltas:null,_js2py_pointsCallback:null,_last_layout_edit_id:0,_last_trace_edit_id:0}}initialize(){this.model.on("change:_widget_data",()=>this.do_data()),this.model.on("change:_widget_layout",()=>this.do_layout()),this.model.on("change:_py2js_addTraces",()=>this.do_addTraces()),this.model.on("change:_py2js_deleteTraces",()=>this.do_deleteTraces()),this.model.on("change:_py2js_moveTraces",()=>this.do_moveTraces()),this.model.on("change:_py2js_restyle",()=>this.do_restyle()),this.model.on("change:_py2js_relayout",()=>this.do_relayout()),this.model.on("change:_py2js_update",()=>this.do_update()),this.model.on("change:_py2js_animate",()=>this.do_animate()),this.model.on("change:_py2js_removeLayoutProps",()=>this.do_removeLayoutProps()),this.model.on("change:_py2js_removeTraceProps",()=>this.do_removeTraceProps())}_normalize_trace_indexes(ye){if(ye==null){var Fe=this.model.get("_widget_data").length;ye=Wl.range(Fe)}return Array.isArray(ye)||(ye=[ye]),ye}do_data(){}do_layout(){}do_addTraces(){var ye=this.model.get("_py2js_addTraces");if(ye!==null){var Fe=this.model.get("_widget_data"),dt=ye.trace_data;Wl.forEach(dt,function(Zt){Fe.push(Zt)})}}do_deleteTraces(){var ye=this.model.get("_py2js_deleteTraces");if(ye!==null){var Fe=ye.delete_inds,dt=this.model.get("_widget_data");Fe.slice().reverse().forEach(function(Zt){dt.splice(Zt,1)})}}do_moveTraces(){var ye=this.model.get("_py2js_moveTraces");if(ye!==null){var Fe=this.model.get("_widget_data"),dt=ye.current_trace_inds,Zt=ye.new_trace_inds;Dde(Fe,dt,Zt)}}do_restyle(){var ye=this.model.get("_py2js_restyle");if(ye!==null){var Fe=ye.restyle_data,dt=this._normalize_trace_indexes(ye.restyle_traces);PR(this.model.get("_widget_data"),Fe,dt)}}do_relayout(){var ye=this.model.get("_py2js_relayout");ye!==null&&wx(this.model.get("_widget_layout"),ye.relayout_data)}do_update(){var ye=this.model.get("_py2js_update");if(ye!==null){var Fe=ye.style_data,dt=ye.layout_data,Zt=this._normalize_trace_indexes(ye.style_traces);PR(this.model.get("_widget_data"),Fe,Zt),wx(this.model.get("_widget_layout"),dt)}}do_animate(){var ye=this.model.get("_py2js_animate");if(ye!==null){for(var Fe=ye.style_data,dt=ye.layout_data,Zt=this._normalize_trace_indexes(ye.style_traces),yr=0;yrthis.do_addTraces()),this.model.on("change:_py2js_deleteTraces",()=>this.do_deleteTraces()),this.model.on("change:_py2js_moveTraces",()=>this.do_moveTraces()),this.model.on("change:_py2js_restyle",()=>this.do_restyle()),this.model.on("change:_py2js_relayout",()=>this.do_relayout()),this.model.on("change:_py2js_update",()=>this.do_update()),this.model.on("change:_py2js_animate",()=>this.do_animate()),window?.MathJax?.Hub?.Config?.({SVG:{font:"STIX-Web"}});var Fe=this.model.get("_last_layout_edit_id"),dt=this.model.get("_last_trace_edit_id");this.viewID=IR();var Zt=Wl.cloneDeep(this.model.get("_widget_data")),yr=Wl.cloneDeep(this.model.get("_widget_layout"));yr.height||(yr.height=360);var Xr=this.model.get("_config");Xr.editSelection=!1,rd.default.newPlot(ye.el,Zt,yr,Xr).then(function(){ye._sendTraceDeltas(dt),ye._sendLayoutDelta(Fe),ye.el.on("plotly_restyle",function(ya){ye.handle_plotly_restyle(ya)}),ye.el.on("plotly_relayout",function(ya){ye.handle_plotly_relayout(ya)}),ye.el.on("plotly_update",function(ya){ye.handle_plotly_update(ya)}),ye.el.on("plotly_click",function(ya){ye.handle_plotly_click(ya)}),ye.el.on("plotly_hover",function(ya){ye.handle_plotly_hover(ya)}),ye.el.on("plotly_unhover",function(ya){ye.handle_plotly_unhover(ya)}),ye.el.on("plotly_selected",function(ya){ye.handle_plotly_selected(ya)}),ye.el.on("plotly_deselect",function(ya){ye.handle_plotly_deselect(ya)}),ye.el.on("plotly_doubleclick",function(ya){ye.handle_plotly_doubleclick(ya)});var ga=new CustomEvent("plotlywidget-after-render",{detail:{element:ye.el,viewID:ye.viewID}});document.dispatchEvent(ga)})}_processLuminoMessage(ye,Fe){Fe.apply(this,arguments);var dt=this;switch(ye.type){case"before-attach":var Zt={showgrid:!1,showline:!1,tickvals:[]};rd.default.newPlot(dt.el,[],{xaxis:Zt,yaxis:Zt}),this.resizeEventListener=()=>{this.autosizeFigure()},window.addEventListener("resize",this.resizeEventListener);break;case"after-attach":this.perform_render();break;case"after-show":case"resize":this.autosizeFigure();break}}autosizeFigure(){var ye=this,Fe=ye.model.get("_widget_layout");(Wl.isNil(Fe)||Wl.isNil(Fe.width))&&rd.default.Plots.resize(ye.el).then(function(){var dt=ye.model.get("_last_layout_edit_id");ye._sendLayoutDelta(dt)})}remove(){rd.default.purge(this.el),window.removeEventListener("resize",this.resizeEventListener)}getFullData(){return Wl.mergeWith({},this.el._fullData,this.el.data,LR)}getFullLayout(){return Wl.mergeWith({},this.el._fullLayout,this.el.layout,LR)}buildPointsObject(ye){var Fe;if(ye.hasOwnProperty("points")){var dt=ye.points,Zt=dt.length,yr=!0;for(let xn=0;xn=0;Zt--)dt.splice(0,0,oe[ye[Zt]]),oe.splice(ye[Zt],1);var yr=Wl(Fe).zip(dt).sortBy(0).unzip().value();Fe=yr[0],dt=yr[1];for(var Xr=0;Xr0&&typeof yr[0]=="object"){Fe[dt]=new Array(yr.length);for(var Xr=0;Xr0&&(Fe[dt]=ga)}else typeof yr=="object"&&!Array.isArray(yr)?Fe[dt]=t1(yr,{}):yr!==void 0&&typeof yr!="function"&&(Fe[dt]=yr)}}return Fe}function IR(oe,ye,Fe,dt){if(Fe||(Fe=16),ye===void 0&&(ye=24),ye<=0)return"0";var Zt=Math.log(Math.pow(2,ye))/Math.log(Fe),yr="",Xr,ga,ya;for(Xr=2;Zt===1/0;Xr*=2)Zt=Math.log(Math.pow(2,ye/Xr))/Math.log(Fe)*Xr;var Cn=Zt-Math.floor(Zt);for(Xr=0;Xr=Math.pow(2,ye)?dt>10?(console.warn("randstr failed uniqueness"),yr):IR(oe,ye,Fe,(dt||0)+1):yr}var XWe=()=>{let oe;return{initialize(ye){oe=new Sw(ye.model,Lde),oe.initialize()},render({el:ye}){let Fe=new Ew(oe,ye);return Fe.perform_render(),()=>Fe.remove()}}};export{Sw as FigureModel,Ew as FigureView,XWe as default}; +}`;var lo=e_(function(){return Function(yr,ho+"return "+On).apply(void 0,Xr)});if(lo.source=On,am(lo))throw lo;return lo}var LP=ahe;var nhe="Expected a function";function ihe(oe,ye,Fe){var dt=!0,Zt=!0;if(typeof oe!="function")throw new TypeError(nhe);return as(Fe)&&(dt="leading"in Fe?!!Fe.leading:dt,Zt="trailing"in Fe?!!Fe.trailing:Zt),P_(oe,ye,{leading:dt,maxWait:ye,trailing:Zt})}var PP=ihe;function ohe(oe,ye){return ye(oe)}var rp=ohe;var she=9007199254740991,Tw=4294967295,lhe=Math.min;function uhe(oe,ye){if(oe=ji(oe),oe<1||oe>she)return[];var Fe=Tw,dt=lhe(oe,Tw);ye=jc(ye),oe-=Tw;for(var Zt=X0(dt,ye);++Fe-1;);return Fe}var mx=yhe;function _he(oe,ye){for(var Fe=-1,dt=oe.length;++Fe-1;);return Fe}var gx=_he;function xhe(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return Iy(oe);if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=nf(ye),yr=gx(dt,Zt),Xr=mx(dt,Zt)+1;return mh(dt,yr,Xr).join("")}var jP=xhe;function bhe(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return oe.slice(0,Ry(oe)+1);if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=mx(dt,nf(ye))+1;return mh(dt,0,Zt).join("")}var UP=bhe;var whe=/^\s+/;function The(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return oe.replace(whe,"");if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=gx(dt,nf(ye));return mh(dt,Zt).join("")}var qP=The;var Ahe=30,Mhe="...",She=/\w*$/;function Ehe(oe,ye){var Fe=Ahe,dt=Mhe;if(as(ye)){var Zt="separator"in ye?ye.separator:Zt;Fe="length"in ye?ji(ye.length):Fe,dt="omission"in ye?uc(ye.omission):dt}oe=To(oe);var yr=oe.length;if(Kh(oe)){var Xr=nf(oe);yr=Xr.length}if(Fe>=yr)return oe;var ga=Fe-ed(dt);if(ga<1)return dt;var ya=Xr?mh(Xr,0,ga).join(""):oe.slice(0,ga);if(Zt===void 0)return ya+dt;if(Xr&&(ga+=ya.length-ga),Lm(Zt)){if(oe.slice(ga).search(Zt)){var Cn,xn=ya;for(Zt.global||(Zt=RegExp(Zt.source,To(She.exec(Zt))+"g")),Zt.lastIndex=0;Cn=Zt.exec(xn);)var On=Cn.index;ya=ya.slice(0,On===void 0?ga:On)}}else if(oe.indexOf(uc(Zt),ga)!=ga){var Fi=ya.lastIndexOf(Zt);Fi>-1&&(ya=ya.slice(0,Fi))}return ya+dt}var VP=Ehe;function khe(oe){return Yy(oe,1)}var GP=khe;var Che={"&":"&","<":"<",">":">",""":'"',"'":"'"},Lhe=om(Che),HP=Lhe;var WP=/&(?:amp|lt|gt|quot|#39);/g,Phe=RegExp(WP.source);function Rhe(oe){return oe=To(oe),oe&&Phe.test(oe)?oe.replace(WP,HP):oe}var YP=Rhe;var Ihe=1/0,Dhe=jp&&1/qp(new jp([,-0]))[1]==Ihe?function(oe){return new jp(oe)}:U0,XP=Dhe;var Fhe=200;function zhe(oe,ye,Fe){var dt=-1,Zt=Rp,yr=oe.length,Xr=!0,ga=[],ya=ga;if(Fe)Xr=!1,Zt=Am;else if(yr>=Fhe){var Cn=ye?null:XP(oe);if(Cn)return qp(Cn);Xr=!1,Zt=ep,ya=new Up}else ya=ye?[]:ga;e:for(;++dt1||this.__actions__.length||!(dt instanceof fs)||!kf(Fe)?this.thru(Zt):(dt=dt.slice(Fe,+Fe+(ye?1:0)),dt.__actions__.push({func:rp,args:[Zt],thisArg:void 0}),new dh(dt,this.__chain__).thru(function(yr){return ye&&!yr.length&&yr.push(void 0),yr}))}),uR=rde;function ade(){return s_(this)}var cR=ade;function nde(){var oe=this.__wrapped__;if(oe instanceof fs){var ye=oe;return this.__actions__.length&&(ye=new fs(this)),ye=ye.reverse(),ye.__actions__.push({func:rp,args:[J1],thisArg:void 0}),new dh(ye,this.__chain__)}return this.thru(J1)}var fR=nde;function ide(oe,ye,Fe){var dt=oe.length;if(dt<2)return dt?Eh(oe[0]):[];for(var Zt=-1,yr=Array(dt);++Zt1?oe[ye-1]:void 0;return Fe=typeof Fe=="function"?(oe.pop(),Fe):void 0,yx(oe,Fe)}),yR=dde;var co={chunk:mk,compact:tC,concat:rC,difference:FC,differenceBy:zC,differenceWith:BC,drop:NC,dropRight:jC,dropRightWhile:UC,dropWhile:qC,fill:e7,findIndex:V_,findLastIndex:H_,first:$1,flatten:Qy,flattenDeep:u7,flattenDepth:c7,fromPairs:_7,head:$1,indexOf:L7,initial:P7,intersection:R7,intersectionBy:I7,intersectionWith:D7,join:p9,last:xu,lastIndexOf:y9,nth:N9,pull:xL,pullAll:sx,pullAllBy:bL,pullAllWith:wL,pullAt:TL,remove:IL,reverse:J1,slice:$L,sortedIndex:tP,sortedIndexBy:rP,sortedIndexOf:aP,sortedLastIndex:nP,sortedLastIndexBy:iP,sortedLastIndexOf:oP,sortedUniq:sP,sortedUniqBy:lP,tail:_P,take:xP,takeRight:bP,takeRightWhile:wP,takeWhile:TP,union:ZP,unionBy:$P,unionWith:KP,uniq:JP,uniqBy:QP,uniqWith:eR,unzip:Om,unzipWith:yx,without:sR,xor:hR,xorBy:dR,xorWith:pR,zip:vR,zipObject:mR,zipObjectDeep:gR,zipWith:yR};var ul={countBy:bC,each:W1,eachRight:Y1,every:JC,filter:t7,find:r7,findLast:n7,flatMap:o7,flatMapDeep:s7,flatMapDepth:l7,forEach:W1,forEachRight:Y1,groupBy:w7,includes:C7,invokeMap:j7,keyBy:m9,map:Wp,orderBy:Y9,partition:dL,reduce:CL,reduceRight:PL,reject:RL,sample:jL,sampleSize:VL,shuffle:XL,size:ZL,some:QL,sortBy:eP};var Aw={now:wm};var Iu={after:CE,ary:Yy,before:t_,bind:r_,bindKey:B8,curry:TC,curryRight:AC,debounce:P_,defer:IC,delay:DC,flip:f7,memoize:Ky,negate:tp,once:G9,overArgs:$9,partial:ox,partialRight:hL,rearg:kL,rest:zL,spread:cP,throttle:PP,unary:GP,wrap:lR};var ko={castArray:pk,clone:$k,cloneDeep:Kk,cloneDeepWith:Jk,cloneWith:Qk,conformsTo:yC,eq:cc,gt:T7,gte:A7,isArguments:jh,isArray:Ii,isArrayBuffer:V7,isArrayLike:Pl,isArrayLikeObject:Fs,isBoolean:G7,isBuffer:Sh,isDate:Y7,isElement:X7,isEmpty:Z7,isEqual:$7,isEqualWith:K7,isError:am,isFinite:J7,isFunction:Ef,isInteger:$_,isLength:Ip,isMap:m_,isMatch:Q7,isMatchWith:e9,isNaN:t9,isNative:a9,isNil:n9,isNull:i9,isNumber:K_,isObject:as,isObjectLike:is,isPlainObject:Cd,isRegExp:Lm,isSafeInteger:u9,isSet:g_,isString:Zp,isSymbol:Ru,isTypedArray:$h,isUndefined:c9,isWeakMap:f9,isWeakSet:h9,lt:b9,lte:w9,toArray:ex,toFinite:Dh,toInteger:ji,toLength:j_,toNumber:Bc,toPlainObject:R_,toSafeInteger:BP,toString:To};var Kf={add:SE,ceil:vk,divide:OC,floor:h7,max:E9,maxBy:k9,mean:C9,meanBy:L9,min:D9,minBy:F9,multiply:z9,round:OL,subtract:mP,sum:gP,sumBy:yP};var eg={clamp:gk,inRange:k7,random:AL};var Ho={assign:c8,assignIn:q1,assignInWith:Dp,assignWith:d8,at:D8,create:wC,defaults:EC,defaultsDeep:RC,entries:X1,entriesIn:Z1,extend:q1,extendWith:Dp,findKey:a7,findLastKey:i7,forIn:v7,forInRight:m7,forOwn:g7,forOwnRight:y7,functions:x7,functionsIn:b7,get:tm,has:S7,hasIn:_m,invert:z7,invertBy:O7,invoke:N7,keys:Ms,keysIn:Rl,mapKeys:T9,mapValues:A9,merge:P9,mergeWith:I_,omit:q9,omitBy:V9,pick:vL,pickBy:ax,result:BL,set:GL,setWith:HL,toPairs:X1,toPairsIn:Z1,transform:NP,unset:rR,update:aR,updateWith:nR,values:Qh,valuesIn:oR};var td={at:uR,chain:s_,commit:eC,lodash:Ur,next:O9,plant:mL,reverse:fR,tap:AP,thru:rp,toIterator:IP,toJSON:Qp,value:Qp,valueOf:Qp,wrapperChain:cR};var Us={camelCase:dk,capitalize:n_,deburr:i_,endsWith:GC,escape:O_,escapeRegExp:$C,kebabCase:v9,lowerCase:_9,lowerFirst:x9,pad:lL,padEnd:uL,padStart:cL,parseInt:fL,repeat:DL,replace:FL,snakeCase:KL,split:uP,startCase:fP,startsWith:hP,template:LP,templateSettings:Q1,toLower:DP,toUpper:OP,trim:jP,trimEnd:UP,trimStart:qP,truncate:VP,unescape:YP,upperCase:iR,upperFirst:nm,words:o_};var $s={attempt:e_,bindAll:z8,cond:vC,conforms:gC,constant:G0,defaultTo:MC,flow:d7,flowRight:p7,identity:wl,iteratee:d9,matches:M9,matchesProperty:S9,method:R9,methodOf:I9,mixin:Q_,noop:U0,nthArg:j9,over:X9,overEvery:K9,overSome:J9,property:E_,propertyOf:gL,range:SL,rangeRight:EL,stubArray:cm,stubFalse:Z0,stubObject:dP,stubString:pP,stubTrue:vP,times:RP,toPath:FP,uniqueId:tR};function pde(){var oe=new fs(this.__wrapped__);return oe.__actions__=iu(this.__actions__),oe.__dir__=this.__dir__,oe.__filtered__=this.__filtered__,oe.__iteratees__=iu(this.__iteratees__),oe.__takeCount__=this.__takeCount__,oe.__views__=iu(this.__views__),oe}var _R=pde;function vde(){if(this.__filtered__){var oe=new fs(this);oe.__dir__=-1,oe.__filtered__=!0}else oe=this.clone(),oe.__dir__*=-1;return oe}var xR=vde;var mde=Math.max,gde=Math.min;function yde(oe,ye,Fe){for(var dt=-1,Zt=Fe.length;++dt0||ye<0)?new fs(Fe):(oe<0?Fe=Fe.takeRight(-oe):oe&&(Fe=Fe.drop(oe)),ye!==void 0&&(ye=ji(ye),Fe=ye<0?Fe.dropRight(-ye):Fe.take(ye-oe)),Fe)};fs.prototype.takeRightWhile=function(oe){return this.reverse().takeWhile(oe).reverse()};fs.prototype.toArray=function(){return this.take(MR)};Df(fs.prototype,function(oe,ye){var Fe=/^(?:filter|find|map|reject)|While$/.test(ye),dt=/^(?:head|last)$/.test(ye),Zt=Ur[dt?"take"+(ye=="last"?"Right":""):ye],yr=dt||/^find/.test(ye);Zt&&(Ur.prototype[ye]=function(){var Xr=this.__wrapped__,ga=dt?[1]:arguments,ya=Xr instanceof fs,Cn=ga[0],xn=ya||Ii(Xr),On=function(zi){var ze=Zt.apply(Ur,vh([zi],ga));return dt&&Fi?ze[0]:ze};xn&&Fe&&typeof Cn=="function"&&Cn.length!=1&&(ya=xn=!1);var Fi=this.__chain__,ho=!!this.__actions__.length,Li=yr&&!Fi,lo=ya&&!ho;if(!yr&&xn){Xr=lo?Xr:new fs(this);var Lo=oe.apply(Xr,ga);return Lo.__actions__.push({func:rp,args:[On],thisArg:void 0}),new dh(Lo,Fi)}return Li&&lo?oe.apply(this,ga):(Lo=this.thru(On),Li?dt?Lo.value()[0]:Lo.value():Lo)})});af(["pop","push","shift","sort","splice","unshift"],function(oe){var ye=Ede[oe],Fe=/^(?:push|sort|unshift)$/.test(oe)?"tap":"thru",dt=/^(?:pop|shift)$/.test(oe);Ur.prototype[oe]=function(){var Zt=arguments;if(dt&&!this.__chain__){var yr=this.value();return ye.apply(Ii(yr)?yr:[],Zt)}return this[Fe](function(Xr){return ye.apply(Ii(Xr)?Xr:[],Zt)})}});Df(fs.prototype,function(oe,ye){var Fe=Ur[ye];if(Fe){var dt=Fe.name+"";SR.call(Lp,dt)||(Lp[dt]=[]),Lp[dt].push({name:ye,func:Fe})}});Lp[Y0(void 0,Ade).name]=[{name:"wrapper",func:void 0}];fs.prototype.clone=_R;fs.prototype.reverse=xR;fs.prototype.value=wR;Ur.prototype.at=td.at;Ur.prototype.chain=td.wrapperChain;Ur.prototype.commit=td.commit;Ur.prototype.next=td.next;Ur.prototype.plant=td.plant;Ur.prototype.reverse=td.reverse;Ur.prototype.toJSON=Ur.prototype.valueOf=Ur.prototype.value=td.value;Ur.prototype.first=Ur.prototype.head;TR&&(Ur.prototype[TR]=td.toIterator);var Wl=Ur;var rd=SX(CR());window.PlotlyConfig={MathJaxConfig:"local"};var Sw=class{constructor(ye,Fe){this.model=ye,this.serializers=Fe}get(ye){let Fe=this.serializers[ye],dt=this.model.get(ye);return Fe?.deserialize?Fe.deserialize(dt):dt}set(ye,Fe){let dt=this.serializers[ye];dt?.serialize&&(Fe=dt.serialize(Fe)),this.model.set(ye,Fe)}on(ye,Fe){this.model.on(ye,Fe)}save_changes(){this.model.save_changes()}defaults(){return{_widget_data:[],_widget_layout:{},_config:{},_py2js_addTraces:null,_py2js_deleteTraces:null,_py2js_moveTraces:null,_py2js_restyle:null,_py2js_relayout:null,_py2js_update:null,_py2js_animate:null,_py2js_removeLayoutProps:null,_py2js_removeTraceProps:null,_js2py_restyle:null,_js2py_relayout:null,_js2py_update:null,_js2py_layoutDelta:null,_js2py_traceDeltas:null,_js2py_pointsCallback:null,_last_layout_edit_id:0,_last_trace_edit_id:0}}initialize(){this.model.on("change:_widget_data",()=>this.do_data()),this.model.on("change:_widget_layout",()=>this.do_layout()),this.model.on("change:_py2js_addTraces",()=>this.do_addTraces()),this.model.on("change:_py2js_deleteTraces",()=>this.do_deleteTraces()),this.model.on("change:_py2js_moveTraces",()=>this.do_moveTraces()),this.model.on("change:_py2js_restyle",()=>this.do_restyle()),this.model.on("change:_py2js_relayout",()=>this.do_relayout()),this.model.on("change:_py2js_update",()=>this.do_update()),this.model.on("change:_py2js_animate",()=>this.do_animate()),this.model.on("change:_py2js_removeLayoutProps",()=>this.do_removeLayoutProps()),this.model.on("change:_py2js_removeTraceProps",()=>this.do_removeTraceProps())}_normalize_trace_indexes(ye){if(ye==null){var Fe=this.model.get("_widget_data").length;ye=Wl.range(Fe)}return Array.isArray(ye)||(ye=[ye]),ye}do_data(){}do_layout(){}do_addTraces(){var ye=this.model.get("_py2js_addTraces");if(ye!==null){var Fe=this.model.get("_widget_data"),dt=ye.trace_data;Wl.forEach(dt,function(Zt){Fe.push(Zt)})}}do_deleteTraces(){var ye=this.model.get("_py2js_deleteTraces");if(ye!==null){var Fe=ye.delete_inds,dt=this.model.get("_widget_data");Fe.slice().reverse().forEach(function(Zt){dt.splice(Zt,1)})}}do_moveTraces(){var ye=this.model.get("_py2js_moveTraces");if(ye!==null){var Fe=this.model.get("_widget_data"),dt=ye.current_trace_inds,Zt=ye.new_trace_inds;Dde(Fe,dt,Zt)}}do_restyle(){var ye=this.model.get("_py2js_restyle");if(ye!==null){var Fe=ye.restyle_data,dt=this._normalize_trace_indexes(ye.restyle_traces);PR(this.model.get("_widget_data"),Fe,dt)}}do_relayout(){var ye=this.model.get("_py2js_relayout");ye!==null&&wx(this.model.get("_widget_layout"),ye.relayout_data)}do_update(){var ye=this.model.get("_py2js_update");if(ye!==null){var Fe=ye.style_data,dt=ye.layout_data,Zt=this._normalize_trace_indexes(ye.style_traces);PR(this.model.get("_widget_data"),Fe,Zt),wx(this.model.get("_widget_layout"),dt)}}do_animate(){var ye=this.model.get("_py2js_animate");if(ye!==null){for(var Fe=ye.style_data,dt=ye.layout_data,Zt=this._normalize_trace_indexes(ye.style_traces),yr=0;yrthis.do_addTraces()),this.model.on("change:_py2js_deleteTraces",()=>this.do_deleteTraces()),this.model.on("change:_py2js_moveTraces",()=>this.do_moveTraces()),this.model.on("change:_py2js_restyle",()=>this.do_restyle()),this.model.on("change:_py2js_relayout",()=>this.do_relayout()),this.model.on("change:_py2js_update",()=>this.do_update()),this.model.on("change:_py2js_animate",()=>this.do_animate()),window?.MathJax?.Hub?.Config?.({SVG:{font:"STIX-Web"}});var Fe=this.model.get("_last_layout_edit_id"),dt=this.model.get("_last_trace_edit_id");this.viewID=IR();var Zt=Wl.cloneDeep(this.model.get("_widget_data")),yr=Wl.cloneDeep(this.model.get("_widget_layout"));yr.height||(yr.height=360);var Xr=this.model.get("_config");Xr.editSelection=!1,rd.default.newPlot(ye.el,Zt,yr,Xr).then(function(){ye._sendTraceDeltas(dt),ye._sendLayoutDelta(Fe),ye.el.on("plotly_restyle",function(ya){ye.handle_plotly_restyle(ya)}),ye.el.on("plotly_relayout",function(ya){ye.handle_plotly_relayout(ya)}),ye.el.on("plotly_update",function(ya){ye.handle_plotly_update(ya)}),ye.el.on("plotly_click",function(ya){ye.handle_plotly_click(ya)}),ye.el.on("plotly_hover",function(ya){ye.handle_plotly_hover(ya)}),ye.el.on("plotly_unhover",function(ya){ye.handle_plotly_unhover(ya)}),ye.el.on("plotly_selected",function(ya){ye.handle_plotly_selected(ya)}),ye.el.on("plotly_deselect",function(ya){ye.handle_plotly_deselect(ya)}),ye.el.on("plotly_doubleclick",function(ya){ye.handle_plotly_doubleclick(ya)});var ga=new CustomEvent("plotlywidget-after-render",{detail:{element:ye.el,viewID:ye.viewID}});document.dispatchEvent(ga)})}_processLuminoMessage(ye,Fe){Fe.apply(this,arguments);var dt=this;switch(ye.type){case"before-attach":var Zt={showgrid:!1,showline:!1,tickvals:[]};rd.default.newPlot(dt.el,[],{xaxis:Zt,yaxis:Zt}),this.resizeEventListener=()=>{this.autosizeFigure()},window.addEventListener("resize",this.resizeEventListener);break;case"after-attach":this.perform_render();break;case"after-show":case"resize":this.autosizeFigure();break}}autosizeFigure(){var ye=this,Fe=ye.model.get("_widget_layout");(Wl.isNil(Fe)||Wl.isNil(Fe.width))&&rd.default.Plots.resize(ye.el).then(function(){var dt=ye.model.get("_last_layout_edit_id");ye._sendLayoutDelta(dt)})}remove(){rd.default.purge(this.el),window.removeEventListener("resize",this.resizeEventListener)}getFullData(){return Wl.mergeWith({},this.el._fullData,this.el.data,LR)}getFullLayout(){return Wl.mergeWith({},this.el._fullLayout,this.el.layout,LR)}buildPointsObject(ye){var Fe;if(ye.hasOwnProperty("points")){var dt=ye.points,Zt=dt.length,yr=!0;for(let xn=0;xn=0;Zt--)dt.splice(0,0,oe[ye[Zt]]),oe.splice(ye[Zt],1);var yr=Wl(Fe).zip(dt).sortBy(0).unzip().value();Fe=yr[0],dt=yr[1];for(var Xr=0;Xr0&&typeof yr[0]=="object"){Fe[dt]=new Array(yr.length);for(var Xr=0;Xr0&&(Fe[dt]=ga)}else typeof yr=="object"&&!Array.isArray(yr)?Fe[dt]=tg(yr,{}):yr!==void 0&&typeof yr!="function"&&(Fe[dt]=yr)}}return Fe}function IR(oe,ye,Fe,dt){if(Fe||(Fe=16),ye===void 0&&(ye=24),ye<=0)return"0";var Zt=Math.log(Math.pow(2,ye))/Math.log(Fe),yr="",Xr,ga,ya;for(Xr=2;Zt===1/0;Xr*=2)Zt=Math.log(Math.pow(2,ye/Xr))/Math.log(Fe)*Xr;var Cn=Zt-Math.floor(Zt);for(Xr=0;Xr=Math.pow(2,ye)?dt>10?(console.warn("randstr failed uniqueness"),yr):IR(oe,ye,Fe,(dt||0)+1):yr}var XWe=()=>{let oe;return{initialize(ye){oe=new Sw(ye.model,Lde),oe.initialize()},render({el:ye}){let Fe=new Ew(oe,ye);return Fe.perform_render(),()=>Fe.remove()}}};export{Sw as FigureModel,Ew as FigureView,XWe as default}; /*! Bundled license information: plotly.js/dist/plotly.js: diff --git a/plotly/validators/_validators.json b/plotly/validators/_validators.json index 9e9c01be62e..c923bc67e6a 100644 --- a/plotly/validators/_validators.json +++ b/plotly/validators/_validators.json @@ -16960,6 +16960,18 @@ }, "superclass": "ColorValidator" }, + "layout.legend.groupdoubleclick": { + "params": { + "plotly_name": "groupdoubleclick", + "parent_name": "layout.legend", + "edit_type": "legend", + "values": [ + "toggleitem", + "togglegroup" + ] + }, + "superclass": "EnumeratedValidator" + }, "layout.legend.groupclick": { "params": { "plotly_name": "groupclick", From f62576ebd9641368ee189f282ab4d1929c6be283 Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Wed, 9 Sep 2026 11:26:19 -0400 Subject: [PATCH 2/4] update instructions for updateplotlyjs command --- CONTRIBUTING.md | 71 +++++++++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 26 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 952af48317f..e1e5f211bc9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -264,39 +264,58 @@ Two kinds of Jupyter support are included: ### Updating to a New Version of plotly.js -First, update the version of the `plotly.js` dependency in `js/package.json`. -Once you have done that, -run the `updateplotlyjs` command: +We typically update the plotly.js version in plotly.py after every new plotly.js release. -```bash -python commands.py updateplotlyjs -``` +_Usually, the mostly-automated steps below are sufficient. However, in some cases, manual changes may be needed. For example, [plotly.js/#7580](https://github.com/plotly/plotly.js/pull/7580) required [#5464](https://github.com/plotly/plotly.py/pull/5464) and [#5465](https://github.com/plotly/plotly.py/pull/5465). This is most often the case when plotly.js is updated to accept additional value types for an attribute; plotly.py has its own validation layer which may need to be updated. When in doubt, test out a new plotly.js feature in plotly.py to verify that everything works._ -This downloads new versions of `plot-schema.json` and `plotly.min.js` from the `plotly/plotly.js` GitHub repository -and places them in `codegen/resources/` and `plotly/package_data/`, respectively. +Steps to update plotly.js: -It then does the following: - - Regenerates all of the `graph_objs` classes based on the new schema - - Runs `npm install` in `js/` to refresh `js/package-lock.json` against the new `plotly.js` - - Runs `npm run build` to rebuild the JupyterLab extension and FigureWidget bundles in `plotly/labextension` and `plotly/package_data/widgetbundle.js`. +1. Create a new branch off of `main`. -Commit the updated files under: - - `codegen/resources/` - - `js/` - - `plotly/graph_objs/` - - `plotly/labextension/` - - `plotly/offline/` - - `plotly/package_data/` +2. Manually update the version of the `plotly.js` dependency in `js/package.json`. -If you need to skip the `npm` steps entirely (e.g. `npm` isn't available), -set the `SKIP_NPM=1` environment variable: +3. Run the `updateplotlyjs` command: -```bash -SKIP_NPM=1 python commands.py updateplotlyjs -``` + ```bash + python commands.py updateplotlyjs + ``` -If you do skip it, you'll need to find a way to manually run `npm install && npm run build` in `js/` before committing, -so that the lockfile and build artifacts stay in sync with `js/package.json`. + This command does the following: + + - Downloads new versions of `plot-schema.json` and `plotly.min.js` from the [plotly.js GitHub repository](https://github.com/plotly/plotly.js) +and places them in `codegen/resources/` and `plotly/package_data/`, respectively. + - Updates `plotly/offline/_plotlyjs_version.py` with the new version + - Regenerates all of the classes under `graph_objs/` (`go.Figure`, `go.Layout`, etc.), and `plotly/validators/_validators.json`, based on the new schema + - Runs `npm install` in `js/` to update `js/package-lock.json` + - Runs `npm run build` in `js/` to rebuild the JupyterLab extension and FigureWidget bundles, which updates the artifacts in `plotly/labextension` and `plotly/package_data/widgetbundle.js`. + + > Note: To skip the `npm` steps entirely (e.g. if `npm` isn't available), you can set the `SKIP_NPM=1` environment variable: + > + > ```bash + > SKIP_NPM=1 python commands.py updateplotlyjs + > ``` + > + > However, before proceeding further, you'll still need to somehow run `npm install && npm run build` in `js/` before committing, so that the lockfile and build artifacts stay in sync with `js/package.json`. + +4. Commit the updated files under: + - `codegen/resources/` + - `js/` + - `plotly/graph_objs/` + - `plotly/labextension/` + - `plotly/offline/` + - `plotly/package_data/` + +5. To double-check that the update worked properly, you can use this one-liner: + + ```bash + pip install -e . && python -c "import plotly.graph_objects as go; fig = go.Figure([go.Scatter(y=[2,1,3])]); fig.show()" + ``` + + The plot will open in a browser window; hover over the Plotly logo in the modebar in the upper-right corner to verify that the plotly.js version is correct. + +6. Open a PR into `main`. + +7. Add a changelog entry to `CHANGELOG.md` with a link to the PR. We typically mention the version update, link to the plotly.js GitHub release page, and list out the most important changes. Follow the format of previous plotly.js version bump changelog updates. ### Using a Development Branch of Plotly.js From 887c401fd97132eca00ff2bb17dd51a99845737b Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Wed, 9 Sep 2026 12:11:36 -0400 Subject: [PATCH 3/4] update years in license and README --- LICENSE.txt | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 13ffac3c942..67d1088f1ba 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016-2024 Plotly Technologies Inc. +Copyright (c) 2016-2026 Plotly Technologies Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index d64e748fc9f..4964f7bfcb7 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ on your command line. ## Copyright and Licenses -Code and documentation copyright 2019 Plotly, Inc. +Code and documentation copyright 2026 Plotly, Inc. Code released under the [MIT license](https://github.com/plotly/plotly.py/blob/main/LICENSE.txt). From 078e0424c1128ef16ae428ab44dd18af0ef7df60 Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Wed, 9 Sep 2026 12:20:22 -0400 Subject: [PATCH 4/4] update changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09fffdbd6b0..cf2816487b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,13 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Fix `mpl_to_plotly` not setting `paper_bgcolor` and `plot_bgcolor` from the matplotlib figure and axes backgrounds, so converted figures match the source figure's background colors [[#5285](https://github.com/plotly/plotly.py/pull/5285)], with thanks to @robertoffmoura for the contribution! - Fix rendering issue causing a too-large div when calling `Figure.show()` in Google Colab [[#5718](https://github.com/plotly/plotly.py/pull/5718)] +### Updated +- Update plotly.js from version 4.0.0 to version 4.1.0 [[#5722](https://github.com/plotly/plotly.py/pull/5722)]. See the [plotly.js release notes](https://github.com/plotly/plotly.js/releases/tag/v4.1.0) for details. Notable changes include: + - Add an opt-in modebar button for downloading Plotly figures as JSON [[#7990](https://github.com/plotly/plotly.js/pull/7990), [#8022](https://github.com/plotly/plotly.js/pull/8022)] + - Add `legend.groupdoubleclick` to set the group behavior for a legend double-click [[#7997](https://github.com/plotly/plotly.js/pull/7997)] + - Increase default double-click delay threshold to 500ms (from 300) [[#8014](https://github.com/plotly/plotly.js/pull/8014)] + - Fix issue with per-point marker color for hover labels in `scattergl`, `quiver` traces [[#8027](https://github.com/plotly/plotly.js/pull/8027)] + ## [7.0.0] - 2026-08-25 ### Fixed